commit f76349cf41451c5c42a99f18a9163377e4b364ff Author: Linus Torvalds Date: Sun Sep 25 14:01:02 2022 -0700 Linux 6.0-rc7 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e049663f678938dd56812ba870a471060f8ce28 Merge: 4207d59567c0 80fa46d6b9e7 Author: Linus Torvalds Date: Sun Sep 25 09:03:31 2022 -0700 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "Regression and bug fixes: - Performance regression fix from 5.18 on a Rasberry Pi - Fix extent parsing bug which triggers a BUG_ON when a (corrupted) extent tree has has a non-root node when zero entries. - Fix a livelock where in the right (wrong) circumstances a large number of nfsd threads can try to write to a nearly full file system, and retry for hours(!)" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: limit the number of retries after discarding preallocations blocks ext4: fix bug in extents parsing when eh_entries == 0 and eh_depth > 0 ext4: use buckets for cr 1 block scan instead of rbtree ext4: use locality group preallocation for small closed files ext4: make directory inode spreading reflect flexbg size ext4: avoid unnecessary spreading of allocations among groups ext4: make mballoc try target group first even with mb_optimize_scan commit 4207d59567c017be284dbebc5d3fb5a2037a5df5 Merge: f0cc7c00089b b3bbcc5d1da1 Author: Linus Torvalds Date: Sun Sep 25 08:53:52 2022 -0700 Merge tag 'dax-and-nvdimm-fixes-v6.0-final' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull NVDIMM and DAX fixes from Dan Williams: "A recently discovered one-line fix for devdax that further addresses a v5.5 regression, and (a bit embarrassing) a small batch of fixes that have been sitting in my fixes tree for weeks. The older fixes have soaked in linux-next during that time and address an fsdax infinite loop and some other minor fixups. - Fix a infinite loop bug in fsdax - Fix memory-type detection for devdax (EINJ regression) - Small cleanups" * tag 'dax-and-nvdimm-fixes-v6.0-final' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: devdax: Fix soft-reservation memory description fsdax: Fix infinite loop in dax_iomap_rw() nvdimm/namespace: drop nested variable in create_namespace_pmem() ndtest: Cleanup all of blk namespace specific code pmem: fix a name collision commit f0cc7c00089bf923259370fefc1d4f48d7252fc5 Merge: 105a36f3694e b7af938f4379 Author: Linus Torvalds Date: Sun Sep 25 08:44:46 2022 -0700 Merge tag 'i2c-for-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "I2C driver bugfixes for mlxbf and imx, a few documentation fixes after the rework this cycle, and one hardening for the i2c-mux core" * tag 'i2c-for-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: mux: harden i2c_mux_alloc() against integer overflows i2c: mlxbf: Fix frequency calculation i2c: mlxbf: prevent stack overflow in mlxbf_i2c_smbus_start_transaction() i2c: mlxbf: incorrect base address passed during io write Documentation: i2c: fix references to other documents MAINTAINERS: remove Nehal Shah from AMD MP2 I2C DRIVER i2c: imx: If pm_runtime_get_sync() returned 1 device access is possible commit b3bbcc5d1da1b654091dad15980b3d58fdae0fc6 Merge: 17d9c15c9b9e 67feaba413ec Author: Dan Williams Date: Sat Sep 24 18:14:12 2022 -0700 Merge branch 'for-6.0/dax' into libnvdimm-fixes Pick up another "Soft Reservation" fix for v6.0-final on top of some straggling nvdimm fixes that missed v5.19. commit 67feaba413ec68daf4124e9870878899b4ed9a0e Author: Dan Williams Date: Fri Sep 23 15:05:56 2022 -0700 devdax: Fix soft-reservation memory description The "hmem" platform-devices that are created to represent the platform-advertised "Soft Reserved" memory ranges end up inserting a resource that causes the iomem_resource tree to look like this: 340000000-43fffffff : hmem.0 340000000-43fffffff : Soft Reserved 340000000-43fffffff : dax0.0 This is because insert_resource() reparents ranges when they completely intersect an existing range. This matters because code that uses region_intersects() to scan for a given IORES_DESC will only check that top-level 'hmem.0' resource and not the 'Soft Reserved' descendant. So, to support EINJ (via einj_error_inject()) to inject errors into memory hosted by a dax-device, be sure to describe the memory as IORES_DESC_SOFT_RESERVED. This is a follow-on to: commit b13a3e5fd40b ("ACPI: APEI: Fix _EINJ vs EFI_MEMORY_SP") ...that fixed EINJ support for "Soft Reserved" ranges in the first instance. Fixes: 262b45ae3ab4 ("x86/efi: EFI soft reservation to E820 enumeration") Reported-by: Ricardo Sandoval Torres Tested-by: Ricardo Sandoval Torres Cc: Cc: Tony Luck Cc: Omar Avelar Cc: Rafael J. Wysocki Cc: Mark Gross Link: https://lore.kernel.org/r/166397075670.389916.7435722208896316387.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/dax/hmem/device.c | 1 + 1 file changed, 1 insertion(+) commit 105a36f3694edc680f3e9318cdd3c03722e42554 Merge: 23b99237f86d 32ef9e5054ec Author: Linus Torvalds Date: Sat Sep 24 17:41:17 2022 -0700 Merge tag 'kbuild-fixes-v6.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Fix build error for the combination of SYSTEM_TRUSTED_KEYRING=y and X509_CERTIFICATE_PARSER=m - Fix DEBUG_INFO_SPLIT to generate debug info for GCC 11+ and Clang 12+ - Revive debug info for assembly files - Remove unused code * tag 'kbuild-fixes-v6.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: Makefile.debug: re-enable debug info for .S files Makefile.debug: set -g unconditional on CONFIG_DEBUG_INFO_SPLIT certs: make system keyring depend on built-in x509 parser Kconfig: remove unused function 'menu_get_root_menu' scripts/clang-tools: remove unused module commit 23b99237f86df34cbcefa81d1fa45bc316b4a124 Merge: 42f9508b3bcb 1918f2b20c3d Author: Linus Torvalds Date: Sat Sep 24 17:35:42 2022 -0700 Merge tag 's390-6.0-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fix from Vasily Gorbik: - Fix potential hangs in VFIO AP driver * tag 's390-6.0-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/vfio-ap: bypass unnecessary processing of AP resources commit 42f9508b3bcb4214491a327238170963a59a309d Merge: 1a61b828566f 9614369a042a Author: Linus Torvalds Date: Sat Sep 24 08:53:57 2022 -0700 Merge tag 'pm-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix an uninitialized variable usage in the operating performance points code and add missing DT bindings for it. Specifics: - Fix uninitialized variable usage in dev_pm_opp_config_clks_simple() (Christophe JAILLET) - Add missing OPP DT properties (Rob Herring)" * tag 'pm-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: dt-bindings: opp: Add missing (unevaluated|additional)Properties on child nodes OPP: Fix an un-initialized variable usage commit 1a61b828566fba088d3baa0dc3e440b51fdf9ce2 Merge: 7e2cd21e02b3 2bc54aaa65d2 Author: Linus Torvalds Date: Sat Sep 24 08:46:07 2022 -0700 Merge tag 'char-misc-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are three tiny driver fixes for 6.0-rc7. They include: - phy driver reset bugfix - fpga memleak bugfix - counter irq config bugfix The first two have been in linux-next for a while, the last one has only been added to my tree in the past few days, but was in linux-next under a different commit id. I couldn't pull directly from the counter tree due to some gpg key propagation issue, so I took the commit directly from email instead" * tag 'char-misc-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: counter: 104-quad-8: Fix skipped IRQ lines during events configuration fpga: m10bmc-sec: Fix possible memory leak of flash_buf phy: marvell: phy-mvebu-a3700-comphy: Remove broken reset support commit 7e2cd21e02b35483ce8ea88da5732d4d3ec3a6c9 Merge: 1772094f12a7 643792048ee8 Author: Linus Torvalds Date: Sat Sep 24 08:42:55 2022 -0700 Merge tag 'tty-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver fixes from Greg KH: "Here are some small, and late, serial driver fixes for 6.0-rc7 to resolve some reported problems. Included in here are: - tegra icount accounting fixes, including a framework function that other drivers will be converted over to using in 6.1-rc1. - fsl_lpuart reset bugfix - 8250 omap 485 bugfix - sifive serial clock bugfix The last three patches have not shown up in linux-next due to them being added to my tree only 2 days ago, but they are tiny and self-contained and the developers say they resolve issues that they have with 6.0-rc. The other three have been in linux-next for a while with no reported issues" * tag 'tty-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: sifive: enable clocks for UART when probed serial: 8250: omap: Use serial8250_em485_supported serial: fsl_lpuart: Reset prior to registration serial: tegra-tcu: Use uart_xmit_advance(), fixes icount.tx accounting serial: tegra: Use uart_xmit_advance(), fixes icount.tx accounting serial: Create uart_xmit_advance() commit 1772094f12a7b180aa9ab849586f891b14d06d1f Merge: aae8dda51964 df02452f3df0 Author: Linus Torvalds Date: Sat Sep 24 08:36:10 2022 -0700 Merge tag 'cgroup-for-6.0-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: - Add Waiman Long as a cpuset maintainer - cgroup_get_from_id() could be fed a kernfs ID which doesn't point to a cgroup directory but a knob file and then crash. Error out if the lookup kernfs_node isn't a directory. * tag 'cgroup-for-6.0-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: cgroup_get_from_id() must check the looked-up kn is a directory cpuset: Add Waiman Long as a cpuset maintainer commit aae8dda51964ff9d3f1dc96528b853826667efad Merge: 3db61221f4e8 c0feea594e05 Author: Linus Torvalds Date: Sat Sep 24 08:32:59 2022 -0700 Merge tag 'wq-for-6.0-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fix from Tejun Heo: "Just one patch to improve flush lockdep coverage" * tag 'wq-for-6.0-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: don't skip lockdep work dependency in cancel_work_sync() commit 3db61221f4e8f18d1dd6e45dbe9e3702ff2d67ab Merge: 0be27f7be2e5 e775f93f2ab9 Author: Linus Torvalds Date: Sat Sep 24 08:27:08 2022 -0700 Merge tag 'io_uring-6.0-2022-09-23' of git://git.kernel.dk/linux Pull io_uring fix from Jens Axboe: "Just a single fix for an issue with un-reaped IOPOLL requests on ring exit" * tag 'io_uring-6.0-2022-09-23' of git://git.kernel.dk/linux: io_uring: ensure that cached task references are always put on exit commit 0be27f7be2e5def5577de097fb420af09acf0983 Merge: a63f2e7cb110 4c66a326b5ab Author: Linus Torvalds Date: Sat Sep 24 08:22:53 2022 -0700 Merge tag 'block-6.0-2022-09-22' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: "Fix a regression that's been plaguing us by reverting the offending commit, as attempts to both reproduce the issue and fix it in a saner fashion have failed. Fix for a potential oops condition in the s390 dasd block driver" * tag 'block-6.0-2022-09-22' of git://git.kernel.dk/linux: Revert "block: freeze the queue earlier in del_gendisk" s390/dasd: fix Oops in dasd_alias_get_start_dev due to missing pavgroup commit 32ef9e5054ec0321b9336058c58ec749e9c6b0fe Author: Nick Desaulniers Date: Mon Sep 19 10:45:47 2022 -0700 Makefile.debug: re-enable debug info for .S files Alexey reported that the fraction of unknown filename instances in kallsyms grew from ~0.3% to ~10% recently; Bill and Greg tracked it down to assembler defined symbols, which regressed as a result of: commit b8a9092330da ("Kbuild: do not emit debug info for assembly with LLVM_IAS=1") In that commit, I allude to restoring debug info for assembler defined symbols in a follow up patch, but it seems I forgot to do so in commit a66049e2cf0e ("Kbuild: make DWARF version a choice") Link: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=31bf18645d98b4d3d7357353be840e320649a67d Fixes: b8a9092330da ("Kbuild: do not emit debug info for assembly with LLVM_IAS=1") Reported-by: Alexey Alexandrov Reported-by: Bill Wendling Reported-by: Greg Thelen Reviewed-by: Nathan Chancellor Suggested-by: Masahiro Yamada Signed-off-by: Nick Desaulniers Signed-off-by: Masahiro Yamada lib/Kconfig.debug | 4 +++- scripts/Makefile.debug | 21 +++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) commit 61f2b7c7497ba96cdde5bbaeb9e07f4c48f41f97 Author: Nick Desaulniers Date: Mon Sep 19 10:30:30 2022 -0700 Makefile.debug: set -g unconditional on CONFIG_DEBUG_INFO_SPLIT Dmitrii, Fangrui, and Mashahiro note: Before GCC 11 and Clang 12 -gsplit-dwarf implicitly uses -g2. Fix CONFIG_DEBUG_INFO_SPLIT for gcc-11+ & clang-12+ which now need -g specified in order for -gsplit-dwarf to work at all. -gsplit-dwarf has been mutually exclusive with -g since support for CONFIG_DEBUG_INFO_SPLIT was introduced in commit 866ced950bcd ("kbuild: Support split debug info v4") I don't think it ever needed to be. Link: https://lore.kernel.org/lkml/20220815013317.26121-1-dmitrii.bundin.a@gmail.com/ Link: https://lore.kernel.org/lkml/CAK7LNARPAmsJD5XKAw7m_X2g7Fi-CAAsWDQiP7+ANBjkg7R7ng@mail.gmail.com/ Link: https://reviews.llvm.org/D80391 Cc: Andi Kleen Reported-by: Dmitrii Bundin Reported-by: Fangrui Song Reported-by: Masahiro Yamada Suggested-by: Dmitrii Bundin Reviewed-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Masahiro Yamada scripts/Makefile.debug | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e775f93f2ab976a2cdb4a7b53063cbe890904f73 Author: Jens Axboe Date: Fri Sep 23 13:44:56 2022 -0600 io_uring: ensure that cached task references are always put on exit io_uring caches task references to avoid doing atomics for each of them per request. If a request is put from the same task that allocated it, then we can maintain a per-ctx cache of them. This obviously relies on io_uring always pruning caches in a reliable way, and there's currently a case off io_uring fd release where we can miss that. One example is a ring setup with IOPOLL, which relies on the task polling for completions, which will free them. However, if such a task submits a request and then exits or closes the ring without reaping the completion, then ring release will reap and put. If release happens from that very same task, the completed request task refs will get put back into the cache pool. This is problematic, as we're now beyond the point of pruning caches. Manually drop these caches after doing an IOPOLL reap. This releases references from the current task, which is enough. If another task happens to be doing the release, then the caching will not be triggered and there's no issue. Cc: stable@vger.kernel.org Fixes: e98e49b2bbf7 ("io_uring: extend task put optimisations") Reported-by: Homin Rhee Signed-off-by: Jens Axboe io_uring/io_uring.c | 3 +++ 1 file changed, 3 insertions(+) commit a63f2e7cb1107ab124f80407e5eb8579c04eb7a9 Merge: 1707c39ae309 13b056696291 Author: Linus Torvalds Date: Fri Sep 23 15:28:51 2022 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "These are all very simple and self-contained, although the CFI jump-table fix touches the generic linker script as that's where the problematic macro lives. - Fix false positive "sleeping while atomic" warning resulting from the kPTI rework taking a mutex too early. - Fix possible overflow in AMU frequency calculation - Fix incorrect shift in CMN PMU driver which causes problems with newer versions of the IP - Reduce alignment of the CFI jump table to avoid huge kernel images and link errors with !4KiB page size configurations" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: vmlinux.lds.h: CFI: Reduce alignment of jump-table to function alignment perf/arm-cmn: Add more bits to child node address offset field arm64: topology: fix possible overflow in amu_fie_setup() arm64: mm: don't acquire mutex when rewriting swapper commit 2154aca21408752eaa3eeaf2ba6e942724ff2a4d Author: Masahiro Yamada Date: Mon Sep 12 15:52:10 2022 +0900 certs: make system keyring depend on built-in x509 parser Commit e90886291c7c ("certs: make system keyring depend on x509 parser") is not the right fix because x509_load_certificate_list() can be modular. The combination of CONFIG_SYSTEM_TRUSTED_KEYRING=y and CONFIG_X509_CERTIFICATE_PARSER=m still results in the following error: LD .tmp_vmlinux.kallsyms1 ld: certs/system_keyring.o: in function `load_system_certificate_list': system_keyring.c:(.init.text+0x8c): undefined reference to `x509_load_certificate_list' make: *** [Makefile:1169: vmlinux] Error 1 Fixes: e90886291c7c ("certs: make system keyring depend on x509 parser") Signed-off-by: Masahiro Yamada Tested-by: Adam Borowski certs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03764b30a4f0185a97515d616e60e2e00c558583 Author: Zeng Heng Date: Mon Sep 12 17:48:38 2022 +0800 Kconfig: remove unused function 'menu_get_root_menu' There is nowhere calling `menu_get_root_menu` function, so remove it. Signed-off-by: Zeng Heng Signed-off-by: Masahiro Yamada scripts/kconfig/lkc.h | 1 - scripts/kconfig/menu.c | 5 ----- 2 files changed, 6 deletions(-) commit 237fe72749425f2cd3132bf54fa6b98807c27938 Author: yangxingwu Date: Tue Sep 13 04:07:53 2022 +0000 scripts/clang-tools: remove unused module Remove unused imported 'os' module. Signed-off-by: yangxingwu Reviewed-by: Nathan Chancellor Signed-off-by: Masahiro Yamada scripts/clang-tools/run-clang-tools.py | 1 - 1 file changed, 1 deletion(-) commit df02452f3df069a59bc9e69c84435bf115cb6e37 Author: Ming Lei Date: Fri Sep 23 19:51:19 2022 +0800 cgroup: cgroup_get_from_id() must check the looked-up kn is a directory cgroup has to be one kernfs dir, otherwise kernel panic is caused, especially cgroup id is provide from userspace. Reported-by: Marco Patalano Fixes: 6b658c4863c1 ("scsi: cgroup: Add cgroup_get_from_id()") Cc: Muneendra Signed-off-by: Ming Lei Acked-by: Mukesh Ojha Cc: stable@vger.kernel.org # v5.14+ Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1707c39ae309bf91965aa6f04d63816a090d90a1 Merge: 33a4e37ebc8c d7f06bdd6ee8 Author: Linus Torvalds Date: Fri Sep 23 09:12:18 2022 -0700 Merge tag 'driver-core-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are two tiny driver core fixes for 6.0-rc7 that resolve some oft-reported problems. The first is a revert of the "fw_devlink.strict=1" default option that we keep trying to enable, but we keep finding platforms that this just breaks everything on. So again, we need it reverted and hopefully it can be worked on in future releases. The second is a sysfs file-size bugfix that resolves an issue that many people are starting to hit as the fix it is fixing also was backported to stable kernels. The util-linux developers are starting to get bugreports about sysfs files that contain no data because of this problem, and this fix which has been in linux-next in the bitfield tree for a long time, resolves it. I'm submitting it here as it needs to be merged for 6.0-final, not for 6.1-rc1. Both of these have been in linux-next with no reported issues, only reports were that these fixed problems" * tag 'driver-core-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: drivers/base: Fix unsigned comparison to -1 in CPUMAP_FILE_MAX_BYTES Revert "driver core: Set fw_devlink.strict=1 by default" commit 33a4e37ebc8ccdfe2c51306b1a40d9e7d17b4691 Merge: 9395cd7cef45 47af6c640ed8 Author: Linus Torvalds Date: Fri Sep 23 09:07:08 2022 -0700 Merge tag 'usb-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt driver fixes and ids from Greg KH: "Here are a few small USB and Thunderbolt driver fixes and new device ids for 6.0-rc7. They contain: - new usb-serial driver ids - documentation build warning fix in USB hub code - flexcop-usb long-posted bugfix (the v4l maintainer for this is MIA so I have finally picked this up as it is a fix for a reported problem.) - dwc3 64bit DMA bugfix - new thunderbolt device ids - typec build error fix All of these have been in linux-next with no reported issues" * tag 'usb-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: typec: anx7411: Fix build error without CONFIG_POWER_SUPPLY media: flexcop-usb: fix endpoint type check USB: serial: option: add Quectel RM520N USB: serial: option: add Quectel BG95 0x0203 composition thunderbolt: Add support for Intel Maple Ridge single port controller usb: dwc3: core: leave default DMA if the controller does not support 64-bit DMA USB: core: Fix RST error in hub.c commit 9395cd7cef45698a7fd64f53cf97ce511e1334ba Merge: a7b7751aeb13 a52540522c95 Author: Linus Torvalds Date: Fri Sep 23 08:59:16 2022 -0700 Merge tag 'landlock-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux Pull landlock fix from Mickaël Salaün: "Fix out-of-tree builds for Landlock tests" * tag 'landlock-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux: selftests/landlock: Fix out-of-tree builds commit a7b7751aeb1348a4358724719aac5310597144fc Merge: 317fab7ec55d c589e3ca27c9 Author: Linus Torvalds Date: Fri Sep 23 08:51:05 2022 -0700 Merge tag 'riscv-for-linus-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A handful of build fixes for the T-Head errata, including some functional issues the compilers found - A fix for a nasty sigreturn bug * tag 'riscv-for-linus-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: Avoid coupling the T-Head CMOs and Zicbom riscv: fix a nasty sigreturn bug... riscv: make t-head erratas depend on MMU riscv: fix RISCV_ISA_SVPBMT kconfig dependency warning RISC-V: Clean up the Zicbom block size probing commit 317fab7ec55d5a150bce46f37efbc942013a8c5b Merge: 526e82628560 69604fe76e58 Author: Linus Torvalds Date: Fri Sep 23 08:42:30 2022 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "As everyone back came back from conferences, here are the pending patches for Linux 6.0. ARM: - Fix for kmemleak with pKVM s390: - Fixes for VFIO with zPCI - smatch fix x86: - Ensure XSAVE-capable hosts always allow FP and SSE state to be saved and restored via KVM_{GET,SET}_XSAVE - Fix broken max_mmu_rmap_size stat - Fix compile error with old glibc that doesn't have gettid()" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: Inject #UD on emulated XSETBV if XSAVES isn't enabled KVM: x86: Always enable legacy FP/SSE in allowed user XFEATURES KVM: x86: Reinstate kvm_vcpu_arch.guest_supported_xcr0 KVM: x86/mmu: add missing update to max_mmu_rmap_size selftests: kvm: Fix a compile error in selftests/kvm/rseq_test.c KVM: s390: pci: register pci hooks without interpretation KVM: s390: pci: fix GAIT physical vs virtual pointers usage KVM: s390: Pass initialized arg even if unused KVM: s390: pci: fix plain integer as NULL pointer warnings KVM: arm64: Use kmemleak_free_part_phys() to unregister hyp_mem_base commit 526e8262856027cea38c45a5ff45fbe4204aed04 Merge: 22565ae78413 ce6b8ccdef95 Author: Linus Torvalds Date: Fri Sep 23 08:31:24 2022 -0700 Merge tag 'for-linus-6.0-rc7-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 in the xenbus driver (initialization of multi-page rings for Xen PV devices)" * tag 'for-linus-6.0-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/xenbus: fix xenbus_setup_ring() commit 22565ae784134282e03912023456151a61db479c Merge: bf682942cd26 8288206c2785 Author: Linus Torvalds Date: Fri Sep 23 08:18:55 2022 -0700 Merge tag 'drm-fixes-2022-09-23-1' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regular fixes for the week, i915, mediatek, hisilicon, mgag200 and panel have some small fixes. amdgpu has more stack size fixes for clang build, and fixes for new IPs, but all with low regression chances since they are for stuff new in v6.0. i915: - avoid a general protection failure when using perf/OA - avoid kernel warnings on driver release amdgpu: - SDMA 6.x fix - GPUVM TF fix - DCN 3.2.x fixes - DCN 3.1.x fixes - SMU 13.x fixes - Clang stack size fixes for recently enabled DML code - Fix drm dirty callback change on non-atomic cases - USB4 display fix mediatek: - dsi: Add atomic {destroy,duplicate}_state, reset callbacks - dsi: Move mtk_dsi_stop() call back to mtk_dsi_poweroff() - Fix wrong dither settings hisilicon: - Depend on MMU mgag200: - Fix console on G200ER panel: - Fix innolux_g121i1_l01 bus format" * tag 'drm-fixes-2022-09-23-1' of git://anongit.freedesktop.org/drm/drm: (30 commits) MAINTAINERS: switch graphics to airlied other addresses drm/mediatek: dsi: Move mtk_dsi_stop() call back to mtk_dsi_poweroff() drm/amd/display: Reduce number of arguments of dml314's CalculateFlipSchedule() drm/amd/display: Reduce number of arguments of dml314's CalculateWatermarksAndDRAMSpeedChangeSupport() drm/amdgpu: don't register a dirty callback for non-atomic drm/amd/pm: drop the pptable related workarounds for SMU 13.0.0 drm/amd/pm: add support for 3794 pptable for SMU13.0.0 drm/amd/display: correct num_dsc based on HW cap drm/amd/display: Disable OTG WA for the plane_state NULL case on DCN314 drm/amd/display: Add shift and mask for ICH_RESET_AT_END_OF_LINE drm/amd/display: increase dcn315 pstate change latency drm/amd/display: Fix DP MST timeslot issue when fallback happened drm/amd/display: Display distortion after hotplug 5K tiled display drm/amd/display: Update dummy P-state search to use DCN32 DML drm/amd/display: skip audio setup when audio stream is enabled drm/amd/display: update gamut remap if plane has changed drm/amd/display: Assume an LTTPR is always present on fixed_vs links drm/amd/display: fix dcn315 memory channel count and width read drm/amd/display: Fix double cursor on non-video RGB MPO drm/amd/display: Only consider pixle rate div policy for DCN32+ ... commit 69604fe76e58c9d195e48b41d019b07fc27ce9d7 Merge: 50b2d49bafa1 189e7d876e48 Author: Paolo Bonzini Date: Fri Sep 23 10:06:08 2022 -0400 Merge tag 'kvm-s390-master-6.0-2' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD More pci fixes Fix for a code analyser warning commit 13b0566962914e167cb3238fbe29ced618f07a27 Author: Will Deacon Date: Thu Sep 22 22:57:15 2022 +0100 vmlinux.lds.h: CFI: Reduce alignment of jump-table to function alignment Due to undocumented, hysterical raisins on x86, the CFI jump-table sections in .text are needlessly aligned to PMD_SIZE in the vmlinux linker script. When compiling a CFI-enabled arm64 kernel with a 64KiB page-size, a PMD maps 512MiB of virtual memory and so the .text section increases to a whopping 940MiB and blows the final Image up to 960MiB. Others report a link failure. Since the CFI jump-table requires only instruction alignment, reduce the alignment directives to function alignment for parity with other parts of the .text section. This reduces the size of the .text section for the aforementioned 64KiB page size arm64 kernel to 19MiB for a much more reasonable total Image size of 39MiB. Cc: Sami Tolvanen Cc: Mark Rutland Cc: "Mohan Rao .vanimina" Cc: Kees Cook Cc: Nathan Chancellor Cc: Link: https://lore.kernel.org/all/CAL_GTzigiNOMYkOPX1KDnagPhJtFNqSK=1USNbS0wUL4PW6-Uw@mail.gmail.com/ Fixes: cf68fffb66d6 ("add support for Clang CFI") Reviewed-by: Mark Rutland Tested-by: Mark Rutland Reviewed-by: Sami Tolvanen Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20220922215715.13345-1-will@kernel.org Signed-off-by: Will Deacon include/asm-generic/vmlinux.lds.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8288206c27856f6f56d35aacf3a48ee923e1d3e2 Author: Dave Airlie Date: Fri Sep 23 15:36:12 2022 +1000 MAINTAINERS: switch graphics to airlied other addresses My linux.ie address is in a bad place. also add dri-devel for agpgart. Signed-off-by: Dave Airlie MAINTAINERS | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 3b38b65ed076fa93f1b0d5fb97c55a9bf692cc49 Merge: 73646baf6844 d8a79c030549 Author: Dave Airlie Date: Fri Sep 23 13:18:21 2022 +1000 Merge tag 'drm-misc-fixes-2022-09-22' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull * drm/hisilicon: Depend on MMU * drm/mgag200: Fix console on G200ER * drm/panel: Fix innolux_g121i1_l01 bus format Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YyxtXS588at6S4wg@linux-uq9g commit 73646baf68444e24284516ddd4dac43ddb3162d4 Merge: 387df878fdcf 90144dd8b0d1 Author: Dave Airlie Date: Fri Sep 23 13:15:29 2022 +1000 Merge tag 'mediatek-drm-fixes-6.0' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-fixes Mediatek DRM Fixes for Linux 6.0 1. dsi: Add atomic {destroy,duplicate}_state, reset callbacks 2. drm/mediatek: Fix wrong dither settings 3. dsi: Move mtk_dsi_stop() call back to mtk_dsi_poweroff() Signed-off-by: Dave Airlie From: Chun-Kuang Hu Link: https://patchwork.freedesktop.org/patch/msgid/20220921235624.23580-1-chunkuang.hu@kernel.org commit 387df878fdcf63ce497109c4e1eb805a7df9043f Merge: d21fc11109ca f525ed19437d Author: Dave Airlie Date: Fri Sep 23 11:12:06 2022 +1000 Merge tag 'amd-drm-fixes-6.0-2022-09-21' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.0-2022-09-21: amdgpu: - SDMA 6.x fix - GPUVM TF fix - DCN 3.2.x fixes - DCN 3.1.x fixes - SMU 13.x fixes - Clang stack size fixes for recently enabled DML code - Fix drm dirty callback change on non-atomic cases - USB4 display fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20220921220605.6136-1-alexander.deucher@amd.com commit bf682942cd26ce9cd5e87f73ae099b383041e782 Merge: 3c0f396a386c e0e0747de0ea Author: Linus Torvalds Date: Thu Sep 22 14:43:55 2022 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Three small and pretty obvious fixes, all in drivers" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: mpt3sas: Fix return value check of dma_get_required_mask() scsi: qla2xxx: Fix memory leak in __qlt_24xx_handle_abts() scsi: qedf: Fix a UAF bug in __qedf_probe() commit 3c0f396a386c81715e34472566cdd8f39dde5a6a Merge: c69cf88cda5f e45cc288724f Author: Linus Torvalds Date: Thu Sep 22 14:37:58 2022 -0700 Merge tag 'slab-for-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab Pull slab fixes from Vlastimil Babka: - Fix a possible use-after-free in SLUB's kmem_cache removal, introduced in this cycle, by Feng Tang. - WQ_MEM_RECLAIM dependency fix for the workqueue-based cpu slab flushing introduced in 5.15, by Maurizio Lombardi. - Add missing KASAN hooks in two kmalloc entry paths, by Peter Collingbourne. - A BUG_ON() removal in SLUB's kmem_cache creation when allocation fails (too small to possibly happen in practice, syzbot used fault injection), by Chao Yu. * tag 'slab-for-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: mm: slub: fix flush_cpu_slab()/__free_slab() invocations in task context. mm/slab_common: fix possible double free of kmem_cache kasan: call kasan_malloc() from __kmalloc_*track_caller() mm/slub: fix to return errno if kmalloc() fails commit 50b2d49bafa16e6311ab2da82f5aafc5f9ada99b Author: Sean Christopherson Date: Wed Aug 24 03:30:57 2022 +0000 KVM: x86: Inject #UD on emulated XSETBV if XSAVES isn't enabled Inject #UD when emulating XSETBV if CR4.OSXSAVE is not set. This also covers the "XSAVE not supported" check, as setting CR4.OSXSAVE=1 #GPs if XSAVE is not supported (and userspace gets to keep the pieces if it forces incoherent vCPU state). Add a comment to kvm_emulate_xsetbv() to call out that the CPU checks CR4.OSXSAVE before checking for intercepts. AMD'S APM implies that #UD has priority (says that intercepts are checked before #GP exceptions), while Intel's SDM says nothing about interception priority. However, testing on hardware shows that both AMD and Intel CPUs prioritize the #UD over interception. Fixes: 02d4160fbd76 ("x86: KVM: add xsetbv to the emulator") Cc: stable@vger.kernel.org Cc: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Message-Id: <20220824033057.3576315-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 3 +++ arch/x86/kvm/x86.c | 1 + 2 files changed, 4 insertions(+) commit a1020a25e69755a8a1a37735d674b91d6f02939f Author: Dr. David Alan Gilbert Date: Wed Aug 24 03:30:56 2022 +0000 KVM: x86: Always enable legacy FP/SSE in allowed user XFEATURES Allow FP and SSE state to be saved and restored via KVM_{G,SET}_XSAVE on XSAVE-capable hosts even if their bits are not exposed to the guest via XCR0. Failing to allow FP+SSE first showed up as a QEMU live migration failure, where migrating a VM from a pre-XSAVE host, e.g. Nehalem, to an XSAVE host failed due to KVM rejecting KVM_SET_XSAVE. However, the bug also causes problems even when migrating between XSAVE-capable hosts as KVM_GET_SAVE won't set any bits in user_xfeatures if XSAVE isn't exposed to the guest, i.e. KVM will fail to actually migrate FP+SSE. Because KVM_{G,S}ET_XSAVE are designed to allowing migrating between hosts with and without XSAVE, KVM_GET_XSAVE on a non-XSAVE (by way of fpu_copy_guest_fpstate_to_uabi()) always sets the FP+SSE bits in the header so that KVM_SET_XSAVE will work even if the new host supports XSAVE. Fixes: ad856280ddea ("x86/kvm/fpu: Limit guest user_xfeatures to supported bits of XCR0") bz: https://bugzilla.redhat.com/show_bug.cgi?id=2079311 Cc: stable@vger.kernel.org Cc: Leonardo Bras Signed-off-by: Dr. David Alan Gilbert [sean: add comment, massage changelog] Signed-off-by: Sean Christopherson Message-Id: <20220824033057.3576315-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit ee519b3a2ae3027c341bce829ee8c51f4f494f5b Author: Sean Christopherson Date: Wed Aug 24 03:30:55 2022 +0000 KVM: x86: Reinstate kvm_vcpu_arch.guest_supported_xcr0 Reinstate the per-vCPU guest_supported_xcr0 by partially reverting commit 988896bb6182; the implicit assessment that guest_supported_xcr0 is always the same as guest_fpu.fpstate->user_xfeatures was incorrect. kvm_vcpu_after_set_cpuid() isn't the only place that sets user_xfeatures, as user_xfeatures is set to fpu_user_cfg.default_features when guest_fpu is allocated via fpu_alloc_guest_fpstate() => __fpstate_reset(). guest_supported_xcr0 on the other hand is zero-allocated. If userspace never invokes KVM_SET_CPUID2, supported XCR0 will be '0', whereas the allowed user XFEATURES will be non-zero. Practically speaking, the edge case likely doesn't matter as no sane userspace will live migrate a VM without ever doing KVM_SET_CPUID2. The primary motivation is to prepare for KVM intentionally and explicitly setting bits in user_xfeatures that are not set in guest_supported_xcr0. Because KVM_{G,S}ET_XSAVE can be used to svae/restore FP+SSE state even if the host doesn't support XSAVE, KVM needs to set the FP+SSE bits in user_xfeatures even if they're not allowed in XCR0, e.g. because XCR0 isn't exposed to the guest. At that point, the simplest fix is to track the two things separately (allowed save/restore vs. allowed XCR0). Fixes: 988896bb6182 ("x86/kvm/fpu: Remove kvm_vcpu_arch.guest_supported_xcr0") Cc: stable@vger.kernel.org Cc: Leonardo Bras Signed-off-by: Sean Christopherson Message-Id: <20220824033057.3576315-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/cpuid.c | 5 ++--- arch/x86/kvm/x86.c | 9 ++------- 3 files changed, 5 insertions(+), 10 deletions(-) commit 604f533262aea08671a74c2fd630c7deb9eb3c0d Author: Miaohe Lin Date: Wed Sep 7 16:06:57 2022 +0800 KVM: x86/mmu: add missing update to max_mmu_rmap_size The update to statistic max_mmu_rmap_size is unintentionally removed by commit 4293ddb788c1 ("KVM: x86/mmu: Remove redundant spte present check in mmu_set_spte"). Add missing update to it or max_mmu_rmap_size will always be nonsensical 0. Fixes: 4293ddb788c1 ("KVM: x86/mmu: Remove redundant spte present check in mmu_set_spte") Signed-off-by: Miaohe Lin Message-Id: <20220907080657.42898-1-linmiaohe@huawei.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 2 ++ 1 file changed, 2 insertions(+) commit 561cafebb2cf97b0927b4fb0eba22de6200f682e Author: Jinrong Liang Date: Tue Aug 2 15:12:40 2022 +0800 selftests: kvm: Fix a compile error in selftests/kvm/rseq_test.c The following warning appears when executing: make -C tools/testing/selftests/kvm rseq_test.c: In function ‘main’: rseq_test.c:237:33: warning: implicit declaration of function ‘gettid’; did you mean ‘getgid’? [-Wimplicit-function-declaration] (void *)(unsigned long)gettid()); ^~~~~~ getgid /usr/bin/ld: /tmp/ccr5mMko.o: in function `main': ../kvm/tools/testing/selftests/kvm/rseq_test.c:237: undefined reference to `gettid' collect2: error: ld returned 1 exit status make: *** [../lib.mk:173: ../kvm/tools/testing/selftests/kvm/rseq_test] Error 1 Use the more compatible syscall(SYS_gettid) instead of gettid() to fix it. More subsequent reuse may cause it to be wrapped in a lib file. Signed-off-by: Jinrong Liang Message-Id: <20220802071240.84626-1-cloudliang@tencent.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/rseq_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4ac28a32f589d389e5391f5b546c17a484915dc Merge: 29250ba51bc1 522c9a64c704 Author: Paolo Bonzini Date: Thu Sep 22 17:01:33 2022 -0400 Merge tag 'kvmarm-fixes-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.0, take #2 - Fix kmemleak usage in Protected KVM (again) commit e45cc288724f0cfd497bb5920bcfa60caa335729 Author: Maurizio Lombardi Date: Mon Sep 19 18:39:29 2022 +0200 mm: slub: fix flush_cpu_slab()/__free_slab() invocations in task context. Commit 5a836bf6b09f ("mm: slub: move flush_cpu_slab() invocations __free_slab() invocations out of IRQ context") moved all flush_cpu_slab() invocations to the global workqueue to avoid a problem related with deactivate_slab()/__free_slab() being called from an IRQ context on PREEMPT_RT kernels. When the flush_all_cpu_locked() function is called from a task context it may happen that a workqueue with WQ_MEM_RECLAIM bit set ends up flushing the global workqueue, this will cause a dependency issue. workqueue: WQ_MEM_RECLAIM nvme-delete-wq:nvme_delete_ctrl_work [nvme_core] is flushing !WQ_MEM_RECLAIM events:flush_cpu_slab WARNING: CPU: 37 PID: 410 at kernel/workqueue.c:2637 check_flush_dependency+0x10a/0x120 Workqueue: nvme-delete-wq nvme_delete_ctrl_work [nvme_core] RIP: 0010:check_flush_dependency+0x10a/0x120[ 453.262125] Call Trace: __flush_work.isra.0+0xbf/0x220 ? __queue_work+0x1dc/0x420 flush_all_cpus_locked+0xfb/0x120 __kmem_cache_shutdown+0x2b/0x320 kmem_cache_destroy+0x49/0x100 bioset_exit+0x143/0x190 blk_release_queue+0xb9/0x100 kobject_cleanup+0x37/0x130 nvme_fc_ctrl_free+0xc6/0x150 [nvme_fc] nvme_free_ctrl+0x1ac/0x2b0 [nvme_core] Fix this bug by creating a workqueue for the flush operation with the WQ_MEM_RECLAIM bit set. Fixes: 5a836bf6b09f ("mm: slub: move flush_cpu_slab() invocations __free_slab() invocations out of IRQ context") Cc: Signed-off-by: Maurizio Lombardi Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka mm/slub.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit c69cf88cda5faca0e411babb67ac0d8bfd8b4646 Merge: 504c25cb76a9 aaa58141a5d7 Author: Linus Torvalds Date: Thu Sep 22 11:10:11 2022 -0700 Merge tag 'soc-fixes-6.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "Another set of fixes for fixes for the soc tree: - A fix for the interrupt number on at91/lan966 ethernet PHYs - A second round of fixes for NXP i.MX series, including a couple of build issues, and board specific DT corrections on TQMa8MPQL, imx8mp-venice-gw74xx and imx8mm-verdin for reliability and partially broken functionality - Several fixes for Rockchip SoCs, addressing a USB issue on BPI-R2-Pro, wakeup on Gru-Bob and reliability of high-speed SD cards, among other minor issues - A fix for a long-running naming mistake that prevented the moxart mmc driver from working at all - Multiple Arm SCMI firmware fixes for hardening some corner cases" * tag 'soc-fixes-6.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (30 commits) arm64: dts: imx8mp-venice-gw74xx: fix port/phy validation ARM: dts: lan966x: Fix the interrupt number for internal PHYs arm64: dts: imx8mp-venice-gw74xx: fix ksz9477 cpu port arm64: dts: imx8mp-venice-gw74xx: fix CAN STBY polarity dt-bindings: memory-controllers: fsl,imx8m-ddrc: drop Leonard Crestez arm64: dts: tqma8mqml: Include phy-imx8-pcie.h header arm64: defconfig: enable ARCH_NXP arm64: dts: imx8mp-tqma8mpql-mba8mpxl: add missing pinctrl for RTC alarm ARM: dts: fix Moxa SDIO 'compatible', remove 'sdhci' misnomer arm64: dts: imx8mm-verdin: extend pmic voltages arm64: dts: rockchip: Remove 'enable-active-low' from rk3566-quartz64-a arm64: dts: rockchip: Remove 'enable-active-low' from rk3399-puma arm64: dts: rockchip: fix property for usb2 phy supply on rk3568-evb1-v10 arm64: dts: rockchip: fix property for usb2 phy supply on rock-3a arm64: dts: imx8ulp: add #reset-cells for pcc arm64: dts: tqma8mpxl-ba8mpxl: Fix button GPIOs arm64: dts: imx8mn: remove GPU power domain reset arm64: dts: rockchip: Set RK3399-Gru PCLK_EDP to 24 MHz arm64: dts: imx8mm: Reverse CPLD_Dn GPIO label mapping on MX8Menlo arm64: dts: rockchip: fix upper usb port on BPI-R2-Pro ... commit 504c25cb76a9cb805407f7701b25a1fbd48605fa Merge: 129e7152184b 83e4b196838d Author: Linus Torvalds Date: Thu Sep 22 10:58:13 2022 -0700 Merge tag 'net-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from wifi, netfilter and can. A handful of awaited fixes here - revert of the FEC changes, bluetooth fix, fixes for iwlwifi spew. We added a warning in PHY/MDIO code which is triggering on a couple of platforms in a false-positive-ish way. If we can't iron that out over the week we'll drop it and re-add for 6.1. I've added a new "follow up fixes" section for fixes to fixes in 6.0-rcs but it may actually give the false impression that those are problematic or that more testing time would have caught them. So likely a one time thing. Follow up fixes: - nf_tables_addchain: fix nft_counters_enabled underflow - ebtables: fix memory leak when blob is malformed - nf_ct_ftp: fix deadlock when nat rewrite is needed Current release - regressions: - Revert "fec: Restart PPS after link state change" and the related "net: fec: Use a spinlock to guard `fep->ptp_clk_on`" - Bluetooth: fix HCIGETDEVINFO regression - wifi: mt76: fix 5 GHz connection regression on mt76x0/mt76x2 - mptcp: fix fwd memory accounting on coalesce - rwlock removal fall out: - ipmr: always call ip{,6}_mr_forward() from RCU read-side critical section - ipv6: fix crash when IPv6 is administratively disabled - tcp: read multiple skbs in tcp_read_skb() - mdio_bus_phy_resume state warning fallout: - eth: ravb: fix PHY state warning splat during system resume - eth: sh_eth: fix PHY state warning splat during system resume Current release - new code bugs: - wifi: iwlwifi: don't spam logs with NSS>2 messages - eth: mtk_eth_soc: enable XDP support just for MT7986 SoC Previous releases - regressions: - bonding: fix NULL deref in bond_rr_gen_slave_id - wifi: iwlwifi: mark IWLMEI as broken Previous releases - always broken: - nf_conntrack helpers: - irc: tighten matching on DCC message - sip: fix ct_sip_walk_headers - osf: fix possible bogus match in nf_osf_find() - ipvlan: fix out-of-bound bugs caused by unset skb->mac_header - core: fix flow symmetric hash - bonding, team: unsync device addresses on ndo_stop - phy: micrel: fix shared interrupt on LAN8814" * tag 'net-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (83 commits) selftests: forwarding: add shebang for sch_red.sh bnxt: prevent skb UAF after handing over to PTP worker net: marvell: Fix refcounting bugs in prestera_port_sfp_bind() net: sched: fix possible refcount leak in tc_new_tfilter() net: sunhme: Fix packet reception for len < RX_COPY_THRESHOLD udp: Use WARN_ON_ONCE() in udp_read_skb() selftests: bonding: cause oops in bond_rr_gen_slave_id bonding: fix NULL deref in bond_rr_gen_slave_id net: phy: micrel: fix shared interrupt on LAN8814 net/smc: Stop the CLC flow if no link to map buffers on ice: Fix ice_xdp_xmit() when XDP TX queue number is not sufficient net: atlantic: fix potential memory leak in aq_ndev_close() can: gs_usb: gs_usb_set_phys_id(): return with error if identify is not supported can: gs_usb: gs_can_open(): fix race dev->can.state condition can: flexcan: flexcan_mailbox_read() fix return value for drop = true net: sh_eth: Fix PHY state warning splat during system resume net: ravb: Fix PHY state warning splat during system resume netfilter: nf_ct_ftp: fix deadlock when nat rewrite is needed netfilter: ebtables: fix memory leak when blob is malformed netfilter: nf_tables: fix percpu memory leak at nf_tables_addchain() ... commit 129e7152184b0224f9ca3f91b870acc14c64e1fa Merge: 5e0a93e42756 5f56a74cc0a6 Author: Linus Torvalds Date: Thu Sep 22 10:27:38 2022 -0700 Merge tag 'efi-urgent-for-v6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI fixes from Ard Biesheuvel: - Use the right variable to check for shim insecure mode - Wipe setup_data field when booting via EFI - Add missing error check to efibc driver * tag 'efi-urgent-for-v6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi: libstub: check Shim mode using MokSBStateRT efi: x86: Wipe setup_data on pure EFI boot efi: efibc: Guard against allocation failure commit 5e0a93e42756fa93b69fe8848cf8dda7cee5d13a Merge: 9597f088c9fc 69bef19d6b97 Author: Linus Torvalds Date: Thu Sep 22 10:17:29 2022 -0700 Merge tag 'gpio-fixes-for-v6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - fix a NULL-pointer dereference at driver unbind and a potential resource leak in error path in gpio-mockup - make the irqchip immutable in gpio-ftgpio010 - fix dereferencing a potentially uninitialized variable in gpio-tqmx86 - fix interrupt registering in gpiolib's character device code * tag 'gpio-fixes-for-v6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpiolib: cdev: Set lineevent_state::irq after IRQ register successfully gpio: tqmx86: fix uninitialized variable girq gpio: ftgpio010: Make irqchip immutable gpio: mockup: Fix potential resource leakage when register a chip gpio: mockup: fix NULL pointer dereference when removing debugfs commit 9597f088c9fc0a9a1de402426f57ff0a18cd069e Merge: dc164f4fb00a 999e4eaa4b36 Author: Linus Torvalds Date: Thu Sep 22 10:12:21 2022 -0700 Merge tag 'perf-tools-fixes-for-v6.0-2022-09-21' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix polling of system-wide events related to mixing per-cpu and per-thread events. - Do not check if /proc/modules is unchanged when copying /proc/kcore, that doesn't get in the way of post processing analysis. - Include program header in ELF files generated for JIT files, so that they can be opened by tools using elfutils libraries. - Enter namespaces when synthesizing build-ids. - Fix some bugs related to a recent cpu_map overhaul where we should be using an index and not the cpu number. - Fix BPF program ELF section name, using the naming expected by libbpf when using BPF counters in 'perf stat'. - Add a new test for perf stat cgroup BPF counter. - Adjust check on 'perf test wp' for older kernels, where the PERF_EVENT_IOC_MODIFY_ATTRIBUTES ioctl isn't supported. - Sync x86 cpufeatures with the kernel sources, no changes in tooling. * tag 'perf-tools-fixes-for-v6.0-2022-09-21' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf tools: Honor namespace when synthesizing build-ids tools headers cpufeatures: Sync with the kernel sources perf kcore_copy: Do not check /proc/modules is unchanged libperf evlist: Fix polling of system-wide events perf record: Fix cpu mask bit setting for mixed mmaps perf test: Skip wp modify test on old kernels perf jit: Include program header in ELF files perf test: Add a new test for perf stat cgroup BPF counter perf stat: Use evsel->core.cpus to iterate cpus in BPF cgroup counters perf stat: Fix cpu map index in bperf cgroup code perf stat: Fix BPF program section name commit 80fa46d6b9e7b1527bfd2197d75431fd9c382161 Author: Theodore Ts'o Date: Thu Sep 1 18:03:14 2022 -0400 ext4: limit the number of retries after discarding preallocations blocks This patch avoids threads live-locking for hours when a large number threads are competing over the last few free extents as they blocks getting added and removed from preallocation pools. From our bug reporter: A reliable way for triggering this has multiple writers continuously write() to files when the filesystem is full, while small amounts of space are freed (e.g. by truncating a large file -1MiB at a time). In the local filesystem, this can be done by simply not checking the return code of write (0) and/or the error (ENOSPACE) that is set. Over NFS with an async mount, even clients with proper error checking will behave this way since the linux NFS client implementation will not propagate the server errors [the write syscalls immediately return success] until the file handle is closed. This leads to a situation where NFS clients send a continuous stream of WRITE rpcs which result in ERRNOSPACE -- but since the client isn't seeing this, the stream of writes continues at maximum network speed. When some space does appear, multiple writers will all attempt to claim it for their current write. For NFS, we may see dozens to hundreds of threads that do this. The real-world scenario of this is database backup tooling (in particular, github.com/mdkent/percona-xtrabackup) which may write large files (>1TiB) to NFS for safe keeping. Some temporary files are written, rewound, and read back -- all before closing the file handle (the temp file is actually unlinked, to trigger automatic deletion on close/crash.) An application like this operating on an async NFS mount will not see an error code until TiB have been written/read. The lockup was observed when running this database backup on large filesystems (64 TiB in this case) with a high number of block groups and no free space. Fragmentation is generally not a factor in this filesystem (~thousands of large files, mostly contiguous except for the parts written while the filesystem is at capacity.) Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/mballoc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 29a5b8a137ac8eb410cc823653a29ac0e7b7e1b0 Author: Luís Henriques Date: Mon Aug 22 10:42:35 2022 +0100 ext4: fix bug in extents parsing when eh_entries == 0 and eh_depth > 0 When walking through an inode extents, the ext4_ext_binsearch_idx() function assumes that the extent header has been previously validated. However, there are no checks that verify that the number of entries (eh->eh_entries) is non-zero when depth is > 0. And this will lead to problems because the EXT_FIRST_INDEX() and EXT_LAST_INDEX() will return garbage and result in this: [ 135.245946] ------------[ cut here ]------------ [ 135.247579] kernel BUG at fs/ext4/extents.c:2258! [ 135.249045] invalid opcode: 0000 [#1] PREEMPT SMP [ 135.250320] CPU: 2 PID: 238 Comm: tmp118 Not tainted 5.19.0-rc8+ #4 [ 135.252067] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.15.0-0-g2dd4b9b-rebuilt.opensuse.org 04/01/2014 [ 135.255065] RIP: 0010:ext4_ext_map_blocks+0xc20/0xcb0 [ 135.256475] Code: [ 135.261433] RSP: 0018:ffffc900005939f8 EFLAGS: 00010246 [ 135.262847] RAX: 0000000000000024 RBX: ffffc90000593b70 RCX: 0000000000000023 [ 135.264765] RDX: ffff8880038e5f10 RSI: 0000000000000003 RDI: ffff8880046e922c [ 135.266670] RBP: ffff8880046e9348 R08: 0000000000000001 R09: ffff888002ca580c [ 135.268576] R10: 0000000000002602 R11: 0000000000000000 R12: 0000000000000024 [ 135.270477] R13: 0000000000000000 R14: 0000000000000024 R15: 0000000000000000 [ 135.272394] FS: 00007fdabdc56740(0000) GS:ffff88807dd00000(0000) knlGS:0000000000000000 [ 135.274510] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 135.276075] CR2: 00007ffc26bd4f00 CR3: 0000000006261004 CR4: 0000000000170ea0 [ 135.277952] Call Trace: [ 135.278635] [ 135.279247] ? preempt_count_add+0x6d/0xa0 [ 135.280358] ? percpu_counter_add_batch+0x55/0xb0 [ 135.281612] ? _raw_read_unlock+0x18/0x30 [ 135.282704] ext4_map_blocks+0x294/0x5a0 [ 135.283745] ? xa_load+0x6f/0xa0 [ 135.284562] ext4_mpage_readpages+0x3d6/0x770 [ 135.285646] read_pages+0x67/0x1d0 [ 135.286492] ? folio_add_lru+0x51/0x80 [ 135.287441] page_cache_ra_unbounded+0x124/0x170 [ 135.288510] filemap_get_pages+0x23d/0x5a0 [ 135.289457] ? path_openat+0xa72/0xdd0 [ 135.290332] filemap_read+0xbf/0x300 [ 135.291158] ? _raw_spin_lock_irqsave+0x17/0x40 [ 135.292192] new_sync_read+0x103/0x170 [ 135.293014] vfs_read+0x15d/0x180 [ 135.293745] ksys_read+0xa1/0xe0 [ 135.294461] do_syscall_64+0x3c/0x80 [ 135.295284] entry_SYSCALL_64_after_hwframe+0x46/0xb0 This patch simply adds an extra check in __ext4_ext_check(), verifying that eh_entries is not 0 when eh_depth is > 0. Link: https://bugzilla.kernel.org/show_bug.cgi?id=215941 Link: https://bugzilla.kernel.org/show_bug.cgi?id=216283 Cc: Baokun Li Cc: stable@kernel.org Signed-off-by: Luís Henriques Reviewed-by: Jan Kara Reviewed-by: Baokun Li Link: https://lore.kernel.org/r/20220822094235.2690-1-lhenriques@suse.de Signed-off-by: Theodore Ts'o fs/ext4/extents.c | 4 ++++ 1 file changed, 4 insertions(+) commit 643792048ee84b199052e9c8f89253649ca78922 Author: Olof Johansson Date: Tue Sep 20 09:00:18 2022 -0700 serial: sifive: enable clocks for UART when probed When the PWM driver was changed to disable clocks if no PWMs are enabled, it ended up also disabling the shared parent with the UART, since the UART doesn't do any clock enablement on its own. To avoid these surprises, switch to clk_get_enabled(). Fixes: ace41d7564e655 ("pwm: sifive: Ensure the clk is enabled exactly once per running PWM") Cc: stable Cc: Uwe Kleine-König Cc: Emil Renner Berthing Cc: Palmer Dabbelt Cc: Paul Walmsley Reviewed-by: Palmer Dabbelt Reviewed-by: Uwe Kleine-König Acked-by: Palmer Dabbelt Signed-off-by: Olof Johansson Link: https://lore.kernel.org/r/20220920160017.7315-1-olof@lixom.net Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sifive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e005bfae83290f6673f8213a418cc0e12868c2d Author: Matthias Schiffer Date: Fri Sep 16 13:09:55 2022 +0200 serial: 8250: omap: Use serial8250_em485_supported 8250_omap uses em485, fill in rs485_supported accordingly. This makes RS485 work with 8250_omap again, which was broken with the introduction of the RS485 config sanitization. Fixes: be2e2cb1d2819 ("serial: Sanitize rs485_struct") Reviewed-by: Ilpo Järvinen Signed-off-by: Matthias Schiffer Link: https://lore.kernel.org/r/20220916110955.161099-1-matthias.schiffer@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_omap.c | 1 + 1 file changed, 1 insertion(+) commit 60f361722ad2ae5ee667d0b0545d40c42f754daf Author: Lukas Wunner Date: Sun Sep 11 10:22:01 2022 +0200 serial: fsl_lpuart: Reset prior to registration Since commit bd5305dcabbc ("tty: serial: fsl_lpuart: do software reset for imx7ulp and imx8qxp"), certain i.MX UARTs are reset after they've already been registered. Register state may thus be clobbered after user space has begun to open and access the UART. Avoid by performing the reset prior to registration. Fixes: bd5305dcabbc ("tty: serial: fsl_lpuart: do software reset for imx7ulp and imx8qxp") Cc: stable@vger.kernel.org # v5.15+ Cc: Fugang Duan Cc: Sherry Sun Reviewed-by: Ilpo Järvinen Signed-off-by: Lukas Wunner Link: https://lore.kernel.org/r/72fb646c1b0b11c989850c55f52f9ff343d1b2fa.1662884345.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 83e4b196838d90799a8879e5054a3beecf9ed256 Author: Hangbin Liu Date: Thu Sep 22 10:44:53 2022 +0800 selftests: forwarding: add shebang for sch_red.sh RHEL/Fedora RPM build checks are stricter, and complain when executable files don't have a shebang line, e.g. *** WARNING: ./kselftests/net/forwarding/sch_red.sh is executable but has no shebang, removing executable bit Fix it by adding shebang line. Fixes: 6cf0291f9517 ("selftests: forwarding: Add a RED test for SW datapath") Signed-off-by: Hangbin Liu Reviewed-by: Petr Machata Link: https://lore.kernel.org/r/20220922024453.437757-1-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski tools/testing/selftests/net/forwarding/sch_red.sh | 1 + 1 file changed, 1 insertion(+) commit c31f26c8f69f776759cbbdfb38e40ea91aa0dd65 Author: Jakub Kicinski Date: Wed Sep 21 13:10:05 2022 -0700 bnxt: prevent skb UAF after handing over to PTP worker When reading the timestamp is required bnxt_tx_int() hands over the ownership of the completed skb to the PTP worker. The skb should not be used afterwards, as the worker may run before the rest of our code and free the skb, leading to a use-after-free. Since dev_kfree_skb_any() accepts NULL make the loss of ownership more obvious and set skb to NULL. Fixes: 83bb623c968e ("bnxt_en: Transmit and retrieve packet timestamps") Reviewed-by: Andy Gospodarek Reviewed-by: Michael Chan Link: https://lore.kernel.org/r/20220921201005.335390-1-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3aac7ada64d8c26ccc922f1ca966043c0dae88da Author: Liang He Date: Wed Sep 21 21:32:45 2022 +0800 net: marvell: Fix refcounting bugs in prestera_port_sfp_bind() In prestera_port_sfp_bind(), there are two refcounting bugs: (1) we should call of_node_get() before of_find_node_by_name() as it will automaitcally decrease the refcount of 'from' argument; (2) we should call of_node_put() for the break of the iteration for_each_child_of_node() as it will automatically increase and decrease the 'child'. Fixes: 52323ef75414 ("net: marvell: prestera: add phylink support") Signed-off-by: Liang He Reviewed-by: Yevhen Orlov Link: https://lore.kernel.org/r/20220921133245.4111672-1-windhl@126.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/prestera/prestera_main.c | 2 ++ 1 file changed, 2 insertions(+) commit c2e1cfefcac35e0eea229e148c8284088ce437b5 Author: Hangyu Hua Date: Wed Sep 21 17:27:34 2022 +0800 net: sched: fix possible refcount leak in tc_new_tfilter() tfilter_put need to be called to put the refount got by tp->ops->get to avoid possible refcount leak when chain->tmplt_ops != NULL and chain->tmplt_ops != tp->ops. Fixes: 7d5509fa0d3d ("net: sched: extend proto ops with 'put' callback") Signed-off-by: Hangyu Hua Reviewed-by: Vlad Buslov Link: https://lore.kernel.org/r/20220921092734.31700-1-hbh25y@gmail.com Signed-off-by: Jakub Kicinski net/sched/cls_api.c | 1 + 1 file changed, 1 insertion(+) commit 878e2405710aacfeeb19364c300f38b7a9abfe8f Author: Sean Anderson Date: Tue Sep 20 19:50:18 2022 -0400 net: sunhme: Fix packet reception for len < RX_COPY_THRESHOLD There is a separate receive path for small packets (under 256 bytes). Instead of allocating a new dma-capable skb to be used for the next packet, this path allocates a skb and copies the data into it (reusing the existing sbk for the next packet). There are two bytes of junk data at the beginning of every packet. I believe these are inserted in order to allow aligned DMA and IP headers. We skip over them using skb_reserve. Before copying over the data, we must use a barrier to ensure we see the whole packet. The current code only synchronizes len bytes, starting from the beginning of the packet, including the junk bytes. However, this leaves off the final two bytes in the packet. Synchronize the whole packet. To reproduce this problem, ping a HME with a payload size between 17 and 214 $ ping -s 17 which will complain rather loudly about the data mismatch. Small packets (below 60 bytes on the wire) do not have this issue. I suspect this is related to the padding added to increase the minimum packet size. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Sean Anderson Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20220920235018.1675956-1-seanga2@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/sun/sunhme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 47af6c640ed82f111dbce0b3bf4083a91d61e324 Merge: 09431acde35f d640c4cb8f2f Author: Greg Kroah-Hartman Date: Thu Sep 22 15:43:18 2022 +0200 Merge tag 'usb-serial-6.0-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: "USB-serial fixes for 6.0-rc7 Here are some new modem device ids. All have been in linux-next with no reported issues." * tag 'usb-serial-6.0-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: add Quectel RM520N USB: serial: option: add Quectel BG95 0x0203 composition commit db39dfdc1c3bd9da273902da12f01973792ff911 Author: Peilin Ye Date: Tue Sep 20 17:59:15 2022 -0700 udp: Use WARN_ON_ONCE() in udp_read_skb() Prevent udp_read_skb() from flooding the syslog. Suggested-by: Jakub Sitnicki Signed-off-by: Peilin Ye Link: https://lore.kernel.org/r/20220921005915.2697-1-yepeilin.cs@gmail.com Signed-off-by: Jakub Kicinski net/ipv4/udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5da4b68d2a8592a7535bb9e4523158088a6538b Merge: 2002fbac743b 2ffd57327ff1 Author: Jakub Kicinski Date: Thu Sep 22 06:40:15 2022 -0700 Merge branch 'bonding-fix-null-deref-in-bond_rr_gen_slave_id' Jonathan Toppins says: ==================== bonding: fix NULL deref in bond_rr_gen_slave_id Fix a NULL dereference of the struct bonding.rr_tx_counter member because if a bond is initially created with an initial mode != zero (Round Robin) the memory required for the counter is never created and when the mode is changed there is never any attempt to verify the memory is allocated upon switching modes. ==================== Link: https://lore.kernel.org/r/cover.1663694476.git.jtoppins@redhat.com Signed-off-by: Jakub Kicinski commit 2ffd57327ff1e91ad675c1efd5f02a3d786e64d1 Author: Jonathan Toppins Date: Tue Sep 20 13:45:51 2022 -0400 selftests: bonding: cause oops in bond_rr_gen_slave_id This bonding selftest used to cause a kernel oops on aarch64 and should be architectures agnostic. Signed-off-by: Jonathan Toppins Acked-by: Jay Vosburgh Signed-off-by: Jakub Kicinski .../testing/selftests/drivers/net/bonding/Makefile | 3 +- .../net/bonding/bond-arp-interval-causes-panic.sh | 49 ++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) commit 0e400d602f46360752e4b32ce842dba3808e15e6 Author: Jonathan Toppins Date: Tue Sep 20 13:45:52 2022 -0400 bonding: fix NULL deref in bond_rr_gen_slave_id Fix a NULL dereference of the struct bonding.rr_tx_counter member because if a bond is initially created with an initial mode != zero (Round Robin) the memory required for the counter is never created and when the mode is changed there is never any attempt to verify the memory is allocated upon switching modes. This causes the following Oops on an aarch64 machine: [ 334.686773] Unable to handle kernel paging request at virtual address ffff2c91ac905000 [ 334.694703] Mem abort info: [ 334.697486] ESR = 0x0000000096000004 [ 334.701234] EC = 0x25: DABT (current EL), IL = 32 bits [ 334.706536] SET = 0, FnV = 0 [ 334.709579] EA = 0, S1PTW = 0 [ 334.712719] FSC = 0x04: level 0 translation fault [ 334.717586] Data abort info: [ 334.720454] ISV = 0, ISS = 0x00000004 [ 334.724288] CM = 0, WnR = 0 [ 334.727244] swapper pgtable: 4k pages, 48-bit VAs, pgdp=000008044d662000 [ 334.733944] [ffff2c91ac905000] pgd=0000000000000000, p4d=0000000000000000 [ 334.740734] Internal error: Oops: 96000004 [#1] SMP [ 334.745602] Modules linked in: bonding tls veth rfkill sunrpc arm_spe_pmu vfat fat acpi_ipmi ipmi_ssif ixgbe igb i40e mdio ipmi_devintf ipmi_msghandler arm_cmn arm_dsu_pmu cppc_cpufreq acpi_tad fuse zram crct10dif_ce ast ghash_ce sbsa_gwdt nvme drm_vram_helper drm_ttm_helper nvme_core ttm xgene_hwmon [ 334.772217] CPU: 7 PID: 2214 Comm: ping Not tainted 6.0.0-rc4-00133-g64ae13ed4784 #4 [ 334.779950] Hardware name: GIGABYTE R272-P31-00/MP32-AR1-00, BIOS F18v (SCP: 1.08.20211002) 12/01/2021 [ 334.789244] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 334.796196] pc : bond_rr_gen_slave_id+0x40/0x124 [bonding] [ 334.801691] lr : bond_xmit_roundrobin_slave_get+0x38/0xdc [bonding] [ 334.807962] sp : ffff8000221733e0 [ 334.811265] x29: ffff8000221733e0 x28: ffffdbac8572d198 x27: ffff80002217357c [ 334.818392] x26: 000000000000002a x25: ffffdbacb33ee000 x24: ffff07ff980fa000 [ 334.825519] x23: ffffdbacb2e398ba x22: ffff07ff98102000 x21: ffff07ff981029c0 [ 334.832646] x20: 0000000000000001 x19: ffff07ff981029c0 x18: 0000000000000014 [ 334.839773] x17: 0000000000000000 x16: ffffdbacb1004364 x15: 0000aaaabe2f5a62 [ 334.846899] x14: ffff07ff8e55d968 x13: ffff07ff8e55db30 x12: 0000000000000000 [ 334.854026] x11: ffffdbacb21532e8 x10: 0000000000000001 x9 : ffffdbac857178ec [ 334.861153] x8 : ffff07ff9f6e5a28 x7 : 0000000000000000 x6 : 000000007c2b3742 [ 334.868279] x5 : ffff2c91ac905000 x4 : ffff2c91ac905000 x3 : ffff07ff9f554400 [ 334.875406] x2 : ffff2c91ac905000 x1 : 0000000000000001 x0 : ffff07ff981029c0 [ 334.882532] Call trace: [ 334.884967] bond_rr_gen_slave_id+0x40/0x124 [bonding] [ 334.890109] bond_xmit_roundrobin_slave_get+0x38/0xdc [bonding] [ 334.896033] __bond_start_xmit+0x128/0x3a0 [bonding] [ 334.901001] bond_start_xmit+0x54/0xb0 [bonding] [ 334.905622] dev_hard_start_xmit+0xb4/0x220 [ 334.909798] __dev_queue_xmit+0x1a0/0x720 [ 334.913799] arp_xmit+0x3c/0xbc [ 334.916932] arp_send_dst+0x98/0xd0 [ 334.920410] arp_solicit+0xe8/0x230 [ 334.923888] neigh_probe+0x60/0xb0 [ 334.927279] __neigh_event_send+0x3b0/0x470 [ 334.931453] neigh_resolve_output+0x70/0x90 [ 334.935626] ip_finish_output2+0x158/0x514 [ 334.939714] __ip_finish_output+0xac/0x1a4 [ 334.943800] ip_finish_output+0x40/0xfc [ 334.947626] ip_output+0xf8/0x1a4 [ 334.950931] ip_send_skb+0x5c/0x100 [ 334.954410] ip_push_pending_frames+0x3c/0x60 [ 334.958758] raw_sendmsg+0x458/0x6d0 [ 334.962325] inet_sendmsg+0x50/0x80 [ 334.965805] sock_sendmsg+0x60/0x6c [ 334.969286] __sys_sendto+0xc8/0x134 [ 334.972853] __arm64_sys_sendto+0x34/0x4c [ 334.976854] invoke_syscall+0x78/0x100 [ 334.980594] el0_svc_common.constprop.0+0x4c/0xf4 [ 334.985287] do_el0_svc+0x38/0x4c [ 334.988591] el0_svc+0x34/0x10c [ 334.991724] el0t_64_sync_handler+0x11c/0x150 [ 334.996072] el0t_64_sync+0x190/0x194 [ 334.999726] Code: b9001062 f9403c02 d53cd044 8b040042 (b8210040) [ 335.005810] ---[ end trace 0000000000000000 ]--- [ 335.010416] Kernel panic - not syncing: Oops: Fatal exception in interrupt [ 335.017279] SMP: stopping secondary CPUs [ 335.021374] Kernel Offset: 0x5baca8eb0000 from 0xffff800008000000 [ 335.027456] PHYS_OFFSET: 0x80000000 [ 335.030932] CPU features: 0x0000,0085c029,19805c82 [ 335.035713] Memory Limit: none [ 335.038756] Rebooting in 180 seconds.. The fix is to allocate the memory in bond_open() which is guaranteed to be called before any packets are processed. Fixes: 848ca9182a7d ("net: bonding: Use per-cpu rr_tx_counter") CC: Jussi Maki Signed-off-by: Jonathan Toppins Acked-by: Jay Vosburgh Signed-off-by: Jakub Kicinski drivers/net/bonding/bond_main.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 2002fbac743b6e2391b4ed50ad9eb626768dd78a Author: Michael Walle Date: Tue Sep 20 16:16:19 2022 +0200 net: phy: micrel: fix shared interrupt on LAN8814 Since commit ece19502834d ("net: phy: micrel: 1588 support for LAN8814 phy") the handler always returns IRQ_HANDLED, except in an error case. Before that commit, the interrupt status register was checked and if it was empty, IRQ_NONE was returned. Restore that behavior to play nice with the interrupt line being shared with others. Fixes: ece19502834d ("net: phy: micrel: 1588 support for LAN8814 phy") Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Reviewed-by: Horatiu Vultur Reviewed-by: Divya Koppera Link: https://lore.kernel.org/r/20220920141619.808117-1-michael@walle.cc Signed-off-by: Jakub Kicinski drivers/net/phy/micrel.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 05d6f6d346fea2fa4580a0c2b6be207456bebb08 Author: Ilkka Koskinen Date: Mon Aug 8 12:54:55 2022 -0700 perf/arm-cmn: Add more bits to child node address offset field CMN-600 uses bits [27:0] for child node address offset while bits [30:28] are required to be zero. For CMN-650, the child node address offset field has been increased to include bits [29:0] while leaving only bit 30 set to zero. Let's include the missing two bits and assume older implementations comply with the spec and set bits [29:28] to 0. Signed-off-by: Ilkka Koskinen Fixes: 60d1504070c2 ("perf/arm-cmn: Support new IP features") Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20220808195455.79277-1-ilkka@os.amperecomputing.com Signed-off-by: Will Deacon drivers/perf/arm-cmn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09431acde35f46ac82fb5230c7479f1edc557c75 Author: Ren Zhijie Date: Tue Sep 20 16:44:31 2022 +0800 usb: typec: anx7411: Fix build error without CONFIG_POWER_SUPPLY Building without CONFIG_POWER_SUPPLY will fail: drivers/usb/typec/anx7411.o: In function `anx7411_detect_power_mode': anx7411.c:(.text+0x527): undefined reference to `power_supply_changed' drivers/usb/typec/anx7411.o: In function `anx7411_psy_set_prop': anx7411.c:(.text+0x90d): undefined reference to `power_supply_get_drvdata' anx7411.c:(.text+0x930): undefined reference to `power_supply_changed' drivers/usb/typec/anx7411.o: In function `anx7411_psy_get_prop': anx7411.c:(.text+0x94d): undefined reference to `power_supply_get_drvdata' drivers/usb/typec/anx7411.o: In function `anx7411_i2c_probe': anx7411.c:(.text+0x111d): undefined reference to `devm_power_supply_register' drivers/usb/typec/anx7411.o: In function `anx7411_work_func': anx7411.c:(.text+0x167c): undefined reference to `power_supply_changed' anx7411.c:(.text+0x1b55): undefined reference to `power_supply_changed' Add POWER_SUPPLY dependency to Kconfig. Fixes: fe6d8a9c8e64 ("usb: typec: anx7411: Add Analogix PD ANX7411 support") Reviewed-by: Xin Ji Acked-by: Heikki Krogerus Signed-off-by: Ren Zhijie Link: https://lore.kernel.org/r/20220920084431.196258-1-renzhijie2@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 2bc54aaa65d2126ae629919175708a28ce7ef06e Author: William Breathitt Gray Date: Thu Sep 22 07:20:56 2022 -0400 counter: 104-quad-8: Fix skipped IRQ lines during events configuration IRQ trigger configuration is skipped if it has already been set before; however, the IRQ line still needs to be OR'd to irq_enabled because irq_enabled is reset for every events_configure call. This patch moves the irq_enabled OR operation update to before the irq_trigger check so that IRQ line enablement is not skipped. Fixes: c95cc0d95702 ("counter: 104-quad-8: Fix persistent enabled events bug") Cc: stable Link: https://lore.kernel.org/r/20220815122301.2750-1-william.gray@linaro.org/ Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/179eed11eaf225dbd908993b510df0c8f67b1230.1663844776.git.william.gray@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/counter/104-quad-8.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d4955c0ad77dbc684fc716387070ac24801b8bca Author: Sergey Shtylyov Date: Fri Sep 16 23:17:07 2022 +0300 arm64: topology: fix possible overflow in amu_fie_setup() cpufreq_get_hw_max_freq() returns max frequency in kHz as *unsigned int*, while freq_inv_set_max_ratio() gets passed this frequency in Hz as 'u64'. Multiplying max frequency by 1000 can potentially result in overflow -- multiplying by 1000ULL instead should avoid that... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Fixes: cd0ed03a8903 ("arm64: use activity monitors for frequency invariance") Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/01493d64-2bce-d968-86dc-11a122a9c07d@omp.ru Signed-off-by: Will Deacon arch/arm64/kernel/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61d2d1808b20da4a45a90b4bd61ae92f729bab78 Author: Mark Rutland Date: Tue Sep 20 14:47:31 2022 +0100 arm64: mm: don't acquire mutex when rewriting swapper Since commit: 47546a1912fc4a03 ("arm64: mm: install KPTI nG mappings with MMU enabled)" ... when building with CONFIG_DEBUG_ATOMIC_SLEEP=y and booting under QEMU TCG with '-cpu max', there's a boot-time splat: | BUG: sleeping function called from invalid context at kernel/locking/mutex.c:580 | in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 15, name: migration/0 | preempt_count: 1, expected: 0 | RCU nest depth: 0, expected: 0 | no locks held by migration/0/15. | irq event stamp: 28 | hardirqs last enabled at (27): [] _raw_spin_unlock_irq+0x3c/0x7c | hardirqs last disabled at (28): [] multi_cpu_stop+0x150/0x18c | softirqs last enabled at (0): [] copy_process+0x594/0x1964 | softirqs last disabled at (0): [<0000000000000000>] 0x0 | CPU: 0 PID: 15 Comm: migration/0 Not tainted 6.0.0-rc3-00002-g419b42ff7eef #3 | Hardware name: linux,dummy-virt (DT) | Stopper: multi_cpu_stop+0x0/0x18c <- stop_cpus.constprop.0+0xa0/0xfc | Call trace: | dump_backtrace.part.0+0xd0/0xe0 | show_stack+0x1c/0x5c | dump_stack_lvl+0x88/0xb4 | dump_stack+0x1c/0x38 | __might_resched+0x180/0x230 | __might_sleep+0x4c/0xa0 | __mutex_lock+0x5c/0x450 | mutex_lock_nested+0x30/0x40 | create_kpti_ng_temp_pgd+0x4fc/0x6d0 | kpti_install_ng_mappings+0x2b8/0x3b0 | cpu_enable_non_boot_scope_capabilities+0x7c/0xd0 | multi_cpu_stop+0xa0/0x18c | cpu_stopper_thread+0x88/0x11c | smpboot_thread_fn+0x1ec/0x290 | kthread+0x118/0x120 | ret_from_fork+0x10/0x20 Since commit: ee017ee353506fce ("arm64/mm: avoid fixmap race condition when create pud mapping") ... once the kernel leave the SYSTEM_BOOTING state, the fixmap pagetable entries are protected by the fixmap_lock mutex. The new KPTI rewrite code uses __create_pgd_mapping() to create a temporary pagetable. This happens in atomic context, after secondary CPUs are brought up and the kernel has left the SYSTEM_BOOTING state. Hence we try to acquire a mutex in atomic context, which is generally unsound (though benign in this case as the mutex should be free and all other CPUs are quiescent). This patch avoids the issue by pulling the mutex out of alloc_init_pud() and calling it at a higher level in the pagetable manipulation code. This allows it to be used without locking where one CPU is known to be in exclusive control of the machine, even after having left the SYSTEM_BOOTING state. Fixes: 47546a1912fc ("arm64: mm: install KPTI nG mappings with MMU enabled") Signed-off-by: Mark Rutland Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220920134731.1625740-1-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/mm/mmu.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit d7f06bdd6ee87fbefa05af5f57361d85e7715b11 Author: Phil Auld Date: Tue Sep 6 16:35:42 2022 -0400 drivers/base: Fix unsigned comparison to -1 in CPUMAP_FILE_MAX_BYTES As PAGE_SIZE is unsigned long, -1 > PAGE_SIZE when NR_CPUS <= 3. This leads to very large file sizes: topology$ ls -l total 0 -r--r--r-- 1 root root 18446744073709551615 Sep 5 11:59 core_cpus -r--r--r-- 1 root root 4096 Sep 5 11:59 core_cpus_list -r--r--r-- 1 root root 4096 Sep 5 10:58 core_id -r--r--r-- 1 root root 18446744073709551615 Sep 5 10:10 core_siblings -r--r--r-- 1 root root 4096 Sep 5 11:59 core_siblings_list -r--r--r-- 1 root root 18446744073709551615 Sep 5 11:59 die_cpus -r--r--r-- 1 root root 4096 Sep 5 11:59 die_cpus_list -r--r--r-- 1 root root 4096 Sep 5 11:59 die_id -r--r--r-- 1 root root 18446744073709551615 Sep 5 11:59 package_cpus -r--r--r-- 1 root root 4096 Sep 5 11:59 package_cpus_list -r--r--r-- 1 root root 4096 Sep 5 10:58 physical_package_id -r--r--r-- 1 root root 18446744073709551615 Sep 5 10:10 thread_siblings -r--r--r-- 1 root root 4096 Sep 5 11:59 thread_siblings_list Adjust the inequality to catch the case when NR_CPUS is configured to a small value. Fixes: 7ee951acd31a ("drivers/base: fix userspace break from using bin_attributes for cpumap and cpulist") Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Yury Norov Cc: stable@vger.kernel.org Cc: feng xiangjun Reported-by: feng xiangjun Signed-off-by: Phil Auld Signed-off-by: Yury Norov Link: https://lore.kernel.org/r/20220906203542.1796629-1-pauld@redhat.com Signed-off-by: Greg Kroah-Hartman include/linux/cpumask.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e738455b2c6dcdab03e45d97de36476f93f557d2 Author: Wen Gu Date: Tue Sep 20 14:43:09 2022 +0800 net/smc: Stop the CLC flow if no link to map buffers on There might be a potential race between SMC-R buffer map and link group termination. smc_smcr_terminate_all() | smc_connect_rdma() -------------------------------------------------------------- | smc_conn_create() for links in smcibdev | schedule links down | | smc_buf_create() | \- smcr_buf_map_usable_links() | \- no usable links found, | (rmb->mr = NULL) | | smc_clc_send_confirm() | \- access conn->rmb_desc->mr[]->rkey | (panic) During reboot and IB device module remove, all links will be set down and no usable links remain in link groups. In such situation smcr_buf_map_usable_links() should return an error and stop the CLC flow accessing to uninitialized mr. Fixes: b9247544c1bc ("net/smc: convert static link ID instances to support multiple links") Signed-off-by: Wen Gu Link: https://lore.kernel.org/r/1663656189-32090-1-git-send-email-guwen@linux.alibaba.com Signed-off-by: Paolo Abeni net/smc/smc_core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 763679f0eeff0185fc431498849bbc1c24460875 Author: Johan Hovold Date: Mon Aug 22 17:10:27 2022 +0200 media: flexcop-usb: fix endpoint type check Commit d725d20e81c2 ("media: flexcop-usb: sanity checking of endpoint type") tried to add an endpoint type sanity check for the single isochronous endpoint but instead broke the driver by checking the wrong descriptor or random data beyond the last endpoint descriptor. Make sure to check the right endpoint descriptor. Fixes: d725d20e81c2 ("media: flexcop-usb: sanity checking of endpoint type") Cc: Oliver Neukum Cc: stable@vger.kernel.org # 5.9 Reported-by: Dongliang Mu Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220822151027.27026-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/media/usb/b2c2/flexcop-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f56a74cc0a6d9b9f8ba89cea29cd7c4774cb2b1 Author: Ard Biesheuvel Date: Tue Sep 20 17:08:23 2022 +0200 efi: libstub: check Shim mode using MokSBStateRT We currently check the MokSBState variable to decide whether we should treat UEFI secure boot as being disabled, even if the firmware thinks otherwise. This is used by shim to indicate that it is not checking signatures on boot images. In the kernel, we use this to relax lockdown policies. However, in cases where shim is not even being used, we don't want this variable to interfere with lockdown, given that the variable may be non-volatile and therefore persist across a reboot. This means setting it once will persistently disable lockdown checks on a given system. So switch to the mirrored version of this variable, called MokSBStateRT, which is supposed to be volatile, and this is something we can check. Cc: # v4.19+ Signed-off-by: Ard Biesheuvel Reviewed-by: Ilias Apalodimas Reviewed-by: Peter Jones drivers/firmware/efi/libstub/secureboot.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 63bf28ceb3ebbe76048c3fb2987996ca1ae64f83 Author: Ard Biesheuvel Date: Thu Aug 4 15:39:48 2022 +0200 efi: x86: Wipe setup_data on pure EFI boot When booting the x86 kernel via EFI using the LoadImage/StartImage boot services [as opposed to the deprecated EFI handover protocol], the setup header is taken from the image directly, and given that EFI's LoadImage has no Linux/x86 specific knowledge regarding struct bootparams or struct setup_header, any absolute addresses in the setup header must originate from the file and not from a prior loading stage. Since we cannot generally predict where LoadImage() decides to load an image (*), such absolute addresses must be treated as suspect: even if a prior boot stage intended to make them point somewhere inside the [signed] image, there is no way to validate that, and if they point at an arbitrary location in memory, the setup_data nodes will not be covered by any signatures or TPM measurements either, and could be made to contain an arbitrary sequence of SETUP_xxx nodes, which could interfere quite badly with the early x86 boot sequence. (*) Note that, while LoadImage() does take a buffer/size tuple in addition to a device path, which can be used to provide the image contents directly, it will re-allocate such images, as the memory footprint of an image is generally larger than the PE/COFF file representation. Cc: # v5.10+ Link: https://lore.kernel.org/all/20220904165321.1140894-1-Jason@zx2c4.com/ Signed-off-by: Ard Biesheuvel Acked-by: Jason A. Donenfeld drivers/firmware/efi/libstub/x86-stub.c | 7 +++++++ 1 file changed, 7 insertions(+) commit d21fc11109ca02e870794a53c0a236365e92c148 Merge: 521a547ced64 d119888b09bd Author: Dave Airlie Date: Thu Sep 22 15:31:02 2022 +1000 Merge tag 'drm-intel-fixes-2022-09-21' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes 2 gem context related fixes: - to avoid a general protection failure when using perf/OA (Chris) - to avoid kernel warnings on driver release (Janusz) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Yyt1CV+YIjKQZZMB@intel.com commit 83e80a6e3543f37f74c8e48a5f305b054b65ce2a Author: Jan Kara Date: Thu Sep 8 11:21:28 2022 +0200 ext4: use buckets for cr 1 block scan instead of rbtree Using rbtree for sorting groups by average fragment size is relatively expensive (needs rbtree update on every block freeing or allocation) and leads to wide spreading of allocations because selection of block group is very sentitive both to changes in free space and amount of blocks allocated. Furthermore selecting group with the best matching average fragment size is not necessary anyway, even more so because the variability of fragment sizes within a group is likely large so average is not telling much. We just need a group with large enough average fragment size so that we have high probability of finding large enough free extent and we don't want average fragment size to be too big so that we are likely to find free extent only somewhat larger than what we need. So instead of maintaing rbtree of groups sorted by fragment size keep bins (lists) or groups where average fragment size is in the interval [2^i, 2^(i+1)). This structure requires less updates on block allocation / freeing, generally avoids chaotic spreading of allocations into block groups, and still is able to quickly (even faster that the rbtree) provide a block group which is likely to have a suitably sized free space extent. This patch reduces number of block groups used when untarring archive with medium sized files (size somewhat above 64k which is default mballoc limit for avoiding locality group preallocation) to about half and thus improves write speeds for eMMC flash significantly. Fixes: 196e402adf2e ("ext4: improve cr 0 / cr 1 group scanning") CC: stable@kernel.org Reported-and-tested-by: Stefan Wahren Tested-by: Ojaswin Mujoo Signed-off-by: Jan Kara Reviewed-by: Ritesh Harjani (IBM) Link: https://lore.kernel.org/all/0d81a7c2-46b7-6010-62a4-3e6cfc1628d6@i2se.com/ Link: https://lore.kernel.org/r/20220908092136.11770-5-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 10 +-- fs/ext4/mballoc.c | 249 +++++++++++++++++++++++------------------------------- fs/ext4/mballoc.h | 1 - 3 files changed, 111 insertions(+), 149 deletions(-) commit a9f2a2931d0e197ab28c6007966053fdababd53f Author: Jan Kara Date: Thu Sep 8 11:21:27 2022 +0200 ext4: use locality group preallocation for small closed files Curently we don't use any preallocation when a file is already closed when allocating blocks (from writeback code when converting delayed allocation). However for small files, using locality group preallocation is actually desirable as that is not specific to a particular file. Rather it is a method to pack small files together to reduce fragmentation and for that the fact the file is closed is actually even stronger hint the file would benefit from packing. So change the logic to allow locality group preallocation in this case. Fixes: 196e402adf2e ("ext4: improve cr 0 / cr 1 group scanning") CC: stable@kernel.org Reported-and-tested-by: Stefan Wahren Tested-by: Ojaswin Mujoo Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Jan Kara Link: https://lore.kernel.org/all/0d81a7c2-46b7-6010-62a4-3e6cfc1628d6@i2se.com/ Link: https://lore.kernel.org/r/20220908092136.11770-4-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/mballoc.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 613c5a85898d1cd44e68f28d65eccf64a8ace9cf Author: Jan Kara Date: Thu Sep 8 11:21:26 2022 +0200 ext4: make directory inode spreading reflect flexbg size Currently the Orlov inode allocator searches for free inodes for a directory only in flex block groups with at most inodes_per_group/16 more directory inodes than average per flex block group. However with growing size of flex block group this becomes unnecessarily strict. Scale allowed difference from average directory count per flex block group with flex block group size as we do with other metrics. Tested-by: Stefan Wahren Tested-by: Ojaswin Mujoo Cc: stable@kernel.org Link: https://lore.kernel.org/all/0d81a7c2-46b7-6010-62a4-3e6cfc1628d6@i2se.com/ Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20220908092136.11770-3-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/ialloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1940265ede6683f6317cba0d428ce6505eaca944 Author: Jan Kara Date: Thu Sep 8 11:21:25 2022 +0200 ext4: avoid unnecessary spreading of allocations among groups mb_set_largest_free_order() updates lists containing groups with largest chunk of free space of given order. The way it updates it leads to always moving the group to the tail of the list. Thus allocations looking for free space of given order effectively end up cycling through all groups (and due to initialization in last to first order). This spreads allocations among block groups which reduces performance for rotating disks or low-end flash media. Change mb_set_largest_free_order() to only update lists if the order of the largest free chunk in the group changed. Fixes: 196e402adf2e ("ext4: improve cr 0 / cr 1 group scanning") CC: stable@kernel.org Reported-and-tested-by: Stefan Wahren Tested-by: Ojaswin Mujoo Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Jan Kara Link: https://lore.kernel.org/all/0d81a7c2-46b7-6010-62a4-3e6cfc1628d6@i2se.com/ Link: https://lore.kernel.org/r/20220908092136.11770-2-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/mballoc.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 4fca50d440cc5d4dc570ad5484cc0b70b381bc2a Author: Jan Kara Date: Thu Sep 8 11:21:24 2022 +0200 ext4: make mballoc try target group first even with mb_optimize_scan One of the side-effects of mb_optimize_scan was that the optimized functions to select next group to try were called even before we tried the goal group. As a result we no longer allocate files close to corresponding inodes as well as we don't try to expand currently allocated extent in the same group. This results in reaim regression with workfile.disk workload of upto 8% with many clients on my test machine: baseline mb_optimize_scan Hmean disk-1 2114.16 ( 0.00%) 2099.37 ( -0.70%) Hmean disk-41 87794.43 ( 0.00%) 83787.47 * -4.56%* Hmean disk-81 148170.73 ( 0.00%) 135527.05 * -8.53%* Hmean disk-121 177506.11 ( 0.00%) 166284.93 * -6.32%* Hmean disk-161 220951.51 ( 0.00%) 207563.39 * -6.06%* Hmean disk-201 208722.74 ( 0.00%) 203235.59 ( -2.63%) Hmean disk-241 222051.60 ( 0.00%) 217705.51 ( -1.96%) Hmean disk-281 252244.17 ( 0.00%) 241132.72 * -4.41%* Hmean disk-321 255844.84 ( 0.00%) 245412.84 * -4.08%* Also this is causing huge regression (time increased by a factor of 5 or so) when untarring archive with lots of small files on some eMMC storage cards. Fix the problem by making sure we try goal group first. Fixes: 196e402adf2e ("ext4: improve cr 0 / cr 1 group scanning") CC: stable@kernel.org Reported-and-tested-by: Stefan Wahren Tested-by: Ojaswin Mujoo Reviewed-by: Ritesh Harjani (IBM) Link: https://lore.kernel.org/all/20220727105123.ckwrhbilzrxqpt24@quack3/ Link: https://lore.kernel.org/all/0d81a7c2-46b7-6010-62a4-3e6cfc1628d6@i2se.com/ Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20220908092136.11770-1-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/mballoc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 624aea6bede7fef24dc3daed83f37453c11ebb39 Merge: 114f398d48c5 8ac7132704f3 Author: Jakub Kicinski Date: Wed Sep 21 18:39:23 2022 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2022-09-20 (ice) Michal re-sets TC configuration when changing number of queues. Mateusz moves the check and call for link-down-on-close to the specific path for downing/closing the interface. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: Fix interface being down after reset with link-down-on-close flag on ice: config netdev tc before setting queues number ==================== Link: https://lore.kernel.org/r/20220920205344.1860934-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 114f398d48c571bb628187a7b2dd42695156781f Author: Larysa Zaremba Date: Mon Sep 19 15:43:46 2022 +0200 ice: Fix ice_xdp_xmit() when XDP TX queue number is not sufficient The original patch added the static branch to handle the situation, when assigning an XDP TX queue to every CPU is not possible, so they have to be shared. However, in the XDP transmit handler ice_xdp_xmit(), an error was returned in such cases even before static condition was checked, thus making queue sharing still impossible. Fixes: 22bf877e528f ("ice: introduce XDP_TX fallback path") Signed-off-by: Larysa Zaremba Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/r/20220919134346.25030-1-larysa.zaremba@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/ice/ice_txrx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f64780e3ccecf00477bb8f0a021f78205b27a610 Merge: 375a683321a3 198eb7e1b81d Author: Jakub Kicinski Date: Wed Sep 21 17:28:35 2022 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2022-09-19 (iavf, i40e) Norbert adds checking of buffer size for Rx buffer checks in iavf. Michal corrects setting of max MTU in iavf to account for MTU data provided by PF, fixes i40e to set VF max MTU, and resolves lack of rate limiting when value was less than divisor for i40e. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: i40e: Fix set max_tx_rate when it is lower than 1 Mbps i40e: Fix VF set max MTU size iavf: Fix set max MTU size with port VLAN and jumbo frames iavf: Fix bad page state ==================== Link: https://lore.kernel.org/r/20220919223428.572091-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 90144dd8b0d137d9e78ef34b3c418e51a49299ad Author: Nícolas F. R. A. Prado Date: Thu Aug 4 15:43:25 2022 -0400 drm/mediatek: dsi: Move mtk_dsi_stop() call back to mtk_dsi_poweroff() As the comment right before the mtk_dsi_stop() call advises, mtk_dsi_stop() should only be called after mtk_drm_crtc_atomic_disable(). That's because that function calls drm_crtc_wait_one_vblank(), which requires the vblank irq to be enabled. Previously mtk_dsi_stop(), being in mtk_dsi_poweroff() and guarded by a refcount, would only be called at the end of mtk_drm_crtc_atomic_disable(), through the call to mtk_crtc_ddp_hw_fini(). Commit cde7e2e35c28 ("drm/mediatek: Separate poweron/poweroff from enable/disable and define new funcs") moved the mtk_dsi_stop() call to mtk_output_dsi_disable(), causing it to be called before mtk_drm_crtc_atomic_disable(), and consequently generating vblank timeout warnings during suspend. Move the mtk_dsi_stop() call back to mtk_dsi_poweroff() so that we have a working vblank irq during mtk_drm_crtc_atomic_disable() and stop getting vblank timeout warnings. Fixes: cde7e2e35c28 ("drm/mediatek: Separate poweron/poweroff from enable/disable and define new funcs") Signed-off-by: Nícolas F. R. A. Prado Tested-by: Hsin-Yi Wang Reviewed-by: AngeloGioacchino Del Regno Tested-by: Allen-KH Cheng Link: http://lists.infradead.org/pipermail/linux-mediatek/2022-August/046713.html Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dsi.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit f525ed19437d376736bed64ee7bc4afee82f2ba9 Author: Nathan Chancellor Date: Fri Sep 16 14:06:58 2022 -0700 drm/amd/display: Reduce number of arguments of dml314's CalculateFlipSchedule() Most of the arguments are identical between the two call sites and they can be accessed through the 'struct vba_vars_st' pointer. This reduces the total amount of stack space that dml314_ModeSupportAndSystemConfigurationFull() uses by 112 bytes with LLVM 16 (1976 -> 1864), helping clear up the following clang warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_mode_vba_314.c:4020:6: error: stack frame size (2216) exceeds limit (2048) in 'dml314_ModeSupportAndSystemConfigurationFull' [-Werror,-Wframe-larger-than] void dml314_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib) ^ 1 error generated. Link: https://github.com/ClangBuiltLinux/linux/issues/1710 Reported-by: "kernelci.org bot" Tested-by: Maíra Canal Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher .../display/dc/dml/dcn314/display_mode_vba_314.c | 172 ++++++--------------- 1 file changed, 47 insertions(+), 125 deletions(-) commit faed5d0182480556cddb8343d9bad968387848f4 Author: Nathan Chancellor Date: Fri Sep 16 14:06:57 2022 -0700 drm/amd/display: Reduce number of arguments of dml314's CalculateWatermarksAndDRAMSpeedChangeSupport() Most of the arguments are identical between the two call sites and they can be accessed through the 'struct vba_vars_st' pointer. This reduces the total amount of stack space that dml314_ModeSupportAndSystemConfigurationFull() uses by 240 bytes with LLVM 16 (2216 -> 1976), helping clear up the following clang warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_mode_vba_314.c:4020:6: error: stack frame size (2216) exceeds limit (2048) in 'dml314_ModeSupportAndSystemConfigurationFull' [-Werror,-Wframe-larger-than] void dml314_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib) ^ 1 error generated. Link: https://github.com/ClangBuiltLinux/linux/issues/1710 Reported-by: "kernelci.org bot" Tested-by: Maíra Canal Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher .../display/dc/dml/dcn314/display_mode_vba_314.c | 248 +++++---------------- 1 file changed, 52 insertions(+), 196 deletions(-) commit abbc7a3dafb91b9d4ec56b70ec9a7520f8e13334 Author: Alex Deucher Date: Mon Sep 19 12:26:20 2022 -0400 drm/amdgpu: don't register a dirty callback for non-atomic Some asics still support non-atomic code paths. Fixes: 66f99628eb2440 ("drm/amdgpu: use dirty framebuffer helper") Reported-by: Arthur Marsh Reviewed-by: Hamza Mahfooz Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 88bab90f7a8aef3732a57cf33bf0ae121de8c7af Author: Evan Quan Date: Fri Sep 16 13:30:44 2022 +0800 drm/amd/pm: drop the pptable related workarounds for SMU 13.0.0 The pptable in the vbios is fully ready. The related workarounds in driver are not needed any more. Signed-off-by: Evan Quan Acked-by: Guchun Chen Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 44 +----------------- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 54 ++-------------------- 2 files changed, 5 insertions(+), 93 deletions(-) commit dd4bc65c5bdf17ce8e74f91bca5e41b368b0e32b Author: Evan Quan Date: Fri Sep 16 13:19:29 2022 +0800 drm/amd/pm: add support for 3794 pptable for SMU13.0.0 Enable 3794 pptable support for SMU13.0.0. Signed-off-by: Evan Quan Acked-by: Guchun Chen Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 1 + 1 file changed, 1 insertion(+) commit 193b6a1934cc2e258e463e94fe3e94382c0bf458 Author: Charlene Liu Date: Sat Sep 10 15:08:51 2022 -0400 drm/amd/display: correct num_dsc based on HW cap [why] num_dsc is 3 for dcn314 based on HW capablity. Reviewed-by: Martin Leung Acked-by: Wayne Lin Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29a1c581a5d873046302aa22c4a05124c5faefab Author: Nicholas Kazlauskas Date: Tue Sep 6 09:47:24 2022 -0400 drm/amd/display: Disable OTG WA for the plane_state NULL case on DCN314 [Why] This shouldn't trigger during tiled display hotplug/unplug but it does because one of the tiles can end up with a NULL plane state. This also doesn't guard against the hang that it was originally trying to resolve, and can instead cause DIO corruption due to OTG sync being lost. [How] This was reverted at one point out of DCN31 so revert it here too. Reviewed-by: Dmytro Laktyushkin Acked-by: Wayne Lin Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f528fa3989c53d4cf2ee22d306eb1a96ed0010e6 Author: Daniel Miess Date: Fri Sep 9 11:32:55 2022 -0400 drm/amd/display: Add shift and mask for ICH_RESET_AT_END_OF_LINE [Why] DP DSC compliance failing for dcn314 due to ICH_RESET_AT_END_OF_LINE shift and mask being missing [How] Add in shift and mask for ICH_RESET_AT_END_OF_LINE Reviewed-by: Nicholas Kazlauskas Acked-by: Wayne Lin Signed-off-by: Daniel Miess Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.h | 220 --------------------- .../drm/amd/display/dc/dcn314/dcn314_resource.c | 9 +- 2 files changed, 6 insertions(+), 223 deletions(-) commit dcc2527df918edfe297c5074ccc1f05eae361ca6 Author: Dmytro Laktyushkin Date: Wed Jul 27 13:02:44 2022 -0400 drm/amd/display: increase dcn315 pstate change latency [Why & How] Update after new measurment came in Reviewed-by: Jun Lei Acked-by: Wayne Lin Signed-off-by: Dmytro Laktyushkin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 20c6168b3c8aadef7d2853c925d99eb546bd5e1c Author: Cruise Hung Date: Thu Sep 8 22:04:09 2022 +0800 drm/amd/display: Fix DP MST timeslot issue when fallback happened [Why] When USB4 DP link training failed and fell back to lower link rate, the time slot calculation uses the verified_link_cap. And the verified_link_cap was not updated to the new one. It caused the wrong VC payload time-slot was allocated. [How] Updated verified_link_cap with the new one from cur_link_settings after the LT completes successfully. Reviewed-by: Jun Lei Acked-by: Wayne Lin Signed-off-by: Cruise Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 72002056f771a025a2e6b4578aeb538799cb9ba2 Author: Meenakshikumar Somasundaram Date: Wed Aug 31 13:27:07 2022 -0400 drm/amd/display: Display distortion after hotplug 5K tiled display [Why] During hot plug of specific 5K tiled display, sometimes both the tiles are not synchronized resulting in distortion. The reason is that otgs of both the tiles goes out of sync when otg workaround (dcnxxx_disable_otg_wa) is applied for bandwidth optimization. The otg workaround reenables otg but otg synchronization context is not reset and hence dc_trigger_sync() does not resynchronize otg again. [How] Implement reset_sync_context_for_pipe() to reset the otg synchronization context for the disabled pipe and its slave pipes when otg workaround is applied. Reviewed-by: Nicholas Kazlauskas Acked-by: Wayne Lin Signed-off-by: Meenakshikumar Somasundaram Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c | 11 ++++++----- .../drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c | 11 ++++++----- .../drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 11 ++++++----- .../drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c | 11 ++++++----- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 17 +++++++++++++++++ drivers/gpu/drm/amd/display/dc/inc/resource.h | 4 ++++ 6 files changed, 45 insertions(+), 20 deletions(-) commit 056fb8cfbe213f6eb5e987a806583986a4ae8328 Author: George Shen Date: Thu Sep 1 18:30:37 2022 -0400 drm/amd/display: Update dummy P-state search to use DCN32 DML [Why] Current DCN3.2 logic for finding the dummy P-state index uses the DCN3.0 DML validation function instead of DCN3.2 DML. This can result in either unexpected DML VBA values, or unexpected dummy P-state index to be used. [How] Update the dummy P-state logic to use DCN3.2 DML validation function. Reviewed-by: Alvin Lee Reviewed-by: Nevenko Stupar Acked-by: Wayne Lin Signed-off-by: George Shen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 46 +++++++++++++++++++++- .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h | 6 +++ 2 files changed, 51 insertions(+), 1 deletion(-) commit 65fbfb02c2734cacffec5e3f492e1b4f1dabcf98 Author: zhikzhai Date: Fri Aug 26 19:44:50 2022 +0800 drm/amd/display: skip audio setup when audio stream is enabled [why] We have minimal pipe split transition method to avoid pipe allocation outage.However, this method will invoke audio setup which cause audio output stuck once pipe reallocate. [how] skip audio setup for pipelines which audio stream has been enabled Reviewed-by: Charlene Liu Acked-by: Wayne Lin Signed-off-by: zhikzhai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 52bb21499cf54fa65b56d97cd0d68579c90207dd Author: Hugo Hu Date: Thu Sep 1 10:08:35 2022 +0800 drm/amd/display: update gamut remap if plane has changed [Why] The desktop plane and full-screen game plane may have different gamut remap coefficients, if switching between desktop and full-screen game without updating the gamut remap will cause incorrect color. [How] Update gamut remap if planes change. Reviewed-by: Dmytro Laktyushkin Acked-by: Wayne Lin Signed-off-by: Hugo Hu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 1 + 1 file changed, 1 insertion(+) commit 29956d0fded036a570bd8e7d4ea4b1a1730307d2 Author: Michael Strauss Date: Wed Aug 31 15:10:43 2022 -0400 drm/amd/display: Assume an LTTPR is always present on fixed_vs links [WHY] LTTPRs can in very rare instsances fail to increment DPCD LTTPR count. This results in aux-i LTTPR requests to be sent to the wrong DPCD address, which causes link training failure. [HOW] Override internal repeater count if fixed_vs flag is set for a given link Reviewed-by: George Shen Acked-by: Wayne Lin Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit cb0eca01ad9756e853efec3301203c2b5b45aa9f Author: Dmytro Laktyushkin Date: Tue Aug 30 15:16:40 2022 -0400 drm/amd/display: fix dcn315 memory channel count and width read [Why & How] Correctly set ddr5 channel width to 8 bytes Reviewed-by: Jun Lei Acked-by: Wayne Lin Signed-off-by: Dmytro Laktyushkin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 3 +-- drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) commit b261509952bc19d1012cf732f853659be6ebc61e Author: Leo Li Date: Tue Aug 30 16:38:16 2022 -0400 drm/amd/display: Fix double cursor on non-video RGB MPO [Why] DC makes use of layer_index (zpos) when picking the HW plane to enable HW cursor on. However, some compositors will not attach zpos information to each DRM plane. Consequently, in amdgpu, we default layer_index to 0 and do not update it. This causes said DC logic to enable HW cursor on all planes of the same layer_index, which manifests as a double cursor issue if one of the planes is scaled (and hence scaling the cursor as well). [How] Use DRM core helpers to calculate a normalized_zpos value for each drm_plane_state under each crtc, within the atomic state. This helper will first consider existing zpos values, and if identical/unset, fallback to plane ID ordering. The normalized_zpos is then passed to dc_plane_info during atomic check for later use by the cursor logic. Reviewed-by: Bhawanpreet Lakha Acked-by: Wayne Lin Signed-off-by: Leo Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 16c6077f2eea3c8321782d2fb0a6790532cd8c03 Author: Alvin Lee Date: Wed Aug 31 10:53:27 2022 -0400 drm/amd/display: Only consider pixle rate div policy for DCN32+ [Why and How] - Only consider pixel rate div policy for DCN32+ Reviewed-by: Martin Leung Acked-by: Wayne Lin Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c | 16 ++-------------- drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.h | 2 -- drivers/gpu/drm/amd/display/dc/dcn314/dcn314_init.c | 1 - 3 files changed, 2 insertions(+), 17 deletions(-) commit 88d4cea24049de0fa073462b24ab471ecd685d8a Author: Chris Park Date: Mon Sep 12 22:36:49 2022 +0800 drm/amd/display: Port DCN30 420 logic to DCN32 [Why] 420 modes are limited by FMT buffer width of 4096 which requires multi-pipe support in form of ODM combine. If 420 modes have greater HActive than 4096, the DML logic should accomodate whether it should be rejected, or ODM combine 2:1 or 4:1 is triggered accordingly. [How] FMT Buffer limit of 4096 in DCN32. Force ODM combine depending on HActive and FMT Buffer limit. Reject modes if TMDS 420 and above 4096. Acked-by: Wayne Lin Signed-off-by: Chris Park Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 2 ++ .../dc/dml/dcn32/display_mode_vba_util_32.c | 26 ++++++++++++++++++++++ .../dc/dml/dcn32/display_mode_vba_util_32.h | 1 + 3 files changed, 29 insertions(+) commit 37a0bad677a76e51c5e9e53f5d9f8f4f3e77912f Author: Mukul Joshi Date: Wed Sep 7 10:46:58 2022 -0400 drm/amdgpu: Update PTE flags with TF enabled This patch updates the PTE flags when translate further (TF) is enabled: - With translate_further enabled, invalid PTEs can be 0. Reading consecutive invalid PTEs as 0 is considered a fault. To prevent this, ensure invalid PTEs have at least 1 bit set. - The current invalid PTE flags settings to translate a retry fault into a no-retry fault, doesn't work with TF enabled. As a result, update invalid PTE flags settings which works for both TF enabled and disabled case. Fixes: 352e683b72e79d ("drm/amdgpu: Enable translate_further to extend UTCL2 reach") Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Mukul Joshi Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +-- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 +++++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit 1918f2b20c3de73ef6f644979896e20a2e7dbb2d Author: Tony Krowiak Date: Tue Aug 23 11:06:42 2022 -0400 s390/vfio-ap: bypass unnecessary processing of AP resources It is not necessary to go through the process of validation, linking of queues to mdev and vice versa and filtering the APQNs assigned to the matrix mdev to build an AP configuration for a guest if an adapter or domain being assigned is already assigned to the matrix mdev. Likewise, it is not necessary to proceed through the process the unassignment of an adapter, domain or control domain if it is not assigned to the matrix mdev. Since it is not necessary to process assignment of a resource already assigned or process unassignment of a resource that is been assigned, this patch will bypass all assignment/unassignment operations for an adapter, domain or control domain under these circumstances. Not only is assignment of a duplicate adapter or domain unnecessary, it will also cause a hang situation when removing the matrix mdev to which it is assigned. The reason is because the same vfio_ap_queue objects with an APQN containing the APID of the adapter or APQI of the domain being assigned will get added multiple times to the hashtable that holds them. This results in the pprev and next pointers of the hlist_node (mdev_qnode field in the vfio_ap_queue object) pointing to the queue object itself resulting in an interminable loop when the mdev is removed and the queue table is iterated to reset the queues. Cc: stable@vger.kernel.org Fixes: 11cb2419fafe ("s390/vfio-ap: manage link between queue struct and matrix mdev") Reported-by: Matthew Rosato Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Signed-off-by: Halil Pasic Signed-off-by: Vasily Gorbik drivers/s390/crypto/vfio_ap_ops.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit b7af938f4379a884f15713319648a7653497a907 Author: Dan Carpenter Date: Thu Sep 15 14:30:58 2022 +0300 i2c: mux: harden i2c_mux_alloc() against integer overflows A couple years back we went through the kernel an automatically converted size calculations to use struct_size() instead. The struct_size() calculation is protected against integer overflows. However it does not make sense to use the result from struct_size() for additional math operations as that would negate any safeness. Fixes: 1f3b69b6b939 ("i2c: mux: Use struct_size() in devm_kzalloc()") Signed-off-by: Dan Carpenter Acked-by: Peter Rosin Reviewed-by: Gustavo A. R. Silva Signed-off-by: Wolfram Sang drivers/i2c/i2c-mux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 37f071ec327b04c83d47637c5e5c2199b39899ca Author: Asmaa Mnebhi Date: Tue Sep 20 13:47:29 2022 -0400 i2c: mlxbf: Fix frequency calculation The i2c-mlxbf.c driver is currently broken because there is a bug in the calculation of the frequency. core_f, core_r and core_od are components read from hardware registers and are used to compute the frequency used to compute different timing parameters. The shifting mechanism used to get core_f, core_r and core_od is wrong. Use FIELD_GET to mask and shift the bitfields properly. Fixes: b5b5b32081cd206b (i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC) Reviewed-by: Khalil Blaiech Signed-off-by: Asmaa Mnebhi Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mlxbf.c | 63 +++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 40 deletions(-) commit 999e4eaa4b3691acf85d094836260ec4b66c74fd Author: Namhyung Kim Date: Tue Sep 20 15:28:21 2022 -0700 perf tools: Honor namespace when synthesizing build-ids It needs to enter the namespace before reading a file. Fixes: 4183a8d70a288627 ("perf tools: Allow synthesizing the build id for kernel/modules/tasks in PERF_RECORD_MMAP2") Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20220920222822.2171056-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/synthetic-events.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 356edeca2e811642b5848605c2f5f9a7c6c32112 Author: Arnaldo Carvalho de Melo Date: Thu Jul 1 13:39:15 2021 -0300 tools headers cpufeatures: Sync with the kernel sources To pick the changes from: 7df548840c496b01 ("x86/bugs: Add "unknown" reporting for MMIO Stale Data") This only causes these perf files to be rebuilt: CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o CC /tmp/build/perf/bench/mem-memset-x86-64-asm.o And addresses this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h' diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h Cc: Adrian Hunter Cc: Borislav Petkov Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Pawan Gupta Link: https://lore.kernel.org/lkml/YysTRji90sNn2p5f@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/asm/cpufeatures.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5b427df27b94aec1312cace48a746782a0925c53 Author: Adrian Hunter Date: Wed Sep 14 15:24:29 2022 +0300 perf kcore_copy: Do not check /proc/modules is unchanged /proc/kallsyms and /proc/modules are compared before and after the copy in order to ensure no changes during the copy. However /proc/modules also might change due to reference counts changing even though that does not make any difference. Any modules loaded or unloaded should be visible in changes to kallsyms, so it is not necessary to check /proc/modules also anyway. Remove the comparison checking that /proc/modules is unchanged. Fixes: fc1b691d7651d949 ("perf buildid-cache: Add ability to add kcore to the cache") Reported-by: Daniel Dao Signed-off-by: Adrian Hunter Tested-by: Daniel Dao Acked-by: Namhyung Kim Cc: Ian Rogers Cc: Jiri Olsa Link: https://lore.kernel.org/r/20220914122429.8770-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol-elf.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 6cc447964555df209c590756bd804d3bb9ce1fe0 Author: Adrian Hunter Date: Thu Sep 15 15:26:12 2022 +0300 libperf evlist: Fix polling of system-wide events Originally, (refer commit f90d194a867a5a1d ("perf evlist: Do not poll events that use the system_wide flag") there wasn't much reason to poll system-wide events because: 1. The mmaps get "merged" via set-output anyway (the per-cpu case) 2. perf reads all mmaps when any event is woken 3. system-wide mmaps do not fill up as fast as the mmaps for user selected events But there was 1 reason not to poll which was that it prevented correct termination due to POLLHUP on all user selected events. That issue is now easily resolved by using fdarray_flag__nonfilterable. With the advent of commit ae4f8ae16a078964 ("libperf evlist: Allow mixing per-thread and per-cpu mmaps"), system-wide mmaps can be used also in the per-thread case where reason 1 does not apply. Fix the omission of system-wide events from polling by using the fdarray_flag__nonfilterable flag. Example: Before: $ perf record --no-bpf-event -vvv -e intel_pt// --per-thread uname 2>err.txt Linux $ grep 'sys_perf_event_open.*=\|pollfd' err.txt sys_perf_event_open: pid 155076 cpu -1 group_fd -1 flags 0x8 = 5 sys_perf_event_open: pid 155076 cpu -1 group_fd -1 flags 0x8 = 6 sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0x8 = 7 sys_perf_event_open: pid -1 cpu 1 group_fd -1 flags 0x8 = 9 sys_perf_event_open: pid -1 cpu 2 group_fd -1 flags 0x8 = 10 sys_perf_event_open: pid -1 cpu 3 group_fd -1 flags 0x8 = 11 sys_perf_event_open: pid -1 cpu 4 group_fd -1 flags 0x8 = 12 sys_perf_event_open: pid -1 cpu 5 group_fd -1 flags 0x8 = 13 sys_perf_event_open: pid -1 cpu 6 group_fd -1 flags 0x8 = 14 sys_perf_event_open: pid -1 cpu 7 group_fd -1 flags 0x8 = 15 thread_data[0x55fb43c29e80]: pollfd[0] <- event_fd=5 thread_data[0x55fb43c29e80]: pollfd[1] <- event_fd=6 thread_data[0x55fb43c29e80]: pollfd[2] <- non_perf_event fd=4 After: $ perf record --no-bpf-event -vvv -e intel_pt// --per-thread uname 2>err.txt Linux $ grep 'sys_perf_event_open.*=\|pollfd' err.txt sys_perf_event_open: pid 156316 cpu -1 group_fd -1 flags 0x8 = 5 sys_perf_event_open: pid 156316 cpu -1 group_fd -1 flags 0x8 = 6 sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0x8 = 7 sys_perf_event_open: pid -1 cpu 1 group_fd -1 flags 0x8 = 9 sys_perf_event_open: pid -1 cpu 2 group_fd -1 flags 0x8 = 10 sys_perf_event_open: pid -1 cpu 3 group_fd -1 flags 0x8 = 11 sys_perf_event_open: pid -1 cpu 4 group_fd -1 flags 0x8 = 12 sys_perf_event_open: pid -1 cpu 5 group_fd -1 flags 0x8 = 13 sys_perf_event_open: pid -1 cpu 6 group_fd -1 flags 0x8 = 14 sys_perf_event_open: pid -1 cpu 7 group_fd -1 flags 0x8 = 15 thread_data[0x55cc19e58e80]: pollfd[0] <- event_fd=5 thread_data[0x55cc19e58e80]: pollfd[1] <- event_fd=6 thread_data[0x55cc19e58e80]: pollfd[2] <- event_fd=7 thread_data[0x55cc19e58e80]: pollfd[3] <- event_fd=9 thread_data[0x55cc19e58e80]: pollfd[4] <- event_fd=10 thread_data[0x55cc19e58e80]: pollfd[5] <- event_fd=11 thread_data[0x55cc19e58e80]: pollfd[6] <- event_fd=12 thread_data[0x55cc19e58e80]: pollfd[7] <- event_fd=13 thread_data[0x55cc19e58e80]: pollfd[8] <- event_fd=14 thread_data[0x55cc19e58e80]: pollfd[9] <- event_fd=15 thread_data[0x55cc19e58e80]: pollfd[10] <- non_perf_event fd=4 Fixes: ae4f8ae16a078964 ("libperf evlist: Allow mixing per-thread and per-cpu mmaps") Signed-off-by: Adrian Hunter Acked-by: Namhyung Kim Cc: Ian Rogers Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220915122612.81738-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/perf/evlist.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ca76d7d2812b46124291f99c9b50aaf63a936f23 Author: Adrian Hunter Date: Thu Sep 15 15:26:11 2022 +0300 perf record: Fix cpu mask bit setting for mixed mmaps With mixed per-thread and (system-wide) per-cpu maps, the "any cpu" value -1 must be skipped when setting CPU mask bits. Prior to commit cbd7bfc7fd99acdd ("tools/perf: Fix out of bound access to cpu mask array") the invalid setting went unnoticed, but since then it causes perf record to fail with an error. Example: Before: $ perf record -e intel_pt// --per-thread uname Failed to initialize parallel data streaming masks After: $ perf record -e intel_pt// --per-thread uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.068 MB perf.data ] Fixes: ae4f8ae16a078964 ("libperf evlist: Allow mixing per-thread and per-cpu mmaps") Signed-off-by: Adrian Hunter Acked-by: Namhyung Kim Cc: Athira Rajeev Cc: Ian Rogers Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220915122612.81738-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 2 ++ 1 file changed, 2 insertions(+) commit e1dda48e4370043443e7d121d4b67a96fb70c75b Author: Namhyung Kim Date: Wed Sep 14 11:33:38 2022 -0700 perf test: Skip wp modify test on old kernels It uses PERF_EVENT_IOC_MODIFY_ATTRIBUTES ioctl. The kernel would return ENOTTY if it's not supported. Update the skip reason in that case. Committer notes: On s/390 the args aren't used, so need to be marked __maybe_unused. Reviewed-by: Ravi Bangoria Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20220914183338.546357-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/wp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 9614369a042a3a345ef7e2997c277aa8a271b8a0 Merge: 521a547ced64 c7e31e36d8a2 Author: Rafael J. Wysocki Date: Wed Sep 21 19:57:31 2022 +0200 Merge tag 'opp-fixes-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull OPP fixes for 6.0 from Viresh Kumar: "- Fix un-initialized variable usage (Christophe JAILLET). - Add missing DT properties (Rob Herring)." * tag 'opp-fixes-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: dt-bindings: opp: Add missing (unevaluated|additional)Properties on child nodes OPP: Fix an un-initialized variable usage commit dc164f4fb00a0abebdfff132f8bc7291a28f5401 Merge: 26c95642d419 bd71558d585a Author: Linus Torvalds Date: Wed Sep 21 10:14:56 2022 -0700 Merge tag 'for-linus-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux Pull UML fixes from Richard Weinberger: - Various fixes for build warnings - Fix default kernel command line * tag 'for-linus-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: arch: um: Mark the stack non-executable to fix a binutils warning um: Prevent KASAN splats in dump_stack() um: fix default console kernel parameter um: Cleanup compiler warning in arch/x86/um/tls_32.c um: Cleanup syscall_handler_t cast in syscalls_32.h commit 26c95642d419028db590ae0c511d9ddcdbc51746 Merge: 88e6546b3677 e9f3f8f48800 Author: Linus Torvalds Date: Wed Sep 21 09:31:19 2022 -0700 Merge tag 'mips-fixes_6.0_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: - fix missing export for Lantiq watchdog driver - fix ethernet phy interface setup for Loongson32 * tag 'mips-fixes_6.0_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: Loongson32: Fix PHY-mode being left unspecified MIPS: lantiq: export clk_get_io() for lantiq_wdt.ko commit 88e6546b36771daa145e7f6cf29f3496341634a6 Merge: 06f7db949993 e0f1b21c504f Author: Linus Torvalds Date: Wed Sep 21 09:25:32 2022 -0700 Merge tag 'dmaengine-fix-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine fixes from Vinod Koul: "A couple of small driver fixes: - xilinx_dma: devm_platform_ioremap_resource error handling, dma_set_mask_and_coherent failure handling, dt property read cleanup - refcount leak fix for of_xudma_dev_get() - zynqmp_dma: coverity fix for enum typecast" * tag 'dmaengine-fix-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: dmaengine: zynqmp_dma: Typecast with enum to fix the coverity warning dmaengine: ti: k3-udma-private: Fix refcount leak bug in of_xudma_dev_get() dmaengine: xilinx_dma: Report error in case of dma_set_mask_and_coherent API failure dmaengine: xilinx_dma: cleanup for fetching xlnx,num-fstores property dmaengine: xilinx_dma: Fix devm_platform_ioremap_resource error handling commit 06f7db9499937c6496d697a765ac05cdcd37f381 Merge: 5ce94102fb82 154897807050 Author: Linus Torvalds Date: Wed Sep 21 09:12:52 2022 -0700 Merge tag 'iommu-fixes-v6.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: "Two fixes for Intel VT-d: - Check the right capability bit for 5-level page table support. - Revert a previous fix which caused a regression with Thunderbolt devices" * tag 'iommu-fixes-v6.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Check correct capability for sagaw determination Revert "iommu/vt-d: Fix possible recursive locking in intel_iommu_init()" commit 5ce94102fb82f10e8810fb41bc8be504ecc58647 Merge: 48062bb26477 79764ec772bc Author: Linus Torvalds Date: Wed Sep 21 09:07:59 2022 -0700 Merge tag 'sound-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A bit more changes than wished, but still manageable amount. Most of commits are HD-audio specific device fixes / quirks, while there is a revert for the previous fix due to regressions and a double-free fix in ALSA core code" * tag 'sound-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: Revert "ALSA: usb-audio: Split endpoint setups for hw_params and prepare" ALSA: core: Fix double-free at snd_card_new() ALSA: hda/realtek: Add a quirk for HP OMEN 16 (8902) mute LED ALSA: hda/hdmi: Fix the converter reuse for the silent stream ALSA: hda/realtek: Add quirk for ASUS GA503R laptop ALSA: hda/realtek: Add pincfg for ASUS G533Z HP jack ALSA: hda/realtek: Add pincfg for ASUS G513 HP jack ALSA: hda/realtek: Re-arrange quirk table entries ALSA: hda/realtek: Enable 4-speaker output Dell Precision 5530 laptop ALSA: hda/realtek: Enable 4-speaker output Dell Precision 5570 laptop ALSA: hda: Fix Nvidia dp infoframe ALSA: hda/realtek: Add quirk for Huawei WRT-WX9 ALSA: hda/tegra: set depop delay for tegra ALSA: hda: add Intel 5 Series / 3400 PCI DID ALSA: hda: Fix hang at HD-audio codec unbinding due to refcount saturation commit 48062bb2647711a5ed7605f485dfcb8fc9938d9c Merge: 60891ec99e14 2e9ceb6728f1 Author: Linus Torvalds Date: Wed Sep 21 08:40:57 2022 -0700 Merge tag 'exfat-for-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat Pull exfat fix from Namjae Jeon: - fix integer overflow on large partitions * tag 'exfat-for-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: fix overflow for large capacity partition commit 189e7d876e48d7c791fe1c9c01516f70f5621a9f Author: Matthew Rosato Date: Tue Sep 20 15:30:25 2022 -0400 KVM: s390: pci: register pci hooks without interpretation The kvm registration hooks must be registered even if the facilities necessary for zPCI interpretation are unavailable, as vfio-pci-zdev will expect to use the hooks regardless. This fixes an issue where vfio-pci-zdev will fail its open function because of a missing kvm_register when running on hardware that does not support zPCI interpretation. Fixes: ca922fecda6c ("KVM: s390: pci: Hook to access KVM lowlevel from VFIO") Signed-off-by: Matthew Rosato Reviewed-by: Pierre Morel Link: https://lore.kernel.org/r/20220920193025.135655-1-mjrosato@linux.ibm.com Message-Id: <20220920193025.135655-1-mjrosato@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/kvm/kvm-s390.c | 4 ++-- arch/s390/kvm/pci.c | 14 +++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) commit 70ba8fae27758cc2679a948b03d8a9ca18f1dcb1 Author: Matthew Rosato Date: Wed Sep 7 11:59:52 2022 -0400 KVM: s390: pci: fix GAIT physical vs virtual pointers usage The GAIT and all of its entries must be represented by physical addresses as this structure is shared with underlying firmware. We can keep a virtual address of the GAIT origin in order to handle processing in the kernel, but when traversing the entries we must again convert the physical AISB stored in that GAIT entry into a virtual address in order to process it. Note: this currently doesn't fix a real bug, since virtual addresses are indentical to physical ones. Reviewed-by: Pierre Morel Acked-by: Nico Boehr Signed-off-by: Matthew Rosato Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20220907155952.87356-1-mjrosato@linux.ibm.com Message-Id: <20220907155952.87356-1-mjrosato@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/kvm/interrupt.c | 2 +- arch/s390/kvm/pci.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b3cefd6bf16e7234ffbd4209f6083060f4e35f59 Author: Janis Schoetterl-Glausch Date: Thu Aug 25 21:25:40 2022 +0200 KVM: s390: Pass initialized arg even if unused This silences smatch warnings reported by kbuild bot: arch/s390/kvm/gaccess.c:859 guest_range_to_gpas() error: uninitialized symbol 'prot'. arch/s390/kvm/gaccess.c:1064 access_guest_with_key() error: uninitialized symbol 'prot'. This is because it cannot tell that the value is not used in this case. The trans_exc* only examine prot if code is PGM_PROTECTION. Pass a dummy value for other codes. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Janis Schoetterl-Glausch Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20220825192540.1560559-1-scgl@linux.ibm.com Signed-off-by: Christian Borntraeger Signed-off-by: Janosch Frank arch/s390/kvm/gaccess.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit e8c924a4fb6ef9a224423fb5542954acbda234b3 Author: Matthew Rosato Date: Thu Sep 15 13:55:14 2022 -0400 KVM: s390: pci: fix plain integer as NULL pointer warnings Fix some sparse warnings that a plain integer 0 is being used instead of NULL. Reported-by: kernel test robot Signed-off-by: Matthew Rosato Link: https://lore.kernel.org/r/20220915175514.167899-1-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger Signed-off-by: Janosch Frank arch/s390/kvm/pci.c | 4 ++-- arch/s390/kvm/pci.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 375a683321a331697103a5ba2fed880b759c626d Merge: 65e5d27df612 0f2211f1cf58 Author: Jakub Kicinski Date: Wed Sep 21 06:52:32 2022 -0700 Merge tag 'linux-can-fixes-for-6.0-20220921' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2022-09-21 The 1st patch is by me, targets the flexcan driver and fixes a potential system hang on single core systems under high CAN packet rate. The next 2 patches are also by me and target the gs_usb driver. A potential race condition during the ndo_open callback as well as the return value if the ethtool identify feature is not supported are fixed. * tag 'linux-can-fixes-for-6.0-20220921' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: gs_usb: gs_usb_set_phys_id(): return with error if identify is not supported can: gs_usb: gs_can_open(): fix race dev->can.state condition can: flexcan: flexcan_mailbox_read() fix return value for drop = true ==================== Link: https://lore.kernel.org/r/20220921083609.419768-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit babd04386b1df8c364cdaa39ac0e54349502e1e5 Author: Lieven Hey Date: Thu Sep 15 11:29:10 2022 +0200 perf jit: Include program header in ELF files The missing header makes it hard for programs like elfutils to open these files. Fixes: 2d86612aacb7805f ("perf symbol: Correct address for bss symbols") Reviewed-by: Leo Yan Signed-off-by: Lieven Hey Tested-by: Leo Yan Cc: Leo Yan Link: https://lore.kernel.org/r/20220915092910.711036-1-lieven.hey@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/genelf.c | 14 ++++++++++++++ tools/perf/util/genelf.h | 4 ++++ 2 files changed, 18 insertions(+) commit 7901086014bbaa3aeabcf060e0bbad6220427a3b Author: Namhyung Kim Date: Fri Sep 16 11:41:32 2022 -0700 perf test: Add a new test for perf stat cgroup BPF counter $ sudo ./perf test -v each-cgroup 96: perf stat --bpf-counters --for-each-cgroup test : --- start --- test child forked, pid 79600 test child finished with 0 ---- end ---- perf stat --bpf-counters --for-each-cgroup test: Ok Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20220916184132.1161506-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/stat_bpf_counters_cgrp.sh | 83 ++++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit 8a92605daa9098fadb473fb30edafacc40033a05 Author: Namhyung Kim Date: Fri Sep 16 11:41:31 2022 -0700 perf stat: Use evsel->core.cpus to iterate cpus in BPF cgroup counters If it mixes core and uncore events, each evsel would have different cpu map. But it assumed they are same with evlist's all_cpus and accessed by the same index. This resulted in a crash like below. $ perf stat -a --bpf-counters --for-each_cgroup ^. -e cycles,imc/cas_count_read/ sleep 1 Segmentation fault While it's not recommended to use uncore events for cgroup aggregation, it should not crash. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20220916184132.1161506-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_counter_cgroup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3da35231d9e4949c4ae40e3ce653e7c468455d55 Author: Namhyung Kim Date: Fri Sep 16 11:41:30 2022 -0700 perf stat: Fix cpu map index in bperf cgroup code The previous cpu map introduced a bug in the bperf cgroup counter. This results in a failure when user gives a partial cpu map starting from non-zero. $ sudo ./perf stat -C 1-2 --bpf-counters --for-each-cgroup ^. sleep 1 libbpf: prog 'on_cgrp_switch': failed to create BPF link for perf_event FD 0: -9 (Bad file descriptor) Failed to attach cgroup program To get the FD of an evsel, it should use a map index not the CPU number. Fixes: 0255571a16059c8e ("perf cpumap: Switch to using perf_cpu_map API") Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: bpf@vger.kernel.org Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Song Liu Link: https://lore.kernel.org/r/20220916184132.1161506-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_counter_cgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d77326c3369e255715ed2440a78894ccc98dd69 Author: Namhyung Kim Date: Fri Sep 16 11:41:29 2022 -0700 perf stat: Fix BPF program section name It seems the recent libbpf got more strict about the section name. I'm seeing a failure like this: $ sudo ./perf stat -a --bpf-counters --for-each-cgroup ^. sleep 1 libbpf: prog 'on_cgrp_switch': missing BPF prog type, check ELF section name 'perf_events' libbpf: prog 'on_cgrp_switch': failed to load: -22 libbpf: failed to load object 'bperf_cgroup_bpf' libbpf: failed to load BPF skeleton 'bperf_cgroup_bpf': -22 Failed to load cgroup skeleton The section name should be 'perf_event' (without the trailing 's'). Although it's related to the libbpf change, it'd be better fix the section name in the first place. Fixes: 944138f048f7d759 ("perf stat: Enable BPF counter with --for-each-cgroup") Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: bpf@vger.kernel.org Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Link: https://lore.kernel.org/r/20220916184132.1161506-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_skel/bperf_cgroup.bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab4bbde809ff7bc964f638d62959ec4272a8729a Merge: ab0b4b575b46 468c9d928a8f Author: Greg Kroah-Hartman Date: Wed Sep 21 15:26:45 2022 +0200 Merge tag 'fpga-for-6.0-final' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-linus Xu writes: FPGA Manager changes for 6.0-final Intel m10 bmc secure update - Russ's change fixes the memory leak for a sysfs node reading All patches have been reviewed on the mailing list, and have been in the last linux-next releases (as part of our for-6.0 branch). Signed-off-by: Xu Yilun * tag 'fpga-for-6.0-final' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga: fpga: m10bmc-sec: Fix possible memory leak of flash_buf commit 65e5d27df61283e5390f04b09dc79cd832f95607 Author: Jianglei Nie Date: Wed Sep 14 09:42:38 2022 +0800 net: atlantic: fix potential memory leak in aq_ndev_close() If aq_nic_stop() fails, aq_ndev_close() returns err without calling aq_nic_deinit() to release the relevant memory and resource, which will lead to a memory leak. We can fix it by deleting the if condition judgment and goto statement to call aq_nic_deinit() directly after aq_nic_stop() to fix the memory leak. Signed-off-by: Jianglei Nie Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_main.c | 3 --- 1 file changed, 3 deletions(-) commit 154897807050c1161cb2660e502fc0470d46b986 Author: Yi Liu Date: Wed Sep 21 10:40:54 2022 +0800 iommu/vt-d: Check correct capability for sagaw determination Check 5-level paging capability for 57 bits address width instead of checking 1GB large page capability. Fixes: 53fc7ad6edf2 ("iommu/vt-d: Correctly calculate sagaw value of IOMMU") Cc: stable@vger.kernel.org Reported-by: Raghunathan Srinivasan Signed-off-by: Yi Liu Reviewed-by: Jerry Snitselaar Reviewed-by: Kevin Tian Reviewed-by: Raghunathan Srinivasan Link: https://lore.kernel.org/r/20220916071212.2223869-2-yi.l.liu@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ebb5f8e001037efbdf18afabbbebf71bd98825e Author: Lu Baolu Date: Wed Sep 21 10:40:53 2022 +0800 Revert "iommu/vt-d: Fix possible recursive locking in intel_iommu_init()" This reverts commit 9cd4f1434479f1ac25c440c421fbf52069079914. Some issues were reported on the original commit. Some thunderbolt devices don't work anymore due to the following DMA fault. DMAR: DRHD: handling fault status reg 2 DMAR: [INTR-REMAP] Request device [09:00.0] fault index 0x8080 [fault reason 0x25] Blocked a compatibility format interrupt request Bring it back for now to avoid functional regression. Fixes: 9cd4f1434479f ("iommu/vt-d: Fix possible recursive locking in intel_iommu_init()") Link: https://lore.kernel.org/linux-iommu/485A6EA5-6D58-42EA-B298-8571E97422DE@getmailspring.com/ Link: https://bugzilla.kernel.org/show_bug.cgi?id=216497 Cc: Mika Westerberg Cc: # 5.19.x Reported-and-tested-by: George Hilliard Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20220920081701.3453504-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/dmar.c | 7 ------- drivers/iommu/intel/iommu.c | 27 +++++++++++++++++++++++++-- include/linux/dmar.h | 4 +--- 3 files changed, 26 insertions(+), 12 deletions(-) commit 79a392a3b19a106e0268bfbe1b4cc31d85eeb552 Merge: 6a1dbfefdae4 d25088932227 Author: David S. Miller Date: Wed Sep 21 09:07:53 2022 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Florian Westphal says: ==================== netfilter: bugfixes for net The following set contains netfilter fixes for the *net* tree. Regressions (rc only): recent ebtables crash fix was incomplete, it added a memory leak. The patch to fix possible buffer overrun for BIG TCP in ftp conntrack tried to be too clever, we cannot re-use ct->lock: NAT engine might grab it again -> deadlock. Revert back to a global spinlock. Both from myself. Remove the documentation for the recently removed 'nf_conntrack_helper' sysctl as well, from Pablo Neira. The static_branch_inc() that guards the 'chain stats enabled' path needs to be deferred further, until the entire transaction was created. From Tetsuo Handa. Older bugs: Since 5.3: nf_tables_addchain may leak pcpu memory in error path when offloading fails. Also from Tetsuo Handa. ==================== Signed-off-by: David S. Miller commit 0f2211f1cf58876f00d2fd8839e0fdadf0786894 Author: Marc Kleine-Budde Date: Thu Aug 18 14:10:08 2022 +0200 can: gs_usb: gs_usb_set_phys_id(): return with error if identify is not supported Until commit 409c188c57cd ("can: tree-wide: advertise software timestamping capabilities") the ethtool_ops was only assigned for devices which support the GS_CAN_FEATURE_IDENTIFY feature. That commit assigns ethtool_ops unconditionally. This results on controllers without GS_CAN_FEATURE_IDENTIFY support for the following ethtool error: | $ ethtool -p can0 1 | Cannot identify NIC: Broken pipe Restore the correct error value by checking for GS_CAN_FEATURE_IDENTIFY in the gs_usb_set_phys_id() function. | $ ethtool -p can0 1 | Cannot identify NIC: Operation not supported While there use the variable "netdev" for the "struct net_device" pointer and "dev" for the "struct gs_can" pointer as in the rest of the driver. Fixes: 409c188c57cd ("can: tree-wide: advertise software timestamping capabilities") Link: http://lore.kernel.org/all/20220818143853.2671854-1-mkl@pengutronix.de Cc: Vincent Mailhol Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 5440428b3da65408dba0241985acb7a05258b85e Author: Marc Kleine-Budde Date: Tue Sep 20 11:40:56 2022 +0200 can: gs_usb: gs_can_open(): fix race dev->can.state condition The dev->can.state is set to CAN_STATE_ERROR_ACTIVE, after the device has been started. On busy networks the CAN controller might receive CAN frame between and go into an error state before the dev->can.state is assigned. Assign dev->can.state before starting the controller to close the race window. Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices") Link: https://lore.kernel.org/all/20220920195216.232481-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a09721dd47c8468b3f2fdd73f40422699ffe26dd Author: Marc Kleine-Budde Date: Thu Aug 11 10:25:44 2022 +0200 can: flexcan: flexcan_mailbox_read() fix return value for drop = true The following happened on an i.MX25 using flexcan with many packets on the bus: The rx-offload queue reached a length more than skb_queue_len_max. In can_rx_offload_offload_one() the drop variable was set to true which made the call to .mailbox_read() (here: flexcan_mailbox_read()) to _always_ return ERR_PTR(-ENOBUFS) and drop the rx'ed CAN frame. So can_rx_offload_offload_one() returned ERR_PTR(-ENOBUFS), too. can_rx_offload_irq_offload_fifo() looks as follows: | while (1) { | skb = can_rx_offload_offload_one(offload, 0); | if (IS_ERR(skb)) | continue; | if (!skb) | break; | ... | } The flexcan driver wrongly always returns ERR_PTR(-ENOBUFS) if drop is requested, even if there is no CAN frame pending. As the i.MX25 is a single core CPU, while the rx-offload processing is active, there is no thread to process packets from the offload queue. So the queue doesn't get any shorter and this results is a tight loop. Instead of always returning ERR_PTR(-ENOBUFS) if drop is requested, return NULL if no CAN frame is pending. Changes since v1: https://lore.kernel.org/all/20220810144536.389237-1-u.kleine-koenig@pengutronix.de - don't break in can_rx_offload_irq_offload_fifo() in case of an error, return NULL in flexcan_mailbox_read() in case of no pending CAN frame instead Fixes: 4e9c9484b085 ("can: rx-offload: Prepare for CAN FD support") Link: https://lore.kernel.org/all/20220811094254.1864367-1-mkl@pengutronix.de Cc: stable@vger.kernel.org # v5.5 Suggested-by: Uwe Kleine-König Reviewed-by: Uwe Kleine-König Tested-by: Thorsten Scherer Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan/flexcan-core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 69bef19d6b9700e96285f4b4e28691cda3dcd0d1 Author: Meng Li Date: Wed Sep 21 11:20:20 2022 +0800 gpiolib: cdev: Set lineevent_state::irq after IRQ register successfully When running gpio test on nxp-ls1028 platform with below command gpiomon --num-events=3 --rising-edge gpiochip1 25 There will be a warning trace as below: Call trace: free_irq+0x204/0x360 lineevent_free+0x64/0x70 gpio_ioctl+0x598/0x6a0 __arm64_sys_ioctl+0xb4/0x100 invoke_syscall+0x5c/0x130 ...... el0t_64_sync+0x1a0/0x1a4 The reason of this issue is that calling request_threaded_irq() function failed, and then lineevent_free() is invoked to release the resource. Since the lineevent_state::irq was already set, so the subsequent invocation of free_irq() would trigger the above warning call trace. To fix this issue, set the lineevent_state::irq after the IRQ register successfully. Fixes: 468242724143 ("gpiolib: cdev: refactor lineevent cleanup into lineevent_free") Cc: stable@vger.kernel.org Signed-off-by: Meng Li Reviewed-by: Kent Gibson Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-cdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 21a9acc162457402c74c5c1e16471fda6eb090c0 Author: Dongliang Mu Date: Mon Sep 19 11:12:49 2022 +0800 gpio: tqmx86: fix uninitialized variable girq The commit 924610607f19 ("gpio: tpmx86: Move PM device over to irq domain") adds a dereference of girq that may be uninitialized. Fix this by moving irq_domain_set_pm_device into if true branch as suggested by Marc Zyngier. Fixes: 924610607f19 ("gpio: tpmx86: Move PM device over to irq domain") Suggested-by: Marc Zyngier Signed-off-by: Dongliang Mu Acked-by: Marc Zyngier Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-tqmx86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bd71558d585ac61cfd799db7f25e78dca404dd7a Author: David Gow Date: Wed Sep 21 14:48:55 2022 +0800 arch: um: Mark the stack non-executable to fix a binutils warning Since binutils 2.39, ld will print a warning if any stack section is executable, which is the default for stack sections on files without a .note.GNU-stack section. This was fixed for x86 in commit ffcf9c5700e4 ("x86: link vdso and boot with -z noexecstack --no-warn-rwx-segments"), but remained broken for UML, resulting in several warnings: /usr/bin/ld: warning: arch/x86/um/vdso/vdso.o: missing .note.GNU-stack section implies executable stack /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker /usr/bin/ld: warning: .tmp_vmlinux.kallsyms1 has a LOAD segment with RWX permissions /usr/bin/ld: warning: .tmp_vmlinux.kallsyms1.o: missing .note.GNU-stack section implies executable stack /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker /usr/bin/ld: warning: .tmp_vmlinux.kallsyms2 has a LOAD segment with RWX permissions /usr/bin/ld: warning: .tmp_vmlinux.kallsyms2.o: missing .note.GNU-stack section implies executable stack /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker /usr/bin/ld: warning: vmlinux has a LOAD segment with RWX permissions Link both the VDSO and vmlinux with -z noexecstack, fixing the warnings about .note.GNU-stack sections. In addition, pass --no-warn-rwx-segments to dodge the remaining warnings about LOAD segments with RWX permissions in the kallsyms objects. (Note that this flag is apparently not available on lld, so hide it behind a test for BFD, which is what the x86 patch does.) Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ffcf9c5700e49c0aee42dcba9a12ba21338e8136 Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107 Signed-off-by: David Gow Reviewed-by: Lukas Straub Tested-by: Lukas Straub Acked-by: Randy Dunlap # build-tested Signed-off-by: Richard Weinberger arch/um/Makefile | 8 ++++++++ arch/x86/um/vdso/Makefile | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) commit 6a1dbfefdae4f7809b3e277cc76785dac0ac1cd0 Author: Geert Uytterhoeven Date: Mon Sep 19 16:48:28 2022 +0200 net: sh_eth: Fix PHY state warning splat during system resume Since commit 744d23c71af39c7d ("net: phy: Warn about incorrect mdio_bus_phy_resume() state"), a warning splat is printed during system resume with Wake-on-LAN disabled: WARNING: CPU: 0 PID: 626 at drivers/net/phy/phy_device.c:323 mdio_bus_phy_resume+0xbc/0xe4 As the Renesas SuperH Ethernet driver already calls phy_{stop,start}() in its suspend/resume callbacks, it is sufficient to just mark the MAC responsible for managing the power state of the PHY. Fixes: fba863b816049b03 ("net: phy: make PHY PM ops a no-op if MAC driver manages PHY PM") Signed-off-by: Geert Uytterhoeven Reviewed-by: Florian Fainelli Reviewed-by: Sergey Shtylyov Link: https://lore.kernel.org/r/c6e1331b9bef61225fa4c09db3ba3e2e7214ba2d.1663598886.git.geert+renesas@glider.be Signed-off-by: Jakub Kicinski drivers/net/ethernet/renesas/sh_eth.c | 2 ++ 1 file changed, 2 insertions(+) commit 4924c0cdce75575295f8fa682851fb8e5d619dd2 Author: Geert Uytterhoeven Date: Mon Sep 19 16:48:00 2022 +0200 net: ravb: Fix PHY state warning splat during system resume Since commit 744d23c71af39c7d ("net: phy: Warn about incorrect mdio_bus_phy_resume() state"), a warning splat is printed during system resume with Wake-on-LAN disabled: WARNING: CPU: 0 PID: 1197 at drivers/net/phy/phy_device.c:323 mdio_bus_phy_resume+0xbc/0xc8 As the Renesas Ethernet AVB driver already calls phy_{stop,start}() in its suspend/resume callbacks, it is sufficient to just mark the MAC responsible for managing the power state of the PHY. Fixes: fba863b816049b03 ("net: phy: make PHY PM ops a no-op if MAC driver manages PHY PM") Signed-off-by: Geert Uytterhoeven Reviewed-by: Florian Fainelli Reviewed-by: Sergey Shtylyov Link: https://lore.kernel.org/r/8ec796f47620980fdd0403e21bd8b7200b4fa1d4.1663598796.git.geert+renesas@glider.be Signed-off-by: Jakub Kicinski drivers/net/ethernet/renesas/ravb_main.c | 2 ++ 1 file changed, 2 insertions(+) commit d25088932227680988a6b794221e031a7232f137 Author: Florian Westphal Date: Tue Sep 20 18:31:30 2022 +0200 netfilter: nf_ct_ftp: fix deadlock when nat rewrite is needed We can't use ct->lock, this is already used by the seqadj internals. When using ftp helper + nat, seqadj will attempt to acquire ct->lock again. Revert back to a global lock for now. Fixes: c783a29c7e59 ("netfilter: nf_ct_ftp: prefer skb_linearize") Reported-by: Bruno de Paula Larini Signed-off-by: Florian Westphal net/netfilter/nf_conntrack_ftp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 62ce44c4fff947eebdf10bb582267e686e6835c9 Author: Florian Westphal Date: Tue Sep 20 14:20:17 2022 +0200 netfilter: ebtables: fix memory leak when blob is malformed The bug fix was incomplete, it "replaced" crash with a memory leak. The old code had an assignment to "ret" embedded into the conditional, restore this. Fixes: 7997eff82828 ("netfilter: ebtables: reject blobs that don't provide all entry points") Reported-and-tested-by: syzbot+a24c5252f3e3ab733464@syzkaller.appspotmail.com Signed-off-by: Florian Westphal net/bridge/netfilter/ebtables.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9a4d6dd554b86e65581ef6b6638a39ae079b17ac Author: Tetsuo Handa Date: Mon Sep 12 22:58:51 2022 +0900 netfilter: nf_tables: fix percpu memory leak at nf_tables_addchain() It seems to me that percpu memory for chain stats started leaking since commit 3bc158f8d0330f0a ("netfilter: nf_tables: map basechain priority to hardware priority") when nft_chain_offload_priority() returned an error. Signed-off-by: Tetsuo Handa Fixes: 3bc158f8d0330f0a ("netfilter: nf_tables: map basechain priority to hardware priority") Signed-off-by: Florian Westphal net/netfilter/nf_tables_api.c | 1 + 1 file changed, 1 insertion(+) commit 921ebde3c0d22c8cba74ce8eb3cc4626abff1ccd Author: Tetsuo Handa Date: Mon Sep 12 21:41:00 2022 +0900 netfilter: nf_tables: fix nft_counters_enabled underflow at nf_tables_addchain() syzbot is reporting underflow of nft_counters_enabled counter at nf_tables_addchain() [1], for commit 43eb8949cfdffa76 ("netfilter: nf_tables: do not leave chain stats enabled on error") missed that nf_tables_chain_destroy() after nft_basechain_init() in the error path of nf_tables_addchain() decrements the counter because nft_basechain_init() makes nft_is_base_chain() return true by setting NFT_CHAIN_BASE flag. Increment the counter immediately after returning from nft_basechain_init(). Link: https://syzkaller.appspot.com/bug?extid=b5d82a651b71cd8a75ab [1] Reported-by: syzbot Signed-off-by: Tetsuo Handa Tested-by: syzbot Fixes: 43eb8949cfdffa76 ("netfilter: nf_tables: do not leave chain stats enabled on error") Signed-off-by: Florian Westphal net/netfilter/nf_tables_api.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 76b907ee00c4a5cdd5d0adbacdaa1c1989385615 Author: Pablo Neira Ayuso Date: Fri Sep 9 12:42:11 2022 +0200 netfilter: conntrack: remove nf_conntrack_helper documentation This toggle has been already remove by b118509076b3 ("netfilter: remove nf_conntrack_helper sysctl and modparam toggles"). Remove the documentation entry for this toggle too. Signed-off-by: Pablo Neira Ayuso Signed-off-by: Florian Westphal Documentation/networking/nf_conntrack-sysctl.rst | 9 --------- 1 file changed, 9 deletions(-) commit 603ccb3aca717d04a4b1a04e3a7bc3b91eba33e8 Author: Bhupesh Sharma Date: Thu Sep 15 16:58:04 2022 +0530 MAINTAINERS: Add myself as a reviewer for Qualcomm ETHQOS Ethernet driver As suggested by Vinod, adding myself as the reviewer for the Qualcomm ETHQOS Ethernet driver. Recently I have enabled this driver on a few Qualcomm SoCs / boards and hence trying to keep a close eye on it. Signed-off-by: Bhupesh Sharma Acked-by: Vinod Koul Link: https://lore.kernel.org/r/20220915112804.3950680-1-bhupesh.sharma@linaro.org Signed-off-by: Jakub Kicinski MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 8ac7132704f3fbd2095abb9459e5303ce8c9e559 Author: Mateusz Palczewski Date: Fri Aug 26 10:31:23 2022 +0200 ice: Fix interface being down after reset with link-down-on-close flag on When performing a reset on ice driver with link-down-on-close flag on interface would always stay down. Fix this by moving a check of this flag to ice_stop() that is called only when user wants to bring interface down. Fixes: ab4ab73fc1ec ("ice: Add ethtool private flag to make forcing link down optional") Signed-off-by: Mateusz Palczewski Tested-by: Petr Oros Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_main.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 122045ca770492660005c22379995506f13efea8 Author: Michal Swiatkowski Date: Mon Aug 8 11:58:54 2022 +0200 ice: config netdev tc before setting queues number After lowering number of tx queues the warning appears: "Number of in use tx queues changed invalidating tc mappings. Priority traffic classification disabled!" Example command to reproduce: ethtool -L enp24s0f0 tx 36 rx 36 Fix this by setting correct tc mapping before setting real number of queues on netdev. Fixes: 0754d65bd4be5 ("ice: Add infrastructure for mqprio support via ndo_setup_tc") Signed-off-by: Michal Swiatkowski Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_main.c | 2 ++ 1 file changed, 2 insertions(+) commit da847246ab80610c5acca34df5893bee1d8cf7c2 Merge: 76dd07281338 1461d212ab27 Author: Jakub Kicinski Date: Tue Sep 20 11:41:17 2022 -0700 Merge branch 'fixes-for-tc-taprio-software-mode' Vladimir Oltean says: ==================== Fixes for tc-taprio software mode While working on some new features for tc-taprio, I found some strange behavior which looked like bugs. I was able to eventually trigger a NULL pointer dereference. This patch set fixes 2 issues I saw. Detailed explanation in patches. ==================== Link: https://lore.kernel.org/r/20220915100802.2308279-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 1461d212ab277d8bba1a753d33e9afe03d81f9d4 Author: Vladimir Oltean Date: Thu Sep 15 13:08:02 2022 +0300 net/sched: taprio: make qdisc_leaf() see the per-netdev-queue pfifo child qdiscs taprio can only operate as root qdisc, and to that end, there exists the following check in taprio_init(), just as in mqprio: if (sch->parent != TC_H_ROOT) return -EOPNOTSUPP; And indeed, when we try to attach taprio to an mqprio child, it fails as expected: $ tc qdisc add dev swp0 root handle 1: mqprio num_tc 8 \ map 0 1 2 3 4 5 6 7 \ queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 hw 0 $ tc qdisc replace dev swp0 parent 1:2 taprio num_tc 8 \ map 0 1 2 3 4 5 6 7 \ queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 \ base-time 0 sched-entry S 0x7f 990000 sched-entry S 0x80 100000 \ flags 0x0 clockid CLOCK_TAI Error: sch_taprio: Can only be attached as root qdisc. (extack message added by me) But when we try to attach a taprio child to a taprio root qdisc, surprisingly it doesn't fail: $ tc qdisc replace dev swp0 root handle 1: taprio num_tc 8 \ map 0 1 2 3 4 5 6 7 queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 \ base-time 0 sched-entry S 0x7f 990000 sched-entry S 0x80 100000 \ flags 0x0 clockid CLOCK_TAI $ tc qdisc replace dev swp0 parent 1:2 taprio num_tc 8 \ map 0 1 2 3 4 5 6 7 \ queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 \ base-time 0 sched-entry S 0x7f 990000 sched-entry S 0x80 100000 \ flags 0x0 clockid CLOCK_TAI This is because tc_modify_qdisc() behaves differently when mqprio is root, vs when taprio is root. In the mqprio case, it finds the parent qdisc through p = qdisc_lookup(dev, TC_H_MAJ(clid)), and then the child qdisc through q = qdisc_leaf(p, clid). This leaf qdisc q has handle 0, so it is ignored according to the comment right below ("It may be default qdisc, ignore it"). As a result, tc_modify_qdisc() goes through the qdisc_create() code path, and this gives taprio_init() a chance to check for sch_parent != TC_H_ROOT and error out. Whereas in the taprio case, the returned q = qdisc_leaf(p, clid) is different. It is not the default qdisc created for each netdev queue (both taprio and mqprio call qdisc_create_dflt() and keep them in a private q->qdiscs[], or priv->qdiscs[], respectively). Instead, taprio makes qdisc_leaf() return the _root_ qdisc, aka itself. When taprio does that, tc_modify_qdisc() goes through the qdisc_change() code path, because the qdisc layer never finds out about the child qdisc of the root. And through the ->change() ops, taprio has no reason to check whether its parent is root or not, just through ->init(), which is not called. The problem is the taprio_leaf() implementation. Even though code wise, it does the exact same thing as mqprio_leaf() which it is copied from, it works with different input data. This is because mqprio does not attach itself (the root) to each device TX queue, but one of the default qdiscs from its private array. In fact, since commit 13511704f8d7 ("net: taprio offload: enforce qdisc to netdev queue mapping"), taprio does this too, but just for the full offload case. So if we tried to attach a taprio child to a fully offloaded taprio root qdisc, it would properly fail too; just not to a software root taprio. To fix the problem, stop looking at the Qdisc that's attached to the TX queue, and instead, always return the default qdiscs that we've allocated (and to which we privately enqueue and dequeue, in software scheduling mode). Since Qdisc_class_ops :: leaf is only called from tc_modify_qdisc(), the risk of unforeseen side effects introduced by this change is minimal. Fixes: 5a781ccbd19e ("tc: Add support for configuring the taprio scheduler") Signed-off-by: Vladimir Oltean Reviewed-by: Vinicius Costa Gomes Signed-off-by: Jakub Kicinski net/sched/sch_taprio.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit db46e3a88a09c5cf7e505664d01da7238cd56c92 Author: Vladimir Oltean Date: Thu Sep 15 13:08:01 2022 +0300 net/sched: taprio: avoid disabling offload when it was never enabled In an incredibly strange API design decision, qdisc->destroy() gets called even if qdisc->init() never succeeded, not exclusively since commit 87b60cfacf9f ("net_sched: fix error recovery at qdisc creation"), but apparently also earlier (in the case of qdisc_create_dflt()). The taprio qdisc does not fully acknowledge this when it attempts full offload, because it starts off with q->flags = TAPRIO_FLAGS_INVALID in taprio_init(), then it replaces q->flags with TCA_TAPRIO_ATTR_FLAGS parsed from netlink (in taprio_change(), tail called from taprio_init()). But in taprio_destroy(), we call taprio_disable_offload(), and this determines what to do based on FULL_OFFLOAD_IS_ENABLED(q->flags). But looking at the implementation of FULL_OFFLOAD_IS_ENABLED() (a bitwise check of bit 1 in q->flags), it is invalid to call this macro on q->flags when it contains TAPRIO_FLAGS_INVALID, because that is set to U32_MAX, and therefore FULL_OFFLOAD_IS_ENABLED() will return true on an invalid set of flags. As a result, it is possible to crash the kernel if user space forces an error between setting q->flags = TAPRIO_FLAGS_INVALID, and the calling of taprio_enable_offload(). This is because drivers do not expect the offload to be disabled when it was never enabled. The error that we force here is to attach taprio as a non-root qdisc, but instead as child of an mqprio root qdisc: $ tc qdisc add dev swp0 root handle 1: \ mqprio num_tc 8 map 0 1 2 3 4 5 6 7 \ queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 hw 0 $ tc qdisc replace dev swp0 parent 1:1 \ taprio num_tc 8 map 0 1 2 3 4 5 6 7 \ queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 base-time 0 \ sched-entry S 0x7f 990000 sched-entry S 0x80 100000 \ flags 0x0 clockid CLOCK_TAI Unable to handle kernel paging request at virtual address fffffffffffffff8 [fffffffffffffff8] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 96000004 [#1] PREEMPT SMP Call trace: taprio_dump+0x27c/0x310 vsc9959_port_setup_tc+0x1f4/0x460 felix_port_setup_tc+0x24/0x3c dsa_slave_setup_tc+0x54/0x27c taprio_disable_offload.isra.0+0x58/0xe0 taprio_destroy+0x80/0x104 qdisc_create+0x240/0x470 tc_modify_qdisc+0x1fc/0x6b0 rtnetlink_rcv_msg+0x12c/0x390 netlink_rcv_skb+0x5c/0x130 rtnetlink_rcv+0x1c/0x2c Fix this by keeping track of the operations we made, and undo the offload only if we actually did it. I've added "bool offloaded" inside a 4 byte hole between "int clockid" and "atomic64_t picos_per_byte". Now the first cache line looks like below: $ pahole -C taprio_sched net/sched/sch_taprio.o struct taprio_sched { struct Qdisc * * qdiscs; /* 0 8 */ struct Qdisc * root; /* 8 8 */ u32 flags; /* 16 4 */ enum tk_offsets tk_offset; /* 20 4 */ int clockid; /* 24 4 */ bool offloaded; /* 28 1 */ /* XXX 3 bytes hole, try to pack */ atomic64_t picos_per_byte; /* 32 0 */ /* XXX 8 bytes hole, try to pack */ spinlock_t current_entry_lock; /* 40 0 */ /* XXX 8 bytes hole, try to pack */ struct sched_entry * current_entry; /* 48 8 */ struct sched_gate_list * oper_sched; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ Fixes: 9c66d1564676 ("taprio: Add support for hardware offloading") Signed-off-by: Vladimir Oltean Reviewed-by: Vinicius Costa Gomes Signed-off-by: Jakub Kicinski net/sched/sch_taprio.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 76dd07281338da6951fdab3432ced843fa87839c Author: Ido Schimmel Date: Fri Sep 16 11:48:21 2022 +0300 ipv6: Fix crash when IPv6 is administratively disabled The global 'raw_v6_hashinfo' variable can be accessed even when IPv6 is administratively disabled via the 'ipv6.disable=1' kernel command line option, leading to a crash [1]. Fix by restoring the original behavior and always initializing the variable, regardless of IPv6 support being administratively disabled or not. [1] BUG: unable to handle page fault for address: ffffffffffffffc8 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 173e18067 P4D 173e18067 PUD 173e1a067 PMD 0 Oops: 0000 [#1] PREEMPT SMP KASAN CPU: 3 PID: 271 Comm: ss Not tainted 6.0.0-rc4-custom-00136-g0727a9a5fbc1 #1396 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-1.fc36 04/01/2014 RIP: 0010:raw_diag_dump+0x310/0x7f0 [...] Call Trace: __inet_diag_dump+0x10f/0x2e0 netlink_dump+0x575/0xfd0 __netlink_dump_start+0x67b/0x940 inet_diag_handler_cmd+0x273/0x2d0 sock_diag_rcv_msg+0x317/0x440 netlink_rcv_skb+0x15e/0x430 sock_diag_rcv+0x2b/0x40 netlink_unicast+0x53b/0x800 netlink_sendmsg+0x945/0xe60 ____sys_sendmsg+0x747/0x960 ___sys_sendmsg+0x13a/0x1e0 __sys_sendmsg+0x118/0x1e0 do_syscall_64+0x34/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Fixes: 0daf07e52709 ("raw: convert raw sockets to RCU") Reported-by: Roberto Ricci Tested-by: Roberto Ricci Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20220916084821.229287-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski net/ipv6/af_inet6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5641c751fe2f92d3d9e8a8e03c1263ac8caa0b42 Author: Vladimir Oltean Date: Fri Sep 16 16:32:09 2022 +0300 net: enetc: deny offload of tc-based TSN features on VF interfaces TSN features on the ENETC (taprio, cbs, gate, police) are configured through a mix of command BD ring messages and port registers: enetc_port_rd(), enetc_port_wr(). Port registers are a region of the ENETC memory map which are only accessible from the PCIe Physical Function. They are not accessible from the Virtual Functions. Moreover, attempting to access these registers crashes the kernel: $ echo 1 > /sys/bus/pci/devices/0000\:00\:00.0/sriov_numvfs pci 0000:00:01.0: [1957:ef00] type 00 class 0x020001 fsl_enetc_vf 0000:00:01.0: Adding to iommu group 15 fsl_enetc_vf 0000:00:01.0: enabling device (0000 -> 0002) fsl_enetc_vf 0000:00:01.0 eno0vf0: renamed from eth0 $ tc qdisc replace dev eno0vf0 root taprio num_tc 8 map 0 1 2 3 4 5 6 7 \ queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 base-time 0 \ sched-entry S 0x7f 900000 sched-entry S 0x80 100000 flags 0x2 Unable to handle kernel paging request at virtual address ffff800009551a08 Internal error: Oops: 96000007 [#1] PREEMPT SMP pc : enetc_setup_tc_taprio+0x170/0x47c lr : enetc_setup_tc_taprio+0x16c/0x47c Call trace: enetc_setup_tc_taprio+0x170/0x47c enetc_setup_tc+0x38/0x2dc taprio_change+0x43c/0x970 taprio_init+0x188/0x1e0 qdisc_create+0x114/0x470 tc_modify_qdisc+0x1fc/0x6c0 rtnetlink_rcv_msg+0x12c/0x390 Split enetc_setup_tc() into separate functions for the PF and for the VF drivers. Also remove enetc_qos.o from being included into enetc-vf.ko, since it serves absolutely no purpose there. Fixes: 34c6adf1977b ("enetc: Configure the Time-Aware Scheduler via tc-taprio offload") Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220916133209.3351399-2-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/enetc/Makefile | 1 - drivers/net/ethernet/freescale/enetc/enetc.c | 21 +-------------------- drivers/net/ethernet/freescale/enetc/enetc.h | 3 +-- drivers/net/ethernet/freescale/enetc/enetc_pf.c | 21 ++++++++++++++++++++- drivers/net/ethernet/freescale/enetc/enetc_vf.c | 13 ++++++++++++- 5 files changed, 34 insertions(+), 25 deletions(-) commit fed38e64d9b99d65a36c0dbadc3d3f8ddd9ea030 Author: Vladimir Oltean Date: Fri Sep 16 16:32:08 2022 +0300 net: enetc: move enetc_set_psfp() out of the common enetc_set_features() The VF netdev driver shouldn't respond to changes in the NETIF_F_HW_TC flag; only PFs should. Moreover, TSN-specific code should go to enetc_qos.c, which should not be included in the VF driver. Fixes: 79e499829f3f ("net: enetc: add hw tc hw offload features for PSPF capability") Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220916133209.3351399-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/enetc/enetc.c | 32 +----------------------- drivers/net/ethernet/freescale/enetc/enetc.h | 9 +++++-- drivers/net/ethernet/freescale/enetc/enetc_pf.c | 11 +++++++- drivers/net/ethernet/freescale/enetc/enetc_qos.c | 23 +++++++++++++++++ drivers/net/ethernet/freescale/enetc/enetc_vf.c | 4 ++- 5 files changed, 44 insertions(+), 35 deletions(-) commit 0507246d9e7aaac21e14d653eea7111106e6a136 Merge: 589c6eded10c 26c013108c12 Author: Jakub Kicinski Date: Tue Sep 20 11:26:18 2022 -0700 Merge branch 'wireguard-patches-for-6-0-rc6' Jason A. Donenfeld says: ==================== wireguard patches for 6.0-rc6 1) The ratelimiter timing test doesn't help outside of development, yet it is currently preventing the module from being inserted on some kernels when it flakes at insertion time. So we disable it. 2) A fix for a build error on UML, caused by a recent change in a different tree. 3) A WARN_ON() is triggered by Kees' new fortified memcpy() patch, due to memcpy()ing over a sockaddr pointer with the size of a sockaddr_in[6]. The type safe fix is pretty simple. Given how classic of a thing sockaddr punning is, I suspect this may be the first in a few patches like this throughout the net tree, once Kees' fortify series is more widely deployed (current it's just in next). ==================== Link: https://lore.kernel.org/r/20220916143740.831881-1-Jason@zx2c4.com Signed-off-by: Jakub Kicinski commit 26c013108c12b94bc023bf19198a4300596c98b1 Author: Jason A. Donenfeld Date: Fri Sep 16 15:37:40 2022 +0100 wireguard: netlink: avoid variable-sized memcpy on sockaddr Doing a variable-sized memcpy is slower, and the compiler isn't smart enough to turn this into a constant-size assignment. Further, Kees' latest fortified memcpy will actually bark, because the destination pointer is type sockaddr, not explicitly sockaddr_in or sockaddr_in6, so it thinks there's an overflow: memcpy: detected field-spanning write (size 28) of single field "&endpoint.addr" at drivers/net/wireguard/netlink.c:446 (size 16) Fix this by just assigning by using explicit casts for each checked case. Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Signed-off-by: Jason A. Donenfeld Reviewed-by: Kees Cook Reported-by: syzbot+a448cda4dba2dac50de5@syzkaller.appspotmail.com Signed-off-by: Jakub Kicinski drivers/net/wireguard/netlink.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 8e25c02b8cce7063ae9f08cad51d246a60370bc9 Author: Jason A. Donenfeld Date: Fri Sep 16 15:37:39 2022 +0100 wireguard: selftests: do not install headers on UML Since 1b620d539ccc ("kbuild: disable header exports for UML in a straightforward way"), installing headers fails on UML, so just disable installing them, since they're not needed anyway on the architecture. Fixes: b438b3b8d6e6 ("wireguard: selftests: support UML") Signed-off-by: Jason A. Donenfeld Signed-off-by: Jakub Kicinski tools/testing/selftests/wireguard/qemu/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 684dec3cf45da2b0848298efae4adf3b2aeafeda Author: Jason A. Donenfeld Date: Fri Sep 16 15:37:38 2022 +0100 wireguard: ratelimiter: disable timings test by default A previous commit tried to make the ratelimiter timings test more reliable but in the process made it less reliable on other configurations. This is an impossible problem to solve without increasingly ridiculous heuristics. And it's not even a problem that actually needs to be solved in any comprehensive way, since this is only ever used during development. So just cordon this off with a DEBUG_ ifdef, just like we do for the trie's randomized tests, so it can be enabled while hacking on the code, and otherwise disabled in CI. In the process we also revert 151c8e499f47. Fixes: 151c8e499f47 ("wireguard: ratelimiter: use hrtimer in selftest") Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Signed-off-by: Jason A. Donenfeld Signed-off-by: Jakub Kicinski drivers/net/wireguard/selftest/ratelimiter.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 589c6eded10c77a12b7b2cf235b6b19a2bdb91fa Author: Íñigo Huguet Date: Thu Sep 15 16:19:58 2022 +0200 sfc/siena: fix null pointer dereference in efx_hard_start_xmit Like in previous patch for sfc, prevent potential (but unlikely) NULL pointer dereference. Fixes: 12804793b17c ("sfc: decouple TXQ type from label") Reported-by: Tianhao Zhao Signed-off-by: Íñigo Huguet Link: https://lore.kernel.org/r/20220915141958.16458-1-ihuguet@redhat.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/siena/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 974bb793aded499491246f6f9826e26c2b127320 Author: Íñigo Huguet Date: Thu Sep 15 16:16:53 2022 +0200 sfc/siena: fix TX channel offset when using legacy interrupts As in previous commit for sfc, fix TX channels offset when efx_siena_separate_tx_channels is false (the default) Fixes: 25bde571b4a8 ("sfc/siena: fix wrong tx channel offset with efx_separate_tx_channels") Reported-by: Tianhao Zhao Signed-off-by: Íñigo Huguet Link: https://lore.kernel.org/r/20220915141653.15504-1-ihuguet@redhat.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/siena/efx_channels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60891ec99e141b74544d11e897a245ef06263052 Merge: 84a31938831f 2dd7e7bc0282 Author: Linus Torvalds Date: Tue Sep 20 10:23:24 2022 -0700 Merge tag 'for-6.0-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - two fixes for hangs in the umount sequence where threads depend on each other and the work must be finished in the right order - in zoned mode, wait for flushing all block group metadata IO before finishing the zone * tag 'for-6.0-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: zoned: wait for extent buffer IOs before finishing a zone btrfs: fix hang during unmount when stopping a space reclaim worker btrfs: fix hang during unmount when stopping block group reclaim worker commit 84a31938831f6d2338ceffe630a1271ec2a51a59 Merge: f489921dba46 f52d74b190f8 Author: Linus Torvalds Date: Tue Sep 20 10:08:37 2022 -0700 Merge tag 'fs.fixes.v6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull vfs fix from Christian Brauner: "Beginning of the merge window we introduced the vfs{g,u}id_t types in b27c82e12965 ("attr: port attribute changes to new types") and changed various codepaths over including chown_common(). When userspace passes -1 for an ownership change the ownership fields in struct iattr stay uninitialized. Usually this is fine because any code making use of any fields in struct iattr must check the ->ia_valid field whether the value of interest has been initialized. That's true for all struct iattr passing code. However, over the course of the last year with more heavy use of KMSAN we found quite a few places that got this wrong. A recent one I fixed was 3cb6ee991496 ("9p: only copy valid iattrs in 9P2000.L setattr implementation"). But we also have LSM hooks. Actually we have two. The first one is security_inode_setattr() in notify_change() which does the right thing and passes the full struct iattr down to LSMs and thus LSMs can check whether it is initialized. But then we also have security_path_chown() which passes down a path argument and the target ownership as the filesystem would see it. For the latter we now generate the target values based on struct iattr and pass it down. However, when userspace passes -1 then struct iattr isn't initialized. This patch simply initializes ->ia_vfs{g,u}id with INVALID_VFS{G,U}ID so the hook continue to see invalid ownership when -1 is passed from userspace. The only LSM that cares about the actual values is Tomoyo. The vfs codepaths don't look at these fields without ->ia_valid being set so there's no harm in initializing ->ia_vfs{g,u}id. Arguably this is also safer since we can't end up copying valid ownership values when invalid ownership values should be passed. This only affects mainline. No kernel has been released with this and thus no backport is needed. The commit is thus marked with a Fixes: tag but annotated with "# mainline only" (I didn't quite remember what Greg said about how to tell stable autoselect to not bother with fixes for mainline only)" * tag 'fs.fixes.v6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: open: always initialize ownership fields commit 7da5b13dccd99cfdc42940fc7adcb88647023292 Author: Guilherme G. Piccoli Date: Fri Sep 9 16:42:14 2022 -0300 efi: efibc: Guard against allocation failure There is a single kmalloc in this driver, and it's not currently guarded against allocation failure. Do it here by just bailing-out the reboot handler, in case this tentative allocation fails. Fixes: 416581e48679 ("efi: efibc: avoid efivar API for setting variables") Signed-off-by: Guilherme G. Piccoli Signed-off-by: Ard Biesheuvel drivers/firmware/efi/efibc.c | 3 +++ 1 file changed, 3 insertions(+) commit f489921dba468b3d208a5234dcbf7f21a615f395 Merge: 521a547ced64 33a2d6bc3480 Author: Linus Torvalds Date: Tue Sep 20 08:38:55 2022 -0700 Merge tag 'execve-v6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull execve reverts from Kees Cook: "The recent work to support time namespace unsharing turns out to have some undesirable corner cases, so rather than allowing the API to stay exposed for another release, it'd be best to remove it ASAP, with the replacement getting another cycle of testing. Nothing is known to use this yet, so no userspace breakage is expected. For more details, see: https://lore.kernel.org/lkml/ed418e43ad28b8688cfea2b7c90fce1c@ispras.ru Summary: - Remove the recent 'unshare time namespace on vfork+exec' feature (Andrei Vagin)" * tag 'execve-v6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: Revert "fs/exec: allow to unshare a time namespace on vfork+exec" Revert "selftests/timens: add a test for vfork+exit" commit d547c1b717fc5a1e062307e1efdf81590ba9f6c1 Author: Tetsuo Handa Date: Wed Sep 14 18:51:54 2022 +0900 net: clear msg_get_inq in __get_compat_msghdr() syzbot is still complaining uninit-value in tcp_recvmsg(), for commit 1228b34c8d0ecf6d ("net: clear msg_get_inq in __sys_recvfrom() and __copy_msghdr_from_user()") missed that __get_compat_msghdr() is called instead of copy_msghdr_from_user() when MSG_CMSG_COMPAT is specified. Signed-off-by: Tetsuo Handa Fixes: 1228b34c8d0ecf6d ("net: clear msg_get_inq in __sys_recvfrom() and __copy_msghdr_from_user()") Reviewed-by: Jens Axboe Link: https://lore.kernel.org/r/d06d0f7f-696c-83b4-b2d5-70b5f2730a37@I-love.SAKURA.ne.jp Signed-off-by: Jakub Kicinski net/compat.c | 1 + 1 file changed, 1 insertion(+) commit 68fe503c2b8065791c98979790a7b91e198d3006 Merge: cf412ec33325 2b5a8c8f59d9 Author: Jakub Kicinski Date: Tue Sep 20 08:22:20 2022 -0700 Merge branch 'ipmr-always-call-ip-6-_mr_forward-from-rcu-read-side-critical-section' Ido Schimmel says: ==================== ipmr: Always call ip{,6}_mr_forward() from RCU read-side critical section Patch #1 fixes a bug in ipmr code. Patch #2 adds corresponding test cases. ==================== Link: https://lore.kernel.org/r/20220914075339.4074096-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit 2b5a8c8f59d9dff49f273bafbde57d5a7dc2706a Author: Ido Schimmel Date: Wed Sep 14 10:53:39 2022 +0300 selftests: forwarding: Add test cases for unresolved multicast routes Add IPv4 and IPv6 test cases for unresolved multicast routes, testing that queued packets are forwarded after installing a matching (S, G) route. The test cases can be used to reproduce the bugs fixed in "ipmr: Always call ip{,6}_mr_forward() from RCU read-side critical section". Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski .../selftests/net/forwarding/router_multicast.sh | 92 +++++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-) commit b07a9b26e2b1aa3711fd6935eccb08a463b1fb11 Author: Ido Schimmel Date: Wed Sep 14 10:53:38 2022 +0300 ipmr: Always call ip{,6}_mr_forward() from RCU read-side critical section These functions expect to be called from RCU read-side critical section, but this only happens when invoked from the data path via ip{,6}_mr_input(). They can also be invoked from process context in response to user space adding a multicast route which resolves a cache entry with queued packets [1][2]. Fix by adding missing rcu_read_lock() / rcu_read_unlock() in these call paths. [1] WARNING: suspicious RCU usage 6.0.0-rc3-custom-15969-g049d233c8bcc-dirty #1387 Not tainted ----------------------------- net/ipv4/ipmr.c:84 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by smcrouted/246: #0: ffffffff862389b0 (rtnl_mutex){+.+.}-{3:3}, at: ip_mroute_setsockopt+0x11c/0x1420 stack backtrace: CPU: 0 PID: 246 Comm: smcrouted Not tainted 6.0.0-rc3-custom-15969-g049d233c8bcc-dirty #1387 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-1.fc36 04/01/2014 Call Trace: dump_stack_lvl+0x91/0xb9 vif_dev_read+0xbf/0xd0 ipmr_queue_xmit+0x135/0x1ab0 ip_mr_forward+0xe7b/0x13d0 ipmr_mfc_add+0x1a06/0x2ad0 ip_mroute_setsockopt+0x5c1/0x1420 do_ip_setsockopt+0x23d/0x37f0 ip_setsockopt+0x56/0x80 raw_setsockopt+0x219/0x290 __sys_setsockopt+0x236/0x4d0 __x64_sys_setsockopt+0xbe/0x160 do_syscall_64+0x34/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd [2] WARNING: suspicious RCU usage 6.0.0-rc3-custom-15969-g049d233c8bcc-dirty #1387 Not tainted ----------------------------- net/ipv6/ip6mr.c:69 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by smcrouted/246: #0: ffffffff862389b0 (rtnl_mutex){+.+.}-{3:3}, at: ip6_mroute_setsockopt+0x6b9/0x2630 stack backtrace: CPU: 1 PID: 246 Comm: smcrouted Not tainted 6.0.0-rc3-custom-15969-g049d233c8bcc-dirty #1387 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-1.fc36 04/01/2014 Call Trace: dump_stack_lvl+0x91/0xb9 vif_dev_read+0xbf/0xd0 ip6mr_forward2.isra.0+0xc9/0x1160 ip6_mr_forward+0xef0/0x13f0 ip6mr_mfc_add+0x1ff2/0x31f0 ip6_mroute_setsockopt+0x1825/0x2630 do_ipv6_setsockopt+0x462/0x4440 ipv6_setsockopt+0x105/0x140 rawv6_setsockopt+0xd8/0x690 __sys_setsockopt+0x236/0x4d0 __x64_sys_setsockopt+0xbe/0x160 do_syscall_64+0x34/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: ebc3197963fc ("ipmr: add rcu protection over (struct vif_device)->dev") Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski net/ipv4/ipmr.c | 2 ++ net/ipv6/ip6mr.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit cf412ec333250cb82bafe57169204e14a9f1c2ac Author: Alex Elder Date: Tue Sep 13 15:46:02 2022 -0500 net: ipa: properly limit modem routing table use IPA can route packets between IPA-connected entities. The AP and modem are currently the only such entities supported, and no routing is required to transfer packets between them. The number of entries in each routing table is fixed, and defined at initialization time. Some of these entries are designated for use by the modem, and the rest are available for the AP to use. The AP sends a QMI message to the modem which describes (among other things) information about routing table memory available for the modem to use. Currently the QMI initialization packet gives wrong information in its description of routing tables. What *should* be supplied is the maximum index that the modem can use for the routing table memory located at a given location. The current code instead supplies the total *number* of routing table entries. Furthermore, the modem is granted the entire table, not just the subset it's supposed to use. This patch fixes this. First, the ipa_mem_bounds structure is generalized so its "end" field can be interpreted either as a final byte offset, or a final array index. Second, the IPv4 and IPv6 (non-hashed and hashed) table information fields in the QMI ipa_init_modem_driver_req structure are changed to be ipa_mem_bounds rather than ipa_mem_array structures. Third, we set the "end" value for each routing table to be the last index, rather than setting the "count" to be the number of indices. Finally, instead of allowing the modem to use all of a routing table's memory, it is limited to just the portion meant to be used by the modem. In all versions of IPA currently supported, that is IPA_ROUTE_MODEM_COUNT (8) entries. Update a few comments for clarity. Fixes: 530f9216a9537 ("soc: qcom: ipa: AP/modem communications") Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20220913204602.1803004-1-elder@linaro.org Signed-off-by: Jakub Kicinski drivers/net/ipa/ipa_qmi.c | 8 ++++---- drivers/net/ipa/ipa_qmi_msg.c | 8 ++++---- drivers/net/ipa/ipa_qmi_msg.h | 37 +++++++++++++++++++++---------------- drivers/net/ipa/ipa_table.c | 2 -- drivers/net/ipa/ipa_table.h | 3 +++ 5 files changed, 32 insertions(+), 26 deletions(-) commit 1c48709e6d9d353acaaac1d8e33474756b121d78 Author: Liang He Date: Tue Sep 13 20:56:59 2022 +0800 of: mdio: Add of_node_put() when breaking out of for_each_xx In of_mdiobus_register(), we should call of_node_put() for 'child' escaped out of for_each_available_child_of_node(). Fixes: 66bdede495c7 ("of_mdio: Fix broken PHY IRQ in case of probe deferral") Co-developed-by: Miaoqian Lin Signed-off-by: Miaoqian Lin Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220913125659.3331969-1-windhl@126.com Signed-off-by: Jakub Kicinski drivers/net/mdio/of_mdio.c | 1 + 1 file changed, 1 insertion(+) commit d119888b09bd567e07c6b93a07f175df88857e02 Author: Chris Wilson Date: Fri Sep 16 11:24:03 2022 +0200 drm/i915/gem: Really move i915_gem_context.link under ref protection i915_perf assumes that it can use the i915_gem_context reference to protect its i915->gem.contexts.list iteration. However, this requires that we do not remove the context from the list until after we drop the final reference and release the struct. If, as currently, we remove the context from the list during context_close(), the link.next pointer may be poisoned while we are holding the context reference and cause a GPF: [ 4070.573157] i915 0000:00:02.0: [drm:i915_perf_open_ioctl [i915]] filtering on ctx_id=0x1fffff ctx_id_mask=0x1fffff [ 4070.574881] general protection fault, probably for non-canonical address 0xdead000000000100: 0000 [#1] PREEMPT SMP [ 4070.574897] CPU: 1 PID: 284392 Comm: amd_performance Tainted: G E 5.17.9 #180 [ 4070.574903] Hardware name: Intel Corporation NUC7i5BNK/NUC7i5BNB, BIOS BNKBL357.86A.0052.2017.0918.1346 09/18/2017 [ 4070.574907] RIP: 0010:oa_configure_all_contexts.isra.0+0x222/0x350 [i915] [ 4070.574982] Code: 08 e8 32 6e 10 e1 4d 8b 6d 50 b8 ff ff ff ff 49 83 ed 50 f0 41 0f c1 04 24 83 f8 01 0f 84 e3 00 00 00 85 c0 0f 8e fa 00 00 00 <49> 8b 45 50 48 8d 70 b0 49 8d 45 50 48 39 44 24 10 0f 85 34 fe ff [ 4070.574990] RSP: 0018:ffffc90002077b78 EFLAGS: 00010202 [ 4070.574995] RAX: 0000000000000002 RBX: 0000000000000002 RCX: 0000000000000000 [ 4070.575000] RDX: 0000000000000001 RSI: ffffc90002077b20 RDI: ffff88810ddc7c68 [ 4070.575004] RBP: 0000000000000001 R08: ffff888103242648 R09: fffffffffffffffc [ 4070.575008] R10: ffffffff82c50bc0 R11: 0000000000025c80 R12: ffff888101bf1860 [ 4070.575012] R13: dead0000000000b0 R14: ffffc90002077c04 R15: ffff88810be5cabc [ 4070.575016] FS: 00007f1ed50c0780(0000) GS:ffff88885ec80000(0000) knlGS:0000000000000000 [ 4070.575021] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4070.575025] CR2: 00007f1ed5590280 CR3: 000000010ef6f005 CR4: 00000000003706e0 [ 4070.575029] Call Trace: [ 4070.575033] [ 4070.575037] lrc_configure_all_contexts+0x13e/0x150 [i915] [ 4070.575103] gen8_enable_metric_set+0x4d/0x90 [i915] [ 4070.575164] i915_perf_open_ioctl+0xbc0/0x1500 [i915] [ 4070.575224] ? asm_common_interrupt+0x1e/0x40 [ 4070.575232] ? i915_oa_init_reg_state+0x110/0x110 [i915] [ 4070.575290] drm_ioctl_kernel+0x85/0x110 [ 4070.575296] ? update_load_avg+0x5f/0x5e0 [ 4070.575302] drm_ioctl+0x1d3/0x370 [ 4070.575307] ? i915_oa_init_reg_state+0x110/0x110 [i915] [ 4070.575382] ? gen8_gt_irq_handler+0x46/0x130 [i915] [ 4070.575445] __x64_sys_ioctl+0x3c4/0x8d0 [ 4070.575451] ? __do_softirq+0xaa/0x1d2 [ 4070.575456] do_syscall_64+0x35/0x80 [ 4070.575461] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 4070.575467] RIP: 0033:0x7f1ed5c10397 [ 4070.575471] Code: 3c 1c e8 1c ff ff ff 85 c0 79 87 49 c7 c4 ff ff ff ff 5b 5d 4c 89 e0 41 5c c3 66 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a9 da 0d 00 f7 d8 64 89 01 48 [ 4070.575478] RSP: 002b:00007ffd65c8d7a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 4070.575484] RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00007f1ed5c10397 [ 4070.575488] RDX: 00007ffd65c8d7c0 RSI: 0000000040106476 RDI: 0000000000000006 [ 4070.575492] RBP: 00005620972f9c60 R08: 000000000000000a R09: 0000000000000005 [ 4070.575496] R10: 000000000000000d R11: 0000000000000246 R12: 000000000000000a [ 4070.575500] R13: 000000000000000d R14: 0000000000000000 R15: 00007ffd65c8d7c0 [ 4070.575505] [ 4070.575507] Modules linked in: nls_ascii(E) nls_cp437(E) vfat(E) fat(E) i915(E) x86_pkg_temp_thermal(E) intel_powerclamp(E) crct10dif_pclmul(E) crc32_pclmul(E) crc32c_intel(E) aesni_intel(E) crypto_simd(E) intel_gtt(E) cryptd(E) ttm(E) rapl(E) intel_cstate(E) drm_kms_helper(E) cfbfillrect(E) syscopyarea(E) cfbimgblt(E) intel_uncore(E) sysfillrect(E) mei_me(E) sysimgblt(E) i2c_i801(E) fb_sys_fops(E) mei(E) intel_pch_thermal(E) i2c_smbus(E) cfbcopyarea(E) video(E) button(E) efivarfs(E) autofs4(E) [ 4070.575549] ---[ end trace 0000000000000000 ]--- v3: fix incorrect syntax of spin_lock() replacing spin_lock_irqsave() v2: irqsave not required in a worker, neither conversion to irq safe elsewhere (Tvrtko), - perf: it's safe to call gen8_configure_context() even if context has been closed, no need to check, - drop unrelated cleanup (Andi, Tvrtko) Reported-by: Mark Janes Closes: https://gitlab.freedesktop.org/drm/intel/issues/6222 References: a4e7ccdac38e ("drm/i915: Move context management under GEM") Fixes: f8246cf4d9a9 ("drm/i915/gem: Drop free_work for GEM contexts") Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti Signed-off-by: Janusz Krzysztofik Cc: Tvrtko Ursulin Cc: # v5.12+ Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20220916092403.201355-3-janusz.krzysztofik@linux.intel.com (cherry picked from commit ad3aa7c31efa5a09b0dba42e66cfdf77e0db7dc2) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gem/i915_gem_context.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5ce8f7444f8fbb5adee644590c0e4e1890ab004c Author: Janusz Krzysztofik Date: Fri Sep 16 11:24:02 2022 +0200 drm/i915/gem: Flush contexts on driver release Due to i915_perf assuming that it can use the i915_gem_context reference to protect its i915->gem.contexts.list iteration, we need to defer removal of the context from the list until last reference to the context is put. However, there is a risk of triggering kernel warning on contexts list not empty at driver release time if we deleagate that task to a worker for i915_gem_context_release_work(), unless that work is flushed first. Unfortunately, it is not flushed on driver release. Fix it. Instead of additionally calling flush_workqueue(), either directly or via a new dedicated wrapper around it, replace last call to i915_gem_drain_freed_objects() with existing i915_gem_drain_workqueue() that performs both tasks. Fixes: 75eefd82581f ("drm/i915: Release i915_gem_context from a worker") Suggested-by: Chris Wilson Signed-off-by: Janusz Krzysztofik Reviewed-by: Andi Shyti Cc: stable@kernel.org # v5.16+ Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20220916092403.201355-2-janusz.krzysztofik@linux.intel.com (cherry picked from commit 1cec34442408a77ba5396b19725fed2c398005c3) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4c66a326b5ab784cddd72de07ac5b6210e9e1b06 Author: Christoph Hellwig Date: Mon Sep 19 16:40:49 2022 +0200 Revert "block: freeze the queue earlier in del_gendisk" This reverts commit a09b314005f3a0956ebf56e01b3b80339df577cc. Dusty Mabe reported consistent hang during CoreOS shutdown with a MD RAID1 setup. Although apparently similar hangs happened before, and this patch most likely is not the root cause it made it much more severe. Revert it until we can figure out what is going on with the md driver. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220919144049.978907-1-hch@lst.de Signed-off-by: Jens Axboe block/genhd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ab637d48363d7b8ee67ae089808a8bc6051d53c4 Author: Linus Walleij Date: Thu Sep 15 22:32:54 2022 +0200 gpio: ftgpio010: Make irqchip immutable This turns the FTGPIO010 irqchip immutable. Tested on the D-Link DIR-685. Cc: Marc Zyngier Signed-off-by: Linus Walleij Acked-by: Marc Zyngier Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-ftgpio010.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 02743c4091ccfb246f5cdbbe3f44b152d5d12933 Author: Andy Shevchenko Date: Tue Sep 20 16:30:31 2022 +0300 gpio: mockup: Fix potential resource leakage when register a chip If creation of software node fails, the locally allocated string array is left unfreed. Free it on error path. Fixes: 6fda593f3082 ("gpio: mockup: Convert to use software nodes") Cc: stable@vger.kernel.org Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-mockup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b7df41a6f79dfb18ba2203f8c5f0e9c0b9b57f68 Author: Bartosz Golaszewski Date: Tue Sep 20 09:18:41 2022 +0200 gpio: mockup: fix NULL pointer dereference when removing debugfs We now remove the device's debugfs entries when unbinding the driver. This now causes a NULL-pointer dereference on module exit because the platform devices are unregistered *after* the global debugfs directory has been recursively removed. Fix it by unregistering the devices first. Fixes: 303e6da99429 ("gpio: mockup: remove gpio debugfs when remove device") Cc: Wei Yongjun Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-mockup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db4192a754ebd52300a28abe1a50dd18eae0eb12 Author: Cong Wang Date: Mon Sep 12 10:35:53 2022 -0700 tcp: read multiple skbs in tcp_read_skb() Before we switched to ->read_skb(), ->read_sock() was passed with desc.count=1, which technically indicates we only read one skb per ->sk_data_ready() call. However, for TCP, this is not true. TCP at least has sk_rcvlowat which intentionally holds skb's in receive queue until this watermark is reached. This means when ->sk_data_ready() is invoked there could be multiple skb's in the queue, therefore we have to read multiple skbs in tcp_read_skb() instead of one. Fixes: 965b57b469a5 ("net: Introduce a new proto_ops ->read_skb()") Reported-by: Peilin Ye Cc: John Fastabend Cc: Jakub Sitnicki Cc: Eric Dumazet Signed-off-by: Cong Wang Link: https://lore.kernel.org/r/20220912173553.235838-1-xiyou.wangcong@gmail.com Signed-off-by: Paolo Abeni net/ipv4/tcp.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 79764ec772bc1346441ae1c4b1f3bd1991d634e8 Author: Takashi Iwai Date: Tue Sep 20 13:39:29 2022 +0200 Revert "ALSA: usb-audio: Split endpoint setups for hw_params and prepare" This reverts commit ff878b408a03bef5d610b7e2302702e16a53636e. Unfortunately the recent fix seems bringing another regressions with PulseAudio / pipewire, at least for Steinberg and MOTU devices. As a temporary solution, do a straight revert. The issue for Android will be revisited again later by another different fix (if any). Fixes: ff878b408a03 ("ALSA: usb-audio: Split endpoint setups for hw_params and prepare") Cc: BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=216500 Link: https://lore.kernel.org/r/20220920113929.25162-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/endpoint.c | 23 ++++++++++++++--------- sound/usb/endpoint.h | 6 ++---- sound/usb/pcm.c | 14 ++++---------- 3 files changed, 20 insertions(+), 23 deletions(-) commit 90fdd1c1e9c49bcb46cde589dbdee94a6977086a Merge: 807e5eda2078 01b825f997ac Author: Paolo Abeni Date: Tue Sep 20 12:18:08 2022 +0200 Merge branch 'revert-fec-ptp-changes' Francesco Dolcini says: ==================== Revert fec PTP changes Revert the last 2 FEC PTP changes from Csókás Bence, they are causing multiple issues and we are at 6.0-rc5. ==================== Link: https://lore.kernel.org/r/20220912070143.98153-1-francesco.dolcini@toradex.com Signed-off-by: Paolo Abeni commit 01b825f997ac28f1e20309bafbf2068cd77c50a4 Author: Francesco Dolcini Date: Mon Sep 12 09:01:43 2022 +0200 Revert "net: fec: Use a spinlock to guard `fep->ptp_clk_on`" This reverts commit b353b241f1eb9b6265358ffbe2632fdcb563354f, this is creating multiple issues, just not ready to be merged yet. Link: https://lore.kernel.org/all/CAHk-=wj1obPoTu1AHj9Bd_BGYjdjDyPP+vT5WMj8eheb3A9WHw@mail.gmail.com/ Link: https://lore.kernel.org/all/20220907143915.5w65kainpykfobte@pengutronix.de/ Fixes: b353b241f1eb ("net: fec: Use a spinlock to guard `fep->ptp_clk_on`") Signed-off-by: Francesco Dolcini Reviewed-by: Andrew Lunn Tested-by: Marc Kleine-Budde Signed-off-by: Paolo Abeni drivers/net/ethernet/freescale/fec.h | 1 + drivers/net/ethernet/freescale/fec_main.c | 17 ++++++++--------- drivers/net/ethernet/freescale/fec_ptp.c | 28 ++++++++++++++++++---------- 3 files changed, 27 insertions(+), 19 deletions(-) commit 7b15515fc1ca3b320fe37793aaaf6f56cc964ef4 Author: Francesco Dolcini Date: Mon Sep 12 09:01:42 2022 +0200 Revert "fec: Restart PPS after link state change" This reverts commit f79959220fa5fbda939592bf91c7a9ea90419040, this is creating multiple issues, just not ready to be merged yet. Link: https://lore.kernel.org/all/20220905180542.GA3685102@roeck-us.net/ Link: https://lore.kernel.org/all/CAHk-=wj1obPoTu1AHj9Bd_BGYjdjDyPP+vT5WMj8eheb3A9WHw@mail.gmail.com/ Fixes: f79959220fa5 ("fec: Restart PPS after link state change") Signed-off-by: Francesco Dolcini Reviewed-by: Andrew Lunn Tested-by: Marc Kleine-Budde Signed-off-by: Paolo Abeni drivers/net/ethernet/freescale/fec.h | 10 -------- drivers/net/ethernet/freescale/fec_main.c | 42 +++---------------------------- drivers/net/ethernet/freescale/fec_ptp.c | 29 --------------------- 3 files changed, 4 insertions(+), 77 deletions(-) commit 807e5eda2078327d1adaf213cf7d6b3862cad1f4 Author: Rakesh Sankaranarayanan Date: Mon Sep 12 10:42:28 2022 +0530 net: dsa: microchip: lan937x: fix maximum frame length check Maximum frame length check is enabled in lan937x switch on POR, But it is found to be disabled on driver during port setup operation. Due to this, packets are not dropped when transmitted with greater than configured value. For testing, setup made for lan1->lan2 transmission and configured lan1 interface with a frame length (less than 1500 as mentioned in documentation) and transmitted packets with greater than configured value. Expected no packets at lan2 end, but packets observed at lan2. Based on the documentation, packets should get discarded if the actual packet length doesn't match the frame length configured. Frame length check should be disabled only for cascaded ports due to tailtags. This feature was disabled on ksz9477 series due to ptp issue, which is not in lan937x series. But since lan937x took ksz9477 as base, frame length check disabled here as well. Patch added to remove this portion from port setup so that maximum frame length check will be active for normal ports. Fixes: 55ab6ffaf378 ("net: dsa: microchip: add DSA support for microchip LAN937x") Signed-off-by: Rakesh Sankaranarayanan Link: https://lore.kernel.org/r/20220912051228.1306074-1-rakesh.sankaranarayanan@microchip.com Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/lan937x_main.c | 4 ---- 1 file changed, 4 deletions(-) commit f52d74b190f8d10ec01cd5774eca77c2186c8ab7 Author: Tetsuo Handa Date: Mon Sep 19 20:05:12 2022 +0900 open: always initialize ownership fields Beginning of the merge window we introduced the vfs{g,u}id_t types in b27c82e12965 ("attr: port attribute changes to new types") and changed various codepaths over including chown_common(). During that change we forgot to account for the case were the passed ownership value is -1. In this case the ownership fields in struct iattr aren't initialized but we rely on them being initialized by the time we generate the ownership to pass down to the LSMs. All the major LSMs don't care about the ownership values at all. Only Tomoyo uses them and so it took a while for syzbot to unearth this issue. Fix this by initializing the ownership fields and do it within the retry_deleg block. While notify_change() doesn't alter the ownership fields currently we shouldn't rely on it. Since no kernel has been released with these changes this does not needed to be backported to any stable kernels. [Christian Brauner (Microsoft) ] * rewrote commit message * use INVALID_VFS{G,U}ID macros Fixes: b27c82e12965 ("attr: port attribute changes to new types") # mainline only Reported-and-tested-by: syzbot+541e21dcc32c4046cba9@syzkaller.appspotmail.com Signed-off-by: Tetsuo Handa Reviewed-by: Seth Forshee (DigitalOcean) Signed-off-by: Christian Brauner (Microsoft) fs/open.c | 2 ++ 1 file changed, 2 insertions(+) commit d8a79c03054911c375a2252627a429c9bc4615b6 Author: Randy Dunlap Date: Mon May 30 19:55:57 2022 -0700 drm/hisilicon: Add depends on MMU The Kconfig symbol depended on MMU but was dropped by the commit acad3fe650a5 ("drm/hisilicon: Removed the dependency on the mmu") because it already had as a dependency ARM64 that already selects MMU. But later, commit a0f25a6bb319 ("drm/hisilicon/hibmc: Allow to be built if COMPILE_TEST is enabled") allowed the driver to be built for non-ARM64 when COMPILE_TEST is set but that could lead to unmet direct dependencies and linking errors. Prevent a kconfig warning when MMU is not enabled by making DRM_HISI_HIBMC depend on MMU. WARNING: unmet direct dependencies detected for DRM_TTM Depends on [n]: HAS_IOMEM [=y] && DRM [=m] && MMU [=n] Selected by [m]: - DRM_TTM_HELPER [=m] && HAS_IOMEM [=y] && DRM [=m] - DRM_HISI_HIBMC [=m] && HAS_IOMEM [=y] && DRM [=m] && PCI [=y] && (ARM64 || COMPILE_TEST [=y]) Fixes: acad3fe650a5 ("drm/hisilicon: Removed the dependency on the mmu") Signed-off-by: Randy Dunlap Cc: Gerd Hoffmann Cc: Thomas Zimmermann Cc: Xinliang Liu Cc: Tian Tao Cc: John Stultz Cc: Xinwei Kong Cc: Chen Feng Cc: Christian Koenig Cc: Huang Rui Cc: David Airlie Cc: Daniel Vetter Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20220531025557.29593-1-rdunlap@infradead.org drivers/gpu/drm/hisilicon/hibmc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5415bec18c69d3aaa7d4e3b170c8b8c6bb24a823 Author: Thomas Zimmermann Date: Thu Sep 15 17:03:48 2022 +0200 drm/mgag200: Force 32 bpp on the console G200ER does not seem to support 24 bpp, so force the console to use 32 bpp. The problem got introduced when commit 73f54d5d9682 ("drm/mgag200: Remove special case for G200SE with <2 MiB") changed the preferred color depth from 32 bit to 24 bit. A setting of 24 is the correct color depth, but G200ER doesn't seem to be able to use the respective RGB888 color format. Using 24-bit color with forced 32 bpp works around the problem. Reported-by: Wang Yugui Signed-off-by: Thomas Zimmermann Tested-by: Wang Yugui Reviewed-by: Jocelyn Falempe Fixes: 73f54d5d9682 ("drm/mgag200: Remove special case for G200SE with <2 MiB") Cc: Thomas Zimmermann Cc: Jocelyn Falempe Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20220915150348.31504-1-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8ccac4edc8da764389d4fc18b1df740892006557 Author: Shailend Chand Date: Mon Sep 12 17:09:01 2022 -0700 gve: Fix GFP flags when allocing pages Use GFP_ATOMIC when allocating pages out of the hotpath, continue to use GFP_KERNEL when allocating pages during setup. GFP_KERNEL will allow blocking which allows it to succeed more often in a low memory enviornment but in the hotpath we do not want to allow the allocation to block. Fixes: 9b8dd5e5ea48b ("gve: DQO: Add RX path") Signed-off-by: Shailend Chand Signed-off-by: Jeroen de Borst Link: https://lore.kernel.org/r/20220913000901.959546-1-jeroendb@google.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/google/gve/gve_rx_dqo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae8ffba8baad651af706538e8c47d0a049d406c6 Author: Vadim Fedorenko Date: Fri Sep 16 02:49:32 2022 +0300 bnxt_en: fix flags to check for supported fw version The warning message of unsupported FW appears every time RX timestamps are disabled on the interface. The patch fixes the flags to correct set for the check. Fixes: 66ed81dcedc6 ("bnxt_en: Enable packet timestamping for all RX packets") Cc: Richard Cochran Signed-off-by: Vadim Fedorenko Reviewed-by: Andy Gospodarek Reviewed-by: Michael Chan Link: https://lore.kernel.org/r/20220915234932.25497-1-vfedorenko@novek.ru Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 094cc3b649e27b43afb9bc44d3417668c3d53e19 Merge: 0ee513c77369 781b80f452fc Author: Jakub Kicinski Date: Mon Sep 19 18:17:22 2022 -0700 Merge tag 'wireless-2022-09-19' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Kalle Valo says: ==================== wireless fixes for v6.0 Late stage fixes for v6.0. Temporarily mark iwlwifi's mei code broken as it breaks suspend for iwd users and also don't spam nss trimming messages. mt76 has fixes for aggregation sequence numbers and a regression related to the VHT extended NSS BW feature. * tag 'wireless-2022-09-19' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: mt76: fix 5 GHz connection regression on mt76x0/mt76x2 wifi: mt76: fix reading current per-tid starting sequence number for aggregation wifi: iwlwifi: Mark IWLMEI as broken wifi: iwlwifi: don't spam logs with NSS>2 messages ==================== Link: https://lore.kernel.org/r/20220919105003.1EAE7C433B5@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 0ee513c773695e6fa6b615b24539f2a59c7c1f06 Merge: 0a242eb2913a b1cb8a71f1ea Author: Jakub Kicinski Date: Mon Sep 19 18:13:43 2022 -0700 Merge tag 'batadv-net-pullrequest-20220916' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here is a batman-adv bugfix: - Fix hang up with small MTU hard-interface, by Shigeru Yoshida * tag 'batadv-net-pullrequest-20220916' of git://git.open-mesh.org/linux-merge: batman-adv: Fix hang up with small MTU hard-interface ==================== Link: https://lore.kernel.org/r/20220916160931.1412407-1-sw@simonwunderlich.de Signed-off-by: Jakub Kicinski commit 0a242eb2913a4aa3d6fbdb86559f27628e9466f3 Author: Íñigo Huguet Date: Wed Sep 14 13:11:35 2022 +0200 sfc: fix null pointer dereference in efx_hard_start_xmit Trying to get the channel from the tx_queue variable here is wrong because we can only be here if tx_queue is NULL, so we shouldn't dereference it. As the above comment in the code says, this is very unlikely to happen, but it's wrong anyway so let's fix it. I hit this issue because of a different bug that caused tx_queue to be NULL. If that happens, this is the error message that we get here: BUG: unable to handle kernel NULL pointer dereference at 0000000000000020 [...] RIP: 0010:efx_hard_start_xmit+0x153/0x170 [sfc] Fixes: 12804793b17c ("sfc: decouple TXQ type from label") Reported-by: Tianhao Zhao Signed-off-by: Íñigo Huguet Acked-by: Edward Cree Link: https://lore.kernel.org/r/20220914111135.21038-1-ihuguet@redhat.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f232af4295653afa4ade3230462b3be15ad16419 Author: Íñigo Huguet Date: Wed Sep 14 12:36:48 2022 +0200 sfc: fix TX channel offset when using legacy interrupts In legacy interrupt mode the tx_channel_offset was hardcoded to 1, but that's not correct if efx_sepparate_tx_channels is false. In that case, the offset is 0 because the tx queues are in the single existing channel at index 0, together with the rx queue. Without this fix, as soon as you try to send any traffic, it tries to get the tx queues from an uninitialized channel getting these errors: WARNING: CPU: 1 PID: 0 at drivers/net/ethernet/sfc/tx.c:540 efx_hard_start_xmit+0x12e/0x170 [sfc] [...] RIP: 0010:efx_hard_start_xmit+0x12e/0x170 [sfc] [...] Call Trace: dev_hard_start_xmit+0xd7/0x230 sch_direct_xmit+0x9f/0x360 __dev_queue_xmit+0x890/0xa40 [...] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020 [...] RIP: 0010:efx_hard_start_xmit+0x153/0x170 [sfc] [...] Call Trace: dev_hard_start_xmit+0xd7/0x230 sch_direct_xmit+0x9f/0x360 __dev_queue_xmit+0x890/0xa40 [...] Fixes: c308dfd1b43e ("sfc: fix wrong tx channel offset with efx_separate_tx_channels") Reported-by: Tianhao Zhao Signed-off-by: Íñigo Huguet Acked-by: Edward Cree Link: https://lore.kernel.org/r/20220914103648.16902-1-ihuguet@redhat.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/efx_channels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95b9fd760b7a32f738f225ec041c980e7941c73a Merge: 5e69163d3b99 35e60f1aadf6 Author: Jakub Kicinski Date: Mon Sep 19 18:01:04 2022 -0700 Merge tag 'for-net-2022-09-09' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - Fix HCIGETDEVINFO regression * tag 'for-net-2022-09-09' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: Fix HCIGETDEVINFO regression ==================== Link: https://lore.kernel.org/r/20220909201642.3810565-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 5e69163d3b9931098922b3fc2f8e786af8c1f37e Author: Lorenzo Bianconi Date: Tue Sep 13 15:03:05 2022 +0200 net: ethernet: mtk_eth_soc: enable XDP support just for MT7986 SoC Disable page_pool/XDP support for MT7621 SoC in order fix a regression introduce adding XDP for MT7986 SoC. There is no a real use case for XDP on MT7621 since it is a low-end cpu. Moreover this patch reduces the memory footprint. Tested-by: Sergio Paracuellos Tested-by: Arınç ÜNAL Fixes: 23233e577ef9 ("net: ethernet: mtk_eth_soc: rely on page_pool for single page buffers") Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/2bf31e27b888c43228b0d84dd2ef5033338269e2.1663074002.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fd2c68da55c552f86e401ebe40c4a619025ef69 Author: Haiyang Zhang Date: Sun Sep 11 13:40:05 2022 -0700 net: mana: Add rmb after checking owner bits Per GDMA spec, rmb is necessary after checking owner_bits, before reading EQ or CQ entries. Add rmb in these two places to comply with the specs. Cc: stable@vger.kernel.org Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)") Reported-by: Sinan Kaya Signed-off-by: Haiyang Zhang Reviewed-by: Dexuan Cui Link: https://lore.kernel.org/r/1662928805-15861-1-git-send-email-haiyangz@microsoft.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/microsoft/mana/gdma_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 6fb2dbdb26893b6423cbf419a56a85d824619fd8 Author: Jeroen de Borst Date: Tue Sep 13 11:53:19 2022 -0700 MAINTAINERS: gve: update developers Updating active developers. Signed-off-by: Jeroen de Borst Link: https://lore.kernel.org/r/20220913185319.1061909-1-jeroendb@google.com Signed-off-by: Jakub Kicinski MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 34513ada53eb3e3f711250d8dbc2de4de493d510 Author: Ido Schimmel Date: Fri Sep 9 18:38:30 2022 +0300 netdevsim: Fix hwstats debugfs file permissions The hwstats debugfs files are only writeable, but they are created with read and write permissions, causing certain selftests to fail [1]. Fix by creating the files with write permission only. [1] # ./test_offload.py Test destruction of generic XDP... Traceback (most recent call last): File "/home/idosch/code/linux/tools/testing/selftests/bpf/./test_offload.py", line 810, in simdev = NetdevSimDev() [...] Exception: Command failed: cat /sys/kernel/debug/netdevsim/netdevsim0//ports/0/dev/hwstats/l3/disable_ifindex cat: /sys/kernel/debug/netdevsim/netdevsim0//ports/0/dev/hwstats/l3/disable_ifindex: Invalid argument Fixes: 1a6d7ae7d63c ("netdevsim: Introduce support for L3 offload xstats") Reported-by: Jie2x Zhou Tested-by: Jie2x Zhou Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Link: https://lore.kernel.org/r/20220909153830.3732504-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/netdevsim/hwstats.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 198eb7e1b81d8ba676d0f4f120c092032ae69a8e Author: Michal Jaron Date: Thu Sep 1 09:49:33 2022 +0200 i40e: Fix set max_tx_rate when it is lower than 1 Mbps While converting max_tx_rate from bytes to Mbps, this value was set to 0, if the original value was lower than 125000 bytes (1 Mbps). This would cause no transmission rate limiting to occur. This happened due to lack of check of max_tx_rate against the 1 Mbps value for max_tx_rate and the following division by 125000. Fix this issue by adding a helper i40e_bw_bytes_to_mbits() which sets max_tx_rate to minimum usable value of 50 Mbps, if its value is less than 1 Mbps, otherwise do the required conversion by dividing by 125000. Fixes: 5ecae4120a6b ("i40e: Refactor VF BW rate limiting") Signed-off-by: Michal Jaron Signed-off-by: Andrii Staikov Tested-by: Bharathi Sreenivas Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e_main.c | 32 +++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) commit 372539def2824c43b6afe2403045b140f65c5acc Author: Michal Jaron Date: Tue Sep 13 15:38:36 2022 +0200 i40e: Fix VF set max MTU size Max MTU sent to VF is set to 0 during memory allocation. It cause that max MTU on VF is changed to IAVF_MAX_RXBUFFER and does not depend on data from HW. Set max_mtu field in virtchnl_vf_resource struct to inform VF in GET_VF_RESOURCES msg what size should be max frame. Fixes: dab86afdbbd1 ("i40e/i40evf: Change the way we limit the maximum frame size for Rx") Signed-off-by: Michal Jaron Signed-off-by: Mateusz Palczewski Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 399c98c4dc50b7eb7e9f24da7ffdda6f025676ef Author: Michal Jaron Date: Tue Sep 13 15:38:35 2022 +0200 iavf: Fix set max MTU size with port VLAN and jumbo frames After setting port VLAN and MTU to 9000 on VF with ice driver there was an iavf error "PF returned error -5 (IAVF_ERR_PARAM) to our request 6". During queue configuration, VF's max packet size was set to IAVF_MAX_RXBUFFER but on ice max frame size was smaller by VLAN_HLEN due to making some space for port VLAN as VF is not aware whether it's in a port VLAN. This mismatch in sizes caused ice to reject queue configuration with ERR_PARAM error. Proper max_mtu is sent from ice PF to VF with GET_VF_RESOURCES msg but VF does not look at this. In iavf change max_frame from IAVF_MAX_RXBUFFER to max_mtu received from pf with GET_VF_RESOURCES msg to make vf's max_frame_size dependent from pf. Add check if received max_mtu is not in eligible range then set it to IAVF_MAX_RXBUFFER. Fixes: dab86afdbbd1 ("i40e/i40evf: Change the way we limit the maximum frame size for Rx") Signed-off-by: Michal Jaron Signed-off-by: Mateusz Palczewski Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 182447b12144b7be9b63a273d27c5a11bd54960a Author: David Thompson Date: Fri Sep 2 12:42:47 2022 -0400 mlxbf_gige: clear MDIO gateway lock after read The MDIO gateway (GW) lock in BlueField-2 GIGE logic is set after read. This patch adds logic to make sure the lock is always cleared at the end of each MDIO transaction. Fixes: f92e1869d74e ("Add Mellanox BlueField Gigabit Ethernet driver") Reviewed-by: Asmaa Mnebhi Signed-off-by: David Thompson Link: https://lore.kernel.org/r/20220902164247.19862-1-davthompson@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 66039eb9015eee4f7ff0c99b83c65c7ecb3c8190 Author: Norbert Zulinski Date: Wed Sep 14 15:39:13 2022 +0200 iavf: Fix bad page state Fix bad page state, free inappropriate page in handling dummy descriptor. iavf_build_skb now has to check not only if rx_buffer is NULL but also if size is zero, same thing in iavf_clean_rx_irq. Without this patch driver would free page that will be used by napi_build_skb. Fixes: a9f49e006030 ("iavf: Fix handling of dummy receive descriptors") Signed-off-by: Norbert Zulinski Signed-off-by: Mateusz Palczewski Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf_txrx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2975e4a282964dd14831e4612ac1b6b10745e5ba Author: Vincent Whitchurch Date: Wed Sep 7 12:05:33 2022 +0200 um: Prevent KASAN splats in dump_stack() Use READ_ONCE_NOCHECK() when reading the stack to prevent KASAN splats when dump_stack() is used. Fixes: 5b301409e8bc5d7fad ("UML: add support for KASAN under x86_64") Signed-off-by: Vincent Whitchurch Reviewed-by: Dmitry Vyukov Signed-off-by: Richard Weinberger arch/um/kernel/sysrq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 782b1f70f8a8b28571949d2ba43fe88b96d75ec3 Author: Christian Lamparter Date: Sat Aug 6 21:52:22 2022 +0200 um: fix default console kernel parameter OpenWrt's UML with 5.15 was producing odd errors/warnings during preinit part of the early userspace portion: |[ 0.000000] Kernel command line: ubd0=root.img root=98:0 console=tty |[...] |[ 0.440000] random: jshn: uninitialized urandom read (4 bytes read) |[ 0.460000] random: jshn: uninitialized urandom read (4 bytes read) |/etc/preinit: line 47: can't create /dev/tty: No such device or address |/etc/preinit: line 48: can't create /dev/tty: No such device or address |/etc/preinit: line 58: can't open /dev/tty: No such device or address |[...] repeated many times That "/dev/tty" came from the command line (which is automatically added if no console= parameter was specified for the uml binary). The TLDP project tells the following about the /dev/tty: | /dev/tty stands for the controlling terminal (if any) for the current | process.[...] | /dev/tty is something like a link to the actually terminal device[..] The "(if any)" is important here, since it's possible for processes to not have a controlling terminal. I think this was a simple typo and the author wanted tty0 there. CC: Thomas Meyer Fixes: d7ffac33631b ("um: stdio_console: Make preferred console") Signed-off-by: Christian Lamparter Signed-off-by: Richard Weinberger arch/um/kernel/um_arch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d27fff3499671dc23a08efd01cdb8b3764a391c4 Author: Lukas Straub Date: Fri Aug 26 15:29:31 2022 +0000 um: Cleanup compiler warning in arch/x86/um/tls_32.c arch.tls_array is statically allocated so checking for NULL doesn't make sense. This causes the compiler warning below. Remove the checks to silence these warnings. ../arch/x86/um/tls_32.c: In function 'get_free_idx': ../arch/x86/um/tls_32.c:68:13: warning: the comparison will always evaluate as 'true' for the address of 'tls_array' will never be NULL [-Waddress] 68 | if (!t->arch.tls_array) | ^ In file included from ../arch/x86/um/asm/processor.h:10, from ../include/linux/rcupdate.h:30, from ../include/linux/rculist.h:11, from ../include/linux/pid.h:5, from ../include/linux/sched.h:14, from ../arch/x86/um/tls_32.c:7: ../arch/x86/um/asm/processor_32.h:22:31: note: 'tls_array' declared here 22 | struct uml_tls_struct tls_array[GDT_ENTRY_TLS_ENTRIES]; | ^~~~~~~~~ ../arch/x86/um/tls_32.c: In function 'get_tls_entry': ../arch/x86/um/tls_32.c:243:13: warning: the comparison will always evaluate as 'true' for the address of 'tls_array' will never be NULL [-Waddress] 243 | if (!t->arch.tls_array) | ^ ../arch/x86/um/asm/processor_32.h:22:31: note: 'tls_array' declared here 22 | struct uml_tls_struct tls_array[GDT_ENTRY_TLS_ENTRIES]; | ^~~~~~~~~ Signed-off-by: Lukas Straub Acked-by: Randy Dunlap # build-tested Signed-off-by: Richard Weinberger arch/x86/um/tls_32.c | 6 ------ 1 file changed, 6 deletions(-) commit 61670b4d270c71219def1fbc9441debc2ac2e6e9 Author: Lukas Straub Date: Fri Aug 26 15:29:27 2022 +0000 um: Cleanup syscall_handler_t cast in syscalls_32.h Like in f4f03f299a56ce4d73c5431e0327b3b6cb55ebb9 "um: Cleanup syscall_handler_t definition/cast, fix warning", remove the cast to to fix the compiler warning. Signed-off-by: Lukas Straub Acked-by: Randy Dunlap # build-tested Signed-off-by: Richard Weinberger arch/x86/um/shared/sysdep/syscalls_32.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 522c9a64c7049f50c7b1299741c13fac3f231cd4 Author: Zenghui Yu Date: Thu Sep 8 21:06:59 2022 +0800 KVM: arm64: Use kmemleak_free_part_phys() to unregister hyp_mem_base With commit 0c24e061196c ("mm: kmemleak: add rbtree and store physical address for objects allocated with PA"), kmemleak started to put the objects allocated with physical address onto object_phys_tree_root tree. The kmemleak_free_part() therefore no longer worked as expected on physically allocated objects (hyp_mem_base in this case) as it attempted to search and remove things in object_tree_root tree. Fix it by using kmemleak_free_part_phys() to unregister hyp_mem_base. This fixes an immediate crash when booting a KVM host in protected mode with kmemleak enabled. Signed-off-by: Zenghui Yu Acked-by: Catalin Marinas Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220908130659.2021-1-yuzenghui@huawei.com arch/arm64/kvm/arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db7ba07108a48c0f95b74fabbfd5d63e924f992d Author: Stefan Haberland Date: Mon Sep 19 17:49:31 2022 +0200 s390/dasd: fix Oops in dasd_alias_get_start_dev due to missing pavgroup Fix Oops in dasd_alias_get_start_dev() function caused by the pavgroup pointer being NULL. The pavgroup pointer is checked on the entrance of the function but without the lcu->lock being held. Therefore there is a race window between dasd_alias_get_start_dev() and _lcu_update() which sets pavgroup to NULL with the lcu->lock held. Fix by checking the pavgroup pointer with lcu->lock held. Cc: # 2.6.25+ Fixes: 8e09f21574ea ("[S390] dasd: add hyper PAV support to DASD device driver, part 1") Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Link: https://lore.kernel.org/r/20220919154931.4123002-2-sth@linux.ibm.com Signed-off-by: Jens Axboe drivers/s390/block/dasd_alias.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit e9f3f8f488005f6da3cfb66070706770ecaef747 Author: Serge Semin Date: Mon Sep 12 00:10:09 2022 +0800 MIPS: Loongson32: Fix PHY-mode being left unspecified commit 0060c8783330 ("net: stmmac: implement support for passive mode converters via dt") has changed the plat->interface field semantics from containing the PHY-mode to specifying the MAC-PCS interface mode. Due to that the loongson32 platform code will leave the phylink interface uninitialized with the PHY-mode intended by the means of the actual platform setup. The commit-author most likely has just missed the arch-specific code to fix. Let's mend the Loongson32 platform code then by assigning the PHY-mode to the phy_interface field of the STMMAC platform data. Fixes: 0060c8783330 ("net: stmmac: implement support for passive mode converters via dt") Signed-off-by: Serge Semin Signed-off-by: Keguang Zhang Tested-by: Keguang Zhang Signed-off-by: Thomas Bogendoerfer arch/mips/loongson32/common/platform.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 502550123bee6a2ffa438409b5b9aad4d6db3a8c Author: Randy Dunlap Date: Sat Sep 17 16:25:40 2022 -0700 MIPS: lantiq: export clk_get_io() for lantiq_wdt.ko The lantiq WDT driver uses clk_get_io(), which is not exported, so export it to fix a build error: ERROR: modpost: "clk_get_io" [drivers/watchdog/lantiq_wdt.ko] undefined! Fixes: 287e3f3f4e68 ("MIPS: lantiq: implement support for clkdev api") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Thomas Bogendoerfer Cc: John Crispin Cc: linux-mips@vger.kernel.org Signed-off-by: Thomas Bogendoerfer arch/mips/lantiq/clk.c | 1 + 1 file changed, 1 insertion(+) commit d71608a877362becdc94191f190902fac1e64d35 Author: Feng Tang Date: Mon Sep 19 11:12:41 2022 +0800 mm/slab_common: fix possible double free of kmem_cache When doing slub_debug test, kfence's 'test_memcache_typesafe_by_rcu' kunit test case cause a use-after-free error: BUG: KASAN: use-after-free in kobject_del+0x14/0x30 Read of size 8 at addr ffff888007679090 by task kunit_try_catch/261 CPU: 1 PID: 261 Comm: kunit_try_catch Tainted: G B N 6.0.0-rc5-next-20220916 #17 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 Call Trace: dump_stack_lvl+0x34/0x48 print_address_description.constprop.0+0x87/0x2a5 print_report+0x103/0x1ed kasan_report+0xb7/0x140 kobject_del+0x14/0x30 kmem_cache_destroy+0x130/0x170 test_exit+0x1a/0x30 kunit_try_run_case+0xad/0xc0 kunit_generic_run_threadfn_adapter+0x26/0x50 kthread+0x17b/0x1b0 The cause is inside kmem_cache_destroy(): kmem_cache_destroy acquire lock/mutex shutdown_cache schedule_work(kmem_cache_release) (if RCU flag set) release lock/mutex kmem_cache_release (if RCU flag not set) In some certain timing, the scheduled work could be run before the next RCU flag checking, which can then get a wrong value and lead to double kmem_cache_release(). Fix it by caching the RCU flag inside protected area, just like 'refcnt' Fixes: 0495e337b703 ("mm/slab_common: Deleting kobject in kmem_cache_destroy() without holding slab_mutex/cpu_hotplug_lock") Signed-off-by: Feng Tang Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Waiman Long Signed-off-by: Vlastimil Babka mm/slab_common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c3afa2a402d1ecefa59f88d55d9e765f52f75bd9 Author: Takashi Iwai Date: Mon Sep 19 14:35:16 2022 +0200 ALSA: core: Fix double-free at snd_card_new() During the code change to add the support for devres-managed card instance, we put an explicit kfree(card) call at the error path in snd_card_new(). This is needed for the early error path before the card is initialized with the device, but is rather superfluous and causes a double-free at the error path after the card instance is initialized, as the destructor of the card object already contains a kfree() call. This patch fixes the double-free situation by removing the superfluous kfree(). Meanwhile we need to call kfree() explicitly for the early error path, so it's added there instead. Fixes: e8ad415b7a55 ("ALSA: core: Add managed card creation") Reported-by: Rondreis Cc: Link: https://lore.kernel.org/r/CAB7eexL1zBnB636hwS27d-LdPYZ_R1-5fJS_h=ZbCWYU=UPWJg@mail.gmail.com Link: https://lore.kernel.org/r/20220919123516.28222-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/init.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 496322302bf1e58dc2ff134173527493105f51ab Author: Daniel Houldsworth Date: Sun Sep 18 18:13:00 2022 +0100 ALSA: hda/realtek: Add a quirk for HP OMEN 16 (8902) mute LED Similair to the HP OMEN 15, the HP OMEN 16 also needs ALC285_FIXUP_HP_MUTE_LED for the mute LED to work. [ Rearranged the entry in PCI SSID order by tiwai ] Signed-off-by: Daniel Houldsworth Cc: Link: https://lore.kernel.org/r/20220918171300.24693-1-dhould3@gmail.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 468c9d928a8f38fdfaa61b05e81473cc7c8a6461 Author: Russ Weight Date: Fri Sep 16 16:52:05 2022 -0700 fpga: m10bmc-sec: Fix possible memory leak of flash_buf There is an error check following the allocation of flash_buf that returns without freeing flash_buf. It makes more sense to do the error check before the allocation and the reordering eliminates the memory leak. Reported-by: kernel test robot Reported-by: Dan Carpenter Fixes: 154afa5c31cd ("fpga: m10bmc-sec: expose max10 flash update count") Signed-off-by: Russ Weight Reviewed-by: Tom Rix Acked-by: Xu Yilun Cc: Link: https://lore.kernel.org/r/20220916235205.106873-1-russell.h.weight@intel.com Signed-off-by: Xu Yilun drivers/fpga/intel-m10-bmc-sec-update.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a7c48a0ab87ae52c087d663e83e56b8225ac4cce Author: Heiko Schocher Date: Fri Aug 26 13:50:21 2022 -0300 drm/panel: simple: Fix innolux_g121i1_l01 bus_format innolux_g121i1_l01 sets bpc to 6, so use the corresponding bus format: MEDIA_BUS_FMT_RGB666_1X7X3_SPWG. Fixes: 4ae13e486866 ("drm/panel: simple: Add more properties to Innolux G121I1-L01") Signed-off-by: Heiko Schocher Signed-off-by: Fabio Estevam Signed-off-by: Marek Vasut Link: https://patchwork.freedesktop.org/patch/msgid/20220826165021.1592532-1-festevam@denx.de drivers/gpu/drm/panel/panel-simple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 521a547ced6477c54b4b0cc206000406c221b4d6 Author: Linus Torvalds Date: Sun Sep 18 13:44:14 2022 -0700 Linux 6.0-rc6 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c18b453ef7237bc25b7cbd425a05ac1b6fb074b Merge: 38eddeedbbea 805ce8614958 Author: Linus Torvalds Date: Sun Sep 18 13:26:59 2022 -0700 Merge tag 'parisc-for-6.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc architecture fixes from Helge Deller: "Some small parisc architecture fixes for 6.0-rc6: One patch lightens up a previous commit and thus unbreaks building the debian kernel, which tries to configure a 64-bit kernel with the ARCH=parisc environment variable set. The other patches fixes asm/errno.h includes in the tools directory and cleans up memory allocation in the iosapic driver. Summary: - Allow configuring 64-bit kernel with ARCH=parisc - Fix asm/errno.h includes in tools directory for parisc and xtensa - Clean up iosapic memory allocation - Minor typo and spelling fixes" * tag 'parisc-for-6.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Allow CONFIG_64BIT with ARCH=parisc parisc: remove obsolete manual allocation aligning in iosapic tools/include/uapi: Fix for parisc and xtensa Input: hp_sdc: fix spelling typo in comment parisc: ccio-dma: Add missing iounmap in error path in ccio_probe() commit 38eddeedbbeac33f26845c29e7414b9313ea70db Merge: a335366bad13 9bd3f728223e Author: Linus Torvalds Date: Sun Sep 18 09:25:27 2022 -0700 Merge tag 'io_uring-6.0-2022-09-18' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: "Nothing really major here, but figured it'd be nicer to just get these flushed out for -rc6 so that the 6.1 branch will have them as well. That'll make our lives easier going forward in terms of development, and avoid trivial conflicts in this area. - Simple trace rename so that the returned opcode name is consistent with the enum definition (Stefan) - Send zc rsrc request vs notification lifetime fix (Pavel)" * tag 'io_uring-6.0-2022-09-18' of git://git.kernel.dk/linux: io_uring/opdef: rename SENDZC_NOTIF to SEND_ZC io_uring/net: fix zc fixed buf lifetime commit 9bd3f728223ebcfef8e9d087bdd142f0e388215d Author: Stefan Metzmacher Date: Fri Sep 16 23:36:25 2022 +0200 io_uring/opdef: rename SENDZC_NOTIF to SEND_ZC It's confusing to see the string SENDZC_NOTIF in ftrace output when using IORING_OP_SEND_ZC. Fixes: b48c312be05e8 ("io_uring/net: simplify zerocopy send user API") Signed-off-by: Stefan Metzmacher Cc: Pavel Begunkov Cc: Jens Axboe Cc: io-uring@vger.kernel.org Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/8e5cd8616919c92b6c3c7b6ea419fdffd5b97f3c.1663363798.git.metze@samba.org Signed-off-by: Jens Axboe io_uring/opdef.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3366e0234971a09f0e16f0e6fa16f4cbae45e47 Author: Pavel Begunkov Date: Fri Sep 16 23:22:57 2022 +0100 io_uring/net: fix zc fixed buf lifetime Notifications usually outlive requests, so we need to pin buffers with it by assigning a rsrc to it instead of the request. Fixed: b48c312be05e8 ("io_uring/net: simplify zerocopy send user API") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/dd6406ff8a90887f2b36ed6205dac9fda17c1f35.1663366886.git.asml.silence@gmail.com Reviewed-by: Stefan Metzmacher Signed-off-by: Jens Axboe io_uring/net.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit de24aceb07d426b6f1c59f33889d6a964770547b Author: Asmaa Mnebhi Date: Thu Sep 8 13:35:39 2022 -0400 i2c: mlxbf: prevent stack overflow in mlxbf_i2c_smbus_start_transaction() memcpy() is called in a loop while 'operation->length' upper bound is not checked and 'data_idx' also increments. Fixes: b5b5b32081cd206b ("i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC") Reviewed-by: Khalil Blaiech Signed-off-by: Asmaa Mnebhi Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mlxbf.c | 3 +++ 1 file changed, 3 insertions(+) commit 2a5be6d1340c0fefcee8a6489cff7fd88a0d5b85 Author: Asmaa Mnebhi Date: Thu Sep 8 13:35:38 2022 -0400 i2c: mlxbf: incorrect base address passed during io write Correct the base address used during io write. This bug had no impact over the overall functionality of the read and write transactions. MLXBF_I2C_CAUSE_OR_CLEAR=0x18 so writing to (smbus->io + 0x18) instead of (mst_cause->ioi + 0x18) actually writes to the sc_low_timeout register which just sets the timeout value before a read/write aborts. Fixes: b5b5b32081cd206b (i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC) Reviewed-by: Khalil Blaiech Signed-off-by: Asmaa Mnebhi Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mlxbf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c589e3ca27c9f608004b155d3acb2fab6f7a9f26 Author: Palmer Dabbelt Date: Thu Sep 15 10:09:00 2022 -0700 RISC-V: Avoid coupling the T-Head CMOs and Zicbom We could make the T-Head CMOs depend on a new-enough assembler to have Zicbom, but it's not strictly necessary because the T-Head CMOs circumvent the assembler. Fixes: 8f7e001e0325 ("RISC-V: Clean up the Zicbom block size probing") Reported-by: kernel test robot Reported-by: Conor Dooley Signed-off-by: Palmer Dabbelt Reviewed-by: Heiko Stuebner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220915170900.22685-1-palmer@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/cacheflush.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 762df359aa5849e010ef04c3ed79d57588ce17d9 Author: Al Viro Date: Fri Sep 24 01:55:27 2021 +0000 riscv: fix a nasty sigreturn bug... riscv has an equivalent of arm bug fixed by 653d48b22166 ("arm: fix really nasty sigreturn bug"); if signal gets caught by an interrupt that hits when we have the right value in a0 (-513), *and* another signal gets delivered upon sigreturn() (e.g. included into the blocked mask for the first signal and posted while the handler had been running), the syscall restart logics will see regs->cause equal to EXC_SYSCALL (we are in a syscall, after all) and a0 already restored to its original value (-513, which happens to be -ERESTARTNOINTR) and assume that we need to apply the usual syscall restart logics. Signed-off-by: Al Viro Fixes: e2c0cdfba7f6 ("RISC-V: User-facing API") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/YxJEiSq%2FCGaL6Gm9@ZenIV/ Signed-off-by: Palmer Dabbelt arch/riscv/kernel/signal.c | 2 ++ 1 file changed, 2 insertions(+) commit 2a2018c3ac84c2dc7cfbad117ce9339ea0914622 Author: Heiko Stuebner Date: Wed Sep 7 17:49:32 2022 +0200 riscv: make t-head erratas depend on MMU Both basic extensions of SVPBMT and ZICBOM depend on CONFIG_MMU. Make the T-Head errata implementations of the similar functionality also depend on it to prevent build errors. Fixes: a35707c3d850 ("riscv: add memory-type errata for T-Head") Fixes: d20ec7529236 ("riscv: implement cache-management errata for T-Head SoCs") Reported-by: kernel test robot Signed-off-by: Heiko Stuebner Reviewed-by: Guo Ren Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220907154932.2858518-1-heiko@sntech.de Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig.erratas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 225e47ea20ea4f37031131f4fa7a6c281fac6657 Author: Randy Dunlap Date: Fri Jul 8 18:49:29 2022 -0700 riscv: fix RISCV_ISA_SVPBMT kconfig dependency warning RISCV_ISA_SVPBMT selects RISCV_ALTERNATIVE which depends on !XIP_KERNEL. Therefore RISCV_ISA_SVPBMT should also depend on !XIP_KERNEL so quieten this kconfig warning: WARNING: unmet direct dependencies detected for RISCV_ALTERNATIVE Depends on [n]: !XIP_KERNEL [=y] Selected by [y]: - RISCV_ISA_SVPBMT [=y] && 64BIT [=y] && MMU [=y] Fixes: ff689fd21cb1 ("riscv: add RISC-V Svpbmt extension support") Signed-off-by: Randy Dunlap Cc: stable@vger.kernel.org Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20220709014929.14221-1-rdunlap@infradead.org/ Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5373b8a09d6e037ee0587cb5d9fe4cc09077deeb Author: Peter Collingbourne Date: Tue Sep 13 19:00:01 2022 -0700 kasan: call kasan_malloc() from __kmalloc_*track_caller() We were failing to call kasan_malloc() from __kmalloc_*track_caller() which was causing us to sometimes fail to produce KASAN error reports for allocations made using e.g. devm_kcalloc(), as the KASAN poison was not being initialized. Fix it. Signed-off-by: Peter Collingbourne Cc: # 5.15 Signed-off-by: Vlastimil Babka mm/slub.c | 4 ++++ 1 file changed, 4 insertions(+) commit a335366bad1364a07f49df9da1fdfa6d411a5f39 Merge: 6879c2d3b960 09eed5a1ed3c Author: Linus Torvalds Date: Fri Sep 16 12:58:17 2022 -0700 Merge tag 'gpio-fixes-for-v6.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - fix the level-low interrupt type support in gpio-mpc8xxx - convert another two drivers to using immutable irq chips - MAINTAINERS update * tag 'gpio-fixes-for-v6.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: mt7621: Make the irqchip immutable gpio: ixp4xx: Make irqchip immutable MAINTAINERS: Update HiSilicon GPIO Driver maintainer gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type in mpc85xx commit 9d55e7b0bdf9480a57b4fe87134e749cb18e281a Author: Wolfram Sang Date: Tue Sep 13 11:05:52 2022 +0100 Documentation: i2c: fix references to other documents Similar to commit fe99b819487d ("docs: i2c: i2c-sysfs: fix hyperlinks"), make other links in documentation consistent with the preferred way. Signed-off-by: Wolfram Sang Reviewed-by: Luca Ceresoli Tested-by: Luca Ceresoli Signed-off-by: Wolfram Sang Documentation/i2c/dev-interface.rst | 2 +- Documentation/i2c/slave-interface.rst | 6 +++--- Documentation/i2c/writing-clients.rst | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 2c2c72ec111fd818d37fbe00e7df3042507d7663 Author: Wolfram Sang Date: Mon Sep 12 21:58:43 2022 +0100 MAINTAINERS: remove Nehal Shah from AMD MP2 I2C DRIVER His email bounced and given commit 88115ea6308d ("HID: amd_sfh: Remove name from maintainers list"), I assume he is no longer available as a maintainer. Signed-off-by: Wolfram Sang MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 085aacaa73163f4b8a89dec24ecb32cfacd34017 Author: Uwe Kleine-König Date: Mon Sep 12 15:20:40 2022 +0200 i2c: imx: If pm_runtime_get_sync() returned 1 device access is possible pm_runtime_get_sync() returning 1 also means the device is powered. So resetting the chip registers in .remove() is possible and should be done. Reported-by: Dan Carpenter Fixes: d98bdd3a5b50 ("i2c: imx: Make sure to unregister adapter on remove()") Signed-off-by: Uwe Kleine-König Acked-by: Oleksij Rempel Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96628951869c0dedf0377adca01c8675172d8639 Author: Peilin Ye Date: Thu Sep 8 16:15:23 2022 -0700 tcp: Use WARN_ON_ONCE() in tcp_read_skb() Prevent tcp_read_skb() from flooding the syslog. Suggested-by: Jakub Sitnicki Signed-off-by: Peilin Ye Signed-off-by: David S. Miller net/ipv4/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f80d6bd2b01de4cafac3302f58456bf860322fc Author: Jaroslav Kysela Date: Tue Sep 13 09:02:16 2022 +0200 ALSA: hda/hdmi: Fix the converter reuse for the silent stream When the user space pcm stream uses the silent stream converter, it is no longer allocated for the silent stream. Clear the appropriate flag in the hdmi_pcm_open() function. The silent stream setup may be applied in hdmi_pcm_close() (and the error path - open fcn) again. If the flag is not cleared, the reuse conditions for the silent stream converter in hdmi_choose_cvt() may improperly share this converter. Cc: Kai Vehmanen Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20220913070216.3233974-1-perex@perex.cz Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 1 + 1 file changed, 1 insertion(+) commit 6879c2d3b96039ff1668b4328a4d0dd3ea952cff Merge: 68e777e44c27 c297561bc98a Author: Linus Torvalds Date: Fri Sep 16 07:06:05 2022 -0700 Merge tag 'pinctrl-v6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Nothing special, just driver fixes: - Fix IRQ wakeup and pins for UFS and SDC2 issues on the Qualcomm SC8180x - Fix the Rockchip driver to support interrupt on both rising and falling edges. - Name the Allwinner A100 R_PIO properly - Fix several issues with the Ocelot interrupts" * tag 'pinctrl-v6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: ocelot: Fix interrupt controller pinctrl: sunxi: Fix name for A100 R_PIO pinctrl: rockchip: Enhance support for IRQ_TYPE_EDGE_BOTH pinctrl: qcom: sc8180x: Fix wrong pin numbers pinctrl: qcom: sc8180x: Fix gpio_wakeirq_map commit 68e777e44c275e8dbc36f5a187c366e982d6a129 Merge: 0158137d816f c4fa368466cc Author: Linus Torvalds Date: Fri Sep 16 06:58:04 2022 -0700 Merge tag 'block-6.0-2022-09-16' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Two fixes for -rc6: - Fix a mixup of sectors and bytes in the secure erase ioctl (Mikulas) - Fix for a bad return value for a non-blocking bio/blk queue enter call (me)" * tag 'block-6.0-2022-09-16' of git://git.kernel.dk/linux-block: blk-lib: fix blkdev_issue_secure_erase block: blk_queue_enter() / __bio_queue_enter() must return -EAGAIN for nowait commit 0158137d816f60115aae2d3b4acdc67383a05c01 Merge: 5763d7f29652 fc7222c3a9f5 Author: Linus Torvalds Date: Fri Sep 16 06:50:25 2022 -0700 Merge tag 'io_uring-6.0-2022-09-16' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "Two small patches: - Fix using an unsigned type for the return value, introduced in this release (Pavel) - Stable fix for a missing check for a fixed file on put (me)" * tag 'io_uring-6.0-2022-09-16' of git://git.kernel.dk/linux-block: io_uring/msg_ring: check file type before putting io_uring/rw: fix error'ed retry return values commit 5763d7f29652f94bdfc9dab87888f79ba6bb6c34 Merge: 714820c63914 25100377a21a Author: Linus Torvalds Date: Fri Sep 16 06:45:19 2022 -0700 Merge tag 'drm-fixes-2022-09-16' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "This is the regular drm fixes pull. The i915 and misc fixes are fairly regular, but the amdgpu contains fixes for new hw blocks, the dcn314 specific path hookups and also has a bunch of fixes for clang stack size warnings which are a bit churny but fairly straightforward. This means it looks a little larger than usual. amdgpu: - BACO fixes for some RDNA2 boards - PCI AER fixes uncovered by a core PCI change - Properly hook up dirtyfb helper - RAS fixes for GC 11.x - TMR fix - DCN 3.2.x fixes - DCN 3.1.4 fixes - LLVM DML stack size fixes i915: - Revert a display patch around max DP source rate now that the proper WaEdpLinkRateDataReload is in place - Fix perf limit reasons bit position - Fix unclaimmed mmio registers on suspend flow with GuC - A vma_move_to_active fix for a regression with video decoding - DP DSP fix gma500: - Locking and IRQ fixes meson: - OSD1 display fixes panel-edp: - Fix Innolux timings rockchip: - DP/HDMI fixes" * tag 'drm-fixes-2022-09-16' of git://anongit.freedesktop.org/drm/drm: (42 commits) drm/amdgpu: make sure to init common IP before gmc drm/amdgpu: move nbio sdma_doorbell_range() into sdma code for vega drm/amdgpu: move nbio ih_doorbell_range() into ih code for vega drm/rockchip: Fix return type of cdn_dp_connector_mode_valid drm/amd/display: Mark dml30's UseMinimumDCFCLK() as noinline for stack usage drm/amd/display: Reduce number of arguments of dml31's CalculateFlipSchedule() drm/amd/display: Reduce number of arguments of dml31's CalculateWatermarksAndDRAMSpeedChangeSupport() drm/amd/display: Reduce number of arguments of dml32_CalculatePrefetchSchedule() drm/amd/display: Reduce number of arguments of dml32_CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport() drm/amd/display: Refactor SubVP calculation to remove FPU drm/amd/display: Limit user regamma to a valid value drm/amd/display: add workaround for subvp cursor corruption for DCN32/321 drm/amd/display: SW cursor fallback for SubVP drm/amd/display: Round cursor width up for MALL allocation drm/amd/display: Correct dram channel width for dcn314 drm/amd/display: Relax swizzle checks for video non-RGB formats on DCN314 drm/amd/display: Hook up DCN314 specific dml implementation drm/amd/display: Enable dlg and vba compilation for dcn314 drm/amd/display: Fix compilation errors on DCN314 drm/amd/display: Fix divide by zero in DML ... commit 714820c63914c7c4c1fd37fafdd2baa14cb605ec Merge: 3245cb65fd91 8af8aed97beb Author: Linus Torvalds Date: Fri Sep 16 06:41:44 2022 -0700 Merge tag '6.0-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Four smb3 fixes for stable: - important fix to revalidate mapping when doing direct writes - missing spinlock - two fixes to socket handling - trivial change to update internal version number for cifs.ko" * tag '6.0-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: update internal module number cifs: add missing spinlock around tcon refcount cifs: always initialize struct msghdr smb_msg completely cifs: don't send down the destination address to sendmsg for a SOCK_STREAM cifs: revalidate mapping when doing direct writes commit 34d2d3367de3b815cc7cd5670e18c557f95cfe1e Merge: 21be1ad63749 bbb774d921e2 Author: David S. Miller Date: Fri Sep 16 14:34:01 2022 +0100 Merge branch 'net-unsync-addresses-from-ports' From: Benjamin Poirier To: netdev@vger.kernel.org Cc: Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jiri Pirko , Shuah Khan , Jonathan Toppins , linux-kselftest@vger.kernel.org Subject: [PATCH net v3 0/4] Unsync addresses from ports when stopping aggregated devices Date: Wed, 7 Sep 2022 16:56:38 +0900 [thread overview] Message-ID: <20220907075642.475236-1-bpoirier@nvidia.com> (raw) This series fixes similar problems in the bonding and team drivers. Because of missing dev_{uc,mc}_unsync() calls, addresses added to underlying devices may be leftover after the aggregated device is deleted. Add the missing calls and a few related tests. v2: * fix selftest installation, see patch 3 v3: * Split lacpdu_multicast changes to their own patch, #1 * In ndo_{add,del}_slave methods, only perform address list changes when the aggregated device is up (patches 2 & 3) * Add selftest function related to the above change (patch 4) ==================== Acked-by: Jay Vosburgh Signed-off-by: David S. Miller commit bbb774d921e273ca262944c94011bc2cc888ebeb Author: Benjamin Poirier Date: Wed Sep 7 16:56:42 2022 +0900 net: Add tests for bonding and team address list management Test that the bonding and team drivers clean up an underlying device's address lists (dev->uc, dev->mc) when the aggregated device is deleted. Test addition and removal of the LACPDU multicast address on underlying devices by the bonding driver. v2: * add lag_lib.sh to TEST_FILES v3: * extend bond_listen_lacpdu_multicast test to init_state up and down cases * remove some superfluous shell syntax and 'set dev ... up' commands Signed-off-by: Benjamin Poirier Signed-off-by: David S. Miller MAINTAINERS | 1 + tools/testing/selftests/Makefile | 1 + .../testing/selftests/drivers/net/bonding/Makefile | 5 +- tools/testing/selftests/drivers/net/bonding/config | 1 + .../drivers/net/bonding/dev_addr_lists.sh | 109 +++++++++++++++++++++ .../selftests/drivers/net/bonding/lag_lib.sh | 61 ++++++++++++ tools/testing/selftests/drivers/net/team/Makefile | 6 ++ tools/testing/selftests/drivers/net/team/config | 3 + .../selftests/drivers/net/team/dev_addr_lists.sh | 51 ++++++++++ 9 files changed, 237 insertions(+), 1 deletion(-) commit bd60234222b2fd5573526da7bcd422801f271f5f Author: Benjamin Poirier Date: Wed Sep 7 16:56:41 2022 +0900 net: team: Unsync device addresses on ndo_stop Netdev drivers are expected to call dev_{uc,mc}_sync() in their ndo_set_rx_mode method and dev_{uc,mc}_unsync() in their ndo_stop method. This is mentioned in the kerneldoc for those dev_* functions. The team driver calls dev_{uc,mc}_unsync() during ndo_uninit instead of ndo_stop. This is ineffective because address lists (dev->{uc,mc}) have already been emptied in unregister_netdevice_many() before ndo_uninit is called. This mistake can result in addresses being leftover on former team ports after a team device has been deleted; see test_LAG_cleanup() in the last patch in this series. Add unsync calls at their expected location, team_close(). v3: * When adding or deleting a port, only sync/unsync addresses if the team device is up. In other cases, it is taken care of at the right time by ndo_open/ndo_set_rx_mode/ndo_stop. Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device") Signed-off-by: Benjamin Poirier Signed-off-by: David S. Miller drivers/net/team/team.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 86247aba599e5b07d7e828e6edaaebb0ef2b1158 Author: Benjamin Poirier Date: Wed Sep 7 16:56:40 2022 +0900 net: bonding: Unsync device addresses on ndo_stop Netdev drivers are expected to call dev_{uc,mc}_sync() in their ndo_set_rx_mode method and dev_{uc,mc}_unsync() in their ndo_stop method. This is mentioned in the kerneldoc for those dev_* functions. The bonding driver calls dev_{uc,mc}_unsync() during ndo_uninit instead of ndo_stop. This is ineffective because address lists (dev->{uc,mc}) have already been emptied in unregister_netdevice_many() before ndo_uninit is called. This mistake can result in addresses being leftover on former bond slaves after a bond has been deleted; see test_LAG_cleanup() in the last patch in this series. Add unsync calls, via bond_hw_addr_flush(), at their expected location, bond_close(). Add dev_mc_add() call to bond_open() to match the above change. v3: * When adding or deleting a slave, only sync/unsync, add/del addresses if the bond is up. In other cases, it is taken care of at the right time by ndo_open/ndo_set_rx_mode/ndo_stop. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Benjamin Poirier Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 47 ++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 12 deletions(-) commit 1d9a143ee3408349700f44a9197b7ae0e4faae5d Author: Benjamin Poirier Date: Wed Sep 7 16:56:39 2022 +0900 net: bonding: Share lacpdu_mcast_addr definition There are already a few definitions of arrays containing MULTICAST_LACPDU_ADDR and the next patch will add one more use. These all contain the same constant data so define one common instance for all bonding code. Signed-off-by: Benjamin Poirier Signed-off-by: David S. Miller drivers/net/bonding/bond_3ad.c | 5 +++-- drivers/net/bonding/bond_main.c | 16 ++++------------ include/net/bond_3ad.h | 2 -- include/net/bonding.h | 3 +++ 4 files changed, 10 insertions(+), 16 deletions(-) commit 21be1ad637493f960ea754399d86f65f7e260250 Merge: 9124dbcc2dd6 809f23c0423a Author: David S. Miller Date: Fri Sep 16 12:16:44 2022 +0100 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2022-09-08 (ice, iavf) This series contains updates to ice and iavf drivers. Dave removes extra unplug of auxiliary bus on reset which caused a scheduling while atomic to be reported for ice. Ding Hui defers setting of queues for TCs to ensure valid configuration and restores old config if invalid for ice. Sylwester fixes a check of setting MAC address to occur after result is received from PF for iavf driver. Brett changes check of ring tail to use software cached value as not all devices have access to register tail for iavf driver. ==================== Signed-off-by: David S. Miller commit 9124dbcc2dd6c51e81f97f63f7807118c4eb140a Author: Oleksandr Mazur Date: Thu Sep 8 16:14:46 2022 +0300 net: marvell: prestera: add support for for Aldrin2 Aldrin2 (98DX8525) is a Marvell Prestera PP, with 100G support. Signed-off-by: Oleksandr Mazur V2: - retarget to net tree instead of net-next; - fix missed colon in patch subject ('net marvell' vs 'net: mavell'); Signed-off-by: David S. Miller drivers/net/ethernet/marvell/prestera/prestera_pci.c | 1 + 1 file changed, 1 insertion(+) commit 94160108a70c8af17fa1484a37e05181c0e094af Author: Haimin Zhang Date: Thu Sep 8 20:19:27 2022 +0800 net/ieee802154: fix uninit value bug in dgram_sendmsg There is uninit value bug in dgram_sendmsg function in net/ieee802154/socket.c when the length of valid data pointed by the msg->msg_name isn't verified. We introducing a helper function ieee802154_sockaddr_check_size to check namelen. First we check there is addr_type in ieee802154_addr_sa. Then, we check namelen according to addr_type. Also fixed in raw_bind, dgram_bind, dgram_connect. Signed-off-by: Haimin Zhang Signed-off-by: David S. Miller include/net/ieee802154_netdev.h | 37 ++++++++++++++++++++++++++++++++++++ net/ieee802154/socket.c | 42 ++++++++++++++++++++++------------------- 2 files changed, 60 insertions(+), 19 deletions(-) commit ce6b8ccdef959ba86b2711e090e84a987a000bf7 Author: Juergen Gross Date: Thu Sep 15 15:05:45 2022 +0200 xen/xenbus: fix xenbus_setup_ring() Commit 4573240f0764 ("xen/xenbus: eliminate xenbus_grant_ring()") introduced an error for initialization of multi-page rings. Cc: stable@vger.kernel.org Fixes: 4573240f0764 ("xen/xenbus: eliminate xenbus_grant_ring()") Reported-by: Sander Eikelenboom Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Reviewed-by: Oleksandr Tyshchenko Signed-off-by: Juergen Gross drivers/xen/xenbus/xenbus_client.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 25100377a21ad40dae8be5a3ed361b87acec1479 Merge: 87d9862b2548 8787f6fab413 Author: Dave Airlie Date: Fri Sep 16 17:49:46 2022 +1000 Merge tag 'drm-intel-fixes-2022-09-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Revert a display patch around max DP source rate now that the proper WaEdpLinkRateDataReload is in place. (Ville) - Fix perf limit reasons bit position. (Ashutosh) - Fix unclaimmed mmio registers on suspend flow with GuC. (Umesh) - A vma_move_to_active fix for a regression with video decoding. (Nirmoy) - DP DSP fix. (Ankit) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YyMtmGMXRLsURoM5@intel.com commit 87d9862b25483242a30bf45420cd8e7e1872a4be Merge: e2111ae2c1a6 b0b9408f1326 Author: Dave Airlie Date: Fri Sep 16 17:43:16 2022 +1000 Merge tag 'drm-misc-fixes-2022-09-15' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * gma500: Locking and IRQ fixes * meson: OSD1 display fixes * panel-edp: Fix Innolux timings * rockchip: DP/HDMI fixes Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YyMUpP1w21CPXq+I@linux-uq9g commit e2111ae2c1a6c8dd708243ef631d35a08c8be257 Merge: 80e78fcce86d a8671493d207 Author: Dave Airlie Date: Fri Sep 16 17:00:12 2022 +1000 Merge tag 'amd-drm-fixes-6.0-2022-09-14' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.0-2022-09-14: amdgpu: - BACO fixes for some RDNA2 boards - PCI AER fixes uncovered by a core PCI change - Properly hook up dirtyfb helper - RAS fixes for GC 11.x - TMR fix - DCN 3.2.x fixes - DCN 3.1.4 fixes - LLVM DML stack size fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20220914184030.6145-1-alexander.deucher@amd.com commit e0e0747de0ea3dd87cdbb0393311e17471a9baf1 Author: Sreekanth Reddy Date: Tue Sep 13 17:35:38 2022 +0530 scsi: mpt3sas: Fix return value check of dma_get_required_mask() Fix the incorrect return value check of dma_get_required_mask(). Due to this incorrect check, the driver was always setting the DMA mask to 63 bit. Link: https://lore.kernel.org/r/20220913120538.18759-2-sreekanth.reddy@broadcom.com Fixes: ba27c5cf286d ("scsi: mpt3sas: Don't change the DMA coherent mask after allocations") Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 601be20fc6a1b762044d2398befffd6bf236cebf Author: Rafael Mendonca Date: Tue Sep 13 23:49:24 2022 -0300 scsi: qla2xxx: Fix memory leak in __qlt_24xx_handle_abts() Commit 8f394da36a36 ("scsi: qla2xxx: Drop TARGET_SCF_LOOKUP_LUN_FROM_TAG") made the __qlt_24xx_handle_abts() function return early if tcm_qla2xxx_find_cmd_by_tag() didn't find a command, but it missed to clean up the allocated memory for the management command. Link: https://lore.kernel.org/r/20220914024924.695604-1-rafaelmendsr@gmail.com Fixes: 8f394da36a36 ("scsi: qla2xxx: Drop TARGET_SCF_LOOKUP_LUN_FROM_TAG") Reviewed-by: Himanshu Madhani Signed-off-by: Rafael Mendonca Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_target.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fbfe96869b782364caebae0445763969ddb6ea67 Author: Letu Ren Date: Fri Nov 12 20:06:41 2021 +0800 scsi: qedf: Fix a UAF bug in __qedf_probe() In __qedf_probe(), if qedf->cdev is NULL which means qed_ops->common->probe() failed, then the program will goto label err1, and scsi_host_put() will free lport->host pointer. Because the memory qedf points to is allocated by libfc_host_alloc(), it will be freed by scsi_host_put(). However, the if statement below label err0 only checks whether qedf is NULL but doesn't check whether the memory has been freed. So a UAF bug can occur. There are two ways to reach the statements below err0. The first one is described as before, "qedf" should be set to NULL. The second one is goto "err0" directly. In the latter scenario qedf hasn't been changed and it has the initial value NULL. As a result the if statement is not reachable in any situation. The KASAN logs are as follows: [ 2.312969] BUG: KASAN: use-after-free in __qedf_probe+0x5dcf/0x6bc0 [ 2.312969] [ 2.312969] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 [ 2.312969] Call Trace: [ 2.312969] dump_stack_lvl+0x59/0x7b [ 2.312969] print_address_description+0x7c/0x3b0 [ 2.312969] ? __qedf_probe+0x5dcf/0x6bc0 [ 2.312969] __kasan_report+0x160/0x1c0 [ 2.312969] ? __qedf_probe+0x5dcf/0x6bc0 [ 2.312969] kasan_report+0x4b/0x70 [ 2.312969] ? kobject_put+0x25d/0x290 [ 2.312969] kasan_check_range+0x2ca/0x310 [ 2.312969] __qedf_probe+0x5dcf/0x6bc0 [ 2.312969] ? selinux_kernfs_init_security+0xdc/0x5f0 [ 2.312969] ? trace_rpm_return_int_rcuidle+0x18/0x120 [ 2.312969] ? rpm_resume+0xa5c/0x16e0 [ 2.312969] ? qedf_get_generic_tlv_data+0x160/0x160 [ 2.312969] local_pci_probe+0x13c/0x1f0 [ 2.312969] pci_device_probe+0x37e/0x6c0 Link: https://lore.kernel.org/r/20211112120641.16073-1-fantasquex@gmail.com Reported-by: Zheyu Ma Acked-by: Saurav Kashyap Co-developed-by: Wende Tan Signed-off-by: Wende Tan Signed-off-by: Letu Ren Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 5 ----- 1 file changed, 5 deletions(-) commit aaa58141a5d7647b14d812dde92b8d680e0985db Merge: 7b9a516a9182 f5fc22cbbdcd Author: Arnd Bergmann Date: Thu Sep 15 21:54:06 2022 +0200 Merge tag 'at91-fixes-6.0-2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/fixes AT91 fixes for 6.0 #2 It contains a fix for LAN966 SoCs that corrects the interrupt number for internal PHYs. * tag 'at91-fixes-6.0-2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: lan966x: Fix the interrupt number for internal PHYs Link: https://lore.kernel.org/r/20220915105833.4159850-1-claudiu.beznea@microchip.com Signed-off-by: Arnd Bergmann commit fc7222c3a9f56271fba02aabbfbae999042f1679 Author: Jens Axboe Date: Thu Sep 15 11:44:35 2022 -0600 io_uring/msg_ring: check file type before putting If we're invoked with a fixed file, follow the normal rules of not calling io_fput_file(). Fixed files are permanently registered to the ring, and do not need putting separately. Cc: stable@vger.kernel.org Fixes: aa184e8671f0 ("io_uring: don't attempt to IOPOLL for MSG_RING requests") Signed-off-by: Jens Axboe io_uring/msg_ring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ba1f818053b0668a1ce2fe86b840e81b592cc560 Author: Luke D. Jones Date: Thu Sep 15 20:09:21 2022 +1200 ALSA: hda/realtek: Add quirk for ASUS GA503R laptop The ASUS G15 2022 (GA503R) series laptop has the same node-to-DAC pairs as early models and the G14, this includes bass speakers which are by default mapped incorrectly to the 0x06 node. Add a quirk to use the same DAC pairs as the G14. Signed-off-by: Luke D. Jones Cc: Link: https://lore.kernel.org/r/20220915080921.35563-4-luke@ljones.dev Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit bc2c23549ccd7105eb6ff0d4f0ac519285628673 Author: Luke D. Jones Date: Thu Sep 15 20:09:20 2022 +1200 ALSA: hda/realtek: Add pincfg for ASUS G533Z HP jack Fixes up the pincfg for ASUS ROG Strix G15 (G533Z) headphone combo jack [ Fixed the position in the quirk table by tiwai ] Signed-off-by: Luke D. Jones Cc: Link: https://lore.kernel.org/r/20220915080921.35563-3-luke@ljones.dev Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c611e659044168e7abcbae8ba1ea833521498fbb Author: Luke D. Jones Date: Thu Sep 15 20:09:19 2022 +1200 ALSA: hda/realtek: Add pincfg for ASUS G513 HP jack Fixes up the pincfg for ASUS ROG Strix G513 headphone and mic combo jack [ Fixed the position in the quirk table by tiwai ] Signed-off-by: Luke D. Jones Cc: Link: https://lore.kernel.org/r/20220915080921.35563-2-luke@ljones.dev Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit b16c8f229a58eaddfc58aab447253464abd3c85e Author: Takashi Iwai Date: Thu Sep 15 17:47:24 2022 +0200 ALSA: hda/realtek: Re-arrange quirk table entries A few entries have been mistakenly inserted in wrong positions without considering the SSID ordering. Place them at right positions. Fixes: b7557267c233 ("ALSA: hda/realtek: Add quirk for ASUS GA402") Fixes: 94db9cc8f8fa ("ALSA: hda/realtek: Add quirk for ASUS GU603") Fixes: 739d0959fbed ("ALSA: hda: Add quirk for ASUS Flow x13") Cc: Link: https://lore.kernel.org/r/20220915154724.31634-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1885ff13d4c42910b37a0e3f7c2f182520f4eed1 Author: Callum Osmotherly Date: Thu Sep 15 22:36:08 2022 +0930 ALSA: hda/realtek: Enable 4-speaker output Dell Precision 5530 laptop Just as with the 5570 (and the other Dell laptops), this enables the two subwoofer speakers on the Dell Precision 5530 together with the main ones, significantly increasing the audio quality. I've tested this myself on a 5530 and can confirm it's working as expected. Signed-off-by: Callum Osmotherly Cc: Link: https://lore.kernel.org/r/YyMjQO3mhyXlMbCf@piranha Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 7b9a516a91827e7994a4df51593278c98aae2ce6 Merge: 96c9b511fc0f f7fc391a5e28 Author: Arnd Bergmann Date: Thu Sep 15 16:17:47 2022 +0200 Merge tag 'imx-fixes-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 6.0, 2nd round: - A couple of TQMa8MPQL device tree fixes from Alexander Stein on button GPIOs and PCF85063 RTC alarm pinctrl. - Include phy-imx8-pcie.h header in tqma8mqml-mba8mx device tree to fix build errors when this SoM dtsi is included on customer carrier boards. - Remove GPU power domain reset from i.MX8MN device tree to fix a sporadical hang seen with GPUMIX powering up. - Correct CPLD_Dn GPIO label mapping for Toradex Verdin based Menlo board. - Add ARCH_NXP back to defconfig, which was dropped accidentally by commit 566e373fe047 ("arm64: Kconfig.platforms: Group NXP platforms together"). - Add missing #reset-cells for i.MX8ULP PCC clock controllers. - Update PMIC voltages for imx8mm-verdin board to fix an issue with one Toradex SKU that uses a consumer-grade chip that is capable of going up to 1.8GHz at 1.00V. - A series of imx8mp-venice-gw74xx device tree changes from Tim Harvey to fix things on CAN STBY polarity, KSZ9477 CPU uplink port and phy-mode. * tag 'imx-fixes-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: imx8mp-venice-gw74xx: fix port/phy validation arm64: dts: imx8mp-venice-gw74xx: fix ksz9477 cpu port arm64: dts: imx8mp-venice-gw74xx: fix CAN STBY polarity arm64: dts: tqma8mqml: Include phy-imx8-pcie.h header arm64: defconfig: enable ARCH_NXP arm64: dts: imx8mp-tqma8mpql-mba8mpxl: add missing pinctrl for RTC alarm arm64: dts: imx8mm-verdin: extend pmic voltages arm64: dts: imx8ulp: add #reset-cells for pcc arm64: dts: tqma8mpxl-ba8mpxl: Fix button GPIOs arm64: dts: imx8mn: remove GPU power domain reset arm64: dts: imx8mm: Reverse CPLD_Dn GPIO label mapping on MX8Menlo Signed-off-by: Arnd Bergmann commit ce001778dfc34804f2b1fa6faaad7ac888326afb Merge: 91062e663b26 14c7d9052837 Author: Greg Kroah-Hartman Date: Thu Sep 15 12:55:55 2022 +0200 Merge tag 'thunderbolt-for-v6.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: "thunderbolt: Fix for v6.0-rc6 This includes a single commit adding missing PCI ID for Intel Maple Ridge Thunderbolt 4 single port controller. This has been in linux-next with no reported issues." * tag 'thunderbolt-for-v6.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Add support for Intel Maple Ridge single port controller commit d8ab4685adc1f78aef5ece1334a47ca1a8181745 Author: Greg Kroah-Hartman Date: Thu Sep 15 12:44:56 2022 +0200 Revert "driver core: Set fw_devlink.strict=1 by default" This reverts commit 71066545b48e4259f89481199a0bbc7c35457738. It causes boot problems on some systems, so revert it for now until it is worked out. Cc: Geert Uytterhoeven Cc: Saravana Kannan Fixes: 71066545b48e ("driver core: Set fw_devlink.strict=1 by default") Reported-by: Olof Johansson Link: https://lore.kernel.org/r/CAOesGMjQHhTUMBGHQcME4JBkZCof2NEQ4gaM1GWFgH40+LN9AQ@mail.gmail.com Signed-off-by: Greg Kroah-Hartman drivers/base/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4fa368466cc1b60bb92f867741488930ddd6034 Author: Mikulas Patocka Date: Wed Sep 14 16:55:51 2022 -0400 blk-lib: fix blkdev_issue_secure_erase There's a bug in blkdev_issue_secure_erase. The statement "unsigned int len = min_t(sector_t, nr_sects, max_sectors);" sets the variable "len" to the length in sectors, but the statement "bio->bi_iter.bi_size = len" treats it as if it were in bytes. The statements "sector += len << SECTOR_SHIFT" and "nr_sects -= len << SECTOR_SHIFT" are thinko. This patch fixes it. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org # v5.19 Fixes: 44abff2c0b97 ("block: decouple REQ_OP_SECURE_ERASE from REQ_OP_DISCARD") Link: https://lore.kernel.org/r/alpine.LRH.2.02.2209141549480.28100@file01.intranet.prod.int.rdu2.redhat.com Signed-off-by: Jens Axboe block/blk-lib.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 805ce8614958c925877ba6b6dc26cdf9f8800474 Author: Helge Deller Date: Tue Sep 13 08:51:10 2022 +0200 parisc: Allow CONFIG_64BIT with ARCH=parisc The previous patch triggered a build failure for the debian kernel, which has CONFIG_64BIT enabled, uses the CROSS_COMPILER environment variable and uses ARCH=parisc to configure the kernel for 64-bit support. This patch weakens the previous patch while keeping the recommended way to configure the kernel with: ARCH=parisc -> build 32-bit kernel ARCH=parisc64 -> build 64-bit kernel while adding the possibility for debian to configure a 64-bit kernel even if ARCH=parisc is set (PA8X00 CPU has to be selected and CONFIG_64BIT needs to be enabled). The downside of this patch is, that we now have a small window open again where people may get it wrong: if they enable CONFIG_64BIT and try to compile with a 32-bit compiler. Fixes: 3dcfb729b5f4 ("parisc: Make CONFIG_64BIT available for ARCH=parisc64 only") Signed-off-by: Helge Deller Cc: # 5.15+ arch/parisc/Kconfig | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit e359b70cc1c51138e166bd4a560e5c5995369a99 Author: Rolf Eike Beer Date: Wed Sep 14 16:23:02 2022 +0200 parisc: remove obsolete manual allocation aligning in iosapic kmalloc() returns memory with __assume_kmalloc_alignment, which is __alignof__(unsigned long long) for parisc. Signed-off-by: Rolf Eike Beer Signed-off-by: Helge Deller drivers/parisc/iosapic.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 0af4ed0c329ebb4cef95fda4fcdbfcdea0255442 Author: Yifan Zhang Date: Tue Aug 30 23:18:47 2022 +0800 drm/amdgpu/mes: zero the sdma_hqd_mask of 2nd SDMA engine for SDMA 6.0.1 there is only one SDMA engine in SDMA 6.0.1, the sdma_hqd_mask has to be zeroed for the 2nd engine, otherwise MES scheduler will consider 2nd engine exists and map/unmap SDMA queues to the non-existent engine. Signed-off-by: Yifan Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 3 +++ 1 file changed, 3 insertions(+) commit a8671493d2074950553da3cf07d1be43185ef6c6 Author: Alex Deucher Date: Tue Aug 30 10:59:49 2022 -0400 drm/amdgpu: make sure to init common IP before gmc Move common IP init before GMC init so that HDP gets remapped before GMC init which uses it. This fixes the Unsupported Request error reported through AER during driver load. The error happens as a write happens to the remap offset before real remapping is done. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216373 The error was unnoticed before and got visible because of the commit referenced below. This doesn't fix anything in the commit below, rather fixes the issue in amdgpu exposed by the commit. The reference is only to associate this commit with below one so that both go together. Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_device_capability()") Acked-by: Christian König Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit e3163bc8ffdfdb405e10530b140135b2ee487f89 Author: Alex Deucher Date: Fri Sep 9 11:53:27 2022 -0400 drm/amdgpu: move nbio sdma_doorbell_range() into sdma code for vega This mirrors what we do for other asics and this way we are sure the sdma doorbell range is properly initialized. There is a comment about the way doorbells on gfx9 work that requires that they are initialized for other IPs before GFX is initialized. However, the statement says that it applies to multimedia as well, but the VCN code currently initializes doorbells after GFX and there are no known issues there. In my testing at least I don't see any problems on SDMA. This is a prerequisite for fixing the Unsupported Request error reported through AER during driver load. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216373 The error was unnoticed before and got visible because of the commit referenced below. This doesn't fix anything in the commit below, rather fixes the issue in amdgpu exposed by the commit. The reference is only to associate this commit with below one so that both go together. Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_device_capability()") Acked-by: Christian König Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/soc15.c | 22 ---------------------- 2 files changed, 5 insertions(+), 22 deletions(-) commit dc1d85cb790f2091eea074cee24a704b2d6c4a06 Author: Alex Deucher Date: Fri Sep 9 11:47:20 2022 -0400 drm/amdgpu: move nbio ih_doorbell_range() into ih code for vega This mirrors what we do for other asics and this way we are sure the ih doorbell range is properly initialized. There is a comment about the way doorbells on gfx9 work that requires that they are initialized for other IPs before GFX is initialized. In this case IH is initialized before GFX, so there should be no issue. This is a prerequisite for fixing the Unsupported Request error reported through AER during driver load. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216373 The error was unnoticed before and got visible because of the commit referenced below. This doesn't fix anything in the commit below, rather fixes the issue in amdgpu exposed by the commit. The reference is only to associate this commit with below one so that both go together. Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_device_capability()") Acked-by: Christian König Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/soc15.c | 3 --- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) commit a52540522c9541bfa3e499d2edba7bc0ca73a4ca Author: Mickaël Salaün Date: Fri Sep 9 12:34:02 2022 +0200 selftests/landlock: Fix out-of-tree builds These changes simplify the Makefile and handle these 5 ways to build Landlock tests: - make -C tools/testing/selftests/landlock - make -C tools/testing/selftests TARGETS=landlock gen_tar - make TARGETS=landlock kselftest-gen_tar - make TARGETS=landlock O=build kselftest-gen_tar - make -C /tmp/linux TARGETS=landlock O=/tmp/build kselftest-gen_tar This also makes $(KHDR_INCLUDES) available to other test collections when building in their directory. Fixes: f1227dc7d041 ("selftests/landlock: fix broken include of linux/landlock.h") Fixes: 3bb267a36185 ("selftests: drop khdr make target") Cc: Anders Roxell Cc: Guillaume Tucker Cc: Mark Brown Cc: Shuah Khan Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20220909103402.1501802-1-mic@digikod.net tools/testing/selftests/landlock/Makefile | 19 ++++++++++--------- tools/testing/selftests/lib.mk | 4 ++++ 2 files changed, 14 insertions(+), 9 deletions(-) commit c297561bc98ad0f2a37ce0178ee3ba89ab586d70 Author: Horatiu Vultur Date: Fri Sep 9 16:59:42 2022 +0200 pinctrl: ocelot: Fix interrupt controller When an external device generated a level based interrupt then the interrupt controller could miss the interrupt. The reason is that the interrupt controller can detect only link changes. In the following example, if there is a PHY that generates an interrupt then the following would happen. The GPIO detected that the interrupt line changed, and then the 'ocelot_irq_handler' was called. Here it detects which GPIO line saw the change and for that will call the following: 1. irq_mask 2. phy interrupt routine 3. irq_eoi 4. irq_unmask And this works fine for simple cases, but if the PHY generates many interrupts, for example when doing PTP timestamping, then the following could happen. Again the function 'ocelot_irq_handler' will be called and then from here the following could happen: 1. irq_mask 2. phy interrupt routine 3. irq_eoi 4. irq_unmask Right before step 3(irq_eoi), the PHY will generate another interrupt. Now the interrupt controller will acknowledge the change in the interrupt line. So we miss the interrupt. A solution will be to use 'handle_level_irq' instead of 'handle_fasteoi_irq', because for this will change routine order of handling the interrupt. 1. irq_mask 2. irq_ack 3. phy interrupt routine 4. irq_unmask And now if the PHY will generate a new interrupt before irq_unmask, the interrupt controller will detect this because it already acknowledge the change in interrupt line at step 2(irq_ack). But this is not the full solution because there is another issue. In case there are 2 PHYs that share the interrupt line. For example phy1 generates an interrupt, then the following can happen: 1.irq_mask 2.irq_ack 3.phy0 interrupt routine 4.phy1 interrupt routine 5.irq_unmask In case phy0 will generate an interrupt while clearing the interrupt source in phy1, then the interrupt line will be kept down by phy0. So the interrupt controller will not see any changes in the interrupt line. The solution here is to update 'irq_unmask' such that it can detect if the interrupt line is still active or not. And if it is active then call again the procedure to clear the interrupts. But we don't want to do it every time, only if we know that the interrupt controller has not seen already that the interrupt line has changed. While at this, add support also for IRQ_TYPE_LEVEL_LOW. Fixes: be36abb71d878f ("pinctrl: ocelot: add support for interrupt controller") Signed-off-by: Horatiu Vultur Link: https://lore.kernel.org/r/20220909145942.844102-1-horatiu.vultur@microchip.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-ocelot.c | 111 ++++++++++++++++++++++++++++++++++----- 1 file changed, 97 insertions(+), 14 deletions(-) commit 09eed5a1ed3c752892663976837eb4244c2f1984 Author: Sergio Paracuellos Date: Tue Sep 13 18:46:38 2022 +0200 gpio: mt7621: Make the irqchip immutable Commit 6c846d026d49 ("gpio: Don't fiddle with irqchips marked as immutable") added a warning to indicate if the gpiolib is altering the internals of irqchips. Following this change the following warnings are now observed for the mt7621 driver: gpio gpiochip0: (1e000600.gpio-bank0): not an immutable chip, please consider fixing it! gpio gpiochip1: (1e000600.gpio-bank1): not an immutable chip, please consider fixing it! gpio gpiochip2: (1e000600.gpio-bank2): not an immutable chip, please consider fixing it! Fix this by making the irqchip in the mt7621 driver immutable. Tested-by: Arınç ÜNAL Signed-off-by: Sergio Paracuellos Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-mt7621.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 3245cb65fd91cd514801bf91f5a3066d562f0ac4 Merge: d1221cea11fc de11663b75b0 Author: Linus Torvalds Date: Wed Sep 14 10:22:39 2022 +0100 Merge tag 'devicetree-fixes-for-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Update some stale binding maintainer emails - Fix property name error in apple,aic binding - Add missing param to of_dma_configure_id() stub - Fix an off-by-one error in unflatten_dt_nodes() * tag 'devicetree-fixes-for-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: pinctrl: qcom: drop non-working codeaurora.org emails dt-bindings: power: qcom,rpmpd: drop non-working codeaurora.org emails dt-bindings: apple,aic: Fix required item "apple,fiq-index" in affinity description dt-bindings: interconnect: fsl,imx8m-noc: drop Leonard Crestez of/device: Fix up of_dma_configure_id() stub MAINTAINERS: Update email of Neil Armstrong of: fdt: fix off-by-one error in unflatten_dt_nodes() commit bdc9b7396f7d4d6533e70fd8d5472f505b5ef58f Author: Callum Osmotherly Date: Wed Sep 14 18:44:00 2022 +0930 ALSA: hda/realtek: Enable 4-speaker output Dell Precision 5570 laptop The Dell Precision 5570 uses the same 4-speakers-on-ALC289 just like the previous Precision 5560. I replicated that patch onto this one, and can confirm that the audio is much better (the woofers are now working); I've tested it on my Dell Precision 5570. Signed-off-by: Callum Osmotherly Cc: Link: https://lore.kernel.org/r/YyGbWM5wEoFMbW2v@piranha Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 8af8aed97bebe8b26a340da5236e277c3d84a8ec Author: Steve French Date: Tue Sep 13 23:00:02 2022 -0500 cifs: update internal module number To 2.39 Signed-off-by: Steve French fs/cifs/cifsfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 621a41ae0834cec9cab312d600d2b9de41dc6eac Author: Paulo Alcantara Date: Tue Sep 13 21:34:51 2022 -0700 cifs: add missing spinlock around tcon refcount Add missing spinlock to protect updates on tcon refcount in cifs_put_tcon(). Fixes: d7d7a66aacd6 ("cifs: avoid use of global locks for high contention data") Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/connect.c | 3 +++ 1 file changed, 3 insertions(+) commit b0b9408f132623dc88e78adb5282f74e4b64bb57 Author: Nathan Huckleberry Date: Tue Sep 13 13:55:55 2022 -0700 drm/rockchip: Fix return type of cdn_dp_connector_mode_valid The mode_valid field in drm_connector_helper_funcs is expected to be of type: enum drm_mode_status (* mode_valid) (struct drm_connector *connector, struct drm_display_mode *mode); The mismatched return type breaks forward edge kCFI since the underlying function definition does not match the function hook definition. The return type of cdn_dp_connector_mode_valid should be changed from int to enum drm_mode_status. Reported-by: Dan Carpenter Link: https://github.com/ClangBuiltLinux/linux/issues/1703 Cc: llvm@lists.linux.dev Signed-off-by: Nathan Huckleberry Reviewed-by: Nathan Chancellor Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20220913205555.155149-1-nhuck@google.com drivers/gpu/drm/rockchip/cdn-dp-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bedc8f76b3539ac4f952114b316bcc2251e808ce Author: Stefan Metzmacher Date: Wed Sep 14 05:25:47 2022 +0200 cifs: always initialize struct msghdr smb_msg completely So far we were just lucky because the uninitialized members of struct msghdr are not used by default on a SOCK_STREAM tcp socket. But as new things like msg_ubuf and sg_from_iter where added recently, we should play on the safe side and avoid potention problems in future. Signed-off-by: Stefan Metzmacher Cc: stable@vger.kernel.org Reviewed-by: Paulo Alcantara (SUSE) Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/connect.c | 11 +++-------- fs/cifs/transport.c | 6 +----- 2 files changed, 4 insertions(+), 13 deletions(-) commit 17d3df38dc5f4cec9b0ac6eb79c1859b6e2693a4 Author: Stefan Metzmacher Date: Wed Sep 14 05:25:46 2022 +0200 cifs: don't send down the destination address to sendmsg for a SOCK_STREAM This is ignored anyway by the tcp layer. Signed-off-by: Stefan Metzmacher Cc: stable@vger.kernel.org Reviewed-by: Ronnie Sahlberg Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f7fc391a5e28216150ab5390df35032309ead7e5 Author: Tim Harvey Date: Mon Sep 12 11:08:34 2022 -0700 arm64: dts: imx8mp-venice-gw74xx: fix port/phy validation Since commit 65ac79e18120 ("net: dsa: microchip: add the phylink get_caps") the phy-mode must be set otherwise the switch driver will assume "NA" mode and invalidate the port. Fixes: 7899eb6cb15d ("arm64: dts: imx: Add i.MX8M Plus Gateworks gw7400 dts support") Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 56f99b8d06ef1ed1c9730948f9f05ac2b930a20b Author: Stefan Roesch Date: Mon Sep 12 09:53:25 2022 -0700 block: blk_queue_enter() / __bio_queue_enter() must return -EAGAIN for nowait Today blk_queue_enter() and __bio_queue_enter() return -EBUSY for the nowait code path. This is not correct: they should return -EAGAIN instead. This problem was detected by fio. The following command exposed the above problem: t/io_uring -p0 -d128 -b4096 -s32 -c32 -F1 -B0 -R0 -X1 -n24 -P1 -u1 -O0 /dev/ng0n1 By applying the patch, the retry case is handled correctly in the slow path. Signed-off-by: Stefan Roesch Fixes: bfd343aa1718 ("blk-mq: don't wait in blk_mq_queue_enter() if __GFP_WAIT isn't set") Signed-off-by: Jens Axboe block/blk-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 41012d715d5d7b9751ae84b8fb255e404ac9c5d0 Author: Nathan Chancellor Date: Tue Aug 30 13:34:09 2022 -0700 drm/amd/display: Mark dml30's UseMinimumDCFCLK() as noinline for stack usage This function consumes a lot of stack space and it blows up the size of dml30_ModeSupportAndSystemConfigurationFull() with clang: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/display_mode_vba_30.c:3542:6: error: stack frame size (2200) exceeds limit (2048) in 'dml30_ModeSupportAndSystemConfigurationFull' [-Werror,-Wframe-larger-than] void dml30_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib) ^ 1 error generated. Commit a0f7e7f759cf ("drm/amd/display: fix i386 frame size warning") aimed to address this for i386 but it did not help x86_64. To reduce the amount of stack space that dml30_ModeSupportAndSystemConfigurationFull() uses, mark UseMinimumDCFCLK() as noinline, using the _for_stack variant for documentation. While this will increase the total amount of stack usage between the two functions (1632 and 1304 bytes respectively), it will make sure both stay below the limit of 2048 bytes for these files. The aforementioned change does help reduce UseMinimumDCFCLK()'s stack usage so it should not be reverted in favor of this change. Link: https://github.com/ClangBuiltLinux/linux/issues/1681 Reported-by: "Sudip Mukherjee (Codethink)" Tested-by: Maíra Canal Reviewed-by: Rodrigo Siqueira Signed-off-by: Nathan Chancellor Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 21485d3da659b66c37d99071623af83ee1c6733d Author: Nathan Chancellor Date: Tue Aug 30 13:34:08 2022 -0700 drm/amd/display: Reduce number of arguments of dml31's CalculateFlipSchedule() Most of the arguments are identical between the two call sites and they can be accessed through the 'struct vba_vars_st' pointer. This reduces the total amount of stack space that dml31_ModeSupportAndSystemConfigurationFull() uses by 112 bytes with LLVM 16 (1976 -> 1864), helping clear up the following clang warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/display_mode_vba_31.c:3908:6: error: stack frame size (2216) exceeds limit (2048) in 'dml31_ModeSupportAndSystemConfigurationFull' [-Werror,-Wframe-larger-than] void dml31_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib) ^ 1 error generated. Link: https://github.com/ClangBuiltLinux/linux/issues/1681 Reported-by: "Sudip Mukherjee (Codethink)" Tested-by: Maíra Canal Reviewed-by: Rodrigo Siqueira Signed-off-by: Nathan Chancellor Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn31/display_mode_vba_31.c | 172 ++++++--------------- 1 file changed, 47 insertions(+), 125 deletions(-) commit 37934d4118e22bceb80141804391975078f31734 Author: Nathan Chancellor Date: Tue Aug 30 13:34:07 2022 -0700 drm/amd/display: Reduce number of arguments of dml31's CalculateWatermarksAndDRAMSpeedChangeSupport() Most of the arguments are identical between the two call sites and they can be accessed through the 'struct vba_vars_st' pointer. This reduces the total amount of stack space that dml31_ModeSupportAndSystemConfigurationFull() uses by 240 bytes with LLVM 16 (2216 -> 1976), helping clear up the following clang warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/display_mode_vba_31.c:3908:6: error: stack frame size (2216) exceeds limit (2048) in 'dml31_ModeSupportAndSystemConfigurationFull' [-Werror,-Wframe-larger-than] void dml31_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib) ^ 1 error generated. Link: https://github.com/ClangBuiltLinux/linux/issues/1681 Reported-by: "Sudip Mukherjee (Codethink)" Tested-by: Maíra Canal Reviewed-by: Rodrigo Siqueira Signed-off-by: Nathan Chancellor Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn31/display_mode_vba_31.c | 248 +++++---------------- 1 file changed, 52 insertions(+), 196 deletions(-) commit a3fef74b1d48d89d4d911fcd7c2630d0eb6a0012 Author: Nathan Chancellor Date: Tue Aug 30 13:34:06 2022 -0700 drm/amd/display: Reduce number of arguments of dml32_CalculatePrefetchSchedule() Several of the arguments are identical between the two call sites and they can be accessed through the 'struct vba_vars_st' pointer. This reduces the total amount of stack space that dml32_ModeSupportAndSystemConfigurationFull() uses by 208 bytes with LLVM 16 (1936 -> 1728), helping clear up the following clang warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c:1721:6: error: stack frame size (2152) exceeds limit (2048) in 'dml32_ModeSupportAndSystemConfigurationFull' [-Werror,-Wframe-larger-than] void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib) ^ 1 error generated. Additionally, while modifying the arguments to dml32_CalculatePrefetchSchedule(), use 'v' consistently, instead of 'v' mixed with 'mode_lib->vba'. Link: https://github.com/ClangBuiltLinux/linux/issues/1681 Reported-by: "Sudip Mukherjee (Codethink)" Tested-by: Maíra Canal Reviewed-by: Rodrigo Siqueira Signed-off-by: Nathan Chancellor Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 118 ++++++++------------- .../dc/dml/dcn32/display_mode_vba_util_32.c | 75 ++++++------- .../dc/dml/dcn32/display_mode_vba_util_32.h | 18 +--- 3 files changed, 78 insertions(+), 133 deletions(-) commit c4be0ac987f21e12e7ad23bc480e826d8c30de20 Author: Nathan Chancellor Date: Tue Aug 30 13:34:05 2022 -0700 drm/amd/display: Reduce number of arguments of dml32_CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport() Most of the arguments are identical between the two call sites and they can be accessed through the 'struct vba_vars_st' pointer created at the top of dml32_ModeSupportAndSystemConfigurationFull(). This reduces the total amount of stack space that dml32_ModeSupportAndSystemConfigurationFull() uses by 216 bytes with LLVM 16 (2152 -> 1936), helping clear up the following clang warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c:1721:6: error: stack frame size (2152) exceeds limit (2048) in 'dml32_ModeSupportAndSystemConfigurationFull' [-Werror,-Wframe-larger-than] void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib) ^ 1 error generated. Additionally, while modifying the arguments to dml32_CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport(), use 'v' consistently, instead of 'v' mixed with 'mode_lib->vba'. Link: https://github.com/ClangBuiltLinux/linux/issues/1681 Reported-by: "Sudip Mukherjee (Codethink)" Tested-by: Maíra Canal Reviewed-by: Rodrigo Siqueira Signed-off-by: Nathan Chancellor Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 118 +++------- .../dc/dml/dcn32/display_mode_vba_util_32.c | 248 +++++++++------------ .../dc/dml/dcn32/display_mode_vba_util_32.h | 33 +-- 3 files changed, 140 insertions(+), 259 deletions(-) commit d978c51f8d1f4314c84cf50291156862a4c34fc8 Author: Alvin Lee Date: Sat Aug 6 01:58:00 2022 +0800 drm/amd/display: Refactor SubVP calculation to remove FPU Refactor calculation to remove floating point operations from dmub_srv. To ensure that 32-bit compilation works well, we use the div64 family of macros to do integer division for SubVP-related timing parameters. Cc: Maíra Canal Cc: Alex Deucher Cc: Isabella Basso Cc: Magali Lemes Tested-by: Daniel Wheeler Reviewed-by: Samson Tam Acked-by: Tom Chung Signed-off-by: Alvin Lee Co-developed-by: Aurabindo Pillai Signed-off-by: Aurabindo Pillai Co-developed-by: Rodrigo Siqueira Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 89 ++++++++++++++-------------- 1 file changed, 44 insertions(+), 45 deletions(-) commit 3601d620f22e37740cf73f8278eabf9f2aa19eb7 Author: Yao Wang1 Date: Mon Aug 22 18:30:31 2022 +0800 drm/amd/display: Limit user regamma to a valid value [Why] For HDR mode, we get total 512 tf_point and after switching to SDR mode we actually get 400 tf_point and the rest of points(401~512) still use dirty value from HDR mode. We should limit the rest of the points to max value. [How] Limit the value when coordinates_x.x > 1, just like what we do in translate_from_linear_space for other re-gamma build paths. Tested-by: Daniel Wheeler Reviewed-by: Krunoslav Kovac Reviewed-by: Aric Cyr Acked-by: Pavle Kotarac Signed-off-by: Yao Wang1 Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 4 ++++ 1 file changed, 4 insertions(+) commit ceb756004a30239c3a50dc237313e234b667077e Author: Aurabindo Pillai Date: Thu Aug 25 15:05:58 2022 -0400 drm/amd/display: add workaround for subvp cursor corruption for DCN32/321 [Why&How] Kernel does not have a means to tell the userspace to use software cursor. Due to lack of this functionality, reducing the max cursor size is the only way to ensure that power savings of Subview port feature is utilized for asics that support it. The workaround could be removed after cursor caching is fixed while a subviewport config is active. Tested-by: Daniel Wheeler Reviewed-by: Alvin Lee Acked-by: Pavle Kotarac Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 3 ++- drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 1bb8df66920a5549db2be92c23ab81fd06992e5d Author: Alvin Lee Date: Wed Aug 24 11:53:50 2022 -0400 drm/amd/display: SW cursor fallback for SubVP [Description] Leverage SW cursor fall back for SubVP when the cursor is too big. We want to take advantage of being able to fallback to SW cursor when possible because it's not worth it to disable MCLK switching because the cursor is slightly too big. Tested-by: Daniel Wheeler Reviewed-by: Aurabindo Pillai Acked-by: Pavle Kotarac Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 5 +++++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 1 + 4 files changed, 8 insertions(+) commit 6acc6196a7320b3d2a391925c4c884fc07f0b3df Author: Taimur Hassan Date: Thu Aug 25 12:33:12 2022 -0400 drm/amd/display: Round cursor width up for MALL allocation [Why & How] When calculating cursor size for MALL allocation, the cursor width should be the actual width rounded up to 64 alignment. Additionally, the bit depth should vary depending on color format. Tested-by: Daniel Wheeler Reviewed-by: Alvin Lee Acked-by: Pavle Kotarac Signed-off-by: Taimur Hassan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubp.c | 24 +++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 24 +++++++++++++++++++++- 2 files changed, 46 insertions(+), 2 deletions(-) commit 0b15b1ec8b74bd5c9a4e4cbadab82c0657832799 Author: Duncan Ma Date: Wed Aug 24 14:35:03 2022 -0400 drm/amd/display: Correct dram channel width for dcn314 [Why] The interpretation of the number of memory channels differ by memory type, and this affects channel width for the DML input. [How] Set dram channel width according to memory type for dcn314. Tested-by: Daniel Wheeler Reviewed-by: Nicholas Kazlauskas Reviewed-by: Jun Lei Acked-by: Pavle Kotarac Signed-off-by: Duncan Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c | 2 ++ drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 3 +++ drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 1 + 3 files changed, 6 insertions(+) commit 82c4018479fba63db8db7c7fbfd9e4afba95603a Author: Nicholas Kazlauskas Date: Wed Aug 24 10:51:21 2022 -0400 drm/amd/display: Relax swizzle checks for video non-RGB formats on DCN314 [Why] HW can support the display swizzle modes for video, and those are preferable over standard or linear for decode use. [How] Remove the check for DCN314. Tested-by: Daniel Wheeler Reviewed-by: Jun Lei Acked-by: Pavle Kotarac Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ea45405d704e20826a899380c19ec163336f42ab Author: Nicholas Kazlauskas Date: Wed Aug 24 09:24:18 2022 -0400 drm/amd/display: Hook up DCN314 specific dml implementation [Why & How] Add support for the DML314 functions and hook up DCN314 to use them. This has some necessary additions for calculating Max VSTARTUP for future features, but there's also some changes that we have to make for pixel format/swizzle support. That will come in a following patch to make this transition easier to bisect. Tested-by: Daniel Wheeler Reviewed-by: Jun Lei Acked-by: Pavle Kotarac Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 2 +- drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c | 12 ++++++++++++ drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) commit af2f2a256e048f1b83605eaae49948e4a6811ac1 Author: Rodrigo Siqueira Date: Thu Sep 1 16:07:19 2022 -0400 drm/amd/display: Enable dlg and vba compilation for dcn314 We were not using the VBA and DLG files for DCN314, but the next sequence of changes for DCN314 will require those files. This commit adds the necessary files to the Makefile. Cc: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/Makefile | 3 +++ 1 file changed, 3 insertions(+) commit 18aefea7fc71759a2405bc65eae057ffda3c429c Author: Rodrigo Siqueira Date: Thu Sep 1 16:00:52 2022 -0400 drm/amd/display: Fix compilation errors on DCN314 We have some compilation errors in some DML files from DCN314 that we never noticed because we were not compiling some of the DML files. This commit fixes those syntax errors before we enable the compilation. Cc: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit f9c182056b8ff7402a46c39c34d5c91133fdf9a4 Author: Aric Cyr Date: Wed Aug 24 16:34:53 2022 -0400 drm/amd/display: Fix divide by zero in DML [why] Incorrectly using MicroTileWidth instead of MacroTileWidth for calculations. [how] Remove all unused references to MicroTile and change them to MacroTile. Tested-by: Daniel Wheeler Reviewed-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Pavle Kotarac Signed-off-by: Aric Cyr Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 24 +++++++++++----------- .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 10 ++++----- 2 files changed, 16 insertions(+), 18 deletions(-) commit 269aad0919c7aedffc18dcf46393a1bec457af0a Author: Leo Chen Date: Wed Aug 24 15:34:24 2022 -0400 drm/amd/display: Fixing DIG FIFO Error [Why & How] DIG_FIFO_READ_START_LEVEL should only be set to default value (7) by software. Removed all instances of resetting the register to 0 Tested-by: Daniel Wheeler Reviewed-by: Nicholas Kazlauskas Acked-by: Pavle Kotarac Signed-off-by: Leo Chen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dio_stream_encoder.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 58d97c99c99f4559072a5410ec0135271e24e95d Author: Alvin Lee Date: Tue Aug 23 17:14:03 2022 -0400 drm/amd/display: Update MBLK calculation for SubVP [Description] Update MBLK calculation according to hardware doc. For DCC case we were not allocation enough MALL due to an inaccurate MBLK calculation. Tested-by: Daniel Wheeler Reviewed-by: Jun Lei Acked-by: Pavle Kotarac Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.h | 3 ++ .../amd/display/dc/dcn32/dcn32_resource_helpers.c | 59 +++++++++++++++++++--- 2 files changed, 54 insertions(+), 8 deletions(-) commit 42ff33e63b83d0fd40985ccbb50ff54e320a3bd5 Author: Aurabindo Pillai Date: Thu Aug 11 16:42:12 2022 -0400 drm/amd/display: Revert "Fallback to SW cursor if SubVP + cursor too big" This reverts commit a4f1b04216023ff0f4cd89328b59ee6890248130 since returning false in case of SubVP results in no cursor being visible on desktop as there is no sw cursor fallback path on all platforms. Tested-by: Daniel Wheeler Reviewed-by: Alvin Lee Acked-by: Pavle Kotarac Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 5 ----- 1 file changed, 5 deletions(-) commit 86875d558b91cb46f43be112799c06ecce60ec1e Author: Candice Li Date: Wed Sep 7 15:52:04 2022 +0800 drm/amdgpu: Skip reset error status for psp v13_0_0 No need to reset error status since only umc ras supported on psp v13_0_0. Signed-off-by: Candice Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8c5708d3da37b8c7c3c22c7e945b9a76a7c9539b Author: Alex Deucher Date: Tue Aug 30 11:08:09 2022 -0400 drm/amdgpu: add HDP remap functionality to nbio 7.7 Was missing before and would have resulted in a write to a non-existant register. Normally APUs don't use HDP, but other asics could use this code and APUs do use the HDP when used in passthrough. Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 36de13fdb04abef3ee03ade5129ab146de63983b Author: Yang Wang Date: Fri Sep 9 11:06:50 2022 +0800 drm/amdgpu: change the alignment size of TMR BO to 1M align TMR BO size TO tmr size is not necessary, modify the size to 1M to avoid re-create BO fail when serious VRAM fragmentation. v2: add new macro PSP_TMR_ALIGNMENT for TMR BO alignment size Signed-off-by: Yang Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit df2c6e0c95ca22db5d6bea7e8169841c95426f8d Author: Candice Li Date: Wed Sep 7 15:58:59 2022 +0800 drm/amdgpu: Enable full reset when RAS is supported on gc v11_0_0 Enable full reset for RAS supported configuration on gc v11_0_0. v2: simplify the code. Signed-off-by: Candice Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + 1 file changed, 1 insertion(+) commit 66f99628eb24409cb8feb5061f78283c8b65f820 Author: Hamza Mahfooz Date: Tue Sep 6 15:01:49 2022 -0400 drm/amdgpu: use dirty framebuffer helper Currently, we aren't handling DRM_IOCTL_MODE_DIRTYFB. So, use drm_atomic_helper_dirtyfb() as the dirty callback in the amdgpu_fb_funcs struct. Signed-off-by: Hamza Mahfooz Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 ++ 1 file changed, 2 insertions(+) commit 6c20490663553cd7e07d8de8af482012329ab9d6 Author: Lijo Lazar Date: Thu Sep 8 08:28:57 2022 +0530 drm/amdgpu: Don't enable LTR if not supported As per PCIE Base Spec r4.0 Section 6.18 'Software must not enable LTR in an Endpoint unless the Root Complex and all intermediate Switches indicate support for LTR.' This fixes the Unsupported Request error reported through AER during ASPM enablement. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216455 The error was unnoticed before and got visible because of the commit referenced below. This doesn't fix anything in the commit below, rather fixes the issue in amdgpu exposed by the commit. The reference is only to associate this commit with below one so that both go together. Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_device_capability()") Reported-by: Gustaw Smolarczyk Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) commit 7c6fb61a400bf3218c6504cb2d48858f98822c9d Author: Guchun Chen Date: Wed Sep 7 20:31:36 2022 +0800 drm/amd/pm: disable BACO entry/exit completely on several sienna cichlid cards To avoid hardware intermittent failures. Signed-off-by: Guchun Chen Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 33a2d6bc3480f9f8ac8c8def29854f98cc8bfee2 Author: Andrei Vagin Date: Tue Sep 13 03:25:51 2022 -0700 Revert "fs/exec: allow to unshare a time namespace on vfork+exec" This reverts commit 133e2d3e81de5d9706cab2dd1d52d231c27382e5. Alexey pointed out a few undesirable side effects of the reverted change. First, it doesn't take into account that CLONE_VFORK can be used with CLONE_THREAD. Second, a child process doesn't enter a target time name-space, if its parent dies before the child calls exec. It happens because the parent clears vfork_done. Eric W. Biederman suggests installing a time namespace as a task gets a new mm. It includes all new processes cloned without CLONE_VM and all tasks that call exec(). This is an user API change, but we think there aren't users that depend on the old behavior. It is too late to make such changes in this release, so let's roll back this patch and introduce the right one in the next release. Cc: Alexey Izbyshev Cc: Christian Brauner Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: "Eric W. Biederman" Cc: Florian Weimer Cc: Kees Cook Signed-off-by: Andrei Vagin Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220913102551.1121611-3-avagin@google.com fs/exec.c | 7 ------- kernel/fork.c | 5 +---- kernel/nsproxy.c | 3 +-- 3 files changed, 2 insertions(+), 13 deletions(-) commit 2b1e8921fc355ff5afda65690d6e40ce25b80cd7 Author: Andrei Vagin Date: Tue Sep 13 03:25:50 2022 -0700 Revert "selftests/timens: add a test for vfork+exit" The next patch reverts the code that this test verified. This reverts commit 6342140db6609a0c7d34f68c52b2947468e0e630. Signed-off-by: Andrei Vagin Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220913102551.1121611-2-avagin@google.com tools/testing/selftests/timens/Makefile | 2 +- tools/testing/selftests/timens/vfork_exec.c | 90 ----------------------------- 2 files changed, 1 insertion(+), 91 deletions(-) commit de11663b75b0a8f1cfeb00d3b4acec9bd5a49cad Author: Krzysztof Kozlowski Date: Sun Sep 11 13:25:20 2022 +0200 dt-bindings: pinctrl: qcom: drop non-working codeaurora.org emails Emails to codeaurora.org bounce ("Recipient address rejected: undeliverable address: No such user here."). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220911112520.203062-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring .../devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml | 1 - Documentation/devicetree/bindings/pinctrl/qcom,sc7280-pinctrl.yaml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 969d373228f6624de87aa0982d89a756e8e77471 Author: Krzysztof Kozlowski Date: Sun Sep 11 13:25:08 2022 +0200 dt-bindings: power: qcom,rpmpd: drop non-working codeaurora.org emails Emails to codeaurora.org bounce ("Recipient address rejected: undeliverable address: No such user here."). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220911112508.202995-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/power/qcom,rpmpd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94e9bc73d85aa6ecfe249e985ff57abe0ab35f34 Author: Linus Walleij Date: Sun Sep 11 21:07:51 2022 +0200 gpio: ixp4xx: Make irqchip immutable This turns the IXP4xx GPIO irqchip into an immutable irqchip, a bit different from the standard template due to being hierarchical. Tested on the IXP4xx which uses drivers/ata/pata_ixp4xx_cf.c for a rootfs on compact flash with IRQs from this GPIO block to the CF ATA controller. Cc: Marc Zyngier Signed-off-by: Linus Walleij Acked-by: Marc Zyngier Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-ixp4xx.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 1660c679d6d4779fbce937d0c9dc2af56e66e62d Author: Jay Fang Date: Thu Sep 8 19:21:51 2022 +0800 MAINTAINERS: Update HiSilicon GPIO Driver maintainer Add Jay Fang as the maintainer of the HiSilicon GPIO Driver, replacing Luo Jiaxing. Cc: Luo Jiaxing Signed-off-by: Jay Fang Acked-by: Jonathan Cameron Acked-by: Jiaxing Luo Signed-off-by: Bartosz Golaszewski MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62bb0647b14646fa6c9aa25ecdf67ad18f13523c Author: Pavel Begunkov Date: Tue Sep 13 13:21:23 2022 +0100 io_uring/rw: fix error'ed retry return values Kernel test robot reports that we test negativity of an unsigned in io_fixup_rw_res() after a recent change, which masks error codes and messes up the return value in case I/O is re-retried and failed with an error. Fixes: 4d9cb92ca41dd ("io_uring/rw: fix short rw error handling") Reported-by: kernel test robot Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9754a0970af1861e7865f9014f735c70dc60bf79.1663071587.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/rw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1221cea11fca0f6946bdd032a45b22cecfc0f99 Merge: e839a756012b bfbfb6182ad1 Author: Linus Torvalds Date: Tue Sep 13 15:11:38 2022 +0200 Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull iov_iter fix from Al Viro: "Fix for a nfsd regression caused by the iov_iter stuff this window" * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: nfsd_splice_actor(): handle compound pages commit da3b1c294d470b2cf3c7046cc9e0d5c66f0a6c65 Author: Janne Grunau Date: Fri Sep 9 15:50:54 2022 +0200 dt-bindings: apple,aic: Fix required item "apple,fiq-index" in affinity description The required list used "fiq-index" instead of "apple,fiq-index" described as property and used in the dts. Add the missing "apple," prefix. Fixes: dba07ad11384 ("dt-bindings: apple,aic: Add affinity description for per-cpu pseudo-interrupts") Signed-off-by: Janne Grunau Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20220909135103.98179-2-j@jannau.net Signed-off-by: Rob Herring Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d640c4cb8f2f933c0ca896541f9de7fb1ae245f4 Author: jerry meng Date: Mon Sep 5 14:35:33 2022 +0800 USB: serial: option: add Quectel RM520N add support for Quectel RM520N which is based on Qualcomm SDX62 chip. 0x0801: DIAG + NMEA + AT + MODEM + RMNET T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 10 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0801 Rev= 5.04 S: Manufacturer=Quectel S: Product=RM520N-GL S: SerialNumber=384af524 C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=40 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=88(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: jerry meng Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 4 ++++ 1 file changed, 4 insertions(+) commit f8f67eff6847f9b8d753fa029723bcc54296055a Author: Carl Yin(殷张成) Date: Fri Sep 2 09:49:43 2022 +0000 USB: serial: option: add Quectel BG95 0x0203 composition Add support for the following Quectel BG95 composition: 0x0203: Diag + GNSS + Modem + ECM usb-devices output: T: Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0203 Rev= 0.00 S: Manufacturer=Quectel, Incorporated S: Product=Quectel LPWA Module S: SerialNumber=71d3a21b C:* #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=00 Prot=00 I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=60 Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 64 Ivl=2ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether E: Ad=85(I) Atr=03(Int.) MxPS= 64 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Carl Yin Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+) commit 2dd7e7bc02829eded71be2342a93dc035f5223f9 Author: Naohiro Aota Date: Fri Sep 9 15:59:55 2022 +0900 btrfs: zoned: wait for extent buffer IOs before finishing a zone Before sending REQ_OP_ZONE_FINISH to a zone, we need to ensure that ongoing IOs already finished. Or, we will see a "Zone Is Full" error for the IOs, as the ZONE_FINISH command makes the zone full. We ensure that with btrfs_wait_block_group_reservations() and btrfs_wait_ordered_roots() for a data block group. And, for a metadata block group, the comparison of alloc_offset vs meta_write_pointer mostly ensures IOs for the allocated region already sent. However, there still can be a little time frame where the IOs are sent but not yet completed. Introduce wait_eb_writebacks() to ensure such IOs are completed for a metadata block group. It walks the buffer_radix to find extent buffers in the block group and calls wait_on_extent_buffer_writeback() on them. Fixes: afba2bc036b0 ("btrfs: zoned: implement active zone tracking") CC: stable@vger.kernel.org # 5.19+ Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/zoned.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) commit a362bb864b8db4861977d00bd2c3222503ccc34b Author: Filipe Manana Date: Thu Sep 8 12:31:51 2022 +0100 btrfs: fix hang during unmount when stopping a space reclaim worker Often when running generic/562 from fstests we can hang during unmount, resulting in a trace like this: Sep 07 11:52:00 debian9 unknown: run fstests generic/562 at 2022-09-07 11:52:00 Sep 07 11:55:32 debian9 kernel: INFO: task umount:49438 blocked for more than 120 seconds. Sep 07 11:55:32 debian9 kernel: Not tainted 6.0.0-rc2-btrfs-next-122 #1 Sep 07 11:55:32 debian9 kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. Sep 07 11:55:32 debian9 kernel: task:umount state:D stack: 0 pid:49438 ppid: 25683 flags:0x00004000 Sep 07 11:55:32 debian9 kernel: Call Trace: Sep 07 11:55:32 debian9 kernel: Sep 07 11:55:32 debian9 kernel: __schedule+0x3c8/0xec0 Sep 07 11:55:32 debian9 kernel: ? rcu_read_lock_sched_held+0x12/0x70 Sep 07 11:55:32 debian9 kernel: schedule+0x5d/0xf0 Sep 07 11:55:32 debian9 kernel: schedule_timeout+0xf1/0x130 Sep 07 11:55:32 debian9 kernel: ? lock_release+0x224/0x4a0 Sep 07 11:55:32 debian9 kernel: ? lock_acquired+0x1a0/0x420 Sep 07 11:55:32 debian9 kernel: ? trace_hardirqs_on+0x2c/0xd0 Sep 07 11:55:32 debian9 kernel: __wait_for_common+0xac/0x200 Sep 07 11:55:32 debian9 kernel: ? usleep_range_state+0xb0/0xb0 Sep 07 11:55:32 debian9 kernel: __flush_work+0x26d/0x530 Sep 07 11:55:32 debian9 kernel: ? flush_workqueue_prep_pwqs+0x140/0x140 Sep 07 11:55:32 debian9 kernel: ? trace_clock_local+0xc/0x30 Sep 07 11:55:32 debian9 kernel: __cancel_work_timer+0x11f/0x1b0 Sep 07 11:55:32 debian9 kernel: ? close_ctree+0x12b/0x5b3 [btrfs] Sep 07 11:55:32 debian9 kernel: ? __trace_bputs+0x10b/0x170 Sep 07 11:55:32 debian9 kernel: close_ctree+0x152/0x5b3 [btrfs] Sep 07 11:55:32 debian9 kernel: ? evict_inodes+0x166/0x1c0 Sep 07 11:55:32 debian9 kernel: generic_shutdown_super+0x71/0x120 Sep 07 11:55:32 debian9 kernel: kill_anon_super+0x14/0x30 Sep 07 11:55:32 debian9 kernel: btrfs_kill_super+0x12/0x20 [btrfs] Sep 07 11:55:32 debian9 kernel: deactivate_locked_super+0x2e/0xa0 Sep 07 11:55:32 debian9 kernel: cleanup_mnt+0x100/0x160 Sep 07 11:55:32 debian9 kernel: task_work_run+0x59/0xa0 Sep 07 11:55:32 debian9 kernel: exit_to_user_mode_prepare+0x1a6/0x1b0 Sep 07 11:55:32 debian9 kernel: syscall_exit_to_user_mode+0x16/0x40 Sep 07 11:55:32 debian9 kernel: do_syscall_64+0x48/0x90 Sep 07 11:55:32 debian9 kernel: entry_SYSCALL_64_after_hwframe+0x63/0xcd Sep 07 11:55:32 debian9 kernel: RIP: 0033:0x7fcde59a57a7 Sep 07 11:55:32 debian9 kernel: RSP: 002b:00007ffe914217c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 Sep 07 11:55:32 debian9 kernel: RAX: 0000000000000000 RBX: 00007fcde5ae8264 RCX: 00007fcde59a57a7 Sep 07 11:55:32 debian9 kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000055b57556cdd0 Sep 07 11:55:32 debian9 kernel: RBP: 000055b57556cba0 R08: 0000000000000000 R09: 00007ffe91420570 Sep 07 11:55:32 debian9 kernel: R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 Sep 07 11:55:32 debian9 kernel: R13: 000055b57556cdd0 R14: 000055b57556ccb8 R15: 0000000000000000 Sep 07 11:55:32 debian9 kernel: What happens is the following: 1) The cleaner kthread tries to start a transaction to delete an unused block group, but the metadata reservation can not be satisfied right away, so a reservation ticket is created and it starts the async metadata reclaim task (fs_info->async_reclaim_work); 2) Writeback for all the filler inodes with an i_size of 2K starts (generic/562 creates a lot of 2K files with the goal of filling metadata space). We try to create an inline extent for them, but we fail when trying to insert the inline extent with -ENOSPC (at cow_file_range_inline()) - since this is not critical, we fallback to non-inline mode (back to cow_file_range()), reserve extents, create extent maps and create the ordered extents; 3) An unmount starts, enters close_ctree(); 4) The async reclaim task is flushing stuff, entering the flush states one by one, until it reaches RUN_DELAYED_IPUTS. There it runs all current delayed iputs. After running the delayed iputs and before calling btrfs_wait_on_delayed_iputs(), one or more ordered extents complete, and btrfs_add_delayed_iput() is called for each one through btrfs_finish_ordered_io() -> btrfs_put_ordered_extent(). This results in bumping fs_info->nr_delayed_iputs from 0 to some positive value. So the async reclaim task blocks at btrfs_wait_on_delayed_iputs() waiting for fs_info->nr_delayed_iputs to become 0; 5) The current transaction is committed by the transaction kthread, we then start unpinning extents and end up calling btrfs_try_granting_tickets() through unpin_extent_range(), since we released some space. This results in satisfying the ticket created by the cleaner kthread at step 1, waking up the cleaner kthread; 6) At close_ctree() we ask the cleaner kthread to park; 7) The cleaner kthread starts the transaction, deletes the unused block group, and then calls kthread_should_park(), which returns true, so it parks. And at this point we have the delayed iputs added by the completion of the ordered extents still pending; 8) Then later at close_ctree(), when we call: cancel_work_sync(&fs_info->async_reclaim_work); We hang forever, since the cleaner was parked and no one else can run delayed iputs after that, while the reclaim task is waiting for the remaining delayed iputs to be completed. Fix this by waiting for all ordered extents to complete and running the delayed iputs before attempting to stop the async reclaim tasks. Note that we can not wait for ordered extents with btrfs_wait_ordered_roots() (or other similar functions) because that waits for the BTRFS_ORDERED_COMPLETE flag to be set on an ordered extent, but the delayed iput is added after that, when doing the final btrfs_put_ordered_extent(). So instead wait for the work queues used for executing ordered extent completion to be empty, which works because we do the final put on an ordered extent at btrfs_finish_ordered_io() (while we are in the unmount context). Fixes: d6fd0ae25c6495 ("Btrfs: fix missing delayed iputs on unmount") CC: stable@vger.kernel.org # 5.15+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/disk-io.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 8a1f1e3d1eecf9d2359a2709e276743a67e145db Author: Filipe Manana Date: Thu Sep 8 12:31:50 2022 +0100 btrfs: fix hang during unmount when stopping block group reclaim worker During early unmount, at close_ctree(), we try to stop the block group reclaim task with cancel_work_sync(), but that may hang if the block group reclaim task is currently at btrfs_relocate_block_group() waiting for the flag BTRFS_FS_UNFINISHED_DROPS to be cleared from fs_info->flags. During unmount we only clear that flag later, after trying to stop the block group reclaim task. Fix that by clearing BTRFS_FS_UNFINISHED_DROPS before trying to stop the block group reclaim task and after setting BTRFS_FS_CLOSING_START, so that if the reclaim task is waiting on that bit, it will stop immediately after being woken, because it sees the filesystem is closing (with a call to btrfs_fs_closing()), and then returns immediately with -EINTR. Fixes: 31e70e527806c5 ("btrfs: fix hang during unmount when block group reclaim task is running") CC: stable@vger.kernel.org # 5.15+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/disk-io.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 95363747a6f39e88a3052fcf6ce6237769495ce0 Author: Ben Hutchings Date: Tue Aug 25 23:27:40 2020 +0100 tools/include/uapi: Fix for parisc and xtensa tools/include/uapi/asm/errno.h currently attempts to include non-existent arch-specific errno.h header for xtensa. Remove this case so that is used instead, and add the missing arch-specific header for parisc. References: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=ia64&ver=5.8.3-1%7Eexp1&stamp=1598340829&raw=1 Signed-off-by: Ben Hutchings Signed-off-by: Salvatore Bonaccorso Cc: # 5.10+ Signed-off-by: Helge Deller tools/include/uapi/asm/errno.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4b9d1bc7911c9d9159c4881455c584cde99fbb19 Author: Jiangshan Yi Date: Tue Sep 6 13:49:01 2022 +0800 Input: hp_sdc: fix spelling typo in comment Fix spelling typo in comment. Reported-by: k2ci Signed-off-by: Jiangshan Yi Signed-off-by: Helge Deller include/linux/hp_sdc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f7e001e0325de63a42f23342ac3b8139150c5cf Author: Palmer Dabbelt Date: Mon Sep 12 23:48:01 2022 +0100 RISC-V: Clean up the Zicbom block size probing This fixes two issues: I truncated the warning's hart ID when porting to the 64-bit hart ID code, and the original code's warning handling could fire on an uninitialized hart ID. The biggest change here is that riscv_cbom_block_size is no longer initialized, as IMO the default isn't sane: there's nothing in the ISA that mandates any specific cache block size, so falling back to one will just silently produce the wrong answer on some systems. This also changes the probing order so the cache block size is known before enabling Zicbom support. CC: stable@vger.kernel.org CC: Andrew Jones CC: Heiko Stuebner CC: Atish Patra Fixes: 3aefb2ee5bdd ("riscv: implement Zicbom-based CMO instructions + the t-head variant") Fixes: 1631ba1259d6 ("riscv: Add support for non-coherent devices using zicbom extension") Reported-by: kernel test robot Reported-by: Conor Dooley Signed-off-by: Palmer Dabbelt [Conor: fixed the redefinition errors] Tested-by: Conor Dooley Signed-off-by: Conor Dooley Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220912224800.998121-1-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/errata/thead/errata.c | 1 + arch/riscv/include/asm/cacheflush.h | 1 + arch/riscv/kernel/setup.c | 2 +- arch/riscv/mm/dma-noncoherent.c | 23 +++++++++++++---------- 4 files changed, 16 insertions(+), 11 deletions(-) commit 0727a9a5fbc1151fcaebfa9772e9f68f5e38ba9e Author: Matthieu Baerts Date: Tue Sep 6 20:04:02 2022 +0200 Documentation: mptcp: fix pm_type formatting When looking at the rendered HTML version, we can see 'pm_type' is not displayed with a bold font: https://docs.kernel.org/5.19/networking/mptcp-sysctl.html The empty line under 'pm_type' is then removed to have the same style as the others. Fixes: 6bb63ccc25d4 ("mptcp: Add a per-namespace sysctl to set the default path manager type") Signed-off-by: Matthieu Baerts Link: https://lore.kernel.org/r/20220906180404.1255873-2-matthieu.baerts@tessares.net Signed-off-by: Paolo Abeni Documentation/networking/mptcp-sysctl.rst | 1 - 1 file changed, 1 deletion(-) commit 7288ff6ec795804b1b4632e535403d52bd2b3ce1 Author: Paolo Abeni Date: Tue Sep 6 20:04:01 2022 +0200 mptcp: fix fwd memory accounting on coalesce The intel bot reported a memory accounting related splat: [ 240.473094] ------------[ cut here ]------------ [ 240.478507] page_counter underflow: -4294828518 nr_pages=4294967290 [ 240.485500] WARNING: CPU: 2 PID: 14986 at mm/page_counter.c:56 page_counter_cancel+0x96/0xc0 [ 240.570849] CPU: 2 PID: 14986 Comm: mptcp_connect Tainted: G S 5.19.0-rc4-00739-gd24141fe7b48 #1 [ 240.581637] Hardware name: HP HP Z240 SFF Workstation/802E, BIOS N51 Ver. 01.63 10/05/2017 [ 240.590600] RIP: 0010:page_counter_cancel+0x96/0xc0 [ 240.596179] Code: 00 00 00 45 31 c0 48 89 ef 5d 4c 89 c6 41 5c e9 40 fd ff ff 4c 89 e2 48 c7 c7 20 73 39 84 c6 05 d5 b1 52 04 01 e8 e7 95 f3 01 <0f> 0b eb a9 48 89 ef e8 1e 25 fc ff eb c3 66 66 2e 0f 1f 84 00 00 [ 240.615639] RSP: 0018:ffffc9000496f7c8 EFLAGS: 00010082 [ 240.621569] RAX: 0000000000000000 RBX: ffff88819c9c0120 RCX: 0000000000000000 [ 240.629404] RDX: 0000000000000027 RSI: 0000000000000004 RDI: fffff5200092deeb [ 240.637239] RBP: ffff88819c9c0120 R08: 0000000000000001 R09: ffff888366527a2b [ 240.645069] R10: ffffed106cca4f45 R11: 0000000000000001 R12: 00000000fffffffa [ 240.652903] R13: ffff888366536118 R14: 00000000fffffffa R15: ffff88819c9c0000 [ 240.660738] FS: 00007f3786e72540(0000) GS:ffff888366500000(0000) knlGS:0000000000000000 [ 240.669529] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 240.675974] CR2: 00007f966b346000 CR3: 0000000168cea002 CR4: 00000000003706e0 [ 240.683807] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 240.691641] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 240.699468] Call Trace: [ 240.702613] [ 240.705413] page_counter_uncharge+0x29/0x80 [ 240.710389] drain_stock+0xd0/0x180 [ 240.714585] refill_stock+0x278/0x580 [ 240.718951] __sk_mem_reduce_allocated+0x222/0x5c0 [ 240.729248] __mptcp_update_rmem+0x235/0x2c0 [ 240.734228] __mptcp_move_skbs+0x194/0x6c0 [ 240.749764] mptcp_recvmsg+0xdfa/0x1340 [ 240.763153] inet_recvmsg+0x37f/0x500 [ 240.782109] sock_read_iter+0x24a/0x380 [ 240.805353] new_sync_read+0x420/0x540 [ 240.838552] vfs_read+0x37f/0x4c0 [ 240.842582] ksys_read+0x170/0x200 [ 240.864039] do_syscall_64+0x5c/0x80 [ 240.872770] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 240.878526] RIP: 0033:0x7f3786d9ae8e [ 240.882805] Code: c0 e9 b6 fe ff ff 50 48 8d 3d 6e 18 0a 00 e8 89 e8 01 00 66 0f 1f 84 00 00 00 00 00 64 8b 04 25 18 00 00 00 85 c0 75 14 0f 05 <48> 3d 00 f0 ff ff 77 5a c3 66 0f 1f 84 00 00 00 00 00 48 83 ec 28 [ 240.902259] RSP: 002b:00007fff7be81e08 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [ 240.910533] RAX: ffffffffffffffda RBX: 0000000000002000 RCX: 00007f3786d9ae8e [ 240.918368] RDX: 0000000000002000 RSI: 00007fff7be87ec0 RDI: 0000000000000005 [ 240.926206] RBP: 0000000000000005 R08: 00007f3786e6a230 R09: 00007f3786e6a240 [ 240.934046] R10: fffffffffffff288 R11: 0000000000000246 R12: 0000000000002000 [ 240.941884] R13: 00007fff7be87ec0 R14: 00007fff7be87ec0 R15: 0000000000002000 [ 240.949741] [ 240.952632] irq event stamp: 27367 [ 240.956735] hardirqs last enabled at (27366): [] mem_cgroup_uncharge_skmem+0x6a/0x80 [ 240.966848] hardirqs last disabled at (27367): [] refill_stock+0x282/0x580 [ 240.976017] softirqs last enabled at (27360): [] mptcp_recvmsg+0xaf/0x1340 [ 240.985273] softirqs last disabled at (27364): [] __mptcp_move_skbs+0x18c/0x6c0 [ 240.994872] ---[ end trace 0000000000000000 ]--- After commit d24141fe7b48 ("mptcp: drop SK_RECLAIM_* macros"), if rmem_fwd_alloc become negative, mptcp_rmem_uncharge() can try to reclaim a negative amount of pages, since the expression: reclaimable >= PAGE_SIZE will evaluate to true for any negative value of the int 'reclaimable': 'PAGE_SIZE' is an unsigned long and the negative integer will be promoted to a (very large) unsigned long value. Still after the mentioned commit, kfree_skb_partial() in mptcp_try_coalesce() will reclaim most of just released fwd memory, so that following charging of the skb delta size will lead to negative fwd memory values. At that point a racing recvmsg() can trigger the splat. Address the issue switching the order of the memory accounting operations. The fwd memory can still transiently reach negative values, but that will happen in an atomic scope and no code path could touch/use such value. Reported-by: kernel test robot Fixes: d24141fe7b48 ("mptcp: drop SK_RECLAIM_* macros") Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Link: https://lore.kernel.org/r/20220906180404.1255873-1-matthieu.baerts@tessares.net Signed-off-by: Paolo Abeni net/mptcp/protocol.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit ca2dccdeeb49a7e408112d681bf447984c845292 Author: Ioana Ciornei Date: Tue Sep 6 16:04:51 2022 +0300 net: phy: aquantia: wait for the suspend/resume operations to finish The Aquantia datasheet notes that after issuing a Processor-Intensive MDIO operation, like changing the low-power state of the device, the driver should wait for the operation to finish before issuing a new MDIO command. The new aqr107_wait_processor_intensive_op() function is added which can be used after these kind of MDIO operations. At the moment, we are only adding it at the end of the suspend/resume calls. The issue was identified on a board featuring the AQR113C PHY, on which commands like 'ip link (..) up / down' issued without any delays between them would render the link on the PHY to remain down. The issue was easy to reproduce with a one-liner: $ ip link set dev ethX down; ip link set dev ethX up; \ ip link set dev ethX down; ip link set dev ethX up; Fixes: ac9e81c230eb ("net: phy: aquantia: add suspend / resume callbacks for AQR107 family") Signed-off-by: Ioana Ciornei Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20220906130451.1483448-1-ioana.ciornei@nxp.com Signed-off-by: Paolo Abeni drivers/net/phy/aquantia_main.c | 53 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 4 deletions(-) commit f89e409402e2aeb3bc3aa44d2b7a597959e4e6af Author: Mohan Kumar Date: Tue Sep 13 12:28:18 2022 +0530 ALSA: hda: Fix Nvidia dp infoframe Nvidia HDA HW expects infoframe data bytes order same for both HDMI and DP i.e infoframe data starts from 5th bytes offset. As dp infoframe structure has 4th byte as valid infoframe data, use hdmi infoframe structure for nvidia dp infoframe to match HW behvaior. Signed-off-by: Mohan Kumar Cc: Link: https://lore.kernel.org/r/20220913065818.13015-1-mkumard@nvidia.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit f5fc22cbbdcd349402faaddf1a07eb8403658ae8 Author: Horatiu Vultur Date: Mon Sep 12 21:26:29 2022 +0200 ARM: dts: lan966x: Fix the interrupt number for internal PHYs According to the datasheet the interrupts for internal PHYs are 80 and 81. Fixes: 6ad69e07def67c ("ARM: dts: lan966x: add MIIM nodes") Signed-off-by: Horatiu Vultur Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220912192629.461452-1-horatiu.vultur@microchip.com arch/arm/boot/dts/lan966x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 38238be4e881a5d0abbe4872b4cd6ed790be06c8 Author: Yang Yingliang Date: Wed Aug 24 17:36:57 2022 +0800 parisc: ccio-dma: Add missing iounmap in error path in ccio_probe() Add missing iounmap() before return from ccio_probe(), if ccio_init_resources() fails. Fixes: d46c742f827f ("parisc: ccio-dma: Handle kmalloc failure in ccio_init_resources()") Signed-off-by: Yang Yingliang Signed-off-by: Helge Deller drivers/parisc/ccio-dma.c | 1 + 1 file changed, 1 insertion(+) commit cbcdf8c4d35cd74aee8581eb2f0453e0ecab7b05 Author: huangwenhui Date: Tue Sep 13 13:46:22 2022 +0800 ALSA: hda/realtek: Add quirk for Huawei WRT-WX9 Fixes headphone and headset microphone detection on Huawei WRT-WX9. Signed-off-by: huangwenhui Cc: Link: https://lore.kernel.org/r/20220913054622.15979-1-huangwenhuia@uniontech.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 3c4d8c24fb6c44f426e447b04800b0ed61a7b5ae Author: Mohan Kumar Date: Tue Sep 13 11:06:41 2022 +0530 ALSA: hda/tegra: set depop delay for tegra Reduce the suspend time by setting depop delay to 10ms for tegra. Signed-off-by: Mohan Kumar Cc: Link: https://lore.kernel.org/r/20220913053641.23299-1-mkumard@nvidia.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 1 + 1 file changed, 1 insertion(+) commit 4d40ceef4745536289012670103c59264e0fb3ec Author: Kai Vehmanen Date: Mon Sep 12 21:37:16 2022 +0300 ALSA: hda: add Intel 5 Series / 3400 PCI DID Handle 0x3b57 variant with same AZX_DCAPS_INTEL_PCH_NOPM capabilities as 0x3b56. In practise this allow use of HDMI/DP display audio via i915. BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/2751 Signed-off-by: Kai Vehmanen Cc: Link: https://lore.kernel.org/r/20220912183716.2126312-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 2 ++ 1 file changed, 2 insertions(+) commit bfbfb6182ad1d7d184b16f25165faad879147f79 Author: Al Viro Date: Sat Sep 10 22:14:02 2022 +0100 nfsd_splice_actor(): handle compound pages pipe_buffer might refer to a compound page (and contain more than a PAGE_SIZE worth of data). Theoretically it had been possible since way back, but nfsd_splice_actor() hadn't run into that until copy_page_to_iter() change. Fortunately, the only thing that changes for compound pages is that we need to stuff each relevant subpage in and convert the offset into offset in the first subpage. Acked-by: Chuck Lever Tested-by: Benjamin Coddington Fixes: f0f6b614f83d "copy_page_to_iter(): don't split high-order page in case of ITER_PIPE" Signed-off-by: Al Viro fs/nfsd/vfs.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit c3681de3b8f2e8aff0306e2d6c129ca15b70b79d Author: Tim Harvey Date: Mon Sep 12 11:08:33 2022 -0700 arm64: dts: imx8mp-venice-gw74xx: fix ksz9477 cpu port The CPU uplink port on the KSZ9477 is P5 not P6 - fix this. Fixes: 7899eb6cb15d ("arm64: dts: imx: Add i.MX8M Plus Gateworks gw7400 dts support") Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4ef0885632ed485961ac0962ad01be4ec9ec658 Author: Tim Harvey Date: Mon Sep 12 11:08:32 2022 -0700 arm64: dts: imx8mp-venice-gw74xx: fix CAN STBY polarity The CAN STBY poarlity is active-low. Specify it as such by removing the 'enable-active-high' property and updating the gpio property. Fixes: 7899eb6cb15d ("arm64: dts: imx: Add i.MX8M Plus Gateworks gw7400 dts support") Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 87fd9294e63e8fa7532b5e65b534c3001c654ef8 Author: Allen-KH Cheng Date: Thu Sep 8 22:12:05 2022 +0800 drm/mediatek: Fix wrong dither settings The width and height arguments in the cmdq packet for mtk_dither_config() are inverted. We fix the incorrect width and height for dither settings in mtk_dither_config(). Fixes: 73d3724745db ("drm/mediatek: Adjust to the alphabetic order for mediatek-drm") Co-developed-by: Yongqiang Niu Signed-off-by: Yongqiang Niu Signed-off-by: Allen-KH Cheng Reviewed-by: Matthias Brugger Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220908141205.18256-1-allen-kh.cheng@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e839a756012b6cad7a4eeb67b0598ac3f349f863 Merge: 6504d82f4440 f0880e2cb7e1 Author: Linus Torvalds Date: Mon Sep 12 18:33:55 2022 -0400 Merge tag 'hyperv-fixes-signed-20220912' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv fixes from Wei Liu: - Fix an error handling issue in DRM driver (Christophe JAILLET) - Fix some issues in framebuffer driver (Vitaly Kuznetsov) - Two typo fixes (Jason Wang, Shaomin Deng) - Drop unnecessary casting in kvp tool (Zhou Jie) * tag 'hyperv-fixes-signed-20220912' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: Drivers: hv: Never allocate anything besides framebuffer from framebuffer memory region Drivers: hv: Always reserve framebuffer region for Gen1 VMs PCI: Move PCI_VENDOR_ID_MICROSOFT/PCI_DEVICE_ID_HYPERV_VIDEO definitions to pci_ids.h tools: hv: kvp: remove unnecessary (void*) conversions Drivers: hv: remove duplicate word in a comment tools: hv: Remove an extraneous "the" drm/hyperv: Fix an error handling path in hyperv_vmbus_probe() commit 6504d82f4440755d6fc1385532f84d0344243d61 Merge: 62d1cea7d66e 13bd90141804 Author: Linus Torvalds Date: Mon Sep 12 17:53:46 2022 -0400 Merge tag 'nfs-for-5.20-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfixes from Trond Myklebust: - Fix SUNRPC call completion races with call_decode() that trigger a WARN_ON() - NFSv4.0 cannot support open-by-filehandle and NFS re-export - Revert "SUNRPC: Remove unreachable error condition" to allow handling of error conditions - Update suid/sgid mode bits after ALLOCATE and DEALLOCATE * tag 'nfs-for-5.20-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: Revert "SUNRPC: Remove unreachable error condition" NFSv4.2: Update mode bits after ALLOCATE and DEALLOCATE NFSv4: Turn off open-by-filehandle and NFS re-export for NFSv4.0 SUNRPC: Fix call completion races with call_decode() commit 62d1cea7d66ee690de398e281470e78e94d085f7 Merge: 80e78fcce86d 00801cd92d91 Author: Linus Torvalds Date: Mon Sep 12 17:14:38 2022 -0400 Merge tag 'nfsd-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fix from Chuck Lever: "Address an NFSD regression introduced during the 6.0 merge window" * tag 'nfsd-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: NFSD: fix regression with setting ACLs. commit 7500a99281dfed2d4a84771c933bcb9e17af279b Author: Ronnie Sahlberg Date: Mon Sep 12 13:04:46 2022 +1000 cifs: revalidate mapping when doing direct writes Kernel bugzilla: 216301 When doing direct writes we need to also invalidate the mapping in case we have a cached copy of the affected page(s) in memory or else subsequent reads of the data might return the old/stale content before we wrote an update to the server. Cc: stable@vger.kernel.org Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/file.c | 3 +++ 1 file changed, 3 insertions(+) commit 96c9b511fc0fd40880cd944b87c099e88db1a71d Author: Krzysztof Kozlowski Date: Fri Sep 9 17:30:34 2022 +0200 dt-bindings: memory-controllers: fsl,imx8m-ddrc: drop Leonard Crestez Emails to Leonard Crestez bounce ("550 5.4.1 Recipient address rejected: Access denied:), so change maintainer to Peng Fan from NXP. Signed-off-by: Krzysztof Kozlowski Acked-by: Peng Fan Link: https://lore.kernel.org/r/20220817065946.24303-2-krzysztof.kozlowski@linaro.org Link: https://lore.kernel.org/r/20220909153037.824092-1-krzysztof.kozlowski@linaro.org' Signed-off-by: Arnd Bergmann .../devicetree/bindings/memory-controllers/fsl/imx8m-ddrc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78c94808a459fc78a74780b5940ea1323217992d Merge: 02181e68275d ea89926d9690 Author: Arnd Bergmann Date: Mon Sep 12 16:39:21 2022 +0200 Merge tag 'v6.0-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes Drop some not-specified properties, fix phy-supply properties, fix edp clock on Gru, fix usb port on BPI-R2-Pro, fix license typo, fix wlan-wake-pin on Gru-Bob and lower the sd-card speed on Quartz64-B * tag 'v6.0-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Remove 'enable-active-low' from rk3566-quartz64-a arm64: dts: rockchip: Remove 'enable-active-low' from rk3399-puma arm64: dts: rockchip: fix property for usb2 phy supply on rk3568-evb1-v10 arm64: dts: rockchip: fix property for usb2 phy supply on rock-3a arm64: dts: rockchip: Set RK3399-Gru PCLK_EDP to 24 MHz arm64: dts: rockchip: fix upper usb port on BPI-R2-Pro arm64: dts: rockchip: Fix typo in lisense text for PX30.Core arm64: dts: rockchip: Pull up wlan wake# on Gru-Bob arm64: dts: rockchip: Lower sd speed on quartz64-b Link: https://lore.kernel.org/r/2645885.mvXUDI8C0e@phil Signed-off-by: Arnd Bergmann commit 8787f6fab41380189865f5751c0f15b0c298b923 Author: Ville Syrjälä Date: Fri Sep 2 10:03:19 2022 +0300 Revert "drm/i915/display: Re-add check for low voltage sku for max dp source rate" This reverts commit d5929835080a60f9119d024fa42f315913942f76. With the Parade PS8461E MUX workaround (WaEdpLinkRateDataReload) implemented we can get finally rid of the is_low_voltage_sku() check that incorrectly prevents many machines from using the 8.1Gpbs link rate. Cc: Jason A. Donenfeld Cc: Ankit Nautiyal Cc: Jani Nikula Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5272 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6323 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6205 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220902070319.15395-2-ville.syrjala@linux.intel.com Tested-by: Aaron Ma Tested-by: Jason A. Donenfeld Reviewed-by: Jani Nikula (cherry picked from commit 483e3d87a37e804588ac8224aadd20a84593cafd) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_dp.c | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) commit d654f60898d56ffda461ef4ffd7bbe15159feb8d Author: Ashutosh Dixit Date: Thu Sep 8 08:58:21 2022 -0700 drm/i915/gt: Fix perf limit reasons bit positions Perf limit reasons bit positions were off by one. Fixes: fa68bff7cf27 ("drm/i915/gt: Add sysfs throttle frequency interfaces") Cc: stable@vger.kernel.org # v5.18+ Signed-off-by: Ashutosh Dixit Acked-by: Andi Shyti Reviewed-by: Sujaritha Sundaresan Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220908155821.1662110-1-ashutosh.dixit@intel.com Signed-off-by: Joonas Lahtinen (cherry picked from commit 60017f34fc334d1bb25476b0b0996b4073e76c90) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_reg.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit aee5ae7c8492eaca2be20d202887c9c716ffc86f Author: Umesh Nerlige Ramappa Date: Sat Aug 27 00:21:35 2022 +0000 drm/i915/guc: Cancel GuC engine busyness worker synchronously The worker is canceled in gt_park path, but earlier it was assumed that gt_park path cannot sleep and the cancel is asynchronous. This caused a race with suspend flow where the worker runs after suspend and causes an unclaimed register access warning. Cancel the worker synchronously since the gt_park is indeed allowed to sleep. v2: Fix author name and sign-off mismatch Signed-off-by: Umesh Nerlige Ramappa Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4419 Fixes: 77cdd054dd2c ("drm/i915/pmu: Connect engine busyness stats from GuC to pmu") Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20220827002135.139349-1-umesh.nerlige.ramappa@intel.com Signed-off-by: Joonas Lahtinen (cherry picked from commit 31335aa8e08be3fe10c50aecd2f11aba77544a78) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 08b812985996924c0ccf79d54a31fc9757c0a6ca Author: Nirmoy Das Date: Wed Sep 7 19:26:41 2022 +0200 drm/i915: Set correct domains values at _i915_vma_move_to_active Fix regression introduced by commit: "drm/i915: Individualize fences before adding to dma_resv obj" which sets obj->read_domains to 0 for both read and write paths. Also set obj->write_domain to 0 on read path which was removed by the commit. References: https://gitlab.freedesktop.org/drm/intel/-/issues/6639 Fixes: 420a07b841d0 ("drm/i915: Individualize fences before adding to dma_resv obj") Signed-off-by: Nirmoy Das Cc: # v5.16+ Cc: Matthew Auld Cc: Andrzej Hajda Reviewed-by: Andrzej Hajda Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220907172641.12555-1-nirmoy.das@intel.com (cherry picked from commit 04f7eb3d4582a0a4da67c86e55fda7de2df86d91) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_vma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0785691f5711a8f210bb15a5177c2999ebd3702e Author: Ankit Nautiyal Date: Fri Sep 2 16:02:19 2022 +0530 drm/i915/vdsc: Set VDSC PIC_HEIGHT before using for DP DSC Currently, pic_height of vdsc_cfg structure is being used to calculate slice_height, before it is set for DP. So taking out the lines to set pic_height from the helper intel_dp_dsc_compute_params() to individual encoders, and setting pic_height, before it is used to calculate slice_height for DP. Fixes: 5a6d866f8e1b ("drm/i915: Get slice height before computing rc params") Cc: Manasi Navare Cc: Vandita Kulkarni Cc: Matt Roper Signed-off-by: Ankit Nautiyal Reviewed-by: Vandita Kulkarni Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220902103219.1168781-1-ankit.k.nautiyal@intel.com (cherry picked from commit e72df53dcb01ec58e0410da353551adf94c8d0f1) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/icl_dsi.c | 2 ++ drivers/gpu/drm/i915/display/intel_dp.c | 1 + drivers/gpu/drm/i915/display/intel_vdsc.c | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) commit 70ae49c5ac876f0f4689889588544104209c09c4 Author: Fabio Estevam Date: Fri Sep 9 11:17:02 2022 -0300 arm64: dts: tqma8mqml: Include phy-imx8-pcie.h header imx8mm-tqma8mqml.dtsi has PCIe support, so it should include . Otherwise, there are build errors when this SoM dtsi is included on customers' carrier boards. While at it, remove the PCI header from imx8mm-tqma8mqml-mba8mx.dts, which is now unneeded. Fixes: 1d84283101fc ("arm64: dts: tqma8mqml: add PCIe support") Signed-off-by: Fabio Estevam Reviewed-by: Alexander Stein Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dts | 1 - arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml.dtsi | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit 781b80f452fcc1cfc16ee41f12556626a9ced049 Author: Felix Fietkau Date: Wed Sep 7 11:52:28 2022 +0200 wifi: mt76: fix 5 GHz connection regression on mt76x0/mt76x2 Some users have reported being unable to connect to MT76x0 APs running mt76 after a commit enabling the VHT extneded NSS BW feature. Fix this regression by ensuring that this feature only gets enabled on drivers that support it Cc: stable@vger.kernel.org Fixes: d9fcfc1424aa ("mt76: enable the VHT extended NSS BW feature") Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220907095228.82072-1-nbd@nbd.name drivers/net/wireless/mediatek/mt76/mac80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c3a510e2b53785df31d882a773c4c0780b4c825f Author: Felix Fietkau Date: Fri Aug 26 20:23:29 2022 +0200 wifi: mt76: fix reading current per-tid starting sequence number for aggregation The code was accidentally shifting register values down by tid % 32 instead of (tid * field_size) % 32. Cc: stable@vger.kernel.org Fixes: a28bef561a5c ("mt76: mt7615: re-enable offloading of sequence number assignment") Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220826182329.18155-1-nbd@nbd.name drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8997f5c8a62760db69fd5c56116705796322c8ed Author: Toke Høiland-Jørgensen Date: Wed Sep 7 15:44:50 2022 +0200 wifi: iwlwifi: Mark IWLMEI as broken The iwlmei driver breaks iwlwifi when returning from suspend. The interface ends up in the 'down' state after coming back from suspend. And iwd doesn't touch the interface state, but wpa_supplicant does, so the bug only happens on iwd. The bug report[0] has been open for four months now, and no fix seems to be forthcoming. Since just disabling the iwlmei driver works as a workaround, let's mark the config option as broken until it can be fixed properly. [0] https://bugzilla.kernel.org/show_bug.cgi?id=215937 Fixes: 2da4366f9e2c ("iwlwifi: mei: add the driver to allow cooperation with CSME") Signed-off-by: Toke Høiland-Jørgensen Acked-by: Emmanuel Grumbach Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220907134450.1183045-1-toke@toke.dk drivers/net/wireless/intel/iwlwifi/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 3c20d9618143c282b59dc29ce18e608992c24bc7 Author: Michael Walle Date: Wed Sep 7 09:06:26 2022 +0200 arm64: defconfig: enable ARCH_NXP Commit 566e373fe047 ("arm64: Kconfig.platforms: Group NXP platforms together") introduced a new symbol ARCH_NXP and made ARCH_LAYERSCAPE (among others) depend on it, but didn't enable it in the defconfig. Thus, now the defconfig doesn't include support for any NXP architectures anymore. Fix it. Fixes: 566e373fe047 ("arm64: Kconfig.platforms: Group NXP platforms together") Signed-off-by: Michael Walle Acked-by: Florian Fainelli Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 45b91a158918e04a85bb8e814cbe1924a459fceb Author: Alexander Stein Date: Tue Sep 6 08:36:06 2022 +0200 arm64: dts: imx8mp-tqma8mpql-mba8mpxl: add missing pinctrl for RTC alarm Although the RTC is on the module, the RTC_EVENT# signal is connected on the mainboard. Already set by bootloader, but make it explicit in Linux as well. Fixes: 418d1d840e42 ("arm64: dts: freescale: add initial device tree for TQMa8MPQL with i.MX8MP") Signed-off-by: Alexander Stein Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 80e78fcce86de0288793a0ef0f6acf37656ee4cf Author: Linus Torvalds Date: Sun Sep 11 16:22:01 2022 -0400 Linux 6.0-rc5 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ed9c1e971b1f6474793da20496fa53c35d4a37b Merge: 087aa69a9f2b c17a2538704f Author: Linus Torvalds Date: Sun Sep 11 15:16:47 2022 -0400 Merge tag 'kbuild-fixes-v6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Remove unused scripts/gcc-ld script - Add zstd support to scripts/extract-ikconfig - Check 'make headers' for UML - Fix scripts/mksysmap to ignore local symbols * tag 'kbuild-fixes-v6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: mksysmap: Fix the mismatch of 'L0' symbols in System.map kbuild: disable header exports for UML in a straightforward way scripts/extract-ikconfig: add zstd compression support scripts: remove obsolete gcc-ld script commit 087aa69a9f2b2f1aaa173f976fec94058f623a9d Merge: 6429883ab1ca 3fe3fd5f3072 Author: Linus Torvalds Date: Sun Sep 11 07:48:21 2022 -0400 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Three small arm64 fixes, all related to optional architecture extensions: BTI, SME and 52-bit virtual addressing: - Disable in-kernel BTI when compiling with GCC, as it makes invalid assumptions about the distance between functions which has led to crashes when calling modules on a CPU with BTI support - Remove bogus TIF_SME flag management if memory allocation fails in the ptrace code - Fix the resume path when configured for 52-bit virtual addressing" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mm: fix resume for 52-bit enabled builds arm64/ptrace: Don't clear calling process' TIF_SME on OOM arm64/bti: Disable in kernel BTI when cross section thunks are broken commit 6429883ab1cab70464ed806ba18c1da0692017e9 Merge: 2ccd4502f512 4e2a2ed96adc Author: Linus Torvalds Date: Sun Sep 11 07:39:03 2022 -0400 Merge tag 'i2c-for-6.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Only documentation and DT binding fixes and improvements" * tag 'i2c-for-6.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: dt-bindings: i2c: renesas,riic: Fix 'unevaluatedProperties' warnings docs: i2c: piix4: Fix typos, add markup, drop link docs: i2c: i2c-topology: reorder sections more logically docs: i2c: i2c-topology: fix incorrect heading docs: i2c: i2c-topology: fix typo commit 2ccd4502f512e04b6cc01995da730e8754529cf9 Merge: 134984dbcacd 2380f1e8195e Author: Linus Torvalds Date: Sun Sep 11 07:32:26 2022 -0400 Merge tag 'iommu-fixes-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: - Intel VT-d fixes from Lu Baolu: - Boot kdump kernels with VT-d scalable mode on - Calculate the right page table levels - Fix two recursive locking issues - Fix a lockdep splat issue - AMD IOMMU fixes: - Fix for completion-wait command to use full 64 bits of data - Fix PASID related issue where GPU sound devices failed to initialize - Fix for Virtio-IOMMU to report correct caching behavior, needed for use with VFIO * tag 'iommu-fixes-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu: Fix false ownership failure on AMD systems with PASID activated iommu/vt-d: Fix possible recursive locking in intel_iommu_init() iommu/virtio: Fix interaction with VFIO iommu/vt-d: Fix lockdep splat due to klist iteration in atomic context iommu/vt-d: Fix recursive lock issue in iommu_flush_dev_iotlb() iommu/vt-d: Correctly calculate sagaw value of IOMMU iommu/vt-d: Fix kdump kernels boot failure with scalable mode iommu/amd: use full 64-bit value in build_completion_wait() commit 134984dbcacd6e2242bd2d85aab605838614b6dd Merge: b96fbd602d35 727488e305b2 Author: Linus Torvalds Date: Sun Sep 11 07:21:56 2022 -0400 Merge tag 'mips-fixes_6.0_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: - fix for loongson32 starup hang - fix for octeon irq setup problem - fix compiler warning for new CONFIG option - switch to SPARSEMEM_EXTREME for all platforms selecting SPARSEMEM * tag 'mips-fixes_6.0_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: mips: Select SPARSEMEM_EXTREME MIPS: OCTEON: irq: Fix octeon_irq_force_ciu_mapping() MIPS: octeon: Get rid of preprocessor directives around RESERVE32 MIPS: loongson32: ls1c: Fix hang during startup commit 2380f1e8195ef612deea1dc7a3d611c5d2b9b56a Author: Jason Gunthorpe Date: Fri Sep 9 16:46:31 2022 -0300 iommu: Fix false ownership failure on AMD systems with PASID activated The AMD IOMMU driver cannot activate PASID mode on a RID without the RID's translation being set to IDENTITY. Further it requires changing the RID's page table layout from the normal v1 IOMMU_DOMAIN_IDENTITY layout to a different v2 layout. It does this by creating a new iommu_domain, configuring that domain for v2 identity operation and then attaching it to the group, from within the driver. This logic assumes the group is already set to the IDENTITY domain and is being used by the DMA API. However, since the ownership logic is based on the group's domain pointer equaling the default domain to detect DMA API ownership, this causes it to look like the group is not attached to the DMA API any more. This blocks attaching drivers to any other devices in the group. In a real system this manifests itself as the HD-audio devices on some AMD platforms losing their device drivers. Work around this unique behavior of the AMD driver by checking for equality of IDENTITY domains based on their type, not their pointer value. This allows the AMD driver to have two IDENTITY domains for internal purposes without breaking the check. Have the AMD driver properly declare that the special domain it created is actually an IDENTITY domain. Cc: Robin Murphy Cc: stable@vger.kernel.org Fixes: 512881eacfa7 ("bus: platform,amba,fsl-mc,PCI: Add device DMA ownership management") Reported-by: Takashi Iwai Tested-by: Takashi Iwai Signed-off-by: Jason Gunthorpe Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/0-v1-ea566e16b06b+811-amd_owner_jgg@nvidia.com Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu_v2.c | 2 ++ drivers/iommu/iommu.c | 21 +++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) commit 9cd4f1434479f1ac25c440c421fbf52069079914 Author: Lu Baolu Date: Sun Sep 11 11:18:45 2022 +0800 iommu/vt-d: Fix possible recursive locking in intel_iommu_init() The global rwsem dmar_global_lock was introduced by commit 3a5670e8ac932 ("iommu/vt-d: Introduce a rwsem to protect global data structures"). It is used to protect DMAR related global data from DMAR hotplug operations. The dmar_global_lock used in the intel_iommu_init() might cause recursive locking issue, for example, intel_iommu_get_resv_regions() is taking the dmar_global_lock from within a section where intel_iommu_init() already holds it via probe_acpi_namespace_devices(). Using dmar_global_lock in intel_iommu_init() could be relaxed since it is unlikely that any IO board must be hot added before the IOMMU subsystem is initialized. This eliminates the possible recursive locking issue by moving down DMAR hotplug support after the IOMMU is initialized and removing the uses of dmar_global_lock in intel_iommu_init(). Fixes: d5692d4af08cd ("iommu/vt-d: Fix suspicious RCU usage in probe_acpi_namespace_devices()") Reported-by: Robin Murphy Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/894db0ccae854b35c73814485569b634237b5538.1657034828.git.robin.murphy@arm.com Link: https://lore.kernel.org/r/20220718235325.3952426-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/dmar.c | 7 +++++++ drivers/iommu/intel/iommu.c | 27 ++------------------------- include/linux/dmar.h | 4 +++- 3 files changed, 12 insertions(+), 26 deletions(-) commit b96fbd602d35739b5cdb49baa02048f2c41fdab1 Merge: 445e0bc7594a 8d96bba75a43 Author: Linus Torvalds Date: Sat Sep 10 13:19:31 2022 -0400 Merge tag 's390-6.0-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Fix absolute zero lowcore corruption on kdump when CPU0 is offline - Fix lowcore protection setup for offline CPU restart * tag 's390-6.0-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/smp: enforce lowcore protection on CPU restart s390/boot: fix absolute zero lowcore corruption on boot commit 445e0bc7594a81d0e51d74c21a675c77369de4eb Merge: 16547b21b1c6 88700d1396ba Author: Linus Torvalds Date: Sat Sep 10 13:02:10 2022 -0400 Merge tag 'hwmon-for-v6.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - Fix severe regression in asus-ec-sensors driver which resulted in EC driver failures - Fix various bugs in mr75203 driver - Fix byte order bug in tps23861 driver * tag 'hwmon-for-v6.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (asus-ec-sensors) autoload module via DMI data hwmon: (mr75203) enable polling for all VM channels hwmon: (mr75203) fix multi-channel voltage reading hwmon: (mr75203) fix voltage equation for negative source input hwmon: (mr75203) update pvt->v_num and vm_num to the actual number of used sensors hwmon: (mr75203) fix VM sensor allocation when "intel,vm-map" not defined dt-bindings: hwmon: (mr75203) fix "intel,vm-map" property to be optional hwmon: (tps23861) fix byte order in resistance register commit 16547b21b1c6c8e8c5546a5206ebccef3e28c92a Merge: ce888220d5c7 9fc18f6d56d5 Author: Linus Torvalds Date: Sat Sep 10 12:18:19 2022 -0400 Merge tag 'dma-mapping-6.0-2022-09-10' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fixes from Christoph Hellwig: - revert a panic on swiotlb initialization failure (Yu Zhao) - fix the lookup for partial syncs in dma-debug (Robin Murphy) - fix a shift overflow in swiotlb (Chao Gao) - fix a comment typo in swiotlb (Chao Gao) - mark a function static now that all abusers are gone (Christoph Hellwig) * tag 'dma-mapping-6.0-2022-09-10' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: mark dma_supported static swiotlb: fix a typo swiotlb: avoid potential left shift overflow dma-debug: improve search for partial syncs Revert "swiotlb: panic if nslabs is too small" commit ead3d3c5b54f76da79c079e61bacb4279ec56965 Author: Takashi Iwai Date: Sat Sep 10 16:25:50 2022 +0200 ALSA: hda: Fix hang at HD-audio codec unbinding due to refcount saturation We fixed the potential deadlock at dynamic unbinding the HD-audio codec at the commit 7206998f578d ("ALSA: hda: Fix potential deadlock at codec unbinding"), but ironically, this caused another potential deadlock. The current code uses refcount_dec() and waits for the pending task with wait_event for dropping the refcount to 0. This works fine when PCMs are assigned and actually waiting for the refcount drop. Meanwhile, when there was no PCM assigned, the refcount_dec() call itself was supposed to drop to zero -- alas, it doesn't in reality; refcount_dec() complains, spews kernel warning and it saturates instead of dropping to 0, due to the nature of refcount_dec() implementation. This eventually blocks the wait_event() wakeup and the code get stuck there. For avoiding the problem, we call refcount_dec_and_test() and skips the sync-wait if it already reaches to zero. The patch does a slight code reshuffling to make sure to invoke other disconnect calls before the sync-wait, too. Fixes: 7206998f578d ("ALSA: hda: Fix potential deadlock at codec unbinding") Reported-by: Ville Syrjälä Tested-by: Ville Syrjälä Cc: Link: https://lore.kernel.org/r/YxtflWQnslMHVlU7@intel.com Link: https://lore.kernel.org/r/20220910142550.28494-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/pci/hda/hda_bind.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3fe3fd5f30720b4afd3345cc186808125e7f5848 Author: Joey Gouly Date: Fri Sep 9 13:43:11 2022 +0100 arm64: mm: fix resume for 52-bit enabled builds __cpu_setup() was changed to take the actual number of VA bits in x0, however the resume path was not updated at the same time. Load `vabits_actual` in the resume path, to ensure that the correct number of VA bits is used. This fixes booting v6.0-rc kernels on my Juno. Signed-off-by: Joey Gouly Fixes: 0aaa68532e9d ("arm64: mm: fix booting with 52-bit address space") Cc: Catalin Marinas Cc: Will Deacon Cc: Ard Biesheuvel Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220909124311.38489-1-joey.gouly@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/sleep.S | 3 +++ 1 file changed, 3 insertions(+) commit ce888220d5c7a805e0e155302a318d5d23e62950 Merge: e35be05d748a 991df3dd5144 Author: Linus Torvalds Date: Fri Sep 9 17:40:28 2022 -0400 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Eight patches which looks like quite a large core change, but most of the diffstat is reverting the attempt to rejig reference counting introduced in the last merge window which caused issues with device and module removal. Of the remaining four patches, only the fix use-after-free is substantial" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: mpt3sas: Fix use-after-free warning scsi: core: Fix a use-after-free scsi: core: Revert "Make sure that targets outlive devices" scsi: core: Revert "Make sure that hosts outlive targets" scsi: core: Revert "Simplify LLD module reference counting" scsi: core: Revert "Call blk_mq_free_tag_set() earlier" scsi: lpfc: Add missing destroy_workqueue() in error path scsi: lpfc: Return DID_TRANSPORT_DISRUPTED instead of DID_REQUEUE commit c17a2538704f926ee4d167ba625e09b1040d8439 Author: Youling Tang Date: Thu Sep 1 19:10:59 2022 +0800 mksysmap: Fix the mismatch of 'L0' symbols in System.map When System.map was generated, the kernel used mksysmap to filter the kernel symbols, we need to filter "L0" symbols in LoongArch architecture. $ cat System.map | grep L0 9000000000221540 t L0 The L0 symbol exists in System.map, but not in .tmp_System.map. When "cmp -s System.map .tmp_System.map" will show "Inconsistent kallsyms data" error message in link-vmlinux.sh script. Signed-off-by: Youling Tang Signed-off-by: Masahiro Yamada scripts/mksysmap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35e60f1aadf6c02d77fdf42180fbf205aec7e8fc Author: Luiz Augusto von Dentz Date: Thu Sep 8 13:57:50 2022 -0700 Bluetooth: Fix HCIGETDEVINFO regression Recent changes breaks HCIGETDEVINFO since it changes the size of hci_dev_info. Fixes: 26afbd826ee3 ("Bluetooth: Add initial implementation of CIS connections") Reported-by: Marek Szyprowski Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/hci_sock.h | 2 -- 1 file changed, 2 deletions(-) commit e35be05d748a1b82c0bd3f62dafbad859a3bd027 Merge: 9ebc0ecb21b5 5ac251c8a05c Author: Linus Torvalds Date: Fri Sep 9 15:08:40 2022 -0400 Merge tag 'driver-core-6.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are some small driver core and debugfs fixes for 6.0-rc5. Included in here are: - multiple attempts to get the arch_topology code to work properly on non-cluster SMT systems. First attempt caused build breakages in linux-next and 0-day, second try worked. - debugfs fixes for a long-suffering memory leak. The pattern of debugfs_remove(debugfs_lookup(...)) turns out to leak dentries, so add debugfs_lookup_and_remove() to fix this problem. Also fix up the scheduler debug code that highlighted this problem. Fixes for other subsystems will be trickling in over the next few months for this same issue once the debugfs function is merged. All of these have been in linux-next since Wednesday with no reported problems" * tag 'driver-core-6.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: arch_topology: Make cluster topology span at least SMT CPUs sched/debug: fix dentry leak in update_sched_domain_debugfs debugfs: add debugfs_lookup_and_remove() driver core: fix driver_set_override() issue with empty strings Revert "arch_topology: Make cluster topology span at least SMT CPUs" arch_topology: Make cluster topology span at least SMT CPUs commit 9ebc0ecb21b53e1a592f4ac9af927f7ff605f306 Merge: d2b768c3d44a 745ed37277c5 Author: Linus Torvalds Date: Fri Sep 9 15:03:08 2022 -0400 Merge tag 'block-6.0-2022-09-09' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - NVMe pull via Christoph: - fix a use after free in nvmet (Bart Van Assche) - fix a use after free when detecting digest errors (Sagi Grimberg) - fix regression that causes sporadic TCP requests to time out (Sagi Grimberg) - fix two off by ones errors in the nvmet ZNS support (Dennis Maisenbacher) - requeue aen after firmware activation (Keith Busch) - Fix missing request flags in debugfs code (me) - Partition scan fix (Ming) * tag 'block-6.0-2022-09-09' of git://git.kernel.dk/linux-block: block: add missing request flags to debugfs code nvme: requeue aen after firmware activation nvmet: fix mar and mor off-by-one errors nvme-tcp: fix regression that causes sporadic requests to time out nvme-tcp: fix UAF when detecting digest errors nvmet: fix a use-after-free block: don't add partitions if GD_SUPPRESS_PART_SCAN is set commit d2b768c3d44af4ea19c0f52e718acca01ebb22e8 Merge: 0099baa87962 4d9cb92ca41d Author: Linus Torvalds Date: Fri Sep 9 14:57:18 2022 -0400 Merge tag 'io_uring-6.0-2022-09-09' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: - Removed function that became unused after last week's merge (Jiapeng) - Two small fixes for kbuf recycling (Pavel) - Include address copy for zc send for POLLFIRST (Pavel) - Fix for short IO handling in the normal read/write path (Pavel) * tag 'io_uring-6.0-2022-09-09' of git://git.kernel.dk/linux-block: io_uring/rw: fix short rw error handling io_uring/net: copy addr for zc on POLL_FIRST io_uring: recycle kbuf recycle on tw requeue io_uring/kbuf: fix not advancing READV kbuf ring io_uring/notif: Remove the unused function io_notif_complete() commit 0099baa87962799d19b05d12f39ff13600482645 Merge: b7e00d6f5501 a261786fdc0a Author: Linus Torvalds Date: Fri Sep 9 14:46:44 2022 -0400 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Many bug fixes in several drivers: - Fix misuse of the DMA API in rtrs - Several irdma issues: hung task due to SQ flushing, incorrect capability reporting to userspace, improper error handling for MW corners, touching an uninitialized SGL for during invalidation. - hns was using the wrong page size limits for the HW, an incorrect calculation of wqe_shift causing WQE corruption, and mis computed a timer id. - Fix a crash in SRP triggered by blktests - Fix compiler errors by calling virt_to_page() with the proper type in siw - Userspace triggerable deadlock in ODP - mlx5 could use the wrong profile due to some driver loading races, counters were not working in some device configurations, and a crash on error unwind" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/irdma: Report RNR NAK generation in device caps RDMA/irdma: Use s/g array in post send only when its valid RDMA/irdma: Return correct WC error for bind operation failure RDMA/irdma: Return error on MR deregister CQP failure RDMA/irdma: Report the correct max cqes from query device MAINTAINERS: Update maintainers of HiSilicon RoCE RDMA/mlx5: Fix UMR cleanup on error flow of driver init RDMA/mlx5: Set local port to one when accessing counters RDMA/mlx5: Rely on RoCE fw cap instead of devlink when setting profile IB/core: Fix a nested dead lock as part of ODP flow RDMA/siw: Pass a pointer to virt_to_page() RDMA/srp: Set scmnd->result only when scmnd is not NULL RDMA/hns: Remove the num_qpc_timer variable RDMA/hns: Fix wrong fixed value of qp->rq.wqe_shift RDMA/hns: Fix supported page size RDMA/cma: Fix arguments order in net device validation RDMA/irdma: Fix drain SQ hang with no completion RDMA/rtrs-srv: Pass the correct number of entries for dma mapped SGL RDMA/rtrs-clt: Use the right sg_cnt after ib_dma_map_sg commit b7e00d6f55015f6995f41c60a5367f1065d37622 Merge: e35ff25f9fda 2edb79a5fb30 Author: Linus Torvalds Date: Fri Sep 9 14:35:22 2022 -0400 Merge tag 'drm-fixes-2022-09-10' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "From a train in the Irish countryside, regular drm fixes for 6.0-rc5. This is mostly amdgpu/amdkfd and i915 fixes, then one panfrost, one ttm and one edid fix. Nothing too major going on. Hopefully a quiet week next week for LPC. edid: - Fix EDID 1.4 range-descriptor parsing ttm: - Fix ghost-object bulk moves i915: - Fix MIPI sequence block copy from BIOS' table - Fix PCODE min freq setup when GuC's SLPC is in use - Implement Workaround for eDP - Fix has_flat_ccs selection for DG1 amdgpu: - Firmware header fix - SMU 13.x fix - Debugfs memory leak fix - NBIO 7.7 fix - Firmware memory leak fix amdkfd: - Debug output fix panfrost: - Fix devfreq OPP" * tag 'drm-fixes-2022-09-10' of git://anongit.freedesktop.org/drm/drm: drm/panfrost: devfreq: set opp to the recommended one to configure regulator drm/ttm: cleanup the resource of ghost objects after locking them drm/amdgpu: prevent toc firmware memory leak drm/amdgpu: correct doorbell range/size value for CSDMA_DOORBELL_RANGE drm/amdkfd: print address in hex format rather than decimal drm/amd/display: fix memory leak when using debugfs_lookup() drm/amd/pm: add missing SetMGpuFanBoostLimitRpm mapping for SMU 13.0.7 drm/amd/amdgpu: add rlc_firmware_header_v2_4 to amdgpu_firmware_header drm/i915: consider HAS_FLAT_CCS() in needs_ccs_pages drm/i915: Implement WaEdpLinkRateDataReload drm/i915/slpc: Let's fix the PCODE min freq table setup for SLPC drm/i915/bios: Copy the whole MIPI sequence block drm/ttm: update bulk move object of ghost BO drm/edid: Handle EDID 1.4 range descriptor h/vfreq offsets commit e35ff25f9fda4385249f909bce21c8f759bc46d4 Merge: 22b2e2d6ab35 2a2dfc869d33 Author: Linus Torvalds Date: Fri Sep 9 14:13:36 2022 -0400 Merge tag 'linux-kselftest-kunit-fixes-6.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull KUnit fixes from Shuah Khan: "Two fixes to test build and a fix for incorrect taint reason reporting" * tag 'linux-kselftest-kunit-fixes-6.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: tools: Add new "test" taint to kernel-chktaint kunit: fix Kconfig for build-in tests USB4 and Nitro Enclaves kunit: fix assert_type for comparison macros commit 22b2e2d6ab35fdef4439e27da2df208014d52eda Merge: 2fc1171d34de 20e0fbab1600 Author: Linus Torvalds Date: Fri Sep 9 14:06:10 2022 -0400 Merge tag 'riscv-for-linus-6.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A pair of device tree fixes for the Polarfire SOC - A fix to avoid overflowing the PMU counter array when firmware incorrectly reports the number of supported counters, which manifests on OpenSBI versions prior to 1.1 * tag 'riscv-for-linus-6.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: perf: RISC-V: fix access beyond allocated array riscv: dts: microchip: use an mpfs specific l2 compatible dt-bindings: riscv: sifive-l2: add a PolarFire SoC compatible commit 2fc1171d34deff70bf3a8338adab8ce46138aae3 Merge: 9b4509495418 a66de5283e16 Author: Linus Torvalds Date: Fri Sep 9 14:00:45 2022 -0400 Merge tag 'powerpc-6.0-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fix from Michael Ellerman: - Fix crashes on bare metal due to the new plkps driver trying to probe and call the hypervisor on non-pseries machines. Thanks to Nathan Chancellor and Dan Horák. * tag 'powerpc-6.0-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/pseries: Fix plpks crash on non-pseries commit 88700d1396bae72d9a4c23a48bbd98c1c2f53f3d Author: Eugene Shalygin Date: Fri Sep 9 17:56:53 2022 +0200 hwmon: (asus-ec-sensors) autoload module via DMI data Replace autoloading data based on the ACPI EC device with the DMI records for motherboards models. The ACPI method created a bug that when this driver returns error from the probe function because of the unsupported motherboard model, the ACPI subsystem concludes that the EC device does not work properly. Fixes: 5cd29012028d ("hwmon: (asus-ec-sensors) introduce ec_board_info struct for board data") Bug: https://bugzilla.kernel.org/show_bug.cgi?id=216412 Bug: https://bugzilla.redhat.com/show_bug.cgi?id=2121844 Signed-off-by: Eugene Shalygin Link: https://lore.kernel.org/r/20220909155654.123398-2-eugene.shalygin@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck drivers/hwmon/asus-ec-sensors.c | 408 ++++++++++++++++++++++------------------ 1 file changed, 222 insertions(+), 186 deletions(-) commit 2edb79a5fb303dff577d6a0c7d571c3bab1d1455 Merge: b34c1d538951 151e0e0fdb4d Author: Dave Airlie Date: Sat Sep 10 01:37:01 2022 +1000 Merge tag 'drm-intel-fixes-2022-09-08' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix MIPI sequence block copy from BIOS' table. (Ville) - Fix PCODE min freq setup when GuC's SLPC is in use. (Rodrigo) - Implement Workaround for eDP. (Ville) - Fix has_flat_ccs selection for DG1. (Matt) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Yxn1WpmUJnJpqq23@intel.com commit 727488e305b223ca69205ca5a3b99ace21bbbf5f Author: Alexander Sverdlin Date: Fri Sep 9 11:30:42 2022 +0200 mips: Select SPARSEMEM_EXTREME Commit c46173183657 ("MIPS: Add NUMA support for Loongson-3") has increased .bss size of the Octeon kernel from 16k to 16M. Providing the conditions for SPARSEMEM_EXTREME avoids the waste of memory. Thomas has tested the loogsoon64 kernel, where .bss is being reduced by this patch from 16.5M to 515k. Cc: Thomas Bogendoerfer Signed-off-by: Alexander Sverdlin Signed-off-by: Thomas Bogendoerfer arch/mips/Kconfig | 1 - 1 file changed, 1 deletion(-) commit b34c1d538951e1c3a6d5e585e4a95e78d8733064 Merge: c0521598a58c d76034a427a2 Author: Dave Airlie Date: Sat Sep 10 01:30:02 2022 +1000 Merge tag 'drm-misc-fixes-2022-09-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * edid: Fix EDID 1.4 range-descriptor parsing * panfrost: Fix devfreq OPP * ttm: Fix ghost-object bulk moves Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YxniKN4rK4qPp+J9@linux-uq9g commit 4d9cb92ca41dd8e905a4569ceba4716c2f39c75a Author: Pavel Begunkov Date: Fri Sep 9 12:11:49 2022 +0100 io_uring/rw: fix short rw error handling We have a couple of problems, first reports of unexpected link breakage for reads when cqe->res indicates that the IO was done in full. The reason here is partial IO with retries. TL;DR; we compare the result in __io_complete_rw_common() against req->cqe.res, but req->cqe.res doesn't store the full length but rather the length left to be done. So, when we pass the full corrected result via kiocb_done() -> __io_complete_rw_common(), it fails. The second problem is that we don't try to correct res in io_complete_rw(), which, for instance, might be a problem for O_DIRECT but when a prefix of data was cached in the page cache. We also definitely don't want to pass a corrected result into io_rw_done(). The fix here is to leave __io_complete_rw_common() alone, always pass not corrected result into it and fix it up as the last step just before actually finishing the I/O. Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov Link: https://github.com/axboe/liburing/issues/643 Reported-by: Beld Zhang Signed-off-by: Jens Axboe io_uring/rw.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 35b513a74eabf09bd718e04fd9e62b09c022807f Author: Sascha Hauer Date: Mon Aug 15 15:39:42 2022 +0200 drm/rockchip: vop2: Fix eDP/HDMI sync polarities The hsync/vsync polarities were not honoured for the eDP and HDMI ports. Add the register settings to configure the polarities as requested by the DRM_MODE_FLAG_PHSYNC/DRM_MODE_FLAG_PVSYNC flags. Signed-off-by: Sascha Hauer Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver") Tested-by: Michael Riesch Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20220815133942.4051532-1-s.hauer@pengutronix.de drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 4 ++++ 1 file changed, 4 insertions(+) commit 235fdbc32d559db21e580f85035c59372704f09e Author: Hans de Goede Date: Tue Sep 6 22:38:52 2022 +0200 drm/gma500: Fix (vblank) IRQs not working after suspend/resume Fix gnome-shell (and other page-flip users) hanging after suspend/resume because of the gma500's IRQs not working. This fixes 2 problems with the IRQ handling: 1. gma_power_off() calls gma_irq_uninstall() which does a free_irq(), but gma_power_on() called gma_irq_preinstall() + gma_irq_postinstall() which do not call request_irq. Replace the pre- + post-install calls with gma_irq_install() which does prep + request + post. 2. After fixing 1. IRQs still do not work on a Packard Bell Dot SC (Intel Atom N2600, cedarview) netbook. Cederview uses MSI interrupts and it seems that the BIOS re-configures things back to normal APIC based interrupts during S3 suspend. There is some MSI PCI-config registers save/restore code which tries to deal with this, but on the Packard Bell Dot SC this is not sufficient to restore MSI IRQ functionality after a suspend/resume. Replace the PCI-config registers save/restore with pci_disable_msi() on suspend + pci_enable_msi() on resume. Fixing e.g. gnome-shell hanging. Signed-off-by: Hans de Goede Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20220906203852.527663-4-hdegoede@redhat.com drivers/gpu/drm/gma500/cdv_device.c | 4 +--- drivers/gpu/drm/gma500/oaktrail_device.c | 5 +---- drivers/gpu/drm/gma500/power.c | 8 +------- drivers/gpu/drm/gma500/psb_drv.c | 2 +- drivers/gpu/drm/gma500/psb_drv.h | 5 +---- drivers/gpu/drm/gma500/psb_irq.c | 15 ++++++++++++--- drivers/gpu/drm/gma500/psb_irq.h | 2 +- 7 files changed, 18 insertions(+), 23 deletions(-) commit b6f25c3b94f2aadbf5cbef954db4073614943d74 Author: Hans de Goede Date: Tue Sep 6 22:38:51 2022 +0200 drm/gma500: Fix WARN_ON(lock->magic != lock) error psb_gem_unpin() calls dma_resv_lock() but the underlying ww_mutex gets destroyed by drm_gem_object_release() move the drm_gem_object_release() call in psb_gem_free_object() to after the unpin to fix the below warning: [ 79.693962] ------------[ cut here ]------------ [ 79.693992] DEBUG_LOCKS_WARN_ON(lock->magic != lock) [ 79.694015] WARNING: CPU: 0 PID: 240 at kernel/locking/mutex.c:582 __ww_mutex_lock.constprop.0+0x569/0xfb0 [ 79.694052] Modules linked in: rfcomm snd_seq_dummy snd_hrtimer qrtr bnep ath9k ath9k_common ath9k_hw snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel ath3k snd_intel_dspcfg mac80211 snd_intel_sdw_acpi btusb snd_hda_codec btrtl btbcm btintel btmtk bluetooth at24 snd_hda_core snd_hwdep uvcvideo snd_seq libarc4 videobuf2_vmalloc ath videobuf2_memops videobuf2_v4l2 videobuf2_common snd_seq_device videodev acer_wmi intel_powerclamp coretemp mc snd_pcm joydev sparse_keymap ecdh_generic pcspkr wmi_bmof cfg80211 i2c_i801 i2c_smbus snd_timer snd r8169 rfkill lpc_ich soundcore acpi_cpufreq zram rtsx_pci_sdmmc mmc_core serio_raw rtsx_pci gma500_gfx(E) video wmi ip6_tables ip_tables i2c_dev fuse [ 79.694436] CPU: 0 PID: 240 Comm: plymouthd Tainted: G W E 6.0.0-rc3+ #490 [ 79.694457] Hardware name: Packard Bell dot s/SJE01_CT, BIOS V1.10 07/23/2013 [ 79.694469] RIP: 0010:__ww_mutex_lock.constprop.0+0x569/0xfb0 [ 79.694496] Code: ff 85 c0 0f 84 15 fb ff ff 8b 05 ca 3c 11 01 85 c0 0f 85 07 fb ff ff 48 c7 c6 30 cb 84 aa 48 c7 c7 a3 e1 82 aa e8 ac 29 f8 ff <0f> 0b e9 ed fa ff ff e8 5b 83 8a ff 85 c0 74 10 44 8b 0d 98 3c 11 [ 79.694513] RSP: 0018:ffffad1dc048bbe0 EFLAGS: 00010282 [ 79.694623] RAX: 0000000000000028 RBX: 0000000000000000 RCX: 0000000000000000 [ 79.694636] RDX: 0000000000000001 RSI: ffffffffaa8b0ffc RDI: 00000000ffffffff [ 79.694650] RBP: ffffad1dc048bc80 R08: 0000000000000000 R09: ffffad1dc048ba90 [ 79.694662] R10: 0000000000000003 R11: ffffffffaad62fe8 R12: ffff9ff302103138 [ 79.694675] R13: ffff9ff306ec8000 R14: ffff9ff307779078 R15: ffff9ff3014c0270 [ 79.694690] FS: 00007ff1cccf1740(0000) GS:ffff9ff3bc200000(0000) knlGS:0000000000000000 [ 79.694705] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 79.694719] CR2: 0000559ecbcb4420 CR3: 0000000013210000 CR4: 00000000000006f0 [ 79.694734] Call Trace: [ 79.694749] [ 79.694761] ? __schedule+0x47f/0x1670 [ 79.694796] ? psb_gem_unpin+0x27/0x1a0 [gma500_gfx] [ 79.694830] ? lock_is_held_type+0xe3/0x140 [ 79.694864] ? ww_mutex_lock+0x38/0xa0 [ 79.694885] ? __cond_resched+0x1c/0x30 [ 79.694902] ww_mutex_lock+0x38/0xa0 [ 79.694925] psb_gem_unpin+0x27/0x1a0 [gma500_gfx] [ 79.694964] psb_gem_unpin+0x199/0x1a0 [gma500_gfx] [ 79.694996] drm_gem_object_release_handle+0x50/0x60 [ 79.695020] ? drm_gem_object_handle_put_unlocked+0xf0/0xf0 [ 79.695042] idr_for_each+0x4b/0xb0 [ 79.695066] ? _raw_spin_unlock_irqrestore+0x30/0x60 [ 79.695095] drm_gem_release+0x1c/0x30 [ 79.695118] drm_file_free.part.0+0x1ea/0x260 [ 79.695150] drm_release+0x6a/0x120 [ 79.695175] __fput+0x9f/0x260 [ 79.695203] task_work_run+0x59/0xa0 [ 79.695227] do_exit+0x387/0xbe0 [ 79.695250] ? seqcount_lockdep_reader_access.constprop.0+0x82/0x90 [ 79.695275] ? lockdep_hardirqs_on+0x7d/0x100 [ 79.695304] do_group_exit+0x33/0xb0 [ 79.695331] __x64_sys_exit_group+0x14/0x20 [ 79.695353] do_syscall_64+0x58/0x80 [ 79.695376] ? up_read+0x17/0x20 [ 79.695401] ? lock_is_held_type+0xe3/0x140 [ 79.695429] ? asm_exc_page_fault+0x22/0x30 [ 79.695450] ? lockdep_hardirqs_on+0x7d/0x100 [ 79.695473] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 79.695493] RIP: 0033:0x7ff1ccefe3f1 [ 79.695516] Code: Unable to access opcode bytes at RIP 0x7ff1ccefe3c7. [ 79.695607] RSP: 002b:00007ffed4413378 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 79.695629] RAX: ffffffffffffffda RBX: 00007ff1cd0159e0 RCX: 00007ff1ccefe3f1 [ 79.695644] RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000 [ 79.695656] RBP: 0000000000000000 R08: ffffffffffffff80 R09: 00007ff1cd020b20 [ 79.695671] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff1cd0159e0 [ 79.695684] R13: 0000000000000000 R14: 00007ff1cd01aee8 R15: 00007ff1cd01af00 [ 79.695733] [ 79.695746] irq event stamp: 725979 [ 79.695757] hardirqs last enabled at (725979): [] finish_task_switch.isra.0+0xe4/0x3f0 [ 79.695780] hardirqs last disabled at (725978): [] __schedule+0xdd3/0x1670 [ 79.695803] softirqs last enabled at (725974): [] __irq_exit_rcu+0xed/0x160 [ 79.695825] softirqs last disabled at (725969): [] __irq_exit_rcu+0xed/0x160 [ 79.695845] ---[ end trace 0000000000000000 ]--- Signed-off-by: Hans de Goede Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20220906203852.527663-3-hdegoede@redhat.com drivers/gpu/drm/gma500/gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 63e37a79f7bd939314997e29c2f5a9f0ef184281 Author: Hans de Goede Date: Tue Sep 6 22:38:50 2022 +0200 drm/gma500: Fix BUG: sleeping function called from invalid context errors gma_crtc_page_flip() was holding the event_lock spinlock while calling crtc_funcs->mode_set_base() which takes ww_mutex. The only reason to hold event_lock is to clear gma_crtc->page_flip_event on mode_set_base() errors. Instead unlock it after setting gma_crtc->page_flip_event and on errors re-take the lock and clear gma_crtc->page_flip_event it it is still set. This fixes the following WARN/stacktrace: [ 512.122953] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:870 [ 512.123004] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 1253, name: gnome-shell [ 512.123031] preempt_count: 1, expected: 0 [ 512.123048] RCU nest depth: 0, expected: 0 [ 512.123066] INFO: lockdep is turned off. [ 512.123080] irq event stamp: 0 [ 512.123094] hardirqs last enabled at (0): [<0000000000000000>] 0x0 [ 512.123134] hardirqs last disabled at (0): [] copy_process+0x9fc/0x1de0 [ 512.123176] softirqs last enabled at (0): [] copy_process+0x9fc/0x1de0 [ 512.123207] softirqs last disabled at (0): [<0000000000000000>] 0x0 [ 512.123233] Preemption disabled at: [ 512.123241] [<0000000000000000>] 0x0 [ 512.123275] CPU: 3 PID: 1253 Comm: gnome-shell Tainted: G W 5.19.0+ #1 [ 512.123304] Hardware name: Packard Bell dot s/SJE01_CT, BIOS V1.10 07/23/2013 [ 512.123323] Call Trace: [ 512.123346] [ 512.123370] dump_stack_lvl+0x5b/0x77 [ 512.123412] __might_resched.cold+0xff/0x13a [ 512.123458] ww_mutex_lock+0x1e/0xa0 [ 512.123495] psb_gem_pin+0x2c/0x150 [gma500_gfx] [ 512.123601] gma_pipe_set_base+0x76/0x240 [gma500_gfx] [ 512.123708] gma_crtc_page_flip+0x95/0x130 [gma500_gfx] [ 512.123808] drm_mode_page_flip_ioctl+0x57d/0x5d0 [ 512.123897] ? drm_mode_cursor2_ioctl+0x10/0x10 [ 512.123936] drm_ioctl_kernel+0xa1/0x150 [ 512.123984] drm_ioctl+0x21f/0x420 [ 512.124025] ? drm_mode_cursor2_ioctl+0x10/0x10 [ 512.124070] ? rcu_read_lock_bh_held+0xb/0x60 [ 512.124104] ? lock_release+0x1ef/0x2d0 [ 512.124161] __x64_sys_ioctl+0x8d/0xd0 [ 512.124203] do_syscall_64+0x58/0x80 [ 512.124239] ? do_syscall_64+0x67/0x80 [ 512.124267] ? trace_hardirqs_on_prepare+0x55/0xe0 [ 512.124300] ? do_syscall_64+0x67/0x80 [ 512.124340] ? rcu_read_lock_sched_held+0x10/0x80 [ 512.124377] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 512.124411] RIP: 0033:0x7fcc4a70740f [ 512.124442] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 18 48 8b 44 24 18 64 48 2b 04 25 28 00 00 [ 512.124470] RSP: 002b:00007ffda73f5390 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 512.124503] RAX: ffffffffffffffda RBX: 000055cc9e474500 RCX: 00007fcc4a70740f [ 512.124524] RDX: 00007ffda73f5420 RSI: 00000000c01864b0 RDI: 0000000000000009 [ 512.124544] RBP: 00007ffda73f5420 R08: 000055cc9c0b0cb0 R09: 0000000000000034 [ 512.124564] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000c01864b0 [ 512.124584] R13: 0000000000000009 R14: 000055cc9df484d0 R15: 000055cc9af5d0c0 [ 512.124647] Signed-off-by: Hans de Goede Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20220906203852.527663-2-hdegoede@redhat.com drivers/gpu/drm/gma500/gma_display.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 745ed37277c5a7202180aa276c87db1362c90fe5 Author: Jens Axboe Date: Thu Sep 8 17:26:59 2022 -0600 block: add missing request flags to debugfs code We're missing TIMED_OUT and RESV. Particularly the former is handy for debugging, let's get them added. Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 2 ++ 1 file changed, 2 insertions(+) commit 9b4509495418a0effe964b0aad9a522be5a3b6d5 Merge: 725f3f3b2708 5da431b71d4b Author: Linus Torvalds Date: Fri Sep 9 07:54:19 2022 -0400 Merge tag 'for-6.0-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few more fixes to zoned mode and one regression fix for chunk limit: - Zoned mode fixes: - fix how wait/wake up is done when finishing zone - fix zone append limit in emulated mode - fix mount on devices with conventional zones - fix regression, user settable data chunk limit got accidentally lowered and causes allocation problems on some profiles (raid0, raid1)" * tag 'for-6.0-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix the max chunk size and stripe length calculation btrfs: zoned: fix mounting with conventional zones btrfs: zoned: set pseudo max append zone limit in zone emulation mode btrfs: zoned: fix API misuse of zone finish waiting commit 64ae13ed478428135cddc2f1113dff162d8112d4 Author: Ludovic Cintrat Date: Wed Sep 7 12:08:13 2022 +0200 net: core: fix flow symmetric hash __flow_hash_consistentify() wrongly swaps ipv4 addresses in few cases. This function is indirectly used by __skb_get_hash_symmetric(), which is used to fanout packets in AF_PACKET. Intrusion detection systems may be impacted by this issue. __flow_hash_consistentify() computes the addresses difference then swaps them if the difference is negative. In few cases src - dst and dst - src are both negative. The following snippet mimics __flow_hash_consistentify(): ``` #include #include int main(int argc, char** argv) { int diffs_d, diffd_s; uint32_t dst = 0xb225a8c0; /* 178.37.168.192 --> 192.168.37.178 */ uint32_t src = 0x3225a8c0; /* 50.37.168.192 --> 192.168.37.50 */ uint32_t dst2 = 0x3325a8c0; /* 51.37.168.192 --> 192.168.37.51 */ diffs_d = src - dst; diffd_s = dst - src; printf("src:%08x dst:%08x, diff(s-d)=%d(0x%x) diff(d-s)=%d(0x%x)\n", src, dst, diffs_d, diffs_d, diffd_s, diffd_s); diffs_d = src - dst2; diffd_s = dst2 - src; printf("src:%08x dst:%08x, diff(s-d)=%d(0x%x) diff(d-s)=%d(0x%x)\n", src, dst2, diffs_d, diffs_d, diffd_s, diffd_s); return 0; } ``` Results: src:3225a8c0 dst:b225a8c0, \ diff(s-d)=-2147483648(0x80000000) \ diff(d-s)=-2147483648(0x80000000) src:3225a8c0 dst:3325a8c0, \ diff(s-d)=-16777216(0xff000000) \ diff(d-s)=16777216(0x1000000) In the first case the addresses differences are always < 0, therefore __flow_hash_consistentify() always swaps, thus dst->src and src->dst packets have differents hashes. Fixes: c3f8324188fa8 ("net: Add full IPv6 addresses to flow_keys") Signed-off-by: Ludovic Cintrat Signed-off-by: David S. Miller net/core/flow_dissector.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 81225b2ea161af48e093f58e8dfee6d705b16af4 Author: Lu Wei Date: Wed Sep 7 18:12:04 2022 +0800 ipvlan: Fix out-of-bound bugs caused by unset skb->mac_header If an AF_PACKET socket is used to send packets through ipvlan and the default xmit function of the AF_PACKET socket is changed from dev_queue_xmit() to packet_direct_xmit() via setsockopt() with the option name of PACKET_QDISC_BYPASS, the skb->mac_header may not be reset and remains as the initial value of 65535, this may trigger slab-out-of-bounds bugs as following: ================================================================= UG: KASAN: slab-out-of-bounds in ipvlan_xmit_mode_l2+0xdb/0x330 [ipvlan] PU: 2 PID: 1768 Comm: raw_send Kdump: loaded Not tainted 6.0.0-rc4+ #6 ardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc33 all Trace: print_address_description.constprop.0+0x1d/0x160 print_report.cold+0x4f/0x112 kasan_report+0xa3/0x130 ipvlan_xmit_mode_l2+0xdb/0x330 [ipvlan] ipvlan_start_xmit+0x29/0xa0 [ipvlan] __dev_direct_xmit+0x2e2/0x380 packet_direct_xmit+0x22/0x60 packet_snd+0x7c9/0xc40 sock_sendmsg+0x9a/0xa0 __sys_sendto+0x18a/0x230 __x64_sys_sendto+0x74/0x90 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd The root cause is: 1. packet_snd() only reset skb->mac_header when sock->type is SOCK_RAW and skb->protocol is not specified as in packet_parse_headers() 2. packet_direct_xmit() doesn't reset skb->mac_header as dev_queue_xmit() In this case, skb->mac_header is 65535 when ipvlan_xmit_mode_l2() is called. So when ipvlan_xmit_mode_l2() gets mac header with eth_hdr() which use "skb->head + skb->mac_header", out-of-bound access occurs. This patch replaces eth_hdr() with skb_eth_hdr() in ipvlan_xmit_mode_l2() and reset mac header in multicast to solve this out-of-bound bug. Fixes: 2ad7bf363841 ("ipvlan: Initial check-in of the IPVLAN driver.") Signed-off-by: Lu Wei Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 725f3f3b2708d8f3fe56df8113bfdc7380d52dc9 Merge: 83dfc0e2fd00 873aefb376bb Author: Linus Torvalds Date: Fri Sep 9 07:44:33 2022 -0400 Merge tag 'vfio-v6.0-rc5' of https://github.com/awilliam/linux-vfio Pull VFIO fix from Alex Williamson: - Fix zero page refcount leak (Alex Williamson) * tag 'vfio-v6.0-rc5' of https://github.com/awilliam/linux-vfio: vfio/type1: Unpin zero pages commit 83dfc0e2fd008b6fd2df70f6635cc4def41da056 Merge: d8a450a80ef1 09e3e3159cd4 Author: Linus Torvalds Date: Fri Sep 9 07:36:10 2022 -0400 Merge tag 'sound-6.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Lots of small fixes for various drivers at this time, hopefully it will be the last big bump before 6.0 release. The significant changes are regression fixes for (yet again) HD-audio memory allocations and USB-audio PCM parameter handling, while there are many small ASoC device-specific fixes as well as a few out-of-bounds and race issues spotted by fuzzers" * tag 'sound-6.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (29 commits) ALSA: usb-audio: Clear fixed clock rate at closing EP ALSA: emu10k1: Fix out of bounds access in snd_emu10k1_pcm_channel_alloc() ALSA: hda: Once again fix regression of page allocations with IOMMU ALSA: usb-audio: Fix an out-of-bounds bug in __snd_usb_parse_audio_interface() ALSA: hda/tegra: Align BDL entry to 4KB boundary ALSA: hda/sigmatel: Fix unused variable warning for beep power change ALSA: pcm: oss: Fix race at SNDCTL_DSP_SYNC ALSA: hda/sigmatel: Keep power up while beep is enabled ALSA: aloop: Fix random zeros in capture data when using jiffies timer ALSA: usb-audio: Split endpoint setups for hw_params and prepare ALSA: usb-audio: Register card again for iface over delayed_register option ALSA: usb-audio: Inform the delayed registration more properly ASoC: fsl_aud2htx: Add error handler for pm_runtime_enable ASoC: fsl_aud2htx: register platform component before registering cpu dai ASoC: SOF: ipc4-topology: fix alh_group_ida max value ASoC: mchp-spdiftx: Fix clang -Wbitfield-constant-conversion ASoC: SOF: Kconfig: Make IPC_MESSAGE_INJECTOR depend on SND_SOC_SOF ASoC: SOF: Kconfig: Make IPC_FLOOD_TEST depend on SND_SOC_SOF ASoC: fsl_mqs: Fix supported clock DAI format ASoC: nau8540: Implement hw constraint for rates ... commit 6463d3930ba5b6addcfc8f80a4543976a2fc7656 Author: Stuart Menefy Date: Thu Sep 8 16:52:43 2022 +0100 drm/meson: Fix OSD1 RGB to YCbCr coefficient VPP_WRAP_OSD1_MATRIX_COEF22.Coeff22 is documented as being bits 0-12, not 16-28. Without this the output tends to have a pink hue, changing it results in better color accuracy. The vendor kernel doesn't use this register. However the code which sets VIU2_OSD1_MATRIX_COEF22 also uses bits 0-12. There is a slightly different style of registers for configuring some of the other matrices, which do use bits 16-28 for this coefficient, but those have names ending in MATRIX_COEF22_30, and this is not one of those. Signed-off-by: Stuart Menefy Fixes: 728883948b0d ("drm/meson: Add G12A Support for VIU setup") Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20220908155243.687143-1-stuart.menefy@mathembedded.com drivers/gpu/drm/meson/meson_viu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6836829c8ea453c9e3e518e61539e35881c8ed5f Author: Stuart Menefy Date: Thu Sep 8 16:51:03 2022 +0100 drm/meson: Correct OSD1 global alpha value VIU_OSD1_CTRL_STAT.GLOBAL_ALPHA is a 9 bit field, so the maximum value is 0x100 not 0xff. This matches the vendor kernel. Signed-off-by: Stuart Menefy Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller") Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20220908155103.686904-1-stuart.menefy@mathembedded.com drivers/gpu/drm/meson/meson_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8a450a80ef1c858c3095180f75284873d8297e8 Merge: 460a75a6f7cd faf59ec8c3c3 Author: Linus Torvalds Date: Fri Sep 9 07:31:17 2022 -0400 Merge tag 'perf-tools-fixes-for-v6.0-2022-09-08' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix per-thread mmaps for multi-threaded targets, noticed with 'perf top --pid' with multithreaded targets - Fix synthesis failure warnings in 'perf record' - Fix L2 Topdown metrics disappearance for raw events in 'perf stat' - Fix out of bound access in some CPU masks - Fix segfault if there is no CPU PMU table and a metric is sought, noticed when building with NO_JEVENTS=1 - Skip dummy event attr check in 'perf script' fixing nonsensical warning about UREGS attribute not set, as 'dummy' events have no samples - Fix 'iregs' field handling with dummy events on hybrid systems in 'perf script' - Prevent potential memory leak in c2c_he_zalloc() in 'perf c2c' - Don't install data files with x permissions - Fix types for print format in dlfilter-show-cycles - Switch deprecated openssl MD5_* functions to new EVP API in 'genelf' - Remove redundant word 'contention' in 'perf lock' help message * tag 'perf-tools-fixes-for-v6.0-2022-09-08' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf record: Fix synthesis failure warnings perf tools: Don't install data files with x permissions perf script: Fix Cannot print 'iregs' field for hybrid systems perf lock: Remove redundant word 'contention' in help message perf dlfilter dlfilter-show-cycles: Fix types for print format libperf evlist: Fix per-thread mmaps for multi-threaded targets perf c2c: Prevent potential memory leak in c2c_he_zalloc() perf genelf: Switch deprecated openssl MD5_* functions to new EVP API tools/perf: Fix out of bound access to cpu mask array perf affinity: Fix out of bound access to "sched_cpus" mask perf stat: Fix L2 Topdown metrics disappear for raw events perf script: Skip dummy event attr check perf metric: Return early if no CPU PMU table exists commit 460a75a6f7cd22b7b0522c00fe778c5146b9a96f Merge: f448dda895ed 47311db8e8f3 Author: Linus Torvalds Date: Fri Sep 9 07:27:44 2022 -0400 Merge tag 'trace-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: - Do not stop trace events in modules if TAINT_TEST is set - Do not clobber mount options when tracefs is mounted a second time - Prevent crash of kprobes in gate area - Add static annotation to some non global functions - Add some entries into the MAINTAINERS file - Fix check of event_mutex held when accessing trigger list - Add some __init/__exit annotations - Fix reporting of what called hardirq_{enable,disable}_ip function * tag 'trace-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracefs: Only clobber mode/uid/gid on remount if asked kprobes: Prohibit probes in gate area rv/reactor: add __init/__exit annotations to module init/exit funcs tracing: Fix to check event_mutex is held while accessing trigger list tracing: hold caller_addr to hardirq_{enable,disable}_ip tracepoint: Allow trace events in modules with TAINT_TEST MAINTAINERS: add scripts/tracing/ to TRACING MAINTAINERS: Add Runtime Verification (RV) entry rv/monitors: Make monitor's automata definition static commit f448dda895edcee1bd92a3ec6c4d9d210523b853 Merge: 506357871c18 8cbb2b50ee2d Author: Linus Torvalds Date: Fri Sep 9 07:23:29 2022 -0400 Merge tag 'asm-generic-fixes-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull SOFTIRQ_ON_OWN_STACK rework from Arnd Bergmann: "Just one fixup patch, reworking the softirq_on_own_stack logic for preempt-rt kernels as discussed in https://lore.kernel.org/all/CAHk-=wgZSD3W2y6yczad2Am=EfHYyiPzTn3CfXxrriJf9i5W5w@mail.gmail.com/" * tag 'asm-generic-fixes-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: asm-generic: Conditionally enable do_softirq_own_stack() via Kconfig. commit df2a60173a61a5acf44fca2cfb2d8d9f5b810a3f Merge: 26b1224903b3 559c36c5a8d7 Author: David S. Miller Date: Fri Sep 9 10:06:34 2022 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Florian Westhal says: ==================== netfilter: bugfixes for net The following set contains four netfilter patches for your *net* tree. When there are multiple Contact headers in a SIP message its possible the next headers won't be found because the SIP helper confuses relative and absolute offsets in the message. From Igor Ryzhov. Make the nft_concat_range self-test support socat, this makes the selftest pass on my test VM, from myself. nf_conntrack_irc helper can be tricked into opening a local port forward that the client never requested by embedding a DCC message in a PING request sent to the client. Fix from David Leadbeater. Both have been broken since the kernel 2.6.x days. The 'osf' match might indicate success while it could not find anything, broken since 5.2 . Fix from Pablo Neira. ==================== Signed-off-by: David S. Miller commit 14c7d905283744809e6b82efae2f490660a11cda Author: Gil Fine Date: Thu Sep 8 13:43:20 2022 +0300 thunderbolt: Add support for Intel Maple Ridge single port controller Add support for Maple Ridge discrete USB4 host controller from Intel which has a single USB4 port (versus the already supported dual port Maple Ridge USB4 host controller). Cc: stable@vger.kernel.org Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg drivers/thunderbolt/icm.c | 1 + drivers/thunderbolt/nhi.h | 1 + 2 files changed, 2 insertions(+) commit 00801cd92d91e94aa04d687f9bb9a9104e7c3d46 Author: NeilBrown Date: Thu Sep 8 12:08:40 2022 +1000 NFSD: fix regression with setting ACLs. A recent patch moved ACL setting into nfsd_setattr(). Unfortunately it didn't work as nfsd_setattr() aborts early if iap->ia_valid is 0. Remove this test, and instead avoid calling notify_change() when ia_valid is 0. This means that nfsd_setattr() will now *always* lock the inode. Previously it didn't if only a ATTR_MODE change was requested on a symlink (see Commit 15b7a1b86d66 ("[PATCH] knfsd: fix setattr-on-symlink error return")). I don't think this change really matters. Fixes: c0cbe70742f4 ("NFSD: add posix ACLs to struct nfsd_attrs") Signed-off-by: NeilBrown Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/vfs.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 7e9c323c52b379d261a72dc7bd38120a761a93cd Author: Chao Yu Date: Wed Aug 31 22:54:54 2022 +0800 mm/slub: fix to return errno if kmalloc() fails In create_unique_id(), kmalloc(, GFP_KERNEL) can fail due to out-of-memory, if it fails, return errno correctly rather than triggering panic via BUG_ON(); kernel BUG at mm/slub.c:5893! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP Call trace: sysfs_slab_add+0x258/0x260 mm/slub.c:5973 __kmem_cache_create+0x60/0x118 mm/slub.c:4899 create_cache mm/slab_common.c:229 [inline] kmem_cache_create_usercopy+0x19c/0x31c mm/slab_common.c:335 kmem_cache_create+0x1c/0x28 mm/slab_common.c:390 f2fs_kmem_cache_create fs/f2fs/f2fs.h:2766 [inline] f2fs_init_xattr_caches+0x78/0xb4 fs/f2fs/xattr.c:808 f2fs_fill_super+0x1050/0x1e0c fs/f2fs/super.c:4149 mount_bdev+0x1b8/0x210 fs/super.c:1400 f2fs_mount+0x44/0x58 fs/f2fs/super.c:4512 legacy_get_tree+0x30/0x74 fs/fs_context.c:610 vfs_get_tree+0x40/0x140 fs/super.c:1530 do_new_mount+0x1dc/0x4e4 fs/namespace.c:3040 path_mount+0x358/0x914 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __arm64_sys_mount+0x2f8/0x408 fs/namespace.c:3568 Cc: Fixes: 81819f0fc8285 ("SLUB core") Reported-by: syzbot+81684812ea68216e08c5@syzkaller.appspotmail.com Reviewed-by: Muchun Song Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Chao Yu Acked-by: David Rientjes Signed-off-by: Vlastimil Babka mm/slub.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 47311db8e8f33011d90dee76b39c8886120cdda4 Author: Brian Norris Date: Fri Aug 26 17:44:17 2022 -0700 tracefs: Only clobber mode/uid/gid on remount if asked Users may have explicitly configured their tracefs permissions; we shouldn't overwrite those just because a second mount appeared. Only clobber if the options were provided at mount time. Note: the previous behavior was especially surprising in the presence of automounted /sys/kernel/debug/tracing/. Existing behavior: ## Pre-existing status: tracefs is 0755. # stat -c '%A' /sys/kernel/tracing/ drwxr-xr-x ## (Re)trigger the automount. # umount /sys/kernel/debug/tracing # stat -c '%A' /sys/kernel/debug/tracing/. drwx------ ## Unexpected: the automount changed mode for other mount instances. # stat -c '%A' /sys/kernel/tracing/ drwx------ New behavior (after this change): ## Pre-existing status: tracefs is 0755. # stat -c '%A' /sys/kernel/tracing/ drwxr-xr-x ## (Re)trigger the automount. # umount /sys/kernel/debug/tracing # stat -c '%A' /sys/kernel/debug/tracing/. drwxr-xr-x ## Expected: the automount does not change other mount instances. # stat -c '%A' /sys/kernel/tracing/ drwxr-xr-x Link: https://lkml.kernel.org/r/20220826174353.2.Iab6e5ea57963d6deca5311b27fb7226790d44406@changeid Cc: stable@vger.kernel.org Fixes: 4282d60689d4f ("tracefs: Add new tracefs file system") Signed-off-by: Brian Norris Signed-off-by: Steven Rostedt (Google) fs/tracefs/inode.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) commit 1efda38d6f9ba26ac88b359c6277f1172db03f1e Author: Christian A. Ehrhardt Date: Wed Sep 7 22:09:17 2022 +0200 kprobes: Prohibit probes in gate area The system call gate area counts as kernel text but trying to install a kprobe in this area fails with an Oops later on. To fix this explicitly disallow the gate area for kprobes. Found by syzkaller with the following reproducer: perf_event_open$cgroup(&(0x7f00000001c0)={0x6, 0x80, 0x0, 0x0, 0x0, 0x0, 0x80ffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, @perf_config_ext={0x0, 0xffffffffff600000}}, 0xffffffffffffffff, 0x0, 0xffffffffffffffff, 0x0) Sample report: BUG: unable to handle page fault for address: fffffbfff3ac6000 PGD 6dfcb067 P4D 6dfcb067 PUD 6df8f067 PMD 6de4d067 PTE 0 Oops: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 PID: 21978 Comm: syz-executor.2 Not tainted 6.0.0-rc3-00363-g7726d4c3e60b-dirty #6 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 RIP: 0010:__insn_get_emulate_prefix arch/x86/lib/insn.c:91 [inline] RIP: 0010:insn_get_emulate_prefix arch/x86/lib/insn.c:106 [inline] RIP: 0010:insn_get_prefixes.part.0+0xa8/0x1110 arch/x86/lib/insn.c:134 Code: 49 be 00 00 00 00 00 fc ff df 48 8b 40 60 48 89 44 24 08 e9 81 00 00 00 e8 e5 4b 39 ff 4c 89 fa 4c 89 f9 48 c1 ea 03 83 e1 07 <42> 0f b6 14 32 38 ca 7f 08 84 d2 0f 85 06 10 00 00 48 89 d8 48 89 RSP: 0018:ffffc900088bf860 EFLAGS: 00010246 RAX: 0000000000040000 RBX: ffffffff9b9bebc0 RCX: 0000000000000000 RDX: 1ffffffff3ac6000 RSI: ffffc90002d82000 RDI: ffffc900088bf9e8 RBP: ffffffff9d630001 R08: 0000000000000000 R09: ffffc900088bf9e8 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001 R13: ffffffff9d630000 R14: dffffc0000000000 R15: ffffffff9d630000 FS: 00007f63eef63640(0000) GS:ffff88806d000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: fffffbfff3ac6000 CR3: 0000000029d90005 CR4: 0000000000770ef0 PKRU: 55555554 Call Trace: insn_get_prefixes arch/x86/lib/insn.c:131 [inline] insn_get_opcode arch/x86/lib/insn.c:272 [inline] insn_get_modrm+0x64a/0x7b0 arch/x86/lib/insn.c:343 insn_get_sib+0x29a/0x330 arch/x86/lib/insn.c:421 insn_get_displacement+0x350/0x6b0 arch/x86/lib/insn.c:464 insn_get_immediate arch/x86/lib/insn.c:632 [inline] insn_get_length arch/x86/lib/insn.c:707 [inline] insn_decode+0x43a/0x490 arch/x86/lib/insn.c:747 can_probe+0xfc/0x1d0 arch/x86/kernel/kprobes/core.c:282 arch_prepare_kprobe+0x79/0x1c0 arch/x86/kernel/kprobes/core.c:739 prepare_kprobe kernel/kprobes.c:1160 [inline] register_kprobe kernel/kprobes.c:1641 [inline] register_kprobe+0xb6e/0x1690 kernel/kprobes.c:1603 __register_trace_kprobe kernel/trace/trace_kprobe.c:509 [inline] __register_trace_kprobe+0x26a/0x2d0 kernel/trace/trace_kprobe.c:477 create_local_trace_kprobe+0x1f7/0x350 kernel/trace/trace_kprobe.c:1833 perf_kprobe_init+0x18c/0x280 kernel/trace/trace_event_perf.c:271 perf_kprobe_event_init+0xf8/0x1c0 kernel/events/core.c:9888 perf_try_init_event+0x12d/0x570 kernel/events/core.c:11261 perf_init_event kernel/events/core.c:11325 [inline] perf_event_alloc.part.0+0xf7f/0x36a0 kernel/events/core.c:11619 perf_event_alloc kernel/events/core.c:12059 [inline] __do_sys_perf_event_open+0x4a8/0x2a00 kernel/events/core.c:12157 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f63ef7efaed Code: 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f63eef63028 EFLAGS: 00000246 ORIG_RAX: 000000000000012a RAX: ffffffffffffffda RBX: 00007f63ef90ff80 RCX: 00007f63ef7efaed RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 00000000200001c0 RBP: 00007f63ef86019c R08: 0000000000000000 R09: 0000000000000000 R10: ffffffffffffffff R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000002 R14: 00007f63ef90ff80 R15: 00007f63eef43000 Modules linked in: CR2: fffffbfff3ac6000 ---[ end trace 0000000000000000 ]--- RIP: 0010:__insn_get_emulate_prefix arch/x86/lib/insn.c:91 [inline] RIP: 0010:insn_get_emulate_prefix arch/x86/lib/insn.c:106 [inline] RIP: 0010:insn_get_prefixes.part.0+0xa8/0x1110 arch/x86/lib/insn.c:134 Code: 49 be 00 00 00 00 00 fc ff df 48 8b 40 60 48 89 44 24 08 e9 81 00 00 00 e8 e5 4b 39 ff 4c 89 fa 4c 89 f9 48 c1 ea 03 83 e1 07 <42> 0f b6 14 32 38 ca 7f 08 84 d2 0f 85 06 10 00 00 48 89 d8 48 89 RSP: 0018:ffffc900088bf860 EFLAGS: 00010246 RAX: 0000000000040000 RBX: ffffffff9b9bebc0 RCX: 0000000000000000 RDX: 1ffffffff3ac6000 RSI: ffffc90002d82000 RDI: ffffc900088bf9e8 RBP: ffffffff9d630001 R08: 0000000000000000 R09: ffffc900088bf9e8 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001 R13: ffffffff9d630000 R14: dffffc0000000000 R15: ffffffff9d630000 FS: 00007f63eef63640(0000) GS:ffff88806d000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: fffffbfff3ac6000 CR3: 0000000029d90005 CR4: 0000000000770ef0 PKRU: 55555554 ================================================================== Link: https://lkml.kernel.org/r/20220907200917.654103-1-lk@c--e.de cc: "Naveen N. Rao" cc: Anil S Keshavamurthy cc: "David S. Miller" Cc: stable@vger.kernel.org Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Acked-by: Masami Hiramatsu (Google) Signed-off-by: Christian A. Ehrhardt Signed-off-by: Steven Rostedt (Google) kernel/kprobes.c | 1 + 1 file changed, 1 insertion(+) commit 20e0fbab16003ae23a9e86a64bcb93e3121587ca Author: Sergey Matyukevich Date: Tue Aug 30 18:53:04 2022 +0300 perf: RISC-V: fix access beyond allocated array SBI firmware should report total number of firmware and hardware counters including unused ones or special ones. In this case the kernel doesn't need to make any assumptions about gaps in reported counters, e.g. excluded timer counter. That was fixed in OpenSBI v1.1 by commit 3f66465fb6bf ("lib: pmu: allow to use the highest available counter"). This kernel patch has no effect if SBI firmware behaves correctly. However it eliminates access beyond the allocated pmu_ctr_list if the kernel is used with OpenSBI older than v1.1. Fixes: e9991434596f ("RISC-V: Add perf platform driver based on SBI PMU extension") Signed-off-by: Sergey Matyukevich Reviewed-by: Atish Patra Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220830155306.301714-2-geomatsi@gmail.com Signed-off-by: Palmer Dabbelt drivers/perf/riscv_pmu_sbi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 809f23c0423a43266e47a7dc67e95b5cb4d1cbfc Author: Brett Creeley Date: Thu Sep 1 16:34:40 2022 +0200 iavf: Fix cached head and tail value for iavf_get_tx_pending The underlying hardware may or may not allow reading of the head or tail registers and it really makes no difference if we use the software cached values. So, always used the software cached values. Fixes: 9c6c12595b73 ("i40e: Detection and recovery of TX queue hung logic moved to service_task from tx_timeout") Signed-off-by: Brett Creeley Co-developed-by: Norbert Zulinski Signed-off-by: Norbert Zulinski Signed-off-by: Mateusz Palczewski Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf_txrx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f66b98c868f2c1ffcb1139ea19d6f20983f1f9dc Author: Sylwester Dziedziuch Date: Thu Sep 1 16:32:06 2022 +0200 iavf: Fix change VF's mac address Previously changing mac address gives false negative because ip link set address return with RTNLINK: Permission denied. In iavf_set_mac was check if PF handled our mac set request, even before filter was added to list. Because this check returns always true and it never waits for PF's response. Move iavf_is_mac_handled to wait_event_interruptible_timeout instead of false. Now it will wait for PF's response and then check if address was added or rejected. Fixes: 35a2443d0910 ("iavf: Add waiting for response from PF in set mac") Signed-off-by: Sylwester Dziedziuch Co-developed-by: Norbert Zulinski Signed-off-by: Norbert Zulinski Signed-off-by: Mateusz Palczewski Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf_main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit a509702cac95a8b450228a037c8542f57e538e5b Author: Ding Hui Date: Wed Aug 17 18:53:18 2022 +0800 ice: Fix crash by keep old cfg when update TCs more than queues There are problems if allocated queues less than Traffic Classes. Commit a632b2a4c920 ("ice: ethtool: Prohibit improper channel config for DCB") already disallow setting less queues than TCs. Another case is if we first set less queues, and later update more TCs config due to LLDP, ice_vsi_cfg_tc() will failed but left dirty num_txq/rxq and tc_cfg in vsi, that will cause invalid pointer access. [ 95.968089] ice 0000:3b:00.1: More TCs defined than queues/rings allocated. [ 95.968092] ice 0000:3b:00.1: Trying to use more Rx queues (8), than were allocated (1)! [ 95.968093] ice 0000:3b:00.1: Failed to config TC for VSI index: 0 [ 95.969621] general protection fault: 0000 [#1] SMP NOPTI [ 95.969705] CPU: 1 PID: 58405 Comm: lldpad Kdump: loaded Tainted: G U W O --------- -t - 4.18.0 #1 [ 95.969867] Hardware name: O.E.M/BC11SPSCB10, BIOS 8.23 12/30/2021 [ 95.969992] RIP: 0010:devm_kmalloc+0xa/0x60 [ 95.970052] Code: 5c ff ff ff 31 c0 5b 5d 41 5c c3 b8 f4 ff ff ff eb f4 0f 1f 40 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 89 d1 <8b> 97 60 02 00 00 48 8d 7e 18 48 39 f7 72 3f 55 89 ce 53 48 8b 4c [ 95.970344] RSP: 0018:ffffc9003f553888 EFLAGS: 00010206 [ 95.970425] RAX: dead000000000200 RBX: ffffea003c425b00 RCX: 00000000006080c0 [ 95.970536] RDX: 00000000006080c0 RSI: 0000000000000200 RDI: dead000000000200 [ 95.970648] RBP: dead000000000200 R08: 00000000000463c0 R09: ffff888ffa900000 [ 95.970760] R10: 0000000000000000 R11: 0000000000000002 R12: ffff888ff6b40100 [ 95.970870] R13: ffff888ff6a55018 R14: 0000000000000000 R15: ffff888ff6a55460 [ 95.970981] FS: 00007f51b7d24700(0000) GS:ffff88903ee80000(0000) knlGS:0000000000000000 [ 95.971108] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 95.971197] CR2: 00007fac5410d710 CR3: 0000000f2c1de002 CR4: 00000000007606e0 [ 95.971309] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 95.971419] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 95.971530] PKRU: 55555554 [ 95.971573] Call Trace: [ 95.971622] ice_setup_rx_ring+0x39/0x110 [ice] [ 95.971695] ice_vsi_setup_rx_rings+0x54/0x90 [ice] [ 95.971774] ice_vsi_open+0x25/0x120 [ice] [ 95.971843] ice_open_internal+0xb8/0x1f0 [ice] [ 95.971919] ice_ena_vsi+0x4f/0xd0 [ice] [ 95.971987] ice_dcb_ena_dis_vsi.constprop.5+0x29/0x90 [ice] [ 95.972082] ice_pf_dcb_cfg+0x29a/0x380 [ice] [ 95.972154] ice_dcbnl_setets+0x174/0x1b0 [ice] [ 95.972220] dcbnl_ieee_set+0x89/0x230 [ 95.972279] ? dcbnl_ieee_del+0x150/0x150 [ 95.972341] dcb_doit+0x124/0x1b0 [ 95.972392] rtnetlink_rcv_msg+0x243/0x2f0 [ 95.972457] ? dcb_doit+0x14d/0x1b0 [ 95.972510] ? __kmalloc_node_track_caller+0x1d3/0x280 [ 95.972591] ? rtnl_calcit.isra.31+0x100/0x100 [ 95.972661] netlink_rcv_skb+0xcf/0xf0 [ 95.972720] netlink_unicast+0x16d/0x220 [ 95.972781] netlink_sendmsg+0x2ba/0x3a0 [ 95.975891] sock_sendmsg+0x4c/0x50 [ 95.979032] ___sys_sendmsg+0x2e4/0x300 [ 95.982147] ? kmem_cache_alloc+0x13e/0x190 [ 95.985242] ? __wake_up_common_lock+0x79/0x90 [ 95.988338] ? __check_object_size+0xac/0x1b0 [ 95.991440] ? _copy_to_user+0x22/0x30 [ 95.994539] ? move_addr_to_user+0xbb/0xd0 [ 95.997619] ? __sys_sendmsg+0x53/0x80 [ 96.000664] __sys_sendmsg+0x53/0x80 [ 96.003747] do_syscall_64+0x5b/0x1d0 [ 96.006862] entry_SYSCALL_64_after_hwframe+0x65/0xca Only update num_txq/rxq when passed check, and restore tc_cfg if setup queue map failed. Fixes: a632b2a4c920 ("ice: ethtool: Prohibit improper channel config for DCB") Signed-off-by: Ding Hui Reviewed-by: Anatolii Gerasymenko Tested-by: Arpana Arland (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_lib.c | 42 ++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 16 deletions(-) commit faf59ec8c3c3708c64ff76b50e6f757c6b4a1054 Author: Adrian Hunter Date: Wed Sep 7 19:24:58 2022 +0300 perf record: Fix synthesis failure warnings Some calls to synthesis functions set err < 0 but only warn about the failure and continue. However they do not set err back to zero, relying on subsequent code to do that. That changed with the introduction of option --synth. When --synth=no subsequent functions that set err back to zero are not called. Fix by setting err = 0 in those cases. Example: Before: $ perf record --no-bpf-event --synth=all -o /tmp/huh uname Couldn't synthesize bpf events. Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.014 MB /tmp/huh (7 samples) ] $ perf record --no-bpf-event --synth=no -o /tmp/huh uname Couldn't synthesize bpf events. After: $ perf record --no-bpf-event --synth=no -o /tmp/huh uname Couldn't synthesize bpf events. Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.014 MB /tmp/huh (7 samples) ] Fixes: 41b740b6e8a994e5 ("perf record: Add --synth option") Signed-off-by: Adrian Hunter Acked-by: Namhyung Kim Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20220907162458.72817-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e43212e0f55dc2d6b15d6c174cc0a64b25fab5e7 Author: Eliav Farber Date: Thu Sep 8 15:24:34 2022 +0000 hwmon: (mr75203) enable polling for all VM channels Configure ip-polling register to enable polling for all voltage monitor channels. This enables reading the voltage values for all inputs other than just input 0. Fixes: 9d823351a337 ("hwmon: Add hardware monitoring driver for Moortec MR75203 PVT controller") Signed-off-by: Eliav Farber Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220908152449.35457-7-farbere@amazon.com Signed-off-by: Guenter Roeck drivers/hwmon/mr75203.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 91a9e063cdcfca8fe642b078d6fae4ce49187975 Author: Eliav Farber Date: Thu Sep 8 15:24:33 2022 +0000 hwmon: (mr75203) fix multi-channel voltage reading Fix voltage allocation and reading to support all channels in all VMs. Prior to this change allocation and reading were done only for the first channel in each VM. This change counts the total number of channels for allocation, and takes into account the channel offset when reading the sample data register. Fixes: 9d823351a337 ("hwmon: Add hardware monitoring driver for Moortec MR75203 PVT controller") Signed-off-by: Eliav Farber Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220908152449.35457-6-farbere@amazon.com Signed-off-by: Guenter Roeck drivers/hwmon/mr75203.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit 0a9eaf616f29ca32068d2d8fe04eeef67505720d Author: Jiri Slaby Date: Thu Sep 8 08:04:26 2022 +0200 perf tools: Don't install data files with x permissions install(1), by default, installs with rwxr-xr-x permissions. Modify perf's Makefile to pass '-m 644' when installing: * Documentation/tips.txt * examples/bpf/* * perf-completion.sh * perf_dlfilter.h header * scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* * scripts/perl/*.pl * tests/attr/* * tests/attr.py * tests/shell/lib/*.sh * trace/strace/groups/* All those are supposed to be non-executable. Either they are not scripts at all, or they don't have shebang. Signed-off-by: Cc: Adrian Hunter Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220908060426.9619-1-jslaby@suse.cz Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 227a3a2fc31d8e4bb9c88d4804e19530af245b1b Author: Eliav Farber Date: Thu Sep 8 15:24:32 2022 +0000 hwmon: (mr75203) fix voltage equation for negative source input According to Moortec Embedded Voltage Monitor (MEVM) series 3 data sheet, the minimum input signal is -100mv and maximum input signal is +1000mv. The equation used to convert the digital word to voltage uses mixed types (*val signed and n unsigned), and on 64 bit machines also has different size, since sizeof(u32) = 4 and sizeof(long) = 8. So when measuring a negative input, n will be small enough, such that PVT_N_CONST * n < PVT_R_CONST, and the result of (PVT_N_CONST * n - PVT_R_CONST) will overflow to a very big positive 32 bit number. Then when storing the result in *val it will be the same value just in 64 bit (instead of it representing a negative number which will what happen when sizeof(long) = 4). When -1023 <= (PVT_N_CONST * n - PVT_R_CONST) <= -1 dividing the number by 1024 should result of in 0, but because ">> 10" is used, and the sign bit is used to fill the vacated bit positions, it results in -1 (0xf...fffff) which is wrong. This change fixes the sign problem and supports negative values by casting n to long and replacing the shift right with div operation. Fixes: 9d823351a337 ("hwmon: Add hardware monitoring driver for Moortec MR75203 PVT controller") Signed-off-by: Eliav Farber Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220908152449.35457-5-farbere@amazon.com Signed-off-by: Guenter Roeck drivers/hwmon/mr75203.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit bb9195bd6664d94d71647631593e09f705ff5edd Author: Eliav Farber Date: Thu Sep 8 15:24:31 2022 +0000 hwmon: (mr75203) update pvt->v_num and vm_num to the actual number of used sensors This issue is relevant when "intel,vm-map" is set in device-tree, and defines a lower number of VMs than actually supported. This change is needed for all places that use pvt->v_num or vm_num later on in the code. Fixes: 9d823351a337 ("hwmon: Add hardware monitoring driver for Moortec MR75203 PVT controller") Signed-off-by: Eliav Farber Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220908152449.35457-4-farbere@amazon.com Signed-off-by: Guenter Roeck drivers/hwmon/mr75203.c | 2 ++ 1 file changed, 2 insertions(+) commit 81114fc3d27bf5b06b2137d2fd2b63da656a8b90 Author: Eliav Farber Date: Thu Sep 8 15:24:30 2022 +0000 hwmon: (mr75203) fix VM sensor allocation when "intel,vm-map" not defined Bug - in case "intel,vm-map" is missing in device-tree ,'num' is set to 0, and no voltage channel infos are allocated. The reason num is set to 0 when "intel,vm-map" is missing is to set the entire pvt->vm_idx[] with incremental channel numbers, but it didn't take into consideration that same num is used later in devm_kcalloc(). If "intel,vm-map" does exist there is no need to set the unspecified channels with incremental numbers, because the unspecified channels can't be accessed in pvt_read_in() which is the only other place besides the probe functions that uses pvt->vm_idx[]. This change fixes the bug by moving the incremental channel numbers setting to be done only if "intel,vm-map" property is defined (starting loop from 0), and removing 'num = 0'. Fixes: 9d823351a337 ("hwmon: Add hardware monitoring driver for Moortec MR75203 PVT controller") Signed-off-by: Eliav Farber Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220908152449.35457-3-farbere@amazon.com Signed-off-by: Guenter Roeck drivers/hwmon/mr75203.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit d0b34d5bf7ffc4b906f1da901376c3caf0f0d7c0 Author: Eliav Farber Date: Thu Sep 8 15:24:29 2022 +0000 dt-bindings: hwmon: (mr75203) fix "intel,vm-map" property to be optional Change "intel,vm-map" property to be optional instead of required. The driver implementation indicates it is not mandatory to have "intel,vm-map" in the device tree: - probe doesn't fail in case it is absent. - explicit comment in code - "Incase intel,vm-map property is not defined, we assume incremental channel numbers". Fixes: 748022ef093f ("hwmon: Add DT bindings schema for PVT controller") Signed-off-by: Eliav Farber Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220908152449.35457-2-farbere@amazon.com Signed-off-by: Guenter Roeck Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml | 1 - 1 file changed, 1 deletion(-) commit 82b2425fad2dd47204b3da589b679220f8aacc0e Author: Zhengjun Xing Date: Thu Sep 8 15:00:30 2022 +0800 perf script: Fix Cannot print 'iregs' field for hybrid systems Commit b91e5492f9d7ca89 ("perf record: Add a dummy event on hybrid systems to collect metadata records") adds a dummy event on hybrid systems to fix the symbol "unknown" issue when the workload is created in a P-core but runs on an E-core. The added dummy event will cause "perf script -F iregs" to fail. Dummy events do not have "iregs" attribute set, so when we do evsel__check_attr, the "iregs" attribute check will fail, so the issue happened. The following commit [1] has fixed a similar issue by skipping the attr check for the dummy event because it does not have any samples anyway. It works okay for the normal mode, but the issue still happened when running the test in the pipe mode. In the pipe mode, it calls process_attr() which still checks the attr for the dummy event. This commit fixed the issue by skipping the attr check for the dummy event in the API evsel__check_attr, Otherwise, we have to patch everywhere when evsel__check_attr() is called. Before: #./perf record -o - --intr-regs=di,r8,dx,cx -e br_inst_retired.near_call:p -c 1000 --per-thread true 2>/dev/null|./perf script -F iregs |head -5 Samples for 'dummy:HG' event do not have IREGS attribute set. Cannot print 'iregs' field. 0x120 [0x90]: failed to process type: 64 # After: # ./perf record -o - --intr-regs=di,r8,dx,cx -e br_inst_retired.near_call:p -c 1000 --per-thread true 2>/dev/null|./perf script -F iregs |head -5 ABI:2 CX:0x55b8efa87000 DX:0x55b8efa7e000 DI:0xffffba5e625efbb0 R8:0xffff90e51f8ae100 ABI:2 CX:0x7f1dae1e4000 DX:0xd0 DI:0xffff90e18c675ac0 R8:0x71 ABI:2 CX:0xcc0 DX:0x1 DI:0xffff90e199880240 R8:0x0 ABI:2 CX:0xffff90e180dd7500 DX:0xffff90e180dd7500 DI:0xffff90e180043500 R8:0x1 ABI:2 CX:0x50 DX:0xffff90e18c583bd0 DI:0xffff90e1998803c0 R8:0x58 # [1]https://lore.kernel.org/lkml/20220831124041.219925-1-jolsa@kernel.org/ Fixes: b91e5492f9d7ca89 ("perf record: Add a dummy event on hybrid systems to collect metadata records") Suggested-by: Namhyung Kim Signed-off-by: Xing Zhengjun Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220908070030.3455164-1-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 3 +++ 1 file changed, 3 insertions(+) commit 3705a6ef4068cbc9c2344561345d09630fd278ec Author: Yang Jihong Date: Thu Sep 8 09:48:54 2022 +0800 perf lock: Remove redundant word 'contention' in help message Before: # perf lock -h Usage: perf lock [] {record|report|script|info|contention|contention} -D, --dump-raw-trace dump raw trace in ASCII -f, --force don't complain, do it -i, --input input file name -v, --verbose be more verbose (show symbol address, etc) --kallsyms kallsyms pathname --vmlinux vmlinux pathname After: # perf lock -h Usage: perf lock [] {record|report|script|info|contention} -D, --dump-raw-trace dump raw trace in ASCII -f, --force don't complain, do it -i, --input input file name -v, --verbose be more verbose (show symbol address, etc) --kallsyms kallsyms pathname --vmlinux vmlinux pathname Fixes: 528b9cab3b813a3b ("perf lock: Add 'contention' subcommand") Signed-off-by: Yang Jihong Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220908014854.151203-1-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 23c619190318376769ad7b61504c2ea0703fb783 Author: Dave Ertman Date: Tue Aug 9 10:24:23 2022 -0700 ice: Don't double unplug aux on peer initiated reset In the IDC callback that is accessed when the aux drivers request a reset, the function to unplug the aux devices is called. This function is also called in the ice_prepare_for_reset function. This double call is causing a "scheduling while atomic" BUG. [ 662.676430] ice 0000:4c:00.0 rocep76s0: cqp opcode = 0x1 maj_err_code = 0xffff min_err_code = 0x8003 [ 662.676609] ice 0000:4c:00.0 rocep76s0: [Modify QP Cmd Error][op_code=8] status=-29 waiting=1 completion_err=1 maj=0xffff min=0x8003 [ 662.815006] ice 0000:4c:00.0 rocep76s0: ICE OICR event notification: oicr = 0x10000003 [ 662.815014] ice 0000:4c:00.0 rocep76s0: critical PE Error, GLPE_CRITERR=0x00011424 [ 662.815017] ice 0000:4c:00.0 rocep76s0: Requesting a reset [ 662.815475] BUG: scheduling while atomic: swapper/37/0/0x00010002 [ 662.815475] BUG: scheduling while atomic: swapper/37/0/0x00010002 [ 662.815477] Modules linked in: rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache netfs rfkill 8021q garp mrp stp llc vfat fat rpcrdma intel_rapl_msr intel_rapl_common sunrpc i10nm_edac rdma_ucm nfit ib_srpt libnvdimm ib_isert iscsi_target_mod x86_pkg_temp_thermal intel_powerclamp coretemp target_core_mod snd_hda_intel ib_iser snd_intel_dspcfg libiscsi snd_intel_sdw_acpi scsi_transport_iscsi kvm_intel iTCO_wdt rdma_cm snd_hda_codec kvm iw_cm ipmi_ssif iTCO_vendor_support snd_hda_core irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hwdep snd_seq snd_seq_device rapl snd_pcm snd_timer isst_if_mbox_pci pcspkr isst_if_mmio irdma intel_uncore idxd acpi_ipmi joydev isst_if_common snd mei_me idxd_bus ipmi_si soundcore i2c_i801 mei ipmi_devintf i2c_smbus i2c_ismt ipmi_msghandler acpi_power_meter acpi_pad rv(OE) ib_uverbs ib_cm ib_core xfs libcrc32c ast i2c_algo_bit drm_vram_helper drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm_ttm_helpe r ttm [ 662.815546] nvme nvme_core ice drm crc32c_intel i40e t10_pi wmi pinctrl_emmitsburg dm_mirror dm_region_hash dm_log dm_mod fuse [ 662.815557] Preemption disabled at: [ 662.815558] [<0000000000000000>] 0x0 [ 662.815563] CPU: 37 PID: 0 Comm: swapper/37 Kdump: loaded Tainted: G S OE 5.17.1 #2 [ 662.815566] Hardware name: Intel Corporation D50DNP/D50DNP, BIOS SE5C6301.86B.6624.D18.2111021741 11/02/2021 [ 662.815568] Call Trace: [ 662.815572] [ 662.815574] dump_stack_lvl+0x33/0x42 [ 662.815581] __schedule_bug.cold.147+0x7d/0x8a [ 662.815588] __schedule+0x798/0x990 [ 662.815595] schedule+0x44/0xc0 [ 662.815597] schedule_preempt_disabled+0x14/0x20 [ 662.815600] __mutex_lock.isra.11+0x46c/0x490 [ 662.815603] ? __ibdev_printk+0x76/0xc0 [ib_core] [ 662.815633] device_del+0x37/0x3d0 [ 662.815639] ice_unplug_aux_dev+0x1a/0x40 [ice] [ 662.815674] ice_schedule_reset+0x3c/0xd0 [ice] [ 662.815693] irdma_iidc_event_handler.cold.7+0xb6/0xd3 [irdma] [ 662.815712] ? bitmap_find_next_zero_area_off+0x45/0xa0 [ 662.815719] ice_send_event_to_aux+0x54/0x70 [ice] [ 662.815741] ice_misc_intr+0x21d/0x2d0 [ice] [ 662.815756] __handle_irq_event_percpu+0x4c/0x180 [ 662.815762] handle_irq_event_percpu+0xf/0x40 [ 662.815764] handle_irq_event+0x34/0x60 [ 662.815766] handle_edge_irq+0x9a/0x1c0 [ 662.815770] __common_interrupt+0x62/0x100 [ 662.815774] common_interrupt+0xb4/0xd0 [ 662.815779] [ 662.815780] [ 662.815780] asm_common_interrupt+0x1e/0x40 [ 662.815785] RIP: 0010:cpuidle_enter_state+0xd6/0x380 [ 662.815789] Code: 49 89 c4 0f 1f 44 00 00 31 ff e8 65 d7 95 ff 45 84 ff 74 12 9c 58 f6 c4 02 0f 85 64 02 00 00 31 ff e8 ae c5 9c ff fb 45 85 f6 <0f> 88 12 01 00 00 49 63 d6 4c 2b 24 24 48 8d 04 52 48 8d 04 82 49 [ 662.815791] RSP: 0018:ff2c2c4f18edbe80 EFLAGS: 00000202 [ 662.815793] RAX: ff280805df140000 RBX: 0000000000000002 RCX: 000000000000001f [ 662.815795] RDX: 0000009a52da2d08 RSI: ffffffff93f8240b RDI: ffffffff93f53ee7 [ 662.815796] RBP: ff5e2bd11ff41928 R08: 0000000000000000 R09: 000000000002f8c0 [ 662.815797] R10: 0000010c3f18e2cf R11: 000000000000000f R12: 0000009a52da2d08 [ 662.815798] R13: ffffffff94ad7e20 R14: 0000000000000002 R15: 0000000000000000 [ 662.815801] cpuidle_enter+0x29/0x40 [ 662.815803] do_idle+0x261/0x2b0 [ 662.815807] cpu_startup_entry+0x19/0x20 [ 662.815809] start_secondary+0x114/0x150 [ 662.815813] secondary_startup_64_no_verify+0xd5/0xdb [ 662.815818] [ 662.815846] bad: scheduling from the idle thread! [ 662.815849] CPU: 37 PID: 0 Comm: swapper/37 Kdump: loaded Tainted: G S W OE 5.17.1 #2 [ 662.815852] Hardware name: Intel Corporation D50DNP/D50DNP, BIOS SE5C6301.86B.6624.D18.2111021741 11/02/2021 [ 662.815853] Call Trace: [ 662.815855] [ 662.815856] dump_stack_lvl+0x33/0x42 [ 662.815860] dequeue_task_idle+0x20/0x30 [ 662.815863] __schedule+0x1c3/0x990 [ 662.815868] schedule+0x44/0xc0 [ 662.815871] schedule_preempt_disabled+0x14/0x20 [ 662.815873] __mutex_lock.isra.11+0x3a8/0x490 [ 662.815876] ? __ibdev_printk+0x76/0xc0 [ib_core] [ 662.815904] device_del+0x37/0x3d0 [ 662.815909] ice_unplug_aux_dev+0x1a/0x40 [ice] [ 662.815937] ice_schedule_reset+0x3c/0xd0 [ice] [ 662.815961] irdma_iidc_event_handler.cold.7+0xb6/0xd3 [irdma] [ 662.815979] ? bitmap_find_next_zero_area_off+0x45/0xa0 [ 662.815985] ice_send_event_to_aux+0x54/0x70 [ice] [ 662.816011] ice_misc_intr+0x21d/0x2d0 [ice] [ 662.816033] __handle_irq_event_percpu+0x4c/0x180 [ 662.816037] handle_irq_event_percpu+0xf/0x40 [ 662.816039] handle_irq_event+0x34/0x60 [ 662.816042] handle_edge_irq+0x9a/0x1c0 [ 662.816045] __common_interrupt+0x62/0x100 [ 662.816048] common_interrupt+0xb4/0xd0 [ 662.816052] [ 662.816053] [ 662.816054] asm_common_interrupt+0x1e/0x40 [ 662.816057] RIP: 0010:cpuidle_enter_state+0xd6/0x380 [ 662.816060] Code: 49 89 c4 0f 1f 44 00 00 31 ff e8 65 d7 95 ff 45 84 ff 74 12 9c 58 f6 c4 02 0f 85 64 02 00 00 31 ff e8 ae c5 9c ff fb 45 85 f6 <0f> 88 12 01 00 00 49 63 d6 4c 2b 24 24 48 8d 04 52 48 8d 04 82 49 [ 662.816063] RSP: 0018:ff2c2c4f18edbe80 EFLAGS: 00000202 [ 662.816065] RAX: ff280805df140000 RBX: 0000000000000002 RCX: 000000000000001f [ 662.816067] RDX: 0000009a52da2d08 RSI: ffffffff93f8240b RDI: ffffffff93f53ee7 [ 662.816068] RBP: ff5e2bd11ff41928 R08: 0000000000000000 R09: 000000000002f8c0 [ 662.816070] R10: 0000010c3f18e2cf R11: 000000000000000f R12: 0000009a52da2d08 [ 662.816071] R13: ffffffff94ad7e20 R14: 0000000000000002 R15: 0000000000000000 [ 662.816075] cpuidle_enter+0x29/0x40 [ 662.816077] do_idle+0x261/0x2b0 [ 662.816080] cpu_startup_entry+0x19/0x20 [ 662.816083] start_secondary+0x114/0x150 [ 662.816087] secondary_startup_64_no_verify+0xd5/0xdb [ 662.816091] [ 662.816169] bad: scheduling from the idle thread! The correct place to unplug the aux devices for a reset is in the prepare_for_reset function, as this is a common place for all reset flows. It also has built in protection from being called twice in a single reset instance before the aux devices are replugged. Fixes: f9f5301e7e2d4 ("ice: Register auxiliary device to provide RDMA") Signed-off-by: Dave Ertman Tested-by: Helena Anna Dubel Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_main.c | 2 -- 1 file changed, 2 deletions(-) commit 506357871c18e06565840d71c2ef9f818e19f460 Merge: c5e68c4fa55c 9c9c9da7aa10 Author: Linus Torvalds Date: Thu Sep 8 13:13:47 2022 -0400 Merge tag 'spi-fix-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "Several fixes that came in since the merge window, the major one being a fix for the spi-mux driver which was broken by the performance optimisations due to it peering inside the core's data structures more than it should" * tag 'spi-fix-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spi: Fix queue hang if previous transfer failed spi: mux: Fix mux interaction with fast path optimisations spi: cadence-quadspi: Disable irqs during indirect reads spi: bitbang: Fix lsb-first Rx commit c5e68c4fa55c0d65e28b4b566b50aee6c4185dab Merge: b1d27aa3b16a 475043fabe8c Author: Linus Torvalds Date: Thu Sep 8 12:56:20 2022 -0400 Merge tag 'regulator-fix-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "One core fix here improving the error handling on enable failure, plus smaller fixes for the pfuze100 drive and the SPMI DT bindings" * tag 'regulator-fix-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: Fix qcom,spmi-regulator schema regulator: pfuze100: Fix the global-out-of-bounds access in pfuze100_regulator_probe() regulator: core: Clean up on enable failure commit b1d27aa3b16a4689d5598abc545a88e5cda93f1d Merge: 26b1224903b3 f5723cfc0193 Author: Linus Torvalds Date: Thu Sep 8 12:51:58 2022 -0400 Merge tag 'regmap-fix-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap fix from Mark Brown: "A fix for how we handle controller constraints on SPI message sizes, only impacting systems with SPI controllers with very low limits like the AMD controller used in the Steam Deck" * tag 'regmap-fix-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: spi: Reserve space for register address/padding commit 75c523ac0c07a3f0a8eb5c6eb156cd7b3e50924f Merge: 748008e1da92 371a982cd2b0 Author: Jens Axboe Date: Thu Sep 8 10:20:18 2022 -0600 Merge tag 'nvme-6.0-2022-09-08' of git://git.infradead.org/nvme into block-6.0 Pull NVMe fixes from Christoph: "nvme fixes for Linux 6.1 - fix a use after free in nvmet (Bart Van Assche) - fix a use after free when detecting digest errors (Sagi Grimberg) - fix regression that causes sporadic TCP requests to time out (Sagi Grimberg) - fix two off by ones errors in the nvmet ZNS support (Dennis Maisenbacher) - requeue aen after firmware activation (Keith Busch)" * tag 'nvme-6.0-2022-09-08' of git://git.infradead.org/nvme: nvme: requeue aen after firmware activation nvmet: fix mar and mor off-by-one errors nvme-tcp: fix regression that causes sporadic requests to time out nvme-tcp: fix UAF when detecting digest errors nvmet: fix a use-after-free commit 8f7115c1923cd11146525f1615beb29018001964 Author: Chen-Yu Tsai Date: Thu Sep 8 16:54:53 2022 +0800 drm/panel-edp: Fix delays for Innolux N116BCA-EA1 Commit 52824ca4502d ("drm/panel-edp: Better describe eDP panel delays") clarified the various delays used for eDP panels, tying them to the eDP panel timing diagram. For Innolux N116BCA-EA1, .prepare_to_enable would be: t4_min + t5_min + t6_min + max(t7_max, t8_min) Since t4_min and t5_min are both 0, the panel can use either .enable or .prepare_to_enable. As .enable is better defined, switch to using .enable for this panel. Also add .disable = 50, based on the datasheet's t9_min value. This effectively makes the delays the same as delay_200_500_e80_d50. Cc: Douglas Anderson Fixes: 51d35631c970 ("drm/panel-simple: Add N116BCA-EA1") Signed-off-by: Chen-Yu Tsai Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20220908085454.1024167-1-wenst@chromium.org drivers/gpu/drm/panel/panel-edp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1706623e940347ad23fdf77910eca4905dc37f91 Author: Adrian Hunter Date: Mon Sep 5 10:47:35 2022 +0300 perf dlfilter dlfilter-show-cycles: Fix types for print format Avoid compiler warning about format %llu that expects long long unsigned int but argument has type __u64. Reported-by: Arnaldo Carvalho de Melo Fixes: c3afd6e50fce824f ("perf dlfilter: Add dlfilter-show-cycles") Signed-off-by: Adrian Hunter Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20220905074735.4513-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/dlfilters/dlfilter-show-cycles.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7864d8f7c088aad988c44c631f1ceed9179cf2cf Author: Adrian Hunter Date: Mon Sep 5 14:42:09 2022 +0300 libperf evlist: Fix per-thread mmaps for multi-threaded targets The offending commit removed mmap_per_thread(), which did not consider the different set-output rules for per-thread mmaps i.e. in the per-thread case set-output is used for file descriptors of the same thread not the same cpu. This was not immediately noticed because it only happens with multi-threaded targets and we do not have a test for that yet. Reinstate mmap_per_thread() expanding it to cover also system-wide per-cpu events i.e. to continue to allow the mixing of per-thread and per-cpu mmaps. Debug messages (with -vv) show the file descriptors that are opened with sys_perf_event_open. New debug messages are added (needs -vvv) that show also which file descriptors are mmapped and which are redirected with set-output. In the per-cpu case (cpu != -1) file descriptors for the same CPU are set-output to the first file descriptor for that CPU. In the per-thread case (cpu == -1) file descriptors for the same thread are set-output to the first file descriptor for that thread. Example (process 17489 has 2 threads): Before (but with new debug prints): $ perf record --no-bpf-event -vvv --per-thread -p 17489 sys_perf_event_open: pid 17489 cpu -1 group_fd -1 flags 0x8 = 5 sys_perf_event_open: pid 17490 cpu -1 group_fd -1 flags 0x8 = 6 libperf: idx 0: mmapping fd 5 libperf: idx 0: set output fd 6 -> 5 failed to mmap with 22 (Invalid argument) After: $ perf record --no-bpf-event -vvv --per-thread -p 17489 sys_perf_event_open: pid 17489 cpu -1 group_fd -1 flags 0x8 = 5 sys_perf_event_open: pid 17490 cpu -1 group_fd -1 flags 0x8 = 6 libperf: mmap_per_thread: nr cpu values (may include -1) 1 nr threads 2 libperf: idx 0: mmapping fd 5 libperf: idx 1: mmapping fd 6 [ perf record: Woken up 2 times to write data ] [ perf record: Captured and wrote 0.018 MB perf.data (15 samples) ] Per-cpu example (process 20341 has 2 threads, same as above): $ perf record --no-bpf-event -vvv -p 20341 sys_perf_event_open: pid 20341 cpu 0 group_fd -1 flags 0x8 = 5 sys_perf_event_open: pid 20342 cpu 0 group_fd -1 flags 0x8 = 6 sys_perf_event_open: pid 20341 cpu 1 group_fd -1 flags 0x8 = 7 sys_perf_event_open: pid 20342 cpu 1 group_fd -1 flags 0x8 = 8 sys_perf_event_open: pid 20341 cpu 2 group_fd -1 flags 0x8 = 9 sys_perf_event_open: pid 20342 cpu 2 group_fd -1 flags 0x8 = 10 sys_perf_event_open: pid 20341 cpu 3 group_fd -1 flags 0x8 = 11 sys_perf_event_open: pid 20342 cpu 3 group_fd -1 flags 0x8 = 12 sys_perf_event_open: pid 20341 cpu 4 group_fd -1 flags 0x8 = 13 sys_perf_event_open: pid 20342 cpu 4 group_fd -1 flags 0x8 = 14 sys_perf_event_open: pid 20341 cpu 5 group_fd -1 flags 0x8 = 15 sys_perf_event_open: pid 20342 cpu 5 group_fd -1 flags 0x8 = 16 sys_perf_event_open: pid 20341 cpu 6 group_fd -1 flags 0x8 = 17 sys_perf_event_open: pid 20342 cpu 6 group_fd -1 flags 0x8 = 18 sys_perf_event_open: pid 20341 cpu 7 group_fd -1 flags 0x8 = 19 sys_perf_event_open: pid 20342 cpu 7 group_fd -1 flags 0x8 = 20 libperf: mmap_per_cpu: nr cpu values 8 nr threads 2 libperf: idx 0: mmapping fd 5 libperf: idx 0: set output fd 6 -> 5 libperf: idx 1: mmapping fd 7 libperf: idx 1: set output fd 8 -> 7 libperf: idx 2: mmapping fd 9 libperf: idx 2: set output fd 10 -> 9 libperf: idx 3: mmapping fd 11 libperf: idx 3: set output fd 12 -> 11 libperf: idx 4: mmapping fd 13 libperf: idx 4: set output fd 14 -> 13 libperf: idx 5: mmapping fd 15 libperf: idx 5: set output fd 16 -> 15 libperf: idx 6: mmapping fd 17 libperf: idx 6: set output fd 18 -> 17 libperf: idx 7: mmapping fd 19 libperf: idx 7: set output fd 20 -> 19 [ perf record: Woken up 7 times to write data ] [ perf record: Captured and wrote 0.020 MB perf.data (17 samples) ] Fixes: ae4f8ae16a078964 ("libperf evlist: Allow mixing per-thread and per-cpu mmaps") Reported-by: Tomáš Trnka Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=216441 Signed-off-by: Adrian Hunter Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220905114209.8389-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/perf/evlist.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 13bd9014180425f5a35eaf3735971d582c299292 Author: Dan Aloni Date: Thu Sep 8 17:08:51 2022 +0300 Revert "SUNRPC: Remove unreachable error condition" This reverts commit efe57fd58e1cb77f9186152ee12a8aa4ae3348e0. The assumption that it is impossible to return an ERR pointer from rpc_run_task() no longer holds due to commit 25cf32ad5dba ("SUNRPC: Handle allocation failure in rpc_new_task()"). Fixes: 25cf32ad5dba ('SUNRPC: Handle allocation failure in rpc_new_task()') Fixes: efe57fd58e1c ('SUNRPC: Remove unreachable error condition') Signed-off-by: Dan Aloni Signed-off-by: Trond Myklebust net/sunrpc/clnt.c | 3 +++ 1 file changed, 3 insertions(+) commit d7a5118635e725d195843bda80cc5c964d93ef31 Author: Anna Schumaker Date: Wed Sep 7 16:34:21 2022 -0400 NFSv4.2: Update mode bits after ALLOCATE and DEALLOCATE The fallocate call invalidates suid and sgid bits as part of normal operation. We need to mark the mode bits as invalid when using fallocate with an suid so these will be updated the next time the user looks at them. This fixes xfstests generic/683 and generic/684. Reported-by: Yue Cui Fixes: 913eca1aea87 ("NFS: Fallocate should use the nfs4_fattr_bitmap") Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/internal.h | 25 +++++++++++++++++++++++++ fs/nfs/nfs42proc.c | 9 +++++++-- fs/nfs/write.c | 25 ------------------------- 3 files changed, 32 insertions(+), 27 deletions(-) commit 3c8400532dd8305024ff6eea38707de20b1b9822 Author: Pavel Begunkov Date: Thu Sep 8 14:01:10 2022 +0100 io_uring/net: copy addr for zc on POLL_FIRST Every time we return from an issue handler and expect the request to be retried we should also setup it for async exec ourselves. Do that when we return on IORING_RECVSEND_POLL_FIRST in io_sendzc(), otherwise it'll re-read the address, which might be a surprise for the userspace. Fixes: 092aeedb750a9 ("io_uring: allow to pass addr into sendzc") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/ab1d0657890d6721339c56d2e161a4bba06f85d0.1662642013.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 02181e68275d28cab3c3f755852770367f1bc229 Author: Sergei Antonov Date: Wed Sep 7 20:53:41 2022 +0300 ARM: dts: fix Moxa SDIO 'compatible', remove 'sdhci' misnomer Driver moxart-mmc.c has .compatible = "moxa,moxart-mmc". But moxart .dts/.dtsi and the documentation file moxa,moxart-dma.txt contain compatible = "moxa,moxart-sdhci". Change moxart .dts/.dtsi files and moxa,moxart-dma.txt to match the driver. Replace 'sdhci' with 'mmc' in names too, since SDHCI is a different controller from FTSDC010. Suggested-by: Arnd Bergmann Signed-off-by: Sergei Antonov Cc: Jonas Jensen Link: https://lore.kernel.org/r/20220907175341.1477383-1-saproj@gmail.com' Signed-off-by: Arnd Bergmann Documentation/devicetree/bindings/dma/moxa,moxart-dma.txt | 4 ++-- arch/arm/boot/dts/moxart-uc7112lx.dts | 2 +- arch/arm/boot/dts/moxart.dtsi | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit d4f1920d07e8eb0f217f8f65c0bc5b20bb8e3b8c Merge: 12f09234bde5 40d30cf680cb Author: Arnd Bergmann Date: Thu Sep 8 16:12:25 2022 +0200 Merge tag 'scmi-fixes-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes Arm SCMI fixes for v6.0 Few fixes addressing possible out of bound access violations by hardening them, incorrect asynchronous resets by restricting them, incorrect SCMI tracing message format by harmonizing them, missing kernel-doc in optee transport, missing SCMI PM driver remove routine by adding it to avoid warning when scmi driver is unloaded and finally improve checks in the info_get operations. * tag 'scmi-fixes-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Harmonize SCMI tracing message format firmware: arm_scmi: Add SCMI PM driver remove routine firmware: arm_scmi: Fix the asynchronous reset requests firmware: arm_scmi: Harden accesses to the reset domains firmware: arm_scmi: Harden accesses to the sensor domains firmware: arm_scmi: Improve checks in the info_get operations firmware: arm_scmi: Fix missing kernel-doc in optee Link: https://lore.kernel.org/r/20220829174435.207911-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit d105d6920ec758125b69c0b097bf498348888a9d Author: Mark Brown Date: Fri Sep 2 14:28:02 2022 +0100 arm64/ptrace: Don't clear calling process' TIF_SME on OOM If allocating memory for the target SVE state in za_set() fails we clear TIF_SME for the ptracing task which is obviously not correct. If we are here we know that the target task already had neither TIF_SVE nor TIF_SME set since we only need to allocate if either the target had not used either SVE or SME and had no need to allocate state before or we just changed the vector length with vec_set_vector_length() which clears TIF_ for us on allocation failure so just remove the clear entirely. Reported-by: Wang ShaoBo Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220902132802.39682-1-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/ptrace.c | 2 -- 1 file changed, 2 deletions(-) commit 09e3e3159cd4d3c9f3a1f025cb8e635d93c67c9a Merge: 809f44a0cc5a b1cd3fd42db7 Author: Takashi Iwai Date: Thu Sep 8 14:24:05 2022 +0200 Merge tag 'asoc-fix-v6.0-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.0 Quite a few fixes here, all driver specific and fairly small. commit 26b1224903b3fb66e8aa564868d0d57648c32b15 Merge: 2f79cdfe58c1 2f09707d0c97 Author: Linus Torvalds Date: Thu Sep 8 08:15:01 2022 -0400 Merge tag 'net-6.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from rxrpc, netfilter, wireless and bluetooth subtrees. Current release - regressions: - skb: export skb drop reaons to user by TRACE_DEFINE_ENUM - bluetooth: fix regression preventing ACL packet transmission Current release - new code bugs: - dsa: microchip: fix kernel oops on ksz8 switches - dsa: qca8k: fix NULL pointer dereference for of_device_get_match_data Previous releases - regressions: - netfilter: clean up hook list when offload flags check fails - wifi: mt76: fix crash in chip reset fail - rxrpc: fix ICMP/ICMP6 error handling - ice: fix DMA mappings leak - i40e: fix kernel crash during module removal Previous releases - always broken: - ipv6: sr: fix out-of-bounds read when setting HMAC data. - tcp: TX zerocopy should not sense pfmemalloc status - sch_sfb: don't assume the skb is still around after enqueueing to child - netfilter: drop dst references before setting - wifi: wilc1000: fix DMA on stack objects - rxrpc: fix an insufficiently large sglist in rxkad_verify_packet_2() - fec: use a spinlock to guard `fep->ptp_clk_on` Misc: - usb: qmi_wwan: add Quectel RM520N" * tag 'net-6.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (50 commits) sch_sfb: Also store skb len before calling child enqueue net: phy: lan87xx: change interrupt src of link_up to comm_ready net/smc: Fix possible access to freed memory in link clear net: ethernet: mtk_eth_soc: check max allowed hash in mtk_ppe_check_skb net: skb: export skb drop reaons to user by TRACE_DEFINE_ENUM net: ethernet: mtk_eth_soc: fix typo in __mtk_foe_entry_clear net: dsa: felix: access QSYS_TAG_CONFIG under tas_lock in vsc9959_sched_speed_set net: dsa: felix: disable cut-through forwarding for frames oversized for tc-taprio net: dsa: felix: tc-taprio intervals smaller than MTU should send at least one packet net: usb: qmi_wwan: add Quectel RM520N net: dsa: qca8k: fix NULL pointer dereference for of_device_get_match_data tcp: fix early ETIMEDOUT after spurious non-SACK RTO stmmac: intel: Simplify intel_eth_pci_remove() net: mvpp2: debugfs: fix memory leak when using debugfs_lookup() ipv6: sr: fix out-of-bounds read when setting HMAC data. bonding: accept unsolicited NA message bonding: add all node mcast address when slave up bonding: use unspecified address if no available link local address wifi: use struct_group to copy addresses wifi: mac80211_hwsim: check length for virtio packets ... commit 2f79cdfe58c13949bbbb65ba5926abfe9561d0ec Author: Linus Torvalds Date: Wed Aug 31 09:46:12 2022 -0700 fs: only do a memory barrier for the first set_buffer_uptodate() Commit d4252071b97d ("add barriers to buffer_uptodate and set_buffer_uptodate") added proper memory barriers to the buffer head BH_Uptodate bit, so that anybody who tests a buffer for being up-to-date will be guaranteed to actually see initialized state. However, that commit didn't _just_ add the memory barrier, it also ended up dropping the "was it already set" logic that the BUFFER_FNS() macro had. That's conceptually the right thing for a generic "this is a memory barrier" operation, but in the case of the buffer contents, we really only care about the memory barrier for the _first_ time we set the bit, in that the only memory ordering protection we need is to avoid anybody seeing uninitialized memory contents. Any other access ordering wouldn't be about the BH_Uptodate bit anyway, and would require some other proper lock (typically BH_Lock or the folio lock). A reader that races with somebody invalidating the buffer head isn't an issue wrt the memory ordering, it's a serialization issue. Now, you'd think that the buffer head operations don't matter in this day and age (and I certainly thought so), but apparently some loads still end up being heavy users of buffer heads. In particular, the kernel test robot reported that not having this bit access optimization in place caused a noticeable direct IO performance regression on ext4: fxmark.ssd_ext4_no_jnl_DWTL_54_directio.works/sec -26.5% regression although you presumably need a fast disk and a lot of cores to actually notice. Link: https://lore.kernel.org/all/Yw8L7HTZ%2FdE2%2Fo9C@xsang-OptiPlex-9020/ Reported-by: kernel test robot Tested-by: Fengwei Yin Cc: Mikulas Patocka Cc: Matthew Wilcox (Oracle) Cc: stable@kernel.org Signed-off-by: Linus Torvalds include/linux/buffer_head.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f280b9872af1f58760b7731e973de57ffccfb0a4 Merge: 0066f1b0e275 9cb636b5f6a8 Author: Linus Torvalds Date: Thu Sep 8 07:37:38 2022 -0400 Merge tag 'efi-urgent-for-v6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI fixes from Ard Biesheuvel: "A couple of low-priority EFI fixes: - prevent the randstruct plugin from re-ordering EFI protocol definitions - fix a use-after-free in the capsule loader - drop unused variable" * tag 'efi-urgent-for-v6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi: capsule-loader: Fix use-after-free in efi_capsule_write efi/x86: libstub: remove unused variable efi: libstub: Disable struct randomization commit d76034a427a2660b080bc155e4fd8f6393eefb48 Author: Clément Péron Date: Tue Sep 6 17:30:33 2022 +0200 drm/panfrost: devfreq: set opp to the recommended one to configure regulator Enabling panfrost GPU OPP with dynamic regulator will make OPP responsible to enable and configure it. Unfortunately OPP configure and enable the regulator when an OPP is asked to be set, which is not the case during panfrost_devfreq_init(). This leave the regulator unconfigured and if no GPU load is triggered, no OPP is asked to be set which make the regulator framework switching it off during regulator_late_cleanup() without noticing and therefore make the board hang as any access to GPU memory space make bus locks up. Call dev_pm_opp_set_opp() with the recommend OPP in panfrost_devfreq_init() to enable the regulator, this will properly configure and enable the regulator and will avoid any switch off by regulator_late_cleanup(). Suggested-by: Viresh Kumar Signed-off-by: Clément Péron Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20220906153034.153321-5-peron.clem@gmail.com drivers/gpu/drm/panfrost/panfrost_devfreq.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 2f09707d0c972120bf794cfe0f0c67e2c2ddb252 Author: Toke Høiland-Jørgensen Date: Mon Sep 5 21:21:36 2022 +0200 sch_sfb: Also store skb len before calling child enqueue Cong Wang noticed that the previous fix for sch_sfb accessing the queued skb after enqueueing it to a child qdisc was incomplete: the SFB enqueue function was also calling qdisc_qstats_backlog_inc() after enqueue, which reads the pkt len from the skb cb field. Fix this by also storing the skb len, and using the stored value to increment the backlog after enqueueing. Fixes: 9efd23297cca ("sch_sfb: Don't assume the skb is still around after enqueueing to child") Signed-off-by: Toke Høiland-Jørgensen Acked-by: Cong Wang Link: https://lore.kernel.org/r/20220905192137.965549-1-toke@toke.dk Signed-off-by: Paolo Abeni net/sched/sch_sfb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5382033a35227c57a349d74752ad2527780159a9 Author: Arun Ramadoss Date: Mon Sep 5 20:57:50 2022 +0530 net: phy: lan87xx: change interrupt src of link_up to comm_ready Currently phy link up/down interrupt is enabled using the LAN87xx_INTERRUPT_MASK register. In the lan87xx_read_status function, phy link is determined using the T1_MODE_STAT_REG register comm_ready bit. comm_ready bit is set using the loc_rcvr_status & rem_rcvr_status. Whenever the phy link is up, LAN87xx_INTERRUPT_SOURCE link_up bit is set first but comm_ready bit takes some time to set based on local and remote receiver status. As per the current implementation, interrupt is triggered using link_up but the comm_ready bit is still cleared in the read_status function. So, link is always down. Initially tested with the shared interrupt mechanism with switch and internal phy which is working, but after implementing interrupt controller it is not working. It can fixed either by updating the read_status function to read from LAN87XX_INTERRUPT_SOURCE register or enable the interrupt mask for comm_ready bit. But the validation team recommends the use of comm_ready for link detection. This patch fixes by enabling the comm_ready bit for link_up in the LAN87XX_INTERRUPT_MASK_2 register (MISC Bank) and link_down in LAN87xx_INTERRUPT_MASK register. Fixes: 8a1b415d70b7 ("net: phy: added ethtool master-slave configuration support") Signed-off-by: Arun Ramadoss Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20220905152750.5079-1-arun.ramadoss@microchip.com Signed-off-by: Paolo Abeni drivers/net/phy/microchip_t1.c | 58 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 4 deletions(-) commit e3d3fd1cea22ada5a06284d7bbb6cd5794d8545a Author: Christian König Date: Wed Sep 7 11:56:22 2022 +0200 drm/ttm: cleanup the resource of ghost objects after locking them Otherwise lockdep will complain about cleaning up the bulk_move. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220907100051.570641-1-christian.koenig@amd.com Fixes: d91c411c744b ("drm/ttm: update bulk move object of ghost BO") drivers/gpu/drm/ttm/ttm_bo_util.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c0521598a58cfbba7bb0625d16124e32645c152f Merge: 7e18e42e4b28 aac4cec1ec45 Author: Dave Airlie Date: Thu Sep 8 16:09:41 2022 +1000 Merge tag 'amd-drm-fixes-6.0-2022-09-07' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.0-2022-09-07: amdgpu: - Firmware header fix - SMU 13.x fix - Debugfs memory leak fix - NBIO 7.7 fix - Firmware memory leak fix amdkfd: - Debug output fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20220908032332.5880-1-alexander.deucher@amd.com commit aac4cec1ec45d72bd03eaf3fd772c5a609f5ed26 Author: Guchun Chen Date: Fri Sep 2 14:08:55 2022 +0800 drm/amdgpu: prevent toc firmware memory leak It's missed in psp fini. Signed-off-by: Guchun Chen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d832db12af4a057582011a590f60f32853680dd4 Author: Yifan Zhang Date: Tue Sep 6 13:09:20 2022 +0800 drm/amdgpu: correct doorbell range/size value for CSDMA_DOORBELL_RANGE current function mixes CSDMA_DOORBELL_RANGE and SDMA0_DOORBELL_RANGE range/size manipulation, while these 2 registers have difference size field mask. Remove range/size manipulation for SDMA0_DOORBELL_RANGE. Signed-off-by: Yifan Zhang Reviewed-by: Xiaojian Du Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c | 6 ------ 1 file changed, 6 deletions(-) commit ae0448bc88b7827babda73edfe587ccc222baccc Author: Yifan Zhang Date: Sun Sep 4 15:53:27 2022 +0800 drm/amdkfd: print address in hex format rather than decimal Addresses should be printed in hex format. Signed-off-by: Yifan Zhang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbfac7fa491651c57926c99edeb7495c6c1aeac2 Author: Greg Kroah-Hartman Date: Fri Sep 2 15:01:05 2022 +0200 drm/amd/display: fix memory leak when using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. Fix this up by properly calling dput(). Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Wayne Lin Cc: hersen wu Cc: Wenjing Liu Cc: Patrik Jakobsson Cc: Thelford Williams Cc: Fangzhi Zuo Cc: Yongzhi Liu Cc: Mikita Lipski Cc: Jiapeng Chong Cc: Bhanuprakash Modem Cc: Sean Paul Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: stable@vger.kernel.org Reviewed-by: Rodrigo Siqueira Signed-off-by: Greg Kroah-Hartman Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 1 + 1 file changed, 1 insertion(+) commit bbcbd63231cbd1405ff8e987870b02abc6a4d669 Author: Evan Quan Date: Thu Sep 1 13:48:58 2022 +0800 drm/amd/pm: add missing SetMGpuFanBoostLimitRpm mapping for SMU 13.0.7 Missing SetMGpuFanBoostLimitRpm mapping leads to loading failure for SMU 13.0.7. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 1 + 1 file changed, 1 insertion(+) commit 992db92b07736ec98432a97b61c37dfe7bd06dd9 Author: Chengming Gui Date: Tue Sep 6 09:26:37 2022 +0800 drm/amd/amdgpu: add rlc_firmware_header_v2_4 to amdgpu_firmware_header Add missing structure to avoid incorrect size and version check. Signed-off-by: Chengming Gui Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 1 + 1 file changed, 1 insertion(+) commit a66de5283e16602b74658289360505ceeb308c90 Author: Michael Ellerman Date: Wed Sep 7 09:37:17 2022 +1000 powerpc/pseries: Fix plpks crash on non-pseries As reported[1] by Nathan, the recently added plpks driver will crash if it's built into the kernel and booted on a non-pseries machine, eg powernv: kernel BUG at arch/powerpc/kernel/syscall.c:39! Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA PowerNV ... NIP system_call_exception+0x90/0x3d0 LR system_call_common+0xec/0x250 Call Trace: 0xc0000000035c3e10 (unreliable) system_call_common+0xec/0x250 --- interrupt: c00 at plpar_hcall+0x38/0x60 NIP: c0000000000e4300 LR: c00000000202945c CTR: 0000000000000000 REGS: c0000000035c3e80 TRAP: 0c00 Not tainted (6.0.0-rc4) MSR: 9000000002009033 CR: 28000284 XER: 00000000 ... NIP plpar_hcall+0x38/0x60 LR pseries_plpks_init+0x64/0x23c --- interrupt: c00 On powernv Linux is the hypervisor, so a hypercall just ends up going to the syscall path, which BUGs if the syscall (hypercall) didn't come from userspace. The fix is simply to not probe the plpks driver on non-pseries machines. [1] https://lore.kernel.org/linuxppc-dev/Yxe06fbq18Wv9y3W@dev-arch.thelio-3990X/ Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform KeyStore") Reported-by: Nathan Chancellor Signed-off-by: Michael Ellerman Tested-by: Dan Horák Reviewed-by: Dan Horák Tested-by: Nathan Chancellor Link: https://lore.kernel.org/r/20220907065038.1604504-1-mpe@ellerman.id.au arch/powerpc/platforms/pseries/plpks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2a2dfc869d3345ccdd91322b023f4b0da84acbe7 Author: Joe Fradley Date: Tue Aug 23 21:19:33 2022 -0700 tools: Add new "test" taint to kernel-chktaint Commit c272612cb4a2 ("kunit: Taint the kernel when KUnit tests are run") added a new taint flag for when in-kernel tests run. This commit adds recognition of this new flag in kernel-chktaint. With this change the correct reason will be reported if the kernel is tainted because of a test run. Amended Commit log: Shuah Khan Reviewed-by: David Gow Signed-off-by: Joe Fradley Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan tools/debugging/kernel-chktaint | 9 +++++++++ 1 file changed, 9 insertions(+) commit 336d28a8f38013a069f2d46e73aaa1880ef17a47 Author: Pavel Begunkov Date: Tue Sep 6 17:11:17 2022 +0100 io_uring: recycle kbuf recycle on tw requeue When we queue a request via tw for execution it's not going to be executed immediately, so when io_queue_async() hits IO_APOLL_READY and queues a tw but doesn't try to recycle/consume the buffer some other request may try to use the the buffer. Fixes: c7fb19428d67 ("io_uring: add support for ring mapped supplied buffers") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a19bc9e211e3184215a58e129b62f440180e9212.1662480490.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 1 + 1 file changed, 1 insertion(+) commit df6d3422d3eed27afa23df092b3ce147c558d1a8 Author: Pavel Begunkov Date: Tue Sep 6 17:11:16 2022 +0100 io_uring/kbuf: fix not advancing READV kbuf ring When we don't recycle a selected ring buffer we should advance the head of the ring, so don't just skip io_kbuf_recycle() for IORING_OP_READV but adjust the ring. Fixes: 934447a603b22 ("io_uring: do not recycle buffer in READV") Signed-off-by: Pavel Begunkov Reviewed-by: Dylan Yudaken Link: https://lore.kernel.org/r/a6d85e2611471bcb5d5dcd63a8342077ddc2d73d.1662480490.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/kbuf.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9cb636b5f6a8cc6d1b50809ec8f8d33ae0c84c95 Author: Hyunwoo Kim Date: Wed Sep 7 09:07:14 2022 -0700 efi: capsule-loader: Fix use-after-free in efi_capsule_write A race condition may occur if the user calls close() on another thread during a write() operation on the device node of the efi capsule. This is a race condition that occurs between the efi_capsule_write() and efi_capsule_flush() functions of efi_capsule_fops, which ultimately results in UAF. So, the page freeing process is modified to be done in efi_capsule_release() instead of efi_capsule_flush(). Cc: # v4.9+ Signed-off-by: Hyunwoo Kim Link: https://lore.kernel.org/all/20220907102920.GA88602@ubuntu/ Signed-off-by: Ard Biesheuvel drivers/firmware/efi/capsule-loader.c | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) commit 5ac251c8a05ce074e5efac779debf82a15d870a3 Author: Yicong Yang Date: Mon Sep 5 20:26:15 2022 +0800 arch_topology: Make cluster topology span at least SMT CPUs Currently cpu_clustergroup_mask() will return CPU mask if cluster span more or the same CPUs as cpu_coregroup_mask(). This will result topology borken on non-Cluster SMT machines when building with CONFIG_SCHED_CLUSTER=y. Test with: qemu-system-aarch64 -enable-kvm -machine virt \ -net none \ -cpu host \ -bios ./QEMU_EFI.fd \ -m 2G \ -smp 48,sockets=2,cores=12,threads=2 \ -kernel $Image \ -initrd $Rootfs \ -nographic -append "rdinit=init console=ttyAMA0 sched_verbose loglevel=8" We'll get below error: [ 3.084568] BUG: arch topology borken [ 3.084570] the SMT domain not a subset of the CLS domain Since cluster is a level higher than SMT, fix this by making cluster spans at least SMT CPUs. Fixes: bfcc4397435d ("arch_topology: Limit span of cpu_clustergroup_mask()") Cc: Sudeep Holla Cc: Vincent Guittot Cc: Ionela Voinescu Cc: Greg KH Reviewed-by: Sudeep Holla Signed-off-by: Yicong Yang Link: https://lore.kernel.org/r/20220905122615.12946-1-yangyicong@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/base/arch_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12ef2508f33db1654de2f22f75dd868141b8b305 Author: Krzysztof Kozlowski Date: Wed Sep 7 14:04:52 2022 +0200 dt-bindings: interconnect: fsl,imx8m-noc: drop Leonard Crestez Emails to Leonard Crestez bounce ("550 5.4.1 Recipient address rejected: Access denied:), so change maintainer to Peng Fan from NXP. Signed-off-by: Krzysztof Kozlowski Acked-by: Peng Fan Link: https://lore.kernel.org/r/20220907120452.52161-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/interconnect/fsl,imx8m-noc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9b1a4f867ae9c1dbd1d71cd09cbdb3239fb4968 Author: Yacan Liu Date: Tue Sep 6 21:01:39 2022 +0800 net/smc: Fix possible access to freed memory in link clear After modifying the QP to the Error state, all RX WR would be completed with WC in IB_WC_WR_FLUSH_ERR status. Current implementation does not wait for it is done, but destroy the QP and free the link group directly. So there is a risk that accessing the freed memory in tasklet context. Here is a crash example: BUG: unable to handle page fault for address: ffffffff8f220860 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD f7300e067 P4D f7300e067 PUD f7300f063 PMD 8c4e45063 PTE 800ffff08c9df060 Oops: 0002 [#1] SMP PTI CPU: 1 PID: 0 Comm: swapper/1 Kdump: loaded Tainted: G S OE 5.10.0-0607+ #23 Hardware name: Inspur NF5280M4/YZMB-00689-101, BIOS 4.1.20 07/09/2018 RIP: 0010:native_queued_spin_lock_slowpath+0x176/0x1b0 Code: f3 90 48 8b 32 48 85 f6 74 f6 eb d5 c1 ee 12 83 e0 03 83 ee 01 48 c1 e0 05 48 63 f6 48 05 00 c8 02 00 48 03 04 f5 00 09 98 8e <48> 89 10 8b 42 08 85 c0 75 09 f3 90 8b 42 08 85 c0 74 f7 48 8b 32 RSP: 0018:ffffb3b6c001ebd8 EFLAGS: 00010086 RAX: ffffffff8f220860 RBX: 0000000000000246 RCX: 0000000000080000 RDX: ffff91db1f86c800 RSI: 000000000000173c RDI: ffff91db62bace00 RBP: ffff91db62bacc00 R08: 0000000000000000 R09: c00000010000028b R10: 0000000000055198 R11: ffffb3b6c001ea58 R12: ffff91db80e05010 R13: 000000000000000a R14: 0000000000000006 R15: 0000000000000040 FS: 0000000000000000(0000) GS:ffff91db1f840000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffff8f220860 CR3: 00000001f9580004 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: _raw_spin_lock_irqsave+0x30/0x40 mlx5_ib_poll_cq+0x4c/0xc50 [mlx5_ib] smc_wr_rx_tasklet_fn+0x56/0xa0 [smc] tasklet_action_common.isra.21+0x66/0x100 __do_softirq+0xd5/0x29c asm_call_irq_on_stack+0x12/0x20 do_softirq_own_stack+0x37/0x40 irq_exit_rcu+0x9d/0xa0 sysvec_call_function_single+0x34/0x80 asm_sysvec_call_function_single+0x12/0x20 Fixes: bd4ad57718cc ("smc: initialize IB transport incl. PD, MR, QP, CQ, event, WR") Signed-off-by: Yacan Liu Reviewed-by: Tony Lu Signed-off-by: David S. Miller net/smc/smc_core.c | 1 + net/smc/smc_core.h | 2 ++ net/smc/smc_wr.c | 5 +++++ net/smc/smc_wr.h | 5 +++++ 4 files changed, 13 insertions(+) commit 1d10cd4da593bc0196a239dcc54dac24b6b0a74e Author: Ilpo Järvinen Date: Thu Sep 1 17:39:34 2022 +0300 serial: tegra-tcu: Use uart_xmit_advance(), fixes icount.tx accounting Tx'ing does not correctly account Tx'ed characters into icount.tx. Using uart_xmit_advance() fixes the problem. Fixes: 2d908b38d409 ("serial: Add Tegra Combined UART driver") Cc: # serial: Create uart_xmit_advance() Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220901143934.8850-4-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/tegra-tcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 754f68044c7dd6c52534ba3e0f664830285c4b15 Author: Ilpo Järvinen Date: Thu Sep 1 17:39:33 2022 +0300 serial: tegra: Use uart_xmit_advance(), fixes icount.tx accounting DMA complete & stop paths did not correctly account Tx'ed characters into icount.tx. Using uart_xmit_advance() fixes the problem. Fixes: e9ea096dd225 ("serial: tegra: add serial driver") Cc: # serial: Create uart_xmit_advance() Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220901143934.8850-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial-tegra.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e77cab77f2cb3a1ca2ba8df4af45bb35617ac16d Author: Ilpo Järvinen Date: Thu Sep 1 17:39:32 2022 +0300 serial: Create uart_xmit_advance() A very common pattern in the drivers is to advance xmit tail index and do bookkeeping of Tx'ed characters. Create uart_xmit_advance() to handle it. Reviewed-by: Andy Shevchenko Cc: stable Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220901143934.8850-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman include/linux/serial_core.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 91062e663b261815573ce00967b1895a99e668df Author: William Wu Date: Thu Sep 1 16:34:46 2022 +0800 usb: dwc3: core: leave default DMA if the controller does not support 64-bit DMA On some DWC3 controllers (e.g. Rockchip SoCs), the DWC3 core doesn't support 64-bit DMA address width. In this case, this driver should use the default 32-bit mask. Otherwise, the DWC3 controller will break if it runs on above 4GB physical memory environment. This patch reads the DWC_USB3_AWIDTH bits of GHWPARAMS0 which used for the DMA address width, and only configure 64-bit DMA mask if the DWC_USB3_AWIDTH is 64. Fixes: 45d39448b4d0 ("usb: dwc3: support 64 bit DMA in platform driver") Cc: stable Reviewed-by: Sven Peter Signed-off-by: William Wu Link: https://lore.kernel.org/r/20220901083446.3799754-1-william.wu@rock-chips.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit f27b405ef43319a3ceefc2123245201a63ed4e00 Author: Lorenzo Bianconi Date: Mon Sep 5 14:41:28 2022 +0200 net: ethernet: mtk_eth_soc: check max allowed hash in mtk_ppe_check_skb Even if max hash configured in hw in mtk_ppe_hash_entry is MTK_PPE_ENTRIES - 1, check theoretical OOB accesses in mtk_ppe_check_skb routine Fixes: c4f033d9e03e9 ("net: ethernet: mtk_eth_soc: rework hardware flow table management") Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_ppe.h | 3 +++ 1 file changed, 3 insertions(+) commit 9cb252c4c1c53ae58bc565bab76e98133288f23a Author: Menglong Dong Date: Mon Sep 5 11:50:15 2022 +0800 net: skb: export skb drop reaons to user by TRACE_DEFINE_ENUM As Eric reported, the 'reason' field is not presented when trace the kfree_skb event by perf: $ perf record -e skb:kfree_skb -a sleep 10 $ perf script ip_defrag 14605 [021] 221.614303: skb:kfree_skb: skbaddr=0xffff9d2851242700 protocol=34525 location=0xffffffffa39346b1 reason: The cause seems to be passing kernel address directly to TP_printk(), which is not right. As the enum 'skb_drop_reason' is not exported to user space through TRACE_DEFINE_ENUM(), perf can't get the drop reason string from the 'reason' field, which is a number. Therefore, we introduce the macro DEFINE_DROP_REASON(), which is used to define the trace enum by TRACE_DEFINE_ENUM(). With the help of DEFINE_DROP_REASON(), now we can remove the auto-generate that we introduced in the commit ec43908dd556 ("net: skb: use auto-generation to convert skb drop reason to string"), and define the string array 'drop_reasons'. Hmmmm...now we come back to the situation that have to maintain drop reasons in both enum skb_drop_reason and DEFINE_DROP_REASON. But they are both in dropreason.h, which makes it easier. After this commit, now the format of kfree_skb is like this: $ cat /tracing/events/skb/kfree_skb/format name: kfree_skb ID: 1524 format: field:unsigned short common_type; offset:0; size:2; signed:0; field:unsigned char common_flags; offset:2; size:1; signed:0; field:unsigned char common_preempt_count; offset:3; size:1; signed:0; field:int common_pid; offset:4; size:4; signed:1; field:void * skbaddr; offset:8; size:8; signed:0; field:void * location; offset:16; size:8; signed:0; field:unsigned short protocol; offset:24; size:2; signed:0; field:enum skb_drop_reason reason; offset:28; size:4; signed:0; print fmt: "skbaddr=%p protocol=%u location=%p reason: %s", REC->skbaddr, REC->protocol, REC->location, __print_symbolic(REC->reason, { 1, "NOT_SPECIFIED" }, { 2, "NO_SOCKET" } ...... Fixes: ec43908dd556 ("net: skb: use auto-generation to convert skb drop reason to string") Link: https://lore.kernel.org/netdev/CANn89i+bx0ybvE55iMYf5GJM48WwV1HNpdm9Q6t-HaEstqpCSA@mail.gmail.com/ Reported-by: Eric Dumazet Signed-off-by: Menglong Dong Signed-off-by: David S. Miller include/net/dropreason.h | 67 ++++++++++++++++++++++++++++++++++++++++++++++ include/trace/events/skb.h | 15 ++++++++++- net/core/.gitignore | 1 - net/core/Makefile | 22 +-------------- net/core/skbuff.c | 6 ++++- 5 files changed, 87 insertions(+), 24 deletions(-) commit 0e80707d94e4c88f9879bdafcbaceb13432ec1f4 Author: Lorenzo Bianconi Date: Tue Sep 6 16:36:32 2022 +0200 net: ethernet: mtk_eth_soc: fix typo in __mtk_foe_entry_clear Set ib1 state to MTK_FOE_STATE_UNBIND in __mtk_foe_entry_clear routine. Fixes: 33fc42de33278 ("net: ethernet: mtk_eth_soc: support creating mac address based offload entries") Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_ppe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 559c36c5a8d730c49ef805a72b213d3bba155cc8 Author: Pablo Neira Ayuso Date: Wed Sep 7 10:26:18 2022 +0200 netfilter: nfnetlink_osf: fix possible bogus match in nf_osf_find() nf_osf_find() incorrectly returns true on mismatch, this leads to copying uninitialized memory area in nft_osf which can be used to leak stale kernel stack data to userspace. Fixes: 22c7652cdaa8 ("netfilter: nft_osf: Add version option support") Signed-off-by: Pablo Neira Ayuso Signed-off-by: Florian Westphal net/netfilter/nfnetlink_osf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e8d5dfd1d8747b56077d02664a8838c71ced948e Author: David Leadbeater Date: Fri Aug 26 14:56:57 2022 +1000 netfilter: nf_conntrack_irc: Tighten matching on DCC message CTCP messages should only be at the start of an IRC message, not anywhere within it. While the helper only decodes packes in the ORIGINAL direction, its possible to make a client send a CTCP message back by empedding one into a PING request. As-is, thats enough to make the helper believe that it saw a CTCP message. Fixes: 869f37d8e48f ("[NETFILTER]: nf_conntrack/nf_nat: add IRC helper port") Signed-off-by: David Leadbeater Signed-off-by: Florian Westphal net/netfilter/nf_conntrack_irc.c | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) commit 91c98fe7941499e4127cdc359c30841b873dd43a Author: Jean-Philippe Brucker Date: Thu Aug 25 16:46:24 2022 +0100 iommu/virtio: Fix interaction with VFIO Commit e8ae0e140c05 ("vfio: Require that devices support DMA cache coherence") requires IOMMU drivers to advertise IOMMU_CAP_CACHE_COHERENCY, in order to be used by VFIO. Since VFIO does not provide to userspace the ability to maintain coherency through cache invalidations, it requires hardware coherency. Advertise the capability in order to restore VFIO support. The meaning of IOMMU_CAP_CACHE_COHERENCY also changed from "IOMMU can enforce cache coherent DMA transactions" to "IOMMU_CACHE is supported". While virtio-iommu cannot enforce coherency (of PCIe no-snoop transactions), it does support IOMMU_CACHE. We can distinguish different cases of non-coherent DMA: (1) When accesses from a hardware endpoint are not coherent. The host would describe such a device using firmware methods ('dma-coherent' in device-tree, '_CCA' in ACPI), since they are also needed without a vIOMMU. In this case mappings are created without IOMMU_CACHE. virtio-iommu doesn't need any additional support. It sends the same requests as for coherent devices. (2) When the physical IOMMU supports non-cacheable mappings. Supporting those would require a new feature in virtio-iommu, new PROBE request property and MAP flags. Device drivers would use a new API to discover this since it depends on the architecture and the physical IOMMU. (3) When the hardware supports PCIe no-snoop. It is possible for assigned PCIe devices to issue no-snoop transactions, and the virtio-iommu specification is lacking any mention of this. Arm platforms don't necessarily support no-snoop, and those that do cannot enforce coherency of no-snoop transactions. Device drivers must be careful about assuming that no-snoop transactions won't end up cached; see commit e02f5c1bb228 ("drm: disable uncached DMA optimization for ARM and arm64"). On x86 platforms, the host may or may not enforce coherency of no-snoop transactions with the physical IOMMU. But according to the above commit, on x86 a driver which assumes that no-snoop DMA is compatible with uncached CPU mappings will also work if the host enforces coherency. Although these issues are not specific to virtio-iommu, it could be used to facilitate discovery and configuration of no-snoop. This would require a new feature bit, PROBE property and ATTACH/MAP flags. Cc: stable@vger.kernel.org Fixes: e8ae0e140c05 ("vfio: Require that devices support DMA cache coherence") Signed-off-by: Jean-Philippe Brucker Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20220825154622.86759-1-jean-philippe@linaro.org Signed-off-by: Joerg Roedel drivers/iommu/virtio-iommu.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 35bf49e054214a0c7d3b0a0f8606f753f3f6ae96 Author: Lu Baolu Date: Tue Aug 23 14:15:57 2022 +0800 iommu/vt-d: Fix lockdep splat due to klist iteration in atomic context With CONFIG_INTEL_IOMMU_DEBUGFS enabled, below lockdep splat are seen when an I/O fault occurs on a machine with an Intel IOMMU in it. DMAR: DRHD: handling fault status reg 3 DMAR: [DMA Write NO_PASID] Request device [00:1a.0] fault addr 0x0 [fault reason 0x05] PTE Write access is not set DMAR: Dump dmar0 table entries for IOVA 0x0 DMAR: root entry: 0x0000000127f42001 DMAR: context entry: hi 0x0000000000001502, low 0x000000012d8ab001 ================================ WARNING: inconsistent lock state 5.20.0-0.rc0.20220812git7ebfc85e2cd7.10.fc38.x86_64 #1 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. rngd/1006 [HC1[1]:SC0[0]:HE0:SE1] takes: ff177021416f2d78 (&k->k_lock){?.+.}-{2:2}, at: klist_next+0x1b/0x160 {HARDIRQ-ON-W} state was registered at: lock_acquire+0xce/0x2d0 _raw_spin_lock+0x33/0x80 klist_add_tail+0x46/0x80 bus_add_device+0xee/0x150 device_add+0x39d/0x9a0 add_memory_block+0x108/0x1d0 memory_dev_init+0xe1/0x117 driver_init+0x43/0x4d kernel_init_freeable+0x1c2/0x2cc kernel_init+0x16/0x140 ret_from_fork+0x1f/0x30 irq event stamp: 7812 hardirqs last enabled at (7811): [] asm_sysvec_apic_timer_interrupt+0x16/0x20 hardirqs last disabled at (7812): [] irqentry_enter+0x54/0x60 softirqs last enabled at (7794): [] __irq_exit_rcu+0xf9/0x170 softirqs last disabled at (7787): [] __irq_exit_rcu+0xf9/0x170 The klist iterator functions using spin_*lock_irq*() but the klist insertion functions using spin_*lock(), combined with the Intel DMAR IOMMU driver iterating over klists from atomic (hardirq) context, where pci_get_domain_bus_and_slot() calls into bus_find_device() which iterates over klists. As currently there's no plan to fix the klist to make it safe to use in atomic context, this fixes the lockdep splat by avoid calling pci_get_domain_bus_and_slot() in the hardirq context. Fixes: 8ac0b64b9735 ("iommu/vt-d: Use pci_get_domain_bus_and_slot() in pgtable_walk()") Reported-by: Lennert Buytenhek Link: https://lore.kernel.org/linux-iommu/Yvo2dfpEh%2FWC+Wrr@wantstofly.org/ Link: https://lore.kernel.org/linux-iommu/YvyBdPwrTuHHbn5X@wantstofly.org/ Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20220819015949.4795-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 47 ++++++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 28 deletions(-) commit a349ffcb4daf77a4040ab5a6c95295bb533bf384 Author: Lu Baolu Date: Tue Aug 23 14:15:56 2022 +0800 iommu/vt-d: Fix recursive lock issue in iommu_flush_dev_iotlb() The per domain spinlock is acquired in iommu_flush_dev_iotlb(), which is possbile to be called in the interrupt context. For example, the drm-intel's CI system got completely blocked with below error: WARNING: inconsistent lock state 6.0.0-rc1-CI_DRM_11990-g6590d43d39b9+ #1 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. swapper/6/0 [HC0[0]:SC1[1]:HE1:SE0] takes: ffff88810440d678 (&domain->lock){+.?.}-{2:2}, at: iommu_flush_dev_iotlb.part.61+0x23/0x80 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0xd3/0x310 _raw_spin_lock+0x2a/0x40 domain_update_iommu_cap+0x20b/0x2c0 intel_iommu_attach_device+0x5bd/0x860 __iommu_attach_device+0x18/0xe0 bus_iommu_probe+0x1f3/0x2d0 bus_set_iommu+0x82/0xd0 intel_iommu_init+0xe45/0x102a pci_iommu_init+0x9/0x31 do_one_initcall+0x53/0x2f0 kernel_init_freeable+0x18f/0x1e1 kernel_init+0x11/0x120 ret_from_fork+0x1f/0x30 irq event stamp: 162354 hardirqs last enabled at (162354): [] _raw_spin_unlock_irqrestore+0x54/0x70 hardirqs last disabled at (162353): [] _raw_spin_lock_irqsave+0x4b/0x50 softirqs last enabled at (162338): [] __do_softirq+0x323/0x48e softirqs last disabled at (162349): [] irq_exit_rcu+0xb8/0xe0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&domain->lock); lock(&domain->lock); *** DEADLOCK *** 1 lock held by swapper/6/0: This coverts the spin_lock/unlock() into the irq save/restore varieties to fix the recursive locking issues. Fixes: ffd5869d93530 ("iommu/vt-d: Replace spin_lock_irqsave() with spin_lock()") Signed-off-by: Lu Baolu Acked-by: Lucas De Marchi Link: https://lore.kernel.org/r/20220817025650.3253959-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) commit 53fc7ad6edf210b497230ce74b61b322a202470c Author: Lu Baolu Date: Tue Aug 23 14:15:55 2022 +0800 iommu/vt-d: Correctly calculate sagaw value of IOMMU The Intel IOMMU driver possibly selects between the first-level and the second-level translation tables for DMA address translation. However, the levels of page-table walks for the 4KB base page size are calculated from the SAGAW field of the capability register, which is only valid for the second-level page table. This causes the IOMMU driver to stop working if the hardware (or the emulated IOMMU) advertises only first-level translation capability and reports the SAGAW field as 0. This solves the above problem by considering both the first level and the second level when calculating the supported page table levels. Fixes: b802d070a52a1 ("iommu/vt-d: Use iova over first level") Cc: stable@vger.kernel.org Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20220817023558.3253263-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit 0c5f6c0d8201a809a6585b07b6263e9db2c874a3 Author: Lu Baolu Date: Tue Aug 23 14:15:54 2022 +0800 iommu/vt-d: Fix kdump kernels boot failure with scalable mode The translation table copying code for kdump kernels is currently based on the extended root/context entry formats of ECS mode defined in older VT-d v2.5, and doesn't handle the scalable mode formats. This causes the kexec capture kernel boot failure with DMAR faults if the IOMMU was enabled in scalable mode by the previous kernel. The ECS mode has already been deprecated by the VT-d spec since v3.0 and Intel IOMMU driver doesn't support this mode as there's no real hardware implementation. Hence this converts ECS checking in copying table code into scalable mode. The existing copying code consumes a bit in the context entry as a mark of copied entry. It needs to work for the old format as well as for the extended context entries. As it's hard to find such a common bit for both legacy and scalable mode context entries. This replaces it with a per- IOMMU bitmap. Fixes: 7373a8cc38197 ("iommu/vt-d: Setup context and enable RID2PASID support") Cc: stable@vger.kernel.org Reported-by: Jerry Snitselaar Tested-by: Wen Jin Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20220817011035.3250131-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 100 +++++++++++++++++++------------------------- drivers/iommu/intel/iommu.h | 9 ++-- 2 files changed, 50 insertions(+), 59 deletions(-) commit ba912afbd611d3a5f22af247721a071ad1d5b9e0 Author: Alexander Sverdlin Date: Tue Sep 6 11:59:43 2022 +0200 MIPS: OCTEON: irq: Fix octeon_irq_force_ciu_mapping() For irq_domain_associate() to work the virq descriptor has to be pre-allocated in advance. Otherwise the following happens: WARNING: CPU: 0 PID: 0 at .../kernel/irq/irqdomain.c:527 irq_domain_associate+0x298/0x2e8 error: virq128 is not allocated Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.19.78-... #1 ... Call Trace: [] show_stack+0x9c/0x130 [] dump_stack+0x90/0xd0 [] __warn+0x118/0x130 [] warn_slowpath_fmt+0x4c/0x70 [] irq_domain_associate+0x298/0x2e8 [] octeon_irq_init_ciu+0x4c8/0x53c [] of_irq_init+0x1e0/0x388 [] init_IRQ+0x4c/0xf4 [] start_kernel+0x404/0x698 Use irq_alloc_desc_at() to avoid the above problem. Signed-off-by: Alexander Sverdlin Signed-off-by: Thomas Bogendoerfer arch/mips/cavium-octeon/octeon-irq.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 25b327d4f818b9d41265ea3eea26d805216589b8 Author: Florian Westphal Date: Wed Aug 31 15:12:45 2022 +0200 selftests: nft_concat_range: add socat support There are different flavors of 'nc' around, this script fails on my test vm because 'nc' is 'nmap-ncat' which isn't 100% compatible. Add socat support and use it if available. Signed-off-by: Florian Westphal .../selftests/netfilter/nft_concat_range.sh | 65 ++++++++++++++++++---- 1 file changed, 53 insertions(+), 12 deletions(-) commit 39aebedeaaa95757f5c1f2ddb5f43fdddbf478ca Author: Igor Ryzhov Date: Wed Jun 5 12:32:40 2019 +0300 netfilter: nf_conntrack_sip: fix ct_sip_walk_headers ct_sip_next_header and ct_sip_get_header return an absolute value of matchoff, not a shift from current dataoff. So dataoff should be assigned matchoff, not incremented by it. This issue can be seen in the scenario when there are multiple Contact headers and the first one is using a hostname and other headers use IP addresses. In this case, ct_sip_walk_headers will work as follows: The first ct_sip_get_header call to will find the first Contact header but will return -1 as the header uses a hostname. But matchoff will be changed to the offset of this header. After that, dataoff should be set to matchoff, so that the next ct_sip_get_header call find the next Contact header. But instead of assigning dataoff to matchoff, it is incremented by it, which is not correct, as matchoff is an absolute value of the offset. So on the next call to the ct_sip_get_header, dataoff will be incorrect, and the next Contact header may not be found at all. Fixes: 05e3ced297fe ("[NETFILTER]: nf_conntrack_sip: introduce SIP-URI parsing helper") Signed-off-by: Igor Ryzhov Signed-off-by: Florian Westphal net/netfilter/nf_conntrack_sip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 388f788341178b91d2a18e7d605126dab6732257 Author: Alexander Sverdlin Date: Tue Sep 6 10:32:39 2022 +0200 MIPS: octeon: Get rid of preprocessor directives around RESERVE32 Some of them were pointless because CONFIG_CAVIUM_RESERVE32 is now always defined, some were not enough (Yu Zhao reported "Failed to allocate CAVIUM_RESERVE32 memory area" error). Removing the directives allows for compiler coverage of RESERVE32 code and replacing one of [always-true] "ifdef" with a compiler conditional fixes the [cosmetic] error message. Fixes: 3e3114ac460e ("MIPS: Introduce CAVIUM_RESERVE32 Kconfig option") Signed-off-by: Alexander Sverdlin Signed-off-by: Thomas Bogendoerfer arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c | 4 ---- arch/mips/cavium-octeon/setup.c | 27 +++++++++------------- 2 files changed, 11 insertions(+), 20 deletions(-) commit 0f51fa2a3ca19783e7817a6be76661cd9136d057 Merge: e1091e226a2b a4bb481aeb9d Author: David S. Miller Date: Wed Sep 7 13:44:04 2022 +0100 Merge branch 'dsa-felix-fixes' Vladimir Oltean says: ==================== Fixes for Felix DSA driver calculation of tc-taprio guard bands This series fixes some bugs which are not quite new, but date from v5.13 when static guard bands were enabled by Michael Walle to prevent tc-taprio overruns. The investigation started when Xiaoliang asked privately what is the expected max SDU for a traffic class when its minimum gate interval is 10 us. The answer, as it turns out, is not an L1 size of 1250 octets, but 1245 octets, since otherwise, the switch will not consider frames for egress scheduling, because the static guard band is exactly as large as the time interval. The switch needs a minimum of 33 ns outside of the guard band to consider a frame for scheduling, and the reduction of the max SDU by 5 provides exactly for that. The fix for that (patch 1/3) is relatively small, but during testing, it became apparent that cut-through forwarding prevents oversized frame dropping from working properly. This is solved through the larger patch 2/3. Finally, patch 3/3 fixes one more tc-taprio locking problem found through code inspection. ==================== Signed-off-by: David S. Miller commit a4bb481aeb9d84cb53112a478e6db4705b794c34 Author: Vladimir Oltean Date: Mon Sep 5 20:01:25 2022 +0300 net: dsa: felix: access QSYS_TAG_CONFIG under tas_lock in vsc9959_sched_speed_set The read-modify-write of QSYS_TAG_CONFIG from vsc9959_sched_speed_set() runs unlocked with respect to the other functions that access it, which are vsc9959_tas_guard_bands_update(), vsc9959_qos_port_tas_set() and vsc9959_tas_clock_adjust(). All the others are under ocelot->tas_lock, so move the vsc9959_sched_speed_set() access under that lock as well, to resolve the concurrency. Fixes: 55a515b1f5a9 ("net: dsa: felix: drop oversized frames with tc-taprio instead of hanging the port") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/ocelot/felix_vsc9959.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 843794bbdef83955ae5b43dfafc355c3786e2145 Author: Vladimir Oltean Date: Mon Sep 5 20:01:24 2022 +0300 net: dsa: felix: disable cut-through forwarding for frames oversized for tc-taprio Experimentally, it looks like when QSYS_QMAXSDU_CFG_7 is set to 605, frames even way larger than 601 octets are transmitted even though these should be considered as oversized, according to the documentation, and dropped. Since oversized frame dropping depends on frame size, which is only known at the EOF stage, and therefore not at SOF when cut-through forwarding begins, it means that the switch cannot take QSYS_QMAXSDU_CFG_* into consideration for traffic classes that are cut-through. Since cut-through forwarding has no UAPI to control it, and the driver enables it based on the mantra "if we can, then why not", the strategy is to alter vsc9959_cut_through_fwd() to take into consideration which tc's have oversize frame dropping enabled, and disable cut-through for them. Then, from vsc9959_tas_guard_bands_update(), we re-trigger the cut-through determination process. There are 2 strategies for vsc9959_cut_through_fwd() to determine whether a tc has oversized dropping enabled or not. One is to keep a bit mask of traffic classes per port, and the other is to read back from the hardware registers (a non-zero value of QSYS_QMAXSDU_CFG_* means the feature is enabled). We choose reading back from registers, because struct ocelot_port is shared with drivers (ocelot, seville) that don't support either cut-through nor tc-taprio, and we don't have a felix specific extension of struct ocelot_port. Furthermore, reading registers from the Felix hardware is quite cheap, since they are memory-mapped. Fixes: 55a515b1f5a9 ("net: dsa: felix: drop oversized frames with tc-taprio instead of hanging the port") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/ocelot/felix_vsc9959.c | 122 +++++++++++++++++++++------------ 1 file changed, 79 insertions(+), 43 deletions(-) commit 11afdc6526de0e0368c05da632a8c0d29fc60bb8 Author: Vladimir Oltean Date: Mon Sep 5 20:01:23 2022 +0300 net: dsa: felix: tc-taprio intervals smaller than MTU should send at least one packet The blamed commit broke tc-taprio schedules such as this one: tc qdisc replace dev $swp1 root taprio \ num_tc 8 \ map 0 1 2 3 4 5 6 7 \ queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 \ base-time 0 \ sched-entry S 0x7f 990000 \ sched-entry S 0x80 10000 \ flags 0x2 because the gate entry for TC 7 (S 0x80 10000 ns) now has a static guard band added earlier than its 'gate close' event, such that packet overruns won't occur in the worst case of the largest packet possible. Since guard bands are statically determined based on the per-tc QSYS_QMAXSDU_CFG_* with a fallback on the port-based QSYS_PORT_MAX_SDU, we need to discuss what happens with TC 7 depending on kernel version, since the driver, prior to commit 55a515b1f5a9 ("net: dsa: felix: drop oversized frames with tc-taprio instead of hanging the port"), did not touch QSYS_QMAXSDU_CFG_*, and therefore relied on QSYS_PORT_MAX_SDU. 1 (before vsc9959_tas_guard_bands_update): QSYS_PORT_MAX_SDU defaults to 1518, and at gigabit this introduces a static guard band (independent of packet sizes) of 12144 ns, plus QSYS::HSCH_MISC_CFG.FRM_ADJ (bit time of 20 octets => 160 ns). But this is larger than the time window itself, of 10000 ns. So, the queue system never considers a frame with TC 7 as eligible for transmission, since the gate practically never opens, and these frames are forever stuck in the TX queues and hang the port. 2 (after vsc9959_tas_guard_bands_update): Under the sole goal of enabling oversized frame dropping, we make an effort to set QSYS_QMAXSDU_CFG_7 to 1230 bytes. But QSYS_QMAXSDU_CFG_7 plays one more role, which we did not take into account: per-tc static guard band, expressed in L2 byte time (auto-adjusted for FCS and L1 overhead). There is a discrepancy between what the driver thinks (that there is no guard band, and 100% of min_gate_len[tc] is available for egress scheduling) and what the hardware actually does (crops the equivalent of QSYS_QMAXSDU_CFG_7 ns out of min_gate_len[tc]). In practice, this means that the hardware thinks it has exactly 0 ns for scheduling tc 7. In both cases, even minimum sized Ethernet frames are stuck on egress rather than being considered for scheduling on TC 7, even if they would fit given a proper configuration. Considering the current situation, with vsc9959_tas_guard_bands_update(), frames between 60 octets and 1230 octets in size are not eligible for oversized dropping (because they are smaller than QSYS_QMAXSDU_CFG_7), but won't be considered as eligible for scheduling either, because the min_gate_len[7] (10000 ns) minus the guard band determined by QSYS_QMAXSDU_CFG_7 (1230 octets * 8 ns per octet == 9840 ns) minus the guard band auto-added for L1 overhead by QSYS::HSCH_MISC_CFG.FRM_ADJ (20 octets * 8 ns per octet == 160 octets) leaves 0 ns for scheduling in the queue system proper. Investigating the hardware behavior, it becomes apparent that the queue system needs precisely 33 ns of 'gate open' time in order to consider a frame as eligible for scheduling to a tc. So the solution to this problem is to amend vsc9959_tas_guard_bands_update(), by giving the per-tc guard bands less space by exactly 33 ns, just enough for one frame to be scheduled in that interval. This allows the queue system to make forward progress for that port-tc, and prevents it from hanging. Fixes: 297c4de6f780 ("net: dsa: felix: re-enable TAS guard band mode") Reported-by: Xiaoliang Yang Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/ocelot/felix_vsc9959.c | 35 ++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) commit 8d96bba75a43ba564bf8732e955d9f519d2bbaec Author: Alexander Gordeev Date: Wed Jul 20 07:24:03 2022 +0200 s390/smp: enforce lowcore protection on CPU restart As result of commit 915fea04f932 ("s390/smp: enable DAT before CPU restart callback is called") the low-address protection bit gets mistakenly unset in control register 0 save area of the absolute zero memory. That area is used when manual PSW restart happened to hit an offline CPU. In this case the low-address protection for that CPU will be dropped. Reviewed-by: Heiko Carstens Fixes: 915fea04f932 ("s390/smp: enable DAT before CPU restart callback is called") Signed-off-by: Alexander Gordeev Signed-off-by: Vasily Gorbik arch/s390/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12dd19c159659ec9050f45dc8a2ff3c3917f4be3 Author: Alexander Gordeev Date: Sat Aug 13 19:45:21 2022 +0200 s390/boot: fix absolute zero lowcore corruption on boot Crash dump always starts on CPU0. In case CPU0 is offline the prefix page is not installed and the absolute zero lowcore is used. However, struct lowcore::mcesad is never assigned and stays zero. That leads to __machine_kdump() -> save_vx_regs() call silently stores vector registers to the absolute lowcore at 0x11b0 offset. Fixes: a62bc0739253 ("s390/kdump: add support for vector extension") Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev Signed-off-by: Vasily Gorbik arch/s390/kernel/nmi.c | 2 +- arch/s390/kernel/setup.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 279c12df8d2efb28def9d037f288cbfb97c30fe2 Author: Pali Rohár Date: Tue Sep 6 12:54:31 2022 +0200 gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type in mpc85xx Commit e39d5ef67804 ("powerpc/5xxx: extend mpc8xxx_gpio driver to support mpc512x gpios") implemented support for IRQ_TYPE_LEVEL_LOW flow type in mpc512x via falling edge type. Do same for mpc85xx which support was added in commit 345e5c8a1cc3 ("powerpc: Add interrupt support to mpc8xxx_gpio"). Fixes probing of lm90 hwmon driver on mpc85xx based board which use level interrupt. Without it kernel prints error and refuse lm90 to work: [ 15.258370] genirq: Setting trigger mode 8 for irq 49 failed (mpc8xxx_irq_set_type+0x0/0xf8) [ 15.267168] lm90 0-004c: cannot request IRQ 49 [ 15.272708] lm90: probe of 0-004c failed with error -22 Fixes: 345e5c8a1cc3 ("powerpc: Add interrupt support to mpc8xxx_gpio") Signed-off-by: Pali Rohár Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-mpc8xxx.c | 1 + 1 file changed, 1 insertion(+) commit 809f44a0cc5ad4b1209467a6287f8ac0eb49d393 Author: Takashi Iwai Date: Wed Sep 7 12:04:21 2022 +0200 ALSA: usb-audio: Clear fixed clock rate at closing EP The recent commit c11117b634f4 ("ALSA: usb-audio: Refcount multiple accesses on the single clock") tries to manage the clock rate shared by several endpoints. This was intended for avoiding the unmatched rate by a different endpoint, but unfortunately, it introduced a regression for PulseAudio and pipewire, too; those applications try to probe the multiple possible rates (44.1k and 48kHz) and setting up the normal rate fails but only the last rate is applied. The cause is that the last sample rate is still left to the clock reference even after closing the endpoint, and this value is still used at the next open. It happens only when applications set up via PCM prepare but don't start/stop the stream; the rate is reset when the stream is stopped, but it's not cleared at close. This patch addresses the issue above, simply by clearing the rate set in the clock reference at the last close of each endpoint. Fixes: c11117b634f4 ("ALSA: usb-audio: Refcount multiple accesses on the single clock") Reported-by: Jason A. Donenfeld Tested-by: Jason A. Donenfeld Cc: Link: https://lore.kernel.org/all/YxXIWv8dYmg1tnXP@zx2c4.com/ Link: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2620 Link: https://lore.kernel.org/r/20220907100421.6443-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/endpoint.c | 2 ++ 1 file changed, 2 insertions(+) commit 94a568ce32038d8ff9257004bb4632e60eb43a49 Author: John Sperbeck Date: Mon Aug 1 19:22:29 2022 +0000 iommu/amd: use full 64-bit value in build_completion_wait() We started using a 64 bit completion value. Unfortunately, we only stored the low 32-bits, so a very large completion value would never be matched in iommu_completion_wait(). Fixes: c69d89aff393 ("iommu/amd: Use 4K page for completion wait write-back semaphore") Signed-off-by: John Sperbeck Link: https://lore.kernel.org/r/20220801192229.3358786-1-jsperbeck@google.com Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9fc18f6d56d5b79d527c17a8100a0965d18345cf Author: Christoph Hellwig Date: Sun Aug 21 16:06:44 2022 +0200 dma-mapping: mark dma_supported static Now that the remaining users in drivers are gone, this function can be marked static. Signed-off-by: Christoph Hellwig include/linux/dma-mapping.h | 5 ----- kernel/dma/mapping.c | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) commit 43b919017fe755ccd2b19afb2dc2d3da8f840038 Author: Chao Gao Date: Fri Aug 26 17:50:46 2022 +0800 swiotlb: fix a typo "overwirte" isn't a word. It should be "overwrite". Signed-off-by: Chao Gao Signed-off-by: Christoph Hellwig kernel/dma/swiotlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f0461613ebcdc8c4073e235053d06d5aa58750f Author: Chao Gao Date: Fri Aug 19 16:45:37 2022 +0800 swiotlb: avoid potential left shift overflow The second operand passed to slot_addr() is declared as int or unsigned int in all call sites. The left-shift to get the offset of a slot can overflow if swiotlb size is larger than 4G. Convert the macro to an inline function and declare the second argument as phys_addr_t to avoid the potential overflow. Fixes: 26a7e094783d ("swiotlb: refactor swiotlb_tbl_map_single") Signed-off-by: Chao Gao Reviewed-by: Dongli Zhang Signed-off-by: Christoph Hellwig kernel/dma/swiotlb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2995b8002cefc7b0b00b8f9a0ce36601a8c390c0 Author: Robin Murphy Date: Mon Aug 15 20:28:40 2022 +0100 dma-debug: improve search for partial syncs When bucket_find_contains() tries to find the original entry for a partial sync, it manages to constrain its search in a way that is both too restrictive and not restrictive enough. A driver which only uses single mappings rather than scatterlists might not set max_seg_size, but could still technically perform a partial sync at an offset of more than 64KB into a sufficiently large mapping, so we could stop searching too early before reaching a legitimate entry. Conversely, if no valid entry is present and max_range is large enough, we can pointlessly search buckets that we've already searched, or that represent an impossible wrapping around the bottom of the address space. At worst, the (legitimate) case of max_seg_size == UINT_MAX can make the loop infinite. Replace the fragile and frankly hard-to-follow "range" logic with a simple counted loop for the number of possible hash buckets below the given address. Reported-by: Yunfei Wang Signed-off-by: Robin Murphy Signed-off-by: Christoph Hellwig kernel/dma/debug.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 81c12e922b97b94f64e84aa9bfe5a9d1fca2dc25 Author: Yu Zhao Date: Wed Aug 31 00:38:18 2022 -0600 Revert "swiotlb: panic if nslabs is too small" This reverts commit 0bf28fc40d89b1a3e00d1b79473bad4e9ca20ad1. Reasons: 1. new panic()s shouldn't be added [1]. 2. It does no "cleanup" but breaks MIPS [2]. v2: properly solved the conflict [3] with commit 20347fca71a38 ("swiotlb: split up the global swiotlb lock") Reported-by: kernel test robot Reported-by: Dan Carpenter [1] https://lore.kernel.org/r/CAHk-=wit-DmhMfQErY29JSPjFgebx_Ld+pnerc4J2Ag990WwAA@mail.gmail.com/ [2] https://lore.kernel.org/r/20220820012031.1285979-1-yuzhao@google.com/ [3] https://lore.kernel.org/r/202208310701.LKr1WDCh-lkp@intel.com/ Fixes: 0bf28fc40d89b ("swiotlb: panic if nslabs is too small") Signed-off-by: Yu Zhao Signed-off-by: Christoph Hellwig kernel/dma/swiotlb.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit a261786fdc0a5bed2e5f994dcc0ffeeeb0d662c7 Author: Sindhu-Devale Date: Tue Sep 6 17:32:44 2022 -0500 RDMA/irdma: Report RNR NAK generation in device caps Report RNR NAK generation when device capabilities are queried Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Sindhu-Devale Signed-off-by: Shiraz Saleem Link: https://lore.kernel.org/r/20220906223244.1119-6-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/verbs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2c8844431d065ae15a6b442f5769b60aeaaa07af Author: Sindhu-Devale Date: Tue Sep 6 17:32:43 2022 -0500 RDMA/irdma: Use s/g array in post send only when its valid Send with invalidate verb call can pass in an uninitialized s/g array with 0 sge's which is filled into irdma WQE and causes a HW asynchronous event. Fix this by using the s/g array in irdma post send only when its valid. Fixes: 551c46e ("RDMA/irdma: Add user/kernel shared libraries") Signed-off-by: Sindhu-Devale Signed-off-by: Shiraz Saleem Link: https://lore.kernel.org/r/20220906223244.1119-5-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/uk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dcb23bbb1de7e009875fdfac2b8a9808a9319cc6 Author: Sindhu-Devale Date: Tue Sep 6 17:32:42 2022 -0500 RDMA/irdma: Return correct WC error for bind operation failure When a QP and a MR on a local host are in different PDs, the HW generates an asynchronous event (AE). The same AE is generated when a QP and a MW are in different PDs during a bind operation. Return the more appropriate IBV_WC_MW_BIND_ERR for the latter case by checking the OP type from the CQE in error. Fixes: 551c46edc769 ("RDMA/irdma: Add user/kernel shared libraries") Signed-off-by: Sindhu-Devale Signed-off-by: Shiraz Saleem Link: https://lore.kernel.org/r/20220906223244.1119-4-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/uk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6b227bd32db778eddc6f3b22cc72a28dda0f2272 Author: Sindhu-Devale Date: Tue Sep 6 17:32:41 2022 -0500 RDMA/irdma: Return error on MR deregister CQP failure The MR deregister CQP can fail if an MW is bound to it. Return an appropriate error for this case. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Sindhu-Devale Signed-off-by: Shiraz Saleem Link: https://lore.kernel.org/r/20220906223244.1119-3-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/utils.c | 13 ++++++++----- drivers/infiniband/hw/irdma/verbs.c | 6 +++++- 2 files changed, 13 insertions(+), 6 deletions(-) commit 12faad5e5cf2372af2d51f348b697b5edf838daf Author: Sindhu-Devale Date: Tue Sep 6 17:32:40 2022 -0500 RDMA/irdma: Report the correct max cqes from query device Report the correct max cqes available to an application taking into account a reserved entry to detect overflow. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Sindhu-Devale Signed-off-by: Shiraz Saleem Link: https://lore.kernel.org/r/20220906223244.1119-2-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab0b4b575b46d29bf49dc86047dc2964125db722 Merge: 7e18e42e4b28 0a6fc70d76bd Author: Greg Kroah-Hartman Date: Wed Sep 7 09:51:19 2022 +0200 Merge tag 'phy-fixes-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into char-misc-linus Vinod writes: "phy: fixes for 6.0 Fix for broken reset in marvell a3700-comphy" * tag 'phy-fixes-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: marvell: phy-mvebu-a3700-comphy: Remove broken reset support commit 4d8421f2dd88583cc7a4d6c2a5532c35e816a52a Author: Jason A. Donenfeld Date: Mon Sep 5 19:22:46 2022 +0200 wifi: iwlwifi: don't spam logs with NSS>2 messages I get a log line like this every 4 seconds when connected to my AP: [15650.221468] iwlwifi 0000:09:00.0: Got NSS = 4 - trimming to 2 Looking at the code, this seems to be related to a hardware limitation, and there's nothing to be done. In an effort to keep my dmesg manageable, downgrade this error to "debug" rather than "info". Cc: Johannes Berg Signed-off-by: Jason A. Donenfeld Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220905172246.105383-1-Jason@zx2c4.com drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7a1ec84ffba9e90ac772ddb33ea9c3899ed8d2c9 Author: chen zhang Date: Wed Sep 7 10:32:55 2022 +0800 efi/x86: libstub: remove unused variable The variable "has_system_memory" is unused in function ‘adjust_memory_range_protection’, remove it. Signed-off-by: chen zhang Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/x86-stub.c | 1 - 1 file changed, 1 deletion(-) commit 371a982cd2b01487295cd87abec82357e268457b Author: Keith Busch Date: Thu Sep 1 08:30:39 2022 -0700 nvme: requeue aen after firmware activation The driver prevents async event work while handling a processing paused event, but someone needs to restart it after the controller returns to a live state. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216400 Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit b7e97872a65e1d57b4451769610554c131f37a0a Author: Dennis Maisenbacher Date: Tue Sep 6 09:39:28 2022 +0200 nvmet: fix mar and mor off-by-one errors Maximum Active Resources (MAR) and Maximum Open Resources (MOR) are 0's based vales where a value of 0xffffffff indicates that there is no limit. Decrement the values that are returned by bdev_max_open_zones and bdev_max_active_zones as the block layer helpers are not 0's based. A 0 returned by the block layer helpers indicates no limit, thus convert it to 0xffffffff (U32_MAX). Fixes: aaf2e048af27 ("nvmet: add ZBD over ZNS backend support") Suggested-by: Niklas Cassel Signed-off-by: Dennis Maisenbacher Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/target/zns.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit d29f59051d3a07b81281b2df2b8c9dfe4716067f Author: Tasos Sahanidis Date: Wed Sep 7 04:18:00 2022 +0300 ALSA: emu10k1: Fix out of bounds access in snd_emu10k1_pcm_channel_alloc() The voice allocator sometimes begins allocating from near the end of the array and then wraps around, however snd_emu10k1_pcm_channel_alloc() accesses the newly allocated voices as if it never wrapped around. This results in out of bounds access if the first voice has a high enough index so that first_voice + requested_voice_count > NUM_G (64). The more voices are requested, the more likely it is for this to occur. This was initially discovered using PipeWire, however it can be reproduced by calling aplay multiple times with 16 channels: aplay -r 48000 -D plughw:CARD=Live,DEV=3 -c 16 /dev/zero UBSAN: array-index-out-of-bounds in sound/pci/emu10k1/emupcm.c:127:40 index 65 is out of range for type 'snd_emu10k1_voice [64]' CPU: 1 PID: 31977 Comm: aplay Tainted: G W IOE 6.0.0-rc2-emu10k1+ #7 Hardware name: ASUSTEK COMPUTER INC P5W DH Deluxe/P5W DH Deluxe, BIOS 3002 07/22/2010 Call Trace: dump_stack_lvl+0x49/0x63 dump_stack+0x10/0x16 ubsan_epilogue+0x9/0x3f __ubsan_handle_out_of_bounds.cold+0x44/0x49 snd_emu10k1_playback_hw_params+0x3bc/0x420 [snd_emu10k1] snd_pcm_hw_params+0x29f/0x600 [snd_pcm] snd_pcm_common_ioctl+0x188/0x1410 [snd_pcm] ? exit_to_user_mode_prepare+0x35/0x170 ? do_syscall_64+0x69/0x90 ? syscall_exit_to_user_mode+0x26/0x50 ? do_syscall_64+0x69/0x90 ? exit_to_user_mode_prepare+0x35/0x170 snd_pcm_ioctl+0x27/0x40 [snd_pcm] __x64_sys_ioctl+0x95/0xd0 do_syscall_64+0x5c/0x90 ? do_syscall_64+0x69/0x90 ? do_syscall_64+0x69/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd Signed-off-by: Tasos Sahanidis Cc: Link: https://lore.kernel.org/r/3707dcab-320a-62ff-63c0-73fc201ef756@tasossah.com Signed-off-by: Takashi Iwai sound/pci/emu10k1/emupcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 991df3dd5144f2e6b1c38b8d20ed3d4d21e20b34 Author: Sreekanth Reddy Date: Tue Sep 6 19:19:08 2022 +0530 scsi: mpt3sas: Fix use-after-free warning Fix the following use-after-free warning which is observed during controller reset: refcount_t: underflow; use-after-free. WARNING: CPU: 23 PID: 5399 at lib/refcount.c:28 refcount_warn_saturate+0xa6/0xf0 Link: https://lore.kernel.org/r/20220906134908.1039-2-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93d71986a60c37395e0a1d2f7fe170ef1e0a8ba4 Author: Xiu Jianfeng Date: Tue Sep 6 22:12:10 2022 +0800 rv/reactor: add __init/__exit annotations to module init/exit funcs Add missing __init/__exit annotations to module init/exit funcs. Link: https://lkml.kernel.org/r/20220906141210.132607-1-xiujianfeng@huawei.com Fixes: 135b881ea885 ("rv/reactor: Add the printk reactor") Fixes: e88043c0ac16 ("rv/reactor: Add the panic reactor") Signed-off-by: Xiu Jianfeng Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) kernel/trace/rv/reactor_panic.c | 4 ++-- kernel/trace/rv/reactor_printk.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit cecf8e128ec69149fe53c9a7bafa505a4bee25d9 Author: Masami Hiramatsu (Google) Date: Sun Sep 4 13:12:29 2022 +0900 tracing: Fix to check event_mutex is held while accessing trigger list Since the check_user_trigger() is called outside of RCU read lock, this list_for_each_entry_rcu() caused a suspicious RCU usage warning. # echo hist:keys=pid > events/sched/sched_stat_runtime/trigger # cat events/sched/sched_stat_runtime/trigger [ 43.167032] [ 43.167418] ============================= [ 43.167992] WARNING: suspicious RCU usage [ 43.168567] 5.19.0-rc5-00029-g19ebe4651abf #59 Not tainted [ 43.169283] ----------------------------- [ 43.169863] kernel/trace/trace_events_trigger.c:145 RCU-list traversed in non-reader section!! ... However, this file->triggers list is safe when it is accessed under event_mutex is held. To fix this warning, adds a lockdep_is_held check to the list_for_each_entry_rcu(). Link: https://lkml.kernel.org/r/166226474977.223837.1992182913048377113.stgit@devnote2 Cc: stable@vger.kernel.org Fixes: 7491e2c44278 ("tracing: Add a probe that attaches to trace events") Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events_trigger.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 54c3931957f6a6194d5972eccc36d052964b2abe Author: Yipeng Zou Date: Thu Sep 1 18:45:14 2022 +0800 tracing: hold caller_addr to hardirq_{enable,disable}_ip Currently, The arguments passing to lockdep_hardirqs_{on,off} was fixed in CALLER_ADDR0. The function trace_hardirqs_on_caller should have been intended to use caller_addr to represent the address that caller wants to be traced. For example, lockdep log in riscv showing the last {enabled,disabled} at __trace_hardirqs_{on,off} all the time(if called by): [ 57.853175] hardirqs last enabled at (2519): __trace_hardirqs_on+0xc/0x14 [ 57.853848] hardirqs last disabled at (2520): __trace_hardirqs_off+0xc/0x14 After use trace_hardirqs_xx_caller, we can get more effective information: [ 53.781428] hardirqs last enabled at (2595): restore_all+0xe/0x66 [ 53.782185] hardirqs last disabled at (2596): ret_from_exception+0xa/0x10 Link: https://lkml.kernel.org/r/20220901104515.135162-2-zouyipeng@huawei.com Cc: stable@vger.kernel.org Fixes: c3bc8fd637a96 ("tracing: Centralize preemptirq tracepoints and unify their usage") Signed-off-by: Yipeng Zou Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_preemptirq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 54be5509422ebee333709c92441aa7185ca182fa Author: Alison Schofield Date: Mon Aug 29 10:10:48 2022 -0700 tracepoint: Allow trace events in modules with TAINT_TEST Commit 2852ca7fba9f ("panic: Taint kernel if tests are run") introduced a new taint type, TAINT_TEST, to signal that an in-kernel test module has been loaded. TAINT_TEST taint type defaults into a 'bad_taint' list for kernel tracing and blocks the creation of trace events. This causes a problem for CXL testing where loading the cxl_test module makes all CXL modules out-of-tree, blocking any trace events. Trace events are in development for CXL at the moment and this issue was found in test with v6.0-rc1. Link: https://lkml.kernel.org/r/20220829171048.263065-1-alison.schofield@intel.com Fixes: 2852ca7fba9f7 ("panic: Taint kernel if tests are run") Reported-by: Ira Weiny Suggested-by: Dan Williams Tested-by: Ira Weiny Reviewed-by: David Gow Signed-off-by: Alison Schofield Signed-off-by: Steven Rostedt (Google) kernel/tracepoint.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f72c3a2d344b3933dedd42fdaf7d3e1aa4b8cce1 Author: Lukas Bulwahn Date: Thu Aug 25 13:59:27 2022 +0200 MAINTAINERS: add scripts/tracing/ to TRACING The files in scripts/tracing/ belong to the TRACING subsystem. Add a corresponding file entry for TRACING. Link: https://lkml.kernel.org/r/20220825115927.20598-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Signed-off-by: Steven Rostedt (Google) MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit fa4b9df00af4a749d4d715d7e11562121b7885ac Author: Daniel Bristot de Oliveira Date: Tue Aug 23 17:33:16 2022 +0200 MAINTAINERS: Add Runtime Verification (RV) entry Add a Runtime Verification (RV) entry in the MAINTAINERS file with Steven Rostedt and myself as maintainers. Link: https://lkml.kernel.org/r/b24c13553b6947a8da16d884ca464e4233eb8fb7.1661268579.git.bristot@kernel.org Cc: Joe Perches Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) MAINTAINERS | 11 +++++++++++ 1 file changed, 11 insertions(+) commit baf2c002402702accc30dcc8f19199f303638306 Author: Daniel Bristot de Oliveira Date: Tue Aug 23 17:20:29 2022 +0200 rv/monitors: Make monitor's automata definition static Monitor's automata definition is only used locally, so make them static for all existing monitors. Link: https://lore.kernel.org/all/202208210332.gtHXje45-lkp@intel.com Link: https://lore.kernel.org/all/202208210358.6HH3OrVs-lkp@intel.com Link: https://lkml.kernel.org/r/a50e27c3738d6ef809f4201857229fed64799234.1661266564.git.bristot@kernel.org Fixes: ccc319dcb450 ("rv/monitor: Add the wwnr monitor") Fixes: 8812d21219b9 ("rv/monitor: Add the wip monitor skeleton created by dot2k") Reported-by: kernel test robot Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) kernel/trace/rv/monitors/wip/wip.h | 2 +- kernel/trace/rv/monitors/wwnr/wwnr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0066f1b0e27556381402db3ff31f85d2a2265858 Author: David Howells Date: Tue Sep 6 22:09:11 2022 +0100 afs: Return -EAGAIN, not -EREMOTEIO, when a file already locked When trying to get a file lock on an AFS file, the server may return UAEAGAIN to indicate that the lock is already held. This is currently translated by the default path to -EREMOTEIO. Translate it instead to -EAGAIN so that we know we can retry it. Signed-off-by: David Howells Reviewed-by: Jeffrey E Altman cc: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/166075761334.3533338.2591992675160918098.stgit@warthog.procyon.org.uk/ Signed-off-by: Linus Torvalds fs/afs/misc.c | 1 + 1 file changed, 1 insertion(+) commit 19f516ea34f943edd5bfe9ca0c0050a7660c230c Merge: d2ec799d1c1b 25af7406df59 Author: Linus Torvalds Date: Tue Sep 6 21:27:05 2022 -0400 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fix from Russell King: "Just one fix for now for the AMBA bus code from Isaac Manjarres" * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 9229/1: amba: Fix use-after-free in amba_read_periphid() commit d2ec799d1c1be847d6a70704fe586ac4d14265c8 Merge: 53e99dcff61e 2f44013e3998 Author: Linus Torvalds Date: Tue Sep 6 15:19:45 2022 -0400 Merge tag 'erofs-for-6.0-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs fixes from Gao Xiang: - Fix return codes in erofs_fscache_{meta_,}read_folio error paths - Fix potential wrong pcluster sizes for later non-4K lclusters - Fix in-memory pcluster use-after-free on UP platforms * tag 'erofs-for-6.0-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: fix pcluster use-after-free on UP platforms erofs: avoid the potentially wrong m_plen for big pcluster erofs: fix error return code in erofs_fscache_{meta_,}read_folio commit 151e0e0fdb4d6365305598af3b9072d44e896ef0 Author: Matthew Auld Date: Mon Sep 5 11:53:29 2022 +0100 drm/i915: consider HAS_FLAT_CCS() in needs_ccs_pages Just move the HAS_FLAT_CCS() check into needs_ccs_pages. This also then fixes i915_ttm_memcpy_allowed() which was incorrectly reporting true on DG1, even though it doesn't have small-BAR or flat-CCS. References: https://gitlab.freedesktop.org/drm/intel/-/issues/6605 Fixes: efeb3caf4341 ("drm/i915/ttm: disallow CPU fallback mode for ccs pages") Signed-off-by: Matthew Auld Cc: Nirmoy Das Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20220905105329.41455-1-matthew.auld@intel.com (cherry picked from commit 873fef8833ea794526b7f4179088e565078fe0e8) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gem/i915_gem_object.c | 3 +++ drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit 672d6ca758651f0ec12cd0d59787067a5bde1c96 Author: Ville Syrjälä Date: Fri Sep 2 10:03:18 2022 +0300 drm/i915: Implement WaEdpLinkRateDataReload A lot of modern laptops use the Parade PS8461E MUX for eDP switching. The MUX can operate in jitter cleaning mode or redriver mode, the first one resulting in higher link quality. The jitter cleaning mode needs to know the link rate used and the MUX achieves this by snooping the LINK_BW_SET, LINK_RATE_SELECT and SUPPORTED_LINK_RATES DPCD accesses. When the MUX is powered down (seems this can happen whenever the display is turned off) it loses track of the snooped link rates so when we do the LINK_RATE_SELECT write it no longer knowns which link rate we're selecting, and thus it falls back to the lower quality redriver mode. This results in unstable high link rates (eg. usually 8.1Gbps link rate no longer works correctly). In order to avoid all that let's re-snoop SUPPORTED_LINK_RATES from the sink at the start of every link training. Unfortunately we don't have a way to detect the presence of the MUX. It looks like the set of laptops equipped with this MUX is fairly large and contains devices from multiple manufacturers. It may also still be growing with new models. So a quirk doesn't seem like a very easily maintainable option, thus we shall attempt to do this unconditionally on all machines that use LINK_RATE_SELECT. Hopefully this extra DPCD read doesn't cause issues for any unaffected machine. If that turns out to be the case we'll need to convert this into a quirk in the future. Cc: stable@vger.kernel.org Cc: Jason A. Donenfeld Cc: Ankit Nautiyal Cc: Jani Nikula Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6205 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220902070319.15395-1-ville.syrjala@linux.intel.com Tested-by: Aaron Ma Tested-by: Jason A. Donenfeld Reviewed-by: Jani Nikula (cherry picked from commit 25899c590cb5ba9b9f284c6ca8e7e9086793d641) Signed-off-by: Rodrigo Vivi .../gpu/drm/i915/display/intel_dp_link_training.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit e1cab970574c001d83e59ca8388c474a57a1afb6 Author: Rodrigo Vivi Date: Wed Aug 31 17:45:38 2022 -0400 drm/i915/slpc: Let's fix the PCODE min freq table setup for SLPC We need to inform PCODE of a desired ring frequencies so PCODE update the memory frequencies to us. rps->min_freq and rps->max_freq are the frequencies used in that request. However they were unset when SLPC was enabled and PCODE never updated the memory freq. v2 (as Suggested by Ashutosh): if SLPC is in use, let's pick the right frequencies from the get_ia_constants instead of the fake init of rps' min and max. v3: don't forget the max <= min return v4: Move all the freq conversion to intel_rps.c. And the max <= min check to where it belongs. v5: (Ashutosh) Fix old comment s/50 HZ/50 MHz and add a doc explaining the "raw format" Fixes: 7ba79a671568 ("drm/i915/guc/slpc: Gate Host RPS when SLPC is enabled") Cc: # v5.15+ Cc: Ashutosh Dixit Tested-by: Sushma Venkatesh Reddy Signed-off-by: Rodrigo Vivi Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20220831214538.143950-1-rodrigo.vivi@intel.com (cherry picked from commit 018a7bdbb090b9155a6509a0d1a684db4afaa5b1) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_llc.c | 19 +++++++------- drivers/gpu/drm/i915/gt/intel_rps.c | 50 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_rps.h | 2 ++ 3 files changed, 61 insertions(+), 10 deletions(-) commit edca5a2c373db61efa959307c13ed9156b1c14d9 Author: Ville Syrjälä Date: Mon Aug 29 16:58:34 2022 +0300 drm/i915/bios: Copy the whole MIPI sequence block Turns out the MIPI sequence block version number and new block size fields are considered part of the block header and are not included in the reported new block size field itself. Bump up the block size appropriately so that we'll copy over the last five bytes of the block as well. For this particular machine those last five bytes included parts of the GPIO op for the backlight on sequence, causing the backlight no longer to turn back on: Sequence 6 - MIPI_SEQ_BACKLIGHT_ON Delay: 20000 us - GPIO index 0, number 0, set 0 (0x00) + GPIO index 1, number 70, set 1 (0x01) Cc: stable@vger.kernel.org Fixes: e163cfb4c96d ("drm/i915/bios: Make copies of VBT data blocks") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6652 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220829135834.8585-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula (cherry picked from commit a06289f3f72431f3777af95ea1226b5b0abdc426) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_bios.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a81e18e963ce13ecfa4f0f11b185bc8372f203f8 Author: Tejun Heo Date: Tue Sep 6 06:52:58 2022 -1000 cpuset: Add Waiman Long as a cpuset maintainer Waiman has been very active with cpuset recently and I've been cc'ing him for cpuset related changes for a while now. Let's make him a cpuset maintainer. Signed-off-by: Tejun Heo Cc: Zefan Li Cc: Waiman Long MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 5da431b71d4b9be3c8cf6786eff9e2d41a5f9f65 Author: Qu Wenruo Date: Thu Aug 18 15:06:44 2022 +0800 btrfs: fix the max chunk size and stripe length calculation [BEHAVIOR CHANGE] Since commit f6fca3917b4d ("btrfs: store chunk size in space-info struct"), btrfs no longer can create larger data chunks than 1G: mkfs.btrfs -f -m raid1 -d raid0 $dev1 $dev2 $dev3 $dev4 mount $dev1 $mnt btrfs balance start --full $mnt btrfs balance start --full $mnt umount $mnt btrfs ins dump-tree -t chunk $dev1 | grep "DATA|RAID0" -C 2 Before that offending commit, what we got is a 4G data chunk: item 6 key (FIRST_CHUNK_TREE CHUNK_ITEM 9492758528) itemoff 15491 itemsize 176 length 4294967296 owner 2 stripe_len 65536 type DATA|RAID0 io_align 65536 io_width 65536 sector_size 4096 num_stripes 4 sub_stripes 1 Now what we got is only 1G data chunk: item 6 key (FIRST_CHUNK_TREE CHUNK_ITEM 6271533056) itemoff 15491 itemsize 176 length 1073741824 owner 2 stripe_len 65536 type DATA|RAID0 io_align 65536 io_width 65536 sector_size 4096 num_stripes 4 sub_stripes 1 This will increase the number of data chunks by the number of devices, not only increase system chunk usage, but also greatly increase mount time. Without a proper reason, we should not change the max chunk size. [CAUSE] Previously, we set max data chunk size to 10G, while max data stripe length to 1G. Commit f6fca3917b4d ("btrfs: store chunk size in space-info struct") completely ignored the 10G limit, but use 1G max stripe limit instead, causing above shrink in max data chunk size. [FIX] Fix the max data chunk size to 10G, and in decide_stripe_size_regular() we limit stripe_size to 1G manually. This should only affect data chunks, as for metadata chunks we always set the max stripe size the same as max chunk size (256M or 1G depending on fs size). Now the same script result the same old result: item 6 key (FIRST_CHUNK_TREE CHUNK_ITEM 9492758528) itemoff 15491 itemsize 176 length 4294967296 owner 2 stripe_len 65536 type DATA|RAID0 io_align 65536 io_width 65536 sector_size 4096 num_stripes 4 sub_stripes 1 Reported-by: Wang Yugui Fixes: f6fca3917b4d ("btrfs: store chunk size in space-info struct") Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/space-info.c | 2 +- fs/btrfs/volumes.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 4efa8e314351cb3e7f229ddd3571069edf38f99a Author: Shang XiaoJing Date: Tue Sep 6 11:29:06 2022 +0800 perf c2c: Prevent potential memory leak in c2c_he_zalloc() Free allocated resources when zalloc() fails for members in c2c_he, to prevent potential memory leak in c2c_he_zalloc(). Signed-off-by: Shang XiaoJing Reviewed-by: Leo Yan Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20220906032906.21395-4-shangxiaojing@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 6ea9da51a5c00c9d9309c4c9aa21cbe63c799c56 Author: Zixuan Tan Date: Fri Aug 26 01:00:58 2022 +0800 perf genelf: Switch deprecated openssl MD5_* functions to new EVP API Switch to the flavored EVP API like in test-libcrypto.c, and remove the bad gcc #pragma. Inspired-by: 5b245985a6de5ac1 ("tools build: Switch to new openssl API for test-libcrypto") Signed-off-by: Zixuan Tan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/CABwm_eTnARC1GwMD-JF176k8WXU1Z0+H190mvXn61yr369qt6g@mail.gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/genelf.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit cbd7bfc7fd99acdde58ec2b0bce990158fba1654 Author: Athira Rajeev Date: Mon Sep 5 19:49:29 2022 +0530 tools/perf: Fix out of bound access to cpu mask array The cpu mask init code in "record__mmap_cpu_mask_init" function access "bits" array part of "struct mmap_cpu_mask". The size of this array is the value from cpu__max_cpu().cpu. This array is used to contain the cpumask value for each cpu. While setting bit for each cpu, it calls "set_bit" function which access index in "bits" array. If we provide a command line option to -C which is greater than the number of CPU's present in the system, the set_bit could access an array member which is out-of the array size. This is because currently, there is no boundary check for the CPU. This will result in seg fault: <<>> ./perf record -C 12341234 ls Perf can support 2048 CPUs. Consider raising MAX_NR_CPUS Segmentation fault (core dumped) <<>> Debugging with gdb, points to function flow as below: <<>> set_bit record__mmap_cpu_mask_init record__init_thread_default_masks record__init_thread_masks cmd_record <<>> Fix this by adding boundary check for the array. After the patch: <<>> ./perf record -C 12341234 ls Perf can support 2048 CPUs. Consider raising MAX_NR_CPUS Failed to initialize parallel data streaming masks <<>> With this fix, if -C is given a non-exsiting CPU, perf record will fail with: <<>> ./perf record -C 50 ls Failed to initialize parallel data streaming masks <<>> Reported-by: Nageswara R Sastry Signed-off-by: Athira Jajeev Tested-by: Arnaldo Carvalho de Melo Tested-by: Nageswara R Sastry Cc: Jiri Olsa Cc: Kajol Jain Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20220905141929.7171-2-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit 72cd652b73dd77df6f26bd450e804ee29232669f Author: Athira Rajeev Date: Mon Sep 5 19:49:28 2022 +0530 perf affinity: Fix out of bound access to "sched_cpus" mask The affinity code in "affinity_set" function access array named "sched_cpus". The size for this array is allocated in affinity_setup function which is nothing but value from get_cpu_set_size. This is used to contain the cpumask value for each cpu. While setting bit for each cpu, it calls "set_bit" function which access index in sched_cpus array. If we provide a command-line option to -C which is more than the number of CPU's present in the system, the set_bit could access an array member which is out-of the array size. This is because currently, there is no boundary check for the CPU. This will result in seg fault: <<>> ./perf stat -C 12323431 ls Perf can support 2048 CPUs. Consider raising MAX_NR_CPUS Segmentation fault (core dumped) <<>> Fix this by adding boundary check for the array. After the fix from powerpc system: <<>> ./perf stat -C 12323431 ls 1>out Perf can support 2048 CPUs. Consider raising MAX_NR_CPUS Performance counter stats for 'CPU(s) 12323431': msec cpu-clock context-switches cpu-migrations page-faults cycles instructions branches branch-misses 0.001192373 seconds time elapsed <<>> Reported-by: Nageswara R Sastry Signed-off-by: Athira Jajeev Tested-by: Arnaldo Carvalho de Melo Tested-by: Nageswara R Sastry Cc: Jiri Olsa Cc: Kajol Jain Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20220905141929.7171-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/affinity.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit e1091e226a2bab4ded1fe26efba2aee1aab06450 Author: jerry.meng Date: Mon Sep 5 09:24:52 2022 +0800 net: usb: qmi_wwan: add Quectel RM520N add support for Quectel RM520N which is based on Qualcomm SDX62 chip. 0x0801: DIAG + NMEA + AT + MODEM + RMNET T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 10 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0801 Rev= 5.04 S: Manufacturer=Quectel S: Product=RM520N-GL S: SerialNumber=384af524 C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=40 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=88(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: jerry.meng Acked-by: Bjørn Mork Link: https://lore.kernel.org/r/tencent_E50CA8A206904897C2D20DDAE90731183C05@qq.com Signed-off-by: Paolo Abeni drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit d91c411c744b55e860fbafc9a499f4f22d64c762 Author: ZhenGuo Yin Date: Tue Sep 6 16:46:19 2022 +0800 drm/ttm: update bulk move object of ghost BO [Why] Ghost BO is released with non-empty bulk move object. There is a warning trace: WARNING: CPU: 19 PID: 1582 at ttm/ttm_bo.c:366 ttm_bo_release+0x2e1/0x2f0 [amdttm] Call Trace: amddma_resv_reserve_fences+0x10d/0x1f0 [amdkcl] amdttm_bo_put+0x28/0x30 [amdttm] amdttm_bo_move_accel_cleanup+0x126/0x200 [amdttm] amdgpu_bo_move+0x1a8/0x770 [amdgpu] ttm_bo_handle_move_mem+0xb0/0x140 [amdttm] amdttm_bo_validate+0xbf/0x100 [amdttm] [How] The resource of ghost BO should be moved to LRU directly, instead of using bulk move. The bulk move object of ghost BO should set to NULL before function ttm_bo_move_to_lru_tail_unlocked. v2: set bulk move to NULL manually if no resource associated with ghost BO Fixed: 5b951e487fd6bf5f ("drm/ttm: fix bulk move handling v2") Signed-off-by: ZhenGuo Yin Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20220906084619.2545456-1-zhenguo.yin@amd.com drivers/gpu/drm/ttm/ttm_bo_util.c | 3 +++ 1 file changed, 3 insertions(+) commit 42b998d4aa59b9dea51665e4f3be1d733c47e2bf Author: Christian Marangi Date: Sun Sep 4 23:53:19 2022 +0200 net: dsa: qca8k: fix NULL pointer dereference for of_device_get_match_data of_device_get_match_data is called on priv->dev before priv->dev is actually set. Move of_device_get_match_data after priv->dev is correctly set to fix this kernel panic. Fixes: 3bb0844e7bcd ("net: dsa: qca8k: cache match data to speed up access") Signed-off-by: Christian Marangi Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220904215319.13070-1-ansuelsmth@gmail.com Signed-off-by: Paolo Abeni drivers/net/dsa/qca/qca8k-8xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 686dc2db2a0fdc1d34b424ec2c0a735becd8d62b Author: Neal Cardwell Date: Sat Sep 3 08:10:23 2022 -0400 tcp: fix early ETIMEDOUT after spurious non-SACK RTO Fix a bug reported and analyzed by Nagaraj Arankal, where the handling of a spurious non-SACK RTO could cause a connection to fail to clear retrans_stamp, causing a later RTO to very prematurely time out the connection with ETIMEDOUT. Here is the buggy scenario, expanding upon Nagaraj Arankal's excellent report: (*1) Send one data packet on a non-SACK connection (*2) Because no ACK packet is received, the packet is retransmitted and we enter CA_Loss; but this retransmission is spurious. (*3) The ACK for the original data is received. The transmitted packet is acknowledged. The TCP timestamp is before the retrans_stamp, so tcp_may_undo() returns true, and tcp_try_undo_loss() returns true without changing state to Open (because tcp_is_sack() is false), and tcp_process_loss() returns without calling tcp_try_undo_recovery(). Normally after undoing a CA_Loss episode, tcp_fastretrans_alert() would see that the connection has returned to CA_Open and fall through and call tcp_try_to_open(), which would set retrans_stamp to 0. However, for non-SACK connections we hold the connection in CA_Loss, so do not fall through to call tcp_try_to_open() and do not set retrans_stamp to 0. So retrans_stamp is (erroneously) still non-zero. At this point the first "retransmission event" has passed and been recovered from. Any future retransmission is a completely new "event". However, retrans_stamp is erroneously still set. (And we are still in CA_Loss, which is correct.) (*4) After 16 minutes (to correspond with tcp_retries2=15), a new data packet is sent. Note: No data is transmitted between (*3) and (*4) and we disabled keep alives. The socket's timeout SHOULD be calculated from this point in time, but instead it's calculated from the prior "event" 16 minutes ago (step (*2)). (*5) Because no ACK packet is received, the packet is retransmitted. (*6) At the time of the 2nd retransmission, the socket returns ETIMEDOUT, prematurely, because retrans_stamp is (erroneously) too far in the past (set at the time of (*2)). This commit fixes this bug by ensuring that we reuse in tcp_try_undo_loss() the same careful logic for non-SACK connections that we have in tcp_try_undo_recovery(). To avoid duplicating logic, we factor out that logic into a new tcp_is_non_sack_preventing_reopen() helper and call that helper from both undo functions. Fixes: da34ac7626b5 ("tcp: only undo on partial ACKs in CA_Loss") Reported-by: Nagaraj Arankal Link: https://lore.kernel.org/all/SJ0PR84MB1847BE6C24D274C46A1B9B0EB27A9@SJ0PR84MB1847.NAMPRD84.PROD.OUTLOOK.COM/ Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20220903121023.866900-1-ncardwell.kernel@gmail.com Signed-off-by: Paolo Abeni net/ipv4/tcp_input.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 37137ec26c2c03039d8064c00f6eae176841ee0d Author: Takashi Iwai Date: Tue Sep 6 11:03:19 2022 +0200 ALSA: hda: Once again fix regression of page allocations with IOMMU The last fix for trying to recover the regression on AMD platforms, unfortunately, leaded to yet another regression: it turned out that IOMMUs don't like the usage of raw page allocations. This is yet another attempt for addressing the log saga; at this time, we re-use the existing buffer allocation mechanism with SG-pages although we require only single pages. The SG buffer allocation itself was confirmed to work for stream buffers, so it's relatively easy to adapt for other places. The only problem is: although the HD-audio code is accessing the address directly via dmab->address field, SG-pages don't set up it. For the ease of adaption, we now set up the dmab->addr field from the address of the first page as default, so that it can run with the HD-audio driver code as-is without the excessive call of snd_sgbuf_get_addr() multiple times; that's the only change in the memalloc helper side. The rest is nothing but a flip of the dma_type field in the HD-audio side. Fixes: a8d302a0b770 ("ALSA: memalloc: Revive x86-specific WC page allocations again") Reported-by: Mikhail Gavrilov Tested-by: Mikhail Gavrilov Cc: Link: https://lore.kernel.org/r/CABXGCsO+kB2t5QyHY-rUe76npr1m0-5JOtt8g8SiHUo34ur7Ww@mail.gmail.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=216112 Link: https://bugzilla.kernel.org/show_bug.cgi?id=216363 Link: https://lore.kernel.org/r/20220906090319.23358-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/memalloc.c | 9 +++++++-- sound/pci/hda/hda_intel.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) commit c0a454b9044fdc99486853aa424e5b3be2107078 Author: Mark Brown Date: Mon Sep 5 15:22:55 2022 +0100 arm64/bti: Disable in kernel BTI when cross section thunks are broken GCC does not insert a `bti c` instruction at the beginning of a function when it believes that all callers reach the function through a direct branch[1]. Unfortunately the logic it uses to determine this is not sufficiently robust, for example not taking account of functions being placed in different sections which may be loaded separately, so we may still see thunks being generated to these functions. If that happens, the first instruction in the callee function will result in a Branch Target Exception due to the missing landing pad. While this has currently only been observed in the case of modules having their main code loaded sufficiently far from their init section to require thunks it could potentially happen for other cases so the safest thing is to disable BTI for the kernel when building with an affected toolchain. [1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106671 Reported-by: D Scott Phillips [Bits of the commit message are lifted from his report & workaround] Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220905142255.591990-1-broonie@kernel.org Cc: # v5.10+ Signed-off-by: Will Deacon arch/arm64/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit e53f47f6c1a56d2af728909f1cb894da6b43d9bf Author: Dongxiang Ke Date: Tue Sep 6 10:49:28 2022 +0800 ALSA: usb-audio: Fix an out-of-bounds bug in __snd_usb_parse_audio_interface() There may be a bad USB audio device with a USB ID of (0x04fa, 0x4201) and the number of it's interfaces less than 4, an out-of-bounds read bug occurs when parsing the interface descriptor for this device. Fix this by checking the number of interfaces. Signed-off-by: Dongxiang Ke Link: https://lore.kernel.org/r/20220906024928.10951-1-kdx.glider@gmail.com Signed-off-by: Takashi Iwai sound/usb/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d44e6044a0e885acdd01813768a0b27906d64fd Author: Mohan Kumar Date: Mon Sep 5 22:54:20 2022 +0530 ALSA: hda/tegra: Align BDL entry to 4KB boundary AZA HW may send a burst read/write request crossing 4K memory boundary. The 4KB boundary is not guaranteed by Tegra HDA HW. Make SW change to include the flag AZX_DCAPS_4K_BDLE_BOUNDARY to align BDLE to 4K boundary. Signed-off-by: Mohan Kumar Link: https://lore.kernel.org/r/20220905172420.3801-1-mkumard@nvidia.com Signed-off-by: Takashi Iwai sound/pci/hda/hda_tegra.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3770a42bb8ceb856877699257a43c0585a5d2996 Author: Sagi Grimberg Date: Mon Sep 5 18:07:06 2022 +0300 nvme-tcp: fix regression that causes sporadic requests to time out When we queue requests, we strive to batch as much as possible and also signal the network stack that more data is about to be sent over a socket with MSG_SENDPAGE_NOTLAST. This flag looks at the pending requests queued as well as queue->more_requests that is derived from the block layer last-in-batch indication. We set more_request=true when we flush the request directly from .queue_rq submission context (in nvme_tcp_send_all), however this is wrongly assuming that no other requests may be queued during the execution of nvme_tcp_send_all. Due to this, a race condition may happen where: 1. request X is queued as !last-in-batch 2. request X submission context calls nvme_tcp_send_all directly 3. nvme_tcp_send_all is preempted and schedules to a different cpu 4. request Y is queued as last-in-batch 5. nvme_tcp_send_all context sends request X+Y, however signals for both MSG_SENDPAGE_NOTLAST because queue->more_requests=true. ==> none of the requests is pushed down to the wire as the network stack is waiting for more data, both requests timeout. To fix this, we eliminate queue->more_requests and only rely on the queue req_list and send_list to be not-empty. Fixes: 122e5b9f3d37 ("nvme-tcp: optimize network stack with setting msg flags according to batch size") Reported-by: Jonathan Nicklin Signed-off-by: Sagi Grimberg Tested-by: Jonathan Nicklin Signed-off-by: Christoph Hellwig drivers/nvme/host/tcp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 160f3549a907a50e51a8518678ba2dcf2541abea Author: Sagi Grimberg Date: Mon Sep 5 13:54:17 2022 +0300 nvme-tcp: fix UAF when detecting digest errors We should also bail from the io_work loop when we set rd_enabled to true, so we don't attempt to read data from the socket when the TCP stream is already out-of-sync or corrupted. Fixes: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver") Reported-by: Daniel Wagner Signed-off-by: Sagi Grimberg Reviewed-by: Daniel Wagner Signed-off-by: Christoph Hellwig drivers/nvme/host/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5a76cb38df779076a3cff624ce6a368d9bcf330 Author: Philippe Schenker Date: Thu Sep 1 12:01:51 2022 +0200 arm64: dts: imx8mm-verdin: extend pmic voltages Currently, we limited the voltages from the PMIC very strictly. This causes an issue with one Toradex SKU that uses a consumer-grade chip that is capable of going up to 1.8GHz at 1.00V. Extend the ranges to min/max values of the SoC operating ranges (table 10) in the datasheet. Detailed explanation as follows: BUCK2: - As already described above, the SKU with the consumer-grade chip needs a voltage of at least 1.00V. 1.05V is chosen now as this is listed as the maximum. Both industrial and consumer-grade chips have an absolute maximum rating of 1.15V which makes it still safe to put 1.05V - Lower the regulator-min value to the smallest value allowed from the Quad-A53, 1.2GHz version of the SoC BUCK3: - This regulator is used for SoC input voltages VDD_GPU, VDD_VPU and VDD_DRAM. - Use the smallest value of these three inputs as the regulator-min - Use the largest value of these three inputs as the regulator-max LDO2: - This LDO is used for VDD_SNVS_0P8 SoC input voltage. As this has a single nominal input voltage just put this in the middle of 0.8V. Fixes: 6a57f224f734 ("arm64: dts: freescale: add initial support for verdin imx8m mini") Signed-off-by: Philippe Schenker Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1f05f65bddd6958d25b133f886da49c1d4bff3fa Author: Alexandru Gagniuc Date: Mon Sep 5 09:28:04 2022 -0500 hwmon: (tps23861) fix byte order in resistance register The tps23861 registers are little-endian, and regmap_read_bulk() does not do byte order conversion. On BE machines, the bytes were swapped, and the interpretation of the resistance value was incorrect. To make it work on both big and little-endian machines, use le16_to_cpu() to convert the resitance register to host byte order. Signed-off-by: Alexandru Gagniuc Fixes: fff7b8ab22554 ("hwmon: add Texas Instruments TPS23861 driver") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220905142806.110598-1-mr.nuke.me@gmail.com Signed-off-by: Guenter Roeck drivers/hwmon/tps23861.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 53e99dcff61e1523ec1c3628b2d564ba15d32eb7 Merge: 7e18e42e4b28 12f09234bde5 Author: Linus Torvalds Date: Mon Sep 5 17:44:48 2022 -0400 Merge tag 'soc-fixes-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "These are the expected fixes for the SoC tree. I have let the patches pile up a little too long, so this is bigger than I would have liked. - Minor build fixes for Broadcom STB and NXP i.MX8M SoCs as well\ as TEE firmware - Updates to the MAINTAINERS file for the PolarFire SoC - Minor DT fixes for Renesas White Hawk and Arm Versatile and Juno platforms - A fix for a missing dependnecy in the NXP DPIO driver - Broadcom BCA fixes to the newly added devicetree files - Multiple fixes for Microchip AT91 based SoCs, dealing with self-refresh timings and regulator settings in DT - Several DT fixes for NXP i.MX platforms, dealing with incorrect GPIO settings, extraneous nodes, and a wrong clock setting" * tag 'soc-fixes-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (45 commits) soc: fsl: select FSL_GUTS driver for DPIO ARM: dts: at91: sama5d2_icp: don't keep vdd_other enabled all the time ARM: dts: at91: sama5d27_wlsom1: don't keep ldo2 enabled all the time ARM: dts: at91: sama7g5ek: specify proper regulator output ranges ARM: dts: at91: sama5d2_icp: specify proper regulator output ranges ARM: dts: at91: sama5d27_wlsom1: specify proper regulator output ranges ARM: at91: pm: fix DDR recalibration when resuming from backup and self-refresh ARM: at91: pm: fix self-refresh for sama7g5 soc: brcmstb: pm-arm: Fix refcount leak and __iomem leak bugs ARM: configs: at91: remove CONFIG_MICROCHIP_PIT64B ARM: ixp4xx: fix typos in comments arm64: dts: renesas: r8a779g0: Fix HSCIF0 interrupt number tee: fix compiler warning in tee_shm_register() arm64: dts: freescale: verdin-imx8mp: fix atmel_mxt_ts reset polarity arm64: dts: freescale: verdin-imx8mm: fix atmel_mxt_ts reset polarity arm64: dts: imx8mp: Fix I2C5 GPIO assignment on i.MX8M Plus DHCOM arm64: dts: imx8mm-venice-gw7901: fix port/phy validation arm64: dts: verdin-imx8mm: add otg2 pd to usbphy soc: imx: gpcv2: Assert reset before ungating clock arm64: dts: ls1028a-qds-65bb: don't use in-band autoneg for 2500base-x ... commit 4fa07edbb7eacfb56b3aa64f590e9f38e7f1042c Author: Jiapeng Chong Date: Mon Sep 5 10:04:36 2022 +0800 io_uring/notif: Remove the unused function io_notif_complete() The function io_notif_complete() is defined in the notif.c file, but not called elsewhere, so delete this unused function. io_uring/notif.c:24:20: warning: unused function 'io_notif_complete' [-Wunused-function]. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2047 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/20220905020436.51894-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Jens Axboe io_uring/notif.c | 8 -------- 1 file changed, 8 deletions(-) commit f0880e2cb7e1f8039a048fdd01ce45ab77247221 Author: Vitaly Kuznetsov Date: Sat Aug 27 15:03:45 2022 +0200 Drivers: hv: Never allocate anything besides framebuffer from framebuffer memory region Passed through PCI device sometimes misbehave on Gen1 VMs when Hyper-V DRM driver is also loaded. Looking at IOMEM assignment, we can see e.g. $ cat /proc/iomem ... f8000000-fffbffff : PCI Bus 0000:00 f8000000-fbffffff : 0000:00:08.0 f8000000-f8001fff : bb8c4f33-2ba2-4808-9f7f-02f3b4da22fe ... fe0000000-fffffffff : PCI Bus 0000:00 fe0000000-fe07fffff : bb8c4f33-2ba2-4808-9f7f-02f3b4da22fe fe0000000-fe07fffff : 2ba2:00:02.0 fe0000000-fe07fffff : mlx4_core the interesting part is the 'f8000000' region as it is actually the VM's framebuffer: $ lspci -v ... 0000:00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA (prog-if 00 [VGA controller]) Flags: bus master, fast devsel, latency 0, IRQ 11 Memory at f8000000 (32-bit, non-prefetchable) [size=64M] ... hv_vmbus: registering driver hyperv_drm hyperv_drm 5620e0c7-8062-4dce-aeb7-520c7ef76171: [drm] Synthvid Version major 3, minor 5 hyperv_drm 0000:00:08.0: vgaarb: deactivate vga console hyperv_drm 0000:00:08.0: BAR 0: can't reserve [mem 0xf8000000-0xfbffffff] hyperv_drm 5620e0c7-8062-4dce-aeb7-520c7ef76171: [drm] Cannot request framebuffer, boot fb still active? Note: "Cannot request framebuffer" is not a fatal error in hyperv_setup_gen1() as the code assumes there's some other framebuffer device there but we actually have some other PCI device (mlx4 in this case) config space there! The problem appears to be that vmbus_allocate_mmio() can use dedicated framebuffer region to serve any MMIO request from any device. The semantics one might assume of a parameter named "fb_overlap_ok" aren't implemented because !fb_overlap_ok essentially has no effect. The existing semantics are really "prefer_fb_overlap". This patch implements the expected and needed semantics, which is to not allocate from the frame buffer space when !fb_overlap_ok. Note, Gen2 VMs are usually unaffected by the issue because framebuffer region is already taken by EFI fb (in case kernel supports it) but Gen1 VMs may have this region unclaimed by the time Hyper-V PCI pass-through driver tries allocating MMIO space if Hyper-V DRM/FB drivers load after it. Devices can be brought up in any sequence so let's resolve the issue by always ignoring 'fb_mmio' region for non-FB requests, even if the region is unclaimed. Reviewed-by: Michael Kelley Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20220827130345.1320254-4-vkuznets@redhat.com Signed-off-by: Wei Liu drivers/hv/vmbus_drv.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 2a8a8afba0c3053d0ea8686182f6b2104293037e Author: Vitaly Kuznetsov Date: Sat Aug 27 15:03:44 2022 +0200 Drivers: hv: Always reserve framebuffer region for Gen1 VMs vmbus_reserve_fb() tries reserving framebuffer region iff 'screen_info.lfb_base' is set. Gen2 VMs seem to have it set by EFI and/or by the kernel EFI FB driver (or, in some edge cases like kexec, the address where the buffer was moved, see https://lore.kernel.org/all/20201014092429.1415040-1-kasong@redhat.com/) but on Gen1 VM it depends on bootloader behavior. With grub, it depends on 'gfxpayload=' setting but in some cases it is observed to be zero. That being said, relying on 'screen_info.lfb_base' to reserve framebuffer region is risky. For Gen1 VMs, it should always be possible to get the address from the dedicated PCI device instead. Check for legacy PCI video device presence and reserve the whole region for framebuffer on Gen1 VMs. Reviewed-by: Michael Kelley Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20220827130345.1320254-3-vkuznets@redhat.com Signed-off-by: Wei Liu drivers/hv/vmbus_drv.c | 46 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 14 deletions(-) commit 8409fe92d88c332923130149fe209d1c882b286e Author: Vitaly Kuznetsov Date: Sat Aug 27 15:03:43 2022 +0200 PCI: Move PCI_VENDOR_ID_MICROSOFT/PCI_DEVICE_ID_HYPERV_VIDEO definitions to pci_ids.h There are already three places in kernel which define PCI_VENDOR_ID_MICROSOFT and two for PCI_DEVICE_ID_HYPERV_VIDEO and there's a need to use these from core VMBus code. Move the defines where they belong. No functional change. Reviewed-by: Michael Kelley Acked-by: Bjorn Helgaas # pci_ids.h Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20220827130345.1320254-2-vkuznets@redhat.com Signed-off-by: Wei Liu drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 3 --- drivers/net/ethernet/microsoft/mana/gdma_main.c | 4 ---- drivers/video/fbdev/hyperv_fb.c | 4 ---- include/linux/pci_ids.h | 3 +++ 4 files changed, 3 insertions(+), 11 deletions(-) commit 2258954234db7530e9d86bb32cd6ad54485ff926 Author: Zhou jie Date: Tue Aug 23 11:45:52 2022 +0800 tools: hv: kvp: remove unnecessary (void*) conversions Remove unnecessary void* type casting. Signed-off-by: Zhou jie Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20220823034552.8596-1-zhoujie@nfschina.com Signed-off-by: Wei Liu tools/hv/hv_kvp_daemon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 676576d164b34a98589a9efee85f57240c07fef3 Author: Shaomin Deng Date: Sun Sep 4 11:48:08 2022 -0400 Drivers: hv: remove duplicate word in a comment Signed-off-by: Shaomin Deng Link: https://lore.kernel.org/r/20220904154808.26022-1-dengshaomin@cdjrlc.com Signed-off-by: Wei Liu drivers/hv/hv_fcopy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f44013e39984c127c6efedf70e6b5f4e9dcf315 Author: Gao Xiang Date: Fri Sep 2 12:57:10 2022 +0800 erofs: fix pcluster use-after-free on UP platforms During stress testing with CONFIG_SMP disabled, KASAN reports as below: ================================================================== BUG: KASAN: use-after-free in __mutex_lock+0xe5/0xc30 Read of size 8 at addr ffff8881094223f8 by task stress/7789 CPU: 0 PID: 7789 Comm: stress Not tainted 6.0.0-rc1-00002-g0d53d2e882f9 #3 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 Call Trace: .. __mutex_lock+0xe5/0xc30 .. z_erofs_do_read_page+0x8ce/0x1560 .. z_erofs_readahead+0x31c/0x580 .. Freed by task 7787 kasan_save_stack+0x1e/0x40 kasan_set_track+0x20/0x30 kasan_set_free_info+0x20/0x40 __kasan_slab_free+0x10c/0x190 kmem_cache_free+0xed/0x380 rcu_core+0x3d5/0xc90 __do_softirq+0x12d/0x389 Last potentially related work creation: kasan_save_stack+0x1e/0x40 __kasan_record_aux_stack+0x97/0xb0 call_rcu+0x3d/0x3f0 erofs_shrink_workstation+0x11f/0x210 erofs_shrink_scan+0xdc/0x170 shrink_slab.constprop.0+0x296/0x530 drop_slab+0x1c/0x70 drop_caches_sysctl_handler+0x70/0x80 proc_sys_call_handler+0x20a/0x2f0 vfs_write+0x555/0x6c0 ksys_write+0xbe/0x160 do_syscall_64+0x3b/0x90 The root cause is that erofs_workgroup_unfreeze() doesn't reset to orig_val thus it causes a race that the pcluster reuses unexpectedly before freeing. Since UP platforms are quite rare now, such path becomes unnecessary. Let's drop such specific-designed path directly instead. Fixes: 73f5c66df3e2 ("staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}'") Reviewed-by: Yue Hu Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20220902045710.109530-1-hsiangkao@linux.alibaba.com Signed-off-by: Gao Xiang fs/erofs/internal.h | 29 ----------------------------- 1 file changed, 29 deletions(-) commit ea0b7b0d59e81a9c1bc03f8696bb04851bc2ad22 Author: Yue Hu Date: Fri Aug 12 14:01:50 2022 +0800 erofs: avoid the potentially wrong m_plen for big pcluster Actually, 'compressedlcs' stores compressed block count rather than lcluster count. Therefore, the number of bits for shifting the count should be 'LOG_BLOCK_SIZE' rather than 'lclusterbits' although current lcluster size is 4K. The value of 'm_plen' will be wrong once we enable the non 4K-sized lcluster. Signed-off-by: Yue Hu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20220812060150.8510-1-huyue2@coolpad.com Signed-off-by: Gao Xiang fs/erofs/zmap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 5bd9628b784cc5e38e1c7ebb680bbd6ee741230e Author: Sun Ke Date: Mon Aug 15 11:48:29 2022 +0800 erofs: fix error return code in erofs_fscache_{meta_,}read_folio If erofs_fscache_alloc_request fail and then goto out, it will return 0. it should return a negative error code instead of 0. Fixes: d435d53228dd ("erofs: change to use asynchronous io for fscache readpage/readahead") Signed-off-by: Sun Ke Reviewed-by: Jingbo Xu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20220815034829.3940803-1-sunke32@huawei.com Signed-off-by: Gao Xiang fs/erofs/fscache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 8cbb2b50ee2dcb082675237eaaa48fe8479f8aa5 Author: Sebastian Andrzej Siewior Date: Thu Aug 25 10:25:05 2022 +0200 asm-generic: Conditionally enable do_softirq_own_stack() via Kconfig. Remove the CONFIG_PREEMPT_RT symbol from the ifdef around do_softirq_own_stack() and move it to Kconfig instead. Enable softirq stacks based on SOFTIRQ_ON_OWN_STACK which depends on HAVE_SOFTIRQ_ON_OWN_STACK and its default value is set to !PREEMPT_RT. This ensures that softirq stacks are not used on PREEMPT_RT and avoids a 'select' statement on an option which has a 'depends' statement. Link: https://lore.kernel.org/YvN5E%2FPrHfUhggr7@linutronix.de Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Arnd Bergmann arch/Kconfig | 3 +++ arch/arm/kernel/irq.c | 2 +- arch/parisc/kernel/irq.c | 2 +- arch/powerpc/kernel/irq.c | 4 ++-- arch/s390/include/asm/softirq_stack.h | 2 +- arch/sh/kernel/irq.c | 2 +- arch/sparc/kernel/irq_64.c | 2 +- arch/x86/include/asm/irq_stack.h | 2 +- arch/x86/kernel/irq_32.c | 2 +- include/asm-generic/softirq_stack.h | 2 +- 10 files changed, 13 insertions(+), 10 deletions(-) commit beb432528c79e9613c85d250295288ef4beb14d7 Merge: 1621e70fc79d be318363daa2 Author: David S. Miller Date: Mon Sep 5 14:43:18 2022 +0100 Merge tag 'for-net-2022-09-02' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - Fix regression preventing ACL packet transmission ==================== Signed-off-by: David S. Miller commit 6ca64ac2763149fb66c0b4bf12f5e0977a88e51d Author: Johannes Thumshirn Date: Mon Sep 5 05:38:24 2022 -0700 btrfs: zoned: fix mounting with conventional zones Since commit 6a921de58992 ("btrfs: zoned: introduce space_info->active_total_bytes"), we're only counting the bytes of a block group on an active zone as usable for metadata writes. But on a SMR drive, we don't have active zones and short circuit some of the logic. This leads to an error on mount, because we cannot reserve space for metadata writes. Fix this by also setting the BLOCK_GROUP_FLAG_ZONE_IS_ACTIVE bit in the block-group's runtime flag if the zone is a conventional zone. Fixes: 6a921de58992 ("btrfs: zoned: introduce space_info->active_total_bytes") Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/zoned.c | 81 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 41 deletions(-) commit cac5c44c48c9fb9cc31bea15ebd9ef0c6462314f Author: Shin'ichiro Kawasaki Date: Fri Aug 26 16:42:15 2022 +0900 btrfs: zoned: set pseudo max append zone limit in zone emulation mode The commit 7d7672bc5d10 ("btrfs: convert count_max_extents() to use fs_info->max_extent_size") introduced a division by fs_info->max_extent_size. This max_extent_size is initialized with max zone append limit size of the device btrfs runs on. However, in zone emulation mode, the device is not zoned then its zone append limit is zero. This resulted in zero value of fs_info->max_extent_size and caused zero division error. Fix the error by setting non-zero pseudo value to max append zone limit in zone emulation mode. Set the pseudo value based on max_segments as suggested in the commit c2ae7b772ef4 ("btrfs: zoned: revive max_zone_append_bytes"). Fixes: 7d7672bc5d10 ("btrfs: convert count_max_extents() to use fs_info->max_extent_size") CC: stable@vger.kernel.org # 5.12+ Reviewed-by: Johannes Thumshirn Reviewed-by: Naohiro Aota Signed-off-by: Shin'ichiro Kawasaki Signed-off-by: David Sterba fs/btrfs/zoned.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit d5b81ced74afded85619ffbbe9c32ba9d82c9b1e Author: Naohiro Aota Date: Wed Aug 31 13:55:48 2022 +0900 btrfs: zoned: fix API misuse of zone finish waiting The commit 2ce543f47843 ("btrfs: zoned: wait until zone is finished when allocation didn't progress") implemented a zone finish waiting mechanism to the write path of zoned mode. However, using wait_var_event()/wake_up_all() on fs_info->zone_finish_wait is wrong and wait_var_event() just hangs because no one ever wakes it up once it goes into sleep. Instead, we can simply use wait_on_bit_io() and clear_and_wake_up_bit() on fs_info->flags with a proper barrier installed. Fixes: 2ce543f47843 ("btrfs: zoned: wait until zone is finished when allocation didn't progress") CC: stable@vger.kernel.org # 5.16+ Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 -- fs/btrfs/disk-io.c | 1 - fs/btrfs/inode.c | 7 +++---- fs/btrfs/zoned.c | 3 +-- 4 files changed, 4 insertions(+), 9 deletions(-) commit 1621e70fc79d77dfeef4e4ba90e125405a274db3 Author: Christophe JAILLET Date: Fri Sep 2 18:26:56 2022 +0200 stmmac: intel: Simplify intel_eth_pci_remove() There is no point to call pcim_iounmap_regions() in the remove function, this frees a managed resource that would be release by the framework anyway. Signed-off-by: Christophe JAILLET Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 2 -- 1 file changed, 2 deletions(-) commit fe2c9c61f668cde28dac2b188028c5299cedcc1e Author: Greg Kroah-Hartman Date: Fri Sep 2 15:41:11 2022 +0200 net: mvpp2: debugfs: fix memory leak when using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. Fix this up to be much simpler logic and only create the root debugfs directory once when the driver is first accessed. That resolves the memory leak and makes things more obvious as to what the intent is. Cc: Marcin Wojtas Cc: Russell King Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: netdev@vger.kernel.org Cc: stable Fixes: 21da57a23125 ("net: mvpp2: add a debugfs interface for the Header Parser") Signed-off-by: Greg Kroah-Hartman Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 51bdc8bb82525cd70feb92279c8b7660ad7948dd Author: Takashi Iwai Date: Mon Sep 5 15:06:30 2022 +0200 ALSA: hda/sigmatel: Fix unused variable warning for beep power change The newly added stac_check_power_status() caused a compile warning when CONFIG_SND_HDA_INPUT_BEEP is disabled. Fix it. Fixes: 414d38ba8710 ("ALSA: hda/sigmatel: Keep power up while beep is enabled") Reported-by: kernel test robot Link: https://lore.kernel.org/r/20220905130630.2845-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/pci/hda/patch_sigmatel.c | 2 ++ 1 file changed, 2 insertions(+) commit 6a02a61e81c231cc5c680c5dbf8665275147ac52 Author: Bart Van Assche Date: Fri Aug 12 14:03:17 2022 -0700 nvmet: fix a use-after-free Fix the following use-after-free complaint triggered by blktests nvme/004: BUG: KASAN: user-memory-access in blk_mq_complete_request_remote+0xac/0x350 Read of size 4 at addr 0000607bd1835943 by task kworker/13:1/460 Workqueue: nvmet-wq nvme_loop_execute_work [nvme_loop] Call Trace: show_stack+0x52/0x58 dump_stack_lvl+0x49/0x5e print_report.cold+0x36/0x1e2 kasan_report+0xb9/0xf0 __asan_load4+0x6b/0x80 blk_mq_complete_request_remote+0xac/0x350 nvme_loop_queue_response+0x1df/0x275 [nvme_loop] __nvmet_req_complete+0x132/0x4f0 [nvmet] nvmet_req_complete+0x15/0x40 [nvmet] nvmet_execute_io_connect+0x18a/0x1f0 [nvmet] nvme_loop_execute_work+0x20/0x30 [nvme_loop] process_one_work+0x56e/0xa70 worker_thread+0x2d1/0x640 kthread+0x183/0x1c0 ret_from_fork+0x1f/0x30 Cc: stable@vger.kernel.org Fixes: a07b4970f464 ("nvmet: add a generic NVMe target") Signed-off-by: Bart Van Assche Signed-off-by: Christoph Hellwig drivers/nvme/target/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8423f0b6d513b259fdab9c9bf4aaa6188d054c2d Author: Takashi Iwai Date: Mon Sep 5 08:07:14 2022 +0200 ALSA: pcm: oss: Fix race at SNDCTL_DSP_SYNC There is a small race window at snd_pcm_oss_sync() that is called from OSS PCM SNDCTL_DSP_SYNC ioctl; namely the function calls snd_pcm_oss_make_ready() at first, then takes the params_lock mutex for the rest. When the stream is set up again by another thread between them, it leads to inconsistency, and may result in unexpected results such as NULL dereference of OSS buffer as a fuzzer spotted recently. The fix is simply to cover snd_pcm_oss_make_ready() call into the same params_lock mutex with snd_pcm_oss_make_ready_locked() variant. Reported-and-tested-by: butt3rflyh4ck Reviewed-by: Jaroslav Kysela Cc: Link: https://lore.kernel.org/r/CAFcO6XN7JDM4xSXGhtusQfS2mSBcx50VJKwQpCq=WeLt57aaZA@mail.gmail.com Link: https://lore.kernel.org/r/20220905060714.22549-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/oss/pcm_oss.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bc7a2c9b17773c89f2f9c09ac9f9233716d6cd08 Author: Wenpeng Liang Date: Mon Sep 5 10:38:15 2022 +0800 MAINTAINERS: Update maintainers of HiSilicon RoCE Weihang has moved to work in other technical areas, and Haoyue will maintain this module instead of him. Signed-off-by: Wenpeng Liang Link: https://lore.kernel.org/r/20220905023815.1477684-1-liangwenpeng@huawei.com Signed-off-by: Leon Romanovsky MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b7d4be967f16f79a2283b2338709fcc750313ee Author: Maor Gottlieb Date: Mon Aug 29 12:02:29 2022 +0300 RDMA/mlx5: Fix UMR cleanup on error flow of driver init The cited commit removed from the cleanup flow of umr the checks if the resources were created. This could lead to null-ptr-deref in case that we had failure in mlx5_ib_stage_ib_reg_init stage. Fix it by adding new state to the umr that can say if the resources were created or not and check it in the umr cleanup flow before destroying the resources. Fixes: 04876c12c19e ("RDMA/mlx5: Move init and cleanup of UMR to umr.c") Reviewed-by: Michael Guralnik Signed-off-by: Maor Gottlieb Link: https://lore.kernel.org/r/4cfa61386cf202e9ce330e8d228ce3b25a36326e.1661763459.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + drivers/infiniband/hw/mlx5/umr.c | 3 +++ 2 files changed, 4 insertions(+) commit 74b30b3ad5cec95d2647e796d10137438a098bc1 Author: Chris Mi Date: Mon Aug 29 12:02:28 2022 +0300 RDMA/mlx5: Set local port to one when accessing counters When accessing Ports Performance Counters Register (PPCNT), local port must be one if it is Function-Per-Port HCA that HCA_CAP.num_ports is 1. The offending patch can change the local port to other values when accessing PPCNT after enabling switchdev mode. The following syndrome will be printed: # cat /sys/class/infiniband/rdmap4s0f0/ports/2/counters/* # dmesg mlx5_core 0000:04:00.0: mlx5_cmd_check:756:(pid 12450): ACCESS_REG(0x805) op_mod(0x1) failed, status bad parameter(0x3), syndrome (0x1e5585) Fix it by setting local port to one for Function-Per-Port HCA. Fixes: 210b1f78076f ("IB/mlx5: When not in dual port RoCE mode, use provided port as native") Reviewed-by: Mark Bloch Signed-off-by: Chris Mi Link: https://lore.kernel.org/r/6c5086c295c76211169e58dbd610fb0402360bab.1661763459.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/mad.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9ca05b0f27de928be121cccf07735819dc9e1ed3 Author: Maher Sanalla Date: Mon Aug 29 12:02:27 2022 +0300 RDMA/mlx5: Rely on RoCE fw cap instead of devlink when setting profile When the RDMA auxiliary driver probes, it sets its profile based on devlink driverinit value. The latter might not be in sync with FW yet (In case devlink reload is not performed), thus causing a mismatch between RDMA driver and FW. This results in the following FW syndrome when the RDMA driver tries to adjust RoCE state, which fails the probe: "0xC1F678 | modify_nic_vport_context: roce_en set on a vport that doesn't support roce" To prevent this, select the PF profile based on FW RoCE capability instead of relying on devlink driverinit value. To provide backward compatibility of the RoCE disable feature, on older FW's where roce_rw is not set (FW RoCE capability is read-only), keep the current behavior e.g., rely on devlink driverinit value. Fixes: fbfa97b4d79f ("net/mlx5: Disable roce at HCA level") Reviewed-by: Shay Drory Reviewed-by: Michael Guralnik Reviewed-by: Saeed Mahameed Signed-off-by: Maher Sanalla Link: https://lore.kernel.org/r/cb34ce9a1df4a24c135cb804db87f7d2418bd6cc.1661763459.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/main.c | 23 +++++++++++++++++++++-- include/linux/mlx5/driver.h | 19 ++++++++++--------- 3 files changed, 32 insertions(+), 12 deletions(-) commit 85eaeb5058f0f04dffb124c97c86b4f18db0b833 Author: Yishai Hadas Date: Wed Aug 24 09:10:36 2022 +0300 IB/core: Fix a nested dead lock as part of ODP flow Fix a nested dead lock as part of ODP flow by using mmput_async(). From the below call trace [1] can see that calling mmput() once we have the umem_odp->umem_mutex locked as required by ib_umem_odp_map_dma_and_lock() might trigger in the same task the exit_mmap()->__mmu_notifier_release()->mlx5_ib_invalidate_range() which may dead lock when trying to lock the same mutex. Moving to use mmput_async() will solve the problem as the above exit_mmap() flow will be called in other task and will be executed once the lock will be available. [1] [64843.077665] task:kworker/u133:2 state:D stack: 0 pid:80906 ppid: 2 flags:0x00004000 [64843.077672] Workqueue: mlx5_ib_page_fault mlx5_ib_eqe_pf_action [mlx5_ib] [64843.077719] Call Trace: [64843.077722] [64843.077724] __schedule+0x23d/0x590 [64843.077729] schedule+0x4e/0xb0 [64843.077735] schedule_preempt_disabled+0xe/0x10 [64843.077740] __mutex_lock.constprop.0+0x263/0x490 [64843.077747] __mutex_lock_slowpath+0x13/0x20 [64843.077752] mutex_lock+0x34/0x40 [64843.077758] mlx5_ib_invalidate_range+0x48/0x270 [mlx5_ib] [64843.077808] __mmu_notifier_release+0x1a4/0x200 [64843.077816] exit_mmap+0x1bc/0x200 [64843.077822] ? walk_page_range+0x9c/0x120 [64843.077828] ? __cond_resched+0x1a/0x50 [64843.077833] ? mutex_lock+0x13/0x40 [64843.077839] ? uprobe_clear_state+0xac/0x120 [64843.077860] mmput+0x5f/0x140 [64843.077867] ib_umem_odp_map_dma_and_lock+0x21b/0x580 [ib_core] [64843.077931] pagefault_real_mr+0x9a/0x140 [mlx5_ib] [64843.077962] pagefault_mr+0xb4/0x550 [mlx5_ib] [64843.077992] pagefault_single_data_segment.constprop.0+0x2ac/0x560 [mlx5_ib] [64843.078022] mlx5_ib_eqe_pf_action+0x528/0x780 [mlx5_ib] [64843.078051] process_one_work+0x22b/0x3d0 [64843.078059] worker_thread+0x53/0x410 [64843.078065] ? process_one_work+0x3d0/0x3d0 [64843.078073] kthread+0x12a/0x150 [64843.078079] ? set_kthread_struct+0x50/0x50 [64843.078085] ret_from_fork+0x22/0x30 [64843.078093] Fixes: 36f30e486dce ("IB/core: Improve ODP to use hmm_range_fault()") Reviewed-by: Maor Gottlieb Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/74d93541ea533ef7daec6f126deb1072500aeb16.1661251841.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky drivers/infiniband/core/umem_odp.c | 2 +- kernel/fork.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 766a96dc558385be735a370db867e302c8f22153 Author: Alan Stern Date: Thu Sep 1 10:36:34 2022 -0400 USB: core: Fix RST error in hub.c A recent commit added an invalid RST expression to a kerneldoc comment in hub.c. The fix is trivial. Fixes: 9c6d778800b9 ("USB: core: Prevent nested device-reset calls") Cc: Reported-by: Stephen Rothwell Reviewed-by: Bagas Sanjaya Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/YxDDcsLtRZ7c20pq@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2e406596571659451f4b95e37ddfd5a8ef1d0dc Author: Greg Kroah-Hartman Date: Fri Sep 2 14:31:07 2022 +0200 sched/debug: fix dentry leak in update_sched_domain_debugfs Kuyo reports that the pattern of using debugfs_remove(debugfs_lookup()) leaks a dentry and with a hotplug stress test, the machine eventually runs out of memory. Fix this up by using the newly created debugfs_lookup_and_remove() call instead which properly handles the dentry reference counting logic. Cc: Major Chen Cc: stable Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Juri Lelli Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Steven Rostedt Cc: Ben Segall Cc: Mel Gorman Cc: Daniel Bristot de Oliveira Cc: Valentin Schneider Cc: Matthias Brugger Reported-by: Kuyo Chang Tested-by: Kuyo Chang Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220902123107.109274-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman kernel/sched/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dec9b2f1e0455a151a7293c367da22ab973f713e Author: Greg Kroah-Hartman Date: Fri Sep 2 16:59:15 2022 +0200 debugfs: add debugfs_lookup_and_remove() There is a very common pattern of using debugfs_remove(debufs_lookup(..)) which results in a dentry leak of the dentry that was looked up. Instead of having to open-code the correct pattern of calling dput() on the dentry, create debugfs_lookup_and_remove() to handle this pattern automatically and properly without any memory leaks. Cc: stable Reported-by: Kuyo Chang Tested-by: Kuyo Chang Link: https://lore.kernel.org/r/YxIaQ8cSinDR881k@kroah.com Signed-off-by: Greg Kroah-Hartman fs/debugfs/inode.c | 22 ++++++++++++++++++++++ include/linux/debugfs.h | 6 ++++++ 2 files changed, 28 insertions(+) commit 5666a274a6d54372d6b79b1f78682a9d827e679e Author: Greg Kroah-Hartman Date: Thu Sep 1 18:37:34 2022 +0200 driver core: fix driver_set_override() issue with empty strings Python likes to send an empty string for some sysfs files, including the driver_override field. When commit 23d99baf9d72 ("PCI: Use driver_set_override() instead of open-coding") moved the PCI core to use the driver core function instead of hand-rolling their own handler, this showed up as a regression from some userspace tools, like DPDK. Fix this up by actually looking at the length of the string first instead of trusting that userspace got it correct. Fixes: 23d99baf9d72 ("PCI: Use driver_set_override() instead of open-coding") Cc: Krzysztof Kozlowski Cc: Bjorn Helgaas Cc: "Rafael J. Wysocki" Cc: Andy Shevchenko Cc: stable Reported-by: Stephen Hemminger Tested-by: Huisong Li Reviewed-by: Stephen Hemminger Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220901163734.3583106-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman drivers/base/driver.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ea89926d9690f055fd8da929f6621a760e8e0f14 Author: Fabio Estevam Date: Sat Aug 27 14:51:40 2022 -0300 arm64: dts: rockchip: Remove 'enable-active-low' from rk3566-quartz64-a The 'enable-active-low' property is not a valid one. Only 'enable-active-high' is valid, and when this property is absent the gpio regulator will act as active low by default. Remove the invalid 'enable-active-low' property. Fixes: b33a22a1e7c4 ("arm64: dts: rockchip: add basic dts for Pine64 Quartz64-A") Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20220827175140.1696699-2-festevam@denx.de Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts | 1 - 1 file changed, 1 deletion(-) commit a994b34b9abb9c08ee09e835b4027ff2147f9d94 Author: Fabio Estevam Date: Sat Aug 27 14:51:39 2022 -0300 arm64: dts: rockchip: Remove 'enable-active-low' from rk3399-puma The 'enable-active-low' property is not a valid one. Only 'enable-active-high' is valid, and when this property is absent the gpio regulator will act as active low by default. Remove the invalid 'enable-active-low' property. Fixes: 2c66fc34e945 ("arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM") Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20220827175140.1696699-1-festevam@denx.de Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 1 - 1 file changed, 1 deletion(-) commit 1988e3ef0544bbe54cffa4ec30a5883e5a08c2b6 Author: Michael Riesch Date: Mon Sep 5 08:43:35 2022 +0200 arm64: dts: rockchip: fix property for usb2 phy supply on rk3568-evb1-v10 The property "vbus-supply" was copied from the vendor kernel but is not available in mainstream. Use correct property "phy-supply". Fixes: d6cfb110b0fd ("arm64: dts: rockchip: add usb3 support to rk3568-evb1-v10") Signed-off-by: Michael Riesch Link: https://lore.kernel.org/r/20220905064335.104650-2-michael.riesch@wolfvision.net Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43e1d6d3b45c4e7e25171ec04a10d09969b0f889 Author: Michael Riesch Date: Mon Sep 5 08:43:34 2022 +0200 arm64: dts: rockchip: fix property for usb2 phy supply on rock-3a The property "vbus-supply" was copied from the vendor kernel but is not available in mainstream. Use correct property "phy-supply". Fixes: 254a1f6a29e7 ("arm64: dts: rockchip: add usb3 support to the radxa rock3 model a") Signed-off-by: Michael Riesch Link: https://lore.kernel.org/r/20220905064335.104650-1-michael.riesch@wolfvision.net Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84a53580c5d2138c7361c7c3eea5b31827e63b35 Author: David Lebrun Date: Fri Sep 2 10:45:06 2022 +0100 ipv6: sr: fix out-of-bounds read when setting HMAC data. The SRv6 layer allows defining HMAC data that can later be used to sign IPv6 Segment Routing Headers. This configuration is realised via netlink through four attributes: SEG6_ATTR_HMACKEYID, SEG6_ATTR_SECRET, SEG6_ATTR_SECRETLEN and SEG6_ATTR_ALGID. Because the SECRETLEN attribute is decoupled from the actual length of the SECRET attribute, it is possible to provide invalid combinations (e.g., secret = "", secretlen = 64). This case is not checked in the code and with an appropriately crafted netlink message, an out-of-bounds read of up to 64 bytes (max secret length) can occur past the skb end pointer and into skb_shared_info: Breakpoint 1, seg6_genl_sethmac (skb=, info=) at net/ipv6/seg6.c:208 208 memcpy(hinfo->secret, secret, slen); (gdb) bt #0 seg6_genl_sethmac (skb=, info=) at net/ipv6/seg6.c:208 #1 0xffffffff81e012e9 in genl_family_rcv_msg_doit (skb=skb@entry=0xffff88800b1f9f00, nlh=nlh@entry=0xffff88800b1b7600, extack=extack@entry=0xffffc90000ba7af0, ops=ops@entry=0xffffc90000ba7a80, hdrlen=4, net=0xffffffff84237580 , family=, family=) at net/netlink/genetlink.c:731 #2 0xffffffff81e01435 in genl_family_rcv_msg (extack=0xffffc90000ba7af0, nlh=0xffff88800b1b7600, skb=0xffff88800b1f9f00, family=0xffffffff82fef6c0 ) at net/netlink/genetlink.c:775 #3 genl_rcv_msg (skb=0xffff88800b1f9f00, nlh=0xffff88800b1b7600, extack=0xffffc90000ba7af0) at net/netlink/genetlink.c:792 #4 0xffffffff81dfffc3 in netlink_rcv_skb (skb=skb@entry=0xffff88800b1f9f00, cb=cb@entry=0xffffffff81e01350 ) at net/netlink/af_netlink.c:2501 #5 0xffffffff81e00919 in genl_rcv (skb=0xffff88800b1f9f00) at net/netlink/genetlink.c:803 #6 0xffffffff81dff6ae in netlink_unicast_kernel (ssk=0xffff888010eec800, skb=0xffff88800b1f9f00, sk=0xffff888004aed000) at net/netlink/af_netlink.c:1319 #7 netlink_unicast (ssk=ssk@entry=0xffff888010eec800, skb=skb@entry=0xffff88800b1f9f00, portid=portid@entry=0, nonblock=) at net/netlink/af_netlink.c:1345 #8 0xffffffff81dff9a4 in netlink_sendmsg (sock=, msg=0xffffc90000ba7e48, len=) at net/netlink/af_netlink.c:1921 ... (gdb) p/x ((struct sk_buff *)0xffff88800b1f9f00)->head + ((struct sk_buff *)0xffff88800b1f9f00)->end $1 = 0xffff88800b1b76c0 (gdb) p/x secret $2 = 0xffff88800b1b76c0 (gdb) p slen $3 = 64 '@' The OOB data can then be read back from userspace by dumping HMAC state. This commit fixes this by ensuring SECRETLEN cannot exceed the actual length of SECRET. Reported-by: Lucas Leong Tested: verified that EINVAL is correctly returned when secretlen > len(secret) Fixes: 4f4853dc1c9c1 ("ipv6: sr: implement API to control SR HMAC structure") Signed-off-by: David Lebrun Signed-off-by: David S. Miller net/ipv6/seg6.c | 5 +++++ 1 file changed, 5 insertions(+) commit 060ad609fa38e9a62fd5f79d0aaf83f94e6f0e36 Merge: c90714017cb3 592335a4164c Author: David S. Miller Date: Mon Sep 5 10:07:05 2022 +0100 Merge branch 'bonding-fixes' Hangbin Liu says: ==================== bonding: fix lladdr finding and confirmation This patch set fixed 3 issues when setting lladdr as bonding IPv6 target. Please see each patch for the details. v2: separate the patch to 3 parts ==================== Signed-off-by: David S. Miller commit 592335a4164c3c41f57967223a1e1efe3a0c6eb3 Author: Hangbin Liu Date: Tue Aug 30 17:37:22 2022 +0800 bonding: accept unsolicited NA message The unsolicited NA message with all-nodes multicast dest address should be valid, as this also means the link could reach the target. Also rename bond_validate_ns() to bond_validate_na(). Reported-by: LiLiang Fixes: 5e1eeef69c0f ("bonding: NS target should accept link local address") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit fd16eb948ea8b28afb03e11a5b11841e6ac2aa2b Author: Hangbin Liu Date: Tue Aug 30 17:37:21 2022 +0800 bonding: add all node mcast address when slave up When a link is enslave to bond, it need to set the interface down first. This makes the slave remove mac multicast address 33:33:00:00:00:01(The IPv6 multicast address ff02::1 is kept even when the interface down). When bond set the slave up, ipv6_mc_up() was not called due to commit c2edacf80e15 ("bonding / ipv6: no addrconf for slaves separately from master"). This is not an issue before we adding the lladdr target feature for bonding, as the mac multicast address will be added back when bond interface up and join group ff02::1. But after adding lladdr target feature for bonding. When user set a lladdr target, the unsolicited NA message with all-nodes multicast dest will be dropped as the slave interface never add 33:33:00:00:00:01 back. Fix this by calling ipv6_mc_up() to add 33:33:00:00:00:01 back when the slave interface up. Reported-by: LiLiang Fixes: 5e1eeef69c0f ("bonding: NS target should accept link local address") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller net/ipv6/addrconf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b7f14132bf58256e841774ae07d3ffb7a841c2bc Author: Hangbin Liu Date: Tue Aug 30 17:37:20 2022 +0800 bonding: use unspecified address if no available link local address When ns_ip6_target was set, the ipv6_dev_get_saddr() will be called to get available source address and send IPv6 neighbor solicit message. If the target is global address, ipv6_dev_get_saddr() will get any available src address. But if the target is link local address, ipv6_dev_get_saddr() will only get available address from our interface, i.e. the corresponding bond interface. But before bond interface up, all the address is tentative, while ipv6_dev_get_saddr() will ignore tentative address. This makes we can't find available link local src address, then bond_ns_send() will not be called and no NS message was sent. Finally bond interface will keep in down state. Fix this by sending NS with unspecified address if there is no available source address. Reported-by: LiLiang Fixes: 5e1eeef69c0f ("bonding: NS target should accept link local address") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 3 +++ 1 file changed, 3 insertions(+) commit e0f1b21c504f050de83922dd49e6a425dad2d518 Author: Shravya Kumbham Date: Tue May 24 13:19:13 2022 +0530 dmaengine: zynqmp_dma: Typecast with enum to fix the coverity warning Typecast the flags variable with (enum dma_ctrl_flags) in zynqmp_dma_prep_memcpy function to fix the coverity warning. Addresses-Coverity: Event mixed_enum_type. Signed-off-by: Shravya Kumbham Signed-off-by: Harini Katakam Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1653378553-28548-1-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Vinod Koul drivers/dma/xilinx/zynqmp_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9fdb0b86f087c2b7f6c6168dd0985a3c1eda87e Author: Liang He Date: Wed Jul 20 15:32:34 2022 +0800 dmaengine: ti: k3-udma-private: Fix refcount leak bug in of_xudma_dev_get() We should call of_node_put() for the reference returned by of_parse_phandle() in fail path or when it is not used anymore. Here we only need to move the of_node_put() before the check. Fixes: d70241913413 ("dmaengine: ti: k3-udma: Add glue layer for non DMAengine users") Signed-off-by: Liang He Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20220720073234.1255474-1-windhl@126.com Signed-off-by: Vinod Koul drivers/dma/ti/k3-udma-private.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5fa383a25fd8a16a73485c90da4e3e33a78b45cf Author: Peng Fan Date: Wed Aug 31 22:25:49 2022 +0800 arm64: dts: imx8ulp: add #reset-cells for pcc The binding file clock/imx8ulp-pcc-clock.yaml indicates '#reset-cells' is a required property, add it. Fixes: fe6291e96313 ("arm64: dts: imx8ulp: Add the basic dtsi file for imx8ulp") Signed-off-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit d707ff3470c22c8dc897b2ad4626749813cea913 Author: Alexander Stein Date: Fri Sep 2 10:20:15 2022 +0200 arm64: dts: tqma8mpxl-ba8mpxl: Fix button GPIOs They were in wrong order, so fix it by switching them. Fixes: 418d1d840e42 ("arm64: dts: freescale: add initial device tree for TQMa8MPQL with i.MX8MP") Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 347155d1fa85972ac19d1bf58ae3f3ce95e51a5d Author: Marco Felsch Date: Fri Aug 26 21:04:48 2022 +0200 arm64: dts: imx8mn: remove GPU power domain reset The PGC (power gating controller) already handles the reset for the GPUMIX power domain. By specifying it within the device tree the reset it issued a 2nd time. This confuses the hardware during power up and sporadically hangs the SoC. Fix this by removing the reset property and let the hardware handle the reset. Fixes: 9a0f3b157e22e ("arm64: dts: imx8mn: Enable GPU") Signed-off-by: Marco Felsch Signed-off-by: Lucas Stach Tested-by: Adam Ford Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mn.dtsi | 1 - 1 file changed, 1 deletion(-) commit 7e18e42e4b280c85b76967a9106a13ca61c16179 Author: Linus Torvalds Date: Sun Sep 4 13:10:01 2022 -0700 Linux 6.0-rc4 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5995497296ade7716c8e70899e02235f2b6d9f5d Merge: 685ed983e2dc 6cf07810e9ef Author: Linus Torvalds Date: Sun Sep 4 11:33:22 2022 -0700 Merge tag 'powerpc-6.0-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix handling of PCI domains in /proc on 32-bit systems using the recently added support for numbering buses from zero for each domain. - A fix and a revert for some changes to use READ/WRITE_ONCE() which caused problems with KASAN enabled due to sanitisation calls being introduced in low-level paths that can't cope with it. - Fix build errors on 32-bit caused by the syscall table being misaligned sometimes. - Two fixes to get IBM Cell native machines booting again, which had bit-rotted while my QS22 was temporarily out of action. - Fix the papr_scm driver to not assume the order of events returned by the hypervisor is stable, and a related compile fix. Thanks to Aneesh Kumar K.V, Christophe Leroy, Jordan Niethe, Kajol Jain, Masahiro Yamada, Nathan Chancellor, Pali Rohár, Vaibhav Jain, and Zhouyi Zhou. * tag 'powerpc-6.0-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/papr_scm: Ensure rc is always initialized in papr_scm_pmu_register() Revert "powerpc/irq: Don't open code irq_soft_mask helpers" powerpc: Fix hard_irq_disable() with sanitizer powerpc/rtas: Fix RTAS MSR[HV] handling for Cell Revert "powerpc: Remove unused FW_FEATURE_NATIVE references" powerpc: align syscall table for ppc32 powerpc/pci: Enable PCI domains in /proc when PCI bus numbers are not unique powerpc/papr_scm: Fix nvdimm event mappings commit 685ed983e2dc330680a076a1fd37ebe04017df91 Merge: b0839b281c42 29250ba51bc1 Author: Linus Torvalds Date: Sun Sep 4 11:27:14 2022 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "s390: - PCI interpretation compile fixes RISC-V: - fix unused variable warnings in vcpu_timer.c - move extern sbi_ext declarations to a header x86: - check validity of argument to KVM_SET_MP_STATE - use guest's global_ctrl to completely disable guest PEBS - fix a memory leak on memory allocation failure - mask off unsupported and unknown bits of IA32_ARCH_CAPABILITIES - fix build failure with Clang integrated assembler - fix MSR interception - always flush TLBs when enabling dirty logging" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: check validity of argument to KVM_SET_MP_STATE perf/x86/core: Completely disable guest PEBS via guest's global_ctrl KVM: x86: fix memoryleak in kvm_arch_vcpu_create() KVM: x86: Mask off unsupported and unknown bits of IA32_ARCH_CAPABILITIES KVM: s390: pci: Hook to access KVM lowlevel from VFIO riscv: kvm: move extern sbi_ext declarations to a header riscv: kvm: vcpu_timer: fix unused variable warnings KVM: selftests: Fix ambiguous mov in KVM_ASM_SAFE() KVM: selftests: Fix KVM_EXCEPTION_MAGIC build with Clang KVM: VMX: Heed the 'msr' argument in msr_write_intercepted() kvm: x86: mmu: Always flush TLBs when enabling dirty logging kvm: x86: mmu: Drop the need_remote_flush() function commit b0839b281c427e844143dba3893e25c83cdd6c17 Author: Nick Desaulniers Date: Thu Sep 1 10:59:13 2022 -0700 Makefile.extrawarn: re-enable -Wformat for clang; take 2 -Wformat was recently re-enabled for builds with clang, then quickly re-disabled, due to concerns stemming from the frequency of default argument promotion related warning instances. commit 258fafcd0683 ("Makefile.extrawarn: re-enable -Wformat for clang") commit 21f9c8a13bb2 ("Revert "Makefile.extrawarn: re-enable -Wformat for clang"") ISO WG14 has ratified N2562 to address default argument promotion explicitly for printf, as part of the upcoming ISO C2X standard. The behavior of clang was changed in clang-16 to not warn for the cited cases in all language modes. Add a version check, so that users of clang-16 now get the full effect of -Wformat. For older clang versions, re-enable flags under the -Wformat group that way users still get some useful checks related to format strings, without noisy default argument promotion warnings. I intentionally omitted -Wformat-y2k and -Wformat-security from being re-enabled, which are also part of -Wformat in clang-16. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Link: https://github.com/llvm/llvm-project/issues/57102 Link: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2562.pdf Suggested-by: Justin Stitt Suggested-by: Nathan Chancellor Suggested-by: Youngmin Nam Signed-off-by: Nick Desaulniers Reviewed-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Signed-off-by: Linus Torvalds scripts/Makefile.extrawarn | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 8f2b6bc79c32f0fa60df000ae387a790ec80eae9 Author: Swati Agarwal Date: Wed Aug 17 11:41:25 2022 +0530 dmaengine: xilinx_dma: Report error in case of dma_set_mask_and_coherent API failure The driver does not handle the failure case while calling dma_set_mask_and_coherent API. In case of failure, capture the return value of API and then report an error. Addresses-coverity: Unchecked return value (CHECKED_RETURN) Signed-off-by: Swati Agarwal Reviewed-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/20220817061125.4720-4-swati.agarwal@xilinx.com Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_dma.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 462bce790e6a7e68620a4ce260cc38f7ed0255d5 Author: Swati Agarwal Date: Wed Aug 17 11:41:24 2022 +0530 dmaengine: xilinx_dma: cleanup for fetching xlnx,num-fstores property Free the allocated resources for missing xlnx,num-fstores property. Signed-off-by: Swati Agarwal Link: https://lore.kernel.org/r/20220817061125.4720-3-swati.agarwal@xilinx.com Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91df7751eb890e970afc08f50b8f0fa5ea39e03d Author: Swati Agarwal Date: Wed Aug 17 11:41:23 2022 +0530 dmaengine: xilinx_dma: Fix devm_platform_ioremap_resource error handling Add missing cleanup in devm_platform_ioremap_resource(). When probe fails remove dma channel resources and disable clocks in accordance with the order of resources allocated . Signed-off-by: Swati Agarwal Link: https://lore.kernel.org/r/20220817061125.4720-2-swati.agarwal@xilinx.com Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_dma.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 8123437cf46ea5a0f6ca5cb3c528d8b6db97b9c2 Author: zain wang Date: Tue Aug 30 13:16:17 2022 -0700 arm64: dts: rockchip: Set RK3399-Gru PCLK_EDP to 24 MHz We've found the AUX channel to be less reliable with PCLK_EDP at a higher rate (typically 25 MHz). This is especially important on systems with PSR-enabled panels (like Gru-Kevin), since we make heavy, constant use of AUX. According to Rockchip, using any rate other than 24 MHz can cause "problems between syncing the PHY an PCLK", which leads to all sorts of unreliabilities around register operations. Fixes: d67a38c5a623 ("arm64: dts: rockchip: move core edp from rk3399-kevin to shared chromebook") Reviewed-by: Douglas Anderson Signed-off-by: zain wang Signed-off-by: Brian Norris Link: https://lore.kernel.org/r/20220830131212.v2.1.I98d30623f13b785ca77094d0c0fd4339550553b6@changeid Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8194a356226ce6f53e1d98b44c0436c583db89d2 Author: Marek Vasut Date: Wed Aug 24 00:13:20 2022 +0200 arm64: dts: imx8mm: Reverse CPLD_Dn GPIO label mapping on MX8Menlo The CPLD_Dn GPIO assignment between SoM and CPLD has now been clarified in schematic and the assignment is reversed. Update the DT to match the hardware. Fixes: 510c527b4ff57 ("arm64: dts: imx8mm: Add i.MX8M Mini Toradex Verdin based Menlo board") Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-mx8menlo.dts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c90714017cb3f197e71c7ff1317335b96d4d19e8 Merge: d9c0103b9cb0 2aec909912da Author: David S. Miller Date: Sun Sep 4 11:23:11 2022 +0100 Merge tag 'wireless-2022-09-03' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes berg says: ==================== We have a handful of fixes: - fix DMA from stack in wilc1000 driver - fix crash on chip reset failure in mt7921e - fix for the reported warning on aggregation timer expiry - check packet lengths in hwsim virtio paths - fix compiler warnings/errors with AAD construction by using struct_group - fix Intel 4965 driver rate scale operation - release channel contexts correctly in mac80211 mlme code ==================== Signed-off-by: David S. Miller commit 414d38ba871092aeac4ed097ac4ced89486646f7 Author: Takashi Iwai Date: Sun Sep 4 09:27:50 2022 +0200 ALSA: hda/sigmatel: Keep power up while beep is enabled It seems that the beep playback doesn't work well on IDT codec devices when the codec auto-pm is enabled. Keep the power on while the beep switch is enabled. Link: https://bugzilla.suse.com/show_bug.cgi?id=1200544 Link: https://lore.kernel.org/r/20220904072750.26164-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/pci/hda/patch_sigmatel.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 0d1b756acf60da5004c1e20ca4462f0c257bf6e1 Author: Linus Walleij Date: Fri Sep 2 23:59:18 2022 +0200 RDMA/siw: Pass a pointer to virt_to_page() Functions that work on a pointer to virtual memory such as virt_to_pfn() and users of that function such as virt_to_page() are supposed to pass a pointer to virtual memory, ideally a (void *) or other pointer. However since many architectures implement virt_to_pfn() as a macro, this function becomes polymorphic and accepts both a (unsigned long) and a (void *). If we instead implement a proper virt_to_pfn(void *addr) function the following happens (occurred on arch/arm): drivers/infiniband/sw/siw/siw_qp_tx.c:32:23: warning: incompatible integer to pointer conversion passing 'dma_addr_t' (aka 'unsigned int') to parameter of type 'const void *' [-Wint-conversion] drivers/infiniband/sw/siw/siw_qp_tx.c:32:37: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion] drivers/infiniband/sw/siw/siw_qp_tx.c:538:36: warning: incompatible integer to pointer conversion passing 'unsigned long long' to parameter of type 'const void *' [-Wint-conversion] Fix this with an explicit cast. In one case where the SIW SGE uses an unaligned u64 we need a double cast modifying the virtual address (va) to a platform-specific uintptr_t before casting to a (void *). Fixes: b9be6f18cf9e ("rdma/siw: transmit path") Cc: linux-rdma@vger.kernel.org Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20220902215918.603761-1-linus.walleij@linaro.org Signed-off-by: Leon Romanovsky drivers/infiniband/sw/siw/siw_qp_tx.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 7726d4c3e60bfe206738894267414a5f10510f1a Merge: 65eea2c060ae 6890381720b2 Author: Linus Torvalds Date: Sat Sep 3 21:27:27 2022 -0700 Merge tag 'gpio-fixes-for-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: "A a set of fixes from the GPIO subsystem. Most are small driver fixes except the realtek-otto driver patch which is pretty big but addresses a significant flaw that can cause the CPU to stay infinitely busy on uncleared ISR on some platforms. Summary: - MAINTAINERS update - fix resource leaks in gpio-mockup and gpio-pxa - add missing locking in gpio-pca953x - use 32-bit I/O in gpio-realtek-otto - make irq_chip structures immutable in four more drivers" * tag 'gpio-fixes-for-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: ws16c48: Make irq_chip immutable gpio: 104-idio-16: Make irq_chip immutable gpio: 104-idi-48: Make irq_chip immutable gpio: 104-dio-48e: Make irq_chip immutable gpio: realtek-otto: switch to 32-bit I/O gpio: pca953x: Add mutex_lock for regcache sync in PM gpio: mockup: remove gpio debugfs when remove device gpio: pxa: use devres for the clock struct MAINTAINERS: rectify entry for XILINX GPIO DRIVER commit 2e9ceb6728f1dc2fa4b5d08f37d88cbc49a20a62 Author: Yuezhang Mo Date: Thu Jul 28 10:01:26 2022 +0800 exfat: fix overflow for large capacity partition Using int type for sector index, there will be overflow in a large capacity partition. For example, if storage with sector size of 512 bytes and partition capacity is larger than 2TB, there will be overflow. Fixes: 1b6138385499 ("exfat: reduce block requests when zeroing a cluster") Cc: stable@vger.kernel.org # v5.19+ Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Acked-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/fatent.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6890381720b27a41f2d9e68cce241336342ea3b7 Author: William Breathitt Gray Date: Fri Sep 2 13:45:26 2022 -0400 gpio: ws16c48: Make irq_chip immutable Kernel warns about mutable irq_chips: "not an immutable chip, please consider fixing!" Make the struct irq_chip const, flag it as IRQCHIP_IMMUTABLE, add the new helper functions, and call the appropriate gpiolib functions. Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-ws16c48.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 410a5041aa60d91ff66a861560e7c879d664270f Author: William Breathitt Gray Date: Fri Sep 2 13:45:25 2022 -0400 gpio: 104-idio-16: Make irq_chip immutable Kernel warns about mutable irq_chips: "not an immutable chip, please consider fixing!" Make the struct irq_chip const, flag it as IRQCHIP_IMMUTABLE, add the new helper functions, and call the appropriate gpiolib functions. Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-104-idio-16.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit fa1329f9e402c1351ad821080eba9b7cda758ac6 Author: William Breathitt Gray Date: Fri Sep 2 13:45:24 2022 -0400 gpio: 104-idi-48: Make irq_chip immutable Kernel warns about mutable irq_chips: "not an immutable chip, please consider fixing!" Make the struct irq_chip const, flag it as IRQCHIP_IMMUTABLE, add the new helper functions, and call the appropriate gpiolib functions. Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-104-idi-48.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 35f0aa7727b092520bf91374768a4fdafd4a4fe3 Author: William Breathitt Gray Date: Fri Sep 2 13:45:23 2022 -0400 gpio: 104-dio-48e: Make irq_chip immutable Kernel warns about mutable irq_chips: "not an immutable chip, please consider fixing!" Make the struct irq_chip const, flag it as IRQCHIP_IMMUTABLE, add the new helper functions, and call the appropriate gpiolib functions. Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-104-dio-48e.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 65eea2c060aee3bf6d27ea365360059fbd4eeff4 Merge: f0c5f7ea8120 e9ea0b30ada0 Author: Linus Torvalds Date: Sat Sep 3 13:23:11 2022 -0700 Merge tag 'for-linus-6.0-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - a minor fix for the Xen grant driver - a small series fixing a recently introduced problem in the Xen blkfront/blkback drivers with negotiation of feature usage * tag 'for-linus-6.0-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/grants: prevent integer overflow in gnttab_dma_alloc_pages() xen-blkfront: Cache feature_persistent value before advertisement xen-blkfront: Advertise feature-persistent as user requested xen-blkback: Advertise feature-persistent as user requested commit f0c5f7ea81202e997f321d59bdd0c3f5c12ddea7 Merge: cda9a8486c48 ac9284db6b7b Author: Linus Torvalds Date: Sat Sep 3 13:21:01 2022 -0700 Merge tag 'loongarch-fixes-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch fixes from Huacai Chen: "Fix several build errors or warnings, cleanup some code, and adjust arch_do_signal_or_restart() to adapt generic entry" * tag 'loongarch-fixes-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: mm: Remove the unneeded result variable LoongArch: Fix arch_remove_memory() undefined build error LoongArch: Fix section mismatch due to acpi_os_ioremap() LoongArch: Improve dump_tlb() output messages LoongArch: Adjust arch_do_signal_or_restart() to adapt generic entry LoongArch: Avoid orphan input sections commit cda9a8486c48f09dabfec0c17ab109e352fe368e Merge: 6433fe06f698 7c8d42fdf1a8 Author: Linus Torvalds Date: Sat Sep 3 13:17:33 2022 -0700 Merge tag 's390-6.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Update defconfigs - Fix linker script to align nospec tables correctly to avoid potentially unbootable kernel with some config options - Fix alignment check in prepare_hugepage_range() for 2GB hugepages to avoid BUG in __unmap_hugepage_range() for unaligned mappings later - Remove useless hugepage address alignment in hugetlb fault handling * tag 's390-6.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/hugetlb: fix prepare_hugepage_range() check for 2 GB hugepages s390: update defconfigs s390: fix nospec table alignments s390/mm: remove useless hugepage address alignment commit 6433fe06f698936e02f79bf18f69be766e4f53aa Merge: 42cf58c272ee 9c9c71168f79 Author: Linus Torvalds Date: Sat Sep 3 13:09:46 2022 -0700 Merge tag 'input-for-v6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - GT1158 ID added to Goodix touchscreen driver - Boeder Force Feedback Wheel USB added to iforce joystick driver - fixup for iforce driver to avoid hangups - fix autoloading of rk805-pwrkey driver. * tag 'input-for-v6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: iforce - add support for Boeder Force Feedback Wheel Input: iforce - wake up after clearing IFORCE_XMIT_RUNNING flag Input: goodix - add compatible string for GT1158 MAINTAINERS: add include/dt-bindings/input to INPUT DRIVERS Input: rk805-pwrkey - fix module autoloading Input: goodix - add support for GT1158 dt-bindings: input: touchscreen: add compatible string for Goodix GT1158 commit d958edb9eef115cdd6709face6ab46fefd74324b Merge: 1709c70c31e0 0dec364ffeb6 Author: Palmer Dabbelt Date: Sat Sep 3 12:30:23 2022 -0700 Merge tag 'dt-fixes-for-palmer-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git into fixes Microchip RISC-V devicetree fixes for 6.0-rc4 (or later) A fix for the warnings introduced in rc3 as part of fixing the console spam from the L2's isr. Signed-off-by: Conor Dooley * tag 'dt-fixes-for-palmer-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git: riscv: dts: microchip: use an mpfs specific l2 compatible dt-bindings: riscv: sifive-l2: add a PolarFire SoC compatible commit 42cf58c272ee1dae902e8cc1166c246589abd1d8 Merge: c53b3dcb9942 902e02ea9385 Author: Linus Torvalds Date: Sat Sep 3 10:34:02 2022 -0700 Merge tag 'tty-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver fixes from Greg KH: "Here are some small tty/serial/vt driver fixes for 6.0-rc4 that resolve a number of reported issues: - n_gsm fixups for previous changes that caused problems - much-reported serdev crash fix that showed up in 6.0-rc1 - vt font selection bugfix - kerneldoc build warning fixes - other tiny serial core fixes All of these have been in linux-next for a while with no reported problems" * tag 'tty-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: n_gsm: avoid call of sleeping functions from atomic context tty: n_gsm: replace kicktimer with delayed_work tty: n_gsm: initialize more members at gsm_alloc_mux() tty: n_gsm: add sanity check for gsm->receive in gsm_receive_buf() tty: serial: atmel: Preserve previous USART mode if RS485 disabled tty: serial: lpuart: disable flow control while waiting for the transmit engine to complete tty: Fix lookahead_buf crash with serdev serial: fsl_lpuart: RS485 RTS polariy is inverse vt: Clear selection before changing the font serial: document start_rx member at struct uart_ops commit c53b3dcb9942b8ed7f81ee3921c4085d87070c73 Merge: 9a61442cba0e e230a4455ac3 Author: Linus Torvalds Date: Sat Sep 3 10:32:17 2022 -0700 Merge tag 'staging-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes from Greg KH: "Here are three small staging driver fixes for 6.0-rc4 that resolve some reported problems and add some a device id: - new device id for r8188eu driver - use-after-free bugfixes for the rtl8712 driver - fix up firmware dependency problem for the r8188eu driver All of these have been in linux-next for a while with no reported problems" * tag 'staging-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: rtl8712: fix use after free bugs staging: r8188eu: Add Rosewill USB-N150 Nano to device tables staging: r8188eu: add firmware dependency commit 748008e1da926a814cc0a054c81ca614408b1b0c Author: Ming Lei Date: Tue Aug 23 18:38:19 2022 +0800 block: don't add partitions if GD_SUPPRESS_PART_SCAN is set Commit b9684a71fca7 ("block, loop: support partitions without scanning") adds GD_SUPPRESS_PART_SCAN for replacing part function of GENHD_FL_NO_PART. But looks blk_add_partitions() is missed, since loop doesn't want to add partitions if GENHD_FL_NO_PART was set. And it causes regression on libblockdev (as called from udisks) which operates with the LO_FLAGS_PARTSCAN. Fixes the issue by not adding partitions if GD_SUPPRESS_PART_SCAN is set. Fixes: b9684a71fca7 ("block, loop: support partitions without scanning") Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220823103819.395776-1-ming.lei@redhat.com Signed-off-by: Jens Axboe block/partitions/core.c | 3 +++ 1 file changed, 3 insertions(+) commit 9a61442cba0e93de5e505b9f43d04d1afa6f18c1 Merge: 777464261d12 abb5f3f4b1f5 Author: Linus Torvalds Date: Sat Sep 3 10:27:25 2022 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "Here's a collection of primarily clk driver fixes, with a couple fixes to the core framework. We had to revert out a commit that affected boot on some devices that have the CLK_OPS_PARENT_ENABLE flag set. It isn't critical to have that fix so we'll try again next time. Driver side fixes include: - Plug an OF-node refcount bug in the TI clk driver - Fix the error handling in the raspberry pi firmware get_rate so that errors don't look like valid frequencies - Avoid going out of bounds in the raspberry pi driver too if the video firmware returns something we're not expecting" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: Revert "clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops" clk: bcm: rpi: Show clock id limit in error case clk: bcm: rpi: Add missing newline clk: bcm: rpi: Prevent out-of-bounds access clk: bcm: rpi: Fix error handling of raspberrypi_fw_get_rate clk: core: Fix runtime PM sequence in clk_core_unprepare() clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops clk: ti: Fix missing of_node_get() ti_find_clock_provider() commit 777464261d12f4b011fff68de36a4a1075691cd9 Merge: 8782fb61cc84 f233d2be38db Author: Linus Torvalds Date: Sat Sep 3 10:24:30 2022 -0700 Merge tag 'hwmon-for-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - Fix out of bounds access in gpio-fan driver - Fix VOUT margin caching in PMBus core - Avoid error message after -EPROBE_DEFER from devm_regulator_register() * tag 'hwmon-for-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (gpio-fan) Fix array out of bounds access hwmon: (pmbus) Fix vout margin caching hwmon: (pmbus) Use dev_err_probe() to filter -EPROBE_DEFER error messages commit 8782fb61cc848364e1e1599d76d3c9dd58a1cc06 Author: Steven Price Date: Fri Sep 2 12:26:12 2022 +0100 mm: pagewalk: Fix race between unmap and page walker The mmap lock protects the page walker from changes to the page tables during the walk. However a read lock is insufficient to protect those areas which don't have a VMA as munmap() detaches the VMAs before downgrading to a read lock and actually tearing down PTEs/page tables. For users of walk_page_range() the solution is to simply call pte_hole() immediately without checking the actual page tables when a VMA is not present. We now never call __walk_page_range() without a valid vma. For walk_page_range_novma() the locking requirements are tightened to require the mmap write lock to be taken, and then walking the pgd directly with 'no_vma' set. This in turn means that all page walkers either have a valid vma, or it's that special 'novma' case for page table debugging. As a result, all the odd '(!walk->vma && !walk->no_vma)' tests can be removed. Fixes: dd2283f2605e ("mm: mmap: zap pages with read mmap_sem in munmap") Reported-by: Jann Horn Signed-off-by: Steven Price Cc: Vlastimil Babka Cc: Thomas Hellström Cc: Konstantin Khlebnikov Cc: Andrew Morton Signed-off-by: Linus Torvalds arch/riscv/mm/pageattr.c | 4 ++-- mm/pagewalk.c | 21 ++++++++++++--------- mm/ptdump.c | 4 ++-- 3 files changed, 16 insertions(+), 13 deletions(-) commit 2aec909912da55a6e469fd6ee8412080a5433ed2 Author: Johannes Berg Date: Mon Aug 29 11:46:38 2022 +0200 wifi: use struct_group to copy addresses We sometimes copy all the addresses from the 802.11 header for the AAD, which may cause complaints from fortify checks. Use struct_group() to avoid the compiler warnings/errors. Change-Id: Ic3ea389105e7813b22095b295079eecdabde5045 Signed-off-by: Johannes Berg include/linux/ieee80211.h | 8 +++++--- net/mac80211/wpa.c | 4 ++-- net/wireless/lib80211_crypt_ccmp.c | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) commit 8c0427842aaef161a38ac83b7e8d8fe050b4be04 Author: Soenke Huster Date: Fri Sep 2 10:19:58 2022 +0200 wifi: mac80211_hwsim: check length for virtio packets An invalid packet with a length shorter than the specified length in the netlink header can lead to use-after-frees and slab-out-of-bounds in the processing of the netlink attributes, such as the following: BUG: KASAN: slab-out-of-bounds in __nla_validate_parse+0x1258/0x2010 Read of size 2 at addr ffff88800ac7952c by task kworker/0:1/12 Workqueue: events hwsim_virtio_rx_work Call Trace: dump_stack_lvl+0x45/0x5d print_report.cold+0x5e/0x5e5 kasan_report+0xb1/0x1c0 __nla_validate_parse+0x1258/0x2010 __nla_parse+0x22/0x30 hwsim_virtio_handle_cmd.isra.0+0x13f/0x2d0 hwsim_virtio_rx_work+0x1b2/0x370 process_one_work+0x8df/0x1530 worker_thread+0x575/0x11a0 kthread+0x29d/0x340 ret_from_fork+0x22/0x30 Discarding packets with an invalid length solves this. Therefore, skb->len must be set at reception. Change-Id: Ieaeb9a4c62d3beede274881a7c2722c6c6f477b6 Signed-off-by: Soenke Huster Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 69371801f929ff4b3c846a45b9d49db631897cd9 Author: Johannes Berg Date: Fri Sep 2 16:11:14 2022 +0200 wifi: mac80211: fix locking in auth/assoc timeout If we hit an authentication or association timeout, we only release the chanctx for the deflink, and the other link(s) are released later by ieee80211_vif_set_links(), but we're not locking this correctly. Fix the locking here while releasing the channels and links. Change-Id: I9e08c1a5434592bdc75253c1abfa6c788f9f39b1 Fixes: 81151ce462e5 ("wifi: mac80211: support MLO authentication/association with one link") Signed-off-by: Johannes Berg net/mac80211/mlme.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 7a2c6d1616be5d49c0dae2c876af3fe20e71a111 Author: Johannes Berg Date: Fri Sep 2 16:11:15 2022 +0200 wifi: mac80211: mlme: release deflink channel in error case In the prep_channel error case we didn't release the deflink channel leaving it to be left around. Fix that. Change-Id: If0dfd748125ec46a31fc6045a480dc28e03723d2 Signed-off-by: Johannes Berg net/mac80211/mlme.c | 1 + 1 file changed, 1 insertion(+) commit 4a86c5462616e0d690ad3c94dc84c3b5f1ea5631 Author: Mukesh Sisodiya Date: Fri Sep 2 16:11:31 2022 +0200 wifi: mac80211: fix link warning in RX agg timer expiry The rx data link pointer isn't set from the RX aggregation timer, resulting in a later warning. Fix that by setting it to the first valid link for now, with a FIXME to worry about statistics later, it's not very important since it's just the timeout case. Reported-by: Hans de Goede Link: https://lore.kernel.org/r/498d714c-76be-9d04-26db-a1206878de5e@redhat.com Fixes: 56057da4569b ("wifi: mac80211: rx: track link in RX data") Signed-off-by: Mukesh Sisodiya Signed-off-by: Johannes Berg net/mac80211/rx.c | 4 ++++ 1 file changed, 4 insertions(+) commit ac9284db6b7b4af150940186b633a233d4ca2bed Author: ye xingchen Date: Fri Aug 26 07:29:03 2022 +0000 LoongArch: mm: Remove the unneeded result variable Return the value pa_to_nid() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen Signed-off-by: Huacai Chen arch/loongarch/mm/init.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 1a470ce4e9106cc4c3c0edfb2e213dcbb7224dc4 Author: Yupeng Li Date: Wed Aug 31 13:40:17 2022 +0800 LoongArch: Fix arch_remove_memory() undefined build error The kernel build error when unslected CONFIG_MEMORY_HOTREMOVE because arch_remove_memory() is needed by mm/memory_hotplug.c but undefined. Some build error messages like: LD vmlinux.o MODPOST vmlinux.symvers MODINFO modules.builtin.modinfo GEN modules.builtin LD .tmp_vmlinux.kallsyms1 loongarch64-linux-gnu-ld: mm/memory_hotplug.o: in function `.L242': memory_hotplug.c:(.ref.text+0x930): undefined reference to `arch_remove_memory' make: *** [Makefile:1169:vmlinux] 错误 1 Removed CONFIG_MEMORY_HOTREMOVE requirement and rearrange the file refer to the definitions of other platform architectures. Signed-off-by: Yupeng Li Signed-off-by: Caicai Signed-off-by: Huacai Chen arch/loongarch/mm/init.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit e0fba87c854347007fb9fc873e890b686cc61302 Author: Huacai Chen Date: Fri Sep 2 22:33:42 2022 +0800 LoongArch: Fix section mismatch due to acpi_os_ioremap() Now acpi_os_ioremap() is marked with __init because it calls memblock_ is_memory() which is also marked with __init in the !ARCH_KEEP_MEMBLOCK case. However, acpi_os_ioremap() is called by ordinary functions such as acpi_os_{read, write}_memory() and causes section mismatch warnings: WARNING: modpost: vmlinux.o: section mismatch in reference: acpi_os_read_memory (section: .text) -> acpi_os_ioremap (section: .init.text) WARNING: modpost: vmlinux.o: section mismatch in reference: acpi_os_write_memory (section: .text) -> acpi_os_ioremap (section: .init.text) Fix these warnings by selecting ARCH_KEEP_MEMBLOCK unconditionally and removing the __init modifier of acpi_os_ioremap(). This can also give a chance to track "memory" and "reserved" memblocks after early boot. Signed-off-by: Huacai Chen arch/loongarch/Kconfig | 1 + arch/loongarch/include/asm/acpi.h | 2 +- arch/loongarch/kernel/acpi.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) commit ad6846196ab62287e3ba094bb52647132f1998cd Author: Huacai Chen Date: Wed Aug 31 14:22:43 2022 +0800 LoongArch: Improve dump_tlb() output messages 1, Use nr/nx to replace ri/xi; 2, Add 0x prefix for hexadecimal data. Signed-off-by: Huacai Chen arch/loongarch/lib/dump_tlb.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 0163005374598721e68b1f7dd84b53ce34b71889 Author: Huacai Chen Date: Wed Aug 31 11:19:27 2022 +0800 LoongArch: Adjust arch_do_signal_or_restart() to adapt generic entry Commit 8ba62d37949e248c69 ("task_work: Call tracehook_notify_signal from get_signal on all architectures") adjust arch_do_signal_or_restart() for all architectures. LoongArch hasn't been upstream yet at that time and can be still built successfully without adjustment because this function has a weak version with the correct prototype. It is obviously that we should convert LoongArch to use new API, otherwise some signal handlings will be lost. Signed-off-by: Huacai Chen arch/loongarch/kernel/signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1429cfde90dc9c84789884d58ecd3bc2cad3dc9f Author: Ard Biesheuvel Date: Wed Aug 24 17:31:10 2022 +0200 LoongArch: Avoid orphan input sections Ensure that all input sections are listed explicitly in the linker script, and issue a warning otherwise. This ensures that the binary image matches the PE/COFF and other image metadata exactly, which is important for things like code signing. Signed-off-by: Ard Biesheuvel Signed-off-by: Huacai Chen arch/loongarch/Kconfig | 1 + arch/loongarch/kernel/vmlinux.lds.S | 2 ++ 2 files changed, 3 insertions(+) commit d9c0103b9cb0e26272ac4d9a5912ab79e408fa83 Merge: cf5c15d1e966 aa626da947e9 Author: David S. Miller Date: Sat Sep 3 10:46:24 2022 +0100 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2022-09-02 (i40e, iavf) This series contains updates to i40e and iavf drivers. Przemyslaw adds reset to ADQ configuration to allow for setting of rate limit beyond TC0 for i40e. Ivan Vecera does not free client on failure to open which could cause NULL pointer dereference to occur on i40e. He also detaches device during reset to prevent NDO calls with could cause races for iavf. ==================== Signed-off-by: David S. Miller commit cf5c15d1e966c2e0c93a19e05ec164d83639b1d7 Merge: 3015c5038474 59ac325557b6 Author: David S. Miller Date: Sat Sep 3 10:44:01 2022 +0100 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== This series contains updates to ice driver only. Przemyslaw fixes memory leak of DMA memory due to incorrect freeing of rx_buf. Michal S corrects incorrect call to free memory. ==================== Signed-off-by: David S. Miller commit 3015c50384743eb14d20c907a400e10225da033b Author: Oleksij Rempel Date: Fri Sep 2 11:27:37 2022 +0200 net: dsa: microchip: fix kernel oops on ksz8 switches After driver refactoring we was running ksz9477 specific CPU port configuration on ksz8 family which ended with kernel oops. So, make sure we run this code only on ksz9477 compatible devices. Tested on KSZ8873 and KSZ9477. Fixes: da8cd08520f3 ("net: dsa: microchip: add support for common phylink mac link up") Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz_common.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) commit c55f34b6aec2a8cb47eadaffea773e83bf85de91 Author: Paul Durrant Date: Thu Sep 1 12:55:54 2022 +0100 xen-netback: only remove 'hotplug-status' when the vif is actually destroyed Removing 'hotplug-status' in backend_disconnected() means that it will be removed even in the case that the frontend unilaterally disconnects (which it is free to do at any time). The consequence of this is that, when the frontend attempts to re-connect, the backend gets stuck in 'InitWait' rather than moving straight to 'Connected' (which it can do because the hotplug script has already run). Instead, the 'hotplug-status' mode should be removed in netback_remove() i.e. when the vif really is going away. Fixes: 0f4558ae9187 ("Revert "xen-netback: remove 'hotplug-status' once it has served its purpose"") Signed-off-by: Paul Durrant Signed-off-by: David S. Miller drivers/net/xen-netback/xenbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c749b275056d4d1023af125b320c91a24d6856b8 Author: Greg Kroah-Hartman Date: Sat Sep 3 08:05:08 2022 +0200 Revert "arch_topology: Make cluster topology span at least SMT CPUs" This reverts commit 6b66ca0bac1b9cee7608d7c4dc59b699458b4cb8 as it breaks the build on some arches as reported by the kernel test robot. Link: https://lore.kernel.org/r/202209030824.SouwDV5M-lkp@intel.com Reported-by: kernel test robot Fixes: 6b66ca0bac1b ("arch_topology: Make cluster topology span at least SMT CPUs") Cc: Sudeep Holla Cc: Vincent Guittot Cc: Ionela Voinescu Cc: Yicong Yang Signed-off-by: Greg Kroah-Hartman drivers/base/arch_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b353b241f1eb9b6265358ffbe2632fdcb563354f Author: Csókás Bence Date: Thu Sep 1 16:04:03 2022 +0200 net: fec: Use a spinlock to guard `fep->ptp_clk_on` Mutexes cannot be taken in a non-preemptible context, causing a panic in `fec_ptp_save_state()`. Replacing `ptp_clk_mutex` by `tmreg_lock` fixes this. Fixes: 6a4d7234ae9a ("net: fec: ptp: avoid register access when ipg clock is disabled") Fixes: f79959220fa5 ("fec: Restart PPS after link state change") Reported-by: Marc Kleine-Budde Link: https://lore.kernel.org/all/20220827160922.642zlcd5foopozru@pengutronix.de/ Signed-off-by: Csókás Bence Tested-by: Francesco Dolcini # Toradex Apalis iMX6 Link: https://lore.kernel.org/r/20220901140402.64804-1-csokas.bence@prolan.hu Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/fec.h | 1 - drivers/net/ethernet/freescale/fec_main.c | 17 +++++++++-------- drivers/net/ethernet/freescale/fec_ptp.c | 28 ++++++++++------------------ 3 files changed, 19 insertions(+), 27 deletions(-) commit 7d650df99d528f674cc744719a00a20be1f912f8 Author: Wei Fang Date: Tue Aug 30 15:01:48 2022 +0800 net: fec: add pm_qos support on imx6q platform There is a very low probability that tx timeout will occur during suspend and resume stress test on imx6q platform. So we add pm_qos support to prevent system from entering low level idles which may affect the transmission of tx. Signed-off-by: Wei Fang Link: https://lore.kernel.org/r/20220830070148.2021947-1-wei.fang@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/fec.h | 5 +++++ drivers/net/ethernet/freescale/fec_main.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit 05a5474efe93054893f1a7936398381e23ecea60 Merge: e7506d344bf1 0efe125cfb99 Author: Jakub Kicinski Date: Fri Sep 2 19:38:25 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Florian Westphal says: ==================== netfilter: bug fixes for net 1. Fix IP address check in irc DCC conntrack helper, this should check the opposite direction rather than the destination address of the packets' direction, from David Leadbeater. 2. bridge netfilter needs to drop dst references, from Harsh Modi. This was fine back in the day the code was originally written, but nowadays various tunnels can pre-set metadata dsts on packets. 3. Remove nf_conntrack_helper sysctl and the modparam toggle, users need to explicitily assign the helpers to use via nftables or iptables. Conntrack helpers, by design, may be used to add dynamic port redirections to internal machines, so its necessary to restrict which hosts/peers are allowed to use them. It was discovered that improper checking in the irc DCC helper makes it possible to trigger the 'please do dynamic port forward' from outside by embedding a 'DCC' in a PING request; if the client echos that back a expectation/port forward gets added. The auto-assign-for-everything mechanism has been in "please don't do this" territory since 2012. From Pablo. 4. Fix a memory leak in the netdev hook error unwind path, also from Pablo. * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_conntrack_irc: Fix forged IP logic netfilter: nf_tables: clean up hook list when offload flags check fails netfilter: br_netfilter: Drop dst references before setting. netfilter: remove nf_conntrack_helper sysctl and modparam toggles ==================== Link: https://lore.kernel.org/r/20220901071238.3044-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit d895ec7938c431fe61a731939da76a6461bc6133 Merge: cec53f4c8df0 7a3d2225f1ae Author: Linus Torvalds Date: Fri Sep 2 16:44:30 2022 -0700 Merge tag 'block-6.0-2022-09-02' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - NVMe pull request via Christoph: - error handling fix for the new auth code (Hannes Reinecke) - fix unhandled tcp states in nvmet_tcp_state_change (Maurizio Lombardi) - add NVME_QUIRK_BOGUS_NID for Lexar NM610 (Shyamin Ayesh) - Add documentation for the ublk driver merged in this merge window (Ming) * tag 'block-6.0-2022-09-02' of git://git.kernel.dk/linux-block: Documentation: document ublk nvmet-tcp: fix unhandled tcp states in nvmet_tcp_state_change() nvmet-auth: add missing goto in nvmet_setup_auth() nvme-pci: add NVME_QUIRK_BOGUS_NID for Lexar NM610 commit cec53f4c8df0b3f45796127a31c10b86ec125f55 Merge: 1551f8f21e00 916d72c10a4c Author: Linus Torvalds Date: Fri Sep 2 16:37:01 2022 -0700 Merge tag 'io_uring-6.0-2022-09-02' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: - A single fix for over-eager retries for networking (Pavel) - Revert the notification slot support for zerocopy sends. It turns out that even after more than a year or development and testing, there's not full agreement on whether just using plain ordered notifications is Good Enough to avoid the complexity of using the notifications slots. Because of that, we decided that it's best left to a future final decision. We can always bring back this feature, but we can't really change it or remove it once we've released 6.0 with it enabled. The reverts leave the usual CQE notifications as the primary interface for knowing when data was sent, and when it was acked. (Pavel) * tag 'io_uring-6.0-2022-09-02' of git://git.kernel.dk/linux-block: selftests/net: return back io_uring zc send tests io_uring/net: simplify zerocopy send user API io_uring/notif: remove notif registration Revert "io_uring: rename IORING_OP_FILES_UPDATE" Revert "io_uring: add zc notification flush requests" selftests/net: temporarily disable io_uring zc test io_uring/net: fix overexcessive retries commit 1551f8f21e007e608fff00cf27caac8504283b43 Merge: 0c95f02269a1 27893dfc1285 Author: Linus Torvalds Date: Fri Sep 2 16:20:24 2022 -0700 Merge tag '6.0-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Five fixes, all also marked for stable: - fixes for collapse range and insert range (also fixes xfstest generic/031) - memory leak fix" * tag '6.0-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: fix small mempool leak in SMB2_negotiate() smb3: use filemap_write_and_wait_range instead of filemap_write_and_wait smb3: fix temporary data corruption in insert range smb3: fix temporary data corruption in collapse range smb3: Move the flush out of smb2_copychunk_range() into its callers commit 0c95f02269a1ef6c3fae4f46bbdd7a4578d44b8f Merge: b307e704574b 55e55920bbe3 Author: Linus Torvalds Date: Fri Sep 2 15:24:08 2022 -0700 Merge tag 'landlock-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux Pull landlock fix from Mickaël Salaün: "This fixes a mis-handling of the LANDLOCK_ACCESS_FS_REFER right when multiple rulesets/domains are stacked. The expected behaviour was that an additional ruleset can only restrict the set of permitted operations, but in this particular case, it was potentially possible to re-gain the LANDLOCK_ACCESS_FS_REFER right" * tag 'landlock-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux: landlock: Fix file reparenting without explicit LANDLOCK_ACCESS_FS_REFER commit b307e704574bd4187d4f46212e7ea8189b53f9ab Merge: 1e8e515edd6d 63f1560930e4 Author: Linus Torvalds Date: Fri Sep 2 15:03:12 2022 -0700 Merge tag 'mmc-v6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: - Fix workaround for SD UHS-I voltage switch * tag 'mmc-v6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: core: Fix inconsistent sd3_bus_mode at UHS-I SD voltage switch failure mmc: core: Fix UHS-I SD 1.8V workaround branch commit 1e8e515edd6dbe15b86003d846fee005c12c0685 Merge: 0b3acd1cc022 bfe632f6d0a1 Author: Linus Torvalds Date: Fri Sep 2 14:56:09 2022 -0700 Merge tag 'drm-fixes-2022-09-02' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regular fixes pull. One core dma-buf fix, then two weeks of i915 fixes, a lot of amdgpu fixes mostly for new IP, and a bunch of msm fixes, mostly modesetting ones. Nothing seems too bad at this point. dma-buf/dma-resv: - Fence-handling fix i915: - GVT fixes including fix for a CommetLake regression in mmio table and misc doc and typo fixes - Fix CCS handling - Fix for guc requests after reset - Display DSI related fixes - Display backlight related fixes - Fix for a null pointer dereference - HDMI related quirk for ECS Liva Q2 with GLK graphics - Skip wm/ddb readout for disabled pipes amdgpu: - FRU error message fix - MES 11 updates - DCN 3.2.x fixes - DCN 3.1.4 fixes - Fix possible use after free in CS IOCTL - SMU 13.0.x fixes - Fix iolink reporting on devices with direct connections to CPU - GFX10 tap delay firmware fixes msm: - Fix for inconsistent indenting in msm_dsi_dphy_timing_calc_v3(). - Fix to make eDP the first connector in the connected list. - Fix to populate intf_cfg correctly before calling reset_intf_cfg(). - Specify the correct number of DSI regulators for SDM660. - Specify the correct number of DSI regulators for MSM8996. - Fix for removing DP_RECOVERED_CLOCK_OUT_EN bit for tps4 link training - Fix probe-deferral crash in gpu devfreq - Fix gpu debugfs deadlock" * tag 'drm-fixes-2022-09-02' of git://anongit.freedesktop.org/drm/drm: (51 commits) drm/amd/amdgpu: skip ucode loading if ucode_size == 0 drm/amdgpu: only init tap_delay ucode when it's included in ucode binary drm/amd/display: Fix black flash when switching from ODM2to1 to ODMBypass drm/amd/display: Fix check for stream and plane drm/amd/display: Re-initialize viewport after pipe merge drm/amd/display: Use correct plane for CAB cursor size allocation drm/amdgpu: ensure no PCIe peer access for CPU XGMI iolinks drm/amd/pm: bump SMU 13.0.0 driver_if header version drm/amd/pm: use vbios carried pptable for all SMU13.0.7 SKUs drm/amd/pm: use vbios carried pptable for those supported SKUs drm/amd/display: fix wrong register access drm/amd/display: use actual cursor size instead of max for CAB allocation drm/amd/display: disable display fresh from MALL on an edge case for DCN321 drm/amd/display: Fix CAB cursor size allocation for DCN32/321 drm/amd/display: Missing HPO instance added drm/amd/display: set dig fifo read start level to 7 before dig fifo reset drm/amdgpu: Fix use-after-free in amdgpu_cs_ioctl drm/amd/display: Fix OTG H timing reset for dcn314 drm/amd/display: Fix DCN32 DPSTREAMCLK_CNTL programming drm/amdgpu: Update mes_v11_api_def.h ... commit be318363daa2939453b4d80981de3e9c28b66135 Author: Luiz Augusto von Dentz Date: Thu Sep 1 17:24:13 2022 -0700 Bluetooth: hci_sync: Fix hci_read_buffer_size_sync hci_read_buffer_size_sync shall not use HCI_OP_LE_READ_BUFFER_SIZE_V2 sinze that is LE specific, instead it is hci_le_read_buffer_size_sync version that shall use it. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216382 Fixes: 26afbd826ee3 ("Bluetooth: Add initial implementation of CIS connections") Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_sync.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit aa626da947e9cd30c4cf727493903e1adbb2c0a0 Author: Ivan Vecera Date: Tue Aug 30 10:16:27 2022 +0200 iavf: Detach device during reset task iavf_reset_task() takes crit_lock at the beginning and holds it during whole call. The function subsequently calls iavf_init_interrupt_scheme() that grabs RTNL. Problem occurs when userspace initiates during the reset task any ndo callback that runs under RTNL like iavf_open() because some of that functions tries to take crit_lock. This leads to classic A-B B-A deadlock scenario. To resolve this situation the device should be detached in iavf_reset_task() prior taking crit_lock to avoid subsequent ndos running under RTNL and reattach the device at the end. Fixes: 62fe2a865e6d ("i40evf: add missing rtnl_lock() around i40evf_set_interrupt_capability") Cc: Jacob Keller Cc: Patryk Piotrowski Cc: SlawomirX Laba Tested-by: Vitaly Grinberg Signed-off-by: Ivan Vecera Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf_main.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit fb8396aeda5872369a8ed6d2301e2c86e303c520 Author: Ivan Vecera Date: Tue Aug 16 18:22:30 2022 +0200 i40e: Fix kernel crash during module removal The driver incorrectly frees client instance and subsequent i40e module removal leads to kernel crash. Reproducer: 1. Do ethtool offline test followed immediately by another one host# ethtool -t eth0 offline; ethtool -t eth0 offline 2. Remove recursively irdma module that also removes i40e module host# modprobe -r irdma Result: [ 8675.035651] i40e 0000:3d:00.0 eno1: offline testing starting [ 8675.193774] i40e 0000:3d:00.0 eno1: testing finished [ 8675.201316] i40e 0000:3d:00.0 eno1: offline testing starting [ 8675.358921] i40e 0000:3d:00.0 eno1: testing finished [ 8675.496921] i40e 0000:3d:00.0: IRDMA hardware initialization FAILED init_state=2 status=-110 [ 8686.188955] i40e 0000:3d:00.1: i40e_ptp_stop: removed PHC on eno2 [ 8686.943890] i40e 0000:3d:00.1: Deleted LAN device PF1 bus=0x3d dev=0x00 func=0x01 [ 8686.952669] i40e 0000:3d:00.0: i40e_ptp_stop: removed PHC on eno1 [ 8687.761787] BUG: kernel NULL pointer dereference, address: 0000000000000030 [ 8687.768755] #PF: supervisor read access in kernel mode [ 8687.773895] #PF: error_code(0x0000) - not-present page [ 8687.779034] PGD 0 P4D 0 [ 8687.781575] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 8687.785935] CPU: 51 PID: 172891 Comm: rmmod Kdump: loaded Tainted: G W I 5.19.0+ #2 [ 8687.794800] Hardware name: Intel Corporation S2600WFD/S2600WFD, BIOS SE5C620.86B.0X.02.0001.051420190324 05/14/2019 [ 8687.805222] RIP: 0010:i40e_lan_del_device+0x13/0xb0 [i40e] [ 8687.810719] Code: d4 84 c0 0f 84 b8 25 01 00 e9 9c 25 01 00 41 bc f4 ff ff ff eb 91 90 0f 1f 44 00 00 41 54 55 53 48 8b 87 58 08 00 00 48 89 fb <48> 8b 68 30 48 89 ef e8 21 8a 0f d5 48 89 ef e8 a9 78 0f d5 48 8b [ 8687.829462] RSP: 0018:ffffa604072efce0 EFLAGS: 00010202 [ 8687.834689] RAX: 0000000000000000 RBX: ffff8f43833b2000 RCX: 0000000000000000 [ 8687.841821] RDX: 0000000000000000 RSI: ffff8f4b0545b298 RDI: ffff8f43833b2000 [ 8687.848955] RBP: ffff8f43833b2000 R08: 0000000000000001 R09: 0000000000000000 [ 8687.856086] R10: 0000000000000000 R11: 000ffffffffff000 R12: ffff8f43833b2ef0 [ 8687.863218] R13: ffff8f43833b2ef0 R14: ffff915103966000 R15: ffff8f43833b2008 [ 8687.870342] FS: 00007f79501c3740(0000) GS:ffff8f4adffc0000(0000) knlGS:0000000000000000 [ 8687.878427] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 8687.884174] CR2: 0000000000000030 CR3: 000000014276e004 CR4: 00000000007706e0 [ 8687.891306] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 8687.898441] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 8687.905572] PKRU: 55555554 [ 8687.908286] Call Trace: [ 8687.910737] [ 8687.912843] i40e_remove+0x2c0/0x330 [i40e] [ 8687.917040] pci_device_remove+0x33/0xa0 [ 8687.920962] device_release_driver_internal+0x1aa/0x230 [ 8687.926188] driver_detach+0x44/0x90 [ 8687.929770] bus_remove_driver+0x55/0xe0 [ 8687.933693] pci_unregister_driver+0x2a/0xb0 [ 8687.937967] i40e_exit_module+0xc/0xf48 [i40e] Two offline tests cause IRDMA driver failure (ETIMEDOUT) and this failure is indicated back to i40e_client_subtask() that calls i40e_client_del_instance() to free client instance referenced by pf->cinst and sets this pointer to NULL. During the module removal i40e_remove() calls i40e_lan_del_device() that dereferences pf->cinst that is NULL -> crash. Do not remove client instance when client open callbacks fails and just clear __I40E_CLIENT_INSTANCE_OPENED bit. The driver also needs to take care about this situation (when netdev is up and client is NOT opened) in i40e_notify_client_of_netdev_close() and calls client close callback only when __I40E_CLIENT_INSTANCE_OPENED is set. Fixes: 0ef2d5afb12d ("i40e: KISS the client interface") Signed-off-by: Ivan Vecera Tested-by: Helena Anna Dubel Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e_client.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 45bb006d3c924b1201ed43c87a96b437662dcaa8 Author: Przemyslaw Patynowski Date: Tue Aug 9 10:57:44 2022 +0200 i40e: Fix ADQ rate limiting for PF Fix HW rate limiting for ADQ. Fallback to kernel queue selection for ADQ, as it is network stack that decides which queue to use for transmit with ADQ configured. Reset PF after creation of VMDq2 VSIs required for ADQ, as to reprogram TX queue contexts in i40e_configure_tx_ring. Without this patch PF would limit TX rate only according to TC0. Fixes: a9ce82f744dc ("i40e: Enable 'channel' mode in mqprio for TC configs") Signed-off-by: Przemyslaw Patynowski Signed-off-by: Jan Sokolowski Tested-by: Bharathi Sreenivas Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +++ drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 0b3acd1cc0222953035d18176b1e4aa06624fd6e Merge: ffb384c269dc 789bba82f63c Author: Linus Torvalds Date: Fri Sep 2 10:55:23 2022 -0700 Merge tag 'driver-core-6.0-rc4' 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 some oft-reported problems in 6.0-rc1. They include: - a bunch of reverts to handle driver_deferred_probe_check_state() problems that were part of the 6.0-rc1 merge. - firmware_loader bugfixes now that the code is being properly tested and used by others - arch_topology fix - deferred driver probe bugfix to solve a long-suffering amba bus problem that many people have reported. All of these have been in linux-next for a while with no reported problems" * tag 'driver-core-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: firmware_loader: Fix memory leak in firmware upload firmware_loader: Fix use-after-free during unregister arch_topology: Silence early cacheinfo errors when non-existent driver core: Don't probe devices after bus_type.match() probe deferral Revert "iommu/of: Delete usage of driver_deferred_probe_check_state()" Revert "PM: domains: Delete usage of driver_deferred_probe_check_state()" Revert "net: mdio: Delete usage of driver_deferred_probe_check_state()" Revert "driver core: Delete driver_deferred_probe_check_state()" commit ffb384c269dce238c588e0e8e3a85c0ec098a904 Merge: fd59585c420d 0f022aaac9ff Author: Linus Torvalds Date: Fri Sep 2 10:50:08 2022 -0700 Merge tag 'char-misc-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small char/misc and other driver fixes for 6.0-rc4. Included in here are: - binder fixes for previous fixes, and a few more fixes uncovered by them. - iio driver fixes - soundwire driver fixes - fastrpc driver fixes for memory corruption on some hardware - peci driver fix - mhi driver fix All of these have been in linux-next with no reported problems" * tag 'char-misc-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: binder: fix alloc->vma_vm_mm null-ptr dereference misc: fastrpc: increase maximum session count misc: fastrpc: fix memory corruption on open misc: fastrpc: fix memory corruption on probe soundwire: qcom: fix device status array range bus: mhi: host: Fix up null pointer access in mhi_irq_handler soundwire: qcom: remove duplicate reset control get iio: light: cm32181: make cm32181_pm_ops static iio: ad7292: Prevent regulator double disable dt-bindings: iio: gyroscope: bosch,bmg160: correct number of pins iio: adc: mcp3911: use correct formula for AD conversion iio: adc: mcp3911: correct "microchip,device-addr" property Revert "binder_alloc: Add missing mmap_lock calls when using the VMA" binder_alloc: Add missing mmap_lock calls when using the VMA binder: fix UAF of ref->proc caused by race condition iio: light: cm3605: Fix an error handling path in cm3605_probe() iio: adc: mcp3911: make use of the sign bit peci: cpu: Fix use-after-free in adev_release() peci: aspeed: fix error check return value of platform_get_irq() commit fd59585c420df1fc2df33bea2ed925b3373fbae2 Merge: 1a2f6a3722a7 fe0a2ac7c627 Author: Linus Torvalds Date: Fri Sep 2 10:43:46 2022 -0700 Merge tag 'usb-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/Thunderbolt driver fixes from Greg KH: "Here are a lot of small USB and Thunderbolt driver fixes for 6.0-rc4 for reported problems. Included in here are: - new usb-serial driver ids - dwc3 driver bugfixes for reported problems with 6.0-rc1 - new device quirks, and reverts of some quirks that were incorrect - gadget driver bugfixes for reported problems - USB host controller bugfixes (xhci and others) - other small USB fixes, details in the shortlog - small thunderbolt driver fixes All of these have been in linux-next with no reported issues" * tag 'usb-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (51 commits) Revert "usb: gadget: udc-xilinx: replace memcpy with memcpy_toio" usb: storage: Add ASUS <0x0b05:0x1932> to IGNORE_UAS USB: serial: ch341: fix disabled rx timer on older devices USB: serial: ch341: fix lost character on LCR updates USB: serial: cp210x: add Decagon UCA device id Revert "usb: add quirks for Lenovo OneLink+ Dock" usb: cdns3: fix issue with rearming ISO OUT endpoint usb: cdns3: fix incorrect handling TRB_SMM flag for ISOC transfer usb: gadget: mass_storage: Fix cdrom data transfers on MAC-OS media: mceusb: Use new usb_control_msg_*() routines USB: core: Prevent nested device-reset calls USB: gadget: Fix obscure lockdep violation for udc_mutex usb: dwc2: fix wrong order of phy_power_on and phy_init usb: gadget: udc-xilinx: replace memcpy with memcpy_toio usb: typec: Remove retimers properly usb: dwc3: disable USB core PHY management usb: add quirks for Lenovo OneLink+ Dock USB: serial: option: add support for Cinterion MV32-WA/WB RmNet mode USB: serial: ftdi_sio: add Omron CS1W-CIF31 device id USB: serial: option: add Quectel EM060K modem ... commit 1a2f6a3722a7c127817af24efb309e5bf70afe36 Merge: cf3488fa25cd 647e82dbf851 Author: Linus Torvalds Date: Fri Sep 2 10:35:51 2022 -0700 Merge tag 'platform-drivers-x86-v6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: "Various small fixes and hardware-id additions" * tag 'platform-drivers-x86-v6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: p2sb: Fix UAF when caller uses resource name platform/x86: asus-wmi: Increase FAN_CURVE_BUF_LEN to 32 platform/mellanox: Remove redundant 'NULL' check platform/mellanox: Remove unnecessary code platform/mellanox: mlxreg-lc: Fix locking issue platform/mellanox: mlxreg-lc: Fix coverity warning platform/x86: acer-wmi: Acer Aspire One AOD270/Packard Bell Dot keymap fixes platform/x86: thinkpad_acpi: Explicitly set to balanced mode on startup platform/x86: asus-wmi: Fix the name of the mic-mute LED classdev platform/surface: aggregator_registry: Add HID devices for sensors and UCSI client to SP8 platform/surface: aggregator_registry: Rename HID device nodes based on new findings platform/surface: aggregator_registry: Rename HID device nodes based on their function platform/surface: aggregator_registry: Add support for Surface Laptop Go 2 platform/x86: x86-android-tablets: Fix broken touchscreen on Chuwi Hi8 with Windows BIOS platform/x86: pmc_atom: Fix SLP_TYPx bitfield mask commit cf3488fa25cdfdd220dcc927ca30ea7256b037e0 Merge: 42e66b1cc3a0 5fbc49cef919 Author: Linus Torvalds Date: Fri Sep 2 10:32:30 2022 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "It's a lot smaller than last week, with the star of the show being a couple of fixes to head.S addressing a boot regression introduced by the recent overhaul of that code in non-default configurations (i.e. KASLR disabled). The first of those two resolves the issue reported (and bisected) by Mikulus in the wait_on_bit() thread. Summary: - Fix two boot issues caused by the recent head.S rework when !KASLR - Fix calculation of crashkernel memory reservation - Fix bogus error check in PMU IRQ probing code" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mm: Reserve enough pages for the initial ID map perf/arm_pmu_platform: fix tests for platform_get_irq() failure arm64: head: Ignore bogus KASLR displacement on non-relocatable kernels arm64/kexec: Fix missing extra range for crashkres_low. commit f0c86a2bae4fd12bfa8bad4d43fb59fb498cdd14 Author: Zhengjun Xing Date: Fri Aug 26 22:00:57 2022 +0800 perf stat: Fix L2 Topdown metrics disappear for raw events In perf/Documentation/perf-stat.txt, for "--td-level" the default "0" means the max level that the current hardware support. So we need initialize the stat_config.topdown_level to TOPDOWN_MAX_LEVEL when “--td-level=0” or no “--td-level” option. Otherwise, for the hardware with a max level is 2, the 2nd level metrics disappear for raw events in this case. The issue cannot be observed for the perf stat default or "--topdown" options. This commit fixes the raw events issue and removes the duplicated code for the perf stat default. Before: # ./perf stat -e "cpu-clock,context-switches,cpu-migrations,page-faults,instructions,cycles,ref-cycles,branches,branch-misses,{slots,topdown-retiring,topdown-bad-spec,topdown-fe-bound,topdown-be-bound,topdown-heavy-ops,topdown-br-mispredict,topdown-fetch-lat,topdown-mem-bound}" sleep 1 Performance counter stats for 'sleep 1': 1.03 msec cpu-clock # 0.001 CPUs utilized 1 context-switches # 966.216 /sec 0 cpu-migrations # 0.000 /sec 60 page-faults # 57.973 K/sec 1,132,112 instructions # 1.41 insn per cycle 803,872 cycles # 0.777 GHz 1,909,120 ref-cycles # 1.845 G/sec 236,634 branches # 228.640 M/sec 6,367 branch-misses # 2.69% of all branches 4,823,232 slots # 4.660 G/sec 1,210,536 topdown-retiring # 25.1% Retiring 699,841 topdown-bad-spec # 14.5% Bad Speculation 1,777,975 topdown-fe-bound # 36.9% Frontend Bound 1,134,878 topdown-be-bound # 23.5% Backend Bound 189,146 topdown-heavy-ops # 182.756 M/sec 662,012 topdown-br-mispredict # 639.647 M/sec 1,097,048 topdown-fetch-lat # 1.060 G/sec 416,121 topdown-mem-bound # 402.063 M/sec 1.002423690 seconds time elapsed 0.002494000 seconds user 0.000000000 seconds sys After: # ./perf stat -e "cpu-clock,context-switches,cpu-migrations,page-faults,instructions,cycles,ref-cycles,branches,branch-misses,{slots,topdown-retiring,topdown-bad-spec,topdown-fe-bound,topdown-be-bound,topdown-heavy-ops,topdown-br-mispredict,topdown-fetch-lat,topdown-mem-bound}" sleep 1 Performance counter stats for 'sleep 1': 1.13 msec cpu-clock # 0.001 CPUs utilized 1 context-switches # 882.128 /sec 0 cpu-migrations # 0.000 /sec 61 page-faults # 53.810 K/sec 1,137,612 instructions # 1.29 insn per cycle 881,477 cycles # 0.778 GHz 2,093,496 ref-cycles # 1.847 G/sec 236,356 branches # 208.496 M/sec 7,090 branch-misses # 3.00% of all branches 5,288,862 slots # 4.665 G/sec 1,223,697 topdown-retiring # 23.1% Retiring 767,403 topdown-bad-spec # 14.5% Bad Speculation 2,053,322 topdown-fe-bound # 38.8% Frontend Bound 1,244,438 topdown-be-bound # 23.5% Backend Bound 186,665 topdown-heavy-ops # 3.5% Heavy Operations # 19.6% Light Operations 725,922 topdown-br-mispredict # 13.7% Branch Mispredict # 0.8% Machine Clears 1,327,400 topdown-fetch-lat # 25.1% Fetch Latency # 13.7% Fetch Bandwidth 497,775 topdown-mem-bound # 9.4% Memory Bound # 14.1% Core Bound 1.002701530 seconds time elapsed 0.002744000 seconds user 0.000000000 seconds sys Fixes: 63e39aa6ae103451 ("perf stat: Support L2 Topdown events") Reviewed-by: Kan Liang Signed-off-by: Xing Zhengjun Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220826140057.3289401-1-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7a3d2225f1ae9e591fefd65c3bb1715dc54d96f1 Author: Ming Lei Date: Fri Sep 2 23:23:02 2022 +0800 Documentation: document ublk Add documentation for ublk subsystem. It was supposed to be documented when merging the driver, but missing at that time. Cc: Bagas Sanjaya Cc: Jonathan Corbet Cc: Richard W.M. Jones Cc: Xiaoguang Wang Reviewed-by: Stefan Hajnoczi Reviewed-by: ZiyangZhang Signed-off-by: Ming Lei [axboe: correct MAINTAINERS addition] Signed-off-by: Jens Axboe Documentation/block/index.rst | 1 + Documentation/block/ublk.rst | 253 ++++++++++++++++++++++++++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 255 insertions(+) commit 59ac325557b6c14f1f793b90d3946bc145ffa085 Author: Michal Swiatkowski Date: Wed Aug 17 10:53:20 2022 +0200 ice: use bitmap_free instead of devm_kfree pf->avail_txqs was allocated using bitmap_zalloc, bitmap_free should be used to free this memory. Fixes: 78b5713ac1241 ("ice: Alloc queue management bitmaps and arrays dynamically") Signed-off-by: Michal Swiatkowski Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e753eb675f0523207b184558638ee2eed6c9ac2 Author: Przemyslaw Patynowski Date: Thu Aug 11 12:09:22 2022 +0200 ice: Fix DMA mappings leak Fix leak, when user changes ring parameters. During reallocation of RX buffers, new DMA mappings are created for those buffers. New buffers with different RX ring count should substitute older ones, but those buffers were freed in ice_vsi_cfg_rxq and reallocated again with ice_alloc_rx_buf. kfree on rx_buf caused leak of already mapped DMA. Reallocate ZC with xdp_buf struct, when BPF program loads. Reallocate back to rx_buf, when BPF program unloads. If BPF program is loaded/unloaded and XSK pools are created, reallocate RX queues accordingly in XDP_SETUP_XSK_POOL handler. Steps for reproduction: while : do for ((i=0; i<=8160; i=i+32)) do ethtool -G enp130s0f0 rx $i tx $i sleep 0.5 ethtool -g enp130s0f0 done done Fixes: 617f3e1b588c ("ice: xsk: allocate separate memory for XDP SW ring") Signed-off-by: Przemyslaw Patynowski Signed-off-by: Mateusz Palczewski Tested-by: Chandan (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_base.c | 17 --------- drivers/net/ethernet/intel/ice/ice_main.c | 8 ++++ drivers/net/ethernet/intel/ice/ice_xsk.c | 63 +++++++++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_xsk.h | 8 ++++ 4 files changed, 79 insertions(+), 17 deletions(-) commit c7943bb324e503baeeba3df2bc5ca8a377111bfa Author: Ville Syrjälä Date: Sat Aug 27 00:34:51 2022 +0300 drm/edid: Handle EDID 1.4 range descriptor h/vfreq offsets EDID 1.4 introduced some extra flags in the range descriptor to support min/max h/vfreq >= 255. Consult them to correctly parse the vfreq limits. Note that some combinations of the flags are documented as "reserved" (as are some other values in the descriptor) but explicitly checking for those doesn't seem particularly worthwile since we end up with bogus results whether we decode them or not. v2: Increase the storage to u16 to make it work (Jani) Note the "reserved" values situation (Jani) v3: Document the EDID version number in the defines Drop some bogus (u8) casts Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6519 References: https://gitlab.freedesktop.org/drm/intel/-/issues/6484 Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220826213501.31490-2-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare drivers/gpu/drm/drm_debugfs.c | 4 ++-- drivers/gpu/drm/drm_edid.c | 24 ++++++++++++++++++------ include/drm/drm_connector.h | 4 ++-- include/drm/drm_edid.h | 5 +++++ 4 files changed, 27 insertions(+), 10 deletions(-) commit 55e55920bbe3ccf516022c51f5527e7d026b8f1d Author: Mickaël Salaün Date: Wed Aug 31 22:38:40 2022 +0200 landlock: Fix file reparenting without explicit LANDLOCK_ACCESS_FS_REFER This change fixes a mis-handling of the LANDLOCK_ACCESS_FS_REFER right when multiple rulesets/domains are stacked. The expected behaviour was that an additional ruleset can only restrict the set of permitted operations, but in this particular case, it was potentially possible to re-gain the LANDLOCK_ACCESS_FS_REFER right. With the introduction of LANDLOCK_ACCESS_FS_REFER, we added the first globally denied-by-default access right. Indeed, this lifted an initial Landlock limitation to rename and link files, which was initially always denied when the source or the destination were different directories. This led to an inconsistent backward compatibility behavior which was only taken into account if no domain layer were using the new LANDLOCK_ACCESS_FS_REFER right. However, when restricting a thread with a new ruleset handling LANDLOCK_ACCESS_FS_REFER, all inherited parent rulesets/layers not explicitly handling LANDLOCK_ACCESS_FS_REFER would behave as if they were handling this access right and with all their rules allowing it. This means that renaming and linking files could became allowed by these parent layers, but all the other required accesses must also be granted: all layers must allow file removal or creation, and renaming and linking operations cannot lead to privilege escalation according to the Landlock policy. See detailed explanation in commit b91c3e4ea756 ("landlock: Add support for file reparenting with LANDLOCK_ACCESS_FS_REFER"). To say it another way, this bug may lift the renaming and linking limitations of the initial Landlock version, and a same ruleset can enforce different restrictions depending on previous or next enforced ruleset (i.e. inconsistent behavior). The LANDLOCK_ACCESS_FS_REFER right cannot give access to data not already allowed, but this doesn't follow the contract of the first Landlock ABI. This fix puts back the limitation for sandboxes that didn't opt-in for this additional right. For instance, if a first ruleset allows LANDLOCK_ACCESS_FS_MAKE_REG on /dst and LANDLOCK_ACCESS_FS_REMOVE_FILE on /src, renaming /src/file to /dst/file is denied. However, without this fix, stacking a new ruleset which allows LANDLOCK_ACCESS_FS_REFER on / would now permit the sandboxed thread to rename /src/file to /dst/file . This change fixes the (absolute) rule access rights, which now always forbid LANDLOCK_ACCESS_FS_REFER except when it is explicitly allowed when creating a rule. Making all domain handle LANDLOCK_ACCESS_FS_REFER was an initial approach but there is two downsides: * it makes the code more complex because we still want to check that a rule allowing LANDLOCK_ACCESS_FS_REFER is legitimate according to the ruleset's handled access rights (i.e. ABI v1 != ABI v2); * it would not allow to identify if the user created a ruleset explicitly handling LANDLOCK_ACCESS_FS_REFER or not, which will be an issue to audit Landlock. Instead, this change adds an ACCESS_INITIALLY_DENIED list of denied-by-default rights, which (only) contains LANDLOCK_ACCESS_FS_REFER. All domains are treated as if they are also handling this list, but without modifying their fs_access_masks field. A side effect is that the errno code returned by rename(2) or link(2) *may* be changed from EXDEV to EACCES according to the enforced restrictions. Indeed, we now have the mechanic to identify if an access is denied because of a required right (e.g. LANDLOCK_ACCESS_FS_MAKE_REG, LANDLOCK_ACCESS_FS_REMOVE_FILE) or if it is denied because of missing LANDLOCK_ACCESS_FS_REFER rights. This may result in different errno codes than for the initial Landlock version, but this approach is more consistent and better for rename/link compatibility reasons, and it wasn't possible before (hence no backport to ABI v1). The layout1.rename_file test reflects this change. Add 4 layout1.refer_denied_by_default* test suites to check that the behavior of a ruleset not handling LANDLOCK_ACCESS_FS_REFER (ABI v1) is unchanged even if another layer handles LANDLOCK_ACCESS_FS_REFER (i.e. ABI v1 precedence). Make sure rule's absolute access rights are correct by testing with and without a matching path. Add test_rename() and test_exchange() helpers. Extend layout1.inval tests to check that a denied-by-default access right is not necessarily part of a domain's handled access rights. Test coverage for security/landlock is 95.3% of 599 lines according to gcc/gcov-11. Fixes: b91c3e4ea756 ("landlock: Add support for file reparenting with LANDLOCK_ACCESS_FS_REFER") Reviewed-by: Paul Moore Reviewed-by: Günther Noack Link: https://lore.kernel.org/r/20220831203840.1370732-1-mic@digikod.net Cc: stable@vger.kernel.org [mic: Constify and slightly simplify test helpers] Signed-off-by: Mickaël Salaün security/landlock/fs.c | 48 ++++----- tools/testing/selftests/landlock/fs_test.c | 155 +++++++++++++++++++++++++++-- 2 files changed, 170 insertions(+), 33 deletions(-) commit 9c9c9da7aa108e6bf952c18289527a5234e4fc59 Author: David Jander Date: Thu Sep 1 14:36:30 2022 +0200 spi: spi: Fix queue hang if previous transfer failed The queue worker always needs to be kicked one final time after a transfer is done in order to transition to idle (ctlr->busy = false). Commit 69fa95905d40 ("spi: Ensure the io_mutex is held until spi_finalize_current_message()") moved this code into __spi_pump_messages(), but it was executed only if the transfer was successful. This condition check causes ctlr-busy to stay true in case of a failed transfer. This in turn causes that no new work is ever scheduled to the work queue. Fixes: 69fa95905d40 ("spi: Ensure the io_mutex is held until spi_finalize_current_message()") Reported-by: Vincent Whitchurch Signed-off-by: David Jander Link: https://lore.kernel.org/r/20220901123630.1098433-1-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b30f7c8eb0780e1479a9882526e838664271f4c9 Author: Mark Brown Date: Thu Sep 1 13:07:32 2022 +0100 spi: mux: Fix mux interaction with fast path optimisations The spi-mux driver is rather too clever and attempts to resubmit any message that is submitted to it to the parent controller with some adjusted callbacks. This does not play at all nicely with the fast path which now sets flags on the message indicating that it's being handled through the fast path, we see async messages flagged as being on the fast path. Ideally the spi-mux code would duplicate the message but that's rather invasive and a bit fragile in that it relies on the mux knowing which fields in the message to copy. Instead teach the core that there are controllers which can't cope with the fast path and have the mux flag itself as being such a controller, ensuring that messages going via the mux don't get partially handled via the fast path. This will reduce the performance of any spi-mux connected device since we'll now always use the thread for both the actual controller and the mux controller instead of just the actual controller but given that we were always hitting the slow path anyway it's hopefully not too much of an additional cost and it allows us to keep the fast path. Fixes: ae7d2346dc89 ("spi: Don't use the message queue if possible in spi_sync") Reported-by: Casper Andersson Tested-by: Casper Andersson Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220901120732.49245-1-broonie@kernel.org Signed-off-by: Mark Brown drivers/spi/spi-mux.c | 1 + drivers/spi/spi.c | 2 +- include/linux/spi/spi.h | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) commit e7506d344bf180096a86ec393515861fb5245915 Merge: 326140063946 21457f4a91cb Author: David S. Miller Date: Fri Sep 2 12:45:32 2022 +0100 Merge tag 'rxrpc-fixes-20220901' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc fixes Here are some fixes for AF_RXRPC: (1) Fix the handling of ICMP/ICMP6 packets. This is a problem due to rxrpc being switched to acting as a UDP tunnel, thereby allowing it to steal the packets before they go through the UDP Rx queue. UDP tunnels can't get ICMP/ICMP6 packets, however. This patch adds an additional encap hook so that they can. (2) Fix the encryption routines in rxkad to handle packets that have more than three parts correctly. The problem is that ->nr_frags doesn't count the initial fragment, so the sglist ends up too short. (3) Fix a problem with destruction of the local endpoint potentially getting repeated. (4) Fix the calculation of the time at which to resend. jiffies_to_usecs() gives microseconds, not nanoseconds. (5) Fix AFS to work out when callback promises and locks expire based on the time an op was issued rather than the time the first reply packet arrives. We don't know how long the server took between calculating the expiry interval and transmitting the reply. (6) Given (5), rxrpc_get_reply_time() is no longer used, so remove it. ==================== Signed-off-by: David S. Miller commit 3261400639463a853ba2b3be8bd009c2a8089775 Author: Eric Dumazet Date: Wed Aug 31 23:38:09 2022 +0000 tcp: TX zerocopy should not sense pfmemalloc status We got a recent syzbot report [1] showing a possible misuse of pfmemalloc page status in TCP zerocopy paths. Indeed, for pages coming from user space or other layers, using page_is_pfmemalloc() is moot, and possibly could give false positives. There has been attempts to make page_is_pfmemalloc() more robust, but not using it in the first place in this context is probably better, removing cpu cycles. Note to stable teams : You need to backport 84ce071e38a6 ("net: introduce __skb_fill_page_desc_noacc") as a prereq. Race is more probable after commit c07aea3ef4d4 ("mm: add a signature in struct page") because page_is_pfmemalloc() is now using low order bit from page->lru.next, which can change more often than page->index. Low order bit should never be set for lru.next (when used as an anchor in LRU list), so KCSAN report is mostly a false positive. Backporting to older kernel versions seems not necessary. [1] BUG: KCSAN: data-race in lru_add_fn / tcp_build_frag write to 0xffffea0004a1d2c8 of 8 bytes by task 18600 on cpu 0: __list_add include/linux/list.h:73 [inline] list_add include/linux/list.h:88 [inline] lruvec_add_folio include/linux/mm_inline.h:105 [inline] lru_add_fn+0x440/0x520 mm/swap.c:228 folio_batch_move_lru+0x1e1/0x2a0 mm/swap.c:246 folio_batch_add_and_move mm/swap.c:263 [inline] folio_add_lru+0xf1/0x140 mm/swap.c:490 filemap_add_folio+0xf8/0x150 mm/filemap.c:948 __filemap_get_folio+0x510/0x6d0 mm/filemap.c:1981 pagecache_get_page+0x26/0x190 mm/folio-compat.c:104 grab_cache_page_write_begin+0x2a/0x30 mm/folio-compat.c:116 ext4_da_write_begin+0x2dd/0x5f0 fs/ext4/inode.c:2988 generic_perform_write+0x1d4/0x3f0 mm/filemap.c:3738 ext4_buffered_write_iter+0x235/0x3e0 fs/ext4/file.c:270 ext4_file_write_iter+0x2e3/0x1210 call_write_iter include/linux/fs.h:2187 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x468/0x760 fs/read_write.c:578 ksys_write+0xe8/0x1a0 fs/read_write.c:631 __do_sys_write fs/read_write.c:643 [inline] __se_sys_write fs/read_write.c:640 [inline] __x64_sys_write+0x3e/0x50 fs/read_write.c:640 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffffea0004a1d2c8 of 8 bytes by task 18611 on cpu 1: page_is_pfmemalloc include/linux/mm.h:1740 [inline] __skb_fill_page_desc include/linux/skbuff.h:2422 [inline] skb_fill_page_desc include/linux/skbuff.h:2443 [inline] tcp_build_frag+0x613/0xb20 net/ipv4/tcp.c:1018 do_tcp_sendpages+0x3e8/0xaf0 net/ipv4/tcp.c:1075 tcp_sendpage_locked net/ipv4/tcp.c:1140 [inline] tcp_sendpage+0x89/0xb0 net/ipv4/tcp.c:1150 inet_sendpage+0x7f/0xc0 net/ipv4/af_inet.c:833 kernel_sendpage+0x184/0x300 net/socket.c:3561 sock_sendpage+0x5a/0x70 net/socket.c:1054 pipe_to_sendpage+0x128/0x160 fs/splice.c:361 splice_from_pipe_feed fs/splice.c:415 [inline] __splice_from_pipe+0x222/0x4d0 fs/splice.c:559 splice_from_pipe fs/splice.c:594 [inline] generic_splice_sendpage+0x89/0xc0 fs/splice.c:743 do_splice_from fs/splice.c:764 [inline] direct_splice_actor+0x80/0xa0 fs/splice.c:931 splice_direct_to_actor+0x305/0x620 fs/splice.c:886 do_splice_direct+0xfb/0x180 fs/splice.c:974 do_sendfile+0x3bf/0x910 fs/read_write.c:1249 __do_sys_sendfile64 fs/read_write.c:1317 [inline] __se_sys_sendfile64 fs/read_write.c:1303 [inline] __x64_sys_sendfile64+0x10c/0x150 fs/read_write.c:1303 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x0000000000000000 -> 0xffffea0004a1d288 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 18611 Comm: syz-executor.4 Not tainted 6.0.0-rc2-syzkaller-00248-ge022620b5d05-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 Fixes: c07aea3ef4d4 ("mm: add a signature in struct page") Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: Shakeel Butt Reviewed-by: Shakeel Butt Signed-off-by: David S. Miller include/linux/skbuff.h | 21 +++++++++++++++++++++ net/core/datagram.c | 2 +- net/ipv4/tcp.c | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) commit e2b224abd9bf45dcb55750479fc35970725a430b Author: Dan Carpenter Date: Wed Aug 31 17:47:56 2022 +0300 tipc: fix shift wrapping bug in map_get() There is a shift wrapping bug in this code so anything thing above 31 will return false. Fixes: 35c55c9877f8 ("tipc: add neighbor monitoring framework") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller net/tipc/monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9efd23297cca530bb35e1848665805d3fcdd7889 Author: Toke Høiland-Jørgensen Date: Wed Aug 31 23:52:18 2022 +0200 sch_sfb: Don't assume the skb is still around after enqueueing to child The sch_sfb enqueue() routine assumes the skb is still alive after it has been enqueued into a child qdisc, using the data in the skb cb field in the increment_qlen() routine after enqueue. However, the skb may in fact have been freed, causing a use-after-free in this case. In particular, this happens if sch_cake is used as a child of sfb, and the GSO splitting mode of CAKE is enabled (in which case the skb will be split into segments and the original skb freed). Fix this by copying the sfb cb data to the stack before enqueueing the skb, and using this stack copy in increment_qlen() instead of the skb pointer itself. Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-18231 Fixes: e13e02a3c68d ("net_sched: SFB flow scheduler") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller net/sched/sch_sfb.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 12f09234bde51810b3f7412b2b5c84af4c07cfb1 Merge: 194bebfea5a4 ab2866f12ca1 Author: Arnd Bergmann Date: Fri Sep 2 12:05:27 2022 +0200 Merge tag 'renesas-fixes-for-v6.0-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/fixes Renesas fixes for v6.0 - Fix the serial console on the Renesas White Hawk development board. * tag 'renesas-fixes-for-v6.0-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: r8a779g0: Fix HSCIF0 interrupt number Link: https://lore.kernel.org/r/ab2866f12ca18747413ba41409231d44e0c6149b.1662111547.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 194bebfea5a4e4fddc4c9128ee0a81f0ec4d2e10 Merge: 9a472613f5bc 3d074b750d2b Author: Arnd Bergmann Date: Fri Sep 2 11:29:03 2022 +0200 Merge tag 'at91-fixes-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/fixes AT91 fixes for 6.0 It contains: - fixes for self-refresh on SAMA7G5 while in AT91 power management modes: one disabling a DDR PHY controller DLL which has been proved to be buggy and can introduce glitches that can cause unexpected behavior; one fixing the DDR PHY recalibration which cannot work for all possible cases (due to hardware bug) while using backup and self-refresh AT91 power management mode; - one defconfig fix to remove CONFIG_MICROCHIP_PIT64B from all AT91 defconfigs; - multiple device tree fixes for regulators to avoid having some of them enabled all the time and to describe min and max output ranges according to board capabilities. * tag 'at91-fixes-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sama5d2_icp: don't keep vdd_other enabled all the time ARM: dts: at91: sama5d27_wlsom1: don't keep ldo2 enabled all the time ARM: dts: at91: sama7g5ek: specify proper regulator output ranges ARM: dts: at91: sama5d2_icp: specify proper regulator output ranges ARM: dts: at91: sama5d27_wlsom1: specify proper regulator output ranges ARM: at91: pm: fix DDR recalibration when resuming from backup and self-refresh ARM: at91: pm: fix self-refresh for sama7g5 ARM: configs: at91: remove CONFIG_MICROCHIP_PIT64B Link: https://lore.kernel.org/r/20220902085744.4193554-1-claudiu.beznea@microchip.com Signed-off-by: Arnd Bergmann commit 9a472613f5bccf1b36837423495ae592a9c5182f Author: Mathew McBride Date: Thu Sep 1 05:21:49 2022 +0000 soc: fsl: select FSL_GUTS driver for DPIO The soc/fsl/dpio driver will perform a soc_device_match() to determine the optimal cache settings for a given CPU core. If FSL_GUTS is not enabled, this search will fail and the driver will not configure cache stashing for the given DPIO, and a string of "unknown SoC" messages will appear: fsl_mc_dpio dpio.7: unknown SoC version fsl_mc_dpio dpio.6: unknown SoC version fsl_mc_dpio dpio.5: unknown SoC version Fixes: 51da14e96e9b ("soc: fsl: dpio: configure cache stashing destination") Signed-off-by: Mathew McBride Reviewed-by: Ioana Ciornei Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220901052149.23873-2-matt@traverse.com.au' Signed-off-by: Arnd Bergmann drivers/soc/fsl/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 49f6d09bd0461ca1ef4042ceeb6cbf6268e69038 Merge: 06f0696444c7 1085f5080647 Author: Arnd Bergmann Date: Fri Sep 2 11:27:27 2022 +0200 Merge tag 'arm-soc/for-6.0/drivers-fixes' of https://github.com/Broadcom/stblinux into arm/fixes This pull request contains Broadcom SoCs driver fixes for 6.0, please pull the following: - Liang fixes the legacy Broadcom STB ARM system suspend/resume code error paths that were leaking ioremap() and other of_* operations * tag 'arm-soc/for-6.0/drivers-fixes' of https://github.com/Broadcom/stblinux: soc: brcmstb: pm-arm: Fix refcount leak and __iomem leak bugs Link: https://lore.kernel.org/r/20220829225103.753223-2-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 06f0696444c710f5b3a0b4326227727782fbb49c Merge: 92c7c5b0f958 f75fccbdc84f Author: Arnd Bergmann Date: Fri Sep 2 11:26:49 2022 +0200 Merge tag 'arm-soc/for-6.0/devicetree' of https://github.com/Broadcom/stblinux into arm/fixes This pull request contains Broadcom ARM-based SoCs Device Tree fixes for 6.0, please pull the following: - William fixes a number of the recently submitted DTS files for 63178, 6846, 6878 to have correct PSCI node propertie as well as correct timer CPU masks * tag 'arm-soc/for-6.0/devicetree' of https://github.com/Broadcom/stblinux: ARM: dts: bcmbca: bcm6878: cosmetic change ARM: dts: bcmbca: bcm6878: fix timer node cpu mask flag ARM: dts: bcmbca: bcm6846: fix interrupt controller node ARM: dts: bcmbca: bcm6846: clean up psci node ARM: dts: bcmbca: bcm6846: fix timer node cpu mask flag ARM: dts: bcmbca: bcm63178: cosmetic change ARM: dts: bcmbca: bcm63178: fix interrupt controller node ARM: dts: bcmbca: bcm63178: clean up psci node ARM: dts: bcmbca: bcm63178: fix timer node cpu mask flag Link: https://lore.kernel.org/r/20220829225103.753223-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 92c7c5b0f9588c0cbc929b7a296b176c7c17a162 Merge: 251e5d715e4b 422ab8fe15e3 Author: Arnd Bergmann Date: Fri Sep 2 11:19:27 2022 +0200 Merge tag 'juno-fixes-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes Armv8 Juno fixes for v6.0 Couple of fixes to add missing MHU secure-irq and remove the legacy coresight 'slave-mode' property. * tag 'juno-fixes-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: juno: Add missing MHU secure-irq arm64: dts: arm: juno: Remove legacy Coresight 'slave-mode' property Link: https://lore.kernel.org/r/20220829174420.207880-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit e9ea0b30ada008f4e65933f449db6894832cb242 Author: Dan Carpenter Date: Thu Sep 1 18:35:20 2022 +0300 xen/grants: prevent integer overflow in gnttab_dma_alloc_pages() The change from kcalloc() to kvmalloc() means that arg->nr_pages might now be large enough that the "args->nr_pages << PAGE_SHIFT" can result in an integer overflow. Fixes: b3f7931f5c61 ("xen/gntdev: switch from kcalloc() to kvcalloc()") Signed-off-by: Dan Carpenter Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/YxDROJqu/RPvR0bi@kili Signed-off-by: Juergen Gross drivers/xen/grant-table.c | 3 +++ 1 file changed, 3 insertions(+) commit fe8f65b018effbf473f53af3538d0c1878b8b329 Author: SeongJae Park Date: Wed Aug 31 16:58:24 2022 +0000 xen-blkfront: Cache feature_persistent value before advertisement Xen blkfront advertises its support of the persistent grants feature when it first setting up and when resuming in 'talk_to_blkback()'. Then, blkback reads the advertised value when it connects with blkfront and decides if it will use the persistent grants feature or not, and advertises its decision to blkfront. Blkfront reads the blkback's decision and it also makes the decision for the use of the feature. Commit 402c43ea6b34 ("xen-blkfront: Apply 'feature_persistent' parameter when connect"), however, made the blkfront's read of the parameter for disabling the advertisement, namely 'feature_persistent', to be done when it negotiate, not when advertise. Therefore blkfront advertises without reading the parameter. As the field for caching the parameter value is zero-initialized, it always advertises as the feature is disabled, so that the persistent grants feature becomes always disabled. This commit fixes the issue by making the blkfront does parmeter caching just before the advertisement. Fixes: 402c43ea6b34 ("xen-blkfront: Apply 'feature_persistent' parameter when connect") Cc: # 5.10.x Reported-by: Marek Marczykowski-Górecki Signed-off-by: SeongJae Park Tested-by: Marek Marczykowski-Górecki Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20220831165824.94815-4-sj@kernel.org Signed-off-by: Juergen Gross drivers/block/xen-blkfront.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 9f5e0fe5d05f7e8de7f39b2b10089834eb0ff787 Author: SeongJae Park Date: Wed Aug 31 16:58:23 2022 +0000 xen-blkfront: Advertise feature-persistent as user requested The advertisement of the persistent grants feature (writing 'feature-persistent' to xenbus) should mean not the decision for using the feature but only the availability of the feature. However, commit 74a852479c68 ("xen-blkfront: add a parameter for disabling of persistent grants") made a field of blkfront, which was a place for saving only the negotiation result, to be used for yet another purpose: caching of the 'feature_persistent' parameter value. As a result, the advertisement, which should follow only the parameter value, becomes inconsistent. This commit fixes the misuse of the semantic by making blkfront saves the parameter value in a separate place and advertises the support based on only the saved value. Fixes: 74a852479c68 ("xen-blkfront: add a parameter for disabling of persistent grants") Cc: # 5.10.x Suggested-by: Juergen Gross Signed-off-by: SeongJae Park Tested-by: Marek Marczykowski-Górecki Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20220831165824.94815-3-sj@kernel.org Signed-off-by: Juergen Gross drivers/block/xen-blkfront.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 06ba5d2e943e97bb66e75c152e87f1d2c7027a67 Author: SeongJae Park Date: Wed Aug 31 16:58:22 2022 +0000 xen-blkback: Advertise feature-persistent as user requested The advertisement of the persistent grants feature (writing 'feature-persistent' to xenbus) should mean not the decision for using the feature but only the availability of the feature. However, commit aac8a70db24b ("xen-blkback: add a parameter for disabling of persistent grants") made a field of blkback, which was a place for saving only the negotiation result, to be used for yet another purpose: caching of the 'feature_persistent' parameter value. As a result, the advertisement, which should follow only the parameter value, becomes inconsistent. This commit fixes the misuse of the semantic by making blkback saves the parameter value in a separate place and advertises the support based on only the saved value. Fixes: aac8a70db24b ("xen-blkback: add a parameter for disabling of persistent grants") Cc: # 5.10.x Suggested-by: Juergen Gross Signed-off-by: SeongJae Park Tested-by: Marek Marczykowski-Górecki Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20220831165824.94815-2-sj@kernel.org Signed-off-by: Juergen Gross drivers/block/xen-blkback/common.h | 3 +++ drivers/block/xen-blkback/xenbus.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 6cf07810e9ef8535d60160d13bf0fd05f2af38e7 Author: Nathan Chancellor Date: Tue Aug 30 08:12:56 2022 -0700 powerpc/papr_scm: Ensure rc is always initialized in papr_scm_pmu_register() Clang warns: arch/powerpc/platforms/pseries/papr_scm.c:492:6: warning: variable 'rc' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (!p->stat_buffer_len) ^~~~~~~~~~~~~~~~~~~ arch/powerpc/platforms/pseries/papr_scm.c:523:64: note: uninitialized use occurs here dev_info(&p->pdev->dev, "nvdimm pmu didn't register rc=%d\n", rc); ^~ include/linux/dev_printk.h:150:67: note: expanded from macro 'dev_info' dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap' _p_func(dev, fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ arch/powerpc/platforms/pseries/papr_scm.c:492:2: note: remove the 'if' if its condition is always false if (!p->stat_buffer_len) ^~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/platforms/pseries/papr_scm.c:484:8: note: initialize the variable 'rc' to silence this warning int rc, nodeid; ^ = 0 1 warning generated. The call to papr_scm_pmu_check_events() was eliminated but a return code was not added to the if statement. Add the same return code from papr_scm_pmu_check_events() for this condition so there is no more warning. Fixes: 9b1ac04698a4 ("powerpc/papr_scm: Fix nvdimm event mappings") Signed-off-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://github.com/ClangBuiltLinux/linux/issues/1701 Link: https://lore.kernel.org/r/20220830151256.1473169-1-nathan@kernel.org arch/powerpc/platforms/pseries/papr_scm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 684c68d92e2e1b97fa2f31c35c1b0f7671a8618a Author: Michael Ellerman Date: Wed Aug 31 23:10:52 2022 +1000 Revert "powerpc/irq: Don't open code irq_soft_mask helpers" This reverts commit ef5b570d3700fbb8628a58da0487486ceeb713cd. Zhouyi reported that commit is causing crashes when running rcutorture with KASAN enabled: BUG: using smp_processor_id() in preemptible [00000000] code: rcu_torture_rea/100 caller is rcu_preempt_deferred_qs_irqrestore+0x74/0xed0 CPU: 4 PID: 100 Comm: rcu_torture_rea Tainted: G W 5.19.0-rc5-next-20220708-dirty #253 Call Trace: dump_stack_lvl+0xbc/0x108 (unreliable) check_preemption_disabled+0x154/0x160 rcu_preempt_deferred_qs_irqrestore+0x74/0xed0 __rcu_read_unlock+0x290/0x3b0 rcu_torture_read_unlock+0x30/0xb0 rcutorture_one_extend+0x198/0x810 rcu_torture_one_read+0x58c/0xc90 rcu_torture_reader+0x12c/0x360 kthread+0x1e8/0x220 ret_from_kernel_thread+0x5c/0x64 KASAN will generate instrumentation instructions around the WRITE_ONCE(local_paca->irq_soft_mask, mask): 0xc000000000295cb0 <+0>: addis r2,r12,774 0xc000000000295cb4 <+4>: addi r2,r2,16464 0xc000000000295cb8 <+8>: mflr r0 0xc000000000295cbc <+12>: bl 0xc00000000008bb4c 0xc000000000295cc0 <+16>: mflr r0 0xc000000000295cc4 <+20>: std r31,-8(r1) 0xc000000000295cc8 <+24>: addi r3,r13,2354 0xc000000000295ccc <+28>: mr r31,r13 0xc000000000295cd0 <+32>: std r0,16(r1) 0xc000000000295cd4 <+36>: stdu r1,-48(r1) 0xc000000000295cd8 <+40>: bl 0xc000000000609b98 <__asan_store1+8> 0xc000000000295cdc <+44>: nop 0xc000000000295ce0 <+48>: li r9,1 0xc000000000295ce4 <+52>: stb r9,2354(r31) 0xc000000000295ce8 <+56>: addi r1,r1,48 0xc000000000295cec <+60>: ld r0,16(r1) 0xc000000000295cf0 <+64>: ld r31,-8(r1) 0xc000000000295cf4 <+68>: mtlr r0 If there is a context switch before "stb r9,2354(r31)", r31 may not equal to r13, in such case, irq soft mask will not work. The usual solution of marking the code ineligible for instrumentation forces the code out-of-line, which we would prefer to avoid. Christophe proposed a partial revert, but Nick raised some concerns with that. So for now do a full revert. Reported-by: Zhouyi Zhou [mpe: Construct change log based on Zhouyi's original report] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220831131052.42250-1-mpe@ellerman.id.au arch/powerpc/include/asm/hw_irq.h | 43 ++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) commit fe0a2ac7c627b064c479ad0c3b25e531d342e048 Author: Greg Kroah-Hartman Date: Fri Sep 2 09:10:08 2022 +0200 Revert "usb: gadget: udc-xilinx: replace memcpy with memcpy_toio" This reverts commit 8cb339f1c1f04baede9d54c1e40ac96247a6393b as it throws up a bunch of sparse warnings as reported by the kernel test robot. Reported-by: kernel test robot Link: https://lore.kernel.org/r/202209020044.CX2PfZzM-lkp@intel.com Fixes: 8cb339f1c1f0 ("usb: gadget: udc-xilinx: replace memcpy with memcpy_toio") Cc: stable@vger.kernel.org Cc: Linus Walleij Cc: Piyush Mehta Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/udc-xilinx.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 0f022aaac9ff2ceff683231b43923c650c90b47e Merge: 1da52815d5f1 4ef3f2aff126 Author: Greg Kroah-Hartman Date: Fri Sep 2 08:59:45 2022 +0200 Merge tag 'soundwire-6.0-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-linus Vinod writes: "soundwire fixes for v6.0 This contains two fixes to qcom sdw driver which resolve duplicate reset control get and second one fixes device array indices." * tag 'soundwire-6.0-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: qcom: fix device status array range soundwire: qcom: remove duplicate reset control get commit 3e48940abee88b8dbbeeaf8a07e7b2b6be1271b3 Author: Pattara Teerapong Date: Thu Sep 1 14:40:36 2022 +0000 ALSA: aloop: Fix random zeros in capture data when using jiffies timer In loopback_jiffies_timer_pos_update(), we are getting jiffies twice. First time for playback, second time for capture. Jiffies can be updated between these two calls and if the capture jiffies is larger, extra zeros will be filled in the capture buffer. Change to get jiffies once and use it for both playback and capture. Signed-off-by: Pattara Teerapong Cc: Link: https://lore.kernel.org/r/20220901144036.4049060-1-pteerapong@chromium.org Signed-off-by: Takashi Iwai sound/drivers/aloop.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 7fdc77665f3d45c9da7c6edd4beadee9790f43aa Author: Heiner Kallweit Date: Wed Aug 31 21:20:49 2022 +0200 Revert "net: phy: meson-gxl: improve link-up behavior" This reverts commit 2c87c6f9fbddc5b84d67b2fa3f432fcac6d99d93. Meanwhile it turned out that the following commit is the proper workaround for the issue that 2c87c6f9fbdd tries to address. a3a57bf07de2 ("net: stmmac: work around sporadic tx issue on link-up") It's nor clear why the to be reverted commit helped for one user, for others it didn't make a difference. Fixes: 2c87c6f9fbdd ("net: phy: meson-gxl: improve link-up behavior") Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/8deeeddc-6b71-129b-1918-495a12dc11e3@gmail.com Signed-off-by: Jakub Kicinski drivers/net/phy/meson-gxl.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit bfe632f6d0a1371784dd9a11fa5a9aa2dbf53bf1 Merge: d7df5e2834d3 0211c2a0ea60 Author: Dave Airlie Date: Fri Sep 2 11:26:29 2022 +1000 Merge tag 'drm-intel-fixes-2022-09-01' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix for a null pointer dereference (Lukasz) - HDMI related quirk for ECS Liva Q2 with GLK graphics (Diego) - Skip wm/ddb readout for disabled pipes (Ville) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YxC3GmSOpDiZTdIJ@intel.com commit 29250ba51bc1cbe8a87e923f76978b87c3247a8c Merge: 35906d23cf03 ca922fecda6c Author: Paolo Bonzini Date: Thu Sep 1 19:21:27 2022 -0400 Merge tag 'kvm-s390-master-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD PCI interpretation compile fixes commit 35906d23cf036857738d49b0d9388376145dc017 Merge: 22c6a0ef6b26 3e5e56c60a14 Author: Paolo Bonzini Date: Thu Sep 1 19:21:09 2022 -0400 Merge tag 'kvm-riscv-fixes-6.0-1' of https://github.com/kvm-riscv/linux into HEAD KVM/riscv fixes for 6.0, take #1 - Fix unused variable warnings in vcpu_timer.c - Move extern sbi_ext declarations to a header commit 22c6a0ef6b2631cda406a9c0c26774b0b3463b7b Author: Paolo Bonzini Date: Thu Aug 11 12:41:25 2022 -0400 KVM: x86: check validity of argument to KVM_SET_MP_STATE An invalid argument to KVM_SET_MP_STATE has no effect other than making the vCPU fail to run at the next KVM_RUN. Since it is extremely unlikely that any userspace is relying on it, fail with -EINVAL just like for other architectures. Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 87693645ae89d9f9779e0bc53606bf228ec36411 Author: Like Xu Date: Wed Aug 31 11:35:24 2022 +0800 perf/x86/core: Completely disable guest PEBS via guest's global_ctrl When a guest PEBS counter is cross-mapped by a host counter, software will remove the corresponding bit in the arr[global_ctrl].guest and expect hardware to perform a change of state "from enable to disable" via the msr_slot[] switch during the vmx transaction. The real world is that if user adjust the counter overflow value small enough, it still opens a tiny race window for the previously PEBS-enabled counter to write cross-mapped PEBS records into the guest's PEBS buffer, when arr[global_ctrl].guest has been prioritised (switch_msr_special stuff) to switch into the enabled state, while the arr[pebs_enable].guest has not. Close this window by clearing invalid bits in the arr[global_ctrl].guest. Cc: linux-perf-users@vger.kernel.org Cc: Kan Liang Cc: Peter Zijlstra Cc: Sean Christopherson Fixes: 854250329c02 ("KVM: x86/pmu: Disable guest PEBS temporarily in two rare situations") Signed-off-by: Like Xu Message-Id: <20220831033524.58561-1-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/events/intel/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3c0ba05ce9c92f94ef5b7f7f1e0102c4a3cd2a77 Author: Miaohe Lin Date: Thu Sep 1 20:23:00 2022 +0800 KVM: x86: fix memoryleak in kvm_arch_vcpu_create() When allocating memory for mci_ctl2_banks fails, KVM doesn't release mce_banks leading to memoryleak. Fix this issue by calling kfree() for it when kcalloc() fails. Fixes: 281b52780b57 ("KVM: x86: Add emulation for MSR_IA32_MCx_CTL2 MSRs.") Signed-off-by: Miaohe Lin Message-Id: <20220901122300.22298-1-linmiaohe@huawei.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0204750bd4c6ccc2fb7417618477f10373b33f56 Author: Jim Mattson Date: Tue Aug 30 10:49:47 2022 -0700 KVM: x86: Mask off unsupported and unknown bits of IA32_ARCH_CAPABILITIES KVM should not claim to virtualize unknown IA32_ARCH_CAPABILITIES bits. When kvm_get_arch_capabilities() was originally written, there were only a few bits defined in this MSR, and KVM could virtualize all of them. However, over the years, several bits have been defined that KVM cannot just blindly pass through to the guest without additional work (such as virtualizing an MSR promised by the IA32_ARCH_CAPABILITES feature bit). Define a mask of supported IA32_ARCH_CAPABILITIES bits, and mask off any other bits that are set in the hardware MSR. Cc: Paolo Bonzini Fixes: 5b76a3cff011 ("KVM: VMX: Tell the nested hypervisor to skip L1D flush on vmentry") Signed-off-by: Jim Mattson Reviewed-by: Vipin Sharma Reviewed-by: Xiaoyao Li Message-Id: <20220830174947.2182144-1-jmattson@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit d7df5e2834d3f81412a669586d685bc87f18f7d7 Merge: c1dd5d29acee 174974d8463b Author: Dave Airlie Date: Fri Sep 2 05:58:52 2022 +1000 Merge tag 'drm-msm-fixes-2022-08-27' of https://gitlab.freedesktop.org/drm/msm into drm-fixes Fixes for v6.0 - Fix for inconsistent indenting in function msm_dsi_dphy_timing_calc_v3. This fixes a smatch warning reported by kbot - Fix to make eDP the first connector in the connected list. This was mainly done to address a screen corruption issue we were seeing on sc7280 boards which have eDP as the primary display. The corruption itself is from usermode but we decided to fix it this way because things work correct with the primary display as the first one for usermode - Fix to populate intf_cfg correctly before calling reset_intf_cfg(). Without this, the display pipeline is not torn down correctly for writeback - Specify the correct number of DSI regulators for SDM660. It should have been 1 but 2 was mentioned - Specify the correct number of DSI regulators for MSM8996. It should have been 3 but 2 was mentioned - Fix for removing DP_RECOVERED_CLOCK_OUT_EN bit for tps4 link training for DP. This was causing link training failures and hence no display for a specific DP to HDMI cable on chromebooks - Fix probe-deferral crash in gpu devfreq - Fix gpu debugfs deadlock Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGtuY=jd44itwTkLXVqhnoKgY0BswPTrxDTxCiPG3WbmLA@mail.gmail.com commit c1dd5d29aceed251daf98cacd22817f38f76f94b Merge: a71f3950c803 39c84b8e929d Author: Dave Airlie Date: Fri Sep 2 05:56:25 2022 +1000 Merge tag 'amd-drm-fixes-6.0-2022-08-31' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.0-2022-08-31: amdgpu: - FRU error message fix - MES 11 updates - DCN 3.2.x fixes - DCN 3.1.4 fixes - Fix possible use after free in CS IOCTL - SMU 13.0.x fixes - Fix iolink reporting on devices with direct connections to CPU - GFX10 tap delay firmware fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20220831212312.5921-1-alexander.deucher@amd.com commit a71f3950c803cb18080746aaa8b66af122f32841 Merge: a54569b1f972 a3f7c10a269d Author: Dave Airlie Date: Fri Sep 2 05:34:33 2022 +1000 Merge tag 'drm-misc-fixes-2022-08-31' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * dma-buf/dma-resv: Fence-handling fix Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/Yw+pZnEbPxkJ1nHa@linux-uq9g.fritz.box commit 793f55b2971e3a95d77ad08e9da2a3dc6c946cd7 Author: Nico Pache Date: Wed Aug 10 19:40:56 2022 -0400 kunit: fix Kconfig for build-in tests USB4 and Nitro Enclaves Both the USB4 and Nitro Enclaves KUNIT tests are now able to be compiled if KUNIT is compiled as a module. This leads to issues if KUNIT is being packaged separately from the core kernel and when KUNIT is run baremetal without the required driver compiled into the kernel. Fixes: 635dcd16844b ("thunderbolt: test: Use kunit_test_suite() macro") Fixes: fe5be808fa6c ("nitro_enclaves: test: Use kunit_test_suite() macro") Signed-off-by: Nico Pache Reviewed-by: David Gow Reviewed-by: Andra Paraschiv Acked-by: Brendan Higgins Signed-off-by: Shuah Khan drivers/thunderbolt/Kconfig | 3 +-- drivers/virt/nitro_enclaves/Kconfig | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit aded3cad909581c60335037112c4f86bbfe90f17 Author: Sander Vanheule Date: Sun Aug 21 17:01:47 2022 +0200 kunit: fix assert_type for comparison macros When replacing KUNIT_BINARY_*_MSG_ASSERTION() macros with KUNIT_BINARY_INT_ASSERTION(), the assert_type parameter was not always correctly transferred. Specifically, the following errors were introduced: - KUNIT_EXPECT_LE_MSG() uses KUNIT_ASSERTION - KUNIT_ASSERT_LT_MSG() uses KUNIT_EXPECTATION - KUNIT_ASSERT_GT_MSG() uses KUNIT_EXPECTATION A failing KUNIT_EXPECT_LE_MSG() test thus prevents further tests from running, while failing KUNIT_ASSERT_{LT,GT}_MSG() tests do not prevent further tests from running. This is contrary to the documentation, which states that failing KUNIT_EXPECT_* macros allow further tests to run, while failing KUNIT_ASSERT_* macros should prevent this. Revert the KUNIT_{ASSERTION,EXPECTATION} switches to fix the behaviour for the affected macros. Fixes: 40f39777ce4f ("kunit: decrease macro layering for integer asserts") Signed-off-by: Sander Vanheule Reviewed-by: Daniel Latypov Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan include/kunit/test.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6b66ca0bac1b9cee7608d7c4dc59b699458b4cb8 Author: Yicong Yang Date: Thu Aug 25 17:20:07 2022 +0800 arch_topology: Make cluster topology span at least SMT CPUs Currently cpu_clustergroup_mask() will return CPU mask if cluster span more or the same CPUs as cpu_coregroup_mask(). This will result topology borken on non-Cluster SMT machines when building with CONFIG_SCHED_CLUSTER=y. Test with: qemu-system-aarch64 -enable-kvm -machine virt \ -net none \ -cpu host \ -bios ./QEMU_EFI.fd \ -m 2G \ -smp 48,sockets=2,cores=12,threads=2 \ -kernel $Image \ -initrd $Rootfs \ -nographic \ -append "rdinit=init console=ttyAMA0 sched_verbose loglevel=8" We'll get below error: [ 3.084568] BUG: arch topology borken [ 3.084570] the SMT domain not a subset of the CLS domain Since cluster is a level higher than SMT, fix this by making cluster spans at least SMT CPUs. Fixes: bfcc4397435d ("arch_topology: Limit span of cpu_clustergroup_mask()") Cc: Sudeep Holla Cc: Vincent Guittot Cc: Ionela Voinescu Reviewed-by: Sudeep Holla Reviewed-by: Ionela Voinescu Signed-off-by: Yicong Yang Link: https://lore.kernel.org/r/20220825092007.8129-1-yangyicong@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/base/arch_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42e66b1cc3a070671001f8a1e933a80818a192bf Merge: d330076e1d4b a8424a9b4522 Author: Linus Torvalds Date: Thu Sep 1 09:20:42 2022 -0700 Merge tag 'net-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from bluetooth, bpf and wireless. Current release - regressions: - bpf: - fix wrong last sg check in sk_msg_recvmsg() - fix kernel BUG in purge_effective_progs() - mac80211: - fix possible leak in ieee80211_tx_control_port() - potential NULL dereference in ieee80211_tx_control_port() Current release - new code bugs: - nfp: fix the access to management firmware hanging Previous releases - regressions: - ip: fix triggering of 'icmp redirect' - sched: tbf: don't call qdisc_put() while holding tree lock - bpf: fix corrupted packets for XDP_SHARED_UMEM - bluetooth: hci_sync: fix suspend performance regression - micrel: fix probe failure Previous releases - always broken: - tcp: make global challenge ack rate limitation per net-ns and default disabled - tg3: fix potential hang-up on system reboot - mac802154: fix reception for no-daddr packets Misc: - r8152: add PID for the lenovo onelink+ dock" * tag 'net-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (56 commits) net/smc: Remove redundant refcount increase Revert "sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb" tcp: make global challenge ack rate limitation per net-ns and default disabled tcp: annotate data-race around challenge_timestamp net: dsa: hellcreek: Print warning only once ip: fix triggering of 'icmp redirect' sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb selftests: net: sort .gitignore file Documentation: networking: correct possessive "its" kcm: fix strp_init() order and cleanup mlxbf_gige: compute MDIO period based on i1clk ethernet: rocker: fix sleep in atomic context bug in neigh_timer_handler net: lan966x: improve error handle in lan966x_fdma_rx_get_frame() nfp: fix the access to management firmware hanging net: phy: micrel: Make the GPIO to be non-exclusive net: virtio_net: fix notification coalescing comments net/sched: fix netdevice reference leaks in attach_default_qdiscs() net: sched: tbf: don't call qdisc_put() while holding tree lock net: Use u64_stats_fetch_begin_irq() for stats fetch. net: dsa: xrs700x: Use irqsave variant for u64 stats update ... commit d330076e1d4b0cbaec477e1214f6f8df27da2bb8 Merge: 2880e1a175b9 0495e337b703 Author: Linus Torvalds Date: Thu Sep 1 09:14:56 2022 -0700 Merge tag 'slab-for-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab Pull slab fix from Vlastimil Babka: - A fix from Waiman Long to avoid a theoretical deadlock reported by lockdep. * tag 'slab-for-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: mm/slab_common: Deleting kobject in kmem_cache_destroy() without holding slab_mutex/cpu_hotplug_lock commit 2880e1a175b9f31798f9d9482ee49187f61b5539 Merge: 2555283eb40d 5f3d9e8161bb Author: Linus Torvalds Date: Thu Sep 1 09:05:25 2022 -0700 Merge tag 'sound-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Just handful changes at this time. The only major change is the regression fix about the x86 WC-page buffer allocation. The rest are trivial data-race fixes for ALSA sequencer core, the possible out-of-bounds access fixes in the new ALSA control hash code, and a few device-specific workarounds and fixes" * tag 'sound-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Add quirk for LH Labs Geek Out HD Audio 1V5 ALSA: hda/realtek: Add speaker AMP init for Samsung laptops with ALC298 ALSA: control: Re-order bounds checking in get_ctl_id_hash() ALSA: control: Fix an out-of-bounds bug in get_ctl_id_hash() ALSA: hda: intel-nhlt: Correct the handling of fmt_config flexible array ALSA: seq: Fix data-race at module auto-loading ALSA: seq: oss: Fix data-race for max_midi_devs access ALSA: memalloc: Revive x86-specific WC page allocations again commit 647e82dbf85124697be59a4b4cf00c0d38177dcb Author: Andy Shevchenko Date: Thu Sep 1 14:34:06 2022 +0300 platform/x86: p2sb: Fix UAF when caller uses resource name We have to copy only selected fields from the original resource. Because a PCI device will be removed immediately after getting its resources, we may not use any allocated data, hence we may not copy any pointers. Consider the following scenario: 1/ a caller of p2sb_bar() gets the resource; 2/ the resource has been copied by platform_device_add_data() in order to create a platform device; 3/ the platform device creation will call for the device driver's ->probe() as soon as a match found; 4/ the ->probe() takes given resources (see 2/) and tries to access one of its field, i.e. 'name', in the __devm_ioremap_resource() to create a pretty looking output; 5/ but the 'name' is a dangling pointer because p2sb_bar() removed a PCI device, which 'name' had been copied to the caller's memory. 6/ UAF (Use-After-Free) as a result. Kudos to Mika for the initial analisys of the issue. Fixes: 9745fb07474f ("platform/x86/intel: Add Primary to Sideband (P2SB) bridge support") Reported-by: kernel test robot Suggested-by: Mika Westerberg Link: https://lore.kernel.org/linux-i2c/YvPCbnKqDiL2XEKp@xsang-OptiPlex-9020/ Link: https://lore.kernel.org/linux-i2c/YtjAswDKfiuDfWYs@xsang-OptiPlex-9020/ Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220901113406.65876-1-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/p2sb.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 5542dfc582f4a925f67bbfaf8f62ca83506032ae Author: Luke D. Jones Date: Sun Aug 28 19:46:38 2022 +1200 platform/x86: asus-wmi: Increase FAN_CURVE_BUF_LEN to 32 Fix for TUF laptops returning with an -ENOSPC on calling asus_wmi_evaluate_method_buf() when fetching default curves. The TUF method requires at least 32 bytes space. This also moves and changes the pr_debug() in fan_curve_check_present() to pr_warn() in fan_curve_get_factory_default() so that there is at least some indication in logs of why it fails. Signed-off-by: Luke D. Jones Link: https://lore.kernel.org/r/20220828074638.5473-1-luke@ljones.dev Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/asus-wmi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 789bba82f63c3e81dce426ba457fc7905b30ac6e Author: Russ Weight Date: Tue Aug 30 17:25:18 2022 -0700 firmware_loader: Fix memory leak in firmware upload In the case of firmware-upload, an instance of struct fw_upload is allocated in firmware_upload_register(). This data needs to be freed in fw_dev_release(). Create a new fw_upload_free() function in sysfs_upload.c to handle the firmware-upload specific memory frees and incorporate the missing kfree call for the fw_upload structure. Fixes: 97730bbb242c ("firmware_loader: Add firmware-upload support") Cc: stable Signed-off-by: Russ Weight Link: https://lore.kernel.org/r/20220831002518.465274-1-russell.h.weight@intel.com Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/sysfs.c | 7 +++---- drivers/base/firmware_loader/sysfs.h | 5 +++++ drivers/base/firmware_loader/sysfs_upload.c | 9 +++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) commit 8b40c38e37492b5bdf8e95b46b5cca9517a9957a Author: Russ Weight Date: Mon Aug 29 10:45:57 2022 -0700 firmware_loader: Fix use-after-free during unregister In the following code within firmware_upload_unregister(), the call to device_unregister() could result in the dev_release function freeing the fw_upload_priv structure before it is dereferenced for the call to module_put(). This bug was found by the kernel test robot using CONFIG_KASAN while running the firmware selftests. device_unregister(&fw_sysfs->dev); module_put(fw_upload_priv->module); The problem is fixed by copying fw_upload_priv->module to a local variable for use when calling device_unregister(). Fixes: 97730bbb242c ("firmware_loader: Add firmware-upload support") Cc: stable Reported-by: kernel test robot Reviewed-by: Matthew Gerlach Signed-off-by: Russ Weight Link: https://lore.kernel.org/r/20220829174557.437047-1-russell.h.weight@intel.com Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/sysfs_upload.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1b620d539ccc18a1aca1613d9ff078115a7891a1 Author: Masahiro Yamada Date: Thu Sep 1 10:12:52 2022 +0900 kbuild: disable header exports for UML in a straightforward way Previously 'make ARCH=um headers' stopped because of missing arch/um/include/uapi/asm/Kbuild. The error is not shown since commit ed102bf2afed ("um: Fix W=1 missing-include-dirs warnings") added arch/um/include/uapi/asm/Kbuild. Hard-code the unsupported architecture, so it works like before. Fixes: ed102bf2afed ("um: Fix W=1 missing-include-dirs warnings") Signed-off-by: Masahiro Yamada Acked-by: Richard Weinberger Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 916d72c10a4ca80ea51f1421e774cb765b53f28f Author: Pavel Begunkov Date: Thu Sep 1 11:54:05 2022 +0100 selftests/net: return back io_uring zc send tests Enable io_uring zerocopy send tests back and fix them up to follow the new inteface. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/c8e5018c516093bdad0b6e19f2f9847dea17e4d2.1662027856.git.asml.silence@gmail.com Signed-off-by: Jens Axboe tools/testing/selftests/net/io_uring_zerocopy_tx.c | 110 +++++++-------------- .../testing/selftests/net/io_uring_zerocopy_tx.sh | 10 +- 2 files changed, 41 insertions(+), 79 deletions(-) commit b48c312be05e83b55a4d58bf61f80b4a3288fb7e Author: Pavel Begunkov Date: Thu Sep 1 11:54:04 2022 +0100 io_uring/net: simplify zerocopy send user API Following user feedback, this patch simplifies zerocopy send API. One of the main complaints is that the current API is difficult with the userspace managing notification slots, and then send retries with error handling make it even worse. Instead of keeping notification slots change it to the per-request notifications model, which posts both completion and notification CQEs for each request when any data has been sent, and only one CQE if it fails. All notification CQEs will have IORING_CQE_F_NOTIF set and IORING_CQE_F_MORE in completion CQEs indicates whether to wait a notification or not. IOSQE_CQE_SKIP_SUCCESS is disallowed with zerocopy sends for now. This is less flexible, but greatly simplifies the user API and also the kernel implementation. We reuse notif helpers in this patch, but in the future there won't be need for keeping two requests. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/95287640ab98fc9417370afb16e310677c63e6ce.1662027856.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 7 ++++-- io_uring/io_uring.c | 4 ++-- io_uring/net.c | 53 +++++++++++++++++++++++++++---------------- io_uring/net.h | 1 + io_uring/notif.c | 12 ++-------- io_uring/notif.h | 43 ++--------------------------------- io_uring/opdef.c | 3 ++- 7 files changed, 47 insertions(+), 76 deletions(-) commit 57f332246afa5929bdf2e7a5facddedb43549be4 Author: Pavel Begunkov Date: Thu Sep 1 11:54:03 2022 +0100 io_uring/notif: remove notif registration We're going to remove the userspace exposed zerocopy notification API, remove notification registration. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/6ff00b97be99869c386958a990593c9c31cf105b.1662027856.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 8 ----- io_uring/io_uring.c | 10 ------ io_uring/net.c | 4 +-- io_uring/notif.c | 71 ------------------------------------------- io_uring/notif.h | 11 ------- 5 files changed, 1 insertion(+), 103 deletions(-) commit d9808ceb3129b811becebdee3ec96d189c83e56c Author: Pavel Begunkov Date: Thu Sep 1 11:54:02 2022 +0100 Revert "io_uring: rename IORING_OP_FILES_UPDATE" This reverts commit 4379d5f15b3fd4224c37841029178aa8082a242e. We removed notification flushing, also cleanup uapi preparation changes to not pollute it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/89edc3905350f91e1b6e26d9dbf42ee44fd451a2.1662027856.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 12 +----------- io_uring/opdef.c | 9 ++++----- io_uring/rsrc.c | 17 ++--------------- io_uring/rsrc.h | 4 ++-- 4 files changed, 9 insertions(+), 33 deletions(-) commit 23c12d5fc02fb0712c64f3e87a27fcfa78e8af9c Author: Pavel Begunkov Date: Thu Sep 1 11:54:01 2022 +0100 Revert "io_uring: add zc notification flush requests" This reverts commit 492dddb4f6e3a5839c27d41ff1fecdbe6c3ab851. Soon we won't have the very notion of notification flushing, so remove notification flushing requests. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/8850334ca56e65b413cb34fd158db81d7b2865a3.1662027856.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 1 - io_uring/rsrc.c | 38 -------------------------------------- 2 files changed, 39 deletions(-) commit 75847100c351c7a49dddd60d1d023bd3e6640682 Author: Pavel Begunkov Date: Thu Sep 1 11:54:00 2022 +0100 selftests/net: temporarily disable io_uring zc test We're going to change API, to avoid build problems with a couple of following commits, disable io_uring testing. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/12b7507223df04fbd12aa05fc0cb544b51d7ed79.1662027856.git.asml.silence@gmail.com Signed-off-by: Jens Axboe tools/testing/selftests/net/io_uring_zerocopy_tx.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2a9d683b48c8a87e61a4215792d44c90bcbbb536 Author: Trond Myklebust Date: Thu Aug 25 14:49:05 2022 -0400 NFSv4: Turn off open-by-filehandle and NFS re-export for NFSv4.0 The NFSv4.0 protocol only supports open() by name. It cannot therefore be used with open_by_handle() and friends, nor can it be re-exported by knfsd. Reported-by: Chuck Lever III Fixes: 20fa19027286 ("nfs: add export operations") Signed-off-by: Trond Myklebust fs/nfs/super.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit 17814819ac9829a437e06fbb5c7056a1f4f893da Author: Trond Myklebust Date: Wed Aug 31 17:28:13 2022 -0400 SUNRPC: Fix call completion races with call_decode() We need to make sure that the req->rq_private_buf is completely up to date before we make req->rq_reply_bytes_recvd visible to the call_decode() routine in order to avoid triggering the WARN_ON(). Reported-by: Benjamin Coddington Fixes: 72691a269f0b ("SUNRPC: Don't reuse bvec on retransmission of the request") Tested-by: Benjamin Coddington Signed-off-by: Trond Myklebust net/sunrpc/xprt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9b03e79300100bcd36e77c8ce94ee7f47cd2f528 Author: Florian Fainelli Date: Fri Aug 5 16:07:36 2022 -0700 arch_topology: Silence early cacheinfo errors when non-existent Architectures which do not have cacheinfo such as ARM 32-bit would spit out the following during boot: Early cacheinfo failed, ret = -2 Treat -ENOENT specifically to silence this error since it means that the platform does not support reporting its cache information. Fixes: 3fcbf1c77d08 ("arch_topology: Fix cache attributes detection in the CPU hotplug path") Tested-by: Geert Uytterhoeven Tested-by: Michael Walle Reviewed-by: Sudeep Holla Reviewed-by: Conor Dooley Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20220805230736.1562801-1-f.fainelli@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/base/arch_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1da52815d5f1b654c89044db0cdc6adce43da1f1 Author: Carlos Llamas Date: Mon Aug 29 20:12:48 2022 +0000 binder: fix alloc->vma_vm_mm null-ptr dereference Syzbot reported a couple issues introduced by commit 44e602b4e52f ("binder_alloc: add missing mmap_lock calls when using the VMA"), in which we attempt to acquire the mmap_lock when alloc->vma_vm_mm has not been initialized yet. This can happen if a binder_proc receives a transaction without having previously called mmap() to setup the binder_proc->alloc space in [1]. Also, a similar issue occurs via binder_alloc_print_pages() when we try to dump the debugfs binder stats file in [2]. Sample of syzbot's crash report: ================================================================== KASAN: null-ptr-deref in range [0x0000000000000128-0x000000000000012f] CPU: 0 PID: 3755 Comm: syz-executor229 Not tainted 6.0.0-rc1-next-20220819-syzkaller #0 syz-executor229[3755] cmdline: ./syz-executor2294415195 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 RIP: 0010:__lock_acquire+0xd83/0x56d0 kernel/locking/lockdep.c:4923 [...] Call Trace: lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 down_read+0x98/0x450 kernel/locking/rwsem.c:1499 mmap_read_lock include/linux/mmap_lock.h:117 [inline] binder_alloc_new_buf_locked drivers/android/binder_alloc.c:405 [inline] binder_alloc_new_buf+0xa5/0x19e0 drivers/android/binder_alloc.c:593 binder_transaction+0x242e/0x9a80 drivers/android/binder.c:3199 binder_thread_write+0x664/0x3220 drivers/android/binder.c:3986 binder_ioctl_write_read drivers/android/binder.c:5036 [inline] binder_ioctl+0x3470/0x6d00 drivers/android/binder.c:5323 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd [...] ================================================================== Fix these issues by setting up alloc->vma_vm_mm pointer during open() and caching directly from current->mm. This guarantees we have a valid reference to take the mmap_lock during scenarios described above. [1] https://syzkaller.appspot.com/bug?extid=f7dc54e5be28950ac459 [2] https://syzkaller.appspot.com/bug?extid=a75ebe0452711c9e56d9 Fixes: 44e602b4e52f ("binder_alloc: add missing mmap_lock calls when using the VMA") Cc: # v5.15+ Cc: Liam R. Howlett Reported-by: syzbot+f7dc54e5be28950ac459@syzkaller.appspotmail.com Reported-by: syzbot+a75ebe0452711c9e56d9@syzkaller.appspotmail.com Reviewed-by: Liam R. Howlett Acked-by: Todd Kjos Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20220829201254.1814484-2-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman drivers/android/binder_alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 689a2d9f9332a27b1379ef230396e944f949a72b Author: Johan Hovold Date: Mon Aug 29 10:05:31 2022 +0200 misc: fastrpc: increase maximum session count The SC8280XP platform uses 14 sessions for the compute DSP so increment the maximum session count. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220829080531.29681-4-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/misc/fastrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d245f43aab2b61195d8ebb64cef7b5a08c590ab4 Author: Johan Hovold Date: Mon Aug 29 10:05:30 2022 +0200 misc: fastrpc: fix memory corruption on open The probe session-duplication overflow check incremented the session count also when there were no more available sessions so that memory beyond the fixed-size slab-allocated session array could be corrupted in fastrpc_session_alloc() on open(). Fixes: f6f9279f2bf0 ("misc: fastrpc: Add Qualcomm fastrpc basic driver model") Cc: stable@vger.kernel.org # 5.1 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220829080531.29681-3-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/misc/fastrpc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 9baa1415d9abdd1e08362ea2dcfadfacee8690b5 Author: Johan Hovold Date: Mon Aug 29 10:05:29 2022 +0200 misc: fastrpc: fix memory corruption on probe Add the missing sanity check on the probed-session count to avoid corrupting memory beyond the fixed-size slab-allocated session array when there are more than FASTRPC_MAX_SESSIONS sessions defined in the devicetree. Fixes: f6f9279f2bf0 ("misc: fastrpc: Add Qualcomm fastrpc basic driver model") Cc: stable@vger.kernel.org # 5.1 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220829080531.29681-2-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/misc/fastrpc.c | 5 +++++ 1 file changed, 5 insertions(+) commit 256577983763141390f1729f1512f613f32f2486 Merge: 645b5ed871f4 478814a55841 Author: Jens Axboe Date: Thu Sep 1 08:11:11 2022 -0600 Merge tag 'nvme-6.0-2022-09-01' of git://git.infradead.org/nvme into block-6.0 Pull NVMe fixes from Christoph: "nvme fixes for Linux 6.0 - error handling fix for the new auth code (Hannes Reinecke) - fix unhandled tcp states in nvmet_tcp_state_change (Maurizio Lombardi) - add NVME_QUIRK_BOGUS_NID for Lexar NM610 (Shyamin Ayesh)" * tag 'nvme-6.0-2022-09-01' of git://git.infradead.org/nvme: nvmet-tcp: fix unhandled tcp states in nvmet_tcp_state_change() nvmet-auth: add missing goto in nvmet_setup_auth() nvme-pci: add NVME_QUIRK_BOGUS_NID for Lexar NM610 commit c61feaee68b9735be06f162bc046c7f1959efb0c Author: Hu Xiaoying Date: Thu Sep 1 12:57:37 2022 +0800 usb: storage: Add ASUS <0x0b05:0x1932> to IGNORE_UAS USB external storage device(0x0b05:1932), use gnome-disk-utility tools to test usb write < 30MB/s. if does not to load module of uas for this device, can increase the write speed from 20MB/s to >40MB/s. Suggested-by: Matthias Kaehlcke Acked-by: Alan Stern Signed-off-by: Hu Xiaoying Link: https://lore.kernel.org/r/20220901045737.3438046-1-huxiaoying@kylinos.cn Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/unusual_uas.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 25e9fbf0fd38868a429feabc38abebfc6dbf6542 Author: Isaac J. Manjarres Date: Wed Aug 17 11:40:26 2022 -0700 driver core: Don't probe devices after bus_type.match() probe deferral Both __device_attach_driver() and __driver_attach() check the return code of the bus_type.match() function to see if the device needs to be added to the deferred probe list. After adding the device to the list, the logic attempts to bind the device to the driver anyway, as if the device had matched with the driver, which is not correct. If __device_attach_driver() detects that the device in question is not ready to match with a driver on the bus, then it doesn't make sense for the device to attempt to bind with the current driver or continue attempting to match with any of the other drivers on the bus. So, update the logic in __device_attach_driver() to reflect this. If __driver_attach() detects that a driver tried to match with a device that is not ready to match yet, then the driver should not attempt to bind with the device. However, the driver can still attempt to match and bind with other devices on the bus, as drivers can be bound to multiple devices. So, update the logic in __driver_attach() to reflect this. Fixes: 656b8035b0ee ("ARM: 8524/1: driver cohandle -EPROBE_DEFER from bus_type.match()") Cc: stable@vger.kernel.org Cc: Saravana Kannan Reported-by: Guenter Roeck Tested-by: Guenter Roeck Tested-by: Linus Walleij Reviewed-by: Saravana Kannan Signed-off-by: Isaac J. Manjarres Link: https://lore.kernel.org/r/20220817184026.3468620-1-isaacmanjarres@google.com Signed-off-by: Greg Kroah-Hartman drivers/base/dd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ff878b408a03bef5d610b7e2302702e16a53636e Author: Takashi Iwai Date: Thu Sep 1 14:41:36 2022 +0200 ALSA: usb-audio: Split endpoint setups for hw_params and prepare One of the former changes for the endpoint management was the more consistent setup of endpoints at hw_params. snd_usb_endpoint_configure() is a single function that does the full setup, and it's called from both PCM hw_params and prepare callbacks. Although the EP setup at the prepare phase is usually skipped (by checking need_setup flag), it may be still effective in some cases like suspend/resume that requires the interface setup again. As it's a full and single setup, the invocation of snd_usb_endpoint_configure() includes not only the USB interface setup but also the buffer release and allocation. OTOH, doing the buffer release and re-allocation at PCM prepare phase is rather superfluous, and better to be done only in the hw_params phase. For those optimizations, this patch splits the endpoint setup to two phases: snd_usb_endpoint_set_params() and snd_usb_endpoint_prepare(), to be called from hw_params and from prepare, respectively. Note that this patch changes the driver operation slightly, effectively moving the USB interface setup again to PCM prepare stage instead of hw_params stage, while the buffer allocation and such initializations are still done at hw_params stage. And, the change of the USB interface setup timing (moving to prepare) gave an interesting "fix", too: it was reported that the recent kernels caused silent output at the beginning on playbacks on some devices on Android, and this change casually fixed the regression. It seems that those devices are picky about the sample rate change (or the interface change?), and don't follow the too immediate rate changes. Meanwhile, Android operates the PCM in the following order: - open, then hw_params with the possibly highest sample rate - close without prepare - re-open, hw_params with the normal sample rate - prepare, and start streaming This procedure ended up the hw_params twice with different rates, and because the recent kernel did set up the sample rate twice one and after, it screwed up the device. OTOH, the earlier kernels didn't set up the USB interface at hw_params, hence this problem didn't appear. Now, with this patch, the USB interface setup is again back to the prepare phase, and it works around the problem automagically. Although we should address the sample rate problem in a more solid way in future, let's keep things working as before for now. Fixes: bf6313a0ff76 ("ALSA: usb-audio: Refactor endpoint management") Cc: Reported-by: chihhao chen Link: https://lore.kernel.org/r/87e6d6ae69d68dc588ac9acc8c0f24d6188375c3.camel@mediatek.com Link: https://lore.kernel.org/r/20220901124136.4984-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/endpoint.c | 23 +++++++++-------------- sound/usb/endpoint.h | 6 ++++-- sound/usb/pcm.c | 14 ++++++++++---- 3 files changed, 23 insertions(+), 20 deletions(-) commit 791ae8e8960efbf2e331eae7110db65b4f9f9083 Author: Vadim Pasternak Date: Tue Aug 23 23:19:37 2022 +0300 platform/mellanox: Remove redundant 'NULL' check Remove 'NULL' check for 'data->hpdev.client' in error flow of mlxreg_lc_probe(). It cannot be 'NULL' at this point. Fixes: b4b830a34d80 ("platform/mellanox: mlxreg-lc: Fix error flow and extend verbosity") Reported-by: Dan Carpenter Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20220823201937.46855-5-vadimp@nvidia.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/mellanox/mlxreg-lc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2f92fdd043d548a14287889742e147f8ed4ee03d Author: Vadim Pasternak Date: Tue Aug 23 23:19:36 2022 +0300 platform/mellanox: Remove unnecessary code Remove redundant 'NULL' check for of if 'data->notifier'. Replace 'return err' by 'return 0' in mlxreg_lc_probe(). Fixes: 62f9529b8d5c87b ("platform/mellanox: mlxreg-lc: Add initial support for Nvidia line card devices") Reported-by: Dan Carpenter Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20220823201937.46855-4-vadimp@nvidia.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/mellanox/mlxreg-lc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 1e092b7faa6b507125b69c92a51bb22c2d549d37 Author: Vadim Pasternak Date: Tue Aug 23 23:19:35 2022 +0300 platform/mellanox: mlxreg-lc: Fix locking issue Fix locking issues: - mlxreg_lc_state_update() takes a lock when set or clear "MLXREG_LC_POWERED". - All the devices can be deleted before MLXREG_LC_POWERED flag is cleared. To fix it: - Add lock() / unlock() at the beginning / end of mlxreg_lc_event_handler() and remove locking from mlxreg_lc_power_on_off() and mlxreg_lc_enable_disable() - Add locked version of mlxreg_lc_state_update() - mlxreg_lc_state_update_locked() for using outside mlxreg_lc_event_handler(). (2) Remove redundant NULL check for of if 'data->notifier'. Fixes: 62f9529b8d5c87b ("platform/mellanox: mlxreg-lc: Add initial support for Nvidia line card devices") Reported-by: Dan Carpenter Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20220823201937.46855-3-vadimp@nvidia.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/mellanox/mlxreg-lc.c | 37 +++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) commit 17c2bd6bea4c32fe691c1f9ebcc20fd48d77454a Author: Vadim Pasternak Date: Tue Aug 23 23:19:34 2022 +0300 platform/mellanox: mlxreg-lc: Fix coverity warning Fix smatch warning: drivers/platform/mellanox/mlxreg-lc.c:866 mlxreg_lc_probe() warn: passing zero to 'PTR_ERR' by removing 'err = PTR_ERR(regmap)'. Fixes: b4b830a34d80 ("platform/mellanox: mlxreg-lc: Fix error flow and extend verbosity") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20220823201937.46855-2-vadimp@nvidia.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/mellanox/mlxreg-lc.c | 1 - 1 file changed, 1 deletion(-) commit c3b82d26bc85f5fc2fef5ec8cce17c89633a55a8 Author: Hans de Goede Date: Mon Aug 29 18:35:44 2022 +0200 platform/x86: acer-wmi: Acer Aspire One AOD270/Packard Bell Dot keymap fixes 2 keymap fixes for the Acer Aspire One AOD270 and the same hardware rebranded as Packard Bell Dot SC: 1. The F2 key is marked with a big '?' symbol on the Packard Bell Dot SC, this sends WMID_HOTKEY_EVENTs with a scancode of 0x27 add a mapping for this. 2. Scancode 0x61 is KEY_SWITCHVIDEOMODE. Usually this is a duplicate input event with the "Video Bus" input device events. But on these devices the "Video Bus" does not send events for this key. Map 0x61 to KEY_UNKNOWN instead of using KE_IGNORE so that udev/hwdb can override it on these devs. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20220829163544.5288-1-hdegoede@redhat.com drivers/platform/x86/acer-wmi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 5fbc49cef91916140a305f22f7430e9a7ea0c6b4 Author: Ard Biesheuvel Date: Fri Aug 26 18:48:00 2022 +0200 arm64: mm: Reserve enough pages for the initial ID map The logic that conditionally allocates one additional page at each swapper page table level if KASLR is enabled is also applied to the initial ID map, now that we have started using the same set of macros to allocate the space for it. However, the placement of the kernel in physical memory might result in additional pages being needed at any level, even if KASLR is disabled in the build. So account for this in the computation. Fixes: c3cee924bd85 ("arm64: head: cover entire kernel image in initial ID map") Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220826164800.2059148-1-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/kernel-pgtable.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 6bb0d64c100091e131cd16710b62fda3319cd0af Author: Yu Zhe Date: Thu Aug 25 09:18:44 2022 +0800 perf/arm_pmu_platform: fix tests for platform_get_irq() failure The platform_get_irq() returns negative error codes. It can't actually return zero. Signed-off-by: Yu Zhe Link: https://lore.kernel.org/r/20220825011844.8536-1-yuzhe@nfschina.com Signed-off-by: Will Deacon drivers/perf/arm_pmu_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e62b9e6f25fc99be07c3b7b284262ee74ed645a9 Author: Ard Biesheuvel Date: Sat Aug 27 09:09:04 2022 +0200 arm64: head: Ignore bogus KASLR displacement on non-relocatable kernels Even non-KASLR kernels can be built as relocatable, to work around broken bootloaders that violate the rules regarding physical placement of the kernel image - in this case, the physical offset modulo 2 MiB is used as the KASLR offset, and all absolute symbol references are fixed up in the usual way. This workaround is enabled by default. CONFIG_RELOCATABLE can also be disabled entirely, in which case the relocation code and the code that captures the offset are omitted from the build. However, since commit aacd149b6238 ("arm64: head: avoid relocating the kernel twice for KASLR"), this code got out of sync, and we still add the offset to the kernel virtual address before populating the page tables even though we never capture it. This means we add a bogus value instead, breaking the boot entirely. Fixes: aacd149b6238 ("arm64: head: avoid relocating the kernel twice for KASLR") Signed-off-by: Ard Biesheuvel Tested-by: Mikulas Patocka Link: https://lore.kernel.org/r/20220827070904.2216989-1-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 2 ++ 1 file changed, 2 insertions(+) commit 4831be702b95047c89b3fa5728d07091e9e9f7c9 Author: Levi Yun Date: Wed Aug 31 19:39:13 2022 +0900 arm64/kexec: Fix missing extra range for crashkres_low. Like crashk_res, Calling crash_exclude_mem_range function with crashk_low_res area would need extra crash_mem range too. Add one more extra cmem slot in case of crashk_low_res is used. Signed-off-by: Levi Yun Fixes: 944a45abfabc ("arm64: kdump: Reimplement crashkernel=X") Cc: # 5.19.x Acked-by: Baoquan He Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20220831103913.12661-1-ppbuk5246@gmail.com Signed-off-by: Will Deacon arch/arm64/kernel/machine_kexec_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21457f4a91cb522f1a3ad9741ff1d25fadfaa3c5 Author: David Howells Date: Wed Aug 31 13:24:44 2022 +0100 rxrpc: Remove rxrpc_get_reply_time() which is no longer used Remove rxrpc_get_reply_time() as that is no longer used now that the call issue time is used instead of the reply time. Signed-off-by: David Howells Documentation/networking/rxrpc.rst | 11 ---------- include/net/af_rxrpc.h | 2 -- net/rxrpc/recvmsg.c | 43 -------------------------------------- 3 files changed, 56 deletions(-) commit 7903192c4b4a82d792cb0dc5e2779a2efe60d45b Author: David Howells Date: Wed Aug 31 13:16:42 2022 +0100 afs: Use the operation issue time instead of the reply time for callbacks rxrpc and kafs between them try to use the receive timestamp on the first data packet (ie. the one with sequence number 1) as a base from which to calculate the time at which callback promise and lock expiration occurs. However, we don't know how long it took for the server to send us the reply from it having completed the basic part of the operation - it might then, for instance, have to send a bunch of a callback breaks, depending on the particular operation. Fix this by using the time at which the operation is issued on the client as a base instead. That should never be longer than the server's idea of the expiry time. Fixes: 781070551c26 ("afs: Fix calculation of callback expiry time") Fixes: 2070a3e44962 ("rxrpc: Allow the reply time to be obtained on a client call") Suggested-by: Jeffrey E Altman Signed-off-by: David Howells fs/afs/flock.c | 2 +- fs/afs/fsclient.c | 2 +- fs/afs/internal.h | 3 +-- fs/afs/rxrpc.c | 7 +------ fs/afs/yfsclient.c | 3 +-- 5 files changed, 5 insertions(+), 12 deletions(-) commit 214a9dc7d852216e83acac7b75bc18f01ce184c2 Author: David Howells Date: Tue Apr 5 13:34:09 2022 +0100 rxrpc: Fix calc of resend age Fix the calculation of the resend age to add a microsecond value as microseconds, not nanoseconds. Signed-off-by: David Howells net/rxrpc/call_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3d863036d688313f8d566b87acd7d99daf82749 Author: David Howells Date: Fri May 6 23:55:21 2022 +0100 rxrpc: Fix local destruction being repeated If the local processor work item for the rxrpc local endpoint gets requeued by an event (such as an incoming packet) between it getting scheduled for destruction and the UDP socket being closed, the rxrpc_local_destroyer() function can get run twice. The second time it can hang because it can end up waiting for cleanup events that will never happen. Signed-off-by: David Howells net/rxrpc/local_object.c | 3 +++ 1 file changed, 3 insertions(+) commit 0d40f728e28393a8817d1fcae923dfa3409e488c Author: David Howells Date: Wed Aug 24 22:39:28 2022 +0100 rxrpc: Fix an insufficiently large sglist in rxkad_verify_packet_2() rxkad_verify_packet_2() has a small stack-allocated sglist of 4 elements, but if that isn't sufficient for the number of fragments in the socket buffer, we try to allocate an sglist large enough to hold all the fragments. However, for large packets with a lot of fragments, this isn't sufficient and we need at least one additional fragment. The problem manifests as skb_to_sgvec() returning -EMSGSIZE and this then getting returned by userspace. Most of the time, this isn't a problem as rxrpc sets a limit of 5692, big enough for 4 jumbo subpackets to be glued together; occasionally, however, the server will ignore the reported limit and give a packet that's a lot bigger - say 19852 bytes with ->nr_frags being 7. skb_to_sgvec() then tries to return a "zeroth" fragment that seems to occur before the fragments counted by ->nr_frags and we hit the end of the sglist too early. Note that __skb_to_sgvec() also has an skb_walk_frags() loop that is recursive up to 24 deep. I'm not sure if I need to take account of that too - or if there's an easy way of counting those frags too. Fix this by counting an extra frag and allocating a larger sglist based on that. Fixes: d0d5c0cd1e71 ("rxrpc: Use skb_unshare() rather than skb_cow_data()") Reported-by: Marc Dionne Signed-off-by: David Howells cc: linux-afs@lists.infradead.org net/rxrpc/rxkad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac56a0b48da86fd1b4389632fb7c4c8a5d86eefa Author: David Howells Date: Fri Aug 26 15:39:28 2022 +0100 rxrpc: Fix ICMP/ICMP6 error handling Because rxrpc pretends to be a tunnel on top of a UDP/UDP6 socket, allowing it to siphon off UDP packets early in the handling of received UDP packets thereby avoiding the packet going through the UDP receive queue, it doesn't get ICMP packets through the UDP ->sk_error_report() callback. In fact, it doesn't appear that there's any usable option for getting hold of ICMP packets. Fix this by adding a new UDP encap hook to distribute error messages for UDP tunnels. If the hook is set, then the tunnel driver will be able to see ICMP packets. The hook provides the offset into the packet of the UDP header of the original packet that caused the notification. An alternative would be to call the ->error_handler() hook - but that requires that the skbuff be cloned (as ip_icmp_error() or ipv6_cmp_error() do, though isn't really necessary or desirable in rxrpc's case is we want to parse them there and then, not queue them). Changes ======= ver #3) - Fixed an uninitialised variable. ver #2) - Fixed some missing CONFIG_AF_RXRPC_IPV6 conditionals. Fixes: 5271953cad31 ("rxrpc: Use the UDP encap_rcv hook") Signed-off-by: David Howells include/linux/udp.h | 1 + include/net/udp_tunnel.h | 4 + net/ipv4/udp.c | 2 + net/ipv4/udp_tunnel_core.c | 1 + net/ipv6/udp.c | 5 +- net/rxrpc/ar-internal.h | 1 + net/rxrpc/local_object.c | 1 + net/rxrpc/peer_event.c | 293 +++++++++++++++++++++++++++++++++++++++------ 8 files changed, 270 insertions(+), 38 deletions(-) commit 0495e337b7039191dfce6e03f5f830454b1fae6b Author: Waiman Long Date: Fri Aug 12 14:30:33 2022 -0400 mm/slab_common: Deleting kobject in kmem_cache_destroy() without holding slab_mutex/cpu_hotplug_lock A circular locking problem is reported by lockdep due to the following circular locking dependency. +--> cpu_hotplug_lock --> slab_mutex --> kn->active --+ | | +-----------------------------------------------------+ The forward cpu_hotplug_lock ==> slab_mutex ==> kn->active dependency happens in kmem_cache_destroy(): cpus_read_lock(); mutex_lock(&slab_mutex); ==> sysfs_slab_unlink() ==> kobject_del() ==> kernfs_remove() ==> __kernfs_remove() ==> kernfs_drain(): rwsem_acquire(&kn->dep_map, ...); The backward kn->active ==> cpu_hotplug_lock dependency happens in kernfs_fop_write_iter(): kernfs_get_active(); ==> slab_attr_store() ==> cpu_partial_store() ==> flush_all(): cpus_read_lock() One way to break this circular locking chain is to avoid holding cpu_hotplug_lock and slab_mutex while deleting the kobject in sysfs_slab_unlink() which should be equivalent to doing a write_lock and write_unlock pair of the kn->active virtual lock. Since the kobject structures are not protected by slab_mutex or the cpu_hotplug_lock, we can certainly release those locks before doing the delete operation. Move sysfs_slab_unlink() and sysfs_slab_release() to the newly created kmem_cache_release() and call it outside the slab_mutex & cpu_hotplug_lock critical sections. There will be a slight delay in the deletion of sysfs files if kmem_cache_release() is called indirectly from a work function. Fixes: 5a836bf6b09f ("mm: slub: move flush_cpu_slab() invocations __free_slab() invocations out of IRQ context") Signed-off-by: Waiman Long Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Roman Gushchin Acked-by: David Rientjes Link: https://lore.kernel.org/all/YwOImVd+nRUsSAga@hyeyoo/ Signed-off-by: Vlastimil Babka mm/slab_common.c | 45 +++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-) commit a6aedb58a887aa2ea142ee914ff4030d019584bf Merge: 58bfe7d8e310 41ca302a697b Author: Greg Kroah-Hartman Date: Thu Sep 1 11:10:10 2022 +0200 Merge tag 'usb-serial-6.0-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: "USB-serial fixes for 6.0-rc4 Here are a couple of fixes for two long-standing issues with some older ch341 devices and a number of new device ids. All have been in linux-next with no reported issues." * tag 'usb-serial-6.0-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: ch341: fix disabled rx timer on older devices USB: serial: ch341: fix lost character on LCR updates USB: serial: cp210x: add Decagon UCA device id USB: serial: option: add support for Cinterion MV32-WA/WB RmNet mode USB: serial: ftdi_sio: add Omron CS1W-CIF31 device id USB: serial: option: add Quectel EM060K modem USB: serial: option: add support for OPPO R11 diag port commit 4ef3f2aff1267bfa6d5a90c42a30b927b8aa239b Author: Srinivas Kandagatla Date: Fri Jul 8 11:47:47 2022 +0100 soundwire: qcom: fix device status array range This patch updates device status array range from 11 to 12 as we will be reading status from device number 0 to device number 11 inclusive. Without this patch we can potentially access status array out of range during auto-enumeration. Fixes: aa1262ca6695 ("soundwire: qcom: Check device status before reading devid") Reported-by: Dan Carpenter Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220708104747.8722-1-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul drivers/soundwire/qcom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2027f114686e0f3f1f39971964dfc618637c88c2 Author: Takashi Iwai Date: Wed Aug 31 14:59:01 2022 +0200 ALSA: usb-audio: Register card again for iface over delayed_register option When the delayed registration is specified via either delayed_register option or the quirk, we delay the invocation of snd_card_register() until the given interface. But if a wrong value has been set there and there are more interfaces over the given interface number, snd_card_register() call would be missing for those interfaces. This patch catches up those missing calls by fixing the comparison of the interface number. Now the call is skipped only if the processed interface is less than the given interface, instead of the exact match. Fixes: b70038ef4fea ("ALSA: usb-audio: Add delayed_register option") Link: https://bugzilla.kernel.org/show_bug.cgi?id=216082 Link: https://lore.kernel.org/r/20220831125901.4660-2-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/card.c | 2 +- sound/usb/quirks.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7e1afce5866e02b45bf88c27dd7de1b9dfade1cc Author: Takashi Iwai Date: Wed Aug 31 14:59:00 2022 +0200 ALSA: usb-audio: Inform the delayed registration more properly The info message that was added in the commit a4aad5636c72 ("ALSA: usb-audio: Inform devices that need delayed registration") is actually useful to know the need for the delayed registration. However, it turned out that this doesn't catch the all cases; namely, this warned only when a PCM stream is attached onto the existing PCM instance, but it doesn't count for a newly created PCM instance. This made confusion as if there were no further delayed registration. This patch moves the check to the code path for either adding a stream or creating a PCM instance. Also, make it simpler by checking the card->registered flag instead of querying each snd_device state. Fixes: a4aad5636c72 ("ALSA: usb-audio: Inform devices that need delayed registration") Link: https://bugzilla.kernel.org/show_bug.cgi?id=216082 Link: https://lore.kernel.org/r/20220831125901.4660-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/stream.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a8424a9b4522a3ab9f32175ad6d848739079071f Author: Yacan Liu Date: Tue Aug 30 23:23:14 2022 +0800 net/smc: Remove redundant refcount increase For passive connections, the refcount increment has been done in smc_clcsock_accept()-->smc_sock_alloc(). Fixes: 3b2dec2603d5 ("net/smc: restructure client and server code in af_smc") Signed-off-by: Yacan Liu Reviewed-by: Tony Lu Link: https://lore.kernel.org/r/20220830152314.838736-1-liuyacan@corp.netease.com Signed-off-by: Paolo Abeni net/smc/af_smc.c | 1 - 1 file changed, 1 deletion(-) commit 12f35199a2c0551187edbf8eb01379f0598659fa Author: yangx.jy@fujitsu.com Date: Wed Aug 31 08:16:29 2022 +0000 RDMA/srp: Set scmnd->result only when scmnd is not NULL This change fixes the following kernel NULL pointer dereference which is reproduced by blktests srp/007 occasionally. BUG: kernel NULL pointer dereference, address: 0000000000000170 PGD 0 P4D 0 Oops: 0002 [#1] PREEMPT SMP NOPTI CPU: 0 PID: 9 Comm: kworker/0:1H Kdump: loaded Not tainted 6.0.0-rc1+ #37 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.15.0-29-g6a62e0cb0dfe-prebuilt.qemu.org 04/01/2014 Workqueue: 0x0 (kblockd) RIP: 0010:srp_recv_done+0x176/0x500 [ib_srp] Code: 00 4d 85 ff 0f 84 52 02 00 00 48 c7 82 80 02 00 00 00 00 00 00 4c 89 df 4c 89 14 24 e8 53 d3 4a f6 4c 8b 14 24 41 0f b6 42 13 <41> 89 87 70 01 00 00 41 0f b6 52 12 f6 c2 02 74 44 41 8b 42 1c b9 RSP: 0018:ffffaef7c0003e28 EFLAGS: 00000282 RAX: 0000000000000000 RBX: ffff9bc9486dea60 RCX: 0000000000000000 RDX: 0000000000000102 RSI: ffffffffb76bbd0e RDI: 00000000ffffffff RBP: ffff9bc980099a00 R08: 0000000000000001 R09: 0000000000000001 R10: ffff9bca53ef0000 R11: ffff9bc980099a10 R12: ffff9bc956e14000 R13: ffff9bc9836b9cb0 R14: ffff9bc9557b4480 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff9bc97ec00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000170 CR3: 0000000007e04000 CR4: 00000000000006f0 Call Trace: __ib_process_cq+0xb7/0x280 [ib_core] ib_poll_handler+0x2b/0x130 [ib_core] irq_poll_softirq+0x93/0x150 __do_softirq+0xee/0x4b8 irq_exit_rcu+0xf7/0x130 sysvec_apic_timer_interrupt+0x8e/0xc0 Fixes: ad215aaea4f9 ("RDMA/srp: Make struct scsi_cmnd and struct srp_request adjacent") Link: https://lore.kernel.org/r/20220831081626.18712-1-yangx.jy@fujitsu.com Signed-off-by: Xiao Yang Acked-by: Bart Van Assche Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/srp/ib_srp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a54569b1f9721be11ca5b2c8a8bb3c652ebf576c Merge: b90cb1053190 6067c82c576a Author: Dave Airlie Date: Thu Sep 1 16:14:58 2022 +1000 Merge tag 'drm-intel-fixes-2022-08-26' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - GVT fixes including fix for a CommetLake regression in mmio table and misc doc and typo fixes - Fix CCS handling (Matt) - Fix for guc requests after reset (Daniele) - Display DSI related fixes (Jani) - Display backlight related fixes (Arun, Jouni) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YwjCTDFm7clXPgEu@intel.com commit 8fe4ce5836e932f5766317cb651c1ff2a4cd0506 Author: Bart Van Assche Date: Thu Aug 25 17:26:34 2022 -0700 scsi: core: Fix a use-after-free There are two .exit_cmd_priv implementations. Both implementations use resources associated with the SCSI host. Make sure that these resources are still available when .exit_cmd_priv is called by waiting inside scsi_remove_host() until the tag set has been freed. This commit fixes the following use-after-free: ================================================================== BUG: KASAN: use-after-free in srp_exit_cmd_priv+0x27/0xd0 [ib_srp] Read of size 8 at addr ffff888100337000 by task multipathd/16727 Call Trace: dump_stack_lvl+0x34/0x44 print_report.cold+0x5e/0x5db kasan_report+0xab/0x120 srp_exit_cmd_priv+0x27/0xd0 [ib_srp] scsi_mq_exit_request+0x4d/0x70 blk_mq_free_rqs+0x143/0x410 __blk_mq_free_map_and_rqs+0x6e/0x100 blk_mq_free_tag_set+0x2b/0x160 scsi_host_dev_release+0xf3/0x1a0 device_release+0x54/0xe0 kobject_put+0xa5/0x120 device_release+0x54/0xe0 kobject_put+0xa5/0x120 scsi_device_dev_release_usercontext+0x4c1/0x4e0 execute_in_process_context+0x23/0x90 device_release+0x54/0xe0 kobject_put+0xa5/0x120 scsi_disk_release+0x3f/0x50 device_release+0x54/0xe0 kobject_put+0xa5/0x120 disk_release+0x17f/0x1b0 device_release+0x54/0xe0 kobject_put+0xa5/0x120 dm_put_table_device+0xa3/0x160 [dm_mod] dm_put_device+0xd0/0x140 [dm_mod] free_priority_group+0xd8/0x110 [dm_multipath] free_multipath+0x94/0xe0 [dm_multipath] dm_table_destroy+0xa2/0x1e0 [dm_mod] __dm_destroy+0x196/0x350 [dm_mod] dev_remove+0x10c/0x160 [dm_mod] ctl_ioctl+0x2c2/0x590 [dm_mod] dm_ctl_ioctl+0x5/0x10 [dm_mod] __x64_sys_ioctl+0xb4/0xf0 dm_ctl_ioctl+0x5/0x10 [dm_mod] __x64_sys_ioctl+0xb4/0xf0 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Link: https://lore.kernel.org/r/20220826002635.919423-1-bvanassche@acm.org Fixes: 65ca846a5314 ("scsi: core: Introduce {init,exit}_cmd_priv()") Cc: Ming Lei Cc: Christoph Hellwig Cc: Mike Christie Cc: Hannes Reinecke Cc: John Garry Cc: Li Zhijian Reported-by: Li Zhijian Tested-by: Li Zhijian Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/hosts.c | 16 +++++++++++++--- drivers/scsi/scsi_lib.c | 6 +++++- drivers/scsi/scsi_priv.h | 2 +- drivers/scsi/scsi_scan.c | 1 + drivers/scsi/scsi_sysfs.c | 1 + include/scsi/scsi_host.h | 2 ++ 6 files changed, 23 insertions(+), 5 deletions(-) commit f782201ebc2b5f6c7a22e586e8eb81fe1d9e4801 Author: Bart Van Assche Date: Sun Aug 21 15:05:02 2022 -0700 scsi: core: Revert "Make sure that targets outlive devices" Revert the patch series "Call blk_mq_free_tag_set() earlier" because it introduces a deadlock if the scsi_remove_host() caller holds a reference on a device, target or host. Link: https://lore.kernel.org/r/20220821220502.13685-5-bvanassche@acm.org Fixes: fe442604199e ("scsi: core: Make sure that targets outlive devices") Reported-by: syzbot+bafeb834708b1bb750bc@syzkaller.appspotmail.com Tested-by: Kenneth R. Crudup Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_scan.c | 2 -- drivers/scsi/scsi_sysfs.c | 20 +++----------------- include/scsi/scsi_device.h | 2 -- 3 files changed, 3 insertions(+), 21 deletions(-) commit d94b2d00f7bfa0c555e7b8724b1faa037d57d150 Author: Bart Van Assche Date: Sun Aug 21 15:05:01 2022 -0700 scsi: core: Revert "Make sure that hosts outlive targets" Revert the patch series "Call blk_mq_free_tag_set() earlier" because it introduces a deadlock if the scsi_remove_host() caller holds a reference on a device, target or host. Link: https://lore.kernel.org/r/20220821220502.13685-4-bvanassche@acm.org Fixes: 16728aaba62e ("scsi: core: Make sure that hosts outlive targets") Reported-by: syzbot+bafeb834708b1bb750bc@syzkaller.appspotmail.com Tested-by: Kenneth R. Crudup Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/hosts.c | 8 -------- drivers/scsi/scsi_scan.c | 7 ------- include/scsi/scsi_host.h | 3 --- 3 files changed, 18 deletions(-) commit 70e8d057bef5367709f4eda15b8d9a40d1b45e90 Author: Bart Van Assche Date: Sun Aug 21 15:05:00 2022 -0700 scsi: core: Revert "Simplify LLD module reference counting" Revert the patch series "Call blk_mq_free_tag_set() earlier" because it introduces a deadlock if the scsi_remove_host() caller holds a reference on a device, target or host. Link: https://lore.kernel.org/r/20220821220502.13685-3-bvanassche@acm.org Fixes: 1a9283782df2 ("scsi: core: Simplify LLD module reference counting") Reported-by: syzbot+bafeb834708b1bb750bc@syzkaller.appspotmail.com Tested-by: Kenneth R. Crudup Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi.c | 9 +++------ drivers/scsi/scsi_sysfs.c | 9 +++++++++ 2 files changed, 12 insertions(+), 6 deletions(-) commit 2b36209ca8182c5e0221dd416106d434de433d34 Author: Bart Van Assche Date: Sun Aug 21 15:04:59 2022 -0700 scsi: core: Revert "Call blk_mq_free_tag_set() earlier" Revert the patch series "Call blk_mq_free_tag_set() earlier" because it introduces a deadlock if the scsi_remove_host() caller holds a reference on a device, target or host. Link: https://lore.kernel.org/r/20220821220502.13685-2-bvanassche@acm.org Fixes: f323896fe6fa ("scsi: core: Call blk_mq_free_tag_set() earlier") Reported-by: syzbot+bafeb834708b1bb750bc@syzkaller.appspotmail.com Tested-by: Kenneth R. Crudup Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/hosts.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit da6d507f5ff328f346b3c50e19e19993027b8ffd Author: Yang Yingliang Date: Tue Aug 23 12:42:37 2022 +0800 scsi: lpfc: Add missing destroy_workqueue() in error path Add the missing destroy_workqueue() before return from lpfc_sli4_driver_resource_setup() in the error path. Link: https://lore.kernel.org/r/20220823044237.285643-1-yangyingliang@huawei.com Fixes: 3cee98db2610 ("scsi: lpfc: Fix crash on driver unload in wq free") Reviewed-by: James Smart Signed-off-by: Yang Yingliang Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c0a50cd389c3ed54831e240023dd12bafa56b3a6 Author: Hannes Reinecke Date: Wed Aug 24 08:00:33 2022 +0200 scsi: lpfc: Return DID_TRANSPORT_DISRUPTED instead of DID_REQUEUE When the driver hits an internal error condition returning DID_REQUEUE the I/O will be retried on the same ITL nexus. This will inhibit multipathing, resulting in endless retries even if the error could have been resolved by using a different ITL nexus. Return DID_TRANSPORT_DISRUPTED to allow for multipath to engage and route I/O to another ITL nexus. Link: https://lore.kernel.org/r/20220824060033.138661-1-hare@suse.de Reviewed-by: James Smart Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_scsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0b4f688d53fdc2a731b9d9cdf0c96255bc024ea6 Author: Jakub Kicinski Date: Wed Aug 31 20:01:32 2022 -0700 Revert "sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb" This reverts commit 90fabae8a2c225c4e4936723c38857887edde5cc. Patch was applied hastily, revert and let the v2 be reviewed. Fixes: 90fabae8a2c2 ("sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb") Link: https://lore.kernel.org/all/87wnao2ha3.fsf@toke.dk/ Signed-off-by: Jakub Kicinski net/sched/sch_cake.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a3daac631e4824a68a5449f60dd86b90bb7be91a Merge: 52267ce25f60 79e3602caa6f Author: Jakub Kicinski Date: Wed Aug 31 19:56:53 2022 -0700 Merge branch 'tcp-tcp-challenge-ack-fixes' Eric Dumazet says: ==================== tcp: tcp challenge ack fixes syzbot found a typical data-race addressed in the first patch. While we are at it, second patch makes the global rate limit per net-ns and disabled by default. ==================== Link: https://lore.kernel.org/r/20220830185656.268523-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit 79e3602caa6f9d59c4f66a268407080496dae408 Author: Eric Dumazet Date: Tue Aug 30 11:56:56 2022 -0700 tcp: make global challenge ack rate limitation per net-ns and default disabled Because per host rate limiting has been proven problematic (side channel attacks can be based on it), per host rate limiting of challenge acks ideally should be per netns and turned off by default. This is a long due followup of following commits: 083ae308280d ("tcp: enable per-socket rate limiting of all 'challenge acks'") f2b2c582e824 ("tcp: mitigate ACK loops for connections as tcp_sock") 75ff39ccc1bd ("tcp: make challenge acks less predictable") Signed-off-by: Eric Dumazet Cc: Jason Baron Acked-by: Neal Cardwell Signed-off-by: Jakub Kicinski Documentation/networking/ip-sysctl.rst | 5 ++++- include/net/netns/ipv4.h | 2 ++ net/ipv4/tcp_input.c | 21 +++++++++++---------- net/ipv4/tcp_ipv4.c | 6 ++++-- 4 files changed, 21 insertions(+), 13 deletions(-) commit 8c70521238b7863c2af607e20bcba20f974c969b Author: Eric Dumazet Date: Tue Aug 30 11:56:55 2022 -0700 tcp: annotate data-race around challenge_timestamp challenge_timestamp can be read an written by concurrent threads. This was expected, but we need to annotate the race to avoid potential issues. Following patch moves challenge_timestamp and challenge_count to per-netns storage to provide better isolation. Fixes: 354e4aa391ed ("tcp: RFC 5961 5.2 Blind Data Injection Attack Mitigation") Reported-by: syzbot Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Signed-off-by: Jakub Kicinski net/ipv4/tcp_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 52267ce25f60f37ae40ccbca0b21328ebae5ae75 Author: Kurt Kanzenbach Date: Tue Aug 30 18:34:48 2022 +0200 net: dsa: hellcreek: Print warning only once In case the source port cannot be decoded, print the warning only once. This still brings attention to the user and does not spam the logs at the same time. Signed-off-by: Kurt Kanzenbach Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220830163448.8921-1-kurt@linutronix.de Signed-off-by: Jakub Kicinski net/dsa/tag_hellcreek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb55dc09b5dd040232d5de32812cc83001a23da6 Author: Nicolas Dichtel Date: Mon Aug 29 12:01:21 2022 +0200 ip: fix triggering of 'icmp redirect' __mkroute_input() uses fib_validate_source() to trigger an icmp redirect. My understanding is that fib_validate_source() is used to know if the src address and the gateway address are on the same link. For that, fib_validate_source() returns 1 (same link) or 0 (not the same network). __mkroute_input() is the only user of these positive values, all other callers only look if the returned value is negative. Since the below patch, fib_validate_source() didn't return anymore 1 when both addresses are on the same network, because the route lookup returns RT_SCOPE_LINK instead of RT_SCOPE_HOST. But this is, in fact, right. Let's adapat the test to return 1 again when both addresses are on the same link. CC: stable@vger.kernel.org Fixes: 747c14307214 ("ip: fix dflt addr selection for connected nexthop") Reported-by: kernel test robot Reported-by: Heng Qi Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20220829100121.3821-1-nicolas.dichtel@6wind.com Signed-off-by: Jakub Kicinski net/ipv4/fib_frontend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0efe125cfb99e6773a7434f3463f7c2fa28f3a43 Author: David Leadbeater Date: Fri Aug 26 14:56:58 2022 +1000 netfilter: nf_conntrack_irc: Fix forged IP logic Ensure the match happens in the right direction, previously the destination used was the server, not the NAT host, as the comment shows the code intended. Additionally nf_nat_irc uses port 0 as a signal and there's no valid way it can appear in a DCC message, so consider port 0 also forged. Fixes: 869f37d8e48f ("[NETFILTER]: nf_conntrack/nf_nat: add IRC helper port") Signed-off-by: David Leadbeater Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_irc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2555283eb40df89945557273121e9393ef9b542b Author: Jann Horn Date: Wed Aug 31 19:06:00 2022 +0200 mm/rmap: Fix anon_vma->degree ambiguity leading to double-reuse anon_vma->degree tracks the combined number of child anon_vmas and VMAs that use the anon_vma as their ->anon_vma. anon_vma_clone() then assumes that for any anon_vma attached to src->anon_vma_chain other than src->anon_vma, it is impossible for it to be a leaf node of the VMA tree, meaning that for such VMAs ->degree is elevated by 1 because of a child anon_vma, meaning that if ->degree equals 1 there are no VMAs that use the anon_vma as their ->anon_vma. This assumption is wrong because the ->degree optimization leads to leaf nodes being abandoned on anon_vma_clone() - an existing anon_vma is reused and no new parent-child relationship is created. So it is possible to reuse an anon_vma for one VMA while it is still tied to another VMA. This is an issue because is_mergeable_anon_vma() and its callers assume that if two VMAs have the same ->anon_vma, the list of anon_vmas attached to the VMAs is guaranteed to be the same. When this assumption is violated, vma_merge() can merge pages into a VMA that is not attached to the corresponding anon_vma, leading to dangling page->mapping pointers that will be dereferenced during rmap walks. Fix it by separately tracking the number of child anon_vmas and the number of VMAs using the anon_vma as their ->anon_vma. Fixes: 7a3ef208e662 ("mm: prevent endless growth of anon_vma hierarchy") Cc: stable@kernel.org Acked-by: Michal Hocko Acked-by: Vlastimil Babka Signed-off-by: Jann Horn Signed-off-by: Linus Torvalds include/linux/rmap.h | 7 +++++-- mm/rmap.c | 29 ++++++++++++++++------------- 2 files changed, 21 insertions(+), 15 deletions(-) commit 90fabae8a2c225c4e4936723c38857887edde5cc Author: Toke Høiland-Jørgensen Date: Wed Aug 31 11:21:03 2022 +0200 sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb When the GSO splitting feature of sch_cake is enabled, GSO superpackets will be broken up and the resulting segments enqueued in place of the original skb. In this case, CAKE calls consume_skb() on the original skb, but still returns NET_XMIT_SUCCESS. This can confuse parent qdiscs into assuming the original skb still exists, when it really has been freed. Fix this by adding the __NET_XMIT_STOLEN flag to the return value in this case. Fixes: 0c850344d388 ("sch_cake: Conditionally split GSO segments") Signed-off-by: Toke Høiland-Jørgensen Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-18231 Link: https://lore.kernel.org/r/20220831092103.442868-1-toke@toke.dk Signed-off-by: Jakub Kicinski net/sched/sch_cake.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 39c84b8e929dbd4f63be7e04bf1a2bcd92b44177 Author: Chengming Gui Date: Tue Aug 30 16:33:01 2022 +0800 drm/amd/amdgpu: skip ucode loading if ucode_size == 0 Restrict the ucode loading check to avoid frontdoor loading error. Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a3a59981027b53ec0f729ad76a43ce2b64ad968 Author: Axel Rasmussen Date: Mon Aug 29 11:47:48 2022 -0700 selftests: net: sort .gitignore file This is the result of `sort tools/testing/selftests/net/.gitignore`, but preserving the comment at the top. Suggested-by: Jakub Kicinski Signed-off-by: Axel Rasmussen Link: https://lore.kernel.org/r/20220829184748.1535580-1-axelrasmussen@google.com Signed-off-by: Jakub Kicinski tools/testing/selftests/net/.gitignore | 50 +++++++++++++++++----------------- 1 file changed, 25 insertions(+), 25 deletions(-) commit 404a5ad72011f5bd2bb90f0a035be7635e2bd839 Author: Randy Dunlap Date: Mon Aug 29 16:54:14 2022 -0700 Documentation: networking: correct possessive "its" Change occurrences of "it's" that are possessive to "its" so that they don't read as "it is". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: Eric Dumazet Cc: Paolo Abeni Cc: Jiri Pirko Link: https://lore.kernel.org/r/20220829235414.17110-1-rdunlap@infradead.org Signed-off-by: Jakub Kicinski Documentation/networking/devlink/netdevsim.rst | 2 +- Documentation/networking/driver.rst | 2 +- Documentation/networking/ipvlan.rst | 2 +- Documentation/networking/l2tp.rst | 2 +- Documentation/networking/switchdev.rst | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 8fc29ff3910f3af08a7c40a75d436b5720efe2bf Author: Cong Wang Date: Sat Aug 27 11:13:14 2022 -0700 kcm: fix strp_init() order and cleanup strp_init() is called just a few lines above this csk->sk_user_data check, it also initializes strp->work etc., therefore, it is unnecessary to call strp_done() to cancel the freshly initialized work. And if sk_user_data is already used by KCM, psock->strp should not be touched, particularly strp->work state, so we need to move strp_init() after the csk->sk_user_data check. This also makes a lockdep warning reported by syzbot go away. Reported-and-tested-by: syzbot+9fc084a4348493ef65d2@syzkaller.appspotmail.com Reported-by: syzbot+e696806ef96cdd2d87cd@syzkaller.appspotmail.com Fixes: e5571240236c ("kcm: Check if sk_user_data already set in kcm_attach") Fixes: dff8baa26117 ("kcm: Call strp_stop before strp_done in kcm_attach") Cc: Tom Herbert Signed-off-by: Cong Wang Link: https://lore.kernel.org/r/20220827181314.193710-1-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski net/kcm/kcmsock.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 3a1a274e933fca73fdc960cb1f60636cd285a265 Author: David Thompson Date: Fri Aug 26 11:59:16 2022 -0400 mlxbf_gige: compute MDIO period based on i1clk This patch adds logic to compute the MDIO period based on the i1clk, and thereafter write the MDIO period into the YU MDIO config register. The i1clk resource from the ACPI table is used to provide addressing to YU bootrecord PLL registers. The values in these registers are used to compute MDIO period. If the i1clk resource is not present in the ACPI table, then the current default hardcorded value of 430Mhz is used. The i1clk clock value of 430MHz is only accurate for boards with BF2 mid bin and main bin SoCs. The BF2 high bin SoCs have i1clk = 500MHz, but can support a slower MDIO period. Fixes: f92e1869d74e ("Add Mellanox BlueField Gigabit Ethernet driver") Reviewed-by: Asmaa Mnebhi Signed-off-by: David Thompson Link: https://lore.kernel.org/r/20220826155916.12491-1-davthompson@nvidia.com Signed-off-by: Jakub Kicinski .../net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h | 4 +- .../ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c | 122 ++++++++++++++++++--- .../ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h | 2 + 3 files changed, 110 insertions(+), 18 deletions(-) commit abb5f3f4b1f5f0ad50eb067a00051d3587dec9fb Author: Stephen Boyd Date: Wed Aug 31 10:53:25 2022 -0700 Revert "clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops" This reverts commit 35b0fac808b95eea1212f8860baf6ad25b88b087. Alexander reports that it causes boot failures on i.MX8M Plus based boards (specifically imx8mp-tqma8mpql-mba8mpxl.dts). Reported-by: Alexander Stein Cc: Chen-Yu Tsai Fixes: 35b0fac808b9 ("clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops") Link: https://lore.kernel.org/r/12115951.O9o76ZdvQC@steina-w Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20220831175326.2523912-1-sboyd@kernel.org drivers/clk/clk.c | 28 ---------------------------- 1 file changed, 28 deletions(-) commit c5e4d5e99162ba8025d58a3af7ad103f155d2df7 Merge: a1f764268f33 1122f4007273 Author: Linus Torvalds Date: Wed Aug 31 10:13:34 2022 -0700 Merge tag 'fscache-fixes-20220831' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull fscache/cachefiles fixes from David Howells: - Fix kdoc on fscache_use/unuse_cookie(). - Fix the error returned by cachefiles_ondemand_copen() from an upcall result. - Fix the distribution of requests in on-demand mode in cachefiles to be fairer by cycling through them rather than picking the one with the lowest ID each time (IDs being reused). * tag 'fscache-fixes-20220831' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: cachefiles: make on-demand request distribution fairer cachefiles: fix error return code in cachefiles_ondemand_copen() fscache: fix misdocumented parameter commit a1f764268f3390406f4dcbe3d2f537f2424f22ca Merge: 2361d3841fdd 1ff89e06c2e5 Author: Linus Torvalds Date: Wed Aug 31 09:54:14 2022 -0700 Merge tag 'for-linus-2022083101' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - NULL pointer dereference fix for Steam driver (Lee Jones) - memory leak fix for hidraw (Karthik Alapati) - regression fix for functionality of some UCLogic tables (Benjamin Tissoires) - a few new device IDs and device-specific quirks * tag 'for-linus-2022083101' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: nintendo: fix rumble worker null pointer deref HID: intel-ish-hid: ipc: Add Meteor Lake PCI device ID HID: input: fix uclogic tablets HID: Add Apple Touchbar on T2 Macs in hid_have_special_driver list HID: add Lenovo Yoga C630 battery quirk HID: AMD_SFH: Add a DMI quirk entry for Chromebooks HID: thrustmaster: Add sparco wheel and fix array length hid: intel-ish-hid: ishtp: Fix ishtp client sending disordered message HID: ishtp-hid-clientHID: ishtp-hid-client: Fix comment typo HID: asus: ROG NKey: Ignore portion of 0x5a report HID: hidraw: fix memory leak in hidraw_release() HID: steam: Prevent NULL pointer dereference in steam_{recv,send}_report commit 2361d3841fddffdd4b495a4510c507f0b8f17061 Merge: 9c9d1896fa92 874b301985ef Author: Linus Torvalds Date: Wed Aug 31 09:47:06 2022 -0700 Merge tag 'v6.0-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "Fix a boot performance regression due to an unnecessary dependency on XOR_BLOCKS" * tag 'v6.0-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: lib - remove unneeded selection of XOR_BLOCKS commit 35503ce12a2c3d5d9a94e3cd85a06739b0120f79 Author: Jiri Olsa Date: Wed Aug 31 14:40:41 2022 +0200 perf script: Skip dummy event attr check Hongtao Yu reported problem when displaying uregs in perf script for system wide perf.data: # perf script -F uregs | head -10 Samples for 'dummy:HG' event do not have UREGS attribute set. Cannot print 'uregs' field. The problem is the extra dummy event added for system wide, which does not have proper sample_type setup. Skipping attr check completely for dummy event as suggested by Namhyung, because it does not have any samples anyway. Reported-by: Hongtao Yu Suggested-by: Namhyung Kim Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220831124041.219925-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 2 ++ 1 file changed, 2 insertions(+) commit 9c9d1896fa92e05e7af5a7a47e335f834aa4248c Merge: dcf8e5633e2e dd9373402280 Author: Linus Torvalds Date: Wed Aug 31 09:23:16 2022 -0700 Merge tag 'lsm-pr-20220829' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm Pull LSM support for IORING_OP_URING_CMD from Paul Moore: "Add SELinux and Smack controls to the io_uring IORING_OP_URING_CMD. These are necessary as without them the IORING_OP_URING_CMD remains outside the purview of the LSMs (Luis' LSM patch, Casey's Smack patch, and my SELinux patch). They have been discussed at length with the io_uring folks, and Jens has given his thumbs-up on the relevant patches (see the commit descriptions). There is one patch that is not strictly necessary, but it makes testing much easier and is very trivial: the /dev/null IORING_OP_URING_CMD patch." * tag 'lsm-pr-20220829' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: Smack: Provide read control for io_uring_cmd /dev/null: add IORING_OP_URING_CMD support selinux: implement the security_uring_cmd() LSM hook lsm,io_uring: add LSM hooks for the new uring_cmd file op commit 0dec364ffeb6149aae572ded1e34d4b444c23be6 Author: Conor Dooley Date: Thu Aug 25 19:04:18 2022 +0100 riscv: dts: microchip: use an mpfs specific l2 compatible PolarFire SoC does not have the same l2 cache controller as the fu540, featuring an extra interrupt. Appease the devicetree checker overlords by adding a PolarFire SoC specific compatible to fix the below sort of warnings: mpfs-polarberry.dtb: cache-controller@2010000: interrupts: [[1], [3], [4], [2]] is too long Fixes: 0fa6107eca41 ("RISC-V: Initial DTS for Microchip ICICLE board") Fixes: 34fc9cc3aebe ("riscv: dts: microchip: correct L2 cache interrupts") Reviewed-by: Heinrich Schuchardt Signed-off-by: Conor Dooley arch/riscv/boot/dts/microchip/mpfs.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17e4732d1d8a859fbb56e5f050e05d3142b88f96 Author: Conor Dooley Date: Thu Aug 25 19:04:17 2022 +0100 dt-bindings: riscv: sifive-l2: add a PolarFire SoC compatible The l2 cache on PolarFire SoC is cross between that of the fu540 and the fu740. It has the extra interrupt from the fu740 but the lower number of cache-sets. Add a specific compatible to avoid the likes of: mpfs-polarberry.dtb: cache-controller@2010000: interrupts: [[1], [3], [4], [2]] is too long Fixes: 34fc9cc3aebe ("riscv: dts: microchip: correct L2 cache interrupts") Reviewed-by: Rob Herring Signed-off-by: Conor Dooley .../devicetree/bindings/riscv/sifive-l2-cache.yaml | 79 ++++++++++++++-------- 1 file changed, 49 insertions(+), 30 deletions(-) commit ee0175b3b44288c74d5292c2a9c2c154f6c0317e Author: Sander Vanheule Date: Sun Aug 7 21:21:15 2022 +0200 gpio: realtek-otto: switch to 32-bit I/O By using 16-bit I/O on the GPIO peripheral, which is apparently not safe on MIPS, the IMR can end up containing garbage. This then results in interrupt triggers for lines that don't have an interrupt handler associated. The irq_desc lookup fails, and the ISR will not be cleared, keeping the CPU busy until reboot, or until another IMR operation restores the correct value. This situation appears to happen very rarely, for < 0.5% of IMR writes. Instead of using 8-bit or 16-bit I/O operations on the 32-bit memory mapped peripheral registers, switch to using 32-bit I/O only, operating on the entire bank for all single bit line settings. For 2-bit line settings, with 16-bit port values, stick to manual (un)packing. This issue has been seen on RTL8382M (HPE 1920-16G), RTL8391M (Netgear GS728TP v2), and RTL8393M (D-Link DGS-1210-52 F3, Zyxel GS1900-48). Reported-by: Luiz Angelo Daros de Luca # DGS-1210-52 Reported-by: Birger Koblitz # GS728TP Reported-by: Jan Hoffmann # 1920-16G Fixes: 0d82fb1127fb ("gpio: Add Realtek Otto GPIO support") Signed-off-by: Sander Vanheule Cc: Paul Cercueil Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-realtek-otto.c | 166 ++++++++++++++++++++------------------- 1 file changed, 85 insertions(+), 81 deletions(-) commit 1122f40072731525c06b1371cfa30112b9b54d27 Author: Xin Yin Date: Thu Aug 25 10:09:45 2022 +0800 cachefiles: make on-demand request distribution fairer For now, enqueuing and dequeuing on-demand requests all start from idx 0, this makes request distribution unfair. In the weighty concurrent I/O scenario, the request stored in higher idx will starve. Searching requests cyclically in cachefiles_ondemand_daemon_read, makes distribution fairer. Fixes: c8383054506c ("cachefiles: notify the user daemon when looking up cookie") Reported-by: Yongqing Li Signed-off-by: Xin Yin Signed-off-by: David Howells Reviewed-by: Jeffle Xu Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/20220817065200.11543-1-yinxin.x@bytedance.com/ # v1 Link: https://lore.kernel.org/r/20220825020945.2293-1-yinxin.x@bytedance.com/ # v2 fs/cachefiles/internal.h | 1 + fs/cachefiles/ondemand.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) commit c93ccd63b18c8d108c57b2bb0e5f3b058b9d2029 Author: Sun Ke Date: Fri Aug 26 10:35:15 2022 +0800 cachefiles: fix error return code in cachefiles_ondemand_copen() The cache_size field of copen is specified by the user daemon. If cache_size < 0, then the OPEN request is expected to fail, while copen itself shall succeed. However, returning 0 is indeed unexpected when cache_size is an invalid error code. Fix this by returning error when cache_size is an invalid error code. Changes ======= v4: update the code suggested by Dan v3: update the commit log suggested by Jingbo. Fixes: c8383054506c ("cachefiles: notify the user daemon when looking up cookie") Signed-off-by: Sun Ke Suggested-by: Jeffle Xu Suggested-by: Dan Carpenter Signed-off-by: David Howells Reviewed-by: Gao Xiang Reviewed-by: Jingbo Xu Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20220818111935.1683062-1-sunke32@huawei.com/ # v2 Link: https://lore.kernel.org/r/20220818125038.2247720-1-sunke32@huawei.com/ # v3 Link: https://lore.kernel.org/r/20220826023515.3437469-1-sunke32@huawei.com/ # v4 fs/cachefiles/ondemand.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 873aefb376bbc0ed1dd2381ea1d6ec88106fdbd4 Author: Alex Williamson Date: Mon Aug 29 21:05:40 2022 -0600 vfio/type1: Unpin zero pages There's currently a reference count leak on the zero page. We increment the reference via pin_user_pages_remote(), but the page is later handled as an invalid/reserved page, therefore it's not accounted against the user and not unpinned by our put_pfn(). Introducing special zero page handling in put_pfn() would resolve the leak, but without accounting of the zero page, a single user could still create enough mappings to generate a reference count overflow. The zero page is always resident, so for our purposes there's no reason to keep it pinned. Therefore, add a loop to walk pages returned from pin_user_pages_remote() and unpin any zero pages. Cc: stable@vger.kernel.org Reported-by: Luboslav Pivarc Reviewed-by: David Hildenbrand Link: https://lore.kernel.org/r/166182871735.3518559.8884121293045337358.stgit@omen Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_type1.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit ec1bd37123c607ca6485beb4542a792a4db765aa Author: Khalid Masum Date: Thu Aug 18 10:07:38 2022 +0600 fscache: fix misdocumented parameter This patch fixes two warnings generated by make docs. The functions fscache_use_cookie and fscache_unuse_cookie, both have a parameter named cookie. But they are documented with the name "object" with unclear description. Which generates the warning when creating docs. This commit will replace the currently misdocumented parameter names with the correct ones while adding proper descriptions. CC: Randy Dunlap Signed-off-by: Khalid Masum Signed-off-by: David Howells Link: https://lore.kernel.org/r/20220521142446.4746-1-khalid.masum.92@gmail.com/ # v1 Link: https://lore.kernel.org/r/20220818040738.12036-1-khalid.masum.92@gmail.com/ # v2 Link: https://lore.kernel.org/r/880d7d25753fb326ee17ac08005952112fcf9bdb.1657360984.git.mchehab@kernel.org/ # Mauro's version include/linux/fscache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 41ca302a697b64a3dab4676e01d0d11bb184737d Author: Johan Hovold Date: Wed Aug 31 10:15:25 2022 +0200 USB: serial: ch341: fix disabled rx timer on older devices At least one older CH341 appears to have the RX timer enable bit inverted so that setting it disables the RX timer and prevents the FIFO from emptying until it is full. Only set the RX timer enable bit for devices with version newer than 0x27 (even though this probably affects all pre-0x30 devices). Reported-by: Jonathan Woithe Tested-by: Jonathan Woithe Link: https://lore.kernel.org/r/Ys1iPTfiZRWj2gXs@marvin.atrad.com.au Fixes: 4e46c410e050 ("USB: serial: ch341: reinitialize chip on reconfiguration") Cc: stable@vger.kernel.org # 4.10 Signed-off-by: Johan Hovold drivers/usb/serial/ch341.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8e83622ae7ca481c76c8fd9579877f6abae64ca2 Author: Johan Hovold Date: Wed Aug 31 10:15:24 2022 +0200 USB: serial: ch341: fix lost character on LCR updates Disable LCR updates for pre-0x30 devices which use a different (unknown) protocol for line control and where the current register write causes the next received character to be lost. Note that updating LCR using the INIT command has no effect on these devices either. Reported-by: Jonathan Woithe Tested-by: Jonathan Woithe Link: https://lore.kernel.org/r/Ys1iPTfiZRWj2gXs@marvin.atrad.com.au Fixes: 4e46c410e050 ("USB: serial: ch341: reinitialize chip on reconfiguration") Fixes: 55fa15b5987d ("USB: serial: ch341: fix baud rate and line-control handling") Cc: stable@vger.kernel.org # 4.10 Signed-off-by: Johan Hovold drivers/usb/serial/ch341.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 814816d71e29934d0a76ee259b54c0b80c3b0e4a Author: Christophe Leroy Date: Tue Aug 23 18:36:35 2022 +0200 powerpc: Fix hard_irq_disable() with sanitizer As reported by Zhouyi Zhou, WRITE_ONCE() is not atomic as expected when KASAN or KCSAN are compiled in. Fix it by re-implementing it using inline assembly. Fixes: 077fc62b2b66 ("powerpc/irq: remove inline assembly in hard_irq_disable macro") Reported-by: Zhouyi Zhou Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a8298991b3df049a54ee8e558838e34265812014.1661272586.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/hw_irq.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c0955bf957be4bead01fae1d791476260da7325d Author: Duoming Zhou Date: Sat Aug 27 23:38:15 2022 +0800 ethernet: rocker: fix sleep in atomic context bug in neigh_timer_handler The function neigh_timer_handler() is a timer handler that runs in an atomic context. When used by rocker, neigh_timer_handler() calls "kzalloc(.., GFP_KERNEL)" that may sleep. As a result, the sleep in atomic context bug will happen. One of the processes is shown below: ofdpa_fib4_add() ... neigh_add_timer() (wait a timer) neigh_timer_handler() neigh_release() neigh_destroy() rocker_port_neigh_destroy() rocker_world_port_neigh_destroy() ofdpa_port_neigh_destroy() ofdpa_port_ipv4_neigh() kzalloc(sizeof(.., GFP_KERNEL) //may sleep This patch changes the gfp_t parameter of kzalloc() from GFP_KERNEL to GFP_ATOMIC in order to mitigate the bug. Fixes: 00fc0c51e35b ("rocker: Change world_ops API and implementation to be switchdev independant") Signed-off-by: Duoming Zhou Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker_ofdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ceb4038472a4803e7046ed488b03d11551991514 Author: Johan Hovold Date: Mon Aug 29 16:25:50 2022 +0200 USB: serial: cp210x: add Decagon UCA device id Add the device id for Decagon Devices USB Cable Adapter. Link: https://lore.kernel.org/r/trinity-819f9db2-d3e1-40e9-a669-9c245817c046-1661523546680@msvc-mesg-web108 Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 1 + 1 file changed, 1 insertion(+) commit 3f5df3ac646e21a79a421ae4037c4ef0632bcaa9 Author: Ian Rogers Date: Tue Aug 30 09:48:40 2022 -0700 perf metric: Return early if no CPU PMU table exists Previous behavior is to segfault if there is no CPU PMU table and a metric is sought. To reproduce compile with NO_JEVENTS=1 then request a metric, for example, "perf stat -M IPC true". Committer testing: Before: $ make -k NO_JEVENTS=1 BUILD_BPF_SKEL=1 O=/tmp/build/perf-urgent -C tools/perf install-bin $ perf stat -M IPC true Segmentation fault (core dumped) $ After: $ perf stat -M IPC true Usage: perf stat [] [] -M, --metrics monitor specified metrics or metric groups (separated by ,) $ Fixes: 00facc760903be66 ("perf jevents: Switch build to use jevents.py") Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Caleb Biggers Cc: Florian Fischer Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Richter Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20220830164846.401143-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/metricgroup.c | 3 +++ 1 file changed, 3 insertions(+) commit 518e26f11af2fe4f5bebf9a0351595d508c7077f Author: Haibo Chen Date: Wed Aug 31 18:37:35 2022 +0800 gpio: pca953x: Add mutex_lock for regcache sync in PM The regcache sync will set the cache_bypass = true, at that time, when there is regmap write operation, it will bypass the regmap cache, then the regcache sync will write back the value from cache to register, which is not as our expectation. Though regmap already use its internal lock to avoid such issue, but this driver force disable the regmap internal lock in its regmap config: disable_locking = true To avoid this issue, use the driver's own lock to do the protect in system PM. Fixes: b76574300504 ("gpio: pca953x: Restore registers after suspend/resume cycle") Signed-off-by: Haibo Chen Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-pca953x.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 77972a36ecc4db7fc7c68f0e80714263c5f03f65 Author: Pablo Neira Ayuso Date: Wed Aug 31 13:11:47 2022 +0200 netfilter: nf_tables: clean up hook list when offload flags check fails splice back the hook list so nft_chain_release_hook() has a chance to release the hooks. BUG: memory leak unreferenced object 0xffff88810180b100 (size 96): comm "syz-executor133", pid 3619, jiffies 4294945714 (age 12.690s) hex dump (first 32 bytes): 28 64 23 02 81 88 ff ff 28 64 23 02 81 88 ff ff (d#.....(d#..... 90 a8 aa 83 ff ff ff ff 00 00 b5 0f 81 88 ff ff ................ backtrace: [] kmalloc include/linux/slab.h:600 [inline] [] nft_netdev_hook_alloc+0x3b/0xc0 net/netfilter/nf_tables_api.c:1901 [] nft_chain_parse_netdev net/netfilter/nf_tables_api.c:1998 [inline] [] nft_chain_parse_hook+0x33a/0x530 net/netfilter/nf_tables_api.c:2073 [] nf_tables_addchain.constprop.0+0x10b/0x950 net/netfilter/nf_tables_api.c:2218 [] nf_tables_newchain+0xa8b/0xc60 net/netfilter/nf_tables_api.c:2593 [] nfnetlink_rcv_batch+0xa46/0xd20 net/netfilter/nfnetlink.c:517 [] nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:638 [inline] [] nfnetlink_rcv+0x1f9/0x220 net/netfilter/nfnetlink.c:656 [] netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] [] netlink_unicast+0x397/0x4c0 net/netlink/af_netlink.c:1345 [] netlink_sendmsg+0x396/0x710 net/netlink/af_netlink.c:1921 [] sock_sendmsg_nosec net/socket.c:714 [inline] [] sock_sendmsg+0x56/0x80 net/socket.c:734 [] ____sys_sendmsg+0x36c/0x390 net/socket.c:2482 [] ___sys_sendmsg+0xa8/0x110 net/socket.c:2536 [] __sys_sendmsg+0x88/0x100 net/socket.c:2565 [] do_syscall_x64 arch/x86/entry/common.c:50 [inline] [] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 [] entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: d54725cd11a5 ("netfilter: nf_tables: support for multiple devices per netdev hook") Reported-by: syzbot+5fcdbfab6d6744c57418@syzkaller.appspotmail.com Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 475043fabe8c58fb18c32c7942d8754897bd11fa Author: Jean-Philippe Brucker Date: Wed Aug 31 09:05:04 2022 +0100 regulator: Fix qcom,spmi-regulator schema The DT validator reports an error in the schema: Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml: ignoring, error in schema: patternProperties: ^(5vs[1-2]|(l|s)[1-9][0-9]?|lvs[1-3])$: properties Move the unevaluatedProperties statement out of the properties section to fix it. Fixes: 0b3bbd7646b0 ("regulator: qcom,spmi-regulator: Convert to dtschema") Reviewed-by: Rob Herring Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20220831080503.17600-1-jean-philippe@linaro.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d047283a7034140ea5da759a494fd2274affdd46 Author: Harsh Modi Date: Tue Aug 30 22:36:03 2022 -0700 netfilter: br_netfilter: Drop dst references before setting. The IPv6 path already drops dst in the daddr changed case, but the IPv4 path does not. This change makes the two code paths consistent. Further, it is possible that there is already a metadata_dst allocated from ingress that might already be attached to skbuff->dst while following the bridge path. If it is not released before setting a new metadata_dst, it will be leaked. This is similar to what is done in bpf_set_tunnel_key() or ip6_route_input(). It is important to note that the memory being leaked is not the dst being set in the bridge code, but rather memory allocated from some other code path that is not being freed correctly before the skb dst is overwritten. An example of the leakage fixed by this commit found using kmemleak: unreferenced object 0xffff888010112b00 (size 256): comm "softirq", pid 0, jiffies 4294762496 (age 32.012s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 80 16 f1 83 ff ff ff ff ................ e1 4e f6 82 ff ff ff ff 00 00 00 00 00 00 00 00 .N.............. backtrace: [<00000000d79567ea>] metadata_dst_alloc+0x1b/0xe0 [<00000000be113e13>] udp_tun_rx_dst+0x174/0x1f0 [<00000000a36848f4>] geneve_udp_encap_recv+0x350/0x7b0 [<00000000d4afb476>] udp_queue_rcv_one_skb+0x380/0x560 [<00000000ac064aea>] udp_unicast_rcv_skb+0x75/0x90 [<000000009a8ee8c5>] ip_protocol_deliver_rcu+0xd8/0x230 [<00000000ef4980bb>] ip_local_deliver_finish+0x7a/0xa0 [<00000000d7533c8c>] __netif_receive_skb_one_core+0x89/0xa0 [<00000000a879497d>] process_backlog+0x93/0x190 [<00000000e41ade9f>] __napi_poll+0x28/0x170 [<00000000b4c0906b>] net_rx_action+0x14f/0x2a0 [<00000000b20dd5d4>] __do_softirq+0xf4/0x305 [<000000003a7d7e15>] __irq_exit_rcu+0xc3/0x140 [<00000000968d39a2>] sysvec_apic_timer_interrupt+0x9e/0xc0 [<000000009e920794>] asm_sysvec_apic_timer_interrupt+0x16/0x20 [<000000008942add0>] native_safe_halt+0x13/0x20 Florian Westphal says: "Original code was likely fine because nothing ever did set a skb->dst entry earlier than bridge in those days." Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Harsh Modi Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/bridge/br_netfilter_hooks.c | 2 ++ net/bridge/br_netfilter_ipv6.c | 1 + 2 files changed, 3 insertions(+) commit b118509076b39cc5e616c0680312b5caaca535fe Author: Pablo Neira Ayuso Date: Fri Aug 26 08:49:16 2022 +0200 netfilter: remove nf_conntrack_helper sysctl and modparam toggles __nf_ct_try_assign_helper() remains in place but it now requires a template to configure the helper. A toggle to disable automatic helper assignment was added by: a9006892643a ("netfilter: nf_ct_helper: allow to disable automatic helper assignment") in 2012 to address the issues described in "Secure use of iptables and connection tracking helpers". Automatic conntrack helper assignment was disabled by: 3bb398d925ec ("netfilter: nf_ct_helper: disable automatic helper assignment") back in 2016. This patch removes the sysctl and modparam toggles, users now have to rely on explicit conntrack helper configuration via ruleset. Update tools/testing/selftests/netfilter/nft_conntrack_helper.sh to check that auto-assignment does not happen anymore. Acked-by: Aaron Conole Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack.h | 2 - include/net/netns/conntrack.h | 1 - net/netfilter/nf_conntrack_core.c | 7 +- net/netfilter/nf_conntrack_helper.c | 80 +++------------------- net/netfilter/nf_conntrack_netlink.c | 5 -- net/netfilter/nf_conntrack_standalone.c | 10 --- net/netfilter/nft_ct.c | 3 - .../selftests/netfilter/nft_conntrack_helper.sh | 36 +++++++--- 8 files changed, 37 insertions(+), 107 deletions(-) commit 58bfe7d8e31014d7ce246788df99c56e3cfe6c68 Author: Greg Kroah-Hartman Date: Wed Aug 31 10:34:25 2022 +0200 Revert "usb: add quirks for Lenovo OneLink+ Dock" This reverts commit 3d5f70949f1b1168fbb17d06eb5c57e984c56c58. The quirk does not work properly, more work is needed to determine what should be done here. Reported-by: Oliver Neukum Cc: Jean-Francois Le Fillatre Cc: stable Fixes: 3d5f70949f1b ("usb: add quirks for Lenovo OneLink+ Dock") Link: https://lore.kernel.org/r/9a17ea86-079f-510d-e919-01bc53a6d09f@gmx.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/quirks.c | 4 ---- 1 file changed, 4 deletions(-) commit 3d074b750d2b4c91962f10ea1df1c289ce0d3ce8 Author: Claudiu Beznea Date: Fri Aug 26 11:39:26 2022 +0300 ARM: dts: at91: sama5d2_icp: don't keep vdd_other enabled all the time VDD_OTHER is not connected to any on board consumer thus it is not needed to keep it enabled all the time. Fixes: 68a95ef72cef ("ARM: dts: at91: sama5d2-icp: add SAMA5D2-ICP") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220826083927.3107272-9-claudiu.beznea@microchip.com arch/arm/boot/dts/at91-sama5d2_icp.dts | 1 - 1 file changed, 1 deletion(-) commit 617a0d9fe6867bf5b3b7272629cd780c27c877d9 Author: Claudiu Beznea Date: Fri Aug 26 11:39:25 2022 +0300 ARM: dts: at91: sama5d27_wlsom1: don't keep ldo2 enabled all the time ldo2 is not used by any consumer on sama5d27_wlsom1 board, thus don't keep it enabled all the time. Fixes: 5d4c3cfb63fe ("ARM: dts: at91: sama5d27_wlsom1: add SAMA5D27 wlsom1 and wlsom1-ek") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220826083927.3107272-8-claudiu.beznea@microchip.com arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi | 1 - 1 file changed, 1 deletion(-) commit 7f41d52ced9e1b7ed4ff8e1ae9cacbf46b64e6db Author: Claudiu Beznea Date: Fri Aug 26 11:39:24 2022 +0300 ARM: dts: at91: sama7g5ek: specify proper regulator output ranges Min and max output ranges of regulators need to satisfy board requirements not PMIC requirements. Thus adjust device tree to cope with this. Fixes: 7540629e2fc7 ("ARM: dts: at91: add sama7g5 SoC DT and sama7g5-ek") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220826083927.3107272-7-claudiu.beznea@microchip.com arch/arm/boot/dts/at91-sama7g5ek.dts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 7737d93666eea282febf95e5fa3b3fde1f2549f3 Author: Claudiu Beznea Date: Fri Aug 26 11:39:23 2022 +0300 ARM: dts: at91: sama5d2_icp: specify proper regulator output ranges Min and max output ranges of regulators need to satisfy board requirements not PMIC requirements. Thus adjust device tree to cope with this. Fixes: 68a95ef72cef ("ARM: dts: at91: sama5d2-icp: add SAMA5D2-ICP") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220826083927.3107272-6-claudiu.beznea@microchip.com arch/arm/boot/dts/at91-sama5d2_icp.dts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit addf7efec23af2b67547800aa232d551945e7de2 Author: Claudiu Beznea Date: Fri Aug 26 11:39:22 2022 +0300 ARM: dts: at91: sama5d27_wlsom1: specify proper regulator output ranges Min and max output ranges of regulators need to satisfy board requirements not PMIC requirements. Thus adjust device tree to cope with this. Fixes: 5d4c3cfb63fe ("ARM: dts: at91: sama5d27_wlsom1: add SAMA5D27 wlsom1 and wlsom1-ek") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220826083927.3107272-5-claudiu.beznea@microchip.com arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 7a94b83a7dc551607b6c4400df29151e6a951f07 Author: Claudiu Beznea Date: Fri Aug 26 11:39:21 2022 +0300 ARM: at91: pm: fix DDR recalibration when resuming from backup and self-refresh On SAMA7G5, when resuming from backup and self-refresh, the bootloader performs DDR PHY recalibration by restoring the value of ZQ0SR0 (stored in RAM by Linux before going to backup and self-refresh). It has been discovered that the current procedure doesn't work for all possible values that might go to ZQ0SR0 due to hardware bug. The workaround to this is to avoid storing some values in ZQ0SR0. Thus Linux will read the ZQ0SR0 register and cache its value in RAM after processing it (using modified_gray_code array). The bootloader will restore the processed value. Fixes: d2d4716d8384 ("ARM: at91: pm: save ddr phy calibration data to securam") Suggested-by: Frederic Schumacher Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220826083927.3107272-4-claudiu.beznea@microchip.com arch/arm/mach-at91/pm.c | 36 ++++++++++++++++++++++++++++++++---- include/soc/at91/sama7-ddr.h | 4 ++++ 2 files changed, 36 insertions(+), 4 deletions(-) commit a02875c4cbd6f3d2f33d70cc158a19ef02d4b84f Author: Claudiu Beznea Date: Fri Aug 26 11:39:20 2022 +0300 ARM: at91: pm: fix self-refresh for sama7g5 It has been discovered that on some parts, from time to time, self-refresh procedure doesn't work as expected. Debugging and investigating it proved that disabling AC DLL introduce glitches in RAM controllers which leads to unexpected behavior. This is confirmed as a hardware bug. DLL bypass disables 3 DLLs: 2 DX DLLs and AC DLL. Thus, keep only DX DLLs disabled. This introduce 6mA extra current consumption on VDDCORE when switching to any ULP mode or standby mode but the self-refresh procedure still works. Fixes: f0bbf17958e8 ("ARM: at91: pm: add self-refresh support for sama7g5") Suggested-by: Frederic Schumacher Signed-off-by: Claudiu Beznea Tested-by: Cristian Birsan Link: https://lore.kernel.org/r/20220826083927.3107272-3-claudiu.beznea@microchip.com arch/arm/mach-at91/pm_suspend.S | 24 +++++++++++++++++------- include/soc/at91/sama7-ddr.h | 4 ++++ 2 files changed, 21 insertions(+), 7 deletions(-) commit 13a9d08c296228d18289de60b83792c586e1d073 Author: Dan Carpenter Date: Fri Aug 26 18:00:30 2022 +0300 net: lan966x: improve error handle in lan966x_fdma_rx_get_frame() Don't just print a warning. Clean up and return an error as well. Fixes: c8349639324a ("net: lan966x: Add FDMA functionality") Signed-off-by: Dan Carpenter Reviewed-by: Horatiu Vultur Link: https://lore.kernel.org/r/YwjgDm/SVd5c1tQU@kili Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 642b2122c5df332a6df52dd1f91e552bc4356951 Author: Gao Xiao Date: Mon Aug 29 12:16:51 2022 +0200 nfp: fix the access to management firmware hanging When running `ethtool -p` with the old management firmware, the management firmware resource is not correctly released, which causes firmware related malfunction: all the access to management firmware hangs. It releases the management firmware resource when set id mode operation is not supported. Fixes: ccb9bc1dfa44 ("nfp: add 'ethtool --identify' support") Signed-off-by: Gao Xiao Reviewed-by: Louis Peens Signed-off-by: Simon Horman Reviewed-by: Jesse Brandeburg Link: https://lore.kernel.org/r/20220829101651.633840-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 1 + 1 file changed, 1 insertion(+) commit 613c86977efd2a311683b09d7c5deaa0db49337c Merge: 4a4ce82212ef ffd7bdddaab1 Author: Jakub Kicinski Date: Tue Aug 30 23:01:47 2022 -0700 Merge tag 'ieee802154-for-net-2022-08-29' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan Stefan Schmidt says: ==================== ieee802154 for net 2022-08-29 - repeated word fix from Jilin Yuan. - missed return code setting in the cc2520 driver by Li Qiong. - fixing a potential race in by defering the workqueue destroy in the adf7242 driver by Lin Ma. - fixing a long standing problem in the mac802154 rx path to match corretcly by Miquel Raynal. * tag 'ieee802154-for-net-2022-08-29' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan: ieee802154: cc2520: add rc code in cc2520_tx() net: mac802154: Fix a condition in the receive path net/ieee802154: fix repeated words in comments ieee802154/adf7242: defer destroy_workqueue call ==================== Link: https://lore.kernel.org/r/20220829100308.2802578-1-stefan@datenfreihafen.org Signed-off-by: Jakub Kicinski commit 4a4ce82212ef014d70f486a427005b2b5bab8e34 Author: Horatiu Vultur Date: Tue Aug 30 08:40:55 2022 +0200 net: phy: micrel: Make the GPIO to be non-exclusive The same GPIO line can be shared by multiple phys for the coma mode pin. If that is the case then, all the other phys that share the same line will failed to be probed because the access to the gpio line is not non-exclusive. Fix this by making access to the gpio line to be nonexclusive using flag GPIOD_FLAGS_BIT_NONEXCLUSIVE. This allows all the other PHYs to be probed. Fixes: 738871b09250ee ("net: phy: micrel: add coma mode GPIO") Reviewed-by: Andrew Lunn Signed-off-by: Horatiu Vultur Link: https://lore.kernel.org/r/20220830064055.2340403-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski drivers/net/phy/micrel.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit fce1c23f629173e0db78b79a74f2052044a00e65 Author: Alvaro Karsz Date: Tue Aug 23 10:39:47 2022 +0300 net: virtio_net: fix notification coalescing comments Fix wording in comments for the notifications coalescing feature. Signed-off-by: Alvaro Karsz Acked-by: Michael S. Tsirkin Link: https://lore.kernel.org/r/20220823073947.14774-1-alvaro.karsz@solid-run.com Signed-off-by: Jakub Kicinski include/uapi/linux/virtio_net.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 478814a5584197fa1fb18377653626e3416e7cd6 Author: Maurizio Lombardi Date: Mon Aug 29 14:40:30 2022 +0200 nvmet-tcp: fix unhandled tcp states in nvmet_tcp_state_change() TCP_FIN_WAIT2 and TCP_LAST_ACK were not handled, the connection is closing so we can ignore them and avoid printing the "unhandled state" warning message. [ 1298.852386] nvmet_tcp: queue 2 unhandled state 5 [ 1298.879112] nvmet_tcp: queue 7 unhandled state 5 [ 1298.884253] nvmet_tcp: queue 8 unhandled state 5 [ 1298.889475] nvmet_tcp: queue 9 unhandled state 5 v2: Do not call nvmet_tcp_schedule_release_queue(), just ignore the fin_wait2 and last_ack states. Signed-off-by: Maurizio Lombardi Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/target/tcp.c | 3 +++ 1 file changed, 3 insertions(+) commit da0342a3aa0357795224e6283df86444e1117168 Author: Hannes Reinecke Date: Wed Aug 24 09:23:16 2022 +0200 nvmet-auth: add missing goto in nvmet_setup_auth() There's a goto missing in nvmet_setup_auth(), causing a kernel oops when nvme_auth_extract_key() fails. Reported-by: Tal Lossos Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/target/auth.c | 1 + 1 file changed, 1 insertion(+) commit 200dccd07df21b504a2168960059f0a971bf415d Author: Shyamin Ayesh Date: Fri Aug 26 09:51:40 2022 -0700 nvme-pci: add NVME_QUIRK_BOGUS_NID for Lexar NM610 Lexar NM610 reports bogus eui64 values that appear to be the same across all drives. Quirk them out so they are not marked as "non globally unique" duplicates. Signed-off-by: Shyamin Ayesh [patch formatting] Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 2 ++ 1 file changed, 2 insertions(+) commit 27893dfc1285f80f80f46b3b8c95f5d15d2e66d0 Author: Enzo Matsumiya Date: Tue Aug 30 19:51:51 2022 -0300 cifs: fix small mempool leak in SMB2_negotiate() In some cases of failure (dialect mismatches) in SMB2_negotiate(), after the request is sent, the checks would return -EIO when they should be rather setting rc = -EIO and jumping to neg_exit to free the response buffer from mempool. Signed-off-by: Enzo Matsumiya Cc: stable@vger.kernel.org Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/smb2pdu.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 3e3761f1ec7df67d88cfca5e2ea98538f529e645 Author: Steve French Date: Mon Aug 29 11:53:41 2022 -0500 smb3: use filemap_write_and_wait_range instead of filemap_write_and_wait When doing insert range and collapse range we should be writing out the cached pages for the ranges affected but not the whole file. Fixes: c3a72bb21320 ("smb3: Move the flush out of smb2_copychunk_range() into its callers") Cc: stable@vger.kernel.org Reviewed-by: Paulo Alcantara (SUSE) Reviewed-by: David Howells Signed-off-by: Steve French fs/cifs/cifsfs.c | 8 ++++++-- fs/cifs/smb2ops.c | 9 +++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) commit 910ab9eee0f61a243126d70e932e1301b5437583 Author: Hawking Zhang Date: Tue Aug 30 15:47:47 2022 +0800 drm/amdgpu: only init tap_delay ucode when it's included in ucode binary Not all the gfx10 variants need to integrate global tap_delay and per se tap_delay firmwares Only init tap_delay ucode when it does include in rlc ucode binary so driver doesn't send a null buffer to psp for firmware loading Signed-off-by: Hawking Zhang Reviewed-by: Jack Gui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 60 ++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 25 deletions(-) commit 7b471c32e4cbfdd7a673b79321f6a26abecbf33b Author: Vladimir Stempen Date: Fri Aug 19 18:32:01 2022 -0400 drm/amd/display: Fix black flash when switching from ODM2to1 to ODMBypass [Why] On secondary display hotplug we switch primary stream from ODM2to1 to ODMBypass mode. Current logic will trigger disabling front end for this stream. [How] We need to check if prev_odm_pipe is equal to NULL in order to disable dangling planes in this scenario. Reviewed-by: Ariel Bernstein Acked-by: Brian Chang Signed-off-by: Vladimir Stempen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d6f84bab48745ea68814d596eb476a9c11ce76ae Author: Ethan Wellenreiter Date: Fri Aug 19 18:30:44 2022 -0400 drm/amd/display: Fix check for stream and plane [WHY] Function wasn't returning false when it had a no stream [HOW] Made it return false when it had no stream. Reviewed-by: Alvin Lee Acked-by: Brian Chang Signed-off-by: Ethan Wellenreiter Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5b9c1ffabce5f4acbeabd3a03fd57b3970a13fe Author: Ethan Wellenreiter Date: Mon Aug 22 14:33:23 2022 -0400 drm/amd/display: Re-initialize viewport after pipe merge [Why] Pipes get merged in preparation for SubVP but if they don't get used, and are in ODM or some other multi pipe config, it would calculate the voltage level with a viewport of just one pipe from when they were split resulting in too low of a voltage level. [How] Made it so that the viewport and other timing settings get rebuilt and re- initialized after the pipe merge, before calculating the voltage level so it would calculate it correctly. Reviewed-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Ethan Wellenreiter Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6ffc967c36b42f864955cb2c5e8b3fded0baa918 Author: Aurabindo Pillai Date: Fri Aug 19 15:11:19 2022 -0400 drm/amd/display: Use correct plane for CAB cursor size allocation [Why&How] plane and stream variables used for cursor size allocation calculation were stale from previous iteration. Redo the iteration to find the correct cursor plane for the calculation. Reviewed-by: Alvin Lee Acked-by: Brian Chang Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 32 ++++++++++++++-------- 1 file changed, 21 insertions(+), 11 deletions(-) commit b97e914552c3fcea71ce03f899e285f2178ec38b Author: Alex Sierra Date: Thu Aug 25 15:42:08 2022 -0500 drm/amdgpu: ensure no PCIe peer access for CPU XGMI iolinks [Why] Devices with CPU XGMI iolink do not support PCIe peer access. Signed-off-by: Alex Sierra Acked-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2640174f4a139502f603f7bedf3a7011db714e1d Author: Evan Quan Date: Tue Aug 23 17:37:26 2022 +0800 drm/amd/pm: bump SMU 13.0.0 driver_if header version To suppress the warning about version mismatch with the latest 78.54.0 PMFW. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 2 +- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b023053592646b1da9477b0b598f2cdd5d3f89d8 Author: Evan Quan Date: Tue Aug 23 16:07:18 2022 +0800 drm/amd/pm: use vbios carried pptable for all SMU13.0.7 SKUs For those SMU13.0.7 unsecure SKUs, the vbios carried pptable is ready to go. Use that one instead of hardcoded softpptable. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 35 ++++++++++++++-------- 1 file changed, 22 insertions(+), 13 deletions(-) commit d7e7546886eebf626569e38ff06d0a67b8b82757 Author: Evan Quan Date: Tue Aug 23 15:45:36 2022 +0800 drm/amd/pm: use vbios carried pptable for those supported SKUs For some SMU13.0.0 SKUs, the vbios carried pptable is ready to go. Use that one instead of hardcoded softpptable. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 6 ++ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 23 +++---- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 72 +++++++++++++++++++--- 3 files changed, 77 insertions(+), 24 deletions(-) commit d0629cea1f97acc5e8d95ca2a42ddc72ed4ffa3b Author: Charlene Liu Date: Thu Aug 18 20:24:26 2022 -0400 drm/amd/display: fix wrong register access [why] fw version check was for release branch. for staging, it has a chance to enter wrong code path. Reviewed-by: Hansen Dsouza Acked-by: Brian Chang Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dio_link_encoder.c | 3 +++ drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dio_stream_encoder.c | 1 + 2 files changed, 4 insertions(+) commit 595091c6ba35ba48c1f8186116bbbae2b208dce6 Author: Aurabindo Pillai Date: Thu Aug 18 17:55:01 2022 -0400 drm/amd/display: use actual cursor size instead of max for CAB allocation [Why&How] When calculating allocation for cursor size, get the real cursor through the HUBP instead of using the maximum cursor size for more optimal allocation Reviewed-by: Alvin Lee Reviewed-by: Nicholas Kazlauskas Acked-by: Brian Chang Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 94a82c9e3dffb88182a4ed0464dc0266ad0d7b45 Author: Aurabindo Pillai Date: Thu Aug 18 12:34:06 2022 -0400 drm/amd/display: disable display fresh from MALL on an edge case for DCN321 [Why&How] When using a 4k monitor when cursor caching is not supported due to framebuffer being on an uncacheable address, enabling display refresh from MALL would trigger corruption if SS is enabled. Prevent entering SS if we are on the edge case and cursor caching is not possible. Do this only if cursor size larger than a 64x64@4bpp. Pull the cursor size calculation out of if condition since cursor address may not be set on all platforms Reviewed-by: Alvin Lee Reviewed-by: Nicholas Kazlauskas Acked-by: Brian Chang Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 43 ++++++++++++++-------- 1 file changed, 27 insertions(+), 16 deletions(-) commit 4fd7f14b56b2e727dd66a62e217e57015da4e9fd Author: Aurabindo Pillai Date: Thu Aug 18 17:25:05 2022 -0400 drm/amd/display: Fix CAB cursor size allocation for DCN32/321 For calculating cursor size allocation, surface size was used, resulting in over allocation Reviewed-by: Alvin Lee Reviewed-by: Nicholas Kazlauskas Acked-by: Brian Chang Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6783e6bbc2457dbed351fb0d2477aa6060a7d32b Author: Leo Chen Date: Thu Aug 18 13:21:37 2022 -0400 drm/amd/display: Missing HPO instance added [Why & How] Number of encoder is set to 4 but only 3 instances are created. Reviewed-by: Charlene Liu Acked-by: Brian Chang Signed-off-by: Leo Chen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 1 + 1 file changed, 1 insertion(+) commit 3e834a17a22cb8e9169c0b018d1a2df126977db3 Author: Wang Fudong Date: Wed Aug 17 17:47:50 2022 +0800 drm/amd/display: set dig fifo read start level to 7 before dig fifo reset [Why] DIG_FIFO_ERROR = 1 caused mst daisy chain 2nd monitor black. [How] We need to set dig fifo read start level = 7 before dig fifo reset during dig fifo enable according to hardware designer's suggestion. If it is zero, it will cause underflow or overflow and DIG_FIFO_ERROR = 1. Reviewed-by: Alvin Lee Reviewed-by: Aric Cyr Acked-by: Brian Chang Signed-off-by: Wang Fudong Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dio_stream_encoder.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3c93603d9568c7c4b20ff1712ddc60e997d78df7 Author: YuBiao Wang Date: Wed Aug 24 15:56:04 2022 +0800 drm/amdgpu: Fix use-after-free in amdgpu_cs_ioctl [Why] In amdgpu_cs_ioctl, amdgpu_job_free could be performed ealier if there is -ERESTARTSYS error. In this case, job->hw_fence could be not initialized yet. Putting hw_fence during amdgpu_job_free could lead to a use-after-free warning. [How] Check if drm_sched_job_init is performed before job_free by checking s_fence. v2: Check hw_fence.ops instead since it could be NULL if fence is not initialized. Reverse the condition since !=NULL check is discouraged in kernel. Signed-off-by: YuBiao Wang Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d1b4a51a4ca8954f30cf4671b25c4f8637c45600 Author: Duncan Ma Date: Mon Aug 15 17:37:32 2022 -0400 drm/amd/display: Fix OTG H timing reset for dcn314 [Why] When ODM is enabled, H timing control register reset to 0. Div mode manual field get overwritten causing no display on certain modes for dcn314. [How] Use REG_UPDATE instead of REG_SET to set div_mode field. Reviewed-by: Charlene Liu Reviewed-by: Nicholas Kazlauskas Acked-by: Brian Chang Signed-off-by: Duncan Ma Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 507fd7c400032b126747a5ae8cca2816d73f009a Author: George Shen Date: Wed Aug 10 22:06:17 2022 -0400 drm/amd/display: Fix DCN32 DPSTREAMCLK_CNTL programming [Why] Each index in the DPSTREAMCLK_CNTL register phyiscally maps 1-to-1 with HPO stream encoder instance. On the other hand, each index in DTBCLK_P_CNTL physically maps 1-to-1 with OTG instance. Current DCN32 DPSTREAMCLK_CLK programing assumes that OTG instance always maps 1-to-1 with HPO stream encoder instance. This is not always guaranteed and can result in blackscreen. [How] Program the correct dpstreamclk instance with the correct dtbclk_p source. Reviewed-by: Ariel Bernstein Acked-by: Brian Chang Signed-off-by: George Shen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/link/link_hwss_hpo_dp.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 47e04eed84bb07cc5b54462752a4bc7286ab8197 Author: Graham Sider Date: Mon Aug 15 13:28:19 2022 -0400 drm/amdgpu: Update mes_v11_api_def.h New GFX11 MES FW adds the trap_en bit. For now hardcode to 1 (traps enabled). Signed-off-by: Graham Sider Acked-by: Felix Kuehling Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 1 + drivers/gpu/drm/amd/include/mes_v11_api_def.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit c8fea9273fd1be308668496badfcbd55183e0dd3 Author: Guchun Chen Date: Wed Aug 24 23:00:02 2022 +0800 drm/amdgpu: disable FRU access on special SIENNA CICHLID card Below driver load error will be printed, not friendly to end user. amdgpu: ATOM BIOS: 113-D603GLXE-077 [drm] FRU: Failed to get size field [drm:amdgpu_fru_get_product_info [amdgpu]] *ERROR* Failed to read FRU Manufacturer, ret:-5 Signed-off-by: Guchun Chen Reviewed-by: Kent Russell Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 7c8d42fdf1a84b1a0dd60d6528309c8ec127e87c Author: Gerald Schaefer Date: Fri Aug 19 18:53:43 2022 +0200 s390/hugetlb: fix prepare_hugepage_range() check for 2 GB hugepages The alignment check in prepare_hugepage_range() is wrong for 2 GB hugepages, it only checks for 1 MB hugepage alignment. This can result in kernel crash in __unmap_hugepage_range() at the BUG_ON(start & ~huge_page_mask(h)) alignment check, for mappings created with MAP_FIXED at unaligned address. Fix this by correctly handling multiple hugepage sizes, similar to the generic version of prepare_hugepage_range(). Fixes: d08de8e2d867 ("s390/mm: add support for 2GB hugepages") Cc: # 4.8+ Acked-by: Alexander Gordeev Signed-off-by: Gerald Schaefer Signed-off-by: Vasily Gorbik arch/s390/include/asm/hugetlb.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit bdbf57bca6bf0b76a0f2681014552b25917c26e1 Author: Heiko Carstens Date: Mon Aug 29 13:17:07 2022 +0200 s390: update defconfigs Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik arch/s390/configs/debug_defconfig | 53 ++++++++++++++++++++---------------- arch/s390/configs/defconfig | 49 ++++++++++++++++++--------------- arch/s390/configs/zfcpdump_defconfig | 6 ++-- 3 files changed, 60 insertions(+), 48 deletions(-) commit c9305b6c1f52060377c72aebe3a701389e9f3172 Author: Josh Poimboeuf Date: Fri Aug 26 16:55:44 2022 -0700 s390: fix nospec table alignments Add proper alignment for .nospec_call_table and .nospec_return_table in vmlinux. [hca@linux.ibm.com]: The problem with the missing alignment of the nospec tables exist since a long time, however only since commit e6ed91fd0768 ("s390/alternatives: remove padding generation code") and with CONFIG_RELOCATABLE=n the kernel may also crash at boot time. The above named commit reduced the size of struct alt_instr by one byte, so its new size is 11 bytes. Therefore depending on the number of cpu alternatives the size of the __alt_instructions array maybe odd, which again also causes that the addresses of the nospec tables will be odd. If the address of __nospec_call_start is odd and the kernel is compiled With CONFIG_RELOCATABLE=n the compiler may generate code that loads the address of __nospec_call_start with a 'larl' instruction. This will generate incorrect code since the 'larl' instruction only works with even addresses. In result the members of the nospec tables will be accessed with an off-by-one offset, which subsequently may lead to addressing exceptions within __nospec_revert(). Fixes: f19fbd5ed642 ("s390: introduce execute-trampolines for branches") Signed-off-by: Josh Poimboeuf Link: https://lore.kernel.org/r/8719bf1ce4a72ebdeb575200290094e9ce047bcc.1661557333.git.jpoimboe@kernel.org Cc: # 4.16 Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik arch/s390/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) commit ff03b8846705e517f878585cf66c5d8fca1c38b2 Author: Gerald Schaefer Date: Fri Aug 19 19:40:11 2022 +0200 s390/mm: remove useless hugepage address alignment The failing address alignment to HPAGE_MASK in do_exception(), for hugetlb faults, was useless from the beginning. With 2 GB hugepage support it became wrong, but w/o further negative impact. Now it could have negative performance impact because it breaks the cacheline optimization for process_huge_page(). Therefore, remove it. Note that we still have failing address alignment by HW to PAGE_SIZE, for all page faults, not just hugetlb faults. So this patch will not fix UFFD_FEATURE_EXACT_ADDRESS for userfaultfd handling. It will just move the failing address for hugetlb faults a bit closer to the real address, at 4K page granularity, similar to normal page faults. Reviewed-by: Heiko Carstens Signed-off-by: Gerald Schaefer Signed-off-by: Vasily Gorbik arch/s390/mm/fault.c | 2 -- 1 file changed, 2 deletions(-) commit 6d0ef7241553f3553a0a2764c69b07892705924c Author: Stanislaw Gruszka Date: Mon Aug 15 09:37:37 2022 +0200 wifi: iwlegacy: 4965: corrected fix for potential off-by-one overflow in il4965_rs_fill_link_cmd() This reverts commit a8eb8e6f7159c7c20c0ddac428bde3d110890aa7 as it can cause invalid link quality command sent to the firmware and address the off-by-one issue by fixing condition of while loop. Cc: stable@vger.kernel.org Fixes: a8eb8e6f7159 ("wifi: iwlegacy: 4965: fix potential off-by-one overflow in il4965_rs_fill_link_cmd()") Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220815073737.GA999388@wp.pl drivers/net/wireless/intel/iwlegacy/4965-rs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 40b717bfcefab28a0656b8caa5e43d5449e5a671 Author: Ajay.Kathat@microchip.com Date: Tue Aug 9 07:57:56 2022 +0000 wifi: wilc1000: fix DMA on stack objects Sometimes 'wilc_sdio_cmd53' is called with addresses pointing to an object on the stack. Use dynamically allocated memory for cmd53 instead of stack address which is not DMA'able. Fixes: 5625f965d764 ("wilc1000: move wilc driver out of staging") Reported-by: Michael Walle Suggested-by: Michael Walle Signed-off-by: Ajay Singh Reviewed-by: Michael Walle Tested-by: Michael Walle Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220809075749.62752-1-ajay.kathat@microchip.com drivers/net/wireless/microchip/wilc1000/netdev.h | 1 + drivers/net/wireless/microchip/wilc1000/sdio.c | 39 ++++++++++++++++++++---- drivers/net/wireless/microchip/wilc1000/wlan.c | 15 +++++++-- 3 files changed, 47 insertions(+), 8 deletions(-) commit e230a4455ac3e9b112f0367d1b8e255e141afae0 Author: Dan Carpenter Date: Tue Aug 30 17:55:07 2022 +0300 staging: rtl8712: fix use after free bugs _Read/Write_MACREG callbacks are NULL so the read/write_macreg_hdl() functions don't do anything except free the "pcmd" pointer. It results in a use after free. Delete them. Fixes: 2865d42c78a9 ("staging: r8712u: Add the new driver to the mainline kernel") Cc: stable Reported-by: Zheng Wang Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Yw4ASqkYcUhUfoY2@kili Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_cmd.c | 36 ----------------------------------- 1 file changed, 36 deletions(-) commit 5ef251b9b73ff9f62aa5ac60427af05b2b594a55 Merge: c063643cb33b acc5495bf764 Author: Greg Kroah-Hartman Date: Tue Aug 30 16:13:32 2022 +0200 Merge tag 'mhi-fixes-for-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-linus Manivannan writes: "A single fix targeting the MHI host stack: - Since the commit 1227d2a20cd7 ("bus: mhi: host: Move IRQ allocation to controller registration phase"), the MHI context gets freed during mhi_unregister_controller(). But when the MHI IRQs are shared, the IRQ handler may get invoked during __free_irq() if CONFIG_DEBUG_SHIRQ is set. In that case, there will be a null pointer dereference because of trying to use the freed context struct. So for fixing the issue, let's check for the existence of the context struct at the start of the handler before handling the IRQ." * tag 'mhi-fixes-for-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: host: Fix up null pointer access in mhi_irq_handler commit c063643cb33b05b5cb14bc3fd318fad58e8f83bb Merge: a582123d6f4c 1c11289b34ab Author: Greg Kroah-Hartman Date: Tue Aug 30 16:12:25 2022 +0200 Merge tag 'peci-fixes-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/iwi/linux into char-misc-linus Iwona writes: "PECI fixes for v6.0 Two minor fixes: * cpu - Fix use-after-free in adev_release() * aspeed - Fix error check for platform_get_irq()" * tag 'peci-fixes-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/iwi/linux: peci: cpu: Fix use-after-free in adev_release() peci: aspeed: fix error check return value of platform_get_irq() commit b46a6b09fa056042a302b181a1941f0056944603 Author: Pawel Laszczak Date: Thu Aug 25 08:21:37 2022 +0200 usb: cdns3: fix issue with rearming ISO OUT endpoint ISO OUT endpoint is enabled during queuing first usb request in transfer ring and disabled when TRBERR is reported by controller. After TRBERR and before next transfer added to TR driver must again reenable endpoint but does not. To solve this issue during processing TRBERR event driver must set the flag EP_UPDATE_EP_TRBADDR in priv_ep->flags field. Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") cc: Acked-by: Peter Chen Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20220825062137.5766-1-pawell@cadence.com Signed-off-by: Greg Kroah-Hartman drivers/usb/cdns3/cdns3-gadget.c | 1 + 1 file changed, 1 insertion(+) commit d5dcc33677d7415c5f23b3c052f9e80cbab9ea4e Author: Pawel Laszczak Date: Thu Aug 25 08:22:07 2022 +0200 usb: cdns3: fix incorrect handling TRB_SMM flag for ISOC transfer The TRB_SMM flag indicates that DMA has completed the TD service with this TRB. Usually it’s a last TRB in TD. In case of ISOC transfer for bInterval > 1 each ISOC transfer contains more than one TD associated with usb request (one TD per ITP). In such case the TRB_SMM flag will be set in every TD and driver will recognize the end of transfer after processing the first TD with TRB_SMM. In result driver stops updating request->actual and returns incorrect actual length. To fix this issue driver additionally must check TRB_CHAIN which is not used for isochronous transfers. Fixes: 249f0a25e8be ("usb: cdns3: gadget: handle sg list use case at completion correctly") cc: Acked-by: Peter Chen Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20220825062207.5824-1-pawell@cadence.com Signed-off-by: Greg Kroah-Hartman drivers/usb/cdns3/cdns3-gadget.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9d4dc16ec71bd6368548e9743223e449b4377fc7 Author: Krishna Kurapati Date: Sat Aug 27 08:45:10 2022 +0530 usb: gadget: mass_storage: Fix cdrom data transfers on MAC-OS During cdrom emulation, the response to read_toc command must contain the cdrom address as the number of sectors (2048 byte sized blocks) represented either as an absolute value (when MSF bit is '0') or in terms of PMin/PSec/PFrame (when MSF bit is set to '1'). Incase of cdrom, the fsg_lun_open call sets the sector size to 2048 bytes. When MAC OS sends a read_toc request with MSF set to '1', the store_cdrom_address assumes that the address being provided is the LUN size represented in 512 byte sized blocks instead of 2048. It tries to modify the address further to convert it to 2048 byte sized blocks and store it in MSF format. This results in data transfer failures as the cdrom address being provided in the read_toc response is incorrect. Fixes: 3f565a363cee ("usb: gadget: storage: adapt logic block size to bound block devices") Cc: stable@vger.kernel.org Acked-by: Alan Stern Signed-off-by: Krishna Kurapati Link: https://lore.kernel.org/r/1661570110-19127-1-git-send-email-quic_kriskura@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/storage_common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 608e58a0f4617977178131f5f68a3fce1d3f5316 Author: Alan Stern Date: Fri Aug 26 15:31:40 2022 -0400 media: mceusb: Use new usb_control_msg_*() routines Automatic kernel fuzzing led to a WARN about invalid pipe direction in the mceusb driver: ------------[ cut here ]------------ usb 6-1: BOGUS control dir, pipe 80000380 doesn't match bRequestType 40 WARNING: CPU: 0 PID: 2465 at drivers/usb/core/urb.c:410 usb_submit_urb+0x1326/0x1820 drivers/usb/core/urb.c:410 Modules linked in: CPU: 0 PID: 2465 Comm: kworker/0:2 Not tainted 5.19.0-rc4-00208-g69cb6c6556ad #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Workqueue: usb_hub_wq hub_event RIP: 0010:usb_submit_urb+0x1326/0x1820 drivers/usb/core/urb.c:410 Code: 7c 24 40 e8 ac 23 91 fd 48 8b 7c 24 40 e8 b2 70 1b ff 45 89 e8 44 89 f1 4c 89 e2 48 89 c6 48 c7 c7 a0 30 a9 86 e8 48 07 11 02 <0f> 0b e9 1c f0 ff ff e8 7e 23 91 fd 0f b6 1d 63 22 83 05 31 ff 41 RSP: 0018:ffffc900032becf0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff8881100f3058 RCX: 0000000000000000 RDX: ffffc90004961000 RSI: ffff888114c6d580 RDI: fffff52000657d90 RBP: ffff888105ad90f0 R08: ffffffff812c3638 R09: 0000000000000000 R10: 0000000000000005 R11: ffffed1023504ef1 R12: ffff888105ad9000 R13: 0000000000000040 R14: 0000000080000380 R15: ffff88810ba96500 FS: 0000000000000000(0000) GS:ffff88811a800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffe810bda58 CR3: 000000010b720000 CR4: 0000000000350ef0 Call Trace: usb_start_wait_urb+0x101/0x4c0 drivers/usb/core/message.c:58 usb_internal_control_msg drivers/usb/core/message.c:102 [inline] usb_control_msg+0x31c/0x4a0 drivers/usb/core/message.c:153 mceusb_gen1_init drivers/media/rc/mceusb.c:1431 [inline] mceusb_dev_probe+0x258e/0x33f0 drivers/media/rc/mceusb.c:1807 The reason for the warning is clear enough; the driver sends an unusual read request on endpoint 0 but does not set the USB_DIR_IN bit in the bRequestType field. More importantly, the whole situation can be avoided and the driver simplified by converting it over to the relatively new usb_control_msg_recv() and usb_control_msg_send() routines. That's what this fix does. Link: https://lore.kernel.org/all/CAB7eexLLApHJwZfMQ=X-PtRhw0BgO+5KcSMS05FNUYejJXqtSA@mail.gmail.com/ Cc: Mauro Carvalho Chehab Cc: stable@vger.kernel.org Reported-and-tested-by: Rondreis Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/YwkfnBFCSEVC6XZu@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman drivers/media/rc/mceusb.c | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) commit 9c6d778800b921bde3bff3cff5003d1650f942d1 Author: Alan Stern Date: Fri Aug 26 15:31:32 2022 -0400 USB: core: Prevent nested device-reset calls Automatic kernel fuzzing revealed a recursive locking violation in usb-storage: ============================================ WARNING: possible recursive locking detected 5.18.0 #3 Not tainted -------------------------------------------- kworker/1:3/1205 is trying to acquire lock: ffff888018638db8 (&us_interface_key[i]){+.+.}-{3:3}, at: usb_stor_pre_reset+0x35/0x40 drivers/usb/storage/usb.c:230 but task is already holding lock: ffff888018638db8 (&us_interface_key[i]){+.+.}-{3:3}, at: usb_stor_pre_reset+0x35/0x40 drivers/usb/storage/usb.c:230 ... stack backtrace: CPU: 1 PID: 1205 Comm: kworker/1:3 Not tainted 5.18.0 #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_deadlock_bug kernel/locking/lockdep.c:2988 [inline] check_deadlock kernel/locking/lockdep.c:3031 [inline] validate_chain kernel/locking/lockdep.c:3816 [inline] __lock_acquire.cold+0x152/0x3ca kernel/locking/lockdep.c:5053 lock_acquire kernel/locking/lockdep.c:5665 [inline] lock_acquire+0x1ab/0x520 kernel/locking/lockdep.c:5630 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x14f/0x1610 kernel/locking/mutex.c:747 usb_stor_pre_reset+0x35/0x40 drivers/usb/storage/usb.c:230 usb_reset_device+0x37d/0x9a0 drivers/usb/core/hub.c:6109 r871xu_dev_remove+0x21a/0x270 drivers/staging/rtl8712/usb_intf.c:622 usb_unbind_interface+0x1bd/0x890 drivers/usb/core/driver.c:458 device_remove drivers/base/dd.c:545 [inline] device_remove+0x11f/0x170 drivers/base/dd.c:537 __device_release_driver drivers/base/dd.c:1222 [inline] device_release_driver_internal+0x1a7/0x2f0 drivers/base/dd.c:1248 usb_driver_release_interface+0x102/0x180 drivers/usb/core/driver.c:627 usb_forced_unbind_intf+0x4d/0xa0 drivers/usb/core/driver.c:1118 usb_reset_device+0x39b/0x9a0 drivers/usb/core/hub.c:6114 This turned out not to be an error in usb-storage but rather a nested device reset attempt. That is, as the rtl8712 driver was being unbound from a composite device in preparation for an unrelated USB reset (that driver does not have pre_reset or post_reset callbacks), its ->remove routine called usb_reset_device() -- thus nesting one reset call within another. Performing a reset as part of disconnect processing is a questionable practice at best. However, the bug report points out that the USB core does not have any protection against nested resets. Adding a reset_in_progress flag and testing it will prevent such errors in the future. Link: https://lore.kernel.org/all/CAB7eexKUpvX-JNiLzhXBDWgfg2T9e9_0Tw4HQ6keN==voRbP0g@mail.gmail.com/ Cc: stable@vger.kernel.org Reported-and-tested-by: Rondreis Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/YwkflDxvg0KWqyZK@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 10 ++++++++++ include/linux/usb.h | 2 ++ 2 files changed, 12 insertions(+) commit 1016fc0c096c92dd0e6e0541daac7a7868169903 Author: Alan Stern Date: Fri Aug 26 15:31:17 2022 -0400 USB: gadget: Fix obscure lockdep violation for udc_mutex A recent commit expanding the scope of the udc_lock mutex in the gadget core managed to cause an obscure and slightly bizarre lockdep violation. In abbreviated form: ====================================================== WARNING: possible circular locking dependency detected 5.19.0-rc7+ #12510 Not tainted ------------------------------------------------------ udevadm/312 is trying to acquire lock: ffff80000aae1058 (udc_lock){+.+.}-{3:3}, at: usb_udc_uevent+0x54/0xe0 but task is already holding lock: ffff000002277548 (kn->active#4){++++}-{0:0}, at: kernfs_seq_start+0x34/0xe0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (kn->active#4){++++}-{0:0}:        lock_acquire+0x68/0x84        __kernfs_remove+0x268/0x380        kernfs_remove_by_name_ns+0x58/0xac        sysfs_remove_file_ns+0x18/0x24        device_del+0x15c/0x440 -> #2 (device_links_lock){+.+.}-{3:3}:        lock_acquire+0x68/0x84        __mutex_lock+0x9c/0x430        mutex_lock_nested+0x38/0x64        device_link_remove+0x3c/0xa0        _regulator_put.part.0+0x168/0x190        regulator_put+0x3c/0x54        devm_regulator_release+0x14/0x20 -> #1 (regulator_list_mutex){+.+.}-{3:3}:        lock_acquire+0x68/0x84        __mutex_lock+0x9c/0x430        mutex_lock_nested+0x38/0x64        regulator_lock_dependent+0x54/0x284        regulator_enable+0x34/0x80        phy_power_on+0x24/0x130        __dwc2_lowlevel_hw_enable+0x100/0x130        dwc2_lowlevel_hw_enable+0x18/0x40        dwc2_hsotg_udc_start+0x6c/0x2f0        gadget_bind_driver+0x124/0x1f4 -> #0 (udc_lock){+.+.}-{3:3}:        __lock_acquire+0x1298/0x20cc        lock_acquire.part.0+0xe0/0x230        lock_acquire+0x68/0x84        __mutex_lock+0x9c/0x430        mutex_lock_nested+0x38/0x64        usb_udc_uevent+0x54/0xe0 Evidently this was caused by the scope of udc_mutex being too large. The mutex is only meant to protect udc->driver along with a few other things. As far as I can tell, there's no reason for the mutex to be held while the gadget core calls a gadget driver's ->bind or ->unbind routine, or while a UDC is being started or stopped. (This accounts for link #1 in the chain above, where the mutex is held while the dwc2_hsotg_udc is started as part of driver probing.) Gadget drivers' ->disconnect callbacks are problematic. Even though usb_gadget_disconnect() will now acquire the udc_mutex, there's a window in usb_gadget_bind_driver() between the times when the mutex is released and the ->bind callback is invoked. If a disconnect occurred during that window, we could call the driver's ->disconnect routine before its ->bind routine. To prevent this from happening, it will be necessary to prevent a UDC from connecting while it has no gadget driver. This should be done already but it doesn't seem to be; currently usb_gadget_connect() has no check for this. Such a check will have to be added later. Some degree of mutual exclusion is required in soft_connect_store(), which can dereference udc->driver at arbitrary times since it is a sysfs callback. The solution here is to acquire the gadget's device lock rather than the udc_mutex. Since the driver core guarantees that the device lock is always held during driver binding and unbinding, this will make the accesses in soft_connect_store() mutually exclusive with any changes to udc->driver. Lastly, it turns out there is one place which should hold the udc_mutex but currently does not: The function_show() routine needs protection while it dereferences udc->driver. The missing lock and unlock calls are added. Link: https://lore.kernel.org/all/b2ba4245-9917-e399-94c8-03a383e7070e@samsung.com/ Fixes: 2191c00855b0 ("USB: gadget: Fix use-after-free Read in usb_udc_uevent()") Cc: Felipe Balbi Cc: stable@vger.kernel.org Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/YwkfhdxA/I2nOcK7@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/core.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit f9b995b49a07bd0d43b0e490f59be84415c745ae Author: Heiner Kallweit Date: Tue Aug 23 19:58:42 2022 +0200 usb: dwc2: fix wrong order of phy_power_on and phy_init Since 1599069a62c6 ("phy: core: Warn when phy_power_on is called before phy_init") the driver complains. In my case (Amlogic SoC) the warning is: phy phy-fe03e000.phy.2: phy_power_on was called before phy_init So change the order of the two calls. The same change has to be done to the order of phy_exit() and phy_power_off(). Fixes: 09a75e857790 ("usb: dwc2: refactor common low-level hw code to platform.c") Cc: stable@vger.kernel.org Acked-by: Minas Harutyunyan Acked-by: Marek Szyprowski Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/dfcc6b40-2274-4e86-e73c-5c5e6aa3e046@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc2/platform.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8cb339f1c1f04baede9d54c1e40ac96247a6393b Author: Piyush Mehta Date: Wed Aug 24 12:42:53 2022 +0530 usb: gadget: udc-xilinx: replace memcpy with memcpy_toio For ARM processor, unaligned access to device memory is not allowed. Method memcpy does not take care of alignment. USB detection failure with the unaligned address of memory access, with below kernel crash. To fix the unaligned address the kernel panic issue, replace memcpy with memcpy_toio method. Kernel crash: Unable to handle kernel paging request at virtual address ffff80000c05008a Mem abort info: ESR = 0x96000061 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x21: alignment fault Data abort info: ISV = 0, ISS = 0x00000061 CM = 0, WnR = 1 swapper pgtable: 4k pages, 48-bit VAs, pgdp=000000000143b000 [ffff80000c05008a] pgd=100000087ffff003, p4d=100000087ffff003, pud=100000087fffe003, pmd=1000000800bcc003, pte=00680000a0010713 Internal error: Oops: 96000061 [#1] SMP Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.15.19-xilinx-v2022.1 #1 Hardware name: ZynqMP ZCU102 Rev1.0 (DT) pstate: 200000c5 (nzCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __memcpy+0x30/0x260 lr : __xudc_ep0_queue+0xf0/0x110 sp : ffff800008003d00 x29: ffff800008003d00 x28: ffff800009474e80 x27: 00000000000000a0 x26: 0000000000000100 x25: 0000000000000012 x24: ffff000800bc8080 x23: 0000000000000001 x22: 0000000000000012 x21: ffff000800bc8080 x20: 0000000000000012 x19: ffff000800bc8080 x18: 0000000000000000 x17: ffff800876482000 x16: ffff800008004000 x15: 0000000000004000 x14: 00001f09785d0400 x13: 0103020101005567 x12: 0781400000000200 x11: 00000000c5672a10 x10: 00000000000008d0 x9 : ffff800009463cf0 x8 : ffff8000094757b0 x7 : 0201010055670781 x6 : 4000000002000112 x5 : ffff80000c05009a x4 : ffff000800a15012 x3 : ffff00080362ad80 x2 : 0000000000000012 x1 : ffff000800a15000 x0 : ffff80000c050088 Call trace: __memcpy+0x30/0x260 xudc_ep0_queue+0x3c/0x60 usb_ep_queue+0x38/0x44 composite_ep0_queue.constprop.0+0x2c/0xc0 composite_setup+0x8d0/0x185c configfs_composite_setup+0x74/0xb0 xudc_irq+0x570/0xa40 __handle_irq_event_percpu+0x58/0x170 handle_irq_event+0x60/0x120 handle_fasteoi_irq+0xc0/0x220 handle_domain_irq+0x60/0x90 gic_handle_irq+0x74/0xa0 call_on_irq_stack+0x2c/0x60 do_interrupt_handler+0x54/0x60 el1_interrupt+0x30/0x50 el1h_64_irq_handler+0x18/0x24 el1h_64_irq+0x78/0x7c arch_cpu_idle+0x18/0x2c do_idle+0xdc/0x15c cpu_startup_entry+0x28/0x60 rest_init+0xc8/0xe0 arch_call_rest_init+0x10/0x1c start_kernel+0x694/0x6d4 __primary_switched+0xa4/0xac Fixes: 1f7c51660034 ("usb: gadget: Add xilinx usb2 device support") Cc: stable@vger.kernel.org Reviewed-by: Linus Walleij Signed-off-by: Piyush Mehta Link: https://lore.kernel.org/r/20220824071253.1261096-1-piyush.mehta@amd.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/udc-xilinx.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b7cafb8b06a05c146bf75e5f666f8d84191d1ad4 Author: Heikki Krogerus Date: Thu Aug 25 17:04:11 2022 +0300 usb: typec: Remove retimers properly Retimer device class is left dangling when the typec module is unloaded. Attempts to reload the module failed with warning: "sysfs: cannot create duplicate filename '/class/retimer'" Fixing the issue by unregistering the class properly. Fixes: ddaf8d96f93b ("usb: typec: Add support for retimers") Reviewed-by: Prashant Malani Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20220825140411.10743-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/class.c | 1 + 1 file changed, 1 insertion(+) commit 6000b8d900cd5f52fbcd0776d0cc396e88c8c2ea Author: Johan Hovold Date: Thu Aug 25 15:18:36 2022 +0200 usb: dwc3: disable USB core PHY management The dwc3 driver manages its PHYs itself so the USB core PHY management needs to be disabled. Use the struct xhci_plat_priv hack added by commits 46034a999c07 ("usb: host: xhci-plat: add platform data support") and f768e718911e ("usb: host: xhci-plat: add priv quirk for skip PHY initialization") to propagate the setting for now. Fixes: 4e88d4c08301 ("usb: add a flag to skip PHY initialization to struct usb_hcd") Fixes: 178a0bce05cb ("usb: core: hcd: integrate the PHY wrapper into the HCD core") Tested-by: Matthias Kaehlcke Cc: stable Reviewed-by: Matthias Kaehlcke Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220825131836.19769-1-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/host.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3d5f70949f1b1168fbb17d06eb5c57e984c56c58 Author: Jean-Francois Le Fillatre Date: Wed Aug 24 21:13:21 2022 +0200 usb: add quirks for Lenovo OneLink+ Dock The Lenovo OneLink+ Dock contains two VL812 USB3.0 controllers: 17ef:1018 upstream 17ef:1019 downstream Those two controllers both have problems with some USB3.0 devices, particularly self-powered ones. Typical error messages include: Timeout while waiting for setup device command device not accepting address X, error -62 unable to enumerate USB device By process of elimination the controllers themselves were identified as the cause of the problem. Through trial and error the issue was solved by using USB_QUIRK_RESET_RESUME for both chips. Signed-off-by: Jean-Francois Le Fillatre Cc: stable Link: https://lore.kernel.org/r/20220824191320.17883-1-jflf_kernel@gmx.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/quirks.c | 4 ++++ 1 file changed, 4 insertions(+) commit f612466ebecb12a00d9152344ddda6f6345f04dc Author: Wang Hai Date: Fri Aug 26 17:00:55 2022 +0800 net/sched: fix netdevice reference leaks in attach_default_qdiscs() In attach_default_qdiscs(), if a dev has multiple queues and queue 0 fails to attach qdisc because there is no memory in attach_one_default_qdisc(). Then dev->qdisc will be noop_qdisc by default. But the other queues may be able to successfully attach to default qdisc. In this case, the fallback to noqueue process will be triggered. If the original attached qdisc is not released and a new one is directly attached, this will cause netdevice reference leaks. The following is the bug log: veth0: default qdisc (fq_codel) fail, fallback to noqueue unregister_netdevice: waiting for veth0 to become free. Usage count = 32 leaked reference. qdisc_alloc+0x12e/0x210 qdisc_create_dflt+0x62/0x140 attach_one_default_qdisc.constprop.41+0x44/0x70 dev_activate+0x128/0x290 __dev_open+0x12a/0x190 __dev_change_flags+0x1a2/0x1f0 dev_change_flags+0x23/0x60 do_setlink+0x332/0x1150 __rtnl_newlink+0x52f/0x8e0 rtnl_newlink+0x43/0x70 rtnetlink_rcv_msg+0x140/0x3b0 netlink_rcv_skb+0x50/0x100 netlink_unicast+0x1bb/0x290 netlink_sendmsg+0x37c/0x4e0 sock_sendmsg+0x5f/0x70 ____sys_sendmsg+0x208/0x280 Fix this bug by clearing any non-noop qdiscs that may have been assigned before trying to re-attach. Fixes: bf6dba76d278 ("net: sched: fallback to qdisc noqueue if default qdisc setup fail") Signed-off-by: Wang Hai Link: https://lore.kernel.org/r/20220826090055.24424-1-wanghai38@huawei.com Signed-off-by: Paolo Abeni net/sched/sch_generic.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit 902e02ea9385373ce4b142576eef41c642703955 Author: Fedor Pchelkin Date: Mon Aug 29 16:16:40 2022 +0300 tty: n_gsm: avoid call of sleeping functions from atomic context Syzkaller reports the following problem: BUG: sleeping function called from invalid context at kernel/printk/printk.c:2347 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 1105, name: syz-executor423 3 locks held by syz-executor423/1105: #0: ffff8881468b9098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x22/0x90 drivers/tty/tty_ldisc.c:266 #1: ffff8881468b9130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: tty_write_lock drivers/tty/tty_io.c:952 [inline] #1: ffff8881468b9130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: do_tty_write drivers/tty/tty_io.c:975 [inline] #1: ffff8881468b9130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: file_tty_write.constprop.0+0x2a8/0x8e0 drivers/tty/tty_io.c:1118 #2: ffff88801b06c398 (&gsm->tx_lock){....}-{2:2}, at: gsmld_write+0x5e/0x150 drivers/tty/n_gsm.c:2717 irq event stamp: 3482 hardirqs last enabled at (3481): [] __get_reqs_available+0x143/0x2f0 fs/aio.c:946 hardirqs last disabled at (3482): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (3482): [] _raw_spin_lock_irqsave+0x52/0x60 kernel/locking/spinlock.c:159 softirqs last enabled at (3408): [] asm_call_irq_on_stack+0x12/0x20 softirqs last disabled at (3401): [] asm_call_irq_on_stack+0x12/0x20 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 2 PID: 1105 Comm: syz-executor423 Not tainted 5.10.137-syzkaller #0 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x167 lib/dump_stack.c:118 ___might_sleep.cold+0x1e8/0x22e kernel/sched/core.c:7304 console_lock+0x19/0x80 kernel/printk/printk.c:2347 do_con_write+0x113/0x1de0 drivers/tty/vt/vt.c:2909 con_write+0x22/0xc0 drivers/tty/vt/vt.c:3296 gsmld_write+0xd0/0x150 drivers/tty/n_gsm.c:2720 do_tty_write drivers/tty/tty_io.c:1028 [inline] file_tty_write.constprop.0+0x502/0x8e0 drivers/tty/tty_io.c:1118 call_write_iter include/linux/fs.h:1903 [inline] aio_write+0x355/0x7b0 fs/aio.c:1580 __io_submit_one fs/aio.c:1952 [inline] io_submit_one+0xf45/0x1a90 fs/aio.c:1999 __do_sys_io_submit fs/aio.c:2058 [inline] __se_sys_io_submit fs/aio.c:2028 [inline] __x64_sys_io_submit+0x18c/0x2f0 fs/aio.c:2028 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xc6 The problem happens in the following control flow: gsmld_write(...) spin_lock_irqsave(&gsm->tx_lock, flags) // taken a spinlock on TX data con_write(...) do_con_write(...) console_lock() might_sleep() // -> bug As far as console_lock() might sleep it should not be called with spinlock held. The patch replaces tx_lock spinlock with mutex in order to avoid the problem. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 32dd59f96924 ("tty: n_gsm: fix race condition in gsmld_write()") Cc: stable Signed-off-by: Fedor Pchelkin Signed-off-by: Alexey Khoroshilov Link: https://lore.kernel.org/r/20220829131640.69254-3-pchelkin@ispras.ru Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 53 ++++++++++++++++++++++++----------------------------- 1 file changed, 24 insertions(+), 29 deletions(-) commit c9ab053e56ce13a949977398c8edc12e6c02fc95 Author: Fedor Pchelkin Date: Mon Aug 29 16:16:39 2022 +0300 tty: n_gsm: replace kicktimer with delayed_work A kick_timer timer_list is replaced with kick_timeout delayed_work to be able to synchronize with mutexes as a prerequisite for the introduction of tx_mutex. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: c568f7086c6e ("tty: n_gsm: fix missing timer to handle stalled links") Cc: stable Reviewed-by: Jiri Slaby Suggested-by: Hillf Danton Signed-off-by: Fedor Pchelkin Signed-off-by: Alexey Khoroshilov Link: https://lore.kernel.org/r/20220829131640.69254-2-pchelkin@ispras.ru Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 4bb1a53be85fcb1e24c14860e326a00cdd362c28 Author: Tetsuo Handa Date: Sat Aug 27 22:47:19 2022 +0900 tty: n_gsm: initialize more members at gsm_alloc_mux() syzbot is reporting use of uninitialized spinlock at gsmld_write() [1], for commit 32dd59f96924f45e ("tty: n_gsm: fix race condition in gsmld_write()") allows accessing gsm->tx_lock before gsm_activate_mux() initializes it. Since object initialization should be done right after allocation in order to avoid accessing uninitialized memory, move initialization of timer/work/waitqueue/spinlock from gsmld_open()/gsm_activate_mux() to gsm_alloc_mux(). Link: https://syzkaller.appspot.com/bug?extid=cf155def4e717db68a12 [1] Fixes: 32dd59f96924f45e ("tty: n_gsm: fix race condition in gsmld_write()") Reported-by: syzbot Tested-by: syzbot Cc: stable Acked-by: Jiri Slaby Signed-off-by: Tetsuo Handa Link: https://lore.kernel.org/r/2110618e-57f0-c1ce-b2ad-b6cacef3f60e@I-love.SAKURA.ne.jp Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit f16c6d2e58a4c2b972efcf9eb12390ee0ba3befb Author: Mazin Al Haddad Date: Sun Aug 14 04:52:12 2022 +0300 tty: n_gsm: add sanity check for gsm->receive in gsm_receive_buf() A null pointer dereference can happen when attempting to access the "gsm->receive()" function in gsmld_receive_buf(). Currently, the code assumes that gsm->recieve is only called after MUX activation. Since the gsmld_receive_buf() function can be accessed without the need to initialize the MUX, the gsm->receive() function will not be set and a NULL pointer dereference will occur. Fix this by avoiding the call to "gsm->receive()" in case the function is not initialized by adding a sanity check. Call Trace: gsmld_receive_buf+0x1c2/0x2f0 drivers/tty/n_gsm.c:2861 tiocsti drivers/tty/tty_io.c:2293 [inline] tty_ioctl+0xa75/0x15d0 drivers/tty/tty_io.c:2692 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Link: https://syzkaller.appspot.com/bug?id=bdf035c61447f8c6e0e6920315d577cb5cc35ac5 Fixes: 01aecd917114 ("tty: n_gsm: fix tty registration before control channel open") Cc: stable Reported-and-tested-by: syzbot+e3563f0c94e188366dbb@syzkaller.appspotmail.com Signed-off-by: Mazin Al Haddad Link: https://lore.kernel.org/r/20220814015211.84180-1-mazinalhaddad05@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 692a8ebcfc24f4a5bea0eb2967e450f584193da6 Author: Sergiu Moga Date: Wed Aug 24 17:29:03 2022 +0300 tty: serial: atmel: Preserve previous USART mode if RS485 disabled Whenever the atmel_rs485_config() driver method would be called, the USART mode is reset to normal mode before even checking if RS485 flag is set, thus resulting in losing the previous USART mode in the case where the checking fails. Some tools, such as `linux-serial-test`, lead to the driver calling this method when doing the setup of the serial port: after setting the port mode (Hardware Flow Control, Normal Mode, RS485 Mode, etc.), `linux-serial-test` tries to enable/disable RS485 depending on the commandline arguments that were passed. Example of how this issue could reveal itself: When doing a serial communication with Hardware Flow Control through `linux-serial-test`, the tool would lead to the driver roughly doing the following: - set the corresponding bit to 1 (ATMEL_US_USMODE_HWHS bit in the ATMEL_US_MR register) through the atmel_set_termios() to enable Hardware Flow Control - disable RS485 through the atmel_config_rs485() method Thus, when the latter is called, the mode will be reset and the previously set bit is unset, leaving USART in normal mode instead of the expected Hardware Flow Control mode. This fix ensures that this reset is only done if the checking for RS485 succeeds and that the previous mode is preserved otherwise. Fixes: e8faff7330a35 ("ARM: 6092/1: atmel_serial: support for RS485 communications") Cc: stable Reviewed-by: Ilpo Järvinen Signed-off-by: Sergiu Moga Link: https://lore.kernel.org/r/20220824142902.502596-1-sergiu.moga@microchip.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d5a2e0834364377a5d5a2fff1890a0b3f0bafd1f Author: Sherry Sun Date: Sun Aug 21 18:15:27 2022 +0800 tty: serial: lpuart: disable flow control while waiting for the transmit engine to complete When the user initializes the uart port, and waits for the transmit engine to complete in lpuart32_set_termios(), if the UART TX fifo has dirty data and the UARTMODIR enable the flow control, the TX fifo may never be empty. So here we should disable the flow control first to make sure the transmit engin can complete. Fixes: 380c966c093e ("tty: serial: fsl_lpuart: add 32-bit register interface support") Cc: stable Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20220821101527.10066-1-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 1 + 1 file changed, 1 insertion(+) commit 56c14fb4086b2de6921dd70251b19b364b909ea1 Author: Vincent Whitchurch Date: Thu Aug 18 13:50:26 2022 +0200 tty: Fix lookahead_buf crash with serdev Do not follow a NULL pointer if the tty_port_client_operations does not implement the ->lookahead_buf() callback, which is the case with serdev's ttyport. Reported-by: Hans de Goede Fixes: 6bb6fa6908ebd3 ("tty: Implement lookahead to process XON/XOFF timely") Reviewed-by: Ilpo Järvinen Signed-off-by: Vincent Whitchurch Link: https://lore.kernel.org/r/20220818115026.2237893-1-vincent.whitchurch@axis.com Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_buffer.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 846651eca073e2e02e37490a4a52752415d84781 Author: Shenwei Wang Date: Fri Aug 5 09:45:29 2022 -0500 serial: fsl_lpuart: RS485 RTS polariy is inverse The setting of RS485 RTS polarity is inverse in the current driver. When the property of 'rs485-rts-active-low' is enabled in the dts node, the RTS signal should be LOW during sending. Otherwise, if there is no such a property, the RTS should be HIGH during sending. Fixes: 03895cf41d18 ("tty: serial: fsl_lpuart: Add support for RS-485") Cc: stable Signed-off-by: Nicolas Diaz Signed-off-by: Shenwei Wang Link: https://lore.kernel.org/r/20220805144529.604856-1-shenwei.wang@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 566f9c9f89337792070b5a6062dff448b3e7977f Author: Helge Deller Date: Sat Jul 30 20:50:18 2022 +0200 vt: Clear selection before changing the font When changing the console font with ioctl(KDFONTOP) the new font size can be bigger than the previous font. A previous selection may thus now be outside of the new screen size and thus trigger out-of-bounds accesses to graphics memory if the selection is removed in vc_do_resize(). Prevent such out-of-memory accesses by dropping the selection before the various con_font_set() console handlers are called. Reported-by: syzbot+14b0e8f3fd1612e35350@syzkaller.appspotmail.com Cc: stable Tested-by: Khalid Masum Signed-off-by: Helge Deller Link: https://lore.kernel.org/r/YuV9apZGNmGfjcor@p100 Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 25af7406df5915f04d5f1c8f081dabb0ead1cdcc Author: Isaac Manjarres Date: Thu Aug 18 18:28:51 2022 +0100 ARM: 9229/1: amba: Fix use-after-free in amba_read_periphid() After commit f2d3b9a46e0e ("ARM: 9220/1: amba: Remove deferred device addition"), it became possible for amba_read_periphid() to be invoked concurrently from two threads for a particular AMBA device. Consider the case where a thread (T0) is registering an AMBA driver, and searching for all of the devices it can match with on the AMBA bus. Suppose that another thread (T1) is executing the deferred probe work, and is searching through all of the AMBA drivers on the bus for a driver that matches a particular AMBA device. Assume that both threads begin operating on the same AMBA device and the device's peripheral ID is still unknown. In this scenario, the amba_match() function will be invoked for the same AMBA device by both threads, which means amba_read_periphid() can also be invoked by both threads, and both threads will be able to manipulate the AMBA device's pclk pointer without any synchronization. It's possible that one thread will initialize the pclk pointer, then the other thread will re-initialize it, overwriting the previous value, and both will race to free the same pclk, resulting in a use-after-free for whichever thread frees the pclk last. Add a lock per AMBA device to synchronize the handling with detecting the peripheral ID to avoid the use-after-free scenario. The following KFENCE bug report helped detect this problem: ================================================================== BUG: KFENCE: use-after-free read in clk_disable+0x14/0x34 Use-after-free read at 0x(ptrval) (in kfence-#19): clk_disable+0x14/0x34 amba_read_periphid+0xdc/0x134 amba_match+0x3c/0x84 __driver_attach+0x20/0x158 bus_for_each_dev+0x74/0xc0 bus_add_driver+0x154/0x1e8 driver_register+0x88/0x11c do_one_initcall+0x8c/0x2fc kernel_init_freeable+0x190/0x220 kernel_init+0x10/0x108 ret_from_fork+0x14/0x3c 0x0 kfence-#19: 0x(ptrval)-0x(ptrval), size=36, cache=kmalloc-64 allocated by task 8 on cpu 0 at 11.629931s: clk_hw_create_clk+0x38/0x134 amba_get_enable_pclk+0x10/0x68 amba_read_periphid+0x28/0x134 amba_match+0x3c/0x84 __device_attach_driver+0x2c/0xc4 bus_for_each_drv+0x80/0xd0 __device_attach+0xb0/0x1f0 bus_probe_device+0x88/0x90 deferred_probe_work_func+0x8c/0xc0 process_one_work+0x23c/0x690 worker_thread+0x34/0x488 kthread+0xd4/0xfc ret_from_fork+0x14/0x3c 0x0 freed by task 8 on cpu 0 at 11.630095s: amba_read_periphid+0xec/0x134 amba_match+0x3c/0x84 __device_attach_driver+0x2c/0xc4 bus_for_each_drv+0x80/0xd0 __device_attach+0xb0/0x1f0 bus_probe_device+0x88/0x90 deferred_probe_work_func+0x8c/0xc0 process_one_work+0x23c/0x690 worker_thread+0x34/0x488 kthread+0xd4/0xfc ret_from_fork+0x14/0x3c 0x0 Cc: Saravana Kannan Cc: patches@armlinux.org.uk Fixes: f2d3b9a46e0e ("ARM: 9220/1: amba: Remove deferred device addition") Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Isaac J. Manjarres Signed-off-by: Russell King (Oracle) drivers/amba/bus.c | 8 +++++++- include/linux/amba/bus.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) commit 4e2a2ed96adcb6151a15ea40db933d97f2ae7aaa Author: Lad Prabhakar Date: Mon Aug 29 22:47:30 2022 +0100 dt-bindings: i2c: renesas,riic: Fix 'unevaluatedProperties' warnings With 'unevaluatedProperties' support implemented, there's a number of warnings when running dtbs_check: arch/arm64/boot/dts/renesas/r9a07g043u11-smarc.dtb: i2c@10058000: Unevaluated properties are not allowed ('resets' was unexpected) From schema: Documentation/devicetree/bindings/i2c/renesas,riic.yaml The main problem is that bindings schema marks resets as a required property for RZ/G2L (and alike) SoC's but resets property is not part of schema. So to fix this just add a resets property with maxItems set to 1. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/renesas,riic.yaml | 3 +++ 1 file changed, 3 insertions(+) commit b05972f01e7d30419987a1f221b5593668fd6448 Author: Zhengchao Shao Date: Fri Aug 26 09:39:30 2022 +0800 net: sched: tbf: don't call qdisc_put() while holding tree lock The issue is the same to commit c2999f7fb05b ("net: sched: multiq: don't call qdisc_put() while holding tree lock"). Qdiscs call qdisc_put() while holding sch tree spinlock, which results sleeping-while-atomic BUG. Fixes: c266f64dbfa2 ("net: sched: protect block state with mutex") Signed-off-by: Zhengchao Shao Link: https://lore.kernel.org/r/20220826013930.340121-1-shaozhengchao@huawei.com Signed-off-by: Paolo Abeni net/sched/sch_tbf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 45baad7dd98f4d83f67c86c28769d3184390e324 Author: Yixing Liu Date: Mon Aug 29 18:50:20 2022 +0800 RDMA/hns: Remove the num_qpc_timer variable The bt number of qpc_timer of HIP09 increases compared with that of HIP08. Therefore, qpc_timer_bt_num and num_qpc_timer do not match. As a result, the driver may fail to allocate qpc_timer. So the driver needs to uniquely uses qpc_timer_bt_num to represent the bt number of qpc_timer. Fixes: 0e40dc2f70cd ("RDMA/hns: Add timer allocation support for hip08") Link: https://lore.kernel.org/r/20220829105021.1427804-4-liangwenpeng@huawei.com Signed-off-by: Yixing Liu Signed-off-by: Wenpeng Liang Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hns/hns_roce_device.h | 1 - drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 +-- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 2 +- drivers/infiniband/hw/hns/hns_roce_main.c | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) commit 0c8b5d6268d92d141bfd64d21c870d295a84dee1 Author: Wenpeng Liang Date: Mon Aug 29 18:50:19 2022 +0800 RDMA/hns: Fix wrong fixed value of qp->rq.wqe_shift The value of qp->rq.wqe_shift of HIP08 is always determined by the number of sge. So delete the wrong branch. Fixes: cfc85f3e4b7f ("RDMA/hns: Add profile support for hip08 driver") Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08 SoC") Link: https://lore.kernel.org/r/20220829105021.1427804-3-liangwenpeng@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hns/hns_roce_qp.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 55af9d498556f0860eb89ffa7677e8d73f6f643f Author: Chengchang Tang Date: Mon Aug 29 18:50:18 2022 +0800 RDMA/hns: Fix supported page size The supported page size for hns is (4K, 128M), not (4K, 2G). Fixes: cfc85f3e4b7f ("RDMA/hns: Add profile support for hip08 driver") Link: https://lore.kernel.org/r/20220829105021.1427804-2-liangwenpeng@huawei.com Signed-off-by: Chengchang Tang Signed-off-by: Wenpeng Liang Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a6fc70d76bddf98278af2ac000379c82aec8f11 Author: Pali Rohár Date: Mon Aug 29 10:30:46 2022 +0200 phy: marvell: phy-mvebu-a3700-comphy: Remove broken reset support Reset support for SATA PHY is somehow broken and after calling it, kernel is not able to detect and initialize SATA disk Samsung SSD 850 EMT0 [1]. Reset support was introduced in commit 934337080c6c ("phy: marvell: phy-mvebu-a3700-comphy: Add native kernel implementation") as part of complete rewrite of this driver. v1 patch series of that commit [2] did not contain reset support and was tested that is working fine with Ethernet, SATA and USB PHYs without issues too. So for now remove broken reset support and change implementation of power_off callback to power off all functions on specified lane (and not only selected function) because during startup kernel does not know which function was selected and configured by bootloader. Same logic was used also in v1 patch series of that commit. This change fixes issues with initialization of SATA disk Samsung SSD 850 and disk is working again, like before mentioned commit. Once problem with PHY reset callback is solved its functionality could be re-introduced. But for now it is unknown why it does not work. [1] - https://lore.kernel.org/r/20220531124159.3e4lgn2v462irbtz@shindev/ [2] - https://lore.kernel.org/r/20211028184242.22105-1-kabel@kernel.org/ Reported-by: Shinichiro Kawasaki Fixes: 934337080c6c ("phy: marvell: phy-mvebu-a3700-comphy: Add native kernel implementation") Cc: stable@vger.kernel.org # v5.18+ Signed-off-by: Pali Rohár Tested-by: Shinichiro Kawasaki Link: https://lore.kernel.org/r/20220829083046.15082-1-pali@kernel.org Signed-off-by: Vinod Koul drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 87 ++++++---------------------- 1 file changed, 17 insertions(+), 70 deletions(-) commit f233d2be38dbbb22299192292983037f01ab363c Author: Armin Wolf Date: Tue Aug 30 03:11:01 2022 +0200 hwmon: (gpio-fan) Fix array out of bounds access The driver does not check if the cooling state passed to gpio_fan_set_cur_state() exceeds the maximum cooling state as stored in fan_data->num_speeds. Since the cooling state is later used as an array index in set_fan_speed(), an array out of bounds access can occur. This can be exploited by setting the state of the thermal cooling device to arbitrary values, causing for example a kernel oops when unavailable memory is accessed this way. Example kernel oops: [ 807.987276] Unable to handle kernel paging request at virtual address ffffff80d0588064 [ 807.987369] Mem abort info: [ 807.987398] ESR = 0x96000005 [ 807.987428] EC = 0x25: DABT (current EL), IL = 32 bits [ 807.987477] SET = 0, FnV = 0 [ 807.987507] EA = 0, S1PTW = 0 [ 807.987536] FSC = 0x05: level 1 translation fault [ 807.987570] Data abort info: [ 807.987763] ISV = 0, ISS = 0x00000005 [ 807.987801] CM = 0, WnR = 0 [ 807.987832] swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000001165000 [ 807.987872] [ffffff80d0588064] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000 [ 807.987961] Internal error: Oops: 96000005 [#1] PREEMPT SMP [ 807.987992] Modules linked in: cmac algif_hash aes_arm64 algif_skcipher af_alg bnep hci_uart btbcm bluetooth ecdh_generic ecc 8021q garp stp llc snd_soc_hdmi_codec brcmfmac vc4 brcmutil cec drm_kms_helper snd_soc_core cfg80211 snd_compress bcm2835_codec(C) snd_pcm_dmaengine syscopyarea bcm2835_isp(C) bcm2835_v4l2(C) sysfillrect v4l2_mem2mem bcm2835_mmal_vchiq(C) raspberrypi_hwmon sysimgblt videobuf2_dma_contig videobuf2_vmalloc fb_sys_fops videobuf2_memops rfkill videobuf2_v4l2 videobuf2_common i2c_bcm2835 snd_bcm2835(C) videodev snd_pcm snd_timer snd mc vc_sm_cma(C) gpio_fan uio_pdrv_genirq uio drm fuse drm_panel_orientation_quirks backlight ip_tables x_tables ipv6 [ 807.988508] CPU: 0 PID: 1321 Comm: bash Tainted: G C 5.15.56-v8+ #1575 [ 807.988548] Hardware name: Raspberry Pi 3 Model B Rev 1.2 (DT) [ 807.988574] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 807.988608] pc : set_fan_speed.part.5+0x34/0x80 [gpio_fan] [ 807.988654] lr : gpio_fan_set_cur_state+0x34/0x50 [gpio_fan] [ 807.988691] sp : ffffffc008cf3bd0 [ 807.988710] x29: ffffffc008cf3bd0 x28: ffffff80019edac0 x27: 0000000000000000 [ 807.988762] x26: 0000000000000000 x25: 0000000000000000 x24: ffffff800747c920 [ 807.988787] x23: 000000000000000a x22: ffffff800369f000 x21: 000000001999997c [ 807.988854] x20: ffffff800369f2e8 x19: ffffff8002ae8080 x18: 0000000000000000 [ 807.988877] x17: 0000000000000000 x16: 0000000000000000 x15: 000000559e271b70 [ 807.988938] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 [ 807.988960] x11: 0000000000000000 x10: ffffffc008cf3c20 x9 : ffffffcfb60c741c [ 807.989018] x8 : 000000000000000a x7 : 00000000ffffffc9 x6 : 0000000000000009 [ 807.989040] x5 : 000000000000002a x4 : 0000000000000000 x3 : ffffff800369f2e8 [ 807.989062] x2 : 000000000000e780 x1 : 0000000000000001 x0 : ffffff80d0588060 [ 807.989084] Call trace: [ 807.989091] set_fan_speed.part.5+0x34/0x80 [gpio_fan] [ 807.989113] gpio_fan_set_cur_state+0x34/0x50 [gpio_fan] [ 807.989199] cur_state_store+0x84/0xd0 [ 807.989221] dev_attr_store+0x20/0x38 [ 807.989262] sysfs_kf_write+0x4c/0x60 [ 807.989282] kernfs_fop_write_iter+0x130/0x1c0 [ 807.989298] new_sync_write+0x10c/0x190 [ 807.989315] vfs_write+0x254/0x378 [ 807.989362] ksys_write+0x70/0xf8 [ 807.989379] __arm64_sys_write+0x24/0x30 [ 807.989424] invoke_syscall+0x4c/0x110 [ 807.989442] el0_svc_common.constprop.3+0xfc/0x120 [ 807.989458] do_el0_svc+0x2c/0x90 [ 807.989473] el0_svc+0x24/0x60 [ 807.989544] el0t_64_sync_handler+0x90/0xb8 [ 807.989558] el0t_64_sync+0x1a0/0x1a4 [ 807.989579] Code: b9403801 f9402800 7100003f 8b35cc00 (b9400416) [ 807.989627] ---[ end trace 8ded4c918658445b ]--- Fix this by checking the cooling state and return an error if it exceeds the maximum cooling state. Tested on a Raspberry Pi 3. Fixes: b5cf88e46bad ("(gpio-fan): Add thermal control hooks") Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20220830011101.178843-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck drivers/hwmon/gpio-fan.c | 3 +++ 1 file changed, 3 insertions(+) commit dcf8e5633e2e69ad60b730ab5905608b756a032f Author: Bart Van Assche Date: Tue Aug 23 12:59:25 2022 -0700 tracing: Define the is_signed_type() macro once There are two definitions of the is_signed_type() macro: one in and a second definition in . As suggested by Linus, move the definition of the is_signed_type() macro into the header file. Change the definition of the is_signed_type() macro to make sure that it does not trigger any sparse warnings with future versions of sparse for bitwise types. Link: https://lore.kernel.org/all/CAHk-=whjH6p+qzwUdx5SOVVHjS3WvzJQr6mDUwhEyTf6pJWzaQ@mail.gmail.com/ Link: https://lore.kernel.org/all/CAHk-=wjQGnVfb4jehFR0XyZikdQvCZouE96xR_nnf5kqaM5qqQ@mail.gmail.com/ Cc: Rasmus Villemoes Cc: Steven Rostedt Acked-by: Kees Cook Signed-off-by: Bart Van Assche Signed-off-by: Linus Torvalds include/linux/compiler.h | 6 ++++++ include/linux/overflow.h | 1 - include/linux/trace_events.h | 2 -- 3 files changed, 6 insertions(+), 3 deletions(-) commit 53b774718f784d614c8bfed20a3b32fb753604f3 Author: Bruce Duncan Date: Thu Aug 25 15:01:41 2022 +0200 docs: i2c: piix4: Fix typos, add markup, drop link [JD: Update the subject One more typo fixed Drop the link to lm-sensors' README, it's irrelevant] Signed-off-by: Bruce Duncan Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang Documentation/i2c/busses/i2c-piix4.rst | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 9c9c71168f7979f3798b61c65b4530fbfbcf19d1 Author: Greg Tulli Date: Mon Aug 29 11:21:03 2022 -0700 Input: iforce - add support for Boeder Force Feedback Wheel Add a new iforce_device entry to support the Boeder Force Feedback Wheel device. Signed-off-by: Greg Tulli Link: https://lore.kernel.org/r/3256420-c8ac-31b-8499-3c488a9880fd@gmail.com Signed-off-by: Dmitry Torokhov Documentation/input/joydev/joystick.rst | 1 + drivers/input/joystick/iforce/iforce-main.c | 1 + 2 files changed, 2 insertions(+) commit 1085f5080647f0c9f357c270a537869191f7f2a1 Author: Liang He Date: Thu Jul 7 09:56:20 2022 +0800 soc: brcmstb: pm-arm: Fix refcount leak and __iomem leak bugs In brcmstb_pm_probe(), there are two kinds of leak bugs: (1) we need to add of_node_put() when for_each__matching_node() breaks (2) we need to add iounmap() for each iomap in fail path Fixes: 0b741b8234c8 ("soc: bcm: brcmstb: Add support for S2/S3/S5 suspend states (ARM)") Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220707015620.306468-1-windhl@126.com Signed-off-by: Florian Fainelli drivers/soc/bcm/brcmstb/pm/pm-arm.c | 50 +++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 11 deletions(-) commit acc5495bf764e7e441193f972d96c5d2887f6b8b Author: Qiang Yu Date: Fri Jul 22 11:17:18 2022 +0800 bus: mhi: host: Fix up null pointer access in mhi_irq_handler The irq handler for a shared IRQ ought to be prepared for running even now it's being freed. So let's check the pointer used by mhi_irq_handler to avoid null pointer access since it is probably released before freeing IRQ. Fixes: 1227d2a20cd7 ("bus: mhi: host: Move IRQ allocation to controller registration phase") Signed-off-by: Qiang Yu Reviewed-by: Manivannan Sadhasivam Tested-by: Kalle Valo Link: https://lore.kernel.org/r/1658459838-30802-1-git-send-email-quic_qianyu@quicinc.com [mani: added fixes tag] Signed-off-by: Manivannan Sadhasivam drivers/bus/mhi/host/main.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit d68d289fbec70b50a25f5818964b26349320ddb5 Merge: b90cb1053190 5479d6d4bf12 Author: Linus Torvalds Date: Mon Aug 29 09:49:48 2022 -0700 Merge tag 'docs-6.0-fixes' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A handful of fixes for documentation and the docs build system" * tag 'docs-6.0-fixes' of git://git.lwn.net/linux: docs/conf.py: add function attribute '__fix_address' to conf.py Docs/admin-guide/mm/damon/usage: fix the example code snip docs: Update version number from 5.x to 6.x in README.rst docs/ja_JP/SubmittingPatches: Remove reference to submitting-drivers.rst docs: kerneldoc-preamble: Test xeCJK.sty before loading commit 0211c2a0ea600e25db3044daaeff4fe41c3ed6d9 Author: Ville Syrjälä Date: Fri Jun 17 22:59:48 2022 +0300 drm/i915: Skip wm/ddb readout for disabled pipes The stuff programmed into the wm/ddb registers of planes on disabled pipes doesn't matter. So during readout just leave our software state tracking for those zeroed. This should avoid us trying too hard to clean up after whatever mess the VBIOS/GOP left in there. The actual hardware state will get cleaned up if/when we enable the pipe anyway. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5711 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220617195948.24007-1-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy (cherry picked from commit b183db8f4783ca2efc9b47734f15aad9477a108a) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_pm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 919bef7a106ade2bda73681bbc2f3678198f44fc Author: Diego Santa Cruz Date: Thu Jun 16 15:41:37 2022 +0300 drm/i915/glk: ECS Liva Q2 needs GLK HDMI port timing quirk The quirk added in upstream commit 90c3e2198777 ("drm/i915/glk: Add Quirk for GLK NUC HDMI port issues.") is also required on the ECS Liva Q2. Note: Would be nicer to figure out the extra delay required for the retimer without quirks, however don't know how to check for that. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1326 Signed-off-by: Diego Santa Cruz Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220616124137.3184371-1-jani.nikula@intel.com (cherry picked from commit 08e9505fa8f9aa00072a47b6f234d89b6b27a89c) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_quirks.c | 3 +++ 1 file changed, 3 insertions(+) commit 458ec0c8f35963626ccd51c3d50b752de5f1b9d4 Author: Łukasz Bartosik Date: Tue Feb 1 16:33:54 2022 +0100 drm/i915: fix null pointer dereference Asus chromebook CX550 crashes during boot on v5.17-rc1 kernel. The root cause is null pointer defeference of bi_next in tgl_get_bw_info() in drivers/gpu/drm/i915/display/intel_bw.c. BUG: kernel NULL pointer dereference, address: 000000000000002e PGD 0 P4D 0 Oops: 0002 [#1] PREEMPT SMP NOPTI CPU: 0 PID: 1 Comm: swapper/0 Tainted: G U 5.17.0-rc1 Hardware name: Google Delbin/Delbin, BIOS Google_Delbin.13672.156.3 05/14/2021 RIP: 0010:tgl_get_bw_info+0x2de/0x510 ... [ 2.554467] Call Trace: [ 2.554467] [ 2.554467] intel_bw_init_hw+0x14a/0x434 [ 2.554467] ? _printk+0x59/0x73 [ 2.554467] ? _dev_err+0x77/0x91 [ 2.554467] i915_driver_hw_probe+0x329/0x33e [ 2.554467] i915_driver_probe+0x4c8/0x638 [ 2.554467] i915_pci_probe+0xf8/0x14e [ 2.554467] ? _raw_spin_unlock_irqrestore+0x12/0x2c [ 2.554467] pci_device_probe+0xaa/0x142 [ 2.554467] really_probe+0x13f/0x2f4 [ 2.554467] __driver_probe_device+0x9e/0xd3 [ 2.554467] driver_probe_device+0x24/0x7c [ 2.554467] __driver_attach+0xba/0xcf [ 2.554467] ? driver_attach+0x1f/0x1f [ 2.554467] bus_for_each_dev+0x8c/0xc0 [ 2.554467] bus_add_driver+0x11b/0x1f7 [ 2.554467] driver_register+0x60/0xea [ 2.554467] ? mipi_dsi_bus_init+0x16/0x16 [ 2.554467] i915_init+0x2c/0xb9 [ 2.554467] ? mipi_dsi_bus_init+0x16/0x16 [ 2.554467] do_one_initcall+0x12e/0x2b3 [ 2.554467] do_initcall_level+0xd6/0xf3 [ 2.554467] do_initcalls+0x4e/0x79 [ 2.554467] kernel_init_freeable+0xed/0x14d [ 2.554467] ? rest_init+0xc1/0xc1 [ 2.554467] kernel_init+0x1a/0x120 [ 2.554467] ret_from_fork+0x1f/0x30 [ 2.554467] ... Kernel panic - not syncing: Fatal exception Fixes: c64a9a7c05be ("drm/i915: Update memory bandwidth formulae") Signed-off-by: Łukasz Bartosik Reviewed-by: Radhakrishna Sripada Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220201153354.11971-1-lukasz.bartosik@semihalf.com (cherry picked from commit c247cd03898c4c43c3bce6d4014730403bc13032) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_bw.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 51fbbe8a3f8b9dd128fa98f6ea36058dfa3f36de Author: Jouni Högander Date: Mon Aug 22 17:08:36 2022 +0300 drm/i915/backlight: Disable pps power hook for aux based backlight Pps power hook seems to be problematic for backlight controlled via aux channel. Disable it for such cases. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3657 Cc: stable@vger.kernel.org Signed-off-by: Jouni Högander Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220822140836.534432-1-jouni.hogander@intel.com (cherry picked from commit 869e3bb7acb59d88c1226892136661810e8223a4) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_backlight.c | 11 ++++++++--- drivers/gpu/drm/i915/display/intel_dp.c | 2 -- 2 files changed, 8 insertions(+), 5 deletions(-) commit 2c4e19f873f4a389c2a557a84909cf4b78d3525a Author: Arun R Murthy Date: Mon Aug 8 09:27:50 2022 +0530 drm/i915/display: avoid warnings when registering dual panel backlight Commit 20f85ef89d94 ("drm/i915/backlight: use unique backlight device names") added support for multiple backlight devices on dual panel systems, but did so with error handling on -EEXIST from backlight_device_register(). Unfortunately, that triggered a warning in dmesg all the way down from sysfs_add_file_mode_ns() and sysfs_warn_dup(). Instead of optimistically always attempting to register with the default name ("intel_backlight", which we have to retain for backward compatibility), check if a backlight device with the name exists first, and, if so, use the card and connector based name. v2: reworked on top of the patch commit 20f85ef89d94 ("drm/i915/backlight: use unique backlight device names") v3: fixed the ref count leak(Jani N) Fixes: 20f85ef89d94 ("drm/i915/backlight: use unique backlight device names") Signed-off-by: Arun R Murthy Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220808035750.3111046-1-arun.r.murthy@intel.com (cherry picked from commit 4234ea30051200fc6016de10e4d58369e60b38f1) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_backlight.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 875c6d2711f6c97e58c52288b4231f3072711d61 Author: Jani Nikula Date: Tue Aug 16 18:37:21 2022 +0300 drm/i915/dsi: fix dual-link DSI backlight and CABC ports for display 11+ The VBT dual-link DSI backlight and CABC still use ports A and C, both in Bspec and code, while display 11+ DSI only supports ports A and B. Assume port C actually means port B for display 11+ when parsing VBT. Bspec: 20154 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6476 Cc: stable@vger.kernel.org Signed-off-by: Jani Nikula Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/8c462718bcc7b36a83e09d0a5eef058b6bc8b1a2.1660664162.git.jani.nikula@intel.com (cherry picked from commit ab55165d73a444606af1530cd0d6448b04370f68) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_bios.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit e5e6886f4d7e34b6539abddb591d515271caa634 Author: Jani Nikula Date: Tue Aug 16 18:37:20 2022 +0300 drm/i915/dsi: filter invalid backlight and CABC ports Avoid using ports that aren't initialized in case the VBT backlight or CABC ports have invalid values. This fixes a NULL pointer dereference of intel_dsi->dsi_hosts[port] in such cases. Cc: stable@vger.kernel.org Signed-off-by: Jani Nikula Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/b0f4f087866257d280eb97d6bcfcefd109cc5fa2.1660664162.git.jani.nikula@intel.com (cherry picked from commit f4a6c7a454a6e71c5ccf25af82694213a9784013) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/icl_dsi.c | 7 +++++++ drivers/gpu/drm/i915/display/vlv_dsi.c | 7 +++++++ 2 files changed, 14 insertions(+) commit 4595a25443447b9542b2a5ee7961eb290e94b496 Author: Daniele Ceraolo Spurio Date: Thu Aug 11 14:08:12 2022 -0700 drm/i915/guc: clear stalled request after a reset If the GuC CTs are full and we need to stall the request submission while waiting for space, we save the stalled request and where the stall occurred; when the CTs have space again we pick up the request submission from where we left off. If a full GT reset occurs, the state of all contexts is cleared and all non-guilty requests are unsubmitted, therefore we need to restart the stalled request submission from scratch. To make sure that we do so, clear the saved request after a reset. Fixes note: the patch that introduced the bug is in 5.15, but no officially supported platform had GuC submission enabled by default in that kernel, so the backport to that particular version (and only that one) can potentially be skipped. Fixes: 925dc1cf58ed ("drm/i915/guc: Implement GuC submission tasklet") Signed-off-by: Daniele Ceraolo Spurio Cc: Matthew Brost Cc: John Harrison Cc: # v5.15+ Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20220811210812.3239621-1-daniele.ceraolospurio@intel.com (cherry picked from commit f922fbb0f2ad1fd3e3186f39c46673419e6d9281) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e79a7417072265a85a36775e4e0f798154d39808 Author: Matthew Auld Date: Fri Aug 5 14:22:40 2022 +0100 drm/i915/ttm: fix CCS handling Crucible + recent Mesa seems to sometimes hit: GEM_BUG_ON(num_ccs_blks > NUM_CCS_BLKS_PER_XFER) And it looks like we can also trigger this with gem_lmem_swapping, if we modify the test to use slightly larger object sizes. Looking closer it looks like we have the following issues in migrate_copy(): - We are using plain integer in various places, which we can easily overflow with a large object. - We pass the entire object size (when the src is lmem) into emit_pte() and then try to copy it, which doesn't work, since we only have a few fixed sized windows in which to map the pages and perform the copy. With an object > 8M we therefore aren't properly copying the pages. And then with an object > 64M we trigger the GEM_BUG_ON(num_ccs_blks > NUM_CCS_BLKS_PER_XFER). So it looks like our copy handling for any object > 8M (which is our CHUNK_SZ) is currently broken on DG2. Fixes: da0595ae91da ("drm/i915/migrate: Evict and restore the flatccs capable lmem obj") Testcase: igt@gem_lmem_swapping Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Ramalingam C Reviewed-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20220805132240.442747-2-matthew.auld@intel.com (cherry picked from commit 8676145eb2f53a9940ff70910caf0125bd8a4bc2) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_migrate.c | 44 ++++++++++++++++----------------- 1 file changed, 21 insertions(+), 23 deletions(-) commit 58091b4958008ef69899e5404f8f031c36b35fbf Merge: 1c23f9e627a7 b75ef35bb577 Author: Rodrigo Vivi Date: Mon Aug 29 10:00:04 2022 -0400 Merge tag 'gvt-fixes-2022-08-22' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2022-08-22 - CometLake regression fix in mmio table rework (Alex) - misc kernel doc and typo fixes Signed-off-by: Rodrigo Vivi From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20220822031215.GJ1089@zhen-hp.sh.intel.com commit 8ffe20d08f2c95d702c453020d03a4c568a988f0 Author: Slark Xiao Date: Wed Aug 10 11:30:50 2022 +0800 USB: serial: option: add support for Cinterion MV32-WA/WB RmNet mode We added PIDs for MV32-WA/WB MBIM mode before, now we need to add support for RmNet mode. Test evidence as below: T: Bus=03 Lev=01 Prnt=01 Port=02 Cnt=03 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=1e2d ProdID=00f3 Rev=05.04 S: Manufacturer=Cinterion S: Product=Cinterion PID 0x00F3 USB Mobile Broadband S: SerialNumber=d7b4be8d C: #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan I: If#=0x1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option I: If#=0x3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option T: Bus=03 Lev=01 Prnt=01 Port=02 Cnt=03 Dev#= 10 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=1e2d ProdID=00f4 Rev=05.04 S: Manufacturer=Cinterion S: Product=Cinterion PID 0x00F4 USB Mobile Broadband S: SerialNumber=d095087d C: #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan I: If#=0x1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option I: If#=0x3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option Signed-off-by: Slark Xiao [ johan: sort entries ] Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 001047ea241a9646010b2744451dfbc7289542f3 Author: Niek Nooijens Date: Mon Aug 1 10:39:25 2022 +0200 USB: serial: ftdi_sio: add Omron CS1W-CIF31 device id works perfectly with: modprobe ftdi_sio echo "0590 00b2" | tee /sys/module/ftdi_sio/drivers/usb-serial\:ftdi_sio/new_id > /dev/null but doing this every reboot is a pain in the ass. Signed-off-by: Niek Nooijens Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 2 ++ drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++ 2 files changed, 8 insertions(+) commit f766f3abe6dbc9bf8b56a5d53c87e5a17942c154 Author: Yonglin Tan Date: Tue Jul 19 19:28:00 2022 +0800 USB: serial: option: add Quectel EM060K modem Add usb product id entry for the Quectel EM060K module. "MBIM mode": DIAG + NMEA + AT + MODEM + MBIM + QDSS T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 8 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=030b Rev= 5.04 S: Manufacturer=Quectel S: Product=EM060K-GL S: SerialNumber=89fb57db C:* #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA A: FirstIf#= 8 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00 I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=40 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 8 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=32ms I: If#= 9 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I:* If#= 9 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#=12 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none) E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Yonglin Tan [ johan: mention QDSS port and sort entries ] Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 4 ++++ 1 file changed, 4 insertions(+) commit 35508d2424097f9b6a1a17aac94f702767035616 Author: Yang Ling Date: Tue Aug 23 19:17:25 2022 +0800 MIPS: loongson32: ls1c: Fix hang during startup The RTCCTRL reg of LS1C is obselete. Writing this reg will cause system hang. Fixes: 60219c563c9b6 ("MIPS: Add RTC support for Loongson1C board") Signed-off-by: Yang Ling Tested-by: Keguang Zhang Acked-by: Keguang Zhang Signed-off-by: Thomas Bogendoerfer arch/mips/loongson32/ls1c/board.c | 1 - 1 file changed, 1 deletion(-) commit cb10b0f91c5f76de981ef927e7dadec60c5a5d96 Merge: 1bd3a383075c 278d3ba61563 Author: David S. Miller Date: Mon Aug 29 13:02:27 2022 +0100 Merge branch 'u64_stats-fixups' Sebastian Andrzej Siewior says: ==================== net: u64_stats fixups for 32bit. while looking at the u64-stats patch https://lore.kernel.org/all/20220817162703.728679-10-bigeasy@linutronix.de I noticed that u64_stats_fetch_begin() is used. That suspicious thing about it is that network processing, including stats update, is performed in NAPI and so I would expect to see u64_stats_fetch_begin_irq() in order to avoid updates from NAPI during the read. This is only needed on 32bit-UP where the seqcount is not used. This is address in 2/2. The remaining user take some kind of precaution and may use u64_stats_fetch_begin(). I updated the previously mentioned patch to get rid of u64_stats_fetch_begin_irq(). If this is not considered stable patch worthy then it can be ignored and considred fixed by the other series which removes the special 32bit cases. The xrs700x driver reads and writes the counter from preemptible context so the only missing piece here is at least disable preemption on the writer side to avoid preemption while the writer is in progress. The possible reader would spin then until the writer completes its write critical section which is considered bad. This is addressed in 1/2 by using u64_stats_update_begin_irqsave() and so disable interrupts during the write critical section. The other closet resemblance I found is mdio_bus.c::mdiobus_stats_acct() where preemtion is disabled unconditionally. This is something I want to avoid since it also affects 64bit. ==================== Signed-off-by: David S. Miller commit 278d3ba61563ceed3cb248383ced19e14ec7bc1f Author: Sebastian Andrzej Siewior Date: Thu Aug 25 13:36:45 2022 +0200 net: Use u64_stats_fetch_begin_irq() for stats fetch. On 32bit-UP u64_stats_fetch_begin() disables only preemption. If the reader is in preemptible context and the writer side (u64_stats_update_begin*()) runs in an interrupt context (IRQ or softirq) then the writer can update the stats during the read operation. This update remains undetected. Use u64_stats_fetch_begin_irq() to ensure the stats fetch on 32bit-UP are not interrupted by a writer. 32bit-SMP remains unaffected by this change. Cc: "David S. Miller" Cc: Catherine Sullivan Cc: David Awogbemila Cc: Dimitris Michailidis Cc: Eric Dumazet Cc: Hans Ulli Kroll Cc: Jakub Kicinski Cc: Jeroen de Borst Cc: Johannes Berg Cc: Linus Walleij Cc: Paolo Abeni Cc: Simon Horman Cc: linux-arm-kernel@lists.infradead.org Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Cc: oss-drivers@corigine.com Cc: stable@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/cortina/gemini.c | 24 +++++++++++----------- drivers/net/ethernet/fungible/funeth/funeth_txrx.h | 4 ++-- drivers/net/ethernet/google/gve/gve_ethtool.c | 16 +++++++-------- drivers/net/ethernet/google/gve/gve_main.c | 12 +++++------ drivers/net/ethernet/huawei/hinic/hinic_rx.c | 4 ++-- drivers/net/ethernet/huawei/hinic/hinic_tx.c | 4 ++-- .../net/ethernet/netronome/nfp/nfp_net_common.c | 8 ++++---- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 8 ++++---- drivers/net/netdevsim/netdev.c | 4 ++-- net/mac80211/sta_info.c | 8 ++++---- net/mpls/af_mpls.c | 4 ++-- 11 files changed, 48 insertions(+), 48 deletions(-) commit 3f8ae9fe0409698799e173f698b714f34570b64b Author: Sebastian Andrzej Siewior Date: Thu Aug 25 13:36:44 2022 +0200 net: dsa: xrs700x: Use irqsave variant for u64 stats update xrs700x_read_port_counters() updates the stats from a worker using the u64_stats_update_begin() version. This is okay on 32-UP since on the reader side preemption is disabled. On 32bit-SMP the writer can be preempted by the reader at which point the reader will spin on the seqcount until writer continues and completes the update. Assigning the mib_mutex mutex to the underlying seqcount would ensure proper synchronisation. The API for that on the u64_stats_init() side isn't available. Since it is the only user, just use disable interrupts during the update. Use u64_stats_update_begin_irqsave() on the writer side to ensure an uninterrupted update. Fixes: ee00b24f32eb8 ("net: dsa: add Arrow SpeedChips XRS700x driver") Cc: Andrew Lunn Cc: Florian Fainelli Cc: George McCollister Cc: Vivien Didelot Cc: Vladimir Oltean Signed-off-by: Sebastian Andrzej Siewior Acked-by: George McCollister Signed-off-by: David S. Miller drivers/net/dsa/xrs700x/xrs700x.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8d5fc280392735e4441b35de14f2f4860fa8d83c Author: Yan Xinyu Date: Thu Jul 14 18:20:37 2022 +0800 USB: serial: option: add support for OPPO R11 diag port Add support for OPPO R11 USB diag serial port to option driver. This phone uses Qualcomm Snapdragon 660 SoC. usb-devices output: T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 10 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=22d9 ProdID=276c Rev=04.04 S: Manufacturer=OPPO S: Product=SDM660-MTP _SN:09C6BCA7 S: SerialNumber=beb2c403 C: #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA I: If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option I: If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs Signed-off-by: Yan Xinyu Link: https://lore.kernel.org/r/20220714102037.4113889-1-sdlyyxy@bupt.edu.cn Link: https://lore.kernel.org/r/Yt1WfSZk03Plpnan@hovoldconsulting.com Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 5 +++++ 1 file changed, 5 insertions(+) commit ca922fecda6caa5162409406dc3b663062d75089 Author: Pierre Morel Date: Fri Aug 19 14:29:45 2022 +0200 KVM: s390: pci: Hook to access KVM lowlevel from VFIO We have a cross dependency between KVM and VFIO when using s390 vfio_pci_zdev extensions for PCI passthrough To be able to keep both subsystem modular we add a registering hook inside the S390 core code. This fixes a build problem when VFIO is built-in and KVM is built as a module. Reported-by: Randy Dunlap Reported-by: kernel test robot Reviewed-by: Matthew Rosato Reviewed-by: Niklas Schnelle Signed-off-by: Pierre Morel Fixes: 09340b2fca007 ("KVM: s390: pci: add routines to start/stop interpretive execution") Cc: Acked-by: Janosch Frank Acked-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/r/20220819122945.9309-1-pmorel@linux.ibm.com Message-Id: <20220819122945.9309-1-pmorel@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/include/asm/kvm_host.h | 17 ++++++----------- arch/s390/kvm/pci.c | 12 ++++++++---- arch/s390/pci/Makefile | 2 +- arch/s390/pci/pci_kvm_hook.c | 11 +++++++++++ drivers/vfio/pci/vfio_pci_zdev.c | 8 ++++++-- 5 files changed, 32 insertions(+), 18 deletions(-) commit f04445fa099668ca1c9889c48e309f49740f92f0 Author: Claudiu Beznea Date: Fri Aug 26 11:39:19 2022 +0300 ARM: configs: at91: remove CONFIG_MICROCHIP_PIT64B Since commit f611af4c3bfa ("ARM: at91: Kconfig: implement PIT64B selection") there is no need to explicitly select PIT64B. Fixes: f611af4c3bfa ("ARM: at91: Kconfig: implement PIT64B selection") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220826083927.3107272-2-claudiu.beznea@microchip.com arch/arm/configs/at91_dt_defconfig | 1 - arch/arm/configs/sama7_defconfig | 1 - 2 files changed, 2 deletions(-) commit 92d5d6434d285510a3563ebace24306e240615e1 Author: Luca Ceresoli Date: Wed Aug 24 10:31:04 2022 +0200 docs: i2c: i2c-topology: reorder sections more logically The sequence of sections is a bit confusing here: * we list the mux locking scheme for existing drivers before introducing what mux locking schemes are * we list the caveats for each locking scheme (which are tricky) before the example of the simple use case Restructure it entirely with the following logic: * Intro ("I2C muxes and complex topologies") * Locking - mux-locked - example - caveats - parent-locked - example - caveats * Complex examples * Mux type of existing device drivers While there, also apply some other improvements: * convert the caveat list from a table (with only one column carrying content) to a bullet list. * add a small introductory text to bridge the gap from listing the use cases to telling about the hardware components to handle them and then the device drivers that implement those. * make empty lines usage more uniform Signed-off-by: Luca Ceresoli Acked-by: Peter Rosin Signed-off-by: Wolfram Sang Documentation/i2c/i2c-topology.rst | 211 ++++++++++++++++++++----------------- 1 file changed, 114 insertions(+), 97 deletions(-) commit 12c035a1a840e07a351c277d7a468269fa603000 Author: Luca Ceresoli Date: Wed Aug 24 10:31:03 2022 +0200 docs: i2c: i2c-topology: fix incorrect heading "Etc" here was never meant to be a heading, it became one while converting to ReST. It would be easy to just convert it to plain text, but rather remove it and add an introductory text before the list that conveys the same meaning but with a better reading flow. Fixes: ccf988b66d69 ("docs: i2c: convert to ReST and add to driver-api bookset") Signed-off-by: Luca Ceresoli Acked-by: Peter Rosin Signed-off-by: Wolfram Sang Documentation/i2c/i2c-topology.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6292b4ba607de5bcf4ab0e57892a2f8068e6b997 Author: Luca Ceresoli Date: Wed Aug 24 10:31:02 2022 +0200 docs: i2c: i2c-topology: fix typo "intension" should have probably been "intention", however "intent" seems even better. Reported-by: Bagas Sanjaya Signed-off-by: Luca Ceresoli Acked-by: Peter Rosin Signed-off-by: Wolfram Sang Documentation/i2c/i2c-topology.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffd7bdddaab193c38416fd5dd416d065517d266e Author: Li Qiong Date: Mon Aug 29 15:12:59 2022 +0800 ieee802154: cc2520: add rc code in cc2520_tx() The rc code is 0 at the error path "status & CC2520_STATUS_TX_UNDERFLOW". Assign rc code with '-EINVAL' at this error path to fix it. Signed-off-by: Li Qiong Link: https://lore.kernel.org/r/20220829071259.18330-1-liqiong@nfschina.com Signed-off-by: Stefan Schmidt drivers/net/ieee802154/cc2520.c | 1 + 1 file changed, 1 insertion(+) commit f0da47118c7e93cdbbc6fb403dd729a5f2c90ee3 Author: Miquel Raynal Date: Fri Aug 26 16:29:54 2022 +0200 net: mac802154: Fix a condition in the receive path Upon reception, a packet must be categorized, either it's destination is the host, or it is another host. A packet with no destination addressing fields may be valid in two situations: - the packet has no source field: only ACKs are built like that, we consider the host as the destination. - the packet has a valid source field: it is directed to the PAN coordinator, as for know we don't have this information we consider we are not the PAN coordinator. There was likely a copy/paste error made during a previous cleanup because the if clause is now containing exactly the same condition as in the switch case, which can never be true. In the past the destination address was used in the switch and the source address was used in the if, which matches what the spec says. Cc: stable@vger.kernel.org Fixes: ae531b9475f6 ("ieee802154: use ieee802154_addr instead of *_sa variants") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20220826142954.254853-1-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 251e5d715e4bf6f286734b84de63c0eec210127c Author: Julia Lawall Date: Fri Aug 26 13:21:53 2022 +0200 ARM: ixp4xx: fix typos in comments Various spelling mistakes in comments. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20220318103729.157574-26-Julia.Lawall@inria.fr Link: https://lore.kernel.org/r/20220826112153.438829-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann arch/arm/mach-ixp4xx/ixp4xx-of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5b06d9f2a46b136d42536aa4120022dae448622 Merge: 43e403a286c5 eccd74397098 Author: Arnd Bergmann Date: Mon Aug 29 11:05:19 2022 +0200 Merge tag 'tee-fix-for-v6.0' of https://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes Add a missing include in the TEE subsystem * tag 'tee-fix-for-v6.0' of https://git.linaro.org/people/jens.wiklander/linux-tee: tee: fix compiler warning in tee_shm_register() Link: https://lore.kernel.org/r/YwdHcdEUib7obbbW@jade Signed-off-by: Arnd Bergmann commit 43e403a286c5428e979b0de2289fdc9485e9451d Merge: a3bedd242099 6c939e28b192 Author: Arnd Bergmann Date: Mon Aug 29 11:04:07 2022 +0200 Merge tag 'versatile-dts-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into arm/fixes These are some Versatile family DTS fixes, fixing some node names and clock names related to SPI. * tag 'versatile-dts-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: dts: versatile: Update spi clock-names property ARM: dts: realview: Update spi clock-names property ARM: dts: integratorap: Update spi node properties Link: https://lore.kernel.org/r/CACRpkdZfTe8NSGR2ZCkn-1JcNobjfWeXqajSqcJMp8+WtY+2Xw@mail.gmail.com Signed-off-by: Arnd Bergmann commit a3bedd242099ab44e1aeb2330902334a89fd6bb4 Merge: c3069e822a48 8f143b9f3849 Author: Arnd Bergmann Date: Mon Aug 29 11:02:27 2022 +0200 Merge tag 'imx-fixes-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 6.0: - Remove superfluous interrupt-names from imx8mq-tqma8mq RTC device to silence dtbs_check warning. - A few Verdin board fixes on CAN clock frequency, mcp251xfd interrupt, atmel_mxt_ts reset polarity and USB PHY. - Remove duplicated node and fix spi-flash compatible for imx6qdl-kontron-samx6i. - A couple of i.MX8M Plus DHCOM fixes from Marek Vasut on ECSPI1 pinmux and I2C5 GPIO assignment. - A couple of Venice fixes on SAI2 pin settings and phy-mode. - Drop in-band autoneg for 2500base-x phy-mode on ls1028a-qds-65bb board. - Revert the power device name setting change from imx8m-blk-ctrl driver, as it causes issue for sysfs cleanup path. - Fix gpcv2 driver to assert reset before ungating clock. * tag 'imx-fixes-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: freescale: verdin-imx8mp: fix atmel_mxt_ts reset polarity arm64: dts: freescale: verdin-imx8mm: fix atmel_mxt_ts reset polarity arm64: dts: imx8mp: Fix I2C5 GPIO assignment on i.MX8M Plus DHCOM arm64: dts: imx8mm-venice-gw7901: fix port/phy validation arm64: dts: verdin-imx8mm: add otg2 pd to usbphy soc: imx: gpcv2: Assert reset before ungating clock arm64: dts: ls1028a-qds-65bb: don't use in-band autoneg for 2500base-x ARM: dts: imx6qdl-kontron-samx6i: fix spi-flash compatible ARM: dts: imx6qdl-kontron-samx6i: remove duplicated node ARM: dts: imx6qdl-vicut1.dtsi: Fix node name backlight_led arm64: dts: imx8mq-tqma8mq: Remove superfluous interrupt-names arm64: dts: imx8mp: Adjust ECSPI1 pinmux on i.MX8M Plus DHCOM arm64: dts: imx8mp-venice-gw74xx: fix sai2 pin settings arm64: dts: imx8mm-verdin: use level interrupt for mcp251xfd arm64: dts: imx8mm-verdin: update CAN clock to 40MHz Revert "soc: imx: imx8m-blk-ctrl: set power device name" Link: https://lore.kernel.org/r/20220823092631.GV149610@dragon Signed-off-by: Arnd Bergmann commit c3069e822a48d8fd40b2a0855d840966a226aa1c Merge: b90cb1053190 3cbd67384677 Author: Arnd Bergmann Date: Mon Aug 29 10:55:36 2022 +0200 Merge branch 'polarfire/fixes' into arm/fixes Two updates for the MAINTAINERS file from Conor Dooley. * polarfire/fixes: MAINTAINERS: add the Polarfire SoC's i2c driver MAINTAINERS: add PolarFire SoC dt bindings commit 27cfde795a96aef1e859a5480489944b95421e46 Author: Michael Guralnik Date: Tue Aug 23 13:51:50 2022 +0300 RDMA/cma: Fix arguments order in net device validation Fix the order of source and destination addresses when resolving the route between server and client to validate use of correct net device. The reverse order we had so far didn't actually validate the net device as the server would try to resolve the route to itself, thus always getting the server's net device. The issue was discovered when running cm applications on a single host between 2 interfaces with same subnet and source based routing rules. When resolving the reverse route the source based route rules were ignored. Fixes: f887f2ac87c2 ("IB/cma: Validate routing of incoming requests") Link: https://lore.kernel.org/r/1c1ec2277a131d277ebcceec987fd338d35b775f.1661251872.git.leonro@nvidia.com Signed-off-by: Michael Guralnik Signed-off-by: Leon Romanovsky drivers/infiniband/core/cma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab2866f12ca18747413ba41409231d44e0c6149b Author: Geert Uytterhoeven Date: Thu Aug 25 11:24:47 2022 +0200 arm64: dts: renesas: r8a779g0: Fix HSCIF0 interrupt number The interrupt number for the HSCIF0 serial port, which serves as the serial console on the White Hawk board, is incorrect, causing userspace to hang immediately as soon as it tries to print something. Kernel output is unaffected, as it is printed using polling. Fixes: 987da486d84a5643 ("arm64: dts: renesas: Add Renesas R8A779G0 SoC support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/751dcef40d4534e856ed49b1d5b3a3e8d365ec42.1661419377.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c11efc57d4ccca47c5cf89341c4500acbb2c7599 Author: Thitat Auareesuksakul Date: Thu Aug 25 03:03:40 2022 +0700 scripts/extract-ikconfig: add zstd compression support Add extract-ikconfig support for kernel images compressed with zstd. Signed-off-by: Thitat Auareesuksakul Tested-by: Nicolas Schier Signed-off-by: Masahiro Yamada scripts/extract-ikconfig | 1 + 1 file changed, 1 insertion(+) commit 86879fd277e8e76bf29d10c23e7562d86b9286a0 Author: Lukas Bulwahn Date: Thu Aug 25 11:15:17 2022 +0200 scripts: remove obsolete gcc-ld script Since commit 8564ed2b3888 ("Kbuild, lto: Add a gcc-ld script to let run gcc as ld") in 2014, there was not specific work on this the gcc-ld script other than treewide clean-ups. There are no users within the kernel tree, and probably no out-of-tree users either, and there is no dedicated maintainer in MAINTAINERS. Delete this obsolete gcc-ld script. Signed-off-by: Lukas Bulwahn Reviewed-by: Nick Desaulniers Signed-off-by: Masahiro Yamada scripts/gcc-ld | 30 ------------------------------ 1 file changed, 30 deletions(-) commit 9c8b7a293f50253e694f19161c045817a938e551 Author: David Howells Date: Tue Aug 23 14:07:55 2022 +0100 smb3: fix temporary data corruption in insert range insert range doesn't discard the affected cached region so can risk temporarily corrupting file data. Also includes some minor cleanup (avoiding rereading inode size repeatedly unnecessarily) to make it clearer. Cc: stable@vger.kernel.org Fixes: 7fe6fe95b936 ("cifs: add FALLOC_FL_INSERT_RANGE support") Signed-off-by: David Howells cc: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/smb2ops.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit fa30a81f255a56cccd89552cd6ce7ea6e8d8acc4 Author: Steve French Date: Tue Aug 23 14:07:41 2022 +0100 smb3: fix temporary data corruption in collapse range collapse range doesn't discard the affected cached region so can risk temporarily corrupting the file data. This fixes xfstest generic/031 I also decided to merge a minor cleanup to this into the same patch (avoiding rereading inode size repeatedly unnecessarily) to make it clearer. Cc: stable@vger.kernel.org Fixes: 5476b5dd82c8b ("cifs: add support for FALLOC_FL_COLLAPSE_RANGE") Reported-by: David Howells Tested-by: David Howells Reviewed-by: David Howells cc: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/smb2ops.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit c3a72bb213209adfe981a4a92ea5746a778323e4 Author: David Howells Date: Tue Aug 23 14:07:28 2022 +0100 smb3: Move the flush out of smb2_copychunk_range() into its callers Move the flush out of smb2_copychunk_range() into its callers. This will allow the pagecache to be invalidated between the flush and the operation in smb3_collapse_range() and smb3_insert_range(). Signed-off-by: David Howells cc: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/cifsfs.c | 2 ++ fs/cifs/smb2ops.c | 20 ++++++++------------ 2 files changed, 10 insertions(+), 12 deletions(-) commit b90cb1053190353cc30f0fef0ef1f378ccc063c5 Author: Linus Torvalds Date: Sun Aug 28 15:05:29 2022 -0700 Linux 6.0-rc3 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b467192ec7070d2d6d14ab5e6774a8afdcc9e89d Merge: 373eff576e58 0ebafe2ea879 Author: Linus Torvalds Date: Sun Aug 28 14:49:59 2022 -0700 Merge tag 'mm-hotfixes-stable-2022-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull more hotfixes from Andrew Morton: "Seventeen hotfixes. Mostly memory management things. Ten patches are cc:stable, addressing pre-6.0 issues" * tag 'mm-hotfixes-stable-2022-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: .mailmap: update Luca Ceresoli's e-mail address mm/mprotect: only reference swap pfn page if type match squashfs: don't call kmalloc in decompressors mm/damon/dbgfs: avoid duplicate context directory creation mailmap: update email address for Colin King asm-generic: sections: refactor memory_intersects bootmem: remove the vmemmap pages from kmemleak in put_page_bootmem ocfs2: fix freeing uninitialized resource on ocfs2_dlm_shutdown Revert "memcg: cleanup racy sum avoidance code" mm/zsmalloc: do not attempt to free IS_ERR handle binder_alloc: add missing mmap_lock calls when using the VMA mm: re-allow pinning of zero pfns (again) vmcoreinfo: add kallsyms_num_syms symbol mailmap: update Guilherme G. Piccoli's email addresses writeback: avoid use-after-free after removing device shmem: update folio if shmem_replace_page() updates the page mm/hugetlb: avoid corrupting page->mapping in hugetlb_mcopy_atomic_pte commit 373eff576e580b6bbc1e709cd3ca0d100783431f Merge: 8379c0b31fbc 5d7fef0804b0 Author: Linus Torvalds Date: Sun Aug 28 14:36:27 2022 -0700 Merge tag 'bitmap-6.0-rc3' of github.com:/norov/linux Pull bitmap fixes from Yury Norov: "Fix the reported issues, and implements the suggested improvements, for the version of the cpumask tests [1] that was merged with commit c41e8866c28c ("lib/test: introduce cpumask KUnit test suite"). These changes include fixes for the tests, and better alignment with the KUnit style guidelines" * tag 'bitmap-6.0-rc3' of github.com:/norov/linux: lib/cpumask_kunit: add tests file to MAINTAINERS lib/cpumask_kunit: log mask contents lib/test_cpumask: follow KUnit style guidelines lib/test_cpumask: fix cpu_possible_mask last test lib/test_cpumask: drop cpu_possible_mask full test commit 0ebafe2ea879e97fef6bd97f72303a6ccf39f092 Author: Luca Ceresoli Date: Fri Aug 26 15:05:15 2022 +0200 .mailmap: update Luca Ceresoli's e-mail address My Bootlin address is preferred from now on. Link: https://lkml.kernel.org/r/20220826130515.3011951-1-luca.ceresoli@bootlin.com Signed-off-by: Luca Ceresoli Cc: Arnd Bergmann Cc: Atish Patra Cc: Hans Verkuil Cc: Thomas Petazzoni Signed-off-by: Andrew Morton .mailmap | 1 + 1 file changed, 1 insertion(+) commit 3d2f78f08cd8388035ac375e731ec1ac1b79b09d Author: Peter Xu Date: Tue Aug 23 18:11:38 2022 -0400 mm/mprotect: only reference swap pfn page if type match Yu Zhao reported a bug after the commit "mm/swap: Add swp_offset_pfn() to fetch PFN from swap entry" added a check in swp_offset_pfn() for swap type [1]: kernel BUG at include/linux/swapops.h:117! CPU: 46 PID: 5245 Comm: EventManager_De Tainted: G S O L 6.0.0-dbg-DEV #2 RIP: 0010:pfn_swap_entry_to_page+0x72/0xf0 Code: c6 48 8b 36 48 83 fe ff 74 53 48 01 d1 48 83 c1 08 48 8b 09 f6 c1 01 75 7b 66 90 48 89 c1 48 8b 09 f6 c1 01 74 74 5d c3 eb 9e <0f> 0b 48 ba ff ff ff ff 03 00 00 00 eb ae a9 ff 0f 00 00 75 13 48 RSP: 0018:ffffa59e73fabb80 EFLAGS: 00010282 RAX: 00000000ffffffe8 RBX: 0c00000000000000 RCX: ffffcd5440000000 RDX: 1ffffffffff7a80a RSI: 0000000000000000 RDI: 0c0000000000042b RBP: ffffa59e73fabb80 R08: ffff9965ca6e8bb8 R09: 0000000000000000 R10: ffffffffa5a2f62d R11: 0000030b372e9fff R12: ffff997b79db5738 R13: 000000000000042b R14: 0c0000000000042b R15: 1ffffffffff7a80a FS: 00007f549d1bb700(0000) GS:ffff99d3cf680000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000440d035b3180 CR3: 0000002243176004 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: change_pte_range+0x36e/0x880 change_p4d_range+0x2e8/0x670 change_protection_range+0x14e/0x2c0 mprotect_fixup+0x1ee/0x330 do_mprotect_pkey+0x34c/0x440 __x64_sys_mprotect+0x1d/0x30 It triggers because pfn_swap_entry_to_page() could be called upon e.g. a genuine swap entry. Fix it by only calling it when it's a write migration entry where the page* is used. [1] https://lore.kernel.org/lkml/CAOUHufaVC2Za-p8m0aiHw6YkheDcrO-C3wRGixwDS32VTS+k1w@mail.gmail.com/ Link: https://lkml.kernel.org/r/20220823221138.45602-1-peterx@redhat.com Fixes: 6c287605fd56 ("mm: remember exclusively mapped anonymous pages with PG_anon_exclusive") Signed-off-by: Peter Xu Reported-by: Yu Zhao Tested-by: Yu Zhao Reviewed-by: David Hildenbrand Cc: "Huang, Ying" Cc: Signed-off-by: Andrew Morton mm/mprotect.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1f13dff09ffc8bcf6aa20639b638d813379c7f6b Author: Phillip Lougher Date: Mon Aug 22 22:54:30 2022 +0100 squashfs: don't call kmalloc in decompressors The decompressors may be called while in an atomic section. So move the kmalloc() out of this path, and into the "page actor" init function. This fixes a regression introduced by commit f268eedddf35 ("squashfs: extend "page actor" to handle missing pages") Link: https://lkml.kernel.org/r/20220822215430.15933-1-phillip@squashfs.org.uk Fixes: f268eedddf35 ("squashfs: extend "page actor" to handle missing pages") Reported-by: Chris Murphy Signed-off-by: Phillip Lougher Cc: Signed-off-by: Andrew Morton fs/squashfs/file.c | 2 +- fs/squashfs/file_direct.c | 2 +- fs/squashfs/page_actor.c | 34 +++++++++++++++------------------- fs/squashfs/page_actor.h | 5 +++++ 4 files changed, 22 insertions(+), 21 deletions(-) commit d26f60703606ab425eee9882b32a1781a8bed74d Author: Badari Pulavarty Date: Sun Aug 21 18:08:53 2022 +0000 mm/damon/dbgfs: avoid duplicate context directory creation When user tries to create a DAMON context via the DAMON debugfs interface with a name of an already existing context, the context directory creation fails but a new context is created and added in the internal data structure, due to absence of the directory creation success check. As a result, memory could leak and DAMON cannot be turned on. An example test case is as below: # cd /sys/kernel/debug/damon/ # echo "off" > monitor_on # echo paddr > target_ids # echo "abc" > mk_context # echo "abc" > mk_context # echo $$ > abc/target_ids # echo "on" > monitor_on <<< fails Return value of 'debugfs_create_dir()' is expected to be ignored in general, but this is an exceptional case as DAMON feature is depending on the debugfs functionality and it has the potential duplicate name issue. This commit therefore fixes the issue by checking the directory creation failure and immediately return the error in the case. Link: https://lkml.kernel.org/r/20220821180853.2400-1-sj@kernel.org Fixes: 75c1c2b53c78 ("mm/damon/dbgfs: support multiple contexts") Signed-off-by: Badari Pulavarty Signed-off-by: SeongJae Park Cc: [ 5.15.x] Signed-off-by: Andrew Morton mm/damon/dbgfs.c | 3 +++ 1 file changed, 3 insertions(+) commit ac733f6558ec86938e40433d88ec4e6148bac485 Author: Colin Ian King Date: Wed Aug 17 22:27:53 2022 +0100 mailmap: update email address for Colin King Colin King is working on kernel janitorial fixes in his spare time and using his Intel email is confusing. Use his gmail account as the default email address. Link: https://lkml.kernel.org/r/20220817212753.101109-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King Signed-off-by: Andrew Morton .mailmap | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0c7d7cc2b4fe2e74ef8728f030f0f1674f9f6aee Author: Quanyang Wang Date: Fri Aug 19 16:11:45 2022 +0800 asm-generic: sections: refactor memory_intersects There are two problems with the current code of memory_intersects: First, it doesn't check whether the region (begin, end) falls inside the region (virt, vend), that is (virt < begin && vend > end). The second problem is if vend is equal to begin, it will return true but this is wrong since vend (virt + size) is not the last address of the memory region but (virt + size -1) is. The wrong determination will trigger the misreporting when the function check_for_illegal_area calls memory_intersects to check if the dma region intersects with stext region. The misreporting is as below (stext is at 0x80100000): WARNING: CPU: 0 PID: 77 at kernel/dma/debug.c:1073 check_for_illegal_area+0x130/0x168 DMA-API: chipidea-usb2 e0002000.usb: device driver maps memory from kernel text or rodata [addr=800f0000] [len=65536] Modules linked in: CPU: 1 PID: 77 Comm: usb-storage Not tainted 5.19.0-yocto-standard #5 Hardware name: Xilinx Zynq Platform unwind_backtrace from show_stack+0x18/0x1c show_stack from dump_stack_lvl+0x58/0x70 dump_stack_lvl from __warn+0xb0/0x198 __warn from warn_slowpath_fmt+0x80/0xb4 warn_slowpath_fmt from check_for_illegal_area+0x130/0x168 check_for_illegal_area from debug_dma_map_sg+0x94/0x368 debug_dma_map_sg from __dma_map_sg_attrs+0x114/0x128 __dma_map_sg_attrs from dma_map_sg_attrs+0x18/0x24 dma_map_sg_attrs from usb_hcd_map_urb_for_dma+0x250/0x3b4 usb_hcd_map_urb_for_dma from usb_hcd_submit_urb+0x194/0x214 usb_hcd_submit_urb from usb_sg_wait+0xa4/0x118 usb_sg_wait from usb_stor_bulk_transfer_sglist+0xa0/0xec usb_stor_bulk_transfer_sglist from usb_stor_bulk_srb+0x38/0x70 usb_stor_bulk_srb from usb_stor_Bulk_transport+0x150/0x360 usb_stor_Bulk_transport from usb_stor_invoke_transport+0x38/0x440 usb_stor_invoke_transport from usb_stor_control_thread+0x1e0/0x238 usb_stor_control_thread from kthread+0xf8/0x104 kthread from ret_from_fork+0x14/0x2c Refactor memory_intersects to fix the two problems above. Before the 1d7db834a027e ("dma-debug: use memory_intersects() directly"), memory_intersects is called only by printk_late_init: printk_late_init -> init_section_intersects ->memory_intersects. There were few places where memory_intersects was called. When commit 1d7db834a027e ("dma-debug: use memory_intersects() directly") was merged and CONFIG_DMA_API_DEBUG is enabled, the DMA subsystem uses it to check for an illegal area and the calltrace above is triggered. [akpm@linux-foundation.org: fix nearby comment typo] Link: https://lkml.kernel.org/r/20220819081145.948016-1-quanyang.wang@windriver.com Fixes: 979559362516 ("asm/sections: add helpers to check for section data") Signed-off-by: Quanyang Wang Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Thierry Reding Cc: Signed-off-by: Andrew Morton include/asm-generic/sections.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit dd0ff4d12dd284c334f7e9b07f8f335af856ac78 Author: Liu Shixin Date: Fri Aug 19 17:40:05 2022 +0800 bootmem: remove the vmemmap pages from kmemleak in put_page_bootmem The vmemmap pages is marked by kmemleak when allocated from memblock. Remove it from kmemleak when freeing the page. Otherwise, when we reuse the page, kmemleak may report such an error and then stop working. kmemleak: Cannot insert 0xffff98fb6eab3d40 into the object search tree (overlaps existing) kmemleak: Kernel memory leak detector disabled kmemleak: Object 0xffff98fb6be00000 (size 335544320): kmemleak: comm "swapper", pid 0, jiffies 4294892296 kmemleak: min_count = 0 kmemleak: count = 0 kmemleak: flags = 0x1 kmemleak: checksum = 0 kmemleak: backtrace: Link: https://lkml.kernel.org/r/20220819094005.2928241-1-liushixin2@huawei.com Fixes: f41f2ed43ca5 (mm: hugetlb: free the vmemmap pages associated with each HugeTLB page) Signed-off-by: Liu Shixin Reviewed-by: Muchun Song Cc: Matthew Wilcox Cc: Mike Kravetz Cc: Oscar Salvador Cc: Signed-off-by: Andrew Morton mm/bootmem_info.c | 2 ++ 1 file changed, 2 insertions(+) commit 550842cc60987b269e31b222283ade3e1b6c7fc8 Author: Heming Zhao Date: Mon Aug 15 16:57:54 2022 +0800 ocfs2: fix freeing uninitialized resource on ocfs2_dlm_shutdown After commit 0737e01de9c4 ("ocfs2: ocfs2_mount_volume does cleanup job before return error"), any procedure after ocfs2_dlm_init() fails will trigger crash when calling ocfs2_dlm_shutdown(). ie: On local mount mode, no dlm resource is initialized. If ocfs2_mount_volume() fails in ocfs2_find_slot(), error handling will call ocfs2_dlm_shutdown(), then does dlm resource cleanup job, which will trigger kernel crash. This solution should bypass uninitialized resources in ocfs2_dlm_shutdown(). Link: https://lkml.kernel.org/r/20220815085754.20417-1-heming.zhao@suse.com Fixes: 0737e01de9c4 ("ocfs2: ocfs2_mount_volume does cleanup job before return error") Signed-off-by: Heming Zhao Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Cc: Signed-off-by: Andrew Morton fs/ocfs2/dlmglue.c | 8 +++++--- fs/ocfs2/super.c | 3 +-- 2 files changed, 6 insertions(+), 5 deletions(-) commit dbb16df6443c59e8a1ef21c2272fcf387d600ddf Author: Shakeel Butt Date: Wed Aug 17 17:21:39 2022 +0000 Revert "memcg: cleanup racy sum avoidance code" This reverts commit 96e51ccf1af33e82f429a0d6baebba29c6448d0f. Recently we started running the kernel with rstat infrastructure on production traffic and begin to see negative memcg stats values. Particularly the 'sock' stat is the one which we observed having negative value. $ grep "sock " /mnt/memory/job/memory.stat sock 253952 total_sock 18446744073708724224 Re-run after couple of seconds $ grep "sock " /mnt/memory/job/memory.stat sock 253952 total_sock 53248 For now we are only seeing this issue on large machines (256 CPUs) and only with 'sock' stat. I think the networking stack increase the stat on one cpu and decrease it on another cpu much more often. So, this negative sock is due to rstat flusher flushing the stats on the CPU that has seen the decrement of sock but missed the CPU that has increments. A typical race condition. For easy stable backport, revert is the most simple solution. For long term solution, I am thinking of two directions. First is just reduce the race window by optimizing the rstat flusher. Second is if the reader sees a negative stat value, force flush and restart the stat collection. Basically retry but limited. Link: https://lkml.kernel.org/r/20220817172139.3141101-1-shakeelb@google.com Fixes: 96e51ccf1af33e8 ("memcg: cleanup racy sum avoidance code") Signed-off-by: Shakeel Butt Cc: "Michal Koutný" Cc: Johannes Weiner Cc: Michal Hocko Cc: Roman Gushchin Cc: Muchun Song Cc: David Hildenbrand Cc: Yosry Ahmed Cc: Greg Thelen Cc: [5.15] Signed-off-by: Andrew Morton include/linux/memcontrol.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit a5d2172180e8f94a8cfc7a7fa0243035629bf8d0 Author: Sergey Senozhatsky Date: Tue Aug 16 14:09:06 2022 +0900 mm/zsmalloc: do not attempt to free IS_ERR handle zsmalloc() now returns ERR_PTR values as handles, which zram accidentally can pass to zs_free(). Another bad scenario is when zcomp_compress() fails - handle has default -ENOMEM value, and zs_free() will try to free that "pointer value". Add the missing check and make sure that zs_free() bails out when ERR_PTR() is passed to it. Link: https://lkml.kernel.org/r/20220816050906.2583956-1-senozhatsky@chromium.org Fixes: c7e6f17b52e9 ("zsmalloc: zs_malloc: return ERR_PTR on failure") Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Cc: Nitin Gupta , Signed-off-by: Andrew Morton mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44e602b4e52f70f04620bbbf4fe46ecb40170bde Author: Liam Howlett Date: Wed Aug 10 16:02:25 2022 +0000 binder_alloc: add missing mmap_lock calls when using the VMA Take the mmap_read_lock() when using the VMA in binder_alloc_print_pages() and when checking for a VMA in binder_alloc_new_buf_locked(). It is worth noting binder_alloc_new_buf_locked() drops the VMA read lock after it verifies a VMA exists, but may be taken again deeper in the call stack, if necessary. Link: https://lkml.kernel.org/r/20220810160209.1630707-1-Liam.Howlett@oracle.com Fixes: a43cfc87caaf (android: binder: stop saving a pointer to the VMA) Signed-off-by: Liam R. Howlett Reported-by: Ondrej Mosnacek Reported-by: Acked-by: Carlos Llamas Tested-by: Ondrej Mosnacek Cc: Minchan Kim Cc: Christian Brauner (Microsoft) Cc: Greg Kroah-Hartman Cc: Hridya Valsaraju Cc: Joel Fernandes Cc: Martijn Coenen Cc: Suren Baghdasaryan Cc: Todd Kjos Cc: Matthew Wilcox (Oracle) Cc: "Arve Hjønnevåg" Signed-off-by: Andrew Morton drivers/android/binder_alloc.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit fcab34b433e2c13e333b2f53c4a8409eadc432c7 Author: Alex Williamson Date: Wed Aug 10 10:53:59 2022 -0600 mm: re-allow pinning of zero pfns (again) The below referenced commit makes the same error as 1c563432588d ("mm: fix is_pinnable_page against a cma page"), re-interpreting the logic to exclude pinning of the zero page, which breaks device assignment with vfio. To avoid further subtle mistakes, split the logic into discrete tests. [akpm@linux-foundation.org: simplify comment, per John] Link: https://lkml.kernel.org/r/166015037385.760108.16881097713975517242.stgit@omen Link: https://lore.kernel.org/all/165490039431.944052.12458624139225785964.stgit@omen Fixes: f25cbb7a95a2 ("mm: add zone device coherent type memory support") Signed-off-by: Alex Williamson Suggested-by: Matthew Wilcox Suggested-by: Felix Kuehling Tested-by: Slawomir Laba Reviewed-by: John Hubbard Cc: Alex Sierra Cc: Christoph Hellwig Cc: Alistair Popple Signed-off-by: Andrew Morton include/linux/mm.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit f09bddbd86619bf6213c96142a3b6b6a84818798 Author: Stephen Brennan Date: Mon Aug 8 13:54:10 2022 -0700 vmcoreinfo: add kallsyms_num_syms symbol The rest of the kallsyms symbols are useless without knowing the number of symbols in the table. In an earlier patch, I somehow dropped the kallsyms_num_syms symbol, so add it back in. Link: https://lkml.kernel.org/r/20220808205410.18590-1-stephen.s.brennan@oracle.com Fixes: 5fd8fea935a1 ("vmcoreinfo: include kallsyms symbols") Signed-off-by: Stephen Brennan Cc: Baoquan He Cc: Dave Young Cc: Vivek Goyal Signed-off-by: Andrew Morton kernel/crash_core.c | 1 + 1 file changed, 1 insertion(+) commit 6c26d17eea01477f9223c4d5da8ebc2099e4f027 Author: Guilherme G. Piccoli Date: Thu Aug 4 17:22:07 2022 -0300 mailmap: update Guilherme G. Piccoli's email addresses Both @canonical and @ibm email addresses are invalid now; use my personal address instead. Link: https://lkml.kernel.org/r/20220804202207.439427-1-gpiccoli@igalia.com Signed-off-by: Guilherme G. Piccoli Signed-off-by: Andrew Morton .mailmap | 2 ++ 1 file changed, 2 insertions(+) commit f87904c075515f3e1d8f4a7115869d3b914674fd Author: Khazhismel Kumykov Date: Mon Aug 1 08:50:34 2022 -0700 writeback: avoid use-after-free after removing device When a disk is removed, bdi_unregister gets called to stop further writeback and wait for associated delayed work to complete. However, wb_inode_writeback_end() may schedule bandwidth estimation dwork after this has completed, which can result in the timer attempting to access the just freed bdi_writeback. Fix this by checking if the bdi_writeback is alive, similar to when scheduling writeback work. Since this requires wb->work_lock, and wb_inode_writeback_end() may get called from interrupt, switch wb->work_lock to an irqsafe lock. Link: https://lkml.kernel.org/r/20220801155034.3772543-1-khazhy@google.com Fixes: 45a2966fd641 ("writeback: fix bandwidth estimate for spiky workload") Signed-off-by: Khazhismel Kumykov Reviewed-by: Jan Kara Cc: Michael Stapelberg Cc: Wu Fengguang Cc: Alexander Viro Cc: Signed-off-by: Andrew Morton fs/fs-writeback.c | 12 ++++++------ mm/backing-dev.c | 10 +++++----- mm/page-writeback.c | 6 +++++- 3 files changed, 16 insertions(+), 12 deletions(-) commit 9dfb3b8d655022760ca68af11821f1c63aa547c3 Author: Matthew Wilcox (Oracle) Date: Sat Jul 30 05:25:18 2022 +0100 shmem: update folio if shmem_replace_page() updates the page If we allocate a new page, we need to make sure that our folio matches that new page. If we do end up in this code path, we store the wrong page in the shmem inode's page cache, and I would rather imagine that data corruption ensues. This will be solved by changing shmem_replace_page() to shmem_replace_folio(), but this is the minimal fix. Link: https://lkml.kernel.org/r/20220730042518.1264767-1-willy@infradead.org Fixes: da08e9b79323 ("mm/shmem: convert shmem_swapin_page() to shmem_swapin_folio()") Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: William Kucharski Cc: Hugh Dickins Cc: Signed-off-by: Andrew Morton mm/shmem.c | 1 + 1 file changed, 1 insertion(+) commit ab74ef708dc51df7cf2b8a890b9c6990fac5c0c6 Author: Miaohe Lin Date: Tue Jul 12 21:05:42 2022 +0800 mm/hugetlb: avoid corrupting page->mapping in hugetlb_mcopy_atomic_pte In MCOPY_ATOMIC_CONTINUE case with a non-shared VMA, pages in the page cache are installed in the ptes. But hugepage_add_new_anon_rmap is called for them mistakenly because they're not vm_shared. This will corrupt the page->mapping used by page cache code. Link: https://lkml.kernel.org/r/20220712130542.18836-1-linmiaohe@huawei.com Fixes: f619147104c8 ("userfaultfd: add UFFDIO_CONTINUE ioctl") Signed-off-by: Miaohe Lin Reviewed-by: Mike Kravetz Cc: Axel Rasmussen Cc: Peter Xu Cc: Signed-off-by: Andrew Morton mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8379c0b31fbc5d20946f617f8e2fe4791e6f58c1 Merge: c7bb3fbc1b49 f2c3bec21569 Author: Linus Torvalds Date: Sun Aug 28 10:44:04 2022 -0700 Merge tag 'for-6.0-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Fixes: - check that subvolume is writable when changing xattrs from security namespace - fix memory leak in device lookup helper - update generation of hole file extent item when merging holes - fix space cache corruption and potential double allocations; this is a rare bug but can be serious once it happens, stable backports and analysis tool will be provided - fix error handling when deleting root references - fix crash due to assert when attempting to cancel suspended device replace, add message what to do if mount fails due to missing replace item Regressions: - don't merge pages into bio if their page offset is not contiguous - don't allow large NOWAIT direct reads, this could lead to short reads eg. in io_uring" * tag 'for-6.0-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: add info when mount fails due to stale replace target btrfs: replace: drop assert for suspended replace btrfs: fix silent failure when deleting root reference btrfs: fix space cache corruption and potential double allocations btrfs: don't allow large NOWAIT direct reads btrfs: don't merge pages into bio if their page offset is not contiguous btrfs: update generation of hole file extent item when merging holes btrfs: fix possible memory leak in btrfs_get_dev_args_from_path() btrfs: check if root is readonly while setting security xattr commit c7bb3fbc1b499b56a8819b56978c514fd63f66cc Merge: 2f23a7c91431 d291e703f420 Author: Linus Torvalds Date: Sun Aug 28 10:35:16 2022 -0700 Merge tag '6.0-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cfis fixes from Steve French: - two locking fixes (zero range, punch hole) - DFS 9 fix (padding), affecting some servers - three minor cleanup changes * tag '6.0-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: Add helper function to check smb1+ server cifs: Use help macro to get the mid header size cifs: Use help macro to get the header preamble size cifs: skip extra NULL byte in filenames smb3: missing inode locks in punch hole smb3: missing inode locks in zero range commit 2f23a7c914317ac0b2a7e2bbe48dc00213652f98 Merge: 4459d800f71d 00da0cb385d0 Author: Linus Torvalds Date: Sun Aug 28 10:10:23 2022 -0700 Merge tag 'x86-urgent-2022-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc x86 fixes from Ingo Molnar: - Fix PAT on Xen, which caused i915 driver failures - Fix compat INT 80 entry crash on Xen PV guests - Fix 'MMIO Stale Data' mitigation status reporting on older Intel CPUs - Fix RSB stuffing regressions - Fix ORC unwinding on ftrace trampolines - Add Intel Raptor Lake CPU model number - Fix (work around) a SEV-SNP bootloader bug providing bogus values in boot_params->cc_blob_address, by ignoring the value on !SEV-SNP bootups. - Fix SEV-SNP early boot failure - Fix the objtool list of noreturn functions and annotate snp_abort(), which bug confused objtool on gcc-12. - Fix the documentation for retbleed * tag 'x86-urgent-2022-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Documentation/ABI: Mention retbleed vulnerability info file for sysfs x86/sev: Mark snp_abort() noreturn x86/sev: Don't use cc_platform_has() for early SEV-SNP calls x86/boot: Don't propagate uninitialized boot_params->cc_blob_address x86/cpu: Add new Raptor Lake CPU model number x86/unwind/orc: Unwind ftrace trampolines with correct ORC entry x86/nospec: Fix i386 RSB stuffing x86/nospec: Unwreck the RSB stuffing x86/bugs: Add "unknown" reporting for MMIO Stale Data x86/entry: Fix entry_INT80_compat for Xen PV guests x86/PAT: Have pat_enabled() properly reflect state when running on Xen commit 4459d800f71d01042b36326fd8ece1f823b9da16 Merge: 611875d510a1 11745ecfe8fe Author: Linus Torvalds Date: Sun Aug 28 10:05:42 2022 -0700 Merge tag 'perf-urgent-2022-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 perf fixes from Ingo Molnar: "Misc fixes: an Arch-LBR fix, a PEBS enumeration fix, an Intel DS fix, PEBS constraints fix on Alder Lake CPUs and an Intel uncore PMU fix" * tag 'perf-urgent-2022-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/uncore: Fix broken read_counter() for SNB IMC PMU perf/x86/intel: Fix pebs event constraints for ADL perf/x86/intel/ds: Fix precise store latency handling perf/x86/core: Set pebs_capable and PMU_FL_PEBS_ALL for the Baseline perf/x86/lbr: Enable the branch type for the Arch LBR by default commit 611875d510a1ea7bcdf0e58ff7eedda08199d77e Merge: 10d4879f9ef0 48648548ef76 Author: Linus Torvalds Date: Sun Aug 28 09:58:00 2022 -0700 Merge tag 'perf-tools-fixes-for-v6.0-2022-08-27' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fixup setup of weak groups when using 'perf stat --repeat', add a 'perf test' for it. - Fix memory leaks in 'perf sched record' detected with -fsanitize=address. - Fix build when PYTHON_CONFIG is user supplied. - Capitalize topdown metrics' names in 'perf stat', so that the output, sometimes parsed, matches the Intel SDM docs. - Make sure the documentation for the save_type filter about Intel systems with Arch LBR support (12th-Gen+ client or 4th-Gen Xeon+ server) reflects recent related kernel changes. - Fix 'perf record' man page formatting of description of support to hybrid systems. - Update arm64´s KVM header from the kernel sources. * tag 'perf-tools-fixes-for-v6.0-2022-08-27' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf stat: Capitalize topdown metrics' names perf docs: Update the documentation for the save_type filter perf sched: Fix memory leaks in __cmd_record detected with -fsanitize=address perf record: Fix manpage formatting of description of support to hybrid systems perf test: Stat test for repeat with a weak group perf stat: Clear evsel->reset_group for each stat run tools kvm headers arm64: Update KVM header from the kernel sources perf python: Fix build when PYTHON_CONFIG is user supplied commit 303e6da99429510b1e4edf833afe90ac8542e747 Author: Wei Yongjun Date: Mon Aug 22 04:10:25 2022 +0000 gpio: mockup: remove gpio debugfs when remove device GPIO mockup debugfs is created in gpio_mockup_probe() but forgot to remove when remove device. This patch add a devm managed callback for removing them. Signed-off-by: Wei Yongjun Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-mockup.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit ead54ced6321099978d30d62dc49c282a6e70574 Author: Shiraz Saleem Date: Wed Aug 24 10:43:59 2022 -0500 RDMA/irdma: Fix drain SQ hang with no completion SW generated completions for outstanding WRs posted on SQ after QP is in error target the wrong CQ. This causes the ib_drain_sq to hang with no completion. Fix this to generate completions on the right CQ. [ 863.969340] INFO: task kworker/u52:2:671 blocked for more than 122 seconds. [ 863.979224] Not tainted 5.14.0-130.el9.x86_64 #1 [ 863.986588] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 863.996997] task:kworker/u52:2 state:D stack: 0 pid: 671 ppid: 2 flags:0x00004000 [ 864.007272] Workqueue: xprtiod xprt_autoclose [sunrpc] [ 864.014056] Call Trace: [ 864.017575] __schedule+0x206/0x580 [ 864.022296] schedule+0x43/0xa0 [ 864.026736] schedule_timeout+0x115/0x150 [ 864.032185] __wait_for_common+0x93/0x1d0 [ 864.037717] ? usleep_range_state+0x90/0x90 [ 864.043368] __ib_drain_sq+0xf6/0x170 [ib_core] [ 864.049371] ? __rdma_block_iter_next+0x80/0x80 [ib_core] [ 864.056240] ib_drain_sq+0x66/0x70 [ib_core] [ 864.062003] rpcrdma_xprt_disconnect+0x82/0x3b0 [rpcrdma] [ 864.069365] ? xprt_prepare_transmit+0x5d/0xc0 [sunrpc] [ 864.076386] xprt_rdma_close+0xe/0x30 [rpcrdma] [ 864.082593] xprt_autoclose+0x52/0x100 [sunrpc] [ 864.088718] process_one_work+0x1e8/0x3c0 [ 864.094170] worker_thread+0x50/0x3b0 [ 864.099109] ? rescuer_thread+0x370/0x370 [ 864.104473] kthread+0x149/0x170 [ 864.109022] ? set_kthread_struct+0x40/0x40 [ 864.114713] ret_from_fork+0x22/0x30 Fixes: 81091d7696ae ("RDMA/irdma: Add SW mechanism to generate completions on error") Link: https://lore.kernel.org/r/20220824154358.117-1-shiraz.saleem@intel.com Reported-by: Kamal Heib Signed-off-by: Shiraz Saleem Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f3d9e8161bb8cb23ab3b4678cd13f6e90a06186 Author: Takashi Iwai Date: Sun Aug 28 09:41:43 2022 +0200 ALSA: usb-audio: Add quirk for LH Labs Geek Out HD Audio 1V5 The USB DAC from LH Labs (2522:0007) seems requiring the same quirk as Sony Walkman to set up the interface like UAC1; otherwise it gets the constant errors "usb_set_interface failed (-71)". This patch adds a quirk entry for addressing the buggy behavior. Reported-by: Lennert Van Alboom Cc: Link: https://lore.kernel.org/r/T3VPXtCc4uFws9Gfh2RjX6OdwM1RqfC6VqQr--_LMDyB2x5N3p9_q6AtPna17IXhHwBtcJVdXuS80ZZSCMjh_BafIbnzJPhbrkmhmWS6DlI=@vanalboom.org Link: https://lore.kernel.org/r/20220828074143.14736-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/quirks.c | 2 ++ 1 file changed, 2 insertions(+) commit a2d57ebec1e15f0ac256eb8397e82b07adfaaacc Author: Kacper Michajłow Date: Sat Aug 27 22:33:28 2022 +0200 ALSA: hda/realtek: Add speaker AMP init for Samsung laptops with ALC298 Magic initialization sequence was extracted from Windows driver and cleaned up manually. Fixes internal speakers output. Link: https://bugzilla.kernel.org/show_bug.cgi?id=207423 Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1851518 Signed-off-by: Kacper Michajłow Cc: Link: https://lore.kernel.org/r/20220827203328.30363-1-kasper93@gmail.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 63 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 56 insertions(+), 7 deletions(-) commit 98e01215708b6d416345465c09dce2bd4868c67a Author: Tetsuo Handa Date: Sat Aug 27 20:36:27 2022 -0700 Input: iforce - wake up after clearing IFORCE_XMIT_RUNNING flag syzbot is reporting hung task at __input_unregister_device() [1], for iforce_close() waiting at wait_event_interruptible() with dev->mutex held is blocking input_disconnect_device() from __input_unregister_device(). It seems that the cause is simply that commit c2b27ef672992a20 ("Input: iforce - wait for command completion when closing the device") forgot to call wake_up() after clear_bit(). Fix this problem by introducing a helper that calls clear_bit() followed by wake_up_all(). Reported-by: syzbot Fixes: c2b27ef672992a20 ("Input: iforce - wait for command completion when closing the device") Tested-by: syzbot Suggested-by: Fabio M. De Francesco Co-developed-by: Hillf Danton Signed-off-by: Hillf Danton Signed-off-by: Tetsuo Handa Link: https://lore.kernel.org/r/887021c3-4f13-40ce-c8b9-aa6e09faa3a7@I-love.SAKURA.ne.jp Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-serio.c | 6 +++--- drivers/input/joystick/iforce/iforce-usb.c | 8 ++++---- drivers/input/joystick/iforce/iforce.h | 6 ++++++ 3 files changed, 13 insertions(+), 7 deletions(-) commit 10d4879f9ef01cc6190fafe4257d06f375bab92c Merge: b98f602df71a 3bf1b1571224 Author: Linus Torvalds Date: Sat Aug 27 15:58:38 2022 -0700 Merge tag 'thermal-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fixes from Rafael Wysocki: "Fix two issues introduced recently and one driver problem leading to a NULL pointer dereference in some cases. Specifics: - Add missing EXPORT_SYMBOL_GPL in the thermal core and add back the required 'trips' property to the thermal zone DT bindings (Daniel Lezcano) - Prevent the int340x_thermal driver from crashing when a package with a buffer of 0 length is returned by an ACPI control method evaluated by it (Lee, Chun-Yi)" * tag 'thermal-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal/int340x_thermal: handle data_vault when the value is ZERO_SIZE_PTR dt-bindings: thermal: Fix missing required property thermal/core: Add missing EXPORT_SYMBOL_GPL commit b98f602df71aa9612af3239a8d2a23b126e4357a Merge: 2b1ddb5950a6 6ca7076fbfae Author: Linus Torvalds Date: Sat Aug 27 15:53:49 2022 -0700 Merge tag 'pm-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Make __resolve_freq() check the presence of the frequency table instead of checking whether or not the ->target_index() callback is implemented by the driver, because that need not be the case when __resolve_freq() is used (Lukasz Luba)" * tag 'pm-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: check only freq_table in __resolve_freq() commit 2b1ddb5950a65a6d5aa42ea381284d00fab7fb69 Merge: dee1873796af 2413a85200ee Author: Linus Torvalds Date: Sat Aug 27 15:47:02 2022 -0700 Merge tag 'acpi-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix issues introduced by recent changes related to the handling of ACPI device properties and a coding mistake in the exit path of the ACPI processor driver. Specifics: - Prevent acpi_thermal_cpufreq_exit() from attempting to remove the same frequency QoS request multiple times (Riwen Lu) - Fix type detection for integer ACPI device properties (Stefan Binding) - Avoid emitting false-positive warnings when processing ACPI device properties and drop the useless default case from the acpi_copy_property_array_uint() macro (Sakari Ailus)" * tag 'acpi-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: property: Remove default association from integer maximum values ACPI: property: Ignore already existing data node tags ACPI: property: Fix type detection of unified integer reading functions ACPI: processor: Remove freq Qos request for all CPUs commit dee1873796aff90bb932b0e0073a0073863b4b94 Merge: 05519f2480a3 41ac42f13708 Author: Linus Torvalds Date: Sat Aug 27 15:40:51 2022 -0700 Merge tag 's390-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Fix double free of guarded storage and runtime instrumentation control blocks on fork() failure - Fix triggering write fault when VMA does not allow VM_WRITE * tag 's390-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/mm: do not trigger write fault when vma does not allow VM_WRITE s390: fix double free of GS and RI CBs on fork() failure commit 05519f2480a3e71053b892d4ea864e641949a77f Merge: 17b28d4267d9 c5deb27895e0 Author: Linus Torvalds Date: Sat Aug 27 15:38:00 2022 -0700 Merge tag 'for-linus-6.0-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - two minor cleanups - a fix of the xen/privcmd driver avoiding a possible NULL dereference in an error case * tag 'for-linus-6.0-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/privcmd: fix error exit of privcmd_ioctl_dm_op() xen: move from strlcpy with unused retval to strscpy xen: x86: remove setting the obsolete config XEN_MAX_DOMAIN_MEMORY commit 17b28d4267d9d9dd11d42eea1d41cd3f5f5a4273 Merge: 89b749d8552d d4fefa4801a1 Author: Linus Torvalds Date: Sat Aug 27 15:31:12 2022 -0700 Merge tag 'audit-pr-20220826' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit fix from Paul Moore: "Another small audit patch, this time to fix a bug where the return codes were not properly set before the audit filters were run, potentially resulting in missed audit records" * tag 'audit-pr-20220826' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: move audit_return_fixup before the filters commit 89b749d8552d78c4dd86dea86e2e6ba8aafab9fe Merge: d6ffe6067a54 a5a923038d70 Author: Linus Torvalds Date: Sat Aug 27 09:57:58 2022 -0700 Merge tag 'fbdev-for-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev fixes and updates from Helge Deller: "Mostly just small patches, with the exception of the bigger indenting cleanups in the sisfb and radeonfb drivers. Two patches should be mentioned though: A fix-up for fbdev if the screen resize fails (by Shigeru Yoshida), and a potential divide by zero fix in fb_pm2fb (by Letu Ren). Summary: Major fixes: - Revert the changes for fbcon console when vc_resize() fails [Shigeru Yoshida] - Avoid a potential divide by zero error in fb_pm2fb [Letu Ren] Minor fixes: - Add missing pci_disable_device() in chipsfb_pci_init() [Yang Yingliang] - Fix tests for platform_get_irq() failure in omapfb [Yu Zhe] - Destroy mutex on freeing struct fb_info in fbsysfs [Shigeru Yoshida] Cleanups: - Move fbdev drivers from strlcpy to strscpy [Wolfram Sang] - Indenting fixes, comment fixes, ... [Jiapeng Chong & Jilin Yuan]" * tag 'fbdev-for-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: fbcon: Properly revert changes when vc_resize() failed fbdev: Move fbdev drivers from strlcpy to strscpy fbdev: omap: Remove unnecessary print function dev_err() fbdev: chipsfb: Add missing pci_disable_device() in chipsfb_pci_init() fbdev: fbcon: Destroy mutex on freeing struct fb_info fbdev: radeon: Clean up some inconsistent indenting fbdev: sisfb: Clean up some inconsistent indenting fbdev: fb_pm2fb: Avoid potential divide by zero error fbdev: ssd1307fb: Fix repeated words in comments fbdev: omapfb: Fix tests for platform_get_irq() failure commit d6ffe6067a54972564552ea45d320fb98db1ac5e Author: Mikulas Patocka Date: Fri Aug 26 16:43:51 2022 -0400 provide arch_test_bit_acquire for architectures that define test_bit Some architectures define their own arch_test_bit and they also need arch_test_bit_acquire, otherwise they won't compile. We also clean up the code by using the generic test_bit if that is equivalent to the arch-specific version. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Fixes: 8238b4579866 ("wait_on_bit: add an acquire memory barrier") Signed-off-by: Linus Torvalds arch/alpha/include/asm/bitops.h | 7 ++----- arch/hexagon/include/asm/bitops.h | 15 +++++++++++++++ arch/ia64/include/asm/bitops.h | 7 ++----- arch/m68k/include/asm/bitops.h | 7 ++----- arch/s390/include/asm/bitops.h | 10 ++-------- arch/sh/include/asm/bitops-op32.h | 12 ++---------- 6 files changed, 25 insertions(+), 33 deletions(-) commit 1bd3a383075c64d638e65d263c9267b08ee7733c Author: Jean-Francois Le Fillatre Date: Wed Aug 24 21:14:36 2022 +0200 r8152: add PID for the Lenovo OneLink+ Dock The Lenovo OneLink+ Dock contains an RTL8153 controller that behaves as a broken CDC device by default. Add the custom Lenovo PID to the r8152 driver to support it properly. Also, systems compatible with this dock provide a BIOS option to enable MAC address passthrough (as per Lenovo document "ThinkPad Docking Solutions 2017"). Add the custom PID to the MAC passthrough list too. Tested on a ThinkPad 13 1st gen with the expected results: passthrough disabled: Invalid header when reading pass-thru MAC addr passthrough enabled: Using pass-thru MAC addr XX:XX:XX:XX:XX:XX Signed-off-by: Jean-Francois Le Fillatre Signed-off-by: David S. Miller drivers/net/usb/cdc_ether.c | 7 +++++++ drivers/net/usb/r8152.c | 3 +++ 2 files changed, 10 insertions(+) commit 48648548ef764dcb1f6ffc9c9f9057f7c610caa4 Author: Zhengjun Xing Date: Thu Aug 25 09:54:58 2022 +0800 perf stat: Capitalize topdown metrics' names Capitalize topdown metrics' names to follow the intel SDM. Before: # ./perf stat -a sleep 1 Performance counter stats for 'system wide': 228,094.05 msec cpu-clock # 225.026 CPUs utilized 842 context-switches # 3.691 /sec 224 cpu-migrations # 0.982 /sec 70 page-faults # 0.307 /sec 23,164,105 cycles # 0.000 GHz 29,403,446 instructions # 1.27 insn per cycle 5,268,185 branches # 23.097 K/sec 33,239 branch-misses # 0.63% of all branches 136,248,990 slots # 597.337 K/sec 32,976,450 topdown-retiring # 24.2% retiring 4,651,918 topdown-bad-spec # 3.4% bad speculation 26,148,695 topdown-fe-bound # 19.2% frontend bound 72,515,776 topdown-be-bound # 53.2% backend bound 6,008,540 topdown-heavy-ops # 4.4% heavy operations # 19.8% light operations 3,934,049 topdown-br-mispredict # 2.9% branch mispredict # 0.5% machine clears 16,655,439 topdown-fetch-lat # 12.2% fetch latency # 7.0% fetch bandwidth 41,635,972 topdown-mem-bound # 30.5% memory bound # 22.7% Core bound 1.013634593 seconds time elapsed After: # ./perf stat -a sleep 1 Performance counter stats for 'system wide': 228,081.94 msec cpu-clock # 225.003 CPUs utilized 824 context-switches # 3.613 /sec 224 cpu-migrations # 0.982 /sec 67 page-faults # 0.294 /sec 22,647,423 cycles # 0.000 GHz 28,870,551 instructions # 1.27 insn per cycle 5,167,099 branches # 22.655 K/sec 32,383 branch-misses # 0.63% of all branches 133,411,074 slots # 584.926 K/sec 32,352,607 topdown-retiring # 24.3% Retiring 4,456,977 topdown-bad-spec # 3.3% Bad Speculation 25,626,487 topdown-fe-bound # 19.2% Frontend Bound 70,955,316 topdown-be-bound # 53.2% Backend Bound 5,834,844 topdown-heavy-ops # 4.4% Heavy Operations # 19.9% Light Operations 3,738,781 topdown-br-mispredict # 2.8% Branch Mispredict # 0.5% Machine Clears 16,286,803 topdown-fetch-lat # 12.2% Fetch Latency # 7.0% Fetch Bandwidth 40,802,069 topdown-mem-bound # 30.6% Memory Bound # 22.6% Core Bound 1.013683125 seconds time elapsed Reviewed-by: Kan Liang Signed-off-by: Xing Zhengjun Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220825015458.3252239-1-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-shadow.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 3126204ce3d9ab083cbdc2d61ab93746232eb89b Author: Kan Liang Date: Tue Aug 16 05:56:12 2022 -0700 perf docs: Update the documentation for the save_type filter Update the documentation to reflect the kernel changes. Signed-off-by: Kan Liang Cc: Andi Kleen Cc: Ian Rogers Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20220816125612.2042397-2-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 3 +++ 1 file changed, 3 insertions(+) commit d72e5cf3cf69d4c68d3b54aea232451b0a8b69d3 Author: Ian Rogers Date: Wed Aug 24 07:57:33 2022 -0700 perf sched: Fix memory leaks in __cmd_record detected with -fsanitize=address An array of strings is passed to cmd_record but not freed. As cmd_record modifies the array, add another array as a copy that can be mutated allowing the original array contents to all be freed. Detected with -fsanitize=address. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20220824145733.409005-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-sched.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit e89eaa611c7568d1288a2ccca88355a9434f2d47 Author: Andi Kleen Date: Thu Aug 18 03:01:27 2022 -0700 perf record: Fix manpage formatting of description of support to hybrid systems The Intel hybrid description is written in a different style than the rest of the perf record man page. There were some new command line options added after it which resulted in very strange section ordering. Move the hybrid include last. Also the sub sections in the hybrid document don't fit the record manpage well (especially since it talks about all kinds of unrelated commands). I left this for now, but would be better to separate this properly in the different man pages. It would be better to use sub sections for the other sections, but these don't seem to be supported in AsciiDoc? Some of the examples are still misrendered in the manpage with an indented troff command, but I don't know how to fix that. In any case it's now better than before. Signed-off-by: Andi Kleen Cc: zhengjun.xing@intel.com Link: https://lore.kernel.org/r/20220818100127.249401-1-ak@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/intel-hybrid.txt | 10 ---------- tools/perf/Documentation/perf-record.txt | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) commit 0c361c6eaba7fe1a29391540dd8797e850e49f21 Author: Ian Rogers Date: Mon Aug 22 14:33:52 2022 -0700 perf test: Stat test for repeat with a weak group Breaking a weak group requires multiple passes of an evlist, with multiple runs this can introduce bugs ultimately leading to segfaults. Add a test to cover this. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20220822213352.75721-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/stat.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit bf515f024e4c0ca46a1b08c4f31860c01781d8a5 Author: Ian Rogers Date: Mon Aug 22 14:33:51 2022 -0700 perf stat: Clear evsel->reset_group for each stat run If a weak group is broken then the reset_group flag remains set for the next run. Having reset_group set means the counter isn't created and ultimately a segfault. A simple reproduction of this is: # perf stat -r2 -e '{cycles,cycles,cycles,cycles,cycles,cycles,cycles,cycles,cycles,cycles}:W which will be added as a test in the next patch. Fixes: 4804e0111662d7d8 ("perf stat: Use affinity for opening events") Reviewed-by: Andi Kleen Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Tested-by: Xing Zhengjun Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20220822213352.75721-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 1 + 1 file changed, 1 insertion(+) commit dbcfe5ec3f9a5799d8b49ad2c81549bbfa8390e7 Author: Arnaldo Carvalho de Melo Date: Mon Dec 21 12:53:44 2020 -0300 tools kvm headers arm64: Update KVM header from the kernel sources To pick the changes from: ae3b1da95413614f ("KVM: arm64: Fix compile error due to sign extension") That doesn't result in any changes in tooling (when built on x86), 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: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Marc Zyngier Cc: Namhyung Kim Cc: Yang Yingliang Link: https://lore.kernel.org/all/YwOMCCc4E79FuvDe@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/arm64/include/uapi/asm/kvm.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit bc9e7fe313d5e56d4d5f34bcc04d1165f94f86fb Author: James Clark Date: Thu Jul 28 10:39:46 2022 +0100 perf python: Fix build when PYTHON_CONFIG is user supplied The previous change to Python autodetection had a small mistake where the auto value was used to determine the Python binary, rather than the user supplied value. The Python binary is only used for one part of the build process, rather than the final linking, so it was producing correct builds in most scenarios, especially when the auto detected value matched what the user wanted, or the system only had a valid set of Pythons. Change it so that the Python binary path is derived from either the PYTHON_CONFIG value or PYTHON value, depending on what is specified by the user. This was the original intention. This error was spotted in a build failure an odd cross compilation environment after commit 4c41cb46a732fe82 ("perf python: Prefer python3") was merged. Fixes: 630af16eee495f58 ("perf tools: Use Python devtools for version autodetection rather than runtime") Signed-off-by: James Clark Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220728093946.1337642-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3bf1b1571224e713f1a186de21b2204c06f1cb5e Merge: 7931e28098a4 d92e600f860b Author: Rafael J. Wysocki Date: Sat Aug 27 15:07:58 2022 +0200 Merge branch 'thermal-core' Merge thermal control core fixes for 6.0-rc3: - Fix missing required property for thermal zone description (Daniel Lezcano). - Add missing export symbol for thermal_zone_device_register_with_trips() (Daniel Lezcano). * thermal-core: dt-bindings: thermal: Fix missing required property thermal/core: Add missing EXPORT_SYMBOL_GPL commit 2413a85200ee9cbed40d12c6e3b856752b089790 Merge: bd9594ae4c55 36527b9d8823 Author: Rafael J. Wysocki Date: Sat Aug 27 14:43:18 2022 +0200 Merge branch 'acpi-processor' into acpi * acpi-processor: ACPI: processor: Remove freq Qos request for all CPUs commit ebe5555c2f34505cdb1ae5c3de8b24e33740b3e0 Author: Tianyu Yuan Date: Thu Aug 25 10:08:45 2022 +0200 nfp: flower: fix ingress police using matchall filter Referenced commit introduced nfp_policer_validate in the progress installing rate limiter. This validate check the action id and will reject police with CONTINUE, which is required to support ingress police offload. Fix this issue by allowing FLOW_ACTION_CONTINUE as notexceed action id in nfp_policer_validate Fixes: d97b4b105ce7 ("flow_offload: reject offload for all drivers with invalid police parameters") Signed-off-by: Tianyu Yuan Reviewed-by: Baowen Zheng Reviewed-by: Louis Peens Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20220825080845.507534-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/netronome/nfp/flower/qos_conf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a87406f4adee9c53b311d8a1ba2849c69e29a6d0 Author: Andrey Zhadchenko Date: Thu Aug 25 05:03:26 2022 +0300 openvswitch: fix memory leak at failed datapath creation ovs_dp_cmd_new()->ovs_dp_change()->ovs_dp_set_upcall_portids() allocates array via kmalloc. If for some reason new_vport() fails during ovs_dp_cmd_new() dp->upcall_portids must be freed. Add missing kfree. Kmemleak example: unreferenced object 0xffff88800c382500 (size 64): comm "dump_state", pid 323, jiffies 4294955418 (age 104.347s) hex dump (first 32 bytes): 5e c2 79 e4 1f 7a 38 c7 09 21 38 0c 80 88 ff ff ^.y..z8..!8..... 03 00 00 00 0a 00 00 00 14 00 00 00 28 00 00 00 ............(... backtrace: [<0000000071bebc9f>] ovs_dp_set_upcall_portids+0x38/0xa0 [<000000000187d8bd>] ovs_dp_change+0x63/0xe0 [<000000002397e446>] ovs_dp_cmd_new+0x1f0/0x380 [<00000000aa06f36e>] genl_family_rcv_msg_doit+0xea/0x150 [<000000008f583bc4>] genl_rcv_msg+0xdc/0x1e0 [<00000000fa10e377>] netlink_rcv_skb+0x50/0x100 [<000000004959cece>] genl_rcv+0x24/0x40 [<000000004699ac7f>] netlink_unicast+0x23e/0x360 [<00000000c153573e>] netlink_sendmsg+0x24e/0x4b0 [<000000006f4aa380>] sock_sendmsg+0x62/0x70 [<00000000d0068654>] ____sys_sendmsg+0x230/0x270 [<0000000012dacf7d>] ___sys_sendmsg+0x88/0xd0 [<0000000011776020>] __sys_sendmsg+0x59/0xa0 [<000000002e8f2dc1>] do_syscall_64+0x3b/0x90 [<000000003243e7cb>] entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: b83d23a2a38b ("openvswitch: Introduce per-cpu upcall dispatch") Acked-by: Aaron Conole Signed-off-by: Andrey Zhadchenko Link: https://lore.kernel.org/r/20220825020326.664073-1-andrey.zhadchenko@virtuozzo.com Signed-off-by: Jakub Kicinski net/openvswitch/datapath.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3ce9f2bef75528936c78a7053301f5725f622f3a Author: Florian Fainelli Date: Wed Aug 24 19:39:51 2022 -0700 net: smsc911x: Stop and start PHY during suspend and resume Commit 744d23c71af3 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state") unveiled that the smsc911x driver was not properly stopping and restarting the PHY during suspend/resume. Correct that by indicating that the MAC is in charge of PHY PM operations and ensure that all MDIO bus activity is quiescent during suspend. Tested-by: Geert Uytterhoeven Tested-by: Marek Szyprowski Fixes: fba863b81604 ("net: phy: make PHY PM ops a no-op if MAC driver manages PHY PM") Fixes: 2aa70f864955 ("net: smsc911x: Quieten netif during suspend") Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20220825023951.3220-1-f.fainelli@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/smsc/smsc911x.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2ca1c94ce0b65a2ce7512b718f3d8a0fe6224bca Author: Kai-Heng Feng Date: Fri Aug 26 08:25:30 2022 +0800 tg3: Disable tg3 device on system reboot to avoid triggering AER Commit d60cd06331a3 ("PM: ACPI: reboot: Use S5 for reboot") caused a reboot hang on one Dell servers so the commit was reverted. Someone managed to collect the AER log and it's caused by MSI: [ 148.762067] ACPI: Preparing to enter system sleep state S5 [ 148.794638] {1}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 5 [ 148.803731] {1}[Hardware Error]: event severity: recoverable [ 148.810191] {1}[Hardware Error]: Error 0, type: fatal [ 148.816088] {1}[Hardware Error]: section_type: PCIe error [ 148.822391] {1}[Hardware Error]: port_type: 0, PCIe end point [ 148.829026] {1}[Hardware Error]: version: 3.0 [ 148.834266] {1}[Hardware Error]: command: 0x0006, status: 0x0010 [ 148.841140] {1}[Hardware Error]: device_id: 0000:04:00.0 [ 148.847309] {1}[Hardware Error]: slot: 0 [ 148.852077] {1}[Hardware Error]: secondary_bus: 0x00 [ 148.857876] {1}[Hardware Error]: vendor_id: 0x14e4, device_id: 0x165f [ 148.865145] {1}[Hardware Error]: class_code: 020000 [ 148.870845] {1}[Hardware Error]: aer_uncor_status: 0x00100000, aer_uncor_mask: 0x00010000 [ 148.879842] {1}[Hardware Error]: aer_uncor_severity: 0x000ef030 [ 148.886575] {1}[Hardware Error]: TLP Header: 40000001 0000030f 90028090 00000000 [ 148.894823] tg3 0000:04:00.0: AER: aer_status: 0x00100000, aer_mask: 0x00010000 [ 148.902795] tg3 0000:04:00.0: AER: [20] UnsupReq (First) [ 148.910234] tg3 0000:04:00.0: AER: aer_layer=Transaction Layer, aer_agent=Requester ID [ 148.918806] tg3 0000:04:00.0: AER: aer_uncor_severity: 0x000ef030 [ 148.925558] tg3 0000:04:00.0: AER: TLP Header: 40000001 0000030f 90028090 00000000 The MSI is probably raised by incoming packets, so power down the device and disable bus mastering to stop the traffic, as user confirmed this approach works. In addition to that, be extra safe and cancel reset task if it's running. Cc: Josef Bacik Link: https://lore.kernel.org/all/b8db79e6857c41dab4ef08bdf826ea7c47e3bafc.1615947283.git.josef@toxicpanda.com/ BugLink: https://bugs.launchpad.net/bugs/1917471 Signed-off-by: Kai-Heng Feng Reviewed-by: Michael Chan Link: https://lore.kernel.org/r/20220826002530.1153296-1-kai.heng.feng@canonical.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/tg3.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 7498a457ecf7ff2c4d379360aa8f24566bb1543e Author: Casper Andersson Date: Thu Aug 25 10:49:55 2022 +0200 net: sparx5: fix handling uneven length packets in manual extraction Packets that are not of length divisible by 4 (e.g. 77, 78, 79) would have the checksum included up to next multiple of 4 (a 77 bytes packet would have 3 bytes of ethernet checksum included). The check for the value expects it in host (Little) endian. Fixes: f3cad2611a77 ("net: sparx5: add hostmode with phylink support") Signed-off-by: Casper Andersson Reviewed-by: Steen Hegelund Link: https://lore.kernel.org/r/20220825084955.684637-1-casper.casan@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/sparx5/sparx5_packet.c | 2 ++ 1 file changed, 2 insertions(+) commit 037c97b2886e1b0bcdd14f96bb595f843faa07da Merge: 2e085ec0e2d7 2da8eb834b77 Author: Jakub Kicinski Date: Fri Aug 26 17:13:25 2022 -0700 Merge tag 'for-net-2022-08-25' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - Fix handling of duplicate connection handle - Fix handling of HCI vendor opcode - Fix suspend performance regression - Fix build errors - Fix not handling shutdown condition on ISO sockets - Fix double free issue * tag 'for-net-2022-08-25' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: hci_sync: hold hdev->lock when cleanup hci_conn Bluetooth: move from strlcpy with unused retval to strscpy Bluetooth: hci_event: Fix checking conn for le_conn_complete_evt Bluetooth: ISO: Fix not handling shutdown condition Bluetooth: hci_sync: fix double mgmt_pending_free() in remove_adv_monitor() Bluetooth: MGMT: Fix Get Device Flags Bluetooth: L2CAP: Fix build errors in some archs Bluetooth: hci_sync: Fix suspend performance regression Bluetooth: hci_event: Fix vendor (unknown) opcode status handling ==================== Link: https://lore.kernel.org/r/20220825234559.1837409-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 5479d6d4bf122d4b137659559a7bd17784b97b7e Author: Menglong Dong Date: Sat Aug 27 00:01:50 2022 +0800 docs/conf.py: add function attribute '__fix_address' to conf.py Stephen Rothwell reported htmldocs warning when merging net-next: Documentation/networking/kapi:26: net/core/skbuff.c:780: WARNING: Error in declarator or parameters Invalid C declaration: Expecting "(" in parameters. [error at 19] void __fix_address kfree_skb_reason (struct sk_buff *skb, enum skb_drop_reason reason) -------------------^ Add __fix_address keyword to c_id_attributes array in conf.py to fix the warning. Link: https://lore.kernel.org/linux-next/20220825154105.534d78ab@canb.auug.org.au/ Reported-by: Stephen Rothwell Signed-off-by: Menglong Dong Tested-by: Bagas Sanjaya Signed-off-by: Jonathan Corbet Documentation/conf.py | 1 + 1 file changed, 1 insertion(+) commit 11745ecfe8fea4b4a4c322967a7605d2ecbd5080 Author: Stephane Eranian Date: Wed Aug 3 09:00:31 2022 -0700 perf/x86/intel/uncore: Fix broken read_counter() for SNB IMC PMU Existing code was generating bogus counts for the SNB IMC bandwidth counters: $ perf stat -a -I 1000 -e uncore_imc/data_reads/,uncore_imc/data_writes/ 1.000327813 1,024.03 MiB uncore_imc/data_reads/ 1.000327813 20.73 MiB uncore_imc/data_writes/ 2.000580153 261,120.00 MiB uncore_imc/data_reads/ 2.000580153 23.28 MiB uncore_imc/data_writes/ The problem was introduced by commit: 07ce734dd8ad ("perf/x86/intel/uncore: Clean up client IMC") Where the read_counter callback was replace to point to the generic uncore_mmio_read_counter() function. The SNB IMC counters are freerunnig 32-bit counters laid out contiguously in MMIO. But uncore_mmio_read_counter() is using a readq() call to read from MMIO therefore reading 64-bit from MMIO. Although this is okay for the uncore_perf_event_update() function because it is shifting the value based on the actual counter width to compute a delta, it is not okay for the uncore_pmu_event_start() which is simply reading the counter and therefore priming the event->prev_count with a bogus value which is responsible for causing bogus deltas in the perf stat command above. The fix is to reintroduce the custom callback for read_counter for the SNB IMC PMU and use readl() instead of readq(). With the change the output of perf stat is back to normal: $ perf stat -a -I 1000 -e uncore_imc/data_reads/,uncore_imc/data_writes/ 1.000120987 296.94 MiB uncore_imc/data_reads/ 1.000120987 138.42 MiB uncore_imc/data_writes/ 2.000403144 175.91 MiB uncore_imc/data_reads/ 2.000403144 68.50 MiB uncore_imc/data_writes/ Fixes: 07ce734dd8ad ("perf/x86/intel/uncore: Clean up client IMC") Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20220803160031.1379788-1-eranian@google.com arch/x86/events/intel/uncore_snb.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit dd9373402280cf4715fdc8fd5070f7d039e43511 Author: Casey Schaufler Date: Tue Aug 23 16:46:18 2022 -0700 Smack: Provide read control for io_uring_cmd Limit io_uring "cmd" options to files for which the caller has Smack read access. There may be cases where the cmd option may be closer to a write access than a read, but there is no way to make that determination. Cc: stable@vger.kernel.org Fixes: ee692a21e9bf ("fs,io_uring: add infrastructure for uring-cmd") Signed-off-by: Casey Schaufler Signed-off-by: Paul Moore security/smack/smack_lsm.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit e022620b5d056e822e42eb9bc0f24fcb97389d86 Merge: 012bd7e859df 714f3cbd70a4 Author: Linus Torvalds Date: Fri Aug 26 11:32:53 2022 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "A bumper crop of arm64 fixes for -rc3. The largest change is fixing our parsing of the 'rodata=full' command line option, which kstrtobool() started treating as 'rodata=false'. The fix actually makes the parsing of that option much less fragile and updates the documentation at the same time. We still have a boot issue pending when KASLR is disabled at compile time, but there's a fresh fix on the list which I'll send next week if it holds up to testing. Summary: - Fix workaround for Cortex-A76 erratum #1286807 - Add workaround for AMU erratum #2457168 on Cortex-A510 - Drop reference to removed CONFIG_ARCH_RANDOM #define - Fix parsing of the "rodata=full" cmdline option - Fix a bunch of issues in the SME register state switching and sigframe code - Fix incorrect extraction of the CTR_EL0.CWG register field - Fix ACPI cache topology probing when the PPTT is not present - Trivial comment and whitespace fixes" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64/sme: Don't flush SVE register state when handling SME traps arm64/sme: Don't flush SVE register state when allocating SME storage arm64/signal: Flush FPSIMD register state when disabling streaming mode arm64/signal: Raise limit on stack frames arm64/cache: Fix cache_type_cwg() for register generation arm64/sysreg: Guard SYS_FIELD_ macros for asm arm64/sysreg: Directly include bitfield.h arm64: cacheinfo: Fix incorrect assignment of signed error value to unsigned fw_level arm64: errata: add detection for AMEVCNTR01 incrementing incorrectly arm64: fix rodata=full arm64: Fix comment typo docs/arm64: elf_hwcaps: unify newlines in HWCAP lists arm64: adjust KASLR relocation after ARCH_RANDOM removal arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76 commit 012bd7e859df9d6aa0a8ab4484c00aeded108071 Merge: c23f864dc7ef 1709c70c31e0 Author: Linus Torvalds Date: Fri Aug 26 11:26:27 2022 -0700 Merge tag 'riscv-for-linus-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A handful of fixes for the Microchip device trees - A pair of fixes to eliminate build warnings * tag 'riscv-for-linus-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: dts: microchip: mpfs: remove pci axi address translation property riscv: dts: microchip: mpfs: remove bogus card-detect-delay riscv: dts: microchip: mpfs: remove ti,fifo-depth property riscv: dts: microchip: mpfs: fix incorrect pcie child node name riscv: traps: add missing prototype riscv: signal: fix missing prototype warning riscv: dts: microchip: correct L2 cache interrupts commit c23f864dc7ef37655021c43beae98321436cbd9a Merge: 78effb4a9b8c b83699ea1e62 Author: Linus Torvalds Date: Fri Aug 26 11:21:18 2022 -0700 Merge tag 'loongarch-fixes-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch fixes from Huacai Chen: "Fix a bunch of build errors/warnings, a poweroff error and an unbalanced locking in do_page_fault()" * tag 'loongarch-fixes-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: mm: Avoid unnecessary page fault retires on shared memory types LoongArch: Add subword xchg/cmpxchg emulation LoongArch: Cleanup headers to avoid circular dependency LoongArch: Cleanup reset routines with new API LoongArch: Fix build warnings in VDSO LoongArch: Select PCI_QUIRKS to avoid build error commit 78effb4a9b8c3589519b84759ac1757647072448 Merge: 3e5c673f0d75 100d0ae82b5c Author: Linus Torvalds Date: Fri Aug 26 11:15:37 2022 -0700 Merge tag 'drm-fixes-2022-08-26-1' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Weekly fixes, lots of amdgpu fixes mostly for IP blocks introduced in 6.0-rc1, otherwise vc4, nouveau fixes. gem: - Fix handle release leak nouveau: - Fix fencing when moving BO vc4: - HDMI fixes amdgpu: - GFX 11.0 fixes - PSP XGMI handling fixes - GFX9 fix for compute-only IPs - Drop duplicated function call - Fix warning due to missing header - NBIO 7.7 fixes - DCN 3.1.4 fixes - SDMA 6.0 fixes - SMU 13.0 fixes - Arcturus GPUVM page table fix - MMHUB 1.0 fix amdkfd: - GC 10.3.7 fix radeon: - Delayed work flush fix" * tag 'drm-fixes-2022-08-26-1' of git://anongit.freedesktop.org/drm/drm: (21 commits) drm/amdgpu: mmVM_L2_CNTL3 register not initialized correctly drm/amdgpu: add MGCG perfmon setting for gfx11 drm/amdkfd: Fix isa version for the GC 10.3.7 drm/amdgpu: Fix page table setup on Arcturus drm/amd/pm: update SMU 13.0.0 driver_if header drm/amdgpu: add sdma instance check for gfx11 CGCG drm/amd/display: enable PCON support for dcn314 drm/amdgpu: enable NBIO IP v7.7.0 Clock Gating drm/amdgpu: add NBIO IP v7.7.0 Clock Gating support drm/amdgpu: add TX_POWER_CTRL_1 macro definitions for NBIO IP v7.7.0 nouveau: explicitly wait on the fence in nouveau_bo_move_m2mf drm/radeon: add a force flush to delay work when radeon drm/amd/display: Include missing header drm/amdgpu: Remove the additional kfd pre reset call for sriov drm/amdgpu: Check num_gfx_rings for gfx v9_0 rb setup. drm/amdgpu: fix hive reference leak when adding xgmi device drm/amdgpu: Move psp_xgmi_terminate call from amdgpu_xgmi_remove_device to psp_hw_fini drm/amdgpu: enable GFXOFF allow control for GC IP v11.0.1 drm/gem: Fix GEM handle release errors drm/vc4: hdmi: Rework power up ... commit 3e5c673f0d75bc22b3c26eade87e4db4f374cd34 Merge: 0b0861eb91cb 645b5ed871f4 Author: Linus Torvalds Date: Fri Aug 26 11:05:54 2022 -0700 Merge tag 'block-6.0-2022-08-26' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - MD pull request via Song: - Fix for clustered raid (Guoqing Jiang) - req_op fix (Bart Van Assche) - Fix race condition in raid recreate (David Sloan) - loop configuration overflow fix (Siddh) - Fix missing commit_rqs call for certain conditions (Yu) * tag 'block-6.0-2022-08-26' of git://git.kernel.dk/linux-block: md: call __md_stop_writes in md_stop Revert "md-raid: destroy the bitmap after destroying the thread" md: Flush workqueue md_rdev_misc_wq in md_alloc() md/raid10: Fix the data type of an r10_sync_page_io() argument loop: Check for overflow while configuring loop blk-mq: fix io hung due to missing commit_rqs commit 0b0861eb91cbfdd04d6df5a031152914c1114c18 Merge: 5373081b99ed 581711c46612 Author: Linus Torvalds Date: Fri Aug 26 11:01:52 2022 -0700 Merge tag 'io_uring-6.0-2022-08-26' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: - Add missing header file to the MAINTAINERS entry for io_uring (Ammar) - liburing and the kernel ship the same io_uring.h header, but one change we've had for a long time only in liburing is to ensure it's C++ safe. Add extern C around it, so we can more easily sync them in the future (Ammar) - Fix an off-by-one in the sync cancel added in this merge window (me) - Error handling fix for passthrough (Kanchan) - Fix for address saving for async execution for the zc tx support (Pavel) - Fix ordering for TCP zc notifications, so we always have them ordered correctly between "data was sent" and "data was acked". This isn't strictly needed with the notification slots, but we've been pondering disabling the slot support for 6.0 - and if we do, then we do require the ordering to be sane. Regardless of that, it's the sane thing to do in terms of API (Pavel) - Minor cleanup for indentation and lockdep annotation (Pavel) * tag 'io_uring-6.0-2022-08-26' of git://git.kernel.dk/linux-block: io_uring/net: save address for sendzc async execution io_uring: conditional ->async_data allocation io_uring/notif: order notif vs send CQEs io_uring/net: fix indentation io_uring/net: fix zc send link failing io_uring/net: fix must_hold annotation io_uring: fix submission-failure handling for uring-cmd io_uring: fix off-by-one in sync cancelation file check io_uring: uapi: Add `extern "C"` in io_uring.h for liburing MAINTAINERS: Add `include/linux/io_uring_types.h` commit a5a923038d70d2d4a86cb4e3f32625a5ee6e7e24 Author: Shigeru Yoshida Date: Fri Aug 19 03:13:36 2022 +0900 fbdev: fbcon: Properly revert changes when vc_resize() failed fbcon_do_set_font() calls vc_resize() when font size is changed. However, if if vc_resize() failed, current implementation doesn't revert changes for font size, and this causes inconsistent state. syzbot reported unable to handle page fault due to this issue [1]. syzbot's repro uses fault injection which cause failure for memory allocation, so vc_resize() failed. This patch fixes this issue by properly revert changes for font related date when vc_resize() failed. Link: https://syzkaller.appspot.com/bug?id=3443d3a1fa6d964dd7310a0cb1696d165a3e07c4 [1] Reported-by: syzbot+a168dbeaaa7778273c1b@syzkaller.appspotmail.com Signed-off-by: Shigeru Yoshida Signed-off-by: Helge Deller CC: stable@vger.kernel.org # 5.15+ drivers/video/fbdev/core/fbcon.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit 5373081b99ed3c8e6e3866c366bf43fd8b03013a Merge: 8238b4579866 785538bfdd68 Author: Linus Torvalds Date: Fri Aug 26 10:29:56 2022 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Ten fixes. Of the three core changes, the two large ones are a complete reversion of the async rework and an ALUA timing rework (the latter shouldn't affect non-ALUA paths). The remaining patches are all small and all but one in drivers" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sd: Revert "Rework asynchronous resume support" scsi: core: Fix passthrough retry counter handling scsi: ufs: core: Reduce the power mode change timeout scsi: storvsc: Remove WQ_MEM_RECLAIM from storvsc_error_wq scsi: ufs: host: ufs-exynos: Make fsd_ufs_drvs static scsi: megaraid_sas: Remove unnecessary kfree() scsi: megaraid_sas: Fix double kfree() scsi: ufs: core: Enable link lost interrupt scsi: core: Allow the ALUA transitioning state enough time scsi: qla2xxx: Disable ATIO interrupt coalesce for quad port ISP27XX commit dfb58b1796d19c8405a38eb457f97669440c59d4 Author: Pavel Begunkov Date: Fri Aug 26 17:15:47 2022 +0100 io_uring/net: fix overexcessive retries Length parameter of io_sg_from_iter() can be smaller than the iterator's size, as it's with TCP, so when we set from->count at the end of the function we truncate the iterator forcing TCP to return preliminary with a short send. It affects zerocopy sends with large payload sizes and leads to retries and possible request failures. Fixes: 3ff1a0d395c00 ("io_uring: enable managed frags with register buffers") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/0bc0d5179c665b4ef5c328377c84c7a1f298467e.1661530037.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8238b4579866b7c1bb99883cfe102a43db5506ff Author: Mikulas Patocka Date: Fri Aug 26 09:17:08 2022 -0400 wait_on_bit: add an acquire memory barrier There are several places in the kernel where wait_on_bit is not followed by a memory barrier (for example, in drivers/md/dm-bufio.c:new_read). On architectures with weak memory ordering, it may happen that memory accesses that follow wait_on_bit are reordered before wait_on_bit and they may return invalid data. Fix this class of bugs by introducing a new function "test_bit_acquire" that works like test_bit, but has acquire memory ordering semantics. Signed-off-by: Mikulas Patocka Acked-by: Will Deacon Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds Documentation/atomic_bitops.txt | 10 ++++------ arch/x86/include/asm/bitops.h | 21 +++++++++++++++++++++ include/asm-generic/bitops/generic-non-atomic.h | 14 ++++++++++++++ .../asm-generic/bitops/instrumented-non-atomic.h | 12 ++++++++++++ include/asm-generic/bitops/non-atomic.h | 1 + .../bitops/non-instrumented-non-atomic.h | 1 + include/linux/bitops.h | 1 + include/linux/buffer_head.h | 2 +- include/linux/wait_bit.h | 8 ++++---- kernel/sched/wait_bit.c | 2 +- 10 files changed, 60 insertions(+), 12 deletions(-) commit 707527956d90ea4f304188555a97144183af1e49 Author: Paul Moore Date: Fri Aug 19 16:20:33 2022 -0400 /dev/null: add IORING_OP_URING_CMD support This patch adds support for the io_uring command pass through, aka IORING_OP_URING_CMD, to the /dev/null driver. As with all of the /dev/null functionality, the implementation is just a simple sink where commands go to die, but it should be useful for developers who need a simple IORING_OP_URING_CMD test device that doesn't require any special hardware. Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Acked-by: Jens Axboe Signed-off-by: Paul Moore drivers/char/mem.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f4d653dcaa4e4056e1630423e6a8ece4869b544f Author: Paul Moore Date: Wed Aug 10 15:55:36 2022 -0400 selinux: implement the security_uring_cmd() LSM hook Add a SELinux access control for the iouring IORING_OP_URING_CMD command. This includes the addition of a new permission in the existing "io_uring" object class: "cmd". The subject of the new permission check is the domain of the process requesting access, the object is the open file which points to the device/file that is the target of the IORING_OP_URING_CMD operation. A sample policy rule is shown below: allow :io_uring { cmd }; Cc: stable@vger.kernel.org Fixes: ee692a21e9bf ("fs,io_uring: add infrastructure for uring-cmd") Signed-off-by: Paul Moore security/selinux/hooks.c | 24 ++++++++++++++++++++++++ security/selinux/include/classmap.h | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) commit 2a5840124009f133bd09fd855963551fb2cefe22 Author: Luis Chamberlain Date: Fri Jul 15 12:16:22 2022 -0700 lsm,io_uring: add LSM hooks for the new uring_cmd file op io-uring cmd support was added through ee692a21e9bf ("fs,io_uring: add infrastructure for uring-cmd"), this extended the struct file_operations to allow a new command which each subsystem can use to enable command passthrough. Add an LSM specific for the command passthrough which enables LSMs to inspect the command details. This was discussed long ago without no clear pointer for something conclusive, so this enables LSMs to at least reject this new file operation. [0] https://lkml.kernel.org/r/8adf55db-7bab-f59d-d612-ed906b948d19@schaufler-ca.com Cc: stable@vger.kernel.org Fixes: ee692a21e9bf ("fs,io_uring: add infrastructure for uring-cmd") Signed-off-by: Luis Chamberlain Acked-by: Jens Axboe Signed-off-by: Paul Moore include/linux/lsm_hook_defs.h | 1 + include/linux/lsm_hooks.h | 3 +++ include/linux/security.h | 5 +++++ io_uring/uring_cmd.c | 5 +++++ security/security.c | 4 ++++ 5 files changed, 18 insertions(+) commit 5934d9a0383619c14df91af8fd76261dc3de2f5f Author: Dan Carpenter Date: Fri Aug 26 18:01:10 2022 +0300 ALSA: control: Re-order bounds checking in get_ctl_id_hash() These two checks are in the reverse order so it might read one element beyond the end of the array. First check if the "i" is within bounds before using it. Fixes: 6ab55ec0a938 ("ALSA: control: Fix an out-of-bounds bug in get_ctl_id_hash()") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YwjgNh/gkG1hH7po@kili Signed-off-by: Takashi Iwai sound/core/control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e085ec0e2d7afa14bcfbcd4c41240f5d3372bfe Merge: 4ba9d38bb5a3 a657182a5c51 Author: David S. Miller Date: Fri Aug 26 12:19:09 2022 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel borkmann says: ==================== The following pull-request contains BPF updates for your *net* tree. We've added 11 non-merge commits during the last 14 day(s) which contain a total of 13 files changed, 61 insertions(+), 24 deletions(-). The main changes are: 1) Fix BPF verifier's precision tracking around BPF ring buffer, from Kumar Kartikeya Dwivedi. 2) Fix regression in tunnel key infra when passing FLOWI_FLAG_ANYSRC, from Eyal Birger. 3) Fix insufficient permissions for bpf_sys_bpf() helper, from YiFei Zhu. 4) Fix splat from hitting BUG when purging effective cgroup programs, from Pu Lehui. 5) Fix range tracking for array poke descriptors, from Daniel Borkmann. 6) Fix corrupted packets for XDP_SHARED_UMEM in aligned mode, from Magnus Karlsson. 7) Fix NULL pointer splat in BPF sockmap sk_msg_recvmsg(), from Liu Jian. 8) Add READ_ONCE() to bpf_jit_limit when reading from sysctl, from Kuniyuki Iwashima. 9) Add BPF selftest lru_bug check to s390x deny list, from Daniel Müller. ==================== Signed-off-by: David S. Miller commit fa3fbe64037839f448dc569212bafc5a495d8219 Author: Deren Wu Date: Tue Aug 2 23:15:07 2022 +0800 wifi: mt76: mt7921e: fix crash in chip reset fail In case of drv own fail in reset, we may need to run mac_reset several times. The sequence would trigger system crash as the log below. Because we do not re-enable/schedule "tx_napi" before disable it again, the process would keep waiting for state change in napi_diable(). To avoid the problem and keep status synchronize for each run, goto final resource handling if drv own failed. [ 5857.353423] mt7921e 0000:3b:00.0: driver own failed [ 5858.433427] mt7921e 0000:3b:00.0: Timeout for driver own [ 5859.633430] mt7921e 0000:3b:00.0: driver own failed [ 5859.633444] ------------[ cut here ]------------ [ 5859.633446] WARNING: CPU: 6 at kernel/kthread.c:659 kthread_park+0x11d [ 5859.633717] Workqueue: mt76 mt7921_mac_reset_work [mt7921_common] [ 5859.633728] RIP: 0010:kthread_park+0x11d/0x150 [ 5859.633736] RSP: 0018:ffff8881b676fc68 EFLAGS: 00010202 ...... [ 5859.633766] Call Trace: [ 5859.633768] [ 5859.633771] mt7921e_mac_reset+0x176/0x6f0 [mt7921e] [ 5859.633778] mt7921_mac_reset_work+0x184/0x3a0 [mt7921_common] [ 5859.633785] ? mt7921_mac_set_timing+0x520/0x520 [mt7921_common] [ 5859.633794] ? __kasan_check_read+0x11/0x20 [ 5859.633802] process_one_work+0x7ee/0x1320 [ 5859.633810] worker_thread+0x53c/0x1240 [ 5859.633818] kthread+0x2b8/0x370 [ 5859.633824] ? process_one_work+0x1320/0x1320 [ 5859.633828] ? kthread_complete_and_exit+0x30/0x30 [ 5859.633834] ret_from_fork+0x1f/0x30 [ 5859.633842] Cc: stable@vger.kernel.org Fixes: 0efaf31dec57 ("mt76: mt7921: fix MT7921E reset failure") Signed-off-by: Deren Wu Link: https://lore.kernel.org/r/727eb5ffd3c7c805245e512da150ecf0a7154020.1659452909.git.deren.wu@mediatek.com Signed-off-by: Johannes Berg drivers/net/wireless/mediatek/mt76/mt7921/pci_mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 343b62048ba4cec6b8b890092bcc200e1eb83424 Author: Mario Limonciello Date: Fri Aug 19 13:01:00 2022 -0500 platform/x86: thinkpad_acpi: Explicitly set to balanced mode on startup It was observed that on a Thinkpad T14 Gen1 (AMD) that the platform profile is starting up in 'low-power' mode after refreshing what the firmware had. This is most likely a firmware bug, but as a harmless workaround set the default profile to 'balanced' at thinkpad_acpi startup. Reported-by: madcatx@atlas.cz Link: https://bugzilla.kernel.org/show_bug.cgi?id=216347 Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20220819180101.6383-1-mario.limonciello@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/thinkpad_acpi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4ba9d38bb5a3255390dc15d8ac81f656a968273c Merge: 4c612826bec1 55f0a4894484 Author: David S. Miller Date: Fri Aug 26 11:43:20 2022 +0100 Merge tag 'wireless-2022-08-26' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== pull-request: wireless-2022-08-26 Here are a couple of fixes for the current cycle, see the tag description below. Just a couple of fixes: * two potential leaks * use-after-free in certain scan races * warning in IBSS code * error return from a debugfs file was wrong * possible NULL-ptr-deref when station lookup fails Please pull and let me know if there's any problem. ==================== Signed-off-by: David S. Miller commit 874b301985ef2f89b8b592ad255e03fb6fbfe605 Author: Eric Biggers Date: Thu Aug 25 22:04:56 2022 -0700 crypto: lib - remove unneeded selection of XOR_BLOCKS CRYPTO_LIB_CHACHA_GENERIC doesn't need to select XOR_BLOCKS. It perhaps was thought that it's needed for __crypto_xor, but that's not the case. Enabling XOR_BLOCKS is problematic because the XOR_BLOCKS code runs a benchmark when it is initialized. That causes a boot time regression on systems that didn't have it enabled before. Therefore, remove this unnecessary and problematic selection. Fixes: e56e18985596 ("lib/crypto: add prompts back to crypto libraries") Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu lib/crypto/Kconfig | 1 - 1 file changed, 1 deletion(-) commit ee653d2d8f7c935a00f01a7654d889e8ce55b00e Author: PaddyKP_Yao Date: Thu Aug 25 08:43:05 2022 +0800 platform/x86: asus-wmi: Fix the name of the mic-mute LED classdev According to well-known-leds.txt, we should use "platform::micmute" instead of "asus::micmute" for the name of the mic-mute LED classdev. Signed-off-by: PaddyKP_Yao Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220825004305.709539-1-PaddyKP_Yao@asus.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/asus-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76648c867c6c03b8a468d9c9222025873ecc613d Author: Michael Wu Date: Fri Aug 19 10:45:41 2022 +0800 pinctrl: sunxi: Fix name for A100 R_PIO The name of A100 R_PIO driver should be sun50i-a100-r-pinctrl, not sun50iw10p1-r-pinctrl. Fixes: 473436e7647d6 ("pinctrl: sunxi: add support for the Allwinner A100 pin controller") Signed-off-by: Michael Wu Acked-by: Samuel Holland Link: https://lore.kernel.org/r/20220819024541.74191-1-michael@allwinnertech.com Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec6624452e36158d0813758d837f7a2263a4109d Merge: e9ac503883ab 4c612826bec1 Author: Andrew Morton Date: Thu Aug 25 21:45:38 2022 -0700 Merge branch 'linus' commit 100d0ae82b5c240a4dc17486698e67bf116bd598 Merge: 064d491f7346 b8983d42524f Author: Dave Airlie Date: Fri Aug 26 09:56:53 2022 +1000 Merge tag 'amd-drm-fixes-6.0-2022-08-25' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.0-2022-08-25: amdgpu: - GFX 11.0 fixes - PSP XGMI handling fixes - GFX9 fix for compute-only IPs - Drop duplicated function call - Fix warning due to missing header - NBIO 7.7 fixes - DCN 3.1.4 fixes - SDMA 6.0 fixes - SMU 13.0 fixes - Arcturus GPUVM page table fix - MMHUB 1.0 fix amdkfd: - GC 10.3.7 fix radeon: - Delayed work flush fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20220825181243.5853-1-alexander.deucher@amd.com commit 064d491f73464f5c9cf56ac24f55118f6f4c54c2 Merge: 1c23f9e627a7 6b04ce966a73 Author: Dave Airlie Date: Fri Aug 26 09:47:49 2022 +1000 Merge tag 'drm-misc-fixes-2022-08-25' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * gem: Fixes handle release leak * nouveau: Fix fencing when moving BO * vc4: HDMI fixes * Backmerging for v6.0-rc1 Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YwclSWheC+Ai+u+v@linux-uq9g commit 1709c70c31e05e6e87b2ffa0a2b4cc0da4b2c513 Merge: 92e55a865bc7 d951b20b9def Author: Palmer Dabbelt Date: Thu Aug 25 16:37:17 2022 -0700 Merge branch 'riscv-variable_fixes_without_kvm' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux.git into fixes This contains a pair of fixes for build-time warnings. * 'riscv-variable_fixes_without_kvm' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux.git: riscv: traps: add missing prototype riscv: signal: fix missing prototype warning commit 92e55a865bc7b3f89bb8c684f6846651868ee7d7 Merge: 96264230a681 e4009c5fa77b Author: Palmer Dabbelt Date: Thu Aug 25 16:06:49 2022 -0700 Merge tag 'dt-fixes-for-palmer-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git into fixes Microchip RISC-V devicetree fixes for 6.0-rc3 Two sets of fixes this time around: - A fix for the interrupt ordering of the l2-cache controller. If the driver is enabled, it would spam the console /constantly/, rendering the system useless. - General cleanup for some bogus properties in the dt, part of my quest for zero dtbs_check warnings. On that note, the interrupt ordering adds a dtbs_check warning - but I considered that fixing the potentially useless system was more of a priority. Signed-off-by: Conor Dooley * tag 'dt-fixes-for-palmer-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git: riscv: dts: microchip: mpfs: remove pci axi address translation property riscv: dts: microchip: mpfs: remove bogus card-detect-delay riscv: dts: microchip: mpfs: remove ti,fifo-depth property riscv: dts: microchip: mpfs: fix incorrect pcie child node name riscv: dts: microchip: correct L2 cache interrupts commit 2da8eb834b775a9d1acea6214d3e4a78ac841e6e Author: Zhengping Jiang Date: Tue Aug 23 10:28:08 2022 -0700 Bluetooth: hci_sync: hold hdev->lock when cleanup hci_conn When disconnecting all devices, hci_conn_failed is used to cleanup hci_conn object when the hci_conn object cannot be aborted. The function hci_conn_failed requires the caller holds hdev->lock. Fixes: 9b3628d79b46f ("Bluetooth: hci_sync: Cleanup hci_conn if it cannot be aborted") Signed-off-by: Zhengping Jiang Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_sync.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit cb0d160f813b23df2f4fe7af3237a026c44ed1aa Author: Wolfram Sang Date: Thu Aug 18 23:02:07 2022 +0200 Bluetooth: move from strlcpy with unused retval to strscpy Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hidp/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f48735a9aaf8258f39918e13adf464ccd7dce33b Author: Archie Pusaka Date: Tue Aug 23 12:39:22 2022 +0800 Bluetooth: hci_event: Fix checking conn for le_conn_complete_evt To prevent multiple conn complete events, we shouldn't look up the conn with hci_lookup_le_connect, since it requires the state to be BT_CONNECT. By the time the duplicate event is processed, the state might have changed, so we end up processing the new event anyway. Change the lookup function to hci_conn_hash_lookup_ba. Fixes: d5ebaa7c5f6f6 ("Bluetooth: hci_event: Ignore multiple conn complete events") Signed-off-by: Archie Pusaka Reviewed-by: Sonny Sasaka Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c572909376673d8c126ae2ee53ba754ff9327d98 Author: Luiz Augusto von Dentz Date: Thu Aug 18 14:31:42 2022 -0700 Bluetooth: ISO: Fix not handling shutdown condition In order to properly handle shutdown syscall the code shall not assume that the how argument is always SHUT_RDWR resulting in SHUTDOWN_MASK as that would result in poll to immediately report EPOLLHUP instead of properly waiting for disconnect_cfm (Disconnect Complete) which is rather important for the likes of BAP as the CIG may need to be reprogrammed. Fixes: ccf74f2390d6 ("Bluetooth: Add BTPROTO_ISO socket type") Signed-off-by: Luiz Augusto von Dentz net/bluetooth/iso.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) commit 3cfbc6ac22d62d0a06be9ce2996ba9fed75436cd Author: Tetsuo Handa Date: Wed Aug 17 20:14:36 2022 +0900 Bluetooth: hci_sync: fix double mgmt_pending_free() in remove_adv_monitor() syzbot is reporting double kfree() at remove_adv_monitor() [1], for commit 7cf5c2978f23fdbb ("Bluetooth: hci_sync: Refactor remove Adv Monitor") forgot to remove duplicated mgmt_pending_remove() when merging "if (err) {" path and "if (!pending) {" path. Link: https://syzkaller.appspot.com/bug?extid=915a8416bf15895b8e07 [1] Reported-by: syzbot Fixes: 7cf5c2978f23fdbb ("Bluetooth: hci_sync: Refactor remove Adv Monitor") Signed-off-by: Tetsuo Handa Signed-off-by: Luiz Augusto von Dentz net/bluetooth/mgmt.c | 1 - 1 file changed, 1 deletion(-) commit 23b72814da1a094b4c065e0bb598249f310c5577 Author: Luiz Augusto von Dentz Date: Mon Aug 15 16:14:32 2022 -0700 Bluetooth: MGMT: Fix Get Device Flags Get Device Flags don't check if device does actually use an RPA in which case it shall only set HCI_CONN_FLAG_REMOTE_WAKEUP if LL Privacy is enabled. Signed-off-by: Luiz Augusto von Dentz net/bluetooth/mgmt.c | 71 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 29 deletions(-) commit b840304fb46cdf7012722f456bce06f151b3e81b Author: Luiz Augusto von Dentz Date: Fri Aug 12 15:33:57 2022 -0700 Bluetooth: L2CAP: Fix build errors in some archs This attempts to fix the follow errors: In function 'memcmp', inlined from 'bacmp' at ./include/net/bluetooth/bluetooth.h:347:9, inlined from 'l2cap_global_chan_by_psm' at net/bluetooth/l2cap_core.c:2003:15: ./include/linux/fortify-string.h:44:33: error: '__builtin_memcmp' specified bound 6 exceeds source size 0 [-Werror=stringop-overread] 44 | #define __underlying_memcmp __builtin_memcmp | ^ ./include/linux/fortify-string.h:420:16: note: in expansion of macro '__underlying_memcmp' 420 | return __underlying_memcmp(p, q, size); | ^~~~~~~~~~~~~~~~~~~ In function 'memcmp', inlined from 'bacmp' at ./include/net/bluetooth/bluetooth.h:347:9, inlined from 'l2cap_global_chan_by_psm' at net/bluetooth/l2cap_core.c:2004:15: ./include/linux/fortify-string.h:44:33: error: '__builtin_memcmp' specified bound 6 exceeds source size 0 [-Werror=stringop-overread] 44 | #define __underlying_memcmp __builtin_memcmp | ^ ./include/linux/fortify-string.h:420:16: note: in expansion of macro '__underlying_memcmp' 420 | return __underlying_memcmp(p, q, size); | ^~~~~~~~~~~~~~~~~~~ Fixes: 332f1795ca20 ("Bluetooth: L2CAP: Fix l2cap_global_chan_by_psm regression") Signed-off-by: Luiz Augusto von Dentz net/bluetooth/l2cap_core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1fd02d56dae35b08e4cba8e6bd2c2e7ccff68ecc Author: Luiz Augusto von Dentz Date: Thu Aug 11 14:20:46 2022 -0700 Bluetooth: hci_sync: Fix suspend performance regression This attempts to fix suspend performance when there is no connections by not updating the event mask. Fixes: ef61b6ea1544 ("Bluetooth: Always set event mask on suspend") Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_sync.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit b82a26d8633cc89367fac75beb3ec33061bea44a Author: Hans de Goede Date: Sun Aug 7 22:57:40 2022 +0200 Bluetooth: hci_event: Fix vendor (unknown) opcode status handling Commit c8992cffbe74 ("Bluetooth: hci_event: Use of a function table to handle Command Complete") was (presumably) meant to only refactor things without any functional changes. But it does have one undesirable side-effect, before *status would always be set to skb->data[0] and it might be overridden by some of the opcode specific handling. While now it always set by the opcode specific handlers. This means that if the opcode is not known *status does not get set any more at all! This behavior change has broken bluetooth support for BCM4343A0 HCIs, the hci_bcm.c code tries to configure UART attached HCIs at a higher baudraute using vendor specific opcodes. The BCM4343A0 does not support this and this used to simply fail: [ 25.646442] Bluetooth: hci0: BCM: failed to write clock (-56) [ 25.646481] Bluetooth: hci0: Failed to set baudrate After which things would continue with the initial baudraute. But now that hci_cmd_complete_evt() no longer sets status for unknown opcodes *status is left at 0. This causes the hci_bcm.c code to think the baudraute has been changed on the HCI side and to also adjust the UART baudrate, after which communication with the HCI is broken, leading to: [ 28.579042] Bluetooth: hci0: command 0x0c03 tx timeout [ 36.961601] Bluetooth: hci0: BCM: Reset failed (-110) And non working bluetooth. Fix this by restoring the previous default "*status = skb->data[0]" handling for unknown opcodes. Fixes: c8992cffbe74 ("Bluetooth: hci_event: Use of a function table to handle Command Complete") Signed-off-by: Hans de Goede Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_event.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 91926d8b7e71aaf5f84f0cf208fc5a8b7a761050 Author: Michael Ellerman Date: Tue Aug 23 21:59:52 2022 +1000 powerpc/rtas: Fix RTAS MSR[HV] handling for Cell The semi-recent changes to MSR handling when entering RTAS (firmware) cause crashes on IBM Cell machines. An example trace: kernel tried to execute user page (2fff01a8) - exploit attempt? (uid: 0) BUG: Unable to handle kernel instruction fetch Faulting instruction address: 0x2fff01a8 Oops: Kernel access of bad area, sig: 11 [#1] BE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=4 NUMA Cell Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 6.0.0-rc2-00433-gede0a8d3307a #207 NIP: 000000002fff01a8 LR: 0000000000032608 CTR: 0000000000000000 REGS: c0000000015236b0 TRAP: 0400 Tainted: G W (6.0.0-rc2-00433-gede0a8d3307a) MSR: 0000000008001002 CR: 00000000 XER: 20000000 ... NIP 0x2fff01a8 LR 0x32608 Call Trace: 0xc00000000143c5f8 (unreliable) .rtas_call+0x224/0x320 .rtas_get_boot_time+0x70/0x150 .read_persistent_clock64+0x114/0x140 .read_persistent_wall_and_boot_offset+0x24/0x80 .timekeeping_init+0x40/0x29c .start_kernel+0x674/0x8f0 start_here_common+0x1c/0x50 Unlike PAPR platforms where RTAS is only used in guests, on the IBM Cell machines Linux runs with MSR[HV] set but also uses RTAS, provided by SLOF. Fix it by copying the MSR[HV] bit from the MSR value we've just read using mfmsr into the value used for RTAS. It seems like we could also fix it using an #ifdef CELL to set MSR[HV], but that doesn't work because it's possible to build a single kernel image that runs on both Cell native and pseries. Fixes: b6b1c3ce06ca ("powerpc/rtas: Keep MSR[RI] set when calling RTAS") Cc: stable@vger.kernel.org # v5.19+ Signed-off-by: Michael Ellerman Reviewed-by: Jordan Niethe Link: https://lore.kernel.org/r/20220823115952.1203106-2-mpe@ellerman.id.au arch/powerpc/kernel/rtas_entry.S | 4 ++++ 1 file changed, 4 insertions(+) commit 310d1344e3c58cc2d625aa4e52cfcb7d8a26fcbf Author: Michael Ellerman Date: Tue Aug 23 21:59:51 2022 +1000 Revert "powerpc: Remove unused FW_FEATURE_NATIVE references" This reverts commit 79b74a68486765a4fe685ac4069bc71366c538f5. It broke booting on IBM Cell machines when the kernel is also built with CONFIG_PPC_PS3=y. That's because FW_FEATURE_NATIVE_ALWAYS = 0 does have an important effect, which is to clear the PS3 ALWAYS features from FW_FEATURE_ALWAYS. Note that CONFIG_PPC_NATIVE has since been renamed CONFIG_PPC_HASH_MMU_NATIVE. Fixes: 79b74a684867 ("powerpc: Remove unused FW_FEATURE_NATIVE references") Cc: stable@vger.kernel.org # v5.17+ Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220823115952.1203106-1-mpe@ellerman.id.au arch/powerpc/include/asm/firmware.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit c7acee3d2f128a38b68fb7af85dbbd91bfd0b4ad Author: Masahiro Yamada Date: Sun Aug 21 01:51:29 2022 +0900 powerpc: align syscall table for ppc32 Christophe Leroy reported that commit 7b4537199a4a ("kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS") broke mpc85xx_defconfig + CONFIG_RELOCATABLE=y. LD vmlinux SYSMAP System.map SORTTAB vmlinux CHKREL vmlinux WARNING: 451 bad relocations c0b312a9 R_PPC_UADDR32 .head.text-0x3ff9ed54 c0b312ad R_PPC_UADDR32 .head.text-0x3ffac224 c0b312b1 R_PPC_UADDR32 .head.text-0x3ffb09f4 c0b312b5 R_PPC_UADDR32 .head.text-0x3fe184dc c0b312b9 R_PPC_UADDR32 .head.text-0x3fe183a8 ... The compiler emits a bunch of R_PPC_UADDR32, which is not supported by arch/powerpc/kernel/reloc_32.S. The reason is there exists an unaligned symbol. $ powerpc-linux-gnu-nm -n vmlinux ... c0b31258 d spe_aligninfo c0b31298 d __func__.0 c0b312a9 D sys_call_table c0b319b8 d __func__.0 Commit 7b4537199a4a is not the root cause. Even before that, I can reproduce the same issue for mpc85xx_defconfig + CONFIG_RELOCATABLE=y + CONFIG_MODVERSIONS=n. It is just that nobody noticed because when CONFIG_MODVERSIONS is enabled, a __crc_* symbol inserted before sys_call_table was hiding the unalignment issue. Adding alignment to the syscall table for ppc32 fixes the issue. Cc: stable@vger.kernel.org Reported-by: Christophe Leroy Signed-off-by: Masahiro Yamada Tested-by: Christophe Leroy [mpe: Trim change log discussion, add Cc stable] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/lkml/38605f6a-a568-f884-f06f-ea4da5b214f0@csgroup.eu/ Link: https://lore.kernel.org/r/20220820165129.1147589-1-masahiroy@kernel.org arch/powerpc/kernel/systbl.S | 1 + 1 file changed, 1 insertion(+) commit a657182a5c5150cdfacb6640aad1d2712571a409 Author: Daniel Borkmann Date: Thu Aug 25 23:26:47 2022 +0200 bpf: Don't use tnum_range on array range checking for poke descriptors Hsin-Wei reported a KASAN splat triggered by their BPF runtime fuzzer which is based on a customized syzkaller: BUG: KASAN: slab-out-of-bounds in bpf_int_jit_compile+0x1257/0x13f0 Read of size 8 at addr ffff888004e90b58 by task syz-executor.0/1489 CPU: 1 PID: 1489 Comm: syz-executor.0 Not tainted 5.19.0 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Call Trace: dump_stack_lvl+0x9c/0xc9 print_address_description.constprop.0+0x1f/0x1f0 ? bpf_int_jit_compile+0x1257/0x13f0 kasan_report.cold+0xeb/0x197 ? kvmalloc_node+0x170/0x200 ? bpf_int_jit_compile+0x1257/0x13f0 bpf_int_jit_compile+0x1257/0x13f0 ? arch_prepare_bpf_dispatcher+0xd0/0xd0 ? rcu_read_lock_sched_held+0x43/0x70 bpf_prog_select_runtime+0x3e8/0x640 ? bpf_obj_name_cpy+0x149/0x1b0 bpf_prog_load+0x102f/0x2220 ? __bpf_prog_put.constprop.0+0x220/0x220 ? find_held_lock+0x2c/0x110 ? __might_fault+0xd6/0x180 ? lock_downgrade+0x6e0/0x6e0 ? lock_is_held_type+0xa6/0x120 ? __might_fault+0x147/0x180 __sys_bpf+0x137b/0x6070 ? bpf_perf_link_attach+0x530/0x530 ? new_sync_read+0x600/0x600 ? __fget_files+0x255/0x450 ? lock_downgrade+0x6e0/0x6e0 ? fput+0x30/0x1a0 ? ksys_write+0x1a8/0x260 __x64_sys_bpf+0x7a/0xc0 ? syscall_enter_from_user_mode+0x21/0x70 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f917c4e2c2d The problem here is that a range of tnum_range(0, map->max_entries - 1) has limited ability to represent the concrete tight range with the tnum as the set of resulting states from value + mask can result in a superset of the actual intended range, and as such a tnum_in(range, reg->var_off) check may yield true when it shouldn't, for example tnum_range(0, 2) would result in 00XX -> v = 0000, m = 0011 such that the intended set of {0, 1, 2} is here represented by a less precise superset of {0, 1, 2, 3}. As the register is known const scalar, really just use the concrete reg->var_off.value for the upper index check. Fixes: d2e4c1e6c294 ("bpf: Constant map key tracking for prog array pokes") Reported-by: Hsin-Wei Hung Signed-off-by: Daniel Borkmann Cc: Shung-Hsi Yu Acked-by: John Fastabend Link: https://lore.kernel.org/r/984b37f9fdf7ac36831d2137415a4a915744c1b6.1661462653.git.daniel@iogearbox.net Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit d4fefa4801a1c2f9c0c7a48fbb0fdf384e89a4ab Author: Richard Guy Briggs Date: Thu Aug 25 15:32:40 2022 -0400 audit: move audit_return_fixup before the filters The success and return_code are needed by the filters. Move audit_return_fixup() before the filters. This was causing syscall auditing events to be missed. Link: https://github.com/linux-audit/audit-kernel/issues/138 Cc: stable@vger.kernel.org Fixes: 12c5e81d3fd0 ("audit: prepare audit_context for use in calling contexts beyond syscalls") Signed-off-by: Richard Guy Briggs [PM: manual merge required] Signed-off-by: Paul Moore kernel/auditsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4c612826bec1441214816827979b62f84a097e91 Merge: 3f5c20055a64 d974730c8884 Author: Linus Torvalds Date: Thu Aug 25 14:03:58 2022 -0700 Merge tag 'net-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from ipsec and netfilter (with one broken Fixes tag). Current release - new code bugs: - dsa: don't dereference NULL extack in dsa_slave_changeupper() - dpaa: fix <1G ethernet on LS1046ARDB - neigh: don't call kfree_skb() under spin_lock_irqsave() Previous releases - regressions: - r8152: fix the RX FIFO settings when suspending - dsa: microchip: keep compatibility with device tree blobs with no phy-mode - Revert "net: macsec: update SCI upon MAC address change." - Revert "xfrm: update SA curlft.use_time", comply with RFC 2367 Previous releases - always broken: - netfilter: conntrack: work around exceeded TCP receive window - ipsec: fix a null pointer dereference of dst->dev on a metadata dst in xfrm_lookup_with_ifid - moxa: get rid of asymmetry in DMA mapping/unmapping - dsa: microchip: make learning configurable and keep it off while standalone - ice: xsk: prohibit usage of non-balanced queue id - rxrpc: fix locking in rxrpc's sendmsg Misc: - another chunk of sysctl data race silencing" * tag 'net-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (87 commits) net: lantiq_xrx200: restore buffer if memory allocation failed net: lantiq_xrx200: fix lock under memory pressure net: lantiq_xrx200: confirm skb is allocated before using net: stmmac: work around sporadic tx issue on link-up ionic: VF initial random MAC address if no assigned mac ionic: fix up issues with handling EAGAIN on FW cmds ionic: clear broken state on generation change rxrpc: Fix locking in rxrpc's sendmsg net: ethernet: mtk_eth_soc: fix hw hash reporting for MTK_NETSYS_V2 MAINTAINERS: rectify file entry in BONDING DRIVER i40e: Fix incorrect address type for IPv6 flow rules ixgbe: stop resetting SYSTIME in ixgbe_ptp_start_cyclecounter net: Fix a data-race around sysctl_somaxconn. net: Fix a data-race around netdev_unregister_timeout_secs. net: Fix a data-race around gro_normal_batch. net: Fix data-races around sysctl_devconf_inherit_init_net. net: Fix data-races around sysctl_fb_tunnels_only_for_init_net. net: Fix a data-race around netdev_budget_usecs. net: Fix data-races around sysctl_max_skb_frags. net: Fix a data-race around netdev_budget. ... commit d974730c8884cd784810b4f2fe903ac882a5fec9 Merge: a3a57bf07de2 c9c3b1775f80 Author: Jakub Kicinski Date: Thu Aug 25 12:41:41 2022 -0700 Merge branch 'net-lantiq_xrx200-fix-errors-under-memory-pressure' Aleksander Jan Bajkowski says: ==================== net: lantiq_xrx200: fix errors under memory pressure This series fixes issues that can occur in the driver under memory pressure. Situations when the system cannot allocate memory are rare, so the mentioned bugs have been fixed recently. The patches have been tested on a BT Home router with the Lantiq xRX200 chipset. Changelog: v3: - removed netdev_err() log from the first patch v2: - the second patch has been changed, so that under memory pressure situation the driver will not receive packets indefinitely regardless of the NAPI budget, - the third patch has been added. ==================== Link: https://lore.kernel.org/r/20220824215408.4695-1-olek2@wp.pl Signed-off-by: Jakub Kicinski commit c9c3b1775f80fa21f5bff874027d2ccb10f5d90c Author: Aleksander Jan Bajkowski Date: Wed Aug 24 23:54:08 2022 +0200 net: lantiq_xrx200: restore buffer if memory allocation failed In a situation where memory allocation fails, an invalid buffer address is stored. When this descriptor is used again, the system panics in the build_skb() function when accessing memory. Fixes: 7ea6cd16f159 ("lantiq: net: fix duplicated skb in rx descriptor ring") Signed-off-by: Aleksander Jan Bajkowski Signed-off-by: Jakub Kicinski drivers/net/ethernet/lantiq_xrx200.c | 1 + 1 file changed, 1 insertion(+) commit c4b6e9341f930e4dd089231c0414758f5f1f9dbd Author: Aleksander Jan Bajkowski Date: Wed Aug 24 23:54:07 2022 +0200 net: lantiq_xrx200: fix lock under memory pressure When the xrx200_hw_receive() function returns -ENOMEM, the NAPI poll function immediately returns an error. This is incorrect for two reasons: * the function terminates without enabling interrupts or scheduling NAPI, * the error code (-ENOMEM) is returned instead of the number of received packets. After the first memory allocation failure occurs, packet reception is locked due to disabled interrupts from DMA.. Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver") Signed-off-by: Aleksander Jan Bajkowski Signed-off-by: Jakub Kicinski drivers/net/ethernet/lantiq_xrx200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8b043702dc0894c07721c5b019096cebc8c798f Author: Aleksander Jan Bajkowski Date: Wed Aug 24 23:54:06 2022 +0200 net: lantiq_xrx200: confirm skb is allocated before using xrx200_hw_receive() assumes build_skb() always works and goes straight to skb_reserve(). However, build_skb() can fail under memory pressure. Add a check in case build_skb() failed to allocate and return NULL. Fixes: e015593573b3 ("net: lantiq_xrx200: convert to build_skb") Reported-by: Eric Dumazet Signed-off-by: Aleksander Jan Bajkowski Signed-off-by: Jakub Kicinski drivers/net/ethernet/lantiq_xrx200.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a3a57bf07de23fe1ff779e0fdf710aa581c3ff73 Author: Heiner Kallweit Date: Wed Aug 24 22:34:49 2022 +0200 net: stmmac: work around sporadic tx issue on link-up This is a follow-up to the discussion in [0]. It seems to me that at least the IP version used on Amlogic SoC's sometimes has a problem if register MAC_CTRL_REG is written whilst the chip is still processing a previous write. But that's just a guess. Adding a delay between two writes to this register helps, but we can also simply omit the offending second write. This patch uses the second approach and is based on a suggestion from Qi Duan. Benefit of this approach is that we can save few register writes, also on not affected chip versions. [0] https://www.spinics.net/lists/netdev/msg831526.html Fixes: bfab27a146ed ("stmmac: add the experimental PCI support") Suggested-by: Qi Duan Suggested-by: Jerome Brunet Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/e99857ce-bd90-5093-ca8c-8cd480b5a0a2@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 8 ++++++-- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 9 +++++---- 2 files changed, 11 insertions(+), 6 deletions(-) commit ef332fe14b25f1599ef4c7cb61f3b5fb2192b546 Merge: 92df825ad2e4 bcf3a1564293 Author: Jakub Kicinski Date: Thu Aug 25 12:40:29 2022 -0700 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2022-08-24 (ixgbe, i40e) This series contains updates to ixgbe and i40e drivers. Jake stops incorrect resetting of SYSTIME registers when starting cyclecounter for ixgbe. Sylwester corrects a check on source IP address when validating destination for i40e. * '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: i40e: Fix incorrect address type for IPv6 flow rules ixgbe: stop resetting SYSTIME in ixgbe_ptp_start_cyclecounter ==================== Link: https://lore.kernel.org/r/20220824193748.874343-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 92df825ad2e4a94895237cc2fe5b932a89ad1d56 Merge: b0f571ecd794 19058be7c48c Author: Jakub Kicinski Date: Thu Aug 25 12:40:17 2022 -0700 Merge branch 'ionic-bug-fixes' Shannon Nelson says: ==================== ionic: bug fixes These are a couple of maintenance bug fixes for the Pensando ionic networking driver. Mohamed takes care of a "plays well with others" issue where the VF spec is a bit vague on VF mac addresses, but certain customers have come to expect behavior based on other vendor drivers. Shannon addresses a couple of corner cases seen in internal stress testing. ==================== Link: https://lore.kernel.org/r/20220824165051.6185-1-snelson@pensando.io Signed-off-by: Jakub Kicinski commit 19058be7c48ceb3e60fa3948e24da1059bd68ee4 Author: R Mohamed Shah Date: Wed Aug 24 09:50:51 2022 -0700 ionic: VF initial random MAC address if no assigned mac Assign a random mac address to the VF interface station address if it boots with a zero mac address in order to match similar behavior seen in other VF drivers. Handle the errors where the older firmware does not allow the VF to set its own station address. Newer firmware will allow the VF to set the station mac address if it hasn't already been set administratively through the PF. Setting it will also be allowed if the VF has trust. Fixes: fbb39807e9ae ("ionic: support sr-iov operations") Signed-off-by: R Mohamed Shah Signed-off-by: Shannon Nelson Signed-off-by: Jakub Kicinski drivers/net/ethernet/pensando/ionic/ionic_lif.c | 92 +++++++++++++++++++++++-- 1 file changed, 87 insertions(+), 5 deletions(-) commit 0fc4dd452d6c14828eed6369155c75c0ac15bab3 Author: Shannon Nelson Date: Wed Aug 24 09:50:50 2022 -0700 ionic: fix up issues with handling EAGAIN on FW cmds In looping on FW update tests we occasionally see the FW_ACTIVATE_STATUS command fail while it is in its EAGAIN loop waiting for the FW activate step to finsh inside the FW. The firmware is complaining that the done bit is set when a new dev_cmd is going to be processed. Doing a clean on the cmd registers and doorbell before exiting the wait-for-done and cleaning the done bit before the sleep prevents this from occurring. Fixes: fbfb8031533c ("ionic: Add hardware init and device commands") Signed-off-by: Shannon Nelson Signed-off-by: Jakub Kicinski drivers/net/ethernet/pensando/ionic/ionic_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9cb9dadb8f45c67e4310e002c2f221b70312b293 Author: Shannon Nelson Date: Wed Aug 24 09:50:49 2022 -0700 ionic: clear broken state on generation change There is a case found in heavy testing where a link flap happens just before a firmware Recovery event and the driver gets stuck in the BROKEN state. This comes from the driver getting interrupted by a FW generation change when coming back up from the link flap, and the call to ionic_start_queues() in ionic_link_status_check() fails. This can be addressed by having the fw_up code clear the BROKEN bit if seen, rather than waiting for a user to manually force the interface down and then back up. Fixes: 9e8eaf8427b6 ("ionic: stop watchdog when in broken state") Signed-off-by: Shannon Nelson Signed-off-by: Jakub Kicinski drivers/net/ethernet/pensando/ionic/ionic_lif.c | 3 +++ 1 file changed, 3 insertions(+) commit b0f571ecd7943423c25947439045f0d352ca3dbf Author: David Howells Date: Wed Aug 24 17:35:45 2022 +0100 rxrpc: Fix locking in rxrpc's sendmsg Fix three bugs in the rxrpc's sendmsg implementation: (1) rxrpc_new_client_call() should release the socket lock when returning an error from rxrpc_get_call_slot(). (2) rxrpc_wait_for_tx_window_intr() will return without the call mutex held in the event that we're interrupted by a signal whilst waiting for tx space on the socket or relocking the call mutex afterwards. Fix this by: (a) moving the unlock/lock of the call mutex up to rxrpc_send_data() such that the lock is not held around all of rxrpc_wait_for_tx_window*() and (b) indicating to higher callers whether we're return with the lock dropped. Note that this means recvmsg() will not block on this call whilst we're waiting. (3) After dropping and regaining the call mutex, rxrpc_send_data() needs to go and recheck the state of the tx_pending buffer and the tx_total_len check in case we raced with another sendmsg() on the same call. Thinking on this some more, it might make sense to have different locks for sendmsg() and recvmsg(). There's probably no need to make recvmsg() wait for sendmsg(). It does mean that recvmsg() can return MSG_EOR indicating that a call is dead before a sendmsg() to that call returns - but that can currently happen anyway. Without fix (2), something like the following can be induced: WARNING: bad unlock balance detected! 5.16.0-rc6-syzkaller #0 Not tainted ------------------------------------- syz-executor011/3597 is trying to release lock (&call->user_mutex) at: [] rxrpc_do_sendmsg+0xc13/0x1350 net/rxrpc/sendmsg.c:748 but there are no more locks to release! other info that might help us debug this: no locks held by syz-executor011/3597. ... Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_unlock_imbalance_bug include/trace/events/lock.h:58 [inline] __lock_release kernel/locking/lockdep.c:5306 [inline] lock_release.cold+0x49/0x4e kernel/locking/lockdep.c:5657 __mutex_unlock_slowpath+0x99/0x5e0 kernel/locking/mutex.c:900 rxrpc_do_sendmsg+0xc13/0x1350 net/rxrpc/sendmsg.c:748 rxrpc_sendmsg+0x420/0x630 net/rxrpc/af_rxrpc.c:561 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2409 ___sys_sendmsg+0xf3/0x170 net/socket.c:2463 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2492 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae [Thanks to Hawkins Jiawei and Khalid Masum for their attempts to fix this] Fixes: bc5e3a546d55 ("rxrpc: Use MSG_WAITALL to tell sendmsg() to temporarily ignore signals") Reported-by: syzbot+7f0483225d0c94cb3441@syzkaller.appspotmail.com Signed-off-by: David Howells Reviewed-by: Marc Dionne Tested-by: syzbot+7f0483225d0c94cb3441@syzkaller.appspotmail.com cc: Hawkins Jiawei cc: Khalid Masum cc: Dan Carpenter cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/166135894583.600315.7170979436768124075.stgit@warthog.procyon.org.uk Signed-off-by: Jakub Kicinski net/rxrpc/call_object.c | 4 ++- net/rxrpc/sendmsg.c | 92 +++++++++++++++++++++++++++++-------------------- 2 files changed, 57 insertions(+), 39 deletions(-) commit cb15c7348737c6956652832832d0407f69b2aff3 Merge: 0947ae112108 1800b2ac96d8 Author: Alexei Starovoitov Date: Thu Aug 25 12:07:46 2022 -0700 Merge branch 'Fix incorrect pruning for ARG_CONST_ALLOC_SIZE_OR_ZERO' Kumar Kartikeya Dwivedi says: ==================== A fix for a missing mark_chain_precision call that leads to eager pruning and loading of invalid programs when the more permissive case is in the straight line exploration. Please see the commit log for details, and selftest for an example. ==================== Acked-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit 1800b2ac96d8bc4ccdddc2ea9e83ecaffd54d3f2 Author: Kumar Kartikeya Dwivedi Date: Tue Aug 23 20:55:00 2022 +0200 selftests/bpf: Add regression test for pruning fix Add a test to ensure we do mark_chain_precision for the argument type ARG_CONST_ALLOC_SIZE_OR_ZERO. For other argument types, this was already done, but propagation for missing for this case. Without the fix, this test case loads successfully. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20220823185500.467-1-memxor@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/verifier/precise.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 2fc31465c5373b5ca4edf2e5238558cb62902311 Author: Kumar Kartikeya Dwivedi Date: Tue Aug 23 20:52:59 2022 +0200 bpf: Do mark_chain_precision for ARG_CONST_ALLOC_SIZE_OR_ZERO Precision markers need to be propagated whenever we have an ARG_CONST_* style argument, as the verifier cannot consider imprecise scalars to be equivalent for the purposes of states_equal check when such arguments refine the return value (in this case, set mem_size for PTR_TO_MEM). The resultant mem_size for the R0 is derived from the constant value, and if the verifier incorrectly prunes states considering them equivalent where such arguments exist (by seeing that both registers have reg->precise as false in regsafe), we can end up with invalid programs passing the verifier which can do access beyond what should have been the correct mem_size in that explored state. To show a concrete example of the problem: 0000000000000000 : 0: r2 = *(u32 *)(r1 + 80) 1: r1 = *(u32 *)(r1 + 76) 2: r3 = r1 3: r3 += 4 4: if r3 > r2 goto +18 5: w2 = 0 6: *(u32 *)(r1 + 0) = r2 7: r1 = *(u32 *)(r1 + 0) 8: r2 = 1 9: if w1 == 0 goto +1 10: r2 = -1 0000000000000058 : 11: r1 = 0 ll 13: r3 = 0 14: call bpf_ringbuf_reserve 15: if r0 == 0 goto +7 16: r1 = r0 17: r1 += 16777215 18: w2 = 0 19: *(u8 *)(r1 + 0) = r2 20: r1 = r0 21: r2 = 0 22: call bpf_ringbuf_submit 00000000000000b8 : 23: w0 = 0 24: exit For the first case, the single line execution's exploration will prune the search at insn 14 for the branch insn 9's second leg as it will be verified first using r2 = -1 (UINT_MAX), while as w1 at insn 9 will always be 0 so at runtime we don't get error for being greater than UINT_MAX/4 from bpf_ringbuf_reserve. The verifier during regsafe just sees reg->precise as false for both r2 registers in both states, hence considers them equal for purposes of states_equal. If we propagated precise markers using the backtracking support, we would use the precise marking to then ensure that old r2 (UINT_MAX) was within the new r2 (1) and this would never be true, so the verification would rightfully fail. The end result is that the out of bounds access at instruction 19 would be permitted without this fix. Note that reg->precise is always set to true when user does not have CAP_BPF (or when subprog count is greater than 1 (i.e. use of any static or global functions)), hence this is only a problem when precision marks need to be explicitly propagated (i.e. privileged users with CAP_BPF). A simplified test case has been included in the next patch to prevent future regressions. Fixes: 457f44363a88 ("bpf: Implement BPF ring buffer and verifier support for it") Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20220823185300.406-2-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 3 +++ 1 file changed, 3 insertions(+) commit 40bfe7a86d84cf08ac6a8fe2f0c8bf7a43edd110 Author: Thierry Reding Date: Wed Aug 24 17:32:56 2022 +0200 of/device: Fix up of_dma_configure_id() stub Since the stub version of of_dma_configure_id() was added in commit a081bd4af4ce ("of/device: Add input id to of_dma_configure()"), it has not matched the signature of the full function, leading to build failure reports when code using this function is built on !OF configurations. Fixes: a081bd4af4ce ("of/device: Add input id to of_dma_configure()") Cc: stable@vger.kernel.org Signed-off-by: Thierry Reding Reviewed-by: Frank Rowand Acked-by: Lorenzo Pieralisi Link: https://lore.kernel.org/r/20220824153256.1437483-1-thierry.reding@gmail.com Signed-off-by: Rob Herring include/linux/of_device.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 465d0eb0dc31ae26c05504668d3957db91e99799 Author: Kairui Song Date: Tue Aug 23 19:40:53 2022 +0800 Docs/admin-guide/mm/damon/usage: fix the example code snip The workflow example code is not working since it got the file names wrong. So fix this. Fixes: b18402726bd1 ("Docs/admin-guide/mm/damon/usage: document DAMON sysfs interface") Reviewed-by: SeongJae Park Signed-off-by: Kairui Song Link: https://lore.kernel.org/r/20220823114053.53305-1-ryncsn@gmail.com Signed-off-by: Jonathan Corbet Documentation/admin-guide/mm/damon/usage.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 602684adb42a04858e23248b22d4931b7ef2ad7e Author: Lukas Bulwahn Date: Wed Aug 24 10:08:36 2022 +0200 docs: Update version number from 5.x to 6.x in README.rst A quick 'grep "5\.x" . -R' on Documentation shows that README.rst, 2.Process.rst and applying-patches.rst all mention the version number "5.x" for kernel releases. As the next release will be version 6.0, updating the version number to 6.x in README.rst seems reasonable. The description in 2.Process.rst is just a description of recent kernel releases, it was last updated in the beginning of 2020, and can be revisited at any time on a regular basis, independent of changing the version number from 5 to 6. So, there is no need to update this document now when transitioning from 5.x to 6.x numbering. The document applying-patches.rst is probably obsolete for most users anyway, a reader will sufficiently well understand the steps, even it mentions version 5 rather than version 6. So, do not update that to a version 6.x numbering scheme. Update version number from 5.x to 6.x in README.rst only. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220824080836.23087-1-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet Documentation/admin-guide/README.rst | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit b8983d42524f10ac6bf35bbce6a7cc8e45f61e04 Author: Qu Huang Date: Tue Aug 23 14:44:06 2022 +0800 drm/amdgpu: mmVM_L2_CNTL3 register not initialized correctly The mmVM_L2_CNTL3 register is not assigned an initial value Signed-off-by: Qu Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 1 + 1 file changed, 1 insertion(+) commit 61251b2cffea8c1811bbd2dbef175b65f64aaa86 Author: Likun Gao Date: Tue Aug 23 15:34:10 2022 +0800 drm/amdgpu: add MGCG perfmon setting for gfx11 Enable GFX11 MGCG perfmon setting. V2: set rlc to saft mode before setting. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/soc21.c | 15 +++++++++++++++ 2 files changed, 18 insertions(+) commit ee8086dbc1585d9f4020a19447388246a5cff5c8 Author: Prike Liang Date: Wed Aug 24 11:16:51 2022 +0800 drm/amdkfd: Fix isa version for the GC 10.3.7 Correct the isa version for handling KFD test. Fixes: 7c4f4f197e0c ("drm/amdkfd: Add GC 10.3.6 and 10.3.7 KFD definitions") Signed-off-by: Prike Liang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 894c9c540f8315007a4752320e2399bc2e0c46b7 Author: Mukul Joshi Date: Fri Aug 19 17:15:08 2022 -0400 drm/amdgpu: Fix page table setup on Arcturus When translate_further is enabled, page table depth needs to be updated. This was missing on Arcturus MMHUB init. This was causing address translations to fail for SDMA user-mode queues. Fixes: 352e683b72e7 ("drm/amdgpu: Enable translate_further to extend UTCL2 reach") Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Mukul Joshi Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit da1acbb12b33cbc651d8a7e956d254f1acc5034f Author: Evan Quan Date: Mon Aug 8 10:41:26 2022 +0800 drm/amd/pm: update SMU 13.0.0 driver_if header To fit the latest 78.53 PMFW. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 31 +++++++++++++--------- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- 2 files changed, 19 insertions(+), 14 deletions(-) commit 00047c3d967d7ef8adf8bac3c3579294a3bc0bb1 Author: Tim Huang Date: Mon Aug 22 13:30:44 2022 +0800 drm/amdgpu: add sdma instance check for gfx11 CGCG For some ASICs, like GFX IP v11.0.1, only have one SDMA instance, so not need to configure SDMA1_RLC_CGCG_CTRL for this case. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 4e3464badbeebb3528c457aefe91413f8a9070b6 Author: Roman Li Date: Mon Aug 22 12:37:10 2022 -0400 drm/amd/display: enable PCON support for dcn314 [Why] DCN314 supports PCON. [How] Explicitly enable it in dcn314 resources. Signed-off-by: Roman Li Reviewed-by: Hamza Mahfooz Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 1 + 1 file changed, 1 insertion(+) commit 16c01544e30a4b4cf5f3eaacf7a4c19a3622b597 Author: Tim Huang Date: Mon Aug 15 13:50:46 2022 +0800 drm/amdgpu: enable NBIO IP v7.7.0 Clock Gating Enable AMD_CG_SUPPORT_BIF_MGCG and AMD_CG_SUPPORT_BIF_LS support. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 2037769f995e45d3a368fb74983954b3ed8da178 Author: Tim Huang Date: Mon Aug 15 13:12:21 2022 +0800 drm/amdgpu: add NBIO IP v7.7.0 Clock Gating support Add BIF Clock Gating MGCG and LS support for NBIO IP v7.7.0. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c | 78 ++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) commit ad3b0b99113783f697579c7b09285916019865ea Author: Tim Huang Date: Mon Aug 15 13:03:49 2022 +0800 drm/amdgpu: add TX_POWER_CTRL_1 macro definitions for NBIO IP v7.7.0 Add the BIF0_PCIE_TX_POWER_CTRL_1 register offset and mask macro definitions for AMD_CG_SUPPORT_BIF_LS. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher .../gpu/drm/amd/include/asic_reg/nbio/nbio_7_7_0_offset.h | 2 ++ .../gpu/drm/amd/include/asic_reg/nbio/nbio_7_7_0_sh_mask.h | 13 +++++++++++++ 2 files changed, 15 insertions(+) commit 3f5c20055a640b3758ece75dcaa6ac974fcae26d Merge: a86766c49e80 43626dade36f Author: Linus Torvalds Date: Thu Aug 25 10:52:16 2022 -0700 Merge tag 'cgroup-for-6.0-rc2-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull another cgroup fix from Tejun Heo: "Commit 4f7e7236435c ("cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock") required the cgroup core to grab cpus_read_lock() before invoking ->attach(). Unfortunately, it missed adding cpus_read_lock() in cgroup_attach_task_all(). Fix it" * tag 'cgroup-for-6.0-rc2-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: Add missing cpus_read_lock() to cgroup_attach_task_all() commit 43626dade36fa74d3329046f4ae2d7fdefe401c6 Author: Tetsuo Handa Date: Thu Aug 25 17:38:38 2022 +0900 cgroup: Add missing cpus_read_lock() to cgroup_attach_task_all() syzbot is hitting percpu_rwsem_assert_held(&cpu_hotplug_lock) warning at cpuset_attach() [1], for commit 4f7e7236435ca0ab ("cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock") missed that cpuset_attach() is also called from cgroup_attach_task_all(). Add cpus_read_lock() like what cgroup_procs_write_start() does. Link: https://syzkaller.appspot.com/bug?extid=29d3a3b4d86c8136ad9e [1] Reported-by: syzbot Signed-off-by: Tetsuo Handa Fixes: 4f7e7236435ca0ab ("cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock") Signed-off-by: Tejun Heo kernel/cgroup/cgroup-v1.c | 2 ++ 1 file changed, 2 insertions(+) commit 8531aa1659f7278d4f2ec7408cc000eaa8d85217 Author: Mathias Nyman Date: Thu Aug 25 18:08:40 2022 +0300 Revert "xhci: turn off port power in shutdown" This reverts commit 83810f84ecf11dfc5a9414a8b762c3501b328185. Turning off port power in shutdown did cause issues such as a laptop not proprly powering off, and some specific usb devies failing to enumerate the subsequent boot after a warm reset. So revert this. Fixes: 83810f84ecf1 ("xhci: turn off port power in shutdown") Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20220825150840.132216-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 2 +- drivers/usb/host/xhci.c | 15 ++------------- drivers/usb/host/xhci.h | 2 -- 3 files changed, 3 insertions(+), 16 deletions(-) commit 33e321586e37b642ad10594b9ef25a613555cd08 Author: Mathias Nyman Date: Thu Aug 25 18:08:39 2022 +0300 xhci: Add grace period after xHC start to prevent premature runtime suspend. After xHC controller is started, either in probe or resume, it can take a while before any of the connected usb devices are visible to the roothub due to link training. It's possible xhci driver loads, sees no acivity and suspends the host before the USB device is visible. In one testcase with a hotplugged xHC controller the host finally detected the connected USB device and generated a wake 500ms after host initial start. If hosts didn't suspend the device duringe training it probablty wouldn't take up to 500ms to detect it, but looking at specs reveal USB3 link training has a couple long timeout values, such as 120ms RxDetectQuietTimeout, and 360ms PollingLFPSTimeout. So Add a 500ms grace period that keeps polling the roothub for 500ms after start, preventing runtime suspend until USB devices are detected. Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20220825150840.132216-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 11 +++++++++++ drivers/usb/host/xhci.c | 4 +++- drivers/usb/host/xhci.h | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) commit 4a593a62a9e3a25ab4bc37f612e4edec144f7f43 Author: Mathias Nyman Date: Thu Aug 25 18:08:38 2022 +0300 xhci: Fix null pointer dereference in remove if xHC has only one roothub The remove path in xhci platform driver tries to remove and put both main and shared hcds even if only a main hcd exists (one roothub) This causes a null pointer dereference in reboot for those controllers. Check that the shared_hcd exists before trying to remove it. Fixes: e0fe986972f5 ("usb: host: xhci-plat: prepare operation w/o shared hcd") Reported-by: Alexey Sheplyakov Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20220825150840.132216-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit eeda05b5e92f51d9a09646ecb493f0a1e872a6ef Author: AngeloGioacchino Del Regno Date: Thu Jul 21 19:27:27 2022 +0200 drm/mediatek: dsi: Add atomic {destroy,duplicate}_state, reset callbacks Add callbacks for atomic_destroy_state, atomic_duplicate_state and atomic_reset to restore functionality of the DSI driver: this solves vblank timeouts when another bridge is present in the chain. Tested bridge chain: DSI <=> ANX7625 => aux-bus panel Fixes: 7f6335c6a258 ("drm/mediatek: Modify dsi funcs to atomic operations") Signed-off-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220721172727.14624-1-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dsi.c | 3 +++ 1 file changed, 3 insertions(+) commit c5deb27895e017a0267de0a20d140ad5fcc55a54 Author: Juergen Gross Date: Thu Aug 25 16:19:18 2022 +0200 xen/privcmd: fix error exit of privcmd_ioctl_dm_op() The error exit of privcmd_ioctl_dm_op() is calling unlock_pages() potentially with pages being NULL, leading to a NULL dereference. Additionally lock_pages() doesn't check for pin_user_pages_fast() having been completely successful, resulting in potentially not locking all pages into memory. This could result in sporadic failures when using the related memory in user mode. Fix all of that by calling unlock_pages() always with the real number of pinned pages, which will be zero in case pages being NULL, and by checking the number of pages pinned by pin_user_pages_fast() matching the expected number of pages. Cc: Fixes: ab520be8cd5d ("xen/privcmd: Add IOCTL_PRIVCMD_DM_OP") Reported-by: Rustam Subkhankulov Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Reviewed-by: Oleksandr Tyshchenko Link: https://lore.kernel.org/r/20220825141918.3581-1-jgross@suse.com Signed-off-by: Juergen Gross drivers/xen/privcmd.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 00da0cb385d05a89226e150a102eb49d8abb0359 Author: Salvatore Bonaccorso Date: Mon Aug 1 11:15:30 2022 +0200 Documentation/ABI: Mention retbleed vulnerability info file for sysfs While reporting for the AMD retbleed vulnerability was added in 6b80b59b3555 ("x86/bugs: Report AMD retbleed vulnerability") the new sysfs file was not mentioned so far in the ABI documentation for sysfs-devices-system-cpu. Fix that. Fixes: 6b80b59b3555 ("x86/bugs: Report AMD retbleed vulnerability") Signed-off-by: Salvatore Bonaccorso Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20220801091529.325327-1-carnil@debian.org Documentation/ABI/testing/sysfs-devices-system-cpu | 1 + 1 file changed, 1 insertion(+) commit c93c296fff6b369a7115916145047c8a3db6e27f Author: Borislav Petkov Date: Wed Aug 24 17:13:26 2022 +0200 x86/sev: Mark snp_abort() noreturn Mark both the function prototype and definition as noreturn in order to prevent the compiler from doing transformations which confuse objtool like so: vmlinux.o: warning: objtool: sme_enable+0x71: unreachable instruction This triggers with gcc-12. Add it and sev_es_terminate() to the objtool noreturn tracking array too. Sort it while at it. Suggested-by: Michael Matz Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20220824152420.20547-1-bp@alien8.de arch/x86/include/asm/sev.h | 2 +- arch/x86/kernel/sev.c | 2 +- tools/objtool/check.c | 34 ++++++++++++++++++---------------- 3 files changed, 20 insertions(+), 18 deletions(-) commit 581711c46612c1fd7f98960f9ad53f04fdb89853 Author: Pavel Begunkov Date: Wed Aug 24 13:07:43 2022 +0100 io_uring/net: save address for sendzc async execution We usually copy all bits that a request needs from the userspace for async execution, so the userspace can keep them on the stack. However, send zerocopy violates this pattern for addresses and may reloads it e.g. from io-wq. Save the address if any in ->async_data as usual. Reported-by: Stefan Metzmacher Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d7512d7aa9abcd36e9afe1a4d292a24cb2d157e5.1661342812.git.asml.silence@gmail.com [axboe: fold in incremental fix] Signed-off-by: Jens Axboe io_uring/net.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++------- io_uring/net.h | 1 + io_uring/opdef.c | 4 +++- 3 files changed, 50 insertions(+), 8 deletions(-) commit b1cd3fd42db7593a2d24c06f1c53b8c886592080 Author: Shengjiu Wang Date: Thu Aug 25 20:27:40 2022 +0800 ASoC: fsl_aud2htx: Add error handler for pm_runtime_enable Call pm_runtime_disable() when error happens in probe() Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1661430460-5234-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_aud2htx.c | 2 ++ 1 file changed, 2 insertions(+) commit ea532c29972df96fda20393d9bf057e898f5e965 Author: Shengjiu Wang Date: Thu Aug 25 20:27:39 2022 +0800 ASoC: fsl_aud2htx: register platform component before registering cpu dai There is no defer probe when adding platform component to snd_soc_pcm_runtime(rtd), the code is in snd_soc_add_pcm_runtime() snd_soc_register_card() -> snd_soc_bind_card() -> snd_soc_add_pcm_runtime() -> adding cpu dai -> adding codec dai -> adding platform component. So if the platform component is not ready at that time, then the sound card still registered successfully, but platform component is empty, the sound card can't be used. As there is defer probe checking for cpu dai component, then register platform component before cpu dai to avoid such issue. And the behavior of imx_pcm_dma_init() is same as common devm_snd_dmaengine_pcm_register(), so use devm_snd_dmaengine_pcm_register() instead Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1661430460-5234-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_aud2htx.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 1ff89e06c2e5fab30274e4b02360d4241d6e605e Author: Daniel J. Ogorchock Date: Wed Jul 13 16:20:59 2022 -0400 HID: nintendo: fix rumble worker null pointer deref We can dereference a null pointer trying to queue work to a destroyed workqueue. If the device is disconnected, nintendo_hid_remove is called, in which the rumble_queue is destroyed. Avoid using that queue to defer rumble work once the controller state is set to JOYCON_CTLR_STATE_REMOVED. This eliminates the null pointer dereference. Signed-off-by: Daniel J. Ogorchock Signed-off-by: Jiri Kosina drivers/hid/hid-nintendo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 41ac42f137080bc230b5882e3c88c392ab7f2d32 Author: Gerald Schaefer Date: Wed Aug 17 15:26:03 2022 +0200 s390/mm: do not trigger write fault when vma does not allow VM_WRITE For non-protection pXd_none() page faults in do_dat_exception(), we call do_exception() with access == (VM_READ | VM_WRITE | VM_EXEC). In do_exception(), vma->vm_flags is checked against that before calling handle_mm_fault(). Since commit 92f842eac7ee3 ("[S390] store indication fault optimization"), we call handle_mm_fault() with FAULT_FLAG_WRITE, when recognizing that it was a write access. However, the vma flags check is still only checking against (VM_READ | VM_WRITE | VM_EXEC), and therefore also calling handle_mm_fault() with FAULT_FLAG_WRITE in cases where the vma does not allow VM_WRITE. Fix this by changing access check in do_exception() to VM_WRITE only, when recognizing write access. Link: https://lkml.kernel.org/r/20220811103435.188481-3-david@redhat.com Fixes: 92f842eac7ee3 ("[S390] store indication fault optimization") Cc: Reported-by: David Hildenbrand Reviewed-by: Heiko Carstens Signed-off-by: Gerald Schaefer Signed-off-by: Vasily Gorbik arch/s390/mm/fault.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 13cccafe0edcd03bf1c841de8ab8a1c8e34f77d9 Author: Brian Foster Date: Tue Aug 16 11:54:07 2022 -0400 s390: fix double free of GS and RI CBs on fork() failure The pointers for guarded storage and runtime instrumentation control blocks are stored in the thread_struct of the associated task. These pointers are initially copied on fork() via arch_dup_task_struct() and then cleared via copy_thread() before fork() returns. If fork() happens to fail after the initial task dup and before copy_thread(), the newly allocated task and associated thread_struct memory are freed via free_task() -> arch_release_task_struct(). This results in a double free of the guarded storage and runtime info structs because the fields in the failed task still refer to memory associated with the source task. This problem can manifest as a BUG_ON() in set_freepointer() (with CONFIG_SLAB_FREELIST_HARDENED enabled) or KASAN splat (if enabled) when running trinity syscall fuzz tests on s390x. To avoid this problem, clear the associated pointer fields in arch_dup_task_struct() immediately after the new task is copied. Note that the RI flag is still cleared in copy_thread() because it resides in thread stack memory and that is where stack info is copied. Signed-off-by: Brian Foster Fixes: 8d9047f8b967c ("s390/runtime instrumentation: simplify task exit handling") Fixes: 7b83c6297d2fc ("s390/guarded storage: simplify task exit handling") Cc: # 4.15 Reviewed-by: Gerald Schaefer Reviewed-by: Heiko Carstens Link: https://lore.kernel.org/r/20220816155407.537372-1-bfoster@redhat.com Signed-off-by: Vasily Gorbik arch/s390/kernel/process.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 467249a7dff68451868ca79696aef69764193a8a Author: Even Xu Date: Tue Aug 23 09:10:59 2022 +0800 HID: intel-ish-hid: ipc: Add Meteor Lake PCI device ID Add device ID of Meteor Lake P into ishtp support list. Signed-off-by: Even Xu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/hw-ish.h | 1 + drivers/hid/intel-ish-hid/ipc/pci-ish.c | 1 + 2 files changed, 2 insertions(+) commit b871656aa4f54e04207f62bdd0d7572be1d86b36 Author: João H. Spies Date: Mon Aug 8 02:51:20 2022 +0000 pinctrl: rockchip: Enhance support for IRQ_TYPE_EDGE_BOTH Switching between falling/rising edges for IRQ_TYPE_EDGE_BOTH on pins that require debounce can cause the device to lose events due to a desync between pin state and irq type. This problem is resolved by switching between IRQ_TYPE_LEVEL_LOW and IRQ_TYPE_LEVEL_HIGH instead. Fixes: 936ee2675eee ("gpio/rockchip: add driver for rockchip gpio") Signed-off-by: João H. Spies Link: https://lore.kernel.org/r/20220808025121.110223-1-jhlspies@gmail.com Signed-off-by: Linus Walleij drivers/gpio/gpio-rockchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6bb79f5b4c84a09cd6bed46ef3e46ef4fc21407d Author: Wolfram Sang Date: Thu Aug 18 23:01:22 2022 +0200 xen: move from strlcpy with unused retval to strscpy Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang Reviewed-by: Oleksandr Tyshchenko Link: https://lore.kernel.org/r/20220818210122.7613-1-wsa+renesas@sang-engineering.com Signed-off-by: Juergen Gross drivers/xen/xen-scsiback.c | 2 +- drivers/xen/xenbus/xenbus_probe_frontend.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ab0af755d40f2ea4ef01503e7bebf083f65c9062 Author: Lukas Bulwahn Date: Wed Aug 17 06:43:33 2022 +0200 xen: x86: remove setting the obsolete config XEN_MAX_DOMAIN_MEMORY Commit c70727a5bc18 ("xen: allow more than 512 GB of RAM for 64 bit pv-domains") from July 2015 replaces the config XEN_MAX_DOMAIN_MEMORY with a new config XEN_512GB, but misses to adjust arch/x86/configs/xen.config. As XEN_512GB defaults to yes, there is no need to explicitly set any config in xen.config. Just remove setting the obsolete config XEN_MAX_DOMAIN_MEMORY. Signed-off-by: Lukas Bulwahn Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20220817044333.22310-1-lukas.bulwahn@gmail.com Signed-off-by: Juergen Gross arch/x86/configs/xen.config | 1 - 1 file changed, 1 deletion(-) commit b83699ea1e62951857c2d8648bd93a4744899eb7 Author: Huacai Chen Date: Thu Aug 25 19:34:59 2022 +0800 LoongArch: mm: Avoid unnecessary page fault retires on shared memory types Commit d92725256b4f22d0 ("mm: avoid unnecessary page fault retires on shared memory types") modifies do_page_fault() to handle the VM_FAULT_ COMPLETED case, but forget to change for LoongArch, so fix it as other architectures does. Fixes: d92725256b4f22d0 ("mm: avoid unnecessary page fault retires on shared memory types") Reviewed-by: Guo Ren Signed-off-by: Huacai Chen arch/loongarch/mm/fault.c | 4 ++++ 1 file changed, 4 insertions(+) commit 720dc7ab252bbdf404cab7b909e26b31e602bf7e Author: Huacai Chen Date: Thu Aug 25 19:34:59 2022 +0800 LoongArch: Add subword xchg/cmpxchg emulation LoongArch only support 32-bit/64-bit xchg/cmpxchg in native. But percpu operation, qspinlock and some drivers need 8-bit/16-bit xchg/cmpxchg. We add subword xchg/cmpxchg emulation in this patch because the emulation has better performance than the generic implementation (on NUMA system), and it can fix some build errors meanwhile [1]. LoongArch's guarantee for forward progress (avoid many ll/sc happening at the same time and no one succeeds): We have the "exclusive access (with timeout) of ll" feature to avoid simultaneous ll (which also blocks other memory load/store on the same address), and the "random delay of sc" feature to avoid simultaneous sc. It is a mandatory requirement for multi-core LoongArch processors to implement such features, only except those single-core and dual-core processors (they also don't support multi-chip interconnection). Feature bits are introduced in CPUCFG3, bit 3 and bit 4 [2]. [1] https://lore.kernel.org/loongarch/CAAhV-H6vvkuOzy8OemWdYK3taj5Jn3bFX0ZTwE=twM8ywpBUYA@mail.gmail.com/T/#t [2] https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#_cpucfg Reported-by: Sudip Mukherjee (Codethink) Suggested-by: Linus Torvalds Signed-off-by: Rui Wang Signed-off-by: Huacai Chen arch/loongarch/include/asm/cmpxchg.h | 98 +++++++++++++++++++++++++++++++++++- arch/loongarch/include/asm/percpu.h | 8 +++ 2 files changed, 105 insertions(+), 1 deletion(-) commit 092e9ebe52a664f9f58e2d24136ae791fe71c6db Author: Huacai Chen Date: Thu Aug 25 19:34:59 2022 +0800 LoongArch: Cleanup headers to avoid circular dependency When enable GENERIC_IOREMAP, there will be circular dependency to cause build errors. The root cause is that pgtable.h shouldn't include io.h but pgtable.h need some macros defined in io.h. So cleanup those macros and remove the unnecessary inclusions, as other architectures do. Signed-off-by: Huacai Chen arch/loongarch/include/asm/addrspace.h | 16 ++++++++++++++++ arch/loongarch/include/asm/io.h | 19 ------------------- arch/loongarch/include/asm/page.h | 2 +- arch/loongarch/include/asm/pgtable.h | 7 +++---- arch/loongarch/mm/mmap.c | 11 ++--------- 5 files changed, 22 insertions(+), 33 deletions(-) commit da48b67cfb6b4f115ae652dd5995c56fe2a2cf9b Author: Huacai Chen Date: Thu Aug 25 19:34:59 2022 +0800 LoongArch: Cleanup reset routines with new API Cleanup reset routines by using new do_kernel_power_off() instead of old pm_power_off(), and then simplify the whole file (reset.c) organization by inlining some functions. This cleanup also fix a poweroff error if EFI runtime is disabled. Signed-off-by: Huacai Chen arch/loongarch/include/asm/reboot.h | 10 ------ arch/loongarch/kernel/reset.c | 69 +++++++++++-------------------------- 2 files changed, 21 insertions(+), 58 deletions(-) commit 84e762060147582912581fd99cb25f3559ec8c22 Author: Huacai Chen Date: Thu Aug 25 19:34:59 2022 +0800 LoongArch: Fix build warnings in VDSO Fix build warnings in VDSO as below: arch/loongarch/vdso/vgettimeofday.c:9:5: warning: no previous prototype for '__vdso_clock_gettime' [-Wmissing-prototypes] 9 | int __vdso_clock_gettime(clockid_t clock, | ^~~~~~~~~~~~~~~~~~~~ arch/loongarch/vdso/vgettimeofday.c:15:5: warning: no previous prototype for '__vdso_gettimeofday' [-Wmissing-prototypes] 15 | int __vdso_gettimeofday(struct __kernel_old_timeval *tv, | ^~~~~~~~~~~~~~~~~~~ arch/loongarch/vdso/vgettimeofday.c:21:5: warning: no previous prototype for '__vdso_clock_getres' [-Wmissing-prototypes] 21 | int __vdso_clock_getres(clockid_t clock_id, | ^~~~~~~~~~~~~~~~~~~ arch/loongarch/vdso/vgetcpu.c:27:5: warning: no previous prototype for '__vdso_getcpu' [-Wmissing-prototypes] 27 | int __vdso_getcpu(unsigned int *cpu, unsigned int *node, struct getcpu_cache *unused) Reported-by: kernel test robot Signed-off-by: Huacai Chen arch/loongarch/vdso/vgetcpu.c | 2 ++ arch/loongarch/vdso/vgettimeofday.c | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) commit 7c12bb8f59d36507bf70c35dae083dfe9cafc815 Author: Huacai Chen Date: Thu Aug 25 19:34:59 2022 +0800 LoongArch: Select PCI_QUIRKS to avoid build error PCI_LOONGSON is a mandatory for LoongArch and it is selected in Kconfig unconditionally, but its dependency PCI_QUIRKS is missing and may cause a build error when "make randconfig": arch/loongarch/pci/acpi.c: In function 'pci_acpi_setup_ecam_mapping': >> arch/loongarch/pci/acpi.c:103:29: error: 'loongson_pci_ecam_ops' undeclared (first use in this function) 103 | ecam_ops = &loongson_pci_ecam_ops; | ^~~~~~~~~~~~~~~~~~~~~ arch/loongarch/pci/acpi.c:103:29: note: each undeclared identifier is reported only once for each function it appears in Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PCI_LOONGSON Depends on [n]: PCI [=y] && (MACH_LOONGSON64 [=y] || COMPILE_TEST [=y]) && (OF [=y] || ACPI [=y]) && PCI_QUIRKS [=n] Selected by [y]: - LOONGARCH [=y] Fix it by selecting PCI_QUIRKS unconditionally, too. Reported-by: kernel test robot Tested-by: Randy Dunlap Signed-off-by: Huacai Chen arch/loongarch/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 78e1e867f44e6bdc72c0e6a2609a3407642fb30b Author: Xiaolei Wang Date: Thu Aug 25 19:19:22 2022 +0800 regulator: pfuze100: Fix the global-out-of-bounds access in pfuze100_regulator_probe() The pfuze_chip::regulator_descs is an array of size PFUZE100_MAX_REGULATOR, the pfuze_chip::pfuze_regulators is the pointer to the real regulators of a specific device. The number of real regulator is supposed to be less than the PFUZE100_MAX_REGULATOR, so we should use the size of 'regulator_num * sizeof(struct pfuze_regulator)' in memcpy(). This fixes the out of bounds access bug reported by KASAN. Signed-off-by: Xiaolei Wang Link: https://lore.kernel.org/r/20220825111922.1368055-1-xiaolei.wang@windriver.com Signed-off-by: Mark Brown drivers/regulator/pfuze100-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd9594ae4c55351f134620ab890259820abf4c43 Author: Sakari Ailus Date: Thu Aug 25 14:17:15 2022 +0300 ACPI: property: Remove default association from integer maximum values Remove the default association from integer maximum value checks. It is not necessary and has caused a bug in other associations being unnoticed. Fixes: 923044133367 ("ACPI: property: Unify integer value reading functions") Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2ea3b19792dbe32287b0c48f3ff7e866f61967c7 Author: Sakari Ailus Date: Wed Aug 24 14:59:56 2022 +0300 ACPI: property: Ignore already existing data node tags ACPI node pointers are attached to data node handles, in order to resolve string references to them. _DSD guide allows the same node to be reached from multiple parent nodes, leading the node enumeration algorithm to each such nodes more than once. As attached data already already exists, attaching data with the same tag will fail. Address this problem by ignoring nodes that have been already tagged. Fixes: 1d52f10917a7 ("ACPI: property: Tie data nodes to acpi handles") Reported-by: Pierre-Louis Bossart Signed-off-by: Sakari Ailus Tested-by: Pierre-Louis Bossart Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06865077b34c792181e3c4f82417a2888c6e7453 Author: Stefan Binding Date: Fri Aug 12 14:06:45 2022 +0100 ACPI: property: Fix type detection of unified integer reading functions The current code expects the type of the value to be an integer type, instead the value passed to the macro is a pointer. Ensure the size comparison uses the correct pointer type to choose the max value, instead of using the integer type. Fixes: 923044133367 ("ACPI: property: Unify integer value reading functions") Signed-off-by: Stefan Binding Reviewed-by: Sakari Ailus Tested-by: Sakari Ailus Tested-by: John Garry Acked-by: Ard Biesheuvel Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0cf731f9ebb5bf6f252055bebf4463a5c0bd490b Author: Lorenzo Bianconi Date: Tue Aug 23 14:24:07 2022 +0200 net: ethernet: mtk_eth_soc: fix hw hash reporting for MTK_NETSYS_V2 Properly report hw rx hash for mt7986 chipset accroding to the new dma descriptor layout. Fixes: 197c9e9b17b11 ("net: ethernet: mtk_eth_soc: introduce support for mt7986 chipset") Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/091394ea4e705fbb35f828011d98d0ba33808f69.1661257293.git.lorenzo@kernel.org Signed-off-by: Paolo Abeni drivers/net/ethernet/mediatek/mtk_eth_soc.c | 22 ++++++++++++---------- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 5 +++++ 2 files changed, 17 insertions(+), 10 deletions(-) commit a3f7c10a269d5b77dd5822ade822643ced3057f0 Author: Christian König Date: Wed Aug 10 19:26:17 2022 +0200 dma-buf/dma-resv: check if the new fence is really later Previously when we added a fence to a dma_resv object we always assumed the the newer than all the existing fences. With Jason's work to add an UAPI to explicit export/import that's not necessary the case any more. So without this check we would allow userspace to force the kernel into an use after free error. Since the change is very small and defensive it's probably a good idea to backport this to stable kernels as well just in case others are using the dma_resv object in the same way. Signed-off-by: Christian König Reviewed-by: Jason Ekstrand Link: https://patchwork.freedesktop.org/patch/msgid/20220810172617.140047-1-christian.koenig@amd.com Cc: stable@vger.kernel.org # v5.19+ drivers/dma-buf/dma-resv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8db8be9cfc89935c97d791c7e6264e710a7e8a56 Author: Benjamin Tissoires Date: Mon Aug 22 08:22:47 2022 +0200 HID: input: fix uclogic tablets commit 87562fcd1342 ("HID: input: remove the need for HID_QUIRK_INVERT") made the assumption that it was the only one handling tablets and thus kept an internal state regarding the tool. Turns out that the uclogic driver has a timer to release the in range bit, effectively making hid-input ignoring all in range information after the very first one. Fix that by having a more rationale approach which consists in forwarding every event and let the input stack filter out the duplicates. Reported-by: Stefan Hansson Fixes: 87562fcd1342 ("HID: input: remove the need for HID_QUIRK_INVERT") Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-input.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 750ec977288d96e9a11424e3507ede097af732c4 Author: Aditya Garg Date: Sun Aug 21 08:04:45 2022 +0000 HID: Add Apple Touchbar on T2 Macs in hid_have_special_driver list The touchbar on Apple T2 Macs has 2 modes, one that shows the function keys and other that shows the media controls. The user can use the fn key on his keyboard to switch between the 2 modes. On Linux, if people were using an external keyboard or mouse, the touchbar failed to change modes on pressing the fn key with the following in dmesg :- [ 10.661445] apple-ib-als 0003:05AC:8262.0001: : USB HID v1.01 Device [Apple Inc. Ambient Light Sensor] on usb-bce-vhci-3/input0 [ 11.830992] apple-ib-touchbar 0003:05AC:8302.0007: input: USB HID v1.01 Keyboard [Apple Inc. Touch Bar Display] on usb-bce-vhci-6/input0 [ 12.139407] apple-ib-touchbar 0003:05AC:8102.0008: : USB HID v1.01 Device [Apple Inc. Touch Bar Backlight] on usb-bce-vhci-7/input0 [ 12.211824] apple-ib-touchbar 0003:05AC:8102.0009: : USB HID v1.01 Device [Apple Inc. Touch Bar Backlight] on usb-bce-vhci-7/input1 [ 14.219759] apple-ib-touchbar 0003:05AC:8302.0007: tb: Failed to set touch bar mode to 2 (-110) [ 24.395670] apple-ib-touchbar 0003:05AC:8302.0007: tb: Failed to set touch bar mode to 2 (-110) [ 34.635791] apple-ib-touchbar 0003:05AC:8302.0007: tb: Failed to set touch bar mode to 2 (-110) [ 269.579233] apple-ib-touchbar 0003:05AC:8302.0007: tb: Failed to set touch bar mode to 1 (-110) Add the USB IDs of the touchbar found in T2 Macs to HID have special driver list to fix the issue. Signed-off-by: Aditya Garg Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 2 ++ drivers/hid/hid-quirks.c | 2 ++ 2 files changed, 4 insertions(+) commit 3a47fa7b14c7d9613909a844aba27f99d3c58634 Author: Steev Klimaszewski Date: Thu Aug 18 21:39:24 2022 -0500 HID: add Lenovo Yoga C630 battery quirk Similar to the Surface Go devices, the Elantech touchscreen/digitizer in the Lenovo Yoga C630 mistakenly reports the battery of the stylus, and always reports an empty battery. Apply the HID_BATTERY_QUIRK_IGNORE quirk to ignore this battery and prevent the erroneous low battery warnings. Signed-off-by: Steev Klimaszewski Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/hid-input.c | 2 ++ 2 files changed, 3 insertions(+) commit adada3f4930ac084740ea340bd8e94028eba4f22 Author: Akihiko Odaki Date: Tue Aug 16 19:21:20 2022 +0900 HID: AMD_SFH: Add a DMI quirk entry for Chromebooks Google Chromebooks use Chrome OS Embedded Controller Sensor Hub instead of Sensor Hub Fusion and leaves MP2 uninitialized, which disables all functionalities, even including the registers necessary for feature detections. The behavior was observed with Lenovo ThinkPad C13 Yoga. Signed-off-by: Akihiko Odaki Suggested-by: Mario Limonciello Acked-by: Basavaraj Natikar Signed-off-by: Jiri Kosina drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit eccd7439709810127563e7e3e49b8b44c7b2791d Author: Jens Wiklander Date: Mon Aug 22 07:43:35 2022 +0200 tee: fix compiler warning in tee_shm_register() Include to avoid the warning: drivers/tee/tee_shm.c: In function 'tee_shm_register': >> drivers/tee/tee_shm.c:242:14: error: implicit declaration of function 'access_ok' [-Werror=implicit-function-declaration] 242 | if (!access_ok((void __user *)addr, length)) | ^~~~~~~~~ cc1: some warnings being treated as errors Fixes: 573ae4f13f63 ("tee: add overflow check in register_shm_helper()") Reviewed-by: Sumit Garg Reported-by: kernel test robot Signed-off-by: Jens Wiklander drivers/tee/tee_shm.c | 1 + 1 file changed, 1 insertion(+) commit d9a17651f3749e69890db57ca66e677dfee70829 Author: Michael Hübner Date: Fri Aug 5 10:05:23 2022 +0200 HID: thrustmaster: Add sparco wheel and fix array length Add device id for the Sparco R383 Mod wheel. Fix wheel info array length to match actual wheel count present in the array. Signed-off-by: Michael Hübner Signed-off-by: Jiri Kosina drivers/hid/hid-thrustmaster.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e1fa076706209cc447d7a2abd0843a18277e5ef7 Author: Even Xu Date: Thu Aug 4 08:59:19 2022 +0800 hid: intel-ish-hid: ishtp: Fix ishtp client sending disordered message There is a timing issue captured during ishtp client sending stress tests. It was observed during stress tests that ISH firmware is getting out of ordered messages. This is a rare scenario as the current set of ISH client drivers don't send much data to firmware. But this may not be the case going forward. When message size is bigger than IPC MTU, ishtp splits the message into fragments and uses serialized async method to send message fragments. The call stack: ishtp_cl_send_msg_ipc->ipc_tx_callback(first fregment)-> ishtp_send_msg(with callback)->write_ipc_to_queue-> write_ipc_from_queue->callback->ipc_tx_callback(next fregment)...... When an ipc write complete interrupt is received, driver also calls write_ipc_from_queue->ipc_tx_callback in ISR to start sending of next fragment. Through ipc_tx_callback uses spin_lock to protect message splitting, as the serialized sending method will call back to ipc_tx_callback again, so it doesn't put sending under spin_lock, it causes driver cannot guarantee all fragments be sent in order. Considering this scenario: ipc_tx_callback just finished a fragment splitting, and not call ishtp_send_msg yet, there is a write complete interrupt happens, then ISR->write_ipc_from_queue ->ipc_tx_callback->ishtp_send_msg->write_ipc_to_queue...... Because ISR has higher exec priority than normal thread, this causes the new fragment be sent out before previous fragment. This disordered message causes invalid message to firmware. The solution is, to send fragments synchronously: Use ishtp_write_message writing fragments into tx queue directly one by one, instead of ishtp_send_msg only writing one fragment with completion callback. As no completion callback be used, so change ipc_tx_callback to ipc_tx_send. Signed-off-by: Even Xu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp/client.c | 68 ++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 29 deletions(-) commit 94553f8a218540d676efbf3f7827ed493d1057cf Author: Jason Wang Date: Thu Aug 4 08:58:14 2022 +0800 HID: ishtp-hid-clientHID: ishtp-hid-client: Fix comment typo The double `like' is duplicated in the comment, remove one. Signed-off-by: Jason Wang Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp-hid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c0cc9d11c665020cbeb80e660fb8929164407f4 Author: Josh Kilmer Date: Thu Jul 28 12:51:11 2022 -0500 HID: asus: ROG NKey: Ignore portion of 0x5a report On an Asus G513QY, of the 5 bytes in a 0x5a report, only the first byte is a meaningful keycode. The other bytes are zeroed out or hold garbage from the last packet sent to the keyboard. This patch fixes up the report descriptor for this event so that the general hid code will only process 1 byte for keycodes, avoiding spurious key events and unmapped Asus vendor usagepage code warnings. Signed-off-by: Josh Kilmer Signed-off-by: Jiri Kosina drivers/hid/hid-asus.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a5623a203cffe2d2b84d2f6c989d9017db1856af Author: Karthik Alapati Date: Thu Jul 28 21:13:17 2022 +0530 HID: hidraw: fix memory leak in hidraw_release() Free the buffered reports before deleting the list entry. BUG: memory leak unreferenced object 0xffff88810e72f180 (size 32): comm "softirq", pid 0, jiffies 4294945143 (age 16.080s) hex dump (first 32 bytes): 64 f3 c6 6a d1 88 07 04 00 00 00 00 00 00 00 00 d..j............ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] kmemdup+0x23/0x50 mm/util.c:128 [] kmemdup include/linux/fortify-string.h:440 [inline] [] hidraw_report_event+0xa2/0x150 drivers/hid/hidraw.c:521 [] hid_report_raw_event+0x27d/0x740 drivers/hid/hid-core.c:1992 [] hid_input_report+0x1ae/0x270 drivers/hid/hid-core.c:2065 [] hid_irq_in+0x1ff/0x250 drivers/hid/usbhid/hid-core.c:284 [] __usb_hcd_giveback_urb+0xf9/0x230 drivers/usb/core/hcd.c:1670 [] usb_hcd_giveback_urb+0x1b6/0x1d0 drivers/usb/core/hcd.c:1747 [] dummy_timer+0x8e4/0x14c0 drivers/usb/gadget/udc/dummy_hcd.c:1988 [] call_timer_fn+0x38/0x200 kernel/time/timer.c:1474 [] expire_timers kernel/time/timer.c:1519 [inline] [] __run_timers.part.0+0x316/0x430 kernel/time/timer.c:1790 [] __run_timers kernel/time/timer.c:1768 [inline] [] run_timer_softirq+0x44/0x90 kernel/time/timer.c:1803 [] __do_softirq+0xe6/0x2ea kernel/softirq.c:571 [] invoke_softirq kernel/softirq.c:445 [inline] [] __irq_exit_rcu kernel/softirq.c:650 [inline] [] irq_exit_rcu+0xc0/0x110 kernel/softirq.c:662 [] sysvec_apic_timer_interrupt+0xa2/0xd0 arch/x86/kernel/apic/apic.c:1106 [] asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:649 [] native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline] [] arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline] [] acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline] [] acpi_idle_do_entry+0xc0/0xd0 drivers/acpi/processor_idle.c:554 Link: https://syzkaller.appspot.com/bug?id=19a04b43c75ed1092021010419b5e560a8172c4f Reported-by: syzbot+f59100a0428e6ded9443@syzkaller.appspotmail.com Signed-off-by: Karthik Alapati Signed-off-by: Jiri Kosina drivers/hid/hidraw.c | 2 ++ 1 file changed, 2 insertions(+) commit 1a3887924a7e6edd331be76da7bf4c1e8eab4b1e Author: Ard Biesheuvel Date: Mon Aug 22 19:20:33 2022 +0200 efi: libstub: Disable struct randomization The EFI stub is a wrapper around the core kernel that makes it look like a EFI compatible PE/COFF application to the EFI firmware. EFI applications run on top of the EFI runtime, which is heavily based on so-called protocols, which are struct types consisting [mostly] of function pointer members that are instantiated and recorded in a protocol database. These structs look like the ideal randomization candidates to the randstruct plugin (as they only carry function pointers), but of course, these protocols are contracts between the firmware that exposes them, and the EFI applications (including our stubbed kernel) that invoke them. This means that struct randomization for EFI protocols is not a great idea, and given that the stub shares very little data with the core kernel that is represented as a randomizable struct, we're better off just disabling it completely here. Cc: # v4.14+ Reported-by: Daniel Marth Tested-by: Daniel Marth Signed-off-by: Ard Biesheuvel Acked-by: Kees Cook drivers/firmware/efi/libstub/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) commit cd11d1a6114bd4bc6450ae59f6e110ec47362126 Author: Lee Jones Date: Fri Jul 8 08:40:09 2022 +0100 HID: steam: Prevent NULL pointer dereference in steam_{recv,send}_report It is possible for a malicious device to forgo submitting a Feature Report. The HID Steam driver presently makes no prevision for this and de-references the 'struct hid_report' pointer obtained from the HID devices without first checking its validity. Let's change that. Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Fixes: c164d6abf3841 ("HID: add driver for Valve Steam Controller") Signed-off-by: Lee Jones Signed-off-by: Jiri Kosina drivers/hid/hid-steam.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 55f0a4894484e8d6ddf662f5aebbf3b4cb028541 Author: Dan Carpenter Date: Thu Jul 28 17:25:16 2022 +0300 wifi: mac80211: potential NULL dereference in ieee80211_tx_control_port() The ieee80211_lookup_ra_sta() function will sometimes set "sta" to NULL so add this NULL check to prevent an Oops. Fixes: 9dd1953846c7 ("wifi: nl80211/mac80211: clarify link ID in control port TX") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YuKcTAyO94YOy0Bu@kili Signed-off-by: Johannes Berg net/mac80211/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d776763f48084926b5d9e25507a3ddb7c9243d5e Author: Dan Carpenter Date: Thu Aug 4 10:03:21 2022 +0300 wifi: cfg80211: debugfs: fix return type in ht40allow_map_read() The return type is supposed to be ssize_t, which is signed long, but "r" was declared as unsigned int. This means that on 64 bit systems we return positive values instead of negative error codes. Fixes: 80a3511d70e8 ("cfg80211: add debugfs HT40 allow map") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YutvOQeJm0UjLhwU@kili Signed-off-by: Johannes Berg net/wireless/debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 15bc8966b6d3a5b9bfe4c9facfa02f2b69b1e5f0 Author: Siddh Raman Pant Date: Sun Aug 14 20:45:12 2022 +0530 wifi: mac80211: Don't finalize CSA in IBSS mode if state is disconnected When we are not connected to a channel, sending channel "switch" announcement doesn't make any sense. The BSS list is empty in that case. This causes the for loop in cfg80211_get_bss() to be bypassed, so the function returns NULL (check line 1424 of net/wireless/scan.c), causing the WARN_ON() in ieee80211_ibss_csa_beacon() to get triggered (check line 500 of net/mac80211/ibss.c), which was consequently reported on the syzkaller dashboard. Thus, check if we have an existing connection before generating the CSA beacon in ieee80211_ibss_finish_csa(). Cc: stable@vger.kernel.org Fixes: cd7760e62c2a ("mac80211: add support for CSA in IBSS mode") Link: https://syzkaller.appspot.com/bug?id=05603ef4ae8926761b678d2939a3b2ad28ab9ca6 Reported-by: syzbot+b6c9fe29aefe68e4ad34@syzkaller.appspotmail.com Signed-off-by: Siddh Raman Pant Tested-by: syzbot+b6c9fe29aefe68e4ad34@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20220814151512.9985-1-code@siddh.me Signed-off-by: Johannes Berg net/mac80211/ibss.c | 4 ++++ 1 file changed, 4 insertions(+) commit 62b03f45c6352410d13bf0710d24ef6290632eb1 Author: Yang Yingliang Date: Thu Aug 18 12:33:49 2022 +0800 wifi: mac80211: fix possible leak in ieee80211_tx_control_port() Add missing dev_kfree_skb() in an error path in ieee80211_tx_control_port() to avoid a memory leak. Fixes: dd820ed6336a ("wifi: mac80211: return error from control port TX for drops") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220818043349.4168835-1-yangyingliang@huawei.com Signed-off-by: Johannes Berg net/mac80211/tx.c | 1 + 1 file changed, 1 insertion(+) commit 36fe8e4e5cb02131719612aea1e64379670d1846 Author: Lorenzo Bianconi Date: Tue Aug 23 15:22:23 2022 +0200 wifi: mac80211: always free sta in __sta_info_alloc in case of error Free sta pointer in __sta_info_alloc routine if sta_info_alloc_link() fails. Fixes: 246b39e4a1ba5 ("wifi: mac80211: refactor some sta_info link handling") Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/a3d079208684cddbc25289f7f7e0fed795b0cad4.1661260857.git.lorenzo@kernel.org Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60deb9f10eec5c6a20252ed36238b55d8b614a2c Author: Siddh Raman Pant Date: Sat Aug 20 01:33:40 2022 +0530 wifi: mac80211: Fix UAF in ieee80211_scan_rx() ieee80211_scan_rx() tries to access scan_req->flags after a null check, but a UAF is observed when the scan is completed and __ieee80211_scan_completed() executes, which then calls cfg80211_scan_done() leading to the freeing of scan_req. Since scan_req is rcu_dereference()'d, prevent the racing in __ieee80211_scan_completed() by ensuring that from mac80211's POV it is no longer accessed from an RCU read critical section before we call cfg80211_scan_done(). Cc: stable@vger.kernel.org Link: https://syzkaller.appspot.com/bug?extid=f9acff9bf08a845f225d Reported-by: syzbot+f9acff9bf08a845f225d@syzkaller.appspotmail.com Suggested-by: Johannes Berg Signed-off-by: Siddh Raman Pant Link: https://lore.kernel.org/r/20220819200340.34826-1-code@siddh.me Signed-off-by: Johannes Berg net/mac80211/scan.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 0382a35bef70ecc074db67192ff8d37737d02b21 Author: Pali Rohár Date: Sat Aug 20 13:51:13 2022 +0200 powerpc/pci: Enable PCI domains in /proc when PCI bus numbers are not unique On 32-bit powerpc systems with more PCIe controllers and more PCI domains, where on more PCI domains are same PCI numbers, when kernel is compiled with CONFIG_PROC_FS=y and CONFIG_PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT=y options, kernel prints "proc_dir_entry 'pci/01' already registered" error message. proc_dir_entry 'pci/01' already registered WARNING: CPU: 0 PID: 1 at fs/proc/generic.c:377 proc_register+0x1a8/0x1ac ... NIP proc_register+0x1a8/0x1ac LR proc_register+0x1a8/0x1ac Call Trace: proc_register+0x1a8/0x1ac (unreliable) _proc_mkdir+0x78/0xa4 pci_proc_attach_device+0x11c/0x168 pci_proc_init+0x80/0x98 do_one_initcall+0x80/0x284 kernel_init_freeable+0x1f4/0x2a0 kernel_init+0x24/0x150 ret_from_kernel_thread+0x5c/0x64 This regression started appearing after commit 566356813082 ("powerpc/pci: Add config option for using all 256 PCI buses") in case in each mPCIe slot is connected PCIe card and therefore PCI bus 1 is populated in for every PCIe controller / PCI domain. The reason is that PCI procfs code expects that when PCI bus numbers are not unique across all PCI domains, function pci_proc_domain() returns true for domain dependent buses. Fix this issue by setting PCI_ENABLE_PROC_DOMAINS and PCI_COMPAT_DOMAIN_0 flags for 32-bit powerpc code when CONFIG_PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT is enabled. Same approach is already implemented for 64-bit powerpc code (where PCI bus numbers are always domain dependent). Fixes: 566356813082 ("powerpc/pci: Add config option for using all 256 PCI buses") Signed-off-by: Pali Rohár [mpe: Trim change log oops message] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220820115113.30581-1-pali@kernel.org arch/powerpc/kernel/pci_32.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d291e703f420d5f8f999fe54f360d54d213bddb4 Author: Zhang Xiaoxu Date: Tue Aug 23 20:52:02 2022 +0800 cifs: Add helper function to check smb1+ server SMB1 server's header_preamble_size is not 0, add use is_smb1 function to simplify the code, no actual functional changes. Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Zhang Xiaoxu Signed-off-by: Steve French fs/cifs/cifsencrypt.c | 3 +-- fs/cifs/cifsglob.h | 5 +++++ fs/cifs/connect.c | 10 +++++----- fs/cifs/transport.c | 4 ++-- 4 files changed, 13 insertions(+), 9 deletions(-) commit b6b3624d016b980f917b46e6b964f943ac5ac56e Author: Zhang Xiaoxu Date: Tue Aug 23 20:52:01 2022 +0800 cifs: Use help macro to get the mid header size It's better to use MID_HEADER_SIZE because the unfolded expression too long. No actual functional changes, minor readability improvement. Signed-off-by: Zhang Xiaoxu Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/cifsglob.h | 1 + fs/cifs/connect.c | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) commit 9789de8bdc92a9ec95c9bc7b43e94de91acc4460 Author: Zhang Xiaoxu Date: Tue Aug 23 20:52:00 2022 +0800 cifs: Use help macro to get the header preamble size It's better to use HEADER_PREAMBLE_SIZE because the unfolded expression too long. No actual functional changes, minor readability improvement. Signed-off-by: Zhang Xiaoxu Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/cifsencrypt.c | 2 +- fs/cifs/cifsglob.h | 1 + fs/cifs/connect.c | 20 ++++++++++---------- fs/cifs/transport.c | 21 ++++++++++----------- 4 files changed, 22 insertions(+), 22 deletions(-) commit 24c7a64ea4764d70e4ac9b0a60ecd9b03c68435e Merge: b09da0126ce0 00cd7bf9f9e0 Author: Jakub Kicinski Date: Wed Aug 24 19:18:09 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net 1) Fix crash with malformed ebtables blob which do not provide all entry points, from Florian Westphal. 2) Fix possible TCP connection clogging up with default 5-days timeout in conntrack, from Florian. 3) Fix crash in nf_tables tproxy with unsupported chains, also from Florian. 4) Do not allow to update implicit chains. 5) Make table handle allocation per-netns to fix data race. 6) Do not truncated payload length and offset, and checksum offset. Instead report EINVAl. 7) Enable chain stats update via static key iff no error occurs. 8) Restrict osf expression to ip, ip6 and inet families. 9) Restrict tunnel expression to netdev family. 10) Fix crash when trying to bind again an already bound chain. 11) Flowtable garbage collector might leave behind pending work to delete entries. This patch comes with a previous preparation patch as dependency. 12) Allow net.netfilter.nf_conntrack_frag6_high_thresh to be lowered, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_defrag_ipv6: allow nf_conntrack_frag6_high_thresh increases netfilter: flowtable: fix stuck flows on cleanup due to pending work netfilter: flowtable: add function to invoke garbage collection immediately netfilter: nf_tables: disallow binding to already bound chain netfilter: nft_tunnel: restrict it to netdev family netfilter: nft_osf: restrict osf to ipv4, ipv6 and inet families netfilter: nf_tables: do not leave chain stats enabled on error netfilter: nft_payload: do not truncate csum_offset and csum_type netfilter: nft_payload: report ERANGE for too long offset and length netfilter: nf_tables: make table handle allocation per-netns friendly netfilter: nf_tables: disallow updates of implicit chain netfilter: nft_tproxy: restrict to prerouting hook netfilter: conntrack: work around exceeded receive window netfilter: ebtables: reject blobs that don't provide all entry points ==================== Link: https://lore.kernel.org/r/20220824220330.64283-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit b09da0126ce09bd84545e4a8e8697f2a5bdeb745 Author: Lukas Bulwahn Date: Wed Aug 24 09:29:45 2022 +0200 MAINTAINERS: rectify file entry in BONDING DRIVER Commit c078290a2b76 ("selftests: include bonding tests into the kselftest infra") adds the bonding tests in the directory: tools/testing/selftests/drivers/net/bonding/ The file entry in MAINTAINERS for the BONDING DRIVER however refers to: tools/testing/selftests/net/bonding/ Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken file pattern. Repair this file entry in BONDING DRIVER. Signed-off-by: Lukas Bulwahn Acked-by: Jonathan Toppins Link: https://lore.kernel.org/r/20220824072945.28606-1-lukas.bulwahn@gmail.com Signed-off-by: Jakub Kicinski MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d0268585b9c07dd01b77b63913a4f31ad99239b Author: Wolfram Sang Date: Thu Aug 18 23:01:17 2022 +0200 fbdev: Move fbdev drivers from strlcpy to strscpy Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang Signed-off-by: Helge Deller drivers/video/console/sticore.c | 2 +- drivers/video/fbdev/aty/atyfb_base.c | 2 +- drivers/video/fbdev/aty/radeon_base.c | 2 +- drivers/video/fbdev/bw2.c | 2 +- drivers/video/fbdev/cirrusfb.c | 2 +- drivers/video/fbdev/clps711x-fb.c | 2 +- drivers/video/fbdev/core/fbcon.c | 2 +- drivers/video/fbdev/cyber2000fb.c | 8 ++++---- drivers/video/fbdev/ffb.c | 2 +- drivers/video/fbdev/geode/gx1fb_core.c | 6 +++--- drivers/video/fbdev/gxt4500.c | 2 +- drivers/video/fbdev/i740fb.c | 2 +- drivers/video/fbdev/imxfb.c | 2 +- drivers/video/fbdev/matrox/matroxfb_base.c | 6 +++--- drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 2 +- drivers/video/fbdev/pxa168fb.c | 2 +- drivers/video/fbdev/pxafb.c | 2 +- drivers/video/fbdev/s3fb.c | 2 +- drivers/video/fbdev/simplefb.c | 2 +- drivers/video/fbdev/sis/sis_main.c | 4 ++-- drivers/video/fbdev/sm501fb.c | 2 +- drivers/video/fbdev/sstfb.c | 2 +- drivers/video/fbdev/sunxvr1000.c | 2 +- drivers/video/fbdev/sunxvr2500.c | 2 +- drivers/video/fbdev/sunxvr500.c | 2 +- drivers/video/fbdev/tcx.c | 2 +- drivers/video/fbdev/tdfxfb.c | 4 ++-- drivers/video/fbdev/tgafb.c | 2 +- drivers/video/fbdev/tridentfb.c | 2 +- 29 files changed, 38 insertions(+), 38 deletions(-) commit 645b5ed871f408c9826a61276b97ea14048d439c Merge: c490a0b5a4f3 0dd84b319352 Author: Jens Axboe Date: Wed Aug 24 13:58:37 2022 -0600 Merge branch 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-6.0 Pull MD fixes from Song: "1. Fix for clustered raid, by Guoqing Jiang. 2. req_op fix, by Bart Van Assche. 3. Fix race condition in raid recreate, by David Sloan." * 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: call __md_stop_writes in md_stop Revert "md-raid: destroy the bitmap after destroying the thread" md: Flush workqueue md_rdev_misc_wq in md_alloc() md/raid10: Fix the data type of an r10_sync_page_io() argument commit 144c467398aa9fb274583590c848e6d6388e89d9 Author: Jiapeng Chong Date: Wed Aug 24 19:44:55 2022 +0800 fbdev: omap: Remove unnecessary print function dev_err() The print function dev_err() is redundant because platform_get_irq() already prints an error. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=1957 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Helge Deller drivers/video/fbdev/omap/omapfb_main.c | 2 -- 1 file changed, 2 deletions(-) commit 07c55c9803dea748d17a054000cbf1913ce06399 Author: Yang Yingliang Date: Fri Aug 19 16:57:52 2022 +0800 fbdev: chipsfb: Add missing pci_disable_device() in chipsfb_pci_init() Add missing pci_disable_device() in error path in chipsfb_pci_init(). Signed-off-by: Yang Yingliang Signed-off-by: Helge Deller drivers/video/fbdev/chipsfb.c | 1 + 1 file changed, 1 insertion(+) commit 58559dfc1ebba2ae0c7627dc8f8991ae1984c6e3 Author: Shigeru Yoshida Date: Sun Aug 21 20:17:31 2022 +0900 fbdev: fbcon: Destroy mutex on freeing struct fb_info It's needed to destroy bl_curve_mutex on freeing struct fb_info since the mutex is embedded in the structure and initialized when it's allocated. Signed-off-by: Shigeru Yoshida Signed-off-by: Helge Deller drivers/video/fbdev/core/fbsysfs.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1cd3bf3348b4a686cc955c9cd11034d7652219cd Author: Jiapeng Chong Date: Fri Aug 19 19:06:59 2022 +0800 fbdev: radeon: Clean up some inconsistent indenting No functional modification involved. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=1932 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Helge Deller drivers/video/fbdev/aty/radeon_base.c | 46 +++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) commit 3119cabcc5237c63fc5316409c5beada6304ca75 Author: Jiapeng Chong Date: Fri Aug 19 19:04:14 2022 +0800 fbdev: sisfb: Clean up some inconsistent indenting No functional modification involved. drivers/video/fbdev/sis/sis_main.c:6165 sisfb_probe() warn: inconsistent indenting. drivers/video/fbdev/sis/sis_main.c:4266 sisfb_post_300_rwtest() warn: inconsistent indenting. drivers/video/fbdev/sis/sis_main.c:2388 SISDoSense() warn: inconsistent indenting. drivers/video/fbdev/sis/sis_main.c:2531 SiS_Sense30x() warn: inconsistent indenting. drivers/video/fbdev/sis/sis_main.c:2382 SISDoSense() warn: inconsistent indenting. drivers/video/fbdev/sis/sis_main.c:2250 sisfb_sense_crt1() warn: inconsistent indenting. drivers/video/fbdev/sis/sis_main.c:672 sisfb_validate_mode() warn: inconsistent indenting. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=1934 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Helge Deller drivers/video/fbdev/sis/sis_main.c | 274 +++++++++++++++++++------------------ 1 file changed, 141 insertions(+), 133 deletions(-) commit 19f953e7435644b81332dd632ba1b2d80b1e37af Author: Letu Ren Date: Thu Aug 18 18:44:24 2022 +0800 fbdev: fb_pm2fb: Avoid potential divide by zero error In `do_fb_ioctl()` of fbmem.c, if cmd is FBIOPUT_VSCREENINFO, var will be copied from user, then go through `fb_set_var()` and `info->fbops->fb_check_var()` which could may be `pm2fb_check_var()`. Along the path, `var->pixclock` won't be modified. This function checks whether reciprocal of `var->pixclock` is too high. If `var->pixclock` is zero, there will be a divide by zero error. So, it is necessary to check whether denominator is zero to avoid crash. As this bug is found by Syzkaller, logs are listed below. divide error in pm2fb_check_var Call Trace: fb_set_var+0x367/0xeb0 drivers/video/fbdev/core/fbmem.c:1015 do_fb_ioctl+0x234/0x670 drivers/video/fbdev/core/fbmem.c:1110 fb_ioctl+0xdd/0x130 drivers/video/fbdev/core/fbmem.c:1189 Reported-by: Zheyu Ma Signed-off-by: Letu Ren Signed-off-by: Helge Deller drivers/video/fbdev/pm2fb.c | 5 +++++ 1 file changed, 5 insertions(+) commit 868ce967af1ea5d946635f8f89f752319212d769 Author: Jilin Yuan Date: Tue Aug 16 21:07:13 2022 +0800 fbdev: ssd1307fb: Fix repeated words in comments Delete the redundant word 'set'. Signed-off-by: Jilin Yuan Signed-off-by: Helge Deller drivers/video/fbdev/ssd1307fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit acf4c6205e862304681234a6a4375b478af12552 Author: Yu Zhe Date: Fri Aug 12 14:52:23 2022 +0800 fbdev: omapfb: Fix tests for platform_get_irq() failure The platform_get_irq() returns negative error codes. It can't actually return zero. Signed-off-by: Yu Zhe Signed-off-by: Helge Deller drivers/video/fbdev/omap/omapfb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bcf3a156429306070afbfda5544f2b492d25e75b Author: Sylwester Dziedziuch Date: Fri Aug 19 12:45:52 2022 +0200 i40e: Fix incorrect address type for IPv6 flow rules It was not possible to create 1-tuple flow director rule for IPv6 flow type. It was caused by incorrectly checking for source IP address when validating user provided destination IP address. Fix this by changing ip6src to correct ip6dst address in destination IP address validation for IPv6 flow type. Fixes: efca91e89b67 ("i40e: Add flow director support for IPv6") Signed-off-by: Sylwester Dziedziuch Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25d7a5f5a6bb15a2dae0a3f39ea5dda215024726 Author: Jacob Keller Date: Mon Aug 1 17:24:19 2022 -0700 ixgbe: stop resetting SYSTIME in ixgbe_ptp_start_cyclecounter The ixgbe_ptp_start_cyclecounter is intended to be called whenever the cyclecounter parameters need to be changed. Since commit a9763f3cb54c ("ixgbe: Update PTP to support X550EM_x devices"), this function has cleared the SYSTIME registers and reset the TSAUXC DISABLE_SYSTIME bit. While these need to be cleared during ixgbe_ptp_reset, it is wrong to clear them during ixgbe_ptp_start_cyclecounter. This function may be called during both reset and link status change. When link changes, the SYSTIME counter is still operating normally, but the cyclecounter should be updated to account for the possibly changed parameters. Clearing SYSTIME when link changes causes the timecounter to jump because the cycle counter now reads zero. Extract the SYSTIME initialization out to a new function and call this during ixgbe_ptp_reset. This prevents the timecounter adjustment and avoids an unnecessary reset of the current time. This also restores the original SYSTIME clearing that occurred during ixgbe_ptp_reset before the commit above. Reported-by: Steve Payne Reported-by: Ilya Evenbach Fixes: a9763f3cb54c ("ixgbe: Update PTP to support X550EM_x devices") Signed-off-by: Jacob Keller Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 59 ++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 13 deletions(-) commit 0dd84b319352bb8ba64752d4e45396d8b13e6018 Author: Guoqing Jiang Date: Wed Aug 17 20:05:14 2022 +0800 md: call __md_stop_writes in md_stop From the link [1], we can see raid1d was running even after the path raid_dtr -> md_stop -> __md_stop. Let's stop write first in destructor to align with normal md-raid to fix the KASAN issue. [1]. https://lore.kernel.org/linux-raid/CAPhsuW5gc4AakdGNdF8ubpezAuDLFOYUO_sfMZcec6hQFm8nhg@mail.gmail.com/T/#m7f12bf90481c02c6d2da68c64aeed4779b7df74a Fixes: 48df498daf62 ("md: move bitmap_destroy to the beginning of __md_stop") Reported-by: Mikulas Patocka Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu drivers/md/md.c | 1 + 1 file changed, 1 insertion(+) commit 1d258758cf06a0734482989911d184dd5837ed4e Author: Guoqing Jiang Date: Wed Aug 17 20:05:13 2022 +0800 Revert "md-raid: destroy the bitmap after destroying the thread" This reverts commit e151db8ecfb019b7da31d076130a794574c89f6f. Because it obviously breaks clustered raid as noticed by Neil though it fixed KASAN issue for dm-raid, let's revert it and fix KASAN issue in next commit. [1]. https://lore.kernel.org/linux-raid/a6657e08-b6a7-358b-2d2a-0ac37d49d23a@linux.dev/T/#m95ac225cab7409f66c295772483d091084a6d470 Fixes: e151db8ecfb0 ("md-raid: destroy the bitmap after destroying the thread") Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a86766c49e808bbb74b97d15cea4707a13d2ab52 Merge: e78bf8cbf005 123d6455771e Author: Linus Torvalds Date: Wed Aug 24 10:43:34 2022 -0700 Merge tag 'trace-v6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: - Fix build warning for when MODULES and FTRACE_WITH_DIRECT_CALLS are not set. A warning happens with ops_references_rec() defined but not used. * tag 'trace-v6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace: Fix build warning for ops_references_rec() not used commit 5e8daf906f890560df430d30617c692a794acb73 Author: David Sloan Date: Thu Aug 11 11:14:13 2022 -0600 md: Flush workqueue md_rdev_misc_wq in md_alloc() A race condition still exists when removing and re-creating md devices in test cases. However, it is only seen on some setups. The race condition was tracked down to a reference still being held to the kobject by the rdev in the md_rdev_misc_wq which will be released in rdev_delayed_delete(). md_alloc() waits for previous deletions by waiting on the md_misc_wq, but the md_rdev_misc_wq may still be holding a reference to a recently removed device. To fix this, also flush the md_rdev_misc_wq in md_alloc(). Signed-off-by: David Sloan [logang@deltatee.com: rewrote commit message] Signed-off-by: Logan Gunthorpe Signed-off-by: Song Liu drivers/md/md.c | 1 + 1 file changed, 1 insertion(+) commit 265ad47a40da581be77172b4a8e1fb72b2bd914a Author: Bart Van Assche Date: Wed Aug 10 11:20:12 2022 -0700 md/raid10: Fix the data type of an r10_sync_page_io() argument Fix the following sparse warning: drivers/md/raid10.c:2647:60: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected restricted blk_opf_t [usertype] opf @@ got int rw @@ This patch does not change any functionality since REQ_OP_READ = READ = 0 and since REQ_OP_WRITE = WRITE = 1. Cc: Rong A Chen Cc: Jens Axboe Cc: Paul Menzel Fixes: 4ce4c73f662b ("md/core: Combine two sync_page_io() arguments") Reported-by: kernel test robot Signed-off-by: Bart Van Assche Signed-off-by: Song Liu drivers/md/raid10.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit a1d2eb51f0a33c28f5399a1610e66b3fbd24e884 Author: Paulo Alcantara Date: Fri Aug 19 17:00:19 2022 -0300 cifs: skip extra NULL byte in filenames Since commit: cifs: alloc_path_with_tree_prefix: do not append sep. if the path is empty alloc_path_with_tree_prefix() function was no longer including the trailing separator when @path is empty, although @out_len was still assuming a path separator thus adding an extra byte to the final filename. This has caused mount issues in some Synology servers due to the extra NULL byte in filenames when sending SMB2_CREATE requests with SMB2_FLAGS_DFS_OPERATIONS set. Fix this by checking if @path is not empty and then add extra byte for separator. Also, do not include any trailing NULL bytes in filename as MS-SMB2 requires it to be 8-byte aligned and not NULL terminated. Cc: stable@vger.kernel.org Fixes: 7eacba3b00a3 ("cifs: alloc_path_with_tree_prefix: do not append sep. if the path is empty") Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/smb2pdu.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit e78bf8cbf005c3cc7dc4da55ce75152b71a1da0f Merge: c40e8341e3b3 d2139dfca361 Author: Linus Torvalds Date: Wed Aug 24 10:19:20 2022 -0700 Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging Pull dmi update from Jean Delvare. Tiny cleanup. * 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: firmware: dmi: Use the proper accessor for the version field commit 5d7fef0804b0a72a7efe196cd23b438edf84726c Author: Sander Vanheule Date: Tue Aug 23 08:12:23 2022 +0200 lib/cpumask_kunit: add tests file to MAINTAINERS cpumask related files are listed under the BITMAP API section, so the file with tests for cpumask should be added to that list. Signed-off-by: Sander Vanheule Reviewed-by: David Gow Acked-by: Yury Norov Signed-off-by: Yury Norov MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit bf5413586b8dbdb8eedee41cfd1450a4e587e845 Author: Sander Vanheule Date: Tue Aug 23 08:12:22 2022 +0200 lib/cpumask_kunit: log mask contents For extra context, log the contents of the masks under test. This should help with finding out why a certain test fails. Link: https://lore.kernel.org/lkml/CABVgOSkPXBc-PWk1zBZRQ_Tt+Sz1ruFHBj3ixojymZF=Vi4tpQ@mail.gmail.com/ Suggested-by: David Gow Signed-off-by: Sander Vanheule Signed-off-by: Yury Norov lib/cpumask_kunit.c | 51 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 20 deletions(-) commit d3c0ca4992cc21b0e1d7d8e530faa4ab16f8ec41 Author: Sander Vanheule Date: Tue Aug 23 08:12:21 2022 +0200 lib/test_cpumask: follow KUnit style guidelines The cpumask test suite doesn't follow the KUnit style guidelines, as laid out in Documentation/dev-tools/kunit/style.rst. The file is renamed to lib/cpumask_kunit.c to clearly distinguish it from other, non-KUnit, tests. Link: https://lore.kernel.org/lkml/346cb279-8e75-24b0-7d12-9803f2b41c73@riseup.net/ Suggested-by: Maíra Canal Signed-off-by: Sander Vanheule Reviewed-by: Maíra Canal Reviewed-by: David Gow Acked-by: Yury Norov Signed-off-by: Yury Norov lib/Kconfig.debug | 7 +++++-- lib/Makefile | 2 +- lib/{test_cpumask.c => cpumask_kunit.c} | 0 3 files changed, 6 insertions(+), 3 deletions(-) commit fbbc94d8486c6d683650269154c9a7d8897f35d7 Author: Sander Vanheule Date: Tue Aug 23 08:12:20 2022 +0200 lib/test_cpumask: fix cpu_possible_mask last test Since cpumask_first() on the cpu_possible_mask must return at most nr_cpu_ids - 1 for a valid result, cpumask_last() cannot return anything larger than this value. As test_cpumask_weight() also verifies that the total weight of cpu_possible_mask must equal nr_cpu_ids, the last bit set in this mask must be at nr_cpu_ids - 1. Fixes: c41e8866c28c ("lib/test: introduce cpumask KUnit test suite") Link: https://lore.kernel.org/lkml/346cb279-8e75-24b0-7d12-9803f2b41c73@riseup.net/ Reported-by: Maíra Canal Signed-off-by: Sander Vanheule Tested-by: Maíra Canal Reviewed-by: David Gow Acked-by: Yury Norov Signed-off-by: Yury Norov lib/test_cpumask.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6afd9db630b037c7f0bc939368216512568de607 Author: Sander Vanheule Date: Tue Aug 23 08:12:19 2022 +0200 lib/test_cpumask: drop cpu_possible_mask full test When the number of CPUs that can possibly be brought online is known at boot time, e.g. when HOTPLUG is disabled, nr_cpu_ids may be smaller than NR_CPUS. In that case, cpu_possible_mask would not be completely filled, and cpumask_full(cpu_possible_mask) can return false for valid system configurations. Without this test, cpu_possible_mask contents are still constrained by a check on cpumask_weight(), as well as tests in test_cpumask_first(), test_cpumask_last(), test_cpumask_next(), and test_cpumask_iterators(). Fixes: c41e8866c28c ("lib/test: introduce cpumask KUnit test suite") Link: https://lore.kernel.org/lkml/346cb279-8e75-24b0-7d12-9803f2b41c73@riseup.net/ Reported-by: Maíra Canal Signed-off-by: Sander Vanheule Tested-by: Maíra Canal Reviewed-by: David Gow Signed-off-by: Yury Norov lib/test_cpumask.c | 1 - 1 file changed, 1 deletion(-) commit 5916943943d19a854238d50d1fe2047467cbeb3c Author: Pavel Begunkov Date: Wed Aug 24 13:07:42 2022 +0100 io_uring: conditional ->async_data allocation There are opcodes that need ->async_data only in some cases and allocation it unconditionally may hurt performance. Add an option to opdef to make move the allocation part from the core io_uring to opcode specific code. Note, we can't just set opdef->async_size to zero because there are other helpers that rely on it, e.g. io_alloc_async_data(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9dc62be9e88dd0ed63c48365340e8922d2498293.1661342812.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 7 ++++--- io_uring/opdef.h | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) commit 53bdc88aac9a21aae937452724fa4738cd843795 Author: Pavel Begunkov Date: Wed Aug 24 13:07:41 2022 +0100 io_uring/notif: order notif vs send CQEs Currently, there is no ordering between notification CQEs and completions of the send flushing it, this quite complicates the userspace, especially since we don't flush notification when the send(+flush) request fails, i.e. there will be only one CQE. What we can do is to make sure that notification completions come only after sends. The easiest way to achieve this is to not try to complete a notification inline from io_sendzc() but defer it to task_work, considering that io-wq sendzc is disallowed CQEs will be naturally ordered because task_works will only be executed after we're done with submission and so inline completion. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/cddfd1c2bf91f22b9fe08e13b7dffdd8f858a151.1661342812.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/notif.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 986e263def32eec89153babf469859d837507d34 Author: Pavel Begunkov Date: Wed Aug 24 13:07:40 2022 +0100 io_uring/net: fix indentation Fix up indentation before we get complaints from tooling. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/bd5754e3764215ccd7fb04cd636ea9167aaa275d.1661342812.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a848b7c9e5e4d94390fbc391ccb81d40f3ccfb5 Author: Pavel Begunkov Date: Wed Aug 24 13:07:39 2022 +0100 io_uring/net: fix zc send link failing Failed requests should be marked with req_set_fail(), so links and cqe skipping work correctly, which is missing in io_sendzc(). Note, io_sendzc() return IOU_OK on failure, so the core code won't do the cleanup for us. Fixes: 06a5464be84e4 ("io_uring: wire send zc request type") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e47d46fda9db30154ce66a549bb0d3380b780520.1661342812.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 1 + 1 file changed, 1 insertion(+) commit 2cacedc873ab5f5945d8f1b71804b0bcea0383ff Author: Pavel Begunkov Date: Wed Aug 24 13:07:38 2022 +0100 io_uring/net: fix must_hold annotation Fix up the io_alloc_notif()'s __must_hold as we don't have a ctx argument there but should get it from the slot instead. Reported-by: Stefan Metzmacher Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/cbb0a920f18e0aed590bf58300af817b9befb8a3.1661342812.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/notif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c490a0b5a4f36da3918181a8acdc6991d967c5f3 Author: Siddh Raman Pant Date: Tue Aug 23 21:38:10 2022 +0530 loop: Check for overflow while configuring loop The userspace can configure a loop using an ioctl call, wherein a configuration of type loop_config is passed (see lo_ioctl()'s case on line 1550 of drivers/block/loop.c). This proceeds to call loop_configure() which in turn calls loop_set_status_from_info() (see line 1050 of loop.c), passing &config->info which is of type loop_info64*. This function then sets the appropriate values, like the offset. loop_device has lo_offset of type loff_t (see line 52 of loop.c), which is typdef-chained to long long, whereas loop_info64 has lo_offset of type __u64 (see line 56 of include/uapi/linux/loop.h). The function directly copies offset from info to the device as follows (See line 980 of loop.c): lo->lo_offset = info->lo_offset; This results in an overflow, which triggers a warning in iomap_iter() due to a call to iomap_iter_done() which has: WARN_ON_ONCE(iter->iomap.offset > iter->pos); Thus, check for negative value during loop_set_status_from_info(). Bug report: https://syzkaller.appspot.com/bug?id=c620fe14aac810396d3c3edc9ad73848bf69a29e Reported-and-tested-by: syzbot+a8e049cd3abd342936b6@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Siddh Raman Pant Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220823160810.181275-1-code@siddh.me Signed-off-by: Jens Axboe drivers/block/loop.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0c4a95417ee4b1013ddf115fb6dbe36a2503a598 Merge: c624c58e08b1 3c9ba81d7204 Author: David S. Miller Date: Wed Aug 24 13:46:59 2022 +0100 Merge branch 'sysctl-data-races' Kuniyuki Iwashima says: ==================== net: sysctl: Fix data-races around net.core.XXX This series fixes data-races around all knobs in net_core_table and netns_core_table except for bpf stuff. These knobs are skipped: - 4 bpf knobs - netdev_rss_key: Written only once by net_get_random_once() and read-only knob - rps_sock_flow_entries: Protected with sock_flow_mutex - flow_limit_cpu_bitmap: Protected with flow_limit_update_mutex - flow_limit_table_len: Protected with flow_limit_update_mutex - default_qdisc: Protected with qdisc_mod_lock - warnings: Unused - high_order_alloc_disable: Protected with static_key_mutex - skb_defer_max: Already using READ_ONCE() - sysctl_txrehash: Already using READ_ONCE() Note 5th patch fixes net.core.message_cost and net.core.message_burst, and lib/ratelimit.c does not have an explicit maintainer. Changes: v3: * Fix build failures of CONFIG_SYSCTL=n case in 13th & 14th patches v2: https://lore.kernel.org/netdev/20220818035227.81567-1-kuniyu@amazon.com/ * Remove 4 bpf knobs and added 6 knobs v1: https://lore.kernel.org/netdev/20220816052347.70042-1-kuniyu@amazon.com/ ==================== Signed-off-by: David S. Miller commit 3c9ba81d72047f2e81bb535d42856517b613aba7 Author: Kuniyuki Iwashima Date: Tue Aug 23 10:47:00 2022 -0700 net: Fix a data-race around sysctl_somaxconn. While reading sysctl_somaxconn, it can be changed concurrently. Thus, we need to add READ_ONCE() to its reader. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05e49cfc89e4f325eebbc62d24dd122e55f94c23 Author: Kuniyuki Iwashima Date: Tue Aug 23 10:46:59 2022 -0700 net: Fix a data-race around netdev_unregister_timeout_secs. While reading netdev_unregister_timeout_secs, it can be changed concurrently. Thus, we need to add READ_ONCE() to its reader. Fixes: 5aa3afe107d9 ("net: make unregister netdev warning timeout configurable") Signed-off-by: Kuniyuki Iwashima Acked-by: Dmitry Vyukov Signed-off-by: David S. Miller net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8db24af3f02ebdbf302196006ebb270c4c3a2706 Author: Kuniyuki Iwashima Date: Tue Aug 23 10:46:58 2022 -0700 net: Fix a data-race around gro_normal_batch. While reading gro_normal_batch, it can be changed concurrently. Thus, we need to add READ_ONCE() to its reader. Fixes: 323ebb61e32b ("net: use listified RX for handling GRO_NORMAL skbs") Signed-off-by: Kuniyuki Iwashima Acked-by: Edward Cree Signed-off-by: David S. Miller include/net/gro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5612ca10d1aa05624ebe72633e0c8c792970833 Author: Kuniyuki Iwashima Date: Tue Aug 23 10:46:57 2022 -0700 net: Fix data-races around sysctl_devconf_inherit_init_net. While reading sysctl_devconf_inherit_init_net, it can be changed concurrently. Thus, we need to add READ_ONCE() to its readers. Fixes: 856c395cfa63 ("net: introduce a knob to control whether to inherit devconf config") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller include/linux/netdevice.h | 9 +++++++++ net/ipv4/devinet.c | 16 ++++++++++------ net/ipv6/addrconf.c | 5 ++--- 3 files changed, 21 insertions(+), 9 deletions(-) commit af67508ea6cbf0e4ea27f8120056fa2efce127dd Author: Kuniyuki Iwashima Date: Tue Aug 23 10:46:56 2022 -0700 net: Fix data-races around sysctl_fb_tunnels_only_for_init_net. While reading sysctl_fb_tunnels_only_for_init_net, it can be changed concurrently. Thus, we need to add READ_ONCE() to its readers. Fixes: 79134e6ce2c9 ("net: do not create fallback tunnels for non-default namespaces") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller include/linux/netdevice.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit fa45d484c52c73f79db2c23b0cdfc6c6455093ad Author: Kuniyuki Iwashima Date: Tue Aug 23 10:46:55 2022 -0700 net: Fix a data-race around netdev_budget_usecs. While reading netdev_budget_usecs, it can be changed concurrently. Thus, we need to add READ_ONCE() to its reader. Fixes: 7acf8a1e8a28 ("Replace 2 jiffies with sysctl netdev_budget_usecs to enable softirq tuning") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 657b991afb89d25fe6c4783b1b75a8ad4563670d Author: Kuniyuki Iwashima Date: Tue Aug 23 10:46:54 2022 -0700 net: Fix data-races around sysctl_max_skb_frags. While reading sysctl_max_skb_frags, it can be changed concurrently. Thus, we need to add READ_ONCE() to its readers. Fixes: 5f74f82ea34c ("net:Add sysctl_max_skb_frags") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/ipv4/tcp.c | 4 ++-- net/mptcp/protocol.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 2e0c42374ee32e72948559d2ae2f7ba3dc6b977c Author: Kuniyuki Iwashima Date: Tue Aug 23 10:46:53 2022 -0700 net: Fix a data-race around netdev_budget. While reading netdev_budget, it can be changed concurrently. Thus, we need to add READ_ONCE() to its reader. Fixes: 51b0bdedb8e7 ("[NET]: Separate two usages of netdev_max_backlog.") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e59ef36f0795696ab229569c153936bfd068d21c Author: Kuniyuki Iwashima Date: Tue Aug 23 10:46:52 2022 -0700 net: Fix a data-race around sysctl_net_busy_read. While reading sysctl_net_busy_read, it can be changed concurrently. Thus, we need to add READ_ONCE() to its reader. Fixes: 2d48d67fa8cd ("net: poll/select low latency socket support") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/core/sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c42b7cddea47503411bfb5f2f93a4154aaffa2d9 Author: Kuniyuki Iwashima Date: Tue Aug 23 10:46:51 2022 -0700 net: Fix a data-race around sysctl_net_busy_poll. While reading sysctl_net_busy_poll, it can be changed concurrently. Thus, we need to add READ_ONCE() to its reader. Fixes: 060212928670 ("net: add low latency socket poll") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller include/net/busy_poll.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2154b0afa73c0159b2856f875c6b4fe7cf6a95e Author: Kuniyuki Iwashima Date: Tue Aug 23 10:46:50 2022 -0700 net: Fix a data-race around sysctl_tstamp_allow_data. While reading sysctl_tstamp_allow_data, it can be changed concurrently. Thus, we need to add READ_ONCE() to its reader. Fixes: b245be1f4db1 ("net-timestamp: no-payload only sysctl") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/core/skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7de6d09f51917c829af2b835aba8bb5040f8e86a Author: Kuniyuki Iwashima Date: Tue Aug 23 10:46:49 2022 -0700 net: Fix data-races around sysctl_optmem_max. While reading sysctl_optmem_max, it can be changed concurrently. Thus, we need to add READ_ONCE() to its readers. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/core/bpf_sk_storage.c | 5 +++-- net/core/filter.c | 9 +++++---- net/core/sock.c | 8 +++++--- net/ipv4/ip_sockglue.c | 6 +++--- net/ipv6/ipv6_sockglue.c | 4 ++-- 5 files changed, 18 insertions(+), 14 deletions(-) commit 6bae8ceb90ba76cdba39496db936164fa672b9be Author: Kuniyuki Iwashima Date: Tue Aug 23 10:46:48 2022 -0700 ratelimit: Fix data-races in ___ratelimit(). While reading rs->interval and rs->burst, they can be changed concurrently via sysctl (e.g. net_ratelimit_state). Thus, we need to add READ_ONCE() to their readers. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller lib/ratelimit.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 61adf447e38664447526698872e21c04623afb8e Author: Kuniyuki Iwashima Date: Tue Aug 23 10:46:47 2022 -0700 net: Fix data-races around netdev_tstamp_prequeue. While reading netdev_tstamp_prequeue, it can be changed concurrently. Thus, we need to add READ_ONCE() to its readers. Fixes: 3b098e2d7c69 ("net: Consistent skb timestamping") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/core/dev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5dcd08cd19912892586c6082d56718333e2d19db Author: Kuniyuki Iwashima Date: Tue Aug 23 10:46:46 2022 -0700 net: Fix data-races around netdev_max_backlog. While reading netdev_max_backlog, it can be changed concurrently. Thus, we need to add READ_ONCE() to its readers. While at it, we remove the unnecessary spaces in the doc. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller Documentation/admin-guide/sysctl/net.rst | 2 +- net/core/dev.c | 4 ++-- net/core/gro_cells.c | 2 +- net/xfrm/espintcp.c | 2 +- net/xfrm/xfrm_input.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit bf955b5ab8f6f7b0632cdef8e36b14e4f6e77829 Author: Kuniyuki Iwashima Date: Tue Aug 23 10:46:45 2022 -0700 net: Fix data-races around weight_p and dev_weight_[rt]x_bias. While reading weight_p, it can be changed concurrently. Thus, we need to add READ_ONCE() to its reader. Also, dev_[rt]x_weight can be read/written at the same time. So, we need to use READ_ONCE() and WRITE_ONCE() for its access. Moreover, to use the same weight_p while changing dev_[rt]x_weight, we add a mutex in proc_do_dev_weight(). Fixes: 3d48b53fb2ae ("net: dev_weight: TX/RX orthogonality") Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/core/dev.c | 2 +- net/core/sysctl_net_core.c | 15 +++++++++------ net/sched/sch_generic.c | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) commit 1227c1771dd2ad44318aa3ab9e3a293b3f34ff2a Author: Kuniyuki Iwashima Date: Tue Aug 23 10:46:44 2022 -0700 net: Fix data-races around sysctl_[rw]mem_(max|default). While reading sysctl_[rw]mem_(max|default), they can be changed concurrently. Thus, we need to add READ_ONCE() to its readers. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/core/filter.c | 4 ++-- net/core/sock.c | 8 ++++---- net/ipv4/ip_output.c | 2 +- net/ipv4/tcp_output.c | 2 +- net/netfilter/ipvs/ip_vs_sync.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) commit c624c58e08b15105662b9ab9be23d14a6b945a49 Author: lily Date: Mon Aug 22 22:44:11 2022 -0700 net/core/skbuff: Check the return value of skb_copy_bits() skb_copy_bits() could fail, which requires a check on the return value. Signed-off-by: Li Zhong Signed-off-by: David S. Miller net/core/skbuff.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 76de008340ecf55fe4cfb54137b8a56d87a98f9f Merge: f79959220fa5 17ecd4a4db47 Author: David S. Miller Date: Wed Aug 24 12:51:50 2022 +0100 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2022-08-24 1) Fix a refcount leak in __xfrm_policy_check. From Xin Xiong. 2) Revert "xfrm: update SA curlft.use_time". This violates RFC 2367. From Antony Antony. 3) Fix a comment on XFRMA_LASTUSED. From Antony Antony. 4) x->lastused is not cloned in xfrm_do_migrate. Fix from Antony Antony. 5) Serialize the calls to xfrm_probe_algs. From Herbert Xu. 6) Fix a null pointer dereference of dst->dev on a metadata dst in xfrm_lookup_with_ifid. From Nikolay Aleksandrov. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 6ab55ec0a938c7f943a4edba3d6514f775983887 Author: Zheyu Ma Date: Wed Aug 24 16:16:54 2022 +0800 ALSA: control: Fix an out-of-bounds bug in get_ctl_id_hash() Since the user can control the arguments provided to the kernel by the ioctl() system call, an out-of-bounds bug occurs when the 'id->name' provided by the user does not end with '\0'. The following log can reveal it: [ 10.002313] BUG: KASAN: stack-out-of-bounds in snd_ctl_find_id+0x36c/0x3a0 [ 10.002895] Read of size 1 at addr ffff888109f5fe28 by task snd/439 [ 10.004934] Call Trace: [ 10.007140] snd_ctl_find_id+0x36c/0x3a0 [ 10.007489] snd_ctl_ioctl+0x6cf/0x10e0 Fix this by checking the bound of 'id->name' in the loop. Fixes: c27e1efb61c5 ("ALSA: control: Use xarray for faster lookups") Signed-off-by: Zheyu Ma Link: https://lore.kernel.org/r/20220824081654.3767739-1-zheyuma97@gmail.com Signed-off-by: Takashi Iwai sound/core/control.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f79959220fa5fbda939592bf91c7a9ea90419040 Author: Csókás Bence Date: Mon Aug 22 10:10:52 2022 +0200 fec: Restart PPS after link state change On link state change, the controller gets reset, causing PPS to drop out and the PHC to lose its time and calibration. So we restart it if needed, restoring calibration and time registers. Changes since v2: * Add `fec_ptp_save_state()`/`fec_ptp_restore_state()` * Use `ktime_get_real_ns()` * Use `BIT()` macro Changes since v1: * More ECR #define's * Stop PPS in `fec_ptp_stop()` Signed-off-by: Csókás Bence Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec.h | 10 ++++++++ drivers/net/ethernet/freescale/fec_main.c | 42 ++++++++++++++++++++++++++++--- drivers/net/ethernet/freescale/fec_ptp.c | 29 +++++++++++++++++++++ 3 files changed, 77 insertions(+), 4 deletions(-) commit d5485d9dd24e1d04e5509916515260186eb1455c Author: Yang Yingliang Date: Mon Aug 22 10:53:46 2022 +0800 net: neigh: don't call kfree_skb() under spin_lock_irqsave() It is not allowed to call kfree_skb() from hardware interrupt context or with interrupts being disabled. So add all skb to a tmp list, then free them after spin_unlock_irqrestore() at once. Fixes: 66ba215cb513 ("neigh: fix possible DoS due to net iface start/stop loop") Suggested-by: Denis V. Lunev Signed-off-by: Yang Yingliang Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/core/neighbour.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit cdaa0a407f1acd3a44861e3aea6e3c7349e668f1 Author: Tom Lendacky Date: Tue Aug 23 16:55:51 2022 -0500 x86/sev: Don't use cc_platform_has() for early SEV-SNP calls When running identity-mapped and depending on the kernel configuration, it is possible that the compiler uses jump tables when generating code for cc_platform_has(). This causes a boot failure because the jump table uses un-mapped kernel virtual addresses, not identity-mapped addresses. This has been seen with CONFIG_RETPOLINE=n. Similar to sme_encrypt_kernel(), use an open-coded direct check for the status of SNP rather than trying to eliminate the jump table. This preserves any code optimization in cc_platform_has() that can be useful post boot. It also limits the changes to SEV-specific files so that future compiler features won't necessarily require possible build changes just because they are not compatible with running identity-mapped. [ bp: Massage commit message. ] Fixes: 5e5ccff60a29 ("x86/sev: Add helper for validating pages in early enc attribute changes") Reported-by: Sean Christopherson Suggested-by: Sean Christopherson Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov Cc: # 5.19.x Link: https://lore.kernel.org/all/YqfabnTRxFSM+LoX@google.com/ arch/x86/kernel/sev.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 4b1c742407571eff58b6de9881889f7ca7c4b4dc Author: Michael Roth Date: Tue Aug 23 11:07:34 2022 -0500 x86/boot: Don't propagate uninitialized boot_params->cc_blob_address In some cases, bootloaders will leave boot_params->cc_blob_address uninitialized rather than zeroing it out. This field is only meant to be set by the boot/compressed kernel in order to pass information to the uncompressed kernel when SEV-SNP support is enabled. Therefore, there are no cases where the bootloader-provided values should be treated as anything other than garbage. Otherwise, the uncompressed kernel may attempt to access this bogus address, leading to a crash during early boot. Normally, sanitize_boot_params() would be used to clear out such fields but that happens too late: sev_enable() may have already initialized it to a valid value that should not be zeroed out. Instead, have sev_enable() zero it out unconditionally beforehand. Also ensure this happens for !CONFIG_AMD_MEM_ENCRYPT as well by also including this handling in the sev_enable() stub function. [ bp: Massage commit message and comments. ] Fixes: b190a043c49a ("x86/sev: Add SEV-SNP feature detection/setup") Reported-by: Jeremi Piotrowski Reported-by: watnuss@gmx.de Signed-off-by: Michael Roth Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=216387 Link: https://lore.kernel.org/r/20220823160734.89036-1-michael.roth@amd.com arch/x86/boot/compressed/misc.h | 12 +++++++++++- arch/x86/boot/compressed/sev.c | 8 ++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) commit 00cd7bf9f9e06769ef84d5102774c8becd6a498a Author: Eric Dumazet Date: Tue Aug 23 16:38:48 2022 -0700 netfilter: nf_defrag_ipv6: allow nf_conntrack_frag6_high_thresh increases Currently, net.netfilter.nf_conntrack_frag6_high_thresh can only be lowered. I found this issue while investigating a probable kernel issue causing flakes in tools/testing/selftests/net/ip_defrag.sh In particular, these sysctl changes were ignored: ip netns exec "${NETNS}" sysctl -w net.netfilter.nf_conntrack_frag6_high_thresh=9000000 >/dev/null 2>&1 ip netns exec "${NETNS}" sysctl -w net.netfilter.nf_conntrack_frag6_low_thresh=7000000 >/dev/null 2>&1 This change is inline with commit 836196239298 ("net/ipfrag: let ip[6]frag_high_thresh in ns be higher than in init_net") Fixes: 8db3d41569bb ("netfilter: nf_defrag_ipv6: use net_generic infra") Signed-off-by: Eric Dumazet Signed-off-by: Pablo Neira Ayuso net/ipv6/netfilter/nf_conntrack_reasm.c | 1 - 1 file changed, 1 deletion(-) commit c7e31e36d8a262eb0bc2daf8f9b7481c83284386 Author: Rob Herring Date: Tue Aug 23 09:56:48 2022 -0500 dt-bindings: opp: Add missing (unevaluated|additional)Properties on child nodes In order to ensure only documented properties are present, node schemas must have unevaluatedProperties or additionalProperties set to false (typically). Signed-off-by: Rob Herring Signed-off-by: Viresh Kumar Documentation/devicetree/bindings/opp/opp-v2-kryo-cpu.yaml | 1 + Documentation/devicetree/bindings/opp/opp-v2-qcom-level.yaml | 1 + 2 files changed, 2 insertions(+) commit 2e6481a3f3ee6234ce577454e1d88aca55f51d47 Author: Peter Ujfalusi Date: Tue Aug 23 15:24:05 2022 +0300 ALSA: hda: intel-nhlt: Correct the handling of fmt_config flexible array The struct nhlt_format's fmt_config is a flexible array, it must not be used as normal array. When moving to the next nhlt_fmt_cfg we need to take into account the data behind the ->config.caps (indicated by ->config.size). Fixes: a864e8f159b13 ("ALSA: hda: intel-nhlt: verify config type") Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Jaska Uimonen Link: https://lore.kernel.org/r/20220823122405.18464-1-peter.ujfalusi@linux.intel.com Signed-off-by: Takashi Iwai sound/hda/intel-nhlt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 3e7e04b747adea36f349715d9f0998eeebf15d72 Author: Takashi Iwai Date: Tue Aug 23 09:27:17 2022 +0200 ALSA: seq: Fix data-race at module auto-loading It's been reported that there is a possible data-race accessing to the global card_requested[] array at ALSA sequencer core, which is used for determining whether to call request_module() for the card or not. This data race itself is almost harmless, as it might end up with one extra request_module() call for the already loaded module at most. But it's still better to fix. This patch addresses the possible data race of card_requested[] and client_requested[] arrays by replacing them with bitmask. It's an atomic operation and can work without locks. Reported-by: Abhishek Shah Cc: Link: https://lore.kernel.org/r/CAEHB24_ay6YzARpA1zgCsE7=H9CSJJzux618E=Ka4h0YdKn=qA@mail.gmail.com Link: https://lore.kernel.org/r/20220823072717.1706-2-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 9afb4b27349a499483ae0134282cefd0c90f480f Author: Pablo Neira Ayuso Date: Thu Nov 18 22:24:15 2021 +0100 netfilter: flowtable: fix stuck flows on cleanup due to pending work To clear the flow table on flow table free, the following sequence normally happens in order: 1) gc_step work is stopped to disable any further stats/del requests. 2) All flow table entries are set to teardown state. 3) Run gc_step which will queue HW del work for each flow table entry. 4) Waiting for the above del work to finish (flush). 5) Run gc_step again, deleting all entries from the flow table. 6) Flow table is freed. But if a flow table entry already has pending HW stats or HW add work step 3 will not queue HW del work (it will be skipped), step 4 will wait for the pending add/stats to finish, and step 5 will queue HW del work which might execute after freeing of the flow table. To fix the above, this patch flushes the pending work, then it sets the teardown flag to all flows in the flowtable and it forces a garbage collector run to queue work to remove the flows from hardware, then it flushes this new pending work and (finally) it forces another garbage collector run to remove the entry from the software flowtable. Stack trace: [47773.882335] BUG: KASAN: use-after-free in down_read+0x99/0x460 [47773.883634] Write of size 8 at addr ffff888103b45aa8 by task kworker/u20:6/543704 [47773.885634] CPU: 3 PID: 543704 Comm: kworker/u20:6 Not tainted 5.12.0-rc7+ #2 [47773.886745] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009) [47773.888438] Workqueue: nf_ft_offload_del flow_offload_work_handler [nf_flow_table] [47773.889727] Call Trace: [47773.890214] dump_stack+0xbb/0x107 [47773.890818] print_address_description.constprop.0+0x18/0x140 [47773.892990] kasan_report.cold+0x7c/0xd8 [47773.894459] kasan_check_range+0x145/0x1a0 [47773.895174] down_read+0x99/0x460 [47773.899706] nf_flow_offload_tuple+0x24f/0x3c0 [nf_flow_table] [47773.907137] flow_offload_work_handler+0x72d/0xbe0 [nf_flow_table] [47773.913372] process_one_work+0x8ac/0x14e0 [47773.921325] [47773.921325] Allocated by task 592159: [47773.922031] kasan_save_stack+0x1b/0x40 [47773.922730] __kasan_kmalloc+0x7a/0x90 [47773.923411] tcf_ct_flow_table_get+0x3cb/0x1230 [act_ct] [47773.924363] tcf_ct_init+0x71c/0x1156 [act_ct] [47773.925207] tcf_action_init_1+0x45b/0x700 [47773.925987] tcf_action_init+0x453/0x6b0 [47773.926692] tcf_exts_validate+0x3d0/0x600 [47773.927419] fl_change+0x757/0x4a51 [cls_flower] [47773.928227] tc_new_tfilter+0x89a/0x2070 [47773.936652] [47773.936652] Freed by task 543704: [47773.937303] kasan_save_stack+0x1b/0x40 [47773.938039] kasan_set_track+0x1c/0x30 [47773.938731] kasan_set_free_info+0x20/0x30 [47773.939467] __kasan_slab_free+0xe7/0x120 [47773.940194] slab_free_freelist_hook+0x86/0x190 [47773.941038] kfree+0xce/0x3a0 [47773.941644] tcf_ct_flow_table_cleanup_work Original patch description and stack trace by Paul Blakey. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Reported-by: Paul Blakey Tested-by: Paul Blakey Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_flow_table.h | 2 ++ net/netfilter/nf_flow_table_core.c | 7 +++---- net/netfilter/nf_flow_table_offload.c | 8 ++++++++ 3 files changed, 13 insertions(+), 4 deletions(-) commit 759eebbcfafcefa23b59e912396306543764bd3c Author: Pablo Neira Ayuso Date: Mon Aug 22 23:13:00 2022 +0200 netfilter: flowtable: add function to invoke garbage collection immediately Expose nf_flow_table_gc_run() to force a garbage collector run from the offload infrastructure. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_flow_table.h | 1 + net/netfilter/nf_flow_table_core.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) commit e02f0d3970404bfea385b6edb86f2d936db0ea2b Author: Pablo Neira Ayuso Date: Mon Aug 22 11:06:39 2022 +0200 netfilter: nf_tables: disallow binding to already bound chain Update nft_data_init() to report EINVAL if chain is already bound. Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING") Reported-by: Gwangun Jung Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 2 ++ 1 file changed, 2 insertions(+) commit 01e4092d53bc4fe122a6e4b6d664adbd57528ca3 Author: Pablo Neira Ayuso Date: Sun Aug 21 16:32:44 2022 +0200 netfilter: nft_tunnel: restrict it to netdev family Only allow to use this expression from NFPROTO_NETDEV family. Fixes: af308b94a2a4 ("netfilter: nf_tables: add tunnel support") Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_tunnel.c | 1 + 1 file changed, 1 insertion(+) commit 5f3b7aae14a706d0d7da9f9e39def52ff5fc3d39 Author: Pablo Neira Ayuso Date: Sun Aug 21 16:25:07 2022 +0200 netfilter: nft_osf: restrict osf to ipv4, ipv6 and inet families As it was originally intended, restrict extension to supported families. Fixes: b96af92d6eaf ("netfilter: nf_tables: implement Passive OS fingerprint module in nft_osf") Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_osf.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 43eb8949cfdffa764b92bc6c54b87cbe5b0003fe Author: Pablo Neira Ayuso Date: Sun Aug 21 12:41:33 2022 +0200 netfilter: nf_tables: do not leave chain stats enabled on error Error might occur later in the nf_tables_addchain() codepath, enable static key only after transaction has been created. Fixes: 9f08ea848117 ("netfilter: nf_tables: keep chain counters away from hot path") Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7044ab281febae9e2fa9b0b247693d6026166293 Author: Pablo Neira Ayuso Date: Sun Aug 21 11:55:19 2022 +0200 netfilter: nft_payload: do not truncate csum_offset and csum_type Instead report ERANGE if csum_offset is too long, and EOPNOTSUPP if type is not support. Fixes: 7ec3f7b47b8d ("netfilter: nft_payload: add packet mangling support") Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_payload.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 94254f990c07e9ddf1634e0b727fab821c3b5bf9 Author: Pablo Neira Ayuso Date: Sun Aug 21 11:47:04 2022 +0200 netfilter: nft_payload: report ERANGE for too long offset and length Instead of offset and length are truncation to u8, report ERANGE. Fixes: 96518518cc41 ("netfilter: add nftables") Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_payload.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit ab482c6b66a4a8c0a8c0b0f577a785cf9ff1c2e2 Author: Pablo Neira Ayuso Date: Sun Aug 21 10:52:48 2022 +0200 netfilter: nf_tables: make table handle allocation per-netns friendly mutex is per-netns, move table_netns to the pernet area. *read-write* to 0xffffffff883a01e8 of 8 bytes by task 6542 on cpu 0: nf_tables_newtable+0x6dc/0xc00 net/netfilter/nf_tables_api.c:1221 nfnetlink_rcv_batch net/netfilter/nfnetlink.c:513 [inline] nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:634 [inline] nfnetlink_rcv+0xa6a/0x13a0 net/netfilter/nfnetlink.c:652 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x652/0x730 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x643/0x740 net/netlink/af_netlink.c:1921 Fixes: f102d66b335a ("netfilter: nf_tables: use dedicated mutex to guard transactions") Reported-by: Abhishek Shah Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 1 + net/netfilter/nf_tables_api.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5dc52d83baac30decf5f3b371d5eb41dfa1d1412 Author: Pablo Neira Ayuso Date: Sun Aug 21 10:28:25 2022 +0200 netfilter: nf_tables: disallow updates of implicit chain Updates on existing implicit chain make no sense, disallow this. Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING") Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 3 +++ 1 file changed, 3 insertions(+) commit c40e8341e3b3bb27e3a65b06b5b454626234c4f0 Merge: 072c92b1b1ef 763f4fb76e24 Author: Linus Torvalds Date: Tue Aug 23 19:33:28 2022 -0700 Merge tag 'cgroup-for-6.0-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: - The psi data structure was changed to be allocated dynamically but it wasn't being cleared leading to it reporting garbage values and triggering spurious oom kills. - A deadlock involving cpuset and cpu hotplug. - When a controller is moved across cgroup hierarchies, css->rstat_css_node didn't get RCU drained properly from the previous list. * tag 'cgroup-for-6.0-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: Fix race condition at rebind_subsystems() cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock sched/psi: Remove redundant cgroup_psi() when !CONFIG_CGROUPS sched/psi: Remove unused parameter nbytes of psi_trigger_create() sched/psi: Zero the memory of struct psi_group commit 072c92b1b1ef69c0e4898a70194ec2df70b15cd8 Merge: 062d26ad0b36 ad982c3be4e6 Author: Linus Torvalds Date: Tue Aug 23 19:26:48 2022 -0700 Merge tag 'audit-pr-20220823' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit fix from Paul Moore: "A single fix for a potential double-free on a fsnotify error path" * tag 'audit-pr-20220823' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: fix potential double free on error path from fsnotify_add_inode_mark commit 062d26ad0b36829c0142e5b96a694f3cdb6eaa43 Merge: df0219d11b6f 41191cf6bf56 Author: Linus Torvalds Date: Tue Aug 23 19:17:26 2022 -0700 Merge tag 'fs.fixes.v6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull file_remove_privs() fix from Christian Brauner: "As part of Stefan's and Jens' work to add async buffered write support to xfs we refactored file_remove_privs() and added __file_remove_privs() to avoid calling __remove_privs() when IOCB_NOWAIT is passed. While debugging a recent performance regression report I found that during review we missed that commit faf99b563558 ("fs: add __remove_file_privs() with flags parameter") accidently changed behavior when dentry_needs_remove_privs() returns zero. Before the commit it would still call inode_has_no_xattr() setting the S_NOSEC bit and thereby avoiding even calling into dentry_needs_remove_privs() the next time this function is called. After that commit inode_has_no_xattr() would only be called if __remove_privs() had to be called. Restore the old behavior. This is likely the cause of the performance regression" * tag 'fs.fixes.v6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: fs: __file_remove_privs(): restore call to inode_has_no_xattr() commit 6067c82c576af13a6b1c892b42ac4a189aced8ee Author: Jouni Högander Date: Mon Aug 22 17:08:36 2022 +0300 drm/i915/backlight: Disable pps power hook for aux based backlight Pps power hook seems to be problematic for backlight controlled via aux channel. Disable it for such cases. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3657 Cc: stable@vger.kernel.org Signed-off-by: Jouni Högander Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220822140836.534432-1-jouni.hogander@intel.com (cherry picked from commit 869e3bb7acb59d88c1226892136661810e8223a4) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_backlight.c | 11 ++++++++--- drivers/gpu/drm/i915/display/intel_dp.c | 2 -- 2 files changed, 8 insertions(+), 5 deletions(-) commit 868e8e5156a1f8d92ca83fdbac6fd52798650792 Author: Arun R Murthy Date: Mon Aug 8 09:27:50 2022 +0530 drm/i915/display: avoid warnings when registering dual panel backlight Commit 20f85ef89d94 ("drm/i915/backlight: use unique backlight device names") added support for multiple backlight devices on dual panel systems, but did so with error handling on -EEXIST from backlight_device_register(). Unfortunately, that triggered a warning in dmesg all the way down from sysfs_add_file_mode_ns() and sysfs_warn_dup(). Instead of optimistically always attempting to register with the default name ("intel_backlight", which we have to retain for backward compatibility), check if a backlight device with the name exists first, and, if so, use the card and connector based name. v2: reworked on top of the patch commit 20f85ef89d94 ("drm/i915/backlight: use unique backlight device names") v3: fixed the ref count leak(Jani N) Fixes: 20f85ef89d94 ("drm/i915/backlight: use unique backlight device names") Signed-off-by: Arun R Murthy Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220808035750.3111046-1-arun.r.murthy@intel.com (cherry picked from commit 4234ea30051200fc6016de10e4d58369e60b38f1) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_backlight.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 13393f65b77445d8b0f99c7b605cc9ccc936586f Author: Jani Nikula Date: Tue Aug 16 18:37:21 2022 +0300 drm/i915/dsi: fix dual-link DSI backlight and CABC ports for display 11+ The VBT dual-link DSI backlight and CABC still use ports A and C, both in Bspec and code, while display 11+ DSI only supports ports A and B. Assume port C actually means port B for display 11+ when parsing VBT. Bspec: 20154 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6476 Cc: stable@vger.kernel.org Signed-off-by: Jani Nikula Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/8c462718bcc7b36a83e09d0a5eef058b6bc8b1a2.1660664162.git.jani.nikula@intel.com (cherry picked from commit ab55165d73a444606af1530cd0d6448b04370f68) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_bios.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 607f41768a1ef9c7721866b00fbdeeea5359bc07 Author: Jani Nikula Date: Tue Aug 16 18:37:20 2022 +0300 drm/i915/dsi: filter invalid backlight and CABC ports Avoid using ports that aren't initialized in case the VBT backlight or CABC ports have invalid values. This fixes a NULL pointer dereference of intel_dsi->dsi_hosts[port] in such cases. Cc: stable@vger.kernel.org Signed-off-by: Jani Nikula Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/b0f4f087866257d280eb97d6bcfcefd109cc5fa2.1660664162.git.jani.nikula@intel.com (cherry picked from commit f4a6c7a454a6e71c5ccf25af82694213a9784013) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/icl_dsi.c | 7 +++++++ drivers/gpu/drm/i915/display/vlv_dsi.c | 7 +++++++ 2 files changed, 14 insertions(+) commit de2228c04150df8632ad22ee490de2ed579f64e8 Author: Daniele Ceraolo Spurio Date: Thu Aug 11 14:08:12 2022 -0700 drm/i915/guc: clear stalled request after a reset If the GuC CTs are full and we need to stall the request submission while waiting for space, we save the stalled request and where the stall occurred; when the CTs have space again we pick up the request submission from where we left off. If a full GT reset occurs, the state of all contexts is cleared and all non-guilty requests are unsubmitted, therefore we need to restart the stalled request submission from scratch. To make sure that we do so, clear the saved request after a reset. Fixes note: the patch that introduced the bug is in 5.15, but no officially supported platform had GuC submission enabled by default in that kernel, so the backport to that particular version (and only that one) can potentially be skipped. Fixes: 925dc1cf58ed ("drm/i915/guc: Implement GuC submission tasklet") Signed-off-by: Daniele Ceraolo Spurio Cc: Matthew Brost Cc: John Harrison Cc: # v5.15+ Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20220811210812.3239621-1-daniele.ceraolospurio@intel.com (cherry picked from commit f922fbb0f2ad1fd3e3186f39c46673419e6d9281) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8d905254162965c8e6be697d82c7dbf5d08f574d Author: Matthew Auld Date: Fri Aug 5 14:22:40 2022 +0100 drm/i915/ttm: fix CCS handling Crucible + recent Mesa seems to sometimes hit: GEM_BUG_ON(num_ccs_blks > NUM_CCS_BLKS_PER_XFER) And it looks like we can also trigger this with gem_lmem_swapping, if we modify the test to use slightly larger object sizes. Looking closer it looks like we have the following issues in migrate_copy(): - We are using plain integer in various places, which we can easily overflow with a large object. - We pass the entire object size (when the src is lmem) into emit_pte() and then try to copy it, which doesn't work, since we only have a few fixed sized windows in which to map the pages and perform the copy. With an object > 8M we therefore aren't properly copying the pages. And then with an object > 64M we trigger the GEM_BUG_ON(num_ccs_blks > NUM_CCS_BLKS_PER_XFER). So it looks like our copy handling for any object > 8M (which is our CHUNK_SZ) is currently broken on DG2. Fixes: da0595ae91da ("drm/i915/migrate: Evict and restore the flatccs capable lmem obj") Testcase: igt@gem_lmem_swapping Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Ramalingam C Reviewed-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20220805132240.442747-2-matthew.auld@intel.com (cherry picked from commit 8676145eb2f53a9940ff70910caf0125bd8a4bc2) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_migrate.c | 44 ++++++++++++++++----------------- 1 file changed, 21 insertions(+), 23 deletions(-) commit 550e9a4d858ff0bf872522eb4a802d549b45ac96 Merge: 311806784228 35419025cb1e Author: Jakub Kicinski Date: Tue Aug 23 17:50:26 2022 -0700 Merge tag 'mlx5-fixes-2022-08-22' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2022-08-22 This series provides bug fixes to mlx5 driver. * tag 'mlx5-fixes-2022-08-22' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: Unlock on error in mlx5_sriov_enable() net/mlx5e: Fix use after free in mlx5e_fs_init() net/mlx5e: kTLS, Use _safe() iterator in mlx5e_tls_priv_tx_list_cleanup() net/mlx5: unlock on error path in esw_vfs_changed_event_handler() net/mlx5e: Fix wrong tc flag used when set hw-tc-offload off net/mlx5e: TC, Add missing policer validation net/mlx5e: Fix wrong application of the LRO state net/mlx5: Avoid false positive lockdep warning by adding lock_class_key net/mlx5: Fix cmd error logging for manage pages cmd net/mlx5: Disable irq when locking lag_lock net/mlx5: Eswitch, Fix forwarding decision to uplink net/mlx5: LAG, fix logic over MLX5_LAG_FLAG_NDEVS_READY net/mlx5e: Properly disable vlan strip on non-UL reps ==================== Link: https://lore.kernel.org/r/20220822195917.216025-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 311806784228d3c3a0b86f116d2ea8b9fa90500e Merge: 1eec80946a73 9ead7e74bfd6 Author: Jakub Kicinski Date: Tue Aug 23 17:49:02 2022 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== ice: xsk: reduced queue count fixes Maciej Fijalkowski says: this small series is supposed to fix the issues around AF_XDP usage with reduced queue count on interface. Due to the XDP rings setup, some configurations can result in sockets not seeing traffic flowing. More about this in description of patch 2. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: xsk: use Rx ring's XDP ring when picking NAPI context ice: xsk: prohibit usage of non-balanced queue id ==================== Link: https://lore.kernel.org/r/20220822163257.2382487-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 1a6052e1483f28808845e51a1c82c96e0e7cd419 Author: Stefan Wahren Date: Wed Jul 13 17:49:53 2022 +0200 clk: bcm: rpi: Show clock id limit in error case The clock id limit will be extended in the future, so it would be helpful to see the actual clock id limit in case the firmware response has been rejected. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20220713154953.3336-4-stefan.wahren@i2se.com Acked-by: Florian Fainelli Reviewed-by: Ivan T. Ivanov Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-raspberrypi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 13b5cf8d6a0d4a5d289e1ed046cadc63b416db85 Author: Stefan Wahren Date: Wed Jul 13 17:49:52 2022 +0200 clk: bcm: rpi: Add missing newline Some log messages lacks the final newline. So add them. Fixes: 93d2725affd6 ("clk: bcm: rpi: Discover the firmware clocks") Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20220713154953.3336-3-stefan.wahren@i2se.com Acked-by: Florian Fainelli Reviewed-by: Ivan T. Ivanov Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-raspberrypi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bc163555603e4ae9c817675ad80d618a4cdbfa2d Author: Stefan Wahren Date: Wed Jul 13 17:49:51 2022 +0200 clk: bcm: rpi: Prevent out-of-bounds access The while loop in raspberrypi_discover_clocks() relies on the assumption that the id of the last clock element is zero. Because this data comes from the Videocore firmware and it doesn't guarantuee such a behavior this could lead to out-of-bounds access. So fix this by providing a sentinel element. Fixes: 93d2725affd6 ("clk: bcm: rpi: Discover the firmware clocks") Link: https://github.com/raspberrypi/firmware/issues/1688 Suggested-by: Phil Elwell Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20220713154953.3336-2-stefan.wahren@i2se.com Acked-by: Florian Fainelli Reviewed-by: Ivan T. Ivanov Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-raspberrypi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit e9ac503883abbd298b77477ccf60412bc0ca742f Merge: 1d9e325793db df0219d11b6f Author: Andrew Morton Date: Tue Aug 23 15:33:19 2022 -0700 Merge branch 'linus' commit 1eec80946a73e776fc9fe3209ca8fec2314fc76f Merge: 15f7cfae912e 366c30474172 Author: Jakub Kicinski Date: Tue Aug 23 15:32:24 2022 -0700 Merge branch 'bnxt_en-bug-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes This series includes 2 fixes for regressions introduced by the XDP multi-buffer feature, 1 devlink reload bug fix, and 1 SRIOV resource accounting bug fix. ==================== Link: https://lore.kernel.org/r/1661180814-19350-1-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 366c304741729e64d778c80555d9eb422cf5cc89 Author: Vikas Gupta Date: Mon Aug 22 11:06:54 2022 -0400 bnxt_en: fix LRO/GRO_HW features in ndo_fix_features callback LRO/GRO_HW should be disabled if there is an attached XDP program. BNXT_FLAG_TPA is the current setting of the LRO/GRO_HW. Using BNXT_FLAG_TPA to disable LRO/GRO_HW will cause these features to be permanently disabled once they are disabled. Fixes: 1dc4c557bfed ("bnxt: adding bnxt_xdp_build_skb to build skb from multibuffer xdp_buff") Signed-off-by: Vikas Gupta Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 09a89cc59ad67794a11e1d3dd13c5b3172adcc51 Author: Vikas Gupta Date: Mon Aug 22 11:06:53 2022 -0400 bnxt_en: fix NQ resource accounting during vf creation on 57500 chips There are 2 issues: 1. We should decrement hw_resc->max_nqs instead of hw_resc->max_irqs with the number of NQs assigned to the VFs. The IRQs are fixed on each function and cannot be re-assigned. Only the NQs are being assigned to the VFs. 2. vf_msix is the total number of NQs to be assigned to the VFs. So we should decrement vf_msix from hw_resc->max_nqs. Fixes: b16b68918674 ("bnxt_en: Add SR-IOV support for 57500 chips.") Signed-off-by: Vikas Gupta Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 574b2bb9692fd3d45ed631ac447176d4679f3010 Author: Vikas Gupta Date: Mon Aug 22 11:06:52 2022 -0400 bnxt_en: set missing reload flag in devlink features Add missing devlink_set_features() API for callbacks reload_down and reload_up to function. Fixes: 228ea8c187d8 ("bnxt_en: implement devlink dev reload driver_reinit") Reviewed-by: Somnath Kotur Signed-off-by: Vikas Gupta Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 1 + 1 file changed, 1 insertion(+) commit 7dd3de7cb1d657a918c6b2bc673c71e318aa0c05 Author: Pavan Chebbi Date: Mon Aug 22 11:06:51 2022 -0400 bnxt_en: Use PAGE_SIZE to init buffer when multi buffer XDP is not in use Using BNXT_PAGE_MODE_BUF_SIZE + offset as buffer length value is not sufficient when running single buffer XDP programs doing redirect operations. The stack will complain on missing skb tail room. Fix it by using PAGE_SIZE when calling xdp_init_buff() for single buffer programs. Fixes: b231c3f3414c ("bnxt: refactor bnxt_rx_xdp to separate xdp_init_buff/xdp_prepare_buff") Reviewed-by: Somnath Kotur Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit 0947ae1121083d363d522ff7518ee72b55bd8d29 Author: Kuniyuki Iwashima Date: Tue Aug 23 14:58:04 2022 -0700 bpf: Fix a data-race around bpf_jit_limit. While reading bpf_jit_limit, it can be changed concurrently via sysctl, WRITE_ONCE() in __do_proc_doulongvec_minmax(). The size of bpf_jit_limit is long, so we need to add a paired READ_ONCE() to avoid load-tearing. Fixes: ede95a63b5e8 ("bpf: add bpf_jit_limit knob to restrict unpriv allocations") Signed-off-by: Kuniyuki Iwashima Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220823215804.2177-1-kuniyu@amazon.com kernel/bpf/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15f7cfae912ea1739c8844b7edf3621ba981a37a Author: Vladimir Oltean Date: Thu Aug 18 19:48:09 2022 +0300 net: dsa: microchip: make learning configurable and keep it off while standalone Address learning should initially be turned off by the driver for port operation in standalone mode, then the DSA core handles changes to it via ds->ops->port_bridge_flags(). Leaving address learning enabled while ports are standalone breaks any kind of communication which involves port B receiving what port A has sent. Notably it breaks the ksz9477 driver used with a (non offloaded, ports act as if standalone) bonding interface in active-backup mode, when the ports are connected together through external switches, for redundancy purposes. This fixes a major design flaw in the ksz9477 and ksz8795 drivers, which unconditionally leave address learning enabled even while ports operate as standalone. Fixes: b987e98e50ab ("dsa: add DSA switch driver for Microchip KSZ9477") Link: https://lore.kernel.org/netdev/CAFZh4h-JVWt80CrQWkFji7tZJahMfOToUJQgKS5s0_=9zzpvYQ@mail.gmail.com/ Reported-by: Brian Hutchinson Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220818164809.3198039-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski drivers/net/dsa/microchip/ksz_common.c | 45 +++++++++++++++++++++++++++++++++- drivers/net/dsa/microchip/ksz_common.h | 1 + 2 files changed, 45 insertions(+), 1 deletion(-) commit e4009c5fa77b4356aa37ce002e9f9952dfd7a615 Author: Conor Dooley Date: Sat Aug 20 00:14:16 2022 +0100 riscv: dts: microchip: mpfs: remove pci axi address translation property An AXI master address translation table property was inadvertently added to the device tree & this was not caught by dtbs_check at the time. Remove the property - it should not be in mpfs.dtsi anyway as it would be more suitable in -fabric.dtsi nor does it actually apply to the version of the reference design we are using for upstream. Link: https://www.microsemi.com/document-portal/doc_download/1245812-polarfire-fpga-and-polarfire-soc-fpga-pci-express-user-guide # Section 1.3.3 Fixes: 528a5b1f2556 ("riscv: dts: microchip: add new peripherals to icicle kit device tree") Signed-off-by: Conor Dooley arch/riscv/boot/dts/microchip/mpfs.dtsi | 1 - 1 file changed, 1 deletion(-) commit 2b55915d27dcaa35f54bad7925af0a76001079bc Author: Conor Dooley Date: Sat Aug 20 00:14:15 2022 +0100 riscv: dts: microchip: mpfs: remove bogus card-detect-delay Recent versions of dt-schema warn about a previously undetected undocumented property: arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dtb: mmc@20008000: Unevaluated properties are not allowed ('card-detect-delay' was unexpected) From schema: Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml There are no GPIOs connected to MSSIO6B4 pin K3 so adding the common cd-debounce-delay-ms property makes no sense. The Cadence IP has a register that sets the card detect delay as "DP * tclk". On MPFS, this clock frequency is not configurable (it must be 200 MHz) & the FPGA comes out of reset with this register already set. Fixes: bc47b2217f24 ("riscv: dts: microchip: add the sundance polarberry") Fixes: 0fa6107eca41 ("RISC-V: Initial DTS for Microchip ICICLE board") Signed-off-by: Conor Dooley arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts | 1 - arch/riscv/boot/dts/microchip/mpfs-polarberry.dts | 1 - 2 files changed, 2 deletions(-) commit 72a05748cbd285567d69f173f8694e3471b79f20 Author: Conor Dooley Date: Sat Aug 20 00:14:14 2022 +0100 riscv: dts: microchip: mpfs: remove ti,fifo-depth property Recent versions of dt-schema warn about a previously undetected undocument property on the icicle & polarberry devicetrees: arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dtb: ethernet@20112000: ethernet-phy@8: Unevaluated properties are not allowed ('ti,fifo-depth' was unexpected) From schema: Documentation/devicetree/bindings/net/cdns,macb.yaml I know what you're thinking, the binding doesn't look to be the problem and I agree. I am not sure why a TI vendor property was ever actually added since it has no meaning... just get rid of it. Fixes: bc47b2217f24 ("riscv: dts: microchip: add the sundance polarberry") Fixes: 0fa6107eca41 ("RISC-V: Initial DTS for Microchip ICICLE board") Signed-off-by: Conor Dooley arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts | 2 -- arch/riscv/boot/dts/microchip/mpfs-polarberry.dts | 2 -- 2 files changed, 4 deletions(-) commit 3f67e69976035352db110443916bcce32c7f64ac Author: Conor Dooley Date: Sat Aug 20 00:14:13 2022 +0100 riscv: dts: microchip: mpfs: fix incorrect pcie child node name Recent versions of dt-schema complain about the PCIe controller's child node name: arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dtb: pcie@2000000000: Unevaluated properties are not allowed ('clock-names', 'clocks', 'legacy-interrupt-controller', 'microchip,axi-m-atr0' were unexpected) From schema: Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml Make the dts match the correct property name in the dts. Fixes: 528a5b1f2556 ("riscv: dts: microchip: add new peripherals to icicle kit device tree") Signed-off-by: Conor Dooley arch/riscv/boot/dts/microchip/mpfs.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df0219d11b6f04251d38e345db4f9780cb32e2e2 Merge: 95607ad99b5a 591d2108f3ab Author: Linus Torvalds Date: Tue Aug 23 13:42:31 2022 -0700 Merge tag 'parisc-for-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: "Some interesting background to the current patchset: It turned out that the fldw instruction (which loads a 32-bit word from memory into one half of a FP register) failed on unaligned addresses and even trashed some other random FP register instead. It's a trivial one-liner fix in the exception handler but this failure dates back to the very beginnings of the parisc-port. It's strange that it was never noticed before. Another patch fixes an annoyance noticed by Randy Dunlap. Running "make ARCH=parisc64 randconfig" always returned a 32-bit config, although one would expect a 64-bit config. Masahiro Yamada suggested to mimik sparc Kconfig code, which fixed the issue nicely. This allowed to drop some compiler build checks too. Third, it's possible to build an optimized 32-bit kernel for PA8X00 (64-bit) CPUs, which then wouldn't start on 32-bit-only (PA1.x) machines. I've added a bootup check which prevents that and which prints a message to the console. This can be tested with qemu, which currently only supports 32-bit emulation. The other patches are usual clean-up stuff like added return value checks and typo fixes in comments. Summary: - Fix emulation of fldw instruction on unaligned addresses - Fix "make ARCH=parisc64 randconfig" to return a 64-bit config - Prevent boot if trying to boot a 32-bit kernel compiled for PA8X00 CPUs on 32-bit only machines - ccio-dma: Handle kmalloc failure in ccio_init_resources()" * tag 'parisc-for-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Add runtime check to prevent PA2.0 kernels on PA1.x machines parisc: ccio-dma: Handle kmalloc failure in ccio_init_resources() parisc: led: Move from strlcpy with unused retval to strscpy parisc: ccio-dma: Fix typo in comment Revert "parisc: Show error if wrong 32/64-bit compiler is being used" parisc: Make CONFIG_64BIT available for ARCH=parisc64 only parisc: Fix exception handler for fldw and fstw instructions commit 95607ad99b5a4e3e69e025621165753718a6ea98 Merge: 6234806f8c9f 9c80e79906b4 Author: Linus Torvalds Date: Tue Aug 23 13:33:08 2022 -0700 Merge tag 'mm-hotfixes-stable-2022-08-22' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "Thirteen fixes, almost all for MM. Seven of these are cc:stable and the remainder fix up the changes which went into this -rc cycle" * tag 'mm-hotfixes-stable-2022-08-22' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: kprobes: don't call disarm_kprobe() for disabled kprobes mm/shmem: shmem_replace_page() remember NR_SHMEM mm/shmem: tmpfs fallocate use file_modified() mm/shmem: fix chattr fsflags support in tmpfs mm/hugetlb: support write-faults in shared mappings mm/hugetlb: fix hugetlb not supporting softdirty tracking mm/uffd: reset write protection when unregister with wp-mode mm/smaps: don't access young/dirty bit if pte unpresent mm: add DEVICE_ZONE to FOR_ALL_ZONES kernel/sys_ni: add compat entry for fadvise64_64 mm/gup: fix FOLL_FORCE COW security issue and remove FOLL_COW Revert "zram: remove double compression logic" get_maintainer: add Alan to .get_maintainer.ignore commit 6234806f8c9fe93f8db99cb47fc079ce78aabbd5 Merge: 3ee3d984102b 41a55567b9e3 Author: Linus Torvalds Date: Tue Aug 23 13:23:07 2022 -0700 Merge tag 'linux-kselftest-kunit-fixes-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull KUnit fixes from Shuah Khan: "Fix for a mmc test and to load .kunit_test_suites section when CONFIG_KUNIT=m, and not just when KUnit is built-in" * tag 'linux-kselftest-kunit-fixes-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: module: kunit: Load .kunit_test_suites section when CONFIG_KUNIT=m mmc: sdhci-of-aspeed: test: Fix dependencies when KUNIT=m commit f2c3bec215694fb8bc0ef5010f2a758d1906fc2d Author: Anand Jain Date: Fri Aug 12 18:32:19 2022 +0800 btrfs: add info when mount fails due to stale replace target If the replace target device reappears after the suspended replace is cancelled, it blocks the mount operation as it can't find the matching replace-item in the metadata. As shown below, BTRFS error (device sda5): replace devid present without an active replace item To overcome this situation, the user can run the command btrfs device scan --forget and try the mount command again. And also, to avoid repeating the issue, superblock on the devid=0 must be wiped. wipefs -a device-path-to-devid=0. This patch adds some info when this situation occurs. Reported-by: Samuel Greiner Link: https://lore.kernel.org/linux-btrfs/b4f62b10-b295-26ea-71f9-9a5c9299d42c@balkonien.org/T/ CC: stable@vger.kernel.org # 5.0+ Signed-off-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59a3991984dbc1fc47e5651a265c5200bd85464e Author: Anand Jain Date: Fri Aug 12 18:32:18 2022 +0800 btrfs: replace: drop assert for suspended replace If the filesystem mounts with the replace-operation in a suspended state and try to cancel the suspended replace-operation, we hit the assert. The assert came from the commit fe97e2e173af ("btrfs: dev-replace: replace's scrub must not be running in suspended state") that was actually not required. So just remove it. $ mount /dev/sda5 /btrfs BTRFS info (device sda5): cannot continue dev_replace, tgtdev is missing BTRFS info (device sda5): you may cancel the operation after 'mount -o degraded' $ mount -o degraded /dev/sda5 /btrfs <-- success. $ btrfs replace cancel /btrfs kernel: assertion failed: ret != -ENOTCONN, in fs/btrfs/dev-replace.c:1131 kernel: ------------[ cut here ]------------ kernel: kernel BUG at fs/btrfs/ctree.h:3750! After the patch: $ btrfs replace cancel /btrfs BTRFS info (device sda5): suspended dev_replace from /dev/sda5 (devid 1) to canceled Fixes: fe97e2e173af ("btrfs: dev-replace: replace's scrub must not be running in suspended state") CC: stable@vger.kernel.org # 5.0+ Signed-off-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 47bf225a8d2cccb15f7e8d4a1ed9b757dd86afd7 Author: Filipe Manana Date: Mon Aug 22 15:47:09 2022 +0100 btrfs: fix silent failure when deleting root reference At btrfs_del_root_ref(), if btrfs_search_slot() returns an error, we end up returning from the function with a value of 0 (success). This happens because the function returns the value stored in the variable 'err', which is 0, while the error value we got from btrfs_search_slot() is stored in the 'ret' variable. So fix it by setting 'err' with the error value. Fixes: 8289ed9f93bef2 ("btrfs: replace the BUG_ON in btrfs_del_root_ref with proper error handling") CC: stable@vger.kernel.org # 5.16+ Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/root-tree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ced8ecf026fd8084cf175530ff85c76d6085d715 Author: Omar Sandoval Date: Tue Aug 23 11:28:13 2022 -0700 btrfs: fix space cache corruption and potential double allocations When testing space_cache v2 on a large set of machines, we encountered a few symptoms: 1. "unable to add free space :-17" (EEXIST) errors. 2. Missing free space info items, sometimes caught with a "missing free space info for X" error. 3. Double-accounted space: ranges that were allocated in the extent tree and also marked as free in the free space tree, ranges that were marked as allocated twice in the extent tree, or ranges that were marked as free twice in the free space tree. If the latter made it onto disk, the next reboot would hit the BUG_ON() in add_new_free_space(). 4. On some hosts with no on-disk corruption or error messages, the in-memory space cache (dumped with drgn) disagreed with the free space tree. All of these symptoms have the same underlying cause: a race between caching the free space for a block group and returning free space to the in-memory space cache for pinned extents causes us to double-add a free range to the space cache. This race exists when free space is cached from the free space tree (space_cache=v2) or the extent tree (nospace_cache, or space_cache=v1 if the cache needs to be regenerated). struct btrfs_block_group::last_byte_to_unpin and struct btrfs_block_group::progress are supposed to protect against this race, but commit d0c2f4fa555e ("btrfs: make concurrent fsyncs wait less when waiting for a transaction commit") subtly broke this by allowing multiple transactions to be unpinning extents at the same time. Specifically, the race is as follows: 1. An extent is deleted from an uncached block group in transaction A. 2. btrfs_commit_transaction() is called for transaction A. 3. btrfs_run_delayed_refs() -> __btrfs_free_extent() runs the delayed ref for the deleted extent. 4. __btrfs_free_extent() -> do_free_extent_accounting() -> add_to_free_space_tree() adds the deleted extent back to the free space tree. 5. do_free_extent_accounting() -> btrfs_update_block_group() -> btrfs_cache_block_group() queues up the block group to get cached. block_group->progress is set to block_group->start. 6. btrfs_commit_transaction() for transaction A calls switch_commit_roots(). It sets block_group->last_byte_to_unpin to block_group->progress, which is block_group->start because the block group hasn't been cached yet. 7. The caching thread gets to our block group. Since the commit roots were already switched, load_free_space_tree() sees the deleted extent as free and adds it to the space cache. It finishes caching and sets block_group->progress to U64_MAX. 8. btrfs_commit_transaction() advances transaction A to TRANS_STATE_SUPER_COMMITTED. 9. fsync calls btrfs_commit_transaction() for transaction B. Since transaction A is already in TRANS_STATE_SUPER_COMMITTED and the commit is for fsync, it advances. 10. btrfs_commit_transaction() for transaction B calls switch_commit_roots(). This time, the block group has already been cached, so it sets block_group->last_byte_to_unpin to U64_MAX. 11. btrfs_commit_transaction() for transaction A calls btrfs_finish_extent_commit(), which calls unpin_extent_range() for the deleted extent. It sees last_byte_to_unpin set to U64_MAX (by transaction B!), so it adds the deleted extent to the space cache again! This explains all of our symptoms above: * If the sequence of events is exactly as described above, when the free space is re-added in step 11, it will fail with EEXIST. * If another thread reallocates the deleted extent in between steps 7 and 11, then step 11 will silently re-add that space to the space cache as free even though it is actually allocated. Then, if that space is allocated *again*, the free space tree will be corrupted (namely, the wrong item will be deleted). * If we don't catch this free space tree corruption, it will continue to get worse as extents are deleted and reallocated. The v1 space_cache is synchronously loaded when an extent is deleted (btrfs_update_block_group() with alloc=0 calls btrfs_cache_block_group() with load_cache_only=1), so it is not normally affected by this bug. However, as noted above, if we fail to load the space cache, we will fall back to caching from the extent tree and may hit this bug. The easiest fix for this race is to also make caching from the free space tree or extent tree synchronous. Josef tested this and found no performance regressions. A few extra changes fall out of this change. Namely, this fix does the following, with step 2 being the crucial fix: 1. Factor btrfs_caching_ctl_wait_done() out of btrfs_wait_block_group_cache_done() to allow waiting on a caching_ctl that we already hold a reference to. 2. Change the call in btrfs_cache_block_group() of btrfs_wait_space_cache_v1_finished() to btrfs_caching_ctl_wait_done(), which makes us wait regardless of the space_cache option. 3. Delete the now unused btrfs_wait_space_cache_v1_finished() and space_cache_v1_done(). 4. Change btrfs_cache_block_group()'s `int load_cache_only` parameter to `bool wait` to more accurately describe its new meaning. 5. Change a few callers which had a separate call to btrfs_wait_block_group_cache_done() to use wait = true instead. 6. Make btrfs_wait_block_group_cache_done() static now that it's not used outside of block-group.c anymore. Fixes: d0c2f4fa555e ("btrfs: make concurrent fsyncs wait less when waiting for a transaction commit") CC: stable@vger.kernel.org # 5.12+ Reviewed-by: Filipe Manana Signed-off-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/block-group.c | 47 +++++++++++++++-------------------------------- fs/btrfs/block-group.h | 4 +--- fs/btrfs/ctree.h | 1 - fs/btrfs/extent-tree.c | 30 ++++++------------------------ 4 files changed, 22 insertions(+), 60 deletions(-) commit 3ee3d984102bc4e0ae4c3cbd67c80c0d61514100 Merge: 072e51356cd5 bdbf0617bbc3 Author: Linus Torvalds Date: Tue Aug 23 13:13:36 2022 -0700 Merge tag 'linux-kselftest-fixes-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fixes from Shuah Khan: "Fixes to vm and sgx test builds" * tag 'linux-kselftest-fixes-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/vm: fix inability to build any vm tests selftests/sgx: Ignore OpenSSL 3.0 deprecated functions warning commit 18bbc3213383a82b05383827f4b1b882e3f0a5a5 Author: Florian Westphal Date: Sat Aug 20 17:54:06 2022 +0200 netfilter: nft_tproxy: restrict to prerouting hook TPROXY is only allowed from prerouting, but nft_tproxy doesn't check this. This fixes a crash (null dereference) when using tproxy from e.g. output. Fixes: 4ed8eb6570a4 ("netfilter: nf_tables: Add native tproxy support") Reported-by: Shell Chen Signed-off-by: Florian Westphal net/netfilter/nft_tproxy.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2a91980012abc54841da530a6de90f74a41c9e34 Merge: 13e575de5fd7 be919239fbca Author: Mark Brown Date: Tue Aug 23 19:36:36 2022 +0100 ASoC: nau8xxx: Implement hw constraint for rates Merge series from Takashi Iwai : This is a series of patches to address the issues on nau8xxx codecs I've stumbled upon while dealing with a bug report for Steam Deck. Most of them are to implement the missing hw constraint for rate restrictions while one patch is to fix the semaphore unbalance in nau8824 driver. commit 13e575de5fd7a78d7a5bc5df394c5d553f6a17b1 Merge: 4ee6fc271b59 2cf520ffbcbd Author: Mark Brown Date: Tue Aug 23 19:36:34 2022 +0100 ASoC: SOF: Kconfig: Fix the dependency for client modules Merge series from Peter Ujfalusi : There is still a chance to end up with a client driver selected as built in while the core SOF is as module. Fix this by making the client drivers depend on SND_SOC_SOF. commit 763f4fb76e24959c370cdaa889b2492ba6175580 Author: Jing-Ting Wu Date: Tue Aug 23 13:41:46 2022 +0800 cgroup: Fix race condition at rebind_subsystems() Root cause: The rebind_subsystems() is no lock held when move css object from A list to B list,then let B's head be treated as css node at list_for_each_entry_rcu(). Solution: Add grace period before invalidating the removed rstat_css_node. Reported-by: Jing-Ting Wu Suggested-by: Michal Koutný Signed-off-by: Jing-Ting Wu Tested-by: Jing-Ting Wu Link: https://lore.kernel.org/linux-arm-kernel/d8f0bc5e2fb6ed259f9334c83279b4c011283c41.camel@mediatek.com/T/ Acked-by: Mukesh Ojha Fixes: a7df69b81aac ("cgroup: rstat: support cgroup1") Cc: stable@vger.kernel.org # v5.13+ Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 1 + 1 file changed, 1 insertion(+) commit 6ca7076fbfaeccce173aeab832d76b9e49e1034b Author: Lukasz Luba Date: Tue Aug 16 13:01:57 2022 +0100 cpufreq: check only freq_table in __resolve_freq() There is no need to check if the cpufreq driver implements callback cpufreq_driver::target_index. The logic in the __resolve_freq uses the frequency table available in the policy. It doesn't matter if the driver provides 'target_index' or 'target' callback. It just has to populate the 'policy->freq_table'. Thus, check only frequency table during the frequency resolving call. Acked-by: Viresh Kumar Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea902bcc1943f7539200ec464de3f54335588774 Author: Tony Luck Date: Tue Aug 23 10:48:19 2022 -0700 x86/cpu: Add new Raptor Lake CPU model number Note1: Model 0xB7 already claimed the "no suffix" #define for a regular client part, so add (yet another) suffix "S" to distinguish this new part from the earlier one. Note2: the RAPTORLAKE* and ALDERLAKE* processors are very similar from a software enabling point of view. There are no known features that have model-specific enabling and also differ between the two. In other words, every single place that list *one* or more RAPTORLAKE* or ALDERLAKE* processors should list all of them. Note3: This is being merged before there is an in-tree user. Merging this provides an "anchor" so that the different folks can update their subsystems (like perf) in parallel to use this define and test it. [ dhansen: add a note about why this has no in-tree users yet ] Signed-off-by: Tony Luck Signed-off-by: Dave Hansen Link: https://lkml.kernel.org/r/20220823174819.223941-1-tony.luck@intel.com arch/x86/include/asm/intel-family.h | 2 ++ 1 file changed, 2 insertions(+) commit 7931e28098a4c1a2a6802510b0cbe57546d2049d Author: Lee, Chun-Yi Date: Mon Aug 8 21:21:58 2022 +0800 thermal/int340x_thermal: handle data_vault when the value is ZERO_SIZE_PTR In some case, the GDDV returns a package with a buffer which has zero length. It causes that kmemdup() returns ZERO_SIZE_PTR (0x10). Then the data_vault_read() got NULL point dereference problem when accessing the 0x10 value in data_vault. [ 71.024560] BUG: kernel NULL pointer dereference, address: 0000000000000010 This patch uses ZERO_OR_NULL_PTR() for checking ZERO_SIZE_PTR or NULL value in data_vault. Signed-off-by: "Lee, Chun-Yi" Signed-off-by: Rafael J. Wysocki drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 80b9ebd3e478cd41526cbf84f80c3e0eb885d1d3 Author: Jarrah Gosbell Date: Tue Aug 23 10:00:37 2022 -0700 Input: goodix - add compatible string for GT1158 Add compatible string for GT1158 missing from the previous patch. Fixes: 425fe4709c76 ("Input: goodix - add support for GT1158") Signed-off-by: Jarrah Gosbell Link: https://lore.kernel.org/r/20220813043821.9981-1-kernel@undef.tools Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/goodix.c | 1 + 1 file changed, 1 insertion(+) commit 4ee6fc271b59e805301371ea3862f558a23d9c7b Author: Bard Liao Date: Mon Aug 22 21:02:11 2022 +0200 ASoC: SOF: ipc4-topology: fix alh_group_ida max value group_id is from 0 ~ ALH_MULTI_GTW_COUNT - 1, not 0 ~ ALH_MULTI_GTW_COUNT. Fixes: a150345aa7584 ("ASoC: SOF: ipc4-topology: add SoundWire/ALH aggregation support") Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Rander Wang Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220822190211.170537-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c5c2baad2b55cc0a4b190266889959642298f79 Author: Nathan Chancellor Date: Tue Aug 9 18:08:09 2022 -0700 ASoC: mchp-spdiftx: Fix clang -Wbitfield-constant-conversion A recent change in clang strengthened its -Wbitfield-constant-conversion to warn when 1 is assigned to a 1-bit signed integer bitfield, as it can only be 0 or -1, not 1: sound/soc/atmel/mchp-spdiftx.c:505:20: error: implicit truncation from 'int' to bit-field changes value from 1 to -1 [-Werror,-Wbitfield-constant-conversion] dev->gclk_enabled = 1; ^ ~ 1 error generated. The actual value of the field is never checked, just that it is not zero, so there is not a real bug here. However, it is simple enough to silence the warning by making the bitfield unsigned, which matches the mchp-spdifrx driver. Fixes: 06ca24e98e6b ("ASoC: mchp-spdiftx: add driver for S/PDIF TX Controller") Link: https://github.com/ClangBuiltLinux/linux/issues/1686 Link: https://github.com/llvm/llvm-project/commit/82afc9b169a67e8b8a1862fb9c41a2cd974d6691 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20220810010809.2024482-1-nathan@kernel.org Signed-off-by: Mark Brown sound/soc/atmel/mchp-spdiftx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf97769c761abfeac8931b35fe0e1a8d5fabc9d8 Author: Florian Westphal Date: Fri Aug 19 00:42:31 2022 +0200 netfilter: conntrack: work around exceeded receive window When a TCP sends more bytes than allowed by the receive window, all future packets can be marked as invalid. This can clog up the conntrack table because of 5-day default timeout. Sequence of packets: 01 initiator > responder: [S], seq 171, win 5840, options [mss 1330,sackOK,TS val 63 ecr 0,nop,wscale 1] 02 responder > initiator: [S.], seq 33211, ack 172, win 65535, options [mss 1460,sackOK,TS val 010 ecr 63,nop,wscale 8] 03 initiator > responder: [.], ack 33212, win 2920, options [nop,nop,TS val 068 ecr 010], length 0 04 initiator > responder: [P.], seq 172:240, ack 33212, win 2920, options [nop,nop,TS val 279 ecr 010], length 68 Window is 5840 starting from 33212 -> 39052. 05 responder > initiator: [.], ack 240, win 256, options [nop,nop,TS val 872 ecr 279], length 0 06 responder > initiator: [.], seq 33212:34530, ack 240, win 256, options [nop,nop,TS val 892 ecr 279], length 1318 This is fine, conntrack will flag the connection as having outstanding data (UNACKED), which lowers the conntrack timeout to 300s. 07 responder > initiator: [.], seq 34530:35848, ack 240, win 256, options [nop,nop,TS val 892 ecr 279], length 1318 08 responder > initiator: [.], seq 35848:37166, ack 240, win 256, options [nop,nop,TS val 892 ecr 279], length 1318 09 responder > initiator: [.], seq 37166:38484, ack 240, win 256, options [nop,nop,TS val 892 ecr 279], length 1318 10 responder > initiator: [.], seq 38484:39802, ack 240, win 256, options [nop,nop,TS val 892 ecr 279], length 1318 Packet 10 is already sending more than permitted, but conntrack doesn't validate this (only seq is tested vs. maxend, not 'seq+len'). 38484 is acceptable, but only up to 39052, so this packet should not have been sent (or only 568 bytes, not 1318). At this point, connection is still in '300s' mode. Next packet however will get flagged: 11 responder > initiator: [P.], seq 39802:40128, ack 240, win 256, options [nop,nop,TS val 892 ecr 279], length 326 nf_ct_proto_6: SEQ is over the upper bound (over the window of the receiver) .. LEN=378 .. SEQ=39802 ACK=240 ACK PSH .. Now, a couple of replies/acks comes in: 12 initiator > responder: [.], ack 34530, win 4368, [.. irrelevant acks removed ] 16 initiator > responder: [.], ack 39802, win 8712, options [nop,nop,TS val 296201291 ecr 2982371892], length 0 This ack is significant -- this acks the last packet send by the responder that conntrack considered valid. This means that ack == td_end. This will withdraw the 'unacked data' flag, the connection moves back to the 5-day timeout of established conntracks. 17 initiator > responder: ack 40128, win 10030, ... This packet is also flagged as invalid. Because conntrack only updates state based on packets that are considered valid, packet 11 'did not exist' and that gets us: nf_ct_proto_6: ACK is over upper bound 39803 (ACKed data not seen yet) .. SEQ=240 ACK=40128 WINDOW=10030 RES=0x00 ACK URG Because this received and processed by the endpoints, the conntrack entry remains in a bad state, no packets will ever be considered valid again: 30 responder > initiator: [F.], seq 40432, ack 2045, win 391, .. 31 initiator > responder: [.], ack 40433, win 11348, .. 32 initiator > responder: [F.], seq 2045, ack 40433, win 11348 .. ... all trigger 'ACK is over bound' test and we end up with non-early-evictable 5-day default timeout. NB: This patch triggers a bunch of checkpatch warnings because of silly indent. I will resend the cleanup series linked below to reduce the indent level once this change has propagated to net-next. I could route the cleanup via nf but that causes extra backport work for stable maintainers. Link: https://lore.kernel.org/netfilter-devel/20220720175228.17880-1-fw@strlen.de/T/#mb1d7147d36294573cc4f81d00f9f8dadfdd06cd8 Signed-off-by: Florian Westphal net/netfilter/nf_conntrack_proto_tcp.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 7997eff82828304b780dc0a39707e1946d6f1ebf Author: Florian Westphal Date: Sat Aug 20 17:38:37 2022 +0200 netfilter: ebtables: reject blobs that don't provide all entry points Harshit Mogalapalli says: In ebt_do_table() function dereferencing 'private->hook_entry[hook]' can lead to NULL pointer dereference. [..] Kernel panic: general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f] [..] RIP: 0010:ebt_do_table+0x1dc/0x1ce0 Code: 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 5c 16 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 6c df 08 48 8d 7d 2c 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 88 [..] Call Trace: nf_hook_slow+0xb1/0x170 __br_forward+0x289/0x730 maybe_deliver+0x24b/0x380 br_flood+0xc6/0x390 br_dev_xmit+0xa2e/0x12c0 For some reason ebtables rejects blobs that provide entry points that are not supported by the table, but what it should instead reject is the opposite: blobs that DO NOT provide an entry point supported by the table. t->valid_hooks is the bitmask of hooks (input, forward ...) that will see packets. Providing an entry point that is not support is harmless (never called/used), but the inverse isn't: it results in a crash because the ebtables traverser doesn't expect a NULL blob for a location its receiving packets for. Instead of fixing all the individual checks, do what iptables is doing and reject all blobs that differ from the expected hooks. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Harshit Mogalapalli Reported-by: syzkaller Signed-off-by: Florian Westphal include/linux/netfilter_bridge/ebtables.h | 4 ---- net/bridge/netfilter/ebtable_broute.c | 8 -------- net/bridge/netfilter/ebtable_filter.c | 8 -------- net/bridge/netfilter/ebtable_nat.c | 8 -------- net/bridge/netfilter/ebtables.c | 8 +------- 5 files changed, 1 insertion(+), 35 deletions(-) commit 36527b9d882362567ceb4eea8666813280f30e6f Author: Riwen Lu Date: Tue Aug 23 15:43:42 2022 +0800 ACPI: processor: Remove freq Qos request for all CPUs The freq Qos request would be removed repeatedly if the cpufreq policy relates to more than one CPU. Then, it would cause the "called for unknown object" warning. Remove the freq Qos request for each CPU relates to the cpufreq policy, instead of removing repeatedly for the last CPU of it. Fixes: a1bb46c36ce3 ("ACPI: processor: Add QoS requests for all CPUs") Reported-by: Jeremy Linton Tested-by: Jeremy Linton Signed-off-by: Riwen Lu Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki drivers/acpi/processor_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b04ce966a738ecdd9294c9593e48513c0dc90aa Author: Karol Herbst Date: Fri Aug 19 22:09:28 2022 +0200 nouveau: explicitly wait on the fence in nouveau_bo_move_m2mf It is a bit unlcear to us why that's helping, but it does and unbreaks suspend/resume on a lot of GPUs without any known drawbacks. Cc: stable@vger.kernel.org # v5.15+ Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/156 Signed-off-by: Karol Herbst Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220819200928.401416-1-kherbst@redhat.com drivers/gpu/drm/nouveau/nouveau_bo.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit c6e50787889c8d55db65c769dccee98c7fcd1732 Author: Srinivas Kandagatla Date: Sun Aug 14 13:38:00 2022 +0100 soundwire: qcom: remove duplicate reset control get Looks like adding clock gate flag patch forgot to remove the old code that gets reset control. This causes below crash on platforms that do not need reset. [ 15.653501] reset_control_reset+0x124/0x170 [ 15.653508] qcom_swrm_init+0x50/0x1a0 [ 15.653514] qcom_swrm_probe+0x320/0x668 [ 15.653519] platform_probe+0x68/0xe0 [ 15.653529] really_probe+0xbc/0x2a8 [ 15.653535] __driver_probe_device+0x7c/0xe8 [ 15.653541] driver_probe_device+0x40/0x110 [ 15.653547] __device_attach_driver+0x98/0xd0 [ 15.653553] bus_for_each_drv+0x68/0xd0 [ 15.653559] __device_attach+0xf4/0x188 [ 15.653565] device_initial_probe+0x14/0x20 Fix this by removing old code. Reported-by: Amit Pundir Fixes: 1fd0d85affe4 ("soundwire: qcom: Add flag for software clock gating check") Signed-off-by: Srinivas Kandagatla Tested-by: Amit Pundir Link: https://lore.kernel.org/r/20220814123800.31200-1-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul drivers/soundwire/qcom.c | 4 ---- 1 file changed, 4 deletions(-) commit a9c3eda7eada94e8cf29cb102aa80e1370d8fa2e Author: Kanchan Joshi Date: Tue Aug 23 20:40:22 2022 +0530 io_uring: fix submission-failure handling for uring-cmd If ->uring_cmd returned an error value different from -EAGAIN or -EIOCBQUEUED, it gets overridden with IOU_OK. This invites trouble as caller (io_uring core code) handles IOU_OK differently than other error codes. Fix this by returning the actual error code. Signed-off-by: Kanchan Joshi Signed-off-by: Jens Axboe io_uring/uring_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22dec134dbfa825b963f8a1807ad19b943e46a56 Author: Takashi Iwai Date: Tue Aug 23 09:27:16 2022 +0200 ALSA: seq: oss: Fix data-race for max_midi_devs access ALSA OSS sequencer refers to a global variable max_midi_devs at creating a new port, storing it to its own field. Meanwhile this variable may be changed by other sequencer events at snd_seq_oss_midi_check_exit_port() in parallel, which may cause a data race. OTOH, this data race itself is almost harmless, as the access to the MIDI device is done via get_mdev() and it's protected with a refcount, hence its presence is guaranteed. Though, it's sill better to address the data-race from the code sanity POV, and this patch adds the proper spinlock for the protection. Reported-by: Abhishek Shah Cc: Link: https://lore.kernel.org/r/CAEHB2493pZRXs863w58QWnUTtv3HHfg85aYhLn5HJHCwxqtHQg@mail.gmail.com Link: https://lore.kernel.org/r/20220823072717.1706-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/seq/oss/seq_oss_midi.c | 2 ++ 1 file changed, 2 insertions(+) commit 855a28f9c96c80e6cbd2d986a857235e34868064 Author: Vladimir Oltean Date: Fri Aug 19 20:39:25 2022 +0300 net: dsa: don't dereference NULL extack in dsa_slave_changeupper() When a driver returns -EOPNOTSUPP in dsa_port_bridge_join() but failed to provide a reason for it, DSA attempts to set the extack to say that software fallback will kick in. The problem is, when we use brctl and the legacy bridge ioctls, the extack will be NULL, and DSA dereferences it in the process of setting it. Sergei Antonov proves this using the following stack trace: Unable to handle kernel NULL pointer dereference at virtual address 00000000 PC is at dsa_slave_changeupper+0x5c/0x158 dsa_slave_changeupper from raw_notifier_call_chain+0x38/0x6c raw_notifier_call_chain from __netdev_upper_dev_link+0x198/0x3b4 __netdev_upper_dev_link from netdev_master_upper_dev_link+0x50/0x78 netdev_master_upper_dev_link from br_add_if+0x430/0x7f4 br_add_if from br_ioctl_stub+0x170/0x530 br_ioctl_stub from br_ioctl_call+0x54/0x7c br_ioctl_call from dev_ifsioc+0x4e0/0x6bc dev_ifsioc from dev_ioctl+0x2f8/0x758 dev_ioctl from sock_ioctl+0x5f0/0x674 sock_ioctl from sys_ioctl+0x518/0xe40 sys_ioctl from ret_fast_syscall+0x0/0x1c Fix the problem by only overriding the extack if non-NULL. Fixes: 1c6e8088d9a7 ("net: dsa: allow port_bridge_join() to override extack message") Link: https://lore.kernel.org/netdev/CABikg9wx7vB5eRDAYtvAm7fprJ09Ta27a4ZazC=NX5K4wn6pWA@mail.gmail.com/ Reported-by: Sergei Antonov Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Tested-by: Sergei Antonov Link: https://lore.kernel.org/r/20220819173925.3581871-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski net/dsa/slave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b2e3a17e9f279325712b79fb01d1493f9e3e005 Author: Maciej Żenczykowski Date: Sun Aug 21 06:08:08 2022 -0700 net: ipvtap - add __init/__exit annotations to module init/exit funcs Looks to have been left out in an oversight. Cc: Mahesh Bandewar Cc: Sainath Grandhi Fixes: 235a9d89da97 ('ipvtap: IP-VLAN based tap driver') Signed-off-by: Maciej Żenczykowski Link: https://lore.kernel.org/r/20220821130808.12143-1-zenczykowski@gmail.com Signed-off-by: Paolo Abeni drivers/net/ipvlan/ipvtap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 47abea041f897d64dbd5777f0cf7745148f85d75 Author: Jens Axboe Date: Tue Aug 23 07:26:08 2022 -0600 io_uring: fix off-by-one in sync cancelation file check The passed in index should be validated against the number of registered files we have, it needs to be smaller than the index value to avoid going one beyond the end. Fixes: 78a861b94959 ("io_uring: add sync cancelation API through io_uring_register()") Reported-by: Luo Likang Signed-off-by: Jens Axboe io_uring/cancel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e1d0c6d05afdcff01ace698edb3b8808db1dc066 Author: Ammar Faizi Date: Tue Aug 23 18:45:49 2022 +0700 io_uring: uapi: Add `extern "C"` in io_uring.h for liburing Make it easy for liburing to integrate uapi header with the kernel. Previously, when this header changes, the liburing side can't directly copy this header file due to some small differences. Sync them. Link: https://lore.kernel.org/io-uring/f1feef16-6ea2-0653-238f-4aaee35060b6@kernel.dk Cc: Bart Van Assche Cc: Dylan Yudaken Cc: Facebook Kernel Team Signed-off-by: Ammar Faizi Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit c2fa700c5f7667800b6cfedcb9994eb5eb69e6cc Author: Ammar Faizi Date: Tue Aug 23 18:45:48 2022 +0700 MAINTAINERS: Add `include/linux/io_uring_types.h` File include/linux/io_uring_types.h doesn't have a maintainer, add it to the io_uring section. Signed-off-by: Ammar Faizi Signed-off-by: Jens Axboe MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 2cf520ffbcbd55c0f2b4276065444d7526d9d197 Author: Peter Ujfalusi Date: Tue Aug 23 15:15:54 2022 +0300 ASoC: SOF: Kconfig: Make IPC_MESSAGE_INJECTOR depend on SND_SOC_SOF Make sure that the IPC_MESSAGE_INJECTOR client can not be built in when SND_SOC_SOF is built as module. Fixes: cac0b0887e530 ("ASoC: SOF: Convert the generic IPC message injector into SOF client") Reported-by: kernel test robot Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220823121554.4255-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 3942499fba11de048c3ac1390b808e9e6ae88de5 Author: Peter Ujfalusi Date: Tue Aug 23 15:15:53 2022 +0300 ASoC: SOF: Kconfig: Make IPC_FLOOD_TEST depend on SND_SOC_SOF Make sure that the IPC_FLOOD client can not be built in when SND_SOC_SOF is built as module. Fixes: 6e9548cdb30e5 ("ASoC: SOF: Convert the generic IPC flood test into SOF client") Reported-by: kernel test robot Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220823121554.4255-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 388f9f0a7ff84b7890a24499a3a1fea0cad21373 Author: Frank Wunderlich Date: Sun Aug 21 14:19:29 2022 +0200 arm64: dts: rockchip: fix upper usb port on BPI-R2-Pro - extcon is no more needed in 5.19 - so drop it commit 51a9b2c03dd3 ("phy: rockchip-inno-usb2: Handle ID IRQ") - dr_mode was changed from host to otg in rk356x.dtsi commit bc405bb3eeee ("arm64: dts: rockchip: enable otg/drd operation of usb_host0_xhci in rk356x") change it back on board level as id-pin on r2pro is not connected Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20220821121929.244112-1-linux@fw-web.de Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a00c43818dcc19be97250d4c3c4a1e2f1ed4f9d Author: Jagan Teki Date: Mon Aug 22 16:05:24 2022 +0530 arm64: dts: rockchip: Fix typo in lisense text for PX30.Core Fix the Amarula Solutions typo mistake in lisense text added in Engicam PX30.Core SoM dtsi. Fixes: d92a7c331f53c ("arm64: dts: rockchip: Add Engicam PX30.Core SOM") Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20220822103524.266731-1-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/px30-engicam-px30-core.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e5467359a725de90b6b8d0dd865500f6373828ca Author: Brian Norris Date: Mon Aug 22 16:45:04 2022 -0700 arm64: dts: rockchip: Pull up wlan wake# on Gru-Bob The Gru-Bob board does not have a pull-up resistor on its WLAN_HOST_WAKE# pin, but Kevin does. The production/vendor kernel specified the pin configuration correctly as a pull-up, but this didn't get ported correctly to upstream. This means Bob's WLAN_HOST_WAKE# pin is floating, causing inconsistent wakeup behavior. Note that bt_host_wake_l has a similar dynamic, but apparently the upstream choice was to redundantly configure both internal and external pull-up on Kevin (see the "Kevin has an external pull up" comment in rk3399-gru.dtsi). This doesn't cause any functional problem, although it's perhaps wasteful. Fixes: 8559bbeeb849 ("arm64: dts: rockchip: add Google Bob") Signed-off-by: Brian Norris Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20220822164453.1.I75c57b48b0873766ec993bdfb7bc1e63da5a1637@changeid Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-gru-bob.dts | 5 +++++ arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi | 1 + 2 files changed, 6 insertions(+) commit 1ea90b2d293fd8b1f3377c9ed08364ff6f2a8562 Author: Nicolas Frattaroli Date: Thu Jul 21 06:43:06 2022 +0200 arm64: dts: rockchip: Lower sd speed on quartz64-b The previously stated speed of sdr-104 is too high for the hardware to reliably communicate with some fast SD cards. Lower this to sd-uhs-sdr50 to fix this. Fixes: dcc8c66bef79 ("arm64: dts: rockchip: add Pine64 Quartz64-B device tree") Signed-off-by: Nicolas Frattaroli Tested-by: Peter Geis Link: https://lore.kernel.org/r/20220721044307.48641-1-frattaroli.nicolas@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3566-quartz64-b.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1faa6f8274e2b08a38c0cca74113dfb26c6ad7b7 Author: Shengjiu Wang Date: Tue Aug 23 17:35:08 2022 +0800 ASoC: fsl_mqs: Fix supported clock DAI format The MQS works as codec DAI, not cpu DAI. It is clock consumer, not clock privider. Fixes: 3b14c15a333b ("ASoC: fsl: Update to use set_fmt_new callback") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1661247308-2650-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_mqs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be919239fbcab19290bfd6802c7ad1dc946c515b Author: Takashi Iwai Date: Tue Aug 23 10:10:00 2022 +0200 ASoC: nau8540: Implement hw constraint for rates nau8540 driver restricts the sample rate with over sampling rate, but currently it barely bails out at hw_params with -EINVAL error (with a kernel message); this doesn't help for user-space to recognize which rate can be actually used. This patch introduces the proper hw constraint for adjusting the available range of the sample rate depending on the OSR setup, as well as some code cleanup, for improving the communication with user-space. Now applications can know the valid rate beforehand and reduces the rate appropriately without errors. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20220823081000.2965-6-tiwai@suse.de Signed-off-by: Mark Brown sound/soc/codecs/nau8540.c | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) commit bed41de0f679c516de45cfeb2c40c412bc5e0c0b Author: Takashi Iwai Date: Tue Aug 23 10:09:59 2022 +0200 ASoC: nau8825: Implement hw constraint for rates nau8825 driver restricts the sample rate with over sampling rate, but currently it barely bails out at hw_params with -EINVAL error (with a kernel message); this doesn't help for user-space to recognize which rate can be actually used. This patch introduces the proper hw constraint for adjusting the available range of the sample rate depending on the OSR setup, as well as some code cleanup, for improving the communication with user-space. Now applications can know the valid rate beforehand and reduces the rate appropriately without errors. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20220823081000.2965-5-tiwai@suse.de Signed-off-by: Mark Brown sound/soc/codecs/nau8825.c | 83 +++++++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 38 deletions(-) commit 92283c86260d8712b55f97eada13b3c8b2f469b2 Author: Takashi Iwai Date: Tue Aug 23 10:09:58 2022 +0200 ASoC: nau8824: Implement hw constraint for rates nau8824 driver restricts the sample rate with over sampling rate, but currently it barely bails out at hw_params with -EINVAL error (with a kernel message); this doesn't help for user-space to recognize which rate can be actually used. This patch introduces the proper hw constraint for adjusting the available range of the sample rate depending on the OSR setup, as well as some code cleanup, for improving the communication with user-space. Now applications can know the valid rate beforehand and reduces the rate appropriately without errors. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20220823081000.2965-4-tiwai@suse.de Signed-off-by: Mark Brown sound/soc/codecs/nau8824.c | 67 ++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 29 deletions(-) commit 5628560e90395d3812800a8e44a01c32ffa429ec Author: Takashi Iwai Date: Tue Aug 23 10:09:57 2022 +0200 ASoC: nau8824: Fix semaphore unbalance at error paths The semaphore of nau8824 wasn't properly unlocked at some error handling code paths, hence this may result in the unbalance (and potential lock-up). Fix them to handle the semaphore up properly. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20220823081000.2965-3-tiwai@suse.de Signed-off-by: Mark Brown sound/soc/codecs/nau8824.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit cf5071876baf995f8f98e86ef06f85a58feda63c Author: Takashi Iwai Date: Tue Aug 23 10:09:56 2022 +0200 ASoC: nau8821: Implement hw constraint for rates nau8821 driver restricts the sample rate with over sampling rate, but currently it barely bails out at hw_params with -EINVAL error (with a kernel message); this doesn't help for user-space to recognize which rate can be actually used. This patch introduces the proper hw constraint for adjusting the available range of the sample rate depending on the OSR setup, as well as some code cleanup, for improving the communication with user-space. Now applications can know the valid rate beforehand and reduces the rate appropriately without errors. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20220823081000.2965-2-tiwai@suse.de Signed-off-by: Mark Brown sound/soc/codecs/nau8821.c | 66 +++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 30 deletions(-) commit 40d30cf680cb735eed479a2fee127a7bc7fa3d4e Author: Cristian Marussi Date: Thu Aug 18 14:23:09 2022 +0100 firmware: arm_scmi: Harmonize SCMI tracing message format After the recently added new scmi_msg_dump traces, the general format of the various other SCMI traces are not consistent. As an example the full traces of a simple PERF_LEVEL_SET: | cpufreq-set-276 scmi_xfer_begin: transfer_id=145 msg_id=7 protocol_id=19 seq=145 poll=0 | cpufreq-set-276 scmi_msg_dump: pt=13 t=CMND msg_id=07 seq=0091 s=0 pyld=000000008066ab13 | cpufreq-set-276 scmi_xfer_response_wait: transfer_id=145 msg_id=7 protocol_id=19 seq=145 tmo_ms=5000 poll=0 | -0 scmi_msg_dump: pt=13 t=RESP msg_id=07 seq=0091 s=0 pyld= | -0 scmi_rx_done: transfer_id=145 msg_id=7 protocol_id=19 seq=145 msg_type=0 | cpufreq-set-276 scmi_xfer_end: transfer_id=145 msg_id=7 protocol_id=19 seq=145 status=0 ... where the same information is being reported using different names (protocol_id= vs pt=) and even worst different bases, which is hard to read and to parse. So let us unify them, using the same naming and ordering of the fields (wherever possible) and moving all the protocol related fields to base-16 while keeping in base-10 timeouts, res_id and values, so that the new traces would be like: | cpufreq-set-274 scmi_xfer_begin: pt=13 msg_id=07 seq=0092 transfer_id=92 poll=0 | cpufreq-set-274 scmi_msg_dump: pt=13 t=CMND msg_id=07 seq=0092 s=0 pyld=000000008066ab13 | cpufreq-set-274 scmi_xfer_response_wait: pt=13 msg_id=07 seq=0092 transfer_id=92 tmo_ms=5000 poll=0 | cat-256 scmi_msg_dump: pt=13 t=RESP msg_id=07 seq=0092 s=0 pyld= | cat-256 scmi_rx_done: pt=13 msg_id=07 seq=0092 transfer_id=92 msg_type=0 | cpufreq-set-274 scmi_xfer_end: pt=13 msg_id=07 seq=0092 transfer_id=92 s=0 Link: https://lore.kernel.org/r/20220818132309.584042-2-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla include/trace/events/scmi.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit dea796fcab0a219830831c070b8dc367d7e0f708 Author: Cristian Marussi Date: Wed Aug 17 18:27:31 2022 +0100 firmware: arm_scmi: Add SCMI PM driver remove routine Currently, when removing the SCMI PM driver not all the resources registered with genpd subsystem are properly de-registered. As a side effect of this after a driver unload/load cycle you get a splat with a few warnings like this: | debugfs: Directory 'BIG_CPU0' with parent 'pm_genpd' already present! | debugfs: Directory 'BIG_CPU1' with parent 'pm_genpd' already present! | debugfs: Directory 'LITTLE_CPU0' with parent 'pm_genpd' already present! | debugfs: Directory 'LITTLE_CPU1' with parent 'pm_genpd' already present! | debugfs: Directory 'LITTLE_CPU2' with parent 'pm_genpd' already present! | debugfs: Directory 'LITTLE_CPU3' with parent 'pm_genpd' already present! | debugfs: Directory 'BIG_SSTOP' with parent 'pm_genpd' already present! | debugfs: Directory 'LITTLE_SSTOP' with parent 'pm_genpd' already present! | debugfs: Directory 'DBGSYS' with parent 'pm_genpd' already present! | debugfs: Directory 'GPUTOP' with parent 'pm_genpd' already present! Add a proper scmi_pm_domain_remove callback to the driver in order to take care of all the needed cleanups not handled by devres framework. Link: https://lore.kernel.org/r/20220817172731.1185305-7-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/scmi_pm_domain.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit b75c83d9b961fd3abf7310f8d36d5e6e9f573efb Author: Cristian Marussi Date: Wed Aug 17 18:27:30 2022 +0100 firmware: arm_scmi: Fix the asynchronous reset requests SCMI Reset protocol specification allows the asynchronous reset request only when an autonomous reset action is specified. Reset requests based on explicit assert/deassert of signals should not be served asynchronously. Current implementation will instead issue an asynchronous request in any case, as long as the reset domain had advertised to support asynchronous resets. Avoid requesting the asynchronous resets when the reset action is not of the autonomous type, even if the target reset domain does, in general, support the asynchronous requests. Link: https://lore.kernel.org/r/20220817172731.1185305-6-cristian.marussi@arm.com Fixes: 95a15d80aa0d ("firmware: arm_scmi: Add RESET protocol in SCMI v2.0") Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/reset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e9076ffbcaed5da6c182b144ef9f6e24554af268 Author: Cristian Marussi Date: Wed Aug 17 18:27:29 2022 +0100 firmware: arm_scmi: Harden accesses to the reset domains Accessing reset domains descriptors by the index upon the SCMI drivers requests through the SCMI reset operations interface can potentially lead to out-of-bound violations if the SCMI driver misbehave. Add an internal consistency check before any such domains descriptors accesses. Link: https://lore.kernel.org/r/20220817172731.1185305-5-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/reset.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a4f124908617553ea3929a17293cea4960c92ba3 Author: Saravana Kannan Date: Fri Aug 19 15:16:14 2022 -0700 Revert "iommu/of: Delete usage of driver_deferred_probe_check_state()" This reverts commit b09796d528bbf06e3e10a4a8f78038719da7ebc6. An issue was reported[1] on the original commit. I'll need to address that before I can delete the use of driver_deferred_probe_check_state(). So, bring it back for now. [1] - https://lore.kernel.org/lkml/4799738.LvFx2qVVIh@steina-w/ Fixes: b09796d528bb ("iommu/of: Delete usage of driver_deferred_probe_check_state()") Reported-by: Jean-Philippe Brucker Tested-by: Jean-Philippe Brucker Tested-by: Alexander Stein Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20220819221616.2107893-5-saravanak@google.com Signed-off-by: Greg Kroah-Hartman drivers/iommu/of_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e20813dcdc05aa295ef586b518142d0fab4c5692 Author: Saravana Kannan Date: Fri Aug 19 15:16:13 2022 -0700 Revert "PM: domains: Delete usage of driver_deferred_probe_check_state()" This reverts commit 5a46079a96451cfb15e4f5f01f73f7ba24ef851a. Quite a few issues have been reported [1][2][3][4][5][6] on the original commit. While about half of them have been fixed, I'll need to fix the rest before driver_deferred_probe_check_state() can be deleted. So, revert the deletion for now. [1] - https://lore.kernel.org/all/DU0PR04MB941735271F45C716342D0410886B9@DU0PR04MB9417.eurprd04.prod.outlook.com/ [2] - https://lore.kernel.org/all/CM6REZS9Z8AC.2KCR9N3EFLNQR@otso/ [3] - https://lore.kernel.org/all/CAD=FV=XYVwaXZxqUKAuM5c7NiVjFz5C6m6gAHSJ7rBXBF94_Tg@mail.gmail.com/ [4] - https://lore.kernel.org/all/Yvpd2pwUJGp7R+YE@euler/ [5] - https://lore.kernel.org/lkml/20220601070707.3946847-2-saravanak@google.com/ [6] - https://lore.kernel.org/all/CA+G9fYt_cc5SiNv1Vbse=HYY_+uc+9OYPZuJ-x59bROSaLN6fw@mail.gmail.com/ Fixes: 5a46079a9645 ("PM: domains: Delete usage of driver_deferred_probe_check_state()") Reported-by: Peng Fan Reported-by: Luca Weiss Reported-by: Doug Anderson Reported-by: Colin Foster Reported-by: Tony Lindgren Reported-by: Alexander Stein Reported-by: Naresh Kamboju Tested-by: Tony Lindgren Tested-by: Peng Fan Tested-by: Douglas Anderson Tested-by: Alexander Stein Reviewed-by: Tony Lindgren Acked-by: Ulf Hansson Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20220819221616.2107893-4-saravanak@google.com Signed-off-by: Greg Kroah-Hartman drivers/base/power/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cffaf9721f755b46370e7be0592dc41168c95019 Author: Saravana Kannan Date: Fri Aug 19 15:16:12 2022 -0700 Revert "net: mdio: Delete usage of driver_deferred_probe_check_state()" This reverts commit f8217275b57aa48d98cc42051c2aac34152718d6. There are a few more issues to fix that have been reported in the thread for the original series [1]. We'll need to fix those before this will work. So, revert it for now. [1] - https://lore.kernel.org/lkml/CAMuHMdWo_wRwV-i_iyTxVnEsf3Th9GBAG+wxUQMQGnw1t2ijTg@mail.gmail.com/ Fixes: f8217275b57a ("net: mdio: Delete usage of driver_deferred_probe_check_state()") Reported-by: Geert Uytterhoeven Tested-by: Alexander Stein Reviewed-by: Tony Lindgren Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20220819221616.2107893-3-saravanak@google.com Signed-off-by: Greg Kroah-Hartman drivers/net/mdio/fwnode_mdio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 13a8e0f6b01b14b2e28ba144e112c883f03a3db2 Author: Saravana Kannan Date: Fri Aug 19 15:16:11 2022 -0700 Revert "driver core: Delete driver_deferred_probe_check_state()" This reverts commit 9cbffc7a59561be950ecc675d19a3d2b45202b2b. There are a few more issues to fix that have been reported in the thread for the original series [1]. We'll need to fix those before this will work. So, revert it for now. [1] - https://lore.kernel.org/lkml/20220601070707.3946847-1-saravanak@google.com/ Fixes: 9cbffc7a5956 ("driver core: Delete driver_deferred_probe_check_state()") Tested-by: Tony Lindgren Tested-by: Peng Fan Tested-by: Douglas Anderson Tested-by: Alexander Stein Reviewed-by: Tony Lindgren Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20220819221616.2107893-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman drivers/base/dd.c | 30 ++++++++++++++++++++++++++++++ include/linux/device/driver.h | 1 + 2 files changed, 31 insertions(+) commit 714f3cbd70a4db9f9b7fe5b8a032896ed33fb824 Author: Mark Brown Date: Wed Aug 17 19:23:24 2022 +0100 arm64/sme: Don't flush SVE register state when handling SME traps Currently as part of handling a SME access trap we flush the SVE register state. This is not needed and would corrupt register state if the task has access to the SVE registers already. For non-streaming mode accesses the required flushing will be done in the SVE access trap. For streaming mode SVE register accesses the architecture guarantees that the register state will be flushed when streaming mode is entered or exited so there is no need for us to do so. Simply remove the register initialisation. Fixes: 8bd7f91c03d8 ("arm64/sme: Implement traps and syscall handling for SME") Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20220817182324.638214-5-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 11 ----------- 1 file changed, 11 deletions(-) commit 826a4fdd2ada9e5923c58bdd168f31a42e958ffc Author: Mark Brown Date: Wed Aug 17 19:23:23 2022 +0100 arm64/sme: Don't flush SVE register state when allocating SME storage Currently when taking a SME access trap we allocate storage for the SVE register state in order to be able to handle storage of streaming mode SVE. Due to the original usage in a purely SVE context the SVE register state allocation this also flushes the register state for SVE if storage was already allocated but in the SME context this is not desirable. For a SME access trap to be taken the task must not be in streaming mode so either there already is SVE register state present for regular SVE mode which would be corrupted or the task does not have TIF_SVE and the flush is redundant. Fix this by adding a flag to sve_alloc() indicating if we are in a SVE context and need to flush the state. Freshly allocated storage is always zeroed either way. Fixes: 8bd7f91c03d8 ("arm64/sme: Implement traps and syscall handling for SME") Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20220817182324.638214-4-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/fpsimd.h | 4 ++-- arch/arm64/kernel/fpsimd.c | 10 ++++++---- arch/arm64/kernel/ptrace.c | 6 +++--- arch/arm64/kernel/signal.c | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) commit ea64baacbc36a0d552aec0d87107182f40211131 Author: Mark Brown Date: Wed Aug 17 19:23:22 2022 +0100 arm64/signal: Flush FPSIMD register state when disabling streaming mode When handling a signal delivered to a context with streaming mode enabled we will disable streaming mode for the signal handler, when doing so we should also flush the saved FPSIMD register state like exiting streaming mode in the hardware would do so that if that state is reloaded we get the same behaviour. Without this we will reload whatever the last FPSIMD state that was saved for the task was. Fixes: 40a8e87bb328 ("arm64/sme: Disable ZA and streaming mode when handling signals") Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20220817182324.638214-3-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/signal.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7ddcaf78e93c9282b4d92184f511b4d5bee75355 Author: Mark Brown Date: Wed Aug 17 19:23:21 2022 +0100 arm64/signal: Raise limit on stack frames The signal code has a limit of 64K on the size of a stack frame that it will generate, if this limit is exceeded then a process will be killed if it receives a signal. Unfortunately with the advent of SME this limit is too small - the maximum possible size of the ZA register alone is 64K. This is not an issue for practical systems at present but is easily seen using virtual platforms. Raise the limit to 256K, this is substantially more than could be used by any current architecture extension. Signed-off-by: Mark Brown Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20220817182324.638214-2-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53d2d84a1f6d68e036adab71df8e0f37cd2724f6 Author: Mark Brown Date: Thu Aug 18 22:36:13 2022 +0100 arm64/cache: Fix cache_type_cwg() for register generation Ard noticed that since we converted CTR_EL0 to automatic generation we have been seeing errors on some systems handling the value of cache_type_cwg() such as CPU features: No Cache Writeback Granule information, assuming 128 This is because the manual definition of CTR_EL0_CWG_MASK was done without a shift while our convention is to define the mask after shifting. This means that the user in cache_type_cwg() was broken as it was written for the manually written shift then mask. Fix this by converting to use SYS_FIELD_GET(). The only other field where the _MASK for this register is used is IminLine which is at offset 0 so unaffected. Fixes: 9a3634d02301 ("arm64/sysreg: Convert CTR_EL0 to automatic generation") Reported-by: Ard Biesheuvel Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220818213613.733091-4-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a10edea4efbba4e8756f493781e953dd3592f24a Author: Mark Brown Date: Thu Aug 18 22:36:12 2022 +0100 arm64/sysreg: Guard SYS_FIELD_ macros for asm The SYS_FIELD_ macros are not safe for assembly contexts, move them inside the guarded section. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220818213613.733091-3-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 02e483f8d414cc4f467389843d61b63bbbbcd892 Author: Mark Brown Date: Thu Aug 18 22:36:11 2022 +0100 arm64/sysreg: Directly include bitfield.h The SYS_FIELD_ macros in sysreg.h use definitions from bitfield.h but there is no direct inclusion of it, add one to ensure that sysreg.h is directly usable. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220818213613.733091-2-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 1 + 1 file changed, 1 insertion(+) commit e75d18cecbb3805895d8ed64da4f78575ec96043 Author: Sudeep Holla Date: Mon Aug 8 09:46:40 2022 +0100 arm64: cacheinfo: Fix incorrect assignment of signed error value to unsigned fw_level Though acpi_find_last_cache_level() always returned signed value and the document states it will return any errors caused by lack of a PPTT table, it never returned negative values before. Commit 0c80f9e165f8 ("ACPI: PPTT: Leave the table mapped for the runtime usage") however changed it by returning -ENOENT if no PPTT was found. The value returned from acpi_find_last_cache_level() is then assigned to unsigned fw_level. It will result in the number of cache leaves calculated incorrectly as a huge value which will then cause the following warning from __alloc_pages as the order would be great than MAX_ORDER because of incorrect and huge cache leaves value. | WARNING: CPU: 0 PID: 1 at mm/page_alloc.c:5407 __alloc_pages+0x74/0x314 | Modules linked in: | CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.19.0-10393-g7c2a8d3ac4c0 #73 | pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) | pc : __alloc_pages+0x74/0x314 | lr : alloc_pages+0xe8/0x318 | Call trace: | __alloc_pages+0x74/0x314 | alloc_pages+0xe8/0x318 | kmalloc_order_trace+0x68/0x1dc | __kmalloc+0x240/0x338 | detect_cache_attributes+0xe0/0x56c | update_siblings_masks+0x38/0x284 | store_cpu_topology+0x78/0x84 | smp_prepare_cpus+0x48/0x134 | kernel_init_freeable+0xc4/0x14c | kernel_init+0x2c/0x1b4 | ret_from_fork+0x10/0x20 Fix the same by changing fw_level to be signed integer and return the error from init_cache_level() early in case of error. Reported-and-Tested-by: Bruno Goncalves Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20220808084640.3165368-1-sudeep.holla@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/cacheinfo.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e89d120c4b720e232cc6a94f0fcbd59c15d41489 Author: Ionela Voinescu Date: Fri Aug 19 11:30:50 2022 +0100 arm64: errata: add detection for AMEVCNTR01 incrementing incorrectly The AMU counter AMEVCNTR01 (constant counter) should increment at the same rate as the system counter. On affected Cortex-A510 cores, AMEVCNTR01 increments incorrectly giving a significantly higher output value. This results in inaccurate task scheduler utilization tracking and incorrect feedback on CPU frequency. Work around this problem by returning 0 when reading the affected counter in key locations that results in disabling all users of this counter from using it either for frequency invariance or as FFH reference counter. This effect is the same to firmware disabling affected counters. Details on how the two features are affected by this erratum: - AMU counters will not be used for frequency invariance for affected CPUs and CPUs in the same cpufreq policy. AMUs can still be used for frequency invariance for unaffected CPUs in the system. Although unlikely, if no alternative method can be found to support frequency invariance for affected CPUs (cpufreq based or solution based on platform counters) frequency invariance will be disabled. Please check the chapter on frequency invariance at Documentation/scheduler/sched-capacity.rst for details of its effect. - Given that FFH can be used to fetch either the core or constant counter values, restrictions are lifted regarding any of these counters returning a valid (!0) value. Therefore FFH is considered supported if there is a least one CPU that support AMUs, independent of any counters being disabled or affected by this erratum. Clarifying comments are now added to the cpc_ffh_supported(), cpu_read_constcnt() and cpu_read_corecnt() functions. The above is achieved through adding a new erratum: ARM64_ERRATUM_2457168. Signed-off-by: Ionela Voinescu Reviewed-by: Catalin Marinas Cc: Catalin Marinas Cc: Will Deacon Cc: James Morse Link: https://lore.kernel.org/r/20220819103050.24211-1-ionela.voinescu@arm.com Signed-off-by: Will Deacon Documentation/arm64/silicon-errata.rst | 2 ++ arch/arm64/Kconfig | 17 +++++++++++++++++ arch/arm64/kernel/cpu_errata.c | 10 ++++++++++ arch/arm64/kernel/cpufeature.c | 5 ++++- arch/arm64/kernel/topology.c | 32 ++++++++++++++++++++++++++++++-- arch/arm64/tools/cpucaps | 1 + 6 files changed, 64 insertions(+), 3 deletions(-) commit 2e8cff0a0eee87b27f0cf87ad8310eb41b5886ab Author: Mark Rutland Date: Wed Aug 17 16:40:22 2022 +0100 arm64: fix rodata=full On arm64, "rodata=full" has been suppored (but not documented) since commit: c55191e96caa9d78 ("arm64: mm: apply r/o permissions of VM areas to its linear alias as well") As it's necessary to determine the rodata configuration early during boot, arm64 has an early_param() handler for this, whereas init/main.c has a __setup() handler which is run later. Unfortunately, this split meant that since commit: f9a40b0890658330 ("init/main.c: return 1 from handled __setup() functions") ... passing "rodata=full" would result in a spurious warning from the __setup() handler (though RO permissions would be configured appropriately). Further, "rodata=full" has been broken since commit: 0d6ea3ac94ca77c5 ("lib/kstrtox.c: add "false"/"true" support to kstrtobool()") ... which caused strtobool() to parse "full" as false (in addition to many other values not documented for the "rodata=" kernel parameter. This patch fixes this breakage by: * Moving the core parameter parser to an __early_param(), such that it is available early. * Adding an (optional) arch hook which arm64 can use to parse "full". * Updating the documentation to mention that "full" is valid for arm64. * Having the core parameter parser handle "on" and "off" explicitly, such that any undocumented values (e.g. typos such as "ful") are reported as errors rather than being silently accepted. Note that __setup() and early_param() have opposite conventions for their return values, where __setup() uses 1 to indicate a parameter was handled and early_param() uses 0 to indicate a parameter was handled. Fixes: f9a40b089065 ("init/main.c: return 1 from handled __setup() functions") Fixes: 0d6ea3ac94ca ("lib/kstrtox.c: add "false"/"true" support to kstrtobool()") Signed-off-by: Mark Rutland Cc: Andy Shevchenko Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Jagdish Gediya Cc: Matthew Wilcox Cc: Randy Dunlap Cc: Will Deacon Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220817154022.3974645-1-mark.rutland@arm.com Signed-off-by: Will Deacon Documentation/admin-guide/kernel-parameters.txt | 2 ++ arch/arm64/include/asm/setup.h | 17 +++++++++++++++++ arch/arm64/mm/mmu.c | 18 ------------------ init/main.c | 18 +++++++++++++++--- 4 files changed, 34 insertions(+), 21 deletions(-) commit 729a916599eaf13df66ae5404f5489f38518ea8c Author: Kuan-Ying Lee Date: Thu Jul 21 11:05:31 2022 +0800 arm64: Fix comment typo Replace wrong 'FIQ EL1h' comment with 'FIQ EL1t'. Signed-off-by: Kuan-Ying Lee Link: https://lore.kernel.org/r/20220721030531.21234-1-Kuan-Ying.Lee@mediatek.com Signed-off-by: Will Deacon arch/arm64/kernel/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b52f76351bf87f35b62195fca874b6055125bc6 Author: Martin Liška Date: Thu Aug 18 22:31:57 2022 +0200 docs/arm64: elf_hwcaps: unify newlines in HWCAP lists Unify horizontal spacing (remove extra newlines) which are sensitive to visual presentation by Sphinx. Fixes: 5e64b862c482 ("arm64/sme: Basic enumeration support") Signed-off-by: Martin Liska Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/84e3d6cc-75cf-d6f3-9bb8-be02075aaf6d@suse.cz Signed-off-by: Will Deacon Documentation/arm64/elf_hwcaps.rst | 10 ---------- 1 file changed, 10 deletions(-) commit a582123d6f4c6a0ae850864974eb7afd01fffab7 Merge: db7e5c10351e 0096fc879358 Author: Greg Kroah-Hartman Date: Tue Aug 23 10:42:19 2022 +0200 Merge tag 'iio-fixes-for-6.0a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus Jonathan writes: "1st set of IIO fixes for 6.0-rc1 adi,ad7292 - Prevent duplicate disable of regulator in error path. bosch,bmg160 - Correct dt-binding to allow for 2 interrupt pins. capella,cm3605 - Fix missing error cleanup due to premature return. capella,cm32181 - Fix missing static on local symbol. microchip,mcp33911 - Correctly handle sign bit. - Fix mismatch between driver and DT binding, including fallback to old driver behavior. - Use correct formula for voltage calculation." * tag 'iio-fixes-for-6.0a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: light: cm32181: make cm32181_pm_ops static iio: ad7292: Prevent regulator double disable dt-bindings: iio: gyroscope: bosch,bmg160: correct number of pins iio: adc: mcp3911: use correct formula for AD conversion iio: adc: mcp3911: correct "microchip,device-addr" property iio: light: cm3605: Fix an error handling path in cm3605_probe() iio: adc: mcp3911: make use of the sign bit commit ba0803050d610d5072666be727bca5e03e55b242 Author: David Howells Date: Tue Aug 23 02:10:56 2022 -0500 smb3: missing inode locks in punch hole smb3 fallocate punch hole was not grabbing the inode or filemap_invalidate locks so could have race with pagemap reinstantiating the page. Cc: stable@vger.kernel.org Signed-off-by: David Howells Signed-off-by: Steve French fs/cifs/smb2ops.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b5a990209d72615e3cac2b3b0d8ddd445c020cf5 Author: Jilin Yuan Date: Fri Jul 8 23:15:38 2022 +0800 net/ieee802154: fix repeated words in comments Delete the redundant word 'was'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220708151538.51483-1-yuanjilin@cdjrlc.com Signed-off-by: Stefan Schmidt drivers/net/ieee802154/ca8210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit afe7116f6d3b888778ed6d95e3cf724767b9aedf Author: Lin Ma Date: Mon Aug 8 11:42:24 2022 +0800 ieee802154/adf7242: defer destroy_workqueue call There is a possible race condition (use-after-free) like below (FREE) | (USE) adf7242_remove | adf7242_channel cancel_delayed_work_sync | destroy_workqueue (1) | adf7242_cmd_rx | mod_delayed_work (2) | The root cause for this race is that the upper layer (ieee802154) is unaware of this detaching event and the function adf7242_channel can be called without any checks. To fix this, we can add a flag write at the beginning of adf7242_remove and add flag check in adf7242_channel. Or we can just defer the destructive operation like other commit 3e0588c291d6 ("hamradio: defer ax25 kfree after unregister_netdev") which let the ieee802154_unregister_hw() to handle the synchronization. This patch takes the second option. Fixes: 58e9683d1475 ("net: ieee802154: adf7242: Fix OCL calibration runs") Signed-off-by: Lin Ma Acked-by: Michael Hennerich Link: https://lore.kernel.org/r/20220808034224.12642-1-linma@zju.edu.cn Signed-off-by: Stefan Schmidt drivers/net/ieee802154/adf7242.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5f73aa2cf8bef4a39baa1591c3144ede4788826e Author: Takashi Iwai Date: Tue Aug 23 08:54:55 2022 +0200 Revert "usb: typec: ucsi: add a common function ucsi_unregister_connectors()" The recent commit 87d0e2f41b8c ("usb: typec: ucsi: add a common function ucsi_unregister_connectors()") introduced a regression that caused NULL dereference at reading the power supply sysfs. It's a stale sysfs entry that should have been removed but remains with NULL ops. The commit changed the error handling to skip the entries after a NULL con->wq, and this leaves the power device unreleased. For addressing the regression, the straight revert is applied here. Further code improvements can be done from the scratch again. Link: https://bugzilla.suse.com/show_bug.cgi?id=1202386 Link: https://lore.kernel.org/r/87r11cmbx0.wl-tiwai@suse.de Fixes: 87d0e2f41b8c ("usb: typec: ucsi: add a common function ucsi_unregister_connectors()") Cc: Acked-by: Heikki Krogerus Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20220823065455.32579-1-tiwai@suse.de Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/ucsi.c | 53 ++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 29 deletions(-) commit e41a88f38d87f730647bb14df9211d32241d1176 Author: Johan Hovold Date: Mon Aug 22 12:05:50 2022 +0200 usb: dwc3: qcom: suppress unused-variable warning The dwc3_qcom_read_usb2_speed() helper is now only called when the controller is acting as host, but the compiler will warn that the hcd variable is unused in gadget-only W=1 builds. Fixes: c06795f114a6 ("usb: dwc3: qcom: fix gadget-only builds") Reported-by: kernel test robot Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220822100550.3039-1-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/dwc3-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c919c164fc87bcca8e80b3b9224492fa5b6455ba Author: David Howells Date: Tue Aug 23 01:01:36 2022 -0500 smb3: missing inode locks in zero range smb3 fallocate zero range was not grabbing the inode or filemap_invalidate locks so could have race with pagemap reinstantiating the page. Cc: stable@vger.kernel.org Signed-off-by: David Howells Signed-off-by: Steve French fs/cifs/smb2ops.c | 55 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 25 deletions(-) commit 4f3e509996a877dca1ddffc2abdbb5857727bfc4 Author: Lukas Bulwahn Date: Mon Aug 22 21:44:50 2022 -0700 MAINTAINERS: add include/dt-bindings/input to INPUT DRIVERS Maintainers of the directory Documentation/devicetree/bindings/input are also the maintainers of the corresponding directory include/dt-bindings/input. Add the file entry for include/dt-bindings/input to the appropriate section in MAINTAINERS. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220613115654.28117-1-lukas.bulwahn@gmail.com Signed-off-by: Dmitry Torokhov MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 785538bfdd682c8e962341d585f9b88262a0475e Author: Bart Van Assche Date: Tue Aug 16 10:26:38 2022 -0700 scsi: sd: Revert "Rework asynchronous resume support" Although commit 88f1669019bd ("scsi: sd: Rework asynchronous resume support") eliminates a delay for some ATA disks after resume, it causes resume of ATA disks to fail on other setups. See also: * "Resume process hangs for 5-6 seconds starting sometime in 5.16" (https://bugzilla.kernel.org/show_bug.cgi?id=215880). * Geert's regression report (https://lore.kernel.org/linux-scsi/alpine.DEB.2.22.394.2207191125130.1006766@ramsan.of.borg/). This is what I understand about this issue: * During resume, ata_port_pm_resume() starts the SCSI error handler. This changes the SCSI host state into SHOST_RECOVERY and causes scsi_queue_rq() to return BLK_STS_RESOURCE. * sd_resume() calls sd_start_stop_device() for ATA devices. That function in turn calls sd_submit_start() which tries to submit a START STOP UNIT command. That command can only be submitted after the SCSI error handler has changed the SCSI host state back to SHOST_RUNNING. * The SCSI error handler runs on its own thread and calls schedule_work(&(ap->scsi_rescan_task)). That causes ata_scsi_dev_rescan() to be called from the context of a kernel workqueue. That call hangs in blk_mq_get_tag(). I'm not sure why - maybe because all available tags have been allocated by sd_submit_start() calls (this is a guess). Link: https://lore.kernel.org/r/20220816172638.538734-1-bvanassche@acm.org Fixes: 88f1669019bd ("scsi: sd: Rework asynchronous resume support") Cc: Damien Le Moal Cc: Hannes Reinecke Cc: Geert Uytterhoeven Cc: gzhqyz@gmail.com Reported-by: Geert Uytterhoeven Reported-by: gzhqyz@gmail.com Reported-and-tested-by: Vlastimil Babka Tested-by: John Garry Tested-by: Hans de Goede Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 84 ++++++++++++------------------------------------------- drivers/scsi/sd.h | 5 ---- 2 files changed, 18 insertions(+), 71 deletions(-) commit 35f73cca1cecda0c1f8bb7d8be4ce5cd2d46ae8c Author: Stefan Wahren Date: Sat Jun 25 10:36:43 2022 +0200 clk: bcm: rpi: Fix error handling of raspberrypi_fw_get_rate The function raspberrypi_fw_get_rate (e.g. used for the recalc_rate hook) can fail to get the clock rate from the firmware. In this case we cannot return a signed error value, which would be casted to unsigned long. Fix this by returning 0 instead. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20220625083643.4012-1-stefan.wahren@i2se.com Fixes: 4e85e535e6cc ("clk: bcm283x: add driver interfacing with Raspberry Pi's firmware") Acked-by: Florian Fainelli Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-raspberrypi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b1ac04698a4bfec146322502cdcd9904c1777fa Author: Kajol Jain Date: Thu Aug 4 13:18:52 2022 +0530 powerpc/papr_scm: Fix nvdimm event mappings Commit 4c08d4bbc089 ("powerpc/papr_scm: Add perf interface support") added performance monitoring support for papr-scm nvdimm devices via perf interface. Commit also added an array in papr_scm_priv structure called "nvdimm_events_map", which got filled based on the result of H_SCM_PERFORMANCE_STATS hcall. Currently there is an assumption that the order of events in the stats buffer, returned by the hypervisor is same. And order also happens to matches with the events specified in nvdimm driver code. But this assumption is not documented in Power Architecture Platform Requirements (PAPR) document. Although the order of events happens to be same on current generation od system, but it might not be true in future generation systems. Fix the issue, by adding a static mapping for nvdimm events to corresponding stat-id, and removing the dynamic map from papr_scm_priv structure. Also remove the function papr_scm_pmu_check_events from papr_scm.c file, as we no longer need to copy stat-ids dynamically. Fixes: 4c08d4bbc089 ("powerpc/papr_scm: Add perf interface support") Reported-by: Aneesh Kumar K.V Signed-off-by: Kajol Jain Reviewed-by: Vaibhav Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220804074852.55157-1-kjain@linux.ibm.com arch/powerpc/platforms/pseries/papr_scm.c | 88 ++++++++++--------------------- 1 file changed, 27 insertions(+), 61 deletions(-) commit 5003e52c311a2135d737ae906577c639fbaafe54 Merge: 0ee7828dfc56 f2e44dffa97f Author: Jakub Kicinski Date: Mon Aug 22 18:30:27 2022 -0700 Merge branch 'bonding-802-3ad-fix-no-transmission-of-lacpdus' Jonathan Toppins says: ==================== bonding: 802.3ad: fix no transmission of LACPDUs Configuring a bond in a specific order can leave the bond in a state where it never transmits LACPDUs. The first patch adds some kselftest infrastructure and the reproducer that demonstrates the problem. The second patch fixes the issue. The new third patch makes ad_ticks_per_sec a static const and removes the passing of this variable via the stack. ==================== Link: https://lore.kernel.org/r/cover.1660919940.git.jtoppins@redhat.com Signed-off-by: Jakub Kicinski commit f2e44dffa97f2e1c222a959ea5b6e604548b891b Author: Jonathan Toppins Date: Fri Aug 19 11:15:14 2022 -0400 bonding: 3ad: make ad_ticks_per_sec a const The value is only ever set once in bond_3ad_initialize and only ever read otherwise. There seems to be no reason to set the variable via bond_3ad_initialize when setting the global variable will do. Change ad_ticks_per_sec to a const to enforce its read-only usage. Signed-off-by: Jonathan Toppins Acked-by: Jay Vosburgh Signed-off-by: Jakub Kicinski drivers/net/bonding/bond_3ad.c | 11 +++-------- drivers/net/bonding/bond_main.c | 2 +- include/net/bond_3ad.h | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) commit d745b5062ad2b5da90a5e728d7ca884fc07315fd Author: Jonathan Toppins Date: Fri Aug 19 11:15:13 2022 -0400 bonding: 802.3ad: fix no transmission of LACPDUs This is caused by the global variable ad_ticks_per_sec being zero as demonstrated by the reproducer script discussed below. This causes all timer values in __ad_timer_to_ticks to be zero, resulting in the periodic timer to never fire. To reproduce: Run the script in `tools/testing/selftests/drivers/net/bonding/bond-break-lacpdu-tx.sh` which puts bonding into a state where it never transmits LACPDUs. line 44: ip link add fbond type bond mode 4 miimon 200 \ xmit_hash_policy 1 ad_actor_sys_prio 65535 lacp_rate fast setting bond param: ad_actor_sys_prio given: params.ad_actor_system = 0 call stack: bond_option_ad_actor_sys_prio() -> bond_3ad_update_ad_actor_settings() -> set ad.system.sys_priority = bond->params.ad_actor_sys_prio -> ad.system.sys_mac_addr = bond->dev->dev_addr; because params.ad_actor_system == 0 results: ad.system.sys_mac_addr = bond->dev->dev_addr line 48: ip link set fbond address 52:54:00:3B:7C:A6 setting bond MAC addr call stack: bond->dev->dev_addr = new_mac line 52: ip link set fbond type bond ad_actor_sys_prio 65535 setting bond param: ad_actor_sys_prio given: params.ad_actor_system = 0 call stack: bond_option_ad_actor_sys_prio() -> bond_3ad_update_ad_actor_settings() -> set ad.system.sys_priority = bond->params.ad_actor_sys_prio -> ad.system.sys_mac_addr = bond->dev->dev_addr; because params.ad_actor_system == 0 results: ad.system.sys_mac_addr = bond->dev->dev_addr line 60: ip link set veth1-bond down master fbond given: params.ad_actor_system = 0 params.mode = BOND_MODE_8023AD ad.system.sys_mac_addr == bond->dev->dev_addr call stack: bond_enslave -> bond_3ad_initialize(); because first slave -> if ad.system.sys_mac_addr != bond->dev->dev_addr return results: Nothing is run in bond_3ad_initialize() because dev_addr equals sys_mac_addr leaving the global ad_ticks_per_sec zero as it is never initialized anywhere else. The if check around the contents of bond_3ad_initialize() is no longer needed due to commit 5ee14e6d336f ("bonding: 3ad: apply ad_actor settings changes immediately") which sets ad.system.sys_mac_addr if any one of the bonding parameters whos set function calls bond_3ad_update_ad_actor_settings(). This is because if ad.system.sys_mac_addr is zero it will be set to the current bond mac address, this causes the if check to never be true. Fixes: 5ee14e6d336f ("bonding: 3ad: apply ad_actor settings changes immediately") Signed-off-by: Jonathan Toppins Acked-by: Jay Vosburgh Signed-off-by: Jakub Kicinski drivers/net/bonding/bond_3ad.c | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) commit c078290a2b7618473a7d0a05334cc91fe0ac2949 Author: Jonathan Toppins Date: Fri Aug 19 11:15:12 2022 -0400 selftests: include bonding tests into the kselftest infra This creates a test collection in drivers/net/bonding for bonding specific kernel selftests. The first test is a reproducer that provisions a bond and given the specific order in how the ip-link(8) commands are issued the bond never transmits an LACPDU frame on any of its slaves. Signed-off-by: Jonathan Toppins Acked-by: Jay Vosburgh Signed-off-by: Jakub Kicinski MAINTAINERS | 1 + tools/testing/selftests/Makefile | 1 + .../testing/selftests/drivers/net/bonding/Makefile | 6 ++ .../drivers/net/bonding/bond-break-lacpdu-tx.sh | 81 ++++++++++++++++++++++ tools/testing/selftests/drivers/net/bonding/config | 1 + .../testing/selftests/drivers/net/bonding/settings | 1 + 6 files changed, 91 insertions(+) commit 0ee7828dfc56e97d71e51e6374dc7b4eb2b6e081 Author: Sergei Antonov Date: Fri Aug 19 14:05:19 2022 +0300 net: moxa: get rid of asymmetry in DMA mapping/unmapping Since priv->rx_mapping[i] is maped in moxart_mac_open(), we should unmap it from moxart_mac_stop(). Fixes 2 warnings. 1. During error unwinding in moxart_mac_probe(): "goto init_fail;", then moxart_mac_free_memory() calls dma_unmap_single() with priv->rx_mapping[i] pointers zeroed. WARNING: CPU: 0 PID: 1 at kernel/dma/debug.c:963 check_unmap+0x704/0x980 DMA-API: moxart-ethernet 92000000.mac: device driver tries to free DMA memory it has not allocated [device address=0x0000000000000000] [size=1600 bytes] CPU: 0 PID: 1 Comm: swapper Not tainted 5.19.0+ #60 Hardware name: Generic DT based system unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x34/0x44 dump_stack_lvl from __warn+0xbc/0x1f0 __warn from warn_slowpath_fmt+0x94/0xc8 warn_slowpath_fmt from check_unmap+0x704/0x980 check_unmap from debug_dma_unmap_page+0x8c/0x9c debug_dma_unmap_page from moxart_mac_free_memory+0x3c/0xa8 moxart_mac_free_memory from moxart_mac_probe+0x190/0x218 moxart_mac_probe from platform_probe+0x48/0x88 platform_probe from really_probe+0xc0/0x2e4 2. After commands: ip link set dev eth0 down ip link set dev eth0 up WARNING: CPU: 0 PID: 55 at kernel/dma/debug.c:570 add_dma_entry+0x204/0x2ec DMA-API: moxart-ethernet 92000000.mac: cacheline tracking EEXIST, overlapping mappings aren't supported CPU: 0 PID: 55 Comm: ip Not tainted 5.19.0+ #57 Hardware name: Generic DT based system unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x34/0x44 dump_stack_lvl from __warn+0xbc/0x1f0 __warn from warn_slowpath_fmt+0x94/0xc8 warn_slowpath_fmt from add_dma_entry+0x204/0x2ec add_dma_entry from dma_map_page_attrs+0x110/0x328 dma_map_page_attrs from moxart_mac_open+0x134/0x320 moxart_mac_open from __dev_open+0x11c/0x1ec __dev_open from __dev_change_flags+0x194/0x22c __dev_change_flags from dev_change_flags+0x14/0x44 dev_change_flags from devinet_ioctl+0x6d4/0x93c devinet_ioctl from inet_ioctl+0x1ac/0x25c v1 -> v2: Extraneous change removed. Fixes: 6c821bd9edc9 ("net: Add MOXA ART SoCs ethernet driver") Signed-off-by: Sergei Antonov Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20220819110519.1230877-1-saproj@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/moxa/moxart_ether.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 6dbe852c379ff032a70a6b13a91914918c82cb07 Author: Xiaolei Wang Date: Fri Aug 19 16:24:51 2022 +0800 net: phy: Don't WARN for PHY_READY state in mdio_bus_phy_resume() For some MAC drivers, they set the mac_managed_pm to true in its ->ndo_open() callback. So before the mac_managed_pm is set to true, we still want to leverage the mdio_bus_phy_suspend()/resume() for the phy device suspend and resume. In this case, the phy device is in PHY_READY, and we shouldn't warn about this. It also seems that the check of mac_managed_pm in WARN_ON is redundant since we already check this in the entry of mdio_bus_phy_resume(), so drop it. Fixes: 744d23c71af3 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state") Signed-off-by: Xiaolei Wang Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20220819082451.1992102-1-xiaolei.wang@windriver.com Signed-off-by: Jakub Kicinski drivers/net/phy/phy_device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b8d4380365c515d8e0351f2f46d371738dd19be1 Author: Alex Elder Date: Thu Aug 18 08:42:05 2022 -0500 net: ipa: don't assume SMEM is page-aligned In ipa_smem_init(), a Qualcomm SMEM region is allocated (if needed) and then its virtual address is fetched using qcom_smem_get(). The physical address associated with that region is also fetched. The physical address is adjusted so that it is page-aligned, and an attempt is made to update the size of the region to compensate for any non-zero adjustment. But that adjustment isn't done properly. The physical address is aligned twice, and as a result the size is never actually adjusted. Fix this by *not* aligning the "addr" local variable, and instead making the "phys" local variable be the adjusted "addr" value. Fixes: a0036bb413d5b ("net: ipa: define SMEM memory region for IPA") Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20220818134206.567618-1-elder@linaro.org Signed-off-by: Jakub Kicinski drivers/net/ipa/ipa_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fbb08eb7f945c7e8896ea39f03143ce66dfa4c7 Author: Vladimir Oltean Date: Thu Aug 18 17:32:50 2022 +0300 net: dsa: microchip: keep compatibility with device tree blobs with no phy-mode DSA has multiple ways of specifying a MAC connection to an internal PHY. One requires a DT description like this: port@0 { reg = <0>; phy-handle = <&internal_phy>; phy-mode = "internal"; }; (which is IMO the recommended approach, as it is the clearest description) but it is also possible to leave the specification as just: port@0 { reg = <0>; } and if the driver implements ds->ops->phy_read and ds->ops->phy_write, the DSA framework "knows" it should create a ds->slave_mii_bus, and it should connect to a non-OF-based internal PHY on this MDIO bus, at an MDIO address equal to the port address. There is also an intermediary way of describing things: port@0 { reg = <0>; phy-handle = <&internal_phy>; }; In case 2, DSA calls phylink_connect_phy() and in case 3, it calls phylink_of_phy_connect(). In both cases, phylink_create() has been called with a phy_interface_t of PHY_INTERFACE_MODE_NA, and in both cases, PHY_INTERFACE_MODE_NA is translated into phy->interface. It is important to note that phy_device_create() initializes dev->interface = PHY_INTERFACE_MODE_GMII, and so, when we use phylink_create(PHY_INTERFACE_MODE_NA), no one will override this, and we will end up with a PHY_INTERFACE_MODE_GMII interface inherited from the PHY. All this means that in order to maintain compatibility with device tree blobs where the phy-mode property is missing, we need to allow the "gmii" phy-mode and treat it as "internal". Fixes: 2c709e0bdad4 ("net: dsa: microchip: ksz8795: add phylink support") Link: https://bugzilla.kernel.org/show_bug.cgi?id=216320 Reported-by: Craig McQueen Signed-off-by: Vladimir Oltean Reviewed-by: Alvin Šipraga Tested-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20220818143250.2797111-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski drivers/net/dsa/microchip/ksz_common.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 99077ad668ddd9b4823cc8ce3f3c7a3fc56f6fd9 Author: Peter Robinson Date: Mon Aug 22 16:33:18 2022 -0700 Input: rk805-pwrkey - fix module autoloading Add the module alias so the rk805-pwrkey driver will autoload when built as a module. Fixes: 5a35b85c2d92 ("Input: add power key driver for Rockchip RK805 PMIC") Signed-off-by: Peter Robinson Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20220612225437.3628788-1-pbrobinson@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/misc/rk805-pwrkey.c | 1 + 1 file changed, 1 insertion(+) commit 1d9e325793db26a5f816cdc54346eeaed2af31a3 Merge: 072e51356cd5 9c80e79906b4 Author: Andrew Morton Date: Mon Aug 22 16:53:21 2022 -0700 Merge branch 'mm-hotfixes-stable' commit 4b592061f7b3971c70e8b72fc42aaead47c24701 Author: Chen-Yu Tsai Date: Mon Aug 22 16:14:24 2022 +0800 clk: core: Fix runtime PM sequence in clk_core_unprepare() In the original commit 9a34b45397e5 ("clk: Add support for runtime PM"), the commit message mentioned that pm_runtime_put_sync() would be done at the end of clk_core_unprepare(). This mirrors the operations in clk_core_prepare() in the opposite order. However, the actual code that was added wasn't in the order the commit message described. Move clk_pm_runtime_put() to the end of clk_core_unprepare() so that it is in the correct order. Fixes: 9a34b45397e5 ("clk: Add support for runtime PM") Signed-off-by: Chen-Yu Tsai Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220822081424.1310926-3-wenst@chromium.org Signed-off-by: Stephen Boyd drivers/clk/clk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 35b0fac808b95eea1212f8860baf6ad25b88b087 Author: Chen-Yu Tsai Date: Mon Aug 22 16:14:23 2022 +0800 clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops In the previous commits that added CLK_OPS_PARENT_ENABLE, support for this flag was only added to rate change operations (rate setting and reparent) and disabling unused subtree. It was not added to the clock gate related operations. Any hardware driver that needs it for these operations will either see bogus results, or worse, hang. This has been seen on MT8192 and MT8195, where the imp_ii2_* clk drivers set this, but dumping debugfs clk_summary would cause it to hang. Fixes: fc8726a2c021 ("clk: core: support clocks which requires parents enable (part 2)") Fixes: a4b3518d146f ("clk: core: support clocks which requires parents enable (part 1)") Signed-off-by: Chen-Yu Tsai Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220822081424.1310926-2-wenst@chromium.org Signed-off-by: Stephen Boyd drivers/clk/clk.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit ad982c3be4e60c7d39c03f782733503cbd88fd2a Author: Gaosheng Cui Date: Mon Aug 22 10:29:05 2022 +0800 audit: fix potential double free on error path from fsnotify_add_inode_mark Audit_alloc_mark() assign pathname to audit_mark->path, on error path from fsnotify_add_inode_mark(), fsnotify_put_mark will free memory of audit_mark->path, but the caller of audit_alloc_mark will free the pathname again, so there will be double free problem. Fix this by resetting audit_mark->path to NULL pointer on error path from fsnotify_add_inode_mark(). Cc: stable@vger.kernel.org Fixes: 7b1293234084d ("fsnotify: Add group pointer in fsnotify_init_mark()") Signed-off-by: Gaosheng Cui Reviewed-by: Jan Kara Signed-off-by: Paul Moore kernel/audit_fsnotify.c | 1 + 1 file changed, 1 insertion(+) commit 35419025cb1ee40f8b4c10ab7dbe567ef70b8da4 Author: Dan Carpenter Date: Thu Aug 4 17:39:31 2022 +0300 net/mlx5: Unlock on error in mlx5_sriov_enable() Unlock before returning if mlx5_device_enable_sriov() fails. Fixes: 84a433a40d0e ("net/mlx5: Lock mlx5 devlink reload callbacks") Signed-off-by: Dan Carpenter Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21234e3a84c70f27ea106411bdd5ef7af17508a6 Author: Dan Carpenter Date: Thu Aug 4 17:43:21 2022 +0300 net/mlx5e: Fix use after free in mlx5e_fs_init() Call mlx5e_fs_vlan_free(fs) before kvfree(fs). Fixes: af8bbf730068 ("net/mlx5e: Convert mlx5e_flow_steering member of mlx5e_priv to pointer") Signed-off-by: Dan Carpenter Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6514210b6d0dc36352fda86b71f80f9a9ed4f677 Author: Dan Carpenter Date: Thu Aug 4 17:44:07 2022 +0300 net/mlx5e: kTLS, Use _safe() iterator in mlx5e_tls_priv_tx_list_cleanup() Use the list_for_each_entry_safe() macro to prevent dereferencing "obj" after it has been freed. Fixes: c4dfe704f53f ("net/mlx5e: kTLS, Recycle objects of device-offloaded TLS TX connections") Signed-off-by: Dan Carpenter Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b868c8fe37bd15def1a8dd0b1f30fca9087e499a Author: Dan Carpenter Date: Fri Jul 15 11:27:03 2022 +0300 net/mlx5: unlock on error path in esw_vfs_changed_event_handler() Unlock before returning on this error path. Fixes: f1bc646c9a06 ("net/mlx5: Use devl_ API in mlx5_esw_offloads_devlink_port_register") Signed-off-by: Dan Carpenter Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 550f96432e6f6770efdaee0e65239d61431062a1 Author: Maor Dickman Date: Thu Aug 4 15:28:42 2022 +0300 net/mlx5e: Fix wrong tc flag used when set hw-tc-offload off The cited commit reintroduced the ability to set hw-tc-offload in switchdev mode by reusing NIC mode calls without modifying it to support both modes, this can cause an illegal memory access when trying to turn hw-tc-offload off. Fix this by using the right TC_FLAG when checking if tc rules are installed while disabling hw-tc-offload. Fixes: d3cbd4254df8 ("net/mlx5e: Add ndo_set_feature for uplink representor") Signed-off-by: Maor Dickman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f7a4e867f48c2e03ab6a237c06ab923d80aeeeb1 Author: Roi Dayan Date: Mon Aug 1 18:02:49 2022 +0300 net/mlx5e: TC, Add missing policer validation There is a missing policer validation when offloading police action with tc action api. Add it. Fixes: 7d1a5ce46e47 ("net/mlx5e: TC, Support tc action api for police") Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/police.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7b3707fc79044871ab8f3d5fa5e9603155bb5577 Author: Aya Levin Date: Wed Jun 8 18:38:37 2022 +0300 net/mlx5e: Fix wrong application of the LRO state Driver caches packet merge type in mlx5e_params instance which must be in perfect sync with the netdev_feature's bit. Prior to this patch, in certain conditions (*) LRO state was set in mlx5e_params, while netdev_feature's bit was off. Causing the LRO to be applied on the RQs (HW level). (*) This can happen only on profile init (mlx5e_build_nic_params()), when RQ expect non-linear SKB and PCI is fast enough in comparison to link width. Solution: remove setting of packet merge type from mlx5e_build_nic_params() as netdev features are not updated. Fixes: 619a8f2a42f1 ("net/mlx5e: Use linear SKB in Striding RQ") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 8 -------- 1 file changed, 8 deletions(-) commit d59b73a66e5e0682442b6d7b4965364e57078b80 Author: Moshe Shemesh Date: Wed Aug 3 10:49:23 2022 +0300 net/mlx5: Avoid false positive lockdep warning by adding lock_class_key Add a lock_class_key per mlx5 device to avoid a false positive "possible circular locking dependency" warning by lockdep, on flows which lock more than one mlx5 device, such as adding SF. kernel log: ====================================================== WARNING: possible circular locking dependency detected 5.19.0-rc8+ #2 Not tainted ------------------------------------------------------ kworker/u20:0/8 is trying to acquire lock: ffff88812dfe0d98 (&dev->intf_state_mutex){+.+.}-{3:3}, at: mlx5_init_one+0x2e/0x490 [mlx5_core] but task is already holding lock: ffff888101aa7898 (&(¬ifier->n_head)->rwsem){++++}-{3:3}, at: blocking_notifier_call_chain+0x5a/0x130 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&(¬ifier->n_head)->rwsem){++++}-{3:3}: down_write+0x90/0x150 blocking_notifier_chain_register+0x53/0xa0 mlx5_sf_table_init+0x369/0x4a0 [mlx5_core] mlx5_init_one+0x261/0x490 [mlx5_core] probe_one+0x430/0x680 [mlx5_core] local_pci_probe+0xd6/0x170 work_for_cpu_fn+0x4e/0xa0 process_one_work+0x7c2/0x1340 worker_thread+0x6f6/0xec0 kthread+0x28f/0x330 ret_from_fork+0x1f/0x30 -> #0 (&dev->intf_state_mutex){+.+.}-{3:3}: __lock_acquire+0x2fc7/0x6720 lock_acquire+0x1c1/0x550 __mutex_lock+0x12c/0x14b0 mlx5_init_one+0x2e/0x490 [mlx5_core] mlx5_sf_dev_probe+0x29c/0x370 [mlx5_core] auxiliary_bus_probe+0x9d/0xe0 really_probe+0x1e0/0xaa0 __driver_probe_device+0x219/0x480 driver_probe_device+0x49/0x130 __device_attach_driver+0x1b8/0x280 bus_for_each_drv+0x123/0x1a0 __device_attach+0x1a3/0x460 bus_probe_device+0x1a2/0x260 device_add+0x9b1/0x1b40 __auxiliary_device_add+0x88/0xc0 mlx5_sf_dev_state_change_handler+0x67e/0x9d0 [mlx5_core] blocking_notifier_call_chain+0xd5/0x130 mlx5_vhca_state_work_handler+0x2b0/0x3f0 [mlx5_core] process_one_work+0x7c2/0x1340 worker_thread+0x59d/0xec0 kthread+0x28f/0x330 ret_from_fork+0x1f/0x30 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&(¬ifier->n_head)->rwsem); lock(&dev->intf_state_mutex); lock(&(¬ifier->n_head)->rwsem); lock(&dev->intf_state_mutex); *** DEADLOCK *** 4 locks held by kworker/u20:0/8: #0: ffff888150612938 ((wq_completion)mlx5_events){+.+.}-{0:0}, at: process_one_work+0x6e2/0x1340 #1: ffff888100cafdb8 ((work_completion)(&work->work)#3){+.+.}-{0:0}, at: process_one_work+0x70f/0x1340 #2: ffff888101aa7898 (&(¬ifier->n_head)->rwsem){++++}-{3:3}, at: blocking_notifier_call_chain+0x5a/0x130 #3: ffff88813682d0e8 (&dev->mutex){....}-{3:3}, at:__device_attach+0x76/0x460 stack backtrace: CPU: 6 PID: 8 Comm: kworker/u20:0 Not tainted 5.19.0-rc8+ Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Workqueue: mlx5_events mlx5_vhca_state_work_handler [mlx5_core] Call Trace: dump_stack_lvl+0x57/0x7d check_noncircular+0x278/0x300 ? print_circular_bug+0x460/0x460 ? lock_chain_count+0x20/0x20 ? register_lock_class+0x1880/0x1880 __lock_acquire+0x2fc7/0x6720 ? register_lock_class+0x1880/0x1880 ? register_lock_class+0x1880/0x1880 lock_acquire+0x1c1/0x550 ? mlx5_init_one+0x2e/0x490 [mlx5_core] ? lockdep_hardirqs_on_prepare+0x400/0x400 __mutex_lock+0x12c/0x14b0 ? mlx5_init_one+0x2e/0x490 [mlx5_core] ? mlx5_init_one+0x2e/0x490 [mlx5_core] ? _raw_read_unlock+0x1f/0x30 ? mutex_lock_io_nested+0x1320/0x1320 ? __ioremap_caller.constprop.0+0x306/0x490 ? mlx5_sf_dev_probe+0x269/0x370 [mlx5_core] ? iounmap+0x160/0x160 mlx5_init_one+0x2e/0x490 [mlx5_core] mlx5_sf_dev_probe+0x29c/0x370 [mlx5_core] ? mlx5_sf_dev_remove+0x130/0x130 [mlx5_core] auxiliary_bus_probe+0x9d/0xe0 really_probe+0x1e0/0xaa0 __driver_probe_device+0x219/0x480 ? auxiliary_match_id+0xe9/0x140 driver_probe_device+0x49/0x130 __device_attach_driver+0x1b8/0x280 ? driver_allows_async_probing+0x140/0x140 bus_for_each_drv+0x123/0x1a0 ? bus_for_each_dev+0x1a0/0x1a0 ? lockdep_hardirqs_on_prepare+0x286/0x400 ? trace_hardirqs_on+0x2d/0x100 __device_attach+0x1a3/0x460 ? device_driver_attach+0x1e0/0x1e0 ? kobject_uevent_env+0x22d/0xf10 bus_probe_device+0x1a2/0x260 device_add+0x9b1/0x1b40 ? dev_set_name+0xab/0xe0 ? __fw_devlink_link_to_suppliers+0x260/0x260 ? memset+0x20/0x40 ? lockdep_init_map_type+0x21a/0x7d0 __auxiliary_device_add+0x88/0xc0 ? auxiliary_device_init+0x86/0xa0 mlx5_sf_dev_state_change_handler+0x67e/0x9d0 [mlx5_core] blocking_notifier_call_chain+0xd5/0x130 mlx5_vhca_state_work_handler+0x2b0/0x3f0 [mlx5_core] ? mlx5_vhca_event_arm+0x100/0x100 [mlx5_core] ? lock_downgrade+0x6e0/0x6e0 ? lockdep_hardirqs_on_prepare+0x286/0x400 process_one_work+0x7c2/0x1340 ? lockdep_hardirqs_on_prepare+0x400/0x400 ? pwq_dec_nr_in_flight+0x230/0x230 ? rwlock_bug.part.0+0x90/0x90 worker_thread+0x59d/0xec0 ? process_one_work+0x1340/0x1340 kthread+0x28f/0x330 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x1f/0x30 Fixes: 6a3273217469 ("net/mlx5: SF, Port function state change support") Signed-off-by: Moshe Shemesh Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 ++++ include/linux/mlx5/driver.h | 1 + 2 files changed, 5 insertions(+) commit 090f3e4f4089ab8041ed7d632c7851c2a42fcc10 Author: Roy Novich Date: Wed Mar 30 17:59:27 2022 +0300 net/mlx5: Fix cmd error logging for manage pages cmd When the driver unloads, give/reclaim_pages may fail as PF driver in teardown flow, current code will lead to the following kernel log print 'failed reclaiming pages: err 0'. Fix it to get same behavior as before the cited commits, by calling mlx5_cmd_check before handling error state. mlx5_cmd_check will verify if the returned error is an actual error needed to be handled by the driver or not and will return an appropriate value. Fixes: 8d564292a166 ("net/mlx5: Remove redundant error on reclaim pages") Fixes: 4dac2f10ada0 ("net/mlx5: Remove redundant notify fail on give pages") Signed-off-by: Roy Novich Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 8e93f29422ffe968d7161f91acdf0d47f5323727 Author: Vlad Buslov Date: Thu Aug 11 13:46:36 2022 +0200 net/mlx5: Disable irq when locking lag_lock The lag_lock is taken from both process and softirq contexts which results lockdep warning[0] about potential deadlock. However, just disabling softirqs by using *_bh spinlock API is not enough since it will cause warning in some contexts where the lock is obtained with hard irqs disabled. To fix the issue save current irq state, disable them before obtaining the lock an re-enable irqs from saved state after releasing it. [0]: [Sun Aug 7 13:12:29 2022] ================================ [Sun Aug 7 13:12:29 2022] WARNING: inconsistent lock state [Sun Aug 7 13:12:29 2022] 5.19.0_for_upstream_debug_2022_08_04_16_06 #1 Not tainted [Sun Aug 7 13:12:29 2022] -------------------------------- [Sun Aug 7 13:12:29 2022] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. [Sun Aug 7 13:12:29 2022] swapper/0/0 [HC0[0]:SC1[1]:HE1:SE0] takes: [Sun Aug 7 13:12:29 2022] ffffffffa06dc0d8 (lag_lock){+.?.}-{2:2}, at: mlx5_lag_is_shared_fdb+0x1f/0x120 [mlx5_core] [Sun Aug 7 13:12:29 2022] {SOFTIRQ-ON-W} state was registered at: [Sun Aug 7 13:12:29 2022] lock_acquire+0x1c1/0x550 [Sun Aug 7 13:12:29 2022] _raw_spin_lock+0x2c/0x40 [Sun Aug 7 13:12:29 2022] mlx5_lag_add_netdev+0x13b/0x480 [mlx5_core] [Sun Aug 7 13:12:29 2022] mlx5e_nic_enable+0x114/0x470 [mlx5_core] [Sun Aug 7 13:12:29 2022] mlx5e_attach_netdev+0x30e/0x6a0 [mlx5_core] [Sun Aug 7 13:12:29 2022] mlx5e_resume+0x105/0x160 [mlx5_core] [Sun Aug 7 13:12:29 2022] mlx5e_probe+0xac3/0x14f0 [mlx5_core] [Sun Aug 7 13:12:29 2022] auxiliary_bus_probe+0x9d/0xe0 [Sun Aug 7 13:12:29 2022] really_probe+0x1e0/0xaa0 [Sun Aug 7 13:12:29 2022] __driver_probe_device+0x219/0x480 [Sun Aug 7 13:12:29 2022] driver_probe_device+0x49/0x130 [Sun Aug 7 13:12:29 2022] __driver_attach+0x1e4/0x4d0 [Sun Aug 7 13:12:29 2022] bus_for_each_dev+0x11e/0x1a0 [Sun Aug 7 13:12:29 2022] bus_add_driver+0x3f4/0x5a0 [Sun Aug 7 13:12:29 2022] driver_register+0x20f/0x390 [Sun Aug 7 13:12:29 2022] __auxiliary_driver_register+0x14e/0x260 [Sun Aug 7 13:12:29 2022] mlx5e_init+0x38/0x90 [mlx5_core] [Sun Aug 7 13:12:29 2022] vhost_iotlb_itree_augment_rotate+0xcb/0x180 [vhost_iotlb] [Sun Aug 7 13:12:29 2022] do_one_initcall+0xc4/0x400 [Sun Aug 7 13:12:29 2022] do_init_module+0x18a/0x620 [Sun Aug 7 13:12:29 2022] load_module+0x563a/0x7040 [Sun Aug 7 13:12:29 2022] __do_sys_finit_module+0x122/0x1d0 [Sun Aug 7 13:12:29 2022] do_syscall_64+0x3d/0x90 [Sun Aug 7 13:12:29 2022] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [Sun Aug 7 13:12:29 2022] irq event stamp: 3596508 [Sun Aug 7 13:12:29 2022] hardirqs last enabled at (3596508): [] __local_bh_enable_ip+0xa2/0x100 [Sun Aug 7 13:12:29 2022] hardirqs last disabled at (3596507): [] __local_bh_enable_ip+0xba/0x100 [Sun Aug 7 13:12:29 2022] softirqs last enabled at (3596488): [] irq_exit_rcu+0x11a/0x170 [Sun Aug 7 13:12:29 2022] softirqs last disabled at (3596495): [] irq_exit_rcu+0x11a/0x170 [Sun Aug 7 13:12:29 2022] other info that might help us debug this: [Sun Aug 7 13:12:29 2022] Possible unsafe locking scenario: [Sun Aug 7 13:12:29 2022] CPU0 [Sun Aug 7 13:12:29 2022] ---- [Sun Aug 7 13:12:29 2022] lock(lag_lock); [Sun Aug 7 13:12:29 2022] [Sun Aug 7 13:12:29 2022] lock(lag_lock); [Sun Aug 7 13:12:29 2022] *** DEADLOCK *** [Sun Aug 7 13:12:29 2022] 4 locks held by swapper/0/0: [Sun Aug 7 13:12:29 2022] #0: ffffffff84643260 (rcu_read_lock){....}-{1:2}, at: mlx5e_napi_poll+0x43/0x20a0 [mlx5_core] [Sun Aug 7 13:12:29 2022] #1: ffffffff84643260 (rcu_read_lock){....}-{1:2}, at: netif_receive_skb_list_internal+0x2d7/0xd60 [Sun Aug 7 13:12:29 2022] #2: ffff888144a18b58 (&br->hash_lock){+.-.}-{2:2}, at: br_fdb_update+0x301/0x570 [Sun Aug 7 13:12:29 2022] #3: ffffffff84643260 (rcu_read_lock){....}-{1:2}, at: atomic_notifier_call_chain+0x5/0x1d0 [Sun Aug 7 13:12:29 2022] stack backtrace: [Sun Aug 7 13:12:29 2022] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.19.0_for_upstream_debug_2022_08_04_16_06 #1 [Sun Aug 7 13:12:29 2022] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [Sun Aug 7 13:12:29 2022] Call Trace: [Sun Aug 7 13:12:29 2022] [Sun Aug 7 13:12:29 2022] dump_stack_lvl+0x57/0x7d [Sun Aug 7 13:12:29 2022] mark_lock.part.0.cold+0x5f/0x92 [Sun Aug 7 13:12:29 2022] ? lock_chain_count+0x20/0x20 [Sun Aug 7 13:12:29 2022] ? unwind_next_frame+0x1c4/0x1b50 [Sun Aug 7 13:12:29 2022] ? secondary_startup_64_no_verify+0xcd/0xdb [Sun Aug 7 13:12:29 2022] ? mlx5e_napi_poll+0x4e9/0x20a0 [mlx5_core] [Sun Aug 7 13:12:29 2022] ? mlx5e_napi_poll+0x4e9/0x20a0 [mlx5_core] [Sun Aug 7 13:12:29 2022] ? stack_access_ok+0x1d0/0x1d0 [Sun Aug 7 13:12:29 2022] ? start_kernel+0x3a7/0x3c5 [Sun Aug 7 13:12:29 2022] __lock_acquire+0x1260/0x6720 [Sun Aug 7 13:12:29 2022] ? lock_chain_count+0x20/0x20 [Sun Aug 7 13:12:29 2022] ? lock_chain_count+0x20/0x20 [Sun Aug 7 13:12:29 2022] ? register_lock_class+0x1880/0x1880 [Sun Aug 7 13:12:29 2022] ? mark_lock.part.0+0xed/0x3060 [Sun Aug 7 13:12:29 2022] ? stack_trace_save+0x91/0xc0 [Sun Aug 7 13:12:29 2022] lock_acquire+0x1c1/0x550 [Sun Aug 7 13:12:29 2022] ? mlx5_lag_is_shared_fdb+0x1f/0x120 [mlx5_core] [Sun Aug 7 13:12:29 2022] ? lockdep_hardirqs_on_prepare+0x400/0x400 [Sun Aug 7 13:12:29 2022] ? __lock_acquire+0xd6f/0x6720 [Sun Aug 7 13:12:29 2022] _raw_spin_lock+0x2c/0x40 [Sun Aug 7 13:12:29 2022] ? mlx5_lag_is_shared_fdb+0x1f/0x120 [mlx5_core] [Sun Aug 7 13:12:29 2022] mlx5_lag_is_shared_fdb+0x1f/0x120 [mlx5_core] [Sun Aug 7 13:12:29 2022] mlx5_esw_bridge_rep_vport_num_vhca_id_get+0x1a0/0x600 [mlx5_core] [Sun Aug 7 13:12:29 2022] ? mlx5_esw_bridge_update_work+0x90/0x90 [mlx5_core] [Sun Aug 7 13:12:29 2022] ? lock_acquire+0x1c1/0x550 [Sun Aug 7 13:12:29 2022] mlx5_esw_bridge_switchdev_event+0x185/0x8f0 [mlx5_core] [Sun Aug 7 13:12:29 2022] ? mlx5_esw_bridge_port_obj_attr_set+0x3e0/0x3e0 [mlx5_core] [Sun Aug 7 13:12:29 2022] ? check_chain_key+0x24a/0x580 [Sun Aug 7 13:12:29 2022] atomic_notifier_call_chain+0xd7/0x1d0 [Sun Aug 7 13:12:29 2022] br_switchdev_fdb_notify+0xea/0x100 [Sun Aug 7 13:12:29 2022] ? br_switchdev_set_port_flag+0x310/0x310 [Sun Aug 7 13:12:29 2022] fdb_notify+0x11b/0x150 [Sun Aug 7 13:12:29 2022] br_fdb_update+0x34c/0x570 [Sun Aug 7 13:12:29 2022] ? lock_chain_count+0x20/0x20 [Sun Aug 7 13:12:29 2022] ? br_fdb_add_local+0x50/0x50 [Sun Aug 7 13:12:29 2022] ? br_allowed_ingress+0x5f/0x1070 [Sun Aug 7 13:12:29 2022] ? check_chain_key+0x24a/0x580 [Sun Aug 7 13:12:29 2022] br_handle_frame_finish+0x786/0x18e0 [Sun Aug 7 13:12:29 2022] ? check_chain_key+0x24a/0x580 [Sun Aug 7 13:12:29 2022] ? br_handle_local_finish+0x20/0x20 [Sun Aug 7 13:12:29 2022] ? __lock_acquire+0xd6f/0x6720 [Sun Aug 7 13:12:29 2022] ? sctp_inet_bind_verify+0x4d/0x190 [Sun Aug 7 13:12:29 2022] ? xlog_unpack_data+0x2e0/0x310 [Sun Aug 7 13:12:29 2022] ? br_handle_local_finish+0x20/0x20 [Sun Aug 7 13:12:29 2022] br_nf_hook_thresh+0x227/0x380 [br_netfilter] [Sun Aug 7 13:12:29 2022] ? setup_pre_routing+0x460/0x460 [br_netfilter] [Sun Aug 7 13:12:29 2022] ? br_handle_local_finish+0x20/0x20 [Sun Aug 7 13:12:29 2022] ? br_nf_pre_routing_ipv6+0x48b/0x69c [br_netfilter] [Sun Aug 7 13:12:29 2022] br_nf_pre_routing_finish_ipv6+0x5c2/0xbf0 [br_netfilter] [Sun Aug 7 13:12:29 2022] ? br_handle_local_finish+0x20/0x20 [Sun Aug 7 13:12:29 2022] br_nf_pre_routing_ipv6+0x4c6/0x69c [br_netfilter] [Sun Aug 7 13:12:29 2022] ? br_validate_ipv6+0x9e0/0x9e0 [br_netfilter] [Sun Aug 7 13:12:29 2022] ? br_nf_forward_arp+0xb70/0xb70 [br_netfilter] [Sun Aug 7 13:12:29 2022] ? br_nf_pre_routing+0xacf/0x1160 [br_netfilter] [Sun Aug 7 13:12:29 2022] br_handle_frame+0x8a9/0x1270 [Sun Aug 7 13:12:29 2022] ? br_handle_frame_finish+0x18e0/0x18e0 [Sun Aug 7 13:12:29 2022] ? register_lock_class+0x1880/0x1880 [Sun Aug 7 13:12:29 2022] ? br_handle_local_finish+0x20/0x20 [Sun Aug 7 13:12:29 2022] ? bond_handle_frame+0xf9/0xac0 [bonding] [Sun Aug 7 13:12:29 2022] ? br_handle_frame_finish+0x18e0/0x18e0 [Sun Aug 7 13:12:29 2022] __netif_receive_skb_core+0x7c0/0x2c70 [Sun Aug 7 13:12:29 2022] ? check_chain_key+0x24a/0x580 [Sun Aug 7 13:12:29 2022] ? generic_xdp_tx+0x5b0/0x5b0 [Sun Aug 7 13:12:29 2022] ? __lock_acquire+0xd6f/0x6720 [Sun Aug 7 13:12:29 2022] ? register_lock_class+0x1880/0x1880 [Sun Aug 7 13:12:29 2022] ? check_chain_key+0x24a/0x580 [Sun Aug 7 13:12:29 2022] __netif_receive_skb_list_core+0x2d7/0x8a0 [Sun Aug 7 13:12:29 2022] ? lock_acquire+0x1c1/0x550 [Sun Aug 7 13:12:29 2022] ? process_backlog+0x960/0x960 [Sun Aug 7 13:12:29 2022] ? lockdep_hardirqs_on_prepare+0x129/0x400 [Sun Aug 7 13:12:29 2022] ? kvm_clock_get_cycles+0x14/0x20 [Sun Aug 7 13:12:29 2022] netif_receive_skb_list_internal+0x5f4/0xd60 [Sun Aug 7 13:12:29 2022] ? do_xdp_generic+0x150/0x150 [Sun Aug 7 13:12:29 2022] ? mlx5e_poll_rx_cq+0xf6b/0x2960 [mlx5_core] [Sun Aug 7 13:12:29 2022] ? mlx5e_poll_ico_cq+0x3d/0x1590 [mlx5_core] [Sun Aug 7 13:12:29 2022] napi_complete_done+0x188/0x710 [Sun Aug 7 13:12:29 2022] mlx5e_napi_poll+0x4e9/0x20a0 [mlx5_core] [Sun Aug 7 13:12:29 2022] ? __queue_work+0x53c/0xeb0 [Sun Aug 7 13:12:29 2022] __napi_poll+0x9f/0x540 [Sun Aug 7 13:12:29 2022] net_rx_action+0x420/0xb70 [Sun Aug 7 13:12:29 2022] ? napi_threaded_poll+0x470/0x470 [Sun Aug 7 13:12:29 2022] ? __common_interrupt+0x79/0x1a0 [Sun Aug 7 13:12:29 2022] __do_softirq+0x271/0x92c [Sun Aug 7 13:12:29 2022] irq_exit_rcu+0x11a/0x170 [Sun Aug 7 13:12:29 2022] common_interrupt+0x7d/0xa0 [Sun Aug 7 13:12:29 2022] [Sun Aug 7 13:12:29 2022] [Sun Aug 7 13:12:29 2022] asm_common_interrupt+0x22/0x40 [Sun Aug 7 13:12:29 2022] RIP: 0010:default_idle+0x42/0x60 [Sun Aug 7 13:12:29 2022] Code: c1 83 e0 07 48 c1 e9 03 83 c0 03 0f b6 14 11 38 d0 7c 04 84 d2 75 14 8b 05 6b f1 22 02 85 c0 7e 07 0f 00 2d 80 3b 4a 00 fb f4 48 c7 c7 e0 07 7e 85 e8 21 bd 40 fe eb de 66 66 2e 0f 1f 84 00 [Sun Aug 7 13:12:29 2022] RSP: 0018:ffffffff84407e18 EFLAGS: 00000242 [Sun Aug 7 13:12:29 2022] RAX: 0000000000000001 RBX: ffffffff84ec4a68 RCX: 1ffffffff0afc0fc [Sun Aug 7 13:12:29 2022] RDX: 0000000000000004 RSI: 0000000000000000 RDI: ffffffff835b1fac [Sun Aug 7 13:12:29 2022] RBP: 0000000000000000 R08: 0000000000000001 R09: ffff8884d2c44ac3 [Sun Aug 7 13:12:29 2022] R10: ffffed109a588958 R11: 00000000ffffffff R12: 0000000000000000 [Sun Aug 7 13:12:29 2022] R13: ffffffff84efac20 R14: 0000000000000000 R15: dffffc0000000000 [Sun Aug 7 13:12:29 2022] ? default_idle_call+0xcc/0x460 [Sun Aug 7 13:12:29 2022] default_idle_call+0xec/0x460 [Sun Aug 7 13:12:29 2022] do_idle+0x394/0x450 [Sun Aug 7 13:12:29 2022] ? arch_cpu_idle_exit+0x40/0x40 [Sun Aug 7 13:12:29 2022] cpu_startup_entry+0x19/0x20 [Sun Aug 7 13:12:29 2022] rest_init+0x156/0x250 [Sun Aug 7 13:12:29 2022] arch_call_rest_init+0xf/0x15 [Sun Aug 7 13:12:29 2022] start_kernel+0x3a7/0x3c5 [Sun Aug 7 13:12:29 2022] secondary_startup_64_no_verify+0xcd/0xdb [Sun Aug 7 13:12:29 2022] Fixes: ff9b7521468b ("net/mlx5: Bridge, support LAG") Signed-off-by: Vlad Buslov Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 55 ++++++++++++++--------- 1 file changed, 33 insertions(+), 22 deletions(-) commit 942fca7e762be39204e5926e91a288a343a97c72 Author: Eli Cohen Date: Sun Aug 7 08:25:28 2022 +0300 net/mlx5: Eswitch, Fix forwarding decision to uplink Make sure to modify the rule for uplink forwarding only for the case where destination vport number is MLX5_VPORT_UPLINK. Fixes: 94db33177819 ("net/mlx5: Support multiport eswitch mode") Signed-off-by: Eli Cohen Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a6e675a66175869b7d87c0e1dd0ddf93e04f8098 Author: Eli Cohen Date: Tue Aug 2 19:45:36 2022 +0300 net/mlx5: LAG, fix logic over MLX5_LAG_FLAG_NDEVS_READY Only set MLX5_LAG_FLAG_NDEVS_READY if both netdevices are registered. Doing so guarantees that both ldev->pf[MLX5_LAG_P0].dev and ldev->pf[MLX5_LAG_P1].dev have valid pointers when MLX5_LAG_FLAG_NDEVS_READY is set. The core issue is asymmetry in setting MLX5_LAG_FLAG_NDEVS_READY and clearing it. Setting it is done wrongly when both ldev->pf[MLX5_LAG_P0].dev and ldev->pf[MLX5_LAG_P1].dev are set; clearing it is done right when either of ldev->pf[i].netdev is cleared. Consider the following scenario: 1. PF0 loads and sets ldev->pf[MLX5_LAG_P0].dev to a valid pointer 2. PF1 loads and sets both ldev->pf[MLX5_LAG_P1].dev and ldev->pf[MLX5_LAG_P1].netdev with valid pointers. This results in MLX5_LAG_FLAG_NDEVS_READY is set. 3. PF0 is unloaded before setting dev->pf[MLX5_LAG_P0].netdev. MLX5_LAG_FLAG_NDEVS_READY remains set. Further execution of mlx5_do_bond() will result in null pointer dereference when calling mlx5_lag_is_multipath() This patch fixes the following call trace actually encountered: [ 1293.475195] BUG: kernel NULL pointer dereference, address: 00000000000009a8 [ 1293.478756] #PF: supervisor read access in kernel mode [ 1293.481320] #PF: error_code(0x0000) - not-present page [ 1293.483686] PGD 0 P4D 0 [ 1293.484434] Oops: 0000 [#1] SMP PTI [ 1293.485377] CPU: 1 PID: 23690 Comm: kworker/u16:2 Not tainted 5.18.0-rc5_for_upstream_min_debug_2022_05_05_10_13 #1 [ 1293.488039] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 1293.490836] Workqueue: mlx5_lag mlx5_do_bond_work [mlx5_core] [ 1293.492448] RIP: 0010:mlx5_lag_is_multipath+0x5/0x50 [mlx5_core] [ 1293.494044] Code: e8 70 40 ff e0 48 8b 14 24 48 83 05 5c 1a 1b 00 01 e9 19 ff ff ff 48 83 05 47 1a 1b 00 01 eb d7 0f 1f 44 00 00 0f 1f 44 00 00 <48> 8b 87 a8 09 00 00 48 85 c0 74 26 48 83 05 a7 1b 1b 00 01 41 b8 [ 1293.498673] RSP: 0018:ffff88811b2fbe40 EFLAGS: 00010202 [ 1293.500152] RAX: ffff88818a94e1c0 RBX: ffff888165eca6c0 RCX: 0000000000000000 [ 1293.501841] RDX: 0000000000000001 RSI: ffff88818a94e1c0 RDI: 0000000000000000 [ 1293.503585] RBP: 0000000000000000 R08: ffff888119886740 R09: ffff888165eca73c [ 1293.505286] R10: 0000000000000018 R11: 0000000000000018 R12: ffff88818a94e1c0 [ 1293.506979] R13: ffff888112729800 R14: 0000000000000000 R15: ffff888112729858 [ 1293.508753] FS: 0000000000000000(0000) GS:ffff88852cc40000(0000) knlGS:0000000000000000 [ 1293.510782] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1293.512265] CR2: 00000000000009a8 CR3: 00000001032d4002 CR4: 0000000000370ea0 [ 1293.514001] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1293.515806] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Fixes: 8a66e4585979 ("net/mlx5: Change ownership model for lag") Signed-off-by: Eli Cohen Reviewed-by: Maor Dickman Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f37044fd759b6bc40b6398a978e0b1acdf717372 Author: Vlad Buslov Date: Fri Jul 15 21:41:48 2022 +0200 net/mlx5e: Properly disable vlan strip on non-UL reps When querying mlx5 non-uplink representors capabilities with ethtool rx-vlan-offload is marked as "off [fixed]". However, it is actually always enabled because mlx5e_params->vlan_strip_disable is 0 by default when initializing struct mlx5e_params instance. Fix the issue by explicitly setting the vlan_strip_disable to 'true' for non-uplink representors. Fixes: cb67b832921c ("net/mlx5e: Introduce SRIOV VF representors") Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 ++ 1 file changed, 2 insertions(+) commit 072e51356cd5a4a1c12c1020bc054c99b98333df Merge: d3cd67d671ee ed06fce0b034 Author: Linus Torvalds Date: Mon Aug 22 11:40:01 2022 -0700 Merge tag 'nfs-for-5.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client fixes from Trond Myklebust: "Stable fixes: - NFS: Fix another fsync() issue after a server reboot Bugfixes: - NFS: unlink/rmdir shouldn't call d_delete() twice on ENOENT - NFS: Fix missing unlock in nfs_unlink() - Add sanity checking of the file type used by __nfs42_ssc_open - Fix a case where we're failing to set task->tk_rpc_status Cleanups: - Remove the NFS_CONTEXT_RESEND_WRITES flag that got obsoleted by the fsync() fix" * tag 'nfs-for-5.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: SUNRPC: RPC level errors should set task->tk_rpc_status NFSv4.2 fix problems with __nfs42_ssc_open NFS: unlink/rmdir shouldn't call d_delete() twice on ENOENT NFS: Cleanup to remove unused flag NFS_CONTEXT_RESEND_WRITES NFS: Remove a bogus flag setting in pnfs_write_done_resend_to_mds NFS: Fix another fsync() issue after a server reboot NFS: Fix missing unlock in nfs_unlink() commit d3cd67d671eea1f0d3860996863bd95e1e0b1c76 Merge: b20ee4813f3f 0c3bc7899e6d Author: Linus Torvalds Date: Mon Aug 22 11:33:02 2022 -0700 Merge tag 'fs.idmapped.fixes.v6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull idmapping fixes from Christian Brauner: - Since Seth joined as co-maintainer for idmapped mounts we decided to use a shared git tree. Konstantin suggested we use vfs/idmapping.git on kernel.org under the vfs/ namespace. So this updates the tree in the maintainers file. - Ensure that POSIX ACLs checking, getting, and setting works correctly for filesystems mountable with a filesystem idmapping that want to support idmapped mounts. Since no filesystems mountable with an fs_idmapping do yet support idmapped mounts there is no problem. But this could change in the future, so add a check to refuse to create idmapped mounts when the mounter is not privileged over the mount's idmapping. - Check that caller is privileged over the idmapping that will be attached to a mount. Currently no FS_USERNS_MOUNT filesystems support idmapped mounts, thus this is not a problem as only CAP_SYS_ADMIN in init_user_ns is allowed to set up idmapped mounts. But this could change in the future, so add a check to refuse to create idmapped mounts when the mounter is not privileged over the mount's idmapping. - Fix POSIX ACLs for ntfs3. While looking at our current POSIX ACL handling in the context of some overlayfs work I went through a range of other filesystems checking how they handle them currently and encountered a few bugs in ntfs3. I've sent this some time ago and the fixes haven't been picked up even though the pull request for other ntfs3 fixes got sent after. This should really be fixed as right now POSIX ACLs are broken in certain circumstances for ntfs3. * tag 'fs.idmapped.fixes.v6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: ntfs: fix acl handling fs: require CAP_SYS_ADMIN in target namespace for idmapped mounts MAINTAINERS: update idmapping tree acl: handle idmapped mounts for idmapped filesystems commit b20ee4813f3fe79f5ee227c576a55c2df5d59078 Merge: cfd2b5c1106f 932c29a10d5d Author: Linus Torvalds Date: Mon Aug 22 10:40:09 2022 -0700 Merge tag 'filelock-v6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull file locking fix from Jeff Layton: "Just a single patch for a bugfix in the flock() codepath, introduced by a patch that went in recently" * tag 'filelock-v6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: locks: Fix dropped call to ->fl_release_private() commit 76f89c954788763db575fb512a40bd483864f1e9 Author: Cristian Marussi Date: Wed Aug 17 18:27:28 2022 +0100 firmware: arm_scmi: Harden accesses to the sensor domains Accessing sensor domains descriptors by the index upon the SCMI drivers requests through the SCMI sensor operations interface can potentially lead to out-of-bound violations if the SCMI driver misbehave. Add an internal consistency check before any such domains descriptors accesses. Link: https://lore.kernel.org/r/20220817172731.1185305-4-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/sensors.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 1ecb7d27b1af6705e9a4e94415b4d8cc8cf2fbfb Author: Cristian Marussi Date: Wed Aug 17 18:27:27 2022 +0100 firmware: arm_scmi: Improve checks in the info_get operations SCMI protocols abstract and expose a number of protocol specific resources like clocks, sensors and so on. Information about such specific domain resources are generally exposed via an `info_get` protocol operation. Improve the sanity check on these operations where needed. Link: https://lore.kernel.org/r/20220817172731.1185305-3-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/clock.c | 6 +++++- drivers/firmware/arm_scmi/sensors.c | 3 +++ include/linux/scmi_protocol.h | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) commit 2e42b1652df00daf7000011ec9917f2eda534190 Author: Cristian Marussi Date: Wed Aug 17 18:27:26 2022 +0100 firmware: arm_scmi: Fix missing kernel-doc in optee Add the missing structure field `rx_len` description. Link: https://lore.kernel.org/r/20220817172731.1185305-2-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/optee.c | 1 + 1 file changed, 1 insertion(+) commit cfd2b5c1106fa20254d9f24970232cdf24860005 Author: Yang Jihong Date: Mon Aug 22 17:25:57 2022 +0800 perf tools: Fix compile error for x86 Commit a0a12c3ed057 ("asm goto: eradicate CC_HAS_ASM_GOTO") eradicates CC_HAS_ASM_GOTO, and in the process also causes the perf tool on x86 to use asm_volatile_goto when compiling __GEN_RMWcc. However, asm_volatile_goto is not declared in the perf tool headers, which causes a compilation error: In file included from tools/arch/x86/include/asm/atomic.h:7, from tools/include/asm/atomic.h:6, from tools/include/linux/atomic.h:5, from tools/include/linux/refcount.h:41, from tools/lib/perf/include/internal/cpumap.h:5, from tools/perf/util/cpumap.h:7, from tools/perf/util/env.h:7, from tools/perf/util/header.h:12, from pmu-events/pmu-events.c:9: tools/arch/x86/include/asm/atomic.h: In function ‘atomic_dec_and_test’: tools/arch/x86/include/asm/rmwcc.h:7:2: error: implicit declaration of function ‘asm_volatile_goto’ [-Werror=implicit-function-declaration] asm_volatile_goto (fullop "; j" cc " %l[cc_label]" \ ^~~~~~~~~~~~~~~~~ Define asm_volatile_goto in compiler_types.h if not declared, like the main kernel header files do. Fixes: a0a12c3ed057 ("asm goto: eradicate CC_HAS_ASM_GOTO") Signed-off-by: Yang Jihong Tested-by: Arnaldo Carvalho de Melo Tested-by: Ingo Molnar Signed-off-by: Linus Torvalds tools/include/linux/compiler_types.h | 4 ++++ 1 file changed, 4 insertions(+) commit 79d3d1d12e6f22c904195f9356069859e2595f00 Author: Josef Bacik Date: Fri Aug 19 11:53:39 2022 -0400 btrfs: don't allow large NOWAIT direct reads Dylan and Jens reported a problem where they had an io_uring test that was returning short reads, and bisected it to ee5b46a353af ("btrfs: increase direct io read size limit to 256 sectors"). The root cause is their test was doing larger reads via io_uring with NOWAIT and async. This was triggering a page fault during the direct read, however the first page was able to work just fine and thus we submitted a 4k read for a larger iocb. Btrfs allows for partial IO's in this case specifically because we don't allow page faults, and thus we'll attempt to do any io that we can, submit what we could, come back and fault in the rest of the range and try to do the remaining IO. However for !is_sync_kiocb() we'll call ->ki_complete() as soon as the partial dio is done, which is incorrect. In the sync case we can exit the iomap code, submit more io's, and return with the amount of IO we were able to complete successfully. We were always doing short reads in this case, but for NOWAIT we were getting saved by the fact that we were limiting direct reads to sectorsize, and if we were larger than that we would return EAGAIN. Fix the regression by simply returning EAGAIN in the NOWAIT case with larger reads, that way io_uring can retry and get the larger IO and have the fault logic handle everything properly. This still leaves the AIO short read case, but that existed before this change. The way to properly fix this would be to handle partial iocb completions, but that's a lot of work, for now deal with the regression in the most straightforward way possible. Reported-by: Dylan Yudaken Fixes: ee5b46a353af ("btrfs: increase direct io read size limit to 256 sectors") Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/inode.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 4a445b7b6178d88956192c0202463063f52e8667 Author: Qu Wenruo Date: Sat Aug 13 16:06:53 2022 +0800 btrfs: don't merge pages into bio if their page offset is not contiguous [BUG] Zygo reported on latest development branch, he could hit ASSERT()/BUG_ON() caused crash when doing RAID5 recovery (intentionally corrupt one disk, and let btrfs to recover the data during read/scrub). And The following minimal reproducer can cause extent state leakage at rmmod time: mkfs.btrfs -f -d raid5 -m raid5 $dev1 $dev2 $dev3 -b 1G > /dev/null mount $dev1 $mnt fsstress -w -d $mnt -n 25 -s 1660807876 sync fssum -A -f -w /tmp/fssum.saved $mnt umount $mnt # Wipe the dev1 but keeps its super block xfs_io -c "pwrite -S 0x0 1m 1023m" $dev1 mount $dev1 $mnt fssum -r /tmp/fssum.saved $mnt > /dev/null umount $mnt rmmod btrfs This will lead to the following extent states leakage: BTRFS: state leak: start 499712 end 503807 state 5 in tree 1 refs 1 BTRFS: state leak: start 495616 end 499711 state 5 in tree 1 refs 1 BTRFS: state leak: start 491520 end 495615 state 5 in tree 1 refs 1 BTRFS: state leak: start 487424 end 491519 state 5 in tree 1 refs 1 BTRFS: state leak: start 483328 end 487423 state 5 in tree 1 refs 1 BTRFS: state leak: start 479232 end 483327 state 5 in tree 1 refs 1 BTRFS: state leak: start 475136 end 479231 state 5 in tree 1 refs 1 BTRFS: state leak: start 471040 end 475135 state 5 in tree 1 refs 1 [CAUSE] Since commit 7aa51232e204 ("btrfs: pass a btrfs_bio to btrfs_repair_one_sector"), we always use btrfs_bio->file_offset to determine the file offset of a page. But that usage assume that, one bio has all its page having a continuous page offsets. Unfortunately that's not true, btrfs only requires the logical bytenr contiguous when assembling its bios. From above script, we have one bio looks like this: fssum-27671 submit_one_bio: bio logical=217739264 len=36864 fssum-27671 submit_one_bio: r/i=5/261 page_offset=466944 <<< fssum-27671 submit_one_bio: r/i=5/261 page_offset=724992 <<< fssum-27671 submit_one_bio: r/i=5/261 page_offset=729088 fssum-27671 submit_one_bio: r/i=5/261 page_offset=733184 fssum-27671 submit_one_bio: r/i=5/261 page_offset=737280 fssum-27671 submit_one_bio: r/i=5/261 page_offset=741376 fssum-27671 submit_one_bio: r/i=5/261 page_offset=745472 fssum-27671 submit_one_bio: r/i=5/261 page_offset=749568 fssum-27671 submit_one_bio: r/i=5/261 page_offset=753664 Note that the 1st and the 2nd page has non-contiguous page offsets. This means, at repair time, we will have completely wrong file offset passed in: kworker/u32:2-19927 btrfs_repair_one_sector: r/i=5/261 page_off=729088 file_off=475136 bio_offset=8192 Since the file offset is incorrect, we latter incorrectly set the extent states, and no way to really release them. Thus later it causes the leakage. In fact, this can be even worse, since the file offset is incorrect, we can hit cases like the incorrect file offset belongs to a HOLE, and later cause btrfs_num_copies() to trigger error, finally hit BUG_ON()/ASSERT() later. [FIX] Add an extra condition in btrfs_bio_add_page() for uncompressed IO. Now we will have more strict requirement for bio pages: - They should all have the same mapping (the mapping check is already implied by the call chain) - Their logical bytenr should be adjacent This is the same as the old condition. - Their page_offset() (file offset) should be adjacent This is the new check. This would result a slightly increased amount of bios from btrfs (needs holes and inside the same stripe boundary to trigger). But this would greatly reduce the confusion, as it's pretty common to assume a btrfs bio would only contain continuous page cache. Later we may need extra cleanups, as we no longer needs to handle gaps between page offsets in endio functions. Currently this should be the minimal patch to fix commit 7aa51232e204 ("btrfs: pass a btrfs_bio to btrfs_repair_one_sector"). Reported-by: Zygo Blaxell Fixes: 7aa51232e204 ("btrfs: pass a btrfs_bio to btrfs_repair_one_sector") Reviewed-by: Christoph Hellwig Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) commit e6e3dec6c3c288d556b991a85d5d8e3ee71e9046 Author: Filipe Manana Date: Mon Aug 8 12:18:37 2022 +0100 btrfs: update generation of hole file extent item when merging holes When punching a hole into a file range that is adjacent with a hole and we are not using the no-holes feature, we expand the range of the adjacent file extent item that represents a hole, to save metadata space. However we don't update the generation of hole file extent item, which means a full fsync will not log that file extent item if the fsync happens in a later transaction (since commit 7f30c07288bb9e ("btrfs: stop copying old file extents when doing a full fsync")). For example, if we do this: $ mkfs.btrfs -f -O ^no-holes /dev/sdb $ mount /dev/sdb /mnt $ xfs_io -f -c "pwrite -S 0xab 2M 2M" /mnt/foobar $ sync We end up with 2 file extent items in our file: 1) One that represents the hole for the file range [0, 2M), with a generation of 7; 2) Another one that represents an extent covering the range [2M, 4M). After that if we do the following: $ xfs_io -c "fpunch 2M 2M" /mnt/foobar We end up with a single file extent item in the file, which represents a hole for the range [0, 4M) and with a generation of 7 - because we end dropping the data extent for range [2M, 4M) and then update the file extent item that represented the hole at [0, 2M), by increasing length from 2M to 4M. Then doing a full fsync and power failing: $ xfs_io -c "fsync" /mnt/foobar will result in the full fsync not logging the file extent item that represents the hole for the range [0, 4M), because its generation is 7, which is lower than the generation of the current transaction (8). As a consequence, after mounting again the filesystem (after log replay), the region [2M, 4M) does not have a hole, it still points to the previous data extent. So fix this by always updating the generation of existing file extent items representing holes when we merge/expand them. This solves the problem and it's the same approach as when we merge prealloc extents that got written (at btrfs_mark_extent_written()). Setting the generation to the current transaction's generation is also what we do when merging the new hole extent map with the previous one or the next one. A test case for fstests, covering both cases of hole file extent item merging (to the left and to the right), will be sent soon. Fixes: 7f30c07288bb9e ("btrfs: stop copying old file extents when doing a full fsync") CC: stable@vger.kernel.org # 5.18+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/file.c | 2 ++ 1 file changed, 2 insertions(+) commit 9ea0106a7a3d8116860712e3f17cd52ce99f6707 Author: Zixuan Fu Date: Mon Aug 15 23:16:06 2022 +0800 btrfs: fix possible memory leak in btrfs_get_dev_args_from_path() In btrfs_get_dev_args_from_path(), btrfs_get_bdev_and_sb() can fail if the path is invalid. In this case, btrfs_get_dev_args_from_path() returns directly without freeing args->uuid and args->fsid allocated before, which causes memory leak. To fix these possible leaks, when btrfs_get_bdev_and_sb() fails, btrfs_put_dev_args_from_path() is called to clean up the memory. Reported-by: TOTE Robot Fixes: faa775c41d655 ("btrfs: add a btrfs_get_dev_args_from_path helper") CC: stable@vger.kernel.org # 5.16 Reviewed-by: Boris Burkov Signed-off-by: Zixuan Fu Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b51111271b0352aa596c5ae8faf06939e91b3b68 Author: Goldwyn Rodrigues Date: Tue Aug 16 16:42:56 2022 -0500 btrfs: check if root is readonly while setting security xattr For a filesystem which has btrfs read-only property set to true, all write operations including xattr should be denied. However, security xattr can still be changed even if btrfs ro property is true. This happens because xattr_permission() does not have any restrictions on security.*, system.* and in some cases trusted.* from VFS and the decision is left to the underlying filesystem. See comments in xattr_permission() for more details. This patch checks if the root is read-only before performing the set xattr operation. Testcase: DEV=/dev/vdb MNT=/mnt mkfs.btrfs -f $DEV mount $DEV $MNT echo "file one" > $MNT/f1 setfattr -n "security.one" -v 2 $MNT/f1 btrfs property set /mnt ro true setfattr -n "security.one" -v 1 $MNT/f1 umount $MNT CC: stable@vger.kernel.org # 4.9+ Reviewed-by: Qu Wenruo Reviewed-by: Filipe Manana Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/xattr.c | 3 +++ 1 file changed, 3 insertions(+) commit 9ead7e74bfd6dd54db12ef133b8604add72511de Author: Maciej Fijalkowski Date: Thu Aug 11 20:21:49 2022 +0200 ice: xsk: use Rx ring's XDP ring when picking NAPI context Ice driver allocates per cpu XDP queues so that redirect path can safely use smp_processor_id() as an index to the array. At the same time though, XDP rings are used to pick NAPI context to call napi_schedule() or set NAPIF_STATE_MISSED. When user reduces queue count, say to 8, and num_possible_cpus() of underlying platform is 44, then this means queue vectors with correlated NAPI contexts will carry several XDP queues. This in turn can result in a broken behavior where NAPI context of interest will never be scheduled and AF_XDP socket will not process any traffic. To fix this, let us change the way how XDP rings are assigned to Rx rings and use this information later on when setting ice_tx_ring::xsk_pool pointer. For each Rx ring, grab the associated queue vector and walk through Tx ring's linked list. Once we stumble upon XDP ring in it, assign this ring to ice_rx_ring::xdp_ring. Previous [0] approach of fixing this issue was for txonly scenario because of the described grouping of XDP rings across queue vectors. So, relying on Rx ring meant that NAPI context could be scheduled with a queue vector without XDP ring with associated XSK pool. [0]: https://lore.kernel.org/netdev/20220707161128.54215-1-maciej.fijalkowski@intel.com/ Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Fixes: 22bf877e528f ("ice: introduce XDP_TX fallback path") Signed-off-by: Maciej Fijalkowski Tested-by: George Kuruvinakunnel Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice.h | 36 ++++++++++++++++++++----------- drivers/net/ethernet/intel/ice/ice_lib.c | 4 ++-- drivers/net/ethernet/intel/ice/ice_main.c | 25 ++++++++++++++------- drivers/net/ethernet/intel/ice/ice_xsk.c | 12 +++++------ 4 files changed, 48 insertions(+), 29 deletions(-) commit 5a42f112d367bb4700a8a41f5c12724fde6bfbb9 Author: Maciej Fijalkowski Date: Thu Aug 11 20:21:48 2022 +0200 ice: xsk: prohibit usage of non-balanced queue id Fix the following scenario: 1. ethtool -L $IFACE rx 8 tx 96 2. xdpsock -q 10 -t -z Above refers to a case where user would like to attach XSK socket in txonly mode at a queue id that does not have a corresponding Rx queue. At this moment ice's XSK logic is tightly bound to act on a "queue pair", e.g. both Tx and Rx queues at a given queue id are disabled/enabled and both of them will get XSK pool assigned, which is broken for the presented queue configuration. This results in the splat included at the bottom, which is basically an OOB access to Rx ring array. To fix this, allow using the ids only in scope of "combined" queues reported by ethtool. However, logic should be rewritten to allow such configurations later on, which would end up as a complete rewrite of the control path, so let us go with this temporary fix. [420160.558008] BUG: kernel NULL pointer dereference, address: 0000000000000082 [420160.566359] #PF: supervisor read access in kernel mode [420160.572657] #PF: error_code(0x0000) - not-present page [420160.579002] PGD 0 P4D 0 [420160.582756] Oops: 0000 [#1] PREEMPT SMP NOPTI [420160.588396] CPU: 10 PID: 21232 Comm: xdpsock Tainted: G OE 5.19.0-rc7+ #10 [420160.597893] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.02.01.0008.031920191559 03/19/2019 [420160.609894] RIP: 0010:ice_xsk_pool_setup+0x44/0x7d0 [ice] [420160.616968] Code: f3 48 83 ec 40 48 8b 4f 20 48 8b 3f 65 48 8b 04 25 28 00 00 00 48 89 44 24 38 31 c0 48 8d 04 ed 00 00 00 00 48 01 c1 48 8b 11 <0f> b7 92 82 00 00 00 48 85 d2 0f 84 2d 75 00 00 48 8d 72 ff 48 85 [420160.639421] RSP: 0018:ffffc9002d2afd48 EFLAGS: 00010282 [420160.646650] RAX: 0000000000000050 RBX: ffff88811d8bdd00 RCX: ffff888112c14ff8 [420160.655893] RDX: 0000000000000000 RSI: ffff88811d8bdd00 RDI: ffff888109861000 [420160.665166] RBP: 000000000000000a R08: 000000000000000a R09: 0000000000000000 [420160.674493] R10: 000000000000889f R11: 0000000000000000 R12: 000000000000000a [420160.683833] R13: 000000000000000a R14: 0000000000000000 R15: ffff888117611828 [420160.693211] FS: 00007fa869fc1f80(0000) GS:ffff8897e0880000(0000) knlGS:0000000000000000 [420160.703645] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [420160.711783] CR2: 0000000000000082 CR3: 00000001d076c001 CR4: 00000000007706e0 [420160.721399] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [420160.731045] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [420160.740707] PKRU: 55555554 [420160.745960] Call Trace: [420160.750962] [420160.755597] ? kmalloc_large_node+0x79/0x90 [420160.762703] ? __kmalloc_node+0x3f5/0x4b0 [420160.769341] xp_assign_dev+0xfd/0x210 [420160.775661] ? shmem_file_read_iter+0x29a/0x420 [420160.782896] xsk_bind+0x152/0x490 [420160.788943] __sys_bind+0xd0/0x100 [420160.795097] ? exit_to_user_mode_prepare+0x20/0x120 [420160.802801] __x64_sys_bind+0x16/0x20 [420160.809298] do_syscall_64+0x38/0x90 [420160.815741] entry_SYSCALL_64_after_hwframe+0x63/0xcd [420160.823731] RIP: 0033:0x7fa86a0dd2fb [420160.830264] Code: c3 66 0f 1f 44 00 00 48 8b 15 69 8b 0c 00 f7 d8 64 89 02 b8 ff ff ff ff eb bc 0f 1f 44 00 00 f3 0f 1e fa b8 31 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 3d 8b 0c 00 f7 d8 64 89 01 48 [420160.855410] RSP: 002b:00007ffc1146f618 EFLAGS: 00000246 ORIG_RAX: 0000000000000031 [420160.866366] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa86a0dd2fb [420160.876957] RDX: 0000000000000010 RSI: 00007ffc1146f680 RDI: 0000000000000003 [420160.887604] RBP: 000055d7113a0520 R08: 00007fa868fb8000 R09: 0000000080000000 [420160.898293] R10: 0000000000008001 R11: 0000000000000246 R12: 000055d7113a04e0 [420160.909038] R13: 000055d7113a0320 R14: 000000000000000a R15: 0000000000000000 [420160.919817] [420160.925659] Modules linked in: ice(OE) af_packet binfmt_misc nls_iso8859_1 ipmi_ssif intel_rapl_msr intel_rapl_common x86_pkg_temp_thermal intel_powerclamp mei_me coretemp ioatdma mei ipmi_si wmi ipmi_msghandler acpi_pad acpi_power_meter ip_tables x_tables autofs4 ixgbe i40e crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel crypto_simd cryptd ahci mdio dca libahci lpc_ich [last unloaded: ice] [420160.977576] CR2: 0000000000000082 [420160.985037] ---[ end trace 0000000000000000 ]--- [420161.097724] RIP: 0010:ice_xsk_pool_setup+0x44/0x7d0 [ice] [420161.107341] Code: f3 48 83 ec 40 48 8b 4f 20 48 8b 3f 65 48 8b 04 25 28 00 00 00 48 89 44 24 38 31 c0 48 8d 04 ed 00 00 00 00 48 01 c1 48 8b 11 <0f> b7 92 82 00 00 00 48 85 d2 0f 84 2d 75 00 00 48 8d 72 ff 48 85 [420161.134741] RSP: 0018:ffffc9002d2afd48 EFLAGS: 00010282 [420161.144274] RAX: 0000000000000050 RBX: ffff88811d8bdd00 RCX: ffff888112c14ff8 [420161.155690] RDX: 0000000000000000 RSI: ffff88811d8bdd00 RDI: ffff888109861000 [420161.168088] RBP: 000000000000000a R08: 000000000000000a R09: 0000000000000000 [420161.179295] R10: 000000000000889f R11: 0000000000000000 R12: 000000000000000a [420161.190420] R13: 000000000000000a R14: 0000000000000000 R15: ffff888117611828 [420161.201505] FS: 00007fa869fc1f80(0000) GS:ffff8897e0880000(0000) knlGS:0000000000000000 [420161.213628] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [420161.223413] CR2: 0000000000000082 CR3: 00000001d076c001 CR4: 00000000007706e0 [420161.234653] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [420161.245893] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [420161.257052] PKRU: 55555554 Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Signed-off-by: Maciej Fijalkowski Tested-by: George Kuruvinakunnel Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_xsk.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8d1e09cfbd4da67d68a03e86818db5340c05abb8 Merge: a8c67e27d9e3 93a3c0d4e8bf Author: Greg Kroah-Hartman Date: Mon Aug 22 17:40:44 2022 +0200 Merge tag 'thunderbolt-for-v6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: "thunderbolt: Fixes for v6.0-rc3 This includes two fixes: one that corrects the buffer usage in tb_async_error() and another one that limits the xHCI connect operations to Thunderbolt 3 routers. Both have been in linux-next with no reported issues." * tag 'thunderbolt-for-v6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Check router generation before connecting xHCI thunderbolt: Use the actual buffer in tb_async_error() commit 220e979bd906015b74eb485e16464ee5abbd3c9b Merge: 1c23f9e627a7 b75ef35bb577 Author: Rodrigo Vivi Date: Mon Aug 22 10:31:23 2022 -0400 Merge tag 'gvt-fixes-2022-08-22' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2022-08-22 - CometLake regression fix in mmio table rework (Alex) - misc kernel doc and typo fixes Signed-off-by: Rodrigo Vivi From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20220822031215.GJ1089@zhen-hp.sh.intel.com commit f1e941dbf80a9b8bab0bffbc4cbe41cc7f4c6fb6 Author: Duoming Zhou Date: Thu Aug 18 17:06:21 2022 +0800 nfc: pn533: Fix use-after-free bugs caused by pn532_cmd_timeout When the pn532 uart device is detaching, the pn532_uart_remove() is called. But there are no functions in pn532_uart_remove() that could delete the cmd_timeout timer, which will cause use-after-free bugs. The process is shown below: (thread 1) | (thread 2) | pn532_uart_send_frame pn532_uart_remove | mod_timer(&pn532->cmd_timeout,...) ... | (wait a time) kfree(pn532) //FREE | pn532_cmd_timeout | pn532_uart_send_frame | pn532->... //USE This patch adds del_timer_sync() in pn532_uart_remove() in order to prevent the use-after-free bugs. What's more, the pn53x_unregister_nfc() is well synchronized, it sets nfc_dev->shutting_down to true and there are no syscalls could restart the cmd_timeout timer. Fixes: c656aa4c27b1 ("nfc: pn533: add UART phy driver") Signed-off-by: Duoming Zhou Signed-off-by: David S. Miller drivers/nfc/pn533/uart.c | 1 + 1 file changed, 1 insertion(+) commit 123d6455771ec577ce65f8d1bda548fb0eb7ef21 Author: Wang Jingjin Date: Mon Aug 1 16:47:45 2022 +0800 ftrace: Fix build warning for ops_references_rec() not used The change that made IPMODIFY and DIRECT ops work together needed access to the ops_references_ip() function, which it pulled out of the module only code. But now if both CONFIG_MODULES and CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS is not set, we get the below warning: ‘ops_references_rec’ defined but not used. Since ops_references_rec() only calls ops_references_ip() replace the usage of ops_references_rec() with ops_references_ip() and encompass the function with an #ifdef of DIRECT_CALLS || MODULES being defined. Link: https://lkml.kernel.org/r/20220801084745.1187987-1-wangjingjin1@huawei.com Fixes: 53cd885bc5c3 ("ftrace: Allow IPMODIFY and DIRECT ops on the same function") Signed-off-by: Wang Jingjin Signed-off-by: Steven Rostedt (Google) kernel/trace/ftrace.c | 79 +++++++++++++++++++++------------------------------ 1 file changed, 33 insertions(+), 46 deletions(-) commit 6e10001c6e666f7e07e3cfd806d8fa11c4151d00 Merge: 3c53cd65dece b75d61201444 Author: David S. Miller Date: Mon Aug 22 14:29:00 2022 +0100 Merge branch 'r8152-fixes' Hayes Wang says: ==================== r8152: fix flow control settings These patches fix the settings of RX FIFO about flow control. ==================== Signed-off-by: David S. Miller commit b75d612014447e04abdf0e37ffb8f2fd8b0b49d6 Author: Hayes Wang Date: Thu Aug 18 16:06:20 2022 +0800 r8152: fix the RX FIFO settings when suspending The RX FIFO would be changed when suspending, so the related settings have to be modified, too. Otherwise, the flow control would work abnormally. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=216333 Reported-by: Mark Blakeney Fixes: cdf0b86b250f ("r8152: fix a WOL issue") Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 6dc4df12d741c0fe8f885778a43039e0619b9cd9 Author: Hayes Wang Date: Thu Aug 18 16:06:19 2022 +0800 r8152: fix the units of some registers for RTL8156A The units of PLA_RX_FIFO_FULL and PLA_RX_FIFO_EMPTY are 16 bytes. Fixes: 195aae321c82 ("r8152: support new chips") Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 3c53cd65dece47dd1f9d3a809f32e59d1d87b2b8 Author: Bernard Pidoux Date: Thu Aug 18 02:02:13 2022 +0200 rose: check NULL rose_loopback_neigh->loopback Commit 3b3fd068c56e3fbea30090859216a368398e39bf added NULL check for `rose_loopback_neigh->dev` in rose_loopback_timer() but omitted to check rose_loopback_neigh->loopback. It thus prevents *all* rose connect. The reason is that a special rose_neigh loopback has a NULL device. /proc/net/rose_neigh illustrates it via rose_neigh_show() function : [...] seq_printf(seq, "%05d %-9s %-4s %3d %3d %3s %3s %3lu %3lu", rose_neigh->number, (rose_neigh->loopback) ? "RSLOOP-0" : ax2asc(buf, &rose_neigh->callsign), rose_neigh->dev ? rose_neigh->dev->name : "???", rose_neigh->count, /proc/net/rose_neigh displays special rose_loopback_neigh->loopback as callsign RSLOOP-0: addr callsign dev count use mode restart t0 tf digipeaters 00001 RSLOOP-0 ??? 1 2 DCE yes 0 0 By checking rose_loopback_neigh->loopback, rose_rx_call_request() is called even in case rose_loopback_neigh->dev is NULL. This repairs rose connections. Verification with rose client application FPAC: FPAC-Node v 4.1.3 (built Aug 5 2022) for LINUX (help = h) F6BVP-4 (Commands = ?) : u Users - AX.25 Level 2 sessions : Port Callsign Callsign AX.25 state ROSE state NetRom status axudp F6BVP-5 -> F6BVP-9 Connected Connected --------- Fixes: 3b3fd068c56e ("rose: Fix Null pointer dereference in rose_send_frame()") Signed-off-by: Bernard Pidoux Suggested-by: Francois Romieu Cc: Thomas DL9SAU Osterried Signed-off-by: David S. Miller net/rose/rose_loopback.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9ee5b6d53b8c99d13a47227e3b7052a1365556c9 Author: Niravkumar L Rabara Date: Sat Aug 13 12:26:16 2022 +0800 spi: cadence-quadspi: Disable irqs during indirect reads On architecture where reading the SRAM is slower than the pace at controller fills it, with interrupt enabled while reading from SRAM FIFO causes unwanted interrupt storm to CPU. The inner "bytes to read" loop never exits and waits for the completion so it is enough to only enable the watermark interrupt when we are out of bytes to read, which only happens when we start the transfer (waiting for the FIFO to fill up initially) if the SRAM is slow. So only using read watermark interrupt, as the current implementation doesn't utilize the SRAM full and indirect complete read interrupt. And disable all the read interrupts while reading from SRAM. Signed-off-by: Niravkumar L Rabara Link: https://lore.kernel.org/r/20220813042616.1372110-1-niravkumar.l.rabara@intel.com Signed-off-by: Mark Brown drivers/spi/spi-cadence-quadspi.c | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) commit c32f1ebfd26bece77141257864ed7b4720da1557 Author: Andrew Halaney Date: Fri Aug 19 14:43:36 2022 -0500 regulator: core: Clean up on enable failure If regulator_enable() fails, enable_count is incremented still. A consumer, assuming no matching regulator_disable() is necessary on failure, will then get this error message upon regulator_put() since enable_count is non-zero: [ 1.277418] WARNING: CPU: 3 PID: 1 at drivers/regulator/core.c:2304 _regulator_put.part.0+0x168/0x170 The consumer could try to fix this in their driver by cleaning up on error from regulator_enable() (i.e. call regulator_disable()), but that results in the following since regulator_enable() failed and didn't increment user_count: [ 1.258112] unbalanced disables for vreg_l17c [ 1.262606] WARNING: CPU: 4 PID: 1 at drivers/regulator/core.c:2899 _regulator_disable+0xd4/0x190 Fix this by decrementing enable_count upon failure to enable. With this in place, just the reason for failure to enable is printed as expected and developers can focus on the root cause of their issue instead of thinking their usage of the regulator consumer api is incorrect. For example, in my case: [ 1.240426] vreg_l17c: invalid input voltage found Fixes: 5451781dadf8 ("regulator: core: Only count load for enabled consumers") Signed-off-by: Andrew Halaney Reviewed-by: Douglas Anderson Reviewed-by: Brian Masney Link: https://lore.kernel.org/r/20220819194336.382740-1-ahalaney@redhat.com Signed-off-by: Mark Brown drivers/regulator/core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 221ab1f0bf46236cf1a3fef5298ff5894acfb0c5 Author: Jiaxin Yu Date: Sat Aug 20 15:19:25 2022 +0800 ASoC: mediatek: mt8186: fix DMIC record noise When the first DMIC recording is power down, mtkaif_dmic will be reset. This will cause configuration error in the second DMIC recording. So do not reset mtkaif_dmic except in "MTKAIF_DMIC Switch" kcontrol. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/20220820071925.13557-1-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-dai-adda.c | 3 --- 1 file changed, 3 deletions(-) commit a8d302a0b77057568350fe0123e639d02dba0745 Author: Takashi Iwai Date: Sun Aug 21 17:59:11 2022 +0200 ALSA: memalloc: Revive x86-specific WC page allocations again We dropped the x86-specific hack for WC-page allocations with a hope that the standard dma_alloc_wc() works nowadays. Alas, it doesn't, and we need to take back some workaround again, but in a different form, as the previous one was broken for some platforms. This patch re-introduces the x86-specific WC-page allocations, but it uses rather the manual page allocations instead of dma_alloc_coherent(). The use of dma_alloc_coherent() was also a potential problem in the recent addition of the fallback allocation for noncontig pages, and this patch eliminates both at once. Fixes: 9882d63bea14 ("ALSA: memalloc: Drop x86-specific hack for WC allocations") Cc: BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=216363 Link: https://lore.kernel.org/r/20220821155911.10715-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/memalloc.c | 87 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 71 insertions(+), 16 deletions(-) commit 63f1560930e4e1c4f6279b8ae715c9841fe1a6d3 Author: Adrian Hunter Date: Mon Aug 15 10:33:21 2022 +0300 mmc: core: Fix inconsistent sd3_bus_mode at UHS-I SD voltage switch failure If re-initialization results is a different signal voltage, because the voltage switch failed previously, but not this time (or vice versa), then sd3_bus_mode will be inconsistent with the card because the SD_SWITCH command is done only upon first initialization. Fix by always reading SD_SWITCH information during re-initialization, which also means it does not need to be re-read later for the 1.8V fixup workaround. Note, brief testing showed SD_SWITCH took about 1.8ms to 2ms which added about 1% to 1.5% to the re-initialization time, so it's not particularly significant. Reported-by: Seunghui Lee Signed-off-by: Adrian Hunter Reviewed-by: Seunghui Lee Tested-by: Seunghui Lee Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220815073321.63382-3-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/core/sd.c | 42 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) commit 15c56208c79c340686869c31595c209d1431c5e8 Author: Adrian Hunter Date: Mon Aug 15 10:33:20 2022 +0300 mmc: core: Fix UHS-I SD 1.8V workaround branch When introduced, upon success, the 1.8V fixup workaround in mmc_sd_init_card() would branch to practically the end of the function, to a label named "done". Unfortunately, perhaps due to the label name, over time new code has been added that really should have come after "done" not before it. Let's fix the problem by moving the label to the correct place and rename it "cont". Fixes: 045d705dc1fb ("mmc: core: Enable the MMC host software queue for the SD card") Signed-off-by: Adrian Hunter Reviewed-by: Seunghui Lee Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220815073321.63382-2-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/core/sd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0c3bc7899e6dfb52df1c46118a5a670ae619645f Author: Christian Brauner Date: Wed Jul 20 14:32:52 2022 +0200 ntfs: fix acl handling While looking at our current POSIX ACL handling in the context of some overlayfs work I went through a range of other filesystems checking how they handle them currently and encountered ntfs3. The posic_acl_{from,to}_xattr() helpers always need to operate on the filesystem idmapping. Since ntfs3 can only be mounted in the initial user namespace the relevant idmapping is init_user_ns. The posix_acl_{from,to}_xattr() helpers are concerned with translating between the kernel internal struct posix_acl{_entry} and the uapi struct posix_acl_xattr_{header,entry} and the kernel internal data structure is cached filesystem wide. Additional idmappings such as the caller's idmapping or the mount's idmapping are handled higher up in the VFS. Individual filesystems usually do not need to concern themselves with these. The posix_acl_valid() helper is concerned with checking whether the values in the kernel internal struct posix_acl can be represented in the filesystem's idmapping. IOW, if they can be written to disk. So this helper too needs to take the filesystem's idmapping. Fixes: be71b5cba2e6 ("fs/ntfs3: Add attrib operations") Cc: Konstantin Komarov Cc: ntfs3@lists.linux.dev Signed-off-by: Christian Brauner (Microsoft) fs/ntfs3/xattr.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 591d2108f3abc4db9f9073cae37cf3591fd250d6 Author: Helge Deller Date: Sun Aug 21 14:49:58 2022 +0200 parisc: Add runtime check to prevent PA2.0 kernels on PA1.x machines If a 32-bit kernel was compiled for PA2.0 CPUs, it won't be able to run on machines with PA1.x CPUs. Add a check and bail out early if a PA1.x machine is detected. Signed-off-by: Helge Deller arch/parisc/kernel/head.S | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) commit d46c742f827fa2326ab1f4faa1cccadb56912341 Author: Li Qiong Date: Fri Aug 19 12:15:10 2022 +0800 parisc: ccio-dma: Handle kmalloc failure in ccio_init_resources() As the possible failure of the kmalloc(), it should be better to fix this error path, check and return '-ENOMEM' error code. Signed-off-by: Li Qiong Signed-off-by: Helge Deller drivers/parisc/ccio-dma.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 4cb2643667c26fc976a4941b92f3770da9ec06a0 Author: Wolfram Sang Date: Thu Aug 18 23:00:55 2022 +0200 parisc: led: Move from strlcpy with unused retval to strscpy Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang Signed-off-by: Helge Deller drivers/parisc/led.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db4538ad4db280a2114e9d507d47c9f1a9f2cfd8 Author: Jason Wang Date: Thu Aug 11 21:59:53 2022 +0800 parisc: ccio-dma: Fix typo in comment The double `was' is duplicated in the comment, remove one. Signed-off-by: Jason Wang Signed-off-by: Helge Deller drivers/parisc/ccio-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4b18f47f4f9682fbf5827682645da7c8dde8f80 Author: Helge Deller Date: Sun Aug 21 08:12:19 2022 +0200 Revert "parisc: Show error if wrong 32/64-bit compiler is being used" This reverts commit b160628e9ebcdc85d0db9d7f423c26b3c7c179d0. There is no need any longer to have this sanity check, because the previous commit ("parisc: Make CONFIG_64BIT available for ARCH=parisc64 only") prevents that CONFIG_64BIT is set if ARCH==parisc. Signed-off-by: Helge Deller arch/parisc/include/asm/bitops.h | 8 -------- 1 file changed, 8 deletions(-) commit 3dcfb729b5f4a0c9b50742865cd5e6c4dbcc80dc Author: Helge Deller Date: Fri Aug 19 19:30:50 2022 +0200 parisc: Make CONFIG_64BIT available for ARCH=parisc64 only With this patch the ARCH= parameter decides if the CONFIG_64BIT option will be set or not. This means, the ARCH= parameter will give: ARCH=parisc -> 32-bit kernel ARCH=parisc64 -> 64-bit kernel This simplifies the usage of the other config options like randconfig, allmodconfig and allyesconfig a lot and produces the output which is expected for parisc64 (64-bit) vs. parisc (32-bit). Suggested-by: Masahiro Yamada Signed-off-by: Helge Deller Tested-by: Randy Dunlap Reviewed-by: Randy Dunlap Cc: # 5.15+ arch/parisc/Kconfig | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit 48ec73395887694f13c9452b4dcfb43710451757 Author: Molly Sophia Date: Sun Aug 7 20:26:45 2022 +0800 pinctrl: qcom: sc8180x: Fix wrong pin numbers The pin numbers for UFS_RESET and SDC2_* are not consistent in the pinctrl driver for sc8180x. So fix it. Signed-off-by: Molly Sophia Fixes: 97423113ec4b ("pinctrl: qcom: Add sc8180x TLMM driver") Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220807122645.13830-3-mollysophia379@gmail.com Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-sc8180x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6124cec530c7d8faab96d340ab2df5161e5d1c8a Author: Molly Sophia Date: Sun Aug 7 20:26:44 2022 +0800 pinctrl: qcom: sc8180x: Fix gpio_wakeirq_map Currently in the wakeirq_map, gpio36 and gpio37 have the same wakeirq number, resulting in gpio37 being unable to trigger interrupts. It looks like that this is a typo in the wakeirq map. So fix it. Signed-off-by: Molly Sophia Fixes: 97423113ec4b ("pinctrl: qcom: Add sc8180x TLMM driver") Tested-by: Bjorn Andersson Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220807122645.13830-2-mollysophia379@gmail.com Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-sc8180x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b75ef35bb57791a5d675699ed4a40c870d1da12f Author: Alex Williamson Date: Wed Aug 10 15:55:48 2022 -0600 drm/i915/gvt: Fix Comet Lake Prior to the commit below the GAMT_CHKN_BIT_REG address was setup for devices matching (D_KBL | D_CFL), where intel_gvt_get_device_type() returns D_CFL for either Coffee Lake or Comet Lake. Include the missed platform.` Link: https://lore.kernel.org/all/20220808142711.02d16782.alex.williamson@redhat.com Fixes: e0f74ed4634d ("i915/gvt: Separate the MMIO tracking table from GVT-g") Signed-off-by: Alex Williamson Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/166016852965.780835.10366587502693016900.stgit@omen Reviewed-by: Zhenyu Wang drivers/gpu/drm/i915/intel_gvt_mmio_table.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 233f56745be446b289edac2ba8184c09365c005e Author: Colin Ian King Date: Tue Aug 16 13:02:47 2022 +0800 drm/i915/reg: Fix spelling mistake "Unsupport" -> "Unsupported" There is a spelling mistake in a gvt_vgpu_err error message. Fix it. Fixes: 695fbc08d80f ("drm/i915/gvt: replace the gvt_err with gvt_vgpu_err") Signed-off-by: Colin Ian King Signed-off-by: Zhi Wang Link: http://patchwork.freedesktop.org/patch/msgid/20220315202449.2952845-1-colin.i.king@gmail.com Reviewed-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f143b9f3849828870bb2a7f28288095ad9a329d Author: Marcel Ziswiler Date: Fri Aug 12 23:39:05 2022 +0200 arm64: dts: freescale: verdin-imx8mp: fix atmel_mxt_ts reset polarity Fix reset GPIO polarity in-line with the following commit feedaacdadfc ("Input: atmel_mxt_ts - fix up inverted RESET handler"). Fixes: a39ed23bdf6e ("arm64: dts: freescale: add initial support for verdin imx8m plus") Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 90974f655922219c0a0cdce7ae8de7f30c549cb5 Author: Marcel Ziswiler Date: Fri Aug 12 23:39:04 2022 +0200 arm64: dts: freescale: verdin-imx8mm: fix atmel_mxt_ts reset polarity Fix reset GPIO polarity in-line with the following commit feedaacdadfc ("Input: atmel_mxt_ts - fix up inverted RESET handler"). Fixes: 6a57f224f734 ("arm64: dts: freescale: add initial support for verdin imx8m mini") Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17fe7251d3c7504e85acf0d4ec2eb54e11cbc386 Author: Marek Vasut Date: Fri Aug 12 23:07:40 2022 +0200 arm64: dts: imx8mp: Fix I2C5 GPIO assignment on i.MX8M Plus DHCOM Fix copy-paste error of the I2C5 bus recovery GPIO assignment, the I2C5 GPIOs are on gpio3 instead of gpio5. Fixes: 8d6712695bc8e ("arm64: dts: imx8mp: Add support for DH electronics i.MX8M Plus DHCOM and PDK2") Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7f4dbc3f26e5cb1f056faaaf14277f48c4682fff Author: Tim Harvey Date: Fri Aug 12 10:20:54 2022 -0700 arm64: dts: imx8mm-venice-gw7901: fix port/phy validation Since commit 65ac79e18120 ("net: dsa: microchip: add the phylink get_caps") the phy-mode must be set otherwise the switch driver will assume "NA" mode and invalidate the port. Fixes: 65ac79e18120 ("net: dsa: microchip: add the phylink get_caps") Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 2fa24aa721ebb3a83dd2093814ba9a5dcdaa3183 Author: Philippe Schenker Date: Thu Aug 11 16:07:38 2022 +0200 arm64: dts: verdin-imx8mm: add otg2 pd to usbphy The Verdin iMX8M Mini System on Module does not have USB-ID signal connected on Verdin USB_2 (usbotg2). On Verdin Development board this is no problem, as we have connected a USB-Hub that is always connected. However, if Verdin USB_2 is desired to be used as a single USB-Host port the chipidea driver does not detect if a USB device is plugged into this port, due to runtime pm shutting down the PHY. Add the power-domain &pgc_otg2 to &usbphynop2 in order to detect plugging events and enumerate the usb device. Fixes: 6a57f224f734 ("arm64: dts: freescale: add initial support for verdin imx8m mini") Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 1 + 1 file changed, 1 insertion(+) commit 1c23f9e627a7b412978b4e852793c5e3c3efc555 Author: Linus Torvalds Date: Sun Aug 21 17:32:54 2022 -0700 Linux 6.0-rc2 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4daa6a81c07c54f989e70d682fa0bff568c14df0 Merge: 4f61f842d199 57646d6769f1 Author: Linus Torvalds Date: Sun Aug 21 15:09:55 2022 -0700 Merge tag 'irq-urgent-2022-08-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Ingo Molnar: "Misc irqchip fixes: LoongArch driver fixes and a Hyper-V IOMMU fix" * tag 'irq-urgent-2022-08-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/loongson-liointc: Fix an error handling path in liointc_init() irqchip/loongarch: Fix irq_domain_alloc_fwnode() abuse irqchip/loongson-pch-pic: Move find_pch_pic() into CONFIG_ACPI irqchip/loongson-eiointc: Fix a build warning irqchip/loongson-eiointc: Fix irq affinity setting iommu/hyper-v: Use helper instead of directly accessing affinity commit 4f61f842d199a695bb0c310945f7f320c1730abc Merge: 7fb312d2256d 8924779df820 Author: Linus Torvalds Date: Sun Aug 21 15:01:51 2022 -0700 Merge tag 'perf-urgent-2022-08-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 kprobes fix from Ingo Molnar: "Fix a kprobes bug in JNG/JNLE emulation when a kprobe is installed at such instructions, possibly resulting in incorrect execution (the wrong branch taken)" * tag 'perf-urgent-2022-08-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kprobes: Fix JNG/JNLE emulation commit 7fb312d2256da63e6e4c6e92d279a90fe44bcabd Merge: e3f259d33c0e b2380577d4fe Author: Linus Torvalds Date: Sun Aug 21 14:49:42 2022 -0700 Merge tag 'trace-v6.0-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Various fixes for tracing: - Fix a return value of traceprobe_parse_event_name() - Fix NULL pointer dereference from failed ftrace enabling - Fix NULL pointer dereference when asking for registers from eprobes - Make eprobes consistent with kprobes/uprobes, filters and histograms" * tag 'trace-v6.0-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Have filter accept "common_cpu" to be consistent tracing/probes: Have kprobes and uprobes use $COMM too tracing/eprobes: Have event probes be consistent with kprobes and uprobes tracing/eprobes: Fix reading of string fields tracing/eprobes: Do not hardcode $comm as a string tracing/eprobes: Do not allow eprobes to use $stack, or % for regs ftrace: Fix NULL pointer dereference in is_ftrace_trampoline when ftrace is dead tracing/perf: Fix double put of trace event when init fails tracing: React to error return from traceprobe_parse_event_name() commit b2380577d4fe1c0ef3fa50417f1e441c016e4cbe Author: Steven Rostedt (Google) Date: Sat Aug 20 09:43:22 2022 -0400 tracing: Have filter accept "common_cpu" to be consistent Make filtering consistent with histograms. As "cpu" can be a field of an event, allow for "common_cpu" to keep it from being confused with the "cpu" field of the event. Link: https://lkml.kernel.org/r/20220820134401.513062765@goodmis.org Link: https://lore.kernel.org/all/20220820220920.e42fa32b70505b1904f0a0ad@kernel.org/ Cc: stable@vger.kernel.org Cc: Ingo Molnar Cc: Andrew Morton Cc: Tzvetomir Stoyanov Cc: Tom Zanussi Fixes: 1e3bac71c5053 ("tracing/histogram: Rename "cpu" to "common_cpu"") Suggested-by: Masami Hiramatsu (Google) Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events.c | 1 + 1 file changed, 1 insertion(+) commit ab8384442ee512fc0fc72deeb036110843d0e7ff Author: Steven Rostedt (Google) Date: Sat Aug 20 09:43:21 2022 -0400 tracing/probes: Have kprobes and uprobes use $COMM too Both $comm and $COMM can be used to get current->comm in eprobes and the filtering and histogram logic. Make kprobes and uprobes consistent in this regard and allow both $comm and $COMM as well. Currently kprobes and uprobes only handle $comm, which is inconsistent with the other utilities, and can be confusing to users. Link: https://lkml.kernel.org/r/20220820134401.317014913@goodmis.org Link: https://lore.kernel.org/all/20220820220442.776e1ddaf8836e82edb34d01@kernel.org/ Cc: stable@vger.kernel.org Cc: Ingo Molnar Cc: Andrew Morton Cc: Tzvetomir Stoyanov Cc: Tom Zanussi Fixes: 533059281ee5 ("tracing: probeevent: Introduce new argument fetching code") Suggested-by: Masami Hiramatsu (Google) Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_probe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6a832ec3d680b3a4f4fad5752672827d71bae501 Author: Steven Rostedt (Google) Date: Sat Aug 20 09:43:20 2022 -0400 tracing/eprobes: Have event probes be consistent with kprobes and uprobes Currently, if a symbol "@" is attempted to be used with an event probe (eprobes), it will cause a NULL pointer dereference crash. Both kprobes and uprobes can reference data other than the main registers. Such as immediate address, symbols and the current task name. Have eprobes do the same thing. For "comm", if "comm" is used and the event being attached to does not have the "comm" field, then make it the "$comm" that kprobes has. This is consistent to the way histograms and filters work. Link: https://lkml.kernel.org/r/20220820134401.136924220@goodmis.org Cc: stable@vger.kernel.org Cc: Ingo Molnar Cc: Andrew Morton Cc: Masami Hiramatsu Cc: Tzvetomir Stoyanov Cc: Tom Zanussi Fixes: 7491e2c44278 ("tracing: Add a probe that attaches to trace events") Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_eprobe.c | 70 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 64 insertions(+), 6 deletions(-) commit f04dec93466a0481763f3b56cdadf8076e28bfbf Author: Steven Rostedt (Google) Date: Sat Aug 20 09:43:19 2022 -0400 tracing/eprobes: Fix reading of string fields Currently when an event probe (eprobe) hooks to a string field, it does not display it as a string, but instead as a number. This makes the field rather useless. Handle the different kinds of strings, dynamic, static, relational/dynamic etc. Now when a string field is used, the ":string" type can be used to display it: echo "e:sw sched/sched_switch comm=$next_comm:string" > dynamic_events Link: https://lkml.kernel.org/r/20220820134400.959640191@goodmis.org Cc: stable@vger.kernel.org Cc: Ingo Molnar Cc: Andrew Morton Cc: Tzvetomir Stoyanov Cc: Tom Zanussi Fixes: 7491e2c44278 ("tracing: Add a probe that attaches to trace events") Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_eprobe.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 02333de90e5945e2fe7fc75b15b4eb9aee187f0a Author: Steven Rostedt (Google) Date: Sat Aug 20 09:43:18 2022 -0400 tracing/eprobes: Do not hardcode $comm as a string The variable $comm is hard coded as a string, which is true for both kprobes and uprobes, but for event probes (eprobes) it is a field name. In most cases the "comm" field would be a string, but there's no guarantee of that fact. Do not assume that comm is a string. Not to mention, it currently forces comm fields to fault, as string processing for event probes is currently broken. Link: https://lkml.kernel.org/r/20220820134400.756152112@goodmis.org Cc: stable@vger.kernel.org Cc: Ingo Molnar Cc: Andrew Morton Cc: Masami Hiramatsu Cc: Tzvetomir Stoyanov Cc: Tom Zanussi Fixes: 7491e2c44278 ("tracing: Add a probe that attaches to trace events") Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_probe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2673c60ee67e71f2ebe34386e62d348f71edee47 Author: Steven Rostedt (Google) Date: Sat Aug 20 09:43:17 2022 -0400 tracing/eprobes: Do not allow eprobes to use $stack, or % for regs While playing with event probes (eprobes), I tried to see what would happen if I attempted to retrieve the instruction pointer (%rip) knowing that event probes do not use pt_regs. The result was: BUG: kernel NULL pointer dereference, address: 0000000000000024 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 1 PID: 1847 Comm: trace-cmd Not tainted 5.19.0-rc5-test+ #309 Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v03.03 07/14/2016 RIP: 0010:get_event_field.isra.0+0x0/0x50 Code: ff 48 c7 c7 c0 8f 74 a1 e8 3d 8b f5 ff e8 88 09 f6 ff 4c 89 e7 e8 50 6a 13 00 48 89 ef 5b 5d 41 5c 41 5d e9 42 6a 13 00 66 90 <48> 63 47 24 8b 57 2c 48 01 c6 8b 47 28 83 f8 02 74 0e 83 f8 04 74 RSP: 0018:ffff916c394bbaf0 EFLAGS: 00010086 RAX: ffff916c854041d8 RBX: ffff916c8d9fbf50 RCX: ffff916c255d2000 RDX: 0000000000000000 RSI: ffff916c255d2008 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffff916c3a2a0c08 R09: ffff916c394bbda8 R10: 0000000000000000 R11: 0000000000000000 R12: ffff916c854041d8 R13: ffff916c854041b0 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff916c9ea40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000024 CR3: 000000011b60a002 CR4: 00000000001706e0 Call Trace: get_eprobe_size+0xb4/0x640 ? __mod_node_page_state+0x72/0xc0 __eprobe_trace_func+0x59/0x1a0 ? __mod_lruvec_page_state+0xaa/0x1b0 ? page_remove_file_rmap+0x14/0x230 ? page_remove_rmap+0xda/0x170 event_triggers_call+0x52/0xe0 trace_event_buffer_commit+0x18f/0x240 trace_event_raw_event_sched_wakeup_template+0x7a/0xb0 try_to_wake_up+0x260/0x4c0 __wake_up_common+0x80/0x180 __wake_up_common_lock+0x7c/0xc0 do_notify_parent+0x1c9/0x2a0 exit_notify+0x1a9/0x220 do_exit+0x2ba/0x450 do_group_exit+0x2d/0x90 __x64_sys_exit_group+0x14/0x20 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Obviously this is not the desired result. Move the testing for TPARG_FL_TPOINT which is only used for event probes to the top of the "$" variable check, as all the other variables are not used for event probes. Also add a check in the register parsing "%" to fail if an event probe is used. Link: https://lkml.kernel.org/r/20220820134400.564426983@goodmis.org Cc: stable@vger.kernel.org Cc: Ingo Molnar Cc: Andrew Morton Cc: Tzvetomir Stoyanov Cc: Tom Zanussi Fixes: 7491e2c44278 ("tracing: Add a probe that attaches to trace events") Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_probe.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit c3b0f72e805f0801f05fa2aa52011c4bfc694c44 Author: Yang Jihong Date: Thu Aug 18 11:26:59 2022 +0800 ftrace: Fix NULL pointer dereference in is_ftrace_trampoline when ftrace is dead ftrace_startup does not remove ops from ftrace_ops_list when ftrace_startup_enable fails: register_ftrace_function ftrace_startup __register_ftrace_function ... add_ftrace_ops(&ftrace_ops_list, ops) ... ... ftrace_startup_enable // if ftrace failed to modify, ftrace_disabled is set to 1 ... return 0 // ops is in the ftrace_ops_list. When ftrace_disabled = 1, unregister_ftrace_function simply returns without doing anything: unregister_ftrace_function ftrace_shutdown if (unlikely(ftrace_disabled)) return -ENODEV; // return here, __unregister_ftrace_function is not executed, // as a result, ops is still in the ftrace_ops_list __unregister_ftrace_function ... If ops is dynamically allocated, it will be free later, in this case, is_ftrace_trampoline accesses NULL pointer: is_ftrace_trampoline ftrace_ops_trampoline do_for_each_ftrace_op(op, ftrace_ops_list) // OOPS! op may be NULL! Syzkaller reports as follows: [ 1203.506103] BUG: kernel NULL pointer dereference, address: 000000000000010b [ 1203.508039] #PF: supervisor read access in kernel mode [ 1203.508798] #PF: error_code(0x0000) - not-present page [ 1203.509558] PGD 800000011660b067 P4D 800000011660b067 PUD 130fb8067 PMD 0 [ 1203.510560] Oops: 0000 [#1] SMP KASAN PTI [ 1203.511189] CPU: 6 PID: 29532 Comm: syz-executor.2 Tainted: G B W 5.10.0 #8 [ 1203.512324] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 1203.513895] RIP: 0010:is_ftrace_trampoline+0x26/0xb0 [ 1203.514644] Code: ff eb d3 90 41 55 41 54 49 89 fc 55 53 e8 f2 00 fd ff 48 8b 1d 3b 35 5d 03 e8 e6 00 fd ff 48 8d bb 90 00 00 00 e8 2a 81 26 00 <48> 8b ab 90 00 00 00 48 85 ed 74 1d e8 c9 00 fd ff 48 8d bb 98 00 [ 1203.518838] RSP: 0018:ffffc900012cf960 EFLAGS: 00010246 [ 1203.520092] RAX: 0000000000000000 RBX: 000000000000007b RCX: ffffffff8a331866 [ 1203.521469] RDX: 0000000000000000 RSI: 0000000000000008 RDI: 000000000000010b [ 1203.522583] RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff8df18b07 [ 1203.523550] R10: fffffbfff1be3160 R11: 0000000000000001 R12: 0000000000478399 [ 1203.524596] R13: 0000000000000000 R14: ffff888145088000 R15: 0000000000000008 [ 1203.525634] FS: 00007f429f5f4700(0000) GS:ffff8881daf00000(0000) knlGS:0000000000000000 [ 1203.526801] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1203.527626] CR2: 000000000000010b CR3: 0000000170e1e001 CR4: 00000000003706e0 [ 1203.528611] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1203.529605] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Therefore, when ftrace_startup_enable fails, we need to rollback registration process and remove ops from ftrace_ops_list. Link: https://lkml.kernel.org/r/20220818032659.56209-1-yangjihong1@huawei.com Suggested-by: Steven Rostedt Signed-off-by: Yang Jihong Signed-off-by: Steven Rostedt (Google) kernel/trace/ftrace.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7249921d94ff64f67b733eca0b68853a62032b3d Author: Steven Rostedt (Google) Date: Tue Aug 16 19:28:17 2022 -0400 tracing/perf: Fix double put of trace event when init fails If in perf_trace_event_init(), the perf_trace_event_open() fails, then it will call perf_trace_event_unreg() which will not only unregister the perf trace event, but will also call the put() function of the tp_event. The problem here is that the trace_event_try_get_ref() is called by the caller of perf_trace_event_init() and if perf_trace_event_init() returns a failure, it will then call trace_event_put(). But since the perf_trace_event_unreg() already called the trace_event_put() function, it triggers a WARN_ON(). WARNING: CPU: 1 PID: 30309 at kernel/trace/trace_dynevent.c:46 trace_event_dyn_put_ref+0x15/0x20 If perf_trace_event_reg() does not call the trace_event_try_get_ref() then the perf_trace_event_unreg() should not be calling trace_event_put(). This breaks symmetry and causes bugs like these. Pull out the trace_event_put() from perf_trace_event_unreg() and call it in the locations that perf_trace_event_unreg() is called. This not only fixes this bug, but also brings back the proper symmetry of the reg/unreg vs get/put logic. Link: https://lore.kernel.org/all/cover.1660347763.git.kjlx@templeofstupid.com/ Link: https://lkml.kernel.org/r/20220816192817.43d5e17f@gandalf.local.home Cc: stable@vger.kernel.org Fixes: 1d18538e6a092 ("tracing: Have dynamic events have a ref counter") Reported-by: Krister Johansen Reviewed-by: Krister Johansen Tested-by: Krister Johansen Acked-by: Jiri Olsa Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_event_perf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d8a64313c171464aedd6289378a51c8f0f524acb Author: Lukas Bulwahn Date: Thu Aug 11 09:17:34 2022 +0200 tracing: React to error return from traceprobe_parse_event_name() The function traceprobe_parse_event_name() may set the first two function arguments to a non-null value and still return -EINVAL to indicate an unsuccessful completion of the function. Hence, it is not sufficient to just check the result of the two function arguments for being not null, but the return value also needs to be checked. Commit 95c104c378dc ("tracing: Auto generate event name when creating a group of events") changed the error-return-value checking of the second traceprobe_parse_event_name() invocation in __trace_eprobe_create() and removed checking the return value to jump to the error handling case. Reinstate using the return value in the error-return-value checking. Link: https://lkml.kernel.org/r/20220811071734.20700-1-lukas.bulwahn@gmail.com Fixes: 95c104c378dc ("tracing: Auto generate event name when creating a group of events") Acked-by: Linyu Yuan Signed-off-by: Lukas Bulwahn Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_eprobe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3f259d33c0ebae1b6e4922c7cdb50e864c81928 Merge: 367bcbc5b5ff d98bdd3a5b50 Author: Linus Torvalds Date: Sun Aug 21 11:18:33 2022 -0700 Merge tag 'i2c-for-6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "A revert to fix a regression introduced this merge window and a fix for proper error handling in the remove path of the iMX driver" * tag 'i2c-for-6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: imx: Make sure to unregister adapter on remove() Revert "i2c: scmi: Replace open coded device_get_match_data()" commit 0096fc879358ad6b82ee7e790c07b118c515c980 Author: sunliming Date: Mon Aug 15 09:29:30 2022 +0800 iio: light: cm32181: make cm32181_pm_ops static This symbol is not used outside of cm32181.c, so marks it static. Fixes the following sparse warnings: >> drivers/iio/light/cm32181.c:508:1: sparse: sparse: symbol 'cm32181_pm_ops' was not declared. Should it be static? Reported-by: kernel test robot Signed-off-by: sunliming Link: https://lore.kernel.org/r/20220815012930.150078-1-sunliming@kylinos.cn Signed-off-by: Jonathan Cameron drivers/iio/light/cm32181.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22b4277641c6823ec03d5b1cd82628e5e53e75b7 Author: Matti Vaittinen Date: Fri Aug 19 11:51:07 2022 +0300 iio: ad7292: Prevent regulator double disable The ad7292 tries to add an devm_action for disabling a regulator at device detach using devm_add_action_or_reset(). The devm_add_action_or_reset() does call the release function should adding action fail. The driver inspects the value returned by devm_add_action_or_reset() and manually calls regulator_disable() if adding the action has failed. This leads to double disable and messes the enable count for regulator. Do not manually call disable if devm_add_action_or_reset() fails. Fixes: 506d2e317a0a ("iio: adc: Add driver support for AD7292") Signed-off-by: Matti Vaittinen Tested-by: Marcelo Schmitt Link: https://lore.kernel.org/r/Yv9O+9sxU7gAv3vM@fedora Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7292.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 767470209cedbe2cc72ba38d77c9f096d2c7694c Author: Krzysztof Kozlowski Date: Fri Aug 5 09:55:03 2022 +0200 dt-bindings: iio: gyroscope: bosch,bmg160: correct number of pins BMG160 has two interrupt pins to which interrupts can be freely mapped. Correct the schema to express such case and fix warnings like: qcom/msm8916-alcatel-idol347.dtb: gyroscope@68: interrupts: [[97, 1], [98, 1]] is too long However the basic issue still persists - the interrupts should come in a defined order. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220805075503.16983-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 9e2238e3ae40d371a1130226e0e740aa1601efa6 Author: Marcus Folkesson Date: Fri Jul 22 15:07:20 2022 +0200 iio: adc: mcp3911: use correct formula for AD conversion The ADC conversion is actually not rail-to-rail but with a factor 1.5. Make use of this factor when calculating actual voltage. Fixes: 3a89b289df5d ("iio: adc: add support for mcp3911") Signed-off-by: Marcus Folkesson Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220722130726.7627-4-marcus.folkesson@gmail.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/mcp3911.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit cfbd76d5c9c449739bb74288d982bccf9ff822f4 Author: Marcus Folkesson Date: Fri Jul 22 15:07:19 2022 +0200 iio: adc: mcp3911: correct "microchip,device-addr" property Go for the right property name that is documented in the bindings. Fixes: 3a89b289df5d ("iio: adc: add support for mcp3911") Signed-off-by: Marcus Folkesson Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220722130726.7627-3-marcus.folkesson@gmail.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/mcp3911.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 367bcbc5b5ffc7164fb6ce1547e84dbf21795562 Merge: a0a12c3ed057 13609a8b3ac6 Author: Linus Torvalds Date: Sun Aug 21 10:21:16 2022 -0700 Merge tag '6.0-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs client fixes from Steve French: - memory leak fix - two small cleanups - trivial strlcpy removal - update missing entry for cifs headers in MAINTAINERS file * tag '6.0-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: move from strlcpy with unused retval to strscpy cifs: Fix memory leak on the deferred close cifs: remove useless parameter 'is_fsctl' from SMB2_ioctl() cifs: remove unused server parameter from calc_smb_size() cifs: missing directory in MAINTAINERS file commit a0a12c3ed057af57552bf6c0aeaca6835693df04 Author: Nick Desaulniers Date: Fri Aug 19 12:06:40 2022 -0700 asm goto: eradicate CC_HAS_ASM_GOTO GCC has supported asm goto since 4.5, and Clang has since version 9.0.0. The minimum supported versions of these tools for the build according to Documentation/process/changes.rst are 5.1 and 11.0.0 respectively. Remove the feature detection script, Kconfig option, and clean up some fallback code that is no longer supported. The removed script was also testing for a GCC specific bug that was fixed in the 4.7 release. Also remove workarounds for bpftrace using clang older than 9.0.0, since other BPF backend fixes are required at this point. Link: https://lore.kernel.org/lkml/CAK7LNATSr=BXKfkdW8f-H5VT_w=xBpT2ZQcZ7rm6JfkdE+QnmA@mail.gmail.com/ Link: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48637 Acked-by: Borislav Petkov Suggested-by: Masahiro Yamada Suggested-by: Alexei Starovoitov Signed-off-by: Nick Desaulniers Reviewed-by: Ingo Molnar Reviewed-by: Nathan Chancellor Reviewed-by: Alexandre Belloni Signed-off-by: Linus Torvalds Documentation/kbuild/kconfig-language.rst | 4 ++-- arch/Kconfig | 3 +-- arch/um/include/asm/cpufeature.h | 15 --------------- arch/x86/Makefile | 4 ---- arch/x86/include/asm/cpufeature.h | 15 --------------- arch/x86/include/asm/rmwcc.h | 6 +++--- arch/x86/kvm/emulate.c | 2 +- init/Kconfig | 4 ---- scripts/gcc-goto.sh | 22 ---------------------- tools/arch/x86/include/asm/rmwcc.h | 21 --------------------- 10 files changed, 7 insertions(+), 89 deletions(-) commit df88005bd81b80c944d185554e264a4b0f993c37 Author: Marek Vasut Date: Fri Aug 12 19:08:02 2022 +0200 soc: imx: gpcv2: Assert reset before ungating clock In case the power domain clock are ungated before the reset is asserted, the system might freeze completely. This is likely due to a device is an undefined state being attached to bus, which sporadically leads to a bus hang. Assert the reset before the clock are enabled to assure the device is in defined state before being attached to bus. Fixes: fe58c887fb8ca ("soc: imx: gpcv2: add support for optional resets") Signed-off-by: Marek Vasut Reviewed-by: Fabio Estevam Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo drivers/soc/imx/gpcv2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e7406f864e765c564c5cf384464faff66114f97d Author: Vladimir Oltean Date: Tue Aug 2 16:50:06 2022 +0300 arm64: dts: ls1028a-qds-65bb: don't use in-band autoneg for 2500base-x The Lynx PCS integrated with ENETC port 0 does not support in-band autoneg for the 2500base-x SERDES protocol, and prints errors from its phylink methods. Furthermore, the AQR112 card used for these boards does not expect in-band autoneg either. So delete the extraneous property. Fixes: e426d63e752b ("arm64: dts: ls1028a-qds: add overlays for various serdes protocols") Signed-off-by: Vladimir Oltean Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-65bb.dts | 1 - 1 file changed, 1 deletion(-) commit af7d78c957017f8b3a0986769f6f18e57f9362ea Author: Marco Felsch Date: Tue Jul 26 15:05:22 2022 +0200 ARM: dts: imx6qdl-kontron-samx6i: fix spi-flash compatible Drop the "winbond,w25q16dw" compatible since it causes to set the MODALIAS to w25q16dw which is not specified within spi-nor id table. Fix this by use the common "jedec,spi-nor" compatible. Fixes: 2125212785c9 ("ARM: dts: imx6qdl-kontron-samx6i: add Kontron SMARC SoM Support") Signed-off-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 204f67d86f55dd4fa757ed04757d7273f71a169c Author: Marco Felsch Date: Tue Jul 26 15:05:21 2022 +0200 ARM: dts: imx6qdl-kontron-samx6i: remove duplicated node The regulator node 'regulator-3p3v-s0' was dupplicated. Remove it to clean the DTS. Fixes: 2a51f9dae13d ("ARM: dts: imx6qdl-kontron-samx6i: Add iMX6-based Kontron SMARC-sAMX6i module") Signed-off-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 10 ---------- 1 file changed, 10 deletions(-) commit 83c75e1bc2b83b3f0c718833bde677ebfa736283 Author: David Jander Date: Tue Jul 26 14:32:22 2022 +0200 ARM: dts: imx6qdl-vicut1.dtsi: Fix node name backlight_led This naming error slipped through, so now that a new backlight node has been added with correct spelling, fix this one also. Fixes: 98efa526a0c4 ("ARM: dts: imx6qdl-vicut1/vicutgo: Add backlight_led node") Signed-off-by: David Jander Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-vicut1.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc2e426b1161761561624ebd43ce8c8d2fa058da Author: Chen Zhongjin Date: Fri Aug 19 16:43:34 2022 +0800 x86/unwind/orc: Unwind ftrace trampolines with correct ORC entry When meeting ftrace trampolines in ORC unwinding, unwinder uses address of ftrace_{regs_}call address to find the ORC entry, which gets next frame at sp+176. If there is an IRQ hitting at sub $0xa8,%rsp, the next frame should be sp+8 instead of 176. It makes unwinder skip correct frame and throw warnings such as "wrong direction" or "can't access registers", etc, depending on the content of the incorrect frame address. By adding the base address ftrace_{regs_}caller with the offset *ip - ops->trampoline*, we can get the correct address to find the ORC entry. Also change "caller" to "tramp_addr" to make variable name conform to its content. [ mingo: Clarified the changelog a bit. ] Fixes: 6be7fa3c74d1 ("ftrace, orc, x86: Handle ftrace dynamically allocated trampolines") Signed-off-by: Chen Zhongjin Signed-off-by: Ingo Molnar Reviewed-by: Steven Rostedt (Google) Cc: Link: https://lore.kernel.org/r/20220819084334.244016-1-chenzhongjin@huawei.com arch/x86/kernel/unwind_orc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 56c310de0b4b3aca1c4fdd9c1093fc48372a7335 Author: Jack Wang Date: Thu Aug 18 12:53:55 2022 +0200 RDMA/rtrs-srv: Pass the correct number of entries for dma mapped SGL ib_dma_map_sg() augments the SGL into a 'dma mapped SGL'. This process may change the number of entries and the lengths of each entry. Code that touches dma_address is iterating over the 'dma mapped SGL' and must use dma_nents which returned from ib_dma_map_sg(). We should use the return count from ib_dma_map_sg for futher usage. Fixes: 9cb837480424e ("RDMA/rtrs: server: main functionality") Link: https://lore.kernel.org/r/20220818105355.110344-4-haris.iqbal@ionos.com Signed-off-by: Jack Wang Reviewed-by: Aleksei Marov Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-srv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit b66905e04dc714825aa6cffb950e281b46bbeafe Author: Jack Wang Date: Thu Aug 18 12:53:54 2022 +0200 RDMA/rtrs-clt: Use the right sg_cnt after ib_dma_map_sg When iommu is enabled, we hit warnings like this: WARNING: at rtrs/rtrs.c:178 rtrs_iu_post_rdma_write_imm+0x9b/0x110 rtrs warn on one sge entry length is 0, which is unexpected. The problem is ib_dma_map_sg augments the SGL into a 'dma mapped SGL'. This process may change the number of entries and the lengths of each entry. Code that touches dma_address is iterating over the 'dma mapped SGL' and must use dma_nents which returned from ib_dma_map_sg(). So pass the count return from ib_dma_map_sg. Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Link: https://lore.kernel.org/r/20220818105355.110344-3-haris.iqbal@ionos.com Signed-off-by: Jack Wang Reviewed-by: Aleksei Marov Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-clt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 8eaac789128a84e79c193e662959469e824423ee Author: Alexander Stein Date: Mon Jul 25 16:17:39 2022 +0200 arm64: dts: imx8mq-tqma8mq: Remove superfluous interrupt-names This property was never needed, remove it. This also silences dtbs_check warnings. Fixes: b186b8b6e770 ("arm64: dts: freescale: add initial device tree for TQMa8Mx with i.MX8M") Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mq-tqma8mq.dtsi | 1 - 1 file changed, 1 deletion(-) commit d98bdd3a5b50446d8e010be5b04ce81c4eabf728 Author: Uwe Kleine-König Date: Wed Jul 20 17:09:33 2022 +0200 i2c: imx: Make sure to unregister adapter on remove() If for whatever reasons pm_runtime_resume_and_get() fails and .remove() is exited early, the i2c adapter stays around and the irq still calls its handler, while the driver data and the register mapping go away. So if later the i2c adapter is accessed or the irq triggers this results in havoc accessing freed memory and unmapped registers. So unregister the software resources even if resume failed, and only skip the hardware access in that case. Fixes: 588eb93ea49f ("i2c: imx: add runtime pm support to improve the performance") Signed-off-by: Uwe Kleine-König Acked-by: Oleksij Rempel Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-imx.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 3df71d7064cbb19a3ac0e5dc25ece2bbf3a4d9af Author: Wolfram Sang Date: Thu Aug 18 22:31:13 2022 +0200 Revert "i2c: scmi: Replace open coded device_get_match_data()" This reverts commit 9ae551ded5ba55f96a83cd0811f7ef8c2f329d0c. We got a regression report, so ensure this machine boots again. We will come back with a better version hopefully. Reported-by: Josef Johansson Link: https://lore.kernel.org/r/4d2d5b04-0b6c-1cb1-a63f-dc06dfe1b5da@oderland.se Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-scmi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit c7afab4ac7bd5137e20711fba5ba34ee67b72710 Author: Marek Vasut Date: Sat Jul 23 23:24:39 2022 +0200 arm64: dts: imx8mp: Adjust ECSPI1 pinmux on i.MX8M Plus DHCOM The ECSPI1 is on I2C1/I2C2 pins of the SoC, update the pinmux accordingly. Fixes: 8d6712695bc8e ("arm64: dts: imx8mp: Add support for DH electronics i.MX8M Plus DHCOM and PDK2") Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: NXP Linux Team Cc: Peng Fan Cc: Shawn Guo To: linux-arm-kernel@lists.infradead.org Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 706dd9d30d3bda4e31d423af004c22d48e89fbc9 Author: Peng Fan Date: Sat Jul 23 18:50:05 2022 +0800 arm64: dts: imx8mp-venice-gw74xx: fix sai2 pin settings The pad settings are missed, add them Fixes: 7899eb6cb15d ("arm64: dts: imx: Add i.MX8M Plus Gateworks gw7400 dts support") Signed-off-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7ae1f5508d9a33fd58ed3059bd2d569961e3b8bd Author: Helge Deller Date: Sat Aug 20 17:59:17 2022 +0200 parisc: Fix exception handler for fldw and fstw instructions The exception handler is broken for unaligned memory acceses with fldw and fstw instructions, because it trashes or uses randomly some other floating point register than the one specified in the instruction word on loads and stores. The instruction "fldw 0(addr),%fr22L" (and the other fldw/fstw instructions) encode the target register (%fr22) in the rightmost 5 bits of the instruction word. The 7th rightmost bit of the instruction word defines if the left or right half of %fr22 should be used. While processing unaligned address accesses, the FR3() define is used to extract the offset into the local floating-point register set. But the calculation in FR3() was buggy, so that for example instead of %fr22, register %fr12 [((22 * 2) & 0x1f) = 12] was used. This bug has been since forever in the parisc kernel and I wonder why it wasn't detected earlier. Interestingly I noticed this bug just because the libime debian package failed to build on *native* hardware, while it successfully built in qemu. This patch corrects the bitshift and masking calculation in FR3(). Signed-off-by: Helge Deller Cc: arch/parisc/kernel/unaligned.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c80e79906b4ca440d09e7f116609262bb747909 Author: Kuniyuki Iwashima Date: Fri Aug 12 19:05:09 2022 -0700 kprobes: don't call disarm_kprobe() for disabled kprobes The assumption in __disable_kprobe() is wrong, and it could try to disarm an already disarmed kprobe and fire the WARN_ONCE() below. [0] We can easily reproduce this issue. 1. Write 0 to /sys/kernel/debug/kprobes/enabled. # echo 0 > /sys/kernel/debug/kprobes/enabled 2. Run execsnoop. At this time, one kprobe is disabled. # /usr/share/bcc/tools/execsnoop & [1] 2460 PCOMM PID PPID RET ARGS # cat /sys/kernel/debug/kprobes/list ffffffff91345650 r __x64_sys_execve+0x0 [FTRACE] ffffffff91345650 k __x64_sys_execve+0x0 [DISABLED][FTRACE] 3. Write 1 to /sys/kernel/debug/kprobes/enabled, which changes kprobes_all_disarmed to false but does not arm the disabled kprobe. # echo 1 > /sys/kernel/debug/kprobes/enabled # cat /sys/kernel/debug/kprobes/list ffffffff91345650 r __x64_sys_execve+0x0 [FTRACE] ffffffff91345650 k __x64_sys_execve+0x0 [DISABLED][FTRACE] 4. Kill execsnoop, when __disable_kprobe() calls disarm_kprobe() for the disabled kprobe and hits the WARN_ONCE() in __disarm_kprobe_ftrace(). # fg /usr/share/bcc/tools/execsnoop ^C Actually, WARN_ONCE() is fired twice, and __unregister_kprobe_top() misses some cleanups and leaves the aggregated kprobe in the hash table. Then, __unregister_trace_kprobe() initialises tk->rp.kp.list and creates an infinite loop like this. aggregated kprobe.list -> kprobe.list -. ^ | '.__.' In this situation, these commands fall into the infinite loop and result in RCU stall or soft lockup. cat /sys/kernel/debug/kprobes/list : show_kprobe_addr() enters into the infinite loop with RCU. /usr/share/bcc/tools/execsnoop : warn_kprobe_rereg() holds kprobe_mutex, and __get_valid_kprobe() is stuck in the loop. To avoid the issue, make sure we don't call disarm_kprobe() for disabled kprobes. [0] Failed to disarm kprobe-ftrace at __x64_sys_execve+0x0/0x40 (error -2) WARNING: CPU: 6 PID: 2460 at kernel/kprobes.c:1130 __disarm_kprobe_ftrace.isra.19 (kernel/kprobes.c:1129) Modules linked in: ena CPU: 6 PID: 2460 Comm: execsnoop Not tainted 5.19.0+ #28 Hardware name: Amazon EC2 c5.2xlarge/, BIOS 1.0 10/16/2017 RIP: 0010:__disarm_kprobe_ftrace.isra.19 (kernel/kprobes.c:1129) Code: 24 8b 02 eb c1 80 3d c4 83 f2 01 00 75 d4 48 8b 75 00 89 c2 48 c7 c7 90 fa 0f 92 89 04 24 c6 05 ab 83 01 e8 e4 94 f0 ff <0f> 0b 8b 04 24 eb b1 89 c6 48 c7 c7 60 fa 0f 92 89 04 24 e8 cc 94 RSP: 0018:ffff9e6ec154bd98 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffffffff930f7b00 RCX: 0000000000000001 RDX: 0000000080000001 RSI: ffffffff921461c5 RDI: 00000000ffffffff RBP: ffff89c504286da8 R08: 0000000000000000 R09: c0000000fffeffff R10: 0000000000000000 R11: ffff9e6ec154bc28 R12: ffff89c502394e40 R13: ffff89c502394c00 R14: ffff9e6ec154bc00 R15: 0000000000000000 FS: 00007fe800398740(0000) GS:ffff89c812d80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000c00057f010 CR3: 0000000103b54006 CR4: 00000000007706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: __disable_kprobe (kernel/kprobes.c:1716) disable_kprobe (kernel/kprobes.c:2392) __disable_trace_kprobe (kernel/trace/trace_kprobe.c:340) disable_trace_kprobe (kernel/trace/trace_kprobe.c:429) perf_trace_event_unreg.isra.2 (./include/linux/tracepoint.h:93 kernel/trace/trace_event_perf.c:168) perf_kprobe_destroy (kernel/trace/trace_event_perf.c:295) _free_event (kernel/events/core.c:4971) perf_event_release_kernel (kernel/events/core.c:5176) perf_release (kernel/events/core.c:5186) __fput (fs/file_table.c:321) task_work_run (./include/linux/sched.h:2056 (discriminator 1) kernel/task_work.c:179 (discriminator 1)) exit_to_user_mode_prepare (./include/linux/resume_user_mode.h:49 kernel/entry/common.c:169 kernel/entry/common.c:201) syscall_exit_to_user_mode (./arch/x86/include/asm/jump_label.h:55 ./arch/x86/include/asm/nospec-branch.h:384 ./arch/x86/include/asm/entry-common.h:94 kernel/entry/common.c:133 kernel/entry/common.c:296) do_syscall_64 (arch/x86/entry/common.c:87) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120) RIP: 0033:0x7fe7ff210654 Code: 15 79 89 20 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb be 0f 1f 00 8b 05 9a cd 20 00 48 63 ff 85 c0 75 11 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 3a f3 c3 48 83 ec 18 48 89 7c 24 08 e8 34 fc RSP: 002b:00007ffdbd1d3538 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000008 RCX: 00007fe7ff210654 RDX: 0000000000000000 RSI: 0000000000002401 RDI: 0000000000000008 RBP: 0000000000000000 R08: 94ae31d6fda838a4 R0900007fe8001c9d30 R10: 00007ffdbd1d34b0 R11: 0000000000000246 R12: 00007ffdbd1d3600 R13: 0000000000000000 R14: fffffffffffffffc R15: 00007ffdbd1d3560 Link: https://lkml.kernel.org/r/20220813020509.90805-1-kuniyu@amazon.com Fixes: 69d54b916d83 ("kprobes: makes kprobes/enabled works correctly for optimized kprobes.") Signed-off-by: Kuniyuki Iwashima Reported-by: Ayushman Dutta Cc: "Naveen N. Rao" Cc: Anil S Keshavamurthy Cc: "David S. Miller" Cc: Masami Hiramatsu Cc: Wang Nan Cc: Kuniyuki Iwashima Cc: Kuniyuki Iwashima Cc: Ayushman Dutta Cc: Signed-off-by: Andrew Morton kernel/kprobes.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 76d36dea02691a8ffa8cd7368eecbf727b8a1c0c Author: Hugh Dickins Date: Wed Aug 10 22:06:33 2022 -0700 mm/shmem: shmem_replace_page() remember NR_SHMEM Elsewhere, NR_SHMEM is updated at the same time as shmem NR_FILE_PAGES; but shmem_replace_page() was forgetting to do that - so NR_SHMEM stats could grow too big or too small, in those unusual cases when it's used. Link: https://lkml.kernel.org/r/cec7c09d-5874-e160-ada6-6e10ee48784@google.com Signed-off-by: Hugh Dickins Reviewed-by: Matthew Wilcox (Oracle) Cc: "Darrick J. Wong" Cc: Radoslaw Burny Cc: "Theodore Ts'o" Signed-off-by: Andrew Morton mm/shmem.c | 2 ++ 1 file changed, 2 insertions(+) commit 15f242bb65b89d5f1ff990668a586fdf1307b2c8 Author: Hugh Dickins Date: Wed Aug 10 21:55:36 2022 -0700 mm/shmem: tmpfs fallocate use file_modified() 5.18 fixed the btrfs and ext4 fallocates to use file_modified(), as xfs was already doing, to drop privileges: and fstests generic/{683,684,688} expect this. There's no need to argue over keep-size allocation (which could just update ctime): fix shmem_fallocate() to behave the same way. Link: https://lkml.kernel.org/r/39c5e62-4896-7795-c0a0-f79c50d4909@google.com Signed-off-by: Hugh Dickins Acked-by: Christian Brauner (Microsoft) Cc: "Darrick J. Wong" Cc: Matthew Wilcox (Oracle) Cc: Radoslaw Burny Cc: "Theodore Ts'o" Signed-off-by: Andrew Morton mm/shmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cb241339b9d020c758a6647c69f8e42538c5cf88 Author: Hugh Dickins Date: Wed Aug 10 21:51:09 2022 -0700 mm/shmem: fix chattr fsflags support in tmpfs ext[234] have always allowed unimplemented chattr flags to be set, but other filesystems have tended to be stricter. Follow the stricter approach for tmpfs: I don't want to have to explain why csu attributes don't actually work, and we won't need to update the chattr(1) manpage; and it's never wrong to start off strict, relaxing later if persuaded. Allow only a (append only) i (immutable) A (no atime) and d (no dump). Although lsattr showed 'A' inherited, the NOATIME behavior was not being inherited: because nothing sync'ed FS_NOATIME_FL to S_NOATIME. Add shmem_set_inode_flags() to sync the flags, using inode_set_flags() to avoid that instant of lost immutablility during fileattr_set(). But that change switched generic/079 from passing to failing: because FS_IMMUTABLE_FL and FS_APPEND_FL had been unconventionally included in the INHERITED fsflags: remove them and generic/079 is back to passing. Link: https://lkml.kernel.org/r/2961dcb0-ddf3-b9f0-3268-12a4ff996856@google.com Fixes: e408e695f5f1 ("mm/shmem: support FS_IOC_[SG]ETFLAGS in tmpfs") Signed-off-by: Hugh Dickins Cc: "Theodore Ts'o" Cc: Radoslaw Burny Cc: "Darrick J. Wong" Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton include/linux/shmem_fs.h | 13 ++++-------- mm/shmem.c | 54 +++++++++++++++++++++++++++--------------------- 2 files changed, 35 insertions(+), 32 deletions(-) commit 1d8d14641fd94a01b20a4abbf2749fd8eddcf57b Author: David Hildenbrand Date: Thu Aug 11 12:34:35 2022 +0200 mm/hugetlb: support write-faults in shared mappings If we ever get a write-fault on a write-protected page in a shared mapping, we'd be in trouble (again). Instead, we can simply map the page writable. And in fact, there is even a way right now to trigger that code via uffd-wp ever since we stared to support it for shmem in 5.19: -------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #define HUGETLB_SIZE (2 * 1024 * 1024u) static char *map; int uffd; static int temp_setup_uffd(void) { struct uffdio_api uffdio_api; struct uffdio_register uffdio_register; struct uffdio_writeprotect uffd_writeprotect; struct uffdio_range uffd_range; uffd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK | UFFD_USER_MODE_ONLY); if (uffd < 0) { fprintf(stderr, "syscall() failed: %d\n", errno); return -errno; } uffdio_api.api = UFFD_API; uffdio_api.features = UFFD_FEATURE_PAGEFAULT_FLAG_WP; if (ioctl(uffd, UFFDIO_API, &uffdio_api) < 0) { fprintf(stderr, "UFFDIO_API failed: %d\n", errno); return -errno; } if (!(uffdio_api.features & UFFD_FEATURE_PAGEFAULT_FLAG_WP)) { fprintf(stderr, "UFFD_FEATURE_WRITEPROTECT missing\n"); return -ENOSYS; } /* Register UFFD-WP */ uffdio_register.range.start = (unsigned long) map; uffdio_register.range.len = HUGETLB_SIZE; uffdio_register.mode = UFFDIO_REGISTER_MODE_WP; if (ioctl(uffd, UFFDIO_REGISTER, &uffdio_register) < 0) { fprintf(stderr, "UFFDIO_REGISTER failed: %d\n", errno); return -errno; } /* Writeprotect a single page. */ uffd_writeprotect.range.start = (unsigned long) map; uffd_writeprotect.range.len = HUGETLB_SIZE; uffd_writeprotect.mode = UFFDIO_WRITEPROTECT_MODE_WP; if (ioctl(uffd, UFFDIO_WRITEPROTECT, &uffd_writeprotect)) { fprintf(stderr, "UFFDIO_WRITEPROTECT failed: %d\n", errno); return -errno; } /* Unregister UFFD-WP without prior writeunprotection. */ uffd_range.start = (unsigned long) map; uffd_range.len = HUGETLB_SIZE; if (ioctl(uffd, UFFDIO_UNREGISTER, &uffd_range)) { fprintf(stderr, "UFFDIO_UNREGISTER failed: %d\n", errno); return -errno; } return 0; } int main(int argc, char **argv) { int fd; fd = open("/dev/hugepages/tmp", O_RDWR | O_CREAT); if (!fd) { fprintf(stderr, "open() failed\n"); return -errno; } if (ftruncate(fd, HUGETLB_SIZE)) { fprintf(stderr, "ftruncate() failed\n"); return -errno; } map = mmap(NULL, HUGETLB_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); if (map == MAP_FAILED) { fprintf(stderr, "mmap() failed\n"); return -errno; } *map = 0; if (temp_setup_uffd()) return 1; *map = 0; return 0; } -------------------------------------------------------------------------- Above test fails with SIGBUS when there is only a single free hugetlb page. # echo 1 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages # ./test Bus error (core dumped) And worse, with sufficient free hugetlb pages it will map an anonymous page into a shared mapping, for example, messing up accounting during unmap and breaking MAP_SHARED semantics: # echo 2 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages # ./test # cat /proc/meminfo | grep HugePages_ HugePages_Total: 2 HugePages_Free: 1 HugePages_Rsvd: 18446744073709551615 HugePages_Surp: 0 Reason is that uffd-wp doesn't clear the uffd-wp PTE bit when unregistering and consequently keeps the PTE writeprotected. Reason for this is to avoid the additional overhead when unregistering. Note that this is the case also for !hugetlb and that we will end up with writable PTEs that still have the uffd-wp PTE bit set once we return from hugetlb_wp(). I'm not touching the uffd-wp PTE bit for now, because it seems to be a generic thing -- wp_page_reuse() also doesn't clear it. VM_MAYSHARE handling in hugetlb_fault() for FAULT_FLAG_WRITE indicates that MAP_SHARED handling was at least envisioned, but could never have worked as expected. While at it, make sure that we never end up in hugetlb_wp() on write faults without VM_WRITE, because we don't support maybe_mkwrite() semantics as commonly used in the !hugetlb case -- for example, in wp_page_reuse(). Note that there is no need to do any kind of reservation in hugetlb_fault() in this case ... because we already have a hugetlb page mapped R/O that we will simply map writable and we are not dealing with COW/unsharing. Link: https://lkml.kernel.org/r/20220811103435.188481-3-david@redhat.com Fixes: b1f9e876862d ("mm/uffd: enable write protection for shmem & hugetlbfs") Signed-off-by: David Hildenbrand Reviewed-by: Mike Kravetz Cc: Bjorn Helgaas Cc: Cyrill Gorcunov Cc: Hugh Dickins Cc: Jamie Liu Cc: Kirill A. Shutemov Cc: Muchun Song Cc: Naoya Horiguchi Cc: Pavel Emelyanov Cc: Peter Feiner Cc: Peter Xu Cc: [5.19] Signed-off-by: Andrew Morton mm/hugetlb.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit f96f7a40874d7c746680c0b9f57cef2262ae551f Author: David Hildenbrand Date: Thu Aug 11 12:34:34 2022 +0200 mm/hugetlb: fix hugetlb not supporting softdirty tracking Patch series "mm/hugetlb: fix write-fault handling for shared mappings", v2. I observed that hugetlb does not support/expect write-faults in shared mappings that would have to map the R/O-mapped page writable -- and I found two case where we could currently get such faults and would erroneously map an anon page into a shared mapping. Reproducers part of the patches. I propose to backport both fixes to stable trees. The first fix needs a small adjustment. This patch (of 2): Staring at hugetlb_wp(), one might wonder where all the logic for shared mappings is when stumbling over a write-protected page in a shared mapping. In fact, there is none, and so far we thought we could get away with that because e.g., mprotect() should always do the right thing and map all pages directly writable. Looks like we were wrong: -------------------------------------------------------------------------- #include #include #include #include #include #include #include #define HUGETLB_SIZE (2 * 1024 * 1024u) static void clear_softdirty(void) { int fd = open("/proc/self/clear_refs", O_WRONLY); const char *ctrl = "4"; int ret; if (fd < 0) { fprintf(stderr, "open(clear_refs) failed\n"); exit(1); } ret = write(fd, ctrl, strlen(ctrl)); if (ret != strlen(ctrl)) { fprintf(stderr, "write(clear_refs) failed\n"); exit(1); } close(fd); } int main(int argc, char **argv) { char *map; int fd; fd = open("/dev/hugepages/tmp", O_RDWR | O_CREAT); if (!fd) { fprintf(stderr, "open() failed\n"); return -errno; } if (ftruncate(fd, HUGETLB_SIZE)) { fprintf(stderr, "ftruncate() failed\n"); return -errno; } map = mmap(NULL, HUGETLB_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); if (map == MAP_FAILED) { fprintf(stderr, "mmap() failed\n"); return -errno; } *map = 0; if (mprotect(map, HUGETLB_SIZE, PROT_READ)) { fprintf(stderr, "mmprotect() failed\n"); return -errno; } clear_softdirty(); if (mprotect(map, HUGETLB_SIZE, PROT_READ|PROT_WRITE)) { fprintf(stderr, "mmprotect() failed\n"); return -errno; } *map = 0; return 0; } -------------------------------------------------------------------------- Above test fails with SIGBUS when there is only a single free hugetlb page. # echo 1 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages # ./test Bus error (core dumped) And worse, with sufficient free hugetlb pages it will map an anonymous page into a shared mapping, for example, messing up accounting during unmap and breaking MAP_SHARED semantics: # echo 2 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages # ./test # cat /proc/meminfo | grep HugePages_ HugePages_Total: 2 HugePages_Free: 1 HugePages_Rsvd: 18446744073709551615 HugePages_Surp: 0 Reason in this particular case is that vma_wants_writenotify() will return "true", removing VM_SHARED in vma_set_page_prot() to map pages write-protected. Let's teach vma_wants_writenotify() that hugetlb does not support softdirty tracking. Link: https://lkml.kernel.org/r/20220811103435.188481-1-david@redhat.com Link: https://lkml.kernel.org/r/20220811103435.188481-2-david@redhat.com Fixes: 64e455079e1b ("mm: softdirty: enable write notifications on VMAs after VM_SOFTDIRTY cleared") Signed-off-by: David Hildenbrand Reviewed-by: Mike Kravetz Cc: Peter Feiner Cc: Kirill A. Shutemov Cc: Cyrill Gorcunov Cc: Pavel Emelyanov Cc: Jamie Liu Cc: Hugh Dickins Cc: Naoya Horiguchi Cc: Bjorn Helgaas Cc: Muchun Song Cc: Peter Xu Cc: [3.18+] Signed-off-by: Andrew Morton mm/mmap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f369b07c861435bd812a9d14493f71b34132ed6f Author: Peter Xu Date: Thu Aug 11 16:13:40 2022 -0400 mm/uffd: reset write protection when unregister with wp-mode The motivation of this patch comes from a recent report and patchfix from David Hildenbrand on hugetlb shared handling of wr-protected page [1]. With the reproducer provided in commit message of [1], one can leverage the uffd-wp lazy-reset of ptes to trigger a hugetlb issue which can affect not only the attacker process, but also the whole system. The lazy-reset mechanism of uffd-wp was used to make unregister faster, meanwhile it has an assumption that any leftover pgtable entries should only affect the process on its own, so not only the user should be aware of anything it does, but also it should not affect outside of the process. But it seems that this is not true, and it can also be utilized to make some exploit easier. So far there's no clue showing that the lazy-reset is important to any userfaultfd users because normally the unregister will only happen once for a specific range of memory of the lifecycle of the process. Considering all above, what this patch proposes is to do explicit pte resets when unregister an uffd region with wr-protect mode enabled. It should be the same as calling ioctl(UFFDIO_WRITEPROTECT, wp=false) right before ioctl(UFFDIO_UNREGISTER) for the user. So potentially it'll make the unregister slower. From that pov it's a very slight abi change, but hopefully nothing should break with this change either. Regarding to the change itself - core of uffd write [un]protect operation is moved into a separate function (uffd_wp_range()) and it is reused in the unregister code path. Note that the new function will not check for anything, e.g. ranges or memory types, because they should have been checked during the previous UFFDIO_REGISTER or it should have failed already. It also doesn't check mmap_changing because we're with mmap write lock held anyway. I added a Fixes upon introducing of uffd-wp shmem+hugetlbfs because that's the only issue reported so far and that's the commit David's reproducer will start working (v5.19+). But the whole idea actually applies to not only file memories but also anonymous. It's just that we don't need to fix anonymous prior to v5.19- because there's no known way to exploit. IOW, this patch can also fix the issue reported in [1] as the patch 2 does. [1] https://lore.kernel.org/all/20220811103435.188481-3-david@redhat.com/ Link: https://lkml.kernel.org/r/20220811201340.39342-1-peterx@redhat.com Fixes: b1f9e876862d ("mm/uffd: enable write protection for shmem & hugetlbfs") Signed-off-by: Peter Xu Cc: David Hildenbrand Cc: Mike Rapoport Cc: Mike Kravetz Cc: Andrea Arcangeli Cc: Nadav Amit Cc: Axel Rasmussen Cc: Signed-off-by: Andrew Morton fs/userfaultfd.c | 4 ++++ include/linux/userfaultfd_k.h | 2 ++ mm/userfaultfd.c | 29 ++++++++++++++++++----------- 3 files changed, 24 insertions(+), 11 deletions(-) commit efd4149342db2df41b1bbe68972ead853b30e444 Author: Peter Xu Date: Fri Aug 5 12:00:03 2022 -0400 mm/smaps: don't access young/dirty bit if pte unpresent These bits should only be valid when the ptes are present. Introducing two booleans for it and set it to false when !pte_present() for both pte and pmd accountings. The bug is found during code reading and no real world issue reported, but logically such an error can cause incorrect readings for either smaps or smaps_rollup output on quite a few fields. For example, it could cause over-estimate on values like Shared_Dirty, Private_Dirty, Referenced. Or it could also cause under-estimate on values like LazyFree, Shared_Clean, Private_Clean. Link: https://lkml.kernel.org/r/20220805160003.58929-1-peterx@redhat.com Fixes: b1d4d9e0cbd0 ("proc/smaps: carefully handle migration entries") Fixes: c94b6923fa0a ("/proc/PID/smaps: Add PMD migration entry parsing") Signed-off-by: Peter Xu Reviewed-by: Vlastimil Babka Reviewed-by: David Hildenbrand Reviewed-by: Yang Shi Cc: Konstantin Khlebnikov Cc: Huang Ying Signed-off-by: Andrew Morton fs/proc/task_mmu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a39c5d3ce03dd890ab6a9be44b21177cec32da55 Author: Hao Lee Date: Sun Aug 7 15:44:42 2022 +0000 mm: add DEVICE_ZONE to FOR_ALL_ZONES FOR_ALL_ZONES should be consistent with enum zone_type. Otherwise, __count_zid_vm_events have the potential to add count to wrong item when zid is ZONE_DEVICE. Link: https://lkml.kernel.org/r/20220807154442.GA18167@haolee.io Signed-off-by: Hao Lee Cc: David Hildenbrand Cc: Johannes Weiner Signed-off-by: Andrew Morton include/linux/vm_event_item.h | 15 +++++++++++---- mm/vmstat.c | 9 ++++++++- 2 files changed, 19 insertions(+), 5 deletions(-) commit a8faed3a02eeb75857a3b5d660fa80fe79db77a3 Author: Randy Dunlap Date: Sun Aug 7 15:09:34 2022 -0700 kernel/sys_ni: add compat entry for fadvise64_64 When CONFIG_ADVISE_SYSCALLS is not set/enabled and CONFIG_COMPAT is set/enabled, the riscv compat_syscall_table references 'compat_sys_fadvise64_64', which is not defined: riscv64-linux-ld: arch/riscv/kernel/compat_syscall_table.o:(.rodata+0x6f8): undefined reference to `compat_sys_fadvise64_64' Add 'fadvise64_64' to kernel/sys_ni.c as a conditional COMPAT function so that when CONFIG_ADVISE_SYSCALLS is not set, there is a fallback function available. Link: https://lkml.kernel.org/r/20220807220934.5689-1-rdunlap@infradead.org Fixes: d3ac21cacc24 ("mm: Support compiling out madvise and fadvise") Signed-off-by: Randy Dunlap Suggested-by: Arnd Bergmann Reviewed-by: Arnd Bergmann Cc: Josh Triplett Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: Signed-off-by: Andrew Morton kernel/sys_ni.c | 1 + 1 file changed, 1 insertion(+) commit 5535be3099717646781ce1540cf725965d680e7b Author: David Hildenbrand Date: Tue Aug 9 22:56:40 2022 +0200 mm/gup: fix FOLL_FORCE COW security issue and remove FOLL_COW Ever since the Dirty COW (CVE-2016-5195) security issue happened, we know that FOLL_FORCE can be possibly dangerous, especially if there are races that can be exploited by user space. Right now, it would be sufficient to have some code that sets a PTE of a R/O-mapped shared page dirty, in order for it to erroneously become writable by FOLL_FORCE. The implications of setting a write-protected PTE dirty might not be immediately obvious to everyone. And in fact ever since commit 9ae0f87d009c ("mm/shmem: unconditionally set pte dirty in mfill_atomic_install_pte"), we can use UFFDIO_CONTINUE to map a shmem page R/O while marking the pte dirty. This can be used by unprivileged user space to modify tmpfs/shmem file content even if the user does not have write permissions to the file, and to bypass memfd write sealing -- Dirty COW restricted to tmpfs/shmem (CVE-2022-2590). To fix such security issues for good, the insight is that we really only need that fancy retry logic (FOLL_COW) for COW mappings that are not writable (!VM_WRITE). And in a COW mapping, we really only broke COW if we have an exclusive anonymous page mapped. If we have something else mapped, or the mapped anonymous page might be shared (!PageAnonExclusive), we have to trigger a write fault to break COW. If we don't find an exclusive anonymous page when we retry, we have to trigger COW breaking once again because something intervened. Let's move away from this mandatory-retry + dirty handling and rely on our PageAnonExclusive() flag for making a similar decision, to use the same COW logic as in other kernel parts here as well. In case we stumble over a PTE in a COW mapping that does not map an exclusive anonymous page, COW was not properly broken and we have to trigger a fake write-fault to break COW. Just like we do in can_change_pte_writable() added via commit 64fe24a3e05e ("mm/mprotect: try avoiding write faults for exclusive anonymous pages when changing protection") and commit 76aefad628aa ("mm/mprotect: fix soft-dirty check in can_change_pte_writable()"), take care of softdirty and uffd-wp manually. For example, a write() via /proc/self/mem to a uffd-wp-protected range has to fail instead of silently granting write access and bypassing the userspace fault handler. Note that FOLL_FORCE is not only used for debug access, but also triggered by applications without debug intentions, for example, when pinning pages via RDMA. This fixes CVE-2022-2590. Note that only x86_64 and aarch64 are affected, because only those support CONFIG_HAVE_ARCH_USERFAULTFD_MINOR. Fortunately, FOLL_COW is no longer required to handle FOLL_FORCE. So let's just get rid of it. Thanks to Nadav Amit for pointing out that the pte_dirty() check in FOLL_FORCE code is problematic and might be exploitable. Note 1: We don't check for the PTE being dirty because it doesn't matter for making a "was COWed" decision anymore, and whoever modifies the page has to set the page dirty either way. Note 2: Kernels before extended uffd-wp support and before PageAnonExclusive (< 5.19) can simply revert the problematic commit instead and be safe regarding UFFDIO_CONTINUE. A backport to v5.19 requires minor adjustments due to lack of vma_soft_dirty_enabled(). Link: https://lkml.kernel.org/r/20220809205640.70916-1-david@redhat.com Fixes: 9ae0f87d009c ("mm/shmem: unconditionally set pte dirty in mfill_atomic_install_pte") Signed-off-by: David Hildenbrand Cc: Greg Kroah-Hartman Cc: Axel Rasmussen Cc: Nadav Amit Cc: Peter Xu Cc: Hugh Dickins Cc: Andrea Arcangeli Cc: Matthew Wilcox Cc: Vlastimil Babka Cc: John Hubbard Cc: Jason Gunthorpe Cc: David Laight Cc: [5.16] Signed-off-by: Andrew Morton include/linux/mm.h | 1 - mm/gup.c | 68 ++++++++++++++++++++++++++++++++++++------------------ mm/huge_memory.c | 64 +++++++++++++++++++++++++++++++++----------------- 3 files changed, 89 insertions(+), 44 deletions(-) commit 37887783b3fef877bf34b8992c9199864da4afcb Author: Jiri Slaby Date: Wed Aug 10 09:06:09 2022 +0200 Revert "zram: remove double compression logic" This reverts commit e7be8d1dd983156b ("zram: remove double compression logic") as it causes zram failures. It does not revert cleanly, PTR_ERR handling was introduced in the meantime. This is handled by appropriate IS_ERR. When under memory pressure, zs_malloc() can fail. Before the above commit, the allocation was retried with direct reclaim enabled (GFP_NOIO). After the commit, it is not -- only __GFP_KSWAPD_RECLAIM is tried. So when the failure occurs under memory pressure, the overlaying filesystem such as ext2 (mounted by ext4 module in this case) can emit failures, making the (file)system unusable: EXT4-fs warning (device zram0): ext4_end_bio:343: I/O error 10 writing to inode 16386 starting block 159744) Buffer I/O error on device zram0, logical block 159744 With direct reclaim, memory is really reclaimed and allocation succeeds, eventually. In the worst case, the oom killer is invoked, which is proper outcome if user sets up zram too large (in comparison to available RAM). This very diff doesn't apply to 5.19 (stable) cleanly (see PTR_ERR note above). Use revert of e7be8d1dd983 directly. Link: https://bugzilla.suse.com/show_bug.cgi?id=1202203 Link: https://lkml.kernel.org/r/20220810070609.14402-1-jslaby@suse.cz Fixes: e7be8d1dd983 ("zram: remove double compression logic") Signed-off-by: Jiri Slaby Reviewed-by: Sergey Senozhatsky Cc: Minchan Kim Cc: Nitin Gupta Cc: Alexey Romanov Cc: Dmitry Rokosov Cc: Lukas Czerner Cc: [5.19] Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 42 ++++++++++++++++++++++++++++++++---------- drivers/block/zram/zram_drv.h | 1 + 2 files changed, 33 insertions(+), 10 deletions(-) commit d10a72de54c2d2990721923e025ea505fa4f5b02 Author: Dan Carpenter Date: Wed Aug 10 12:18:08 2022 +0300 get_maintainer: add Alan to .get_maintainer.ignore Alan asked to be added to the .get_maintainer.ignore list. Link: https://lkml.kernel.org/r/YvN30KhO9aD5Sza9@kili Signed-off-by: Dan Carpenter Cc: Alan Cox Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton .get_maintainer.ignore | 2 ++ 1 file changed, 2 insertions(+) commit 15b3f48a4339e3c16acf18624e2b7f60bc5e9a2c Merge: 16b3d851c014 4be72c1b9f29 Author: Linus Torvalds Date: Sat Aug 20 14:55:38 2022 -0700 Merge tag 'kbuild-fixes-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Fix module versioning broken on some architectures - Make dummy-tools enable CONFIG_PPC_LONG_DOUBLE_128 - Remove -Wformat-zero-length, which has no warning instance - Fix the order between drivers and libs in modules.order - Fix false-positive warnings in clang-analyzer * tag 'kbuild-fixes-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: scripts/clang-tools: Remove DeprecatedOrUnsafeBufferHandling check kbuild: fix the modules order between drivers and libs scripts/Makefile.extrawarn: Do not disable clang's -Wformat-zero-length kbuild: dummy-tools: pretend we understand __LONG_DOUBLE_128__ modpost: fix module versioning when a symbol lacks valid CRC commit 16b3d851c0146123507fe864fdd97411ded51147 Merge: cc1807b9158a f52679b78877 Author: Linus Torvalds Date: Sat Aug 20 14:46:05 2022 -0700 Merge tag 'perf-tools-fixes-for-v6.0-2022-08-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix alignment for cpu map masks in event encoding. - Support reading PERF_FORMAT_LOST, perf tool counterpart for a feature that was added in this merge window. - Sync perf tools copies of kernel headers: socket, msr-index, fscrypt, cpufeatures, i915_drm, kvm, vhost, perf_event. * tag 'perf-tools-fixes-for-v6.0-2022-08-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf tools: Support reading PERF_FORMAT_LOST libperf: Add a test case for read formats libperf: Handle read format in perf_evsel__read() tools headers UAPI: Sync linux/perf_event.h with the kernel sources tools headers UAPI: Sync x86's asm/kvm.h with the kernel sources tools headers UAPI: Sync KVM's vmx.h header with the kernel sources tools include UAPI: Sync linux/vhost.h with the kernel sources tools headers kvm s390: Sync headers with the kernel sources tools headers UAPI: Sync linux/kvm.h with the kernel sources tools headers UAPI: Sync drm/i915_drm.h with the kernel sources tools headers cpufeatures: Sync with the kernel sources tools headers UAPI: Sync linux/fscrypt.h with the kernel sources tools arch x86: Sync the msr-index.h copy with the kernel sources perf beauty: Update copy of linux/socket.h with the kernel sources perf cpumap: Fix alignment for masks in event encoding perf cpumap: Compute mask size in constant time perf cpumap: Synthetic events and const/static perf cpumap: Const map for max() commit cc1807b9158a909ffe829a5e222be756c57c9a90 Merge: 32dd68f11058 0fef40be5d1f Author: Linus Torvalds Date: Sat Aug 20 11:29:01 2022 -0700 Merge tag 's390-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Alexander Gordeev: - Fix a KVM crash on z12 and older machines caused by a wrong assumption that Query AP Configuration Information is always available. - Lower severity of excessive Hypervisor filesystem error messages when booting under KVM. * tag 's390-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/ap: fix crash on older machines based on QCI info missing s390/hypfs: avoid error message under KVM commit 32dd68f11058652a37152aed12bf552455914b40 Merge: f31c32efd57c f889a2e89ea5 Author: Linus Torvalds Date: Sat Aug 20 11:20:37 2022 -0700 Merge tag 'powerpc-6.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix atomic sleep warnings at boot due to get_phb_number() taking a mutex with a spinlock held on some machines. - Add missing PMU selftests to .gitignores. Thanks to Guenter Roeck and Russell Currey. * tag 'powerpc-6.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: selftests/powerpc: Add missing PMU selftests to .gitignores powerpc/pci: Fix get_phb_number() locking commit f31c32efd57c860f2b237a08327840f8444362f3 Merge: b9bce6e5533a b16de8b9e7d1 Author: Linus Torvalds Date: Sat Aug 20 10:49:02 2022 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "A few minor fixes: - Fix buffer management in SRP to correct a regression with the login authentication feature from v5.17 - Don't iterate over non-present ports in mlx5 - Fix an error introduced by the foritify work in cxgb4 - Two bug fixes for the recently merged ERDMA driver - Unbreak RDMA dmabuf support, a regresion from v5.19" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA: Handle the return code from dma_resv_wait_timeout() properly RDMA/erdma: Correct the max_qp and max_cq capacities of the device RDMA/erdma: Using the key in FMR WR instead of MR structure RDMA/cxgb4: fix accept failure due to increased cpl_t5_pass_accept_rpl size RDMA/mlx5: Use the proper number of ports IB/iser: Fix login with authentication commit 4be72c1b9f298b4ad42391322eaddef64b282716 Author: Guru Das Srinagesh Date: Thu Aug 4 10:46:14 2022 -0700 scripts/clang-tools: Remove DeprecatedOrUnsafeBufferHandling check This `clang-analyzer` check flags the use of memset(), suggesting a more secure version of the API, such as memset_s(), which does not exist in the kernel: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] Signed-off-by: Guru Das Srinagesh Reviewed-by: Nick Desaulniers Signed-off-by: Masahiro Yamada scripts/clang-tools/run-clang-tools.py | 1 + 1 file changed, 1 insertion(+) commit 113147510b48e764e624e3d0e6707a1e48bc05a9 Author: Masahiro Yamada Date: Sun Aug 14 08:09:28 2022 +0900 kbuild: fix the modules order between drivers and libs Commit b2c885549122 ("kbuild: update modules.order only when contained modules are updated") accidentally changed the modules order. Prior to that commit, the modules order was determined based on vmlinux-dirs, which lists core-y/m, drivers-y/m, libs-y/m, in this order. Now, subdir-modorder lists them in a different order: core-y/m, libs-y/m, drivers-y/m. Presumably, there was no practical issue because the modules in drivers and libs are orthogonal, but there is no reason to have this distortion. Get back to the original order. Fixes: b2c885549122 ("kbuild: update modules.order only when contained modules are updated") Signed-off-by: Masahiro Yamada Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 370655bc183b1824ba623e621b58e8c2616c839c Author: Nathan Chancellor Date: Wed Aug 10 16:01:33 2022 -0700 scripts/Makefile.extrawarn: Do not disable clang's -Wformat-zero-length There are no instances of this warning in the tree across several difference architectures and configurations. This was added by commit 26ea6bb1fef0 ("kbuild, LLVMLinux: Supress warnings unless W=1-3") back in 2014, where it might have been necessary, but there are no instances of it now so stop disabling it to increase warning coverage for clang. Signed-off-by: Nathan Chancellor Signed-off-by: Masahiro Yamada scripts/Makefile.extrawarn | 1 - 1 file changed, 1 deletion(-) commit 0df499eaf3c1a43ebb0a84ac854262e3fa731bcf Author: Jiri Slaby Date: Wed Aug 10 11:26:03 2022 +0200 kbuild: dummy-tools: pretend we understand __LONG_DOUBLE_128__ There is a test in powerpc's Kconfig which checks __LONG_DOUBLE_128__ and sets CONFIG_PPC_LONG_DOUBLE_128 if it is understood by the compiler. We currently don't handle it, so this results in PPC_LONG_DOUBLE_128 not being in super-config generated by dummy-tools. So take this into account in the gcc script and preprocess __LONG_DOUBLE_128__ as "1". Signed-off-by: Jiri Slaby Signed-off-by: Masahiro Yamada scripts/dummy-tools/gcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b8a9a8fd1f0c3d55d407cf759d54ca68798d9ad Author: Masahiro Yamada Date: Tue Aug 9 23:11:17 2022 +0900 modpost: fix module versioning when a symbol lacks valid CRC Since commit 7b4537199a4a ("kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS"), module versioning is broken on some architectures. Loading a module fails with "disagrees about version of symbol module_layout". On such architectures (e.g. ARCH=sparc build with sparc64_defconfig), modpost shows a warning, like follows: WARNING: modpost: EXPORT symbol "_mcount" [vmlinux] version generation failed, symbol will not be versioned. Is "_mcount" prototyped in ? Previously, it was a harmless warning (CRC check was just skipped), but now wrong CRCs are used for comparison because invalid CRCs are just skipped. $ sparc64-linux-gnu-nm -n vmlinux [snip] 0000000000c2cea0 r __ksymtab__kstrtol 0000000000c2ceb8 r __ksymtab__kstrtoul 0000000000c2ced0 r __ksymtab__local_bh_enable 0000000000c2cee8 r __ksymtab__mcount 0000000000c2cf00 r __ksymtab__printk 0000000000c2cf18 r __ksymtab__raw_read_lock 0000000000c2cf30 r __ksymtab__raw_read_lock_bh [snip] 0000000000c53b34 D __crc__kstrtol 0000000000c53b38 D __crc__kstrtoul 0000000000c53b3c D __crc__local_bh_enable 0000000000c53b40 D __crc__printk 0000000000c53b44 D __crc__raw_read_lock 0000000000c53b48 D __crc__raw_read_lock_bh Please notice __crc__mcount is missing here. When the module subsystem looks up a CRC that comes after, it results in reading out a wrong address. For example, when __crc__printk is needed, the module subsystem reads 0xc53b44 instead of 0xc53b40. All CRC entries must be output for correct index accessing. Invalid CRCs will be unused, but are needed to keep the one-to-one mapping between __ksymtab_* and __crc_*. The best is to fix all modpost warnings, but several warnings are still remaining on less popular architectures. Fixes: 7b4537199a4a ("kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS") Reported-by: matoro Signed-off-by: Masahiro Yamada Tested-by: matoro scripts/mod/modpost.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b9bce6e5533a08e0223d629541b4f39ffea48333 Merge: beaf13970954 d3b38596875d Author: Linus Torvalds Date: Sat Aug 20 10:17:05 2022 -0700 Merge tag 'block-6.0-2022-08-19' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A few fixes that should go into this release: - Small series of patches for ublk (ZiyangZhang) - Remove dead function (Yu) - Fix for running a block queue in case of resource starvation (Yufen)" * tag 'block-6.0-2022-08-19' of git://git.kernel.dk/linux-block: blk-mq: run queue no matter whether the request is the last request blk-mq: remove unused function blk_mq_queue_stopped() ublk_drv: do not add a re-issued request aborted previously to ioucmd's task_work ublk_drv: update comment for __ublk_fail_req() ublk_drv: check ubq_daemon_is_dying() in __ublk_rq_task_work() ublk_drv: update iod->addr for UBLK_IO_NEED_GET_DATA commit beaf139709542d4ee7d22c2312b97c35587eb9db Merge: 044610f8e415 3f743e9bbb8f Author: Linus Torvalds Date: Sat Aug 20 09:49:22 2022 -0700 Merge tag 'io_uring-6.0-2022-08-19' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "A few fixes for regressions in this cycle: - Two instances of using the wrong "has async data" helper (Pavel) - Fixup zero-copy address import (Pavel) - Bump zero-copy notification slot limit (Pavel)" * tag 'io_uring-6.0-2022-08-19' of git://git.kernel.dk/linux-block: io_uring/net: use right helpers for async_data io_uring/notif: raise limit on notification slots io_uring/net: improve zc addr import error handling io_uring/net: use right helpers for async recycle commit 044610f8e4155ec0374f7c8307b725b7d01d750c Merge: 4d099c3329fe a357f7b4583e Author: Linus Torvalds Date: Sat Aug 20 09:43:45 2022 -0700 Merge tag 'ata-6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata Pull ATA fixes from Damien Le Moal: - Add a missing command name definition for ata_get_cmd_name(), from me. - A fix to address a performance regression due to the default max_sectors queue limit for ATA devices connected to AHCI adapters being too small, from John. * tag 'ata-6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: ata: libata: Set __ATA_BASE_SHT max_sectors ata: libata-eh: Add missing command name commit 4d099c3329fe276a5b3939c9f7c8b2ea1f12af0d Merge: 50cd95ac4654 a0753ef66c34 Author: Linus Torvalds Date: Sat Aug 20 09:39:00 2022 -0700 Merge tag 'mmc-v6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC host fixes from Ulf Hansson: - meson-gx: Fix error handling in ->probe() - mtk-sd: Fix a command problem when using cqe off/disable - pxamci: Fix error handling in ->probe() - sdhci-of-dwcmshc: Fix broken support for the BlueField-3 variant * tag 'mmc-v6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-of-dwcmshc: Re-enable support for the BlueField-3 SoC mmc: meson-gx: Fix an error handling path in meson_mmc_probe() mmc: mtk-sd: Clear interrupts when cqe off/disable mmc: pxamci: Fix another error handling path in pxamci_probe() mmc: pxamci: Fix an error handling path in pxamci_probe() commit a357f7b4583ebf81d19c95aef57497ae81c5f63c Author: John Garry Date: Wed Aug 17 23:20:08 2022 +0800 ata: libata: Set __ATA_BASE_SHT max_sectors Commit 0568e6122574 ("ata: libata-scsi: cap ata_device->max_sectors according to shost->max_sectors") inadvertently capped the max_sectors value for some SATA disks to a value which is lower than we would want. For a device which supports LBA48, we would previously have request queue max_sectors_kb and max_hw_sectors_kb values of 1280 and 32767 respectively. For AHCI controllers, the value chosen for shost max sectors comes from the minimum of the SCSI host default max sectors in SCSI_DEFAULT_MAX_SECTORS (1024) and the shost DMA device mapping limit. This means that we would now set the max_sectors_kb and max_hw_sectors_kb values for a disk which supports LBA48 at 512, ignoring DMA mapping limit. As report by Oliver at [0], this caused a performance regression. Fix by picking a large enough max sectors value for ATA host controllers such that we don't needlessly reduce max_sectors_kb for LBA48 disks. [0] https://lore.kernel.org/linux-ide/YvsGbidf3na5FpGb@xsang-OptiPlex-9020/T/#m22d9fc5ad15af66066dd9fecf3d50f1b1ef11da3 Fixes: 0568e6122574 ("ata: libata-scsi: cap ata_device->max_sectors according to shost->max_sectors") Reported-by: Oliver Sang Signed-off-by: John Garry Signed-off-by: Damien Le Moal include/linux/libata.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b1cb8a71f1eaec4eb77051590f7f561f25b15e32 Author: Shigeru Yoshida Date: Sat Aug 20 12:25:16 2022 +0900 batman-adv: Fix hang up with small MTU hard-interface The system hangs up when batman-adv soft-interface is created on hard-interface with small MTU. For example, the following commands create batman-adv soft-interface on dummy interface with zero MTU: # ip link add name dummy0 type dummy # ip link set mtu 0 dev dummy0 # ip link set up dev dummy0 # ip link add name bat0 type batadv # ip link set dev dummy0 master bat0 These commands cause the system hang up with the following messages: [ 90.578925][ T6689] batman_adv: bat0: Adding interface: dummy0 [ 90.580884][ T6689] batman_adv: bat0: The MTU of interface dummy0 is too small (0) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1560 would solve the problem. [ 90.586264][ T6689] batman_adv: bat0: Interface activated: dummy0 [ 90.590061][ T6689] batman_adv: bat0: Forced to purge local tt entries to fit new maximum fragment MTU (-320) [ 90.595517][ T6689] batman_adv: bat0: Forced to purge local tt entries to fit new maximum fragment MTU (-320) [ 90.598499][ T6689] batman_adv: bat0: Forced to purge local tt entries to fit new maximum fragment MTU (-320) This patch fixes this issue by returning error when enabling hard-interface with small MTU size. Fixes: c6c8fea29769 ("net: Add batman-adv meshing protocol") Signed-off-by: Shigeru Yoshida Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/hard-interface.c | 4 ++++ 1 file changed, 4 insertions(+) commit d92e600f860ba98eac576a976c275106af575c82 Merge: 568035b01cfb 8c596324232d Author: Rafael J. Wysocki Date: Sat Aug 20 13:49:17 2022 +0200 Merge tag 'thermal-v6.0-rc2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal control fixes for 6.0-rc3 from Daniel Lezcano: "- Fix missing required property for thermal zone description (Daniel Lezcano) - Add missing export symbol for thermal_zone_device_register_with_trips() (Daniel Lezcano)" * tag 'thermal-v6.0-rc2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux: dt-bindings: thermal: Fix missing required property thermal/core: Add missing EXPORT_SYMBOL_GPL commit fac8e558da9485e13a0ae0488aa0b8a8c307cd34 Author: Mike Christie Date: Thu Aug 11 20:12:06 2022 -0500 scsi: core: Fix passthrough retry counter handling Passthrough users will set the scsi_cmnd->allowed value and were expecting up to $allowed retries. The problem is that before: commit 6aded12b10e0 ("scsi: core: Remove struct scsi_request") we used to set the retries on the scsi_request then copy them over to scsi_cmnd->allowed in scsi_setup_scsi_cmnd. With that patch we now set scsi_cmnd->allowed to 0 in scsi_prepare_cmd and overwrite what the passthrough user set. This moves the allowed initialization to after the blk_rq_is_passthrough() check so it's only done for the non-passthrough path where the ULD init_command will normally set an allowed value it prefers. Link: https://lore.kernel.org/r/20220812011206.9157-1-michael.christie@oracle.com Fixes: 6aded12b10e0 ("scsi: core: Remove struct scsi_request") Reviewed-by: Christoph Hellwig Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8f2c96420c6ec3dcb18c8be923e24c6feaa5ccf6 Author: Bart Van Assche Date: Thu Aug 11 16:43:49 2022 -0700 scsi: ufs: core: Reduce the power mode change timeout The current power mode change timeout (180 s) is so large that it can cause a watchdog timer to fire. Reduce the power mode change timeout to 10 seconds. Link: https://lore.kernel.org/r/20220811234401.1957911-1-bvanassche@acm.org Reviewed-by: Stanley Chu Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit ed06fce0b034b2e25bd93430f5c4cbb28036cc1a Author: Trond Myklebust Date: Wed Aug 3 14:55:03 2022 -0400 SUNRPC: RPC level errors should set task->tk_rpc_status Fix up a case in call_encode() where we're failing to set task->tk_rpc_status when an RPC level error occurred. Fixes: 9c5948c24869 ("SUNRPC: task should be exit if encode return EKEYEXPIRED more times") Signed-off-by: Trond Myklebust net/sunrpc/clnt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcfc8be1e9cf2f12b50dce8b579b3ae54443a014 Author: Olga Kornievskaia Date: Thu Aug 18 15:07:05 2022 -0400 NFSv4.2 fix problems with __nfs42_ssc_open A destination server while doing a COPY shouldn't accept using the passed in filehandle if its not a regular filehandle. If alloc_file_pseudo() has failed, we need to decrement a reference on the newly created inode, otherwise it leaks. Reported-by: Al Viro Fixes: ec4b092508982 ("NFS: inter ssc open") Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust fs/nfs/nfs4file.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f16857e62bac60786104c020ad7c86e2163b2c5b Author: NeilBrown Date: Fri Aug 19 09:55:59 2022 +1000 NFS: unlink/rmdir shouldn't call d_delete() twice on ENOENT nfs_unlink() calls d_delete() twice if it receives ENOENT from the server - once in nfs_dentry_handle_enoent() from nfs_safe_remove and once in nfs_dentry_remove_handle_error(). nfs_rmddir() also calls it twice - the nfs_dentry_handle_enoent() call is direct and inside a region locked with ->rmdir_sem It is safe to call d_delete() twice if the refcount > 1 as the dentry is simply unhashed. If the refcount is 1, the first call sets d_inode to NULL and the second call crashes. This patch guards the d_delete() call from nfs_dentry_handle_enoent() leaving the one under ->remdir_sem in case that is important. In mainline it would be safe to remove the d_delete() call. However in older kernels to which this might be backported, that would change the behaviour of nfs_unlink(). nfs_unlink() used to unhash the dentry which resulted in nfs_dentry_handle_enoent() not calling d_delete(). So in older kernels we need the d_delete() in nfs_dentry_remove_handle_error() when called from nfs_unlink() but not when called from nfs_rmdir(). To make the code work correctly for old and new kernels, and from both nfs_unlink() and nfs_rmdir(), we protect the d_delete() call with simple_positive(). This ensures it is never called in a circumstance where it could crash. Fixes: 3c59366c207e ("NFS: don't unhash dentry during unlink/rename") Fixes: 9019fb391de0 ("NFS: Label the dentry with a verifier in nfs_rmdir() and nfs_unlink()") Signed-off-by: NeilBrown Tested-by: Olga Kornievskaia Signed-off-by: Trond Myklebust fs/nfs/dir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bdbf0617bbc3641af158d1aeffeebb1505f76263 Author: Axel Rasmussen Date: Fri Aug 19 12:19:28 2022 -0700 selftests/vm: fix inability to build any vm tests When we stopped using KSFT_KHDR_INSTALL, a side effect is we also changed the value of `top_srcdir`. This can be seen by looking at the code removed by commit 49de12ba06ef ("selftests: drop KSFT_KHDR_INSTALL make target"). (Note though that this commit didn't break this, technically the one before it did since that's the one that stopped KSFT_KHDR_INSTALL from being used, even though the code was still there.) Previously lib.mk reconfigured `top_srcdir` when KSFT_KHDR_INSTALL was being used. Now, that's no longer the case. As a result, the path to gup_test.h in vm/Makefile was wrong, and since it's a dependency of all of the vm binaries none of them could be built. Instead, we'd get an "error" like: make[1]: *** No rule to make target '/[...]/tools/testing/selftests/vm/compaction_test', needed by 'all'. Stop. So, modify lib.mk so it once again sets top_srcdir to the root of the kernel tree. Fixes: f2745dc0ba3d ("selftests: stop using KSFT_KHDR_INSTALL") Signed-off-by: Axel Rasmussen Signed-off-by: Shuah Khan tools/testing/selftests/lib.mk | 1 + 1 file changed, 1 insertion(+) commit e82c649e851c9c25367fb7a2a6cf3479187de467 Author: Sabrina Dubroca Date: Wed Aug 17 14:54:36 2022 +0200 Revert "net: macsec: update SCI upon MAC address change." This reverts commit 6fc498bc82929ee23aa2f35a828c6178dfd3f823. Commit 6fc498bc8292 states: SCI should be updated, because it contains MAC in its first 6 octets. That's not entirely correct. The SCI can be based on the MAC address, but doesn't have to be. We can also use any 64-bit number as the SCI. When the SCI based on the MAC address, it uses a 16-bit "port number" provided by userspace, which commit 6fc498bc8292 overwrites with 1. In addition, changing the SCI after macsec has been setup can just confuse the receiver. If we configure the RXSC on the peer based on the original SCI, we should keep the same SCI on TX. When the macsec device is being managed by a userspace key negotiation daemon such as wpa_supplicant, commit 6fc498bc8292 would also overwrite the SCI defined by userspace. Fixes: 6fc498bc8292 ("net: macsec: update SCI upon MAC address change.") Signed-off-by: Sabrina Dubroca Link: https://lore.kernel.org/r/9b1a9d28327e7eb54550a92eebda45d25e54dd0d.1660667033.git.sd@queasysnail.net Signed-off-by: Jakub Kicinski drivers/net/macsec.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 9dbdfd4a9f3416c84d22623e6b5bfe1966e336b7 Author: Sean Anderson Date: Thu Aug 18 12:40:29 2022 -0400 net: dpaa: Fix <1G ethernet on LS1046ARDB As discussed in commit 73a21fa817f0 ("dpaa_eth: support all modes with rate adapting PHYs"), we must add a workaround for Aquantia phys with in-tree support in order to keep 1G support working. Update this workaround for the AQR113C phy found on revision C LS1046ARDB boards. Fixes: 12cf1b89a668 ("net: phy: Add support for AQR113C EPHY") Signed-off-by: Sean Anderson Acked-by: Camelia Groza Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20220818164029.2063293-1-sean.anderson@seco.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 27883605cf97f3c500962fa02f241598fe11744b Merge: 568035b01cfb d957e7ffb2c7 Author: Martin K. Petersen Date: Fri Aug 19 17:28:54 2022 -0400 Merge branch '5.20/scsi-queue' into 6.0/scsi-fixes Include commits that weren't submitted during the 6.0 merge window. Signed-off-by: Martin K. Petersen commit 26f2da0d2f823dc7180b0505d46318f64d1e0a7a Author: Tony Lindgren Date: Tue Jun 21 12:11:18 2022 +0300 clk: ti: Fix missing of_node_get() ti_find_clock_provider() For ti_find_clock_provider() we want to return the np with refcount incremented. However we are missing of_node_get() for the clock-output-names case that causes refcount warnings. Fixes: 51f661ef9a10 ("clk: ti: Add ti_find_clock_provider() to use clock-output-names") Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20220621091118.33930-1-tony@atomide.com Signed-off-by: Stephen Boyd drivers/clk/ti/clk.c | 1 + 1 file changed, 1 insertion(+) commit f461950fdc374a3ada5a63c669d997de4600dffe Author: Zhenneng Li Date: Thu Aug 11 15:25:40 2022 +0800 drm/radeon: add a force flush to delay work when radeon Although radeon card fence and wait for gpu to finish processing current batch rings, there is still a corner case that radeon lockup work queue may not be fully flushed, and meanwhile the radeon_suspend_kms() function has called pci_set_power_state() to put device in D3hot state. Per PCI spec rev 4.0 on 5.3.1.4.1 D3hot State. > Configuration and Message requests are the only TLPs accepted by a Function in > the D3hot state. All other received Requests must be handled as Unsupported Requests, > and all received Completions may optionally be handled as Unexpected Completions. This issue will happen in following logs: Unable to handle kernel paging request at virtual address 00008800e0008010 CPU 0 kworker/0:3(131): Oops 0 pc = [] ra = [] ps = 0000 Tainted: G W pc is at si_gpu_check_soft_reset+0x3c/0x240 ra is at si_dma_is_lockup+0x34/0xd0 v0 = 0000000000000000 t0 = fff08800e0008010 t1 = 0000000000010000 t2 = 0000000000008010 t3 = fff00007e3c00000 t4 = fff00007e3c00258 t5 = 000000000000ffff t6 = 0000000000000001 t7 = fff00007ef078000 s0 = fff00007e3c016e8 s1 = fff00007e3c00000 s2 = fff00007e3c00018 s3 = fff00007e3c00000 s4 = fff00007fff59d80 s5 = 0000000000000000 s6 = fff00007ef07bd98 a0 = fff00007e3c00000 a1 = fff00007e3c016e8 a2 = 0000000000000008 a3 = 0000000000000001 a4 = 8f5c28f5c28f5c29 a5 = ffffffff810f4338 t8 = 0000000000000275 t9 = ffffffff809b66f8 t10 = ff6769c5d964b800 t11= 000000000000b886 pv = ffffffff811bea20 at = 0000000000000000 gp = ffffffff81d89690 sp = 00000000aa814126 Disabling lock debugging due to kernel taint Trace: [] si_dma_is_lockup+0x34/0xd0 [] radeon_fence_check_lockup+0xd0/0x290 [] process_one_work+0x280/0x550 [] worker_thread+0x70/0x7c0 [] worker_thread+0x130/0x7c0 [] kthread+0x200/0x210 [] worker_thread+0x0/0x7c0 [] kthread+0x14c/0x210 [] ret_from_kernel_thread+0x18/0x20 [] kthread+0x0/0x210 Code: ad3e0008 43f0074a ad7e0018 ad9e0020 8c3001e8 40230101 <88210000> 4821ed21 So force lockup work queue flush to fix this problem. Acked-by: Christian König Signed-off-by: Zhenneng Li Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_device.c | 3 +++ 1 file changed, 3 insertions(+) commit 2035590f3d40f227eac453d0c36b5eae85c1cf08 Author: Maíra Canal Date: Thu Aug 18 10:27:30 2022 -0300 drm/amd/display: Include missing header The file amdgpu_dm_plane.c missed the header amdgpu_dm_plane.h, which resulted on the following warning: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:1046:5: warning: no previous prototype for 'fill_dc_scaling_info' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:1222:6: warning: no previous prototype for 'handle_cursor_update' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:152:6: warning: no previous prototype for 'modifier_has_dcc' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:1576:5: warning: no previous prototype for 'amdgpu_dm_plane_init' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:157:10: warning: no previous prototype for 'modifier_gfx9_swizzle_mode' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:752:5: warning: no previous prototype for 'fill_plane_buffer_attributes' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:83:31: warning: no previous prototype for 'amd_get_format_info' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:88:6: warning: no previous prototype for 'fill_blending_from_plane_state' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:992:5: warning: no previous prototype for 'dm_plane_helper_check_state' [-Wmissing-prototypes] Therefore, include the missing header on the file and turn global functions that are not used outside of the file into static functions. Fixes: 5d945cbcd4b1 ("drm/amd/display: Create a file dedicated to planes") Reported-by: kernel test robot Signed-off-by: Maíra Canal Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 5 +++-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.h | 8 -------- 2 files changed, 3 insertions(+), 10 deletions(-) commit 06671734881af2bcf7f453661b5f8616e32bb3fc Author: shaoyunl Date: Thu Aug 18 14:13:52 2022 -0400 drm/amdgpu: Remove the additional kfd pre reset call for sriov The additional call is caused by merge conflict Reviewed-by: Felix Kuehling Signed-off-by: shaoyunl Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 -- 1 file changed, 2 deletions(-) commit c351938350ab9b5e978dede2c321da43de7eb70c Author: Candice Li Date: Thu Aug 18 10:47:09 2022 +0800 drm/amdgpu: Check num_gfx_rings for gfx v9_0 rb setup. No need to set up rb when no gfx rings. Signed-off-by: Candice Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f5994da72ba124a3d0463672fdfbec073e3bb72f Author: YiPeng Chai Date: Fri Aug 12 14:34:35 2022 +0800 drm/amdgpu: fix hive reference leak when adding xgmi device Only amdgpu_get_xgmi_hive but no amdgpu_put_xgmi_hive which will leak the hive reference. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+) commit 9d705d7741ae70764f3d6d87e67fad3b5c30ffd0 Author: YiPeng Chai Date: Fri Aug 12 13:38:34 2022 +0800 drm/amdgpu: Move psp_xgmi_terminate call from amdgpu_xgmi_remove_device to psp_hw_fini V1: The amdgpu_xgmi_remove_device function will send unload command to psp through psp ring to terminate xgmi, but psp ring has been destroyed in psp_hw_fini. V2: 1. Change the commit title. 2. Restore amdgpu_xgmi_remove_device to its original calling location. Move psp_xgmi_terminate call from amdgpu_xgmi_remove_device to psp_hw_fini. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit 43ef9db423bdce1df504d4d10e25092d427f04e3 Author: Tim Huang Date: Mon Aug 15 14:04:49 2022 +0800 drm/amdgpu: enable GFXOFF allow control for GC IP v11.0.1 Enable GFXOFF allow control when set the GFX power gating. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 50cd95ac46548429e5bba7ca75cc97d11a697947 Merge: e45c890140c8 3a608cfee97e Author: Linus Torvalds Date: Fri Aug 19 14:02:24 2022 -0700 Merge tag 'execve-v6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull execve fix from Kees Cook: - Replace remaining kmap() uses with kmap_local_page() (Fabio M. De Francesco) * tag 'execve-v6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: exec: Replace kmap{,_atomic}() with kmap_local_page() commit e45c890140c8c2c9f3dd475c14bdf084c4cd2296 Merge: 8fd00059cc13 012e8d2034f1 Author: Linus Torvalds Date: Fri Aug 19 13:56:14 2022 -0700 Merge tag 'hardening-v6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull hardening fixes from Kees Cook: - Also undef LATENT_ENTROPY_PLUGIN for per-file disabling (Andrew Donnellan) - Return EFAULT on copy_from_user() failures in LoadPin (Kees Cook) * tag 'hardening-v6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin disabled for a file LoadPin: Return EFAULT on copy_from_user() failures commit 8fd00059cc13c7f170451e9318a9a5e772b88e17 Merge: ca052cfd6ee5 96264230a681 Author: Linus Torvalds Date: Fri Aug 19 13:49:07 2022 -0700 Merge tag 'riscv-for-linus-6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A fix to make the ISA extension static keys writable after init. This manifests at least as a crash when loading modules (including KVM). - A fixup for a build warning related to a poorly formed comment in our perf driver. * tag 'riscv-for-linus-6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: perf: riscv legacy: fix kerneldoc comment warning riscv: Ensure isa-ext static keys are writable commit 65fac0d54f374625b43a9d6ad1f2c212bd41f518 Author: Yu Kuai Date: Tue Jul 26 20:22:24 2022 +0800 blk-mq: fix io hung due to missing commit_rqs Currently, in virtio_scsi, if 'bd->last' is not set to true while dispatching request, such io will stay in driver's queue, and driver will wait for block layer to dispatch more rqs. However, if block layer failed to dispatch more rq, it should trigger commit_rqs to inform driver. There is a problem in blk_mq_try_issue_list_directly() that commit_rqs won't be called: // assume that queue_depth is set to 1, list contains two rq blk_mq_try_issue_list_directly blk_mq_request_issue_directly // dispatch first rq // last is false __blk_mq_try_issue_directly blk_mq_get_dispatch_budget // succeed to get first budget __blk_mq_issue_directly scsi_queue_rq cmd->flags |= SCMD_LAST virtscsi_queuecommand kick = (sc->flags & SCMD_LAST) != 0 // kick is false, first rq won't issue to disk queued++ blk_mq_request_issue_directly // dispatch second rq __blk_mq_try_issue_directly blk_mq_get_dispatch_budget // failed to get second budget ret == BLK_STS_RESOURCE blk_mq_request_bypass_insert // errors is still 0 if (!list_empty(list) || errors && ...) // won't pass, commit_rqs won't be called In this situation, first rq relied on second rq to dispatch, while second rq relied on first rq to complete, thus they will both hung. Fix the problem by also treat 'BLK_STS_*RESOURCE' as 'errors' since it means that request is not queued successfully. Same problem exists in blk_mq_dispatch_rq_list(), 'BLK_STS_*RESOURCE' can't be treated as 'errors' here, fix the problem by calling commit_rqs if queue_rq return 'BLK_STS_*RESOURCE'. Fixes: d666ba98f849 ("blk-mq: add mq_ops->commit_rqs()") Signed-off-by: Yu Kuai Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20220726122224.1790882-1-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/blk-mq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ca052cfd6ee5d3358f2929439e0c7f0424bedc9e Merge: 42c54d5491ed 959d6c4ae238 Author: Linus Torvalds Date: Fri Aug 19 13:40:11 2022 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM: - Fix unexpected sign extension of KVM_ARM_DEVICE_ID_MASK - Tidy-up handling of AArch32 on asymmetric systems x86: - Fix 'missing ENDBR' BUG for fastop functions Generic: - Some cleanup and static analyzer patches - More fixes to KVM_CREATE_VM unwind paths" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: Drop unnecessary initialization of "ops" in kvm_ioctl_create_device() KVM: Drop unnecessary initialization of "npages" in hva_to_pfn_slow() x86/kvm: Fix "missing ENDBR" BUG for fastop functions x86/kvm: Simplify FOP_SETCC() x86/ibt, objtool: Add IBT_NOSEAL() KVM: Rename mmu_notifier_* to mmu_invalidate_* KVM: Rename KVM_PRIVATE_MEM_SLOTS to KVM_INTERNAL_MEM_SLOTS KVM: MIPS: remove unnecessary definition of KVM_PRIVATE_MEM_SLOTS KVM: Move coalesced MMIO initialization (back) into kvm_create_vm() KVM: Unconditionally get a ref to /dev/kvm module when creating a VM KVM: Properly unwind VM creation if creating debugfs fails KVM: arm64: Reject 32bit user PSTATE on asymmetric systems KVM: arm64: Treat PMCR_EL1.LC as RES1 on asymmetric systems KVM: arm64: Fix compile error due to sign extension commit 42c54d5491ed7b9fe89a499224494277a33b23df Merge: a3a78b6332ba 899b7f69f244 Author: Linus Torvalds Date: Fri Aug 19 13:33:48 2022 -0700 Merge tag 'for-6.0-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few short fixes and a lockdep warning fix (needs moving some code): - tree-log replay fixes: - fix error handling when looking up extent refs - fix warning when setting inode number of links - relocation fixes: - reset block group read-only status when relocation fails - unset control structure if transaction fails when starting to process a block group - add lockdep annotations to fix a warning during relocation where blocks temporarily belong to another tree and can lead to reversed dependencies - tree-checker verifies that extent items don't overlap" * tag 'for-6.0-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: tree-checker: check for overlapping extent items btrfs: fix warning during log replay when bumping inode link count btrfs: fix lost error handling when looking up extended ref on log replay btrfs: fix lockdep splat with reloc root extent buffers btrfs: move lockdep class helpers to locking.c btrfs: unset reloc control if transaction commit fails in prepare_to_relocate() btrfs: reset RO counter on block group if we fail to relocate commit a3a78b6332ba8e1949541150efcc8051ceeb2762 Merge: 963a70bee588 17661ecf6a64 Author: Linus Torvalds Date: Fri Aug 19 13:26:52 2022 -0700 Merge tag '5.20-rc2-ksmbd-smb3-server-fixes' of git://git.samba.org/ksmbd Pull ksmbd server fixes from Steve French: - important sparse file fix - allocation size fix - fix incorrect rc on bad share - share config fix * tag '5.20-rc2-ksmbd-smb3-server-fixes' of git://git.samba.org/ksmbd: ksmbd: don't remove dos attribute xattr on O_TRUNC open ksmbd: remove unnecessary generic_fillattr in smb2_open ksmbd: request update to stale share config ksmbd: return STATUS_BAD_NETWORK_NAME error status if share is not configured commit f52679b78877f17e95a317e18a4c9c46cc3d845a Author: Namhyung Kim Date: Thu Aug 18 17:36:44 2022 -0700 perf tools: Support reading PERF_FORMAT_LOST The recent kernel added lost count can be read from either read(2) or ring buffer data with PERF_SAMPLE_READ. As it's a variable length data we need to access it according to the format info. But for perf tools use cases, PERF_FORMAT_ID is always set. So we can only check PERF_FORMAT_LOST bit to determine the data format. Add sample_read_value_size() and next_sample_read_value() helpers to make it a bit easier to access. Use them in all places where it reads the struct sample_read_value. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Ian Rogers Cc: Ingo Molnar Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220819003644.508916-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/sample-parsing.c | 14 ++++++--- tools/perf/util/event.h | 21 ++++++++++++- tools/perf/util/evsel.c | 29 +++++++++++------- .../util/scripting-engines/trace-event-python.c | 19 ++++++++---- tools/perf/util/session.c | 35 +++++++++++++--------- tools/perf/util/synthetic-events.c | 32 +++++++++++++++----- 6 files changed, 108 insertions(+), 42 deletions(-) commit 6d395a513556e61dc22c6abdf9b419deb46f1908 Author: Namhyung Kim Date: Thu Aug 18 17:36:43 2022 -0700 libperf: Add a test case for read formats It checks a various combination of the read format settings and verify it return the value in a proper position. The test uses task-clock software events to guarantee it's always active and sets enabled/running time. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Ian Rogers Cc: Ingo Molnar Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220819003644.508916-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/perf/tests/test-evsel.c | 161 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) commit 89e3106fa25fb1b626a7123dba870159d453e785 Author: Namhyung Kim Date: Thu Aug 18 17:36:42 2022 -0700 libperf: Handle read format in perf_evsel__read() The perf_counts_values should be increased to read the new lost data. Also adjust values after read according the read format. This supports PERF_FORMAT_GROUP which has a different data format but it's only available for leader events. Currently it doesn't have an API to read sibling (member) events in the group. But users may read the sibling event directly. Also reading from mmap would be disabled when the read format has ID or LOST bit as it's not exposed via mmap. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Ian Rogers Cc: Ingo Molnar Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220819003644.508916-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/perf/evsel.c | 79 ++++++++++++++++++++++++++++++++++++- tools/lib/perf/include/perf/event.h | 3 +- tools/lib/perf/include/perf/evsel.h | 4 +- 3 files changed, 83 insertions(+), 3 deletions(-) commit 65ba872a6971c11ceb342c3330f059289c0e6bdb Author: Namhyung Kim Date: Thu Aug 18 17:36:41 2022 -0700 tools headers UAPI: Sync linux/perf_event.h with the kernel sources To pick the trivial change in: 119a784c81270eb8 ("perf/core: Add a new read format to get a number of lost samples") Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Ian Rogers Cc: Ingo Molnar Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220819003644.508916-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/perf_event.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e5bc0deae57615324ca843827873b39a34acc82e Author: Arnaldo Carvalho de Melo Date: Fri Sep 10 11:46:54 2021 -0300 tools headers UAPI: Sync x86's asm/kvm.h with the kernel sources To pick the changes in: 43bb9e000ea4c621 ("KVM: x86: Tweak name of MONITOR/MWAIT #UD quirk to make it #UD specific") 94dfc73e7cf4a31d ("treewide: uapi: Replace zero-length arrays with flexible-array members") bfbcc81bb82cbbad ("KVM: x86: Add a quirk for KVM's "MONITOR/MWAIT are NOPs!" behavior") b172862241b48499 ("KVM: x86: PIT: Preserve state of speaker port data bit") ed2351174e38ad4f ("KVM: x86: Extend KVM_{G,S}ET_VCPU_EVENTS to support pending triple fault") That just rebuilds kvm-stat.c on x86, no change in functionality. This silences these perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h' diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h Cc: Chenyi Qiang Cc: Sean Christopherson Cc: Gustavo A. R. Silva Cc: Paolo Bonzini Cc: Paul Durrant Link: https://lore.kernel.org/lkml/Yv6OMPKYqYSbUxwZ@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/uapi/asm/kvm.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit eea085d11449bc6514dca9850cdd3a996ec1217e Author: Arnaldo Carvalho de Melo Date: Tue Mar 2 17:20:08 2021 -0300 tools headers UAPI: Sync KVM's vmx.h header with the kernel sources To pick the changes in: 2f4073e08f4cc5a4 ("KVM: VMX: Enable Notify VM exit") That makes 'perf kvm-stat' aware of this new NOTIFY 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: Tao Xu Link: http://lore.kernel.org/lkml/Yv6LavXMZ+njijpq@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/uapi/asm/vmx.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 898d24034605d2a0b16f6ca349d2e74124b5e043 Author: Arnaldo Carvalho de Melo Date: Tue Apr 14 09:12:55 2020 -0300 tools include UAPI: Sync linux/vhost.h with the kernel sources To get the changes in: f345a0143b4dd1cf ("vhost-vdpa: uAPI to suspend the device") Silencing this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/vhost.h' differs from latest version at 'include/uapi/linux/vhost.h' diff -u tools/include/uapi/linux/vhost.h include/uapi/linux/vhost.h To pick up these changes and support them: $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > before $ cp include/uapi/linux/vhost.h tools/include/uapi/linux/vhost.h $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > after $ diff -u before after --- before 2022-08-18 09:46:12.355958316 -0300 +++ after 2022-08-18 09:46:19.701182822 -0300 @@ -29,6 +29,7 @@ [0x75] = "VDPA_SET_VRING_ENABLE", [0x77] = "VDPA_SET_CONFIG_CALL", [0x7C] = "VDPA_SET_GROUP_ASID", + [0x7D] = "VDPA_SUSPEND", }; = { [0x00] = "GET_FEATURES", $ For instance, see how those 'cmd' ioctl arguments get translated, now VDPA_SUSPEND will be as well: # perf trace -a -e ioctl --max-events=10 0.000 ( 0.011 ms): pipewire/2261 ioctl(fd: 60, cmd: SNDRV_PCM_HWSYNC, arg: 0x1) = 0 21.353 ( 0.014 ms): pipewire/2261 ioctl(fd: 60, cmd: SNDRV_PCM_HWSYNC, arg: 0x1) = 0 25.766 ( 0.014 ms): gnome-shell/2196 ioctl(fd: 14, cmd: DRM_I915_IRQ_WAIT, arg: 0x7ffe4a22c740) = 0 25.845 ( 0.034 ms): gnome-shel:cs0/2212 ioctl(fd: 14, cmd: DRM_I915_IRQ_EMIT, arg: 0x7fd43915dc70) = 0 25.916 ( 0.011 ms): gnome-shell/2196 ioctl(fd: 9, cmd: DRM_MODE_ADDFB2, arg: 0x7ffe4a22c8a0) = 0 25.941 ( 0.025 ms): gnome-shell/2196 ioctl(fd: 9, cmd: DRM_MODE_ATOMIC, arg: 0x7ffe4a22c840) = 0 32.915 ( 0.009 ms): gnome-shell/2196 ioctl(fd: 9, cmd: DRM_MODE_RMFB, arg: 0x7ffe4a22cf9c) = 0 42.522 ( 0.013 ms): gnome-shell/2196 ioctl(fd: 14, cmd: DRM_I915_IRQ_WAIT, arg: 0x7ffe4a22c740) = 0 42.579 ( 0.031 ms): gnome-shel:cs0/2212 ioctl(fd: 14, cmd: DRM_I915_IRQ_EMIT, arg: 0x7fd43915dc70) = 0 42.644 ( 0.010 ms): gnome-shell/2196 ioctl(fd: 9, cmd: DRM_MODE_ADDFB2, arg: 0x7ffe4a22c8a0) = 0 # Cc: Adrian Hunter Cc: Eugenio Pérez Cc: Ian Rogers Cc: Jiri Olsa Cc: Michael S. Tsirkin Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/Yv6Kb4OESuNJuH6X@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/vhost.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 25f308951703be599f82c44229b6f74c4ad86ed4 Author: Arnaldo Carvalho de Melo Date: Wed Aug 12 08:52:32 2020 -0300 tools headers kvm s390: Sync headers with the kernel sources To pick the changes in: f5ecfee944934757 ("KVM: s390: resetting the Topology-Change-Report") None of them trigger any changes in tooling, this time this is just to silence these perf build warnings: Warning: Kernel ABI header at 'tools/arch/s390/include/uapi/asm/kvm.h' differs from latest version at 'arch/s390/include/uapi/asm/kvm.h' diff -u tools/arch/s390/include/uapi/asm/kvm.h arch/s390/include/uapi/asm/kvm.h Cc: Janosch Frank Cc: Pierre Morel Link: http://lore.kernel.org/lkml/YvzwMXzaIzOU4WAY@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/s390/include/uapi/asm/kvm.h | 1 + 1 file changed, 1 insertion(+) commit bf465ca8090a1aa4f88d87e003302158c772c3de Author: Arnaldo Carvalho de Melo Date: Sun May 9 09:39:02 2021 -0300 tools headers UAPI: Sync linux/kvm.h with the kernel sources To pick the changes in: 8a061562e2f2b32b ("RISC-V: KVM: Add extensible CSR emulation framework") f5ecfee944934757 ("KVM: s390: resetting the Topology-Change-Report") 450a563924ae9437 ("KVM: stats: Fix value for KVM_STATS_UNIT_MAX for boolean stats") 1b870fa5573e260b ("kvm: stats: tell userspace which values are boolean") db1c875e0539518e ("KVM: s390: add KVM_S390_ZPCI_OP to manage guest zPCI devices") 94dfc73e7cf4a31d ("treewide: uapi: Replace zero-length arrays with flexible-array members") 084cc29f8bbb034c ("KVM: x86/MMU: Allow NX huge pages to be disabled on a per-vm basis") 2f4073e08f4cc5a4 ("KVM: VMX: Enable Notify VM exit") ed2351174e38ad4f ("KVM: x86: Extend KVM_{G,S}ET_VCPU_EVENTS to support pending triple fault") e9bf3acb23f0a6e1 ("KVM: s390: Add KVM_CAP_S390_PROTECTED_DUMP") 8aba09588d2af37c ("KVM: s390: Add CPU dump functionality") 0460eb35b443f73f ("KVM: s390: Add configuration dump functionality") fe9a93e07ba4f29d ("KVM: s390: pv: Add query dump information") 35d02493dba1ae63 ("KVM: s390: pv: Add query interface") c24a950ec7d60c4d ("KVM, SEV: Add KVM_EXIT_SHUTDOWN metadata for SEV-ES") ffbb61d09fc56c85 ("KVM: x86: Accept KVM_[GS]ET_TSC_KHZ as a VM ioctl.") 661a20fab7d156cf ("KVM: x86/xen: Advertise and document KVM_XEN_HVM_CONFIG_EVTCHN_SEND") fde0451be8fb3208 ("KVM: x86/xen: Support per-vCPU event channel upcall via local APIC") 28d1629f751c4a5f ("KVM: x86/xen: Kernel acceleration for XENVER_version") 536395260582be74 ("KVM: x86/xen: handle PV timers oneshot mode") 942c2490c23f2800 ("KVM: x86/xen: Add KVM_XEN_VCPU_ATTR_TYPE_VCPU_ID") 2fd6df2f2b47d430 ("KVM: x86/xen: intercept EVTCHNOP_send from guests") 35025735a79eaa89 ("KVM: x86/xen: Support direct injection of event channel events") That just rebuilds perf, as these patches add just an ioctl that is S390 specific and may clash with other arches, so are so far being excluded in the harvester script: $ tools/perf/trace/beauty/kvm_ioctl.sh > before $ cp include/uapi/linux/kvm.h tools/include/uapi/linux/kvm.h $ tools/perf/trace/beauty/kvm_ioctl.sh > after $ diff -u before after $ grep 390 tools/perf/trace/beauty/kvm_ioctl.sh egrep -v " ((ARM|PPC|S390)_|[GS]ET_(DEBUGREGS|PIT2|XSAVE|TSC_KHZ)|CREATE_SPAPR_TCE_64)" | \ $ This is also by now used by tools/testing/selftests/kvm/, a simple test build succeeded. This silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h' diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h Cc: Anup Patel Cc: Ben Gardon Cc: Chenyi Qiang Cc: Christian Borntraeger Cc: David Woodhouse Cc: Gustavo A. R. Silva Cc: Janosch Frank Cc: João Martins Cc: Matthew Rosato Cc: Oliver Upton Cc: Paolo Bonzini Cc: Peter Gonda Cc: Pierre Morel Cc: Tao Xu Link: https://lore.kernel.org/lkml/YvzuryClcn%2FvA0Gn@kernel.org/ Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/kvm.h | 108 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) commit 54cd4cde7c1edb869603073167cabab0b760fff6 Author: Arnaldo Carvalho de Melo Date: Sat Nov 13 11:08:31 2021 -0300 tools headers UAPI: Sync drm/i915_drm.h with the kernel sources To pick up the changes in: a913bde810fc464d ("drm/i915: Update i915 uapi documentation") 525e93f6317a08a0 ("drm/i915/uapi: add NEEDS_CPU_ACCESS hint") 141f733bb3abb000 ("drm/i915/uapi: expose the avail tracking") 3f4309cbdc849637 ("drm/i915/uapi: add probed_cpu_visible_size") a50794f26f52c66c ("uapi/drm/i915: Document memory residency and Flat-CCS capability of obj") That don't add any new ioctl, so no changes in tooling. This silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h' diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Matthew Auld Cc: Matt Roper Cc: Namhyung Kim Cc: Niranjana Vishwanathapura Cc: Ramalingam C Link: http://lore.kernel.org/lkml/Yvzrp9RFIeEkb5fI@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/drm/i915_drm.h | 387 +++++++++++++++++++++++++++++--------- 1 file changed, 300 insertions(+), 87 deletions(-) commit 62ed93d1996b3aaeadda59b25ac5b70be59b8a61 Author: Arnaldo Carvalho de Melo Date: Thu Jul 1 13:39:15 2021 -0300 tools headers cpufeatures: Sync with the kernel sources To pick the changes from: 2b1299322016731d ("x86/speculation: Add RSB VM Exit protections") 28a99e95f55c6185 ("x86/amd: Use IBPB for firmware calls") 4ad3278df6fe2b08 ("x86/speculation: Disable RRSBA behavior") 26aae8ccbc197223 ("x86/cpu/amd: Enumerate BTC_NO") 9756bba28470722d ("x86/speculation: Fill RSB on vmexit for IBRS") 3ebc170068885b6f ("x86/bugs: Add retbleed=ibpb") 2dbb887e875b1de3 ("x86/entry: Add kernel IBRS implementation") 6b80b59b35557065 ("x86/bugs: Report AMD retbleed vulnerability") a149180fbcf336e9 ("x86: Add magic AMD return-thunk") 15e67227c49a5783 ("x86: Undo return-thunk damage") a883d624aed463c8 ("x86/cpufeatures: Move RETPOLINE flags to word 11") aae99a7c9ab371b2 ("x86/cpufeatures: Introduce x2AVIC CPUID bit") 6f33a9daff9f0790 ("x86: Fix comment for X86_FEATURE_ZEN") 51802186158c74a0 ("x86/speculation/mmio: Enumerate Processor MMIO Stale Data bug") This only causes these perf files to be rebuilt: CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o CC /tmp/build/perf/bench/mem-memset-x86-64-asm.o And addresses this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h' diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h Cc: Adrian Hunter Cc: Alexandre Chartre Cc: Andrew Cooper Cc: Borislav Petkov Cc: Daniel Sneddon Cc: Dave Hansen Cc: Ian Rogers Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Pawan Gupta Cc: Peter Zijlstra Cc: Suravee Suthikulpanit Cc: Wyes Karny Link: https://lore.kernel.org/lkml/Yvznmu5oHv0ZDN2w@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/asm/cpufeatures.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fabe0c61d842637b722344bcd49bfb1b76e2cc68 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: 6b2a51ff03bf0c54 ("fscrypt: Add HCTR2 support for filename encryption") That don't result in any changes in tooling, just causes this to be rebuilt: CC /tmp/build/perf-urgent/trace/beauty/sync_file_range.o LD /tmp/build/perf-urgent/trace/beauty/perf-in.o 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: Herbert Xu Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Nathan Huckleberry Link: https://lore.kernel.org/lkml/Yvzl8C7O1b+hf9GS@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/fscrypt.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7f7f86a7bdd694bfb214479afb6a1f7266bb4d22 Author: Arnaldo Carvalho de Melo Date: Fri Aug 7 08:45:47 2020 -0300 tools arch x86: Sync the msr-index.h copy with the kernel sources To pick up the changes in: 2b1299322016731d ("x86/speculation: Add RSB VM Exit protections") 4af184ee8b2c0a69 ("tools/power turbostat: dump secondary Turbo-Ratio-Limit") 4ad3278df6fe2b08 ("x86/speculation: Disable RRSBA behavior") d7caac991feeef1b ("x86/cpu/amd: Add Spectral Chicken") 6ad0ad2bf8a67e27 ("x86/bugs: Report Intel retbleed vulnerability") c59a1f106f5cd484 ("KVM: x86/pmu: Add IA32_PEBS_ENABLE MSR emulation for extended PEBS") 465932db25f36648 ("x86/cpu: Add new VMX feature, Tertiary VM-Execution control") 027bbb884be006b0 ("KVM: x86/speculation: Disable Fill buffer clear within guests") 51802186158c74a0 ("x86/speculation/mmio: Enumerate Processor MMIO Stale Data bug") Addressing these tools/perf build warnings: 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' That makes the beautification scripts to pick some new entries: $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after $ diff -u before after --- before 2022-08-17 09:05:13.938246475 -0300 +++ after 2022-08-17 09:05:22.221455851 -0300 @@ -161,6 +161,7 @@ [0x0000048f] = "IA32_VMX_TRUE_EXIT_CTLS", [0x00000490] = "IA32_VMX_TRUE_ENTRY_CTLS", [0x00000491] = "IA32_VMX_VMFUNC", + [0x00000492] = "IA32_VMX_PROCBASED_CTLS3", [0x000004c1] = "IA32_PMC0", [0x000004d0] = "IA32_MCG_EXT_CTL", [0x00000560] = "IA32_RTIT_OUTPUT_BASE", @@ -212,6 +213,7 @@ [0x0000064D] = "PLATFORM_ENERGY_STATUS", [0x0000064e] = "PPERF", [0x0000064f] = "PERF_LIMIT_REASONS", + [0x00000650] = "SECONDARY_TURBO_RATIO_LIMIT", [0x00000658] = "PKG_WEIGHTED_CORE_C0_RES", [0x00000659] = "PKG_ANY_CORE_C0_RES", [0x0000065A] = "PKG_ANY_GFXE_C0_RES", $ Now one can trace systemwide asking to see backtraces to where those MSRs are being read/written, see this example with a previous update: # perf trace -e msr:*_msr/max-stack=32/ --filter="msr>=IA32_U_CET && msr<=IA32_INT_SSP_TAB" ^C# If we use -v (verbose mode) we can see what it does behind the scenes: # perf trace -v -e msr:*_msr/max-stack=32/ --filter="msr>=IA32_U_CET && msr<=IA32_INT_SSP_TAB" Using CPUID AuthenticAMD-25-21-0 0x6a0 0x6a8 New filter for msr:read_msr: (msr>=0x6a0 && msr<=0x6a8) && (common_pid != 597499 && common_pid != 3313) 0x6a0 0x6a8 New filter for msr:write_msr: (msr>=0x6a0 && msr<=0x6a8) && (common_pid != 597499 && common_pid != 3313) mmap size 528384B ^C# Example with a frequent msr: # perf trace -v -e msr:*_msr/max-stack=32/ --filter="msr==IA32_SPEC_CTRL" --max-events 2 Using CPUID AuthenticAMD-25-21-0 0x48 New filter for msr:read_msr: (msr==0x48) && (common_pid != 2612129 && common_pid != 3841) 0x48 New filter for msr:write_msr: (msr==0x48) && (common_pid != 2612129 && common_pid != 3841) mmap size 528384B Looking at the vmlinux_path (8 entries long) symsrc__init: build id mismatch for vmlinux. Using /proc/kcore for kernel data Using /proc/kallsyms for symbols 0.000 Timer/2525383 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6) do_trace_write_msr ([kernel.kallsyms]) do_trace_write_msr ([kernel.kallsyms]) __switch_to_xtra ([kernel.kallsyms]) __switch_to ([kernel.kallsyms]) __schedule ([kernel.kallsyms]) schedule ([kernel.kallsyms]) futex_wait_queue_me ([kernel.kallsyms]) futex_wait ([kernel.kallsyms]) do_futex ([kernel.kallsyms]) __x64_sys_futex ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64_after_hwframe ([kernel.kallsyms]) __futex_abstimed_wait_common64 (/usr/lib64/libpthread-2.33.so) 0.030 :0/0 msr:write_msr(msr: IA32_SPEC_CTRL, val: 2) do_trace_write_msr ([kernel.kallsyms]) do_trace_write_msr ([kernel.kallsyms]) __switch_to_xtra ([kernel.kallsyms]) __switch_to ([kernel.kallsyms]) __schedule ([kernel.kallsyms]) schedule_idle ([kernel.kallsyms]) do_idle ([kernel.kallsyms]) cpu_startup_entry ([kernel.kallsyms]) secondary_startup_64_no_verify ([kernel.kallsyms]) # Cc: Adrian Hunter Cc: Daniel Sneddon Cc: Ian Rogers Cc: Jiri Olsa Cc: Len Brown Cc: Like Xu Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Pawan Gupta Cc: Peter Zijlstra Cc: Robert Hoo Signed-off-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/lkml/YvzbT24m2o5U%2F7+q@kernel.org/ Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/asm/msr-index.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit cf1258ac37afe80dbf277add5f1464477b46c9f0 Author: Arnaldo Carvalho de Melo Date: Sat Jun 19 10:09:08 2021 -0300 perf beauty: Update copy of linux/socket.h with the kernel sources To pick the changes in: 7fa875b8e53c288d ("net: copy from user before calling __copy_msghdr") ebe73a284f4de8c5 ("net: Allow custom iter handler in msghdr") 7c701d92b2b5e517 ("skbuff: carry external ubuf_info in msghdr") c04245328dd7e915 ("net: make __sys_accept4_file() static") That don't result in any changes in the tables generated from that header. This silences this perf build warning: Warning: Kernel ABI header at 'tools/perf/trace/beauty/include/linux/socket.h' differs from latest version at 'include/linux/socket.h' diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h Cc: David Ahern Cc: David S. Miller Cc: Dylan Yudaken Cc: Jakub Kicinski Cc: Jens Axboe Cc: Pavel Begunkov Cc: Yajun Deng Link: https://lore.kernel.org/lkml/YvzYs+F+Xzq8Hvvp@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/trace/beauty/include/linux/socket.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b2f10cd4e805eb647773df273eb1a6ff9e6ea45d Author: Ian Rogers Date: Tue Jun 14 07:33:51 2022 -0700 perf cpumap: Fix alignment for masks in event encoding A mask encoding of a cpu map is laid out as: u16 nr u16 long_size unsigned long mask[]; However, the mask may be 8-byte aligned meaning there is a 4-byte pad after long_size. This means 32-bit and 64-bit builds see the mask as being at different offsets. On top of this the structure is in the byte data[] encoded as: u16 type char data[] This means the mask's struct isn't the required 4 or 8 byte aligned, but is offset by 2. Consequently the long reads and writes are causing undefined behavior as the alignment is broken. Fix the mask struct by creating explicit 32 and 64-bit variants, use a union to avoid data[] and casts; the struct must be packed so the layout matches the existing perf.data layout. Taking an address of a member of a packed struct breaks alignment so pass the packed perf_record_cpu_map_data to functions, so they can access variables with the right alignment. As the 64-bit version has 4 bytes of padding, optimizing writing to only write the 32-bit version. Committer notes: Disable warnings about 'packed' that break the build in some arches like riscv64, but just around that specific struct. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Athira Jajeev Cc: Colin Ian King Cc: Dave Marchevsky Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: James Clark Cc: Kees Kook Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Song Liu Cc: Stephane Eranian Link: https://lore.kernel.org/r/20220614143353.1559597-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/perf/include/perf/event.h | 47 ++++++++++++++++++++-- tools/perf/tests/cpumap.c | 19 +++++---- tools/perf/util/cpumap.c | 80 +++++++++++++++++++++++++++++-------- tools/perf/util/cpumap.h | 4 +- tools/perf/util/session.c | 30 +++++++------- tools/perf/util/synthetic-events.c | 34 +++++++++------- 6 files changed, 154 insertions(+), 60 deletions(-) commit 3e5e56c60a14776e2a49837b55b03bc193fd91f7 Author: Conor Dooley Date: Sun Aug 14 15:12:36 2022 +0100 riscv: kvm: move extern sbi_ext declarations to a header Sparse complains about missing statics in the declarations of several variables: arch/riscv/kvm/vcpu_sbi_replace.c:38:37: warning: symbol 'vcpu_sbi_ext_time' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_replace.c:73:37: warning: symbol 'vcpu_sbi_ext_ipi' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_replace.c:126:37: warning: symbol 'vcpu_sbi_ext_rfence' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_replace.c:170:37: warning: symbol 'vcpu_sbi_ext_srst' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_base.c:69:37: warning: symbol 'vcpu_sbi_ext_base' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_base.c:90:37: warning: symbol 'vcpu_sbi_ext_experimental' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_base.c:96:37: warning: symbol 'vcpu_sbi_ext_vendor' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_hsm.c:115:37: warning: symbol 'vcpu_sbi_ext_hsm' was not declared. Should it be static? These variables are however used in vcpu_sbi.c where they are declared as extern. Move them to kvm_vcpu_sbi.h which is handily already included by the three other files. Fixes: a046c2d8578c ("RISC-V: KVM: Reorganize SBI code by moving SBI v0.1 to its own file") Fixes: 5f862df5585c ("RISC-V: KVM: Add v0.1 replacement SBI extensions defined in v0.2") Fixes: 3e1d86569c21 ("RISC-V: KVM: Add SBI HSM extension in KVM") Reviewed-by: Palmer Dabbelt Signed-off-by: Conor Dooley Signed-off-by: Anup Patel arch/riscv/include/asm/kvm_vcpu_sbi.h | 12 ++++++++++++ arch/riscv/kvm/vcpu_sbi.c | 12 +----------- 2 files changed, 13 insertions(+), 11 deletions(-) commit fd0cd59f322b1919bfc68cd245d51906f7f1ba2a Author: Conor Dooley Date: Sun Aug 14 15:12:35 2022 +0100 riscv: kvm: vcpu_timer: fix unused variable warnings In two places, csr is set but never used: arch/riscv/kvm/vcpu_timer.c:302:23: warning: variable 'csr' set but not used [-Wunused-but-set-variable] struct kvm_vcpu_csr *csr; ^ arch/riscv/kvm/vcpu_timer.c:327:23: warning: variable 'csr' set but not used [-Wunused-but-set-variable] struct kvm_vcpu_csr *csr; ^ Remove the variable. Fixes: 8f5cb44b1bae ("RISC-V: KVM: Support sstc extension") Reviewed-by: Palmer Dabbelt Signed-off-by: Conor Dooley Signed-off-by: Anup Patel arch/riscv/kvm/vcpu_timer.c | 4 ---- 1 file changed, 4 deletions(-) commit cde643ff75bc20c538dfae787ca3b587bab16b50 Author: Kan Liang Date: Thu Aug 18 11:44:29 2022 -0700 perf/x86/intel: Fix pebs event constraints for ADL According to the latest event list, the LOAD_LATENCY PEBS event only works on the GP counter 0 and 1 for ADL and RPL. Update the pebs event constraints table. Fixes: f83d2f91d259 ("perf/x86/intel: Add Alder Lake Hybrid support") Reported-by: Ammy Yi Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20220818184429.2355857-1-kan.liang@linux.intel.com arch/x86/events/intel/ds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4bdb0bebc5ba3299d74f123c782d99cd4e25c49 Author: Stephane Eranian Date: Wed Aug 17 22:46:13 2022 -0700 perf/x86/intel/ds: Fix precise store latency handling With the existing code in store_latency_data(), the memory operation (mem_op) returned to the user is always OP_LOAD where in fact, it should be OP_STORE. This comes from the fact that the function is simply grabbing the information from a data source map which covers only load accesses. Intel 12th gen CPU offers precise store sampling that captures both the data source and latency. Therefore it can use the data source mapping table but must override the memory operation to reflect stores instead of loads. Fixes: 61b985e3e775 ("perf/x86/intel: Add perf core PMU support for Sapphire Rapids") Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20220818054613.1548130-1-eranian@google.com arch/x86/events/intel/ds.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 7d3598868aaee05eb738d1c3115616b867e7530a Author: Peter Zijlstra Date: Tue Aug 16 19:40:57 2022 +0800 perf/x86/core: Set pebs_capable and PMU_FL_PEBS_ALL for the Baseline The SDM explicitly states that PEBS Baseline implies Extended PEBS. For cpu model forward compatibility (e.g. on ICX, SPR, ADL), it's safe to stop doing FMS table thing such as setting pebs_capable and PMU_FL_PEBS_ALL since it's already set in the intel_ds_init(). The Goldmont Plus is the only platform which supports extended PEBS but doesn't have Baseline. Keep the status quo. Reported-by: Like Xu Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lkml.kernel.org/r/20220816114057.51307-1-likexu@tencent.com arch/x86/events/intel/core.c | 4 ---- arch/x86/events/intel/ds.c | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) commit 32ba156df1b1c8804a4e5be5339616945eafea22 Author: Kan Liang Date: Tue Aug 16 05:56:11 2022 -0700 perf/x86/lbr: Enable the branch type for the Arch LBR by default On the platform with Arch LBR, the HW raw branch type encoding may leak to the perf tool when the SAVE_TYPE option is not set. In the intel_pmu_store_lbr(), the HW raw branch type is stored in lbr_entries[].type. If the SAVE_TYPE option is set, the lbr_entries[].type will be converted into the generic PERF_BR_* type in the intel_pmu_lbr_filter() and exposed to the user tools. But if the SAVE_TYPE option is NOT set by the user, the current perf kernel doesn't clear the field. The HW raw branch type leaks. There are two solutions to fix the issue for the Arch LBR. One is to clear the field if the SAVE_TYPE option is NOT set. The other solution is to unconditionally convert the branch type and expose the generic type to the user tools. The latter is implemented here, because - The branch type is valuable information. I don't see a case where you would not benefit from the branch type. (Stephane Eranian) - Not having the branch type DOES NOT save any space in the branch record (Stephane Eranian) - The Arch LBR HW can retrieve the common branch types from the LBR_INFO. It doesn't require the high overhead SW disassemble. 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/20220816125612.2042397-1-kan.liang@linux.intel.com arch/x86/events/intel/lbr.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 963a70bee5880640d0fd83ed29dc1e7ec0d2bd4a Merge: adb67b373a68 90d74fdbd805 Author: Linus Torvalds Date: Fri Aug 19 09:46:11 2022 -0700 Merge tag 'sound-6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "The only significant core change is ASoC DPCM fix for asymmetric setup; other remaining changes are device-specific fixes, including the hardening of string manipulations. One change in platform/x86 is the patch I forgot to apply from a series for CS35L41 codec" * tag 'sound-6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (21 commits) ALSA: hda/realtek: Add quirk for Clevo NS50PU, NS70PU ALSA: info: Fix llseek return value when using callback ALSA: hda/cs8409: Support new Dolphin Variants platform/x86: serial-multi-instantiate: Add CLSA0101 Laptop ALSA: hda/realtek: Add quirk for Lenovo Yoga7 14IAL7 ALSA: hda: cs35l41: Clarify support for CSC3551 without _DSD Properties ALSA: hda/realtek: Add quirks for ASUS Zenbooks using CS35L41 ASoC: codec: tlv320aic32x4: fix mono playback via I2S ASoC: rt5640: Fix the JD voltage dropping issue ASoC: tas2770: Fix handling of mute/unmute ASoC: tas2770: Drop conflicting set_bias_level power setting ASoC: tas2770: Allow mono streams ASoC: tas2770: Set correct FSYNC polarity ASoC: Intel: fix sof_es8336 probe ASoC: DPCM: Don't pick up BE without substream ASoC: SOF: ipc3-topology: Fix clang -Wformat warning ASoC: sh: rz-ssi: Improve error handling in rz_ssi_probe() error path ASoC: SOF: Intel: hda: Fix potential buffer overflow by snprintf() ASoC: SOF: debug: Fix potential buffer overflow by snprintf() ASoC: Intel: avs: Fix potential buffer overflow by snprintf() ... commit adb67b373a68b6ca4ea9225e248d726f0f5f0f8d Merge: a4ee891b7e91 b1fb6b87ed55 Author: Linus Torvalds Date: Fri Aug 19 09:39:32 2022 -0700 Merge tag 'drm-fixes-2022-08-19' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regular weekly fixes. The nouveau patch just enables modesetting on GA103 hw which is like other ampere cards that are already supported. amdgpu has 2 weeks of fixes, as Alex was away, so a bit larger than usual, otherwise some i915 and misc other fixes. ttm: - NULL ptr dereference i915: - disable pci resize on 32-bit systems - don't leak the ccs state - TLB invalidation fixes nouveau: - GA103 enablement - off-by-one fix amdgpu: - Revert some DML stack changes - Rounding fixes in KFD allocations - atombios vram info table parsing fix - DCN 3.1.4 fixes - Clockgating fixes for various new IPs - SMU 13.0.4 fixes - DCN 3.1.4 FP fixes - TMDS fixes for YCbCr420 4k modes - DCN 3.2.x fixes - USB 4 fixes - SMU 13.0 fixes - SMU driver unload memory leak fixes - Display orientation fix - Regression fix for generic fbdev conversion - SDMA 6.x fixes - SR-IOV fixes - IH 6.x fixes - Use after free fix in bo list handling - Revert pipe1 support - XGMI hive reset fix amdkfd: - Fix potential crach in kfd_create_indirect_link_prop() imx: - warning fix meson: - refcounting fix lvds-codec: - error check fix sun4i: - underflow fix - dt-binding fix" * tag 'drm-fixes-2022-08-19' of git://anongit.freedesktop.org/drm/drm: (109 commits) Revert "drm/amd/amdgpu: add pipe1 hardware support" drm/amdgpu: Fix use-after-free on amdgpu_bo_list mutex drm/amdgpu: Fix interrupt handling on ih_soft ring drm/amdgpu: Add secure display TA load for Renoir drm/amd/display: Include scaling factor for SubVP command drm/amdgpu/vcn: Return void from the stop_dbg_mode drm/amdgpu: remove useless condition in amdgpu_job_stop_all_jobs_on_sched() drm/amdgpu: Add decode_iv_ts helper for ih_v6 block drm/amd/display: add chip revision to DCN32 drm/amd/display: avoid doing vm_init multiple time drm/amd/display: Use pitch when calculating size to cache in MALL drm/amd/display: Don't set DSC for phantom pipes drm/amd/display: Update clock table policy for DCN314 drm/amd/display: Modify header inclusion pattern drm/amd/display: Fix plug/unplug external monitor will hang while playback MPO video drm/amd/display: Add debug parameter to retain default clock table drm/amdgpu: Increase tlb flush timeout for sriov drm/amd/display: do not compare integers of different widths drm/amd/display: Add reserved dc_log_type. drm/amd/display: Fix pixel clock programming ... commit a4ee891b7e918e5a005b43171f16ad5f8b3bc7d1 Merge: 88e0a74902f8 61b123ffceda Author: Linus Torvalds Date: Fri Aug 19 09:22:31 2022 -0700 Merge tag 'bitmap-6.0-rc2' of https://github.com/norov/linux Pull bitmap updates from Yury Norov: "cpumask: UP optimisation fixes follow-up As an older version of the UP optimisation fixes was merged, not all review feedback has been implemented. This implements the feedback received on the merged version [1], and the respin [2], for changes related to and lib/cpumask.c" Link: https://lore.kernel.org/lkml/cover.1656777646.git.sander@svanheule.net/ [1] Link: https://lore.kernel.org/lkml/cover.1659077534.git.sander@svanheule.net/ [2] It spent for more than a week with no issues. * tag 'bitmap-6.0-rc2' of https://github.com/norov/linux: lib/cpumask: drop always-true preprocessor guard lib/cpumask: add inline cpumask_next_wrap() for UP cpumask: align signatures of UP implementations commit 13609a8b3ac6b0af38127a2b97fe62c0d06a8282 Author: Wolfram Sang Date: Thu Aug 18 23:01:41 2022 +0200 cifs: move from strlcpy with unused retval to strscpy Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang Signed-off-by: Steve French fs/cifs/cifsroot.c | 2 +- fs/cifs/connect.c | 2 +- fs/cifs/smb2pdu.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit ca08d0eac020d48a3141dbec0a3cf64fbdb17cde Author: Zhang Xiaoxu Date: Thu Aug 18 21:50:44 2022 +0800 cifs: Fix memory leak on the deferred close xfstests on smb21 report kmemleak as below: unreferenced object 0xffff8881767d6200 (size 64): comm "xfs_io", pid 1284, jiffies 4294777434 (age 20.789s) hex dump (first 32 bytes): 80 5a d0 11 81 88 ff ff 78 8a aa 63 81 88 ff ff .Z......x..c.... 00 71 99 76 81 88 ff ff 00 00 00 00 00 00 00 00 .q.v............ backtrace: [<00000000ad04e6ea>] cifs_close+0x92/0x2c0 [<0000000028b93c82>] __fput+0xff/0x3f0 [<00000000d8116851>] task_work_run+0x85/0xc0 [<0000000027e14f9e>] do_exit+0x5e5/0x1240 [<00000000fb492b95>] do_group_exit+0x58/0xe0 [<00000000129a32d9>] __x64_sys_exit_group+0x28/0x30 [<00000000e3f7d8e9>] do_syscall_64+0x35/0x80 [<00000000102e8a0b>] entry_SYSCALL_64_after_hwframe+0x46/0xb0 When cancel the deferred close work, we should also cleanup the struct cifs_deferred_close. Fixes: 9e992755be8f2 ("cifs: Call close synchronously during unlink/rename/lease break.") Fixes: e3fc065682ebb ("cifs: Deferred close performance improvements") Cc: stable@vger.kernel.org Reviewed-by: Shyam Prasad N Signed-off-by: Zhang Xiaoxu Signed-off-by: Steve French fs/cifs/misc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 28526478ccae88680645405f4e849d9ed4fbce7f Author: Ian Rogers Date: Tue Jun 14 07:33:50 2022 -0700 perf cpumap: Compute mask size in constant time perf_cpu_map__max() computes the cpumap's maximum value, no need to iterate over all values. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Athira Jajeev Cc: Colin Ian King Cc: Dave Marchevsky Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: James Clark Cc: Kees Kook Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Song Liu Cc: Stephane Eranian Link: https://lore.kernel.org/r/20220614143353.1559597-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/synthetic-events.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 35ae6f09d8fd02add781e452a6d2ba6ea3a5482e Author: Ian Rogers Date: Tue Jun 14 07:33:49 2022 -0700 perf cpumap: Synthetic events and const/static Make the cpumap arguments const to make it clearer they are in rather than out arguments. Make two functions static and remove external declarations. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Athira Jajeev Cc: Colin Ian King Cc: Dave Marchevsky Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: James Clark Cc: Kees Kook Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Song Liu Cc: Stephane Eranian Link: https://lore.kernel.org/r/20220614143353.1559597-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.h | 4 ---- tools/perf/util/synthetic-events.c | 20 +++++++++++--------- tools/perf/util/synthetic-events.h | 2 +- 3 files changed, 12 insertions(+), 14 deletions(-) commit e989bc3d0f3f93aab7c5018affc3f87b74716b37 Author: Ian Rogers Date: Tue Jun 14 07:33:48 2022 -0700 perf cpumap: Const map for max() Allows max() to be used with 'const struct perf_cpu_maps *'. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Athira Jajeev Cc: Colin Ian King Cc: Dave Marchevsky Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: James Clark Cc: Kees Kook Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Song Liu Cc: Stephane Eranian Link: https://lore.kernel.org/r/20220614143353.1559597-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/perf/cpumap.c | 2 +- tools/lib/perf/include/perf/cpumap.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 88e0a74902f894fbbc55ad3ad2cb23b4bfba555c Author: Aaron Lu Date: Fri Aug 19 10:30:01 2022 +0800 x86/mm: Use proper mask when setting PUD mapping Commit c164fbb40c43f("x86/mm: thread pgprot_t through init_memory_mapping()") mistakenly used __pgprot() which doesn't respect __default_kernel_pte_mask when setting PUD mapping. Fix it by only setting the one bit we actually need (PSE) and leaving the other bits (that have been properly masked) alone. Fixes: c164fbb40c43 ("x86/mm: thread pgprot_t through init_memory_mapping()") Signed-off-by: Aaron Lu Cc: stable@kernel.org Signed-off-by: Linus Torvalds arch/x86/mm/init_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04d4ca41809052f6088860fe150dac679e6453d0 Author: Akira Yokosawa Date: Fri Aug 19 07:34:40 2022 +0900 docs/ja_JP/SubmittingPatches: Remove reference to submitting-drivers.rst Reflect changes made in commit 9db370de2780 ("docs: process: remove outdated submitting-drivers.rst") Reported-by: Mauro Carvalho Chehab Signed-off-by: Akira Yokosawa Fixes: 9db370de2780 ("docs: process: remove outdated submitting-drivers.rst") Cc: Tsugikazu Shibata Link: https://lore.kernel.org/r/20220818223440.13530-1-akiyks@gmail.com Signed-off-by: Jonathan Corbet Documentation/translations/ja_JP/SubmittingPatches | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3f4e432fb9c6357b4b9bce1def67d61a215029eb Author: Bartosz Golaszewski Date: Mon Aug 15 11:19:29 2022 +0200 gpio: pxa: use devres for the clock struct The clock is never released after probe(). Use devres to not leak resources. Reported-by: Hulk Robot Reported-by: Yuan Can Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij drivers/gpio/gpio-pxa.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 636c3982d296a560aabcc5e462c3a6408389ffd2 Author: Lukas Bulwahn Date: Tue Aug 16 09:39:52 2022 +0200 MAINTAINERS: rectify entry for XILINX GPIO DRIVER Commit ba96b2e7974b ("dt-bindings: gpio: gpio-xilinx: Convert Xilinx axi gpio binding to YAML") converts gpio-xilinx.txt to xlnx,gpio-xilinx.yaml, but missed to adjust its reference in MAINTAINERS. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Repair this file reference in XILINX GPIO DRIVER. Signed-off-by: Lukas Bulwahn Signed-off-by: Bartosz Golaszewski MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea2aa97ca37a9044ade001aef71dbc06318e8d44 Author: Jeffy Chen Date: Fri Aug 19 15:28:34 2022 +0800 drm/gem: Fix GEM handle release errors Currently we are assuming a one to one mapping between dmabuf and GEM handle when releasing GEM handles. But that is not always true, since we would create extra handles for the GEM obj in cases like gem_open() and getfb{,2}(). A similar issue was reported at: https://lore.kernel.org/all/20211105083308.392156-1-jay.xu@rock-chips.com/ Another problem is that the imported dmabuf might not always have gem_obj->dma_buf set, which would cause leaks in drm_gem_remove_prime_handles(). Let's fix these for now by using handle to find the exact map to remove. Signed-off-by: Jeffy Chen Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20220819072834.17888-1-jeffy.chen@rock-chips.com drivers/gpu/drm/drm_gem.c | 17 +---------------- drivers/gpu/drm/drm_internal.h | 4 ++-- drivers/gpu/drm/drm_prime.c | 20 ++++++++++++-------- 3 files changed, 15 insertions(+), 26 deletions(-) commit 372d07084593dc7a399bf9bee815711b1fb1bcf2 Author: David Matlack Date: Fri Jul 22 23:48:38 2022 +0000 KVM: selftests: Fix ambiguous mov in KVM_ASM_SAFE() Change the mov in KVM_ASM_SAFE() that zeroes @vector to a movb to make it unambiguous. This fixes a build failure with Clang since, unlike the GNU assembler, the LLVM integrated assembler rejects ambiguous X86 instructions that don't have suffixes: In file included from x86_64/hyperv_features.c:13: include/x86_64/processor.h:825:9: error: ambiguous instructions require an explicit suffix (could be 'movb', 'movw', 'movl', or 'movq') return kvm_asm_safe("wrmsr", "a"(val & -1u), "d"(val >> 32), "c"(msr)); ^ include/x86_64/processor.h:802:15: note: expanded from macro 'kvm_asm_safe' asm volatile(KVM_ASM_SAFE(insn) \ ^ include/x86_64/processor.h:788:16: note: expanded from macro 'KVM_ASM_SAFE' "1: " insn "\n\t" \ ^ :5:2: note: instantiated into assembly here mov $0, 15(%rsp) ^ It seems like this change could introduce undesirable behavior in the future, e.g. if someone used a type larger than a u8 for @vector, since KVM_ASM_SAFE() will only zero the bottom byte. I tried changing the type of @vector to an int to see what would happen. GCC failed to compile due to a size mismatch between `movb` and `%eax`. Clang succeeded in compiling, but the generated code looked correct, so perhaps it will not be an issue. That being said it seems like there could be a better solution to this issue that does not assume @vector is a u8. Fixes: 3b23054cd3f5 ("KVM: selftests: Add x86-64 support for exception fixup") Signed-off-by: David Matlack Reviewed-by: Sean Christopherson Message-Id: <20220722234838.2160385-3-dmatlack@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/x86_64/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67ef8664cc5b113f6c49b01d2a0e4cbc589623dd Author: David Matlack Date: Fri Jul 22 23:48:37 2022 +0000 KVM: selftests: Fix KVM_EXCEPTION_MAGIC build with Clang Change KVM_EXCEPTION_MAGIC to use the all-caps "ULL", rather than lower case. This fixes a build failure with Clang: In file included from x86_64/hyperv_features.c:13: include/x86_64/processor.h:825:9: error: unexpected token in argument list return kvm_asm_safe("wrmsr", "a"(val & -1u), "d"(val >> 32), "c"(msr)); ^ include/x86_64/processor.h:802:15: note: expanded from macro 'kvm_asm_safe' asm volatile(KVM_ASM_SAFE(insn) \ ^ include/x86_64/processor.h:785:2: note: expanded from macro 'KVM_ASM_SAFE' "mov $" __stringify(KVM_EXCEPTION_MAGIC) ", %%r9\n\t" \ ^ :1:18: note: instantiated into assembly here mov $0xabacadabaull, %r9 ^ Fixes: 3b23054cd3f5 ("KVM: selftests: Add x86-64 support for exception fixup") Signed-off-by: David Matlack Reviewed-by: Sean Christopherson Message-Id: <20220722234838.2160385-2-dmatlack@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/x86_64/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 020dac4187968535f089f83f376a72beb3451311 Author: Jim Mattson Date: Wed Aug 10 14:30:50 2022 -0700 KVM: VMX: Heed the 'msr' argument in msr_write_intercepted() Regardless of the 'msr' argument passed to the VMX version of msr_write_intercepted(), the function always checks to see if a specific MSR (IA32_SPEC_CTRL) is intercepted for write. This behavior seems unintentional and unexpected. Modify the function so that it checks to see if the provided 'msr' index is intercepted for write. Fixes: 67f4b9969c30 ("KVM: nVMX: Handle dynamic MSR intercept toggling") Cc: Sean Christopherson Signed-off-by: Jim Mattson Reviewed-by: Sean Christopherson Message-Id: <20220810213050.2655000-1-jmattson@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b64d740ea7ddc929d97b28de4c0665f7d5db9e2a Author: Junaid Shahid Date: Wed Aug 10 15:49:39 2022 -0700 kvm: x86: mmu: Always flush TLBs when enabling dirty logging When A/D bits are not available, KVM uses a software access tracking mechanism, which involves making the SPTEs inaccessible. However, the clear_young() MMU notifier does not flush TLBs. So it is possible that there may still be stale, potentially writable, TLB entries. This is usually fine, but can be problematic when enabling dirty logging, because it currently only does a TLB flush if any SPTEs were modified. But if all SPTEs are in access-tracked state, then there won't be a TLB flush, which means that the guest could still possibly write to memory and not have it reflected in the dirty bitmap. So just unconditionally flush the TLBs when enabling dirty logging. As an alternative, KVM could explicitly check the MMU-Writable bit when write-protecting SPTEs to decide if a flush is needed (instead of checking the Writable bit), but given that a flush almost always happens anyway, so just making it unconditional seems simpler. Signed-off-by: Junaid Shahid Message-Id: <20220810224939.2611160-1-junaids@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 45 +++++++-------------------------------------- arch/x86/kvm/mmu/spte.h | 14 ++++++++++---- arch/x86/kvm/x86.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 42 deletions(-) commit 1441ca1494d74a2c9d6c9bd8dd633d9ebff1daba Author: Junaid Shahid Date: Fri Jul 22 19:43:16 2022 -0700 kvm: x86: mmu: Drop the need_remote_flush() function This is only used by kvm_mmu_pte_write(), which no longer actually creates the new SPTE and instead just clears the old SPTE. So we just need to check if the old SPTE was shadow-present instead of calling need_remote_flush(). Hence we can drop this function. It was incomplete anyway as it didn't take access-tracking into account. This patch should not result in any functional change. Signed-off-by: Junaid Shahid Reviewed-by: David Matlack Reviewed-by: Sean Christopherson Message-Id: <20220723024316.2725328-1-junaids@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit 332924973725e8cdcc783c175f68cf7e162cb9e5 Author: Peter Zijlstra Date: Fri Aug 19 13:01:35 2022 +0200 x86/nospec: Fix i386 RSB stuffing Turns out that i386 doesn't unconditionally have LFENCE, as such the loop in __FILL_RETURN_BUFFER isn't actually speculation safe on such chips. Fixes: ba6e31af2be9 ("x86/speculation: Add LFENCE to RSB fill sequence") Reported-by: Ben Hutchings Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/Yv9tj9vbQ9nNlXoY@worktop.programming.kicks-ass.net arch/x86/include/asm/nospec-branch.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 4e3aa9238277597c6c7624f302d81a7b568b6f2d Author: Peter Zijlstra Date: Tue Aug 16 14:28:36 2022 +0200 x86/nospec: Unwreck the RSB stuffing Commit 2b1299322016 ("x86/speculation: Add RSB VM Exit protections") made a right mess of the RSB stuffing, rewrite the whole thing to not suck. Thanks to Andrew for the enlightening comment about Post-Barrier RSB things so we can make this code less magical. Cc: stable@vger.kernel.org Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/YvuNdDWoUZSBjYcm@worktop.programming.kicks-ass.net arch/x86/include/asm/nospec-branch.h | 80 ++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 41 deletions(-) commit 959d6c4ae238b28a163b1b3741fae05391227ad9 Merge: eceb6e1d5300 b10d86fb8e46 Author: Paolo Bonzini Date: Fri Aug 19 05:43:53 2022 -0400 Merge tag 'kvmarm-fixes-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.0, take #1 - Fix unexpected sign extension of KVM_ARM_DEVICE_ID_MASK - Tidy-up handling of AArch32 on asymmetric systems commit a8c67e27d9e3ed33afadbdf86bbd58e26e0c4357 Author: Chunfeng Yun Date: Fri Aug 19 16:10:27 2022 +0800 dt-bindings: usb: mtu3: add compatible for mt8188 Add a new compatible for mt8188 Acked-by: Krzysztof Kozlowski Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220819081027.32382-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml | 1 + 1 file changed, 1 insertion(+) commit a10bc71729b236fe36de0d8e4d35c959fd8dec3a Author: Thierry GUIBERT Date: Fri Aug 19 10:17:02 2022 +0200 USB: cdc-acm: Add Icom PMR F3400 support (0c26:0020) Supports for ICOM F3400 and ICOM F4400 PMR radios in CDC-ACM driver enabling the AT serial port. The Vendor Id is 0x0C26 The Product ID is 0x0020 Output of lsusb : Bus 001 Device 009: ID 0c26:0020 Prolific Technology Inc. ICOM Radio Couldn't open device, some information will be missing Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 2 Communications bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x0c26 Prolific Technology Inc. idProduct 0x0020 bcdDevice 0.00 iManufacturer 1 ICOM Inc. iProduct 2 ICOM Radio iSerial 3 *obfuscated* bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0030 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 0mA 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 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 12 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 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 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Signed-off-by: Thierry GUIBERT Cc: stable Link: https://lore.kernel.org/r/20220819081702.84118-1-thierry.guibert@croix-rouge.fr Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 3 +++ 1 file changed, 3 insertions(+) commit f511aef2ebe5377d4c263842f2e0c0b8e274e8e5 Author: Jing Leng Date: Wed Jul 20 18:48:15 2022 -0700 usb: gadget: f_uac2: fix superspeed transfer On page 362 of the USB3.2 specification ( https://usb.org/sites/default/files/usb_32_20210125.zip), The 'SuperSpeed Endpoint Companion Descriptor' shall only be returned by Enhanced SuperSpeed devices that are operating at Gen X speed. Each endpoint described in an interface is followed by a 'SuperSpeed Endpoint Companion Descriptor'. If users use SuperSpeed UDC, host can't recognize the device if endpoint doesn't have 'SuperSpeed Endpoint Companion Descriptor' followed. Currently in the uac2 driver code: 1. ss_epout_desc_comp follows ss_epout_desc; 2. ss_epin_fback_desc_comp follows ss_epin_fback_desc; 3. ss_epin_desc_comp follows ss_epin_desc; 4. Only ss_ep_int_desc endpoint doesn't have 'SuperSpeed Endpoint Companion Descriptor' followed, so we should add it. Fixes: eaf6cbe09920 ("usb: gadget: f_uac2: add volume and mute support") Cc: stable Signed-off-by: Jing Leng Signed-off-by: Jack Pham Link: https://lore.kernel.org/r/20220721014815.14453-1-quic_jackp@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_uac2.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit db7e5c10351e3dd58e6bef237c8fa74282e5d59e Author: Greg Kroah-Hartman Date: Fri Aug 19 10:55:54 2022 +0200 Revert "binder_alloc: Add missing mmap_lock calls when using the VMA" This reverts commit d6f35446d0769a98e9d761593d267cdd24f09ecd. It is coming in through Andrew's tree instead, and for some reason we have different versions. I trust the version from Andrew more as the original offending commit came through his tree. Fixes: d6f35446d076 ("binder_alloc: Add missing mmap_lock calls when using the VMA") Cc: stable Cc: Ondrej Mosnacek Cc: Ondrej Mosnacek Cc: Carlos Llamas Cc: Liam R. Howlett Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20220819184027.7b3fda3e@canb.auug.org.au Signed-off-by: Greg Kroah-Hartman drivers/android/binder_alloc.c | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) commit 6c939e28b192075e1d3b9b267100a3dd9d6a7cf7 Author: Kuldeep Singh Date: Sat Mar 12 17:08:52 2022 +0530 ARM: dts: versatile: Update spi clock-names property Now that spi pl022 binding only accept "sspclk" as clock name, versatile platform with "SSPCLK" clock name start raising dtbs_check warnings. Make necessary changes to update this property in order to make it compliant with binding. clock-names:0: 'sspclk' was expected Signed-off-by: Kuldeep Singh Link: https://lore.kernel.org/r/20220312113853.63446-4-singh.kuldeep87k@gmail.com Signed-off-by: Linus Walleij arch/arm/boot/dts/versatile-ab.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1aa156f2a82a91f7844ada7e576b716e64bec618 Author: Kuldeep Singh Date: Sat Mar 12 17:08:51 2022 +0530 ARM: dts: realview: Update spi clock-names property Now that spi pl022 binding only accept "sspclk" as clock name, realview platforms with "SSPCLK" clock name start raising dtbs_check warnings. Make necessary changes to update this property in order to make it compliant with binding. clock-names:0: 'sspclk' was expected Signed-off-by: Kuldeep Singh Link: https://lore.kernel.org/r/20220312113853.63446-3-singh.kuldeep87k@gmail.com Signed-off-by: Linus Walleij arch/arm/boot/dts/arm-realview-eb.dtsi | 2 +- arch/arm/boot/dts/arm-realview-pb1176.dts | 2 +- arch/arm/boot/dts/arm-realview-pb11mp.dts | 2 +- arch/arm/boot/dts/arm-realview-pbx.dtsi | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit ba35187559a05cad93dfbb7fbc65edf066ae511b Author: Kuldeep Singh Date: Sat Mar 12 17:08:50 2022 +0530 ARM: dts: integratorap: Update spi node properties As per spi pl022 binding, SPI clock name is "sspclk" and not "spiclk". Fix it. Also update ssp node name to enable spi bindings check. Signed-off-by: Kuldeep Singh Link: https://lore.kernel.org/r/20220312113853.63446-2-singh.kuldeep87k@gmail.com Signed-off-by: Linus Walleij arch/arm/boot/dts/integratorap-im-pd1.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6020f480004a80cdad4ae5ee180a231c4f65595b Author: Chunfeng Yun Date: Fri Aug 19 16:05:56 2022 +0800 usb: xhci-mtk: fix bandwidth release issue This happens when @udev->reset_resume is set to true, when usb resume, the flow as below: - hub_resume - usb_disable_interface - usb_disable_endpoint - usb_hcd_disable_endpoint - xhci_endpoint_disable // it set @ep->hcpriv to NULL Then when reset usb device, it will drop allocated endpoints, the flow as below: - usb_reset_and_verify_device - usb_hcd_alloc_bandwidth - xhci_mtk_drop_ep but @ep->hcpriv is already set to NULL, the bandwidth will be not released anymore. Due to the added endponts are stored in hash table, we can drop the check of @ep->hcpriv. Fixes: 4ce186665e7c ("usb: xhci-mtk: Do not use xhci's virt_dev in drop_endpoint") Cc: stable Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220819080556.32215-2-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk-sch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8b13ea05117ffad4727b0971ed09122d5c91c4dc Author: Chunfeng Yun Date: Fri Aug 19 16:05:55 2022 +0800 usb: xhci-mtk: relax TT periodic bandwidth allocation Currently uses the worst case byte budgets on FS/LS bus bandwidth, for example, for an isochronos IN endpoint with 192 bytes budget, it will consume the whole 5 uframes(188 * 5) while the actual FS bus budget should be just 192 bytes. It cause that many usb audio headsets with 3 interfaces (audio input, audio output, and HID) cannot be configured. To improve it, changes to use "approximate" best case budget for FS/LS bandwidth management. For the same endpoint from the above example, the approximate best case budget is now reduced to (188 * 2) bytes. Signed-off-by: Chunfeng Yun Cc: stable Link: https://lore.kernel.org/r/20220819080556.32215-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk-sch.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit eceb6e1d530046f964b0e371d4fad02a5b6b42d1 Author: Li kunyu Date: Fri Aug 19 10:15:35 2022 +0800 KVM: Drop unnecessary initialization of "ops" in kvm_ioctl_create_device() The variable is initialized but it is only used after its assignment. Reviewed-by: Sean Christopherson Signed-off-by: Li kunyu Message-Id: <20220819021535.483702-1-kunyu@nfschina.com> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2824913976a851f049bc8ab929b5c8d3b6ee269b Author: Li kunyu Date: Fri Aug 19 10:28:04 2022 +0800 KVM: Drop unnecessary initialization of "npages" in hva_to_pfn_slow() The variable is initialized but it is only used after its assignment. Reviewed-by: Sean Christopherson Signed-off-by: Li kunyu Message-Id: <20220819022804.483914-1-kunyu@nfschina.com> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d9606b0e0f3aed4dfb61d0853ebf432fead7bba Author: Josh Poimboeuf Date: Thu Aug 18 08:53:43 2022 -0700 x86/kvm: Fix "missing ENDBR" BUG for fastop functions The following BUG was reported: traps: Missing ENDBR: andw_ax_dx+0x0/0x10 [kvm] ------------[ cut here ]------------ kernel BUG at arch/x86/kernel/traps.c:253! invalid opcode: 0000 [#1] PREEMPT SMP NOPTI asm_exc_control_protection+0x2b/0x30 RIP: 0010:andw_ax_dx+0x0/0x10 [kvm] Code: c3 cc cc cc cc 0f 1f 44 00 00 66 0f 1f 00 48 19 d0 c3 cc cc cc cc 0f 1f 40 00 f3 0f 1e fa 20 d0 c3 cc cc cc cc 0f 1f 44 00 00 <66> 0f 1f 00 66 21 d0 c3 cc cc cc cc 0f 1f 40 00 66 0f 1f 00 21 d0 ? andb_al_dl+0x10/0x10 [kvm] ? fastop+0x5d/0xa0 [kvm] x86_emulate_insn+0x822/0x1060 [kvm] x86_emulate_instruction+0x46f/0x750 [kvm] complete_emulated_mmio+0x216/0x2c0 [kvm] kvm_arch_vcpu_ioctl_run+0x604/0x650 [kvm] kvm_vcpu_ioctl+0x2f4/0x6b0 [kvm] ? wake_up_q+0xa0/0xa0 The BUG occurred because the ENDBR in the andw_ax_dx() fastop function had been incorrectly "sealed" (converted to a NOP) by apply_ibt_endbr(). Objtool marked it to be sealed because KVM has no compile-time references to the function. Instead KVM calculates its address at runtime. Prevent objtool from annotating fastop functions as sealable by creating throwaway dummy compile-time references to the functions. Fixes: 6649fa876da4 ("x86/ibt,kvm: Add ENDBR to fastops") Reported-by: Pengfei Xu Debugged-by: Peter Zijlstra Signed-off-by: Josh Poimboeuf Message-Id: <0d4116f90e9d0c1b754bb90c585e6f0415a1c508.1660837839.git.jpoimboe@kernel.org> Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 22472d12606c1dd3e92312f7329734e489b371ff Author: Josh Poimboeuf Date: Thu Aug 18 08:53:42 2022 -0700 x86/kvm: Simplify FOP_SETCC() SETCC_ALIGN and FOP_ALIGN are both 16. Remove the special casing for FOP_SETCC() and just make it a normal fastop. Signed-off-by: Josh Poimboeuf Message-Id: <7c13d94d1a775156f7e36eed30509b274a229140.1660837839.git.jpoimboe@kernel.org> Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) commit e27e5bea956ce4d3eb15112de5fa5a3b77c2f488 Author: Josh Poimboeuf Date: Thu Aug 18 14:39:27 2022 -0700 x86/ibt, objtool: Add IBT_NOSEAL() Add a macro which prevents a function from getting sealed if there are no compile-time references to it. Signed-off-by: Josh Poimboeuf Message-Id: <20220818213927.e44fmxkoq4yj6ybn@treble> Signed-off-by: Paolo Bonzini arch/x86/include/asm/ibt.h | 11 +++++++++++ tools/objtool/check.c | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) commit 20ec3ebd707c77fb9b11b37193449193d4649f33 Author: Chao Peng Date: Tue Aug 16 20:53:22 2022 +0800 KVM: Rename mmu_notifier_* to mmu_invalidate_* The motivation of this renaming is to make these variables and related helper functions less mmu_notifier bound and can also be used for non mmu_notifier based page invalidation. mmu_invalidate_* was chosen to better describe the purpose of 'invalidating' a page that those variables are used for. - mmu_notifier_seq/range_start/range_end are renamed to mmu_invalidate_seq/range_start/range_end. - mmu_notifier_retry{_hva} helper functions are renamed to mmu_invalidate_retry{_hva}. - mmu_notifier_count is renamed to mmu_invalidate_in_progress to avoid confusion with mn_active_invalidate_count. - While here, also update kvm_inc/dec_notifier_count() to kvm_mmu_invalidate_begin/end() to match the change for mmu_notifier_count. No functional change intended. Signed-off-by: Chao Peng Message-Id: <20220816125322.1110439-3-chao.p.peng@linux.intel.com> Signed-off-by: Paolo Bonzini arch/arm64/kvm/mmu.c | 8 ++--- arch/mips/kvm/mmu.c | 12 +++---- arch/powerpc/include/asm/kvm_book3s_64.h | 2 +- arch/powerpc/kvm/book3s_64_mmu_host.c | 4 +-- arch/powerpc/kvm/book3s_64_mmu_hv.c | 4 +-- arch/powerpc/kvm/book3s_64_mmu_radix.c | 6 ++-- arch/powerpc/kvm/book3s_hv_nested.c | 2 +- arch/powerpc/kvm/book3s_hv_rm_mmu.c | 8 ++--- arch/powerpc/kvm/e500_mmu_host.c | 4 +-- arch/riscv/kvm/mmu.c | 4 +-- arch/x86/kvm/mmu/mmu.c | 14 ++++---- arch/x86/kvm/mmu/paging_tmpl.h | 4 +-- include/linux/kvm_host.h | 60 +++++++++++++++++--------------- virt/kvm/kvm_main.c | 52 ++++++++++++++------------- virt/kvm/pfncache.c | 17 ++++----- 15 files changed, 103 insertions(+), 98 deletions(-) commit bdd1c37a315bc50ab14066c4852bc8dcf070451e Author: Chao Peng Date: Tue Aug 16 20:53:21 2022 +0800 KVM: Rename KVM_PRIVATE_MEM_SLOTS to KVM_INTERNAL_MEM_SLOTS KVM_INTERNAL_MEM_SLOTS better reflects the fact those slots are KVM internally used (invisible to userspace) and avoids confusion to future private slots that can have different meaning. Signed-off-by: Chao Peng Message-Id: <20220816125322.1110439-2-chao.p.peng@linux.intel.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 +- include/linux/kvm_host.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit b075450868dbc0950f0942617f222eeb989cad10 Author: Paolo Bonzini Date: Fri Aug 19 04:04:28 2022 -0400 KVM: MIPS: remove unnecessary definition of KVM_PRIVATE_MEM_SLOTS KVM_PRIVATE_MEM_SLOTS defaults to zero, so it is not necessary to define it in MIPS's asm/kvm_host.h. Signed-off-by: Paolo Bonzini arch/mips/include/asm/kvm_host.h | 2 -- 1 file changed, 2 deletions(-) commit c2b823970192882fe033d0d9f919003747d3e26f Author: Sean Christopherson Date: Tue Aug 16 05:39:37 2022 +0000 KVM: Move coalesced MMIO initialization (back) into kvm_create_vm() Invoke kvm_coalesced_mmio_init() from kvm_create_vm() now that allocating and initializing coalesced MMIO objects is separate from registering any associated devices. Moving coalesced MMIO cleans up the last oddity where KVM does VM creation/initialization after kvm_create_vm(), and more importantly after kvm_arch_post_init_vm() is called and the VM is added to the global vm_list, i.e. after the VM is fully created as far as KVM is concerned. Originally, kvm_coalesced_mmio_init() was called by kvm_create_vm(), but the original implementation was completely devoid of error handling. Commit 6ce5a090a9a0 ("KVM: coalesced_mmio: fix kvm_coalesced_mmio_init()'s error handling" fixed the various bugs, and in doing so rightly moved the call to after kvm_create_vm() because kvm_coalesced_mmio_init() also registered the coalesced MMIO device. Commit 2b3c246a682c ("KVM: Make coalesced mmio use a device per zone") cleaned up that mess by having each zone register a separate device, i.e. moved device registration to its logical home in kvm_vm_ioctl_register_coalesced_mmio(). As a result, kvm_coalesced_mmio_init() is now a "pure" initialization helper and can be safely called from kvm_create_vm(). Opportunstically drop the #ifdef, KVM provides stubs for kvm_coalesced_mmio_{init,free}() when CONFIG_KVM_MMIO=n (s390). Signed-off-by: Sean Christopherson Message-Id: <20220816053937.2477106-4-seanjc@google.com> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 405294f29faee5de8c10cb9d4a90e229c2835279 Author: Sean Christopherson Date: Tue Aug 16 05:39:36 2022 +0000 KVM: Unconditionally get a ref to /dev/kvm module when creating a VM Unconditionally get a reference to the /dev/kvm module when creating a VM instead of using try_get_module(), which will fail if the module is in the process of being forcefully unloaded. The error handling when try_get_module() fails doesn't properly unwind all that has been done, e.g. doesn't call kvm_arch_pre_destroy_vm() and doesn't remove the VM from the global list. Not removing VMs from the global list tends to be fatal, e.g. leads to use-after-free explosions. The obvious alternative would be to add proper unwinding, but the justification for using try_get_module(), "rmmod --wait", is completely bogus as support for "rmmod --wait", i.e. delete_module() without O_NONBLOCK, was removed by commit 3f2b9c9cdf38 ("module: remove rmmod --wait option.") nearly a decade ago. It's still possible for try_get_module() to fail due to the module dying (more like being killed), as the module will be tagged MODULE_STATE_GOING by "rmmod --force", i.e. delete_module(..., O_TRUNC), but playing nice with forced unloading is an exercise in futility and gives a falsea sense of security. Using try_get_module() only prevents acquiring _new_ references, it doesn't magically put the references held by other VMs, and forced unloading doesn't wait, i.e. "rmmod --force" on KVM is all but guaranteed to cause spectacular fireworks; the window where KVM will fail try_get_module() is tiny compared to the window where KVM is building and running the VM with an elevated module refcount. Addressing KVM's inability to play nice with "rmmod --force" is firmly out-of-scope. Forcefully unloading any module taints kernel (for obvious reasons) _and_ requires the kernel to be built with CONFIG_MODULE_FORCE_UNLOAD=y, which is off by default and comes with the amusing disclaimer that it's "mainly for kernel developers and desperate users". In other words, KVM is free to scoff at bug reports due to using "rmmod --force" while VMs may be running. Fixes: 5f6de5cbebee ("KVM: Prevent module exit until all VMs are freed") Cc: stable@vger.kernel.org Cc: David Matlack Signed-off-by: Sean Christopherson Message-Id: <20220816053937.2477106-3-seanjc@google.com> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 4ba4f41942745f1906c06868a4acc6c926463f53 Author: Sean Christopherson Date: Tue Aug 16 05:39:35 2022 +0000 KVM: Properly unwind VM creation if creating debugfs fails Properly unwind VM creation if kvm_create_vm_debugfs() fails. A recent change to invoke kvm_create_vm_debug() in kvm_create_vm() was led astray by buggy try_get_module() handling adding by commit 5f6de5cbebee ("KVM: Prevent module exit until all VMs are freed"). The debugfs error path effectively inherits the bad error path of try_module_get(), e.g. KVM leaves the to-be-free VM on vm_list even though KVM appears to do the right thing by calling module_put() and falling through. Opportunistically hoist kvm_create_vm_debugfs() above the call to kvm_arch_post_init_vm() so that the "post-init" arch hook is actually invoked after the VM is initialized (ignoring kvm_coalesced_mmio_init() for the moment). x86 is the only non-nop implementation of the post-init hook, and it doesn't allocate/initialize any objects that are reachable via debugfs code (spawns a kthread worker for the NX huge page mitigation). Leave the buggy try_get_module() alone for now, it will be fixed in a separate commit. Fixes: b74ed7a68ec1 ("KVM: Actually create debugfs in kvm_create_vm()") Reported-by: syzbot+744e173caec2e1627ee0@syzkaller.appspotmail.com Cc: Oliver Upton Signed-off-by: Sean Christopherson Reviewed-by: Oliver Upton Message-Id: <20220816053937.2477106-2-seanjc@google.com> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 4c2d0b039c5cc0112206a5b22431b577cb1c57ad Merge: 90b6b686c1e0 f4693b81ea38 Author: Linus Torvalds Date: Thu Aug 18 19:37:15 2022 -0700 Merge tag 'net-6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from netfilter. Current release - regressions: - tcp: fix cleanup and leaks in tcp_read_skb() (the new way BPF socket maps get data out of the TCP stack) - tls: rx: react to strparser initialization errors - netfilter: nf_tables: fix scheduling-while-atomic splat - net: fix suspicious RCU usage in bpf_sk_reuseport_detach() Current release - new code bugs: - mlxsw: ptp: fix a couple of races, static checker warnings and error handling Previous releases - regressions: - netfilter: - nf_tables: fix possible module reference underflow in error path - make conntrack helpers deal with BIG TCP (skbs > 64kB) - nfnetlink: re-enable conntrack expectation events - net: fix potential refcount leak in ndisc_router_discovery() Previous releases - always broken: - sched: cls_route: disallow handle of 0 - neigh: fix possible local DoS due to net iface start/stop loop - rtnetlink: fix module refcount leak in rtnetlink_rcv_msg - sched: fix adding qlen to qcpu->backlog in gnet_stats_add_queue_cpu - virtio_net: fix endian-ness for RSS - dsa: mv88e6060: prevent crash on an unused port - fec: fix timer capture timing in `fec_ptp_enable_pps()` - ocelot: stats: fix races, integer wrapping and reading incorrect registers (the change of register definitions here accounts for bulk of the changed LoC in this PR)" * tag 'net-6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (77 commits) net: moxa: MAC address reading, generating, validity checking tcp: handle pure FIN case correctly tcp: refactor tcp_read_skb() a bit tcp: fix tcp_cleanup_rbuf() for tcp_read_skb() tcp: fix sock skb accounting in tcp_read_skb() igb: Add lock to avoid data race dt-bindings: Fix incorrect "the the" corrections net: genl: fix error path memory leak in policy dumping stmmac: intel: Add a missing clk_disable_unprepare() call in intel_eth_pci_remove() net: ethernet: mtk_eth_soc: fix possible NULL pointer dereference in mtk_xdp_run net/mlx5e: Allocate flow steering storage during uplink initialization net: mscc: ocelot: report ndo_get_stats64 from the wraparound-resistant ocelot->stats net: mscc: ocelot: keep ocelot_stat_layout by reg address, not offset net: mscc: ocelot: make struct ocelot_stat_layout array indexable net: mscc: ocelot: fix race between ndo_get_stats64 and ocelot_check_stats_work net: mscc: ocelot: turn stats_lock into a spinlock net: mscc: ocelot: fix address of SYS_COUNT_TX_AGING counter net: mscc: ocelot: fix incorrect ndo_get_stats64 packet counters net: dsa: felix: fix ethtool 256-511 and 512-1023 TX packet counters net: dsa: don't warn in dsa_port_set_state_now() when driver doesn't support it ... commit 90b6b686c1e0273ce6d1724fab9b9651a276217e Merge: 0de277d44e5b f1227dc7d041 Author: Linus Torvalds Date: Thu Aug 18 19:24:57 2022 -0700 Merge tag 'linux-kselftest-next-6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fix from Shuah Khan: - fix landlock test build regression * tag 'linux-kselftest-next-6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/landlock: fix broken include of linux/landlock.h commit 0de277d44e5b2c4dc823baf0236864ebb0658191 Merge: 573ae4f13f63 20aec89aac77 Author: Linus Torvalds Date: Thu Aug 18 19:18:28 2022 -0700 Merge tag 'trace-rtla-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull rtla tool fixes from Steven Rostedt: "Fixes for the Real-Time Linux Analysis tooling: - Fix tracer name in comments and prints - Fix setting up symlinks - Allow extra flags to be set in build - Consolidate and show all necessary libraries not found in build error" * tag 'trace-rtla-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: rtla: Consolidate and show all necessary libraries that failed for building tools/rtla: Build with EXTRA_{C,LD}FLAGS tools/rtla: Fix command symlinks rtla: Fix tracer name commit b1fb6b87ed55ced458b322ea10cf0d0ab151e01b Merge: 2ae6ab9d82cd 085292c3d780 Author: Dave Airlie Date: Fri Aug 19 09:45:21 2022 +1000 Merge tag 'amd-drm-fixes-6.0-2022-08-17' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.0-2022-08-17: amdgpu: - Revert some DML stack changes - Rounding fixes in KFD allocations - atombios vram info table parsing fix - DCN 3.1.4 fixes - Clockgating fixes for various new IPs - SMU 13.0.4 fixes - DCN 3.1.4 FP fixes - TMDS fixes for YCbCr420 4k modes - DCN 3.2.x fixes - USB 4 fixes - SMU 13.0 fixes - SMU driver unload memory leak fixes - Display orientation fix - Regression fix for generic fbdev conversion - SDMA 6.x fixes - SR-IOV fixes - IH 6.x fixes - Use after free fix in bo list handling - Revert pipe1 support - XGMI hive reset fix amdkfd: - Fix potential crach in kfd_create_indirect_link_prop() Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20220818025206.6463-1-alexander.deucher@amd.com commit d951b20b9def73dcc39a5379831525d0d2a537e9 Author: Conor Dooley Date: Sun Aug 14 15:12:38 2022 +0100 riscv: traps: add missing prototype Sparse complains: arch/riscv/kernel/traps.c:213:6: warning: symbol 'shadow_stack' was not declared. Should it be static? The variable is used in entry.S, so declare shadow_stack there alongside SHADOW_OVERFLOW_STACK_SIZE. Fixes: 31da94c25aea ("riscv: add VMAP_STACK overflow detection") Signed-off-by: Conor Dooley Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220814141237.493457-5-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/thread_info.h | 2 ++ arch/riscv/kernel/traps.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit b5c3aca86d2698c4850b6ee8b341938025d2780c Author: Conor Dooley Date: Sun Aug 14 15:12:37 2022 +0100 riscv: signal: fix missing prototype warning Fix the warning: arch/riscv/kernel/signal.c:316:27: warning: no previous prototype for function 'do_notify_resume' [-Wmissing-prototypes] asmlinkage __visible void do_notify_resume(struct pt_regs *regs, All other functions in the file are static & none of the existing headers stood out as an obvious location. Create signal.h to hold the declaration. Fixes: e2c0cdfba7f6 ("RISC-V: User-facing API") Signed-off-by: Conor Dooley Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220814141237.493457-4-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/signal.h | 12 ++++++++++++ arch/riscv/kernel/signal.c | 1 + 2 files changed, 13 insertions(+) commit 7d6620f107bae6ed687ff07668e8e8f855487aa9 Author: Pu Lehui Date: Sat Aug 13 21:40:30 2022 +0800 bpf, cgroup: Fix kernel BUG in purge_effective_progs Syzkaller reported a triggered kernel BUG as follows: ------------[ cut here ]------------ kernel BUG at kernel/bpf/cgroup.c:925! invalid opcode: 0000 [#1] PREEMPT SMP NOPTI CPU: 1 PID: 194 Comm: detach Not tainted 5.19.0-14184-g69dac8e431af #8 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 RIP: 0010:__cgroup_bpf_detach+0x1f2/0x2a0 Code: 00 e8 92 60 30 00 84 c0 75 d8 4c 89 e0 31 f6 85 f6 74 19 42 f6 84 28 48 05 00 00 02 75 0e 48 8b 80 c0 00 00 00 48 85 c0 75 e5 <0f> 0b 48 8b 0c5 RSP: 0018:ffffc9000055bdb0 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffff888100ec0800 RCX: ffffc900000f1000 RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff888100ec4578 RBP: 0000000000000000 R08: ffff888100ec0800 R09: 0000000000000040 R10: 0000000000000000 R11: 0000000000000000 R12: ffff888100ec4000 R13: 000000000000000d R14: ffffc90000199000 R15: ffff888100effb00 FS: 00007f68213d2b80(0000) GS:ffff88813bc80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055f74a0e5850 CR3: 0000000102836000 CR4: 00000000000006e0 Call Trace: cgroup_bpf_prog_detach+0xcc/0x100 __sys_bpf+0x2273/0x2a00 __x64_sys_bpf+0x17/0x20 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f68214dbcb9 Code: 08 44 89 e0 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff8 RSP: 002b:00007ffeb487db68 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 000000000000000b RCX: 00007f68214dbcb9 RDX: 0000000000000090 RSI: 00007ffeb487db70 RDI: 0000000000000009 RBP: 0000000000000003 R08: 0000000000000012 R09: 0000000b00000003 R10: 00007ffeb487db70 R11: 0000000000000246 R12: 00007ffeb487dc20 R13: 0000000000000004 R14: 0000000000000001 R15: 000055f74a1011b0 Modules linked in: ---[ end trace 0000000000000000 ]--- Repetition steps: For the following cgroup tree, root | cg1 | cg2 1. attach prog2 to cg2, and then attach prog1 to cg1, both bpf progs attach type is NONE or OVERRIDE. 2. write 1 to /proc/thread-self/fail-nth for failslab. 3. detach prog1 for cg1, and then kernel BUG occur. Failslab injection will cause kmalloc fail and fall back to purge_effective_progs. The problem is that cg2 have attached another prog, so when go through cg2 layer, iteration will add pos to 1, and subsequent operations will be skipped by the following condition, and cg will meet NULL in the end. `if (pos && !(cg->bpf.flags[atype] & BPF_F_ALLOW_MULTI))` The NULL cg means no link or prog match, this is as expected, and it's not a bug. So here just skip the no match situation. Fixes: 4c46091ee985 ("bpf: Fix KASAN use-after-free Read in compute_effective_progs") Signed-off-by: Pu Lehui Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220813134030.1972696-1-pulehui@huawei.com kernel/bpf/cgroup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 96264230a6817bcd4a7ae0fc30c60bfb46499f68 Author: Conor Dooley Date: Fri Aug 12 15:35:32 2022 +0100 perf: riscv legacy: fix kerneldoc comment warning Fix the warning: drivers/perf/riscv_pmu_legacy.c:76: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Fixes: 9b3e150e310e ("RISC-V: Add a simple platform driver for RISC-V legacy perf") Signed-off-by: Conor Dooley Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220812143532.1962623-1-conor.dooley@microchip.com Signed-off-by: Palmer Dabbelt drivers/perf/riscv_pmu_legacy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1e5c2f0cb8a22ec2e14af92afc7006491bebabb Author: Pablo Sun Date: Thu Aug 4 11:48:03 2022 +0800 usb: typec: altmodes/displayport: correct pin assignment for UFP receptacles Fix incorrect pin assignment values when connecting to a monitor with Type-C receptacle instead of a plug. According to specification, an UFP_D receptacle's pin assignment should came from the UFP_D pin assignments field (bit 23:16), while an UFP_D plug's assignments are described in the DFP_D pin assignments (bit 15:8) during Mode Discovery. For example the LG 27 UL850-W is a monitor with Type-C receptacle. The monitor responds to MODE DISCOVERY command with following DisplayPort Capability flag: dp->alt->vdo=0x140045 The existing logic only take cares of UPF_D plug case, and would take the bit 15:8 for this 0x140045 case. This results in an non-existing pin assignment 0x0 in dp_altmode_configure. To fix this problem a new set of macros are introduced to take plug/receptacle differences into consideration. Fixes: 0e3bb7d6894d ("usb: typec: Add driver for DisplayPort alternate mode") Cc: stable@vger.kernel.org Co-developed-by: Pablo Sun Co-developed-by: Macpaul Lin Reviewed-by: Guillaume Ranquet Reviewed-by: Heikki Krogerus Signed-off-by: Pablo Sun Signed-off-by: Macpaul Lin Link: https://lore.kernel.org/r/20220804034803.19486-1-macpaul.lin@mediatek.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/altmodes/displayport.c | 4 ++-- include/linux/usb/typec_dp.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit 7ec9fce4b31604f8415136a4c07f7dc8ad431aec Author: Eyal Birger Date: Thu Aug 18 10:41:18 2022 +0300 ip_tunnel: Respect tunnel key's "flow_flags" in IP tunnels Commit 451ef36bd229 ("ip_tunnels: Add new flow flags field to ip_tunnel_key") added a "flow_flags" member to struct ip_tunnel_key which was later used by the commit in the fixes tag to avoid dropping packets with sources that aren't locally configured when set in bpf_set_tunnel_key(). VXLAN and GENEVE were made to respect this flag, ip tunnels like IPIP and GRE were not. This commit fixes this omission by making ip_tunnel_init_flow() receive the flow flags from the tunnel key in the relevant collect_md paths. Fixes: b8fff748521c ("bpf: Set flow flag to allow any source IP in bpf_tunnel_key") Signed-off-by: Eyal Birger Signed-off-by: Daniel Borkmann Reviewed-by: Paul Chaignon Link: https://lore.kernel.org/bpf/20220818074118.726639-1-eyal.birger@gmail.com drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c | 3 ++- include/net/ip_tunnels.h | 4 +++- net/ipv4/ip_gre.c | 2 +- net/ipv4/ip_tunnel.c | 7 ++++--- 4 files changed, 10 insertions(+), 6 deletions(-) commit 1bcafc0498038a5a2ce5a9b888c39f1c32242cec Author: Matthias Kaehlcke Date: Fri Aug 5 11:19:31 2022 -0700 usb: misc: onboard_usb_hub: Drop reset delay in onboard_hub_power_off() onboard_hub_power_off() currently has a delay after asserting the reset of the hub. There is already a delay in onboard_hub_power_on() before de-asserting the reset, which ensures that the reset is asserted for the required time, so the delay in _power_off() is not needed. Skip the reset GPIO check before calling gpiod_set_value_cansleep(), the function returns early when the GPIO descriptor is NULL. Reviewed-By: Alexander Stein Reviewed-by: Douglas Anderson Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20220805111836.1.Id5a4dc0a2c046236116693aa55672295513a0f2a@changeid Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/onboard_usb_hub.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 040f2dbd2010c43f33ad27249e6dac48456f4d99 Author: Wesley Cheng Date: Wed Jul 27 19:06:47 2022 -0700 usb: dwc3: gadget: Avoid duplicate requests to enable Run/Stop Relocate the pullups_connected check until after it is ensured that there are no runtime PM transitions. If another context triggered the DWC3 core's runtime resume, it may have already enabled the Run/Stop. Do not re-run the entire pullup sequence again, as it may issue a core soft reset while Run/Stop is already set. This patch depends on commit 69e131d1ac4e ("usb: dwc3: gadget: Prevent repeat pullup()") Fixes: 77adb8bdf422 ("usb: dwc3: gadget: Allow runtime suspend if UDC unbinded") Cc: stable Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/20220728020647.9377-1-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/gadget.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit bad0d1d726ace2db9e0f39c62b173bc7cc43dd6a Author: Heikki Krogerus Date: Mon Aug 15 15:33:34 2022 +0300 usb: dwc3: pci: Add support for Intel Raptor Lake This adds the necessary PCI device ID for the controller inside the Intel Raptor Lake CPU block. The controllers that are part of the PCH (chipset) have separate device IDs. Cc: stable@vger.kernel.org Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20220815123334.87526-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/dwc3-pci.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1b1b672cc1d4fb3065dac79efb8901bd6244ef69 Author: Utkarsh Patel Date: Tue Aug 16 13:16:24 2022 +0300 usb: typec: intel_pmc_mux: Add new ACPI ID for Meteor Lake IOM device This adds the necessary ACPI ID for Intel Meteor Lake IOM devices. The callback function is_memory() is modified so that it also checks if the resource descriptor passed to it is a memory type "Address Space Resource Descriptor". On Intel Meteor Lake the ACPI memory resource is not described using the "32-bit Memory Range Descriptor" because the memory is outside of the 32-bit address space. The memory resource is described using the "Address Space Resource Descriptor" instead. Intel Meteor Lake is the first platform to describe the memory resource for this device with Address Space Resource Descriptor, but it most likely will not be the last. Therefore the change to the is_memory() callback function is made generic. Signed-off-by: Utkarsh Patel Cc: stable@vger.kernel.org [ heikki: Rewrote the commit message. ] Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20220816101629.69054-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/mux/intel_pmc_mux.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit f4693b81ea3802d2c28c868e1639e580d0da2d1f Author: Sergei Antonov Date: Thu Aug 18 12:23:17 2022 +0300 net: moxa: MAC address reading, generating, validity checking This device does not remember its MAC address, so add a possibility to get it from the platform. If it fails, generate a random address. This will provide a MAC address early during boot without user space being involved. Also remove extra calls to is_valid_ether_addr(). Made after suggestions by Andrew Lunn: 1) Use eth_hw_addr_random() to assign a random MAC address during probe. 2) Remove is_valid_ether_addr() from moxart_mac_open() 3) Add a call to platform_get_ethdev_address() during probe 4) Remove is_valid_ether_addr() from moxart_set_mac_address(). The core does this v1 -> v2: Handle EPROBE_DEFER returned from platform_get_ethdev_address(). Move MAC reading code to the beginning of the probe function. Signed-off-by: Sergei Antonov Suggested-by: Andrew Lunn CC: Yang Yingliang CC: Pavel Skripkin CC: Guobin Huang CC: Yang Wei CC: Christophe JAILLET Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220818092317.529557-1-saproj@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/moxa/moxart_ether.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 267ef48e06ca3fa3a2e6381e7b20475265c2dfce Merge: 6faee3d4ee8b 2e23acd99efa Author: Jakub Kicinski Date: Thu Aug 18 11:04:58 2022 -0700 Merge branch 'tcp-some-bug-fixes-for-tcp_read_skb' Cong Wang says: ==================== tcp: some bug fixes for tcp_read_skb() This patchset contains 3 bug fixes and 1 minor refactor patch for tcp_read_skb(). V1 only had the first patch, as Eric prefers to fix all of them together, I have to group them together. ==================== Link: https://lore.kernel.org/r/20220817195445.151609-1-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski commit 2e23acd99efacfd2a63cb9725afbc65e4e964fb7 Author: Cong Wang Date: Wed Aug 17 12:54:45 2022 -0700 tcp: handle pure FIN case correctly When skb->len==0, the recv_actor() returns 0 too, but we also use 0 for error conditions. This patch amends this by propagating the errors to tcp_read_skb() so that we can distinguish skb->len==0 case from error cases. Fixes: 04919bed948d ("tcp: Introduce tcp_read_skb()") Reported-by: Eric Dumazet Cc: John Fastabend Cc: Jakub Sitnicki Signed-off-by: Cong Wang Signed-off-by: Jakub Kicinski net/core/skmsg.c | 5 +++-- net/ipv4/tcp.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit a8688821f3854f37fe0198b8945f9cfc051ab2cf Author: Cong Wang Date: Wed Aug 17 12:54:44 2022 -0700 tcp: refactor tcp_read_skb() a bit As tcp_read_skb() only reads one skb at a time, the while loop is unnecessary, we can turn it into an if. This also simplifies the code logic. Cc: Eric Dumazet Cc: John Fastabend Cc: Jakub Sitnicki Signed-off-by: Cong Wang Signed-off-by: Jakub Kicinski net/ipv4/tcp.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) commit c457985aaa92e1fda2ce837cabf90bf687b92dcb Author: Cong Wang Date: Wed Aug 17 12:54:43 2022 -0700 tcp: fix tcp_cleanup_rbuf() for tcp_read_skb() tcp_cleanup_rbuf() retrieves the skb from sk_receive_queue, it assumes the skb is not yet dequeued. This is no longer true for tcp_read_skb() case where we dequeue the skb first. Fix this by introducing a helper __tcp_cleanup_rbuf() which does not require any skb and calling it in tcp_read_skb(). Fixes: 04919bed948d ("tcp: Introduce tcp_read_skb()") Cc: Eric Dumazet Cc: John Fastabend Cc: Jakub Sitnicki Signed-off-by: Cong Wang Signed-off-by: Jakub Kicinski net/ipv4/tcp.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit e9c6e79760265f019cde39d3f2c443dfbc1395b0 Author: Cong Wang Date: Wed Aug 17 12:54:42 2022 -0700 tcp: fix sock skb accounting in tcp_read_skb() Before commit 965b57b469a5 ("net: Introduce a new proto_ops ->read_skb()"), skb was not dequeued from receive queue hence when we close TCP socket skb can be just flushed synchronously. After this commit, we have to uncharge skb immediately after being dequeued, otherwise it is still charged in the original sock. And we still need to retain skb->sk, as eBPF programs may extract sock information from skb->sk. Therefore, we have to call skb_set_owner_sk_safe() here. Fixes: 965b57b469a5 ("net: Introduce a new proto_ops ->read_skb()") Reported-and-tested-by: syzbot+a0e6f8738b58f7654417@syzkaller.appspotmail.com Tested-by: Stanislav Fomichev Cc: Eric Dumazet Cc: John Fastabend Cc: Jakub Sitnicki Signed-off-by: Cong Wang Signed-off-by: Jakub Kicinski net/ipv4/tcp.c | 1 + 1 file changed, 1 insertion(+) commit 6faee3d4ee8be0f0367d0c3d826afb3571b7a5e0 Author: Lin Ma Date: Wed Aug 17 11:49:21 2022 -0700 igb: Add lock to avoid data race The commit c23d92b80e0b ("igb: Teardown SR-IOV before unregister_netdev()") places the unregister_netdev() call after the igb_disable_sriov() call to avoid functionality issue. However, it introduces several race conditions when detaching a device. For example, when .remove() is called, the below interleaving leads to use-after-free. (FREE from device detaching) | (USE from netdev core) igb_remove | igb_ndo_get_vf_config igb_disable_sriov | vf >= adapter->vfs_allocated_count? kfree(adapter->vf_data) | adapter->vfs_allocated_count = 0 | | memcpy(... adapter->vf_data[vf] Moreover, the igb_disable_sriov() also suffers from data race with the requests from VF driver. (FREE from device detaching) | (USE from requests) igb_remove | igb_msix_other igb_disable_sriov | igb_msg_task kfree(adapter->vf_data) | vf < adapter->vfs_allocated_count adapter->vfs_allocated_count = 0 | To this end, this commit first eliminates the data races from netdev core by using rtnl_lock (similar to commit 719479230893 ("dpaa2-eth: add MAC/PHY support through phylink")). And then adds a spinlock to eliminate races from driver requests. (similar to commit 1e53834ce541 ("ixgbe: Add locking to prevent panic when setting sriov_numvfs to zero") Fixes: c23d92b80e0b ("igb: Teardown SR-IOV before unregister_netdev()") Signed-off-by: Lin Ma Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20220817184921.735244-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/igb/igb.h | 2 ++ drivers/net/ethernet/intel/igb/igb_main.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit 138d186252ef707fbc5b1dc9d32435083f339271 Merge: 8aa48ade7db4 664d4646184e Author: Jakub Kicinski Date: Thu Aug 18 11:02:11 2022 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2022-08-17 (ice) This series contains updates to ice driver only. Grzegorz prevents modifications to VLAN 0 when setting VLAN promiscuous as it will already be set. He also ignores -EEXIST error when attempting to set promiscuous and ensures promiscuous mode is properly cleared from the hardware when being removed. Benjamin ignores additional -EEXIST errors when setting promiscuous mode since the existing mode is the desired mode. Sylwester fixes VFs to allow sending of tagged traffic when no VLAN filters exist. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: Fix VF not able to send tagged traffic with no VLAN filters ice: Ignore error message when setting same promiscuous mode ice: Fix clearing of promisc mode with bridge over bond ice: Ignore EEXIST when setting promisc mode ice: Fix double VLAN error when entering promisc mode ==================== Link: https://lore.kernel.org/r/20220817171329.65285-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 8aa48ade7db4738bcc57447dccbf21db6618f64e Author: Geert Uytterhoeven Date: Wed Aug 17 18:54:51 2022 +0200 dt-bindings: Fix incorrect "the the" corrections Lots of double occurrences of "the" were replaced by single occurrences, but some of them should become "to the" instead. Fixes: 12e5bde18d7f6ca4 ("dt-bindings: Fix typo in comment") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/c5743c0a1a24b3a8893797b52fed88b99e56b04b.1660755148.git.geert+renesas@glider.be Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/qcom-emac.txt | 2 +- Documentation/devicetree/bindings/thermal/rcar-thermal.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit aece382251f8fa660d8f621a7f50b0ea0f390178 Author: Konrad Dybcio Date: Sat Jul 16 21:32:54 2022 +0200 dt-bindings: usb: qcom,dwc3: Add SM6375 compatible Add a compatible for DWC3 found on SM6375. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220716193257.456023-4-konrad.dybcio@somainline.org Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 1 + 1 file changed, 1 insertion(+) commit ac6928f83f8da73eee254606b45eacc6b743518a Author: Johan Hovold Date: Thu Aug 4 17:10:01 2022 +0200 usb: dwc3: qcom: clean up suspend callbacks Clean up the suspend callbacks by separating the error and success paths to improve readability. Also drop a related redundant initialisation. Reviewed-by: Matthias Kaehlcke Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220804151001.23612-10-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/dwc3-qcom.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit e3fafbd8e36530eb015a1bb31273bcf7f7035422 Author: Johan Hovold Date: Thu Aug 4 17:10:00 2022 +0200 usb: dwc3: qcom: fix wakeup implementation It is the Qualcomm glue wakeup interrupts that may be able to wake the system from suspend and this can now be described in the devicetree. Move the wakeup-source property handling over from the core driver and instead propagate the capability setting to the core device during probe. This is needed as there is currently no way for the core driver to query the wakeup setting of the glue device, but it is the core driver that manages the PHY power state during suspend. Also don't leave the PHYs enabled when system wakeup has been disabled through sysfs. Fixes: 649f5c842ba3 ("usb: dwc3: core: Host wake up support from system suspend") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220804151001.23612-9-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.c | 5 ++--- drivers/usb/dwc3/dwc3-qcom.c | 6 +++++- 2 files changed, 7 insertions(+), 4 deletions(-) commit 416b61893860d45484d4717599c828411cee9c7f Author: Johan Hovold Date: Thu Aug 4 17:09:59 2022 +0200 dt-bindings: usb: qcom,dwc3: add wakeup-source property Add a wakeup-source property to the binding to describe whether the wakeup interrupts can wake the system from suspend. Acked-by: Rob Herring Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220804151001.23612-8-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit c5f14abeb52b0177b940fd734133d383da3521d8 Author: Johan Hovold Date: Thu Aug 4 17:09:58 2022 +0200 usb: dwc3: qcom: fix peripheral and OTG suspend A recent commit implementing wakeup support in host mode instead broke suspend for peripheral and OTG mode. The hack that was added in the suspend path to determine the speed of any device connected to the USB2 bus not only accesses internal driver data for a child device, but also dereferences a NULL pointer or accesses freed data when the controller is not acting as host. There's no quick fix to the layering violation, but since reverting would leave us with broken suspend in host mode with wakeup triggering immediately, let's keep the hack for now. Fix the immediate issues by only checking the host bus speed and enabling wakeup interrupts when acting as host. Fixes: 6895ea55c385 ("usb: dwc3: qcom: Configure wakeup interrupts during suspend") Reported-by: kernel test robot Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220804151001.23612-7-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/dwc3-qcom.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 6498a96c8c9ce8ae4078e586a607851491e29a33 Author: Johan Hovold Date: Thu Aug 4 17:09:57 2022 +0200 usb: dwc3: qcom: fix runtime PM wakeup A device must enable wakeups during runtime suspend regardless of whether it is capable and allowed to wake the system up from system suspend. Fixes: 2664deb09306 ("usb: dwc3: qcom: Honor wakeup enabled/disabled state") Tested-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke Reviewed-by: Manivannan Sadhasivam Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220804151001.23612-6-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/dwc3-qcom.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit a872ab303d5ddd4c965f9cd868677781a33ce35a Author: Johan Hovold Date: Thu Aug 4 17:09:56 2022 +0200 usb: dwc3: qcom: fix use-after-free on runtime-PM wakeup The Qualcomm dwc3 runtime-PM implementation checks the xhci platform-device pointer in the wakeup-interrupt handler to determine whether the controller is in host mode and if so triggers a resume. After a role switch in OTG mode the xhci platform-device would have been freed and the next wakeup from runtime suspend would access the freed memory. Note that role switching is executed from a freezable workqueue, which guarantees that the pointer is stable during suspend. Also note that runtime PM has been broken since commit 2664deb09306 ("usb: dwc3: qcom: Honor wakeup enabled/disabled state"), which incidentally also prevents this issue from being triggered. Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver") Cc: stable@vger.kernel.org # 4.18 Reviewed-by: Matthias Kaehlcke Reviewed-by: Manivannan Sadhasivam Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220804151001.23612-5-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/dwc3-qcom.c | 14 +++++++++++++- drivers/usb/dwc3/host.c | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) commit c06795f114a6c4a423b11c9d9bbeb77ecbfbaa8b Author: Johan Hovold Date: Thu Aug 4 17:09:55 2022 +0200 usb: dwc3: qcom: fix gadget-only builds A recent change added a dependency to the USB host stack and broke gadget-only builds of the driver. Fixes: 6895ea55c385 ("usb: dwc3: qcom: Configure wakeup interrupts during suspend") Reported-by: Randy Dunlap Reviewed-by: Randy Dunlap Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220804151001.23612-4-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/dwc3-qcom.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 762e744922b566b47d15b195646440ca64257e91 Author: Johan Hovold Date: Thu Aug 4 17:09:54 2022 +0200 Revert "usb: dwc3: qcom: Keep power domain on to retain controller status" This reverts commit d9be8d5c5b032e5383ff5c404ff4155e9c705429. Generic power-domain flags must be set before the power-domain is initialised and must specifically not be modified by drivers for devices that happen to be in the domain. To make sure that USB power-domains are left enabled during system suspend when a device in the domain is in the wakeup path, the GENPD_FLAG_ACTIVE_WAKEUP flag should instead be set for the domain unconditionally when it is registered. Note that this also avoids keeping power-domains on during suspend when wakeup has not been enabled (e.g. through sysfs). For the runtime PM case, making sure that the PHYs are not suspended and that they are in the same domain as the controller prevents the domain from being suspended. If there are cases where this is not possible or desirable, the genpd implementation may need to be extended. Fixes: d9be8d5c5b03 ("usb: dwc3: qcom: Keep power domain on to retain controller status") Reviewed-by: Manivannan Sadhasivam Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220804151001.23612-3-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/dwc3-qcom.c | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) commit d2ac7bef95c9ead307801ccb6cb6dfbeb14247bf Author: Johan Hovold Date: Thu Aug 4 17:09:53 2022 +0200 usb: dwc3: fix PHY disable sequence Generic PHYs must be powered-off before they can be tore down. Similarly, suspending legacy PHYs after having powered them off makes no sense. Fix the dwc3_core_exit() (e.g. called during suspend) and open-coded dwc3_probe() error-path sequences that got this wrong. Note that this makes dwc3_core_exit() match the dwc3_core_init() error path with respect to powering off the PHYs. Fixes: 03c1fd622f72 ("usb: dwc3: core: add phy cleanup for probe error handling") Fixes: c499ff71ff2a ("usb: dwc3: core: re-factor init and exit paths") Cc: stable@vger.kernel.org # 4.8 Reviewed-by: Andrew Halaney Reviewed-by: Matthias Kaehlcke Reviewed-by: Manivannan Sadhasivam Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220804151001.23612-2-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit cee7db1b0239468b22c295cf04a8c40c34ecd35a Author: Akira Yokosawa Date: Mon Aug 8 17:53:57 2022 +0900 docs: kerneldoc-preamble: Test xeCJK.sty before loading On distros whose texlive packaging is fine-grained, texlive-xecjk can be installed/removed independently of other texlive packages. Conditionally loading xeCJK depending only on the existence of the "Noto Sans CJK SC" font might end up in xelatex error of "xeCJK.sty not found!". Improve the situation by testing existence of xeCJK.sty before loading it. This is useful on RHEL 9 and its clone distros where texlive-xecjk doesn't work at the moment due to a missing dependency [1]. "make pdfdocs" for non-CJK contents should work after removing texlive-xecjk. Link: [1] https://bugzilla.redhat.com/show_bug.cgi?id=2086254 Fixes: 398f7abdcb7e ("docs: pdfdocs: Pull LaTeX preamble part out of conf.py") Cc: stable@vger.kernel.org # v5.18+ Signed-off-by: Akira Yokosawa Acked-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/c24c2a87-70b2-5342-bcc9-de467940466e@gmail.com Signed-off-by: Jonathan Corbet Documentation/sphinx/kerneldoc-preamble.sty | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit c6a43fb3487f7e040170e60cdb9b030c669e9cf5 Author: Neil Armstrong Date: Tue Aug 16 11:56:17 2022 +0200 MAINTAINERS: Update email of Neil Armstrong My professional e-mail will change and the BayLibre one will bounce after mid-september of 2022. This updates the MAINTAINERS file, the YAML bindings and adds an entry in the .mailmap file. Signed-off-by: Neil Armstrong Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220816095617.948678-1-narmstrong@baylibre.com .mailmap | 1 + .../arm/amlogic/amlogic,meson-gx-ao-secure.yaml | 2 +- .../bindings/display/amlogic,meson-dw-hdmi.yaml | 2 +- .../bindings/display/amlogic,meson-vpu.yaml | 2 +- .../bindings/display/bridge/analogix,anx7814.yaml | 2 +- .../bindings/display/bridge/ite,it66121.yaml | 2 +- .../bindings/display/panel/sgd,gktw70sdae4se.yaml | 2 +- .../devicetree/bindings/i2c/amlogic,meson6-i2c.yaml | 2 +- .../bindings/mailbox/amlogic,meson-gxbb-mhu.yaml | 2 +- .../devicetree/bindings/media/amlogic,axg-ge2d.yaml | 2 +- .../devicetree/bindings/media/amlogic,gx-vdec.yaml | 2 +- .../bindings/media/amlogic,meson-gx-ao-cec.yaml | 2 +- .../devicetree/bindings/mfd/khadas,mcu.yaml | 2 +- .../devicetree/bindings/net/amlogic,meson-dwmac.yaml | 2 +- .../bindings/phy/amlogic,axg-mipi-dphy.yaml | 2 +- .../bindings/phy/amlogic,meson-g12a-usb2-phy.yaml | 2 +- .../phy/amlogic,meson-g12a-usb3-pcie-phy.yaml | 2 +- .../bindings/power/amlogic,meson-ee-pwrc.yaml | 2 +- .../bindings/reset/amlogic,meson-reset.yaml | 2 +- .../devicetree/bindings/rng/amlogic,meson-rng.yaml | 2 +- .../bindings/serial/amlogic,meson-uart.yaml | 2 +- .../bindings/soc/amlogic/amlogic,canvas.yaml | 2 +- .../bindings/spi/amlogic,meson-gx-spicc.yaml | 2 +- .../bindings/spi/amlogic,meson6-spifc.yaml | 2 +- .../bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml | 2 +- .../bindings/watchdog/amlogic,meson-gxbb-wdt.yaml | 2 +- MAINTAINERS | 20 ++++++++++---------- 27 files changed, 36 insertions(+), 35 deletions(-) commit 249801360db3dec4f73768c502192020bfddeacc Author: Jakub Kicinski Date: Tue Aug 16 09:19:39 2022 -0700 net: genl: fix error path memory leak in policy dumping If construction of the array of policies fails when recording non-first policy we need to unwind. netlink_policy_dump_add_policy() itself also needs fixing as it currently gives up on error without recording the allocated pointer in the pstate pointer. Reported-by: syzbot+dc54d9ba8153b216cae0@syzkaller.appspotmail.com Fixes: 50a896cf2d6f ("genetlink: properly support per-op policy dumping") Link: https://lore.kernel.org/r/20220816161939.577583-1-kuba@kernel.org Signed-off-by: Jakub Kicinski net/netlink/genetlink.c | 6 +++++- net/netlink/policy.c | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) commit 5c23d6b717e4e956376f3852b90f58e262946b50 Author: Christophe JAILLET Date: Tue Aug 16 16:23:57 2022 +0200 stmmac: intel: Add a missing clk_disable_unprepare() call in intel_eth_pci_remove() Commit 09f012e64e4b ("stmmac: intel: Fix clock handling on error and remove paths") removed this clk_disable_unprepare() This was partly revert by commit ac322f86b56c ("net: stmmac: Fix clock handling on remove path") which removed this clk_disable_unprepare() because: " While unloading the dwmac-intel driver, clk_disable_unprepare() is being called twice in stmmac_dvr_remove() and intel_eth_pci_remove(). This causes kernel panic on the second call. " However later on, commit 5ec55823438e8 ("net: stmmac: add clocks management for gmac driver") has updated stmmac_dvr_remove() which do not call clk_disable_unprepare() anymore. So this call should now be called from intel_eth_pci_remove(). Fixes: 5ec55823438e8 ("net: stmmac: add clocks management for gmac driver") Signed-off-by: Christophe JAILLET Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/d7c8c1dadf40df3a7c9e643f76ffadd0ccc1ad1b.1660659689.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 1 + 1 file changed, 1 insertion(+) commit 573ae4f13f630d6660008f1974c0a8a29c30e18a Author: Jens Wiklander Date: Thu Aug 18 13:08:59 2022 +0200 tee: add overflow check in register_shm_helper() With special lengths supplied by user space, register_shm_helper() has an integer overflow when calculating the number of pages covered by a supplied user space memory region. This causes internal_get_user_pages_fast() a helper function of pin_user_pages_fast() to do a NULL pointer dereference: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010 Modules linked in: CPU: 1 PID: 173 Comm: optee_example_a Not tainted 5.19.0 #11 Hardware name: QEMU QEMU Virtual Machine, BIOS 0.0.0 02/06/2015 pc : internal_get_user_pages_fast+0x474/0xa80 Call trace: internal_get_user_pages_fast+0x474/0xa80 pin_user_pages_fast+0x24/0x4c register_shm_helper+0x194/0x330 tee_shm_register_user_buf+0x78/0x120 tee_ioctl+0xd0/0x11a0 __arm64_sys_ioctl+0xa8/0xec invoke_syscall+0x48/0x114 Fix this by adding an an explicit call to access_ok() in tee_shm_register_user_buf() to catch an invalid user space address early. Fixes: 033ddf12bcf5 ("tee: add register user memory") Cc: stable@vger.kernel.org Reported-by: Nimish Mishra Reported-by: Anirban Chakraborty Reported-by: Debdeep Mukhopadhyay Suggested-by: Jerome Forissier Signed-off-by: Jens Wiklander Signed-off-by: Linus Torvalds drivers/tee/tee_shm.c | 3 +++ 1 file changed, 3 insertions(+) commit 57646d6769f13f9484ffc6869c493e25a6568073 Merge: 568035b01cfb a9084d888fba Author: Thomas Gleixner Date: Thu Aug 18 17:37:22 2022 +0200 Merge tag 'irqchip-fixes-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip fixes from Marc Zyngier: - A bunch of small fixes for the recently merged LoongArch drivers - A leftover from the non-SMP IRQ affinity rework affecting the Hyper-V IOMMU code Link: https://lore.kernel.org/r/20220812125910.2227338-1-maz@kernel.org commit 2aa48857ad52236a9564c71183d6cc8893becd41 Author: Witold Lipieta Date: Tue Aug 9 13:29:11 2022 +0200 usb-storage: Add ignore-residue quirk for NXP PN7462AU This is USB mass storage primary boot loader for code download on NXP PN7462AU. Without the quirk it is impossible to write whole memory at once as device restarts during the write due to bogus residue values reported. Acked-by: Alan Stern Cc: stable Signed-off-by: Witold Lipieta Link: https://lore.kernel.org/r/20220809112911.462776-1-witold.lipieta@thaumatec.com Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/unusual_devs.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 258e483a4d5e97a6a8caa74381ddc1f395ac1c71 Author: Maxime Ripard Date: Wed Jun 29 14:34:37 2022 +0200 drm/vc4: hdmi: Rework power up The current code tries to handle the case where CONFIG_PM isn't selected by first calling our runtime_resume implementation and then properly report the power state to the runtime_pm core. This allows to have a functionning device even if pm_runtime_get_* functions are nops. However, the device power state if CONFIG_PM is enabled is RPM_SUSPENDED, and thus our vc4_hdmi_write() and vc4_hdmi_read() calls in the runtime_pm hooks will now report a warning since the device might not be properly powered. Even more so, we need CONFIG_PM enabled since the previous RaspberryPi have a power domain that needs to be powered up for the HDMI controller to be usable. The previous patch has created a dependency on CONFIG_PM, now we can just assume it's there and only call pm_runtime_resume_and_get() to make sure our device is powered in bind. Link: https://lore.kernel.org/r/20220629123510.1915022-39-maxime@cerno.tech Acked-by: Thomas Zimmermann Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard (cherry picked from commit 53565c28e6af2cef6bbf438c34250135e3564459) Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 72e2329e7c9bbe15e7a813670497ec9c6f919af3 Author: Maxime Ripard Date: Wed Jun 29 14:34:36 2022 +0200 drm/vc4: hdmi: Depends on CONFIG_PM We already depend on runtime PM to get the power domains and clocks for most of the devices supported by the vc4 driver, so let's just select it to make sure it's there. Link: https://lore.kernel.org/r/20220629123510.1915022-38-maxime@cerno.tech Acked-by: Thomas Zimmermann Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard (cherry picked from commit f1bc386b319e93e56453ae27e9e83817bb1f6f95) Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/Kconfig | 1 + drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit f2d38edc5e3375e56b4a30d5b66cefd385a2b38c Author: Badhri Jagan Sridharan Date: Wed Aug 17 14:54:10 2022 -0700 usb: typec: tcpm: Return ENOTSUPP for power supply prop writes When the port does not support USB PD, prevent transition to PD only states when power supply property is written. In this case, TCPM transitions to SNK_NEGOTIATE_CAPABILITIES which should not be the case given that the port is not pd_capable. [ 84.308251] state change SNK_READY -> SNK_NEGOTIATE_CAPABILITIES [rev3 NONE_AMS] [ 84.308335] Setting usb_comm capable false [ 84.323367] set_auto_vbus_discharge_threshold mode:3 pps_active:n vbus:5000 ret:0 [ 84.323376] state change SNK_NEGOTIATE_CAPABILITIES -> SNK_WAIT_CAPABILITIES [rev3 NONE_AMS] Fixes: e9e6e164ed8f6 ("usb: typec: tcpm: Support non-PD mode") Cc: stable@vger.kernel.org Reviewed-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20220817215410.1807477-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b5a5b9d5f28d23b84f06b45c61dcad95b07d41bc Author: Mauro Carvalho Chehab Date: Thu Aug 18 15:38:58 2022 +0200 serial: document start_rx member at struct uart_ops Fix this doc build warning: ./include/linux/serial_core.h:397: warning: Function parameter or member 'start_rx' not described in 'uart_ops' Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/5d07ae2eec8fbad87e623160f9926b178bef2744.1660829433.git.mchehab@kernel.org Signed-off-by: Greg Kroah-Hartman include/linux/serial_core.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit a3f2fd22743fc56dd5e3896a3fbddd276df1577f Author: Arnd Bergmann Date: Thu Aug 18 15:57:20 2022 +0200 musb: fix USB_MUSB_TUSB6010 dependency Turning on NOP_USB_XCEIV as builtin broke the TUSB6010 driver because of an older issue with the depencency. It is not necessary to forbid NOP_USB_XCEIV=y in combination with USB_MUSB_HDRC=m, but only the reverse, which causes the link failure from the original Kconfig change. Use the correct dependency to still allow NOP_USB_XCEIV=n or NOP_USB_XCEIV=y but forbid NOP_USB_XCEIV=m when USB_MUSB_HDRC=m to fix the multi_v7_defconfig for tusb. Fixes: ab37a7a890c1 ("ARM: multi_v7_defconfig: Make NOP_USB_XCEIV driver built-in") Fixes: c0442479652b ("usb: musb: Fix randconfig build issues for Kconfig options") Cc: stable Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20220818135737.3143895-10-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6f35446d0769a98e9d761593d267cdd24f09ecd Author: Liam Howlett Date: Wed Aug 10 16:02:25 2022 +0000 binder_alloc: Add missing mmap_lock calls when using the VMA Take the mmap_read_lock() when using the VMA in binder_alloc_print_pages() and when checking for a VMA in binder_alloc_new_buf_locked(). It is worth noting binder_alloc_new_buf_locked() drops the VMA read lock after it verifies a VMA exists, but may be taken again deeper in the call stack, if necessary. Fixes: a43cfc87caaf (android: binder: stop saving a pointer to the VMA) Cc: stable Reported-by: Ondrej Mosnacek Reported-by: syzbot+a7b60a176ec13cafb793@syzkaller.appspotmail.com Tested-by: Ondrej Mosnacek Acked-by: Carlos Llamas Signed-off-by: Liam R. Howlett Link: https://lore.kernel.org/r/20220810160209.1630707-1-Liam.Howlett@oracle.com Signed-off-by: Greg Kroah-Hartman drivers/android/binder_alloc.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit a0e44c64b6061dda7e00b7c458e4523e2331b739 Author: Carlos Llamas Date: Mon Aug 1 18:25:11 2022 +0000 binder: fix UAF of ref->proc caused by race condition A transaction of type BINDER_TYPE_WEAK_HANDLE can fail to increment the reference for a node. In this case, the target proc normally releases the failed reference upon close as expected. However, if the target is dying in parallel the call will race with binder_deferred_release(), so the target could have released all of its references by now leaving the cleanup of the new failed reference unhandled. The transaction then ends and the target proc gets released making the ref->proc now a dangling pointer. Later on, ref->node is closed and we attempt to take spin_lock(&ref->proc->inner_lock), which leads to the use-after-free bug reported below. Let's fix this by cleaning up the failed reference on the spot instead of relying on the target to do so. ================================================================== BUG: KASAN: use-after-free in _raw_spin_lock+0xa8/0x150 Write of size 4 at addr ffff5ca207094238 by task kworker/1:0/590 CPU: 1 PID: 590 Comm: kworker/1:0 Not tainted 5.19.0-rc8 #10 Hardware name: linux,dummy-virt (DT) Workqueue: events binder_deferred_func Call trace: dump_backtrace.part.0+0x1d0/0x1e0 show_stack+0x18/0x70 dump_stack_lvl+0x68/0x84 print_report+0x2e4/0x61c kasan_report+0xa4/0x110 kasan_check_range+0xfc/0x1a4 __kasan_check_write+0x3c/0x50 _raw_spin_lock+0xa8/0x150 binder_deferred_func+0x5e0/0x9b0 process_one_work+0x38c/0x5f0 worker_thread+0x9c/0x694 kthread+0x188/0x190 ret_from_fork+0x10/0x20 Acked-by: Christian Brauner (Microsoft) Signed-off-by: Carlos Llamas Cc: stable # 4.14+ Link: https://lore.kernel.org/r/20220801182511.3371447-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit f5723cfc01932c7a8d5c78dbf7e067e537c91439 Author: Cristian Ciocaltea Date: Thu Aug 18 13:48:51 2022 +0300 regmap: spi: Reserve space for register address/padding Currently the max_raw_read and max_raw_write limits in regmap_spi struct do not take into account the additional size of the transmitted register address and padding. This may result in exceeding the maximum permitted SPI message size, which could cause undefined behaviour, e.g. data corruption. Fix regmap_get_spi_bus() to properly adjust the above mentioned limits by reserving space for the register address/padding as set in the regmap configuration. Fixes: f231ff38b7b2 ("regmap: spi: Set regmap max raw r/w from max_transfer_size") Signed-off-by: Cristian Ciocaltea Reviewed-by: Lucas Tanure Link: https://lore.kernel.org/r/20220818104851.429479-1-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown drivers/base/regmap/regmap-spi.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ecdb10df7e0d83bfd12fb8f71e28ea4753e3716a Author: Yang Yingliang Date: Thu Aug 18 16:17:51 2022 +0800 ASoC: SOF: ipc4-topology: fix wrong use of sizeof in sof_ipc4_widget_setup_comp_src() It should be size of the struct sof_ipc4_src, not data pointer pass to sof_update_ipc_object(). Fixes: b85f4fc40d56 ("ASoC: SOF: add ipc4 SRC module support") Signed-off-by: Yang Yingliang Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20220818081751.2407066-1-yangyingliang@huawei.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3b38596875dbc709b4e721a5873f4663d8a9ea2 Author: Yufen Yu Date: Wed Aug 3 10:33:55 2022 +0800 blk-mq: run queue no matter whether the request is the last request We do test on a virtio scsi device (/dev/sda) and the default mq scheduler is 'none'. We found a IO hung as following: blk_finish_plug blk_mq_plug_issue_direct scsi_mq_get_budget //get budget_token fail and sdev->restarts=1 scsi_end_request scsi_run_queue_async //sdev->restart=0 and run queue blk_mq_request_bypass_insert //add request to hctx->dispatch list //continue to dispath plug list blk_mq_dispatch_plug_list blk_mq_try_issue_list_directly //success issue all requests from plug list After .get_budget fail, scsi_mq_get_budget will increase 'restarts'. Normally, it will run hw queue when io complete and set 'restarts' as 0. But if we run queue before adding request to the dispatch list and blk_mq_dispatch_plug_list also success issue all requests, then on one will run queue, and the request will be stall in the dispatch list and cannot complete forever. It is wrong to use last request of plug list to decide if run queue is needed since all the remained requests in plug list may be from other hctxs. To fix the bug, pass run_queue as true always to blk_mq_request_bypass_insert(). Fix-suggested-by: Ming Lei Signed-off-by: Yufen Yu Reviewed-by: Ming Lei Fixes: dc5fc361d891 ("block: attempt direct issue of plug list") Link: https://lore.kernel.org/r/20220803023355.3687360-1-yuyufen@huaweicloud.com Signed-off-by: Jens Axboe block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8239f0342bae5a51acca967ba95b9a8ad56dd62 Author: Yu Kuai Date: Thu Aug 18 14:35:55 2022 +0800 blk-mq: remove unused function blk_mq_queue_stopped() blk_mq_queue_stopped() doesn't have any caller, which was found by code coverage test, thus remove it. Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20220818063555.3741222-1-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/blk-mq.c | 20 -------------------- include/linux/blk-mq.h | 1 - 2 files changed, 21 deletions(-) commit 7df548840c496b0141fb2404b889c346380c2b22 Author: Pawan Gupta Date: Wed Aug 3 14:41:32 2022 -0700 x86/bugs: Add "unknown" reporting for MMIO Stale Data Older Intel CPUs that are not in the affected processor list for MMIO Stale Data vulnerabilities currently report "Not affected" in sysfs, which may not be correct. Vulnerability status for these older CPUs is unknown. Add known-not-affected CPUs to the whitelist. Report "unknown" mitigation status for CPUs that are not in blacklist, whitelist and also don't enumerate MSR ARCH_CAPABILITIES bits that reflect hardware immunity to MMIO Stale Data vulnerabilities. Mitigation is not deployed when the status is unknown. [ bp: Massage, fixup. ] Fixes: 8d50cdf8b834 ("x86/speculation/mmio: Add sysfs reporting for Processor MMIO Stale Data") Suggested-by: Andrew Cooper Suggested-by: Tony Luck Signed-off-by: Pawan Gupta Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/a932c154772f2121794a5f2eded1a11013114711.1657846269.git.pawan.kumar.gupta@linux.intel.com .../hw-vuln/processor_mmio_stale_data.rst | 14 ++++++++ arch/x86/include/asm/cpufeatures.h | 5 +-- arch/x86/kernel/cpu/bugs.c | 14 ++++++-- arch/x86/kernel/cpu/common.c | 42 ++++++++++++++-------- 4 files changed, 56 insertions(+), 19 deletions(-) commit 3f743e9bbb8fe20f4c477e4bf6341c4187a4a264 Author: Pavel Begunkov Date: Thu Aug 18 12:38:34 2022 +0100 io_uring/net: use right helpers for async_data There is another spot where we check ->async_data directly instead of using req_has_async_data(), which is the way to do it, fix it up. Fixes: 43e0bbbd0b0e3 ("io_uring: add netmsg cache") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/42f33b9a81dd6ae65dda92f0372b0ff82d548517.1660822636.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 93a3c0d4e8bfbb15145e5dd7da68a3de4b904aba Author: Mika Westerberg Date: Tue Jun 14 18:53:59 2022 +0300 thunderbolt: Check router generation before connecting xHCI Only Thunderbolt 3 routers need the xHCI connection flow. This also ensures the router actually has both lane adapters (1 and 3). While there move declaration of the boolean variables inside the block where they are being used. Fixes: 30a4eca69b76 ("thunderbolt: Add internal xHCI connect flows for Thunderbolt 3 devices") Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg drivers/thunderbolt/switch.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit eb100b8fa8e8b59eb3e5fc7a5fd4a1e3c5950f64 Author: Mika Westerberg Date: Fri Apr 29 17:10:17 2022 +0300 thunderbolt: Use the actual buffer in tb_async_error() The received notification packet is held in pkg->buffer and not in pkg itself. Fix this by using the correct buffer. Fixes: 81a54b5e1986 ("thunderbolt: Let the connection manager handle all notifications") Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg drivers/thunderbolt/ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41191cf6bf565f4139046d7be68ec30c290af92d Author: Stefan Roesch Date: Tue Aug 16 08:31:58 2022 -0700 fs: __file_remove_privs(): restore call to inode_has_no_xattr() This restores the call to inode_has_no_xattr() in the function __file_remove_privs(). In case the dentry_meeds_remove_privs() returned 0, the function inode_has_no_xattr() was not called. Signed-off-by: Stefan Roesch Fixes: faf99b563558 ("fs: add __remove_file_privs() with flags parameter") Reviewed-by: Christian Brauner (Microsoft) Link: https://lore.kernel.org/r/20220816153158.1925040-1-shr@fb.com Signed-off-by: Christian Brauner (Microsoft) fs/inode.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a617ccc01608c3f422c65da1b6c7a31057f46f62 Author: Lorenzo Bianconi Date: Tue Aug 16 16:16:15 2022 +0200 net: ethernet: mtk_eth_soc: fix possible NULL pointer dereference in mtk_xdp_run Fix possible NULL pointer dereference in mtk_xdp_run() if the ebpf program returns XDP_TX and xdp_convert_buff_to_frame routine fails returning NULL. Fixes: 5886d26fd25bb ("net: ethernet: mtk_eth_soc: add xmit XDP support") Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/627a07d759020356b64473e09f0855960e02db28.1660659112.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d515f38c1e6dac42db145a778bd87a241f89590c Author: Leon Romanovsky Date: Tue Aug 16 11:47:23 2022 +0300 net/mlx5e: Allocate flow steering storage during uplink initialization IPsec code relies on valid priv->fs pointer that is the case in NIC flow, but not correct in uplink. Before commit that mentioned in the Fixes line, that pointer was valid in all flows as it was allocated together with priv struct. In addition, the cleanup representors routine called to that not-initialized priv->fs pointer and its internals which caused NULL deference. So, move FS allocation to be as early as possible. Fixes: af8bbf730068 ("net/mlx5e: Convert mlx5e_flow_steering member of mlx5e_priv to pointer") Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/ae46fa5bed3c67f937bfdfc0370101278f5422f1.1660639564.git.leonro@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 25 ++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 5b6a07297bdca1701dc983bf084d6c0b2569ff18 Merge: 211987f3ac73 e780e3193e88 Author: Jakub Kicinski Date: Wed Aug 17 21:58:48 2022 -0700 Merge branch 'fixes-for-ocelot-driver-statistics' Vladimir Oltean says: ==================== Fixes for Ocelot driver statistics This series contains bug fixes for the ocelot drivers (both switchdev and DSA). Some concern the counters exposed to ethtool -S, and others to the counters exposed to ifconfig. I'm aware that the changes are fairly large, but I wanted to prioritize on a proper approach to addressing the issues rather than a quick hack. Some of the noticed problems: - bad register offsets for some counters - unhandled concurrency leading to corrupted counters - unhandled 32-bit wraparound of ifconfig counters The issues on the ocelot switchdev driver were noticed through code inspection, I do not have the hardware to test. This patch set necessarily converts ocelot->stats_lock from a mutex to a spinlock. I know this affects Colin Foster's development with the SPI controlled VSC7512. I have other changes prepared for net-next that convert this back into a mutex (along with other changes in this area). ==================== Link: https://lore.kernel.org/r/20220816135352.1431497-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit e780e3193e889fd8358b862f7cd18ec5a4901caf Author: Vladimir Oltean Date: Tue Aug 16 16:53:52 2022 +0300 net: mscc: ocelot: report ndo_get_stats64 from the wraparound-resistant ocelot->stats Rather than reading the stats64 counters directly from the 32-bit hardware, it's better to rely on the output produced by the periodic ocelot_port_update_stats(). It would be even better to call ocelot_port_update_stats() right from ocelot_get_stats64() to make sure we report the current values rather than the ones from 2 seconds ago. But we need to export ocelot_port_update_stats() from the switch lib towards the switchdev driver for that, and future work will largely undo that. There are more ocelot-based drivers waiting to be introduced, an example of which is the SPI-controlled VSC7512. In that driver's case, it will be impossible to call ocelot_port_update_stats() from ndo_get_stats64 context, since the latter is atomic, and reading the stats over SPI is sleepable. So the compromise taken here, which will also hold going forward, is to report 64-bit counters to stats64, which are not 100% up to date. Fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support") Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/ethernet/mscc/ocelot_net.c | 53 +++++++++++++++++----------------- 1 file changed, 26 insertions(+), 27 deletions(-) commit d4c367650704de091d4c1f6bb379c0a5c389c73a Author: Vladimir Oltean Date: Tue Aug 16 16:53:51 2022 +0300 net: mscc: ocelot: keep ocelot_stat_layout by reg address, not offset With so many counter addresses recently discovered as being wrong, it is desirable to at least have a central database of information, rather than two: one through the SYS_COUNT_* registers (used for ndo_get_stats64), and the other through the offset field of struct ocelot_stat_layout elements (used for ethtool -S). The strategy will be to keep the SYS_COUNT_* definitions as the single source of truth, but for that we need to expand our current definitions to cover all registers. Then we need to convert the ocelot region creation logic, and stats worker, to the read semantics imposed by going through SYS_COUNT_* absolute register addresses, rather than offsets of 32-bit words relative to SYS_COUNT_RX_OCTETS (which should have been SYS_CNT, by the way). Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/ocelot/felix_vsc9959.c | 253 +++++++++++++++++----------- drivers/net/dsa/ocelot/seville_vsc9953.c | 255 ++++++++++++++++++----------- drivers/net/ethernet/mscc/ocelot.c | 11 +- drivers/net/ethernet/mscc/ocelot_vsc7514.c | 186 ++++++++++----------- drivers/net/ethernet/mscc/vsc7514_regs.c | 58 +++++++ include/soc/mscc/ocelot.h | 66 +++++++- 6 files changed, 540 insertions(+), 289 deletions(-) commit 9190460084ddd0e9235f55eab0fdd5456b5f2fd5 Author: Vladimir Oltean Date: Tue Aug 16 16:53:50 2022 +0300 net: mscc: ocelot: make struct ocelot_stat_layout array indexable The ocelot counters are 32-bit and require periodic reading, every 2 seconds, by ocelot_port_update_stats(), so that wraparounds are detected. Currently, the counters reported by ocelot_get_stats64() come from the 32-bit hardware counters directly, rather than from the 64-bit accumulated ocelot->stats, and this is a problem for their integrity. The strategy is to make ocelot_get_stats64() able to cherry-pick individual stats from ocelot->stats the way in which it currently reads them out from SYS_COUNT_* registers. But currently it can't, because ocelot->stats is an opaque u64 array that's used only to feed data into ethtool -S. To solve that problem, we need to make ocelot->stats indexable, and associate each element with an element of struct ocelot_stat_layout used by ethtool -S. This makes ocelot_stat_layout a fat (and possibly sparse) array, so we need to change the way in which we access it. We no longer need OCELOT_STAT_END as a sentinel, because we know the array's size (OCELOT_NUM_STATS). We just need to skip the array elements that were left unpopulated for the switch revision (ocelot, felix, seville). Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/ocelot/felix_vsc9959.c | 468 +++++++++++++++++++++++------ drivers/net/dsa/ocelot/seville_vsc9953.c | 468 +++++++++++++++++++++++------ drivers/net/ethernet/mscc/ocelot.c | 40 ++- drivers/net/ethernet/mscc/ocelot_vsc7514.c | 468 +++++++++++++++++++++++------ include/soc/mscc/ocelot.h | 105 ++++++- 5 files changed, 1243 insertions(+), 306 deletions(-) commit 18d8e67df184081bc6ce6220a2dd965cfd3d7e6b Author: Vladimir Oltean Date: Tue Aug 16 16:53:49 2022 +0300 net: mscc: ocelot: fix race between ndo_get_stats64 and ocelot_check_stats_work The 2 methods can run concurrently, and one will change the window of counters (SYS_STAT_CFG_STAT_VIEW) that the other sees. The fix is similar to what commit 7fbf6795d127 ("net: mscc: ocelot: fix mutex lock error during ethtool stats read") has done for ethtool -S. Fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support") Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/ethernet/mscc/ocelot_net.c | 4 ++++ 1 file changed, 4 insertions(+) commit 22d842e3efe56402c33b5e6e303bb71ce9bf9334 Author: Vladimir Oltean Date: Tue Aug 16 16:53:48 2022 +0300 net: mscc: ocelot: turn stats_lock into a spinlock ocelot_get_stats64() currently runs unlocked and therefore may collide with ocelot_port_update_stats() which indirectly accesses the same counters. However, ocelot_get_stats64() runs in atomic context, and we cannot simply take the sleepable ocelot->stats_lock mutex. We need to convert it to an atomic spinlock first. Do that as a preparatory change. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/ocelot/felix_vsc9959.c | 4 ++-- drivers/net/ethernet/mscc/ocelot.c | 11 +++++------ include/soc/mscc/ocelot.h | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) commit 173ca86618d751bd183456c9cdbb69952ba283c8 Author: Vladimir Oltean Date: Tue Aug 16 16:53:47 2022 +0300 net: mscc: ocelot: fix address of SYS_COUNT_TX_AGING counter This register, used as part of stats->tx_dropped in ocelot_get_stats64(), has a wrong address. At the address currently given, there is actually the c_tx_green_prio_6 counter. Fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support") Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/ethernet/mscc/vsc7514_regs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5152de7b79ab0be150f5966481b0c8f996192531 Author: Vladimir Oltean Date: Tue Aug 16 16:53:46 2022 +0300 net: mscc: ocelot: fix incorrect ndo_get_stats64 packet counters Reading stats using the SYS_COUNT_* register definitions is only used by ocelot_get_stats64() from the ocelot switchdev driver, however, currently the bucket definitions are incorrect. Separately, on both RX and TX, we have the following problems: - a 256-1023 bucket which actually tracks the 256-511 packets - the 1024-1526 bucket actually tracks the 512-1023 packets - the 1527-max bucket actually tracks the 1024-1526 packets => nobody tracks the packets from the real 1527-max bucket Additionally, the RX_PAUSE, RX_CONTROL, RX_LONGS and RX_CLASSIFIED_DROPS all track the wrong thing. However this doesn't seem to have any consequence, since ocelot_get_stats64() doesn't use these. Even though this problem only manifests itself for the switchdev driver, we cannot split the fix for ocelot and for DSA, since it requires fixing the bucket definitions from enum ocelot_reg, which makes us necessarily adapt the structures from felix and seville as well. Fixes: 84705fc16552 ("net: dsa: felix: introduce support for Seville VSC9953 switch") Fixes: 56051948773e ("net: dsa: ocelot: add driver for Felix switch family") Fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support") Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/ocelot/felix_vsc9959.c | 20 ++++++++++++-------- drivers/net/dsa/ocelot/seville_vsc9953.c | 16 +++++++++------- drivers/net/ethernet/mscc/ocelot_net.c | 6 ++++-- drivers/net/ethernet/mscc/vsc7514_regs.c | 24 +++++++++++++----------- include/soc/mscc/ocelot.h | 6 ++++-- 5 files changed, 42 insertions(+), 30 deletions(-) commit 40d21c4565bce064c73a03b79a157a3493c518b9 Author: Vladimir Oltean Date: Tue Aug 16 16:53:45 2022 +0300 net: dsa: felix: fix ethtool 256-511 and 512-1023 TX packet counters What the driver actually reports as 256-511 is in fact 512-1023, and the TX packets in the 256-511 bucket are not reported. Fix that. Fixes: 56051948773e ("net: dsa: ocelot: add driver for Felix switch family") Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/ocelot/felix_vsc9959.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 211987f3ac734000ea1548784b2a4539a974fbc8 Author: Vladimir Oltean Date: Tue Aug 16 23:14:45 2022 +0300 net: dsa: don't warn in dsa_port_set_state_now() when driver doesn't support it ds->ops->port_stp_state_set() is, like most DSA methods, optional, and if absent, the port is supposed to remain in the forwarding state (as standalone). Such is the case with the mv88e6060 driver, which does not offload the bridge layer. DSA warns that the STP state can't be changed to FORWARDING as part of dsa_port_enable_rt(), when in fact it should not. The error message is also not up to modern standards, so take the opportunity to make it more descriptive. Fixes: fd3645413197 ("net: dsa: change scope of STP state setter") Reported-by: Sergei Antonov Signed-off-by: Vladimir Oltean Reviewed-by: Sergei Antonov Link: https://lore.kernel.org/r/20220816201445.1809483-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski net/dsa/port.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit fd8e899cdb5ecaf8e8ee73854a99e10807eef1de Author: Rustam Subkhankulov Date: Wed Aug 17 03:38:45 2022 +0300 net: dsa: sja1105: fix buffer overflow in sja1105_setup_devlink_regions() If an error occurs in dsa_devlink_region_create(), then 'priv->regions' array will be accessed by negative index '-1'. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Rustam Subkhankulov Fixes: bf425b82059e ("net: dsa: sja1105: expose static config as devlink region") Link: https://lore.kernel.org/r/20220817003845.389644-1-subkhankulov@ispras.ru Signed-off-by: Jakub Kicinski drivers/net/dsa/sja1105/sja1105_devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 400d0ad63b190895e29f43bc75b1260111d3fd34 Author: Enzo Matsumiya Date: Wed Aug 17 16:08:34 2022 -0300 cifs: remove useless parameter 'is_fsctl' from SMB2_ioctl() SMB2_ioctl() is always called with is_fsctl = true, so doesn't make any sense to have it at all. Thus, always set SMB2_0_IOCTL_IS_FSCTL flag on the request. Also, as per MS-SMB2 3.3.5.15 "Receiving an SMB2 IOCTL Request", servers must fail the request if the request flags is zero anyway. Signed-off-by: Enzo Matsumiya Reviewed-by: Tom Talpey Signed-off-by: Steve French fs/cifs/smb2file.c | 1 - fs/cifs/smb2ops.c | 35 +++++++++++++---------------------- fs/cifs/smb2pdu.c | 20 +++++++++----------- fs/cifs/smb2proto.h | 4 ++-- 4 files changed, 24 insertions(+), 36 deletions(-) commit bec13ba9cef01cd37084d57608e7fa3d5a0b96d7 Merge: fc4aaf9fb3c9 c8550b9077d2 Author: Jakub Kicinski Date: Wed Aug 17 20:17:44 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Florian Westphal says: ==================== netfilter: conntrack and nf_tables bug fixes The following patchset contains netfilter fixes for net. Broken since 5.19: A few ancient connection tracking helpers assume TCP packets cannot exceed 64kb in size, but this isn't the case anymore with 5.19 when BIG TCP got merged, from myself. Regressions since 5.19: 1. 'conntrack -E expect' won't display anything because nfnetlink failed to enable events for expectations, only for normal conntrack events. 2. partially revert change that added resched calls to a function that can be in atomic context. Both broken and fixed up by myself. Broken for several releases (up to original merge of nf_tables): Several fixes for nf_tables control plane, from Pablo. This fixes up resource leaks in error paths and adds more sanity checks for mutually exclusive attributes/flags. Kconfig: NF_CONNTRACK_PROCFS is very old and doesn't provide all info provided via ctnetlink, so it should not default to y. From Geert Uytterhoeven. Selftests: rework nft_flowtable.sh: it frequently indicated failure; the way it tried to detect an offload failure did not work reliably. * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: testing: selftests: nft_flowtable.sh: rework test to detect offload failure testing: selftests: nft_flowtable.sh: use random netns names netfilter: conntrack: NF_CONNTRACK_PROCFS should no longer default to y netfilter: nf_tables: check NFT_SET_CONCAT flag if field_count is specified netfilter: nf_tables: disallow NFT_SET_ELEM_CATCHALL and NFT_SET_ELEM_INTERVAL_END netfilter: nf_tables: NFTA_SET_ELEM_KEY_END requires concat and interval flags netfilter: nf_tables: validate NFTA_SET_ELEM_OBJREF based on NFT_SET_OBJECT flag netfilter: nf_tables: really skip inactive sets when allocating name netfilter: nfnetlink: re-enable conntrack expectation events netfilter: nf_tables: fix scheduling-while-atomic splat netfilter: nf_ct_irc: cap packet search space to 4k netfilter: nf_ct_ftp: prefer skb_linearize netfilter: nf_ct_h323: cap packet size at 64k netfilter: nf_ct_sane: remove pseudo skb linearization netfilter: nf_tables: possible module reference underflow in error path netfilter: nf_tables: disallow NFTA_SET_ELEM_KEY_END with NFT_SET_ELEM_INTERVAL_END flag netfilter: nf_tables: use READ_ONCE and WRITE_ONCE for shared generation id access ==================== Link: https://lore.kernel.org/r/20220817140015.25843-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit fc4aaf9fb3c99bcb326d52f9d320ed5680bd1cee Author: David Howells Date: Tue Aug 16 10:34:40 2022 +0100 net: Fix suspicious RCU usage in bpf_sk_reuseport_detach() bpf_sk_reuseport_detach() calls __rcu_dereference_sk_user_data_with_flags() to obtain the value of sk->sk_user_data, but that function is only usable if the RCU read lock is held, and neither that function nor any of its callers hold it. Fix this by adding a new helper, __locked_read_sk_user_data_with_flags() that checks to see if sk->sk_callback_lock() is held and use that here instead. Alternatively, making __rcu_dereference_sk_user_data_with_flags() use rcu_dereference_checked() might suffice. Without this, the following warning can be occasionally observed: ============================= WARNING: suspicious RCU usage 6.0.0-rc1-build2+ #563 Not tainted ----------------------------- include/net/sock.h:592 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 5 locks held by locktest/29873: #0: ffff88812734b550 (&sb->s_type->i_mutex_key#9){+.+.}-{3:3}, at: __sock_release+0x77/0x121 #1: ffff88812f5621b0 (sk_lock-AF_INET){+.+.}-{0:0}, at: tcp_close+0x1c/0x70 #2: ffff88810312f5c8 (&h->lhash2[i].lock){+.+.}-{2:2}, at: inet_unhash+0x76/0x1c0 #3: ffffffff83768bb8 (reuseport_lock){+...}-{2:2}, at: reuseport_detach_sock+0x18/0xdd #4: ffff88812f562438 (clock-AF_INET){++..}-{2:2}, at: bpf_sk_reuseport_detach+0x24/0xa4 stack backtrace: CPU: 1 PID: 29873 Comm: locktest Not tainted 6.0.0-rc1-build2+ #563 Hardware name: ASUS All Series/H97-PLUS, BIOS 2306 10/09/2014 Call Trace: dump_stack_lvl+0x4c/0x5f bpf_sk_reuseport_detach+0x6d/0xa4 reuseport_detach_sock+0x75/0xdd inet_unhash+0xa5/0x1c0 tcp_set_state+0x169/0x20f ? lockdep_sock_is_held+0x3a/0x3a ? __lock_release.isra.0+0x13e/0x220 ? reacquire_held_locks+0x1bb/0x1bb ? hlock_class+0x31/0x96 ? mark_lock+0x9e/0x1af __tcp_close+0x50/0x4b6 tcp_close+0x28/0x70 inet_release+0x8e/0xa7 __sock_release+0x95/0x121 sock_close+0x14/0x17 __fput+0x20f/0x36a task_work_run+0xa3/0xcc exit_to_user_mode_prepare+0x9c/0x14d syscall_exit_to_user_mode+0x18/0x44 entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: cf8c1e967224 ("net: refactor bpf_sk_reuseport_detach()") Signed-off-by: David Howells cc: Hawkins Jiawei Link: https://lore.kernel.org/r/166064248071.3502205.10036394558814861778.stgit@warthog.procyon.org.uk Signed-off-by: Jakub Kicinski include/net/sock.h | 25 +++++++++++++++++++++++++ kernel/bpf/reuseport_array.c | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) commit 68ed14496b032b0c9ef21b38ee45c6c8f3a18ff1 Author: Enzo Matsumiya Date: Wed Aug 17 14:14:02 2022 -0300 cifs: remove unused server parameter from calc_smb_size() This parameter is unused by the called function Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Enzo Matsumiya Signed-off-by: Steve French fs/cifs/cifs_debug.c | 2 +- fs/cifs/cifsglob.h | 2 +- fs/cifs/cifsproto.h | 2 +- fs/cifs/misc.c | 2 +- fs/cifs/netmisc.c | 2 +- fs/cifs/readdir.c | 6 ++---- fs/cifs/smb2misc.c | 4 ++-- fs/cifs/smb2ops.c | 2 +- fs/cifs/smb2proto.h | 2 +- 9 files changed, 11 insertions(+), 13 deletions(-) commit 2ae6ab9d82cdd0f7381639ee31e31de45519df4c Merge: 8ae4be56dd0c 82a1356a933d Author: Dave Airlie Date: Thu Aug 18 08:51:04 2022 +1000 Merge tag 'drm-misc-fixes-2022-08-16' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes One patch for imx/dcss to get rid of a warning message, one off-by-one fix and GA103 support for nouveau, a refcounting fix for meson, a NULL pointer dereference fix for ttm, a error check fix for lvds-codec, a dt-binding schema fix and an underflow fix for sun4i Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20220816094401.wtadc7ddr6lzq6aj@houat commit 8ae4be56dd0c2b851e7edc0f1d5cd441f88481c0 Merge: 568035b01cfb 9d50bff40e3e Author: Dave Airlie Date: Thu Aug 18 08:45:45 2022 +1000 Merge tag 'drm-intel-next-fixes-2022-08-11' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - disable pci resize on 32-bit systems (Nirmoy) - don't leak the ccs state (Matt) - TLB invalidation fixes (Chris) [now with all fixes of fixes] Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YvVumNCga+90fYN0@intel.com commit 14b20b784f59bdd95f6f1cfb112c9818bcec4d84 Author: YiFei Zhu Date: Tue Aug 16 20:55:16 2022 +0000 bpf: Restrict bpf_sys_bpf to CAP_PERFMON The verifier cannot perform sufficient validation of any pointers passed into bpf_attr and treats them as integers rather than pointers. The helper will then read from arbitrary pointers passed into it. Restrict the helper to CAP_PERFMON since the security model in BPF of arbitrary kernel read is CAP_BPF + CAP_PERFMON. Fixes: af2ac3e13e45 ("bpf: Prepare bpf syscall to be used from kernel and user space.") Signed-off-by: YiFei Zhu Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20220816205517.682470-1-zhuyifei@google.com kernel/bpf/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b06a2755758937add738545ba4a544fc5a1c56d Merge: ae2a823643d7 d4073595d0c6 Author: Linus Torvalds Date: Wed Aug 17 14:51:22 2022 -0700 Merge tag 'ntfs3_for_6.0' of https://github.com/Paragon-Software-Group/linux-ntfs3 Pull ntfs3 updates from Konstantin Komarov: - implement FALLOC_FL_INSERT_RANGE - fix some logic errors - fixed xfstests (tested on x86_64): generic/064 generic/213 generic/300 generic/361 generic/449 generic/485 - some dead code removed or refactored * tag 'ntfs3_for_6.0' of https://github.com/Paragon-Software-Group/linux-ntfs3: (39 commits) fs/ntfs3: uninitialized variable in ntfs_set_acl_ex() fs/ntfs3: Remove unused function wnd_bits fs/ntfs3: Make ni_ins_new_attr return error fs/ntfs3: Create MFT zone only if length is large enough fs/ntfs3: Refactoring attr_insert_range to restore after errors fs/ntfs3: Refactoring attr_punch_hole to restore after errors fs/ntfs3: Refactoring attr_set_size to restore after errors fs/ntfs3: New function ntfs_bad_inode fs/ntfs3: Make MFT zone less fragmented fs/ntfs3: Check possible errors in run_pack in advance fs/ntfs3: Added comments to frecord functions fs/ntfs3: Fill duplicate info in ni_add_name fs/ntfs3: Make static function attr_load_runs fs/ntfs3: Add new argument is_mft to ntfs_mark_rec_free fs/ntfs3: Remove unused mi_mark_free fs/ntfs3: Fix very fragmented case in attr_punch_hole fs/ntfs3: Fix work with fragmented xattr fs/ntfs3: Make ntfs_fallocate return -ENOSPC instead of -EFBIG fs/ntfs3: extend ni_insert_nonresident to return inserted ATTR_LIST_ENTRY fs/ntfs3: Check reserved size for maximum allowed ... commit 3024d95a4c521c278a7504ee9e80c57c3a9750e0 Author: Daniel Borkmann Date: Wed Aug 17 23:32:09 2022 +0200 bpf: Partially revert flexible-array member replacement Partially revert 94dfc73e7cf4 ("treewide: uapi: Replace zero-length arrays with flexible-array members") given it breaks BPF UAPI. For example, BPF CI run reveals build breakage under LLVM: [...] CLNG-BPF [test_maps] map_ptr_kern.o CLNG-BPF [test_maps] btf__core_reloc_arrays___diff_arr_val_sz.o CLNG-BPF [test_maps] test_bpf_cookie.o progs/map_ptr_kern.c:314:26: error: field 'trie_key' with variable sized type 'struct bpf_lpm_trie_key' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end] struct bpf_lpm_trie_key trie_key; ^ CLNG-BPF [test_maps] btf__core_reloc_type_based___diff.o 1 error generated. make: *** [Makefile:521: /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/map_ptr_kern.o] Error 1 make: *** Waiting for unfinished jobs.... [...] Typical usage of the bpf_lpm_trie_key is that the struct gets embedded into a user defined key for the LPM BPF map, from the selftest example: struct bpf_lpm_trie_key { <-- UAPI exported struct __u32 prefixlen; __u8 data[]; }; struct lpm_key { <-- BPF program defined struct struct bpf_lpm_trie_key trie_key; __u32 data; }; Undo this for BPF until a different solution can be found. It's the only flexible- array member case in the UAPI header. This was discovered in BPF CI after Dave reported that the include/uapi/linux/bpf.h header was out of sync with tools/include/uapi/linux/bpf.h after 94dfc73e7cf4. And the subsequent sync attempt failed CI. Fixes: 94dfc73e7cf4 ("treewide: uapi: Replace zero-length arrays with flexible-array members") Reported-by: Dave Marchevsky Signed-off-by: Daniel Borkmann Cc: Gustavo A. R. Silva Link: https://lore.kernel.org/bpf/22aebc88-da67-f086-e620-dd4a16e2bc69@iogearbox.net include/uapi/linux/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae2a823643d71f40751259266f7c2e7d90909662 Author: Linus Torvalds Date: Thu Aug 11 15:29:46 2022 -0700 dcache: move the DCACHE_OP_COMPARE case out of the __d_lookup_rcu loop __d_lookup_rcu() is one of the hottest functions in the kernel on certain loads, and it is complicated by filesystems that might want to have their own name compare function. We can improve code generation by moving the test of DCACHE_OP_COMPARE outside the loop, which makes the loop itself much simpler, at the cost of some code duplication. But both cases end up being simpler, and the "native" direct case-sensitive compare particularly so. Cc: Al Viro Signed-off-by: Linus Torvalds fs/dcache.c | 72 +++++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 23 deletions(-) commit 583585e48d965338e73e1eb383768d16e0922d73 Author: Liu Jian Date: Tue Aug 9 17:49:15 2022 +0800 skmsg: Fix wrong last sg check in sk_msg_recvmsg() Fix one kernel NULL pointer dereference as below: [ 224.462334] Call Trace: [ 224.462394] __tcp_bpf_recvmsg+0xd3/0x380 [ 224.462441] ? sock_has_perm+0x78/0xa0 [ 224.462463] tcp_bpf_recvmsg+0x12e/0x220 [ 224.462494] inet_recvmsg+0x5b/0xd0 [ 224.462534] __sys_recvfrom+0xc8/0x130 [ 224.462574] ? syscall_trace_enter+0x1df/0x2e0 [ 224.462606] ? __do_page_fault+0x2de/0x500 [ 224.462635] __x64_sys_recvfrom+0x24/0x30 [ 224.462660] do_syscall_64+0x5d/0x1d0 [ 224.462709] entry_SYSCALL_64_after_hwframe+0x65/0xca In commit 9974d37ea75f ("skmsg: Fix invalid last sg check in sk_msg_recvmsg()"), we change last sg check to sg_is_last(), but in sockmap redirection case (without stream_parser/stream_verdict/ skb_verdict), we did not mark the end of the scatterlist. Check the sk_msg_alloc, sk_msg_page_add, and bpf_msg_push_data functions, they all do not mark the end of sg. They are expected to use sg.end for end judgment. So the judgment of '(i != msg_rx->sg.end)' is added back here. Fixes: 9974d37ea75f ("skmsg: Fix invalid last sg check in sk_msg_recvmsg()") Signed-off-by: Liu Jian Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20220809094915.150391-1-liujian56@huawei.com net/core/skmsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 36c0d935015766bf20d621c18313f17691bda5e3 Author: Arun Ramadoss Date: Tue Aug 16 16:25:16 2022 +0530 net: dsa: microchip: ksz9477: fix fdb_dump last invalid entry In the ksz9477_fdb_dump function it reads the ALU control register and exit from the timeout loop if there is valid entry or search is complete. After exiting the loop, it reads the alu entry and report to the user space irrespective of entry is valid. It works till the valid entry. If the loop exited when search is complete, it reads the alu table. The table returns all ones and it is reported to user space. So bridge fdb show gives ff:ff:ff:ff:ff:ff as last entry for every port. To fix it, after exiting the loop the entry is reported only if it is valid one. Fixes: b987e98e50ab ("dsa: add DSA switch driver for Microchip KSZ9477") Signed-off-by: Arun Ramadoss Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220816105516.18350-1-arun.ramadoss@microchip.com Signed-off-by: Jakub Kicinski drivers/net/dsa/microchip/ksz9477.c | 3 +++ 1 file changed, 3 insertions(+) commit 932c29a10d5d0bba63b9f505a8ec1e3ce8c02542 Author: David Howells Date: Wed Aug 17 19:41:27 2022 +0100 locks: Fix dropped call to ->fl_release_private() Prior to commit 4149be7bda7e, sys_flock() would allocate the file_lock struct it was going to use to pass parameters, call ->flock() and then call locks_free_lock() to get rid of it - which had the side effect of calling locks_release_private() and thus ->fl_release_private(). With commit 4149be7bda7e, however, this is no longer the case: the struct is now allocated on the stack, and locks_free_lock() is no longer called - and thus any remaining private data doesn't get cleaned up either. This causes afs flock to cause oops. Kasan catches this as a UAF by the list_del_init() in afs_fl_release_private() for the file_lock record produced by afs_fl_copy_lock() as the original record didn't get delisted. It can be reproduced using the generic/504 xfstest. Fix this by reinstating the locks_release_private() call in sys_flock(). I'm not sure if this would affect any other filesystems. If not, then the release could be done in afs_flock() instead. Changes ======= ver #2) - Don't need to call ->fl_release_private() after calling the security hook, only after calling ->flock(). Fixes: 4149be7bda7e ("fs/lock: Don't allocate file_lock in flock_make_lock().") cc: Chuck Lever cc: Jeff Layton cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/166075758809.3532462.13307935588777587536.stgit@warthog.procyon.org.uk/ # v1 Acked-by: Kuniyuki Iwashima Signed-off-by: David Howells Signed-off-by: Jeff Layton fs/locks.c | 1 + 1 file changed, 1 insertion(+) commit 34fc9cc3aebe8b9e27d3bc821543dd482dc686ca Author: Heinrich Schuchardt Date: Wed Aug 17 15:25:21 2022 +0200 riscv: dts: microchip: correct L2 cache interrupts The "PolarFire SoC MSS Technical Reference Manual" documents the following PLIC interrupts: 1 - L2 Cache Controller Signals when a metadata correction event occurs 2 - L2 Cache Controller Signals when an uncorrectable metadata event occurs 3 - L2 Cache Controller Signals when a data correction event occurs 4 - L2 Cache Controller Signals when an uncorrectable data event occurs This differs from the SiFive FU540 which only has three L2 cache related interrupts. The sequence in the device tree is defined by an enum: enum {         DIR_CORR = 0,         DATA_CORR,         DATA_UNCORR,         DIR_UNCORR, }; So the correct sequence of the L2 cache interrupts is interrupts = <1>, <3>, <4>, <2>; [Conor] This manifests as an unusable system if the l2-cache driver is enabled, as the wrong interrupt gets cleared & the handler prints errors to the console ad infinitum. Fixes: 0fa6107eca41 ("RISC-V: Initial DTS for Microchip ICICLE board") CC: stable@vger.kernel.org # 5.15: e35b07a7df9b: riscv: dts: microchip: mpfs: Group tuples in interrupt properties Signed-off-by: Heinrich Schuchardt Signed-off-by: Conor Dooley arch/riscv/boot/dts/microchip/mpfs.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f7e7236435ca0abe005c674ebd6892c6e83aeb3 Author: Tejun Heo Date: Mon Aug 15 13:27:38 2022 -1000 cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock Bringing up a CPU may involve creating and destroying tasks which requires read-locking threadgroup_rwsem, so threadgroup_rwsem nests inside cpus_read_lock(). However, cpuset's ->attach(), which may be called with thredagroup_rwsem write-locked, also wants to disable CPU hotplug and acquires cpus_read_lock(), leading to a deadlock. Fix it by guaranteeing that ->attach() is always called with CPU hotplug disabled and removing cpus_read_lock() call from cpuset_attach(). Signed-off-by: Tejun Heo Reviewed-and-tested-by: Imran Khan Reported-and-tested-by: Xuewen Yan Fixes: 05c7b7a92cc8 ("cgroup/cpuset: Fix a race between cpuset_attach() and cpu hotplug") Cc: stable@vger.kernel.org # v5.17+ kernel/cgroup/cgroup.c | 77 +++++++++++++++++++++++++++++++++++--------------- kernel/cgroup/cpuset.c | 3 +- 2 files changed, 55 insertions(+), 25 deletions(-) commit 664d4646184ed986f8195df684cc4660563fb02a Author: Sylwester Dziedziuch Date: Wed Aug 3 10:42:46 2022 +0200 ice: Fix VF not able to send tagged traffic with no VLAN filters VF was not able to send tagged traffic when it didn't have any VLAN interfaces and VLAN anti-spoofing was enabled. Fix this by allowing VFs with no VLAN filters to send tagged traffic. After VF adds a VLAN interface it will be able to send tagged traffic matching VLAN filters only. Testing hints: 1. Spawn VF 2. Send tagged packet from a VF 3. The packet should be sent out and not dropped 4. Add a VLAN interface on VF 5. Send tagged packet on that VLAN interface 6. Packet should be sent out and not dropped 7. Send tagged packet with id different than VLAN interface 8. Packet should be dropped Fixes: daf4dd16438b ("ice: Refactor spoofcheck configuration functions") Signed-off-by: Sylwester Dziedziuch Signed-off-by: Mateusz Palczewski Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_vf_lib.c | 11 ++++-- drivers/net/ethernet/intel/ice/ice_virtchnl.c | 57 +++++++++++++++++++++++---- 2 files changed, 57 insertions(+), 11 deletions(-) commit 79956b83ed4281c35561c39254558092d96a9ed1 Author: Benjamin Mikailenko Date: Fri Aug 12 15:25:50 2022 +0200 ice: Ignore error message when setting same promiscuous mode Commit 1273f89578f2 ("ice: Fix broken IFF_ALLMULTI handling") introduced new checks when setting/clearing promiscuous mode. But if the requested promiscuous mode setting already exists, an -EEXIST error message would be printed. This is incorrect because promiscuous mode is either on/off and shouldn't print an error when the requested configuration is already set. This can happen when removing a bridge with two bonded interfaces and promiscuous most isn't fully cleared from VLAN VSI in hardware. Fix this by ignoring cases where requested promiscuous mode exists. Fixes: 1273f89578f2 ("ice: Fix broken IFF_ALLMULTI handling") Signed-off-by: Benjamin Mikailenko Signed-off-by: Grzegorz Siwik Link: https://lore.kernel.org/all/CAK8fFZ7m-KR57M_rYX6xZN39K89O=LGooYkKsu6HKt0Bs+x6xQ@mail.gmail.com/ Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_fltr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit abddafd4585cc825d454da3cf308ad1226f6c554 Author: Grzegorz Siwik Date: Fri Aug 12 15:25:49 2022 +0200 ice: Fix clearing of promisc mode with bridge over bond When at least two interfaces are bonded and a bridge is enabled on the bond, an error can occur when the bridge is removed and re-added. The reason for the error is because promiscuous mode was not fully cleared from the VLAN VSI in the hardware. With this change, promiscuous mode is properly removed when the bridge disconnects from bonding. [ 1033.676359] bond1: link status definitely down for interface enp95s0f0, disabling it [ 1033.676366] bond1: making interface enp175s0f0 the new active one [ 1033.676369] device enp95s0f0 left promiscuous mode [ 1033.676522] device enp175s0f0 entered promiscuous mode [ 1033.676901] ice 0000:af:00.0 enp175s0f0: Error setting Multicast promiscuous mode on VSI 6 [ 1041.795662] ice 0000:af:00.0 enp175s0f0: Error setting Multicast promiscuous mode on VSI 6 [ 1041.944826] bond1: link status definitely down for interface enp175s0f0, disabling it [ 1041.944874] device enp175s0f0 left promiscuous mode [ 1041.944918] bond1: now running without any active interface! Fixes: c31af68a1b94 ("ice: Add outer_vlan_ops and VSI specific VLAN ops implementations") Co-developed-by: Jesse Brandeburg Signed-off-by: Jesse Brandeburg Signed-off-by: Grzegorz Siwik Link: https://lore.kernel.org/all/CAK8fFZ7m-KR57M_rYX6xZN39K89O=LGooYkKsu6HKt0Bs+x6xQ@mail.gmail.com/ Tested-by: Jaroslav Pulchart Tested-by: Igor Raits Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_lib.c | 6 +++++- drivers/net/ethernet/intel/ice/ice_main.c | 12 +++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) commit 11e551a2efa4481bd4f616ab75374a2710b480e9 Author: Grzegorz Siwik Date: Fri Aug 12 15:25:48 2022 +0200 ice: Ignore EEXIST when setting promisc mode Ignore EEXIST error when setting promiscuous mode. This fix is needed because the driver could set promiscuous mode when it still has not cleared properly. Promiscuous mode could be set only once, so setting it second time will be rejected. Fixes: 5eda8afd6bcc ("ice: Add support for PF/VF promiscuous mode") Signed-off-by: Grzegorz Siwik Link: https://lore.kernel.org/all/CAK8fFZ7m-KR57M_rYX6xZN39K89O=LGooYkKsu6HKt0Bs+x6xQ@mail.gmail.com/ Tested-by: Jaroslav Pulchart Tested-by: Igor Raits Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffa9ed86522f1c08d4face4e0a4ebf366037bf19 Author: Grzegorz Siwik Date: Fri Aug 12 15:25:47 2022 +0200 ice: Fix double VLAN error when entering promisc mode Avoid enabling or disabling VLAN 0 when trying to set promiscuous VLAN mode if double VLAN mode is enabled. This fix is needed because the driver tries to add the VLAN 0 filter twice (once for inner and once for outer) when double VLAN mode is enabled. The filter program is rejected by the firmware when double VLAN is enabled, because the promiscuous filter only needs to be set once. This issue was missed in the initial implementation of double VLAN mode. Fixes: 5eda8afd6bcc ("ice: Add support for PF/VF promiscuous mode") Signed-off-by: Grzegorz Siwik Link: https://lore.kernel.org/all/CAK8fFZ7m-KR57M_rYX6xZN39K89O=LGooYkKsu6HKt0Bs+x6xQ@mail.gmail.com/ Tested-by: Jaroslav Pulchart Tested-by: Igor Raits Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_switch.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 90d74fdbd8059bf041ac797092c9b1d461555280 Author: Christoffer Sandberg Date: Wed Aug 17 15:51:44 2022 +0200 ALSA: hda/realtek: Add quirk for Clevo NS50PU, NS70PU Fixes headset microphone detection on Clevo NS50PU and NS70PU. Signed-off-by: Christoffer Sandberg Signed-off-by: Werner Sembach Cc: Link: https://lore.kernel.org/r/20220817135144.34103-1-wse@tuxedocomputers.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 274a2eebf80c60246f9edd6ef8e9a095ad121264 Merge: 3cc40a443a04 5c669c4a4c6a Author: Linus Torvalds Date: Wed Aug 17 08:58:54 2022 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fixes from Michael Tsirkin: "Most notably this drops the commits that trip up google cloud (turns out, any legacy device). Plus a kerneldoc patch" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio: kerneldocs fixes and enhancements virtio: Revert "virtio: find_vqs() add arg sizes" virtio_vdpa: Revert "virtio_vdpa: support the arg sizes of find_vqs()" virtio_pci: Revert "virtio_pci: support the arg sizes of find_vqs()" virtio-mmio: Revert "virtio_mmio: support the arg sizes of find_vqs()" virtio: Revert "virtio: add helper virtio_find_vqs_ctx_size()" virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()" commit ed3590561f5d3343a1717396307d0942eda472ed Author: Vincent Whitchurch Date: Tue Aug 16 16:44:14 2022 +0200 hwmon: (pmbus) Fix vout margin caching The code currently uses a zero margin to mean not cached, but this results in the cache being bypassed if the (low) margin is set to zero, leading to lots of unnecessary SMBus transactions in that case. Use a negative value instead. Fixes: 07fb76273db89d93 ("hwmon: (pmbus) Introduce and use cached vout margins") Signed-off-by: Vincent Whitchurch Link: https://lore.kernel.org/r/20220816144414.2358974-1-vincent.whitchurch@axis.com Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/pmbus_core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 09e52d17b72d3a4bf6951a90ccd8c97fae04e5cf Author: Christophe JAILLET Date: Wed Aug 17 15:04:00 2022 +0200 hwmon: (pmbus) Use dev_err_probe() to filter -EPROBE_DEFER error messages devm_regulator_register() can return -EPROBE_DEFER, so better use dev_err_probe() instead of dev_err(), it is less verbose in such a case. It is also more informative, which can't hurt. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/3adf1cea6e32e54c0f71f4604b4e98d992beaa71.1660741419.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/pmbus_core.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 899b7f69f244e539ea5df1b4d756046337de44a5 Author: Josef Bacik Date: Wed Aug 3 14:28:47 2022 -0400 btrfs: tree-checker: check for overlapping extent items We're seeing a weird problem in production where we have overlapping extent items in the extent tree. It's unclear where these are coming from, and in debugging we realized there's no check in the tree checker for this sort of problem. Add a check to the tree-checker to make sure that the extents do not overlap each other. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/tree-checker.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit 769030e11847c5412270c0726ff21d3a1f0a3131 Author: Filipe Manana Date: Mon Aug 1 14:57:52 2022 +0100 btrfs: fix warning during log replay when bumping inode link count During log replay, at add_link(), we may increment the link count of another inode that has a reference that conflicts with a new reference for the inode currently being processed. During log replay, at add_link(), we may drop (unlink) a reference from some inode in the subvolume tree if that reference conflicts with a new reference found in the log for the inode we are currently processing. After the unlink, If the link count has decreased from 1 to 0, then we increment the link count to prevent the inode from being deleted if it's evicted by an iput() call, because we may have references to add to that inode later on (and we will fixup its link count later during log replay). However incrementing the link count from 0 to 1 triggers a warning: $ cat fs/inode.c (...) void inc_nlink(struct inode *inode) { if (unlikely(inode->i_nlink == 0)) { WARN_ON(!(inode->i_state & I_LINKABLE)); atomic_long_dec(&inode->i_sb->s_remove_count); } (...) The I_LINKABLE flag is only set when creating an O_TMPFILE file, so it's never set during log replay. Most of the time, the warning isn't triggered even if we dropped the last reference of the conflicting inode, and this is because: 1) The conflicting inode was previously marked for fixup, through a call to link_to_fixup_dir(), which increments the inode's link count; 2) And the last iput() on the inode has not triggered eviction of the inode, nor was eviction triggered after the iput(). So at add_link(), even if we unlink the last reference of the inode, its link count ends up being 1 and not 0. So this means that if eviction is triggered after link_to_fixup_dir() is called, at add_link() we will read the inode back from the subvolume tree and have it with a correct link count, matching the number of references it has on the subvolume tree. So if when we are at add_link() the inode has exactly one reference only, its link count is 1, and after the unlink its link count becomes 0. So fix this by using set_nlink() instead of inc_nlink(), as the former accepts a transition from 0 to 1 and it's what we use in other similar contexts (like at link_to_fixup_dir(). Also make add_inode_ref() use set_nlink() instead of inc_nlink() to bump the link count from 0 to 1. The warning is actually harmless, but it may scare users. Josef also ran into it recently. CC: stable@vger.kernel.org # 5.1+ Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/tree-log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7a6b75b79902e47f46328b57733f2604774fa2d9 Author: Filipe Manana Date: Mon Aug 1 14:57:51 2022 +0100 btrfs: fix lost error handling when looking up extended ref on log replay During log replay, when processing inode references, if we get an error when looking up for an extended reference at __add_inode_ref(), we ignore it and proceed, returning success (0) if no other error happens after the lookup. This is obviously wrong because in case an extended reference exists and it encodes some name not in the log, we need to unlink it, otherwise the filesystem state will not match the state it had after the last fsync. So just make __add_inode_ref() return an error it gets from the extended reference lookup. Fixes: f186373fef005c ("btrfs: extended inode refs") CC: stable@vger.kernel.org # 4.9+ Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/tree-log.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b40130b23ca4a08c5785d5a3559805916bddba3c Author: Josef Bacik Date: Tue Jul 26 16:24:04 2022 -0400 btrfs: fix lockdep splat with reloc root extent buffers We have been hitting the following lockdep splat with btrfs/187 recently WARNING: possible circular locking dependency detected 5.19.0-rc8+ #775 Not tainted ------------------------------------------------------ btrfs/752500 is trying to acquire lock: ffff97e1875a97b8 (btrfs-treloc-02#2){+.+.}-{3:3}, at: __btrfs_tree_lock+0x24/0x110 but task is already holding lock: ffff97e1875a9278 (btrfs-tree-01/1){+.+.}-{3:3}, at: __btrfs_tree_lock+0x24/0x110 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (btrfs-tree-01/1){+.+.}-{3:3}: down_write_nested+0x41/0x80 __btrfs_tree_lock+0x24/0x110 btrfs_init_new_buffer+0x7d/0x2c0 btrfs_alloc_tree_block+0x120/0x3b0 __btrfs_cow_block+0x136/0x600 btrfs_cow_block+0x10b/0x230 btrfs_search_slot+0x53b/0xb70 btrfs_lookup_inode+0x2a/0xa0 __btrfs_update_delayed_inode+0x5f/0x280 btrfs_async_run_delayed_root+0x24c/0x290 btrfs_work_helper+0xf2/0x3e0 process_one_work+0x271/0x590 worker_thread+0x52/0x3b0 kthread+0xf0/0x120 ret_from_fork+0x1f/0x30 -> #1 (btrfs-tree-01){++++}-{3:3}: down_write_nested+0x41/0x80 __btrfs_tree_lock+0x24/0x110 btrfs_search_slot+0x3c3/0xb70 do_relocation+0x10c/0x6b0 relocate_tree_blocks+0x317/0x6d0 relocate_block_group+0x1f1/0x560 btrfs_relocate_block_group+0x23e/0x400 btrfs_relocate_chunk+0x4c/0x140 btrfs_balance+0x755/0xe40 btrfs_ioctl+0x1ea2/0x2c90 __x64_sys_ioctl+0x88/0xc0 do_syscall_64+0x38/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #0 (btrfs-treloc-02#2){+.+.}-{3:3}: __lock_acquire+0x1122/0x1e10 lock_acquire+0xc2/0x2d0 down_write_nested+0x41/0x80 __btrfs_tree_lock+0x24/0x110 btrfs_lock_root_node+0x31/0x50 btrfs_search_slot+0x1cb/0xb70 replace_path+0x541/0x9f0 merge_reloc_root+0x1d6/0x610 merge_reloc_roots+0xe2/0x260 relocate_block_group+0x2c8/0x560 btrfs_relocate_block_group+0x23e/0x400 btrfs_relocate_chunk+0x4c/0x140 btrfs_balance+0x755/0xe40 btrfs_ioctl+0x1ea2/0x2c90 __x64_sys_ioctl+0x88/0xc0 do_syscall_64+0x38/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd other info that might help us debug this: Chain exists of: btrfs-treloc-02#2 --> btrfs-tree-01 --> btrfs-tree-01/1 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(btrfs-tree-01/1); lock(btrfs-tree-01); lock(btrfs-tree-01/1); lock(btrfs-treloc-02#2); *** DEADLOCK *** 7 locks held by btrfs/752500: #0: ffff97e292fdf460 (sb_writers#12){.+.+}-{0:0}, at: btrfs_ioctl+0x208/0x2c90 #1: ffff97e284c02050 (&fs_info->reclaim_bgs_lock){+.+.}-{3:3}, at: btrfs_balance+0x55f/0xe40 #2: ffff97e284c00878 (&fs_info->cleaner_mutex){+.+.}-{3:3}, at: btrfs_relocate_block_group+0x236/0x400 #3: ffff97e292fdf650 (sb_internal#2){.+.+}-{0:0}, at: merge_reloc_root+0xef/0x610 #4: ffff97e284c02378 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1a8/0x5a0 #5: ffff97e284c023a0 (btrfs_trans_num_extwriters){++++}-{0:0}, at: join_transaction+0x1a8/0x5a0 #6: ffff97e1875a9278 (btrfs-tree-01/1){+.+.}-{3:3}, at: __btrfs_tree_lock+0x24/0x110 stack backtrace: CPU: 1 PID: 752500 Comm: btrfs Not tainted 5.19.0-rc8+ #775 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014 Call Trace: dump_stack_lvl+0x56/0x73 check_noncircular+0xd6/0x100 ? lock_is_held_type+0xe2/0x140 __lock_acquire+0x1122/0x1e10 lock_acquire+0xc2/0x2d0 ? __btrfs_tree_lock+0x24/0x110 down_write_nested+0x41/0x80 ? __btrfs_tree_lock+0x24/0x110 __btrfs_tree_lock+0x24/0x110 btrfs_lock_root_node+0x31/0x50 btrfs_search_slot+0x1cb/0xb70 ? lock_release+0x137/0x2d0 ? _raw_spin_unlock+0x29/0x50 ? release_extent_buffer+0x128/0x180 replace_path+0x541/0x9f0 merge_reloc_root+0x1d6/0x610 merge_reloc_roots+0xe2/0x260 relocate_block_group+0x2c8/0x560 btrfs_relocate_block_group+0x23e/0x400 btrfs_relocate_chunk+0x4c/0x140 btrfs_balance+0x755/0xe40 btrfs_ioctl+0x1ea2/0x2c90 ? lock_is_held_type+0xe2/0x140 ? lock_is_held_type+0xe2/0x140 ? __x64_sys_ioctl+0x88/0xc0 __x64_sys_ioctl+0x88/0xc0 do_syscall_64+0x38/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd This isn't necessarily new, it's just tricky to hit in practice. There are two competing things going on here. With relocation we create a snapshot of every fs tree with a reloc tree. Any extent buffers that get initialized here are initialized with the reloc root lockdep key. However since it is a snapshot, any blocks that are currently in cache that originally belonged to the fs tree will have the normal tree lockdep key set. This creates the lock dependency of reloc tree -> normal tree for the extent buffer locking during the first phase of the relocation as we walk down the reloc root to relocate blocks. However this is problematic because the final phase of the relocation is merging the reloc root into the original fs root. This involves searching down to any keys that exist in the original fs root and then swapping the relocated block and the original fs root block. We have to search down to the fs root first, and then go search the reloc root for the block we need to replace. This creates the dependency of normal tree -> reloc tree which is why lockdep complains. Additionally even if we were to fix this particular mismatch with a different nesting for the merge case, we're still slotting in a block that has a owner of the reloc root objectid into a normal tree, so that block will have its lockdep key set to the tree reloc root, and create a lockdep splat later on when we wander into that block from the fs root. Unfortunately the only solution here is to make sure we do not set the lockdep key to the reloc tree lockdep key normally, and then reset any blocks we wander into from the reloc root when we're doing the merged. This solves the problem of having mixed tree reloc keys intermixed with normal tree keys, and then allows us to make sure in the merge case we maintain the lock order of normal tree -> reloc tree We handle this by setting a bit on the reloc root when we do the search for the block we want to relocate, and any block we search into or COW at that point gets set to the reloc tree key. This works correctly because we only ever COW down to the parent node, so we aren't resetting the key for the block we're linking into the fs root. With this patch we no longer have the lockdep splat in btrfs/187. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.c | 3 +++ fs/btrfs/ctree.h | 2 ++ fs/btrfs/extent-tree.c | 18 +++++++++++++++++- fs/btrfs/extent_io.c | 11 ++++++++++- fs/btrfs/locking.c | 11 +++++++++++ fs/btrfs/locking.h | 5 +++++ fs/btrfs/relocation.c | 2 ++ 7 files changed, 50 insertions(+), 2 deletions(-) commit 0a27a0474d146eb79e09ec88bf0d4229f4cfc1b8 Author: Josef Bacik Date: Tue Jul 26 16:24:03 2022 -0400 btrfs: move lockdep class helpers to locking.c These definitions exist in disk-io.c, which is not related to the locking. Move this over to locking.h/c where it makes more sense. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 82 ------------------------------------------------------ fs/btrfs/disk-io.h | 10 ------- fs/btrfs/locking.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/locking.h | 9 ++++++ 4 files changed, 89 insertions(+), 92 deletions(-) commit 85f02d6c856b9f3a0acf5219de6e32f58b9778eb Author: Zixuan Fu Date: Thu Jul 21 15:48:29 2022 +0800 btrfs: unset reloc control if transaction commit fails in prepare_to_relocate() In btrfs_relocate_block_group(), the rc is allocated. Then btrfs_relocate_block_group() calls relocate_block_group() prepare_to_relocate() set_reloc_control() that assigns rc to the variable fs_info->reloc_ctl. When prepare_to_relocate() returns, it calls btrfs_commit_transaction() btrfs_start_dirty_block_groups() btrfs_alloc_path() kmem_cache_zalloc() which may fail for example (or other errors could happen). When the failure occurs, btrfs_relocate_block_group() detects the error and frees rc and doesn't set fs_info->reloc_ctl to NULL. After that, in btrfs_init_reloc_root(), rc is retrieved from fs_info->reloc_ctl and then used, which may cause a use-after-free bug. This possible bug can be triggered by calling btrfs_ioctl_balance() before calling btrfs_ioctl_defrag(). To fix this possible bug, in prepare_to_relocate(), check if btrfs_commit_transaction() fails. If the failure occurs, unset_reloc_control() is called to set fs_info->reloc_ctl to NULL. The error log in our fault-injection testing is shown as follows: [ 58.751070] BUG: KASAN: use-after-free in btrfs_init_reloc_root+0x7ca/0x920 [btrfs] ... [ 58.753577] Call Trace: ... [ 58.755800] kasan_report+0x45/0x60 [ 58.756066] btrfs_init_reloc_root+0x7ca/0x920 [btrfs] [ 58.757304] record_root_in_trans+0x792/0xa10 [btrfs] [ 58.757748] btrfs_record_root_in_trans+0x463/0x4f0 [btrfs] [ 58.758231] start_transaction+0x896/0x2950 [btrfs] [ 58.758661] btrfs_defrag_root+0x250/0xc00 [btrfs] [ 58.759083] btrfs_ioctl_defrag+0x467/0xa00 [btrfs] [ 58.759513] btrfs_ioctl+0x3c95/0x114e0 [btrfs] ... [ 58.768510] Allocated by task 23683: [ 58.768777] ____kasan_kmalloc+0xb5/0xf0 [ 58.769069] __kmalloc+0x227/0x3d0 [ 58.769325] alloc_reloc_control+0x10a/0x3d0 [btrfs] [ 58.769755] btrfs_relocate_block_group+0x7aa/0x1e20 [btrfs] [ 58.770228] btrfs_relocate_chunk+0xf1/0x760 [btrfs] [ 58.770655] __btrfs_balance+0x1326/0x1f10 [btrfs] [ 58.771071] btrfs_balance+0x3150/0x3d30 [btrfs] [ 58.771472] btrfs_ioctl_balance+0xd84/0x1410 [btrfs] [ 58.771902] btrfs_ioctl+0x4caa/0x114e0 [btrfs] ... [ 58.773337] Freed by task 23683: ... [ 58.774815] kfree+0xda/0x2b0 [ 58.775038] free_reloc_control+0x1d6/0x220 [btrfs] [ 58.775465] btrfs_relocate_block_group+0x115c/0x1e20 [btrfs] [ 58.775944] btrfs_relocate_chunk+0xf1/0x760 [btrfs] [ 58.776369] __btrfs_balance+0x1326/0x1f10 [btrfs] [ 58.776784] btrfs_balance+0x3150/0x3d30 [btrfs] [ 58.777185] btrfs_ioctl_balance+0xd84/0x1410 [btrfs] [ 58.777621] btrfs_ioctl+0x4caa/0x114e0 [btrfs] ... Reported-by: TOTE Robot CC: stable@vger.kernel.org # 5.15+ Reviewed-by: Sweet Tea Dorminy Reviewed-by: Nikolay Borisov Signed-off-by: Zixuan Fu Signed-off-by: David Sterba fs/btrfs/relocation.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ff5900092227ade3e31fe25f97faf406cde902e6 Author: Lukas Bulwahn Date: Thu Jul 21 12:04:33 2022 +0200 arm64: adjust KASLR relocation after ARCH_RANDOM removal Commit aacd149b6238 ("arm64: head: avoid relocating the kernel twice for KASLR") adds the new file arch/arm64/kernel/pi/kaslr_early.c with a small code part guarded by '#ifdef CONFIG_ARCH_RANDOM'. Concurrently, commit 9592eef7c16e ("random: remove CONFIG_ARCH_RANDOM") removes the config CONFIG_ARCH_RANDOM and turns all '#ifdef CONFIG_ARCH_RANDOM' code parts into unconditional code parts, which is generally safe to do. Remove a needless ifdef guard after the ARCH_RANDOM removal. Signed-off-by: Lukas Bulwahn Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220721100433.18286-1-lukas.bulwahn@gmail.com Signed-off-by: Will Deacon arch/arm64/kernel/pi/kaslr_early.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 5e1e087457c94ad7fafbe1cf6f774c6999ee29d4 Author: Zenghui Yu Date: Tue Aug 9 12:38:48 2022 +0800 arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76 Since commit 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX gold CPUs"), we failed to detect erratum 1286807 on Cortex-A76 because its entry in arm64_repeat_tlbi_list[] was accidently corrupted by this commit. Fix this issue by creating a separate entry for Kryo4xx Gold. Fixes: 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX gold CPUs") Cc: Shreyas K K Signed-off-by: Zenghui Yu Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20220809043848.969-1-yuzenghui@huawei.com Signed-off-by: Will Deacon arch/arm64/kernel/cpu_errata.c | 2 ++ 1 file changed, 2 insertions(+) commit 9be080edcca330be4af06b19916c35227891e8bc Author: Amadeusz Sławiński Date: Wed Aug 17 14:49:24 2022 +0200 ALSA: info: Fix llseek return value when using callback When using callback there was a flow of ret = -EINVAL if (callback) { offset = callback(); goto out; } ... offset = some other value in case of no callback; ret = offset; out: return ret; which causes the snd_info_entry_llseek() to return -EINVAL when there is callback handler. Fix this by setting "ret" directly to callback return value before jumping to "out". Fixes: 73029e0ff18d ("ALSA: info - Implement common llseek for binary mode") Signed-off-by: Amadeusz Sławiński Cc: Link: https://lore.kernel.org/r/20220817124924.3974577-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Takashi Iwai sound/core/info.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c8550b9077d271b9b4fbe5a9a260eb021f371c4f Author: Florian Westphal Date: Tue Aug 16 14:15:22 2022 +0200 testing: selftests: nft_flowtable.sh: rework test to detect offload failure This test fails on current kernel releases because the flotwable path now calls dst_check from packet path and will then remove the offload. Test script has two purposes: 1. check that file (random content) can be sent to other netns (and vv) 2. check that the flow is offloaded (rather than handled by classic forwarding path). Since dst_check is in place, 2) fails because the nftables ruleset in router namespace 1 intentionally blocks traffic under the assumption that packets are not passed via classic path at all. Rework this: Instead of blocking traffic, create two named counters, one for original and one for reverse direction. The first three test cases are handled by classic forwarding path (path mtu discovery is disabled and packets exceed MTU). But all other tests enable PMTUD, so the originator and responder are expected to lower packet size and flowtable is expected to do the packet forwarding. For those tests, check that the packet counters (which are only incremented for packets that are passed up to classic forward path) are significantly lower than the file size transferred. I've tested that the counter-checks fail as expected when the 'flow add' statement is removed from the ruleset. Signed-off-by: Florian Westphal tools/testing/selftests/netfilter/nft_flowtable.sh | 141 ++++++++++++--------- 1 file changed, 84 insertions(+), 57 deletions(-) commit c6e14bb9f50df7126ca64405ae807d8bc7b39f9a Author: Srinivas Kandagatla Date: Tue Aug 16 17:52:29 2022 +0100 ASoC: qcom: sm8250: add missing module owner Add missing module owner to able to build and load this driver as module. Fixes: aa2e2785545a ("ASoC: qcom: sm8250: add sound card qrb5165-rb5 support") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220816165229.7971-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/qcom/sm8250.c | 1 + 1 file changed, 1 insertion(+) commit 1ff954f9ab054675b9eb02dd14add8f7aa376d71 Author: Stefan Binding Date: Tue Aug 16 16:19:01 2022 +0100 ALSA: hda/cs8409: Support new Dolphin Variants Add 4 new Dolphin Systems, same configuration as older systems. Signed-off-by: Stefan Binding Link: https://lore.kernel.org/r/20220816151901.1398007-1-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_cs8409-tables.c | 4 ++++ 1 file changed, 4 insertions(+) commit b10d86fb8e46cc812171728bcd326df2f34e9ed5 Author: Oliver Upton Date: Tue Aug 16 19:25:54 2022 +0000 KVM: arm64: Reject 32bit user PSTATE on asymmetric systems KVM does not support AArch32 EL0 on asymmetric systems. To that end, prevent userspace from configuring a vCPU in such a state through setting PSTATE. It is already ABI that KVM rejects such a write on a system where AArch32 EL0 is unsupported. Though the kernel's definition of a 32bit system changed in commit 2122a833316f ("arm64: Allow mismatched 32-bit EL0 support"), KVM's did not. Fixes: 2122a833316f ("arm64: Allow mismatched 32-bit EL0 support") Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220816192554.1455559-3-oliver.upton@linux.dev arch/arm64/kvm/guest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3c6efc72f3b20ec23566e768979802f0a398f04 Author: Oliver Upton Date: Tue Aug 16 19:25:53 2022 +0000 KVM: arm64: Treat PMCR_EL1.LC as RES1 on asymmetric systems KVM does not support AArch32 on asymmetric systems. To that end, enforce AArch64-only behavior on PMCR_EL1.LC when on an asymmetric system. Fixes: 2122a833316f ("arm64: Allow mismatched 32-bit EL0 support") Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220816192554.1455559-2-oliver.upton@linux.dev arch/arm64/include/asm/kvm_host.h | 4 ++++ arch/arm64/kvm/arm.c | 3 +-- arch/arm64/kvm/sys_regs.c | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) commit bf1ac16edf6770a92bc75cf2373f1f9feea398a4 Author: Seth Forshee Date: Tue Aug 16 11:47:52 2022 -0500 fs: require CAP_SYS_ADMIN in target namespace for idmapped mounts Idmapped mounts should not allow a user to map file ownsership into a range of ids which is not under the control of that user. However, we currently don't check whether the mounter is privileged wrt to the target user namespace. Currently no FS_USERNS_MOUNT filesystems support idmapped mounts, thus this is not a problem as only CAP_SYS_ADMIN in init_user_ns is allowed to set up idmapped mounts. But this could change in the future, so add a check to refuse to create idmapped mounts when the mounter does not have CAP_SYS_ADMIN in the target user namespace. Fixes: bd303368b776 ("fs: support mapped mounts of mapped filesystems") Signed-off-by: Seth Forshee Reviewed-by: Christian Brauner (Microsoft) Link: https://lore.kernel.org/r/20220816164752.2595240-1-sforshee@digitalocean.com Signed-off-by: Christian Brauner (Microsoft) fs/namespace.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ed16d19c5f1d02908caf85c52a787de2eeeced2f Merge: 849f16bbfb68 57c942bc3bef Author: David S. Miller Date: Wed Aug 17 10:25:29 2022 +0100 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue ==================== Intel Wired LAN Driver Updates 2022-08-16) This series contains updates to i40e driver only. Przemyslaw fixes issue with checksum offload on VXLAN tunnels. Alan disables VSI for Tx timeout when all recovery methods have failed. ==================== Signed-off-by: David S. Miller commit 849f16bbfb686cf75e67c536d196027fa8bfc803 Author: Jakub Kicinski Date: Mon Aug 15 17:23:58 2022 -0700 tls: rx: react to strparser initialization errors Even though the normal strparser's init function has a return value we got away with ignoring errors until now, as it only validates the parameters and we were passing correct parameters. tls_strp can fail to init on memory allocation errors, which syzbot duly induced and reported. Reported-by: syzbot+abd45eb849b05194b1b6@syzkaller.appspotmail.com Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/tls/tls_sw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ddc84c90538e1fdb0721cd41c313944c38449a34 Author: Christian Brauner Date: Tue Aug 16 13:35:14 2022 +0200 MAINTAINERS: update idmapping tree Since Seth joined as a maintainer in ba40a57ff08b ("Add Seth Forshee as co-maintainer for idmapped mounts") it was best to get a shared git tree instead of using our personal repositories. So we requested and Konstantin suggested and gave us a new "idmapping" repository under the pre-existing but mainly unused vfs namespace. Just makes it easier for Seth to send fixes in case I'm out or someone else ever takes over. Cc: Seth Forshee Signed-off-by: Christian Brauner (Microsoft) Link: https://lore.kernel.org/r/20220816113514.43304-2-brauner@kernel.org MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abfcf55d8b07a990589301bc64d82a5d26680956 Author: Christian Brauner Date: Tue Aug 16 13:35:13 2022 +0200 acl: handle idmapped mounts for idmapped filesystems Ensure that POSIX ACLs checking, getting, and setting works correctly for filesystems mountable with a filesystem idmapping ("fs_idmapping") that want to support idmapped mounts ("mnt_idmapping"). Note that no filesystems mountable with an fs_idmapping do yet support idmapped mounts. This is required infrastructure work to unblock this. As we explained in detail in [1] the fs_idmapping is irrelevant for getxattr() and setxattr() when mapping the ACL_{GROUP,USER} {g,u}ids stored in the uapi struct posix_acl_xattr_entry in posix_acl_fix_xattr_{from,to}_user(). But for acl_permission_check() and posix_acl_{g,s}etxattr_idmapped_mnt() the fs_idmapping matters. acl_permission_check(): During lookup POSIX ACLs are retrieved directly via i_op->get_acl() and are returned via the kernel internal struct posix_acl which contains e_{g,u}id members of type k{g,u}id_t that already take the fs_idmapping into acccount. For example, a POSIX ACL stored with u4 on the backing store is mapped to k10000004 in the fs_idmapping. The mnt_idmapping remaps the POSIX ACL to k20000004. In order to do that the fs_idmapping needs to be taken into account but that doesn't happen yet (Again, this is a counterfactual currently as fuse doesn't support idmapped mounts currently. It's just used as a convenient example.): fs_idmapping: u0:k10000000:r65536 mnt_idmapping: u0:v20000000:r65536 ACL_USER: k10000004 acl_permission_check() -> check_acl() -> get_acl() -> i_op->get_acl() == fuse_get_acl() -> posix_acl_from_xattr(u0:k10000000:r65536 /* fs_idmapping */, ...) { k10000004 = make_kuid(u0:k10000000:r65536 /* fs_idmapping */, u4 /* ACL_USER */); } -> posix_acl_permission() { -1 = make_vfsuid(u0:v20000000:r65536 /* mnt_idmapping */, &init_user_ns, k10000004); vfsuid_eq_kuid(-1, k10000004 /* caller_fsuid */) } In order to correctly map from the fs_idmapping into mnt_idmapping we require the relevant fs_idmaping to be passed: acl_permission_check() -> check_acl() -> get_acl() -> i_op->get_acl() == fuse_get_acl() -> posix_acl_from_xattr(u0:k10000000:r65536 /* fs_idmapping */, ...) { k10000004 = make_kuid(u0:k10000000:r65536 /* fs_idmapping */, u4 /* ACL_USER */); } -> posix_acl_permission() { v20000004 = make_vfsuid(u0:v20000000:r65536 /* mnt_idmapping */, u0:k10000000:r65536 /* fs_idmapping */, k10000004); vfsuid_eq_kuid(v20000004, k10000004 /* caller_fsuid */) } The initial_idmapping is only correct for the current situation because all filesystems that currently support idmapped mounts do not support being mounted with an fs_idmapping. Note that ovl_get_acl() is used to retrieve the POSIX ACLs from the relevant lower layer and the lower layer's mnt_idmapping needs to be taken into account and so does the fs_idmapping. See 0c5fd887d2bb ("acl: move idmapped mount fixup into vfs_{g,s}etxattr()") for more details. For posix_acl_{g,s}etxattr_idmapped_mnt() it is not as obvious why the fs_idmapping matters as it is for acl_permission_check(). Especially because it doesn't matter for posix_acl_fix_xattr_{from,to}_user() (See [1] for more context.). Because posix_acl_{g,s}etxattr_idmapped_mnt() operate on the uapi struct posix_acl_xattr_entry which contains {g,u}id_t values and thus give the impression that the fs_idmapping is irrelevant as at this point appropriate {g,u}id_t values have seemlingly been generated. As we've stated multiple times this assumption is wrong and in fact the uapi struct posix_acl_xattr_entry is taking idmappings into account depending at what place it is operated on. posix_acl_getxattr_idmapped_mnt() When posix_acl_getxattr_idmapped_mnt() is called the values stored in the uapi struct posix_acl_xattr_entry are mapped according to the fs_idmapping. This happened when they were read from the backing store and then translated from struct posix_acl into the uapi struct posix_acl_xattr_entry during posix_acl_to_xattr(). In other words, the fs_idmapping matters as the values stored as {g,u}id_t in the uapi struct posix_acl_xattr_entry have been generated by it. So we need to take the fs_idmapping into account during make_vfsuid() in posix_acl_getxattr_idmapped_mnt(). posix_acl_setxattr_idmapped_mnt() When posix_acl_setxattr_idmapped_mnt() is called the values stored as {g,u}id_t in uapi struct posix_acl_xattr_entry are intended to be the values that ultimately get turned back into a k{g,u}id_t in posix_acl_from_xattr() (which turns the uapi struct posix_acl_xattr_entry into the kernel internal struct posix_acl). In other words, the fs_idmapping matters as the values stored as {g,u}id_t in the uapi struct posix_acl_xattr_entry are intended to be the values that will be undone in the fs_idmapping when writing to the backing store. So we need to take the fs_idmapping into account during from_vfsuid() in posix_acl_setxattr_idmapped_mnt(). Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Fixes: 0c5fd887d2bb ("acl: move idmapped mount fixup into vfs_{g,s}etxattr()") Cc: Seth Forshee Signed-off-by: Christian Brauner (Microsoft) Reviewed-by: Seth Forshee Link: https://lore.kernel.org/r/20220816113514.43304-1-brauner@kernel.org fs/overlayfs/inode.c | 11 +++++++---- fs/posix_acl.c | 15 +++++++++------ 2 files changed, 16 insertions(+), 10 deletions(-) commit e9f130e0775b5a2dad0a33440347d373ff69e631 Author: Andrejs Cainikovs Date: Fri Jul 8 14:42:05 2022 +0200 arm64: dts: imx8mm-verdin: use level interrupt for mcp251xfd Switch to level interrupt for mcp251xfd. This will make sure no interrupts are lost. Signed-off-by: Andrejs Cainikovs Reported-by: Marc Kleine-Budde Acked-by: Marc Kleine-Budde Fixes: 6a57f224f734 ("arm64: dts: freescale: add initial support for verdin imx8m mini") Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be1e3dfecf7d2fbcb4a45b113da637983878246c Author: Andrejs Cainikovs Date: Fri Jul 8 14:42:04 2022 +0200 arm64: dts: imx8mm-verdin: update CAN clock to 40MHz Update SPI CAN controller clock to match current hardware design. Signed-off-by: Andrejs Cainikovs Acked-by: Marcel Ziswiler Fixes: 6a57f224f734 ("arm64: dts: freescale: add initial support for verdin imx8m mini") Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 17ecd4a4db4783392edd4944f5e8268205083f70 Author: Nikolay Aleksandrov Date: Tue Aug 16 18:30:50 2022 +0300 xfrm: policy: fix metadata dst->dev xmit null pointer dereference When we try to transmit an skb with metadata_dst attached (i.e. dst->dev == NULL) through xfrm interface we can hit a null pointer dereference[1] in xfrmi_xmit2() -> xfrm_lookup_with_ifid() due to the check for a loopback skb device when there's no policy which dereferences dst->dev unconditionally. Not having dst->dev can be interepreted as it not being a loopback device, so just add a check for a null dst_orig->dev. With this fix xfrm interface's Tx error counters go up as usual. [1] net-next calltrace captured via netconsole: BUG: kernel NULL pointer dereference, address: 00000000000000c0 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP CPU: 1 PID: 7231 Comm: ping Kdump: loaded Not tainted 5.19.0+ #24 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.0-1.fc36 04/01/2014 RIP: 0010:xfrm_lookup_with_ifid+0x5eb/0xa60 Code: 8d 74 24 38 e8 26 a4 37 00 48 89 c1 e9 12 fc ff ff 49 63 ed 41 83 fd be 0f 85 be 01 00 00 41 be ff ff ff ff 45 31 ed 48 8b 03 80 c0 00 00 00 08 75 0f 41 80 bc 24 19 0d 00 00 01 0f 84 1e 02 RSP: 0018:ffffb0db82c679f0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffffd0db7fcad430 RCX: ffffb0db82c67a10 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffb0db82c67a80 RBP: ffffb0db82c67a80 R08: ffffb0db82c67a14 R09: 0000000000000000 R10: 0000000000000000 R11: ffff8fa449667dc8 R12: ffffffff966db880 R13: 0000000000000000 R14: 00000000ffffffff R15: 0000000000000000 FS: 00007ff35c83f000(0000) GS:ffff8fa478480000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000c0 CR3: 000000001ebb7000 CR4: 0000000000350ee0 Call Trace: xfrmi_xmit+0xde/0x460 ? tcf_bpf_act+0x13d/0x2a0 dev_hard_start_xmit+0x72/0x1e0 __dev_queue_xmit+0x251/0xd30 ip_finish_output2+0x140/0x550 ip_push_pending_frames+0x56/0x80 raw_sendmsg+0x663/0x10a0 ? try_charge_memcg+0x3fd/0x7a0 ? __mod_memcg_lruvec_state+0x93/0x110 ? sock_sendmsg+0x30/0x40 sock_sendmsg+0x30/0x40 __sys_sendto+0xeb/0x130 ? handle_mm_fault+0xae/0x280 ? do_user_addr_fault+0x1e7/0x680 ? kvm_read_and_reset_apf_flags+0x3b/0x50 __x64_sys_sendto+0x20/0x30 do_syscall_64+0x34/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7ff35cac1366 Code: eb 0b 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 11 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 72 c3 90 55 48 83 ec 30 44 89 4c 24 2c 4c 89 RSP: 002b:00007fff738e4028 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fff738e57b0 RCX: 00007ff35cac1366 RDX: 0000000000000040 RSI: 0000557164e4b450 RDI: 0000000000000003 RBP: 0000557164e4b450 R08: 00007fff738e7a2c R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000040 R13: 00007fff738e5770 R14: 00007fff738e4030 R15: 0000001d00000001 Modules linked in: netconsole veth br_netfilter bridge bonding virtio_net [last unloaded: netconsole] CR2: 00000000000000c0 CC: Steffen Klassert CC: Daniel Borkmann Fixes: 2d151d39073a ("xfrm: Add possibility to set the default to block if we have no policy") Signed-off-by: Nikolay Aleksandrov Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b64b46fbaa1da626324f304bcb5fe0662f28b6ce Author: Marco Felsch Date: Fri Jul 8 11:08:53 2022 +0200 Revert "soc: imx: imx8m-blk-ctrl: set power device name" This reverts commit 8239d67f59cf522dd4f7135392a2f9a3a25f9cff. This change confuses the sysfs cleanup path since the rename is done after the device registration. Fixes: 8239d67f59cf ("soc: imx: imx8m-blk-ctrl: set power device name") Signed-off-by: Marco Felsch Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo drivers/soc/imx/imx8m-blk-ctrl.c | 1 - 1 file changed, 1 deletion(-) commit 88392a0dd0ab263edb4ca416ebdecabd8289158a Author: Lucas Tanure Date: Wed Jul 27 10:59:24 2022 +0100 platform/x86: serial-multi-instantiate: Add CLSA0101 Laptop The device CLSA0101 has two instances of CS35L41 connected by I2C. Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20220727095924.80884-5-tanureal@opensource.cirrus.com Link: https://lore.kernel.org/r/20220816194639.13870-1-cam@neo-zeon.de Signed-off-by: Takashi Iwai drivers/platform/x86/serial-multi-instantiate.c | 1 + 1 file changed, 1 insertion(+) commit b71b7bfeac38c7a21c423ddafb29aa6258949df8 Author: Florian Westphal Date: Tue Aug 16 14:15:21 2022 +0200 testing: selftests: nft_flowtable.sh: use random netns names "ns1" is a too generic name, use a random suffix to avoid errors when such a netns exists. Also allows to run multiple instances of the script in parallel. Signed-off-by: Florian Westphal tools/testing/selftests/netfilter/nft_flowtable.sh | 246 +++++++++++---------- 1 file changed, 128 insertions(+), 118 deletions(-) commit aa5762c34213aba7a72dc58e70601370805fa794 Author: Geert Uytterhoeven Date: Mon Aug 15 12:39:20 2022 +0200 netfilter: conntrack: NF_CONNTRACK_PROCFS should no longer default to y NF_CONNTRACK_PROCFS was marked obsolete in commit 54b07dca68557b09 ("netfilter: provide config option to disable ancient procfs parts") in v3.3. Signed-off-by: Geert Uytterhoeven Signed-off-by: Florian Westphal net/netfilter/Kconfig | 1 - 1 file changed, 1 deletion(-) commit cf36ae3e5802716617b9e4d902a31048240396b0 Merge: 82a1356a933d 568035b01cfb Author: Thomas Zimmermann Date: Wed Aug 17 08:40:32 2022 +0200 Merge drm/drm-fixes into drm-misc-fixes Backmerging for v6.0-rc1. Signed-off-by: Thomas Zimmermann commit de64b6b6fb6f369840d171b7c5a9baf31b8b2630 Author: Zhengchao Shao Date: Mon Aug 15 11:08:48 2022 +0800 net: sched: fix misuse of qcpu->backlog in gnet_stats_add_queue_cpu In the gnet_stats_add_queue_cpu function, the qstats->qlen statistics are incorrectly set to qcpu->backlog. Fixes: 448e163f8b9b ("gen_stats: Add gnet_stats_add_queue()") Signed-off-by: Zhengchao Shao Link: https://lore.kernel.org/r/20220815030848.276746-1-shaozhengchao@huawei.com Signed-off-by: Jakub Kicinski net/core/gen_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb6354e116305afbfde196be5120bfa8669fdc6a Author: Andrew Jones Date: Tue Aug 16 18:30:58 2022 +0200 riscv: Ensure isa-ext static keys are writable riscv_isa_ext_keys[] is an array of static keys used in the unified ISA extension framework. The keys added to this array may be used anywhere, including in modules. Ensure the keys remain writable by placing them in the data section. The need to change riscv_isa_ext_keys[]'s section was found when the kvm module started failing to load. Commit 8eb060e10185 ("arch/riscv: add Zihintpause support") adds a static branch check for a newly added isa-ext key to cpu_relax(), which kvm uses. Fixes: c360cbec3511 ("riscv: introduce unified static key mechanism for ISA extensions") Signed-off-by: Andrew Jones Cc: stable@vger.kernel.org Reported-by: Ron Economos Reported-by: Anup Patel Reported-by: Conor Dooley Tested-by: Atish Patra Link: https://lore.kernel.org/r/20220816163058.3004536-1-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 085292c3d78015412b752ee1ca4c7725fd2bf2fc Author: Michel Dänzer Date: Tue Aug 16 10:44:10 2022 +0200 Revert "drm/amd/amdgpu: add pipe1 hardware support" This reverts commit 4c7631800e6bf0eced08dd7b4f793fcd972f597d. Triggered GFX hangs with GNOME Wayland on Navi 21. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2117 Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbca24d0a3c11193bafb9e174f89f52a379006e3 Author: Maíra Canal Date: Mon Aug 15 08:39:31 2022 -0300 drm/amdgpu: Fix use-after-free on amdgpu_bo_list mutex If amdgpu_cs_vm_handling returns r != 0, then it will unlock the bo_list_mutex inside the function amdgpu_cs_vm_handling and again on amdgpu_cs_parser_fini. This problem results in the following use-after-free problem: [ 220.280990] ------------[ cut here ]------------ [ 220.281000] refcount_t: underflow; use-after-free. [ 220.281019] WARNING: CPU: 1 PID: 3746 at lib/refcount.c:28 refcount_warn_saturate+0xba/0x110 [ 220.281029] ------------[ cut here ]------------ [ 220.281415] CPU: 1 PID: 3746 Comm: chrome:cs0 Tainted: G W L ------- --- 5.20.0-0.rc0.20220812git7ebfc85e2cd7.10.fc38.x86_64 #1 [ 220.281421] Hardware name: System manufacturer System Product Name/ROG STRIX X570-I GAMING, BIOS 4403 04/27/2022 [ 220.281426] RIP: 0010:refcount_warn_saturate+0xba/0x110 [ 220.281431] Code: 01 01 e8 79 4a 6f 00 0f 0b e9 42 47 a5 00 80 3d de 7e be 01 00 75 85 48 c7 c7 f8 98 8e 98 c6 05 ce 7e be 01 01 e8 56 4a 6f 00 <0f> 0b e9 1f 47 a5 00 80 3d b9 7e be 01 00 0f 85 5e ff ff ff 48 c7 [ 220.281437] RSP: 0018:ffffb4b0d18d7a80 EFLAGS: 00010282 [ 220.281443] RAX: 0000000000000026 RBX: 0000000000000003 RCX: 0000000000000000 [ 220.281448] RDX: 0000000000000001 RSI: ffffffff988d06dc RDI: 00000000ffffffff [ 220.281452] RBP: 00000000ffffffff R08: 0000000000000000 R09: ffffb4b0d18d7930 [ 220.281457] R10: 0000000000000003 R11: ffffa0672e2fffe8 R12: ffffa058ca360400 [ 220.281461] R13: ffffa05846c50a18 R14: 00000000fffffe00 R15: 0000000000000003 [ 220.281465] FS: 00007f82683e06c0(0000) GS:ffffa066e2e00000(0000) knlGS:0000000000000000 [ 220.281470] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 220.281475] CR2: 00003590005cc000 CR3: 00000001fca46000 CR4: 0000000000350ee0 [ 220.281480] Call Trace: [ 220.281485] [ 220.281490] amdgpu_cs_ioctl+0x4e2/0x2070 [amdgpu] [ 220.281806] ? amdgpu_cs_find_mapping+0xe0/0xe0 [amdgpu] [ 220.282028] drm_ioctl_kernel+0xa4/0x150 [ 220.282043] drm_ioctl+0x21f/0x420 [ 220.282053] ? amdgpu_cs_find_mapping+0xe0/0xe0 [amdgpu] [ 220.282275] ? lock_release+0x14f/0x460 [ 220.282282] ? _raw_spin_unlock_irqrestore+0x30/0x60 [ 220.282290] ? _raw_spin_unlock_irqrestore+0x30/0x60 [ 220.282297] ? lockdep_hardirqs_on+0x7d/0x100 [ 220.282305] ? _raw_spin_unlock_irqrestore+0x40/0x60 [ 220.282317] amdgpu_drm_ioctl+0x4a/0x80 [amdgpu] [ 220.282534] __x64_sys_ioctl+0x90/0xd0 [ 220.282545] do_syscall_64+0x5b/0x80 [ 220.282551] ? futex_wake+0x6c/0x150 [ 220.282568] ? lock_is_held_type+0xe8/0x140 [ 220.282580] ? do_syscall_64+0x67/0x80 [ 220.282585] ? lockdep_hardirqs_on+0x7d/0x100 [ 220.282592] ? do_syscall_64+0x67/0x80 [ 220.282597] ? do_syscall_64+0x67/0x80 [ 220.282602] ? lockdep_hardirqs_on+0x7d/0x100 [ 220.282609] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 220.282616] RIP: 0033:0x7f8282a4f8bf [ 220.282639] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 18 48 8b 44 24 18 64 48 2b 04 25 28 00 00 [ 220.282644] RSP: 002b:00007f82683df410 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 220.282651] RAX: ffffffffffffffda RBX: 00007f82683df588 RCX: 00007f8282a4f8bf [ 220.282655] RDX: 00007f82683df4d0 RSI: 00000000c0186444 RDI: 0000000000000018 [ 220.282659] RBP: 00007f82683df4d0 R08: 00007f82683df5e0 R09: 00007f82683df4b0 [ 220.282663] R10: 00001d04000a0600 R11: 0000000000000246 R12: 00000000c0186444 [ 220.282667] R13: 0000000000000018 R14: 00007f82683df588 R15: 0000000000000003 [ 220.282689] [ 220.282693] irq event stamp: 6232311 [ 220.282697] hardirqs last enabled at (6232319): [] __up_console_sem+0x5e/0x70 [ 220.282704] hardirqs last disabled at (6232326): [] __up_console_sem+0x43/0x70 [ 220.282709] softirqs last enabled at (6232072): [] __irq_exit_rcu+0xf9/0x170 [ 220.282716] softirqs last disabled at (6232061): [] __irq_exit_rcu+0xf9/0x170 [ 220.282722] ---[ end trace 0000000000000000 ]--- Therefore, remove the mutex_unlock from the amdgpu_cs_vm_handling function, so that amdgpu_cs_submit and amdgpu_cs_parser_fini can handle the unlock. Fixes: 90af0ca047f3 ("drm/amdgpu: Protect the amdgpu_bo_list list with a mutex v2") Reported-by: Mikhail Gavrilov Reviewed-by: Christian König Reviewed-by: Melissa Wen Signed-off-by: Maíra Canal Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit de8341ee3ce7316883e836a2c4e9bf01ab651e0f Author: Mukul Joshi Date: Fri Aug 12 15:23:51 2022 -0400 drm/amdgpu: Fix interrupt handling on ih_soft ring There are no backing hardware registers for ih_soft ring. As a result, don't try to access hardware registers for read and write pointers when processing interrupts on the IH soft ring. Signed-off-by: Mukul Joshi Acked-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 7 ++++++- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 7 ++++++- drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) commit e42dfa66d59240afbdd8d4b47b87486db39504aa Author: Shane Xiao Date: Mon Aug 15 16:32:15 2022 +0800 drm/amdgpu: Add secure display TA load for Renoir Add secure display TA load for Renoir Signed-off-by: Shane Xiao Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit fbe43dcd1aad7dbcee1cffdbe6c3e1d62c85f76a Author: Alvin Lee Date: Thu Aug 4 14:42:47 2022 -0400 drm/amd/display: Include scaling factor for SubVP command [Description] For SubVP scaling cases, we must include the scaling info as part of the cmd. This is required when converting OTG line to HUBP line for the MALL_START_LINE programming. Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/conversion.c | 21 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/basics/conversion.h | 3 +++ drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 11 +++++++++++ .../gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 2 +- 4 files changed, 36 insertions(+), 1 deletion(-) commit 385bf5a856c196d5997ce4111a23df7e1b679c17 Author: Khalid Masum Date: Tue Aug 16 00:34:25 2022 +0600 drm/amdgpu/vcn: Return void from the stop_dbg_mode There is no point in returning an int here. It only returns 0 which the caller never uses. Therefore return void and remove the unnecessary assignment. Addresses-Coverity: 1504988 ("Unused value") Fixes: 8da1170a16e4 ("drm/amdgpu: add VCN4 ip block support") Reviewed-by: Ruijing Dong Suggested-by: Ruijing Dong Suggested-by: Greg Kroah-Hartman Signed-off-by: Khalid Masum Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit bf7f7efbe051a59e9d0710cd26ea05f7ebc411a2 Author: Andrey Strachuk Date: Tue Jul 19 13:39:54 2022 +0300 drm/amdgpu: remove useless condition in amdgpu_job_stop_all_jobs_on_sched() Local variable 'rq' is initialized by an address of field of drm_sched_job, so it does not make sense to compare 'rq' with NULL. Found by Linux Verification Center (linuxtesting.org) with SVACE. Reviewed-by: Andrey Grodzovsky Signed-off-by: Andrey Strachuk Fixes: 7c6e68c777f1 ("drm/amdgpu: Avoid HW GPU reset for RAS.") Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 4 ---- 1 file changed, 4 deletions(-) commit 1af9add1f1512b10d9ce44ec7137612bc81ff069 Author: Harish Kasiviswanathan Date: Fri Aug 5 18:04:08 2022 -0400 drm/amdgpu: Add decode_iv_ts helper for ih_v6 block Was missing. Add it. Signed-off-by: Harish Kasiviswanathan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 1 + 1 file changed, 1 insertion(+) commit ca01eba4e5b6b50144a62d7704763c41b68a0de9 Author: Samson Tam Date: Mon Jul 25 14:04:26 2022 -0400 drm/amd/display: add chip revision to DCN32 [Why & How] Add GC_11_0_3_A0 as a chip revision to the DCN32 family Reviewed-by: Rodrigo Siqueira Acked-by: Brian Chang Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/include/dal_asic_id.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5544a7b5a07480192eb5fd3536462faed2c21528 Author: Charlene Liu Date: Fri Aug 5 12:59:47 2022 -0400 drm/amd/display: avoid doing vm_init multiple time [why] this is to ensure that driver will not reprogram hvm_prefetch_req again if it is done. Reviewed-by: Martin Leung Acked-by: Brian Chang Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit c65c71ae85095f94aae32d86aa78811318bf6a90 Author: Alvin Lee Date: Sat Aug 6 12:00:26 2022 -0400 drm/amd/display: Use pitch when calculating size to cache in MALL [Description] Use pitch when calculating size to cache in MALL Reviewed-by: Samson Tam Acked-by: Brian Chang Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31ec699ac5d8d17c4f696888708bb6b2567dfcd4 Author: Alvin Lee Date: Fri Aug 5 16:18:31 2022 -0400 drm/amd/display: Don't set DSC for phantom pipes [Description] Don't set DSC bit for phantom pipes, not required since phantom pipe don't have any actual output Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 1 + 1 file changed, 1 insertion(+) commit 19f7b8334484d6b610c8eb527c3f56cb42bc8bf1 Author: Nicholas Kazlauskas Date: Fri Aug 5 12:02:10 2022 -0400 drm/amd/display: Update clock table policy for DCN314 [Why & How] Depending on how the clock table is constructed from PMFW we can run into issues where we don't think we have enough bandwidth available due to FCLK too low - eg. when the FCLK table contains invalid entries or a single entry. We should always pick up the maximum clocks for each state as a final state in this case to prevent validation from failing if the table is malformed. We should also contain sensible defaults in the case where values are invalid. Redfine the clock table structures by adding a 314 prefix to make debugging these issues easier by avoiding symbol name clashes. Overall this policy more closely aligns to how we did things for 315, but because of how the voltage rail is setup we should favor keeping DCFCLK low rather than DISPCLK or DPPCLK - so use the max for those in every entry. Reviewed-by: Daniel Miess Acked-by: Brian Chang Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c | 186 ++++++++++++++------- .../drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.h | 33 +++- 2 files changed, 154 insertions(+), 65 deletions(-) commit dd49c07f3ab67e8d7ae7b8231b88a746c668b4e8 Author: Chaitanya Dhere Date: Wed Jul 27 15:48:30 2022 -0400 drm/amd/display: Modify header inclusion pattern [Why] Recent backport from opensource broke the Nightly tool build that tests DC and DML for bugs and regressions. This was because the backport had a header inclusion that was not consistent with the AMD style of including headers was allowed to be merged back in DML code that caused tool compilation failures. [How] Modify the way in which the header file in included so that it is consistent with AMD style of including headers. This then automatically fixes the tool compilation process and also helps maintain the code quality and consistency. Reviewed-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Chaitanya Dhere Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c | 2 +- drivers/gpu/drm/amd/display/dc/dml/dcn31/display_rq_dlg_calc_31.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e98459c06e3d45c2229b097f7b8cdd412357fa2f Author: Tom Chung Date: Wed Aug 3 15:15:17 2022 +0800 drm/amd/display: Fix plug/unplug external monitor will hang while playback MPO video [Why] Pipes for MPO primary and overlay will be power down and power up during plug/unplug external monitor while MPO video playback. But the pipes were the same after plug/unplug and should not need to be power down and power up or it will make page flip interrupt disabled and cause hang issue. [How] Add pipe split change condition that not only check the top pipe pointer but also check the index of top pipe if both top pipes are available. Reviewed-by: Sun peng Li Acked-by: Brian Chang Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit d83a348b172dd7f9f10f049b3fd7e44cf4d2ed8a Author: Daniel Miess Date: Tue Aug 2 16:53:47 2022 -0400 drm/amd/display: Add debug parameter to retain default clock table [Why] Need a way to retain default clock table to aid the investigation into why 8k@30 display not lighting up on dcn314 [How] Use flag to prevent execution of bw_params helper function and function for updating bw_bounding_box Reviewed-by: Nicholas Kazlauskas Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Daniel Miess Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) commit 373008bfc9cdb0f050258947fa5a095f0657e1bc Author: Dusica Milinkovic Date: Wed Aug 10 09:43:15 2022 +0200 drm/amdgpu: Increase tlb flush timeout for sriov [Why] During multi-vf executing benchmark (Luxmark) observed kiq error timeout. It happenes because all of VFs do the tlb invalidation at the same time. Although each VF has the invalidate register set, from hardware side the invalidate requests are queue to execute. [How] In case of 12 VF increase timeout on 12*100ms Signed-off-by: Dusica Milinkovic Acked-by: Shaoyun Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) commit c7dafdfa90f708b6e4630abf824ba388a3947400 Author: Josip Pavic Date: Fri Jul 29 11:08:09 2022 -0400 drm/amd/display: do not compare integers of different widths [Why & How] Increase width of some variables to avoid comparing integers of different widths. Reviewed-by: Alvin Lee Acked-by: Brian Chang Signed-off-by: Josip Pavic Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5c1943820156e9a120faba320a72578578a69ab8 Author: Ian Chen Date: Tue Aug 2 15:13:37 2022 +0800 drm/amd/display: Add reserved dc_log_type. Reviewed-by: Anthony Koo Acked-by: Brian Chang Signed-off-by: Ian Chen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/include/logger_types.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 04fb918bf421b299feaee1006e82921d7d381f18 Author: Ilya Bakoulin Date: Tue Jul 26 16:19:38 2022 -0400 drm/amd/display: Fix pixel clock programming [Why] Some pixel clock values could cause HDMI TMDS SSCPs to be misaligned between different HDMI lanes when using YCbCr420 10-bit pixel format. BIOS functions for transmitter/encoder control take pixel clock in kHz increments, whereas the function for setting the pixel clock is in 100Hz increments. Setting pixel clock to a value that is not on a kHz boundary will cause the issue. [How] Round pixel clock down to nearest kHz in 10/12-bpc cases. Reviewed-by: Aric Cyr Acked-by: Brian Chang Signed-off-by: Ilya Bakoulin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 2 ++ 1 file changed, 2 insertions(+) commit 84435d1d912140958213beda37c708ec3072b5e1 Author: Aric Cyr Date: Mon Aug 1 20:17:54 2022 -0400 drm/amd/display: 3.2.198 This version brings along following fixes: -Fix edp panel missing event -Set ARGB16161616 pixel format to 26 -Fix dcn32 interger issue -Clear optc underflow bit after ODM clock off -Fix issue with stereo3D -Fix DML2 lightup issue -Correct DTBCLK for dcn314 -Revert for a regression -Fix clocks and bugs in DML2 -Enable SubVP by defalut on DCN32 & DCN321 -Corret boundary condition for engin ID on DCN303 -Fix FRL encoder override registry key -Fix VPG for dcn314 HPO -Fix Linux compile-time warning -Add new prefetch modes in DML for DCN32 Acked-by: Brian Chang Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0df49b3045180fdd23dc27193344a767cf68fe1 Author: Ethan Wellenreiter Date: Fri Jul 29 13:45:51 2022 -0400 drm/amd/display: reverted limiting vscsdp_for_colorimetry and ARGB16161616 pixel format addition [WHY] Limiting vscsdp_for_colorimetry for YCbCr420/BT2020 resulted in red/green point failures in HDR10 DTN tests. The re-implementation of ARGB16161616 was to fix this however it did not actually fix this issue but a side effect of the issue. [HOW] Change ARGB16161616 pixel format to 26. Reviewed-by: Martin Leung Acked-by: Brian Chang Signed-off-by: Ethan Wellenreiter Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 2 -- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 3 --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c | 2 -- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c | 3 --- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c | 2 -- 5 files changed, 12 deletions(-) commit 5a0918b4cb90a90fc8d8bfd9b0f81efe6651951f Author: Tim Huang Date: Fri Aug 12 11:37:37 2022 +0800 drm/amd/pm: Enable GFXOFF feature for SMU IP v13.0.4 The driver needs to set EnableGfxImu message parameter to tell the PMFW to set the flag that enables the GFXOFF feature. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fa0bbd3be91dd46f4e56e5cf1fb6e8c2837c649c Author: Tim Huang Date: Fri Jul 29 15:22:44 2022 +0800 drm/amdgpu: enable IH Clock Gating for OSS IP v6.0.1 Enable AMD_CG_SUPPORT_IH_CG support. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + 1 file changed, 1 insertion(+) commit 7d50b92d588d1e7bdcf38f523200b7b113b46c14 Author: Dan Carpenter Date: Fri Aug 12 09:20:58 2022 +0300 drm/amdkfd: potential crash in kfd_create_indirect_link_prop() This code has two bugs. If kfd_topology_device_by_proximity_domain() failed on the first iteration through the loop then "cpu_link" is uninitialized and should not be dereferenced. The second bug is that we cannot dereference a list iterator when it points to the list head. In other words, if we exit the list_for_each_entry() loop exits without hitting a break then "cpu_link" is not a valid pointer and should not be dereferenced. Fix both of these problems by setting "cpu_link" to NULL when it is invalid and non-NULL when it is valid. That makes it easier to test for valid vs invalid. Fixes: 0f28cca87e9a ("drm/amdkfd: Extend KFD device topology to surface peer-to-peer links") Signed-off-by: Dan Carpenter Signed-off-by: Felix Kuehling Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit e48e6a131d34de54ce6852149e4c97c2208f45cc Author: Yifan Zhang Date: Wed Aug 10 22:09:36 2022 +0800 drm/amdkfd: reserve 2 queues for sdma 6.0.1 in bitmap There is only one engine in sdma 6.0.1, the total number of reserved queues should be 2, reflect this number in bitmap as well. Signed-off-by: Yifan Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 8e78c7c4fe29f7ab8f87634c5f4dedc66107e66b Author: Tim Huang Date: Fri Jul 29 15:21:08 2022 +0800 drm/amdgpu: enable ATHUB IP v3.0.1 Clock Gating Enable AMD_CG_SUPPORT_ATHUB_MGCG and AMD_CG_SUPPORT_ATHUB_LS support. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 2 ++ 1 file changed, 2 insertions(+) commit 7e4a77de08f655e159e6355bdfbea73be71fab88 Author: Tim Huang Date: Fri Jul 29 15:18:10 2022 +0800 drm/amdgpu: enable HDP IP v5.2.1 Clock Gating Enable AMD_CG_SUPPORT_HDP_MGCG and AMD_CG_SUPPORT_HDP_LS support. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 6 ++++++ 1 file changed, 6 insertions(+) commit adcd15dc47dadfb176a14fa74af5b0cb0f659f2d Author: Tim Huang Date: Fri Jul 29 15:13:03 2022 +0800 drm/amdgpu: enable MMHUB IP v3.0.1 Clock Gating Enable AMD_CG_SUPPORT_MC_MGCG and AMD_CG_SUPPORT_MC_LS support. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 2 ++ 1 file changed, 2 insertions(+) commit cede849e9e2755084798236735d045298f9d9979 Author: Tim Huang Date: Tue Aug 9 16:26:05 2022 +0800 drm/amdgpu: add ATHUB IP v3.0.1 Clock Gating support Add ATHUB IP v3.0.1 in athub_v3_0_set_clockgating. The regATHUB_MISC_CNTL has different offset for ATHUB IP v3.0.1, so need to add IP version checking to use the right REG offset. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/athub_v3_0.c | 42 +++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 5 deletions(-) commit 73c49a624a8db1ec38b138741203d9d7c76eedd7 Author: Tim Huang Date: Tue Aug 9 18:59:49 2022 +0800 drm/amdgpu: add HDP IP v5.2.1 Clock Gating support Add set/get_clockgating for HDP IP v5.2.1. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/hdp_v5_2.c | 150 ++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) commit 8172cebac588c3c5e238d02be30914fbbc5b1234 Author: Tim Huang Date: Tue Aug 9 17:46:39 2022 +0800 drm/amdgpu: add MMHUB IP v3.0.1 Clock Gating support Add set/get_clockgating for MMHUB IP v3.0.1. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.c | 42 ++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) commit c8007d362c0150aef34323702e7fa996fa0cfd8d Author: Tim Huang Date: Tue Aug 9 14:42:46 2022 +0800 drm/amd/pm: update the smu driver interface version for SMU IP v13.0.4 The pmfw has changed the driver interface version, so keep same with the fw. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c02895577b834a6148f6d9d0006a6f196511cc79 Author: Felix Kuehling Date: Mon Aug 8 17:00:38 2022 -0400 drm/amdkfd: Fix mm reference in SVM eviction worker Use the mm reference from the fence. This allows removing the svm_bo->svms pointer, which was problematic because we cannot assume that the struct kfd_process containing the svms is still allocated without holding a refcount on the process. Use mmget_not_zero to ensure the mm is still valid, and drop the svm_bo reference if it isn't. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 17 +++++++---------- drivers/gpu/drm/amd/amdkfd/kfd_svm.h | 1 - 2 files changed, 7 insertions(+), 11 deletions(-) commit ea8793f214ce1e4db205390c0241955f7ff6f383 Author: Kenneth Feng Date: Thu Aug 11 16:38:52 2022 +0800 drm/amd/pm: add mode1 support on smu_v13_0_7 add mode1 support since it's missing on smu_v13_0_7 Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b4ddb27d1dc7349fc882dbb7702bd2628fe27af6 Author: Kenneth Feng Date: Thu Aug 11 09:48:00 2022 +0800 drm/amd/amdgpu: add ih cg and hdp sd on smu_v13_0_7 add ih cg and hdp sd on smu_v13_0_7 Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4bac1c846eff8042dd59ddecd0a43f3b9de5fd23 Author: Evan Quan Date: Wed Aug 10 11:11:16 2022 +0800 drm/amd/pm: add missing ->fini_xxxx interfaces for some SMU13 asics Without these, potential memory leak may be induced. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 ++ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 2 ++ 2 files changed, 4 insertions(+) commit 0a2d922a5618377cdf8fa476351362733ef55342 Author: Evan Quan Date: Wed Aug 10 11:08:31 2022 +0800 drm/amd/pm: add missing ->fini_microcode interface for Sienna Cichlid To avoid any potential memory leak. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 1 + 1 file changed, 1 insertion(+) commit 1b586595df6d04c27088ef348b8202204ce26d45 Author: Evan Quan Date: Wed Aug 3 16:13:56 2022 +0800 drm/amdgpu: disable 3DCGCG/CGLS temporarily due to stability issue Some stability issues were reported with these features. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 2 ++ 1 file changed, 2 insertions(+) commit 012e8d2034f1bda8863435cd589636e618d6a659 Author: Andrew Donnellan Date: Tue Aug 16 15:17:20 2022 +1000 gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin disabled for a file Commit 36d4b36b6959 ("lib/nodemask: inline next_node_in() and node_random()") refactored some code by moving node_random() from lib/nodemask.c to include/linux/nodemask.h, thus requiring nodemask.h to include random.h, which conditionally defines add_latent_entropy() depending on whether the macro LATENT_ENTROPY_PLUGIN is defined. This broke the build on powerpc, where nodemask.h is indirectly included in arch/powerpc/kernel/prom_init.c, part of the early boot machinery that is excluded from the latent entropy plugin using DISABLE_LATENT_ENTROPY_PLUGIN. It turns out that while we add a gcc flag to disable the actual plugin, we don't undefine LATENT_ENTROPY_PLUGIN. This leads to the following: CC arch/powerpc/kernel/prom_init.o In file included from ./include/linux/nodemask.h:97, from ./include/linux/mmzone.h:17, from ./include/linux/gfp.h:7, from ./include/linux/xarray.h:15, from ./include/linux/radix-tree.h:21, from ./include/linux/idr.h:15, from ./include/linux/kernfs.h:12, from ./include/linux/sysfs.h:16, from ./include/linux/kobject.h:20, from ./include/linux/pci.h:35, from arch/powerpc/kernel/prom_init.c:24: ./include/linux/random.h: In function 'add_latent_entropy': ./include/linux/random.h:25:46: error: 'latent_entropy' undeclared (first use in this function); did you mean 'add_latent_entropy'? 25 | add_device_randomness((const void *)&latent_entropy, sizeof(latent_entropy)); | ^~~~~~~~~~~~~~ | add_latent_entropy ./include/linux/random.h:25:46: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [scripts/Makefile.build:249: arch/powerpc/kernel/prom_init.o] Fehler 1 make[1]: *** [scripts/Makefile.build:465: arch/powerpc/kernel] Fehler 2 make: *** [Makefile:1855: arch/powerpc] Error 2 Change the DISABLE_LATENT_ENTROPY_PLUGIN flags to undefine LATENT_ENTROPY_PLUGIN for files where the plugin is disabled. Cc: Yury Norov Fixes: 38addce8b600 ("gcc-plugins: Add latent_entropy plugin") Link: https://bugzilla.kernel.org/show_bug.cgi?id=216367 Link: https://lore.kernel.org/linuxppc-dev/alpine.DEB.2.22.394.2208152006320.289321@ramsan.of.borg/ Reported-by: Erhard Furtner Signed-off-by: Andrew Donnellan Reviewed-by: Yury Norov Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220816051720.44108-1-ajd@linux.ibm.com scripts/Makefile.gcc-plugins | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a3981af3fd97fec57f2c5eeca213cbf5216a3c0 Author: Kees Cook Date: Tue Aug 16 12:14:54 2022 -0700 LoadPin: Return EFAULT on copy_from_user() failures The copy_from_user() function returns the number of bytes remaining to be copied on a failure. Such failures should return -EFAULT to high levels. Reported-by: kernel test robot Reported-by: Dan Carpenter Fixes: 3f805f8cc23b ("LoadPin: Enable loading from trusted dm-verity devices") Cc: Matthias Kaehlcke Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-security-module@vger.kernel.org Signed-off-by: Kees Cook security/loadpin/loadpin.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3a608cfee97e99b3fff9ffe62246a098042e725d Author: Fabio M. De Francesco Date: Wed Aug 3 20:28:56 2022 +0200 exec: Replace kmap{,_atomic}() with kmap_local_page() The use of kmap() and kmap_atomic() are being deprecated in favor of kmap_local_page(). There are two main problems with kmap(): (1) It comes with an overhead as mapping space is restricted and protected by a global lock for synchronization and (2) it also requires global TLB invalidation when the kmap’s pool wraps and it might block when the mapping space is fully utilized until a slot becomes available. With kmap_local_page() the mappings are per thread, CPU local, can take page faults, and can be called from any context (including interrupts). It is faster than kmap() in kernels with HIGHMEM enabled. Furthermore, the tasks can be preempted and, when they are scheduled to run again, the kernel virtual addresses are restored and are still valid. Since the use of kmap_local_page() in exec.c is safe, it should be preferred everywhere in exec.c. As said, since kmap_local_page() can be also called from atomic context, and since remove_arg_zero() doesn't (and shouldn't ever) rely on an implicit preempt_disable(), this function can also safely replace kmap_atomic(). Therefore, replace kmap() and kmap_atomic() with kmap_local_page() in fs/exec.c. Tested with xfstests on a QEMU/KVM x86_32 VM, 6GB RAM, booting a kernel with HIGHMEM64GB enabled. Cc: Eric W. Biederman Suggested-by: Ira Weiny Reviewed-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220803182856.28246-1-fmdefrancesco@gmail.com fs/exec.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 3cc40a443a04d52b0c95255dce264068b01e9bfe Merge: 339800d50b41 fd0c153daad1 Author: Linus Torvalds Date: Tue Aug 16 11:42:11 2022 -0700 Merge tag 'nios2_fixes_v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux Pull NIOS2 fixes from Dinh Nguyen: - Security fixes from Al Viro * tag 'nios2_fixes_v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: nios2: add force_successful_syscall_return() nios2: restarts apply only to the first sigframe we build... nios2: fix syscall restart checks nios2: traced syscall does need to check the syscall number nios2: don't leave NULLs in sys_call_table[] nios2: page fault et.al. are *not* restartable syscalls... commit 339800d50b411d617fb3298d478921e6626032e7 Merge: 15df6486ae56 2fd92c7b8fe2 Author: Linus Torvalds Date: Tue Aug 16 11:40:15 2022 -0700 Merge tag 'spi-fix-v6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A few fixes that came in since my pull request, the Meson fix is a little large since it's fixing all possible cases of the problem that was observed with the driver and clock API trying to share configuration by integrating the device clocking fully with the clock API rather than spot fixing the one instance that was observed" * tag 'spi-fix-v6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: dt-bindings: Drop Pratyush Yadav spi: meson-spicc: add local pow2 clock ops to preserve rate between messages MAINTAINERS: rectify entry for ARM/HPE GXP ARCHITECTURE spi: spi.c: Add missing __percpu annotations in users of spi_statistics commit 15df6486ae56f259650159340a495406f427b2ea Merge: c4e34dd99f2e d511e8a7e850 Author: Linus Torvalds Date: Tue Aug 16 11:36:38 2022 -0700 Merge tag 'regulator-fix-v6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A couple of small fixes that came in since my pull request, nothing major here" * tag 'regulator-fix-v6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: core: Fix missing error return from regulator_bulk_get() regulator: pca9450: Remove restrictions for regulator-name commit c4e34dd99f2e3fdfc63584078ce0fed20f4e7386 Author: Linus Torvalds Date: Sun Aug 14 14:16:13 2022 -0700 x86: simplify load_unaligned_zeropad() implementation The exception for the "unaligned access at the end of the page, next page not mapped" never happens, but the fixup code ends up causing trouble for compilers to optimize well. clang in particular ends up seeing it being in the middle of a loop, and tries desperately to optimize the exception fixup code that is never really reached. The simple solution is to just move all the fixups into the exception handler itself, which moves it all out of the hot case code, and means that the compiler never sees it or needs to worry about it. Acked-by: Peter Zijlstra Signed-off-by: Linus Torvalds arch/x86/include/asm/extable_fixup_types.h | 2 ++ arch/x86/include/asm/word-at-a-time.h | 46 ++----------------------- arch/x86/mm/extable.c | 55 ++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 43 deletions(-) commit 2f945a792f67815abca26fa8a5e863ccf3fa1181 Author: Sergey Shtylyov Date: Sat Aug 13 23:34:16 2022 +0300 of: fdt: fix off-by-one error in unflatten_dt_nodes() Commit 78c44d910d3e ("drivers/of: Fix depth when unflattening devicetree") forgot to fix up the depth check in the loop body in unflatten_dt_nodes() which makes it possible to overflow the nps[] buffer... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Fixes: 78c44d910d3e ("drivers/of: Fix depth when unflattening devicetree") Signed-off-by: Sergey Shtylyov Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/7c354554-006f-6b31-c195-cdfe4caee392@omp.ru drivers/of/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0feea594e058223973db94c1c32a830c9807c86 Author: Tetsuo Handa Date: Fri Jul 29 13:30:23 2022 +0900 workqueue: don't skip lockdep work dependency in cancel_work_sync() Like Hillf Danton mentioned syzbot should have been able to catch cancel_work_sync() in work context by checking lockdep_map in __flush_work() for both flush and cancel. in [1], being unable to report an obvious deadlock scenario shown below is broken. From locking dependency perspective, sync version of cancel request should behave as if flush request, for it waits for completion of work if that work has already started execution. ---------- #include #include static DEFINE_MUTEX(mutex); static void work_fn(struct work_struct *work) { schedule_timeout_uninterruptible(HZ / 5); mutex_lock(&mutex); mutex_unlock(&mutex); } static DECLARE_WORK(work, work_fn); static int __init test_init(void) { schedule_work(&work); schedule_timeout_uninterruptible(HZ / 10); mutex_lock(&mutex); cancel_work_sync(&work); mutex_unlock(&mutex); return -EINVAL; } module_init(test_init); MODULE_LICENSE("GPL"); ---------- The check this patch restores was added by commit 0976dfc1d0cd80a4 ("workqueue: Catch more locking problems with flush_work()"). Then, lockdep's crossrelease feature was added by commit b09be676e0ff25bd ("locking/lockdep: Implement the 'crossrelease' feature"). As a result, this check was once removed by commit fd1a5b04dfb899f8 ("workqueue: Remove now redundant lock acquisitions wrt. workqueue flushes"). But lockdep's crossrelease feature was removed by commit e966eaeeb623f099 ("locking/lockdep: Remove the cross-release locking checks"). At this point, this check should have been restored. Then, commit d6e89786bed977f3 ("workqueue: skip lockdep wq dependency in cancel_work_sync()") introduced a boolean flag in order to distinguish flush_work() and cancel_work_sync(), for checking "struct workqueue_struct" dependency when called from cancel_work_sync() was causing false positives. Then, commit 87915adc3f0acdf0 ("workqueue: re-add lockdep dependencies for flushing") tried to restore "struct work_struct" dependency check, but by error checked this boolean flag. Like an example shown above indicates, "struct work_struct" dependency needs to be checked for both flush_work() and cancel_work_sync(). Link: https://lkml.kernel.org/r/20220504044800.4966-1-hdanton@sina.com [1] Reported-by: Hillf Danton Suggested-by: Lai Jiangshan Fixes: 87915adc3f0acdf0 ("workqueue: re-add lockdep dependencies for flushing") Cc: Johannes Berg Signed-off-by: Tetsuo Handa Signed-off-by: Tejun Heo kernel/workqueue.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 415d832497098030241605c52ea83d4e2cfa7879 Author: Hector Martin Date: Tue Aug 16 16:03:11 2022 +0900 locking/atomic: Make test_and_*_bit() ordered on failure These operations are documented as always ordered in include/asm-generic/bitops/instrumented-atomic.h, and producer-consumer type use cases where one side needs to ensure a flag is left pending after some shared data was updated rely on this ordering, even in the failure case. This is the case with the workqueue code, which currently suffers from a reproducible ordering violation on Apple M1 platforms (which are notoriously out-of-order) that ends up causing the TTY layer to fail to deliver data to userspace properly under the right conditions. This change fixes that bug. Change the documentation to restrict the "no order on failure" story to the _lock() variant (for which it makes sense), and remove the early-exit from the generic implementation, which is what causes the missing barrier semantics in that case. Without this, the remaining atomic op is fully ordered (including on ARM64 LSE, as of recent versions of the architecture spec). Suggested-by: Linus Torvalds Cc: stable@vger.kernel.org Fixes: e986a0d6cb36 ("locking/atomics, asm-generic/bitops/atomic.h: Rewrite using atomic_*() APIs") Fixes: 61e02392d3c7 ("locking/atomic/bitops: Document and clarify ordering semantics for failed test_and_{}_bit()") Signed-off-by: Hector Martin Acked-by: Will Deacon Reviewed-by: Arnd Bergmann Signed-off-by: Linus Torvalds Documentation/atomic_bitops.txt | 2 +- include/asm-generic/bitops/atomic.h | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) commit 57c942bc3bef0970f0b21f8e0998e76a900ea80d Author: Alan Brady Date: Tue Aug 2 10:19:17 2022 +0200 i40e: Fix to stop tx_timeout recovery if GLOBR fails When a tx_timeout fires, the PF attempts to recover by incrementally resetting. First we try a PFR, then CORER and finally a GLOBR. If the GLOBR fails, then we keep hitting the tx_timeout and incrementing the recovery level and issuing dmesgs, which is both annoying to the user and accomplishes nothing. If the GLOBR fails, then we're pretty much totally hosed, and there's not much else we can do to recover, so this makes it such that we just kill the VSI and stop hitting the tx_timeout in such a case. Fixes: 41c445ff0f48 ("i40e: main driver core") Signed-off-by: Alan Brady Signed-off-by: Mateusz Palczewski Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2c6482091f01ba104cf8ee549aa5c717e80d43ea Author: Przemyslaw Patynowski Date: Wed Jul 27 11:19:40 2022 +0200 i40e: Fix tunnel checksum offload with fragmented traffic Fix checksum offload on VXLAN tunnels. In case, when mpls protocol is not used, set l4 header to transport header of skb. This fixes case, when user tries to offload checksums of VXLAN tunneled traffic. Steps for reproduction (requires link partner with tunnels): ip l s enp130s0f0 up ip a f enp130s0f0 ip a a 10.10.110.2/24 dev enp130s0f0 ip l s enp130s0f0 mtu 1600 ip link add vxlan12_sut type vxlan id 12 group 238.168.100.100 dev \ enp130s0f0 dstport 4789 ip l s vxlan12_sut up ip a a 20.10.110.2/24 dev vxlan12_sut iperf3 -c 20.10.110.1 #should connect Without this patch, TX descriptor was using wrong data, due to l4 header pointing wrong address. NIC would then drop those packets internally, due to incorrect TX descriptor data, which increased GLV_TEPC register. Fixes: b4fb2d33514a ("i40e: Add support for MPLS + TSO") Signed-off-by: Przemyslaw Patynowski Signed-off-by: Mateusz Palczewski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e_txrx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b16de8b9e7d1aae169d059c3a0dd9a881a3c0d1d Author: Jason Gunthorpe Date: Tue Aug 16 11:03:20 2022 -0300 RDMA: Handle the return code from dma_resv_wait_timeout() properly ib_umem_dmabuf_map_pages() returns 0 on success and -ERRNO on failure. dma_resv_wait_timeout() uses a different scheme: * Returns -ERESTARTSYS if interrupted, 0 if the wait timed out, or * greater than zero on success. This results in ib_umem_dmabuf_map_pages() being non-functional as a positive return will be understood to be an error by drivers. Fixes: f30bceab16d1 ("RDMA: use dma_resv_wait() instead of extracting the fence") Cc: stable@kernel.org Link: https://lore.kernel.org/r/0-v1-d8f4e1fa84c8+17-rdma_dmabuf_fix_jgg@nvidia.com Tested-by: Maor Gottlieb Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky drivers/infiniband/core/umem_dmabuf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 6cd8351c4ede5b3335c7eb13d009c3456e90b6df Author: Cheng Xu Date: Wed Aug 10 09:43:19 2022 +0800 RDMA/erdma: Correct the max_qp and max_cq capacities of the device QP0 in HW is used for CMDQ, and the rest is for RDMA QPs. So the actual max_qp capacity reported to core should be max_qp (reported by HW) - 1. So does max_cq. Fixes: 155055771704 ("RDMA/erdma: Add verbs implementation") Link: https://lore.kernel.org/all/20220810014320.88026-1-chengyou@linux.alibaba.com Signed-off-by: Cheng Xu Signed-off-by: Leon Romanovsky drivers/infiniband/hw/erdma/erdma_verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e01f5c8d6af231b3b09e23c1fe8a4057cdcc4e42 Author: Larry Finger Date: Sun Aug 14 12:50:27 2022 -0500 staging: r8188eu: Add Rosewill USB-N150 Nano to device tables This device is reported as using the RTL8188EUS chip. It has the improbable USB ID of 0bda:ffef, which normally would belong to Realtek, but this ID works for the reporter. Signed-off-by: Larry Finger Cc: stable Link: https://lore.kernel.org/r/20220814175027.2689-1-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/os_dep/usb_intf.c | 1 + 1 file changed, 1 insertion(+) commit 1374901b850c8f2ff1ee0e62ffafbc4030572fc6 Author: Cheng Xu Date: Wed Aug 10 09:43:20 2022 +0800 RDMA/erdma: Using the key in FMR WR instead of MR structure RDMA driver should get the MR key from FMR WR, not the MR structure passed in. Fixes: 155055771704 ("RDMA/erdma: Add verbs implementation") Link: https://lore.kernel.org/r/20220810014320.88026-2-chengyou@linux.alibaba.com Signed-off-by: Cheng Xu Signed-off-by: Leon Romanovsky drivers/infiniband/hw/erdma/erdma_qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2fa9e13bbf101c662c4cd974608242a0db98cfc Author: Grzegorz Szymaszek Date: Tue Aug 2 19:18:44 2022 +0200 staging: r8188eu: add firmware dependency The old rtl8188eu module, removed in commit 55dfa29b43d2 ("staging: rtl8188eu: remove rtl8188eu driver from staging dir") (Linux kernel v5.15-rc1), required (through a MODULE_FIRMWARE call()) the rtlwifi/rtl8188eufw.bin firmware file, which the new r8188eu driver no longer requires. I have tested a few RTL8188EUS-based Wi-Fi cards and, while supported by both drivers, they do not work when using the new one and the firmware wasn't manually loaded. According to Larry Finger, the module maintainer, all such cards need the firmware and the driver should depend on it (see the linked mails). Add a proper MODULE_FIRMWARE() call, like it was done in the old driver. Thanks to Greg Kroah-Hartman and Larry Finger for quick responses to my questions. Cc: stable Link: https://answers.launchpad.net/ubuntu/+source/linux-meta-hwe-5.15/+question/702611 Link: https://lore.kernel.org/lkml/YukkBu3TNODO3or9@nx64de-df6d00/ Signed-off-by: Grzegorz Szymaszek Link: https://lore.kernel.org/r/YulcdKfhA8dPQ78s@nx64de-df6d00 Acked-by: Phillip Potter Acked-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/os_dep/os_intfs.c | 1 + 1 file changed, 1 insertion(+) commit 70cfdd0365acf550350d8949096c0b34a96b6b48 Author: Takashi Iwai Date: Tue Aug 16 15:21:32 2022 +0200 ALSA: hda/realtek: Add quirk for Lenovo Yoga7 14IAL7 Lenovo Yoga7 14IAL7 requires the same quirk as Lenovo Yoga9 14IAP7 for fixing the bass speaker problems. Reported-by: Pascal Gross Cc: Link: https://lore.kernel.org/r/N9_CjBz--3-2@tutanota.com Link: https://lore.kernel.org/r/20220816132132.15520-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit ef0162298abf46b881e4a4d0c604d1a066228647 Author: Potnuri Bharat Teja Date: Wed Aug 10 00:11:18 2022 +0530 RDMA/cxgb4: fix accept failure due to increased cpl_t5_pass_accept_rpl size Commit 'c2ed5611afd7' has increased the cpl_t5_pass_accept_rpl{} structure size by 8B to avoid roundup. cpl_t5_pass_accept_rpl{} is a HW specific structure and increasing its size will lead to unwanted adapter errors. Current commit reverts the cpl_t5_pass_accept_rpl{} back to its original and allocates zeroed skb buffer there by avoiding the memset for iss field. Reorder code to minimize chip type checks. Fixes: c2ed5611afd7 ("iw_cxgb4: Use memset_startat() for cpl_t5_pass_accept_rpl") Link: https://lore.kernel.org/r/20220809184118.2029-1-rahul.lakkireddy@chelsio.com Signed-off-by: Potnuri Bharat Teja Signed-off-by: Rahul Lakkireddy Reviewed-by: Kees Cook Signed-off-by: Leon Romanovsky drivers/infiniband/hw/cxgb4/cm.c | 25 +++++++++---------------- drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 2 +- 2 files changed, 10 insertions(+), 17 deletions(-) commit 4b83c3caf289b80acecc539c79f10a6937cc42dd Author: Mark Bloch Date: Mon Aug 8 10:48:06 2022 +0300 RDMA/mlx5: Use the proper number of ports The cited commit allowed the driver to operate over HCAs that have 4 physical ports. Use the number of ports of the RDMA device in the for loop instead of using the struct size. Fixes: 4cd14d44b11d ("net/mlx5: Support devices with more than 2 ports") Link: https://lore.kernel.org/r/a54a56c2ede16044a29d119209b35189c662ac72.1659944855.git.leonro@nvidia.com Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/main.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit 4d4c4bff4f8ed79d95e0592aed6c6144d558a236 Author: Stefan Binding Date: Mon Aug 15 17:29:06 2022 +0100 ALSA: hda: cs35l41: Clarify support for CSC3551 without _DSD Properties For devices which use HID CSC3551, correct ACPI _DSD properties are required to be able support those systems. Add error message to clarify this. Signed-off-by: Stefan Binding Link: https://lore.kernel.org/r/20220815162906.463108-1-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 5 +++++ 1 file changed, 5 insertions(+) commit 25a3b959577953b3a441bb88e66ca8eaee46cc61 Merge: 461122b999bd b4b5f29a076e Author: Takashi Iwai Date: Tue Aug 16 15:07:55 2022 +0200 Merge tag 'asoc-fix-v6.0-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.0 A relatively large batch of fixes that came in since my pull request, none of them too major and mostly device specific apart from a series of security/robustness improvements from Takashi. commit d6d142cb7f79bec6051c5ecf744b7a5309c5a0ee Author: Sergey Gorenko Date: Fri Aug 5 09:01:35 2022 +0300 IB/iser: Fix login with authentication The iSER Initiator uses two types of receive buffers: - one big login buffer posted by iser_post_recvl(); - several small message buffers posted by iser_post_recvm(). The login buffer is used at the login phase and full feature phase in the discovery session. It may take a few requests and responses to complete the login phase. The message buffers are only used in the normal operational session at the full feature phase. After the commit referred in the fixes line, the login operation fails if the authentication is enabled. That happens because the Initiator posts a small receive buffer after the first response from Target. So, the next send operation fails because Target's second response does not fit into the small receive buffer. This commit adds additional checks to prevent posting small receive buffers until the full feature phase. Fixes: 39b169ea0d36 ("IB/iser: Fix RNR errors") Link: https://lore.kernel.org/r/20220805060135.18493-1-sergeygo@nvidia.com Signed-off-by: Sergey Gorenko Reviewed-by: Max Gurtovoy Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/iser/iser_initiator.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit e6190dd0031d335c22586d34ef898301ed20f230 Author: ZiyangZhang Date: Mon Aug 15 10:36:33 2022 +0800 ublk_drv: do not add a re-issued request aborted previously to ioucmd's task_work In ublk_queue_rq(), Assume current request is a re-issued request aborted previously in monitor_work because the ubq_daemon(ioucmd's task) is PF_EXITING. For this request, we cannot call io_uring_cmd_complete_in_task() anymore because at that moment io_uring context may be freed in case that no inflight ioucmd exists. Otherwise, we may cause null-deref in ctx->fallback_work. Add a check on UBLK_IO_FLAG_ABORTED to prevent the above situation. This check is safe and makes sense. Note: monitor_work sets UBLK_IO_FLAG_ABORTED and ends this request (releasing the tag). Then the request is restarted(allocating the tag) and we are here. Since releasing/allocating a tag implies smp_mb(), finding UBLK_IO_FLAG_ABORTED guarantees that here is a re-issued request aborted previously. Suggested-by: Ming Lei Signed-off-by: ZiyangZhang Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20220815023633.259825-4-ZiyangZhang@linux.alibaba.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit bb24174754afc5a7d185ca5406dcfbc608cdf157 Author: ZiyangZhang Date: Mon Aug 15 10:36:32 2022 +0800 ublk_drv: update comment for __ublk_fail_req() Since __ublk_rq_task_work always fails requests immediately during exiting, __ublk_fail_req() is only called from abort context during exiting. So lock is unnecessary. Signed-off-by: ZiyangZhang Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20220815023633.259825-3-ZiyangZhang@linux.alibaba.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 966120b51a245c9ff5857c5b169310c248e0ae87 Author: ZiyangZhang Date: Mon Aug 15 10:36:31 2022 +0800 ublk_drv: check ubq_daemon_is_dying() in __ublk_rq_task_work() Replace direct check on PF_EXITING in __ublk_rq_task_work() by the existing wrapper. Also inline ubq_daemon_is_dying(). Reviewed-by: Ming Lei Signed-off-by: ZiyangZhang Link: https://lore.kernel.org/r/20220815023633.259825-2-ZiyangZhang@linux.alibaba.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit dcdfa3471f9c28ee716c687d85701353e2e86fde Author: Pieterjan Camerlynck Date: Sat Aug 13 10:33:52 2022 +0200 ASoC: fsl_sai: fix incorrect mclk number in error message In commit c3ecef21c3f26 ("ASoC: fsl_sai: add sai master mode support") the loop was changed to start iterating from 1 instead of 0. The error message however was not updated, reporting the wrong clock to the user. Signed-off-by: Pieterjan Camerlynck Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20220813083353.8959-1-pieterjan.camerlynck@gmail.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b9f0c4df1c1152403c738373fb063e9ffdac0a1 Author: Juergen Gross Date: Tue Aug 16 09:11:37 2022 +0200 x86/entry: Fix entry_INT80_compat for Xen PV guests Commit c89191ce67ef ("x86/entry: Convert SWAPGS to swapgs and remove the definition of SWAPGS") missed one use case of SWAPGS in entry_INT80_compat(). Removing of the SWAPGS macro led to asm just using "swapgs", as it is accepting instructions in capital letters, too. This in turn leads to splats in Xen PV guests like: [ 36.145223] general protection fault, maybe for address 0x2d: 0000 [#1] PREEMPT SMP NOPTI [ 36.145794] CPU: 2 PID: 1847 Comm: ld-linux.so.2 Not tainted 5.19.1-1-default #1 \ openSUSE Tumbleweed f3b44bfb672cdb9f235aff53b57724eba8b9411b [ 36.146608] Hardware name: HP ProLiant ML350p Gen8, BIOS P72 11/14/2013 [ 36.148126] RIP: e030:entry_INT80_compat+0x3/0xa3 Fix that by open coding this single instance of the SWAPGS macro. Fixes: c89191ce67ef ("x86/entry: Convert SWAPGS to swapgs and remove the definition of SWAPGS") Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Reviewed-by: Jan Beulich Cc: # 5.19 Link: https://lore.kernel.org/r/20220816071137.4893-1-jgross@suse.com arch/x86/entry/entry_64_compat.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c669c4a4c6aa0489848093c93b8029f5c5c75ec Author: Ricardo Cañuelo Date: Wed Aug 10 11:40:03 2022 +0200 virtio: kerneldocs fixes and enhancements Fix variable names in some kerneldocs, naming in others. Add kerneldocs for struct vring_desc and vring_interrupt. Signed-off-by: Ricardo Cañuelo Message-Id: <20220810094004.1250-2-ricardo.canuelo@collabora.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck drivers/virtio/virtio_ring.c | 8 ++++++++ include/linux/virtio.h | 6 +++--- include/linux/virtio_config.h | 6 +++--- include/uapi/linux/virtio_ring.h | 16 +++++++++++----- 4 files changed, 25 insertions(+), 11 deletions(-) commit 9993a4f989c7ca5e227329b2878f65d05c9fc20f Author: Michael S. Tsirkin Date: Tue Aug 16 01:36:58 2022 -0400 virtio: Revert "virtio: find_vqs() add arg sizes" This reverts commit a10fba0377145fccefea4dc4dd5915b7ed87e546: the proposed API isn't supported on all transports but no effort was made to address this. It might not be hard to fix if we want to: maybe just rename size to size_hint and make sure legacy transports ignore the hint. But it's not sure what the benefit is in any case, so let's drop it. Fixes: a10fba037714 ("virtio: find_vqs() add arg sizes") Signed-off-by: Michael S. Tsirkin Message-Id: <20220816053602.173815-8-mst@redhat.com> arch/um/drivers/virtio_uml.c | 2 +- drivers/platform/mellanox/mlxbf-tmfifo.c | 1 - drivers/remoteproc/remoteproc_virtio.c | 1 - drivers/s390/virtio/virtio_ccw.c | 1 - drivers/virtio/virtio_mmio.c | 1 - drivers/virtio/virtio_pci_common.c | 2 +- drivers/virtio/virtio_pci_common.h | 2 +- drivers/virtio/virtio_pci_modern.c | 7 ++----- drivers/virtio/virtio_vdpa.c | 1 - include/linux/virtio_config.h | 14 +++++--------- 10 files changed, 10 insertions(+), 22 deletions(-) commit 9e82eb574c5d90a175ae830916af8b8a1ccc31e7 Author: Michael S. Tsirkin Date: Tue Aug 16 01:36:45 2022 -0400 virtio_vdpa: Revert "virtio_vdpa: support the arg sizes of find_vqs()" This reverts commit 99e8927d8a4da8eb8a8a5904dc13a3156be8e7c0: proposed API isn't supported on all transports but no effort was made to address this. It might not be hard to fix if we want to: maybe just rename size to size_hint and make sure legacy transports ignore the hint. But it's not sure what the benefit is in any case, so let's drop it. Fixes: 99e8927d8a4d ("virtio_vdpa: support the arg sizes of find_vqs()") Signed-off-by: Michael S. Tsirkin Message-Id: <20220816053602.173815-6-mst@redhat.com> drivers/virtio/virtio_vdpa.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 13aa8c6c37bd54eaf16f89e2e07019796fb9e681 Author: Michael S. Tsirkin Date: Tue Aug 16 01:36:40 2022 -0400 virtio_pci: Revert "virtio_pci: support the arg sizes of find_vqs()" This reverts commit cdb44806fca2d0ad29ca644cbf1505433902ee0c: the legacy path is wrong and in fact can not support the proposed API since for a legacy device we never communicate the vq size to the hypervisor. Reported-by: Andres Freund Fixes: cdb44806fca2 ("virtio_pci: support the arg sizes of find_vqs()") Signed-off-by: Michael S. Tsirkin Message-Id: <20220816053602.173815-5-mst@redhat.com> drivers/virtio/virtio_pci_common.c | 18 ++++++++---------- drivers/virtio/virtio_pci_common.h | 1 - drivers/virtio/virtio_pci_legacy.c | 6 +----- drivers/virtio/virtio_pci_modern.c | 10 +++------- 4 files changed, 12 insertions(+), 23 deletions(-) commit c62f61b58f6e41cab9c07557213b61d71e6b221c Author: Michael S. Tsirkin Date: Tue Aug 16 01:36:35 2022 -0400 virtio-mmio: Revert "virtio_mmio: support the arg sizes of find_vqs()" This reverts commit fbed86abba6e0472d98079790e58060e4332608a. The API is now unused, let's not carry dead code around. Fixes: fbed86abba6e ("virtio_mmio: support the arg sizes of find_vqs()") Signed-off-by: Michael S. Tsirkin Message-Id: <20220816053602.173815-4-mst@redhat.com> drivers/virtio/virtio_mmio.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 484b9fa4886bd9377969aad5e9ea17efda4ecda6 Author: Michael S. Tsirkin Date: Tue Aug 16 01:36:31 2022 -0400 virtio: Revert "virtio: add helper virtio_find_vqs_ctx_size()" This reverts commit fe3dc04e31aa51f91dc7f741a5f76cc4817eb5b4: the API is now unused and in fact can't be implemented on top of a legacy device. Fixes: fe3dc04e31aa ("virtio: add helper virtio_find_vqs_ctx_size()") Cc: "Xuan Zhuo" Signed-off-by: Michael S. Tsirkin Message-Id: <20220816053602.173815-3-mst@redhat.com> include/linux/virtio_config.h | 12 ------------ 1 file changed, 12 deletions(-) commit 2e9ca760c289e1f992eb2cd053e217db7934ab0a Author: Michael S. Tsirkin Date: Tue Aug 16 01:36:27 2022 -0400 virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()" This reverts commit 762faee5a2678559d3dc09d95f8f2c54cd0466a7. This has been reported to trip up guests on GCP (Google Cloud). The reason is that virtio_find_vqs_ctx_size is broken on legacy devices. We can in theory fix virtio_find_vqs_ctx_size but in fact the patch itself has several other issues: - It treats unknown speed as < 10G - It leaves userspace no way to find out the ring size set by hypervisor - It tests speed when link is down - It ignores the virtio spec advice: Both \field{speed} and \field{duplex} can change, thus the driver is expected to re-read these values after receiving a configuration change notification. - It is not clear the performance impact has been tested properly Revert the patch for now. Reported-by: Andres Freund Link: https://lore.kernel.org/r/20220814212610.GA3690074%40roeck-us.net Link: https://lore.kernel.org/r/20220815070203.plwjx7b3cyugpdt7%40awork3.anarazel.de Link: https://lore.kernel.org/r/3df6bb82-1951-455d-a768-e9e1513eb667%40www.fastmail.com Link: https://lore.kernel.org/r/FCDC5DDE-3CDD-4B8A-916F-CA7D87B547CE%40anarazel.de Fixes: 762faee5a267 ("virtio_net: set the default max ring size by find_vqs()") Cc: Xuan Zhuo Cc: Jason Wang Signed-off-by: Michael S. Tsirkin Tested-by: Andres Freund Tested-by: Guenter Roeck Message-Id: <20220816053602.173815-2-mst@redhat.com> drivers/net/virtio_net.c | 42 ++++-------------------------------------- 1 file changed, 4 insertions(+), 38 deletions(-) commit d36cb843e456324d6e725f1d8b440c4645a52d0d Author: Christophe JAILLET Date: Mon Aug 15 14:44:37 2022 +0200 OPP: Fix an un-initialized variable usage smatch complains that 'ret' may be returned un-initialized. Explicitly return 0 if we reach the end of the function (should 'opp_table->clk_count' be 0). Fixes: 8174a3a613af ("OPP: Provide a simple implementation to configure multiple clocks") Signed-off-by: Christophe JAILLET Signed-off-by: Viresh Kumar drivers/opp/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5993000dc6b31b927403cee65fbc5f9f070fa3e4 Author: Pavel Begunkov Date: Mon Aug 15 13:42:02 2022 +0100 io_uring/notif: raise limit on notification slots 1024 notification slots is rather an arbitrary value, raise it up, everything is accounted to memcg. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/eb78a0a5f2fa5941f8e845cdae5fb399bf7ba0be.1660566179.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/notif.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86dc8f23bb1b68262ca5db890ec7177b2d074640 Author: Pavel Begunkov Date: Mon Aug 15 13:42:01 2022 +0100 io_uring/net: improve zc addr import error handling We may account memory to a memcg of a request that didn't even got to the network layer. It's not a bug as it'll be routinely cleaned up on flush, but it might be confusing for the userspace. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b8aae61f4c3ddc4da97c1da876bb73871f352d50.1660566179.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 063604265f967e90901996a1b173fe6df582d350 Author: Pavel Begunkov Date: Mon Aug 15 13:42:00 2022 +0100 io_uring/net: use right helpers for async recycle We have a helper that checks for whether a request contains anything in ->async_data or not, namely req_has_async_data(). It's better to use it as it might have some extra considerations. Fixes: 43e0bbbd0b0e3 ("io_uring: add netmsg cache") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b7414da4e7c3c32c31fc02dfd1355af4ccf4ca5f.1660566179.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae806c7805571a9813e41bf6763dd08d0706f4ed Merge: 5b22f62724a0 cbe9e5112630 Author: Jakub Kicinski Date: Mon Aug 15 20:14:39 2022 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2022-08-12 (iavf) This series contains updates to iavf driver only. Przemyslaw frees memory for admin queues in initialization error paths, prevents freeing of vf_res which is causing null pointer dereference, and adjusts calls in error path of reset to avoid iavf_close() which could cause deadlock. Ivan Vecera avoids deadlock that can occur when driver if part of failover. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: iavf: Fix deadlock in initialization iavf: Fix reset error handling iavf: Fix NULL pointer dereference in iavf_get_link_ksettings iavf: Fix adminq error handling ==================== Link: https://lore.kernel.org/r/20220812172309.853230-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 5b22f62724a0a09e00d301abf5b57b0c12be8a16 Author: Zhengchao Shao Date: Mon Aug 15 10:46:29 2022 +0800 net: rtnetlink: fix module reference count leak issue in rtnetlink_rcv_msg When bulk delete command is received in the rtnetlink_rcv_msg function, if bulk delete is not supported, module_put is not called to release the reference counting. As a result, module reference count is leaked. Fixes: a6cec0bcd342 ("net: rtnetlink: add bulk delete support flag") Signed-off-by: Zhengchao Shao Acked-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20220815024629.240367-1-shaozhengchao@huawei.com Signed-off-by: Jakub Kicinski net/core/rtnetlink.c | 1 + 1 file changed, 1 insertion(+) commit 3a12df22a8f68954a4ba48435c06b3d1791c87c4 Author: Sergei Antonov Date: Fri Aug 12 20:13:39 2022 +0300 net: moxa: pass pdev instead of ndev to DMA functions dma_map_single() calls fail in moxart_mac_setup_desc_ring() and moxart_mac_start_xmit() which leads to an incessant output of this: [ 16.043925] moxart-ethernet 92000000.mac eth0: DMA mapping error [ 16.050957] moxart-ethernet 92000000.mac eth0: DMA mapping error [ 16.058229] moxart-ethernet 92000000.mac eth0: DMA mapping error Passing pdev to DMA is a common approach among net drivers. Fixes: 6c821bd9edc9 ("net: Add MOXA ART SoCs ethernet driver") Signed-off-by: Sergei Antonov Suggested-by: Andrew Lunn Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20220812171339.2271788-1-saproj@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/moxa/moxart_ether.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 17661ecf6a64eb11ae7f1108fe88686388b2acd5 Author: Namjae Jeon Date: Sun Aug 14 22:40:25 2022 +0900 ksmbd: don't remove dos attribute xattr on O_TRUNC open When smb client open file in ksmbd share with O_TRUNC, dos attribute xattr is removed as well as data in file. This cause the FSCTL_SET_SPARSE request from the client fails because ksmbd can't update the dos attribute after setting ATTR_SPARSE_FILE. And this patch fix xfstests generic/469 test also. Signed-off-by: Namjae Jeon Reviewed-by: Hyunchul Lee Signed-off-by: Steve French fs/ksmbd/smb2pdu.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit c90b31eaf9e77269d3803ed9223a2e0168b519ac Author: Hyunchul Lee Date: Fri Aug 12 11:11:32 2022 +0900 ksmbd: remove unnecessary generic_fillattr in smb2_open Remove unnecessary generic_fillattr to fix wrong AllocationSize of SMB2_CREATE response, And Move the call of ksmbd_vfs_getattr above the place where stat is needed because of truncate. This patch fixes wrong AllocationSize of SMB2_CREATE response. Because ext4 updates inode->i_blocks only when disk space is allocated, generic_fillattr does not set stat.blocks properly for delayed allocation. But ext4 returns the blocks that include the delayed allocation blocks when getattr is called. The issue can be reproduced with commands below: touch ${FILENAME} xfs_io -c "pwrite -S 0xAB 0 40k" ${FILENAME} xfs_io -c "stat" ${FILENAME} 40KB are written, but the count of blocks is 8. Signed-off-by: Hyunchul Lee Acked-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/smb2pdu.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 5f4d1fd5b5d3506759b5d9cf20bb5fb5b8bdcab1 Author: Kristen Carlson Accardi Date: Fri Aug 12 11:07:13 2022 -0700 selftests/sgx: Ignore OpenSSL 3.0 deprecated functions warning OpenSSL 3.0 deprecates some of the functions used in the SGX selftests, causing build errors on new distros. For now ignore the warnings until support for the functions is no longer available and mark FIXME so that it can be clear this should be removed at some point. Signed-off-by: Kristen Carlson Accardi Reviewed-by: Jarkko Sakkinen Signed-off-by: Shuah Khan tools/testing/selftests/sgx/sigstruct.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d7ae5818c3fa3007dee13f9d99832e7f26b8bc44 Author: Hao Jia Date: Sat Aug 6 20:05:10 2022 +0800 sched/psi: Remove redundant cgroup_psi() when !CONFIG_CGROUPS cgroup_psi() is only called under CONFIG_CGROUPS. We don't need cgroup_psi() when !CONFIG_CGROUPS, so we can remove it in this case. Signed-off-by: Hao Jia Reviewed-by: Ingo Molnar Acked-by: Johannes Weiner Signed-off-by: Tejun Heo include/linux/cgroup.h | 5 ----- 1 file changed, 5 deletions(-) commit 76b079ef4cc954fc2c2e0333a01855b0b2b6bdee Author: Hao Jia Date: Sat Aug 6 20:05:09 2022 +0800 sched/psi: Remove unused parameter nbytes of psi_trigger_create() psi_trigger_create()'s 'nbytes' parameter is not used, so we can remove it. Signed-off-by: Hao Jia Reviewed-by: Ingo Molnar Acked-by: Johannes Weiner Signed-off-by: Tejun Heo include/linux/psi.h | 2 +- kernel/cgroup/cgroup.c | 2 +- kernel/sched/psi.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 2b97cf76289a4fcae66d7959b0d74a87207d7068 Author: Hao Jia Date: Sat Aug 6 20:05:08 2022 +0800 sched/psi: Zero the memory of struct psi_group After commit 5f69a6577bc3 ("psi: dont alloc memory for psi by default"), the memory used by struct psi_group is no longer allocated and zeroed in cgroup_create(). Since the memory of struct psi_group is not zeroed, the data in this memory is random, which will lead to inaccurate psi statistics when creating a new cgroup. So we use kzlloc() to allocate and zero the struct psi_group and remove the redundant zeroing in group_init(). Steps to reproduce: 1. Use cgroup v2 and enable CONFIG_PSI 2. Create a new cgroup, and query psi statistics mkdir /sys/fs/cgroup/test cat /sys/fs/cgroup/test/cpu.pressure some avg10=0.00 avg60=0.00 avg300=47927752200.00 total=12884901 full avg10=561815124.00 avg60=125835394188.00 avg300=1077090462000.00 total=10273561772 cat /sys/fs/cgroup/test/io.pressure some avg10=1040093132823.95 avg60=1203770351379.21 avg300=3862252669559.46 total=4294967296 full avg10=921884564601.39 avg60=0.00 avg300=1984507298.35 total=442381631 cat /sys/fs/cgroup/test/memory.pressure some avg10=232476085778.11 avg60=0.00 avg300=0.00 total=0 full avg10=0.00 avg60=0.00 avg300=2585658472280.57 total=12884901 Fixes: commit 5f69a6577bc3 ("psi: dont alloc memory for psi by default") Signed-off-by: Hao Jia Reviewed-by: Ingo Molnar Acked-by: Johannes Weiner Signed-off-by: Tejun Heo kernel/sched/psi.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 160905549e663019e26395ed9d66c24ee2cf5187 Author: Christophe JAILLET Date: Sun Aug 7 08:37:43 2022 +0200 iio: light: cm3605: Fix an error handling path in cm3605_probe() The commit in Fixes also introduced a new error handling path which should goto the existing error handling path. Otherwise some resources leak. Fixes: 0d31d91e6145 ("iio: light: cm3605: Make use of the helper function dev_err_probe()") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/0e186de2c125b3e17476ebf9c54eae4a5d66f994.1659854238.git.christophe.jaillet@wanadoo.fr Cc: Signed-off-by: Jonathan Cameron drivers/iio/light/cm3605.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8f89e33bf040bbef66386c426198622180233178 Author: Marcus Folkesson Date: Fri Jul 22 15:07:18 2022 +0200 iio: adc: mcp3911: make use of the sign bit The device supports negative values as well. Fixes: 3a89b289df5d ("iio: adc: add support for mcp3911") Signed-off-by: Marcus Folkesson Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220722130726.7627-2-marcus.folkesson@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/adc/mcp3911.c | 2 ++ 1 file changed, 2 insertions(+) commit d3122bf9aa4c974f5e2c0112f799757b3a2779da Author: Damien Le Moal Date: Fri Aug 12 02:29:53 2022 +0900 ata: libata-eh: Add missing command name Add the missing command name for ATA_CMD_NCQ_NON_DATA to ata_get_cmd_name(). Fixes: 661ce1f0c4a6 ("libata/libsas: Define ATA_CMD_NCQ_NON_DATA") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke drivers/ata/libata-eh.c | 1 + 1 file changed, 1 insertion(+) commit 41a55567b9e31cb852670684404654ec4fd0d8d6 Author: David Gow Date: Wed Jul 13 08:52:20 2022 +0800 module: kunit: Load .kunit_test_suites section when CONFIG_KUNIT=m The new KUnit module handling has KUnit test suites listed in a .kunit_test_suites section of each module. This should be loaded when the module is, but at the moment this only happens if KUnit is built-in. Also load this when KUnit is enabled as a module: it'll not be usable unless KUnit is loaded, but such modules are likely to depend on KUnit anyway, so it's unlikely to ever be loaded needlessly. Fixes: 3d6e44623841 ("kunit: unify module and builtin suite definitions") Signed-off-by: David Gow Reviewed-by: Brendan Higgins Tested-by: Geert Uytterhoeven Signed-off-by: Shuah Khan kernel/module/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d52788b3da2750ebc617891cf260b8f8912f522b Author: David Gow Date: Fri Jul 15 12:03:54 2022 +0800 mmc: sdhci-of-aspeed: test: Fix dependencies when KUNIT=m While the sdhci-of-aspeed KUnit tests do work when builtin, and do work when KUnit itself is being built as a module, the two together break. This is because the KUnit tests (understandably) depend on KUnit, so a built-in test cannot build if KUnit is a module. Fix this by adding a dependency on (MMC_SDHCI_OF_ASPEED=m || KUNIT=y), which only excludes this one problematic configuration. This was reported on a nasty openrisc-randconfig run by the kernel test robot, though for some reason (compiler optimisations removing the test code?) I wasn't able to reproduce it locally on x86: https://lore.kernel.org/linux-mm/202207140122.fzhlf60k-lkp@intel.com/T/ Fixes: 291cd54e5b05 ("mmc: sdhci-of-aspeed: test: Use kunit_test_suite() macro") Reported-by: kernel test robot Signed-off-by: David Gow Acked-by: Andrew Jeffery Acked-by: Ulf Hansson Acked-by: Brendan Higgins Signed-off-by: Shuah Khan drivers/mmc/host/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 8c596324232d22e19f8df59ba03410b9b5b0f3d7 Author: Daniel Lezcano Date: Tue Aug 9 10:56:28 2022 +0200 dt-bindings: thermal: Fix missing required property When the thermal zone description was converted to yaml schema, the required 'trips' property was forgotten. The initial text bindings was describing: " [ ... ] * Thermal zone nodes The thermal zone node is the node containing all the required info for describing a thermal zone, including its cooling device bindings. The thermal zone node must contain, apart from its own properties, one sub-node containing trip nodes and one sub-node containing all the zone cooling maps. Required properties: - polling-delay: The maximum number of milliseconds to wait between polls Type: unsigned when checking this thermal zone. Size: one cell - polling-delay-passive: The maximum number of milliseconds to wait Type: unsigned between polls when performing passive cooling. Size: one cell - thermal-sensors: A list of thermal sensor phandles and sensor specifier Type: list of used while monitoring the thermal zone. phandles + sensor specifier - trips: A sub-node which is a container of only trip point nodes Type: sub-node required to describe the thermal zone. Optional property: - cooling-maps: A sub-node which is a container of only cooling device Type: sub-node map nodes, used to describe the relation between trips and cooling devices. [ ... ] " Now the schema describes: " [ ... ] required: - polling-delay - polling-delay-passive - thermal-sensors [ ... ] " Add the missing 'trips' property in the required properties. Fixed: 1202a442a31fd ("dt-bindings: thermal: Add yaml bindings for thermal zones") Signed-off-by: Daniel Lezcano Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220809085629.509116-3-daniel.lezcano@linaro.org Documentation/devicetree/bindings/thermal/thermal-zones.yaml | 1 + 1 file changed, 1 insertion(+) commit a921be53b46c393d8d594a62a44f418c97e5504b Author: Daniel Lezcano Date: Wed Aug 10 12:07:31 2022 +0200 thermal/core: Add missing EXPORT_SYMBOL_GPL The function thermal_zone_device_register_with_trips() is not exported for modules. Add the missing EXPORT_SYMBOL_GPL(). Fixes: fae11de507f0e ("thermal/core: Add thermal_trip in thermal_zone") Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20220810100731.749317-1-daniel.lezcano@linaro.org drivers/thermal/thermal_core.c | 1 + 1 file changed, 1 insertion(+) commit 1c11289b34ab67ed080bbe0f1855c4938362d9cf Author: Iwona Winiarska Date: Tue Jul 5 12:15:01 2022 +0200 peci: cpu: Fix use-after-free in adev_release() When auxiliary_device_add() returns an error, auxiliary_device_uninit() is called, which causes refcount for device to be decremented and .release callback will be triggered. Because adev_release() re-calls auxiliary_device_uninit(), it will cause use-after-free: [ 1269.455172] WARNING: CPU: 0 PID: 14267 at lib/refcount.c:28 refcount_warn_saturate+0x110/0x15 [ 1269.464007] refcount_t: underflow; use-after-free. Reported-by: Jianglei Nie Signed-off-by: Iwona Winiarska Link: https://lore.kernel.org/r/20220705101501.298395-1-iwona.winiarska@intel.com drivers/peci/cpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e79b548b7202bb3accdfe64f113129a4340bc2f9 Author: Lv Ruyi Date: Wed Apr 13 01:04:25 2022 +0000 peci: aspeed: fix error check return value of platform_get_irq() platform_get_irq() return negative value on failure, so null check of priv->irq is incorrect. Fix it by comparing whether it is less than zero. Fixes: a85e4c52086c ("peci: Add peci-aspeed controller driver") Reported-by: Zeal Robot Signed-off-by: Lv Ruyi Link: https://lore.kernel.org/r/20220413010425.2534887-1-lv.ruyi@zte.com.cn Reviewed-by: Iwona Winiarska Signed-off-by: Iwona Winiarska drivers/peci/controller/peci-aspeed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61b123ffcedac72a1ac6a96d1da87d25efddcbda Author: Sander Vanheule Date: Tue Aug 9 19:36:35 2022 +0200 lib/cpumask: drop always-true preprocessor guard Since lib/cpumask.o is only built for CONFIG_SMP=y, NR_CPUS will always be greater than 1 at compile time. This makes checking for that condition unnecesarry, so it can be dropped. Signed-off-by: Sander Vanheule Signed-off-by: Yury Norov lib/cpumask.c | 2 -- 1 file changed, 2 deletions(-) commit 2248ccd80124e61c2c84a22b22409bab452e1f0c Author: Sander Vanheule Date: Tue Aug 9 19:36:34 2022 +0200 lib/cpumask: add inline cpumask_next_wrap() for UP In the uniprocessor case, cpumask_next_wrap() can be simplified, as the number of valid argument combinations is limited: - 'start' can only be 0 - 'n' can only be -1 or 0 The only valid CPU that can then be returned, if any, will be the first one set in the provided 'mask'. For NR_CPUS == 1, include/linux/cpumask.h now provides an inline definition of cpumask_next_wrap(), which will conflict with the one provided by lib/cpumask.c. Make building of lib/cpumask.o again depend on CONFIG_SMP=y (i.e. NR_CPUS > 1) to avoid the re-definition. Suggested-by: Yury Norov Signed-off-by: Sander Vanheule Signed-off-by: Yury Norov include/linux/cpumask.h | 19 +++++++++++++++++++ lib/Makefile | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-) commit be599244865cb788abe2c6f59ccb05d7240448e4 Author: Sander Vanheule Date: Tue Aug 9 19:36:33 2022 +0200 cpumask: align signatures of UP implementations Between the generic version, and their uniprocessor optimised implementations, the return types of cpumask_any_and_distribute() and cpumask_any_distribute() are not identical. Change the UP versions to 'unsigned int', to match the generic versions. Suggested-by: Yury Norov Signed-off-by: Sander Vanheule Signed-off-by: Yury Norov include/linux/cpumask.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a0753ef66c34c1739580219dca664eda648164b7 Author: Liming Sun Date: Tue Aug 9 13:37:42 2022 -0400 mmc: sdhci-of-dwcmshc: Re-enable support for the BlueField-3 SoC The commit 08f3dff799d4 (mmc: sdhci-of-dwcmshc: add rockchip platform support") introduces the use of_device_get_match_data() to check for some chips. Unfortunately, it also breaks the BlueField-3 FW, which uses ACPI. To fix the problem, let's add the ACPI match data and the corresponding quirks to re-enable the support for the BlueField-3 SoC. Reviewed-by: David Woods Signed-off-by: Liming Sun Acked-by: Adrian Hunter Fixes: 08f3dff799d4 ("mmc: sdhci-of-dwcmshc: add rockchip platform support") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220809173742.178440-1-limings@nvidia.com [Ulf: Clarified the commit message a bit] Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-dwcmshc.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit f1227dc7d0411ee9a9faaa1e80cfd9d6e5d6d63e Author: Guillaume Tucker Date: Wed Aug 3 22:13:54 2022 +0200 selftests/landlock: fix broken include of linux/landlock.h Revert part of the earlier changes to fix the kselftest build when using a sub-directory from the top of the tree as this broke the landlock test build as a side-effect when building with "make -C tools/testing/selftests/landlock". Reported-by: Mickaël Salaün Fixes: a917dd94b832 ("selftests/landlock: drop deprecated headers dependency") Fixes: f2745dc0ba3d ("selftests: stop using KSFT_KHDR_INSTALL") Signed-off-by: Guillaume Tucker Signed-off-by: Shuah Khan tools/testing/selftests/landlock/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 174974d8463b77c2b4065e98513adb204e64de7d Author: Rob Clark Date: Sun Aug 7 09:09:01 2022 -0700 drm/msm/rd: Fix FIFO-full deadlock If the previous thing cat'ing $debugfs/rd left the FIFO full, then subsequent open could deadlock in rd_write() (because open is blocked, not giving a chance for read() to consume any data in the FIFO). Also it is generally a good idea to clear out old data from the FIFO. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/496706/ Link: https://lore.kernel.org/r/20220807160901.2353471-2-robdclark@gmail.com drivers/gpu/drm/msm/msm_rd.c | 3 +++ 1 file changed, 3 insertions(+) commit 02b9f2636209beb843ca501d47f7fddc8792b2d7 Author: Bjorn Andersson Date: Fri Jul 8 09:26:32 2022 -0700 drm/msm/gpu: Drop qos request if devm_devfreq_add_device() fails In the event that devm_devfreq_add_device() fails the device's qos freq list is left referencing df->idle_freq and df->boost_freq. Attempting to initialize devfreq again after a probe deferral will then cause invalid memory accesses in dev_pm_qos_add_request(). Fix this by dropping the requests in the error path. Fixes: 7c0ffcd40b16 ("drm/msm/gpu: Respect PM QoS constraints") Signed-off-by: Bjorn Andersson Reviewed-by: Rob Clark Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/493001/ Link: https://lore.kernel.org/r/20220708162632.3529864-1-bjorn.andersson@linaro.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gpu_devfreq.c | 2 ++ 1 file changed, 2 insertions(+) commit 1b6345d4160ecd3d04bd8cd75df90c67811e8cc9 Author: Pablo Neira Ayuso Date: Mon Aug 15 17:55:07 2022 +0200 netfilter: nf_tables: check NFT_SET_CONCAT flag if field_count is specified Since f3a2181e16f1 ("netfilter: nf_tables: Support for sets with multiple ranged fields"), it possible to combine intervals and concatenations. Later on, ef516e8625dd ("netfilter: nf_tables: reintroduce the NFT_SET_CONCAT flag") provides the NFT_SET_CONCAT flag for userspace to report that the set stores a concatenation. Make sure NFT_SET_CONCAT is set on if field_count is specified for consistency. Otherwise, if NFT_SET_CONCAT is specified with no field_count, bail out with EINVAL. Fixes: ef516e8625dd ("netfilter: nf_tables: reintroduce the NFT_SET_CONCAT flag") Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 5 +++++ 1 file changed, 5 insertions(+) commit f75fccbdc84fd9066e42c394c870bb6a3af57adc Author: William Zhang Date: Mon Aug 1 12:47:54 2022 -0700 ARM: dts: bcmbca: bcm6878: cosmetic change Add new line between dts node. Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20220801194754.29492-2-william.zhang@broadcom.com Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm6878.dtsi | 1 + 1 file changed, 1 insertion(+) commit 925fbca46d4b128cf5530ead5422bb697232c1a5 Author: William Zhang Date: Mon Aug 1 12:47:53 2022 -0700 ARM: dts: bcmbca: bcm6878: fix timer node cpu mask flag The cpu mask flag value should match the number of cpu cores in the chip. Correct the value to two cpus for BCM6878 dual core SoC. Fixes: 6bcad714e173 ("ARM: dts: Add DTS files for bcmbca SoC BCM6878") Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20220801194754.29492-1-william.zhang@broadcom.com Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm6878.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 12bbc223bde4b0a3f2624965f9998b23aa84633c Author: William Zhang Date: Mon Aug 1 12:46:47 2022 -0700 ARM: dts: bcmbca: bcm6846: fix interrupt controller node Add the missing gic registers and interrupts property to the gic node. Fixes: de1a99ac0b64 ("ARM: dts: Add DTS files for bcmbca SoC BCM6846") Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20220801194647.29437-3-william.zhang@broadcom.com Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm6846.dtsi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b7e204600ebe1b13b4b010f492b5a881387832d4 Author: William Zhang Date: Mon Aug 1 12:46:46 2022 -0700 ARM: dts: bcmbca: bcm6846: clean up psci node Remove unnecessary cpu_on and cpu_off properties from psci node as they are only needed for psci version prior to 0.2. Fixes: de1a99ac0b64 ("ARM: dts: Add DTS files for bcmbca SoC BCM6846") Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20220801194647.29437-2-william.zhang@broadcom.com Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm6846.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 57d81a9797079065ddfcfcd42b3f94831a9668df Author: William Zhang Date: Mon Aug 1 12:46:45 2022 -0700 ARM: dts: bcmbca: bcm6846: fix timer node cpu mask flag The cpu mask flag value should match the number of cpu cores in the chip. Correct the value to two cpus for BCM6846 dual core SoC. Fixes: de1a99ac0b64 ("ARM: dts: Add DTS files for bcmbca SoC BCM6846") Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20220801194647.29437-1-william.zhang@broadcom.com Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm6846.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e636e56a378d73bc4666d410e5d4450ace61e0ab Author: William Zhang Date: Mon Aug 1 12:44:48 2022 -0700 ARM: dts: bcmbca: bcm63178: cosmetic change Add new line between dts node. Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20220801194448.29363-4-william.zhang@broadcom.com Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm63178.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit ed93a068f3b3ac22423edfaf8509eaafedf3efc0 Author: William Zhang Date: Mon Aug 1 12:44:47 2022 -0700 ARM: dts: bcmbca: bcm63178: fix interrupt controller node Add the missing gic registers and interrupts property to the gic node. Fixes: fc85b7e64acb ("ARM: dts: add dts files for bcmbca soc 63178") Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20220801194448.29363-3-william.zhang@broadcom.com Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm63178.dtsi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 9a6bd12f52bf38773d7b1f0d3c321ae42447ab57 Author: William Zhang Date: Mon Aug 1 12:44:46 2022 -0700 ARM: dts: bcmbca: bcm63178: clean up psci node Remove unnecessary cpu_on and cpu_off properties from psci node as they are only needed for psci version prior to 0.2. Fixes: fc85b7e64acb ("ARM: dts: add dts files for bcmbca soc 63178") Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20220801194448.29363-2-william.zhang@broadcom.com Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm63178.dtsi | 2 -- 1 file changed, 2 deletions(-) commit d1475cdec17b30049c0dd69094c4ebf6e018e7c1 Author: William Zhang Date: Mon Aug 1 12:44:45 2022 -0700 ARM: dts: bcmbca: bcm63178: fix timer node cpu mask flag The cpu mask flag value should match the number of cpu cores in the chip. Correct the value to three cpus for BCM63178 triple core SoC. Fixes: fc85b7e64acb ("ARM: dts: add dts files for bcmbca soc 63178") Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20220801194448.29363-1-william.zhang@broadcom.com Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm63178.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fd0c153daad135d0ec1a53c5dbe6936a724d6ae1 Author: Al Viro Date: Mon Aug 8 16:09:45 2022 +0100 nios2: add force_successful_syscall_return() If we use the ancient SysV syscall ABI, we'd better have tell the kernel how to claim that a negative return value is a success. Use ->orig_r2 for that - it's inaccessible via ptrace, so it's a fair game for changes and it's normally[*] non-negative on return from syscall. Set to -1; syscall is not going to be restart-worthy by definition, so we won't interfere with that use either. [*] the only exception is rt_sigreturn(), where we skip the entire messing with r1/r2 anyway. Fixes: 82ed08dd1b0e ("nios2: Exception handling") Signed-off-by: Al Viro Signed-off-by: Dinh Nguyen arch/nios2/include/asm/ptrace.h | 2 ++ arch/nios2/kernel/entry.S | 6 ++++++ 2 files changed, 8 insertions(+) commit 411a76b7219555c55867466c82d70ce928d6c9e1 Author: Al Viro Date: Mon Aug 8 16:09:16 2022 +0100 nios2: restarts apply only to the first sigframe we build... Fixes: b53e906d255d ("nios2: Signal handling support") Signed-off-by: Al Viro Signed-off-by: Dinh Nguyen arch/nios2/kernel/signal.c | 1 + 1 file changed, 1 insertion(+) commit 2d631bd58fe0ea3e3350212e23c9aba1fb606514 Author: Al Viro Date: Mon Aug 8 16:08:48 2022 +0100 nios2: fix syscall restart checks sys_foo() returns -512 (aka -ERESTARTSYS) => do_signal() sees 512 in r2 and 1 in r1. sys_foo() returns 512 => do_signal() sees 512 in r2 and 0 in r1. The former is restart-worthy; the latter obviously isn't. Fixes: b53e906d255d ("nios2: Signal handling support") Signed-off-by: Al Viro Signed-off-by: Dinh Nguyen arch/nios2/kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25ba820ef36bdbaf9884adeac69b6e1821a7df76 Author: Al Viro Date: Mon Aug 8 16:07:21 2022 +0100 nios2: traced syscall does need to check the syscall number all checks done before letting the tracer modify the register state are worthless... Fixes: 82ed08dd1b0e ("nios2: Exception handling") Signed-off-by: Al Viro Signed-off-by: Dinh Nguyen arch/nios2/kernel/entry.S | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 45ec746c65097c25e77d24eae8fee0def5b6cc5d Author: Al Viro Date: Mon Aug 8 16:06:46 2022 +0100 nios2: don't leave NULLs in sys_call_table[] fill the gaps in there with sys_ni_syscall, as everyone does... Fixes: 82ed08dd1b0e ("nios2: Exception handling") Signed-off-by: Al Viro Signed-off-by: Dinh Nguyen arch/nios2/kernel/entry.S | 1 - arch/nios2/kernel/syscall_table.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit 8535c239ac674f7ead0f2652932d35c52c4123b2 Author: Al Viro Date: Mon Aug 8 16:06:04 2022 +0100 nios2: page fault et.al. are *not* restartable syscalls... make sure that ->orig_r2 is negative for everything except the syscalls. Fixes: 82ed08dd1b0e ("nios2: Exception handling") Signed-off-by: Al Viro Signed-off-by: Dinh Nguyen arch/nios2/include/asm/entry.h | 3 ++- arch/nios2/kernel/entry.S | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) commit f15f39fabed2248311607445ddfa6dba63abebb9 Author: Jason Wang Date: Thu Aug 11 21:34:33 2022 +0800 tools: hv: Remove an extraneous "the" There are two "the" in the text. Remove one. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20220811133433.10175-1-wangborong@cdjrlc.com Signed-off-by: Wei Liu tools/hv/hv_kvp_daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1f63cbb705dc38826369496c6fc12c1b8db1324 Author: Christophe JAILLET Date: Sun Jul 31 22:01:55 2022 +0200 drm/hyperv: Fix an error handling path in hyperv_vmbus_probe() hyperv_setup_vram() calls vmbus_allocate_mmio(). This must be undone in the error handling path of the probe, as already done in the remove function. Fixes: a0ab5abced55 ("drm/hyperv : Removing the restruction of VRAM allocation with PCI bar size") Signed-off-by: Christophe JAILLET Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/7dfa372af3e35fbb1d6f157183dfef2e4512d3be.1659297696.git.christophe.jaillet@wanadoo.fr Signed-off-by: Wei Liu drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit fc0ae524b5fd2938c94d56da3f749f11eb3273d5 Author: Pablo Neira Ayuso Date: Sat Aug 13 15:22:05 2022 +0200 netfilter: nf_tables: disallow NFT_SET_ELEM_CATCHALL and NFT_SET_ELEM_INTERVAL_END These flags are mutually exclusive, report EINVAL in this case. Fixes: aaa31047a6d2 ("netfilter: nftables: add catch-all set element support") Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 3 +++ 1 file changed, 3 insertions(+) commit 88cccd908d51397f9754f89a937cd13fa59dee37 Author: Pablo Neira Ayuso Date: Fri Aug 12 16:21:28 2022 +0200 netfilter: nf_tables: NFTA_SET_ELEM_KEY_END requires concat and interval flags If the NFT_SET_CONCAT|NFT_SET_INTERVAL flags are set on, then the netlink attribute NFTA_SET_ELEM_KEY_END must be specified. Otherwise, NFTA_SET_ELEM_KEY_END should not be present. For catch-all element, NFTA_SET_ELEM_KEY_END should not be present. The NFT_SET_ELEM_INTERVAL_END is never used with this set flags combination. Fixes: 7b225d0b5c6d ("netfilter: nf_tables: add NFTA_SET_ELEM_KEY_END attribute") Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 58ca14ed98c87cfe0d1408cc65a9745d9e9b7a56 Author: Magnus Karlsson Date: Fri Aug 12 13:32:59 2022 +0200 xsk: Fix corrupted packets for XDP_SHARED_UMEM Fix an issue in XDP_SHARED_UMEM mode together with aligned mode where packets are corrupted for the second and any further sockets bound to the same umem. In other words, this does not affect the first socket bound to the umem. The culprit for this bug is that the initialization of the DMA addresses for the pre-populated xsk buffer pool entries was not performed for any socket but the first one bound to the umem. Only the linear array of DMA addresses was populated. Fix this by populating the DMA addresses in the xsk buffer pool for every socket bound to the same umem. Fixes: 94033cd8e73b8 ("xsk: Optimize for aligned case") Reported-by: Alasdair McWilliam Reported-by: Intrusion Shield Team Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Tested-by: Alasdair McWilliam Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/xdp-newbies/6205E10C-292E-4995-9D10-409649354226@outlook.com/ Link: https://lore.kernel.org/bpf/20220812113259.531-1-magnus.karlsson@gmail.com net/xdp/xsk_buff_pool.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 0fef40be5d1f8e7af3d61e8827a63c5862cd99f7 Author: Harald Freudenberger Date: Fri Jul 15 12:23:48 2022 +0200 s390/ap: fix crash on older machines based on QCI info missing On older z series machines (z12 and older) there is no QCI info available. The AP code took care of this and the AP bus scan then switched to simple probing via TAPQ. With commit 283915850a44 ("s390/ap: notify drivers on config changed and scan complete callbacks") some code was introduced which silently assumed that the QCI info is always available. However, with KVM simulating an older machine (z12) the result was a kernel crash. Funnily the same crash does not happen on LPAR - maybe because NULL is a valid pointer and reading some data from address 0 also works fine. This fix now improves the code to be aware that the QCI instruction may not be available on older machines and thus the two pointers to QCI info structs may simple be NULL. However, on a machine not providing the QCI info the two callbacks to the zcrypt device drivers on_config_changed() and on_scan_complete() provide parameters which are pointers to a QCI info struct. These both callbacks are NOT served if there is no QCI info available. The only consumer of these callbacks is the vfio device driver. This driver only supports CEX4 and higher. All physical machines which are able to provide CEX4 cards have QCI support available. So there is no sense in for example fill the QCI info struct by hand with looping over cards and queues and TAPQ each APQN. Signed-off-by: Harald Freudenberger Signed-off-by: Tony Krowiak Cc: stable@vger.kernel.org Fixes: 283915850a44 ("s390/ap: notify drivers on config changed and scan complete callbacks") Signed-off-by: Alexander Gordeev drivers/s390/crypto/ap_bus.c | 3 +++ drivers/s390/crypto/ap_bus.h | 4 ++++ 2 files changed, 7 insertions(+) commit 7b6670b03641ac308aaa6fa2e6f964ac993b5ea3 Author: Juergen Gross Date: Mon Jun 20 11:45:34 2022 +0200 s390/hypfs: avoid error message under KVM When booting under KVM the following error messages are issued: hypfs.7f5705: The hardware system does not support hypfs hypfs.7a79f0: Initialization of hypfs failed with rc=-61 Demote the severity of first message from "error" to "info" and issue the second message only in other error cases. Signed-off-by: Juergen Gross Acked-by: Heiko Carstens Acked-by: Christian Borntraeger Link: https://lore.kernel.org/r/20220620094534.18967-1-jgross@suse.com [arch/s390/hypfs/hypfs_diag.c changed description] Signed-off-by: Alexander Gordeev arch/s390/hypfs/hypfs_diag.c | 2 +- arch/s390/hypfs/inode.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 461122b999bda2ebef2086a35d8990f9ccac5ab8 Author: Stefan Binding Date: Mon Aug 15 15:19:53 2022 +0100 ALSA: hda/realtek: Add quirks for ASUS Zenbooks using CS35L41 These Asus Zenbook laptop use Realtek HDA codec combined with 2xCS35L41 Amplifiers using SPI. Signed-off-by: Stefan Binding Link: https://lore.kernel.org/r/20220815141953.25197-1-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) commit ea75deef1a738d25502cfbb2caa564270b271525 Author: Richard Fitzgerald Date: Mon Aug 15 13:31:38 2022 +0100 ASoC: cs42l42: Only report button state if there was a button interrupt Only report a button state change if the interrupt status shows that there was a button event. Previously the code would always drop into the button reporting at the end of interrupt handling if the jack was present. If neither of the button report interrupts were pending it would report all buttons released. This could then lead to a button being reported as released while it is still pressed. Fixes: c5b8ee0879bc ("ASoC: cs42l42: Report jack and button detection") Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20220815123138.3810249-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cs42l42.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit b3e1cf31154136da855f3cb6117c17eb0b6bcfb4 Author: Christophe JAILLET Date: Sun Aug 7 08:56:38 2022 +0200 mmc: meson-gx: Fix an error handling path in meson_mmc_probe() The commit in Fixes has introduced a new error handling which should goto the existing error handling path. Otherwise some resources leak. Fixes: 19c6beaa064c ("mmc: meson-gx: add device reset") Signed-off-by: Christophe JAILLET Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/be4b863bacf323521ba3a02efdc4fca9cdedd1a6.1659855351.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit cc5d1692600613e72f32af60e27330fe0c79f4fe Author: Wenbin Mei Date: Thu Jul 28 16:00:48 2022 +0800 mmc: mtk-sd: Clear interrupts when cqe off/disable Currently we don't clear MSDC interrupts when cqe off/disable, which led to the data complete interrupt will be reserved for the next command. If the next command with data transfer after cqe off/disable, we process the CMD ready interrupt and trigger DMA start for data, but the data complete interrupt is already exists, then SW assume that the data transfer is complete, SW will trigger DMA stop, but the data may not be transmitted yet or is transmitting, so we may encounter the following error: mtk-msdc 11230000.mmc: CMD bus busy detected. Signed-off-by: Wenbin Mei Fixes: 88bd652b3c74 ("mmc: mediatek: command queue support") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220728080048.21336-1-wenbin.mei@mediatek.com Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b886f54c300d31c109d2e4336b22922b64e7ba7d Author: Christophe JAILLET Date: Tue Jul 26 21:15:51 2022 +0200 mmc: pxamci: Fix another error handling path in pxamci_probe() The commit in Fixes: has introduced an new error handling without branching to the existing error handling path. Update it now and release some resources if pxamci_init_ocr() fails. Fixes: 61951fd6cb49 ("mmc: pxamci: let mmc core handle regulators") Signed-off-by: Christophe JAILLET Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/07a2dcebf8ede69b484103de8f9df043f158cffd.1658862932.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson drivers/mmc/host/pxamci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 422ab8fe15e30066d4c8e236b747c77069bfca45 Author: Jassi Brar Date: Mon Aug 1 09:10:05 2022 -0500 arm64: dts: juno: Add missing MHU secure-irq The MHU secure interrupt exists physically but is missing in the DT node. Specify the interrupt in DT node to fix a warning on Arm Juno board: mhu@2b1f0000: interrupts: [[0, 36, 4], [0, 35, 4]] is too short Link: https://lore.kernel.org/r/20220801141005.599258-1-jassisinghbrar@gmail.com Signed-off-by: Jassi Brar Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-base.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2a9eb57e20e6bbd62774691648dc4abde66220cd Author: Rob Herring Date: Thu Jul 21 15:29:52 2022 -0600 arm64: dts: arm: juno: Remove legacy Coresight 'slave-mode' property The 'slave-mode' property is not valid under 'in-ports' as it was the legacy way to find input ports. Warnings are generated from the Coresight schema: arch/arm64/boot/dts/arm/juno-r1.dtb: funnel@20150000: in-ports:port@0:endpoint: Unevaluated properties are not allowed ('slave-mode' was unexpected) From schema: Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml Link: https://lore.kernel.org/r/20220721212952.1984382-1-robh@kernel.org Reviewed-by: Suzuki K Poulose Signed-off-by: Rob Herring Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-cs-r1r2.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 98d7c5e5792b8ce3e1352196dac7f404bb1b46ec Author: Christophe JAILLET Date: Tue Jul 26 21:15:43 2022 +0200 mmc: pxamci: Fix an error handling path in pxamci_probe() The commit in Fixes: has moved some code around without updating gotos to the error handling path. Update it now and release some resources if pxamci_of_init() fails. Fixes: fa3a5115469c ("mmc: pxamci: call mmc_of_parse()") Signed-off-by: Christophe JAILLET Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/6d75855ad4e2470e9ed99e0df21bc30f0c925a29.1658862932.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson drivers/mmc/host/pxamci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b2caaafc5df5f9d8a41679c3ec1bdad3b8fbe14 Author: Maximilian Luz Date: Wed Aug 10 16:41:17 2022 +0200 platform/surface: aggregator_registry: Add HID devices for sensors and UCSI client to SP8 Add software nodes for the HID sensor collection and the UCM UCSI HID client to the Surface Pro 8. In contrast to the type-cover devices, these devices are directly attached to the SAM controller, without any hub. This enables support for HID-based sensors, including the ones used for automatic screen rotation, on the Surface Pro 8. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220810144117.493710-4-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/surface/surface_aggregator_registry.c | 2 ++ 1 file changed, 2 insertions(+) commit 06964552928f6e111c2c29a8352ece8345e9cb18 Author: Maximilian Luz Date: Wed Aug 10 16:41:16 2022 +0200 platform/surface: aggregator_registry: Rename HID device nodes based on new findings On Windows, the HID devices with target ID 1 are grouped as "Surface Hot Plug - SAM". Rename their device nodes in the registry to reflect that and update the comments accordingly. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220810144117.493710-3-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede .../platform/surface/surface_aggregator_registry.c | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) commit 6d6ea95abc66596ceff131080e86db3bbec77064 Author: Maximilian Luz Date: Wed Aug 10 16:41:15 2022 +0200 platform/surface: aggregator_registry: Rename HID device nodes based on their function Rename HID device nodes based on their function. In particular, these are nodes for firmware updates via the CFU mechanism (component firmware update), HID based sensors, and a USB-C UCSI client. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220810144117.493710-2-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/surface/surface_aggregator_registry.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 84b8e403435c8fb94b872309673764a447961e00 Author: Maximilian Luz Date: Wed Aug 10 16:01:33 2022 +0200 platform/surface: aggregator_registry: Add support for Surface Laptop Go 2 The Surface Laptop Go 2 seems to have the same SAM client devices as the Surface Laptop Go 1, so re-use its node group. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220810140133.99087-1-luzmaximilian@gmail.com Signed-off-by: Hans de Goede drivers/platform/surface/surface_aggregator_registry.c | 3 +++ 1 file changed, 3 insertions(+) commit 2986c51540ed50ac654ffb5a772e546c02628c91 Author: Hans de Goede Date: Wed Aug 10 16:19:34 2022 +0200 platform/x86: x86-android-tablets: Fix broken touchscreen on Chuwi Hi8 with Windows BIOS The x86-android-tablets handling for the Chuwi Hi8 is only necessary with the Android BIOS and it is causing problems with the Windows BIOS version. Specifically when trying to register the already present touchscreen x86_acpi_irq_helper_get() calls acpi_unregister_gsi(), this breaks the working of the touchscreen and also leads to an oops: [ 14.248946] ------------[ cut here ]------------ [ 14.248954] remove_proc_entry: removing non-empty directory 'irq/75', leaking at least 'MSSL0001:00' [ 14.248983] WARNING: CPU: 3 PID: 440 at fs/proc/generic.c:718 remove_proc_entry ... [ 14.249293] unregister_irq_proc+0xe0/0x100 [ 14.249305] free_desc+0x29/0x70 [ 14.249312] irq_free_descs+0x4b/0x80 [ 14.249320] mp_unmap_irq+0x5c/0x60 [ 14.249329] acpi_unregister_gsi_ioapic+0x2a/0x40 [ 14.249338] x86_acpi_irq_helper_get+0x4b/0x190 [x86_android_tablets] [ 14.249355] x86_android_tablet_init+0x178/0xe34 [x86_android_tablets] Add an init callback for the Chuwi Hi8, which detects when the Windows BIOS is in use and exits with -ENODEV in that case, fixing this. Fixes: 84c2dcdd475f ("platform/x86: x86-android-tablets: Add an init() callback to struct x86_dev_info") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20220810141934.140771-1-hdegoede@redhat.com drivers/platform/x86/x86-android-tablets.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 0a90ed8d0cfa29735a221eba14d9cb6c735d35b6 Author: Andy Shevchenko Date: Mon Aug 1 14:37:31 2022 +0300 platform/x86: pmc_atom: Fix SLP_TYPx bitfield mask On Intel hardware the SLP_TYPx bitfield occupies bits 10-12 as per ACPI specification (see Table 4.13 "PM1 Control Registers Fixed Hardware Feature Control Bits" for the details). Fix the mask and other related definitions accordingly. Fixes: 93e5eadd1f6e ("x86/platform: New Intel Atom SOC power management controller driver") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220801113734.36131-1-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/pmc_atom.c | 2 +- include/linux/platform_data/x86/pmc_atom.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit f889a2e89ea5b4db5cf09765ee5e310be43c7b6f Author: Russell Currey Date: Fri Aug 12 17:16:32 2022 +1000 selftests/powerpc: Add missing PMU selftests to .gitignores Some recently added selftests don't have their binaries in .gitignores, so add them. I also alphabetically sorted sampling_tests/.gitignore while I was in there. Signed-off-by: Russell Currey Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220812071632.56095-1-ruscur@russell.cc .../powerpc/pmu/event_code_tests/.gitignore | 20 ++++++++++++++++++++ .../selftests/powerpc/pmu/sampling_tests/.gitignore | 18 ++++++++++++++---- 2 files changed, 34 insertions(+), 4 deletions(-) commit 5061e34c67446f73842391f9b3275e1be5491871 Merge: 02799571714d e01885c31bef Author: David S. Miller Date: Mon Aug 15 11:49:58 2022 +0100 Merge branch 'mlxsw-fixes' Petr Machata says: ==================== mlxsw: Fixes for PTP support This set fixes several issues in mlxsw PTP code. - Patch #1 fixes compilation warnings. - Patch #2 adjusts the order of operation during cleanup, thereby closing the window after PTP state was already cleaned in the ASIC for the given port, but before the port is removed, when the user could still in theory make changes to the configuration. - Patch #3 protects the PTP configuration with a custom mutex, instead of relying on RTNL, which is not held in all access paths. - Patch #4 forbids enablement of PTP only in RX or only in TX. The driver implicitly assumed this would be the case, but neglected to sanitize the configuration. ==================== Signed-off-by: David S. Miller commit e01885c31bef7c2c5fcb79dc192039f25e300ded Author: Amit Cohen Date: Fri Aug 12 17:32:03 2022 +0200 mlxsw: spectrum_ptp: Forbid PTP enablement only in RX or in TX Currently mlxsw driver configures one global PTP configuration for all ports. The reason is that the switch behaves like a transparent clock between CPU port and front-panel ports. When time stamp is enabled in any port, the hardware is configured to update the correction field. The fact that the configuration of CPU port affects all the ports, makes the correction field update to be global for all ports. Otherwise, user will see odd values in the correction field, as the switch will update the correction field in the CPU port, but not in all the front-panel ports. The CPU port is relevant in both RX and TX, so to avoid problematic configuration, forbid PTP enablement only in one direction, i.e., only in RX or TX. Without the change: $ hwstamp_ctl -i swp1 -r 12 -t 0 current settings: tx_type 0 rx_filter 0 new settings: tx_type 0 rx_filter 2 $ echo $? 0 With the change: $ hwstamp_ctl -i swp1 -r 12 -t 0 current settings: tx_type 1 rx_filter 2 SIOCSHWTSTAMP failed: Invalid argument Fixes: 08ef8bc825d96 ("mlxsw: spectrum_ptp: Support SIOCGHWTSTAMP, SIOCSHWTSTAMP ioctls") Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 3 +++ 1 file changed, 3 insertions(+) commit d72fdef21f07540c6cbb8043cc93decd2a5d35dd Author: Amit Cohen Date: Fri Aug 12 17:32:02 2022 +0200 mlxsw: spectrum_ptp: Protect PTP configuration with a mutex Currently the functions mlxsw_sp2_ptp_{configure, deconfigure}_port() assume that they are called when RTNL is locked and they warn otherwise. The deconfigure function can be called when port is removed, for example as part of device reload, then there is no locked RTNL and the function warns [1]. To avoid such case, do not assume that RTNL protects this code, add a dedicated mutex instead. The mutex protects 'ptp_state->config' which stores the existing global configuration in hardware. Use this mutex also to protect the code which configures the hardware. Then, there will be only one configuration in any time, which will be updated in 'ptp_state' and a race will be avoided. [1]: RTNL: assertion failed at drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c (1600) WARNING: CPU: 1 PID: 1583493 at drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c:1600 mlxsw_sp2_ptp_hwtstamp_set+0x2d3/0x300 [mlxsw_spectrum] [...] CPU: 1 PID: 1583493 Comm: devlink Not tainted5.19.0-rc8-custom-127022-gb371dffda095 #789 Hardware name: Mellanox Technologies Ltd.MSN3420/VMOD0005, BIOS 5.11 01/06/2019 RIP: 0010:mlxsw_sp2_ptp_hwtstamp_set+0x2d3/0x300[mlxsw_spectrum] [...] Call Trace: mlxsw_sp_port_remove+0x7e/0x190 [mlxsw_spectrum] mlxsw_sp_fini+0xd1/0x270 [mlxsw_spectrum] mlxsw_core_bus_device_unregister+0x55/0x280 [mlxsw_core] mlxsw_devlink_core_bus_device_reload_down+0x1c/0x30[mlxsw_core] devlink_reload+0x1ee/0x230 devlink_nl_cmd_reload+0x4de/0x580 genl_family_rcv_msg_doit+0xdc/0x140 genl_rcv_msg+0xd7/0x1d0 netlink_rcv_skb+0x49/0xf0 genl_rcv+0x1f/0x30 netlink_unicast+0x22f/0x350 netlink_sendmsg+0x208/0x440 __sys_sendto+0xf0/0x140 __x64_sys_sendto+0x1b/0x20 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: 08ef8bc825d96 ("mlxsw: spectrum_ptp: Support SIOCGHWTSTAMP, SIOCSHWTSTAMP ioctls") Reported-by: Ido Schimmel Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: Petr Machata Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 27 ++++++++++++++++------ 1 file changed, 20 insertions(+), 7 deletions(-) commit a159e986ad26d3f35c0157ac92760ba5e44e6785 Author: Amit Cohen Date: Fri Aug 12 17:32:01 2022 +0200 mlxsw: spectrum: Clear PTP configuration after unregistering the netdevice Currently as part of removing port, PTP API is called to clear the existing configuration and set the 'rx_filter' and 'tx_type' to zero. The clearing is done before unregistering the netdevice, which means that there is a window of time in which the user can reconfigure PTP in the port, and this configuration will not be cleared. Reorder the operations, clear PTP configuration after unregistering the netdevice. Fixes: 8748642751ede ("mlxsw: spectrum: PTP: Support SIOCGHWTSTAMP, SIOCSHWTSTAMP ioctls") Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: Petr Machata Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12e091389b29cddf26279fdf182b13b3a1583d0d Author: Amit Cohen Date: Fri Aug 12 17:32:00 2022 +0200 mlxsw: spectrum_ptp: Fix compilation warnings In case that 'CONFIG_PTP_1588_CLOCK' is not enabled in the config file, there are implementations for the functions mlxsw_{sp,sp2}_ptp_txhdr_construct() as part of 'spectrum_ptp.h'. In this case, they should be defined as 'static' as they are not supposed to be used out of this file. Make the functions 'static', otherwise the following warnings are returned: "warning: no previous prototype for 'mlxsw_sp_ptp_txhdr_construct'" "warning: no previous prototype for 'mlxsw_sp2_ptp_txhdr_construct'" In addition, make the functions 'inline' for case that 'spectrum_ptp.h' will be included anywhere else and the functions would probably not be used, so compilation warnings about unused static will be returned. Fixes: 24157bc69f45 ("mlxsw: Send PTP packets as data packets to overcome a limitation") Reported-by: kernel test robot Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 02799571714dc5dd6948824b9d080b44a295f695 Author: Jamal Hadi Salim Date: Sun Aug 14 11:27:58 2022 +0000 net_sched: cls_route: disallow handle of 0 Follows up on: https://lore.kernel.org/all/20220809170518.164662-1-cascardo@canonical.com/ handle of 0 implies from/to of universe realm which is not very sensible. Lets see what this patch will do: $sudo tc qdisc add dev $DEV root handle 1:0 prio //lets manufacture a way to insert handle of 0 $sudo tc filter add dev $DEV parent 1:0 protocol ip prio 100 \ route to 0 from 0 classid 1:10 action ok //gets rejected... Error: handle of 0 is not valid. We have an error talking to the kernel, -1 //lets create a legit entry.. sudo tc filter add dev $DEV parent 1:0 protocol ip prio 100 route from 10 \ classid 1:10 action ok //what did the kernel insert? $sudo tc filter ls dev $DEV parent 1:0 filter protocol ip pref 100 route chain 0 filter protocol ip pref 100 route chain 0 fh 0x000a8000 flowid 1:10 from 10 action order 1: gact action pass random type none pass val 0 index 1 ref 1 bind 1 //Lets try to replace that legit entry with a handle of 0 $ sudo tc filter replace dev $DEV parent 1:0 protocol ip prio 100 \ handle 0x000a8000 route to 0 from 0 classid 1:10 action drop Error: Replacing with handle of 0 is invalid. We have an error talking to the kernel, -1 And last, lets run Cascardo's POC: $ ./poc 0 0 -22 -22 -22 Signed-off-by: Jamal Hadi Salim Acked-by: Stephen Hemminger Signed-off-by: David S. Miller net/sched/cls_route.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7396ba87f1edf549284869451665c7c4e74ecd4f Author: Xin Xiong Date: Sat Aug 13 20:49:08 2022 +0800 net: fix potential refcount leak in ndisc_router_discovery() The issue happens on specific paths in the function. After both the object `rt` and `neigh` are grabbed successfully, when `lifetime` is nonzero but the metric needs change, the function just deletes the route and set `rt` to NULL. Then, it may try grabbing `rt` and `neigh` again if above conditions hold. The function simply overwrite `neigh` if succeeds or returns if fails, without decreasing the reference count of previous `neigh`. This may result in memory leaks. Fix it by decrementing the reference count of `neigh` in place. Fixes: 6b2e04bc240f ("net: allow user to set metric on default route learned via Router Advertisement") Signed-off-by: Xin Xiong Signed-off-by: Xin Tan Signed-off-by: David S. Miller net/ipv6/ndisc.c | 3 +++ 1 file changed, 3 insertions(+) commit 27b8d4d7a0cf442b7a0351fecc33b714f4208324 Merge: 0ff4eb3d5ebb cf90b74341ee Author: David S. Miller Date: Mon Aug 15 11:30:10 2022 +0100 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net -queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2022-08-11 (ice) This series contains updates to ice driver only. Benjamin corrects a misplaced parenthesis for a WARN_ON check. Michal removes WARN_ON from a check as its recoverable and not warranting of a call trace. ==================== Signed-off-by: David S. Miller commit 0ff4eb3d5ebbf72a7fc355e6001a0a6740662bf9 Author: Alexander Mikhalitsyn Date: Thu Aug 11 18:20:12 2022 +0300 neighbour: make proxy_queue.qlen limit per-device Right now we have a neigh_param PROXY_QLEN which specifies maximum length of neigh_table->proxy_queue. But in fact, this limitation doesn't work well because check condition looks like: tbl->proxy_queue.qlen > NEIGH_VAR(p, PROXY_QLEN) The problem is that p (struct neigh_parms) is a per-device thing, but tbl (struct neigh_table) is a system-wide global thing. It seems reasonable to make proxy_queue limit per-device based. v2: - nothing changed in this patch v3: - rebase to net tree Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Daniel Borkmann Cc: David Ahern Cc: Yajun Deng Cc: Roopa Prabhu Cc: Christian Brauner Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Alexey Kuznetsov Cc: Alexander Mikhalitsyn Cc: Konstantin Khorenko Cc: kernel@openvz.org Cc: devel@openvz.org Suggested-by: Denis V. Lunev Signed-off-by: Alexander Mikhalitsyn Reviewed-by: Denis V. Lunev Signed-off-by: David S. Miller include/net/neighbour.h | 1 + net/core/neighbour.c | 25 ++++++++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) commit 66ba215cb51323e4e55e38fd5f250e0fae0cbc94 Author: Denis V. Lunev Date: Thu Aug 11 18:20:11 2022 +0300 neigh: fix possible DoS due to net iface start/stop loop Normal processing of ARP request (usually this is Ethernet broadcast packet) coming to the host is looking like the following: * the packet comes to arp_process() call and is passed through routing procedure * the request is put into the queue using pneigh_enqueue() if corresponding ARP record is not local (common case for container records on the host) * the request is processed by timer (within 80 jiffies by default) and ARP reply is sent from the same arp_process() using NEIGH_CB(skb)->flags & LOCALLY_ENQUEUED condition (flag is set inside pneigh_enqueue()) And here the problem comes. Linux kernel calls pneigh_queue_purge() which destroys the whole queue of ARP requests on ANY network interface start/stop event through __neigh_ifdown(). This is actually not a problem within the original world as network interface start/stop was accessible to the host 'root' only, which could do more destructive things. But the world is changed and there are Linux containers available. Here container 'root' has an access to this API and could be considered as untrusted user in the hosting (container's) world. Thus there is an attack vector to other containers on node when container's root will endlessly start/stop interfaces. We have observed similar situation on a real production node when docker container was doing such activity and thus other containers on the node become not accessible. The patch proposed doing very simple thing. It drops only packets from the same namespace in the pneigh_queue_purge() where network interface state change is detected. This is enough to prevent the problem for the whole node preserving original semantics of the code. v2: - do del_timer_sync() if queue is empty after pneigh_queue_purge() v3: - rebase to net tree Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Daniel Borkmann Cc: David Ahern Cc: Yajun Deng Cc: Roopa Prabhu Cc: Christian Brauner Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Alexey Kuznetsov Cc: Alexander Mikhalitsyn Cc: Konstantin Khorenko Cc: kernel@openvz.org Cc: devel@openvz.org Investigated-by: Alexander Mikhalitsyn Signed-off-by: Denis V. Lunev Signed-off-by: David S. Miller net/core/neighbour.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 68a838b84effb7b57ba7d50b1863fc6ae35a54ce Author: Maxim Kochetkov Date: Thu Aug 11 12:48:40 2022 +0300 net: qrtr: start MHI channel after endpoit creation MHI channel may generates event/interrupt right after enabling. It may leads to 2 race conditions issues. 1) Such event may be dropped by qcom_mhi_qrtr_dl_callback() at check: if (!qdev || mhi_res->transaction_status) return; Because dev_set_drvdata(&mhi_dev->dev, qdev) may be not performed at this moment. In this situation qrtr-ns will be unable to enumerate services in device. --------------------------------------------------------------- 2) Such event may come at the moment after dev_set_drvdata() and before qrtr_endpoint_register(). In this case kernel will panic with accessing wrong pointer at qcom_mhi_qrtr_dl_callback(): rc = qrtr_endpoint_post(&qdev->ep, mhi_res->buf_addr, mhi_res->bytes_xferd); Because endpoint is not created yet. -------------------------------------------------------------- So move mhi_prepare_for_transfer_autoqueue after endpoint creation to fix it. Fixes: a2e2cc0dbb11 ("net: qrtr: Start MHI channels during init") Signed-off-by: Maxim Kochetkov Reviewed-by: Hemant Kumar Reviewed-by: Manivannan Sadhasivam Reviewed-by: Loic Poulain Signed-off-by: David S. Miller net/qrtr/mhi.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 72cbc8f04fe2fa93443c0fcccb7ad91dfea3d9ce Author: Jan Beulich Date: Thu Apr 28 16:50:29 2022 +0200 x86/PAT: Have pat_enabled() properly reflect state when running on Xen After commit ID in the Fixes: tag, pat_enabled() returns false (because of PAT initialization being suppressed in the absence of MTRRs being announced to be available). This has become a problem: the i915 driver now fails to initialize when running PV on Xen (i915_gem_object_pin_map() is where I located the induced failure), and its error handling is flaky enough to (at least sometimes) result in a hung system. Yet even beyond that problem the keying of the use of WC mappings to pat_enabled() (see arch_can_pci_mmap_wc()) means that in particular graphics frame buffer accesses would have been quite a bit less optimal than possible. Arrange for the function to return true in such environments, without undermining the rest of PAT MSR management logic considering PAT to be disabled: specifically, no writes to the PAT MSR should occur. For the new boolean to live in .init.data, init_cache_modes() also needs moving to .init.text (where it could/should have lived already before). [ bp: This is the "small fix" variant for stable. It'll get replaced with a proper PAT and MTRR detection split upstream but that is too involved for a stable backport. - additional touchups to commit msg. Use cpu_feature_enabled(). ] Fixes: bdd8b6c98239 ("drm/i915: replace X86_FEATURE_PAT with pat_enabled()") Signed-off-by: Jan Beulich Signed-off-by: Borislav Petkov Acked-by: Ingo Molnar Cc: Cc: Juergen Gross Cc: Lucas De Marchi Link: https://lore.kernel.org/r/9385fa60-fa5d-f559-a137-6608408f88b0@suse.com arch/x86/mm/pat/memtype.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 82a1356a933d8443139f8886f11b63c974a09a67 Author: Samuel Holland Date: Thu Aug 11 22:16:23 2022 -0500 drm/sun4i: dsi: Prevent underflow when computing packet sizes Currently, the packet overhead is subtracted using unsigned arithmetic. With a short sync pulse, this could underflow and wrap around to near the maximal u16 value. Fix this by using signed subtraction. The call to max() will correctly handle any negative numbers that are produced. Apply the same fix to the other timings, even though those subtractions are less likely to underflow. Fixes: 133add5b5ad4 ("drm/sun4i: Add Allwinner A31 MIPI-DSI controller support") Signed-off-by: Samuel Holland Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20220812031623.34057-1-samuel@sholland.org drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2a29f80e155a9cf40ca8b6648bcdc8422db4c4e4 Author: Samuel Holland Date: Fri Aug 12 02:37:02 2022 -0500 dt-bindings: display: sun4i: Add D1 TCONs to conditionals When adding the D1 TCON bindings, I missed the conditional blocks that restrict the binding for TCON LCD vs TCON TV hardware. Add the D1 TCON variants to the appropriate blocks for DE2 TCON LCDs and TCON TVs. Fixes: ae5a5d26c15c ("dt-bindings: display: Add D1 display engine compatibles") Signed-off-by: Samuel Holland Acked-by: Krzysztof Kozlowski Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20220812073702.57618-1-samuel@sholland.org .../devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 8d48562a2729742f767b0fdd994d6b2a56a49c63 Author: Michael Ellerman Date: Mon Aug 15 16:55:23 2022 +1000 powerpc/pci: Fix get_phb_number() locking The recent change to get_phb_number() causes a DEBUG_ATOMIC_SLEEP warning on some systems: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:580 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 1 lock held by swapper/1: #0: c157efb0 (hose_spinlock){+.+.}-{2:2}, at: pcibios_alloc_controller+0x64/0x220 Preemption disabled at: [<00000000>] 0x0 CPU: 0 PID: 1 Comm: swapper Not tainted 5.19.0-yocto-standard+ #1 Call Trace: [d101dc90] [c073b264] dump_stack_lvl+0x50/0x8c (unreliable) [d101dcb0] [c0093b70] __might_resched+0x258/0x2a8 [d101dcd0] [c0d3e634] __mutex_lock+0x6c/0x6ec [d101dd50] [c0a84174] of_alias_get_id+0x50/0xf4 [d101dd80] [c002ec78] pcibios_alloc_controller+0x1b8/0x220 [d101ddd0] [c140c9dc] pmac_pci_init+0x198/0x784 [d101de50] [c140852c] discover_phbs+0x30/0x4c [d101de60] [c0007fd4] do_one_initcall+0x94/0x344 [d101ded0] [c1403b40] kernel_init_freeable+0x1a8/0x22c [d101df10] [c00086e0] kernel_init+0x34/0x160 [d101df30] [c001b334] ret_from_kernel_thread+0x5c/0x64 This is because pcibios_alloc_controller() holds hose_spinlock but of_alias_get_id() takes of_mutex which can sleep. The hose_spinlock protects the phb_bitmap, and also the hose_list, but it doesn't need to be held while get_phb_number() calls the OF routines, because those are only looking up information in the device tree. So fix it by having get_phb_number() take the hose_spinlock itself, only where required, and then dropping the lock before returning. pcibios_alloc_controller() then needs to take the lock again before the list_add() but that's safe, the order of the list is not important. Fixes: 0fe1e96fef0a ("powerpc/pci: Prefer PCI domain assignment via DT 'linux,pci-domain' and alias") Reported-by: Guenter Roeck Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220815065550.1303620-1-mpe@ellerman.id.au arch/powerpc/kernel/pci-common.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 5dd8ce24667a70bb9f7808f5eec0354bd37290c6 Author: Steve French Date: Sat Aug 13 17:22:11 2022 -0500 cifs: missing directory in MAINTAINERS file The include/uapi/linux/cifs directory (not just fs/cifs and fs/smbfs_common) should be included in cifs entry in the MAINTAINERS file. Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 0f761f5768b842fe483141bc59db5b4d66bcaf07 Author: Jiapeng Chong Date: Thu Jun 2 15:35:19 2022 +0800 drm/i915/gvt: Fix kernel-doc Fix the following W=1 kernel warnings: drivers/gpu/drm/i915/gvt/aperture_gm.c:308: warning: expecting prototype for inte_gvt_free_vgpu_resource(). Prototype was for intel_vgpu_free_resource() instead. drivers/gpu/drm/i915/gvt/aperture_gm.c:344: warning: expecting prototype for intel_alloc_vgpu_resource(). Prototype was for intel_vgpu_alloc_resource() instead. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20220602073519.22363-1-jiapeng.chong@linux.alibaba.com Acked-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/aperture_gm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dca452041552a5a5a6aab3ebda32565fad003eb4 Author: Jiapeng Chong Date: Tue May 24 16:37:32 2022 +0800 drm/i915/gvt: Fix kernel-doc Fix the following W=1 kernel warnings: drivers/gpu/drm/i915/gvt/mmio_context.c:560: warning: expecting prototype for intel_gvt_switch_render_mmio(). Prototype was for intel_gvt_switch_mmio() instead. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20220524083733.67148-1-jiapeng.chong@linux.alibaba.com Acked-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/mmio_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e16c2b8250262bc0bc531299e2c30641cee14221 Author: Jiapeng Chong Date: Tue May 24 16:37:33 2022 +0800 drm/i915/gvt: Fix kernel-doc Fix the following W=1 kernel warnings: drivers/gpu/drm/i915/gvt/handlers.c:3066: warning: expecting prototype for intel_t_default_mmio_write(). Prototype was for intel_vgpu_default_mmio_write() instead. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20220524083733.67148-2-jiapeng.chong@linux.alibaba.com Acked-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e66978ebeb44f96ff4d26b2a83dc88a2bf887a6 Author: Julia Lawall Date: Sat May 21 13:10:59 2022 +0200 drm/i915/gvt: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20220521111145.81697-49-Julia.Lawall@inria.fr Acked-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46f7ac3d7892e808c9ba01c39da6bb85cda26ecd Author: Robin Murphy Date: Wed Aug 3 15:58:57 2022 +0100 spi: bitbang: Fix lsb-first Rx Shifting the recieved bit by "bits" inserts it at the top of the *currently remaining* Tx data, so we end up accumulating the whole transfer into bit 0 of the output word. Oops. For the algorithm to work as intended, we need to remember where the top of the *original* word was, and shift Rx to there. Fixes: 1847e3046c52 ("spi: gpio: Implement LSB First bitbang support") Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/28324d8622da80461cce35a82859b003d6f6c4b0.1659538737.git.robin.murphy@arm.com Signed-off-by: Mark Brown drivers/spi/spi-bitbang-txrx.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4d39265b930fb42eb396c3153a3f4afdee9f5c17 Merge: 568035b01cfb b4b5f29a076e Author: Mark Brown Date: Mon Aug 15 00:33:32 2022 +0100 Merge remote-tracking branch 'asoc/for-5.20' into asoc-6.0 commit 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 Author: Linus Torvalds Date: Sun Aug 14 15:50:18 2022 -0700 Linux 6.0-rc1 Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9f162193d6e48eb4ff51c2ea3612f1daebca1b7e Author: Yury Norov Date: Thu Aug 11 22:34:25 2022 -0700 radix-tree: replace gfp.h inclusion with gfp_types.h Radix tree header includes gfp.h for __GFP_BITS_SHIFT only. Now we have gfp_types.h for this. Fixes powerpc allmodconfig build: In file included from include/linux/nodemask.h:97, from include/linux/mmzone.h:17, from include/linux/gfp.h:7, from include/linux/radix-tree.h:12, from include/linux/idr.h:15, from include/linux/kernfs.h:12, from include/linux/sysfs.h:16, from include/linux/kobject.h:20, from include/linux/pci.h:35, from arch/powerpc/kernel/prom_init.c:24: include/linux/random.h: In function 'add_latent_entropy': >> include/linux/random.h:25:46: error: 'latent_entropy' undeclared (first use in this function); did you mean 'add_latent_entropy'? 25 | add_device_randomness((const void *)&latent_entropy, sizeof(latent_entropy)); | ^~~~~~~~~~~~~~ | add_latent_entropy include/linux/random.h:25:46: note: each undeclared identifier is reported only once for each function it appears in Reported-by: kernel test robot CC: Andy Shevchenko CC: Andrew Morton CC: Jason A. Donenfeld Signed-off-by: Yury Norov Signed-off-by: Linus Torvalds include/linux/radix-tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74cbb480d0efa61efa09e5ebd081a32e1d355bba Merge: 5d6a0f4da927 3f61631d47f1 Author: Linus Torvalds Date: Sun Aug 14 13:03:53 2022 -0700 Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs lseek fix from Al Viro: "Fix proc_reg_llseek() breakage. Always had been possible if somebody left NULL ->proc_lseek, became a practical issue now" * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: take care to handle NULL ->proc_lseek() commit 3f61631d47f115b83c935d0039f95cb68b0c8ab7 Author: Al Viro Date: Sun Aug 14 15:16:18 2022 -0400 take care to handle NULL ->proc_lseek() Easily done now, just by clearing FMODE_LSEEK in ->f_mode during proc_reg_open() for such entries. Fixes: 868941b14441 "fs: remove no_llseek" Signed-off-by: Al Viro fs/proc/inode.c | 3 +++ 1 file changed, 3 insertions(+) commit 5d6a0f4da9275f6c212de33777778673ba91241a Merge: 96f86ff08332 5ad3134dcf52 Author: Linus Torvalds Date: Sun Aug 14 09:28:54 2022 -0700 Merge tag 'for-linus-6.0-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull more xen updates from Juergen Gross: - fix the handling of the "persistent grants" feature negotiation between Xen blkfront and Xen blkback drivers - a cleanup of xen.config and adding xen.config to Xen section in MAINTAINERS - support HVMOP_set_evtchn_upcall_vector, which is more compliant to "normal" interrupt handling than the global callback used up to now - further small cleanups * tag 'for-linus-6.0-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: MAINTAINERS: add xen config fragments to XEN HYPERVISOR sections xen: remove XEN_SCRUB_PAGES in xen.config xen/pciback: Fix comment typo xen/xenbus: fix return type in xenbus_file_read() xen-blkfront: Apply 'feature_persistent' parameter when connect xen-blkback: Apply 'feature_persistent' parameter when connect xen-blkback: fix persistent grants negotiation x86/xen: Add support for HVMOP_set_evtchn_upcall_vector commit 96f86ff08332d88defd35c330fc6dae219b9e264 Merge: d785610f052d 7391db645938 Author: Linus Torvalds Date: Sun Aug 14 09:22:11 2022 -0700 Merge tag 'perf-tools-fixes-for-v6.0-2022-08-13' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull more perf tool updates from Arnaldo Carvalho de Melo: - 'perf c2c' now supports ARM64, adjust its output to cope with differences with what is in x86_64. Now go find false sharing on ARM64 (at least Neoverse) as well! - Refactor the JSON processing, making the output more compact and thus reducing the size of the resulting perf binary - Improvements for 'perf offcpu' profiling, including tracking child processes - Update Intel JSON metrics and events files for broadwellde, broadwellx, cascadelakex, haswellx, icelakex, ivytown, jaketown, knightslanding, sapphirerapids, skylakex and snowridgex - Add 'perf stat' JSON output and a 'perf test' entry for it - Ignore memfd and anonymous mmap events if jitdump present - Refactor 'perf test' shell tests allowing subdirs - Fix an error handling path in 'parse_perf_probe_command()' - Fixes for the guest Intel PT tracing patchkit in the 1st batch of this merge window - Print debuginfod queries if -v option is used, to explain delays in processing when debuginfo servers are enabled to fetch DSOs with richer symbol tables - Improve error message for 'perf record -p not_existing_pid' - Fix openssl and libbpf feature detection - Add PMU pai_crypto event description for IBM z16 on 'perf list' - Fix typos and duplicated words on comments in various places * tag 'perf-tools-fixes-for-v6.0-2022-08-13' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (81 commits) perf test: Refactor shell tests allowing subdirs perf vendor events: Update events for snowridgex perf vendor events: Update events and metrics for skylakex perf vendor events: Update metrics for sapphirerapids perf vendor events: Update events for knightslanding perf vendor events: Update metrics for jaketown perf vendor events: Update metrics for ivytown perf vendor events: Update events and metrics for icelakex perf vendor events: Update events and metrics for haswellx perf vendor events: Update events and metrics for cascadelakex perf vendor events: Update events and metrics for broadwellx perf vendor events: Update metrics for broadwellde perf jevents: Fold strings optimization perf jevents: Compress the pmu_events_table perf metrics: Copy entire pmu_event in find metric perf pmu-events: Hide the pmu_events perf pmu-events: Don't assume pmu_event is an array perf pmu-events: Move test events/metrics to JSON perf test: Use full metric resolution perf pmu-events: Hide pmu_events_map ... commit d785610f052d7456497cdec2a2406f6d4b16569f Merge: aea23e7c464b 83ee9f23763a Author: Linus Torvalds Date: Sun Aug 14 08:48:13 2022 -0700 Merge tag 'powerpc-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Ensure we never emit lwarx with EH=1 on 32-bit, because some 32-bit CPUs trap on it rather than ignoring it as they should. - Fix ftrace when building with clang, which was broken by some refactoring. - A couple of other minor fixes. Thanks to Christophe Leroy, Naveen N. Rao, Nick Desaulniers, Ondrej Mosnacek, Pali Rohár, Russell Currey, and Segher Boessenkool. * tag 'powerpc-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/kexec: Fix build failure from uninitialised variable powerpc/ppc-opcode: Fix PPC_RAW_TW() powerpc64/ftrace: Fix ftrace for clang builds powerpc: Make eh value more explicit when using lwarx powerpc: Don't hide eh field of lwarx behind a macro powerpc: Fix eh field when calling lwarx on PPC32 commit 8924779df820c53875abaeb10c648e9cb75b46d4 Author: Nadav Amit Date: Sat Aug 13 15:59:43 2022 -0700 x86/kprobes: Fix JNG/JNLE emulation When kprobes emulates JNG/JNLE instructions on x86 it uses the wrong condition. For JNG (opcode: 0F 8E), according to Intel SDM, the jump is performed if (ZF == 1 or SF != OF). However the kernel emulation currently uses 'and' instead of 'or'. As a result, setting a kprobe on JNG/JNLE might cause the kernel to behave incorrectly whenever the kprobe is hit. Fix by changing the 'and' to 'or'. Fixes: 6256e668b7af ("x86/kprobes: Use int3 instead of debug trap for single-step") Signed-off-by: Nadav Amit Signed-off-by: Ingo Molnar Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220813225943.143767-1-namit@vmware.com arch/x86/kernel/kprobes/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aea23e7c464bfdec04b52cf61edb62030e9e0d0a Merge: 332019e23a51 ed5fce76b5ea Author: Linus Torvalds Date: Sat Aug 13 17:35:58 2022 -0700 Merge tag 'pull-work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull /proc/mounts fix from Al Viro: "Fix for /proc/mounts escaping - escape the '#' character too" * tag 'pull-work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: vfs: escape hash as well commit 332019e23a51db1aa46fec695a9a763445fbe09f Merge: 8549a26308f9 7eb59a98701d Author: Linus Torvalds Date: Sat Aug 13 17:31:18 2022 -0700 Merge tag '5.20-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 Pull more cifs updates from Steve French: - two fixes for stable, one for a lock length miscalculation, and another fixes a lease break timeout bug - improvement to handle leases, allows the close timeout to be configured more safely - five restructuring/cleanup patches * tag '5.20-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6: cifs: Do not access tcon->cfids->cfid directly from is_path_accessible cifs: Add constructor/destructors for tcon->cfid SMB3: fix lease break timeout when multiple deferred close handles for the same file. smb3: allow deferred close timeout to be configurable cifs: Do not use tcon->cfid directly, use the cfid we get from open_cached_dir cifs: Move cached-dir functions into a separate file cifs: Remove {cifs,nfs}_fscache_release_page() cifs: fix lock length calculation commit 8549a26308f945bddb39391643eb102da026f0ef Author: David Howells Date: Wed Aug 10 18:52:47 2022 +0100 afs: Enable multipage folio support Enable multipage folio support for the afs filesystem. Support has already been implemented in netfslib, fscache and cachefiles and in most of afs, but I've waited for Matthew Wilcox's latest folio changes. Note that it does require a change to afs_write_begin() to return the correct subpage. This is a "temporary" change as we're working on getting rid of the need for ->write_begin() and ->write_end() completely, at least as far as network filesystems are concerned - but it doesn't prevent afs from making use of the capability. Signed-off-by: David Howells Acked-by: Matthew Wilcox (Oracle) Tested-by: kafs-testing@auristor.com Cc: Marc Dionne Cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/lkml/2274528.1645833226@warthog.procyon.org.uk/ Signed-off-by: Linus Torvalds fs/afs/inode.c | 2 ++ fs/afs/write.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit f6eb0fed6a3957c0b93e3a00c1ffaad84d4ffc31 Merge: c5f1e32e3231 e362359ace6f Author: Linus Torvalds Date: Sat Aug 13 14:38:22 2022 -0700 Merge tag 'timers-urgent-2022-08-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Ingo Molnar: "Misc timer fixes: - fix a potential use-after-free bug in posix timers - correct a prototype - address a build warning" * tag 'timers-urgent-2022-08-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: posix-cpu-timers: Cleanup CPU timers before freeing them during exec time: Correct the prototype of ns_to_kernel_old_timeval and ns_to_timespec64 posix-timers: Make do_clock_gettime() static commit c5f1e32e323157c71eacc6fe087db8d586ff6cb5 Merge: 04734361953b e6cfcdda8cbe Author: Linus Torvalds Date: Sat Aug 13 14:24:12 2022 -0700 Merge tag 'x86-urgent-2022-08-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Ingo Molnar: "Fix the 'IBPB mitigated RETBleed' mode of operation on AMD CPUs (not turned on by default), which also need STIBP enabled (if available) to be '100% safe' on even the shortest speculation windows" * tag 'x86-urgent-2022-08-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/bugs: Enable STIBP for IBPB mitigated RETBleed commit 04734361953b8cc30d5552c1abe907ccfc8bc0fa Merge: a976835fdb31 fe99b819487d Author: Linus Torvalds Date: Sat Aug 13 14:06:08 2022 -0700 Merge tag 'i2c-for-5.20-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull more i2c updates from Wolfram Sang: - two driver fixes for issues introduced this cycle - one trivial driver improvement regarding ACPI - more DTS conversion and additions - documentation updates - subsystem-wide move from strlcpy to strscpy * tag 'i2c-for-5.20-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: docs: i2c: i2c-sysfs: fix hyperlinks docs: i2c: i2c-sysfs: improve wording docs: i2c: instantiating-devices: add syntax coloring to dts and C blocks docs: i2c: smbus-protocol: improve DataLow/DataHigh definition docs: i2c: i2c-protocol: remove unused legend items docs: i2c: i2c-protocol,smbus-protocol: remove nonsense words docs: i2c: i2c-protocol: update introductory paragraph i2c: move core from strlcpy to strscpy i2c: move drivers from strlcpy to strscpy i2c: kempld: Support ACPI I2C device declaration i2c: mediatek: add i2c compatible for MT8188 dt-bindings: i2c: update bindings for mt8188 soc i2c: microchip-corei2c: fix erroneous late ack send dt-bindings: i2c: qcom,i2c-cci: convert to dtschema i2c: qcom-geni: Fix GPI DMA buffer sync-back commit a976835fdb312590ee5c085567a4e2b06da7ac33 Merge: 9872e4a8734c e4fe2a2fc423 Author: Linus Torvalds Date: Sat Aug 13 14:00:45 2022 -0700 Merge tag 'ntb-5.20' of https://github.com/jonmason/ntb Pull NTB updates from Jon Mason: "Non-Transparent Bridge updates. Fix of heap data and clang warnings, support for a new Intel NTB device, and NTB EndPoint Function (EPF) support and the various fixes for that" * tag 'ntb-5.20' of https://github.com/jonmason/ntb: MAINTAINERS: add PCI Endpoint NTB drivers to NTB files NTB: EPF: Tidy up some bounds checks NTB: EPF: Fix error code in epf_ntb_bind() PCI: endpoint: pci-epf-vntb: reduce several globals to statics PCI: endpoint: pci-epf-vntb: fix error handle in epf_ntb_mw_bar_init() PCI: endpoint: Fix Kconfig dependency NTB: EPF: set pointer addr to null using NULL rather than 0 Documentation: PCI: extend subheading underline for "lspci output" section Documentation: PCI: Use code-block block for scratchpad registers diagram Documentation: PCI: Add specification for the PCI vNTB function device PCI: endpoint: Support NTB transfer between RC and EP NTB: epf: Allow more flexibility in the memory BAR map method PCI: designware-ep: Allow pci_epc_set_bar() update inbound map address ntb: intel: add GNR support for Intel PCIe gen5 NTB NTB: ntb_tool: uninitialized heap data in tool_fn_write() ntb: idt: fix clang -Wformat warnings commit 9872e4a8734c68b78e8782e4f7f49e22cd6e9463 Merge: e140f731f980 031d166f968e Author: Linus Torvalds Date: Sat Aug 13 13:50:11 2022 -0700 Merge tag 'xfs-5.20-merge-8' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull more xfs updates from Darrick Wong: "There's not a lot this time around, just the usual bug fixes and corrections for missing error returns. - Return error codes from block device flushes to userspace - Fix a deadlock between reclaim and mount time quotacheck - Fix an unnecessary ENOSPC return when doing COW on a filesystem with severe free space fragmentation - Fix a miscalculation in the transaction reservation computations for file removal operations" * tag 'xfs-5.20-merge-8' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix inode reservation space for removing transaction xfs: Fix false ENOSPC when performing direct write on a delalloc extent in cow fork xfs: fix intermittent hang during quotacheck xfs: check return codes when flushing block devices commit e140f731f9807035e967c401198171f316744696 Merge: abe7a481aac9 c6380f992427 Author: Linus Torvalds Date: Sat Aug 13 13:41:48 2022 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull more SCSI updates from James Bottomley: "Mostly small bug fixes and trivial updates. The major new core update is a change to the way device, target and host reference counting is done to try to make it more robust (this change has soaked for a while to try to winkle out any bugs)" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: pm8001: Fix typo 'the the' in comment scsi: megaraid_sas: Remove redundant variable cmd_type scsi: FlashPoint: Remove redundant variable bm_int_st scsi: zfcp: Fix missing auto port scan and thus missing target ports scsi: core: Call blk_mq_free_tag_set() earlier scsi: core: Simplify LLD module reference counting scsi: core: Make sure that hosts outlive targets scsi: core: Make sure that targets outlive devices scsi: ufs: ufs-pci: Correct check for RESET DSM scsi: target: core: De-RCU of se_lun and se_lun acl scsi: target: core: Fix race during ACL removal scsi: ufs: core: Correct ufshcd_shutdown() flow scsi: ufs: core: Increase the maximum data buffer size scsi: lpfc: Check the return value of alloc_workqueue() commit abe7a481aac9c277798661f846222f8ad7a6aed5 Merge: 1da8cf961bb1 aa0c680c3aa9 Author: Linus Torvalds Date: Sat Aug 13 13:37:36 2022 -0700 Merge tag 'block-6.0-2022-08-12' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - NVMe pull request - print nvme connect Linux error codes properly (Amit Engel) - fix the fc_appid_store return value (Christoph Hellwig) - fix a typo in an error message (Christophe JAILLET) - add another non-unique identifier quirk (Dennis P. Kliem) - check if the queue is allocated before stopping it in nvme-tcp (Maurizio Lombardi) - restart admin queue if the caller needs to restart queue in nvme-fc (Ming Lei) - use kmemdup instead of kmalloc + memcpy in nvme-auth (Zhang Xiaoxu) - __alloc_disk_node() error handling fix (Rafael) * tag 'block-6.0-2022-08-12' of git://git.kernel.dk/linux-block: block: Do not call blk_put_queue() if gendisk allocation fails nvme-pci: add NVME_QUIRK_BOGUS_NID for ADATA XPG GAMMIX S70 nvme-tcp: check if the queue is allocated before stopping it nvme-fabrics: Fix a typo in an error message nvme-fabrics: parse nvme connect Linux error codes nvmet-auth: use kmemdup instead of kmalloc + memcpy nvme-fc: fix the fc_appid_store return value nvme-fc: restart admin queue if the caller needs to restart queue commit 1da8cf961bb13f4c3ea11373696b5ac986a47cde Merge: 69dac8e431af 9c71d39aa0f4 Author: Linus Torvalds Date: Sat Aug 13 13:28:54 2022 -0700 Merge tag 'io_uring-6.0-2022-08-13' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: - Regression fix for this merge window, fixing a wrong order of arguments for io_req_set_res() for passthru (Dylan) - Fix for the audit code leaking context memory (Peilin) - Ensure that provided buffers are memcg accounted (Pavel) - Correctly handle short zero-copy sends (Pavel) - Sparse warning fixes for the recvmsg multishot command (Dylan) - Error handling fix for passthru (Anuj) - Remove randomization of struct kiocb fields, to avoid it growing in size if re-arranged in such a fashion that it grows more holes or padding (Keith, Linus) - Small series improving type safety of the sqe fields (Stefan) * tag 'io_uring-6.0-2022-08-13' of git://git.kernel.dk/linux-block: io_uring: add missing BUILD_BUG_ON() checks for new io_uring_sqe fields io_uring: make io_kiocb_to_cmd() typesafe fs: don't randomize struct kiocb fields io_uring: consistently make use of io_notif_to_data() io_uring: fix error handling for io_uring_cmd io_uring: fix io_recvmsg_prep_multishot sparse warnings io_uring/net: send retry for zerocopy io_uring: mem-account pbuf buckets audit, io_uring, io-wq: Fix memory leak in io_sq_thread() and io_wqe_worker() io_uring: pass correct parameters to io_req_set_res commit 7391db6459388d47d657aad633cb55fc04a8d4fb Author: Carsten Haitzler Date: Fri Aug 12 13:16:28 2022 +0100 perf test: Refactor shell tests allowing subdirs This is a prelude to adding more tests to shell tests and in order to support putting those tests into subdirectories, I need to change the test code that scans/finds and runs them. To support subdirs I have to recurse so it's time to refactor the code to allow this and centralize the shell script finding into one location and only one single scan that builds a list of all the found tests in memory instead of it being duplicated in 3 places. This code also optimizes things like knowing the max width of desciption strings (as we can do that while we scan instead of a whole new pass of opening files). It also more cleanly filters scripts to see only *.sh files thus skipping random other files in directories like *~ backup files, other random junk/data files that may appear and the scripts must be executable to make the cut (this ensures the script lib dir is not seen as scripts to run). This avoids perf test running previous older versions of test scripts that are editor backup files as well as skipping perf.data files that may appear and so on. Reviewed-by: Leo Yan Signed-off-by: Carsten Haitzler Tested-by: Leo Yan Cc: Mathieu Poirier Cc: Mike Leach Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Link: https://lore.kernel.org/r/20220812121641.336465-2-carsten.haitzler@foss.arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test-list.c | 207 +++++++++++++++++++++++++++++++++++ tools/perf/tests/builtin-test-list.h | 12 ++ tools/perf/tests/builtin-test.c | 152 +++---------------------- 4 files changed, 238 insertions(+), 134 deletions(-) commit aa0d6e9cc23e996b484725d0a31906809862d678 Author: Zhengjun Xing Date: Fri Aug 12 16:52:39 2022 +0800 perf vendor events: Update events for snowridgex Update the events to v1.20, update events for snowridgex by the latest event converter tools. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the snowridgex files into perf. Signed-off-by: Xing Zhengjun Tested-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220812085239.3089231-12-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/snowridgex/uncore-other.json | 111 +++++---------------- 1 file changed, 27 insertions(+), 84 deletions(-) commit ce87616d0dff3a9b80158bb9a9f6c20c1a88b378 Author: Zhengjun Xing Date: Fri Aug 12 16:52:38 2022 +0800 perf vendor events: Update events and metrics for skylakex Update the events to v1.28, the metrics are based on TMA 4.4 full, update events and metrics for skylakex by the latest event converter tools. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the skylakex files into perf. Signed-off-by: Xing Zhengjun Tested-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220812085239.3089231-11-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/skylakex/skx-metrics.json | 6 + .../arch/x86/skylakex/uncore-memory.json | 3566 ++- .../pmu-events/arch/x86/skylakex/uncore-other.json | 23442 +++++++++++++++++-- .../pmu-events/arch/x86/skylakex/uncore-power.json | 201 + 4 files changed, 25488 insertions(+), 1727 deletions(-) commit 74d8ca6d85a31c537a7934683bfda617ee95a452 Author: Zhengjun Xing Date: Fri Aug 12 16:52:37 2022 +0800 perf vendor events: Update metrics for sapphirerapids The metrics are based on TMA 4.4 full, add new metrics “UNCORE_FREQ” for sapphirerapids. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the sapphirerapids files into perf. Signed-off-by: Xing Zhengjun Tested-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220812085239.3089231-10-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/sapphirerapids/spr-metrics.json | 6 ++++++ 1 file changed, 6 insertions(+) commit 107630e6a57544dae5357834244ebbffd0ba4c92 Author: Zhengjun Xing Date: Fri Aug 12 16:52:36 2022 +0800 perf vendor events: Update events for knightslanding Update the events to v9, update events for knightslanding by the latest event converter tools. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the knightslanding files into perf. Signed-off-by: Xing Zhengjun Tested-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220812085239.3089231-9-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/knightslanding/uncore-other.json | 213 +++++++++++++++++++++ 1 file changed, 213 insertions(+) commit b823ee183dc4224f29a8b5e172b647256da24c0e Author: Zhengjun Xing Date: Fri Aug 12 16:52:35 2022 +0800 perf vendor events: Update metrics for jaketown The metrics are based on TMA 4.4 full, add new metrics “UNCORE_FREQ” for jaketown. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the jaketown files into perf. Signed-off-by: Xing Zhengjun Tested-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220812085239.3089231-8-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/jaketown/jkt-metrics.json | 6 ++++++ 1 file changed, 6 insertions(+) commit cb73eeb95a2c293fa011e3151d9d57e249122a18 Author: Zhengjun Xing Date: Fri Aug 12 16:52:34 2022 +0800 perf vendor events: Update metrics for ivytown The metrics are based on TMA 4.4 full, add new metrics “UNCORE_FREQ” for ivytown. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the ivytown files into perf. Signed-off-by: Xing Zhengjun Tested-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220812085239.3089231-7-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/ivytown/ivt-metrics.json | 6 ++++++ 1 file changed, 6 insertions(+) commit b8d4fbfb04e1041905d8c0afaa545508eba9cb40 Author: Zhengjun Xing Date: Fri Aug 12 16:52:33 2022 +0800 perf vendor events: Update events and metrics for icelakex Update the events to v1.15, the metrics are based on TMA 4.4 full, update events and metrics for icelakex by the latest event converter tools. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the icelakex files into perf. Signed-off-by: Xing Zhengjun Tested-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220812085239.3089231-6-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/icelakex/icx-metrics.json | 6 + .../arch/x86/icelakex/uncore-memory.json | 1523 + .../pmu-events/arch/x86/icelakex/uncore-other.json | 38506 ++++++++++++++++++- .../pmu-events/arch/x86/icelakex/uncore-power.json | 225 + 4 files changed, 39018 insertions(+), 1242 deletions(-) commit 575c3640a4aa475c8620a9120b6df340731fc9a0 Author: Zhengjun Xing Date: Fri Aug 12 16:52:32 2022 +0800 perf vendor events: Update events and metrics for haswellx Update the events to v25, the metrics are based on TMA 4.4 full, update events and metrics for haswellx by the latest event converter tools. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the haswellx files into perf. Signed-off-by: Xing Zhengjun Tested-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220812085239.3089231-5-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/haswellx/hsx-metrics.json | 411 ++++++++++++++++++++- .../pmu-events/arch/x86/haswellx/uncore-cache.json | 173 +-------- 2 files changed, 413 insertions(+), 171 deletions(-) commit c6e9c0441801c3093d5e86c04db1880a3e273152 Author: Zhengjun Xing Date: Fri Aug 12 16:52:31 2022 +0800 perf vendor events: Update events and metrics for cascadelakex Update to v16, the metrics are based on TMA 4.4 full, update events and add new metrics “UNCORE_FREQ” for cascadelakex. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the cascadelakex files into perf. Signed-off-by: Xing Zhengjun Tested-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220812085239.3089231-4-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/cascadelakex/clx-metrics.json | 6 + .../arch/x86/cascadelakex/uncore-memory.json | 4424 +++- .../arch/x86/cascadelakex/uncore-other.json | 23162 +++++++++++++++++-- .../arch/x86/cascadelakex/uncore-power.json | 201 + 4 files changed, 26200 insertions(+), 1593 deletions(-) commit e349fa6cc824450f1aa0c4acbfefaa3c9a0cae9b Author: Zhengjun Xing Date: Fri Aug 12 16:52:30 2022 +0800 perf vendor events: Update events and metrics for broadwellx Update to v19, the metrics are based on TMA 4.4 full, update events and add new metrics “UNCORE_FREQ” for broadwellx. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the broadwellx files into perf. Signed-off-by: Xing Zhengjun Tested-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220812085239.3089231-3-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/broadwellx/bdx-metrics.json | 6 + .../arch/x86/broadwellx/uncore-cache.json | 163 +-------------------- 2 files changed, 10 insertions(+), 159 deletions(-) commit bf79e18fdf65b451acf00457910879115cc51b1c Author: Zhengjun Xing Date: Fri Aug 12 16:52:29 2022 +0800 perf vendor events: Update metrics for broadwellde The metrics are based on TMA 4.4 full, add new metrics “UNCORE_FREQ” for broadwellde. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the broadwellde files into perf. Signed-off-by: Xing Zhengjun Tested-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220812085239.3089231-2-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/broadwellde/bdwde-metrics.json | 6 ++++++ 1 file changed, 6 insertions(+) commit d0313e629f2690edfd269896b398048275227db0 Author: Ian Rogers Date: Fri Aug 12 16:09:49 2022 -0700 perf jevents: Fold strings optimization If a shorter string ends a longer string then the shorter string may reuse the longer string at an offset. For example, on x86 the event arith.cycles_div_busy and cycles_div_busy can be folded, even though they have difference names the strings are identical after 6 characters. cycles_div_busy can reuse the arith.cycles_div_busy string at an offset of 6. In pmu-events.c this looks like the following where the 'also:' lists folded strings: /* offset=177541 */ "arith.cycles_div_busy\000\000pipeline\000Cycles the divider is busy\000\000\000event=0x14,period=2000000,umask=0x1\000\000\000\000\000\000\000\000\000" /* also: cycles_div_busy\000\000pipeline\000Cycles the divider is busy\000\000\000event=0x14,period=2000000,umask=0x1\000\000\000\000\000\000\000\000\000 */ As jevents.py combines multiple strings for an event into a larger string, the amount of folding is minimal as all parts of the event must align. Other organizations can benefit more from folding, but lose space by say recording more offsets. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220812230949.683239-15-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.py | 55 +++++++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 7 deletions(-) commit 9118259c1dc275e0f7b90da0d3cbaadc4e1ca3fe Author: Ian Rogers Date: Fri Aug 12 16:09:48 2022 -0700 perf jevents: Compress the pmu_events_table The pmu_events array requires 15 pointers per entry which in position independent code need relocating. Change the array to be an array of offsets within a big C string. Only the offset of the first variable is required, subsequent variables are stored in order after the \0 terminator (requiring a byte per variable rather than 4 bytes per offset). The file size savings are: no jevents - the same 19,788,464bytes x86 jevents - ~16.7% file size saving 23,744,288bytes vs 28,502,632bytes all jevents - ~19.5% file size saving 24,469,056bytes vs 30,379,920bytes default build options plus NO_LIBBFD=1. For example, the x86 build savings come from .rela.dyn and .data.rel.ro becoming smaller by 3,157,032bytes and 3,042,016bytes respectively. .rodata increases by 1,432,448bytes, giving an overall 4,766,600bytes saving. To make metric strings more shareable, the topic is changed from say 'skx metrics' to just 'metrics'. To try to help with the memory layout the pmu_events are ordered as used by perf qsort comparator functions. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220812230949.683239-14-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.py | 207 ++++++++++++++++++++++++++++++--------- 1 file changed, 162 insertions(+), 45 deletions(-) commit d3abd7b8bd8af16703e81410de3e35bf4de3a9ce Author: Ian Rogers Date: Fri Aug 12 16:09:47 2022 -0700 perf metrics: Copy entire pmu_event in find metric The pmu_event passed to the pmu_events_table_for_each_event is invalid after the loop. Copy the entire struct in metricgroup__find_metric. Reduce the scope of this function to static. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220812230949.683239-13-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/metricgroup.c | 33 ++++++++++++++++++--------------- tools/perf/util/metricgroup.h | 2 -- 2 files changed, 18 insertions(+), 17 deletions(-) commit 1ba3752aec30c04bfb7c82b44332ff98294ec0b8 Author: Ian Rogers Date: Fri Aug 12 16:09:46 2022 -0700 perf pmu-events: Hide the pmu_events Hide that the pmu_event structs are an array with a new wrapper struct. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220812230949.683239-12-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm64/util/pmu.c | 2 +- tools/perf/pmu-events/empty-pmu-events.c | 44 ++++++++++++++++-------------- tools/perf/pmu-events/jevents.py | 47 ++++++++++++++++++-------------- tools/perf/pmu-events/pmu-events.h | 12 ++++---- tools/perf/tests/expand-cgroup.c | 2 +- tools/perf/tests/parse-metric.c | 2 +- tools/perf/tests/pmu-events.c | 16 +++++------ tools/perf/util/metricgroup.c | 42 ++++++++++++++-------------- tools/perf/util/metricgroup.h | 5 ++-- tools/perf/util/pmu.c | 10 +++---- tools/perf/util/pmu.h | 4 +-- tools/perf/util/s390-sample-raw.c | 6 ++-- 12 files changed, 101 insertions(+), 91 deletions(-) commit 660842e468dcefb5d1d4fb40ed3abe4d1388dff7 Author: Ian Rogers Date: Fri Aug 12 16:09:45 2022 -0700 perf pmu-events: Don't assume pmu_event is an array The current code assumes that a struct pmu_event can be iterated over forward until a NULL pmu_event is encountered. This makes it difficult to refactor pmu_event. Add a loop function taking a callback function that's passed the struct pmu_event. This way the pmu_event is only needed for one element and not an entire array. Switch existing code iterating over the pmu_event arrays to use the new loop function pmu_events_table_for_each_event. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220812230949.683239-11-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/empty-pmu-events.c | 34 +++--- tools/perf/pmu-events/jevents.py | 34 +++--- tools/perf/pmu-events/pmu-events.h | 3 + tools/perf/tests/pmu-events.c | 136 +++++++++++++---------- tools/perf/util/metricgroup.c | 181 +++++++++++++++++++++---------- tools/perf/util/pmu.c | 65 ++++++----- tools/perf/util/s390-sample-raw.c | 42 +++++-- 7 files changed, 313 insertions(+), 182 deletions(-) commit 7ae5c03a27934bee9daaeede1b0b1d4bada61ffd Author: Ian Rogers Date: Fri Aug 12 16:09:44 2022 -0700 perf pmu-events: Move test events/metrics to JSON Move arrays of pmu_events into the JSON code so that it may be regenerated and modified by the jevents.py script. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220812230949.683239-10-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/test/test_soc/cpu/metrics.json | 64 ++++++++++++++++++++ tools/perf/pmu-events/empty-pmu-events.c | 64 ++++++++++++++++++++ tools/perf/tests/expand-cgroup.c | 17 +----- tools/perf/tests/parse-metric.c | 68 +--------------------- 4 files changed, 132 insertions(+), 81 deletions(-) commit 64234c141bc8fb76c3166d39143f2bf66ffe9a22 Author: Ian Rogers Date: Fri Aug 12 16:09:43 2022 -0700 perf test: Use full metric resolution The simple metric resolution doesn't handle recursion properly, switch to use the full resolution as with the parse-metric tests which also increases coverage. Don't set the values for the metric backward as failures to generate a result are ignored. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220812230949.683239-9-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/pmu-events.c | 222 +++++++++++++++--------------------------- 1 file changed, 77 insertions(+), 145 deletions(-) commit 29be2fe0c157ee5c8c5d9571f42dc1f0f5d8f67b Author: Ian Rogers Date: Fri Aug 12 16:09:42 2022 -0700 perf pmu-events: Hide pmu_events_map Move usage of the table to pmu-events.c so it may be hidden. By abstracting the table the implementation can later be changed. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220812230949.683239-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/empty-pmu-events.c | 81 +++++++++++- tools/perf/pmu-events/jevents.py | 81 +++++++++++- tools/perf/pmu-events/pmu-events.h | 29 ++-- tools/perf/tests/pmu-events.c | 218 ++++++++++++++----------------- tools/perf/util/metricgroup.c | 15 ++- tools/perf/util/pmu.c | 34 +---- tools/perf/util/pmu.h | 2 +- 7 files changed, 280 insertions(+), 180 deletions(-) commit eeac7730418563152b0e3172bce9bac4ff6d6bc4 Author: Ian Rogers Date: Fri Aug 12 16:09:41 2022 -0700 perf pmu-events: Avoid passing pmu_events_map Preparation for hiding pmu_events_map as an implementation detail. While the map is passed, the table of events is all that is normally wanted. While modifying the function's types, rename pmu_events_map__find to pmu_events_table__find to match later encapsulation. Similarly rename pmu_add_cpu_aliases_map to pmu_add_cpu_aliases_table. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220812230949.683239-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm64/util/pmu.c | 4 +- tools/perf/tests/expand-cgroup.c | 6 +-- tools/perf/tests/parse-metric.c | 7 +--- tools/perf/tests/pmu-events.c | 63 +++++++++++++----------------- tools/perf/util/metricgroup.c | 82 +++++++++++++++++++-------------------- tools/perf/util/metricgroup.h | 4 +- tools/perf/util/pmu.c | 35 +++++++++-------- tools/perf/util/pmu.h | 8 ++-- tools/perf/util/s390-sample-raw.c | 12 +++--- 9 files changed, 101 insertions(+), 120 deletions(-) commit 2519db2a9dc4f7ca5c1ad8309c51262e5b8ef89f Author: Ian Rogers Date: Fri Aug 12 16:09:40 2022 -0700 perf pmu-events: Hide pmu_sys_event_tables Move usage of the table to pmu-events.c so it may be hidden. By abstracting the table the implementation can later be changed. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220812230949.683239-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/empty-pmu-events.c | 37 +++++++++++++++++++++++++- tools/perf/pmu-events/jevents.py | 45 +++++++++++++++++++++++++++++--- tools/perf/pmu-events/pmu-events.h | 11 ++++---- tools/perf/tests/pmu-events.c | 14 +--------- tools/perf/util/pmu.c | 27 ------------------- tools/perf/util/pmu.h | 2 -- 6 files changed, 84 insertions(+), 52 deletions(-) commit 7b2f844c43cef59740095dfa1f6366f3dfb318dc Author: Ian Rogers Date: Fri Aug 12 16:09:39 2022 -0700 perf jevents: Sort JSON files entries Sort the JSON files entries on conversion to C. The sort order tries to replicated cmp_sevent from pmu.c so that the input there is already sorted except for sysfs events. Specifically, the sort order is given by the tuple: (not j.desc is None, fix_none(j.topic), fix_none(j.name), fix_none(j.pmu), fix_none(j.metric_name)) which is putting events with descriptions and topics before those without, then sorting by name, then pmu and finally metric_name Add the topic to JsonEvent on reading to simplify. Remove an unnecessary lambda in the JSON reading. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220812230949.683239-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.py | 48 +++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 13 deletions(-) commit ee2ce6fdc8021979346f71056938c60335a7570c Author: Ian Rogers Date: Fri Aug 12 16:09:38 2022 -0700 perf jevents: Provide path to JSON file on error If a JSONDecoderError or similar is raised then it is useful to know the path. Print this and then raise the exception agan. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220812230949.683239-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit f793ae185e27645ad83942ef6fffd901b8169941 Author: Ian Rogers Date: Fri Aug 12 16:09:37 2022 -0700 perf jevents: Remove the type/version variables pmu_events_map has a type variable that is always initialized to "core" and a version variable that is never read. Remove these from the API as it is straightforward to add them back when necessary. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220812230949.683239-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/empty-pmu-events.c | 4 ---- tools/perf/pmu-events/jevents.py | 6 ------ tools/perf/pmu-events/pmu-events.h | 2 -- tools/perf/tests/expand-cgroup.c | 2 -- tools/perf/tests/parse-metric.c | 2 -- 5 files changed, 16 deletions(-) commit 099b157c08e8e8faa622d4bb70826ae179248fd4 Author: Ian Rogers Date: Fri Aug 12 16:09:36 2022 -0700 perf jevent: Add an 'all' architecture argument When 'all' is passed as the architecture generate a mapping table for all architectures. This simplifies testing. To identify the table for an architecture add an arch variable to the pmu_events_map. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220812230949.683239-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/empty-pmu-events.c | 2 + tools/perf/pmu-events/jevents.py | 70 ++++++++++++++++++++------------ tools/perf/pmu-events/pmu-events.h | 1 + tools/perf/tests/pmu-events.c | 3 +- 4 files changed, 47 insertions(+), 29 deletions(-) commit 5f6277a0c15e1ea54b6fd3d78c9fff7bfe42556c Author: Trond Myklebust Date: Sat Aug 13 08:51:45 2022 -0400 NFS: Cleanup to remove unused flag NFS_CONTEXT_RESEND_WRITES Signed-off-by: Trond Myklebust include/linux/nfs_fs.h | 1 - 1 file changed, 1 deletion(-) commit edf79efcc9d0cf38fcc1efe688fd697b9bb0ddc4 Author: Trond Myklebust Date: Sat Aug 13 08:46:35 2022 -0400 NFS: Remove a bogus flag setting in pnfs_write_done_resend_to_mds Since pnfs_write_done_resend_to_mds() does not actually call end_page_writeback() on the pages that are being redirected to the metadata server, callers of fsync() do not see the I/O as complete until the writeback to the MDS finishes. We therefore do not need to set NFS_CONTEXT_RESEND_WRITES, since there is nothing to redrive. Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 1 - 1 file changed, 1 deletion(-) commit 67f4b5dc49913abcdb5cc736e73674e2f352f81d Author: Trond Myklebust Date: Sat Aug 13 08:22:25 2022 -0400 NFS: Fix another fsync() issue after a server reboot Currently, when the writeback code detects a server reboot, it redirties any pages that were not committed to disk, and it sets the flag NFS_CONTEXT_RESEND_WRITES in the nfs_open_context of the file descriptor that dirtied the file. While this allows the file descriptor in question to redrive its own writes, it violates the fsync() requirement that we should be synchronising all writes to disk. While the problem is infrequent, we do see corner cases where an untimely server reboot causes the fsync() call to abandon its attempt to sync data to disk and causing data corruption issues due to missed error conditions or similar. In order to tighted up the client's ability to deal with this situation without introducing livelocks, add a counter that records the number of times pages are redirtied due to a server reboot-like condition, and use that in fsync() to redrive the sync to disk. Fixes: 2197e9b06c22 ("NFS: Fix up fsync() when the server rebooted") Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust fs/nfs/file.c | 15 ++++++--------- fs/nfs/inode.c | 1 + fs/nfs/write.c | 6 ++++-- include/linux/nfs_fs.h | 1 + 4 files changed, 12 insertions(+), 11 deletions(-) commit 2067231a9e2cbbcae0a4aca6ac36ff2dd6a7b701 Author: Sun Ke Date: Fri Aug 12 09:14:40 2022 +0800 NFS: Fix missing unlock in nfs_unlink() Add the missing unlock before goto. Fixes: 3c59366c207e ("NFS: don't unhash dentry during unlink/rename") Signed-off-by: Sun Ke Signed-off-by: Trond Myklebust fs/nfs/dir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 92cb6e2e5dbaea02c2fa317f3543c8918db25e89 Author: ZiyangZhang Date: Wed Aug 10 13:52:12 2022 +0800 ublk_drv: update iod->addr for UBLK_IO_NEED_GET_DATA If ublksrv sends UBLK_IO_NEED_GET_DATA with new allocated io buffer, we have to update iod->addr in task_work before calling io_uring_cmd_done(). Then usersapce target can handle (write)io request with the new io buffer reading from updated iod. Without this change, userspace target may touch a wrong io buffer! Signed-off-by: ZiyangZhang Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20220810055212.66417-1-ZiyangZhang@linux.alibaba.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 5 +++++ 1 file changed, 5 insertions(+) commit 777885673122b78b2abd2f1e428730961a786ff2 Author: Hongbin Wang Date: Thu Aug 11 23:38:33 2022 -0400 ip6_tunnel: Fix the type of functions Functions ip6_tnl_change, ip6_tnl_update and ip6_tnl0_update do always return 0, change the type of functions to void. Signed-off-by: Hongbin Wang Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 69dac8e431af26173ca0a1ebc87054e01c585bcc Merge: 6c833c0581f1 5cef38dd03f3 Author: Linus Torvalds Date: Fri Aug 12 18:39:43 2022 -0700 Merge tag 'riscv-for-linus-5.20-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull more RISC-V updates from Palmer Dabbelt: "There's still a handful of new features in here, but there are a lot of fixes/cleanups as well: - Support for the Zicbom extension for explicit cache-block management, along with the necessary bits to make the non-standard cache management ops on the Allwinner D1 function - Support for the Zihintpause extension, which codifies a go-slow instruction used for cpu_relax() - Support for the Sstc extension for supervisor-mode timer/counter management - Many device tree fixes and cleanups, including a large set for the Canaan device trees - A handful of fixes and cleanups for the PMU driver" * tag 'riscv-for-linus-5.20-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (43 commits) dt-bindings: gpio: sifive: add gpio-line-names wireguard: selftests: set CONFIG_NONPORTABLE on riscv32 RISC-V: KVM: Support sstc extension RISC-V: Improve SBI definitions RISC-V: Move counter info definition to sbi header file RISC-V: Fix SBI PMU calls for RV32 RISC-V: Update user page mapping only once during start RISC-V: Fix counter restart during overflow for RV32 RISC-V: Prefer sstc extension if available RISC-V: Enable sstc extension parsing from DT RISC-V: Add SSTC extension CSR details riscv:uprobe fix SR_SPIE set/clear handling dt-bindings: riscv: fix SiFive l2-cache's cache-sets riscv: ensure cpu_ops_sbi is declared RISC-V: cpu_ops_spinwait.c should include head.h RISC-V: Declare cpu_ops_spinwait in riscv: dts: starfive: correct number of external interrupts riscv: dts: sifive unmatched: Add PWM controlled LEDs riscv/purgatory: Omit use of bin2c riscv/purgatory: hard-code obj-y in Makefile ... commit 6c833c0581f1c15db2e0344da19360cba75a3351 Merge: 3d076fec5a0c 8f426582e0e0 Author: Linus Torvalds Date: Fri Aug 12 18:23:52 2022 -0700 Merge tag 'devicetree-fixes-for-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Fix schema warnings in qcom,ipq6018-pinctrl and sdhci-msm - Convert Qualcomm SPMI PMIC to DT schema - Make secure interrupt optional for arm,mhu - Fix google,cros-ec-typec binding allowed properties - Update a bunch of bouncing email addresses * tag 'devicetree-fixes-for-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: chrome: google,cros-ec-typec: restrict allowed properties dt-bindings: Drop Dan Murphy and Ricardo Rivera-Matos dt-bindings: Drop Robert Jones dt-bindings: Drop Beniamin Bia and Stefan Popa dt-bindings: iio: Drop Bogdan Pricop dt-bindings: iio: Drop Joachim Eastwood dt-bindings: mailbox: arm,mhu: Make secure interrupt optional dt-bindings: pinctrl: qcom,ipq6018: Fix example 'gpio-ranges' size dt-bindings: Drop DT_MK_SCHEMA_FLAGS conditional selecting schema files dt-bindings: mfd: convert to yaml Qualcomm SPMI PMIC dt-bindings: mmc: sdhci-msm: Fix 'operating-points-v2 was unexpected' issue dt-bindings: display: simple-framebuffer: Drop Bartlomiej Zolnierkiewicz commit 3d076fec5a0c3e66e1d8cb16015ea9a59b66ae1b Merge: 4a9350597aff 03c4cd6f89e0 Author: Linus Torvalds Date: Fri Aug 12 18:17:42 2022 -0700 Merge tag 'rtc-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "New drivers: - Microchip PolarFire - Nuvoton NCT3018Y - TI K3 RTC Subsystem: - Replace flush_scheduled_work() with flush_work() - Remove deprecated ida_simple_get()/ida_simple_remove() calls Drivers: - use simple i2c probe where possible - sun6i: add R329 support - zynqmp: add calibration support - vr41xx: remove unused driver" * tag 'rtc-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (31 commits) rtc: spear: set range max rtc: rtc-cmos: Do not check ACPI_FADT_LOW_POWER_S0 rtc: zynqmp: initialize fract_tick rtc: Add NCT3018Y real time clock driver dt-bindings: rtc: nuvoton: add NCT3018Y Real Time Clock dt-bindings: rtc: nxp,pcf85063: Convert to DT schema dt-bindings: rtc: microcrystal,rv3032: Add missing type to 'trickle-voltage-millivolt' rtc: rx8025: fix 12/24 hour mode detection on RX-8035 rtc: cros-ec: Only warn once in .remove() about notifier_chain problems rtc: vr41xx: remove driver rtc: mpfs: remove 'pending' variable from mpfs_rtc_wakeup_irq_handler() rtc: rv8803: fix missing unlock on error in rv8803_set_time() rtc: zynqmp: Add calibration set and get support rtc: zynqmp: Updated calibration value dt-bindings: rtc: zynqmp: Add clock information rtc: sun6i: add support for R329 RTC rtc: Directly use ida_alloc()/free() rtc: Introduce ti-k3-rtc dt-bindings: rtc: Add TI K3 RTC description dt-bindings: rtc: qcom-pm8xxx-rtc: Update the maintainers section ... commit 246bbf2f977ea36aaf41f5d24370fef433250728 Author: Sergei Antonov Date: Thu Aug 11 10:09:39 2022 +0300 net: dsa: mv88e6060: prevent crash on an unused port If the port isn't a CPU port nor a user port, 'cpu_dp' is a null pointer and a crash happened on dereferencing it in mv88e6060_setup_port(): [ 9.575872] Unable to handle kernel NULL pointer dereference at virtual address 00000014 ... [ 9.942216] mv88e6060_setup from dsa_register_switch+0x814/0xe84 [ 9.948616] dsa_register_switch from mdio_probe+0x2c/0x54 [ 9.954433] mdio_probe from really_probe.part.0+0x98/0x2a0 [ 9.960375] really_probe.part.0 from driver_probe_device+0x30/0x10c [ 9.967029] driver_probe_device from __device_attach_driver+0xb8/0x13c [ 9.973946] __device_attach_driver from bus_for_each_drv+0x90/0xe0 [ 9.980509] bus_for_each_drv from __device_attach+0x110/0x184 [ 9.986632] __device_attach from bus_probe_device+0x8c/0x94 [ 9.992577] bus_probe_device from deferred_probe_work_func+0x78/0xa8 [ 9.999311] deferred_probe_work_func from process_one_work+0x290/0x73c [ 10.006292] process_one_work from worker_thread+0x30/0x4b8 [ 10.012155] worker_thread from kthread+0xd4/0x10c [ 10.017238] kthread from ret_from_fork+0x14/0x3c Fixes: 0abfd494deef ("net: dsa: use dedicated CPU port") CC: Vivien Didelot CC: Florian Fainelli Signed-off-by: Sergei Antonov Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220811070939.1717146-1-saproj@gmail.com Signed-off-by: Jakub Kicinski drivers/net/dsa/mv88e6060.c | 3 +++ 1 file changed, 3 insertions(+) commit 61d5e2a251fb20c2c5e998c3f1d52ed6d5360319 Author: Csókás Bence Date: Thu Aug 11 12:13:49 2022 +0200 fec: Fix timer capture timing in `fec_ptp_enable_pps()` Code reimplements functionality already in `fec_ptp_read()`, but misses check for FEC_QUIRK_BUG_CAPTURE. Replace with function call. Fixes: 28b5f058cf1d ("net: fec: ptp: fix convergence issue to support LinuxPTP stack") Signed-off-by: Csókás Bence Link: https://lore.kernel.org/r/20220811101348.13755-1-csokas.bence@prolan.hu Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/fec_ptp.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 9c71d39aa0f40d4e6bfe14958045a42c722bd327 Author: Stefan Metzmacher Date: Thu Aug 11 09:11:16 2022 +0200 io_uring: add missing BUILD_BUG_ON() checks for new io_uring_sqe fields Signed-off-by: Stefan Metzmacher Link: https://lore.kernel.org/r/ffcaf8dc4778db4af673822df60dbda6efdd3065.1660201408.git.metze@samba.org Signed-off-by: Jens Axboe io_uring/io_uring.c | 19 ++++++++++++++++--- io_uring/uring_cmd.c | 3 +++ 2 files changed, 19 insertions(+), 3 deletions(-) commit f2ccb5aed7bce1d8b3ed5b3385759a5509663028 Author: Stefan Metzmacher Date: Thu Aug 11 09:11:15 2022 +0200 io_uring: make io_kiocb_to_cmd() typesafe We need to make sure (at build time) that struct io_cmd_data is not casted to a structure that's larger. Signed-off-by: Stefan Metzmacher Link: https://lore.kernel.org/r/c024cdf25ae19fc0319d4180e2298bade8ed17b8.1660201408.git.metze@samba.org Signed-off-by: Jens Axboe include/linux/io_uring_types.h | 9 ++++++++- io_uring/advise.c | 8 ++++---- io_uring/cancel.c | 4 ++-- io_uring/epoll.c | 4 ++-- io_uring/fs.c | 28 ++++++++++++++-------------- io_uring/kbuf.c | 8 ++++---- io_uring/msg_ring.c | 8 ++++---- io_uring/net.c | 42 +++++++++++++++++++++--------------------- io_uring/notif.c | 2 -- io_uring/notif.h | 2 +- io_uring/openclose.c | 16 ++++++++-------- io_uring/poll.c | 16 ++++++++-------- io_uring/rsrc.c | 10 +++++----- io_uring/rw.c | 28 ++++++++++++++-------------- io_uring/splice.c | 8 ++++---- io_uring/statx.c | 6 +++--- io_uring/sync.c | 12 ++++++------ io_uring/timeout.c | 26 +++++++++++++------------- io_uring/uring_cmd.c | 8 ++++---- io_uring/xattr.c | 18 +++++++++--------- 20 files changed, 134 insertions(+), 129 deletions(-) commit addebd9ac9ca0ef8b3764907bf8018e48caffc64 Author: Keith Busch Date: Fri Aug 12 15:56:33 2022 -0700 fs: don't randomize struct kiocb fields This is a size sensitive structure and randomizing can introduce extra padding that breaks io_uring's fixed size expectations. There are few fields here as it is, half of which need a fixed order to optimally pack, so the randomization isn't providing much. Suggested-by: Linus Torvalds Signed-off-by: Keith Busch Link: https://lore.kernel.org/io-uring/b6f508ca-b1b2-5f40-7998-e4cff1cf7212@kernel.dk/ Signed-off-by: Jens Axboe include/linux/fs.h | 5 ----- 1 file changed, 5 deletions(-) commit 7eb59a98701d3113671b513593bb489cc76f58d2 Author: Ronnie Sahlberg Date: Thu Aug 11 19:51:18 2022 -0500 cifs: Do not access tcon->cfids->cfid directly from is_path_accessible cfids will soon keep a list of cached fids so we should not access this directly from outside of cached_dir.c Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/cached_dir.c | 10 ++++++---- fs/cifs/cached_dir.h | 2 +- fs/cifs/readdir.c | 4 ++-- fs/cifs/smb2inode.c | 2 +- fs/cifs/smb2ops.c | 19 +++++++++++++++---- 5 files changed, 25 insertions(+), 12 deletions(-) commit e4fe2a2fc423cb51bfd36c14f95f3ca1d279ca92 Author: Jon Mason Date: Fri Aug 12 15:42:05 2022 -0400 MAINTAINERS: add PCI Endpoint NTB drivers to NTB files The PCI Endpoint NTB drivers are under the NTB umbrella. Add an entry there to allow for notification of changes for it. Signed-off-by: Jon Mason Acked-by: Bjorn Helgaas MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 8d33834f9fb06b5349b145e6499aca976deed3d8 Author: Yang Li Date: Thu Aug 4 08:52:13 2022 +0800 perf stat: Remove duplicated include in builtin-stat.c util/topdown.h is included twice in builtin-stat.c, remove one of them. Reported-by: Abaci Robot Signed-off-by: Yang Li Tested-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=1818 Link: https://lore.kernel.org/r/20220804005213.71990-1-yang.lee@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 1 - 1 file changed, 1 deletion(-) commit 0029e8ace159216d668f9ae6d3892cfebde848c6 Author: shaomin Deng Date: Sun Aug 7 12:02:39 2022 -0400 perf scripting python: Delete repeated word in comments Delete the repeated word "into" in comments. Signed-off-by: shaomin Deng Cc: Alexander Shishkin Cc: Mark Rutland Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20220807160239.474-1-dengshaomin@cdjrlc.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/scripting-engines/trace-event-python.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 987f5cbd2f3f3300c3f681130b5c67661efa53a5 Author: shaomin Deng Date: Sun Aug 7 11:55:49 2022 -0400 perf tools: Fix double word in comments Delete the repeated word "to" in comments. Signed-off-by: shaomin Deng Cc: Mark Rutland Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20220807155549.30953-1-dengshaomin@cdjrlc.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/events_stats.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 632f5c224e95ce6846724a0720f7e7ef704fb858 Author: shaomin Deng Date: Sun Aug 7 04:46:29 2022 -0400 perf trace: Fix double word in comments Delete repeated word "and" in comments. Signed-off-by: shaomin Deng Cc: Mark Rutland Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20220807084629.23121-1-dengshaomin@cdjrlc.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae4e4a0ba30aa3978ac17a919b2ff7b073faa2f3 Author: shaomin Deng Date: Sun Aug 7 04:06:42 2022 -0400 perf script: Delete repeated word "from" Delete the repeated word "from" in code. Signed-off-by: shaomin Deng Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20220807080642.13004-1-dengshaomin@cdjrlc.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3c96bec7c6344ab30d6f01b97e3eba0b2fe4fd9 Author: shaomin Deng Date: Sun Aug 7 03:47:53 2022 -0400 perf test: Fix double word in comments Delete the redundant word "then" in comments. Signed-off-by: shaomin Deng Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20220807074753.7857-1-dengshaomin@cdjrlc.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/perf-time-to-tsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f426582e0e0c9bbd58e170e1b209334eb5df79e Author: Krzysztof Kozlowski Date: Thu Aug 11 09:22:45 2022 +0300 dt-bindings: chrome: google,cros-ec-typec: restrict allowed properties Describe exactly what properties are allowed in Google Chrome OS EC Type C port, so the schema can properly validate the DTS. Existing DTS defines always connectors with unit addresses, not a sole "connector" child. Signed-off-by: Krzysztof Kozlowski Acked-by: Prashant Malani Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220811062245.4316-1-krzysztof.kozlowski@linaro.org .../devicetree/bindings/chrome/google,cros-ec-typec.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 07d1caa4c2ccd28ade90f16d1967015214db40b7 Author: Krzysztof Kozlowski Date: Tue Aug 9 19:27:52 2022 +0300 dt-bindings: Drop Dan Murphy and Ricardo Rivera-Matos Emails to Dan Murphy and Ricardo Rivera-Matos bounce ("550 Invalid recipient"). Andrew Davis agreed to take over the bindings. Signed-off-by: Krzysztof Kozlowski Acked-by: Mark Brown Acked-by: Andrew Davis Acked-by: Jonathan Cameron Acked-by: Sebastian Reichel Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220809162752.10186-6-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml | 2 +- Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml | 2 +- Documentation/devicetree/bindings/leds/leds-lp50xx.yaml | 2 +- Documentation/devicetree/bindings/net/ti,dp83822.yaml | 2 +- Documentation/devicetree/bindings/net/ti,dp83867.yaml | 2 +- Documentation/devicetree/bindings/net/ti,dp83869.yaml | 2 +- Documentation/devicetree/bindings/power/supply/bq2515x.yaml | 3 +-- Documentation/devicetree/bindings/power/supply/bq256xx.yaml | 2 +- Documentation/devicetree/bindings/power/supply/bq25980.yaml | 3 +-- Documentation/devicetree/bindings/sound/tas2562.yaml | 2 +- Documentation/devicetree/bindings/sound/tlv320adcx140.yaml | 2 +- 11 files changed, 11 insertions(+), 13 deletions(-) commit 3156c50fdaab41ec4f6e03c1e603703b9985bf48 Author: Krzysztof Kozlowski Date: Tue Aug 9 19:27:51 2022 +0300 dt-bindings: Drop Robert Jones Emails to Robert Jones bounce ("550 5.2.1 The email account that you tried to reach is disabled"). Signed-off-by: Krzysztof Kozlowski Acked-by: Jonathan Cameron Acked-by: Lee Jones Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220809162752.10186-5-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/iio/imu/nxp,fxos8700.yaml | 2 +- Documentation/devicetree/bindings/mfd/gateworks-gsc.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 2e645db3bca713f964b1064177b4b9b4b06289cd Author: Krzysztof Kozlowski Date: Tue Aug 9 19:27:50 2022 +0300 dt-bindings: Drop Beniamin Bia and Stefan Popa Emails to Beniamin Bia and Stefan Popa bounce ("550 5.1.10 RESOLVER.ADR.RecipientNotFound; Recipient not found by SMTP address lookup"). Signed-off-by: Krzysztof Kozlowski Acked-by: Jonathan Cameron Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220809162752.10186-4-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/hwmon/adi,adm1177.yaml | 1 - Documentation/devicetree/bindings/iio/adc/adi,ad7091r5.yaml | 2 +- Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml | 3 +-- Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) commit 691b0d55199927d429d1d951eb90b0c4dd45a7f4 Author: Krzysztof Kozlowski Date: Tue Aug 9 19:27:49 2022 +0300 dt-bindings: iio: Drop Bogdan Pricop Emails to Bogdan Pricop bounce ("550 5.4.1 Recipient address rejected: Access denied. AS(201806281)"). Signed-off-by: Krzysztof Kozlowski Acked-by: Jonathan Cameron Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220809162752.10186-3-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/iio/adc/ti,adc108s102.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc72768ebf84b87fd26ad97dd3422c3783157a4a Author: Krzysztof Kozlowski Date: Tue Aug 9 19:27:48 2022 +0300 dt-bindings: iio: Drop Joachim Eastwood Emails to Joachim Eastwood bounce ("552 5.2.2 The email account that you tried to reach is over quota and inactive."). Signed-off-by: Krzysztof Kozlowski Acked-by: Jonathan Cameron Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220809162752.10186-2-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml | 1 - Documentation/devicetree/bindings/iio/adc/nxp,lpc1850-adc.yaml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 4a9350597aff50bbd0f4b80ccf49d2e02d1111f5 Merge: 7a53e17accce 636aa8807b57 Author: Linus Torvalds Date: Fri Aug 12 09:55:32 2022 -0700 Merge tag 'sound-fix-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Includes a few usual updates for HD- and USB-audio and a trivial cleanup patch" * tag 'sound-fix-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda: Fix crash due to jack poll in suspend ALSA: hda/cirrus - support for iMac 12,1 model ALSA: usb-audio: make read-only array marker static const ALSA: hda/realtek: Add a quirk for HP OMEN 15 (8786) mute LED ALSA: usb-audio: More comprehensive mixer map for ASUS ROG Zenith II ALSA: scarlett2: Add Focusrite Clarett+ 8Pre support ALSA: hda/conexant: Add quirk for LENOVO 20149 Notebook model ALSA: ice1712: remove redundant assignment to new ALSA: hda/realtek: Add quirk for another Asus K42JZ model commit 7a53e17accce9d310d2e522dfc701d8da7ccfa65 Merge: 999324f58c41 93e530d2a1c4 Author: Linus Torvalds Date: Fri Aug 12 09:50:34 2022 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: - A huge patchset supporting vq resize using the new vq reset capability - Features, fixes, and cleanups all over the place * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (88 commits) vdpa/mlx5: Fix possible uninitialized return value vdpa_sim_blk: add support for discard and write-zeroes vdpa_sim_blk: add support for VIRTIO_BLK_T_FLUSH vdpa_sim_blk: make vdpasim_blk_check_range usable by other requests vdpa_sim_blk: check if sector is 0 for commands other than read or write vdpa_sim: Implement suspend vdpa op vhost-vdpa: uAPI to suspend the device vhost-vdpa: introduce SUSPEND backend feature bit vdpa: Add suspend operation virtio-blk: Avoid use-after-free on suspend/resume virtio_vdpa: support the arg sizes of find_vqs() vhost-vdpa: Call ida_simple_remove() when failed vDPA: fix 'cast to restricted le16' warnings in vdpa.c vDPA: !FEATURES_OK should not block querying device config space vDPA/ifcvf: support userspace to query features and MQ of a management device vDPA/ifcvf: get_config_size should return a value no greater than dev implementation vhost scsi: Allow user to control num virtqueues vhost-scsi: Fix max number of virtqueues vdpa/mlx5: Support different address spaces for control and data vdpa/mlx5: Implement susupend virtqueue callback ... commit 999324f58c41262f5b64d04b7ac54e8f79b019fd Merge: f7cdaeeab8ca 715355922212 Author: Linus Torvalds Date: Fri Aug 12 09:44:23 2022 -0700 Merge tag 'loongarch-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch updates from Huacai Chen: - Optimise getcpu() with vDSO - PCI enablement on top of pci & irqchip changes - Stack unwinder and stack trace support - Some bug fixes and build error fixes - Update the default config file * tag 'loongarch-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: docs/zh_CN/LoongArch: Add I14 description docs/LoongArch: Add I14 description LoongArch: Update Loongson-3 default config file LoongArch: Add USER_STACKTRACE support LoongArch: Add STACKTRACE support LoongArch: Add prologue unwinder support LoongArch: Add guess unwinder support LoongArch: Add vDSO syscall __vdso_getcpu() LoongArch: Add PCI controller support LoongArch: Parse MADT to get multi-processor information LoongArch: Jump to the link address before enable PG LoongArch: Requires __force attributes for any casts LoongArch: Fix unsigned comparison with less than zero LoongArch: Adjust arch/loongarch/Kconfig LoongArch: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK commit f7cdaeeab8caf8e42fc176cdb272944e036ad998 Merge: d16b418fac3d c9d8468158ad Author: Linus Torvalds Date: Fri Aug 12 09:37:33 2022 -0700 Merge tag 'for-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "No core patches, only driver updates: - pwr-mlxbf: new reset driver for Mellanox BlueField - at91-reset: SAMA7G5 support - ab8500: continue refurbishing - misc minor fixes" * tag 'for-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (29 commits) power: supply: olpc_battery: Hold the reference returned by of_find_compatible_node power: supply: ab8500: add missing destroy_workqueue in ab8500_charger_bind power: supply: ab8500: Remove flush_scheduled_work() call. power: supply: ab8500_fg: drop duplicated 'is' in comment power: supply: ab8500: Drop external charger leftovers power: supply: ab8500: Add MAINTAINERS entry dt-bindings: power: reset: qcom,pshold: convert to dtschema power: supply: Fix typo in power_supply_check_supplies power: reset: pwr-mlxbf: change rst_pwr_hid and low_pwr_hid from global to local variables power: reset: pwr-mlxbf: add missing include power: reset: at91-reset: add support for SAMA7G5 power: reset: at91-reset: add reset_controller_dev support power: reset: at91-reset: add at91_reset_data power: reset: at91-reset: document structures and enums dt-bindings: reset: add sama7g5 definitions dt-bindings: reset: atmel,at91sam9260-reset: add sama7g5 bindings dt-bindings: reset: convert Atmel/Microchip reset controller to YAML power: reset: pwr-mlxbf: add BlueField SoC power control driver power: supply: ab8500: Exit maintenance if too low voltage power: supply: ab8500: Respect charge_restart_voltage_uv ... commit d16b418fac3de0d2ac854b3a9a1a59a0ebf2a0e9 Merge: f75f5d58099f 0f3e72b5c8cf Author: Linus Torvalds Date: Fri Aug 12 09:34:45 2022 -0700 Merge tag 'vfio-v6.0-rc1pt2' of https://github.com/awilliam/linux-vfio Pull another VFIO update from Alex Williamson: - Rename vfio source file to more easily allow additional source files in the upcoming development cycles (Jason Gunthorpe) * tag 'vfio-v6.0-rc1pt2' of https://github.com/awilliam/linux-vfio: vfio: Move vfio.c to vfio_main.c commit 27e23836ce22a3e5d89712ef832ab72e47ce9f43 Author: Daniel Müller Date: Wed Aug 10 20:07:10 2022 +0000 selftests/bpf: Add lru_bug to s390x deny list The lru_bug BPF selftest is failing execution on s390x machines. The failure is due to program attachment failing in turn, similar to a bunch of other tests. Those other tests have already been deny-listed and with this change we do the same for the lru_bug test, adding it to the corresponding file. Fixes: de7b9927105b ("selftests/bpf: Add test for prealloc_lru_pop bug") Signed-off-by: Daniel Müller Acked-by: Mykola Lysenko Link: https://lore.kernel.org/r/20220810200710.1300299-1-deso@posteo.net Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/DENYLIST.s390x | 1 + 1 file changed, 1 insertion(+) commit f75f5d58099ffe0a70ae96dfeb837b5c46399da3 Author: Yury Norov Date: Thu Aug 11 22:55:05 2022 -0700 lib: remove lib/nodemask.c Commit 36d4b36b6959 ("lib/nodemask: inline next_node_in() and node_random()") removed the lib/nodemask.c file, but the remove didn't happen when the patch was applied. Reported-by: "Aneesh Kumar K.V" Signed-off-by: Yury Norov Signed-off-by: Linus Torvalds lib/nodemask.c | 23 ----------------------- 1 file changed, 23 deletions(-) commit 5cef38dd03f33ef206eb792df0fb3b200d762546 Author: Atul Khare Date: Wed Aug 3 16:55:40 2022 +0100 dt-bindings: gpio: sifive: add gpio-line-names Fix device tree schema validation messages like 'gpio-line-names' does not match any of the regexes: 'pinctrl-[0-9]+' From schema: ... sifive,gpio.yaml'. The bindings were missing the gpio-line-names element, which was causing the dt-schema checker to trip-up. Acked-by: Rob Herring Signed-off-by: Atul Khare Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220803155539.800766-1-mail@conchuod.ie Signed-off-by: Palmer Dabbelt Documentation/devicetree/bindings/gpio/sifive,gpio.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit cbe9e51126305832cf407ee6bb556ce831488ffe Author: Ivan Vecera Date: Mon Aug 8 19:58:45 2022 +0200 iavf: Fix deadlock in initialization Fix deadlock that occurs when iavf interface is a part of failover configuration. 1. Mutex crit_lock is taken at the beginning of iavf_watchdog_task() 2. Function iavf_init_config_adapter() is called when adapter state is __IAVF_INIT_CONFIG_ADAPTER 3. iavf_init_config_adapter() calls register_netdevice() that emits NETDEV_REGISTER event 4. Notifier function failover_event() then calls net_failover_slave_register() that calls dev_open() 5. dev_open() calls iavf_open() that tries to take crit_lock in end-less loop Stack trace: ... [ 790.251876] usleep_range_state+0x5b/0x80 [ 790.252547] iavf_open+0x37/0x1d0 [iavf] [ 790.253139] __dev_open+0xcd/0x160 [ 790.253699] dev_open+0x47/0x90 [ 790.254323] net_failover_slave_register+0x122/0x220 [net_failover] [ 790.255213] failover_slave_register.part.7+0xd2/0x180 [failover] [ 790.256050] failover_event+0x122/0x1ab [failover] [ 790.256821] notifier_call_chain+0x47/0x70 [ 790.257510] register_netdevice+0x20f/0x550 [ 790.258263] iavf_watchdog_task+0x7c8/0xea0 [iavf] [ 790.259009] process_one_work+0x1a7/0x360 [ 790.259705] worker_thread+0x30/0x390 To fix the situation we should check the current adapter state after first unsuccessful mutex_trylock() and return with -EBUSY if it is __IAVF_INIT_CONFIG_ADAPTER. Fixes: 226d528512cf ("iavf: fix locking of critical sections") Signed-off-by: Ivan Vecera Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf_main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 31071173771e079f7bc08dacd61e0db913262fbf Author: Przemyslaw Patynowski Date: Tue Jul 19 11:16:54 2022 +0200 iavf: Fix reset error handling Do not call iavf_close in iavf_reset_task error handling. Doing so can lead to double call of napi_disable, which can lead to deadlock there. Removing VF would lead to iavf_remove task being stuck, because it requires crit_lock, which is held by iavf_close. Call iavf_disable_vf if reset fail, so that driver will clean up remaining invalid resources. During rapid VF resets, HW can fail to setup VF mailbox. Wrong error handling can lead to iavf_remove being stuck with: [ 5218.999087] iavf 0000:82:01.0: Failed to init adminq: -53 ... [ 5267.189211] INFO: task repro.sh:11219 blocked for more than 30 seconds. [ 5267.189520] Tainted: G S E 5.18.0-04958-ga54ce3703613-dirty #1 [ 5267.189764] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 5267.190062] task:repro.sh state:D stack: 0 pid:11219 ppid: 8162 flags:0x00000000 [ 5267.190347] Call Trace: [ 5267.190647] [ 5267.190927] __schedule+0x460/0x9f0 [ 5267.191264] schedule+0x44/0xb0 [ 5267.191563] schedule_preempt_disabled+0x14/0x20 [ 5267.191890] __mutex_lock.isra.12+0x6e3/0xac0 [ 5267.192237] ? iavf_remove+0xf9/0x6c0 [iavf] [ 5267.192565] iavf_remove+0x12a/0x6c0 [iavf] [ 5267.192911] ? _raw_spin_unlock_irqrestore+0x1e/0x40 [ 5267.193285] pci_device_remove+0x36/0xb0 [ 5267.193619] device_release_driver_internal+0xc1/0x150 [ 5267.193974] pci_stop_bus_device+0x69/0x90 [ 5267.194361] pci_stop_and_remove_bus_device+0xe/0x20 [ 5267.194735] pci_iov_remove_virtfn+0xba/0x120 [ 5267.195130] sriov_disable+0x2f/0xe0 [ 5267.195506] ice_free_vfs+0x7d/0x2f0 [ice] [ 5267.196056] ? pci_get_device+0x4f/0x70 [ 5267.196496] ice_sriov_configure+0x78/0x1a0 [ice] [ 5267.196995] sriov_numvfs_store+0xfe/0x140 [ 5267.197466] kernfs_fop_write_iter+0x12e/0x1c0 [ 5267.197918] new_sync_write+0x10c/0x190 [ 5267.198404] vfs_write+0x24e/0x2d0 [ 5267.198886] ksys_write+0x5c/0xd0 [ 5267.199367] do_syscall_64+0x3a/0x80 [ 5267.199827] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 5267.200317] RIP: 0033:0x7f5b381205c8 [ 5267.200814] RSP: 002b:00007fff8c7e8c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 5267.201981] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f5b381205c8 [ 5267.202620] RDX: 0000000000000002 RSI: 00005569420ee900 RDI: 0000000000000001 [ 5267.203426] RBP: 00005569420ee900 R08: 000000000000000a R09: 00007f5b38180820 [ 5267.204327] R10: 000000000000000a R11: 0000000000000246 R12: 00007f5b383c06e0 [ 5267.205193] R13: 0000000000000002 R14: 00007f5b383bb880 R15: 0000000000000002 [ 5267.206041] [ 5267.206970] Kernel panic - not syncing: hung_task: blocked tasks [ 5267.207809] CPU: 48 PID: 551 Comm: khungtaskd Kdump: loaded Tainted: G S E 5.18.0-04958-ga54ce3703613-dirty #1 [ 5267.208726] Hardware name: Dell Inc. PowerEdge R730/0WCJNT, BIOS 2.11.0 11/02/2019 [ 5267.209623] Call Trace: [ 5267.210569] [ 5267.211480] dump_stack_lvl+0x33/0x42 [ 5267.212472] panic+0x107/0x294 [ 5267.213467] watchdog.cold.8+0xc/0xbb [ 5267.214413] ? proc_dohung_task_timeout_secs+0x30/0x30 [ 5267.215511] kthread+0xf4/0x120 [ 5267.216459] ? kthread_complete_and_exit+0x20/0x20 [ 5267.217505] ret_from_fork+0x22/0x30 [ 5267.218459] Fixes: f0db78928783 ("i40evf: use netdev variable in reset task") Signed-off-by: Przemyslaw Patynowski Signed-off-by: Jedrzej Jagielski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf_main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 541a1af451b0cb3779e915d48d08efb17915207b Author: Przemyslaw Patynowski Date: Tue Jul 19 11:16:53 2022 +0200 iavf: Fix NULL pointer dereference in iavf_get_link_ksettings Fix possible NULL pointer dereference, due to freeing of adapter->vf_res in iavf_init_get_resources. Previous commit introduced a regression, where receiving IAVF_ERR_ADMIN_QUEUE_NO_WORK from iavf_get_vf_config would free adapter->vf_res. However, netdev is still registered, so ethtool_ops can be called. Calling iavf_get_link_ksettings with no vf_res, will result with: [ 9385.242676] BUG: kernel NULL pointer dereference, address: 0000000000000008 [ 9385.242683] #PF: supervisor read access in kernel mode [ 9385.242686] #PF: error_code(0x0000) - not-present page [ 9385.242690] PGD 0 P4D 0 [ 9385.242696] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC PTI [ 9385.242701] CPU: 6 PID: 3217 Comm: pmdalinux Kdump: loaded Tainted: G S E 5.18.0-04958-ga54ce3703613-dirty #1 [ 9385.242708] Hardware name: Dell Inc. PowerEdge R730/0WCJNT, BIOS 2.11.0 11/02/2019 [ 9385.242710] RIP: 0010:iavf_get_link_ksettings+0x29/0xd0 [iavf] [ 9385.242745] Code: 00 0f 1f 44 00 00 b8 01 ef ff ff 48 c7 46 30 00 00 00 00 48 c7 46 38 00 00 00 00 c6 46 0b 00 66 89 46 08 48 8b 87 68 0e 00 00 40 08 80 75 50 8b 87 5c 0e 00 00 83 f8 08 74 7a 76 1d 83 f8 20 [ 9385.242749] RSP: 0018:ffffc0560ec7fbd0 EFLAGS: 00010246 [ 9385.242755] RAX: 0000000000000000 RBX: ffffc0560ec7fc08 RCX: 0000000000000000 [ 9385.242759] RDX: ffffffffc0ad4550 RSI: ffffc0560ec7fc08 RDI: ffffa0fc66674000 [ 9385.242762] RBP: 00007ffd1fb2bf50 R08: b6a2d54b892363ee R09: ffffa101dc14fb00 [ 9385.242765] R10: 0000000000000000 R11: 0000000000000004 R12: ffffa0fc66674000 [ 9385.242768] R13: 0000000000000000 R14: ffffa0fc66674000 R15: 00000000ffffffa1 [ 9385.242771] FS: 00007f93711a2980(0000) GS:ffffa0fad72c0000(0000) knlGS:0000000000000000 [ 9385.242775] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 9385.242778] CR2: 0000000000000008 CR3: 0000000a8e61c003 CR4: 00000000003706e0 [ 9385.242781] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 9385.242784] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 9385.242787] Call Trace: [ 9385.242791] [ 9385.242793] ethtool_get_settings+0x71/0x1a0 [ 9385.242814] __dev_ethtool+0x426/0x2f40 [ 9385.242823] ? slab_post_alloc_hook+0x4f/0x280 [ 9385.242836] ? kmem_cache_alloc_trace+0x15d/0x2f0 [ 9385.242841] ? dev_ethtool+0x59/0x170 [ 9385.242848] dev_ethtool+0xa7/0x170 [ 9385.242856] dev_ioctl+0xc3/0x520 [ 9385.242866] sock_do_ioctl+0xa0/0xe0 [ 9385.242877] sock_ioctl+0x22f/0x320 [ 9385.242885] __x64_sys_ioctl+0x84/0xc0 [ 9385.242896] do_syscall_64+0x3a/0x80 [ 9385.242904] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 9385.242918] RIP: 0033:0x7f93702396db [ 9385.242923] Code: 73 01 c3 48 8b 0d ad 57 38 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 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 7d 57 38 00 f7 d8 64 89 01 48 [ 9385.242927] RSP: 002b:00007ffd1fb2bf18 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 9385.242932] RAX: ffffffffffffffda RBX: 000055671b1d2fe0 RCX: 00007f93702396db [ 9385.242935] RDX: 00007ffd1fb2bf20 RSI: 0000000000008946 RDI: 0000000000000007 [ 9385.242937] RBP: 00007ffd1fb2bf20 R08: 0000000000000003 R09: 0030763066307330 [ 9385.242940] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd1fb2bf80 [ 9385.242942] R13: 0000000000000007 R14: 0000556719f6de90 R15: 00007ffd1fb2c1b0 [ 9385.242948] [ 9385.242949] Modules linked in: iavf(E) xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nft_compat nf_nat_tftp nft_objref nf_conntrack_tftp bridge stp llc nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables rfkill nfnetlink vfat fat irdma ib_uverbs ib_core intel_rapl_msr intel_rapl_common sb_edac x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm iTCO_wdt iTCO_vendor_support ice irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel rapl i40e pcspkr intel_cstate joydev mei_me intel_uncore mxm_wmi mei ipmi_ssif lpc_ich ipmi_si acpi_power_meter xfs libcrc32c mgag200 i2c_algo_bit drm_shmem_helper drm_kms_helper sd_mod t10_pi crc64_rocksoft crc64 syscopyarea sg sysfillrect sysimgblt fb_sys_fops drm ixgbe ahci libahci libata crc32c_intel mdio dca wmi dm_mirror dm_region_hash dm_log dm_mod ipmi_devintf ipmi_msghandler fuse [ 9385.243065] [last unloaded: iavf] Dereference happens in if (ADV_LINK_SUPPORT(adapter)) statement Fixes: 209f2f9c7181 ("iavf: Add support for VIRTCHNL_VF_OFFLOAD_VLAN_V2 negotiation") Signed-off-by: Przemyslaw Patynowski Signed-off-by: Jedrzej Jagielski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 419831617ed349992c84344dbd9e627f9e68f842 Author: Przemyslaw Patynowski Date: Tue Jul 19 11:16:52 2022 +0200 iavf: Fix adminq error handling iavf_alloc_asq_bufs/iavf_alloc_arq_bufs allocates with dma_alloc_coherent memory for VF mailbox. Free DMA regions for both ASQ and ARQ in case error happens during configuration of ASQ/ARQ registers. Without this change it is possible to see when unloading interface: 74626.583369: dma_debug_device_change: device driver has pending DMA allocations while released from device [count=32] One of leaked entries details: [device address=0x0000000b27ff9000] [size=4096 bytes] [mapped with DMA_BIDIRECTIONAL] [mapped as coherent] Fixes: d358aa9a7a2d ("i40evf: init code and hardware support") Signed-off-by: Przemyslaw Patynowski Signed-off-by: Jedrzej Jagielski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf_adminq.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 9019b4f6d9bd88524ecd95420cf9cd4aaed7a125 Author: Jason A. Donenfeld Date: Tue Aug 9 16:57:57 2022 +0200 wireguard: selftests: set CONFIG_NONPORTABLE on riscv32 When the CONFIG_PORTABLE/CONFIG_NONPORTABLE switches were added, various configs were updated, but the wireguard config was forgotten about. This leads to unbootable test kernels, causing CI fails. Add CONFIG_NONPORTABLE=y to the wireguard test suite configuration for riscv32. Fixes: 44c1e84a38a0 ("RISC-V: Add CONFIG_{NON,}PORTABLE") Signed-off-by: Jason A. Donenfeld Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220809145757.83673-1-Jason@zx2c4.com Signed-off-by: Palmer Dabbelt tools/testing/selftests/wireguard/qemu/arch/riscv32.config | 1 + 1 file changed, 1 insertion(+) commit 8f5cb44b1bae8520c0705ce348b30ffb1fdda43a Author: Atish Patra Date: Fri Jul 22 09:50:47 2022 -0700 RISC-V: KVM: Support sstc extension Sstc extension allows the guest to program the vstimecmp CSR directly instead of making an SBI call to the hypervisor to program the next event. The timer interrupt is also directly injected to the guest by the hardware in this case. To maintain backward compatibility, the hypervisors also update the vstimecmp in an SBI set_time call if the hardware supports it. Thus, the older kernels in guest also take advantage of the sstc extension. Reviewed-by: Anup Patel Signed-off-by: Atish Patra Acked-by: Anup Patel Link: https://lore.kernel.org/all/CAAhSdy2mb6wyqy0NAn9BcTWKMYEc0Z4zU3s3j7oNqBz6eDQ9sg@mail.gmail.com/ Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/kvm_vcpu_timer.h | 7 ++ arch/riscv/include/uapi/asm/kvm.h | 1 + arch/riscv/kvm/vcpu.c | 8 +- arch/riscv/kvm/vcpu_timer.c | 144 ++++++++++++++++++++++++++++++-- 4 files changed, 153 insertions(+), 7 deletions(-) commit 5a2f3dc31811e93be15522d9eb13ed61460b76c8 Author: Pablo Neira Ayuso Date: Fri Aug 12 16:19:23 2022 +0200 netfilter: nf_tables: validate NFTA_SET_ELEM_OBJREF based on NFT_SET_OBJECT flag If the NFTA_SET_ELEM_OBJREF netlink attribute is present and NFT_SET_OBJECT flag is set on, report EINVAL. Move existing sanity check earlier to validate that NFT_SET_OBJECT requires NFTA_SET_ELEM_OBJREF. Fixes: 8aeff920dcc9 ("netfilter: nf_tables: add stateful object reference to set elements") Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 9801002f76c63327cae6e90097d3d0afb1e1b562 Merge: 7ab52f75a9cf f829ee7595b5 Author: Palmer Dabbelt Date: Thu Aug 11 15:04:02 2022 -0700 perf: riscv_pmu{,_sbi}: Miscallenous improvement & fixes A series of mostly-independent fixes and cleanups for the RISC-V PMU drivers. Link: https://lore.kernel.org/lkml/CAAhSdy23vE8+HxU5Jxy2rBMjy3rBTrJt_4sriuROac_sEESSVw@mail.gmail.com/T/#m9de15aef1b65ae6155fa33ea1239578ef463c2a2 * palmer/riscv-pmu: RISC-V: Improve SBI definitions RISC-V: Move counter info definition to sbi header file RISC-V: Fix SBI PMU calls for RV32 RISC-V: Update user page mapping only once during start RISC-V: Fix counter restart during overflow for RV32 commit 1bf7d836e57ba4943e33e163e730cd77ab837572 Author: Martin Liška Date: Fri Aug 12 13:40:49 2022 +0200 perf record: Improve error message of -p not_existing_pid When one uses -p $not_existing_pid, the output of --help is printed: $ perf record -p 123456789 2>&1 | head -n3 Usage: perf record [] [] or: perf record [] -- [] Let's change it something similar what perf top -p $not_existing_pid prints: $ ./perf top -p 123456789 --stdio Error: Couldn't create thread/CPU maps: No such process Newly suggested error message: $ ./perf record -p 123456789 Couldn't create thread/CPU maps: No such process Signed-off-by: Martin Liška Tested-by: Arnaldo Carvalho de Melo Link: http://lore.kernel.org/lkml/8e00eda1-4de0-2c44-ce67-d4df48ac1f7c@suse.cz Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit a072a7a0263ddc723305dfd975f931bcea4e4f5b Author: Martin Liška Date: Fri Aug 12 13:43:53 2022 +0200 perf build-id: Print debuginfod queries if -v option is used When ending a 'perf record' session, the querying of a debuginfod server can take quite some time. Inform a user about it when -v options is used. Signed-off-by: Martin Liška Link: http://lore.kernel.org/lkml/325871cf-b71f-6237-8793-82182272ece8@suse.cz Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/build-id.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 34575ded6874a9d228c1166243149c347a4012de Author: Martin Liška Date: Fri Aug 12 13:42:56 2022 +0200 perf build-id: Fix coding style, replace 8 spaces by tabs Use tabs instead of 8 spaces for the indentation. Signed-off-by: Martin Liška Link: http://lore.kernel.org/lkml/2983e2e0-6850-ad59-79d8-efe83b22cffe@suse.cz Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/build-id.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit a9084d888fbaaed65ded56f11d052cf8b04519a5 Author: Christophe JAILLET Date: Mon Aug 1 21:28:07 2022 +0200 irqchip/loongson-liointc: Fix an error handling path in liointc_init() All errors lead to the error handling path, except the one dealing with "reg-names" in DT. Fix it and release some resources before returning if this test fails. Fixes: 0858ed035a85 ("irqchip/loongson-liointc: Add ACPI init support") Signed-off-by: Christophe JAILLET [maz: fix commit message] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1a6d74ab70712279023aa7bdbd31bd3aec103bc0.1659382063.git.christophe.jaillet@wanadoo.fr drivers/irqchip/irq-loongson-liointc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa0c680c3aa96a5f9f160d90dd95402ad578e2b0 Author: Rafael Mendonca Date: Thu Aug 11 20:23:37 2022 -0300 block: Do not call blk_put_queue() if gendisk allocation fails Commit 6f8191fdf41d ("block: simplify disk shutdown") removed the call to blk_get_queue() during gendisk allocation but missed to remove the corresponding cleanup code blk_put_queue() for it. Thus, if the gendisk allocation fails, the request_queue refcount gets decremented and reaches 0, causing blk_mq_release() to be called with a hctx still alive. That triggers a WARNING report, as found by syzkaller: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 23016 at block/blk-mq.c:3881 blk_mq_release+0xf8/0x3e0 block/blk-mq.c:3881 [...] stripped RIP: 0010:blk_mq_release+0xf8/0x3e0 block/blk-mq.c:3881 [...] stripped Call Trace: blk_release_queue+0x153/0x270 block/blk-sysfs.c:780 kobject_cleanup lib/kobject.c:673 [inline] kobject_release lib/kobject.c:704 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1c8/0x540 lib/kobject.c:721 __alloc_disk_node+0x4f7/0x610 block/genhd.c:1388 __blk_mq_alloc_disk+0x13b/0x1f0 block/blk-mq.c:3961 loop_add+0x3e2/0xaf0 drivers/block/loop.c:1978 loop_control_ioctl+0x133/0x620 drivers/block/loop.c:2150 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd [...] stripped Fixes: 6f8191fdf41d ("block: simplify disk shutdown") Reported-by: syzbot+31c9594f6e43b9289b25@syzkaller.appspotmail.com Suggested-by: Hillf Danton Signed-off-by: Rafael Mendonca Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220811232338.254673-1-rafaelmendsr@gmail.com Signed-off-by: Jens Axboe block/genhd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 40b4ac880e21d917da7f3752332fa57564a4c202 Author: Li Qiong Date: Fri Aug 12 11:09:54 2022 +0800 net: lan966x: fix checking for return value of platform_get_irq_byname() The platform_get_irq_byname() returns non-zero IRQ number or negative error number. "if (irq)" always true, chang it to "if (irq > 0)" Signed-off-by: Li Qiong Signed-off-by: David S. Miller drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 75d8620d46f00fcece574dd70ea36acfdfcf171b Author: Jason Wang Date: Thu Aug 11 19:57:01 2022 +0800 net: cxgb3: Fix comment typo The double `the' is duplicated in the comment, remove one. Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0619d0fa6cedb32f0835e23ca774085128ccb2b8 Author: Jason Wang Date: Thu Aug 11 19:56:20 2022 +0800 bnx2x: Fix comment typo The double `the' is duplicated in the comment, remove one. Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9221b2898a5877f7e15442ccee7a4e59c6f03f0d Author: Jason Wang Date: Thu Aug 11 19:52:59 2022 +0800 net: ipa: Fix comment typo The double `is' is duplicated in the comment, remove one. Signed-off-by: Jason Wang Reviewed-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/ipa_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95bb633048fab742230eb2cdf20b8e2676240a54 Author: Michael S. Tsirkin Date: Thu Aug 11 08:51:58 2022 -0400 virtio_net: fix endian-ness for RSS Using native endian-ness for device supplied fields is wrong on BE platforms. Sparse warns about this. Fixes: 91f41f01d219 ("drivers/net/virtio_net: Added RSS hash report.") Cc: "Andrew Melnychenko" Signed-off-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5ad3134dcf5201c4d51c981e52557939256b02c7 Author: Lukas Bulwahn Date: Wed Aug 10 07:07:12 2022 +0200 MAINTAINERS: add xen config fragments to XEN HYPERVISOR sections Make changes to the xen config fragments reach the XEN HYPERVISOR maintainers and mailing list. Signed-off-by: Lukas Bulwahn Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20220810050712.9539-5-lukas.bulwahn@gmail.com Signed-off-by: Juergen Gross MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit aa6d1e5b502866a4364dfeb2cdecf7c258c400ee Author: Lukas Bulwahn Date: Wed Aug 10 07:07:10 2022 +0200 xen: remove XEN_SCRUB_PAGES in xen.config Commit 197ecb3802c0 ("xen/balloon: add runtime control for scrubbing ballooned out pages") changed config XEN_SCRUB_PAGES to config XEN_SCRUB_PAGES_DEFAULT. As xen.config sets 'XEN_BALLOON=y' and XEN_SCRUB_PAGES_DEFAULT defaults to yes, there is no further need to set this config in the xen.config file. Remove setting XEN_SCRUB_PAGES in xen.config, which is without effect since the commit above anyway. Signed-off-by: Lukas Bulwahn Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20220810050712.9539-3-lukas.bulwahn@gmail.com Signed-off-by: Juergen Gross kernel/configs/xen.config | 1 - 1 file changed, 1 deletion(-) commit bfc48f1b0505ffcb03a6d749139b7577d6b81ae0 Author: Xin Xiong Date: Wed Aug 10 23:29:13 2022 +0800 net/sunrpc: fix potential memory leaks in rpc_sysfs_xprt_state_change() The issue happens on some error handling paths. When the function fails to grab the object `xprt`, it simply returns 0, forgetting to decrease the reference count of another object `xps`, which is increased by rpc_sysfs_xprt_kobj_get_xprt_switch(), causing refcount leaks. Also, the function forgets to check whether `xps` is valid before using it, which may result in NULL-dereferencing issues. Fix it by adding proper error handling code when either `xprt` or `xps` is NULL. Fixes: 5b7eb78486cd ("SUNRPC: take a xprt offline using sysfs") Signed-off-by: Xin Xiong Signed-off-by: Xin Tan Signed-off-by: David S. Miller net/sunrpc/sysfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 86d2155e48f6ce1aacbd01667176e5b915ae275c Author: Jilin Yuan Date: Wed Aug 10 21:59:01 2022 +0800 skfp/h: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: Jilin Yuan Signed-off-by: David S. Miller drivers/net/fddi/skfp/h/hwmtm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ced3c74271bfedfb8e517c01b4dd7b9aad7020b0 Author: Jason Wang Date: Thu Aug 11 20:09:18 2022 +0800 xen/pciback: Fix comment typo The double `the' is duplicated in the comment, remove one. Signed-off-by: Jason Wang Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20220811120918.17961-1-wangborong@cdjrlc.com Signed-off-by: Juergen Gross drivers/xen/xen-pciback/pciback_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32ad11127b95236dfc52375f3707853194a7f4b4 Author: Dan Carpenter Date: Thu Aug 4 10:11:33 2022 +0300 xen/xenbus: fix return type in xenbus_file_read() This code tries to store -EFAULT in an unsigned int. The xenbus_file_read() function returns type ssize_t so the negative value is returned as a positive value to the user. This change forces another change to the min() macro. Originally, the min() macro used "unsigned" type which checkpatch complains about. Also unsigned type would break if "len" were not capped at MAX_RW_COUNT. Use size_t for the min(). (No effect on runtime for the min_t() change). Fixes: 2fb3683e7b16 ("xen: Add xenbus device driver") Signed-off-by: Dan Carpenter Reviewed-by: Oleksandr Tyshchenko Link: https://lore.kernel.org/r/YutxJUaUYRG/VLVc@kili Signed-off-by: Juergen Gross drivers/xen/xenbus/xenbus_dev_frontend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 402c43ea6b34a1b371ffeed9adf907402569eaf5 Author: SeongJae Park Date: Fri Jul 15 22:51:08 2022 +0000 xen-blkfront: Apply 'feature_persistent' parameter when connect In some use cases[1], the backend is created while the frontend doesn't support the persistent grants feature, but later the frontend can be changed to support the feature and reconnect. In the past, 'blkback' enabled the persistent grants feature since it unconditionally checked if frontend supports the persistent grants feature for every connect ('connect_ring()') and decided whether it should use persistent grans or not. However, commit aac8a70db24b ("xen-blkback: add a parameter for disabling of persistent grants") has mistakenly changed the behavior. It made the frontend feature support check to not be repeated once it shown the 'feature_persistent' as 'false', or the frontend doesn't support persistent grants. Similar behavioral change has made on 'blkfront' by commit 74a852479c68 ("xen-blkfront: add a parameter for disabling of persistent grants"). This commit changes the behavior of the parameter to make effect for every connect, so that the previous behavior of 'blkfront' can be restored. [1] https://lore.kernel.org/xen-devel/CAJwUmVB6H3iTs-C+U=v-pwJB7-_ZRHPxHzKRJZ22xEPW7z8a=g@mail.gmail.com/ Fixes: 74a852479c68 ("xen-blkfront: add a parameter for disabling of persistent grants") Cc: # 5.10.x Signed-off-by: SeongJae Park Reviewed-by: Maximilian Heyne Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20220715225108.193398-4-sj@kernel.org Signed-off-by: Juergen Gross Documentation/ABI/testing/sysfs-driver-xen-blkfront | 2 +- drivers/block/xen-blkfront.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) commit e94c6101e151b019b8babc518ac2a6ada644a5a1 Author: Maximilian Heyne Date: Fri Jul 15 22:51:07 2022 +0000 xen-blkback: Apply 'feature_persistent' parameter when connect In some use cases[1], the backend is created while the frontend doesn't support the persistent grants feature, but later the frontend can be changed to support the feature and reconnect. In the past, 'blkback' enabled the persistent grants feature since it unconditionally checked if frontend supports the persistent grants feature for every connect ('connect_ring()') and decided whether it should use persistent grans or not. However, commit aac8a70db24b ("xen-blkback: add a parameter for disabling of persistent grants") has mistakenly changed the behavior. It made the frontend feature support check to not be repeated once it shown the 'feature_persistent' as 'false', or the frontend doesn't support persistent grants. This commit changes the behavior of the parameter to make effect for every connect, so that the previous workflow can work again as expected. [1] https://lore.kernel.org/xen-devel/CAJwUmVB6H3iTs-C+U=v-pwJB7-_ZRHPxHzKRJZ22xEPW7z8a=g@mail.gmail.com/ Reported-by: Andrii Chepurnyi Fixes: aac8a70db24b ("xen-blkback: add a parameter for disabling of persistent grants") Cc: # 5.10.x Signed-off-by: Maximilian Heyne Signed-off-by: SeongJae Park Reviewed-by: Maximilian Heyne Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20220715225108.193398-3-sj@kernel.org Signed-off-by: Juergen Gross Documentation/ABI/testing/sysfs-driver-xen-blkback | 2 +- drivers/block/xen-blkback/xenbus.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) commit fc9be616bb8f3ed9cf560308f86904f5c06be205 Author: SeongJae Park Date: Fri Jul 15 22:51:06 2022 +0000 xen-blkback: fix persistent grants negotiation Persistent grants feature can be used only when both backend and the frontend supports the feature. The feature was always supported by 'blkback', but commit aac8a70db24b ("xen-blkback: add a parameter for disabling of persistent grants") has introduced a parameter for disabling it runtime. To avoid the parameter be updated while being used by 'blkback', the commit caches the parameter into 'vbd->feature_gnt_persistent' in 'xen_vbd_create()', and then check if the guest also supports the feature and finally updates the field in 'connect_ring()'. However, 'connect_ring()' could be called before 'xen_vbd_create()', so later execution of 'xen_vbd_create()' can wrongly overwrite 'true' to 'vbd->feature_gnt_persistent'. As a result, 'blkback' could try to use 'persistent grants' feature even if the guest doesn't support the feature. This commit fixes the issue by moving the parameter value caching to 'xen_blkif_alloc()', which allocates the 'blkif'. Because the struct embeds 'vbd' object, which will be used by 'connect_ring()' later, this should be called before 'connect_ring()' and therefore this should be the right and safe place to do the caching. Fixes: aac8a70db24b ("xen-blkback: add a parameter for disabling of persistent grants") Cc: # 5.10.x Signed-off-by: Maximilian Heyne Signed-off-by: SeongJae Park Reviewed-by: Maximilian Heyne Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20220715225108.193398-2-sj@kernel.org Signed-off-by: Juergen Gross drivers/block/xen-blkback/xenbus.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 9f414eb409daf4f778f011cf8266d36896bb930b Author: Mikulas Patocka Date: Wed Aug 10 09:00:42 2022 -0400 rds: add missing barrier to release_refill The functions clear_bit and set_bit do not imply a memory barrier, thus it may be possible that the waitqueue_active function (which does not take any locks) is moved before clear_bit and it could miss a wakeup event. Fix this bug by adding a memory barrier after clear_bit. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: David S. Miller net/rds/ib_recv.c | 1 + 1 file changed, 1 insertion(+) commit b1c3497e604ddccea5af4071831ed0e4680fb35e Author: Jane Malalane Date: Fri Jul 29 08:04:16 2022 +0100 x86/xen: Add support for HVMOP_set_evtchn_upcall_vector Implement support for the HVMOP_set_evtchn_upcall_vector hypercall in order to set the per-vCPU event channel vector callback on Linux and use it in preference of HVM_PARAM_CALLBACK_IRQ. If the per-VCPU vector setup is successful on BSP, use this method for the APs. If not, fallback to the global vector-type callback. Also register callback_irq at per-vCPU event channel setup to trick toolstack to think the domain is enlightened. Suggested-by: "Roger Pau Monné" Signed-off-by: Jane Malalane Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/20220729070416.23306-1-jane.malalane@citrix.com Signed-off-by: Juergen Gross arch/x86/include/asm/xen/cpuid.h | 2 ++ arch/x86/include/asm/xen/events.h | 3 ++- arch/x86/xen/enlighten.c | 2 +- arch/x86/xen/enlighten_hvm.c | 24 ++++++++++++----- arch/x86/xen/suspend_hvm.c | 10 ++++++- drivers/xen/events/events_base.c | 53 +++++++++++++++++++++++++++++++++----- include/xen/hvm.h | 2 ++ include/xen/interface/hvm/hvm_op.h | 19 ++++++++++++++ 8 files changed, 100 insertions(+), 15 deletions(-) commit 715355922212a3be8bfe5a94b5707a045ac6bf00 Author: Tiezhu Yang Date: Wed Aug 10 15:41:15 2022 +0800 docs/zh_CN/LoongArch: Add I14 description I14 is also a kind of immediate operand in instruction, like I8/I12/I16/ I21/I26, add it in the Chinese documentation. Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen Documentation/translations/zh_CN/loongarch/introduction.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6e068820de9c912ebc6147f8149be130b0dabc39 Author: Tiezhu Yang Date: Wed Aug 10 15:41:14 2022 +0800 docs/LoongArch: Add I14 description I14 is also a kind of immediate operand in instruction, like I8/I12/I16/ I21/I26, add it in the English documentation. Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen Documentation/loongarch/introduction.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27b161a4c41139f3a686533a5fde4abba05273d4 Author: Huacai Chen Date: Wed Aug 10 14:22:39 2022 +0800 LoongArch: Update Loongson-3 default config file 1, Add NVME related options; 2, Add compressed firmware support; 3, Add virtio drivers in order to run in qemu. Signed-off-by: Huacai Chen arch/loongarch/configs/loongson3_defconfig | 34 +++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit 4d7bf939df08218e682f7a42952eee3bad4dceb7 Author: Qing Zhang Date: Sat Aug 6 16:10:05 2022 +0800 LoongArch: Add USER_STACKTRACE support To get the best stacktrace output, you can compile your userspace programs with frame pointers (at least glibc + the app you are tracing). 1, export "CC = gcc -fno-omit-frame-pointer"; 2, compile your programs with "CC"; 3, use uprobe to get stacktrace output. ... echo 'p:malloc /usr/lib64/libc.so.6:0x0a4704 size=%r4:u64' > uprobe_events echo 'p:free /usr/lib64/libc.so.6:0x0a4d50 ptr=%r4:x64' >> uprobe_events echo 'comm == "demo"' > ./events/uprobes/malloc/filter echo 'comm == "demo"' > ./events/uprobes/free/filter echo 1 > ./options/userstacktrace echo 1 > ./options/sym-userobj ... Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen arch/loongarch/Kconfig | 1 + arch/loongarch/include/asm/stacktrace.h | 5 ++++ arch/loongarch/kernel/stacktrace.c | 41 +++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) commit 93a4fa622eb061f75f87f0cf9609ab4e69c67d01 Author: Qing Zhang Date: Sat Aug 6 16:10:04 2022 +0800 LoongArch: Add STACKTRACE support 1. Use common arch_stack_walk() infrastructure to avoid duplicated code and avoid taking care of the stack storage and filtering. 2. Add sched_ra (means sched return address) and sched_cfa (means sched call frame address) to thread_info, and store them in switch_to(). 3. Add __get_wchan() implementation. Now we can print the process stack and wait channel by cat /proc/*/stack and /proc/*/wchan. Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen arch/loongarch/Kconfig | 5 +++++ arch/loongarch/include/asm/processor.h | 9 +++++++++ arch/loongarch/include/asm/switch_to.h | 14 ++++++++----- arch/loongarch/kernel/Makefile | 1 + arch/loongarch/kernel/asm-offsets.c | 2 ++ arch/loongarch/kernel/process.c | 29 +++++++++++++++++++++++++- arch/loongarch/kernel/stacktrace.c | 37 ++++++++++++++++++++++++++++++++++ arch/loongarch/kernel/switch.S | 2 ++ 8 files changed, 93 insertions(+), 6 deletions(-) commit 49aef111e2dae176a7708b532118f33f24289248 Author: Qing Zhang Date: Sat Aug 6 16:10:03 2022 +0800 LoongArch: Add prologue unwinder support It unwind the stack frame based on prologue code analyze. CONFIG_KALLSYMS is needed, at least the address and length of each function. Three stages when we do unwind, 1) unwind_start(), the prapare of unwinding, fill unwind_state. 2) unwind_done(), judge whether the unwind process is finished or not. 3) unwind_next_frame(), unwind the next frame. Dividing unwinder helps to add new unwinders in the future, e.g.: unwinder_frame, unwinder_orc, .etc. Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen arch/loongarch/Kconfig.debug | 20 ++++ arch/loongarch/include/asm/inst.h | 52 ++++++++++ arch/loongarch/include/asm/unwind.h | 8 +- arch/loongarch/kernel/Makefile | 1 + arch/loongarch/kernel/traps.c | 3 + arch/loongarch/kernel/unwind_prologue.c | 176 ++++++++++++++++++++++++++++++++ 6 files changed, 259 insertions(+), 1 deletion(-) commit 49232773d8233ed70c4998851bc84e465fc1c788 Author: Qing Zhang Date: Sat Aug 6 16:10:02 2022 +0800 LoongArch: Add guess unwinder support Name "guess unwinder" comes from x86, it scans the stack and reports every kernel text address it finds. Unwinders can be used by dump_stack() and other stacktrace functions. Three stages when we do unwind, 1) unwind_start(), the prapare of unwinding, fill unwind_state. 2) unwind_done(), judge whether the unwind process is finished or not. 3) unwind_next_frame(), unwind the next frame. Add get_stack_info() to get stack info. At present we have irq stack and task stack. The next_sp is the key info between two types of stacks. Dividing unwinder helps to add new unwinders in the future. Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen arch/loongarch/Kconfig.debug | 9 +++++ arch/loongarch/include/asm/stacktrace.h | 15 ++++++++ arch/loongarch/include/asm/unwind.h | 36 ++++++++++++++++++ arch/loongarch/kernel/Makefile | 2 + arch/loongarch/kernel/process.c | 61 ++++++++++++++++++++++++++++++ arch/loongarch/kernel/traps.c | 21 +++++------ arch/loongarch/kernel/unwind_guess.c | 67 +++++++++++++++++++++++++++++++++ 7 files changed, 200 insertions(+), 11 deletions(-) commit dce6098b22d58e5b646b1c67174c53f5a6a05605 Author: Huacai Chen Date: Sat Aug 6 15:19:33 2022 +0800 LoongArch: Add vDSO syscall __vdso_getcpu() We test 20 million times of getcpu(), the real syscall version take 25 seconds, while the vsyscall version take only 2.4 seconds. Signed-off-by: Rui Wang Signed-off-by: Huacai Chen arch/loongarch/include/asm/vdso.h | 1 + arch/loongarch/include/asm/vdso/vdso.h | 15 +++++++++++- arch/loongarch/kernel/vdso.c | 25 ++++++++++++-------- arch/loongarch/vdso/Makefile | 2 +- arch/loongarch/vdso/vdso.lds.S | 1 + arch/loongarch/vdso/vgetcpu.c | 43 ++++++++++++++++++++++++++++++++++ 6 files changed, 75 insertions(+), 12 deletions(-) commit 57fc7323a8e7c2e7c1d5795ab63cb3ffea3cfdfb Author: Huacai Chen Date: Sat Aug 6 15:19:33 2022 +0800 LoongArch: Add PCI controller support Loongson64 based systems are PC-like systems which use PCI/PCIe as its I/O bus, This patch adds the PCI host controller support for LoongArch. Reviewed-by: WANG Xuerui Signed-off-by: Jianmin Lv Signed-off-by: Huacai Chen arch/loongarch/Kconfig | 7 ++ arch/loongarch/Makefile | 2 + arch/loongarch/include/asm/dma.h | 11 +++ arch/loongarch/include/asm/irq.h | 8 -- arch/loongarch/include/asm/page.h | 2 - arch/loongarch/include/asm/pci.h | 25 ++++++ arch/loongarch/pci/acpi.c | 175 ++++++++++++++++++++++++++++++++++++++ arch/loongarch/pci/pci.c | 101 ++++++++++++++++++++++ 8 files changed, 321 insertions(+), 10 deletions(-) commit e9e7ff16d7f098f6fa9394e9d2b191c01ba0d5f6 Author: Huacai Chen Date: Tue Jul 19 10:53:13 2022 +0800 LoongArch: Parse MADT to get multi-processor information Parse MADT to get multi-processor information, in order to fix the boot problem and cpu-hotplug problem for SMP platform. Signed-off-by: Huacai Chen arch/loongarch/include/asm/bootinfo.h | 2 +- arch/loongarch/include/asm/irq.h | 2 -- arch/loongarch/kernel/acpi.c | 38 +++++++++++++++++++++++++++++++++++ arch/loongarch/kernel/smp.c | 5 +---- 4 files changed, 40 insertions(+), 7 deletions(-) commit ab2579d79529b8ed34f26a374a352f12ce24d5df Author: Huacai Chen Date: Thu Aug 11 20:52:12 2022 +0800 LoongArch: Jump to the link address before enable PG The kernel entry points of both boot CPU (i.e., kernel_entry) and non- boot CPUs (i.e., smpboot_entry) may be physical address from BootLoader (in DA mode or identity-mapping PG mode). So we should jump to the link address before PG enabled (because DA is disabled at the same time) and just after DMW configured. Specifically: With some older firmwares, non-boot CPUs started with PG enabled, but this need firmware cooperation in the form of a temporary page table, which is deemed unnecessary. OTOH, latest firmware versions configure the non-boot CPUs to start in DA mode, so kernel-side changes are needed. Reviewed-by: WANG Xuerui Signed-off-by: Huacai Chen arch/loongarch/kernel/head.S | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 5e8be07ca8f7f49d49c6d5d44f69caaa2fa4b660 Author: Qing Zhang Date: Sat Aug 6 15:19:32 2022 +0800 LoongArch: Requires __force attributes for any casts This fix a warning when "make C=2": arch/loongarch/kernel/ptrace.c: note: in included file (through include/linux/uaccess.h, include/linux/sched/task.h, include/linux/sched/signal.h, include/linux/ptrace.h, include/linux/audit.h): ./arch/loongarch/include/asm/uaccess.h:232:32: warning: incorrect type in argument 2 (different address spaces) ./arch/loongarch/include/asm/uaccess.h:232:32: expected void const *from ./arch/loongarch/include/asm/uaccess.h:232:32: got void const [noderef] __user *from Reported-by: kernel test robot Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen arch/loongarch/include/asm/uaccess.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aafcac81b0e3f0d7383a78c6249e90e166ac8e6d Author: Yang Li Date: Sat Aug 6 15:19:33 2022 +0800 LoongArch: Fix unsigned comparison with less than zero The return value from the call to get_timer_irq() is int, which can be a negative error code. However, the return value is being assigned to an unsigned int variable 'irq', so making 'irq' an int. Eliminate the following coccicheck warning: ./arch/loongarch/kernel/time.c:146:5-8: WARNING: Unsigned expression compared with zero: irq < 0 Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Huacai Chen arch/loongarch/kernel/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f30d1f495cc117c0264d71a4d636ee72dd8acb16 Author: Huacai Chen Date: Sat Aug 6 15:19:32 2022 +0800 LoongArch: Adjust arch/loongarch/Kconfig 1, ACPI, EFI and SMP are mandatories for LoongArch, select them unconditionally to avoid various build errors for 'make randconfig'. 2, Move the MMU_GATHER_MERGE_VMAS selection to the correct place. Reported-by: kernel test robot Signed-off-by: Huacai Chen arch/loongarch/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 28e112afa44ad0814120d41c68fa72372a2cd2c2 Author: Huacai Chen Date: Tue Jul 12 12:25:57 2022 +0800 LoongArch: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK When CONFIG_CPUMASK_OFFSTACK and CONFIG_DEBUG_PER_CPU_MAPS is selected, cpu_max_bits_warn() generates a runtime warning similar as below while we show /proc/cpuinfo. Fix this by using nr_cpu_ids (the runtime limit) instead of NR_CPUS to iterate CPUs. [ 3.052463] ------------[ cut here ]------------ [ 3.059679] WARNING: CPU: 3 PID: 1 at include/linux/cpumask.h:108 show_cpuinfo+0x5e8/0x5f0 [ 3.070072] Modules linked in: efivarfs autofs4 [ 3.076257] CPU: 0 PID: 1 Comm: systemd Not tainted 5.19-rc5+ #1052 [ 3.084034] Hardware name: Loongson Loongson-3A5000-7A1000-1w-V0.1-CRB/Loongson-LS3A5000-7A1000-1w-EVB-V1.21, BIOS Loongson-UDK2018-V2.0.04082-beta7 04/27 [ 3.099465] Stack : 9000000100157b08 9000000000f18530 9000000000cf846c 9000000100154000 [ 3.109127] 9000000100157a50 0000000000000000 9000000100157a58 9000000000ef7430 [ 3.118774] 90000001001578e8 0000000000000040 0000000000000020 ffffffffffffffff [ 3.128412] 0000000000aaaaaa 1ab25f00eec96a37 900000010021de80 900000000101c890 [ 3.138056] 0000000000000000 0000000000000000 0000000000000000 0000000000aaaaaa [ 3.147711] ffff8000339dc220 0000000000000001 0000000006ab4000 0000000000000000 [ 3.157364] 900000000101c998 0000000000000004 9000000000ef7430 0000000000000000 [ 3.167012] 0000000000000009 000000000000006c 0000000000000000 0000000000000000 [ 3.176641] 9000000000d3de08 9000000001639390 90000000002086d8 00007ffff0080286 [ 3.186260] 00000000000000b0 0000000000000004 0000000000000000 0000000000071c1c [ 3.195868] ... [ 3.199917] Call Trace: [ 3.203941] [<90000000002086d8>] show_stack+0x38/0x14c [ 3.210666] [<9000000000cf846c>] dump_stack_lvl+0x60/0x88 [ 3.217625] [<900000000023d268>] __warn+0xd0/0x100 [ 3.223958] [<9000000000cf3c90>] warn_slowpath_fmt+0x7c/0xcc [ 3.231150] [<9000000000210220>] show_cpuinfo+0x5e8/0x5f0 [ 3.238080] [<90000000004f578c>] seq_read_iter+0x354/0x4b4 [ 3.245098] [<90000000004c2e90>] new_sync_read+0x17c/0x1c4 [ 3.252114] [<90000000004c5174>] vfs_read+0x138/0x1d0 [ 3.258694] [<90000000004c55f8>] ksys_read+0x70/0x100 [ 3.265265] [<9000000000cfde9c>] do_syscall+0x7c/0x94 [ 3.271820] [<9000000000202fe4>] handle_syscall+0xc4/0x160 [ 3.281824] ---[ end trace 8b484262b4b8c24c ]--- Cc: stable@vger.kernel.org Signed-off-by: Huacai Chen arch/loongarch/kernel/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3adefb5baf377868f45de78eb9f72f87eb498b0 Merge: 7ce2aa6d7fe1 e3a7c2947b9e Author: Linus Torvalds Date: Thu Aug 11 19:46:48 2022 -0700 Merge tag 'for-6.0/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - A few fixes for the DM verity and bufio changes in this merge window - A smatch warning fix for DM writecache locking in writecache_map * tag 'for-6.0/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm bufio: fix some cases where the code sleeps with spinlock held dm writecache: fix smatch warning about invalid return from writecache_map dm verity: fix verity_parse_opt_args parsing dm verity: fix DM_VERITY_OPTS_MAX value yet again dm bufio: simplify DM_BUFIO_CLIENT_NO_SLEEP locking commit d957e7ffb2c72410bcc1a514153a46719255a5da Author: Saurabh Sengar Date: Thu Aug 4 08:55:34 2022 -0700 scsi: storvsc: Remove WQ_MEM_RECLAIM from storvsc_error_wq storvsc_error_wq workqueue should not be marked as WQ_MEM_RECLAIM as it doesn't need to make forward progress under memory pressure. Marking this workqueue as WQ_MEM_RECLAIM may cause deadlock while flushing a non-WQ_MEM_RECLAIM workqueue. In the current state it causes the following warning: [ 14.506347] ------------[ cut here ]------------ [ 14.506354] workqueue: WQ_MEM_RECLAIM storvsc_error_wq_0:storvsc_remove_lun is flushing !WQ_MEM_RECLAIM events_freezable_power_:disk_events_workfn [ 14.506360] WARNING: CPU: 0 PID: 8 at <-snip->kernel/workqueue.c:2623 check_flush_dependency+0xb5/0x130 [ 14.506390] CPU: 0 PID: 8 Comm: kworker/u4:0 Not tainted 5.4.0-1086-azure #91~18.04.1-Ubuntu [ 14.506391] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v4.1 05/09/2022 [ 14.506393] Workqueue: storvsc_error_wq_0 storvsc_remove_lun [ 14.506395] RIP: 0010:check_flush_dependency+0xb5/0x130 <-snip-> [ 14.506408] Call Trace: [ 14.506412] __flush_work+0xf1/0x1c0 [ 14.506414] __cancel_work_timer+0x12f/0x1b0 [ 14.506417] ? kernfs_put+0xf0/0x190 [ 14.506418] cancel_delayed_work_sync+0x13/0x20 [ 14.506420] disk_block_events+0x78/0x80 [ 14.506421] del_gendisk+0x3d/0x2f0 [ 14.506423] sr_remove+0x28/0x70 [ 14.506427] device_release_driver_internal+0xef/0x1c0 [ 14.506428] device_release_driver+0x12/0x20 [ 14.506429] bus_remove_device+0xe1/0x150 [ 14.506431] device_del+0x167/0x380 [ 14.506432] __scsi_remove_device+0x11d/0x150 [ 14.506433] scsi_remove_device+0x26/0x40 [ 14.506434] storvsc_remove_lun+0x40/0x60 [ 14.506436] process_one_work+0x209/0x400 [ 14.506437] worker_thread+0x34/0x400 [ 14.506439] kthread+0x121/0x140 [ 14.506440] ? process_one_work+0x400/0x400 [ 14.506441] ? kthread_park+0x90/0x90 [ 14.506443] ret_from_fork+0x35/0x40 [ 14.506445] ---[ end trace 2d9633159fdc6ee7 ]--- Link: https://lore.kernel.org/r/1659628534-17539-1-git-send-email-ssengar@linux.microsoft.com Fixes: 436ad9413353 ("scsi: storvsc: Allow only one remove lun work item to be issued per lun") Reviewed-by: Michael Kelley Signed-off-by: Saurabh Sengar Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37dd4ab1ff8cb843c69835dcaf7bc719a2bf2e0c Author: Alim Akhtar Date: Thu Aug 11 21:40:53 2022 +0530 scsi: ufs: host: ufs-exynos: Make fsd_ufs_drvs static struct fsd_ufs_drvs is not used outside this file, so make it static. This fixes sparse warning: drivers/ufs/host/ufs-exynos.c:1721:28: sparse: sparse: symbol 'fsd_ufs_drvs' was not declared. Should it be static? Link: https://lore.kernel.org/r/20220811161053.54081-1-alim.akhtar@samsung.com Fixes: 216f74e8059a ("scsi: ufs: host: ufs-exynos: Add support for FSD UFS HCI") Reported-by: kernel test robot Reviewed-by: Bart Van Assche Signed-off-by: Alim Akhtar Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-exynos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7dd6f4af9482c319fa829583799e63e38967177d Author: Guixin Liu Date: Tue Aug 2 15:19:00 2022 +0800 scsi: megaraid_sas: Remove unnecessary kfree() When alloc ctrl mem fails, the reply_map will subsequently be freed in megasas_free_ctrl_mem(). No need to free it in megasas_alloc_ctrl_mem(). Link: https://lore.kernel.org/r/1659424740-46918-1-git-send-email-kanie@linux.alibaba.com Acked-by: Sumit Saxena Signed-off-by: Guixin Liu Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 7ce2aa6d7fe121e243e1c8a8093911fecdf1c88e Merge: 7ebfc85e2cd7 36fa1cb56ac5 Author: Linus Torvalds Date: Thu Aug 11 19:12:15 2022 -0700 Merge tag 'drm-next-2022-08-12-1' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Not much to squeeze into rc1, just two small fixes, one for core gem and one for shmem-helpers: gem: - Annotate WW context in error paths shmem-helper: - Add missing vunmap in error paths" * tag 'drm-next-2022-08-12-1' of git://anongit.freedesktop.org/drm/drm: drm/gem: Properly annotate WW context on drm_gem_lock_reservations() error drm/shmem-helper: Add missing vunmap on error commit 8c499e49240bd93628368c3588975cfb94169b8b Author: Guixin Liu Date: Tue Aug 2 15:18:49 2022 +0800 scsi: megaraid_sas: Fix double kfree() When allocating log_to_span fails, kfree(instance->ctrl_context) is called twice. Remove redundant call. Link: https://lore.kernel.org/r/1659424729-46502-1-git-send-email-kanie@linux.alibaba.com Acked-by: Sumit Saxena Signed-off-by: Guixin Liu Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 1 - 1 file changed, 1 deletion(-) commit 6d17a112e9a63ff6a5edffd1676b99e0ffbcd269 Author: Kiwoong Kim Date: Tue Aug 2 10:42:31 2022 +0900 scsi: ufs: core: Enable link lost interrupt Link lost is treated as fatal error with commit c99b9b230149 ("scsi: ufs: Treat link loss as fatal error"), but the event isn't registered as interrupt source. Enable it. Link: https://lore.kernel.org/r/1659404551-160958-1-git-send-email-kwmad.kim@samsung.com Fixes: c99b9b230149 ("scsi: ufs: Treat link loss as fatal error") Reviewed-by: Bart Van Assche Signed-off-by: Kiwoong Kim Signed-off-by: Martin K. Petersen include/ufs/ufshci.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 54249306e2776774ccb827969e62d34570f991db Author: Brian Bunker Date: Fri Jul 29 14:41:10 2022 -0700 scsi: core: Allow the ALUA transitioning state enough time The error path for the SCSI check condition of not ready, target in ALUA state transition, will result in the failure of that path after the retries are exhausted. In most cases that is well ahead of the transition timeout established in the SCSI ALUA device handler. Instead, reprep the command and re-add it to the queue after a 1 second delay. This will allow the handler to take care of the timeout and only fail the path if the target has exceeded the transition expiry timeout (default 60 seconds). If the expiry timeout is exceeded, the handler will change the path state from transitioning to standby leading to a path failure eliminating the potential of this re-prep to continue endlessly. In most cases the target will exit the transitioning state well before the expiry timeout but after the retries are exhausted as mentioned. Additionally remove the scsi_io_completion_reprep() function which provides little value. Link: https://lore.kernel.org/r/20220729214110.58576-1-brian@purestorage.com Reviewed-by: Martin Wilck Acked-by: Krishna Kant Acked-by: Seamus Connor Signed-off-by: Brian Bunker Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) commit 53661ded2460b414644532de6b99bd87f71987e9 Author: Tony Battersby Date: Thu Jul 7 15:08:01 2022 -0400 scsi: qla2xxx: Disable ATIO interrupt coalesce for quad port ISP27XX This partially reverts commit d2b292c3f6fd ("scsi: qla2xxx: Enable ATIO interrupt handshake for ISP27XX") For some workloads where the host sends a batch of commands and then pauses, ATIO interrupt coalesce can cause some incoming ATIO entries to be ignored for extended periods of time, resulting in slow performance, timeouts, and aborted commands. Disable interrupt coalesce and re-enable the dedicated ATIO MSI-X interrupt. Link: https://lore.kernel.org/r/97dcf365-89ff-014d-a3e5-1404c6af511c@cybernetics.com Reviewed-by: Himanshu Madhani Reviewed-by: Nilesh Javali Signed-off-by: Tony Battersby Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_target.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit a63ec83c462b5b1439f71ace751e8985dfb3fcab Author: Ronnie Sahlberg Date: Thu Aug 11 19:04:29 2022 -0500 cifs: Add constructor/destructors for tcon->cfid and move the structure definitions into cached_dir.h Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/cached_dir.c | 110 +++++++++++++++++++++++++++++++-------------------- fs/cifs/cached_dir.h | 38 ++++++++++++++++++ fs/cifs/cifsglob.h | 38 +----------------- fs/cifs/misc.c | 20 +++++----- fs/cifs/smb2inode.c | 4 +- fs/cifs/smb2ops.c | 8 ++-- 6 files changed, 121 insertions(+), 97 deletions(-) commit 9e31678fb403eae0f4fe37c6374be098835c73cd Author: Bharath SM Date: Thu Aug 11 19:46:11 2022 +0000 SMB3: fix lease break timeout when multiple deferred close handles for the same file. Solution is to send lease break ack immediately even in case of deferred close handles to avoid lease break request timing out and let deferred closed handle gets closed as scheduled. Later patches could optimize cases where we then close some of these handles sooner for the cases where lease break is to 'none' Cc: stable@kernel.org Signed-off-by: Bharath SM Signed-off-by: Steve French fs/cifs/file.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) commit 5efdd9122eff772eae2feae9f0fc0ec02d4846a3 Author: Steve French Date: Thu Aug 11 00:53:00 2022 -0500 smb3: allow deferred close timeout to be configurable Deferred close can be a very useful feature for allowing caching data for read, and for minimizing the number of reopens needed for a file that is repeatedly opened and close but there are workloads where its default (1 second, similar to actimeo/acregmax) is much too small. Allow the user to configure the amount of time we can defer sending the final smb3 close when we have a handle lease on the file (rather than forcing it to depend on value of actimeo which is often unrelated, and less safe). Adds new mount parameter "closetimeo=" which is the maximum number of seconds we can wait before sending an SMB3 close when we have a handle lease for it. Default value also is set to slightly larger at 5 seconds (although some other clients use larger default this should still help). Suggested-by: Bharath SM Reviewed-by: Bharath SM Reviewed-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/cifsfs.c | 1 + fs/cifs/connect.c | 2 ++ fs/cifs/file.c | 4 ++-- fs/cifs/fs_context.c | 9 +++++++++ fs/cifs/fs_context.h | 8 ++++++++ 5 files changed, 22 insertions(+), 2 deletions(-) commit dcb45fd7f501f86481473bde14fa0a9069ad5cdc Author: Ronnie Sahlberg Date: Tue Aug 9 12:11:49 2022 +1000 cifs: Do not use tcon->cfid directly, use the cfid we get from open_cached_dir They are the same right now but tcon-> will later point to a different type of struct containing a list of cfids. Signed-off-by: Ronnie Sahlberg Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/smb2inode.c | 4 ++-- fs/cifs/smb2pdu.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 425fe4709c76e35f93f4c0e50240f0b61b2a2e54 Author: Ondrej Jirman Date: Thu Aug 11 16:16:54 2022 -0700 Input: goodix - add support for GT1158 This controller is used by PinePhone and PinePhone Pro. Support for the PinePhone Pro will be added in a later patch set. Signed-off-by: Ondrej Jirman Signed-off-by: Jarrah Gosbell Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20220809091200.290492-1-kernel@undef.tools Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/goodix.c | 1 + 1 file changed, 1 insertion(+) commit b142af334de60f669f36461036360867babcc912 Author: Jarrah Gosbell Date: Thu Aug 11 16:16:28 2022 -0700 dt-bindings: input: touchscreen: add compatible string for Goodix GT1158 Goodix GT1158 is a touchscreen chip from Goodix used in the PinePhone and PinePhone Pro. Patches to correct these devices dts files will be sent in a later patch series. This driver was modified to support the GT1158 in the patch linked below. Add its compatible string to the device tree binding. Suggested-by: Ondrej Jirman Signed-off-by: Jarrah Gosbell Link: https://lore.kernel.org/r/20220809101633.352315-1-kernel@undef.tools Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/touchscreen/goodix.yaml | 1 + 1 file changed, 1 insertion(+) commit a1653a75987749ba6dba94fa2e62f0f36b387d1a Author: Douglas Anderson Date: Thu Aug 4 07:38:49 2022 -0700 drm/msm/dsi: Fix number of regulators for SDM660 1 regulator is listed but the number 2 is specified. This presumably means we try to get a regulator with no name. Fix it. Fixes: 462f7017a691 ("drm/msm/dsi: Fix DSI and DSI PHY regulator config from SDM660") Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/496323/ Link: https://lore.kernel.org/r/20220804073608.v4.2.I94b3c3e412b7c208061349f05659e126483171b1@changeid Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/dsi/dsi_cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e00d6ac8a3422765bae37aeac2002dfd3c0bda6 Author: Douglas Anderson Date: Thu Aug 4 07:38:48 2022 -0700 drm/msm/dsi: Fix number of regulators for msm8996_dsi_cfg 3 regulators are listed but the number 2 is specified. Fix it. Fixes: 3a3ff88a0fc1 ("drm/msm/dsi: Add 8x96 info in dsi_cfg") Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/496318/ Link: https://lore.kernel.org/r/20220804073608.v4.1.I1056ee3f77f71287f333279efe4c85f88d403f65@changeid Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/dsi/dsi_cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 032d57960176ac01cc5adff5bcc5eb51317f8781 Author: Kuogee Hsieh Date: Thu Aug 11 15:57:50 2022 -0700 drm/msm/dp: delete DP_RECOVERED_CLOCK_OUT_EN to fix tps4 Data Symbols scrambled is required for tps4 at link training 2. Therefore SCRAMBLING_DISABLE bit should not be set for tps4 to work. RECOVERED_CLOCK_OUT_EN is for enable simple EYE test for jitter measurement with minimal equipment for embedded applications purpose and is not required to be set during normal operation. Current implementation always have RECOVERED_CLOCK_OUT_EN bit set which cause SCRAMBLING_DISABLE bit wrongly set at tps4 which prevent tps4 from working. This patch delete setting RECOVERED_CLOCK_OUT_EN to fix SCRAMBLING_DISABLE be wrongly set at tps4. Changes in v2: -- fix Fixes tag Changes in v3: -- revise commit text Changes in v4: -- fix commit text newline Changes in v5: -- fix commit text line over 75 chars Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support") Signed-off-by: Kuogee Hsieh Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/497194/ Link: https://lore.kernel.org/r/1660258670-4200-1-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/dp/dp_ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e754dd7e8be86e1adc9d4d13fb1105b848c11752 Author: Leo Yan Date: Thu Aug 11 14:24:51 2022 +0800 perf c2c: Update documentation for new display option 'peer' Since the new display option 'peer' is introduced, this patch is to update the documentation to reflect it. Reviewed-by: Ali Saidi Signed-off-by: Leo Yan Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Like Xu Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timothy Hayes Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220811062451.435810-16-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-c2c.txt | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit ead42a0f9b93c3447a24be08a9e80941e99b8a50 Author: Leo Yan Date: Thu Aug 11 14:24:50 2022 +0800 perf c2c: Use 'peer' as default display for Arm64 Since Arm64 arch doesn't support HITMs flags, this patch changes to use 'peer' as default display if user doesn't specify any type; for other arches, it still uses 'tot' as default display type if user doesn't specify it. This patch changes to call perf_session__new() in an earlier place, so session environment can be initialized ahead and arch info can be used for setting display type. Suggested-by: Ali Saidi Reviewed-by: Ali Saidi Signed-off-by: Leo Yan Tested-by: Ali Saidi Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Like Xu Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timothy Hayes Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220811062451.435810-15-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) commit f37c5d914e39bdaf86505d6f1c1973418b44a6c6 Author: Leo Yan Date: Thu Aug 11 14:24:49 2022 +0800 perf c2c: Sort on peer snooping for load operations This patch adds a new option 'peer' so can sort on the cache hit for peer snooping. For displaying with option 'peer', the "Shared Data Cache Line Table" and "Shared Cache Line Distribution Pareto" both sort with the metrics "tot_peer". As result, we can get the 'peer' display: # perf c2c report -d peer --coalesce tid,pid,iaddr,dso -N --stdio ================================================= Shared Data Cache Line Table ================================================= # # ----------- Cacheline ---------- Peer ------- Load Peer ------- Total Total Total --------- Stores -------- ----- Core Load Hit ----- - LLC Load Hit -- - RMT Load Hit -- --- Load Dram ---- # Index Address Node PA cnt Snoop Total Local Remote records Loads Stores L1Hit L1Miss N/A FB L1 L2 LclHit LclHitm RmtHit RmtHitm Lcl Rmt # ..... .................. .... ...... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ........ ....... ........ ....... ........ ........ # 0 0xaaaac17d6000 N/A 0 100.00% 99 99 0 18851 18851 0 0 0 0 0 18752 0 99 0 0 0 0 0 ================================================= Shared Cache Line Distribution Pareto ================================================= # # -- Peer Snoop -- ------- Store Refs ------ --------- Data address --------- ---------- cycles ---------- Total cpu Shared # Num Rmt Lcl L1 Hit L1 Miss N/A Offset Node PA cnt Pid Tid Code address rmt peer lcl peer load records cnt Symbol Object Source:Line Node{cpus %peers %stores} # ..... ....... ....... ....... ....... ....... .................. .... ...... ....... ................. .................. ........ ........ ........ ....... ........ ...................... ................ ............... .... # ---------------------------------------------------------------------- 0 0 99 0 0 0 0xaaaac17d6000 ---------------------------------------------------------------------- 0.00% 3.03% 0.00% 0.00% 0.00% 0x20 N/A 0 3603 3603:memstress 0xaaaac17c25ac 0 376 41 9314 2 [.] 0x00000000000025ac memstress memstress[25ac] 0{ 2 100.0% n/a} 0.00% 3.03% 0.00% 0.00% 0.00% 0x20 N/A 0 3603 3606:memstress 0xaaaac17c25ac 0 375 44 9155 1 [.] 0x00000000000025ac memstress memstress[25ac] 0{ 1 100.0% n/a} 0.00% 48.48% 0.00% 0.00% 0.00% 0x29 N/A 0 3603 3606:memstress 0xaaaac17c3e88 0 180 170 65 1 [.] 0x0000000000003e88 memstress memstress[3e88] 0{ 1 100.0% n/a} 0.00% 45.45% 0.00% 0.00% 0.00% 0x29 N/A 0 3603 3603:memstress 0xaaaac17c3e88 0 180 175 70 2 [.] 0x0000000000003e88 memstress memstress[3e88] 0{ 2 100.0% n/a} Reviewed-by: Ali Saidi Signed-off-by: Leo Yan Tested-by: Ali Saidi Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Like Xu Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timothy Hayes Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220811062451.435810-14-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 135 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 99 insertions(+), 36 deletions(-) commit faa30dfab5bc6c033994366b24bd805b1cced4ee Author: Leo Yan Date: Thu Aug 11 14:24:48 2022 +0800 perf c2c: Refactor display string The display type is shown by combination the display string array and a suffix string "HITMs", which is not friendly to extend display for other sorting type (e.g. extension for peer operations). This patch moves the suffix string "HITMs" into display string array for HITM types, so it can allow us to not necessarily to output string "HITMs" for new incoming display type. Reviewed-by: Ali Saidi Signed-off-by: Leo Yan Tested-by: Ali Saidi Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Like Xu Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timothy Hayes Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220811062451.435810-13-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7c10b65a42d7bcbc6d3082fa2db257cce8a58c08 Author: Leo Yan Date: Thu Aug 11 14:24:47 2022 +0800 perf c2c: Refactor node header The node header array contains 3 items, each item is used for one of the 3 flavors for node accessing info. To extend sorting on other snooping type and not always stick to HITMs, the second header string "Node{cpus %hitms %stores}" should be adjusted (e.g. it's changed as "Node{cpus %peer %stores}"). For this reason, this patch changes the node header array to three flat variables and uses switch-case in function setup_nodes_header(), thus it is easier for altering the header string. Reviewed-by: Ali Saidi Signed-off-by: Leo Yan Tested-by: Ali Saidi Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Like Xu Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timothy Hayes Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220811062451.435810-12-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit 2be0bc7529f8b5fb63f441167bd8875d71902b17 Author: Leo Yan Date: Thu Aug 11 14:24:46 2022 +0800 perf c2c: Rename dimension from 'percent_hitm' to 'percent_costly_snoop' Use more general naming for the main sort dimension, this can allow us not to sort only on HITM snoop type, so it can be extended to support other costly snooping operations. So rename the dimension to the prefix 'percent_costly_". Reviewed-by: Ali Saidi Signed-off-by: Leo Yan Tested-by: Ali Saidi Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Like Xu Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timothy Hayes Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220811062451.435810-11-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit c82ccc3a3d57d7f40083c7c560b726b7b919206f Author: Leo Yan Date: Thu Aug 11 14:24:45 2022 +0800 perf c2c: Use explicit names for display macros Perf c2c tool has an assumption that it heavily depends on HITM snoop type to detect cache false sharing, unfortunately, HITM is not supported on some architectures. Essentially, perf c2c tool wants to find some very costly snooping operations for false cache sharing, this means it's not necessarily to stick using HITM tags and we can explore other snooping types (e.g. SNOOPX_PEER). For this reason, this patch renames HITM related display macros with suffix '_HITM', so it can be distinct if later add more display types for on other snooping type. Reviewed-by: Ali Saidi Signed-off-by: Leo Yan Tested-by: Ali Saidi Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Like Xu Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timothy Hayes Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220811062451.435810-10-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 58 ++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 29 deletions(-) commit 682352e59bf197a3e56e6c236683ab3a96a6952b Author: Leo Yan Date: Thu Aug 11 14:24:44 2022 +0800 perf c2c: Add mean dimensions for peer operations This patch adds two dimensions for the mean value of peer operations. Reviewed-by: Ali Saidi Signed-off-by: Leo Yan Tested-by: Ali Saidi Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Like Xu Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timothy Hayes Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220811062451.435810-9-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 9082282fce7215868b3702da77f7eb9339310e7a Author: Leo Yan Date: Thu Aug 11 14:24:43 2022 +0800 perf c2c: Add dimensions of peer metrics for cache line view This patch adds dimensions of peer ops, which will be used for Shared cache line distribution pareto. It adds the percentage dimensions for local and remote peer operations, and the dimensions for accounting operation numbers which is used for stdio mode. Reviewed-by: Ali Saidi Signed-off-by: Leo Yan Tested-by: Ali Saidi Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Like Xu Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timothy Hayes Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220811062451.435810-8-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) commit 63e74ab5e4e35da7ec4d62b5209c8f654447ba87 Author: Leo Yan Date: Thu Aug 11 14:24:42 2022 +0800 perf c2c: Add dimensions for peer load operations This patch adds three dimensions for peer load operations of 'lcl_peer', 'rmt_peer' and 'tot_peer'. These three dimensions will be used in the shared data cache line table. Reviewed-by: Ali Saidi Signed-off-by: Leo Yan Tested-by: Ali Saidi Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Like Xu Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timothy Hayes Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220811062451.435810-7-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 3ef1fc17b31b7f701e8392efe8032333a2a5e6a5 Author: Leo Yan Date: Thu Aug 11 14:24:41 2022 +0800 perf c2c: Output statistics for peer snooping This patch outputs statistics for peer snooping for whole trace events and global shared cache line. Reviewed-by: Ali Saidi Signed-off-by: Leo Yan Tested-by: Ali Saidi Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Like Xu Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timothy Hayes Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220811062451.435810-6-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 3 +++ 1 file changed, 3 insertions(+) commit e843dec53ac87d6faab1c144dad9a097997a0e83 Author: Leo Yan Date: Thu Aug 11 14:24:40 2022 +0800 perf mem: Add statistics for peer snooping Since the flag PERF_MEM_SNOOPX_PEER is added to support cache snooping from peer cache line, it can come from a peer core, a peer cluster, or a remote NUMA node. This patch adds statistics for the flag PERF_MEM_SNOOPX_PEER. Note, we take PERF_MEM_SNOOPX_PEER as an affiliated info, it needs to cooperate with cache level statistics. Therefore, we account the load operations for both the cache level's metrics (e.g. ld_l2hit, ld_llchit, etc.) and peer related metrics when flag PERF_MEM_SNOOPX_PEER is set. So three new metrics are introduced: 'lcl_peer' is for local cache access, the metric 'rmt_peer' is for remote access (includes remote DRAM and any caches in remote node), and the metric 'tot_peer' is accounting the sum value of 'lcl_peer' and 'rmt_peer'. Reviewed-by: Ali Saidi Signed-off-by: Leo Yan Tested-by: Ali Saidi Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Like Xu Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timothy Hayes Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220811062451.435810-5-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/mem-events.c | 28 +++++++++++++++++++++++++--- tools/perf/util/mem-events.h | 3 +++ 2 files changed, 28 insertions(+), 3 deletions(-) commit 4e6430cbb1a9f1dc0a698f93026b6178da437798 Author: Ali Saidi Date: Thu Aug 11 14:24:39 2022 +0800 perf arm-spe: Use SPE data source for neoverse cores When synthesizing data from SPE, augment the type with source information for Arm Neoverse cores. The field is IMPLDEF but the Neoverse cores all use the same encoding. I can't find encoding information for any other SPE implementations to unify their choices with Arm's thus that is left for future work. This change populates the mem_lvl_num for Neoverse cores as well as the deprecated mem_lvl namespace. Reviewed-by: German Gomez Reviewed-by: Leo Yan Signed-off-by: Ali Saidi Tested-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: Gustavo A. R. Silva Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Like Xu Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timothy Hayes Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220811062451.435810-4-leo.yan@linaro.org Signed-off-by: Leo Yan Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/arm-spe-decoder/arm-spe-decoder.c | 1 + tools/perf/util/arm-spe-decoder/arm-spe-decoder.h | 12 ++ tools/perf/util/arm-spe.c | 130 +++++++++++++++++++--- 3 files changed, 127 insertions(+), 16 deletions(-) commit f78d6250db1a4bd81b9f998a93ea24eb8d4c1908 Author: Leo Yan Date: Thu Aug 11 14:24:38 2022 +0800 perf mem: Print snoop peer flag Since PERF_MEM_SNOOPX_PEER flag is a new snoop type, print this flag if it is set. Before: memstress 3603 [020] 122.463754: 1 l1d-miss: 8688000842 |OP LOAD|LVL L3 or L3 hit|SNP N/A|TLB Walker hit|LCK No|BLK N/A aaaac17c3e88 [unknown] (/home/ubuntu/memstress) memstress 3603 [020] 122.463754: 1 l1d-access: 8688000842 |OP LOAD|LVL L3 or L3 hit|SNP N/A|TLB Walker hit|LCK No|BLK N/A aaaac17c3e88 [unknown] (/home/ubuntu/memstress) memstress 3603 [020] 122.463754: 1 llc-miss: 8688000842 |OP LOAD|LVL L3 or L3 hit|SNP N/A|TLB Walker hit|LCK No|BLK N/A aaaac17c3e88 [unknown] (/home/ubuntu/memstress) memstress 3603 [020] 122.463754: 1 llc-access: 8688000842 |OP LOAD|LVL L3 or L3 hit|SNP N/A|TLB Walker hit|LCK No|BLK N/A aaaac17c3e88 [unknown] (/home/ubuntu/memstress) memstress 3603 [020] 122.463754: 1 tlb-access: 8688000842 |OP LOAD|LVL L3 or L3 hit|SNP N/A|TLB Walker hit|LCK No|BLK N/A aaaac17c3e88 [unknown] (/home/ubuntu/memstress) memstress 3603 [020] 122.463754: 1 memory: 8688000842 |OP LOAD|LVL L3 or L3 hit|SNP N/A|TLB Walker hit|LCK No|BLK N/A aaaac17c3e88 [unknown] (/home/ubuntu/memstress) After: memstress 3603 [020] 122.463754: 1 l1d-miss: 8688000842 |OP LOAD|LVL L3 or L3 hit|SNP Peer|TLB Walker hit|LCK No|BLK N/A aaaac17c3e88 [unknown] (/home/ubuntu/memstress) memstress 3603 [020] 122.463754: 1 l1d-access: 8688000842 |OP LOAD|LVL L3 or L3 hit|SNP Peer|TLB Walker hit|LCK No|BLK N/A aaaac17c3e88 [unknown] (/home/ubuntu/memstress) memstress 3603 [020] 122.463754: 1 llc-miss: 8688000842 |OP LOAD|LVL L3 or L3 hit|SNP Peer|TLB Walker hit|LCK No|BLK N/A aaaac17c3e88 [unknown] (/home/ubuntu/memstress) memstress 3603 [020] 122.463754: 1 llc-access: 8688000842 |OP LOAD|LVL L3 or L3 hit|SNP Peer|TLB Walker hit|LCK No|BLK N/A aaaac17c3e88 [unknown] (/home/ubuntu/memstress) memstress 3603 [020] 122.463754: 1 tlb-access: 8688000842 |OP LOAD|LVL L3 or L3 hit|SNP Peer|TLB Walker hit|LCK No|BLK N/A aaaac17c3e88 [unknown] (/home/ubuntu/memstress) memstress 3603 [020] 122.463754: 1 memory: 8688000842 |OP LOAD|LVL L3 or L3 hit|SNP Peer|TLB Walker hit|LCK No|BLK N/A aaaac17c3e88 [unknown] (/home/ubuntu/memstress) Reviewed-by: Ali Saidi Reviewed-by: Kajol Jain Signed-off-by: Leo Yan Tested-by: Ali Saidi Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Like Xu Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timothy Hayes Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220811062451.435810-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/mem-events.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 2e21bcf0514a3623b41962bf424dec061c02ebc6 Author: Ali Saidi Date: Thu Aug 11 14:24:37 2022 +0800 perf tools: Sync addition of PERF_MEM_SNOOPX_PEER Add a flag to the 'perf mem' data struct to signal that a request caused a cache-to-cache transfer of a line from a peer of the requestor and wasn't sourced from a lower cache level. The line being moved from one peer cache to another has latency and performance implications. On Arm64 Neoverse systems the data source can indicate a cache-to-cache transfer but not if the line is dirty or clean, so instead of overloading HITM define a new flag that indicates this type of transfer. Committer notes: This really is not syncing with the kernel since the patch to the kernel wasn't merged. But we're going ahead of this as it seems trivial and is just a matter of the perf kernel maintainers to give their ack or for us to find another way of expressing this in the perf records synthesized in userspace from the ARM64 hardware traces. Reviewed-by: Leo Yan Signed-off-by: Ali Saidi Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: German Gomez Cc: Gustavo A. R. Silva Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Like Xu Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Timothy Hayes Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220811062451.435810-2-leo.yan@linaro.org Signed-off-by: Leo Yan Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/perf_event.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a88c4ec3c2c6743cc4424b51e66a0c034afe507 Author: Leo Yan Date: Thu Aug 11 19:06:38 2022 -0300 perf arm64: Add missing -I for tools/arch/arm64/include/ to find asm/sysreg.h when building arm_spe.h This cures a current problem where tools/perf/util/arm-spe.c isn't finding a ARM64 specific asm header, so lets add it for now to make progress. Adding a .o specific rule seems clunky, lets try and find if this is really the right solution. Signed-off-by: Leo Yan Reported-by: Suzuki K Poulose Tested-by: Arnaldo Carvalho de Melo Cc: Catalin Marinas Cc: Anshuman Khandual Cc: Will Deacon Cc: James Morse Link: https://lore.kernel.org/lkml/20220811124825.GA868014@leoy-huanghe.lan Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/Build | 1 + 1 file changed, 1 insertion(+) commit f829ee7595b5e9a9e5e1cc802224391c61072b38 Author: Atish Patra Date: Mon Jul 11 10:46:32 2022 -0700 RISC-V: Improve SBI definitions Fixed few typos and bit fields not aligned with the spec. Define other related macros that will be useful in the future. Signed-off-by: Atish Patra Link: https://lore.kernel.org/r/20220711174632.4186047-6-atishp@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/sbi.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 63ba67ebdfd403ef53aa0fefde3a42e505516e8c Author: Atish Patra Date: Mon Jul 11 10:46:31 2022 -0700 RISC-V: Move counter info definition to sbi header file Counter info encoding format is defined by the SBI specificaiton. KVM implementation of SBI PMU extension will also leverage this definition. Move the definition to common sbi header file from the sbi pmu driver. Signed-off-by: Atish Patra Link: https://lore.kernel.org/r/20220711174632.4186047-5-atishp@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/sbi.h | 14 ++++++++++++++ drivers/perf/riscv_pmu_sbi.c | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) commit 0209b5830bea42dd3ce33ab0397231e67ec3b751 Author: Atish Patra Date: Mon Jul 11 10:46:30 2022 -0700 RISC-V: Fix SBI PMU calls for RV32 Some of the SBI PMU calls does not pass 64bit arguments correctly and not under RV32 compile time flags. Currently, this doesn't create any incorrect results as RV64 ignores any value in the additional register and qemu doesn't support raw events. Fix those SBI calls in order to set correct values for RV32. Fixes: e9991434596f ("RISC-V: Add perf platform driver based on SBI PMU extension") Signed-off-by: Atish Patra Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220711174632.4186047-4-atishp@rivosinc.com Signed-off-by: Palmer Dabbelt drivers/perf/riscv_pmu_sbi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 133a6d1fe7d7ad8393af025c4dde379c0616661f Author: Atish Patra Date: Mon Jul 11 10:46:29 2022 -0700 RISC-V: Update user page mapping only once during start Currently, riscv_pmu_event_set_period updates the userpage mapping. However, the caller of riscv_pmu_event_set_period should update the userpage mapping because the counter can not be updated/started from set_period function in counter overflow path. Invoke the perf_event_update_userpage at the caller so that it doesn't get invoked twice during counter start path. Fixes: f5bfa23f576f ("RISC-V: Add a perf core library for pmu drivers") Reviewed-by: Anup Patel Signed-off-by: Atish Patra Reviewed-by: Guo Ren Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220711174632.4186047-3-atishp@rivosinc.com Signed-off-by: Palmer Dabbelt drivers/perf/riscv_pmu.c | 1 - drivers/perf/riscv_pmu_sbi.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit acc1b919f47926b089be21b8aaa29ec91fef0aa2 Author: Atish Patra Date: Mon Jul 11 10:46:28 2022 -0700 RISC-V: Fix counter restart during overflow for RV32 Pass the upper half of the initial value of the counter correctly for RV32. Fixes: 4905ec2fb7e6 ("RISC-V: Add sscofpmf extension support") Signed-off-by: Atish Patra Reviewed-by: Guo Ren Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220711174632.4186047-2-atishp@rivosinc.com Signed-off-by: Palmer Dabbelt drivers/perf/riscv_pmu_sbi.c | 5 +++++ 1 file changed, 5 insertions(+) commit 53e76d35f797b2975ad9b2934e668e59abba1f10 Author: Adrian Hunter Date: Thu Aug 11 20:04:11 2022 +0300 perf tools: Tidy guest option documentation Move common guest options into include files. Use attribute substitution to customize an example, using "[verse]" to define the block instead of a "literal" block which does not permit substitution. Signed-off-by: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20220811170411.84154-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/guest-files.txt | 16 ++++++++++++++++ tools/perf/Documentation/guestmount.txt | 11 +++++++++++ tools/perf/Documentation/perf-inject.txt | 14 +++----------- tools/perf/Documentation/perf-kvm.txt | 25 +++++-------------------- tools/perf/Documentation/perf-script.txt | 29 +++-------------------------- 5 files changed, 38 insertions(+), 57 deletions(-) commit d9ca43c06fb76d2829675b764093c7094ab636f0 Author: Adrian Hunter Date: Thu Aug 11 20:04:10 2022 +0300 perf inject: Fix missing guestmount option documentation The 'perf inject' documentation is missing the guestmount option. Add it. Fixes: 97406a7e4fa6e5ca ("perf inject: Add support for injecting guest sideband events") Signed-off-by: Adrian Hunter Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20220811170411.84154-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-inject.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 696d0a4cb8009af7bb3b45dc4d94679a7c9a2318 Author: Adrian Hunter Date: Thu Aug 11 20:04:09 2022 +0300 perf script: Fix missing guest option documentation The 'perf script' documentation is missing several options relating to guests. Add them. Fixes: 15a108af1a18b597 ("perf script: Allow specifying the files to process guest samples") Signed-off-by: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20220811170411.84154-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 7ab52f75a9cf7fed7ba85802b986825dd72df641 Merge: 3dbe5829408b 9f7a8ff6391f Author: Palmer Dabbelt Date: Thu Aug 11 14:41:52 2022 -0700 RISC-V: Add Sstc extension support This series implements Sstc extension support which was ratified recently. Before the Sstc extension, an SBI call is necessary to generate timer interrupts as only M-mode have access to the timecompare registers. Thus, there is significant latency to generate timer interrupts at kernel. For virtualized enviornments, its even worse as the KVM handles the SBI call and uses a software timer to emulate the timecomapre register. Sstc extension solves both these problems by defining a stimecmp/vstimecmp at supervisor (host/guest) level. It allows kernel to program a timer and recieve interrupt without supervisor execution enviornment (M-mode/HS mode) intervention. * palmer/riscv-sstc: RISC-V: Prefer sstc extension if available RISC-V: Enable sstc extension parsing from DT RISC-V: Add SSTC extension CSR details commit 9f7a8ff6391fd5363363b8e5c8b1462a07922368 Author: Atish Patra Date: Fri Jul 22 09:50:46 2022 -0700 RISC-V: Prefer sstc extension if available RISC-V ISA has sstc extension which allows updating the next clock event via a CSR (stimecmp) instead of an SBI call. This should happen dynamically if sstc extension is available. Otherwise, it will fallback to SBI call to maintain backward compatibility. Reviewed-by: Anup Patel Signed-off-by: Atish Patra Reviewed-by: Guo Ren Link: https://lore.kernel.org/r/20220722165047.519994-4-atishp@rivosinc.com Signed-off-by: Palmer Dabbelt drivers/clocksource/timer-riscv.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 464b0187ff94fcc629fe7cd350e16a3b9e80ed9e Author: Atish Patra Date: Fri Jul 22 09:50:45 2022 -0700 RISC-V: Enable sstc extension parsing from DT The ISA extension framework now allows parsing any multi-letter ISA extension. Enable that for sstc extension. Reviewed-by: Anup Patel Signed-off-by: Atish Patra Link: https://lore.kernel.org/r/20220722165047.519994-3-atishp@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/hwcap.h | 1 + arch/riscv/kernel/cpu.c | 1 + arch/riscv/kernel/cpufeature.c | 1 + 3 files changed, 3 insertions(+) commit bf952a290f7a9d818204b9b68e861655f8b15a65 Author: Atish Patra Date: Fri Jul 22 09:50:44 2022 -0700 RISC-V: Add SSTC extension CSR details This patch just introduces the required CSR fields related to the SSTC extension. Reviewed-by: Anup Patel Signed-off-by: Atish Patra Link: https://lore.kernel.org/r/20220722165047.519994-2-atishp@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/csr.h | 5 +++++ 1 file changed, 5 insertions(+) commit fe99b819487dba848cddd3d4bf4beb8e653d7e9c Author: Luca Ceresoli Date: Mon Aug 8 16:17:08 2022 +0200 docs: i2c: i2c-sysfs: fix hyperlinks dts files cannot be linked conveniently, thus replace them with literal formatting. The links to other rst pages are broken, fix them using the proper syntax. Fixes: 31df7195b100 ("Documentation: i2c: Add doc for I2C sysfs") Signed-off-by: Luca Ceresoli Signed-off-by: Wolfram Sang Documentation/i2c/i2c-sysfs.rst | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 55bdfb8b55ae4bff4864d61a250abe0af86adc69 Author: Luca Ceresoli Date: Mon Aug 8 16:17:07 2022 +0200 docs: i2c: i2c-sysfs: improve wording Improve wording in a couple sentences. Signed-off-by: Luca Ceresoli [wsa: improved a little more] Signed-off-by: Wolfram Sang Documentation/i2c/i2c-sysfs.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 3dbe5829408bc1586f75b4667ef60e5aab0209c7 Author: Yipeng Zou Date: Thu Jul 21 14:58:20 2022 +0800 riscv:uprobe fix SR_SPIE set/clear handling In riscv the process of uprobe going to clear spie before exec the origin insn,and set spie after that.But When access the page which origin insn has been placed a page fault may happen and irq was disabled in arch_uprobe_pre_xol function,It cause a WARN as follows. There is no need to clear/set spie in arch_uprobe_pre/post/abort_xol. We can just remove it. [ 31.684157] BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1488 [ 31.684677] in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 76, name: work [ 31.684929] preempt_count: 0, expected: 0 [ 31.685969] CPU: 2 PID: 76 Comm: work Tainted: G [ 31.686542] Hardware name: riscv-virtio,qemu (DT) [ 31.686797] Call Trace: [ 31.687053] [] dump_backtrace+0x30/0x38 [ 31.687699] [] show_stack+0x40/0x4c [ 31.688141] [] dump_stack_lvl+0x44/0x5c [ 31.688396] [] dump_stack+0x18/0x20 [ 31.688653] [] __might_resched+0x114/0x122 [ 31.688948] [] __might_sleep+0x50/0x7a [ 31.689435] [] down_read+0x30/0x130 [ 31.689728] [] do_page_fault+0x166/x446 [ 31.689997] [] ret_from_exception+0x0/0xc Fixes: 74784081aac8 ("riscv: Add uprobes supported") Signed-off-by: Yipeng Zou Reviewed-by: Guo Ren Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220721065820.245755-1-zouyipeng@huawei.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/probes/uprobes.c | 6 ------ 1 file changed, 6 deletions(-) commit 43310e279d7b40c84bd41b30f2fa53d9bc05b268 Author: Luca Ceresoli Date: Mon Aug 8 16:17:04 2022 +0200 docs: i2c: instantiating-devices: add syntax coloring to dts and C blocks These blocks can be nicely coloured via Sphinx. Signed-off-by: Luca Ceresoli Signed-off-by: Wolfram Sang Documentation/i2c/instantiating-devices.rst | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 6c12ec2772fa01516fde5685644b129c6f236ce2 Author: Luca Ceresoli Date: Mon Aug 8 16:17:03 2022 +0200 docs: i2c: smbus-protocol: improve DataLow/DataHigh definition Use a more professional wording. Signed-off-by: Luca Ceresoli Reviewed-by: Bagas Sanjaya Signed-off-by: Wolfram Sang Documentation/i2c/smbus-protocol.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0721ceee2fa7e64c1bc83b2d7aa4b8f284bc7aa0 Author: Luca Ceresoli Date: Mon Aug 8 16:17:02 2022 +0200 docs: i2c: i2c-protocol: remove unused legend items "Comm", "Count", "DataLow", "DataHigh" are not used in this section. Signed-off-by: Luca Ceresoli Signed-off-by: Wolfram Sang Documentation/i2c/i2c-protocol.rst | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 24d129d4f2bd01a085eb18ac7abb5612796209d8 Author: Luca Ceresoli Date: Mon Aug 8 16:17:01 2022 +0200 docs: i2c: i2c-protocol,smbus-protocol: remove nonsense words "as usual" does not mean much here, especially as these are introductory sections and 10-bit addressing hasn't been introduced yet. Signed-off-by: Luca Ceresoli Signed-off-by: Wolfram Sang Documentation/i2c/i2c-protocol.rst | 2 +- Documentation/i2c/smbus-protocol.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9bbebdf77890358304c7b55a02228cf00deec4cb Author: Luca Ceresoli Date: Mon Aug 8 16:17:00 2022 +0200 docs: i2c: i2c-protocol: update introductory paragraph This sentence dates back to the pre-git era and it does not look very professional... As there is no clear definition of "finished", and given this page is already a pretty good overview, not to mention it is not the kernel responsibility to document the protocol in detail, let's update the text accordingly. Signed-off-by: Luca Ceresoli Signed-off-by: Wolfram Sang Documentation/i2c/i2c-protocol.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0b0221d9cd330e3d9c4cb0a257b92af2a6ca2ed0 Author: Wolfram Sang Date: Thu Aug 11 14:08:08 2022 +0200 i2c: move core from strlcpy to strscpy Follow the advice of the below link and prefer 'strscpy'. Conversion is easy because no code used the return value. It has been done with a simple sed invocation. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 2 +- drivers/i2c/i2c-smbus.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ea1558ce149d286eaf2c0800a93b7efa2adda094 Author: Wolfram Sang Date: Thu Aug 11 09:10:30 2022 +0200 i2c: move drivers from strlcpy to strscpy Follow the advice of the below link and prefer 'strscpy'. Conversion is easy because no driver used the return value and has been done with a simple sed invocation. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-altera.c | 2 +- drivers/i2c/busses/i2c-aspeed.c | 2 +- drivers/i2c/busses/i2c-au1550.c | 2 +- drivers/i2c/busses/i2c-axxia.c | 2 +- drivers/i2c/busses/i2c-bcm-kona.c | 2 +- drivers/i2c/busses/i2c-brcmstb.c | 2 +- drivers/i2c/busses/i2c-cbus-gpio.c | 2 +- drivers/i2c/busses/i2c-cht-wc.c | 2 +- drivers/i2c/busses/i2c-cros-ec-tunnel.c | 2 +- drivers/i2c/busses/i2c-davinci.c | 2 +- drivers/i2c/busses/i2c-digicolor.c | 2 +- drivers/i2c/busses/i2c-eg20t.c | 2 +- drivers/i2c/busses/i2c-emev2.c | 2 +- drivers/i2c/busses/i2c-exynos5.c | 2 +- drivers/i2c/busses/i2c-gpio.c | 2 +- drivers/i2c/busses/i2c-highlander.c | 2 +- drivers/i2c/busses/i2c-hix5hd2.c | 2 +- drivers/i2c/busses/i2c-i801.c | 4 ++-- drivers/i2c/busses/i2c-ibm_iic.c | 2 +- drivers/i2c/busses/i2c-icy.c | 2 +- drivers/i2c/busses/i2c-imx-lpi2c.c | 2 +- drivers/i2c/busses/i2c-lpc2k.c | 2 +- drivers/i2c/busses/i2c-meson.c | 2 +- drivers/i2c/busses/i2c-mt65xx.c | 2 +- drivers/i2c/busses/i2c-mt7621.c | 2 +- drivers/i2c/busses/i2c-mv64xxx.c | 2 +- drivers/i2c/busses/i2c-mxs.c | 2 +- drivers/i2c/busses/i2c-nvidia-gpu.c | 2 +- drivers/i2c/busses/i2c-omap.c | 2 +- drivers/i2c/busses/i2c-opal.c | 4 ++-- drivers/i2c/busses/i2c-parport.c | 2 +- drivers/i2c/busses/i2c-pxa.c | 2 +- drivers/i2c/busses/i2c-qcom-geni.c | 2 +- drivers/i2c/busses/i2c-qup.c | 2 +- drivers/i2c/busses/i2c-rcar.c | 2 +- drivers/i2c/busses/i2c-riic.c | 2 +- drivers/i2c/busses/i2c-rk3x.c | 2 +- drivers/i2c/busses/i2c-s3c2410.c | 2 +- drivers/i2c/busses/i2c-sh_mobile.c | 2 +- drivers/i2c/busses/i2c-simtec.c | 2 +- drivers/i2c/busses/i2c-taos-evm.c | 2 +- drivers/i2c/busses/i2c-tegra-bpmp.c | 2 +- drivers/i2c/busses/i2c-tegra.c | 2 +- drivers/i2c/busses/i2c-uniphier-f.c | 2 +- drivers/i2c/busses/i2c-uniphier.c | 2 +- drivers/i2c/busses/i2c-versatile.c | 2 +- drivers/i2c/busses/i2c-wmt.c | 2 +- 47 files changed, 49 insertions(+), 49 deletions(-) commit 663bb7b9795fcd8b039b5a43990857580f4b816c Author: Chris Pringle Date: Thu Aug 11 09:21:41 2022 +0100 i2c: kempld: Support ACPI I2C device declaration Adds an ACPI companion to the KEMPLD I2C driver so that it correctly detects any I2C devices nested under the KEMPLD's ACPI node (SBRG.CPLD). This allows I2C devices attached to the KEMPLD I2C adapter to be declared and instantiated via ACPI. Signed-off-by: Chris Pringle Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-kempld.c | 1 + 1 file changed, 1 insertion(+) commit 1b48006ed477827848a2b14d70c764fb280c595d Author: Kewei Xu Date: Sat Aug 6 18:02:49 2022 +0800 i2c: mediatek: add i2c compatible for MT8188 Add i2c compatible for MT8188 and added mt_i2c_regs_v3[], since MT8188 i2c OFFSET_SLAVE_ADDR register changed from 0x04 to 0x94. Signed-off-by: Kewei Xu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Qii Wang Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mt65xx.c | 43 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 3a8b54298cbee5d56a710f70863226b0ed84aa27 Author: Kewei Xu Date: Sat Aug 6 18:02:48 2022 +0800 dt-bindings: i2c: update bindings for mt8188 soc Add a DT binding documentation for the mt8188 soc. Signed-off-by: Kewei Xu Reviewed-by: Matthias Brugger Acked-by: Rob Herring Reviewed-by: Qii Wang Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml | 1 + 1 file changed, 1 insertion(+) commit b60cf8e59e61133b6c9514ff8d8c8d7049d040ef Author: Conor Dooley Date: Wed Aug 3 19:54:00 2022 +0100 dt-bindings: riscv: fix SiFive l2-cache's cache-sets Fix device tree schema validation error messages for the SiFive Unmatched: ' cache-sets:0:0: 1024 was expected'. The existing bindings allow for just 1024 cache-sets but the fu740 on Unmatched the has 2048 cache-sets. The ISA itself permits any arbitrary power of two, however this is not supported by dt-schema. The RTL for the IP, to which the number of cache-sets is a tunable parameter, has been released publicly so speculatively adding a small number of "reasonable" values seems unwise also. Instead, as the binding only supports two distinct controllers: add 2048 and explicitly lock it to the fu740's l2 cache while limiting 1024 to the l2 cache on the fu540. Fixes: af951c3a113b ("dt-bindings: riscv: Update l2 cache DT documentation to add support for SiFive FU740") Reported-by: Atul Khare Signed-off-by: Conor Dooley Reviewed-by: Krzysztof Kozlowski Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220803185359.942928-1-mail@conchuod.ie Signed-off-by: Palmer Dabbelt Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit ade1d0307b2fb3d9192398e9b638b1bb6ed36028 Author: Namhyung Kim Date: Thu Aug 11 11:54:56 2022 -0700 perf offcpu: Update offcpu test for child process Record off-cpu data with perf bench sched messaging workload and count the number of offcpu-time events. Also update the test script not to run next tests if failed already and revise the error messages. $ sudo ./perf test offcpu -v 88: perf record offcpu profiling tests : --- start --- test child forked, pid 344780 Checking off-cpu privilege Basic off-cpu test Basic off-cpu test [Success] Child task off-cpu test Child task off-cpu test [Success] test child finished with 0 ---- end ---- perf record offcpu profiling tests: Ok Signed-off-by: Namhyung Kim Cc: Blake Jones Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Milian Wolff Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20220811185456.194721-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/record_offcpu.sh | 57 +++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 7 deletions(-) commit d23477637ac6d29f946461a2fa5eb616cfa5d3f0 Author: Namhyung Kim Date: Thu Aug 11 11:54:55 2022 -0700 perf offcpu: Track child processes When -p option used or a workload is given, it needs to handle child processes. The perf_event can inherit those task events automatically. We can add a new BPF program in task_newtask tracepoint to track child processes. Before: $ sudo perf record --off-cpu -- perf bench sched messaging $ sudo perf report --stat | grep -A1 offcpu offcpu-time stats: SAMPLE events: 1 After: $ sudo perf record -a --off-cpu -- perf bench sched messaging $ sudo perf report --stat | grep -A1 offcpu offcpu-time stats: SAMPLE events: 856 Signed-off-by: Namhyung Kim Cc: Blake Jones Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Milian Wolff Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20220811185456.194721-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_off_cpu.c | 7 +++++++ tools/perf/util/bpf_skel/off_cpu.bpf.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit d6f415ca33e132d14743c36ad4e2b63dc8ad0b18 Author: Namhyung Kim Date: Thu Aug 11 11:54:54 2022 -0700 perf offcpu: Parse process id separately The current target code uses thread id for tracking tasks because perf_events need to be opened for each task. But we can use tgid in BPF maps and check it easily. Signed-off-by: Namhyung Kim Cc: Blake Jones Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Milian Wolff Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20220811185456.194721-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_off_cpu.c | 45 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) commit 07fc958b0cfcd8e44f0de13625a551dd16b97eb4 Author: Namhyung Kim Date: Thu Aug 11 11:54:53 2022 -0700 perf offcpu: Check process id for the given workload Current task filter checks task->pid which is different for each thread. But we want to profile all the threads in the process. So let's compare process id (or thread-group id: tgid) instead. Before: $ sudo perf record --off-cpu -- perf bench sched messaging -t $ sudo perf report --stat | grep -A1 offcpu offcpu-time stats: SAMPLE events: 2 After: $ sudo perf record --off-cpu -- perf bench sched messaging -t $ sudo perf report --stat | grep -A1 offcpu offcpu-time stats: SAMPLE events: 850 Signed-off-by: Namhyung Kim Cc: Blake Jones Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Milian Wolff Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20220811185456.194721-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_off_cpu.c | 1 + tools/perf/util/bpf_skel/off_cpu.bpf.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) commit 87df2b5cbc84554df49ccfd9170103729d5a0ab4 Author: Conor Dooley Date: Thu Jul 14 09:02:36 2022 +0100 riscv: ensure cpu_ops_sbi is declared Sparse complains that cpu_ops_sbi is used undeclared: arch/riscv/kernel/cpu_ops_sbi.c:17:29: warning: symbol 'cpu_ops_sbi' was not declared. Should it be static? Fix the warning by adding cpu_ops_sbi to cpu_ops_sbi.h & including that where used. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220714080235.3853374-1-conor.dooley@microchip.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/cpu_ops_sbi.h | 2 ++ arch/riscv/kernel/cpu_ops.c | 1 + 2 files changed, 3 insertions(+) commit 7ebfc85e2cd7b08f518b526173e9a33b56b3913b Merge: e091ba5cf827 c2e75634cbe3 Author: Linus Torvalds Date: Thu Aug 11 13:45:37 2022 -0700 Merge tag 'net-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from bluetooth, bpf, can and netfilter. A little larger than usual but it's all fixes, no late features. It's large partially because of timing, and partially because of follow ups to stuff that got merged a week or so before the merge window and wasn't as widely tested. Maybe the Bluetooth fixes are a little alarming so we'll address that, but the rest seems okay and not scary. Notably we're including a fix for the netfilter Kconfig [1], your WiFi warning [2] and a bluetooth fix which should unblock syzbot [3]. Current release - regressions: - Bluetooth: - don't try to cancel uninitialized works [3] - L2CAP: fix use-after-free caused by l2cap_chan_put - tls: rx: fix device offload after recent rework - devlink: fix UAF on failed reload and leftover locks in mlxsw Current release - new code bugs: - netfilter: - flowtable: fix incorrect Kconfig dependencies [1] - nf_tables: fix crash when nf_trace is enabled - bpf: - use proper target btf when exporting attach_btf_obj_id - arm64: fixes for bpf trampoline support - Bluetooth: - ISO: unlock on error path in iso_sock_setsockopt() - ISO: fix info leak in iso_sock_getsockopt() - ISO: fix iso_sock_getsockopt for BT_DEFER_SETUP - ISO: fix memory corruption on iso_pinfo.base - ISO: fix not using the correct QoS - hci_conn: fix updating ISO QoS PHY - phy: dp83867: fix get nvmem cell fail Previous releases - regressions: - wifi: cfg80211: fix validating BSS pointers in __cfg80211_connect_result [2] - atm: bring back zatm uAPI after ATM had been removed - properly fix old bug making bonding ARP monitor mode not being able to work with software devices with lockless Tx - tap: fix null-deref on skb->dev in dev_parse_header_protocol - revert "net: usb: ax88179_178a needs FLAG_SEND_ZLP" it helps some devices and breaks others - netfilter: - nf_tables: many fixes rejecting cross-object linking which may lead to UAFs - nf_tables: fix null deref due to zeroed list head - nf_tables: validate variable length element extension - bgmac: fix a BUG triggered by wrong bytes_compl - bcmgenet: indicate MAC is in charge of PHY PM Previous releases - always broken: - bpf: - fix bad pointer deref in bpf_sys_bpf() injected via test infra - disallow non-builtin bpf programs calling the prog_run command - don't reinit map value in prealloc_lru_pop - fix UAFs during the read of map iterator fd - fix invalidity check for values in sk local storage map - reject sleepable program for non-resched map iterator - mptcp: - move subflow cleanup in mptcp_destroy_common() - do not queue data on closed subflows - virtio_net: fix memory leak inside XDP_TX with mergeable - vsock: fix memory leak when multiple threads try to connect() - rework sk_user_data sharing to prevent psock leaks - geneve: fix TOS inheriting for ipv4 - tunnels & drivers: do not use RT_TOS for IPv6 flowlabel - phy: c45 baset1: do not skip aneg configuration if clock role is not specified - rose: avoid overflow when /proc displays timer information - x25: fix call timeouts in blocking connects - can: mcp251x: fix race condition on receive interrupt - can: j1939: - replace user-reachable WARN_ON_ONCE() with netdev_warn_once() - fix memory leak of skbs in j1939_session_destroy() Misc: - docs: bpf: clarify that many things are not uAPI - seg6: initialize induction variable to first valid array index (to silence clang vs objtool warning) - can: ems_usb: fix clang 14's -Wunaligned-access warning" * tag 'net-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (117 commits) net: atm: bring back zatm uAPI dpaa2-eth: trace the allocated address instead of page struct net: add missing kdoc for struct genl_multicast_group::flags nfp: fix use-after-free in area_cache_get() MAINTAINERS: use my korg address for mt7601u mlxsw: minimal: Fix deadlock in ports creation bonding: fix reference count leak in balance-alb mode net: usb: qmi_wwan: Add support for Cinterion MV32 bpf: Shut up kern_sys_bpf warning. net/tls: Use RCU API to access tls_ctx->netdev tls: rx: device: don't try to copy too much on detach tls: rx: device: bound the frag walk net_sched: cls_route: remove from list when handle is 0 selftests: forwarding: Fix failing tests with old libnet net: refactor bpf_sk_reuseport_detach() net: fix refcount bug in sk_psock_get (2) selftests/bpf: Ensure sleepable program is rejected by hash map iter selftests/bpf: Add write tests for sk local storage map iterator selftests/bpf: Add tests for reading a dangling map iter fd bpf: Only allow sleepable program for resched-able iterator ... commit e091ba5cf82714c8691d978781696cd1fc2dec70 Merge: 8745889a7fd0 da2679f26bd6 Author: Linus Torvalds Date: Thu Aug 11 13:26:09 2022 -0700 Merge tag 'acpi-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI updates from Rafael Wysocki: "These fix up direct references to the fwnode field in struct device and extend ACPI device properties support. Specifics: - Replace direct references to the fwnode field in struct device with dev_fwnode() and device_match_fwnode() (Andy Shevchenko) - Make the ACPI code handling device properties support properties with buffer values (Sakari Ailus)" * tag 'acpi-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: property: Fix error handling in acpi_init_properties() ACPI: VIOT: Do not dereference fwnode in struct device ACPI: property: Read buffer properties as integers ACPI: property: Add support for parsing buffer property UUID ACPI: property: Unify integer value reading functions ACPI: property: Switch node property referencing from ifs to a switch ACPI: property: Move property ref argument parsing into a new function ACPI: property: Use acpi_object_type consistently in property ref parsing ACPI: property: Tie data nodes to acpi handles ACPI: property: Return type of acpi_add_nondev_subnodes() should be bool commit e4aa991c05aedc3ead92d1352af86db74090dc3c Author: Ben Dooks Date: Wed Jul 13 22:53:06 2022 +0100 RISC-V: cpu_ops_spinwait.c should include head.h Running sparse shows cpu_ops_spinwait.c is missing two definitions found in head.h, so include it to stop the following warnings: arch/riscv/kernel/cpu_ops_spinwait.c:15:6: warning: symbol '__cpu_spinwait_stack_pointer' was not declared. Should it be static? arch/riscv/kernel/cpu_ops_spinwait.c:16:6: warning: symbol '__cpu_spinwait_task_pointer' was not declared. Should it be static? Signed-off-by: Ben Dooks Link: https://lore.kernel.org/r/20220713215306.94675-1-ben.dooks@sifive.com Fixes: c78f94f35cf6 ("RISC-V: Use __cpu_up_stack/task_pointer only for spinwait method") Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/kernel/cpu_ops_spinwait.c | 2 ++ 1 file changed, 2 insertions(+) commit 8745889a7fd04d14f461f6536c45f70cbaf3ee02 Merge: 786da5da5671 478af190cb6c Author: Linus Torvalds Date: Thu Aug 11 13:11:49 2022 -0700 Merge tag 'iomap-6.0-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull more iomap updates from Darrick Wong: "In the past 10 days or so I've not heard any ZOMG STOP style complaints about removing ->writepage support from gfs2 or zonefs, so here's the pull request removing them (and the underlying fs iomap support) from the kernel: - Remove iomap_writepage and all callers, since the mm apparently never called the zonefs or gfs2 writepage functions" * tag 'iomap-6.0-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: remove iomap_writepage zonefs: remove ->writepage gfs2: remove ->writepage gfs2: stop using generic_writepages in gfs2_ail1_start_one commit da6d2128e56a50a0d497c8e41ca1d33d88bcc0aa Author: Ben Dooks Date: Thu Jul 14 08:18:11 2022 +0100 RISC-V: Declare cpu_ops_spinwait in The cpu_ops_spinwait is used in a couple of places in arch/riscv and is causing a sparse warning due to no declaration. Add this to with the others to fix the following: arch/riscv/kernel/cpu_ops_spinwait.c:16:29: warning: symbol 'cpu_ops_spinwait' was not declared. Should it be static? Signed-off-by: Ben Dooks Link: https://lore.kernel.org/r/20220714071811.187491-1-ben.dooks@sifive.com [Palmer: Drop the extern from cpu_ops.c] Fixes: 2ffc48fc7071 ("RISC-V: Move spinwait booting method to its own config") Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/cpu_ops.h | 1 + arch/riscv/kernel/cpu_ops.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) commit 36fa1cb56ac5189c78dacbbb14d452d0c44b86c0 Merge: 5493ee1919ea 2939deac1fa2 Author: Dave Airlie Date: Fri Aug 12 05:57:05 2022 +1000 Merge tag 'drm-misc-next-fixes-2022-08-10' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Short summary of fixes pull: * gem: Annotate WW context in error paths * shmem-helper: Add missing vunmap in error paths Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YvOLPpufsvOJHiNY@linux-uq9g commit 786da5da5671c2d4cf812fe1ccc980bdde30c69e Merge: e18a90427c4e a8af0d682ae0 Author: Linus Torvalds Date: Thu Aug 11 12:41:07 2022 -0700 Merge tag 'ceph-for-5.20-rc1' of https://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "We have a good pile of various fixes and cleanups from Xiubo, Jeff, Luis and others, almost exclusively in the filesystem. Several patches touch files outside of our normal purview to set the stage for bringing in Jeff's long awaited ceph+fscrypt series in the near future. All of them have appropriate acks and sat in linux-next for a while" * tag 'ceph-for-5.20-rc1' of https://github.com/ceph/ceph-client: (27 commits) libceph: clean up ceph_osdc_start_request prototype libceph: fix ceph_pagelist_reserve() comment typo ceph: remove useless check for the folio ceph: don't truncate file in atomic_open ceph: make f_bsize always equal to f_frsize ceph: flush the dirty caps immediatelly when quota is approaching libceph: print fsid and epoch with osd id libceph: check pointer before assigned to "c->rules[]" ceph: don't get the inline data for new creating files ceph: update the auth cap when the async create req is forwarded ceph: make change_auth_cap_ses a global symbol ceph: fix incorrect old_size length in ceph_mds_request_args ceph: switch back to testing for NULL folio->private in ceph_dirty_folio ceph: call netfs_subreq_terminated with was_async == false ceph: convert to generic_file_llseek ceph: fix the incorrect comment for the ceph_mds_caps struct ceph: don't leak snap_rwsem in handle_cap_grant ceph: prevent a client from exceeding the MDS maximum xattr size ceph: choose auth MDS for getxattr with the Xs caps ceph: add session already open notify support ... commit e18a90427c4ef26e9208a8710b7d10eaf02bed48 Merge: 2ae08b36c06e 19a7cc817a38 Author: Linus Torvalds Date: Thu Aug 11 12:10:08 2022 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull more kvm updates from Paolo Bonzini: - Xen timer fixes - Documentation formatting fixes - Make rseq selftest compatible with glibc-2.35 - Fix handling of illegal LEA reg, reg - Cleanup creation of debugfs entries - Fix steal time cache handling bug - Fixes for MMIO caching - Optimize computation of number of LBRs - Fix uninitialized field in guest_maxphyaddr < host_maxphyaddr path * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (26 commits) KVM: x86/MMU: properly format KVM_CAP_VM_DISABLE_NX_HUGE_PAGES capability table Documentation: KVM: extend KVM_CAP_VM_DISABLE_NX_HUGE_PAGES heading underline KVM: VMX: Adjust number of LBR records for PERF_CAPABILITIES at refresh KVM: VMX: Use proper type-safe functions for vCPU => LBRs helpers KVM: x86: Refresh PMU after writes to MSR_IA32_PERF_CAPABILITIES KVM: selftests: Test all possible "invalid" PERF_CAPABILITIES.LBR_FMT vals KVM: selftests: Use getcpu() instead of sched_getcpu() in rseq_test KVM: selftests: Make rseq compatible with glibc-2.35 KVM: Actually create debugfs in kvm_create_vm() KVM: Pass the name of the VM fd to kvm_create_vm_debugfs() KVM: Get an fd before creating the VM KVM: Shove vcpu stats_id init into kvm_vcpu_init() KVM: Shove vm stats_id init into kvm_create_vm() KVM: x86/mmu: Add sanity check that MMIO SPTE mask doesn't overlap gen KVM: x86/mmu: rename trace function name for asynchronous page fault KVM: x86/xen: Stop Xen timer before changing IRQ KVM: x86/xen: Initialize Xen timer only once KVM: SVM: Disable SEV-ES support if MMIO caching is disable KVM: x86/mmu: Fully re-evaluate MMIO caching when SPTE masks change KVM: x86: Tag kvm_mmu_x86_module_init() with __init ... commit a208acf0eac857dc8cdaddd63a4e18ed03f91786 Author: Mark Kettenis Date: Thu Jul 7 20:55:28 2022 +0200 riscv: dts: starfive: correct number of external interrupts The PLIC integrated on the Vic_U7_Core integrated on the StarFive JH7100 SoC actually supports 133 external interrupts. 127 of these are exposed to the outside world; the remainder are used by other devices that are part of the core-complex such as the L2 cache controller. But all 133 interrupts are external interrupts as far as the PLIC is concerned. Fix the property so that the driver can manage these additional interrupts, which is important since the interrupts for the L2 cache controller are enabled by default. Fixes: ec85362fb121 ("RISC-V: Add initial StarFive JH7100 device tree") Signed-off-by: Mark Kettenis Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220707185529.19509-1-kettenis@openbsd.org Signed-off-by: Palmer Dabbelt arch/riscv/boot/dts/starfive/jh7100.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cfe9bbec56ea579135cdd92409fff371841904f Author: Emil Renner Berthing Date: Tue Jul 5 23:01:43 2022 +0200 riscv: dts: sifive unmatched: Add PWM controlled LEDs This adds the two PWM controlled LEDs to the HiFive Unmatched device tree. D12 is just a regular green diode, but D2 is an RGB diode with 3 PWM inputs controlling the three different colours. Signed-off-by: Emil Renner Berthing Reviewed-by: Geert Uytterhoeven Acked-by: Pavel Machek Tested-by: Ron Economos Link: https://lore.kernel.org/r/20220705210143.315151-5-emil.renner.berthing@canonical.com Signed-off-by: Palmer Dabbelt .../riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 2fd92c7b8fe2cfc634613dc093d0f507c7389ea8 Author: Krzysztof Kozlowski Date: Thu Aug 11 09:38:26 2022 +0300 spi: dt-bindings: Drop Pratyush Yadav Emails to Pratyush Yadav bounce ("550 Invalid recipient"). Generic SPI properties should be maintained by subsystem maintainer (Mark). Add recent contributor Vaishnav Achath to the Cadence SPI bindings. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220811063826.7620-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../devicetree/bindings/spi/cdns,qspi-nor-peripheral-props.yaml | 2 +- Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml | 2 +- Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 09992025dacd258c823f50e82db09d7ef06cdac4 Author: Neil Armstrong Date: Thu Aug 11 15:44:45 2022 +0200 spi: meson-spicc: add local pow2 clock ops to preserve rate between messages At the end of a message, the HW gets a reset in meson_spicc_unprepare_transfer(), this resets the SPICC_CONREG register and notably the value set by the Common Clock Framework. This is problematic because: - the register value CCF can be different from the corresponding CCF cached rate - CCF is allowed to change the clock rate whenever the HW state This introduces: - local pow2 clock ops checking the HW state before allowing a clock operation - separation of legacy pow2 clock patch and new enhanced clock path - SPICC_CONREG datarate value is now value kepts across messages It has been checked that: - SPICC_CONREG datarate value is kept across messages - CCF is only allowed to change the SPICC_CONREG datarate value when busy - SPICC_CONREG datarate value is correct for each transfer This didn't appear before commit 3e0cf4d3fc29 ("spi: meson-spicc: add a linear clock divider support") because we recalculated and wrote the rate for each xfer. Fixes: 3e0cf4d3fc29 ("spi: meson-spicc: add a linear clock divider support") Reported-by: Da Xue Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20220811134445.678446-1-narmstrong@baylibre.com Signed-off-by: Mark Brown drivers/spi/spi-meson-spicc.c | 129 +++++++++++++++++++++++++++++++++--------- 1 file changed, 101 insertions(+), 28 deletions(-) commit c2e75634cbe368065f140dd30bf8b1a0355158fd Author: Jakub Kicinski Date: Wed Aug 10 09:45:47 2022 -0700 net: atm: bring back zatm uAPI Jiri reports that linux-atm does not build without this header. Bring it back. It's completely dead code but we can't break the build for user space :( Reported-by: Jiri Slaby Fixes: 052e1f01bfae ("net: atm: remove support for ZeitNet ZN122x ATM devices") Link: https://lore.kernel.org/all/8576aef3-37e4-8bae-bab5-08f82a78efd3@kernel.org/ Link: https://lore.kernel.org/r/20220810164547.484378-1-kuba@kernel.org Signed-off-by: Jakub Kicinski include/uapi/linux/atm_zatm.h | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit e34f49348f8b7a53205b6f77707a3a6a40cf420b Author: Chen Lin Date: Thu Aug 11 23:16:51 2022 +0800 dpaa2-eth: trace the allocated address instead of page struct We should trace the allocated address instead of page struct. Fixes: 27c874867c4e ("dpaa2-eth: Use a single page per Rx buffer") Signed-off-by: Chen Lin Reviewed-by: Ioana Ciornei Link: https://lore.kernel.org/r/20220811151651.3327-1-chen45464546@163.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit da2679f26bd6ae20b06d49e53eedc2880cf5e65e Merge: b0f2fe5a3838 46981fa78490 Author: Rafael J. Wysocki Date: Thu Aug 11 19:21:03 2022 +0200 Merge branch 'acpi-properties' Merge changes adding support for device properties with buffer values to the ACPI device properties handling code. * acpi-properties: ACPI: property: Fix error handling in acpi_init_properties() ACPI: property: Read buffer properties as integers ACPI: property: Add support for parsing buffer property UUID ACPI: property: Unify integer value reading functions ACPI: property: Switch node property referencing from ifs to a switch ACPI: property: Move property ref argument parsing into a new function ACPI: property: Use acpi_object_type consistently in property ref parsing ACPI: property: Tie data nodes to acpi handles ACPI: property: Return type of acpi_add_nondev_subnodes() should be bool commit da2634e89caa40d7546b0566ab80ff31567861c9 Author: Stefan Metzmacher Date: Thu Aug 11 09:11:14 2022 +0200 io_uring: consistently make use of io_notif_to_data() This makes the assignment typesafe. It prepares changing io_kiocb_to_cmd() in the next commit. Signed-off-by: Stefan Metzmacher Link: https://lore.kernel.org/r/8da6e9d12cf95ad4bc73274406d12bca7aabf72e.1660201408.git.metze@samba.org Signed-off-by: Jens Axboe io_uring/notif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ed159c984079baedff740505d609badb8538e0d Author: Anuj Gupta Date: Thu Aug 11 14:44:59 2022 +0530 io_uring: fix error handling for io_uring_cmd Commit 97b388d70b53 ("io_uring: handle completions in the core") moved the error handling from handler to core. But for io_uring_cmd handler we end up completing more than once (both in handler and in core) leading to use_after_free. Change io_uring_cmd handler to avoid calling io_uring_cmd_done in case of error. Fixes: 97b388d70b53 ("io_uring: handle completions in the core") Signed-off-by: Anuj Gupta Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20220811091459.6929-1-anuj20.g@samsung.com [axboe: fix ret vs req typo] Signed-off-by: Jens Axboe io_uring/uring_cmd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 271c5ca826e0c3c53e0eb4032f8eaedea1ee391c Author: Pablo Neira Ayuso Date: Tue Aug 9 17:23:53 2022 +0200 netfilter: nf_tables: really skip inactive sets when allocating name While looping to build the bitmap of used anonymous set names, check the current set in the iteration, instead of the one that is being created. Fixes: 37a9cc525525 ("netfilter: nf_tables: add generation mask to sets") Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8357e3bf8f7aabd98bf4dc2709ee877b741cefc Author: Masahiro Yamada Date: Sun Jun 26 07:34:37 2022 +0900 riscv/purgatory: Omit use of bin2c The .incbin assembler directive is much faster than bin2c + $(CC). Do similar refactoring as in commit 4c0f032d4963 ("s390/purgatory: Omit use of bin2c"). Please note the .quad directive matches to size_t in C (both 8 byte) because the purgatory is compiled only for the 64-bit kernel. (KEXEC_FILE depends on 64BIT). Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20220625223438.835408-2-masahiroy@kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 1 - arch/riscv/purgatory/.gitignore | 1 - arch/riscv/purgatory/Makefile | 8 +------- arch/riscv/purgatory/kexec-purgatory.S | 14 ++++++++++++++ scripts/remove-stale-files | 2 ++ 5 files changed, 17 insertions(+), 9 deletions(-) commit 788177e76589e6441d43691f1a075feec2e25962 Author: Masahiro Yamada Date: Sun Jun 26 07:34:36 2022 +0900 riscv/purgatory: hard-code obj-y in Makefile The purgatory/ directory is entirely guarded in arch/riscv/Kbuild. CONFIG_ARCH_HAS_KEXEC_PURGATORY is bool type. $(CONFIG_ARCH_HAS_KEXEC_PURGATORY) is always 'y' when Kbuild visits this Makefile for building. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20220625223438.835408-1-masahiroy@kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/purgatory/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c221f0af68cfa9edcffd26ba6dbbc4b7ddb1700 Author: Jakub Kicinski Date: Tue Aug 9 16:20:12 2022 -0700 net: add missing kdoc for struct genl_multicast_group::flags Multicast group flags were added in commit 4d54cc32112d ("mptcp: avoid lock_fast usage in accept path"), but it missed adding the kdoc. Mention which flags go into that field, and do the same for op structs. Link: https://lore.kernel.org/r/20220809232012.403730-1-kuba@kernel.org Signed-off-by: Jakub Kicinski include/net/genetlink.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2ae08b36c06ea8df73a79f6b80ff7964e006e9e3 Merge: 21f9c8a13bb2 8bb5e7f4dcd9 Author: Linus Torvalds Date: Thu Aug 11 09:23:08 2022 -0700 Merge tag 'input-for-v5.20-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - changes to input core to properly queue synthetic events (such as autorepeat) and to release multitouch contacts when an input device is inhibited or suspended - reworked quirk handling in i8042 driver that consolidates multiple DMI tables into one and adds several quirks for TUXEDO line of laptops - update to mt6779 keypad to better reflect organization of the hardware - changes to mtk-pmic-keys driver preparing it to handle more variants - facelift of adp5588-keys driver - improvements to iqs7222 driver - adjustments to various DT binding documents for input devices - other assorted driver fixes. * tag 'input-for-v5.20-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (54 commits) Input: adc-joystick - fix ordering in adc_joystick_probe() dt-bindings: input: ariel-pwrbutton: use spi-peripheral-props.yaml Input: deactivate MT slots when inhibiting or suspending devices Input: properly queue synthetic events dt-bindings: input: iqs7222: Use central 'linux,code' definition Input: i8042 - add dritek quirk for Acer Aspire One AO532 dt-bindings: input: gpio-keys: accept also interrupt-extended dt-bindings: input: gpio-keys: reference input.yaml and document properties dt-bindings: input: gpio-keys: enforce node names to match all properties dt-bindings: input: Convert adc-keys to DT schema dt-bindings: input: Centralize 'linux,input-type' definition dt-bindings: input: Use common 'linux,keycodes' definition dt-bindings: input: Centralize 'linux,code' definition dt-bindings: input: Increase maximum keycode value to 0x2ff Input: mt6779-keypad - implement row/column selection Input: mt6779-keypad - match hardware matrix organization Input: i8042 - add additional TUXEDO devices to i8042 quirk tables Input: goodix - switch use of acpi_gpio_get_*_resource() APIs Input: i8042 - add TUXEDO devices to i8042 quirk tables Input: i8042 - add debug output for quirks ... commit 0b2f3212b551a87fe936701fa0813032861a3308 Author: Florian Westphal Date: Fri Aug 5 10:59:57 2022 +0200 netfilter: nfnetlink: re-enable conntrack expectation events To avoid allocation of the conntrack extension area when possible, the default behaviour was changed to only allocate the event extension if a userspace program is subscribed to a notification group. Problem is that while 'conntrack -E' does enable the event allocation behind the scenes, 'conntrack -E expect' does not: no expectation events are delivered unless user sets "net.netfilter.nf_conntrack_events" back to 1 (always on). Fix the autodetection to also consider EXP type group. We need to track the 6 event groups (3+3, new/update/destroy for events and for expectations each) independently, else we'd disable events again if an expectation group becomes empty while there is still an active event group. Fixes: 2794cdb0b97b ("netfilter: nfnetlink: allow to detect if ctnetlink listeners exist") Reported-by: Yi Chen Signed-off-by: Florian Westphal include/net/netns/conntrack.h | 2 +- net/netfilter/nfnetlink.c | 83 ++++++++++++++++++++++++++++++++++++------- 2 files changed, 72 insertions(+), 13 deletions(-) commit da06cc5bb600bc671715076b5bdd9088c674dd01 Merge: 76ad33e1b95f f9293ad46d8b Author: Palmer Dabbelt Date: Thu Aug 11 09:04:01 2022 -0700 RISC-V: fixups to work with crash tool A handful of fixes to our kexec/crash kernel support that allow crash tool to function. Link: https://lore.kernel.org/r/mhng-f5fdaa37-e99a-4214-a297-ec81f0fed0c1@palmer-mbp2014 * commit 'f9293ad46d8ba9909187a37b7215324420ad4596': RISC-V: Add modules to virtual kernel memory layout dump RISC-V: Fixup schedule out issue in machine_crash_shutdown() RISC-V: Fixup get incorrect user mode PC for kernel mode regs RISC-V: kexec: Fixup use of smp_processor_id() in preemptible context commit 02e1a114fdb71e59ee6770294166c30d437bf86a Author: Jialiang Wang Date: Wed Aug 10 15:30:57 2022 +0800 nfp: fix use-after-free in area_cache_get() area_cache_get() is used to distribute cache->area and set cache->id, and if cache->id is not 0 and cache->area->kref refcount is 0, it will release the cache->area by nfp_cpp_area_release(). area_cache_get() set cache->id before cpp->op->area_init() and nfp_cpp_area_acquire(). But if area_init() or nfp_cpp_area_acquire() fails, the cache->id is is already set but the refcount is not increased as expected. At this time, calling the nfp_cpp_area_release() will cause use-after-free. To avoid the use-after-free, set cache->id after area_init() and nfp_cpp_area_acquire() complete successfully. Note: This vulnerability is triggerable by providing emulated device equipped with specified configuration. BUG: KASAN: use-after-free in nfp6000_area_init (drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c:760) Write of size 4 at addr ffff888005b7f4a0 by task swapper/0/1 Call Trace: nfp6000_area_init (drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c:760) area_cache_get.constprop.8 (drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c:884) Allocated by task 1: nfp_cpp_area_alloc_with_name (drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c:303) nfp_cpp_area_cache_add (drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c:802) nfp6000_init (drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c:1230) nfp_cpp_from_operations (drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c:1215) nfp_pci_probe (drivers/net/ethernet/netronome/nfp/nfp_main.c:744) Freed by task 1: kfree (mm/slub.c:4562) area_cache_get.constprop.8 (drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c:873) nfp_cpp_read (drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c:924 drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c:973) nfp_cpp_readl (drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpplib.c:48) Signed-off-by: Jialiang Wang Reviewed-by: Yinjun Zhang Acked-by: Simon Horman Link: https://lore.kernel.org/r/20220810073057.4032-1-wangjialiang0806@163.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cef8e3261b4c8003f8a28276f8c74d7d0223e289 Author: Jakub Kicinski Date: Tue Aug 9 16:38:43 2022 -0700 MAINTAINERS: use my korg address for mt7601u Change my address for mt7601u to the main one. Link: https://lore.kernel.org/r/20220809233843.408004-1-kuba@kernel.org Signed-off-by: Jakub Kicinski MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f98cb0408b06c4cbad8018dc7c2b4accd9d3020 Author: Vadim Pasternak Date: Thu Aug 11 11:57:36 2022 +0200 mlxsw: minimal: Fix deadlock in ports creation Drop devl_lock() / devl_unlock() from ports creation and removal flows since the devlink instance lock is now taken by mlxsw_core. Fixes: 72a4c8c94efa ("mlxsw: convert driver to use unlocked devlink API during init/fini") Signed-off-by: Vadim Pasternak Signed-off-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/f4afce5ab0318617f3866b85274be52542d59b32.1660211614.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/minimal.c | 7 ------- 1 file changed, 7 deletions(-) commit f9293ad46d8ba9909187a37b7215324420ad4596 Author: Xianting Tian Date: Thu Aug 11 15:41:48 2022 +0800 RISC-V: Add modules to virtual kernel memory layout dump Modules always live before the kernel, MODULES_END is fixed but MODULES_VADDR isn't fixed, it depends on the kernel size. Let's add it to virtual kernel memory layout dump. As MODULES is only defined for CONFIG_64BIT, so we dump it when CONFIG_64BIT=y. eg, MODULES_VADDR - MODULES_END 0xffffffff01133000 - 0xffffffff80000000 Reviewed-by: Guo Ren Reviewed-by: Heiko Stuebner Signed-off-by: Xianting Tian Link: https://lore.kernel.org/r/20220811074150.3020189-5-xianting.tian@linux.alibaba.com Cc: stable@vger.kernel.org Fixes: 2bfc6cd81bd1 ("riscv: Move kernel mapping outside of linear mapping") Signed-off-by: Palmer Dabbelt arch/riscv/mm/init.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2024439bd5ceb145eeeb428b2a59e9b905153ac3 Author: Florian Westphal Date: Thu Aug 11 13:30:39 2022 +0200 netfilter: nf_tables: fix scheduling-while-atomic splat nf_tables_check_loops() can be called from rhashtable list walk so cond_resched() cannot be used here. Fixes: 81ea01066741 ("netfilter: nf_tables: add rescheduling points during loop detection walks") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 4 ---- 1 file changed, 4 deletions(-) commit 76ad33e1b95f3db7a2fb6c3141dc82a8d05f80dc Author: Krzysztof Kozlowski Date: Thu Jun 23 13:29:05 2022 +0200 riscv: traps_misaligned: do not duplicate stringify Use existing stringify macro from the kernel headers. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20220623112905.253157-1-krzysztof.kozlowski@linaro.org Signed-off-by: Palmer Dabbelt arch/riscv/kernel/traps_misaligned.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit ad943893d5f1d0aeea892bf7b781cf8062b36d58 Author: Xianting Tian Date: Thu Aug 11 15:41:47 2022 +0800 RISC-V: Fixup schedule out issue in machine_crash_shutdown() Current task of executing crash kexec will be schedule out when panic is triggered by RCU Stall, as it needs to wait rcu completion. It lead to inability to enter the crash system. The implementation of machine_crash_shutdown() is non-standard for RISC-V according to other Arch's implementation(eg, x86, arm64), we need to send IPI to stop secondary harts. [224521.877268] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: [224521.883471] rcu: 0-...0: (3 GPs behind) idle=cfa/0/0x1 softirq=3968793/3968793 fqs=2495 [224521.891742] (detected by 2, t=5255 jiffies, g=60855593, q=328) [224521.897754] Task dump for CPU 0: [224521.901074] task:swapper/0 state:R running task stack: 0 pid: 0 ppid: 0 flags:0x00000008 [224521.911090] Call Trace: [224521.913638] [] __schedule+0x208/0x5ea [224521.918957] Kernel panic - not syncing: RCU Stall [224521.923773] bad: scheduling from the idle thread! [224521.928571] CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Tainted: G O 5.10.113-yocto-standard #1 [224521.938658] Call Trace: [224521.941200] [] walk_stackframe+0x0/0xaa [224521.946689] [] show_stack+0x32/0x3e [224521.951830] [] dump_stack_lvl+0x7e/0xa2 [224521.957317] [] dump_stack+0x14/0x1c [224521.962459] [] dequeue_task_idle+0x2c/0x40 [224521.968207] [] __schedule+0x41e/0x5ea [224521.973520] [] schedule+0x34/0xe4 [224521.978487] [] schedule_timeout+0xc6/0x170 [224521.984234] [] wait_for_completion+0x98/0xf2 [224521.990157] [] __wait_rcu_gp+0x148/0x14a [224521.995733] [] synchronize_rcu+0x5c/0x66 [224522.001307] [] rcu_sync_enter+0x54/0xe6 [224522.006795] [] percpu_down_write+0x32/0x11c [224522.012629] [] _cpu_down+0x92/0x21a [224522.017771] [] smp_shutdown_nonboot_cpus+0x90/0x118 [224522.024299] [] machine_crash_shutdown+0x30/0x4a [224522.030483] [] __crash_kexec+0x62/0xa6 [224522.035884] [] panic+0xfa/0x2b6 [224522.040678] [] rcu_sched_clock_irq+0xc26/0xcb8 [224522.046774] [] update_process_times+0x62/0x8a [224522.052785] [] tick_sched_timer+0x9e/0x102 [224522.058533] [] __hrtimer_run_queues+0x16a/0x318 [224522.064716] [] hrtimer_interrupt+0xd4/0x228 [224522.070551] [] riscv_timer_interrupt+0x3c/0x48 [224522.076646] [] handle_percpu_devid_irq+0xb0/0x24c [224522.083004] [] __handle_domain_irq+0xa8/0x122 [224522.089014] [] riscv_intc_irq+0x38/0x60 [224522.094501] [] ret_from_exception+0x0/0xc [224522.100161] [] rcu_eqs_enter.constprop.0+0x8c/0xb8 With the patch, it can enter crash system when RCU Stall occur. Fixes: e53d28180d4d ("RISC-V: Add kdump support") Signed-off-by: Xianting Tian Link: https://lore.kernel.org/r/20220811074150.3020189-4-xianting.tian@linux.alibaba.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/kernel/machine_kexec.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit 59c026c359c30f116fef6ee958e24d04983efbb0 Author: Xianting Tian Date: Thu Aug 11 15:41:46 2022 +0800 RISC-V: Fixup get incorrect user mode PC for kernel mode regs When use 'echo c > /proc/sysrq-trigger' to trigger kdump, riscv_crash_save_regs() will be called to save regs for vmcore, we found "epc" value 00ffffffa5537400 is not a valid kernel virtual address, but is a user virtual address. Other regs(eg, ra, sp, gp...) are correct kernel virtual address. Actually 0x00ffffffb0dd9400 is the user mode PC of 'PID: 113 Comm: sh', which is saved in the task's stack. [ 21.201701] CPU: 0 PID: 113 Comm: sh Kdump: loaded Not tainted 5.18.9 #45 [ 21.201979] Hardware name: riscv-virtio,qemu (DT) [ 21.202160] epc : 00ffffffa5537400 ra : ffffffff80088640 sp : ff20000010333b90 [ 21.202435] gp : ffffffff810dde38 tp : ff6000000226c200 t0 : ffffffff8032be7c [ 21.202707] t1 : 0720072007200720 t2 : 30203a7375746174 s0 : ff20000010333cf0 [ 21.202973] s1 : 0000000000000000 a0 : ff20000010333b98 a1 : 0000000000000001 [ 21.203243] a2 : 0000000000000010 a3 : 0000000000000000 a4 : 28c8f0aeffea4e00 [ 21.203519] a5 : 28c8f0aeffea4e00 a6 : 0000000000000009 a7 : ffffffff8035c9b8 [ 21.203794] s2 : ffffffff810df0a8 s3 : ffffffff810df718 s4 : ff20000010333b98 [ 21.204062] s5 : 0000000000000000 s6 : 0000000000000007 s7 : ffffffff80c4a468 [ 21.204331] s8 : 00ffffffef451410 s9 : 0000000000000007 s10: 00aaaaaac0510700 [ 21.204606] s11: 0000000000000001 t3 : ff60000001218f00 t4 : ff60000001218f00 [ 21.204876] t5 : ff60000001218000 t6 : ff200000103338b8 [ 21.205079] status: 0000000200000020 badaddr: 0000000000000000 cause: 0000000000000008 With the incorrect PC, the backtrace showed by crash tool as below, the first stack frame is abnormal, crash> bt PID: 113 TASK: ff60000002269600 CPU: 0 COMMAND: "sh" #0 [ff2000001039bb90] __efistub_.Ldebug_info0 at 00ffffffa5537400 <-- Abnormal #1 [ff2000001039bcf0] panic at ffffffff806578ba #2 [ff2000001039bd50] sysrq_reset_seq_param_set at ffffffff8038c030 #3 [ff2000001039bda0] __handle_sysrq at ffffffff8038c5f8 #4 [ff2000001039be00] write_sysrq_trigger at ffffffff8038cad8 #5 [ff2000001039be20] proc_reg_write at ffffffff801b7edc #6 [ff2000001039be40] vfs_write at ffffffff80152ba6 #7 [ff2000001039be80] ksys_write at ffffffff80152ece #8 [ff2000001039bed0] sys_write at ffffffff80152f46 With the patch, we can get current kernel mode PC, the output as below, [ 17.607658] CPU: 0 PID: 113 Comm: sh Kdump: loaded Not tainted 5.18.9 #42 [ 17.607937] Hardware name: riscv-virtio,qemu (DT) [ 17.608150] epc : ffffffff800078f8 ra : ffffffff8008862c sp : ff20000010333b90 [ 17.608441] gp : ffffffff810dde38 tp : ff6000000226c200 t0 : ffffffff8032be68 [ 17.608741] t1 : 0720072007200720 t2 : 666666666666663c s0 : ff20000010333cf0 [ 17.609025] s1 : 0000000000000000 a0 : ff20000010333b98 a1 : 0000000000000001 [ 17.609320] a2 : 0000000000000010 a3 : 0000000000000000 a4 : 0000000000000000 [ 17.609601] a5 : ff60000001c78000 a6 : 000000000000003c a7 : ffffffff8035c9a4 [ 17.609894] s2 : ffffffff810df0a8 s3 : ffffffff810df718 s4 : ff20000010333b98 [ 17.610186] s5 : 0000000000000000 s6 : 0000000000000007 s7 : ffffffff80c4a468 [ 17.610469] s8 : 00ffffffca281410 s9 : 0000000000000007 s10: 00aaaaaab5bb6700 [ 17.610755] s11: 0000000000000001 t3 : ff60000001218f00 t4 : ff60000001218f00 [ 17.611041] t5 : ff60000001218000 t6 : ff20000010333988 [ 17.611255] status: 0000000200000020 badaddr: 0000000000000000 cause: 0000000000000008 With the correct PC, the backtrace showed by crash tool as below, crash> bt PID: 113 TASK: ff6000000226c200 CPU: 0 COMMAND: "sh" #0 [ff20000010333b90] riscv_crash_save_regs at ffffffff800078f8 <--- Normal #1 [ff20000010333cf0] panic at ffffffff806578c6 #2 [ff20000010333d50] sysrq_reset_seq_param_set at ffffffff8038c03c #3 [ff20000010333da0] __handle_sysrq at ffffffff8038c604 #4 [ff20000010333e00] write_sysrq_trigger at ffffffff8038cae4 #5 [ff20000010333e20] proc_reg_write at ffffffff801b7ee8 #6 [ff20000010333e40] vfs_write at ffffffff80152bb2 #7 [ff20000010333e80] ksys_write at ffffffff80152eda #8 [ff20000010333ed0] sys_write at ffffffff80152f52 Fixes: e53d28180d4d ("RISC-V: Add kdump support") Co-developed-by: Guo Ren Signed-off-by: Xianting Tian Link: https://lore.kernel.org/r/20220811074150.3020189-3-xianting.tian@linux.alibaba.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/kernel/crash_save_regs.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 357628e68f5c08ad578a718dc62a0031e06dbe91 Author: Xianting Tian Date: Thu Aug 11 15:41:45 2022 +0800 RISC-V: kexec: Fixup use of smp_processor_id() in preemptible context Use __smp_processor_id() to avoid check the preemption context when CONFIG_DEBUG_PREEMPT enabled, as we will enter crash kernel and no return. Without the patch, [ 103.781044] sysrq: Trigger a crash [ 103.784625] Kernel panic - not syncing: sysrq triggered crash [ 103.837634] CPU1: off [ 103.889668] CPU2: off [ 103.933479] CPU3: off [ 103.939424] Starting crashdump kernel... [ 103.943442] BUG: using smp_processor_id() in preemptible [00000000] code: sh/346 [ 103.950884] caller is debug_smp_processor_id+0x1c/0x26 [ 103.956051] CPU: 0 PID: 346 Comm: sh Kdump: loaded Not tainted 5.10.113-00002-gce03f03bf4ec-dirty #149 [ 103.965355] Call Trace: [ 103.967805] [] walk_stackframe+0x0/0xa2 [ 103.973206] [] show_stack+0x32/0x3e [ 103.978258] [] dump_stack_lvl+0x72/0x8e [ 103.983655] [] dump_stack+0x14/0x1c [ 103.988705] [] check_preemption_disabled+0x9e/0xaa [ 103.995057] [] debug_smp_processor_id+0x1c/0x26 [ 104.001150] [] machine_kexec+0x22/0xd0 [ 104.006463] [] __crash_kexec+0x6a/0xa4 [ 104.011774] [] panic+0xfc/0x2b0 [ 104.016480] [] sysrq_reset_seq_param_set+0x0/0x70 [ 104.022745] [] __handle_sysrq+0x8c/0x154 [ 104.028229] [] write_sysrq_trigger+0x5a/0x6a [ 104.034061] [] proc_reg_write+0x58/0xd4 [ 104.039459] [] vfs_write+0x7e/0x254 [ 104.044509] [] ksys_write+0x58/0xbe [ 104.049558] [] sys_write+0xe/0x16 [ 104.054434] [] ret_from_syscall+0x0/0x2 [ 104.067863] Will call new kernel at ecc00000 from hart id 0 [ 104.074939] FDT image at fc5ee000 [ 104.079523] Bye... With the patch we can got clear output, [ 67.740553] sysrq: Trigger a crash [ 67.744166] Kernel panic - not syncing: sysrq triggered crash [ 67.809123] CPU1: off [ 67.865210] CPU2: off [ 67.909075] CPU3: off [ 67.919123] Starting crashdump kernel... [ 67.924900] Will call new kernel at ecc00000 from hart id 0 [ 67.932045] FDT image at fc5ee000 [ 67.935560] Bye... Fixes: 0e105f1d0037 ("riscv: use hart id instead of cpu id on machine_kexec") Reviewed-by: Guo Ren Reviewed-by: Heiko Stuebner Reviewed-by: Atish Patra Signed-off-by: Xianting Tian Link: https://lore.kernel.org/r/20220811074150.3020189-2-xianting.tian@linux.alibaba.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/kernel/machine_kexec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf90b74341eecc32ceef0c136954a1668e43b1e7 Author: Michal Jaron Date: Mon Jul 25 10:32:43 2022 +0200 ice: Fix call trace with null VSI during VF reset During stress test with attaching and detaching VF from KVM and simultaneously changing VFs spoofcheck and trust there was a call trace in ice_reset_vf that VF's VSI is null. [145237.352797] WARNING: CPU: 46 PID: 840629 at drivers/net/ethernet/intel/ice/ice_vf_lib.c:508 ice_reset_vf+0x3d6/0x410 [ice] [145237.352851] Modules linked in: ice(E) vfio_pci vfio_pci_core vfio_virqfd vfio_iommu_type1 vfio iavf dm_mod xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 nft_compat nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables nfnetlink tun bridge stp llc sunrpc intel_rapl_msr intel_rapl_common sb_edac x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm iTCO_wdt iTC O_vendor_support irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel rapl ipmi_si intel_cstate ipmi_devintf joydev intel_uncore m ei_me ipmi_msghandler i2c_i801 pcspkr mei lpc_ich ioatdma i2c_smbus acpi_pad acpi_power_meter ip_tables xfs libcrc32c i2c_algo_bit drm_sh mem_helper drm_kms_helper sd_mod t10_pi crc64_rocksoft syscopyarea crc64 sysfillrect sg sysimgblt fb_sys_fops drm i40e ixgbe ahci libahci libata crc32c_intel mdio dca wmi fuse [last unloaded: ice] [145237.352917] CPU: 46 PID: 840629 Comm: kworker/46:2 Tainted: G S W I E 5.19.0-rc6+ #24 [145237.352921] Hardware name: Intel Corporation S2600WTT/S2600WTT, BIOS SE5C610.86B.01.01.0008.021120151325 02/11/2015 [145237.352923] Workqueue: ice ice_service_task [ice] [145237.352948] RIP: 0010:ice_reset_vf+0x3d6/0x410 [ice] [145237.352984] Code: 30 ec f3 cc e9 28 fd ff ff 0f b7 4b 50 48 c7 c2 48 19 9c c0 4c 89 ee 48 c7 c7 30 fe 9e c0 e8 d1 21 9d cc 31 c0 e9 a 9 fe ff ff <0f> 0b b8 ea ff ff ff e9 c1 fc ff ff 0f 0b b8 fb ff ff ff e9 91 fe [145237.352987] RSP: 0018:ffffb453e257fdb8 EFLAGS: 00010246 [145237.352990] RAX: ffff8bd0040181c0 RBX: ffff8be68db8f800 RCX: 0000000000000000 [145237.352991] RDX: 000000000000ffff RSI: 0000000000000000 RDI: ffff8be68db8f800 [145237.352993] RBP: ffff8bd0040181c0 R08: 0000000000001000 R09: ffff8bcfd520e000 [145237.352995] R10: 0000000000000000 R11: 00008417b5ab0bc0 R12: 0000000000000005 [145237.352996] R13: ffff8bcee061c0d0 R14: ffff8bd004019640 R15: 0000000000000000 [145237.352998] FS: 0000000000000000(0000) GS:ffff8be5dfb00000(0000) knlGS:0000000000000000 [145237.353000] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [145237.353002] CR2: 00007fd81f651d68 CR3: 0000001a0fe10001 CR4: 00000000001726e0 [145237.353003] Call Trace: [145237.353008] [145237.353011] ice_process_vflr_event+0x8d/0xb0 [ice] [145237.353049] ice_service_task+0x79f/0xef0 [ice] [145237.353074] process_one_work+0x1c8/0x390 [145237.353081] ? process_one_work+0x390/0x390 [145237.353084] worker_thread+0x30/0x360 [145237.353087] ? process_one_work+0x390/0x390 [145237.353090] kthread+0xe8/0x110 [145237.353094] ? kthread_complete_and_exit+0x20/0x20 [145237.353097] ret_from_fork+0x22/0x30 [145237.353103] Remove WARN_ON() from check if VSI is null in ice_reset_vf. Add "VF is already removed\n" in dev_dbg(). This WARN_ON() is unnecessary and causes call trace, despite that call trace, driver still works. There is no need for this warn because this piece of code is responsible for disabling VF's Tx/Rx queues when VF is disabled, but when VF is already removed there is no need to do reset or disable queues. Fixes: efe41860008e ("ice: Fix memory corruption in VF driver") Signed-off-by: Michal Jaron Signed-off-by: Jedrzej Jagielski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_vf_lib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4f5d33f4f798b1c6d92b613f0087f639d9836971 Author: Jay Vosburgh Date: Wed Aug 10 22:06:53 2022 -0700 bonding: fix reference count leak in balance-alb mode Commit d5410ac7b0ba ("net:bonding:support balance-alb interface with vlan to bridge") introduced a reference count leak by not releasing the reference acquired by ip_dev_find(). Remedy this by insuring the reference is released. Fixes: d5410ac7b0ba ("net:bonding:support balance-alb interface with vlan to bridge") Signed-off-by: Jay Vosburgh Reviewed-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/26758.1660194413@famine Signed-off-by: Jakub Kicinski drivers/net/bonding/bond_alb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 21f9c8a13bb2a0c24d9c6b86bc0896542a28c197 Author: Linus Torvalds Date: Thu Aug 11 08:40:01 2022 -0700 Revert "Makefile.extrawarn: re-enable -Wformat for clang" This reverts commit 258fafcd0683d9ccfa524129d489948ab3ddc24c. The clang -Wformat warning is terminally broken, and the clang people can't seem to get their act together. This test program causes a warning with clang: #include int main(int argc, char **argv) { printf("%hhu\n", 'a'); } resulting in t.c:5:19: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat] printf("%hhu\n", 'a'); ~~~~ ^~~ %d and apparently clang people consider that a feature, because they don't want to face the reality of how either C character constants, C arithmetic, and C varargs functions work. The rest of the world just shakes their head at that kind of incompetence, and turns off -Wformat for clang again. And no, the "you should use a pointless cast to shut this up" is not a valid answer. That warning should not exist in the first place, or at least be optinal with some "-Wformat-me-harder" kind of option. [ Admittedly, there's also very little reason to *ever* use '%hh[ud]' in C, but what little reason there is is entirely about 'I want to see only the low 8 bits of the argument'. So I would suggest nobody ever use that format in the first place, but if they do, the clang behavious is simply always wrong. Because '%hhu' takes an 'int'. It's that simple. ] Reported-by: Sudip Mukherjee (Codethink) Cc: Nick Desaulniers Signed-off-by: Linus Torvalds scripts/Makefile.extrawarn | 1 + 1 file changed, 1 insertion(+) commit 05b98fd2da6bdf241d3b9ba40582d60a84a89d70 Author: Ronnie Sahlberg Date: Wed Aug 10 22:00:08 2022 -0500 cifs: Move cached-dir functions into a separate file Also rename crfid to cfid to have consistent naming for this variable. This commit does not change any logic. Signed-off-by: Ronnie Sahlberg Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/Makefile | 2 +- fs/cifs/cached_dir.c | 362 +++++++++++++++++++++++++++++++++++++++++++++++++++ fs/cifs/cached_dir.h | 26 ++++ fs/cifs/cifsfs.c | 20 +-- fs/cifs/cifsglob.h | 2 +- fs/cifs/cifsproto.h | 1 - fs/cifs/file.c | 9 +- fs/cifs/inode.c | 1 + fs/cifs/misc.c | 12 +- fs/cifs/readdir.c | 1 + fs/cifs/smb2inode.c | 5 +- fs/cifs/smb2misc.c | 11 +- fs/cifs/smb2ops.c | 297 +----------------------------------------- fs/cifs/smb2pdu.c | 3 +- fs/cifs/smb2proto.h | 10 -- 15 files changed, 411 insertions(+), 351 deletions(-) commit 7fe05e125d5f730bd2d0fc53985bee77b6c762f0 Author: Benjamin Mikailenko Date: Fri Jul 15 18:27:07 2022 -0400 ice: Fix VSI rebuild WARN_ON check for VF In commit b03d519d3460 ("ice: store VF pointer instead of VF ID") WARN_ON checks were added to validate the vsi->vf pointer and catch programming errors. However, one check to vsi->vf was missed. This caused a call trace when resetting VFs. Fix ice_vsi_rebuild by encompassing VF pointer in WARN_ON check. Fixes: b03d519d3460 ("ice: store VF pointer instead of VF ID") Signed-off-by: Benjamin Mikailenko Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3a7c2947b9e01b9cedd3f67849c0ae95f0fadfa Author: Mikulas Patocka Date: Wed Aug 10 16:16:34 2022 -0400 dm bufio: fix some cases where the code sleeps with spinlock held Commit b32d45824aa7 ("dm bufio: Add DM_BUFIO_CLIENT_NO_SLEEP flag") added a "NO_SLEEP" mode, it replaces a mutex with a spinlock, and it is only usable when the device is in read-only mode (because the write path may be sleeping while holding the dm_bufio_client lock). However, there are still two points where the code could sleep even in read-only mode. One is in __get_unclaimed_buffer -> __make_buffer_clean. The other is in __try_evict_buffer -> __make_buffer_clean. These functions will call __make_buffer_clean which sleeps if the buffer is being read. Fix these cases so that if c->no_sleep is set __make_buffer_clean will not be called and the buffer will be skipped instead. Fixes: b32d45824aa7 ("dm bufio: Add DM_BUFIO_CLIENT_NO_SLEEP flag") Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 8eb060e10185cfc97ef0200d197ec246ba0f9f8c Author: Dao Lu Date: Mon Jun 20 13:15:25 2022 -0700 arch/riscv: add Zihintpause support Implement support for the ZiHintPause extension. The PAUSE instruction is a HINT that indicates the current hart’s rate of instruction retirement should be temporarily reduced or paused. Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Signed-off-by: Dao Lu [Palmer: Some minor merge conflicts.] Link: https://lore.kernel.org/all/20220620201530.3929352-1-daolu@rivosinc.com/ Link: https://lore.kernel.org/all/20220811053356.17375-1-palmer@rivosinc.com/ Signed-off-by: Palmer Dabbelt arch/riscv/Makefile | 4 ++++ arch/riscv/include/asm/hwcap.h | 5 +++++ arch/riscv/include/asm/vdso/processor.h | 21 ++++++++++++++++++--- arch/riscv/kernel/cpu.c | 1 + arch/riscv/kernel/cpufeature.c | 1 + 5 files changed, 29 insertions(+), 3 deletions(-) commit ae7107baa5bde3cea62778fd4515865fe50181f4 Author: Slark Xiao Date: Wed Aug 10 09:45:21 2022 +0800 net: usb: qmi_wwan: Add support for Cinterion MV32 There are 2 models for MV32 serials. MV32-W-A is designed based on Qualcomm SDX62 chip, and MV32-W-B is designed based on Qualcomm SDX65 chip. So we use 2 different PID to separate it. Test evidence as below: T: Bus=03 Lev=01 Prnt=01 Port=02 Cnt=03 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=1e2d ProdID=00f3 Rev=05.04 S: Manufacturer=Cinterion S: Product=Cinterion PID 0x00F3 USB Mobile Broadband S: SerialNumber=d7b4be8d C: #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan I: If#=0x1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option I: If#=0x3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option T: Bus=03 Lev=01 Prnt=01 Port=02 Cnt=03 Dev#= 10 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=1e2d ProdID=00f4 Rev=05.04 S: Manufacturer=Cinterion S: Product=Cinterion PID 0x00F4 USB Mobile Broadband S: SerialNumber=d095087d C: #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan I: If#=0x1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option I: If#=0x3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option Signed-off-by: Slark Xiao Acked-by: Bjørn Mork Link: https://lore.kernel.org/r/20220810014521.9383-1-slark_xiao@163.com Signed-off-by: Jakub Kicinski drivers/net/usb/qmi_wwan.c | 2 ++ 1 file changed, 2 insertions(+) commit 976bf59c69cd2e2c17f0ab20a14c0e700cba0f15 Author: Florian Westphal Date: Tue Aug 9 15:16:35 2022 +0200 netfilter: nf_ct_irc: cap packet search space to 4k This uses a pseudo-linearization scheme with a 64k global buffer, but BIG TCP arrival means IPv6 TCP stack can generate skbs that exceed this size. In practice, IRC commands are not expected to exceed 512 bytes, plus this is interactive protocol, so we should not see large packets in practice. Given most IRC connections nowadays use TLS so this helper could also be removed in the near future. Fixes: 7c4e983c4f3c ("net: allow gso_max_size to exceed 65536") Fixes: 0fe79f28bfaf ("net: allow gro_max_size to exceed 65536") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_irc.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit c783a29c7e5934eabac2b760571489ad83bf4fd1 Author: Florian Westphal Date: Tue Aug 9 15:16:34 2022 +0200 netfilter: nf_ct_ftp: prefer skb_linearize This uses a pseudo-linearization scheme with a 64k global buffer, but BIG TCP arrival means IPv6 TCP stack can generate skbs that exceed this size. Use skb_linearize. It should be possible to rewrite this to properly deal with segmented skbs (i.e., only do small chunk-wise accesses), but this is going to be a lot more intrusive than this because every helper function needs to get the sk_buff instead of a pointer to a raw data buffer. In practice, provided we're really looking at FTP control channel packets, there should never be a case where we deal with huge packets. Fixes: 7c4e983c4f3c ("net: allow gso_max_size to exceed 65536") Fixes: 0fe79f28bfaf ("net: allow gro_max_size to exceed 65536") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_ftp.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) commit f3e124c36f70d5ffcdd4e8bdbe7bb28a98a715c0 Author: Florian Westphal Date: Tue Aug 9 15:16:33 2022 +0200 netfilter: nf_ct_h323: cap packet size at 64k With BIG TCP, packets generated by tcp stack may exceed 64kb. Cap datalen at 64kb. The internal message format uses 16bit fields, so no embedded message can exceed 64k size. Multiple h323 messages in a single superpacket may now result in a message to get treated as incomplete/truncated, but thats better than scribbling past h323_buffer. Another alternative suitable for net tree would be a switch to skb_linearize(). Fixes: 7c4e983c4f3c ("net: allow gso_max_size to exceed 65536") Fixes: 0fe79f28bfaf ("net: allow gro_max_size to exceed 65536") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_h323_main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 84ba28901629cd3aa3b24d359bc4da3ac24c2329 Merge: 94ce3b64c62d 4e4588f1c4d2 Author: Jakub Kicinski Date: Thu Aug 11 07:50:28 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Pull in bpf to silence a false positive warning. * git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf: Shut up kern_sys_bpf warning. Link: https://lore.kernel.org/r/CAADnVQK589CZN1Q9w8huJqkEyEed+ZMTWqcpA1Rm2CjN3a4XoQ@mail.gmail.com/ Signed-off-by: Jakub Kicinski commit a664375da76c6da8f83dc7997e43c568e1eb9a6a Author: Florian Westphal Date: Tue Aug 9 15:16:32 2022 +0200 netfilter: nf_ct_sane: remove pseudo skb linearization For historical reason this code performs pseudo linearization of skbs via skb_header_pointer and a global 64k buffer. With arrival of BIG TCP, packets generated by TCP stack can exceed 64kb. Rewrite this to only extract the needed header data. This also allows to get rid of the locking. Fixes: 7c4e983c4f3c ("net: allow gso_max_size to exceed 65536") Fixes: 0fe79f28bfaf ("net: allow gro_max_size to exceed 65536") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_sane.c | 68 +++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 38 deletions(-) commit cd83cd55878409299f4614c5138d24dffacc39bd Merge: fa9db655d0e1 f37527a09dac Author: Jens Axboe Date: Thu Aug 11 08:37:48 2022 -0600 Merge tag 'nvme-6.0-2022-08-11' of git://git.infradead.org/nvme into block-6.0 Pull NVMe fixes from Christoph: "nvme fixes for Linux 6.0 - print nvme connect Linux error codes properly (Amit Engel) - fix the fc_appid_store return value (Christoph Hellwig) - fix a typo in an error message (Christophe JAILLET) - add another non-unique identifier quirk (Dennis P. Kliem) - check if the queue is allocated before stopping it in nvme-tcp (Maurizio Lombardi) - restart admin queue if the caller needs to restart queue in nvme-fc (Ming Lei) - use kmemdup instead of kmalloc + memcpy in nvme-auth (Zhang Xiaoxu)" * tag 'nvme-6.0-2022-08-11' of git://git.infradead.org/nvme: nvme-pci: add NVME_QUIRK_BOGUS_NID for ADATA XPG GAMMIX S70 nvme-tcp: check if the queue is allocated before stopping it nvme-fabrics: Fix a typo in an error message nvme-fabrics: parse nvme connect Linux error codes nvmet-auth: use kmemdup instead of kmalloc + memcpy nvme-fc: fix the fc_appid_store return value nvme-fc: restart admin queue if the caller needs to restart queue commit 93e530d2a1c4c0fcce45e01ae6c5c6287a08d3e3 Author: Eli Cohen Date: Thu Aug 11 16:40:10 2022 +0300 vdpa/mlx5: Fix possible uninitialized return value Initialize err local variable to return -EAGAIN if the asid cannot be found thus avoiding returning uninitialized value. Fixes: 8fcd20c30704 ("vdpa/mlx5: Support different address spaces for control and data") Reported-by: Dan Carpenter Signed-off-by: Eli Cohen Message-Id: <20220811134010.952291-1-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6de9eb21cd36151281c7f3e72fc9df18f5c6c083 Merge: 3d7cb6b04c3f e8bba72b396c 930c6074d7dd 933c5a4f87d9 Author: Huacai Chen Date: Thu Aug 11 21:06:14 2022 +0800 Merge 'irq/loongarch', 'pci/ctrl/loongson' and 'pci/header-cleanup-immutable' LoongArch architecture changes for 5.20 depend on the irqchip and pci changes to work, so merge them to create a base. commit dde61c48303afae6d5db50fc2c9f7199413945e5 Author: Conor Dooley Date: Fri Aug 5 08:43:46 2022 +0100 i2c: microchip-corei2c: fix erroneous late ack send A late ack is currently being sent at the end of a transfer due to incorrect logic in mchp_corei2c_empty_rx(). Currently the Assert Ack bit is being written to the controller's control reg after the last byte has been received, causing it to sent another byte with the ack. Instead, the AA flag should be written to the control register when the penultimate byte is read so it is sent out for the last byte. Reported-by: Andreas Buerkler Fixes: 64a6f1c4987e ("i2c: add support for microchip fpga i2c controllers") Tested-by: Lewis Hanly Signed-off-by: Conor Dooley [wsa: fixed typos in commit message] Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-microchip-corei2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a0b80a44c7d111a0404d91847db57be8b667a15 Author: Krzysztof Kozlowski Date: Tue Aug 2 17:39:47 2022 +0200 dt-bindings: i2c: qcom,i2c-cci: convert to dtschema Convert the Qualcomm Camera Control Interface (CCI) I2C controller to DT schema. The original bindings were not complete, so this includes changes: 1. Add address/size-cells. 2. Describe the clocks per variant. 3. Use more descriptive example based on sdm845. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang .../devicetree/bindings/i2c/i2c-qcom-cci.txt | 96 -------- .../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 242 +++++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 243 insertions(+), 97 deletions(-) commit 8689b80b22dbf1f5e993233370fe57f08731b14d Author: Robin Reckmann Date: Sun Aug 7 23:04:54 2022 +0900 i2c: qcom-geni: Fix GPI DMA buffer sync-back Fix i2c transfers using GPI DMA mode for all message types that do not set the I2C_M_DMA_SAFE flag (e.g. SMBus "read byte"). In this case a bounce buffer is returned by i2c_get_dma_safe_msg_buf(), and it has to synced back to the message after the transfer is done. Add missing assignment of dma buffer in geni_i2c_gpi(). Set xferred in i2c_put_dma_safe_msg_buf() to true in case of no error to ensure the sync-back of this dma buffer to the message. Fixes: d8703554f4de ("i2c: qcom-geni: Add support for GPI DMA") Signed-off-by: Robin Reckmann Tested-by: Luca Weiss Tested-by: Caleb Connolly Reviewed-by: Konrad Dybcio Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qcom-geni.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f37527a09dac324c74bb341c841096395a2f2566 Author: Dennis P. Kliem Date: Thu Aug 11 12:56:57 2022 +0200 nvme-pci: add NVME_QUIRK_BOGUS_NID for ADATA XPG GAMMIX S70 ADATA XPG GAMMIX S70 reports bogus eui64 values that appear to be the same across all drives. Quirk them out so they are not marked as "non globally unique" duplicates. Signed-off-by: Dennis P. Kliem Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 2 ++ 1 file changed, 2 insertions(+) commit 4a44a5eda245453ed7bd14239c596262cb53b665 Author: Stefano Garzarella Date: Thu Aug 11 10:36:32 2022 +0200 vdpa_sim_blk: add support for discard and write-zeroes Expose VIRTIO_BLK_F_DISCARD and VIRTIO_BLK_F_WRITE_ZEROES features to the drivers and handle VIRTIO_BLK_T_DISCARD and VIRTIO_BLK_T_WRITE_ZEROES requests checking ranges and flags. The simulator behaves like a ramdisk, so for VIRTIO_BLK_F_DISCARD does nothing, while for VIRTIO_BLK_T_WRITE_ZEROES sets to 0 the specified region. Signed-off-by: Stefano Garzarella Message-Id: <20220811083632.77525-5-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 74 +++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) commit 518083d2f5b2e7c91549ac1723923e8ae3d679ca Author: Stefano Garzarella Date: Thu Aug 11 10:36:31 2022 +0200 vdpa_sim_blk: add support for VIRTIO_BLK_T_FLUSH The simulator behaves like a ramdisk, so we don't have to do anything when a VIRTIO_BLK_T_FLUSH request is received, but it could be useful to test driver behavior. Let's expose the VIRTIO_BLK_F_FLUSH feature to inform the driver that we support the flush command. Signed-off-by: Stefano Garzarella Message-Id: <20220811083632.77525-4-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 5 +++++ 1 file changed, 5 insertions(+) commit ac926e1b468e03818e31568f6e520390b945b038 Author: Stefano Garzarella Date: Thu Aug 11 10:36:30 2022 +0200 vdpa_sim_blk: make vdpasim_blk_check_range usable by other requests Next patches will add handling of other requests, where will be useful to reuse vdpasim_blk_check_range(). So let's make it more generic by adding the `max_sectors` parameter, since different requests allow different numbers of maximum sectors. Let's also print the messages directly in vdpasim_blk_check_range() to avoid duplicate prints. Signed-off-by: Stefano Garzarella Message-Id: <20220811083632.77525-3-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 38 ++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 15 deletions(-) commit b91cf6e95b4f987d0d26def0c9cca3168d7752cb Author: Stefano Garzarella Date: Thu Aug 11 10:36:29 2022 +0200 vdpa_sim_blk: check if sector is 0 for commands other than read or write VIRTIO spec states: "The sector number indicates the offset (multiplied by 512) where the read or write is to occur. This field is unused and set to 0 for commands other than read or write." Signed-off-by: Stefano Garzarella Message-Id: <20220811083632.77525-2-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0c89e2a3a9d0815b6eb769ed22157bd9996cbb58 Author: Eugenio Pérez Date: Wed Aug 10 19:15:12 2022 +0200 vdpa_sim: Implement suspend vdpa op Implement suspend operation for vdpa_sim devices, so vhost-vdpa will offer that backend feature and userspace can effectively suspend the device. This is a must before get virtqueue indexes (base) for live migration, since the device could modify them after userland gets them. There are individual ways to perform that action for some devices (VHOST_NET_SET_BACKEND, VHOST_VSOCK_SET_RUNNING, ...) but there was no way to perform it for any vhost device (and, in particular, vhost-vdpa). Reviewed-by: Stefano Garzarella Signed-off-by: Eugenio Pérez Message-Id: <20220810171512.2343333-5-eperezma@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/vdpa_sim/vdpa_sim.c | 14 ++++++++++++++ drivers/vdpa/vdpa_sim/vdpa_sim.h | 1 + drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 3 +++ drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 3 +++ 4 files changed, 21 insertions(+) commit f345a0143b4dd1cfc850009c6979a3801b86a06f Author: Eugenio Pérez Date: Wed Aug 10 19:15:11 2022 +0200 vhost-vdpa: uAPI to suspend the device The ioctl adds support for suspending the device from userspace. This is a must before getting virtqueue indexes (base) for live migration, since the device could modify them after userland gets them. There are individual ways to perform that action for some devices (VHOST_NET_SET_BACKEND, VHOST_VSOCK_SET_RUNNING, ...) but there was no way to perform it for any vhost device (and, in particular, vhost-vdpa). After a successful return of the ioctl call the device must not process more virtqueue descriptors. The device can answer to read or writes of config fields as if it were not suspended. In particular, writing to "queue_enable" with a value of 1 will not make the device start processing buffers of the virtqueue. Signed-off-by: Eugenio Pérez Message-Id: <20220810171512.2343333-4-eperezma@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/vhost/vdpa.c | 19 +++++++++++++++++++ include/uapi/linux/vhost.h | 9 +++++++++ 2 files changed, 28 insertions(+) commit 0723f1df5c3ec8a1112d150dab98e149361ef488 Author: Eugenio Pérez Date: Wed Aug 10 19:15:10 2022 +0200 vhost-vdpa: introduce SUSPEND backend feature bit Userland knows if it can suspend the device or not by checking this feature bit. It's only offered if the vdpa driver backend implements the suspend() operation callback, and to offer it or userland to ack it if the backend does not offer that callback is an error. Signed-off-by: Eugenio Pérez Message-Id: <20220810171512.2343333-3-eperezma@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/vhost/vdpa.c | 16 +++++++++++++++- include/uapi/linux/vhost_types.h | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) commit 848ecea184e1253758423b37cbfc1ed732ccf5b4 Author: Eugenio Pérez Date: Wed Aug 10 19:15:09 2022 +0200 vdpa: Add suspend operation This operation is optional: It it's not implemented, backend feature bit will not be exposed. Signed-off-by: Eugenio Pérez Message-Id: <20220810171512.2343333-2-eperezma@redhat.com> Signed-off-by: Michael S. Tsirkin include/linux/vdpa.h | 4 ++++ 1 file changed, 4 insertions(+) commit 8d12ec10292877751ee4463b11a63bd850bc09b5 Author: Shigeru Yoshida Date: Thu Aug 11 01:09:48 2022 +0900 virtio-blk: Avoid use-after-free on suspend/resume hctx->user_data is set to vq in virtblk_init_hctx(). However, vq is freed on suspend and reallocated on resume. So, hctx->user_data is invalid after resume, and it will cause use-after-free accessing which will result in the kernel crash something like below: [ 22.428391] Call Trace: [ 22.428899] [ 22.429339] virtqueue_add_split+0x3eb/0x620 [ 22.430035] ? __blk_mq_alloc_requests+0x17f/0x2d0 [ 22.430789] ? kvm_clock_get_cycles+0x14/0x30 [ 22.431496] virtqueue_add_sgs+0xad/0xd0 [ 22.432108] virtblk_add_req+0xe8/0x150 [ 22.432692] virtio_queue_rqs+0xeb/0x210 [ 22.433330] blk_mq_flush_plug_list+0x1b8/0x280 [ 22.434059] __blk_flush_plug+0xe1/0x140 [ 22.434853] blk_finish_plug+0x20/0x40 [ 22.435512] read_pages+0x20a/0x2e0 [ 22.436063] ? folio_add_lru+0x62/0xa0 [ 22.436652] page_cache_ra_unbounded+0x112/0x160 [ 22.437365] filemap_get_pages+0xe1/0x5b0 [ 22.437964] ? context_to_sid+0x70/0x100 [ 22.438580] ? sidtab_context_to_sid+0x32/0x400 [ 22.439979] filemap_read+0xcd/0x3d0 [ 22.440917] xfs_file_buffered_read+0x4a/0xc0 [ 22.441984] xfs_file_read_iter+0x65/0xd0 [ 22.442970] __kernel_read+0x160/0x2e0 [ 22.443921] bprm_execve+0x21b/0x640 [ 22.444809] do_execveat_common.isra.0+0x1a8/0x220 [ 22.446008] __x64_sys_execve+0x2d/0x40 [ 22.446920] do_syscall_64+0x37/0x90 [ 22.447773] entry_SYSCALL_64_after_hwframe+0x63/0xcd This patch fixes this issue by getting vq from vblk, and removes virtblk_init_hctx(). Fixes: 4e0400525691 ("virtio-blk: support polling I/O") Cc: "Suwan Kim" Signed-off-by: Shigeru Yoshida Message-Id: <20220810160948.959781-1-syoshida@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/block/virtio_blk.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 99e8927d8a4da8eb8a8a5904dc13a3156be8e7c0 Author: Bo Liu Date: Wed Aug 10 04:51:51 2022 -0400 virtio_vdpa: support the arg sizes of find_vqs() Virtio vdpa support the new parameter sizes of find_vqs(). Signed-off-by: Bo Liu Message-Id: <20220810085151.7251-1-liubo03@inspur.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_vdpa.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit ebe6a354fa7e0a7d5b581da31ad031b19d8693f9 Author: Bo Liu Date: Fri Aug 5 05:12:54 2022 -0400 vhost-vdpa: Call ida_simple_remove() when failed In function vhost_vdpa_probe(), when code execution fails, we should call ida_simple_remove() to free ida. Signed-off-by: Bo Liu Message-Id: <20220805091254.20026-1-liubo03@inspur.com> Signed-off-by: Michael S. Tsirkin drivers/vhost/vdpa.c | 1 + 1 file changed, 1 insertion(+) commit 79e0034cb3485e64622ec0aabf8a6f4f8143f47b Author: Zhu Lingshan Date: Fri Jul 22 19:53:09 2022 +0800 vDPA: fix 'cast to restricted le16' warnings in vdpa.c This commit fixes spars warnings: cast to restricted __le16 in function vdpa_dev_net_config_fill() and vdpa_fill_stats_rec() Signed-off-by: Zhu Lingshan Reviewed-by: Parav Pandit Message-Id: <20220722115309.82746-7-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/vdpa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a34bed37fc9d3da319bb75dfbf02a7d3e95e12de Author: Zhu Lingshan Date: Fri Jul 22 19:53:07 2022 +0800 vDPA: !FEATURES_OK should not block querying device config space Users may want to query the config space of a vDPA device, to choose a appropriate one for a certain guest. This means the users need to read the config space before FEATURES_OK, and the existence of config space contents does not depend on FEATURES_OK. The spec says: The device MUST allow reading of any device-specific configuration field before FEATURES_OK is set by the driver. This includes fields which are conditional on feature bits, as long as those feature bits are offered by the device. Signed-off-by: Zhu Lingshan Message-Id: <20220722115309.82746-5-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/vdpa.c | 8 -------- 1 file changed, 8 deletions(-) commit 378b2e956820ff5c082d05f42828badcfbabb614 Author: Zhu Lingshan Date: Fri Jul 22 19:53:05 2022 +0800 vDPA/ifcvf: support userspace to query features and MQ of a management device Adapting to current netlink interfaces, this commit allows userspace to query feature bits and MQ capability of a management device. Currently both the vDPA device and the management device are the VF itself, thus this ifcvf should initialize the virtio capabilities in probe() before setting up the struct vdpa_mgmt_dev. Signed-off-by: Zhu Lingshan Message-Id: <20220722115309.82746-3-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/ifcvf/ifcvf_main.c | 142 +++++++++++++++++++++------------------- 1 file changed, 76 insertions(+), 66 deletions(-) commit 0d6e5e8d1686ce5d055c5ecaa76e5f51609ce9da Author: Zhu Lingshan Date: Fri Jul 22 19:53:04 2022 +0800 vDPA/ifcvf: get_config_size should return a value no greater than dev implementation Drivers must not access a BAR outside the capability length, and for a virtio device, ifcvf driver should not report any non-standard capability contents to the upper layers. Function ifcvf_get_config_size() is introduced here to return a safe value of the device config capability size. Signed-off-by: Zhu Lingshan Message-Id: <20220722115309.82746-2-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/ifcvf/ifcvf_base.c | 13 +++++++++++-- drivers/vdpa/ifcvf/ifcvf_base.h | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) commit f49c2226af8444563897e25bf293ea29e377995a Author: Mike Christie Date: Thu Jul 7 22:05:25 2022 -0500 vhost scsi: Allow user to control num virtqueues We are currently hard coded to always create 128 IO virtqueues, so this adds a modparam to control it. For large systems where we are ok with using memory for virtqueues it allows us to add up to 1024. This limit was just selected becuase that's qemu's limit. Signed-off-by: Mike Christie Message-Id: <20220708030525.5065-3-michael.christie@oracle.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/vhost/scsi.c | 85 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 61 insertions(+), 24 deletions(-) commit 5a4b0420b28fed7e8df81ac7e3b53834142053dd Author: Mike Christie Date: Thu Jul 7 22:05:24 2022 -0500 vhost-scsi: Fix max number of virtqueues Qemu takes it's num_queues limit then adds the fixed queues (control and event) to the total it will request from the kernel. So when a user requests 128 (or qemu does it's num_queues calculation based on vCPUS and other system limits), we hit errors due to userspace trying to setup 130 queues when vhost-scsi has a hard coded limit of 128. This has vhost-scsi adjust it's max so we can do a total of 130 virtqueues (128 IO and 2 fixed). For the case where the user has 128 vCPUs the guest OS can then nicely map each IO virtqueue to a vCPU and not have the odd case where 2 vCPUs share a virtqueue. Signed-off-by: Mike Christie Message-Id: <20220708030525.5065-2-michael.christie@oracle.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/vhost/scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8fcd20c307042b0bb4fd3aee7fc23c94080306ad Author: Eli Cohen Date: Thu Jul 14 14:39:27 2022 +0300 vdpa/mlx5: Support different address spaces for control and data Partition virtqueues to two different address spaces: one for control virtqueue which is implemented in software, and one for data virtqueues. Based-on: <20220526124338.36247-1-eperezma@redhat.com> Signed-off-by: Eli Cohen Message-Id: <20220714113927.85729-3-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/mlx5/core/mlx5_vdpa.h | 11 +++++ drivers/vdpa/mlx5/net/mlx5_vnet.c | 88 +++++++++++++++++++++++++++++++++----- 2 files changed, 88 insertions(+), 11 deletions(-) commit cae15c2ed8e6e058bd5e32de292ab7982640161e Author: Eli Cohen Date: Thu Jul 14 14:39:26 2022 +0300 vdpa/mlx5: Implement susupend virtqueue callback Implement the suspend callback allowing to suspend the virtqueues so they stop processing descriptors. This is required to allow to query a consistent state of the virtqueue while live migration is taking place. Signed-off-by: Eli Cohen Message-Id: <20220714113927.85729-2-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/mlx5/net/mlx5_vnet.c | 83 ++++++++++++++++++++++++++++++++++++-- include/linux/mlx5/mlx5_ifc_vdpa.h | 8 ++++ 2 files changed, 88 insertions(+), 3 deletions(-) commit ad146355bfad627bd0717ece73997c6c93b1b82e Author: Xie Yongji Date: Wed Aug 3 12:55:23 2022 +0800 vduse: Support querying information of IOVA regions This introduces a new ioctl: VDUSE_IOTLB_GET_INFO to support querying some information of IOVA regions. Now it can be used to query whether the IOVA region supports userspace memory registration. Signed-off-by: Xie Yongji Message-Id: <20220803045523.23851-6-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/vdpa/vdpa_user/vduse_dev.c | 39 ++++++++++++++++++++++++++++++++++++++ include/uapi/linux/vduse.h | 24 +++++++++++++++++++++++ 2 files changed, 63 insertions(+) commit 79a463be9e0051997508d52cf411ed5e91d657f6 Author: Xie Yongji Date: Wed Aug 3 12:55:22 2022 +0800 vduse: Support registering userspace memory for IOVA regions Introduce two ioctls: VDUSE_IOTLB_REG_UMEM and VDUSE_IOTLB_DEREG_UMEM to support registering and de-registering userspace memory for IOVA regions. Now it only supports registering userspace memory for bounce buffer region in virtio-vdpa case. Signed-off-by: Xie Yongji Acked-by: Jason Wang Message-Id: <20220803045523.23851-5-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/vdpa_user/vduse_dev.c | 141 +++++++++++++++++++++++++++++++++++++ include/uapi/linux/vduse.h | 23 ++++++ 2 files changed, 164 insertions(+) commit 6c77ed22880d3e8ae91b1d2cce26dbd6c69f38b7 Author: Xie Yongji Date: Wed Aug 3 12:55:21 2022 +0800 vduse: Support using userspace pages as bounce buffer Introduce two APIs: vduse_domain_add_user_bounce_pages() and vduse_domain_remove_user_bounce_pages() to support adding and removing userspace pages for bounce buffers. During adding and removing, the DMA data would be copied from the kernel bounce pages to the userspace bounce pages and back. Signed-off-by: Xie Yongji Acked-by: Jason Wang Message-Id: <20220803045523.23851-4-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/vdpa_user/iova_domain.c | 96 +++++++++++++++++++++++++++++++++--- drivers/vdpa/vdpa_user/iova_domain.h | 8 +++ 2 files changed, 96 insertions(+), 8 deletions(-) commit 82eb46f94ae5faa87ace248d950292c87384a097 Author: Xie Yongji Date: Wed Aug 3 12:55:20 2022 +0800 vduse: Use memcpy_{to,from}_page() in do_bounce() kmap_atomic() is being deprecated in favor of kmap_local_page(). The use of kmap_atomic() in do_bounce() is all thread local therefore kmap_local_page() is a sufficient replacement. Convert to kmap_local_page() but, instead of open coding it, use the helpers memcpy_to_page() and memcpy_from_page(). Signed-off-by: Xie Yongji Acked-by: Jason Wang Reviewed-by: Muchun Song Message-Id: <20220803045523.23851-3-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/vdpa_user/iova_domain.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit c32ee693125aa19a021dad32abbd49f5c6f70031 Author: Xie Yongji Date: Wed Aug 3 12:55:19 2022 +0800 vduse: Remove unnecessary spin lock protection Now we use domain->iotlb_lock to protect two different variables: domain->bounce_maps->bounce_page and domain->iotlb. But for domain->bounce_maps->bounce_page, we actually don't need any synchronization between vduse_domain_get_bounce_page() and vduse_domain_free_bounce_pages() since vduse_domain_get_bounce_page() will only be called in page fault handler and vduse_domain_free_bounce_pages() will be called during file release. So let's remove the unnecessary spin lock protection in vduse_domain_get_bounce_page(). Then the usage of domain->iotlb_lock could be more clear: the lock will be only used to protect the domain->iotlb. Signed-off-by: Xie Yongji Acked-by: Jason Wang Message-Id: <20220803045523.23851-2-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/vdpa_user/iova_domain.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 699b045a8e43bd1063db4795be685bfd659649dc Author: Alvaro Karsz Date: Mon Jul 18 12:11:02 2022 +0300 net: virtio_net: notifications coalescing support New VirtIO network feature: VIRTIO_NET_F_NOTF_COAL. Control a Virtio network device notifications coalescing parameters using the control virtqueue. A device that supports this fetature can receive VIRTIO_NET_CTRL_NOTF_COAL control commands. - VIRTIO_NET_CTRL_NOTF_COAL_TX_SET: Ask the network device to change the following parameters: - tx_usecs: Maximum number of usecs to delay a TX notification. - tx_max_packets: Maximum number of packets to send before a TX notification. - VIRTIO_NET_CTRL_NOTF_COAL_RX_SET: Ask the network device to change the following parameters: - rx_usecs: Maximum number of usecs to delay a RX notification. - rx_max_packets: Maximum number of packets to receive before a RX notification. VirtIO spec. patch: https://lists.oasis-open.org/archives/virtio-comment/202206/msg00100.html Signed-off-by: Alvaro Karsz Message-Id: <20220718091102.498774-1-alvaro.karsz@solid-run.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Jakub Kicinski Acked-by: Jason Wang drivers/net/virtio_net.c | 111 ++++++++++++++++++++++++++++++++++------ include/uapi/linux/virtio_net.h | 34 +++++++++++- 2 files changed, 129 insertions(+), 16 deletions(-) commit 95bf9798779af166b1d6d184d794834214a1a261 Author: Bo Liu Date: Wed Jul 6 23:17:51 2022 -0400 virtio: Check dev_set_name() return value It's possible that dev_set_name() returns -ENOMEM, catch and handle this. Signed-off-by: Bo Liu Message-Id: <20220707031751.4802-1-liubo03@inspur.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/virtio/virtio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d650f830f38b19039958f3f4504ceeb2b5922da7 Author: Stefano Garzarella Date: Tue Jul 5 09:22:49 2022 +0200 tools/virtio: fix build Fix the build caused by the following changes: - phys_addr_t is now defined in tools/include/linux/types.h - dev_warn_once() is used in drivers/virtio/virtio_ring.c - linux/uio.h included by vringh.h use INT_MAX defined in limits.h Signed-off-by: Stefano Garzarella Message-Id: <20220705072249.7867-1-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin Acked-by: Eugenio Pérez Signed-off-by: Peng Fan Acked-by: Jason Wang tools/virtio/linux/kernel.h | 2 +- tools/virtio/linux/vringh.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 994cea53183c211f218d5dbe14ab634f5762f068 Author: Colin Ian King Date: Mon Jul 4 20:04:56 2022 +0100 vDPA/ifcvf: remove duplicated assignment to pointer cfg The assignment to pointer cfg is duplicated, the second assignment is redundant and can be removed. Signed-off-by: Colin Ian King Message-Id: <20220704190456.593464-1-colin.i.king@gmail.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/vdpa/ifcvf/ifcvf_base.c | 1 - 1 file changed, 1 deletion(-) commit 6e33fa094f1f5a96140cc2439b17f4f3ef9e4a9d Author: Zhang Jiaming Date: Mon Jul 4 10:41:04 2022 +0800 vdpa: ifcvf: Fix spelling mistake in comments There is a typo(does't) in comments. It maybe 'doesn't' instead of 'does't'. Signed-off-by: Zhang Jiaming Message-Id: <20220704024104.15535-1-jiaming@nfschina.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/vdpa/ifcvf/ifcvf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71aa95a69c765bd0ec1c6d9d6263e6fefa1f5072 Author: Xu Qiang Date: Mon Jul 4 02:14:05 2022 +0000 vdpa/mlx5: Use eth_broadcast_addr() to assign broadcast address Using eth_broadcast_addr() to assign broadcast address instead of memset(). Reported-by: Hulk Robot Signed-off-by: Xu Qiang Message-Id: <20220704021405.64545-1-xuqiang36@huawei.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67f8f10c0bd78c4a0f0e983e050ab90da015323b Author: Stefano Garzarella Date: Tue Jun 21 17:12:08 2022 +0200 vdpa_sim: use max_iotlb_entries as a limit in vhost_iotlb_init Commit bda324fd037a ("vdpasim: control virtqueue support") changed the allocation of iotlbs calling vhost_iotlb_init() for each address space, instead of vhost_iotlb_alloc(). With this change we forgot to use the limit we had introduced with the `max_iotlb_entries` module parameter. Fixes: bda324fd037a ("vdpasim: control virtqueue support") Cc: gautam.dawar@xilinx.com Signed-off-by: Stefano Garzarella Message-Id: <20220621151208.189959-1-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin Acked-by: Eugenio Pérez drivers/vdpa/vdpa_sim/vdpa_sim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 19cd4a5471b8eaa4bd161b0fdb4567f2fc88d809 Author: Stefano Garzarella Date: Tue Jun 21 17:13:23 2022 +0200 vdpa_sim_blk: set number of address spaces and virtqueue groups Commit bda324fd037a ("vdpasim: control virtqueue support") added two new fields (nas, ngroups) to vdpasim_dev_attr, but we forgot to initialize them for vdpa_sim_blk. When creating a new vdpa_sim_blk device this causes the kernel to panic in this way:    $ vdpa dev add mgmtdev vdpasim_blk name blk0    BUG: kernel NULL pointer dereference, address: 0000000000000030    ...    RIP: 0010:vhost_iotlb_add_range_ctx+0x41/0x220 [vhost_iotlb]    ...    Call Trace:         vhost_iotlb_add_range+0x11/0x800 [vhost_iotlb]     vdpasim_map_range+0x91/0xd0 [vdpa_sim]     vdpasim_alloc_coherent+0x56/0x90 [vdpa_sim]     ... This happens because vdpasim->iommu[0] is not initialized when dev_attr.nas is 0. Let's fix this issue by initializing both (nas, ngroups) to 1 for vdpa_sim_blk. Fixes: bda324fd037a ("vdpasim: control virtqueue support") Cc: gautam.dawar@xilinx.com Signed-off-by: Stefano Garzarella Message-Id: <20220621151323.190431-1-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin Acked-by: Eugenio Pérez drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8472019eec2ccff60144d8585367b2856a59416e Author: Stefano Garzarella Date: Thu Jun 30 17:32:21 2022 +0200 vdpa_sim_blk: call vringh_complete_iotlb() also in the error path Call vringh_complete_iotlb() even when we encounter a serious error that prevents us from writing the status in the "in" header (e.g. the header length is incorrect, etc.). The guest is misbehaving, so maybe the ring is in a bad state, but let's avoid making things worse. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Message-Id: <20220630153221.83371-4-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 9c4df0900f376f28e8e5cca640a10a0085f16b66 Author: Stefano Garzarella Date: Thu Jun 30 17:32:20 2022 +0200 vdpa_sim_blk: limit the number of request handled per batch Limit the number of requests (4 per queue as for vdpa_sim_net) handled in a batch to prevent the worker from using the CPU for too long. Suggested-by: Eugenio Pérez Signed-off-by: Stefano Garzarella Message-Id: <20220630153221.83371-3-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 42a84c09eff355d895723866b1a5ff48f093112a Author: Stefano Garzarella Date: Thu Jun 30 17:32:19 2022 +0200 vdpa_sim_blk: use dev_dbg() to print errors Use dev_dbg() instead of dev_err()/dev_warn() to avoid flooding the host with prints, when the guest driver is misbehaving. In this way, prints can be dynamically enabled when the vDPA block simulator is used to validate a driver. Suggested-by: Jason Wang Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Message-Id: <20220630153221.83371-2-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit a335b33f4f354c5b77a79d505708f6d2f486ceab Author: Xuan Zhuo Date: Mon Aug 1 14:39:02 2022 +0800 virtio_net: support set_ringparam Support set_ringparam based on virtio queue reset. Users can use ethtool -G eth0 to modify the ring size of virtio-net. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-43-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit ebcce492636506443e4361db6587e6acd1a624f9 Author: Xuan Zhuo Date: Mon Aug 1 14:39:01 2022 +0800 virtio_net: support tx queue resize This patch implements the resize function of the tx queues. Based on this function, it is possible to modify the ring num of the queue. Inludes fixup: virtio_net: fix for stuck when change tx ring size with dev down When dev is set to DOWN state, napi has been disabled, if we modify the ring size at this time, we should not call napi_disable() again, which will cause stuck. And all operations are under the protection of rtnl_lock, so there is no need to consider concurrency issues. Message-Id: <20220801063902.129329-42-xuanzhuo@linux.alibaba.com> Acked-by: Jason Wang Message-Id: <20220811080258.79398-3-xuanzhuo@linux.alibaba.com> Reported-by: Kangjie Xu Signed-off-by: Xuan Zhuo Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 6a4763e268030362340bc3286560d44be15a7421 Author: Xuan Zhuo Date: Mon Aug 1 14:39:00 2022 +0800 virtio_net: support rx queue resize This patch implements the resize function of the rx queues. Based on this function, it is possible to modify the ring num of the queue. Includes fixup: virtio_net: fix for stuck when change rx ring size with dev down When dev is set to DOWN state, napi has been disabled, if we modify the ring size at this time, we should not call napi_disable() again, which will cause stuck. And all operations are under the protection of rtnl_lock, so there is no need to consider concurrency issues. Message-Id: <20220801063902.129329-41-xuanzhuo@linux.alibaba.com> Acked-by: Jason Wang Message-Id: <20220811080258.79398-2-xuanzhuo@linux.alibaba.com> Reported-by: Kangjie Xu Signed-off-by: Xuan Zhuo Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 6e345f8c7cd029ad3aaece15ad4425ac26e4eb63 Author: Xuan Zhuo Date: Mon Aug 1 14:38:59 2022 +0800 virtio_net: split free_unused_bufs() This patch separates two functions for freeing sq buf and rq buf from free_unused_bufs(). When supporting the enable/disable tx/rq queue in the future, it is necessary to support separate recovery of a sq buf or a rq buf. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-40-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) commit 8597b5ddcbba840ab852e1083f1a8dd1c6d41d1b Author: Xuan Zhuo Date: Mon Aug 1 14:38:58 2022 +0800 virtio_net: get ringparam by virtqueue_get_vring_max_size() Use virtqueue_get_vring_max_size() in virtnet_get_ringparam() to set tx,rx_max_pending. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-39-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 762faee5a2678559d3dc09d95f8f2c54cd0466a7 Author: Xuan Zhuo Date: Mon Aug 1 14:38:57 2022 +0800 virtio_net: set the default max ring size by find_vqs() Use virtio_find_vqs_ctx_size() to specify the maximum ring size of tx, rx at the same time. | rx/tx ring size ------------------------------------------- speed == UNKNOWN or < 10G| 1024 speed < 40G | 4096 speed >= 40G | 8192 Call virtnet_update_settings() once before calling init_vqs() to update speed. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-38-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) commit fe3dc04e31aa51f91dc7f741a5f76cc4817eb5b4 Author: Xuan Zhuo Date: Mon Aug 1 14:38:56 2022 +0800 virtio: add helper virtio_find_vqs_ctx_size() Introduce helper virtio_find_vqs_ctx_size() to call find_vqs and specify the maximum size of each vq ring. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-37-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin include/linux/virtio_config.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit fbed86abba6e0472d98079790e58060e4332608a Author: Xuan Zhuo Date: Mon Aug 1 14:38:55 2022 +0800 virtio_mmio: support the arg sizes of find_vqs() Virtio MMIO support the new parameter sizes of find_vqs(). Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-36-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_mmio.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit cdb44806fca2d0ad29ca644cbf1505433902ee0c Author: Xuan Zhuo Date: Mon Aug 1 14:38:54 2022 +0800 virtio_pci: support the arg sizes of find_vqs() Virtio PCI supports new parameter sizes of find_vqs(). Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-35-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_common.c | 18 ++++++++++-------- drivers/virtio/virtio_pci_common.h | 1 + drivers/virtio/virtio_pci_legacy.c | 6 +++++- drivers/virtio/virtio_pci_modern.c | 10 +++++++--- 4 files changed, 23 insertions(+), 12 deletions(-) commit a10fba0377145fccefea4dc4dd5915b7ed87e546 Author: Xuan Zhuo Date: Mon Aug 1 14:38:53 2022 +0800 virtio: find_vqs() add arg sizes find_vqs() adds a new parameter sizes to specify the size of each vq vring. NULL as sizes means that all queues in find_vqs() use the maximum size. A value in the array is 0, which means that the corresponding queue uses the maximum size. In the split scenario, the meaning of size is the largest size, because it may be limited by memory, the virtio core will try a smaller size. And the size is power of 2. Signed-off-by: Xuan Zhuo Acked-by: Hans de Goede Reviewed-by: Mathieu Poirier Acked-by: Jason Wang Message-Id: <20220801063902.129329-34-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin arch/um/drivers/virtio_uml.c | 2 +- drivers/platform/mellanox/mlxbf-tmfifo.c | 1 + drivers/remoteproc/remoteproc_virtio.c | 1 + drivers/s390/virtio/virtio_ccw.c | 1 + drivers/virtio/virtio_mmio.c | 1 + drivers/virtio/virtio_pci_common.c | 2 +- drivers/virtio/virtio_pci_common.h | 2 +- drivers/virtio/virtio_pci_modern.c | 7 +++++-- drivers/virtio/virtio_vdpa.c | 1 + include/linux/virtio_config.h | 14 +++++++++----- 10 files changed, 22 insertions(+), 10 deletions(-) commit 04ca0b0b16f11faf74fa92468dab51b8372586cd Author: Xuan Zhuo Date: Mon Aug 1 14:38:52 2022 +0800 virtio_pci: support VIRTIO_F_RING_RESET This patch implements virtio pci support for QUEUE RESET. Performing reset on a queue is divided into these steps: 1. notify the device to reset the queue 2. recycle the buffer submitted 3. reset the vring (may re-alloc) 4. mmap vring to device, and enable the queue This patch implements virtio_reset_vq(), virtio_enable_resetq() in the pci scenario. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-33-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_common.c | 12 ++++-- drivers/virtio/virtio_pci_modern.c | 88 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 3 deletions(-) commit 56bdc06139404b3b06ed75ec99b93445d7e0b8c3 Author: Xuan Zhuo Date: Mon Aug 1 14:38:51 2022 +0800 virtio_pci: extract the logic of active vq for modern pci Introduce vp_active_vq() to configure vring to backend after vq attach vring. And configure vq vector if necessary. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-32-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_modern.c | 46 +++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 18 deletions(-) commit 0b50cece0b7857732d2055f2c77f8730c10f9196 Author: Xuan Zhuo Date: Mon Aug 1 14:38:50 2022 +0800 virtio_pci: introduce helper to get/set queue reset Introduce new helpers to implement queue reset and get queue reset status. https://github.com/oasis-tcs/virtio-spec/issues/124 https://github.com/oasis-tcs/virtio-spec/issues/139 Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-31-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_modern_dev.c | 39 ++++++++++++++++++++++++++++++++++ include/linux/virtio_pci_modern.h | 2 ++ 2 files changed, 41 insertions(+) commit 0cdd450e70510c9e13af8099e9f6c1467e6a0b91 Author: Xuan Zhuo Date: Mon Aug 1 14:38:49 2022 +0800 virtio_pci: struct virtio_pci_common_cfg add queue_reset Add queue_reset in virtio_pci_modern_common_cfg. https://github.com/oasis-tcs/virtio-spec/issues/124 https://github.com/oasis-tcs/virtio-spec/issues/139 Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-30-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin include/linux/virtio_pci_modern.h | 2 +- include/uapi/linux/virtio_pci.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 4913e85441b40386c4bb093f188b955d8165f1b7 Author: Xuan Zhuo Date: Mon Aug 1 14:38:48 2022 +0800 virtio_ring: struct virtqueue introduce reset Introduce a new member reset to the structure virtqueue to determine whether the current vq is in the reset state. Subsequent patches will use it. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-29-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 2 ++ include/linux/virtio.h | 2 ++ 2 files changed, 4 insertions(+) commit d94587b5bb5c4bba32fbc2bd92c86cc6de25167f Author: Xuan Zhuo Date: Mon Aug 1 14:38:47 2022 +0800 virtio: queue_reset: add VIRTIO_F_RING_RESET Added VIRTIO_F_RING_RESET, it came from here https://github.com/oasis-tcs/virtio-spec/issues/124 https://github.com/oasis-tcs/virtio-spec/issues/139 This feature indicates that the driver can reset a queue individually. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-28-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin include/uapi/linux/virtio_config.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3251063155032729b8793ac3957136ae25c0bafa Author: Xuan Zhuo Date: Mon Aug 1 14:38:46 2022 +0800 virtio: allow to unbreak/break virtqueue individually This patch allows the new introduced __virtqueue_break()/__virtqueue_unbreak() to break/unbreak the virtqueue. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-27-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 24 ++++++++++++++++++++++++ include/linux/virtio.h | 3 +++ 2 files changed, 27 insertions(+) commit ea024594b1dc5b6719c1400ae154690f5c203996 Author: Xuan Zhuo Date: Mon Aug 1 14:38:45 2022 +0800 virtio_pci: struct virtio_pci_common_cfg add queue_notify_data Add queue_notify_data in struct virtio_pci_common_cfg, which comes from here https://github.com/oasis-tcs/virtio-spec/issues/89 In order not to affect the API, add a dedicated structure struct virtio_pci_modern_common_cfg to virtio_pci_modern.h. Since I want to add queue_reset after queue_notify_data, I submitted this patch first. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-26-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin include/linux/virtio_pci_modern.h | 7 +++++++ include/uapi/linux/virtio_pci.h | 1 + 2 files changed, 8 insertions(+) commit c790e8e1817f1a17c05e64f1c4f16f231b8529d5 Author: Xuan Zhuo Date: Mon Aug 1 14:38:44 2022 +0800 virtio_ring: introduce virtqueue_resize() Introduce virtqueue_resize() to implement the resize of vring. Based on these, the driver can dynamically adjust the size of the vring. For example: ethtool -G. virtqueue_resize() implements resize based on the vq reset function. In case of failure to allocate a new vring, it will give up resize and use the original vring. During this process, if the re-enable reset vq fails, the vq can no longer be used. Although the probability of this situation is not high. The parameter recycle is used to recycle the buffer that is no longer used. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-25-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 69 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/virtio.h | 3 ++ 2 files changed, 72 insertions(+) commit 947f9fcf674f8f3f09e01dfb5d8e564650875878 Author: Xuan Zhuo Date: Mon Aug 1 14:38:43 2022 +0800 virtio_ring: packed: introduce virtqueue_resize_packed() virtio ring packed supports resize. Only after the new vring is successfully allocated based on the new num, we will release the old vring. In any case, an error is returned, indicating that the vring still points to the old vring. In the case of an error, re-initialize(by virtqueue_reinit_packed()) the virtqueue to ensure that the vring can be used. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-24-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 56775e141b18790f70e05537f3a1417565e766ac Author: Xuan Zhuo Date: Mon Aug 1 14:38:42 2022 +0800 virtio_ring: packed: introduce virtqueue_reinit_packed() Introduce a function to initialize vq without allocating new ring, desc_state, desc_extra. Subsequent patches will call this function after reset vq to reinitialize vq. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-23-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 51d649f14aae0986c62cf798b262f99b49836e88 Author: Xuan Zhuo Date: Mon Aug 1 14:38:41 2022 +0800 virtio_ring: packed: extract the logic of attach vring Separate the logic of attach vring, the subsequent patch will call it separately. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-22-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 1a107c87ebcf04ede1b86e5de192df34b6e50bd7 Author: Xuan Zhuo Date: Mon Aug 1 14:38:40 2022 +0800 virtio_ring: packed: extract the logic of vring init Separate the logic of initializing vring, and subsequent patches will call it separately. This function completes the variable initialization of packed vring. It together with the logic of atatch constitutes the initialization of vring. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-21-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit ef3167cfd5f28bc86d68e82fc52d07ed03dff2f7 Author: Xuan Zhuo Date: Mon Aug 1 14:38:39 2022 +0800 virtio_ring: packed: extract the logic of alloc state and extra Separate the logic for alloc desc_state and desc_extra, which will be called separately by subsequent patches. Use struct vring_packed to pass desc_state, desc_extra. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-20-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 48 +++++++++++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 14 deletions(-) commit 6b60b9c008e56e43cdda6ae618f7f58679a8901a Author: Xuan Zhuo Date: Mon Aug 1 14:38:38 2022 +0800 virtio_ring: packed: extract the logic of alloc queue Separate the logic of packed to create vring queue. This feature is required for subsequent virtuqueue reset vring. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-19-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 80 ++++++++++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 29 deletions(-) commit 6356f8bb01ddf4a6d9f2da16f7c0e3c093c7f548 Author: Xuan Zhuo Date: Mon Aug 1 14:38:37 2022 +0800 virtio_ring: packed: introduce vring_free_packed Free the structure struct vring_vritqueue_packed. Subsequent patches require it. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-18-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 6fea20e5611fc5c8264f04a878a98c06b6209eed Author: Xuan Zhuo Date: Mon Aug 1 14:38:36 2022 +0800 virtio_ring: split: introduce virtqueue_resize_split() virtio ring split supports resize. Only after the new vring is successfully allocated based on the new num, we will release the old vring. In any case, an error is returned, indicating that the vring still points to the old vring. In the case of an error, re-initialize(virtqueue_reinit_split()) the virtqueue to ensure that the vring can be used. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-17-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit af36b16f6c1e51975a3815eb21c21c47f3114393 Author: Xuan Zhuo Date: Mon Aug 1 14:38:35 2022 +0800 virtio_ring: split: reserve vring_align, may_reduce_num In vring_alloc_queue_split() save vring_align, may_reduce_num to structure vring_virtqueue_split. Used to create a new vring when implementing resize. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-16-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e5175b419a1394e77ff418dd9bfaf15555dfe594 Author: Xuan Zhuo Date: Mon Aug 1 14:38:34 2022 +0800 virtio_ring: split: introduce virtqueue_reinit_split() Introduce a function to initialize vq without allocating new ring, desc_state, desc_extra. Subsequent patches will call this function after reset vq to reinitialize vq. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-15-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit e1d6a423ea1867a3a84f12a99981f036acb8f354 Author: Xuan Zhuo Date: Mon Aug 1 14:38:33 2022 +0800 virtio_ring: split: extract the logic of attach vring Separate the logic of attach vring, subsequent patches will call it separately. virtqueue_vring_init_split() completes the initialization of other variables of vring split. We can directly use vq->split = *vring_split to complete attach. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-14-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit 198fa7be96e52bc89c9e8a7e1c3b9e059ff203a0 Author: Xuan Zhuo Date: Mon Aug 1 14:38:32 2022 +0800 virtio_ring: split: extract the logic of vring init Separate the logic of initializing vring, and subsequent patches will call it separately. This function completes the variable initialization of split vring. It together with the logic of atatch constitutes the initialization of vring. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-13-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit a2b36c8d7ddbaff801bcaa4592522cd3b7b08112 Author: Xuan Zhuo Date: Mon Aug 1 14:38:31 2022 +0800 virtio_ring: split: extract the logic of alloc state and extra Separate the logic of creating desc_state, desc_extra, and subsequent patches will call it independently. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-12-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 52 ++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 16 deletions(-) commit c2d87fe68d13f45f42861e25dcda21b132dbf554 Author: Xuan Zhuo Date: Mon Aug 1 14:38:30 2022 +0800 virtio_ring: split: extract the logic of alloc queue Separate the logic of split to create vring queue. This feature is required for subsequent virtuqueue reset vring. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-11-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 65 +++++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 25 deletions(-) commit 89f05d94a33abec2d38f644065ca5cff5f50c4d7 Author: Xuan Zhuo Date: Mon Aug 1 14:38:29 2022 +0800 virtio_ring: split: introduce vring_free_split() Free the structure struct vring_vritqueue_split. Subsequent patches require it. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-10-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit cd4c812acb8390a3cfa0a178b777979f9cdd3eeb Author: Xuan Zhuo Date: Mon Aug 1 14:38:28 2022 +0800 virtio_ring: split: __vring_new_virtqueue() accept struct vring_virtqueue_split __vring_new_virtqueue() instead accepts struct vring_virtqueue_split. The purpose of this is to pass more information into __vring_new_virtqueue() to make the code simpler and the structure cleaner. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-9-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit 07d9629d49584b6f79faa6158cd7aef7e6919703 Author: Xuan Zhuo Date: Mon Aug 1 14:38:27 2022 +0800 virtio_ring: split: stop __vring_new_virtqueue as export symbol There is currently only one place to reference __vring_new_virtqueue() directly from the outside of virtio core. And here vring_new_virtqueue() can be used instead. Subsequent patches will modify __vring_new_virtqueue, so stop it as an export symbol for now. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-8-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 25 ++++++++++++++++--------- include/linux/virtio_ring.h | 10 ---------- tools/virtio/virtio_test.c | 4 ++-- 3 files changed, 18 insertions(+), 21 deletions(-) commit 3a897128d3193459a87551e54a7f0a71edb65153 Author: Xuan Zhuo Date: Mon Aug 1 14:38:26 2022 +0800 virtio_ring: introduce virtqueue_init() Separate the logic of virtqueue initialization. These variables should be reset during reset. This logic can be called independently when implementing resize/reset later. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-7-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) commit d76136e434973691d8928cec1b3f93d38e30fe6e Author: Xuan Zhuo Date: Mon Aug 1 14:38:25 2022 +0800 virtio_ring: split vring_virtqueue Separate the two inline structures(split and packed) from the structure vring_virtqueue. In this way, we can use these two structures later to pass parameters and retain temporary variables. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-6-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 116 ++++++++++++++++++++++--------------------- 1 file changed, 60 insertions(+), 56 deletions(-) commit 3ea19e3265d8d140bdd2905e7c40216368cac589 Author: Xuan Zhuo Date: Mon Aug 1 14:38:24 2022 +0800 virtio_ring: extract the logic of freeing vring Introduce vring_free() to free the vring of vq. Subsequent patches will use vring_free() alone. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-5-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit a62eecb3a9c086fa7b47c5cc74ab8ca4e655a682 Author: Xuan Zhuo Date: Mon Aug 1 14:38:23 2022 +0800 virtio_ring: update the document of the virtqueue_detach_unused_buf for queue reset Added documentation for virtqueue_detach_unused_buf, allowing it to be called on queue reset. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-4-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3086e9fc9173166774652a488467e4176ee1c81b Author: Xuan Zhuo Date: Mon Aug 1 14:38:22 2022 +0800 virtio: struct virtio_config_ops add callbacks for queue_reset reset can be divided into the following four steps (example): 1. transport: notify the device to reset the queue 2. vring: recycle the buffer submitted 3. vring: reset/resize the vring (may re-alloc) 4. transport: mmap vring to device, and enable the queue In order to support queue reset, add two callbacks in struct virtio_config_ops to implement steps 1 and 4. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-3-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin include/linux/virtio_config.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit da802961832f9852886304290135457519815497 Author: Xuan Zhuo Date: Mon Aug 1 14:38:21 2022 +0800 virtio: record the maximum queue num supported by the device. virtio-net can display the maximum (supported by hardware) ring size in ethtool -g eth0. When the subsequent patch implements vring reset, it can judge whether the ring size passed by the driver is legal based on this. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220801063902.129329-2-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin arch/um/drivers/virtio_uml.c | 1 + drivers/platform/mellanox/mlxbf-tmfifo.c | 2 ++ drivers/remoteproc/remoteproc_virtio.c | 2 ++ drivers/s390/virtio/virtio_ccw.c | 3 +++ drivers/virtio/virtio_mmio.c | 2 ++ drivers/virtio/virtio_pci_legacy.c | 2 ++ drivers/virtio/virtio_pci_modern.c | 2 ++ drivers/virtio/virtio_vdpa.c | 2 ++ include/linux/virtio.h | 2 ++ 9 files changed, 18 insertions(+) commit 0b6fd46ec5f5720b76cbb01300ed9f7b7c6365c4 Author: David Hildenbrand Date: Fri Jun 10 11:47:37 2022 +0200 drivers/virtio: Clarify CONFIG_VIRTIO_MEM for unsupported architectures Let's make it clearer that simply unlocking CONFIG_VIRTIO_MEM on an architecture is most probably not sufficient to have it working as expected. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Gavin Shan Signed-off-by: David Hildenbrand Message-Id: <20220610094737.65254-1-david@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/Kconfig | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 02213273f72a43bad3a8e9c18595a2c74ee487e8 Author: Minghao Xue Date: Fri Jun 10 16:58:27 2022 +0800 virtio_mmio: add support to set IRQ of a virtio device as wakeup source According to virtio_mmio wakeup flag in device trees, set its IRQ as wakeup source in virtqueue initialization. Signed-off-by: Minghao Xue Message-Id: <1654851507-13891-3-git-send-email-quic_mingxue@quicinc.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_mmio.c | 3 +++ 1 file changed, 3 insertions(+) commit 51ded7cdf26deea7dd875047c2f005b81e80bdf4 Author: Minghao Xue Date: Fri Jun 10 16:58:26 2022 +0800 dt-bindings: virtio: mmio: add optional wakeup-source property Some systems want to set the interrupt of virtio_mmio device as a wakeup source. On such systems, we'll use the existence of the "wakeup-source" property as a signal of requirement. Signed-off-by: Minghao Xue Reviewed-by: Krzysztof Kozlowski Message-Id: <1654851507-13891-2-git-send-email-quic_mingxue@quicinc.com> Signed-off-by: Michael S. Tsirkin Documentation/devicetree/bindings/virtio/mmio.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 366958a7fd7b541cba478e2866ef08f34e20471b Author: Robin Murphy Date: Wed Jun 8 12:48:26 2022 +0100 vdpa: Use device_iommu_capable() Use the new interface to check the capability for our device specifically. Signed-off-by: Robin Murphy Message-Id: <548e316fa282ce513fabb991a4c4d92258062eb5.1654688822.git.robin.murphy@arm.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/vhost/vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebe797f25f68f28581f46a9cb9c1997ac15c39a0 Author: Michael S. Tsirkin Date: Thu Jun 30 15:10:57 2022 -0400 virtio: VIRTIO_HARDEN_NOTIFICATION is broken This option doesn't really work and breaks too many drivers. Not yet sure what's the right thing to do, for now let's make sure randconfig isn't broken by this. Fixes: c346dae4f3fb ("virtio: disable notification hardening by default") Cc: "Jason Wang" Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/virtio/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5d66322b2b23507e9907a68e9c504181ffccd62f Author: Jason Wang Date: Tue Jun 28 16:34:30 2022 +0800 virtio_pmem: set device ready in probe() The NVDIMM region could be available before the virtio_device_ready() that is called by virtio_dev_probe(). This means the driver tries to use device before DRIVER_OK which violates the spec, fixing this by set device ready before the nvdimm_pmem_region_create(). Note that this means the virtio_pmem_host_ack() could be triggered before the creation of the nd region, this is safe since the pmem_lock has been initialized and whether or not any available buffer is added before is validated by virtio_pmem_host_ack(). Fixes 6e84200c0a29 ("virtio-pmem: Add virtio pmem driver") Acked-by: Pankaj Gupta Signed-off-by: Jason Wang Message-Id: <20220628083430.61856-2-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/nvdimm/virtio_pmem.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 020e1aede7ee31d8b0e24a46ee364c7bb0939f02 Author: Jason Wang Date: Tue Jun 28 16:34:29 2022 +0800 virtio_pmem: initialize provider_data through nd_region_desc We used to initialize the provider_data manually after nvdimm_pemm_region_create(). This seems to be racy if the flush is issued before the initialization of provider_data[1]. Fixing this by initializing the provider_data through nd_region_desc to make sure the provider_data is ready after the pmem is created. [1]: [ 80.152281] nd_pmem namespace0.0: unable to guarantee persistence of writes [ 92.393956] BUG: kernel NULL pointer dereference, address: 0000000000000318 [ 92.394551] #PF: supervisor read access in kernel mode [ 92.394955] #PF: error_code(0x0000) - not-present page [ 92.395365] PGD 0 P4D 0 [ 92.395566] Oops: 0000 [#1] PREEMPT SMP PTI [ 92.395867] CPU: 2 PID: 506 Comm: mkfs.ext4 Not tainted 5.19.0-rc1+ #453 [ 92.396365] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 [ 92.397178] RIP: 0010:virtio_pmem_flush+0x2f/0x1f0 [ 92.397521] Code: 55 41 54 55 53 48 81 ec a0 00 00 00 65 48 8b 04 25 28 00 00 00 48 89 84 24 98 00 00 00 31 c0 48 8b 87 78 03 00 00 48 89 04 24 <48> 8b 98 18 03 00 00 e8 85 bf 6b 00 ba 58 00 00 00 be c0 0c 00 00 [ 92.398982] RSP: 0018:ffff9a7380aefc88 EFLAGS: 00010246 [ 92.399349] RAX: 0000000000000000 RBX: ffff8e77c3f86f00 RCX: 0000000000000000 [ 92.399833] RDX: ffffffffad4ea720 RSI: ffff8e77c41e39c0 RDI: ffff8e77c41c5c00 [ 92.400388] RBP: ffff8e77c41e39c0 R08: ffff8e77c19f0600 R09: 0000000000000000 [ 92.400874] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8e77c0814e28 [ 92.401364] R13: 0000000000000000 R14: 0000000000000000 R15: ffff8e77c41e39c0 [ 92.401849] FS: 00007f3cd75b2780(0000) GS:ffff8e7937d00000(0000) knlGS:0000000000000000 [ 92.402423] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 92.402821] CR2: 0000000000000318 CR3: 0000000103c80002 CR4: 0000000000370ee0 [ 92.403307] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 92.403793] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 92.404278] Call Trace: [ 92.404481] [ 92.404654] ? mempool_alloc+0x5d/0x160 [ 92.404939] ? terminate_walk+0x5f/0xf0 [ 92.405226] ? bio_alloc_bioset+0xbb/0x3f0 [ 92.405525] async_pmem_flush+0x17/0x80 [ 92.405806] nvdimm_flush+0x11/0x30 [ 92.406067] pmem_submit_bio+0x1e9/0x200 [ 92.406354] __submit_bio+0x80/0x120 [ 92.406621] submit_bio_noacct_nocheck+0xdc/0x2a0 [ 92.406958] submit_bio_wait+0x4e/0x80 [ 92.407234] blkdev_issue_flush+0x31/0x50 [ 92.407526] ? punt_bios_to_rescuer+0x230/0x230 [ 92.407852] blkdev_fsync+0x1e/0x30 [ 92.408112] do_fsync+0x33/0x70 [ 92.408354] __x64_sys_fsync+0xb/0x10 [ 92.408625] do_syscall_64+0x43/0x90 [ 92.408895] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 92.409257] RIP: 0033:0x7f3cd76c6c44 Fixes 6e84200c0a29 ("virtio-pmem: Add virtio pmem driver") Acked-by: Pankaj Gupta Reviewed-by: Dan Williams Signed-off-by: Jason Wang Message-Id: <20220628083430.61856-1-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/nvdimm/virtio_pmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 309bba39c945ac8ab8083ac05cd6cfe5822968e0 Author: Stefano Garzarella Date: Fri Jun 24 09:56:56 2022 +0200 vringh: iterate on iotlb_translate to handle large translations iotlb_translate() can return -ENOBUFS if the bio_vec is not big enough to contain all the ranges for translation. This can happen for example if the VMM maps a large bounce buffer, without using hugepages, that requires more than 16 ranges to translate the addresses. To handle this case, let's extend iotlb_translate() to also return the number of bytes successfully translated. In copy_from_iotlb()/copy_to_iotlb() loops by calling iotlb_translate() several times until we complete the translation. Signed-off-by: Stefano Garzarella Message-Id: <20220624075656.13997-1-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/vhost/vringh.c | 78 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 22 deletions(-) commit 96ef18a24b87bef7c3d2dad72cf4c3013a9f7f35 Author: Xuan Zhuo Date: Fri Jun 24 10:55:45 2022 +0800 virtio_ring: remove the arg vq of vring_alloc_desc_extra() The parameter vq of vring_alloc_desc_extra() is useless. This patch removes this parameter. Subsequent patches will call this function to avoid passing useless arguments. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20220624025621.128843-6-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit c2a052a4a949df53f50a5024843432d2234cb824 Author: Xuan Zhuo Date: Fri Jun 24 10:55:41 2022 +0800 remoteproc: rename len of rpoc_vring to num Rename the member len in the structure rpoc_vring to num. And remove 'in bytes' from the comment of it. This is misleading. Because this actually refers to the size of the virtio vring to be created. The unit is not bytes. Signed-off-by: Xuan Zhuo Message-Id: <20220624025621.128843-2-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin drivers/remoteproc/remoteproc_core.c | 4 ++-- drivers/remoteproc/remoteproc_virtio.c | 10 +++++----- include/linux/remoteproc.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) commit 4e4588f1c4d2e67c993208f0550ef3fae33abce4 Author: Alexei Starovoitov Date: Wed Aug 10 23:52:28 2022 -0700 bpf: Shut up kern_sys_bpf warning. Shut up this warning: kernel/bpf/syscall.c:5089:5: warning: no previous prototype for function 'kern_sys_bpf' [-Wmissing-prototypes] int kern_sys_bpf(int cmd, union bpf_attr *attr, unsigned int size) Reported-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov kernel/bpf/syscall.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 19a7cc817a380f7a412d7d76e145e9e2bc47e52f Author: Bagas Sanjaya Date: Mon Jun 27 16:51:51 2022 +0700 KVM: x86/MMU: properly format KVM_CAP_VM_DISABLE_NX_HUGE_PAGES capability table There is unexpected warning on KVM_CAP_VM_DISABLE_NX_HUGE_PAGES capability table, which cause the table to be rendered as paragraph text instead. The warning is due to missing colon at capability name and returns keyword, as well as improper alignment on multi-line returns field. Fix the warning by adding missing colons and aligning the field. Link: https://lore.kernel.org/lkml/20220627181937.3be67263@canb.auug.org.au/ Fixes: 084cc29f8bbb03 ("KVM: x86/MMU: Allow NX huge pages to be disabled on a per-vm basis") Reported-by: Stephen Rothwell Cc: Paolo Bonzini Cc: Jonathan Corbet Cc: David Matlack Cc: Ben Gardon Cc: Peter Xu Cc: kvm@vger.kernel.org Cc: linux-next@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Bagas Sanjaya Message-Id: <20220627095151.19339-3-bagasdotme@gmail.com> Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b4aed4d85ff82848eab4637ee06f532852721bba Author: Bagas Sanjaya Date: Mon Jun 27 16:51:50 2022 +0700 Documentation: KVM: extend KVM_CAP_VM_DISABLE_NX_HUGE_PAGES heading underline Extend heading underline for KVM_CAP_VM_DISABLE_NX_HUGE_PAGE to match the heading text length. Link: https://lore.kernel.org/lkml/20220627181937.3be67263@canb.auug.org.au/ Fixes: 084cc29f8bbb03 ("KVM: x86/MMU: Allow NX huge pages to be disabled on a per-vm basis") Reported-by: Stephen Rothwell Cc: Paolo Bonzini Cc: Jonathan Corbet Cc: David Matlack Cc: Ben Gardon Cc: Peter Xu Cc: kvm@vger.kernel.org Cc: linux-next@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Bagas Sanjaya Message-Id: <20220627095151.19339-2-bagasdotme@gmail.com> Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4963d74f8a6cc0eafd71d9ffc13e3a11ff1dd160 Author: Atte Heikkilä Date: Tue Aug 9 01:02:14 2022 +0300 ksmbd: request update to stale share config ksmbd_share_config_get() retrieves the cached share config as long as there is at least one connection to the share. This is an issue when the user space utilities are used to update share configs. In that case there is a need to inform ksmbd that it should not use the cached share config for a new connection to the share. With these changes the tree connection flag KSMBD_TREE_CONN_FLAG_UPDATE indicates this. When this flag is set, ksmbd removes the share config from the shares hash table meaning that ksmbd_share_config_get() ends up requesting a share config from user space. Signed-off-by: Atte Heikkilä Acked-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/ksmbd_netlink.h | 2 ++ fs/ksmbd/mgmt/share_config.c | 6 +++++- fs/ksmbd/mgmt/share_config.h | 1 + fs/ksmbd/mgmt/tree_connect.c | 14 ++++++++++++++ fs/ksmbd/smb2pdu.c | 1 + 5 files changed, 23 insertions(+), 1 deletion(-) commit fe54833dc8d97ef387e86f7c80537d51c503ca75 Author: Namjae Jeon Date: Mon Aug 8 21:56:48 2022 +0900 ksmbd: return STATUS_BAD_NETWORK_NAME error status if share is not configured If share is not configured in smb.conf, smb2 tree connect should return STATUS_BAD_NETWORK_NAME instead of STATUS_BAD_NETWORK_PATH. Signed-off-by: Namjae Jeon Reviewed-by: Hyunchul Lee Signed-off-by: Steve French fs/ksmbd/mgmt/tree_connect.c | 2 +- fs/ksmbd/smb2pdu.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 94ce3b64c62d4b628cf85cd0d9a370aca8f7e43a Author: Maxim Mikityanskiy Date: Wed Aug 10 11:16:02 2022 +0300 net/tls: Use RCU API to access tls_ctx->netdev Currently, tls_device_down synchronizes with tls_device_resync_rx using RCU, however, the pointer to netdev is stored using WRITE_ONCE and loaded using READ_ONCE. Although such approach is technically correct (rcu_dereference is essentially a READ_ONCE, and rcu_assign_pointer uses WRITE_ONCE to store NULL), using special RCU helpers for pointers is more valid, as it includes additional checks and might change the implementation transparently to the callers. Mark the netdev pointer as __rcu and use the correct RCU helpers to access it. For non-concurrent access pass the right conditions that guarantee safe access (locks taken, refcount value). Also use the correct helper in mlx5e, where even READ_ONCE was missing. The transition to RCU exposes existing issues, fixed by this commit: 1. bond_tls_device_xmit could read netdev twice, and it could become NULL the second time, after the NULL check passed. 2. Drivers shouldn't stop processing the last packet if tls_device_down just set netdev to NULL, before tls_dev_del was called. This prevents a possible packet drop when transitioning to the fallback software mode. Fixes: 89df6a810470 ("net/bonding: Implement TLS TX device offload") Fixes: c55dcdd435aa ("net/tls: Fix use-after-free after the TLS device goes down and up") Signed-off-by: Maxim Mikityanskiy Link: https://lore.kernel.org/r/20220810081602.1435800-1-maximmi@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/bonding/bond_main.c | 10 ++++-- .../chelsio/inline_crypto/ch_ktls/chcr_ktls.c | 8 ++++- .../ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 8 ++++- include/net/tls.h | 2 +- net/tls/tls_device.c | 38 +++++++++++++++++----- net/tls/tls_device_fallback.c | 3 +- 6 files changed, 54 insertions(+), 15 deletions(-) commit d800a7b3577bfb783481b02865d8775a760212a7 Author: Jakub Kicinski Date: Tue Aug 9 10:55:44 2022 -0700 tls: rx: device: don't try to copy too much on detach Another device offload bug, we use the length of the output skb as an indication of how much data to copy. But that skb is sized to offset + record length, and we start from offset. So we end up double-counting the offset which leads to skb_copy_bits() returning -EFAULT. Reported-by: Tariq Toukan Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser") Tested-by: Ran Rozenstein Link: https://lore.kernel.org/r/20220809175544.354343-2-kuba@kernel.org Signed-off-by: Jakub Kicinski net/tls/tls_strp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86b259f6f8880237899fbf4f940303b3987dffa9 Author: Jakub Kicinski Date: Tue Aug 9 10:55:43 2022 -0700 tls: rx: device: bound the frag walk We can't do skb_walk_frags() on the input skbs, because the input skbs is really just a pointer to the tcp read queue. We need to bound the "is decrypted" check by the amount of data in the message. Note that the walk in tls_device_reencrypt() is after a CoW so the skb there is safe to walk. Actually in the current implementation it can't have frags at all, but whatever, maybe one day it will. Reported-by: Tariq Toukan Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser") Tested-by: Ran Rozenstein Link: https://lore.kernel.org/r/20220809175544.354343-1-kuba@kernel.org Signed-off-by: Jakub Kicinski net/tls/tls_device.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 9ad36309e2719a884f946678e0296be10f0bb4c1 Author: Thadeu Lima de Souza Cascardo Date: Tue Aug 9 14:05:18 2022 -0300 net_sched: cls_route: remove from list when handle is 0 When a route filter is replaced and the old filter has a 0 handle, the old one won't be removed from the hashtable, while it will still be freed. The test was there since before commit 1109c00547fc ("net: sched: RCU cls_route"), when a new filter was not allocated when there was an old one. The old filter was reused and the reinserting would only be necessary if an old filter was replaced. That was still wrong for the same case where the old handle was 0. Remove the old filter from the list independently from its handle value. This fixes CVE-2022-2588, also reported as ZDI-CAN-17440. Reported-by: Zhenpeng Lin Signed-off-by: Thadeu Lima de Souza Cascardo Reviewed-by: Kamal Mostafa Cc: Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20220809170518.164662-1-cascardo@canonical.com Signed-off-by: Jakub Kicinski net/sched/cls_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 636aa8807b5780b76609b40cd3d3e1b5a225471c Author: Mohan Kumar Date: Thu Aug 11 10:57:04 2022 +0530 ALSA: hda: Fix crash due to jack poll in suspend With jackpoll_in_suspend flag set, there is a possibility that jack poll worker thread will run even after system suspend was completed. Any register access after system pm callback flow will result in kernel crash as still jack poll worker thread tries to access registers. To fix the crash issue during system flow, cancel the jack poll worker thread during system pm prepare callback and cancel the worker thread at start of runtime suspend callback and re-schedule at last to avoid any unwarranted access of register by worker thread during suspend flow. Signed-off-by: Mohan Kumar Fixes: b33115bd05af ("ALSA: hda: Jack detection poll in suspend state") Link: https://lore.kernel.org/r/20220811052704.2944-1-mkumard@nvidia.com Signed-off-by: Takashi Iwai sound/pci/hda/hda_codec.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 74bba640d69914cf832b87f6bbb700e5ba430672 Author: Allen Ballway Date: Wed Aug 10 15:27:22 2022 +0000 ALSA: hda/cirrus - support for iMac 12,1 model The 12,1 model requires the same configuration as the 12,2 model to enable headphones but has a different codec SSID. Adds 12,1 SSID for matching quirk. [ re-sorted in SSID order by tiwai ] Signed-off-by: Allen Ballway Cc: Link: https://lore.kernel.org/r/20220810152701.1.I902c2e591bbf8de9acb649d1322fa1f291849266@changeid Signed-off-by: Takashi Iwai sound/pci/hda/patch_cirrus.c | 1 + 1 file changed, 1 insertion(+) commit 8bcfb4ae4d970b9a9724ddfbac26c387934e0e94 Author: Ido Schimmel Date: Tue Aug 9 14:33:20 2022 +0300 selftests: forwarding: Fix failing tests with old libnet The custom multipath hash tests use mausezahn in order to test how changes in various packet fields affect the packet distribution across the available nexthops. The tool uses the libnet library for various low-level packet construction and injection. The library started using the "SO_BINDTODEVICE" socket option for IPv6 sockets in version 1.1.6 and for IPv4 sockets in version 1.2. When the option is not set, packets are not routed according to the table associated with the VRF master device and tests fail. Fix this by prefixing the command with "ip vrf exec", which will cause the route lookup to occur in the VRF routing table. This makes the tests pass regardless of the libnet library version. Fixes: 511e8db54036 ("selftests: forwarding: Add test for custom multipath hash") Fixes: 185b0c190bb6 ("selftests: forwarding: Add test for custom multipath hash with IPv4 GRE") Fixes: b7715acba4d3 ("selftests: forwarding: Add test for custom multipath hash with IPv6 GRE") Reported-by: Ivan Vecera Tested-by: Ivan Vecera Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Link: https://lore.kernel.org/r/20220809113320.751413-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski .../net/forwarding/custom_multipath_hash.sh | 24 ++++++++++++++-------- .../net/forwarding/gre_custom_multipath_hash.sh | 24 ++++++++++++++-------- .../net/forwarding/ip6gre_custom_multipath_hash.sh | 24 ++++++++++++++-------- 3 files changed, 48 insertions(+), 24 deletions(-) commit fbe8870f72e8e71bb57b883d29c600aaaca6cd20 Merge: dd48f3832d04 e7c677bdd03d Author: Jakub Kicinski Date: Wed Aug 10 21:48:14 2022 -0700 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== bpf 2022-08-10 We've added 23 non-merge commits during the last 7 day(s) which contain a total of 19 files changed, 424 insertions(+), 35 deletions(-). The main changes are: 1) Several fixes for BPF map iterator such as UAFs along with selftests, from Hou Tao. 2) Fix BPF syscall program's {copy,strncpy}_from_bpfptr() to not fault, from Jinghao Jia. 3) Reject BPF syscall programs calling BPF_PROG_RUN, from Alexei Starovoitov and YiFei Zhu. 4) Fix attach_btf_obj_id info to pick proper target BTF, from Stanislav Fomichev. 5) BPF design Q/A doc update to clarify what is not stable ABI, from Paul E. McKenney. 6) Fix BPF map's prealloc_lru_pop to not reinitialize, from Kumar Kartikeya Dwivedi. 7) Fix bpf_trampoline_put to avoid leaking ftrace hash, from Jiri Olsa. 8) Fix arm64 JIT to address sparse errors around BPF trampoline, from Xu Kuohai. 9) Fix arm64 JIT to use kvcalloc instead of kcalloc for internal program address offset buffer, from Aijun Sun. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: (23 commits) selftests/bpf: Ensure sleepable program is rejected by hash map iter selftests/bpf: Add write tests for sk local storage map iterator selftests/bpf: Add tests for reading a dangling map iter fd bpf: Only allow sleepable program for resched-able iterator bpf: Check the validity of max_rdwr_access for sock local storage map iterator bpf: Acquire map uref in .init_seq_private for sock{map,hash} iterator bpf: Acquire map uref in .init_seq_private for sock local storage map iterator bpf: Acquire map uref in .init_seq_private for hash map iterator bpf: Acquire map uref in .init_seq_private for array map iterator bpf: Disallow bpf programs call prog_run command. bpf, arm64: Fix bpf trampoline instruction endianness selftests/bpf: Add test for prealloc_lru_pop bug bpf: Don't reinit map value in prealloc_lru_pop bpf: Allow calling bpf_prog_test kfuncs in tracing programs bpf, arm64: Allocate program buffer using kvcalloc instead of kcalloc selftests/bpf: Excercise bpf_obj_get_info_by_fd for bpf2bpf bpf: Use proper target btf when exporting attach_btf_obj_id mptcp, btf: Add struct mptcp_sock definition when CONFIG_MPTCP is disabled bpf: Cleanup ftrace hash in bpf_trampoline_put BPF: Fix potential bad pointer dereference in bpf_sys_bpf() ... ==================== Link: https://lore.kernel.org/r/20220810190624.10748-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit dd48f3832d041b7dbe54f26df21ace91a5889701 Merge: f329a0ebeaba cf8c1e967224 Author: Jakub Kicinski Date: Wed Aug 10 21:48:08 2022 -0700 Merge branch 'net-enhancements-to-sk_user_data-field' Hawkins Jiawei says: ==================== net: enhancements to sk_user_data field This patchset fixes refcount bug by adding SK_USER_DATA_PSOCK flag bit in sk_user_data field. The bug cause following info: WARNING: CPU: 1 PID: 3605 at lib/refcount.c:19 refcount_warn_saturate+0xf4/0x1e0 lib/refcount.c:19 Modules linked in: CPU: 1 PID: 3605 Comm: syz-executor208 Not tainted 5.18.0-syzkaller-03023-g7e062cda7d90 #0 __refcount_add_not_zero include/linux/refcount.h:163 [inline] __refcount_inc_not_zero include/linux/refcount.h:227 [inline] refcount_inc_not_zero include/linux/refcount.h:245 [inline] sk_psock_get+0x3bc/0x410 include/linux/skmsg.h:439 tls_data_ready+0x6d/0x1b0 net/tls/tls_sw.c:2091 tcp_data_ready+0x106/0x520 net/ipv4/tcp_input.c:4983 tcp_data_queue+0x25f2/0x4c90 net/ipv4/tcp_input.c:5057 tcp_rcv_state_process+0x1774/0x4e80 net/ipv4/tcp_input.c:6659 tcp_v4_do_rcv+0x339/0x980 net/ipv4/tcp_ipv4.c:1682 sk_backlog_rcv include/net/sock.h:1061 [inline] __release_sock+0x134/0x3b0 net/core/sock.c:2849 release_sock+0x54/0x1b0 net/core/sock.c:3404 inet_shutdown+0x1e0/0x430 net/ipv4/af_inet.c:909 __sys_shutdown_sock net/socket.c:2331 [inline] __sys_shutdown_sock net/socket.c:2325 [inline] __sys_shutdown+0xf1/0x1b0 net/socket.c:2343 __do_sys_shutdown net/socket.c:2351 [inline] __se_sys_shutdown net/socket.c:2349 [inline] __x64_sys_shutdown+0x50/0x70 net/socket.c:2349 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 To improve code maintainability, this patchset refactors sk_user_data flags code to be more generic. ==================== Link: https://lore.kernel.org/r/cover.1659676823.git.yin31149@gmail.com Signed-off-by: Jakub Kicinski commit cf8c1e967224c931119d3447f2213d1f645a1a2a Author: Hawkins Jiawei Date: Fri Aug 5 15:48:36 2022 +0800 net: refactor bpf_sk_reuseport_detach() Refactor sk_user_data dereference using more generic function __rcu_dereference_sk_user_data_with_flags(), which improve its maintainability Suggested-by: Jakub Kicinski Signed-off-by: Hawkins Jiawei Reviewed-by: Jakub Sitnicki Signed-off-by: Jakub Kicinski kernel/bpf/reuseport_array.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 2a0133723f9ebeb751cfce19f74ec07e108bef1f Author: Hawkins Jiawei Date: Fri Aug 5 15:48:34 2022 +0800 net: fix refcount bug in sk_psock_get (2) Syzkaller reports refcount bug as follows: ------------[ cut here ]------------ refcount_t: saturated; leaking memory. WARNING: CPU: 1 PID: 3605 at lib/refcount.c:19 refcount_warn_saturate+0xf4/0x1e0 lib/refcount.c:19 Modules linked in: CPU: 1 PID: 3605 Comm: syz-executor208 Not tainted 5.18.0-syzkaller-03023-g7e062cda7d90 #0 __refcount_add_not_zero include/linux/refcount.h:163 [inline] __refcount_inc_not_zero include/linux/refcount.h:227 [inline] refcount_inc_not_zero include/linux/refcount.h:245 [inline] sk_psock_get+0x3bc/0x410 include/linux/skmsg.h:439 tls_data_ready+0x6d/0x1b0 net/tls/tls_sw.c:2091 tcp_data_ready+0x106/0x520 net/ipv4/tcp_input.c:4983 tcp_data_queue+0x25f2/0x4c90 net/ipv4/tcp_input.c:5057 tcp_rcv_state_process+0x1774/0x4e80 net/ipv4/tcp_input.c:6659 tcp_v4_do_rcv+0x339/0x980 net/ipv4/tcp_ipv4.c:1682 sk_backlog_rcv include/net/sock.h:1061 [inline] __release_sock+0x134/0x3b0 net/core/sock.c:2849 release_sock+0x54/0x1b0 net/core/sock.c:3404 inet_shutdown+0x1e0/0x430 net/ipv4/af_inet.c:909 __sys_shutdown_sock net/socket.c:2331 [inline] __sys_shutdown_sock net/socket.c:2325 [inline] __sys_shutdown+0xf1/0x1b0 net/socket.c:2343 __do_sys_shutdown net/socket.c:2351 [inline] __se_sys_shutdown net/socket.c:2349 [inline] __x64_sys_shutdown+0x50/0x70 net/socket.c:2349 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 During SMC fallback process in connect syscall, kernel will replaces TCP with SMC. In order to forward wakeup smc socket waitqueue after fallback, kernel will sets clcsk->sk_user_data to origin smc socket in smc_fback_replace_callbacks(). Later, in shutdown syscall, kernel will calls sk_psock_get(), which treats the clcsk->sk_user_data as psock type, triggering the refcnt warning. So, the root cause is that smc and psock, both will use sk_user_data field. So they will mismatch this field easily. This patch solves it by using another bit(defined as SK_USER_DATA_PSOCK) in PTRMASK, to mark whether sk_user_data points to a psock object or not. This patch depends on a PTRMASK introduced in commit f1ff5ce2cd5e ("net, sk_msg: Clear sk_user_data pointer on clone if tagged"). For there will possibly be more flags in the sk_user_data field, this patch also refactor sk_user_data flags code to be more generic to improve its maintainability. Reported-and-tested-by: syzbot+5f26f85569bd179c18ce@syzkaller.appspotmail.com Suggested-by: Jakub Kicinski Acked-by: Wen Gu Signed-off-by: Hawkins Jiawei Reviewed-by: Jakub Sitnicki Signed-off-by: Jakub Kicinski include/linux/skmsg.h | 3 ++- include/net/sock.h | 68 ++++++++++++++++++++++++++++++++++++--------------- net/core/skmsg.c | 4 ++- 3 files changed, 53 insertions(+), 22 deletions(-) commit 3aefb2ee5bdd4a8976298415a5a017bf9844bfd5 Merge: 8f2f74b4b6e6 d20ec7529236 Author: Palmer Dabbelt Date: Wed Aug 10 18:23:51 2022 -0700 riscv: implement Zicbom-based CMO instructions + the t-head variant This series is based on the alternatives changes done in my svpbmt series and thus also depends on Atish's isa-extension parsing series. It implements using the cache-management instructions from the Zicbom- extension to handle cache flush, etc actions on platforms needing them. SoCs using cpu cores from T-Head like the Allwinne D1 implement a different set of cache instructions. But while they are different, instructions they provide the same functionality, so a variant can easly hook into the existing alternatives mechanism on those. [Palmer: Some minor fixups, including a RISCV_ISA_ZICBOM dependency on MMU that's probably not strictly necessary. The Zicbom support will trip up sparse for users that have new toolchains, I just sent a patch.] Link: https://lore.kernel.org/all/20220706231536.2041855-1-heiko@sntech.de/ Link: https://lore.kernel.org/linux-sparse/20220811033138.20676-1-palmer@rivosinc.com/T/#u * palmer/riscv-zicbom: riscv: implement cache-management errata for T-Head SoCs riscv: Add support for non-coherent devices using zicbom extension dt-bindings: riscv: document cbom-block-size of: also handle dma-noncoherent in of_dma_is_coherent() commit cd04345598b7c191d41574bc9da3fe435dc65605 Author: David Howells Date: Mon Aug 8 15:33:51 2022 +0100 cifs: Remove {cifs,nfs}_fscache_release_page() Remove {cifs,nfs}_fscache_release_page() from fs/cifs/fscache.h. This functionality got built directly into cifs_release_folio() and will hopefully be replaced with netfs_release_folio() at some point. The "nfs_" version is a copy and paste error and should've been altered to read "cifs_". That can also be removed. Reported-by: Matthew Wilcox Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: Steve French cc: linux-cifs@vger.kernel.org cc: samba-technical@lists.samba.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French fs/cifs/fscache.h | 16 ---------------- 1 file changed, 16 deletions(-) commit ffcf9c5700e49c0aee42dcba9a12ba21338e8136 Author: Nick Desaulniers Date: Wed Aug 10 15:24:41 2022 -0700 x86: link vdso and boot with -z noexecstack --no-warn-rwx-segments Users of GNU ld (BFD) from binutils 2.39+ will observe multiple instances of a new warning when linking kernels in the form: ld: warning: arch/x86/boot/pmjump.o: missing .note.GNU-stack section implies executable stack ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker ld: warning: arch/x86/boot/compressed/vmlinux has a LOAD segment with RWX permissions Generally, we would like to avoid the stack being executable. Because there could be a need for the stack to be executable, assembler sources have to opt-in to this security feature via explicit creation of the .note.GNU-stack feature (which compilers create by default) or command line flag --noexecstack. Or we can simply tell the linker the production of such sections is irrelevant and to link the stack as --noexecstack. LLVM's LLD linker defaults to -z noexecstack, so this flag isn't strictly necessary when linking with LLD, only BFD, but it doesn't hurt to be explicit here for all linkers IMO. --no-warn-rwx-segments is currently BFD specific and only available in the current latest release, so it's wrapped in an ld-option check. While the kernel makes extensive usage of ELF sections, it doesn't use permissions from ELF segments. Link: https://lore.kernel.org/linux-block/3af4127a-f453-4cf7-f133-a181cce06f73@kernel.dk/ Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107 Link: https://github.com/llvm/llvm-project/issues/57009 Reported-and-tested-by: Jens Axboe Suggested-by: Fangrui Song Signed-off-by: Nick Desaulniers Signed-off-by: Linus Torvalds arch/x86/boot/Makefile | 2 +- arch/x86/boot/compressed/Makefile | 4 ++++ arch/x86/entry/vdso/Makefile | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) commit 0d362be5b14200b77ecc2127936a5ff82fbffe41 Author: Nick Desaulniers Date: Wed Aug 10 15:24:40 2022 -0700 Makefile: link with -z noexecstack --no-warn-rwx-segments Users of GNU ld (BFD) from binutils 2.39+ will observe multiple instances of a new warning when linking kernels in the form: ld: warning: vmlinux: missing .note.GNU-stack section implies executable stack ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker ld: warning: vmlinux has a LOAD segment with RWX permissions Generally, we would like to avoid the stack being executable. Because there could be a need for the stack to be executable, assembler sources have to opt-in to this security feature via explicit creation of the .note.GNU-stack feature (which compilers create by default) or command line flag --noexecstack. Or we can simply tell the linker the production of such sections is irrelevant and to link the stack as --noexecstack. LLVM's LLD linker defaults to -z noexecstack, so this flag isn't strictly necessary when linking with LLD, only BFD, but it doesn't hurt to be explicit here for all linkers IMO. --no-warn-rwx-segments is currently BFD specific and only available in the current latest release, so it's wrapped in an ld-option check. While the kernel makes extensive usage of ELF sections, it doesn't use permissions from ELF segments. Link: https://lore.kernel.org/linux-block/3af4127a-f453-4cf7-f133-a181cce06f73@kernel.dk/ Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107 Link: https://github.com/llvm/llvm-project/issues/57009 Reported-and-tested-by: Jens Axboe Suggested-by: Fangrui Song Signed-off-by: Nick Desaulniers Signed-off-by: Linus Torvalds Makefile | 5 +++++ 1 file changed, 5 insertions(+) commit 1d3551ced64e1a4f4869446a92713c235f20b0ca Author: Linus Torvalds Date: Wed Aug 10 17:59:11 2022 -0700 crypto: blake2b: effectively disable frame size warning It turns out that gcc-12.1 has some nasty problems with register allocation on a 32-bit x86 build for the 64-bit values used in the generic blake2b implementation, where the pattern of 64-bit rotates and xor operations ends up making gcc generate horrible code. As a result it ends up with a ridiculously large stack frame for all the spills it generates, resulting in the following build problem: crypto/blake2b_generic.c: In function ‘blake2b_compress_one_generic’: crypto/blake2b_generic.c:109:1: error: the frame size of 2640 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] on the same test-case, clang ends up generating a stack frame that is just 296 bytes (and older gcc versions generate a slightly bigger one at 428 bytes - still nowhere near that almost 3kB monster stack frame of gcc-12.1). The issue is fixed both in mainline and the GCC 12 release branch [1], but current release compilers end up failing the i386 allmodconfig build due to this issue. Disable the warning for now by simply raising the frame size for this one file, just to keep this issue from having people turn off WERROR. Link: https://lore.kernel.org/all/CAHk-=wjxqgeG2op+=W9sqgsWqCYnavC+SRfVyopu9-31S6xw+Q@mail.gmail.com/ Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105930 [1] Signed-off-by: Linus Torvalds crypto/Makefile | 1 + 1 file changed, 1 insertion(+) commit 031d166f968efba6e4f091ff75d0bb5206bb3918 Author: hexiaole Date: Tue Aug 9 13:23:46 2022 -0700 xfs: fix inode reservation space for removing transaction In 'fs/xfs/libxfs/xfs_trans_resv.c', the comment for transaction of removing a directory entry writes: /* fs/xfs/libxfs/xfs_trans_resv.c begin */ /* * For removing a directory entry we can modify: * the parent directory inode: inode size * the removed inode: inode size ... xfs_calc_remove_reservation( struct xfs_mount *mp) { return XFS_DQUOT_LOGRES(mp) + xfs_calc_iunlink_add_reservation(mp) + max((xfs_calc_inode_res(mp, 1) + ... /* fs/xfs/libxfs/xfs_trans_resv.c end */ There has 2 inode size of space to be reserverd, but the actual code for inode reservation space writes. There only count for 1 inode size to be reserved in 'xfs_calc_inode_res(mp, 1)', rather than 2. Signed-off-by: hexiaole Reviewed-by: Darrick J. Wong [djwong: remove redundant code citations] Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_trans_resv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2bba782002c5dab6ca8d608b778b386fb912adff Author: Marek Vasut Date: Mon Aug 1 14:54:19 2022 +0200 drm/bridge: lvds-codec: Fix error checking of drm_of_lvds_get_data_mapping() The drm_of_lvds_get_data_mapping() returns either negative value on error or MEDIA_BUS_FMT_* otherwise. The check for 'ret' would also catch the positive case of MEDIA_BUS_FMT_* and lead to probe failure every time 'data-mapping' DT property is specified. Fixes: 7c4dd0a266527 ("drm: of: Add drm_of_lvds_get_data_mapping") Signed-off-by: Marek Vasut Cc: Laurent Pinchart Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Reviewed-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20220801125419.167562-1-marex@denx.de drivers/gpu/drm/bridge/lvds-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 773891ffd4d628d05c4e22f34541e4779ee7a076 Author: Paulo Alcantara Date: Mon Aug 8 13:41:18 2022 -0300 cifs: fix lock length calculation The lock length was wrongly set to 0 when fl_end == OFFSET_MAX, thus failing to lock the whole file when l_start=0 and l_len=0. This fixes test 2 from cthon04. Before patch: $ ./cthon04/lock/tlocklfs -t 2 /mnt Creating parent/child synchronization pipes. Test #1 - Test regions of an unlocked file. Parent: 1.1 - F_TEST [ 0, 1] PASSED. Parent: 1.2 - F_TEST [ 0, ENDING] PASSED. Parent: 1.3 - F_TEST [ 0,7fffffffffffffff] PASSED. Parent: 1.4 - F_TEST [ 1, 1] PASSED. Parent: 1.5 - F_TEST [ 1, ENDING] PASSED. Parent: 1.6 - F_TEST [ 1,7fffffffffffffff] PASSED. Parent: 1.7 - F_TEST [7fffffffffffffff, 1] PASSED. Parent: 1.8 - F_TEST [7fffffffffffffff, ENDING] PASSED. Parent: 1.9 - F_TEST [7fffffffffffffff,7fffffffffffffff] PASSED. Test #2 - Try to lock the whole file. Parent: 2.0 - F_TLOCK [ 0, ENDING] PASSED. Child: 2.1 - F_TEST [ 0, 1] FAILED! Child: **** Expected EACCES, returned success... Child: **** Probably implementation error. ** CHILD pass 1 results: 0/0 pass, 0/0 warn, 1/1 fail (pass/total). Parent: Child died ** PARENT pass 1 results: 10/10 pass, 0/0 warn, 0/0 fail (pass/total). After patch: $ ./cthon04/lock/tlocklfs -t 2 /mnt Creating parent/child synchronization pipes. Test #2 - Try to lock the whole file. Parent: 2.0 - F_TLOCK [ 0, ENDING] PASSED. Child: 2.1 - F_TEST [ 0, 1] PASSED. Child: 2.2 - F_TEST [ 0, ENDING] PASSED. Child: 2.3 - F_TEST [ 0,7fffffffffffffff] PASSED. Child: 2.4 - F_TEST [ 1, 1] PASSED. Child: 2.5 - F_TEST [ 1, ENDING] PASSED. Child: 2.6 - F_TEST [ 1,7fffffffffffffff] PASSED. Child: 2.7 - F_TEST [7fffffffffffffff, 1] PASSED. Child: 2.8 - F_TEST [7fffffffffffffff, ENDING] PASSED. Child: 2.9 - F_TEST [7fffffffffffffff,7fffffffffffffff] PASSED. Parent: 2.10 - F_ULOCK [ 0, ENDING] PASSED. ** PARENT pass 1 results: 2/2 pass, 0/0 warn, 0/0 fail (pass/total). ** CHILD pass 1 results: 9/9 pass, 0/0 warn, 0/0 fail (pass/total). Fixes: d80c69846ddf ("cifs: fix signed integer overflow when fl_end is OFFSET_MAX") Reported-by: Xiaoli Feng Cc: Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/cifsglob.h | 4 ++-- fs/cifs/file.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 8f2f74b4b6e67a84948abf1a52cb6a11fe76b5d9 Merge: c08b4848f596 0ed048137fd9 Author: Palmer Dabbelt Date: Wed Aug 10 14:33:45 2022 -0700 RISC-V: Canaan devicetree fixes This series should rid us of dtbs_check errors for the RISC-V Canaan k210 based boards. To make keeping it that way a little easier, I changed the Canaan devicetree Makefile so that it would build all of the devicetrees in the directory if SOC_CANAAN. Link: https://lore.kernel.org/all/mhng-85044754-c361-40bc-a6a2-7082f35930bb@palmer-ri-x1c9/ * remotes/palmer/riscv-canaan_dt_schema: riscv: dts: canaan: build all devicetress if SOC_CANAAN riscv: dts: canaan: add specific compatible for kd233's LCD riscv: dts: canaan: fix bus {ranges,reg} warnings riscv: dts: canaan: remove spi-max-frequency from controllers riscv: dts: canaan: use custom compatible for k210 i2s riscv: dts: canaan: fix kd233 display spi frequency riscv: dts: canaan: fix mmc node names riscv: dts: canaan: fix the k210's timer nodes riscv: dts: canaan: fix the k210's memory node dt-bindings: memory-controllers: add canaan k210 sram controller dt-bindings: display: ili9341: document canaan kd233's lcd dt-bindings: display: convert ilitek,ili9341.txt to dt-schema commit 2ac2920cd8d9334e24bfd30d518010f99077a947 Author: Rob Herring Date: Thu Jul 28 13:08:10 2022 -0600 dt-bindings: mailbox: arm,mhu: Make secure interrupt optional The secure interrupt is only useful to secure world, therefore for NS users it shouldn't be required. Make it optional. This fixes a warning on Arm Juno board: mhu@2b1f0000: interrupts: [[0, 36, 4], [0, 35, 4]] is too short Signed-off-by: Rob Herring Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20220728190810.1290857-1-robh@kernel.org Documentation/devicetree/bindings/mailbox/arm,mhu.yaml | 1 + 1 file changed, 1 insertion(+) commit 487ceef03895285f44ab26f6cf0c19b21b73d40d Author: Rob Herring Date: Tue Aug 9 15:45:56 2022 -0600 dt-bindings: pinctrl: qcom,ipq6018: Fix example 'gpio-ranges' size 'gpio-ranges' entries have a fixed size of 1 phandle plus arg 3 cells. The qcom,ipq6018-pinctrl example is a cell short: Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.example.dtb: pinctrl@1000000: gpio-ranges:0: [1, 0, 80] is too short From schema: /usr/local/lib/python3.10/dist-packages/dtschema/schemas/gpio/gpio.yaml Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220809214556.2489822-1-robh@kernel.org Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c08b4848f596fd95543197463b5162bd7bab2442 Author: Chen Lifu Date: Wed Jun 15 09:47:14 2022 +0800 riscv: lib: uaccess: fix CSR_STATUS SR_SUM bit Since commit 5d8544e2d007 ("RISC-V: Generic library routines and assembly") and commit ebcbd75e3962 ("riscv: Fix the bug in memory access fixup code"), if __clear_user and __copy_user return from an fixup branch, CSR_STATUS SR_SUM bit will be set, it is a vulnerability, so that S-mode memory accesses to pages that are accessible by U-mode will success. Disable S-mode access to U-mode memory should clear SR_SUM bit. Fixes: 5d8544e2d007 ("RISC-V: Generic library routines and assembly") Fixes: ebcbd75e3962 ("riscv: Fix the bug in memory access fixup code") Signed-off-by: Chen Lifu Reviewed-by: Ben Dooks Link: https://lore.kernel.org/r/20220615014714.1650349-1-chenlifu@huawei.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/lib/uaccess.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aeb6e6ac18c73ec287b3b1e2c913520699358c13 Merge: f41445645ab5 3fa5cbdc44de Author: Linus Torvalds Date: Wed Aug 10 14:04:32 2022 -0700 Merge tag 'nfs-for-5.20-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client updates from Trond Myklebust: "Highlights include: Stable fixes: - pNFS/flexfiles: Fix infinite looping when the RDMA connection errors out Bugfixes: - NFS: fix port value parsing - SUNRPC: Reinitialise the backchannel request buffers before reuse - SUNRPC: fix expiry of auth creds - NFSv4: Fix races in the legacy idmapper upcall - NFS: O_DIRECT fixes from Jeff Layton - NFSv4.1: Fix OP_SEQUENCE error handling - SUNRPC: Fix an RPC/RDMA performance regression - NFS: Fix case insensitive renames - NFSv4/pnfs: Fix a use-after-free bug in open - NFSv4.1: RECLAIM_COMPLETE must handle EACCES Features: - NFSv4.1: session trunking enhancements - NFSv4.2: READ_PLUS performance optimisations - NFS: relax the rules for rsize/wsize mount options - NFS: don't unhash dentry during unlink/rename - SUNRPC: Fail faster on bad verifier - NFS/SUNRPC: Various tracing improvements" * tag 'nfs-for-5.20-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (46 commits) NFS: Improve readpage/writepage tracing NFS: Improve O_DIRECT tracing NFS: Improve write error tracing NFS: don't unhash dentry during unlink/rename NFSv4/pnfs: Fix a use-after-free bug in open NFS: nfs_async_write_reschedule_io must not recurse into the writeback code SUNRPC: Don't reuse bvec on retransmission of the request SUNRPC: Reinitialise the backchannel request buffers before reuse NFSv4.1: RECLAIM_COMPLETE must handle EACCES NFSv4.1 probe offline transports for trunking on session creation SUNRPC create a function that probes only offline transports SUNRPC export xprt_iter_rewind function SUNRPC restructure rpc_clnt_setup_test_and_add_xprt NFSv4.1 remove xprt from xprt_switch if session trunking test fails SUNRPC create an rpc function that allows xprt removal from rpc_clnt SUNRPC enable back offline transports in trunking discovery SUNRPC create an iterator to list only OFFLINE xprts NFSv4.1 offline trunkable transports on DESTROY_SESSION SUNRPC add function to offline remove trunkable transports SUNRPC expose functions for offline remote xprt functionality ... commit 3cbd673846772153a0aa85471aef5788f1a53dcd Author: Conor Dooley Date: Wed Aug 10 15:02:44 2022 +0100 MAINTAINERS: add the Polarfire SoC's i2c driver Add the newly added i2c controller driver to the existing entry for PolarFire SoC. Signed-off-by: Conor Dooley Acked-by: Wolfram Sang Link: https://lore.kernel.org/r/20220810140243.2685416-3-conor.dooley@microchip.com' Signed-off-by: Arnd Bergmann MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit fd7cb3e4684f0c044a627dc33adb9f97c69f033f Author: Conor Dooley Date: Wed Aug 10 15:02:43 2022 +0100 MAINTAINERS: add PolarFire SoC dt bindings So far when I added bindings for the platform I never added them to our MAINTAINERS entry. No time like the present to improve the coverage. Suggested-by: Mark Brown Signed-off-by: Conor Dooley Acked-by: Marc Kleine-Budde # for can Acked-by: Uwe Kleine-König CC: Mark Brown CC: Wolfram Sang CC: Thierry Reding CC: Uwe Kleine-König CC: Jassi Brar CC: Linus Walleij CC: Bartosz Golaszewski CC: Greg Kroah-Hartman CC: Arnd Bergmann CC: Olof Johansson CC: Michael Turquette CC: Stephen Boyd Link: https://lore.kernel.org/r/20220810140243.2685416-2-conor.dooley@microchip.com' Signed-off-by: Arnd Bergmann MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit ad2feebd71ff80532dff75756d1103f056358614 Author: Sebin Sebastian Date: Sat Jul 30 09:16:58 2022 +0530 drm/amdgpu: double free error and freeing uninitialized null pointer Fix a double free and an uninitialized pointer read error. Both tmp and new are pointing at same address and both are freed which leads to double free. Adding a check to verify if new and tmp are free in the error_free label fixes the double free issue. new is not initialized to null which also leads to a free on an uninitialized pointer. Reviewed-by: André Almeida Suggested by: S. Amaranath Signed-off-by: Sebin Sebastian Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a6250bdb6c4677ee77d699b338e077b900f94c0c Author: Alex Deucher Date: Tue Aug 9 11:44:05 2022 -0400 drm/amdgpu: Only disable prefer_shadow on hawaii We changed it for all asics due to a hibernation regression on hawaii, but the workaround breaks suspend on a polaris12. Just disable it for hawaii. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216119 Fixes: 3a4b1cc28fbd ("drm/amdgpu/display: disable prefer_shadow for generic fb helpers") Reviewed-and-tested-by: Mario Limonciello Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 3 +-- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 3 +-- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 3 +-- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 3 +-- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 7 +++++-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +++++-- 6 files changed, 14 insertions(+), 12 deletions(-) commit acc96ae0d12783e9781428b17e34fd662a904f0a Author: Melissa Wen Date: Thu Aug 4 15:13:49 2022 -0100 drm/amd/display: set panel orientation before drm_dev_register To set the panel orientation property with quirk, we need the mode size provided by EDID. This info is available after EDID is read by dc_link_detect() and updated by amdgpu_dm_update_connector_after_detect(). The detection happens at driver load in amdgpu_dm_initialize_drm_device() and, therefore, we can get modes and set panel orientation before drm_dev_register() to avoid DRM warns on creating the connector property after device registration: [ 2.563969] ------------[ cut here ]------------ [ 2.563971] WARNING: CPU: 6 PID: 325 at drivers/gpu/drm/drm_mode_object.c:45 drm_mode_object_add+0x72/0x80 [drm] [ 2.563997] Modules linked in: btusb btrtl btbcm btintel btmtk bluetooth rfkill ecdh_generic ecc usbhid crc16 amdgpu(+) drm_ttm_helper ttm agpgart gpu_sched i2c_algo_bit drm_display_helper drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm serio_raw sdhci_pci atkbd libps2 cqhci vivaldi_fmap ccp sdhci i8042 crct10dif_pclmul crc32_pclmul hid_multitouch ghash_clmulni_intel aesni_intel crypto_simd cryptd wdat_wdt mmc_core cec xhci_pci sp5100_tco rng_core xhci_pci_renesas serio 8250_dw i2c_hid_acpi i2c_hid btrfs blake2b_generic libcrc32c crc32c_generic crc32c_intel xor raid6_pq dm_mirror dm_region_hash dm_log dm_mod pkcs8_key_parser crypto_user [ 2.564032] CPU: 6 PID: 325 Comm: systemd-udevd Not tainted 5.18.0-amd-staging-drm-next+ #67 [ 2.564034] Hardware name: Valve Jupiter/Jupiter, BIOS F7A0105 03/21/2022 [ 2.564036] RIP: 0010:drm_mode_object_add+0x72/0x80 [drm] [ 2.564053] Code: f0 89 c3 85 c0 78 07 89 45 00 44 89 65 04 4c 89 ef e8 e2 99 04 f1 31 c0 85 db 0f 4e c3 5b 5d 41 5c 41 5d c3 80 7f 50 00 74 ac <0f> 0b eb a8 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 41 54 4c [ 2.564055] RSP: 0018:ffffb2e880413860 EFLAGS: 00010202 [ 2.564056] RAX: ffffffffc0ba1440 RBX: ffff99508a860010 RCX: 0000000000000001 [ 2.564057] RDX: 00000000b0b0b0b0 RSI: ffff99508c050110 RDI: ffff99508a860010 [ 2.564058] RBP: ffff99508c050110 R08: 0000000000000020 R09: ffff99508c292c20 [ 2.564059] R10: 0000000000000000 R11: ffff99508c0507d8 R12: 00000000b0b0b0b0 [ 2.564060] R13: 0000000000000004 R14: ffffffffc068a4b6 R15: ffffffffc068a47f [ 2.564061] FS: 00007fc69b5f1a40(0000) GS:ffff9953aff80000(0000) knlGS:0000000000000000 [ 2.564063] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2.564063] CR2: 00007f9506804000 CR3: 0000000107f92000 CR4: 0000000000350ee0 [ 2.564065] Call Trace: [ 2.564068] [ 2.564070] drm_property_create+0xc9/0x170 [drm] [ 2.564088] drm_property_create_enum+0x1f/0x70 [drm] [ 2.564105] drm_connector_set_panel_orientation_with_quirk+0x96/0xc0 [drm] [ 2.564123] get_modes+0x4fb/0x530 [amdgpu] [ 2.564378] drm_helper_probe_single_connector_modes+0x1ad/0x850 [drm_kms_helper] [ 2.564390] drm_client_modeset_probe+0x229/0x1400 [drm] [ 2.564411] ? xas_store+0x52/0x5e0 [ 2.564416] ? kmem_cache_alloc_trace+0x177/0x2c0 [ 2.564420] __drm_fb_helper_initial_config_and_unlock+0x44/0x4e0 [drm_kms_helper] [ 2.564430] drm_fbdev_client_hotplug+0x173/0x210 [drm_kms_helper] [ 2.564438] drm_fbdev_generic_setup+0xa5/0x166 [drm_kms_helper] [ 2.564446] amdgpu_pci_probe+0x35e/0x370 [amdgpu] [ 2.564621] local_pci_probe+0x45/0x80 [ 2.564625] ? pci_match_device+0xd7/0x130 [ 2.564627] pci_device_probe+0xbf/0x220 [ 2.564629] ? sysfs_do_create_link_sd+0x69/0xd0 [ 2.564633] really_probe+0x19c/0x380 [ 2.564637] __driver_probe_device+0xfe/0x180 [ 2.564639] driver_probe_device+0x1e/0x90 [ 2.564641] __driver_attach+0xc0/0x1c0 [ 2.564643] ? __device_attach_driver+0xe0/0xe0 [ 2.564644] ? __device_attach_driver+0xe0/0xe0 [ 2.564646] bus_for_each_dev+0x78/0xc0 [ 2.564648] bus_add_driver+0x149/0x1e0 [ 2.564650] driver_register+0x8f/0xe0 [ 2.564652] ? 0xffffffffc1023000 [ 2.564654] do_one_initcall+0x44/0x200 [ 2.564657] ? kmem_cache_alloc_trace+0x177/0x2c0 [ 2.564659] do_init_module+0x4c/0x250 [ 2.564663] __do_sys_init_module+0x12e/0x1b0 [ 2.564666] do_syscall_64+0x3b/0x90 [ 2.564670] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 2.564673] RIP: 0033:0x7fc69bff232e [ 2.564674] Code: 48 8b 0d 45 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 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 12 0b 0c 00 f7 d8 64 89 01 48 [ 2.564676] RSP: 002b:00007ffe872ba3e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000af [ 2.564677] RAX: ffffffffffffffda RBX: 000055873f797820 RCX: 00007fc69bff232e [ 2.564678] RDX: 000055873f7bf390 RSI: 0000000001155e81 RDI: 00007fc699e4d010 [ 2.564679] RBP: 00007fc699e4d010 R08: 000055873f7bfe20 R09: 0000000001155e90 [ 2.564680] R10: 000000055873f7bf R11: 0000000000000246 R12: 000055873f7bf390 [ 2.564681] R13: 000000000000000d R14: 000055873f7c4cb0 R15: 000055873f797820 [ 2.564683] [ 2.564683] ---[ end trace 0000000000000000 ]--- [ 2.564696] ------------[ cut here ]------------ [ 2.564696] WARNING: CPU: 6 PID: 325 at drivers/gpu/drm/drm_mode_object.c:242 drm_object_attach_property+0x52/0x80 [drm] [ 2.564717] Modules linked in: btusb btrtl btbcm btintel btmtk bluetooth rfkill ecdh_generic ecc usbhid crc16 amdgpu(+) drm_ttm_helper ttm agpgart gpu_sched i2c_algo_bit drm_display_helper drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm serio_raw sdhci_pci atkbd libps2 cqhci vivaldi_fmap ccp sdhci i8042 crct10dif_pclmul crc32_pclmul hid_multitouch ghash_clmulni_intel aesni_intel crypto_simd cryptd wdat_wdt mmc_core cec xhci_pci sp5100_tco rng_core xhci_pci_renesas serio 8250_dw i2c_hid_acpi i2c_hid btrfs blake2b_generic libcrc32c crc32c_generic crc32c_intel xor raid6_pq dm_mirror dm_region_hash dm_log dm_mod pkcs8_key_parser crypto_user [ 2.564738] CPU: 6 PID: 325 Comm: systemd-udevd Tainted: G W 5.18.0-amd-staging-drm-next+ #67 [ 2.564740] Hardware name: Valve Jupiter/Jupiter, BIOS F7A0105 03/21/2022 [ 2.564741] RIP: 0010:drm_object_attach_property+0x52/0x80 [drm] [ 2.564759] Code: 2d 83 f8 18 74 33 48 89 74 c1 08 48 8b 4f 08 48 89 94 c1 c8 00 00 00 48 8b 47 08 83 00 01 c3 4d 85 d2 75 dd 83 7f 58 01 75 d7 <0f> 0b eb d3 41 80 78 50 00 74 cc 0f 0b eb c8 44 89 ce 48 c7 c7 28 [ 2.564760] RSP: 0018:ffffb2e8804138d8 EFLAGS: 00010246 [ 2.564761] RAX: 0000000000000010 RBX: ffff99508c1a2000 RCX: ffff99508c1a2180 [ 2.564762] RDX: 0000000000000003 RSI: ffff99508c050100 RDI: ffff99508c1a2040 [ 2.564763] RBP: 00000000ffffffff R08: ffff99508a860010 R09: 00000000c0c0c0c0 [ 2.564763] R10: 0000000000000000 R11: 0000000000000020 R12: ffff99508a860010 [ 2.564764] R13: ffff995088733008 R14: ffff99508c1a2000 R15: ffffffffc068a47f [ 2.564765] FS: 00007fc69b5f1a40(0000) GS:ffff9953aff80000(0000) knlGS:0000000000000000 [ 2.564766] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2.564767] CR2: 00007f9506804000 CR3: 0000000107f92000 CR4: 0000000000350ee0 [ 2.564768] Call Trace: [ 2.564769] [ 2.564770] drm_connector_set_panel_orientation_with_quirk+0x4a/0xc0 [drm] [ 2.564789] get_modes+0x4fb/0x530 [amdgpu] [ 2.565024] drm_helper_probe_single_connector_modes+0x1ad/0x850 [drm_kms_helper] [ 2.565036] drm_client_modeset_probe+0x229/0x1400 [drm] [ 2.565056] ? xas_store+0x52/0x5e0 [ 2.565060] ? kmem_cache_alloc_trace+0x177/0x2c0 [ 2.565062] __drm_fb_helper_initial_config_and_unlock+0x44/0x4e0 [drm_kms_helper] [ 2.565072] drm_fbdev_client_hotplug+0x173/0x210 [drm_kms_helper] [ 2.565080] drm_fbdev_generic_setup+0xa5/0x166 [drm_kms_helper] [ 2.565088] amdgpu_pci_probe+0x35e/0x370 [amdgpu] [ 2.565261] local_pci_probe+0x45/0x80 [ 2.565263] ? pci_match_device+0xd7/0x130 [ 2.565265] pci_device_probe+0xbf/0x220 [ 2.565267] ? sysfs_do_create_link_sd+0x69/0xd0 [ 2.565268] really_probe+0x19c/0x380 [ 2.565270] __driver_probe_device+0xfe/0x180 [ 2.565272] driver_probe_device+0x1e/0x90 [ 2.565274] __driver_attach+0xc0/0x1c0 [ 2.565276] ? __device_attach_driver+0xe0/0xe0 [ 2.565278] ? __device_attach_driver+0xe0/0xe0 [ 2.565279] bus_for_each_dev+0x78/0xc0 [ 2.565281] bus_add_driver+0x149/0x1e0 [ 2.565283] driver_register+0x8f/0xe0 [ 2.565285] ? 0xffffffffc1023000 [ 2.565286] do_one_initcall+0x44/0x200 [ 2.565288] ? kmem_cache_alloc_trace+0x177/0x2c0 [ 2.565290] do_init_module+0x4c/0x250 [ 2.565291] __do_sys_init_module+0x12e/0x1b0 [ 2.565294] do_syscall_64+0x3b/0x90 [ 2.565296] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 2.565297] RIP: 0033:0x7fc69bff232e [ 2.565298] Code: 48 8b 0d 45 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 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 12 0b 0c 00 f7 d8 64 89 01 48 [ 2.565299] RSP: 002b:00007ffe872ba3e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000af [ 2.565301] RAX: ffffffffffffffda RBX: 000055873f797820 RCX: 00007fc69bff232e [ 2.565302] RDX: 000055873f7bf390 RSI: 0000000001155e81 RDI: 00007fc699e4d010 [ 2.565303] RBP: 00007fc699e4d010 R08: 000055873f7bfe20 R09: 0000000001155e90 [ 2.565303] R10: 000000055873f7bf R11: 0000000000000246 R12: 000055873f7bf390 [ 2.565304] R13: 000000000000000d R14: 000055873f7c4cb0 R15: 000055873f797820 [ 2.565306] [ 2.565307] ---[ end trace 0000000000000000 ]--- -- v2: - call amdgpu_dm_connector_get_modes() instead of ddc_get_modes() (Harry) Fixes: d77de7880e0e0 ("amd/display: enable panel orientation quirks") Acked-by: Hans de Goede Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 541d54e40f1672dea6514ad64d54d61ed952648e Author: Zhen Ni Date: Wed Aug 3 17:19:59 2022 +0800 drm/amd/pm: Fix a potential gpu_metrics_table memory leak Memory is allocated for gpu_metrics_table in smu_v13_0_5_init_smc_tables(), but not freed in smu_v13_0_5_fini_smc_tables(). This may cause memory leaks, fix it. Reviewed-by: Evan Quan Signed-off-by: Zhen Ni Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c | 3 +++ 1 file changed, 3 insertions(+) commit 5afb76522a0af0513b6dc01f84128a73206b051b Author: Zhen Ni Date: Wed Aug 3 17:19:58 2022 +0800 drm/amd/pm: Fix a potential gpu_metrics_table memory leak Memory is allocated for gpu_metrics_table in smu_v13_0_4_init_smc_tables(), but not freed in smu_v13_0_4_fini_smc_tables(). This may cause memory leaks, fix it. Reviewed-by: Evan Quan Signed-off-by: Zhen Ni Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c | 3 +++ 1 file changed, 3 insertions(+) commit dc0a096bcc1d659ae93f836099c6b0312d2ccaaf Author: Tim Huang Date: Fri Jul 29 15:25:57 2022 +0800 drm/amdgpu: add GFX Power Gating support for GC IP v11.0.1 Add AMD_PG_SUPPORT_GFX_PG support. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + 1 file changed, 1 insertion(+) commit cb9c7ab1b3ddc2702379dd9639df0c2230453c2e Author: Tim Huang Date: Fri Jul 29 18:37:27 2022 +0800 drm/amdgpu: enable GFX Power Gating for GC IP v11.0.1 Enable GFX Power Gating control for GC IP v11.0.1. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit bea9a56afbc4b5a41ea579b8b0dc5e189b439504 Author: Felix Kuehling Date: Thu Aug 4 18:19:38 2022 -0400 drm/amdkfd: Handle restart of kfd_ioctl_wait_events When kfd_ioctl_wait_events needs to restart due to a signal, we need to update the timeout to account for the time already elapsed. We also need to undo auto_reset of events that have signaled already, so that the restarted ioctl will be able to count those signals again. This fixes infinite hangs when kfd_ioctl_wait_events is interrupted by a signal. Signed-off-by: Felix Kuehling Reviewed-and-tested-by: Xiaogang Chen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 24 ++++++++++++------------ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) commit c4c10a68e82b8a03df234ee744acabcc648df270 Author: Rajneesh Bhardwaj Date: Wed Apr 20 09:37:56 2022 -0400 drm/amdgpu: Avoid direct cast to amdgpu_ttm_tt For typesafety, use container_of() instead of implicit cast from struct ttm_tt to struct amdgpu_ttm_tt. Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 34 +++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 4e64b529c5b04e7944b41de554ee686ecab00744 Author: Kenneth Feng Date: Tue Aug 9 10:13:54 2022 +0800 drm/amd/pm: skip pptable override for smu_v13_0_7 skip pptable override for smu_v13_0_7 secure boards only. Signed-off-by: Kenneth Feng Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit b7ffeb4a1b5bce1a7495636d21f1704bd7ff01d3 Author: Evan Quan Date: Thu Jul 28 17:44:44 2022 +0800 drm/amd/pm: add 3715 softpptable support for SMU13.0.0 Add support for 3715 softpptable. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 352e683b72e79dbd46cbde528eb91e228e88267a Author: Joseph Greathouse Date: Thu Aug 4 09:54:57 2022 -0500 drm/amdgpu: Enable translate_further to extend UTCL2 reach Enable translate_further on Arcturus and Aldebaran server chips in order to increase the UTCL2 reach from 8 GiB to 64 GiB, which is more in line with the amount of framebuffer DRAM in the devices. Signed-off-by: Joseph Greathouse Acked-by: Felix Kuehling Acked-by: Kent Russell Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 +++ 1 file changed, 3 insertions(+) commit 8da536d5e114ad1da6028c7505f048ded2e421c6 Author: Aric Cyr Date: Mon Jul 25 01:54:00 2022 -0400 drm/amd/display: 3.2.197 This version brings along following fixes: - Move fpu file to dml folder - Fix CAB allocation for multiple displays - Add a variable to update FCLK - Fix TMDS 4K@60Hz YCbCr420 corruption issue - Fix MPC tree infinite loop in some case - Fix HDMI VSIF V3 blank screen issue - Add some documentation to the code - Allow alternate prefetch modes in DML for DCN32 - Fix VPG instancing for dcn314 HPO - Check correct bounds for stream encoder instances for DCN303 - Enable SubVP by default on DCN32 & DCN321 - Fix DTBCLK not correct for dcn314 - Fix Compile-time warning - Fix the stereo mode hang issue - Fix display light up issue Acked-by: Tom Chung Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f5171ce733a694bd0211952687704c7a5bf32b9 Author: Alvin Lee Date: Thu Jul 21 10:23:41 2022 -0400 drm/amd/display: Add 16 lines margin for SubVP [Description] SUBVP_START_LINE must be aligned to 2 swaths, so add 16 lines of margin so the start line can be adjusted by up to 16 lines for alignment purposes in FW. Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_optc.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 5 ++++- 6 files changed, 10 insertions(+), 4 deletions(-) commit 30456ffa65469d1d2e5e1da05017e6728d24c11c Author: Meenakshikumar Somasundaram Date: Mon Jul 11 18:37:41 2022 -0400 drm/amd/display: Fix TDR eDP and USB4 display light up issue [Why] After TDR recovery, eDP and USB4 display does not light up. Because dmub outbox notifications are not enabled after dmub reload and link encoder assignments for the streams are not cleared before dc state reset. [How] - Dmub outbox notification is enabled after tdr recovery by issuing inbox command to dmub. - Link encoders for the streams are unassigned before dc state reset. Reviewed-by: Jimmy Kizito Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: Meenakshikumar Somasundaram Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 1 + drivers/gpu/drm/amd/display/dc/dc_link.h | 1 + 2 files changed, 2 insertions(+) commit b2a93490201300a749ad261b5c5d05cb50179c44 Author: Fudong Wang Date: Wed Jul 27 12:01:29 2022 +0800 drm/amd/display: clear optc underflow before turn off odm clock [Why] After ODM clock off, optc underflow bit will be kept there always and clear not work. We need to clear that before clock off. [How] Clear that if have when clock off. Reviewed-by: Alvin Lee Acked-by: Tom Chung Signed-off-by: Fudong Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 5 +++++ 1 file changed, 5 insertions(+) commit f0068dd0effd5972046b69b23f99c43251e82d0e Author: Alvin Lee Date: Thu Jul 28 10:02:25 2022 -0400 drm/amd/display: Don't try to enter MALL SS if stereo3d [Description] MALL not supported with stereo3D according to DCN doc. Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 26 +++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) commit 84ef99c728079dfd21d6bc70b4c3e4af20602b3c Author: Alvin Lee Date: Thu Jul 28 09:51:05 2022 -0400 drm/amd/display: For stereo keep "FLIP_ANY_FRAME" [Description] Observed in stereomode that programming FLIP_LEFT_EYE can cause hangs. Keep FLIP_ANY_FRAME in stereo mode so the surface flip can take place before left or right eye Reviewed-by: Martin Leung Acked-by: Tom Chung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hubp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 764a1e6e0272f377f145fc84b547d61e12724233 Author: Alvin Lee Date: Tue Jul 26 19:00:23 2022 -0400 drm/amd/display: Revert "attempt to fix the logic in commit_planes_for_stream()" [Description] Reverts commit "attempt to fix the logic in commit_planes_for_stream()" since it caused a regression. Reviewed-by: Martin Leung Acked-by: Tom Chung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit 2051160546826cf312f15bde534038582b90f844 Author: Duncan Ma Date: Wed Jul 27 15:44:43 2022 -0400 drm/amd/display: Correct DTBCLK for dcn314 [Why] DTBCLK clocks reset after clocks are initialized and bounding box values are also incorrect. [How] Use dcn31 init clock function programming sequence and correct bounding box values for dcn314 Reviewed-by: Nicholas Kazlauskas Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: Duncan Ma Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c | 12 +----------- .../gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.h | 2 +- drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 10 +++++----- 3 files changed, 7 insertions(+), 17 deletions(-) commit f173c7405224002fc32b64cf1679c4d888c493eb Author: Aurabindo Pillai Date: Tue Jul 26 14:12:29 2022 -0400 drm/amd/display: Enable SubVP by default on DCN32 & DCN321 [Why&How] Set the debug options to enable SubVP feature Reviewed-by: Alvin Lee Acked-by: Tom Chung Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 89b008222c2bf21e50219725caed31590edfd9d1 Author: Aurabindo Pillai Date: Tue Jul 26 13:13:27 2022 -0400 drm/amd/display: Check correct bounds for stream encoder instances for DCN303 [Why & How] eng_id for DCN303 cannot be more than 1, since we have only two instances of stream encoders. Check the correct boundary condition for engine ID for DCN303 prevent the potential out of bounds access. Fixes: cd6d421e3d1a ("drm/amd/display: Initial DC support for Beige Goby") Reported-by: Dan Carpenter Cc: stable@vger.kernel.org Reviewed-by: Chris Park Reviewed-by: Rodrigo Siqueira Acked-by: Tom Chung Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6396679a1f2db0c63721b841f1a5617d6282a4b1 Author: Duncan Ma Date: Mon Jul 25 15:26:39 2022 -0400 drm/amd/display: Fix VPG instancing for dcn314 HPO [Why] An issue during VPG indexing offset generation causing to use the incorrect VPG. HW team placed VPG instances 5 at end of list, making it VPG 9 in register headers. [How] Correct VPG instance for HPO encoders. Reviewed-by: Charlene Liu Acked-by: Tom Chung Signed-off-by: Duncan Ma Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit dd07556324ece81f0d2be756508903d53e331e9e Author: David Galiffi Date: Fri Jul 22 16:03:13 2022 -0400 drm/amd/display: Fix Compile-time Warning Fixed bracketing around condition statement. Reviewed-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: David Galiffi Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 86678d46272021c88638881c63d427dd10d665d6 Author: David Galiffi Date: Wed Jul 20 17:54:05 2022 -0400 drm/amd/display: Allow alternate prefetch modes in DML for DCN32 [Why] Driver is restricting voltage levels if system cannot switch in vblank. [How] Change allow_for_pstate_or_stutter_in_vblank_final from dm_prefetch_support_uclk_fclk_and_stutter to dm_prefetch_support_uclk_fclk_and_stutter_if_possible. Add support for a new registry property, DalDMLDisallowAlternatePrefetchModes, for easier debugging. Reviewed-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: David Galiffi Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 34 +++++++++++++++------- 2 files changed, 25 insertions(+), 10 deletions(-) commit 0591183699fceeafb4c4141072d47775de83ecfb Author: Leo Ma Date: Fri Jul 22 13:42:58 2022 -0400 drm/amd/display: Fix HDMI VSIF V3 incorrect issue [Why] Reported from customer the checksum in AMD VSIF V3 is incorrect and causing blank screen issue. [How] Fix the packet length issue on AMD HDMI VSIF V3. Reviewed-by: Anthony Koo Acked-by: Tom Chung Signed-off-by: Leo Ma Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 615fc50207fa27453ba7f5fa1abd60a01a498136 Author: Josip Pavic Date: Thu Jul 21 15:33:00 2022 -0400 drm/amd/display: Avoid MPC infinite loop [Why] In some cases MPC tree bottom pipe ends up point to itself. This causes iterating from top to bottom to hang the system in an infinite loop. [How] When looping to next MPC bottom pipe, check that the pointer is not same as current to avoid infinite loop. Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: Josip Pavic Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 6 ++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_mpc.c | 6 ++++++ 2 files changed, 12 insertions(+) commit 9c580e8f6cd6524d4e2c3490c440110526f7ddd6 Author: Chiawen Huang Date: Thu Jul 21 21:57:05 2022 +0800 drm/amd/display: Device flash garbage before get in OS [Why] Enabling stream with tg lock makes config settings pending causing the garbage until tg unlock. [How] Keep the original lock mechanism The driver doesn't lock tg if plane_state is null. Reviewed-by: Anthony Koo Acked-by: Tom Chung Signed-off-by: Chiawen Huang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 + 1 file changed, 1 insertion(+) commit 9bd110ab06e93fd01938dedd8b6015940418f0fb Author: Daniel Miess Date: Tue Jul 19 11:43:28 2022 -0400 drm/amd/display: Fix TMDS 4K@60Hz YCbCr420 corruption issue [Why] DIG_FIFO_OUTPUT_PIXEL_MODE not being set for dcn314 resulting in incorrect timing for YCbCr4:2:0 [How] Copy the implementation of set_pixels_per_cycle from dcn32 over to dcn314 Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung Signed-off-by: Daniel Miess Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c | 28 ++++++++++++++++++++++ .../gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.h | 4 ++++ .../gpu/drm/amd/display/dc/dcn314/dcn314_init.c | 2 ++ 3 files changed, 34 insertions(+) commit 0cd34ce82b0a9ce503d35a51bff47ba3b6715557 Author: Alvin Lee Date: Wed Jul 20 13:16:59 2022 -0400 drm/amd/display: Add a variable to update FCLK latency [Description] Add a variable to update FCLK latency Reviewed-by: Martin Leung Acked-by: Tom Chung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 7 +++++++ drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c | 7 +++++++ 3 files changed, 15 insertions(+) commit 2de09ce41f484cbcc65e518905dae73da67ad35c Author: Aurabindo Pillai Date: Fri Jul 15 14:59:26 2022 -0400 drm/amd/display: fix CAB allocation for multiple displays [Why & How] When multiple displays are used, the underlying framebuffers could be two separate framebuffers, or a single large framebuffer. Fix the calculation logic for CAB to account for large framebuffer. Current logic assumes that any FB that the plane points to are independent. When a single FB is used on the system, this does 2 times allocation. Add a check to prevent duplicate allocation by checking if the base addresses are the same, and then ensuring that the if we allocate using the pitch, whole of the other fbs will be accounted for in the first allocation. Reviewed-by: Alvin Lee Acked-by: Tom Chung Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 0af167f92838f34e594e49a6c8cbaca45548e030 Author: Rodrigo Siqueira Date: Tue Jul 19 17:02:56 2022 -0400 drm/amd/display: Drop FPU flags from Makefile At this point, we isolate the FPU code associated with DCN314 under the DML folder. This commit drops the FPU flags from the Makefile. Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/Makefile | 25 ------------------------- 1 file changed, 25 deletions(-) commit 67c79599eea167dd5e08314b8c26f2dfa717753a Author: Rodrigo Siqueira Date: Tue Jul 19 16:57:23 2022 -0400 drm/amd/display: Move populate dml pipes from DCN314 to dml The function responsible for populating DML pipes has some FPU operations, and for this reason, it must be moved to the dml folder. This commit moves such function from resource to the fpu file under the dml folder. Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn314/dcn314_resource.c | 101 +------------------ .../gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 110 +++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.h | 3 + 3 files changed, 117 insertions(+), 97 deletions(-) commit 4c3861f587400db00801810eb8034c7b480e21dd Author: Rodrigo Siqueira Date: Tue Jul 19 16:28:50 2022 -0400 drm/amd/display: Create FPU files for DCN314 DCN314 has multiple references to FPU operations inside the resource files, and we need to move those codes to the DML folder. This commit creates the dcn314_fpu files and moves the bounding box operation to this file. Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn314/dcn314_resource.c | 235 +----------------- .../drm/amd/display/dc/dcn314/dcn314_resource.h | 3 + drivers/gpu/drm/amd/display/dc/dml/Makefile | 2 + .../gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 266 +++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.h | 37 +++ 5 files changed, 312 insertions(+), 231 deletions(-) commit 89390c4982b77c159e3b8a0be4a04552ef0971a0 Author: Daniel Miess Date: Tue Jul 19 14:07:41 2022 -0400 drm/amd/display: Use pixels per container logic for DCN314 DCCG dividers [Why] DP DSC YCbCr422 not working because dcn314_calculate_dccg_k1_k2_values does not account for two pixels per container [How] Replace the contents of dcn314_calculate_dccg_k1_k2_values with the code from the function dcn32_calculate_dccg_k1_k2_values Reviewed-by: Charlene Liu Acked-by: Tom Chung Signed-off-by: Daniel Miess Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 1ff77beac87682c22f99e5cf32614909c65b4a36 Author: Tim Huang Date: Fri Aug 5 15:31:37 2022 +0800 drm/amdgpu/pm: remove EnableGfxOff message for SMU IP v13.0.4 The EnableGfxOff message is dropped from the new PMFW ppsmc interface. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c | 14 -------------- 1 file changed, 14 deletions(-) commit 64234eabb8f38ac2bf77dd23140887d81acaabe2 Author: Tim Huang Date: Fri Aug 5 15:16:16 2022 +0800 drm/amdgpu/pm: update smu driver interface header for SMU IP v13.0.4 Update the SmuMetrics_t defination and SMU driver interface version. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_4.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fb1a140b7bd19c474a41fb2df8a845e8eba328fa Author: Tim Huang Date: Fri Jul 29 15:37:06 2022 +0800 drm/amdgpu: enable GFX Clock Gating control for GC IP v11.0.1 Enable GFX CG gate/ungate control. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 1 + 1 file changed, 1 insertion(+) commit 8df436d5ccdf7f441becb8e8156c8ca9c4276e8c Author: Tim Huang Date: Fri Jul 29 15:05:58 2022 +0800 drm/amdgpu: add GFX Clock Gating support for GC IP v11.0.1 Add below GFX Clock Gating supports: 1. GFX Coarse Grain Clock Gating(CGCG) 2. GFX Coarse grain light sleep/deep sleep(CGLS) 3. GFX Medium Grain Clock Gating(MGCG) 4. GFX Fine Grain Clock Gating(FGCG) 5. Repeater Fine Grain Clock Gating 6. Perfmon Clock Gating Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 08ebadfcd8c8c1cc7a14a7581db8331147b85fbb Author: Yifan Zhang Date: Thu Aug 4 16:44:56 2022 +0800 drm/amd/display: change family id name for DCN314 GC version is 11.0.1 rather than 11.0.2 Signed-off-by: Yifan Zhang Reviewed-by: Roman Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 4 ++-- drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 4 ++-- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 2 +- drivers/gpu/drm/amd/display/include/dal_asic_id.h | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) commit 616699d77b3813c24bf46090e722da227bd56cbf Author: Ma Jun Date: Mon Aug 1 09:52:47 2022 +0800 drm/amdgpu: Remove redundant reference of header file Remove redundant reference of header file dev_printk.h Signed-off-by: Ma Jun Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 1 - 1 file changed, 1 deletion(-) commit 6348aafa8d24c156124f76b5a1507079c3213112 Author: Sean Christopherson Date: Wed Jul 27 23:34:24 2022 +0000 KVM: VMX: Adjust number of LBR records for PERF_CAPABILITIES at refresh Now that the PMU is refreshed when MSR_IA32_PERF_CAPABILITIES is written by host userspace, zero out the number of LBR records for a vCPU during PMU refresh if PMU_CAP_LBR_FMT is not set in PERF_CAPABILITIES instead of handling the check at run-time. guest_cpuid_has() is expensive due to the linear search of guest CPUID entries, intel_pmu_lbr_is_enabled() is checked on every VM-Enter, _and_ simply enumerating the same "Model" as the host causes KVM to set the number of LBR records to a non-zero value. Signed-off-by: Sean Christopherson Message-Id: <20220727233424.2968356-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/pmu_intel.c | 12 +++--------- arch/x86/kvm/vmx/vmx.h | 7 +++++-- 2 files changed, 8 insertions(+), 11 deletions(-) commit 7de8e5b6b139a3a94aca24e8d8d35b77dc33e0ac Author: Sean Christopherson Date: Wed Jul 27 23:34:23 2022 +0000 KVM: VMX: Use proper type-safe functions for vCPU => LBRs helpers Turn vcpu_to_lbr_desc() and vcpu_to_lbr_records() into functions in order to provide type safety, to document exactly what they return, and to allow consuming the helpers in vmx.h. Move the definitions as necessary (the macros "reference" to_vmx() before its definition). No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220727233424.2968356-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.h | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit 17a024a8b981243fa1d17cf0084de43cc5f9b603 Author: Sean Christopherson Date: Wed Jul 27 23:34:22 2022 +0000 KVM: x86: Refresh PMU after writes to MSR_IA32_PERF_CAPABILITIES Refresh the PMU if userspace modifies MSR_IA32_PERF_CAPABILITIES. KVM consumes the vCPU's PERF_CAPABILITIES when enumerating PEBS support, but relies on CPUID updates to refresh the PMU. I.e. KVM will do the wrong thing if userspace stuffs PERF_CAPABILITIES _after_ setting guest CPUID. Opportunistically fix a curly-brace indentation. Fixes: c59a1f106f5c ("KVM: x86/pmu: Add IA32_PEBS_ENABLE MSR emulation for extended PEBS") Cc: Like Xu Signed-off-by: Sean Christopherson Message-Id: <20220727233424.2968356-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9d27d46160737fc0da7c6b7b9b44ec5135322d2c Author: Sean Christopherson Date: Thu Aug 4 12:18:15 2022 -0700 KVM: selftests: Test all possible "invalid" PERF_CAPABILITIES.LBR_FMT vals Test all possible input values to verify that KVM rejects all values except the exact host value. Due to the LBR format affecting the core functionality of LBRs, KVM can't emulate "other" formats, so even though there are a variety of legal values, KVM should reject anything but an exact host match. Suggested-by: Like Xu Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/vmx_pmu_caps_test.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 0fcc102923dee97bf33bd199d5b26a6735e16097 Author: Gavin Shan Date: Wed Aug 10 18:41:14 2022 +0800 KVM: selftests: Use getcpu() instead of sched_getcpu() in rseq_test sched_getcpu() is glibc dependent and it can simply return the CPU ID from the registered rseq information, as Florian Weimer pointed. In this case, it's pointless to compare the return value from sched_getcpu() and that fetched from the registered rseq information. Fix the issue by replacing sched_getcpu() with getcpu(), as Florian suggested. The comments are modified accordingly by replacing "sched_getcpu()" with "getcpu()". Reported-by: Yihuang Yu Suggested-by: Florian Weimer Suggested-by: Mathieu Desnoyers Suggested-by: Sean Christopherson Signed-off-by: Gavin Shan Message-Id: <20220810104114.6838-3-gshan@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/rseq_test.c | 42 +++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 15 deletions(-) commit 66d42ac73fc680dbd7a1402f8b44967426522d0f Author: Gavin Shan Date: Wed Aug 10 18:41:13 2022 +0800 KVM: selftests: Make rseq compatible with glibc-2.35 The rseq information is registered by TLS, starting from glibc-2.35. In this case, the test always fails due to syscall(__NR_rseq). For example, on RHEL9.1 where upstream glibc-2.35 features are enabled on downstream glibc-2.34, the test fails like below. # ./rseq_test ==== Test Assertion Failure ==== rseq_test.c:60: !r pid=112043 tid=112043 errno=22 - Invalid argument 1 0x0000000000401973: main at rseq_test.c:226 2 0x0000ffff84b6c79b: ?? ??:0 3 0x0000ffff84b6c86b: ?? ??:0 4 0x0000000000401b6f: _start at ??:? rseq failed, errno = 22 (Invalid argument) # rpm -aq | grep glibc-2 glibc-2.34-39.el9.aarch64 Fix the issue by using "../rseq/rseq.c" to fetch the rseq information, registred by TLS if it exists. Otherwise, we're going to register our own rseq information as before. Reported-by: Yihuang Yu Suggested-by: Florian Weimer Suggested-by: Mathieu Desnoyers Suggested-by: Paolo Bonzini Signed-off-by: Gavin Shan Message-Id: <20220810104114.6838-2-gshan@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/Makefile | 5 +++-- tools/testing/selftests/kvm/rseq_test.c | 26 ++++++-------------------- 2 files changed, 9 insertions(+), 22 deletions(-) commit b74ed7a68ec183403763571a54ca3dcc24cf19eb Author: Oliver Upton Date: Wed Jul 20 09:22:51 2022 +0000 KVM: Actually create debugfs in kvm_create_vm() Doing debugfs creation after vm creation leaves things in a quasi-initialized state for a while. This is further complicated by the fact that we tear down debugfs from kvm_destroy_vm(). Align debugfs and stats init/destroy with the vm init/destroy pattern to avoid any headaches. Note the fix for a benign mistake in error handling for calls to kvm_arch_create_vm_debugfs() rolled in. Since all implementations of the function return 0 unconditionally it isn't actually a bug at the moment. Lastly, tear down debugfs/stats data in the kvm_create_vm_debugfs() error path. Previously it was safe to assume that kvm_destroy_vm() would take out the garbage, that is no longer the case. Signed-off-by: Oliver Upton Message-Id: <20220720092259.3491733-6-oliver.upton@linux.dev> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit 59f82aad5940ffd0fedfe07ff755168722193d56 Author: Oliver Upton Date: Wed Jul 20 09:22:50 2022 +0000 KVM: Pass the name of the VM fd to kvm_create_vm_debugfs() At the time the VM fd is used in kvm_create_vm_debugfs(), the fd has been allocated but not yet installed. It is only really useful as an identifier in strings for the VM (such as debugfs). Treat it exactly as such by passing the string name of the fd to kvm_create_vm_debugfs(), futureproofing against possible misuse of the VM fd. Suggested-by: Sean Christopherson Signed-off-by: Oliver Upton Message-Id: <20220720092259.3491733-5-oliver.upton@linux.dev> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 20020f4cf2f92115c34b7bbaea02fcc810709a7e Author: Oliver Upton Date: Wed Jul 20 09:22:49 2022 +0000 KVM: Get an fd before creating the VM Allocate a VM's fd at the very beginning of kvm_dev_ioctl_create_vm() so that KVM can use the fd value to generate strigns, e.g. for debugfs, when creating and initializing the VM. Signed-off-by: Oliver Upton Message-Id: <20220720092259.3491733-4-oliver.upton@linux.dev> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit 58fc116645c53db117c8e6c7b549b228e24a6c73 Author: Oliver Upton Date: Wed Jul 20 09:22:48 2022 +0000 KVM: Shove vcpu stats_id init into kvm_vcpu_init() Initialize stats_id alongside other kvm_vcpu fields to make it more difficult to unintentionally access stats_id before it's set. No functional change intended. Signed-off-by: Oliver Upton Message-Id: <20220720092259.3491733-3-oliver.upton@linux.dev> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f2759c08d8f4d584e88d129e7392260fb4079ec2 Author: Oliver Upton Date: Wed Jul 20 09:22:47 2022 +0000 KVM: Shove vm stats_id init into kvm_create_vm() Initialize stats_id alongside other struct kvm fields to make it more difficult to unintentionally access stats_id before it's set. While at it, move the format string to the first line of the call and fix the indentation of the second line. No functional change intended. Signed-off-by: Oliver Upton Message-Id: <20220720092259.3491733-2-oliver.upton@linux.dev> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8bad4606acc91523f54fe4f254fd9f187cd21204 Author: Sean Christopherson Date: Fri Aug 5 19:41:33 2022 +0000 KVM: x86/mmu: Add sanity check that MMIO SPTE mask doesn't overlap gen Add compile-time and init-time sanity checks to ensure that the MMIO SPTE mask doesn't overlap the MMIO SPTE generation or the MMU-present bit. The generation currently avoids using bit 63, but that's as much coincidence as it is strictly necessarly. That will change in the future, as TDX support will require setting bit 63 (SUPPRESS_VE) in the mask. Explicitly carve out the bits that are allowed in the mask so that any future shuffling of SPTE bits doesn't silently break MMIO caching (KVM has broken MMIO caching more than once due to overlapping the generation with other things). Suggested-by: Kai Huang Signed-off-by: Sean Christopherson Reviewed-by: Kai Huang Message-Id: <20220805194133.86299-1-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/spte.c | 8 ++++++++ arch/x86/kvm/mmu/spte.h | 14 ++++++++++++++ 2 files changed, 22 insertions(+) commit 1685c0f32554a7f35962061d17155c58454f1cd2 Author: Mingwei Zhang Date: Sun Aug 7 05:21:41 2022 +0000 KVM: x86/mmu: rename trace function name for asynchronous page fault Rename the tracepoint function from trace_kvm_async_pf_doublefault() to trace_kvm_async_pf_repeated_fault() to make it clear, since double fault has nothing to do with this trace function. Asynchronous Page Fault (APF) is an artifact generated by KVM when it cannot find a physical page to satisfy an EPT violation. KVM uses APF to tell the guest OS to do something else such as scheduling other guest processes to make forward progress. However, when another guest process also touches a previously APFed page, KVM halts the vCPU instead of generating a repeated APF to avoid wasting cycles. Double fault (#DF) clearly has a different meaning and a different consequence when triggered. #DF requires two nested contributory exceptions instead of two page faults faulting at the same address. A prevous bug on APF indicates that it may trigger a double fault in the guest [1] and clearly this trace function has nothing to do with it. So rename this function should be a valid choice. No functional change intended. [1] https://www.spinics.net/lists/kvm/msg214957.html Signed-off-by: Mingwei Zhang Message-Id: <20220807052141.69186-1-mizhang@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 2 +- include/trace/events/kvm.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c036899136355758dcd88878145036ab4d9c1f26 Author: Coleman Dietsch Date: Mon Aug 8 14:06:07 2022 -0500 KVM: x86/xen: Stop Xen timer before changing IRQ Stop Xen timer (if it's running) prior to changing the IRQ vector and potentially (re)starting the timer. Changing the IRQ vector while the timer is still running can result in KVM injecting a garbage event, e.g. vm_xen_inject_timer_irqs() could see a non-zero xen.timer_pending from a previous timer but inject the new xen.timer_virq. Fixes: 536395260582 ("KVM: x86/xen: handle PV timers oneshot mode") Cc: stable@vger.kernel.org Link: https://syzkaller.appspot.com/bug?id=8234a9dfd3aafbf092cc5a7cd9842e3ebc45fc42 Reported-by: syzbot+e54f930ed78eb0f85281@syzkaller.appspotmail.com Signed-off-by: Coleman Dietsch Reviewed-by: Sean Christopherson Acked-by: David Woodhouse Message-Id: <20220808190607.323899-3-dietschc@csp.edu> Signed-off-by: Paolo Bonzini arch/x86/kvm/xen.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) commit af735db31285fa699384c649be72a9f32ecbb665 Author: Coleman Dietsch Date: Mon Aug 8 14:06:06 2022 -0500 KVM: x86/xen: Initialize Xen timer only once Add a check for existing xen timers before initializing a new one. Currently kvm_xen_init_timer() is called on every KVM_XEN_VCPU_ATTR_TYPE_TIMER, which is causing the following ODEBUG crash when vcpu->arch.xen.timer is already set. ODEBUG: init active (active state 0) object type: hrtimer hint: xen_timer_callbac0 RIP: 0010:debug_print_object+0x16e/0x250 lib/debugobjects.c:502 Call Trace: __debug_object_init debug_hrtimer_init debug_init hrtimer_init kvm_xen_init_timer kvm_xen_vcpu_set_attr kvm_arch_vcpu_ioctl kvm_vcpu_ioctl vfs_ioctl Fixes: 536395260582 ("KVM: x86/xen: handle PV timers oneshot mode") Cc: stable@vger.kernel.org Link: https://syzkaller.appspot.com/bug?id=8234a9dfd3aafbf092cc5a7cd9842e3ebc45fc42 Reported-by: syzbot+e54f930ed78eb0f85281@syzkaller.appspotmail.com Signed-off-by: Coleman Dietsch Reviewed-by: Sean Christopherson Message-Id: <20220808190607.323899-2-dietschc@csp.edu> Signed-off-by: Paolo Bonzini arch/x86/kvm/xen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0c29397ac1fdd64ae59941a477511a05e61a4754 Author: Sean Christopherson Date: Wed Aug 3 22:49:57 2022 +0000 KVM: SVM: Disable SEV-ES support if MMIO caching is disable Disable SEV-ES if MMIO caching is disabled as SEV-ES relies on MMIO SPTEs generating #NPF(RSVD), which are reflected by the CPU into the guest as a #VC. With SEV-ES, the untrusted host, a.k.a. KVM, doesn't have access to the guest instruction stream or register state and so can't directly emulate in response to a #NPF on an emulated MMIO GPA. Disabling MMIO caching means guest accesses to emulated MMIO ranges cause #NPF(!PRESENT), and those flavors of #NPF cause automatic VM-Exits, not #VC. Adjust KVM's MMIO masks to account for the C-bit location prior to doing SEV(-ES) setup, and document that dependency between adjusting the MMIO SPTE mask and SEV(-ES) setup. Fixes: b09763da4dd8 ("KVM: x86/mmu: Add module param to disable MMIO caching (for testing)") Reported-by: Michael Roth Tested-by: Michael Roth Cc: Tom Lendacky Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20220803224957.1285926-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.h | 2 ++ arch/x86/kvm/mmu/spte.c | 1 + arch/x86/kvm/mmu/spte.h | 2 -- arch/x86/kvm/svm/sev.c | 10 ++++++++++ arch/x86/kvm/svm/svm.c | 9 ++++++--- 5 files changed, 19 insertions(+), 5 deletions(-) commit c3e0c8c2e8b17bae30d5978bc2decdd4098f0f99 Author: Sean Christopherson Date: Wed Aug 3 22:49:56 2022 +0000 KVM: x86/mmu: Fully re-evaluate MMIO caching when SPTE masks change Fully re-evaluate whether or not MMIO caching can be enabled when SPTE masks change; simply clearing enable_mmio_caching when a configuration isn't compatible with caching fails to handle the scenario where the masks are updated, e.g. by VMX for EPT or by SVM to account for the C-bit location, and toggle compatibility from false=>true. Snapshot the original module param so that re-evaluating MMIO caching preserves userspace's desire to allow caching. Use a snapshot approach so that enable_mmio_caching still reflects KVM's actual behavior. Fixes: 8b9e74bfbf8c ("KVM: x86/mmu: Use enable_mmio_caching to track if MMIO caching is enabled") Reported-by: Michael Roth Cc: Tom Lendacky Cc: stable@vger.kernel.org Tested-by: Michael Roth Signed-off-by: Sean Christopherson Reviewed-by: Kai Huang Message-Id: <20220803224957.1285926-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 4 ++++ arch/x86/kvm/mmu/spte.c | 19 +++++++++++++++++++ arch/x86/kvm/mmu/spte.h | 1 + 3 files changed, 24 insertions(+) commit 982bae43f11c37b51d2f1961bb25ef7cac3746fa Author: Sean Christopherson Date: Wed Aug 3 22:49:55 2022 +0000 KVM: x86: Tag kvm_mmu_x86_module_init() with __init Mark kvm_mmu_x86_module_init() with __init, the entire reason it exists is to initialize variables when kvm.ko is loaded, i.e. it must never be called after module initialization. Fixes: 1d0e84806047 ("KVM: x86/mmu: Resolve nx_huge_pages when kvm.ko is loaded") Cc: stable@vger.kernel.org Reviewed-by: Kai Huang Tested-by: Michael Roth Signed-off-by: Sean Christopherson Message-Id: <20220803224957.1285926-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/mmu/mmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4ac5b4237793a6db791999edd53f0396c04053cd Author: Michal Luczaj Date: Fri Jul 29 15:48:01 2022 +0200 KVM: x86: emulator: Fix illegal LEA handling The emulator mishandles LEA with register source operand. Even though such LEA is illegal, it can be encoded and fed to CPU. In which case real hardware throws #UD. The emulator, instead, returns address of x86_emulate_ctxt._regs. This info leak hurts host's kASLR. Tell the decoder that illegal LEA is not to be emulated. Signed-off-by: Michal Luczaj Message-Id: <20220729134801.1120-1-mhal@rbox.co> Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 2bc685e63332957f906446d281162f93b5d523fa Author: Yu Zhang Date: Mon Jul 18 15:47:56 2022 +0800 KVM: X86: avoid uninitialized 'fault.async_page_fault' from fixed-up #PF kvm_fixup_and_inject_pf_error() was introduced to fixup the error code( e.g., to add RSVD flag) and inject the #PF to the guest, when guest MAXPHYADDR is smaller than the host one. When it comes to nested, L0 is expected to intercept and fix up the #PF and then inject to L2 directly if - L2.MAXPHYADDR < L0.MAXPHYADDR and - L1 has no intention to intercept L2's #PF (e.g., L2 and L1 have the same MAXPHYADDR value && L1 is using EPT for L2), instead of constructing a #PF VM Exit to L1. Currently, with PFEC_MASK and PFEC_MATCH both set to 0 in vmcs02, the interception and injection may happen on all L2 #PFs. However, failing to initialize 'fault' in kvm_fixup_and_inject_pf_error() may cause the fault.async_page_fault being NOT zeroed, and later the #PF being treated as a nested async page fault, and then being injected to L1. Instead of zeroing 'fault' at the beginning of this function, we mannually set the value of 'fault.async_page_fault', because false is the value we really expect. Fixes: 897861479c064 ("KVM: x86: Add helper functions for illegal GPA checking and page fault injection") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=216178 Reported-by: Yang Lixiao Signed-off-by: Yu Zhang Reviewed-by: Sean Christopherson Message-Id: <20220718074756.53788-1-yu.c.zhang@linux.intel.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 1 + 1 file changed, 1 insertion(+) commit 70c8327c11c6d4080d4a774f531c6a6521592568 Author: Sean Christopherson Date: Thu Aug 4 23:50:28 2022 +0000 KVM: x86: Bug the VM if an accelerated x2APIC trap occurs on a "bad" reg Bug the VM if retrieving the x2APIC MSR/register while processing an accelerated vAPIC trap VM-Exit fails. In theory it's impossible for the lookup to fail as hardware has already validated the register, but bugs happen, and not checking the result of kvm_lapic_msr_read() would result in consuming the uninitialized "val" if a KVM or hardware bug occurs. Fixes: 1bd9dfec9fd4 ("KVM: x86: Do not block APIC write for non ICR registers") Reported-by: Dan Carpenter Cc: Suravee Suthikulpanit Signed-off-by: Sean Christopherson Message-Id: <20220804235028.1766253-1-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit c3c28d24d910a746b02f496d190e0e8c6560224b Author: Paolo Bonzini Date: Thu Aug 4 15:28:32 2022 +0200 KVM: x86: do not report preemption if the steal time cache is stale Commit 7e2175ebd695 ("KVM: x86: Fix recording of guest steal time / preempted status", 2021-11-11) open coded the previous call to kvm_map_gfn, but in doing so it dropped the comparison between the cached guest physical address and the one in the MSR. This cause an incorrect cache hit if the guest modifies the steal time address while the memslots remain the same. This can happen with kexec, in which case the preempted bit is written at the address used by the old kernel instead of the old one. Cc: David Woodhouse Cc: stable@vger.kernel.org Fixes: 7e2175ebd695 ("KVM: x86: Fix recording of guest steal time / preempted status") Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 2 ++ 1 file changed, 2 insertions(+) commit 901d3765fa804ce42812f1d5b1f3de2dfbb26723 Author: Paolo Bonzini Date: Thu Aug 4 15:28:32 2022 +0200 KVM: x86: revalidate steal time cache if MSR value changes Commit 7e2175ebd695 ("KVM: x86: Fix recording of guest steal time / preempted status", 2021-11-11) open coded the previous call to kvm_map_gfn, but in doing so it dropped the comparison between the cached guest physical address and the one in the MSR. This cause an incorrect cache hit if the guest modifies the steal time address while the memslots remain the same. This can happen with kexec, in which case the steal time data is written at the address used by the old kernel instead of the old one. While at it, rename the variable from gfn to gpa since it is a plain physical address and not a right-shifted one. Reported-by: Dave Young Reported-by: Xiaoying Yan Analyzed-by: Dr. David Alan Gilbert Cc: David Woodhouse Cc: stable@vger.kernel.org Fixes: 7e2175ebd695 ("KVM: x86: Fix recording of guest steal time / preempted status") Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit baea2ce53f8c7448b4b8dadb563eb0df1bfdfb33 Author: Paolo Bonzini Date: Wed Aug 10 14:55:27 2022 -0400 selftests: kvm: fix compilation Commit 49de12ba06ef ("selftests: drop KSFT_KHDR_INSTALL make target") dropped from tools/testing/selftests/lib.mk the code related to KSFT_KHDR_INSTALL, but in doing so it also dropped the definition of the ARCH variable. The ARCH variable is used in several subdirectories, but kvm/ is the only one of these that was using KSFT_KHDR_INSTALL. As a result, kvm selftests cannot be built anymore: In file included from include/x86_64/vmx.h:12, from x86_64/vmx_pmu_caps_test.c:18: include/x86_64/processor.h:15:10: fatal error: asm/msr-index.h: No such file or directory 15 | #include | ^~~~~~~~~~~~~~~~~ In file included from ../../../../tools/include/asm/atomic.h:6, from ../../../../tools/include/linux/atomic.h:5, from rseq_test.c:15: ../../../../tools/include/asm/../../arch/x86/include/asm/atomic.h:11:10: fatal error: asm/cmpxchg.h: No such file or directory 11 | #include | ^~~~~~~~~~~~~~~ Fix it by including the definition that was present in lib.mk. Fixes: 49de12ba06ef ("selftests: drop KSFT_KHDR_INSTALL make target") Cc: Guillaume Tucker Cc: Anders Roxell Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 0a83bb35d8a6ff3d18c2772afe616780c23293a6 Author: Lijo Lazar Date: Wed Aug 3 16:54:24 2022 +0530 drm/amdgpu: Avoid another list of reset devices A list of devices to be reset is already created in amdgpu_device_gpu_recover function. Creating another list with the same nodes is incorrect and not supported in list_head. Instead, pass the device list as part of reset context. Fixes: 9e08564727fc (drm/amdgpu: Refactor mode2 reset logic for v13.0.2) Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/aldebaran.c | 45 ++++++++++-------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h | 1 + 3 files changed, 17 insertions(+), 31 deletions(-) commit b2f6c73561fbccee404b441a5c2d0b4fefaae817 Author: Magali Lemes Date: Fri Jul 29 22:07:02 2022 -0300 drm/amd/display: include missing headers Add missing headers to solve the following warnings from sparse: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/dcn20_fpu.c:656:17: warning: symbol 'ddr4_wm_table_gs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/dcn20_fpu.c:693:17: warning: symbol 'lpddr4_wm_table_gs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/dcn20_fpu.c:730:17: warning: symbol 'lpddr4_wm_table_with_disabled_ppt' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/dcn20_fpu.c:767:17: warning: symbol 'ddr4_wm_table_rn' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/dcn20_fpu.c:804:17: warning: symbol 'ddr4_1R_wm_table_rn' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/dcn20_fpu.c:841:17: warning: symbol 'lpddr4_wm_table_rn' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn301/dcn301_fpu.c:217:17: warning: symbol 'ddr4_wm_table' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn301/dcn301_fpu.c:254:17: warning: symbol 'lpddr5_wm_table' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/dcn31_fpu.c:53:30: warning: symbol 'dcn3_1_ip' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/dcn31_fpu.c:197:30: warning: symbol 'dcn3_15_ip' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/dcn31_fpu.c:293:30: warning: symbol 'dcn3_16_ip' was not declared. Should it be static? Fixes: 1a3408259bfd ("drm/amd/display: move FPU code on dcn21 clk_mgr") Fixes: 5085e0361f5a ("drm/amd/display: move FPU code from dcn301 clk mgr to DML folder") Fixes: 26f4712aedbd ("drm/amd/display: move FPU related code from dcn31 to dml/dcn31 folder") Fixes: fa896297b31b ("drm/amd/display: move FPU related code from dcn315 to dml/dcn31 folder") Fixes: 3f8951cc123f ("drm/amd/display: move FPU related code from dcn316 to dml/dcn31 folder") Signed-off-by: Magali Lemes Reviewed-by: Rodrigo Siqueira Reviewed-by: Maíra Canal Reviewed-by: Melissa Wen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 1 + drivers/gpu/drm/amd/display/dc/dml/dcn301/dcn301_fpu.c | 1 + drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 3 +++ 3 files changed, 5 insertions(+) commit 4a0a2cf4c03ba49a4c2596c49c7daa719917d509 Author: Likun Gao Date: Wed Aug 3 12:16:35 2022 +0800 drm/amdgpu: change vram width algorithm for vram_info v3_0 Update the vram width algorithm for vram_info v3_0 to align with the changes of latest IFWI. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.19.x drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ac354beecfd58e769fb5373d6b2ac87bce9e1e4 Author: Daniel Phillips Date: Thu Jul 28 20:05:08 2022 -0700 drm/amdgpu: Pessimistic availability based on rounded up allocations Separately accumulate a statistic of rounded up allocations to use to report availability, with a view to increasing the likelihood a buffer object can be successfully allocated at exactly the size reported by the availability API. Signed-off-by: Daniel Phillips Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) commit aec208eecfb833b05597bbc28696fb1ab62f732c Author: Daniel Phillips Date: Mon Jul 25 08:48:00 2022 -0700 drm/amdgpu: Remove rounding from vram allocation path Rounding up allocations in the allocation path caused test regressions, so now just round in the availability path. Signed-off-by: Daniel Phillips Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit f59966779deac642541c3f7d772a3bf5972727ed Author: Magali Lemes Date: Fri Jul 29 22:07:00 2022 -0300 drm/amd/display: remove header from source file Since "rn_clk_mgr.h" needs ‘struct clk_mgr_internal’ which is declared in "clk_mgr_internal.h", include "clk_mgr_internal.h" in "rn_clk_mgr.h" instead of in its source file. Because of the change above, change the order of '#include "rn_clk_mgr.h"', so that the necessary structs are visible to dcn20_clk_mgr.h. Signed-off-by: Magali Lemes Reviewed-by: Rodrigo Siqueira Reviewed-by: Maíra Canal Reviewed-by: Melissa Wen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 3 +-- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) commit c83b9d60299317a2c15550dd506c864cd01a3e5e Author: Magali Lemes Date: Fri Jul 29 22:06:58 2022 -0300 drm/amd/display: make variables static As "dcn3_1_soc", "dcn3_15_soc", and "dcn3_16_soc" are not used outside of their corresponding "dcn3*_fpu.c", make them static and remove their extern declaration. Fixes: 26f4712aedbd ("drm/amd/display: move FPU related code from dcn31 to dml/dcn31 folder") Fixes: fa896297b31b ("drm/amd/display: move FPU related code from dcn315 to dml/dcn31 folder") Fixes: 3f8951cc123f ("drm/amd/display: move FPU related code from dcn316 to dml/dcn31 folder") Signed-off-by: Magali Lemes Reviewed-by: Rodrigo Siqueira Reviewed-by: Maíra Canal Reviewed-by: Melissa Wen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.h | 1 - drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h | 1 - drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h | 1 - drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 6 +++--- 4 files changed, 3 insertions(+), 6 deletions(-) commit 41ead3e0cdc03d64b7da2dcb1fd70ebb7164228b Author: Magali Lemes Date: Tue Aug 2 09:04:06 2022 -0300 drm/amd/display: remove DML Makefile duplicate lines There are two identical CFLAGS entries for "display_mode_vba_20.o", so remove one of them. Also, as there's already an entry for "display_mode_lib.o" CFLAGS, regardless of CONFIG_DRM_AMD_DC_DCN being defined or not, remove the one entry between CONFIG_DRM_AMD_DC_DCN ifdef guards. Signed-off-by: Magali Lemes Reviewed-by: André Almeida Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/Makefile | 2 -- 1 file changed, 2 deletions(-) commit 5822b8acb869caac72c3ddf149d463177aa28fd4 Author: Rodrigo Siqueira Date: Wed Jul 27 17:55:45 2022 -0400 Revert "drm/amd/display: reduce stack for dml32_CalculateSwathAndDETConfiguration" This reverts commit bac4b41d917a1d999308bb1e779f8c3b39c19f67. This commit was a part of a patchset responsible for reducing the stack size. However, after some other changes, this commit becomes unnecessary, so we are reverting it here. Cc: Aurabindo Pillai Reported-by: Stephen Rothwell Reviewed-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 3 - .../dc/dml/dcn32/display_mode_vba_util_32.c | 121 +++++++++++---------- .../dc/dml/dcn32/display_mode_vba_util_32.h | 2 - .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 15 --- 4 files changed, 64 insertions(+), 77 deletions(-) commit 968d40986f004b463f057fce612996556b753c9e Author: Rodrigo Siqueira Date: Wed Jul 27 17:55:33 2022 -0400 Revert "drm/amd/display: reduce stack for dml32_CalculateVMRowAndSwath" This reverts commit c3b3f9ba25e6cbe59673505fbc5fff6c4cda0ef7. This commit was a part of a patchset responsible for reducing the stack size. However, after some other changes, this commit becomes unnecessary, so we are reverting it here. Cc: Aurabindo Pillai Reported-by: Stephen Rothwell Reviewed-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 2 - .../dc/dml/dcn32/display_mode_vba_util_32.c | 110 ++++++++++++--------- .../dc/dml/dcn32/display_mode_vba_util_32.h | 1 - .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 19 ---- 4 files changed, 62 insertions(+), 70 deletions(-) commit 0ee7cc803ae52b60f268fdf2eba79b9fc1162747 Author: Rodrigo Siqueira Date: Wed Jul 27 17:55:21 2022 -0400 Revert "drm/amd/display: reduce stack for dml32_CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport" This reverts commit 3c3abac60117cfd09460980d9a14c253b37f7b00. This commit was a part of a patchset responsible for reducing the stack size. However, after some other changes, this commit becomes unnecessary, so we are reverting it here. Cc: Aurabindo Pillai Reported-by: Stephen Rothwell Reviewed-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 2 - .../dc/dml/dcn32/display_mode_vba_util_32.c | 187 ++++++++++++--------- .../dc/dml/dcn32/display_mode_vba_util_32.h | 1 - .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 34 ---- 4 files changed, 104 insertions(+), 120 deletions(-) commit efcc970605a4e365151db247361bb013f5c84922 Author: Rodrigo Siqueira Date: Wed Jul 27 17:55:10 2022 -0400 Revert "drm/amd/display: reduce stack for dml32_CalculatePrefetchSchedule" This reverts commit 86e4863e67a9bd1e257f162f3d740ebb61206c91. This commit was a part of a patchset responsible for reducing the stack size. However, after some other changes, this commit becomes unnecessary, so we are reverting it here. Cc: Aurabindo Pillai Reported-by: Stephen Rothwell Reviewed-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 5 +- .../dc/dml/dcn32/display_mode_vba_util_32.c | 394 +++++++++++---------- .../dc/dml/dcn32/display_mode_vba_util_32.h | 1 - .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 38 -- 4 files changed, 211 insertions(+), 227 deletions(-) commit 37bc31f0e7da4fbad4664e64d906ae7b9009e550 Author: Aurabindo Pillai Date: Fri Jul 29 13:36:31 2022 -0400 drm/amd/display: Add a missing register field for HPO DP stream encoder [Why&How] Add the missing definition to set the register field HBLANK_MINIMUM_SYMBOL_WIDTH Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hpo_dp_stream_encoder.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f41445645ab5d172e6090d00c332c335d8dba337 Merge: b196f3d101fe f4e6960f4f16 Author: Linus Torvalds Date: Wed Aug 10 11:30:16 2022 -0700 Merge tag 'hwmon-fixes-for-v6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: "Fix two regressions in nct6775 and lm90 drivers" * tag 'hwmon-fixes-for-v6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (nct6775) Fix platform driver suspend regression hwmon: (lm90) Fix error return value from detect function commit b196f3d101fecbd25ca5ccf0d3ef65a272bc2b43 Merge: b1701d5e29eb 56e07c0c9e4a Author: Linus Torvalds Date: Wed Aug 10 11:28:14 2022 -0700 Merge tag 'rpmsg-v5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull rpmsg fixes from Bjorn Andersson: "This fixes schema validation warnings in the Devicetree bindings for SMD and SMD RPM" * tag 'rpmsg-v5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: dt-bindings: soc: qcom: smd-rpm: extend example dt-bindings: soc: qcom: smd: reference SMD edge schema commit b1701d5e29eb0a102aa3393319b3e4eb1a19c6ea Merge: c235698355fa a9e9c93966af Author: Linus Torvalds Date: Wed Aug 10 11:18:00 2022 -0700 Merge tag 'mm-stable-2022-08-09' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull remaining MM updates from Andrew Morton: "Three patch series - two that perform cleanups and one feature: - hugetlb_vmemmap cleanups from Muchun Song - hardware poisoning support for 1GB hugepages, from Naoya Horiguchi - highmem documentation fixups from Fabio De Francesco" * tag 'mm-stable-2022-08-09' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (23 commits) Documentation/mm: add details about kmap_local_page() and preemption highmem: delete a sentence from kmap_local_page() kdocs Documentation/mm: rrefer kmap_local_page() and avoid kmap() Documentation/mm: avoid invalid use of addresses from kmap_local_page() Documentation/mm: don't kmap*() pages which can't come from HIGHMEM highmem: specify that kmap_local_page() is callable from interrupts highmem: remove unneeded spaces in kmap_local_page() kdocs mm, hwpoison: enable memory error handling on 1GB hugepage mm, hwpoison: skip raw hwpoison page in freeing 1GB hugepage mm, hwpoison: make __page_handle_poison returns int mm, hwpoison: set PG_hwpoison for busy hugetlb pages mm, hwpoison: make unpoison aware of raw error info in hwpoisoned hugepage mm, hwpoison, hugetlb: support saving mechanism of raw error pages mm/hugetlb: make pud_huge() and follow_huge_pud() aware of non-present pud entry mm/hugetlb: check gigantic_page_runtime_supported() in return_unused_surplus_pages() mm: hugetlb_vmemmap: use PTRS_PER_PTE instead of PMD_SIZE / PAGE_SIZE mm: hugetlb_vmemmap: move code comments to vmemmap_dedup.rst mm: hugetlb_vmemmap: improve hugetlb_vmemmap code readability mm: hugetlb_vmemmap: replace early_param() with core_param() mm: hugetlb_vmemmap: move vmemmap code related to HugeTLB to hugetlb_vmemmap.c ... commit c235698355fa94df7073b51befda7d4be00a0e23 Merge: 5e2e7383b57f 1cd8a2537eb0 Author: Linus Torvalds Date: Wed Aug 10 11:07:26 2022 -0700 Merge tag 'cxl-for-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull cxl updates from Dan Williams: "Compute Express Link (CXL) updates for 6.0: - Introduce a 'struct cxl_region' object with support for provisioning and assembling persistent memory regions. - Introduce alloc_free_mem_region() to accompany the existing request_free_mem_region() as a method to allocate physical memory capacity out of an existing resource. - Export insert_resource_expand_to_fit() for the CXL subsystem to late-publish CXL platform windows in iomem_resource. - Add a polled mode PCI DOE (Data Object Exchange) driver service and use it in cxl_pci to retrieve the CDAT (Coherent Device Attribute Table)" * tag 'cxl-for-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: (74 commits) cxl/hdm: Fix skip allocations vs multiple pmem allocations cxl/region: Disallow region granularity != window granularity cxl/region: Fix x1 interleave to greater than x1 interleave routing cxl/region: Move HPA setup to cxl_region_attach() cxl/region: Fix decoder interleave programming Documentation: cxl: remove dangling kernel-doc reference cxl/region: describe targets and nr_targets members of cxl_region_params cxl/regions: add padding for cxl_rr_ep_add nested lists cxl/region: Fix IS_ERR() vs NULL check cxl/region: Fix region reference target accounting cxl/region: Fix region commit uninitialized variable warning cxl/region: Fix port setup uninitialized variable warnings cxl/region: Stop initializing interleave granularity cxl/hdm: Fix DPA reservation vs cxl_endpoint_decoder lifetime cxl/acpi: Minimize granularity for x1 interleaves cxl/region: Delete 'region' attribute from root decoders cxl/acpi: Autoload driver for 'cxl_acpi' test devices cxl/region: decrement ->nr_targets on error in cxl_region_attach() cxl/region: prevent underflow in ways_to_cxl() cxl/region: uninitialized variable in alloc_hpa() ... commit 5e2e7383b57fa03ec2b00c82bb7f49a4a707c1f7 Merge: 00aa9d0bbfec 5b045200b53a Author: Linus Torvalds Date: Wed Aug 10 11:01:44 2022 -0700 Merge tag 'pinctrl-v6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "Outside the pinctrl driver and DT bindings we hit some Arm DT files, patched by the maintainers. Other than that it is business as usual. Core changes: - Add PINCTRL_PINGROUP() helper macro (and use it in the AMD driver). New drivers: - Intel Meteor Lake support. - Reneasas RZ/V2M and r8a779g0 (R-Car V4H). - AXP209 variants AXP221, AXP223 and AXP809. - Qualcomm MSM8909, PM8226, PMP8074 and SM6375. - Allwinner D1. Improvements: - Proper pin multiplexing in the AMD driver. - Mediatek MT8192 can use generic drive strength and pin bias, then fixes on top plus some I2C pin group fixes. - Have the Allwinner Sunplus SP7021 use the generic DT schema and make interrupts optional. - Handle Qualcomm SC7280 ADSP. - Handle Qualcomm MSM8916 CAMSS GP clock muxing. - High impedance bias on ZynqMP. - Serialize StarFive access to MMIO. - Immutable gpiochip for BCM2835, Ingenic, Qualcomm SPMI GPIO" * tag 'pinctrl-v6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (117 commits) dt-bindings: pinctrl: qcom,pmic-gpio: add PM8226 constraints pinctrl: qcom: Make PINCTRL_SM8450 depend on PINCTRL_MSM pinctrl: qcom: sm8250: Fix PDC map pinctrl: amd: Fix an unused variable dt-bindings: pinctrl: mt8186: Add and use drive-strength-microamp dt-bindings: pinctrl: mt8186: Add gpio-line-names property ARM: dts: imxrt1170-pinfunc: Add pinctrl binding header pinctrl: amd: Use unicode for debugfs output pinctrl: amd: Fix newline declaration in debugfs output pinctrl: at91: Fix typo 'the the' in comment dt-bindings: pinctrl: st,stm32: Correct 'resets' property name pinctrl: mvebu: Missing a blank line after declarations. pinctrl: qcom: Add SM6375 TLMM driver dt-bindings: pinctrl: Add DT schema for SM6375 TLMM dt-bindings: pinctrl: mt8195: Use drive-strength-microamp in examples Revert "pinctrl: qcom: spmi-gpio: make the irqchip immutable" pinctrl: imx93: Add MODULE_DEVICE_TABLE() pinctrl: sunxi: Add driver for Allwinner D1 pinctrl: sunxi: Make some layout parameters dynamic pinctrl: sunxi: Refactor register/offset calculation ... commit 00aa9d0bbfec91dcf191dd7899a65ab28b6cc76d Merge: 0af5cb349a2c c269fca7b37a Author: Linus Torvalds Date: Wed Aug 10 10:53:22 2022 -0700 Merge tag 'apparmor-pr-2022-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor Pull AppArmor updates from John Johansen: "This is mostly cleanups and bug fixes with the one bigger change being Mathew Wilcox's patch to use XArrays instead of the IDR from the thread around the locking weirdness. Features: - Convert secid mapping to XArrays instead of IDR - Add a kernel label to use on kernel objects - Extend policydb permission set by making use of the xbits - Make export of raw binary profile to userspace optional - Enable tuning of policy paranoid load for embedded systems - Don't create raw_sha1 symlink if sha1 hashing is disabled - Allow labels to carry debug flags Cleanups: - Update MAINTAINERS file - Use struct_size() helper in kmalloc() - Move ptrace mediation to more logical task.{h,c} - Resolve uninitialized symbol warnings - Remove redundant ret variable - Mark alloc_unconfined() as static - Update help description of policy hash for introspection - Remove some casts which are no-longer required Bug Fixes: - Fix aa_label_asxprint return check - Fix reference count leak in aa_pivotroot() - Fix memleak in aa_simple_write_to_buffer() - Fix kernel doc comments - Fix absroot causing audited secids to begin with = - Fix quiet_denied for file rules - Fix failed mount permission check error message - Disable showing the mode as part of a secid to secctx - Fix setting unconfined mode on a loaded profile - Fix overlapping attachment computation - Fix undefined reference to `zlib_deflate_workspacesize'" * tag 'apparmor-pr-2022-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor: (34 commits) apparmor: Update MAINTAINERS file with new email address apparmor: correct config reference to intended one apparmor: move ptrace mediation to more logical task.{h,c} apparmor: extend policydb permission set by making use of the xbits apparmor: allow label to carry debug flags apparmor: fix overlapping attachment computation apparmor: fix setting unconfined mode on a loaded profile apparmor: Fix some kernel-doc comments apparmor: Mark alloc_unconfined() as static apparmor: disable showing the mode as part of a secid to secctx apparmor: Convert secid mapping to XArrays instead of IDR apparmor: add a kernel label to use on kernel objects apparmor: test: Remove some casts which are no-longer required apparmor: Fix memleak in aa_simple_write_to_buffer() apparmor: fix reference count leak in aa_pivotroot() apparmor: Fix some kernel-doc comments apparmor: Fix undefined reference to `zlib_deflate_workspacesize' apparmor: fix aa_label_asxprint return check apparmor: Fix some kernel-doc comments apparmor: Fix some kernel-doc comments ... commit 0af5cb349a2c97fbabb3cede96efcde9d54b7940 Merge: d4252071b97d 672fb6740cbf Author: Linus Torvalds Date: Wed Aug 10 10:40:41 2022 -0700 Merge tag 'kbuild-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Remove the support for -O3 (CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3) - Fix error of rpm-pkg cross-builds - Support riscv for checkstack tool - Re-enable -Wformwat warnings for Clang - Clean up modpost, Makefiles, and misc scripts * tag 'kbuild-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (30 commits) modpost: remove .symbol_white_list field entirely modpost: remove unneeded .symbol_white_list initializers modpost: add PATTERNS() helper macro modpost: shorten warning messages in report_sec_mismatch() Revert "Kbuild, lto, workaround: Don't warn for initcall_reference in modpost" modpost: use more reliable way to get fromsec in section_rel(a)() modpost: add array range check to sec_name() modpost: refactor get_secindex() kbuild: set EXIT trap before creating temporary directory modpost: remove unused Elf_Sword macro Makefile.extrawarn: re-enable -Wformat for clang kbuild: add dtbs_prepare target kconfig: Qt5: tell the user which packages are required modpost: use sym_get_data() to get module device_table data modpost: drop executable ELF support checkstack: add riscv support for scripts/checkstack.pl kconfig: shorten the temporary directory name for cc-option scripts: headers_install.sh: Update config leak ignore entries kbuild: error out if $(INSTALL_MOD_PATH) contains % or : kbuild: error out if $(KBUILD_EXTMOD) contains % or : ... commit 806731a9465b42aaf887cbaf8bfee7eccc9417de Author: Adrian Hunter Date: Tue Aug 9 11:07:02 2022 +0300 perf tools: Do not pass NULL to parse_events() Many cases do not use the extra error information provided by parse_events and instead pass NULL as the struct parse_events_error pointer. Add a wrapper for those cases so that the pointer is never NULL. Signed-off-by: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20220809080702.6921-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm/util/cs-etm.c | 2 +- tools/perf/arch/arm64/util/arm-spe.c | 2 +- tools/perf/arch/x86/tests/intel-cqm.c | 2 +- tools/perf/arch/x86/util/intel-bts.c | 2 +- tools/perf/arch/x86/util/intel-pt.c | 2 +- tools/perf/arch/x86/util/iostat.c | 2 +- tools/perf/arch/x86/util/topdown.c | 2 +- tools/perf/tests/code-reading.c | 2 +- tools/perf/tests/event-times.c | 2 +- tools/perf/tests/evsel-roundtrip-name.c | 4 ++-- tools/perf/tests/hists_cumulate.c | 2 +- tools/perf/tests/hists_filter.c | 4 ++-- tools/perf/tests/hists_link.c | 4 ++-- tools/perf/tests/hists_output.c | 2 +- tools/perf/tests/keep-tracking.c | 4 ++-- tools/perf/tests/perf-time-to-tsc.c | 2 +- tools/perf/tests/switch-tracking.c | 12 ++++++------ tools/perf/util/bpf-loader.c | 2 +- tools/perf/util/parse-events.c | 18 ++++++++++++------ tools/perf/util/parse-events.h | 4 ++++ tools/perf/util/perf_api_probe.c | 2 +- tools/perf/util/record.c | 2 +- 22 files changed, 45 insertions(+), 35 deletions(-) commit 1da1d60774014137d776d0400fdf2f1779d8d4d5 Author: Adrian Hunter Date: Tue Aug 9 11:07:01 2022 +0300 perf tests: Fix Track with sched_switch test for hybrid case If cpu_core PMU event fails to parse, try also cpu_atom PMU event when parsing cycles event. Fixes: 43eb05d066795bdf ("perf tests: Support 'Track with sched_switch' test for hybrid") Signed-off-by: Adrian Hunter Cc: Ian Rogers Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20220809080702.6921-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/switch-tracking.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 2e828582b81f5bc76a4fe8e7812df259ab208302 Author: Adrian Hunter Date: Tue Aug 9 11:07:00 2022 +0300 perf parse-events: Fix segfault when event parser gets an error parse_events() is often called with parse_events_error set to NULL. Make parse_events_error__handle() not segfault in that case. A subsequent patch changes to avoid passing NULL in the first place. Fixes: 43eb05d066795bdf ("perf tests: Support 'Track with sched_switch' test for hybrid") Signed-off-by: Adrian Hunter Cc: Ian Rogers Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20220809080702.6921-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit e7c677bdd03d54e9a1bafcaf1faf5c573a506bba Merge: 86f44fcec22c c5c0981fd81d Author: Alexei Starovoitov Date: Wed Aug 10 10:12:48 2022 -0700 Merge branch 'fixes for bpf map iterator' Hou Tao says: ==================== From: Hou Tao Hi, The patchset constitues three fixes for bpf map iterator: (1) patch 1~4: fix user-after-free during reading map iterator fd It is possible when both the corresponding link fd and map fd are closed bfore reading the iterator fd. I had squashed these four patches into one, but it was not friendly for stable backport, so I break these fixes into four single patches in the end. Patch 7 is its testing patch. (2) patch 5: fix invalidity check for values in sk local storage map Patch 8 adds two tests for it. (3) patch 6: reject sleepable program for non-resched map iterator Patch 9 add a test for it. Please check the individual patches for more details. And comments are always welcome. Regards, Tao Changes since v2: * patch 1~6: update commit messages (from Yonghong & Martin) * patch 7: add more detailed comments (from Yonghong) * patch 8: use NULL directly instead of (void *)0 v1: https://lore.kernel.org/bpf/20220806074019.2756957-1-houtao@huaweicloud.com ==================== Signed-off-by: Alexei Starovoitov commit c5c0981fd81d35233d625631f13000544c108c53 Author: Hou Tao Date: Wed Aug 10 16:05:38 2022 +0800 selftests/bpf: Ensure sleepable program is rejected by hash map iter Add a test to ensure sleepable program is rejected by hash map iterator. Signed-off-by: Hou Tao Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20220810080538.1845898-10-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 6 ++++++ tools/testing/selftests/bpf/progs/bpf_iter_bpf_hash_map.c | 9 +++++++++ 2 files changed, 15 insertions(+) commit 939a1a946d755c1565e18694e278e9ba7ba19ccc Author: Hou Tao Date: Wed Aug 10 16:05:37 2022 +0800 selftests/bpf: Add write tests for sk local storage map iterator Add test to validate the overwrite of sock local storage map value in map iterator and another one to ensure out-of-bound value writing is rejected. Signed-off-by: Hou Tao Acked-by: Yonghong Song Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20220810080538.1845898-9-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 20 ++++++++++++++++++-- .../bpf/progs/bpf_iter_bpf_sk_storage_map.c | 22 ++++++++++++++++++++-- 2 files changed, 38 insertions(+), 4 deletions(-) commit 5836d81e4b039429f409007ba7e0235391537397 Author: Hou Tao Date: Wed Aug 10 16:05:36 2022 +0800 selftests/bpf: Add tests for reading a dangling map iter fd After closing both related link fd and map fd, reading the map iterator fd to ensure it is OK to do so. Signed-off-by: Hou Tao Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20220810080538.1845898-8-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 92 +++++++++++++++++++++++ 1 file changed, 92 insertions(+) commit d247049f4fd088e4e40294819a932a6057b3632c Author: Hou Tao Date: Wed Aug 10 16:05:35 2022 +0800 bpf: Only allow sleepable program for resched-able iterator When a sleepable program is attached to a hash map iterator, might_fault() will report "BUG: sleeping function called from invalid context..." if CONFIG_DEBUG_ATOMIC_SLEEP is enabled. The reason is that rcu_read_lock() is held in bpf_hash_map_seq_next() and won't be released until all elements are traversed or bpf_hash_map_seq_stop() is called. Fixing it by reusing BPF_ITER_RESCHED to indicate that only non-sleepable program is allowed for iterator without BPF_ITER_RESCHED. We can revise bpf_iter_link_attach() later if there are other conditions which may cause rcu_read_lock() or spin_lock() issues. Signed-off-by: Hou Tao Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20220810080538.1845898-7-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov kernel/bpf/bpf_iter.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 52bd05eb7c88e1ad8541a48873188ccebca9da26 Author: Hou Tao Date: Wed Aug 10 16:05:34 2022 +0800 bpf: Check the validity of max_rdwr_access for sock local storage map iterator The value of sock local storage map is writable in map iterator, so check max_rdwr_access instead of max_rdonly_access. Fixes: 5ce6e77c7edf ("bpf: Implement bpf iterator for sock local storage map") Signed-off-by: Hou Tao Acked-by: Yonghong Song Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20220810080538.1845898-6-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov net/core/bpf_sk_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0d2b2716d71778d0b0c8eaa433c073287d69d93 Author: Hou Tao Date: Wed Aug 10 16:05:33 2022 +0800 bpf: Acquire map uref in .init_seq_private for sock{map,hash} iterator sock_map_iter_attach_target() acquires a map uref, and the uref may be released before or in the middle of iterating map elements. For example, the uref could be released in sock_map_iter_detach_target() as part of bpf_link_release(), or could be released in bpf_map_put_with_uref() as part of bpf_map_release(). Fixing it by acquiring an extra map uref in .init_seq_private and releasing it in .fini_seq_private. Fixes: 0365351524d7 ("net: Allow iterating sockmap and sockhash") Signed-off-by: Hou Tao Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20220810080538.1845898-5-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov net/core/sock_map.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 3c5f6e698b5c538bbb23cd453b22e1e4922cffd8 Author: Hou Tao Date: Wed Aug 10 16:05:32 2022 +0800 bpf: Acquire map uref in .init_seq_private for sock local storage map iterator bpf_iter_attach_map() acquires a map uref, and the uref may be released before or in the middle of iterating map elements. For example, the uref could be released in bpf_iter_detach_map() as part of bpf_link_release(), or could be released in bpf_map_put_with_uref() as part of bpf_map_release(). So acquiring an extra map uref in bpf_iter_init_sk_storage_map() and releasing it in bpf_iter_fini_sk_storage_map(). Fixes: 5ce6e77c7edf ("bpf: Implement bpf iterator for sock local storage map") Signed-off-by: Hou Tao Acked-by: Yonghong Song Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20220810080538.1845898-4-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov net/core/bpf_sk_storage.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit ef1e93d2eeb58a1f08c37b22a2314b94bc045f15 Author: Hou Tao Date: Wed Aug 10 16:05:31 2022 +0800 bpf: Acquire map uref in .init_seq_private for hash map iterator bpf_iter_attach_map() acquires a map uref, and the uref may be released before or in the middle of iterating map elements. For example, the uref could be released in bpf_iter_detach_map() as part of bpf_link_release(), or could be released in bpf_map_put_with_uref() as part of bpf_map_release(). So acquiring an extra map uref in bpf_iter_init_hash_map() and releasing it in bpf_iter_fini_hash_map(). Fixes: d6c4503cc296 ("bpf: Implement bpf iterator for hash maps") Signed-off-by: Hou Tao Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20220810080538.1845898-3-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov kernel/bpf/hashtab.c | 2 ++ 1 file changed, 2 insertions(+) commit f76fa6b338055054f80c72b29c97fb95c1becadc Author: Hou Tao Date: Wed Aug 10 16:05:30 2022 +0800 bpf: Acquire map uref in .init_seq_private for array map iterator bpf_iter_attach_map() acquires a map uref, and the uref may be released before or in the middle of iterating map elements. For example, the uref could be released in bpf_iter_detach_map() as part of bpf_link_release(), or could be released in bpf_map_put_with_uref() as part of bpf_map_release(). Alternative fix is acquiring an extra bpf_link reference just like a pinned map iterator does, but it introduces unnecessary dependency on bpf_link instead of bpf_map. So choose another fix: acquiring an extra map uref in .init_seq_private for array map iterator. Fixes: d3cc2ab546ad ("bpf: Implement bpf iterator for array maps") Signed-off-by: Hou Tao Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20220810080538.1845898-2-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov kernel/bpf/arraymap.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 86f44fcec22ce2979507742bc53db8400e454f46 Author: Alexei Starovoitov Date: Mon Aug 8 20:58:09 2022 -0700 bpf: Disallow bpf programs call prog_run command. The verifier cannot perform sufficient validation of bpf_attr->test.ctx_in pointer, therefore bpf programs should not be allowed to call BPF_PROG_RUN command from within the program. To fix this issue split bpf_sys_bpf() bpf helper into normal kern_sys_bpf() kernel function that can only be used by the kernel light skeleton directly. Reported-by: YiFei Zhu Fixes: b1d18a7574d0 ("bpf: Extend sys_bpf commands for bpf_syscall programs.") Signed-off-by: Alexei Starovoitov kernel/bpf/syscall.c | 20 ++++++++++++++------ tools/lib/bpf/skel_internal.h | 4 ++-- 2 files changed, 16 insertions(+), 8 deletions(-) commit d4073595d0c61463ec3a87411b19e2a90f76d3f8 Author: Dan Carpenter Date: Mon Aug 8 11:34:41 2022 +0300 fs/ntfs3: uninitialized variable in ntfs_set_acl_ex() The goto out calls kfree(value) on an uninitialized pointer. Just return directly as the other error paths do. Fixes: 460bbf2990b3 ("fs/ntfs3: Do not change mode if ntfs_set_ea failed") Signed-off-by: Dan Carpenter Signed-off-by: Konstantin Komarov fs/ntfs3/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96964352e21962f5e51ecad87527ae9b6fec9670 Author: Jiapeng Chong Date: Thu Jul 21 11:18:41 2022 +0800 fs/ntfs3: Remove unused function wnd_bits Since the function wnd_bits is defined but not called in any file, it is a useless function, and we delete it in view of the brevity of the code. Remove some warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'. fs/ntfs3/bitmap.c:54:19: warning: unused function 'wnd_bits' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Konstantin Komarov fs/ntfs3/bitmap.c | 5 ----- 1 file changed, 5 deletions(-) commit 20aec89aac7761e3c096004f5c819aacc86fc542 Author: Steven Rostedt (Google) Date: Wed Aug 10 11:39:18 2022 -0400 rtla: Consolidate and show all necessary libraries that failed for building When building rtla tools, if the necessary libraries are not installed (libtraceevent and libtracefs), show the ones that are missing in one consolidated output, and also show how to install them (at least for Fedora). Link: https://lore.kernel.org/all/CAHk-=wh+e1qcCnEYJ3JRDVLNCYbJ=0u+Ts5bOYZnY3mX_k-hFA@mail.gmail.com/ Link: https://lkml.kernel.org/r/20220810113918.5d19ce59@gandalf.local.home Suggested-by: Linus Torvalds Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/Makefile | 62 ++++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 26 deletions(-) commit 1a7b22ab15ebf643e10e54ae5387afee06e39ad0 Author: Ben Hutchings Date: Sat Jul 16 15:48:34 2022 +0200 tools/rtla: Build with EXTRA_{C,LD}FLAGS To allow for distributions and other builders to apply hardening policy and other customisation, append EXTRA_CFLAGS and EXTRA_LDFLAGS to the corresponding variables. Link: https://lore.kernel.org/linux-trace-devel/YtLBshz0nMQ7530H@decadent.org.uk Signed-off-by: Ben Hutchings Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ff5a55dcdb343e3db9b9fb08795b78544b032773 Author: Ben Hutchings Date: Sat Jul 16 15:47:08 2022 +0200 tools/rtla: Fix command symlinks "ln -s" stores the next argument directly as the symlink target, so it needs to be a relative path. In this case, just "rtla". Link: https://lore.kernel.org/linux-trace-devel/YtLBXMI6Ui4HLIF1@decadent.org.uk Fixes: 0605bf009f18 ("rtla: Add osnoise tool") Fixes: a828cd18bc4a ("rtla: Add timerlat tool and timelart top mode") Signed-off-by: Ben Hutchings Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f1432cd24c240cedf78c0d026631e3b10052c8e1 Author: Alexandre Vicenzi Date: Mon Aug 8 20:03:43 2022 +0200 rtla: Fix tracer name The correct tracer name is timerlat and not timelat. Link: https://lore.kernel.org/linux-trace-devel/20220808180343.22262-1-alexandre.vicenzi@suse.com Signed-off-by: Alexandre Vicenzi Signed-off-by: Steven Rostedt (Google) Documentation/tools/rtla/rtla-timerlat-hist.rst | 2 +- tools/tracing/rtla/src/timerlat_hist.c | 2 +- tools/tracing/rtla/src/timerlat_top.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit dcc2ed3912ae32fd6646264d1aa296ea3d2aa07c Author: Rob Herring Date: Wed Jul 27 15:10:59 2022 -0600 dt-bindings: Drop DT_MK_SCHEMA_FLAGS conditional selecting schema files Since commit ef8795f3f1ce ("dt-bindings: kbuild: Use DTB files for validation"), dt-mk-schema always needs a complete list of schemas, so the conditional using DT_MK_SCHEMA_FLAGS should be removed. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220727211100.3249417-1-robh@kernel.org Documentation/devicetree/bindings/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c485c35ff6783ccd12c160fcac6a0e504e83e0bf Author: Pablo Neira Ayuso Date: Tue Aug 9 17:23:52 2022 +0200 netfilter: nf_tables: possible module reference underflow in error path dst->ops is set on when nft_expr_clone() fails, but module refcount has not been bumped yet, therefore nft_expr_destroy() leads to module reference underflow. Fixes: 8cfd9b0f8515 ("netfilter: nftables: generalize set expressions support") Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4963674c2e71fc062f8f089f0f58ffbb5533060b Author: Pablo Neira Ayuso Date: Tue Aug 9 13:39:18 2022 +0200 netfilter: nf_tables: disallow NFTA_SET_ELEM_KEY_END with NFT_SET_ELEM_INTERVAL_END flag These are mutually exclusive, actually NFTA_SET_ELEM_KEY_END replaces the flag notation. Fixes: 7b225d0b5c6d ("netfilter: nf_tables: add NFTA_SET_ELEM_KEY_END attribute") Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 1 + 1 file changed, 1 insertion(+) commit 3400278328285a8c2f121904496aff5e7b610a01 Author: Pablo Neira Ayuso Date: Tue Aug 9 13:22:01 2022 +0200 netfilter: nf_tables: use READ_ONCE and WRITE_ONCE for shared generation id access The generation ID is bumped from the commit path while holding the mutex, however, netlink dump operations rely on RCU. This patch also adds missing cb->base_eq initialization in nf_tables_dump_set(). Fixes: 38e029f14a97 ("netfilter: nf_tables: set NLM_F_DUMP_INTR if netlink dumping is stale") Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit aada476655461a9ab491d8298a415430cdd10278 Author: Xu Kuohai Date: Mon Aug 8 00:07:35 2022 -0400 bpf, arm64: Fix bpf trampoline instruction endianness The sparse tool complains as follows: arch/arm64/net/bpf_jit_comp.c:1684:16: warning: incorrect type in assignment (different base types) arch/arm64/net/bpf_jit_comp.c:1684:16: expected unsigned int [usertype] *branch arch/arm64/net/bpf_jit_comp.c:1684:16: got restricted __le32 [usertype] * arch/arm64/net/bpf_jit_comp.c:1700:52: error: subtraction of different types can't work (different base types) arch/arm64/net/bpf_jit_comp.c:1734:29: warning: incorrect type in assignment (different base types) arch/arm64/net/bpf_jit_comp.c:1734:29: expected unsigned int [usertype] * arch/arm64/net/bpf_jit_comp.c:1734:29: got restricted __le32 [usertype] * arch/arm64/net/bpf_jit_comp.c:1918:52: error: subtraction of different types can't work (different base types) This is because the variable branch in function invoke_bpf_prog and the variable branches in function prepare_trampoline are defined as type u32 *, which conflicts with ctx->image's type __le32 *, so sparse complains when assignment or arithmetic operation are performed on these two variables and ctx->image. Since arm64 instructions are always little-endian, change the type of these two variables to __le32 * and call cpu_to_le32() to convert instruction to little-endian before writing it to memory. This is also in line with emit() which internally does cpu_to_le32(), too. Fixes: efc9909fdce0 ("bpf, arm64: Add bpf trampoline for arm64") Reported-by: kernel test robot Signed-off-by: Xu Kuohai Signed-off-by: Daniel Borkmann Reviewed-by: Jean-Philippe Brucker Link: https://lore.kernel.org/bpf/20220808040735.1232002-1-xukuohai@huawei.com arch/arm64/net/bpf_jit_comp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2bff487f9a9085c9c877b55579b153691f0e5245 Author: Maurizio Lombardi Date: Mon Aug 1 10:09:00 2022 +0200 nvme-tcp: check if the queue is allocated before stopping it When an error is detected and the host reconnects, the nvme_tcp_error_recovery_work() function is called and starts tearing down the io queues and de-allocating them; If at the same time the "nvme" process deletes the controller via sysfs, the nvme_tcp_delete_ctrl() gets called and waits until the nvme_tcp_error_recovery_work() finishes its job; then starts tearing down the io queues, but at this point they have already been freed and the mutexes are destroyed. Calling mutex_lock() against a destroyed mutex triggers a warning: [ 1299.025575] nvme nvme1: Reconnecting in 10 seconds... [ 1299.636449] nvme nvme1: Removing ctrl: NQN "blktests-subsystem-1" [ 1299.645262] ------------[ cut here ]------------ [ 1299.649949] DEBUG_LOCKS_WARN_ON(lock->magic != lock) [ 1299.649971] WARNING: CPU: 4 PID: 104150 at kernel/locking/mutex.c:579 __mutex_lock+0x2d0/0x7dc [ 1299.717934] CPU: 4 PID: 104150 Comm: nvme [ 1299.828075] Call trace: [ 1299.830526] __mutex_lock+0x2d0/0x7dc [ 1299.834203] mutex_lock_nested+0x64/0xd4 [ 1299.838139] nvme_tcp_stop_queue+0x54/0xe0 [nvme_tcp] [ 1299.843211] nvme_tcp_teardown_io_queues.part.0+0x90/0x280 [nvme_tcp] [ 1299.849672] nvme_tcp_delete_ctrl+0x6c/0xf0 [nvme_tcp] [ 1299.854831] nvme_do_delete_ctrl+0x108/0x120 [nvme_core] [ 1299.860181] nvme_sysfs_delete+0xec/0xf0 [nvme_core] [ 1299.865179] dev_attr_store+0x40/0x70 Fix the warning by checking if the queues are allocated in the nvme_tcp_stop_queue(). If they are not, it makes no sense to try to stop them. Signed-off-by: Maurizio Lombardi Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/tcp.c | 3 +++ 1 file changed, 3 insertions(+) commit c50cd03dbebd1d5d34a2eb361f315b0bd833d6c1 Author: Christophe JAILLET Date: Sat Aug 6 22:15:01 2022 +0200 nvme-fabrics: Fix a typo in an error message A 'c' is missing. s/fabris/fabrics/ Signed-off-by: Christophe JAILLET Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/fabrics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec9e96b5230148294c7abcaf3a4c592d3720b62d Author: Amit Engel Date: Mon Aug 1 21:40:39 2022 +0300 nvme-fabrics: parse nvme connect Linux error codes This fixes the assumption that errval is an unsigned nvme error Signed-off-by: Amit Engel Signed-off-by: Christoph Hellwig drivers/nvme/host/fabrics.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 14446f9abd609791064d222ccf3c7b3af1772358 Author: Zhang Xiaoxu Date: Tue Jul 26 10:56:32 2022 +0800 nvmet-auth: use kmemdup instead of kmalloc + memcpy For code neat purpose, we can use kmemdup to replace kmalloc + memcpy. Signed-off-by: Zhang Xiaoxu Signed-off-by: Christoph Hellwig drivers/nvme/target/fabrics-cmd-auth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9317d0014499182c77a03cd095e83bcfb0f53750 Author: Christoph Hellwig Date: Sat Aug 6 10:29:55 2022 +0200 nvme-fc: fix the fc_appid_store return value "nvme-fc: fold t fc_update_appid into fc_appid_store" accidentally changed the userspace interface for the appid attribute, because the code that decrements "count" to remove a trailing '\n' in the parsing results in the decremented value being incorrectly be returned from the sysfs write. Fix this by keeping an orig_count variable for the full length of the write. Fixes: c814153c83a8 ("nvme-fc: fold t fc_update_appid into fc_appid_store") Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Ewan D. Milne Reviewed-by: James Smart Tested-by: Muneendra Kumar M drivers/nvme/host/fc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6fb271f1bc4ebc59bac0ff835c2e5197eac4b075 Author: Ming Lei Date: Thu Jul 21 08:33:58 2022 +0800 nvme-fc: restart admin queue if the caller needs to restart queue Without restarting admin queue in __nvme_fc_abort_outstanding_ios(), it leaves controller not capable of handling admin pt request, and causes io hang. Fixes it by restarting admin queue if the caller of __nvme_fc_abort_outstanding_ios requires to restart queue. Signed-off-by: Ming Lei Reviewed-by: Sagi Grimberg Reviewed-by: James Smart Tested-by: Ewan D. Milne Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 2 ++ 1 file changed, 2 insertions(+) commit d511e8a7e850db567cd7f633288aa96a19508e5b Author: Douglas Anderson Date: Tue Aug 9 14:27:45 2022 -0700 regulator: core: Fix missing error return from regulator_bulk_get() In commit 6eabfc018e8d ("regulator: core: Allow specifying an initial load w/ the bulk API") I changed the error handling but had a subtle that caused us to always return no error even if there was an error. Fix it. Fixes: 6eabfc018e8d ("regulator: core: Allow specifying an initial load w/ the bulk API") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20220809142738.1.I91625242f137c707bb345c51c80c5ecee02eeff3@changeid Signed-off-by: Mark Brown drivers/regulator/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4b5f29a076e52181f63e45a2ad1bc88593072e3 Author: Philipp Zabel Date: Wed Aug 10 12:41:56 2022 +0200 ASoC: codec: tlv320aic32x4: fix mono playback via I2S The two commits referenced below break mono playback via I2S DAI because they set BCLK to half the required speed. For PCM transport over I2S, the number of transmitted channels is always 2, even for mono playback. Fixes: dcd79364bff3 ("ASoC: codec: tlv3204: Enable 24 bit audio support") Fixes: 40b37136287b ("ASoC: tlv320aic32x4: Fix bdiv clock rate derivation") Signed-off-by: Philipp Zabel Link: https://lore.kernel.org/r/20220810104156.665452-1-p.zabel@pengutronix.de Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic32x4.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit b39c9e1b101d2992de9981673919ae55a088792c Author: Adrian Hunter Date: Tue Aug 9 16:07:58 2022 +0300 perf machine: Fix missing free of machine->kallsyms_filename Add missing free of machine->kallsyms_filename to machine__exit(). Fixes: a5367ecb5353fbf2 ("perf tools: Automatically use guest kcore_dir if present") Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20220809130758.12800-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/machine.c | 1 + 1 file changed, 1 insertion(+) commit 0c39f147145e5ebb2a867a1b50afdbfee0ae66c8 Author: Adrian Hunter Date: Tue Aug 9 15:32:58 2022 +0300 perf script: Fix reference to perf insert instead of perf inject Amend "perf insert" to "perf inject". Fixes: e28fb159f1163e76 ("perf script: Add machine_pid and vcpu") Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20220809123258.9086-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 628881ee06cb41a3c2c4e4e3f04ff3dc6779cd12 Author: Yang Jihong Date: Mon Aug 8 17:24:08 2022 +0800 perf sched latency: Fix subcommand matching error perf sched latency use strncmp to match subcommands which matching does not meet expectation. Before: # perf sched lat1234 >/dev/null # echo $? 0 # Solution: Use strstarts to match subcommand. After: # perf sched lat1234 Usage: perf sched [] {record|latency|map|replay|script|timehist} -D, --dump-raw-trace dump raw trace in ASCII -f, --force don't complain, do it -i, --input input file name -v, --verbose be more verbose (show symbol address, etc) # echo $? 129 # # perf sched lat >/dev/null # echo $? 0 # Signed-off-by: Yang Jihong Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220808092408.107399-3-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2f30b793e59d7c95822ef9b46d2416efddef583 Author: Yang Jihong Date: Mon Aug 8 17:24:07 2022 +0800 perf kvm: Fix subcommand matching error Currently the 'diff', 'top', 'buildid-list' and 'stat' perf commands use strncmp() to match subcommands. As a result, matching does not meet expectation. For example: # perf kvm diff1234 # Event 'cycles' # # Baseline Delta Abs Shared Object Symbol # ........ ......... ............. ...... # # Event 'dummy:HG' # # Baseline Delta Abs Shared Object Symbol # ........ ......... ............. ...... # # echo $? 0 # Invalid information should be returned, but success is actually returned. Solution: Use strstarts() to match subcommands. After: # perf kvm diff1234 Usage: perf kvm [] {top|record|report|diff|buildid-list|stat} -i, --input Input file name -o, --output Output file name -v, --verbose be more verbose (show counter open errors, etc) --guest Collect guest os data --guest-code Guest code can be found in hypervisor process --guestkallsyms file saving guest os /proc/kallsyms --guestmodules file saving guest os /proc/modules --guestmount guest mount directory under which every guest os instance has a subdir --guestvmlinux file saving guest os vmlinux --host Collect host os data # echo $? 129 # Signed-off-by: Yang Jihong Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220808092408.107399-2-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kvm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4bf6dcaa93bcd083a13c278a91418fe10e6d23a0 Author: Christophe JAILLET Date: Sat Aug 6 16:51:26 2022 +0200 perf probe: Fix an error handling path in 'parse_perf_probe_command()' If a memory allocation fail, we should branch to the error handling path in order to free some resources allocated a few lines above. Fixes: 15354d54698648e2 ("perf probe: Generate event name with line number") Signed-off-by: Christophe JAILLET Acked-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: kernel-janitors@vger.kernel.org Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/b71bcb01fa0c7b9778647235c3ab490f699ba278.1659797452.git.christophe.jaillet@wanadoo.fr Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-event.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 46f7bd5e1b5732acb9b95037afd052a4d2eebb1a Author: Brian Robbins Date: Fri Aug 5 15:06:45 2022 -0700 perf inject jit: Ignore memfd and anonymous mmap events if jitdump present Some processes store jitted code in memfd mappings to avoid having rwx mappings. These processes map the code with a writeable mapping and a read-execute mapping. They write the code using the writeable mapping and then unmap the writeable mapping. All subsequent execution is through the read-execute mapping. perf inject --jit ignores //anon* mappings for each process where a jitdump is present because it expects to inject mmap events for each jitted code range, and said jitted code ranges will overlap with the //anon* mappings. Ignore /memfd: and [anon:* mappings so that jitted code contained in /memfd: and [anon:* mappings is treated the same way as jitted code contained in //anon* mappings. Signed-off-by: Brian Robbins Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220805220645.95855-1-brianrob@linux.microsoft.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/jitdump.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit e0b23af82d6f454c0bad6fb48d378e0099069b44 Author: Thomas Richter Date: Thu Aug 4 09:52:21 2022 +0200 perf list: Add PMU pai_crypto event description for IBM z16 Add the event description for the IBM z16 pai_crypto PMU released with commit 1bf54f32f525 ("s390/pai: Add support for cryptography counters") The document SA22-7832-13 "z/Architecture Principles of Operation", published May, 2022, contains the description of the Processor Activity Instrumentation Facility and the cryptography counter set., See Pages 5-110 to 5-113. Patch reworked to fit for the converted jevents processing. Committer notes: Couldn't find 1bf54f32f525 ("s390/pai: Add support for cryptography counters") in torvalds/master, in what tree is that cset? Signed-off-by: Thomas Richter Acked-by: Sumanth Korikkar Cc: Heiko Carstens Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20220804075221.1132849-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/s390/cf_z16/pai.json | 1101 +++++++++++++++++++++++ tools/perf/pmu-events/jevents.py | 1 + 2 files changed, 1102 insertions(+) commit b48ddbbb99986de85878a34c23ecebac22a59b79 Author: Ian Rogers Date: Thu Aug 4 18:38:56 2022 -0700 perf vendor events: Remove bad jaketown uncore events The event converter scripts at: https://github.com/intel/event-converter-for-linux-perf passes Filter values from data on 01.org that is bogus in a perf command line and can cause perf to infinitely recurse in parse events. Remove such events or filters using the updated patch: https://github.com/intel/event-converter-for-linux-perf/pull/15/commits/afd779df99ee41aac646eae1ae5ae651cda3394d Fixes: 376d8b581b7639c9 ("perf vendor events: Update Intel jaketown") Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Caleb Biggers Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20220805013856.1842878-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/jaketown/uncore-cache.json | 30 ---------------------- .../pmu-events/arch/x86/jaketown/uncore-other.json | 13 ---------- .../pmu-events/arch/x86/jaketown/uncore-power.json | 11 -------- 3 files changed, 54 deletions(-) commit 22de36ff2cf16f1ebaa93fc6eb483c65cc79c856 Author: Ian Rogers Date: Thu Aug 4 18:38:55 2022 -0700 perf vendor events: Remove bad ivytown uncore events The event converter scripts at: https://github.com/intel/event-converter-for-linux-perf passes Filter values from data on 01.org that is bogus in a perf command line and can cause perf to infinitely recurse in parse events. Remove such events or filters using the updated patch: https://github.com/intel/event-converter-for-linux-perf/pull/15/commits/afd779df99ee41aac646eae1ae5ae651cda3394d Fixes: 6220136831e34615 ("perf vendor events: Update Intel ivytown") Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Caleb Biggers Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20220805013856.1842878-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/ivytown/uncore-cache.json | 90 ---------------------- .../arch/x86/ivytown/uncore-interconnect.json | 1 - .../pmu-events/arch/x86/ivytown/uncore-other.json | 13 ---- .../pmu-events/arch/x86/ivytown/uncore-power.json | 19 ----- 4 files changed, 123 deletions(-) commit 2c98bacfd7a7d6d8b7ff3ce24264cb142306e591 Author: Ian Rogers Date: Thu Aug 4 18:38:54 2022 -0700 perf vendor events: Remove bad broadwellde uncore events The event converter scripts at: https://github.com/intel/event-converter-for-linux-perf passes Filter values from data on 01.org that is bogus in a perf command line and can cause perf to infinitely recurse in parse events. Remove such events or filters using the updated patch: https://github.com/intel/event-converter-for-linux-perf/pull/15/commits/afd779df99ee41aac646eae1ae5ae651cda3394d Fixes: ef908a192512bf45 ("perf vendor events: Update Intel broadwellde") Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Caleb Biggers Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20220805013856.1842878-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/broadwellde/uncore-cache.json | 97 ---------------------- .../arch/x86/broadwellde/uncore-other.json | 13 --- 2 files changed, 110 deletions(-) commit b4f0466082fc073507bd1a52f560b718f4b26a5a Author: Ian Rogers Date: Thu Aug 4 15:18:02 2022 -0700 perf jevents: Add JEVENTS_ARCH make option Allow the architecture built into pmu-events.c to be set on the make command line with JEVENTS_ARCH. Reviewed-by: John Garry Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20220804221816.1802790-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/Build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 46acb311c6c6b47b2b1e43fb13a09beb70f870eb Author: Ian Rogers Date: Thu Aug 4 15:18:01 2022 -0700 perf jevents: Simplify generation of C-string Previous implementation wanted variable order and '(null)' string output to match the C implementation. The '(null)' string output was a quirk/bug and so there is no need to carry it forward. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20220804221816.1802790-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit e1e19d0545563f6684a68adc1995c6307105b19f Author: Ian Rogers Date: Thu Aug 4 15:18:00 2022 -0700 perf jevents: Clean up pytype warnings Improve type hints to clean up pytype warnings. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20220804221816.1802790-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 5b245985a6de5ac18b5088c37068816d413fb8ed Author: Roberto Sassu Date: Tue Jul 19 19:05:55 2022 +0200 tools build: Switch to new openssl API for test-libcrypto Switch to new EVP API for detecting libcrypto, as Fedora 36 returns an error when it encounters the deprecated function MD5_Init() and the others. The error would be interpreted as missing libcrypto, while in reality it is not. Fixes: 6e8ccb4f624a73c5 ("tools/bpf: properly account for libbfd variations") Signed-off-by: Roberto Sassu Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: bpf@vger.kernel.org Cc: Daniel Borkmann Cc: Ingo Molnar Cc: John Fastabend Cc: KP Singh Cc: llvm@lists.linux.dev Cc: Martin KaFai Lau Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Nick Terrell Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Song Liu Cc: Stanislav Fomichev Link: https://lore.kernel.org/r/20220719170555.2576993-4-roberto.sassu@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/build/feature/test-libcrypto.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 73f8ec5992d17a5431b7a2d123097981dbaa4769 Author: Arnaldo Carvalho de Melo Date: Tue Aug 9 16:23:53 2022 -0300 Revert "perf build: Suppress openssl v3 deprecation warnings in libcrypto feature test" This reverts commit 10fef869a58e37ec649b61eddab545f2da57a79b. Because a proper fix was submitted. Signed-off-by: Arnaldo Carvalho de Melo tools/build/feature/test-libcrypto.c | 6 ------ 1 file changed, 6 deletions(-) commit dd6775f986144a9e0563dab70ef0398768227113 Author: Roberto Sassu Date: Tue Jul 19 19:05:54 2022 +0200 perf build: Remove FEATURE_CHECK_LDFLAGS-disassembler-{four-args,init-styled} setting As the building mechanism is now able to retry detection with different combinations of linking flags, setting FEATURE_CHECK_LDFLAGS-disassembler-four-args and FEATURE_CHECK_LDFLAGS-disassembler-init-styled is not necessary anymore, so remove it. Committer notes: Use the same technique to find the set of bfd-related libraries to link as in: 3308ffc5016e6136 ("tools, build: Retry detection of bfd-related features") Signed-off-by: Roberto Sassu Cc: Alexei Starovoitov Cc: Andres Freund Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Ingo Molnar Cc: John Fastabend Cc: KP Singh Cc: Martin KaFai Lau Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Nick Terrell Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Song Liu Cc: Stanislav Fomichev Cc: bpf@vger.kernel.org Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20220719170555.2576993-3-roberto.sassu@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 13e6f53a7692ac239241e6bc5c82c58c18c4f1ab Author: Roberto Sassu Date: Tue Jul 19 19:05:53 2022 +0200 bpftool: Complete libbfd feature detection Commit 6e8ccb4f624a7 ("tools/bpf: properly account for libbfd variations") sets the linking flags depending on which flavor of the libbfd feature was detected. However, the flavors except libbfd cannot be detected, as they are not in the feature list. Complete the list of features to detect by adding libbfd-liberty and libbfd-liberty-z. Committer notes: Adjust conflict with with: 1e1613f64cc8a09d ("tools bpftool: Don't display disassembler-four-args feature test") 600b7b26c07a070d ("tools bpftool: Fix compilation error with new binutils") Fixes: 6e8ccb4f624a73c5 ("tools/bpf: properly account for libbfd variations") Signed-off-by: Roberto Sassu Cc: Alexei Starovoitov Cc: Andres Freund Cc: Andrii Nakryiko Cc: bpf@vger.kernel.org Cc: Daniel Borkmann Cc: Ingo Molnar Cc: John Fastabend Cc: KP Singh Cc: llvm@lists.linux.dev Cc: Martin KaFai Lau Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Nick Terrell Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Song Liu Cc: Stanislav Fomichev Link: https://lore.kernel.org/r/20220719170555.2576993-2-roberto.sassu@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/bpf/bpftool/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 629b98e2b1c6efcfa44ce144fce744819f0258f5 Author: Roberto Sassu Date: Tue Jul 19 19:05:52 2022 +0200 tools, build: Retry detection of bfd-related features While separate features have been defined to determine which linking flags are required to use libbfd depending on the distribution (libbfd, libbfd-liberty and libbfd-liberty-z), the same has not been done for other features requiring linking to libbfd. For example, disassembler-four-args requires linking to libbfd too, but it should use the right linking flags. If not all the required ones are specified, e.g. -liberty, detection will always fail even if the feature is available. Instead of creating new features, similarly to libbfd, simply retry detection with the different set of flags until detection succeeds (or fails, if the libraries are missing). In this way, feature detection is transparent for the users of this building mechanism (e.g. perf), and those users don't have for example to set an appropriate value for the FEATURE_CHECK_LDFLAGS-disassembler-four-args variable. The number of retries and features for which the retry mechanism is implemented is low enough to make the increase in the complexity of Makefile negligible. Tested with perf and bpftool on Ubuntu 20.04.4 LTS, Fedora 36 and openSUSE Tumbleweed. Committer notes: Do the retry for disassembler-init-styled as well. Signed-off-by: Roberto Sassu Cc: Alexei Starovoitov Cc: Andres Freund Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Ingo Molnar Cc: John Fastabend Cc: KP Singh Cc: Martin KaFai Lau Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Nick Terrell Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Song Liu Cc: Stanislav Fomichev Cc: bpf@vger.kernel.org Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20220719170555.2576993-1-roberto.sassu@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/build/feature/Makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 0c343af2a2f82844d03e5e30dc09a331421cd0c3 Author: Claire Jensen Date: Fri Aug 5 13:01:05 2022 -0700 perf test: JSON format checking Add field checking tests for perf stat JSON output. Sanity checks the expected number of fields are present, that the expected keys are present and they have the correct values. Committer notes: Had to fix this: - $(INSTALL) tests/shell/lib/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib' \ + $(INSTALL) tests/shell/lib/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'; \ Committer testing: [root@quaco ~]# perf test json 90: perf stat JSON output linter : Ok [root@quaco ~]# set -o vi [root@quaco ~]# perf test -v json 90: perf stat JSON output linter : --- start --- test child forked, pid 560794 Checking json output: no args [Success] Checking json output: system wide [Success] Checking json output: system wide Checking json output: system wide no aggregation [Success] Checking json output: interval [Success] Checking json output: event [Success] Checking json output: per core [Success] Checking json output: per thread [Success] Checking json output: per die [Success] Checking json output: per node [Success] Checking json output: per socket [Success] test child finished with 0 ---- end ---- perf stat JSON output linter: Ok [root@quaco ~]# Signed-off-by: Claire Jensen Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Alyssa Ross Cc: Claire Jensen Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Like Xu Cc: Mark Rutland Cc: Peter Zijlstra Cc: Sandipan Das Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20220805200105.2020995-3-irogers@google.com Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 3 +- .../perf/tests/shell/lib/perf_json_output_lint.py | 96 ++++++++++++++ tools/perf/tests/shell/stat+json_output.sh | 147 +++++++++++++++++++++ 3 files changed, 245 insertions(+), 1 deletion(-) commit df936cadfb58ba93601ac351ab6fc2e2650cf591 Author: Claire Jensen Date: Fri Aug 5 13:01:04 2022 -0700 perf stat: Add JSON output option CSV output is tricky to format and column layout changes are susceptible to breaking parsers. New JSON-formatted output has variable names to identify fields that are consistent and informative, making the output parseable. CSV output example: 1.20,msec,task-clock:u,1204272,100.00,0.697,CPUs utilized 0,,context-switches:u,1204272,100.00,0.000,/sec 0,,cpu-migrations:u,1204272,100.00,0.000,/sec 70,,page-faults:u,1204272,100.00,58.126,K/sec JSON output example: {"counter-value" : "3805.723968", "unit" : "msec", "event" : "cpu-clock", "event-runtime" : 3805731510100.00, "pcnt-running" : 100.00, "metric-value" : 4.007571, "metric-unit" : "CPUs utilized"} {"counter-value" : "6166.000000", "unit" : "", "event" : "context-switches", "event-runtime" : 3805723045100.00, "pcnt-running" : 100.00, "metric-value" : 1.620191, "metric-unit" : "K/sec"} {"counter-value" : "466.000000", "unit" : "", "event" : "cpu-migrations", "event-runtime" : 3805727613100.00, "pcnt-running" : 100.00, "metric-value" : 122.447136, "metric-unit" : "/sec"} {"counter-value" : "208.000000", "unit" : "", "event" : "page-faults", "event-runtime" : 3805726799100.00, "pcnt-running" : 100.00, "metric-value" : 54.654516, "metric-unit" : "/sec"} Also added documentation for JSON option. There is some tidy up of CSV code including a potential memory over run in the os.nfields set up. To facilitate this an AGGR_MAX value is added. Committer notes: Fixed up using PRIu64 to format u64 values, not %lu. Committer testing: ⬢[acme@toolbox perf]$ perf stat -j sleep 1 {"counter-value" : "0.731750", "unit" : "msec", "event" : "task-clock:u", "event-runtime" : 731750, "pcnt-running" : 100.00, "metric-value" : 0.000731, "metric-unit" : "CPUs utilized"} {"counter-value" : "0.000000", "unit" : "", "event" : "context-switches:u", "event-runtime" : 731750, "pcnt-running" : 100.00, "metric-value" : 0.000000, "metric-unit" : "/sec"} {"counter-value" : "0.000000", "unit" : "", "event" : "cpu-migrations:u", "event-runtime" : 731750, "pcnt-running" : 100.00, "metric-value" : 0.000000, "metric-unit" : "/sec"} {"counter-value" : "75.000000", "unit" : "", "event" : "page-faults:u", "event-runtime" : 731750, "pcnt-running" : 100.00, "metric-value" : 102.494021, "metric-unit" : "K/sec"} {"counter-value" : "578765.000000", "unit" : "", "event" : "cycles:u", "event-runtime" : 379366, "pcnt-running" : 49.00, "metric-value" : 0.790933, "metric-unit" : "GHz"} {"counter-value" : "1298.000000", "unit" : "", "event" : "stalled-cycles-frontend:u", "event-runtime" : 768020, "pcnt-running" : 100.00, "metric-value" : 0.224271, "metric-unit" : "frontend cycles idle"} {"counter-value" : "21984.000000", "unit" : "", "event" : "stalled-cycles-backend:u", "event-runtime" : 768020, "pcnt-running" : 100.00, "metric-value" : 3.798433, "metric-unit" : "backend cycles idle"} {"counter-value" : "468197.000000", "unit" : "", "event" : "instructions:u", "event-runtime" : 768020, "pcnt-running" : 100.00, "metric-value" : 0.808959, "metric-unit" : "insn per cycle"} {"metric-value" : 0.046955, "metric-unit" : "stalled cycles per insn"} {"counter-value" : "103335.000000", "unit" : "", "event" : "branches:u", "event-runtime" : 768020, "pcnt-running" : 100.00, "metric-value" : 141.216262, "metric-unit" : "M/sec"} {"counter-value" : "2381.000000", "unit" : "", "event" : "branch-misses:u", "event-runtime" : 388654, "pcnt-running" : 50.00, "metric-value" : 2.304156, "metric-unit" : "of all branches"} ⬢[acme@toolbox perf]$ Signed-off-by: Claire Jensen Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Alyssa Ross Cc: Claire Jensen Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Like Xu Cc: Mark Rutland Cc: Peter Zijlstra Cc: Sandipan Das Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20220805200105.2020995-2-irogers@google.com Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-stat.txt | 21 ++ tools/perf/builtin-stat.c | 6 + tools/perf/util/stat-display.c | 383 ++++++++++++++++++++++++--------- tools/perf/util/stat.c | 1 + tools/perf/util/stat.h | 2 + 5 files changed, 307 insertions(+), 106 deletions(-) commit f4e6960f4f16b1ca5da16cec7612ecc86402ac05 Author: Zev Weiss Date: Tue Aug 9 22:26:46 2022 -0700 hwmon: (nct6775) Fix platform driver suspend regression Commit c3963bc0a0cf ("hwmon: (nct6775) Split core and platform driver") introduced a slight change in nct6775_suspend() in order to avoid an otherwise-needless symbol export for nct6775_update_device(), replacing a call to that function with a simple dev_get_drvdata() instead. As it turns out, there is no guarantee that nct6775_update_device() is ever called prior to suspend. If this happens, the resume function ends up writing bad data into the various chip registers, which results in a crash shortly after resume. To fix the problem, just add the symbol export and return to using nct6775_update_device() as was employed previously. Reported-by: Zoltán Kővágó Tested-by: Zoltán Kővágó Fixes: c3963bc0a0cf ("hwmon: (nct6775) Split core and platform driver") Cc: stable@kernel.org Signed-off-by: Zev Weiss Link: https://lore.kernel.org/r/20220810052646.13825-1-zev@bewilderbeest.net [groeck: Updated description] Signed-off-by: Guenter Roeck drivers/hwmon/nct6775-core.c | 3 ++- drivers/hwmon/nct6775-platform.c | 2 +- drivers/hwmon/nct6775.h | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) commit f329a0ebeaba4ffe91d431e0ac1ca7f9165872a4 Author: Jakub Kicinski Date: Tue Aug 9 16:27:40 2022 -0700 genetlink: correct uAPI defines Commit 50a896cf2d6f ("genetlink: properly support per-op policy dumping") seems to have copy'n'pasted things a little incorrectly. The #define CTRL_ATTR_MCAST_GRP_MAX should have stayed right after the previous enum. The new CTRL_ATTR_POLICY_* needs its own define for MAX and that max should not contain the superfluous _DUMP in the name. We probably can't do anything about the CTRL_ATTR_POLICY_DUMP_MAX any more, there's likely code which uses it. For consistency (*cough* codegen *cough*) let's add the correctly name define nonetheless. Signed-off-by: Jakub Kicinski Reviewed-by: Johannes Berg Signed-off-by: David S. Miller include/uapi/linux/genetlink.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6b4db2e528f650c7fb712961aac36455468d5902 Author: Ido Schimmel Date: Tue Aug 9 14:35:06 2022 +0300 devlink: Fix use-after-free after a failed reload After a failed devlink reload, devlink parameters are still registered, which means user space can set and get their values. In the case of the mlxsw "acl_region_rehash_interval" parameter, these operations will trigger a use-after-free [1]. Fix this by rejecting set and get operations while in the failed state. Return the "-EOPNOTSUPP" error code which does not abort the parameters dump, but instead causes it to skip over the problematic parameter. Another possible fix is to perform these checks in the mlxsw parameter callbacks, but other drivers might be affected by the same problem and I am not aware of scenarios where these stricter checks will cause a regression. [1] mlxsw_spectrum3 0000:00:10.0: Port 125: Failed to register netdev mlxsw_spectrum3 0000:00:10.0: Failed to create ports ================================================================== BUG: KASAN: use-after-free in mlxsw_sp_acl_tcam_vregion_rehash_intrvl_get+0xbd/0xd0 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c:904 Read of size 4 at addr ffff8880099dcfd8 by task kworker/u4:4/777 CPU: 1 PID: 777 Comm: kworker/u4:4 Not tainted 5.19.0-rc7-custom-126601-gfe26f28c586d #1 Hardware name: QEMU MSN4700, BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x92/0xbd lib/dump_stack.c:106 print_address_description mm/kasan/report.c:313 [inline] print_report.cold+0x5e/0x5cf mm/kasan/report.c:429 kasan_report+0xb9/0xf0 mm/kasan/report.c:491 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:306 mlxsw_sp_acl_tcam_vregion_rehash_intrvl_get+0xbd/0xd0 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c:904 mlxsw_sp_acl_region_rehash_intrvl_get+0x49/0x60 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c:1106 mlxsw_sp_params_acl_region_rehash_intrvl_get+0x33/0x80 drivers/net/ethernet/mellanox/mlxsw/spectrum.c:3854 devlink_param_get net/core/devlink.c:4981 [inline] devlink_nl_param_fill+0x238/0x12d0 net/core/devlink.c:5089 devlink_param_notify+0xe5/0x230 net/core/devlink.c:5168 devlink_ns_change_notify net/core/devlink.c:4417 [inline] devlink_ns_change_notify net/core/devlink.c:4396 [inline] devlink_reload+0x15f/0x700 net/core/devlink.c:4507 devlink_pernet_pre_exit+0x112/0x1d0 net/core/devlink.c:12272 ops_pre_exit_list net/core/net_namespace.c:152 [inline] cleanup_net+0x494/0xc00 net/core/net_namespace.c:582 process_one_work+0x9fc/0x1710 kernel/workqueue.c:2289 worker_thread+0x675/0x10b0 kernel/workqueue.c:2436 kthread+0x30c/0x3d0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 The buggy address belongs to the physical page: page:ffffea0000267700 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x99dc flags: 0x100000000000000(node=0|zone=1) raw: 0100000000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880099dce80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880099dcf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8880099dcf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880099dd000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880099dd080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== Fixes: 98bbf70c1c41 ("mlxsw: spectrum: add "acl_region_rehash_interval" devlink param") Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller net/core/devlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d5410ac7b0baeca91cf73ff5241d35998ecc8c9e Author: Sun Shouxin Date: Mon Aug 8 23:21:03 2022 -0700 net:bonding:support balance-alb interface with vlan to bridge In my test, balance-alb bonding with two slaves eth0 and eth1, and then Bond0.150 is created with vlan id attached bond0. After adding bond0.150 into one linux bridge, I noted that Bond0, bond0.150 and bridge were assigned to the same MAC as eth0. Once bond0.150 receives a packet whose dest IP is bridge's and dest MAC is eth1's, the linux bridge will not match eth1's MAC entry in FDB, and not handle it as expected. The patch fix the issue, and diagram as below: eth1(mac:eth1_mac)--bond0(balance-alb,mac:eth0_mac)--eth0(mac:eth0_mac) | bond0.150(mac:eth0_mac) | bridge(ip:br_ip, mac:eth0_mac)--other port Suggested-by: Hu Yadi Signed-off-by: Sun Shouxin Signed-off-by: David S. Miller drivers/net/bonding/bond_alb.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 91ec9bd57f3524ff3d86bfb7c9ee5a315019733c Author: Clayton Yager Date: Mon Aug 8 15:38:23 2022 -0700 macsec: Fix traffic counters/statistics OutOctetsProtected, OutOctetsEncrypted, InOctetsValidated, and InOctetsDecrypted were incrementing by the total number of octets in frames instead of by the number of octets of User Data in frames. The Controlled Port statistics ifOutOctets and ifInOctets were incrementing by the total number of octets instead of the number of octets of the MSDUs plus octets of the destination and source MAC addresses. The Controlled Port statistics ifInDiscards and ifInErrors were not incrementing each time the counters they aggregate were. The Controlled Port statistic ifInErrors was not included in the output of macsec_get_stats64 so the value was not present in ip commands output. The ReceiveSA counters InPktsNotValid, InPktsNotUsingSA, and InPktsUnusedSA were not incrementing. Signed-off-by: Clayton Yager Signed-off-by: David S. Miller drivers/net/macsec.c | 58 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 49 insertions(+), 9 deletions(-) commit 50ee138ff26681718042ade4523b489e11816bbf Merge: afb176d45870 1e5907bcb3a3 Author: Mark Brown Date: Wed Aug 10 13:41:56 2022 +0100 TAS2770 fixes Merge series from Martin Povišer : The first two fixes should be straightforward. The latter two clean up what looks to me like a mess in the setting of power levels. However we settle it, we should then do the same changes to TAS2764, which has the same template (and maybe there are other drivers). commit 6b2394bad503bfada6f677ad2574b2ef8178b1bf Author: Colin Ian King Date: Tue Aug 9 19:15:44 2022 +0100 ALSA: usb-audio: make read-only array marker static const Don't populate the read-only array marker on the stack but instead make it static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20220809181544.3046429-1-colin.i.king@gmail.com Signed-off-by: Takashi Iwai sound/usb/pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3e7b29e30854ed67be0d17687e744ad0c769c4b Author: Peilin Ye Date: Mon Aug 8 11:05:25 2022 -0700 vsock: Set socket state back to SS_UNCONNECTED in vsock_connect_timeout() Imagine two non-blocking vsock_connect() requests on the same socket. The first request schedules @connect_work, and after it times out, vsock_connect_timeout() sets *sock* state back to TCP_CLOSE, but keeps *socket* state as SS_CONNECTING. Later, the second request returns -EALREADY, meaning the socket "already has a pending connection in progress", even though the first request has already timed out. As suggested by Stefano, fix it by setting *socket* state back to SS_UNCONNECTED, so that the second request will return -ETIMEDOUT. Suggested-by: Stefano Garzarella Fixes: d021c344051a ("VSOCK: Introduce VM Sockets") Reviewed-by: Stefano Garzarella Signed-off-by: Peilin Ye Signed-off-by: David S. Miller net/vmw_vsock/af_vsock.c | 1 + 1 file changed, 1 insertion(+) commit 7e97cfed9929eaabc41829c395eb0d1350fccb9d Author: Peilin Ye Date: Mon Aug 8 11:04:47 2022 -0700 vsock: Fix memory leak in vsock_connect() An O_NONBLOCK vsock_connect() request may try to reschedule @connect_work. Imagine the following sequence of vsock_connect() requests: 1. The 1st, non-blocking request schedules @connect_work, which will expire after 200 jiffies. Socket state is now SS_CONNECTING; 2. Later, the 2nd, blocking request gets interrupted by a signal after a few jiffies while waiting for the connection to be established. Socket state is back to SS_UNCONNECTED, but @connect_work is still pending, and will expire after 100 jiffies. 3. Now, the 3rd, non-blocking request tries to schedule @connect_work again. Since @connect_work is already scheduled, schedule_delayed_work() silently returns. sock_hold() is called twice, but sock_put() will only be called once in vsock_connect_timeout(), causing a memory leak reported by syzbot: BUG: memory leak unreferenced object 0xffff88810ea56a40 (size 1232): comm "syz-executor756", pid 3604, jiffies 4294947681 (age 12.350s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 28 00 07 40 00 00 00 00 00 00 00 00 00 00 00 00 (..@............ backtrace: [] sk_prot_alloc+0x3e/0x1b0 net/core/sock.c:1930 [] sk_alloc+0x32/0x2e0 net/core/sock.c:1989 [] __vsock_create.constprop.0+0x38/0x320 net/vmw_vsock/af_vsock.c:734 [] vsock_create+0xc1/0x2d0 net/vmw_vsock/af_vsock.c:2203 [] __sock_create+0x1ab/0x2b0 net/socket.c:1468 [] sock_create net/socket.c:1519 [inline] [] __sys_socket+0x6f/0x140 net/socket.c:1561 [] __do_sys_socket net/socket.c:1570 [inline] [] __se_sys_socket net/socket.c:1568 [inline] [] __x64_sys_socket+0x1a/0x20 net/socket.c:1568 [] do_syscall_x64 arch/x86/entry/common.c:50 [inline] [] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 [] entry_SYSCALL_64_after_hwframe+0x44/0xae <...> Use mod_delayed_work() instead: if @connect_work is already scheduled, reschedule it, and undo sock_hold() to keep the reference count balanced. Reported-and-tested-by: syzbot+b03f55bf128f9a38f064@syzkaller.appspotmail.com Fixes: d021c344051a ("VSOCK: Introduce VM Sockets") Co-developed-by: Stefano Garzarella Signed-off-by: Stefano Garzarella Reviewed-by: Stefano Garzarella Signed-off-by: Peilin Ye Signed-off-by: David S. Miller net/vmw_vsock/af_vsock.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit ae3b1da95413614f96ffa23d200929c6f809c807 Author: Yang Yingliang Date: Wed Aug 10 09:34:35 2022 +0800 KVM: arm64: Fix compile error due to sign extension Use GENMASK() to generate the masks of device type and device id, fixing compilation errors due to the sign extension when using older versions of GCC (such as is 7.5): In function ‘kvm_vm_ioctl_set_device_addr.isra.38’, inlined from ‘kvm_arch_vm_ioctl’ at arch/arm64/kvm/arm.c:1454:10: ././include/linux/compiler_types.h:354:38: error: call to ‘__compiletime_assert_599’ \ declared with attribute error: FIELD_GET: mask is not constant _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) Fixes: 9f968c9266aa ("KVM: arm64: vgic-v2: Add helper for legacy dist/cpuif base address setting") Signed-off-by: Yang Yingliang [maz: tidy up commit message] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220810013435.1525363-1-yangyingliang@huawei.com arch/arm64/include/uapi/asm/kvm.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6fd2c17fb6e02a8c0ab51df1cfec82ce96b8e83d Author: Jose Alonso Date: Mon Aug 8 08:35:04 2022 -0300 Revert "net: usb: ax88179_178a needs FLAG_SEND_ZLP" This reverts commit 36a15e1cb134c0395261ba1940762703f778438c. The usage of FLAG_SEND_ZLP causes problems to other firmware/hardware versions that have no issues. The FLAG_SEND_ZLP is not safe to use in this context. See: https://patchwork.ozlabs.org/project/netdev/patch/1270599787.8900.8.camel@Linuxdev4-laptop/#118378 The original problem needs another way to solve. Fixes: 36a15e1cb134 ("net: usb: ax88179_178a needs FLAG_SEND_ZLP") Cc: stable@vger.kernel.org Reported-by: Ronald Wahl Link: https://bugzilla.kernel.org/show_bug.cgi?id=216327 Link: https://bugs.archlinux.org/task/75491 Signed-off-by: Jose Alonso Signed-off-by: David S. Miller drivers/net/usb/ax88179_178a.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 2cd0e8dba7a529a7706d1e81209f98a6351f8ad0 Author: Topi Miettinen Date: Sat Aug 6 13:12:53 2022 +0300 netlabel: fix typo in comment 'IPv4 and IPv4' should be 'IPv4 and IPv6'. Signed-off-by: Topi Miettinen Acked-by: Paul Moore Signed-off-by: David S. Miller net/netlabel/netlabel_unlabeled.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7f164955f07c394ad0a8a57c24a0c8088630051 Merge: 996237d9ba4d d80d60b0db6f Author: David S. Miller Date: Wed Aug 10 09:19:50 2022 +0100 Merge tag 'linux-can-fixes-for-6.0-20220810' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== this is a pull request of 4 patches for net/master, with the whitespace issue fixed. Fedor Pchelkin contributes 2 fixes for the j1939 CAN protocol. A patch by me for the ems_usb driver fixes an unaligned access warning. Sebastian Würl's patch for the mcp251x driver fixes a race condition in the receive interrupt. ==================== Signed-off-by: David S. Miller commit 7aeef1548ac026c8bcb9ec223b672f81da340011 Author: Guenter Roeck Date: Mon Aug 8 02:48:21 2022 -0700 hwmon: (lm90) Fix error return value from detect function lm90_detect_nuvoton() is supposed to return NULL if it can not detect a chip, or a pointer to the chip name if it does. Under some circumstances it returns an error pointer instead. Some versions of gcc interpret an ERR_PTR as region of size 0 and generate an error message. In function ‘__fortify_strlen’, inlined from ‘strlcpy’ at ./include/linux/fortify-string.h:159:10, inlined from ‘lm90_detect’ at drivers/hwmon/lm90.c:2550:2: ./include/linux/fortify-string.h:50:33: error: ‘__builtin_strlen’ reading 1 or more bytes from a region of size 0 50 | #define __underlying_strlen __builtin_strlen | ^ ./include/linux/fortify-string.h:141:24: note: in expansion of macro ‘__underlying_strlen’ 141 | return __underlying_strlen(p); | ^~~~~~~~~~~~~~~~~~~ Returning NULL instead of ERR_PTR() fixes the problem. Fixes: c7cebce984a2 ("hwmon: (lm90) Rework detect function") Reported-by: Ingo Molnar Cc: Linus Torvalds Cc: Kees Cook Tested-by: Ingo Molnar Reviewed-by: Kees Cook Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83ee9f23763a432a4077bf20624ee35de87bce99 Author: Russell Currey Date: Wed Aug 10 15:43:31 2022 +1000 powerpc/kexec: Fix build failure from uninitialised variable clang 14 won't build because ret is uninitialised and can be returned if both prop and fdtprop are NULL. Drop the ret variable and return an error in that failure case. Fixes: b1fc44eaa9ba ("pseries/iommu/ddw: Fix kdump to work in absence of ibm,dma-window") Suggested-by: Christophe Leroy Signed-off-by: Russell Currey Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220810054331.373761-1-ruscur@russell.cc arch/powerpc/kexec/file_load_64.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 59bab33a4f57f886c5f8a4d1f2bed728ec185d16 Author: Christophe Leroy Date: Wed Aug 3 13:47:33 2022 +0200 powerpc/ppc-opcode: Fix PPC_RAW_TW() PPC_RAW_TW() is erroneously defined with base code 0x7f000008 instead of 0x7c000008. That's invisible because its only user is PPC_RAW_TRAP() which is 0x7fe00008, but fix it anyway to avoid any risk of future bug. Fixes: d00d762daf12 ("powerpc/ppc-opcode: Define and use PPC_RAW_TRAP() and PPC_RAW_TW()") Reported-by: Naveen N. Rao Signed-off-by: Christophe Leroy Reviewed-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/eca9251f1e1f82c4c46ec6380ddb28356ab3fdfe.1659527244.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/ppc-opcode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb928ac192128c842f4c1cfc8b6780b95719d65f Author: Naveen N. Rao Date: Tue Aug 9 15:29:07 2022 +0530 powerpc64/ftrace: Fix ftrace for clang builds Clang doesn't support -mprofile-kernel ABI, so guard the checks against CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version. Fixes: 23b44fc248f4 ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64") Cc: stable@vger.kernel.org # v5.19+ Reported-by: Nick Desaulniers Reported-by: Ondrej Mosnacek Signed-off-by: Naveen N. Rao Tested-by: Ondrej Mosnacek Acked-by: Nick Desaulniers Signed-off-by: Michael Ellerman Link: https://github.com/llvm/llvm-project/issues/57031 Link: https://github.com/ClangBuiltLinux/linux/issues/1682 Link: https://lore.kernel.org/r/20220809095907.418764-1-naveen.n.rao@linux.vnet.ibm.com arch/powerpc/kernel/trace/ftrace.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5cccf7a5215d12027e55e247907817631b413c28 Author: Christophe Leroy Date: Tue Aug 2 11:02:38 2022 +0200 powerpc: Make eh value more explicit when using lwarx Just like the first patch of this series, define a local 'eh' in order to make the code clearer. And IS_ENABLED() returns either 1 or 0 so no need to do IS_ENABLED(CONFIG_PPC64) ? 1 : 0. Signed-off-by: Christophe Leroy [mpe: Use symbolic names, use 'n' constraint per Segher] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/629befaa2d05e2922346e58a383886510d6af55a.1659430931.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/atomic.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit eb5a33ea31190c189ca4a59de4687b0877662c06 Author: Christophe Leroy Date: Tue Aug 2 11:02:37 2022 +0200 powerpc: Don't hide eh field of lwarx behind a macro The eh field must remain 0 for PPC32 and is only used by PPC64. Don't hide that behind a macro, just leave the responsibility to the user. At the time being, the only users of PPC_RAW_L{WDQ}ARX are setting the eh field to 0, so the special handling of __PPC_EH is useless. Just take the value given by the caller. Same for DEFINE_TESTOP(), don't do special handling in that macro, ensure the caller hands over the proper eh value. Signed-off-by: Christophe Leroy [mpe: Use 'n' constraint per Segher] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8b9c8a1a14f9143552a85fcbf96698224a8c2469.1659430931.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/bitops.h | 4 ++-- arch/powerpc/include/asm/ppc-opcode.h | 11 +---------- 2 files changed, 3 insertions(+), 12 deletions(-) commit 18db466a9a306406dab3b134014d9f6ed642471c Author: Christophe Leroy Date: Tue Aug 2 11:02:36 2022 +0200 powerpc: Fix eh field when calling lwarx on PPC32 Commit 9401f4e46cf6 ("powerpc: Use lwarx/ldarx directly instead of PPC_LWARX/LDARX macros") properly handled the eh field of lwarx in asm/bitops.h but failed to clear it for PPC32 in asm/simple_spinlock.h So, do as in arch_atomic_try_cmpxchg_lock(), set it to 1 if PPC64 but set it to 0 if PPC32. For that use IS_ENABLED(CONFIG_PPC64) which returns 1 when CONFIG_PPC64 is set and 0 otherwise. Fixes: 9401f4e46cf6 ("powerpc: Use lwarx/ldarx directly instead of PPC_LWARX/LDARX macros") Cc: stable@vger.kernel.org # v5.15+ Reported-by: Pali Rohár Signed-off-by: Christophe Leroy Tested-by: Pali Rohár Reviewed-by: Segher Boessenkool [mpe: Use symbolic names, use 'n' constraint per Segher] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a1176e19e627dd6a1b8d24c6c457a8ab874b7d12.1659430931.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/simple_spinlock.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 996237d9ba4d092469fbfca18995656c32834ac7 Merge: b4ab94d6adaa ab7e2e0dfa5d Author: Jakub Kicinski Date: Tue Aug 9 22:19:23 2022 -0700 Merge branch 'do-not-use-rt_tos-for-ipv6-flowlabel' Matthias May says: ==================== Do not use RT_TOS for IPv6 flowlabel According to Guillaume Nault RT_TOS should never be used for IPv6. Quote: RT_TOS() is an old macro used to interprete IPv4 TOS as described in the obsolete RFC 1349. It's conceptually wrong to use it even in IPv4 code, although, given the current state of the code, most of the existing calls have no consequence. But using RT_TOS() in IPv6 code is always a bug: IPv6 never had a "TOS" field to be interpreted the RFC 1349 way. There's no historical compatibility to worry about. ==================== Link: https://lore.kernel.org/r/20220805191906.9323-1-matthias.may@westermo.com Signed-off-by: Jakub Kicinski commit ab7e2e0dfa5d37540ab1dc5376e9a2cb9188925d Author: Matthias May Date: Fri Aug 5 21:19:06 2022 +0200 ipv6: do not use RT_TOS for IPv6 flowlabel According to Guillaume Nault RT_TOS should never be used for IPv6. Quote: RT_TOS() is an old macro used to interprete IPv4 TOS as described in the obsolete RFC 1349. It's conceptually wrong to use it even in IPv4 code, although, given the current state of the code, most of the existing calls have no consequence. But using RT_TOS() in IPv6 code is always a bug: IPv6 never had a "TOS" field to be interpreted the RFC 1349 way. There's no historical compatibility to worry about. Fixes: 571912c69f0e ("net: UDP tunnel encapsulation module for tunnelling different protocols like MPLS, IP, NSH etc.") Acked-by: Guillaume Nault Signed-off-by: Matthias May Signed-off-by: Jakub Kicinski net/ipv6/ip6_output.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bcb0da7fffee9464073998b267ce5543da2356d2 Author: Matthias May Date: Fri Aug 5 21:19:05 2022 +0200 mlx5: do not use RT_TOS for IPv6 flowlabel According to Guillaume Nault RT_TOS should never be used for IPv6. Quote: RT_TOS() is an old macro used to interprete IPv4 TOS as described in the obsolete RFC 1349. It's conceptually wrong to use it even in IPv4 code, although, given the current state of the code, most of the existing calls have no consequence. But using RT_TOS() in IPv6 code is always a bug: IPv6 never had a "TOS" field to be interpreted the RFC 1349 way. There's no historical compatibility to worry about. Fixes: ce99f6b97fcd ("net/mlx5e: Support SRIOV TC encapsulation offloads for IPv6 tunnels") Acked-by: Guillaume Nault Signed-off-by: Matthias May Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e488d4f5d6e4cd1e728ba4ddbdcd7ef5f4d13a21 Author: Matthias May Date: Fri Aug 5 21:19:04 2022 +0200 vxlan: do not use RT_TOS for IPv6 flowlabel According to Guillaume Nault RT_TOS should never be used for IPv6. Quote: RT_TOS() is an old macro used to interprete IPv4 TOS as described in the obsolete RFC 1349. It's conceptually wrong to use it even in IPv4 code, although, given the current state of the code, most of the existing calls have no consequence. But using RT_TOS() in IPv6 code is always a bug: IPv6 never had a "TOS" field to be interpreted the RFC 1349 way. There's no historical compatibility to worry about. Fixes: 1400615d64cf ("vxlan: allow setting ipv6 traffic class") Acked-by: Guillaume Nault Signed-off-by: Matthias May Signed-off-by: Jakub Kicinski drivers/net/vxlan/vxlan_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca2bb69514a8bc7f83914122f0d596371352416c Author: Matthias May Date: Fri Aug 5 21:19:03 2022 +0200 geneve: do not use RT_TOS for IPv6 flowlabel According to Guillaume Nault RT_TOS should never be used for IPv6. Quote: RT_TOS() is an old macro used to interprete IPv4 TOS as described in the obsolete RFC 1349. It's conceptually wrong to use it even in IPv4 code, although, given the current state of the code, most of the existing calls have no consequence. But using RT_TOS() in IPv6 code is always a bug: IPv6 never had a "TOS" field to be interpreted the RFC 1349 way. There's no historical compatibility to worry about. Fixes: 3a56f86f1be6 ("geneve: handle ipv6 priority like ipv4 tos") Acked-by: Guillaume Nault Signed-off-by: Matthias May Signed-off-by: Jakub Kicinski drivers/net/geneve.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b4ab94d6adaa5cf842b68bd28f4b50bc774496bd Author: Matthias May Date: Fri Aug 5 21:00:06 2022 +0200 geneve: fix TOS inheriting for ipv4 The current code retrieves the TOS field after the lookup on the ipv4 routing table. The routing process currently only allows routing based on the original 3 TOS bits, and not on the full 6 DSCP bits. As a result the retrieved TOS is cut to the 3 bits. However for inheriting purposes the full 6 bits should be used. Extract the full 6 bits before the route lookup and use that instead of the cut off 3 TOS bits. Fixes: e305ac6cf5a1 ("geneve: Add support to collect tunnel metadata.") Signed-off-by: Matthias May Acked-by: Guillaume Nault Link: https://lore.kernel.org/r/20220805190006.8078-1-matthias.may@westermo.com Signed-off-by: Jakub Kicinski drivers/net/geneve.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 2ba5e47fb75fbb8fab45f5c1bc8d5c33d8834bd3 Author: Chia-Lin Kao (AceLan) Date: Mon Aug 8 16:18:45 2022 +0800 net: atlantic: fix aq_vec index out of range error The final update statement of the for loop exceeds the array range, the dereference of self->aq_vec[i] is not checked and then leads to the index out of range error. Also fixed this kind of coding style in other for loop. [ 97.937604] UBSAN: array-index-out-of-bounds in drivers/net/ethernet/aquantia/atlantic/aq_nic.c:1404:48 [ 97.937607] index 8 is out of range for type 'aq_vec_s *[8]' [ 97.937608] CPU: 38 PID: 3767 Comm: kworker/u256:18 Not tainted 5.19.0+ #2 [ 97.937610] Hardware name: Dell Inc. Precision 7865 Tower/, BIOS 1.0.0 06/12/2022 [ 97.937611] Workqueue: events_unbound async_run_entry_fn [ 97.937616] Call Trace: [ 97.937617] [ 97.937619] dump_stack_lvl+0x49/0x63 [ 97.937624] dump_stack+0x10/0x16 [ 97.937626] ubsan_epilogue+0x9/0x3f [ 97.937627] __ubsan_handle_out_of_bounds.cold+0x44/0x49 [ 97.937629] ? __scm_send+0x348/0x440 [ 97.937632] ? aq_vec_stop+0x72/0x80 [atlantic] [ 97.937639] aq_nic_stop+0x1b6/0x1c0 [atlantic] [ 97.937644] aq_suspend_common+0x88/0x90 [atlantic] [ 97.937648] aq_pm_suspend_poweroff+0xe/0x20 [atlantic] [ 97.937653] pci_pm_suspend+0x7e/0x1a0 [ 97.937655] ? pci_pm_suspend_noirq+0x2b0/0x2b0 [ 97.937657] dpm_run_callback+0x54/0x190 [ 97.937660] __device_suspend+0x14c/0x4d0 [ 97.937661] async_suspend+0x23/0x70 [ 97.937663] async_run_entry_fn+0x33/0x120 [ 97.937664] process_one_work+0x21f/0x3f0 [ 97.937666] worker_thread+0x4a/0x3c0 [ 97.937668] ? process_one_work+0x3f0/0x3f0 [ 97.937669] kthread+0xf0/0x120 [ 97.937671] ? kthread_complete_and_exit+0x20/0x20 [ 97.937672] ret_from_fork+0x22/0x30 [ 97.937676] v2. fixed "warning: variable 'aq_vec' set but not used" v3. simplified a for loop Fixes: 97bde5c4f909 ("net: ethernet: aquantia: Support for NIC-specific code") Signed-off-by: Chia-Lin Kao (AceLan) Acked-by: Sudarsana Reddy Kalluru Link: https://lore.kernel.org/r/20220808081845.42005-1-acelan.kao@canonical.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 84b709d31063bacaabaaad1c5d85143150edd695 Author: Christophe JAILLET Date: Sat Aug 6 18:02:36 2022 +0200 ax88796: Fix some typo in a comment s/by caused/be caused/ s/ax88786/ax88796/ Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/7db4b622d2c3e5af58c1d1f32b81836f4af71f18.1659801746.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski include/net/ax88796.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 690bf6439528208ae20525df5dcbb031cc9d300a Merge: bc3c8fe3c79b 580077855a40 Author: Jakub Kicinski Date: Tue Aug 9 21:27:00 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) Harden set element field checks to avoid out-of-bound memory access, this patch also fixes the type of issue described in 7e6bc1f6cabc ("netfilter: nf_tables: stricter validation of element data") in a broader way. 2) Patches to restrict the chain, set, and rule id lookup in the transaction to the corresponding top-level table, patches from Thadeu Lima de Souza Cascardo. 3) Fix incorrect comment in ip6t_LOG.h 4) nft_data_init() performs upfront validation of the expected data. struct nft_data_desc is used to describe the expected data to be received from userspace. The .size field represents the maximum size that can be stored, for bound checks. Then, .len is an input/output field which stores the expected length as input (this is optional, to restrict the checks), as output it stores the real length received from userspace (if it was not specified as input). This patch comes in response to 7e6bc1f6cabc ("netfilter: nf_tables: stricter validation of element data") to address this type of issue in a more generic way by avoid opencoded data validation. Next patch requires this as a dependency. 5) Disallow jump to implicit chain from set element, this configuration is invalid. Only allow jump to chain via immediate expression is supported at this stage. 6) Fix possible null-pointer derefence in the error path of table updates, if memory allocation of the transaction fails. From Florian Westphal. * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_tables: fix null deref due to zeroed list head netfilter: nf_tables: disallow jump to implicit chain from set element netfilter: nf_tables: upfront validation of data via nft_data_init() netfilter: ip6t_LOG: Fix a typo in a comment netfilter: nf_tables: do not allow RULE_ID to refer to another chain netfilter: nf_tables: do not allow CHAIN_ID to refer to another table netfilter: nf_tables: do not allow SET_ID to refer to another table netfilter: nf_tables: validate variable length element extension ==================== Link: https://lore.kernel.org/r/20220809220532.130240-1-pablo@netfilter.org/ Signed-off-by: Jakub Kicinski commit 46c8229c4317ba8576a206d285a34783390ba6ab Merge: 19f68ed6dc90 de7b9927105b Author: Alexei Starovoitov Date: Tue Aug 9 18:46:12 2022 -0700 Merge branch 'Don't reinit map value in prealloc_lru_pop' Kumar Kartikeya Dwivedi says: ==================== Fix for a bug in prealloc_lru_pop spotted while reading the code, then a test + example that checks whether it is fixed. Changelog: ---------- v2 -> v3: v2: https://lore.kernel.org/bpf/20220809140615.21231-1-memxor@gmail.com * Switch test to use kptr instead of kptr_ref to stabilize test runs * Fix missing lru_bug__destroy (Yonghong) * Collect Acks v1 -> v2: v1: https://lore.kernel.org/bpf/20220806014603.1771-1-memxor@gmail.com * Expand commit log to include summary of the discussion with Yonghong * Make lru_bug selftest serial to not mess up refcount for map_kptr test ==================== Signed-off-by: Alexei Starovoitov commit de7b9927105bd2afe940c6ad22de6938edd8b1c1 Author: Kumar Kartikeya Dwivedi Date: Tue Aug 9 23:30:33 2022 +0200 selftests/bpf: Add test for prealloc_lru_pop bug Add a regression test to check against invalid check_and_init_map_value call inside prealloc_lru_pop. The kptr should not be reset to NULL once we set it after deleting the map element. Hence, we trigger a program that updates the element causing its reuse, and checks whether the unref kptr is reset or not. If it is, prealloc_lru_pop does an incorrect check_and_init_map_value call and the test fails. Acked-by: Yonghong Song Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20220809213033.24147-4-memxor@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/lru_bug.c | 21 ++++++++++ tools/testing/selftests/bpf/progs/lru_bug.c | 49 ++++++++++++++++++++++++ 2 files changed, 70 insertions(+) commit 275c30bcee66a27d1aa97a215d607ad6d49804cb Author: Kumar Kartikeya Dwivedi Date: Tue Aug 9 23:30:32 2022 +0200 bpf: Don't reinit map value in prealloc_lru_pop The LRU map that is preallocated may have its elements reused while another program holds a pointer to it from bpf_map_lookup_elem. Hence, only check_and_free_fields is appropriate when the element is being deleted, as it ensures proper synchronization against concurrent access of the map value. After that, we cannot call check_and_init_map_value again as it may rewrite bpf_spin_lock, bpf_timer, and kptr fields while they can be concurrently accessed from a BPF program. This is safe to do as when the map entry is deleted, concurrent access is protected against by check_and_free_fields, i.e. an existing timer would be freed, and any existing kptr will be released by it. The program can create further timers and kptrs after check_and_free_fields, but they will eventually be released once the preallocated items are freed on map destruction, even if the item is never reused again. Hence, the deleted item sitting in the free list can still have resources attached to it, and they would never leak. With spin_lock, we never touch the field at all on delete or update, as we may end up modifying the state of the lock. Since the verifier ensures that a bpf_spin_lock call is always paired with bpf_spin_unlock call, the program will eventually release the lock so that on reuse the new user of the value can take the lock. Essentially, for the preallocated case, we must assume that the map value may always be in use by the program, even when it is sitting in the freelist, and handle things accordingly, i.e. use proper synchronization inside check_and_free_fields, and never reinitialize the special fields when it is reused on update. Fixes: 68134668c17f ("bpf: Add map side support for bpf timers.") Acked-by: Yonghong Song Signed-off-by: Kumar Kartikeya Dwivedi Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20220809213033.24147-3-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/hashtab.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 1f0752628e76bb3a02109dbd980381f27060ba92 Author: Kumar Kartikeya Dwivedi Date: Tue Aug 9 23:30:31 2022 +0200 bpf: Allow calling bpf_prog_test kfuncs in tracing programs In addition to TC hook, enable these in tracing programs so that they can be used in selftests. Acked-by: Yonghong Song Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20220809213033.24147-2-memxor@gmail.com Signed-off-by: Alexei Starovoitov net/bpf/test_run.c | 1 + 1 file changed, 1 insertion(+) commit 3f5117be95843950f31862be05e947b77a3cd77c Author: David Heidelberg Date: Sun Jun 26 21:16:30 2022 +0200 dt-bindings: mfd: convert to yaml Qualcomm SPMI PMIC Convert Qualcomm SPMI PMIC binding to yaml format. Additional changes: - filled many missing compatibles Co-developed-by: Caleb Connolly Signed-off-by: David Heidelberg Reviewed-by: Rob Herring Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220626191630.176835-1-david@ixit.cz .../devicetree/bindings/mfd/qcom,spmi-pmic.txt | 94 ---------- .../devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 190 +++++++++++++++++++++ 2 files changed, 190 insertions(+), 94 deletions(-) commit b7f362d6413ebd0167ac5a9f09ad5dca5490ac1a Author: Mikulas Patocka Date: Mon Aug 8 10:50:10 2022 -0400 dm writecache: fix smatch warning about invalid return from writecache_map There's a smatch warning "inconsistent returns '&wc->lock'" in dm-writecache. The reason for the warning is that writecache_map() doesn't drop the lock on the impossible path. Fix this warning by adding wc_unlock() after the BUG statement (so that it will be compiled-away anyway). Fixes: df699cc16ea5e ("dm writecache: report invalid return from writecache_map helpers") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-writecache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f876df9f12cda68e68995b33b36491d78fd3ecce Author: Mike Snitzer Date: Tue Aug 9 18:07:28 2022 -0400 dm verity: fix verity_parse_opt_args parsing Commit df326e7a0699 ("dm verity: allow optional args to alter primary args handling") introduced a bug where verity_parse_opt_args() wouldn't properly shift past an optional argument's additional params (by ignoring them). Fix this by avoiding returning with error if an unknown argument is encountered when @only_modifier_opts=true is passed to verity_parse_opt_args(). In practice this regressed the cryptsetup testsuite's FEC testing because unknown optional arguments were encountered, wherey short-circuiting ever testing FEC mode. With this fix all of the cryptsetup testsuite's verity FEC tests pass. Fixes: df326e7a0699 ("dm verity: allow optional args to alter primary args handling") Reported-by: Milan Broz > Signed-off-by: Mike Snitzer drivers/md/dm-verity-target.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 8c22816dbc8733ea761c3b74ec62d9463e242c56 Author: Mike Snitzer Date: Tue Aug 9 17:33:12 2022 -0400 dm verity: fix DM_VERITY_OPTS_MAX value yet again Must account for the possibility that "try_verify_in_tasklet" is used. This is the same issue that was fixed with commit 160f99db94322 -- it is far too easy to miss that additional a new argument(s) require bumping DM_VERITY_OPTS_MAX accordingly. Fixes: 5721d4e5a9cd ("dm verity: Add optional "try_verify_in_tasklet" feature") Signed-off-by: Mike Snitzer drivers/md/dm-verity-target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b33b6fdca3f0380c101e2adae5644777d6530fe5 Author: Mike Snitzer Date: Fri Aug 5 22:58:33 2022 -0400 dm bufio: simplify DM_BUFIO_CLIENT_NO_SLEEP locking Historically none of the bufio code runs in interrupt context but with the use of DM_BUFIO_CLIENT_NO_SLEEP a bufio client can, see: commit 5721d4e5a9cd ("dm verity: Add optional "try_verify_in_tasklet" feature") That said, the new tasklet usecase still doesn't require interrupts be disabled by bufio (let alone conditionally restore them). Yet with PREEMPT_RT, and falling back from tasklet to workqueue, care must be taken to properly synchronize between softirq and process context, otherwise ABBA deadlock may occur. While it is unnecessary to disable bottom-half preemption within a tasklet, we must consistently do so in process context to ensure locking is in the proper order. Fix these issues by switching from spin_lock_irq{save,restore} to using spin_{lock,unlock}_bh instead. Also remove the 'spinlock_flags' member in dm_bufio_client struct (that can be used unsafely if bufio must recurse on behalf of some caller, e.g. block layer's submit_bio). Fixes: 5721d4e5a9cd ("dm verity: Add optional "try_verify_in_tasklet" feature") Reported-by: Jens Axboe Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit d4252071b97d2027d246f6a82cbee4d52f618b47 Author: Mikulas Patocka Date: Tue Aug 9 14:32:13 2022 -0400 add barriers to buffer_uptodate and set_buffer_uptodate Let's have a look at this piece of code in __bread_slow: get_bh(bh); bh->b_end_io = end_buffer_read_sync; submit_bh(REQ_OP_READ, 0, bh); wait_on_buffer(bh); if (buffer_uptodate(bh)) return bh; Neither wait_on_buffer nor buffer_uptodate contain any memory barrier. Consequently, if someone calls sb_bread and then reads the buffer data, the read of buffer data may be executed before wait_on_buffer(bh) on architectures with weak memory ordering and it may return invalid data. Fix this bug by adding a memory barrier to set_buffer_uptodate and an acquire barrier to buffer_uptodate (in a similar way as folio_test_uptodate and folio_mark_uptodate). Signed-off-by: Mikulas Patocka Reviewed-by: Matthew Wilcox (Oracle) Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds include/linux/buffer_head.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit e394ff83bbca1c72427b1feb5c6b9d4dad832f01 Merge: 15205c2829ca 6930bcbfb6ce Author: Linus Torvalds Date: Tue Aug 9 14:56:49 2022 -0700 Merge tag 'nfsd-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd updates from Chuck Lever: "Work on 'courteous server', which was introduced in 5.19, continues apace. This release introduces a more flexible limit on the number of NFSv4 clients that NFSD allows, now that NFSv4 clients can remain in courtesy state long after the lease expiration timeout. The client limit is adjusted based on the physical memory size of the server. The NFSD filecache is a cache of files held open by NFSv4 clients or recently touched by NFSv2 or NFSv3 clients. This cache had some significant scalability constraints that have been relieved in this release. Thanks to all who contributed to this work. A data corruption bug found during the most recent NFS bake-a-thon that involves NFSv3 and NFSv4 clients writing the same file has been addressed in this release. This release includes several improvements in CPU scalability for NFSv4 operations. In addition, Neil Brown provided patches that simplify locking during file lookup, creation, rename, and removal that enables subsequent work on making these operations more scalable. We expect to see that work materialize in the next release. There are also numerous single-patch fixes, clean-ups, and the usual improvements in observability" * tag 'nfsd-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: (78 commits) lockd: detect and reject lock arguments that overflow NFSD: discard fh_locked flag and fh_lock/fh_unlock NFSD: use (un)lock_inode instead of fh_(un)lock for file operations NFSD: use explicit lock/unlock for directory ops NFSD: reduce locking in nfsd_lookup() NFSD: only call fh_unlock() once in nfsd_link() NFSD: always drop directory lock in nfsd_unlink() NFSD: change nfsd_create()/nfsd_symlink() to unlock directory before returning. NFSD: add posix ACLs to struct nfsd_attrs NFSD: add security label to struct nfsd_attrs NFSD: set attributes when creating symlinks NFSD: introduce struct nfsd_attrs NFSD: verify the opened dentry after setting a delegation NFSD: drop fh argument from alloc_init_deleg NFSD: Move copy offload callback arguments into a separate structure NFSD: Add nfsd4_send_cb_offload() NFSD: Remove kmalloc from nfsd4_do_async_copy() NFSD: Refactor nfsd4_do_copy() NFSD: Refactor nfsd4_cleanup_inter_ssc() (2/2) NFSD: Refactor nfsd4_cleanup_inter_ssc() (1/2) ... commit b8c0aa9b16bb2f4d5966b87fbf1f36f3280e1f60 Author: Dan Carpenter Date: Mon Aug 1 13:17:32 2022 +0300 NTB: EPF: Tidy up some bounds checks This sscanf() is reading from the filename which was set by the kernel so it should be trust worthy. Although the data is likely trust worthy there is some bounds checking but unfortunately, it is not complete or consistent. Additionally, the Smatch static checker marks everything that comes from sscanf() as tainted and so Smatch complains that this code can lead to an out of bounds issue. Let's clean things up and make Smatch happy. The first problem is that there is no bounds checking in the _show() functions. The _store() and _show() functions are very similar so make the bounds checking the same in both. The second issue is that if "win_no" is zero it leads to an array underflow so add an if (win_no <= 0) check for that. Signed-off-by: Dan Carpenter Acked-by: Souptick Joarder (HPE) Signed-off-by: Jon Mason drivers/pci/endpoint/functions/pci-epf-vntb.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 3305f43cb6a8f1653c31463597d37216d03717c1 Author: Dan Carpenter Date: Mon Aug 1 13:15:25 2022 +0300 NTB: EPF: Fix error code in epf_ntb_bind() Return an error code if pci_register_driver() fails. Don't return success. Fixes: da51fd247424 ("NTB: EPF: support NTB transfer between PCI RC and EP connection") Signed-off-by: Dan Carpenter Acked-by: Souptick Joarder (HPE) Signed-off-by: Jon Mason drivers/pci/endpoint/functions/pci-epf-vntb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ae9f38adac261e4ca83559c7df21b18dd66aa986 Author: Tom Rix Date: Mon Jul 4 09:25:59 2022 -0400 PCI: endpoint: pci-epf-vntb: reduce several globals to statics sparse reports drivers/pci/endpoint/functions/pci-epf-vntb.c:975:5: warning: symbol 'pci_read' was not declared. Should it be static? drivers/pci/endpoint/functions/pci-epf-vntb.c:984:5: warning: symbol 'pci_write' was not declared. Should it be static? drivers/pci/endpoint/functions/pci-epf-vntb.c:989:16: warning: symbol 'vpci_ops' was not declared. Should it be static? These functions and variables are only used in pci-epf-vntb.c, so their storage class specifiers should be static. Fixes: ff32fac00d97 ("NTB: EPF: support NTB transfer between PCI RC and EP connection") Signed-off-by: Tom Rix Acked-by: Frank Li Signed-off-by: Jon Mason drivers/pci/endpoint/functions/pci-epf-vntb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8e4bfbe644a6b804a72fd4575d89507a6e1d9476 Author: Yang Yingliang Date: Sat Jun 25 10:15:16 2022 +0800 PCI: endpoint: pci-epf-vntb: fix error handle in epf_ntb_mw_bar_init() In error case of epf_ntb_mw_bar_init(), memory window BARs should be cleared, so add 'num_mws' parameter in epf_ntb_mw_bar_clear() and calling it in error path to clear the BARs. Also add missing error code when pci_epc_mem_alloc_addr() fails. Fixes: ff32fac00d97 ("NTB: EPF: support NTB transfer between PCI RC and EP connection") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Jon Mason drivers/pci/endpoint/functions/pci-epf-vntb.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 556a2c7dca337954040ffdf0c544aa8bbb75583b Author: Ren Zhijie Date: Fri Jun 24 09:19:11 2022 +0800 PCI: endpoint: Fix Kconfig dependency If CONFIG_NTB is not set and CONFIG_PCI_EPF_VNTB is y. make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed, like this: drivers/pci/endpoint/functions/pci-epf-vntb.o: In function `epf_ntb_cmd_handler': pci-epf-vntb.c:(.text+0x95e): undefined reference to `ntb_db_event' pci-epf-vntb.c:(.text+0xa1f): undefined reference to `ntb_link_event' pci-epf-vntb.c:(.text+0xa42): undefined reference to `ntb_link_event' drivers/pci/endpoint/functions/pci-epf-vntb.o: In function `pci_vntb_probe': pci-epf-vntb.c:(.text+0x1250): undefined reference to `ntb_register_device' The functions ntb_*() are defined in drivers/ntb/core.c, which need CONFIG_NTB setting y to be build-in. To fix this build error, add depends on NTB. Reported-by: Hulk Robot Fixes: ff32fac00d97("NTB: EPF: support NTB transfer between PCI RC and EP connection") Signed-off-by: Ren Zhijie Acked-by: Frank Li Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Reported-by: Randy Dunlap Signed-off-by: Jon Mason drivers/pci/endpoint/functions/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 7b14a5e96128ec467ea9ced36a32f28ee7892e1f Author: Colin Ian King Date: Thu Jun 23 17:57:09 2022 +0100 NTB: EPF: set pointer addr to null using NULL rather than 0 The pointer addr is being set to null using 0. Use NULL instead. Cleans up sparse warning: warning: Using plain integer as NULL pointer Signed-off-by: Colin Ian King Signed-off-by: Jon Mason drivers/pci/endpoint/functions/pci-epf-vntb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9458c27a67e37a574938e9637afe393c3c2a50af Author: Bagas Sanjaya Date: Wed Jun 22 16:53:45 2022 +0700 Documentation: PCI: extend subheading underline for "lspci output" section The underline syntax for "lspci output..." section is off-by-one less than the section heading's length, hence triggers the warning: Documentation/PCI/endpoint/pci-vntb-howto.rst:131: WARNING: Title underline too short. Extend the underline by one to match the heading length. Link: https://lore.kernel.org/linux-next/20220621200235.211b2e32@canb.auug.org.au/ Fixes: 0c4b285d9636cc ("Documentation: PCI: Add specification for the PCI vNTB function device") Reported-by: Stephen Rothwell Cc: Kishon Vijay Abraham I Cc: Lorenzo Pieralisi Cc: "Krzysztof Wilczyński" Cc: Bjorn Helgaas Cc: Jonathan Corbet Cc: Frank Li Cc: linux-pci@vger.kernel.org Cc: linux-next@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Bagas Sanjaya Signed-off-by: Jon Mason Documentation/PCI/endpoint/pci-vntb-howto.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9ac6e335dc72cd1296d06e20a7c8bbff8ca19d3 Author: Bagas Sanjaya Date: Wed Jun 22 16:53:44 2022 +0700 Documentation: PCI: Use code-block block for scratchpad registers diagram The diagram in "Scratchpad Registers" isn't formatted inside code block, hence triggers indentation warning: Documentation/PCI/endpoint/pci-vntb-function.rst:82: WARNING: Unexpected indentation. Fix the warning by using code-block directive to format the diagram inside code block, as in other diagrams in Documentation/. While at it, unindent the preceeding text. Link: https://lore.kernel.org/linux-next/20220621200235.211b2e32@canb.auug.org.au/ Fixes: 0c4b285d9636cc ("Documentation: PCI: Add specification for the PCI vNTB function device") Reported-by: Stephen Rothwell Cc: Kishon Vijay Abraham I Cc: Lorenzo Pieralisi Cc: "Krzysztof Wilczyński" Cc: Bjorn Helgaas Cc: Jonathan Corbet Cc: Frank Li Cc: linux-pci@vger.kernel.org Cc: linux-next@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Bagas Sanjaya Signed-off-by: Jon Mason Documentation/PCI/endpoint/pci-vntb-function.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4ac8c8e52cd915c7efbd60f1eab4afe855f2e7c4 Author: Frank Li Date: Tue Feb 22 10:23:55 2022 -0600 Documentation: PCI: Add specification for the PCI vNTB function device Add specification for the PCI vNTB function device. The endpoint function driver and the host PCI driver should be created based on this specification. Signed-off-by: Frank Li Signed-off-by: Jon Mason Documentation/PCI/endpoint/index.rst | 2 + Documentation/PCI/endpoint/pci-vntb-function.rst | 126 +++++++++++++++++ Documentation/PCI/endpoint/pci-vntb-howto.rst | 167 +++++++++++++++++++++++ 3 files changed, 295 insertions(+) commit e35f56bb03304abc92c928b641af41ca372966bb Author: Frank Li Date: Tue Feb 22 10:23:54 2022 -0600 PCI: endpoint: Support NTB transfer between RC and EP Add NTB function driver and virtual PCI Bus and Virtual NTB driver to implement communication between PCIe Root Port and PCIe EP devices ┌────────────┐ ┌─────────────────────────────────────┐ │ │ │ │ ├────────────┤ │ ┌──────────────┤ │ NTB │ │ │ NTB │ │ NetDev │ │ │ NetDev │ ├────────────┤ │ ├──────────────┤ │ NTB │ │ │ NTB │ │ Transfer │ │ │ Transfer │ ├────────────┤ │ ├──────────────┤ │ │ │ │ │ │ PCI NTB │ │ │ │ │ EPF │ │ │ │ │ Driver │ │ │ PCI Virtual │ │ │ ├───────────────┐ │ NTB Driver │ │ │ │ PCI EP NTB │◄────►│ │ │ │ │ FN Driver │ │ │ ├────────────┤ ├───────────────┤ ├──────────────┤ │ │ │ │ │ │ │ PCI Bus │ ◄─────► │ PCI EP Bus │ │ Virtual PCI │ │ │ PCI │ │ │ Bus │ └────────────┘ └───────────────┴──────┴──────────────┘ PCIe Root Port PCI EP This driver includes 3 parts: 1 PCI EP NTB function driver 2 Virtual PCI bus 3 PCI virtual NTB driver, which is loaded only by above virtual PCI bus Signed-off-by: Frank Li Signed-off-by: Jon Mason drivers/pci/endpoint/functions/Kconfig | 11 + drivers/pci/endpoint/functions/Makefile | 1 + drivers/pci/endpoint/functions/pci-epf-vntb.c | 1424 +++++++++++++++++++++++++ 3 files changed, 1436 insertions(+) commit e75d5ae8ab88b7ffb3d1d56124b003f3555f74b4 Author: Frank Li Date: Tue Feb 22 10:23:53 2022 -0600 NTB: epf: Allow more flexibility in the memory BAR map method Support the below BAR configuration methods for epf NTB. BAR 0: config and scratchpad BAR 2: doorbell BAR 4: memory map windows Set difference BAR number information into struct ntb_epf_data. So difference VID/PID can choose different BAR configurations. There are difference BAR map method between epf NTB and epf vNTB Endpoint function. Signed-off-by: Frank Li Signed-off-by: Jon Mason drivers/ntb/hw/epf/ntb_hw_epf.c | 48 ++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 13 deletions(-) commit 4284c88fff0efc4e418abb53d78e02dc4f099d6c Author: Frank Li Date: Tue Feb 22 10:23:52 2022 -0600 PCI: designware-ep: Allow pci_epc_set_bar() update inbound map address ntb_mw_set_trans() will set memory map window after endpoint function driver bind. The inbound map address need be updated dynamically when using NTB by PCIe Root Port and PCIe Endpoint connection. Checking if iatu already assigned to the BAR, if yes, using assigned iatu number to update inbound address map and skip set BAR's register. Signed-off-by: Frank Li Signed-off-by: Jon Mason drivers/pci/controller/dwc/pcie-designware-ep.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 56e07c0c9e4a4b59a47a848b021a42cf203c982c Author: Krzysztof Kozlowski Date: Sat Jul 23 10:23:58 2022 +0200 dt-bindings: soc: qcom: smd-rpm: extend example Replace existing limited example with proper code for Qualcomm Resource Power Manager (RPM) over SMD based on MSM8916. This also fixes the example's indentation. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220723082358.39544-2-krzysztof.kozlowski@linaro.org .../devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml | 33 ++++++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) commit 568f83ffe69ba38cc10f36417d6cbb6eee4dc802 Author: Krzysztof Kozlowski Date: Sat Jul 23 10:23:57 2022 +0200 dt-bindings: soc: qcom: smd: reference SMD edge schema The child node of smd is an SMD edge representing remote subsystem. Bring back missing reference from previously sent patch (disappeared when applying). Link: https://lore.kernel.org/r/20220517070113.18023-9-krzysztof.kozlowski@linaro.org Fixes: 385fad1303af ("dt-bindings: remoteproc: qcom,smd-edge: define re-usable schema for smd-edge") Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220723082358.39544-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/soc/qcom/qcom,smd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 331753ff3292d5ef987ad6106f737853c3a187ba Author: Bhupesh Sharma Date: Tue Jul 26 01:57:09 2022 +0530 dt-bindings: mmc: sdhci-msm: Fix 'operating-points-v2 was unexpected' issue As Rob reported in [1], there is one more issue present in the 'sdhci-msm' dt-binding which shows up when a fix for 'unevaluatedProperties' handling is applied: Documentation/devicetree/bindings/mmc/sdhci-msm.example.dtb: mmc@8804000: Unevaluated properties are not allowed ('operating-points-v2' was unexpected) Fix the same. [1]. https://lore.kernel.org/lkml/20220514220116.1008254-1-bhupesh.sharma@linaro.org/ Cc: Bjorn Andersson Cc: Rob Herring Cc: Ulf Hansson Signed-off-by: Bhupesh Sharma Acked-by: Rob Herring Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220725202709.2861789-1-bhupesh.sharma@linaro.org Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 0d22bbc2d557515bd51629408cada0fca681343a Author: Krzysztof Kozlowski Date: Mon Aug 8 13:15:26 2022 +0300 dt-bindings: display: simple-framebuffer: Drop Bartlomiej Zolnierkiewicz Bartlomiej's Samsung email address is not working since around last year and there was no follow up patch take over of the drivers, so drop the email from maintainers. Cc: Bartlomiej Zolnierkiewicz Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220808101526.46556-3-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/display/simple-framebuffer.yaml | 1 - 1 file changed, 1 deletion(-) commit d80d60b0db6ff3dd2e29247cc2a5166d7e9ae37e Author: Sebastian Würl Date: Thu Aug 4 10:14:11 2022 +0200 can: mcp251x: Fix race condition on receive interrupt The mcp251x driver uses both receiving mailboxes of the CAN controller chips. For retrieving the CAN frames from the controller via SPI, it checks once per interrupt which mailboxes have been filled and will retrieve the messages accordingly. This introduces a race condition, as another CAN frame can enter mailbox 1 while mailbox 0 is emptied. If now another CAN frame enters mailbox 0 until the interrupt handler is called next, mailbox 0 is emptied before mailbox 1, leading to out-of-order CAN frames in the network device. This is fixed by checking the interrupt flags once again after freeing mailbox 0, to correctly also empty mailbox 1 before leaving the handler. For reproducing the bug I created the following setup: - Two CAN devices, one Raspberry Pi with MCP2515, the other can be any. - Setup CAN to 1 MHz - Spam bursts of 5 CAN-messages with increasing CAN-ids - Continue sending the bursts while sleeping a second between the bursts - Check on the RPi whether the received messages have increasing CAN-ids - Without this patch, every burst of messages will contain a flipped pair v3: https://lore.kernel.org/all/20220804075914.67569-1-sebastian.wuerl@ororatech.com v2: https://lore.kernel.org/all/20220804064803.63157-1-sebastian.wuerl@ororatech.com v1: https://lore.kernel.org/all/20220803153300.58732-1-sebastian.wuerl@ororatech.com Fixes: bf66f3736a94 ("can: mcp251x: Move to threaded interrupts instead of workqueues.") Signed-off-by: Sebastian Würl Link: https://lore.kernel.org/all/20220804081411.68567-1-sebastian.wuerl@ororatech.com [mkl: reduce scope of intf1, eflag1] Signed-off-by: Marc Kleine-Budde drivers/net/can/spi/mcp251x.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit bc3c8fe3c79bcdae4d90e3726054fac5cca8ac32 Author: Florian Westphal Date: Sun Aug 7 13:53:04 2022 +0200 plip: avoid rcu debug splat WARNING: suspicious RCU usage 5.2.0-rc2-00605-g2638eb8b50cfc #1 Not tainted drivers/net/plip/plip.c:1110 suspicious rcu_dereference_check() usage! plip_open is called with RTNL held, switch to the correct helper. Fixes: 2638eb8b50cf ("net: ipv4: provide __rcu annotation for ifa_list") Reported-by: kernel test robot Signed-off-by: Florian Westphal Link: https://lore.kernel.org/r/20220807115304.13257-1-fw@strlen.de Signed-off-by: Jakub Kicinski drivers/net/plip/plip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b7680c6c1f6de9904f1d9b05c952f0c64a03350 Author: Sandor Bodo-Merle Date: Mon Aug 8 19:39:39 2022 +0200 net: bgmac: Fix a BUG triggered by wrong bytes_compl On one of our machines we got: kernel BUG at lib/dynamic_queue_limits.c:27! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM CPU: 0 PID: 1166 Comm: irq/41-bgmac Tainted: G W O 4.14.275-rt132 #1 Hardware name: BRCM XGS iProc task: ee3415c0 task.stack: ee32a000 PC is at dql_completed+0x168/0x178 LR is at bgmac_poll+0x18c/0x6d8 pc : [] lr : [] psr: 800a0313 sp : ee32be14 ip : 000005ea fp : 00000bd4 r10: ee558500 r9 : c0116298 r8 : 00000002 r7 : 00000000 r6 : ef128810 r5 : 01993267 r4 : 01993851 r3 : ee558000 r2 : 000070e1 r1 : 00000bd4 r0 : ee52c180 Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 12c5387d Table: 8e88c04a DAC: 00000051 Process irq/41-bgmac (pid: 1166, stack limit = 0xee32a210) Stack: (0xee32be14 to 0xee32c000) be00: ee558520 ee52c100 ef128810 be20: 00000000 00000002 c0116298 c04b5a18 00000000 c0a0c8c4 c0951780 00000040 be40: c0701780 ee558500 ee55d520 ef05b340 ef6f9780 ee558520 00000001 00000040 be60: ffffe000 c0a56878 ef6fa040 c0952040 0000012c c0528744 ef6f97b0 fffcfb6a be80: c0a04104 2eda8000 c0a0c4ec c0a0d368 ee32bf44 c0153534 ee32be98 ee32be98 bea0: ee32bea0 ee32bea0 ee32bea8 ee32bea8 00000000 c01462e4 ffffe000 ef6f22a8 bec0: ffffe000 00000008 ee32bee4 c0147430 ffffe000 c094a2a8 00000003 ffffe000 bee0: c0a54528 00208040 0000000c c0a0c8c4 c0a65980 c0124d3c 00000008 ee558520 bf00: c094a23c c0a02080 00000000 c07a9910 ef136970 ef136970 ee30a440 ef136900 bf20: ee30a440 00000001 ef136900 ee30a440 c016d990 00000000 c0108db0 c012500c bf40: ef136900 c016da14 ee30a464 ffffe000 00000001 c016dd14 00000000 c016db28 bf60: ffffe000 ee21a080 ee30a400 00000000 ee32a000 ee30a440 c016dbfc ee25fd70 bf80: ee21a09c c013edcc ee32a000 ee30a400 c013ec7c 00000000 00000000 00000000 bfa0: 00000000 00000000 00000000 c0108470 00000000 00000000 00000000 00000000 bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [] (dql_completed) from [] (bgmac_poll+0x18c/0x6d8) [] (bgmac_poll) from [] (net_rx_action+0x1c4/0x494) [] (net_rx_action) from [] (do_current_softirqs+0x1ec/0x43c) [] (do_current_softirqs) from [] (__local_bh_enable+0x80/0x98) [] (__local_bh_enable) from [] (irq_forced_thread_fn+0x84/0x98) [] (irq_forced_thread_fn) from [] (irq_thread+0x118/0x1c0) [] (irq_thread) from [] (kthread+0x150/0x158) [] (kthread) from [] (ret_from_fork+0x14/0x24) Code: a83f15e0 0200001a 0630a0e1 c3ffffea (f201f0e7) The issue seems similar to commit 90b3b339364c ("net: hisilicon: Fix a BUG trigered by wrong bytes_compl") and potentially introduced by commit b38c83dd0866 ("bgmac: simplify tx ring index handling"). If there is an RX interrupt between setting ring->end and netdev_sent_queue() we can hit the BUG_ON as bgmac_dma_tx_free() can miscalculate the queue size while called from bgmac_poll(). The machine which triggered the BUG runs a v4.14 RT kernel - but the issue seems present in mainline too. Fixes: b38c83dd0866 ("bgmac: simplify tx ring index handling") Signed-off-by: Sandor Bodo-Merle Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20220808173939.193804-1-sbodomerle@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bgmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c46bb49460ee14c69629e813640d8b929e88941 Author: Vladimir Oltean Date: Mon Aug 8 15:51:27 2022 +0300 net: dsa: felix: suppress non-changes to the tagging protocol The way in which dsa_tree_change_tag_proto() works is that when dsa_tree_notify() fails, it doesn't know whether the operation failed mid way in a multi-switch tree, or it failed for a single-switch tree. So even though drivers need to fail cleanly in ds->ops->change_tag_protocol(), DSA will still call dsa_tree_notify() again, to restore the old tag protocol for potential switches in the tree where the change did succeeed (before failing for others). This means for the felix driver that if we report an error in felix_change_tag_protocol(), we'll get another call where proto_ops == old_proto_ops. If we proceed to act upon that, we may do unexpected things. For example, we will call dsa_tag_8021q_register() twice in a row, without any dsa_tag_8021q_unregister() in between. Then we will actually call dsa_tag_8021q_unregister() via old_proto_ops->teardown, which (if it manages to run at all, after walking through corrupted data structures) will leave the ports inoperational anyway. The bug can be readily reproduced if we force an error while in tag_8021q mode; this crashes the kernel. echo ocelot-8021q > /sys/class/net/eno2/dsa/tagging echo edsa > /sys/class/net/eno2/dsa/tagging # -EPROTONOSUPPORT Unable to handle kernel NULL pointer dereference at virtual address 0000000000000014 Call trace: vcap_entry_get+0x24/0x124 ocelot_vcap_filter_del+0x198/0x270 felix_tag_8021q_vlan_del+0xd4/0x21c dsa_switch_tag_8021q_vlan_del+0x168/0x2cc dsa_switch_event+0x68/0x1170 dsa_tree_notify+0x14/0x34 dsa_port_tag_8021q_vlan_del+0x84/0x110 dsa_tag_8021q_unregister+0x15c/0x1c0 felix_tag_8021q_teardown+0x16c/0x180 felix_change_tag_protocol+0x1bc/0x230 dsa_switch_event+0x14c/0x1170 dsa_tree_change_tag_proto+0x118/0x1c0 Fixes: 7a29d220f4c0 ("net: dsa: felix: reimplement tagging protocol change with function pointers") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20220808125127.3344094-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski drivers/net/dsa/ocelot/felix.c | 3 +++ 1 file changed, 3 insertions(+) commit 7ba0fa7f32f32f01e49197d4d714ff9aea508502 Merge: b8c3bf0ed2ed f01272ee3856 Author: Jakub Kicinski Date: Tue Aug 9 11:51:00 2022 -0700 Merge tag 'wireless-2022-08-09' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Kalle Valo says: ==================== wireless fixes for v6.0 First set of fixes for v6.0. Small one this time, fix a cfg80211 warning seen with brcmfmac and remove an unncessary inline keyword from wilc1000. * tag 'wireless-2022-08-09' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: wilc1000: fix spurious inline in wilc_handle_disconnect() wifi: cfg80211: Fix validating BSS pointers in __cfg80211_connect_result ==================== Link: https://lore.kernel.org/r/20220809164756.B1DAEC433D6@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 580077855a40741cf511766129702d97ff02f4d9 Author: Florian Westphal Date: Tue Aug 9 18:34:02 2022 +0200 netfilter: nf_tables: fix null deref due to zeroed list head In nf_tables_updtable, if nf_tables_table_enable returns an error, nft_trans_destroy is called to free the transaction object. nft_trans_destroy() calls list_del(), but the transaction was never placed on a list -- the list head is all zeroes, this results in a null dereference: BUG: KASAN: null-ptr-deref in nft_trans_destroy+0x26/0x59 Call Trace: nft_trans_destroy+0x26/0x59 nf_tables_newtable+0x4bc/0x9bc [..] Its sane to assume that nft_trans_destroy() can be called on the transaction object returned by nft_trans_alloc(), so make sure the list head is initialised. Fixes: 55dd6f93076b ("netfilter: nf_tables: use new transaction infrastructure to handle table") Reported-by: mingi cho Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 1 + 1 file changed, 1 insertion(+) commit f323ef3a0d49e147365284bc1f02212e617b7f09 Author: Pablo Neira Ayuso Date: Mon Aug 8 19:30:07 2022 +0200 netfilter: nf_tables: disallow jump to implicit chain from set element Extend struct nft_data_desc to add a flag field that specifies nft_data_init() is being called for set element data. Use it to disallow jump to implicit chain from set element, only jump to chain via immediate expression is allowed. Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING") Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 5 +++++ net/netfilter/nf_tables_api.c | 4 ++++ 2 files changed, 9 insertions(+) commit 341b6941608762d8235f3fd1e45e4d7114ed8c2c Author: Pablo Neira Ayuso Date: Mon Aug 8 19:30:06 2022 +0200 netfilter: nf_tables: upfront validation of data via nft_data_init() Instead of parsing the data and then validate that type and length are correct, pass a description of the expected data so it can be validated upfront before parsing it to bail out earlier. This patch adds a new .size field to specify the maximum size of the data area. The .len field is optional and it is used as an input/output field, it provides the specific length of the expected data in the input path. If then .len field is not specified, then obtained length from the netlink attribute is stored. This is required by cmp, bitwise, range and immediate, which provide no netlink attribute that describes the data length. The immediate expression uses the destination register type to infer the expected data type. Relying on opencoded validation of the expected data might lead to subtle bugs as described in 7e6bc1f6cabc ("netfilter: nf_tables: stricter validation of element data"). Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 4 +- net/netfilter/nf_tables_api.c | 78 ++++++++++++++++++++------------------- net/netfilter/nft_bitwise.c | 66 ++++++++++++++++----------------- net/netfilter/nft_cmp.c | 44 ++++++++++------------ net/netfilter/nft_immediate.c | 22 +++++++++-- net/netfilter/nft_range.c | 27 ++++++-------- 6 files changed, 126 insertions(+), 115 deletions(-) commit 3fa5cbdc44de190f2c5605ba7db015ae0d26f668 Author: Trond Myklebust Date: Tue Aug 9 13:59:09 2022 -0400 NFS: Improve readpage/writepage tracing Switch formatting to better match that used by other NFS tracepoints. Signed-off-by: Trond Myklebust fs/nfs/nfstrace.h | 54 ++++++++++++++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 28 deletions(-) commit b313eb91521872284c0e395773fc6e9827fb1446 Author: Trond Myklebust Date: Tue Aug 9 13:46:41 2022 -0400 NFS: Improve O_DIRECT tracing Switch the formatting to match the other NFS tracepoints. Signed-off-by: Trond Myklebust fs/nfs/nfstrace.h | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit af887e437bb298752b2edc5834048b8151b8aea0 Author: Trond Myklebust Date: Tue Aug 9 12:50:28 2022 -0400 NFS: Improve write error tracing Don't leak request pointers, but use the "device:inode" labelling that is used by all the other trace points. Furthermore, replace use of page indexes with an offset, again in order to align behaviour with other NFS trace points. Signed-off-by: Trond Myklebust fs/nfs/nfstrace.h | 36 +++++++++++++++++++++--------------- fs/nfs/write.c | 8 +++++--- include/linux/nfs_page.h | 3 +-- 3 files changed, 27 insertions(+), 20 deletions(-) commit e362359ace6f87c201531872486ff295df306d13 Author: Thadeu Lima de Souza Cascardo Date: Tue Aug 9 14:07:51 2022 -0300 posix-cpu-timers: Cleanup CPU timers before freeing them during exec Commit 55e8c8eb2c7b ("posix-cpu-timers: Store a reference to a pid not a task") started looking up tasks by PID when deleting a CPU timer. When a non-leader thread calls execve, it will switch PIDs with the leader process. Then, as it calls exit_itimers, posix_cpu_timer_del cannot find the task because the timer still points out to the old PID. That means that armed timers won't be disarmed, that is, they won't be removed from the timerqueue_list. exit_itimers will still release their memory, and when that list is later processed, it leads to a use-after-free. Clean up the timers from the de-threaded task before freeing them. This prevents a reported use-after-free. Fixes: 55e8c8eb2c7b ("posix-cpu-timers: Store a reference to a pid not a task") Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Cc: Link: https://lore.kernel.org/r/20220809170751.164716-1-cascardo@canonical.com fs/exec.c | 3 +++ 1 file changed, 3 insertions(+) commit 46dae32fe625a75f549c3a70edc77b778197bb05 Author: Youngmin Nam Date: Tue Jul 12 18:47:15 2022 +0900 time: Correct the prototype of ns_to_kernel_old_timeval and ns_to_timespec64 In ns_to_kernel_old_timeval() definition, the function argument is defined with const identifier in kernel/time/time.c, but the prototype in include/linux/time32.h looks different. - The function is defined in kernel/time/time.c as below: struct __kernel_old_timeval ns_to_kernel_old_timeval(const s64 nsec) - The function is decalared in include/linux/time32.h as below: extern struct __kernel_old_timeval ns_to_kernel_old_timeval(s64 nsec); Because the variable of arithmethic types isn't modified in the calling scope, there's no need to mark arguments as const, which was already mentioned during review (Link[1) of the original patch. Likewise remove the "const" keyword in both definition and declaration of ns_to_timespec64() as requested by Arnd (Link[2]). Fixes: a84d1169164b ("y2038: Introduce struct __kernel_old_timeval") Signed-off-by: Youngmin Nam Signed-off-by: Thomas Gleixner Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/all/20220712094715.2918823-1-youngmin.nam@samsung.com Link[1]: https://lore.kernel.org/all/20180310081123.thin6wphgk7tongy@gmail.com/ Link[2]: https://lore.kernel.org/all/CAK8P3a3nknJgEDESGdJH91jMj6R_xydFqWASd8r5BbesdvMBgA@mail.gmail.com/ include/linux/time64.h | 2 +- kernel/time/time.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 134941683b89d05b5e5c28c817c95049ba409d01 Author: Christophe JAILLET Date: Sat Aug 6 17:39:20 2022 +0200 netfilter: ip6t_LOG: Fix a typo in a comment s/_IPT_LOG_H/_IP6T_LOG_H/ While at it add some surrounding space to ease reading. Signed-off-by: Christophe JAILLET Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter_ipv6/ip6t_LOG.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36d5b2913219ac853908b0f1c664345e04313856 Author: Thadeu Lima de Souza Cascardo Date: Tue Aug 9 14:01:48 2022 -0300 netfilter: nf_tables: do not allow RULE_ID to refer to another chain When doing lookups for rules on the same batch by using its ID, a rule from a different chain can be used. If a rule is added to a chain but tries to be positioned next to a rule from a different chain, it will be linked to chain2, but the use counter on chain1 would be the one to be incremented. When looking for rules by ID, use the chain that was used for the lookup by name. The chain used in the context copied to the transaction needs to match that same chain. That way, struct nft_rule does not need to get enlarged with another member. Fixes: 1a94e38d254b ("netfilter: nf_tables: add NFTA_RULE_ID attribute") Fixes: 75dd48e2e420 ("netfilter: nf_tables: Support RULE_ID reference in new rule") Signed-off-by: Thadeu Lima de Souza Cascardo Cc: Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 95f466d22364a33d183509629d0879885b4f547e Author: Thadeu Lima de Souza Cascardo Date: Tue Aug 9 14:01:47 2022 -0300 netfilter: nf_tables: do not allow CHAIN_ID to refer to another table When doing lookups for chains on the same batch by using its ID, a chain from a different table can be used. If a rule is added to a table but refers to a chain in a different table, it will be linked to the chain in table2, but would have expressions referring to objects in table1. Then, when table1 is removed, the rule will not be removed as its linked to a chain in table2. When expressions in the rule are processed or removed, that will lead to a use-after-free. When looking for chains by ID, use the table that was used for the lookup by name, and only return chains belonging to that same table. Fixes: 837830a4b439 ("netfilter: nf_tables: add NFTA_RULE_CHAIN_ID attribute") Signed-off-by: Thadeu Lima de Souza Cascardo Cc: Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 470ee20e069a6d05ae549f7d0ef2bdbcee6a81b2 Author: Thadeu Lima de Souza Cascardo Date: Tue Aug 9 14:01:46 2022 -0300 netfilter: nf_tables: do not allow SET_ID to refer to another table When doing lookups for sets on the same batch by using its ID, a set from a different table can be used. Then, when the table is removed, a reference to the set may be kept after the set is freed, leading to a potential use-after-free. When looking for sets by ID, use the table that was used for the lookup by name, and only return sets belonging to that same table. This fixes CVE-2022-2586, also reported as ZDI-CAN-17470. Reported-by: Team Orca of Sea Security (@seasecresponse) Fixes: 958bee14d071 ("netfilter: nf_tables: use new transaction infrastructure to handle sets") Signed-off-by: Thadeu Lima de Souza Cascardo Cc: Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 34aae2c2fb1e3d88a5aeee16715cb6bf0336cdce Author: Pablo Neira Ayuso Date: Tue Aug 9 11:25:43 2022 +0200 netfilter: nf_tables: validate variable length element extension Update template to validate variable length extensions. This patch adds a new .ext_len[id] field to the template to store the expected extension length. This is used to sanity check the initialization of the variable length extension. Use PTR_ERR() in nft_set_elem_init() to report errors since, after this update, there are two reason why this might fail, either because of ENOMEM or insufficient room in the extension field (EINVAL). Kernels up until 7e6bc1f6cabc ("netfilter: nf_tables: stricter validation of element data") allowed to copy more data to the extension than was allocated. This ext_len field allows to validate if the destination has the correct size as additional check. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 4 +- net/netfilter/nf_tables_api.c | 84 ++++++++++++++++++++++++++++++++------- net/netfilter/nft_dynset.c | 2 +- 3 files changed, 73 insertions(+), 17 deletions(-) commit 46981fa78490e16589559cec8c762e5527d665d2 Author: Sakari Ailus Date: Tue Aug 9 00:12:13 2022 +0300 ACPI: property: Fix error handling in acpi_init_properties() buf.pointer, memory for storing _DSD data and nodes, was released if either parsing properties or, as recently added, attaching data node tags failed. Alas, properties were still left pointing to this memory if parsing properties were successful but attaching data node tags failed. Fix this by separating error handling for the two, and leaving properties intact if data nodes cannot be tagged for a reason or another. Reported-by: kernel test robot Fixes: 1d52f10917a7 ("ACPI: property: Tie data nodes to acpi handles") Signed-off-by: Sakari Ailus [ rjw: Drop unrelated white space change ] Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 15205c2829ca2cbb5ece5ceaafe1171a8470e62b Merge: 4b22e2074195 1a1e3aca9d49 Author: Linus Torvalds Date: Tue Aug 9 10:11:56 2022 -0700 Merge tag 'fscache-fixes-20220809' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull fscache updates from David Howells: - Fix a cookie access ref leak if a cookie is invalidated a second time before the first invalidation is actually processed. - Add a tracepoint to log cookie lookup failure * tag 'fscache-fixes-20220809' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: fscache: add tracepoint when failing cookie fscache: don't leak cookie access refs if invalidation is in progress or failed commit 4b22e2074195097c9d6bdc688288d12b7b236bae Merge: 426b4ca2d6a5 2757a4dc1849 Author: Linus Torvalds Date: Tue Aug 9 10:08:08 2022 -0700 Merge tag 'afs-fixes-20220802' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull AFS fixes from David Howells: "Fix AFS refcount handling. The first patch converts afs to use refcount_t for its refcounts and the second patch fixes afs_put_call() and afs_put_server() to save the values they're going to log in the tracepoint before decrementing the refcount" * tag 'afs-fixes-20220802' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Fix access after dec in put functions afs: Use refcount_t rather than atomic_t commit 426b4ca2d6a5ab51f6b6175d06e4f8ddea434cdf Merge: b8dcef877ab5 5fadbd992996 Author: Linus Torvalds Date: Tue Aug 9 09:52:28 2022 -0700 Merge tag 'fs.setgid.v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull setgid updates from Christian Brauner: "This contains the work to move setgid stripping out of individual filesystems and into the VFS itself. Creating files that have both the S_IXGRP and S_ISGID bit raised in directories that themselves have the S_ISGID bit set requires additional privileges to avoid security issues. When a filesystem creates a new inode it needs to take care that the caller is either in the group of the newly created inode or they have CAP_FSETID in their current user namespace and are privileged over the parent directory of the new inode. If any of these two conditions is true then the S_ISGID bit can be raised for an S_IXGRP file and if not it needs to be stripped. However, there are several key issues with the current implementation: - S_ISGID stripping logic is entangled with umask stripping. For example, if the umask removes the S_IXGRP bit from the file about to be created then the S_ISGID bit will be kept. The inode_init_owner() helper is responsible for S_ISGID stripping and is called before posix_acl_create(). So we can end up with two different orderings: 1. FS without POSIX ACL support First strip umask then strip S_ISGID in inode_init_owner(). In other words, if a filesystem doesn't support or enable POSIX ACLs then umask stripping is done directly in the vfs before calling into the filesystem: 2. FS with POSIX ACL support First strip S_ISGID in inode_init_owner() then strip umask in posix_acl_create(). In other words, if the filesystem does support POSIX ACLs then unmask stripping may be done in the filesystem itself when calling posix_acl_create(). Note that technically filesystems are free to impose their own ordering between posix_acl_create() and inode_init_owner() meaning that there's additional ordering issues that influence S_ISGID inheritance. (Note that the commit message of commit 1639a49ccdce ("fs: move S_ISGID stripping into the vfs_*() helpers") gets the ordering between inode_init_owner() and posix_acl_create() the wrong way around. I realized this too late.) - Filesystems that don't rely on inode_init_owner() don't get S_ISGID stripping logic. While that may be intentional (e.g. network filesystems might just defer setgid stripping to a server) it is often just a security issue. Note that mandating the use of inode_init_owner() was proposed as an alternative solution but that wouldn't fix the ordering issues and there are examples such as afs where the use of inode_init_owner() isn't possible. In any case, we should also try the cleaner and generalized solution first before resorting to this approach. - We still have S_ISGID inheritance bugs years after the initial round of S_ISGID inheritance fixes: e014f37db1a2 ("xfs: use setattr_copy to set vfs inode attributes") 01ea173e103e ("xfs: fix up non-directory creation in SGID directories") fd84bfdddd16 ("ceph: fix up non-directory creation in SGID directories") All of this led us to conclude that the current state is too messy. While we won't be able to make it completely clean as posix_acl_create() is still a filesystem specific call we can improve the S_SIGD stripping situation quite a bit by hoisting it out of inode_init_owner() and into the respective vfs creation operations. The obvious advantage is that we don't need to rely on individual filesystems getting S_ISGID stripping right and instead can standardize the ordering between S_ISGID and umask stripping directly in the VFS. A few short implementation notes: - The stripping logic needs to happen in vfs_*() helpers for the sake of stacking filesystems such as overlayfs that rely on these helpers taking care of S_ISGID stripping. - Security hooks have never seen the mode as it is ultimately seen by the filesystem because of the ordering issue we mentioned. Nothing is changed for them. We simply continue to strip the umask before passing the mode down to the security hooks. - The following filesystems use inode_init_owner() and thus relied on S_ISGID stripping: spufs, 9p, bfs, btrfs, ext2, ext4, f2fs, hfsplus, hugetlbfs, jfs, minix, nilfs2, ntfs3, ocfs2, omfs, overlayfs, ramfs, reiserfs, sysv, ubifs, udf, ufs, xfs, zonefs, bpf, tmpfs. We've audited all callchains as best as we could. More details can be found in the commit message to 1639a49ccdce ("fs: move S_ISGID stripping into the vfs_*() helpers")" * tag 'fs.setgid.v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: ceph: rely on vfs for setgid stripping fs: move S_ISGID stripping into the vfs_*() helpers fs: Add missing umask strip in vfs_tmpfile fs: add mode_strip_sgid() helper commit b8dcef877ab5f2637fccd3efb6fe169c8211961a Merge: 15886321a426 04d9490986d1 Author: Linus Torvalds Date: Tue Aug 9 09:48:30 2022 -0700 Merge tag 'memblock-v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull memblock updates from Mike Rapoport: - An optimization in memblock_add_range() to reduce array traversals - Improvements to the memblock test suite * tag 'memblock-v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: memblock test: Modify the obsolete description in README memblock tests: fix compilation errors memblock tests: change build options to run-time options memblock tests: remove completed TODO items memblock tests: set memblock_debug to enable memblock_dbg() messages memblock tests: add verbose output to memblock tests memblock tests: Makefile: add arguments to control verbosity memblock: avoid some repeat when add new range commit 2939deac1fa220bc82b89235f146df1d9b52e876 Author: Dmitry Osipenko Date: Thu Jun 30 23:04:04 2022 +0300 drm/gem: Properly annotate WW context on drm_gem_lock_reservations() error Use ww_acquire_fini() in the error code paths. Otherwise lockdep thinks that lock is held when lock's memory is freed after the drm_gem_lock_reservations() error. The ww_acquire_context needs to be annotated as "released", which fixes the noisy "WARNING: held lock freed!" splat of VirtIO-GPU driver with CONFIG_DEBUG_MUTEXES=y and enabled lockdep. Cc: stable@vger.kernel.org Fixes: 7edc3e3b975b5 ("drm: Add helpers for locking an array of BO reservations.") Reviewed-by: Thomas Hellström Reviewed-by: Christian König Signed-off-by: Dmitry Osipenko Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220630200405.1883897-2-dmitry.osipenko@collabora.com drivers/gpu/drm/drm_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 15886321a426c7f4f1a0ff788f5b48e49230c0f3 Merge: 5318b987fe9f 472e68df4a5e Author: Linus Torvalds Date: Tue Aug 9 09:39:25 2022 -0700 Merge tag 'm68knommu-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu fixes from Greg Ungerer: - spelling in comment - compilation when flexcan driver enabled - sparse warning * tag 'm68knommu-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: Fix syntax errors in comments m68k: coldfire: make symbol m523x_clk_lookup static m68k: coldfire/device.c: protect FLEXCAN blocks commit 5318b987fe9f3430adb0f5d81d07052fd996835b Merge: eb555cb5b794 ba6e31af2be9 Author: Linus Torvalds Date: Tue Aug 9 09:29:07 2022 -0700 Merge tag 'x86_bugs_pbrsb' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 eIBRS fixes from Borislav Petkov: "More from the CPU vulnerability nightmares front: Intel eIBRS machines do not sufficiently mitigate against RET mispredictions when doing a VM Exit therefore an additional RSB, one-entry stuffing is needed" * tag 'x86_bugs_pbrsb' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/speculation: Add LFENCE to RSB fill sequence x86/speculation: Add RSB VM Exit protections commit df4aaf015775221dde8a51ee09edb919981f091e Author: Dmitry Osipenko Date: Thu Jun 30 23:00:57 2022 +0300 drm/shmem-helper: Add missing vunmap on error The vmapping of dma-buf may succeed, but DRM SHMEM rejects the IOMEM mapping, and thus, drm_gem_shmem_vmap_locked() should unvmap the IOMEM before erroring out. Cc: stable@vger.kernel.org Fixes: 49a3f51dfeee ("drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends") Signed-off-by: Dmitry Osipenko Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220630200058.1883506-2-dmitry.osipenko@collabora.com drivers/gpu/drm/drm_gem_shmem_helper.c | 1 + 1 file changed, 1 insertion(+) commit a914fc529f59dcd9f59633157cf7ee70822ebcac Author: Dave Jiang Date: Tue Aug 2 14:10:13 2022 -0700 ntb: intel: add GNR support for Intel PCIe gen5 NTB Add Intel Granite Rapids NTB PCI device ID and related enabling. Expectation is same hardware interface as Saphire Rapids Xeon platforms. Signed-off-by: Dave Jiang Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/hw/intel/ntb_hw_gen1.c | 12 ++++++++---- drivers/ntb/hw/intel/ntb_hw_gen4.c | 2 +- drivers/ntb/hw/intel/ntb_hw_intel.h | 7 +++++++ 3 files changed, 16 insertions(+), 5 deletions(-) commit 45e1058b77feade4e36402828bfe3e0d3363177b Author: Dan Carpenter Date: Wed Jul 20 21:28:18 2022 +0300 NTB: ntb_tool: uninitialized heap data in tool_fn_write() The call to: ret = simple_write_to_buffer(buf, size, offp, ubuf, size); will return success if it is able to write even one byte to "buf". The value of "*offp" controls which byte. This could result in reading uninitialized data when we do the sscanf() on the next line. This code is not really desigined to handle partial writes where *offp is non-zero and the "buf" is preserved and re-used between writes. Just ban partial writes and replace the simple_write_to_buffer() with copy_from_user(). Fixes: 578b881ba9c4 ("NTB: Add tool test client") Signed-off-by: Dan Carpenter Signed-off-by: Jon Mason drivers/ntb/test/ntb_tool.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit a44252d5c3bbd76efa7b65819712f0e2b1de54c0 Author: Justin Stitt Date: Mon Jul 11 16:01:48 2022 -0700 ntb: idt: fix clang -Wformat warnings When building with Clang we encounter these warnings: | drivers/ntb/hw/idt/ntb_hw_idt.c:2409:28: error: format specifies type | 'unsigned char' but the argument has type 'int' [-Werror,-Wformat] | "\t%hhu-%hhu.\t", idx + cnt - 1); - | drivers/ntb/hw/idt/ntb_hw_idt.c:2438:29: error: format specifies type | 'unsigned char' but the argument has type 'int' [-Werror,-Wformat] | "\t%hhu-%hhu.\t", idx + cnt - 1); - | drivers/ntb/hw/idt/ntb_hw_idt.c:2484:15: error: format specifies type | 'unsigned char' but the argument has type 'int' [-Werror,-Wformat], src); For the first two warnings the format specifier used is `%hhu` which describes a u8. Both `idx` and `cnt` are u8 as well. However, the expression as a whole is promoted to an int as you cannot get smaller-than-int from addition. Therefore, to fix the warning, use the promoted-to-type's format specifier -- in this case `%d`. example: `` uint8_t a = 4, b = 7; int size = sizeof(a + b - 1); printf("%d\n", size); // output: 4 ``` For the last warning, src is of type `int` while the format specifier describes a u8. The fix here is just to use the proper specifier `%d`. See more: (https://wiki.sei.cmu.edu/confluence/display/c/INT02-C.+Understand+integer+conversion+rules) "Integer types smaller than int are promoted when an operation is performed on them. If all values of the original type can be represented as an int, the value of the smaller type is converted to an int; otherwise, it is converted to an unsigned int." Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Justin Stitt Acked-by: Serge Semin Signed-off-by: Jon Mason drivers/ntb/hw/idt/ntb_hw_idt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 30267718fe2d4dbea49015b022f6f1fe16ca31ab Author: Bedant Patnaik Date: Tue Aug 9 19:54:55 2022 +0530 ALSA: hda/realtek: Add a quirk for HP OMEN 15 (8786) mute LED Board ID 8786 seems to be another variant of the Omen 15 that needs ALC285_FIXUP_HP_MUTE_LED for working mute LED. Signed-off-by: Bedant Patnaik Cc: Link: https://lore.kernel.org/r/20220809142455.6473-1-bedant.patnaik@gmail.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 1a1e3aca9d4957e282945cdc2b58e7c560b8e0d2 Author: Jeff Layton Date: Fri Aug 5 06:43:48 2022 -0400 fscache: add tracepoint when failing cookie Signed-off-by: Jeff Layton Signed-off-by: David Howells fs/fscache/cookie.c | 2 ++ include/trace/events/fscache.h | 2 ++ 2 files changed, 4 insertions(+) commit fb24771faf72a2fd62b3b6287af3c610c3ec9cf1 Author: Jeff Layton Date: Fri Aug 5 06:42:45 2022 -0400 fscache: don't leak cookie access refs if invalidation is in progress or failed It's possible for a request to invalidate a fscache_cookie will come in while we're already processing an invalidation. If that happens we currently take an extra access reference that will leak. Only call __fscache_begin_cookie_access if the FSCACHE_COOKIE_DO_INVALIDATE bit was previously clear. Also, ensure that we attempt to clear the bit when the cookie is "FAILED" and put the reference to avoid an access leak. Fixes: 85e4ea1049c7 ("fscache: Fix invalidation/lookup race") Suggested-by: David Howells Signed-off-by: Jeff Layton Signed-off-by: David Howells fs/fscache/cookie.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 6bc2906253e723d1ab1acc652b55b83e286bfec2 Author: Takashi Iwai Date: Tue Aug 9 09:32:59 2022 +0200 ALSA: usb-audio: More comprehensive mixer map for ASUS ROG Zenith II ASUS ROG Zenith II has two USB interfaces, one for the front headphone and another for the rest I/O. Currently we provided the mixer mapping for the latter but with an incomplete form. This patch corrects and provides more comprehensive mixer mapping, as well as providing the proper device names for both the front headphone and main audio. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=211005 Fixes: 2a48218f8e23 ("ALSA: usb-audio: Add mixer workaround for TRX40 and co") Link: https://lore.kernel.org/r/20220809073259.18849-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/card.c | 8 ++++++++ sound/usb/mixer_maps.c | 34 +++++++++++++++++++++++++--------- 2 files changed, 33 insertions(+), 9 deletions(-) commit cf4b7387c0a842d64bdd7c353e6d3298174a7740 Author: Arunpravin Paneer Selvam Date: Tue Aug 9 02:56:23 2022 -0700 drm/ttm: Fix dummy res NULL ptr deref bug Check the bo->resource value before accessing the resource mem_type. v2: Fix commit description unwrapped warning [ 40.191227][ T184] general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] SMP KASAN PTI [ 40.192995][ T184] KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017] [ 40.194411][ T184] CPU: 1 PID: 184 Comm: systemd-udevd Not tainted 5.19.0-rc4-00721-gb297c22b7070 #1 [ 40.196063][ T184] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014 [ 40.199605][ T184] RIP: 0010:ttm_bo_validate+0x1b3/0x240 [ttm] [ 40.200754][ T184] Code: e8 72 c5 ff ff 83 f8 b8 74 d4 85 c0 75 54 49 8b 9e 58 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d 7b 10 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 04 3c 03 7e 44 8b 53 10 31 c0 85 d2 0f 85 58 [ 40.203685][ T184] RSP: 0018:ffffc900006df0c8 EFLAGS: 00010202 [ 40.204630][ T184] RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffff1102f4bb71b [ 40.205864][ T184] RDX: 0000000000000002 RSI: ffffc900006df208 RDI: 0000000000000010 [ 40.207102][ T184] RBP: 1ffff920000dbe1a R08: ffffc900006df208 R09: 0000000000000000 [ 40.208394][ T184] R10: ffff88817a5f0000 R11: 0000000000000001 R12: ffffc900006df110 [ 40.209692][ T184] R13: ffffc900006df0f0 R14: ffff88817a5db800 R15: ffffc900006df208 [ 40.210862][ T184] FS: 00007f6b1d16e8c0(0000) GS:ffff88839d700000(0000) knlGS:0000000000000000 [ 40.212250][ T184] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 40.213275][ T184] CR2: 000055a1001d4ff0 CR3: 00000001700f4000 CR4: 00000000000006e0 [ 40.214469][ T184] Call Trace: [ 40.214974][ T184] [ 40.215438][ T184] ? ttm_bo_bounce_temp_buffer+0x140/0x140 [ttm] [ 40.216572][ T184] ? mutex_spin_on_owner+0x240/0x240 [ 40.217456][ T184] ? drm_vma_offset_add+0xaa/0x100 [drm] [ 40.218457][ T184] ttm_bo_init_reserved+0x3d6/0x540 [ttm] [ 40.219410][ T184] ? shmem_get_inode+0x744/0x980 [ 40.220231][ T184] ttm_bo_init_validate+0xb1/0x200 [ttm] [ 40.221172][ T184] ? bo_driver_evict_flags+0x340/0x340 [drm_vram_helper] [ 40.222530][ T184] ? ttm_bo_init_reserved+0x540/0x540 [ttm] [ 40.223643][ T184] ? __do_sys_finit_module+0x11a/0x1c0 [ 40.224654][ T184] ? __shmem_file_setup+0x102/0x280 [ 40.234764][ T184] drm_gem_vram_create+0x305/0x480 [drm_vram_helper] [ 40.235766][ T184] ? bo_driver_evict_flags+0x340/0x340 [drm_vram_helper] [ 40.236846][ T184] ? __kasan_slab_free+0x108/0x180 [ 40.237650][ T184] drm_gem_vram_fill_create_dumb+0x134/0x340 [drm_vram_helper] [ 40.238864][ T184] ? local_pci_probe+0xdf/0x180 [ 40.239674][ T184] ? drmm_vram_helper_init+0x400/0x400 [drm_vram_helper] [ 40.240826][ T184] drm_client_framebuffer_create+0x19c/0x400 [drm] [ 40.241955][ T184] ? drm_client_buffer_delete+0x200/0x200 [drm] [ 40.243001][ T184] ? drm_client_pick_crtcs+0x554/0xb80 [drm] [ 40.244030][ T184] drm_fb_helper_generic_probe+0x23f/0x940 [drm_kms_helper] [ 40.245226][ T184] ? __cond_resched+0x1c/0xc0 [ 40.245987][ T184] ? drm_fb_helper_memory_range_to_clip+0x180/0x180 [drm_kms_helper] [ 40.247316][ T184] ? mutex_unlock+0x80/0x100 [ 40.248005][ T184] ? __mutex_unlock_slowpath+0x2c0/0x2c0 [ 40.249083][ T184] drm_fb_helper_single_fb_probe+0x907/0xf00 [drm_kms_helper] [ 40.250314][ T184] ? drm_fb_helper_check_var+0x1180/0x1180 [drm_kms_helper] [ 40.251540][ T184] ? __cond_resched+0x1c/0xc0 [ 40.252321][ T184] ? mutex_lock+0x9f/0x100 [ 40.253062][ T184] __drm_fb_helper_initial_config_and_unlock+0xb9/0x2c0 [drm_kms_helper] [ 40.254394][ T184] drm_fbdev_client_hotplug+0x56f/0x840 [drm_kms_helper] [ 40.255477][ T184] drm_fbdev_generic_setup+0x165/0x3c0 [drm_kms_helper] [ 40.256607][ T184] bochs_pci_probe+0x6b7/0x900 [bochs] [ 40.257515][ T184] ? _raw_spin_lock_irqsave+0x87/0x100 [ 40.258312][ T184] ? bochs_hw_init+0x480/0x480 [bochs] [ 40.259244][ T184] ? bochs_hw_init+0x480/0x480 [bochs] [ 40.260186][ T184] local_pci_probe+0xdf/0x180 [ 40.260928][ T184] pci_call_probe+0x15f/0x500 [ 40.265798][ T184] ? _raw_spin_lock+0x81/0x100 [ 40.266508][ T184] ? pci_pm_suspend_noirq+0x980/0x980 [ 40.267322][ T184] ? pci_assign_irq+0x81/0x280 [ 40.268096][ T184] ? pci_match_device+0x351/0x6c0 [ 40.268883][ T184] ? kernfs_put+0x18/0x40 [ 40.269611][ T184] pci_device_probe+0xee/0x240 [ 40.270352][ T184] really_probe+0x435/0xa80 [ 40.271021][ T184] __driver_probe_device+0x2ab/0x480 [ 40.271828][ T184] driver_probe_device+0x49/0x140 [ 40.272627][ T184] __driver_attach+0x1bd/0x4c0 [ 40.273372][ T184] ? __device_attach_driver+0x240/0x240 [ 40.274273][ T184] bus_for_each_dev+0x11e/0x1c0 [ 40.275080][ T184] ? subsys_dev_iter_exit+0x40/0x40 [ 40.275951][ T184] ? klist_add_tail+0x132/0x280 [ 40.276767][ T184] bus_add_driver+0x39b/0x580 [ 40.277574][ T184] driver_register+0x20f/0x3c0 [ 40.278281][ T184] ? 0xffffffffc04a2000 [ 40.278894][ T184] do_one_initcall+0x8a/0x300 [ 40.279642][ T184] ? trace_event_raw_event_initcall_level+0x1c0/0x1c0 [ 40.280707][ T184] ? kasan_unpoison+0x23/0x80 [ 40.281479][ T184] ? kasan_unpoison+0x23/0x80 [ 40.282197][ T184] do_init_module+0x190/0x640 [ 40.282926][ T184] load_module+0x221b/0x2780 [ 40.283611][ T184] ? layout_and_allocate+0x5c0/0x5c0 [ 40.284401][ T184] ? kernel_read_file+0x286/0x6c0 [ 40.285216][ T184] ? __x64_sys_fspick+0x2c0/0x2c0 [ 40.286043][ T184] ? mmap_region+0x4e7/0x1300 [ 40.286832][ T184] ? __do_sys_finit_module+0x11a/0x1c0 [ 40.287743][ T184] __do_sys_finit_module+0x11a/0x1c0 [ 40.288636][ T184] ? __ia32_sys_init_module+0xc0/0xc0 [ 40.289557][ T184] ? __seccomp_filter+0x15e/0xc80 [ 40.290341][ T184] ? vm_mmap_pgoff+0x185/0x240 [ 40.291060][ T184] do_syscall_64+0x3b/0xc0 [ 40.291763][ T184] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 40.292678][ T184] RIP: 0033:0x7f6b1d6279b9 [ 40.293438][ T184] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a7 54 0c 00 f7 d8 64 89 01 48 [ 40.296302][ T184] RSP: 002b:00007ffe7f51b798 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 40.297633][ T184] RAX: ffffffffffffffda RBX: 00005642dcca2880 RCX: 00007f6b1d6279b9 [ 40.298890][ T184] RDX: 0000000000000000 RSI: 00007f6b1d7b2e2d RDI: 0000000000000016 [ 40.300199][ T184] RBP: 0000000000020000 R08: 0000000000000000 R09: 00005642dccd5530 [ 40.301547][ T184] R10: 0000000000000016 R11: 0000000000000246 R12: 00007f6b1d7b2e2d [ 40.302698][ T184] R13: 0000000000000000 R14: 00005642dcca4230 R15: 00005642dcca2880 Signed-off-by: Arunpravin Paneer Selvam Reported-by: kernel test robot Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20220726162205.2778-1-Arunpravin.PaneerSelvam@amd.com Link: https://patchwork.freedesktop.org/patch/msgid/20220809095623.3569-1-Arunpravin.PaneerSelvam@amd.com Signed-off-by: Christian König CC: stable@vger.kernel.org drivers/gpu/drm/ttm/ttm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f71c70df416f4d49a9cf11d6132f6aaba0e2f65c Author: Christian Colglazier Date: Tue Aug 9 14:02:41 2022 +0930 ALSA: scarlett2: Add Focusrite Clarett+ 8Pre support The Focusrite Clarett+ 8Pre uses the same protocol as the Scarlett Gen 2 and Gen 3 product range. This patch adds support for the Clarett+ 8Pre by adding appropriate entries to the scarlett2 driver. The Clarett+ 2Pre and 4Pre, and the Clarett USB product line presumably use the same protocol as well, so support for them can easily be added if someone can test. Signed-off-by: Christian Colglazier Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20220809043241.GA2749152@m.b4.vu Signed-off-by: Takashi Iwai sound/usb/mixer_quirks.c | 1 + sound/usb/mixer_scarlett_gen2.c | 91 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 90 insertions(+), 2 deletions(-) commit a4cb6e62ea4d36e53fb3c0f18ea4503d7b76674f Author: Marc Kleine-Budde Date: Mon Aug 1 22:47:16 2022 +0200 can: ems_usb: fix clang's -Wunaligned-access warning clang emits a -Wunaligned-access warning on struct __packed ems_cpc_msg. The reason is that the anonymous union msg (not declared as packed) is being packed right after some non naturally aligned variables (3*8 bits + 2*32) inside a packed struct: | struct __packed ems_cpc_msg { | u8 type; /* type of message */ | u8 length; /* length of data within union 'msg' */ | u8 msgid; /* confirmation handle */ | __le32 ts_sec; /* timestamp in seconds */ | __le32 ts_nsec; /* timestamp in nano seconds */ | /* ^ not naturally aligned */ | | union { | /* ^ not declared as packed */ | u8 generic[64]; | struct cpc_can_msg can_msg; | struct cpc_can_params can_params; | struct cpc_confirm confirmation; | struct cpc_overrun overrun; | struct cpc_can_error error; | struct cpc_can_err_counter err_counter; | u8 can_state; | } msg; | }; Starting from LLVM 14, having an unpacked struct nested in a packed struct triggers a warning. c.f. [1]. Fix the warning by marking the anonymous union as packed. [1] https://github.com/llvm/llvm-project/issues/55520 Fixes: 702171adeed3 ("ems_usb: Added support for EMS CPC-USB/ARM7 CAN/USB interface") Link: https://lore.kernel.org/all/20220802094021.959858-1-mkl@pengutronix.de Cc: Gerhard Uttenthaler Cc: Sebastian Haas Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/ems_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c21c54a53ab21842f5050fa090f26b03c0313d6 Author: Fedor Pchelkin Date: Fri Aug 5 18:02:16 2022 +0300 can: j1939: j1939_session_destroy(): fix memory leak of skbs We need to drop skb references taken in j1939_session_skb_queue() when destroying a session in j1939_session_destroy(). Otherwise those skbs would be lost. Link to Syzkaller info and repro: https://forge.ispras.ru/issues/11743. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. V1: https://lore.kernel.org/all/20220708175949.539064-1-pchelkin@ispras.ru Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Suggested-by: Oleksij Rempel Signed-off-by: Fedor Pchelkin Signed-off-by: Alexey Khoroshilov Acked-by: Oleksij Rempel Link: https://lore.kernel.org/all/20220805150216.66313-1-pchelkin@ispras.ru Signed-off-by: Marc Kleine-Budde net/can/j1939/transport.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 8ef49f7f8244424adcf4a546dba4cbbeb0b09c09 Author: Fedor Pchelkin Date: Fri Jul 29 17:36:55 2022 +0300 can: j1939: j1939_sk_queue_activate_next_locked(): replace WARN_ON_ONCE with netdev_warn_once() We should warn user-space that it is doing something wrong when trying to activate sessions with identical parameters but WARN_ON_ONCE macro can not be used here as it serves a different purpose. So it would be good to replace it with netdev_warn_once() message. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Signed-off-by: Fedor Pchelkin Signed-off-by: Alexey Khoroshilov Acked-by: Oleksij Rempel Link: https://lore.kernel.org/all/20220729143655.1108297-1-pchelkin@ispras.ru [mkl: fix indention] Signed-off-by: Marc Kleine-Budde net/can/j1939/socket.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7e4fd7a1a6fdf23d069eeb0ae0e8e46b9fb40723 Author: Marc Zyngier Date: Mon Aug 8 11:50:20 2022 +0100 irqchip/loongarch: Fix irq_domain_alloc_fwnode() abuse The recently merged LoongArch drivers paper over the lack of topology information by creating a bunch of fwnodes for the irqchips. So far, so good. However, irq_domain_alloc_fwnode() is supposed to take a PA, and not a kernel VA blindly cast as a PA, potentially disclosing kernel VAs to userspace. In some other cases, even NULL is used as the PA, which is entertaining. Fix this by using the actual PA of the block when available, and switch to a named fwnode in the other cases. Signed-off-by: Marc Zyngier Reviewed-by: Jianmin Lv Link: https://lore.kernel.org/r/20220808105020.2689757-1-maz@kernel.org drivers/irqchip/irq-loongarch-cpu.c | 2 +- drivers/irqchip/irq-loongson-eiointc.c | 3 ++- drivers/irqchip/irq-loongson-liointc.c | 2 +- drivers/irqchip/irq-loongson-pch-msi.c | 2 +- drivers/irqchip/irq-loongson-pch-pic.c | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) commit b8c3bf0ed2edf2deaedba5f0bf0bb54c76dee71d Merge: 7a07a29e4f67 1d1ab5d39be7 Author: Jakub Kicinski Date: Mon Aug 8 20:59:07 2022 -0700 Merge tag 'for-net-2022-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - Fixes various issues related to ISO channel/socket support - Fixes issues when building with C=1 - Fix cancel uninitilized work which blocks syzbot to run * tag 'for-net-2022-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: ISO: Fix not using the correct QoS Bluetooth: don't try to cancel uninitialized works at mgmt_index_removed() Bluetooth: ISO: Fix iso_sock_getsockopt for BT_DEFER_SETUP Bluetooth: MGMT: Fixes build warnings with C=1 Bluetooth: hci_event: Fix build warning with C=1 Bluetooth: ISO: Fix memory corruption Bluetooth: Fix null pointer deref on unexpected status event Bluetooth: ISO: Fix info leak in iso_sock_getsockopt() Bluetooth: hci_conn: Fix updating ISO QoS PHY Bluetooth: ISO: unlock on error path in iso_sock_setsockopt() Bluetooth: L2CAP: Fix l2cap_global_chan_by_psm regression ==================== Link: https://lore.kernel.org/r/20220809001224.412807-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 7a07a29e4f6713b224f3bcde5f835e777301bdb8 Author: Alexandra Winter Date: Fri Aug 5 17:57:14 2022 +0200 s390/qeth: cache link_info for ethtool Since commit e6e771b3d897 ("s390/qeth: detach netdevice while card is offline") there was a timing window during recovery, that qeth_query_card_info could be sent to the card, even before it was ready for it, leading to a failing card recovery. There is evidence that this window was hit, as not all callers of get_link_ksettings() check for netif_device_present. Use cached values in qeth_get_link_ksettings(), instead of calling qeth_query_card_info() and falling back to default values in case it fails. Link info is already updated when the card goes online, e.g. after STARTLAN (physical link up). Set the link info to default values, when the card goes offline or at STOPLAN (physical link down). A follow-on patch will improve values reported for link down. Fixes: e6e771b3d897 ("s390/qeth: detach netdevice while card is offline") Signed-off-by: Alexandra Winter Reviewed-by: Thorsten Winkler Link: https://lore.kernel.org/r/20220805155714.59609-1-wintera@linux.ibm.com Signed-off-by: Jakub Kicinski drivers/s390/net/qeth_core_main.c | 168 +++++++++++--------------------------- drivers/s390/net/qeth_ethtool.c | 12 +-- 2 files changed, 48 insertions(+), 132 deletions(-) commit 546b9d3f406a14cfbb12bfbf9fe1b302f1d860b5 Author: Nikita Shubin Date: Fri Aug 5 11:48:43 2022 +0300 net: phy: dp83867: fix get nvmem cell fail If CONFIG_NVMEM is not set of_nvmem_cell_get, of_nvmem_device_get functions will return ERR_PTR(-EOPNOTSUPP) and "failed to get nvmem cell io_impedance_ctrl" error would be reported despite "io_impedance_ctrl" is completely missing in Device Tree and we should use default values. Check -EOPNOTSUPP togather with -ENOENT to avoid this situation. Fixes: 5c2d0a6a0701 ("net: phy: dp83867: implement support for io_impedance_ctrl nvmem cell") Signed-off-by: Nikita Shubin Acked-by: Rasmus Villemoes Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20220805084843.24542-1-nikita.shubin@maquefel.me Signed-off-by: Jakub Kicinski drivers/net/phy/dp83867.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3702e4041cfda50bc697363d29511ce8f6b24795 Author: Oleksij Rempel Date: Fri Aug 5 09:31:59 2022 +0200 net: phy: c45 baset1: do not skip aneg configuration if clock role is not specified In case master/slave clock role is not specified (which is default), the aneg registers will not be written. The visible impact of this is missing pause advertisement. So, rework genphy_c45_baset1_an_config_aneg() to be able to write advertisement registers even if clock role is unknown. Fixes: 3da8ffd8545f ("net: phy: Add 10BASE-T1L support in phy-c45") Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20220805073159.908643-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski drivers/net/phy/phy-c45.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit 3f4093e2bf4673f218c0bf17d8362337c400e77b Author: Duoming Zhou Date: Fri Aug 5 15:00:08 2022 +0800 atm: idt77252: fix use-after-free bugs caused by tst_timer There are use-after-free bugs caused by tst_timer. The root cause is that there are no functions to stop tst_timer in idt77252_exit(). One of the possible race conditions is shown below: (thread 1) | (thread 2) | idt77252_init_one | init_card | fill_tst | mod_timer(&card->tst_timer, ...) idt77252_exit | (wait a time) | tst_timer | | ... kfree(card) // FREE | | card->soft_tst[e] // USE The idt77252_dev is deallocated in idt77252_exit() and used in timer handler. This patch adds del_timer_sync() in idt77252_exit() in order that the timer handler could be stopped before the idt77252_dev is deallocated. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Duoming Zhou Link: https://lore.kernel.org/r/20220805070008.18007-1-duoming@zju.edu.cn Signed-off-by: Jakub Kicinski drivers/atm/idt77252.c | 1 + 1 file changed, 1 insertion(+) commit 7e4babffa6f340a74c820d44d44d16511e666424 Author: Vladimir Oltean Date: Thu Aug 4 23:28:17 2022 +0300 net: dsa: felix: fix min gate len calculation for tc when its first gate is closed min_gate_len[tc] is supposed to track the shortest interval of continuously open gates for a traffic class. For example, in the following case: TC 76543210 t0 00000001b 200000 ns t1 00000010b 200000 ns min_gate_len[0] and min_gate_len[1] should be 200000, while min_gate_len[2-7] should be 0. However what happens is that min_gate_len[0] is 200000, but min_gate_len[1] ends up being 0 (despite gate_len[1] being 200000 at the point where the logic detects the gate close event for TC 1). The problem is that the code considers a "gate close" event whenever it sees that there is a 0 for that TC (essentially it's level rather than edge triggered). By doing that, any time a gate is seen as closed without having been open prior, gate_len, which is 0, will be written into min_gate_len. Once min_gate_len becomes 0, it's impossible for it to track anything higher than that (the length of actually open intervals). To fix this, we make the writing to min_gate_len[tc] be edge-triggered, which avoids writes for gates that are closed in consecutive intervals. However what this does is it makes us need to special-case the permanently closed gates at the end. Fixes: 55a515b1f5a9 ("net: dsa: felix: drop oversized frames with tc-taprio instead of hanging the port") Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220804202817.1677572-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski drivers/net/dsa/ocelot/felix_vsc9959.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 944e594cfa84ec552831489c244e02589d826b11 Author: Martin Schiller Date: Fri Aug 5 08:18:10 2022 +0200 net/x25: fix call timeouts in blocking connects When a userspace application starts a blocking connect(), a CALL REQUEST is sent, the t21 timer is started and the connect is waiting in x25_wait_for_connection_establishment(). If then for some reason the t21 timer expires before any reaction on the assigned logical channel (e.g. CALL ACCEPT, CLEAR REQUEST), there is sent a CLEAR REQUEST and timer t23 is started waiting for a CLEAR confirmation. If we now receive a CLEAR CONFIRMATION from the peer, x25_disconnect() is called in x25_state2_machine() with reason "0", which means "normal" call clearing. This is ok, but the parameter "reason" is used as sk->sk_err in x25_disconnect() and sock_error(sk) is evaluated in x25_wait_for_connection_establishment() to check if the call is still pending. As "0" is not rated as an error, the connect will stuck here forever. To fix this situation, also check if the sk->sk_state changed form TCP_SYN_SENT to TCP_CLOSE in the meantime, which is also done by x25_disconnect(). Signed-off-by: Martin Schiller Link: https://lore.kernel.org/r/20220805061810.10824-1-ms@dev.tdt.de Signed-off-by: Jakub Kicinski net/x25/af_x25.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8eb6fcc9a7cb4337ba985a397d892af5c0ddb0e7 Merge: f574f7f839fc b3bb8628bf64 Author: Jakub Kicinski Date: Mon Aug 8 20:44:42 2022 -0700 Merge branch 'tsnep-two-fixes-for-the-driver' Gerhard Engleder says: ==================== tsnep: Two fixes for the driver Two simple bugfixes for tsnep driver. ==================== Link: https://lore.kernel.org/r/20220804183935.73763-1-gerhard@engleder-embedded.com Signed-off-by: Jakub Kicinski commit b3bb8628bf64440065976c71e4ab09186c393597 Author: Gerhard Engleder Date: Thu Aug 4 20:39:35 2022 +0200 tsnep: Fix tsnep_tx_unmap() error path usage If tsnep_tx_map() fails, then tsnep_tx_unmap() shall start at the write index like tsnep_tx_map(). This is different to the normal operation. Thus, add an additional parameter to tsnep_tx_unmap() to enable start at different positions for successful TX and failed TX. Fixes: 403f69bbdbad ("tsnep: Add TSN endpoint Ethernet MAC driver") Signed-off-by: Gerhard Engleder Signed-off-by: Jakub Kicinski drivers/net/ethernet/engleder/tsnep_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 73afd7816c551c8da1c8f41462110a46a317eefb Author: Gerhard Engleder Date: Thu Aug 4 20:39:34 2022 +0200 tsnep: Fix unused warning for 'tsnep_of_match' Kernel test robot found the following warning: drivers/net/ethernet/engleder/tsnep_main.c:1254:34: warning: 'tsnep_of_match' defined but not used [-Wunused-const-variable=] of_match_ptr() compiles into NULL if CONFIG_OF is disabled. tsnep_of_match exists always so use of of_match_ptr() is useless. Fix warning by dropping of_match_ptr(). Reported-by: kernel test robot Signed-off-by: Gerhard Engleder Signed-off-by: Jakub Kicinski drivers/net/ethernet/engleder/tsnep_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb555cb5b794f4e12a9897f3d46d5a72104cd4a7 Merge: f30adc0d332f 8f0541186e9a Author: Linus Torvalds Date: Mon Aug 8 20:15:13 2022 -0700 Merge tag '5.20-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd Pull ksmbd updates from Steve French: - fixes for memory access bugs (out of bounds access, oops, leak) - multichannel fixes - session disconnect performance improvement, and session register improvement - cleanup * tag '5.20-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd: ksmbd: fix heap-based overflow in set_ntacl_dacl() ksmbd: prevent out of bound read for SMB2_TREE_CONNNECT ksmbd: prevent out of bound read for SMB2_WRITE ksmbd: fix use-after-free bug in smb2_tree_disconect ksmbd: fix memory leak in smb2_handle_negotiate ksmbd: fix racy issue while destroying session on multichannel ksmbd: use wait_event instead of schedule_timeout() ksmbd: fix kernel oops from idr_remove() ksmbd: add channel rwlock ksmbd: replace sessions list in connection with xarray MAINTAINERS: ksmbd: add entry for documentation ksmbd: remove unused ksmbd_share_configs_cleanup function commit f30adc0d332fdfe5315cb98bd6a7ff0d5cf2aa38 Merge: 5d5d353bed32 c03f05f183cd Author: Linus Torvalds Date: Mon Aug 8 20:04:35 2022 -0700 Merge tag 'pull-work.iov_iter-rebased' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull more iov_iter updates from Al Viro: - more new_sync_{read,write}() speedups - ITER_UBUF introduction - ITER_PIPE cleanups - unification of iov_iter_get_pages/iov_iter_get_pages_alloc and switching them to advancing semantics - making ITER_PIPE take high-order pages without splitting them - handling copy_page_from_iter() for high-order pages properly * tag 'pull-work.iov_iter-rebased' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (32 commits) fix copy_page_from_iter() for compound destinations hugetlbfs: copy_page_to_iter() can deal with compound pages copy_page_to_iter(): don't split high-order page in case of ITER_PIPE expand those iov_iter_advance()... pipe_get_pages(): switch to append_pipe() get rid of non-advancing variants ceph: switch the last caller of iov_iter_get_pages_alloc() 9p: convert to advancing variant of iov_iter_get_pages_alloc() af_alg_make_sg(): switch to advancing variant of iov_iter_get_pages() iter_to_pipe(): switch to advancing variant of iov_iter_get_pages() block: convert to advancing variants of iov_iter_get_pages{,_alloc}() iov_iter: advancing variants of iov_iter_get_pages{,_alloc}() iov_iter: saner helper for page array allocation fold __pipe_get_pages() into pipe_get_pages() ITER_XARRAY: don't open-code DIV_ROUND_UP() unify the rest of iov_iter_get_pages()/iov_iter_get_pages_alloc() guts unify xarray_get_pages() and xarray_get_pages_alloc() unify pipe_get_pages() and pipe_get_pages_alloc() iov_iter_get_pages(): sanity-check arguments iov_iter_get_pages_alloc(): lift freeing pages array on failure exits into wrapper ... commit c03f05f183cd15f4259684ab658fbc3d23797d99 Author: Al Viro Date: Fri Jul 29 12:54:53 2022 -0400 fix copy_page_from_iter() for compound destinations had been broken for ITER_BVEC et.al. since ever (OK, v3.17 when ITER_BVEC had first appeared)... Signed-off-by: Al Viro lib/iov_iter.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit c7d57ab1632d29e256e3ae68f925751142330d88 Author: Al Viro Date: Thu Jun 23 17:24:09 2022 -0400 hugetlbfs: copy_page_to_iter() can deal with compound pages ... since April 2021 Signed-off-by: Al Viro fs/hugetlbfs/inode.c | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) commit f0f6b614f83dbae99d283b7b12ab5dd2e04df979 Author: Al Viro Date: Thu Jun 23 17:21:37 2022 -0400 copy_page_to_iter(): don't split high-order page in case of ITER_PIPE ... just shove it into one pipe_buffer. Signed-off-by: Al Viro lib/iov_iter.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit 310d9d5a5009a93377200b98daa2d84aa2bd8160 Author: Al Viro Date: Sat Jun 11 04:04:33 2022 -0400 expand those iov_iter_advance()... Signed-off-by: Al Viro lib/iov_iter.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 746de1f86fcd33464acac047f111eea877f2f7a0 Author: Al Viro Date: Tue Jun 14 16:38:53 2022 -0400 pipe_get_pages(): switch to append_pipe() now that we are advancing the iterator, there's no need to treat the first page separately - just call append_pipe() in a loop. Signed-off-by: Al Viro lib/iov_iter.c | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) commit eba2d3d798295dc43cae8fade102f9d083a2a741 Author: Al Viro Date: Fri Jun 10 13:05:12 2022 -0400 get rid of non-advancing variants mechanical change; will be further massaged in subsequent commits Reviewed-by: Jeff Layton Signed-off-by: Al Viro include/linux/uio.h | 24 ++---------------------- lib/iov_iter.c | 27 ++++++++++++++++++--------- 2 files changed, 20 insertions(+), 31 deletions(-) commit b53589927d73e28c62d3cd92ed4e1a0ea3c830ca Author: Al Viro Date: Fri Jun 10 11:43:27 2022 -0400 ceph: switch the last caller of iov_iter_get_pages_alloc() here nothing even looks at the iov_iter after the call, so we couldn't care less whether it advances or not. Reviewed-by: Jeff Layton Signed-off-by: Al Viro fs/ceph/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f02464739da05a51cadb997a00a301f734e9c87 Author: Al Viro Date: Fri Jun 10 11:42:02 2022 -0400 9p: convert to advancing variant of iov_iter_get_pages_alloc() that one is somewhat clumsier than usual and needs serious testing. Signed-off-by: Al Viro net/9p/client.c | 39 +++++++++++++++++++++++---------------- net/9p/protocol.c | 3 +-- net/9p/trans_virtio.c | 3 ++- 3 files changed, 26 insertions(+), 19 deletions(-) commit dc5801f60b269a73fcce789856c99d1845f75827 Author: Al Viro Date: Thu Jun 9 11:14:04 2022 -0400 af_alg_make_sg(): switch to advancing variant of iov_iter_get_pages() ... and adjust the callers Reviewed-by: Jeff Layton Signed-off-by: Al Viro crypto/af_alg.c | 3 +-- crypto/algif_hash.c | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 7d690c157c58d22de9ad71ef5c4e1f43cd8ad0e7 Author: Al Viro Date: Thu Jun 9 11:07:52 2022 -0400 iter_to_pipe(): switch to advancing variant of iov_iter_get_pages() ... and untangle the cleanup on failure to add into pipe. Reviewed-by: Jeff Layton Signed-off-by: Al Viro fs/splice.c | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) commit 480cb846c27bda4e14d98a45a9f50c250f38f266 Author: Al Viro Date: Thu Jun 9 10:37:57 2022 -0400 block: convert to advancing variants of iov_iter_get_pages{,_alloc}() ... doing revert if we end up not using some pages Signed-off-by: Al Viro block/bio.c | 25 ++++++++++++++----------- block/blk-map.c | 7 ++++--- 2 files changed, 18 insertions(+), 14 deletions(-) commit 1ef255e257173f4bc44317ef2076e7e0de688fdf Author: Al Viro Date: Thu Jun 9 10:28:36 2022 -0400 iov_iter: advancing variants of iov_iter_get_pages{,_alloc}() Most of the users immediately follow successful iov_iter_get_pages() with advancing by the amount it had returned. Provide inline wrappers doing that, convert trivial open-coded uses of those. BTW, iov_iter_get_pages() never returns more than it had been asked to; such checks in cifs ought to be removed someday... Reviewed-by: Jeff Layton Signed-off-by: Al Viro drivers/vhost/scsi.c | 4 +--- fs/ceph/file.c | 3 +-- fs/cifs/file.c | 6 ++---- fs/cifs/misc.c | 3 +-- fs/direct-io.c | 3 +-- fs/fuse/dev.c | 3 +-- fs/fuse/file.c | 3 +-- fs/nfs/direct.c | 6 ++---- include/linux/uio.h | 20 ++++++++++++++++++++ net/core/datagram.c | 3 +-- net/core/skmsg.c | 3 +-- net/rds/message.c | 3 +-- net/tls/tls_sw.c | 4 +--- 13 files changed, 34 insertions(+), 30 deletions(-) commit 3cf42da327f26eb4461864dd64812345b37f4fd9 Author: Al Viro Date: Fri Jun 17 14:45:41 2022 -0400 iov_iter: saner helper for page array allocation All call sites of get_pages_array() are essenitally identical now. Replace with common helper... Returns number of slots available in resulting array or 0 on OOM; it's up to the caller to make sure it doesn't ask to zero-entry array (i.e. neither maxpages nor size are allowed to be zero). Reviewed-by: Jeff Layton Signed-off-by: Al Viro lib/iov_iter.c | 77 ++++++++++++++++++++++++---------------------------------- 1 file changed, 32 insertions(+), 45 deletions(-) commit 8520008417c581c4c22e39597f92b9814ae34c31 Author: Al Viro Date: Fri Jun 17 14:30:39 2022 -0400 fold __pipe_get_pages() into pipe_get_pages() ... and don't mangle maxsize there - turn the loop into counting one instead. Easier to see that we won't run out of array that way. Note that special treatment of the partial buffer in that thing is an artifact of the non-advancing semantics of iov_iter_get_pages() - if not for that, it would be append_pipe(), same as the body of the loop that follows it. IOW, once we make iov_iter_get_pages() advancing, the whole thing will turn into calculate how many pages do we want allocate an array (if needed) call append_pipe() that many times. Reviewed-by: Jeff Layton Signed-off-by: Al Viro lib/iov_iter.c | 75 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 38 insertions(+), 37 deletions(-) commit 0aa4fc32f54028f6fbb35bf71df4b0d86ff1662b Author: Al Viro Date: Fri Jun 10 20:30:35 2022 -0400 ITER_XARRAY: don't open-code DIV_ROUND_UP() Reviewed-by: Jeff Layton Signed-off-by: Al Viro lib/iov_iter.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 451c0ba9475ebdce36249c5c769efa5d580d1d83 Author: Al Viro Date: Fri Jun 17 13:54:15 2022 -0400 unify the rest of iov_iter_get_pages()/iov_iter_get_pages_alloc() guts same as for pipes and xarrays; after that iov_iter_get_pages() becomes a wrapper for __iov_iter_get_pages_alloc(). Signed-off-by: Al Viro lib/iov_iter.c | 86 ++++++++++++++++++---------------------------------------- 1 file changed, 27 insertions(+), 59 deletions(-) commit 68fe506f3731ecf7881de9512cc5f4c14fd13f3a Author: Al Viro Date: Fri Jun 17 13:48:03 2022 -0400 unify xarray_get_pages() and xarray_get_pages_alloc() same as for pipes Reviewed-by: Jeff Layton Signed-off-by: Al Viro lib/iov_iter.c | 49 ++++++++++--------------------------------------- 1 file changed, 10 insertions(+), 39 deletions(-) commit acbdeb8320b0a470bef1b6c0105d8c2bbc4c4ba0 Author: Al Viro Date: Fri Jun 17 13:35:35 2022 -0400 unify pipe_get_pages() and pipe_get_pages_alloc() The differences between those two are * pipe_get_pages() gets a non-NULL struct page ** value pointing to preallocated array + array size. * pipe_get_pages_alloc() gets an address of struct page ** variable that contains NULL, allocates the array and (on success) stores its address in that variable. Not hard to combine - always pass struct page ***, have the previous pipe_get_pages_alloc() caller pass ~0U as cap for array size. Reviewed-by: Jeff Layton Signed-off-by: Al Viro lib/iov_iter.c | 49 +++++++++++++++++-------------------------------- 1 file changed, 17 insertions(+), 32 deletions(-) commit c81ce28df500b04444ef97dc82a7b0299ce717e8 Author: Al Viro Date: Fri Jun 17 15:15:14 2022 -0400 iov_iter_get_pages(): sanity-check arguments zero maxpages is bogus, but best treated as "just return 0"; NULL pages, OTOH, should be treated as a hard bug. get rid of now completely useless checks in xarray_get_pages{,_alloc}(). Reviewed-by: Jeff Layton Signed-off-by: Al Viro lib/iov_iter.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 91329559eb07c9b12c7ce80e893ad39579c40aa2 Author: Al Viro Date: Fri Jun 10 20:38:20 2022 -0400 iov_iter_get_pages_alloc(): lift freeing pages array on failure exits into wrapper Incidentally, ITER_XARRAY did *not* free the sucker in case when iter_xarray_populate_pages() returned 0... Reviewed-by: Jeff Layton Signed-off-by: Al Viro lib/iov_iter.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) commit 12d426ab64a1c75f1b2ee5c33e933a4c16004049 Author: Al Viro Date: Wed Jun 15 09:44:38 2022 -0400 ITER_PIPE: fold data_start() and pipe_space_for_user() together All their callers are next to each other; all of them want the total amount of pages and, possibly, the offset in the partial final buffer. Combine into a new helper (pipe_npages()), fix the bogosity in pipe_space_for_user(), while we are at it. Signed-off-by: Al Viro include/linux/pipe_fs_i.h | 20 -------------------- lib/iov_iter.c | 44 +++++++++++++++++++------------------------- 2 files changed, 19 insertions(+), 45 deletions(-) commit 10f525a8cd7a525e9fc73288bb35428c9cad5e63 Author: Al Viro Date: Wed Jun 15 02:02:51 2022 -0400 ITER_PIPE: cache the type of last buffer We often need to find whether the last buffer is anon or not, and currently it's rather clumsy: check if ->iov_offset is non-zero (i.e. that pipe is not empty) if so, get the corresponding pipe_buffer and check its ->ops if it's &default_pipe_buf_ops, we have an anon buffer. Let's replace the use of ->iov_offset (which is nowhere near similar to its role for other flavours) with signed field (->last_offset), with the following rules: empty, no buffers occupied: 0 anon, with bytes up to N-1 filled: N zero-copy, with bytes up to N-1 filled: -N That way abs(i->last_offset) is equal to what used to be in i->iov_offset and empty vs. anon vs. zero-copy can be distinguished by the sign of i->last_offset. Checks for "should we extend the last buffer or should we start a new one?" become easier to follow that way. Note that most of the operations can only be done in a sane state - i.e. when the pipe has nothing past the current position of iterator. About the only thing that could be done outside of that state is iov_iter_advance(), which transitions to the sane state by truncating the pipe. There are only two cases where we leave the sane state: 1) iov_iter_get_pages()/iov_iter_get_pages_alloc(). Will be dealt with later, when we make get_pages advancing - the callers are actually happier that way. 2) iov_iter copied, then something is put into the copy. Since they share the underlying pipe, the original gets behind. When we decide that we are done with the copy (original is not usable until then) we advance the original. direct_io used to be done that way; nowadays it operates on the original and we do iov_iter_revert() to discard the excessive data. At the moment there's nothing in the kernel that could do that to ITER_PIPE iterators, so this reason for insane state is theoretical right now. Signed-off-by: Al Viro include/linux/uio.h | 5 +++- lib/iov_iter.c | 77 ++++++++++++++++++++++++++--------------------------- 2 files changed, 42 insertions(+), 40 deletions(-) commit 92acdc4f37207c556baee0ea28ce0823d22b9812 Author: Al Viro Date: Sun Jun 12 17:54:35 2022 -0400 ITER_PIPE: clean iov_iter_revert() Fold pipe_truncate() into it, clean up. We can release buffers in the same loop where we walk backwards to the iterator beginning looking for the place where the new position will be. Signed-off-by: Al Viro lib/iov_iter.c | 60 ++++++++++++++-------------------------------------------- 1 file changed, 14 insertions(+), 46 deletions(-) commit 2c855de93314e9573f31044976ffd89cb70a2dbd Author: Al Viro Date: Wed Jun 15 16:03:25 2022 -0400 ITER_PIPE: clean pipe_advance() up instead of setting ->iov_offset for new position and calling pipe_truncate() to adjust ->len of the last buffer and discard everything after it, adjust ->len at the same time we set ->iov_offset and use pipe_discard_from() to deal with buffers past that. Signed-off-by: Al Viro lib/iov_iter.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit ca591967543ab1af7e6e68bd505ef7869d3f2175 Author: Al Viro Date: Thu Jun 16 14:26:23 2022 -0400 ITER_PIPE: lose iter_head argument of __pipe_get_pages() it's only used to get to the partial buffer we can add to, and that's always the last one, i.e. pipe->head - 1. Signed-off-by: Al Viro lib/iov_iter.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit e3b42964f84c028f352c11269661d47f6ca4ab2e Author: Al Viro Date: Sat Jun 11 02:52:03 2022 -0400 ITER_PIPE: fold push_pipe() into __pipe_get_pages() Expand the only remaining call of push_pipe() (in __pipe_get_pages()), combine it with the page-collecting loop there. Note that the only reason it's not a loop doing append_pipe() is that append_pipe() is advancing, while iov_iter_get_pages() is not. As soon as it switches to saner semantics, this thing will switch to using append_pipe(). Signed-off-by: Al Viro lib/iov_iter.c | 80 ++++++++++++++++++---------------------------------------- 1 file changed, 25 insertions(+), 55 deletions(-) commit 8fad7767edcfd3f93e0d9985cb2dc1db270b8719 Author: Al Viro Date: Tue Jun 14 13:53:53 2022 -0400 ITER_PIPE: allocate buffers as we go in copy-to-pipe primitives New helper: append_pipe(). Extends the last buffer if possible, allocates a new one otherwise. Returns page and offset in it on success, NULL on failure. iov_iter is advanced past the data we've got. Use that instead of push_pipe() in copy-to-pipe primitives; they get simpler that way. Handling of short copy (in "mc" one) is done simply by iov_iter_revert() - iov_iter is in consistent state after that one, so we can use that. [Fix for braino caught by Liu Xinpeng folded in] [another braino fix, this time in copy_pipe_to_iter() and pipe_zero(); caught by testcase from Hugh Dickins] Signed-off-by: Al Viro lib/iov_iter.c | 171 +++++++++++++++++++++++++++++++++------------------------ 1 file changed, 98 insertions(+), 73 deletions(-) commit 47b7fcae419dc940e3fb8e58088a5b80ad813bbf Author: Al Viro Date: Mon Jun 13 14:30:15 2022 -0400 ITER_PIPE: helpers for adding pipe buffers There are only two kinds of pipe_buffer in the area used by ITER_PIPE. 1) anonymous - copy_to_iter() et.al. end up creating those and copying data there. They have zero ->offset, and their ->ops points to default_pipe_page_ops. 2) zero-copy ones - those come from copy_page_to_iter(), and page comes from caller. ->offset is also caller-supplied - it might be non-zero. ->ops points to page_cache_pipe_buf_ops. Move creation and insertion of those into helpers - push_anon(pipe, size) and push_page(pipe, page, offset, size) resp., separating them from the "could we avoid creating a new buffer by merging with the current head?" logics. Acked-by: Jeff Layton Signed-off-by: Al Viro lib/iov_iter.c | 88 ++++++++++++++++++++++++++++++---------------------------- 1 file changed, 46 insertions(+), 42 deletions(-) commit 2dcedb2a549a4d7430538213b1b28ef7271bc0aa Author: Al Viro Date: Tue Jun 14 10:24:37 2022 -0400 ITER_PIPE: helper for getting pipe buffer by index pipe_buffer instances of a pipe are organized as a ring buffer, with power-of-2 size. Indices are kept *not* reduced modulo ring size, so the buffer refered to by index N is pipe->bufs[N & (pipe->ring_size - 1)]. Ring size can change over the lifetime of a pipe, but not while the pipe is locked. So for any iov_iter primitives it's a constant. Original conversion of pipes to this layout went overboard trying to microoptimize that - calculating pipe->ring_size - 1, storing it in a local variable and using through the function. In some cases it might be warranted, but most of the times it only obfuscates what's going on in there. Introduce a helper (pipe_buf(pipe, N)) that would encapsulate that and use it in the obvious cases. More will follow... Reviewed-by: Jeff Layton Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Al Viro lib/iov_iter.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 0d9649341363047be60a9ec7378d8985bdd0abba Author: Al Viro Date: Sun Jun 12 16:07:49 2022 -0400 splice: stop abusing iov_iter_advance() to flush a pipe Use pipe_discard_from() explicitly in generic_file_read_iter(); don't bother with rather non-obvious use of iov_iter_advance() in there. Reviewed-by: Jeff Layton Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Al Viro fs/splice.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 3e20a751aff0e099cff496511fef8cdf655b3360 Author: Al Viro Date: Sun May 22 16:55:40 2022 -0400 switch new_sync_{read,write}() to ITER_UBUF Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Al Viro fs/read_write.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit fcb14cb1bdacec5b4374fe161e83fb8208164a85 Author: Al Viro Date: Sun May 22 14:59:25 2022 -0400 new iov_iter flavour - ITER_UBUF Equivalent of single-segment iovec. Initialized by iov_iter_ubuf(), checked for by iter_is_ubuf(), otherwise behaves like ITER_IOVEC ones. We are going to expose the things like ->write_iter() et.al. to those in subsequent commits. New predicate (user_backed_iter()) that is true for ITER_IOVEC and ITER_UBUF; places like direct-IO handling should use that for checking that pages we modify after getting them from iov_iter_get_pages() would need to be dirtied. DO NOT assume that replacing iter_is_iovec() with user_backed_iter() will solve all problems - there's code that uses iter_is_iovec() to decide how to poke around in iov_iter guts and for that the predicate replacement obviously won't suffice. Signed-off-by: Al Viro block/fops.c | 6 ++-- fs/ceph/file.c | 2 +- fs/cifs/file.c | 2 +- fs/direct-io.c | 2 +- fs/fuse/dev.c | 4 +-- fs/fuse/file.c | 2 +- fs/gfs2/file.c | 2 +- fs/iomap/direct-io.c | 2 +- fs/nfs/direct.c | 2 +- include/linux/uio.h | 26 ++++++++++++++++ lib/iov_iter.c | 87 +++++++++++++++++++++++++++++++++++++++++----------- mm/shmem.c | 2 +- 12 files changed, 108 insertions(+), 31 deletions(-) commit a9e9c93966afdaae74a6a7533552391646b93f2c Author: Fabio M. De Francesco Date: Thu Jul 28 17:48:44 2022 +0200 Documentation/mm: add details about kmap_local_page() and preemption What happens if a thread is preempted after mapping pages with kmap_local_page() was questioned recently.[1] Commit f3ba3c710ac5 ("mm/highmem: Provide kmap_local*") from Thomas Gleixner explains clearly that on context switch, the maps of an outgoing task are removed and the map of the incoming task are restored and that kmap_local_page() can be invoked from both preemptible and atomic contexts.[2] Therefore, for the purpose to make it clearer that users can call kmap_local_page() from contexts that allow preemption, rework a couple of sentences and add further information in highmem.rst. [1] https://lore.kernel.org/lkml/5303077.Sb9uPGUboI@opensuse/ [2] https://lore.kernel.org/all/20201118204007.468533059@linutronix.de/ Link: https://lkml.kernel.org/r/20220728154844.10874-8-fmdefrancesco@gmail.com Signed-off-by: Fabio M. De Francesco Suggested-by: Ira Weiny Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Catalin Marinas Cc: Jonathan Corbet Cc: Peter Collingbourne Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton Documentation/mm/highmem.rst | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 72f1c55adf70fd08ceac6b67455238db2014894a Author: Fabio M. De Francesco Date: Thu Jul 28 17:48:43 2022 +0200 highmem: delete a sentence from kmap_local_page() kdocs kmap_local_page() should always be preferred in place of kmap() and kmap_atomic(). "Only use when really necessary." is not consistent with the Documentation/mm/highmem.rst and these kdocs it embeds. Therefore, delete the above-mentioned sentence from kdocs. Link: https://lkml.kernel.org/r/20220728154844.10874-7-fmdefrancesco@gmail.com Signed-off-by: Fabio M. De Francesco Suggested-by: Ira Weiny Reviewed-by: Ira Weiny Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Catalin Marinas Cc: Jonathan Corbet Cc: Peter Collingbourne Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton include/linux/highmem.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 84b86f6054c42776c0d6482ab9a9071b247159fa Author: Fabio M. De Francesco Date: Thu Jul 28 17:48:42 2022 +0200 Documentation/mm: rrefer kmap_local_page() and avoid kmap() The reasoning for converting kmap() to kmap_local_page() was questioned recently.[1] There are two main problems with kmap(): (1) It comes with an overhead as mapping space is restricted and protected by a global lock for synchronization and (2) kmap() also requires global TLB invalidation when its pool wraps and it might block when the mapping space is fully utilized until a slot becomes available. Warn users to avoid the use of kmap() and instead use kmap_local_page(), by designing their code to map pages in the same context the mapping will be used. [1] https://lore.kernel.org/lkml/1891319.taCxCBeP46@opensuse/ Link: https://lkml.kernel.org/r/20220728154844.10874-6-fmdefrancesco@gmail.com Signed-off-by: Fabio M. De Francesco Suggested-by: Ira Weiny Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Catalin Marinas Cc: Jonathan Corbet Cc: Peter Collingbourne Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton Documentation/mm/highmem.rst | 5 +++++ 1 file changed, 5 insertions(+) commit 6b3afe2eeec27a148b83235484149f42b22ef793 Author: Fabio M. De Francesco Date: Thu Jul 28 17:48:41 2022 +0200 Documentation/mm: avoid invalid use of addresses from kmap_local_page() Users of kmap_local_page() must be absolutely sure to not hand kernel virtual address obtained calling kmap_local_page() on highmem pages to other contexts because those pointers are thread local, therefore, they are no longer valid across different contexts. Extend the documentation of kmap_local_page() to warn users about the above-mentioned potential invalid use of pointers returned by kmap_local_page(). Link: https://lkml.kernel.org/r/20220728154844.10874-5-fmdefrancesco@gmail.com Signed-off-by: Fabio M. De Francesco Suggested-by: Ira Weiny Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Catalin Marinas Cc: Jonathan Corbet Cc: Peter Collingbourne Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton Documentation/mm/highmem.rst | 7 +++++++ 1 file changed, 7 insertions(+) commit 516ea046ec5558882b4a8e5f6b0c9b4c957db279 Author: Fabio M. De Francesco Date: Thu Jul 28 17:48:40 2022 +0200 Documentation/mm: don't kmap*() pages which can't come from HIGHMEM There is no need to kmap*() pages which are guaranteed to come from ZONE_NORMAL (or lower). Linux has currently several call sites of kmap{,_atomic,_local_page}() on pages which are clearly known which can't come from ZONE_HIGHMEM. Therefore, add a paragraph to highmem.rst, to explain better that a plain page_address() may be used for getting the address of pages which cannot come from ZONE_HIGHMEM, although it is always safe to use kmap_local_page() / kunmap_local() also on those pages. Link: https://lkml.kernel.org/r/20220728154844.10874-4-fmdefrancesco@gmail.com Signed-off-by: Fabio M. De Francesco Suggested-by: Ira Weiny Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Catalin Marinas Cc: Jonathan Corbet Cc: Peter Collingbourne Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton Documentation/mm/highmem.rst | 6 ++++++ 1 file changed, 6 insertions(+) commit 383bbef283920411379c5c93829102ff7859fea5 Author: Fabio M. De Francesco Date: Thu Jul 28 17:48:39 2022 +0200 highmem: specify that kmap_local_page() is callable from interrupts In a recent thread about converting kmap() to kmap_local_page(), the safety of calling kmap_local_page() was questioned.[1] "any context" should probably be enough detail for users who want to know whether or not kmap_local_page() can be called from interrupts. However, Linux still has kmap_atomic() which might make users think they must use the latter in interrupts. Add "including interrupts" for better clarity. [1] https://lore.kernel.org/lkml/3187836.aeNJFYEL58@opensuse/ Link: https://lkml.kernel.org/r/20220728154844.10874-3-fmdefrancesco@gmail.com Signed-off-by: Fabio M. De Francesco Suggested-by: Ira Weiny Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Catalin Marinas Cc: Jonathan Corbet Cc: Peter Collingbourne Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton include/linux/highmem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 729337bc20876af348b363b3e35fb19be71ba793 Author: Fabio M. De Francesco Date: Thu Jul 28 17:48:38 2022 +0200 highmem: remove unneeded spaces in kmap_local_page() kdocs Patch series "highmem: Extend kmap_local_page() documentation", v2. The Highmem interface is evolving and the current documentation does not reflect the intended uses of each of the calls. Furthermore, after a recent series of reworks, the differences of the calls can still be confusing and may lead to the expanded use of calls which are deprecated. This series is the second round of changes towards an enhanced documentation of the Highmem's interface; at this stage the patches are only focused to kmap_local_page(). In addition it also contains some minor clean ups. This patch (of 7): In the kdocs of kmap_local_page(), the description of @page starts after several unnecessary spaces. Therefore, remove those spaces. Link: https://lkml.kernel.org/r/20220728154844.10874-1-fmdefrancesco@gmail.com Link: https://lkml.kernel.org/r/20220728154844.10874-2-fmdefrancesco@gmail.com Signed-off-by: Fabio M. De Francesco Suggested-by: Ira Weiny Reviewed-by: Ira Weiny Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Catalin Marinas Cc: Will Deacon Cc: Peter Collingbourne Cc: Vlastimil Babka Cc: Jonathan Corbet Signed-off-by: Andrew Morton include/linux/highmem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f4614886baa59b6ae014093300482c1da4d3c93 Author: Naoya Horiguchi Date: Thu Jul 14 13:24:20 2022 +0900 mm, hwpoison: enable memory error handling on 1GB hugepage Now error handling code is prepared, so remove the blocking code and enable memory error handling on 1GB hugepage. Link: https://lkml.kernel.org/r/20220714042420.1847125-9-naoya.horiguchi@linux.dev Signed-off-by: Naoya Horiguchi Reviewed-by: Miaohe Lin Cc: David Hildenbrand Cc: kernel test robot Cc: Liu Shixin Cc: Mike Kravetz Cc: Muchun Song Cc: Oscar Salvador Cc: Yang Shi Signed-off-by: Andrew Morton include/linux/mm.h | 1 - include/ras/ras_event.h | 1 - mm/memory-failure.c | 16 ---------------- 3 files changed, 18 deletions(-) commit ceaf8fbea79a854373b9fc03c9fde98eb8712725 Author: Naoya Horiguchi Date: Thu Jul 14 13:24:19 2022 +0900 mm, hwpoison: skip raw hwpoison page in freeing 1GB hugepage Currently if memory_failure() (modified to remove blocking code with subsequent patch) is called on a page in some 1GB hugepage, memory error handling fails and the raw error page gets into leaked state. The impact is small in production systems (just leaked single 4kB page), but this limits the testability because unpoison doesn't work for it. We can no longer create 1GB hugepage on the 1GB physical address range with such leaked pages, that's not useful when testing on small systems. When a hwpoison page in a 1GB hugepage is handled, it's caught by the PageHWPoison check in free_pages_prepare() because the 1GB hugepage is broken down into raw error pages before coming to this point: if (unlikely(PageHWPoison(page)) && !order) { ... return false; } Then, the page is not sent to buddy and the page refcount is left 0. Originally this check is supposed to work when the error page is freed from page_handle_poison() (that is called from soft-offline), but now we are opening another path to call it, so the callers of __page_handle_poison() need to handle the case by considering the return value 0 as success. Then page refcount for hwpoison is properly incremented so unpoison works. Link: https://lkml.kernel.org/r/20220714042420.1847125-8-naoya.horiguchi@linux.dev Signed-off-by: Naoya Horiguchi Reviewed-by: Miaohe Lin Cc: David Hildenbrand Cc: kernel test robot Cc: Liu Shixin Cc: Mike Kravetz Cc: Muchun Song Cc: Oscar Salvador Cc: Yang Shi Signed-off-by: Andrew Morton mm/memory-failure.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 7453bf621cfaf01a61f0e9180390ac6abc414894 Author: Naoya Horiguchi Date: Thu Jul 14 13:24:18 2022 +0900 mm, hwpoison: make __page_handle_poison returns int __page_handle_poison() returns bool that shows whether take_page_off_buddy() has passed or not now. But we will want to distinguish another case of "dissolve has passed but taking off failed" by its return value. So change the type of the return value. No functional change. Link: https://lkml.kernel.org/r/20220714042420.1847125-7-naoya.horiguchi@linux.dev Signed-off-by: Naoya Horiguchi Reviewed-by: Miaohe Lin Cc: David Hildenbrand Cc: kernel test robot Cc: Liu Shixin Cc: Mike Kravetz Cc: Muchun Song Cc: Oscar Salvador Cc: Yang Shi Signed-off-by: Andrew Morton mm/memory-failure.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 38f6d29397ccb9c191c4c91103e8123f518fdc10 Author: Naoya Horiguchi Date: Thu Jul 14 13:24:17 2022 +0900 mm, hwpoison: set PG_hwpoison for busy hugetlb pages If memory_failure() fails to grab page refcount on a hugetlb page because it's busy, it returns without setting PG_hwpoison on it. This not only loses a chance of error containment, but breaks the rule that action_result() should be called only when memory_failure() do any of handling work (even if that's just setting PG_hwpoison). This inconsistency could harm code maintainability. So set PG_hwpoison and call hugetlb_set_page_hwpoison() for such a case. Link: https://lkml.kernel.org/r/20220714042420.1847125-6-naoya.horiguchi@linux.dev Fixes: 405ce051236c ("mm/hwpoison: fix race between hugetlb free/demotion and memory_failure_hugetlb()") Signed-off-by: Naoya Horiguchi Reviewed-by: Miaohe Lin Cc: David Hildenbrand Cc: kernel test robot Cc: Liu Shixin Cc: Mike Kravetz Cc: Muchun Song Cc: Oscar Salvador Cc: Yang Shi Signed-off-by: Andrew Morton include/linux/mm.h | 1 + mm/memory-failure.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) commit ac5fcde0a96a18773f06b7c00c5ea081bbdc64b3 Author: Naoya Horiguchi Date: Thu Jul 14 13:24:16 2022 +0900 mm, hwpoison: make unpoison aware of raw error info in hwpoisoned hugepage Raw error info list needs to be removed when hwpoisoned hugetlb is unpoisoned. And unpoison handler needs to know how many errors there are in the target hugepage. So add them. HPageVmemmapOptimized(hpage) and HPageRawHwpUnreliable(hpage)) sometimes can't be unpoisoned, so skip them. Link: https://lkml.kernel.org/r/20220714042420.1847125-5-naoya.horiguchi@linux.dev Signed-off-by: Naoya Horiguchi Reported-by: kernel test robot Reviewed-by: Miaohe Lin Cc: David Hildenbrand Cc: Liu Shixin Cc: Mike Kravetz Cc: Muchun Song Cc: Oscar Salvador Cc: Yang Shi Signed-off-by: Andrew Morton include/linux/swapops.h | 9 +++++++++ mm/memory-failure.c | 52 ++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 56 insertions(+), 5 deletions(-) commit 161df60e9e89651c9aa3ae0edc9aae3a8a2d21e7 Author: Naoya Horiguchi Date: Thu Jul 14 13:24:15 2022 +0900 mm, hwpoison, hugetlb: support saving mechanism of raw error pages When handling memory error on a hugetlb page, the error handler tries to dissolve and turn it into 4kB pages. If it's successfully dissolved, PageHWPoison flag is moved to the raw error page, so that's all right. However, dissolve sometimes fails, then the error page is left as hwpoisoned hugepage. It's useful if we can retry to dissolve it to save healthy pages, but that's not possible now because the information about where the raw error pages is lost. Use the private field of a few tail pages to keep that information. The code path of shrinking hugepage pool uses this info to try delayed dissolve. In order to remember multiple errors in a hugepage, a singly-linked list originated from SUBPAGE_INDEX_HWPOISON-th tail page is constructed. Only simple operations (adding an entry or clearing all) are required and the list is assumed not to be very long, so this simple data structure should be enough. If we failed to save raw error info, the hwpoison hugepage has errors on unknown subpage, then this new saving mechanism does not work any more, so disable saving new raw error info and freeing hwpoison hugepages. Link: https://lkml.kernel.org/r/20220714042420.1847125-4-naoya.horiguchi@linux.dev Signed-off-by: Naoya Horiguchi Reported-by: kernel test robot Reviewed-by: Miaohe Lin Cc: David Hildenbrand Cc: Liu Shixin Cc: Mike Kravetz Cc: Muchun Song Cc: Oscar Salvador Cc: Yang Shi Signed-off-by: Andrew Morton include/linux/hugetlb.h | 17 +++++++++- mm/hugetlb.c | 23 ++++++++----- mm/memory-failure.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 116 insertions(+), 13 deletions(-) commit 3a194f3f8ad01bce00bd7174aaba1563bcc827eb Author: Naoya Horiguchi Date: Thu Jul 14 13:24:14 2022 +0900 mm/hugetlb: make pud_huge() and follow_huge_pud() aware of non-present pud entry follow_pud_mask() does not support non-present pud entry now. As long as I tested on x86_64 server, follow_pud_mask() still simply returns no_page_table() for non-present_pud_entry() due to pud_bad(), so no severe user-visible effect should happen. But generally we should call follow_huge_pud() for non-present pud entry for 1GB hugetlb page. Update pud_huge() and follow_huge_pud() to handle non-present pud entries. The changes are similar to previous works for pud entries commit e66f17ff7177 ("mm/hugetlb: take page table lock in follow_huge_pmd()") and commit cbef8478bee5 ("mm/hugetlb: pmd_huge() returns true for non-present hugepage"). Link: https://lkml.kernel.org/r/20220714042420.1847125-3-naoya.horiguchi@linux.dev Signed-off-by: Naoya Horiguchi Reviewed-by: Miaohe Lin Reviewed-by: Mike Kravetz Cc: David Hildenbrand Cc: kernel test robot Cc: Liu Shixin Cc: Muchun Song Cc: Oscar Salvador Cc: Yang Shi Signed-off-by: Andrew Morton arch/x86/mm/hugetlbpage.c | 8 +++++++- mm/hugetlb.c | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 3 deletions(-) commit c0531714d6e3fd720b7dacc2de2d0503a995bcdc Author: Naoya Horiguchi Date: Thu Jul 14 13:24:13 2022 +0900 mm/hugetlb: check gigantic_page_runtime_supported() in return_unused_surplus_pages() Patch series "mm, hwpoison: enable 1GB hugepage support", v7. This patch (of 8): I found a weird state of 1GB hugepage pool, caused by the following procedure: - run a process reserving all free 1GB hugepages, - shrink free 1GB hugepage pool to zero (i.e. writing 0 to /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages), then - kill the reserving process. , then all the hugepages are free *and* surplus at the same time. $ cat /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages 3 $ cat /sys/kernel/mm/hugepages/hugepages-1048576kB/free_hugepages 3 $ cat /sys/kernel/mm/hugepages/hugepages-1048576kB/resv_hugepages 0 $ cat /sys/kernel/mm/hugepages/hugepages-1048576kB/surplus_hugepages 3 This state is resolved by reserving and allocating the pages then freeing them again, so this seems not to result in serious problem. But it's a little surprising (shrinking pool suddenly fails). This behavior is caused by hstate_is_gigantic() check in return_unused_surplus_pages(). This was introduced so long ago in 2008 by commit aa888a74977a ("hugetlb: support larger than MAX_ORDER"), and at that time the gigantic pages were not supposed to be allocated/freed at run-time. Now kernel can support runtime allocation/free, so let's check gigantic_page_runtime_supported() together. Link: https://lkml.kernel.org/r/20220714042420.1847125-1-naoya.horiguchi@linux.dev Link: https://lkml.kernel.org/r/20220714042420.1847125-2-naoya.horiguchi@linux.dev Signed-off-by: Naoya Horiguchi Reviewed-by: Miaohe Lin Cc: David Hildenbrand Cc: Mike Kravetz Cc: Liu Shixin Cc: Yang Shi Cc: Oscar Salvador Cc: Muchun Song Cc: kernel test robot Signed-off-by: Andrew Morton mm/hugetlb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e38f055d6d9a060dbf3f69fbac5b3b04a1566a56 Author: Muchun Song Date: Tue Jun 28 17:22:35 2022 +0800 mm: hugetlb_vmemmap: use PTRS_PER_PTE instead of PMD_SIZE / PAGE_SIZE There is already a macro PTRS_PER_PTE to represent the number of page table entries, just use it. Link: https://lkml.kernel.org/r/20220628092235.91270-9-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Mike Kravetz Cc: Anshuman Khandual Cc: Catalin Marinas Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Oscar Salvador Cc: Will Deacon Cc: Xiongchun Duan Signed-off-by: Andrew Morton mm/hugetlb_vmemmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 838691a1c0ec44739db558834e6954d62577d6b8 Author: Muchun Song Date: Tue Jun 28 17:22:34 2022 +0800 mm: hugetlb_vmemmap: move code comments to vmemmap_dedup.rst All the comments which explains how HVO works are moved to vmemmap_dedup.rst since commit 4917f55b4ef9 ("mm/sparse-vmemmap: improve memory savings for compound devmaps") except some comments above page_fixed_fake_head(). This commit moves those comments to vmemmap_dedup.rst and improve vmemmap_dedup.rst as well. Link: https://lkml.kernel.org/r/20220628092235.91270-8-songmuchun@bytedance.com Signed-off-by: Muchun Song Cc: Anshuman Khandual Cc: Catalin Marinas Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Mike Kravetz Cc: Oscar Salvador Cc: Will Deacon Cc: Xiongchun Duan Signed-off-by: Andrew Morton Documentation/mm/vmemmap_dedup.rst | 70 +++++++++++++++++++++++++------------- include/linux/page-flags.h | 15 ++------ 2 files changed, 49 insertions(+), 36 deletions(-) commit 6213834c10de954470b7195cf0cdbda858edf0ee Author: Muchun Song Date: Tue Jun 28 17:22:33 2022 +0800 mm: hugetlb_vmemmap: improve hugetlb_vmemmap code readability There is a discussion about the name of hugetlb_vmemmap_alloc/free in thread [1]. The suggestion suggested by David is rename "alloc/free" to "optimize/restore" to make functionalities clearer to users, "optimize" means the function will optimize vmemmap pages, while "restore" means restoring its vmemmap pages discared before. This commit does this. Another discussion is the confusion RESERVE_VMEMMAP_NR isn't used explicitly for vmemmap_addr but implicitly for vmemmap_end in hugetlb_vmemmap_alloc/free. David suggested we can compute what hugetlb_vmemmap_init() does now at runtime. We do not need to worry for the overhead of computing at runtime since the calculation is simple enough and those functions are not in a hot path. This commit has the following improvements: 1) The function suffixed name ("optimize/restore") is more expressive. 2) The logic becomes less weird in hugetlb_vmemmap_optimize/restore(). 3) The hugetlb_vmemmap_init() does not need to be exported anymore. 4) A ->optimize_vmemmap_pages field in struct hstate is killed. 5) There is only one place where checks is_power_of_2(sizeof(struct page)) instead of two places. 6) Add more comments for hugetlb_vmemmap_optimize/restore(). 7) For external users, hugetlb_optimize_vmemmap_pages() is used for detecting if the HugeTLB's vmemmap pages is optimizable originally. In this commit, it is killed and we introduce a new helper hugetlb_vmemmap_optimizable() to replace it. The name is more expressive. Link: https://lore.kernel.org/all/20220404074652.68024-2-songmuchun@bytedance.com/ [1] Link: https://lkml.kernel.org/r/20220628092235.91270-7-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Mike Kravetz Cc: Anshuman Khandual Cc: Catalin Marinas Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Oscar Salvador Cc: Will Deacon Cc: Xiongchun Duan Signed-off-by: Andrew Morton include/linux/hugetlb.h | 7 +-- include/linux/sysctl.h | 4 ++ mm/hugetlb.c | 15 ++--- mm/hugetlb_vmemmap.c | 143 ++++++++++++++++++++---------------------------- mm/hugetlb_vmemmap.h | 41 +++++++++----- 5 files changed, 102 insertions(+), 108 deletions(-) commit 30152245c63b59f835193b37212991bc24669645 Author: Muchun Song Date: Tue Jun 28 17:22:32 2022 +0800 mm: hugetlb_vmemmap: replace early_param() with core_param() After the following commit: 78f39084b41d ("mm: hugetlb_vmemmap: add hugetlb_optimize_vmemmap sysctl") There is no order requirement between the parameter of "hugetlb_free_vmemmap" and "hugepages" since we have removed the check of whether HVO is enabled from hugetlb_vmemmap_init(). Therefore we can safely replace early_param() with core_param() to simplify the code. Link: https://lkml.kernel.org/r/20220628092235.91270-6-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Mike Kravetz Cc: Anshuman Khandual Cc: Catalin Marinas Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Oscar Salvador Cc: Will Deacon Cc: Xiongchun Duan Signed-off-by: Andrew Morton mm/hugetlb_vmemmap.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 998a2997885f73e5cc732ac6d661dfa6e0f50654 Author: Muchun Song Date: Tue Jun 28 17:22:31 2022 +0800 mm: hugetlb_vmemmap: move vmemmap code related to HugeTLB to hugetlb_vmemmap.c When I first introduced vmemmap manipulation functions related to HugeTLB, I thought those functions may be reused by other modules (e.g. using similar approach to optimize vmemmap pages, unfortunately, the DAX used the same approach but does not use those functions). After two years, we didn't see any other users. So move those functions to hugetlb_vmemmap.c. Code movement without any functional change. Link: https://lkml.kernel.org/r/20220628092235.91270-5-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Oscar Salvador Reviewed-by: Mike Kravetz Cc: Anshuman Khandual Cc: Catalin Marinas Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Will Deacon Cc: Xiongchun Duan Signed-off-by: Andrew Morton include/linux/mm.h | 7 - mm/hugetlb_vmemmap.c | 399 ++++++++++++++++++++++++++++++++++++++++++++++++++- mm/sparse-vmemmap.c | 399 --------------------------------------------------- 3 files changed, 398 insertions(+), 407 deletions(-) commit dff033818a06e7d0bf79271e34bda11c2d9d98d0 Author: Muchun Song Date: Tue Jun 28 17:22:30 2022 +0800 mm: hugetlb_vmemmap: introduce the name HVO It it inconvenient to mention the feature of optimizing vmemmap pages associated with HugeTLB pages when communicating with others since there is no specific or abbreviated name for it when it is first introduced. Let us give it a name HVO (HugeTLB Vmemmap Optimization) from now. This commit also updates the document about "hugetlb_free_vmemmap" by the way discussed in thread [1]. Link: https://lore.kernel.org/all/21aae898-d54d-cc4b-a11f-1bb7fddcfffa@redhat.com/ [1] Link: https://lkml.kernel.org/r/20220628092235.91270-4-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Oscar Salvador Reviewed-by: Mike Kravetz Cc: Anshuman Khandual Cc: Catalin Marinas Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Will Deacon Cc: Xiongchun Duan Signed-off-by: Andrew Morton Documentation/admin-guide/kernel-parameters.txt | 7 ++++--- Documentation/admin-guide/mm/hugetlbpage.rst | 4 ++-- Documentation/admin-guide/mm/memory-hotplug.rst | 4 ++-- Documentation/admin-guide/sysctl/vm.rst | 3 +-- Documentation/mm/vmemmap_dedup.rst | 2 ++ fs/Kconfig | 12 +++++------- include/linux/page-flags.h | 3 +-- mm/hugetlb_vmemmap.c | 8 ++++---- mm/hugetlb_vmemmap.h | 4 ++-- 9 files changed, 23 insertions(+), 24 deletions(-) commit cf5472e561133888df81d2e48f7da9ebd3299459 Author: Muchun Song Date: Tue Jun 28 17:22:29 2022 +0800 mm: hugetlb_vmemmap: optimize vmemmap_optimize_mode handling We hold an another reference to hugetlb_optimize_vmemmap_key when making vmemmap_optimize_mode on, because we use static_key to tell memory_hotplug that memory_hotplug.memmap_on_memory should be overridden. However, this rule has gone when we have introduced PageVmemmapSelfHosted. Therefore, we could simplify vmemmap_optimize_mode handling by not holding an another reference to hugetlb_optimize_vmemmap_key. This also means that we not incur the extra page_fixed_fake_head checks if there are no vmemmap optinmized hugetlb pages after this change. Link: https://lkml.kernel.org/r/20220628092235.91270-3-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Oscar Salvador Reviewed-by: Mike Kravetz Cc: Anshuman Khandual Cc: Catalin Marinas Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Will Deacon Cc: Xiongchun Duan Signed-off-by: Andrew Morton include/linux/page-flags.h | 6 ++--- mm/hugetlb_vmemmap.c | 65 +++++----------------------------------------- 2 files changed, 9 insertions(+), 62 deletions(-) commit 2da1c30929a28c3c6b01d9c16c4216037be95597 Author: Muchun Song Date: Tue Jun 28 17:22:28 2022 +0800 mm: hugetlb_vmemmap: delete hugetlb_optimize_vmemmap_enabled() Patch series "Simplify hugetlb vmemmap and improve its readability", v2. This series aims to simplify hugetlb vmemmap and improve its readability. This patch (of 8): The name hugetlb_optimize_vmemmap_enabled() a bit confusing as it tests two conditions (enabled and pages in use). Instead of coming up to an appropriate name, we could just delete it. There is already a discussion about deleting it in thread [1]. There is only one user of hugetlb_optimize_vmemmap_enabled() outside of hugetlb_vmemmap, that is flush_dcache_page() in arch/arm64/mm/flush.c. However, it does not need to call hugetlb_optimize_vmemmap_enabled() in flush_dcache_page() since HugeTLB pages are always fully mapped and only head page will be set PG_dcache_clean meaning only head page's flag may need to be cleared (see commit cf5a501d985b). So it is easy to remove hugetlb_optimize_vmemmap_enabled(). Link: https://lore.kernel.org/all/c77c61c8-8a5a-87e8-db89-d04d8aaab4cc@oracle.com/ [1] Link: https://lkml.kernel.org/r/20220628092235.91270-2-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Oscar Salvador Reviewed-by: Mike Kravetz Reviewed-by: Catalin Marinas Cc: Will Deacon Cc: Anshuman Khandual Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Xiongchun Duan Signed-off-by: Andrew Morton arch/arm64/mm/flush.c | 13 +++---------- include/linux/page-flags.h | 14 ++------------ 2 files changed, 5 insertions(+), 22 deletions(-) commit 1d1ab5d39be7590bb2400418877bff43da9e75ec Author: Luiz Augusto von Dentz Date: Fri Aug 5 14:02:21 2022 -0700 Bluetooth: ISO: Fix not using the correct QoS This fixes using wrong QoS settings when attempting to send frames while acting as peripheral since the QoS settings in use are stored in hconn->iso_qos not in sk->qos, this is actually properly handled on getsockopt(BT_ISO_QOS) but not on iso_send_frame. Fixes: ccf74f2390d60 ("Bluetooth: Add BTPROTO_ISO socket type") Signed-off-by: Luiz Augusto von Dentz net/bluetooth/iso.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 3f2893d3c142986aa935821460cb3adb77044722 Author: Tetsuo Handa Date: Fri Aug 5 16:12:18 2022 +0900 Bluetooth: don't try to cancel uninitialized works at mgmt_index_removed() syzbot is reporting attempt to cancel uninitialized work at mgmt_index_removed() [1], for calling cancel_delayed_work_sync() without INIT_DELAYED_WORK() is not permitted. INIT_DELAYED_WORK() is called from mgmt_init_hdev() via chan->hdev_init() from hci_mgmt_cmd(), but cancel_delayed_work_sync() is unconditionally called from mgmt_index_removed(). Call cancel_delayed_work_sync() only if HCI_MGMT flag was set, for mgmt_init_hdev() sets HCI_MGMT flag when calling INIT_DELAYED_WORK(). Link: https://syzkaller.appspot.com/bug?extid=b8ddd338a8838e581b1c [1] Reported-by: syzbot Signed-off-by: Tetsuo Handa Fixes: 0ef08313cefdd60d ("Bluetooth: Convert delayed discov_off to hci_sync") Signed-off-by: Luiz Augusto von Dentz net/bluetooth/mgmt.c | 2 ++ 1 file changed, 2 insertions(+) commit 9dfe1727b21927c6dd8d703e3a9618b505eb6224 Author: Luiz Augusto von Dentz Date: Wed Aug 3 10:17:17 2022 -0700 Bluetooth: ISO: Fix iso_sock_getsockopt for BT_DEFER_SETUP BT_DEFER_SETUP shall be considered valid for all states except for BT_CONNECTED as it is also used when initiated a connection rather then only for BT_BOUND and BT_LISTEN. Fixes: ccf74f2390d60 ("Bluetooth: Add BTPROTO_ISO socket type") Signed-off-by: Luiz Augusto von Dentz net/bluetooth/iso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c7937587d8b0337466c993dc9c7645767f57bfd Author: Luiz Augusto von Dentz Date: Wed Aug 3 14:51:16 2022 -0700 Bluetooth: MGMT: Fixes build warnings with C=1 This fixes the following warning when building with make C=1: net/bluetooth/mgmt.c:3821:29: warning: restricted __le16 degrades to integer net/bluetooth/mgmt.c:4625:9: warning: cast to restricted __le32 Fixes: 600a87490ff98 ("Bluetooth: Implementation of MGMT_OP_SET_BLOCKED_KEYS.") Fixes: 4c54bf2b093bb ("Bluetooth: Add get/set device flags mgmt op") Signed-off-by: Luiz Augusto von Dentz net/bluetooth/mgmt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 889f0346d47a0285093a3b665d1455c084636d9f Author: Luiz Augusto von Dentz Date: Wed Aug 3 14:44:13 2022 -0700 Bluetooth: hci_event: Fix build warning with C=1 This fixes the following warning when build with make C=1: net/bluetooth/hci_event.c:337:15: warning: restricted __le16 degrades to integer Fixes: a93661203641e ("Bluetooth: Process result of HCI Delete Stored Link Key command") Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_event.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit b4443423278263d229dbeee12d09e657b78d64ab Author: Luiz Augusto von Dentz Date: Fri Jul 29 11:03:27 2022 -0700 Bluetooth: ISO: Fix memory corruption The following memory corruption can happen since iso_pinfo.base size did not account for its headers (4 bytes): net/bluetooth/eir.c 76 memcpy(&eir[eir_len], data, data_len); ^^^^^^^ ^^^^^^^^ 77 eir_len += data_len; 78 79 return eir_len; 80 } The "eir" buffer has 252 bytes and data_len is 252 but we do a memcpy() to &eir[4] so this can corrupt 4 bytes beyond the end of the buffer. Fixes: f764a6c2c1e4 ("Bluetooth: ISO: Add broadcast support") Signed-off-by: Luiz Augusto von Dentz Reported-by: Dan Carpenter net/bluetooth/iso.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ce78e557ff8819f2d10e8d6bae79404bfbbd6809 Author: Soenke Huster Date: Fri Jul 22 13:53:07 2022 +0200 Bluetooth: Fix null pointer deref on unexpected status event __hci_cmd_sync returns NULL if the controller responds with a status event. This is unexpected for the commands sent here, but on occurrence leads to null pointer dereferences and thus must be handled. Signed-off-by: Soenke Huster Signed-off-by: Luiz Augusto von Dentz net/bluetooth/aosp.c | 15 ++++++++++++--- net/bluetooth/msft.c | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) commit 0eee4995f40573f65ed67cea4d20fcf389d353de Author: Luiz Augusto von Dentz Date: Thu Jul 28 16:50:48 2022 -0700 Bluetooth: ISO: Fix info leak in iso_sock_getsockopt() The C standard rules for when struct holes are zeroed out are slightly weird. The existing assignments might initialize everything, but GCC is allowed to (and does sometimes) leave the struct holes uninitialized, so instead of using yet another variable and copy the QoS settings just use a pointer to the stored QoS settings. Fixes: ccf74f2390d60 ("Bluetooth: Add BTPROTO_ISO socket type") Reported-by: Dan Carpenter Signed-off-by: Luiz Augusto von Dentz net/bluetooth/iso.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 10b9adb556508a299dc283b7c746b811f6918987 Author: Luiz Augusto von Dentz Date: Thu Jul 28 13:56:36 2022 -0700 Bluetooth: hci_conn: Fix updating ISO QoS PHY BT_ISO_QOS has different semantics when it comes to QoS PHY as it uses 0x00 to disable a direction but that value is invalid over HCI and sockets using DEFER_SETUP to connect may attempt to use hci_bind_cis multiple times in order to detect if the parameters have changed, so to fix the code will now just mirror the PHY for the parameters of HCI_OP_LE_SET_CIG_PARAMS and will not update the PHY of the socket leaving it disabled. Fixes: 26afbd826ee32 ("Bluetooth: Add initial implementation of CIS connections") Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_conn.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 164dac9755ac297b0c07505ad3db9e7d69b80499 Author: Dan Carpenter Date: Wed Jul 27 15:08:56 2022 +0300 Bluetooth: ISO: unlock on error path in iso_sock_setsockopt() Call release_sock(sk); before returning on this error path. Fixes: ccf74f2390d60 ("Bluetooth: Add BTPROTO_ISO socket type") Signed-off-by: Dan Carpenter Signed-off-by: Luiz Augusto von Dentz net/bluetooth/iso.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 332f1795ca202489c665a75e62e18ff6284de077 Author: Luiz Augusto von Dentz Date: Mon Aug 1 13:52:07 2022 -0700 Bluetooth: L2CAP: Fix l2cap_global_chan_by_psm regression The patch d0be8347c623: "Bluetooth: L2CAP: Fix use-after-free caused by l2cap_chan_put" from Jul 21, 2022, leads to the following Smatch static checker warning: net/bluetooth/l2cap_core.c:1977 l2cap_global_chan_by_psm() error: we previously assumed 'c' could be null (see line 1996) Fixes: d0be8347c623 ("Bluetooth: L2CAP: Fix use-after-free caused by l2cap_chan_put") Reported-by: Dan Carpenter Signed-off-by: Luiz Augusto von Dentz net/bluetooth/l2cap_core.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 03c4cd6f89e074a51e289eb9129ac646f0f2bd29 Author: Zeng Jingxiang Date: Thu Jul 28 18:01:01 2022 +0800 rtc: spear: set range max In the commit f395e1d3b28d7c2c67b73bd467c4fb79523e1c65 ("rtc: spear: set range"), the value of RTC_TIMESTAMP_END_9999 was incorrectly set to range_min. 390 config->rtc->range_min = RTC_TIMESTAMP_BEGIN_0000; 391 config->rtc->range_max = RTC_TIMESTAMP_END_9999; Fixes: f395e1d3b28d ("rtc: spear: set range") Signed-off-by: Zeng Jingxiang Acked-by: Viresh Kumar Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220728100101.1906801-1-zengjx95@gmail.com drivers/rtc/rtc-spear.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d5d353bed32dc3ea52e2619e0d1c60b17133b91 Merge: c72687614b36 8447d0e75099 Author: Linus Torvalds Date: Mon Aug 8 15:16:29 2022 -0700 Merge tag 'rproc-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull remoteproc updates from Bjorn Andersson: "This introduces support for the remoteproc on Mediatek MT8188, and enables caches for MT8186 SCP. It adds support for PRU cores found on the TI K3 AM62x SoCs. It moves the recovery work after a firmware crash to an unbound workqueue, to allow recovery to happen in parallel. A new DMA API is introduced to release dma_mem for a device. It adds support a panic handler for the Qualcomm modem remoteproc, with the goal of having caches flushed in memory dumps for post-mortem debugging and it introduces a mechanism to wait for the modem firmware on SM8450 to decrypt part of its memory for post-mortem debugging. Qualcomm sysmon is restricted to only inform remote processors about peers that are actually running, to avoid a race where Linux tries to notify a recovering remote processor about its peers new state. A mechanism for waiting for the sysmon connection to be established is also introduced, to avoid out-of-sync updates for rapidly restarting remote processors. A number of Devicetree binding cleanups and conversions to YAML are introduced, to facilitate Devicetree validation. Lastly it introduces a number of smaller fixes and cleanups in the core and a few different drivers" * tag 'rproc-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (42 commits) remoteproc: qcom_q6v5_pas: Do not fail if regulators are not found drivers/remoteproc: fix repeated words in comments remoteproc: Directly use ida_alloc()/free() remoteproc: Use unbounded workqueue for recovery work remoteproc: using pm_runtime_resume_and_get instead of pm_runtime_get_sync remoteproc: qcom_q6v5_pas: Deal silently with optional px and cx regulators remoteproc: sysmon: Send sysmon state only for running rprocs remoteproc: sysmon: Wait for SSCTL service to come up remoteproc: qcom: q6v5: Set q6 state to offline on receiving wdog irq remoteproc: qcom: pas: Check if coredump is enabled remoteproc: qcom: pas: Mark devices as wakeup capable remoteproc: qcom: pas: Mark va as io memory remoteproc: qcom: pas: Add decrypt shutdown support for modem remoteproc: qcom: q6v5-mss: add powerdomains to MSM8996 config remoteproc: qcom_q6v5: Introduce panic handler for MSS remoteproc: qcom_q6v5_mss: Update MBA log info remoteproc: qcom: correct kerneldoc remoteproc: qcom_q6v5_mss: map/unmap metadata region before/after use remoteproc: qcom: using pm_runtime_resume_and_get to simplify the code remoteproc: mediatek: Support MT8188 SCP ... commit c72687614b3627b3ea55d8d169e31cac70f56f3e Merge: e6cc0b56e2be 7113ac825371 Author: Linus Torvalds Date: Mon Aug 8 15:14:43 2022 -0700 Merge tag 'rpmsg-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull rpmsg updates from Bjorn Andersson: "This contains fixes and cleanups in the rpmsg core, Qualcomm SMD and GLINK drivers, a circular lock dependency in the Mediatek driver and a possible race condition in the rpmsg_char driver is resolved" * tag 'rpmsg-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: rpmsg: convert sysfs snprintf to sysfs_emit rpmsg: qcom_smd: Fix refcount leak in qcom_smd_parse_edge rpmsg: qcom: correct kerneldoc rpmsg: qcom: glink: remove unused name rpmsg: qcom: glink: replace strncpy() with strscpy_pad() rpmsg: Strcpy is not safe, use strscpy_pad() instead rpmsg: Fix possible refcount leak in rpmsg_register_device_override() rpmsg: Fix parameter naming for announce_create/destroy ops rpmsg: mtk_rpmsg: Fix circular locking dependency rpmsg: char: Add mutex protection for rpmsg_eptdev_open() commit e6cc0b56e2be8746824915d3f7130899b98a1242 Merge: 507f811f205c 2d27e5284109 Author: Linus Torvalds Date: Mon Aug 8 15:04:04 2022 -0700 Merge tag 'linux-watchdog-5.20-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - add RTL9310 support - sp805_wdt: add arm cmsdk apb wdt support - Remove #ifdef guards for PM related functions for several watchdog device drivers - pm8916_wdt reboot improvements - Several other fixes and improvements * tag 'linux-watchdog-5.20-rc1' of git://www.linux-watchdog.org/linux-watchdog: (24 commits) watchdog: armada_37xx_wdt: check the return value of devm_ioremap() in armada_37xx_wdt_probe() watchdog: dw_wdt: Fix comment typo watchdog: Fix comment typo dt-bindings: watchdog: Add fsl,scu-wdt yaml file watchdog:Fix typo in comment watchdog: pm8916_wdt: Handle watchdog enabled by bootloader watchdog: pm8916_wdt: Report reboot reason watchdog: pm8916_wdt: Avoid read of write-only PET register watchdog: wdat_wdt: Remove #ifdef guards for PM related functions watchdog: tegra_wdt: Remove #ifdef guards for PM related functions watchdog: st_lpc_wdt: Remove #ifdef guards for PM related functions watchdog: sama5d4_wdt: Remove #ifdef guards for PM related functions watchdog: s3c2410_wdt: Remove #ifdef guards for PM related functions watchdog: mtk_wdt: Remove #ifdef guards for PM related functions watchdog: dw_wdt: Remove #ifdef guards for PM related functions watchdog: bcm7038_wdt: Remove #ifdef guards for PM related functions watchdog: realtek-otto: add RTL9310 support dt-bindings: watchdog: realtek,otto-wdt: add RTL9310 watchdog: sp805_wdt: add arm cmsdk apb wdt support watchdog: sp5100_tco: Fix a memory leak of EFCH MMIO resource ... commit 507f811f205c17fd6f64e8d34d4bf91cd01b07a2 Merge: 033c88d58b66 c3f834df191a Author: Linus Torvalds Date: Mon Aug 8 14:29:00 2022 -0700 Merge tag 'pm-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These are ARM cpufreq updates and operating performance points (OPP) updates plus one cpuidle update adding a new trace point. Specifics: - Fix return error code in mtk_cpu_dvfs_info_init (Yang Yingliang). - Minor cleanups and support for new boards for Qcom cpufreq drivers (Bryan O'Donoghue, Konrad Dybcio, Pierre Gondois, and Yicong Yang). - Fix sparse warnings for Tegra cpufreq driver (Viresh Kumar). - Make dev_pm_opp_set_regulators() accept NULL terminated list (Viresh Kumar). - Add dev_pm_opp_set_config() and friends and migrate other users and helpers to using them (Viresh Kumar). - Add support for multiple clocks for a device (Viresh Kumar and Krzysztof Kozlowski). - Configure resources before adding OPP table for Venus (Stanimir Varbanov). - Keep reference count up for opp->np and opp_table->np while they are still in use (Liang He). - Minor OPP cleanups (Viresh Kumar and Yang Li). - Add a trace event for cpuidle to track missed (too deep or too shallow) wakeups (Kajetan Puchalski)" * tag 'pm-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (55 commits) cpuidle: Add cpu_idle_miss trace event venus: pm_helpers: Fix warning in OPP during probe OPP: Don't drop opp->np reference while it is still in use OPP: Don't drop opp_table->np reference while it is still in use cpufreq: tegra194: Staticize struct tegra_cpufreq_soc instances dt-bindings: cpufreq: cpufreq-qcom-hw: Add SM6375 compatible dt-bindings: opp: Add msm8939 to the compatible list dt-bindings: opp: Add missing compat devices dt-bindings: opp: opp-v2-kryo-cpu: Fix example binding checks cpufreq: Change order of online() CB and policy->cpus modification cpufreq: qcom-hw: Remove deprecated irq_set_affinity_hint() call cpufreq: qcom-hw: Disable LMH irq when disabling policy cpufreq: qcom-hw: Reset cancel_throttle when policy is re-enabled cpufreq: qcom-cpufreq-hw: use HZ_PER_KHZ macro in units.h cpufreq: mediatek: fix error return code in mtk_cpu_dvfs_info_init() OPP: Remove dev{m}_pm_opp_of_add_table_noclk() PM / devfreq: tegra30: Register config_clks helper OPP: Allow config_clks helper for single clk case OPP: Provide a simple implementation to configure multiple clocks OPP: Assert clk_count == 1 for single clk helpers ... commit 033c88d58b66a5bf61a9a4f0029c4fb771f0555e Merge: d5af75f77c52 7f0169cde0ce Author: Linus Torvalds Date: Mon Aug 8 14:23:37 2022 -0700 Merge tag 'thermal-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more thermal control updates from Rafael Wysocki: "These fix an error code path issue leading to a NULL pointer dereference, drop Kconfig dependencies that are not needed any more after recent changes, add CPU IDs for new chips to a driver and fix up the tmon utility. Specifics: - Fix NULL pointer dereference in the thermal sysfs interface that results from an error code path mishandling (Rafael Wysocki). - Drop COMPILE_TEST dependency that's not needed any more from two thermal Kconfig entries (Jean Delvare). - Make the Intel TCC cooling driver support Alder Lake-N and Raptor Lake-P (Sumeet Pawnikar). - Fix possible path truncations in the tmon utility (Florian Fainelli)" * tag 'thermal-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: tools/thermal: Fix possible path truncations thermal: Drop obsolete dependency on COMPILE_TEST thermal: sysfs: Fix cooling_device_stats_setup() error code path thermal: intel: Add TCC cooling support for Alder Lake-N and Raptor Lake-P commit d5af75f77c52c6193fdf34bdb780cb615edadd76 Merge: e74acdf55da6 374a723c7448 Author: Linus Torvalds Date: Mon Aug 8 14:17:46 2022 -0700 Merge tag 'sysctl-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull sysctl updates from Luis Chamberlain: "There isn't much for 6.0 for sysctl stuff, most of the stuff went through the networking subsystem (Kuniyuki Iwashima's trove of fixes using READ_ONCE/WRITE_ONCE helpers) as most of the issues there have been identified on networking side. So it is good we don't have much updates as we would have ended up with tons of conflicts. I rebased my delta just now to your tree so to avoid conflicts with that stuff. This merge request is just minor fluff cleanups then. Perhaps for 6.1 kernel/sysctl.c will get more love than this release" * tag 'sysctl-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: kernel/sysctl.c: Remove trailing white space kernel/sysctl.c: Clean up indentation, replace spaces with tab. sysctl: Merge adjacent CONFIG_TREE_RCU blocks commit e74acdf55da6649dd30be5b621a93b71cbe7f3f9 Merge: c8a684e2e110 554694ba120b Author: Linus Torvalds Date: Mon Aug 8 14:12:19 2022 -0700 Merge tag 'modules-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull module updates from Luis Chamberlain: "For the 6.0 merge window the modules code shifts to cleanup and minor fixes effort. This becomes much easier to do and review now due to the code split to its own directory from effort on the last kernel release. I expect to see more of this with time and as we expand on test coverage in the future. The cleanups and fixes come from usual suspects such as Christophe Leroy and Aaron Tomlin but there are also some other contributors. One particular minor fix worth mentioning is from Helge Deller, where he spotted a *forever* incorrect natural alignment on both ELF section header tables: * .altinstructions * __bug_table sections A lot of back and forth went on in trying to determine the ill effects of this misalignment being present for years and it has been determined there should be no real ill effects unless you have a buggy exception handler. Helge actually hit one of these buggy exception handlers on parisc which is how he ended up spotting this issue. When implemented correctly these paths with incorrect misalignment would just mean a performance penalty, but given that we are dealing with alternatives on modules and with the __bug_table (where info regardign BUG()/WARN() file/line information associated with it is stored) this really shouldn't be a big deal. The only other change with mentioning is the kmap() with kmap_local_page() and my only concern with that was on what is done after preemption, but the virtual addresses are restored after preemption. This is only used on module decompression. This all has sit on linux-next for a while except the kmap stuff which has been there for 3 weeks" * tag 'modules-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: module: Replace kmap() with kmap_local_page() module: Show the last unloaded module's taint flag(s) module: Use strscpy() for last_unloaded_module module: Modify module_flags() to accept show_state argument module: Move module's Kconfig items in kernel/module/ MAINTAINERS: Update file list for module maintainers module: Use vzalloc() instead of vmalloc()/memset(0) modules: Ensure natural alignment for .altinstructions and __bug_table sections module: Increase readability of module_kallsyms_lookup_name() module: Fix ERRORs reported by checkpatch.pl module: Add support for default value for module async_probe commit 0f3e72b5c8cfa0b57dc4fc7703a0a42dbc200ba9 Author: Jason Gunthorpe Date: Sun Jul 31 15:54:56 2022 +0300 vfio: Move vfio.c to vfio_main.c If a source file has the same name as a module then kbuild only supports a single source file in the module. Rename vfio.c to vfio_main.c so that we can have more that one .c file in vfio.ko. Signed-off-by: Jason Gunthorpe Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20220731125503.142683-5-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/Makefile | 2 ++ drivers/vfio/{vfio.c => vfio_main.c} | 0 2 files changed, 2 insertions(+) commit 3c59366c207e4c6c6569524af606baf017a55c61 Author: NeilBrown Date: Mon Aug 1 10:33:34 2022 +1000 NFS: don't unhash dentry during unlink/rename NFS unlink() (and rename over existing target) must determine if the file is open, and must perform a "silly rename" instead of an unlink (or before rename) if it is. Otherwise the client might hold a file open which has been removed on the server. Consequently if it determines that the file isn't open, it must block any subsequent opens until the unlink/rename has been completed on the server. This is currently achieved by unhashing the dentry. This forces any open attempt to the slow-path for lookup which will block on i_rwsem on the directory until the unlink/rename completes. A future patch will change the VFS to only get a shared lock on i_rwsem for unlink, so this will no longer work. Instead we introduce an explicit interlock. A special value is stored in dentry->d_fsdata while the unlink/rename is running and ->d_revalidate blocks while that value is present. When ->d_revalidate unblocks, the dentry will be invalid. This closes the race without requiring exclusion on i_rwsem. d_fsdata is already used in two different ways. 1/ an IS_ROOT directory dentry might have a "devname" stored in d_fsdata. Such a dentry doesn't have a name and so cannot be the target of unlink or rename. For safety we check if an old devname is still stored, and remove it if it is. 2/ a dentry with DCACHE_NFSFS_RENAMED set will have a 'struct nfs_unlinkdata' stored in d_fsdata. While this is set maydelete() will fail, so an unlink or rename will never proceed on such a dentry. Neither of these can be in effect when a dentry is the target of unlink or rename. So we can expect d_fsdata to be NULL, and store a special value ((void*)1) which is given the name NFS_FSDATA_BLOCKED to indicate that any lookup will be blocked. The d_count() is incremented under d_lock() when a lookup finds the dentry, so we check d_count() is low, and set NFS_FSDATA_BLOCKED under the same lock to avoid any races. Signed-off-by: NeilBrown Signed-off-by: Trond Myklebust fs/nfs/dir.c | 72 +++++++++++++++++++++++++++++++++++++------------- include/linux/nfs_fs.h | 9 +++++++ 2 files changed, 63 insertions(+), 18 deletions(-) commit afb176d45870048eea540991b082208270824037 Author: Oder Chiou Date: Mon Aug 8 13:28:36 2022 +0800 ASoC: rt5640: Fix the JD voltage dropping issue The patch fixes the JD voltage dropping issue in the HDA JD using. Signed-off-by: Oder Chiou Reported-by: Mohan Kumar D Link: https://lore.kernel.org/r/20220808052836.25791-1-oder_chiou@realtek.com Signed-off-by: Mark Brown sound/soc/codecs/rt5640.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1e5907bcb3a3b569be0a03ebe668bba2ed320a50 Author: Martin Povišer Date: Mon Aug 8 16:12:46 2022 +0200 ASoC: tas2770: Fix handling of mute/unmute Because the PWR_CTRL field is modeled as the power state of the DAC widget, and at the same time it is used to implement mute/unmute, we need some additional book-keeping to have the right end result no matter the sequence of calls. Without this fix, one can mute an ongoing stream by toggling a speaker pin control. Fixes: 1a476abc723e ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Martin Povišer Link: https://lore.kernel.org/r/20220808141246.5749-5-povik+lin@cutebit.org Signed-off-by: Mark Brown sound/soc/codecs/tas2770.c | 57 ++++++++++++++++++++++++---------------------- sound/soc/codecs/tas2770.h | 2 ++ 2 files changed, 32 insertions(+), 27 deletions(-) commit 482c23fbc7e9bf5a7a74defd0735d5346215db58 Author: Martin Povišer Date: Mon Aug 8 16:12:45 2022 +0200 ASoC: tas2770: Drop conflicting set_bias_level power setting The driver is setting the PWR_CTRL field in both the set_bias_level callback and on DAPM events of the DAC widget (and also in the mute_stream method). Drop the set_bias_level callback altogether as the power setting it does is in conflict with the other code paths. Fixes: 1a476abc723e ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Martin Povišer Link: https://lore.kernel.org/r/20220808141246.5749-4-povik+lin@cutebit.org Signed-off-by: Mark Brown sound/soc/codecs/tas2770.c | 33 --------------------------------- 1 file changed, 33 deletions(-) commit bf54d97a835dfe62d4d29e245e170c63d0089be7 Author: Martin Povišer Date: Mon Aug 8 16:12:44 2022 +0200 ASoC: tas2770: Allow mono streams The part is a mono speaker amp, but it can do downmix and switch between left and right channel, so the right channel range is 1 to 2. Fixes: 1a476abc723e ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Martin Povišer Link: https://lore.kernel.org/r/20220808141246.5749-3-povik+lin@cutebit.org Signed-off-by: Mark Brown sound/soc/codecs/tas2770.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9ac31f0a5d0e246b046c20348954519f91a297f Author: Martin Povišer Date: Mon Aug 8 16:12:43 2022 +0200 ASoC: tas2770: Set correct FSYNC polarity Fix setting of FSYNC polarity for DAI formats other than I2S. Also add support for polarity inversion. Fixes: 1a476abc723e ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Martin Povišer Link: https://lore.kernel.org/r/20220808141246.5749-2-povik+lin@cutebit.org Signed-off-by: Mark Brown sound/soc/codecs/tas2770.c | 20 +++++++++++++++++++- sound/soc/codecs/tas2770.h | 3 +++ 2 files changed, 22 insertions(+), 1 deletion(-) commit 9d50bff40e3e366886ec37299fc317edf84be0c9 Author: Mauro Carvalho Chehab Date: Thu Aug 4 09:37:22 2022 +0200 drm/i915: pass a pointer for tlb seqno at vma_invalidate_tlb() WRITE_ONCE() should happen at the original var, not on a local copy of it. Cc: stable@vger.kernel.org Fixes: 59eda6ce824e ("drm/i915/gt: Batch TLB invalidations") Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Andi Shyti Signed-off-by: Rodrigo Vivi [added cc-stable while merging it] Link: https://patchwork.freedesktop.org/patch/msgid/f9550e6bacea10131ff40dd8981b69eb9251cdcd.1659598090.git.mchehab@kernel.org (cherry picked from commit 3d037d99e61a1e7a3ae3d214146d88db349dd19f) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_ppgtt.c | 2 +- drivers/gpu/drm/i915/i915_vma.c | 6 +++--- drivers/gpu/drm/i915/i915_vma.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit c8a684e2e110376c58f0bfa30fb3855d1e319670 Merge: 607ca0f742b7 38ba0bb291aa Author: Linus Torvalds Date: Mon Aug 8 11:36:21 2022 -0700 Merge tag 'leds-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds Pull LED updates from Pavel Machek: "A new driver for bcm63138, is31fl319x updates, fixups for multicolor. The clevo-mail driver got disabled, it needs an API fix" * tag 'leds-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: (23 commits) leds: is31fl319x: use simple i2c probe function leds: is31fl319x: Fix devm vs. non-devm ordering leds: is31fl319x: Make use of dev_err_probe() leds: is31fl319x: Make use of device properties leds: is31fl319x: Cleanup formatting and dev_dbg calls leds: is31fl319x: Add support for is31fl319{0,1,3} chips leds: is31fl319x: Move chipset-specific values in chipdef struct leds: is31fl319x: Use non-wildcard names for vars, structs and defines leds: is31fl319x: Add missing si-en compatibles dt-bindings: leds: pwm-multicolor: document max-brigthness leds: turris-omnia: convert to use dev_groups leds: leds-bcm63138: get rid of LED_OFF leds: add help info about BCM63138 module name dt-bindings: leds: leds-bcm63138: unify full stops in descriptions dt-bindings: leds: lp50xx: fix LED children names dt-bindings: leds: class-multicolor: reference class directly in multi-led node leds: bcm63138: add support for BCM63138 controller dt-bindings: leds: add Broadcom's BCM63138 controller leds: clevo-mail: Mark as broken pending interface fix leds: pwm-multicolor: Support active-low LEDs ... commit 6492fed7d8c95f53b0b804ef541324d924d95d41 Author: Rafael J. Wysocki Date: Mon Aug 8 20:23:59 2022 +0200 rtc: rtc-cmos: Do not check ACPI_FADT_LOW_POWER_S0 The ACPI_FADT_LOW_POWER_S0 flag merely means that it is better to use low-power S0 idle on the given platform than S3 (provided that the latter is supported) and it doesn't preclude using either of them (which of them will be used depends on the choices made by user space). For this reason, there is no benefit from checking that flag in use_acpi_alarm_quirks(). First off, it cannot be a bug to do S3 with use_acpi_alarm set, because S3 can be used on systems with ACPI_FADT_LOW_POWER_S0 and it must work if really supported, so the ACPI_FADT_LOW_POWER_S0 check is not needed to protect the S3-capable systems from failing. Second, suspend-to-idle can be carried out on a system with ACPI_FADT_LOW_POWER_S0 unset and it is expected to work, so if setting use_acpi_alarm is needed to handle that case correctly, it should be set regardless of the ACPI_FADT_LOW_POWER_S0 value. Accordingly, drop the ACPI_FADT_LOW_POWER_S0 check from use_acpi_alarm_quirks(). Signed-off-by: Rafael J. Wysocki Reviewed-by: Mario Limonciello Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/12054246.O9o76ZdvQC@kreacher drivers/rtc/rtc-cmos.c | 3 --- 1 file changed, 3 deletions(-) commit c9a1dd673f28da9624776e75b78ae04125544852 Author: Alexandre Belloni Date: Wed Jul 27 12:00:18 2022 +0200 rtc: zynqmp: initialize fract_tick fract_tick is used uninitialized when fract_offset is 0 Reported-by: kernel test robot Signed-off-by: Alexandre Belloni Reviewed-by: Nathan Chancellor Reviewed-by: Michal Simek Link: https://lore.kernel.org/r/20220727100018.3301470-1-alexandre.belloni@bootlin.com drivers/rtc/rtc-zynqmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 607ca0f742b7d990b6efb3c3e7a52830f7e96419 Merge: 1daf117f1d6b 0fec518018cc Author: Linus Torvalds Date: Mon Aug 8 11:31:40 2022 -0700 Merge tag 'tty-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty / serial driver updates from Greg KH: "Here is the big set of tty and serial driver changes for 6.0-rc1. It was delayed from last week as I wanted to make sure the last commit here got some good testing in linux-next and elsewhere as it seemed to show up only late in testing for some reason. Nothing major here, just lots of cleanups from Jiri and Ilpo to make the tty core cleaner (Jiri) and the rs485 code simpler to use (Ilpo). Also included in here is the obligatory n_gsm updates from Daniel Starke and lots of tiny driver updates and minor fixes and tweaks for other smaller serial drivers. All of these have been in linux-next for a while with no reported problems" * tag 'tty-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (186 commits) tty: serial: qcom-geni-serial: Fix %lu -> %u in print statements tty: amiserial: Fix comment typo tty: serial: document uart_get_console() tty: serial: serial_core, reformat kernel-doc for functions Documentation: serial: link uart_ops properly Documentation: serial: move GPIO kernel-doc to the functions Documentation: serial: dedup kernel-doc for uart functions Documentation: serial: move uart_ops documentation to the struct dt-bindings: serial: snps-dw-apb-uart: Document Rockchip RV1126 serial: mvebu-uart: uart2 error bits clearing tty: serial: fsl_lpuart: correct the count of break characters serial: stm32: make info structs static to avoid sparse warnings serial: fsl_lpuart: zero out parity bit in CS7 mode tty: serial: qcom-geni-serial: Fix get_clk_div_rate() which otherwise could return a sub-optimal clock rate. serial: 8250_bcm2835aux: Add missing clk_disable_unprepare() tty: vt: initialize unicode screen buffer serial: remove VR41XX serial driver serial: 8250: lpc18xx: Remove redundant sanity check for RS485 flags serial: 8250_dwlib: remove redundant sanity check for RS485 flags dt_bindings: rs485: Correct delay values ... commit 1daf117f1d6b5056e27353fa289ef1bbcb619e8d Merge: 2bd5d41e0e9d 01fc4b9a6ed8 Author: Linus Torvalds Date: Mon Aug 8 11:18:31 2022 -0700 Merge tag 'f2fs-for-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this cycle, we mainly fixed some corner cases that manipulate a per-file compression flag inappropriately. And, we found f2fs counted valid blocks in a section incorrectly when zone capacity is set, and thus, fixed it with additional sysfs entry to check it easily. Lastly, this series includes several patches with respect to the new atomic write support such as a couple of bug fixes and re-adding atomic_write_abort support that we removed by mistake in the previous release. Enhancements: - add sysfs entries to understand atomic write operations and zone capacity - introduce memory mode to get a hint for low-memory devices - adjust the waiting time of foreground GC - decompress clusters under softirq to avoid non-deterministic latency - do not skip updating inode when retrying to flush node page - enforce single zone capacity Bug fixes: - set the compression/no-compression flags correctly - revive F2FS_IOC_ABORT_VOLATILE_WRITE - check inline_data during compressed inode conversion - understand zone capacity when calculating valid block count As usual, the series includes several minor clean-ups and sanity checks" * tag 'f2fs-for-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (29 commits) f2fs: use onstack pages instead of pvec f2fs: intorduce f2fs_all_cluster_page_ready f2fs: clean up f2fs_abort_atomic_write() f2fs: handle decompress only post processing in softirq f2fs: do not allow to decompress files have FI_COMPRESS_RELEASED f2fs: do not set compression bit if kernel doesn't support f2fs: remove device type check for direct IO f2fs: fix null-ptr-deref in f2fs_get_dnode_of_data f2fs: revive F2FS_IOC_ABORT_VOLATILE_WRITE f2fs: fix to do sanity check on segment type in build_sit_entries() f2fs: obsolete unused MAX_DISCARD_BLOCKS f2fs: fix to avoid use f2fs_bug_on() in f2fs_new_node_page() f2fs: fix to remove F2FS_COMPR_FL and tag F2FS_NOCOMP_FL at the same time f2fs: introduce sysfs atomic write statistics f2fs: don't bother wait_ms by foreground gc f2fs: invalidate meta pages only for post_read required inode f2fs: allow compression of files without blocks f2fs: fix to check inline_data during compressed inode conversion f2fs: Delete f2fs_copy_page() and replace with memcpy_page() f2fs: fix to invalidate META_MAPPING before DIO write ... commit 2bd5d41e0e9d8e423a0bd446ee174584c8a495fe Merge: 65512eb0e9e6 247861c325c2 Author: Linus Torvalds Date: Mon Aug 8 11:10:02 2022 -0700 Merge tag 'fuse-update-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse updates from Miklos Szeredi: - Fix an issue with reusing the bdi in case of block based filesystems - Allow root (in init namespace) to access fuse filesystems in user namespaces if expicitly enabled with a module param - Misc fixes * tag 'fuse-update-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: retire block-device-based superblock on force unmount vfs: function to prevent re-use of block-device-based superblocks virtio_fs: Modify format for virtio_fs_direct_access virtiofs: delete unused parameter for virtio_fs_cleanup_vqs fuse: Add module param for CAP_SYS_ADMIN access bypassing allow_other fuse: Remove the control interface for virtio-fs fuse: ioctl: translate ENOSYS fuse: limit nsec fuse: avoid unnecessary spinlock bump fuse: fix deadlock between atomic O_TRUNC and page invalidation fuse: write inode in fuse_release() commit 2826d447fbd60e6a05e53d5f918bceb8c04e315c Author: Chris Wilson Date: Tue Jul 26 16:48:44 2022 +0200 drm/i915/gem: Remove shared locking on freeing objects The obj->base.resv may be shared across many objects, some of which may still be live and locked, preventing objects from being freed indefintely. We could individualise the lock during the free, or rely on a freed object having no contention and being able to immediately free the pages it owns. References: https://gitlab.freedesktop.org/drm/intel/-/issues/6469 Fixes: be7612fd6665 ("drm/i915: Require object lock when freeing pages during destruction") Fixes: 6cb12fbda1c2 ("drm/i915: Use trylock instead of blocking lock for __i915_gem_free_objects.") Cc: # v5.17+ Signed-off-by: Chris Wilson Tested-by: Nirmoy Das Acked-by: Nirmoy Das Signed-off-by: Nirmoy Das Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220726144844.18429-1-nirmoy.das@intel.com (cherry picked from commit 7dd5c56531eb03696acdb17774721de5ef481c0b) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gem/i915_gem_object.c | 16 ++++------------ drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 2 files changed, 6 insertions(+), 14 deletions(-) commit 59eda6ce824e95b98c45628fe6c0adb9130c6df2 Author: Chris Wilson Date: Wed Jul 27 14:29:55 2022 +0200 drm/i915/gt: Batch TLB invalidations Invalidate TLB in batches, in order to reduce performance regressions. Currently, every caller performs a full barrier around a TLB invalidation, ignoring all other invalidations that may have already removed their PTEs from the cache. As this is a synchronous operation and can be quite slow, we cause multiple threads to contend on the TLB invalidate mutex blocking userspace. We only need to invalidate the TLB once after replacing our PTE to ensure that there is no possible continued access to the physical address before releasing our pages. By tracking a seqno for each full TLB invalidate we can quickly determine if one has been performed since rewriting the PTE, and only if necessary trigger one for ourselves. That helps to reduce the performance regression introduced by TLB invalidate logic. [mchehab: rebased to not require moving the code to a separate file] Cc: stable@vger.kernel.org Fixes: 7938d61591d3 ("drm/i915: Flush TLBs before releasing backing store") Suggested-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Cc: Fei Yang Signed-off-by: Mauro Carvalho Chehab Acked-by: Tvrtko Ursulin Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/4e97ef5deb6739cadaaf40aa45620547e9c4ec06.1658924372.git.mchehab@kernel.org (cherry picked from commit 5d36acb7198b0e5eb88e6b701f9ad7b9448f8df9) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 3 +- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 21 ++++++---- drivers/gpu/drm/i915/gt/intel_gt.c | 53 ++++++++++++++++++------ drivers/gpu/drm/i915/gt/intel_gt.h | 12 +++++- drivers/gpu/drm/i915/gt/intel_gt_types.h | 18 +++++++- drivers/gpu/drm/i915/gt/intel_ppgtt.c | 8 +++- drivers/gpu/drm/i915/i915_vma.c | 33 +++++++++++---- drivers/gpu/drm/i915/i915_vma.h | 1 + drivers/gpu/drm/i915/i915_vma_resource.c | 5 ++- drivers/gpu/drm/i915/i915_vma_resource.h | 6 ++- 10 files changed, 125 insertions(+), 35 deletions(-) commit 65512eb0e9e6308ca08110c88a9619a9e5a19aa9 Merge: f72fb74b8218 4f1196288dfb Author: Linus Torvalds Date: Mon Aug 8 11:03:11 2022 -0700 Merge tag 'ovl-update-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs update from Miklos Szeredi: "Just a small update" * tag 'ovl-update-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: fix spelling mistakes ovl: drop WARN_ON() dentry is NULL in ovl_encode_fh() ovl: improve ovl_get_acl() if POSIX ACL support is off ovl: fix some kernel-doc comments ovl: warn if trusted xattr creation fails commit f72fb74b8218f9aebfcc691b7e9bb641920dbc13 Merge: e2ebff9c57fe df13a3477635 Author: Linus Torvalds Date: Mon Aug 8 10:57:09 2022 -0700 Merge tag 'exfat-for-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat Pull exfat updates from Namjae Jeon: - fix the error code of rename syscall - cleanup and suppress the superfluous error messages - remove duplicate directory entry update - add exfat git tree in MAINTAINERS * tag 'exfat-for-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: MAINTAINERS: Add Namjae's exfat git tree exfat: Drop superfluous new line for error messages exfat: Downgrade ENAMETOOLONG error message to debug messages exfat: Expand exfat_err() and co directly to pr_*() macro exfat: Define NLS_NAME_* as bit flags explicitly exfat: Return ENAMETOOLONG consistently for oversized paths exfat: remove duplicate write inode for extending dir/file exfat: remove duplicate write inode for truncating file exfat: reuse __exfat_write_inode() to update directory entry commit e2ebff9c57fe4eb104ce4768f6ebcccf76bef849 Author: David Howells Date: Mon Aug 8 09:52:35 2022 +0100 vfs: Check the truncate maximum size in inode_newsize_ok() If something manages to set the maximum file size to MAX_OFFSET+1, this can cause the xfs and ext4 filesystems at least to become corrupt. Ordinarily, the kernel protects against userspace trying this by checking the value early in the truncate() and ftruncate() system calls calls - but there are at least two places that this check is bypassed: (1) Cachefiles will round up the EOF of the backing file to DIO block size so as to allow DIO on the final block - but this might push the offset negative. It then calls notify_change(), but this inadvertently bypasses the checking. This can be triggered if someone puts an 8EiB-1 file on a server for someone else to try and access by, say, nfs. (2) ksmbd doesn't check the value it is given in set_end_of_file_info() and then calls vfs_truncate() directly - which also bypasses the check. In both cases, it is potentially possible for a network filesystem to cause a disk filesystem to be corrupted: cachefiles in the client's cache filesystem; ksmbd in the server's filesystem. nfsd is okay as it checks the value, but we can then remove this check too. Fix this by adding a check to inode_newsize_ok(), as called from setattr_prepare(), thereby catching the issue as filesystems set up to perform the truncate with minimal opportunity for bypassing the new check. Fixes: 1f08c925e7a3 ("cachefiles: Implement backing file wrangling") Fixes: f44158485826 ("cifsd: add file operations") Signed-off-by: David Howells Reported-by: Jeff Layton Tested-by: Jeff Layton Reviewed-by: Namjae Jeon Cc: stable@kernel.org Acked-by: Alexander Viro cc: Steve French cc: Hyunchul Lee cc: Chuck Lever cc: Dave Wysochanski Signed-off-by: Linus Torvalds fs/attr.c | 2 ++ 1 file changed, 2 insertions(+) commit 7f0169cde0ced2e2b7bdf3dcedcf8c71efc6afc0 Merge: 312c1a44da37 8df4ef3eaa62 6c58cf40e3a1 Author: Rafael J. Wysocki Date: Mon Aug 8 19:39:09 2022 +0200 Merge branches 'thermal-core' and 'thermal-tools' Merge additional changes in the thermal core and thermal tools updates for 5.20-rc1: - Fix NULL poiter dereference in the thermal sysfs interface that results from an error code path mishandling (Rafael Wysocki). - Drop COMPILE_TEST dependency that's not needed any more from two thermal Kconfig entries (Jean Delvare). - Fix possible path truncations in the tmon utility (Florian Fainelli). * thermal-core: thermal: Drop obsolete dependency on COMPILE_TEST thermal: sysfs: Fix cooling_device_stats_setup() error code path * thermal-tools: tools/thermal: Fix possible path truncations commit c3f834df191ac2e5e58c215b9110e7e19553100f Merge: c4f5a40bf000 7912c9c6a6e8 Author: Rafael J. Wysocki Date: Mon Aug 8 19:35:33 2022 +0200 Merge branch 'pm-cpufreq' Merge ARM cpufreq updates for 5.20-rc1. * pm-cpufreq: cpufreq: tegra194: Staticize struct tegra_cpufreq_soc instances dt-bindings: cpufreq: cpufreq-qcom-hw: Add SM6375 compatible dt-bindings: opp: Add msm8939 to the compatible list dt-bindings: opp: Add missing compat devices dt-bindings: opp: opp-v2-kryo-cpu: Fix example binding checks cpufreq: Change order of online() CB and policy->cpus modification cpufreq: qcom-hw: Remove deprecated irq_set_affinity_hint() call cpufreq: qcom-hw: Disable LMH irq when disabling policy cpufreq: qcom-hw: Reset cancel_throttle when policy is re-enabled cpufreq: qcom-cpufreq-hw: use HZ_PER_KHZ macro in units.h cpufreq: mediatek: fix error return code in mtk_cpu_dvfs_info_init() commit c4f5a40bf000defdd6d04ef65e680183718fc3af Merge: 6ab4b1990097 f6e0b468dab9 Author: Rafael J. Wysocki Date: Mon Aug 8 19:32:33 2022 +0200 Merge branch 'pm-opp' Merge operating performance points (OPP) updates for 5.20-rc1. * pm-opp: (43 commits) venus: pm_helpers: Fix warning in OPP during probe OPP: Don't drop opp->np reference while it is still in use OPP: Don't drop opp_table->np reference while it is still in use OPP: Remove dev{m}_pm_opp_of_add_table_noclk() PM / devfreq: tegra30: Register config_clks helper OPP: Allow config_clks helper for single clk case OPP: Provide a simple implementation to configure multiple clocks OPP: Assert clk_count == 1 for single clk helpers OPP: Add key specific assert() method to key finding helpers OPP: Compare bandwidths for all paths in _opp_compare_key() OPP: Allow multiple clocks for a device dt-bindings: opp: accept array of frequencies OPP: Make dev_pm_opp_set_opp() independent of frequency OPP: Reuse _opp_compare_key() in _opp_add_static_v2() OPP: Remove rate_not_available parameter to _opp_add() OPP: Use consistent names for OPP table instances OPP: Use generic key finding helpers for bandwidth key OPP: Use generic key finding helpers for level key OPP: Add generic key finding helpers and use them for freq APIs OPP: Remove dev_pm_opp_find_freq_ceil_by_volt() ... commit b0f2fe5a38389790a97334c5df1c5dec52c5d627 Author: Andy Shevchenko Date: Tue Aug 2 22:35:03 2022 +0300 ACPI: VIOT: Do not dereference fwnode in struct device In order to make the underneath API easier to change in the future, prevent users from dereferencing fwnode from struct device. Instead, use the specific dev_fwnode() and device_match_fwnode() APIs for that. Signed-off-by: Andy Shevchenko Reviewed-by: Eric Auger Signed-off-by: Rafael J. Wysocki drivers/acpi/viot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3466f49dd0dd9d30fe1e916b49fca1f4f99a3b66 Merge: 92ceebf920aa cdab30b44518 Author: Linus Torvalds Date: Mon Aug 8 10:27:51 2022 -0700 Merge tag 'hwlock-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull hwspinlock updates from Bjorn Andersson: "This removes the need for representing the Qualcomm SFPB mutex using an intermediate syscon node and it clean up the pm_runtime_get_sync() usage in the OMAP hwspinlock driver" * tag 'hwlock-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: hwspinlock: qcom: Add support for mmio usage to sfpb-mutex hwspinlock: using pm_runtime_resume_and_get instead of pm_runtime_get_sync commit 92ceebf920aa9f103b89d102f98fc59c6b990cc0 Merge: df7a456e7d1d 8a8dc2b9596e Author: Linus Torvalds Date: Mon Aug 8 10:19:40 2022 -0700 Merge tag 'mailbox-v5.20' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: - mtk: - use rx_callback instead of cmdq_task_cb - qcom: - add syscon const - add SM6375 compatible - imx: - enable RST channel - clear pending irqs * tag 'mailbox-v5.20' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: imx: clear pending interrupts dt-bindings: mailbox: qcom-ipcc: Add SM6375 compatible mailbox: imx: support RST channel dt-bindings: mailbox: imx-mu: add RST channel dt-bindings: mailbox: qcom,apcs-kpss-global: Add syscon const for relevant entries mailbox: mtk-cmdq: Remove proprietary cmdq_task_cb commit e5a95c83ed1492c0f442b448b20c90c8faaf702b Author: Chris Wilson Date: Wed Jul 27 14:29:54 2022 +0200 drm/i915/gt: Skip TLB invalidations once wedged Skip all further TLB invalidations once the device is wedged and had been reset, as, on such cases, it can no longer process instructions on the GPU and the user no longer has access to the TLB's in each engine. So, an attempt to do a TLB cache invalidation will produce a timeout. That helps to reduce the performance regression introduced by TLB invalidate logic. Cc: stable@vger.kernel.org Fixes: 7938d61591d3 ("drm/i915: Flush TLBs before releasing backing store") Signed-off-by: Chris Wilson Cc: Fei Yang Cc: Tvrtko Ursulin Reviewed-by: Andi Shyti Acked-by: Thomas Hellström Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/5aa86564b9ec5fe7fe605c1dd7de76855401ed73.1658924372.git.mchehab@kernel.org (cherry picked from commit be0366f168033374a93e4c43fdaa1a90ab905184) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_gt.c | 3 +++ 1 file changed, 3 insertions(+) commit 180abeb2c5032704787151135b6a38c6b71295a6 Author: Chris Wilson Date: Wed Jul 27 14:29:53 2022 +0200 drm/i915/gt: Invalidate TLB of the OA unit at TLB invalidations Ensure that the TLB of the OA unit is also invalidated on gen12 HW, as just invalidating the TLB of an engine is not enough. Cc: stable@vger.kernel.org Fixes: 7938d61591d3 ("drm/i915: Flush TLBs before releasing backing store") Signed-off-by: Chris Wilson Cc: Fei Yang Reviewed-by: Andi Shyti Acked-by: Tvrtko Ursulin Acked-by: Thomas Hellström Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/59724d9f5cf1e93b1620d01b8332ac991555283d.1658924372.git.mchehab@kernel.org (cherry picked from commit dfc83de118ff7930acc9a4c8dfdba7c153aa44d6) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_gt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit db100e28fdf026a1fc10657c5170bb1e65663805 Author: Chris Wilson Date: Wed Jul 27 14:29:51 2022 +0200 drm/i915/gt: Ignore TLB invalidations on idle engines Check if the device is powered down prior to any engine activity, as, on such cases, all the TLBs were already invalidated, so an explicit TLB invalidation is not needed, thus reducing the performance regression impact due to it. This becomes more significant with GuC, as it can only do so when the connection to the GuC is awake. Cc: stable@vger.kernel.org Fixes: 7938d61591d3 ("drm/i915: Flush TLBs before releasing backing store") Signed-off-by: Chris Wilson Cc: Fei Yang Reviewed-by: Andi Shyti Acked-by: Thomas Hellström Acked-by: Tvrtko Ursulin Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/278a57a672edac75683f0818b292e95da583a5fe.1658924372.git.mchehab@kernel.org (cherry picked from commit 4bedceaed1ae1172cfe72d3ff752b3a1d32fe4d9) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gem/i915_gem_pages.c | 10 ++++++---- drivers/gpu/drm/i915/gt/intel_gt.c | 17 ++++++++++------- drivers/gpu/drm/i915/gt/intel_gt_pm.h | 3 +++ 3 files changed, 19 insertions(+), 11 deletions(-) commit 232d150fa15606e96c0e01e5c7a2d4e03f621787 Author: Matthew Auld Date: Wed Jul 27 17:43:46 2022 +0100 drm/i915/ttm: don't leak the ccs state The kernel only manages the ccs state with lmem-only objects, however the kernel should still take care not to leak the CCS state from the previous user. Fixes: 48760ffe923a ("drm/i915/gt: Clear compress metadata for Flat-ccs objects") Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Ramalingam C Reviewed-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20220727164346.282407-1-matthew.auld@intel.com (cherry picked from commit 353819d85f87be46aeb9c1dd929d445a006fc6ec) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_migrate.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 9cae5b3189eb9cd12a9c3f6e8afda2d81958640b Author: Nirmoy Das Date: Wed Jul 27 19:33:06 2022 +0200 drm/i915: disable pci resize on 32-bit machine PCI bar resize only works with 64 bit BAR so disable this on 32-bit machine and resolve below compilation error: drivers/gpu/drm/i915/gt/intel_region_lmem.c:94:23: error: result of comparison of constant 4294967296 with expression of type 'resource_size_t' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare] root_res->start > 0x100000000ull) Fixes: a91d1a17cd341 ("drm/i915: Add support for LMEM PCIe resizable bar") Reported-by: Linux Kernel Functional Testing Tested-by: Linux Kernel Functional Testing Acked-by: Matthew Auld Signed-off-by: Nirmoy Das Reviewed-by: Andi Shyti Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220727173306.16247-1-nirmoy.das@intel.com (cherry picked from commit f5dfbfc0ae00c2c2c0518da9e1f9a8cca50ae544) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_region_lmem.c | 4 ++++ 1 file changed, 4 insertions(+) commit e6cfcdda8cbe81eaf821c897369a65fec987b404 Author: Kim Phillips Date: Mon Aug 8 09:32:33 2022 -0500 x86/bugs: Enable STIBP for IBPB mitigated RETBleed AMD's "Technical Guidance for Mitigating Branch Type Confusion, Rev. 1.0 2022-07-12" whitepaper, under section 6.1.2 "IBPB On Privileged Mode Entry / SMT Safety" says: Similar to the Jmp2Ret mitigation, if the code on the sibling thread cannot be trusted, software should set STIBP to 1 or disable SMT to ensure SMT safety when using this mitigation. So, like already being done for retbleed=unret, and now also for retbleed=ibpb, force STIBP on machines that have it, and report its SMT vulnerability status accordingly. [ bp: Remove the "we" and remove "[AMD]" applicability parameter which doesn't work here. ] Fixes: 3ebc17006888 ("x86/bugs: Add retbleed=ibpb") Signed-off-by: Kim Phillips Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org # 5.10, 5.15, 5.19 Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Link: https://lore.kernel.org/r/20220804192201.439596-1-kim.phillips@amd.com Documentation/admin-guide/kernel-parameters.txt | 29 ++++++++++++++++++------- arch/x86/kernel/cpu/bugs.c | 10 +++++---- 2 files changed, 27 insertions(+), 12 deletions(-) commit df7a456e7d1d7511b2c373dc1099cecfea093858 Merge: cab9de71694d d180e0a1be6c Author: Linus Torvalds Date: Mon Aug 8 10:05:19 2022 -0700 Merge tag 'hyperv-next-signed-20220807' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv updates from Wei Liu: "A few miscellaneous patches. There is no large patch series for this merge window" * tag 'hyperv-next-signed-20220807' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: Drivers: hv: Create debugfs file with hyper-v balloon usage information drm/hyperv : Removing the restruction of VRAM allocation with PCI bar size PCI: hv: Take a const cpumask in hv_compose_msi_req_get_cpu() Drivers: hv: vm_bus: Handle vmbus rescind calls after vmbus is suspended commit cab9de71694de738323e30c2d1a1eb51a03f6265 Merge: 4e23eeebb2e5 f01701cec8cb Author: Linus Torvalds Date: Mon Aug 8 09:42:04 2022 -0700 Merge tag 'coccinelle-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux Pull coccinelle semantic patch updates from Julia Lawall: - Update the semantic patches in the kernel that contain a URL for Coccinelle with a URL that is currently valid (from myself). - Add a semantic patch checking for unnecessary NULL tests on dev_{put, hold} functions (from Ziyang Xuan, followed bt a modification from myself). - Drop a semantic patch that replaces 0/1 by booleans, as this change was considered to be not worthwhile by some maintainers (from Steve Rostedt). - Extend an existing semantic patch with more checks for useless tests on variables addresses (from Jérémy Lefaure). * tag 'coccinelle-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux: update Coccinelle URL coccinelle: free: add version constraint scripts/coccinelle/free: add NULL test before dev_{put, hold} functions coccinelle: Remove script that checks replacing 0/1 with false/true in functions returning bool coccinelle: Extend address test from ifaddr semantic patch to test expressions commit 374a723c7448bbea22846884ba336ed83b085aab Author: Fanjun Kong Date: Mon May 16 17:07:53 2022 +0800 kernel/sysctl.c: Remove trailing white space This patch removes the trailing white space in kernel/sysysctl.c Signed-off-by: Fanjun Kong Reviewed-by: Muchun Song [mcgrof: fix commit message subject] Signed-off-by: Luis Chamberlain kernel/sysctl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5bfd5d3e2ec883a3db3414a42d94d23961a790ed Author: Fanjun Kong Date: Sun May 22 13:29:33 2022 +0800 kernel/sysctl.c: Clean up indentation, replace spaces with tab. This patch fixes two coding style issues: 1. Clean up indentation, replace spaces with tab 2. Add space after ',' Signed-off-by: Fanjun Kong Signed-off-by: Luis Chamberlain kernel/sysctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7251ceb51af972603552fcea2db316ed2b9d95ba Author: Geert Uytterhoeven Date: Tue May 17 17:07:31 2022 +0200 sysctl: Merge adjacent CONFIG_TREE_RCU blocks There are two adjacent sysctl entries protected by the same CONFIG_TREE_RCU config symbol. Merge them into a single block to improve readability. Use the more common "#ifdef" form while at it. Signed-off-by: Geert Uytterhoeven Reviewed-by: Paul E. McKenney Signed-off-by: Luis Chamberlain kernel/sysctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8447d0e75099eb54eea9306c2d43ecfc956d09ed Author: Manivannan Sadhasivam Date: Mon Aug 1 11:09:39 2022 +0530 remoteproc: qcom_q6v5_pas: Do not fail if regulators are not found devm_regulator_get_optional() API will return -ENODEV if the regulator was not found. For the optional supplies CX, PX we should not fail in that case but rather continue. So let's catch that error and continue silently if those regulators are not found. The commit 3f52d118f992 ("remoteproc: qcom_q6v5_pas: Deal silently with optional px and cx regulators") was supposed to do the same but it missed the fact that devm_regulator_get_optional() API returns -ENODEV when the regulator was not found. Cc: Abel Vesa Fixes: 3f52d118f992 ("remoteproc: qcom_q6v5_pas: Deal silently with optional px and cx regulators") Reported-by: Steev Klimaszewski Reviewed-by: Abel Vesa Reviewed-by: Johan Hovold Tested-by: Steev Klimaszewski Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220801053939.12556-1-manivannan.sadhasivam@linaro.org drivers/remoteproc/qcom_q6v5_pas.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 19f68ed6dc90c93daf7e54d3350ea67fead7cbbf Author: Aijun Sun Date: Thu Aug 4 10:54:42 2022 +0800 bpf, arm64: Allocate program buffer using kvcalloc instead of kcalloc It is not necessary to allocate contiguous physical memory for BPF program buffer using kcalloc. When the BPF program is large more than memory page size, kcalloc allocates multiple memory pages from buddy system. If the device can not provide sufficient memory, for example in low-end android devices [0], memory allocation for BPF program is likely to fail. Test cases in lib/test_bpf.c all pass on ARM64 QEMU. [0] AndroidTestSuit: page allocation failure: order:4, mode:0x40dc0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=(null),cpuset=foreground,mems_allowed=0 Call trace: dump_stack+0xa4/0x114 warn_alloc+0xf8/0x14c __alloc_pages_slowpath+0xac8/0xb14 __alloc_pages_nodemask+0x194/0x3d0 kmalloc_order_trace+0x44/0x1e8 __kmalloc+0x29c/0x66c bpf_int_jit_compile+0x17c/0x568 bpf_prog_select_runtime+0x4c/0x1b0 bpf_prepare_filter+0x5fc/0x6bc bpf_prog_create_from_user+0x118/0x1c0 seccomp_set_mode_filter+0x1c4/0x7cc __do_sys_prctl+0x380/0x1424 __arm64_sys_prctl+0x20/0x2c el0_svc_common+0xc8/0x22c el0_svc_handler+0x1c/0x28 el0_svc+0x8/0x100 Signed-off-by: Aijun Sun Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220804025442.22524-1-aijun.sun@unisoc.com arch/arm64/net/bpf_jit_comp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ffd5cfca5388e9d7c8386343763df41315ac1dd2 Author: Stanislav Fomichev Date: Thu Aug 4 13:11:40 2022 -0700 selftests/bpf: Excercise bpf_obj_get_info_by_fd for bpf2bpf Apparently, no existing selftest covers it. Add a new one where we load cgroup/bind4 program and attach fentry to it. Calling bpf_obj_get_info_by_fd on the fentry program should return non-zero btf_id/btf_obj_id instead of crashing the kernel. Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20220804201140.1340684-2-sdf@google.com .../selftests/bpf/prog_tests/fexit_bpf2bpf.c | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) commit 6644aabbd8973a9f8008cabfd054a36b69a3a3f5 Author: Stanislav Fomichev Date: Thu Aug 4 13:11:39 2022 -0700 bpf: Use proper target btf when exporting attach_btf_obj_id When attaching to program, the program itself might not be attached to anything (and, hence, might not have attach_btf), so we can't unconditionally use 'prog->aux->dst_prog->aux->attach_btf'. Instead, use bpf_prog_get_target_btf to pick proper target BTF: * when attached to dst_prog, use dst_prog->aux->btf * when attached to kernel btf, use prog->aux->attach_btf Fixes: b79c9fc9551b ("bpf: implement BPF_PROG_QUERY for BPF_LSM_CGROUP") Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Hao Luo Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20220804201140.1340684-1-sdf@google.com kernel/bpf/syscall.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit f1d41f7720c89705c20e4335a807b1c518c2e7be Author: Jiri Olsa Date: Tue Aug 2 18:33:24 2022 +0200 mptcp, btf: Add struct mptcp_sock definition when CONFIG_MPTCP is disabled The btf_sock_ids array needs struct mptcp_sock BTF ID for the bpf_skc_to_mptcp_sock helper. When CONFIG_MPTCP is disabled, the 'struct mptcp_sock' is not defined and resolve_btfids will complain with: [...] BTFIDS vmlinux WARN: resolve_btfids: unresolved symbol mptcp_sock [...] Add an empty definition for struct mptcp_sock when CONFIG_MPTCP is disabled. Fixes: 3bc253c2e652 ("bpf: Add bpf_skc_to_mptcp_sock_proto") Signed-off-by: Jiri Olsa Signed-off-by: Daniel Borkmann Reviewed-by: Mat Martineau Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20220802163324.1873044-1-jolsa@kernel.org include/net/mptcp.h | 4 ++++ 1 file changed, 4 insertions(+) commit fda7409a8fcfa457814f8186f2861a9f00008e75 Author: Huacai Chen Date: Mon Aug 8 17:32:05 2022 +0800 irqchip/loongson-pch-pic: Move find_pch_pic() into CONFIG_ACPI MIPS doesn't declare find_pch_pic(), which makes a build warning: >> drivers/irqchip/irq-loongson-pch-pic.c:51:5: warning: no previous prototype for function 'find_pch_pic' [-Wmissing-prototypes] int find_pch_pic(u32 gsi) ^ drivers/irqchip/irq-loongson-pch-pic.c:51:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int find_pch_pic(u32 gsi) ^ static 1 warning generated. Move find_pch_pic() into CONFIG_ACPI which only used by LoongArch to fix the warning. BTW, remove the duplicated declaration of find_pch_pic() in irq.h. Reported-by: kernel test robot Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220808093205.3658485-1-chenhuacai@loongson.cn arch/loongarch/include/asm/irq.h | 1 - drivers/irqchip/irq-loongson-pch-pic.c | 38 +++++++++++++++++----------------- 2 files changed, 19 insertions(+), 20 deletions(-) commit f574f7f839fc1753467b52417591cf2668825a92 Author: Gao Feng Date: Thu Aug 4 23:04:21 2022 +0800 net: bpf: Use the protocol's set_rcvlowat behavior if there is one The commit d1361840f8c5 ("tcp: fix SO_RCVLOWAT and RCVBUF autotuning") add one new (struct proto_ops)->set_rcvlowat method so that a protocol can override the default setsockopt(SO_RCVLOWAT) behavior. The prior bpf codes don't check and invoke the protos's set_rcvlowat, now correct it. Signed-off-by: Gao Feng Signed-off-by: David S. Miller net/core/filter.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7a542bee27c6a57e45c33cbbdc963325fd6493af Author: Xuan Zhuo Date: Thu Aug 4 14:32:48 2022 +0800 virtio_net: fix memory leak inside XPD_TX with mergeable When we call xdp_convert_buff_to_frame() to get xdpf, if it returns NULL, we should check if xdp_page was allocated by xdp_linearize_page(). If it is newly allocated, it should be freed here alone. Just like any other "goto err_xdp". Fixes: 44fa2dbd4759 ("xdp: transition into using xdp_frame for ndo_xdp_xmit") Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f83bb2592482fe94c6eea07a8121763c80f36ce5 Author: Meng Tang Date: Mon Aug 8 15:34:06 2022 +0800 ALSA: hda/conexant: Add quirk for LENOVO 20149 Notebook model There is another LENOVO 20149 (Type1Sku0) Notebook model with CX20590, the device PCI SSID is 17aa:3977, which headphones are not responding, that requires the quirk CXT_PINCFG_LENOVO_NOTEBOOK. Add the corresponding entry to the quirk table. Signed-off-by: Meng Tang Cc: Link: https://lore.kernel.org/r/20220808073406.19460-1-tangmeng@uniontech.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_conexant.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit f01272ee3856e62e8a0f8211e8edf1876a6f5e38 Author: Kalle Valo Date: Mon Aug 1 14:04:40 2022 +0300 wifi: wilc1000: fix spurious inline in wilc_handle_disconnect() Sparse warns: drivers/net/wireless/microchip/wilc1000/hif.h:218:35: error: marked inline, but without a definition Remove the inline, it's not needed. Reported-by: Jakub Kicinski Signed-off-by: Kalle Valo Acked-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220801110440.13144-1-kvalo@kernel.org drivers/net/wireless/microchip/wilc1000/hif.c | 2 +- drivers/net/wireless/microchip/wilc1000/hif.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit baa56dfe2cdad12edb2625b2d454e205943c3402 Author: Veerendranath Jakkam Date: Fri Aug 5 19:22:59 2022 +0530 wifi: cfg80211: Fix validating BSS pointers in __cfg80211_connect_result Driver's SME is allowed to fill either BSSID or BSS pointers in struct cfg80211_connect_resp_params when indicating connect response but a check in __cfg80211_connect_result() is giving unnecessary warning when driver's SME fills only BSSID pointer and not BSS pointer in struct cfg80211_connect_resp_params. In case of mac80211 with auth/assoc path, it is always expected to fill BSS pointers in struct cfg80211_connect_resp_params when calling __cfg80211_connect_result() since cfg80211 must have hold BSS pointers in cfg80211_mlme_assoc(). So, skip the check for the drivers which support cfg80211 connect callback, for example with brcmfmac is one such driver which had the warning: WARNING: CPU: 5 PID: 514 at net/wireless/sme.c:786 __cfg80211_connect_result+0x2fc/0x5c0 [cfg80211] Reported-by: Linus Torvalds Fixes: efbabc116500 ("cfg80211: Indicate MLO connection info in connect and roam callbacks") Signed-off-by: Veerendranath Jakkam [kvalo@kernel.org: add more info to the commit log] Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220805135259.4126630-1-quic_vjakkam@quicinc.com net/wireless/sme.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 91b3c8dbe898df158fd2a84675f3a284ff6666f7 Author: Liang He Date: Tue Jul 26 09:07:22 2022 +0800 drm/meson: Fix refcount bugs in meson_vpu_has_available_connectors() In this function, there are two refcount leak bugs: (1) when breaking out of for_each_endpoint_of_node(), we need call the of_node_put() for the 'ep'; (2) we should call of_node_put() for the reference returned by of_graph_get_remote_port() when it is not used anymore. Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller") Signed-off-by: Liang He Acked-by: Martin Blumenstingl Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20220726010722.1319416-1-windhl@126.com drivers/gpu/drm/meson/meson_drv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4e23eeebb2e57f5a28b36221aa776b5a1122dde5 Merge: 3bc1bc0b59d0 36d4b36b6959 Author: Linus Torvalds Date: Sun Aug 7 17:52:35 2022 -0700 Merge tag 'bitmap-6.0-rc1' of https://github.com/norov/linux Pull bitmap updates from Yury Norov: - fix the duplicated comments on bitmap_to_arr64() (Qu Wenruo) - optimize out non-atomic bitops on compile-time constants (Alexander Lobakin) - cleanup bitmap-related headers (Yury Norov) - x86/olpc: fix 'logical not is only applied to the left hand side' (Alexander Lobakin) - lib/nodemask: inline wrappers around bitmap (Yury Norov) * tag 'bitmap-6.0-rc1' of https://github.com/norov/linux: (26 commits) lib/nodemask: inline next_node_in() and node_random() powerpc: drop dependency on in archrandom.h x86/olpc: fix 'logical not is only applied to the left hand side' lib/cpumask: move some one-line wrappers to header file headers/deps: mm: align MANITAINERS and Docs with new gfp.h structure headers/deps: mm: Split out of headers/deps: mm: Optimize header dependencies lib/cpumask: move trivial wrappers around find_bit to the header lib/cpumask: change return types to unsigned where appropriate cpumask: change return types to bool where appropriate lib/bitmap: change type of bitmap_weight to unsigned long lib/bitmap: change return types to bool where appropriate arm: align find_bit declarations with generic kernel iommu/vt-d: avoid invalid memory access via node_online(NUMA_NO_NODE) lib/test_bitmap: test the tail after bitmap_to_arr64() lib/bitmap: fix off-by-one in bitmap_to_arr64() lib: test_bitmap: add compile-time optimization/evaluations assertions bitmap: don't assume compiler evaluates small mem*() builtins calls net/ice: fix initializing the bitmap in the switch code bitops: let optimize out non-atomic bitops on compile-time constants ... commit f01701cec8cbb94df209e9705b97abd01c151ba1 Author: Julia Lawall Date: Sun Aug 7 18:19:54 2022 +0200 update Coccinelle URL Signed-off-by: Julia Lawall scripts/coccinelle/api/alloc/zalloc-simple.cocci | 2 +- scripts/coccinelle/api/atomic_as_refcounter.cocci | 2 +- scripts/coccinelle/api/check_bq27xxx_data.cocci | 2 +- scripts/coccinelle/api/d_find_alias.cocci | 2 +- scripts/coccinelle/api/err_cast.cocci | 2 +- scripts/coccinelle/api/kstrdup.cocci | 2 +- scripts/coccinelle/api/memdup.cocci | 2 +- scripts/coccinelle/api/memdup_user.cocci | 2 +- scripts/coccinelle/api/pm_runtime.cocci | 2 +- scripts/coccinelle/api/resource_size.cocci | 2 +- scripts/coccinelle/free/clk_put.cocci | 2 +- scripts/coccinelle/free/devm_free.cocci | 2 +- scripts/coccinelle/free/iounmap.cocci | 2 +- scripts/coccinelle/free/kfree.cocci | 2 +- scripts/coccinelle/free/kfreeaddr.cocci | 2 +- scripts/coccinelle/free/pci_free_consistent.cocci | 2 +- scripts/coccinelle/iterators/device_node_continue.cocci | 2 +- scripts/coccinelle/iterators/for_each_child.cocci | 2 +- scripts/coccinelle/iterators/itnull.cocci | 2 +- scripts/coccinelle/iterators/list_entry_update.cocci | 2 +- scripts/coccinelle/iterators/use_after_iter.cocci | 2 +- scripts/coccinelle/locks/call_kern.cocci | 2 +- scripts/coccinelle/locks/double_lock.cocci | 2 +- scripts/coccinelle/locks/flags.cocci | 2 +- scripts/coccinelle/locks/mini_lock.cocci | 2 +- scripts/coccinelle/misc/cstptr.cocci | 2 +- scripts/coccinelle/misc/doubleinit.cocci | 2 +- scripts/coccinelle/misc/ifcol.cocci | 2 +- scripts/coccinelle/misc/newline_in_nl_msg.cocci | 2 +- scripts/coccinelle/misc/noderef.cocci | 2 +- scripts/coccinelle/misc/orplus.cocci | 2 +- scripts/coccinelle/misc/returnvar.cocci | 2 +- scripts/coccinelle/misc/semicolon.cocci | 2 +- scripts/coccinelle/misc/test_addr.cocci | 2 +- scripts/coccinelle/misc/warn.cocci | 2 +- scripts/coccinelle/null/badzero.cocci | 2 +- scripts/coccinelle/null/deref_null.cocci | 2 +- scripts/coccinelle/null/eno.cocci | 2 +- scripts/coccinelle/null/kmerr.cocci | 2 +- scripts/coccinelle/tests/doublebitand.cocci | 2 +- scripts/coccinelle/tests/doubletest.cocci | 2 +- scripts/coccinelle/tests/odd_ptr_err.cocci | 2 +- scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci | 2 +- 43 files changed, 43 insertions(+), 43 deletions(-) commit 18c06cf868bc4e37b9766a91be02453c38f89745 Author: Julia Lawall Date: Sat Jul 16 15:28:10 2022 +0200 coccinelle: free: add version constraint The various functions contain a NULL check starting in v5.15. Signed-off-by: Julia Lawall scripts/coccinelle/free/ifnulldev_put.cocci | 1 + 1 file changed, 1 insertion(+) commit 3bc1bc0b59d04e997db25b84babf459ca1cd80b7 Merge: eb5699ba3155 0d168a58fca3 Author: Linus Torvalds Date: Sun Aug 7 10:50:59 2022 -0700 Merge tag '5.20-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs updates from Steve French: "Mostly cleanup, including smb1 refactoring: - multichannel perf improvement - move additional SMB1 code to not be compiled in when legacy support is disabled. - bug fixes, including one important one for memory leak - various cleanup patches We are still working on and testing some deferred close improvements including an important lease break fix for case when multiple deferred closes are still open, and also some additional perf improvements - those are not included here" * tag '5.20-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6: cifs: update internal module number cifs: alloc_mid function should be marked as static cifs: remove "cifs_" prefix from init/destroy mids functions cifs: remove useless DeleteMidQEntry() cifs: when insecure legacy is disabled shrink amount of SMB1 code cifs: trivial style fixup cifs: fix wrong unlock before return from cifs_tree_connect() cifs: avoid use of global locks for high contention data cifs: remove remaining build warnings cifs: list_for_each() -> list_for_each_entry() cifs: update MAINTAINERS file with reviewers smb2: small refactor in smb2_check_message() cifs: Fix memory leak when using fscache cifs: remove minor build warning cifs: remove some camelCase and also some static build warnings cifs: remove unnecessary (void*) conversions. cifs: remove unnecessary type castings cifs: remove redundant initialization to variable mnt_sign_enabled smb3: check xattr value length earlier commit eb5699ba31558bdb2cee6ebde3d0a68091e47dce Merge: b5a8466d37d3 b99695580bfc Author: Linus Torvalds Date: Sun Aug 7 10:03:24 2022 -0700 Merge tag 'mm-nonmm-stable-2022-08-06-2' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc updates from Andrew Morton: "Updates to various subsystems which I help look after. lib, ocfs2, fatfs, autofs, squashfs, procfs, etc. A relatively small amount of material this time" * tag 'mm-nonmm-stable-2022-08-06-2' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (72 commits) scripts/gdb: ensure the absolute path is generated on initial source MAINTAINERS: kunit: add David Gow as a maintainer of KUnit mailmap: add linux.dev alias for Brendan Higgins mailmap: update Kirill's email profile: setup_profiling_timer() is moslty not implemented ocfs2: fix a typo in a comment ocfs2: use the bitmap API to simplify code ocfs2: remove some useless functions lib/mpi: fix typo 'the the' in comment proc: add some (hopefully) insightful comments bdi: remove enum wb_congested_state kernel/hung_task: fix address space of proc_dohung_task_timeout_secs lib/lzo/lzo1x_compress.c: replace ternary operator with min() and min_t() squashfs: support reading fragments in readahead call squashfs: implement readahead squashfs: always build "file direct" version of page actor Revert "squashfs: provide backing_dev_info in order to disable read-ahead" fs/ocfs2: Fix spelling typo in comment ia64: old_rr4 added under CONFIG_HUGETLB_PAGE proc: fix test for "vsyscall=xonly" boot option ... commit b5a8466d37d30cfcc8015789f4a3f0c44b6c7bc6 Merge: 1612c382ffbd 6ba592fa014f Author: Linus Torvalds Date: Sun Aug 7 09:53:58 2022 -0700 Merge tag 'for-5.20/fbdev-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev updates from Helge Deller: "The two major changes in this patchset corrects VGA modes, color handling and various other smaller fixes in the Atari framebuffer (by Geert Uytterhoeven), and devm_* conversion, platform data fixes and header cleanups in the imxfb driver (by Uwe Kleine-König). Other small patches clean up code in sa1100fb, cirrusfb and omapfb, fix a refcount leak in amba-clcd (by Liang He), and adds parameter checks to arkfb, i740fb, vt8623fb and s3fb (by Zheyu Ma)" * tag 'for-5.20/fbdev-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: (27 commits) video: fbdev: s3fb: Check the size of screen before memset_io() video: fbdev: arkfb: Check the size of screen before memset_io() video: fbdev: vt8623fb: Check the size of screen before memset_io() video: fbdev: i740fb: Check the argument of i740_calc_vclk() video: fbdev: arkfb: Fix a divide-by-zero bug in ark_set_pixclock() video: fbdev: imxfb: fix return value check in imxfb_probe() video: fbdev: sis: fix typos in SiS_GetModeID() video: fbdev: imxfb: Convert request_mem_region + ioremap to devm_ioremap_resource video: fbdev: imxfb: Fold into only user video: fbdev: imxfb: Drop unused symbols from header video: fbdev: imxfb: Drop platform data support video: fbdev: amba-clcd: Fix refcount leak bugs video: fbdev: omapfb: Unexport omap*_update_window_async() video: fbdev: atari: Remove backward bug-compatibility video: fbdev: atari: Remove unused definitions and variables video: fbdev: atari: Fix VGA modes video: fbdev: atari: Fix TT High video mode vertical refresh video: fbdev: atari: Remove unneeded casts to void * video: fbdev: atari: Remove unneeded casts from void * video: fbdev: atari: Fix ext_setcolreg() ... commit 1612c382ffbdf1f673caec76502b1c00e6d35363 Merge: cac03ac368fa de979c83574a Author: Linus Torvalds Date: Sat Aug 6 17:45:37 2022 -0700 Merge tag 'x86-urgent-2022-08-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: - build fix for old(er) binutils - build fix for new GCC - kexec boot environment fix * tag 'x86-urgent-2022-08-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/entry: Build thunk_$(BITS) only if CONFIG_PREEMPTION=y x86/numa: Use cpumask_available instead of hardcoded NULL check x86/bus_lock: Don't assume the init value of DEBUGCTLMSR.BUS_LOCK_DETECT to be zero commit cac03ac368fabff0122853de2422d4e17a32de08 Merge: 592d8362bc25 751d4cbc4387 Author: Linus Torvalds Date: Sat Aug 6 17:34:06 2022 -0700 Merge tag 'sched-urgent-2022-08-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Various fixes: a deadline scheduler fix, a migration fix, a Sparse fix and a comment fix" * tag 'sched-urgent-2022-08-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Do not requeue task on CPU excluded from cpus_mask sched/rt: Fix Sparse warnings due to undefined rt.c declarations exit: Fix typo in comment: s/sub-theads/sub-threads sched, cpuset: Fix dl_cpu_busy() panic due to empty cs->cpus_allowed commit 592d8362bc2526bbb08cf7d258661691e957b5ea Merge: 24cb95869572 99643bab36b6 Author: Linus Torvalds Date: Sat Aug 6 17:28:12 2022 -0700 Merge tag 'perf-urgent-2022-08-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Misc fixes to kprobes and the faddr2line script, plus a cleanup" * tag 'perf-urgent-2022-08-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Fix ';;' typo scripts/faddr2line: Add CONFIG_DEBUG_INFO check scripts/faddr2line: Fix vmlinux detection on arm64 x86/kprobes: Update kcb status flag after singlestepping kprobes: Forbid probing on trampoline and BPF code areas commit 24cb958695724ffb4488ef4f65892c0767bcd2f2 Merge: d77771c92667 953503751a42 Author: Linus Torvalds Date: Sat Aug 6 17:05:21 2022 -0700 Merge tag 's390-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Alexander Gordeev: - Rework copy_oldmem_page() callback to take an iov_iter. This includes a few prerequisite updates and fixes to the oldmem reading code. - Rework cpufeature implementation to allow for various CPU feature indications, which is not only limited to hardware capabilities, but also allows CPU facilities. - Use the cpufeature rework to autoload Ultravisor module when CPU facility 158 is available. - Add ELF note type for encrypted CPU state of a protected virtual CPU. The zgetdump tool from s390-tools package will decrypt the CPU state using a Customer Communication Key and overwrite respective notes to make the data accessible for crash and other debugging tools. - Use vzalloc() instead of vmalloc() + memset() in ChaCha20 crypto test. - Fix incorrect recovery of kretprobe modified return address in stacktrace. - Switch the NMI handler to use generic irqentry_nmi_enter() and irqentry_nmi_exit() helper functions. - Rework the cryptographic Adjunct Processors (AP) pass-through design to support dynamic changes to the AP matrix of a running guest as well as to implement more of the AP architecture. - Minor boot code cleanups. - Grammar and typo fixes to hmcdrv and tape drivers. * tag 's390-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (46 commits) Revert "s390/smp: enforce lowcore protection on CPU restart" Revert "s390/smp: rework absolute lowcore access" Revert "s390/smp,ptdump: add absolute lowcore markers" s390/unwind: fix fgraph return address recovery s390/nmi: use irqentry_nmi_enter()/irqentry_nmi_exit() s390: add ELF note type for encrypted CPU state of a PV VCPU s390/smp,ptdump: add absolute lowcore markers s390/smp: rework absolute lowcore access s390/setup: rearrange absolute lowcore initialization s390/boot: cleanup adjust_to_uv_max() function s390/smp: enforce lowcore protection on CPU restart s390/tape: fix comment typo s390/hmcdrv: fix Kconfig "its" grammar s390/docs: fix warnings for vfio_ap driver doc s390/docs: fix warnings for vfio_ap driver lock usage doc s390/crash: support multi-segment iterators s390/crash: use static swap buffer for copy_to_user_real() s390/crash: move copy_to_user_real() to crash_dump.c s390/zcore: fix race when reading from hardware system area s390/crash: fix incorrect number of bytes to copy to user space ... commit d77771c926671e0362af3fe792391be66072b242 Merge: cae4199f9319 74de14fe05dd Author: Linus Torvalds Date: Sat Aug 6 16:47:19 2022 -0700 Merge tag 'mips_6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Thomas Bogendoerfer: - added support for Netgear WNR3500L v2 - removed support for VR41xx SoC and platforms based on it - cleanups and fixes * tag 'mips_6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (25 commits) MIPS: tlbex: Explicitly compare _PAGE_NO_EXEC against 0 Revert "MIPS: octeon: Remove vestiges of CONFIG_CAVIUM_RESERVE32" MIPS: Introduce CAVIUM_RESERVE32 Kconfig option MIPS: msi-octeon: eliminate kernel-doc warnings MIPS: Fix comment typo MIPS: BMIPS: Utilize cfe_die() for invalid DTB MIPS: CFE: Add cfe_die() MIPS: Fixed __debug_virt_addr_valid() MIPS: BCM47XX: Add support for Netgear WNR3500L v2 MIPS: Remove VR41xx support MIPS: dts: align gpio-key node names with dtschema MIPS: dts: correct gpio-keys names and properties MIPS: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK MIPS: Make phys_to_virt utilize __va() MIPS: vdso: Utilize __pa() for gic_pfn MIPS: mm: Use the bitmap API to allocate bitmaps MIPS: math-emu: Use the bitmap API to allocate bitmaps MIPS: Loongson64: Fix section mismatch warning mips: cavium-octeon: Fix missing of_node_put() in octeon2_usb_clocks_start MIPS: mscc: ocelot: enable FDMA usage ... commit cae4199f9319f42534ee2e2e4aadf183b9bb7f73 Merge: 4d1044fcb996 4cfa6ff24a97 Author: Linus Torvalds Date: Sat Aug 6 16:38:17 2022 -0700 Merge tag 'powerpc-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: - Add support for syscall stack randomization - Add support for atomic operations to the 32 & 64-bit BPF JIT - Full support for KASAN on 64-bit Book3E - Add a watchdog driver for the new PowerVM hypervisor watchdog - Add a number of new selftests for the Power10 PMU support - Add a driver for the PowerVM Platform KeyStore - Increase the NMI watchdog timeout during live partition migration, to avoid timeouts due to increased memory access latency - Add support for using the 'linux,pci-domain' device tree property for PCI domain assignment - Many other small features and fixes Thanks to Alexey Kardashevskiy, Andy Shevchenko, Arnd Bergmann, Athira Rajeev, Bagas Sanjaya, Christophe Leroy, Erhard Furtner, Fabiano Rosas, Greg Kroah-Hartman, Greg Kurz, Haowen Bai, Hari Bathini, Jason A. Donenfeld, Jason Wang, Jiang Jian, Joel Stanley, Juerg Haefliger, Kajol Jain, Kees Cook, Laurent Dufour, Madhavan Srinivasan, Masahiro Yamada, Maxime Bizon, Miaoqian Lin, Murilo Opsfelder Araújo, Nathan Lynch, Naveen N. Rao, Nayna Jain, Nicholas Piggin, Ning Qiang, Pali Rohár, Petr Mladek, Rashmica Gupta, Sachin Sant, Scott Cheloha, Segher Boessenkool, Stephen Rothwell, Uwe Kleine-König, Wolfram Sang, Xiu Jianfeng, and Zhouyi Zhou. * tag 'powerpc-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (191 commits) powerpc/64e: Fix kexec build error EDAC/ppc_4xx: Include required of_irq header directly powerpc/pci: Fix PHB numbering when using opal-phbid powerpc/64: Init jump labels before parse_early_param() selftests/powerpc: Avoid GCC 12 uninitialised variable warning powerpc/cell/axon_msi: Fix refcount leak in setup_msi_msg_address powerpc/xive: Fix refcount leak in xive_get_max_prio powerpc/spufs: Fix refcount leak in spufs_init_isolated_loader powerpc/perf: Include caps feature for power10 DD1 version powerpc: add support for syscall stack randomization powerpc: Move system_call_exception() to syscall.c powerpc/powernv: rename remaining rng powernv_ functions to pnv_ powerpc/powernv/kvm: Use darn for H_RANDOM on Power9 powerpc/powernv: Avoid crashing if rng is NULL selftests/powerpc: Fix matrix multiply assist test powerpc/signal: Update comment for clarity powerpc: make facility_unavailable_exception 64s powerpc/platforms/83xx/suspend: Remove write-only global variable powerpc/platforms/83xx/suspend: Prevent unloading the driver powerpc/platforms/83xx/suspend: Reorder to get rid of a forward declaration ... commit 4d1044fcb996e8de9b9ab392f4a767890e45202d Merge: ea0c39260d0c ba6cfef057e1 Author: Linus Torvalds Date: Sat Aug 6 15:04:48 2022 -0700 Merge tag 'riscv-for-linus-5.20-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Palmer Dabbelt: - Enabling the FPU is now a static_key - Improvements to the Svpbmt support - CPU topology bindings for a handful of systems - Support for systems with 64-bit hart IDs - Many settings have been enabled in the defconfig, including both support for the StarFive systems and many of the Docker requirements There are also a handful of cleanups and improvements, as usual. * tag 'riscv-for-linus-5.20-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (28 commits) riscv: enable Docker requirements in defconfig riscv: convert the t-head pbmt errata to use the __nops macro riscv: introduce nops and __nops macros for NOP sequences RISC-V: Add fast call path of crash_kexec() riscv: mmap with PROT_WRITE but no PROT_READ is invalid riscv/efi_stub: Add 64bit boot-hartid support on RV64 riscv: cpu: Add 64bit hartid support on RV64 riscv: smp: Add 64bit hartid support on RV64 riscv: spinwait: Fix hartid variable type riscv: cpu_ops_sbi: Add 64bit hartid support on RV64 riscv: dts: sifive: "fix" pmic watchdog node name riscv: dts: canaan: Add k210 topology information riscv: dts: sifive: Add fu740 topology information riscv: dts: sifive: Add fu540 topology information riscv: dts: starfive: Add JH7100 CPU topology RISC-V: Add CONFIG_{NON,}PORTABLE riscv: config: enable SOC_STARFIVE in defconfig riscv: dts: microchip: Add mpfs' topology information riscv: Kconfig.socs: Add comments riscv: Kconfig.erratas: Add comments ... commit ea0c39260d0c1d8e11d89c9d42ca48e172d1c868 Merge: c42b729ef6bf aa7aeee16948 Author: Linus Torvalds Date: Sat Aug 6 14:48:54 2022 -0700 Merge tag '9p-for-5.20' of https://github.com/martinetd/linux Pull 9p updates from Dominique Martinet: - a couple of fixes - add a tracepoint for fid refcounting - some cleanup/followup on fid lookup - some cleanup around req refcounting * tag '9p-for-5.20' of https://github.com/martinetd/linux: net/9p: Initialize the iounit field during fid creation net: 9p: fix refcount leak in p9_read_work() error handling 9p: roll p9_tag_remove into p9_req_put 9p: Add client parameter to p9_req_put() 9p: Drop kref usage 9p: Fix some kernel-doc comments 9p fid refcount: cleanup p9_fid_put calls 9p fid refcount: add a 9p_fid_ref tracepoint 9p fid refcount: add p9_fid_get/put wrappers 9p: Fix minor typo in code comment 9p: Remove unnecessary variable for old fids while walking from d_parent 9p: Make the path walk logic more clear about when cloning is required 9p: Track the root fid with its own variable during lookups commit c42b729ef6bfc72fed56f81f589a39298b9d12c8 Merge: af3e9579ecfb 446279168e03 Author: Linus Torvalds Date: Sat Aug 6 14:44:49 2022 -0700 Merge tag 'gfs2-v5.19-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Andreas Gruenbacher: - Instantiate glocks ouside of the glock state engine, in the contect of the process taking the glock. This moves unnecessary complexity out of the core glock code. Clean up the instantiate logic to be more sensible. - In gfs2_glock_async_wait(), cancel pending locking request upon failure. Make sure all glocks are left in a consistent state. - Various other minor cleanups and fixes. * tag 'gfs2-v5.19-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: List traversal in do_promote is safe gfs2: do_promote glock holder stealing fix gfs2: Use better variable name gfs2: Make go_instantiate take a glock gfs2: Add new go_held glock operation gfs2: Revert 'Fix "truncate in progress" hang' gfs2: Instantiate glocks ouside of glock state engine gfs2: Fix up gfs2_glock_async_wait gfs2: Minor gfs2_glock_nq_m cleanup gfs2: Fix spelling mistake in comment gfs2: Rewrap overlong comment in do_promote gfs2: Remove redundant NULL check before kfree commit af3e9579ecfbe1796334bb25a2f0a6437983673a Author: Linus Torvalds Date: Sat Aug 6 13:24:56 2022 -0700 Revert "iommu/dma: Add config for PCI SAC address trick" This reverts commit 4bf7fda4dce22214c70c49960b1b6438e6260b67. It turns out that it was hopelessly naive to think that this would work, considering that we've always done this. The first machine I actually tested this on broke at bootup, getting to Reached target cryptsetup.target - Local Encrypted Volumes. and then hanging. It's unclear what actually fails, since there's a lot else going on around that time (eg amdgpu probing also happens around that same time, but it could be some other random init thing that didn't complete earlier and just caused the boot to hang at that point). The expectations that we should default to some unsafe and untested mode seems entirely unfounded, and the belief that this wouldn't affect modern systems is clearly entirely false. The machine in question is about two years old, so it's not exactly shiny, but it's also not some dusty old museum piece PDP-11 in a closet. Cc: Robin Murphy Cc: Christoph Hellwig Cc: John Garry Cc: Joerg Roedel Signed-off-by: Linus Torvalds drivers/iommu/Kconfig | 26 -------------------------- drivers/iommu/dma-iommu.c | 2 +- 2 files changed, 1 insertion(+), 27 deletions(-) commit c269fca7b37a08b7eec6f6b79a0abf1d0a245acb Author: John Johansen Date: Sat Aug 6 12:07:07 2022 -0700 apparmor: Update MAINTAINERS file with new email address Add the apparmor.net email address that the project is transitioning emails to. Signed-off-by: John Johansen MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 20cf903a0c407cef19300e5c85a03c82593bde36 Merge: c993e07be023 12907efde6ad Author: Linus Torvalds Date: Sat Aug 6 11:09:55 2022 -0700 Merge tag 'for-6.0/dm-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull more device mapper updates from Mike Snitzer: - Add flags argument to dm_bufio_client_create and introduce DM_BUFIO_CLIENT_NO_SLEEP flag to have dm-bufio use spinlock rather than mutex for its locking. - Add optional "try_verify_in_tasklet" feature to DM verity target. This feature gives users the option to improve IO latency by using a tasklet to verify, using hashes in bufio's cache, rather than wait to schedule a work item via workqueue. But if there is a bufio cache miss, or an error, then the tasklet will fallback to using workqueue. - Incremental changes to both dm-bufio and the DM verity target to use jump_label to minimize cost of branching associated with the niche "try_verify_in_tasklet" feature. DM-bufio in particular is used by quite a few other DM targets so it doesn't make sense to incur additional bufio cost in those targets purely for the benefit of this niche verity feature if the feature isn't ever used. - Optimize verity_verify_io, which is used by both workqueue and tasklet based verification, if FEC is not configured or tasklet based verification isn't used. - Remove DM verity target's verify_wq's use of the WQ_CPU_INTENSIVE flag since it uses WQ_UNBOUND. Also, use the WQ_HIGHPRI flag if "try_verify_in_tasklet" is specified. * tag 'for-6.0/dm-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm verity: have verify_wq use WQ_HIGHPRI if "try_verify_in_tasklet" dm verity: remove WQ_CPU_INTENSIVE flag since using WQ_UNBOUND dm verity: only copy bvec_iter in verity_verify_io if in_tasklet dm verity: optimize verity_verify_io if FEC not configured dm verity: conditionally enable branching for "try_verify_in_tasklet" dm bufio: conditionally enable branching for DM_BUFIO_CLIENT_NO_SLEEP dm verity: allow optional args to alter primary args handling dm verity: Add optional "try_verify_in_tasklet" feature dm bufio: Add DM_BUFIO_CLIENT_NO_SLEEP flag dm bufio: Add flags argument to dm_bufio_client_create commit c993e07be023acdeec8e84e2e0743c52adb5fc94 Merge: 1d239c1eb873 5c850d31880e Author: Linus Torvalds Date: Sat Aug 6 10:56:45 2022 -0700 Merge tag 'dma-mapping-5.20-2022-08-06' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping updates from Christoph Hellwig: - convert arm32 to the common dma-direct code (Arnd Bergmann, Robin Murphy, Christoph Hellwig) - restructure the PCIe peer to peer mapping support (Logan Gunthorpe) - allow the IOMMU code to communicate an optional DMA mapping length and use that in scsi and libata (John Garry) - split the global swiotlb lock (Tianyu Lan) - various fixes and cleanup (Chao Gao, Dan Carpenter, Dongli Zhang, Lukas Bulwahn, Robin Murphy) * tag 'dma-mapping-5.20-2022-08-06' of git://git.infradead.org/users/hch/dma-mapping: (45 commits) swiotlb: fix passing local variable to debugfs_create_ulong() dma-mapping: reformat comment to suppress htmldoc warning PCI/P2PDMA: Remove pci_p2pdma_[un]map_sg() RDMA/rw: drop pci_p2pdma_[un]map_sg() RDMA/core: introduce ib_dma_pci_p2p_dma_supported() nvme-pci: convert to using dma_map_sgtable() nvme-pci: check DMA ops when indicating support for PCI P2PDMA iommu/dma: support PCI P2PDMA pages in dma-iommu map_sg iommu: Explicitly skip bus address marked segments in __iommu_map_sg() dma-mapping: add flags to dma_map_ops to indicate PCI P2PDMA support dma-direct: support PCI P2PDMA pages in dma-direct map_sg dma-mapping: allow EREMOTEIO return code for P2PDMA transfers PCI/P2PDMA: Introduce helpers for dma_map_sg implementations PCI/P2PDMA: Attempt to set map_type if it has not been set lib/scatterlist: add flag for indicating P2PDMA segments in an SGL swiotlb: clean up some coding style and minor issues dma-mapping: update comment after dmabounce removal scsi: sd: Add a comment about limiting max_sectors to shost optimal limit ata: libata-scsi: cap ata_device->max_sectors according to shost->max_sectors scsi: scsi_transport_sas: cap shost opt_sectors according to DMA optimal limit ... commit 1d239c1eb873c7d6c6cbc80d68330c939fd86136 Merge: 75b9fcb530ed c10100a416c1 Author: Linus Torvalds Date: Sat Aug 6 10:42:38 2022 -0700 Merge tag 'iommu-updates-v5.20-or-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu updates from Joerg Roedel: - The most intrusive patch is small and changes the default allocation policy for DMA addresses. Before the change the allocator tried its best to find an address in the first 4GB. But that lead to performance problems when that space gets exhaused, and since most devices are capable of 64-bit DMA these days, we changed it to search in the full DMA-mask range from the beginning. This change has the potential to uncover bugs elsewhere, in the kernel or the hardware. There is a Kconfig option and a command line option to restore the old behavior, but none of them is enabled by default. - Add Robin Murphy as reviewer of IOMMU code and maintainer for the dma-iommu and iova code - Chaning IOVA magazine size from 1032 to 1024 bytes to save memory - Some core code cleanups and dead-code removal - Support for ACPI IORT RMR node - Support for multiple PCI domains in the AMD-Vi driver - ARM SMMU changes from Will Deacon: - Add even more Qualcomm device-tree compatible strings - Support dumping of IMP DEF Qualcomm registers on TLB sync timeout - Fix reference count leak on device tree node in Qualcomm driver - Intel VT-d driver updates from Lu Baolu: - Make intel-iommu.h private - Optimize the use of two locks - Extend the driver to support large-scale platforms - Cleanup some dead code - MediaTek IOMMU refactoring and support for TTBR up to 35bit - Basic support for Exynos SysMMU v7 - VirtIO IOMMU driver gets a map/unmap_pages() implementation - Other smaller cleanups and fixes * tag 'iommu-updates-v5.20-or-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (116 commits) iommu/amd: Fix compile warning in init code iommu/amd: Add support for AVIC when SNP is enabled iommu/amd: Simplify and Consolidate Virtual APIC (AVIC) Enablement ACPI/IORT: Fix build error implicit-function-declaration drivers: iommu: fix clang -wformat warning iommu/arm-smmu: qcom_iommu: Add of_node_put() when breaking out of loop iommu/arm-smmu-qcom: Add SM6375 SMMU compatible dt-bindings: arm-smmu: Add compatible for Qualcomm SM6375 MAINTAINERS: Add Robin Murphy as IOMMU SUBSYTEM reviewer iommu/amd: Do not support IOMMUv2 APIs when SNP is enabled iommu/amd: Do not support IOMMU_DOMAIN_IDENTITY after SNP is enabled iommu/amd: Set translation valid bit only when IO page tables are in use iommu/amd: Introduce function to check and enable SNP iommu/amd: Globally detect SNP support iommu/amd: Process all IVHDs before enabling IOMMU features iommu/amd: Introduce global variable for storing common EFR and EFR2 iommu/amd: Introduce Support for Extended Feature 2 Register iommu/amd: Change macro for IOMMU control register bit shift to decimal value iommu/exynos: Enable default VM instance on SysMMU v7 iommu/exynos: Add SysMMU v7 register set ... commit 75b9fcb530edc9731bd539353ec7ddb6c8366a25 Merge: 613b2a82f2e0 fe201f6fa4cf Author: Linus Torvalds Date: Sat Aug 6 10:33:34 2022 -0700 Merge tag 'backlight-next-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "Core Framework: - Change maintainer email address Fix-ups: - Obtain OCP level from Device Tree; rt4831-backlight - DT fix-ups/conversions; richtek,rt4831-backlight - Remove unused code / functionatlity; platform_lcd - Switch to atomic PWM API; lp855x_bl * tag 'backlight-next-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: MAINTAINERS: Use Lee Jones' kernel.org address for Backlight submissions backlight: lp855x: Switch to atomic PWM API dt-bindings: backlight: Update Lee Jones' email address Revert "drivers/video/backlight/platform_lcd.c: add support for device tree based probe" backlight: rt4831: Apply ocp level from devicetree dt-bindings: backlight: rt4831: Add the new ocp level property commit 613b2a82f2e06fc5f75c2921e9908adfa7cb9024 Merge: 668c3c237f5d ae4ccaed3a06 Author: Linus Torvalds Date: Sat Aug 6 10:25:16 2022 -0700 Merge tag 'mfd-next-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "Core Framework: - Change maintainer email address - Use acpi_dev_for_each_child() helper to walk the ACPI list New Device Support: - BCM2711 RPiVid ASB in Broadcom BCM2835 - MT8195 dual-core RISC-V MCU in Chrome OS Embedded Controller - Regulator, RTC and Keys in MediaTek MT6357 PMIC - GPIO in X-Powers AXP20x PMIC - MT6331 and MT6332 in MediaTek MT6357 PMIC - Intel Meteor Lake-P PCI in Intel LPSS PCI New Functionality: - Add support for non-ACPI platforms; lpc_ich Fix-ups: - Use platform data instead of hard-coded values; bcm2835-pm - Make use of BIT/GENMASK macros; intel_soc_pmic_bxtwc - Use dev_err_probe() helper; intel_soc_pmic_chtwc, intel_soc_pmic_bxtwc - Use provided generic APIs / helpers; lpc_ich - Clean-up .remove() return values; asic3, t7l66xb, tc6387xb, tc6393xb - Use correct formatting specifiers; syscon - Replace sprintf() with sysfs_emit(); intel_soc_pmic_bxtwc - Automatically detect and fill USB endpoint pointers; dln2 - Use more appropriate dev/platform/spi resources APIs; intel_soc_pmic_bxtwc - Make use of pm_sleep_ptr(); intel_soc_pmic_chtwc, intel_soc_pmic_bxtwc - Improve error handling; intel_soc_pmic_bxtwc - Use core driver API to create groups; intel_soc_pmic_bxtwc - Kconfig fix-ups; MFD_SUN6I_PRCM - Admin: whitespace/email addresses/etc; max77714, db8500-prcmu, ipaq-micro, intel_soc_pmic_bxtwc - Remove duplicate/unused code/functionality; lpc_ich, twl-core, qcom-pm8008, intel_soc_pmic_bxtwc - DT fix-ups / conversions; da9063, ti,j721e-system-controller, st,stm32-timers, mt6397, qcom,tcsr, mps,mp2629, qcom-pm8xxx, fsl,imx8qxp-csr Bug Fixes: - Fix of_node reference leak; max77620" * tag 'mfd-next-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (49 commits) dt-bindings: mfd: stm32-timers: Move fixed string node names under 'properties' dt-bindings: mfd: st,stm32-timers: Correct 'resets' property name dt-bindings: mfd: syscon: Update Lee Jones' email address MAINTAINERS: Use Lee Jones' kernel.org address for Syscon submissions MAINTAINERS: Use Lee Jones' kernel.org address for MFD submissions mfd: sun6i-prcm: Update Kconfig description mfd: intel_soc_pmic_bxtwc: Fix spelling in the comment mfd: intel_soc_pmic_bxtwc: Drop unneeded casting mfd: intel_soc_pmic_bxtwc: Use sysfs_emit() instead of sprintf() mfd: intel_soc_pmic_bxtwc: Use bits.h macros for all masks mfd: intel_soc_pmic_bxtwc: Drop redundant ACPI_PTR() mfd: intel_soc_pmic_bxtwc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc mfd: intel_soc_pmic_bxtwc: Extend use of temporary variable for struct device mfd: intel_soc_pmic_bxtwc: Use dev_err_probe() mfd: intel_soc_pmic_bxtwc: Convert to use platform_get/set_drvdata() mfd: intel_soc_pmic_bxtwc: Create sysfs attributes using core driver's facility mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() mfd: intel-lpss: Add Intel Meteor Lake-P PCI IDs mfd: mt6397: Add basic support for MT6331+MT6332 PMIC mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells ... commit 668c3c237f5ddc2889879b08f26d2374231f3287 Merge: f20c95b46b8f 24df5428ef9d Author: Linus Torvalds Date: Sat Aug 6 10:19:51 2022 -0700 Merge tag 'sound-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "As the diffstat shows, we've had lots of developments in a wide range at this time; the majority of changes are about ASoC, including subsystem-wide cleanups, continued SOF / Intel updates and a bunch of new drivers (as usual), while there have been some significant (but almost invisible) improvements in ALSA core side, too. Below are some highlights: Core: - Faster lookups of control elements with Xarray; normal user won't notice, but on the devices with tons of control elements, it can be visibly faster - Support for input validation for controls; this will harden for badly written drivers in general with a slight overhead - Deferred async signal handling for working around the potential deadlocks - Cleanup / refactoring raw MIDI locking code ASoC: - Restructing of the set_fmt() callbacks for making things clearer in situations like CODEC to CODEC links - Clean up and modernizing the DAI naming scheme setups - Merge of more of the Intel AVS driver stack, including some board integrations - New version 4 mechanism for communication with SOF DSPs - Suppoort for dynamically selecting the PLL to use at runtime on i.MX platforms - Improvements for CODEC to CODEC support in the generic cards - Support for AMD Jadeite and various machines, AMD RPL, Intel MetorLake DSPs, Mediatek MT8186 DSPs and MT6366, nVidia Tegra MDDRC, OPE and PEQ, NXP TFA9890, Qualcomm SDM845, WCD9335 and WAS883x, and Texas Instruments TAS2780 HD- and USB-audio: - Continued improvement for CS35L41 (sub)codec support - More quirks for various devices (HP, Lenovo, Dell, Clevo)" * tag 'sound-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (778 commits) ALSA: hda/realtek: Add quirk for HP Spectre x360 15-eb0xxx ALSA: line6: Replace sprintf() with sysfs_emit() ALSA: hda: Replace sprintf() with sysfs_emit() ALSA: pcm: Replace sprintf() with sysfs_emit() ALSA: core: Replace scnprintf() with sysfs_emit() ALSA: control-led: Replace sprintf() with sysfs_emit() ALSA: aoa: Replace sprintf() with sysfs_emit() ALSA: ac97: Replace sprintf() with sysfs_emit() ALSA: hda/realtek: Add quirk for Clevo NV45PZ ALSA: hda/realtek: Add quirk for Lenovo Yoga9 14IAP7 ALSA: control: Use deferred fasync helper ALSA: pcm: Use deferred fasync helper ALSA: timer: Use deferred fasync helper ALSA: core: Add async signal helpers ASoC: q6asm: use kcalloc() instead of kzalloc() ACPI: scan: Add CLSA0101 Laptop Support ALSA: hda: cs35l41: Support CLSA0101 ALSA: hda: cs35l41: Use the CS35L41 HDA internal define ASoC: dt-bindings: use spi-peripheral-props.yaml ASoC: codecs: va-macro: use fsgen as clock ... commit f20c95b46b8fa3ad34b3ea2e134337f88591468b Merge: 48a577dc1b09 863ed94c589f Author: Linus Torvalds Date: Sat Aug 6 09:43:02 2022 -0700 Merge tag 'tpmdd-next-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm updates from Jarkko Sakkinen: "Mostly TPM and also few keyring fixes" * tag 'tpmdd-next-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm: Add check for Failure mode for TPM2 modules tpm: eventlog: Fix section mismatch for DEBUG_SECTION_MISMATCH tpm: fix platform_no_drv_owner.cocci warning KEYS: asymmetric: enforce SM2 signature use pkey algo pkcs7: support EC-RDSA/streebog in SignerInfo pkcs7: parser support SM2 and SM3 algorithms combination sign-file: Fix confusing error messages X.509: Support parsing certificate using SM2 algorithm tpm: Add tpm_tis_i2c backend for tpm_tis_core tpm: Add tpm_tis_verify_crc to the tpm_tis_phy_ops protocol layer dt-bindings: trivial-devices: Add Infineon SLB9673 TPM tpm: Add upgrade/reduced mode support for TPM1.2 modules commit 48a577dc1b09c1d35f2b8b37e7fa9a7169d50f5d Merge: 033a94412b60 bb8bc52e7578 Author: Linus Torvalds Date: Sat Aug 6 09:36:08 2022 -0700 Merge tag 'perf-tools-for-v6.0-2022-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools updates from Arnaldo Carvalho de Melo: - Introduce 'perf lock contention' subtool, using new lock contention tracepoints and using BPF for in kernel aggregation and then userspace processing using the perf tooling infrastructure for resolving symbols, target specification, etc. Since the new lock contention tracepoints don't provide lock names, get up to 8 stack traces and display the first non-lock function symbol name as a caller: $ perf lock report -F acquired,contended,avg_wait,wait_total Name acquired contended avg wait total wait update_blocked_a... 40 40 3.61 us 144.45 us kernfs_fop_open+... 5 5 3.64 us 18.18 us _nohz_idle_balance 3 3 2.65 us 7.95 us tick_do_update_j... 1 1 6.04 us 6.04 us ep_scan_ready_list 1 1 3.93 us 3.93 us Supports the usual 'perf record' + 'perf report' workflow as well as a BCC/bpftrace like mode where you start the tool and then press control+C to get results: $ sudo perf lock contention -b ^C contended total wait max wait avg wait type caller 42 192.67 us 13.64 us 4.59 us spinlock queue_work_on+0x20 23 85.54 us 10.28 us 3.72 us spinlock worker_thread+0x14a 6 13.92 us 6.51 us 2.32 us mutex kernfs_iop_permission+0x30 3 11.59 us 10.04 us 3.86 us mutex kernfs_dop_revalidate+0x3c 1 7.52 us 7.52 us 7.52 us spinlock kthread+0x115 1 7.24 us 7.24 us 7.24 us rwlock:W sys_epoll_wait+0x148 2 7.08 us 3.99 us 3.54 us spinlock delayed_work_timer_fn+0x1b 1 6.41 us 6.41 us 6.41 us spinlock idle_balance+0xa06 2 2.50 us 1.83 us 1.25 us mutex kernfs_iop_lookup+0x2f 1 1.71 us 1.71 us 1.71 us mutex kernfs_iop_getattr+0x2c ... - Add new 'perf kwork' tool to trace time properties of kernel work (such as softirq, and workqueue), uses eBPF skeletons to collect info in kernel space, aggregating data that then gets processed by the userspace tool, e.g.: # perf kwork report Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | ---------------------------------------------------------------------------------------------------- nvme0q5:130 | 004 | 1.101 ms | 49 | 0.051 ms | 26035.056403 s | 26035.056455 s | amdgpu:162 | 002 | 0.176 ms | 9 | 0.046 ms | 26035.268020 s | 26035.268066 s | nvme0q24:149 | 023 | 0.161 ms | 55 | 0.009 ms | 26035.655280 s | 26035.655288 s | nvme0q20:145 | 019 | 0.090 ms | 33 | 0.014 ms | 26035.939018 s | 26035.939032 s | nvme0q31:156 | 030 | 0.075 ms | 21 | 0.010 ms | 26035.052237 s | 26035.052247 s | nvme0q8:133 | 007 | 0.062 ms | 12 | 0.021 ms | 26035.416840 s | 26035.416861 s | nvme0q6:131 | 005 | 0.054 ms | 22 | 0.010 ms | 26035.199919 s | 26035.199929 s | nvme0q19:144 | 018 | 0.052 ms | 14 | 0.010 ms | 26035.110615 s | 26035.110625 s | nvme0q7:132 | 006 | 0.049 ms | 13 | 0.007 ms | 26035.125180 s | 26035.125187 s | nvme0q18:143 | 017 | 0.033 ms | 14 | 0.007 ms | 26035.169698 s | 26035.169705 s | nvme0q17:142 | 016 | 0.013 ms | 1 | 0.013 ms | 26035.565147 s | 26035.565160 s | enp5s0-rx-0:164 | 006 | 0.004 ms | 4 | 0.002 ms | 26035.928882 s | 26035.928884 s | enp5s0-tx-0:166 | 008 | 0.003 ms | 3 | 0.002 ms | 26035.870923 s | 26035.870925 s | -------------------------------------------------------------------------------------------------------- See commit log messages for more examples with extra options to limit the events time window, etc. - Add support for new AMD IBS (Instruction Based Sampling) features: With the DataSrc extensions, the source of data can be decoded among: - Local L3 or other L1/L2 in CCX. - A peer cache in a near CCX. - Data returned from DRAM. - A peer cache in a far CCX. - DRAM address map with "long latency" bit set. - Data returned from MMIO/Config/PCI/APIC. - Extension Memory (S-Link, GenZ, etc - identified by the CS target and/or address map at DF's choice). - Peer Agent Memory. - Support hardware tracing with Intel PT on guest machines, combining the traces with the ones in the host machine. - Add a "-m" option to 'perf buildid-list' to show kernel and modules build-ids, to display all of the information needed to do external symbolization of kernel stack traces, such as those collected by bpf_get_stackid(). - Add arch TSC frequency information to perf.data file headers. - Handle changes in the binutils disassembler function signatures in perf, bpftool and bpf_jit_disasm (Acked by the bpftool maintainer). - Fix building the perf perl binding with the newest gcc in distros such as fedora rawhide, where some new warnings were breaking the build as perf uses -Werror. - Add 'perf test' entry for branch stack sampling. - Add ARM SPE system wide 'perf test' entry. - Add user space counter reading tests to 'perf test'. - Build with python3 by default, if available. - Add python converter script for the vendor JSON event files. - Update vendor JSON files for most Intel cores. - Add vendor JSON File for Intel meteorlake. - Add Arm Cortex-A78C and X1C JSON vendor event files. - Add workaround to symbol address reading from ELF files without phdr, falling back to the previoous equation. - Convert legacy map definition to BTF-defined in the perf BPF script test. - Rework prologue generation code to stop using libbpf deprecated APIs. - Add default hybrid events for 'perf stat' on x86. - Add topdown metrics in the default 'perf stat' on the hybrid machines (big/little cores). - Prefer sampled CPU when exporting JSON in 'perf data convert' - Fix ('perf stat CSV output linter') and ("Check branch stack sampling") 'perf test' entries on s390. * tag 'perf-tools-for-v6.0-2022-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (169 commits) perf stat: Refactor __run_perf_stat() common code perf lock: Print the number of lost entries for BPF perf lock: Add --map-nr-entries option perf lock: Introduce struct lock_contention perf scripting python: Do not build fail on deprecation warnings genelf: Use HAVE_LIBCRYPTO_SUPPORT, not the never defined HAVE_LIBCRYPTO perf build: Suppress openssl v3 deprecation warnings in libcrypto feature test perf parse-events: Break out tracepoint and printing perf parse-events: Don't #define YY_EXTRA_TYPE tools bpftool: Don't display disassembler-four-args feature test tools bpftool: Fix compilation error with new binutils tools bpf_jit_disasm: Don't display disassembler-four-args feature test tools bpf_jit_disasm: Fix compilation error with new binutils tools perf: Fix compilation error with new binutils tools include: add dis-asm-compat.h to handle version differences tools build: Don't display disassembler-four-args feature test tools build: Add feature test for init_disassemble_info API changes perf test: Add ARM SPE system wide test perf tools: Rework prologue generation code perf bpf: Convert legacy map definition to BTF-defined ... commit 033a94412b6065a21c2ede2f37867e747a84563f Merge: a9cf69d0e7f2 55eb9a6c8bf3 Author: Linus Torvalds Date: Sat Aug 6 09:19:42 2022 -0700 Merge tag 'livepatching-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching Pull livepatching update from Petr Mladek: - Make a selftest more reliable * tag 'livepatching-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: selftests/livepatch: better synchronize test_klp_callbacks_busy commit a9cf69d0e7f2051cca1c08ed9b34fe79da951ee9 Merge: 6614a3c3164a 099fd2c20207 Author: Linus Torvalds Date: Sat Aug 6 08:59:35 2022 -0700 Merge tag 'vfio-v6.0-rc1' of https://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Cleanup use of extern in function prototypes (Alex Williamson) - Simplify bus_type usage and convert to device IOMMU interfaces (Robin Murphy) - Check missed return value and fix comment typos (Bo Liu) - Split migration ops from device ops and fix races in mlx5 migration support (Yishai Hadas) - Fix missed return value check in noiommu support (Liam Ni) - Hardening to clear buffer pointer to avoid use-after-free (Schspa Shi) - Remove requirement that only the same mm can unmap a previously mapped range (Li Zhe) - Adjust semaphore release vs device open counter (Yi Liu) - Remove unused arg from SPAPR support code (Deming Wang) - Rework vfio-ccw driver to better fit new mdev framework (Eric Farman, Michael Kawano) - Replace DMA unmap notifier with callbacks (Jason Gunthorpe) - Clarify SPAPR support comment relative to iommu_ops (Alexey Kardashevskiy) - Revise page pinning API towards compatibility with future iommufd support (Nicolin Chen) - Resolve issues in vfio-ccw, including use of DMA unmap callback (Eric Farman) * tag 'vfio-v6.0-rc1' of https://github.com/awilliam/linux-vfio: (40 commits) vfio/pci: fix the wrong word vfio/ccw: Check return code from subchannel quiesce vfio/ccw: Remove FSM Close from remove handlers vfio/ccw: Add length to DMA_UNMAP checks vfio: Replace phys_pfn with pages for vfio_pin_pages() vfio/ccw: Add kmap_local_page() for memcpy vfio: Rename user_iova of vfio_dma_rw() vfio/ccw: Change pa_pfn list to pa_iova list vfio/ap: Change saved_pfn to saved_iova vfio: Pass in starting IOVA to vfio_pin/unpin_pages API vfio/ccw: Only pass in contiguous pages vfio/ap: Pass in physical address of ind to ap_aqic() drm/i915/gvt: Replace roundup with DIV_ROUND_UP vfio: Make vfio_unpin_pages() return void vfio/spapr_tce: Fix the comment vfio: Replace the iommu notifier with a device list vfio: Replace the DMA unmapping notifier with a callback vfio/ccw: Move FSM open/close to MDEV open/close vfio/ccw: Refactor vfio_ccw_mdev_reset vfio/ccw: Create a CLOSE FSM event ... commit 221f9d9cdf429df8c3843b4291f4f412fde11543 Author: Jiri Slaby Date: Tue Jul 19 10:56:20 2022 +0200 posix-timers: Make do_clock_gettime() static do_clock_gettime() is used only in posix-stubs.c, so make it static. It avoids a compiler warning too: time/posix-stubs.c:73:5: warning: no previous prototype for ‘do_clock_gettime’ [-Wmissing-prototypes] Signed-off-by: Jiri Slaby Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20220719085620.30567-1-jslaby@suse.cz kernel/time/posix-stubs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 953503751a426413ea8aee2299ae3ee971b70d9b Author: Alexander Gordeev Date: Sat Aug 6 09:29:46 2022 +0200 Revert "s390/smp: enforce lowcore protection on CPU restart" This reverts commit 6f5c672d17f583b081e283927f5040f726c54598. This breaks normal crash dump when CPU0 is offline. Signed-off-by: Alexander Gordeev arch/s390/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e441f61f509617a3f57fcb156b7aa2870cc8752 Author: Alexander Gordeev Date: Sat Aug 6 09:24:07 2022 +0200 Revert "s390/smp: rework absolute lowcore access" This reverts commit 7d06fed77b7d8fc9f6cc41b4e3f2823d32532ad8. This introduced vmem_mutex locking from vmem_map_4k_page() function called from smp_reinit_ipl_cpu() with interrupts disabled. While it is a pre-SMP early initcall no other CPUs running in parallel nor other code taking vmem_mutex on this boot stage - it still needs to be fixed. Signed-off-by: Alexander Gordeev arch/s390/boot/startup.c | 5 +-- arch/s390/include/asm/abs_lowcore.h | 17 ------- arch/s390/include/asm/pgtable.h | 2 - arch/s390/include/asm/processor.h | 15 +++++++ arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/abs_lowcore.c | 88 ------------------------------------- arch/s390/kernel/ipl.c | 9 +--- arch/s390/kernel/machine_kexec.c | 8 +--- arch/s390/kernel/os_info.c | 9 ++-- arch/s390/kernel/setup.c | 34 ++++++-------- arch/s390/kernel/smp.c | 34 ++++---------- arch/s390/mm/init.c | 2 +- arch/s390/mm/maccess.c | 67 +++++++++++++++------------- arch/s390/mm/vmem.c | 85 ----------------------------------- 14 files changed, 83 insertions(+), 294 deletions(-) commit 3fb39cb7c5145a10e1a0221c057e92fb8855efbb Author: Alexander Gordeev Date: Sat Aug 6 09:13:28 2022 +0200 Revert "s390/smp,ptdump: add absolute lowcore markers" This reverts commit e409b7f19172a3c154de62de4baf32a2c25a375a. Commit 7d06fed77b7d ("s390/smp: rework absolute lowcore access") introduced mutex lock with interrupts disabled. This commit is a follow-up that needs to be reverted as well. Signed-off-by: Alexander Gordeev arch/s390/mm/dump_pagetables.c | 7 ------- 1 file changed, 7 deletions(-) commit ac0dbed9ba4c38ed9b5fd3a43ee4bc1f48901a34 Author: Nick Desaulniers Date: Tue Aug 2 09:12:03 2022 -0700 net: seg6: initialize induction variable to first valid array index Fixes the following warnings observed when building CONFIG_IPV6_SEG6_LWTUNNEL=y with clang: net/ipv6/seg6_local.o: warning: objtool: seg6_local_fill_encap() falls through to next function seg6_local_get_encap_size() net/ipv6/seg6_local.o: warning: objtool: seg6_local_cmp_encap() falls through to next function input_action_end() LLVM can fully unroll loops in seg6_local_get_encap_size() and seg6_local_cmp_encap(). One issue in those loops is that the induction variable is initialized to 0. The loop iterates over members of seg6_action_params, a global array of struct seg6_action_param calling their put() function pointer members. seg6_action_param uses an array initializer to initialize SEG6_LOCAL_SRH and later elements, which is the third enumeration of an anonymous union. The guard `if (attrs & SEG6_F_ATTR(i))` may prevent this from being called at runtime, but it would still be UB for `seg6_action_params[0]->put` to be called; the unrolled loop will make the initial iterations unreachable, which LLVM will later rotate to fallthrough to the next function. Make this more obvious that this cannot happen to the compiler by initializing the loop induction variable to the minimum valid index that seg6_action_params is initialized to. Reported-by: Thomas Gleixner Signed-off-by: Nick Desaulniers Link: https://lore.kernel.org/r/20220802161203.622293-1-ndesaulniers@google.com Signed-off-by: Jakub Kicinski net/ipv6/seg6_local.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit bc3410f250219660a7be032c01c954a53b2c26ab Author: Florian Fainelli Date: Thu Aug 4 10:36:04 2022 -0700 net: bcmgenet: Indicate MAC is in charge of PHY PM Avoid the PHY library call unnecessarily into the suspend/resume functions by setting phydev->mac_managed_pm to true. The GENET driver essentially does exactly what mdio_bus_phy_resume() does by calling phy_init_hw() plus phy_resume(). Fixes: fba863b81604 ("net: phy: make PHY PM ops a no-op if MAC driver manages PHY PM") Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20220804173605.1266574-1-f.fainelli@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/genet/bcmmii.c | 3 +++ 1 file changed, 3 insertions(+) commit 049d5d9890e9f4ba6d384ba5cfc5e8698be1ae9e Author: Jakub Kicinski Date: Thu Aug 4 11:26:41 2022 -0700 eth: fix the help in Wangxun's Kconfig The text was copy&pasted from Intel, adjust it to say Wangxun. Reported-by: Ingo Saitz Fixes: 3ce7547e5b71 ("net: txgbe: Add build support for txgbe") Link: https://lore.kernel.org/r/20220804182641.1442000-1-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/wangxun/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit df1c941468fca014ad092f76672966bb412c2848 Author: Francois Romieu Date: Tue Aug 2 17:07:42 2022 +0200 net: avoid overflow when rose /proc displays timer information. rose /proc code does not serialize timer accesses. Initial report by Bernard F6BVP Pidoux exhibits overflow amounting to 116 ticks on its HZ=250 system. Full timer access serialization would imho be overkill as rose /proc does not enforce consistency between displayed ROSE_STATE_XYZ and timer values during changes of state. The patch may also fix similar behavior in ax25 /proc, ax25 ioctl and netrom /proc as they all exhibit the same timer serialization policy. This point has not been reported though. The sole remaining use of ax25_display_timer - ax25 rtt valuation - may also perform marginally better but I have not analyzed it too deeply. Cc: Thomas DL9SAU Osterried Link: https://lore.kernel.org/all/d5e93cc7-a91f-13d3-49a1-b50c11f0f811@free.fr/ Signed-off-by: Francois Romieu Tested-by: Bernard Pidoux Link: https://lore.kernel.org/r/Yuk9vq7t7VhmnOXu@electric-eye.fr.zoreil.com Signed-off-by: Jakub Kicinski net/ax25/ax25_timer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 13c9f4dc102f2856e80b92486c41841e25e23772 Author: Naveen Mamindlapalli Date: Tue Aug 2 19:58:13 2022 +0530 octeontx2-pf: Fix NIX_AF_TL3_TL2X_LINKX_CFG register configuration For packets scheduled to RPM and LBK, NIX_AF_PSE_CHANNEL_LEVEL[BP_LEVEL] selects the TL3 or TL2 scheduling level as the one used for link/channel selection and backpressure. For each scheduling queue at the selected level: Setting NIX_AF_TL3_TL2(0..255)_LINK(0..12)_CFG[ENA] = 1 allows the TL3/TL2 queue to schedule packets to a specified RPM or LBK link and channel. There is an issue in the code where NIX_AF_PSE_CHANNEL_LEVEL[BP_LEVEL] is set to TL3 where as the NIX_AF_TL3_TL2(0..255)_LINK(0..12)_CFG is configured for TL2 queue in some cases. As a result packets will not transmit on that link/channel. This patch fixes the issue by configuring the NIX_AF_TL3_TL2(0..255)_LINK(0..12)_CFG register depending on the NIX_AF_PSE_CHANNEL_LEVEL[BP_LEVEL] value. Fixes: caa2da34fd25a ("octeontx2-pf: Initialize and config queues") Signed-off-by: Naveen Mamindlapalli Signed-off-by: Sunil Kovvuri Goutham Link: https://lore.kernel.org/r/20220802142813.25031-1-naveenm@marvell.com Signed-off-by: Jakub Kicinski .../net/ethernet/marvell/octeontx2/nic/otx2_common.c | 19 ++++++++++++++----- .../net/ethernet/marvell/octeontx2/nic/otx2_common.h | 1 + 2 files changed, 15 insertions(+), 5 deletions(-) commit 63e36289c4c6e9f4273cc780b1adab01aad6c222 Merge: 8a5dfc28af9a c3c290276927 Author: Jakub Kicinski Date: Fri Aug 5 18:56:36 2022 -0700 Merge branch 'octeontx2-af-driver-fixes-for-npc' Subbaraya Sundeep says: ==================== Octeontx2 AF driver fixes for NPC This patchset includes AF driver fixes wrt packet parser NPC. Following are the changes: Patch 1: The parser nibble configuration must be same for TX and RX interfaces and if not fix up is applied. This fixup was applied only for default profile currently and it has been fixed to apply for all profiles. Patch 2: Firmware image may not be present all times in the kernel image and default profile is used mostly hence suppress the warning. Patch 3: This patch fixes a corner case where NIXLF is detached but without freeing its mcam entries which results in resource leak. Patch 4: SMAC is overlapped with DMAC mistakenly while installing rules based on SMAC. This patch fixes that. ==================== Link: https://lore.kernel.org/r/1659513255-28667-1-git-send-email-sbhatta@marvell.com Signed-off-by: Jakub Kicinski commit c3c290276927a3ae79342a4e17ec0500c138c63a Author: Subbaraya Sundeep Date: Wed Aug 3 13:24:15 2022 +0530 octeontx2-af: Fix key checking for source mac Given a field with its location/offset in input packet, the key checking logic verifies whether extracting the field can be supported or not based on the mkex profile loaded in hardware. This logic is wrong wrt source mac and this patch fixes that. Fixes: 9b179a960a96 ("octeontx2-af: Generate key field bit mask from KEX profile") Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3f8fe40ab7730cf8eb6f8b8ff412012f7f6f8f48 Author: Subbaraya Sundeep Date: Wed Aug 3 13:24:14 2022 +0530 octeontx2-af: Fix mcam entry resource leak The teardown sequence in FLR handler returns if no NIX LF is attached to PF/VF because it indicates that graceful shutdown of resources already happened. But there is a chance of all allocated MCAM entries not being freed by PF/VF. Hence free mcam entries even in case of detached LF. Fixes: c554f9c1574e ("octeontx2-af: Teardown NPA, NIX LF upon receiving FLR") Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 6 ++++++ drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c | 6 ++++++ 2 files changed, 12 insertions(+) commit cf2437626502b5271d19686b03dea306efe17ea0 Author: Harman Kalra Date: Wed Aug 3 13:24:13 2022 +0530 octeontx2-af: suppress external profile loading warning The packet parser profile supplied as firmware may not be present all the time and default profile is used mostly. Hence suppress firmware loading warning from kernel due to absence of firmware in kernel image. Fixes: 3a7244152f9c ("octeontx2-af: add support for custom KPU entries") Signed-off-by: Harman Kalra Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd1d1a8a6b29b6b472fd0d449b29eb806c411dd2 Author: Stanislaw Kardach Date: Wed Aug 3 13:24:12 2022 +0530 octeontx2-af: Apply tx nibble fixup always NPC_PARSE_NIBBLE for TX interface has to be equal to the RX one for some silicon revisions. Mistakenly this fixup was only applied to the default MKEX profile while it should also be applied to any loaded profile. Fixes: 1c1935c9945d ("octeontx2-af: Add NIX1 interfaces to NPC") Signed-off-by: Stanislaw Kardach Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8a5dfc28af9acea379952df533d86bce4aa91a42 Author: Nick Child Date: Wed Aug 3 10:52:46 2022 -0500 MAINTAINERS: Update ibmveth maintainer Add Nick Child as the maintainer of the IBM Power Virtual Ethernet Device Driver, replacing Cristobal Forno. Signed-off-by: Nick Child Link: https://lore.kernel.org/r/20220803155246.39582-1-nnac123@linux.ibm.com Signed-off-by: Jakub Kicinski MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07977a8a9e542888d39acc14a0738fd2fcdafbf0 Author: Yang Li Date: Thu Aug 4 08:37:22 2022 +0800 bnxt_en: Remove duplicated include bnxt_devlink.c bnxt_ethtool.h is included twice in bnxt_devlink.c, remove one of them. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=1817 Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20220804003722.54088-1-yang.lee@linux.alibaba.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 1 - 1 file changed, 1 deletion(-) commit f6ac85a1773832eb4959aa81f78ff8f9bcdfe9ec Merge: 2e64fe4624d1 b06ada6df9cf Author: Jakub Kicinski Date: Fri Aug 5 18:50:26 2022 -0700 Merge branch 'netfilter-followup-fixes-for-net' Florian Westphal says: ==================== netfilter followup fixes for net Regressions, since 5.19: Fix crash when packet tracing is enabled via 'meta nftrace set 1' rule. Also comes with a test case. Regressions, this cycle: Fix Kconfig dependency for the flowtable /proc interface, we want this to be off by default. ==================== Link: https://lore.kernel.org/r/20220804172629.29748-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit b06ada6df9cf785099c142d96cb8a337ff46adf7 Author: Pablo Neira Ayuso Date: Thu Aug 4 19:26:29 2022 +0200 netfilter: flowtable: fix incorrect Kconfig dependencies Remove default to 'y', this infrastructure is not fundamental for the flowtable operational. Add a missing dependency on CONFIG_NF_FLOW_TABLE. Reported-by: Linus Torvalds Fixes: b038177636f8 ("netfilter: nf_flow_table: count pending offload workqueue tasks") Signed-off-by: Pablo Neira Ayuso Signed-off-by: Florian Westphal Signed-off-by: Jakub Kicinski net/netfilter/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fe9e420defabd0f3b13239dd135d261fbeeb67ae Author: Florian Westphal Date: Thu Aug 4 19:26:28 2022 +0200 selftests: netfilter: add test case for nf trace infrastructure Enable/disable tracing infrastructure while packets are in-flight. This triggers KASAN splat after e34b9ed96ce3 ("netfilter: nf_tables: avoid skb access on nf_stolen"). While at it, reduce script run time as well. Signed-off-by: Florian Westphal Signed-off-by: Jakub Kicinski .../selftests/netfilter/nft_trans_stress.sh | 81 ++++++++++++++++++++-- 1 file changed, 76 insertions(+), 5 deletions(-) commit 399a14ec7993d605740de7b2cd5c0ce8407d12ed Author: Florian Westphal Date: Thu Aug 4 19:26:27 2022 +0200 netfilter: nf_tables: fix crash when nf_trace is enabled do not access info->pkt when info->trace is not 1. nft_traceinfo is not initialized, except when tracing is enabled. The 'nft_trace_enabled' static key cannot be used for this, we must always check info->trace first. Pass nft_pktinfo directly to avoid this. Fixes: e34b9ed96ce3 ("netfilter: nf_tables: avoid skb access on nf_stolen") Reported-by: Hangbin Liu Signed-off-by: Florian Westphal Signed-off-by: Jakub Kicinski net/netfilter/nf_tables_core.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit d62113303d691bcd8d0675ae4ac63e7769afc56c Author: Chandan Babu R Date: Thu Aug 4 08:59:27 2022 -0700 xfs: Fix false ENOSPC when performing direct write on a delalloc extent in cow fork On a higly fragmented filesystem a Direct IO write can fail with -ENOSPC error even though the filesystem has sufficient number of free blocks. This occurs if the file offset range on which the write operation is being performed has a delalloc extent in the cow fork and this delalloc extent begins much before the Direct IO range. In such a scenario, xfs_reflink_allocate_cow() invokes xfs_bmapi_write() to allocate the blocks mapped by the delalloc extent. The extent thus allocated may not cover the beginning of file offset range on which the Direct IO write was issued. Hence xfs_reflink_allocate_cow() ends up returning -ENOSPC. The following script reliably recreates the bug described above. #!/usr/bin/bash device=/dev/loop0 shortdev=$(basename $device) mntpnt=/mnt/ file1=${mntpnt}/file1 file2=${mntpnt}/file2 fragmentedfile=${mntpnt}/fragmentedfile punchprog=/root/repos/xfstests-dev/src/punch-alternating errortag=/sys/fs/xfs/${shortdev}/errortag/bmap_alloc_minlen_extent umount $device > /dev/null 2>&1 echo "Create FS" mkfs.xfs -f -m reflink=1 $device > /dev/null 2>&1 if [[ $? != 0 ]]; then echo "mkfs failed." exit 1 fi echo "Mount FS" mount $device $mntpnt > /dev/null 2>&1 if [[ $? != 0 ]]; then echo "mount failed." exit 1 fi echo "Create source file" xfs_io -f -c "pwrite 0 32M" $file1 > /dev/null 2>&1 sync echo "Create Reflinked file" xfs_io -f -c "reflink $file1" $file2 &>/dev/null echo "Set cowextsize" xfs_io -c "cowextsize 16M" $file1 > /dev/null 2>&1 echo "Fragment FS" xfs_io -f -c "pwrite 0 64M" $fragmentedfile > /dev/null 2>&1 sync $punchprog $fragmentedfile echo "Allocate block sized extent from now onwards" echo -n 1 > $errortag echo "Create 16MiB delalloc extent in CoW fork" xfs_io -c "pwrite 0 4k" $file1 > /dev/null 2>&1 sync echo "Direct I/O write at offset 12k" xfs_io -d -c "pwrite 12k 8k" $file1 This commit fixes the bug by invoking xfs_bmapi_write() in a loop until disk blocks are allocated for atleast the starting file offset of the Direct IO write range. Fixes: 3c68d44a2b49 ("xfs: allocate direct I/O COW blocks in iomap_begin") Reported-and-Root-caused-by: Wengang Wang Signed-off-by: Chandan Babu R Reviewed-by: Darrick J. Wong [djwong: slight editing to make the locking less grody, and fix some style things] Signed-off-by: Darrick J. Wong fs/xfs/xfs_reflink.c | 198 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 163 insertions(+), 35 deletions(-) commit f0c2d7d2abca24d19831c99edea458704fac8087 Author: Darrick J. Wong Date: Wed Aug 3 17:33:00 2022 -0700 xfs: fix intermittent hang during quotacheck Every now and then, I see the following hang during mount time quotacheck when running fstests. Turning on KASAN seems to make it happen somewhat more frequently. I've edited the backtrace for brevity. XFS (sdd): Quotacheck needed: Please wait. XFS: Assertion failed: bp->b_flags & _XBF_DELWRI_Q, file: fs/xfs/xfs_buf.c, line: 2411 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1831409 at fs/xfs/xfs_message.c:104 assfail+0x46/0x4a [xfs] CPU: 0 PID: 1831409 Comm: mount Tainted: G W 5.19.0-rc6-xfsx #rc6 09911566947b9f737b036b4af85e399e4b9aef64 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014 RIP: 0010:assfail+0x46/0x4a [xfs] Code: a0 8f 41 a0 e8 45 fe ff ff 8a 1d 2c 36 10 00 80 fb 01 76 0f 0f b6 f3 48 c7 c7 c0 f0 4f a0 e8 10 f0 02 e1 80 e3 01 74 02 0f 0b <0f> 0b 5b c3 48 8d 45 10 48 89 e2 4c 89 e6 48 89 1c 24 48 89 44 24 RSP: 0018:ffffc900078c7b30 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff8880099ac000 RCX: 000000007fffffff RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffffa0418fa0 RBP: ffff8880197bc1c0 R08: 0000000000000000 R09: 000000000000000a R10: 000000000000000a R11: f000000000000000 R12: ffffc900078c7d20 R13: 00000000fffffff5 R14: ffffc900078c7d20 R15: 0000000000000000 FS: 00007f0449903800(0000) GS:ffff88803ec00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005610ada631f0 CR3: 0000000014dd8002 CR4: 00000000001706f0 Call Trace: xfs_buf_delwri_pushbuf+0x150/0x160 [xfs 4561f5b32c9bfb874ec98d58d0719464e1f87368] xfs_qm_flush_one+0xd6/0x130 [xfs 4561f5b32c9bfb874ec98d58d0719464e1f87368] xfs_qm_dquot_walk.isra.0+0x109/0x1e0 [xfs 4561f5b32c9bfb874ec98d58d0719464e1f87368] xfs_qm_quotacheck+0x319/0x490 [xfs 4561f5b32c9bfb874ec98d58d0719464e1f87368] xfs_qm_mount_quotas+0x65/0x2c0 [xfs 4561f5b32c9bfb874ec98d58d0719464e1f87368] xfs_mountfs+0x6b5/0xab0 [xfs 4561f5b32c9bfb874ec98d58d0719464e1f87368] xfs_fs_fill_super+0x781/0x990 [xfs 4561f5b32c9bfb874ec98d58d0719464e1f87368] get_tree_bdev+0x175/0x280 vfs_get_tree+0x1a/0x80 path_mount+0x6f5/0xaa0 __x64_sys_mount+0x103/0x140 do_syscall_64+0x2b/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 I /think/ this can happen if xfs_qm_flush_one is racing with xfs_qm_dquot_isolate (i.e. dquot reclaim) when the second function has taken the dquot flush lock but xfs_qm_dqflush hasn't yet locked the dquot buffer, let alone queued it to the delwri list. In this case, flush_one will fail to get the dquot flush lock, but it can lock the incore buffer, but xfs_buf_delwri_pushbuf will then trip over this ASSERT, which checks that the buffer isn't on a delwri list. The hang results because the _delwri_submit_buffers ignores non DELWRI_Q buffers, which means that xfs_buf_iowait waits forever for an IO that has not yet been scheduled. AFAICT, a reasonable solution here is to detect a dquot buffer that is not on a DELWRI list, drop it, and return -EAGAIN to try the flush again. It's not /that/ big of a deal if quotacheck writes the dquot buffer repeatedly before we even set QUOTA_CHKD. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/xfs_qm.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7d839e325af221ff69d52e15c112cf09da91d149 Author: Darrick J. Wong Date: Thu Jul 28 13:35:31 2022 -0700 xfs: check return codes when flushing block devices If a blkdev_issue_flush fails, fsync needs to report that to upper levels. Modify xfs_file_fsync to capture the errors, while trying to flush as much data and log updates to disk as possible. If log writes cannot flush the data device, we need to shut down the log immediately because we've violated a log invariant. Modify this code to check the return value of blkdev_issue_flush as well. This behavior seems to go back to about 2.6.15 or so, which makes this fixes tag a bit misleading. Link: https://elixir.bootlin.com/linux/v2.6.15/source/fs/xfs/xfs_vnodeops.c#L1187 Fixes: b5071ada510a ("xfs: remove xfs_blkdev_issue_flush") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/xfs_file.c | 22 ++++++++++++++-------- fs/xfs/xfs_log.c | 12 ++++++++++-- 2 files changed, 24 insertions(+), 10 deletions(-) commit 6614a3c3164a5df2b54abb0b3559f51041cf705b Merge: 74cae210a335 360614c01f81 Author: Linus Torvalds Date: Fri Aug 5 16:32:45 2022 -0700 Merge tag 'mm-stable-2022-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull MM updates from Andrew Morton: "Most of the MM queue. A few things are still pending. Liam's maple tree rework didn't make it. This has resulted in a few other minor patch series being held over for next time. Multi-gen LRU still isn't merged as we were waiting for mapletree to stabilize. The current plan is to merge MGLRU into -mm soon and to later reintroduce mapletree, with a view to hopefully getting both into 6.1-rc1. Summary: - The usual batches of cleanups from Baoquan He, Muchun Song, Miaohe Lin, Yang Shi, Anshuman Khandual and Mike Rapoport - Some kmemleak fixes from Patrick Wang and Waiman Long - DAMON updates from SeongJae Park - memcg debug/visibility work from Roman Gushchin - vmalloc speedup from Uladzislau Rezki - more folio conversion work from Matthew Wilcox - enhancements for coherent device memory mapping from Alex Sierra - addition of shared pages tracking and CoW support for fsdax, from Shiyang Ruan - hugetlb optimizations from Mike Kravetz - Mel Gorman has contributed some pagealloc changes to improve latency and realtime behaviour. - mprotect soft-dirty checking has been improved by Peter Xu - Many other singleton patches all over the place" [ XFS merge from hell as per Darrick Wong in https://lore.kernel.org/all/YshKnxb4VwXycPO8@magnolia/ ] * tag 'mm-stable-2022-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (282 commits) tools/testing/selftests/vm/hmm-tests.c: fix build mm: Kconfig: fix typo mm: memory-failure: convert to pr_fmt() mm: use is_zone_movable_page() helper hugetlbfs: fix inaccurate comment in hugetlbfs_statfs() hugetlbfs: cleanup some comments in inode.c hugetlbfs: remove unneeded header file hugetlbfs: remove unneeded hugetlbfs_ops forward declaration hugetlbfs: use helper macro SZ_1{K,M} mm: cleanup is_highmem() mm/hmm: add a test for cross device private faults selftests: add soft-dirty into run_vmtests.sh selftests: soft-dirty: add test for mprotect mm/mprotect: fix soft-dirty check in can_change_pte_writable() mm: memcontrol: fix potential oom_lock recursion deadlock mm/gup.c: fix formatting in check_and_migrate_movable_page() xfs: fail dax mount if reflink is enabled on a partition mm/memcontrol.c: remove the redundant updating of stats_flush_threshold userfaultfd: don't fail on unrecognized features hugetlb_cgroup: fix wrong hugetlb cgroup numa stat ... commit 1cd8a2537eb07751d405ab7e2223f20338a90506 Author: Dan Williams Date: Fri Aug 5 15:12:27 2022 -0700 cxl/hdm: Fix skip allocations vs multiple pmem allocations Vishal notes that when attempting to define a second pmem region on a device the DPA allocation fails with a message of the form: decoder11.1: failed to reserve skipped space Recall that the skip setting is used when there is a pmem allocation in the presence of free ram DPA space. The first pmem allocation skips over the free ram and subsequent pmem allocations do not require a skip. The bug is that a skip is still attempted and the DPA reservation code flags the double skip allocation conflict. Fixes: cf880423b6a0 ("cxl/hdm: Add support for allocating DPA to an endpoint decoder") Reported-by: Vishal Verma Tested-by: Vishal Verma Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/165973754730.1558392.15466392461645857658.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/hdm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 4d8e4ea5bb396897111e8a740201bfd3c5926170 Author: Dan Williams Date: Fri Aug 5 13:27:51 2022 -0700 cxl/region: Disallow region granularity != window granularity The endpoint decode granularity must be <= the window granularity otherwise capacity in the endpoints is lost in the decode. Consider an attempt to have a region granularity of 512 with 4 devices within a window that maps 2 host bridges at a granularity of 256 bytes: HPA DPA Offset HB Port EP 0x0 0x0 0 0 0 0x100 0x0 1 0 2 0x200 0x100 0 0 0 0x300 0x100 1 0 2 0x400 0x200 0 1 1 0x500 0x200 1 1 3 0x600 0x300 0 1 1 0x700 0x300 1 1 3 0x800 0x400 0 0 0 0x900 0x400 1 0 2 0xA00 0x500 0 0 0 0xB00 0x500 1 0 2 Notice how endpoint0 maps HPA 0x0 and 0x200 correctly, but then at HPA 0x800 it results in DPA 0x200-0x400 on being skipped. Fix this by restricing the region granularity to be equal to the window granularity resulting in the following for a x4 region under a x2 window at a granularity of 256. HPA DPA Offset HB Port EP 0x0 0x0 0 0 0 0x100 0x0 1 0 2 0x200 0x0 0 1 1 0x300 0x0 1 1 3 0x400 0x100 0 0 0 0x500 0x100 1 0 2 0x600 0x100 0 1 1 0x700 0x100 1 1 3 Not that it ever made practical sense to support region granularity > window granularity. The window rotates host bridges causing endpoints to never see a consecutive stream of requests at the desired granularity without breaks to issue cycles to the other host bridge. Fixes: 80d10a6cee05 ("cxl/region: Add interleave geometry attributes") Cc: Jonathan Cameron Reviewed-by: Vishal Verma Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/165973127171.1526540.9923273539049172976.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/region.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 298d44d04b2ba97824c3dadd1dbf7c154a2a86e2 Author: Dan Williams Date: Fri Aug 5 13:27:45 2022 -0700 cxl/region: Fix x1 interleave to greater than x1 interleave routing In cases where the decode fans out as it traverses downstream, the interleave granularity needs to increment to identify the port selector bits out of the remaining address bits. For example, recall that with an x2 parent port intereleave (IW == 1), the downstream decode for children of those ports will either see address bit IG+8 always set, or address bit IG+8 always clear. So if the child port needs to select a downstream port it can only use address bits starting at IG+9 (where IG and IW are the CXL encoded values for interleave granularity (ilog2(ig) - 8) and ways (ilog2(iw))). When the parent port interleave is x1 no such masking occurs and the child port can maintain the granularity that was routed to the parent port. Reported-by: Jonathan Cameron Reviewed-by: Vishal Verma Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/165973126583.1526540.657948655360009242.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/region.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 910bc55da8285605308cb76f69a335b36780da43 Author: Dan Williams Date: Fri Aug 5 13:27:40 2022 -0700 cxl/region: Move HPA setup to cxl_region_attach() A recent bug fix added the setup of the endpoint decoder interleave geometry settings to cxl_region_attach(). Move the HPA setup there as well to keep all endpoint decoder parameter setting in a central location. For symmetry, move endpoint HPA teardown to cxl_region_detach(), and for switches move HPA setup / teardown to cxl_port_{setup,reset}_targets(). Cc: Jonathan Cameron Signed-off-by: Vishal Verma Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/165973126020.1526540.14701949254436069807.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/hdm.c | 26 ++------------------------ drivers/cxl/core/region.c | 24 ++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 26 deletions(-) commit 74cae210a335d159f2eb822e261adee905b6951a Merge: 79b7e67bb974 7ec4cdb32173 Author: Linus Torvalds Date: Fri Aug 5 14:13:45 2022 -0700 Merge tag 'mtd/for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD updates from Richard Weinberger: "MTD core changes: - Dynamic partition support - Fix deadlock in sm_ftl - Various refcount fixes in maps, partitions and parser code - Integer overflow fixes in mtdchar - Support for Sercomm partitions NAND driver changes: - Clockrate fix for arasan - Add ATO25D1GA support - Double free fix for meson driver - Fix probe/remove methods in cafe NAND - Support unprotected spare data pages in qcom_nandc SPI NOR core changes: - move SECT_4K_PMC flag out of the core as it's a vendor specific flag - s/addr_width/addr_nbytes/g: address width means the number of IO lines used for the address, whereas in the code it is used as the number of address bytes. - do not change nor->addr_nbytes at SFDP parsing time. At the SFDP parsing time we should not change members of struct spi_nor, but instead fill members of struct spi_nor_flash_parameters which could later on be used by the callers. - track flash's internal address mode so that we can use 4B opcodes together with opcodes that don't have a 4B opcode correspondent. SPI NOR manufacturer drivers changes: - esmt: Rename "f25l32qa" flash name to "f25l32qa-2s". - micron-st: Skip FSR reading if SPI controller does not support it to allow flashes that support FSR to work even when attached to such SPI controllers. - spansion: Add s25hl-t/s25hs-t IDs and fixups" * tag 'mtd/for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (53 commits) mtd: core: check partition before dereference mtd: spi-nor: fix spi_nor_spimem_setup_op() call in spi_nor_erase_{sector,chip}() mtd: spi-nor: spansion: Add s25hl-t/s25hs-t IDs and fixups mtd: spi-nor: spansion: Add local function to discover page size mtd: spi-nor: core: Track flash's internal address mode mtd: spi-nor: core: Return error code from set_4byte_addr_mode() mtd: spi-nor: Do not change nor->addr_nbytes at SFDP parsing time mtd: spi-nor: core: Shrink the storage size of the flash_info's addr_nbytes mtd: spi-nor: s/addr_width/addr_nbytes mtd: spi-nor: esmt: Use correct name of f25l32qa mtd: spi-nor: micron-st: Skip FSR reading if SPI controller does not support it MAINTAINERS: Use my kernel.org email mtd: rawnand: arasan: Fix clock rate in NV-DDR mtd: rawnand: arasan: Update NAND bus clock instead of system clock mtd: core: introduce of support for dynamic partitions dt-bindings: mtd: partitions: add additional example for qcom,smem-part dt-bindings: mtd: partitions: support label/name only partition mtd: spi-nor: move SECT_4K_PMC special handling mtd: dataflash: Add SPI ID table mtd: hyperbus: rpc-if: Fix RPM imbalance in probe error path ... commit 79b7e67bb9747e621ff1b646a125fbea26e08d56 Merge: 4d5398a3ec06 af3e16101cee Author: Linus Torvalds Date: Fri Aug 5 14:03:11 2022 -0700 Merge tag 'for-linus-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML updates from Richard Weinberger: - KASAN support for x86_64 - noreboot command line option, just like qemu's -no-reboot - Various fixes and cleanups * tag 'for-linus-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: include sys/types.h for size_t um: Replace to_phys() and to_virt() with less generic function names um: Add missing apply_returns() um: add "noreboot" command line option for PANIC_TIMEOUT=-1 setups um: include linux/stddef.h for __always_inline UML: add support for KASAN under x86_64 mm: Add PAGE_ALIGN_DOWN macro um: random: Don't initialise hwrng struct with zero um: remove unused mm_copy_segments um: remove unused variable um: Remove straying parenthesis um: x86: print RIP with symbol arch: um: Fix build for statically linked UML w/ constructors x86/um: Kconfig: Fix indentation um/drivers: Kconfig: Fix indentation um: Kconfig: Fix indentation commit 4d5398a3ec060c1e3094097e52a19a4d0013c0e0 Merge: 9e2f40233670 52e0ea900202 Author: Linus Torvalds Date: Fri Aug 5 13:59:38 2022 -0700 Merge tag 'for-linus' of github.com:openrisc/linux Pull OpenRISC updates from Stafford Horne: "In this cycle we add PCI support to OpenRISC used in our new QEMU virt platform. The main updates from me include: - Kconfig updates to support OpenRISC PCI (just config now after the PCI cleanups I did on Bjorn's branch) - A new defconfig for the qemu virt platform. - Also there is one MAINTAINERS update. As I was working on the PCI series we kept getting bounces from Richard's old email address. I added this here; I am not sure how these are usually handled when the maintainer doesn't queue it themselves" * tag 'for-linus' of github.com:openrisc/linux: openrisc: io: Define iounmap argument as volatile MAINTAINERS: Update Richard Henderson's address openrisc: Add virt defconfig openrisc: Add pci bus support commit 9e2f40233670c70c25e0681cb66d50d1e2742829 Merge: 3bd6e5854bf9 e0a5915f1cca Author: Linus Torvalds Date: Fri Aug 5 10:47:40 2022 -0700 Merge tag 'x86_sgx_for_v6.0-2022-08-03.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 SGX updates from Dave Hansen: "A set of x86/sgx changes focused on implementing the "SGX2" features, plus a minor cleanup: - SGX2 ISA support which makes enclave memory management much more dynamic. For instance, enclaves can now change enclave page permissions on the fly. - Removal of an unused structure member" * tag 'x86_sgx_for_v6.0-2022-08-03.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (32 commits) x86/sgx: Drop 'page_index' from sgx_backing selftests/sgx: Page removal stress test selftests/sgx: Test reclaiming of untouched page selftests/sgx: Test invalid access to removed enclave page selftests/sgx: Test faulty enclave behavior selftests/sgx: Test complete changing of page type flow selftests/sgx: Introduce TCS initialization enclave operation selftests/sgx: Introduce dynamic entry point selftests/sgx: Test two different SGX2 EAUG flows selftests/sgx: Add test for TCS page permission changes selftests/sgx: Add test for EPCM permission changes Documentation/x86: Introduce enclave runtime management section x86/sgx: Free up EPC pages directly to support large page ranges x86/sgx: Support complete page removal x86/sgx: Support modifying SGX page type x86/sgx: Tighten accessible memory range after enclave initialization x86/sgx: Support adding of pages to an initialized enclave x86/sgx: Support restricting of enclave page permissions x86/sgx: Support VA page allocation without reclaiming x86/sgx: Export sgx_encl_page_alloc() ... commit 3bd6e5854bf9bb5436d6b533e206561839e3b284 Merge: fad235ed4338 6f05e014b96c Author: Linus Torvalds Date: Fri Aug 5 10:07:23 2022 -0700 Merge tag 'asm-generic-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic updates from Arnd Bergmann: "There are three independent sets of changes: - Sai Prakash Ranjan adds tracing support to the asm-generic version of the MMIO accessors, which is intended to help understand problems with device drivers and has been part of Qualcomm's vendor kernels for many years - A patch from Sebastian Siewior to rework the handling of IRQ stacks in softirqs across architectures, which is needed for enabling PREEMPT_RT - The last patch to remove the CONFIG_VIRT_TO_BUS option and some of the code behind that, after the last users of this old interface made it in through the netdev, scsi, media and staging trees" * tag 'asm-generic-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: uapi: asm-generic: fcntl: Fix typo 'the the' in comment arch/*/: remove CONFIG_VIRT_TO_BUS soc: qcom: geni: Disable MMIO tracing for GENI SE serial: qcom_geni_serial: Disable MMIO tracing for geni serial asm-generic/io: Add logging support for MMIO accessors KVM: arm64: Add a flag to disable MMIO trace for nVHE KVM lib: Add register read/write tracing support drm/meson: Fix overflow implicit truncation warnings irqchip/tegra: Fix overflow implicit truncation warnings coresight: etm4x: Use asm-generic IO memory barriers arm64: io: Use asm-generic high level MMIO accessors arch/*: Disable softirq stacks on PREEMPT_RT. commit fad235ed4338749a66ddf32971d4042b9ef47f44 Merge: 8db4a0291b09 1630eee2d4e7 Author: Linus Torvalds Date: Fri Aug 5 10:02:33 2022 -0700 Merge tag 'arm-late-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull more ARM SoC updates from Arnd Bergmann: "These updates came in after I had already tagged the branches, but they still seem appropriate for 6.0 and most of them were part of linux-next through other trees. - The reset controller tree adds one new driver for the TI TPS380x power management chip and a few minor changes in other drivers - Apple M1 now has a DT entry for the NVMe controller after the driver was merged, and has a new mailing list in the MAINTAINERS file. - Fixes for USB on the Socionext Uniphier platforms and the network controller on Intel Cyclone5" * tag 'arm-late-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: arm64: dts: uniphier: Fix USB interrupts for PXs3 SoC ARM: dts: uniphier: Fix USB interrupts for PXs2 SoC arm64: dts: apple: t8103: Add ANS2 NVMe nodes reset: tps380x: Fix spelling mistake "Voltags" -> "Voltage" reset: tps380x: Add TPS380x device driver supprt dt-bindings: reset: Add TPS380x documentation dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G2UL USBPHY Control bindings ARM: dts: add EMAC AXI settings for Cyclone5 reset: reset-simple should depends on HAS_IOMEM Revert "reset: microchip-sparx5: allow building as a module" reset: a10sr: allow building under COMPILE_TEST reset: allow building of reset simple driver if expert config selected reset: microchip-sparx5: allow building as a module arm64: dts: apple: Re-parent ANS2 power domains MAINTAINERS: add ARM/APPLE MACHINE mailing list commit 8db4a0291b09be667ba72584e1aeb7aaf8b497bd Merge: 98586bd6dce3 e61b3125a4f0 Author: Linus Torvalds Date: Fri Aug 5 09:58:58 2022 -0700 Merge tag 'for-5.20/parisc-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "One real bugfix to change the io_pgetevents_time64() syscall to use the compat implementation when running in compat mode, otherwise the signed int32 parameters min_nr and nr will be incorrectly handled as unsigned int64 values. Other than that just small cleanups: - hardware database housekeeping and proper /proc/iomem output - add proper function exit code if probe functions fail - drop stale variables (pa_swapper_pg_lock) - drop unneccessary zero-initializations - typo fixes in comments" * tag 'for-5.20/parisc-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: Input: gscps2 - check return value of ioremap() in gscps2_probe() parisc: io_pgetevents_time64() needs compat syscall in 32-bit compat mode parisc: Drop zero variable initialisations in mm/init.c parisc: Do not initialise statics to 0 parisc: Check the return value of ioremap() in lba_driver_probe() parisc: Drop pa_swapper_pg_lock spinlock parisc: Fix comment typo in fault.c parisc: Fix device names in /proc/iomem parisc: Clean up names in hardware database commit 98586bd6dce3690d8ae8d8561383d9ecc715e3c2 Merge: a1b02751d6ec 5b7d1d575e3f Author: Linus Torvalds Date: Fri Aug 5 09:56:51 2022 -0700 Merge tag 'microblaze-v5.20' of git://git.monstr.eu/linux-2.6-microblaze Pull microblaze updates from Michal Simek: - Trivial comment fix - Remove HANDLE_DOMAIN_IRQ selection * tag 'microblaze-v5.20' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: Fix some typos in comment arch: microblaze: Remove unused "select HANDLE_DOMAIN_IRQ" commit a1b02751d6ec21ec1b9c7c6826fc896ffde1c33d Merge: 965a9d75e3d2 96dd9a2f958b Author: Linus Torvalds Date: Fri Aug 5 09:54:36 2022 -0700 Merge tag 'printk-for-5.20-sane' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk updates from Petr Mladek: - Allow reading kernel log in gdb even on 32 bits systems - More granular check of the buffer usage in printf selftest - Clang warning fix * tag 'printk-for-5.20-sane' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: lib/test_printf.c: fix clang -Wformat warnings scripts/gdb: fix 'lx-dmesg' on 32 bits arch lib/test_printf.c: split write-beyond-buffer check in two commit 6ba592fa014f21f35a8ee8da4ca7b95a018f13e8 Author: Zheyu Ma Date: Thu Aug 4 20:41:25 2022 +0800 video: fbdev: s3fb: Check the size of screen before memset_io() In the function s3fb_set_par(), the value of 'screen_size' is calculated by the user input. If the user provides the improper value, the value of 'screen_size' may larger than 'info->screen_size', which may cause the following bug: [ 54.083733] BUG: unable to handle page fault for address: ffffc90003000000 [ 54.083742] #PF: supervisor write access in kernel mode [ 54.083744] #PF: error_code(0x0002) - not-present page [ 54.083760] RIP: 0010:memset_orig+0x33/0xb0 [ 54.083782] Call Trace: [ 54.083788] s3fb_set_par+0x1ec6/0x4040 [ 54.083806] fb_set_var+0x604/0xeb0 [ 54.083836] do_fb_ioctl+0x234/0x670 Fix the this by checking the value of 'screen_size' before memset_io(). Fixes: a268422de8bf ("fbdev driver for S3 Trio/Virge") Signed-off-by: Zheyu Ma Signed-off-by: Helge Deller drivers/video/fbdev/s3fb.c | 2 ++ 1 file changed, 2 insertions(+) commit 96b550971c65d54d64728d8ba973487878a06454 Author: Zheyu Ma Date: Thu Aug 4 20:41:24 2022 +0800 video: fbdev: arkfb: Check the size of screen before memset_io() In the function arkfb_set_par(), the value of 'screen_size' is calculated by the user input. If the user provides the improper value, the value of 'screen_size' may larger than 'info->screen_size', which may cause the following bug: [ 659.399066] BUG: unable to handle page fault for address: ffffc90003000000 [ 659.399077] #PF: supervisor write access in kernel mode [ 659.399079] #PF: error_code(0x0002) - not-present page [ 659.399094] RIP: 0010:memset_orig+0x33/0xb0 [ 659.399116] Call Trace: [ 659.399122] arkfb_set_par+0x143f/0x24c0 [ 659.399130] fb_set_var+0x604/0xeb0 [ 659.399161] do_fb_ioctl+0x234/0x670 [ 659.399189] fb_ioctl+0xdd/0x130 Fix the this by checking the value of 'screen_size' before memset_io(). Fixes: 681e14730c73 ("arkfb: new framebuffer driver for ARK Logic cards") Signed-off-by: Zheyu Ma Signed-off-by: Helge Deller drivers/video/fbdev/arkfb.c | 2 ++ 1 file changed, 2 insertions(+) commit ec0754c60217248fa77cc9005d66b2b55200ac06 Author: Zheyu Ma Date: Thu Aug 4 20:41:23 2022 +0800 video: fbdev: vt8623fb: Check the size of screen before memset_io() In the function vt8623fb_set_par(), the value of 'screen_size' is calculated by the user input. If the user provides the improper value, the value of 'screen_size' may larger than 'info->screen_size', which may cause the following bug: [ 583.339036] BUG: unable to handle page fault for address: ffffc90005000000 [ 583.339049] #PF: supervisor write access in kernel mode [ 583.339052] #PF: error_code(0x0002) - not-present page [ 583.339074] RIP: 0010:memset_orig+0x33/0xb0 [ 583.339110] Call Trace: [ 583.339118] vt8623fb_set_par+0x11cd/0x21e0 [ 583.339146] fb_set_var+0x604/0xeb0 [ 583.339181] do_fb_ioctl+0x234/0x670 [ 583.339209] fb_ioctl+0xdd/0x130 Fix the this by checking the value of 'screen_size' before memset_io(). Fixes: 558b7bd86c32 ("vt8623fb: new framebuffer driver for VIA VT8623") Signed-off-by: Zheyu Ma Signed-off-by: Helge Deller drivers/video/fbdev/vt8623fb.c | 2 ++ 1 file changed, 2 insertions(+) commit 62d468e5e10012e8b67d066ba7bac0a8afdc3cee Author: Jiri Olsa Date: Tue Aug 2 15:56:51 2022 +0200 bpf: Cleanup ftrace hash in bpf_trampoline_put We need to release possible hash from trampoline fops object before removing it, otherwise we leak it. Fixes: 00963a2e75a8 ("bpf: Support bpf_trampoline on functions with IPMODIFY (e.g. livepatch)") Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20220802135651.1794015-1-jolsa@kernel.org kernel/bpf/trampoline.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 965a9d75e3d250088a269e0c903e86fe775b48c6 Merge: 29b1d469f3f6 f1a15b977ff8 Author: Linus Torvalds Date: Fri Aug 5 09:41:12 2022 -0700 Merge tag 'trace-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: - Runtime verification infrastructure This is the biggest change here. It introduces the runtime verification that is necessary for running Linux on safety critical systems. It allows for deterministic automata models to be inserted into the kernel that will attach to tracepoints, where the information on these tracepoints will move the model from state to state. If a state is encountered that does not belong to the model, it will then activate a given reactor, that could just inform the user or even panic the kernel (for which safety critical systems will detect and can recover from). - Two monitor models are also added: Wakeup In Preemptive (WIP - not to be confused with "work in progress"), and Wakeup While Not Running (WWNR). - Added __vstring() helper to the TRACE_EVENT() macro to replace several vsnprintf() usages that were all doing it wrong. - eprobes now can have their event autogenerated when the event name is left off. - The rest is various cleanups and fixes. * tag 'trace-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (50 commits) rv: Unlock on error path in rv_unregister_reactor() tracing: Use alignof__(struct {type b;}) instead of offsetof() tracing/eprobe: Show syntax error logs in error_log file scripts/tracing: Fix typo 'the the' in comment tracepoints: It is CONFIG_TRACEPOINTS not CONFIG_TRACEPOINT tracing: Use free_trace_buffer() in allocate_trace_buffers() tracing: Use a struct alignof to determine trace event field alignment rv/reactor: Add the panic reactor rv/reactor: Add the printk reactor rv/monitor: Add the wwnr monitor rv/monitor: Add the wip monitor rv/monitor: Add the wip monitor skeleton created by dot2k Documentation/rv: Add deterministic automata instrumentation documentation Documentation/rv: Add deterministic automata monitor synthesis documentation tools/rv: Add dot2k Documentation/rv: Add deterministic automaton documentation tools/rv: Add dot2c Documentation/rv: Add a basic documentation rv/include: Add instrumentation helper functions rv/include: Add deterministic automata monitor definition via C macros ... commit 446279168e030fd0ed68e2bba336bef8bb3da352 Merge: 44dab005fd42 6feaec81477a Author: Andreas Gruenbacher Date: Fri Aug 5 18:37:03 2022 +0200 Merge part of branch 'for-next.instantiate' into for-next commit 29b1d469f3f6842ee4115f0b21f018fc44176468 Merge: b2a88c212e65 dd0b15bda48f Author: Linus Torvalds Date: Fri Aug 5 09:35:46 2022 -0700 Merge tag 'trace-rtla-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull real time analysis tool (rtla) updates from Steven Rostedt: - Fix a double free - Define syscall numbers for RISCV - Fix Makefile when called from -C tools - Use calloc() to check for memory allocation failures * tag 'trace-rtla-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: rtla: Define syscall numbers for riscv rtla: Fix double free rtla: Fix Makefile when called from -C tools/ rtla/utils: Use calloc and check the potential memory allocation failure commit 0d168a58fca34806b575c7cba87afb11208acb54 Author: Steve French Date: Mon Aug 1 01:31:16 2022 -0500 cifs: update internal module number To 2.38 Signed-off-by: Steve French fs/cifs/cifsfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ea75a78c07d7f172062822b90fac8a9ac59773a3 Author: Steve French Date: Fri Aug 5 11:15:44 2022 -0500 cifs: alloc_mid function should be marked as static It is only used in transport.c. Signed-off-by: Steve French fs/cifs/cifsproto.h | 3 --- fs/cifs/transport.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) commit f5fd3f2889dc2f1df83f7d17e9579fe0d269bbb4 Author: Enzo Matsumiya Date: Fri Aug 5 11:47:39 2022 -0300 cifs: remove "cifs_" prefix from init/destroy mids functions Rename generic mid functions to same style, i.e. without "cifs_" prefix. cifs_{init,destroy}_mids() -> {init,destroy}_mids() Signed-off-by: Enzo Matsumiya Signed-off-by: Steve French fs/cifs/cifsfs.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 70f08f914a37a0881a7f17068e03ff5a5024822d Author: Enzo Matsumiya Date: Fri Aug 5 11:47:38 2022 -0300 cifs: remove useless DeleteMidQEntry() DeleteMidQEntry() was just a proxy for cifs_mid_q_entry_release(). - remove DeleteMidQEntry() - rename cifs_mid_q_entry_release() to release_mid() - rename kref_put() callback _cifs_mid_q_entry_release to __release_mid - rename AllocMidQEntry() to alloc_mid() - rename cifs_delete_mid() to delete_mid() Update callers to use new names. Signed-off-by: Enzo Matsumiya Signed-off-by: Steve French fs/cifs/cifsproto.h | 9 ++++---- fs/cifs/cifssmb.c | 6 +++--- fs/cifs/connect.c | 8 +++---- fs/cifs/smb2ops.c | 2 +- fs/cifs/smb2pdu.c | 6 +++--- fs/cifs/smb2transport.c | 4 ++-- fs/cifs/transport.c | 57 ++++++++++++++++++++++--------------------------- 7 files changed, 43 insertions(+), 49 deletions(-) commit fb157ed226d225b6a149ed63a7831f6bdde7b911 Author: Steve French Date: Mon Aug 1 11:17:46 2022 -0500 cifs: when insecure legacy is disabled shrink amount of SMB1 code Currently much of the smb1 code is built even when CONFIG_CIFS_ALLOW_INSECURE_LEGACY is disabled. Move cifssmb.c to only be compiled when insecure legacy is disabled, and move various SMB1/CIFS helper functions to that ifdef. Some functions that were not SMB1/CIFS specific needed to be moved out of cifssmb.c This shrinks cifs.ko by more than 10% which is good - but also will help with the eventual movement of the legacy code to a distinct module. Follow on patches can shrink the number of ifdefs by code restructuring where smb1 code is wedged in functions that should be calling dialect specific helper functions instead, and also by moving some functions from file.c/dir.c/inode.c into smb1 specific c files. Reviewed-by: Ronnie Sahlberg Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/Makefile | 4 +- fs/cifs/cifsacl.c | 2 + fs/cifs/cifsproto.h | 2 + fs/cifs/cifssmb.c | 453 +--------------------------------------------------- fs/cifs/connect.c | 53 ++++++ fs/cifs/dir.c | 8 + fs/cifs/file.c | 264 +++++++++++++++++++++++++++++- fs/cifs/inode.c | 60 ++++++- fs/cifs/ioctl.c | 2 + fs/cifs/link.c | 8 + fs/cifs/sess.c | 5 +- fs/cifs/transport.c | 179 +++++++++++++++++++++ fs/cifs/xattr.c | 5 +- 13 files changed, 582 insertions(+), 463 deletions(-) commit 2901c8bdedca19e5efdab2ea55b465102231b315 Author: Dan Williams Date: Tue Aug 2 10:34:35 2022 -0700 cxl/region: Fix decoder interleave programming Jonathan notes: "Curiously interleave ways = 1 for the EPs which is obviously wrong" ...while testing the latest CXL development branch on QEMU. It turns out the region creation process failed to program the endpoint decoders. This was missed because the default settings of x1 at 4K intereleave still results in the region appearing to function. Jonathan caught the bug by reverse mapping the translations that need to happen for the QEMU support. Link: https://lore.kernel.org/r/62e95fdf9f6e2_30440294e4@dwillia2-xfh.jf.intel.com.notmuch Fixes: 384e624bb211 ("cxl/region: Attach endpoint decoders") Reported-by: Jonathan Cameron Link: https://lore.kernel.org/r/165951146336.967013.11160153960900111443.stgit@dwillia2-xfh.jf.intel.com Acked-by: Jonathan Cameron Signed-off-by: Dan Williams drivers/cxl/core/region.c | 3 +++ 1 file changed, 3 insertions(+) commit 8732947b75a826519ef33b92dbebaa3fa83e5e0b Author: Bagas Sanjaya Date: Thu Aug 4 14:54:48 2022 +0700 Documentation: cxl: remove dangling kernel-doc reference Sphinx reported kernel-doc failure warning, pointing to non-existent drivers/cxl/region.h (which doesn't also exist throughout repo history): WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno -sphinx-version 2.4.4 -no-doc-sections ./drivers/cxl/region.h' failed with return code 1 Above cause error message to be displayed on htmldocs output. Delete the reference. Fixes: 779dd20cfb56c5 ("cxl/region: Add region creation support") Signed-off-by: Bagas Sanjaya Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220804075448.98241-4-bagasdotme@gmail.com Signed-off-by: Dan Williams Documentation/driver-api/cxl/memory-devices.rst | 3 --- 1 file changed, 3 deletions(-) commit 038e6eb803870113ca78fc70905a27aaa7141fd9 Author: Bagas Sanjaya Date: Thu Aug 4 14:54:47 2022 +0700 cxl/region: describe targets and nr_targets members of cxl_region_params Sphinx reported undescribed parameters in cxl_region_params struct: ./drivers/cxl/cxl.h:376: warning: Function parameter or member 'targets' not described in 'cxl_region_params' ./drivers/cxl/cxl.h:376: warning: Function parameter or member 'nr_targets' not described in 'cxl_region_params' Describe these members. Fixes: b9686e8c8e39 ("cxl/region: Enable the assignment of endpoint decoders to regions") Signed-off-by: Bagas Sanjaya Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220804075448.98241-3-bagasdotme@gmail.com Signed-off-by: Dan Williams drivers/cxl/cxl.h | 2 ++ 1 file changed, 2 insertions(+) commit f13da0d9c3252eb922fc12495f2068fbb18c2e8f Author: Bagas Sanjaya Date: Thu Aug 4 14:54:46 2022 +0700 cxl/regions: add padding for cxl_rr_ep_add nested lists Sphinx reported indentation warnings: Documentation/driver-api/cxl/memory-devices:457: ./drivers/cxl/core/region.c:732: WARNING: Unexpected indentation. Documentation/driver-api/cxl/memory-devices:457: ./drivers/cxl/core/region.c:733: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/driver-api/cxl/memory-devices:457: ./drivers/cxl/core/region.c:735: WARNING: Unexpected indentation. These warnings above are due to missing blank line padding in the nested list in kernel-doc comment for cxl_rr_ep_add(). Add the paddings to fix the warnings. Fixes: 384e624bb211b4 ("cxl/region: Attach endpoint decoders") Signed-off-by: Bagas Sanjaya Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220804075448.98241-2-bagasdotme@gmail.com Signed-off-by: Dan Williams drivers/cxl/core/region.c | 3 +++ 1 file changed, 3 insertions(+) commit 9fd2cf4d6fba8253efa62ba45f623ab7f09df12d Author: Dan Carpenter Date: Wed Aug 3 12:07:50 2022 +0300 cxl/region: Fix IS_ERR() vs NULL check The nvdimm_pmem_region_create() function returns NULL on error. It does not return error pointers. Fixes: 04ad63f086d1 ("cxl/region: Introduce cxl_pmem_region objects") Signed-off-by: Dan Carpenter Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/Yuo65lq2WtfdGJ0X@kili Signed-off-by: Dan Williams drivers/cxl/pmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e29a8995d63f6f861b2cc446c58cef430885f469 Author: Dan Williams Date: Mon Aug 1 12:55:30 2022 -0700 cxl/region: Fix region reference target accounting Dan reports: The error handling in cxl_port_attach_region() looks like it might have a similar bug. The cxl_rr->nr_targets++; might want a --. That function is more complicated. Indeed cxl_rr->nr_targets leaks when cxl_rr_ep_add() fails, but that flow is not clear. Fix the bug and the clarity by separating the 'new' region-reference case from the 'extend' region-reference case. This also moves the host-physical-address (HPA) validation, that the HPA of a new region being accounted to the port is greater than the HPA of all other regions associated with the port, to alloc_region_ref(). Introduce @nr_targets_inc to track when the error exit path needs to clean up cxl_rr->nr_targets. Fixes: 384e624bb211 ("cxl/region: Attach endpoint decoders") Reported-by: Dan Carpenter Reviewed-by: Ira Weiny Link: http://lore.kernel.org/r/165939482134.252363.1915691883146696327.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/region.c | 71 ++++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 28 deletions(-) commit 69c9961387f244077101de3ce4e272717617dc87 Author: Dan Williams Date: Tue Aug 2 14:47:08 2022 -0700 cxl/region: Fix region commit uninitialized variable warning 0day robot reports: drivers/cxl/core/region.c:196 cxl_region_decode_commit() error: uninitialized symbol 'rc'. The re-checking of loop termination conditions to determine "success" makes it hard to see that @rc is initialized in all cases. Remove those to make it explicit that @rc reflects a commit error and that the rest of logic is concerned with unwinding committed decoders. This change potentially results in cxl_region_decode_reset() being called with @count == 0 where it was not called before, but cxl_region_decode_reset() treats that as a nop. Fixes: 176baefb2eb5 ("cxl/hdm: Commit decoder state to hardware") Reported-by: kernel test robot Reviewed-by: Ira Weiny Reviewed-by: Jonathan Cameron Link: http://lore.kernel.org/r/165951148105.967013.14191992449932268431.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/region.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) commit 8d428542571428fb68b5c41b092ae70d2fc2cd17 Author: Dan Williams Date: Tue Aug 2 13:27:44 2022 -0700 cxl/region: Fix port setup uninitialized variable warnings 0day robot reports: drivers/cxl/core/region.c:1068 cxl_port_setup_targets() error: uninitialized symbol 'eiw'. drivers/cxl/core/region.c:1068 cxl_port_setup_targets() error: uninitialized symbol 'peig'. drivers/cxl/core/region.c:1068 cxl_port_setup_targets() error: uninitialized symbol 'peiw'. ...which are all valid reports. Add debug statement to consume the, albeit unexpected, errors. Fixes: 27b3f8d13830 ("cxl/region: Program target lists") Reported-by: kernel test robot Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165951147487.967013.929590444907251028.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/region.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit d1f6222c4978817712e0f2825ce9e830763f0695 Author: Dylan Yudaken Date: Fri Aug 5 04:54:50 2022 -0700 io_uring: fix io_recvmsg_prep_multishot sparse warnings Fix casts missing the __user parts. This seemed to only cause errors on the alpha build, or if checked with sparse, but it was definitely an oversight. Reported-by: kernel test robot Fixes: 9bb66906f23e ("io_uring: support multishot in recvmsg") Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220805115450.3921352-1-dylany@fb.com Signed-off-by: Jens Axboe io_uring/net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d5beb74f17e25a3cb331a0cd8af795e8cfc5d36c Author: Pierre-Louis Bossart Date: Fri Aug 5 15:33:32 2022 +0200 ASoC: Intel: fix sof_es8336 probe Changes to add HDMI capture support broke the machine driver probe for all other platforms. The commit listed in the Fixes tag added a board_id descriptor but didn't add the default name for the sof_essx8336 machine driver. Add the missing entry and remove the now-useless platform driver alias. Reported-by: Eugene J Markow BugLink: https://github.com/thesofproject/linux/issues/3336 Fixes: 86b1959a2ccb ("ASoC: Intel: sof_es8336: add support for HDMI_In capture") Reviewed-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220805133332.207932-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_es8336.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5549af7f42916c0d7e78a0e423ac667e27eaac3e Merge: 754590651ccb 94c1ceb043c1 Author: Mark Brown Date: Fri Aug 5 15:24:07 2022 +0100 ASoC: Fix theoretical buffer overflow by snprintf() Merge series from Takashi Iwai : This is a patch series to paper over the theoretical buffer overflow that might be caused by snprintf(). snprintf() is notorious for its behavior and the usage of a safer version, scnprintf(), is recommended. commit 754590651ccbbcc74a7c20907be4bb15d642bde3 Author: Takashi Iwai Date: Mon Aug 1 19:05:10 2022 +0200 ASoC: DPCM: Don't pick up BE without substream When DPCM tries to add valid BE connections at dpcm_add_paths(), it doesn't check whether the picked BE actually supports for the given stream direction. Due to that, when an asymmetric BE stream is present, it picks up wrongly and this may result in a NULL dereference at a later point where the code assumes the existence of a corresponding BE substream. This patch adds the check for the presence of the substream for the target BE for avoiding the problem above. Note that we have already some fix for non-existing BE substream at commit 6246f283d5e0 ("ASoC: dpcm: skip missing substream while applying symmetry"). But the code path we've hit recently is rather happening before the previous fix. So this patch tries to fix at picking up a BE instead of parsing BE lists. Fixes: bbf7d3b1c4f4 ("ASoC: soc-pcm: align BE 'atomicity' with that of the FE") Reported-by: Alex Natalsson Cc: Pierre-Louis Bossart Cc: Péter Ujfalusi Link: https://lore.kernel.org/r/CADs9LoPZH_D+eJ9qjTxSLE5jGyhKsjMN7g2NighZ16biVxsyKw@mail.gmail.com Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20220801170510.26582-1-tiwai@suse.de Signed-off-by: Mark Brown sound/soc/soc-pcm.c | 3 +++ 1 file changed, 3 insertions(+) commit 666d3b612f91dab4a6616586dc99d2e43f07f52d Author: Colin Ian King Date: Fri Aug 5 13:04:39 2022 +0100 ALSA: ice1712: remove redundant assignment to new The variable new is initialized with a value but it is never read. It is being re-assigned a new value in every case path in the following switch statement. The assignment is redundant and can be removed. Cleans up clang scan build warning: sound/pci/ice1712/quartet.c:569:8: warning: Although the value stored to 'new' is used in the enclosing expression, the value is never actually read from 'new' [deadcode.DeadStores] Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20220805120439.2341600-1-colin.i.king@gmail.com Signed-off-by: Takashi Iwai sound/pci/ice1712/quartet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 706864c99e0e2d301da9e749395909bc309c50a0 Author: Lukas Bulwahn Date: Thu Aug 4 18:18:23 2022 +0200 MAINTAINERS: rectify entry for ARM/HPE GXP ARCHITECTURE Commit 8cc35b86546d ("spi: dt-bindings: add documentation for hpe,gxp-spifi") adds the spi dt-binding file hpe,gxp-spifi.yaml and commit a1848b0fa251 ("MAINTAINERS: add spi support to GXP") adds a file entry hpe,gxp-spi.yaml in ARM/HPE GXP ARCHITECTURE. Note the different file name. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Repair this file reference in ARM/HPE GXP ARCHITECTURE. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220804161823.20912-1-lukas.bulwahn@gmail.com Signed-off-by: Mark Brown MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d501cc4cfc6be1ab9aef3ff0fa3b2afc52a1af23 Author: David Jander Date: Fri Aug 5 10:44:58 2022 +0200 spi: spi.c: Add missing __percpu annotations in users of spi_statistics Fixes sparse warnings of this kind: drivers/spi/spi.c:117:16: sparse: expected struct spi_statistics * drivers/spi/spi.c:117:16: sparse: got struct spi_statistics [noderef] __percpu *[assigned] pcpu_stats Reported-by: kernel test robot Signed-off-by: David Jander Link: https://lore.kernel.org/r/20220805084458.1602277-1-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit b7bf23c0865faac61564425ddc96a4a79ebf19b0 Author: Justin Stitt Date: Wed Aug 3 13:44:42 2022 -0700 ASoC: SOF: ipc3-topology: Fix clang -Wformat warning When building with Clang we encounter these warnings: | sound/soc/sof/ipc3-topology.c:2343:4: error: format specifies type | 'unsigned char' but the argument has type 'int' [-Werror,-Wformat] | SOF_ABI_MAJOR, SOF_ABI_MINOR, SOF_ABI_PATCH); | ^~~~~~~~~~~~~~~^~~~~~~~~~~~~~~^~~~~~~~~~~~~ Use correct format specifier `%d` since args are of type int. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Reported-by: Nathan Chancellor Suggested-by: Nathan Chancellor Signed-off-by: Justin Stitt Reviewed-by: Nathan Chancellor Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220803204442.2996580-1-justinstitt@google.com Signed-off-by: Mark Brown sound/soc/sof/ipc3-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c75ed9f54ce8d349fee557f2b471a4d637ed2a6b Author: Biju Das Date: Thu Jul 28 10:26:12 2022 +0100 ASoC: sh: rz-ssi: Improve error handling in rz_ssi_probe() error path We usually do cleanup in reverse order of init. Currently in case of error rz_ssi_release_dma_channels() done in the reverse order. This patch improves error handling in rz_ssi_probe() error path. While at it, use "goto cleanup" style to reduce code duplication. Reported-by: Pavel Machek Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20220728092612.38858-1-biju.das.jz@bp.renesas.com Signed-off-by: Mark Brown sound/soc/sh/rz-ssi.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 94c1ceb043c1a002de9649bb630c8e8347645982 Author: Takashi Iwai Date: Mon Aug 1 18:54:20 2022 +0200 ASoC: SOF: Intel: hda: Fix potential buffer overflow by snprintf() snprintf() returns the would-be-filled size when the string overflows the given buffer size, hence using this value may result in the buffer overflow (although it's unrealistic). This patch replaces with a safer version, scnprintf() for papering over such a potential issue. Fixes: 29c8e4398f02 ("ASoC: SOF: Intel: hda: add extended rom status dump to error log") Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20220801165420.25978-4-tiwai@suse.de Signed-off-by: Mark Brown sound/soc/sof/intel/hda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1eb123ce985e6cf302ac6e3f19862d132d86fa8f Author: Takashi Iwai Date: Mon Aug 1 18:54:19 2022 +0200 ASoC: SOF: debug: Fix potential buffer overflow by snprintf() snprintf() returns the would-be-filled size when the string overflows the given buffer size, hence using this value may result in the buffer overflow (although it's unrealistic). This patch replaces with a safer version, scnprintf() for papering over such a potential issue. Fixes: 5b10b6298921 ("ASoC: SOF: Add `memory_info` file to debugfs") Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20220801165420.25978-3-tiwai@suse.de Signed-off-by: Mark Brown sound/soc/sof/debug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ca3b7b9dc9bc1fa552f4697b7cccfa0258a44d00 Author: Takashi Iwai Date: Mon Aug 1 18:54:18 2022 +0200 ASoC: Intel: avs: Fix potential buffer overflow by snprintf() snprintf() returns the would-be-filled size when the string overflows the given buffer size, hence using this value may result in a buffer overflow (although it's unrealistic). This patch replaces it with a safer version, scnprintf() for papering over such a potential issue. Fixes: f1b3b320bd65 ("ASoC: Intel: avs: Generic soc component driver") Signed-off-by: Takashi Iwai Acked-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220801165420.25978-2-tiwai@suse.de Signed-off-by: Mark Brown sound/soc/intel/avs/pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 01fc4b9a6ed8eacb64e5609bab7ac963e1c7e486 Author: Fengnan Chang Date: Sun Jul 31 11:33:46 2022 +0800 f2fs: use onstack pages instead of pvec Since pvec have 15 pages, it not a multiple of 4, when write compressed pages, write in 64K as a unit, it will call pagevec_lookup_range_tag agagin, sometimes this will take a lot of time. Use onstack pages instead of pvec to mitigate this problem. Signed-off-by: Fengnan Chang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/compress.c | 8 ++++---- fs/f2fs/data.c | 16 +++++++--------- fs/f2fs/f2fs.h | 4 +++- 3 files changed, 14 insertions(+), 14 deletions(-) commit 4f8219f8aa175d5a46703631abaae745592efe29 Author: Fengnan Chang Date: Sun Jul 31 11:33:45 2022 +0800 f2fs: intorduce f2fs_all_cluster_page_ready When write total cluster, all pages is uptodate, there is not need to call f2fs_prepare_compress_overwrite, intorduce f2fs_all_cluster_page_ready to avoid this. Signed-off-by: Fengnan Chang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/compress.c | 21 ++++++++++++++------- fs/f2fs/data.c | 8 ++++++-- fs/f2fs/f2fs.h | 4 ++-- 3 files changed, 22 insertions(+), 11 deletions(-) commit e53f8643474a32ddfcfd04e5b22613fdd2a92a52 Author: Chao Yu Date: Thu Aug 4 21:38:21 2022 +0800 f2fs: clean up f2fs_abort_atomic_write() f2fs_abort_atomic_write() has checked whether current inode is atomic_write one or not, it's redundant to check in its caller, remove it for cleanup. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 9 +++------ fs/f2fs/inode.c | 3 +-- fs/f2fs/segment.c | 27 ++++++++++++++------------- fs/f2fs/super.c | 3 +-- 4 files changed, 19 insertions(+), 23 deletions(-) commit bff139b49d9f70c1ac5384aac94554846aa834de Author: Daeho Jeong Date: Tue Aug 2 12:24:37 2022 -0700 f2fs: handle decompress only post processing in softirq Now decompression is being handled in workqueue and it makes read I/O latency non-deterministic, because of the non-deterministic scheduling nature of workqueues. So, I made it handled in softirq context only if possible, not in low memory devices, since this modification will maintain decompresion related memory a little longer. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/compress.c | 203 +++++++++++++++++++++++++++++++++++------------------ fs/f2fs/data.c | 52 +++++++++----- fs/f2fs/f2fs.h | 17 +++-- 3 files changed, 179 insertions(+), 93 deletions(-) commit 90be48bd9d29ece3965e5e8b21499b6db166e57b Author: Jaewook Kim Date: Wed Aug 3 17:53:58 2022 +0900 f2fs: do not allow to decompress files have FI_COMPRESS_RELEASED If a file has FI_COMPRESS_RELEASED, all writes for it should not be allowed. However, as of now, in case of compress_mode=user, writes triggered by IOCTLs like F2FS_IOC_DE/COMPRESS_FILE are allowed unexpectly, which could crash that file. To fix it, let's do not allow F2FS_IOC_DE/COMPRESS_IOCTL if a file already has FI_COMPRESS_RELEASED flag. This is the reproduction process: 1. $ touch ./file 2. $ chattr +c ./file 3. $ dd if=/dev/random of=./file bs=4096 count=30 conv=notrunc 4. $ dd if=/dev/zero of=./file bs=4096 count=34 seek=30 conv=notrunc 5. $ sync 6. $ do_compress ./file ; call F2FS_IOC_COMPRESS_FILE 7. $ get_compr_blocks ./file ; call F2FS_IOC_GET_COMPRESS_BLOCKS 8. $ release ./file ; call F2FS_IOC_RELEASE_COMPRESS_BLOCKS 9. $ do_compress ./file ; call F2FS_IOC_COMPRESS_FILE again 10. $ get_compr_blocks ./file ; call F2FS_IOC_GET_COMPRESS_BLOCKS again This reproduction process is tested in 128kb cluster size. You can find compr_blocks has a negative value. Fixes: 5fdb322ff2c2b ("f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE") Signed-off-by: Junbeom Yeom Signed-off-by: Sungjong Seo Signed-off-by: Youngjin Gil Signed-off-by: Jaewook Kim Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 912f0d6580e743eecf908f5566cc064b63c55908 Author: Jaegeuk Kim Date: Wed Aug 3 20:33:54 2022 -0700 f2fs: do not set compression bit if kernel doesn't support If kernel doesn't have CONFIG_F2FS_FS_COMPRESSION, a file having FS_COMPR_FL via ioctl(FS_IOC_SETFLAGS) is unaccessible due to f2fs_is_compress_backend_ready(). Let's avoid it. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 7 ++++++- fs/f2fs/file.c | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) commit dbf8e63f48af48f3f0a069fc971c9826312dbfc1 Author: Eunhee Rho Date: Mon Aug 1 13:40:02 2022 +0900 f2fs: remove device type check for direct IO To ensure serialized IOs, f2fs allows only LFS mode for zoned device. Remove redundant check for direct IO. Signed-off-by: Eunhee Rho Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 4a2c5b7994960fac29cf8a3f4e62855bae1b27d4 Author: Ye Bin Date: Mon Aug 1 19:26:04 2022 +0800 f2fs: fix null-ptr-deref in f2fs_get_dnode_of_data There is issue as follows when test f2fs atomic write: F2FS-fs (loop0): Can't find valid F2FS filesystem in 2th superblock F2FS-fs (loop0): invalid crc_offset: 0 F2FS-fs (loop0): f2fs_check_nid_range: out-of-range nid=1, run fsck to fix. F2FS-fs (loop0): f2fs_check_nid_range: out-of-range nid=2, run fsck to fix. ================================================================== BUG: KASAN: null-ptr-deref in f2fs_get_dnode_of_data+0xac/0x16d0 Read of size 8 at addr 0000000000000028 by task rep/1990 CPU: 4 PID: 1990 Comm: rep Not tainted 5.19.0-rc6-next-20220715 #266 Call Trace: dump_stack_lvl+0x6e/0x91 print_report.cold+0x49a/0x6bb kasan_report+0xa8/0x130 f2fs_get_dnode_of_data+0xac/0x16d0 f2fs_do_write_data_page+0x2a5/0x1030 move_data_page+0x3c5/0xdf0 do_garbage_collect+0x2015/0x36c0 f2fs_gc+0x554/0x1d30 f2fs_balance_fs+0x7f5/0xda0 f2fs_write_single_data_page+0xb66/0xdc0 f2fs_write_cache_pages+0x716/0x1420 f2fs_write_data_pages+0x84f/0x9a0 do_writepages+0x130/0x3a0 filemap_fdatawrite_wbc+0x87/0xa0 file_write_and_wait_range+0x157/0x1c0 f2fs_do_sync_file+0x206/0x12d0 f2fs_sync_file+0x99/0xc0 vfs_fsync_range+0x75/0x140 f2fs_file_write_iter+0xd7b/0x1850 vfs_write+0x645/0x780 ksys_write+0xf1/0x1e0 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd As 3db1de0e582c commit changed atomic write way which new a cow_inode for atomic write file, and also mark cow_inode as FI_ATOMIC_FILE. When f2fs_do_write_data_page write cow_inode will use cow_inode's cow_inode which is NULL. Then will trigger null-ptr-deref. To solve above issue, introduce FI_COW_FILE flag for COW inode. Fiexes: 3db1de0e582c("f2fs: change the current atomic write way") Signed-off-by: Ye Bin Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 6 ++++++ fs/f2fs/file.c | 2 +- fs/f2fs/segment.c | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) commit 23339e5752d01a4b5e122759b002cf896d26f6c1 Author: Daeho Jeong Date: Mon Aug 1 10:08:08 2022 -0700 f2fs: revive F2FS_IOC_ABORT_VOLATILE_WRITE F2FS_IOC_ABORT_VOLATILE_WRITE was used to abort a atomic write before. However it was removed accidentally. So revive it by changing the name, since volatile write had gone. Signed-off-by: Daeho Jeong Fiexes: 7bc155fec5b3("f2fs: kill volatile write support") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 30 ++++++++++++++++++++++++++++-- include/uapi/linux/f2fs.h | 2 +- 2 files changed, 29 insertions(+), 3 deletions(-) commit 1630eee2d4e77d8c121ab955d31befacb720bb99 Merge: 0d98fbcf72f1 879bcfc4e536 Author: Arnd Bergmann Date: Fri Aug 5 11:33:19 2022 +0200 Merge branch 'arm/fixes' into arm/late Two bugfixes that came in to update the MAINTAINERS file and fix an issue with USB on the uniphier platform. * arm/fixes: arm64: dts: uniphier: Fix USB interrupts for PXs3 SoC ARM: dts: uniphier: Fix USB interrupts for PXs2 SoC MAINTAINERS: add ARM/APPLE MACHINE mailing list commit ba953a9d89a00c078b85f4b190bc1dde66fe16b5 Author: Herbert Xu Date: Thu Aug 4 18:03:46 2022 +0800 af_key: Do not call xfrm_probe_algs in parallel When namespace support was added to xfrm/afkey, it caused the previously single-threaded call to xfrm_probe_algs to become multi-threaded. This is buggy and needs to be fixed with a mutex. Reported-by: Abhishek Shah Fixes: 283bc9f35bbb ("xfrm: Namespacify xfrm state/policy locks") Signed-off-by: Herbert Xu Signed-off-by: Steffen Klassert net/key/af_key.c | 3 +++ 1 file changed, 3 insertions(+) commit 2e64fe4624d19bc71212aae434c54874e5c49c5a Author: Cezar Bulinaru Date: Wed Aug 3 02:28:16 2022 -0400 selftests: add few test cases for tap driver Few test cases related to the fix for 924a9bc362a5: "net: check if protocol extracted by virtio_net_hdr_set_proto is correct" Need test for the case when a non-standard packet (GSO without NEEDS_CSUM) sent to the tap device causes a BUG check in the tap driver. Signed-off-by: Cezar Bulinaru Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller tools/testing/selftests/net/.gitignore | 3 +- tools/testing/selftests/net/Makefile | 2 +- tools/testing/selftests/net/tap.c | 434 +++++++++++++++++++++++++++++++++ 3 files changed, 437 insertions(+), 2 deletions(-) commit 4f61f133f354853bc394ec7d6028adb9b02dd701 Author: Cezar Bulinaru Date: Wed Aug 3 02:27:59 2022 -0400 net: tap: NULL pointer derefence in dev_parse_header_protocol when skb->dev is null Fixes a NULL pointer derefence bug triggered from tap driver. When tap_get_user calls virtio_net_hdr_to_skb the skb->dev is null (in tap.c skb->dev is set after the call to virtio_net_hdr_to_skb) virtio_net_hdr_to_skb calls dev_parse_header_protocol which needs skb->dev field to be valid. The line that trigers the bug is in dev_parse_header_protocol (dev is at offset 0x10 from skb and is stored in RAX register) if (!dev->header_ops || !dev->header_ops->parse_protocol) 22e1: mov 0x10(%rbx),%rax 22e5: mov 0x230(%rax),%rax Setting skb->dev before the call in tap.c fixes the issue. BUG: kernel NULL pointer dereference, address: 0000000000000230 RIP: 0010:virtio_net_hdr_to_skb.constprop.0+0x335/0x410 [tap] Code: c0 0f 85 b7 fd ff ff eb d4 41 39 c6 77 cf 29 c6 48 89 df 44 01 f6 e8 7a 79 83 c1 48 85 c0 0f 85 d9 fd ff ff eb b7 48 8b 43 10 <48> 8b 80 30 02 00 00 48 85 c0 74 55 48 8b 40 28 48 85 c0 74 4c 48 RSP: 0018:ffffc90005c27c38 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff888298f25300 RCX: 0000000000000010 RDX: 0000000000000005 RSI: ffffc90005c27cb6 RDI: ffff888298f25300 RBP: ffffc90005c27c80 R08: 00000000ffffffea R09: 00000000000007e8 R10: ffff88858ec77458 R11: 0000000000000000 R12: 0000000000000001 R13: 0000000000000014 R14: ffffc90005c27e08 R15: ffffc90005c27cb6 FS: 0000000000000000(0000) GS:ffff88858ec40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000230 CR3: 0000000281408006 CR4: 00000000003706e0 Call Trace: tap_get_user+0x3f1/0x540 [tap] tap_sendmsg+0x56/0x362 [tap] ? get_tx_bufs+0xc2/0x1e0 [vhost_net] handle_tx_copy+0x114/0x670 [vhost_net] handle_tx+0xb0/0xe0 [vhost_net] handle_tx_kick+0x15/0x20 [vhost_net] vhost_worker+0x7b/0xc0 [vhost] ? vhost_vring_call_reset+0x40/0x40 [vhost] kthread+0xfa/0x120 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x1f/0x30 Fixes: 924a9bc362a5 ("net: check if protocol extracted by virtio_net_hdr_set_proto is correct") Signed-off-by: Cezar Bulinaru Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller drivers/net/tap.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit f882c4bef9cb914d9f7be171afb10ed26536bfa7 Author: Meng Tang Date: Fri Aug 5 15:45:34 2022 +0800 ALSA: hda/realtek: Add quirk for another Asus K42JZ model There is another Asus K42JZ model with the PCI SSID 1043:1313 that requires the quirk ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE. Add the corresponding entry to the quirk table. Signed-off-by: Meng Tang Cc: Link: https://lore.kernel.org/r/20220805074534.20003-1-tangmeng@uniontech.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 9f05f9ade27f1802d1305abd58c3e4a0d819deef Merge: 4ae97cae07e1 df9e03aec3b1 Author: David S. Miller Date: Fri Aug 5 08:51:29 2022 +0100 Merge branch 'mptcp-fixes' Mat Martineau says: ==================== mptcp: Fixes for mptcp cleanup/close and a selftest Patch 1 fixes an issue with leaking subflow sockets if there's a failure in a CGROUP_INET_SOCK_CREATE eBPF program. Patch 2 fixes a syzkaller-detected race at MPTCP socket close. Patch 3 is a fix for one mode of the mptcp_connect.sh selftest. ==================== Signed-off-by: David S. Miller commit df9e03aec3b14970df05b72d54f8ac9da3ab29e1 Author: Florian Westphal Date: Thu Aug 4 17:21:27 2022 -0700 selftests: mptcp: make sendfile selftest work When the selftest got added, sendfile() on mptcp sockets returned -EOPNOTSUPP, so running 'mptcp_connect.sh -m sendfile' failed immediately. This is no longer the case, but the script fails anyway due to timeout. Let the receiver know once the sender has sent all data, just like with '-m mmap' mode. v2: need to respect cfg_wait too, as pm_userspace.sh relied on -m sendfile to keep the connection open (Mat Martineau) Fixes: 048d19d444be ("mptcp: add basic kselftest for mptcp") Reported-by: Xiumei Mu Reviewed-by: Mat Martineau Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller tools/testing/selftests/net/mptcp/mptcp_connect.c | 26 +++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) commit c886d70286bf3ad411eb3d689328a67f7102c6ae Author: Paolo Abeni Date: Thu Aug 4 17:21:26 2022 -0700 mptcp: do not queue data on closed subflows Dipanjan reported a syzbot splat at close time: WARNING: CPU: 1 PID: 10818 at net/ipv4/af_inet.c:153 inet_sock_destruct+0x6d0/0x8e0 net/ipv4/af_inet.c:153 Modules linked in: uio_ivshmem(OE) uio(E) CPU: 1 PID: 10818 Comm: kworker/1:16 Tainted: G OE 5.19.0-rc6-g2eae0556bb9d #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Workqueue: events mptcp_worker RIP: 0010:inet_sock_destruct+0x6d0/0x8e0 net/ipv4/af_inet.c:153 Code: 21 02 00 00 41 8b 9c 24 28 02 00 00 e9 07 ff ff ff e8 34 4d 91 f9 89 ee 4c 89 e7 e8 4a 47 60 ff e9 a6 fc ff ff e8 20 4d 91 f9 <0f> 0b e9 84 fe ff ff e8 14 4d 91 f9 0f 0b e9 d4 fd ff ff e8 08 4d RSP: 0018:ffffc9001b35fa78 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000000002879d0 RCX: ffff8881326f3b00 RDX: 0000000000000000 RSI: ffff8881326f3b00 RDI: 0000000000000002 RBP: ffff888179662674 R08: ffffffff87e983a0 R09: 0000000000000000 R10: 0000000000000005 R11: 00000000000004ea R12: ffff888179662400 R13: ffff888179662428 R14: 0000000000000001 R15: ffff88817e38e258 FS: 0000000000000000(0000) GS:ffff8881f5f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020007bc0 CR3: 0000000179592000 CR4: 0000000000150ee0 Call Trace: __sk_destruct+0x4f/0x8e0 net/core/sock.c:2067 sk_destruct+0xbd/0xe0 net/core/sock.c:2112 __sk_free+0xef/0x3d0 net/core/sock.c:2123 sk_free+0x78/0xa0 net/core/sock.c:2134 sock_put include/net/sock.h:1927 [inline] __mptcp_close_ssk+0x50f/0x780 net/mptcp/protocol.c:2351 __mptcp_destroy_sock+0x332/0x760 net/mptcp/protocol.c:2828 mptcp_worker+0x5d2/0xc90 net/mptcp/protocol.c:2586 process_one_work+0x9cc/0x1650 kernel/workqueue.c:2289 worker_thread+0x623/0x1070 kernel/workqueue.c:2436 kthread+0x2e9/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302 The root cause of the problem is that an mptcp-level (re)transmit can race with mptcp_close() and the packet scheduler checks the subflow state before acquiring the socket lock: we can try to (re)transmit on an already closed ssk. Fix the issue checking again the subflow socket status under the subflow socket lock protection. Additionally add the missing check for the fallback-to-tcp case. Fixes: d5f49190def6 ("mptcp: allow picking different xmit subflows") Reported-by: Dipanjan Das Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller net/mptcp/protocol.c | 8 +++++++- net/mptcp/protocol.h | 11 +++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) commit c0bf3c6aa444a5ef44acc57ef6cfa53fd4fc1c9b Author: Paolo Abeni Date: Thu Aug 4 17:21:25 2022 -0700 mptcp: move subflow cleanup in mptcp_destroy_common() If the mptcp socket creation fails due to a CGROUP_INET_SOCK_CREATE eBPF program, the MPTCP protocol ends-up leaking all the subflows: the related cleanup happens in __mptcp_destroy_sock() that is not invoked in such code path. Address the issue moving the subflow sockets cleanup in the mptcp_destroy_common() helper, which is invoked in every msk cleanup path. Additionally get rid of the intermediate list_splice_init step, which is an unneeded relic from the past. The issue is present since before the reported root cause commit, but any attempt to backport the fix before that hash will require a complete rewrite. Fixes: e16163b6e2 ("mptcp: refactor shutdown and close") Reported-by: Nguyen Dinh Phi Reviewed-by: Mat Martineau Co-developed-by: Nguyen Dinh Phi Signed-off-by: Nguyen Dinh Phi Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller net/mptcp/protocol.c | 39 +++++++++++++++------------------------ net/mptcp/protocol.h | 2 +- net/mptcp/subflow.c | 3 ++- 3 files changed, 18 insertions(+), 26 deletions(-) commit b2a88c212e652e94f1e4b635910972ac57ba4e97 Merge: 9daee913dc8d 5e9466a5d060 Author: Linus Torvalds Date: Thu Aug 4 20:19:16 2022 -0700 Merge tag 'xfs-5.20-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs updates from Darrick Wong: "The biggest changes for this release are the log scalability improvements, lockless lookups for the buffer cache, and making the attr fork a permanent part of the incore inode in preparation for directory parent pointers. There's also a bunch of bug fixes that have accumulated since -rc5. I might send you a second pull request with some more bug fixes that I'm still working on. Once the merge window ends, I will hand maintainership back to Dave Chinner until the 6.1-rc1 release so that I can conduct the design review for the online fsck feature, and try to get it merged. Summary: - Improve scalability of the XFS log by removing spinlocks and global synchronization points. - Add security labels to whiteout inodes to match the other filesystems. - Clean up per-ag pointer passing to simplify call sites. - Reduce verifier overhead by precalculating more AG geometry. - Implement fast-path lockless lookups in the buffer cache to reduce spinlock hammering. - Make attr forks a permanent part of the inode structure to fix a UAF bug and because most files these days tend to have security labels and soon will have parent pointers too. - Clean up XFS_IFORK_Q usage and give it a better name. - Fix more UAF bugs in the xattr code. - SOB my tags. - Fix some typos in the timestamp range documentation. - Fix a few more memory leaks. - Code cleanups and typo fixes. - Fix an unlocked inode fork pointer access in getbmap" * tag 'xfs-5.20-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (61 commits) xfs: delete extra space and tab in blank line xfs: fix NULL pointer dereference in xfs_getbmap() xfs: Fix typo 'the the' in comment xfs: Fix comment typo xfs: don't leak memory when attr fork loading fails xfs: fix for variable set but not used warning xfs: xfs_buf cache destroy isn't RCU safe xfs: delete unnecessary NULL checks xfs: fix comment for start time value of inode with bigtime enabled xfs: fix use-after-free in xattr node block inactivation xfs: lockless buffer lookup xfs: remove a superflous hash lookup when inserting new buffers xfs: reduce the number of atomic when locking a buffer after lookup xfs: merge xfs_buf_find() and xfs_buf_get_map() xfs: break up xfs_buf_find() into individual pieces xfs: add in-memory iunlink log item xfs: add log item precommit operation xfs: combine iunlink inode update functions xfs: clean up xfs_iunlink_update_inode() xfs: double link the unlinked inode list ... commit 9daee913dc8d15eb65e0ff560803ab1c28bb480b Merge: fa9db655d0e1 d95efb14c0b8 Author: Linus Torvalds Date: Thu Aug 4 20:13:46 2022 -0700 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "Add new ioctls to set and get the file system UUID in the ext4 superblock and improved the performance of the online resizing of file systems with bigalloc enabled. Fixed a lot of bugs, in particular for the inline data feature, potential races when creating and deleting inodes with shared extended attribute blocks, and the handling of directory blocks which are corrupted" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (37 commits) ext4: add ioctls to get/set the ext4 superblock uuid ext4: avoid resizing to a partial cluster size ext4: reduce computation of overhead during resize jbd2: fix assertion 'jh->b_frozen_data == NULL' failure when journal aborted ext4: block range must be validated before use in ext4_mb_clear_bb() mbcache: automatically delete entries from cache on freeing mbcache: Remove mb_cache_entry_delete() ext2: avoid deleting xattr block that is being reused ext2: unindent codeblock in ext2_xattr_set() ext2: factor our freeing of xattr block reference ext4: fix race when reusing xattr blocks ext4: unindent codeblock in ext4_xattr_block_set() ext4: remove EA inode entry from mbcache on inode eviction mbcache: add functions to delete entry if unused mbcache: don't reclaim used entries ext4: make sure ext4_append() always allocates new block ext4: check if directory block is within i_size ext4: reflect mb_optimize_scan value in options file ext4: avoid remove directory when directory is corrupted ext4: aligned '*' in comments ... commit fa9db655d0e112c108fe838809608caf759bdf5e Merge: e495274793ea bc792884b76f Author: Linus Torvalds Date: Thu Aug 4 20:00:14 2022 -0700 Merge tag 'for-5.20/block-2022-08-04' of git://git.kernel.dk/linux-block Pull block driver updates from Jens Axboe: - NVMe pull requests via Christoph: - add support for In-Band authentication (Hannes Reinecke) - handle the persistent internal error AER (Michael Kelley) - use in-capsule data for TCP I/O queue connect (Caleb Sander) - remove timeout for getting RDMA-CM established event (Israel Rukshin) - misc cleanups (Joel Granados, Sagi Grimberg, Chaitanya Kulkarni, Guixin Liu, Xiang wangx) - use command_id instead of req->tag in trace_nvme_complete_rq() (Bean Huo) - various fixes for the new authentication code (Lukas Bulwahn, Dan Carpenter, Colin Ian King, Chaitanya Kulkarni, Hannes Reinecke) - small cleanups (Liu Song, Christoph Hellwig) - restore compat_ioctl support (Nick Bowler) - make a nvmet-tcp workqueue lockdep-safe (Sagi Grimberg) - enable generic interface (/dev/ngXnY) for unknown command sets (Joel Granados, Christoph Hellwig) - don't always build constants.o (Christoph Hellwig) - print the command name of aborted commands (Christoph Hellwig) - MD pull requests via Song: - Improve raid5 lock contention, by Logan Gunthorpe. - Misc fixes to raid5, by Logan Gunthorpe. - Fix race condition with md_reap_sync_thread(), by Guoqing Jiang. - Fix potential deadlock with raid5_quiesce and raid5_get_active_stripe, by Logan Gunthorpe. - Refactoring md_alloc(), by Christoph" - Fix md disk_name lifetime problems, by Christoph Hellwig - Convert prepare_to_wait() to wait_woken() api, by Logan Gunthorpe; - Fix sectors_to_do bitmap issue, by Logan Gunthorpe. - Work on unifying the null_blk module parameters and configfs API (Vincent) - drbd bitmap IO error fix (Lars) - Set of rnbd fixes (Guoqing, Md Haris) - Remove experimental marker on bcache async device registration (Coly) - Series from cleaning up the bio splitting (Christoph) - Removal of the sx8 block driver. This hardware never really widespread, and it didn't receive a lot of attention after the initial merge of it back in 2005 (Christoph) - A few fixes for s390 dasd (Eric, Jiang) - Followup set of fixes for ublk (Ming) - Support for UBLK_IO_NEED_GET_DATA for ublk (ZiyangZhang) - Fixes for the dio dma alignment (Keith) - Misc fixes and cleanups (Ming, Yu, Dan, Christophe * tag 'for-5.20/block-2022-08-04' of git://git.kernel.dk/linux-block: (136 commits) s390/dasd: Establish DMA alignment s390/dasd: drop unexpected word 'for' in comments ublk_drv: add support for UBLK_IO_NEED_GET_DATA ublk_cmd.h: add one new ublk command: UBLK_IO_NEED_GET_DATA ublk_drv: cleanup ublksrv_ctrl_dev_info ublk_drv: add SET_PARAMS/GET_PARAMS control command ublk_drv: fix ublk device leak in case that add_disk fails ublk_drv: cancel device even though disk isn't up block: fix leaking page ref on truncated direct io block: ensure bio_iov_add_page can't fail block: ensure iov_iter advances for added pages drivers:md:fix a potential use-after-free bug md/raid5: Ensure batch_last is released before sleeping for quiesce md/raid5: Move stripe_request_ctx up md/raid5: Drop unnecessary call to r5c_check_stripe_cache_usage() md/raid5: Make is_inactive_blocked() helper md/raid5: Refactor raid5_get_active_stripe() block: pass struct queue_limits to the bio splitting helpers block: move bio_allowed_max_sectors to blk-merge.c block: move the call to get_max_io_size out of blk_bio_segment_split ... commit e495274793ea602415d050452088a496abcd9e6c Merge: 746fc76b820d 6b822d408b58 Author: Linus Torvalds Date: Thu Aug 4 19:54:32 2022 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma updates from Jason Gunthorpe: "This cycle we got a new RDMA driver "ERDMA" for the Alibaba cloud environment. Otherwise the changes are dominated by rxe fixes. There is another RDMA driver on the list that might get merged next cycle, 'MANA' for the Azure cloud environment. Summary: - Bug fixes and small features for irdma, hns, siw, qedr, hfi1, mlx5 - General spelling/grammer fixes - rdma cm can follow changes in neighbours for control packets - Significant amounts of rxe fixes and spec compliance changes - Use the modern NAPI API - Use the bitmap API instead of open coding - Performance improvements for rtrs - Add the ERDMA driver for Alibaba cloud - Fix a use after free bug in SRP" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (99 commits) RDMA/ib_srpt: Unify checking rdma_cm_id condition in srpt_cm_req_recv() RDMA/rxe: Fix error unwind in rxe_create_qp() RDMA/mlx5: Add missing check for return value in get namespace flow RDMA/rxe: Split qp state for requester and completer RDMA/rxe: Generate error completion for error requester QP state RDMA/rxe: Update wqe_index for each wqe error completion RDMA/srpt: Fix a use-after-free RDMA/srpt: Introduce a reference count in struct srpt_device RDMA/srpt: Duplicate port name members IB/qib: Fix repeated "in" within comments RDMA/erdma: Add driver to kernel build environment RDMA/erdma: Add the ABI definitions RDMA/erdma: Add the erdma module RDMA/erdma: Add connection management (CM) support RDMA/erdma: Add verbs implementation RDMA/erdma: Add verbs header file RDMA/erdma: Add event queue implementation RDMA/erdma: Add cmdq implementation RDMA/erdma: Add main include file RDMA/erdma: Add the hardware related definitions ... commit f1a15b977ff864513133ecb611eb28603d32c1b4 Author: Dan Carpenter Date: Thu Aug 4 17:33:48 2022 +0300 rv: Unlock on error path in rv_unregister_reactor() Unlock the "rv_interface_lock" mutex before returning. Link: https://lkml.kernel.org/r/YuvYzNfGMgV+PIhd@kili Fixes: 04acadcb4453 ("rv: Add runtime reactors interface") Signed-off-by: Dan Carpenter Signed-off-by: Steven Rostedt (Google) kernel/trace/rv/rv_reactors.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 746fc76b820dce8cbb17a1e5e70a1558db4d7406 Merge: 328141e51e6f 8fcdc238ce1b Author: Linus Torvalds Date: Thu Aug 4 19:47:37 2022 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "Updates to the usual drivers (ufs, qla2xx, target, lpfc, smartpqi, mpi3mr). The main driver change that might cause issues on down the road is the conversion of some of our oldest surviving drivers to the DMA API (should only affect m68k). The only major core change is the rework of async resume; the rest are either completely trivial or for updating deprecated APIs" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (195 commits) scsi: target: Remove XDWRITEREAD emulated support scsi: megaraid: Remove the static variable initialisation scsi: ch: Do not initialise statics to 0 scsi: ufs: core: Fix spelling mistake "Cannnot" -> "Cannot" scsi: target: iscsi: Do not require target authentication scsi: target: iscsi: Allow AuthMethod=None scsi: target: iscsi: Support base64 in CHAP scsi: target: iscsi: Add support for extended CDB AHS scsi: ufs: dt-bindings: Add SC8280XP binding scsi: target: iscsi: Fix clang -Wformat warnings scsi: ufs: core: Read device property for ref clock scsi: libsas: Resume SAS host for phy reset or enable via sysfs scsi: hisi_sas: Modify v3 HW SATA completion error processing scsi: hisi_sas: Relocate DMA unmap of SMP task scsi: hisi_sas: Remove unnecessary variable to hold DMA map elements scsi: hisi_sas: Call hisi_sas_slave_configure() from slave_configure_v3_hw() scsi: mpi3mr: Delete a stray tab scsi: mpi3mr: Unlock on error path scsi: mpi3mr: Reduce VD queue depth on detecting throttling scsi: mpi3mr: Resource Based Metering ... commit 328141e51e6fc79d21168bfd4e356dddc2ec7491 Merge: eff0cb3d91c0 527f36f5efa4 Author: Linus Torvalds Date: Thu Aug 4 19:41:09 2022 -0700 Merge tag 'mmc-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Add support for the asynchronous SDIO wakeup interrupts - Skip redundant evaluation of eMMC HS400 caps when no-MMC-cap - Add support to store error stats from host drivers - Extend debugfs to show error stats from host drivers - Add single I/O read support in the recovery path for 4k sector cards MMC host: - dw_mmc-exynos: Convert corresponding DT bindings to the dtschema - dw_mmc-rockchip: Add support for the Rockchip RV1126 variant - mmc_spi: Convert corresponding DT bindings to the dtschema - mtk-sd: Extend support for interrupts/pinctrls for SDIO low-power mode - mtk-sd: Add support for SDIO wake irqs - mtk-sd: Add support for the Mediatek MT8188 variant - renesas_sdhi: Drop redundant manual tap correction for newer SoCs - renesas_sdhi: Add support for the R-Car S4-8 and generic Gen4 variants - sdhci/cqhci: Add support to capture stats from host errors - sdhci-brcmstb: Add ability to increase max clock rate for SDIO on 72116b0 - sdhci-msm: Add support for the MSM8998 and SM8450 variant - sdhci-of-at91: Fixup UHS-I mode by rewriting of MC1R - sdhci-of-dwcmshc: Add support for the Rockchip rk3588 variant - sdhci-of-dwcmshc: Enable reset support for the Rockchip variants - sdhci-pci-gli: Improve I/O read/write performance for GL9763E - sdhci-s3c: Convert corresponding DT bindings to the dtschema - tmio: Avoid glitches when resetting MEMSTICK core: - A couple of minor fixes and cleanups" * tag 'mmc-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (61 commits) mmc: mediatek: add support for SDIO eint wakup IRQ mmc: core: Add support for SDIO wakeup interrupt dt-bindings: mmc: mtk-sd: extend interrupts and pinctrls properties dt-bindings: mmc: rockchip-dw-mshc: Document Rockchip RV1126 mmc: renesas_sdhi: newer SoCs don't need manual tap correction mmc: cavium-thunderx: Add of_node_put() when breaking out of loop mmc: cavium-octeon: Add of_node_put() when breaking out of loop mmc: core: quirks: Add of_node_put() when breaking out of loop mmc: sdhci-brcmstb: use clk_get_rate(base_clk) in PM resume dt-bindings: mmc: sdhci-msm: Document the SM8450 compatible mmc: sdhci-msm: drop redundant of_device_id entries dt-bindings: mmc: sdhci-msm: add MSM8998 mmc: block: Add single read for 4k sector cards mmc: mxcmmc: Use mmc_card_sdio macro mmc: core: Use mmc_card_* macro and add a new for the sd_combo type dt-bindings: mmc: sdhci-msm: constrain reg-names per variants dt-bindings: mmc: sdhci-msm: fix reg-names entries dt-bindings: mmc: Add compatible for MediaTek MT8188 dt-bindings: mmc: sdhci-msm: document resets mmc: sdhci-of-at91: fix set_uhs_signaling rewriting of MC1R ... commit eff0cb3d91c06acbb957be1134a07afa2c4978e3 Merge: 31be1d0fbd95 c4f36c3ab065 Author: Linus Torvalds Date: Thu Aug 4 19:30:35 2022 -0700 Merge tag 'pci-v5.20-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull pci updates from Bjorn Helgaas: "Enumeration: - Consolidate duplicated 'next function' scanning and extend to allow 'isolated functions' on s390, similar to existing hypervisors (Niklas Schnelle) Resource management: - Implement pci_iobar_pfn() for sparc, which allows us to remove the sparc-specific pci_mmap_page_range() and pci_mmap_resource_range(). This removes the ability to map the entire PCI I/O space using /proc/bus/pci, but we believe that's already been broken since v2.6.28 (Arnd Bergmann) - Move common PCI definitions to asm-generic/pci.h and rework others to be be more specific and more encapsulated in arches that need them (Stafford Horne) Power management: - Convert drivers to new *_PM_OPS macros to avoid need for '#ifdef CONFIG_PM_SLEEP' or '__maybe_unused' (Bjorn Helgaas) Virtualization: - Add ACS quirk for Broadcom BCM5750x multifunction NICs that isolate the functions but don't advertise an ACS capability (Pavan Chebbi) Error handling: - Clear PCI Status register during enumeration in case firmware left errors logged (Kai-Heng Feng) - When we have native control of AER, enable error reporting for all devices that support AER. Previously only a few drivers enabled this (Stefan Roese) - Keep AER error reporting enabled for switches. Previously we enabled this during enumeration but immediately disabled it (Stefan Roese) - Iterate over error counters instead of error strings to avoid printing junk in AER sysfs counters (Mohamed Khalfella) ASPM: - Remove pcie_aspm_pm_state_change() so ASPM config changes, e.g., via sysfs, are not lost across power state changes (Kai-Heng Feng) Endpoint framework: - Don't stop an EPC when unbinding an EPF from it (Shunsuke Mie) Endpoint embedded DMA controller driver: - Simplify and clean up support for the DesignWare embedded DMA (eDMA) controller (Frank Li, Serge Semin) Broadcom STB PCIe controller driver: - Avoid config space accesses when link is down because we can't recover from the CPU aborts these cause (Jim Quinlan) - Look for power regulators described under Root Ports in DT and enable them before scanning the secondary bus (Jim Quinlan) - Disable/enable regulators in suspend/resume (Jim Quinlan) Freescale i.MX6 PCIe controller driver: - Simplify and clean up clock and PHY management (Richard Zhu) - Disable/enable regulators in suspend/resume (Richard Zhu) - Set PCIE_DBI_RO_WR_EN before writing DBI registers (Richard Zhu) - Allow speeds faster than Gen2 (Richard Zhu) - Make link being down a non-fatal error so controller probe doesn't fail if there are no Endpoints connected (Richard Zhu) Loongson PCIe controller driver: - Add ACPI and MCFG support for Loongson LS7A (Huacai Chen) - Avoid config reads to non-existent LS2K/LS7A devices because a hardware defect causes machine hangs (Huacai Chen) - Work around LS7A integrated devices that report incorrect Interrupt Pin values (Jianmin Lv) Marvell Aardvark PCIe controller driver: - Add support for AER and Slot capability on emulated bridge (Pali Rohár) MediaTek PCIe controller driver: - Add Airoha EN7532 to DT binding (John Crispin) - Allow building of driver for ARCH_AIROHA (Felix Fietkau) MediaTek PCIe Gen3 controller driver: - Print decoded LTSSM state when the link doesn't come up (Jianjun Wang) NVIDIA Tegra194 PCIe controller driver: - Convert DT binding to json-schema (Vidya Sagar) - Add DT bindings and driver support for Tegra234 Root Port and Endpoint mode (Vidya Sagar) - Fix some Root Port interrupt handling issues (Vidya Sagar) - Set default Max Payload Size to 256 bytes (Vidya Sagar) - Fix Data Link Feature capability programming (Vidya Sagar) - Extend Endpoint mode support to devices beyond Controller-5 (Vidya Sagar) Qualcomm PCIe controller driver: - Rework clock, reset, PHY power-on ordering to avoid hangs and improve consistency (Robert Marko, Christian Marangi) - Move pipe_clk handling to PHY drivers (Dmitry Baryshkov) - Add IPQ60xx support (Selvam Sathappan Periakaruppan) - Allow ASPM L1 and substates for 2.7.0 (Krishna chaitanya chundru) - Add support for more than 32 MSI interrupts (Dmitry Baryshkov) Renesas R-Car PCIe controller driver: - Convert DT binding to json-schema (Herve Codina) - Add Renesas RZ/N1D (R9A06G032) to rcar-gen2 DT binding and driver (Herve Codina) Samsung Exynos PCIe controller driver: - Fix phy-exynos-pcie driver so it follows the 'phy_init() before phy_power_on()' PHY programming model (Marek Szyprowski) Synopsys DesignWare PCIe controller driver: - Simplify and clean up the DWC core extensively (Serge Semin) - Fix an issue with programming the ATU for regions that cross a 4GB boundary (Serge Semin) - Enable the CDM check if 'snps,enable-cdm-check' exists; previously we skipped it if 'num-lanes' was absent (Serge Semin) - Allocate a 32-bit DMA-able page to be MSI target instead of using a driver data structure that may not be addressable with 32-bit address (Will McVicker) - Add DWC core support for more than 32 MSI interrupts (Dmitry Baryshkov) Xilinx Versal CPM PCIe controller driver: - Add DT binding and driver support for Versal CPM5 Gen5 Root Port (Bharat Kumar Gogada)" * tag 'pci-v5.20-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (150 commits) PCI: imx6: Support more than Gen2 speed link mode PCI: imx6: Set PCIE_DBI_RO_WR_EN before writing DBI registers PCI: imx6: Reformat suspend callback to keep symmetric with resume PCI: imx6: Move the imx6_pcie_ltssm_disable() earlier PCI: imx6: Disable clocks in reverse order of enable PCI: imx6: Do not hide PHY driver callbacks and refine the error handling PCI: imx6: Reduce resume time by only starting link if it was up before suspend PCI: imx6: Mark the link down as non-fatal error PCI: imx6: Move regulator enable out of imx6_pcie_deassert_core_reset() PCI: imx6: Turn off regulator when system is in suspend mode PCI: imx6: Call host init function directly in resume PCI: imx6: Disable i.MX6QDL clock when disabling ref clocks PCI: imx6: Propagate .host_init() errors to caller PCI: imx6: Collect clock enables in imx6_pcie_clk_enable() PCI: imx6: Factor out ref clock disable to match enable PCI: imx6: Move imx6_pcie_clk_disable() earlier PCI: imx6: Move imx6_pcie_enable_ref_clk() earlier PCI: imx6: Move PHY management functions together PCI: imx6: Move imx6_pcie_grp_offset(), imx6_pcie_configure_type() earlier PCI: imx6: Convert to NOIRQ_SYSTEM_SLEEP_PM_OPS() ... commit 31be1d0fbd950395701d9fd47d8fb1f99c996f61 Merge: 36001a2fa6cc a1873f837f9e Author: Linus Torvalds Date: Thu Aug 4 18:44:38 2022 -0700 Merge tag 'dmaengine-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine updates from Vinod Koul: "New support / Core: - Remove DMA_MEMCPY_SG for lack of users - Tegra 234 dmaengine support - Mediatek MT8365 dma support - Apple ADMAC driver Updates: - Yaml conversion for ST-Ericsson DMA40 binding and Freescale edma - rz-dmac updates and device_synchronize support - Bunch of typo in comments fixes in drivers - multithread support in sf-pdma driver" * tag 'dmaengine-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (50 commits) dmaengine: mediatek: mtk-hsdma: Fix typo 'the the' in comment dmaengine: axi-dmac: check cache coherency register dmaengine: sh: rz-dmac: Add device_synchronize callback dmaengine: sprd: Cleanup in .remove() after pm_runtime_get_sync() failed dmaengine: tegra: Add terminate() for Tegra234 dt-bindings: dmaengine: Add compatible for Tegra234 dmaengine: xilinx: use strscpy to replace strlcpy dmaengine: imx-sdma: Add FIFO stride support for multi FIFO script dmaengine: idxd: Correct IAX operation code names dmaengine: imx-dma: Cast of_device_get_match_data() with (uintptr_t) dmaengine: dw-axi-dmac: ignore interrupt if no descriptor dmaengine: dw-axi-dmac: do not print NULL LLI during error dmaengine: altera-msgdma: Fixed some inconsistent function name descriptions dmaengine: imx-sdma: Add missing struct documentation dmaengine: sf-pdma: Add multithread support for a DMA channel dt-bindings: dma: dw-axi-dmac: extend the number of interrupts dmaengine: dmatest: use strscpy to replace strlcpy dmaengine: ste_dma40: fix typo in comment dmaengine: jz4780: fix typo in comment dmaengine: s3c24xx: fix typo in comment ... commit 36001a2fa6cc63d58664a2a99b90a864f9eb587a Merge: 37644cac6e82 08fc500fe3d4 Author: Linus Torvalds Date: Thu Aug 4 18:40:08 2022 -0700 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "The clk core gains a new set of APIs that allow drivers to both acquire clks and prepare and enable them at the same time. This also comes with devm support so that drivers can make a single call to get and prepare and enable the clk and have that all undone when their driver is removed. Many folks have requested this feature over the years, but we've had disagreements about how to implement it and if it was worthwhile to encourage drivers to use such an API. Now it's here, so let's see how it goes. I hope that by introducing this API we can identify drivers that would benefit from further consolidation of clk API usage, possibly by moving such logic to the bus layer and out of drivers altogether. Outside of that major API update, we have the usual collection of driver updates. A few new SoCs are supported, mostly Qualcomm and Renesas this time around. Then we have the long tail of non-critical fixes and minor feature additions to various clk drivers. And finally more clk provider migration to struct clk_parent_data, reducing boot times in the process. Summary: Core: - devm helpers for clk_get() + clk_prepare() and clk_enable() New Drivers: - Support for the camera clock controller in Qualcomm SM8450 and the display and gpu clock controllers in Qualcomm SM8350 - Add support for the Renesas RZ/Five SoC Updates: - Various fixes, new clocks and USB GDSCs are introduced for Qualcomm IPQ8074 - Fixes to Qualcomm MSM8939 for issues introduced by inheriting the MSM8916 GCC driver - Support for a new type of voteable GDSCs used by Qualcomm SC8280XP PCIe GDSCs - Qualcomm SC8280XP pipe clocks transitioned to the new phy-mux implementation - Qualcomm MSM8996 GCC, RPM clock driver and some clocks in MSM8994 GCC are migrated to use clk_parent_data - Corrected the topology for Titan (camera) GDSCs on Qualcomm SDM845 and SM8250 - Qualcomm MSM8916 gains more possible frequencies for its GP clocks. - The GCC and tsens handling on Qualcomm MSM8960 is reworked to mimic the design in IPQ8074 to allow the GCC driver to probe earlier. - The regulator based mmcx supply for Qualcomm dispcc and videocc is dropped, as the only upstream target that adapted this interface was transitioned several kernel versions ago - Qualcomm GDSCs found to be enabled at boot will now reflect in the enable count of the supply, as was done with the regulator supplies previously - Correct adc1, nic_media and edma1's parents for NXP i.MX93 - rdiv, mfd values, the return rate in recalc_rate and add more frequencies in the table for fracn-gppll on i.MX - Remove Allwinner workaround logic/compatible in fixed factor code - MediaTek clk driver cleanups - Add reset support to more MediaTek clk drivers - deduplicate Allwinner ccu_clks arrays - Allwinner H6 GPU DFS support - Adjust Allwinner Kconfig to limit choice - Fix initconst confusion on Renesas R-Car Gen4 - Add GPT/POEG (PWM) clocks and resets on Renesas RZ/G2L - Add PFC and WDT clocks and resets on Renesas RZ/V2M - Add thermal, SDHI, Z (CPU core), PCIe, and HSCIF (serial) clocks on Renesas R-Car S4-8" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (124 commits) clk: fixed-factor: Introduce *clk_hw_register_fixed_factor_parent_hw() clk: mux: Introduce devm_clk_hw_register_mux_parent_hws() clk: divider: Introduce devm_clk_hw_register_divider_parent_hw() clk: qcom: gcc-msm8994: use parent_hws for gpll0/4 clk: qcom: clk-rpm: convert to parent_data API dt-bindings: clock: fix wrong clock documentation for qcom,rpmcc clk: qcom: gcc-msm8939: Add missing USB HS system clock frequencies clk: qcom: gcc-msm8939: Add missing MDSS MDP clock frequencies clk: qcom: gcc-msm8939: Add missing CAMSS CPP clock frequencies clk: qcom: gcc-msm8939: Fix venus0_vcodec0_clk frequency definitions clk: qcom: gcc-msm8939: Add missing CAMSS CCI bus clock clk: qcom: gcc-msm8939: Fix weird field spacing in ftbl_gcc_camss_cci_clk clk: qcom: gdsc: Bump parent usage count when GDSC is found enabled clk: qcom: Drop mmcx gdsc supply for dispcc and videocc clk: qcom: fix build error initializer element is not constant clk: sprd: Add dt-bindings include file for UMS512 dt-bindings: clk: sprd: Add bindings for ums512 clock controller clk: sunxi-ng: sun50i: h6: Modify GPU clock configuration to support DFS dt-bindings: clock: qcom,gcc-msm8996: add more GCC clock sources clk: qcom: add support for SM8350 DISPCC ... commit 37644cac6e8297d0908aef054caabb439c467c7d Merge: 5f0848190c6d c4f0d16daa6d Author: Linus Torvalds Date: Thu Aug 4 18:34:05 2022 -0700 Merge tag 'gpio-updates-for-v6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "Here are the updates for this merge window from the GPIO subsystem. We have more lines removed than added thanks to dropping of a driver for a platform that's no longer supported. Otherwise the changes are pretty straightforward: support for some new models, various improvements to existing drivers, some tweaks to the core library code and DT bindings updates. Summary: - remove gpio-vr41xx driver as the only platform using it got dropped too - add support for suspend/resume to gpio-davinci - improvements to the GPIO character device code - add support for disabling bias for in-kernel users (up until now only user-space could set it) - drop unused devm_gpio_free() - fix a refcount issue in gpiolib OF - use device match helpers where applicable - add support for a new model to gpio-rockchip - non-functional improvements in gpio-adp5588 - improve and simplify teardown in gpio-twl4030 and gpio-ucb1400 - modernize the gpio-74xx-mmio and gpio-adnp drivers - coding style improvements in gpio-xilinx, gpio-104-idi-48 - support new model (pca9571) in gpio-pca9570 - convert the DT bindings to YAML for gpio-mvebu and update the document - don't return error codes from remove() in gpio-brcmstb - add a library for the intel 8255 PPI interface and use it in drivers - reduce using magic numbers and improve code readability in several drivers - convert DT bindings to YAML for gpio-tpic2810 - add new models to DT bindings for gpio-frl-imx - Kconfig improvements - other minor tweaks and improvements" * tag 'gpio-updates-for-v6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (52 commits) dt-bindings: gpio: fsl-imx-gpio: Add i.MXRT compatibles gpio: 74xx-mmio: Use bits instead of plain numbers for flags gpio: xilinx: add missing blank line after declarations MAINTAINERS: Update Intel 8255 GPIO driver file list gpio: gpio-mm: Implement and utilize register structures gpio: 104-idi-48: Implement and utilize register structures gpio: 104-dio-48e: Implement and utilize register structures gpio: i8255: Introduce the Intel 8255 interface library module gpio: 104-idio-16: Implement and utilize register structures gpio: ws16c48: Implement and utilize register structures gpio: remove VR41XX related gpio driver dt-bindings: gpio: add pull-disable flag gpiolib: acpi: support bias pull disable gpiolib: of: support bias pull disable gpiolib: add support for bias pull disable gpio: 74xx-mmio: use bits.h macros for all masks gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in() gpio: 74xx-mmio: Make use of device properties gpiolib: cdev: compile out HTE unless CONFIG_HTE selected gpiolib: cdev: consolidate edge detector configuration flags ... commit 5f0848190c6dd0f5b8a2aaf0f1d900a96d96bee0 Merge: 5bb3bf24b0aa 3d46d7848075 Author: Linus Torvalds Date: Thu Aug 4 18:19:14 2022 -0700 Merge tag 'platform-drivers-x86-v6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates from Hans de Goede: - Microsoft Surface: - SSAM hot unplug support - Surface Pro 8 keyboard cover support - Tablet mode switch support for Surface Pro 8 and Surface Laptop Studio - thinkpad_acpi: - AMD Automatice Mode Transitions (AMT) support - Mellanox: - Vulcan chassis COMe NVSwitch management support - XH3000 support - New generic/shared Intel P2SB (Primary to Sideband) support - Lots of small cleanups - Various small bugfixes - Various new hardware ids / quirks additions * tag 'platform-drivers-x86-v6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (105 commits) platform/x86/intel/vsec: Fix wrong type for local status variables platform/x86: p2sb: Move out of X86_PLATFORM_DEVICES dependency platform/x86: pmc_atom: Fix comment typo platform/surface: gpe: Add support for 13" Intel version of Surface Laptop 4 platform/olpc: Fix uninitialized data in debugfs write platform/mellanox: mlxreg-lc: Fix error flow and extend verbosity platform/x86: pmc_atom: Match all Lex BayTrail boards with critclk_systems DMI table platform/x86: sony-laptop: Remove useless comparisons in sony_pic_read_possible_resource() tools/power/x86/intel-speed-select: Remove unneeded semicolon tools/power/x86/intel-speed-select: Fix off by one check platform/surface: tabletsw: Fix __le32 integer access Documentation/ABI: Add new attributes for mlxreg-io sysfs interfaces Documentation/ABI: mlxreg-io: Fix contact info platform/mellanox: mlxreg-io: Add locking for io operations platform/x86: mlx-platform: Add COME board revision register platform/x86: mlx-platform: Add support for new system XH3000 platform/x86: mlx-platform: Introduce support for COMe NVSwitch management module for Vulcan chassis platform/x86: mlx-platform: Add support for systems equipped with two ASICs platform/x86: mlx-platform: Add cosmetic changes for alignment platform/x86: mlx-platform: Make activation of some drivers conditional ... commit 5bb3bf24b0aaa76253c77e437b88927a32a10c4e Merge: da8d07af4b3e afef1e1a0223 Author: Linus Torvalds Date: Thu Aug 4 18:13:19 2022 -0700 Merge tag 'tag-chrome-platform-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform updates from Tzung-Bi Shih: "cros_ec_proto: - Leverage Kunit and add Kunit test cases - Clean-ups - Fix typo cros_ec_commands: - Fix typo - Fix compile errors cros_kbd_led_backlight: - Support OF match - Support EC PWM backend cros_ec: - Always expose the last resume result to fix sleep hang detection on ARM-based chromebooks wilco_ec: - Fix typo cros_ec_typec: - Clean-ups - Use Type-C framework utilities to manage altmode structs" * tag 'tag-chrome-platform-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: (59 commits) platform/chrome: cros_kunit_util: add default value for `msg->result` platform/chrome: merge Kunit utils and test cases platform/chrome: cros_kbd_led_backlight: fix build warning platform/chrome: cros_ec_proto: add Kunit test for cros_ec_cmd() platform/chrome: cros_ec_proto: add Kunit tests for get_sensor_count platform/chrome: cros_ec_proto: add Kunit tests for check_features platform/chrome: cros_ec_proto: add Kunit tests for get_host_event platform/chrome: cros_ec_proto: add Kunit tests for get_next_event platform/chrome: cros_ec_proto: add Kunit test for cros_ec_map_error() platform/chrome: cros_ec_proto: add Kunit tests for cmd_xfer_status platform/chrome: cros_ec_proto: return -EPROTO if empty payload platform/chrome: cros_ec_proto: add Kunit test for empty payload platform/chrome: cros_ec_proto: return -EAGAIN when retries timed out platform/chrome: cros_ec_proto: change Kunit expectation when timed out platform/chrome: cros_ec_proto: separate cros_ec_wait_until_complete() platform/chrome: cros_ec_proto: separate cros_ec_xfer_command() platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_send_command() platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_cmd_xfer() platform/chrome: cros_ec_proto: add "cros_ec_" prefix to send_command() platform/chrome: cros_ec_typec: Register port altmodes ... commit da8d07af4b3e2e407c5dd13f08b64580931fd1a6 Merge: 8d9420ca9bd9 7e7a24c3c6c9 Author: Linus Torvalds Date: Thu Aug 4 18:08:34 2022 -0700 Merge tag 'devicetree-for-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree updates from Rob Herring: "Bindings: - Add spi-peripheral-props.yaml references to various SPI device bindings - Convert qcom,pm8916-wdt, ds1307, Qualcomm BAM DMA, is31fl319x, skyworks,aat1290, Rockchip EMAC, gpio-ir-receiver, ahci-ceva, Arm CCN PMU, rda,8810pl-intc, sil,sii9022, ps2-gpio, and arm-firmware-suite bindings to DT schema format - New bindings for Arm virtual platforms display, Qualcomm IMEM memory region, Samsung S5PV210 ChipID, EM Microelectronic EM3027 RTC, and arm,cortex-a78ae - Add vendor prefixes for asrock, bytedance, hxt, ingrasys, inventec, quanta, and densitron - Add missing MSI and IOMMU properties to host-generic-pci - Remove bindings for removed EFM32 platform - Remove old chosen.txt binding (replaced by schema) - Treewide add missing type information for properties - Treewide fixing of typos and its vs. it's in bindings. Its all good now. - Drop unnecessary quoting in power related schemas - Several LED binding updates which didn't get picked up - Move various bindings to proper directories DT core code: - Convert unittest GPIO related tests to use fwnode - Check ima-kexec-buffer against memory bounds - Print reserved-memory allocation/reservation failures as errors - Cleanup early_init_dt_reserve_memory_arch() - Simplify of_overlay_fdt_apply() tail" * tag 'devicetree-for-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (65 commits) dt-bindings: mtd: microchip,mchp48l640: use spi-peripheral-props.yaml dt-bindings: power: supply: drop quotes when not needed dt-bindings: power: reset: drop quotes when not needed dt-bindings: power: drop quotes when not needed dt-bindings: PCI: host-generic-pci: Allow IOMMU and MSI properties of/fdt: declared return type does not match actual return type devicetree/bindings: correct possessive "its" typos dt-bindings: net: convert emac_rockchip.txt to YAML dt-bindings: eeprom: microchip,93lc46b: move to eeprom directory dt-bindings: eeprom: at25: use spi-peripheral-props.yaml dt-bindings: display: use spi-peripheral-props.yaml dt-bindings: watchdog: qcom,pm8916-wdt: convert to dtschema dt-bindings: power: reset: qcom,pon: use absolute path to other schema dt-bindings: iio/dac: adi,ad5766: Add missing type to 'output-range-microvolts' dt-bindings: power: supply: charger-manager: Add missing type for 'cm-battery-stat' dt-bindings: panel: raydium,rm67191: Add missing type to 'video-mode' of/fdt: Clean up early_init_dt_reserve_memory_arch() dt-bindings: PCI: fsl,imx6q-pcie: Add missing type for 'reset-gpio-active-high' dt-bindings: rtc: Add EM Microelectronic EM3027 bindings dt-bindings: rtc: ds1307: Convert to json-schema ... commit 8d9420ca9bd9bceddcfab3d0263d6a8e073396fe Merge: c040862bfbd9 a60885b6a97b Author: Linus Torvalds Date: Thu Aug 4 18:04:28 2022 -0700 Merge tag 'for-linus-2022080201' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Jiri Kosina: - support for AMD SOCs using SFH1.1 memory access (Basavaraj Natikar) - XP-PEN Deco L support (José Expósito) - support for Elan eKTH6915 touchscreens (Douglas Anderson) - other small assorted fixes and device ID additions * tag 'for-linus-2022080201' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (39 commits) HID: amd_sfh: Handle condition of "no sensors" HID: amd_sfh: Fix implicit declaration error on i386 HID: apple: Add "GANSS" to the non-Apple list HID: alps: Declare U1_UNICORN_LEGACY support HID: wacom: Force pen out of prox if no events have been received in a while HID: nintendo: Add missing array termination HID: lg-g15: Fix comment typo HID: amd_sfh: Implement SFH1.1 functionality HID: amd_sfh: Move interrupt handling to common interface HID: amd_sfh: Move amd_sfh_work to common interface HID: amd_sfh: Move global functions to static HID: amd_sfh: Add remove operation in amd_mp2_ops HID: amd_sfh: Add PM operations in amd_mp2_ops HID: amd_sfh: Add descriptor operations in amd_mp2_ops HID: amd_sfh: Move request_list variable to client data HID: amd_sfh: Move request_list struct to header file HID: amd_sfh: Move common macros and structures HID: amd_sfh: Add NULL check for hid device HID: core: remove unneeded assignment in hid_process_report() ID: intel-ish-hid: hid-client: drop unexpected word "the" in the comments ... commit e2dcac2f58f5a95ab092d1da237ffdc0da1832cf Author: Jinghao Jia Date: Fri Jul 29 20:17:13 2022 +0000 BPF: Fix potential bad pointer dereference in bpf_sys_bpf() The bpf_sys_bpf() helper function allows an eBPF program to load another eBPF program from within the kernel. In this case the argument union bpf_attr pointer (as well as the insns and license pointers inside) is a kernel address instead of a userspace address (which is the case of a usual bpf() syscall). To make the memory copying process in the syscall work in both cases, bpfptr_t was introduced to wrap around the pointer and distinguish its origin. Specifically, when copying memory contents from a bpfptr_t, a copy_from_user() is performed in case of a userspace address and a memcpy() is performed for a kernel address. This can lead to problems because the in-kernel pointer is never checked for validity. The problem happens when an eBPF syscall program tries to call bpf_sys_bpf() to load a program but provides a bad insns pointer -- say 0xdeadbeef -- in the bpf_attr union. The helper calls __sys_bpf() which would then call bpf_prog_load() to load the program. bpf_prog_load() is responsible for copying the eBPF instructions to the newly allocated memory for the program; it creates a kernel bpfptr_t for insns and invokes copy_from_bpfptr(). Internally, all bpfptr_t operations are backed by the corresponding sockptr_t operations, which performs direct memcpy() on kernel pointers for copy_from/strncpy_from operations. Therefore, the code is always happy to dereference the bad pointer to trigger a un-handle-able page fault and in turn an oops. However, this is not supposed to happen because at that point the eBPF program is already verified and should not cause a memory error. Sample KASAN trace: [ 25.685056][ T228] ================================================================== [ 25.685680][ T228] BUG: KASAN: user-memory-access in copy_from_bpfptr+0x21/0x30 [ 25.686210][ T228] Read of size 80 at addr 00000000deadbeef by task poc/228 [ 25.686732][ T228] [ 25.686893][ T228] CPU: 3 PID: 228 Comm: poc Not tainted 5.19.0-rc7 #7 [ 25.687375][ T228] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS d55cb5a 04/01/2014 [ 25.687991][ T228] Call Trace: [ 25.688223][ T228] [ 25.688429][ T228] dump_stack_lvl+0x73/0x9e [ 25.688747][ T228] print_report+0xea/0x200 [ 25.689061][ T228] ? copy_from_bpfptr+0x21/0x30 [ 25.689401][ T228] ? _printk+0x54/0x6e [ 25.689693][ T228] ? _raw_spin_lock_irqsave+0x70/0xd0 [ 25.690071][ T228] ? copy_from_bpfptr+0x21/0x30 [ 25.690412][ T228] kasan_report+0xb5/0xe0 [ 25.690716][ T228] ? copy_from_bpfptr+0x21/0x30 [ 25.691059][ T228] kasan_check_range+0x2bd/0x2e0 [ 25.691405][ T228] ? copy_from_bpfptr+0x21/0x30 [ 25.691734][ T228] memcpy+0x25/0x60 [ 25.692000][ T228] copy_from_bpfptr+0x21/0x30 [ 25.692328][ T228] bpf_prog_load+0x604/0x9e0 [ 25.692653][ T228] ? cap_capable+0xb4/0xe0 [ 25.692956][ T228] ? security_capable+0x4f/0x70 [ 25.693324][ T228] __sys_bpf+0x3af/0x580 [ 25.693635][ T228] bpf_sys_bpf+0x45/0x240 [ 25.693937][ T228] bpf_prog_f0ec79a5a3caca46_bpf_func1+0xa2/0xbd [ 25.694394][ T228] bpf_prog_run_pin_on_cpu+0x2f/0xb0 [ 25.694756][ T228] bpf_prog_test_run_syscall+0x146/0x1c0 [ 25.695144][ T228] bpf_prog_test_run+0x172/0x190 [ 25.695487][ T228] __sys_bpf+0x2c5/0x580 [ 25.695776][ T228] __x64_sys_bpf+0x3a/0x50 [ 25.696084][ T228] do_syscall_64+0x60/0x90 [ 25.696393][ T228] ? fpregs_assert_state_consistent+0x50/0x60 [ 25.696815][ T228] ? exit_to_user_mode_prepare+0x36/0xa0 [ 25.697202][ T228] ? syscall_exit_to_user_mode+0x20/0x40 [ 25.697586][ T228] ? do_syscall_64+0x6e/0x90 [ 25.697899][ T228] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 25.698312][ T228] RIP: 0033:0x7f6d543fb759 [ 25.698624][ T228] Code: 08 5b 89 e8 5d c3 66 2e 0f 1f 84 00 00 00 00 00 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 73 01 c3 48 8b 0d 97 a6 0e 00 f7 d8 64 89 01 48 [ 25.699946][ T228] RSP: 002b:00007ffc3df78468 EFLAGS: 00000287 ORIG_RAX: 0000000000000141 [ 25.700526][ T228] RAX: ffffffffffffffda RBX: 00007ffc3df78628 RCX: 00007f6d543fb759 [ 25.701071][ T228] RDX: 0000000000000090 RSI: 00007ffc3df78478 RDI: 000000000000000a [ 25.701636][ T228] RBP: 00007ffc3df78510 R08: 0000000000000000 R09: 0000000000300000 [ 25.702191][ T228] R10: 0000000000000005 R11: 0000000000000287 R12: 0000000000000000 [ 25.702736][ T228] R13: 00007ffc3df78638 R14: 000055a1584aca68 R15: 00007f6d5456a000 [ 25.703282][ T228] [ 25.703490][ T228] ================================================================== [ 25.704050][ T228] Disabling lock debugging due to kernel taint Update copy_from_bpfptr() and strncpy_from_bpfptr() so that: - for a kernel pointer, it uses the safe copy_from_kernel_nofault() and strncpy_from_kernel_nofault() functions. - for a userspace pointer, it performs copy_from_user() and strncpy_from_user(). Fixes: af2ac3e13e45 ("bpf: Prepare bpf syscall to be used from kernel and user space.") Link: https://lore.kernel.org/bpf/20220727132905.45166-1-jinghao@linux.ibm.com/ Signed-off-by: Jinghao Jia Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20220729201713.88688-1-jinghao@linux.ibm.com Signed-off-by: Alexei Starovoitov include/linux/bpfptr.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c040862bfbd9c5f3cb64e1df1c623e20e38fe656 Merge: 995177a4c75e 0847d167d0f9 Author: Linus Torvalds Date: Thu Aug 4 15:35:58 2022 -0700 Merge tag 'xtensa-20220804' of https://github.com/jcmvbkbc/linux-xtensa Pull xtensa updates from Max Filippov: - support KCOV - enable ARCH_HAS_GCOV_PROFILE_ALL - minor ISS network driver cleanups * tag 'xtensa-20220804' of https://github.com/jcmvbkbc/linux-xtensa: xtensa: enable ARCH_HAS_GCOV_PROFILE_ALL xtensa: enable KCOV support xtensa: iss: fix handling error cases in iss_net_configure() xtensa: iss/network: provide release() callback xtensa: iss/network: drop 'devices' list commit 995177a4c75ee9b9069d5a313d90c005cf89c1b2 Merge: 7df9075e232e f2d3b9a46e0e Author: Linus Torvalds Date: Thu Aug 4 15:31:09 2022 -0700 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: "Not much this time around, the 5.20-rc1 development updates for arm are: - add KASAN support for vmalloc space on arm - some sparse fixes from Ben Dooks - rework amba device handling (so device addition isn't deferred)" * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 9220/1: amba: Remove deferred device addition ARM: 9219/1: fix undeclared soft_restart ARM: 9218/1: dma-mapping: fix pointer/integer warning ARM: 9217/1: add definition of arch_irq_work_raise() ARM: 9203/1: kconfig: fix MODULE_PLTS for KASAN with KASAN_VMALLOC ARM: 9202/1: kasan: support CONFIG_KASAN_VMALLOC commit 7df9075e232e09d99cf23b657b6cb04c9506e618 Merge: 25e6bed5a648 45fef4c4b9c9 Author: Linus Torvalds Date: Thu Aug 4 15:27:20 2022 -0700 Merge tag 'csky-for-linus-6.0-rc1' of https://github.com/c-sky/csky-linux Pull csky updates from Guo Ren: - Add jump-label implementation - Add qspinlock support - Enable ARCH_INLINE_READ*/WRITE*/SPIN* - Some fixups and a coding convention * tag 'csky-for-linus-6.0-rc1' of https://github.com/c-sky/csky-linux: csky: abiv1: Fixup compile error csky: cmpxchg: Coding convention for BUILD_BUG() csky: Enable ARCH_INLINE_READ*/WRITE*/SPIN* csky: Add qspinlock support csky: Add jump-label implementation csky: Move HEAD_TEXT_SECTION out of __init_begin-end csky: Correct position of _stext csky: Use the bitmap API to allocate bitmaps csky/kprobe: reclaim insn_slot on kprobe unregistration commit 25e6bed5a64836621e41bc9f9d97eb79f1bdfa1e Merge: 7447691ef994 2fb0ec4ae563 Author: Linus Torvalds Date: Thu Aug 4 15:20:39 2022 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32 Pull AVR32 updates from Hans-Christian Noren Egtvedt: "Mostly changes to documentation and comments" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32: video:backlight: remove reference to AVR32 architecture in ltv350qv video: remove support for non-existing atmel,at32ap-lcdc in atmel_lcdfb usb:udc: remove reference to AVR32 architecture in Atmel USBA Kconfig sound:spi: remove reference to AVR32 in Atmel AT73C213 DAC driver net: remove cdns,at32ap7000-macb device tree entry misc: update maintainer email address and description for atmel-ssc mfd: remove reference to AVR32 architecture in atmel-smc.c dma:dw: remove reference to AVR32 architecture in core.c commit bc792884b76f0da2f5c9a8d720e430e2de9756f5 Author: Eric Farman Date: Thu Aug 4 23:39:26 2022 +0200 s390/dasd: Establish DMA alignment linux-next commit bf8d08532bc1 ("iomap: add support for dma aligned direct-io") changes the alignment requirement to come from the block device rather than the block size, and the default alignment requirement is 512-byte boundaries. Since DASD I/O has page alignments for IDAW/TIDAW requests, let's override this value to restore the expected behavior. Make this change for both ECKD and DIAG disciplines, as they both would fall into this category. Leave FBA alone, since it is always comprised of 512-byte blocks. Signed-off-by: Eric Farman Acked-by: Halil Pasic Reviewed-by: Stefan Haberland Signed-off-by: Stefan Haberland Link: https://lore.kernel.org/r/20220804213926.3361574-3-sth@linux.ibm.com Signed-off-by: Jens Axboe drivers/s390/block/dasd_diag.c | 1 + drivers/s390/block/dasd_eckd.c | 1 + 2 files changed, 2 insertions(+) commit bcee43dc6d5bd6f54e5e2a5d696bf8c8f4c141dd Author: Jiang Jian Date: Thu Aug 4 23:39:25 2022 +0200 s390/dasd: drop unexpected word 'for' in comments there is an unexpected word 'for' in the comments that need to be dropped file - drivers/s390/block/dasd.c line - 1728 /* check for for attention message */ changed to: /* check for attention message */ Signed-off-by: Jiang Jian Link: https://lore.kernel.org/r/20220623102114.33249-1-jiangjian@cdjrlc.com Signed-off-by: Stefan Haberland Link: https://lore.kernel.org/r/20220804213926.3361574-2-sth@linux.ibm.com Signed-off-by: Jens Axboe drivers/s390/block/dasd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7447691ef994ffd8072809a11ca9167a2d91564f Merge: 7c5c3a6177fa 251e90e7e346 Author: Linus Torvalds Date: Thu Aug 4 15:10:55 2022 -0700 Merge tag 'for-linus-6.0-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: - a series fine tuning virtio support for Xen guests, including removal the now again unused "platform_has()" feature. - a fix for host admin triggered reboot of Xen guests - a simple spelling fix * tag 'for-linus-6.0-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: don't require virtio with grants for non-PV guests kernel: remove platform_has() infrastructure virtio: replace restricted mem access flag with callback xen: Fix spelling mistake xen/manage: Use orderly_reboot() to reboot commit 7c5c3a6177fa9646884114fc7f2e970b0bc50dc9 Merge: f0a892f599c4 281106f938d3 Author: Linus Torvalds Date: Thu Aug 4 14:59:54 2022 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm updates from Paolo Bonzini: "Quite a large pull request due to a selftest API overhaul and some patches that had come in too late for 5.19. ARM: - Unwinder implementations for both nVHE modes (classic and protected), complete with an overflow stack - Rework of the sysreg access from userspace, with a complete rewrite of the vgic-v3 view to allign with the rest of the infrastructure - Disagregation of the vcpu flags in separate sets to better track their use model. - A fix for the GICv2-on-v3 selftest - A small set of cosmetic fixes RISC-V: - Track ISA extensions used by Guest using bitmap - Added system instruction emulation framework - Added CSR emulation framework - Added gfp_custom flag in struct kvm_mmu_memory_cache - Added G-stage ioremap() and iounmap() functions - Added support for Svpbmt inside Guest s390: - add an interface to provide a hypervisor dump for secure guests - improve selftests to use TAP interface - enable interpretive execution of zPCI instructions (for PCI passthrough) - First part of deferred teardown - CPU Topology - PV attestation - Minor fixes x86: - Permit guests to ignore single-bit ECC errors - Intel IPI virtualization - Allow getting/setting pending triple fault with KVM_GET/SET_VCPU_EVENTS - PEBS virtualization - Simplify PMU emulation by just using PERF_TYPE_RAW events - More accurate event reinjection on SVM (avoid retrying instructions) - Allow getting/setting the state of the speaker port data bit - Refuse starting the kvm-intel module if VM-Entry/VM-Exit controls are inconsistent - "Notify" VM exit (detect microarchitectural hangs) for Intel - Use try_cmpxchg64 instead of cmpxchg64 - Ignore benign host accesses to PMU MSRs when PMU is disabled - Allow disabling KVM's "MONITOR/MWAIT are NOPs!" behavior - Allow NX huge page mitigation to be disabled on a per-vm basis - Port eager page splitting to shadow MMU as well - Enable CMCI capability by default and handle injected UCNA errors - Expose pid of vcpu threads in debugfs - x2AVIC support for AMD - cleanup PIO emulation - Fixes for LLDT/LTR emulation - Don't require refcounted "struct page" to create huge SPTEs - Miscellaneous cleanups: - MCE MSR emulation - Use separate namespaces for guest PTEs and shadow PTEs bitmasks - PIO emulation - Reorganize rmap API, mostly around rmap destruction - Do not workaround very old KVM bugs for L0 that runs with nesting enabled - new selftests API for CPUID Generic: - Fix races in gfn->pfn cache refresh; do not pin pages tracked by the cache - new selftests API using struct kvm_vcpu instead of a (vm, id) tuple" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (606 commits) selftests: kvm: set rax before vmcall selftests: KVM: Add exponent check for boolean stats selftests: KVM: Provide descriptive assertions in kvm_binary_stats_test selftests: KVM: Check stat name before other fields KVM: x86/mmu: remove unused variable RISC-V: KVM: Add support for Svpbmt inside Guest/VM RISC-V: KVM: Use PAGE_KERNEL_IO in kvm_riscv_gstage_ioremap() RISC-V: KVM: Add G-stage ioremap() and iounmap() functions KVM: Add gfp_custom flag in struct kvm_mmu_memory_cache RISC-V: KVM: Add extensible CSR emulation framework RISC-V: KVM: Add extensible system instruction emulation framework RISC-V: KVM: Factor-out instruction emulation into separate sources RISC-V: KVM: move preempt_disable() call in kvm_arch_vcpu_ioctl_run RISC-V: KVM: Make kvm_riscv_guest_timer_init a void function RISC-V: KVM: Fix variable spelling mistake RISC-V: KVM: Improve ISA extension by using a bitmap KVM, x86/mmu: Fix the comment around kvm_tdp_mmu_zap_leafs() KVM: SVM: Dump Virtual Machine Save Area (VMSA) to klog KVM: x86/mmu: Treat NX as a valid SPTE bit for NPT KVM: x86: Do not block APIC write for non ICR registers ... commit 8fcf19696a1bdbabb7774e8d063ee4af91833402 Author: Paul E. McKenney Date: Tue Aug 2 10:39:13 2022 -0700 bpf: Update bpf_design_QA.rst to clarify that BTF_ID does not ABIify a function This patch updates bpf_design_QA.rst to clarify that mentioning a function to the BTF_ID macro does not make that function become part of the Linux kernel's ABI. Suggested-by: Alexei Starovoitov Signed-off-by: Paul E. McKenney Link: https://lore.kernel.org/r/20220802173913.4170192-3-paulmck@kernel.org Signed-off-by: Alexei Starovoitov Documentation/bpf/bpf_design_QA.rst | 7 +++++++ 1 file changed, 7 insertions(+) commit 62fc770d90ef5a92931deb477c384f82be122a18 Author: Paul E. McKenney Date: Tue Aug 2 10:39:12 2022 -0700 bpf: Update bpf_design_QA.rst to clarify that attaching to functions is not ABI This patch updates bpf_design_QA.rst to clarify that the ability to attach a BPF program to an arbitrary function in the kernel does not make that function become part of the Linux kernel's ABI. [ paulmck: Apply Daniel Borkmann feedback. ] Signed-off-by: Paul E. McKenney Link: https://lore.kernel.org/r/20220802173913.4170192-2-paulmck@kernel.org Signed-off-by: Alexei Starovoitov Documentation/bpf/bpf_design_QA.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b9b738eeafe54d960ccb240fc1b0c5031a0d76f5 Author: Paul E. McKenney Date: Tue Aug 2 10:39:11 2022 -0700 bpf: Update bpf_design_QA.rst to clarify that kprobes is not ABI This patch updates bpf_design_QA.rst to clarify that the ability to attach a BPF program to a given point in the kernel code via kprobes does not make that attachment point be part of the Linux kernel's ABI. Signed-off-by: Paul E. McKenney Link: https://lore.kernel.org/r/20220802173913.4170192-1-paulmck@kernel.org Signed-off-by: Alexei Starovoitov Documentation/bpf/bpf_design_QA.rst | 6 ++++++ 1 file changed, 6 insertions(+) commit 12907efde6ad984f2d76cc1a7dbaae132384d8a5 Author: Mike Snitzer Date: Thu Aug 4 15:55:57 2022 -0400 dm verity: have verify_wq use WQ_HIGHPRI if "try_verify_in_tasklet" Allow verify_wq to preempt softirq since verification in tasklet will fall-back to using it for error handling (or if the bufio cache doesn't have required hashes). Suggested-by: Nathan Huckleberry Signed-off-by: Mike Snitzer drivers/md/dm-verity-target.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit f0a892f599c46af673e47418c47c15e69a7b67f4 Author: Sudip Mukherjee Date: Thu Aug 4 19:01:46 2022 +0100 drm/amd/amdgpu: fix build failure due to implicit declaration The builds for alpha and mips allmodconfig fails with the error: drivers/gpu/drm/amd/amdgpu/psp_v13_0.c:534:23: error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration] drivers/gpu/drm/amd/amdgpu/psp_v13_0.c:534:21: error: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion] drivers/gpu/drm/amd/amdgpu/psp_v13_0.c:545:33: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration] Add the header file for vmalloc and vfree. Reported-by: Sudip Mukherjee Suggested-by: Linus Torvalds Signed-off-by: Sudip Mukherjee Signed-off-by: Linus Torvalds drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 1 + 1 file changed, 1 insertion(+) commit c1c76700a0d6e6090ccfe1209527f14c21b6681b Merge: 723c188d5cd4 58301e1c15db Author: Linus Torvalds Date: Thu Aug 4 12:12:54 2022 -0700 Merge tag 'spdx-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx Pull SPDX updates from Greg KH: "Here is the set of SPDX comment updates for 6.0-rc1. Nothing huge here, just a number of updated SPDX license tags and cleanups based on the review of a number of common patterns in GPLv2 boilerplate text. Also included in here are a few other minor updates, two USB files, and one Documentation file update to get the SPDX lines correct. All of these have been in the linux-next tree for a very long time" * tag 'spdx-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: (28 commits) Documentation: samsung-s3c24xx: Add blank line after SPDX directive x86/crypto: Remove stray comment terminator treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_406.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_398.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_391.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_390.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_385.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_319.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_318.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_298.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_292.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_179.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 1) treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_160.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_152.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_149.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_147.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_133.RULE ... commit 723c188d5cd42a07344f997b0b7e1d83b4173c8d Merge: 78acd4ca4334 87f600af59e8 Author: Linus Torvalds Date: Thu Aug 4 12:01:42 2022 -0700 Merge tag 'staging-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here is the big set of staging driver patches for 6.0-rc1. Another round where we removed more lines of code than added, always a nice progression. Some of that came from the movement of the vme code back into staging, and removal of some other of the vme driver code as there are no known users and it is very obsolete and unmaintained. It can be added back easily if someone offers to maintain it. Other than that this merge has lots of little things: - huge cleanups for r8188eu driver - minor cleanups for other wifi drivers - tiny loop fixes for greybus code - other small coding style fixes All of these have been in linux-next for a while with no reported issues" * tag 'staging-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (191 commits) staging: r8188eu: fix potential uninitialised variable use in rtw_pwrctrl.c staging: r8188eu: remove initializer from ret in rtw_pwr_wakeup staging: vt6655: Convert macro vt6655_mac_clear_stck_ds to function staging: vt6655: Rename MACvClearStckDS staging: fbtft: core: set smem_len before fb_deferred_io_init call staging: r8188eu: convert rtw_pwr_wakeup to correct error code semantics staging: r8188eu: make dump_chip_info() static staging: r8188eu: remove DoReserved prototype staging: r8188eu: remove OnAtim prototype staging: r8188eu: remove SetHwReg8188EU() staging: r8188eu: make update_TSF() and correct_TSF() static staging: r8188eu: remove unused parameter from update_TSF() staging: r8188eu: remove unused parameter from correct_TSF() staging: r8188eu: remove HW_VAR_SET_OPMODE from SetHwReg8188EU() staging: pi433: remove duplicated comments staging: qlge: refine variable name staging: vt6655: Convert macro vt6655_mac_word_reg_bits_off to function staging: vt6655: Convert macro vt6655_mac_reg_bits_off to function staging: vt6655: Convert macro vt6655_mac_word_reg_bits_on to function staging: vt6655: Convert macro vt6655_mac_reg_bits_on to function ... commit 78acd4ca433425e6dd4032cfc2156c60e34931f2 Author: Nathan Chancellor Date: Wed Aug 3 09:24:22 2022 -0700 usb: cdns3: Don't use priv_dev uninitialized in cdns3_gadget_ep_enable() Clang warns: drivers/usb/cdns3/cdns3-gadget.c:2290:11: error: variable 'priv_dev' is uninitialized when used here [-Werror,-Wuninitialized] dev_dbg(priv_dev->dev, "usbss: invalid parameters\n"); ^~~~~~~~ include/linux/dev_printk.h:155:18: note: expanded from macro 'dev_dbg' dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~ include/linux/dynamic_debug.h:167:7: note: expanded from macro 'dynamic_dev_dbg' dev, fmt, ##__VA_ARGS__) ^~~ include/linux/dynamic_debug.h:152:56: note: expanded from macro '_dynamic_func_call' __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/dynamic_debug.h:134:15: note: expanded from macro '__dynamic_func_call' func(&id, ##__VA_ARGS__); \ ^~~~~~~~~~~ drivers/usb/cdns3/cdns3-gadget.c:2278:31: note: initialize the variable 'priv_dev' to silence this warning struct cdns3_device *priv_dev; ^ = NULL 1 error generated. The priv_dev assignment was moved below the if statement to avoid potentially dereferencing ep before it was checked but priv_dev is used in the dev_dbg() call. To fix this, move the priv_dev and comp_desc assignments back to their original spot and hoist the ep check above those assignments with a call to pr_debug() instead of dev_dbg(). Fixes: c3ffc9c4ca44 ("usb: cdns3: change place of 'priv_ep' assignment in cdns3_gadget_ep_dequeue(), cdns3_gadget_ep_enable()") Link: https://github.com/ClangBuiltLinux/linux/issues/1680 Signed-off-by: Nathan Chancellor Signed-off-by: Linus Torvalds drivers/usb/cdns3/cdns3-gadget.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 43fa47cb116daa48f731fa5c00d781200addb2ae Author: Mike Snitzer Date: Thu Aug 4 14:53:07 2022 -0400 dm verity: remove WQ_CPU_INTENSIVE flag since using WQ_UNBOUND The documentation [1] says that WQ_CPU_INTENSIVE is "meaningless" for unbound wq. So remove WQ_CPU_INTENSIVE from the verify_wq allocation. 1. https://www.kernel.org/doc/html/latest/core-api/workqueue.html#flags Suggested-by: Maksym Planeta Signed-off-by: Mike Snitzer drivers/md/dm-verity-target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e2e5ea3b28f81512c792f30729edb1db0c21f6a Merge: cfeafd946689 8288c99fc263 Author: Linus Torvalds Date: Thu Aug 4 11:41:28 2022 -0700 Merge tag 'usb-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt updates from Greg KH: "Here is the big set of Thunderbolt and USB changes for 6.0-rc1. Lots of little things here, nothing major, just constant development on some new hardware support and cleanups of older drivers. Highlights are: - lots of typec changes and improvements for new hardware - new gadget controller driver - thunderbolt support for new hardware - the normal set of new usb-serial device ids and cleanups - loads of dwc3 controller fixes and improvements - mtu3 driver updates - testusb fixes for longtime issues (not many people use this tool it seems.) - minor driver fixes and improvements over the USB tree - chromeos platform driver changes were added and then reverted as they depened on some typec changes, but the cross-tree merges caused problems so they will come back later through the platform tree. All of these have been in linux-next for a while now with no reported issues" * tag 'usb-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (193 commits) usb: misc: onboard_usb_hub: Remove duplicated power_on delay usb: misc: onboard_usb_hub: Add TI USB8041 hub support usb: misc: onboard_usb_hub: Add reset-gpio support USB: usbsevseg: convert sysfs snprintf to sysfs_emit dt-bindings: usb: Add binding for TI USB8041 hub controller ARM: multi_v7_defconfig: enable USB onboard HUB driver ARM: dts: stm32: add support for USB2514B onboard hub on stm32mp15xx-dkx usb: misc: onboard-hub: add support for Microchip USB2514B USB 2.0 hub dt-bindings: usb: generic-ehci: allow usb-hcd schema properties usb: typec: ucsi: stm32g0: add bootloader support usb: typec: ucsi: stm32g0: add support for stm32g0 controller dt-bindings: usb: typec: add bindings for stm32g0 controller usb: typec: ucsi: Acknowledge the GET_ERROR_STATUS command completion usb: cdns3: change place of 'priv_ep' assignment in cdns3_gadget_ep_dequeue(), cdns3_gadget_ep_enable() usb/chipidea: fix repeated words in comments usb: renesas-xhci: Do not print any log while fw verif success usb: typec: retimer: Add missing id check in match callback USB: xhci: Fix comment typo usb/typec/tcpm: fix repeated words in comments usb/musb: fix repeated words in comments ... commit e9307e3deb52603c4f742624fa4799c7996422d8 Author: Mike Snitzer Date: Thu Aug 4 13:37:53 2022 -0400 dm verity: only copy bvec_iter in verity_verify_io if in_tasklet Avoid extra bvec_iter copy unless it is needed to allow retrying verification, that failed from a tasklet, from a workqueue. Signed-off-by: Mike Snitzer drivers/md/dm-verity-target.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit cfeafd94668910334a77c9437a18212baf9f5610 Merge: 228dfe98a313 273aaa24369c Author: Linus Torvalds Date: Thu Aug 4 11:31:20 2022 -0700 Merge tag 'driver-core-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core / kernfs updates from Greg KH: "Here is the set of driver core and kernfs changes for 6.0-rc1. The "biggest" thing in here is some scalability improvements for kernfs for large systems. Other than that, included in here are: - arch topology and cache info changes that have been reviewed and discussed a lot. - potential error path cleanup fixes - deferred driver probe cleanups - firmware loader cleanups and tweaks - documentation updates - other small things All of these have been in the linux-next tree for a while with no reported problems" * tag 'driver-core-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (63 commits) docs: embargoed-hardware-issues: fix invalid AMD contact email firmware_loader: Replace kmap() with kmap_local_page() sysfs docs: ABI: Fix typo in comment kobject: fix Kconfig.debug "its" grammar kernfs: Fix typo 'the the' in comment docs: driver-api: firmware: add driver firmware guidelines. (v3) arch_topology: Fix cache attributes detection in the CPU hotplug path ACPI: PPTT: Leave the table mapped for the runtime usage cacheinfo: Use atomic allocation for percpu cache attributes drivers/base: fix userspace break from using bin_attributes for cpumap and cpulist MAINTAINERS: Change mentions of mpm to olivia docs: ABI: sysfs-devices-soc: Update Lee Jones' email address docs: ABI: sysfs-class-pwm: Update Lee Jones' email address Documentation/process: Add embargoed HW contact for LLVM Revert "kernfs: Change kernfs_notify_list to llist." ACPI: Remove the unused find_acpi_cpu_cache_topology() arch_topology: Warn that topology for nested clusters is not supported arch_topology: Add support for parsing sockets in /cpu-map arch_topology: Set cluster identifier in each core/thread from /cpu-map arch_topology: Limit span of cpu_clustergroup_mask() ... commit 228dfe98a313f6b6bff5da8b2c5e650e297ebf1a Merge: 798cd57cd5f8 b5276c924497 Author: Linus Torvalds Date: Thu Aug 4 11:05:48 2022 -0700 Merge tag 'char-misc-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char / misc driver updates from Greg KH: "Here is the large set of char and misc and other driver subsystem changes for 6.0-rc1. Highlights include: - large set of IIO driver updates, additions, and cleanups - new habanalabs device support added (loads of register maps much like GPUs have) - soundwire driver updates - phy driver updates - slimbus driver updates - tiny virt driver fixes and updates - misc driver fixes and updates - interconnect driver updates - hwtracing driver updates - fpga driver updates - extcon driver updates - firmware driver updates - counter driver update - mhi driver fixes and updates - binder driver fixes and updates - speakup driver fixes All of these have been in linux-next for a while without any reported problems" * tag 'char-misc-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (634 commits) drivers: lkdtm: fix clang -Wformat warning char: remove VR41XX related char driver misc: Mark MICROCODE_MINOR unused spmi: trace: fix stack-out-of-bound access in SPMI tracing functions dt-bindings: iio: adc: Add compatible for MT8188 iio: light: isl29028: Fix the warning in isl29028_remove() iio: accel: sca3300: Extend the trigger buffer from 16 to 32 bytes iio: fix iio_format_avail_range() printing for none IIO_VAL_INT iio: adc: max1027: unlock on error path in max1027_read_single_value() iio: proximity: sx9324: add empty line in front of bullet list iio: magnetometer: hmc5843: Remove duplicate 'the' iio: magn: yas530: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: magnetometer: ak8974: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: light: veml6030: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: light: vcnl4035: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: light: vcnl4000: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: light: tsl2591: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() iio: light: tsl2583: Use DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr() iio: light: isl29028: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() iio: light: gp2ap002: Switch to DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr() ... commit 0a36463f4ca287e4d4ac15580c0aae5b23619212 Author: Mike Snitzer Date: Wed Aug 3 22:43:22 2022 -0400 dm verity: optimize verity_verify_io if FEC not configured Only declare and copy bvec_iter if CONFIG_DM_VERITY_FEC is defined and FEC enabled for the verity device. Signed-off-by: Mike Snitzer drivers/md/dm-verity-target.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit ba2cce82ba1ba74cd83bb3fd0e47849af4f2a605 Author: Mike Snitzer Date: Mon Jul 25 16:52:17 2022 -0400 dm verity: conditionally enable branching for "try_verify_in_tasklet" Use jump_label to limit the need for branching unless the optional "try_verify_in_tasklet" feature is used. Signed-off-by: Mike Snitzer drivers/md/dm-verity-target.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 3c1c875d058669b4dee68f877ec8a65ad4ae8b5b Author: Mike Snitzer Date: Mon Jul 25 18:26:48 2022 -0400 dm bufio: conditionally enable branching for DM_BUFIO_CLIENT_NO_SLEEP Use jump_label to limit the need for branching unless the optional DM_BUFIO_CLIENT_NO_SLEEP is used. Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit df326e7a06990bab011afc8c17de1ab2774e4bb8 Author: Mike Snitzer Date: Tue Jul 26 11:29:50 2022 -0400 dm verity: allow optional args to alter primary args handling The previous commit ("dm verity: Add optional "try_verify_in_tasklet" feature") imposed that CRYPTO_ALG_ASYNC mask be used even if the optional "try_verify_in_tasklet" feature was not specified. This was because verity_parse_opt_args() was called after handling the primary args (due to it having data dependencies on having first parsed all primary args). Enhance verity_ctr() so that simple optional args, that don't have a data dependency on primary args parsing, can alter how the primary args are handled. In practice this means verity_parse_opt_args() gets called twice. First with the new 'only_modifier_opts' arg set to true, then again with it set to false _after_ parsing all primary args. This allows the v->use_tasklet flag to be properly set and then used when verity_ctr() parses the primary args and then calls crypto_alloc_ahash() with CRYPTO_ALG_ASYNC conditionally set. Signed-off-by: Mike Snitzer drivers/md/dm-verity-target.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) commit 5721d4e5a9cdb148f681a004ae5748890a0e2d90 Author: Nathan Huckleberry Date: Fri Jul 22 09:38:23 2022 +0000 dm verity: Add optional "try_verify_in_tasklet" feature Using tasklets for disk verification can reduce IO latency. When there are accelerated hash instructions it is often better to compute the hash immediately using a tasklet rather than deferring verification to a work-queue. This reduces time spent waiting to schedule work-queue jobs, but requires spending slightly more time in interrupt context. If the dm-bufio cache does not have the required hashes we fallback to the work-queue implementation. FEC is only possible using work-queue because code to support the FEC feature may sleep. The following shows a speed comparison of random reads on a dm-verity device. The dm-verity device uses a 1G ramdisk for data and a 1G ramdisk for hashes. One test was run using tasklets and one test was run using the existing work-queue solution. Both tests were run when the dm-bufio cache was hot. The tasklet implementation performs significantly better since there is no time spent waiting for work-queue jobs to be scheduled. READ: bw=181MiB/s (190MB/s), 181MiB/s-181MiB/s (190MB/s-190MB/s), io=512MiB (537MB), run=2827-2827msec READ: bw=23.6MiB/s (24.8MB/s), 23.6MiB/s-23.6MiB/s (24.8MB/s-24.8MB/s), io=512MiB (537MB), run=21688-21688msec Signed-off-by: Nathan Huckleberry Signed-off-by: Mike Snitzer drivers/md/dm-verity-target.c | 103 +++++++++++++++++++++++++++++++++++------- drivers/md/dm-verity.h | 6 ++- 2 files changed, 91 insertions(+), 18 deletions(-) commit 798cd57cd5f871452461746032cf6ee50b0fd69a Author: Dave Airlie Date: Thu Aug 4 15:50:20 2022 +1000 drm/amd/display: restore code for plane with no modifiers When this file was split in commit 5d945cbcd4b1 ("drm/amd/display: Create a file dedicated to planes") this chunk seemed to get dropped. Linus noticed on this rx580 and I've reproduced on FIJI which makes sense as these are pre-modifier GPUs. With this applied, I get gdm back. Fixes: 5d945cbcd4b1 ("drm/amd/display: Create a file dedicated to planes") Signed-off-by: Dave Airlie Reported-and-tested-by: Linus Torvalds Reviewed-by: Harry Wentland Signed-off-by: Linus Torvalds drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 3 +++ 1 file changed, 3 insertions(+) commit c4f36c3ab065065a87d641ca2fd5d5c4eb2bfa82 Merge: 805f91bc5226 933c5a4f87d9 Author: Bjorn Helgaas Date: Thu Aug 4 11:46:53 2022 -0500 Merge branch 'pci/header-cleanup-immutable' - Remove pci_get_legacy_ide_irq(); use ATA_PRIMARY_IRQ() and ATA_SECONDARY_IRQ() instead (Stafford Horne) - Remove isa_dma_bridge_buggy, except for x86_32, the only place it's used (Stafford Horne) - Define ARCH_GENERIC_PCI_MMAP_RESOURCE for csky (Stafford Horne) - Move common PCI definitions that arches sometimes override to asm-generic/pci.h (Stafford Horne) - Include for 'isa_dma_bridge_buggy' when needed (bisection hole here) (Randy Dunlap) * pci/header-cleanup-immutable: PCI: Stub __pci_ioport_map() for arches that don't support it at all x86/cyrix: include header linux/isa-dma.h asm-generic: Add new pci.h and use it csky: PCI: Define ARCH_GENERIC_PCI_MMAP_RESOURCE PCI: Move isa_dma_bridge_buggy out of asm/dma.h PCI: Remove pci_get_legacy_ide_irq() and asm-generic/pci.h commit 805f91bc52269597c0808de260305a60309ae92e Merge: ed89d69a1506 6943f3e3ffe5 Author: Bjorn Helgaas Date: Thu Aug 4 11:46:53 2022 -0500 Merge branch 'pci/misc' - Drop of_match_ptr() to avoid unused variables when CONFIG_OF is unset (Bjorn Helgaas) - Fix ARM pci_remap_iospace() when CONFIG_MMU unset to avoid build errors (Pali Rohár) * pci/misc: PCI/ACPI: Update link to PCI firmware specification PCI: Drop of_match_ptr() to avoid unused variables commit ed89d69a150660f3268c05ad51e715cd9e3009da Merge: 56ebef0a8226 19b7858c3357 Author: Bjorn Helgaas Date: Thu Aug 4 11:46:52 2022 -0500 Merge branch 'pci/ctrl/pm-ops' - Convert to new *_PM_OPS macros to avoid need for "#ifdef CONFIG_PM_SLEEP" or "__maybe_unused" (Bjorn Helgaas) * pci/ctrl/pm-ops: PCI: Convert to new *_PM_OPS macros commit 56ebef0a82264835fd032f1716d72beabc424189 Merge: a91c6db7f3da 4e6217e3af8a Author: Bjorn Helgaas Date: Thu Aug 4 11:46:52 2022 -0500 Merge branch 'pci/ctrl/xilinx-cpm' - Add DT binding and driver support for Versal CPM5 Gen5 Root Port (Bharat Kumar Gogada) * pci/ctrl/xilinx-cpm: MAINTAINERS: Add Xilinx Versal CPM Root Port maintainers PCI: xilinx-cpm: Add support for Versal CPM5 Root Port dt-bindings: PCI: xilinx-cpm: Add Versal CPM5 Root Port commit a91c6db7f3da76ffcd4e809ecb28f118e7effb91 Merge: 64451ac83fe6 57a128acaba0 Author: Bjorn Helgaas Date: Thu Aug 4 11:46:51 2022 -0500 Merge branch 'pci/ctrl/vmd' - Use devm_kasprintf() instead of simple kasprintf() (Subramanian Mohan) - Add [8086:7D0B] and [8086:AD0B] devices to VMD driver (Francisco Munoz) * pci/ctrl/vmd: PCI: vmd: Add DID 8086:7D0B and 8086:AD0B for Intel MTL SKUs PCI: vmd: Use devm_kasprintf() instead of simple kasprintf() commit 64451ac83fe6ab4be1f4385110921df7d433ec7e Merge: 085c2d6739ce a54e19073718 Author: Bjorn Helgaas Date: Thu Aug 4 11:46:51 2022 -0500 Merge branch 'pci/ctrl/tegra194' - Fix tegra_pcie_config_ep() power management in error path (Miaoqian Lin) - Convert DT binding to json-schema (Vidya Sagar) - Add DT bindings and driver support for Tegra234 Root Port and Endpoint mode (Vidya Sagar) - Disable MSI for Tegra234 Root Ports so they use INTx for all events (PCIe doesn't allow mixing INTx and MSI/MSI-X) (Vidya Sagar) - Search for Vendor-Specific RAS-DEC capability instead of hard-coding offset (Vidya Sagar) - Fix unintentional APPL_INTR_STATUS_L0 value overwrite in Root Port interrupt handling (Vidya Sagar) - Clear Bandwidth Management interrupt status bit to avoid interrupt storm (Vidya Sagar) - Set default Max Payload Size to 256 bytes (Vidya Sagar) - Fix offset when clearing bit in Data Link Feature capability (Vidya Sagar) - Extend Endpoint mode support to devices beyond Controller-5 (Vidya Sagar) * pci/ctrl/tegra194: PCI: tegra194: Add Tegra234 PCIe support PCI: tegra194: Extend Endpoint mode support PCI: tegra194: Fix link up retry sequence PCI: tegra194: Clean up the exit path for Endpoint mode PCI: tegra194: Enable support for 256 Byte payload PCI: tegra194: Clear bandwidth management status PCI: tegra194: Fix Root Port interrupt handling PCI: tegra194: Find RAS DES PCIe capability offset Revert "PCI: tegra194: Rename tegra_pcie_dw to tegra194_pcie" PCI: Disable MSI for Tegra234 Root Ports dt-bindings: PCI: tegra234: Add schema for tegra234 Endpoint mode dt-bindings: PCI: tegra234: Add schema for tegra234 Root Port mode dt-bindings: PCI: tegra194: Convert to json-schema PCI: tegra194: Fix PM error handling in tegra_pcie_config_ep() # Conflicts: # drivers/pci/controller/dwc/pcie-designware.h # drivers/pci/controller/dwc/pcie-tegra194.c commit 085c2d6739ce4b38984a93997765dfc4ca77ce19 Merge: 3aa321dc0afc aa195350cdc8 Author: Bjorn Helgaas Date: Thu Aug 4 11:41:59 2022 -0500 Merge branch 'pci/ctrl/switchtec' - Prefer ida_alloc()/free() over ida_simple_get()/remove() (Ke Liu) * pci/ctrl/switchtec: PCI: switchtec: Prefer ida_alloc()/free() over ida_simple_get()/remove() commit 3aa321dc0afc6372384bafd336439ac60fad1a90 Merge: 9195e6dd9b49 aefffba67288 Author: Bjorn Helgaas Date: Thu Aug 4 11:41:58 2022 -0500 Merge branch 'pci/ctrl/rcar-gen2' - Convert DT binding to json-schema (Herve Codina) - Add Renesas RZ/N1D (R9A06G032) to rcar-gen2 DT binding (Herve Codina) - Add Renesas RZ/N1D compatible string ("renesas,pci-rzn1") to rcar-gen2 driver (Herve Codina) * pci/ctrl/rcar-gen2: PCI: rcar-gen2: Add RZ/N1 SOC family compatible string dt-bindings: PCI: renesas,pci-rcar-gen2: Add device tree support for R9A06G032 dt-bindings: PCI: pci-rcar-gen2: Convert bindings to json-schema commit 9195e6dd9b49b98e2bdfea94a5737142d4f49c6a Merge: 4faef1089652 5147ba8af2d7 Author: Bjorn Helgaas Date: Thu Aug 4 11:41:58 2022 -0500 Merge branch 'pci/ctrl/qcom' - Add PHY clock source implementation (Dmitry Baryshkov) - Use new clk_regmap_phy_mux_ops for gcc-sm8450 and gcc-sc7280 PCIe pipe clocks (Dmitry Baryshkov) - Set up rev 2.1.0 PARF_PHY before enabling clocks (Christian Marangi) - Power on PHY before accessing IPQ8074 DBI registers to avoid boot hangs (Robert Marko) - Power on PHY before accessing DBI registers on all variants for consistency (Robert Marko) - Remove unnecessary pipe_clk handling since this is done in PHY drivers (Dmitry Baryshkov) - Drop manual pipe_clk_src handling (Dmitry Baryshkov) - Move GEN3_RELATED DBI definitions to common dwc header (Baruch Siach) - Define slot capabilities using generic PCI_EXP_SLTCAP_* macros (Baruch Siach) - Add IPQ60xx support (Selvam Sathappan Periakaruppan) - Fix DT description typo (Baruch Siach) - Fix DT "compatibles" typo (Johan Hovold) - Allow ASPM L1 and substates for 2.7.0 (Krishna chaitanya chundru) * pci/ctrl/qcom: PCI: qcom: Allow ASPM L1 and substates for 2.7.0 dt-bindings: PCI: qcom: Fix reset conditional dt-bindings: PCI: qcom: Fix description typo PCI: qcom: Add IPQ60xx support PCI: qcom: Define slot capabilities using PCI_EXP_SLTCAP_* PCI: dwc: Move GEN3_RELATED DBI definitions to common header PCI: qcom: Drop manual pipe_clk_src handling PCI: qcom: Remove unnecessary pipe_clk handling PCI: qcom: Power on PHY before DBI register accesses PCI: qcom: Power on PHY before IPQ8074 DBI register accesses PCI: qcom: Set up rev 2.1.0 PARF_PHY before enabling clocks clk: qcom: gcc-sc7280: use new clk_regmap_phy_mux_ops for PCIe pipe clocks clk: qcom: gcc-sm8450: use new clk_regmap_phy_mux_ops for PCIe pipe clocks clk: qcom: regmap: add PHY clock source implementation commit 4faef1089652200be54e116a22b1d3ab725f9404 Merge: f3305ae56615 f030304fdeb8 Author: Bjorn Helgaas Date: Thu Aug 4 11:41:57 2022 -0500 Merge branch 'pci/ctrl/microchip' - Fix refcount leak in mc_pcie_init_irq_domains() (Miaoqian Lin) * pci/ctrl/microchip: PCI: microchip: Fix refcount leak in mc_pcie_init_irq_domains() commit f3305ae56615db2d9ee85bfbc2e2ef0deb887e41 Merge: 359a98325be5 28fc842e1472 Author: Bjorn Helgaas Date: Thu Aug 4 11:41:57 2022 -0500 Merge branch 'pci/ctrl/mediatek-gen3' - Fix refcount leak in mtk_pcie_init_irq_domains() (Miaoqian Lin) - Print decoded LTSSM state when the link doesn't come up (Jianjun Wang) * pci/ctrl/mediatek-gen3: PCI: mediatek-gen3: Print LTSSM state when PCIe link down PCI: mediatek-gen3: Fix refcount leak in mtk_pcie_init_irq_domains() commit 359a98325be5dc9ac5e999a88df8048a60e5f7a2 Merge: b4773c53c54a b3b76fc86f0f Author: Bjorn Helgaas Date: Thu Aug 4 11:41:57 2022 -0500 Merge branch 'pci/ctrl/mediatek' - Add Airoha EN7532 to DT binding (John Crispin) - Allow building of mediatek driver for ARCH_AIROHA (Felix Fietkau) * pci/ctrl/mediatek: PCI: mediatek: Allow building for ARCH_AIROHA dt-bindings: PCI: mediatek: Add Airoha EN7532 support commit b4773c53c54a3511aba30028d6df95c2e8433f09 Merge: 13506868d9f4 930c6074d7dd Author: Bjorn Helgaas Date: Thu Aug 4 11:41:56 2022 -0500 Merge branch 'pci/ctrl/loongson' - Wrap ARM64-specific MCFG quirks in #ifdef so Loongson can use the file (Huacai Chen) - Use generic (not 32-bit only) config accesses for LS2K/LS7A (Huacai Chen) - Add ACPI and MCFG support for Loongson LS7A (Huacai Chen) - Avoid config reads to non-existent LS2K/LS7A devices because a hardware defect causes machine hangs (Huacai Chen) - Work around LS7A integrated devices that report incorrect Interrupt Pin values (Jianmin Lv) * pci/ctrl/loongson: PCI: loongson: Work around LS7A incorrect Interrupt Pin registers PCI: loongson: Don't access non-existent devices PCI: loongson: Add ACPI init support PCI: loongson: Use generic 8/16/32-bit config ops on LS2K/LS7A PCI/ACPI: Guard ARM64-specific mcfg_quirks commit 13506868d9f4011383fd652eb07fcc80bba1a456 Merge: 468276d4ea40 52664090101a Author: Bjorn Helgaas Date: Thu Aug 4 11:41:56 2022 -0500 Merge branch 'pci/ctrl/iproc' - Use bitmap API to allocate bitmaps instead of doing it by hand (Christophe JAILLET) * pci/ctrl/iproc: PCI: iproc: Use bitmap API to allocate bitmaps commit 468276d4ea40fa4f4c3209d52cd596eb8a2061cc Merge: 0c8b7d1273ee 6213c6c545cb Author: Bjorn Helgaas Date: Thu Aug 4 11:41:55 2022 -0500 Merge branch 'pci/ctrl/imx6' - Factor out ref clock disables to match enables (Bjorn Helgaas) - Collect clock enables in imx6_pcie_clk_enable() (Richard Zhu) - Propagate regulator and clock errors back to .host_init() caller (Richard Zhu) - Disable i.MX6QDL clock when disabling ref clocks (Richard Zhu) - Call host init function directly in resume instead of duplicating the code (Richard Zhu) - Turn off regulators when suspending (Richard Zhu) - Make link being down a non-fatal error so probe doesn't fail (Richard Zhu) - Start link in resume only if it was up before suspend to reduce resume time (Richard Zhu) - Move PHY init and power-on out of clock- and reset-related functions (Richard Zhu) - Rework suspend callback to be more symmetric with resume (Richard Zhu) - Set PCIE_DBI_RO_WR_EN before writing DBI registers (Richard Zhu) - Allow speeds faster than Gen2 (Richard Zhu) * pci/ctrl/imx6: PCI: imx6: Support more than Gen2 speed link mode PCI: imx6: Set PCIE_DBI_RO_WR_EN before writing DBI registers PCI: imx6: Reformat suspend callback to keep symmetric with resume PCI: imx6: Move the imx6_pcie_ltssm_disable() earlier PCI: imx6: Disable clocks in reverse order of enable PCI: imx6: Do not hide PHY driver callbacks and refine the error handling PCI: imx6: Reduce resume time by only starting link if it was up before suspend PCI: imx6: Mark the link down as non-fatal error PCI: imx6: Move regulator enable out of imx6_pcie_deassert_core_reset() PCI: imx6: Turn off regulator when system is in suspend mode PCI: imx6: Call host init function directly in resume PCI: imx6: Disable i.MX6QDL clock when disabling ref clocks PCI: imx6: Propagate .host_init() errors to caller PCI: imx6: Collect clock enables in imx6_pcie_clk_enable() PCI: imx6: Factor out ref clock disable to match enable PCI: imx6: Move imx6_pcie_clk_disable() earlier PCI: imx6: Move imx6_pcie_enable_ref_clk() earlier PCI: imx6: Move PHY management functions together PCI: imx6: Move imx6_pcie_grp_offset(), imx6_pcie_configure_type() earlier PCI: imx6: Convert to NOIRQ_SYSTEM_SLEEP_PM_OPS() commit 0c8b7d1273ee3e2466167999b2fc4815d3759c83 Merge: fea77e9f2978 15a232408a8a Author: Bjorn Helgaas Date: Thu Aug 4 11:41:55 2022 -0500 Merge branch 'pci/ctrl/fu740' - Remove unnecessary include files (Bjorn Helgaas) * pci/ctrl/fu740: PCI: fu740: Remove unnecessary include files commit fea77e9f29782f73b72ac1bd6e669ccd82841204 Merge: 94d13317bef3 22f3571cbc84 Author: Bjorn Helgaas Date: Thu Aug 4 11:41:55 2022 -0500 Merge branch 'pci/ctrl/exynos' - Move samsung phy-exynos-pcie init all to exynos5433_pcie_phy_init() instead of splitting across phy_init() and phy_power_on() (Marek Szyprowski) - Call phy_init() before phy_power_on() for samsung phy-exynos-pcie, as required by the PHY programming model (Marek Szyprowski) * pci/ctrl/exynos: PCI: exynos: Correct generic PHY usage phy: samsung: phy-exynos-pcie: sanitize init/power_on callbacks commit 94d13317bef31a2ec149c8f245302ffdda3c54da Merge: 964db794ae3c 8353813c88ef Author: Bjorn Helgaas Date: Thu Aug 4 11:41:54 2022 -0500 Merge branch 'pci/ctrl/dwc-edma' - Remove unused struct dw_edma_chip.irq (Frank Li) - Move eDMA private data from struct dw_edma to struct dw_edma_chip (Frank Li) - Convert "struct dw_edma_region rg_region" to "void __iomem *reg_base" since only the virtual address (not physical address or size) is used (Frank Li) - Rename "*_ch_cnt" to "ll_*_cnt" to reflect actual usage (Frank Li) - Drop dma_slave_config.direction field usage (Serge Semin) - Fix eDMA Rd/Wr-channels and DMA-direction semantics (Serge Semin) - Add chip-specific DW_EDMA_CHIP_LOCAL flag to indicate that local eDMA doesn't require generating MSIs to remote (Frank Li) - Enable DMA tests for endpoints that support it (Frank Li) * pci/ctrl/dwc-edma: PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities dmaengine: dw-edma: Add support for chip-specific flags dmaengine: dw-edma: Fix eDMA Rd/Wr-channels and DMA-direction semantics dmaengine: dw-edma: Drop dma_slave_config.direction field usage dmaengine: dw-edma: Rename wr(rd)_ch_cnt to ll_wr(rd)_cnt in struct dw_edma_chip dmaengine: dw-edma: Change rg_region to reg_base in struct dw_edma_chip dmaengine: dw-edma: Detach the private data and chip info structures dmaengine: dw-edma: Remove unused irq field in struct dw_edma_chip commit 964db794ae3cb8c0de92ce465569ee128ab0d6ce Merge: 9154b00f51ea 91a773f9986b Author: Bjorn Helgaas Date: Thu Aug 4 11:41:54 2022 -0500 Merge branch 'pci/ctrl/dwc' - Stop link on host_init errors and de-initialization (Serge Semin) - Add support for unrolled iATU register space in dw_pcie_disable_atu() (Serge Semin) - Disable outbound windows only for controllers that use iATU (Serge Semin) - Set INCREASE_REGION_SIZE flag based on limit address, not on the size, since even a small size may cross a 4GB boundary (Serge Semin) - Deallocate EPC memory on dw_pcie_ep_init() errors to avoid a leak (Serge Semin) - Always enable CDM check if "snps,enable-cdm-check" exists instead of exiting early if the optional "num-lanes" was absent (Serge Semin) - Simplify detection of whether we're using unrolled iATU registers (Serge Semin) - Make dw_pcie_link_up() more generic by using dw_pcie_readl_dbi() instead of readl() (Serge Semin) - Add dw_pcie_start_link() and dw_pcie_stop_link() wrappers to factor out checks for ops being implemented (Serge Semin) - Move io_cfg_atu_shared to struct pcie_port and rename to cfg0_io_shared, since it's not used by dwc common code or dwc endpoint code (Serge Semin) - Rename struct pcie_port to dw_pcie_rp to indicate that it's DesignWare-specific (Serge Semin) - Drop unused struct dw_plat_pcie regmap pointer (Serge Semin) - Fix some coding style issues (Serge Semin) - Log link speed and width if it comes up (Serge Semin) - Save DWC IP core version in native format as read from PORT_LOGIC.PCIE_VERSION_OFF register (Serge Semin) - Read DWC IP core version from PORT_LOGIC.PCIE_VERSION_OFF (Serge Semin) - Add macros to compare Synopsys IP core versions (Serge Semin) - Drop manual DWC IP core version setup from intel-gw and tegra194 (Serge Semin) - Add dw_pcie_ops.host_deinit() callback (Serge Semin) - Drop enum dw_pcie_as_type in favor of PCIE_ATU_TYPE_MEM/IO (Serge Semin) - Drop enum dw_pcie_region_type in favor of PCIE_ATU_REGION_DIR_IB/OB (Serge Semin) - Simplify in/outbound iATU setup methods and reduce duplicated code (Serge Semin) - Detect iATU region size from hardware (Serge Semin) - Validate iATU outbound mappings against hardware constraints (Serge Semin) - Check for errors in iATU setup (Serge Semin) - Allocate a 32-bit DMA-able page to be MSI target instead of using a driver data structure that may not be addressable with 32-bit address (Will McVicker) - Use the bitmap API to allocate bitmaps instead of open-coding it (Christophe JAILLET) - Correct dw_pcie_free_msi() checking for when to remove IRQ handler and data (Dmitry Baryshkov) - Split MSI init to new dw_pcie_msi_host_init() function (Dmitry Baryshkov) - Convert struct pcie_port.msi_irq to an array so we can support more than 32 MSI interrupts (Dmitry Baryshkov) - Handle MSIs routed to multiple GIC interrupts for Qualcomm platforms with groups of 32 MSI vectors (Dmitry Baryshkov) - Add additional MSI interrupts to qcom DT (Dmitry Baryshkov) * pci/ctrl/dwc: dt-bindings: PCI: qcom: Support additional MSI vectors PCI: dwc: Handle MSIs routed to multiple GIC interrupts PCI: dwc: Convert struct pcie_port.msi_irq to an array PCI: dwc: Split MSI IRQ parsing/allocation to a separate function PCI: dwc: Correct msi_irq condition in dw_pcie_free_msi() PCI: dwc: Use the bitmap API to allocate bitmaps PCI: dwc: Fix MSI msi_msg DMA mapping PCI: dwc: Check iATU in/outbound range setup status PCI: dwc: Validate iATU outbound mappings against hardware constraints PCI: dwc: Add iATU regions size detection procedure PCI: dwc: Simplify in/outbound iATU setup methods PCI: dwc: Drop enum dw_pcie_region_type in favor of PCIE_ATU_REGION_DIR_IB/OB PCI: dwc: Drop enum dw_pcie_as_type in favor of PCIE_ATU_TYPE_MEM/IO PCI: dwc: Add dw_pcie_ops.host_deinit() callback PCI: tegra194: Drop manual DW PCIe controller version setup PCI: intel-gw: Drop manual DW PCIe controller version setup PCI: dwc: Add macros to compare Synopsys IP core versions PCI: dwc: Read DWC IP core version from register PCI: dwc: Use native DWC IP core version representation PCI: dwc: Detect iATU settings after getting "addr_space" resource PCI: dwc: Log link speed and width if it comes up PCI: dwc-plat: Drop dw_plat_pcie_of_match[] forward declaration PCI: dwc-plat: Drop unused regmap pointer PCI: dwc-plat: Simplify dw_plat_pcie_probe() return values PCI: dwc: Rename struct pcie_port to dw_pcie_rp PCI: dwc: Move io_cfg_atu_shared to struct pcie_port PCI: dwc: Add start_link/stop_link inlines PCI: dwc: Reuse local pointer to the resource data PCI: dwc: Organize local variable usage PCI: dwc: Convert dw_pcie_link_up() to use dw_pcie_readl_dbi() PCI: dwc: Simplify unrolled iATU detection PCI: dwc: Add newlines to log messages PCI: dwc: Add braces to multi-line if-else statements PCI: dwc: Always enable CDM check if "snps,enable-cdm-check" exists PCI: dwc: Deallocate EPC memory on dw_pcie_ep_init() errors PCI: dwc: Set INCREASE_REGION_SIZE flag based on limit address PCI: dwc: Disable outbound windows only for controllers using iATU PCI: dwc: Add unroll iATU space support to dw_pcie_disable_atu() PCI: dwc: Stop link on host_init errors and de-initialization commit 9154b00f51ea83e1c168ac929f37fbe3197ca508 Merge: 95aa832bd29c 94c651163630 Author: Bjorn Helgaas Date: Thu Aug 4 11:41:53 2022 -0500 Merge branch 'pci/ctrl/brcmstb' - Remove unnecessary forward declarations (Jim Quinlan) - Prevent config space access when link is down (Jim Quinlan) - Split post-link up initialization to brcm_pcie_start_link() (Jim Quinlan) - Enable child bus device regulators described under Root Ports in DT (Jim Quinlan) - Disable/enable regulators in suspend/resume (Jim Quinlan) - Rename .map_bus() functions to end with 'map_bus' as they do in other drivers (Jim Quinlan) * pci/ctrl/brcmstb: PCI: brcmstb: Rename .map_bus() functions to end with 'map_bus' PCI: brcmstb: Disable/enable regulators in suspend/resume PCI: brcmstb: Enable child bus device regulators from DT PCI: brcmstb: Split post-link up initialization to brcm_pcie_start_link() PCI: brcmstb: Prevent config space access when link is down PCI: brcmstb: Remove unnecessary forward declarations commit 95aa832bd29cda435d18acca213fa127a6b06040 Merge: d22b9e604264 bcdb6fd4f3e9 Author: Bjorn Helgaas Date: Thu Aug 4 11:41:53 2022 -0500 Merge branch 'pci/ctrl/aardvark' - Add support for AER capability on emulated bridge (Pali Rohár) - Add support for Slot capability on emulated bridge (Pali Rohár) * pci/ctrl/aardvark: PCI: aardvark: Fix reporting Slot capabilities on emulated bridge PCI: aardvark: Add support for AER registers on emulated bridge commit d22b9e604264839173ddf1c03f91fa4b1d16fd4c Merge: bac0f4474c63 afd306a65ced Author: Bjorn Helgaas Date: Thu Aug 4 11:41:53 2022 -0500 Merge branch 'pci/virtualization' - Add ACS quirk for Broadcom BCM5750x multifunction NICs that isolate the functions but don't advertise an ACS capability (Pavan Chebbi) * pci/virtualization: PCI: Add ACS quirk for Broadcom BCM5750x NICs commit bac0f4474c63ccd466f9b657d5a0fa102847f735 Merge: 3dc4d3333ac6 c1ef322491cb Author: Bjorn Helgaas Date: Thu Aug 4 11:41:52 2022 -0500 Merge branch 'pci/resource' - Replace sparc pci_mmap_page_range() wrapper. This still leaves a sparc-specific pci_mmap_resource_range(), but it's only one interface instead of two (Arnd Bergmann) - Remove sparc-specific pci_mmap_resource_range() by implementing pci_iobar_pfn(). This removes the ability to map the entire PCI I/O space using /proc/bus/pci, but we believe that's already been broken since v2.6.28 (Arnd Bergmann) * pci/resource: sparc: Use generic pci_mmap_resource_range() PCI: Remove pci_mmap_page_range() wrapper commit 3dc4d3333ac6ed9cd3632e8ebb6a8dedeef7ae23 Merge: 5a20930f27c4 4f23bd5d09af Author: Bjorn Helgaas Date: Thu Aug 4 11:41:52 2022 -0500 Merge branch 'pci/pm' - Convert documentation examples to generic power management (Bjorn Helgaas) * pci/pm: PCI/doc: Convert examples to generic power management commit 5a20930f27c4502ee595017787769ddb4465e795 Merge: dc5253117a23 5e6ae050955b Author: Bjorn Helgaas Date: Thu Aug 4 11:41:52 2022 -0500 Merge branch 'pci/err' - Recognize disconnected devices so we don't bother trying to set them to "frozen" or "normal" state (Christoph Hellwig) - Clear PCI Status register during enumeration in case firmware left errors logged (Kai-Heng Feng) - Configure ECRC for every device, including hot-added ones (Stefan Roese) - Keep AER error reporting enabled for switches (Stefan Roese) - Enable error reporting for all devices that support AER (Stefan Roese) - Iterate over error counters instead of error strings to avoid printing junk in AER sysfs counters (Mohamed Khalfella) * pci/err: PCI/AER: Iterate over error counters instead of error strings PCI/AER: Enable error reporting when AER is native PCI/portdrv: Don't disable AER reporting in get_port_device_capability() PCI/AER: Configure ECRC for every device PCI: Clear PCI_STATUS when setting up device PCI/ERR: Recognize disconnected devices in report_error_detected() commit dc5253117a237478f6ea03906ff7041d5db322ed Merge: 4921043182bf 960ac3626487 Author: Bjorn Helgaas Date: Thu Aug 4 11:41:51 2022 -0500 Merge branch 'pci/enumeration' - Split out ARI "next function" handling from the traditional one (Niklas Schnelle) - Move jailhouse "isolated function" (non-zero functions where function 0 doesn't exist) handling to pci_scan_slot() to avoid duplicating multi-function scanning in pci_scan_child_bus_extend() (Niklas Schnelle) - Extend "isolated function" probing to s390 (Niklas Schnelle). - Allow s390 zPCI zbus without a function 0 (Niklas Schnelle) * pci/enumeration: s390/pci: allow zPCI zbus without a function zero PCI: Extend isolated function probing to s390 PCI: Move jailhouse's isolated function handling to pci_scan_slot() PCI: Split out next_ari_fn() from next_fn() PCI: Clean up pci_scan_slot() commit 4921043182bf14279aa183490aa32a3068ea5549 Merge: 50f7a544879a 1bc2b7bfba6e Author: Bjorn Helgaas Date: Thu Aug 4 11:41:51 2022 -0500 Merge branch 'pci/endpoint' - Don't stop an EPC when unbinding an EPF from it (Shunsuke Mie) * pci/endpoint: PCI: endpoint: Don't stop controller when unbinding endpoint function commit 50f7a544879a7c2192a68744c3cd947f53df51ab Merge: f2906aa86338 ba13d4575da5 Author: Bjorn Helgaas Date: Thu Aug 4 11:41:50 2022 -0500 Merge branch 'pci/aspm' - Remove pcie_aspm_pm_state_change(), which overwrites ASPM config on power state changes (Kai-Heng Feng) * pci/aspm: PCI/ASPM: Unexport pcie_aspm_support_enabled() PCI/ASPM: Remove pcie_aspm_pm_state_change() commit c20ee5749a3f688d9bab83a3b09b75587153ff13 Author: Karol Herbst Date: Wed Aug 3 16:27:45 2022 +0200 drm/nouveau: recognise GA103 Appears to be ok with general GA10x code. Signed-off-by: Karol Herbst Cc: # v5.15+ Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220803142745.2679510-1-kherbst@redhat.com drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 54d91b55c7f3f9f2c86e0b6be4501433b32ddc89 Author: Timur Tabi Date: Wed May 11 11:37:16 2022 -0500 drm/nouveau: fix another off-by-one in nvbios_addr This check determines whether a given address is part of image 0 or image 1. Image 1 starts at offset image0_size, so that address should be included. Fixes: 4d4e9907ff572 ("drm/nouveau/bios: guard against out-of-bounds accesses to image") Signed-off-by: Timur Tabi Reviewed-by: Karol Herbst Signed-off-by: Karol Herbst Link: https://patchwork.freedesktop.org/patch/msgid/20220511163716.3520591-1-ttabi@nvidia.com drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f0541186e9ad1b62accc9519cc2b7a7240272a7 Author: Namjae Jeon Date: Tue Aug 2 07:28:51 2022 +0900 ksmbd: fix heap-based overflow in set_ntacl_dacl() The testcase use SMB2_SET_INFO_HE command to set a malformed file attribute under the label `security.NTACL`. SMB2_QUERY_INFO_HE command in testcase trigger the following overflow. [ 4712.003781] ================================================================== [ 4712.003790] BUG: KASAN: slab-out-of-bounds in build_sec_desc+0x842/0x1dd0 [ksmbd] [ 4712.003807] Write of size 1060 at addr ffff88801e34c068 by task kworker/0:0/4190 [ 4712.003813] CPU: 0 PID: 4190 Comm: kworker/0:0 Not tainted 5.19.0-rc5 #1 [ 4712.003850] Workqueue: ksmbd-io handle_ksmbd_work [ksmbd] [ 4712.003867] Call Trace: [ 4712.003870] [ 4712.003873] dump_stack_lvl+0x49/0x5f [ 4712.003935] print_report.cold+0x5e/0x5cf [ 4712.003972] ? ksmbd_vfs_get_sd_xattr+0x16d/0x500 [ksmbd] [ 4712.003984] ? cmp_map_id+0x200/0x200 [ 4712.003988] ? build_sec_desc+0x842/0x1dd0 [ksmbd] [ 4712.004000] kasan_report+0xaa/0x120 [ 4712.004045] ? build_sec_desc+0x842/0x1dd0 [ksmbd] [ 4712.004056] kasan_check_range+0x100/0x1e0 [ 4712.004060] memcpy+0x3c/0x60 [ 4712.004064] build_sec_desc+0x842/0x1dd0 [ksmbd] [ 4712.004076] ? parse_sec_desc+0x580/0x580 [ksmbd] [ 4712.004088] ? ksmbd_acls_fattr+0x281/0x410 [ksmbd] [ 4712.004099] smb2_query_info+0xa8f/0x6110 [ksmbd] [ 4712.004111] ? psi_group_change+0x856/0xd70 [ 4712.004148] ? update_load_avg+0x1c3/0x1af0 [ 4712.004152] ? asym_cpu_capacity_scan+0x5d0/0x5d0 [ 4712.004157] ? xas_load+0x23/0x300 [ 4712.004162] ? smb2_query_dir+0x1530/0x1530 [ksmbd] [ 4712.004173] ? _raw_spin_lock_bh+0xe0/0xe0 [ 4712.004179] handle_ksmbd_work+0x30e/0x1020 [ksmbd] [ 4712.004192] process_one_work+0x778/0x11c0 [ 4712.004227] ? _raw_spin_lock_irq+0x8e/0xe0 [ 4712.004231] worker_thread+0x544/0x1180 [ 4712.004234] ? __cpuidle_text_end+0x4/0x4 [ 4712.004239] kthread+0x282/0x320 [ 4712.004243] ? process_one_work+0x11c0/0x11c0 [ 4712.004246] ? kthread_complete_and_exit+0x30/0x30 [ 4712.004282] ret_from_fork+0x1f/0x30 This patch add the buffer validation for security descriptor that is stored by malformed SMB2_SET_INFO_HE command. and allocate large response buffer about SMB2_O_INFO_SECURITY file info class. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-17771 Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/smb2pdu.c | 39 ++++++++++------ fs/ksmbd/smbacl.c | 130 ++++++++++++++++++++++++++++++++++++----------------- fs/ksmbd/smbacl.h | 2 +- fs/ksmbd/vfs.c | 5 +++ 4 files changed, 119 insertions(+), 57 deletions(-) commit 4a933e62083ead6cd064293a7505c56165859320 Author: Pavel Begunkov Date: Thu Aug 4 15:15:30 2022 +0100 io_uring/net: send retry for zerocopy io_uring handles short sends/recvs for stream sockets when MSG_WAITALL is set, however new zerocopy send is inconsistent in this regard, which might be confusing. Handle short sends. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b876a4838597d9bba4f3215db60d72c33c448ad0.1659622472.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit cc18cc5e82033d406f54144ad6f8092206004684 Author: Pavel Begunkov Date: Thu Aug 4 15:13:46 2022 +0100 io_uring: mem-account pbuf buckets Potentially, someone may create as many pbuf bucket as there are indexes in an xarray without any other restrictions bounding our memory usage, put memory needed for the buckets under memory accounting. Cc: Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d34c452e45793e978d26e2606211ec9070d329ea.1659622312.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/kbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f482aa98652795846cc55da98ebe331eb74f3d0b Author: Peilin Ye Date: Wed Aug 3 15:23:43 2022 -0700 audit, io_uring, io-wq: Fix memory leak in io_sq_thread() and io_wqe_worker() Currently @audit_context is allocated twice for io_uring workers: 1. copy_process() calls audit_alloc(); 2. io_sq_thread() or io_wqe_worker() calls audit_alloc_kernel() (which is effectively audit_alloc()) and overwrites @audit_context, causing: BUG: memory leak unreferenced object 0xffff888144547400 (size 1024): <...> hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] audit_alloc+0x133/0x210 [] copy_process+0xcd3/0x2340 [] create_io_thread+0x63/0x90 [] create_io_worker+0xb4/0x230 [] io_wqe_enqueue+0x248/0x3b0 [] io_queue_iowq+0xba/0x200 [] io_queue_async+0x113/0x180 [] io_req_task_submit+0x18f/0x1a0 [] io_apoll_task_func+0xdd/0x120 [] tctx_task_work+0x11f/0x570 [] task_work_run+0x7e/0xc0 [] get_signal+0xc18/0xf10 [] arch_do_signal_or_restart+0x2b/0x730 [] exit_to_user_mode_prepare+0x5e/0x180 [] syscall_exit_to_user_mode+0x12/0x20 [] do_syscall_64+0x40/0x80 Then, 3. io_sq_thread() or io_wqe_worker() frees @audit_context using audit_free(); 4. do_exit() eventually calls audit_free() again, which is okay because audit_free() does a NULL check. As suggested by Paul Moore, fix it by deleting audit_alloc_kernel() and redundant audit_free() calls. Fixes: 5bd2182d58e9 ("audit,io_uring,io-wq: add some basic audit support to io_uring") Suggested-by: Paul Moore Cc: stable@vger.kernel.org Signed-off-by: Peilin Ye Acked-by: Paul Moore Link: https://lore.kernel.org/r/20220803222343.31673-1-yepeilin.cs@gmail.com Signed-off-by: Jens Axboe include/linux/audit.h | 5 ----- io_uring/io-wq.c | 3 --- io_uring/sqpoll.c | 4 ---- kernel/auditsc.c | 25 ------------------------- 4 files changed, 37 deletions(-) commit 6930bcbfb6ceda63e298c6af6d733ecdf6bd4cde Author: Jeff Layton Date: Mon Aug 1 15:57:26 2022 -0400 lockd: detect and reject lock arguments that overflow lockd doesn't currently vet the start and length in nlm4 requests like it should, and can end up generating lock requests with arguments that overflow when passed to the filesystem. The NLM4 protocol uses unsigned 64-bit arguments for both start and length, whereas struct file_lock tracks the start and end as loff_t values. By the time we get around to calling nlm4svc_retrieve_args, we've lost the information that would allow us to determine if there was an overflow. Start tracking the actual start and len for NLM4 requests in the nlm_lock. In nlm4svc_retrieve_args, vet these values to ensure they won't cause an overflow, and return NLM4_FBIG if they do. Link: https://bugzilla.linux-nfs.org/show_bug.cgi?id=392 Reported-by: Jan Kasiak Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever Cc: # 5.14+ fs/lockd/svc4proc.c | 8 ++++++++ fs/lockd/xdr4.c | 19 ++----------------- include/linux/lockd/xdr.h | 2 ++ 3 files changed, 12 insertions(+), 17 deletions(-) commit dd8dd403d7b223cc77ee89d8d09caf045e90e648 Author: NeilBrown Date: Tue Jul 26 16:45:30 2022 +1000 NFSD: discard fh_locked flag and fh_lock/fh_unlock As all inode locking is now fully balanced, fh_put() does not need to call fh_unlock(). fh_lock() and fh_unlock() are no longer used, so discard them. These are the only real users of ->fh_locked, so discard that too. Reviewed-by: Jeff Layton Signed-off-by: NeilBrown Signed-off-by: Chuck Lever fs/nfsd/nfsfh.c | 3 +-- fs/nfsd/nfsfh.h | 56 ++++---------------------------------------------------- fs/nfsd/vfs.c | 17 +---------------- 3 files changed, 6 insertions(+), 70 deletions(-) commit bb4d53d66e4b8c8b8e5634802262e53851a2d2db Author: NeilBrown Date: Tue Jul 26 16:45:30 2022 +1000 NFSD: use (un)lock_inode instead of fh_(un)lock for file operations When locking a file to access ACLs and xattrs etc, use explicit locking with inode_lock() instead of fh_lock(). This means that the calls to fh_fill_pre/post_attr() are also explicit which improves readability and allows us to place them only where they are needed. Only the xattr calls need pre/post information. When locking a file we don't need I_MUTEX_PARENT as the file is not a parent of anything, so we can use inode_lock() directly rather than the inode_lock_nested() call that fh_lock() uses. Reviewed-by: Jeff Layton Signed-off-by: NeilBrown Signed-off-by: Chuck Lever fs/nfsd/nfs2acl.c | 6 +++--- fs/nfsd/nfs3acl.c | 4 ++-- fs/nfsd/nfs4state.c | 9 +++++---- fs/nfsd/vfs.c | 34 ++++++++++++++++++++-------------- 4 files changed, 30 insertions(+), 23 deletions(-) commit debf16f0c671cb8db154a9ebcd6014cfff683b80 Author: NeilBrown Date: Tue Jul 26 16:45:30 2022 +1000 NFSD: use explicit lock/unlock for directory ops When creating or unlinking a name in a directory use explicit inode_lock_nested() instead of fh_lock(), and explicit calls to fh_fill_pre_attrs() and fh_fill_post_attrs(). This is already done for renames, with lock_rename() as the explicit locking. Also move the 'fill' calls closer to the operation that might change the attributes. This way they are avoided on some error paths. For the v2-only code in nfsproc.c, the fill calls are not replaced as they aren't needed. Making the locking explicit will simplify proposed future changes to locking for directories. It also makes it easily visible exactly where pre/post attributes are used - not all callers of fh_lock() actually need the pre/post attributes. Reviewed-by: Jeff Layton Signed-off-by: NeilBrown Signed-off-by: Chuck Lever fs/nfsd/nfs3proc.c | 6 ++++-- fs/nfsd/nfs4proc.c | 6 ++++-- fs/nfsd/nfsproc.c | 5 ++--- fs/nfsd/vfs.c | 30 +++++++++++++++++++----------- 4 files changed, 29 insertions(+), 18 deletions(-) commit 19d008b46941b8c668402170522e0f7a9258409c Author: NeilBrown Date: Tue Jul 26 16:45:30 2022 +1000 NFSD: reduce locking in nfsd_lookup() nfsd_lookup() takes an exclusive lock on the parent inode, but no callers want the lock and it may not be needed at all if the result is in the dcache. Change nfsd_lookup_dentry() to not take the lock, and call lookup_one_len_locked() which takes lock only if needed. nfsd4_open() currently expects the lock to still be held, but that isn't necessary as nfsd_validate_delegated_dentry() provides required guarantees without the lock. NOTE: NFSv4 requires directory changeinfo for OPEN even when a create wasn't requested and no change happened. Now that nfsd_lookup() doesn't use fh_lock(), we need to explicitly fill the attributes when no create happens. A new fh_fill_both_attrs() is provided for that task. Signed-off-by: NeilBrown Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 20 ++++++++++++-------- fs/nfsd/nfs4state.c | 3 --- fs/nfsd/nfsfh.c | 19 +++++++++++++++++++ fs/nfsd/nfsfh.h | 2 +- fs/nfsd/vfs.c | 34 ++++++++++++++-------------------- 5 files changed, 46 insertions(+), 32 deletions(-) commit e18bcb33bc5b69bccc2b532075aa00bb49cc01c5 Author: NeilBrown Date: Tue Jul 26 16:45:30 2022 +1000 NFSD: only call fh_unlock() once in nfsd_link() On non-error paths, nfsd_link() calls fh_unlock() twice. This is safe because fh_unlock() records that the unlock has been done and doesn't repeat it. However it makes the code a little confusing and interferes with changes that are planned for directory locking. So rearrange the code to ensure fh_unlock() is called exactly once if fh_lock() was called. Reviewed-by: Jeff Layton Signed-off-by: NeilBrown Signed-off-by: Chuck Lever fs/nfsd/vfs.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit b677c0c63a135a916493c064906582e9f3ed4802 Author: NeilBrown Date: Tue Jul 26 16:45:30 2022 +1000 NFSD: always drop directory lock in nfsd_unlink() Some error paths in nfsd_unlink() allow it to exit without unlocking the directory. This is not a problem in practice as the directory will be locked with an fh_put(), but it is untidy and potentially confusing. This allows us to remove all the fh_unlock() calls that are immediately after nfsd_unlink() calls. Reviewed-by: Jeff Layton Signed-off-by: NeilBrown Signed-off-by: Chuck Lever fs/nfsd/nfs3proc.c | 2 -- fs/nfsd/nfs4proc.c | 4 +--- fs/nfsd/vfs.c | 7 +++++-- 3 files changed, 6 insertions(+), 7 deletions(-) commit 927bfc5600cd6333c9ef9f090f19e66b7d4c8ee1 Author: NeilBrown Date: Tue Jul 26 16:45:30 2022 +1000 NFSD: change nfsd_create()/nfsd_symlink() to unlock directory before returning. nfsd_create() usually returns with the directory still locked. nfsd_symlink() usually returns with it unlocked. This is clumsy. Until recently nfsd_create() needed to keep the directory locked until ACLs and security label had been set. These are now set inside nfsd_create() (in nfsd_setattr()) so this need is gone. So change nfsd_create() and nfsd_symlink() to always unlock, and remove any fh_unlock() calls that follow calls to these functions. Signed-off-by: NeilBrown Signed-off-by: Chuck Lever fs/nfsd/nfs3proc.c | 2 -- fs/nfsd/nfs4proc.c | 2 -- fs/nfsd/vfs.c | 38 +++++++++++++++++++++----------------- 3 files changed, 21 insertions(+), 21 deletions(-) commit c0cbe70742f4a70893cd6e5f6b10b6e89b6db95b Author: NeilBrown Date: Tue Jul 26 16:45:30 2022 +1000 NFSD: add posix ACLs to struct nfsd_attrs pacl and dpacl pointers are added to struct nfsd_attrs, which requires that we have an nfsd_attrs_free() function to free them. Those nfsv4 functions that can set ACLs now set up these pointers based on the passed in NFSv4 ACL. nfsd_setattr() sets the acls as appropriate. Errors are handled as with security labels. Signed-off-by: NeilBrown Signed-off-by: Chuck Lever fs/nfsd/acl.h | 6 ++++-- fs/nfsd/nfs4acl.c | 46 +++++++--------------------------------------- fs/nfsd/nfs4proc.c | 46 ++++++++++++++++------------------------------ fs/nfsd/vfs.c | 9 +++++++++ fs/nfsd/vfs.h | 11 +++++++++++ 5 files changed, 47 insertions(+), 71 deletions(-) commit 74de14fe05dd6b151d73cb0c73c8ec874cbdcde6 Author: Nathan Chancellor Date: Tue Aug 2 10:59:36 2022 -0700 MIPS: tlbex: Explicitly compare _PAGE_NO_EXEC against 0 When CONFIG_XPA is enabled, Clang warns: arch/mips/mm/tlbex.c:629:24: error: converting the result of '<<' to a boolean; did you mean '(1 << _PAGE_NO_EXEC_SHIFT) != 0'? [-Werror,-Wint-in-bool-context] if (cpu_has_rixi && !!_PAGE_NO_EXEC) { ^ arch/mips/include/asm/pgtable-bits.h:174:28: note: expanded from macro '_PAGE_NO_EXEC' # define _PAGE_NO_EXEC (1 << _PAGE_NO_EXEC_SHIFT) ^ arch/mips/mm/tlbex.c:2568:24: error: converting the result of '<<' to a boolean; did you mean '(1 << _PAGE_NO_EXEC_SHIFT) != 0'? [-Werror,-Wint-in-bool-context] if (!cpu_has_rixi || !_PAGE_NO_EXEC) { ^ arch/mips/include/asm/pgtable-bits.h:174:28: note: expanded from macro '_PAGE_NO_EXEC' # define _PAGE_NO_EXEC (1 << _PAGE_NO_EXEC_SHIFT) ^ 2 errors generated. _PAGE_NO_EXEC can be '0' or '1 << _PAGE_NO_EXEC_SHIFT' depending on the build and runtime configuration, which is what the negation operators are trying to convey. To silence the warning, explicitly compare against 0 so the result of the '<<' operator is not implicitly converted to a boolean. According to its documentation, GCC enables -Wint-in-bool-context with -Wall but this warning is not visible when building the same configuration with GCC. It appears GCC only warns when compiling C++, not C, although the documentation makes no note of this: https://godbolt.org/z/x39q3brxf Reported-by: Sudip Mukherjee (Codethink) Signed-off-by: Nathan Chancellor Signed-off-by: Thomas Bogendoerfer arch/mips/mm/tlbex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 672fb6740cbfde34f4d367ffa3c939b608a927e1 Author: Masahiro Yamada Date: Mon Aug 1 18:39:02 2022 +0900 modpost: remove .symbol_white_list field entirely It is not so useful to have symbol whitelists in arrays. With this over-engineering, the code is difficult to follow. Let's do it more directly, and collect the relevant code to one place. Signed-off-by: Masahiro Yamada scripts/mod/modpost.c | 55 +++++++++++++++------------------------------------ 1 file changed, 16 insertions(+), 39 deletions(-) commit 1560cb0e186e83f0572a84d22e139c100060905c Author: Masahiro Yamada Date: Mon Aug 1 18:39:01 2022 +0900 modpost: remove unneeded .symbol_white_list initializers The ->symbol_white_list field is referenced in secref_whitelist(), only when 'fromsec' is data_sections. /* Check for pattern 2 */ if (match(tosec, init_exit_sections) && match(fromsec, data_sections) && match(fromsym, mismatch->symbol_white_list)) return 0; If .fromsec is not data sections, the .symbol_white_list member is not used by anyone. Signed-off-by: Masahiro Yamada scripts/mod/modpost.c | 8 -------- 1 file changed, 8 deletions(-) commit 7452dd26a59a9dfcde3f179594f3be6c4752a9a9 Author: Masahiro Yamada Date: Mon Aug 1 18:39:00 2022 +0900 modpost: add PATTERNS() helper macro This will be useful to define a NULL-terminated array inside a function call. Currently, string arrays passed to match() are defined in separate places: static const char *const init_sections[] = { ALL_INIT_SECTIONS, NULL }; static const char *const text_sections[] = { ALL_TEXT_SECTIONS, NULL }; static const char *const optim_symbols[] = { "*.constprop.*", NULL }; ... /* Check for pattern 5 */ if (match(fromsec, text_sections) && match(tosec, init_sections) && match(fromsym, optim_symbols)) return 0; With the new helper macro, you can list the patterns directly in the function call, like this: /* Check for pattern 5 */ if (match(fromsec, PATTERNS(ALL_TEXT_SECTIONS)) && match(tosec, PATTERNS(ALL_INIT_SECTIONS)) && match(fromsym, PATTERNS("*.contprop.*"))) return 0; Signed-off-by: Masahiro Yamada scripts/mod/modpost.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 072dd2c8928f2ecdc52cdf5acf30479b327386c9 Author: Masahiro Yamada Date: Mon Aug 1 18:38:59 2022 +0900 modpost: shorten warning messages in report_sec_mismatch() Each section mismatch results in long warning messages. Too much. Make each warning fit in one line, and remove a lot of messy code. Signed-off-by: Masahiro Yamada scripts/mod/modpost.c | 179 +++----------------------------------------------- 1 file changed, 9 insertions(+), 170 deletions(-) commit a25efd6ef1ef4c32991a1d5a013dd41e3b8f7eff Author: Masahiro Yamada Date: Sun Jul 31 02:36:36 2022 +0900 Revert "Kbuild, lto, workaround: Don't warn for initcall_reference in modpost" This reverts commit 77ab21adae509c5540956729e2d03bc1a59bc82a. Even after 8 years later, GCC LTO has not been upstreamed. Also, it said "This is a workaround". If this is needed in the future, it should be added in a proper way. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers Acked-by: Jiri Slaby scripts/mod/modpost.c | 3 --- 1 file changed, 3 deletions(-) commit de979c83574abf6e78f3fa65b716515c91b2613d Author: Andrea Righi Date: Thu Jul 14 09:49:15 2022 +0200 x86/entry: Build thunk_$(BITS) only if CONFIG_PREEMPTION=y With CONFIG_PREEMPTION disabled, arch/x86/entry/thunk_$(BITS).o becomes an empty object file. With some old versions of binutils (i.e., 2.35.90.20210113-1ubuntu1) the GNU assembler doesn't generate a symbol table for empty object files and objtool fails with the following error when a valid symbol table cannot be found: arch/x86/entry/thunk_64.o: warning: objtool: missing symbol table To prevent this from happening, build thunk_$(BITS).o only if CONFIG_PREEMPTION is enabled. BugLink: https://bugs.launchpad.net/bugs/1911359 Fixes: 320100a5ffe5 ("x86/entry: Remove the TRACE_IRQS cruft") Signed-off-by: Andrea Righi Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/Ys/Ke7EWjcX+ZlXO@arighi-desktop arch/x86/entry/Makefile | 3 ++- arch/x86/entry/thunk_32.S | 2 -- arch/x86/entry/thunk_64.S | 4 ---- arch/x86/um/Makefile | 3 ++- 4 files changed, 4 insertions(+), 8 deletions(-) commit 30bdc36b8c776cd4fce5de2a96ff28b37f96942f Author: Laurentiu Palcu Date: Thu Jul 21 15:09:12 2022 +0300 drm/imx/dcss: get rid of HPD warning message When DCSS + MIPI_DSI is used, and the last bridge in the chain supports HPD, we can see a "Hot plug detection already enabled" warning stack trace dump that's thrown when DCSS is initialized. The problem appeared when HPD was enabled by default in the bridge_connector initialization, which made the drm_bridge_connector_enable_hpd() call, in DCSS init path, redundant. So, let's remove that call. Fixes: 09077bc311658 ("drm/bridge_connector: enable HPD by default if supported") Signed-off-by: Laurentiu Palcu Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20220721120912.6639-1-laurentiu.palcu@oss.nxp.com drivers/gpu/drm/imx/dcss/dcss-kms.c | 2 -- 1 file changed, 2 deletions(-) commit 751d4cbc43879229dbc124afefe240b70fd29a85 Author: Mel Gorman Date: Thu Aug 4 10:21:19 2022 +0100 sched/core: Do not requeue task on CPU excluded from cpus_mask The following warning was triggered on a large machine early in boot on a distribution kernel but the same problem should also affect mainline. WARNING: CPU: 439 PID: 10 at ../kernel/workqueue.c:2231 process_one_work+0x4d/0x440 Call Trace: rescuer_thread+0x1f6/0x360 kthread+0x156/0x180 ret_from_fork+0x22/0x30 Commit c6e7bd7afaeb ("sched/core: Optimize ttwu() spinning on p->on_cpu") optimises ttwu by queueing a task that is descheduling on the wakelist, but does not check if the task descheduling is still allowed to run on that CPU. In this warning, the problematic task is a workqueue rescue thread which checks if the rescue is for a per-cpu workqueue and running on the wrong CPU. While this is early in boot and it should be possible to create workers, the rescue thread may still used if the MAYDAY_INITIAL_TIMEOUT is reached or MAYDAY_INTERVAL and on a sufficiently large machine, the rescue thread is being used frequently. Tracing confirmed that the task should have migrated properly using the stopper thread to handle the migration. However, a parallel wakeup from udev running on another CPU that does not share CPU cache observes p->on_cpu and uses task_cpu(p), queues the task on the old CPU and triggers the warning. Check that the wakee task that is descheduling is still allowed to run on its current CPU and if not, wait for the descheduling to complete and select an allowed CPU. Fixes: c6e7bd7afaeb ("sched/core: Optimize ttwu() spinning on p->on_cpu") Signed-off-by: Mel Gorman Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20220804092119.20137-1-mgorman@techsingularity.net kernel/sched/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 54cfa910b443b3d90b3e00bd96cdf563a285390b Author: Huacai Chen Date: Thu Aug 4 10:54:57 2022 +0800 irqchip/loongson-eiointc: Fix a build warning Make acpi_get_vec_parent() be a static function, to avoid: drivers/irqchip/irq-loongson-eiointc.c:289:20: warning: no previous prototype for 'acpi_get_vec_parent' Reported-by: kernel test robot Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220804025457.213979-1-chenhuacai@loongson.cn drivers/irqchip/irq-loongson-eiointc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e260cfe6fb503292f183a43b51177664b222435d Author: Huacai Chen Date: Thu Aug 4 10:54:21 2022 +0800 irqchip/loongson-eiointc: Fix irq affinity setting In multi-node case, csr_any_send() should set EIOINTC_REG_ENABLE of the first core of target node, not the first core of the whole. Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220804025421.211958-1-chenhuacai@loongson.cn drivers/irqchip/irq-loongson-eiointc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b0a4ab7ca4ce993d1cc51cbc85e9f341c729a3d4 Author: Michael Kelley Date: Mon Jul 25 17:53:40 2022 -0700 iommu/hyper-v: Use helper instead of directly accessing affinity Recent changes to solve inconsistencies in handling IRQ masks #ifdef out the affinity field in irq_common_data for non-SMP configurations. The current code in hyperv_irq_remapping_alloc() gets a compiler error in that case. Fix this by using the new irq_data_update_affinity() helper, which handles the non-SMP case correctly. Signed-off-by: Michael Kelley Reported-by: Randy Dunlap Tested-by: Randy Dunlap Acked-by: Randy Dunlap Acked-by: Joerg Roedel Signed-off-by: Marc Zyngier Fixes: aa0813581b8d ("genirq: Provide an IRQ affinity mask in non-SMP configs") Link: https://lore.kernel.org/r/1658796820-2261-1-git-send-email-mikelley@microsoft.com drivers/iommu/hyperv-iommu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 99643bab36b642be10bf09cd3285c37c9e5b597f Author: Slark Xiao Date: Wed Jul 20 17:12:20 2022 +0800 perf/core: Fix ';;' typo Remove double ';;'. Signed-off-by: Slark Xiao Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20220720091220.14200-1-slark_xiao@163.com kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b44f2fd87919b5ae6e1756d4c7ba2cbba22238e1 Merge: 12b68040a5e4 5493ee1919ea Author: Linus Torvalds Date: Wed Aug 3 19:52:08 2022 -0700 Merge tag 'drm-next-2022-08-03' of git://anongit.freedesktop.org/drm/drm Pull drm updates from Dave Airlie: "Highlights: - New driver for logicvc - which is a display IP core. - EDID parser rework to add new extensions - fbcon scrolling improvements - i915 has some more DG2 work but not enabled by default, but should have enough features for userspace to work now. Otherwise it's lots of work all over the place. Detailed summary: New driver: - logicvc vfio: - use aperture API core: - of: Add data-lane helpers and convert drivers - connector: Remove deprecated ida_simple_get() media: - Add various RGB666 and RGB888 format constants panel: - Add HannStar HSD101PWW - Add ETML0700Y5DHA dma-buf: - add sync-file API - set dma mask for udmabuf devices fbcon: - Improve scrolling performance - Sanitize input fbdev: - device unregistering fixes - vesa: Support COMPILE_TEST - Disable firmware-device registration when first native driver loads aperture: - fix segfault during hot-unplug - export for use with other subsystems client: - use driver validated modes dp: - aux: make probing more reliable - mst: Read extended DPCD capabilities during system resume - Support waiting for HDP signal - Port-validation fixes edid: - CEA data-block iterators - struct drm_edid introduction - implement HF-EEODB extension gem: - don't use fb format non-existing planes probe-helper: - use 640x480 as displayport fallback scheduler: - don't kill jobs in interrupt context bridge: - Add support for i.MX8qxp and i.MX8qm - lots of fixes/cleanups - Add TI-DLPC3433 - fy07024di26a30d: Optional GPIO reset - ldb: Add reg and reg-name properties to bindings, Kconfig fixes - lt9611: Fix display sensing; - tc358767: DSI/DPI refactoring and DSI-to-eDP support, DSI lane handling - tc358775: Fix clock settings - ti-sn65dsi83: Allow GPIO to sleep - adv7511: I2C fixes - anx7625: Fix error handling; DPI fixes; Implement HDP timeout via callback - fsl-ldb: Drop DE flip - ti-sn65dsi86: Convert to atomic modesetting amdgpu: - use atomic fence helpers in DM - fix VRAM address calculations - export CRTC bpc via debugfs - Initial devcoredump support - Enable high priority gfx queue on asics which support it - Adjust GART size on newer APUs for S/G display - Soft reset for GFX 11 / SDMA 6 - Add gfxoff status query for vangogh - Fix timestamps for cursor only commits - Adjust GART size on newer APUs for S/G display - fix buddy memory corruption amdkfd: - MMU notifier fixes - P2P DMA support using dma-buf - Add available memory IOCTL - HMM profiler support - Simplify GPUVM validation - Unified memory for CWSR save/restore area i915: - General driver clean-up - DG2 enabling (still under force probe) - DG2 small BAR memory support - HuC loading support - DG2 workarounds - DG2/ATS-M device IDs added - Ponte Vecchio prep work and new blitter engines - add Meteorlake support - Fix sparse warnings - DMC MMIO range checks - Audio related fixes - Runtime PM fixes - PSR fixes - Media freq factor and per-gt enhancements - DSI fixes for ICL+ - Disable DMC flip queue handlers - ADL_P voltage swing updates - Use more the VBT for panel information - Fix on Type-C ports with TBT mode - Improve fastset and allow seamless M/N changes - Accept more fixed modes with VRR/DMRRS panels - Disable connector polling for a headless SKU - ADL-S display PLL w/a - Enable THP on Icelake and beyond - Fix i915_gem_object_ggtt_pin_ww regression on old platforms - Expose per tile media freq factor in sysfs - Fix dma_resv fence handling in multi-batch execbuf - Improve on suspend / resume time with VT-d enabled - export CRTC bpc settings via debugfs msm: - gpu: a619 support - gpu: Fix for unclocked GMU register access - gpu: Devcore dump enhancements - client utilization via fdinfo support - fix fence rollover issue - gem: Lockdep false-positive warning fix - gem: Switch to pfn mappings - WB support on sc7180 - dp: dropped custom bulk clock implementation - fix link retraining on resolution change - hdmi: dropped obsolete GPIO support tegra: - context isolation for host1x engines - tegra234 soc support mediatek: - add vdosys0/1 for mt8195 - add MT8195 dp_intf driver exynos: - Fix resume function issue of exynos decon driver by calling clk_disable_unprepare() properly if clk_prepare_enable() failed. nouveau: - set of misc fixes/cleanups - display cleanups gma500: - Cleanup connector I2C handling hyperv: - Unify VRAM allocation of Gen1 and Gen2 meson: - Support YUV422 output; Refcount fixes mgag200: - Support damage clipping - Support gamma handling - Protect concurrent HW access - Fixes to connector - Store model-specific limits in device-info structure - fix PCI register init panfrost: - Valhall support r128: - Fix bit-shift overflow rockchip: - Locking fixes in error path ssd130x: - Fix built-in linkage udl: - Always advertize VGA connector ast: - Support multiple outputs - fix black screen on resume sun4i: - HDMI PHY cleanups vc4: - Add support for BCM2711 vkms: - Allocate output buffer with vmalloc() mcde: - Fix ref-count leak mxsfb/lcdif: - Support i.MX8MP LCD controller stm/ltdc: - Support dynamic Z order - Support mirroring ingenic: - Fix display at maximum resolution" * tag 'drm-next-2022-08-03' of git://anongit.freedesktop.org/drm/drm: (1480 commits) drm/amd/display: Fix a compilation failure on PowerPC caused by FPU code drm/amdgpu: enable support for psp 13.0.4 block drm/amdgpu: add files for PSP 13.0.4 drm/amdgpu: add header files for MP 13.0.4 drm/amdgpu: correct RLC_RLCS_BOOTLOAD_STATUS offset and index drm/amdgpu: send msg to IMU for the front-door loading drm/amdkfd: use time_is_before_jiffies(a + b) to replace "jiffies - a > b" drm/amdgpu: fix hive reference leak when reflecting psp topology info drm/amd/pm: enable GFX ULV feature support for SMU13.0.0 drm/amd/pm: update driver if header for SMU 13.0.0 drm/amdgpu: move mes self test after drm sched re-started drm/amdgpu: drop non-necessary call trace dump drm/amdgpu: enable VCN cg and JPEG cg/pg drm/amdgpu: vcn_4_0_2 video codec query drm/amdgpu: add VCN_4_0_2 firmware support drm/amdgpu: add VCN function in NBIO v7.7 drm/amdgpu: fix a vcn4 boot poll bug in emulation mode drm/amd/amdgpu: add memory training support for PSP_V13 drm/amdkfd: remove an unnecessary amdgpu_bo_ref drm/amd/pm: Add get_gfx_off_status interface for yellow carp ... commit 12b68040a5e468068fd7f4af1150eab8f6e96235 Merge: 80dc75932ff2 485ade76c95a Author: Linus Torvalds Date: Wed Aug 3 19:29:28 2022 -0700 Merge tag 'media/v5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - New driver for Semi AR0521 sensor - rkisp1 CSI code was split into a separate file - sun6i has gained support for the A31 MIPI CSI-2 controller - sun8i has gained support for the A83T MIPI CSI-2 controller - vimc driver got support for virtual lens - HEVC uAPI has gained its final form and got added to public headers - hantro and cedrus got updates on H-265 support - stkwebcam was promoted from staging - atomisp staging driver got cleanups on its hmm and kmap related logic - ov5640 gained support for more modes and got some rework - imx7-media-csi staging driver got several improvements related to mc API support - uvcvideo now handles better power line control - mediatec vcodec gained support for new hardware and got some codec updates - Lots of other bug fixes, improvements and cleanups. * tag 'media/v5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (446 commits) media: hantro: Remove dedicated control documentation hantro: Remove incorrect HEVC SPS validation media: cedrus: hevc: Add check for invalid timestamp media: sunxi: sun6i_mipi_csi2.c/sun8i_a83t_mipi_csi2.c: clarify error handling media: uvcvideo: Fix invalid pointer in uvc_ctrl_init_ctrl() media: Documentation: mc-core: Fix typo media: videodev2.h.rst.exceptions: add missing exceptions media: vimc: wrong pointer is used with PTR_ERR media: rkisp1: debug: Add dump file in debugfs for MI main path registers media: rkisp1: Make the internal CSI-2 receiver optional media: rkisp1: Add infrastructure to support ISP features media: rkisp1: Support the ISP parallel input media: dt-bindings: media: rkisp1: Add port for parallel interface media: rkisp1: Use fwnode_graph_for_each_endpoint media: rkisp1: csi: Plumb the CSI RX subdev media: rkisp1: csi: Implement a V4L2 subdev for the CSI receiver media: rkisp1: isp: Disallow multiple active sources media: rkisp1: isp: Rename rkisp1_get_remote_source() media: rkisp1: isp: Constify various local variables media: rkisp1: isp: Fix whitespace issues ... commit 80dc75932ff231b05e0adbf5054bf4c9f0fb468c Merge: f86d1fbbe785 a11821495fd4 Author: Linus Torvalds Date: Wed Aug 3 19:23:51 2022 -0700 Merge tag 'i2c-for-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: - new drivers: Microchip CoreI2C, Renesas RZV2M - quite some DT schema conversions and extensions - and a bunch of driver updates and improvements * tag 'i2c-for-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (37 commits) i2c: extend documentation about retvals of master_xfer functions i2c: mux-gpmux: Add of_node_put() when breaking out of loop dt-bindings: i2c: i2c-rk3x: Document Rockchip RV1126 i2c: qcom-geni: Use the correct return value i2c: cadence: Support PEC for SMBus block read i2c: qcom-geni: Propagate GENI_ABORT_DONE to geni_i2c_abort_xfer() i2c: brcmstb: Use dev_name() for adapter name i2c: Add Renesas RZ/V2M controller dt-bindings: i2c: Document RZ/V2M I2C controller i2c: mlxcpld: Add callback to notify probing completion i2c: scmi: Replace open coded device_get_match_data() i2c: stm32: add support for the STM32MP13 soc dt-bindings: i2c: st,stm32-i2c: add entry for stm32mp13 dt-bindings: i2c: i2c-rk3x: add rk3588 compatible i2c: add support for microchip fpga i2c controllers i2c: i801: Add support for Intel Meteor Lake-P dt-bindings: i2c: nomadik: Add power domain to binding dt-bindings: i2c: nomadik: Drop unused voltage supply from example i2c: Fix a potential use after free i2c: hisi: use HZ_PER_KHZ macro in units.h ... commit 4ae97cae07e15d41e5c0ebabba64c6eefdeb0bbe Author: Yu Xiao Date: Tue Aug 2 10:33:55 2022 +0100 nfp: ethtool: fix the display error of `ethtool -m DEVNAME` The port flag isn't set to `NFP_PORT_CHANGED` when using `ethtool -m DEVNAME` before, so the port state (e.g. interface) cannot be updated. Therefore, it caused that `ethtool -m DEVNAME` sometimes cannot read the correct information. E.g. `ethtool -m DEVNAME` cannot work when load driver before plug in optical module, as the port interface is still NONE without port update. Now update the port state before sending info to NIC to ensure that port interface is correct (latest state). Fixes: 61f7c6f44870 ("nfp: implement ethtool get module EEPROM") Reviewed-by: Louis Peens Signed-off-by: Yu Xiao Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20220802093355.69065-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 2 ++ 1 file changed, 2 insertions(+) commit 744d23c71af39c7dc77ac7c3cac87ae86a181a85 Author: Florian Fainelli Date: Mon Aug 1 16:34:03 2022 -0700 net: phy: Warn about incorrect mdio_bus_phy_resume() state Calling mdio_bus_phy_resume() with neither the PHY state machine set to PHY_HALTED nor phydev->mac_managed_pm set to true is a good indication that we can produce a race condition looking like this: CPU0 CPU1 bcmgenet_resume -> phy_resume -> phy_init_hw -> phy_start -> phy_resume phy_start_aneg() mdio_bus_phy_resume -> phy_resume -> phy_write(..., BMCR_RESET) -> usleep() -> phy_read() with the phy_resume() function triggering a PHY behavior that might have to be worked around with (see bf8bfc4336f7 ("net: phy: broadcom: Fix brcm_fet_config_init()") for instance) that ultimately leads to an error reading from the PHY. Fixes: fba863b81604 ("net: phy: make PHY PM ops a no-op if MAC driver manages PHY PM") Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20220801233403.258871-1-f.fainelli@gmail.com Signed-off-by: Jakub Kicinski drivers/net/phy/phy_device.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7de196a6aa3a02f6079f5bf8796df4cb6cb5e783 Merge: f86d1fbbe785 cba8d8f57dfb Author: Jakub Kicinski Date: Wed Aug 3 19:20:17 2022 -0700 Merge branch 'make-dsa-work-with-bonding-s-arp-monitor' Vladimir Oltean says: ==================== Make DSA work with bonding's ARP monitor Since commit 2b86cb829976 ("net: dsa: declare lockless TX feature for slave ports") in v5.7, DSA breaks the ARP monitoring logic from the bonding driver, fact which was pointed out by Brian Hutchinson who uses a linux-5.10.y stable kernel. Initially I got lured by other similar hacks introduced for other NETIF_F_LLTX drivers, which, inspired by the bonding documentation, update the trans_start of their TX queues by hand. However Jakub pointed out that this simply isn't a proper solution, and after coming to think more about it, I agree, and it doesn't work properly with DSA nor is it maintainable for the future changes I plan for it (multiple DSA masters in a LAG). I've tested these changes using a DSA-based setup and a veth-based setup, using the active-backup mode and ARP monitoring, with and without arp_validate. Link to v1: https://patchwork.kernel.org/project/netdevbpf/patch/20220715232641.952532-1-vladimir.oltean@nxp.com/ Link to v2: https://patchwork.kernel.org/project/netdevbpf/patch/20220727152000.3616086-1-vladimir.oltean@nxp.com/ ==================== Link: https://lore.kernel.org/r/20220731124108.2810233-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit cba8d8f57dfb1d01d961a0e50e7fddb82df57ad7 Author: Vladimir Oltean Date: Sun Jul 31 15:41:08 2022 +0300 docs: net: bonding: remove mentions of trans_start ARP monitoring no longer depends on dev->last_rx or dev_trans_start(), so delete this information. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski Documentation/networking/bonding.rst | 9 --------- 1 file changed, 9 deletions(-) commit 08b403d5bf07d9e0d97ba12649b198eee42f826d Author: Vladimir Oltean Date: Sun Jul 31 15:41:07 2022 +0300 Revert "veth: Add updating of trans_start" This reverts commit e66e257a5d8368d9c0ba13d4630f474436533e8b. The veth driver no longer needs these hacks which are slightly detrimential to the fast path performance, because the bonding driver is keeping track of TX times of ARP and NS probes by itself, which it should. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/veth.c | 4 ---- 1 file changed, 4 deletions(-) commit 4873a1b2024dce9a501b56d1039ff0752027a92e Author: Vladimir Oltean Date: Sun Jul 31 15:41:06 2022 +0300 net/sched: remove hacks added to dev_trans_start() for bonding to work Now that the bonding driver keeps track of the last TX time of ARP and NS probes, we effectively revert the following commits: 32d3e51a82d4 ("net_sched: use macvlan real dev trans_start in dev_trans_start()") 07ce76aa9bcf ("net_sched: make dev_trans_start return vlan's real dev trans_start") Note that the approach of continuing to hack at this function would not get us very far, hence the desire to take a different approach. DSA is also a virtual device that uses NETIF_F_LLTX, but there, many uppers share the same lower (DSA master, i.e. the physical host port of a switch). By making dev_trans_start() on a DSA interface return the dev_trans_start() of the master, we effectively assume that all other DSA interfaces are silent, otherwise this corrupts the validity of the probe timestamp data from the bonding driver's perspective. Furthermore, the hacks didn't take into consideration the fact that the lower interface of @dev may not have been physical either. For example, VLAN over VLAN, or DSA with 2 masters in a LAG. And even furthermore, there are NETIF_F_LLTX devices which are not stacked, like veth. The hack here would not work with those, because it would not have to provide the bonding driver something to chew at all. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski net/sched/sch_generic.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 06799a9085e12a778fe2851db550ab5911ad28fe Author: Vladimir Oltean Date: Sun Jul 31 15:41:05 2022 +0300 net: bonding: replace dev_trans_start() with the jiffies of the last ARP/NS The bonding driver piggybacks on time stamps kept by the network stack for the purpose of the netdev TX watchdog, and this is problematic because it does not work with NETIF_F_LLTX devices. It is hard to say why the driver looks at dev_trans_start() of the slave->dev, considering that this is updated even by non-ARP/NS probes sent by us, and even by traffic not sent by us at all (for example PTP on physical slave devices). ARP monitoring in active-backup mode appears to still work even if we track only the last TX time of actual ARP probes. Signed-off-by: Vladimir Oltean Acked-by: Jay Vosburgh Signed-off-by: Jakub Kicinski drivers/net/bonding/bond_main.c | 35 ++++++++++++++++++++--------------- include/net/bonding.h | 13 ++++++++++++- 2 files changed, 32 insertions(+), 16 deletions(-) commit d20ec7529236a2fcdb2d856fc0bd80b409a217fc Author: Heiko Stuebner Date: Thu Jul 7 01:15:36 2022 +0200 riscv: implement cache-management errata for T-Head SoCs The T-Head C906 and C910 implement a scheme for handling cache operations different from the generic Zicbom extension. Add an errata for it next to the generic dma coherency ops. Reviewed-by: Samuel Holland Tested-by: Samuel Holland Reviewed-by: Guo Ren Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20220706231536.2041855-5-heiko@sntech.de Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig.erratas | 11 +++++++++ arch/riscv/errata/thead/errata.c | 20 +++++++++++++++ arch/riscv/include/asm/errata_list.h | 48 ++++++++++++++++++++++++++++++++---- 3 files changed, 74 insertions(+), 5 deletions(-) commit f86d1fbbe7858884d6754534a0afbb74fc30bc26 Merge: 526942b8134c 7c6327c77d50 Author: Linus Torvalds Date: Wed Aug 3 16:29:08 2022 -0700 Merge tag 'net-next-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking changes from Paolo Abeni: "Core: - Refactor the forward memory allocation to better cope with memory pressure with many open sockets, moving from a per socket cache to a per-CPU one - Replace rwlocks with RCU for better fairness in ping, raw sockets and IP multicast router. - Network-side support for IO uring zero-copy send. - A few skb drop reason improvements, including codegen the source file with string mapping instead of using macro magic. - Rename reference tracking helpers to a more consistent netdev_* schema. - Adapt u64_stats_t type to address load/store tearing issues. - Refine debug helper usage to reduce the log noise caused by bots. BPF: - Improve socket map performance, avoiding skb cloning on read operation. - Add support for 64 bits enum, to match types exposed by kernel. - Introduce support for sleepable uprobes program. - Introduce support for enum textual representation in libbpf. - New helpers to implement synproxy with eBPF/XDP. - Improve loop performances, inlining indirect calls when possible. - Removed all the deprecated libbpf APIs. - Implement new eBPF-based LSM flavor. - Add type match support, which allow accurate queries to the eBPF used types. - A few TCP congetsion control framework usability improvements. - Add new infrastructure to manipulate CT entries via eBPF programs. - Allow for livepatch (KLP) and BPF trampolines to attach to the same kernel function. Protocols: - Introduce per network namespace lookup tables for unix sockets, increasing scalability and reducing contention. - Preparation work for Wi-Fi 7 Multi-Link Operation (MLO) support. - Add support to forciby close TIME_WAIT TCP sockets via user-space tools. - Significant performance improvement for the TLS 1.3 receive path, both for zero-copy and not-zero-copy. - Support for changing the initial MTPCP subflow priority/backup status - Introduce virtually contingus buffers for sockets over RDMA, to cope better with memory pressure. - Extend CAN ethtool support with timestamping capabilities - Refactor CAN build infrastructure to allow building only the needed features. Driver API: - Remove devlink mutex to allow parallel commands on multiple links. - Add support for pause stats in distributed switch. - Implement devlink helpers to query and flash line cards. - New helper for phy mode to register conversion. New hardware / drivers: - Ethernet DSA driver for the rockchip mt7531 on BPI-R2 Pro. - Ethernet DSA driver for the Renesas RZ/N1 A5PSW switch. - Ethernet DSA driver for the Microchip LAN937x switch. - Ethernet PHY driver for the Aquantia AQR113C EPHY. - CAN driver for the OBD-II ELM327 interface. - CAN driver for RZ/N1 SJA1000 CAN controller. - Bluetooth: Infineon CYW55572 Wi-Fi plus Bluetooth combo device. Drivers: - Intel Ethernet NICs: - i40e: add support for vlan pruning - i40e: add support for XDP framented packets - ice: improved vlan offload support - ice: add support for PPPoE offload - Mellanox Ethernet (mlx5) - refactor packet steering offload for performance and scalability - extend support for TC offload - refactor devlink code to clean-up the locking schema - support stacked vlans for bridge offloads - use TLS objects pool to improve connection rate - Netronome Ethernet NICs (nfp): - extend support for IPv6 fields mangling offload - add support for vepa mode in HW bridge - better support for virtio data path acceleration (VDPA) - enable TSO by default - Microsoft vNIC driver (mana) - add support for XDP redirect - Others Ethernet drivers: - bonding: add per-port priority support - microchip lan743x: extend phy support - Fungible funeth: support UDP segmentation offload and XDP xmit - Solarflare EF100: add support for virtual function representors - MediaTek SoC: add XDP support - Mellanox Ethernet/IB switch (mlxsw): - dropped support for unreleased H/W (XM router). - improved stats accuracy - unified bridge model coversion improving scalability (parts 1-6) - support for PTP in Spectrum-2 asics - Broadcom PHYs - add PTP support for BCM54210E - add support for the BCM53128 internal PHY - Marvell Ethernet switches (prestera): - implement support for multicast forwarding offload - Embedded Ethernet switches: - refactor OcteonTx MAC filter for better scalability - improve TC H/W offload for the Felix driver - refactor the Microchip ksz8 and ksz9477 drivers to share the probe code (parts 1, 2), add support for phylink mac configuration - Other WiFi: - Microchip wilc1000: diable WEP support and enable WPA3 - Atheros ath10k: encapsulation offload support Old code removal: - Neterion vxge ethernet driver: this is untouched since more than 10 years" * tag 'net-next-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1890 commits) doc: sfp-phylink: Fix a broken reference wireguard: selftests: support UML wireguard: allowedips: don't corrupt stack when detecting overflow wireguard: selftests: update config fragments wireguard: ratelimiter: use hrtimer in selftest net/mlx5e: xsk: Discard unaligned XSK frames on striding RQ net: usb: ax88179_178a: Bind only to vendor-specific interface selftests: net: fix IOAM test skip return code net: usb: make USB_RTL8153_ECM non user configurable net: marvell: prestera: remove reduntant code octeontx2-pf: Reduce minimum mtu size to 60 net: devlink: Fix missing mutex_unlock() call net/tls: Remove redundant workqueue flush before destroy net: txgbe: Fix an error handling path in txgbe_probe() net: dsa: Fix spelling mistakes and cleanup code Documentation: devlink: add add devlink-selftests to the table of contents dccp: put dccp_qpolicy_full() and dccp_qpolicy_push() in the same lock net: ionic: fix error check for vlan flags in ionic_set_nic_features() net: ice: fix error NETIF_F_HW_VLAN_CTAG_FILTER check in ice_vsi_sync_fltr() nfp: flower: add support for tunnel offload without key ID ... commit 526942b8134cc34d25d27f95dfff98b8ce2f6fcd Merge: a39b5dbdd2bc b3b2bec9646e Author: Linus Torvalds Date: Wed Aug 3 15:26:04 2022 -0700 Merge tag 'ata-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata Pull ATA updates from Damien Le Moal: - Some code refactoring for the pata_hpt37x and pata_hpt3x2n drivers, from Sergei. - Several patches to cleanup in libata-core, libata-scsi and libata-eh code: fixes arguments and variables types, change some functions declaration to static and fix for a typo in a comment. From Sergey and Xiang. - Fix a compilation warning in the pata_macio driver, from me. - A fix for the expected number of resources in the sata_mv driver fix, from Andrew. * tag 'ata-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: ata: sata_mv: Fixes expected number of resources now IRQs are gone ata: libata-scsi: fix result type of ata_ioc32() ata: pata_macio: Fix compilation warning ata: libata-eh: fix sloppy result type of ata_internal_cmd_timeout() ata: libata-core: fix sloppy parameter type in ata_exec_internal[_sg]() ata: make ata_port::fastdrain_cnt *unsigned int* ata: libata-eh: fix sloppy result type of ata_eh_nr_in_flight() ata: libata-core: make ata_exec_internal_sg() *static* ata: make transfer mode masks *unsigned int* ata: libata-core: get rid of *else* branches in ata_id_n_sectors() ata: libata-core: fix sloppy typing in ata_id_n_sectors() ata: pata_hpt3x2n: pass base DPLL frequency to hpt3x2n_pci_clock() ata: pata_hpt37x: merge hpt374_read_freq() to hpt37x_pci_clock() ata: pata_hpt37x: factor out hpt37x_pci_clock() ata: pata_hpt37x: move claculating PCI clock from hpt37x_clock_slot() ata: libata: Fix syntax errors in comments commit a39b5dbdd2bc5ba36e6b90f2f979efcb090b0613 Merge: f18d73096c0e 6bac30bb8ff8 Author: Linus Torvalds Date: Wed Aug 3 15:21:53 2022 -0700 Merge tag 'zonefs-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs Pull zonefs update from Damien Le Moal: "A single change for this cycle to simplify handling of the memory page used as super block buffer during mount (from Fabio)" * tag 'zonefs-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs: zonefs: Call page_address() on page acquired with GFP_KERNEL flag commit f18d73096c0eca1275f586cb984e6e28330447a0 Merge: 2e4f8c729db5 f8189d5d5fbf Author: Linus Torvalds Date: Wed Aug 3 15:16:49 2022 -0700 Merge tag 'iomap-5.20-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull iomap updates from Darrick Wong: "The most notable change in this first batch is that we no longer schedule pages beyond i_size for writeback, preferring instead to let truncate deal with those pages. Next week, there may be a second pull request to remove iomap_writepage from the other two filesystems (gfs2/zonefs) that use iomap for buffered IO. This follows in the same vein as the recent removal of writepage from XFS, since it hasn't been triggered in a few years; it does nothing during direct reclaim; and as far as the people who examined the patchset can tell, it's moving the codebase in the right direction. However, as it was a late addition to for-next, I'm holding off on that section for another week of testing to see if anyone can come up with a solid reason for holding off in the meantime. Summary: - Skip writeback for pages that are completely beyond EOF - Minor code cleanups" * tag 'iomap-5.20-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: dax: set did_zero to true when zeroing successfully iomap: set did_zero to true when zeroing successfully iomap: skip pages past eof in iomap_do_writepage() commit 2e4f8c729db5f3c0b8ea8b1b99f1ae124152e8cc Merge: 353767e4aaeb 5abbb7b92820 Author: Linus Torvalds Date: Wed Aug 3 15:12:40 2022 -0700 Merge tag 'affs-5.20-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull affs fix from David Sterba: "One update to AFFS, switching away from the kmap/kmap_atomic API" * tag 'affs-5.20-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: affs: use memcpy_to_page and remove replace kmap_atomic() commit 353767e4aaeb7bc818273dfacbb01dd36a9db47a Merge: ab17c0cd376f 0b078d9db879 Author: Linus Torvalds Date: Wed Aug 3 14:54:52 2022 -0700 Merge tag 'for-5.20-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "This brings some long awaited changes, the send protocol bump, otherwise lots of small improvements and fixes. The main core part is reworking bio handling, cleaning up the submission and endio and improving error handling. There are some changes outside of btrfs adding helpers or updating API, listed at the end of the changelog. Features: - sysfs: - export chunk size, in debug mode add tunable for setting its size - show zoned among features (was only in debug mode) - show commit stats (number, last/max/total duration) - send protocol updated to 2 - new commands: - ability write larger data chunks than 64K - send raw compressed extents (uses the encoded data ioctls), ie. no decompression on send side, no compression needed on receive side if supported - send 'otime' (inode creation time) among other timestamps - send file attributes (a.k.a file flags and xflags) - this is first version bump, backward compatibility on send and receive side is provided - there are still some known and wanted commands that will be implemented in the near future, another version bump will be needed, however we want to minimize that to avoid causing usability issues - print checksum type and implementation at mount time - don't print some messages at mount (mentioned as people asked about it), we want to print messages namely for new features so let's make some space for that - big metadata - this has been supported for a long time and is not a feature that's worth mentioning - skinny metadata - same reason, set by default by mkfs Performance improvements: - reduced amount of reserved metadata for delayed items - when inserted items can be batched into one leaf - when deleting batched directory index items - when deleting delayed items used for deletion - overall improved count of files/sec, decreased subvolume lock contention - metadata item access bounds checker micro-optimized, with a few percent of improved runtime for metadata-heavy operations - increase direct io limit for read to 256 sectors, improved throughput by 3x on sample workload Notable fixes: - raid56 - reduce parity writes, skip sectors of stripe when there are no data updates - restore reading from on-disk data instead of using stripe cache, this reduces chances to damage correct data due to RMW cycle - refuse to replay log with unknown incompat read-only feature bit set - zoned - fix page locking when COW fails in the middle of allocation - improved tracking of active zones, ZNS drives may limit the number and there are ENOSPC errors due to that limit and not actual lack of space - adjust maximum extent size for zone append so it does not cause late ENOSPC due to underreservation - mirror reading error messages show the mirror number - don't fallback to buffered IO for NOWAIT direct IO writes, we don't have the NOWAIT semantics for buffered io yet - send, fix sending link commands for existing file paths when there are deleted and created hardlinks for same files - repair all mirrors for profiles with more than 1 copy (raid1c34) - fix repair of compressed extents, unify where error detection and repair happen Core changes: - bio completion cleanups - don't double defer compression bios - simplify endio workqueues - add more data to btrfs_bio to avoid allocation for read requests - rework bio error handling so it's same what block layer does, the submission works and errors are consumed in endio - when asynchronous bio offload fails fall back to synchronous checksum calculation to avoid errors under writeback or memory pressure - new trace points - raid56 events - ordered extent operations - super block log_root_transid deprecated (never used) - mixed_backref and big_metadata sysfs feature files removed, they've been default for sufficiently long time, there are no known users and mixed_backref could be confused with mixed_groups Non-btrfs changes, API updates: - minor highmem API update to cover const arguments - switch all kmap/kmap_atomic to kmap_local - remove redundant flush_dcache_page() - address_space_operations::writepage callback removed - add bdev_max_segments() helper" * tag 'for-5.20-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (163 commits) btrfs: don't call btrfs_page_set_checked in finish_compressed_bio_read btrfs: fix repair of compressed extents btrfs: remove the start argument to check_data_csum and export btrfs: pass a btrfs_bio to btrfs_repair_one_sector btrfs: simplify the pending I/O counting in struct compressed_bio btrfs: repair all known bad mirrors btrfs: merge btrfs_dev_stat_print_on_error with its only caller btrfs: join running log transaction when logging new name btrfs: simplify error handling in btrfs_lookup_dentry btrfs: send: always use the rbtree based inode ref management infrastructure btrfs: send: fix sending link commands for existing file paths btrfs: send: introduce recorded_ref_alloc and recorded_ref_free btrfs: zoned: wait until zone is finished when allocation didn't progress btrfs: zoned: write out partially allocated region btrfs: zoned: activate necessary block group btrfs: zoned: activate metadata block group on flush_space btrfs: zoned: disable metadata overcommit for zoned btrfs: zoned: introduce space_info->active_total_bytes btrfs: zoned: finish least available block group on data bg allocation btrfs: let can_allocate_chunk return error ... commit ab17c0cd376f240bb8ead6f03be2bb4748bbc61a Merge: 97a77ab14ffa 2d82e6227ea1 Author: Linus Torvalds Date: Wed Aug 3 14:41:36 2022 -0700 Merge tag 'efi-efivars-removal-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull efivars sysfs interface removal from Ard Biesheuvel: "Remove the obsolete 'efivars' sysfs based interface to the EFI variable store, now that all users have moved to the efivarfs pseudo file system, which was created ~10 years ago to address some fundamental shortcomings in the sysfs based driver. Move the 'business logic' related to which EFI variables are important and may affect the boot flow from the efivars support layer into the efivarfs pseudo file system, so it is no longer exposed to other parts of the kernel" * tag 'efi-efivars-removal-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi: vars: Move efivar caching layer into efivarfs efi: vars: Switch to new wrapper layer efi: vars: Remove deprecated 'efivars' sysfs interface commit 97a77ab14ffac749ec2419c92ec2954111c22d22 Merge: ff89dd08c0f0 e3435fff6ae0 Author: Linus Torvalds Date: Wed Aug 3 14:38:02 2022 -0700 Merge tag 'efi-next-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI updates from Ard Biesheuvel: - Enable mirrored memory for arm64 - Fix up several abuses of the efivar API - Refactor the efivar API in preparation for moving the 'business logic' part of it into efivarfs - Enable ACPI PRM on arm64 * tag 'efi-next-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: (24 commits) ACPI: Move PRM config option under the main ACPI config ACPI: Enable Platform Runtime Mechanism(PRM) support on ARM64 ACPI: PRM: Change handler_addr type to void pointer efi: Simplify arch_efi_call_virt() macro drivers: fix typo in firmware/efi/memmap.c efi: vars: Drop __efivar_entry_iter() helper which is no longer used efi: vars: Use locking version to iterate over efivars linked lists efi: pstore: Omit efivars caching EFI varstore access layer efi: vars: Add thin wrapper around EFI get/set variable interface efi: vars: Don't drop lock in the middle of efivar_init() pstore: Add priv field to pstore_record for backend specific use Input: applespi - avoid efivars API and invoke EFI services directly selftests/kexec: remove broken EFI_VARS secure boot fallback check brcmfmac: Switch to appropriate helper to load EFI variable contents iwlwifi: Switch to proper EFI variable store interface media: atomisp_gmin_platform: stop abusing efivar API efi: efibc: avoid efivar API for setting variables efi: avoid efivars layer when loading SSDTs from variables efi: Correct comment on efi_memmap_alloc memblock: Disable mirror feature if kernelcore is not specified ... commit ff89dd08c0f0a3fd330c9ef9d775e880f82c291e Merge: d9b58ab789b0 f615625a44c4 Author: Linus Torvalds Date: Wed Aug 3 14:03:51 2022 -0700 Merge tag 'pull-work.9p' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull 9p iov_iter fix from Al Viro: "net/9p abuses iov_iter primitives - it attempts to copy _from_ a destination-only iov_iter when it handles Rerror arriving in reply to zero-copy request. Not hard to fix, fortunately. This is a prereq for the iov_iter_get_pages() work in the second part of iov_iter series, ended up in a separate branch" * tag 'pull-work.9p' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: 9p: handling Rerror without copy_from_iter_full() commit d9b58ab789b053b70dc475f1efda124857f10aa2 Merge: 5264406cdb66 c3497fd009ef Author: Linus Torvalds Date: Wed Aug 3 13:59:15 2022 -0700 Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull copy_to_iter_mc fix from Al Viro: "Backportable fix for copy_to_iter_mc() - the second part of iov_iter work will pretty much overwrite this, but would be much harder to backport" * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix short copy handling in copy_mc_pipe_to_iter() commit 863ed94c589fcd1984f4e3080f069d30508044bb Author: Mårten Lindahl Date: Mon Aug 1 15:57:03 2022 +0200 tpm: Add check for Failure mode for TPM2 modules In commit 0aa698787aa2 ("tpm: Add Upgrade/Reduced mode support for TPM2 modules") it was said that: "If the TPM is in Failure mode, it will successfully respond to both tpm2_do_selftest() and tpm2_startup() calls. Although, will fail to answer to tpm2_get_cc_attrs_tbl(). Use this fact to conclude that TPM is in Failure mode." But a check was never added in the commit when calling tpm2_get_cc_attrs_tbl() to conclude that the TPM is in Failure mode. This commit corrects this by adding a check. Fixes: 0aa698787aa2 ("tpm: Add Upgrade/Reduced mode support for TPM2 modules") Cc: stable@vger.kernel.org # v5.17+ Signed-off-by: Mårten Lindahl Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm2-cmd.c | 6 ++++++ 1 file changed, 6 insertions(+) commit bed4593645366ad7362a3aa7bc0d100d8d8236a8 Author: Huacai Chen Date: Mon Jul 11 09:17:38 2022 +0800 tpm: eventlog: Fix section mismatch for DEBUG_SECTION_MISMATCH If DEBUG_SECTION_MISMATCH enabled, __calc_tpm2_event_size() will not be inlined, this cause section mismatch like this: WARNING: modpost: vmlinux.o(.text.unlikely+0xe30c): Section mismatch in reference from the variable L0 to the function .init.text:early_ioremap() The function L0() references the function __init early_memremap(). This is often because L0 lacks a __init annotation or the annotation of early_ioremap is wrong. Fix it by using __always_inline instead of inline for the called-once function __calc_tpm2_event_size(). Fixes: 44038bc514a2 ("tpm: Abstract crypto agile event size calculations") Cc: stable@vger.kernel.org # v5.3 Reported-by: WANG Xuerui Signed-off-by: Huacai Chen Signed-off-by: Jarkko Sakkinen include/linux/tpm_eventlog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffd056fa31779756d7146fb17325fb7872c98812 Author: Yang Li Date: Fri Jul 1 17:13:22 2022 +0800 tpm: fix platform_no_drv_owner.cocci warning Eliminate the following coccicheck warning: ./drivers/char/tpm/tpm_tis_i2c.c:379:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Signed-off-by: Yang Li Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis_i2c.c | 1 - 1 file changed, 1 deletion(-) commit 0815291a8fd66cdcf7db1445d4d99b0d16065829 Author: Tianjia Zhang Date: Tue Jun 28 11:37:20 2022 +0800 KEYS: asymmetric: enforce SM2 signature use pkey algo The signature verification of SM2 needs to add the Za value and recalculate sig->digest, which requires the detection of the pkey_algo in public_key_verify_signature(). As Eric Biggers said, the pkey_algo field in sig is attacker-controlled and should be use pkey->pkey_algo instead of sig->pkey_algo, and secondly, if sig->pkey_algo is NULL, it will also cause signature verification failure. The software_key_determine_akcipher() already forces the algorithms are matched, so the SM3 algorithm is enforced in the SM2 signature, although this has been checked, we still avoid using any algorithm information in the signature as input. Fixes: 215525639631 ("X.509: support OSCCA SM2-with-SM3 certificate verification") Reported-by: Eric Biggers Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Tianjia Zhang Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen crypto/asymmetric_keys/public_key.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d35f42ca0778ed41c7b5243502b454b89cd699be Author: Elvira Khabirova Date: Mon Jun 27 17:21:42 2022 +0800 pkcs7: support EC-RDSA/streebog in SignerInfo Allow using EC-RDSA/streebog in pkcs7 certificates in a similar way to how it's done in the x509 parser. This is needed e.g. for loading kernel modules signed with EC-RDSA. Signed-off-by: Elvira Khabirova Reviewed-by: Vitaly Chikunov Reviewed-by: Tianjia Zhang Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen crypto/asymmetric_keys/pkcs7_parser.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 3fb8e3f532df608dd6f29940281138352f5b6369 Author: Tianjia Zhang Date: Mon Jun 27 17:21:41 2022 +0800 pkcs7: parser support SM2 and SM3 algorithms combination Support parsing the message signature of the SM2 and SM3 algorithm combination. This group of algorithms has been well supported. One of the main users is module signature verification. Signed-off-by: Tianjia Zhang Reviewed-by: Vitaly Chikunov Reviewed-by: Stefan Berger Signed-off-by: Jarkko Sakkinen crypto/asymmetric_keys/pkcs7_parser.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1a83950270684f860b15430394ea8df540d71353 Author: Tianjia Zhang Date: Mon Jun 27 17:21:07 2022 +0800 sign-file: Fix confusing error messages When an error occurs, use errx() instead of err() to display the error message, because openssl has its own error record. When an error occurs, errno will not be changed, while err() displays the errno error message. It will cause confusion. For example, when CMS_add1_signer() fails, the following message will appear: sign-file: CMS_add1_signer: Success errx() ignores errno and does not cause such issue. Signed-off-by: Tianjia Zhang Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen scripts/sign-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74ad4334b2ae4f83d8018487d625d1073fd3f02d Author: Tianjia Zhang Date: Mon Jun 27 17:19:58 2022 +0800 X.509: Support parsing certificate using SM2 algorithm The SM2-with-SM3 certificate generated by latest openssl no longer reuses the OID_id_ecPublicKey, but directly uses OID_sm2. This patch supports this type of x509 certificate parsing. Signed-off-by: Tianjia Zhang Signed-off-by: Jarkko Sakkinen crypto/asymmetric_keys/x509_cert_parser.c | 3 +++ 1 file changed, 3 insertions(+) commit bbc23a07b0728c820d665d0054b2e2a6d01f0a98 Author: Alexander Steffen Date: Wed Jun 8 19:31:13 2022 +0200 tpm: Add tpm_tis_i2c backend for tpm_tis_core Implement the TCG I2C Interface driver, as specified in the TCG PC Client Platform TPM Profile (PTP) specification for TPM 2.0 v1.04 revision 14, section 8, I2C Interface Definition. This driver supports Guard Times. That is, if required by the TPM, the driver has to wait by a vendor-specific time after each I2C read/write. The specific time is read from the TPM_I2C_INTERFACE_CAPABILITY register. Unfortunately, the TCG specified almost but not quite compatible register addresses. Therefore, the TIS register addresses need to be mapped to I2C ones. The locality is stripped because for now, only locality 0 is supported. Add a sanity check to I2C reads of e.g. TPM_ACCESS and TPM_STS. This is to detect communication errors and issues due to non-standard behaviour (E.g. the clock stretching quirk in the BCM2835, see 4dbfb5f4401f). In case the sanity check fails, attempt a retry. Co-developed-by: Johannes Holland Signed-off-by: Johannes Holland Co-developed-by: Amir Mizinski Signed-off-by: Amir Mizinski Signed-off-by: Alexander Steffen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/Kconfig | 12 ++ drivers/char/tpm/Makefile | 1 + drivers/char/tpm/tpm_tis_i2c.c | 391 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 404 insertions(+) commit f25534a68b8e1ed8266d23b464a3b512364b124d Author: Alexander Steffen Date: Wed Jun 8 19:31:12 2022 +0200 tpm: Add tpm_tis_verify_crc to the tpm_tis_phy_ops protocol layer Some TPMs, e.g. those implementing the I2C variant of TIS, can verify data transfers to/from the FIFO with a CRC. The CRC is calculated over the entirety of the FIFO register. Since the phy_ops layer is not aware when the core layer is done reading/writing the FIFO, CRC verification must be triggered from the core layer. To this end, add an optional phy_ops API call. Co-developed-by: Johannes Holland Signed-off-by: Johannes Holland Signed-off-by: Alexander Steffen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis_core.c | 14 ++++++++++++++ drivers/char/tpm/tpm_tis_core.h | 10 ++++++++++ 2 files changed, 24 insertions(+) commit 2353673d8a025a6ba3b3aa3917a3a98944e64702 Author: Alexander Steffen Date: Wed Jun 8 19:31:11 2022 +0200 dt-bindings: trivial-devices: Add Infineon SLB9673 TPM Initial device to be supported by the upcoming tpm_tis_i2c driver. More to be added later. Signed-off-by: Alexander Steffen Acked-by: Rob Herring Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 5e3a3f27cbded417e6d1ea2bb9739b572c09580e Author: Stefan Mahnke-Hartmann Date: Fri Jun 3 10:41:58 2022 +0200 tpm: Add upgrade/reduced mode support for TPM1.2 modules In case a TPM in failure mode is detected, the TPM should be accessible through a transparent communication channel for analysing purposes (e.g. TPM_GetTestResult) or a field upgrade. Since a TPM in failure mode has similar reduced functionality as in field upgrade mode, the flag TPM_CHIP_FLAG_FIRMWARE_UPGRADE is also valid. As described in TCG TPM Main Part1 Design Principles, Revision 116, chapter 9.2.1. the TPM also allows an update function in case a TPM is in failure mode. If the TPM in failure mode is detected, the function tpm1_auto_startup() sets TPM_CHIP_FLAG_FIRMWARE_UPGRADE flag, which is used later during driver initialization/deinitialization to disable functionality which makes no sense or will fail in the current TPM state. The following functionality is affected: * Do not register TPM as a hwrng * Do not get pcr allocation * Do not register sysfs entries which provide information impossible to obtain in limited mode Signed-off-by: Stefan Mahnke-Hartmann Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm.h | 1 + drivers/char/tpm/tpm1-cmd.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) commit 5264406cdb66c7003eb3edf53c9773b1b20611b9 Merge: 200e340f2196 dd45ab9dd28c Author: Linus Torvalds Date: Wed Aug 3 13:50:22 2022 -0700 Merge tag 'pull-work.iov_iter-base' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs iov_iter updates from Al Viro: "Part 1 - isolated cleanups and optimizations. One of the goals is to reduce the overhead of using ->read_iter() and ->write_iter() instead of ->read()/->write(). new_sync_{read,write}() has a surprising amount of overhead, in particular inside iocb_flags(). That's the explanation for the beginning of the series is in this pile; it's not directly iov_iter-related, but it's a part of the same work..." * tag 'pull-work.iov_iter-base' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: first_iovec_segment(): just return address iov_iter: massage calling conventions for first_{iovec,bvec}_segment() iov_iter: first_{iovec,bvec}_segment() - simplify a bit iov_iter: lift dealing with maxpages out of first_{iovec,bvec}_segment() iov_iter_get_pages{,_alloc}(): cap the maxsize with MAX_RW_COUNT iov_iter_bvec_advance(): don't bother with bvec_iter copy_page_{to,from}_iter(): switch iovec variants to generic keep iocb_flags() result cached in struct file iocb: delay evaluation of IS_SYNC(...) until we want to check IOCB_DSYNC struct file: use anonymous union member for rcuhead and llist btrfs: use IOMAP_DIO_NOSYNC teach iomap_dio_rw() to suppress dsync No need of likely/unlikely on calls of check_copy_size() commit 200e340f2196d7fd427a5810d06e893b932f145a Merge: a782e8664972 50417d22d0ef Author: Linus Torvalds Date: Wed Aug 3 11:43:12 2022 -0700 Merge tag 'pull-work.dcache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs dcache updates from Al Viro: "The main part here is making parallel lookups safe for RT - making sure preemption is disabled in start_dir_add()/ end_dir_add() sections (on non-RT it's automatic, on RT it needs to to be done explicitly) and moving wakeups from __d_lookup_done() inside of such to the end of those sections. Wakeups can be safely delayed for as long as ->d_lock on in-lookup dentry is held; proving that has caught a bug in d_add_ci() that allows memory corruption when sufficiently bogus ntfs (or case-insensitive xfs) image is mounted. Easily fixed, fortunately" * tag 'pull-work.dcache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs/dcache: Move wakeup out of i_seq_dir write held region. fs/dcache: Move the wakeup from __d_lookup_done() to the caller. fs/dcache: Disable preemption on i_dir_seq write side on PREEMPT_RT d_add_ci(): make sure we don't miss d_lookup_done() commit 360614c01f81f48a89d8b13f8fa69c3ae0a1f5c7 Author: Andrew Morton Date: Tue Aug 2 18:03:03 2022 -0700 tools/testing/selftests/vm/hmm-tests.c: fix build hmm-tests.c:1607:42: error: 'HMM_DMIRROR_MIGRATE' undeclared (first use in this function); did you mean 'HMM_DMIRROR_WRITE'? Fixes: f6c3e1ae0114cd0 ("mm/hmm: add a test for cross device private faults") Reported-by: kernel test robot Reviewed-by: Ralph Campbell Cc: Alistair Popple Signed-off-by: Andrew Morton tools/testing/selftests/vm/hmm-tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a782e866497217f22c5d9014cbb7be8549151376 Merge: d9395512c5bd 868941b14441 Author: Linus Torvalds Date: Wed Aug 3 11:35:20 2022 -0700 Merge tag 'pull-work.lseek' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs lseek updates from Al Viro: "Jason's lseek series. Saner handling of 'lseek should fail with ESPIPE' - this gets rid of the magical no_llseek thing and makes checks consistent. In particular, the ad-hoc "can we do splice via internal pipe" checks got saner (and somewhat more permissive, which is what Jason had been after, AFAICT)" * tag 'pull-work.lseek' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: remove no_llseek fs: check FMODE_LSEEK to control internal pipe splicing vfio: do not set FMODE_LSEEK flag dma-buf: remove useless FMODE_LSEEK flag fs: do not compare against ->llseek fs: clear or set FMODE_LSEEK based on llseek function commit 5b045200b53a9b95f87409b5c13f43adb6f1da6c Author: Krzysztof Kozlowski Date: Tue Jul 26 13:52:02 2022 +0200 dt-bindings: pinctrl: qcom,pmic-gpio: add PM8226 constraints Document the constraints (number of GPIOs) for PM8226 variant. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220726115202.99108-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml | 1 + 1 file changed, 1 insertion(+) commit d9395512c5bd326924ba0b36ee0d5d51d763a8d6 Merge: f00654007fe1 3bd8bc897161 Author: Linus Torvalds Date: Wed Aug 3 11:31:42 2022 -0700 Merge tag 'pull-work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs namei updates from Al Viro: "RCU pathwalk cleanups. Storing sampled ->d_seq of the next dentry in nameidata simplifies life considerably, especially if we delay fetching ->d_inode until step_into()" * tag 'pull-work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: step_into(): move fetching ->d_inode past handle_mounts() lookup_fast(): don't bother with inode follow_dotdot{,_rcu}(): don't bother with inode step_into(): lose inode argument namei: stash the sampled ->d_seq into nameidata namei: move clearing LOOKUP_RCU towards rcu_read_unlock() switch try_to_unlazy_next() to __legitimize_mnt() follow_dotdot{,_rcu}(): change calling conventions namei: get rid of pointless unlikely(read_seqcount_retry(...)) __follow_mount_rcu(): verify that mount_lock remains unchanged commit 9a206bca238177f7fa09fef6735aab7d5d3b2b19 Author: John Garry Date: Tue Jul 26 18:02:44 2022 +0800 pinctrl: qcom: Make PINCTRL_SM8450 depend on PINCTRL_MSM All the many other configs depend on config PINCTRL_MSM, yet for config PINCTRL_SM8450 we select config PINCTRL_MSM. Make config PINCTRL_SM8450 depend on PINCTRL_MSM to be consistent with the rest. Signed-off-by: John Garry Suggested-by: Arnd Bergmann Link: https://lore.kernel.org/r/1658829764-124936-1-git-send-email-john.garry@huawei.com Signed-off-by: Linus Walleij drivers/pinctrl/qcom/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24df5428ef9d1ca1edd54eca7eb667110f2dfae3 Author: Ivan Hasenkampf Date: Wed Aug 3 18:40:01 2022 +0200 ALSA: hda/realtek: Add quirk for HP Spectre x360 15-eb0xxx Fixes speaker output on HP Spectre x360 15-eb0xxx [ re-sorted in SSID order by tiwai ] Signed-off-by: Ivan Hasenkampf Cc: Link: https://lore.kernel.org/r/20220803164001.290394-1-ivan.hasenkampf@gmail.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) commit 4b759ca15a4914f96ea204ea9200ceeb01d70666 Author: Jianhua Lu Date: Wed Aug 3 09:56:45 2022 +0800 pinctrl: qcom: sm8250: Fix PDC map Fix the PDC mapping for SM8250, gpio39 is mapped to irq73(not irq37). Fixes: b41efeed507a("pinctrl: qcom: sm8250: Specify PDC map.") Signed-off-by: Jianhua Lu Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20220803015645.22388-1-lujianhua000@gmail.com Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-sm8250.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df91ffe8cb75d9d80ffe821493bffdc11e65687c Author: Mario Limonciello Date: Mon Aug 1 09:49:52 2022 -0500 pinctrl: amd: Fix an unused variable `char *output_enable` is no longer used once switching to unicode output. Fixes: e8129a076a50 ("pinctrl: amd: Use unicode for debugfs output") Reported-by: kernel test robot Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20220801144952.141-1-mario.limonciello@amd.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 1 - 1 file changed, 1 deletion(-) commit f00654007fe1c154dafbdc1f5953c132e8c27c38 Merge: e087437a6fef cf5e7a652168 Author: Linus Torvalds Date: Wed Aug 3 10:35:43 2022 -0700 Merge tag 'folio-6.0' of git://git.infradead.org/users/willy/pagecache Pull folio updates from Matthew Wilcox: - Fix an accounting bug that made NR_FILE_DIRTY grow without limit when running xfstests - Convert more of mpage to use folios - Remove add_to_page_cache() and add_to_page_cache_locked() - Convert find_get_pages_range() to filemap_get_folios() - Improvements to the read_cache_page() family of functions - Remove a few unnecessary checks of PageError - Some straightforward filesystem conversions to use folios - Split PageMovable users out from address_space_operations into their own movable_operations - Convert aops->migratepage to aops->migrate_folio - Remove nobh support (Christoph Hellwig) * tag 'folio-6.0' of git://git.infradead.org/users/willy/pagecache: (78 commits) fs: remove the NULL get_block case in mpage_writepages fs: don't call ->writepage from __mpage_writepage fs: remove the nobh helpers jfs: stop using the nobh helper ext2: remove nobh support ntfs3: refactor ntfs_writepages mm/folio-compat: Remove migration compatibility functions fs: Remove aops->migratepage() secretmem: Convert to migrate_folio hugetlb: Convert to migrate_folio aio: Convert to migrate_folio f2fs: Convert to filemap_migrate_folio() ubifs: Convert to filemap_migrate_folio() btrfs: Convert btrfs_migratepage to migrate_folio mm/migrate: Add filemap_migrate_folio() mm/migrate: Convert migrate_page() to migrate_folio() nfs: Convert to migrate_folio btrfs: Convert btree_migratepage to migrate_folio mm/migrate: Convert expected_page_refs() to folio_expected_refs() mm/migrate: Convert buffer_migrate_page() to buffer_migrate_folio() ... commit 6c58cf40e3a1d2f47c09d3489857e9476316788a Author: Florian Fainelli Date: Mon Jul 25 10:37:54 2022 -0700 tools/thermal: Fix possible path truncations A build with -D_FORTIFY_SOURCE=2 enabled will produce the following warnings: sysfs.c:63:30: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size between 0 and 255 [-Wformat-truncation=] snprintf(filepath, 256, "%s/%s", path, filename); ^~ Bump up the buffer to PATH_MAX which is the limit and account for all of the possible NUL and separators that could lead to exceeding the allocated buffer sizes. Fixes: 94f69966faf8 ("tools/thermal: Introduce tmon, a tool for thermal subsystem") Signed-off-by: Florian Fainelli Signed-off-by: Rafael J. Wysocki tools/thermal/tmon/sysfs.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 8df4ef3eaa62b25afbb30cc7707cc99ec155ed71 Author: Jean Delvare Date: Sun Jul 31 14:13:52 2022 +0200 thermal: Drop obsolete dependency on COMPILE_TEST Since commit 0166dc11be91 ("of: make CONFIG_OF user selectable"), it is possible to test-build any driver which depends on OF on any architecture by explicitly selecting OF. Therefore depending on COMPILE_TEST as an alternative is no longer needed. It is actually better to always build such drivers with OF enabled, so that the test builds are closer to how each driver will actually be built on its intended target. Building them without OF may not test much as the compiler will optimize out potentially large parts of the code. In the worst case, this could even pop false positive warnings. Dropping COMPILE_TEST here improves the quality of our testing and avoids wasting time on non-existent issues. Signed-off-by: Jean Delvare Signed-off-by: Rafael J. Wysocki drivers/thermal/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d5a8aa5d7d80d21ab6b266f1bed4194b61746199 Author: Rafael J. Wysocki Date: Fri Jul 29 17:39:07 2022 +0200 thermal: sysfs: Fix cooling_device_stats_setup() error code path If cooling_device_stats_setup() fails to create the stats object, it must clear the last slot in cooling_device_attr_groups that was initially empty (so as to make it possible to add stats attributes to the cooling device attribute groups). Failing to do so may cause the stats attributes to be created by mistake for a device that doesn't have a stats object, because the slot in question might be populated previously during the registration of another cooling device. Fixes: 8ea229511e06 ("thermal: Add cooling device's statistics in sysfs") Reported-by: Di Shen Tested-by: Di Shen Cc: 4.17+ # 4.17+ Signed-off-by: Rafael J. Wysocki drivers/thermal/thermal_sysfs.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 312c1a44da370a367b643fae63107211104a1464 Author: Sumeet Pawnikar Date: Thu Jul 28 23:24:56 2022 +0530 thermal: intel: Add TCC cooling support for Alder Lake-N and Raptor Lake-P Add Alder Lake-N and Raptor Lake-P to the list of processor models supported by the Intel TCC cooling driver. Signed-off-by: Sumeet Pawnikar Acked-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/thermal/intel/intel_tcc_cooling.c | 2 ++ 1 file changed, 2 insertions(+) commit e087437a6fef3acc11aaa1ade84731fe1571b808 Merge: b6bb70f9ab80 85656ec193e9 Author: Linus Torvalds Date: Wed Aug 3 10:02:28 2022 -0700 Merge tag 'xarray-6.0' of git://git.infradead.org/users/willy/xarray Pull XArray/IDR updates from Matthew Wilcox: - Add appropriate might_alloc() annotations to the XArray APIs - Document that the IDR is deprecated * tag 'xarray-6.0' of git://git.infradead.org/users/willy/xarray: IDR: Note that the IDR API is deprecated XArray: Add calls to might_alloc() commit b6bb70f9ab80a11161252bf217993d2c40ea5eb2 Merge: e2b542100719 265792d0dede Author: Linus Torvalds Date: Wed Aug 3 09:45:08 2022 -0700 Merge tag 'cgroup-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: "Several core optimizations: - threadgroup_rwsem write locking is skipped when configuring controllers in empty subtrees. Combined with CLONE_INTO_CGROUP, this allows the common static usage pattern to not grab threadgroup_rwsem at all (glibc still doesn't seem ready for CLONE_INTO_CGROUP unfortunately). - threadgroup_rwsem used to be put into non-percpu mode by default due to latency concerns in specific use cases. There's no reason for everyone else to pay for it. Make the behavior optional. - psi no longer allocates memory when disabled. ... along with some code cleanups" * tag 'cgroup-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: Skip subtree root in cgroup_update_dfl_csses() cgroup: remove "no" prefixed mount options cgroup: Make !percpu threadgroup_rwsem operations optional cgroup: Add "no" prefixed mount options cgroup: Elide write-locking threadgroup_rwsem when updating csses on an empty subtree cgroup.c: remove redundant check for mixable cgroup in cgroup_migrate_vet_dst cgroup.c: add helper __cset_cgroup_from_root to cleanup duplicated codes psi: dont alloc memory for psi by default commit bb8bc52e75785af94b9ba079277547d50d018a52 Author: Adrián Herrera Arcila Date: Fri Jul 29 16:12:43 2022 +0000 perf stat: Refactor __run_perf_stat() common code This extracts common code from the branches of the forks if-then-else. enable_counters(), which was at the beginning of both branches of the conditional, is now unconditional; evlist__start_workload() is extracted to a different if, which enables making the common clocking code unconditional. Reviewed-by: Leo Yan Signed-off-by: Adrián Herrera Arcila Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Link: https://lore.kernel.org/r/20220729161244.10522-1-adrian.herrera@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) commit 6ab4b1990097b76508bd6dffd85ffcacbedb26b2 Author: Kajetan Puchalski Date: Tue Jul 26 11:24:04 2022 +0100 cpuidle: Add cpu_idle_miss trace event Add a trace event for cpuidle to track missed (too deep or too shallow) wakeups. After each wakeup, CPUIdle already computes whether the entered state was optimal, above or below the desired one and updates the relevant counters. This patch makes it possible to trace those events in addition to just reading the counters. The patterns of types and percentages of misses across different workloads appear to be very consistent. This makes the trace event very useful for comparing the relative correctness of different CPUIdle governors for different types of workloads, or for finding the optimal governor for a given device. Signed-off-by: Kajetan Puchalski Reviewed-by: Steven Rostedt (Google) Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle.c | 6 +++++- include/trace/events/power.h | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) commit f6e0b468dab97a9214c9713c298ed9e2dd62f97f Merge: a771ea6413c0 1d95af02f230 Author: Rafael J. Wysocki Date: Wed Aug 3 17:49:38 2022 +0200 Merge tag 'opp-updates-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull operating performance points (OPP) updates for 5.20-rc1 from Viresh Kumar: "- Make dev_pm_opp_set_regulators() accept NULL terminated list (Viresh Kumar). - Add dev_pm_opp_set_config() and friends and migrate other users/helpers to using them (Viresh Kumar). - Add support for multiple clocks for a device (Viresh Kumar and Krzysztof Kozlowski). - Configure resources before adding OPP table for Venus (Stanimir Varbanov). - Keep reference count up for opp->np and opp_table->np while they are still in use (Liang He). - Minor cleanups (Viresh Kumar and Yang Li)." * tag 'opp-updates-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: (43 commits) venus: pm_helpers: Fix warning in OPP during probe OPP: Don't drop opp->np reference while it is still in use OPP: Don't drop opp_table->np reference while it is still in use OPP: Remove dev{m}_pm_opp_of_add_table_noclk() PM / devfreq: tegra30: Register config_clks helper OPP: Allow config_clks helper for single clk case OPP: Provide a simple implementation to configure multiple clocks OPP: Assert clk_count == 1 for single clk helpers OPP: Add key specific assert() method to key finding helpers OPP: Compare bandwidths for all paths in _opp_compare_key() OPP: Allow multiple clocks for a device dt-bindings: opp: accept array of frequencies OPP: Make dev_pm_opp_set_opp() independent of frequency OPP: Reuse _opp_compare_key() in _opp_add_static_v2() OPP: Remove rate_not_available parameter to _opp_add() OPP: Use consistent names for OPP table instances OPP: Use generic key finding helpers for bandwidth key OPP: Use generic key finding helpers for level key OPP: Add generic key finding helpers and use them for freq APIs OPP: Remove dev_pm_opp_find_freq_ceil_by_volt() ... commit 7912c9c6a6e8ebda603facfe314701c0e45440bb Merge: a771ea6413c0 33fe1cb20cf4 Author: Rafael J. Wysocki Date: Wed Aug 3 17:47:45 2022 +0200 Merge tag 'cpufreq-arm-updates-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull cpufreq/ARM updates for 5.20-rc1 from Viresh Kumar: "- Fix return error code in mtk_cpu_dvfs_info_init (Yang Yingliang). - Minor cleanups and support for new boards for Qcom cpufreq drivers (Bryan O'Donoghue, Konrad Dybcio, Pierre Gondois, and Yicong Yang). - Fix sparse warnings for Tegra driver (Viresh Kumar)." * tag 'cpufreq-arm-updates-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: tegra194: Staticize struct tegra_cpufreq_soc instances dt-bindings: cpufreq: cpufreq-qcom-hw: Add SM6375 compatible dt-bindings: opp: Add msm8939 to the compatible list dt-bindings: opp: Add missing compat devices dt-bindings: opp: opp-v2-kryo-cpu: Fix example binding checks cpufreq: Change order of online() CB and policy->cpus modification cpufreq: qcom-hw: Remove deprecated irq_set_affinity_hint() call cpufreq: qcom-hw: Disable LMH irq when disabling policy cpufreq: qcom-hw: Reset cancel_throttle when policy is re-enabled cpufreq: qcom-cpufreq-hw: use HZ_PER_KHZ macro in units.h cpufreq: mediatek: fix error return code in mtk_cpu_dvfs_info_init() commit 451e45a0e6df21e63acfd493feb5194f4697ce11 Author: Konstantin Komarov Date: Wed Jul 13 19:18:19 2022 +0300 fs/ntfs3: Make ni_ins_new_attr return error Function ni_ins_new_attr now returns ERR_PTR(err), so we check it now in other functions like ni_expand_mft_list Signed-off-by: Konstantin Komarov fs/ntfs3/frecord.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit 8039edba043d1eaee74bd76e0280a49ba5e195d7 Author: Konstantin Komarov Date: Wed Jul 13 19:11:15 2022 +0300 fs/ntfs3: Create MFT zone only if length is large enough Also removed uninformative print Signed-off-by: Konstantin Komarov fs/ntfs3/fsntfs.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 9256ec35359f52c1e390cf419873cf519ee332b6 Author: Konstantin Komarov Date: Wed Jul 13 18:44:24 2022 +0300 fs/ntfs3: Refactoring attr_insert_range to restore after errors Added done and undo labels for restoring after errors Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 117 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 86 insertions(+), 31 deletions(-) commit 20abc64f78346ac591344133301661b77e1c8253 Author: Konstantin Komarov Date: Wed Jul 13 18:18:48 2022 +0300 fs/ntfs3: Refactoring attr_punch_hole to restore after errors Added comments to code Added new function run_clone to make a copy of run Added done and undo labels for restoring after errors Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 117 ++++++++++++++++++++++++++++++++++++----------------- fs/ntfs3/ntfs_fs.h | 1 + fs/ntfs3/run.c | 25 ++++++++++++ 3 files changed, 105 insertions(+), 38 deletions(-) commit 0e5b044cbf3a41b4efad7d9616342338f88b373d Author: Konstantin Komarov Date: Wed Jul 13 18:00:03 2022 +0300 fs/ntfs3: Refactoring attr_set_size to restore after errors Added comments to code Added two undo labels for restoring after errors Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 180 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 126 insertions(+), 54 deletions(-) commit c12df45ee690112782049b8e85dff2e6cb1b3853 Author: Konstantin Komarov Date: Wed Jul 13 17:55:27 2022 +0300 fs/ntfs3: New function ntfs_bad_inode There are repetitive steps in case of bad inode This commit wraps them in function Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 10 ++++------ fs/ntfs3/frecord.c | 6 ++---- fs/ntfs3/fsntfs.c | 14 ++++++++++++++ fs/ntfs3/inode.c | 6 ++---- fs/ntfs3/namei.c | 4 +--- fs/ntfs3/ntfs_fs.h | 2 ++ 6 files changed, 25 insertions(+), 17 deletions(-) commit 8335ebe195dcc76ece418485a9f08b9a9ad7fe23 Author: Konstantin Komarov Date: Thu Jul 7 19:25:43 2022 +0300 fs/ntfs3: Make MFT zone less fragmented Now we take free space after the MFT zone if the MFT zone shrinks. Signed-off-by: Konstantin Komarov fs/ntfs3/fsntfs.c | 39 +++++++++++++++++++++++++-------------- fs/ntfs3/ntfs_fs.h | 1 + fs/ntfs3/super.c | 7 +++++++ 3 files changed, 33 insertions(+), 14 deletions(-) commit e6d9398c077d8e21a2ca50efab5cbf7ff5aff728 Author: Konstantin Komarov Date: Wed Jul 6 20:17:28 2022 +0300 fs/ntfs3: Check possible errors in run_pack in advance Checking in advance speeds things up in some cases. Signed-off-by: Konstantin Komarov fs/ntfs3/run.c | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) commit 54033c135061b52d4405facba2e49177a5716a31 Author: Konstantin Komarov Date: Wed Jul 6 20:01:11 2022 +0300 fs/ntfs3: Added comments to frecord functions Added some comments in frecord.c for more context. Also changed run_lookup to static because it's an internal function. Signed-off-by: Konstantin Komarov fs/ntfs3/bitmap.c | 3 +-- fs/ntfs3/frecord.c | 8 ++++---- fs/ntfs3/ntfs_fs.h | 1 - fs/ntfs3/run.c | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) commit 42f66a7fdaa0d15691467fb7a808040f2d5ad0c0 Author: Konstantin Komarov Date: Fri Jul 1 15:18:29 2022 +0300 fs/ntfs3: Fill duplicate info in ni_add_name Work with names must be completed in ni_add_name Signed-off-by: Konstantin Komarov fs/ntfs3/frecord.c | 20 ++++++++++++++------ fs/ntfs3/inode.c | 10 ---------- 2 files changed, 14 insertions(+), 16 deletions(-) commit cf760ec0a0b4015ccf3b5e9ecb4caf6b5fb52f0b Author: Konstantin Komarov Date: Fri Jul 1 15:15:32 2022 +0300 fs/ntfs3: Make static function attr_load_runs attr_load_runs is an internal function Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 4 ++-- fs/ntfs3/ntfs_fs.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) commit 071100ea0e6c353258f322cb2f8dde9be62d6808 Author: Konstantin Komarov Date: Thu Jun 30 19:14:43 2022 +0300 fs/ntfs3: Add new argument is_mft to ntfs_mark_rec_free This argument helps in avoiding double locking Signed-off-by: Konstantin Komarov fs/ntfs3/frecord.c | 12 ++++++------ fs/ntfs3/fsntfs.c | 9 ++++++--- fs/ntfs3/inode.c | 2 +- fs/ntfs3/ntfs_fs.h | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-) commit 6700eabb90d50c50be21ecbb71131cd6ecf91ded Author: Konstantin Komarov Date: Thu Jun 30 18:49:24 2022 +0300 fs/ntfs3: Remove unused mi_mark_free Cleaning up dead code Fix wrong comments Signed-off-by: Konstantin Komarov fs/ntfs3/namei.c | 2 +- fs/ntfs3/ntfs_fs.h | 1 - fs/ntfs3/record.c | 22 ---------------------- fs/ntfs3/super.c | 2 +- 4 files changed, 2 insertions(+), 25 deletions(-) commit 560f7736b94622c077344e2c541c43c63b4e90e4 Author: Konstantin Komarov Date: Thu Jun 30 18:31:26 2022 +0300 fs/ntfs3: Fix very fragmented case in attr_punch_hole In some cases we need to ni_find_attr attr_b Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 42f86b1226a42bfc79a7125af435432ad4680a32 Author: Konstantin Komarov Date: Fri May 13 19:54:23 2022 +0300 fs/ntfs3: Fix work with fragmented xattr In some cases xattr is too fragmented, so we need to load it before writing. Signed-off-by: Konstantin Komarov fs/ntfs3/xattr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit b3e048720dee5641c522015d3f0ff0f0dc9cdc37 Author: Konstantin Komarov Date: Fri May 13 19:21:54 2022 +0300 fs/ntfs3: Make ntfs_fallocate return -ENOSPC instead of -EFBIG In some cases we need to return ENOSPC Fixes xfstest generic/213 Fixes: 114346978cf6 ("fs/ntfs3: Check new size for limits") Signed-off-by: Konstantin Komarov fs/ntfs3/file.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit c1e0ab3789215a3dfbe95f226955e93ea4803391 Author: Konstantin Komarov Date: Fri May 13 18:25:04 2022 +0300 fs/ntfs3: extend ni_insert_nonresident to return inserted ATTR_LIST_ENTRY Fixes xfstest generic/300 Fixes: 4534a70b7056 ("fs/ntfs3: Add headers and misc files") Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 35 +++++++++++++++++++++-------------- fs/ntfs3/frecord.c | 4 ++-- fs/ntfs3/index.c | 2 +- fs/ntfs3/ntfs_fs.h | 2 +- 4 files changed, 25 insertions(+), 18 deletions(-) commit 13747aac8984e069427e5de5d68bb6cefa98551e Author: Konstantin Komarov Date: Thu May 12 19:18:11 2022 +0300 fs/ntfs3: Check reserved size for maximum allowed Also don't mask EFBIG Fixes xfstest generic/485 Fixes: 4342306f0f0d ("fs/ntfs3: Add file operations and implementation") Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 9 +++++++++ fs/ntfs3/file.c | 3 --- 2 files changed, 9 insertions(+), 3 deletions(-) commit 460bbf2990b3fdc597601c2cf669a3371c069242 Author: Konstantin Komarov Date: Thu May 12 19:08:40 2022 +0300 fs/ntfs3: Do not change mode if ntfs_set_ea failed ntfs_set_ea can fail with NOSPC, so we don't need to change mode in this situation. Fixes xfstest generic/449 Fixes: be71b5cba2e6 ("fs/ntfs3: Add attrib operations") Signed-off-by: Konstantin Komarov fs/ntfs3/xattr.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 8a8dc2b9596e6088522d30bc79306b834c681943 Author: Peng Fan Date: Wed Aug 3 15:53:26 2022 +0800 mailbox: imx: clear pending interrupts During MU initialization, there maybe pending GSR and RSR pending interrupt, clear them to avoid unexpected kernel dump when requesting mailbox channel Reviewed-by: Jacky Bai Reviewed-by: Ye Li Signed-off-by: Peng Fan Signed-off-by: Jassi Brar drivers/mailbox/imx-mailbox.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit ff2557b7224ea9a19fb79eb4bd16d4deef57816a Author: Ming Lei Date: Wed Aug 3 20:07:57 2022 +0800 io_uring: pass correct parameters to io_req_set_res The two parameters of 'res' and 'cflags' are swapped, so fix it. Without this fix, 'ublk del' hangs forever. Cc: Pavel Begunkov Fixes: de23077eda61f ("io_uring: set completion results upfront") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20220803120757.1668278-1-ming.lei@redhat.com Signed-off-by: Jens Axboe io_uring/uring_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5419aa2a8deea06b796222d3215dac6adc270c78 Author: Masahiro Yamada Date: Sun Jul 31 02:36:35 2022 +0900 modpost: use more reliable way to get fromsec in section_rel(a)() The section name of Rel and Rela starts with ".rel" and ".rela" respectively (but, I do not know whether this is specification or convention). For example, ".rela.text" holds relocation entries applied to the ".text" section. So, the code chops the ".rel" or ".rela" prefix to get the name of the section to which the relocation applies. However, I do not like to skip 4 or 5 bytes blindly because it is potential memory overrun. The ELF specification provides a more reliable way to do this. - The sh_info field holds extra information, whose interpretation depends on the section type - If the section type is SHT_REL or SHT_RELA, the sh_info field holds the section header index of the section to which the relocation applies. Signed-off-by: Masahiro Yamada scripts/mod/modpost.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 125ed24a4ab0d704bab5dee5ccb2c3b05f627c78 Author: Masahiro Yamada Date: Sun Jul 31 02:36:34 2022 +0900 modpost: add array range check to sec_name() The section index is always positive, so the argument, secindex, should be unsigned. Also, inserted the array range check. If sym->st_shndx is a special section index (between SHN_LORESERVE and SHN_HIRESERVE), there is no corresponding section header. For example, if a symbol specifies an absolute value, sym->st_shndx is SHN_ABS (=0xfff1). The current users do not cause the out-of-range access of info->sechddrs[], but it is better to avoid such a pitfall. Signed-off-by: Masahiro Yamada scripts/mod/modpost.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 36b0f0deed4fcbe9ff31268e6c3554714e4d2387 Author: Masahiro Yamada Date: Wed Aug 3 22:50:13 2022 +0900 modpost: refactor get_secindex() SPECIAL() is only used in get_secindex(). Squash it. Make the code more readable with more comments. Signed-off-by: Masahiro Yamada scripts/mod/modpost.h | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit dd29865633a5535889568b5f38f74a445c227e5d Author: Masahiro Yamada Date: Thu Jul 28 12:14:33 2022 +0900 kbuild: set EXIT trap before creating temporary directory Swap the order of 'mkdir' and 'trap' just in case the subshell is interrupted between 'mkdir' and 'trap' although the effect might be subtle. This does not intend to make the cleanup perfect. There are more cases that miss to remove the tmp directory, for example: - When interrupted, dash does not invoke the EXIT trap (bash does) - 'rm' command might be interrupted before removing the directory I am not addressing all the cases since the tmp directory is harmless after all. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers scripts/Kconfig.include | 2 +- scripts/Makefile.compiler | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 40bf722f8064f50200b8c4f8946cd625b441dda9 Author: Zheyu Ma Date: Wed Aug 3 17:24:19 2022 +0800 video: fbdev: i740fb: Check the argument of i740_calc_vclk() Since the user can control the arguments of the ioctl() from the user space, under special arguments that may result in a divide-by-zero bug. If the user provides an improper 'pixclock' value that makes the argumet of i740_calc_vclk() less than 'I740_RFREQ_FIX', it will cause a divide-by-zero bug in: drivers/video/fbdev/i740fb.c:353 p_best = min(15, ilog2(I740_MAX_VCO_FREQ / (freq / I740_RFREQ_FIX))); The following log can reveal it: divide error: 0000 [#1] PREEMPT SMP KASAN PTI RIP: 0010:i740_calc_vclk drivers/video/fbdev/i740fb.c:353 [inline] RIP: 0010:i740fb_decode_var drivers/video/fbdev/i740fb.c:646 [inline] RIP: 0010:i740fb_set_par+0x163f/0x3b70 drivers/video/fbdev/i740fb.c:742 Call Trace: fb_set_var+0x604/0xeb0 drivers/video/fbdev/core/fbmem.c:1034 do_fb_ioctl+0x234/0x670 drivers/video/fbdev/core/fbmem.c:1110 fb_ioctl+0xdd/0x130 drivers/video/fbdev/core/fbmem.c:1189 Fix this by checking the argument of i740_calc_vclk() first. Signed-off-by: Zheyu Ma Signed-off-by: Helge Deller drivers/video/fbdev/i740fb.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 2f1c4523f7a3aaabe7e53d3ebd378292947e95c8 Author: Zheyu Ma Date: Wed Aug 3 17:23:12 2022 +0800 video: fbdev: arkfb: Fix a divide-by-zero bug in ark_set_pixclock() Since the user can control the arguments of the ioctl() from the user space, under special arguments that may result in a divide-by-zero bug in: drivers/video/fbdev/arkfb.c:784: ark_set_pixclock(info, (hdiv * info->var.pixclock) / hmul); with hdiv=1, pixclock=1 and hmul=2 you end up with (1*1)/2 = (int) 0. and then in: drivers/video/fbdev/arkfb.c:504: rv = dac_set_freq(par->dac, 0, 1000000000 / pixclock); we'll get a division-by-zero. The following log can reveal it: divide error: 0000 [#1] PREEMPT SMP KASAN PTI RIP: 0010:ark_set_pixclock drivers/video/fbdev/arkfb.c:504 [inline] RIP: 0010:arkfb_set_par+0x10fc/0x24c0 drivers/video/fbdev/arkfb.c:784 Call Trace: fb_set_var+0x604/0xeb0 drivers/video/fbdev/core/fbmem.c:1034 do_fb_ioctl+0x234/0x670 drivers/video/fbdev/core/fbmem.c:1110 fb_ioctl+0xdd/0x130 drivers/video/fbdev/core/fbmem.c:1189 Fix this by checking the argument of ark_set_pixclock() first. Fixes: 681e14730c73 ("arkfb: new framebuffer driver for ARK Logic cards") Signed-off-by: Zheyu Ma Signed-off-by: Helge Deller drivers/video/fbdev/arkfb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ba6e31af2be96c4d0536f2152ed6f7b6c11bca47 Author: Pawan Gupta Date: Tue Aug 2 15:47:02 2022 -0700 x86/speculation: Add LFENCE to RSB fill sequence RSB fill sequence does not have any protection for miss-prediction of conditional branch at the end of the sequence. CPU can speculatively execute code immediately after the sequence, while RSB filling hasn't completed yet. #define __FILL_RETURN_BUFFER(reg, nr, sp) \ mov $(nr/2), reg; \ 771: \ ANNOTATE_INTRA_FUNCTION_CALL; \ call 772f; \ 773: /* speculation trap */ \ UNWIND_HINT_EMPTY; \ pause; \ lfence; \ jmp 773b; \ 772: \ ANNOTATE_INTRA_FUNCTION_CALL; \ call 774f; \ 775: /* speculation trap */ \ UNWIND_HINT_EMPTY; \ pause; \ lfence; \ jmp 775b; \ 774: \ add $(BITS_PER_LONG/8) * 2, sp; \ dec reg; \ jnz 771b; <----- CPU can miss-predict here. Before RSB is filled, RETs that come in program order after this macro can be executed speculatively, making them vulnerable to RSB-based attacks. Mitigate it by adding an LFENCE after the conditional branch to prevent speculation while RSB is being filled. Suggested-by: Andrew Cooper Signed-off-by: Pawan Gupta Signed-off-by: Borislav Petkov arch/x86/include/asm/nospec-branch.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a8af0d682ae0c9cf62dd0ad6afdb1480951d6a10 Author: Jeff Layton Date: Thu Jun 30 16:21:50 2022 -0400 libceph: clean up ceph_osdc_start_request prototype This function always returns 0, and ignores the nofail boolean. Drop the nofail argument, make the function void return and fix up the callers. Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 6 +++--- fs/ceph/addr.c | 33 +++++++++++++-------------------- fs/ceph/file.c | 32 +++++++++++++------------------- include/linux/ceph/osd_client.h | 5 ++--- net/ceph/osd_client.c | 15 ++++++--------- 5 files changed, 37 insertions(+), 54 deletions(-) commit 7193cda917ffbf5a473cbf3d26ba6787b6b02a84 Author: Masahiro Yamada Date: Wed Jul 27 01:52:04 2022 +0900 modpost: remove unused Elf_Sword macro Commit 9ad21c3f3ecf ("kbuild: try harder to find symbol names in modpost") added Elf_Sword (in a wrong way), but did not use it at all. BTW, the current code looks weird. The fix for the 32-bit part would be: Elf64_Sword --> Elf32_Sword (inconsistet prefix, Elf32_ vs Elf64_) The fix for the 64-bit part would be: Elf64_Sxword --> Elf64_Sword (the size is different between Sword and Sxword) Note: Elf32_Sword == Elf64_Sword == int32_t Elf32_Sxword == Elf64_Sxword == int64_t Anyway, let's drop unused code instead of fixing it. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers scripts/mod/modpost.h | 2 -- 1 file changed, 2 deletions(-) commit 258fafcd0683d9ccfa524129d489948ab3ddc24c Author: Justin Stitt Date: Wed Jul 20 16:23:32 2022 -0700 Makefile.extrawarn: re-enable -Wformat for clang There's been an ongoing mission to re-enable the -Wformat warning for Clang. A previous attempt at enabling the warning showed that there were many instances of this warning throughout the codebase. The sheer amount of these warnings really polluted builds and thus -Wno-format was added to _temporarily_ toggle them off. After many patches the warning has largely been eradicated for x86, x86_64, arm, and arm64 on a variety of configs. The time to enable the warning has never been better as it seems for the first time we are ahead of them and can now solve them as they appear rather than tackling from a backlog. As to the root cause of this large backlog of warnings, Clang seems to pickup on some more nuanced cases of format warnings caused by implicit integer conversion as well as default argument promotions from printf-like functions. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Suggested-by: Nick Desaulniers Signed-off-by: Justin Stitt Signed-off-by: Masahiro Yamada scripts/Makefile.extrawarn | 1 - 1 file changed, 1 deletion(-) commit 625395c4a0f4775e0fe00f616888d2e6c1ba49db Author: Siddh Raman Pant Date: Sun Jul 31 21:39:13 2022 +0530 x86/numa: Use cpumask_available instead of hardcoded NULL check GCC-12 started triggering a new warning: arch/x86/mm/numa.c: In function ‘cpumask_of_node’: arch/x86/mm/numa.c:916:39: warning: the comparison will always evaluate as ‘false’ for the address of ‘node_to_cpumask_map’ will never be NULL [-Waddress] 916 | if (node_to_cpumask_map[node] == NULL) { | ^~ node_to_cpumask_map is of type cpumask_var_t[]. When CONFIG_CPUMASK_OFFSTACK is set, cpumask_var_t is typedef'd to a pointer for dynamic allocation, else to an array of one element. The "wicked game" can be checked on line 700 of include/linux/cpumask.h. The original code in debug_cpumask_set_cpu() and cpumask_of_node() were probably written by the original authors with CONFIG_CPUMASK_OFFSTACK=y (i.e. dynamic allocation) in mind, checking if the cpumask was available via a direct NULL check. When CONFIG_CPUMASK_OFFSTACK is not set, GCC gives the above warning while compiling the kernel. Fix that by using cpumask_available(), which does the NULL check when CONFIG_CPUMASK_OFFSTACK is set, otherwise returns true. Use it wherever such checks are made. Conditional definitions of cpumask_available() can be found along with the definition of cpumask_var_t. Check the cpumask.h reference mentioned above. Fixes: c032ef60d1aa ("cpumask: convert node_to_cpumask_map[] to cpumask_var_t") Fixes: de2d9445f162 ("x86: Unify node_to_cpumask_map handling between 32 and 64bit") Signed-off-by: Siddh Raman Pant Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20220731160913.632092-1-code@siddh.me arch/x86/mm/numa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2b1299322016731d56807aa49254a5ea3080b6b3 Author: Daniel Sneddon Date: Tue Aug 2 15:47:01 2022 -0700 x86/speculation: Add RSB VM Exit protections tl;dr: The Enhanced IBRS mitigation for Spectre v2 does not work as documented for RET instructions after VM exits. Mitigate it with a new one-entry RSB stuffing mechanism and a new LFENCE. == Background == Indirect Branch Restricted Speculation (IBRS) was designed to help mitigate Branch Target Injection and Speculative Store Bypass, i.e. Spectre, attacks. IBRS prevents software run in less privileged modes from affecting branch prediction in more privileged modes. IBRS requires the MSR to be written on every privilege level change. To overcome some of the performance issues of IBRS, Enhanced IBRS was introduced. eIBRS is an "always on" IBRS, in other words, just turn it on once instead of writing the MSR on every privilege level change. When eIBRS is enabled, more privileged modes should be protected from less privileged modes, including protecting VMMs from guests. == Problem == Here's a simplification of how guests are run on Linux' KVM: void run_kvm_guest(void) { // Prepare to run guest VMRESUME(); // Clean up after guest runs } The execution flow for that would look something like this to the processor: 1. Host-side: call run_kvm_guest() 2. Host-side: VMRESUME 3. Guest runs, does "CALL guest_function" 4. VM exit, host runs again 5. Host might make some "cleanup" function calls 6. Host-side: RET from run_kvm_guest() Now, when back on the host, there are a couple of possible scenarios of post-guest activity the host needs to do before executing host code: * on pre-eIBRS hardware (legacy IBRS, or nothing at all), the RSB is not touched and Linux has to do a 32-entry stuffing. * on eIBRS hardware, VM exit with IBRS enabled, or restoring the host IBRS=1 shortly after VM exit, has a documented side effect of flushing the RSB except in this PBRSB situation where the software needs to stuff the last RSB entry "by hand". IOW, with eIBRS supported, host RET instructions should no longer be influenced by guest behavior after the host retires a single CALL instruction. However, if the RET instructions are "unbalanced" with CALLs after a VM exit as is the RET in #6, it might speculatively use the address for the instruction after the CALL in #3 as an RSB prediction. This is a problem since the (untrusted) guest controls this address. Balanced CALL/RET instruction pairs such as in step #5 are not affected. == Solution == The PBRSB issue affects a wide variety of Intel processors which support eIBRS. But not all of them need mitigation. Today, X86_FEATURE_RSB_VMEXIT triggers an RSB filling sequence that mitigates PBRSB. Systems setting RSB_VMEXIT need no further mitigation - i.e., eIBRS systems which enable legacy IBRS explicitly. However, such systems (X86_FEATURE_IBRS_ENHANCED) do not set RSB_VMEXIT and most of them need a new mitigation. Therefore, introduce a new feature flag X86_FEATURE_RSB_VMEXIT_LITE which triggers a lighter-weight PBRSB mitigation versus RSB_VMEXIT. The lighter-weight mitigation performs a CALL instruction which is immediately followed by a speculative execution barrier (INT3). This steers speculative execution to the barrier -- just like a retpoline -- which ensures that speculation can never reach an unbalanced RET. Then, ensure this CALL is retired before continuing execution with an LFENCE. In other words, the window of exposure is opened at VM exit where RET behavior is troublesome. While the window is open, force RSB predictions sampling for RET targets to a dead end at the INT3. Close the window with the LFENCE. There is a subset of eIBRS systems which are not vulnerable to PBRSB. Add these systems to the cpu_vuln_whitelist[] as NO_EIBRS_PBRSB. Future systems that aren't vulnerable will set ARCH_CAP_PBRSB_NO. [ bp: Massage, incorporate review comments from Andy Cooper. ] Signed-off-by: Daniel Sneddon Co-developed-by: Pawan Gupta Signed-off-by: Pawan Gupta Signed-off-by: Borislav Petkov Documentation/admin-guide/hw-vuln/spectre.rst | 8 +++ arch/x86/include/asm/cpufeatures.h | 2 + arch/x86/include/asm/msr-index.h | 4 ++ arch/x86/include/asm/nospec-branch.h | 17 +++++- arch/x86/kernel/cpu/bugs.c | 86 ++++++++++++++++++++------- arch/x86/kernel/cpu/common.c | 12 +++- arch/x86/kvm/vmx/vmenter.S | 8 ++- tools/arch/x86/include/asm/cpufeatures.h | 1 + tools/arch/x86/include/asm/msr-index.h | 4 ++ 9 files changed, 113 insertions(+), 29 deletions(-) commit 87514b2c24f294c32e9e743b095541dcf43928f7 Author: Ben Dooks Date: Thu Jul 21 15:51:55 2022 +0100 sched/rt: Fix Sparse warnings due to undefined rt.c declarations There are several symbols defined in kernel/sched/sched.h but get wrapped in CONFIG_CGROUP_SCHED, even though dummy versions get built in rt.c and therefore trigger Sparse warnings: kernel/sched/rt.c:309:6: warning: symbol 'unregister_rt_sched_group' was not declared. Should it be static? kernel/sched/rt.c:311:6: warning: symbol 'free_rt_sched_group' was not declared. Should it be static? kernel/sched/rt.c:313:5: warning: symbol 'alloc_rt_sched_group' was not declared. Should it be static? Fix this by moving them outside the CONFIG_CGROUP_SCHED block. [ mingo: Refreshed to the latest scheduler tree, tweaked changelog. ] Signed-off-by: Ben Dooks Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20220721145155.358366-1-ben-linux@fluff.org kernel/sched/sched.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 2fb0ec4ae5632ba288ab233849f85069d4c475a5 Author: Hans-Christian Noren Egtvedt Date: Sat Oct 20 12:40:16 2018 +0200 video:backlight: remove reference to AVR32 architecture in ltv350qv The AVR32 architecture does no longer exist in the Linux kernel, hence remove a reference to also non-existing Linux BSP CD from Atmel. Signed-off-by: Hans-Christian Noren Egtvedt drivers/video/backlight/ltv350qv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4492b0c0897055c110777ea6ece6c08c63e8a140 Author: Hans-Christian Noren Egtvedt Date: Sun Nov 5 10:43:11 2017 +0100 video: remove support for non-existing atmel,at32ap-lcdc in atmel_lcdfb The AVR32 architecture has been removed from the kernel in commit 26202873bb51fafdaa51be3e8de7aab9beb49f70, hence clean out the atmel,at32ap-lcdc parts in the atmel_lcdfb.c video driver. AVR32 architecture never supported device tree, hence this code was not used by anybody. Signed-off-by: Hans-Christian Noren Egtvedt Documentation/devicetree/bindings/display/atmel,lcdc.txt | 1 - 1 file changed, 1 deletion(-) commit 93dd2f713ad23f0e8ba0fedf94fabc215bbb8418 Author: Hans-Christian Noren Egtvedt Date: Sat Oct 20 12:39:09 2018 +0200 usb:udc: remove reference to AVR32 architecture in Atmel USBA Kconfig The AVR32 architecture does no longer exist in the Linux kernel, hence remove a reference to it in Kconfig help text to avoid confusion. Signed-off-by: Hans-Christian Noren Egtvedt drivers/usb/gadget/udc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a2fd172b4ba5628eefa88fbfb8599c76f6ac021 Author: Hans-Christian Noren Egtvedt Date: Sat Oct 20 12:48:57 2018 +0200 sound:spi: remove reference to AVR32 in Atmel AT73C213 DAC driver The AVR32 architecture does no longer exist in the Linux kernel, hence remove a reference to it in Kconfig help text to avoid confusion. Signed-off-by: Hans-Christian Noren Egtvedt sound/spi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bfdfbb258913047b5d5384ec2a6b049af1bf437 Author: Hans-Christian Noren Egtvedt Date: Sun Nov 5 11:19:53 2017 +0100 net: remove cdns,at32ap7000-macb device tree entry The AVR32 architecture has been removed from the kernel in commit 26202873bb51fafdaa51be3e8de7aab9beb49f70, hence clean out the cdns,at32ap7000-macb compatible entry in Cadence macb Ethernet driver. AVR32 architecture never supported device tree, hence this code was not used by anybody. Updated documentation to match the default entry, no users of cdns,at32ap7000-macb in the kernel tree. Signed-off-by: Hans-Christian Noren Egtvedt Documentation/devicetree/bindings/net/cdns,macb.yaml | 3 +-- drivers/net/ethernet/cadence/macb_main.c | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit 62bf2fa70b683e287bf8005345ba7861c7be63dc Author: Hans-Christian Noren Egtvedt Date: Sat Oct 20 12:33:59 2018 +0200 misc: update maintainer email address and description for atmel-ssc I have changed my overall maintainer email address to the samfundet.no domain, hence update the atmel-ssc module to reflect that. Also remove the AVR32 reference, since the AVR32 architecture no longer exist in the Linux kernel. Signed-off-by: Hans-Christian Noren Egtvedt drivers/misc/atmel-ssc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 53291cb23c919c5407a5054a5cfdcba79690720b Author: Hans-Christian Noren Egtvedt Date: Sat Oct 20 12:30:17 2018 +0200 mfd: remove reference to AVR32 architecture in atmel-smc.c The AVR32 architecture does no longer exist in the Linux kernel, hence remove a reference to it in comments to avoid confusion. Signed-off-by: Hans-Christian Noren Egtvedt drivers/mfd/atmel-smc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 300a596590e4a201cdbbb42af5701d448cceab3a Author: Hans-Christian Noren Egtvedt Date: Sat Oct 20 12:30:17 2018 +0200 dma:dw: remove reference to AVR32 architecture in core.c The AVR32 architecture does no longer exist in the Linux kernel, hence remove a reference to it in comments to avoid confusion. Signed-off-by: Hans-Christian Noren Egtvedt drivers/dma/dw/core.c | 3 --- 1 file changed, 3 deletions(-) commit dcca34754a3f5290406403b8066e3b15dda9f4bf Author: Ingo Molnar Date: Wed Aug 3 10:43:42 2022 +0200 exit: Fix typo in comment: s/sub-theads/sub-threads Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/exit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6e8d40d43ae4dec00c8fea2593eeea3114b8f44 Author: Waiman Long Date: Tue Aug 2 21:54:51 2022 -0400 sched, cpuset: Fix dl_cpu_busy() panic due to empty cs->cpus_allowed With cgroup v2, the cpuset's cpus_allowed mask can be empty indicating that the cpuset will just use the effective CPUs of its parent. So cpuset_can_attach() can call task_can_attach() with an empty mask. This can lead to cpumask_any_and() returns nr_cpu_ids causing the call to dl_bw_of() to crash due to percpu value access of an out of bound CPU value. For example: [80468.182258] BUG: unable to handle page fault for address: ffffffff8b6648b0 : [80468.191019] RIP: 0010:dl_cpu_busy+0x30/0x2b0 : [80468.207946] Call Trace: [80468.208947] cpuset_can_attach+0xa0/0x140 [80468.209953] cgroup_migrate_execute+0x8c/0x490 [80468.210931] cgroup_update_dfl_csses+0x254/0x270 [80468.211898] cgroup_subtree_control_write+0x322/0x400 [80468.212854] kernfs_fop_write_iter+0x11c/0x1b0 [80468.213777] new_sync_write+0x11f/0x1b0 [80468.214689] vfs_write+0x1eb/0x280 [80468.215592] ksys_write+0x5f/0xe0 [80468.216463] do_syscall_64+0x5c/0x80 [80468.224287] entry_SYSCALL_64_after_hwframe+0x44/0xae Fix that by using effective_cpus instead. For cgroup v1, effective_cpus is the same as cpus_allowed. For v2, effective_cpus is the real cpumask to be used by tasks within the cpuset anyway. Also update task_can_attach()'s 2nd argument name to cs_effective_cpus to reflect the change. In addition, a check is added to task_can_attach() to guard against the possibility that cpumask_any_and() may return a value >= nr_cpu_ids. Fixes: 7f51412a415d ("sched/deadline: Fix bandwidth check/update when migrating tasks between exclusive cpusets") Signed-off-by: Waiman Long Signed-off-by: Ingo Molnar Acked-by: Juri Lelli Link: https://lore.kernel.org/r/20220803015451.2219567-1-longman@redhat.com include/linux/sched.h | 2 +- kernel/cgroup/cpuset.c | 2 +- kernel/sched/core.c | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) commit fe201f6fa4cf96749b0a6b6a61b33b6a82de4e49 Author: Lee Jones Date: Mon Aug 1 16:53:51 2022 +0100 MAINTAINERS: Use Lee Jones' kernel.org address for Backlight submissions Going forward, I'll be using my kernel.org for upstream work. Signed-off-by: Lee Jones Acked-by: Daniel Thompson Signed-off-by: Lee Jones MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c6327c77d509e78bff76f2a4551fcfee851682e Merge: 6f63d04473f2 8eaa1d110800 Author: Paolo Abeni Date: Wed Aug 3 08:50:42 2022 +0200 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Conflicts: net/ax25/af_ax25.c d7c4c9e075f8c ("ax25: fix incorrect dev_tracker usage") d62607c3fe459 ("net: rename reference+tracking helpers") drivers/net/netdevsim/fib.c 180a6a3ee60a ("netdevsim: fib: Fix reference count leak on route deletion failure") 012ec02ae441 ("netdevsim: convert driver to use unlocked devlink API during init/fini") Signed-off-by: Paolo Abeni commit 4cfa6ff24a9744ba484521c38bea613134fbfcb3 Author: Michael Ellerman Date: Wed Aug 3 16:29:41 2022 +1000 powerpc/64e: Fix kexec build error When building ppc64_book3e_allmodconfig the build fails with: arch/powerpc/kexec/file_load_64.c:1063:14: error: implicit declaration of function ‘firmware_has_feature’ 1063 | if (!firmware_has_feature(FW_FEATURE_LPAR)) | ^~~~~~~~~~~~~~~~~~~~ Add a direct include of asm/firmware.h to fix the error. Fixes: b1fc44eaa9ba ("pseries/iommu/ddw: Fix kdump to work in absence of ibm,dma-window") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220803063152.1249270-1-mpe@ellerman.id.au arch/powerpc/kexec/file_load_64.c | 1 + 1 file changed, 1 insertion(+) commit 0fec518018cc5ceffa706370b6e3acbbb1e3c798 Author: Douglas Anderson Date: Tue Aug 2 13:23:09 2022 -0700 tty: serial: qcom-geni-serial: Fix %lu -> %u in print statements When we multiply an unsigned int by a u32 we still end up with an unsigned int. That means we should specify "%u" not "%lu" in the format code. NOTE: this fix was chosen instead of somehow promoting the value to "unsigned long" since the max baud rate from the earlier call to uart_get_baud_rate() is 4000000 and the max sampling rate is 32. 4000000 * 32 = 0x07a12000, not even close to overflowing 32-bits. Fixes: c474c775716e ("tty: serial: qcom-geni-serial: Fix get_clk_div_rate() which otherwise could return a sub-optimal clock rate.") Reported-by: Mark Brown Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20220802132250.1.Iea061e14157a17e114dbe2eca764568a02d6b889@changeid Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/qcom_geni_serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6aa811acdb76facca0b705f4e4c1d948ccb6af8b Author: Antony Antony Date: Wed Jul 27 17:41:22 2022 +0200 xfrm: clone missing x->lastused in xfrm_do_migrate x->lastused was not cloned in xfrm_do_migrate. Add it to clone during migrate. Fixes: 80c9abaabf42 ("[XFRM]: Extension for dynamic update of endpoint address(es)") Signed-off-by: Antony Antony Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 1 + 1 file changed, 1 insertion(+) commit 36d763509be326bb383b1b1852a129ff58d74e3b Author: Antony Antony Date: Wed Jul 27 17:40:53 2022 +0200 xfrm: fix XFRMA_LASTUSED comment It is a __u64, internally time64_t. Fixes: bf825f81b454 ("xfrm: introduce basic mark infrastructure") Signed-off-by: Antony Antony Signed-off-by: Steffen Klassert include/uapi/linux/xfrm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 717ada9f10f2de8c4f4d72ad045f3b67a7ced715 Author: Antony Antony Date: Wed Jul 27 17:38:35 2022 +0200 Revert "xfrm: update SA curlft.use_time" This reverts commit af734a26a1a95a9fda51f2abb0c22a7efcafd5ca. The abvoce commit is a regression according RFC 2367. A better fix would be use x->lastused. Which will be propsed later. according to RFC 2367 use_time == sadb_lifetime_usetime. "sadb_lifetime_usetime For CURRENT, the time, in seconds, when association was first used. For HARD and SOFT, the number of seconds after the first use of the association until it expires." Fixes: af734a26a1a9 ("xfrm: update SA curlft.use_time") Signed-off-by: Antony Antony Signed-off-by: Steffen Klassert net/xfrm/xfrm_input.c | 1 - net/xfrm/xfrm_output.c | 1 - 2 files changed, 2 deletions(-) commit 6f63d04473f2bc973e24ff828a28a2bd5e41bb38 Author: Christophe JAILLET Date: Sun Jul 31 07:59:00 2022 +0200 doc: sfp-phylink: Fix a broken reference The commit in Fixes: has changed a .txt file into a .yaml file. Update the documentation accordingly. While at it add some `` around some file names to improve the output. Fixes: 70991f1e6858 ("dt-bindings: net: convert sff,sfp to dtschema") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/be3c7e87ca7f027703247eccfe000b8e34805094.1659247114.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski Documentation/networking/sfp-phylink.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5493ee1919eae4f49d62276cf5986b7f7c7aa8f6 Merge: 2bc7ea71a737 64f991590ff4 Author: Dave Airlie Date: Wed Aug 3 14:00:18 2022 +1000 Merge tag 'amd-drm-next-5.20-2022-07-29' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-5.20-2022-07-29: amdgpu: - Misc spelling and grammar fixes - DC whitespace cleanups - ACP smatch fix - GFX 11.0 updates - PSP 13.0 updates - VCN 4.0 updates - DC FP fix for PPC64 - Misc bug fixes amdkfd: - SVM fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20220729202742.6636-1-alexander.deucher@amd.com commit d95efb14c0b81b684deb32ba10cdb78b4178ae5b Author: Jeremy Bongio Date: Thu Jul 21 15:44:22 2022 -0700 ext4: add ioctls to get/set the ext4 superblock uuid This fixes a race between changing the ext4 superblock uuid and operations like mounting, resizing, changing features, etc. Reviewed-by: Theodore Ts'o Signed-off-by: Jeremy Bongio Link: https://lore.kernel.org/r/20220721224422.438351-1-bongiojp@gmail.com Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 11 ++++++++ fs/ext4/ioctl.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) commit 69cb8e9d8cd97cdf5e293b26d70a9dee3e35e6bd Author: Kiselev, Oleg Date: Wed Jul 20 04:27:48 2022 +0000 ext4: avoid resizing to a partial cluster size This patch avoids an attempt to resize the filesystem to an unaligned cluster boundary. An online resize to a size that is not integral to cluster size results in the last iteration attempting to grow the fs by a negative amount, which trips a BUG_ON and leaves the fs with a corrupted in-memory superblock. Signed-off-by: Oleg Kiselev Link: https://lore.kernel.org/r/0E92A0AB-4F16-4F1A-94B7-702CC6504FDE@amazon.com Signed-off-by: Theodore Ts'o fs/ext4/resize.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 026d0d27c4882303e4b071ca6d996640cc2932c3 Author: Kiselev, Oleg Date: Wed Jul 20 04:26:22 2022 +0000 ext4: reduce computation of overhead during resize This patch avoids doing an O(n**2)-complexity walk through every flex group. Instead, it uses the already computed overhead information for the newly allocated space, and simply adds it to the previously calculated overhead stored in the superblock. This drastically reduces the time taken to resize very large bigalloc filesystems (from 3+ hours for a 64TB fs down to milliseconds). Signed-off-by: Oleg Kiselev Link: https://lore.kernel.org/r/CE4F359F-4779-45E6-B6A9-8D67FDFF5AE2@amazon.com Signed-off-by: Theodore Ts'o fs/ext4/resize.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit 4a734f0869f970b8a9b65062ea40b09a5da9dba8 Author: Zhihao Cheng Date: Fri Jul 15 20:51:52 2022 +0800 jbd2: fix assertion 'jh->b_frozen_data == NULL' failure when journal aborted Following process will fail assertion 'jh->b_frozen_data == NULL' in jbd2_journal_dirty_metadata(): jbd2_journal_commit_transaction unlink(dir/a) jh->b_transaction = trans1 jh->b_jlist = BJ_Metadata journal->j_running_transaction = NULL trans1->t_state = T_COMMIT unlink(dir/b) handle->h_trans = trans2 do_get_write_access jh->b_modified = 0 jh->b_frozen_data = frozen_buffer jh->b_next_transaction = trans2 jbd2_journal_dirty_metadata is_handle_aborted is_journal_aborted // return false --> jbd2 abort <-- while (commit_transaction->t_buffers) if (is_journal_aborted) jbd2_journal_refile_buffer __jbd2_journal_refile_buffer WRITE_ONCE(jh->b_transaction, jh->b_next_transaction) WRITE_ONCE(jh->b_next_transaction, NULL) __jbd2_journal_file_buffer(jh, BJ_Reserved) J_ASSERT_JH(jh, jh->b_frozen_data == NULL) // assertion failure ! The reproducer (See detail in [Link]) reports: ------------[ cut here ]------------ kernel BUG at fs/jbd2/transaction.c:1629! invalid opcode: 0000 [#1] PREEMPT SMP CPU: 2 PID: 584 Comm: unlink Tainted: G W 5.19.0-rc6-00115-g4a57a8400075-dirty #697 RIP: 0010:jbd2_journal_dirty_metadata+0x3c5/0x470 RSP: 0018:ffffc90000be7ce0 EFLAGS: 00010202 Call Trace: __ext4_handle_dirty_metadata+0xa0/0x290 ext4_handle_dirty_dirblock+0x10c/0x1d0 ext4_delete_entry+0x104/0x200 __ext4_unlink+0x22b/0x360 ext4_unlink+0x275/0x390 vfs_unlink+0x20b/0x4c0 do_unlinkat+0x42f/0x4c0 __x64_sys_unlink+0x37/0x50 do_syscall_64+0x35/0x80 After journal aborting, __jbd2_journal_refile_buffer() is executed with holding @jh->b_state_lock, we can fix it by moving 'is_handle_aborted()' into the area protected by @jh->b_state_lock. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216251 Fixes: 470decc613ab20 ("[PATCH] jbd2: initial copy of files from jbd") Signed-off-by: Zhihao Cheng Link: https://lore.kernel.org/r/20220715125152.4022726-1-chengzhihao1@huawei.com Signed-off-by: Theodore Ts'o fs/jbd2/transaction.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 1e1c2b86ef86a8477fd9b9a4f48a6bfe235606f6 Author: Lukas Czerner Date: Thu Jul 14 18:59:03 2022 +0200 ext4: block range must be validated before use in ext4_mb_clear_bb() Block range to free is validated in ext4_free_blocks() using ext4_inode_block_valid() and then it's passed to ext4_mb_clear_bb(). However in some situations on bigalloc file system the range might be adjusted after the validation in ext4_free_blocks() which can lead to troubles on corrupted file systems such as one found by syzkaller that resulted in the following BUG kernel BUG at fs/ext4/ext4.h:3319! PREEMPT SMP NOPTI CPU: 28 PID: 4243 Comm: repro Kdump: loaded Not tainted 5.19.0-rc6+ #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1.fc35 04/01/2014 RIP: 0010:ext4_free_blocks+0x95e/0xa90 Call Trace: ? lock_timer_base+0x61/0x80 ? __es_remove_extent+0x5a/0x760 ? __mod_timer+0x256/0x380 ? ext4_ind_truncate_ensure_credits+0x90/0x220 ext4_clear_blocks+0x107/0x1b0 ext4_free_data+0x15b/0x170 ext4_ind_truncate+0x214/0x2c0 ? _raw_spin_unlock+0x15/0x30 ? ext4_discard_preallocations+0x15a/0x410 ? ext4_journal_check_start+0xe/0x90 ? __ext4_journal_start_sb+0x2f/0x110 ext4_truncate+0x1b5/0x460 ? __ext4_journal_start_sb+0x2f/0x110 ext4_evict_inode+0x2b4/0x6f0 evict+0xd0/0x1d0 ext4_enable_quotas+0x11f/0x1f0 ext4_orphan_cleanup+0x3de/0x430 ? proc_create_seq_private+0x43/0x50 ext4_fill_super+0x295f/0x3ae0 ? snprintf+0x39/0x40 ? sget_fc+0x19c/0x330 ? ext4_reconfigure+0x850/0x850 get_tree_bdev+0x16d/0x260 vfs_get_tree+0x25/0xb0 path_mount+0x431/0xa70 __x64_sys_mount+0xe2/0x120 do_syscall_64+0x5b/0x80 ? do_user_addr_fault+0x1e2/0x670 ? exc_page_fault+0x70/0x170 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7fdf4e512ace Fix it by making sure that the block range is properly validated before used every time it changes in ext4_free_blocks() or ext4_mb_clear_bb(). Link: https://syzkaller.appspot.com/bug?id=5266d464285a03cee9dbfda7d2452a72c3c2ae7c Reported-by: syzbot+15cd994e273307bf5cfa@syzkaller.appspotmail.com Signed-off-by: Lukas Czerner Cc: Tadeusz Struk Tested-by: Tadeusz Struk Link: https://lore.kernel.org/r/20220714165903.58260-1-lczerner@redhat.com Signed-off-by: Theodore Ts'o fs/ext4/mballoc.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 307af6c879377c1c63e71cbdd978201f9c7ee8df Author: Jan Kara Date: Tue Jul 12 12:54:29 2022 +0200 mbcache: automatically delete entries from cache on freeing Use the fact that entries with elevated refcount are not removed from the hash and just move removal of the entry from the hash to the entry freeing time. When doing this we also change the generic code to hold one reference to the cache entry, not two of them, which makes code somewhat more obvious. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20220712105436.32204-10-jack@suse.cz Signed-off-by: Theodore Ts'o fs/mbcache.c | 108 +++++++++++++++++------------------------------- include/linux/mbcache.h | 24 +++++++---- 2 files changed, 55 insertions(+), 77 deletions(-) commit 75896339e43176af078509c1fce94ee6df9ca1a7 Author: Jan Kara Date: Tue Jul 12 12:54:28 2022 +0200 mbcache: Remove mb_cache_entry_delete() Nobody uses mb_cache_entry_delete() anymore. Remove it. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20220712105436.32204-9-jack@suse.cz Signed-off-by: Theodore Ts'o fs/mbcache.c | 37 ------------------------------------- include/linux/mbcache.h | 1 - 2 files changed, 38 deletions(-) commit 1189d8ec5105f7628fb0e3a6988cbf0d0cbfedeb Author: Jan Kara Date: Tue Jul 12 12:54:27 2022 +0200 ext2: avoid deleting xattr block that is being reused Currently when we decide to reuse xattr block we detect the case when the last reference to xattr block is being dropped at the same time and cancel the reuse attempt. Convert ext2 to a new scheme when as soon as matching mbcache entry is found, we wait with dropping the last xattr block reference until mbcache entry reference is dropped (meaning either the xattr block reference is increased or we decided not to reuse the block). Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20220712105436.32204-8-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext2/xattr.c | 58 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) commit b67798d55185ba4471f70b67b3f7c2866f216499 Author: Jan Kara Date: Tue Jul 12 12:54:26 2022 +0200 ext2: unindent codeblock in ext2_xattr_set() Replace one else in ext2_xattr_set() with a goto. This makes following code changes simpler to follow. No functional changes. Signed-off-by: Jan Kara Reviewed-by: Ritesh Harjani (IBM) Link: https://lore.kernel.org/r/20220712105436.32204-7-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext2/xattr.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 90ae40d243d46f2268a5334fc8faa2dd67f875f5 Author: Jan Kara Date: Tue Jul 12 12:54:25 2022 +0200 ext2: factor our freeing of xattr block reference Free of xattr block reference is opencode in two places. Factor it out into a separate function and use it. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20220712105436.32204-6-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext2/xattr.c | 90 ++++++++++++++++++++++++--------------------------------- 1 file changed, 38 insertions(+), 52 deletions(-) commit 65f8b80053a1b2fd602daa6814e62d6fa90e5e9b Author: Jan Kara Date: Tue Jul 12 12:54:24 2022 +0200 ext4: fix race when reusing xattr blocks When ext4_xattr_block_set() decides to remove xattr block the following race can happen: CPU1 CPU2 ext4_xattr_block_set() ext4_xattr_release_block() new_bh = ext4_xattr_block_cache_find() lock_buffer(bh); ref = le32_to_cpu(BHDR(bh)->h_refcount); if (ref == 1) { ... mb_cache_entry_delete(); unlock_buffer(bh); ext4_free_blocks(); ... ext4_forget(..., bh, ...); jbd2_journal_revoke(..., bh); ext4_journal_get_write_access(..., new_bh, ...) do_get_write_access() jbd2_journal_cancel_revoke(..., new_bh); Later the code in ext4_xattr_block_set() finds out the block got freed and cancels reusal of the block but the revoke stays canceled and so in case of block reuse and journal replay the filesystem can get corrupted. If the race works out slightly differently, we can also hit assertions in the jbd2 code. Fix the problem by making sure that once matching mbcache entry is found, code dropping the last xattr block reference (or trying to modify xattr block in place) waits until the mbcache entry reference is dropped. This way code trying to reuse xattr block is protected from someone trying to drop the last reference to xattr block. Reported-and-tested-by: Ritesh Harjani CC: stable@vger.kernel.org Fixes: 82939d7999df ("ext4: convert to mbcache2") Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20220712105436.32204-5-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 67 ++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 22 deletions(-) commit fd48e9acdf26d0cbd80051de07d4a735d05d29b2 Author: Jan Kara Date: Tue Jul 12 12:54:23 2022 +0200 ext4: unindent codeblock in ext4_xattr_block_set() Remove unnecessary else (and thus indentation level) from a code block in ext4_xattr_block_set(). It will also make following code changes easier. No functional changes. CC: stable@vger.kernel.org Fixes: 82939d7999df ("ext4: convert to mbcache2") Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20220712105436.32204-4-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 77 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 38 insertions(+), 39 deletions(-) commit 6bc0d63dad7f9f54d381925ee855b402f652fa39 Author: Jan Kara Date: Tue Jul 12 12:54:22 2022 +0200 ext4: remove EA inode entry from mbcache on inode eviction Currently we remove EA inode from mbcache as soon as its xattr refcount drops to zero. However there can be pending attempts to reuse the inode and thus refcount handling code has to handle the situation when refcount increases from zero anyway. So save some work and just keep EA inode in mbcache until it is getting evicted. At that moment we are sure following iget() of EA inode will fail anyway (or wait for eviction to finish and load things from the disk again) and so removing mbcache entry at that moment is fine and simplifies the code a bit. CC: stable@vger.kernel.org Fixes: 82939d7999df ("ext4: convert to mbcache2") Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20220712105436.32204-3-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 2 ++ fs/ext4/xattr.c | 24 ++++++++---------------- fs/ext4/xattr.h | 1 + 3 files changed, 11 insertions(+), 16 deletions(-) commit 3dc96bba65f53daa217f0a8f43edad145286a8f5 Author: Jan Kara Date: Tue Jul 12 12:54:21 2022 +0200 mbcache: add functions to delete entry if unused Add function mb_cache_entry_delete_or_get() to delete mbcache entry if it is unused and also add a function to wait for entry to become unused - mb_cache_entry_wait_unused(). We do not share code between the two deleting function as one of them will go away soon. CC: stable@vger.kernel.org Fixes: 82939d7999df ("ext4: convert to mbcache2") Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20220712105436.32204-2-jack@suse.cz Signed-off-by: Theodore Ts'o fs/mbcache.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++-- include/linux/mbcache.h | 10 +++++++- 2 files changed, 73 insertions(+), 3 deletions(-) commit 58318914186c157477b978b1739dfe2f1b9dc0fe Author: Jan Kara Date: Tue Jul 12 12:54:20 2022 +0200 mbcache: don't reclaim used entries Do not reclaim entries that are currently used by somebody from a shrinker. Firstly, these entries are likely useful. Secondly, we will need to keep such entries to protect pending increment of xattr block refcount. CC: stable@vger.kernel.org Fixes: 82939d7999df ("ext4: convert to mbcache2") Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20220712105436.32204-1-jack@suse.cz Signed-off-by: Theodore Ts'o fs/mbcache.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit b8a04fe77ef1360fbf73c80fddbdfeaa9407ed1b Author: Lukas Czerner Date: Mon Jul 4 16:27:21 2022 +0200 ext4: make sure ext4_append() always allocates new block ext4_append() must always allocate a new block, otherwise we run the risk of overwriting existing directory block corrupting the directory tree in the process resulting in all manner of problems later on. Add a sanity check to see if the logical block is already allocated and error out if it is. Cc: stable@kernel.org Signed-off-by: Lukas Czerner Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20220704142721.157985-2-lczerner@redhat.com Signed-off-by: Theodore Ts'o fs/ext4/namei.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 65f8ea4cd57dbd46ea13b41dc8bac03176b04233 Author: Lukas Czerner Date: Mon Jul 4 16:27:20 2022 +0200 ext4: check if directory block is within i_size Currently ext4 directory handling code implicitly assumes that the directory blocks are always within the i_size. In fact ext4_append() will attempt to allocate next directory block based solely on i_size and the i_size is then appropriately increased after a successful allocation. However, for this to work it requires i_size to be correct. If, for any reason, the directory inode i_size is corrupted in a way that the directory tree refers to a valid directory block past i_size, we could end up corrupting parts of the directory tree structure by overwriting already used directory blocks when modifying the directory. Fix it by catching the corruption early in __ext4_read_dirblock(). Addresses Red-Hat-Bugzilla: #2070205 CVE: CVE-2022-1184 Signed-off-by: Lukas Czerner Cc: stable@vger.kernel.org Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20220704142721.157985-1-lczerner@redhat.com Signed-off-by: Theodore Ts'o fs/ext4/namei.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3fa5d23e68a34dae9df2be168750dc5e03e0e40d Author: Ojaswin Mujoo Date: Mon Jul 4 11:16:03 2022 +0530 ext4: reflect mb_optimize_scan value in options file Add support to display the mb_optimize_scan value in /proc/fs/ext4//options file. The option is only displayed when the value is non default. Signed-off-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20220704054603.21462-1-ojaswin@linux.ibm.com Signed-off-by: Theodore Ts'o fs/ext4/super.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit b24e77ef1c6d4dbf42749ad4903c97539cc9755a Author: Ye Bin Date: Wed Jun 22 17:02:23 2022 +0800 ext4: avoid remove directory when directory is corrupted Now if check directoy entry is corrupted, ext4_empty_dir may return true then directory will be removed when file system mounted with "errors=continue". In order not to make things worse just return false when directory is corrupted. Signed-off-by: Ye Bin Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20220622090223.682234-1-yebin10@huawei.com Signed-off-by: Theodore Ts'o fs/ext4/namei.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit c64a92992e6c1799f743999e1f1538fea0156aa4 Author: Jiang Jian Date: Tue Jun 21 14:15:31 2022 +0800 ext4: aligned '*' in comments The '*' in the comment is not aligned. Signed-off-by: Jiang Jian Link: https://lore.kernel.org/r/20220621061531.19669-1-jiangjian@cdjrlc.com Signed-off-by: Theodore Ts'o fs/ext4/xattr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 442ec1e5bb7c46c72c41898e13a5744c84cadf51 Author: Bagas Sanjaya Date: Sun Jun 19 14:29:39 2022 +0700 Documentation: ext4: fix cell spacing of table heading on blockmap table Commit 3103084afcf234 ("ext4, doc: remove unnecessary escaping") removes redundant underscore escaping, however the cell spacing in heading row of blockmap table became not aligned anymore, hence triggers malformed table warning: Documentation/filesystems/ext4/blockmap.rst:3: WARNING: Malformed table. +---------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | i.i_block Offset | Where It Points | ... The warning caused the table not being loaded. Realign the heading row cell by adding missing space at the first cell to fix the warning. Fixes: 3103084afcf234 ("ext4, doc: remove unnecessary escaping") Cc: stable@kernel.org Cc: Andreas Dilger Cc: Jonathan Corbet Cc: Wang Jianjian Cc: linux-ext4@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20220619072938.7334-1-bagasdotme@gmail.com Signed-off-by: Theodore Ts'o Documentation/filesystems/ext4/blockmap.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07ea7a617d6b278fb7acedb5cbe1a81ce2de7d0c Author: Li Lingfeng Date: Fri Jun 17 14:25:15 2022 +0800 ext4: recover csum seed of tmp_inode after migrating to extents When migrating to extents, the checksum seed of temporary inode need to be replaced by inode's, otherwise the inode checksums will be incorrect when swapping the inodes data. However, the temporary inode can not match it's checksum to itself since it has lost it's own checksum seed. mkfs.ext4 -F /dev/sdc mount /dev/sdc /mnt/sdc xfs_io -fc "pwrite 4k 4k" -c "fsync" /mnt/sdc/testfile chattr -e /mnt/sdc/testfile chattr +e /mnt/sdc/testfile umount /dev/sdc fsck -fn /dev/sdc ======== ... Pass 1: Checking inodes, blocks, and sizes Inode 13 passes checks, but checksum does not match inode. Fix? no ... ======== The fix is simple, save the checksum seed of temporary inode, and recover it after migrating to extents. Fixes: e81c9302a6c3 ("ext4: set csum seed in tmp inode while migrating to extents") Signed-off-by: Li Lingfeng Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20220617062515.2113438-1-lilingfeng3@huawei.com Signed-off-by: Theodore Ts'o fs/ext4/migrate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 51ae846cff568c8c29921b1b28eb2dfbcd4ac12d Author: Ye Bin Date: Fri Jun 17 09:39:35 2022 +0800 ext4: fix warning in ext4_iomap_begin as race between bmap and write We got issue as follows: ------------[ cut here ]------------ WARNING: CPU: 3 PID: 9310 at fs/ext4/inode.c:3441 ext4_iomap_begin+0x182/0x5d0 RIP: 0010:ext4_iomap_begin+0x182/0x5d0 RSP: 0018:ffff88812460fa08 EFLAGS: 00010293 RAX: ffff88811f168000 RBX: 0000000000000000 RCX: ffffffff97793c12 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: ffff88812c669160 R08: ffff88811f168000 R09: ffffed10258cd20f R10: ffff88812c669077 R11: ffffed10258cd20e R12: 0000000000000001 R13: 00000000000000a4 R14: 000000000000000c R15: ffff88812c6691ee FS: 00007fd0d6ff3740(0000) GS:ffff8883af180000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fd0d6dda290 CR3: 0000000104a62000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: iomap_apply+0x119/0x570 iomap_bmap+0x124/0x150 ext4_bmap+0x14f/0x250 bmap+0x55/0x80 do_vfs_ioctl+0x952/0xbd0 __x64_sys_ioctl+0xc6/0x170 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Above issue may happen as follows: bmap write bmap ext4_bmap iomap_bmap ext4_iomap_begin ext4_file_write_iter ext4_buffered_write_iter generic_perform_write ext4_da_write_begin ext4_da_write_inline_data_begin ext4_prepare_inline_data ext4_create_inline_data ext4_set_inode_flag(inode, EXT4_INODE_INLINE_DATA); if (WARN_ON_ONCE(ext4_has_inline_data(inode))) ->trigger bug_on To solved above issue hold inode lock in ext4_bamp. Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20220617013935.397596-1-yebin10@huawei.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/inode.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit fd7e672ea98b95b9d4c9dae316639f03c16a749d Author: Baokun Li Date: Thu Jun 16 10:13:58 2022 +0800 ext4: correct the misjudgment in ext4_iget_extra_inode Use the EXT4_INODE_HAS_XATTR_SPACE macro to more accurately determine whether the inode have xattr space. Cc: stable@kernel.org Signed-off-by: Baokun Li Reviewed-by: Ritesh Harjani (IBM) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20220616021358.2504451-5-libaokun1@huawei.com Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c9fd167d57133c5b748d16913c4eabc55e531c73 Author: Baokun Li Date: Thu Jun 16 10:13:57 2022 +0800 ext4: correct max_inline_xattr_value_size computing If the ext4 inode does not have xattr space, 0 is returned in the get_max_inline_xattr_value_size function. Otherwise, the function returns a negative value when the inode does not contain EXT4_STATE_XATTR. Cc: stable@kernel.org Signed-off-by: Baokun Li Reviewed-by: Ritesh Harjani (IBM) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20220616021358.2504451-4-libaokun1@huawei.com Signed-off-by: Theodore Ts'o fs/ext4/inline.c | 3 +++ 1 file changed, 3 insertions(+) commit 67d7d8ad99beccd9fe92d585b87f1760dc9018e3 Author: Baokun Li Date: Thu Jun 16 10:13:56 2022 +0800 ext4: fix use-after-free in ext4_xattr_set_entry Hulk Robot reported a issue: ================================================================== BUG: KASAN: use-after-free in ext4_xattr_set_entry+0x18ab/0x3500 Write of size 4105 at addr ffff8881675ef5f4 by task syz-executor.0/7092 CPU: 1 PID: 7092 Comm: syz-executor.0 Not tainted 4.19.90-dirty #17 Call Trace: [...] memcpy+0x34/0x50 mm/kasan/kasan.c:303 ext4_xattr_set_entry+0x18ab/0x3500 fs/ext4/xattr.c:1747 ext4_xattr_ibody_inline_set+0x86/0x2a0 fs/ext4/xattr.c:2205 ext4_xattr_set_handle+0x940/0x1300 fs/ext4/xattr.c:2386 ext4_xattr_set+0x1da/0x300 fs/ext4/xattr.c:2498 __vfs_setxattr+0x112/0x170 fs/xattr.c:149 __vfs_setxattr_noperm+0x11b/0x2a0 fs/xattr.c:180 __vfs_setxattr_locked+0x17b/0x250 fs/xattr.c:238 vfs_setxattr+0xed/0x270 fs/xattr.c:255 setxattr+0x235/0x330 fs/xattr.c:520 path_setxattr+0x176/0x190 fs/xattr.c:539 __do_sys_lsetxattr fs/xattr.c:561 [inline] __se_sys_lsetxattr fs/xattr.c:557 [inline] __x64_sys_lsetxattr+0xc2/0x160 fs/xattr.c:557 do_syscall_64+0xdf/0x530 arch/x86/entry/common.c:298 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x459fe9 RSP: 002b:00007fa5e54b4c08 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd RAX: ffffffffffffffda RBX: 000000000051bf60 RCX: 0000000000459fe9 RDX: 00000000200003c0 RSI: 0000000020000180 RDI: 0000000020000140 RBP: 000000000051bf60 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000001009 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc73c93fc0 R14: 000000000051bf60 R15: 00007fa5e54b4d80 [...] ================================================================== Above issue may happen as follows: ------------------------------------- ext4_xattr_set ext4_xattr_set_handle ext4_xattr_ibody_find >> s->end < s->base >> no EXT4_STATE_XATTR >> xattr_check_inode is not executed ext4_xattr_ibody_set ext4_xattr_set_entry >> size_t min_offs = s->end - s->base >> UAF in memcpy we can easily reproduce this problem with the following commands: mkfs.ext4 -F /dev/sda mount -o debug_want_extra_isize=128 /dev/sda /mnt touch /mnt/file setfattr -n user.cat -v `seq -s z 4096|tr -d '[:digit:]'` /mnt/file In ext4_xattr_ibody_find, we have the following assignment logic: header = IHDR(inode, raw_inode) = raw_inode + EXT4_GOOD_OLD_INODE_SIZE + i_extra_isize is->s.base = IFIRST(header) = header + sizeof(struct ext4_xattr_ibody_header) is->s.end = raw_inode + s_inode_size In ext4_xattr_set_entry min_offs = s->end - s->base = s_inode_size - EXT4_GOOD_OLD_INODE_SIZE - i_extra_isize - sizeof(struct ext4_xattr_ibody_header) last = s->first free = min_offs - ((void *)last - s->base) - sizeof(__u32) = s_inode_size - EXT4_GOOD_OLD_INODE_SIZE - i_extra_isize - sizeof(struct ext4_xattr_ibody_header) - sizeof(__u32) In the calculation formula, all values except s_inode_size and i_extra_size are fixed values. When i_extra_size is the maximum value s_inode_size - EXT4_GOOD_OLD_INODE_SIZE, min_offs is -4 and free is -8. The value overflows. As a result, the preceding issue is triggered when memcpy is executed. Therefore, when finding xattr or setting xattr, check whether there is space for storing xattr in the inode to resolve this issue. Cc: stable@kernel.org Reported-by: Hulk Robot Signed-off-by: Baokun Li Reviewed-by: Ritesh Harjani (IBM) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20220616021358.2504451-3-libaokun1@huawei.com Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 179b14152dcb6a24c3415200603aebca70ff13af Author: Baokun Li Date: Thu Jun 16 10:13:55 2022 +0800 ext4: add EXT4_INODE_HAS_XATTR_SPACE macro in xattr.h When adding an xattr to an inode, we must ensure that the inode_size is not less than EXT4_GOOD_OLD_INODE_SIZE + extra_isize + pad. Otherwise, the end position may be greater than the start position, resulting in UAF. Signed-off-by: Baokun Li Reviewed-by: Jan Kara Reviewed-by: Ritesh Harjani (IBM) Link: https://lore.kernel.org/r/20220616021358.2504451-2-libaokun1@huawei.com Signed-off-by: Theodore Ts'o fs/ext4/xattr.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 7f0d8e1d607c1a4fa9a27362a108921d82230874 Author: Eric Whitney Date: Wed Jun 15 12:05:30 2022 -0400 ext4: fix extent status tree race in writeback error recovery path A race can occur in the unlikely event ext4 is unable to allocate a physical cluster for a delayed allocation in a bigalloc file system during writeback. Failure to allocate a cluster forces error recovery that includes a call to mpage_release_unused_pages(). That function removes any corresponding delayed allocated blocks from the extent status tree. If a new delayed write is in progress on the same cluster simultaneously, resulting in the addition of an new extent containing one or more blocks in that cluster to the extent status tree, delayed block accounting can be thrown off if that delayed write then encounters a similar cluster allocation failure during future writeback. Write lock the i_data_sem in mpage_release_unused_pages() to fix this problem. Ext4's block/cluster accounting code for bigalloc relies on i_data_sem for mutual exclusion, as is found in the delayed write path, and the locking in mpage_release_unused_pages() is missing. Cc: stable@kernel.org Reported-by: Ye Bin Signed-off-by: Eric Whitney Link: https://lore.kernel.org/r/20220615160530.1928801-1-enwlinux@gmail.com Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a89573ce4ad32f19f43ec669771726817e185be0 Author: Zhang Yi Date: Sat Jun 11 21:04:26 2022 +0800 jbd2: fix outstanding credits assert in jbd2_journal_commit_transaction() We catch an assert problem in jbd2_journal_commit_transaction() when doing fsstress and request falut injection tests. The problem is happened in a race condition between jbd2_journal_commit_transaction() and ext4_end_io_end(). Firstly, ext4_writepages() writeback dirty pages and start reserved handle, and then the journal was aborted due to some previous metadata IO error, jbd2_journal_abort() start to commit current running transaction, the committing procedure could be raced by ext4_end_io_end() and lead to subtract j_reserved_credits twice from commit_transaction->t_outstanding_credits, finally the t_outstanding_credits is mistakenly smaller than t_nr_buffers and trigger assert. kjournald2 kworker jbd2_journal_commit_transaction() write_unlock(&journal->j_state_lock); atomic_sub(j_reserved_credits, t_outstanding_credits); //sub once jbd2_journal_start_reserved() start_this_handle() //detect aborted journal jbd2_journal_free_reserved() //get running transaction read_lock(&journal->j_state_lock) __jbd2_journal_unreserve_handle() atomic_sub(j_reserved_credits, t_outstanding_credits); //sub again read_unlock(&journal->j_state_lock); journal->j_running_transaction = NULL; J_ASSERT(t_nr_buffers <= t_outstanding_credits) //bomb!!! Fix this issue by using journal->j_state_lock to protect the subtraction in jbd2_journal_commit_transaction(). Fixes: 96f1e0974575 ("jbd2: avoid long hold times of j_state_lock while committing a transaction") Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20220611130426.2013258-1-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o fs/jbd2/commit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1324958567da957385d8d555a8b840b3bf8e6e3 Author: Jan Kara Date: Wed Jun 8 13:23:50 2022 +0200 jbd2: unexport jbd2_log_start_commit() jbd2_log_start_commit() is not used outside of jbd2 so unexport it. Also make __jbd2_log_start_commit() static when we are at it. Signed-off-by: Jan Kara Reviewed-by: Lukas Czerner Link: https://lore.kernel.org/r/20220608112355.4397-4-jack@suse.cz Signed-off-by: Theodore Ts'o fs/jbd2/journal.c | 3 +-- include/linux/jbd2.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit 68af74e92a86984ca6d5f7b19ee8f8a30a550873 Author: Jan Kara Date: Wed Jun 8 13:23:49 2022 +0200 jbd2: remove unused exports for jbd2 debugging Jbd2 exports jbd2_journal_enable_debug and __jbd2_debug() depite the first is used only in fs/jbd2/journal.c and the second only within jbd2 code. Remove the pointless exports make jbd2_journal_enable_debug static. Signed-off-by: Jan Kara Reviewed-by: Lukas Czerner Link: https://lore.kernel.org/r/20220608112355.4397-3-jack@suse.cz Signed-off-by: Theodore Ts'o fs/jbd2/journal.c | 4 +--- include/linux/jbd2.h | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) commit cb3b3bf22cf33707d684e74207908ba0ef3b6467 Author: Jan Kara Date: Wed Jun 8 13:23:48 2022 +0200 jbd2: rename jbd_debug() to jbd2_debug() The name of jbd_debug() is confusing as all functions inside jbd2 have jbd2_ prefix. Rename jbd_debug() to jbd2_debug(). No functional changes. Signed-off-by: Jan Kara Reviewed-by: Lukas Czerner Link: https://lore.kernel.org/r/20220608112355.4397-2-jack@suse.cz Signed-off-by: Theodore Ts'o fs/jbd2/checkpoint.c | 6 +++--- fs/jbd2/commit.c | 30 +++++++++++++++--------------- fs/jbd2/journal.c | 34 +++++++++++++++++----------------- fs/jbd2/recovery.c | 30 +++++++++++++++--------------- fs/jbd2/revoke.c | 8 ++++---- fs/jbd2/transaction.c | 26 +++++++++++++------------- include/linux/jbd2.h | 4 ++-- 7 files changed, 69 insertions(+), 69 deletions(-) commit 4978c659e7b5c1926cdb4b556e4ca1fd2de8ad42 Author: Jan Kara Date: Wed Jun 8 13:23:47 2022 +0200 ext4: use ext4_debug() instead of jbd_debug() We use jbd_debug() in some places in ext4. It seems a bit strange to use jbd2 debugging output function for ext4 code. Also these days ext4_debug() uses dynamic printk so each debug message can be enabled / disabled on its own so the time when it made some sense to have these combined (to allow easier common selecting of messages to report) has passed. Just convert all jbd_debug() uses in ext4 to ext4_debug(). Signed-off-by: Jan Kara Reviewed-by: Lukas Czerner Link: https://lore.kernel.org/r/20220608112355.4397-1-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/balloc.c | 2 +- fs/ext4/ext4_jbd2.c | 3 +-- fs/ext4/fast_commit.c | 44 ++++++++++++++++++++++---------------------- fs/ext4/indirect.c | 4 ++-- fs/ext4/inode.c | 2 +- fs/ext4/orphan.c | 24 ++++++++++++------------ fs/ext4/super.c | 2 +- 7 files changed, 40 insertions(+), 41 deletions(-) commit 218a69441bf7f65155b96584e354f12c28b7944a Author: hanjinke Date: Mon Jun 6 23:53:05 2022 +0800 ext4: reuse order and buddy in mb_mark_used when buddy split After each buddy split, mb_mark_used will search the proper order for the block which may consume some loop in mb_find_order_for_block. In fact, we can reuse the order and buddy generated by the buddy split. Reviewed by: lei.rao@intel.com Signed-off-by: hanjinke Link: https://lore.kernel.org/r/20220606155305.74146-1-hanjinke.666@bytedance.com Signed-off-by: Theodore Ts'o fs/ext4/mballoc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 827891a38accfb4e04dbcdefe710f8746c6ad16d Author: Theodore Ts'o Date: Wed Jun 29 00:00:26 2022 -0400 ext4: update the s_overhead_clusters in the backup sb's when resizing When the EXT4_IOC_RESIZE_FS ioctl is complete, update the backup superblocks. We don't do this for the old-style resize ioctls since they are quite ancient, and only used by very old versions of resize2fs --- and we don't want to update the backup superblocks every time EXT4_IOC_GROUP_ADD is called, since it might get called a lot. Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20220629040026.112371-2-tytso@mit.edu Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 4 ++-- fs/ext4/ioctl.c | 22 +++++++++++++++------- fs/ext4/resize.c | 5 ++++- fs/ext4/super.c | 2 +- 4 files changed, 22 insertions(+), 11 deletions(-) commit de394a86658ffe4e89e5328fd4993abfe41b7435 Author: Theodore Ts'o Date: Wed Jun 29 00:00:25 2022 -0400 ext4: update s_overhead_clusters in the superblock during an on-line resize When doing an online resize, the on-disk superblock on-disk wasn't updated. This means that when the file system is unmounted and remounted, and the on-disk overhead value is non-zero, this would result in the results of statfs(2) to be incorrect. This was partially fixed by Commits 10b01ee92df5 ("ext4: fix overhead calculation to account for the reserved gdt blocks"), 85d825dbf489 ("ext4: force overhead calculation if the s_overhead_cluster makes no sense"), and eb7054212eac ("ext4: update the cached overhead value in the superblock"). However, since it was too expensive to forcibly recalculate the overhead for bigalloc file systems at every mount, this didn't fix the problem for bigalloc file systems. This commit should address the problem when resizing file systems with the bigalloc feature enabled. Signed-off-by: Theodore Ts'o Cc: stable@kernel.org Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20220629040026.112371-1-tytso@mit.edu Signed-off-by: Theodore Ts'o fs/ext4/resize.c | 1 + 1 file changed, 1 insertion(+) commit 5a57bca9050d740ca37184302e23d0e7633e3ebc Author: Zhang Yi Date: Thu Jun 30 17:01:00 2022 +0800 ext4: fix reading leftover inlined symlinks Since commit 6493792d3299 ("ext4: convert symlink external data block mapping to bdev"), create new symlink with inline_data is not supported, but it missing to handle the leftover inlined symlinks, which could cause below error message and fail to read symlink. ls: cannot read symbolic link 'foo': Structure needs cleaning EXT4-fs error (device sda): ext4_map_blocks:605: inode #12: block 2021161080: comm ls: lblock 0 mapped to illegal pblock 2021161080 (length 1) Fix this regression by adding ext4_read_inline_link(), which read the inline data directly and convert it through a kmalloced buffer. Fixes: 6493792d3299 ("ext4: convert symlink external data block mapping to bdev") Cc: stable@kernel.org Reported-by: Torge Matthies Signed-off-by: Zhang Yi Tested-by: Torge Matthies Link: https://lore.kernel.org/r/20220630090100.2769490-1-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 1 + fs/ext4/inline.c | 30 ++++++++++++++++++++++++++++++ fs/ext4/symlink.c | 15 +++++++++++++++ 3 files changed, 46 insertions(+) commit c86019ff75c1475968c25b87fa05bf342f03a6c9 Author: ZiyangZhang Date: Thu Jul 28 20:39:16 2022 +0800 ublk_drv: add support for UBLK_IO_NEED_GET_DATA UBLK_IO_NEED_GET_DATA is one ublk IO command. It is designed for a user application who wants to allocate IO buffer and set IO buffer address only after it receives an IO request from ublksrv. This is a reasonable scenario because these users may use a RPC framework as one IO backend to handle IO requests passed from ublksrv. And a RPC framework may allocate its own buffer(or memory pool). This new feature (UBLK_F_NEED_GET_DATA) is optional for ublk users. Related userspace code has been added in ublksrv[1] as one pull request. Test cases for this feature are added in ublksrv and all the tests pass. The performance result shows that this new feature does bring additional latency because one IO is issued back to ublk_drv once again to copy data from bio vectors to user-provided data buffer. UBLK_IO_NEED_GET_DATA is suitable for bigger block size such as 512B or 1MB. [1] https://github.com/ming1/ubdsrv Signed-off-by: ZiyangZhang Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/3a21007ea1be8304246e654cebbd581ab0012623.1659011443.git.ZiyangZhang@linux.alibaba.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 106 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 94 insertions(+), 12 deletions(-) commit 4e18403d9485a43e1b54397df258b8df7dac9a83 Author: ZiyangZhang Date: Thu Jul 28 20:39:15 2022 +0800 ublk_cmd.h: add one new ublk command: UBLK_IO_NEED_GET_DATA Add one new ublk command: UBLK_IO_NEED_GET_DATA. It is prepared for a new feature designed for a user application who wants to allocate IO buffer and set IO buffer address only after it receives an IO request from ublksrv. Reviewed-by: Ming Lei Signed-off-by: ZiyangZhang Link: https://lore.kernel.org/r/c8a64b6b51c78340da7daa9e1054608695e79619.1659011443.git.ZiyangZhang@linux.alibaba.com Signed-off-by: Jens Axboe include/uapi/linux/ublk_cmd.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 4bf9cbf3e93426e9ebe136dabd6ca392ca92cfcb Author: Ming Lei Date: Sat Jul 30 17:27:50 2022 +0800 ublk_drv: cleanup ublksrv_ctrl_dev_info Remove all block device related info from ublksrv_ctrl_dev_info, meantime reduce its size into 64 bytes because: 1) ublksrv_ctrl_dev_info becomes cleaner without including any block related info 2) generic set/get parameter command can be used to set block related setting easily and cleanly 3) generic set/get parameter command can be used for extending ublk without needing more info in ublksrv_ctrl_dev_info Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20220730092750.1118167-5-ming.lei@redhat.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 18 +++++++----------- include/uapi/linux/ublk_cmd.h | 15 ++++++++------- 2 files changed, 15 insertions(+), 18 deletions(-) commit 0aa73170eba5eae638c1b96a05eba533f030b5cb Author: Ming Lei Date: Sat Jul 30 17:27:49 2022 +0800 ublk_drv: add SET_PARAMS/GET_PARAMS control command Add two commands to set/get parameters generically. One important goal of ublk is to provide generic framework for making block device by userspace flexibly. As one generic block device, there are still lots of block parameters, such as max_sectors, write_cache/fua, discard related limits, zoned parameters, ...., so this patch starts to add generic mechanism for set/get device parameters. Both generic block parameters(all kinds of queue settings) and ublk feature parameters can be covered with this way, then it becomes quite easy to extend in future. Add two parameter types are used so far: basic(covers basic queue setting and misc settings which can't be grouped easily) and discard, basic type must be set, and discard type becomes optional now This way provides mechanism to simulate any kind of generic block device from userspace easily, from both block queue setting viewpoint or ublk feature viewpoint. The style of putting all parameters together is suggested by Christoph. Suggested-by: Christoph Hellwig Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20220730092750.1118167-4-ming.lei@redhat.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 205 ++++++++++++++++++++++++++++++++++++++---- include/uapi/linux/ublk_cmd.h | 47 ++++++++++ 2 files changed, 234 insertions(+), 18 deletions(-) commit 93d71ec89d5fb2bc431fe7e0ff7ca819bf6dc601 Author: Ming Lei Date: Sat Jul 30 17:27:48 2022 +0800 ublk_drv: fix ublk device leak in case that add_disk fails ->free_disk is only called after disk is added successfully, so drop ublk device reference in case of add_disk() failure. Fixes: 6d9e6dfdf3b2 ("ublk: defer disk allocation") Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20220730092750.1118167-3-ming.lei@redhat.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 5 +++++ 1 file changed, 5 insertions(+) commit a8ce5f52efce3b89ca82ce8798d0d061117465d2 Author: Ming Lei Date: Sat Jul 30 17:27:47 2022 +0800 ublk_drv: cancel device even though disk isn't up Each ublk queue is started before adding disk, we have to cancel queues in ublk_stop_dev() so that ubq daemon can be exited, otherwise DEL_DEV command may hang forever. Also avoid to cancel queues two times by checking if queue is ready, otherwise use-after-free on io_uring may be triggered because ublk_stop_dev is called by ublk_remove() too. Fixes: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver") Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20220730092750.1118167-2-ming.lei@redhat.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit e97424fd44727b4a5ecb124a49f575fed6086999 Author: Keith Busch Date: Tue Jul 12 08:32:56 2022 -0700 block: fix leaking page ref on truncated direct io The size being added to a bio from an iov is aligned to a block size after the pages were gotten. If the new aligned size truncates the last page, its reference was being leaked. Ensure all pages that were not added to the bio have their reference released. Since this essentially requires doing the same that bio_put_pages(), and there was only one caller for that function, this patch makes the put_page() loop common for everyone. Fixes: b1a000d3b8ec5 ("block: relax direct io memory alignment") Reported-by: Al Viro Signed-off-by: Keith Busch Link: https://lore.kernel.org/r/20220712153256.2202024-3-kbusch@fb.com Signed-off-by: Jens Axboe block/bio.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 34cdb8c825f28a5c91c5336a80967533da57da74 Author: Keith Busch Date: Tue Jul 12 08:32:55 2022 -0700 block: ensure bio_iov_add_page can't fail Adding the page could fail on the bio_full() condition, which checks for either exceeding the bio's max segments or total size exceeding UINT_MAX. We already ensure the max segments can't be exceeded, so just ensure the total size won't reach the limit. This simplifies error handling and removes unnecessary repeated bio_full() checks. Signed-off-by: Keith Busch Link: https://lore.kernel.org/r/20220712153256.2202024-2-kbusch@fb.com Signed-off-by: Jens Axboe block/bio.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 325347d965e7ccf5424a05398807a6d801846612 Author: Keith Busch Date: Tue Jul 12 08:32:54 2022 -0700 block: ensure iov_iter advances for added pages There are cases where a bio may not accept additional pages, and the iov needs to advance to the last data length that was accepted. The zone append used to handle this correctly, but was inadvertently broken when the setup was made common with the normal r/w case. Fixes: 576ed9135489c ("block: use bio_add_page in bio_iov_iter_get_pages") Fixes: c58c0074c54c2 ("block/bio: remove duplicate append pages code") Signed-off-by: Keith Busch Link: https://lore.kernel.org/r/20220712153256.2202024-1-kbusch@fb.com Signed-off-by: Jens Axboe block/bio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 104212471b1c1817b311771d817fb692af983173 Author: Wentao_Liang Date: Thu Jul 28 19:39:19 2022 +0800 drivers:md:fix a potential use-after-free bug In line 2884, "raid5_release_stripe(sh);" drops the reference to sh and may cause sh to be released. However, sh is subsequently used in lines 2886 "if (sh->batch_head && sh != sh->batch_head)". This may result in an use-after-free bug. It can be fixed by moving "raid5_release_stripe(sh);" to the bottom of the function. Signed-off-by: Wentao_Liang Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20313b1b8cd1bda34ee136b656c39ff2ae189330 Author: Logan Gunthorpe Date: Wed Jul 27 15:06:00 2022 -0600 md/raid5: Ensure batch_last is released before sleeping for quiesce A race condition exists where if raid5_quiesce() is called in the middle of a request that has set batch_last, it will deadlock. batch_last will hold a reference to a stripe when raid5_quiesce() is called. This will cause the next raid5_get_active_stripe() call to sleep waiting for the quiesce to finish, but the raid5_quiesce() thread will wait for active_stripes to go to zero which will never happen because request thread is waiting for the quiesce to stop. Fix this by creating a special __raid5_get_active_stripe() function which takes the request context and clears the last_batch before sleeping. While we're at it, change the arguments of raid5_get_active_stripe() to bools. Fixes: 3312e6c887fe ("md/raid5: Keep a reference to last stripe_head for batch") Reported-by: David Sloan Signed-off-by: Logan Gunthorpe Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 36 ++++++++++++++++++++++++++++-------- drivers/md/raid5.h | 2 +- 2 files changed, 29 insertions(+), 9 deletions(-) commit df6b0e205d1fe3fe1f2e9aaee9fc396b64e1c293 Author: Logan Gunthorpe Date: Wed Jul 27 15:05:59 2022 -0600 md/raid5: Move stripe_request_ctx up Move stripe_request_ctx up. No functional changes intended. This will be necessary in the next patch to release the batch_last in the context before sleeping. Signed-off-by: Logan Gunthorpe Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 9734fe7bd53f85206edee58e0271dbf214c2059c Author: Logan Gunthorpe Date: Wed Jul 27 15:05:58 2022 -0600 md/raid5: Drop unnecessary call to r5c_check_stripe_cache_usage() Now that raid5_get_active_stripe() has been refactored it is appearant that r5c_check_stripe_cache_usage() doesn't need to be called in the wait_for_stripe branch. r5c_check_stripe_cache_usage() will only conditionally call r5l_wake_reclaim(), but that function is called two lines later. Drop the call for cleanup. Reported-by: Martin Oliveira Signed-off-by: Logan Gunthorpe Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 1 - 1 file changed, 1 deletion(-) commit 3514da58be9c40b4e377d73a21a56e89145f2843 Author: Logan Gunthorpe Date: Wed Jul 27 15:05:57 2022 -0600 md/raid5: Make is_inactive_blocked() helper The logic to wait_for_stripe is difficult to parse being on so many lines and with confusing operator precedence. Move it to a helper function to make it easier to read. No functional changes intended. Signed-off-by: Logan Gunthorpe Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit 5165ed40a1f0a3bf03526aad96df736556fbe64f Author: Logan Gunthorpe Date: Wed Jul 27 15:05:56 2022 -0600 md/raid5: Refactor raid5_get_active_stripe() Refactor the raid5_get_active_stripe() to read more linearly in the order it's typically executed. The init_stripe() call is called if a free stripe is found and the function is exited early which removes a lot of if (sh) checks and unindents the following code. Remove the while loop in favour of the 'goto retry' pattern, which reduces indentation further. And use a 'goto wait_for_stripe' instead of an additional indent seeing it is the unusual path and this makes the code easier to read. No functional changes intended. Will make subsequent changes in patches easier to understand. Signed-off-by: Logan Gunthorpe Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 67 +++++++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 31 deletions(-) commit c55ddd9082f757050183bd0e215aab3af3fc225f Author: Christoph Hellwig Date: Wed Jul 27 12:23:00 2022 -0400 block: pass struct queue_limits to the bio splitting helpers Allow using the splitting helpers on just a queue_limits instead of a full request_queue structure. This will eventually allow file systems or remapping drivers to split REQ_OP_ZONE_APPEND bios based on limits calculated as the minimum common capabilities over multiple devices. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220727162300.3089193-7-hch@lst.de Signed-off-by: Jens Axboe block/bio-integrity.c | 2 +- block/bio.c | 2 +- block/blk-merge.c | 107 +++++++++++++++++++++++--------------------------- block/blk-mq.c | 4 +- block/blk.h | 25 ++++++------ 5 files changed, 68 insertions(+), 72 deletions(-) commit b6dc6198ebe855d70e6f68d279c4015fe5d73e7b Author: Christoph Hellwig Date: Wed Jul 27 12:22:59 2022 -0400 block: move bio_allowed_max_sectors to blk-merge.c Move this helper into the only file where it is used. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220727162300.3089193-6-hch@lst.de Signed-off-by: Jens Axboe block/blk-merge.c | 10 ++++++++++ block/blk.h | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) commit a85b36375b05f70301f15cafb9030cae7c789f76 Author: Christoph Hellwig Date: Wed Jul 27 12:22:58 2022 -0400 block: move the call to get_max_io_size out of blk_bio_segment_split Prepare for reusing blk_bio_segment_split for (file system controlled) splits of REQ_OP_ZONE_APPEND bios by letting the caller control the maximum size of the bio. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220727162300.3089193-5-hch@lst.de Signed-off-by: Jens Axboe block/blk-merge.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 46754bd056053785d7079f1d48f7f571728dcb47 Author: Christoph Hellwig Date: Wed Jul 27 12:22:57 2022 -0400 block: move ->bio_split to the gendisk Only non-passthrough requests are split by the block layer and use the ->bio_split bio_set. Move it from the request_queue to the gendisk. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220727162300.3089193-4-hch@lst.de Signed-off-by: Jens Axboe block/blk-core.c | 9 +-------- block/blk-merge.c | 7 ++++--- block/blk-sysfs.c | 2 -- block/genhd.c | 8 +++++++- drivers/md/dm.c | 2 +- include/linux/blkdev.h | 3 ++- 6 files changed, 15 insertions(+), 16 deletions(-) commit e2b542100719a93f8cdf6d90185410d38a57a4c1 Merge: e05d5b9c5bbe 94dfc73e7cf4 Author: Linus Torvalds Date: Tue Aug 2 19:50:47 2022 -0700 Merge tag 'flexible-array-transformations-UAPI-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull uapi flexible array update from Gustavo Silva: "A treewide patch that replaces zero-length arrays with flexible-array members in UAPI. This has been baking in linux-next for 5 weeks now. '-fstrict-flex-arrays=3' is coming and we need to land these changes to prevent issues like these in the short future: fs/minix/dir.c:337:3: warning: 'strcpy' will always overflow; destination buffer has size 0, but the source string has length 2 (including NUL byte) [-Wfortify-source] strcpy(de3->name, "."); ^ Since these are all [0] to [] changes, the risk to UAPI is nearly zero. If this breaks anything, we can use a union with a new member name" Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 * tag 'flexible-array-transformations-UAPI-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: treewide: uapi: Replace zero-length arrays with flexible-array members commit e05d5b9c5bbea80313d8f58c3a80a18839b25480 Merge: 665fe72a7d4f 4062eba9f3d0 Author: Linus Torvalds Date: Tue Aug 2 19:44:56 2022 -0700 Merge tag 'linux-kselftest-next-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest updates from Shuah Khan: - timers test build fixes and cleanups for new tool chains - removing khdr from kselftest framework and main Makefile - changes to test output messages to improve reports * tag 'linux-kselftest-next-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (24 commits) Makefile: replace headers_install with headers for kselftest selftests/landlock: drop deprecated headers dependency selftests: timers: clocksource-switch: adapt to kselftest framework selftests: timers: clocksource-switch: add 'runtime' command line parameter selftests: timers: clocksource-switch: add command line switch to skip sanity check selftests: timers: clocksource-switch: sort includes selftests: timers: clocksource-switch: fix passing errors from child selftests: timers: inconsistency-check: adapt to kselftest framework selftests: timers: nanosleep: adapt to kselftest framework selftests: timers: fix declarations of main() selftests: timers: valid-adjtimex: build fix for newer toolchains Makefile: add headers_install to kselftest targets selftests: drop KSFT_KHDR_INSTALL make target selftests: stop using KSFT_KHDR_INSTALL selftests: drop khdr make target selftests: drivers/dma-buf: Improve message in selftest summary selftests/kcmp: Make the test output consistent and clear selftests:timers: globals don't need initialization to 0 selftests/drivers/gpu: Add error messages to drm_mm.sh selftests/tpm2: increase timeout for kselftests ... commit 665fe72a7d4f0ad17923e0a5ff2e6cc64d57c970 Merge: aad26f55f47a 4c392516accf Author: Linus Torvalds Date: Tue Aug 2 19:34:45 2022 -0700 Merge tag 'linux-kselftest-kunit-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull KUnit updates from Shuah Khan: "This consists of several fixes and an important feature to discourage running KUnit tests on production systems. Running tests on a production system could leave the system in a bad state. Summary: - Add a new taint type, TAINT_TEST to signal that a test has been run. This should discourage people from running these tests on production systems, and to make it easier to tell if tests have been run accidentally (by loading the wrong configuration, etc) - Several documentation and tool enhancements and fixes" * tag 'linux-kselftest-kunit-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (29 commits) Documentation: KUnit: Fix example with compilation error Documentation: kunit: Add CLI args for kunit_tool kcsan: test: Add a .kunitconfig to run KCSAN tests kunit: executor: Fix a memory leak on failure in kunit_filter_tests clk: explicitly disable CONFIG_UML_PCI_OVER_VIRTIO in .kunitconfig mmc: sdhci-of-aspeed: test: Use kunit_test_suite() macro nitro_enclaves: test: Use kunit_test_suite() macro thunderbolt: test: Use kunit_test_suite() macro kunit: flatten kunit_suite*** to kunit_suite** in .kunit_test_suites kunit: unify module and builtin suite definitions selftest: Taint kernel when test module loaded module: panic: Taint the kernel when selftest modules load Documentation: kunit: fix example run_kunit func to allow spaces in args Documentation: kunit: Cleanup run_wrapper, fix x-ref kunit: test.h: fix a kernel-doc markup kunit: tool: Enable virtio/PCI by default on UML kunit: tool: make --kunitconfig repeatable, blindly concat kunit: add coverage_uml.config to enable GCOV on UML kunit: tool: refactor internal kconfig handling, allow overriding kunit: tool: introduce --qemu_args ... commit aad26f55f47a33d6de3df65f0b18e2886059ed6d Merge: b069122256e4 339170d8d3da Author: Linus Torvalds Date: Tue Aug 2 19:24:24 2022 -0700 Merge tag 'docs-6.0' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "This was a moderately busy cycle for documentation, but nothing all that earth-shaking: - More Chinese translations, and an update to the Italian translations. The Japanese, Korean, and traditional Chinese translations are more-or-less unmaintained at this point, instead. - Some build-system performance improvements. - The removal of the archaic submitting-drivers.rst document, with the movement of what useful material that remained into other docs. - Improvements to sphinx-pre-install to, hopefully, give more useful suggestions. - A number of build-warning fixes Plus the usual collection of typo fixes, updates, and more" * tag 'docs-6.0' of git://git.lwn.net/linux: (92 commits) docs: efi-stub: Fix paths for x86 / arm stubs Docs/zh_CN: Update the translation of sched-stats to 5.19-rc8 Docs/zh_CN: Update the translation of pci to 5.19-rc8 Docs/zh_CN: Update the translation of pci-iov-howto to 5.19-rc8 Docs/zh_CN: Update the translation of usage to 5.19-rc8 Docs/zh_CN: Update the translation of testing-overview to 5.19-rc8 Docs/zh_CN: Update the translation of sparse to 5.19-rc8 Docs/zh_CN: Update the translation of kasan to 5.19-rc8 Docs/zh_CN: Update the translation of iio_configfs to 5.19-rc8 doc:it_IT: align Italian documentation docs: Remove spurious tag from admin-guide/mm/overcommit-accounting.rst Documentation: process: Update email client instructions for Thunderbird docs: ABI: correct QEMU fw_cfg spec path doc/zh_CN: remove submitting-driver reference from docs docs: zh_TW: align to submitting-drivers removal docs: zh_CN: align to submitting-drivers removal docs: ko_KR: howto: remove reference to removed submitting-drivers docs: ja_JP: howto: remove reference to removed submitting-drivers docs: it_IT: align to submitting-drivers removal docs: process: remove outdated submitting-drivers.rst ... commit b069122256e45216b5c49d9441f9713991a4c645 Merge: 7d9d077c783e 4f8126f3a665 Author: Linus Torvalds Date: Tue Aug 2 19:22:24 2022 -0700 Merge tag 'nolibc.2022.07.27a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull nolibc updates from Paul McKenney: "This provides nolibc updates, perhaps most notably improved testing via the 'cd tools/include/nolibc; make headers' command. This should be considered a smoke test. More thorough testing is in the works" * tag 'nolibc.2022.07.27a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: tools/nolibc: add a help target to list supported targets tools/nolibc: make the default target build the headers tools/nolibc: fix the makefile to also work as "make -C tools ..." tools/nolibc/stdio: Add format attribute to enable printf warnings tools/nolibc/stdlib: Support overflow checking for older compiler versions commit 7d9d077c783e33995c80d8b28fea1a98161934f4 Merge: c2a24a7a036b 34bc7b454dc3 Author: Linus Torvalds Date: Tue Aug 2 19:12:45 2022 -0700 Merge tag 'rcu.2022.07.26a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull RCU updates from Paul McKenney: - Documentation updates - Miscellaneous fixes - Callback-offload updates, perhaps most notably a new RCU_NOCB_CPU_DEFAULT_ALL Kconfig option that causes all CPUs to be offloaded at boot time, regardless of kernel boot parameters. This is useful to battery-powered systems such as ChromeOS and Android. In addition, a new RCU_NOCB_CPU_CB_BOOST kernel boot parameter prevents offloaded callbacks from interfering with real-time workloads and with energy-efficiency mechanisms - Polled grace-period updates, perhaps most notably making these APIs account for both normal and expedited grace periods - Tasks RCU updates, perhaps most notably reducing the CPU overhead of RCU tasks trace grace periods by more than a factor of two on a system with 15,000 tasks. The reduction is expected to increase with the number of tasks, so it seems reasonable to hypothesize that a system with 150,000 tasks might see a 20-fold reduction in CPU overhead - Torture-test updates - Updates that merge RCU's dyntick-idle tracking into context tracking, thus reducing the overhead of transitioning to kernel mode from either idle or nohz_full userspace execution for kernels that track context independently of RCU. This is expected to be helpful primarily for kernels built with CONFIG_NO_HZ_FULL=y * tag 'rcu.2022.07.26a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: (98 commits) rcu: Add irqs-disabled indicator to expedited RCU CPU stall warnings rcu: Diagnose extended sync_rcu_do_polled_gp() loops rcu: Put panic_on_rcu_stall() after expedited RCU CPU stall warnings rcutorture: Test polled expedited grace-period primitives rcu: Add polled expedited grace-period primitives rcutorture: Verify that polled GP API sees synchronous grace periods rcu: Make Tiny RCU grace periods visible to polled APIs rcu: Make polled grace-period API account for expedited grace periods rcu: Switch polled grace-period APIs to ->gp_seq_polled rcu/nocb: Avoid polling when my_rdp->nocb_head_rdp list is empty rcu/nocb: Add option to opt rcuo kthreads out of RT priority rcu: Add nocb_cb_kthread check to rcu_is_callbacks_kthread() rcu/nocb: Add an option to offload all CPUs on boot rcu/nocb: Fix NOCB kthreads spawn failure with rcu_nocb_rdp_deoffload() direct call rcu/nocb: Invert rcu_state.barrier_mutex VS hotplug lock locking order rcu/nocb: Add/del rdp to iterate from rcuog itself rcu/tree: Add comment to describe GP-done condition in fqs loop rcu: Initialize first_gp_fqs at declaration in rcu_gp_fqs() rcu/kvfree: Remove useless monitor_todo flag rcu: Cleanup RCU urgency state for offline CPU ... commit c2a24a7a036b3bd3a2e6c66730dfc777cae6540a Merge: a0b09f2d6f30 af5d35b83f64 Author: Linus Torvalds Date: Tue Aug 2 17:45:14 2022 -0700 Merge tag 'v5.20-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "API: - Make proc files report fips module name and version Algorithms: - Move generic SHA1 code into lib/crypto - Implement Chinese Remainder Theorem for RSA - Remove blake2s - Add XCTR with x86/arm64 acceleration - Add POLYVAL with x86/arm64 acceleration - Add HCTR2 - Add ARIA Drivers: - Add support for new CCP/PSP device ID in ccp" * tag 'v5.20-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (89 commits) crypto: tcrypt - Remove the static variable initialisations to NULL crypto: arm64/poly1305 - fix a read out-of-bound crypto: hisilicon/zip - Use the bitmap API to allocate bitmaps crypto: hisilicon/sec - fix auth key size error crypto: ccree - Remove a useless dma_supported() call crypto: ccp - Add support for new CCP/PSP device ID crypto: inside-secure - Add missing MODULE_DEVICE_TABLE for of crypto: hisilicon/hpre - don't use GFP_KERNEL to alloc mem during softirq crypto: testmgr - some more fixes to RSA test vectors cyrpto: powerpc/aes - delete the rebundant word "block" in comments hwrng: via - Fix comment typo crypto: twofish - Fix comment typo crypto: rmd160 - fix Kconfig "its" grammar crypto: keembay-ocs-ecc - Drop if with an always false condition Documentation: qat: rewrite description Documentation: qat: Use code block for qat sysfs example crypto: lib - add module license to libsha1 crypto: lib - make the sha1 library optional crypto: lib - move lib/sha1.c into lib/crypto/ crypto: fips - make proc files report fips module name and version ... commit a0b09f2d6f30723e1008bd9ddb504e302e329f81 Merge: 569bede0cff5 7f637be4d460 Author: Linus Torvalds Date: Tue Aug 2 17:31:35 2022 -0700 Merge tag 'random-6.0-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random Pull random number generator updates from Jason Donenfeld: "Though there's been a decent amount of RNG-related development during this last cycle, not all of it is coming through this tree, as this cycle saw a shift toward tackling early boot time seeding issues, which took place in other trees as well. Here's a summary of the various patches: - The CONFIG_ARCH_RANDOM .config option and the "nordrand" boot option have been removed, as they overlapped with the more widely supported and more sensible options, CONFIG_RANDOM_TRUST_CPU and "random.trust_cpu". This change allowed simplifying a bit of arch code. - x86's RDRAND boot time test has been made a bit more robust, with RDRAND disabled if it's clearly producing bogus results. This would be a tip.git commit, technically, but I took it through random.git to avoid a large merge conflict. - The RNG has long since mixed in a timestamp very early in boot, on the premise that a computer that does the same things, but does so starting at different points in wall time, could be made to still produce a different RNG state. Unfortunately, the clock isn't set early in boot on all systems, so now we mix in that timestamp when the time is actually set. - User Mode Linux now uses the host OS's getrandom() syscall to generate a bootloader RNG seed and later on treats getrandom() as the platform's RDRAND-like faculty. - The arch_get_random_{seed_,}_long() family of functions is now arch_get_random_{seed_,}_longs(), which enables certain platforms, such as s390, to exploit considerable performance advantages from requesting multiple CPU random numbers at once, while at the same time compiling down to the same code as before on platforms like x86. - A small cleanup changing a cmpxchg() into a try_cmpxchg(), from Uros. - A comment spelling fix" More info about other random number changes that come in through various architecture trees in the full commentary in the pull request: https://lore.kernel.org/all/20220731232428.2219258-1-Jason@zx2c4.com/ * tag 'random-6.0-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random: random: correct spelling of "overwrites" random: handle archrandom with multiple longs um: seed rng using host OS rng random: use try_cmpxchg in _credit_init_bits timekeeping: contribute wall clock to rng on time change x86/rdrand: Remove "nordrand" flag in favor of "random.trust_cpu" random: remove CONFIG_ARCH_RANDOM commit 51d798cdb5c219000fe76a3ffbcaa846b689ba80 Author: Christoph Hellwig Date: Wed Jul 27 12:22:56 2022 -0400 block: change the blk_queue_bounce calling convention The double indirect bio leads to somewhat suboptimal code generation. Instead return the (original or split) bio, and make sure the request_queue arguments to the lower level helpers is passed after the bio to avoid constant reshuffling of the argument passing registers. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220727162300.3089193-3-hch@lst.de Signed-off-by: Jens Axboe block/blk-mq.c | 2 +- block/blk.h | 10 ++++++---- block/bounce.c | 26 +++++++++++++------------- 3 files changed, 20 insertions(+), 18 deletions(-) commit 5a97806f7dc069d9561d9930a2ae108700e222ab Author: Christoph Hellwig Date: Wed Jul 27 12:22:55 2022 -0400 block: change the blk_queue_split calling convention The double indirect bio leads to somewhat suboptimal code generation. Instead return the (original or split) bio, and make sure the request_queue arguments to the lower level helpers is passed after the bio to avoid constant reshuffling of the argument passing registers. Also give it and the helpers used to implement it more descriptive names. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220727162300.3089193-2-hch@lst.de Signed-off-by: Jens Axboe block/blk-merge.c | 98 +++++++++++++++++++++---------------------- block/blk-mq.c | 4 +- block/blk.h | 6 +-- drivers/block/drbd/drbd_req.c | 2 +- drivers/block/pktcdvd.c | 2 +- drivers/block/ps3vram.c | 2 +- drivers/md/dm.c | 6 +-- drivers/md/md.c | 2 +- drivers/nvme/host/multipath.c | 2 +- drivers/s390/block/dcssblk.c | 2 +- include/linux/blkdev.h | 2 +- 11 files changed, 63 insertions(+), 65 deletions(-) commit de474b550e2548f9844e872f1c0bf94460c7c84c Author: Christoph Hellwig Date: Mon Jul 25 07:40:26 2022 +0200 nvme: update MAINTAINERS for the new auth code Add the common subdirectory and match all nvme* headers in include/linux/. Reported-by: Dan Carpenter Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 533d2e8b4d5e4c89772a0adce913525fb86cbbee Author: Sagi Grimberg Date: Sun Jul 24 11:58:43 2022 +0300 nvmet-tcp: fix lockdep complaint on nvmet_tcp_wq flush during queue teardown We probably need nvmet_tcp_wq to have MEM_RECLAIM as we are sending/receiving for the socket from works on this workqueue. Also this eliminates lockdep complaints: -- [ 6174.010200] workqueue: WQ_MEM_RECLAIM nvmet-wq:nvmet_tcp_release_queue_work [nvmet_tcp] is flushing !WQ_MEM_RECLAIM nvmet_tcp_wq:nvmet_tcp_io_work [nvmet_tcp] [ 6174.010216] WARNING: CPU: 20 PID: 14456 at kernel/workqueue.c:2628 check_flush_dependency+0x110/0x14c Reported-by: Yi Zhang Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/tcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eb867ee995bd687154adb77bf7fda05c7d16fd9d Author: Joel Granados Date: Tue Jul 12 20:33:04 2022 +0200 nvme: enable generic interface (/dev/ngXnY) for unknown command sets Extend nvme_alloc_ns() and nvme_validate_ns() for unknown command-set as well. Both are made to use a new helper (nvme_update_ns_info_cs_indep) which is similar to nvme_update_ns_info but performs fewer operations to get the generic interface up. Suggested-by: Christoph Hellwig Signed-off-by: Joel Granados Signed-off-by: Kanchan Joshi [hch: rebased on other refactoring patches] Signed-off-by: Christoph Hellwig Reviewed-by: Javier González Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) commit 1e4ea66af1db4fde5988b6ed43341872a17e390d Author: Christoph Hellwig Date: Wed Jul 13 07:40:25 2022 +0200 nvme: factor out a nvme_ns_is_readonly helper Add a little helper to check if a namespace should be marked read-only that uses a new is_readonly flag in the nvme_ns_info structure. Signed-off-by: Christoph Hellwig Reviewed-by: Javier González Reviewed-by: Joel Granados Reviewed-by: Sagi Grimberg Reviewed-by: Kanchan Joshi Reviewed-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 1a893c2bfef46ac447eead8ea7afe417942be237 Author: Christoph Hellwig Date: Fri Jul 22 18:24:18 2022 +0200 nvme: refactor namespace probing Change nvme_ns_scan to gather all information needed for generic namespace setup into a nvme_ns_info structure. This structure is filled from the Command Set Idependent Identify Namespace data structure if it is available or else the legacy Identify namespace structure. With that everything related to the NVM command set (and the ZNS command set derived from it) can be encapsulated in the nvme_update_ns_info_block function while keeping the rest of the namespace probing generic. The downside is that we now always issue two Identify Namespace calls for each probed namespace instead of usually just a single one previously. Signed-off-by: Christoph Hellwig Reviewed-by: Javier González Reviewed-by: Joel Granados Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 230 +++++++++++++++++++++++++---------------------- 1 file changed, 125 insertions(+), 105 deletions(-) commit 71882e7d23b84036d4b0bea896a7b457478f3df2 Author: Christoph Hellwig Date: Tue Jul 12 18:15:01 2022 +0200 nvme: generalize the nvme_multi_css check in nvme_scan_ns Check for multiple command set support early on an error out if is not supported when a !NVM command set namespace is found. This prepares for adding command set independent passthrough support. Signed-off-by: Christoph Hellwig Reviewed-by: Javier González Reviewed-by: Joel Granados Reviewed-by: Sagi Grimberg Reviewed-by: Kanchan Joshi Reviewed-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 04c170f669f1686b8b762625ac9c5297bfd5add2 Author: Christoph Hellwig Date: Tue Jul 12 18:07:53 2022 +0200 nvme: rename nvme_validate_or_alloc_ns to nvme_scan_ns This shorter name much better fits what this function does in the scanning process. Signed-off-by: Christoph Hellwig Reviewed-by: Javier González Reviewed-by: Joel Granados Reviewed-by: Sagi Grimberg Reviewed-by: Kanchan Joshi Reviewed-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e06b425bc835ead08b9fd935bf5e47eef473e7a0 Author: Christoph Hellwig Date: Thu Jul 21 07:56:35 2022 +0200 nvme: catch -ENODEV from nvme_revalidate_zones again nvme_revalidate_zones can also return -ENODEV if e.g. zone sizes aren't constant or not a power of two. In that case we should jump to marking the gendisk hidden and only support pass through. Fixes: 602e57c9799c ("nvme: also mark passthrough-only namespaces ready in nvme_update_ns_info") Reported-by: Joel Granados Signed-off-by: Christoph Hellwig Reviewed-by: Joel Granados Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 4cf42ec36673707acefcddbdc21da8d6a61ac5a2 Author: Lukas Bulwahn Date: Wed Jul 20 13:37:17 2022 +0200 nvmet-auth: select the intended CRYPTO_DH_RFC7919_GROUPS Commit 71ebe3842ebe ("nvmet-auth: Diffie-Hellman key exchange support") intends to select 'Support for RFC 7919 FFDHE group parameters' for using FFDHE groups for NVMe In-Band Authentication. It however selects CRYPTO_DH_GROUPS_RFC7919, instead of the intended CRYPTO_DH_RFC7919_GROUPS; notice the swapping of words here. Correct the select to the intended config option. Signed-off-by: Lukas Bulwahn Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be2ada6d0ed094c77040dc7e2d56599dd492d961 Author: Chaitanya Kulkarni Date: Mon Jul 18 16:12:33 2022 -0700 nvmet-auth: fix return value check in auth receive nvmet_auth_challenge() return type is int and currently it uses status variable that is of type u16 in nvmet_execute_auth_receive(). Catch the return value of nvmet_auth_challenge() into int and set the NVME_SC_INTERNAL as status variable before we jump to error. Reported-by: Dan Carpenter Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/fabrics-cmd-auth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1040415c29f065e47b6b4df9f3902602d0382d3d Author: Chaitanya Kulkarni Date: Mon Jul 18 16:12:32 2022 -0700 nvmet-auth: fix return value check in auth send nvmet_setup_auth() return type is int and currently it uses status variable that is of type u16 in nvmet_execute_auth_send(). Catch the return value of nvmet_setup_auth() into int and set the NVME_SC_INTERNAL as status variable before we jump to error. Reported-by: Dan Carpenter Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/fabrics-cmd-auth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9db056e9506ccf74405941777ae128947b81900d Author: Colin Ian King Date: Fri Jul 15 14:24:13 2022 +0100 nvmet-auth: fix a couple of spelling mistakes There are a couple of spelling mistakes in pr_warn and pr_debug messages. Fix them. Signed-off-by: Colin Ian King Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/common/auth.c | 2 +- drivers/nvme/target/auth.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7b1aae1aee2225ec28eb17b9e5c5d5252922f67f Author: Christoph Hellwig Date: Mon Jul 18 07:02:29 2022 +0200 nvmet: fix a format specifier in nvmet_auth_ctrl_exponential dh_keysize is a size_t, use the proper format specifier for printing it. Reported-by: Guenter Roeck Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke Reviewed-by: Guenter Roeck Signed-off-by: Jens Axboe drivers/nvme/target/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee8cd008b7da0ee6f24167739e364f43b8a0875b Author: Christoph Hellwig Date: Mon Jul 18 07:00:12 2022 +0200 nvmet: don't check for NULL pointer before kfree in nvmet_host_release And add an empty line after the variable declaration. Reported-by: kernel test robot Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/nvme/target/configfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2fec1dfc28c993fe0ff8b72754e0b60a9338486e Author: Christoph Hellwig Date: Fri Jul 15 11:54:36 2022 +0200 nvme-apple: stop casting function pointer signatures Casting function pointers breaks control flow enforcement and is generally a horrible coding style. Add two wrappers to get rid of these casts. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Sven Peter Signed-off-by: Jens Axboe drivers/nvme/host/apple.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 2f7a7e5d85f646d8b0756bd5cd9855322bd805a7 Author: Christoph Hellwig Date: Thu Jul 21 08:23:19 2022 +0200 nvme-tcp: split nvme_tcp_alloc_tagset Split nvme_tcp_alloc_tagset into one helper for the admin tag_set and one for the I/O tag set. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/tcp.c | 82 ++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) commit a7f7b7116c1439412db65079b8284727a4a6569b Author: Christoph Hellwig Date: Thu Jul 21 08:19:02 2022 +0200 nvme-rdma: split nvme_rdma_alloc_tagset Split nvme_rdma_alloc_tagset into one helper for the admin tag_set and one for the I/O tag set. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 92 ++++++++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 46 deletions(-) commit 2455a4b77835c2c9d1c0310d50f69e6fbc1b173f Author: Christoph Hellwig Date: Thu Jul 21 08:13:23 2022 +0200 nvme-pci: split nvme_dev_add Split nvme_dev_add into a helper to actually allocate the tag set, and one that just update the number of queues. Add a local variable for the tag_set to clean up the code a bit. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 72 +++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 35 deletions(-) commit f91b727ccf1fabe6c02dc184bb8a156f895428c8 Author: Christoph Hellwig Date: Thu Jul 21 08:07:14 2022 +0200 nvme-pci: split nvme_alloc_admin_tags Split nvme_alloc_admin_tags into a helper to actually allocate the tag set, and one that just restarts the admin queue. Add a local variable for the tag_set to clean up the code a bit. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 60 +++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 29 deletions(-) commit 8614144002b58520be653c5645cabe707fb46b2a Author: Christoph Hellwig Date: Mon Jul 18 07:13:24 2022 +0200 nvme-pci: print the command name of aborted commands To allow for slightly better debugging, print the command name when aborting an command. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe drivers/nvme/host/constants.c | 1 + drivers/nvme/host/pci.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit 33b6debd6128f28e21b916d1ec551683fd16e088 Author: Liu Song Date: Sat Jul 16 19:49:41 2022 +0800 nvme-pci: remove useless assignment in nvme_pci_setup_prps If prp_list is NULL, nvme_unmap_sg will be performed, and the assignment to first_dma is meaningless, so remove it. Signed-off-by: Liu Song Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 1 - 1 file changed, 1 deletion(-) commit 80e2768496a494ce3166f8358d8665d2a056bcb7 Author: Dan Carpenter Date: Mon Jul 18 14:10:45 2022 +0300 nvme-auth: uninitialized variable in nvme_auth_transform_key() A couple of the early error gotos call kfree_sensitive(transformed_key); before "transformed_key" has been initialized. Fixes: db1312dd9548 ("nvmet: implement basic In-Band Authentication") Signed-off-by: Dan Carpenter Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/common/auth.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 4daf7fa07ee3c31d5b03b87f96dbf3d8151ef654 Author: Dan Carpenter Date: Mon Jul 18 14:09:32 2022 +0300 nvme-auth: fix off by one checks The > ARRAY_SIZE() checks need to be >= ARRAY_SIZE() to prevent reading one element beyond the end of the arrays. Fixes: db1312dd9548 ("nvmet: implement basic In-Band Authentication") Signed-off-by: Dan Carpenter Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/common/auth.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a25d4261582cf00dad884c194d21084836663d3d Author: Nick Bowler Date: Wed Jul 20 23:57:35 2022 -0400 nvme: define compat_ioctl again to unbreak 32-bit userspace. Commit 89b3d6e60550 ("nvme: simplify the compat ioctl handling") removed the initialization of compat_ioctl from the nvme block_device_operations structures. Presumably the expectation was that 32-bit ioctls would be directed through the regular handler but this is not the case: failing to assign .compat_ioctl actually means that the compat case is disabled entirely, and any attempt to submit nvme ioctls from 32-bit userspace fails outright with -ENOTTY. For example: % smartctl -x /dev/nvme0n1 [...] Read NVMe Identify Controller failed: NVME_IOCTL_ADMIN_CMD: Inappropriate ioctl for device The blkdev_compat_ptr_ioctl helper can be used to direct compat calls through the main ioctl handler and makes things work again. Fixes: 89b3d6e60550 ("nvme: simplify the compat ioctl handling") Signed-off-by: Nick Bowler Reviewed-by: Guixin Liu Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 1 + drivers/nvme/host/multipath.c | 1 + 2 files changed, 2 insertions(+) commit eb7e2d92588cc6351286de13e3b5d70ecc768888 Author: Christoph Hellwig Date: Mon Jul 18 07:07:26 2022 +0200 nvme: don't always build constants.o The entire content of constants.c if guarded by an ifdef, so switch to just building the file conditionally instead. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/Makefile | 3 ++- drivers/nvme/host/constants.c | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) commit 679c54f2de672b7d79d02f8c4ad483ff6dd8ce2e Author: Bean Huo Date: Fri Jul 15 23:27:21 2022 +0200 nvme: use command_id instead of req->tag in trace_nvme_complete_rq() Use command_id instead of req->tag in trace_nvme_complete_rq(), because of commit e7006de6c238 ("nvme: code command_id with a genctr for use authentication after release"), cmd->common.command_id is set to ((genctl & 0xf)< 12 | req->tag), no longer req->tag, which makes cid in trace_nvme_complete_rq and trace_nvme_setup_cmd are not the same. Fixes: e7006de6c238 ("nvme: code command_id with a genctr for use authentication after release") Signed-off-by: Bean Huo Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d17f744e883b2f8d13cca252d71cfe8ace346f7d Author: Mikulas Patocka Date: Tue Jul 26 04:33:12 2022 -0400 md-raid10: fix KASAN warning There's a KASAN warning in raid10_remove_disk when running the lvm test lvconvert-raid-reshape.sh. We fix this warning by verifying that the value "number" is valid. BUG: KASAN: slab-out-of-bounds in raid10_remove_disk+0x61/0x2a0 [raid10] Read of size 8 at addr ffff889108f3d300 by task mdX_raid10/124682 CPU: 3 PID: 124682 Comm: mdX_raid10 Not tainted 5.19.0-rc6 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014 Call Trace: dump_stack_lvl+0x34/0x44 print_report.cold+0x45/0x57a ? __lock_text_start+0x18/0x18 ? raid10_remove_disk+0x61/0x2a0 [raid10] kasan_report+0xa8/0xe0 ? raid10_remove_disk+0x61/0x2a0 [raid10] raid10_remove_disk+0x61/0x2a0 [raid10] Buffer I/O error on dev dm-76, logical block 15344, async page read ? __mutex_unlock_slowpath.constprop.0+0x1e0/0x1e0 remove_and_add_spares+0x367/0x8a0 [md_mod] ? super_written+0x1c0/0x1c0 [md_mod] ? mutex_trylock+0xac/0x120 ? _raw_spin_lock+0x72/0xc0 ? _raw_spin_lock_bh+0xc0/0xc0 md_check_recovery+0x848/0x960 [md_mod] raid10d+0xcf/0x3360 [raid10] ? sched_clock_cpu+0x185/0x1a0 ? rb_erase+0x4d4/0x620 ? var_wake_function+0xe0/0xe0 ? psi_group_change+0x411/0x500 ? preempt_count_sub+0xf/0xc0 ? _raw_spin_lock_irqsave+0x78/0xc0 ? __lock_text_start+0x18/0x18 ? raid10_sync_request+0x36c0/0x36c0 [raid10] ? preempt_count_sub+0xf/0xc0 ? _raw_spin_unlock_irqrestore+0x19/0x40 ? del_timer_sync+0xa9/0x100 ? try_to_del_timer_sync+0xc0/0xc0 ? _raw_spin_lock_irqsave+0x78/0xc0 ? __lock_text_start+0x18/0x18 ? _raw_spin_unlock_irq+0x11/0x24 ? __list_del_entry_valid+0x68/0xa0 ? finish_wait+0xa3/0x100 md_thread+0x161/0x260 [md_mod] ? unregister_md_personality+0xa0/0xa0 [md_mod] ? _raw_spin_lock_irqsave+0x78/0xc0 ? prepare_to_wait_event+0x2c0/0x2c0 ? unregister_md_personality+0xa0/0xa0 [md_mod] kthread+0x148/0x180 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x1f/0x30 Allocated by task 124495: kasan_save_stack+0x1e/0x40 __kasan_kmalloc+0x80/0xa0 setup_conf+0x140/0x5c0 [raid10] raid10_run+0x4cd/0x740 [raid10] md_run+0x6f9/0x1300 [md_mod] raid_ctr+0x2531/0x4ac0 [dm_raid] dm_table_add_target+0x2b0/0x620 [dm_mod] table_load+0x1c8/0x400 [dm_mod] ctl_ioctl+0x29e/0x560 [dm_mod] dm_compat_ctl_ioctl+0x7/0x20 [dm_mod] __do_compat_sys_ioctl+0xfa/0x160 do_syscall_64+0x90/0xc0 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Last potentially related work creation: kasan_save_stack+0x1e/0x40 __kasan_record_aux_stack+0x9e/0xc0 kvfree_call_rcu+0x84/0x480 timerfd_release+0x82/0x140 L __fput+0xfa/0x400 task_work_run+0x80/0xc0 exit_to_user_mode_prepare+0x155/0x160 syscall_exit_to_user_mode+0x12/0x40 do_syscall_64+0x42/0xc0 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Second to last potentially related work creation: kasan_save_stack+0x1e/0x40 __kasan_record_aux_stack+0x9e/0xc0 kvfree_call_rcu+0x84/0x480 timerfd_release+0x82/0x140 __fput+0xfa/0x400 task_work_run+0x80/0xc0 exit_to_user_mode_prepare+0x155/0x160 syscall_exit_to_user_mode+0x12/0x40 do_syscall_64+0x42/0xc0 entry_SYSCALL_64_after_hwframe+0x46/0xb0 The buggy address belongs to the object at ffff889108f3d200 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 0 bytes to the right of 256-byte region [ffff889108f3d200, ffff889108f3d300) The buggy address belongs to the physical page: page:000000007ef2a34c refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1108f3c head:000000007ef2a34c order:2 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=2) raw: 4000000000010200 0000000000000000 dead000000000001 ffff889100042b40 raw: 0000000000000000 0000000080200020 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff889108f3d200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff889108f3d280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff889108f3d300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff889108f3d380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff889108f3d400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid10.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e151db8ecfb019b7da31d076130a794574c89f6f Author: Mikulas Patocka Date: Sun Jul 24 14:26:12 2022 -0400 md-raid: destroy the bitmap after destroying the thread When we ran the lvm test "shell/integrity-blocksize-3.sh" on a kernel with kasan, we got failure in write_page. The reason for the failure is that md_bitmap_destroy is called before destroying the thread and the thread may be waiting in the function write_page for the bio to complete. When the thread finishes waiting, it executes "if (test_bit(BITMAP_WRITE_ERROR, &bitmap->flags))", which triggers the kasan warning. Note that the commit 48df498daf62 that caused this bug claims that it is neede for md-cluster, you should check md-cluster and possibly find another bugfix for it. BUG: KASAN: use-after-free in write_page+0x18d/0x680 [md_mod] Read of size 8 at addr ffff889162030c78 by task mdX_raid1/5539 CPU: 10 PID: 5539 Comm: mdX_raid1 Not tainted 5.19.0-rc2 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014 Call Trace: dump_stack_lvl+0x34/0x44 print_report.cold+0x45/0x57a ? __lock_text_start+0x18/0x18 ? write_page+0x18d/0x680 [md_mod] kasan_report+0xa8/0xe0 ? write_page+0x18d/0x680 [md_mod] kasan_check_range+0x13f/0x180 write_page+0x18d/0x680 [md_mod] ? super_sync+0x4d5/0x560 [dm_raid] ? md_bitmap_file_kick+0xa0/0xa0 [md_mod] ? rs_set_dev_and_array_sectors+0x2e0/0x2e0 [dm_raid] ? mutex_trylock+0x120/0x120 ? preempt_count_add+0x6b/0xc0 ? preempt_count_sub+0xf/0xc0 md_update_sb+0x707/0xe40 [md_mod] md_reap_sync_thread+0x1b2/0x4a0 [md_mod] md_check_recovery+0x533/0x960 [md_mod] raid1d+0xc8/0x2a20 [raid1] ? var_wake_function+0xe0/0xe0 ? psi_group_change+0x411/0x500 ? preempt_count_sub+0xf/0xc0 ? _raw_spin_lock_irqsave+0x78/0xc0 ? __lock_text_start+0x18/0x18 ? raid1_end_read_request+0x2a0/0x2a0 [raid1] ? preempt_count_sub+0xf/0xc0 ? _raw_spin_unlock_irqrestore+0x19/0x40 ? del_timer_sync+0xa9/0x100 ? try_to_del_timer_sync+0xc0/0xc0 ? _raw_spin_lock_irqsave+0x78/0xc0 ? __lock_text_start+0x18/0x18 ? __list_del_entry_valid+0x68/0xa0 ? finish_wait+0xa3/0x100 md_thread+0x161/0x260 [md_mod] ? unregister_md_personality+0xa0/0xa0 [md_mod] ? _raw_spin_lock_irqsave+0x78/0xc0 ? prepare_to_wait_event+0x2c0/0x2c0 ? unregister_md_personality+0xa0/0xa0 [md_mod] kthread+0x148/0x180 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x1f/0x30 Allocated by task 5522: kasan_save_stack+0x1e/0x40 __kasan_kmalloc+0x80/0xa0 md_bitmap_create+0xa8/0xe80 [md_mod] md_run+0x777/0x1300 [md_mod] raid_ctr+0x249c/0x4a30 [dm_raid] dm_table_add_target+0x2b0/0x620 [dm_mod] table_load+0x1c8/0x400 [dm_mod] ctl_ioctl+0x29e/0x560 [dm_mod] dm_compat_ctl_ioctl+0x7/0x20 [dm_mod] __do_compat_sys_ioctl+0xfa/0x160 do_syscall_64+0x90/0xc0 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Freed by task 5680: kasan_save_stack+0x1e/0x40 kasan_set_track+0x21/0x40 kasan_set_free_info+0x20/0x40 __kasan_slab_free+0xf7/0x140 kfree+0x80/0x240 md_bitmap_free+0x1c3/0x280 [md_mod] __md_stop+0x21/0x120 [md_mod] md_stop+0x9/0x40 [md_mod] raid_dtr+0x1b/0x40 [dm_raid] dm_table_destroy+0x98/0x1e0 [dm_mod] __dm_destroy+0x199/0x360 [dm_mod] dev_remove+0x10c/0x160 [dm_mod] ctl_ioctl+0x29e/0x560 [dm_mod] dm_compat_ctl_ioctl+0x7/0x20 [dm_mod] __do_compat_sys_ioctl+0xfa/0x160 do_syscall_64+0x90/0xc0 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Fixes: 48df498daf62 ("md: move bitmap_destroy to the beginning of __md_stop") Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34cb92c0a5a15b04e285c690b5a7dee77ddeeaf1 Author: Christoph Hellwig Date: Sat Jul 23 08:24:29 2022 +0200 md: return the allocated devices from md_alloc Two callers of md_alloc want to use the newly allocated devices, so return it instead of letting them find it cumbersomely after the allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-and-tested-by: Logan Gunthorpe Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md-autodetect.c | 22 ++++++------------- drivers/md/md.c | 54 +++++++++++++++++++--------------------------- drivers/md/md.h | 3 ++- 3 files changed, 30 insertions(+), 49 deletions(-) commit a110876828f5de63be657c62a33c8f61ececfb33 Author: Christoph Hellwig Date: Sat Jul 23 08:24:28 2022 +0200 md: open code md_probe in autorun_devices autorun_devices should not be limited to the controls for the legacy probe on open, so just call md_alloc directly. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-and-tested-by: Logan Gunthorpe Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0250d16b22e6c1cf074720b386280c03eebff87 Author: Yang Li Date: Fri Jul 22 08:27:55 2022 +0800 md: remove unneeded semicolon Eliminate the following coccicheck warning: ./drivers/md/md.c:8208:2-3: Unneeded semicolon Reported-by: Abaci Robot Signed-off-by: Yang Li Reported-by: kernel test robot Signed-off-by: Christoph Hellwig Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d13bc4d84a8e91060d3797fc95c1a0202bfd1499 Author: Christoph Hellwig Date: Thu Jul 21 08:41:02 2022 +0200 remove the sx8 block driver This driver is for fairly obscure hardware, and has only seen random drive-by changes after the maintainer stopped working on it in 2005 (about a year and a half after it was introduced). It has some "interesting" block layer interactions, so let's just drop it unless anyone complains. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220721064102.1715460-1-hch@lst.de [axboe: fix date typo, it was in 2005, not 2015] Signed-off-by: Jens Axboe drivers/block/Kconfig | 9 - drivers/block/Makefile | 2 - drivers/block/sx8.c | 1582 ------------------------------------------------ 3 files changed, 1593 deletions(-) commit 2198c51a08349eb176cb9789bef6f7243b8699f8 Author: Stephen Rothwell Date: Thu Jul 21 13:11:32 2022 +1000 md: fix build failure for !MODULE After merging the block tree, today's linux-next build (x86_64 allmodconfig) failed like this: drivers/md/md.c:717:22: error: 'mddev_find' defined but not used [-Werror=unused-function] 717 | static struct mddev *mddev_find(dev_t unit) | ^~~~~~~~~~ cc1: all warnings being treated as errors Caused by commit 4500d5c17910 ("md: simplify md_open") Make mddev_find() available only for non-modular builds. Signed-off-by: Stephen Rothwell Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220721131132.070be166@canb.auug.org.au Signed-off-by: Jens Axboe drivers/md/md.c | 2 ++ 1 file changed, 2 insertions(+) commit a20d636bee41ea67b382207bee216e70f7206752 Author: Jackie Liu Date: Thu Jul 7 17:08:34 2022 +0800 raid5: fix duplicate checks for rdev->saved_raid_disk 'first' will always be greater than or equal to 0, it is unnecessary to repeat the 0 check, clean it up. Signed-off-by: Jackie Liu Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5b26804bb0af5d4e4f3440b484244d478d60f16b Author: Christoph Hellwig Date: Tue Jul 19 11:18:24 2022 +0200 md: simplify md_open Now that devices are on the all_mddevs list until the gendisk is freed, there can't be any duplicates. Remove the global list lookup and just grab a reference. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Logan Gunthorpe Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) commit 12a6caf273240ae42842de8cc05feaa86e582d61 Author: Christoph Hellwig Date: Tue Jul 19 11:18:23 2022 +0200 md: only delete entries from all_mddevs when the disk is freed This ensures device names don't get prematurely reused. Instead add a deleted flag to skip already deleted devices in mddev_get and other places that only want to see live mddevs. Reported-by: Logan Gunthorpe Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Logan Gunthorpe Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 56 ++++++++++++++++++++++++++++++++++++++------------------ drivers/md/md.h | 2 ++ 2 files changed, 40 insertions(+), 18 deletions(-) commit 16648bac862fd9c6490a465533345fbeaa6466e0 Author: Christoph Hellwig Date: Tue Jul 19 11:18:22 2022 +0200 md: stop using for_each_mddev in md_exit Just do a simple list_for_each_entry_safe on all_mddevs, and only grab a reference when we drop the lock and delete the now unused for_each_mddev macro. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Reviewed-by: Hannes Reinecke Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) commit f26514342255855f4ca3c0a92cb1cdea01c33004 Author: Christoph Hellwig Date: Tue Jul 19 11:18:21 2022 +0200 md: stop using for_each_mddev in md_notify_reboot Just do a simple list_for_each_entry_safe on all_mddevs, and only grab a reference when we drop the lock. Reviewed-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Reviewed-by: Hannes Reinecke Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit b0e706a1ba84e50eaa714486e06e1d0027411658 Author: Christoph Hellwig Date: Tue Jul 19 11:18:20 2022 +0200 md: stop using for_each_mddev in md_do_sync Just do a plain list_for_each that only grabs a mddev reference in the case where the thread sleeps and restarts the list iteration. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Reviewed-by: Hannes Reinecke Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 2652a1bd2e749ace20339996015f3cf3fbfb8672 Author: Christoph Hellwig Date: Tue Jul 19 11:18:19 2022 +0200 md: factor out the rdev overlaps check from rdev_size_store This splits the code into nicely readable chunks and also avoids the refcount inc/dec manipulations. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Reviewed-by: Hannes Reinecke Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 84 +++++++++++++++++++++++++++------------------------------ 1 file changed, 39 insertions(+), 45 deletions(-) commit 33b614e33419b456bd870cacba1b56c897244f0b Author: Christoph Hellwig Date: Tue Jul 19 11:18:18 2022 +0200 md: rename md_free to md_kobj_release The md_free name is rather misleading, so pick a better one. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Reviewed-by: Hannes Reinecke Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e8c59ac41974438168c89e2c881119c53934f96c Author: Christoph Hellwig Date: Tue Jul 19 11:18:17 2022 +0200 md: implement ->free_disk Ensure that all private data is only freed once all accesses are done. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Reviewed-by: Hannes Reinecke Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit c57094a6e1ed5dd2d6401f79b8e6da34dd28f959 Author: Christoph Hellwig Date: Tue Jul 19 11:18:16 2022 +0200 md: fix error handling in md_alloc Error handling in md_alloc is a mess. Untangle it to just free the mddev directly before add_disk is called and thus the gendisk is globally visible. After that clear the hold flag and let the mddev_put take care of cleaning up the mddev through the usual mechanisms. Fixes: 5e55e2f5fc95 ("[PATCH] md: convert compile time warnings into runtime warnings") Fixes: 9be68dd7ac0e ("md: add error handling support for add_disk()") Fixes: 7ad1069166c0 ("md: properly unwind when failing to add the kobject in md_alloc") Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Reviewed-by: Hannes Reinecke Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 45 ++++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 13 deletions(-) commit ca39f7502425d437cbf83d29d99b43bd61342858 Author: Christoph Hellwig Date: Tue Jul 19 11:18:15 2022 +0200 md: fix mddev->kobj lifetime Once a kobject is initialized, the containing object should not be directly freed. So delay initialization until it is added. Also remove the kobject_del call as the last put will remove the kobject as well. The explicitly delete isn't needed here, and dropping it will simplify further fixes. With this md_free now does not need to check that ->gendisk is non-NULL as it is always set by the time that kobject_init is called on mddev->kobj. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Reviewed-by: Hannes Reinecke Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit ee1aa06ba3258686452dab2db2a458310a83d07a Author: Logan Gunthorpe Date: Thu Jul 7 13:15:33 2022 -0600 md/raid5: Convert prepare_to_wait() to wait_woken() api raid5_get_active_stripe() can sleep in various situations and it is called by make_stripe_request() while inside the prepare_to_wait()/finish_wait() section. Nested waits like this are not supported. This was noticed while making other changes that add different sleeps to raid5_get_active_stripe() that caused a WARNING with CONFIG_DEBUG_ATOMIC_SLEEP. No ill effects have been noticed with the code as is, but theoretically a nested and here could cause a dead lock so it should be fixed. To fix this, convert the prepare_to_wait() call to use wake_woken() which supports nested sleeps. Link: https://lwn.net/Articles/628628/ Signed-off-by: Logan Gunthorpe Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit b9f91d80dec9369294a8df4e4c8850a339a32576 Author: Logan Gunthorpe Date: Thu Jul 7 13:15:32 2022 -0600 md/raid5: Fix sectors_to_do bitmap overflow in raid5_make_request() For unaligned IO that have nearly maximum sectors, the number of stripes will end up being one greater than the size of the bitmap. When this happens, the last stripe in the IO will not be processed as it should be, resulting in data corruption. However, this is not normally seen when the backing block devices have 4K physical block sizes since the block layer will split the request before that happens. To fix this increase the bitmap size by one bit and ensure the full number of stripes are checked when calling find_first_bit(). Reported-by: David Sloan Fixes: 7e55c60acfbb ("md/raid5: Pivot raid5_make_request()") Signed-off-by: Logan Gunthorpe Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 640c46a21f89364f04445cdd43b61eb46bd49b5d Author: Coly Li Date: Tue Jul 19 12:27:24 2022 +0800 bcache: remove EXPERIMENTAL for Kconfig option 'Asynchronous device registration' The "Asynchronous device registration (EXPERIMENTAL)" Kconfig option is for 2+ years, it is used when registration takes too much time for massive amount of cached data, to avoid udev task timeout during boot time. Many users and products enable this Kconfig option for quite long time (e.g. SUSE Linux) and it works as expected and no issue reported. It is time to remove the "EXPERIMENTAL" tag from this Kconfig item. Signed-off-by: Coly Li Link: https://lore.kernel.org/r/20220719042724.8498-2-colyli@suse.de Signed-off-by: Jens Axboe drivers/md/bcache/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc9da6dd0630efd81b5c72ff6fa0169aa029a73f Author: Yu Kuai Date: Sat Jul 23 16:24:27 2022 +0800 nbd: add missing definition of pr_fmt commit 1243172d5894 ("nbd: use pr_err to output error message") tries to define pr_fmt and use short pr_err() to output error message, however, the definition is missed. This patch also remove existing "nbd:" inside pr_err(). Fixes: 1243172d5894 ("nbd: use pr_err to output error message") Signed-off-by: Yu Kuai Reviewed-by: Josef Bacik Link: https://lore.kernel.org/r/20220723082427.3890655-1-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe drivers/block/nbd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ee452a8d984f94fa8e894f003a52e776e4572881 Author: Dan Carpenter Date: Fri Jul 15 11:12:14 2022 +0300 null_blk: fix ida error handling in null_add_dev() There needs to be some error checking if ida_simple_get() fails. Also call ida_free() if there are errors later. Fixes: 94bc02e30fb8 ("nullb: use ida to manage index") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YtEhXsr6vJeoiYhd@kili Signed-off-by: Jens Axboe drivers/block/null_blk/main.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit c13cf14f44d23102f864a0d845439aa175631854 Author: Joel Granados Date: Tue Jun 28 21:10:15 2022 +0200 nvme-multipath: refactor nvme_mpath_add_disk Pass anagrpid as second argument. This is prep patch that allows reusing this function for supporting unknown command sets. Signed-off-by: Joel Granados Signed-off-by: Kanchan Joshi Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 +- drivers/nvme/host/multipath.c | 6 +++--- drivers/nvme/host/nvme.h | 5 ++--- 3 files changed, 6 insertions(+), 7 deletions(-) commit 0f89f0ece50ec12fcec70f22b3a6ea9fd2051688 Author: Guixin Liu Date: Fri Jul 8 11:06:05 2022 +0800 nvme-apple: use nvme core helper to cancel requests in tagset Use nvme core helper nvme_cancel_tagset and nvme_cancel_admin_tagset instead of same logic code. Signed-off-by: Guixin Liu Reviewed-by: Sagi Grimberg Reviewed-by: Ruozhu Li Reviewed-by: Sven Peter Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/apple.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 1fcfca78129325c067b1d26f8a1fa33ecc1052c8 Author: Guixin Liu Date: Fri Jul 8 11:04:37 2022 +0800 nvme-pci: use nvme core helper to cancel requests in tagset Use nvme core helper nvme_cancel_tagset and nvme_cancel_admin_tagset instead of same logic code. Signed-off-by: Guixin Liu Reviewed-by: Sagi Grimberg Reviewed-by: Ruozhu Li Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 53ee9e29377882f268a51b1aa8b06c80e7fce7a2 Author: Caleb Sander Date: Thu Jul 7 15:12:45 2022 -0600 nvme-tcp: use in-capsule data for I/O connect Currently, command data is only sent in-capsule on the for admin or I/O commands on queues that indicate support for it. Send fabrics command data in-capsule for I/O queues as well to avoid needing a separate H2CData PDU for the connect command. This is optimization. Without this change, we send the connect command capsule and data in separate PDUs (CapsuleCmd and H2CData), and must wait for the controller to respond with an R2T PDU before sending the H2CData. With the change, we send a single CapsuleCmd PDU that includes the data. This reduces the number of bytes (and likely packets) sent across the network, and simplifies the send state machine handling in the driver. Signed-off-by: Caleb Sander Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/tcp.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 0525af711b6676156fdffc1072c49ff1d1d5bc0f Author: Israel Rukshin Date: Sun May 15 18:04:40 2022 +0300 nvme-rdma: remove timeout for getting RDMA-CM established event In case many controllers start error recovery at the same time (i.e., when port is down and up), they may never succeed to reconnect again. This is because the target can't handle all the connect requests at three seconds (the arbitrary value set today). Even if some of the connections are established, when a single queue fails to connect, all the controller's queues are destroyed as well. So, on the following reconnection attempts the number of connect requests may remain the same. To fix this, remove the timeout and wait for RDMA-CM event to abort/complete the connect request. RDMA-CM sends unreachable event when a timeout of ~90 seconds is expired. This approach is used at other RDMA-CM users like SRP and iSER at blocking mode. The commit also renames NVME_RDMA_CONNECT_TIMEOUT_MS to NVME_RDMA_CM_TIMEOUT_MS. Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Acked-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 7012eef520cb7cb12910fb799dfd4ad0ed256b77 Author: Vincent Fu Date: Fri Jul 8 17:49:49 2022 +0000 null_blk: add configfs variables for 2 options Allow setting via configfs these two options: no_sched shared_tag_bitmap Previously these could only be activated as module parameters. Still missing are: shared_tags timeout requeue init_hctx Signed-off-by: Vincent Fu Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220708174943.87787-3-vincent.fu@samsung.com [axboe: fold in nullb == NULL fix] Signed-off-by: Jens Axboe drivers/block/null_blk/main.c | 67 ++++++++++++++++++++++++++++----------- drivers/block/null_blk/null_blk.h | 2 ++ 2 files changed, 50 insertions(+), 19 deletions(-) commit 058efe000b31ce9c63bca02a33b67780b0ef5b41 Author: Vincent Fu Date: Fri Jul 8 17:49:49 2022 +0000 null_blk: add module parameters for 4 options Add as module parameters these options: memory_backed discard mbps cache_size Previously these could only be set via configfs. Still missing is bad_blocks. The kernel test robot found a documentation formatting issue in v1 of this patch. Reported-by: kernel test robot Signed-off-by: Vincent Fu Link: https://lore.kernel.org/r/20220708174943.87787-2-vincent.fu@samsung.com Signed-off-by: Jens Axboe Documentation/block/null_blk.rst | 22 ++++++++++++++++++++++ drivers/block/null_blk/main.c | 20 ++++++++++++++++++++ 2 files changed, 42 insertions(+) commit ce11bdf946176d48c2c0d36b56f0bf368c177298 Author: Md Haris Iqbal Date: Thu Jul 7 16:31:22 2022 +0200 block/rnbd-srv: Replace sess_dev_list with index_idr The structure rnbd_srv_session maintains a list and an xarray of rnbd_srv_dev. There is no need to keep both as one of them can serve the purpose. Since one of the places where the lookup of rnbd_srv_dev using rnbd_srv_session is IO path, an xarray would serve us better than a list traversal. Hence remove sess_dev_list from rnbd_srv_session, and replace its uses from xarray. Signed-off-by: Md Haris Iqbal Reviewed-by: Aleksei Marov Signed-off-by: Jack Wang Link: https://lore.kernel.org/r/20220707143122.460362-3-haris.iqbal@ionos.com Signed-off-by: Jens Axboe drivers/block/rnbd/rnbd-srv.c | 17 +++++++---------- drivers/block/rnbd/rnbd-srv.h | 4 ---- 2 files changed, 7 insertions(+), 14 deletions(-) commit 4bc14f3101364877dd59085f39e068a2a7ec9f2d Author: Md Haris Iqbal Date: Thu Jul 7 16:31:21 2022 +0200 block/rnbd-srv: Set keep_id to true after mutex_trylock After setting keep_id if the mutex trylock fails, the keep_id stays set for the rest of the sess_dev lifetime. Therefore, set keep_id to true after mutex_trylock succeeds, so that a failure of trylock does'nt touch keep_id. Fixes: b168e1d85cf3 ("block/rnbd-srv: Prevent a deadlock generated by accessing sysfs in parallel") Cc: gi-oh.kim@ionos.com Signed-off-by: Md Haris Iqbal Signed-off-by: Jack Wang Link: https://lore.kernel.org/r/20220707143122.460362-2-haris.iqbal@ionos.com Signed-off-by: Jens Axboe drivers/block/rnbd/rnbd-srv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1a70200f404ae210b4f0334e3936e84f8edb6bc8 Author: Hannes Reinecke Date: Mon Jun 27 11:52:07 2022 +0200 nvmet-auth: expire authentication sessions Each authentication step is required to be completed within the KATO interval (or two minutes if not set). So add a workqueue function to reset the transaction ID and the expected next protocol step; this will automatically the next authentication command referring to the terminated authentication. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/auth.c | 1 + drivers/nvme/target/fabrics-cmd-auth.c | 20 +++++++++++++++++++- drivers/nvme/target/nvmet.h | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) commit 7a277c37d3522e9b2777d762bbbcecafae2b1f8d Author: Hannes Reinecke Date: Mon Jun 27 11:52:06 2022 +0200 nvmet-auth: Diffie-Hellman key exchange support Implement Diffie-Hellman key exchange using FFDHE groups for NVMe In-Band Authentication. This patch adds a new host configfs attribute 'dhchap_dhgroup' to select the FFDHE group to use. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/Kconfig | 2 + drivers/nvme/target/auth.c | 157 +++++++++++++++++++++++++++++++++ drivers/nvme/target/configfs.c | 31 +++++++ drivers/nvme/target/fabrics-cmd-auth.c | 41 +++++++-- drivers/nvme/target/nvmet.h | 9 ++ 5 files changed, 232 insertions(+), 8 deletions(-) commit db1312dd95488b5e6ff362ff66fcf953a46b1821 Author: Hannes Reinecke Date: Mon Jun 27 11:52:05 2022 +0200 nvmet: implement basic In-Band Authentication Implement NVMe-oF In-Band authentication according to NVMe TPAR 8006. This patch adds three additional configfs entries 'dhchap_key', 'dhchap_ctrl_key', and 'dhchap_hash' to the 'host' configfs directory. The 'dhchap_key' and 'dhchap_ctrl_key' entries need to be in the ASCII format as specified in NVMe Base Specification v2.0 section 8.13.5.8 'Secret representation'. 'dhchap_hash' defaults to 'hmac(sha256)', and can be written to to switch to a different HMAC algorithm. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/Kconfig | 13 + drivers/nvme/target/Makefile | 1 + drivers/nvme/target/admin-cmd.c | 2 + drivers/nvme/target/auth.c | 367 ++++++++++++++++++++++++ drivers/nvme/target/configfs.c | 107 ++++++- drivers/nvme/target/core.c | 11 + drivers/nvme/target/fabrics-cmd-auth.c | 502 +++++++++++++++++++++++++++++++++ drivers/nvme/target/fabrics-cmd.c | 38 ++- drivers/nvme/target/nvmet.h | 62 ++++ 9 files changed, 1100 insertions(+), 3 deletions(-) commit 6490c9ed06de4a97a1ba89f53cd6c045d5277bc4 Author: Hannes Reinecke Date: Mon Jun 27 11:52:04 2022 +0200 nvmet: parse fabrics commands on io queues Some fabrics commands can be sent via io queues, so add a new function nvmet_parse_fabrics_io_cmd() and rename the existing nvmet_parse_fabrics_cmd() to nvmet_parse_fabrics_admin_cmd(). Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/admin-cmd.c | 2 +- drivers/nvme/target/core.c | 4 ++++ drivers/nvme/target/fabrics-cmd.c | 17 ++++++++++++++++- drivers/nvme/target/nvmet.h | 3 ++- 4 files changed, 23 insertions(+), 3 deletions(-) commit b61775d185a395f26fecdc7898e39de677a6c3dd Author: Hannes Reinecke Date: Mon Jun 27 11:52:03 2022 +0200 nvme-auth: Diffie-Hellman key exchange support Implement Diffie-Hellman key exchange using FFDHE groups for NVMe In-Band Authentication. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/common/auth.c | 153 ++++++++++++++++++++++++++++++++++ drivers/nvme/host/Kconfig | 2 + drivers/nvme/host/auth.c | 201 +++++++++++++++++++++++++++++++++++++++++++-- include/linux/nvme-auth.h | 8 ++ 4 files changed, 358 insertions(+), 6 deletions(-) commit f50fff73d620cd6e8f48bc58d4f1c944615a3fea Author: Hannes Reinecke Date: Mon Jun 27 11:52:02 2022 +0200 nvme: implement In-Band authentication Implement NVMe-oF In-Band authentication according to NVMe TPAR 8006. This patch adds two new fabric options 'dhchap_secret' to specify the pre-shared key (in ASCII respresentation according to NVMe 2.0 section 8.13.5.8 'Secret representation') and 'dhchap_ctrl_secret' to specify the pre-shared controller key for bi-directional authentication of both the host and the controller. Re-authentication can be triggered by writing the PSK into the new controller sysfs attribute 'dhchap_secret' or 'dhchap_ctrl_secret'. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig [axboe: fold in clang build fix] Signed-off-by: Jens Axboe drivers/nvme/Kconfig | 1 + drivers/nvme/Makefile | 1 + drivers/nvme/common/Kconfig | 4 + drivers/nvme/common/Makefile | 7 + drivers/nvme/common/auth.c | 323 +++++++++++++++++ drivers/nvme/host/Kconfig | 13 + drivers/nvme/host/Makefile | 1 + drivers/nvme/host/auth.c | 828 +++++++++++++++++++++++++++++++++++++++++++ drivers/nvme/host/core.c | 143 +++++++- drivers/nvme/host/fabrics.c | 80 ++++- drivers/nvme/host/fabrics.h | 7 + drivers/nvme/host/nvme.h | 30 ++ drivers/nvme/host/rdma.c | 1 + drivers/nvme/host/tcp.c | 1 + drivers/nvme/host/trace.c | 32 ++ include/linux/nvme-auth.h | 33 ++ 16 files changed, 1498 insertions(+), 7 deletions(-) commit 3bf2fde6fcc49ccc899cd2a853888823662ccd4c Author: Hannes Reinecke Date: Mon Jun 27 11:52:01 2022 +0200 nvme-fabrics: decode 'authentication required' connect error The 'connect' command might fail with NVME_SC_AUTH_REQUIRED, so we should be decoding this error, too. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Himanshu Madhani Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/fabrics.c | 4 ++++ 1 file changed, 4 insertions(+) commit 88b140fec07307f825170a45562013a80842cc93 Author: Hannes Reinecke Date: Mon Jun 27 11:52:00 2022 +0200 nvme: add definitions for NVMe In-Band authentication Add new definitions for NVMe In-band authentication as defined in the NVMe Base Specification v2.0. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Himanshu Madhani Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe include/linux/nvme.h | 209 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 208 insertions(+), 1 deletion(-) commit a116e1cdc64a743c36c40e6fa639dec991c157a3 Author: Hannes Reinecke Date: Mon Jun 27 11:51:59 2022 +0200 lib/base64: RFC4648-compliant base64 encoding Add RFC4648-compliant base64 encoding and decoding routines, based on the base64url encoding in fs/crypto/fname.c. Signed-off-by: Hannes Reinecke Reviewed-by: Himanshu Madhani Reviewed-by: Sagi Grimberg Cc: Eric Biggers Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe include/linux/base64.h | 16 ++++++++ lib/Makefile | 2 +- lib/base64.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+), 1 deletion(-) commit 9e2f284e149124aa9a6b963882d2b39ae1742196 Author: Hannes Reinecke Date: Mon Jun 27 11:51:58 2022 +0200 crypto: add crypto_has_kpp() Add helper function to determine if a given key-agreement protocol primitive is supported. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Himanshu Madhani Acked-by: Herbert Xu Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe crypto/kpp.c | 6 ++++++ include/crypto/kpp.h | 2 ++ 2 files changed, 8 insertions(+) commit 85cc424381804386d991f81e08b4933ca1f04214 Author: Hannes Reinecke Date: Mon Jun 27 11:51:57 2022 +0200 crypto: add crypto_has_shash() Add helper function to determine if a given synchronous hash is supported. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Himanshu Madhani Acked-by: Herbert Xu Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe crypto/shash.c | 6 ++++++ include/crypto/hash.h | 2 ++ 2 files changed, 8 insertions(+) commit e41f8c0222e30aadc58b84fcb33472a1505018f3 Author: Sagi Grimberg Date: Sun Jun 26 17:06:00 2022 +0300 nvme-loop: use nvme core helpers to cancel all requests in a tagset A helper now exist, no need to open-code the same functionality. Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/loop.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit b10907b8159f6524a7393339fe5671951e00eced Author: Chaitanya Kulkarni Date: Mon Jun 6 18:16:43 2022 -0700 nvme: fix qid param blk_mq_alloc_request_hctx Only caller of the __nvme_submit_sync_cmd() with qid value not equal to NVME_QID_ANY is nvmf_connect_io_queues(), where qid value is alway set to > 0. [1] __nvme_submit_sync_cmd() callers with qid parameter from :- Caller | qid parameter ------------------------------------------------------ * nvme_fc_connect_io_queues() | nvmf_connect_io_queue() | qid > 0 * nvme_rdma_start_io_queues() | nvme_rdma_start_queue() | nvmf_connect_io_queues() | qid > 0 * nvme_tcp_start_io_queues() | nvme_tcp_start_queue() | nvmf_connect_io_queues() | qid > 0 * nvme_loop_connect_io_queues() | nvmf_connect_io_queues() | qid > 0 When qid value of the function parameter __nvme_submit_sync_cmd() is > 0 from above callers, we use blk_mq_alloc_request_hctx(), where we pass last parameter as 0 if qid functional parameter value is set to 0 with conditional operators, see 1002 :- 991 int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd, 992 union nvme_result *result, void *buffer, unsigned bufflen, 993 int qid, int at_head, blk_mq_req_flags_t flags) 994 { 995 struct request *req; 996 int ret; 997 998 if (qid == NVME_QID_ANY) 999 req = blk_mq_alloc_request(q, nvme_req_op(cmd), flags); 1000 else 1001 req = blk_mq_alloc_request_hctx(q, nvme_req_op(cmd), flags, 1002 qid ? qid - 1 : 0); 1003 But qid function parameter value of the __nvme_submit_sync_cmd() will never be 0 from above caller list see [1], and all the other callers of __nvme_submit_sync_cmd() use NVME_QID_ANY as qid value :- 1. nvme_submit_sync_cmd() 2. nvme_features() 3. nvme_sec_submit() 4. nvmf_reg_read32() 5. nvmf_reg_read64() 6. nvmf_ref_write32() 7. nvmf_connect_admin_queue() Remove the conditional operator to pass the qid as 0 in the call to blk_mq_alloc_requst_hctx(). Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b46fa024a452fdbf2dc797d30b35598d934ba33 Author: Chaitanya Kulkarni Date: Mon Jun 6 18:16:42 2022 -0700 nvme: remove unused timeout parameter The function __nvme_submit_sync_cmd() has following list of callers that sets the timeout value to 0 :- Callers | Timeout value ------------------------------------------------ nvme_submit_sync_cmd() | 0 nvme_features() | 0 nvme_sec_submit() | 0 nvmf_reg_read32() | 0 nvmf_reg_read64() | 0 nvmf_reg_write32() | 0 nvmf_connect_admin_queue() | 0 nvmf_connect_io_queue() | 0 Remove the timeout function parameter from __nvme_submit_sync_cmd() and adjust the rest of code accordingly. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 12 ++++-------- drivers/nvme/host/fabrics.c | 10 +++++----- drivers/nvme/host/nvme.h | 2 +- 3 files changed, 10 insertions(+), 14 deletions(-) commit 2c61c97fb12b806e1c8eb15f04c277ad097ec95e Author: Michael Kelley Date: Wed Jun 8 11:52:21 2022 -0700 nvme: handle the persistent internal error AER In the NVM Express Revision 1.4 spec, Figure 145 describes possible values for an AER with event type "Error" (value 000b). For a Persistent Internal Error (value 03h), the host should perform a controller reset. Add support for this error using code that already exists for doing a controller reset. As part of this support, introduce two utility functions for parsing the AER type and subtype. This new support was tested in a lab environment where we can generate the persistent internal error on demand, and observe both the Linux side and NVMe controller side to see that the controller reset has been done. Signed-off-by: Michael Kelley Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 31 +++++++++++++++++++++++++++++-- include/linux/nvme.h | 4 ++++ 2 files changed, 33 insertions(+), 2 deletions(-) commit b7df575f8aac538878c1b2b3099f6d594626dfe8 Author: Xiang wangx Date: Sat Jun 4 22:32:54 2022 +0800 nvme: remove a double word in a comment Delete the redundant word 'be'. Signed-off-by: Xiang wangx Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/nvme.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e507210a06282a0ebaa84e8c9b4d8ad597b24a8b Author: Guoqing Jiang Date: Wed Jul 6 21:31:52 2022 +0800 rnbd-clt: make rnbd_clt_change_capacity return void No need to checking the return value, make it return void. Acked-by: Jack Wang Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20220706133152.12058-9-guoqing.jiang@linux.dev Signed-off-by: Jens Axboe drivers/block/rnbd/rnbd-clt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit ae2dfd1d8d253d7c11bbe624f0ac997db5143147 Author: Guoqing Jiang Date: Wed Jul 6 21:31:51 2022 +0800 rnbd-clt: pass sector_t type for resize capacity Let's change the parameter type to 'sector_t' then we don't need to cast it from rnbd_clt_resize_dev_store, and update rnbd_clt_resize_disk too. Acked-by: Jack Wang Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20220706133152.12058-8-guoqing.jiang@linux.dev Signed-off-by: Jens Axboe drivers/block/rnbd/rnbd-clt-sysfs.c | 2 +- drivers/block/rnbd/rnbd-clt.c | 6 +++--- drivers/block/rnbd/rnbd-clt.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit fb516fa367a3554f3b71a0b37a52716cc358ea65 Author: Guoqing Jiang Date: Wed Jul 6 21:31:50 2022 +0800 rnbd-clt: check capacity inside rnbd_clt_change_capacity Currently, process_msg_open_rsp checks if capacity changed or not before call rnbd_clt_change_capacity while the checking also make sense for rnbd_clt_resize_dev_store, let's move the checking into the function. Acked-by: Jack Wang Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20220706133152.12058-7-guoqing.jiang@linux.dev Signed-off-by: Jens Axboe drivers/block/rnbd/rnbd-clt.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 59f070de125f568fb7ba47b6555b4013e30f28fd Author: Guoqing Jiang Date: Wed Jul 6 21:31:49 2022 +0800 rnbd-clt: adjust the layout of struct rnbd_clt_dev While at it, let re-arrange the struct to remove holes. Before, pahole reports /* size: 232, cachelines: 4, members: 17 */ /* sum members: 224, holes: 2, sum holes: 8 */ /* last cacheline: 40 bytes */ After the change, the report changes to /* size: 224, cachelines: 4, members: 17 */ /* last cacheline: 32 bytes */ Acked-by: Jack Wang Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20220706133152.12058-6-guoqing.jiang@linux.dev Signed-off-by: Jens Axboe drivers/block/rnbd/rnbd-clt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dfc270c908e81f586c1165acbd9bc5c6d18c3fc0 Author: Guoqing Jiang Date: Wed Jul 6 21:31:48 2022 +0800 rnbd-clt: reduce the size of struct rnbd_clt_dev Previously, both map and remap trigger rnbd_clt_set_dev_attr to set some members in rnbd_clt_dev such as wc, fua and logical_block_size etc, but those members are only useful for map scenario given the setup_request_queue is only called from the path: rnbd_clt_map_device -> rnbd_client_setup_device Since rnbd_clt_map_device frees rsp after rnbd_client_setup_device, we can pass rsp to rnbd_client_setup_device and it's callees, which means queue's attributes can be set directly from relevant members of rsp instead from rnbd_clt_dev. After that, we can kill 11 members from rnbd_clt_dev, and we don't need rnbd_clt_set_dev_attr either. Acked-by: Jack Wang Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20220706133152.12058-5-guoqing.jiang@linux.dev Signed-off-by: Jens Axboe drivers/block/rnbd/rnbd-clt.c | 118 ++++++++++++++++++++---------------------- drivers/block/rnbd/rnbd-clt.h | 11 ---- 2 files changed, 55 insertions(+), 74 deletions(-) commit 017d76f45e81bd1b741e16c5fed6baeb80460dff Author: Guoqing Jiang Date: Wed Jul 6 21:31:47 2022 +0800 rnbd-clt: kill read_only from struct rnbd_clt_dev The member is not needed since we can call get_disk_ro to achieve the same goal. Acked-by: Jack Wang Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20220706133152.12058-4-guoqing.jiang@linux.dev Signed-off-by: Jens Axboe drivers/block/rnbd/rnbd-clt.c | 8 ++------ drivers/block/rnbd/rnbd-clt.h | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) commit 52334f4a573d8a91ebe1581bac5fa8027df59221 Author: Guoqing Jiang Date: Wed Jul 6 21:31:46 2022 +0800 rnbd-clt: don't free rsp in msg_open_conf for map scenario For map scenario, rsp is freed in two places: 1. msg_open_conf frees rsp if rtrs_clt_request returns 0. 2. Otherwise, rsp is freed by the call sites of rtrs_clt_request. Now, We'd like to control full lifecycle of rsp in rnbd_clt_map_device, with that, it is feasible to pass rsp to rnbd_client_setup_device in next commit. For 1, it is possible to free rsp from the caller of send_usr_msg because of the synchronization of iu->comp.wait. And we put iu later in rnbd_clt_map_device to ensure order of release rsp and iu. Acked-by: Jack Wang Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20220706133152.12058-3-guoqing.jiang@linux.dev Signed-off-by: Jens Axboe drivers/block/rnbd/rnbd-clt.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 9ddae3bab6d7bc769c7ca94ba010f33bc3f1aa8c Author: Guoqing Jiang Date: Wed Jul 6 21:31:45 2022 +0800 rnbd-clt: open code send_msg_open in rnbd_clt_map_device Let's open code it in rnbd_clt_map_device, then we can use information from rsp to setup gendisk and request_queue in next commits. After that, we can remove some members (wc, fua and max_hw_sectors etc) from struct rnbd_clt_dev. Acked-by: Jack Wang Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20220706133152.12058-2-guoqing.jiang@linux.dev Signed-off-by: Jens Axboe drivers/block/rnbd/rnbd-clt.c | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) commit eb25ad80364bc4351ad3f96ecbe9805e8af2d8c0 Author: Christophe JAILLET Date: Sun Jul 3 18:05:43 2022 +0200 block: null_blk: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/7c4d3116ba843fc4a8ae557dd6176352a6cd0985.1656864320.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jens Axboe drivers/block/null_blk/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 9e26728b5fa9c6ffdb3f5612279bd3b2f7ea8c3c Author: Zhang Jiaming Date: Sat Jul 2 09:54:11 2022 +0800 md: Fix spelling mistake in comments There are 2 spelling mistakes in comments. Fix it. Signed-off-by: Zhang Jiaming Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md-cluster.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9ad1a74ff0090fb201ee87ebb00b38c8bf25b26c Author: Logan Gunthorpe Date: Thu Jun 16 13:19:45 2022 -0600 md/raid5: Increase restriction on max segments per request The block layer defaults the maximum segments to 128, which means requests tend to get split around the 512KB depending on how many pages can be merged. There's no such restriction in the raid5 code so increase the limit to USHRT_MAX so that larger requests can be sent as one. Signed-off-by: Logan Gunthorpe Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 3 +++ 1 file changed, 3 insertions(+) commit df1b620a3e13b682f624c2cbf73e88d825d6d386 Author: Logan Gunthorpe Date: Thu Jun 16 13:19:44 2022 -0600 md/raid5: Improve debug prints Add a debug print for raid5_make_request() so that each request is printed and add the logical sector number to the debug print in __add_stripe_bio(). Signed-off-by: Logan Gunthorpe Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 7e55c60acfbb81b8f3f323e67c2ff32bbcc84215 Author: Logan Gunthorpe Date: Thu Jun 16 13:19:43 2022 -0600 md/raid5: Pivot raid5_make_request() raid5_make_request() loops through every page in the request, finds the appropriate stripe and adds the bio for that page in the disk. This causes a great deal of contention on the hash_lock and extra work seeing each stripe must be found once for every data disk. The number of times a stripe must be found can be reduced by pivoting raid5_make_request() so that it loops through every stripe and then loops through every disk in that stripe to see if the bio must be added. This reduces the number of times the hash lock must be taken by a factor equal to the number of data disks. To accomplish this, the logical sectors that have already been added must be tracked. Tracking them is done with a bitmap: the bits for all pages are set at the start of the request and each bit is cleared once the bio is added to a stripe. Finding the next sector to be done is then just a call to find_first_bit() so that sectors that have been done can simply be skipped. One minor downside is that the maximum sectors for a request must be limited so that the bitmap can be appropriately sized on the stack. This limit is arbitrarily chosen to be 256 stripe pages which works out to 1MB if PAGE_SIZE == DEFAULT_STRIPE_SIZE. This doesn't actually restrict the maximum request further seeing the default block queue settings are used which restricts the number of segments to 128 (which results in request sizes that are approximately 512KB). Signed-off-by: Logan Gunthorpe Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 83 insertions(+), 6 deletions(-) commit 486f605586075a42ff2bbc35fb0376215b2fb908 Author: Logan Gunthorpe Date: Thu Jun 16 13:19:42 2022 -0600 md/raid5: Check all disks in a stripe_head for reshape progress When testing if a previous stripe has had reshape expand past it, use the earliest or latest logical sector in all the disks for that stripe head. This will allow adding multiple disks at a time in a subesquent patch. To do this cleaner, refactor the check into a helper function called stripe_ahead_of_reshape(). Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 53 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 14 deletions(-) commit 4ad1d9849ffa8738b5e9b3f8bda5f17d3b31dfcd Author: Logan Gunthorpe Date: Thu Jun 16 13:19:41 2022 -0600 md/raid5: Refactor add_stripe_bio() Factor out two helper functions from add_stripe_bio(): one to check for overlap (stripe_bio_overlaps()), and one to actually add the bio to the stripe (__add_stripe_bio()). The latter function will always succeed. This will be useful in the next patch so that overlap can be checked for multiple disks before adding any Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 86 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 56 insertions(+), 30 deletions(-) commit 3312e6c887fe7539f0adb5756ab9020282aaa3d4 Author: Logan Gunthorpe Date: Thu Jun 16 13:19:40 2022 -0600 md/raid5: Keep a reference to last stripe_head for batch When batching, every stripe head has to find the previous stripe head to add to the batch list. This involves taking the hash lock which is highly contended during IO. Instead of finding the previous stripe_head each time, store a reference to the previous stripe_head in a pointer so that it doesn't require taking the contended lock another time. The reference to the previous stripe must be released before scheduling and waiting for work to get done. Otherwise, it can hold up raid5_activate_delayed() and deadlock. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Acked-by: Guoqing Jiang Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 52 ++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 12 deletions(-) commit 0a2d1694de6095dadbc99a6eb803ebab381de09e Author: Logan Gunthorpe Date: Thu Jun 16 13:19:39 2022 -0600 md/raid5: Refactor for loop in raid5_make_request() into while loop The for loop with retry label can be more cleanly expressed as a while loop by moving the logical_sector increment into the success path. No functional changes intended. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 4f35456076e1b63630f38879efb7db623906e1e8 Author: Logan Gunthorpe Date: Thu Jun 16 13:19:38 2022 -0600 md/raid5: Move read_seqcount_begin() into make_stripe_request() Now that prepare_to_wait() isn't in the way, move read_sequcount_begin() into make_stripe_request(). No functional changes intended. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Reviewed-by: Guoqing Jiang Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 1cdb5b417092614851a17e14eefc42e0ed7ebd1b Author: Logan Gunthorpe Date: Thu Jun 16 13:19:37 2022 -0600 md/raid5: Drop the do_prepare flag in raid5_make_request() prepare_to_wait() can be reasonably called after schedule instead of setting a flag and preparing in the next loop iteration. This means that prepare_to_wait() will be called before read_seqcount_begin(), but there shouldn't be any reason that the order matters here. On the first iteration of the loop prepare_to_wait() is already called first. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Reviewed-by: Guoqing Jiang Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f4aec6a0973879cb25bfecc2e918c519e3dfff04 Author: Logan Gunthorpe Date: Thu Jun 16 13:19:36 2022 -0600 md/raid5: Factor out helper from raid5_make_request() loop Factor out the inner loop of raid5_make_request() into it's own helper called make_stripe_request(). The helper returns a number of statuses: SUCCESS, RETRY, SCHEDULE_AND_RETRY and FAIL. This makes the code a bit easier to understand and allows the SCHEDULE_AND_RETRY path to be made common. A context structure is added to contain do_flush. It will be used more in subsequent patches for state that needs to be kept outside the loop. No functional changes intended. This will be cleaned up further in subsequent patches to untangle the gen_lock and do_prepare logic further. Signed-off-by: Logan Gunthorpe Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 231 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 133 insertions(+), 98 deletions(-) commit 1baa1126e0f6d366187f740144947b6cf619b4f2 Author: Logan Gunthorpe Date: Thu Jun 16 13:19:35 2022 -0600 md/raid5: Move common stripe get code into new find_get_stripe() helper Both uses of find_stripe() require a fairly complicated dance to increment the reference count. Move this into a common find_get_stripe() helper. No functional changes intended. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Acked-by: Guoqing Jiang Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 131 ++++++++++++++++++++++++++--------------------------- 1 file changed, 64 insertions(+), 67 deletions(-) commit 8757fef675d8c34f8b2e2d8322385d5a6b403210 Author: Logan Gunthorpe Date: Thu Jun 16 13:19:34 2022 -0600 md/raid5: Move stripe_add_to_batch_list() call out of add_stripe_bio() stripe_add_to_batch_list() is better done in the loop in make_request instead of inside add_stripe_bio(). This is clearer and allows for storing the batch_head state outside the loop in a subsequent patch. The call to add_stripe_bio() in retry_aligned_read() is for read and batching only applies to write. So it's impossible for batching to happen at that call site. No functional changes intended. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Reviewed-by: Guoqing Jiang Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 27fb701046c39879411ff064fb2c9ca8d02d89df Author: Logan Gunthorpe Date: Thu Jun 16 13:19:33 2022 -0600 md/raid5: Refactor raid5_make_request loop Break immediately if raid5_get_active_stripe() returns NULL and deindent the rest of the loop. Annotate this check with an unlikely(). This makes the code easier to read and reduces the indentation level. No functional changes intended. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Reviewed-by: Guoqing Jiang Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 109 +++++++++++++++++++++++++++-------------------------- 1 file changed, 55 insertions(+), 54 deletions(-) commit a8bb304ca5b8c833d4874b322a6ef993bec98780 Author: Logan Gunthorpe Date: Thu Jun 16 13:19:32 2022 -0600 md/raid5: Factor out ahead_of_reshape() function There are a few uses of an ugly ternary operator in raid5_make_request() to check if a sector is a head of a reshape sector. Factor this out into a simple helper called ahead_of_reshape(). No functional changes intended. Suggested-by: Christoph Hellwig Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 6e3f50d30af847bebce072182bd735e90a294c6a Author: Logan Gunthorpe Date: Thu Jun 16 13:19:31 2022 -0600 md/raid5: Make logic blocking check consistent with logic that blocks The check in raid5_make_request differs very slightly from the logic that causes it to block lower down. This likely does not cause a bug as the check is fuzzy anyway (as reshape may move on between the first check and the subsequent check). However, make it consistent so it can be cleaned up in a subsequent patch. The condition which causes the schedule is: !(mddev->reshape_backwards ? logical_sector < conf->reshape_progress : logical_sector >= conf->reshape_progress) && (mddev->reshape_backwards ? logical_sector < conf->reshape_safe : logical_sector >= conf->reshape_safe) The condition that causes the early bailout is made to match this. Signed-off-by: Logan Gunthorpe Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9dfbdafda3b34e262e43e786077bab8e476a89d1 Author: Guoqing Jiang Date: Tue Jun 21 11:11:29 2022 +0800 md: unlock mddev before reap sync_thread in action_store Since the bug which commit 8b48ec23cc51a ("md: don't unregister sync_thread with reconfig_mutex held") fixed is related with action_store path, other callers which reap sync_thread didn't need to be changed. Let's pull md_unregister_thread from md_reap_sync_thread, then fix previous bug with belows. 1. unlock mddev before md_reap_sync_thread in action_store. 2. save reshape_position before unlock, then restore it to ensure position not changed accidentally by others. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/dm-raid.c | 1 + drivers/md/md.c | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) commit 05ce7fb946c37fc6fc8bf14073279e570f78f69e Author: Chris Webb Date: Wed Jun 1 12:03:07 2022 +0100 md: Explicitly create command-line configured devices Boot-time assembly of arrays with md= command-line arguments breaks when CONFIG_BLOCK_LEGACY_AUTOLOAD is unset. md_setup_drive() in md-autodetect.c calls blkdev_get_by_dev(), assuming this implicitly creates the block device. Fix this by attempting to md_alloc() the array first. As in the probe path, ignore any error as failure is caught by blkdev_get_by_dev() anyway. Signed-off-by: Chris Webb Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md-autodetect.c | 1 + drivers/md/md.c | 2 +- drivers/md/md.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 9973f0fa7d20269fe6fefe6333997fb5914449c1 Author: Logan Gunthorpe Date: Wed Jun 8 10:27:56 2022 -0600 md: Notify sysfs sync_completed in md_reap_sync_thread() The mdadm test 07layouts randomly produces a kernel hung task deadlock. The deadlock is caused by the suspend_lo/suspend_hi files being set by the mdadm background process during reshape and not being cleared because the process hangs. (Leaving aside the issue of the fragility of freezing kernel tasks by buggy userspace processes...) When the background mdadm process hangs it, is waiting (without a timeout) on a change to the sync_completed file signalling that the reshape has completed. The process is woken up a couple times when the reshape finishes but it is woken up before MD_RECOVERY_RUNNING is cleared so sync_completed_show() reports 0 instead of "none". To fix this, notify the sysfs file in md_reap_sync_thread() after MD_RECOVERY_RUNNING has been cleared. This wakes up mdadm and causes it to continue and write to suspend_lo/suspend_hi to allow IO to continue. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 1 + 1 file changed, 1 insertion(+) commit b368856aab02c8fcaabb809aad401b2cf96504f2 Author: Logan Gunthorpe Date: Wed Jun 8 10:27:55 2022 -0600 md: Ensure resync is reported after it starts The 07layouts test in mdadm fails on some systems. The failure presents itself as the backup file not being removed before the next layout is grown into: mdadm: /dev/md0: cannot create backup file /tmp/md-test-backup: File exists This is because the background mdadm process, which is responsible for cleaning up this backup file gets into an infinite loop waiting for the reshape to start. mdadm checks the mdstat file if a reshape is going and, if it is not, it waits for an event on the file or times out in 5 seconds. On faster machines, the reshape may complete before the 5 seconds times out, and thus the background mdadm process loops waiting for a reshape to start that has already occurred. mdadm reads the mdstat file to start, but mdstat does not report that the reshape has begun, even though it has indeed begun. So the mdstat_wait() call (in mdadm) which polls on the mdstat file won't ever return until timing out. The reason mdstat reports the reshape has started is due to an issue in status_resync(). recovery_active is subtracted from curr_resync which will result in a value of zero for the first chunk of reshaped data, and the resulting read will report no reshape in progress. To fix this, if "resync - recovery_active" is an overloaded value, force the value to be MD_RESYNC_ACTIVE so the code reports a resync in progress. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit eac58d08d4937d2eab8f71c663d98d0759845bde Author: Logan Gunthorpe Date: Wed Jun 8 10:27:54 2022 -0600 md: Use enum for overloaded magic numbers used by mddev->curr_resync Comments in the code document special values used for mddev->curr_resync. Make this clearer by using an enum to label these values. The only functional change is a couple places use the wrong comparison operator that implied 3 is another special value. They are all fixed to imply that 3 or greater is an active resync. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 40 ++++++++++++++++++---------------------- drivers/md/md.h | 15 +++++++++++++++ 2 files changed, 33 insertions(+), 22 deletions(-) commit 6f28c5c3128c79f628da2aee2f8128aaa3b91f22 Author: Logan Gunthorpe Date: Wed Jun 8 10:27:53 2022 -0600 md/raid5-cache: Annotate pslot with __rcu notation radix_tree_lookup_slot() and radix_tree_replace_slot() API expect the slot returned and looked up to be marked with __rcu. Otherwise sparse warnings are generated: drivers/md/raid5-cache.c:2939:23: warning: incorrect type in assignment (different address spaces) drivers/md/raid5-cache.c:2939:23: expected void **pslot drivers/md/raid5-cache.c:2939:23: got void [noderef] __rcu ** Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5-cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b13015af94cf405f73ff64ce0797269554020c37 Author: Logan Gunthorpe Date: Wed Jun 8 10:27:52 2022 -0600 md/raid5-cache: Clear conf->log after finishing work A NULL pointer dereferlence on conf->log is seen randomly with the mdadm test 21raid5cache. Kasan reporst: BUG: KASAN: null-ptr-deref in r5l_reclaimable_space+0xf5/0x140 Read of size 8 at addr 0000000000000860 by task md0_reclaim/3086 Call Trace: dump_stack_lvl+0x5a/0x74 kasan_report.cold+0x5f/0x1a9 __asan_load8+0x69/0x90 r5l_reclaimable_space+0xf5/0x140 r5l_do_reclaim+0xf4/0x5e0 r5l_reclaim_thread+0x69/0x3b0 md_thread+0x1a2/0x2c0 kthread+0x177/0x1b0 ret_from_fork+0x22/0x30 This is caused by conf->log being cleared in r5l_exit_log() before stopping the reclaim thread. To fix this, clear conf->log after the reclaim_thread is unregistered and after flushing disable_writeback_work. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5-cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7769085c8d4d7aad4e68f2f4f2077bd46449511f Author: Logan Gunthorpe Date: Wed Jun 8 10:27:51 2022 -0600 md/raid5-cache: Drop RCU usage of conf->log The only place that uses RCU to access conf->log is in r5l_log_disk_error(). This function is mostly used in the IO path and once with mddev_lock() held in raid5_change_consistency_policy(). It is known that the IO will be suspended before the log is freed and r5l_log_exit() is called with the mddev_lock() held. This should mean that conf->log can not be freed while the function is being called, so the RCU protection is not necessary. Drop the rcu_read_lock() as well as the synchronize_rcu() and rcu_assign_pointer() usage. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5-cache.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 78ede6a06f011b47d3c2c9dd5699b05bc3bf2dae Author: Logan Gunthorpe Date: Wed Jun 8 10:27:50 2022 -0600 md/raid5-cache: Take mddev_lock in r5c_journal_mode_show() The mddev->lock spinlock doesn't protect against the removal of conf->log in r5l_exit_log() so conf->log may be freed before it is used. To fix this, take the mddev_lock() insteaad of the mddev->lock spinlock. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5-cache.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit c629f345b436997e4483aff85ec93f32faf6e4e6 Author: Logan Gunthorpe Date: Wed Jun 8 10:27:49 2022 -0600 md/raid5: suspend the array for calls to log_exit() The raid5-cache code relies on there being no IO in flight when log_exit() is called. There are two places where this is not guaranteed so add mddev_suspend() and mddev_resume() calls to these sites. The site in raid5_change_consistency_policy() is in the error path, and another similar call site already has suspend/resume calls just below it; so it should be equally safe to make that change here. There is one remaining site in raid5_remove_disk() that we call log_exit() without suspending the array. Unfortunately, as the comment stated, we cannot call mddev_suspend from raid5d. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e0fccdafc21fb3d47644518f29329d9c130925d5 Author: Logan Gunthorpe Date: Wed Jun 8 10:27:48 2022 -0600 md/raid5-ppl: Drop unused argument from ppl_handle_flush_request() ppl_handle_flush_request() takes an struct r5log argument but doesn't use it. It has no buisiness taking this argument as it is only used by raid5-cache and has no way to derference it anyway. Remove the argument. No functional changes intended. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5-log.h | 4 ++-- drivers/md/raid5-ppl.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit ed0c6a5fbed17baa5e6a004e021e679207a4a033 Author: Logan Gunthorpe Date: Wed Jun 8 10:27:47 2022 -0600 md/raid5-log: Drop extern decorators for function prototypes extern is not necessary and recommended against when defining prototype functions in headers. checkpatch.pl complains about these. So remove them. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5-log.h | 75 ++++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 39 deletions(-) commit d9544d25e239aadd3ba7f4057574bc70a1dcdf60 Author: Song Liu Date: Wed Jun 1 16:12:37 2022 -0700 MAINTAINERS: add patchwork link to linux-raid project Add link to patchwork: https://patchwork.kernel.org/project/linux-raid/list/ Signed-off-by: Song Liu Signed-off-by: Jens Axboe MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 6675700139a0f642097c1166b2f958b2e5439c57 Author: Lars Ellenberg Date: Wed Jun 22 22:49:32 2022 +0200 drbd: bm_page_async_io: fix spurious bitmap "IO error" on large volumes We usually do all our bitmap IO in units of PAGE_SIZE. With very small or oddly sized external meta data, or with PAGE_SIZE != 4k, it can happen that our last on-disk bitmap page is not fully PAGE_SIZE aligned, so we may need to adjust the size of the IO. We used to do that with min_t(unsigned int, PAGE_SIZE, last_allowed_sector - current_offset); And for just the right diff, (unsigned int)(diff) will result in 0. A bio of length 0 will correctly be rejected with an IO error (and some scary WARN_ON_ONCE()) by the scsi layer. Do the calculation properly. Signed-off-by: Lars Ellenberg Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20220622204932.196830-1-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe drivers/block/drbd/drbd_bitmap.c | 49 ++++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 7 deletions(-) commit b3b2bec9646eb1d3f43c85f6d0d2211d6f8af42b Author: Andrew Lunn Date: Sun Jul 31 22:49:06 2022 +0200 ata: sata_mv: Fixes expected number of resources now IRQs are gone The commit a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core") stopped IRQ resources being available as platform resources. This broke the sanity check for the expected number of resources in the Marvell SATA driver which expected two resources, the IO memory and the interrupt. Change the sanity check to only expect the IO memory. Cc: Lad Prabhakar Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core") Cc: Signed-off-by: Andrew Lunn Signed-off-by: Damien Le Moal drivers/ata/sata_mv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f8861945562c507248fd000fde70d9af4d225d2 Author: Jason Wang Date: Mon Jul 25 04:11:31 2022 +0800 libceph: fix ceph_pagelist_reserve() comment typo The double `without' is duplicated in the comment, remove one. Signed-off-by: Jason Wang Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov net/ceph/pagelist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c460f4e4bba2d3f8dc0b5bfa8995d6e8d2d527a1 Author: Xiubo Li Date: Tue Jul 5 10:40:23 2022 +0800 ceph: remove useless check for the folio The netfs_write_begin() won't set the folio if the return value is non-zero. Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 7cb9994754f8a36ae9e5ec4597c5c4c2d6c03832 Author: Hu Weiwen Date: Fri Jul 1 10:52:27 2022 +0800 ceph: don't truncate file in atomic_open Clear O_TRUNC from the flags sent in the MDS create request. `atomic_open' is called before permission check. We should not do any modification to the file here. The caller will do the truncation afterward. Fixes: 124e68e74099 ("ceph: file operations") Signed-off-by: Hu Weiwen Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov fs/ceph/file.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 0c04a117d77b258febb1a69da7c0cb651d4a38cc Author: Xiubo Li Date: Fri Jun 24 16:43:49 2022 +0800 ceph: make f_bsize always equal to f_frsize The f_frsize maybe changed in the quota size is less than the defualt 4MB. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/super.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit e027ddb6d3cce80945ab86358929460f91f5cf4f Author: Xiubo Li Date: Thu Jun 23 17:17:21 2022 +0800 ceph: flush the dirty caps immediatelly when quota is approaching When the quota is approaching we need to notify it to the MDS as soon as possible, or the client could write to the directory more than expected. This will flush the dirty caps without delaying after each write, though this couldn't prevent the real size of a directory exceed the quota but could prevent it as soon as possible. Link: https://tracker.ceph.com/issues/56180 Signed-off-by: Xiubo Li Reviewed-by: Luís Henriques Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 5 +++-- fs/ceph/file.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit 842d6b019b180f5b78d71aa445ee3c724e34d462 Author: Daichi Mukai Date: Tue Jun 14 13:22:36 2022 +0200 libceph: print fsid and epoch with osd id Print fsid and epoch in libceph log messages to distinct from which each message come. [ idryomov: don't bother with gid for now, print epoch instead ] Signed-off-by: Satoru Takeuchi Signed-off-by: Daichi Mukai Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov net/ceph/osdmap.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) commit fc54cb8d876ae7b2d1bd0cf8a4d0b96a76318a91 Author: Li Qiong Date: Tue Jun 14 15:10:59 2022 +0800 libceph: check pointer before assigned to "c->rules[]" It should be better to check pointer firstly, then assign it to c->rules[]. Refine code a little bit. Signed-off-by: Li Qiong Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov net/ceph/osdmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4849077604f0126514d487836e7d87c3e53a753c Author: Xiubo Li Date: Tue Jun 7 10:13:53 2022 +0800 ceph: don't get the inline data for new creating files If the 'i_inline_version' is 1, that means the file is just new created and there shouldn't have any inline data in it, we should skip retrieving the inline data from MDS. This also could help reduce possiblity of dead lock issue introduce by the inline data and Fcr caps. Gradually we will remove the inline feature from kclient after ceph's scrub too have support to unline the inline data, currently this could help reduce the teuthology test failures. This is possiblly could also fix a bug that for some old clients if they couldn't explictly uninline the inline data when writing, the inline version will keep as 1 always. We may always reading non-exist data from inline data. Signed-off-by: Xiubo Li Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 5 ++--- fs/ceph/caps.c | 2 +- fs/ceph/file.c | 5 ++--- fs/ceph/inode.c | 5 +++-- fs/ceph/super.h | 8 ++++++++ 5 files changed, 16 insertions(+), 9 deletions(-) commit 0006164589ecc755cd6bbc46e466e32be20fe285 Author: Xiubo Li Date: Fri Jun 10 09:53:21 2022 +0800 ceph: update the auth cap when the async create req is forwarded For async create we will always try to choose the auth MDS of frag the dentry belonged to of the parent directory to send the request and ususally this works fine, but if the MDS migrated the directory to another MDS before it could be handled the request will be forwarded. And then the auth cap will be changed. We need to update the auth cap in this case before the request is forwarded. Link: https://tracker.ceph.com/issues/55857 Signed-off-by: Xiubo Li Signed-off-by: Ilya Dryomov fs/ceph/file.c | 14 +++++++++++++ fs/ceph/mds_client.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/ceph/super.h | 2 ++ 3 files changed, 74 insertions(+) commit e19feff96380e7a98ed55446ae08c3c52ce6a994 Author: Xiubo Li Date: Fri Jun 10 10:12:49 2022 +0800 ceph: make change_auth_cap_ses a global symbol Signed-off-by: Xiubo Li Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 4 ++-- fs/ceph/super.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit b53aca4b460ae2ece453963ef01667ee8ee78f52 Author: Xiubo Li Date: Thu Jun 9 15:21:37 2022 +0800 ceph: fix incorrect old_size length in ceph_mds_request_args The 'old_size' is a __le64 type since birth, not sure why the kclient incorrectly switched it to __le32. This change is okay won't break anything because union will always allocate more memory than the 'open' member needed. Rename 'file_replication' to 'pool' as ceph did. Though this 'open' struct may never be used in kclient in future, it's confusing when going through the ceph code. Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov include/linux/ceph/ceph_fs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 020bc44a9fbf6946f42db503d11c9811f26dd9fd Author: Jeff Layton Date: Fri Jun 10 11:40:13 2022 -0400 ceph: switch back to testing for NULL folio->private in ceph_dirty_folio Willy requested that we change this back to warning on folio->private being non-NULl. He's trying to kill off the PG_private flag, and so we'd like to catch where it's non-NULL. Add a VM_WARN_ON_FOLIO (since it doesn't exist yet) and change over to using that instead of VM_BUG_ON_FOLIO along with testing the ->private pointer. [ xiubli: define VM_WARN_ON_FOLIO macro in case DEBUG_VM is disabled reported by kernel test robot ] Cc: Matthew Wilcox Signed-off-by: Jeff Layton Signed-off-by: Xiubo Li Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 2 +- include/linux/mmdebug.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit 7467b04418d929c64cbaf75fc8d54db73e2b64df Author: Jeff Layton Date: Tue Jun 7 13:06:14 2022 -0400 ceph: call netfs_subreq_terminated with was_async == false "was_async" is a bit misleadingly named. It's supposed to indicate whether it's safe to call blocking operations from the context you're calling it from, but it sounds like it's asking whether this was done via async operation. For ceph, this it's always called from kernel thread context so it should be safe to set this to false. Cc: David Howells Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e82145033547dac360bf20e960cf9adefc50b72d Author: Jeff Layton Date: Tue Jun 7 11:05:49 2022 -0400 ceph: convert to generic_file_llseek There's no reason we need to lock the inode for write in order to handle an llseek. I suspect this should have been dropped in 2013 when we stopped doing vmtruncate in llseek. With that gone, ceph_llseek is functionally equivalent to generic_file_llseek, so just call that after getting the size. Signed-off-by: Jeff Layton Reviewed-by: Luís Henriques Signed-off-by: Ilya Dryomov fs/ceph/file.c | 52 +++++----------------------------------------------- 1 file changed, 5 insertions(+), 47 deletions(-) commit 1b7587d69ea7b8c350195392bfd30a0f31374ae4 Author: Xiubo Li Date: Mon Jun 6 20:15:33 2022 +0800 ceph: fix the incorrect comment for the ceph_mds_caps struct The incorrect comment is misleading. Acutally the last members in ceph_mds_caps strcut is a union for none export and export bodies. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov include/linux/ceph/ceph_fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58dd4385577ed7969b80cdc9e2a31575aba6c712 Author: Jeff Layton Date: Fri Jun 3 16:39:57 2022 -0400 ceph: don't leak snap_rwsem in handle_cap_grant When handle_cap_grant is called on an IMPORT op, then the snap_rwsem is held and the function is expected to release it before returning. It currently fails to do that in all cases which could lead to a deadlock. Fixes: 6f05b30ea063 ("ceph: reset i_requested_max_size if file write is not wanted") Link: https://tracker.ceph.com/issues/55857 Signed-off-by: Jeff Layton Reviewed-by: Luís Henriques Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit d93231a6bc8a452323d5fef16cca7107ce483a27 Author: Luís Henriques Date: Fri Jun 3 14:29:09 2022 +0100 ceph: prevent a client from exceeding the MDS maximum xattr size The MDS tries to enforce a limit on the total key/values in extended attributes. However, this limit is enforced only if doing a synchronous operation (MDS_OP_SETXATTR) -- if we're buffering the xattrs, the MDS doesn't have a chance to enforce these limits. This patch adds support for decoding the xattrs maximum size setting that is distributed in the mdsmap. Then, when setting an xattr, the kernel client will revert to do a synchronous operation if that maximum size is exceeded. While there, fix a dout() that would trigger a printk warning: [ 98.718078] ------------[ cut here ]------------ [ 98.719012] precision 65536 too large [ 98.719039] WARNING: CPU: 1 PID: 3755 at lib/vsprintf.c:2703 vsnprintf+0x5e3/0x600 ... Link: https://tracker.ceph.com/issues/55725 Signed-off-by: Luís Henriques Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov fs/ceph/mdsmap.c | 22 ++++++++++++++++++---- fs/ceph/xattr.c | 12 ++++++++---- include/linux/ceph/mdsmap.h | 1 + 3 files changed, 27 insertions(+), 8 deletions(-) commit 8266c4d7a7469c3fd45ee2b4ebc01aac311c6c48 Author: Xiubo Li Date: Fri May 27 12:39:17 2022 +0800 ceph: choose auth MDS for getxattr with the Xs caps And for the 'Xs' caps for getxattr we will also choose the auth MDS, because the MDS side code is buggy due to setxattr won't notify the replica MDSes when the values changed and the replica MDS will return the old values. Though we will fix it in MDS code, but this still makes sense for old ceph. Link: https://tracker.ceph.com/issues/55331 Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 300e42a2e79e2270a00dbf9e4ddd4b101dd75a03 Author: Xiubo Li Date: Thu May 26 13:21:31 2022 +0800 ceph: add session already open notify support If the connection was accidently closed due to the socket issue or something else the clients will try to open the opened sessions, the MDSes will send the session open reply one more time if the clients support the notify feature. When the clients retry to open the sessions the s_seq will be 0 as default, we need to update it anyway. Link: https://tracker.ceph.com/issues/53911 Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 25 ++++++++++++++++++++----- fs/ceph/mds_client.h | 5 ++++- 2 files changed, 24 insertions(+), 6 deletions(-) commit 4868e537fa867f82e38e37429d61d7bb8357d79b Author: Xiubo Li Date: Tue May 10 09:47:01 2022 +0800 ceph: wait for the first reply of inflight async unlink In async unlink case the kclient won't wait for the first reply from MDS and just drop all the links and unhash the dentry and then succeeds immediately. For any new create/link/rename,etc requests followed by using the same file names we must wait for the first reply of the inflight unlink request, or the MDS possibly will fail these following requests with -EEXIST if the inflight async unlink request was delayed for some reasons. And the worst case is that for the none async openc request it will successfully open the file if the CDentry hasn't been unlinked yet, but later the previous delayed async unlink request will remove the CDenty. That means the just created file is possiblly deleted later by accident. We need to wait for the inflight async unlink requests to finish when creating new files/directories by using the same file names. Link: https://tracker.ceph.com/issues/55332 Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/dir.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++------ fs/ceph/file.c | 6 +++- fs/ceph/mds_client.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++- fs/ceph/mds_client.h | 1 + fs/ceph/super.c | 3 ++ fs/ceph/super.h | 19 +++++++++---- 6 files changed, 167 insertions(+), 16 deletions(-) commit 4f48d5da81ee7004a789c8aac2d0dfb2514c37f1 Author: Xiubo Li Date: Mon May 16 11:23:19 2022 +0800 fs/dcache: export d_same_name() helper Compare dentry name with case-exact name, return true if names are same, or false. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Reviewed-by: Luis Chamberlain Signed-off-by: Ilya Dryomov fs/dcache.c | 15 +++++++++++---- include/linux/dcache.h | 2 ++ 2 files changed, 13 insertions(+), 4 deletions(-) commit 7c2e3d9194f78770fdfd688d0eecfe7132f83138 Author: Xiubo Li Date: Thu May 26 14:07:21 2022 +0800 ceph: remove useless CEPHFS_FEATURES_CLIENT_REQUIRED This macro was added but never be used. And check the ceph code there has another CEPHFS_FEATURES_MDS_REQUIRED but always be empty. We should clean up all this related code, which make no sense but introducing confusion. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Reviewed-by: Luís Henriques Signed-off-by: Ilya Dryomov fs/ceph/mds_client.h | 1 - 1 file changed, 1 deletion(-) commit fea013e020e6ecc7be75bea0d61697b7e916b44d Author: Luís Henriques Date: Tue May 24 17:06:27 2022 +0100 ceph: use correct index when encoding client supported features Feature bits have to be encoded into the correct locations. This hasn't been an issue so far because the only hole in the feature bits was in bit 10 (CEPHFS_FEATURE_RECLAIM_CLIENT), which is located in the 2nd byte. When adding more bits that go beyond the this 2nd byte, the bug will show up. [xiubli: remove incorrect comment for CEPHFS_FEATURES_CLIENT_SUPPORTED] Fixes: 9ba1e224538a ("ceph: allocate the correct amount of extra bytes for the session features") Signed-off-by: Luís Henriques Reviewed-by: Jeff Layton Signed-off-by: Xiubo Li Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 7 +++++-- fs/ceph/mds_client.h | 6 ------ 2 files changed, 5 insertions(+), 8 deletions(-) commit 637fa738b590ec0e3414931d1e07c4f195eb5215 Author: Jeff Layton Date: Tue Sep 1 12:56:42 2020 -0400 fscrypt: add fscrypt_context_for_new_inode Most filesystems just call fscrypt_set_context on new inodes, which usually causes a setxattr. That's a bit late for ceph, which can send along a full set of attributes with the create request. Doing so allows it to avoid race windows that where the new inode could be seen by other clients without the crypto context attached. It also avoids the separate round trip to the server. Refactor the fscrypt code a bit to allow us to create a new crypto context, attach it to the inode, and write it to the buffer, but without calling set_context on it. ceph can later use this to marshal the context into the attributes we send along with the create request. Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Acked-by: Eric Biggers Signed-off-by: Ilya Dryomov fs/crypto/policy.c | 35 +++++++++++++++++++++++++++++------ include/linux/fscrypt.h | 1 + 2 files changed, 30 insertions(+), 6 deletions(-) commit d3e94fdc4ef476ca1edd468cc11badf2dbbb3c00 Author: Jeff Layton Date: Fri Jan 8 15:34:38 2021 -0500 fscrypt: export fscrypt_fname_encrypt and fscrypt_fname_encrypted_size For ceph, we want to use our own scheme for handling filenames that are are longer than NAME_MAX after encryption and Base64 encoding. This allows us to have a consistent view of the encrypted filenames for clients that don't support fscrypt and clients that do but that don't have the key. Currently, fs/crypto only supports encrypting filenames using fscrypt_setup_filename, but that also handles encoding nokey names. Ceph can't use that because it handles nokey names in a different way. Export fscrypt_fname_encrypt. Rename fscrypt_fname_encrypted_size to __fscrypt_fname_encrypted_size and add a new wrapper called fscrypt_fname_encrypted_size that takes an inode argument rather than a pointer to a fscrypt_policy union. Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Acked-by: Eric Biggers Signed-off-by: Ilya Dryomov fs/crypto/fname.c | 36 ++++++++++++++++++++++++++++++------ fs/crypto/fscrypt_private.h | 9 +++------ fs/crypto/hooks.c | 6 +++--- include/linux/fscrypt.h | 4 ++++ 4 files changed, 40 insertions(+), 15 deletions(-) commit 18cc912b8a2acaf32589241fbac47192ab90db14 Author: Jeff Layton Date: Thu Mar 31 16:29:00 2022 -0400 fs: change test in inode_insert5 for adding to the sb list inode_insert5 currently looks at I_CREATING to decide whether to insert the inode into the sb list. This test is a bit ambiguous, as I_CREATING state is not directly related to that list. This test is also problematic for some upcoming ceph changes to add fscrypt support. We need to be able to allocate an inode using new_inode and insert it into the hash later iff we end up using it, and doing that now means that we double add it and corrupt the list. What we really want to know in this test is whether the inode is already in its superblock list, and then add it if it isn't. Have it test for list_empty instead and ensure that we always initialize the list by doing it in inode_init_once. It's only ever removed from the list with list_del_init, so that should be sufficient. Suggested-by: Al Viro Signed-off-by: Jeff Layton Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Ilya Dryomov fs/inode.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 569bede0cff5e98c0f862d486406b79dcada8eea Merge: 043402495deb 8da572c52a9b Author: Linus Torvalds Date: Tue Aug 2 15:24:36 2022 -0700 Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt Pull fsverity update from Eric Biggers: "Just a small documentation update to mention the btrfs support" * tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: fs-verity: mention btrfs support commit 043402495deb5ccc3b3479dc69a03f990c41ea8d Merge: 87fe1adb66a5 88b61b130334 Author: Linus Torvalds Date: Tue Aug 2 15:21:18 2022 -0700 Merge tag 'integrity-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull integrity updates from Mimi Zohar: "Aside from the one EVM cleanup patch, all the other changes are kexec related. On different architectures different keyrings are used to verify the kexec'ed kernel image signature. Here are a number of preparatory cleanup patches and the patches themselves for making the keyrings - builtin_trusted_keyring, .machine, .secondary_trusted_keyring, and .platform - consistent across the different architectures" * tag 'integrity-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: kexec, KEYS, s390: Make use of built-in and secondary keyring for signature verification arm64: kexec_file: use more system keyrings to verify kernel image signature kexec, KEYS: make the code in bzImage64_verify_sig generic kexec: clean up arch_kexec_kernel_verify_sig kexec: drop weak attribute from functions kexec_file: drop weak attribute from functions evm: Use IS_ENABLED to initialize .enabled commit 87fe1adb66a514fa3abbe8bdb4278a5b2f421d8b Merge: ea7099d5229c 64b634830c91 Author: Linus Torvalds Date: Tue Aug 2 15:12:13 2022 -0700 Merge tag 'safesetid-6.0' of https://github.com/micah-morton/linux Pull SafeSetID updates from Micah Morton: "This contains one commit that touches common kernel code, one that adds functionality internal to the SafeSetID LSM code, and a few other commits that only modify the SafeSetID LSM selftest. The commit that touches common kernel code simply adds an LSM hook in the setgroups() syscall that mirrors what is done for the existing LSM hooks in the setuid() and setgid() syscalls. This commit combined with the SafeSetID-specific one allow the LSM to filter setgroups() calls according to configured rule sets in the same way that is already done for setuid() and setgid()" * tag 'safesetid-6.0' of https://github.com/micah-morton/linux: LSM: SafeSetID: add setgroups() testing to selftest LSM: SafeSetID: Add setgroups() security policy handling security: Add LSM hook to setgroups() syscall LSM: SafeSetID: add GID testing to selftest LSM: SafeSetID: selftest cleanup and prepare for GIDs LSM: SafeSetID: fix userns bug in selftest commit ea7099d5229c0fe9f9302b03a246e15e78b87011 Merge: 1b6cf909647e aa16fb4b9e7e Author: Linus Torvalds Date: Tue Aug 2 15:05:10 2022 -0700 Merge tag 'Smack-for-6.0' of https://github.com/cschaufler/smack-next Pull msack updates from Casey Schaufler: "Two minor code clean-ups for Smack. One removes a touch of dead code and the other replaces an instance of kzalloc + strncpy with kstrndup" * tag 'Smack-for-6.0' of https://github.com/cschaufler/smack-next: smack: Remove the redundant lsm_inode_alloc smack: Replace kzalloc + strncpy with kstrndup commit 1b6cf909647e64617958e6799c6e5bae413c7d0e Merge: f42e1e3e40da ed56f4b5173e Author: Linus Torvalds Date: Tue Aug 2 14:58:58 2022 -0700 Merge tag 'lsm-pr-20220801' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm Pull LSM update from Paul Moore: "A maintainer change for the LSM layer: James has asked me to take over the day-to-day responsibilities so a single patch to update the MAINTAINER info" * tag 'lsm-pr-20220801' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: MAINTAINERS: update the LSM maintainer info commit f42e1e3e40da02924e29987c5b721c0932d9b380 Merge: 79802ada87fa 546093206ba1 Author: Linus Torvalds Date: Tue Aug 2 14:56:25 2022 -0700 Merge tag 'audit-pr-20220801' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit updates from Paul Moore: "Two minor audit patches: on marks a function as static, the other removes a redundant length check" * tag 'audit-pr-20220801' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: make is_audit_feature_set() static audit: remove redundant data_len check commit 79802ada87faeb28cfa2bd36e17591e7b8c6ba72 Merge: 6991a564f597 ef54ccb61616 Author: Linus Torvalds Date: Tue Aug 2 14:51:47 2022 -0700 Merge tag 'selinux-pr-20220801' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux updates from Paul Moore: "A relatively small set of patches for SELinux this time, eight patches in total with really only one significant change. The highlights are: - Add support for proper labeling of memfd_secret anonymous inodes. This will allow LSMs that implement the anonymous inode hooks to apply security policy to memfd_secret() fds. - Various small improvements to memory management: fixed leaks, freed memory when needed, boundary checks. - Hardened the selinux_audit_data struct with __randomize_layout. - A minor documentation tweak to fix a formatting/style issue" * tag 'selinux-pr-20220801' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: selinux_add_opt() callers free memory selinux: Add boundary check in put_entry() selinux: fix memleak in security_read_state_kernel() docs: selinux: add '=' signs to kernel boot options mm: create security context for memfd_secret inodes selinux: fix typos in comments selinux: drop unnecessary NULL check selinux: add __randomize_layout to selinux_audit_data commit 6991a564f59742a0926be7421dff370135c44a97 Merge: d7b767b5088d 27603a606fda Author: Linus Torvalds Date: Tue Aug 2 14:38:59 2022 -0700 Merge tag 'hardening-v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull hardening updates from Kees Cook: - Fix Sparse warnings with randomizd kstack (GONG, Ruiqi) - Replace uintptr_t with unsigned long in usercopy (Jason A. Donenfeld) - Fix Clang -Wforward warning in LKDTM (Justin Stitt) - Fix comment to correctly refer to STRICT_DEVMEM (Lukas Bulwahn) - Introduce dm-verity binding logic to LoadPin LSM (Matthias Kaehlcke) - Clean up warnings and overflow and KASAN tests (Kees Cook) * tag 'hardening-v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: dm: verity-loadpin: Drop use of dm_table_get_num_targets() kasan: test: Silence GCC 12 warnings drivers: lkdtm: fix clang -Wformat warning x86: mm: refer to the intended config STRICT_DEVMEM in a comment dm: verity-loadpin: Use CONFIG_SECURITY_LOADPIN_VERITY for conditional compilation LoadPin: Enable loading from trusted dm-verity devices dm: Add verity helpers for LoadPin stack: Declare {randomize_,}kstack_offset to fix Sparse warnings lib: overflow: Do not define 64-bit tests on 32-bit MAINTAINERS: Add a general "kernel hardening" section usercopy: use unsigned long instead of uintptr_t commit d7b767b5088d57ff9b5f9a0060c9ad0f9410b1c0 Merge: 9a8ac9ee07d4 c6e8e36c6ae4 Author: Linus Torvalds Date: Tue Aug 2 14:36:19 2022 -0700 Merge tag 'execve-v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull execve updates from Kees Cook: - Allow unsharing time namespace on vfork+exec (Andrei Vagin) - Replace usage of deprecated kmap APIs (Fabio M. De Francesco) - Fix spelling mistake (Zhang Jiaming) * tag 'execve-v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: exec: Call kmap_local_page() in copy_string_kernel() exec: Fix a spelling mistake selftests/timens: add a test for vfork+exit fs/exec: allow to unshare a time namespace on vfork+exec commit 9a8ac9ee07d445d81963756f0b18af4f06692258 Merge: ddd1949f585e 3ce4b78f73e8 Author: Linus Torvalds Date: Tue Aug 2 14:34:03 2022 -0700 Merge tag 'seccomp-v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp update from Kees Cook: - Fix Clang build warning (YiFei Zhu) * tag 'seccomp-v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: selftests/seccomp: Fix compile warning when CC=clang commit ddd1949f585ef98138754033c9b1251ca2d32951 Merge: 8374cfe647a1 2c09d1443b9b Author: Linus Torvalds Date: Tue Aug 2 14:31:46 2022 -0700 Merge tag 'pstore-v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore updates from Kees Cook: - Migrate to modern acomp crypto interface (Ard Biesheuvel) - Use better return type for "rcnt" (Dan Carpenter) * tag 'pstore-v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore/zone: cleanup "rcnt" type pstore: migrate to crypto acomp interface commit 8374cfe647a1f360be3228b949dd6d753c55c19c Merge: c013d0af81f6 9dd1cd3220ec Author: Linus Torvalds Date: Tue Aug 2 14:21:25 2022 -0700 Merge tag 'for-6.0/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - Refactor DM core's mempool allocation so that it clearer by not being split acorss files. - Improve DM core's BLK_STS_DM_REQUEUE and BLK_STS_AGAIN handling. - Optimize DM core's more common bio splitting by eliminating the use of bio cloning with bio_split+bio_chain. Shift that cloning cost to the relatively unlikely dm_io requeue case that only occurs during error handling. Introduces dm_io_rewind() that will clone a bio that reflects the subset of the original bio that must be requeued. - Remove DM core's dm_table_get_num_targets() wrapper and audit all dm_table_get_target() callers. - Fix potential for OOM with DM writecache target by setting a default MAX_WRITEBACK_JOBS (set to 256MiB or 1/16 of total system memory, whichever is smaller). - Fix DM writecache target's stats that are reported through DM-specific table info. - Fix use-after-free crash in dm_sm_register_threshold_callback(). - Refine DM core's Persistent Reservation handling in preparation for broader work Mike Christie is doing to add compatibility with Microsoft Windows Failover Cluster. - Fix various KASAN reported bugs in the DM raid target. - Fix DM raid target crash due to md_handle_request() bio splitting that recurses to block core without properly initializing the bio's bi_dev. - Fix some code comment typos and fix some Documentation formatting. * tag 'for-6.0/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (29 commits) dm: fix dm-raid crash if md_handle_request() splits bio dm raid: fix address sanitizer warning in raid_resume dm raid: fix address sanitizer warning in raid_status dm: Start pr_preempt from the same starting path dm: Fix PR release handling for non All Registrants dm: Start pr_reserve from the same starting path dm: Allow dm_call_pr to be used for path searches dm: return early from dm_pr_call() if DM device is suspended dm thin: fix use-after-free crash in dm_sm_register_threshold_callback dm writecache: count number of blocks discarded, not number of discard bios dm writecache: count number of blocks written, not number of write bios dm writecache: count number of blocks read, not number of read bios dm writecache: return void from functions dm kcopyd: use __GFP_HIGHMEM when allocating pages dm writecache: set a default MAX_WRITEBACK_JOBS Documentation: dm writecache: Render status list as list Documentation: dm writecache: add blank line before optional parameters dm snapshot: fix typo in snapshot_map() comment dm raid: remove redundant "the" in parse_raid_params() comment dm cache: fix typo in 2 comment blocks ... commit 6d499a6b3d90277dbb7e408e7c70d68b507ef383 Author: Namhyung Kim Date: Tue Aug 2 12:10:04 2022 -0700 perf lock: Print the number of lost entries for BPF Like the normal 'perf lock contention' output, it'd print the number of lost entries for BPF if exists or -v option is passed. Currently it uses BROKEN_CONTENDED stat for the lost count (due to full stack maps). $ sudo perf lock con -a -b --map-nr-entries 128 sleep 5 ... === output for debug=== bad: 43, total: 14903 bad rate: 0.29 % histogram of events caused bad sequence acquire: 0 acquired: 0 contended: 43 release: 0 Signed-off-by: Namhyung Kim Cc: Blake Jones Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Song Liu Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220802191004.347740-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 8 +++++++- tools/perf/util/bpf_lock_contention.c | 6 ++++-- tools/perf/util/bpf_skel/lock_contention.bpf.c | 9 +++++++-- tools/perf/util/lock-contention.h | 1 + 4 files changed, 19 insertions(+), 5 deletions(-) commit ceb13bfc01d55388092c00796a5b76aa3dfa483a Author: Namhyung Kim Date: Tue Aug 2 12:10:03 2022 -0700 perf lock: Add --map-nr-entries option The --map-nr-entries option is to control number of max entries in the perf lock contention BPF maps. Signed-off-by: Namhyung Kim Cc: Blake Jones Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Song Liu Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220802191004.347740-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-lock.txt | 3 +++ tools/perf/builtin-lock.c | 23 ++++++++++++++++++++++- tools/perf/util/bpf_lock_contention.c | 3 +++ tools/perf/util/lock-contention.h | 1 + 4 files changed, 29 insertions(+), 1 deletion(-) commit 447ec4e5fa339b30537d899447e73a103edef6d8 Author: Namhyung Kim Date: Tue Aug 2 12:10:02 2022 -0700 perf lock: Introduce struct lock_contention The lock_contention struct is to carry related fields together and to minimize the change when we add new config options. Signed-off-by: Namhyung Kim Cc: Blake Jones Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Song Liu Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220802191004.347740-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 23 ++++++++++++++--------- tools/perf/util/bpf_lock_contention.c | 9 ++++++--- tools/perf/util/lock-contention.h | 17 +++++++++++------ 3 files changed, 31 insertions(+), 18 deletions(-) commit 9017462f006c4b686cb1e1e1a3a52ea8363076e6 Merge: 1995943c3f2a b438b3b8d6e6 Author: Jakub Kicinski Date: Tue Aug 2 13:47:52 2022 -0700 Merge branch 'wireguard-patches-for-5-20-rc1' Jason A. Donenfeld says: ==================== wireguard patches for 5.20-rc1 I had planned to send these out eventually as net.git patches, but as you emailed earlier, I figure there's no harm in just doing this now for net-next.git. Please apply the following small fixes: 1) Rather than using msleep() in order to approximate ktime_get_coarse_ boottime_ns(), instead use an hrtimer, rounded heuristically. 2) An update in selftest config fragments, from Lukas. 3) Linus noticed that a debugging WARN_ON() to detect (impossible) stack corruption would still allow the corruption to happen, making it harder to get the report about the corruption subsequently. 4) Support for User Mode Linux in the test suite. This depends on some UML patches that are slated for 5.20. Richard hasn't sent his pull in, but they're in his tree, so I assume it'll happen. ==================== Link: https://lore.kernel.org/r/20220802125613.340848-1-Jason@zx2c4.com Signed-off-by: Jakub Kicinski commit b438b3b8d6e6ee1359a66c508345703888e61346 Author: Jason A. Donenfeld Date: Tue Aug 2 14:56:13 2022 +0200 wireguard: selftests: support UML This shoud open up various possibilities like time travel execution, and is also just another platform to help shake out bugs. Cc: Johannes Berg Signed-off-by: Jason A. Donenfeld Signed-off-by: Jakub Kicinski tools/testing/selftests/wireguard/qemu/Makefile | 17 ++++++++++++++++- tools/testing/selftests/wireguard/qemu/arch/um.config | 3 +++ 2 files changed, 19 insertions(+), 1 deletion(-) commit c31b14d86dfe7174361e8c6e5df6c2c3a4d5918c Author: Jason A. Donenfeld Date: Tue Aug 2 14:56:12 2022 +0200 wireguard: allowedips: don't corrupt stack when detecting overflow In case push_rcu() and related functions are buggy, there's a WARN_ON(len >= 128), which the selftest tries to hit by being tricky. In case it is hit, we shouldn't corrupt the kernel's stack, though; otherwise it may be hard to even receive the report that it's buggy. So conditionalize the stack write based on that WARN_ON()'s return value. Note that this never *actually* happens anyway. The WARN_ON() in the first place is bounded by IS_ENABLED(DEBUG), and isn't expected to ever actually hit. This is just a debugging sanity check. Additionally, hoist the constant 128 into a named enum, MAX_ALLOWEDIPS_BITS, so that it's clear why this value is chosen. Suggested-by: Linus Torvalds Link: https://lore.kernel.org/all/CAHk-=wjJZGA6w_DxA+k7Ejbqsq+uGK==koPai3sqdsfJqemvag@mail.gmail.com/ Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Signed-off-by: Jason A. Donenfeld Signed-off-by: Jakub Kicinski drivers/net/wireguard/allowedips.c | 9 ++++++--- drivers/net/wireguard/selftest/allowedips.c | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) commit 2a8f91d2898edf84166976112837f4996c68f706 Author: Lukas Bulwahn Date: Tue Aug 2 14:56:11 2022 +0200 wireguard: selftests: update config fragments The kernel.config and debug.config fragments in wireguard selftests mention some config symbols that have been reworked: Commit c5665868183f ("mm: kmemleak: use the memory pool for early allocations") removes the config DEBUG_KMEMLEAK_EARLY_LOG_SIZE and since then, the config's feature is available without further configuration. Commit 4675ff05de2d ("kmemcheck: rip it out") removes kmemcheck and the corresponding arch config HAVE_ARCH_KMEMCHECK. There is no need for this config. Commit 3bf195ae6037 ("netfilter: nat: merge nf_nat_ipv4,6 into nat core") removes the config NF_NAT_IPV4 and since then, the config's feature is available without further configuration. Commit 41a2901e7d22 ("rcu: Remove SPARSE_RCU_POINTER Kconfig option") removes the config SPARSE_RCU_POINTER and since then, the config's feature is enabled by default. Commit dfb4357da6dd ("time: Remove CONFIG_TIMER_STATS") removes the feature and config CONFIG_TIMER_STATS without any replacement. Commit 3ca17b1f3628 ("lib/ubsan: remove null-pointer checks") removes the check and config UBSAN_NULL without any replacement. Adjust the config fragments to those changes in configs. Signed-off-by: Lukas Bulwahn Signed-off-by: Jason A. Donenfeld Signed-off-by: Jakub Kicinski tools/testing/selftests/wireguard/qemu/debug.config | 5 ----- tools/testing/selftests/wireguard/qemu/kernel.config | 1 - 2 files changed, 6 deletions(-) commit 151c8e499f4705010780189377f85b57400ccbf5 Author: Jason A. Donenfeld Date: Tue Aug 2 14:56:10 2022 +0200 wireguard: ratelimiter: use hrtimer in selftest Using msleep() is problematic because it's compared against ratelimiter.c's ktime_get_coarse_boottime_ns(), which means on systems with slow jiffies (such as UML's forced HZ=100), the result is inaccurate. So switch to using schedule_hrtimeout(). However, hrtimer gives us access only to the traditional posix timers, and none of the _COARSE variants. So now, rather than being too imprecise like jiffies, it's too precise. One solution would be to give it a large "range" value, but this will still fire early on a loaded system. A better solution is to align the timeout to the actual coarse timer, and then round up to the nearest tick, plus change. So add the timeout to the current coarse time, and then schedule_hrtimer() until the absolute computed time. This should hopefully reduce flakes in CI as well. Note that we keep the retry loop in case the entire function is running behind, because the test could still be scheduled out, by either the kernel or by the hypervisor's kernel, in which case restarting the test and hoping to not be scheduled out still helps. Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Suggested-by: Thomas Gleixner Signed-off-by: Jason A. Donenfeld Signed-off-by: Jakub Kicinski drivers/net/wireguard/selftest/ratelimiter.c | 25 ++++++++++++++----------- kernel/time/hrtimer.c | 1 + 2 files changed, 15 insertions(+), 11 deletions(-) commit c013d0af81f60cc7dbe357c4e2a925fb6738dbfe Merge: 42df1cbf6a47 8d9fdb6011b4 Author: Linus Torvalds Date: Tue Aug 2 13:46:35 2022 -0700 Merge tag 'for-5.20/block-2022-07-29' of git://git.kernel.dk/linux-block Pull block updates from Jens Axboe: - Improve the type checking of request flags (Bart) - Ensure queue mapping for a single queues always picks the right queue (Bart) - Sanitize the io priority handling (Jan) - rq-qos race fix (Jinke) - Reserved tags handling improvements (John) - Separate memory alignment from file/disk offset aligment for O_DIRECT (Keith) - Add new ublk driver, userspace block driver using io_uring for communication with the userspace backend (Ming) - Use try_cmpxchg() to cleanup the code in various spots (Uros) - Finally remove bdevname() (Christoph) - Clean up the zoned device handling (Christoph) - Clean up independent access range support (Christoph) - Clean up and improve block sysfs handling (Christoph) - Clean up and improve teardown of block devices. This turns the usual two step process into something that is simpler to implement and handle in block drivers (Christoph) - Clean up chunk size handling (Christoph) - Misc cleanups and fixes (Bart, Bo, Dan, GuoYong, Jason, Keith, Liu, Ming, Sebastian, Yang, Ying) * tag 'for-5.20/block-2022-07-29' of git://git.kernel.dk/linux-block: (178 commits) ublk_drv: fix double shift bug ublk_drv: make sure that correct flags(features) returned to userspace ublk_drv: fix error handling of ublk_add_dev ublk_drv: fix lockdep warning block: remove __blk_get_queue block: call blk_mq_exit_queue from disk_release for never added disks blk-mq: fix error handling in __blk_mq_alloc_disk ublk: defer disk allocation ublk: rewrite ublk_ctrl_get_queue_affinity to not rely on hctx->cpumask ublk: fold __ublk_create_dev into ublk_ctrl_add_dev ublk: cleanup ublk_ctrl_uring_cmd ublk: simplify ublk_ch_open and ublk_ch_release ublk: remove the empty open and release block device operations ublk: remove UBLK_IO_F_PREFLUSH ublk: add a MAINTAINERS entry block: don't allow the same type rq_qos add more than once mmc: fix disk/queue leak in case of adding disk failure ublk_drv: fix an IS_ERR() vs NULL check ublk: remove UBLK_IO_F_INTEGRITY ublk_drv: remove unneeded semicolon ... commit 42df1cbf6a4726934cc5dac12bf263aa73c49fa3 Merge: 98e247464088 14b146b688ad Author: Linus Torvalds Date: Tue Aug 2 13:37:55 2022 -0700 Merge tag 'for-5.20/io_uring-zerocopy-send-2022-07-29' of git://git.kernel.dk/linux-block Pull io_uring zerocopy support from Jens Axboe: "This adds support for efficient support for zerocopy sends through io_uring. Both ipv4 and ipv6 is supported, as well as both TCP and UDP. The core network changes to support this is in a stable branch from Jakub that both io_uring and net-next has pulled in, and the io_uring changes are layered on top of that. All of the work has been done by Pavel" * tag 'for-5.20/io_uring-zerocopy-send-2022-07-29' of git://git.kernel.dk/linux-block: (34 commits) io_uring: notification completion optimisation io_uring: export req alloc from core io_uring/net: use unsigned for flags io_uring/net: make page accounting more consistent io_uring/net: checks errors of zc mem accounting io_uring/net: improve io_get_notif_slot types selftests/io_uring: test zerocopy send io_uring: enable managed frags with register buffers io_uring: add zc notification flush requests io_uring: rename IORING_OP_FILES_UPDATE io_uring: flush notifiers after sendzc io_uring: sendzc with fixed buffers io_uring: allow to pass addr into sendzc io_uring: account locked pages for non-fixed zc io_uring: wire send zc request type io_uring: add notification slot registration io_uring: add rsrc referencing for notifiers io_uring: complete notifiers in tw io_uring: cache struct io_notif io_uring: add zc notification infrastructure ... commit 98e247464088a11ce2328a214fdb87d4c06f8db6 Merge: b349b1181d24 0dd316ba8692 Author: Linus Torvalds Date: Tue Aug 2 13:27:23 2022 -0700 Merge tag 'for-5.20/io_uring-buffered-writes-2022-07-29' of git://git.kernel.dk/linux-block Pull io_uring buffered writes support from Jens Axboe: "This contains support for buffered writes, specifically for XFS. btrfs is in progress, will be coming in the next release. io_uring does support buffered writes on any file type, but since the buffered write path just always -EAGAIN (or -EOPNOTSUPP) any attempt to do so if IOCB_NOWAIT is set, any buffered write will effectively be handled by io-wq offload. This isn't very efficient, and we even have specific code in io-wq to serialize buffered writes to the same inode to avoid further inefficiencies with thread offload. This is particularly sad since most buffered writes don't block, they simply copy data to a page and dirty it. With this pull request, we can handle buffered writes a lot more effiently. If balance_dirty_pages() needs to block, we back off on writes as indicated. This improves buffered write support by 2-3x. Jan Kara helped with the mm bits for this, and Stefan handled the fs/iomap/xfs/io_uring parts of it" * tag 'for-5.20/io_uring-buffered-writes-2022-07-29' of git://git.kernel.dk/linux-block: mm: honor FGP_NOWAIT for page cache page allocation xfs: Add async buffered write support xfs: Specify lockmode when calling xfs_ilock_for_iomap() io_uring: Add tracepoint for short writes io_uring: fix issue with io_write() not always undoing sb_start_write() io_uring: Add support for async buffered writes fs: Add async write file modification handling. fs: Split off inode_needs_update_time and __file_update_time fs: add __remove_file_privs() with flags parameter fs: add a FMODE_BUF_WASYNC flags for f_mode iomap: Return -EAGAIN from iomap_write_iter() iomap: Add async buffered write support iomap: Add flags parameter to iomap_page_create() mm: Add balance_dirty_pages_ratelimited_flags() function mm: Move updates of dirty_exceeded into one place mm: Move starting of background writeback into the main balancing loop commit b349b1181d24af1c151134a3c39725e94a5619dd Merge: efb2883060af f6b543fd03d3 Author: Linus Torvalds Date: Tue Aug 2 13:20:44 2022 -0700 Merge tag 'for-5.20/io_uring-2022-07-29' of git://git.kernel.dk/linux-block Pull io_uring updates from Jens Axboe: - As per (valid) complaint in the last merge window, fs/io_uring.c has grown quite large these days. io_uring isn't really tied to fs either, as it supports a wide variety of functionality outside of that. Move the code to io_uring/ and split it into files that either implement a specific request type, and split some code into helpers as well. The code is organized a lot better like this, and io_uring.c is now < 4K LOC (me). - Deprecate the epoll_ctl opcode. It'll still work, just trigger a warning once if used. If we don't get any complaints on this, and I don't expect any, then we can fully remove it in a future release (me). - Improve the cancel hash locking (Hao) - kbuf cleanups (Hao) - Efficiency improvements to the task_work handling (Dylan, Pavel) - Provided buffer improvements (Dylan) - Add support for recv/recvmsg multishot support. This is similar to the accept (or poll) support for have for multishot, where a single SQE can trigger everytime data is received. For applications that expect to do more than a few receives on an instantiated socket, this greatly improves efficiency (Dylan). - Efficiency improvements for poll handling (Pavel) - Poll cancelation improvements (Pavel) - Allow specifiying a range for direct descriptor allocations (Pavel) - Cleanup the cqe32 handling (Pavel) - Move io_uring types to greatly cleanup the tracing (Pavel) - Tons of great code cleanups and improvements (Pavel) - Add a way to do sync cancelations rather than through the sqe -> cqe interface, as that's a lot easier to use for some use cases (me). - Add support to IORING_OP_MSG_RING for sending direct descriptors to a different ring. This avoids the usually problematic SCM case, as we disallow those. (me) - Make the per-command alloc cache we use for apoll generic, place limits on it, and use it for netmsg as well (me). - Various cleanups (me, Michal, Gustavo, Uros) * tag 'for-5.20/io_uring-2022-07-29' of git://git.kernel.dk/linux-block: (172 commits) io_uring: ensure REQ_F_ISREG is set async offload net: fix compat pointer in get_compat_msghdr() io_uring: Don't require reinitable percpu_ref io_uring: fix types in io_recvmsg_multishot_overflow io_uring: Use atomic_long_try_cmpxchg in __io_account_mem io_uring: support multishot in recvmsg net: copy from user before calling __get_compat_msghdr net: copy from user before calling __copy_msghdr io_uring: support 0 length iov in buffer select in compat io_uring: fix multishot ending when not polled io_uring: add netmsg cache io_uring: impose max limit on apoll cache io_uring: add abstraction around apoll cache io_uring: move apoll cache to poll.c io_uring: consolidate hash_locked io-wq handling io_uring: clear REQ_F_HASH_LOCKED on hash removal io_uring: don't race double poll setting REQ_F_ASYNC_DATA io_uring: don't miss setting REQ_F_DOUBLE_POLL io_uring: disable multishot recvmsg io_uring: only trace one of complete or overflow ... commit 1a607e102fe0f04491fb69c5a233aad139d9d1d6 Author: Konrad Dybcio Date: Sat Jul 16 21:32:56 2022 +0200 dt-bindings: mailbox: qcom-ipcc: Add SM6375 compatible Add a compatible for SM6375. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar Documentation/devicetree/bindings/mailbox/qcom-ipcc.yaml | 1 + 1 file changed, 1 insertion(+) commit 82ab513baed5895c8b0e991557a12fd38d5f25f0 Author: Peng Fan Date: Wed Jun 15 21:00:09 2022 +0800 mailbox: imx: support RST channel i.MX generic MU supports MU-A/B reset feature. When stop/start remotecore, MU is not reset. So when Linux stop remotecore, the MU-B side BCR may contain valid configuration, because MU-B is not reset. So when linux start Mcore again and notify Mcore, Mcore is not ready to handle MU interrupt and cause issues. So need reset MU when stop Mcore. Signed-off-by: Peng Fan Signed-off-by: Jassi Brar drivers/mailbox/imx-mailbox.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) commit 095730dd4ca5fe078fd07db5be68b3026d4ae48a Author: Peng Fan Date: Wed Jun 15 21:00:08 2022 +0800 dt-bindings: mailbox: imx-mu: add RST channel i.MX MU has a MUR bit which is to reset both the Processor B and the Processor A sides of the MU module, forcing all control and status registers to return to their default values (except the BHR bit in the ACR register and BHRM bit in BCR register), and all internal states to be cleared. Signed-off-by: Peng Fan Reviewed-by: Rob Herring Signed-off-by: Jassi Brar Documentation/devicetree/bindings/mailbox/fsl,mu.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 60545466180e791827c84795e7b4828dbeb9e061 Author: Bryan O'Donoghue Date: Mon Jul 18 12:55:38 2022 +0100 dt-bindings: mailbox: qcom,apcs-kpss-global: Add syscon const for relevant entries msm8916, msm8939, msm8953, msm8994 and qcs404 already declare or should declare syscon as they have drivers that use syscon inside of the apcs-kpss block. grep apcs arch/arm64/boot/dts/qcom/* | grep syscon Add in the additional syscon in the documentation for the above mentioned parts. Reviewed-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue Signed-off-by: Jassi Brar .../bindings/mailbox/qcom,apcs-kpss-global.yaml | 46 ++++++++++++---------- 1 file changed, 25 insertions(+), 21 deletions(-) commit a41a2e2e34a907bd8979a53c58f44287630616e8 Author: Josh Poimboeuf Date: Thu Jul 21 11:01:24 2022 -0700 scripts/faddr2line: Add CONFIG_DEBUG_INFO check Otherwise without DWARF it spits out gibberish and gives no indication of what the problem is. Suggested-by: John Garry Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Tested-by: John Garry Link: https://lore.kernel.org/r/ffa7734c929445caa374bf9e68078300174f09b4.1658426357.git.jpoimboe@kernel.org scripts/faddr2line | 3 +++ 1 file changed, 3 insertions(+) commit b6a5068854cfe372da7dee3224dcf023ed5b00cb Author: Josh Poimboeuf Date: Thu Jul 21 11:01:23 2022 -0700 scripts/faddr2line: Fix vmlinux detection on arm64 Since commit dcea997beed6 ("faddr2line: Fix overlapping text section failures, the sequel"), faddr2line is completely broken on arm64. For some reason, on arm64, the vmlinux ELF object file type is ET_DYN rather than ET_EXEC. Check for both when determining whether the object is vmlinux. Modules and vmlinux.o have type ET_REL on all arches. Fixes: dcea997beed6 ("faddr2line: Fix overlapping text section failures, the sequel") Reported-by: John Garry Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Tested-by: John Garry Link: https://lore.kernel.org/r/dad1999737471b06d6188ce4cdb11329aa41682c.1658426357.git.jpoimboe@kernel.org scripts/faddr2line | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d9c26e0a58b0039d1ad4340d826fe8db866e9455 Author: Chun-Kuang Hu Date: Wed Jun 8 22:40:55 2022 +0800 mailbox: mtk-cmdq: Remove proprietary cmdq_task_cb rx_callback is a standard mailbox callback mechanism and could cover the function of proprietary cmdq_task_cb, so use the standard one instead of the proprietary one. Client driver has changed to use standard rx_callback, so remove proprietary cmdq_task_cb. Signed-off-by: Chun-Kuang Hu Reviewed-by: Matthias Brugger Signed-off-by: Jassi Brar drivers/mailbox/mtk-cmdq-mailbox.c | 11 ----------- include/linux/mailbox/mtk-cmdq-mailbox.h | 10 ---------- 2 files changed, 21 deletions(-) commit 2135e5d56278ffdb1c2e6d325dc6b87f669b9dac Author: Trond Myklebust Date: Tue Aug 2 15:48:50 2022 -0400 NFSv4/pnfs: Fix a use-after-free bug in open If someone cancels the open RPC call, then we must not try to free either the open slot or the layoutget operation arguments, since they are likely still in use by the hung RPC call. Fixes: 6949493884fe ("NFSv4: Don't hold the layoutget locks across multiple RPC calls") Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit b1a28f2eb9ea7a5a1763fe53fe699aa0feae4231 Author: Trond Myklebust Date: Mon Aug 1 14:16:51 2022 -0400 NFS: nfs_async_write_reschedule_io must not recurse into the writeback code It is not safe to call filemap_fdatawrite_range() from nfs_async_write_reschedule_io(), since we're often calling from a page reclaim context. Just let fsync() redrive the writeback for us. Signed-off-by: Trond Myklebust fs/nfs/write.c | 2 -- 1 file changed, 2 deletions(-) commit 09794a5a6c348f629b35fc1687071a1622ef4265 Author: Steven Rostedt (Google) Date: Tue Aug 2 15:44:12 2022 -0400 tracing: Use alignof__(struct {type b;}) instead of offsetof() Simplify: #define ALIGN_STRUCTFIELD(type) ((int)(offsetof(struct {char a; type b;}, b))) with #define ALIGN_STRUCTFIELD(type) __alignof__(struct {type b;}) Which works just the same. Link: https://lore.kernel.org/all/a7d202457150472588df0bd3b7334b3f@AcuMS.aculab.com/ Link: https://lkml.kernel.org/r/20220802154412.513c50e3@gandalf.local.home Suggested-by: David Laight Signed-off-by: Steven Rostedt (Google) include/trace/stages/stage4_event_fields.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efb2883060afc79638bb1eb19e2c30e7f6c5a178 Merge: c1dbe9a1c86d 3afe697b74bc Author: Linus Torvalds Date: Tue Aug 2 12:47:31 2022 -0700 Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux Pull turbostat updates from Len Brown: "Only updating the turbostat tool here, no kernel changes" * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: tools/power turbostat: version 2022.07.28 tools/power turbostat: do not decode ACC for ICX and SPR tools/power turbostat: fix SPR PC6 limits tools/power turbostat: cleanup 'automatic_cstate_conversion_probe()' tools/power turbostat: separate SPR from ICX tools/power turbosstat: fix comment tools/power turbostat: Support RAPTORLAKE P tools/power turbostat: add support for ALDERLAKE_N tools/power turbostat: dump secondary Turbo-Ratio-Limit tools/power turbostat: simplify dump_turbo_ratio_limits() tools/power turbostat: dump CPUID.7.EDX.Hybrid tools/power turbostat: update turbostat.8 tools/power turbostat: Show uncore frequency tools/power turbostat: Fix file pointer leak tools/power turbostat: replace strncmp with single character compare tools/power turbostat: print the kernel boot commandline tools/power turbostat: Introduce support for RaptorLake commit 4ee3c4da8b1b9c225bd156a7909980e32f3b3153 Author: Arnaldo Carvalho de Melo Date: Tue Aug 2 15:40:20 2022 -0300 perf scripting python: Do not build fail on deprecation warnings First noticed with fedora:rawhide: 48 11.10 fedora:rawhide : FAIL gcc version 12.1.1 20220628 (Red Hat 12.1.1-3) (GCC) util/scripting-engines/trace-event-python.c: In function 'python_start_script': util/scripting-engines/trace-event-python.c:1899:9: error: 'PySys_SetArgv' is deprecated [-Werror=deprecated-declarations] 1899 | PySys_SetArgv(argc + 1, command_line); No time now to address this warning, so don't make it an error, in time we should either add yet more ifdefs to continue supporting older systems or just convert to whatever new infra python put in place for argv processing, sigh. Acked-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/scripting-engines/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91cea6be90e436c55cde8770a15e4dac9d3032d0 Author: Arnaldo Carvalho de Melo Date: Tue Aug 2 15:13:22 2022 -0300 genelf: Use HAVE_LIBCRYPTO_SUPPORT, not the never defined HAVE_LIBCRYPTO When genelf was introduced it tested for HAVE_LIBCRYPTO not HAVE_LIBCRYPTO_SUPPORT, which is the define the feature test for openssl defines, fix it. This also adds disables the deprecation warning, someone has to fix this to build with openssl 3.0 before the warning becomes a hard error. Fixes: 9b07e27f88b9cd78 ("perf inject: Add jitdump mmap injection support") Reported-by: 谭梓煊 Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Martin KaFai Lau Cc: Nick Terrell Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/YulpPqXSOG0Q4J1o@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/genelf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 10fef869a58e37ec649b61eddab545f2da57a79b Author: Zixuan Tan Date: Sat Jun 25 23:34:38 2022 +0800 perf build: Suppress openssl v3 deprecation warnings in libcrypto feature test With OpenSSL v3 installed, the libcrypto feature check fails as it use the deprecated MD5_* API (and is compiled with -Werror). The error message is as follows. $ make tools/perf ``` Makefile.config:778: No libcrypto.h found, disables jitted code injection, please install openssl-devel or libssl-dev 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: [ OFF ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... libaio: [ on ] ... libzstd: [ on ] ... disassembler-four-args: [ on ] ``` This is very confusing because the suggested library (on my Ubuntu 20.04 it is libssl-dev) is already installed. As the test only checks for the presence of libcrypto, this commit suppresses the deprecation warning to allow the test to pass. Signed-off-by: Zixuan Tan Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: John Fastabend Cc: KP Singh Cc: Martin KaFai Lau Cc: Nick Terrell Cc: Song Liu Cc: Yonghong Song Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Link: https://lore.kernel.org/r/20220625153439.513559-1-tanzixuan.me@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/build/feature/test-libcrypto.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9b7c7728f4e4ba8dd75269fb111fa187faa018c6 Author: Ian Rogers Date: Fri Jul 29 13:42:17 2022 -0700 perf parse-events: Break out tracepoint and printing Move print_*_events functions out of parse-events.c into a new print-events.c. Move tracepoint code into tracepoint.c or trace-event-info.c (sole user). This reduces the dependencies of parse-events.c and makes it more amenable to being a library in the future. Remove some unnecessary definitions from parse-events.h. Fix a checkpatch.pl warning on using unsigned rather than unsigned int. Fix some line length warnings too. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20220729204217.250166-3-irogers@google.com [ Add include linux/stddef.h before perf_events.h for systems where __always_inline isn't pulled in before used, such as older Alpine Linux ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-list.c | 2 +- tools/perf/builtin-lock.c | 1 + tools/perf/builtin-timechart.c | 1 + tools/perf/builtin-trace.c | 1 + tools/perf/util/Build | 2 + tools/perf/util/parse-events.c | 713 +------------------------------------ tools/perf/util/parse-events.h | 31 -- tools/perf/util/print-events.c | 572 +++++++++++++++++++++++++++++ tools/perf/util/print-events.h | 22 ++ tools/perf/util/trace-event-info.c | 96 +++++ tools/perf/util/tracepoint.c | 63 ++++ tools/perf/util/tracepoint.h | 25 ++ 12 files changed, 791 insertions(+), 738 deletions(-) commit a60885b6a97b5dc9340dd9310a57b5682c2daf2d Merge: db244339fa60 0cb1fc0988e3 Author: Jiri Kosina Date: Tue Aug 2 21:25:14 2022 +0200 Merge branch 'for-5.20/uclogic' into for-linus - XP-PEN Deco L support (José Expósito) commit db244339fa60b6cda6a2a32adb85be7e08de167e Merge: 86f6710dae39 842fec058171 Author: Jiri Kosina Date: Tue Aug 2 21:24:28 2022 +0200 Merge branch 'for-5.20/nintendo' into for-linus commit 86f6710dae39614754d8d97774a082c5abfeff80 Merge: ebf95514ec7a bd3cba00dcc6 Author: Jiri Kosina Date: Tue Aug 2 21:23:42 2022 +0200 Merge branch 'for-5.20/elan' into for-linus - support for Elan eKTH6915 touchscreens (Douglas Anderson) commit ebf95514ec7a4df4bbde06fd0e8b820307ab03e4 Merge: 144c71f7c816 4df4b0fe960c Author: Jiri Kosina Date: Tue Aug 2 21:23:11 2022 +0200 Merge branch 'for-5.20/core' into for-linus commit 2f63e5d2e391837c70741311b5b70d2fbd15d138 Author: Masami Hiramatsu (Google) Date: Mon Aug 1 11:32:15 2022 +0900 tracing/eprobe: Show syntax error logs in error_log file Show the syntax errors for event probes in error_log file as same as other dynamic events, so that user can understand what is the problem. Link: https://lkml.kernel.org/r/165932113556.2850673.3483079297896607612.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_eprobe.c | 11 +++++++++-- kernel/trace/trace_probe.h | 5 ++++- 2 files changed, 13 insertions(+), 3 deletions(-) commit 144c71f7c816ceb804167ed28a76bf09d70a8939 Merge: c556717541c0 20afcc462579 Author: Jiri Kosina Date: Tue Aug 2 21:22:44 2022 +0200 Merge branch 'for-5.20/apple' into for-linus commit c556717541c0c34bff887db92057964f0ff74582 Merge: 1117d182c5d7 5d4d0f156575 Author: Jiri Kosina Date: Tue Aug 2 21:21:46 2022 +0200 Merge branch 'for-5.20/amd-sfh' into for-linus - support for AMD SOCs using SFH1.1 memory access (Basavaraj Natikar) commit 08fc500fe3d4b1f0603fb97ad353f246a3d52d2d Merge: dfcbbd73ddb1 432b09665b5a Author: Stephen Boyd Date: Tue Aug 2 12:20:51 2022 -0700 Merge branch 'clk-allwinner' into clk-next * clk-allwinner: clk: sunxi-ng: sun50i: h6: Modify GPU clock configuration to support DFS clk: sunxi: Do not select the PRCM MFD clk: sunxi: Limit legacy clocks to 32-bit ARM clk: sunxi-ng: Deduplicate ccu_clks arrays commit dfcbbd73ddb17a974365d474ffbfd6e8a007a994 Merge: f04ed3d9f8a5 8ba69fd24266 8c18fece15f6 f04f2870e549 4c2fdfc4c804 Author: Stephen Boyd Date: Tue Aug 2 12:20:33 2022 -0700 Merge branches 'clk-renesas', 'clk-spreadtrum', 'clk-imx' and 'clk-qcom' into clk-next * clk-renesas: (22 commits) clk: renesas: rcar-gen4: Fix initconst confusion for cpg_pll_config clk: renesas: r9a07g043: Add support for RZ/Five SoC dt-bindings: clock: r9a07g043-cpg: Add Renesas RZ/Five CPG Clock and Reset Definitions clk: renesas: r8a779f0: Add HSCIF clocks clk: renesas: r8a779f0: Add PCIe clocks clk: renesas: r8a779f0: Add Z0 and Z1 clock support dt-bindings: clock: renesas,rzg2l: Simplify header file references clk: renesas: rza1: Remove struct rz_cpg clk: renesas: r8a7779: Remove struct r8a7779_cpg clk: renesas: r8a7778: Remove struct r8a7778_cpg clk: renesas: sh73a0: Remove sh73a0_cpg.reg clk: renesas: r8a7740: Remove r8a7740_cpg.reg clk: renesas: r8a73a4: Remove r8a73a4_cpg.reg clk: renesas: r8a779f0: Add SDHI0 clock clk: renesas: r8a779f0: Add thermal clock clk: renesas: rzg2l: Fix reset status function clk: renesas: r9a06g032: Fix UART clkgrp bitsel clk: renesas: r9a06g032: Drop some unused fields clk: renesas: r9a09g011: Add WDT clock and reset entries clk: renesas: r9a09g011: Add PFC clock and reset entries ... * clk-spreadtrum: clk: sprd: Add dt-bindings include file for UMS512 dt-bindings: clk: sprd: Add bindings for ums512 clock controller * clk-imx: clk: imx: clk-fracn-gppll: Add more freq config for video pll clk: imx: clk-fracn-gppll: correct rdiv clk: imx: clk-fracn-gppll: Return rate in rate table properly in ->recalc_rate() clk: imx: clk-fracn-gppll: fix mfd value clk: imx93: Correct the edma1's parent clock clk: imx93: correct nic_media parent clk: imx93: use adc_root as the parent clock of adc1 * clk-qcom: (62 commits) clk: qcom: gcc-msm8994: use parent_hws for gpll0/4 clk: qcom: clk-rpm: convert to parent_data API dt-bindings: clock: fix wrong clock documentation for qcom,rpmcc clk: qcom: gcc-msm8939: Add missing USB HS system clock frequencies clk: qcom: gcc-msm8939: Add missing MDSS MDP clock frequencies clk: qcom: gcc-msm8939: Add missing CAMSS CPP clock frequencies clk: qcom: gcc-msm8939: Fix venus0_vcodec0_clk frequency definitions clk: qcom: gcc-msm8939: Add missing CAMSS CCI bus clock clk: qcom: gcc-msm8939: Fix weird field spacing in ftbl_gcc_camss_cci_clk clk: qcom: gdsc: Bump parent usage count when GDSC is found enabled clk: qcom: Drop mmcx gdsc supply for dispcc and videocc clk: qcom: fix build error initializer element is not constant dt-bindings: clock: qcom,gcc-msm8996: add more GCC clock sources clk: qcom: add support for SM8350 DISPCC clk: qcom: add support for SM8350 GPUCC clk: qcom: add camera clock controller driver for SM8450 SoC clk: qcom: clk-alpha-pll: add Rivian EVO PLL configuration interfaces clk: qcom: clk-alpha-pll: add Lucid EVO PLL configuration interfaces clk: qcom: clk-alpha-pll: limit exported symbols to GPL licensed code clk: qcom: clk-alpha-pll: fix clk_trion_pll_configure description ... commit f04ed3d9f8a5449736081c2c9906569aa8399c9b Merge: 3d7cb6b04c3f 6ebd5247ad2a 3b3ec201f381 62c0aff64c8d 255584b13834 Author: Stephen Boyd Date: Tue Aug 2 12:19:18 2022 -0700 Merge branches 'clk-basic', 'clk-mtk', 'clk-devm-enable' and 'clk-ti-dt' into clk-next - Remove allwinner workaround logic/compatible in fixed factor code - MediaTek clk driver cleanups - Add reset support to more MediaTek clk drivers - devm helpers for clk_get() + clk_prepare() and clk_enable() * clk-basic: clk: fixed-factor: Introduce *clk_hw_register_fixed_factor_parent_hw() clk: mux: Introduce devm_clk_hw_register_mux_parent_hws() clk: divider: Introduce devm_clk_hw_register_divider_parent_hw() dt-bindings: clock: fixed-factor: Drop Allwinner A10 compatible clk: fixed: Remove Allwinner A10 special-case logic * clk-mtk: clk: mediatek: reset: Add infra_ao reset support for MT8186 dt-bindings: arm: mediatek: Add #reset-cells property for MT8186 dt-bindings: reset: mediatek: Add infra_ao reset index for MT8186 clk: mediatek: reset: Add infra_ao reset support for MT8192/MT8195 dt-bindings: reset: mediatek: Add infra_ao reset index for MT8192/MT8195 dt-bindings: arm: mediatek: Add #reset-cells property for MT8192/MT8195 clk: mediatek: reset: Add reset support for simple probe clk: mediatek: reset: Add new register reset function with device clk: mediatek: reset: Change return type for clock reset register function clk: mediatek: reset: Support inuput argument index mode clk: mediatek: reset: Support nonsequence base offsets of reset registers clk: mediatek: reset: Revise structure to control reset register clk: mediatek: reset: Merge and revise reset register function clk: mediatek: reset: Extract common drivers to update function clk: mediatek: reset: Refine and reorder functions in reset.c clk: mediatek: reset: Fix written reset bit offset clk: mediatek: reset: Add reset.h clk: mediatek: Delete MT8192 msdc gate dt-bindings: ARM: Mediatek: Remove msdc binding of MT8192 clock * clk-devm-enable: clk: Remove never used devm_clk_*unregister() clk: Fix pointer casting to prevent oops in devm_clk_release() clk: meson: axg-audio: Don't duplicate devm_clk_get_enabled() clk: Provide new devm_clk helpers for prepared and enabled clocks clk: generalize devm_clk_get() a bit clk: Improve documentation for devm_clk_get() and its optional variant * clk-ti-dt: clk: ti: Stop using legacy clkctrl names for omap4 and 5 commit 95522f0b18a059afa5aca036aa454c98beb553b5 Author: Slark Xiao Date: Fri Jul 22 18:29:07 2022 +0800 scripts/tracing: Fix typo 'the the' in comment Replace 'the the' with 'the' in the comment. Link: https://lkml.kernel.org/r/20220722102907.81949-1-slark_xiao@163.com Signed-off-by: Slark Xiao Signed-off-by: Steven Rostedt (Google) scripts/tracing/draw_functrace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 170ab26b01d7f445c46261eff69341dab7e50a24 Author: Li zeming Date: Thu Jul 21 16:19:04 2022 +0800 tracepoints: It is CONFIG_TRACEPOINTS not CONFIG_TRACEPOINT When reading this note, CONFIG_TRACEPOINT searches my configuration file, and the result is CONFIG_TRACEPOINTS, the search results are consistent with the following macro definitions. I think it should be repaired. Link: https://lkml.kernel.org/r/20220721081904.3798-1-zeming@nfschina.com Signed-off-by: Li zeming Signed-off-by: Steven Rostedt (Google) include/linux/tracepoint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59927cbe3f30c5ed7fc5d33487ef06611394a548 Author: Zhiqiang Liu Date: Wed Jul 20 10:46:48 2022 +0800 tracing: Use free_trace_buffer() in allocate_trace_buffers() In allocate_trace_buffers(), if allocating tr->max_buffer fails, we can directly call free_trace_buffer to free tr->array_buffer. Link: https://lkml.kernel.org/r/65f0702d-07f6-08de-2a07-4c50af56a67b@huawei.com Signed-off-by: Zhiqiang Liu Signed-off-by: Steven Rostedt (Google) kernel/trace/trace.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit c1dbe9a1c86da098a29dcdca1a67b65e2de7ec3a Merge: a771ea6413c0 da9d01794e31 Author: Linus Torvalds Date: Tue Aug 2 11:27:53 2022 -0700 Merge tag 'thermal-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control updates from Rafael Wysocki: "These start a rework of the handling of trip points in the thermal core, improve the cpufreq/devfreq cooling device handling, update some thermal control drivers and the tmon utility and clean up code. Specifics: - Consolidate the thermal core code by beginning to move the thermal trip structure from the thermal OF code as a generic structure to be used by the different sensors when registering a thermal zone (Daniel Lezcano). - Make per cpufreq / devfreq cooling device ops instead of using a global variable, fix comments and rework the trace information (Lukasz Luba). - Add the include/dt-bindings/thermal.h under the area covered by the thermal maintainer in the MAINTAINERS file (Lukas Bulwahn). - Improve the error output by giving the sensor identification when a thermal zone failed to initialize, the DT bindings by changing the positive logic and adding the r8a779f0 support on the rcar3 (Wolfram Sang). - Convert the QCom tsens DT binding to the dtsformat format (Krzysztof Kozlowski). - Remove the pointless get_trend() function in the QCom, Ux500 and tegra thermal drivers, along with the unused DROP_FULL and RAISE_FULL trends definitions. Simplify the code by using clamp() macros (Daniel Lezcano). - Fix ref_table memory leak at probe time on the k3_j72xx bandgap (Bryan Brattlof). - Fix array underflow in prep_lookup_table (Dan Carpenter). - Add static annotation to the k3_j72xx_bandgap_j7* data structure (Jin Xiaoyun). - Fix typos in comments detected on sun8i by Coccinelle (Julia Lawall). - Fix typos in comments on rzg2l (Biju Das). - Remove as unnecessary call to dev_err() as the error is already printed by the failing function on u8500 (Yang Li). - Register the thermal zones as hwmon sensors for the Qcom thermal sensors (Dmitry Baryshkov). - Fix 'tmon' tool compilation issue by adding phtread.h include (Markus Mayer). - Fix typo in the comments for the 'tmon' tool (Slark Xiao). - Make the thermal core use ida_alloc()/free() directly instead of ida_simple_get()/ida_simple_remove() that have been deprecated (keliu). - Drop ACPI_FADT_LOW_POWER_S0 check from the Intel PCH thermal control driver (Rafael Wysocki)" * tag 'thermal-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (39 commits) thermal/of: Initialize trip points separately thermal/of: Use thermal trips stored in the thermal zone thermal/core: Add thermal_trip in thermal_zone thermal/core: Rename 'trips' to 'num_trips' thermal/core: Move thermal_set_delay_jiffies to static thermal/core: Remove unneeded EXPORT_SYMBOLS thermal/of: Move thermal_trip structure to thermal.h thermal/of: Remove the device node pointer for thermal_trip thermal/of: Replace device node match with device node search thermal/core: Remove duplicate information when an error occurs thermal/core: Avoid calling ->get_trip_temp() unnecessarily thermal/tools/tmon: Fix typo 'the the' in comment thermal/tools/tmon: Include pthread and time headers in tmon.h thermal/ti-soc-thermal: Fix comment typo thermal/drivers/qcom/spmi-adc-tm5: Register thermal zones as hwmon sensors thermal/drivers/qcom/temp-alarm: Register thermal zones as hwmon sensors thermal/drivers/u8500: Remove unnecessary print function dev_err() thermal/drivers/rzg2l: Fix comments thermal/drivers/sun8i: Fix typo in comment thermal/drivers/k3_j72xx_bandgap: Make k3_j72xx_bandgap_j721e_data and k3_j72xx_bandgap_j7200_data static ... commit a771ea6413c00cf4af0570745f2e27084d7e2376 Merge: 8fa0db3a9b8e aa727b7b4b67 Author: Linus Torvalds Date: Tue Aug 2 11:17:00 2022 -0700 Merge tag 'pm-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These are mostly minor improvements all over including new CPU IDs for the Intel RAPL driver, an Energy Model rework to use micro-Watt as the power unit, cpufreq fixes and cleanus, cpuidle updates, devfreq updates, documentation cleanups and a new version of the pm-graph suite of utilities. Specifics: - Make cpufreq_show_cpus() more straightforward (Viresh Kumar). - Drop unnecessary CPU hotplug locking from store() used by cpufreq sysfs attributes (Viresh Kumar). - Make the ACPI cpufreq driver support the boost control interface on Zhaoxin/Centaur processors (Tony W Wang-oc). - Print a warning message on attempts to free an active cpufreq policy which should never happen (Viresh Kumar). - Fix grammar in the Kconfig help text for the loongson2 cpufreq driver (Randy Dunlap). - Use cpumask_var_t for an on-stack CPU mask in the ondemand cpufreq governor (Zhao Liu). - Add trace points for guest_halt_poll_ns grow/shrink to the haltpoll cpuidle driver (Eiichi Tsukata). - Modify intel_idle to treat C1 and C1E as independent idle states on Sapphire Rapids (Artem Bityutskiy). - Extend support for wakeirq to callback wrappers used during system suspend and resume (Ulf Hansson). - Defer waiting for device probe before loading a hibernation image till the first actual device access to avoid possible deadlocks reported by syzbot (Tetsuo Handa). - Unify device_init_wakeup() for PM_SLEEP and !PM_SLEEP (Bjorn Helgaas). - Add Raptor Lake-P to the list of processors supported by the Intel RAPL driver (George D Sworo). - Add Alder Lake-N and Raptor Lake-P to the list of processors for which Power Limit4 is supported in the Intel RAPL driver (Sumeet Pawnikar). - Make pm_genpd_remove() check genpd_debugfs_dir against NULL before attempting to remove it (Hsin-Yi Wang). - Change the Energy Model code to represent power in micro-Watts and adjust its users accordingly (Lukasz Luba). - Add new devfreq driver for Mediatek CCI (Cache Coherent Interconnect) (Johnson Wang). - Convert the Samsung Exynos SoC Bus bindings to DT schema of exynos-bus.c (Krzysztof Kozlowski). - Address kernel-doc warnings by adding the description for unused function parameters in devfreq core (Mauro Carvalho Chehab). - Use NULL to pass a null pointer rather than zero according to the function propotype in imx-bus.c (Colin Ian King). - Print error message instead of error interger value in tegra30-devfreq.c (Dmitry Osipenko). - Add checks to prevent setting negative frequency QoS limits for CPUs (Shivnandan Kumar). - Update the pm-graph suite of utilities to the latest revision 5.9 including multiple improvements (Todd Brandt). - Drop pme_interrupt reference from the PCI power management documentation (Mario Limonciello)" * tag 'pm-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (27 commits) powercap: RAPL: Add Power Limit4 support for Alder Lake-N and Raptor Lake-P PM: QoS: Add check to make sure CPU freq is non-negative PM: hibernate: defer device probing when resuming from hibernation intel_idle: make SPR C1 and C1E be independent cpufreq: ondemand: Use cpumask_var_t for on-stack cpu mask cpufreq: loongson2: fix Kconfig "its" grammar pm-graph v5.9 cpufreq: Warn users while freeing active policy cpufreq: scmi: Support the power scale in micro-Watts in SCMI v3.1 firmware: arm_scmi: Get detailed power scale from perf Documentation: EM: Switch to micro-Watts scale PM: EM: convert power field to micro-Watts precision and align drivers PM / devfreq: tegra30: Add error message for devm_devfreq_add_device() PM / devfreq: imx-bus: use NULL to pass a null pointer rather than zero PM / devfreq: shut up kernel-doc warnings dt-bindings: interconnect: samsung,exynos-bus: convert to dtschema PM / devfreq: mediatek: Introduce MediaTek CCI devfreq driver dt-bindings: interconnect: Add MediaTek CCI dt-bindings PM: domains: Ensure genpd_debugfs_dir exists before remove PM: runtime: Extend support for wakeirq for force_suspend|resume ... commit 8fa0db3a9b8ef310eb40cf91481141ece084f584 Merge: 64ae88ff48cb 6352f3478a95 Author: Linus Torvalds Date: Tue Aug 2 11:12:25 2022 -0700 Merge tag 'acpi-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These rework the handling of ACPI device objects to use the driver core facilities for managing child ones instead of some questionable home-grown ways without the requisite locking and reference counting, clean up the EC driver, improve suspend-to-idle handling on x86, add some systems to the ACPI backlight quirk list, fix some assorted issues, clean up code and improve documentation. Specifics: - Use facilities provided by the driver core and some additional helpers to handle the children of a given ACPI device object in multiple places instead of using the children and node list heads in struct acpi_device which is error prone (Rafael Wysocki). - Fix ACPI-related device reference counting issue in the hisi_lpc bus driver (Yang Yingliang). - Drop the children and node list heads that are not needed any more from struct acpi_device (Rafael Wysocki). - Drop driver member from struct acpi_device (Uwe Kleine-König). - Drop redundant check from acpi_device_remove() (Uwe Kleine-König). - Prepare the CPPC library for handling backwards-compatible future _CPC return package formats gracefully (Rafael Wysocki). - Clean up the ACPI EC driver after previous changes in it (Hans de Goede). - Drop leftover acpi_processor_get_limit_info() declaration (Riwen Lu). - Split out thermal initialization from ACPI PSS (Riwen Lu). - Annotate more functions in the ACPI CPU idle driver to live in the cpuidle section (Guilherme G. Piccoli). - Fix _EINJ vs "special purpose" EFI memory regions (Dan Williams). - Implement a better fix to avoid spamming the console with old error logs (Tony Luck). - Fix typo in a comment in the APEI code (Xiang wangx). - Save NVS memory during transitions into S3 on Lenovo G40-45 (Manyi Li). - Add support for upcoming AMD uPEP device ID AMDI008 to the ACPI suspend-to-idle driver for x86 platforms (Shyam Sundar S K). - Clean up checks related to the ACPI_FADT_LOW_POWER_S0 platform flag in the LPIT table driver and the suspend-to-idle driver for x86 platforms (Rafael Wysocki). - Print information messages regarding declared LPS0 idle support in the platform firmware (Rafael Wysocki). - Fix missing check in register_device_clock() in the ACPI driver for Intel SoCs (huhai). - Fix ACS setup in the VIOT table parser (Eric Auger). - Skip IRQ override on AMD Zen platforms where it's harmful (Chuanhong Guo). - Use native backlight on Dell Inspiron N4010 (Hans de Goede). - Use native backlight on some TongFang devices (Werner Sembach). - Drop X86 dependency from the ACPI backlight driver Kconfig (Riwen Lu). - Shorten the quirk list in the ACPI backlight driver by identifying Clevo by board_name only (Werner Sembach). - Remove useless NULL pointer checks from 2 ACPI PCI link management functions (Andrey Strachuk). - Fix obsolete example in the ACPI EINJ documentation (Qifu Zhang). - Update links and references to _DSD-related documents (Sudeep Holla)" * tag 'acpi-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (46 commits) ACPI/PCI: Remove useless NULL pointer checks ACPI: CPPC: Do not prevent CPPC from working in the future ACPI: PM: x86: Print messages regarding LPS0 idle support ACPI: resource: skip IRQ override on AMD Zen platforms Documentation: ACPI: EINJ: Fix obsolete example ACPI: video: Use native backlight on Dell Inspiron N4010 ACPI: PM: s2idle: Use LPS0 idle if ACPI_FADT_LOW_POWER_S0 is unset Revert "ACPI / PM: LPIT: Register sysfs attributes based on FADT" ACPI: video: Shortening quirk list by identifying Clevo by board_name only ACPI: video: Force backlight native for some TongFang devices ACPI: PM: s2idle: Add support for upcoming AMD uPEP HID AMDI008 ACPI: VIOT: Fix ACS setup ACPI: bus: Drop unused list heads from struct acpi_device hisi_lpc: Use acpi_dev_for_each_child() bus: hisi_lpc: fix missing platform_device_put() in hisi_lpc_acpi_probe() ACPI: bus: Drop driver member of struct acpi_device ACPI: bus: Drop redundant check in acpi_device_remove() ACPI: APEI: Fix _EINJ vs EFI_MEMORY_SP ACPI: LPSS: Fix missing check in register_device_clock() ACPI: APEI: Better fix to avoid spamming the console with old error logs ... commit 6b822d408b58c3c4f26dae93245c6b7d8b39e0f9 Author: Li Zhijian Date: Mon Aug 1 06:43:46 2022 +0000 RDMA/ib_srpt: Unify checking rdma_cm_id condition in srpt_cm_req_recv() Although rdma_cm_id and ib_cm_id passing to srpt_cm_req_recv() are exclusive currently, all other checking condition are using rdma_cm_id. So unify the 'if' condition to make the code more clear. Link: https://lore.kernel.org/r/1659336226-2-1-git-send-email-lizhijian@fujitsu.com Signed-off-by: Li Zhijian Reviewed-by: Bart Van Assche Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/srpt/ib_srpt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 64ae88ff48cb5b3cc7b7aea97241a3e940085bf7 Merge: 530c28df03e7 cdbe34da01e3 Author: Linus Torvalds Date: Tue Aug 2 11:07:04 2022 -0700 Merge tag 'hwmon-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: - Substantial rewrite of lm90 driver to support several additional chips and improve support for existing chips. - Add support of ROG ZENITH II EXTREME, Maximus XI Hero, and Strix Z690-a D4 to asus-ec-sensors driver - Add support of F71858AD to f71882fg driver - Add support of Aquacomputer Quadro to aquacomputer_d5next driver - Improved assembler code and add support for Dell G5 5590 as well as XPS 13 7390 in dell-smm driver - Add support for ASUS TUF GAMING B550-PLUS WIFI II to nct775 driver - Add support for IEEE 754 half precision to PMBus core. Also support for Analog Devices LT7182S, improve regulator support, and report various MFR register values in debugfs. - Various other minor improvements and fixes * tag 'hwmon-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (85 commits) hwmon: (aquacomputer_d5next) Add support for Aquacomputer Quadro fan controller hwmon: (dell-smm) Improve documentation hwmon: (nct6775) add ASUS TUF GAMING B550-PLUS WIFI II hwmon: (occ) Replace open-coded variant of %*phN specifier hwmon: (sht15) Fix wrong assumptions in device remove callback hwmon: (aquacomputer_d5next) Add support for reading the +12V voltage sensor on D5 Next hwmon: (tps23861) fix byte order in current and voltage registers hwmon: (aspeed-pwm-tacho) increase fan tach period (again) hwmon: (aquacomputer_d5next) Add D5 Next fan control support hwmon: (mcp3021) improve driver support for newer hwmon interface hwmon: (asus-ec-sensors) add definitions for ROG ZENITH II EXTREME hwmon: (aquacomputer_d5next) Move device-specific data into struct aqc_data hwmon: (asus-ec-sensors) add missing sensors for X570-I GAMING hwmon: (drivetemp) Add module alias hwmon: (asus_wmi_sensors) Save a few bytes of memory hwmon: (lm90) Use worker for alarm notifications hwmon: (asus-ec-sensors) add support for Maximus XI Hero hwmon: (dell-smm) Improve assembly code hwmon: (pmbus/ltc2978) Set voltage resolution hwmon: (pmbus) Add list_voltage to pmbus ops ... commit 32f457abb84676f54a8d3144fd7504207d348f87 Author: Ian Rogers Date: Fri Jul 29 13:42:16 2022 -0700 perf parse-events: Don't #define YY_EXTRA_TYPE Adding a #define to side-effect a local include isn't clean, for example, it inhibits header precompilation. YY_EXTRA_TYPE is defined to be void* by default, so just remove. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20220729204217.250166-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 1 - 1 file changed, 1 deletion(-) commit 530c28df03e701618949bedf445b1c3c90854ea9 Merge: 0805c6fb39f6 8933d30c5f46 Author: Linus Torvalds Date: Tue Aug 2 11:04:41 2022 -0700 Merge tag 'pwm/for-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "After v5.19 had all drivers converted to the new atomic API and nobody has reported any breakage, this set of changes starts by dropping the legacy support. Some existing drivers get improvements and broader chip support and a new driver is added that emulates a PWM controller using a clock output. Other than that there's the usual bits of cleanups and minor fixes" * tag 'pwm/for-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (21 commits) pwm: lpc18xx: Fix period handling pwm: lpc18xx: Convert to use dev_err_probe() pwm: twl-led: Document some limitations and link to the reference manual MAINTAINERS: Remove myself as PWM maintainer MAINTAINERS: Add include/dt-bindings/pwm to PWM SUBSYSTEM dt-bindings: pwm: mediatek: Add compatible string for MT8195 pwm: Add clock based PWM output driver dt-bindings: pwm: Document clk based PWM controller pwm: sifive: Shut down hardware only after pwmchip_remove() completed pwm: sifive: Ensure the clk is enabled exactly once per running PWM pwm: sifive: Simplify clk handling pwm: sifive: Enable clk only after period check in .apply() pwm: sifive: Reduce time the controller lock is held pwm: sifive: Fold pwm_sifive_enable() into its only caller pwm: sifive: Simplify offset calculation for PWMCMP registers pwm: mediatek: Add MT8365 support dt-bindings: pwm: Add MT8365 SoC binding pwm: Drop unused forward declaration from pwm.h pwm: Reorder header file to get rid of struct pwm_capture forward declaration pwm: atmel-tcb: Fix typo in comment ... commit 0805c6fb39f66e01cb0adccfae8d9e0615c70fd7 Merge: 416e05e5b7ce 69243df953e7 Author: Linus Torvalds Date: Tue Aug 2 10:55:04 2022 -0700 Merge tag 'spi-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "The big update this time around is some excellent work from David Jander who went through the fast path and really eliminated overheads, meaning that we are seeing a huge reduction in the time spent between transfers for single threaded clients. Benchmarking has been coming out at about a halving of overhead which is clearly visible in system level usage that stresses SPI like some CAN and IIO applications, especially with small transfers. Thanks to David for taking the time to drill down into this and push the work upstream. Otherwise there's been a bunch of new device support and the usual updates. - Optimisation of the fast path, particularly around the number and types of locking operations, from David Jander. - Support for Arbel NPCM845, HP GXP, Intel Meteor Lake and Thunder Bay, MediaTek MT8188 and MT8365, Microchip FPGAs, nVidia Tegra 241 and Samsung Exynos Auto v9 and 4210" * tag 'spi-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (97 commits) MAINTAINERS: add spi support to GXP spi: dt-bindings: add documentation for hpe,gxp-spifi spi: spi-gxp: Add support for HPE GXP SoCs spi: a3700: support BE for AC5 SPI driver spi/panel: dt-bindings: drop CPHA and CPOL from common properties spi: bcm2835: enable shared interrupt support spi: dt-bindings: spi-controller: correct example indentation spi: dt-bindings: qcom,spi-geni-qcom: allow three interconnects spi: npcm-fiu: Add NPCM8XX support dt-binding: spi: Add npcm845 compatible to npcm-fiu document spi: npcm-fiu: Modify direct read dummy configuration spi: atmel: remove #ifdef CONFIG_{PM, SLEEP} spi: dt-bindings: Add compatible for MediaTek MT8188 spi: dt-bindings: mediatek,spi-mtk-nor: Update bindings for nor flash spi: dt-bindings: atmel,at91rm9200-spi: convert to json-schema spi: tegra20-slink: fix UAF in tegra_slink_remove() spi: Fix simplification of devm_spi_register_controller spi: microchip-core: switch to use dev_err_probe() spi: microchip-core: switch to use devm_spi_alloc_master() spi: microchip-core: fix UAF in mchp_corespi_remove() ... commit fd5382c5805c4bcb50fd25b7246247d3f7114733 Author: Zhu Yanjun Date: Sun Jul 31 02:36:21 2022 -0400 RDMA/rxe: Fix error unwind in rxe_create_qp() In the function rxe_create_qp(), rxe_qp_from_init() is called to initialize qp, internally things like the spin locks are not setup until rxe_qp_init_req(). If an error occures before this point then the unwind will call rxe_cleanup() and eventually to rxe_qp_do_cleanup()/rxe_cleanup_task() which will oops when trying to access the uninitialized spinlock. Move the spinlock initializations earlier before any failures. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20220731063621.298405-1-yanjun.zhu@linux.dev Reported-by: syzbot+833061116fa28df97f3b@syzkaller.appspotmail.com Signed-off-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_qp.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 416e05e5b7ce63402a2c342472799d340559f10e Merge: 2e7a95156d64 efc93392960c Author: Linus Torvalds Date: Tue Aug 2 10:23:10 2022 -0700 Merge tag 'regulator-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "This has been a fairly quiet release for the regulator API, a few new drivers and a small API update: - Support for specifying an initial load as part of requesting regulators through the bulk API - Support for Maxim MAX597x, Qualcomm PM8074, PM8909 and Realtek RT5120 devices" * tag 'regulator-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (35 commits) regulator: core: Allow drivers to define their init data as const regulator: core: Allow specifying an initial load w/ the bulk API regulator: mt6380: Fix unused array warning regulator: Add missing type for 'regulator-microvolt-offset' regulator: core: Fix off-on-delay-us for always-on/boot-on regulators regulator: of: Fix refcount leak bug in of_get_regulation_constraints() regulator: pwm: Update Lee Jones' email address regulator: max597x: Don't return uninitialized variable in .probe regulator: qcom,spmi-regulator: add PMP8074 PMIC regulator: qcom,spmi-regulator: Convert to dtschema regulator: qcom_spmi: add support for PMP8074 regulators regulator: qcom_spmi: add support for HT_P600 regulator: qcom_spmi: add support for HT_P150 regulator: max597x: Remove unused including regulator: Fix MFD_MAX597X dependency regulator: Fix parameter declaration and spelling mistake. regulator: max597x: Add support for max597x regulator regulator: scmi: Add missing of_node_get() regulator: qcom_smd: Add PM8909 RPM regulators regulator: dt-bindings: qcom,smd-rpm: Add PM8909 ... commit 2757a4dc184997c66ef1de32636f73b9f21aac14 Author: David Howells Date: Wed Jul 6 11:26:14 2022 +0100 afs: Fix access after dec in put functions Reference-putting functions should not access the object being put after decrementing the refcount unless they reduce the refcount to zero. Fix a couple of instances of this in afs by copying the information to be logged by tracepoint to local variables before doing the decrement. [Fixed a bit in afs_put_server() that I'd missed but Marc caught] Fixes: 341f741f04be ("afs: Refcount the afs_call struct") Fixes: 452181936931 ("afs: Trace afs_server usage") Fixes: 977e5f8ed0ab ("afs: Split the usage count on struct afs_server") Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/165911278430.3745403.16526310736054780645.stgit@warthog.procyon.org.uk/ # v1 fs/afs/cmservice.c | 2 +- fs/afs/rxrpc.c | 11 ++++++----- fs/afs/server.c | 22 +++++++++++++--------- include/trace/events/afs.h | 12 ++++++------ 4 files changed, 26 insertions(+), 21 deletions(-) commit 2e7a95156d64667a8ded606829d57c6fc92e41df Merge: 7d0d3fa7339e 739f872e48d4 Author: Linus Torvalds Date: Tue Aug 2 10:12:25 2022 -0700 Merge tag 'regmap-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "The big thing this release is a big cleanup of the interrupt code from Aidan MacDonald, plus a few new API updates: - Rework of the interrupt code, making it much simpler and easier to extend - Support for device specific update bits operations with devices that otherwise use bitstream interfaces - Support for bit operations on fields as well as whole registers" * tag 'regmap-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: permit to set reg_update_bits with bulk implementation regmap: add WARN_ONCE when invalid mask is provided to regmap_field_init() regmap-irq: Fix bug in regmap_irq_get_irq_reg_linear() regmap: cache: Add extra parameter check in regcache_init regmap-irq: Deprecate the not_fixed_stride flag regmap-irq: Add get_irq_reg() callback regmap-irq: Fix inverted handling of unmask registers regmap-irq: Deprecate type registers and virtual registers regmap-irq: Introduce config registers for irq types regmap-irq: Refactor checks for status bulk read support regmap-irq: Remove mask_writeonly and regmap_irq_update_bits() regmap-irq: Remove inappropriate uses of regmap_irq_update_bits() regmap-irq: Remove an unnecessary restriction on type_in_mask regmap-irq: Cleanup sizeof(...) use in memory allocation regmap-irq: Remove unused type_reg_stride field regmap-irq: Convert bool bitfields to unsigned int regmap: Don't warn about cache only mode for devices with no cache regmap: provide regmap_field helpers for simple bit operations regmap: cache: Fix syntax errors in comments commit c56f9ec8b20f931014574b943590c4d830109380 Author: David Howells Date: Wed Jul 6 10:52:14 2022 +0100 afs: Use refcount_t rather than atomic_t Use refcount_t rather than atomic_t in afs to make use of the count checking facilities provided. Signed-off-by: David Howells Reviewed-by: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/165911277768.3745403.423349776836296452.stgit@warthog.procyon.org.uk/ # v1 fs/afs/cell.c | 61 ++++++++++++++++++++++------------------------ fs/afs/cmservice.c | 2 +- fs/afs/internal.h | 16 ++++++------ fs/afs/proc.c | 6 ++--- fs/afs/rxrpc.c | 26 +++++++++++--------- fs/afs/server.c | 40 +++++++++++++++++------------- fs/afs/vl_list.c | 19 +++++---------- fs/afs/volume.c | 21 ++++++++++------ include/trace/events/afs.h | 26 ++++++++++---------- 9 files changed, 110 insertions(+), 107 deletions(-) commit 7e7a24c3c6c98abc4425abd1dbf2a71b42dfafcf Author: Krzysztof Kozlowski Date: Wed Jul 27 18:41:48 2022 +0200 dt-bindings: mtd: microchip,mchp48l640: use spi-peripheral-props.yaml Instead of listing directly properties typical for SPI peripherals, reference the spi-peripheral-props.yaml schema. This allows using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. Remove the spi-* properties which now come via spi-peripheral-props.yaml schema, except for the cases when device schema adds some constraints like maximum frequency. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Tudor Ambarus Reviewed-by: Heiko Schocher Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220727164148.385476-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8bb5e7f4dcd9b9ef22a3ea25c9066a8a968f12dd Merge: 2a96271fb66c 7c744d00990e Author: Dmitry Torokhov Date: Tue Aug 2 10:06:12 2022 -0700 Merge branch 'next' into for-linus Prepare input updates for 5.20 (or 6.0) merge window. commit 7c744d00990ea999d27f306f6db5ccb61b1304b2 Author: Dmitry Torokhov Date: Tue Aug 2 10:00:00 2022 -0700 Input: adc-joystick - fix ordering in adc_joystick_probe() We should register the IIO buffer before we register the input device, because as soon as the device is registered input handlers may attach to it, resulting in a call to adc_joystick_open() which makes use of the said buffer. Acked-by: Artur Rojek Link: https://lore.kernel.org/r/YskFh4NHnlcryMkk@google.com Signed-off-by: Dmitry Torokhov drivers/input/joystick/adc-joystick.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 1ea78ec5ba3143120c65be5f166fa61b528c4c2c Author: Krzysztof Kozlowski Date: Tue Jul 26 13:57:48 2022 +0200 dt-bindings: power: supply: drop quotes when not needed Id and schema fields do not need quotes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220726115748.101015-3-krzysztof.kozlowski@linaro.org .../bindings/power/supply/active-semi,act8945a-charger.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/bq2415x.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/bq24190.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/bq24257.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/bq24735.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/bq2515x.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/bq256xx.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/bq25890.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/bq25980.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/bq27xxx.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/cpcap-battery.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/cpcap-charger.yaml | 4 ++-- .../devicetree/bindings/power/supply/dlg,da9150-charger.yaml | 4 ++-- .../devicetree/bindings/power/supply/dlg,da9150-fuel-gauge.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/ingenic,battery.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/isp1704.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/lego,ev3-battery.yaml | 4 ++-- .../devicetree/bindings/power/supply/lltc,lt3651-charger.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/lltc,ltc294x.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/ltc4162-l.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/maxim,ds2760.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/maxim,max14656.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/maxim,max17040.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/maxim,max17042.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/maxim,max8903.yaml | 4 ++-- .../devicetree/bindings/power/supply/nokia,n900-battery.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/olpc-battery.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/power-supply.yaml | 4 ++-- .../devicetree/bindings/power/supply/richtek,rt5033-battery.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/richtek,rt9455.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/sc2731-charger.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/sc27xx-fg.yaml | 4 ++-- .../devicetree/bindings/power/supply/stericsson,ab8500-btemp.yaml | 4 ++-- .../devicetree/bindings/power/supply/stericsson,ab8500-chargalg.yaml | 4 ++-- .../devicetree/bindings/power/supply/stericsson,ab8500-charger.yaml | 4 ++-- .../devicetree/bindings/power/supply/stericsson,ab8500-fg.yaml | 4 ++-- .../devicetree/bindings/power/supply/summit,smb347-charger.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/tps65090-charger.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/tps65217-charger.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/twl4030-charger.yaml | 4 ++-- .../bindings/power/supply/x-powers,axp20x-ac-power-supply.yaml | 4 ++-- .../bindings/power/supply/x-powers,axp20x-battery-power-supply.yaml | 4 ++-- .../bindings/power/supply/x-powers,axp20x-usb-power-supply.yaml | 4 ++-- 43 files changed, 86 insertions(+), 86 deletions(-) commit 7ae0d493a5af9dcd929b721d31a3cfad21f5fbda Author: Krzysztof Kozlowski Date: Tue Jul 26 13:57:47 2022 +0200 dt-bindings: power: reset: drop quotes when not needed string literals do not need quotes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220726115748.101015-2-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/power/reset/regulator-poweroff.yaml | 2 +- Documentation/devicetree/bindings/power/reset/xlnx,zynqmp-power.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 93215d9f46015099b932b6d463242540e841f696 Author: Krzysztof Kozlowski Date: Tue Jul 26 13:57:46 2022 +0200 dt-bindings: power: drop quotes when not needed Id and schema fields do not need quotes. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Hector Martin Reviewed-by: Martin Blumenstingl Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220726115748.101015-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/power/amlogic,meson-ee-pwrc.yaml | 4 ++-- Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml | 4 ++-- Documentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml | 2 +- Documentation/devicetree/bindings/power/brcm,bcm63xx-power.yaml | 4 ++-- Documentation/devicetree/bindings/power/renesas,apmu.yaml | 4 ++-- Documentation/devicetree/bindings/power/renesas,rcar-sysc.yaml | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) commit c9776457bd5eaad4ce4ecb17af8d8f3cc6957c0b Author: Maor Gottlieb Date: Sun Jul 31 11:29:08 2022 +0300 RDMA/mlx5: Add missing check for return value in get namespace flow Add missing check for return value when calling to mlx5_ib_ft_type_to_namespace, even though it can't really fail in this specific call. Fixes: 52438be44112 ("RDMA/mlx5: Allow inserting a steering rule to the FDB") Link: https://lore.kernel.org/r/7b9ceda217d9368a51dc47a46b769bad4af9ac92.1659256069.git.leonro@nvidia.com Reviewed-by: Itay Aveksis Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/fs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 62494ec7fbca4d58900eb62e075f2fedc85b5fb9 Author: Bob Pearson Date: Wed Jul 20 04:56:07 2022 -0400 RDMA/rxe: Split qp state for requester and completer Currently the requester can continue to process send wqes after an local qp operation error is detected because the setting of the qp state to the error state is deferred until later. This patch splits the qp state for the completer and requester into two separate states and sets qp->req.state = QP_STATE_ERROR as soon as the error is detected before another wqe can be executed. Link: https://lore.kernel.org/r/1658307368-1851-4-git-send-email-lizhijian@fujitsu.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_comp.c | 6 +++--- drivers/infiniband/sw/rxe/rxe_qp.c | 5 +++++ drivers/infiniband/sw/rxe/rxe_req.c | 1 + drivers/infiniband/sw/rxe/rxe_verbs.h | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) commit ae720bdb703b295fed4ded28e14dd06a534a3012 Author: Li Zhijian Date: Wed Jul 20 04:56:06 2022 -0400 RDMA/rxe: Generate error completion for error requester QP state As per IBTA specification, all subsequent WQEs while QP is in error state should be completed with a flush error. Here we check QP_STATE_ERROR after req_next_wqe() so that rxe_completer() has chance to be called where it will set CQ state to FLUSH ERROR and the completion can associate with its WQE. Link: https://lore.kernel.org/r/1658307368-1851-3-git-send-email-lizhijian@fujitsu.com Signed-off-by: Li Zhijian Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_req.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit dea4266f7bf2fc76e49b2e521feccd6c1dbca8c5 Author: Li Zhijian Date: Wed Jul 20 04:56:05 2022 -0400 RDMA/rxe: Update wqe_index for each wqe error completion Previously, if user space keeps sending abnormal wqe, queue.index will keep increasing while qp->req.wqe_index doesn't. Once qp->req.wqe_index==queue.index in next round, req_next_wqe() will treat queue as empty. In such case, no new completion would be generated. Update wqe_index for each wqe completion so that req_next_wqe() can get next wqe properly. Link: https://lore.kernel.org/r/1658307368-1851-2-git-send-email-lizhijian@fujitsu.com Signed-off-by: Li Zhijian Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_req.c | 2 ++ 1 file changed, 2 insertions(+) commit cf5e7a652168fba45410ac6f5b363fcf8677dea5 Author: Christoph Hellwig Date: Mon Jun 13 07:37:15 2022 +0200 fs: remove the NULL get_block case in mpage_writepages No one calls mpage_writepages with a NULL get_block paramter, so remove support for that case. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Matthew Wilcox (Oracle) fs/mpage.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit f2d3e573bff9fde1566a4a1d0c7372fa5b4fd9ee Author: Christoph Hellwig Date: Mon Jun 13 07:37:14 2022 +0200 fs: don't call ->writepage from __mpage_writepage All callers of mpage_writepage use block_write_full_page as their ->writepage implementation when called from mpage_writepages (although for ntfs3 this is obsfucated a bit). Just call block_write_full_page directly instead of going through the ->writepage indirection. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Matthew Wilcox (Oracle) fs/mpage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc9cf350d100f4c336edb228cbd078003430cfe7 Author: Christoph Hellwig Date: Mon Jun 13 07:37:13 2022 +0200 fs: remove the nobh helpers All callers are gone, so remove the now dead code. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Matthew Wilcox (Oracle) fs/buffer.c | 324 -------------------------------------------- fs/mpage.c | 25 +--- include/linux/buffer_head.h | 8 -- include/linux/mpage.h | 2 - 4 files changed, 1 insertion(+), 358 deletions(-) commit 002cbb135678a99de6f851b4b5d3dcf88b9ab63d Author: Christoph Hellwig Date: Mon Jun 13 07:37:12 2022 +0200 jfs: stop using the nobh helper The nobh mode is an obscure feature to save lowlevel for large memory 32-bit configurations while trading for much slower performance and has been long obsolete. Switch to the regular buffer head based helpers instead. Signed-off-by: Christoph Hellwig Signed-off-by: Matthew Wilcox (Oracle) fs/jfs/inode.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 0cc5b4ce7a3735ba0c64ed4c5a1f673165c4d5b2 Author: Christoph Hellwig Date: Mon Jun 13 07:37:11 2022 +0200 ext2: remove nobh support The nobh mode is an obscure feature to save lowlevel for large memory 32-bit configurations while trading for much slower performance and has been long obsolete. Remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Matthew Wilcox (Oracle) Documentation/filesystems/ext2.rst | 2 -- fs/ext2/ext2.h | 1 - fs/ext2/inode.c | 51 +++----------------------------------- fs/ext2/namei.c | 10 ++------ fs/ext2/super.c | 6 ++--- 5 files changed, 7 insertions(+), 63 deletions(-) commit 9139710148744bf10c57ec6ace4f5f9532e040f4 Author: Christoph Hellwig Date: Mon Jun 13 07:37:10 2022 +0200 ntfs3: refactor ntfs_writepages Handle the resident case with an explicit generic_writepages call instead of using the obscure overload that makes mpage_writepages with a NULL get_block do the same thing. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Matthew Wilcox (Oracle) fs/ntfs3/inode.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 9800562f2ab41656b0bdc2a41c77ab3f6dfdd6fc Author: Matthew Wilcox (Oracle) Date: Mon Jun 6 13:29:10 2022 -0400 mm/folio-compat: Remove migration compatibility functions migrate_page_move_mapping(), migrate_page_copy() and migrate_page_states() are all now unused after converting all the filesystems from aops->migratepage() to aops->migrate_folio(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig include/linux/migrate.h | 11 ----------- mm/folio-compat.c | 22 ---------------------- mm/ksm.c | 2 +- 3 files changed, 1 insertion(+), 34 deletions(-) commit 9d0ddc0cb575fd41ff16131b06e08e1feac43b81 Author: Matthew Wilcox (Oracle) Date: Mon Jun 6 11:53:31 2022 -0400 fs: Remove aops->migratepage() With all users converted to migrate_folio(), remove this operation. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig include/linux/fs.h | 2 -- mm/compaction.c | 5 ++--- mm/migrate.c | 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) commit 5409548df3876a6fa9115bce237c93c3d50d6cb6 Author: Matthew Wilcox (Oracle) Date: Mon Jun 6 11:30:43 2022 -0400 secretmem: Convert to migrate_folio This is little more than changing the types over; there's no real work being done in this function. Signed-off-by: Matthew Wilcox (Oracle) mm/secretmem.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit b890ec2a2c2d962f71ba31ae291f8fd252b46258 Author: Matthew Wilcox (Oracle) Date: Mon Jun 6 10:47:21 2022 -0400 hugetlb: Convert to migrate_folio This involves converting migrate_huge_page_move_mapping(). We also need a folio variant of hugetlb_set_page_subpool(), but that's for a later patch. Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Muchun Song Reviewed-by: Mike Kravetz fs/hugetlbfs/inode.c | 23 ++++++++++++++--------- include/linux/migrate.h | 6 +++--- mm/migrate.c | 18 +++++++++--------- 3 files changed, 26 insertions(+), 21 deletions(-) commit 3648951ceb0ad20756253e84df9337e2a5aae440 Author: Matthew Wilcox (Oracle) Date: Mon Jun 6 10:47:21 2022 -0400 aio: Convert to migrate_folio Use a folio throughout this function. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig fs/aio.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 1d5b9bd65619088cc7d9f0546420e755a690757c Author: Matthew Wilcox (Oracle) Date: Mon Jun 6 10:47:21 2022 -0400 f2fs: Convert to filemap_migrate_folio() filemap_migrate_folio() fits f2fs's needs perfectly. Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Chao Yu fs/f2fs/checkpoint.c | 4 +--- fs/f2fs/data.c | 40 +--------------------------------------- fs/f2fs/f2fs.h | 4 ---- fs/f2fs/node.c | 4 +--- 4 files changed, 3 insertions(+), 49 deletions(-) commit e7b15bae558cc118ef8eb57d5d90295ece0caa7d Author: Matthew Wilcox (Oracle) Date: Mon Jun 6 10:47:21 2022 -0400 ubifs: Convert to filemap_migrate_folio() filemap_migrate_folio() is a little more general than ubifs really needs, but it's better to share the code. Signed-off-by: Matthew Wilcox (Oracle) fs/ubifs/file.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) commit e7a60a1787fc5202860918c62d319624444998d8 Author: Matthew Wilcox (Oracle) Date: Mon Jun 6 10:47:21 2022 -0400 btrfs: Convert btrfs_migratepage to migrate_folio Use filemap_migrate_folio() to do the bulk of the work, and then copy the ordered flag across if needed. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Acked-by: David Sterba fs/btrfs/inode.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) commit 2ec810d59602f0e08847f986ef8e16469722496f Author: Matthew Wilcox (Oracle) Date: Mon Jun 6 12:55:08 2022 -0400 mm/migrate: Add filemap_migrate_folio() There is nothing iomap-specific about iomap_migratepage(), and it fits a pattern used by several other filesystems, so move it to mm/migrate.c, convert it to be filemap_migrate_folio() and convert the iomap filesystems to use it. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/gfs2/aops.c | 2 +- fs/iomap/buffered-io.c | 25 ------------------------- fs/xfs/xfs_aops.c | 2 +- fs/zonefs/super.c | 2 +- include/linux/iomap.h | 6 ------ include/linux/pagemap.h | 6 ++++++ mm/migrate.c | 20 ++++++++++++++++++++ 7 files changed, 29 insertions(+), 34 deletions(-) commit 541846502f4fe826cd7c16e4784695ac90736585 Author: Matthew Wilcox (Oracle) Date: Mon Jun 6 10:27:41 2022 -0400 mm/migrate: Convert migrate_page() to migrate_folio() Convert all callers to pass a folio. Most have the folio already available. Switch all users from aops->migratepage to aops->migrate_folio. Also turn the documentation into kerneldoc. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Acked-by: David Sterba drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 4 ++-- fs/btrfs/disk-io.c | 2 +- fs/nfs/write.c | 2 +- include/linux/migrate.h | 5 ++-- mm/migrate.c | 37 ++++++++++++++++------------- mm/migrate_device.c | 3 ++- mm/shmem.c | 2 +- mm/swap_state.c | 2 +- 8 files changed, 30 insertions(+), 27 deletions(-) commit 4ae84a80475144f739f77ed8bc789bc7feaa08ce Author: Matthew Wilcox (Oracle) Date: Mon Jun 6 09:22:19 2022 -0400 nfs: Convert to migrate_folio Use a folio throughout this function. migrate_page() will be converted later. Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Anna Schumaker Reviewed-by: Christoph Hellwig fs/nfs/file.c | 4 +--- fs/nfs/internal.h | 6 ++++-- fs/nfs/write.c | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) commit 8958b55142d4ac81e42269d1d4c9311cc2ab3423 Author: Matthew Wilcox (Oracle) Date: Mon Jun 6 09:22:19 2022 -0400 btrfs: Convert btree_migratepage to migrate_folio Use a folio throughout this function. migrate_page() will be converted later. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Acked-by: David Sterba fs/btrfs/disk-io.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 108ca8358139bec4232319debfb20bafdaf4f877 Author: Matthew Wilcox (Oracle) Date: Mon Jun 6 16:25:10 2022 -0400 mm/migrate: Convert expected_page_refs() to folio_expected_refs() Now that both callers have a folio, convert this function to take a folio & rename it. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig mm/migrate.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 67235182a41c1bd6b32806a1556a1d299b84212b Author: Matthew Wilcox (Oracle) Date: Mon Jun 6 10:20:31 2022 -0400 mm/migrate: Convert buffer_migrate_page() to buffer_migrate_folio() Use a folio throughout __buffer_migrate_folio(), add kernel-doc for buffer_migrate_folio() and buffer_migrate_folio_norefs(), move their declarations to buffer.h and switch all filesystems that have wired them up. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig block/fops.c | 2 +- fs/ext2/inode.c | 4 +-- fs/ext4/inode.c | 4 +-- fs/ntfs/aops.c | 6 ++-- fs/ocfs2/aops.c | 2 +- include/linux/buffer_head.h | 10 ++++++ include/linux/fs.h | 12 ------- mm/migrate.c | 76 +++++++++++++++++++++++++++------------------ 8 files changed, 65 insertions(+), 51 deletions(-) commit 2be7fa10c028019f7b2fee11238987762567d41e Author: Matthew Wilcox (Oracle) Date: Mon Jun 6 09:41:03 2022 -0400 mm/migrate: Convert writeout() to take a folio Use a folio throughout this function. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig mm/migrate.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 8faa8ef5dd11abe119ad0c8ccd39f2064ca7ed0e Author: Matthew Wilcox (Oracle) Date: Mon Jun 6 09:34:36 2022 -0400 mm/migrate: Convert fallback_migrate_page() to fallback_migrate_folio() Use a folio throughout. migrate_page() will be converted to migrate_folio() later. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig mm/migrate.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 5490da4f06d182ba944706875029e98fe7f6b821 Author: Matthew Wilcox (Oracle) Date: Mon Jun 6 09:00:16 2022 -0400 fs: Add aops->migrate_folio Provide a folio-based replacement for aops->migratepage. Update the documentation to document migrate_folio instead of migratepage. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Documentation/filesystems/locking.rst | 5 +++-- Documentation/filesystems/vfs.rst | 14 +++++++------- include/linux/fs.h | 4 +++- mm/compaction.c | 4 +++- mm/migrate.c | 11 +++++++---- 5 files changed, 23 insertions(+), 15 deletions(-) commit 68f2736a858324c3ec852f6c2cddd9d1c777357d Author: Matthew Wilcox (Oracle) Date: Tue Jun 7 15:38:48 2022 -0400 mm: Convert all PageMovable users to movable_operations These drivers are rather uncomfortably hammered into the address_space_operations hole. They aren't filesystems and don't behave like filesystems. They just need their own movable_operations structure, which we can point to directly from page->mapping. Signed-off-by: Matthew Wilcox (Oracle) Documentation/filesystems/locking.rst | 4 -- Documentation/filesystems/vfs.rst | 12 ---- Documentation/vm/page_migration.rst | 113 +++------------------------------- arch/powerpc/platforms/pseries/cmm.c | 60 +----------------- drivers/misc/vmw_balloon.c | 61 +----------------- drivers/virtio/virtio_balloon.c | 47 +------------- include/linux/balloon_compaction.h | 6 +- include/linux/fs.h | 2 - include/linux/migrate.h | 56 +++++++++++++++-- include/linux/page-flags.h | 2 +- include/uapi/linux/magic.h | 4 -- mm/balloon_compaction.c | 10 ++- mm/compaction.c | 29 ++++----- mm/migrate.c | 24 ++++---- mm/util.c | 4 +- mm/z3fold.c | 84 +++---------------------- mm/zsmalloc.c | 102 +++++++----------------------- 17 files changed, 134 insertions(+), 486 deletions(-) commit 81218f80a70768589ee30e14a8889336f070a339 Author: Matthew Wilcox (Oracle) Date: Tue Jun 7 15:37:50 2022 -0400 secretmem: Remove isolate_page The isolate_page operation is never called for filesystems, only for device drivers which call SetPageMovable. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand mm/secretmem.c | 6 ------ 1 file changed, 6 deletions(-) commit 37ce0b319b287666e2133ca740b73089355fe498 Author: Matthew Wilcox (Oracle) Date: Tue May 17 18:06:23 2022 -0400 ext2: Use a folio in ext2_get_page() Remove a call to read_mapping_page(). Signed-off-by: Matthew Wilcox (Oracle) fs/ext2/dir.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 240159077d007527324a1e245ecd78b10a2b0d36 Author: Matthew Wilcox (Oracle) Date: Fri May 13 21:21:11 2022 -0400 gfs2: Convert gfs2_jhead_process_page() to use a folio Use folio_put_refs() to perform only one atomic operation instead of two. The other changes are straightforward conversions from page APIs to their folio equivalents. Signed-off-by: Matthew Wilcox (Oracle) fs/gfs2/lops.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 9bb88987bcb69243fdad03f1986de093a7702f7c Author: Matthew Wilcox (Oracle) Date: Fri Apr 29 11:12:16 2022 -0400 ocfs2: Convert ocfs2_read_folio() to use a folio Use the folio API throughout. There are a few places where we convert back to a page to call into the rest of the filesystem, so folio usage needs to be pushed down to those functions later. Signed-off-by: Matthew Wilcox (Oracle) fs/ocfs2/aops.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 36a43502e10c362b025a18218f9b41a358b46f28 Author: Matthew Wilcox (Oracle) Date: Fri Apr 29 11:12:16 2022 -0400 freevxfs: Convert vxfs_immed_read_folio() to use a folio Reorganise the file to remove the forward declaration. Use folios throughout vxfs_immed_read_folio(). Use memcpy_to_page() instead of an open-coded kmap()/kunmap(). Remove flush_dcache_page() as this is embedded in memcpy_to_page(). Use folio_pos() instead of opencoding it. Handle multi-page folios. Signed-off-by: Matthew Wilcox (Oracle) fs/freevxfs/vxfs_immed.c | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) commit 9a0a9533239f682bfacbba509bb299acb8c94918 Author: Matthew Wilcox (Oracle) Date: Fri Apr 29 11:12:16 2022 -0400 coda: Convert coda_symlink_filler() to use a folio This is a straightforward conversion from the page APIs to the folio APIs. Symlinks are not allowed to be larger than PAGE_SIZE, so there is little work to do here. Signed-off-by: Matthew Wilcox (Oracle) fs/coda/symlink.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit ac09d88b9fd2173ec8526ce4a3a8951b9edc1574 Author: Matthew Wilcox (Oracle) Date: Fri Apr 29 11:12:16 2022 -0400 befs: Convert befs_symlink_read_folio() to use a folio This is a straightforward conversion from the page APIs to the folio APIs. Symlinks are not allowed to be larger than PAGE_SIZE, so there is little work to do here. Signed-off-by: Matthew Wilcox (Oracle) fs/befs/linuxvfs.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 4fdc08d418f5ca68da64bbfefc03511b8c3dceea Author: Matthew Wilcox (Oracle) Date: Tue May 17 23:43:35 2022 -0400 block: Convert read_part_sector() to use a folio This relatively straightforward converion saves a call to compound_head() hidden inside put_page(). Signed-off-by: Matthew Wilcox (Oracle) block/partitions/check.h | 4 ++-- block/partitions/core.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) commit 069fc464f1e80df06d156ef606cebc61ee00b63e Author: Matthew Wilcox (Oracle) Date: Tue May 17 23:40:45 2022 -0400 block: Use PAGE_SECTORS_SHIFT The bare use of '9' confuses some people. We also don't need this cast, since the compiler does exactly that cast for us. Signed-off-by: Matthew Wilcox (Oracle) block/partitions/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 98d8ba69ff1ac168e73ac509228c4701bf6c3b87 Author: Matthew Wilcox (Oracle) Date: Tue May 17 23:38:37 2022 -0400 block: Handle partition read errors more consistently Set p->v to NULL if we try to read beyond the end of the disk, just like we do if we get an error returned from trying to read the disk. Signed-off-by: Matthew Wilcox (Oracle) block/partitions/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b5d143c95533aa18ac3b39b82568391a7225a61 Author: Matthew Wilcox (Oracle) Date: Tue May 17 23:36:55 2022 -0400 block: Simplify read_part_sector() That rather complicated expression is just trying to find the offset of this sector within a page, and there are easier ways to express that. Signed-off-by: Matthew Wilcox (Oracle) block/partitions/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cf948cbc35e80bbdde41fec0bb7f2a7c5e276ffb Author: Matthew Wilcox (Oracle) Date: Wed May 18 08:54:42 2022 -0400 cramfs: read_mapping_page() is synchronous Since commit 67f9fd91f93c, the code to wait for the read to complete has been dead. That commit wrongly stated that the read was synchronous already; this seems to have been a confusion about which ->readpage operation was being called. Instead of reintroducing an asynchronous version of read_mapping_page(), call the readahead code directly to submit all reads first before waiting for them in read_mapping_page(). Signed-off-by: Matthew Wilcox (Oracle) fs/cramfs/inode.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 97a3a383c4f29f16e9a8265ea188f274516e1076 Author: Matthew Wilcox (Oracle) Date: Fri May 27 11:29:24 2022 -0400 ocfs2: Use filemap_write_and_wait_range() in ocfs2_cow_sync_writeback() Remove the open-coding of filemap_fdatawait_range(). Signed-off-by: Matthew Wilcox (Oracle) fs/ocfs2/refcounttree.c | 42 ++++++------------------------------------ 1 file changed, 6 insertions(+), 36 deletions(-) commit e775dfb33d81455bb043e447c5bdca76ae60ea15 Author: Matthew Wilcox (Oracle) Date: Fri May 27 11:20:56 2022 -0400 hostfs: Handle page write errors correctly If a page can't be written back, we need to call mapping_set_error(), not clear the page's Uptodate flag. Also remove the clearing of PageError on success; that flag is used for read errors, not write errors. Signed-off-by: Matthew Wilcox (Oracle) fs/hostfs/hostfs_kern.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 31e748e4b1df84dbb136f2e1dc542daefbe202b2 Author: Matthew Wilcox (Oracle) Date: Thu May 26 23:33:43 2022 -0400 squashfs: Return the actual error from squashfs_read_folio() Since we actually know what error happened, we can report it instead of having the generic code return -EIO for pages that were unlocked without being marked uptodate. Also remove a test of PageError since we have the return value at this point. Signed-off-by: Matthew Wilcox (Oracle) fs/squashfs/file.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit b7a6eb22ba10f8f6104575dbbbe8c5ad36afd9ac Author: Matthew Wilcox (Oracle) Date: Thu May 26 23:19:49 2022 -0400 buffer: Don't test folio error in block_read_full_folio() We can cache this information in a local variable instead of communicating from one part of the function to another via folio flags. Signed-off-by: Matthew Wilcox (Oracle) fs/buffer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 7d0d3fa7339ed5a06d6608b7cde9f079eba62bb1 Merge: dd65b964922e 1785ab769824 Author: Linus Torvalds Date: Tue Aug 2 08:35:17 2022 -0700 Merge tag 'arm-boardfiles-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM boardfile deprecation from Arnd Bergmann: "Over the past ten years, new machine support was based on device tree, and an initial set of about 400 boards using ATAGS with boardfile for booting were grandfathered in, with about half of them either removed or converted to DT over time. Based on the recent mailing list discussion I started, I have now turned the findings into a set of patches that marks most board files as 'depends on UNUSED_BOARD_FILES', leaving only 38 of the 196 boards. For the boards that are marked as unused, there are two final chances for potential users: The removal is scheduled to take place after the longterm stable kernel at the end of 2022, so users can stay on that version for another few years, and if anyone still has one of these machines and is planning to keep updating kernels beyond that version, they can speak up now to have their boards taken off the list again. Waiting for the LTS release also makes sure that there will be at least one longterm kernel that contains the recent multiplatform conversion along while still supporting all legacy boards. The short summary of the current status is: - The s3c24xx, cns3xxx, iop32x and mv78xx0 platforms have no known users and will be removed entirely. - The mmp and davinci platforms have DT support for the important machines and will become DT-only after this. - s3c64xx, dove, orion5x, and pxa keep some board files to allow those to be migrated over to DT more easily, but most board files are getting removed now. DT support on these platforms is partially working but requires changes to additional drivers for the other boards. - omap1, ep93xx, sa1100, footbridge and rpc have no DT support at the moment but have some boards with known users. Removing the board files that nobody uses should make it easier to try a DT conversion if anyone cares. There is no explicit timeline what happens with the boards that remain after this removal, but I expect to revisit this in the future, and with most boards gone, there will be a good time to do a treewide review of platform drivers that never gained DT support and have no remaining in-tree board files" Link: https://lore.kernel.org/linux-arm-kernel/CAK8P3a0Z9vGEQbVRBo84bSyPFM-LF+hs5w8ZA51g2Z+NsdtDQA@mail.gmail.com/ * tag 'arm-boardfiles-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: cns3xxx: add CONFIG_UNUSED_BOARD_FILES dependency ARM: iop32x: mark as unused ARM: s3c: mark most board files as unused ARM: omap1: add Kconfig dependencies for unused boards ARM: sa1100: mark most boards as unused ARM: footbridge: mark cats board for removal ARM: mmp: mark all board files for removal ARM: ep93xx: mark most board files as unused ARM: davinci: mark all ATAGS board files as unused ARM: orion: add ATAGS dependencies ARM: pxa: add Kconfig dependencies for ATAGS based boards ARM: add CONFIG_UNUSED_BOARD_FILES ARM: add ATAGS dependencies to non-DT platforms commit dd65b964922ed618a50866bd3895cf3ff646a5b9 Merge: 3a829d267e10 bccd70a73db2 Author: Linus Torvalds Date: Tue Aug 2 08:29:18 2022 -0700 Merge tag 'arm-newsoc-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM new SoC support from Arnd Bergmann: "This adds initial support for two SoC families that have been under review for a while. In both cases, the origonal idea was to have a minimally functional version, but we ended up leaving out the clk drivers that are still under review and will be merged through the corresponding subsystem tree. The Nuvoton NPCM8xx is a 64-bit Baseboard Management Controller and based on the 32-bit NPCM7xx family but is now getting added to arch/arm64 as well. Sunplus SP7021, also known as Plus1, is a general-purpose System-in-Package design based on the 32-bit Cortex-A7 SoC on the main chip, plus an I/O chip and memory in the same" * tag 'arm-newsoc-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (25 commits) MAINTAINERS: rectify entry for ARM/NUVOTON NPCM ARCHITECTURE arm64: defconfig: Add Nuvoton NPCM family support arm64: dts: nuvoton: Add initial NPCM845 EVB device tree arm64: dts: nuvoton: Add initial NPCM8XX device tree arm64: npcm: Add support for Nuvoton NPCM8XX BMC SoC dt-bindings: arm: npcm: Add nuvoton,npcm845 GCR compatible string dt-bindings: arm: npcm: Add nuvoton,npcm845 compatible string dt-bindings: arm: npcm: Add maintainer reset: npcm: Add NPCM8XX support dt-bindings: reset: npcm: Add support for NPCM8XX reset: npcm: using syscon instead of device data ARM: dts: nuvoton: add reset syscon property dt-bindings: reset: npcm: add GCR syscon property dt-binding: clk: npcm845: Add binding for Nuvoton NPCM8XX Clock dt-bindings: watchdog: npcm: Add npcm845 compatible string dt-bindings: timer: npcm: Add npcm845 compatible string ARM: dts: Add Sunplus SP7021-Demo-V3 board device tree ARM: sp7021_defconfig: Add Sunplus SP7021 defconfig ARM: sunplus: Add initial support for Sunplus SP7021 SoC irqchip: Add Sunplus SP7021 interrupt controller driver ... commit 3a829d267e10812e3b2c2d656ba9fdc117ea6579 Merge: 3976d758e045 c95a5712beee Author: Linus Torvalds Date: Tue Aug 2 08:21:58 2022 -0700 Merge tag 'arm-defconfig-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC defconfig updates from Arnd Bergmann: "This branch includes the usual updates to defconfig files, enabling additional driver support for the supported platforms. There is also a global refresh for all of them that reorders the lines according to the 'savedefconfig' output, but without removing lines that are no longer part of the refresh. I went through the most common removed lines to also address them while making sure to catch renamed options and add them back under the new name. The boardfile deprecation branch is based on top of this to avoid conflicts against removing the unused boardfile configs from the generic defconfig files" * tag 'arm-defconfig-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (24 commits) arm64: defconfig: Sync some configs with savedefconfig arm64: refresh defconfig file ARM: defconfig: kill remnants of CONFIG_LEDS ARM: defconfig: remove broken CONFIG_THUMB disables ARM: defconfig: address renamed CONFIG_DEBUG_INFO=y ARM: defconfig: remove stale CONFIG_ZBOOT_ROM entries ARM: defconfig: remove irda remnants ARM: refresh defconfig files arm64: defconfig: Demote Qualcomm USB PHYs to modules arm64: defconfig: Enable Qualcomm SC8280XP providers ARM: multi_v7_defconfig: Update configs for BCM63138 arm64: defconfig: enable Qualcomm Bandwidth Monitor arm64: defconfig: Enable Allwinner built in CODECs arm64: defconfig: Enable qcom interconnect drivers arm64: defconfig: Enable qcom ss & hs usb phy arm64: defconfig: enable Qualcomm LPG leds driver arm64: defconfig: Enable gpio-fan support arm64: defconfig: Enable DRM_V3D ARM: configs: Enable DRM_V3D arm64: defconfig: Enable R8A779G0 SoC ... commit 3976d758e045ed0485e0e665fb3b6692572576d7 Merge: 47b62edcd4eb 47d8f8b78b9b Author: Linus Torvalds Date: Tue Aug 2 08:15:25 2022 -0700 Merge tag 'arm-dt-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM DT updates from Arnd Bergmann: "As usual, the bulk of the changes for the SoC tree are devicetree file updates, and most of these changes are for 64-bit embedded machines. As before, there are a ton of style cleanups, and additional hardware support for existing machines. Looking only at the new SoC, the notable additions are: - A whole family of Broadcom broadband SoCs, both 32-bit and 64-bit: BCM63178, BCM63158, BCM4912, BCM6858, BCM6878, BCM6846, BCM63146, BCM6856, BCM6855, BCM6756, BCM63148, and BCM6813. Each SoC comes with a corresponding reference board. - The new NXP i.MX93 SoC, the follow-up to the popular i.MX6 and i.MX8 embedded SoCs, now using Cortex-A55 cores and the Ethos-U65 NPU. - Qualcomm Snapdragon 8cx Gen3 (SC8280XP), the current high end of Arm based Laptop SoCs, and its automotive cousin, the SA8540P. The SC8280XP is used in the Lenovo Thinkpad X13s laptop that also gets added here in addition to the reference boards. - Allwinner H616, a newer version of the H6 SoC, targeted at Set-top-box applications. It comes with dts files for the Orange Pi zero2 single-board computer and the X96 Mate set-top-box - Marvell Prestera 98DX2530 (AlleyCat5), a network switch chip in the Armada SoC family based on the Cortex-A55 core. New machines based on previously supported SoCs include: - Several new machines on NXP i.MX platforms: multiple Toradex Colibri boards using the "Iris" and "Ixora" carriers, DH electronics i.MX8M Plus DHCOM and PDK2, TQ-Systems TQMa8MPQL, and phytech phyBOARD-Polis-i.MX8MM. - Google Chameleon v3 FPGA board based on Intel Arria10 and Stratix 10 Software Virtual platform, both in the SoCFPGA platform. - Two new wireless devices based on Broadcom SoCs: The Asus GT-AX6000 Router and the Cisco Meraki MR26 access point - Improved Chromebook support for both the Mediatek and Qualcomm SoC families brought added machines: Acer Chromebook 514 (MT8192), Acer Chromebook Spin 513 (MT8195) and a couple of SC7180 based machines including the Lenovo IdeaPad Chromebook Duet 3. - Xiaomi Mi Mix2s, LG G7 and LG V35 are mobile phones based on Qualcomm SDM845, while Mi 5s Plus is based on MSM8996. - Finally, there are a few development board on other chips: PCB8309 (Microchip lan966x), Radxa Rock Pi S (Rockchips RK3308) DH DRC Compact (ST STM32MP1) and Inforce IFC6560 (Qualcomm SDM660)" * tag 'arm-dt-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (829 commits) dt-bindings: soc: bcm: use absolute path to other schema dt-bindings: soc: bcm: drop quotes when not needed dt-bindings: soc: microchip: use absolute path to other schema dt-bindings: soc: microchip: drop quotes when not needed ARM: dts: lan966x: keep lan966 entries alphabetically sorted ARM: dts: lan966x: add support for pcb8309 dt-bindings: arm: at91: add lan966 pcb8309 board ARM: dts: lan966x: Enable network driver on pcb8291 ARM: dts: lan966x: Disable can0 on pcb8291 ARM: dts: lan966x: Add gpio-restart dt-bindings: arm: aspeed: add Aspeed Evaluation boards arm64: dts: qcom: Add support for Xiaomi Mi Mix2s dt-bindings: arm: qcom: Add Xiaomi Mi Mix2s bindings dt-bindings: arm: qcom: Document lg,judyln and lg,judyp devices dt-bindings: arm: qcom: add missing SM6350 board compatibles dt-bindings: arm: qcom: add missing SM6125 board compatibles dt-bindings: arm: qcom: add missing SDM845 board compatibles dt-bindings: arm: qcom: add missing SDM636 board compatibles dt-bindings: arm: qcom: add missing SDM630 board compatibles dt-bindings: arm: qcom: add missing QCS404 board compatibles ... commit 47b62edcd4eb70ccf4ecfacaf1a960eecfd3f891 Merge: e233cc59d08f 99978d2fd90b Author: Linus Torvalds Date: Tue Aug 2 08:10:10 2022 -0700 Merge tag 'arm-drivers-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC drivers from Arnd Bergmann: "The SoC driver updates contain changes to improve support for additional SoC variants, as well as cleanups an minor bugfixes in a number of existing drivers. Notable updates this time include: - Support for Qualcomm MSM8909 (Snapdragon 210) in various drivers - Updates for interconnect drivers on Qualcomm Snapdragon - A new driver support for NMI interrupts on Fujitsu A64fx - A rework of Broadcom BCMBCA Kconfig dependencies - Improved support for BCM2711 (Raspberry Pi 4) power management to allow the use of the V3D GPU - Cleanups to the NXP guts driver - Arm SCMI firmware driver updates to add tracing support, and use the firmware interfaces for system power control and for power capping" * tag 'arm-drivers-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (125 commits) soc: a64fx-diag: disable modular build dt-bindings: soc: qcom: qcom,smd-rpm: add power-controller dt-bindings: soc: qcom: aoss: document qcom,sm8450-aoss-qmp dt-bindings: soc: qcom,rpmh-rsc: simplify qcom,tcs-config ARM: mach-qcom: Add support for MSM8909 dt-bindings: arm: cpus: Document "qcom,msm8909-smp" enable-method soc: qcom: spm: Add CPU data for MSM8909 dt-bindings: soc: qcom: spm: Add MSM8909 CPU compatible soc: qcom: rpmpd: Add compatible for MSM8909 dt-bindings: power: qcom-rpmpd: Add MSM8909 power domains soc: qcom: smd-rpm: Add compatible for MSM8909 dt-bindings: soc: qcom: smd-rpm: Add MSM8909 soc: qcom: icc-bwmon: Remove unnecessary print function dev_err() soc: fujitsu: Add A64FX diagnostic interrupt driver soc: qcom: socinfo: Fix the id of SA8540P SoC soc: qcom: Make QCOM_RPMPD depend on PM tty: serial: bcm63xx: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA spi: bcm63xx-hsspi: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA clk: bcm: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA hwrng: bcm2835: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA ... commit e233cc59d08f9bd389d4e8eaf71063150110b9b9 Merge: 9de1f9c8ca51 755d0ebc03f8 Author: Linus Torvalds Date: Tue Aug 2 08:02:59 2022 -0700 Merge tag 'arm-soc-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC updates from Arnd Bergmann: "The updates for arch/arm/mach-* platform code this time are mainly minor cleanups. Most notably, the DaVinci DM644x/DM646x SoC support gets removed. This was also scheduled for later removal early next year, but Linus Walleij asked for having them removed earlier to avoid problems for the GPIO subsystem" * tag 'arm-soc-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (38 commits) ARM: at91: setup outer cache .write_sec() callback if needed ARM: at91: add sam_linux_is_optee_available() function ARM: Marvell: Update PCIe fixup ARM: bcmbca: Include full family name in Kconfig ARM: bcm: NSP: Removed forced thermal selection ARM: debug: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA arm: bcmbca: Add BCMBCA sub platforms arm: bcmbca: Move BCM63138 ARCH_BCM_63XX to ARCH_BCMBCA MAINTAINERS: Move BCM63138 to bcmbca arch entry ARM: shmobile: rcar-gen2: Increase refcount for new reference ARM: davinci: Delete DM646x board files ARM: davinci: Delete DM644x board files firmware: xilinx: Add TF_A_PM_REGISTER_SGI SMC call cpufreq: zynq: Fix refcount leak in zynq_get_revision ARM: OMAP2+: Kconfig: Fix indentation ARM: OMAP2+: Fix refcount leak in omap3xxx_prm_late_init ARM: OMAP2+: pdata-quirks: Fix refcount leak bug ARM: OMAP2+: display: Fix refcount leak bug ARM: OMAP2+: Fix refcount leak in omapdss_init_of ARM: imx25: support silicon revision 1.2 ... commit 38ba0bb291aacd92d8eaa4a1aa8b63ce4286e797 Author: Andy Shevchenko Date: Tue Jul 12 12:08:37 2022 +0200 leds: is31fl319x: use simple i2c probe function The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. Signed-off-by: Andy Shevchenko Signed-off-by: Vincent Knecht Signed-off-by: Pavel Machek drivers/leds/leds-is31fl319x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e1af5c8155867e6773474649c76e5c68940008d5 Author: Andy Shevchenko Date: Tue Jul 12 12:08:36 2022 +0200 leds: is31fl319x: Fix devm vs. non-devm ordering When non-devm resources are allocated they mustn't be followed by devm allocations, otherwise it will break the tear down ordering and might lead to crashes or other bugs during ->remove() stage. Fix this by wrapping mutex_destroy() call with devm_add_action_or_reset(). Signed-off-by: Andy Shevchenko Signed-off-by: Vincent Knecht Signed-off-by: Pavel Machek drivers/leds/leds-is31fl319x.c | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) commit 0d77252bc4d28b6b80b4c9b56927cbf74a4d0eb1 Author: Andy Shevchenko Date: Tue Jul 12 12:08:35 2022 +0200 leds: is31fl319x: Make use of dev_err_probe() Simplify the error handling in probe function by switching from dev_err() to dev_err_probe(). Signed-off-by: Andy Shevchenko Signed-off-by: Vincent Knecht Signed-off-by: Pavel Machek drivers/leds/leds-is31fl319x.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) commit 69a9b172adbde580a645767a161bb4cc9dc63d9b Author: Andy Shevchenko Date: Tue Jul 12 12:08:34 2022 +0200 leds: is31fl319x: Make use of device properties Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Add mod_devicetable.h include. Signed-off-by: Andy Shevchenko Signed-off-by: Vincent Knecht Signed-off-by: Pavel Machek drivers/leds/Kconfig | 2 +- drivers/leds/leds-is31fl319x.c | 44 +++++++++++++++++++----------------------- 2 files changed, 21 insertions(+), 25 deletions(-) commit 774268347938bb8e541eb9f6831e24045c353811 Author: Vincent Knecht Date: Tue Jul 12 12:08:33 2022 +0200 leds: is31fl319x: Cleanup formatting and dev_dbg calls Fix remaining non-standard place for comments. Remove remaining dev_dbg after regmap_read in is31fl3196_brightness_set. Remove __func__ in dev_dbg calls, instead adding "channel" string to describe the first displayed value. Change remaining container_of() call to be on one line, as well as a few others. Signed-off-by: Vincent Knecht Signed-off-by: Pavel Machek drivers/leds/leds-is31fl319x.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit fa877cf1abb9ef297cfc413b78e998e4fc1394d3 Author: Vincent Knecht Date: Tue Jul 12 12:08:32 2022 +0200 leds: is31fl319x: Add support for is31fl319{0,1,3} chips Set specific chipset structs values for is31fl319{0,1,3} so that those chips can actually work. Datasheets: https://lumissil.com/assets/pdf/core/IS31FL3190_DS.pdf https://lumissil.com/assets/pdf/core/IS31FL3191_DS.pdf https://lumissil.com/assets/pdf/core/IS31FL3193_DS.pdf https://lumissil.com/assets/pdf/core/IS31FL3196_DS.pdf https://lumissil.com/assets/pdf/core/IS31FL3199_DS.pdf Signed-off-by: Vincent Knecht Signed-off-by: Pavel Machek drivers/leds/leds-is31fl319x.c | 161 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 147 insertions(+), 14 deletions(-) commit bd34266fdec2826b852dd099b17af5df2b8c92b1 Author: Vincent Knecht Date: Tue Jul 12 12:08:31 2022 +0200 leds: is31fl319x: Move chipset-specific values in chipdef struct Allow setting chips' specifics in chipdef struct by adding fields for: - the reset register address - a pointer to a regmap_config struct - a pointer to a brightness_set function - current default, min and max values - a boolean to distinguish 319{0,1,3} and 319{6,9} chips and use those fields in places where distinction has to be made. The fields for 319{0,1,3} still point to 319{6,9} values. No functional change. Signed-off-by: Vincent Knecht Signed-off-by: Pavel Machek drivers/leds/leds-is31fl319x.c | 208 +++++++++++++++++++++++++---------------- 1 file changed, 125 insertions(+), 83 deletions(-) commit 8e6dde1b4495348a90e8a49147e8145d957cda52 Author: Vincent Knecht Date: Tue Jul 12 12:08:30 2022 +0200 leds: is31fl319x: Use non-wildcard names for vars, structs and defines In order to add real support for is31fl3190, is31fl3191 and is31fl3193, rename variant-dependent elements to not use 319X where needed. 3190 suffix is used for is31fl3190, is31fl3191 and is31fl3193 circuits. 3196 suffix is used for is31fl3196 and is31fl3199. Those two groups have different register maps, current settings and even a different interpretation of the software shutdown bit: https://lumissil.com/assets/pdf/core/IS31FL3190_DS.pdf https://lumissil.com/assets/pdf/core/IS31FL3191_DS.pdf https://lumissil.com/assets/pdf/core/IS31FL3193_DS.pdf https://lumissil.com/assets/pdf/core/IS31FL3196_DS.pdf https://lumissil.com/assets/pdf/core/IS31FL3199_DS.pdf Rename variables, structures and defines in preparation of the splitting. No functional nor behaviour change. Signed-off-by: Vincent Knecht Signed-off-by: Pavel Machek drivers/leds/leds-is31fl319x.c | 142 ++++++++++++++++++++--------------------- 1 file changed, 71 insertions(+), 71 deletions(-) commit dc6d28f4859d1fcbd2f5505862a768f07c7a9770 Author: Vincent Knecht Date: Tue Jul 12 12:08:29 2022 +0200 leds: is31fl319x: Add missing si-en compatibles Add si-en compatibles for all chip variants. Signed-off-by: Vincent Knecht Signed-off-by: Pavel Machek drivers/leds/leds-is31fl319x.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0d98fbcf72f11b6a6fadcec16d4c7f317bf417ae Merge: 87df0cecc269 b3cbbb58632f Author: Arnd Bergmann Date: Tue Aug 2 16:09:12 2022 +0200 Merge tag 'socfpga_updates_for_v5.20_part2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/late SoCFPGA dts updates for v5.20, part 2 - Update EMAC AXI settings for Cyclone5 * tag 'socfpga_updates_for_v5.20_part2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: dts: add EMAC AXI settings for Cyclone5 arm64: dts: altera: socfpga_stratix10: move clocks out of soc node arm64: dts: Add support for Stratix 10 Software Virtual Platform dt-bindings: altera: document Stratix 10 SWVP compatibles arm64: dts: altera: adjust whitespace around '=' arm64: dts: intel: socfpga_agilex: use defined GIC interrupt type for ECC dt-bindings: altera: Add Chameleon v3 board ARM: dts: socfpga: Add Google Chameleon v3 devicetree ARM: dts: socfpga: Add atsha204a node to Mercury+ AA1 dts ARM: dts: socfpga: Move sdmmc-ecc node to Arria 10 dts ARM: dts: socfpga: Change Mercury+ AA1 dts to dtsi Link: https://lore.kernel.org/r/20220728223237.3184243-1-dinguyen@kernel.org Signed-off-by: Arnd Bergmann commit 6c955a9d9dbc0282a9aa14064fe456a10ee92fc6 Author: Takashi Iwai Date: Mon Aug 1 18:56:39 2022 +0200 ALSA: line6: Replace sprintf() with sysfs_emit() For sysfs outputs, it's safer to use a new helper, sysfs_emit(), instead of the raw sprintf() & co. This patch replaces those usages straightforwardly with a new helper, sysfs_emit(). Link: https://lore.kernel.org/r/20220801165639.26030-8-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/line6/pod.c | 8 ++++---- sound/usb/line6/podhd.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 17daae7ac47aa870e7042aa7eeaff987feab92c6 Author: Takashi Iwai Date: Mon Aug 1 18:56:38 2022 +0200 ALSA: hda: Replace sprintf() with sysfs_emit() For sysfs outputs, it's safer to use a new helper, sysfs_emit(), instead of the raw sprintf() & co. This patch replaces those usages straightforwardly with new helpers, sysfs_emit() and sysfs_emit_at(). Link: https://lore.kernel.org/r/20220801165639.26030-7-tiwai@suse.de Signed-off-by: Takashi Iwai sound/hda/hdac_sysfs.c | 42 +++++++++++++++++++++--------------------- sound/pci/hda/hda_sysfs.c | 23 +++++++++++------------ 2 files changed, 32 insertions(+), 33 deletions(-) commit 01043e3e14d3e17acf563e0ce27abd73c6edde7f Author: Takashi Iwai Date: Mon Aug 1 18:56:37 2022 +0200 ALSA: pcm: Replace sprintf() with sysfs_emit() For sysfs outputs, it's safer to use a new helper, sysfs_emit(), instead of the raw sprintf() & co. This patch replaces such a sprintf() call straightforwardly with the new helper. Link: https://lore.kernel.org/r/20220801165639.26030-6-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0031812bd849cf90a4b1a0f194b776b7e3cd1f2b Author: Takashi Iwai Date: Mon Aug 1 18:56:36 2022 +0200 ALSA: core: Replace scnprintf() with sysfs_emit() sysfs_emit() is a new helper to simplify the sysfs string output. Replace the open-code with this new helper. Link: https://lore.kernel.org/r/20220801165639.26030-5-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ade7956396d0e821097393bc4fe5773525f2634c Author: Takashi Iwai Date: Mon Aug 1 18:56:35 2022 +0200 ALSA: control-led: Replace sprintf() with sysfs_emit() For sysfs outputs, it's safer to use a new helper, sysfs_emit(), instead of the raw sprintf() & co. This patch replaces such sprintf() calls with sysfs_emit() while simplifying the open code in list_show(). Link: https://lore.kernel.org/r/20220801165639.26030-4-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/control_led.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit 0980bb1ff0f0ef0a3fb08f7596167eda2c932b45 Author: Takashi Iwai Date: Mon Aug 1 18:56:34 2022 +0200 ALSA: aoa: Replace sprintf() with sysfs_emit() For sysfs outputs, it's safer to use a new helper, sysfs_emit(), instead of the raw sprintf() & co. This patch replaces such sprintf() calls with sysfs_emit() while simplifying the open code in modalias_show(); as modalias[] is a NUL-terminated string, we can pass it straightly to a printf() argument. Link: https://lore.kernel.org/r/20220801165639.26030-3-tiwai@suse.de Signed-off-by: Takashi Iwai sound/aoa/soundbus/sysfs.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 7450320ec7ab11e89e3f9b8f2c1229f3964181c1 Author: Takashi Iwai Date: Mon Aug 1 18:56:33 2022 +0200 ALSA: ac97: Replace sprintf() with sysfs_emit() For sysfs outputs, it's safer to use a new helper, sysfs_emit(), instead of the raw sprintf() & co. This patch replaces the open code straightforwardly with a new helper. Link: https://lore.kernel.org/r/20220801165639.26030-2-tiwai@suse.de Signed-off-by: Takashi Iwai sound/ac97/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87df0cecc269317def877ed05966781e4389d122 Merge: d2fd1ddd311d 5316d73ba81b Author: Arnd Bergmann Date: Tue Aug 2 15:58:45 2022 +0200 Merge tag 'asahi-soc-dt-5.20' of https://github.com/AsahiLinux/linux into arm/late Apple SoC DT updates for 5.20. This round just adds the NVMe controller nodes, since that driver is finally upstream. Includes one related power domain fixup. * tag 'asahi-soc-dt-5.20' of https://github.com/AsahiLinux/linux: arm64: dts: apple: t8103: Add ANS2 NVMe nodes arm64: dts: apple: Re-parent ANS2 power domains Link: https://lore.kernel.org/r/6de8649c-9795-54a1-fa45-8dd50355061f@marcan.st Signed-off-by: Arnd Bergmann commit d2fd1ddd311d94460b285f9dac7e8dbcccd0b8bf Merge: 3d7cb6b04c3f d985db836226 Author: Arnd Bergmann Date: Tue Aug 2 15:57:46 2022 +0200 Merge tag 'reset-for-v5.20' of git://git.pengutronix.de/pza/linux into arm/late Reset controller updates for v5.20 Allow reset-simple to be selected under EXPERT and reset-a10sr to be built under COMPILE_TEST. Add Renesas RZ/G2UL USBPHY binding and a new driver for the TI TPS380x line of voltage supervisor ICs with manual reset control. A patch to make reset-microchip-sparx5 buildable as a module had to be reverted as that turned out to break MDIO on kswitch-d10. * tag 'reset-for-v5.20' of git://git.pengutronix.de/pza/linux: reset: tps380x: Fix spelling mistake "Voltags" -> "Voltage" reset: tps380x: Add TPS380x device driver supprt dt-bindings: reset: Add TPS380x documentation dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G2UL USBPHY Control bindings reset: reset-simple should depends on HAS_IOMEM Revert "reset: microchip-sparx5: allow building as a module" reset: a10sr: allow building under COMPILE_TEST reset: allow building of reset simple driver if expert config selected reset: microchip-sparx5: allow building as a module Link: https://lore.kernel.org/r/20220729133620.488379-1-p.zabel@pengutronix.de Signed-off-by: Arnd Bergmann commit 879bcfc4e5369c39f3199e13a188424d4fae8aa4 Merge: fe17b91a7777 57a2d0c1b27d Author: Arnd Bergmann Date: Tue Aug 2 15:57:14 2022 +0200 Merge tag 'asahi-soc-maintainers-5.20' of https://github.com/AsahiLinux/linux into arm/fixes Apple SoC MAINTAINERS updates for 5.20. Just one patch adding our shiny new mailing list to the relevant section. * tag 'asahi-soc-maintainers-5.20' of https://github.com/AsahiLinux/linux: MAINTAINERS: add ARM/APPLE MACHINE mailing list Link: https://lore.kernel.org/r/308defdf-8873-63ed-dc9c-a88cd7a3cc2f@marcan.st Signed-off-by: Arnd Bergmann commit fe17b91a7777df140d0f1433991da67ba658796c Author: Kunihiko Hayashi Date: Tue Aug 2 22:36:47 2022 +0900 arm64: dts: uniphier: Fix USB interrupts for PXs3 SoC An interrupt for USB device are shared with USB host. Set interrupt-names property to common "dwc_usb3" instead of "host" and "peripheral". Cc: stable@vger.kernel.org Fixes: d7b9beb830d7 ("arm64: dts: uniphier: Add USB3 controller nodes") Reported-by: Ryuta NAKANISHI Signed-off-by: Kunihiko Hayashi Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9b0dc7abb5cc43a2dbf90690c3c6011dcadc574d Author: Kunihiko Hayashi Date: Tue Aug 2 22:36:25 2022 +0900 ARM: dts: uniphier: Fix USB interrupts for PXs2 SoC An interrupt for USB device are shared with USB host. Set interrupt-names property to common "dwc_usb3" instead of "host" and "peripheral". Cc: stable@vger.kernel.org Fixes: 45be1573ad19 ("ARM: dts: uniphier: Add USB3 controller nodes") Reported-by: Ryuta NAKANISHI Signed-off-by: Kunihiko Hayashi Signed-off-by: Arnd Bergmann arch/arm/boot/dts/uniphier-pxs2.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4f1196288dfb6fc63e28e585392f2df3b8a63388 Author: William Dean Date: Fri Jul 29 09:57:26 2022 +0800 ovl: fix spelling mistakes fix follow spelling misktakes: decendant ==> descendant indentify ==> identify underlaying ==> underlying Reported-by: Hacash Robot Signed-off-by: William Dean Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 4 ++-- fs/overlayfs/super.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit b0de7fa706506bf0591037908376351beda8c5d6 Author: Frieder Schrempf Date: Tue Aug 2 08:43:34 2022 +0200 regulator: pca9450: Remove restrictions for regulator-name The device bindings shouldn't put any constraints on the regulator-name property specified in the generic bindings. This allows using arbitrary and descriptive names for the regulators. Suggested-by: Mark Brown Fixes: 7ae9e3a6bf3f ("dt-bindings: regulator: add pca9450 regulator yaml") Signed-off-by: Frieder Schrempf Link: https://lore.kernel.org/r/20220802064335.8481-1-frieder@fris.de Signed-off-by: Mark Brown .../devicetree/bindings/regulator/nxp,pca9450-regulator.yaml | 11 ----------- 1 file changed, 11 deletions(-) commit c0fc96fed7ffa3e58f58b9cdb7158b5c61e026a2 Author: syed sabakareem Date: Tue Aug 2 11:55:00 2022 +0530 ASoC: amd: yc: Update DMI table entries for AMD platforms Updated DMI entries 21EM, 21EN, 21J5 and 21J6 for AMD platforms P15v Gen 3 and P14s Gen 3. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216267 Signed-off-by: syed saba kareem Reported-by: Pananchikkal Renjith Link: https://lore.kernel.org/r/20220802062503.159328-1-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown sound/soc/amd/yc/acp6x-mach.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 8eaa1d110800fac050bab44001732747a1c39894 Author: Maxim Mikityanskiy Date: Fri Jul 29 15:13:56 2022 +0300 net/mlx5e: xsk: Discard unaligned XSK frames on striding RQ Striding RQ uses MTT page mapping, where each page corresponds to an XSK frame. MTT pages have alignment requirements, and XSK frames don't have any alignment guarantees in the unaligned mode. Frames with improper alignment must be discarded, otherwise the packet data will be written at a wrong address. Fixes: 282c0c798f8e ("net/mlx5e: Allow XSK frames smaller than a page") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Reviewed-by: Saeed Mahameed Reviewed-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20220729121356.3990867-1-maximmi@nvidia.com Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.h | 14 ++++++++++++++ include/net/xdp_sock_drv.h | 11 +++++++++++ 2 files changed, 25 insertions(+) commit bce02f71e48f7b89b9b52424ad2df4e5bc87a8ec Author: Christophe Leroy Date: Tue Aug 2 12:30:38 2022 +0200 EDAC/ppc_4xx: Include required of_irq header directly Commit 4d5c5bad5193 ("powerpc: Remove asm/prom.h from asm/mpc52xx.h and asm/pci.h") that cleans up powerpc's asm/prom.h leads to build errors in ppc4xx_edac.c due to missing header. Include required header directly to avoid the build failure. Fixes: 4d5c5bad5193 ("powerpc: Remove asm/prom.h from asm/mpc52xx.h and asm/pci.h") Reported-by: kernel test robot Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/993f5a7da371458cb819b5f3f569073c78523b01.1659436180.git.christophe.leroy@csgroup.eu drivers/edac/ppc4xx_edac.c | 1 + 1 file changed, 1 insertion(+) commit f4b39e88b42d13366b831270306326b5c20971ca Author: Michael Ellerman Date: Tue Aug 2 20:38:32 2022 +1000 powerpc/pci: Fix PHB numbering when using opal-phbid The recent change to the PHB numbering logic has a logic error in the handling of "ibm,opal-phbid". When an "ibm,opal-phbid" property is present, &prop is written to and ret is set to zero. The following call to of_alias_get_id() is skipped because ret == 0. But then the if (ret >= 0) is true, and the body of that if statement sets prop = ret which throws away the value that was just read from "ibm,opal-phbid". Fix the logic by only doing the ret >= 0 check in the of_alias_get_id() case. Fixes: 0fe1e96fef0a ("powerpc/pci: Prefer PCI domain assignment via DT 'linux,pci-domain' and alias") Reviewed-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220802105723.1055178-1-mpe@ellerman.id.au arch/powerpc/kernel/pci-common.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit ffa6482e461ff550325356ae705b79e256702ea9 Author: Chenyi Qiang Date: Tue Aug 2 11:32:06 2022 +0800 x86/bus_lock: Don't assume the init value of DEBUGCTLMSR.BUS_LOCK_DETECT to be zero It's possible that this kernel has been kexec'd from a kernel that enabled bus lock detection, or (hypothetically) BIOS/firmware has set DEBUGCTLMSR_BUS_LOCK_DETECT. Disable bus lock detection explicitly if not wanted. Fixes: ebb1064e7c2e ("x86/traps: Handle #DB for bus lock") Signed-off-by: Chenyi Qiang Signed-off-by: Ingo Molnar Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/20220802033206.21333-1-chenyi.qiang@intel.com arch/x86/kernel/cpu/intel.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit dec8784c9088b131a1523f582c2194cfc8107dc0 Author: Masami Hiramatsu (Google) Date: Tue Aug 2 15:04:16 2022 +0900 x86/kprobes: Update kcb status flag after singlestepping Fix kprobes to update kcb (kprobes control block) status flag to KPROBE_HIT_SSDONE even if the kp->post_handler is not set. This bug may cause a kernel panic if another INT3 user runs right after kprobes because kprobe_int3_handler() misunderstands the INT3 is kprobe's single stepping INT3. Fixes: 6256e668b7af ("x86/kprobes: Use int3 instead of debug trap for single-step") Reported-by: Daniel Müller Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Ingo Molnar Tested-by: Daniel Müller Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20220727210136.jjgc3lpqeq42yr3m@muellerd-fedora-PC2BDTX9 Link: https://lore.kernel.org/r/165942025658.342061.12452378391879093249.stgit@devnote2 arch/x86/kernel/kprobes/core.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 28f6c37a2910f565b4f5960df52b2eccae28c891 Author: Chen Zhongjin Date: Mon Aug 1 11:37:19 2022 +0800 kprobes: Forbid probing on trampoline and BPF code areas kernel_text_address() treats ftrace_trampoline, kprobe_insn_slot and bpf_text_address as valid kprobe addresses - which is not ideal. These text areas are removable and changeable without any notification to kprobes, and probing on them can trigger unexpected behavior: https://lkml.org/lkml/2022/7/26/1148 Considering that jump_label and static_call text are already forbiden to probe, kernel_text_address() should be replaced with core_kernel_text() and is_module_text_address() to check other text areas which are unsafe to kprobe. [ mingo: Rewrote the changelog. ] Fixes: 5b485629ba0d ("kprobes, extable: Identify kprobes trampolines as kernel text area") Fixes: 74451e66d516 ("bpf: make jited programs visible in traces") Signed-off-by: Chen Zhongjin Signed-off-by: Ingo Molnar Acked-by: Masami Hiramatsu (Google) Link: https://lore.kernel.org/r/20220801033719.228248-1-chenzhongjin@huawei.com kernel/kprobes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c67cc4315a8e605ec875bd3a1210a549e3562ddc Author: Hector Martin Date: Sun Jul 31 16:22:09 2022 +0900 net: usb: ax88179_178a: Bind only to vendor-specific interface The Anker PowerExpand USB-C to Gigabit Ethernet adapter uses this chipset, but exposes CDC Ethernet configurations as well as the vendor specific one. This driver tries to bind by PID:VID unconditionally and ends up picking up the CDC configuration, which is supposed to be handled by the class driver. To make things even more confusing, it sees both of the CDC class interfaces and tries to bind twice, resulting in two broken Ethernet devices. Change all the ID matches to specifically match the vendor-specific interface. By default the device comes up in CDC mode and is bound by that driver (which works fine); users may switch it to the vendor interface using sysfs to set bConfigurationValue, at which point the device actually goes through a reconnect cycle and comes back as a vendor specific only device, and then this driver binds and works too. The affected device uses VID/PID 0b95:1790, but we might as well change all of them for good measure, since there is no good reason for this driver to bind to standard CDC Ethernet interfaces. v3: Added VID/PID info to commit message Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20220731072209.45504-1-marcan@marcan.st Signed-off-by: Paolo Abeni drivers/net/usb/ax88179_178a.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit e61b3125a4f036b3c6b87ffd656fc1ab00440ae9 Author: Xie Shaowen Date: Tue Aug 2 15:20:33 2022 +0800 Input: gscps2 - check return value of ioremap() in gscps2_probe() The function ioremap() in gscps2_probe() can fail, so its return value should be checked. Fixes: 4bdc0d676a643 ("remove ioremap_nocache and devm_ioremap_nocache") Cc: # v5.6+ Reported-by: Hacash Robot Signed-off-by: Xie Shaowen Signed-off-by: Helge Deller drivers/input/serio/gscps2.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1995943c3f2a59d73efe8bf9b33a92d0f1812af3 Author: Kleber Sacilotto de Souza Date: Mon Aug 1 14:46:15 2022 +0200 selftests: net: fix IOAM test skip return code The ioam6.sh test script exits with an error code (1) when tests are skipped due to lack of support from userspace/kernel or not enough permissions. It should return the kselftests SKIP code instead. Reviewed-by: Justin Iurman Signed-off-by: Kleber Sacilotto de Souza Link: https://lore.kernel.org/r/20220801124615.256416-1-kleber.souza@canonical.com Signed-off-by: Paolo Abeni tools/testing/selftests/net/ioam6.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit f56530dcdb0684406661ac9f1accf48319d07600 Author: Maciej Żenczykowski Date: Sat Jul 30 16:01:13 2022 -0700 net: usb: make USB_RTL8153_ECM non user configurable This refixes: commit 7da17624e7948d5d9660b910f8079d26d26ce453 nt: usb: USB_RTL8153_ECM should not default to y In general, device drivers should not be enabled by default. which basically broke the commit it claimed to fix, ie: commit 657bc1d10bfc23ac06d5d687ce45826c760744f9 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. this commit amounted to: drivers/net/usb/Kconfig: +config USB_RTL8153_ECM + tristate "RTL8153 ECM support" + depends on USB_NET_CDCETHER && (USB_RTL8152 || USB_RTL8152=n) + default y + help + This option supports ECM mode for RTL8153 ethernet adapter, when + CONFIG_USB_RTL8152 is not set, or the RTL8153 device is not + supported by r8152 driver. drivers/net/usb/Makefile: -obj-$(CONFIG_USB_NET_CDCETHER) += cdc_ether.o r8153_ecm.o +obj-$(CONFIG_USB_NET_CDCETHER) += cdc_ether.o +obj-$(CONFIG_USB_RTL8153_ECM) += r8153_ecm.o And as can be seen it pulls a piece of the cdc_ether driver out into a separate config option to be able to make this piece modular in case cdc_ether is builtin, while r8152 is modular. While in general, device drivers should indeed not be enabled by default: this isn't a device driver per say, but rather this is support code for the CDCETHER (ECM) driver, and should thus be enabled if it is enabled. See also email thread at: https://www.spinics.net/lists/netdev/msg767649.html In: https://www.spinics.net/lists/netdev/msg768284.html Jakub wrote: And when we say "removed" we can just hide it from what's prompted to the user (whatever such internal options are called)? I believe this way we don't bring back Marek's complaint. Side note: these incorrect defaults will result in Android 13 on 5.15 GKI kernels lacking USB_RTL8153_ECM support while having USB_NET_CDCETHER (luckily we also have USB_RTL8150 and USB_RTL8152, so it's probably only an issue for very new RTL815x hardware with no native 5.15 driver). Fixes: 7da17624e7948d5d ("nt: usb: USB_RTL8153_ECM should not default to y") Cc: Geert Uytterhoeven Cc: Greg Kroah-Hartman Cc: Hayes Wang Cc: Jakub Kicinski Signed-off-by: Maciej Żenczykowski Link: https://lore.kernel.org/r/20220730230113.4138858-1-zenczykowski@gmail.com Signed-off-by: Paolo Abeni drivers/net/usb/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1d95af02f23031c2e1cca7607c514b86ce85bc6e Author: Stanimir Varbanov Date: Mon Aug 1 18:16:41 2022 +0300 venus: pm_helpers: Fix warning in OPP during probe Fix the following WARN triggered during Venus driver probe on 5.19.0-rc8-next-20220728: WARNING: CPU: 7 PID: 339 at drivers/opp/core.c:2471 dev_pm_opp_set_config+0x49c/0x610 Modules linked in: qcom_spmi_adc5 rtc_pm8xxx qcom_spmi_adc_tm5 leds_qcom_lpg led_class_multicolor qcom_pon qcom_vadc_common venus_core(+) qcom_spmi_temp_alarm v4l2_mem2mem videobuf2_v4l2 msm(+) videobuf2_common crct10dif_ce spi_geni_qcom snd_soc_sm8250 i2c_qcom_geni gpu_sched snd_soc_qcom_common videodev qcom_q6v5_pas soundwire_qcom drm_dp_aux_bus qcom_stats drm_display_helper qcom_pil_info soundwire_bus snd_soc_lpass_va_macro mc qcom_q6v5 phy_qcom_snps_femto_v2 qcom_rng snd_soc_lpass_macro_common snd_soc_lpass_wsa_macro lpass_gfm_sm8250 slimbus qcom_sysmon qcom_common qcom_glink_smem qmi_helpers qcom_wdt mdt_loader socinfo icc_osm_l3 display_connector drm_kms_helper qnoc_sm8250 drm fuse ip_tables x_tables ipv6 CPU: 7 PID: 339 Comm: systemd-udevd Not tainted 5.19.0-rc8-next-20220728 #4 Hardware name: Qualcomm Technologies, Inc. Robotics RB5 (DT) pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : dev_pm_opp_set_config+0x49c/0x610 lr : dev_pm_opp_set_config+0x58/0x610 sp : ffff8000093c3710 x29: ffff8000093c3710 x28: ffffbca3959d82b8 x27: ffff8000093c3d00 x26: ffffbca3959d8e08 x25: ffff4396cac98118 x24: ffff4396c0e24810 x23: ffff4396c4272c40 x22: ffff4396c0e24810 x21: ffff8000093c3810 x20: ffff4396cac36800 x19: ffff4396cac96800 x18: 0000000000000000 x17: 0000000000000003 x16: ffffbca3f4edf198 x15: 0000001cba64a858 x14: 0000000000000180 x13: 000000000000017e x12: 0000000000000000 x11: 0000000000000002 x10: 0000000000000a60 x9 : ffff8000093c35c0 x8 : ffff4396c4273700 x7 : ffff43983efca6c0 x6 : ffff43983efca640 x5 : 00000000410fd0d0 x4 : ffff4396c4272c40 x3 : ffffbca3f5d1e008 x2 : 0000000000000000 x1 : ffff4396c2421600 x0 : ffff4396cac96860 Call trace: dev_pm_opp_set_config+0x49c/0x610 devm_pm_opp_set_config+0x18/0x70 vcodec_domains_get+0xb8/0x1638 [venus_core] core_get_v4+0x1d8/0x218 [venus_core] venus_probe+0xf4/0x468 [venus_core] platform_probe+0x68/0xd8 really_probe+0xbc/0x2a8 __driver_probe_device+0x78/0xe0 driver_probe_device+0x3c/0xf0 __driver_attach+0x70/0x120 bus_for_each_dev+0x70/0xc0 driver_attach+0x24/0x30 bus_add_driver+0x150/0x200 driver_register+0x64/0x120 __platform_driver_register+0x28/0x38 qcom_venus_driver_init+0x24/0x1000 [venus_core] do_one_initcall+0x54/0x1c8 do_init_module+0x44/0x1d0 load_module+0x16c8/0x1aa0 __do_sys_finit_module+0xbc/0x110 __arm64_sys_finit_module+0x20/0x30 invoke_syscall+0x44/0x108 el0_svc_common.constprop.0+0xcc/0xf0 do_el0_svc+0x2c/0xb8 el0_svc+0x2c/0x88 el0t_64_sync_handler+0xb8/0xc0 el0t_64_sync+0x18c/0x190 qcom-venus: probe of aa00000.video-codec failed with error -16 The fix is re-ordering the code related to OPP core. The OPP core expects all configuration options to be provided before the OPP table is added. Reported-by: Linux Kernel Functional Testing Suggested-by: Viresh Kumar Signed-off-by: Stanimir Varbanov Signed-off-by: Viresh Kumar drivers/media/platform/qcom/venus/pm_helpers.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 969e26c63d309c3555905f894560bcdee42f3464 Author: Sebin Sebastian Date: Mon Aug 1 09:37:31 2022 +0530 net: marvell: prestera: remove reduntant code Fixes the coverity warning 'EVALUATION_ORDER' violation. port is written twice with the same value. Signed-off-by: Sebin Sebastian Link: https://lore.kernel.org/r/20220801040731.34741-1-mailmesebin00@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/prestera/prestera_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53e99496abc1b6e9897ad78cf169a06c77db1b5e Author: Subbaraya Sundeep Date: Fri Jul 29 14:54:57 2022 +0530 octeontx2-pf: Reduce minimum mtu size to 60 PTP messages like SYNC, FOLLOW_UP, DELAY_REQ are of size 58 bytes. Using a minimum packet length as 64 makes NIX to pad 6 bytes of zeroes while transmission. This is causing latest ptp4l application to emit errors since length in PTP header and received packet are not same. Padding upto 3 bytes is fine but more than that makes ptp4l to assume the pad bytes as a TLV. Hence reduce the size to 60 from 64. Signed-off-by: Subbaraya Sundeep Signed-off-by: Naveen Mamindlapalli Signed-off-by: Sunil Kovvuri Goutham Link: https://lore.kernel.org/r/20220729092457.3850-1-naveenm@marvell.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6380f9924270d51cc233cfd592b279be3881e6d Author: Slark Xiao Date: Fri Jul 22 17:46:12 2022 +0800 scsi: pm8001: Fix typo 'the the' in comment Replace 'the the' with 'the' in the comment. Link: https://lore.kernel.org/r/20220722094612.78583-1-slark_xiao@163.com Acked-by: Jack Wang Signed-off-by: Slark Xiao Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_hwi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6464d5b8a2768e8ff63d24b76299fe614e205aa7 Author: Colin Ian King Date: Sat Jul 30 13:45:09 2022 +0100 scsi: megaraid_sas: Remove redundant variable cmd_type The variable cmd_type is assigned a value but it is never read. The variable and the assignment are redundant and can be removed. Cleans up clang scan build warning: drivers/scsi/megaraid/megaraid_sas_fusion.c:3228:10: warning: Although the value stored to 'cmd_type' is used in the enclosing expression, the value is never actually read from 'cmd_type' [deadcode.DeadStores] Link: https://lore.kernel.org/r/20220730124509.148457-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 554b117e8fab4f7c53090eca693f47e0c7b18490 Author: Colin Ian King Date: Sat Jul 30 13:37:36 2022 +0100 scsi: FlashPoint: Remove redundant variable bm_int_st The variable bm_int_st is assigned a value but it is never read. The variable and the assignment are redundant and can be removed. Cleans up clang scan build warning: drivers/scsi/FlashPoint.c:1726:7: warning: Although the value stored to 'bm_int_st' is used in the enclosing expression, the value is never actually read from 'bm_int_st' [deadcode.DeadStores] Link: https://lore.kernel.org/r/20220730123736.147758-1-colin.i.king@gmail.com Acked-by: Khalid Aziz Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/scsi/FlashPoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4da8c5f76825269f28d6a89fa752934a4bcb6dfa Author: Steffen Maier Date: Fri Jul 29 18:25:29 2022 +0200 scsi: zfcp: Fix missing auto port scan and thus missing target ports Case (1): The only waiter on wka_port->completion_wq is zfcp_fc_wka_port_get() trying to open a WKA port. As such it should only be woken up by WKA port *open* responses, not by WKA port close responses. Case (2): A close WKA port response coming in just after having sent a new open WKA port request and before blocking for the open response with wait_event() in zfcp_fc_wka_port_get() erroneously renders the wait_event a NOP because the close handler overwrites wka_port->status. Hence the wait_event condition is erroneously true and it does not enter blocking state. With non-negligible probability, the following time space sequence happens depending on timing without this fix: user process ERP thread zfcp work queue tasklet system work queue ============ ========== =============== ======= ================= $ echo 1 > online zfcp_ccw_set_online zfcp_ccw_activate zfcp_erp_adapter_reopen msleep scan backoff zfcp_erp_strategy | ... | zfcp_erp_action_cleanup | ... | queue delayed scan_work | queue ns_up_work | ns_up_work: | zfcp_fc_wka_port_get | open wka request | open response | GSPN FC-GS | RSPN FC-GS [NPIV-only] | zfcp_fc_wka_port_put | (--wka->refcount==0) | sched delayed wka->work | ~~~Case (1)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ zfcp_erp_wait flush scan_work | wka->work: | wka->status=CLOSING | close wka request | scan_work: | zfcp_fc_wka_port_get | (wka->status==CLOSING) | wka->status=OPENING | open wka request | wait_event | | close response | | wka->status=OFFLINE | | wake_up /*WRONG*/ ~~~Case (2)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | wka->work: | wka->status=CLOSING | close wka request zfcp_erp_wait flush scan_work | scan_work: | zfcp_fc_wka_port_get | (wka->status==CLOSING) | wka->status=OPENING | open wka request | close response | wka->status=OFFLINE | wake_up /*WRONG&NOP*/ | wait_event /*NOP*/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (wka->status!=ONLINE) | return -EIO | return early open response wka->status=ONLINE wake_up /*NOP*/ So we erroneously end up with no automatic port scan. This is a big problem when it happens during boot. The timing is influenced by v3.19 commit 18f87a67e6d6 ("zfcp: auto port scan resiliency"). Fix it by fully mutually excluding zfcp_fc_wka_port_get() and zfcp_fc_wka_port_offline(). For that to work, we make the latter block until we got the response for a close WKA port. In order not to penalize the system workqueue, we move wka_port->work to our own adapter workqueue. Note that before v2.6.30 commit 828bc1212a68 ("[SCSI] zfcp: Set WKA-port to offline on adapter deactivation"), zfcp did block in zfcp_fc_wka_port_offline() as well, but with a different condition. While at it, make non-functional cleanups to improve code reading in zfcp_fc_wka_port_get(). If we cannot send the WKA port open request, don't rely on the subsequent wait_event condition to immediately let this case pass without blocking. Also don't want to rely on the additional condition handling the refcount to be skipped just to finally return with -EIO. Link: https://lore.kernel.org/r/20220729162529.1620730-1-maier@linux.ibm.com Fixes: 5ab944f97e09 ("[SCSI] zfcp: attach and release SAN nameserver port on demand") Cc: #v2.6.28+ Reviewed-by: Benjamin Block Signed-off-by: Steffen Maier Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_fc.c | 29 ++++++++++++++++++++--------- drivers/s390/scsi/zfcp_fc.h | 6 ++++-- drivers/s390/scsi/zfcp_fsf.c | 4 ++-- 3 files changed, 26 insertions(+), 13 deletions(-) commit f323896fe6fa8fa55ed37cb8b804fa97ead641c3 Author: Bart Van Assche Date: Thu Jul 28 15:18:51 2022 -0700 scsi: core: Call blk_mq_free_tag_set() earlier There are two .exit_cmd_priv implementations. Both implementations use resources associated with the SCSI host. Make sure that these resources are still available when .exit_cmd_priv is called by moving the .exit_cmd_priv calls from scsi_host_dev_release() to scsi_forget_host(). Moving blk_mq_free_tag_set() from scsi_host_dev_release() to scsi_remove_host() is safe because scsi_forget_host() waits until all SCSI devices associated with the host have been removed. Fix the following use-after-free: ================================================================== BUG: KASAN: use-after-free in srp_exit_cmd_priv+0x27/0xd0 [ib_srp] Read of size 8 at addr ffff888100337000 by task multipathd/16727 Call Trace: dump_stack_lvl+0x34/0x44 print_report.cold+0x5e/0x5db kasan_report+0xab/0x120 srp_exit_cmd_priv+0x27/0xd0 [ib_srp] scsi_mq_exit_request+0x4d/0x70 blk_mq_free_rqs+0x143/0x410 __blk_mq_free_map_and_rqs+0x6e/0x100 blk_mq_free_tag_set+0x2b/0x160 scsi_host_dev_release+0xf3/0x1a0 device_release+0x54/0xe0 kobject_put+0xa5/0x120 device_release+0x54/0xe0 kobject_put+0xa5/0x120 scsi_device_dev_release_usercontext+0x4c1/0x4e0 execute_in_process_context+0x23/0x90 device_release+0x54/0xe0 kobject_put+0xa5/0x120 scsi_disk_release+0x3f/0x50 device_release+0x54/0xe0 kobject_put+0xa5/0x120 disk_release+0x17f/0x1b0 device_release+0x54/0xe0 kobject_put+0xa5/0x120 dm_put_table_device+0xa3/0x160 [dm_mod] dm_put_device+0xd0/0x140 [dm_mod] free_priority_group+0xd8/0x110 [dm_multipath] free_multipath+0x94/0xe0 [dm_multipath] dm_table_destroy+0xa2/0x1e0 [dm_mod] __dm_destroy+0x196/0x350 [dm_mod] dev_remove+0x10c/0x160 [dm_mod] ctl_ioctl+0x2c2/0x590 [dm_mod] dm_ctl_ioctl+0x5/0x10 [dm_mod] __x64_sys_ioctl+0xb4/0xf0 dm_ctl_ioctl+0x5/0x10 [dm_mod] __x64_sys_ioctl+0xb4/0xf0 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Link: https://lore.kernel.org/r/20220728221851.1822295-5-bvanassche@acm.org Fixes: 65ca846a5314 ("scsi: core: Introduce {init,exit}_cmd_priv()") Cc: Christoph Hellwig Cc: Mike Christie Cc: Hannes Reinecke Cc: John Garry Cc: Li Zhijian Reported-by: Li Zhijian Tested-by: Li Zhijian Reviewed-by: Ming Lei Reviewed-by: Mike Christie Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/hosts.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1a9283782df2c91c7db5656753a2f548c43de6a7 Author: Ming Lei Date: Thu Jul 28 15:18:50 2022 -0700 scsi: core: Simplify LLD module reference counting Swap two statements in scsi_device_put() now that it is guaranteed that SCSI hosts outlive SCSI devices. Remove the reference counting code from scsi_sysfs.c that became superfluous because SCSI hosts now outlive SCSI devices. Link: https://lore.kernel.org/r/20220728221851.1822295-4-bvanassche@acm.org Cc: Christoph Hellwig Cc: Ming Lei Cc: Mike Christie Cc: Hannes Reinecke Cc: John Garry Reviewed-by: Mike Christie Signed-off-by: Ming Lei Signed-off-by: Bart Van Assche [ bvanassche: Extracted this patch from a larger patch ] Signed-off-by: Martin K. Petersen drivers/scsi/scsi.c | 9 ++++++--- drivers/scsi/scsi_sysfs.c | 9 --------- 2 files changed, 6 insertions(+), 12 deletions(-) commit 16728aaba62e8b3b170735fdc3d8aa972835c136 Author: Ming Lei Date: Thu Jul 28 15:18:49 2022 -0700 scsi: core: Make sure that hosts outlive targets Fix the race conditions between SCSI LLD kernel module unloading and SCSI device and target removal by making sure that SCSI hosts are destroyed after all associated target and device objects have been freed. Link: https://lore.kernel.org/r/20220728221851.1822295-3-bvanassche@acm.org Cc: Christoph Hellwig Cc: Ming Lei Cc: Mike Christie Cc: Hannes Reinecke Cc: John Garry Reviewed-by: Mike Christie Signed-off-by: Ming Lei Signed-off-by: Bart Van Assche [ bvanassche: Reworked Ming's patch and split it ] Signed-off-by: Martin K. Petersen drivers/scsi/hosts.c | 8 ++++++++ drivers/scsi/scsi_scan.c | 7 +++++++ include/scsi/scsi_host.h | 3 +++ 3 files changed, 18 insertions(+) commit fe442604199ed3e60d5411137159f9623534e956 Author: Bart Van Assche Date: Thu Jul 28 15:18:48 2022 -0700 scsi: core: Make sure that targets outlive devices This commit prevents that the following sequence triggers a kernel crash: - Deletion of a SCSI device is requested via sysfs. Device removal takes some time because blk_cleanup_queue() is waiting for the SCSI error handler. - The SCSI target associated with that SCSI device is removed. - scsi_remove_target() returns and its caller frees the resources associated with the SCSI target. - The error handler makes progress and invokes an LLD callback that dereferences the SCSI target pointer. Link: https://lore.kernel.org/r/20220728221851.1822295-2-bvanassche@acm.org Cc: Christoph Hellwig Cc: Mike Christie Cc: Hannes Reinecke Cc: John Garry Cc: Li Zhijian Reported-by: Mike Christie Reviewed-by: Ming Lei Reviewed-by: Mike Christie Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_scan.c | 2 ++ drivers/scsi/scsi_sysfs.c | 20 +++++++++++++++++--- include/scsi/scsi_device.h | 2 ++ 3 files changed, 21 insertions(+), 3 deletions(-) commit a19066788d875731a01ee7fa189b2202f0120036 Author: Daniil Lunev Date: Thu Jul 28 11:18:21 2022 +1000 scsi: ufs: ufs-pci: Correct check for RESET DSM dsm_fns is a bitmap, and it is 0-indexed according to the check in __intel_dsm function. But common initialization was checking it as if it was 1-indexed. This patch corrects the discrepancy. This change won't break any existing calls to the function, since before the change both bits 0 and 1 were checked and needed to be set. Link: https://lore.kernel.org/r/20220728111748.v3.1.I22460c4f4a9ccf2c96c3f9bb392b409926d80b2f@changeid Reviewed-by: Adrian Hunter Signed-off-by: Daniil Lunev Signed-off-by: Martin K. Petersen drivers/ufs/host/ufshcd-pci.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit ef4f7e4bf1dc26aaa86cf8e5a13013684139be51 Author: Dmitry Bogdanov Date: Thu Jul 28 00:41:25 2022 +0300 scsi: target: core: De-RCU of se_lun and se_lun acl se_lun and se_lun_acl are immutable pointers of struct se_dev_entry. Remove RCU usage for access to those pointers. Link: https://lore.kernel.org/r/20220727214125.19647-3-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Dmitry Bogdanov Signed-off-by: Martin K. Petersen drivers/target/target_core_alua.c | 3 +-- drivers/target/target_core_device.c | 29 +++++++++++------------------ drivers/target/target_core_pr.c | 28 ++++++++-------------------- drivers/target/target_core_stat.c | 10 ++++------ drivers/target/target_core_xcopy.c | 2 +- include/target/target_core_base.h | 4 ++-- 6 files changed, 27 insertions(+), 49 deletions(-) commit dd0a66ada0bd0ae6c96ea45cfa1581797e867a40 Author: Dmitry Bogdanov Date: Thu Jul 28 00:41:24 2022 +0300 scsi: target: core: Fix race during ACL removal Under huge load there is a possibility of race condition in updating se_dev_entry object in ACL removal procedure: NIP [c0080000154093d0] transport_lookup_cmd_lun+0x1f8/0x3d0 [target_core_mod] LR [c00800001542ab34] target_submit_cmd_map_sgls+0x11c/0x300 [target_core_mod] Call Trace: target_submit_cmd_map_sgls+0x11c/0x300 [target_core_mod] target_submit_cmd+0x44/0x60 [target_core_mod] tcm_qla2xxx_handle_cmd+0x88/0xe0 [tcm_qla2xxx] qlt_do_work+0x2e4/0x3d0 [qla2xxx] process_one_work+0x298/0x5c Despite usage of RCU primitives with deve->se_lun pointer, it has not become dereference-safe because deve->se_lun is updated and not synchronized with a reader. That change might be in a release function called by synchronize_rcu(). But, in fact, there is no point in setting that pointer to NULL for deleting deve. All access to deve->se_lun is already under rcu_read_lock. And either deve->se_lun is always valid or deve is not valid itself and will not be found in the list_for_*. The same applicable for deve->se_lun_acl too. So a better solution is to remove that NULLing. Link: https://lore.kernel.org/r/20220727214125.19647-2-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Dmitry Bogdanov Signed-off-by: Martin K. Petersen drivers/target/target_core_device.c | 3 --- 1 file changed, 3 deletions(-) commit 00511d2abf5708ad05dd5d1c36adb2468d274698 Author: Peter Wang Date: Wed Jul 27 11:05:26 2022 +0800 scsi: ufs: core: Correct ufshcd_shutdown() flow After ufshcd_wl_shutdown() set device power off and link off, ufshcd_shutdown() could turn off clock/power. Also remove pm_runtime_get_sync. The reason why it is safe to remove pm_runtime_get_sync() is because: - ufshcd_wl_shutdown() -> pm_runtime_get_sync() will resume hba->dev too. - device resume(turn on clk/power) is not required, even if device is in RPM_SUSPENDED. Link: https://lore.kernel.org/r/20220727030526.31022-1-peter.wang@mediatek.com Fixes: b294ff3e3449 ("scsi: ufs: core: Enable power management for wlun") Cc: # 5.15.x Reviewed-by: Stanley Chu Signed-off-by: Peter Wang Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 86a44f045b8cbfd885b7425f4cd8a1c353593057 Author: Bart Van Assche Date: Tue Jul 26 15:52:21 2022 -0700 scsi: ufs: core: Increase the maximum data buffer size Measurements for one particular UFS controller + UFS device show a 25% higher read bandwidth if the maximum data buffer size is increased from 512 KiB to 1 MiB. Hence increase the maximum size of the data buffer associated with a single request from SCSI_DEFAULT_MAX_SECTORS (1024) * 512 bytes = 512 KiB to 1 MiB. Notes: - The maximum data buffer size supported by the UFSHCI specification is 65535 * 256 KiB or about 16 GiB. - The maximum data buffer size for READ(10) commands is 65535 logical blocks. To transfer more than 65535 * 4096 bytes = 255 MiB with a single SCSI command, the READ(16) command is required. Support for READ(16) is optional in the UFS 3.1 and UFS 4.0 standards. Link: https://lore.kernel.org/r/20220726225232.1362251-1-bvanassche@acm.org Cc: Adrian Hunter Cc: Avri Altman Cc: Bean Huo Cc: Stanley Chu Tested-by: Avri Altman Acked-by: Avri Altman Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 1 + 1 file changed, 1 insertion(+) commit f00e0d7714895d10790e2bac4df00727ddb9abff Author: William Dean Date: Sat Jul 23 14:40:27 2022 +0800 scsi: lpfc: Check the return value of alloc_workqueue() The function alloc_workqueue() in lpfc_sli4_driver_resource_setup() can fail, but there is no check of its return value. The return value should be checked. Link: https://lore.kernel.org/r/20220723064027.2956623-1-williamsukatube@163.com Fixes: 3cee98db2610 ("scsi: lpfc: Fix crash on driver unload in wq free") Reported-by: Hacash Robot Reviewed-by: James Smart Signed-off-by: William Dean Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 2 ++ 1 file changed, 2 insertions(+) commit 817b279467404ae3b16db8886b87eaefd8b13a6d Author: Dan Williams Date: Mon Aug 1 15:38:06 2022 -0700 cxl/region: Stop initializing interleave granularity In preparation for a patch that validates that the region ways setting is compatible with the granularity setting, the initial granularity setting needs to start at zero to indicate "unset". Reviewed-by: Vishal Verma Reviewed-by: Alison Schofield Link: https://lore.kernel.org/r/165853777484.2430596.3423921169034844397.stgit@dwillia2-xfh.jf.intel.com [djbw: fix up unused variable] Signed-off-by: Dan Williams drivers/cxl/core/region.c | 4 ---- 1 file changed, 4 deletions(-) commit 4d5c42a80bd17d1979dbcd40c5c44ff3c93e1476 Author: Dan Williams Date: Wed Jul 27 15:16:46 2022 -0700 cxl/hdm: Fix DPA reservation vs cxl_endpoint_decoder lifetime After adding support for emulating platform firmware established DPA reservations, the cxl-topology.sh [1] unit test started crashing with the following signature: general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6bc3: 0000 [#1] PREEMPT SMP [..] RIP: 0010:to_cxl_port+0x8/0x60 [cxl_core] [..] Call Trace: __cxl_dpa_release+0x1b/0xd0 [cxl_core] cxl_dpa_release+0x1d/0x30 [cxl_core] release_nodes+0x63/0x90 devres_release_all+0x88/0xc0 ...i.e. a use after free of a 'struct cxl_endpoint_decoder' object. This results from the ordering of init_hdm_decoder() before add_hdm_decoder() where, at release time, the decoder is unregistered and released before the DPA reservation. Fix this by extending the life of the object until all DPA reservations have been released which also preserves platform decoder settings being settled by the time the decoder is published in sysfs (KOBJ_ADD time). Note that the @len == 0 case in __cxl_dpa_reserve() is avoided in practice as this function is only called for committed decoders and new non-zero DPA allocations. Link: https://github.com/pmem/ndctl/blob/pending/test/cxl-topology.sh [1] Fixes: 9c57cde0dcbd ("cxl/hdm: Enumerate allocated DPA") Cc: Jonathan Cameron Reviewed-by: Vishal Verma Link: https://lore.kernel.org/r/165896020625.3546860.12390103413706292760.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/hdm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e77483055c325fa629c5835913b07f3dce3ac7fd Author: Dan Williams Date: Fri Jul 22 17:56:09 2022 -0700 cxl/acpi: Minimize granularity for x1 interleaves The kernel enforces that region granularity is >= to the top-level interleave-granularity for the given CXL window. However, when the CXL window interleave is x1, i.e. non-interleaved at the host bridge level, then the specified granularity does not matter. Override the window specified granularity to the CXL minimum so that any valid region granularity is >= to the root granularity. Reported-by: Jonathan Cameron Reviewed-by: Vishal Verma Reviewed-by: Alison Schofield Link: https://lore.kernel.org/r/165853776917.2430596.16823264262010844458.stgit@dwillia2-xfh.jf.intel.com [djbw: add CXL_DECODER_MIN_GRANULARITY per vishal] Signed-off-by: Dan Williams drivers/cxl/acpi.c | 6 ++++++ drivers/cxl/cxl.h | 2 ++ 2 files changed, 8 insertions(+) commit 2bde6dbebc1cf02fd1b3d740246b92df1514a370 Author: Dan Williams Date: Fri Jul 22 17:56:03 2022 -0700 cxl/region: Delete 'region' attribute from root decoders For switch and endpoint decoders the relationship of decoders to regions is 1:1. However, for root decoders the relationship is 1:N. Also, regions are already children of root decoders, so the 1:N relationship is observed by walking the following glob: /sys/bus/cxl/devices/$decoder/region* Hide the vestigial 'region' attribute for root decoders. Reviewed-by: Vishal Verma Reviewed-by: Alison Schofield Link: https://lore.kernel.org/r/165853776328.2430596.4647259305040072751.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/port.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a53c28b6ae4bcda3c386bfd704b329926bcf3f92 Author: Dan Williams Date: Fri Jul 22 17:55:57 2022 -0700 cxl/acpi: Autoload driver for 'cxl_acpi' test devices In support of CXL unit tests in the ndctl project, arrange for the cxl_acpi driver to load in response to the registration of cxl_test devices. Reported-by: Dave Jiang Tested-by: Dave Jiang Reviewed-by: Vishal Verma Link: https://lore.kernel.org/r/165853775783.2430596.13637998086505316619.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/acpi.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 5e42bcbc3fef6e759dfb4d3f4cfb394c382b4249 Author: Dan Carpenter Date: Mon Aug 1 13:20:58 2022 +0300 cxl/region: decrement ->nr_targets on error in cxl_region_attach() The ++ needs a match -- on the clean up path. If the p->nr_targets value gets to be more than 16 it leads to uninitialized data in cxl_port_setup_targets(). drivers/cxl/core/region.c:995 cxl_port_setup_targets() error: uninitialized symbol 'eiw'. Fixes: 27b3f8d13830 ("cxl/region: Program target lists") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YuepCvUAoCtdpcoO@kili Signed-off-by: Dan Williams drivers/cxl/core/region.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4c2fdfc4c8049d94d4da0853da9e31832953f339 Merge: f2906aa86338 5e1e12d29920 Author: Stephen Boyd Date: Mon Aug 1 14:23:59 2022 -0700 Merge tag 'qcom-clk-for-5.20' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into clk-qcom Pull Qualcomm clk driver updates from Bjorn Andersson: - Introduces support for the camera clock controller in SM8450 and the display and gpu clock controllers in SM8350. - Various fixes, new clocks and USB GDSCs are introduced for IPQ8074 and for MSM8939 a series of fixes for issues introduced by inheriting the MSM8916 GCC driver is introduced. - Support for a new type of voteable GDSCs are introduced and put in use for the SC8280XP PCIe GDSCs. SC8280XP pipe clocks transitioned to the new phy-mux implementation. - MSM8996 GCC, the RPM clock driver and some clocks in MSM8994 GCC are transitioned to use parent_data. - The topology for Titan (camera) GDSCs on SDM845 and SM8250 are corrected and MSM8916 gains more possible frequencies for its GP clocks. - The GCC and tsens handling on MSM8960 is reworked to mimic the design in IPQ8074 and allow the GCC driver to probe earlier. - The regulator based mmcx supply for dispcc and videocc is dropped, as the only upstream target that adapted this interface was transitioned several kernel versions ago. - GDSCs found to be enabled at boot will now reflect in the enable count of the supply, as was done with the regulator supplies previously. * tag 'qcom-clk-for-5.20' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (62 commits) clk: qcom: gcc-msm8994: use parent_hws for gpll0/4 clk: qcom: clk-rpm: convert to parent_data API dt-bindings: clock: fix wrong clock documentation for qcom,rpmcc clk: qcom: gcc-msm8939: Add missing USB HS system clock frequencies clk: qcom: gcc-msm8939: Add missing MDSS MDP clock frequencies clk: qcom: gcc-msm8939: Add missing CAMSS CPP clock frequencies clk: qcom: gcc-msm8939: Fix venus0_vcodec0_clk frequency definitions clk: qcom: gcc-msm8939: Add missing CAMSS CCI bus clock clk: qcom: gcc-msm8939: Fix weird field spacing in ftbl_gcc_camss_cci_clk clk: qcom: gdsc: Bump parent usage count when GDSC is found enabled clk: qcom: Drop mmcx gdsc supply for dispcc and videocc clk: qcom: fix build error initializer element is not constant dt-bindings: clock: qcom,gcc-msm8996: add more GCC clock sources clk: qcom: add support for SM8350 DISPCC clk: qcom: add support for SM8350 GPUCC clk: qcom: add camera clock controller driver for SM8450 SoC clk: qcom: clk-alpha-pll: add Rivian EVO PLL configuration interfaces clk: qcom: clk-alpha-pll: add Lucid EVO PLL configuration interfaces clk: qcom: clk-alpha-pll: limit exported symbols to GPL licensed code clk: qcom: clk-alpha-pll: fix clk_trion_pll_configure description ... commit 6312bb711e5c0bc5810a0966ff647a57b3236039 Author: Rob Herring Date: Thu Jul 28 11:51:37 2022 -0600 dt-bindings: PCI: host-generic-pci: Allow IOMMU and MSI properties Allow 'iommu-map', 'iommu-map-mask', and 'msi-parent' properties for generic host. This fixes unevaluated property warnings on Arm Juno, AMD Seattle, and FSL LS1028a. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220728175137.1172841-1-robh@kernel.org Documentation/devicetree/bindings/pci/host-generic-pci.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 6213c6c545cb273510047df881230d855e474d3b Author: Richard Zhu Date: Wed Jul 20 11:26:16 2022 +0800 PCI: imx6: Support more than Gen2 speed link mode Support more than Gen2 speed link mode, since i.MX8MP PCIe supports up to Gen3 link speed. Link: https://lore.kernel.org/r/1658287576-26908-1-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pci-imx6.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 13f8f3d1e369f56dfaeea10a2238d56bc36c876c Author: Richard Zhu Date: Wed May 18 17:35:27 2022 +0800 PCI: imx6: Set PCIE_DBI_RO_WR_EN before writing DBI registers The PCIE_DBI_RO_WR_EN bit should be set when write some DBI registers. To make sure that the DBI registers are writable, set the PCIE_DBI_RO_WR_EN properly when writing the DBI registers. Link: https://lore.kernel.org/r/1652866528-13220-1-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pci-imx6.c | 4 ++++ 1 file changed, 4 insertions(+) commit 835a345b18b013cc03b0fc392394fbccd61d4efb Author: Richard Zhu Date: Thu Jul 14 15:31:09 2022 +0800 PCI: imx6: Reformat suspend callback to keep symmetric with resume Create imx6_pcie_stop_link() and imx6_pcie_host_exit() functions. Encapsulate clocks, regulators disables and PHY uninitialization into imx6_pcie_host_exit(). To keep suspend/resume symmetric as much as possible, invoke these two new created functions in suspend callback. To be symmetric with imx6_pcie_host_exit(), move imx6_pcie_clk_enable() to imx6_pcie_host_init() from imx6_pcie_deassert_core_reset(). Link: https://lore.kernel.org/r/1657783869-19194-18-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach drivers/pci/controller/dwc/pci-imx6.c | 62 +++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 25 deletions(-) commit 1c5e761565c10945049e5d52fb17540cda23690e Author: Richard Zhu Date: Thu Jul 14 15:31:08 2022 +0800 PCI: imx6: Move the imx6_pcie_ltssm_disable() earlier Move the imx6_pcie_ltssm_disable() earlier and place it just behind the imx6_pcie_ltssm_enable(), since it might not be only used by suspend callback directly. To be symmetric with imx6_pcie_ltssm_enable(), add the IMX6Q and IMX8MQ switch cases in imx6_pcie_ltssm_disable(). Link: https://lore.kernel.org/r/1657783869-19194-17-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pci-imx6.c | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) commit 34eb543f4ffa6d9bcadfee29adb05d7c5937bc34 Author: Bjorn Helgaas Date: Thu Jul 14 15:31:07 2022 +0800 PCI: imx6: Disable clocks in reverse order of enable imx6_pcie_clk_enable() enables clocks in the order: pcie_phy pcie_bus pcie imx6_pcie_enable_ref_clk Change imx6_pcie_clk_disable() to disable them in the reverse order. Link: https://lore.kernel.org/r/1657783869-19194-16-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach Acked-by: Richard Zhu drivers/pci/controller/dwc/pci-imx6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cf236e0c0d59b36e500c7a37e310e0cd6eefa5a0 Author: Richard Zhu Date: Thu Jul 14 15:31:06 2022 +0800 PCI: imx6: Do not hide PHY driver callbacks and refine the error handling Move the phy_power_on() to host_init from imx6_pcie_clk_enable(). Move the phy_init() to host_init from imx6_pcie_deassert_core_reset(). Refine the error handling in imx6_pcie_host_init() accordingly. Link: https://lore.kernel.org/r/1657783869-19194-15-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pci-imx6.c | 36 ++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) commit af48f8226e94555bd3c5f93a437acf714024c2c3 Author: Richard Zhu Date: Thu Jul 14 15:31:05 2022 +0800 PCI: imx6: Reduce resume time by only starting link if it was up before suspend i.MX PCIe doesn't support hotplug. During resume, only start PCIe link training when the link was up before system suspend to avoid the long latency in the link training period. Link: https://lore.kernel.org/r/1657783869-19194-14-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pci-imx6.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 508919d0a95c04ef04469e60776146a9795c07cf Author: Richard Zhu Date: Thu Jul 14 15:31:04 2022 +0800 PCI: imx6: Mark the link down as non-fatal error If the PCIe link is down, return zero from imx6_pcie_start_link() so the driver will probe successfully. Link: https://lore.kernel.org/r/1657783869-19194-13-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach drivers/pci/controller/dwc/pci-imx6.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit f0691e326b270d86fff408f347bd6498949f3076 Author: Richard Zhu Date: Thu Jul 14 15:31:03 2022 +0800 PCI: imx6: Move regulator enable out of imx6_pcie_deassert_core_reset() Move regulator enable out of imx6_pcie_deassert_core_reset(), since the regulator_enable() has nothing to do with imx6_pcie_deassert_core_reset(). Link: https://lore.kernel.org/r/1657783869-19194-12-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pci-imx6.c | 36 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit a4bb720eeb1e2f2b895734ccce0dceec0a64eebd Author: Richard Zhu Date: Thu Jul 14 15:31:02 2022 +0800 PCI: imx6: Turn off regulator when system is in suspend mode The driver should undo any enables it did itself. The regulator disable shouldn't be basing decisions on regulator_is_enabled(). Move the regulator_disable to the suspend function, turn off regulator when the system is in suspend mode. Link: https://lore.kernel.org/r/1657783869-19194-11-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pci-imx6.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit cfacf22e0df2e3db3e90306f830a4f6c08829b05 Author: Richard Zhu Date: Thu Jul 14 15:31:01 2022 +0800 PCI: imx6: Call host init function directly in resume Call imx6_pcie_host_init() instead of duplicating codes in resume. Note that this also means we do MPLL setup again during resume, which we didn't do before. [bhelgaas: add MPLL setup note, pointed out by Lucas] Link: https://lore.kernel.org/r/1657783869-19194-10-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach drivers/pci/controller/dwc/pci-imx6.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fea446eb9c77209dcd056fbd86c269a390075a29 Author: Richard Zhu Date: Thu Jul 14 15:31:00 2022 +0800 PCI: imx6: Disable i.MX6QDL clock when disabling ref clocks When disabling PCIe clocks, disable i.MX6QDL ref clock too. Link: https://lore.kernel.org/r/1657783869-19194-9-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach drivers/pci/controller/dwc/pci-imx6.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9751f65db025a19a8f73e0531240b1d21a12139c Author: Richard Zhu Date: Thu Jul 14 15:30:59 2022 +0800 PCI: imx6: Propagate .host_init() errors to caller Since dw_pcie_host_init() checks for errors from ops->host_init(), check for errors when enabling power regulators and clocks and return them. [bhelgaas: commit log] Link: https://lore.kernel.org/r/1657783869-19194-8-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach drivers/pci/controller/dwc/pci-imx6.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 835fe229d7099dc07f34f16780cbad9081da7bf1 Author: Richard Zhu Date: Thu Jul 14 15:30:58 2022 +0800 PCI: imx6: Collect clock enables in imx6_pcie_clk_enable() Encapsulate the i.MX PCIe clock enable operations into one standalone function, imx6_pcie_clk_enable(). No functional change intended. [bhelgaas: split pure code moves into separate patches] Link: https://lore.kernel.org/r/1657783869-19194-7-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach drivers/pci/controller/dwc/pci-imx6.c | 95 +++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 39 deletions(-) commit d0a75c791f981546618c917293bc20094a923410 Author: Bjorn Helgaas Date: Thu Jul 14 15:30:57 2022 +0800 PCI: imx6: Factor out ref clock disable to match enable The PCIe ref clocks are specific to different variants. The enables are already split out into imx6_pcie_enable_ref_clk(), but the disables were combined with the more generic bus/phy/pcie clock disables in imx6_pcie_clk_disable(). Split out the variant-specific disables into imx6_pcie_disable_ref_clk() to match imx6_pcie_enable_ref_clk(). No functional change intended. Link: https://lore.kernel.org/r/1657783869-19194-6-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach Acked-by: Richard Zhu drivers/pci/controller/dwc/pci-imx6.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 34b1b9022586bf909ad0c7213d8669902150fc2a Author: Richard Zhu Date: Thu Jul 14 15:30:56 2022 +0800 PCI: imx6: Move imx6_pcie_clk_disable() earlier Move imx6_pcie_clk_disable() earlier to be near other clock-related functions. No functional change intended. [bhelgaas: reorder patch so pure moves are earlier] Link: https://lore.kernel.org/r/1657783869-19194-5-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach drivers/pci/controller/dwc/pci-imx6.c | 48 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit 276509690c2e4993016d1c2e220ca1929791b812 Author: Bjorn Helgaas Date: Thu Jul 14 15:30:55 2022 +0800 PCI: imx6: Move imx6_pcie_enable_ref_clk() earlier Move imx6_pcie_enable_ref_clk() earlier so it's not in the middle between imx6_pcie_assert_core_reset() and imx6_pcie_deassert_core_reset(). No functional change intended. Link: https://lore.kernel.org/r/1657783869-19194-4-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach Acked-by: Richard Zhu drivers/pci/controller/dwc/pci-imx6.c | 96 +++++++++++++++++------------------ 1 file changed, 48 insertions(+), 48 deletions(-) commit 6b1e989e491088b79f2582c9c0c7925ce1d67e06 Author: Bjorn Helgaas Date: Thu Jul 14 15:30:54 2022 +0800 PCI: imx6: Move PHY management functions together Collect imx6_pcie_init_phy(), imx7d_pcie_wait_for_phy_pll_lock(), and imx6_setup_phy_mpll() earlier with other PHY-related code. No functional change intended. Link: https://lore.kernel.org/r/1657783869-19194-3-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach Acked-by: Richard Zhu drivers/pci/controller/dwc/pci-imx6.c | 256 +++++++++++++++++----------------- 1 file changed, 128 insertions(+), 128 deletions(-) commit 79f14b6f1c60ea79e2209e301e31c12eb2a71e26 Author: Bjorn Helgaas Date: Thu Jul 14 15:30:53 2022 +0800 PCI: imx6: Move imx6_pcie_grp_offset(), imx6_pcie_configure_type() earlier Move imx6_pcie_grp_offset() and imx6_pcie_configure_type() earlier in the file since they depend on nothing and are used by several other functions that will be moved earlier. No functional change intended. Link: https://lore.kernel.org/r/1657783869-19194-2-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach Acked-by: Richard Zhu drivers/pci/controller/dwc/pci-imx6.c | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) commit 9d14ad61551d72fdd78ee87bdf741e00f0d31ca7 Author: Bjorn Helgaas Date: Tue Jul 19 15:50:18 2022 -0500 PCI: imx6: Convert to NOIRQ_SYSTEM_SLEEP_PM_OPS() Replace SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() with NOIRQ_SYSTEM_SLEEP_PM_OPS(), which has the advantage that the compiler always sees the PM callbacks as referenced, so they don't need to be wrapped with "#ifdef CONFIG_PM_SLEEP" or tagged with "__maybe_unused" to avoid "defined but not used" warnings. See 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones"). Signed-off-by: Bjorn Helgaas Reviewed-by: Arnd Bergmann drivers/pci/controller/dwc/pci-imx6.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 22f3571cbc84b9150238a43d271ffbf7fad3d81d Author: Marek Szyprowski Date: Wed Jun 29 00:04:09 2022 +0200 PCI: exynos: Correct generic PHY usage The proper initialization for generic PHYs is to call first phy_init(), then phy_power_on(). While touching this, remove the phy_reset() call. It is just a left-over from the obsoleted Exynos5440 support and the current exynos-pcie PHY driver doesn't even support this function. It is also rarely used by other drivers. Link: https://lore.kernel.org/r/20220628220409.26545-2-m.szyprowski@samsung.com Reported-by: Bjorn Helgaas Signed-off-by: Marek Szyprowski Signed-off-by: Bjorn Helgaas Reviewed-by: Chanho Park Acked-by: Krzysztof Kozlowski drivers/pci/controller/dwc/pci-exynos.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f2812227bb07e2eaee74253f11cea1576945df31 Author: Marek Szyprowski Date: Wed Jun 29 00:04:08 2022 +0200 phy: samsung: phy-exynos-pcie: sanitize init/power_on callbacks The exynos-pcie driver called phy_power_on() before phy_init() for some historical reasons. However the generic PHY framework assumes that the proper sequence is to call phy_init() first, then phy_power_on(). The operations done by both functions should be considered as one action and as such they are called by the exynos-pcie driver (without doing anything between them). The initialization is just a sequence of register writes, which cannot be altered without breaking the hardware operation. To match the generic PHY framework requirement, simply move all register writes to the phy_init()/phy_exit() and drop power_on()/power_off() callbacks. This way the driver will also work with the old (incorrect) PHY initialization call sequence. Link: https://lore.kernel.org/r/20220628220409.26545-1-m.szyprowski@samsung.com Reported-by: Bjorn Helgaas Signed-off-by: Marek Szyprowski Signed-off-by: Bjorn Helgaas Reviewed-by: Chanho Park Acked-by: Krzysztof Kozlowski Acked-By: Vinod Koul drivers/phy/samsung/phy-exynos-pcie.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) commit 91a773f9986b5cb4d6a6610b0326ef7c472dd543 Author: Dmitry Baryshkov Date: Thu Jul 7 16:47:32 2022 +0300 dt-bindings: PCI: qcom: Support additional MSI vectors On Qualcomm platforms each group of 32 MSI vectors is routed to the separate GIC interrupt. Document mapping of additional interrupts. Link: https://lore.kernel.org/r/20220707134733.2436629-6-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Reviewed-by: Johan Hovold Acked-by: Stanimir Varbanov .../devicetree/bindings/pci/qcom,pcie.yaml | 51 ++++++++++++++++++++-- 1 file changed, 48 insertions(+), 3 deletions(-) commit cd761378e62c2614a3e7a1a8e4ecf68503a2c877 Author: Dmitry Baryshkov Date: Thu Jul 7 16:47:31 2022 +0300 PCI: dwc: Handle MSIs routed to multiple GIC interrupts On some Qualcomm platforms each group of 32 MSI vectors is routed to a separate GIC interrupt. Implement support for such configurations by parsing "msi0" ... "msiX" interrupts and attaching them to the chained handler. Note that if DT doesn't list an array of MSI interrupts and uses a single "msi" IRQ, the driver will limit the number of supported MSI vectors to 32. Link: https://lore.kernel.org/r/20220707134733.2436629-5-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Johan Hovold Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware-host.c | 61 +++++++++++++++++++++-- 1 file changed, 58 insertions(+), 3 deletions(-) commit db388348acffe954656ec38440809ec770707417 Author: Dmitry Baryshkov Date: Fri Jul 22 11:34:12 2022 -0500 PCI: dwc: Convert struct pcie_port.msi_irq to an array The Qualcomm DWC PCIe controller supports more than 32 MSI interrupts, but they are routed to separate interrupts in groups of 32 vectors. To support this configuration, change the msi_irq field to an array. Let the DWC core handle all interrupts that were set in this array. [bhelgaas: reorder, drop "irq" temporary to make patch cleaner] Link: https://lore.kernel.org/r/20220707134733.2436629-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Johan Hovold Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pci-dra7xx.c | 2 +- drivers/pci/controller/dwc/pci-exynos.c | 2 +- drivers/pci/controller/dwc/pcie-designware-host.c | 29 ++++++++++++++--------- drivers/pci/controller/dwc/pcie-designware.h | 2 +- drivers/pci/controller/dwc/pcie-keembay.c | 2 +- drivers/pci/controller/dwc/pcie-spear13xx.c | 2 +- drivers/pci/controller/dwc/pcie-tegra194.c | 2 +- 7 files changed, 24 insertions(+), 17 deletions(-) commit 226ec087497a6a1a68d54c55f1fc5f1e8136610f Author: Dmitry Baryshkov Date: Fri Jul 22 11:28:28 2022 -0500 PCI: dwc: Split MSI IRQ parsing/allocation to a separate function Split handling of MSI host IRQs to a separate dw_pcie_msi_host_init() function. The code is complex enough to warrant a separate function. [bhelgaas: reorder patch earlier] Link: https://lore.kernel.org/r/20220707134733.2436629-4-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Johan Hovold Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware-host.c | 96 +++++++++++++---------- 1 file changed, 54 insertions(+), 42 deletions(-) commit 3c62f878a9695111a43dc2c1f90cf4b15efc76a0 Author: Dmitry Baryshkov Date: Thu Jul 7 16:47:28 2022 +0300 PCI: dwc: Correct msi_irq condition in dw_pcie_free_msi() The dwc-based drivers set pp->msi_irq to -ENODEV if they do not want the dwc core to do anything with pp->msi_irq. dw_pcie_host_init() sets the handler and data when "pp->msi_irq > 0", so use the same condition when removing the handler and data in dw_pcie_free_msi(). Link: https://lore.kernel.org/r/20220707134733.2436629-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Johan Hovold Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6be6f8529bd7f3eb40a5f061badfc230e6a9fc9c Author: Christophe JAILLET Date: Sat Jul 9 16:10:52 2022 +0200 PCI: dwc: Use the bitmap API to allocate bitmaps Use devm_bitmap_zalloc() instead of hand-writing them. It is less verbose and it improves the semantic. Link: https://lore.kernel.org/r/bc6586a603abc0db7d4531308b698fbe7a6d7083.1657375829.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pcie-designware-ep.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 35797e672ff0610224d80e3cc08393fef1032f9a Author: Will McVicker Date: Mon Jun 13 17:26:11 2022 -0500 PCI: dwc: Fix MSI msi_msg DMA mapping As of 07940c369a6b ("PCI: dwc: Fix MSI page leakage in suspend/resume"), the PCIe designware host driver has been using the driver data allocation for the msi_msg DMA mapping which can result in a DMA_MAPPING_ERROR due to the DMA overflow check in dma_direct_map_page() when the address is greater than 32 bits (reported in [1]). The commit was trying to address a memory leak on suspend/resume by moving the MSI mapping to dw_pcie_host_init(), but subsequently dropped the page allocation thinking it wasn't needed. To fix the DMA mapping issue as well as make msi_msg DMA'able, switch back to allocating a 32-bit page for the msi_msg. To avoid the suspend/resume leak, allocate the page in dw_pcie_host_init() since that shouldn't be called during suspend/resume. [1] https://lore.kernel.org/all/Yo0soniFborDl7+C@google.com/ Signed-off-by: Will McVicker Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring drivers/pci/controller/dwc/pcie-designware-host.c | 14 ++++++++------ drivers/pci/controller/dwc/pcie-designware.h | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) commit ce06bf570390fb8b41d581e5d594727b51367179 Author: Serge Semin Date: Fri Jun 24 17:39:46 2022 +0300 PCI: dwc: Check iATU in/outbound range setup status Make the DWC PCIe RC/EP safer and more verbose for invalid or failed inbound and outbound iATU window setups. Silently ignoring iATU regions setup errors may cause unpredictable errors. For instance if a cfg or IO window fails to be activated, then any CFG/IO requested won't reach target PCIe devices and the corresponding accessors will return platform-specific random values. [bhelgaas: trim commit log] Link: https://lore.kernel.org/r/20220624143947.8991-15-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware-ep.c | 9 +- drivers/pci/controller/dwc/pcie-designware-host.c | 153 ++++++++++++++-------- drivers/pci/controller/dwc/pcie-designware.h | 5 +- drivers/pci/controller/dwc/pcie-intel-gw.c | 6 +- 4 files changed, 114 insertions(+), 59 deletions(-) commit edf408b946d37cc70fbf0db6ab85bbf67dae1894 Author: Serge Semin Date: Fri Jun 24 17:39:45 2022 +0300 PCI: dwc: Validate iATU outbound mappings against hardware constraints Make __dw_pcie_prog_outbound_atu() check the requested region base and size against what the hardware can support. Return error if the region is not correctly aligned or of a supported size. [bhelgaas: commit log] Link: https://lore.kernel.org/r/20220624143947.8991-14-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware.c | 38 ++++++++++++++++++---------- drivers/pci/controller/dwc/pcie-designware.h | 10 +++----- 2 files changed, 29 insertions(+), 19 deletions(-) commit 89473aa9ab261948ed13b16effe841a675efed77 Author: Serge Semin Date: Fri Jun 24 17:39:44 2022 +0300 PCI: dwc: Add iATU regions size detection procedure The DWC PCIe RC/EP/DM IP core configuration parameters determine the number of inbound and outbound iATU windows, alignment requirements (which is also the minimum window size), minimum and maximum sizes. If internal ATU is enabled, the former settings are determined by CX_ATU_MIN_REGION_SIZE; the latter are determined by CX_ATU_MAX_REGION_SIZE. Determine the required alignment and maximum size supported by the controller and log it to help verify whether the requested inbound or outbound memory mappings can be fully created. Note 1. The extended iATU regions have been supported since DWC PCIe v4.60a. There is no need in testing the upper limit register availability for the older cores. Note 2. The regions alignment is determined with using the fls() method since the lower four bits of the ATU Limit register can be occupied with the Circular Buffer Increment setting, which can be initialized with zeros. Link: https://lore.kernel.org/r/20220624143947.8991-13-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware.c | 33 ++++++++++++++++++++++++---- drivers/pci/controller/dwc/pcie-designware.h | 2 ++ 2 files changed, 31 insertions(+), 4 deletions(-) commit 5a163f5998185d3af58d825501765b08fd6ed32e Author: Serge Semin Date: Fri Jun 24 17:39:43 2022 +0300 PCI: dwc: Simplify in/outbound iATU setup methods Previously __dw_pcie_prog_outbound_atu() duplicated a lot of code between the iatu_unroll_enabled version and the PCIE_ATU_VIEWPORT version: __dw_pcie_prog_outbound_atu if (iatu_unroll_enabled) dw_pcie_prog_outbound_atu_unroll dw_pcie_writel_ob_unroll(PCIE_ATU_UNR_LOWER_BASE, ...) dw_pcie_writel_ob_unroll(PCIE_ATU_UNR_UPPER_BASE, ...) ... return dw_pcie_writel_dbi(PCIE_ATU_VIEWPORT, ...) dw_pcie_writel_dbi(PCIE_ATU_LOWER_BASE, ...) dw_pcie_writel_dbi(PCIE_ATU_UPPER_BASE, ...) ... Unify those by pushing the unroll address computation and viewport selection down into dw_pcie_writel_atu() so we can use the same dw_pcie_writel_atu_ob() accessor for both paths: __dw_pcie_prog_outbound_atu dw_pcie_writel_atu_ob(PCIE_ATU_LOWER_BASE, ...) dw_pcie_writel_atu dw_pcie_select_atu # new if (iatu_unroll_enabled) return pci->atu_base + PCIE_ATU_UNROLL_BASE(...) dw_pcie_writel_dbi(PCIE_ATU_VIEWPORT, ...) return pci->atu_base dw_pcie_write(base + reg) dw_pcie_writel_atu_ob(PCIE_ATU_UPPER_BASE, ...) ... In the non-unroll case, this does involve more MMIO writes to PCIE_ATU_VIEWPORT, but it's mainly in initialization paths and the code simplification is significant. [bhelgaas: commit log, simplify dw_pcie_select_atu()] Link: https://lore.kernel.org/r/20220624143947.8991-12-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pcie-designware.c | 290 +++++++----------------- drivers/pci/controller/dwc/pcie-designware.h | 48 ++-- drivers/pci/controller/dwc/pcie-tegra194-acpi.c | 7 +- 3 files changed, 108 insertions(+), 237 deletions(-) commit 38fe272389f44c223c689d74d9e2365257ed85e1 Author: Serge Semin Date: Fri Jun 24 17:39:42 2022 +0300 PCI: dwc: Drop enum dw_pcie_region_type in favor of PCIE_ATU_REGION_DIR_IB/OB Previously callers of dw_pcie_disable_atu() supplied enum dw_pcie_region_type (DW_PCIE_REGION_INBOUND, DW_PCIE_REGION_OUTBOUND), which dw_pcie_disable_atu() converted to the PCIE_ATU_REGION_DIR_IB or PCIE_ATU_REGION_DIR_OB values needed to program the ATU registers. Simplify the code by dropping the dw_pcie_region_type enum and passing PCIE_ATU_REGION_DIR_IB or PCIE_ATU_REGION_DIR_OB directly. Reorder dw_pcie_disable_atu() arguments to (dir, index) since "index" indicates an ATU window in the regions of the corresponding direction. [bhelgaas: commit log] Link: https://lore.kernel.org/r/20220624143947.8991-11-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware-ep.c | 4 ++-- drivers/pci/controller/dwc/pcie-designware-host.c | 2 +- drivers/pci/controller/dwc/pcie-designware.c | 28 ++++++----------------- drivers/pci/controller/dwc/pcie-designware.h | 13 +++-------- 4 files changed, 13 insertions(+), 34 deletions(-) commit 4859db9bca5daafc4ec9ef4e5aab9e054b483e0c Author: Serge Semin Date: Fri Jun 24 17:39:41 2022 +0300 PCI: dwc: Drop enum dw_pcie_as_type in favor of PCIE_ATU_TYPE_MEM/IO Previously dw_pcie_ep_set_bar() converted the BAR PCI_BASE_ADDRESS_SPACE bit to the internal dw_pcie_as_type enum (DW_PCIE_AS_MEM, DW_PCIE_AS_IO) and passed it down to dw_pcie_prog_inbound_atu(), which converted the enum to the PCIE_ATU_TYPE_MEM/PCIE_ATU_TYPE_IO values needed to program the ATU registers. Simplify the code by dropping the dw_pcie_as_type enum and passing PCIE_ATU_TYPE_MEM or PCIE_ATU_TYPE_IO directly. Reorder inbound ATU function arguments to match the outbound functions, with address-related parameters at the end. [bhelgaas: commit log] Link: https://lore.kernel.org/r/20220624143947.8991-10-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware-ep.c | 21 +++++++-------- drivers/pci/controller/dwc/pcie-designware.c | 35 ++++--------------------- drivers/pci/controller/dwc/pcie-designware.h | 9 +------ 3 files changed, 15 insertions(+), 50 deletions(-) commit c6481d51dc65f27cf35df499d1cafbfe9327f7a3 Author: Serge Semin Date: Fri Jun 24 17:39:40 2022 +0300 PCI: dwc: Add dw_pcie_ops.host_deinit() callback dw_pcie_host_init() calls the dw_pcie_ops.host_init() callback to do platform-specific host initialization. Add a dw_pcie_ops.host_deinit() callback to perform the corresponding cleanups in dw_pcie_host_deinit() and in dw_pcie_host_init() failure paths. Link: https://lore.kernel.org/r/20220624143947.8991-9-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware-host.c | 21 ++++++++++++++++----- drivers/pci/controller/dwc/pcie-designware.h | 1 + 2 files changed, 17 insertions(+), 5 deletions(-) commit 58c379eee610276091fa21679e72fb5a9b80c18e Author: Serge Semin Date: Fri Jun 24 17:39:39 2022 +0300 PCI: tegra194: Drop manual DW PCIe controller version setup Since the DW PCIe common code (dw_pcie_version_detect()) now reads the IP core version directly from the hardware, there is no point manually setting the version for controllers newer than v4.70a. Tegra194 only supports v4.90a, so remove the now-superfluous code that sets struct dw_pcie.version. Suggested-by: Rob Herring Link: https://lore.kernel.org/r/20220624143947.8991-8-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-tegra194.c | 1 - 1 file changed, 1 deletion(-) commit 50deb8ac61705b98c89c98db711b64f48d9f9f49 Author: Serge Semin Date: Fri Jun 24 17:39:38 2022 +0300 PCI: intel-gw: Drop manual DW PCIe controller version setup Since the DW PCIe common code (dw_pcie_version_detect()) now reads the IP core version directly from the hardware, there is no point manually setting the version for controllers newer than v4.70a. Remove the now-superfluous intel-gw code that sets struct dw_pcie.version. Suggested-by: Rob Herring Link: https://lore.kernel.org/r/20220624143947.8991-7-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-intel-gw.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 0b0a780d52ad2bd51e4e154c190abcfed43e33bb Author: Serge Semin Date: Fri Jun 24 17:39:37 2022 +0300 PCI: dwc: Add macros to compare Synopsys IP core versions Add macros to compare DWC IP core versions: dw_pcie_ver_is() dw_pcie_ver_is_ge() dw_pcie_ver_type_is() dw_pcie_ver_type_is_ge() These are along the lines of DWC3_VER_IS() and dw_spi_ver_is(). [bhelgaas: commit log] Link: https://lore.kernel.org/r/20220624143947.8991-6-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring drivers/pci/controller/dwc/pci-keystone.c | 2 +- drivers/pci/controller/dwc/pcie-designware.c | 8 ++++---- drivers/pci/controller/dwc/pcie-designware.h | 15 +++++++++++++++ 3 files changed, 20 insertions(+), 5 deletions(-) commit 13e9d3900c20247993db68856d9898161acb403a Author: Serge Semin Date: Fri Jun 24 17:39:36 2022 +0300 PCI: dwc: Read DWC IP core version from register Since DWC PCIe v4.70a, the controller version and version type can be read from the PORT_LOGIC.PCIE_VERSION_OFF and PORT_LOGIC.PCIE_VERSION_TYPE_OFF registers respectively. Read the version from those registers and warn if if's different from the version we got from the device tree. We can only read the version after platform-specific drivers have done any DBI-related initialization, such as reference clock activation. [bhelgaas: commit log] Link: https://lore.kernel.org/r/20220624143947.8991-5-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware-ep.c | 2 ++ drivers/pci/controller/dwc/pcie-designware-host.c | 2 ++ drivers/pci/controller/dwc/pcie-designware.c | 24 +++++++++++++++++++++++ drivers/pci/controller/dwc/pcie-designware.h | 6 ++++++ 4 files changed, 34 insertions(+) commit afe1c6d50d33ea7d888b0105670fb2aaa5abf495 Author: Serge Semin Date: Fri Jun 24 17:39:35 2022 +0300 PCI: dwc: Use native DWC IP core version representation Save the DWC IP core version in the same format as the PORT_LOGIC.PCIE_VERSION_OFF register, similar to what other drivers for DWC IP do (dw_spi_hw_init(), dwc3_core_is_valid(), stmmac_hwif_init()). [bhelgaas: trim commit log] Link: https://lore.kernel.org/r/20220624143947.8991-4-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pci-keystone.c | 12 ++++++------ drivers/pci/controller/dwc/pcie-designware.c | 8 ++++---- drivers/pci/controller/dwc/pcie-designware.h | 10 +++++++++- drivers/pci/controller/dwc/pcie-intel-gw.c | 4 ++-- drivers/pci/controller/dwc/pcie-tegra194.c | 2 +- 5 files changed, 22 insertions(+), 14 deletions(-) commit e3dc79adfac96d7b1a62f3f27004c3f9013875bc Author: Serge Semin Date: Fri Jun 24 17:39:34 2022 +0300 PCI: dwc: Detect iATU settings after getting "addr_space" resource Previously, dw_pcie_ep_init() did: dw_pcie_iatu_detect(pci); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "addr_space"); if (!res) return -EINVAL; The platform_get_resource_byname() can fail, and dw_pcie_iatu_detect() doesn't depend on the "addr_space" resource, so delay it until afterwards, i.e., platform_get_resource_byname(pdev, IORESOURCE_MEM, "addr_space"); dw_pcie_iatu_detect(pci); [bhelgaas: commit log] Link: https://lore.kernel.org/r/20220624143947.8991-3-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware-ep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14c4ad125cf94ba226556dd5cffbd00c6482c6bd Author: Serge Semin Date: Fri Jun 24 17:39:33 2022 +0300 PCI: dwc: Log link speed and width if it comes up Printing just "link up" isn't very informative for PCI Express. Even if the link is up, bus performance can degrade to slower speeds or to narrower width than both Root Port and its partner is capable of. In that case it would be handy to know the link specifications as early as possible. If the link comes up, log the link speed (PCIe generation) and width. Link: https://lore.kernel.org/r/20220624143947.8991-2-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 9de1f9c8ca5100a02a2e271bdbde36202e251b4b Merge: dfea84827f7e 779fda86bdeb Author: Linus Torvalds Date: Mon Aug 1 12:48:15 2022 -0700 Merge tag 'irq-core-2022-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "Updates for interrupt core and drivers: Core: - Fix a few inconsistencies between UP and SMP vs interrupt affinities - Small updates and cleanups all over the place New drivers: - LoongArch interrupt controller - Renesas RZ/G2L interrupt controller Updates: - Hotpath optimization for SiFive PLIC - Workaround for broken PLIC edge triggered interrupts - Simall cleanups and improvements as usual" * tag 'irq-core-2022-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (52 commits) irqchip/mmp: Declare init functions in common header file irqchip/mips-gic: Check the return value of ioremap() in gic_of_init() genirq: Use for_each_action_of_desc in actions_show() irqchip / ACPI: Introduce ACPI_IRQ_MODEL_LPIC for LoongArch irqchip: Add LoongArch CPU interrupt controller support irqchip: Add Loongson Extended I/O interrupt controller support irqchip/loongson-liointc: Add ACPI init support irqchip/loongson-pch-msi: Add ACPI init support irqchip/loongson-pch-pic: Add ACPI init support irqchip: Add Loongson PCH LPC controller support LoongArch: Prepare to support multiple pch-pic and pch-msi irqdomain LoongArch: Use ACPI_GENERIC_GSI for gsi handling genirq/generic_chip: Export irq_unmap_generic_chip ACPI: irq: Allow acpi_gsi_to_irq() to have an arch-specific fallback APCI: irq: Add support for multiple GSI domains LoongArch: Provisionally add ACPICA data structures irqdomain: Use hwirq_max instead of revmap_size for NOMAP domains irqdomain: Report irq number for NOMAP domains irqchip/gic-v3: Fix comment typo dt-bindings: interrupt-controller: renesas,rzg2l-irqc: Document RZ/V2L SoC ... commit 80ef928643c1558a0474389fcd680a5ccd6c86e6 Author: Ammar Faizi Date: Mon Aug 1 18:59:56 2022 +0700 net: devlink: Fix missing mutex_unlock() call Commit 2dec18ad826f forgets to call mutex_unlock() before the function returns in the error path: New smatch warnings: net/core/devlink.c:6392 devlink_nl_cmd_region_new() warn: inconsistent \ returns '®ion->snapshot_lock'. Make sure we call mutex_unlock() in this error path. Reported-by: kernel test robot Reported-by: Dan Carpenter Fixes: 2dec18ad826f ("net: devlink: remove region snapshots list dependency on devlink->lock") Signed-off-by: Ammar Faizi Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20220801115742.1309329-1-ammar.faizi@intel.com Signed-off-by: Jakub Kicinski net/core/devlink.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d81c7cdd7a6ddffcc8c00c991e3d6e24db84bd9e Author: Tariq Toukan Date: Mon Aug 1 14:24:44 2022 +0300 net/tls: Remove redundant workqueue flush before destroy destroy_workqueue() safely destroys the workqueue after draining it. No need for the explicit call to flush_workqueue(). Remove it. Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20220801112444.26175-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski net/tls/tls_device.c | 1 - 1 file changed, 1 deletion(-) commit dfea84827f7eb49ca41d837d92ac1cbd5353a742 Merge: 63e6053add5a cceeeb6a6d02 Author: Linus Torvalds Date: Mon Aug 1 12:37:54 2022 -0700 Merge tag 'timers-core-2022-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "Timers, timekeeping and related drivers update: Core: - Make wait_event_hrtimeout() aware of RT/DL tasks New drivers: - R-Car Gen4 timer - Tegra186 timer - Mediatek MT6795 CPUXGPT timer Updates: - Rework suspend/resume handling in timer drivers so it takes inactive clocks into account. - The usual device tree compatible add ons - Small fixed and cleanups all over the place" * tag 'timers-core-2022-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits) wait: Fix __wait_event_hrtimeout for RT/DL tasks clocksource/drivers/sun5i: Remove unnecessary (void*) conversions dt-bindings: timer: allwinner,sun4i-a10-timer: Add D1 compatible dt-bindings: timer: ingenic,tcu: use absolute path to other schema clocksource/drivers/sun4i: Remove unnecessary (void*) conversions dt-bindings: timer: renesas,cmt: Fix R-Car Gen4 fall-out clocksource/drivers/tegra186: Put Kconfig option 'tristate' to 'bool' clocksource/drivers/timer-ti-dm: Make driver selection bool for TI K3 clocksource/drivers/timer-ti-dm: Add compatible for am6 SoCs clocksource/drivers/timer-ti-dm: Make timer selectable for ARCH_K3 clocksource/drivers/timer-ti-dm: Move inline functions to driver for am6 clocksource/drivers/sh_cmt: Add R-Car Gen4 support dt-bindings: timer: renesas,cmt: R-Car V3U is R-Car Gen4 dt-bindings: timer: renesas,cmt: Add r8a779f0 and generic Gen4 CMT support clocksource/drivers/timer-microchip-pit64b: Fix compilation warnings clocksource/drivers/timer-microchip-pit64b: Use mchp_pit64b_{suspend, resume} clocksource/drivers/timer-microchip-pit64b: Remove suspend/resume ops for ce thermal/drivers/rcar_gen3_thermal: Add r8a779f0 support clocksource/drivers/timer-mediatek: Implement CPUXGPT timers dt-bindings: timer: mediatek: Add CPUX System Timer and MT6795 compatible ... commit 099fd2c2020751737d9288f923d562e0e05977eb Author: Bo Liu Date: Sun Jul 31 21:39:18 2022 -0400 vfio/pci: fix the wrong word This patch fixes a wrong word in comment. Signed-off-by: Bo Liu Link: https://lore.kernel.org/r/20220801013918.2520-1-liubo03@inspur.com Signed-off-by: Alex Williamson drivers/vfio/pci/vfio_pci_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4eb919663d97e056dff8963fde22df3b0ad4d02b Author: Eric Farman Date: Thu Jul 28 22:49:14 2022 +0200 vfio/ccw: Check return code from subchannel quiesce If a subchannel is busy when a close is performed, the subchannel needs to be quiesced and left nice and tidy, so nothing unexpected (like a solicited interrupt) shows up while in the closed state. Unfortunately, the return code from this call isn't checked, so any busy subchannel is treated as a failing one. Fix that, so that the close on a busy subchannel happens normally. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20220728204914.2420989-4-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_fsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96a4c9ecaeac2863d53c086d4b5ec9985ba7154f Author: Eric Farman Date: Thu Jul 28 22:49:13 2022 +0200 vfio/ccw: Remove FSM Close from remove handlers Now that neither vfio_ccw_sch_probe() nor vfio_ccw_mdev_probe() affect the FSM state, it doesn't make sense for their _remove() counterparts try to revert things in this way. Since the FSM open and close are handled alongside MDEV open/close, these are unnecessary. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20220728204914.2420989-3-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_drv.c | 1 - drivers/s390/cio/vfio_ccw_ops.c | 2 -- 2 files changed, 3 deletions(-) commit 5a4fe7c41b586399d502f9970b077178e5dfbacf Author: Eric Farman Date: Thu Jul 28 22:49:12 2022 +0200 vfio/ccw: Add length to DMA_UNMAP checks As pointed out with the simplification of the VFIO_IOMMU_NOTIFY_DMA_UNMAP notifier [1], the length parameter was never used to check against the pinned pages. Let's correct that, and see if a page is within the affected range instead of simply the first page of the range. [1] https://lore.kernel.org/kvm/20220720170457.39cda0d0.alex.williamson@redhat.com/ Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20220728204914.2420989-2-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_cp.c | 16 +++++++++++----- drivers/s390/cio/vfio_ccw_cp.h | 2 +- drivers/s390/cio/vfio_ccw_ops.c | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) commit 7ec4cdb321738d44ae5d405e7b6ac73dfbf99caa Author: Tetsuo Handa Date: Mon Jul 25 22:49:25 2022 +0900 mtd: core: check partition before dereference syzbot is reporting NULL pointer dereference at mtd_check_of_node() [1], for mtdram test device (CONFIG_MTD_MTDRAM) is not partition. Link: https://syzkaller.appspot.com/bug?extid=fe013f55a2814a9e8cfd [1] Reported-by: syzbot Reported-by: kernel test robot Fixes: ad9b10d1eaada169 ("mtd: core: introduce of support for dynamic partitions") Signed-off-by: Tetsuo Handa CC: stable@vger.kernel.org Signed-off-by: Richard Weinberger drivers/mtd/mtdcore.c | 2 ++ 1 file changed, 2 insertions(+) commit 9661524b9b26a45ecb045d7d36f85e83d8021a86 Merge: e8166841a699 f8cd9f632f44 Author: Richard Weinberger Date: Mon Aug 1 21:31:22 2022 +0200 Merge tag 'spi-nor/for-5.20' into mtd/next SPI NOR core changes: - move SECT_4K_PMC flag out of the core as it's a vendor specific flag - s/addr_width/addr_nbytes: address width means the number of IO lines used for the address, whereas in the code it is used as the number of address bytes. - do not change nor->addr_nbytes at SFDP parsing time. At the SFDP parsing time we should not change members of struct spi_nor, but instead fill members of struct spi_nor_flash_parameters which could later on be used by the callers. - track flash's internal address mode so that we can use 4B opcodes together with opcodes that don't have a 4B opcode correspondent. SPI NOR manufacturer drivers changes: - esmt: Rename "f25l32qa" flash name to "f25l32qa-2s". - micron-st: Skip FSR reading if SPI controller does not support it to allow flashes that support FSR to work even when attached to such SPI controllers. - spansion: Add s25hl-t/s25hs-t IDs and fixups. commit 2e8f205d910eb1fc59faf24582f3faf774000360 Author: Christophe JAILLET Date: Sun Jul 31 18:34:15 2022 +0200 net: txgbe: Fix an error handling path in txgbe_probe() A pci_enable_pcie_error_reporting() should be balanced by a corresponding pci_disable_pcie_error_reporting() call in the error handling path, as already done in the remove function. Fixes: 3ce7547e5b71 ("net: txgbe: Add build support for txgbe") Signed-off-by: Christophe JAILLET Reviewed-by: Jiawen Wu Link: https://lore.kernel.org/r/082003d00be1f05578c9c6434272ceb314609b8e.1659285240.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/ethernet/wangxun/txgbe/txgbe_main.c | 1 + 1 file changed, 1 insertion(+) commit e8166841a6996ac837caa24ee0da9d3f1eaad7be Merge: ad9b10d1eaad e16eceea863b Author: Richard Weinberger Date: Mon Aug 1 21:24:54 2022 +0200 Merge remote-tracking branch 'korg_git/nand/next' into mtd/next commit 63e6053add5a6cec4dbfa3dec12e0d4439daac4a Merge: 22a39c3d8693 326ecc15c61c Author: Linus Torvalds Date: Mon Aug 1 12:24:30 2022 -0700 Merge tag 'perf-core-2022-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf events updates from Ingo Molnar: - Fix Intel Alder Lake PEBS memory access latency & data source profiling info bugs. - Use Intel large-PEBS hardware feature in more circumstances, to reduce PMI overhead & reduce sampling data. - Extend the lost-sample profiling output with the PERF_FORMAT_LOST ABI variant, which tells tooling the exact number of samples lost. - Add new IBS register bits definitions. - AMD uncore events: Add PerfMonV2 DF (Data Fabric) enhancements. * tag 'perf-core-2022-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/ibs: Add new IBS register bits into header perf/x86/intel: Fix PEBS data source encoding for ADL perf/x86/intel: Fix PEBS memory access info encoding for ADL perf/core: Add a new read format to get a number of lost samples perf/x86/amd/uncore: Add PerfMonV2 RDPMC assignments perf/x86/amd/uncore: Add PerfMonV2 DF event format perf/x86/amd/uncore: Detect available DF counters perf/x86/amd/uncore: Use attr_update for format attributes perf/x86/amd/uncore: Use dynamic events array x86/events/intel/ds: Enable large PEBS for PERF_SAMPLE_WEIGHT_TYPE commit 062cf5ebc2e8ca8afb9908072493dea314f62862 Author: Xie Shaowen Date: Sat Jul 30 17:22:54 2022 +0800 net: dsa: Fix spelling mistakes and cleanup code fix follow spelling misktakes: desconstructed ==> deconstructed enforcment ==> enforcement Reported-by: Hacash Robot Signed-off-by: Xie Shaowen Link: https://lore.kernel.org/r/20220730092254.3102875-1-studentxswpy@163.com Signed-off-by: Jakub Kicinski net/dsa/tag_brcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4ff7c8fc81cec31c852833b00afe9c85f9086b5d Author: Bagas Sanjaya Date: Sat Jul 30 09:20:57 2022 +0700 Documentation: devlink: add add devlink-selftests to the table of contents Commit 08f588fa301bef ("devlink: introduce framework for selftests") adds documentation for devlink selftests framework, but it is missing from table of contents. Add it. Link: https://lore.kernel.org/linux-doc/202207300406.CUBuyN5i-lkp@intel.com/ Fixes: 08f588fa301bef ("devlink: introduce framework for selftests") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20220730022058.16813-1-bagasdotme@gmail.com Signed-off-by: Jakub Kicinski Documentation/networking/devlink/index.rst | 1 + 1 file changed, 1 insertion(+) commit 22a39c3d8693001c301d070366435edb04d0778c Merge: b167fdffe9e7 eae6d58d67d9 Author: Linus Torvalds Date: Mon Aug 1 12:15:27 2022 -0700 Merge tag 'locking-core-2022-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: "This was a fairly quiet cycle for the locking subsystem: - lockdep: Fix a handful of the more complex lockdep_init_map_*() primitives that can lose the lock_type & cause false reports. No such mishap was observed in the wild. - jump_label improvements: simplify the cross-arch support of initial NOP patching by making it arch-specific code (used on MIPS only), and remove the s390 initial NOP patching that was superfluous" * tag 'locking-core-2022-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/lockdep: Fix lockdep_init_map_*() confusion jump_label: make initial NOP patching the special case jump_label: mips: move module NOP patching into arch code jump_label: s390: avoid pointless initial NOP patching commit c7e3548cac4a8a8bc1ad183cc7c7249463dff55f Author: Dan Carpenter Date: Mon Aug 1 13:20:12 2022 +0300 cxl/region: prevent underflow in ways_to_cxl() The "ways" variable comes from the user. The ways_to_cxl() function has an upper bound but it doesn't check for negatives. Make the "ways" variable an unsigned int to fix this bug. Fixes: 80d10a6cee05 ("cxl/region: Add interleave geometry attributes") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Yueo3NV2hFCXx1iV@kili [djbw: fixup interleave_ways_store() to only accept unsigned input] Signed-off-by: Dan Williams drivers/cxl/core/region.c | 5 +++-- drivers/cxl/cxl.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit 88ab1dde792aa6a3902e2a30929e00acc99d351a Author: Dan Carpenter Date: Mon Aug 1 13:19:27 2022 +0300 cxl/region: uninitialized variable in alloc_hpa() This should check "p->res" instead of "res" (which is uninitialized). Fixes: 23a22cd1c98b ("cxl/region: Allocate HPA capacity to regions") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Yueor88I/DkVSOtL@kili Signed-off-by: Dan Williams drivers/cxl/core/region.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a41b17ff9dacd22f5f118ee53d82da0f3e52d5e3 Author: Hangyu Hua Date: Fri Jul 29 19:00:27 2022 +0800 dccp: put dccp_qpolicy_full() and dccp_qpolicy_push() in the same lock In the case of sk->dccps_qpolicy == DCCPQ_POLICY_PRIO, dccp_qpolicy_full will drop a skb when qpolicy is full. And the lock in dccp_sendmsg is released before sock_alloc_send_skb and then relocked after sock_alloc_send_skb. The following conditions may lead dccp_qpolicy_push to add skb to an already full sk_write_queue: thread1--->lock thread1--->dccp_qpolicy_full: queue is full. drop a skb thread1--->unlock thread2--->lock thread2--->dccp_qpolicy_full: queue is not full. no need to drop. thread2--->unlock thread1--->lock thread1--->dccp_qpolicy_push: add a skb. queue is full. thread1--->unlock thread2--->lock thread2--->dccp_qpolicy_push: add a skb! thread2--->unlock Fix this by moving dccp_qpolicy_full. Fixes: b1308dc015eb ("[DCCP]: Set TX Queue Length Bounds via Sysctl") Signed-off-by: Hangyu Hua Link: https://lore.kernel.org/r/20220729110027.40569-1-hbh25y@gmail.com Signed-off-by: Jakub Kicinski net/dccp/proto.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1e02fd7671fe8ef64866e7753659c635192f5061 Merge: 9fe2e6f39606 a86e86db5e6d Author: Jakub Kicinski Date: Mon Aug 1 12:09:37 2022 -0700 Merge branch 'net-fix-using-wrong-flags-to-check-features' Guangbin Huang says: ==================== net: fix using wrong flags to check features We find that some drivers may use wrong flags to check features, so fix them. ==================== Link: https://lore.kernel.org/r/20220729101755.4798-1-huangguangbin2@huawei.com Signed-off-by: Jakub Kicinski commit a86e86db5e6d72c82724a63ca1c5293409a21518 Author: Jian Shen Date: Fri Jul 29 18:17:55 2022 +0800 net: ionic: fix error check for vlan flags in ionic_set_nic_features() The prototype of input features of ionic_set_nic_features() is netdev_features_t, but the vlan_flags is using the private definition of ionic drivers. It should use the variable ctx.cmd.lif_setattr.features, rather than features to check the vlan flags. So fixes it. Fixes: beead698b173 ("ionic: Add the basic NDO callbacks for netdev support") Signed-off-by: Jian Shen Signed-off-by: Guangbin Huang Acked-by: Shannon Nelson Signed-off-by: Jakub Kicinski drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7dc839fe47611e6995f370cae37b9797cf7d2672 Author: Jian Shen Date: Fri Jul 29 18:17:54 2022 +0800 net: ice: fix error NETIF_F_HW_VLAN_CTAG_FILTER check in ice_vsi_sync_fltr() vsi->current_netdev_flags is used store the current net device flags, not the active netdevice features. So it should use vsi->netdev->featurs, rather than vsi->current_netdev_flags to check NETIF_F_HW_VLAN_CTAG_FILTER. Fixes: 1babaf77f49d ("ice: Advertise 802.1ad VLAN filtering and offloads for PF netdev") Signed-off-by: Jian Shen Signed-off-by: Guangbin Huang Acked-by: Tony Nguyen Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/ice/ice_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45490ce2ff833c4ec0de66705e46ba41320860cb Author: Baowen Zheng Date: Fri Jul 29 11:16:41 2022 +0200 nfp: flower: add support for tunnel offload without key ID Currently nfp driver will reject to offload tunnel key action without tunnel key ID which means tunnel ID is 0. But it is a normal case for tc flower since user can setup a tunnel with tunnel ID is 0. So we need to support this case to accept tunnel key action without tunnel key ID. Signed-off-by: Baowen Zheng Reviewed-by: Louis Peens Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20220729091641.354748-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/netronome/nfp/flower/action.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit f157cfa3a589f6900c81c90620eb895253705e59 Merge: 9936e07eaf5b 2df91e397d85 Author: Jakub Kicinski Date: Mon Aug 1 11:59:25 2022 -0700 Merge branch 'net-rose-fix-module-unload-issues' Eric Dumazet says: ==================== net: rose: fix module unload issues Bernard Pidoux reported that unloading rose module could lead to infamous "unregistered_netdevice:" issues. First patch is the fix, stable candidate. Second patch is adding netdev ref tracker to af_rose. I chose net-next to not inflict merge conflicts, because Jakub changed dev_put_track() to netdev_put_track() in net-next. ==================== Link: https://lore.kernel.org/r/20220729091233.1030680-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 2df91e397d85cd4c5206ab48d4e398e338db02d7 Author: Eric Dumazet Date: Fri Jul 29 09:12:33 2022 +0000 net: rose: add netdev ref tracker to 'struct rose_sock' This will help debugging netdevice refcount problems with CONFIG_NET_DEV_REFCNT_TRACKER=y Signed-off-by: Eric Dumazet Cc: Tested-by: Bernard Pidoux Signed-off-by: Jakub Kicinski include/net/rose.h | 3 ++- net/rose/af_rose.c | 12 +++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) commit 931027820e4dafabc78aff82af59f8c1c4bd3128 Author: Eric Dumazet Date: Fri Jul 29 09:12:32 2022 +0000 net: rose: fix netdev reference changes Bernard reported that trying to unload rose module would lead to infamous messages: unregistered_netdevice: waiting for rose0 to become free. Usage count = xx This patch solves the issue, by making sure each socket referring to a netdevice holds a reference count on it, and properly releases it in rose_release(). rose_dev_first() is also fixed to take a device reference before leaving the rcu_read_locked section. Following patch will add ref_tracker annotations to ease future bug hunting. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Bernard Pidoux Signed-off-by: Eric Dumazet Tested-by: Bernard Pidoux Signed-off-by: Jakub Kicinski net/rose/af_rose.c | 11 +++++++++-- net/rose/rose_route.c | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) commit b167fdffe9e737007cbf7c691cde5fa489ca58d7 Merge: 0dd1cabe8a4a c17a6ff93213 Author: Linus Torvalds Date: Mon Aug 1 11:49:06 2022 -0700 Merge tag 'sched-core-2022-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: "Load-balancing improvements: - Improve NUMA balancing on AMD Zen systems for affine workloads. - Improve the handling of reduced-capacity CPUs in load-balancing. - Energy Model improvements: fix & refine all the energy fairness metrics (PELT), and remove the conservative threshold requiring 6% energy savings to migrate a task. Doing this improves power efficiency for most workloads, and also increases the reliability of energy-efficiency scheduling. - Optimize/tweak select_idle_cpu() to spend (much) less time searching for an idle CPU on overloaded systems. There's reports of several milliseconds spent there on large systems with large workloads ... [ Since the search logic changed, there might be behavioral side effects. ] - Improve NUMA imbalance behavior. On certain systems with spare capacity, initial placement of tasks is non-deterministic, and such an artificial placement imbalance can persist for a long time, hurting (and sometimes helping) performance. The fix is to make fork-time task placement consistent with runtime NUMA balancing placement. Note that some performance regressions were reported against this, caused by workloads that are not memory bandwith limited, which benefit from the artificial locality of the placement bug(s). Mel Gorman's conclusion, with which we concur, was that consistency is better than random workload benefits from non-deterministic bugs: "Given there is no crystal ball and it's a tradeoff, I think it's better to be consistent and use similar logic at both fork time and runtime even if it doesn't have universal benefit." - Improve core scheduling by fixing a bug in sched_core_update_cookie() that caused unnecessary forced idling. - Improve wakeup-balancing by allowing same-LLC wakeup of idle CPUs for newly woken tasks. - Fix a newidle balancing bug that introduced unnecessary wakeup latencies. ABI improvements/fixes: - Do not check capabilities and do not issue capability check denial messages when a scheduler syscall doesn't require privileges. (Such as increasing niceness.) - Add forced-idle accounting to cgroups too. - Fix/improve the RSEQ ABI to not just silently accept unknown flags. (No existing tooling is known to have learned to rely on the previous behavior.) - Depreciate the (unused) RSEQ_CS_FLAG_NO_RESTART_ON_* flags. Optimizations: - Optimize & simplify leaf_cfs_rq_list() - Micro-optimize set_nr_{and_not,if}_polling() via try_cmpxchg(). Misc fixes & cleanups: - Fix the RSEQ self-tests on RISC-V and Glibc 2.35 systems. - Fix a full-NOHZ bug that can in some cases result in the tick not being re-enabled when the last SCHED_RT task is gone from a runqueue but there's still SCHED_OTHER tasks around. - Various PREEMPT_RT related fixes. - Misc cleanups & smaller fixes" * tag 'sched-core-2022-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (32 commits) rseq: Kill process when unknown flags are encountered in ABI structures rseq: Deprecate RSEQ_CS_FLAG_NO_RESTART_ON_* flags sched/core: Fix the bug that task won't enqueue into core tree when update cookie nohz/full, sched/rt: Fix missed tick-reenabling bug in dequeue_task_rt() sched/core: Always flush pending blk_plug sched/fair: fix case with reduced capacity CPU sched/core: Use try_cmpxchg in set_nr_{and_not,if}_polling sched/core: add forced idle accounting for cgroups sched/fair: Remove the energy margin in feec() sched/fair: Remove task_util from effective utilization in feec() sched/fair: Use the same cpumask per-PD throughout find_energy_efficient_cpu() sched/fair: Rename select_idle_mask to select_rq_mask sched, drivers: Remove max param from effective_cpu_util()/sched_cpu_util() sched/fair: Decay task PELT values during wakeup migration sched/fair: Provide u64 read for 32-bits arch helper sched/fair: Introduce SIS_UTIL to search idle CPU based on sum of util_avg sched: only perform capability check on privileged operation sched: Remove unused function group_first_cpu() sched/fair: Remove redundant word " *" selftests/rseq: check if libc rseq support is registered ... commit 0dd1cabe8a4a568252ca70f7530c3ca10e728513 Merge: 0cec3f24a7ce 3041808b5220 Author: Linus Torvalds Date: Mon Aug 1 11:46:58 2022 -0700 Merge tag 'slab-for-5.20_or_6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab Pull slab updates from Vlastimil Babka: - An addition of 'accounted' flag to slab allocation tracepoints to indicate memcg_kmem accounting, by Vasily - An optimization of memcg handling in freeing paths, by Muchun - Various smaller fixes and cleanups * tag 'slab-for-5.20_or_6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: mm/slab_common: move generic bulk alloc/free functions to SLOB mm/sl[au]b: use own bulk free function when bulk alloc failed mm: slab: optimize memcg_slab_free_hook() mm/tracing: add 'accounted' entry into output of allocation tracepoints tools/vm/slabinfo: Handle files in debugfs mm/slub: Simplify __kmem_cache_alias() mm, slab: fix bad alignments commit 1e1613f64cc8a09d7a60ad01450c3321ca4ad454 Author: Andres Freund Date: Sun Jul 31 18:38:34 2022 -0700 tools bpftool: Don't display disassembler-four-args feature test The feature check does not seem important enough to display. Requested-by: Jiri Olsa Signed-off-by: Andres Freund Acked-by: Quentin Monnet Tested-by: Arnaldo Carvalho de Melo Cc: Alexei Starovoitov Cc: Ben Hutchings Cc: Quentin Monnet Cc: Sedat Dilek Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de Link: https://lore.kernel.org/r/20220801013834.156015-9-andres@anarazel.de Signed-off-by: Arnaldo Carvalho de Melo tools/bpf/bpftool/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 600b7b26c07a070d0153daa76b3806c1e52c9e00 Author: Andres Freund Date: Sun Jul 31 18:38:33 2022 -0700 tools bpftool: Fix compilation error with new binutils binutils changed the signature of init_disassemble_info(), which now causes compilation to fail for tools/bpf/bpftool/jit_disasm.c, e.g. on debian unstable. Relevant binutils commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 Wire up the feature test and switch to init_disassemble_info_compat(), which were introduced in prior commits, fixing the compilation failure. I verified that bpftool can still disassemble bpf programs, both with an old and new dis-asm.h API. There are no output changes for plain and json formats. When comparing the output from old binutils (2.35) to new bintuils with the patch (upstream snapshot) there are a few output differences, but they are unrelated to this patch. An example hunk is: 2f: pop %r14 31: pop %r13 33: pop %rbx - 34: leaveq - 35: retq + 34: leave + 35: ret Signed-off-by: Andres Freund Acked-by: Quentin Monnet Cc: Alexei Starovoitov Cc: Ben Hutchings Cc: Jiri Olsa Cc: Quentin Monnet Cc: Sedat Dilek Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de Link: https://lore.kernel.org/r/20220801013834.156015-8-andres@anarazel.de Signed-off-by: Arnaldo Carvalho de Melo tools/bpf/bpftool/Makefile | 5 ++++- tools/bpf/bpftool/jit_disasm.c | 42 ++++++++++++++++++++++++++++++++++-------- 2 files changed, 38 insertions(+), 9 deletions(-) commit bab211f637dc52cfbae1f0f15a6aef71d7f35a1b Author: Andres Freund Date: Sun Jul 31 18:38:32 2022 -0700 tools bpf_jit_disasm: Don't display disassembler-four-args feature test The feature check does not seem important enough to display. Suggested-by: Jiri Olsa Signed-off-by: Andres Freund Acked-by: Quentin Monnet Cc: Alexei Starovoitov Cc: Ben Hutchings Cc: Daniel Borkmann Cc: Quentin Monnet Cc: Sedat Dilek Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de Link: https://lore.kernel.org/r/20220801013834.156015-7-andres@anarazel.de Signed-off-by: Arnaldo Carvalho de Melo tools/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96ed066054abf11c7d3e106e3011a51f3f1227a3 Author: Andres Freund Date: Sun Jul 31 18:38:31 2022 -0700 tools bpf_jit_disasm: Fix compilation error with new binutils binutils changed the signature of init_disassemble_info(), which now causes compilation to fail for tools/bpf/bpf_jit_disasm.c, e.g. on debian unstable. Relevant binutils commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 Wire up the feature test and switch to init_disassemble_info_compat(), which were introduced in prior commits, fixing the compilation failure. I verified that bpf_jit_disasm can still disassemble bpf programs, both with the old and new dis-asm.h API. With old binutils there's no change in output before/after this patch. When comparing the output from old binutils (2.35) to new bintuils with the patch (upstream snapshot) there are a few output differences, but they are unrelated to this patch. An example hunk is: f4: mov %r14,%rsi f7: mov %r15,%rdx fa: mov $0x2a,%ecx - ff: callq 0xffffffffea8c4988 + ff: call 0xffffffffea8c4988 104: test %rax,%rax 107: jge 0x0000000000000110 109: xor %eax,%eax - 10b: jmpq 0x0000000000000073 + 10b: jmp 0x0000000000000073 110: cmp $0x16,%rax However, I had to use an older kernel to generate the bpf_jit_enabled = 2 output, as that has been broken since 5.18 / 1022a5498f6f745c ("bpf, x86_64: Use bpf_jit_binary_pack_alloc"). https://lore.kernel.org/20220703030210.pmjft7qc2eajzi6c@alap3.anarazel.de Signed-off-by: Andres Freund Acked-by: Quentin Monnet Cc: Alexei Starovoitov Cc: Ben Hutchings Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Quentin Monnet Cc: Sedat Dilek Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de Link: https://lore.kernel.org/r/20220801013834.156015-6-andres@anarazel.de Signed-off-by: Arnaldo Carvalho de Melo tools/bpf/Makefile | 5 ++++- tools/bpf/bpf_jit_disasm.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) commit 83aa0120487e8bc3f231e72c460add783f71f17c Author: Andres Freund Date: Sun Jul 31 18:38:30 2022 -0700 tools perf: Fix compilation error with new binutils binutils changed the signature of init_disassemble_info(), which now causes compilation failures for tools/perf/util/annotate.c, e.g. on debian unstable. Relevant binutils commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 Wire up the feature test and switch to init_disassemble_info_compat(), which were introduced in prior commits, fixing the compilation failure. I verified that perf can still disassemble bpf programs by using bpftrace under load, recording a perf trace, and then annotating the bpf "function" with and without the changes. With old binutils there's no change in output before/after this patch. When comparing the output from old binutils (2.35) to new bintuils with the patch (upstream snapshot) there are a few output differences, but they are unrelated to this patch. An example hunk is: 1.15 : 55:mov %rbp,%rdx 0.00 : 58:add $0xfffffffffffffff8,%rdx 0.00 : 5c:xor %ecx,%ecx - 1.03 : 5e:callq 0xffffffffe12aca3c + 1.03 : 5e:call 0xffffffffe12aca3c 0.00 : 63:xor %eax,%eax - 2.18 : 65:leaveq - 2.82 : 66:retq + 2.18 : 65:leave + 2.82 : 66:ret Signed-off-by: Andres Freund Acked-by: Quentin Monnet Cc: Alexei Starovoitov Cc: Ben Hutchings Cc: Jiri Olsa Cc: Sedat Dilek Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de Link: https://lore.kernel.org/r/20220801013834.156015-5-andres@anarazel.de Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 8 ++++++++ tools/perf/util/annotate.c | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) commit a45b3d6926231c3d024ea0de4f7bd967f83709ee Author: Andres Freund Date: Sun Jul 31 18:38:29 2022 -0700 tools include: add dis-asm-compat.h to handle version differences binutils changed the signature of init_disassemble_info(), which now causes compilation failures for tools/{perf,bpf}, e.g. on debian unstable. Relevant binutils commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 This commit introduces a wrapper for init_disassemble_info(), to avoid spreading #ifdef DISASM_INIT_STYLED to a bunch of places. Subsequent commits will use it to fix the build failures. It likely is worth adding a wrapper for disassember(), to avoid the already existing DISASM_FOUR_ARGS_SIGNATURE ifdefery. Signed-off-by: Andres Freund Signed-off-by: Ben Hutchings Acked-by: Quentin Monnet Cc: Alexei Starovoitov Cc: Ben Hutchings Cc: Jiri Olsa Cc: Quentin Monnet Cc: Sedat Dilek Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de Link: https://lore.kernel.org/r/20220801013834.156015-4-andres@anarazel.de Signed-off-by: Arnaldo Carvalho de Melo tools/include/tools/dis-asm-compat.h | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 516ddaadb42405a2713d21eb1a384e88e557440a Author: Andres Freund Date: Sun Jul 31 18:38:28 2022 -0700 tools build: Don't display disassembler-four-args feature test The feature check does not seem important enough to display. Suggested by Jiri Olsa. Signed-off-by: Andres Freund Acked-by: Quentin Monnet Tested-by: Arnaldo Carvalho de Melo Cc: Alexei Starovoitov Cc: Ben Hutchings Cc: Jiri Olsa Cc: Quentin Monnet Cc: Sedat Dilek Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de Link: https://lore.kernel.org/r/20220801013834.156015-3-andres@anarazel.de Signed-off-by: Arnaldo Carvalho de Melo tools/build/Makefile.feature | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cfd59ca91467056bb2c36907b2fa67b8e1af9952 Author: Andres Freund Date: Sun Jul 31 18:38:27 2022 -0700 tools build: Add feature test for init_disassemble_info API changes binutils changed the signature of init_disassemble_info(), which now causes compilation failures for tools/{perf,bpf}, e.g. on debian unstable. Relevant binutils commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 This commit adds a feature test to detect the new signature. Subsequent commits will use it to fix the build failures. Signed-off-by: Andres Freund Acked-by: Quentin Monnet Cc: Alexei Starovoitov Cc: Ben Hutchings Cc: Jiri Olsa Cc: Quentin Monnet Cc: Sedat Dilek Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de Link: https://lore.kernel.org/r/20220801013834.156015-2-andres@anarazel.de Signed-off-by: Arnaldo Carvalho de Melo tools/build/Makefile.feature | 1 + tools/build/feature/Makefile | 4 ++++ tools/build/feature/test-all.c | 4 ++++ tools/build/feature/test-disassembler-init-styled.c | 13 +++++++++++++ 4 files changed, 22 insertions(+) commit aa16fb4b9e7e1057008d999138e7ae68a40bf167 Author: Xiu Jianfeng Date: Fri Jun 10 17:23:07 2022 +0800 smack: Remove the redundant lsm_inode_alloc It's not possible for inode->i_security to be NULL here because every inode will call inode_init_always and then lsm_inode_alloc to alloc memory for inode->security, this is what LSM infrastructure management do, so remove this redundant code. Signed-off-by: Xiu Jianfeng Signed-off-by: Casey Schaufler security/smack/smack_lsm.c | 7 ------- 1 file changed, 7 deletions(-) commit 63c3b5d2ca96b4a2a88ae01bea94021e874ce8fe Author: GONG, Ruiqi Date: Mon Jun 6 16:17:14 2022 +0800 smack: Replace kzalloc + strncpy with kstrndup Simplify the code by using kstrndup instead of kzalloc and strncpy in smk_parse_smack(), which meanwhile remove strncpy as [1] suggests. [1]: https://github.com/KSPP/linux/issues/90 Signed-off-by: GONG, Ruiqi Signed-off-by: Casey Schaufler security/smack/smack_access.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 9936e07eaf5b764ff36c5677644bb5d556fb7e45 Merge: ad3564ccc367 d8fae2504efe Author: Jakub Kicinski Date: Mon Aug 1 11:15:39 2022 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 1GbE Intel Wired LAN Driver Updates 2022-07-28 Jacob Keller says: Convert all of the Intel drivers with PTP support to the newer .adjfine implementation which uses scaled parts per million. This improves the precision of the frequency adjustments by taking advantage of the full scaled parts per million input coming from user space. In addition, all implementations are converted to using the mul_u64_u64_div_u64 function which better handles the intermediate value. This function supports architecture specific instructions where possible to avoid loss of precision if the normal 64-bit multiplication would overflow. Of note, the i40e implementation is now able to avoid loss of precision on slower link speeds by taking advantage of this to multiply by the link speed factor first. This results in a significantly more precise adjustment by allowing the calculation to impact the lower bits. This also gets us a step closer to being able to remove the .adjfreq entirely by removing its use from many drivers. I plan to follow this up with a series to update the drivers from other vendors and drop the .adjfreq implementation entirely. * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: igb: convert .adjfreq to .adjfine ixgbe: convert .adjfreq to .adjfine i40e: convert .adjfreq to .adjfine i40e: use mul_u64_u64_div_u64 for PTP frequency calculation e1000e: convert .adjfreq to .adjfine e1000e: remove unnecessary range check in e1000e_phc_adjfreq ice: implement adjfine with mul_u64_u64_div_u64 ==================== Link: https://lore.kernel.org/r/20220728181836.3387862-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit ad3564ccc3670843c913b01ada77c167233bd5b5 Author: Wei Fang Date: Wed Jul 27 00:38:51 2022 +1000 dt-bindings: net: fsl,fec: Add i.MX8ULP FEC items Add fsl,imx8ulp-fec for i.MX8ULP platform. Signed-off-by: Wei Fang Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/all/20220726143853.23709-2-wei.fang@nxp.com/ Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/fsl,fec.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit 5abbb7b92820cf6ba9154a35cff6d64b62d7f273 Author: David Sterba Date: Tue Jul 12 23:30:05 2022 +0200 affs: use memcpy_to_page and remove replace kmap_atomic() The use of kmap() is being deprecated in favor of kmap_local_page() where it is feasible. For kmap around a memcpy there's a convenience helper memcpy_to_page that also makes the flush_dcache_page() redundant. CC: Fabio M. De Francesco Reviewed-by: Ira Weiny Signed-off-by: David Sterba fs/affs/file.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 00b32625982e0c796f0abb8effcac9c05ef55bd3 Author: Namhyung Kim Date: Fri Jul 1 16:09:32 2022 -0700 perf test: Add ARM SPE system wide test In the past it had a problem not setting the pid/tid on the sample correctly when system-wide mode is used. Although it's fixed now it'd be nice if we have a test case for it. Reviewed-by: German Gomez Signed-off-by: Namhyung Kim Tested-by: Leo Yan Cc: German Gomez Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mike Leach Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20220701230932.1000495-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/test_arm_spe.sh | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) commit 5f4e821c6c90dd6d471981735cec456f669f0e59 Author: Jiri Olsa Date: Thu Jun 16 22:22:14 2022 +0200 perf tools: Rework prologue generation code Some functions we use for bpf prologue generation are going to be deprecated. This change reworks current code not to use them. We need to replace following functions/struct: bpf_program__set_prep bpf_program__nth_fd struct bpf_prog_prep_result Currently we use bpf_program__set_prep to hook perf callback before program is loaded and provide new instructions with the prologue. We replace this function/ality by taking instructions for specific program, attaching prologue to them and load such new ebpf programs with prologue using separate bpf_prog_load calls (outside libbpf load machinery). Before we can take and use program instructions, we need libbpf to actually load it. This way we get the final shape of its instructions with all relocations and verifier adjustments). There's one glitch though.. perf kprobe program already assumes generated prologue code with proper values in argument registers, so loading such program directly will fail in the verifier. That's where the fallback pre-load handler fits in and prepends the initialization code to the program. Once such program is loaded we take its instructions, cut off the initialization code and prepend the prologue. I know.. sorry ;-) To have access to the program when loading this patch adds support to register 'fallback' section handler to take care of perf kprobe programs. The fallback means that it handles any section definition besides the ones that libbpf handles. The handler serves two purposes: - allows perf programs to have special arguments in section name - allows perf to use pre-load callback where we can attach init code (zeroing all argument registers) to each perf program Suggested-by: Andrii Nakryiko Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Acked-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Ian Rogers Cc: Ingo Molnar Cc: John Fastabend Cc: Martin KaFai Lau Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Yonghong Song Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Link: https://lore.kernel.org/r/20220616202214.70359-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf-loader.c | 204 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 175 insertions(+), 29 deletions(-) commit 8b1e1a0347ea299b038f83dcfcd799508aa42d68 Author: Jiri Olsa Date: Mon Jul 4 17:27:21 2022 +0200 perf bpf: Convert legacy map definition to BTF-defined The libbpf is switching off support for legacy map definitions [1], which will break the perf llvm tests. Moving the base source map definition to BTF-defined, so we need to use -g compile option for to add debug/BTF info. [1] https://lore.kernel.org/bpf/20220627211527.2245459-1-andrii@kernel.org/ Signed-off-by: Jiri Olsa Acked-by: Andrii Nakryiko Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20220704152721.352046-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/bpf-script-example.c | 35 +++++++++++++++++++++++------------ tools/perf/util/llvm-utils.c | 2 +- 2 files changed, 24 insertions(+), 13 deletions(-) commit 0cec3f24a7cedc726f8790d693aaff2c535dc4ce Merge: a82c58cf1a55 892f7237b3ff Author: Linus Torvalds Date: Mon Aug 1 10:37:00 2022 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Will Deacon: "Highlights include a major rework of our kPTI page-table rewriting code (which makes it both more maintainable and considerably faster in the cases where it is required) as well as significant changes to our early boot code to reduce the need for data cache maintenance and greatly simplify the KASLR relocation dance. Summary: - Remove unused generic cpuidle support (replaced by PSCI version) - Fix documentation describing the kernel virtual address space - Handling of some new CPU errata in Arm implementations - Rework of our exception table code in preparation for handling machine checks (i.e. RAS errors) more gracefully - Switch over to the generic implementation of ioremap() - Fix lockdep tracking in NMI context - Instrument our memory barrier macros for KCSAN - Rework of the kPTI G->nG page-table repainting so that the MMU remains enabled and the boot time is no longer slowed to a crawl for systems which require the late remapping - Enable support for direct swapping of 2MiB transparent huge-pages on systems without MTE - Fix handling of MTE tags with allocating new pages with HW KASAN - Expose the SMIDR register to userspace via sysfs - Continued rework of the stack unwinder, particularly improving the behaviour under KASAN - More repainting of our system register definitions to match the architectural terminology - Improvements to the layout of the vDSO objects - Support for allocating additional bits of HWCAP2 and exposing FEAT_EBF16 to userspace on CPUs that support it - Considerable rework and optimisation of our early boot code to reduce the need for cache maintenance and avoid jumping in and out of the kernel when handling relocation under KASLR - Support for disabling SVE and SME support on the kernel command-line - Support for the Hisilicon HNS3 PMU - Miscellanous cleanups, trivial updates and minor fixes" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (136 commits) arm64: Delay initialisation of cpuinfo_arm64::reg_{zcr,smcr} arm64: fix KASAN_INLINE arm64/hwcap: Support FEAT_EBF16 arm64/cpufeature: Store elf_hwcaps as a bitmap rather than unsigned long arm64/hwcap: Document allocation of upper bits of AT_HWCAP arm64: enable THP_SWAP for arm64 arm64/mm: use GENMASK_ULL for TTBR_BADDR_MASK_52 arm64: errata: Remove AES hwcap for COMPAT tasks arm64: numa: Don't check node against MAX_NUMNODES drivers/perf: arm_spe: Fix consistency of SYS_PMSCR_EL1.CX perf: RISC-V: Add of_node_put() when breaking out of for_each_of_cpu_node() docs: perf: Include hns3-pmu.rst in toctree to fix 'htmldocs' WARNING arm64: kasan: Revert "arm64: mte: reset the page tag in page->flags" mm: kasan: Skip page unpoisoning only if __GFP_SKIP_KASAN_UNPOISON mm: kasan: Skip unpoisoning of user pages mm: kasan: Ensure the tags are visible before the tag in page->flags drivers/perf: hisi: add driver for HNS3 PMU drivers/perf: hisi: Add description for HNS3 PMU driver drivers/perf: riscv_pmu_sbi: perf format perf/arm-cci: Use the bitmap API to allocate bitmaps ... commit a82c58cf1a5560988d8b9b8abcd982e90a5fdaa4 Merge: 60ee49fac817 b508128bb0d1 Author: Linus Torvalds Date: Mon Aug 1 10:32:06 2022 -0700 Merge tag 'm68k-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - Use RNG seed from bootinfo block on virt platform - defconfig updates - Minor fixes and improvements * tag 'm68k-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: defconfig: Update defconfigs for v5.19-rc1 m68k: Add common forward declaration for show_registers() m68k: mac: Remove forward declaration for mac_nmi_handler() m68k: virt: Fix missing platform_device_unregister() on error in virt_platform_init() m68k: virt: Use RNG seed from bootinfo block m68k: bitops: Change __fls to return and accept unsigned long m68k: Kconfig.machine: Add endif comment m68k: Kconfig.debug: Replace single quotes m68k: Kconfig.cpu: Fix indentation and add endif comments m68k: q40: Align '*' in comments m68k: sun3: Use __func__ to get function's name in an output message m68k: mac: Fix typos in comments m68k: virt: Kconfig minor fixes commit 60ee49fac817754a465a16b837347d1e9b7b090e Merge: 8b7054528cd5 68b8e9713c8e Author: Linus Torvalds Date: Mon Aug 1 10:17:19 2022 -0700 Merge tag 'x86_kdump_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 kdump updates from Borislav Petkov: - Add the ability to pass early an RNG seed to the kernel from the boot loader - Add the ability to pass the IMA measurement of kernel and bootloader to the kexec-ed kernel * tag 'x86_kdump_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/setup: Use rng seeds from setup_data x86/kexec: Carry forward IMA measurement log on kexec commit 8b7054528cd5ac96383aa89315670d74865c8dc2 Merge: ecf9b7bfea60 2d17bd24b016 Author: Linus Torvalds Date: Mon Aug 1 10:14:19 2022 -0700 Merge tag 'x86_build_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 build updates from Borislav Petkov: - Fix stack protector builds when cross compiling with Clang - Other Kbuild improvements and fixes * tag 'x86_build_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/purgatory: Omit use of bin2c x86/purgatory: Hard-code obj-y in Makefile x86/build: Remove unused OBJECT_FILES_NON_STANDARD_test_nx.o x86/Kconfig: Fix CONFIG_CC_HAS_SANE_STACKPROTECTOR when cross compiling with clang commit ecf9b7bfea60ca816b2b44716e3f1dde148ea196 Merge: 98b1783de202 a1a5482a2c6e Author: Linus Torvalds Date: Mon Aug 1 10:04:00 2022 -0700 Merge tag 'x86_core_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 core updates from Borislav Petkov: - Have invalid MSR accesses warnings appear only once after a pr_warn_once() change broke that - Simplify {JMP,CALL}_NOSPEC and let the objtool retpoline patching infra take care of them instead of having unreadable alternative macros there * tag 'x86_core_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/extable: Fix ex_handler_msr() print condition x86,nospec: Simplify {JMP,CALL}_NOSPEC commit 98b1783de202f3e82be7f32dcdc10a3d270b90e5 Merge: 42efa5e3a888 d906fa730827 Author: Linus Torvalds Date: Mon Aug 1 10:00:43 2022 -0700 Merge tag 'x86_misc_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc x86 updates from Borislav Petkov: - Add a bunch of PCI IDs for new AMD CPUs and use them in k10temp - Free the pmem platform device on the registration error path * tag 'x86_misc_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: hwmon: (k10temp): Add support for new family 17h and 19h models x86/amd_nb: Add AMD PCI IDs for SMN communication x86/pmem: Fix platform-device leak in error path commit 42efa5e3a8888c45c15fc5a567cd77049a2e30f1 Merge: 650ea1f626ab 3f2adf00f52b Author: Linus Torvalds Date: Mon Aug 1 09:49:29 2022 -0700 Merge tag 'x86_cpu_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpu updates from Borislav Petkov: - Remove the vendor check when selecting MWAIT as the default idle state - Respect idle=nomwait when supplied on the kernel cmdline - Two small cleanups * tag 'x86_cpu_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Use MSR_IA32_MISC_ENABLE constants x86: Fix comment for X86_FEATURE_ZEN x86: Remove vendor checks from prefer_mwait_c1_over_halt x86: Handle idle=nomwait cmdline properly for x86_idle commit 6431e92fc827bdd2d28f79150d90415ba9ce0d21 Author: Helge Deller Date: Mon Aug 1 17:36:15 2022 +0200 parisc: io_pgetevents_time64() needs compat syscall in 32-bit compat mode For all syscalls in 32-bit compat mode on 64-bit kernels the upper 32-bits of the 64-bit registers are zeroed out, so a negative 32-bit signed value will show up as positive 64-bit signed value. This behaviour breaks the io_pgetevents_time64() syscall which expects signed 64-bit values for the "min_nr" and "nr" parameters. Fix this by switching to the compat_sys_io_pgetevents_time64() syscall, which uses "compat_long_t" types for those parameters. Cc: # v5.1+ Signed-off-by: Helge Deller arch/parisc/kernel/syscalls/syscall.tbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbe263b6b0eb1309adf6c7e5dbd53e2dbd81736b Author: Jason Wang Date: Sat Jul 23 17:23:41 2022 +0800 parisc: Drop zero variable initialisations in mm/init.c Initialise global and static variable to 0 is always unnecessary. Remove the unnecessary initialisations. Signed-off-by: Jason Wang Signed-off-by: Helge Deller arch/parisc/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9e28d3c249211ec4d2de646975c32f22e5c201d Author: Xin Gao Date: Thu Jul 21 03:39:41 2022 +0800 parisc: Do not initialise statics to 0 Signed-off-by: Xin Gao Signed-off-by: Helge Deller arch/parisc/kernel/pci-dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cf59f34d7f978d14d6520fd80a78a5ad5cb8abf8 Author: William Dean Date: Fri Jul 22 10:57:09 2022 +0800 parisc: Check the return value of ioremap() in lba_driver_probe() The function ioremap() in lba_driver_probe() can fail, so its return value should be checked. Fixes: 4bdc0d676a643 ("remove ioremap_nocache and devm_ioremap_nocache") Reported-by: Hacash Robot Signed-off-by: William Dean Signed-off-by: Helge Deller Cc: # v5.6+ drivers/parisc/lba_pci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3fbc9a7de0564c55d8a9584c9cd2c9dfe6bd6d43 Author: Helge Deller Date: Tue Jul 19 06:19:41 2022 +0200 parisc: Drop pa_swapper_pg_lock spinlock This spinlock was dropped with commit b7795074a046 ("parisc: Optimize per-pagetable spinlocks") in kernel v5.12. Remove it to silence a sparse warning. Signed-off-by: Helge Deller Reported-by: kernel test robot Cc: # v5.12+ arch/parisc/kernel/cache.c | 3 --- 1 file changed, 3 deletions(-) commit 16bf37bf49ba293ab1c445db22b78a02fa48e1db Author: Jason Wang Date: Fri Jul 15 12:49:15 2022 +0800 parisc: Fix comment typo in fault.c The double `the' is duplicated in line 41, remove one. Signed-off-by: Jason Wang Signed-off-by: Helge Deller arch/parisc/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cab56b51ec0e69128909cef4650e1907248d821b Author: Helge Deller Date: Mon Jul 18 17:06:47 2022 +0200 parisc: Fix device names in /proc/iomem Fix the output of /proc/iomem to show the real hardware device name including the pa_pathname, e.g. "Merlin 160 Core Centronics [8:16:0]". Up to now only the pa_pathname ("[8:16.0]") was shown. Signed-off-by: Helge Deller Cc: # v4.9+ arch/parisc/kernel/drivers.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit b383d94ad7ca52b9bf6c80fce6e9914b00527695 Author: Helge Deller Date: Mon Jul 18 17:29:38 2022 +0200 parisc: Clean up names in hardware database Stop guessing and just use the names for the hardware we know so far. Signed-off-by: Helge Deller arch/parisc/kernel/hardware.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 650ea1f626ab4d939fda00b7cca57698dcf57e5e Merge: 92598ae22f58 9f0112938277 Author: Linus Torvalds Date: Mon Aug 1 09:36:18 2022 -0700 Merge tag 'x86_fpu_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fpu update from Borislav Petkov: - Add machinery to initialize AMX register state in order for AMX-capable CPUs to be able to enter deeper low-power state * tag 'x86_fpu_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: intel_idle: Add a new flag to initialize the AMX state x86/fpu: Add a helper to prepare AMX state for low-power CPU idle commit 92598ae22f582547ebb060cf76f5869bc9780b80 Merge: 94e37e848919 8f1d56f64f8d Author: Linus Torvalds Date: Mon Aug 1 09:34:39 2022 -0700 Merge tag 'x86_mm_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 mm updates from Borislav Petkov: - Rename a PKRU macro to make more sense when reading the code - Update pkeys documentation - Avoid reading contended mm's TLB generation var if not absolutely necessary along with fixing a case where arch_tlbbatch_flush() doesn't adhere to the generation scheme and thus violates the conditions for the above avoidance. * tag 'x86_mm_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm/tlb: Ignore f->new_tlb_gen when zero x86/pkeys: Clarify PKRU_AD_KEY macro Documentation/protection-keys: Clean up documentation for User Space pkeys x86/mm/tlb: Avoid reading mm_tlb_gen when possible commit 94e37e84891900f56a01f49ac173bcb15e42e461 Merge: dbc1f5a9f42a 9de76f41ea21 Author: Linus Torvalds Date: Mon Aug 1 09:33:17 2022 -0700 Merge tag 'x86_cleanups_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanup from Borislav Petkov: - A single CONFIG_ symbol correction in a comment * tag 'x86_cleanups_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Refer to the intended config STRICT_DEVMEM in a comment commit dbc1f5a9f42a9bb31b84bba4d40ced21952d505a Merge: 296d3b3e05ec 4745ca43104b Author: Linus Torvalds Date: Mon Aug 1 09:31:49 2022 -0700 Merge tag 'x86_vmware_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 vmware cleanup from Borislav Petkov: - A single statement simplification by using the BIT() macro * tag 'x86_vmware_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vmware: Use BIT() macro for shifting commit 296d3b3e05ec8aafb279acea3e8d7e86974795a7 Merge: 0fac198def2b 891e465a1bd8 Author: Linus Torvalds Date: Mon Aug 1 09:29:41 2022 -0700 Merge tag 'ras_core_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS update from Borislav Petkov: "A single RAS change: - Probe whether hardware error injection (direct MSR writes) is possible when injecting errors on AMD platforms. In some cases, the platform could prohibit those" * tag 'ras_core_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Check whether writes to MCA_STATUS are getting ignored commit 7913145afa51bbed9eaf8e5b4ee55fa9884a71e5 Author: Xu Qiang Date: Mon Aug 1 12:05:06 2022 +0000 of/fdt: declared return type does not match actual return type The commit 649cab56de8e (“of: properly check for error returned by fdt_get_name()”) changed the return value type from bool to int, but forgot to change the return value simultaneously. populate_node was only called in unflatten_dt_nodes, and returns with values greater than or equal to 0 were discarded without further processing. Considering that return 0 usually indicates success, return 0 instead of return true. Fixes: 649cab56de8e (“of: properly check for error returned by fdt_get_name()”) Signed-off-by: Xu Qiang Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220801120506.11461-2-xuqiang36@huawei.com drivers/of/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0fac198def2b41138850867b6aa92044c76ff802 Merge: bdfae5ce3820 ba40a57ff08b Author: Linus Torvalds Date: Mon Aug 1 09:10:07 2022 -0700 Merge tag 'fs.idmapped.overlay.acl.v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull acl updates from Christian Brauner: "Last cycle we introduced support for mounting overlayfs on top of idmapped mounts. While looking into additional testing we realized that posix acls don't really work correctly with stacking filesystems on top of idmapped layers. We already knew what the fix were but it would require work that is more suitable for the merge window so we turned off posix acls for v5.19 for overlayfs on top of idmapped layers with Miklos routing my patch upstream in 72a8e05d4f66 ("Merge tag 'ovl-fixes-5.19-rc7' [..]"). This contains the work to support posix acls for overlayfs on top of idmapped layers. Since the posix acl fixes should use the new vfs{g,u}id_t work the associated branch has been merged in. (We sent a pull request for this earlier.) We've also pulled in Miklos pull request containing my patch to turn of posix acls on top of idmapped layers. This allowed us to avoid rebasing the branch which we didn't like because we were already at rc7 by then. Merging it in allows this branch to first fix posix acls and then to cleanly revert the temporary fix it brought in by commit 4a47c6385bb4 ("ovl: turn of SB_POSIXACL with idmapped layers temporarily"). The last patch in this series adds Seth Forshee as a co-maintainer for idmapped mounts. Seth has been integral to all of this work and is also the main architect behind the filesystem idmapping work which ultimately made filesystems such as FUSE and overlayfs available in containers. He continues to be active in both development and review. I'm very happy he decided to help and he has my full trust. This increases the bus factor which is always great for work like this. I'm honestly very excited about this because I think in general we don't do great in the bringing on new maintainers department" For more explanations of the ACL issues, see https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org/ * tag 'fs.idmapped.overlay.acl.v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: Add Seth Forshee as co-maintainer for idmapped mounts Revert "ovl: turn of SB_POSIXACL with idmapped layers temporarily" ovl: handle idmappings in ovl_get_acl() acl: make posix_acl_clone() available to overlayfs acl: port to vfs{g,u}id_t acl: move idmapped mount fixup into vfs_{g,s}etxattr() mnt_idmapping: add vfs[g,u]id_into_k[g,u]id() commit bdfae5ce3820e79e709bd530ab458302be2e0d9c Merge: e6a7cf70a3ca 77940f0d96cd Author: Linus Torvalds Date: Mon Aug 1 08:56:55 2022 -0700 Merge tag 'fs.idmapped.vfsuid.v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull fs idmapping updates from Christian Brauner: "This introduces the new vfs{g,u}id_t types we agreed on. Similar to k{g,u}id_t the new types are just simple wrapper structs around regular {g,u}id_t types. They allow to establish a type safety boundary in the VFS for idmapped mounts preventing confusion betwen {g,u}ids mapped into an idmapped mount and {g,u}ids mapped into the caller's or the filesystem's idmapping. An initial set of helpers is introduced that allows to operate on vfs{g,u}id_t types. We will remove all references to non-type safe idmapped mounts helpers in the very near future. The patches do already exist. This converts the core attribute changing codepaths which become significantly easier to reason about because of this change. Just a few highlights here as the patches give detailed overviews of what is happening in the commit messages: - The kernel internal struct iattr contains type safe vfs{g,u}id_t values clearly communicating that these values have to take a given mount's idmapping into account. - The ownership values placed in struct iattr to change ownership are identical for idmapped and non-idmapped mounts going forward. This also allows to simplify stacking filesystems such as overlayfs that change attributes In other words, they always represent the values. - Instead of open coding checks for whether ownership changes have been requested and an actual update of the inode is required we now have small static inline wrappers that abstract this logic away removing a lot of code duplication from individual filesystems that all open-coded the same checks" * tag 'fs.idmapped.vfsuid.v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: mnt_idmapping: align kernel doc and parameter order mnt_idmapping: use new helpers in mapped_fs{g,u}id() fs: port HAS_UNMAPPED_ID() to vfs{g,u}id_t mnt_idmapping: return false when comparing two invalid ids attr: fix kernel doc attr: port attribute changes to new types security: pass down mount idmapping to setattr hook quota: port quota helpers mount ids fs: port to iattr ownership update helpers fs: introduce tiny iattr ownership update helpers fs: use mount types in iattr fs: add two type safe mapping helpers mnt_idmapping: add vfs{g,u}id_t commit e6a7cf70a3ca9dc83419dd3d8ef09a800da3d7c1 Merge: e88745dcfd9d db4abb4a32ec Author: Linus Torvalds Date: Mon Aug 1 08:54:59 2022 -0700 Merge tag 'filelock-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull file locking updates from Jeff Layton: "Just a couple of flock() patches from Kuniyuki Iwashima. The main change is that this moves a file_lock allocation from the slab to the stack" * tag 'filelock-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: fs/lock: Rearrange ops in flock syscall. fs/lock: Don't allocate file_lock in flock_make_lock(). commit e88745dcfd9de5c7de1c17f81e7cecec3d88871d Merge: bec14d79f73e ecce9212d0fd Author: Linus Torvalds Date: Mon Aug 1 08:52:37 2022 -0700 Merge tag 'erofs-for-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs updates from Gao Xiang: "First of all, we'd like to add Yue Hu and Jeffle Xu as two new reviewers. Thank them for spending time working on EROFS! There is no major feature outstanding in this cycle, mainly a patchset I worked on to prepare for rolling hash deduplication and folios for compressed data as the next big features. It kills the unneeded PG_error flag dependency as well. Apart from that, there are bugfixes and cleanups as always. Details are listed below: - Add Yue Hu and Jeffle Xu as reviewers - Add the missing wake_up when updating lzma streams - Avoid consecutive detection for Highmem memory - Prepare for multi-reference pclusters and get rid of PG_error - Fix ctx->pos update for NFS export - minor cleanups" * tag 'erofs-for-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: (23 commits) erofs: update ctx->pos for every emitted dirent erofs: get rid of the leftover PAGE_SIZE in dir.c erofs: get rid of erofs_prepare_dio() helper erofs: introduce multi-reference pclusters (fully-referenced) erofs: record the longest decompressed size in this round erofs: introduce z_erofs_do_decompressed_bvec() erofs: try to leave (de)compressed_pages on stack if possible erofs: introduce struct z_erofs_decompress_backend erofs: get rid of `z_pagemap_global' erofs: clean up `enum z_erofs_collectmode' erofs: get rid of `enum z_erofs_page_type' erofs: rework online page handling erofs: switch compressed_pages[] to bufvec erofs: introduce `z_erofs_parse_in_bvecs' erofs: drop the old pagevec approach erofs: introduce bufvec to store decompressed buffers erofs: introduce `z_erofs_parse_out_bvecs()' erofs: clean up z_erofs_collector_begin() erofs: get rid of unneeded `inode', `map' and `sb' erofs: avoid consecutive detection for Highmem memory ... commit bec14d79f73e7bc2530e73b7c7ee0484029ea0ea Merge: af07685b9ca1 feee1ce45a56 Author: Linus Torvalds Date: Mon Aug 1 08:50:39 2022 -0700 Merge tag 'fsnotify_for_v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify updates from Jan Kara: - support for FAN_MARK_IGNORE which untangles some of the not well defined corner cases with fanotify ignore masks - small cleanups * tag 'fsnotify_for_v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fsnotify: Fix comment typo fanotify: introduce FAN_MARK_IGNORE fanotify: cleanups for fanotify_mark() input validations fanotify: prepare for setting event flags in ignore mask fs: inotify: Fix typo in inotify comment commit af07685b9ca18a5104c073847c83cf443f5c6114 Merge: eb43bbac4c3c fa78f3369372 Author: Linus Torvalds Date: Mon Aug 1 08:48:37 2022 -0700 Merge tag 'fs_for_v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull ext2 and reiserfs updates from Jan Kara: "A fix for ext2 handling of a corrupted fs image and cleanups in ext2 and reiserfs" * tag 'fs_for_v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: ext2: Add more validity checks for inode counts fs/reiserfs/inode: remove dead code in _get_block_create_0() fs/ext2: replace ternary operator with min_t() commit eb43bbac4c3c97b34b72e1dbd91544ee0d48e8d6 Merge: 3d7cb6b04c3f 958589892218 Author: Linus Torvalds Date: Mon Aug 1 08:46:53 2022 -0700 Merge tag 'dlm-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: - Delay the cleanup of interrupted posix lock requests until the user space result arrives. Previously, the immediate cleanup would lead to extraneous warnings when the result arrived. - Tracepoint improvements, e.g. adding the lock resource name. - Delay the completion of lockspace creation until one full recovery cycle has completed. This allows more error cases to be returned to the caller. - Remove warnings from the locking layer about delayed network replies. The recently added midcomms warnings are much more useful. - Begin the process of deprecating two unused lock-timeout-related features. These features now require enabling via a Kconfig option, and enabling them triggers deprecation warnings. We expect to remove the code in v6.2. * tag 'dlm-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: fs: dlm: move kref_put assert for lkb structs fs: dlm: don't use deprecated timeout features by default fs: dlm: add deprecation Kconfig and warnings for timeouts fs: dlm: remove timeout from dlm_user_adopt_orphan fs: dlm: remove waiter warnings fs: dlm: fix grammar in lowcomms output fs: dlm: add comment about lkb IFL flags fs: dlm: handle recovery result outside of ls_recover fs: dlm: make new_lockspace() wait until recovery completes fs: dlm: call dlm_lsop_recover_prep once fs: dlm: update comments about recovery and membership handling fs: dlm: add resource name to tracepoints fs: dlm: remove additional dereference of lksb fs: dlm: change ast and bast trace order fs: dlm: change posix lock sigint handling fs: dlm: use dlm_plock_info for do_unlock_close fs: dlm: change plock interrupted message to debug again fs: dlm: add pid to debug log fs: dlm: plock use list_first_entry commit 36d4b36b69590fed99356a4426c940a253a93800 Author: Yury Norov Date: Mon Jul 25 09:39:17 2022 -0700 lib/nodemask: inline next_node_in() and node_random() The functions are pretty thin wrappers around find_bit engine, and keeping them in c-file prevents compiler from small_const_nbits() optimization, which must take place for all systems with MAX_NUMNODES less than BITS_PER_LONG (default is 16 for me). Moving them to header file doesn't blow up the kernel size: add/remove: 1/2 grow/shrink: 9/5 up/down: 968/-88 (880) CC: Andy Shevchenko CC: Benjamin Herrenschmidt CC: Michael Ellerman CC: Paul Mackerras CC: Rasmus Villemoes CC: Stephen Rothwell CC: linuxppc-dev@lists.ozlabs.org Signed-off-by: Yury Norov MAINTAINERS | 1 - include/linux/nodemask.h | 24 +++++++++++++++++++----- lib/Makefile | 2 +- lib/nodemask.c | 8 -------- 4 files changed, 20 insertions(+), 15 deletions(-) commit 3e731203153de1c06a8b7a4f15061e9051c09a6f Author: Yury Norov Date: Sat Jul 23 14:45:36 2022 -0700 powerpc: drop dependency on in archrandom.h archrandom.h includes to refer ppc_md. This causes circular header dependency, if generic nodemask.h includes random.h: In file included from include/linux/cred.h:16, from include/linux/seq_file.h:13, from arch/powerpc/include/asm/machdep.h:6, from arch/powerpc/include/asm/archrandom.h:5, from include/linux/random.h:109, from include/linux/nodemask.h:97, from include/linux/list_lru.h:12, from include/linux/fs.h:13, from include/linux/compat.h:17, from arch/powerpc/kernel/asm-offsets.c:12: include/linux/sched.h:1203:9: error: unknown type name 'nodemask_t' 1203 | nodemask_t mems_allowed; | ^~~~~~~~~~ Fix it by removing dependency from archrandom.h Now as arch_get_random_seed_long() moved to c-file, and not exported, it's not available for modules. As Michael Ellerman says: I think we actually don't need it exported to modules, I think it's a private detail of the RNG <-> architecture interface, not something that modules should be calling. CC: Andy Shevchenko CC: Benjamin Herrenschmidt CC: Michael Ellerman CC: Paul Mackerras CC: Rasmus Villemoes CC: Stephen Rothwell CC: linuxppc-dev@lists.ozlabs.org Suggested-by: Michael Ellerman (for non-exporting) Acked-by: Michael Ellerman Acked-by: Michael Ellerman Signed-off-by: Yury Norov arch/powerpc/include/asm/archrandom.h | 9 +-------- arch/powerpc/kernel/setup-common.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 8 deletions(-) commit be55492e01ab8a2d259b3404ba24465a0ad27130 Author: Randy Dunlap Date: Sun Jul 31 19:52:21 2022 -0700 devicetree/bindings: correct possessive "its" typos Correct all uses of "it's" that are meant to be possessive "its". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220801025221.30563-1-rdunlap@infradead.org Documentation/devicetree/bindings/clock/st/st,flexgen.txt | 2 +- Documentation/devicetree/bindings/clock/ti/dra7-atl.txt | 2 +- Documentation/devicetree/bindings/hwmon/adt7475.yaml | 2 +- Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt | 2 +- Documentation/devicetree/bindings/mfd/rohm,bd71815-pmic.yaml | 2 +- Documentation/devicetree/bindings/mips/lantiq/rcu.txt | 2 +- Documentation/devicetree/bindings/net/altera_tse.txt | 2 +- Documentation/devicetree/bindings/net/cpsw.txt | 2 +- Documentation/devicetree/bindings/powerpc/fsl/mpc5200.txt | 2 +- Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml | 2 +- Documentation/devicetree/bindings/sound/da9055.txt | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) commit 3d46d78480757e6d403c3bc2b32d2b05ecbed543 Author: Hans de Goede Date: Mon Aug 1 16:55:36 2022 +0200 platform/x86/intel/vsec: Fix wrong type for local status variables The local status variables in intel_vsec_pci_error_detected() and intel_vsec_pci_slot_reset() should have pci_ers_result_t as type (and not pci_channel_state_t). Also fix a whitespace error as well as intel_vsec_pci_err_handlers not being marked static. This fixes the following sparse errors: drivers/platform/x86/intel/vsec.c:429:38: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted pci_channel_state_t [usertype] status @@ got restricted pci_ers_result_t @@ drivers/platform/x86/intel/vsec.c:429:38: sparse: expected restricted pci_channel_state_t [usertype] status drivers/platform/x86/intel/vsec.c:429:38: sparse: got restricted pci_ers_result_t drivers/platform/x86/intel/vsec.c:434:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted pci_channel_state_t [usertype] status @@ got restricted pci_ers_result_t @@ drivers/platform/x86/intel/vsec.c:434:24: sparse: expected restricted pci_channel_state_t [usertype] status drivers/platform/x86/intel/vsec.c:434:24: sparse: got restricted pci_ers_result_t drivers/platform/x86/intel/vsec.c:438:16: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted pci_ers_result_t @@ got restricted pci_channel_state_t [usertype] status @@ drivers/platform/x86/intel/vsec.c:438:16: sparse: expected restricted pci_ers_result_t drivers/platform/x86/intel/vsec.c:438:16: sparse: got restricted pci_channel_state_t [usertype] status drivers/platform/x86/intel/vsec.c:444:38: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted pci_channel_state_t [usertype] status @@ got restricted pci_ers_result_t @@ drivers/platform/x86/intel/vsec.c:444:38: sparse: expected restricted pci_channel_state_t [usertype] status drivers/platform/x86/intel/vsec.c:444:38: sparse: got restricted pci_ers_result_t drivers/platform/x86/intel/vsec.c:457:16: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted pci_channel_state_t [usertype] status @@ got restricted pci_ers_result_t @@ drivers/platform/x86/intel/vsec.c:457:16: sparse: expected restricted pci_channel_state_t [usertype] status drivers/platform/x86/intel/vsec.c:457:16: sparse: got restricted pci_ers_result_t drivers/platform/x86/intel/vsec.c:472:16: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted pci_ers_result_t @@ got restricted pci_channel_state_t [usertype] status @@ drivers/platform/x86/intel/vsec.c:472:16: sparse: expected restricted pci_ers_result_t drivers/platform/x86/intel/vsec.c:472:16: sparse: got restricted pci_channel_state_t [usertype] status drivers/platform/x86/intel/vsec.c:480:33: sparse: sparse: symbol 'intel_vsec_pci_err_handlers' was not declared. Should it be static? Reported-by: kernel test robot Cc: Srinivas Pandruvada Cc: David E Box Cc: Gayatri Kammela Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20220801145536.172410-1-hdegoede@redhat.com drivers/platform/x86/intel/vsec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 958589892218e43ec83d5562438e0c1cc44a4716 Author: Alexander Aring Date: Thu Jun 23 21:28:58 2022 -0400 fs: dlm: move kref_put assert for lkb structs The unhold_lkb() function decrements the lock's kref, and asserts that the ref count was not the final one. Use the kref_put release function (which should not be called) to call the assert, rather than doing the assert based on the kref_put return value. Using kill_lkb() as the release function doesn't make sense if we only want to assert. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lock.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 6b0afc0cc3e9a9a91f5a76d0965d449781441e18 Author: Alexander Aring Date: Wed Jun 22 14:45:23 2022 -0400 fs: dlm: don't use deprecated timeout features by default This patch will disable use of deprecated timeout features if CONFIG_DLM_DEPRECATED_API is not set. The deprecated features will be removed in upcoming kernel release v6.2. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/Makefile | 2 +- fs/dlm/config.c | 14 ++++++++++++++ fs/dlm/config.h | 2 ++ fs/dlm/dlm_internal.h | 19 ++++++++++++++++++- fs/dlm/lock.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ fs/dlm/lock.h | 14 ++++++++++++++ fs/dlm/lockspace.c | 14 +++++++++++--- fs/dlm/user.c | 12 ++++++++++++ 8 files changed, 118 insertions(+), 5 deletions(-) commit 81eeb82fc215afec7a0511dd5eab6b9cac8dac39 Author: Alexander Aring Date: Wed Jun 22 14:45:22 2022 -0400 fs: dlm: add deprecation Kconfig and warnings for timeouts This patch adds a CONFIG_DLM_DEPRECATED_API Kconfig option that must be enabled to use two timeout-related features that we intend to remove in kernel v6.2. Warnings are printed if either is enabled and used. Neither has ever been used as far as we know. . The DLM_LSFL_TIMEWARN lockspace creation flag will be removed, along with the associated configfs entry for setting the timeout. Setting the flag and configfs file would cause dlm to track how long locks were waiting for reply messages. After a timeout, a kernel message would be logged, and a netlink message would be sent to userspace. Recently, midcomms messages have been added that produce much better logging about actual problems with messages. No use has ever been found for the netlink messages. . The userspace libdlm API has allowed the DLM_LKF_TIMEOUT flag with a timeout value to be set in lock requests. The lock request would be cancelled after the timeout. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/Kconfig | 9 +++++++++ fs/dlm/lockspace.c | 11 ++++++++++- fs/dlm/user.c | 8 ++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) commit 5ecd39d1bc4b10df6d640c54e04b4a1c70447d13 Author: Johan Jonker Date: Fri Jun 3 18:35:37 2022 +0200 dt-bindings: net: convert emac_rockchip.txt to YAML Convert emac_rockchip.txt to YAML. Changes against original bindings: Add mdio sub node. Add extra clock for rk3036 Signed-off-by: Johan Jonker Reviewed-by: Rob Herring Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220603163539.537-1-jbx6244@gmail.com .../devicetree/bindings/net/emac_rockchip.txt | 52 ---------- .../devicetree/bindings/net/rockchip,emac.yaml | 115 +++++++++++++++++++++ 2 files changed, 115 insertions(+), 52 deletions(-) commit 42d0d4232ac1620c38a73bd133bf9927c9bc3ac4 Author: Andy Shevchenko Date: Mon Jul 18 17:53:28 2022 +0300 platform/x86: p2sb: Move out of X86_PLATFORM_DEVICES dependency The P2SB library is used for various drivers, including server platforms. That's why the dependency on X86_PLATFORM_DEVICES seems superfluous. Reported-by: kernel test robot Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20220718145328.14374-1-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede drivers/platform/x86/Kconfig | 12 ++++++++++++ drivers/platform/x86/Makefile | 4 ++++ drivers/platform/x86/intel/Kconfig | 12 ------------ drivers/platform/x86/intel/Makefile | 2 -- drivers/platform/x86/{intel => }/p2sb.c | 0 5 files changed, 16 insertions(+), 14 deletions(-) commit 8906ced9a909158a3688dd90940a0a075ba32631 Merge: 6dd71251b9ae a6c80bec3c93 Author: Hans de Goede Date: Mon Aug 1 16:21:31 2022 +0200 Merge tag 'ib-mfd-edac-i2c-leds-pinctrl-platform-watchdog-v5.20' into review-hans Immutable branch between MFD, EDAC, I2C, LEDs, PinCtrl, Platform and Watchdog due for the v5.20 merge window commit a3b5d4715fd5a839857f8b7be78dff258a8d5a47 Merge: 9769e44d41a1 40d060b8158e Author: Takashi Iwai Date: Mon Aug 1 15:26:40 2022 +0200 Merge tag 'asoc-v5.20-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: More updates for v5.20 More updates that came in since the last pull request I sent, a series of driver specific changes: - Support for AMD RPL, some Intel platforms and Mediatek MT8186. commit c17a6ff9321355487d7d5ccaa7d406a0ea06b6c4 Author: Mathieu Desnoyers Date: Wed Jun 22 15:46:17 2022 -0400 rseq: Kill process when unknown flags are encountered in ABI structures rseq_abi()->flags and rseq_abi()->rseq_cs->flags 29 upper bits are currently unused. The current behavior when those bits are set is to ignore them. This is not an ideal behavior, because when future features will start using those flags, if user-space fails to correctly validate that the kernel indeed supports those flags (e.g. with a new sys_rseq flags bit) before using them, it may incorrectly assume that the kernel will handle those flags way when in fact those will be silently ignored on older kernels. Validating that unused flags bits are cleared will allow a smoother transition when those flags will start to be used by allowing applications to fail early, and obviously, when they attempt to use the new flags on an older kernel that does not support them. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20220622194617.1155957-2-mathieu.desnoyers@efficios.com kernel/rseq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0190e4198e47fe99d002d72588f34fd62c9ab570 Author: Mathieu Desnoyers Date: Wed Jun 22 15:46:16 2022 -0400 rseq: Deprecate RSEQ_CS_FLAG_NO_RESTART_ON_* flags The pretty much unused RSEQ_CS_FLAG_NO_RESTART_ON_* flags introduce complexity in rseq, and are subtly buggy [1]. Solving those issues requires introducing additional complexity in the rseq implementation for each supported architecture. Considering that it complexifies the rseq ABI, I am proposing that we deprecate those flags. [2] So far there appears to be consensus from maintainers of user-space projects impacted by this feature that its removal would be a welcome simplification. [3] The deprecation approach proposed here is to issue WARN_ON_ONCE() when encountering those flags and kill the offending process with sigsegv. This should allow us to quickly identify whether anyone yells at us for removing this. Link: https://lore.kernel.org/lkml/20220618182515.95831-1-minhquangbui99@gmail.com/ [1] Link: https://lore.kernel.org/lkml/258546133.12151.1655739550814.JavaMail.zimbra@efficios.com/ [2] Link: https://lore.kernel.org/lkml/87pmj1enjh.fsf@email.froward.int.ebiederm.org/ [3] Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/lkml/20220622194617.1155957-1-mathieu.desnoyers@efficios.com kernel/rseq.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit 281106f938d3daaea6f8b6723a8217a2a1ef6936 Author: Andrei Vagin Date: Fri Jul 22 16:02:40 2022 -0700 selftests: kvm: set rax before vmcall kvm_hypercall has to place the hypercall number in rax. Trace events show that kvm_pv_test doesn't work properly: kvm_pv_test-53132: kvm_hypercall: nr 0x0 a0 0x0 a1 0x0 a2 0x0 a3 0x0 kvm_pv_test-53132: kvm_hypercall: nr 0x0 a0 0x0 a1 0x0 a2 0x0 a3 0x0 kvm_pv_test-53132: kvm_hypercall: nr 0x0 a0 0x0 a1 0x0 a2 0x0 a3 0x0 With this change, it starts working as expected: kvm_pv_test-54285: kvm_hypercall: nr 0x5 a0 0x0 a1 0x0 a2 0x0 a3 0x0 kvm_pv_test-54285: kvm_hypercall: nr 0xa a0 0x0 a1 0x0 a2 0x0 a3 0x0 kvm_pv_test-54285: kvm_hypercall: nr 0xb a0 0x0 a1 0x0 a2 0x0 a3 0x0 Signed-off-by: Andrei Vagin Message-Id: <20220722230241.1944655-5-avagin@google.com> Fixes: ac4a4d6de22e ("selftests: kvm: test enforcement of paravirtual cpuid features") Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/x86_64/processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d518ac7be6223811ab947897273b1bbef846180 Author: Ian Rogers Date: Sun Jul 31 09:49:23 2022 -0700 perf symbol: Fail to read phdr workaround The perf jvmti agent doesn't create program headers, in this case fallback on section headers as happened previously. Committer notes: To test this, from a public post by Ian: 1) download a Java workload dacapo-9.12-MR1-bach.jar from https://sourceforge.net/projects/dacapobench/ 2) build perf such as "make -C tools/perf O=/tmp/perf NO_LIBBFD=1" it should detect Java and create /tmp/perf/libperf-jvmti.so 3) run perf with the jvmti agent: perf record -k 1 java -agentpath:/tmp/perf/libperf-jvmti.so -jar dacapo-9.12-MR1-bach.jar -n 10 fop 4) run perf inject: perf inject -i perf.data -o perf-injected.data -j 5) run perf report perf report -i perf-injected.data | grep org.apache.fop With this patch reverted I see lots of symbols like: 0.00% java jitted-388040-4656.so [.] org.apache.fop.fo.FObj.bind(org.apache.fop.fo.PropertyList) With the patch (2d86612aacb7805f ("perf symbol: Correct address for bss symbols")) I see lots of: dso__load_sym_internal: failed to find program header for symbol: Lorg/apache/fop/fo/FObj;bind(Lorg/apache/fop/fo/PropertyList;)V st_value: 0x40 Fixes: 2d86612aacb7805f ("perf symbol: Correct address for bss symbols") Reviewed-by: Leo Yan Signed-off-by: Ian Rogers Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20220731164923.691193-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol-elf.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit 6fda2405f414b24a6d4fc74f2b1ab24b7fe00d14 Author: Namhyung Kim Date: Fri Jul 29 13:07:56 2022 -0700 perf lock: Implement cpu and task filters for BPF Add -a/--all-cpus and -C/--cpu options for cpu filtering. Also -p/--pid and --tid options are added for task filtering. The short -t option is taken for --threads already. Tracking the command line workload is possible as well. $ sudo perf lock contention -a -b sleep 1 Signed-off-by: Namhyung Kim Cc: Blake Jones Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220729200756.666106-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-lock.txt | 17 ++++++++ tools/perf/builtin-lock.c | 55 +++++++++++++++++++++----- tools/perf/util/bpf_lock_contention.c | 51 +++++++++++++++++++++++- tools/perf/util/bpf_skel/lock_contention.bpf.c | 41 ++++++++++++++++++- tools/perf/util/lock-contention.h | 11 +++++- 5 files changed, 162 insertions(+), 13 deletions(-) commit 407b36f69efbdccf341ccc5be6a366ec0795aa83 Author: Namhyung Kim Date: Fri Jul 29 13:07:55 2022 -0700 perf lock: Use BPF for lock contention analysis Add -b/--use-bpf option to use BPF to collect lock contention stats. For simplicity it now runs system-wide and requires C-c to stop. Upcoming changes will add the usual filtering. $ sudo perf lock con -b ^C contended total wait max wait avg wait type caller 42 192.67 us 13.64 us 4.59 us spinlock queue_work_on+0x20 23 85.54 us 10.28 us 3.72 us spinlock worker_thread+0x14a 6 13.92 us 6.51 us 2.32 us mutex kernfs_iop_permission+0x30 3 11.59 us 10.04 us 3.86 us mutex kernfs_dop_revalidate+0x3c 1 7.52 us 7.52 us 7.52 us spinlock kthread+0x115 1 7.24 us 7.24 us 7.24 us rwlock:W sys_epoll_wait+0x148 2 7.08 us 3.99 us 3.54 us spinlock delayed_work_timer_fn+0x1b 1 6.41 us 6.41 us 6.41 us spinlock idle_balance+0xa06 2 2.50 us 1.83 us 1.25 us mutex kernfs_iop_lookup+0x2f 1 1.71 us 1.71 us 1.71 us mutex kernfs_iop_getattr+0x2c Signed-off-by: Namhyung Kim Cc: Blake Jones Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220729200756.666106-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-lock.txt | 5 + tools/perf/Makefile.perf | 2 +- tools/perf/builtin-lock.c | 164 ++++++++----------------- tools/perf/util/Build | 1 + tools/perf/util/bpf_lock_contention.c | 132 ++++++++++++++++++++ tools/perf/util/bpf_skel/lock_contention.bpf.c | 131 ++++++++++++++++++++ tools/perf/util/lock-contention.h | 133 ++++++++++++++++++++ 7 files changed, 453 insertions(+), 115 deletions(-) commit 77d54a2cd6086d1cc3cadd124084b5d0d40b713e Author: Namhyung Kim Date: Fri Jul 29 13:07:54 2022 -0700 perf lock: Pass machine pointer to is_lock_function() This is a preparation for later change to expose the function externally so that it can be used without the implicit session data. Signed-off-by: Namhyung Kim Cc: Blake Jones Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220729200756.666106-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit ca829e05d3d4f728810cc5e4b468d9ebc7745eb3 Author: Zhouyi Zhou Date: Tue Jul 26 09:57:47 2022 +0800 powerpc/64: Init jump labels before parse_early_param() On 64-bit, calling jump_label_init() in setup_feature_keys() is too late because static keys may be used in subroutines of parse_early_param() which is again subroutine of early_init_devtree(). For example booting with "threadirqs": static_key_enable_cpuslocked(): static key '0xc000000002953260' used before call to jump_label_init() WARNING: CPU: 0 PID: 0 at kernel/jump_label.c:166 static_key_enable_cpuslocked+0xfc/0x120 ... NIP static_key_enable_cpuslocked+0xfc/0x120 LR static_key_enable_cpuslocked+0xf8/0x120 Call Trace: static_key_enable_cpuslocked+0xf8/0x120 (unreliable) static_key_enable+0x30/0x50 setup_forced_irqthreads+0x28/0x40 do_early_param+0xa0/0x108 parse_args+0x290/0x4e0 parse_early_options+0x48/0x5c parse_early_param+0x58/0x84 early_init_devtree+0xd4/0x518 early_setup+0xb4/0x214 So call jump_label_init() just before parse_early_param() in early_init_devtree(). Suggested-by: Michael Ellerman Signed-off-by: Zhouyi Zhou [mpe: Add call trace to change log and minor wording edits.] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220726015747.11754-1-zhouzhouyi@gmail.com arch/powerpc/kernel/prom.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ff446cd76854d47f451a84c26bb70934ae2ec5a7 Author: Michael Ellerman Date: Mon Aug 1 18:48:34 2022 +1000 selftests/powerpc: Avoid GCC 12 uninitialised variable warning GCC 12 thinks that `actual` might be used uninitialised. It's not, the use is guarded by `bad_mmcr2` which is only set to true at the same point where `actual` is initialised. cycles_with_mmcr2_test.c: In function ‘cycles_with_mmcr2’: cycles_with_mmcr2_test.c:81:17: error: ‘actual’ may be used uninitialized [-Werror=maybe-uninitialized] 81 | printf("Bad MMCR2 value seen is 0x%lx\n", actual); Silence the warning by initialising `actual` to zero. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220801113746.802046-1-mpe@ellerman.id.au tools/testing/selftests/powerpc/pmu/ebb/cycles_with_mmcr2_test.c | 1 + 1 file changed, 1 insertion(+) commit df5d4b616ee76abc97e5bd348e22659c2b095b1c Author: Miaoqian Lin Date: Sun Jun 5 10:51:29 2022 +0400 powerpc/cell/axon_msi: Fix refcount leak in setup_msi_msg_address of_get_next_parent() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() in the error path to avoid refcount leak. Fixes: ce21b3c9648a ("[CELL] add support for MSI on Axon-based Cell systems") Signed-off-by: Miaoqian Lin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220605065129.63906-1-linmq006@gmail.com arch/powerpc/platforms/cell/axon_msi.c | 1 + 1 file changed, 1 insertion(+) commit 255b650cbec6849443ce2e0cdd187fd5e61c218c Author: Miaoqian Lin Date: Sun Jun 5 09:32:23 2022 +0400 powerpc/xive: Fix refcount leak in xive_get_max_prio of_find_node_by_path() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak. Fixes: eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt controller") Signed-off-by: Miaoqian Lin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220605053225.56125-1-linmq006@gmail.com arch/powerpc/sysdev/xive/spapr.c | 1 + 1 file changed, 1 insertion(+) commit 6ac059dacffa8ab2f7798f20e4bd3333890c541c Author: Miaoqian Lin Date: Fri Jun 3 16:15:42 2022 +0400 powerpc/spufs: Fix refcount leak in spufs_init_isolated_loader of_find_node_by_path() returns remote device nodepointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak. Fixes: 0afacde3df4c ("[POWERPC] spufs: allow isolated mode apps by starting the SPE loader") Signed-off-by: Miaoqian Lin Acked-by: Arnd Bergmann Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220603121543.22884-1-linmq006@gmail.com arch/powerpc/platforms/cell/spufs/inode.c | 1 + 1 file changed, 1 insertion(+) commit 8c9f37a78f70fad763f0d61f03245bb011765086 Author: Athira Rajeev Date: Thu Jul 28 22:07:46 2022 +0530 powerpc/perf: Include caps feature for power10 DD1 version Commit 6320e693d98c ("powerpc/perf: Add support for caps under sysfs in powerpc") added support for caps under sysfs in powerpc. This added caps directory to: /sys/bus/event_source/devices/cpu/ for power8, power9, power10 and generic compat PMU in respective PMU driver code. For power10, it is added under "power10_pmu_attr_groups". But for DD1 version, attr_groups are defined under dd1 array: "power10_pmu_attr_groups_dd1". Since caps is not added for DD1, it fails to include "cpu/caps" in DD1 model. The issue was observed while booting power10 pseries with qemu version 6, but not observed with qemu version 7. This is because qemu version 7 uses a DD 2.0 CPU model. Below is the trace log: Can't update unknown attr grp name: cpu/caps^M ------------[ cut here ]------------^M Failed to register pmu: cpu, reason -22^M WARNING: CPU: 1 PID: 1 at kernel/events/core.c:13427 perf_event_sysfs_init+0xbc/0x108^M Modules linked in:^M CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.19.0-rc2-00111-g6320e693d98c #148^M NIP: c0000000020391f4 LR: c0000000020391f0 CTR: c0000000008c9c30^M REGS: c0000000044c38c0 TRAP: 0700 Not tainted (5.19.0-rc2-00111-g6320e693d98c)^M MSR: 8000000002029033 CR: 48000281 XER: 20040000^M CFAR: c00000000013feac IRQMASK: 0 ^M GPR00: c0000000020391f0 c0000000044c3b60 c00000000283db00 0000000000000027 ^M GPR04: 80000000ffffe0a8 0000000000000000 0000000000000004 00000000fdcd0000 ^M GPR08: 0000000000000027 c0000000ffe07e08 0000000000000001 0000000000000000 ^M GPR12: c00000000035dd90 c0000000fffff300 c000000000012478 0000000000000000 ^M GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ^M GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ^M GPR24: c000000002003480 0000000000000007 c0000000012a78d0 c000000001170a80 ^M GPR28: c0000000026c4df8 c0000000026c4e68 0000000000000000 c0000000025a8628 ^M NIP [c0000000020391f4] perf_event_sysfs_init+0xbc/0x108^M LR [c0000000020391f0] perf_event_sysfs_init+0xb8/0x108^M Call Trace:^M [c0000000044c3b60] [c0000000020391f0] perf_event_sysfs_init+0xb8/0x108 (unreliable)^M [c0000000044c3bf0] [c000000000011ec4] do_one_initcall+0x64/0x2d0^M [c0000000044c3cd0] [c0000000020049fc] kernel_init_freeable+0x338/0x3e0^M [c0000000044c3db0] [c0000000000124a0] kernel_init+0x30/0x1a0^M [c0000000044c3e10] [c00000000000cd54] ret_from_kernel_thread+0x5c/0x64^M Instruction dump:^M 813f0038 2c090000 4180002c 7fe3fb78 4a3280c5 2c030000 7c651b78 41820018 ^M e89f0030 7f63db78 4a106c59 60000000 <0fe00000> ebff0000 4bffffb4 39200001 ^M ---[ end trace 0000000000000000 ]---^M Fix it by adding caps for dd1 attr_groups in power10 PMU driver. Fixes: 6320e693d98c ("powerpc/perf: Add support for caps under sysfs in powerpc") Signed-off-by: Athira Rajeev [mpe: Update change log to mention qemu 7 DD2.0 CPU model] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220728163746.85062-1-atrajeev@linux.vnet.ibm.com arch/powerpc/perf/power10-pmu.c | 1 + 1 file changed, 1 insertion(+) commit 96d50a1d874ca28bd779983ac9c2b791c2b406c0 Merge: f4a0318f278d 4008d54e2953 Author: Michael Ellerman Date: Mon Aug 1 22:20:46 2022 +1000 Merge branch 'topic/ppc-kvm' into next Bring in a few more commits we are keeping in our KVM topic branch. commit 9bd7021809de194b2f8b3ef10b5509e229f339ef Author: Ian Rogers Date: Tue Jul 19 15:39:46 2022 -0700 perf test: Add user space counter reading tests These tests are based on test_stat_user_read in tools/lib/perf/tests/test-evsel.c. The tests are modified to skip if perf_event_open fails or rdpmc isn't supported. Committer testing: ⬢[acme@toolbox perf]$ perf test "mmap interface" 4: mmap interface tests : 4.1: Read samples using the mmap interface : Skip (permissions) ⬢[acme@toolbox perf]$ [root@five ~]# perf test "mmap interface" 4: mmap interface tests : 4.1: Read samples using the mmap interface : Ok [root@five ~]# Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Anshuman Khandual Cc: Jiri Olsa Cc: Kajol Jain Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Rob Herring Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20220719223946.176299-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/mmap-basic.c | 127 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 126 insertions(+), 1 deletion(-) commit 481fadfb1073cbb0a9e7583a2aecf211c7897d2c Author: Ian Rogers Date: Tue Jul 19 15:39:45 2022 -0700 perf test: Remove x86 rdpmc test This test has been superseded by test_stat_user_read in: tools/lib/perf/tests/test-evsel.c The updated test doesn't divide-by-0 when running time of a counter is 0. It also supports ARM64. Signed-off-by: Ian Rogers Acked-by: Rob Herring Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Anshuman Khandual Cc: Jiri Olsa Cc: Kajol Jain Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20220719223946.176299-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/tests/Build | 1 - tools/perf/arch/x86/tests/arch-tests.c | 2 - tools/perf/arch/x86/tests/rdpmc.c | 182 --------------------------------- 3 files changed, 185 deletions(-) commit dd4d1c3bb3f1cd91a7a67ed3d73299ecb273ff92 Author: Oliver Upton Date: Tue Jul 19 14:31:34 2022 +0000 selftests: KVM: Add exponent check for boolean stats The only sensible exponent for a boolean stat is 0. Add a test assertion requiring all boolean statistics to have an exponent of 0. Signed-off-by: Oliver Upton Reviewed-by: Andrew Jones Message-Id: <20220719143134.3246798-4-oliver.upton@linux.dev> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/kvm_binary_stats_test.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7eebae78bc9754564779927976f37d04c2c01b64 Author: Oliver Upton Date: Tue Jul 19 14:31:33 2022 +0000 selftests: KVM: Provide descriptive assertions in kvm_binary_stats_test As it turns out, tests sometimes fail. When that is the case, packing the test assertion with as much relevant information helps track down the problem more quickly. Sharpen up the stat descriptor assertions in kvm_binary_stats_test to more precisely describe the reason for the test assertion and which stat is to blame. Signed-off-by: Oliver Upton Reviewed-by: Andrew Jones Message-Id: <20220719143134.3246798-3-oliver.upton@linux.dev> Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/kvm_binary_stats_test.c | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit ad5b072716e9ea7164b578a06c615966e9203c45 Author: Oliver Upton Date: Tue Jul 19 14:31:32 2022 +0000 selftests: KVM: Check stat name before other fields In order to provide more useful test assertions that describe the broken stats descriptor, perform sanity check on the stat name before any other descriptor field. While at it, avoid dereferencing the name field if the sanity check fails as it is more likely to contain garbage. Signed-off-by: Oliver Upton Reviewed-by: Andrew Jones Message-Id: <20220719143134.3246798-2-oliver.upton@linux.dev> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/kvm_binary_stats_test.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 18808564aa3bc9ae3309fd8a5c0a93f7f9a23f9a Merge: 9a0b36266f7a 3d7cb6b04c3f Author: Arnaldo Carvalho de Melo Date: Mon Aug 1 08:59:31 2022 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up the fixes that went upstream via acme/perf/urgent and to get to v5.19. Signed-off-by: Arnaldo Carvalho de Melo commit 0a324c3263f1e456f54dd8dc8ce58575aea776bc Merge: d4d11f8ff14b 8b684570eeaa Author: David S. Miller Date: Mon Aug 1 12:38:57 2022 +0100 Merge branch 'funeth-tx-xdp-frags' Dimitris Michailidis says: ==================== net/funeth: Tx support for XDP with frags Support XDP with fragments for XDP_TX and ndo_xdp_xmit. The first three patches rework existing code used by the skb path to make it suitable also for XDP. With these all the callees of the main Tx XDP function, fun_xdp_tx(), are fragment-capable. The last patch updates fun_xdp_tx() to handle fragments. ==================== Tested-by: Ido Schimmel Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 8b684570eeaa258d7878c6962a50ed7cce690f9c Author: Dimitris Michailidis Date: Fri Jul 29 00:32:57 2022 -0700 net/funeth: Tx handling of XDP with fragments. By now all the functions fun_xdp_tx() calls are shared with the skb path and thus are fragment-capable. Update fun_xdp_tx(), that up to now has been passing just one buffer, to check for fragments and call accordingly. This makes XDP_TX and ndo_xdp_xmit fragment-capable. Signed-off-by: Dimitris Michailidis Signed-off-by: David S. Miller drivers/net/ethernet/fungible/funeth/funeth_tx.c | 30 ++++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 1c45b0cd6cf064e21ae1eda027b3e1699e15494d Author: Dimitris Michailidis Date: Fri Jul 29 00:32:56 2022 -0700 net/funeth: Unify skb/XDP packet mapping. Instead of passing an skb to the mapping function pass an skb_shared_info plus an additional address/length pair. This makes it usable for both skbs and XDP. Call it from the XDP path and adjust the skb path. Signed-off-by: Dimitris Michailidis Signed-off-by: David S. Miller drivers/net/ethernet/fungible/funeth/funeth_tx.c | 32 +++++++++++++----------- 1 file changed, 17 insertions(+), 15 deletions(-) commit a3b461bbd1847e02bb83957bbba0a195bc274e7a Author: Dimitris Michailidis Date: Fri Jul 29 00:32:55 2022 -0700 net/funeth: Unify skb/XDP gather list writing. Extract the Tx gather list writing code that skbs use into a utility function and use it also for XDP. Signed-off-by: Dimitris Michailidis Signed-off-by: David S. Miller drivers/net/ethernet/fungible/funeth/funeth_tx.c | 46 ++++++++++++++++-------- 1 file changed, 31 insertions(+), 15 deletions(-) commit 16ead40812a08248c89268736b973c53cfe6e16e Author: Dimitris Michailidis Date: Fri Jul 29 00:32:54 2022 -0700 net/funeth: Unify skb/XDP Tx packet unmapping. Current XDP unmapping is a subset of its skb analog, dealing with only one buffer. In preparation for multi-frag XDP rename the skb function and use it also for XDP. The XDP version is removed. Signed-off-by: Dimitris Michailidis Signed-off-by: David S. Miller drivers/net/ethernet/fungible/funeth/funeth_tx.c | 33 +++++++++--------------- 1 file changed, 12 insertions(+), 21 deletions(-) commit 31f6e3832a0f1c366e54033335aed2375f6e447a Author: Paolo Bonzini Date: Mon Aug 1 07:27:18 2022 -0400 KVM: x86/mmu: remove unused variable The last use of 'pfn' went away with the same-named argument to host_pfn_mapping_level; now that the hugepage level is obtained exclusively from the host page tables, kvm_mmu_zap_collapsible_spte does not need to know host pfns at all. Fixes: a8ac499bb6ab ("KVM: x86/mmu: Don't require refcounted "struct page" to create huge SPTEs") Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 2 -- 1 file changed, 2 deletions(-) commit d4d11f8ff14b28a956d01700d4559620ffe4c2a2 Merge: 02a7cb2866dd 09b278462f16 Author: David S. Miller Date: Mon Aug 1 12:14:01 2022 +0100 Merge branch 'devlink-parallel-commands' Jiri Pirko says: ==================== net: devlink: allow parallel commands on multiple devlinks Aim of this patchset is to remove devlink_mutex and eventually to enable parallel ops on devlink netlink interface. ==================== Tested-by: Ido Schimmel Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 09b278462f16569c63dd78ffa29bbfe048b4e604 Author: Jiri Pirko Date: Fri Jul 29 09:10:38 2022 +0200 net: devlink: enable parallel ops on netlink interface As the devlink_mutex was removed and all devlink instances are protected individually by devlink->lock mutex, allow the netlink ops to run in parallel and therefore allow user to execute commands on multiple devlink instances simultaneously. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/core/devlink.c | 1 + 1 file changed, 1 insertion(+) commit d3efc2a6a6d851bcd53805309f4632e018007436 Author: Jiri Pirko Date: Fri Jul 29 09:10:37 2022 +0200 net: devlink: remove devlink_mutex All accesses to devlink structure from userspace and drivers are locked with devlink->lock instance mutex. Also, devlinks xa_array iteration is taken care of by iteration helpers taking devlink reference. Therefore, remove devlink_mutex as it is no longer needed. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/core/devlink.c | 80 +++--------------------------------------------------- 1 file changed, 4 insertions(+), 76 deletions(-) commit 644a66c60f02f302d82c3008ae2ffe67cf495383 Author: Jiri Pirko Date: Fri Jul 29 09:10:36 2022 +0200 net: devlink: convert reload command to take implicit devlink->lock Convert reload command to behave the same way as the rest of the commands and let if be called with devlink->lock held. Remove the temporary devl_lock taking from drivers. As the DEVLINK_NL_FLAG_NO_LOCK flag is no longer used, remove it alongside. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/main.c | 4 ---- drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 4 ---- drivers/net/ethernet/mellanox/mlxsw/core.c | 4 ---- drivers/net/netdevsim/dev.c | 6 ------ net/core/devlink.c | 18 +++++------------- 5 files changed, 5 insertions(+), 31 deletions(-) commit c2368b19807affd7621f7c4638cd2e17fec13021 Author: Jiri Pirko Date: Fri Jul 29 09:10:35 2022 +0200 net: devlink: introduce "unregistering" mark and use it during devlinks iteration Add new mark called "unregistering" to be set at the beginning of devlink_unregister() function. Check this mark during devlinks iteration in order to prevent getting a reference of devlink which is being currently unregistered. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/core/devlink.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 02a7cb2866dd6e3ac7645b594289e1c308b68c4e Author: Kuniyuki Iwashima Date: Thu Jul 28 20:21:37 2022 -0700 udp: Remove redundant __udp_sysctl_init() call from udp_init(). __udp_sysctl_init() is called for init_net via udp_sysctl_ops. While at it, we can rename __udp_sysctl_init() to udp_sysctl_init(). Fixes: 1e8029515816 ("udp: Move the udp sysctl to namespace.") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/ipv4/udp.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 9fe2e6f3960687ab2a297fe09837a3f47cd2331f Merge: 5121db6afb99 93cb804edab1 Author: David S. Miller Date: Mon Aug 1 12:00:53 2022 +0100 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2022-07-29 This series contains updates to iavf driver only. Przemyslaw prevents setting of TC max rate below minimum supported values and reports updated queue values when setting up TCs. --- v2: Dropped patch 3 (hw-tc-offload check) ==================== Signed-off-by: David S. Miller commit 5121db6afb999d0049d37e911b08cd440f6f8f82 Author: Li Qiong Date: Wed Jul 27 23:03:41 2022 +0800 net/rds: Use PTR_ERR instead of IS_ERR for rdsdebug() If 'local_odp_mr->r_trans_private' is a error code, it is better to print the error code than to print the value of IS_ERR(). Signed-off-by: Li Qiong Signed-off-by: David S. Miller net/rds/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7d8912cfd1b72c970f727d7da1c8274d5b18803 Merge: 63757225a933 7b584fbb3636 Author: David S. Miller Date: Mon Aug 1 11:42:11 2022 +0100 Merge tag 'linux-can-next-for-5.20-20220731' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2022-07-31 this is a pull request of 36 patches for net-next/master. The 1st patch is by me and fixes a typo in the mcp251xfd driver. Vincent Mailhol contributes a series of 9 patches, which clean up the drivers to make use of KBUILD_MODNAME instead of hard coded names and remove DRV_VERSION. Followed by 3 patches by Vincent Mailhol that directly set the ethtool_ops in instead of calling a function in the slcan, c_can and flexcan driver. Vincent Mailhol contributes a KBUILD_MODNAME and pr_fmt cleanup patch for the slcan driver. Dario Binacchi contributes 6 patches to clean up the driver and remove the legacy driver infrastructure. The next 14 patches are by Vincent Mailhol and target the various drivers, they add ethtool support and reporting of timestamping capabilities. Another patch by Vincent Mailhol for the etas_es58x driver to remove useless calls to usb_fill_bulk_urb(). The last patch is by Christophe JAILLET and fixes a broken link to Documentation in the can327 driver. ==================== Signed-off-by: David S. Miller commit c4edb2babc750d829cb551a6af7cb39b2afc9fb5 Merge: 63f4b210414b 0982c8d859f8 Author: Paolo Bonzini Date: Fri Jul 29 10:07:59 2022 -0400 Merge tag 'kvmarm-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 updates for 5.20: - Unwinder implementations for both nVHE modes (classic and protected), complete with an overflow stack - Rework of the sysreg access from userspace, with a complete rewrite of the vgic-v3 view to allign with the rest of the infrastructure - Disagregation of the vcpu flags in separate sets to better track their use model. - A fix for the GICv2-on-v3 selftest - A small set of cosmetic fixes commit 63f4b210414b65aa3103c54369cacbd0b1bdf02f Merge: 2e2e91158feb 7edc3a68038a Author: Paolo Bonzini Date: Fri Jul 29 09:46:01 2022 -0400 Merge remote-tracking branch 'kvm/next' into kvm-next-5.20 KVM/s390, KVM/x86 and common infrastructure changes for 5.20 x86: * Permit guests to ignore single-bit ECC errors * Fix races in gfn->pfn cache refresh; do not pin pages tracked by the cache * Intel IPI virtualization * Allow getting/setting pending triple fault with KVM_GET/SET_VCPU_EVENTS * PEBS virtualization * Simplify PMU emulation by just using PERF_TYPE_RAW events * More accurate event reinjection on SVM (avoid retrying instructions) * Allow getting/setting the state of the speaker port data bit * Refuse starting the kvm-intel module if VM-Entry/VM-Exit controls are inconsistent * "Notify" VM exit (detect microarchitectural hangs) for Intel * Cleanups for MCE MSR emulation s390: * add an interface to provide a hypervisor dump for secure guests * improve selftests to use TAP interface * enable interpretive execution of zPCI instructions (for PCI passthrough) * First part of deferred teardown * CPU Topology * PV attestation * Minor fixes Generic: * new selftests API using struct kvm_vcpu instead of a (vm, id) tuple x86: * Use try_cmpxchg64 instead of cmpxchg64 * Bugfixes * Ignore benign host accesses to PMU MSRs when PMU is disabled * Allow disabling KVM's "MONITOR/MWAIT are NOPs!" behavior * x86/MMU: Allow NX huge pages to be disabled on a per-vm basis * Port eager page splitting to shadow MMU as well * Enable CMCI capability by default and handle injected UCNA errors * Expose pid of vcpu threads in debugfs * x2AVIC support for AMD * cleanup PIO emulation * Fixes for LLDT/LTR emulation * Don't require refcounted "struct page" to create huge SPTEs x86 cleanups: * Use separate namespaces for guest PTEs and shadow PTEs bitmasks * PIO emulation * Reorganize rmap API, mostly around rmap destruction * Do not workaround very old KVM bugs for L0 that runs with nesting enabled * new selftests API for CPUID commit 97b82c07c4217260e448ef774e6099abf608bd1d Author: Steve French Date: Mon Aug 1 01:36:46 2022 -0500 cifs: trivial style fixup missing blank line after declaration Signed-off-by: Steve French fs/cifs/file.c | 1 + 1 file changed, 1 insertion(+) commit aea02fc40a7fa6ac2c16e3c3a6f1d0fd7e6faaba Author: Yang Yingliang Date: Fri Jul 29 15:49:35 2022 +0800 cifs: fix wrong unlock before return from cifs_tree_connect() It should unlock 'tcon->tc_lock' before return from cifs_tree_connect(). Fixes: fe67bd563ec2 ("cifs: avoid use of global locks for high contention data") Signed-off-by: Yang Yingliang Reviewed-by: Shyam Prasad N Signed-off-by: Steve French fs/cifs/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7d7a66aacd6fd8ca57baf08a7bac5421282f6f8 Author: Shyam Prasad N Date: Wed Jul 27 14:49:56 2022 -0500 cifs: avoid use of global locks for high contention data During analysis of multichannel perf, it was seen that the global locks cifs_tcp_ses_lock and GlobalMid_Lock, which were shared between various data structures were causing a lot of contention points. With this change, we're breaking down the use of these locks by introducing new locks at more granular levels. i.e. server->srv_lock, ses->ses_lock and tcon->tc_lock to protect the unprotected fields of server, session and tcon structs; and server->mid_lock to protect mid related lists and entries at server level. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French fs/cifs/cifs_debug.c | 8 +- fs/cifs/cifsencrypt.c | 6 +- fs/cifs/cifsfs.c | 3 + fs/cifs/cifsglob.h | 99 ++++++++++++++++------ fs/cifs/cifssmb.c | 28 +++---- fs/cifs/connect.c | 216 +++++++++++++++++++++++++++--------------------- fs/cifs/dfs_cache.c | 8 +- fs/cifs/misc.c | 2 + fs/cifs/smb1ops.c | 10 +-- fs/cifs/smb2ops.c | 47 ++++++----- fs/cifs/smb2pdu.c | 24 +++--- fs/cifs/smb2transport.c | 32 +++---- fs/cifs/transport.c | 96 ++++++++++----------- 13 files changed, 336 insertions(+), 243 deletions(-) commit 1bfa25ee30dfebe32a3b40c1a954052becbd7b8d Author: Steve French Date: Sun Jul 24 22:47:59 2022 -0500 cifs: remove remaining build warnings Removed remaining warnings related to externs. These warnings although harmless could be distracting e.g. fs/cifs/cifsfs.c: note: in included file: fs/cifs/cifsglob.h:1968:24: warning: symbol 'sesInfoAllocCount' was not declared. Should it be static? Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/cifsfs.c | 19 +++++++++++++++++++ fs/cifs/cifsglob.h | 22 +++++++++++----------- 2 files changed, 30 insertions(+), 11 deletions(-) commit 9543c8ab3016cefa6abb265234a7ef0ca2b3f89f Author: Enzo Matsumiya Date: Fri Jul 22 14:02:59 2022 -0300 cifs: list_for_each() -> list_for_each_entry() Replace list_for_each() by list_for_each_entr() where appropriate. Remove no longer used list_head stack variables. Signed-off-by: Enzo Matsumiya Signed-off-by: Steve French fs/cifs/cifs_debug.c | 48 +++++++++++------------------------------------- fs/cifs/connect.c | 5 +---- fs/cifs/file.c | 10 +++------- fs/cifs/misc.c | 19 +++++-------------- fs/cifs/smb2ops.c | 7 ++----- 5 files changed, 22 insertions(+), 67 deletions(-) commit ec88cc57c39eef7f630a0f118955f3c16dc55a45 Author: Steve French Date: Thu Jul 21 10:22:48 2022 -0500 cifs: update MAINTAINERS file with reviewers And also correct the URL for the project web site. Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French MAINTAINERS | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit da3847894fddc27ca95d5ac0012f444a77a5e0c3 Author: Enzo Matsumiya Date: Tue Jul 19 14:31:51 2022 -0300 smb2: small refactor in smb2_check_message() If the command is SMB2_IOCTL, OutputLength and OutputContext are optional and can be zero, so return early and skip calculated length check. Move the mismatched length message to the end of the check, to avoid unnecessary logs when the check was not a real miscalculation. Also change the pr_warn_once() to a pr_warn() so we're sure to get a log for the real mismatches. Signed-off-by: Enzo Matsumiya Signed-off-by: Steve French fs/cifs/connect.c | 13 ++++++------- fs/cifs/smb2misc.c | 47 ++++++++++++++++++++++++++++------------------- 2 files changed, 34 insertions(+), 26 deletions(-) commit c6f62f81b488d00afaa86bae26c6ce9ab12c709e Author: Matthew Wilcox (Oracle) Date: Mon Jul 18 20:06:24 2022 +0100 cifs: Fix memory leak when using fscache If we hit the 'index == next_cached' case, we leak a refcount on the struct page. Fix this by using readahead_folio() which takes care of the refcount for you. Fixes: 0174ee9947bd ("cifs: Implement cache I/O by accessing the cache directly") Cc: David Howells Cc: Jeff Layton Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Steve French fs/cifs/file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 89e42f49ef58bf5601ce452683aad1cb1088878f Author: Steve French Date: Fri Jul 15 23:57:08 2022 -0500 cifs: remove minor build warning The build warning: warning: symbol 'cifs_tcp_ses_lock' was not declared. Should it be static? can be distracting. Fix two of these. Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/cifsfs.c | 2 ++ fs/cifs/cifsglob.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit c2c17ddbf32bd89c4b5e3eb71068b52c890d07df Author: Steve French Date: Fri Jul 15 23:45:45 2022 -0500 cifs: remove some camelCase and also some static build warnings Remove warnings for five global variables. For example: fs/cifs/cifsglob.h:1984:24: warning: symbol 'midCount' was not declared. Should it be static? Also change them from camelCase (e.g. "midCount" to "mid_count") Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/cifs_debug.c | 14 +++++++------- fs/cifs/cifsfs.c | 17 ++++++++++++----- fs/cifs/cifsglob.h | 10 +++++----- fs/cifs/connect.c | 2 +- fs/cifs/misc.c | 12 ++++++------ fs/cifs/smb2transport.c | 2 +- fs/cifs/transport.c | 4 ++-- 7 files changed, 34 insertions(+), 27 deletions(-) commit 0827f71b881c9d679df4cb33936cbe8bcaa77321 Author: Yu Zhe Date: Tue Jun 14 01:54:49 2022 -0700 cifs: remove unnecessary (void*) conversions. One more. remove unnecessary void* type castings. Signed-off-by: Yu Zhe Signed-off-by: Steve French fs/cifs/cifs_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f46608ae7a138ae5982f97414e8cfc38a2e0f7e Author: Yu Zhe Date: Thu Jun 30 17:30:27 2022 +0800 cifs: remove unnecessary type castings remove unnecessary void* type castings. Signed-off-by: Yu Zhe Signed-off-by: Steve French fs/cifs/connect.c | 2 +- fs/cifs/inode.c | 4 ++-- fs/cifs/netmisc.c | 2 +- fs/cifs/smb2misc.c | 2 +- fs/cifs/smb2pdu.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit 4da2cd0517e08c2a996b5f3e8914bdda0286d911 Author: Colin Ian King Date: Tue Jun 28 22:32:29 2022 +0100 cifs: remove redundant initialization to variable mnt_sign_enabled Variable mnt_sign_enabled is being initialized with a value that is never read, it is being reassigned later on with a different value. The initialization is redundant and can be removed. Cleans up clang scan-build warning: fs/cifs/cifssmb.c:465:7: warning: Value stored to 'mnt_sign_enabled during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Steve French fs/cifs/cifssmb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fa2cffba0b82336a2244d941322eb1627ff787b Author: Steve French Date: Tue Jul 12 11:43:44 2022 -0500 smb3: check xattr value length earlier Coverity complains about assigning a pointer based on value length before checking that value length goes beyond the end of the SMB. Although this is even more unlikely as value length is a single byte, and the pointer is not dereferenced until laterm, it is clearer to check the lengths first. Addresses-Coverity: 1467704 ("Speculative execution data leak") Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/smb2ops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9769e44d41a1359b9000ff8458f0f2f66080ebf4 Merge: f38e6458e16d be561ffad708 Author: Takashi Iwai Date: Mon Aug 1 08:11:19 2022 +0200 Merge branch 'for-next' into for-linus commit 251e90e7e346a23742b90e2c4db19d322e071d99 Author: Juergen Gross Date: Wed Jun 22 08:38:38 2022 +0200 xen: don't require virtio with grants for non-PV guests Commit fa1f57421e0b ("xen/virtio: Enable restricted memory access using Xen grant mappings") introduced a new requirement for using virtio devices: the backend now needs to support the VIRTIO_F_ACCESS_PLATFORM feature. This is an undue requirement for non-PV guests, as those can be operated with existing backends without any problem, as long as those backends are running in dom0. Per default allow virtio devices without grant support for non-PV guests. On Arm require VIRTIO_F_ACCESS_PLATFORM for devices having been listed in the device tree to use grants. Add a new config item to always force use of grants for virtio. Fixes: fa1f57421e0b ("xen/virtio: Enable restricted memory access using Xen grant mappings") Reported-by: Viresh Kumar Signed-off-by: Juergen Gross Reviewed-by: Oleksandr Tyshchenko Tested-by: Oleksandr Tyshchenko # Arm64 guest using Xen Reviewed-by: Stefano Stabellini Link: https://lore.kernel.org/r/20220622063838.8854-4-jgross@suse.com Signed-off-by: Juergen Gross arch/arm/xen/enlighten.c | 4 +++- arch/x86/xen/enlighten_hvm.c | 4 +++- arch/x86/xen/enlighten_pv.c | 5 ++++- drivers/xen/Kconfig | 9 +++++++++ drivers/xen/grant-dma-ops.c | 10 ++++++++++ include/xen/xen-ops.h | 9 +++++++++ include/xen/xen.h | 8 -------- 7 files changed, 38 insertions(+), 11 deletions(-) commit a870544ca9d215449e91ebc01e35d80b23151c78 Author: Juergen Gross Date: Wed Jun 22 08:38:37 2022 +0200 kernel: remove platform_has() infrastructure The only use case of the platform_has() infrastructure has been removed again, so remove the whole feature. Signed-off-by: Juergen Gross Tested-by: Oleksandr Tyshchenko # Arm64 guest using Xen Reviewed-by: Stefano Stabellini Link: https://lore.kernel.org/r/20220622063838.8854-3-jgross@suse.com Signed-off-by: Juergen Gross MAINTAINERS | 8 -------- include/asm-generic/Kbuild | 1 - include/asm-generic/platform-feature.h | 8 -------- include/linux/platform-feature.h | 15 --------------- kernel/Makefile | 2 +- kernel/platform-feature.c | 27 --------------------------- 6 files changed, 1 insertion(+), 60 deletions(-) commit a603002eea8213eec5211be5a85db8340aea06d0 Author: Juergen Gross Date: Wed Jun 22 08:38:36 2022 +0200 virtio: replace restricted mem access flag with callback Instead of having a global flag to require restricted memory access for all virtio devices, introduce a callback which can select that requirement on a per-device basis. For convenience add a common function returning always true, which can be used for use cases like SEV. Per default use a callback always returning false. As the callback needs to be set in early init code already, add a virtio anchor which is builtin in case virtio is enabled. Signed-off-by: Juergen Gross Tested-by: Oleksandr Tyshchenko # Arm64 guest using Xen Reviewed-by: Stefano Stabellini Link: https://lore.kernel.org/r/20220622063838.8854-2-jgross@suse.com Signed-off-by: Juergen Gross arch/s390/mm/init.c | 4 ++-- arch/x86/mm/mem_encrypt_amd.c | 4 ++-- drivers/virtio/Kconfig | 4 ++++ drivers/virtio/Makefile | 1 + drivers/virtio/virtio.c | 4 ++-- drivers/virtio/virtio_anchor.c | 18 ++++++++++++++++++ include/linux/platform-feature.h | 6 +----- include/linux/virtio_anchor.h | 19 +++++++++++++++++++ include/xen/xen.h | 4 ++-- 9 files changed, 51 insertions(+), 13 deletions(-) commit 8441dac05e7f346abc4f63a15d4af0adeabfaa9b Author: Zhang Jiaming Date: Thu Jun 30 15:50:27 2022 +0800 xen: Fix spelling mistake Change 'maped' to 'mapped'. Change 'unmaped' to 'unmapped'. Signed-off-by: Zhang Jiaming Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20220630075027.68833-1-jiaming@nfschina.com Signed-off-by: Juergen Gross drivers/xen/xen-front-pgdir-shbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 67f43c9c6a47776493f790f5ee03d76974e1b39d Author: Ross Lagerwall Date: Mon Jun 27 15:28:22 2022 +0100 xen/manage: Use orderly_reboot() to reboot Currently when the toolstack issues a reboot, it gets translated into a call to ctrl_alt_del(). But tying reboot to ctrl-alt-del means rebooting may fail if e.g. the user has masked the ctrl-alt-del.target under systemd. A previous attempt to fix this issue made a change that sets the kernel.ctrl-alt-del sysctl to 1 before ctrl_alt_del() is called. However, this doesn't give userspace the opportunity to block rebooting or even do any cleanup or syncing. Instead, call orderly_reboot() which will call the "reboot" command, giving userspace the opportunity to block it or perform the usual reboot process while being independent of the ctrl-alt-del behaviour. It also matches what happens in the shutdown case. Signed-off-by: Ross Lagerwall Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20220627142822.3612106-1-ross.lagerwall@citrix.com Signed-off-by: Juergen Gross drivers/xen/manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 824d4f64c20093275f72fc8101394d75ff6a249e Author: Hyunchul Lee Date: Thu Jul 28 21:58:53 2022 +0900 ksmbd: prevent out of bound read for SMB2_TREE_CONNNECT if Status is not 0 and PathLength is long, smb_strndup_from_utf16 could make out of bound read in smb2_tree_connnect. This bug can lead an oops looking something like: [ 1553.882047] BUG: KASAN: slab-out-of-bounds in smb_strndup_from_utf16+0x469/0x4c0 [ksmbd] [ 1553.882064] Read of size 2 at addr ffff88802c4eda04 by task kworker/0:2/42805 ... [ 1553.882095] Call Trace: [ 1553.882098] [ 1553.882101] dump_stack_lvl+0x49/0x5f [ 1553.882107] print_report.cold+0x5e/0x5cf [ 1553.882112] ? smb_strndup_from_utf16+0x469/0x4c0 [ksmbd] [ 1553.882122] kasan_report+0xaa/0x120 [ 1553.882128] ? smb_strndup_from_utf16+0x469/0x4c0 [ksmbd] [ 1553.882139] __asan_report_load_n_noabort+0xf/0x20 [ 1553.882143] smb_strndup_from_utf16+0x469/0x4c0 [ksmbd] [ 1553.882155] ? smb_strtoUTF16+0x3b0/0x3b0 [ksmbd] [ 1553.882166] ? __kmalloc_node+0x185/0x430 [ 1553.882171] smb2_tree_connect+0x140/0xab0 [ksmbd] [ 1553.882185] handle_ksmbd_work+0x30e/0x1020 [ksmbd] [ 1553.882197] process_one_work+0x778/0x11c0 [ 1553.882201] ? _raw_spin_lock_irq+0x8e/0xe0 [ 1553.882206] worker_thread+0x544/0x1180 [ 1553.882209] ? __cpuidle_text_end+0x4/0x4 [ 1553.882214] kthread+0x282/0x320 [ 1553.882218] ? process_one_work+0x11c0/0x11c0 [ 1553.882221] ? kthread_complete_and_exit+0x30/0x30 [ 1553.882225] ret_from_fork+0x1f/0x30 [ 1553.882231] There is no need to check error request validation in server. This check allow invalid requests not to validate message. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-17818 Signed-off-by: Hyunchul Lee Acked-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/smb2misc.c | 5 ----- 1 file changed, 5 deletions(-) commit ac60778b87e45576d7bfdbd6f53df902654e6f09 Author: Hyunchul Lee Date: Thu Jul 28 23:41:51 2022 +0900 ksmbd: prevent out of bound read for SMB2_WRITE OOB read memory can be written to a file, if DataOffset is 0 and Length is too large in SMB2_WRITE request of compound request. To prevent this, when checking the length of the data area of SMB2_WRITE in smb2_get_data_area_len(), let the minimum of DataOffset be the size of SMB2 header + the size of SMB2_WRITE header. This bug can lead an oops looking something like: [ 798.008715] BUG: KASAN: slab-out-of-bounds in copy_page_from_iter_atomic+0xd3d/0x14b0 [ 798.008724] Read of size 252 at addr ffff88800f863e90 by task kworker/0:2/2859 ... [ 798.008754] Call Trace: [ 798.008756] [ 798.008759] dump_stack_lvl+0x49/0x5f [ 798.008764] print_report.cold+0x5e/0x5cf [ 798.008768] ? __filemap_get_folio+0x285/0x6d0 [ 798.008774] ? copy_page_from_iter_atomic+0xd3d/0x14b0 [ 798.008777] kasan_report+0xaa/0x120 [ 798.008781] ? copy_page_from_iter_atomic+0xd3d/0x14b0 [ 798.008784] kasan_check_range+0x100/0x1e0 [ 798.008788] memcpy+0x24/0x60 [ 798.008792] copy_page_from_iter_atomic+0xd3d/0x14b0 [ 798.008795] ? pagecache_get_page+0x53/0x160 [ 798.008799] ? iov_iter_get_pages_alloc+0x1590/0x1590 [ 798.008803] ? ext4_write_begin+0xfc0/0xfc0 [ 798.008807] ? current_time+0x72/0x210 [ 798.008811] generic_perform_write+0x2c8/0x530 [ 798.008816] ? filemap_fdatawrite_wbc+0x180/0x180 [ 798.008820] ? down_write+0xb4/0x120 [ 798.008824] ? down_write_killable+0x130/0x130 [ 798.008829] ext4_buffered_write_iter+0x137/0x2c0 [ 798.008833] ext4_file_write_iter+0x40b/0x1490 [ 798.008837] ? __fsnotify_parent+0x275/0xb20 [ 798.008842] ? __fsnotify_update_child_dentry_flags+0x2c0/0x2c0 [ 798.008846] ? ext4_buffered_write_iter+0x2c0/0x2c0 [ 798.008851] __kernel_write+0x3a1/0xa70 [ 798.008855] ? __x64_sys_preadv2+0x160/0x160 [ 798.008860] ? security_file_permission+0x4a/0xa0 [ 798.008865] kernel_write+0xbb/0x360 [ 798.008869] ksmbd_vfs_write+0x27e/0xb90 [ksmbd] [ 798.008881] ? ksmbd_vfs_read+0x830/0x830 [ksmbd] [ 798.008892] ? _raw_read_unlock+0x2a/0x50 [ 798.008896] smb2_write+0xb45/0x14e0 [ksmbd] [ 798.008909] ? __kasan_check_write+0x14/0x20 [ 798.008912] ? _raw_spin_lock_bh+0xd0/0xe0 [ 798.008916] ? smb2_read+0x15e0/0x15e0 [ksmbd] [ 798.008927] ? memcpy+0x4e/0x60 [ 798.008931] ? _raw_spin_unlock+0x19/0x30 [ 798.008934] ? ksmbd_smb2_check_message+0x16af/0x2350 [ksmbd] [ 798.008946] ? _raw_spin_lock_bh+0xe0/0xe0 [ 798.008950] handle_ksmbd_work+0x30e/0x1020 [ksmbd] [ 798.008962] process_one_work+0x778/0x11c0 [ 798.008966] ? _raw_spin_lock_irq+0x8e/0xe0 [ 798.008970] worker_thread+0x544/0x1180 [ 798.008973] ? __cpuidle_text_end+0x4/0x4 [ 798.008977] kthread+0x282/0x320 [ 798.008982] ? process_one_work+0x11c0/0x11c0 [ 798.008985] ? kthread_complete_and_exit+0x30/0x30 [ 798.008989] ret_from_fork+0x1f/0x30 [ 798.008995] Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-17817 Signed-off-by: Hyunchul Lee Acked-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/smb2misc.c | 7 +++++-- fs/ksmbd/smb2pdu.c | 8 +++----- 2 files changed, 8 insertions(+), 7 deletions(-) commit cf6531d98190fa2cf92a6d8bbc8af0a4740a223c Author: Namjae Jeon Date: Thu Jul 28 21:57:08 2022 +0900 ksmbd: fix use-after-free bug in smb2_tree_disconect smb2_tree_disconnect() freed the struct ksmbd_tree_connect, but it left the dangling pointer. It can be accessed again under compound requests. This bug can lead an oops looking something link: [ 1685.468014 ] BUG: KASAN: use-after-free in ksmbd_tree_conn_disconnect+0x131/0x160 [ksmbd] [ 1685.468068 ] Read of size 4 at addr ffff888102172180 by task kworker/1:2/4807 ... [ 1685.468130 ] Call Trace: [ 1685.468132 ] [ 1685.468135 ] dump_stack_lvl+0x49/0x5f [ 1685.468141 ] print_report.cold+0x5e/0x5cf [ 1685.468145 ] ? ksmbd_tree_conn_disconnect+0x131/0x160 [ksmbd] [ 1685.468157 ] kasan_report+0xaa/0x120 [ 1685.468194 ] ? ksmbd_tree_conn_disconnect+0x131/0x160 [ksmbd] [ 1685.468206 ] __asan_report_load4_noabort+0x14/0x20 [ 1685.468210 ] ksmbd_tree_conn_disconnect+0x131/0x160 [ksmbd] [ 1685.468222 ] smb2_tree_disconnect+0x175/0x250 [ksmbd] [ 1685.468235 ] handle_ksmbd_work+0x30e/0x1020 [ksmbd] [ 1685.468247 ] process_one_work+0x778/0x11c0 [ 1685.468251 ] ? _raw_spin_lock_irq+0x8e/0xe0 [ 1685.468289 ] worker_thread+0x544/0x1180 [ 1685.468293 ] ? __cpuidle_text_end+0x4/0x4 [ 1685.468297 ] kthread+0x282/0x320 [ 1685.468301 ] ? process_one_work+0x11c0/0x11c0 [ 1685.468305 ] ? kthread_complete_and_exit+0x30/0x30 [ 1685.468309 ] ret_from_fork+0x1f/0x30 Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-17816 Signed-off-by: Namjae Jeon Reviewed-by: Hyunchul Lee Signed-off-by: Steve French fs/ksmbd/smb2pdu.c | 1 + 1 file changed, 1 insertion(+) commit aa7253c2393f6dcd6a1468b0792f6da76edad917 Author: Namjae Jeon Date: Thu Jul 28 21:56:19 2022 +0900 ksmbd: fix memory leak in smb2_handle_negotiate The allocated memory didn't free under an error path in smb2_handle_negotiate(). Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-17815 Signed-off-by: Namjae Jeon Reviewed-by: Hyunchul Lee Signed-off-by: Steve French fs/ksmbd/smb2pdu.c | 4 ++++ 1 file changed, 4 insertions(+) commit af7c39d971e43cd0af488729bca362427ad99488 Author: Namjae Jeon Date: Mon Jul 25 13:36:52 2022 +0900 ksmbd: fix racy issue while destroying session on multichannel After multi-channel connection with windows, Several channels of session are connected. Among them, if there is a problem in one channel, Windows connects again after disconnecting the channel. In this process, the session is released and a kernel oop can occurs while processing requests to other channels. When the channel is disconnected, if other channels still exist in the session after deleting the channel from the channel list in the session, the session should not be released. Finally, the session will be released after all channels are disconnected. Signed-off-by: Namjae Jeon Reviewed-by: Hyunchul Lee Signed-off-by: Steve French fs/ksmbd/auth.c | 56 +++++++++++++++++++----------------- fs/ksmbd/auth.h | 11 +++++--- fs/ksmbd/connection.h | 7 ----- fs/ksmbd/mgmt/tree_connect.c | 5 ++-- fs/ksmbd/mgmt/tree_connect.h | 4 ++- fs/ksmbd/mgmt/user_session.c | 67 +++++++++++++++++++++++++++++--------------- fs/ksmbd/mgmt/user_session.h | 7 ++--- fs/ksmbd/oplock.c | 11 ++++---- fs/ksmbd/smb2pdu.c | 21 ++++++-------- fs/ksmbd/smb_common.h | 2 +- fs/ksmbd/vfs.c | 3 +- fs/ksmbd/vfs_cache.c | 2 +- 12 files changed, 110 insertions(+), 86 deletions(-) commit a14c573870a664386adc10526a6c2648ea56dae1 Author: Namjae Jeon Date: Thu Jul 28 23:35:18 2022 +0900 ksmbd: use wait_event instead of schedule_timeout() ksmbd threads eating masses of cputime when connection is disconnected. If connection is disconnected, ksmbd thread waits for pending requests to be processed using schedule_timeout. schedule_timeout() incorrectly is used, and it is more efficient to use wait_event/wake_up than to check r_count every time with timeout. Signed-off-by: Namjae Jeon Reviewed-by: Hyunchul Lee Signed-off-by: Steve French fs/ksmbd/connection.c | 6 +++--- fs/ksmbd/connection.h | 1 + fs/ksmbd/oplock.c | 35 ++++++++++++++++++++++------------- fs/ksmbd/server.c | 8 +++++++- 4 files changed, 33 insertions(+), 17 deletions(-) commit 45fef4c4b9c94e86d9c13f0b2e7e71bb32254509 Author: Guo Ren Date: Sun Jul 31 22:34:24 2022 -0400 csky: abiv1: Fixup compile error LD vmlinux.o arch/csky/lib/string.o: In function `memmove': string.c:(.text+0x108): multiple definition of `memmove' lib/string.o:string.c:(.text+0x7e8): first defined here arch/csky/lib/string.o: In function `memset': string.c:(.text+0x148): multiple definition of `memset' lib/string.o:string.c:(.text+0x2ac): first defined here scripts/Makefile.vmlinux_o:68: recipe for target 'vmlinux.o' failed make[4]: *** [vmlinux.o] Error 1 Fixes: e4df2d5e852a ("csky: Add C based string functions") Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: arch/csky/abiv1/inc/abi/string.h | 6 ++++++ 1 file changed, 6 insertions(+) commit f940dc0f225183ccdba044e87daeeb93398819ad Author: Guo Ren Date: Sun Jul 31 21:57:30 2022 -0400 csky: cmpxchg: Coding convention for BUILD_BUG() Use BUILD_BUG() instead of the custom bad_xchg. Signed-off-by: Guo Ren Signed-off-by: Guo Ren arch/csky/include/asm/cmpxchg.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit df13a3477635414f243d53344bb4b510385e994d Author: Petr Vorel Date: Sun Jul 31 18:03:07 2022 +0200 MAINTAINERS: Add Namjae's exfat git tree Add Namjae's exfat git tree. Signed-off-by: Petr Vorel Signed-off-by: Namjae Jeon MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 512b74d17a93ae580171258a32590b5a4fee5866 Author: Takashi Iwai Date: Tue Jul 26 10:39:29 2022 +0200 exfat: Drop superfluous new line for error messages exfat_err() adds the new line at the end of the message by itself, hence the passed string shouldn't contain a new line. Drop the superfluous newline letters in the error messages in a few places that have been put mistakenly. Reported-by: Joe Perches Signed-off-by: Takashi Iwai Signed-off-by: Namjae Jeon fs/exfat/fatent.c | 2 +- fs/exfat/nls.c | 2 +- fs/exfat/super.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 64fca6e621715fde548ad1a96ac5e6a2f586763a Author: Takashi Iwai Date: Tue Jul 26 10:39:28 2022 +0200 exfat: Downgrade ENAMETOOLONG error message to debug messages The ENAMETOOLONG error message is printed at each time when user tries to operate with a too long name, and this can flood the kernel logs easily, as every user can trigger this. Let's downgrade this error message level to a debug message for suppressing the superfluous logs. BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1201725 Reviewed-by: Petr Vorel Signed-off-by: Takashi Iwai Signed-off-by: Namjae Jeon fs/exfat/nls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6425baabda21748daacc2141169e07e4c2644497 Author: Takashi Iwai Date: Tue Jul 26 10:39:27 2022 +0200 exfat: Expand exfat_err() and co directly to pr_*() macro Currently the error and info messages handled by exfat_err() and co are tossed to exfat_msg() function that does nothing but passes the strings with printk() invocation. Not only that this is more overhead by the indirect calls, but also this makes harder to extend for the debug print usage; because of the direct printk() call, you cannot make it for dynamic debug or without debug like the standard helpers such as pr_debug() or dev_dbg(). For addressing the problem, this patch replaces exfat_*() macro to expand to pr_*() directly. Along with it, add the new exfat_debug() macro that is expanded to pr_debug() (which output can be gracefully suppressed via dyndbg). Reviewed-by: Petr Vorel Signed-off-by: Takashi Iwai Signed-off-by: Namjae Jeon fs/exfat/exfat_fs.h | 12 +++++++----- fs/exfat/misc.c | 17 ----------------- 2 files changed, 7 insertions(+), 22 deletions(-) commit 1b1a9195ae962fefd8d0785e0af434de1a3447fd Author: Takashi Iwai Date: Tue Jul 26 10:39:26 2022 +0200 exfat: Define NLS_NAME_* as bit flags explicitly NLS_NAME_* are bit flags although they are currently defined as enum; it's casually working so far (from 0 to 2), but it's error-prone and may bring a problem when we want to add more flag. This patch changes the definitions of NLS_NAME_* explicitly being bit flags. Reviewed-by: Petr Vorel Signed-off-by: Takashi Iwai Signed-off-by: Namjae Jeon fs/exfat/exfat_fs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 86da53e8ff5dcfbbbd345edc0caef7d21ce567ae Author: Takashi Iwai Date: Tue Jul 26 10:39:25 2022 +0200 exfat: Return ENAMETOOLONG consistently for oversized paths LTP has a test for oversized file path renames and it expects the return value to be ENAMETOOLONG. However, exfat returns EINVAL unexpectedly in some cases, hence LTP test fails. The further investigation indicated that the problem happens only when iocharset isn't set to utf8. The difference comes from that, in the case of utf8, exfat_utf8_to_utf16() returns the error -ENAMETOOLONG directly and it's treated as the final error code. Meanwhile, on other iocharsets, exfat_nls_to_ucs2() returns the max path size but it sets NLS_NAME_OVERLEN to lossy flag instead; the caller side checks only whether lossy flag is set or not, resulting in always -EINVAL unconditionally. This patch aligns the return code for both cases by checking the lossy flag bit and returning ENAMETOOLONG when NLS_NAME_OVERLEN bit is set. BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1201725 Reviewed-by: Petr Vorel Signed-off-by: Takashi Iwai Signed-off-by: Namjae Jeon fs/exfat/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be17b1ccd4e82a66b9d9676dec8edce137e967d8 Author: Yuezhang Mo Date: Wed Jun 29 11:05:51 2022 +0800 exfat: remove duplicate write inode for extending dir/file Since the timestamps need to be updated, the directory entries will be updated by mark_inode_dirty() whether or not a new cluster is allocated for the file or directory, so there is no need to use __exfat_write_inode() to update the directory entries when allocating a new cluster for a file or directory. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Daniel Palmer Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/inode.c | 9 +-------- fs/exfat/namei.c | 4 ---- 2 files changed, 1 insertion(+), 12 deletions(-) commit 4493895b2bdcca135a8e7c1384deaa35316e8e22 Author: Yuezhang Mo Date: Wed Jun 29 10:39:59 2022 +0800 exfat: remove duplicate write inode for truncating file This commit moves updating file attributes and timestamps before calling __exfat_write_inode(), so that all updates of the inode had been written by __exfat_write_inode(), mark_inode_dirty() is unneeded. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Daniel Palmer Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/file.c | 37 ++++++++++++++++++++++++------------- fs/exfat/inode.c | 1 + 2 files changed, 25 insertions(+), 13 deletions(-) commit 23e6e1c9b373c164bf25d89c901eed2ac0d898a1 Author: Yuezhang Mo Date: Wed Jun 29 09:51:40 2022 +0800 exfat: reuse __exfat_write_inode() to update directory entry __exfat_write_inode() is used to update file and stream directory entries, except for file->start_clu and stream->flags. This commit moves update file->start_clu and stream->flags to __exfat_write_inode() and reuse __exfat_write_inode() to update directory entries. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Daniel Palmer Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/exfat_fs.h | 1 + fs/exfat/file.c | 47 +++-------------------------------------------- fs/exfat/inode.c | 37 +++++++++++-------------------------- fs/exfat/namei.c | 24 ++++-------------------- 4 files changed, 19 insertions(+), 90 deletions(-) commit dd0b15bda48f59eb7dee17fab91eda8389f0e98d Author: Andreas Schwab Date: Tue Jul 26 10:01:22 2022 +0200 rtla: Define syscall numbers for riscv RISC-V uses the same (generic) syscall numbers as ARM64. Link: https://lkml.kernel.org/r/mvma68wl2ul.fsf@suse.de Signed-off-by: Andreas Schwab Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f753c3be52c1d930afc0fe3169baa605dbaf611 Author: Andreas Schwab Date: Mon Jul 25 17:12:18 2022 +0200 rtla: Fix double free Avoid double free by making trace_instance_destroy indempotent. When trace_instance_init fails, it calls trace_instance_destroy, but its only caller osnoise_destroy_tool calls it again. Link: https://lkml.kernel.org/r/mvmilnlkyzx.fsf_-_@suse.de Fixes: 0605bf009f18 ("rtla: Add osnoise tool") Signed-off-by: Andreas Schwab Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/src/trace.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit c7d8a598c5b1e21a0957f5dec2ef4139d2d1a23a Author: Daniel Bristot de Oliveira Date: Wed Jul 13 23:32:19 2022 +0200 rtla: Fix Makefile when called from -C tools/ Sedat Dilek reported an error on rtla Makefile when running: $ make -C tools/ clean [...] make[2]: Entering directory '/home/dileks/src/linux-kernel/git/tools/tracing/rtla' [...] '/home/dileks/src/linux-kernel/git/Documentation/tools/rtla' /bin/sh: 1: test: rtla-make[2]:: unexpected operator <------ The problem rm: cannot remove '/home/dileks/src/linux-kernel/git': Is a directory make[2]: *** [Makefile:120: clean] Error 1 make[2]: Leaving directory This occurred because the rtla calls kernel's Makefile to get the version in silence mode, e.g., $ make -sC ../../.. kernelversion 5.19.0-rc4 But the -s is being ignored when rtla's makefile is called indirectly, so the output looks like this: $ make -C ../../.. kernelversion make: Entering directory '/root/linux' 5.19.0-rc4 make: Leaving directory '/root/linux' Using 'grep -v make' avoids this problem, e.g., $ make -C ../../.. kernelversion | grep -v make 5.19.0-rc4 Thus, add | grep -v make. Link: https://lkml.kernel.org/r/870c02d4d97a921f02a31fa3b229fc549af61a20.1657747763.git.bristot@kernel.org Fixes: 8619e32825fd ("rtla: Follow kernel version") Reported-by: Sedat Dilek Tested-by: Sedat Dilek Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c3d2f9388d36eb28640a220a6f908328442d873 Author: Steven Rostedt (Google) Date: Sun Jul 31 01:59:28 2022 -0400 tracing: Use a struct alignof to determine trace event field alignment alignof() gives an alignment of types as they would be as standalone variables. But alignment in structures might be different, and when building the fields of events, the alignment must be the actual alignment otherwise the field offsets may not match what they actually are. This caused trace-cmd to crash, as libtraceevent did not check if the field offset was bigger than the event. The write_msr and read_msr events on 32 bit had their fields incorrect, because it had a u64 field between two ints. alignof(u64) would give 8, but the u64 field was at a 4 byte alignment. Define a macro as: ALIGN_STRUCTFIELD(type) ((int)(offsetof(struct {char a; type b;}, b))) which gives the actual alignment of types in a structure. Link: https://lkml.kernel.org/r/20220731015928.7ab3a154@rorschach.local.home Cc: Ingo Molnar Cc: Andrew Morton Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Masami Hiramatsu Cc: stable@vger.kernel.org Fixes: 04ae87a52074e ("ftrace: Rework event_create_dir()") Signed-off-by: Steven Rostedt (Google) include/trace/stages/stage4_event_fields.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 7b584fbb36362340a2d9cfe459e447619eecebea Author: Christophe JAILLET Date: Sun Jul 31 08:32:52 2022 +0200 can: can327: fix a broken link to Documentation Since commit 482a4360c56a ("docs: networking: convert netdevices.txt to ReST"), Documentation/networking/netdevices.txt has been replaced by Documentation/networking/netdevices.rst. Update the comment accordingly to avoid a 'make htmldocs' warning. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/all/6a54aff884ea4f84b661527d75aabd6632140715.1659249135.git.christophe.jaillet@wanadoo.fr Fixes: 43da2f07622f ("can: can327: CAN/ldisc driver for ELM327 based OBD-II adapters") Signed-off-by: Marc Kleine-Budde drivers/net/can/can327.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e9466a5d0604e20082d828008047b3165592caf Author: Xie Shaowen Date: Sun Jul 31 09:20:25 2022 -0700 xfs: delete extra space and tab in blank line delete extra space and tab in blank line, there is no functional change. Reported-by: Hacash Robot Signed-off-by: Xie Shaowen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_extfree_item.c | 12 ++++++------ fs/xfs/xfs_log.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 001c179c4e26d04db8c9f5e3fef9558b58356be6 Author: ChenXiaoSong Date: Wed Jul 27 17:21:52 2022 -0700 xfs: fix NULL pointer dereference in xfs_getbmap() Reproducer: 1. fallocate -l 100M image 2. mkfs.xfs -f image 3. mount image /mnt 4. setxattr("/mnt", "trusted.overlay.upper", NULL, 0, XATTR_CREATE) 5. char arg[32] = "\x01\xff\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x08\x00\x00\x00\xc6\x2a\xf7"; fd = open("/mnt", O_RDONLY|O_DIRECTORY); ioctl(fd, _IOC(_IOC_READ|_IOC_WRITE, 0x58, 0x2c, 0x20), arg); NULL pointer dereference will occur when race happens between xfs_getbmap() and xfs_bmap_set_attrforkoff(): ioctl | setxattr ----------------------------|--------------------------- xfs_getbmap | xfs_ifork_ptr | xfs_inode_has_attr_fork | ip->i_forkoff == 0 | return NULL | ifp == NULL | | xfs_bmap_set_attrforkoff | ip->i_forkoff > 0 xfs_inode_has_attr_fork | ip->i_forkoff > 0 | ifp == NULL | ifp->if_format | Fix this by locking i_lock before xfs_ifork_ptr(). Fixes: abbf9e8a4507 ("xfs: rewrite getbmap using the xfs_iext_* helpers") Signed-off-by: ChenXiaoSong Signed-off-by: Guo Xuenan Reviewed-by: Darrick J. Wong [djwong: added fixes tag] Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit ecce9212d0fd7a2d4a4998f0c4623a66887e14c8 Author: Hongnan Li Date: Fri Jul 22 16:27:32 2022 +0800 erofs: update ctx->pos for every emitted dirent erofs_readdir update ctx->pos after filling a batch of dentries and it may cause dir/files duplication for NFS readdirplus which depends on ctx->pos to fill dir correctly. So update ctx->pos for every emitted dirent in erofs_fill_dentries to fix it. Also fix the update of ctx->pos when the initial file position has exceeded nameoff. Fixes: 3e917cc305c6 ("erofs: make filesystem exportable") Signed-off-by: Hongnan Li Signed-off-by: Jeffle Xu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20220722082732.30935-1-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang fs/erofs/dir.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 7f8030cea33001d08cdaf2ee5a24385b2c3f723e Author: Guo Ren Date: Sat Jul 23 22:52:17 2022 -0400 csky: Enable ARCH_INLINE_READ*/WRITE*/SPIN* Enable ARCH_INLINE_READ*/WRITE*/SPIN* when !PREEMPTION, it is copied from arch/arm64. It could reduce procedure calls and improves performance. Signed-off-by: Guo Ren Signed-off-by: Guo Ren arch/csky/Kconfig | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 45e15c1a375ea380d55880be2f8182cb737b60ed Author: Guo Ren Date: Sat Jul 23 21:32:34 2022 -0400 csky: Add qspinlock support Enable qspinlock by the requirements mentioned in a8ad07e5240c9 ("asm-generic: qspinlock: Indicate the use of mixed-size atomics"). C-SKY only has "ldex/stex" for all atomic operations. So csky give a strong forward guarantee for "ldex/stex." That means when ldex grabbed the cache line into $L1, it would block other cores from snooping the address with several cycles. The atomic_fetch_add & xchg16 has the same forward guarantee level in C-SKY. Qspinlock has better code size and performance in a fast path. Signed-off-by: Guo Ren Signed-off-by: Guo Ren arch/csky/Kconfig | 1 + arch/csky/include/asm/Kbuild | 4 ++-- arch/csky/include/asm/cmpxchg.h | 20 ++++++++++++++++++++ arch/csky/include/asm/spinlock.h | 12 ++++++++++++ arch/csky/include/asm/spinlock_types.h | 9 +++++++++ 5 files changed, 44 insertions(+), 2 deletions(-) commit 87f600af59e8cf6abb04bac15328bcb517e26485 Author: Phillip Potter Date: Sun Jul 31 00:59:10 2022 +0100 staging: r8188eu: fix potential uninitialised variable use in rtw_pwrctrl.c Set ret to 0 (success) before entering first if statement, thereby assuring that even if the device is not associated and further checks pass, we do not then end up returning the uninitialized value of ret. This assignment is deliberately now directly before the if statement, in order to keep it clear what is happening as opposed to having it as an initialization at the start of the function like it was originally. Also add a comment to make it clear this first if block is currently a success path. As a side note, smatch does not trigger warnings for this change, for me at least. Within core/rtw_pwrctrl.c in the rtw_pwr_wakeup function, I previously dropped the initialization of 'ret' (int ret = 0;) in favour of its assignment which happens inside the first if block directly before its corresponding goto. This was the cause of this bug, and was introduced by: commit f3a76018dd55 ("staging: r8188eu: remove initializer from ret in rtw_pwr_wakeup"). Fixes: f3a76018dd55 ("staging: r8188eu: remove initializer from ret in rtw_pwr_wakeup") Reported-by: kernel test robot Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20220730235910.1145-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_pwrctrl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5316d73ba81b5dd7fe5ecfcd4ad494a0a68ae138 Author: Sven Peter Date: Thu Jun 2 19:42:13 2022 +0200 arm64: dts: apple: t8103: Add ANS2 NVMe nodes This allows using the internal disk attached via NVMe. Signed-off-by: Sven Peter Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/t8103.dtsi | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit be561ffad708f0cee18aee4231f80ffafaf7a419 Author: Tim Crawford Date: Sat Jul 30 21:22:43 2022 -0600 ALSA: hda/realtek: Add quirk for Clevo NV45PZ Fixes headset detection on Clevo NV45PZ. Signed-off-by: Tim Crawford Cc: Link: https://lore.kernel.org/r/20220731032243.4300-1-tcrawford@system76.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 09beadf289d6e300553e60d6e76f13c0427ecab3 Author: Chao Yu Date: Wed Jul 27 22:51:05 2022 +0800 f2fs: fix to do sanity check on segment type in build_sit_entries() As Wenqing Liu reported in bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=216285 RIP: 0010:memcpy_erms+0x6/0x10 f2fs_update_meta_page+0x84/0x570 [f2fs] change_curseg.constprop.0+0x159/0xbd0 [f2fs] f2fs_do_replace_block+0x5c7/0x18a0 [f2fs] f2fs_replace_block+0xeb/0x180 [f2fs] recover_data+0x1abd/0x6f50 [f2fs] f2fs_recover_fsync_data+0x12ce/0x3250 [f2fs] f2fs_fill_super+0x4459/0x6190 [f2fs] mount_bdev+0x2cf/0x3b0 legacy_get_tree+0xed/0x1d0 vfs_get_tree+0x81/0x2b0 path_mount+0x47e/0x19d0 do_mount+0xce/0xf0 __x64_sys_mount+0x12c/0x1a0 do_syscall_64+0x38/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd The root cause is segment type is invalid, so in f2fs_do_replace_block(), f2fs accesses f2fs_sm_info::curseg_array with out-of-range segment type, result in accessing invalid curseg->sum_blk during memcpy in f2fs_update_meta_page(). Fix this by adding sanity check on segment type in build_sit_entries(). Reported-by: Wenqing Liu Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 7b01ad7f339e0a272ba840d0bafd5dfbb4e4d501 Author: Chao Yu Date: Mon Jul 25 00:04:17 2022 +0800 f2fs: obsolete unused MAX_DISCARD_BLOCKS After commit a7eeb823854c ("f2fs: use bitmap in discard_entry"), MAX_DISCARD_BLOCKS became obsolete, remove it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 1 - 1 file changed, 1 deletion(-) commit 141170b759e03958f296033bb7001be62d1d363b Author: Chao Yu Date: Mon Jul 25 00:03:23 2022 +0800 f2fs: fix to avoid use f2fs_bug_on() in f2fs_new_node_page() As Dipanjan Das reported, syzkaller found a f2fs bug as below: RIP: 0010:f2fs_new_node_page+0x19ac/0x1fc0 fs/f2fs/node.c:1295 Call Trace: write_all_xattrs fs/f2fs/xattr.c:487 [inline] __f2fs_setxattr+0xe76/0x2e10 fs/f2fs/xattr.c:743 f2fs_setxattr+0x233/0xab0 fs/f2fs/xattr.c:790 f2fs_xattr_generic_set+0x133/0x170 fs/f2fs/xattr.c:86 __vfs_setxattr+0x115/0x180 fs/xattr.c:182 __vfs_setxattr_noperm+0x125/0x5f0 fs/xattr.c:216 __vfs_setxattr_locked+0x1cf/0x260 fs/xattr.c:277 vfs_setxattr+0x13f/0x330 fs/xattr.c:303 setxattr+0x146/0x160 fs/xattr.c:611 path_setxattr+0x1a7/0x1d0 fs/xattr.c:630 __do_sys_lsetxattr fs/xattr.c:653 [inline] __se_sys_lsetxattr fs/xattr.c:649 [inline] __x64_sys_lsetxattr+0xbd/0x150 fs/xattr.c:649 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 NAT entry and nat bitmap can be inconsistent, e.g. one nid is free in nat bitmap, and blkaddr in its NAT entry is not NULL_ADDR, it may trigger BUG_ON() in f2fs_new_node_page(), fix it. Reported-by: Dipanjan Das Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8ee236dcaa690d09ca612622e8bc8d09c302021d Author: Chao Liu Date: Mon Jul 25 18:16:33 2022 +0800 f2fs: fix to remove F2FS_COMPR_FL and tag F2FS_NOCOMP_FL at the same time If the inode has the compress flag, it will fail to use 'chattr -c +m' to remove its compress flag and tag no compress flag. However, the same command will be successful when executed again, as shown below: $ touch foo.txt $ chattr +c foo.txt $ chattr -c +m foo.txt chattr: Invalid argument while setting flags on foo.txt $ chattr -c +m foo.txt $ f2fs_io getflags foo.txt get a flag on foo.txt ret=0, flags=nocompression,inline_data Fix this by removing some checks in f2fs_setflags_common() that do not affect the original logic. I go through all the possible scenarios, and the results are as follows. Bold is the only thing that has changed. +---------------+-----------+-----------+----------+ | | file flags | + command +-----------+-----------+----------+ | | no flag | compr | nocompr | +---------------+-----------+-----------+----------+ | chattr +c | compr | compr | -EINVAL | | chattr -c | no flag | no flag | nocompr | | chattr +m | nocompr | -EINVAL | nocompr | | chattr -m | no flag | compr | no flag | | chattr +c +m | -EINVAL | -EINVAL | -EINVAL | | chattr +c -m | compr | compr | compr | | chattr -c +m | nocompr | *nocompr* | nocompr | | chattr -c -m | no flag | no flag | no flag | +---------------+-----------+-----------+----------+ Link: https://lore.kernel.org/linux-f2fs-devel/20220621064833.1079383-1-chaoliu719@gmail.com/ Fixes: 4c8ff7095bef ("f2fs: support data compression") Reviewed-by: Chao Yu Signed-off-by: Chao Liu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit f8e2f32bcde5945e8f8dbb8714178c24d221366b Author: Daeho Jeong Date: Mon Jul 18 16:02:48 2022 -0700 f2fs: introduce sysfs atomic write statistics introduce the below 4 new sysfs node for atomic write statistics. - current_atomic_write: the total current atomic write block count, which is not committed yet. - peak_atomic_write: the peak value of total current atomic write block count after boot. - committed_atomic_block: the accumulated total committed atomic write block count after boot. - revoked_atomic_block: the accumulated total revoked atomic write block count after boot. Signed-off-by: Daeho Jeong Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 24 +++++++++++++++++ fs/f2fs/data.c | 7 ++--- fs/f2fs/f2fs.h | 30 +++++++++++++++++++++ fs/f2fs/file.c | 1 + fs/f2fs/segment.c | 6 +++++ fs/f2fs/super.c | 1 + fs/f2fs/sysfs.c | 46 +++++++++++++++++++++++++++++++++ 7 files changed, 112 insertions(+), 3 deletions(-) commit 1adaa71ea9bff3a0ca0b37eabbb7f89225b595cb Author: qixiaoyu1 Date: Mon Jul 18 11:28:40 2022 +0800 f2fs: don't bother wait_ms by foreground gc f2fs_gc returns -EINVAL via f2fs_balance_fs when there is enough free secs after write checkpoint, but with gc_merge enabled, it will cause the sleep time of gc thread to be set to no_gc_sleep_time even if there are many dirty segments can be selected. Signed-off-by: qixiaoyu1 Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0d5b9d8156396bbe1c982708b38ab9e188c45ec9 Author: Chao Yu Date: Tue Jul 12 23:26:43 2022 +0800 f2fs: invalidate meta pages only for post_read required inode After commit e3b49ea36802 ("f2fs: invalidate META_MAPPING before IPU/DIO write"), invalidate_mapping_pages() will be called to avoid race condition in between IPU/DIO and readahead for GC. However, readahead flow is only used for post_read required inode, so this patch adds check condition to avoids unnecessary page cache invalidating for non-post_read inode. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 8 ++------ fs/f2fs/f2fs.h | 1 + fs/f2fs/segment.c | 9 ++++++++- 3 files changed, 11 insertions(+), 7 deletions(-) commit a8634ccf5d626506100bb753327e36e6c6b3df70 Author: Chao Liu Date: Thu Jul 7 17:09:24 2022 +0800 f2fs: allow compression of files without blocks Files created by truncate(1) have a size but no blocks, so they can be allowed to enable compression. Signed-off-by: Chao Liu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7165841d578e0592848e09dc9d131aa30be44e1b Author: Chao Yu Date: Tue Jul 12 11:17:15 2022 +0800 f2fs: fix to check inline_data during compressed inode conversion When converting inode to compressed one via ioctl, it needs to check inline_data, since inline_data flag and compressed flag are incompatible. Fixes: 4c8ff7095bef ("f2fs: support data compression") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1dd55358efc4f74e49fa9e1e97a03804852a4c20 Author: Fabio M. De Francesco Date: Sun Jul 17 10:36:13 2022 +0200 f2fs: Delete f2fs_copy_page() and replace with memcpy_page() f2fs_copy_page() is a wrapper around two kmap() + one memcpy() from/to the mapped pages. It unnecessarily duplicates a kernel API and it makes use of kmap(), which is being deprecated in favor of kmap_local_page(). Two main problems with kmap(): (1) It comes with an overhead as mapping space is restricted and protected by a global lock for synchronization and (2) it also requires global TLB invalidation when the kmap’s pool wraps and it might block when the mapping space is fully utilized until a slot becomes available. With kmap_local_page() the mappings are per thread, CPU local, can take page faults, and can be called from any context (including interrupts). It is faster than kmap() in kernels with HIGHMEM enabled. Therefore, its use in __clone_blkaddrs() is safe and should be preferred. Delete f2fs_copy_page() and use a plain memcpy_page() in the only one site calling the removed function. memcpy_page() avoids open coding two kmap_local_page() + one memcpy() between the two kernel virtual addresses. Suggested-by: Christoph Hellwig Suggested-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Reviewed-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 10 ---------- fs/f2fs/file.c | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) commit 67ca06872eb02944b4c6f92cffa9242e92c63109 Author: Chao Yu Date: Wed Jul 6 14:30:15 2022 +0800 f2fs: fix to invalidate META_MAPPING before DIO write Quoted from commit e3b49ea36802 ("f2fs: invalidate META_MAPPING before IPU/DIO write") " Encrypted pages during GC are read and cached in META_MAPPING. However, due to cached pages in META_MAPPING, there is an issue where newly written pages are lost by IPU or DIO writes. Thread A - f2fs_gc() Thread B /* phase 3 */ down_write(i_gc_rwsem) ra_data_block() ---- (a) up_write(i_gc_rwsem) f2fs_direct_IO() : - down_read(i_gc_rwsem) - __blockdev_direct_io() - get_data_block_dio_write() - f2fs_dio_submit_bio() ---- (b) - up_read(i_gc_rwsem) /* phase 4 */ down_write(i_gc_rwsem) move_data_block() ---- (c) up_write(i_gc_rwsem) (a) In phase 3 of f2fs_gc(), up-to-date page is read from storage and cached in META_MAPPING. (b) In thread B, writing new data by IPU or DIO write on same blkaddr as read in (a). cached page in META_MAPPING become out-dated. (c) In phase 4 of f2fs_gc(), out-dated page in META_MAPPING is copied to new blkaddr. In conclusion, the newly written data in (b) is lost. To address this issue, invalidating pages in META_MAPPING before IPU or DIO write. " In previous commit, we missed to cover extent cache hit case, and passed wrong value for parameter @end of invalidate_mapping_pages(), fix both issues. Fixes: 6aa58d8ad20a ("f2fs: readahead encrypted block during GC") Fixes: e3b49ea36802 ("f2fs: invalidate META_MAPPING before IPU/DIO write") Cc: Hyeong-Jun Kim Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8e0f54a70e9b0c88d6375933d281d631b7248153 Author: Jaegeuk Kim Date: Tue Jun 28 15:49:47 2022 -0700 f2fs: add a sysfs entry to show zone capacity This patch adds a sysfs entry showing the unusable space in a section made by zone capacity. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++++++ fs/f2fs/sysfs.c | 10 ++++++++++ 2 files changed, 16 insertions(+) commit 074b5ea2900ea8e40f8e7a3fd37e0a55ad3d5874 Author: Jaegeuk Kim Date: Tue Jun 28 11:03:57 2022 -0700 f2fs: adjust zone capacity when considering valid block count This patch fixes counting unusable blocks set by zone capacity when checking the valid block count in a section. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 2 +- fs/f2fs/file.c | 6 +++--- fs/f2fs/gc.c | 4 ++-- fs/f2fs/segment.c | 7 +++---- fs/f2fs/segment.h | 8 ++++---- 5 files changed, 13 insertions(+), 14 deletions(-) commit b771aadc6e4c221a468fe4a2dfcfffec01a06722 Author: Jaegeuk Kim Date: Tue Jun 28 10:57:24 2022 -0700 f2fs: enforce single zone capacity In order to simplify the complicated per-zone capacity, let's support only one capacity for entire zoned device. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 +- fs/f2fs/segment.c | 19 ++++++------------- fs/f2fs/segment.h | 3 +++ fs/f2fs/super.c | 33 ++++++++++++--------------------- 4 files changed, 22 insertions(+), 35 deletions(-) commit 14de5fc3ddf3dee89068a54a4d137fc17c2c971c Author: duguowei Date: Mon Jun 20 21:39:45 2022 +0800 f2fs: remove redundant code for gc condition Remove the redundant code and use local variant as the argument directly. Make it more human-readable. Signed-off-by: duguowei [Jaegeuk Kim: make code neat] Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 7a8fc586180d8c57db5cc1e2acb32bb9986f642b Author: Daeho Jeong Date: Mon Jun 20 10:38:42 2022 -0700 f2fs: introduce memory mode Introduce memory mode to supports "normal" and "low" memory modes. "low" mode is to support low memory devices. Because of the nature of low memory devices, in this mode, f2fs will try to save memory sometimes by sacrificing performance. "normal" mode is the default mode and same as before. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/filesystems/f2fs.rst | 5 +++++ fs/f2fs/f2fs.h | 13 +++++++++++++ fs/f2fs/super.c | 24 ++++++++++++++++++++++++ 3 files changed, 42 insertions(+) commit e625e2238a270df743cbc623b3abad8d0010abc9 Author: Krzysztof Kozlowski Date: Tue Jul 19 09:45:42 2022 +0200 dt-bindings: leds: pwm-multicolor: document max-brigthness The Multicolor PWM LED uses max-brigthness property (in the example and in the driver), so document it to fixi dt_binding_check warning like: leds/leds-pwm-multicolor.example.dtb: led-controller: multi-led: Unevaluated properties are not allowed ('max-brightness' was unexpected) Reported-by: Rob Herring Reviewed-by: Rob Herring Signed-off-by: Krzysztof Kozlowski Signed-off-by: Pavel Machek Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit a01633cd867b8ddf2d8321fe575dc3c54e037b09 Author: Greg Kroah-Hartman Date: Fri Jul 29 16:03:46 2022 +0200 leds: turris-omnia: convert to use dev_groups The driver core supports the ability to handle the creation and removal of device-specific sysfs files in a race-free manner. Take advantage of that by converting this driver to use this by moving the sysfs attributes into a group and assigning the dev_groups pointer to it. Cc: Pavel Machek Cc: linux-leds@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Marek Behún Signed-off-by: Greg Kroah-Hartman Signed-off-by: Pavel Machek drivers/leds/leds-turris-omnia.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e88043c0ac16f19960048372dcffc6df7c05c5b8 Author: Daniel Bristot de Oliveira Date: Fri Jul 29 11:38:55 2022 +0200 rv/reactor: Add the panic reactor Sample reactor that panics the system when an exception is found. This is useful both to capture a vmcore, or to fail-safe a critical system. Link: https://lkml.kernel.org/r/729aae3aba95f35738b8f8180e626d747d1d9da2.1659052063.git.bristot@kernel.org Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Will Deacon Cc: Catalin Marinas Cc: Marco Elver Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Shuah Khan Cc: Gabriele Paoloni Cc: Juri Lelli Cc: Clark Williams Cc: Tao Zhou Cc: Randy Dunlap Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) kernel/trace/rv/Kconfig | 8 ++++++++ kernel/trace/rv/Makefile | 1 + kernel/trace/rv/reactor_panic.c | 43 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) commit 135b881ea88566f27dd4acc5d2ed83ad418a3a69 Author: Daniel Bristot de Oliveira Date: Fri Jul 29 11:38:54 2022 +0200 rv/reactor: Add the printk reactor A reactor that printks the reaction message. Link: https://lkml.kernel.org/r/b65f18a7fd6dc6659a3008fd7b7392de3465d47b.1659052063.git.bristot@kernel.org Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Will Deacon Cc: Catalin Marinas Cc: Marco Elver Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Shuah Khan Cc: Gabriele Paoloni Cc: Juri Lelli Cc: Clark Williams Cc: Tao Zhou Cc: Randy Dunlap Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) kernel/trace/rv/Kconfig | 8 ++++++++ kernel/trace/rv/Makefile | 3 ++- kernel/trace/rv/reactor_printk.c | 42 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) commit ccc319dcb450d57b7befe924453d06804d83ba73 Author: Daniel Bristot de Oliveira Date: Fri Jul 29 11:38:53 2022 +0200 rv/monitor: Add the wwnr monitor Per task wakeup while not running (wwnr) monitor. This model is broken, the reason is that a task can be running in the processor without being set as RUNNABLE. Think about a task about to sleep: 1: set_current_state(TASK_UNINTERRUPTIBLE); 2: schedule(); And then imagine an IRQ happening in between the lines one and two, waking the task up. BOOM, the wakeup will happen while the task is running. Q: Why do we need this model, so? A: To test the reactors. Link: https://lkml.kernel.org/r/473c0fc39967250fdebcff8b620311c11dccad30.1659052063.git.bristot@kernel.org Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Will Deacon Cc: Catalin Marinas Cc: Marco Elver Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Shuah Khan Cc: Gabriele Paoloni Cc: Juri Lelli Cc: Clark Williams Cc: Tao Zhou Cc: Randy Dunlap Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) Documentation/trace/rv/index.rst | 1 + Documentation/trace/rv/monitor_wwnr.rst | 45 +++++++++++++++++ include/trace/events/rv.h | 12 +++++ kernel/trace/rv/Kconfig | 12 +++++ kernel/trace/rv/Makefile | 1 + kernel/trace/rv/monitors/wwnr/wwnr.c | 87 +++++++++++++++++++++++++++++++++ kernel/trace/rv/monitors/wwnr/wwnr.h | 46 +++++++++++++++++ tools/verification/models/wwnr.dot | 16 ++++++ 8 files changed, 220 insertions(+) commit 10bde81c74863472047f31304064018c40f488ee Author: Daniel Bristot de Oliveira Date: Fri Jul 29 11:38:52 2022 +0200 rv/monitor: Add the wip monitor The wakeup in preemptive (wip) monitor verifies if the wakeup events always take place with preemption disabled: | | v #==================# H preemptive H <+ #==================# | | | | preempt_disable | preempt_enable v | sched_waking +------------------+ | +--------------- | | | | | non_preemptive | | +--------------> | | -+ +------------------+ The wakeup event always takes place with preemption disabled because of the scheduler synchronization. However, because the preempt_count and its trace event are not atomic with regard to interrupts, some inconsistencies might happen. The documentation illustrates one of these cases. Link: https://lkml.kernel.org/r/c98ca678df81115fddc04921b3c79720c836b18f.1659052063.git.bristot@kernel.org Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Will Deacon Cc: Catalin Marinas Cc: Marco Elver Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Shuah Khan Cc: Gabriele Paoloni Cc: Juri Lelli Cc: Clark Williams Cc: Tao Zhou Cc: Randy Dunlap Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) Documentation/trace/rv/index.rst | 1 + Documentation/trace/rv/monitor_wip.rst | 55 ++++++++++++++++++++++++++++++++++ include/trace/events/rv.h | 10 +++++++ kernel/trace/rv/Kconfig | 13 ++++++++ kernel/trace/rv/Makefile | 1 + kernel/trace/rv/monitors/wip/wip.c | 51 ++++++++++--------------------- tools/verification/models/wip.dot | 16 ++++++++++ 7 files changed, 111 insertions(+), 36 deletions(-) commit 8812d21219b9c649dd25eb93915e00939944aeb7 Author: Daniel Bristot de Oliveira Date: Fri Jul 29 11:38:51 2022 +0200 rv/monitor: Add the wip monitor skeleton created by dot2k THIS CODE IS NOT LINKED TO THE MAKEFILE. This model does not compile because it lacks the instrumentation part, which will be added next. In the typical case, there will be only one patch, but it was split into two patches for educational purposes. This is the direct output this command line: $ dot2k -d tools/verification/models/wip.dot -t per_cpu Link: https://lkml.kernel.org/r/5eb7a9118917e8a814c5e49853a72fc62be0a101.1659052063.git.bristot@kernel.org Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Will Deacon Cc: Catalin Marinas Cc: Marco Elver Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Shuah Khan Cc: Gabriele Paoloni Cc: Juri Lelli Cc: Clark Williams Cc: Tao Zhou Cc: Randy Dunlap Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) kernel/trace/rv/monitors/wip/wip.c | 109 +++++++++++++++++++++++++++++++++++++ kernel/trace/rv/monitors/wip/wip.h | 46 ++++++++++++++++ 2 files changed, 155 insertions(+) commit b6172b5185d4f57f93ef85b7729ee06c5bc0cbe3 Author: Daniel Bristot de Oliveira Date: Fri Jul 29 11:38:50 2022 +0200 Documentation/rv: Add deterministic automata instrumentation documentation Add the da_monitor_instrumentation.rst. It describes the basics of RV monitor instrumentation. Link: https://lkml.kernel.org/r/0557d5c68e2fc252f2643c2cc5295a67e2b73277.1659052063.git.bristot@kernel.org Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Will Deacon Cc: Catalin Marinas Cc: Marco Elver Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Shuah Khan Cc: Gabriele Paoloni Cc: Juri Lelli Cc: Clark Williams Cc: Tao Zhou Cc: Randy Dunlap Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) .../trace/rv/da_monitor_instrumentation.rst | 171 +++++++++++++++++++++ Documentation/trace/rv/index.rst | 1 + 2 files changed, 172 insertions(+) commit d57aff24796f8f784e1f7beed6da3308e5bb13c0 Author: Daniel Bristot de Oliveira Date: Fri Jul 29 11:38:49 2022 +0200 Documentation/rv: Add deterministic automata monitor synthesis documentation Add the da_monitor_synthesis.rst introduces some concepts behind the Deterministic Automata (DA) monitor synthesis and interface. Link: https://lkml.kernel.org/r/7873bdb7b2e5d2bc0b2eb6ca0b324af9a0ba27a0.1659052063.git.bristot@kernel.org Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Will Deacon Cc: Catalin Marinas Cc: Marco Elver Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Shuah Khan Cc: Gabriele Paoloni Cc: Juri Lelli Cc: Clark Williams Cc: Tao Zhou Cc: Randy Dunlap Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) Documentation/trace/rv/da_monitor_synthesis.rst | 147 ++++++++++++++++++++++++ Documentation/trace/rv/index.rst | 1 + include/rv/da_monitor.h | 3 + tools/verification/dot2/dot2k | 3 + tools/verification/dot2/dot2k.py | 3 + 5 files changed, 157 insertions(+) commit 24bce201d79807b668bf9d9e0aca801c5c0d5f78 Author: Daniel Bristot de Oliveira Date: Fri Jul 29 11:38:48 2022 +0200 tools/rv: Add dot2k transform .dot file into kernel rv monitor usage: dot2k [-h] -d DOT_FILE -t MONITOR_TYPE [-n MODEL_NAME] [-D DESCRIPTION] optional arguments: -h, --help show this help message and exit -d DOT_FILE, --dot DOT_FILE -t MONITOR_TYPE, --monitor_type MONITOR_TYPE -n MODEL_NAME, --model_name MODEL_NAME -D DESCRIPTION, --description DESCRIPTION Link: https://lkml.kernel.org/r/083b3ae61e5a62c1e2e5d08009baa91f82181618.1659052063.git.bristot@kernel.org Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Will Deacon Cc: Catalin Marinas Cc: Marco Elver Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Shuah Khan Cc: Gabriele Paoloni Cc: Juri Lelli Cc: Clark Williams Cc: Tao Zhou Cc: Randy Dunlap Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) tools/verification/dot2/Makefile | 5 + tools/verification/dot2/dot2k | 44 ++++++ tools/verification/dot2/dot2k.py | 174 +++++++++++++++++++++ .../dot2/dot2k_templates/main_global.c | 91 +++++++++++ .../dot2/dot2k_templates/main_per_cpu.c | 91 +++++++++++ .../dot2/dot2k_templates/main_per_task.c | 91 +++++++++++ 6 files changed, 496 insertions(+) commit 4041b9bbfbcddd239ff2c090f0da43bb3df7818c Author: Daniel Bristot de Oliveira Date: Fri Jul 29 11:38:47 2022 +0200 Documentation/rv: Add deterministic automaton documentation Add documentation about deterministic automaton and its possible representations (formal, graphic, .dot and C). Link: https://lkml.kernel.org/r/387edaed87630bd5eb37c4275045dfd229700aa6.1659052063.git.bristot@kernel.org Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Will Deacon Cc: Catalin Marinas Cc: Marco Elver Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Shuah Khan Cc: Gabriele Paoloni Cc: Juri Lelli Cc: Clark Williams Cc: Tao Zhou Cc: Randy Dunlap Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) Documentation/trace/rv/deterministic_automata.rst | 184 ++++++++++++++++++++++ Documentation/trace/rv/index.rst | 1 + tools/verification/dot2/automata.py | 3 + tools/verification/dot2/dot2c | 3 + tools/verification/dot2/dot2c.py | 3 + 5 files changed, 194 insertions(+) commit e3c9fc78f096b83e81329b213c25fb9a376e373a Author: Daniel Bristot de Oliveira Date: Fri Jul 29 11:38:46 2022 +0200 tools/rv: Add dot2c dot2c is a tool that transforms an automata in the graphiviz .dot file into an C representation of the automata. usage: dot2c [-h] dot_file dot2c: converts a .dot file into a C structure positional arguments: dot_file The dot file to be converted optional arguments: -h, --help show this help message and exit Link: https://lkml.kernel.org/r/b26204ba9509c80bcda31b76cdea31ddb188cd24.1659052063.git.bristot@kernel.org Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Will Deacon Cc: Catalin Marinas Cc: Marco Elver Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Shuah Khan Cc: Gabriele Paoloni Cc: Juri Lelli Cc: Clark Williams Cc: Tao Zhou Cc: Randy Dunlap Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) tools/verification/dot2/Makefile | 21 +++ tools/verification/dot2/automata.py | 171 ++++++++++++++++++++++++ tools/verification/dot2/dot2c | 23 ++++ tools/verification/dot2/dot2c.py | 251 ++++++++++++++++++++++++++++++++++++ 4 files changed, 466 insertions(+) commit ff0aaf671230d409a68fd7400f41e9eb3ac61dd8 Author: Daniel Bristot de Oliveira Date: Fri Jul 29 11:38:45 2022 +0200 Documentation/rv: Add a basic documentation Add the runtime-verification.rst document, explaining the basics of RV and how to use the interface. Link: https://lkml.kernel.org/r/4be7d1a88ab1e2eb0767521e1ab52a149a154bc4.1659052063.git.bristot@kernel.org Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Will Deacon Cc: Catalin Marinas Cc: Marco Elver Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Shuah Khan Cc: Gabriele Paoloni Cc: Juri Lelli Cc: Clark Williams Cc: Tao Zhou Cc: Randy Dunlap Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) Documentation/trace/index.rst | 1 + Documentation/trace/rv/index.rst | 9 + Documentation/trace/rv/runtime-verification.rst | 231 ++++++++++++++++++++++++ kernel/trace/rv/Kconfig | 3 + kernel/trace/rv/rv.c | 3 + 5 files changed, 247 insertions(+) commit cc8e71c81746de1f8a44873015bc963a868eccba Author: Daniel Bristot de Oliveira Date: Fri Jul 29 11:38:44 2022 +0200 rv/include: Add instrumentation helper functions Instrumentation helper functions to facilitate the instrumentation of auto-generated RV monitors create by dot2k. Link: https://lkml.kernel.org/r/3b36c9435f9d9299beb84e5c7c46920e205bedec.1659052063.git.bristot@kernel.org Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Will Deacon Cc: Catalin Marinas Cc: Marco Elver Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Shuah Khan Cc: Gabriele Paoloni Cc: Juri Lelli Cc: Clark Williams Cc: Tao Zhou Cc: Randy Dunlap Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) include/rv/instrumentation.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 792575348ff70e05c6040d02fce38e949ef92c37 Author: Daniel Bristot de Oliveira Date: Fri Jul 29 11:38:43 2022 +0200 rv/include: Add deterministic automata monitor definition via C macros In Linux terms, the runtime verification monitors are encapsulated inside the "RV monitor" abstraction. The "RV monitor" includes a set of instances of the monitor (per-cpu monitor, per-task monitor, and so on), the helper functions that glue the monitor to the system reference model, and the trace output as a reaction for event parsing and exceptions, as depicted below: Linux +----- RV Monitor ----------------------------------+ Formal Realm | | Realm +-------------------+ +----------------+ +-----------------+ | Linux kernel | | Monitor | | Reference | | Tracing | -> | Instance(s) | <- | Model | | (instrumentation) | | (verification) | | (specification) | +-------------------+ +----------------+ +-----------------+ | | | | V | | +----------+ | | | Reaction | | | +--+--+--+-+ | | | | | | | | | +-> trace output ? | +------------------------|--|----------------------+ | +----> panic ? +-------> Add the rv/da_monitor.h, enabling automatic code generation for the *Monitor Instance(s)* using C macros, and code to support it. The benefits of the usage of macro for monitor synthesis are 3-fold as it: - Reduces the code duplication; - Facilitates the bug fix/improvement; - Avoids the case of developers changing the core of the monitor code to manipulate the model in a (let's say) non-standard way. This initial implementation presents three different types of monitor instances: - DECLARE_DA_MON_GLOBAL(name, type) - DECLARE_DA_MON_PER_CPU(name, type) - DECLARE_DA_MON_PER_TASK(name, type) The first declares the functions for a global deterministic automata monitor, the second for monitors with per-cpu instances, and the third with per-task instances. Link: https://lkml.kernel.org/r/51b0bf425a281e226dfeba7401d2115d6091f84e.1659052063.git.bristot@kernel.org Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Will Deacon Cc: Catalin Marinas Cc: Marco Elver Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Shuah Khan Cc: Gabriele Paoloni Cc: Juri Lelli Cc: Clark Williams Cc: Tao Zhou Cc: Randy Dunlap Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) include/linux/rv.h | 10 + include/rv/da_monitor.h | 541 ++++++++++++++++++++++++++++++++++++++++++++++ include/trace/events/rv.h | 120 ++++++++++ kernel/fork.c | 14 ++ kernel/trace/rv/Kconfig | 11 + kernel/trace/rv/rv.c | 5 + 6 files changed, 701 insertions(+) commit 09ecd8b8c585c95a3b8dbdec86c15a981fdfeba1 Author: Daniel Bristot de Oliveira Date: Fri Jul 29 11:38:42 2022 +0200 rv/include: Add helper functions for deterministic automata Formally, a deterministic automaton, denoted by G, is defined as a quintuple: G = { X, E, f, x_0, X_m } where: - X is the set of states; - E is the finite set of events; - x_0 is the initial state; - X_m (subset of X) is the set of marked states. - f : X x E -> X $ is the transition function. It defines the state transition in the occurrence of a event from E in the state X. In the special case of deterministic automata, the occurrence of the event in E in a state in X has a deterministic next state from X. An automaton can also be represented using a graphical format of vertices (nodes) and edges. The open-source tool Graphviz can produce this graphic format using the (textual) DOT language as the source code. The dot2c tool presented in this paper: De Oliveira, Daniel Bristot; Cucinotta, Tommaso; De Oliveira, Romulo Silva. Efficient formal verification for the Linux kernel. In: International Conference on Software Engineering and Formal Methods. Springer, Cham, 2019. p. 315-332. Translates a deterministic automaton in the DOT format into a C source code representation that to be used for monitoring. This header file implements helper functions to facilitate the usage of the C output from dot2c/k for monitoring. Link: https://lkml.kernel.org/r/563234f2bfa84b540f60cf9e39c2d9f0eea95a55.1659052063.git.bristot@kernel.org Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Will Deacon Cc: Catalin Marinas Cc: Marco Elver Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Shuah Khan Cc: Gabriele Paoloni Cc: Juri Lelli Cc: Clark Williams Cc: Tao Zhou Cc: Randy Dunlap Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) include/rv/automata.h | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit 04acadcb4453cf8011dd3d4ce8d97fecac42d325 Author: Daniel Bristot de Oliveira Date: Fri Jul 29 11:38:41 2022 +0200 rv: Add runtime reactors interface A runtime monitor can cause a reaction to the detection of an exception on the model's execution. By default, the monitors have tracing reactions, printing the monitor output via tracepoints. But other reactions can be added (on-demand) via this interface. The user interface resembles the kernel tracing interface and presents these files: "available_reactors" - Reading shows the available reactors, one per line. For example: # cat available_reactors nop panic printk "reacting_on" - It is an on/off general switch for reactors, disabling all reactions. "monitors/MONITOR/reactors" - List available reactors, with the select reaction for the given MONITOR inside []. The default one is the nop (no operation) reactor. - Writing the name of a reactor enables it to the given MONITOR. For example: # cat monitors/wip/reactors [nop] panic printk # echo panic > monitors/wip/reactors # cat monitors/wip/reactors nop [panic] printk Link: https://lkml.kernel.org/r/1794eb994637457bdeaa6bad0b8263d2f7eece0c.1659052063.git.bristot@kernel.org Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Will Deacon Cc: Catalin Marinas Cc: Marco Elver Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Shuah Khan Cc: Gabriele Paoloni Cc: Juri Lelli Cc: Clark Williams Cc: Tao Zhou Cc: Randy Dunlap Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) include/linux/rv.h | 17 ++ kernel/trace/rv/Kconfig | 11 + kernel/trace/rv/Makefile | 1 + kernel/trace/rv/rv.c | 9 + kernel/trace/rv/rv.h | 35 +++ kernel/trace/rv/rv_reactors.c | 508 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 581 insertions(+) commit 102227b970a15256f5ffd12a6a276ddf978e6caf Author: Daniel Bristot de Oliveira Date: Fri Jul 29 11:38:40 2022 +0200 rv: Add Runtime Verification (RV) interface RV is a lightweight (yet rigorous) method that complements classical exhaustive verification techniques (such as model checking and theorem proving) with a more practical approach to complex systems. RV works by analyzing the trace of the system's actual execution, comparing it against a formal specification of the system behavior. RV can give precise information on the runtime behavior of the monitored system while enabling the reaction for unexpected events, avoiding, for example, the propagation of a failure on safety-critical systems. The development of this interface roots in the development of the paper: De Oliveira, Daniel Bristot; Cucinotta, Tommaso; De Oliveira, Romulo Silva. Efficient formal verification for the Linux kernel. In: International Conference on Software Engineering and Formal Methods. Springer, Cham, 2019. p. 315-332. And: De Oliveira, Daniel Bristot. Automata-based formal analysis and verification of the real-time Linux kernel. PhD Thesis, 2020. The RV interface resembles the tracing/ interface on purpose. The current path for the RV interface is /sys/kernel/tracing/rv/. It presents these files: "available_monitors" - List the available monitors, one per line. For example: # cat available_monitors wip wwnr "enabled_monitors" - Lists the enabled monitors, one per line; - Writing to it enables a given monitor; - Writing a monitor name with a '!' prefix disables it; - Truncating the file disables all enabled monitors. For example: # cat enabled_monitors # echo wip > enabled_monitors # echo wwnr >> enabled_monitors # cat enabled_monitors wip wwnr # echo '!wip' >> enabled_monitors # cat enabled_monitors wwnr # echo > enabled_monitors # cat enabled_monitors # Note that more than one monitor can be enabled concurrently. "monitoring_on" - It is an on/off general switcher for monitoring. Note that it does not disable enabled monitors or detach events, but stop the per-entity monitors of monitoring the events received from the system. It resembles the "tracing_on" switcher. "monitors/" Each monitor will have its one directory inside "monitors/". There the monitor specific files will be presented. The "monitors/" directory resembles the "events" directory on tracefs. For example: # cd monitors/wip/ # ls desc enable # cat desc wakeup in preemptive per-cpu testing monitor. # cat enable 0 For further information, see the comments in the header of kernel/trace/rv/rv.c from this patch. Link: https://lkml.kernel.org/r/a4bfe038f50cb047bfb343ad0e12b0e646ab308b.1659052063.git.bristot@kernel.org Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Will Deacon Cc: Catalin Marinas Cc: Marco Elver Cc: Dmitry Vyukov Cc: "Paul E. McKenney" Cc: Shuah Khan Cc: Gabriele Paoloni Cc: Juri Lelli Cc: Clark Williams Cc: Tao Zhou Cc: Randy Dunlap Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) include/linux/rv.h | 43 +++ include/linux/sched.h | 11 + kernel/trace/Kconfig | 2 + kernel/trace/Makefile | 1 + kernel/trace/rv/Kconfig | 12 + kernel/trace/rv/Makefile | 3 + kernel/trace/rv/rv.c | 782 +++++++++++++++++++++++++++++++++++++++++++++++ kernel/trace/rv/rv.h | 33 ++ kernel/trace/trace.c | 2 + kernel/trace/trace.h | 9 + 10 files changed, 898 insertions(+) commit ac6c1b2ca77e722a1e5d651f12f437f2f237e658 Author: Steven Rostedt (Google) Date: Tue Jul 26 10:18:51 2022 -0400 ftrace/x86: Add back ftrace_expected assignment When a ftrace_bug happens (where ftrace fails to modify a location) it is helpful to have what was at that location as well as what was expected to be there. But with the conversion to text_poke() the variable that assigns the expected for debugging was dropped. Unfortunately, I noticed this when I needed it. Add it back. Link: https://lkml.kernel.org/r/20220726101851.069d2e70@gandalf.local.home Cc: "x86@kernel.org" Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Andrew Morton Cc: stable@vger.kernel.org Fixes: 768ae4406a5c ("x86/ftrace: Use text_poke()") Signed-off-by: Steven Rostedt (Google) arch/x86/kernel/ftrace.c | 1 + 1 file changed, 1 insertion(+) commit 3a2dcbaf4d31023106975d6ae75b6df080c454cb Author: Steven Rostedt (Google) Date: Tue Jul 19 18:20:04 2022 -0400 tracing: Use a copy of the va_list for __assign_vstr() If an instance of tracing enables the same trace event as another instance, or the top level instance, or even perf, then the va_list passed into some tracepoints can be used more than once. As va_list can only be traversed once, this can cause issues: # cat /sys/kernel/tracing/instances/qla2xxx/trace cat-56106 [012] ..... 2419873.470098: ql_dbg_log: qla2xxx [0000:05:00.0]-1054:14: Entered (null). cat-56106 [012] ..... 2419873.470101: ql_dbg_log: qla2xxx [0000:05:00.0]-1000:14: Entered ×+<96>²Ü<98>^H. cat-56106 [012] ..... 2419873.470102: ql_dbg_log: qla2xxx [0000:05:00.0]-1006:14: Prepare to issue mbox cmd=0xde589000. # cat /sys/kernel/tracing/trace cat-56106 [012] ..... 2419873.470097: ql_dbg_log: qla2xxx [0000:05:00.0]-1054:14: Entered qla2x00_get_firmware_state. cat-56106 [012] ..... 2419873.470100: ql_dbg_log: qla2xxx [0000:05:00.0]-1000:14: Entered qla2x00_mailbox_command. cat-56106 [012] ..... 2419873.470102: ql_dbg_log: qla2xxx [0000:05:00.0]-1006:14: Prepare to issue mbox cmd=0x69. The instance version is corrupted because the top level instance iterated the va_list first. Use va_copy() in the __assign_vstr() macro to make sure that each trace event for each use case gets a fresh va_list. Link: https://lore.kernel.org/all/259d53a5-958e-6508-4e45-74dba2821242@marvell.com/ Link: https://lkml.kernel.org/r/20220719182004.21daa83e@gandalf.local.home Fixes: 0563231f93c6d ("tracing/events: Add __vstring() and __assign_vstr() helper macros") Reported-by: Arun Easi Signed-off-by: Steven Rostedt (Google) include/trace/stages/stage6_event_callback.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 9abc291812d784bd4a26c01af4ebdbf9f2dbf0bb Author: Steven Rostedt (Google) Date: Sun Jul 24 19:16:50 2022 -0400 batman-adv: tracing: Use the new __vstring() helper Instead of open coding a __dynamic_array() with a fixed length (which defeats the purpose of the dynamic array in the first place). Use the new __vstring() helper that will use a va_list and only write enough of the string into the ring buffer that is needed. Link: https://lkml.kernel.org/r/20220724191650.236b1355@rorschach.local.home Cc: Marek Lindner Cc: Ingo Molnar Cc: Andrew Morton Cc: Simon Wunderlich Cc: Antonio Quartulli Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: b.a.t.m.a.n@lists.open-mesh.org Cc: netdev@vger.kernel.org Acked-by: Sven Eckelmann Signed-off-by: Steven Rostedt (Google) net/batman-adv/trace.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit ee47620367d5b5ee6a1934888bf1ae46576be757 Author: Masahiro Yamada Date: Sun Jul 24 18:59:19 2022 +0900 kbuild: add dtbs_prepare target Factor out the common prerequisites for DT compilation into the new target, dtbs_prepare. Add comments to explain why include/config/kernel.release is the prerequisite. Our policy is that installation targets must not rebuild anything in the tree. If 'make modules_install' is executed as root, include/config/kernel.release may be owned by root. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit d2139dfca361a1f5bfc4d4a23455b1a409a69cd4 Author: Andy Shevchenko Date: Sat Jul 30 18:28:46 2022 +0200 firmware: dmi: Use the proper accessor for the version field The byte at offset 6 represents length. Don't take it and drop it immediately by using proper accessor, i.e. get_unaligned_be24(). [JD: Change the subject to something less frightening] Signed-off-by: Andy Shevchenko Signed-off-by: Jean Delvare drivers/firmware/dmi_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e8bb4ba5a558159ffbfa7e60322a1c151c3903c Author: Guo Ren Date: Mon Apr 18 21:01:54 2022 +0800 csky: Add jump-label implementation Add jump-label implementation for static branch Signed-off-by: Guo Ren Signed-off-by: Guo Ren arch/csky/Kconfig | 2 ++ arch/csky/include/asm/jump_label.h | 47 +++++++++++++++++++++++++++++++++ arch/csky/kernel/Makefile | 1 + arch/csky/kernel/jump_label.c | 54 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 104 insertions(+) commit 534ea58b3ceb41d668adf18c4e68a846e770a6c8 Author: Alexander Sverdlin Date: Mon Jul 25 11:17:40 2022 +0200 Revert "MIPS: octeon: Remove vestiges of CONFIG_CAVIUM_RESERVE32" This reverts commit e98b461bb057aaea6fa766260788c08825213837. We actually have been using the CONFIG_CAVIUM_RESERVE32 and previous patch defined it in the corresponding Kconfig. Signed-off-by: Alexander Sverdlin Signed-off-by: Thomas Bogendoerfer arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c | 21 +++++++++--- arch/mips/cavium-octeon/setup.c | 38 +++++++++++++++++++++- 2 files changed, 54 insertions(+), 5 deletions(-) commit 3e3114ac460e94825e34d1fed6a48a9ce4b07689 Author: Alexander Sverdlin Date: Mon Jul 25 11:17:39 2022 +0200 MIPS: Introduce CAVIUM_RESERVE32 Kconfig option This options is used to reserve a shared memory region for user processes to use for hardware memory buffers. The actual code to support the option comes in the following patch. Signed-off-by: Corey Minyard Signed-off-by: Alexander Sverdlin Signed-off-by: Thomas Bogendoerfer arch/mips/cavium-octeon/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit d3cd4d9fc1f024b09967e672fb0ef82f05444b75 Author: Randy Dunlap Date: Sat Jul 23 22:57:23 2022 -0700 MIPS: msi-octeon: eliminate kernel-doc warnings Rearrange kernel-doc notation for 2 functions to eliminate kernel-doc warnings. Use Return: notation for the function return value description. Add function short descriptions for both functions. Correct 2 typos. Fixes these kernel-doc warnings: msi-octeon.c:49: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Called when a driver request MSI interrupts instead of the msi-octeon.c:49: warning: missing initial short description on line: * Called when a driver request MSI interrupts instead of the msi-octeon.c:62: warning: No description found for return value of 'arch_setup_msi_irq' msi-octeon.c:189: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Called when a device no longer needs its MSI interrupts. All msi-octeon.c:189: warning: missing initial short description on line: * Called when a device no longer needs its MSI interrupts. All Fixes: e8635b484f64 ("MIPS: Add Cavium OCTEON PCI support.") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Cc: Aditya Srivastava Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Signed-off-by: Thomas Bogendoerfer arch/mips/pci/msi-octeon.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit b8295e44c7619289a7d5024156753c0e3a30daf8 Author: Jason Wang Date: Sat Jul 16 12:01:19 2022 +0800 MIPS: Fix comment typo Fix the typo `s/that that/than that/' in line 72. Signed-off-by: Jason Wang Signed-off-by: Thomas Bogendoerfer arch/mips/bcm47xx/prom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04d9490986d1e04a38db88276115e6b3c9ec3faa Author: Shaoqin Huang Date: Fri Jul 29 10:11:25 2022 -0600 memblock test: Modify the obsolete description in README The VERBOSE option in Makefile has been moved, but there still have the description left in README. For now, we use `-v` options when running memblock test to print information, so using the new to replace the obsolete items. Signed-off-by: Shaoqin Huang Acked-by: Rebecca Mckeever Signed-off-by: Mike Rapoport Link: https://lore.kernel.org/r/20220729161125.190845-1-shaoqin.huang@intel.com tools/testing/memblock/README | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 3790a3d6dbbc48e30586e9c3fc752a00e2e11946 Author: Philipp Jungkamp Date: Fri Jul 29 18:21:03 2022 +0200 ALSA: hda/realtek: Add quirk for Lenovo Yoga9 14IAP7 The Lenovo Yoga 9 14IAP7 is set up similarly to the Thinkpad X1 7th and 8th Gen. It also has the speakers attached to NID 0x14 and the bass speakers to NID 0x17, but here the codec misreports the NID 0x17 as unconnected. The pincfg and hda verbs connect and activate the bass speaker amplifiers, but the generic driver will connect them to NID 0x06 which has no volume control. Set connection list/preferred connections is required to gain volume control. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208555 Signed-off-by: Philipp Jungkamp Cc: Link: https://lore.kernel.org/r/20220729162103.6062-1-p.jungkamp@gmx.net Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 109 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) commit 63757225a93353bc2ce4499af5501eabdbbf23f9 Merge: 84a8d931ab21 069448b2fd0a Author: Jakub Kicinski Date: Fri Jul 29 21:39:06 2022 -0700 Merge tag 'mlx5-updates-2022-07-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2022-07-28 Misc updates to mlx5 driver: 1) Gal corrects to use skb_tcp_all_headers on encapsulated skbs. 2) Roi Adds the support for offloading standalone police actions. 3) lama, did some refactoring to minimize code coupling with mlx5e_priv "god object" in some of the follows, and converts some of the objects to pointers to preserve on memory when these objects aren't needed. This is part one of two parts series. * tag 'mlx5-updates-2022-07-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5e: Move mlx5e_init_l2_addr to en_main net/mlx5e: Split en_fs ndo's and move to en_main net/mlx5e: Separate mlx5e_set_rx_mode_work and move caller to en_main net/mlx5e: Add mdev to flow_steering struct net/mlx5e: Report flow steering errors with mdev err report API net/mlx5e: Convert mlx5e_flow_steering member of mlx5e_priv to pointer net/mlx5e: Allocate VLAN and TC for featured profiles only net/mlx5e: Make mlx5e_tc_table private net/mlx5e: Convert mlx5e_tc_table member of mlx5e_flow_steering to pointer net/mlx5e: TC, Support tc action api for police net/mlx5e: TC, Separate get/update/replace meter functions net/mlx5e: Add red and green counters for metering net/mlx5e: TC, Allocate post meter ft per rule net/mlx5: DR, Add support for flow metering ASO net/mlx5e: Fix wrong use of skb_tcp_all_headers() with encapsulation ==================== Link: https://lore.kernel.org/r/20220728205728.143074-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 50417d22d0efbb1be76c3cb66b2329f83741c9c7 Author: Sebastian Andrzej Siewior Date: Wed Jul 27 13:49:04 2022 +0200 fs/dcache: Move wakeup out of i_seq_dir write held region. __d_add() and __d_move() wake up waiters on dentry::d_wait from within the i_seq_dir write held region. This violates the PREEMPT_RT constraints as the wake up acquires wait_queue_head::lock which is a "sleeping" spinlock on RT. There is no requirement to do so. __d_lookup_unhash() has cleared DCACHE_PAR_LOOKUP and dentry::d_wait and returned the now unreachable wait queue head pointer to the caller, so the actual wake up can be postponed until the i_dir_seq write side critical section is left. The only requirement is that dentry::lock is held across the whole sequence including the wake up. The previous commit includes an analysis why this is considered safe. Move the wake up past end_dir_add() which leaves the i_dir_seq write side critical section and enables preemption. For non RT kernels there is no difference because preemption is still disabled due to dentry::lock being held, but it shortens the time between wake up and unlocking dentry::lock, which reduces the contention for the woken up waiter. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Al Viro fs/dcache.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 45f78b0a2743c4fd71b73400bd5d5339628bf538 Author: Sebastian Andrzej Siewior Date: Wed Jul 27 13:49:03 2022 +0200 fs/dcache: Move the wakeup from __d_lookup_done() to the caller. __d_lookup_done() wakes waiters on dentry->d_wait. On PREEMPT_RT we are not allowed to do that with preemption disabled, since the wakeup acquired wait_queue_head::lock, which is a "sleeping" spinlock on RT. Calling it under dentry->d_lock is not a problem, since that is also a "sleeping" spinlock on the same configs. Unfortunately, two of its callers (__d_add() and __d_move()) are holding more than just ->d_lock and that needs to be dealt with. The key observation is that wakeup can be moved to any point before dropping ->d_lock. As a first step to solve this, move the wake up outside of the hlist_bl_lock() held section. This is safe because: Waiters get inserted into ->d_wait only after they'd taken ->d_lock and observed DCACHE_PAR_LOOKUP in flags. As long as they are woken up (and evicted from the queue) between the moment __d_lookup_done() has removed DCACHE_PAR_LOOKUP and dropping ->d_lock, we are safe, since the waitqueue ->d_wait points to won't get destroyed without having __d_lookup_done(dentry) called (under ->d_lock). ->d_wait is set only by d_alloc_parallel() and only in case when it returns a freshly allocated in-lookup dentry. Whenever that happens, we are guaranteed that __d_lookup_done() will be called for resulting dentry (under ->d_lock) before the wq in question gets destroyed. With two exceptions wq lives in call frame of the caller of d_alloc_parallel() and we have an explicit d_lookup_done() on the resulting in-lookup dentry before we leave that frame. One of those exceptions is nfs_call_unlink(), where wq is embedded into (dynamically allocated) struct nfs_unlinkdata. It is destroyed in nfs_async_unlink_release() after an explicit d_lookup_done() on the dentry wq went into. Remaining exception is d_add_ci(). There wq is what we'd found in ->d_wait of d_add_ci() argument. Callers of d_add_ci() are two instances of ->d_lookup() and they must have been given an in-lookup dentry. Which means that they'd been called by __lookup_slow() or lookup_open(), with wq in the call frame of one of those. Result of d_alloc_parallel() in d_add_ci() is fed to d_splice_alias(), which either returns non-NULL (and d_add_ci() does d_lookup_done()) or feeds dentry to __d_add() that will do __d_lookup_done() under ->d_lock. That concludes the analysis. Let __d_lookup_unhash(): 1) Lock the lookup hash and clear DCACHE_PAR_LOOKUP 2) Unhash the dentry 3) Retrieve and clear dentry::d_wait 4) Unlock the hash and return the retrieved waitqueue head pointer 5) Let the caller handle the wake up. 6) Rename __d_lookup_done() to __d_lookup_unhash_wake() to enforce build failures for OOT code that used __d_lookup_done() and is not aware of the new return value. This does not yet solve the PREEMPT_RT problem completely because preemption is still disabled due to i_dir_seq being held for write. This will be addressed in subsequent steps. An alternative solution would be to switch the waitqueue to a simple waitqueue, but aside of Linus not being a fan of them, moving the wake up closer to the place where dentry::lock is unlocked reduces lock contention time for the woken up waiter. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Link: https://lkml.kernel.org/r/20220613140712.77932-3-bigeasy@linutronix.de Signed-off-by: Al Viro fs/dcache.c | 35 ++++++++++++++++++++++++++++------- include/linux/dcache.h | 9 +++------ 2 files changed, 31 insertions(+), 13 deletions(-) commit cf634d540a29018e8d69ab1befb7e08182bc6594 Author: Sebastian Andrzej Siewior Date: Wed Jul 27 13:49:02 2022 +0200 fs/dcache: Disable preemption on i_dir_seq write side on PREEMPT_RT i_dir_seq is a sequence counter with a lock which is represented by the lowest bit. The writer atomically updates the counter which ensures that it can be modified by only one writer at a time. This requires preemption to be disabled across the write side critical section. On !PREEMPT_RT kernels this is implicit by the caller acquiring dentry::lock. On PREEMPT_RT kernels spin_lock() does not disable preemption which means that a preempting writer or reader would live lock. It's therefore required to disable preemption explicitly. An alternative solution would be to replace i_dir_seq with a seqlock_t for PREEMPT_RT, but that comes with its own set of problems due to arbitrary lock nesting. A pure sequence count with an associated spinlock is not possible because the locks held by the caller are not necessarily related. As the critical section is small, disabling preemption is a sensible solution. Reported-by: Oleg.Karfich@wago.com Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Link: https://lkml.kernel.org/r/20220613140712.77932-2-bigeasy@linutronix.de Signed-off-by: Al Viro fs/dcache.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 40a3cb0d2314a41975aa385a74643878454f6eac Author: Al Viro Date: Sat Jul 30 00:29:05 2022 -0400 d_add_ci(): make sure we don't miss d_lookup_done() All callers of d_alloc_parallel() must make sure that resulting in-lookup dentry (if any) will encounter __d_lookup_done() before the final dput(). d_add_ci() might end up creating in-lookup dentries; they are fed to d_splice_alias(), which will normally make sure they meet __d_lookup_done(). However, it is possible to end up with d_splice_alias() failing with ERR_PTR(-ELOOP) without having done so. It takes a corrupted ntfs or case-insensitive xfs image, but neither should end up with memory corruption... Signed-off-by: Al Viro fs/dcache.c | 1 + 1 file changed, 1 insertion(+) commit 9e98f8c7707f8bf4552806b17e42c54548d29527 Merge: b65a1534cfd6 42b4f7f66a43 Author: Jakub Kicinski Date: Fri Jul 29 21:28:56 2022 -0700 Merge tag 'mlx5-fixes-2022-07-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2022-07-28 This series provides bug fixes to mlx5 driver. * tag 'mlx5-fixes-2022-07-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: Fix driver use of uninitialized timeout net/mlx5: DR, Fix SMFS steering info dump format net/mlx5: Adjust log_max_qp to be 18 at most net/mlx5e: Modify slow path rules to go to slow fdb net/mlx5e: Fix calculations related to max MPWQE size net/mlx5e: xsk: Account for XSK RQ UMRs when calculating ICOSQ size net/mlx5e: Fix the value of MLX5E_MAX_RQ_NUM_MTTS net/mlx5e: TC, Fix post_act to not match on in_port metadata net/mlx5e: Remove WARN_ON when trying to offload an unsupported TLS cipher/version ==================== Link: https://lore.kernel.org/r/20220728204640.139990-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 84a8d931ab213250932959c4f929a7e7e670b8a7 Merge: ed3849e42917 44ece4e1a3ec Author: Jakub Kicinski Date: Fri Jul 29 21:26:09 2022 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2022-07-28 This series contains updates to ice driver only. Michal allows for VF true promiscuous mode to be set for multiple VFs and adds clearing of promiscuous filters when VF trust is removed. Maciej refactors ice_set_features() to track/check changed features instead of constantly checking against netdev features and adds support for NETIF_F_LOOPBACK. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: allow toggling loopback mode via ndo_set_features callback ice: compress branches in ice_set_features() ice: Fix promiscuous mode not turning off ice: Introduce enabling promiscuous mode on multiple VF's ==================== Link: https://lore.kernel.org/r/20220728195538.3391360-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit ed3849e429179cd9146a0d7815d23f1c7ed7508b Merge: 71930846b36f 7267aa6d99f5 Author: Jakub Kicinski Date: Fri Jul 29 21:22:09 2022 -0700 Merge branch 'sfc-vf-representors-for-ef100-rx-side' Edward Cree says: ==================== sfc: VF representors for EF100 - RX side This series adds the receive path for EF100 VF representors, plus other minor features such as statistics. ==================== Link: https://lore.kernel.org/r/cover.1659034549.git.ecree.xilinx@gmail.com Signed-off-by: Jakub Kicinski commit 7267aa6d99f5b82f6d0e4f537d87fa9b6ab86411 Author: Edward Cree Date: Thu Jul 28 19:57:52 2022 +0100 sfc: implement ethtool get/set RX ring size for EF100 reps It's not truly a ring, but the maximum length of the list of queued RX SKBs is analogous to an RX ring size, so use that API to configure it. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/ef100_rep.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit e37f3b1561a038c0630e7364740d6d55f2b5d5b5 Author: Edward Cree Date: Thu Jul 28 19:57:51 2022 +0100 sfc: use a dynamic m-port for representor RX and set it promisc Representors do not want to be subject to the PF's Ethernet address filters, since traffic from VFs will typically have a destination either elsewhere on the link segment or on an overlay network. So, create a dynamic m-port with promiscuous and all-multicast filters, and set it as the egress port of representor default rules. Since the m-port is an alias of the calling PF's own m-port, traffic will still be delivered to the PF's RXQs, but it will be subject to the VNRX filter rules installed on the dynamic m-port (specified by the v-port ID field of the filter spec). Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/ef100_nic.c | 15 +++++++ drivers/net/ethernet/sfc/filter.h | 18 ++++++++ drivers/net/ethernet/sfc/mae.c | 37 +++++++++++++++++ drivers/net/ethernet/sfc/mae.h | 3 ++ drivers/net/ethernet/sfc/mcdi_filters.c | 6 ++- drivers/net/ethernet/sfc/tc.c | 73 ++++++++++++++++++++++++++++++++- drivers/net/ethernet/sfc/tc.h | 9 ++++ 7 files changed, 158 insertions(+), 3 deletions(-) commit 77eb40749d73fe347c47d6903874a924840ff8d5 Author: Edward Cree Date: Thu Jul 28 19:57:50 2022 +0100 sfc: move table locking into filter_table_{probe,remove} methods We need to be able to drop the efx->filter_sem in ef100_filter_table_up() so that we can call functions that insert filters (and thus take that rwsem for read), which means the efx->type->filter_table_probe method needs to be responsible for taking the lock in the first place. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/ef10.c | 26 +++++++++++++++----------- drivers/net/ethernet/sfc/ef100_nic.c | 22 ++++++++++++++-------- drivers/net/ethernet/sfc/ef10_sriov.c | 16 +++------------- drivers/net/ethernet/sfc/mcdi_filters.h | 1 + drivers/net/ethernet/sfc/rx_common.c | 4 ---- 5 files changed, 33 insertions(+), 36 deletions(-) commit 67ab160ed08f5bb55aff55aa41e6bde56cb83661 Author: Edward Cree Date: Thu Jul 28 19:57:49 2022 +0100 sfc: insert default MAE rules to connect VFs to representors Default rules are low-priority switching rules which the hardware uses in the absence of higher-priority rules. Each representor requires a corresponding rule matching traffic from its representee VF and delivering to the PF (where a check on INGRESS_MPORT in __ef100_rx_packet() will direct it to the representor). No rule is required in the reverse direction, because representor TX uses a TX override descriptor to bypass the MAE and deliver directly to the VF. Since inserting any rule into the MAE disables the firmware's own default rules, also insert a pair of rules to connect the PF to the physical network port and vice-versa. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/Makefile | 3 +- drivers/net/ethernet/sfc/ef100.c | 3 + drivers/net/ethernet/sfc/ef100_netdev.c | 4 + drivers/net/ethernet/sfc/ef100_nic.c | 17 ++ drivers/net/ethernet/sfc/ef100_rep.c | 20 ++- drivers/net/ethernet/sfc/ef100_rep.h | 3 + drivers/net/ethernet/sfc/mae.c | 257 ++++++++++++++++++++++++++++++- drivers/net/ethernet/sfc/mae.h | 16 ++ drivers/net/ethernet/sfc/mcdi.h | 4 + drivers/net/ethernet/sfc/mcdi_pcol_mae.h | 24 +++ drivers/net/ethernet/sfc/net_driver.h | 2 + drivers/net/ethernet/sfc/tc.c | 183 ++++++++++++++++++++++ drivers/net/ethernet/sfc/tc.h | 76 +++++++++ 13 files changed, 606 insertions(+), 6 deletions(-) commit f50e8fcda6b8d39db9098f7e1146dc491696ab91 Author: Edward Cree Date: Thu Jul 28 19:57:48 2022 +0100 sfc: receive packets from EF100 VFs into representors If the source m-port of a packet in __ef100_rx_packet() is a VF, hand off the packet to the corresponding representor with efx_ef100_rep_rx_packet(). Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/ef100_rep.c | 19 +++++++++++++++++++ drivers/net/ethernet/sfc/ef100_rep.h | 5 +++++ drivers/net/ethernet/sfc/ef100_rx.c | 18 ++++++++++++++++++ 3 files changed, 42 insertions(+) commit 08d0b16ecb3649025336e104d8d25f56abde563c Author: Edward Cree Date: Thu Jul 28 19:57:47 2022 +0100 sfc: check ef100 RX packets are from the wire If not, for now drop them and warn. A subsequent patch will look up the source m-port to try and find a representor to deliver them to. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/ef100_rx.c | 28 ++++++++++++++++++++++------ drivers/net/ethernet/sfc/ethtool_common.c | 1 + drivers/net/ethernet/sfc/net_driver.h | 3 +++ 3 files changed, 26 insertions(+), 6 deletions(-) commit 6f6838aabff5ea99af1c78ab02838b8d471f218d Author: Edward Cree Date: Thu Jul 28 19:57:46 2022 +0100 sfc: determine wire m-port at EF100 PF probe time Traffic delivered to the (MAE admin) PF could be from either the wire or a VF. The INGRESS_MPORT field of the RX prefix distinguishes these; base_mport is the value this field will have for traffic from the wire (which should be delivered to the PF's netdevice, not a representor). Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/ef100_nic.c | 37 ++++++++++++++++++++++++++++++++++++ drivers/net/ethernet/sfc/ef100_nic.h | 2 ++ drivers/net/ethernet/sfc/mae.c | 10 ++++++++++ drivers/net/ethernet/sfc/mae.h | 1 + 4 files changed, 50 insertions(+) commit 9fe00c800ecd667acb7748cab7fcd3068c58498a Author: Edward Cree Date: Thu Jul 28 19:57:45 2022 +0100 sfc: ef100 representor RX top half Representor RX uses a NAPI context driven by a 'fake interrupt': when the parent PF receives a packet destined for the representor, it adds it to an SKB list (efv->rx_list), and schedules NAPI if the 'fake interrupt' is primed. The NAPI poll then pulls packets off this list and feeds them to the stack with netif_receive_skb_list(). This scheme allows us to decouple representor RX from the parent PF's RX fast-path. This patch implements the 'top half', which builds an SKB, copies data into it from the RX buffer (which can then be released), adds it to the queue and fires the 'fake interrupt' if necessary. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/ef100_rep.c | 55 ++++++++++++++++++++++++++++++++++++ drivers/net/ethernet/sfc/ef100_rep.h | 1 + 2 files changed, 56 insertions(+) commit 69bb5fa73d2b2d7fa3ccbf16e8b1f055fe2d26b1 Author: Edward Cree Date: Thu Jul 28 19:57:44 2022 +0100 sfc: ef100 representor RX NAPI poll This patch adds the 'bottom half' napi->poll routine for representor RX. See the next patch (with the top half) for an explanation of the 'fake interrupt' scheme used to drive this NAPI context. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/ef100_rep.c | 64 ++++++++++++++++++++++++++++++++++++ drivers/net/ethernet/sfc/ef100_rep.h | 11 +++++++ 2 files changed, 75 insertions(+) commit a95115c407a26c55fdeb6750811a0252687b331e Author: Edward Cree Date: Thu Jul 28 19:57:43 2022 +0100 sfc: plumb ef100 representor stats Implement .ndo_get_stats64() method to read values out of struct efx_rep_sw_stats. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/ef100_rep.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 71930846b36f8e4e68267f8a3d47e33435c3657a Author: Dan Carpenter Date: Thu Jul 28 17:32:36 2022 +0300 net: marvell: prestera: uninitialized variable bug The "ret" variable needs to be initialized at the start. Fixes: 52323ef75414 ("net: marvell: prestera: add phylink support") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YuKeBBuGtsmd7QdT@kili Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/prestera/prestera_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f14a8351abd7d734ae617da05faa0008cd35927 Author: Yu Zhe Date: Fri Jul 29 14:17:12 2022 +0800 dn_route: replace "jiffies-now>0" with "jiffies!=now" Use "jiffies != now" to replace "jiffies - now > 0" to make code more readable. We want to put a limit on how long the loop can run for before rescheduling. Signed-off-by: Yu Zhe Link: https://lore.kernel.org/r/20220729061712.22666-1-yuzhe@nfschina.com Signed-off-by: Jakub Kicinski net/decnet/dn_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff4970b130e74af4f2fe5bc6a7a963bc977cae1a Merge: 5fc7c5887c62 35610745d71d Author: Jakub Kicinski Date: Fri Jul 29 19:34:45 2022 -0700 Merge tag 'wireless-next-2022-07-29' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v5.20 Fourth set of patches for v5.20, last few patches before the merge window. Only driver changes this time, mostly just fixes and cleanup. Major changes: brcmfmac - support brcm,ccode-map-trivial DT property wcn36xx - add debugfs file to show firmware feature strings * tag 'wireless-next-2022-07-29' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (36 commits) wifi: rtw88: check the return value of alloc_workqueue() wifi: rtw89: 8852a: adjust IMR for SER L1 wifi: rtw89: 8852a: update RF radio A/B R56 wifi: wcn36xx: Add debugfs entry to read firmware feature strings wifi: wcn36xx: Move capability bitmap to string translation function to firmware.c wifi: wcn36xx: Move firmware feature bit storage to dedicated firmware.c file wifi: wcn36xx: Rename clunky firmware feature bit enum wifi: brcmfmac: prevent double-free on hardware-reset wifi: brcmfmac: support brcm,ccode-map-trivial DT property dt-bindings: bcm4329-fmac: add optional brcm,ccode-map-trivial wifi: brcmfmac: Replace default (not configured) MAC with a random MAC wifi: brcmfmac: Add brcmf_c_set_cur_etheraddr() helper wifi: brcmfmac: Remove #ifdef guards for PM related functions wifi: brcmfmac: use strreplace() in brcmf_of_probe() wifi: plfxlc: Use eth_zero_addr() to assign zero address wifi: wilc1000: use existing iftype variable to store the interface type wifi: wilc1000: add 'isinit' flag for SDIO bus similar to SPI wifi: wilc1000: cancel the connect operation during interface down wifi: wilc1000: get correct length of string WID from received config packet wifi: wilc1000: set station_info flag only when signal value is valid ... ==================== Link: https://lore.kernel.org/r/20220729192832.A5011C433D6@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 5fc7c5887c62f5485b606884a83eea972961423d Merge: 6957730e2038 14250fa4839b Author: Jakub Kicinski Date: Fri Jul 29 19:04:28 2022 -0700 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Andrii Nakryiko says: ==================== bpf-next 2022-07-29 We've added 22 non-merge commits during the last 4 day(s) which contain a total of 27 files changed, 763 insertions(+), 120 deletions(-). The main changes are: 1) Fixes to allow setting any source IP with bpf_skb_set_tunnel_key() helper, from Paul Chaignon. 2) Fix for bpf_xdp_pointer() helper when doing sanity checking, from Joanne Koong. 3) Fix for XDP frame length calculation, from Lorenzo Bianconi. 4) Libbpf BPF_KSYSCALL docs improvements and fixes to selftests to accommodate s390x quirks with socketcall(), from Ilya Leoshkevich. 5) Allow/denylist and CI configs additions to selftests/bpf to improve BPF CI, from Daniel Müller. 6) BPF trampoline + ftrace follow up fixes, from Song Liu and Xu Kuohai. 7) Fix allocation warnings in netdevsim, from Jakub Kicinski. 8) bpf_obj_get_opts() libbpf API allowing to provide file flags, from Joe Burton. 9) vsnprintf usage fix in bpf_snprintf_btf(), from Fedor Tokarev. 10) Various small fixes and clean ups, from Daniel Müller, Rongguang Wei, Jörn-Thorben Hinz, Yang Li. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (22 commits) bpf: Remove unneeded semicolon libbpf: Add bpf_obj_get_opts() netdevsim: Avoid allocation warnings triggered from user space bpf: Fix NULL pointer dereference when registering bpf trampoline bpf: Fix test_progs -j error with fentry/fexit tests selftests/bpf: Bump internal send_signal/send_signal_tracepoint timeout bpftool: Don't try to return value from void function in skeleton bpftool: Replace sizeof(arr)/sizeof(arr[0]) with ARRAY_SIZE macro bpf: btf: Fix vsnprintf return value check libbpf: Support PPC in arch_specific_syscall_pfx selftests/bpf: Adjust vmtest.sh to use local kernel configuration selftests/bpf: Copy over libbpf configs selftests/bpf: Sort configuration selftests/bpf: Attach to socketcall() in test_probe_user libbpf: Extend BPF_KSYSCALL documentation bpf, devmap: Compute proper xdp_frame len redirecting frames bpf: Fix bpf_xdp_pointer return pointer selftests/bpf: Don't assign outer source IP to host bpf: Set flow flag to allow any source IP in bpf_tunnel_key geneve: Use ip_tunnel_key flow flags in route lookups ... ==================== Link: https://lore.kernel.org/r/20220729230948.1313527-1-andrii@kernel.org Signed-off-by: Jakub Kicinski commit b99695580bfc1f91364023c673681ddb88e375dc Author: Aaron Tomlin Date: Tue Jul 12 12:02:48 2022 +0100 scripts/gdb: ensure the absolute path is generated on initial source Post 'make scripts_gdb' a symbolic link to scripts/gdb/vmlinux-gdb.py is created. Currently 'os.path.dirname(__file__)' does not generate the absolute path to scripts/gdb resulting in the following: (gdb) source vmlinux-gdb.py Traceback (most recent call last): File "scripts/gdb/vmlinux-gdb.py", line 25, in import linux.utils ModuleNotFoundError: No module named 'linux' This patch ensures that the absolute path to scripts/gdb in relation to the given file is generated so each module can be located accordingly. Link: https://lkml.kernel.org/r/20220712110248.1404125-1-atomlin@redhat.com Signed-off-by: Aaron Tomlin Reviewed-by: Douglas Anderson Cc: Jan Kiszka Cc: Kieran Bingham Signed-off-by: Andrew Morton scripts/gdb/vmlinux-gdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f98911a9d6e08037903e8ecf44d50f4bcf2368d Author: Brendan Higgins Date: Mon Jul 25 18:07:37 2022 -0400 MAINTAINERS: kunit: add David Gow as a maintainer of KUnit David has been a de facto maintainer of KUnit for a long time now. Formalize this in the MAINTAINERS file. Link: https://lkml.kernel.org/r/20220725220737.790976-1-brendan.higgins@linux.dev Signed-off-by: Brendan Higgins Reviewed-by: David Gow Cc: Shuah Khan Cc: Daniel Latypov Signed-off-by: Andrew Morton MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 9f3cebf0bb84a2b94cb59df869f1463e4954e150 Author: Brendan Higgins Date: Mon Jul 25 17:58:33 2022 -0400 mailmap: add linux.dev alias for Brendan Higgins Because of my new work remote setup at Google, I can no longer use command line tools with my google.com email address, for this reason I got a linux.dev account. So update the mailmap to show the new alias I will be using. Link: https://lkml.kernel.org/r/20220725215833.789133-1-brendan.higgins@linux.dev Signed-off-by: Brendan Higgins Reviewed-by: David Gow Cc: Shuah Khan Cc: Daniel Latypov Signed-off-by: Andrew Morton .mailmap | 1 + 1 file changed, 1 insertion(+) commit 50feece7f770cd5d850334716d71bb8ea4868810 Author: Kirill Tkhai Date: Mon Jul 25 23:37:15 2022 +0300 mailmap: update Kirill's email I disconnected from both Virtuozzo and OpenVZ, so this updates my email to point to my own. I haven't used @openvz address for patches, so let's rewrite the line instead of to add a new one. CC all previous addresses. Link: https://lkml.kernel.org/r/14ca895b-e745-6ba2-8be8-652feacbc907@ya.ru Signed-off-by: Kirill Tkhai Signed-off-by: Andrew Morton .mailmap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 787dbea11a5d6843999ff71a3fb9aa1ed6d5d889 Author: Ben Dooks Date: Thu Jul 21 20:55:09 2022 +0100 profile: setup_profiling_timer() is moslty not implemented The setup_profiling_timer() is mostly un-implemented by many architectures. In many places it isn't guarded by CONFIG_PROFILE which is needed for it to be used. Make it a weak symbol in kernel/profile.c and remove the 'return -EINVAL' implementations from the kenrel. There are a couple of architectures which do return 0 from the setup_profiling_timer() function but they don't seem to do anything else with it. To keep the /proc compatibility for now, leave these for a future update or removal. On ARM, this fixes the following sparse warning: arch/arm/kernel/smp.c:793:5: warning: symbol 'setup_profiling_timer' was not declared. Should it be static? Link: https://lkml.kernel.org/r/20220721195509.418205-1-ben-linux@fluff.org Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton arch/alpha/kernel/smp.c | 6 ------ arch/arc/kernel/smp.c | 8 -------- arch/arm/kernel/smp.c | 8 -------- arch/arm64/kernel/smp.c | 8 -------- arch/csky/kernel/smp.c | 5 ----- arch/hexagon/kernel/smp.c | 5 ----- arch/ia64/kernel/smp.c | 6 ------ arch/openrisc/kernel/smp.c | 6 ------ arch/parisc/kernel/smp.c | 7 ------- arch/powerpc/kernel/smp.c | 7 ------- arch/riscv/kernel/smp.c | 6 ------ arch/sparc/kernel/smp_32.c | 5 ----- arch/sparc/kernel/smp_64.c | 6 ------ arch/x86/include/asm/apic.h | 2 -- arch/x86/kernel/apic/apic.c | 5 ----- kernel/profile.c | 8 ++++++-- 16 files changed, 6 insertions(+), 92 deletions(-) commit 45ee6d1e935d879d86aebd1fd15afb3bc015c4a0 Author: Christophe JAILLET Date: Thu Jul 21 22:49:48 2022 +0200 ocfs2: fix a typo in a comment s/heartbaet/heartbeat Link: https://lkml.kernel.org/r/4d4a6786e8ad522bfad6d2401b7f6634f8af0e5d.1658436259.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Signed-off-by: Andrew Morton fs/ocfs2/heartbeat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 702f3cf374b85d2e77431c80e870ee31ea03cdd8 Author: Christophe JAILLET Date: Thu Jul 21 22:49:37 2022 +0200 ocfs2: use the bitmap API to simplify code Use bitmap_zero() instead of hand-writing it. It is less verbose. While at it, add an explicit #include . Link: https://lkml.kernel.org/r/86d2a027c319db12055c98f00c65f7d01e703722.1658436259.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Signed-off-by: Andrew Morton fs/ocfs2/heartbeat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 97d3b2676fc6bc4865eb825037f4492f0fb804eb Author: Christophe JAILLET Date: Thu Jul 21 22:49:25 2022 +0200 ocfs2: remove some useless functions Patch series "ocfs2: A few clean_ups", v2. __ocfs2_node_map_set_bit() and __ocfs2_node_map_clear_bit() are just wrapper around set_bit() and clear_bit(). The leading __ also makes think that these functions are non-atomic just like __set_bit() and __clear_bit(). So, just remove these wrappers and call set_bit() and clear_bit() directly. Link: https://lkml.kernel.org/r/cover.1658436259.git.christophe.jaillet@wanadoo.fr Link: https://lkml.kernel.org/r/bd1429c84ec7d174c96dbb67a2b42b1b456d9394.1658436259.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Signed-off-by: Andrew Morton fs/ocfs2/heartbeat.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) commit cf069c3b47fed4e475a13e3ec89451fbdb88869a Author: Slark Xiao Date: Fri Jul 22 18:19:22 2022 +0800 lib/mpi: fix typo 'the the' in comment Replace 'the the' with 'the' in the comment. Link: https://lkml.kernel.org/r/20220722101922.81126-1-slark_xiao@163.com Signed-off-by: Slark Xiao Cc: Hongbo Li Cc: Herbert Xu Signed-off-by: Andrew Morton lib/mpi/mpiutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed8fb78d7ecdeb3e2e86df0027e2c2cc55f9908b Author: Alexey Dobriyan Date: Sat Jul 23 20:09:07 2022 +0300 proc: add some (hopefully) insightful comments * /proc/${pid}/net status * removing PDE vs last close stuff (again!) * random small stuff Link: https://lkml.kernel.org/r/YtwrM6sDC0OQ53YB@localhost.localdomain Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton fs/proc/array.c | 4 ++++ fs/proc/inode.c | 17 ++++++++++++----- fs/proc/proc_net.c | 6 ++++++ fs/proc/root.c | 5 +++++ 4 files changed, 27 insertions(+), 5 deletions(-) commit fa7d574ba4f4f3f4f78d432c8545d9045daa89b1 Author: Xiu Jianfeng Date: Tue Jul 19 16:33:49 2022 +0800 bdi: remove enum wb_congested_state enum wb_congested_state and the member 'congested' in bdi_writeback are useless since commit a88f2096d5a2 ("remove congestion tracking framework"), so remove it. Link: https://lkml.kernel.org/r/20220719083349.87547-1-xiujianfeng@huawei.com Signed-off-by: Xiu Jianfeng Reviewed-by: Jan Kara Cc: NeilBrown Signed-off-by: Andrew Morton include/linux/backing-dev-defs.h | 7 ------- 1 file changed, 7 deletions(-) commit 591c32bddbe20ba0e172d9def3c7f22b9c926ad9 Author: Ben Dooks Date: Thu Jul 14 08:47:44 2022 +0100 kernel/hung_task: fix address space of proc_dohung_task_timeout_secs The proc_dohung_task_timeout_secs() function is incorrectly marked as having a __user buffer as argument 3. However this is not the case and it is casing multiple sparse warnings. Fix the following warnings by removing __user from the argument: kernel/hung_task.c:237:52: warning: incorrect type in argument 3 (different address spaces) kernel/hung_task.c:237:52: expected void * kernel/hung_task.c:237:52: got void [noderef] __user *buffer kernel/hung_task.c:287:35: warning: incorrect type in initializer (incompatible argument 3 (different address spaces)) kernel/hung_task.c:287:35: expected int ( [usertype] *proc_handler )( ... ) kernel/hung_task.c:287:35: got int ( * )( ... ) kernel/hung_task.c:295:35: warning: incorrect type in initializer (incompatible argument 3 (different address spaces)) kernel/hung_task.c:295:35: expected int ( [usertype] *proc_handler )( ... ) kernel/hung_task.c:295:35: got int ( * )( ... ) Link: https://lkml.kernel.org/r/20220714074744.189017-1-ben.dooks@sifive.com Signed-off-by: Ben Dooks Cc: Signed-off-by: Andrew Morton kernel/hung_task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a10c9ede9913fd54be61bbb01884e647e83dfcae Author: Jiangshan Yi Date: Thu Jul 14 09:54:41 2022 +0800 lib/lzo/lzo1x_compress.c: replace ternary operator with min() and min_t() Fix the following coccicheck warning: lib/lzo/lzo1x_compress.c:54: WARNING opportunity for min(). lib/lzo/lzo1x_compress.c:329: WARNING opportunity for min(). min() and min_t() macro is defined in include/linux/minmax.h. It avoids multiple evaluations of the arguments when non-constant and performs strict type-checking. Link: https://lkml.kernel.org/r/20220714015441.1313036-1-13667453960@163.com Signed-off-by: Jiangshan Yi Tested-by: Dave Rodgman Cc: Jonathan Corbet Signed-off-by: Andrew Morton lib/lzo/lzo1x_compress.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b09a7a036d2035b14636cd4c4c69518d73770f65 Author: Phillip Lougher Date: Fri Jun 17 16:38:15 2022 +0800 squashfs: support reading fragments in readahead call Add a function which can be used to read fragments in the readahead call. This function is necessary because filesystems built with the -tailends (or -always-use-fragments) option may have fragments present which cannot be currently handled. Link: https://lkml.kernel.org/r/20220617083810.337573-5-hsinyi@chromium.org Signed-off-by: Phillip Lougher Signed-off-by: Hsin-Yi Wang Cc: Hou Tao Cc: kernel test robot Cc: Marek Szyprowski Cc: Matthew Wilcox Cc: Miao Xie Cc: Xiongwei Song Cc: Zhang Yi Cc: Zheng Liang Signed-off-by: Andrew Morton fs/squashfs/file.c | 47 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) commit 8fc78b6fe24c36b151ac98d7546591ed92083d4f Author: Hsin-Yi Wang Date: Fri Jun 17 16:38:13 2022 +0800 squashfs: implement readahead Implement readahead callback for squashfs. It will read datablocks which cover pages in readahead request. For a few cases it will not mark page as uptodate, including: - file end is 0. - zero filled blocks. - current batch of pages isn't in the same datablock. - decompressor error. Otherwise pages will be marked as uptodate. The unhandled pages will be updated by readpage later. Link: https://lkml.kernel.org/r/20220617083810.337573-4-hsinyi@chromium.org Signed-off-by: Hsin-Yi Wang Suggested-by: Matthew Wilcox Reported-by: Matthew Wilcox Reported-by: Phillip Lougher Reported-by: Xiongwei Song Reported-by: Andrew Morton Cc: Hou Tao Cc: kernel test robot Cc: Marek Szyprowski Cc: Miao Xie Cc: Zhang Yi Cc: Zheng Liang Signed-off-by: Andrew Morton fs/squashfs/file.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-) commit db98b43086275350294f5c6f797249b714d6316d Author: Phillip Lougher Date: Fri Jun 17 16:38:11 2022 +0800 squashfs: always build "file direct" version of page actor Squashfs_readahead uses the "file direct" version of the page actor, and so build it unconditionally. Link: https://lkml.kernel.org/r/20220617083810.337573-3-hsinyi@chromium.org Signed-off-by: Phillip Lougher Signed-off-by: Hsin-Yi Wang Reported-by: kernel test robot Cc: Hou Tao Cc: Marek Szyprowski Cc: Matthew Wilcox Cc: Miao Xie Cc: Xiongwei Song Cc: Zhang Yi Cc: Zheng Liang Signed-off-by: Andrew Morton fs/squashfs/Makefile | 4 ++-- fs/squashfs/page_actor.h | 46 ---------------------------------------------- 2 files changed, 2 insertions(+), 48 deletions(-) commit 0c12185728d602c27cd12a845249e7f37197f71f Author: Hsin-Yi Wang Date: Fri Jun 17 16:38:09 2022 +0800 Revert "squashfs: provide backing_dev_info in order to disable read-ahead" Patch series "Implement readahead for squashfs", v7. Commit 9eec1d897139("squashfs: provide backing_dev_info in order to disable read-ahead") mitigates the performance drop issue for squashfs by closing readahead for it. This series implements readahead callback for squashfs. This patch (of 4): This reverts 9eec1d897139e5 ("squashfs: provide backing_dev_info in order to disable read-ahead"). Revert closing the readahead to squashfs since the readahead callback for squashfs is implemented. Link: https://lkml.kernel.org/r/20220617083810.337573-1-hsinyi@chromium.org Link: https://lkml.kernel.org/r/20220617083810.337573-2-hsinyi@chromium.org Signed-off-by: Hsin-Yi Wang Suggested-by: Xiongwei Song Cc: Phillip Lougher Cc: Matthew Wilcox Cc: Marek Szyprowski Cc: Zheng Liang Cc: Zhang Yi Cc: Hou Tao Cc: Miao Xie Cc: kernel test robot Signed-off-by: Andrew Morton fs/squashfs/super.c | 33 --------------------------------- 1 file changed, 33 deletions(-) commit 1a44131d4f524e18d873bbe363598e39841001bf Author: Sophia Gabriella Date: Thu Jul 28 16:51:39 2022 +0000 mm: Kconfig: fix typo Fixes a typo in the help section for ZSWAP. Link: https://lkml.kernel.org/r/Message-ID: Signed-off-by: Sophia Gabriella Signed-off-by: Andrew Morton mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96f96763de26d6ee333d5b2446d1b04a4e6bc75b Author: Kefeng Wang Date: Tue Jul 26 16:10:46 2022 +0800 mm: memory-failure: convert to pr_fmt() Use pr_fmt to prefix all pr_ output, but unpoison_memory() and soft_offline_page() are used by error injection, which have own prefixes like "Unpoison:" and "soft offline:", meanwhile, soft_offline_page() could be used by memory hotremove, so reset pr_fmt before unpoison_pr_info definition to keep the original output for them. [wangkefeng.wang@huawei.com: v3] Link: https://lkml.kernel.org/r/20220729031919.72331-1-wangkefeng.wang@huawei.com Link: https://lkml.kernel.org/r/20220726081046.10742-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: Naoya Horiguchi Reviewed-by: Miaohe Lin Signed-off-by: Andrew Morton mm/memory-failure.c | 58 ++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 30 deletions(-) commit 07252dfea2c7089bca68949710268cbbb0ce509e Author: Kefeng Wang Date: Tue Jul 26 21:11:35 2022 +0800 mm: use is_zone_movable_page() helper Use is_zone_movable_page() helper to simplify code. Link: https://lkml.kernel.org/r/20220726131135.146912-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: David Hildenbrand Reviewed-by: Pankaj Gupta Acked-by: Jason Wang Signed-off-by: Andrew Morton drivers/virtio/virtio_mem.c | 6 ++---- mm/memory_hotplug.c | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) commit 116807634569bdb9defe1c01e442e76e4f432961 Author: Miaohe Lin Date: Tue Jul 26 22:29:18 2022 +0800 hugetlbfs: fix inaccurate comment in hugetlbfs_statfs() In some cases, e.g. when size option is not specified, f_blocks, f_bavail and f_bfree will be set to -1 instead of 0. Likewise, when nr_inodes isn't specified, f_files and f_ffree will be set to -1 too. Update the comment to make this clear. Link: https://lkml.kernel.org/r/20220726142918.51693-6-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song Signed-off-by: Andrew Morton fs/hugetlbfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 445c809829dc164c5b1917c72e335bd294aa4dc8 Author: Miaohe Lin Date: Tue Jul 26 22:29:17 2022 +0800 hugetlbfs: cleanup some comments in inode.c The function generic_file_buffered_read has been renamed to filemap_read since commit 87fa0f3eb267 ("mm/filemap: rename generic_file_buffered_read to filemap_read"). Update the corresponding comment. And duplicated taken in hugetlbfs_fill_super is removed. Link: https://lkml.kernel.org/r/20220726142918.51693-5-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song Signed-off-by: Andrew Morton fs/hugetlbfs/inode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 990e52b17d048970cb9629f1d546542b2c256f3a Author: Miaohe Lin Date: Tue Jul 26 22:29:16 2022 +0800 hugetlbfs: remove unneeded header file The header file signal.h is unneeded now. Remove it. Link: https://lkml.kernel.org/r/20220726142918.51693-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song Signed-off-by: Andrew Morton fs/hugetlbfs/inode.c | 1 - 1 file changed, 1 deletion(-) commit 7ec3c362cfc4cf7aa8d29416c34d0dc0817cf9aa Author: Miaohe Lin Date: Tue Jul 26 22:29:15 2022 +0800 hugetlbfs: remove unneeded hugetlbfs_ops forward declaration The forward declaration for hugetlbfs_ops is unnecessary. Remove it. Link: https://lkml.kernel.org/r/20220726142918.51693-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song Signed-off-by: Andrew Morton fs/hugetlbfs/inode.c | 1 - 1 file changed, 1 deletion(-) commit d00365175e092a3144ecbee3181f46682b5b5e97 Author: Miaohe Lin Date: Tue Jul 26 22:29:14 2022 +0800 hugetlbfs: use helper macro SZ_1{K,M} Patch series "A few cleanup and fixup patches for hugetlbfs", v2. This series contains a few cleaup patches to remove unneeded forward declaration, use helper macro and so on. More details can be found in the respective changelogs. This patch (of 5): Use helper macro SZ_1K and SZ_1M to do the size conversion. Minor readability improvement. Link: https://lkml.kernel.org/r/20220726142918.51693-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20220726142918.51693-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song Signed-off-by: Andrew Morton fs/hugetlbfs/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bb077c3ffd5362a6d9e60574e1bcc83fe8e3fb27 Author: Kefeng Wang Date: Tue Jul 26 21:18:16 2022 +0800 mm: cleanup is_highmem() It is unnecessary to add CONFIG_HIGHMEM check in is_highmem(), which has been done in is_highmem_idx(), and move is_highmem() close to is_highmem_idx(). This has no functional impact. Link: https://lkml.kernel.org/r/20220726131816.149075-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Signed-off-by: Andrew Morton include/linux/mmzone.h | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit f6c3e1ae0114cd0f5123cf38187d450c1b119e67 Author: Ralph Campbell Date: Mon Jul 25 11:36:15 2022 -0700 mm/hmm: add a test for cross device private faults Add a simple test case for when hmm_range_fault() is called with the HMM_PFN_REQ_FAULT flag and a device private PTE is found for a device other than the hmm_range::dev_private_owner. This should cause the page to be faulted back to system memory from the other device and the PFN returned in the output array. Also, remove a piece of code that unnecessarily unmaps part of the buffer. Link: https://lkml.kernel.org/r/20220727000837.4128709-3-rcampbell@nvidia.com Link: https://lkml.kernel.org/r/20220725183615.4118795-3-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Reviewed-by: Alistair Popple Cc: Felix Kuehling Cc: Philip Yang Cc: Jason Gunthorpe Signed-off-by: Andrew Morton tools/testing/selftests/vm/hmm-tests.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 68deb82a7bfcf67c6491c2387215e038b525475f Author: Peter Xu Date: Mon Jul 25 10:20:48 2022 -0400 selftests: add soft-dirty into run_vmtests.sh Link: https://lkml.kernel.org/r/20220725142048.30450-4-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Nadav Amit Signed-off-by: Andrew Morton tools/testing/selftests/vm/run_vmtests.sh | 2 ++ 1 file changed, 2 insertions(+) commit c942f5bd17b3a520710c6b80634be5c44aaa109e Author: Peter Xu Date: Mon Jul 25 10:20:47 2022 -0400 selftests: soft-dirty: add test for mprotect Add two soft-dirty test cases for mprotect() on both anon or file. Link: https://lkml.kernel.org/r/20220725142048.30450-3-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Nadav Amit Signed-off-by: Andrew Morton tools/testing/selftests/vm/soft-dirty.c | 67 ++++++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) commit 76aefad628aae152207ee624a7981b9aa1a267d8 Author: Peter Xu Date: Mon Jul 25 10:20:46 2022 -0400 mm/mprotect: fix soft-dirty check in can_change_pte_writable() Patch series "mm/mprotect: Fix soft-dirty checks", v4. This patch (of 3): The check wanted to make sure when soft-dirty tracking is enabled we won't grant write bit by accident, as a page fault is needed for dirty tracking. The intention is correct but we didn't check it right because VM_SOFTDIRTY set actually means soft-dirty tracking disabled. Fix it. There's another thing tricky about soft-dirty is that, we can't check the vma flag !(vma_flags & VM_SOFTDIRTY) directly but only check it after we checked CONFIG_MEM_SOFT_DIRTY because otherwise VM_SOFTDIRTY will be defined as zero, and !(vma_flags & VM_SOFTDIRTY) will constantly return true. To avoid misuse, introduce a helper for checking whether vma has soft-dirty tracking enabled. We can easily verify this with any exclusive anonymous page, like program below: =======8<====== #include #include #include #include #include #include #include #include #include #include #include #include #include #define BIT_ULL(nr) (1ULL << (nr)) #define PM_SOFT_DIRTY BIT_ULL(55) unsigned int psize; char *page; uint64_t pagemap_read_vaddr(int fd, void *vaddr) { uint64_t value; int ret; ret = pread(fd, &value, sizeof(uint64_t), ((uint64_t)vaddr >> 12) * sizeof(uint64_t)); assert(ret == sizeof(uint64_t)); return value; } void clear_refs_write(void) { int fd = open("/proc/self/clear_refs", O_RDWR); assert(fd >= 0); write(fd, "4", 2); close(fd); } #define check_soft_dirty(str, expect) do { \ bool dirty = pagemap_read_vaddr(fd, page) & PM_SOFT_DIRTY; \ if (dirty != expect) { \ printf("ERROR: %s, soft-dirty=%d (expect: %d) ", str, dirty, expect); \ exit(-1); \ } \ } while (0) int main(void) { int fd = open("/proc/self/pagemap", O_RDONLY); assert(fd >= 0); psize = getpagesize(); page = mmap(NULL, psize, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); assert(page != MAP_FAILED); *page = 1; check_soft_dirty("Just faulted in page", 1); clear_refs_write(); check_soft_dirty("Clear_refs written", 0); mprotect(page, psize, PROT_READ); check_soft_dirty("Marked RO", 0); mprotect(page, psize, PROT_READ|PROT_WRITE); check_soft_dirty("Marked RW", 0); *page = 2; check_soft_dirty("Wrote page again", 1); munmap(page, psize); close(fd); printf("Test passed. "); return 0; } =======8<====== Here we attach a Fixes to commit 64fe24a3e05e only for easy tracking, as this patch won't apply to a tree before that point. However the commit wasn't the source of problem, but instead 64e455079e1b. It's just that after 64fe24a3e05e anonymous memory will also suffer from this problem with mprotect(). Link: https://lkml.kernel.org/r/20220725142048.30450-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20220725142048.30450-2-peterx@redhat.com Fixes: 64e455079e1b ("mm: softdirty: enable write notifications on VMAs after VM_SOFTDIRTY cleared") Fixes: 64fe24a3e05e ("mm/mprotect: try avoiding write faults for exclusive anonymous pages when changing protection") Signed-off-by: Peter Xu Reviewed-by: David Hildenbrand Cc: Nadav Amit Cc: Andrea Arcangeli Signed-off-by: Andrew Morton mm/internal.h | 18 ++++++++++++++++++ mm/mmap.c | 2 +- mm/mprotect.c | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) commit 68aaee147e597b495622b7c9038e5922c7c61f57 Author: Tetsuo Handa Date: Fri Jul 22 19:45:39 2022 +0900 mm: memcontrol: fix potential oom_lock recursion deadlock syzbot is reporting GFP_KERNEL allocation with oom_lock held when reporting memcg OOM [1]. If this allocation triggers the global OOM situation then the system can livelock because the GFP_KERNEL allocation with oom_lock held cannot trigger the global OOM killer because __alloc_pages_may_oom() fails to hold oom_lock. Fix this problem by removing the allocation from memory_stat_format() completely, and pass static buffer when calling from memcg OOM path. Note that the caller holding filesystem lock was the trigger for syzbot to report this locking dependency. Doing GFP_KERNEL allocation with filesystem lock held can deadlock the system even without involving OOM situation. Link: https://syzkaller.appspot.com/bug?extid=2d2aeadc6ce1e1f11d45 [1] Link: https://lkml.kernel.org/r/86afb39f-8c65-bec2-6cfc-c5e3cd600c0b@I-love.SAKURA.ne.jp Fixes: c8713d0b23123759 ("mm: memcontrol: dump memory.stat during cgroup OOM") Signed-off-by: Tetsuo Handa Reported-by: syzbot Suggested-by: Michal Hocko Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Roman Gushchin Cc: Shakeel Butt Signed-off-by: Andrew Morton mm/memcontrol.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 65974cb9107d9c6da18cefda22f84aeabc638b16 Author: Alistair Popple Date: Thu Jul 21 12:05:52 2022 +1000 mm/gup.c: fix formatting in check_and_migrate_movable_page() Commit b05a79d4377f ("mm/gup: migrate device coherent pages when pinning instead of failing") added a badly formatted if statement. Fix it. Link: https://lkml.kernel.org/r/20220721020552.1397598-2-apopple@nvidia.com Signed-off-by: Alistair Popple Reported-by: David Hildenbrand Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton mm/gup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 35fcd75af3edf035638e632bb49607cc8fc3cdf4 Author: Shiyang Ruan Date: Thu Jun 9 22:34:35 2022 +0800 xfs: fail dax mount if reflink is enabled on a partition Failure notification is not supported on partitions. So, when we mount a reflink enabled xfs on a partition with dax option, let it fail with -EINVAL code. Link: https://lkml.kernel.org/r/20220609143435.393724-1-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Cc: Dave Chinner Signed-off-by: Andrew Morton fs/xfs/xfs_super.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 873f64b791a2b43c246e78b7d9fdd64ce909685b Author: Jiebin Sun Date: Sat Jul 23 00:49:49 2022 +0800 mm/memcontrol.c: remove the redundant updating of stats_flush_threshold Remove the redundant updating of stats_flush_threshold. If the global var stats_flush_threshold has exceeded the trigger value for __mem_cgroup_flush_stats, further increment is unnecessary. Apply the patch and test the pts/hackbench-1.0.0 Count:4 (160 threads). Score gain: 1.95x Reduce CPU cycles in __mod_memcg_lruvec_state (44.88% -> 0.12%) CPU: ICX 8380 x 2 sockets Core number: 40 x 2 physical cores Benchmark: pts/hackbench-1.0.0 Count:4 (160 threads) Link: https://lkml.kernel.org/r/20220722164949.47760-1-jiebin.sun@intel.com Signed-off-by: Jiebin Sun Acked-by: Shakeel Butt Reviewed-by: Roman Gushchin Reviewed-by: Tim Chen Acked-by: Muchun Song Cc: Johannes Weiner Cc: Michal Hocko Cc: "Huang, Ying" Cc: Amadeusz Sawiski Signed-off-by: Andrew Morton mm/memcontrol.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 914eedcb9ba0ff53c3380829a024b7cef16accfb Author: Axel Rasmussen Date: Fri Jul 22 13:15:13 2022 -0700 userfaultfd: don't fail on unrecognized features The basic interaction for setting up a userfaultfd is, userspace issues a UFFDIO_API ioctl, and passes in a set of zero or more feature flags, indicating the features they would prefer to use. Of course, different kernels may support different sets of features (depending on kernel version, kconfig options, architecture, etc). Userspace's expectations may also not match: perhaps it was built against newer kernel headers, which defined some features the kernel it's running on doesn't support. Currently, if userspace passes in a flag we don't recognize, the initialization fails and we return -EINVAL. This isn't great, though. Userspace doesn't have an obvious way to react to this; sure, one of the features I asked for was unavailable, but which one? The only option it has is to turn off things "at random" and hope something works. Instead, modify UFFDIO_API to just ignore any unrecognized feature flags. The interaction is now that the initialization will succeed, and as always we return the *subset* of feature flags that can actually be used back to userspace. Now userspace has an obvious way to react: it checks if any flags it asked for are missing. If so, it can conclude this kernel doesn't support those, and it can either resign itself to not using them, or fail with an error on its own, or whatever else. Link: https://lkml.kernel.org/r/20220722201513.1624158-1-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Cc: Peter Xu Cc: Axel Rasmussen Signed-off-by: Andrew Morton fs/userfaultfd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2727cfe4072a35ce813e3708f74c135de7da8897 Author: Miaohe Lin Date: Sat Jul 23 15:38:04 2022 +0800 hugetlb_cgroup: fix wrong hugetlb cgroup numa stat We forget to set cft->private for numa stat file. As a result, numa stat of hstates[0] is always showed for all hstates. Encode the hstates index into cft->private to fix this issue. Link: https://lkml.kernel.org/r/20220723073804.53035-1-linmiaohe@huawei.com Fixes: f47761999052 ("hugetlb: add hugetlb.*.numa_stat file") Signed-off-by: Miaohe Lin Acked-by: Muchun Song Cc: Kees Cook Cc: Mike Kravetz Cc: Mina Almasry Cc: Shakeel Butt Cc: Signed-off-by: Andrew Morton mm/hugetlb_cgroup.c | 1 + 1 file changed, 1 insertion(+) commit 360b420dbded8ad5b70a41de98e77354dd9e7d36 Author: Dan Carpenter Date: Tue Jul 19 12:04:14 2022 +0300 selftest/vm: uninitialized variable in main() Initialize "length" to zero by default. Link: https://lkml.kernel.org/r/YtZzjvHXVXMXxpXO@kili Fixes: ff712a627f72 ("selftests/vm: cleanup hugetlb file after mremap test") Signed-off-by: Dan Carpenter Reviewed-by: Mina Almasry Reviewed-by: Muchun Song Cc: Mike Kravetz Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/vm/hugepage-mremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 198729c9627a754b26aebdc8a26e559424c8f06c Author: Kassey Li Date: Tue Jul 19 17:15:54 2022 +0800 mm/cma_debug.c: align the name buffer length as struct cma Avoids truncating the debugfs output to 16 chars. Potentially alters the userspace output, but this is a debugfs interface and there are no stability guarantees. Link: https://lkml.kernel.org/r/20220719091554.27864-1-quic_yingangl@quicinc.com Signed-off-by: Kassey Li Cc: Sasha Levin Cc: Joonsoo Kim Cc: Minchan Kim Signed-off-by: Andrew Morton mm/cma_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d5367a0426da61c7cb616cc85b6239467e261dd Author: Dan Carpenter Date: Tue Jul 19 12:42:48 2022 +0300 tools/testing/selftests/vm/hugetlb-madvise.c: silence uninitialized variable warning This code just reads from memory without caring about the data itself. However static checkers complain that "tmp" is never properly initialized. Initialize it to zero and change the name to "dummy" to show that we don't care about the value stored in it. Link: https://lkml.kernel.org/r/YtZ8mKJmktA2GaHB@kili Fixes: c4b6cb884011 ("selftests/vm: add hugetlb madvise MADV_DONTNEED MADV_REMOVE test") Signed-off-by: Dan Carpenter Acked-by: Souptick Joarder (HPE) Reviewed-by: Mike Kravetz Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/vm/hugetlb-madvise.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6d97cf88ddde9c976d04b886b10b464ec8006c85 Author: Miaohe Lin Date: Tue Jul 19 19:52:33 2022 +0800 mm/mempolicy: remove unneeded out label We can use unlock label to unlock ptl and return ret directly to remove the unneeded out label and reduce the size of mempolicy.o. No functional change intended. [Before] text data bss dec hex filename 26702 3972 6168 36842 8fea mm/mempolicy.o [After] text data bss dec hex filename 26662 3972 6168 36802 8fc2 mm/mempolicy.o Link: https://lkml.kernel.org/r/20220719115233.6706-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton mm/mempolicy.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 189cdcfeeff31a285313c5132b81ae0b998dcad5 Author: Mark-PK Tsai Date: Mon Jul 18 20:03:35 2022 +0800 mm/page_alloc: correct the wrong cpuset file path in comment cpuset.c was moved to kernel/cgroup/ in below commit 201af4c0fab0 ("cgroup: move cgroup files under kernel/cgroup/") Correct the wrong path in comment. Link: https://lkml.kernel.org/r/20220718120336.5145-1-mark-pk.tsai@mediatek.com Signed-off-by: Mark-PK Tsai Signed-off-by: Andrew Morton mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d8ff64097092701a5e5506d0d7f643d421e0432 Author: Miaohe Lin Date: Sat Jul 16 16:18:16 2022 +0800 mm: remove unneeded PageAnon check in restore_exclusive_pte() When code reaches here, the page must be !PageAnon. There's no need to check PageAnon again. Remove it. Link: https://lkml.kernel.org/r/20220716081816.10752-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b7a4039d6856f66521486da68c76838929039eb Author: Yixuan Cao Date: Mon Jul 18 03:55:06 2022 +0800 tools/vm/page_owner_sort.c: adjust the indent in is_need() I noticed one more indentation than necessary in is_need(). Link: https://lkml.kernel.org/r/20220717195506.7602-1-caoyixuan2019@email.szu.edu.cn Signed-off-by: Yixuan Cao Signed-off-by: Andrew Morton tools/vm/page_owner_sort.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit e408e695f5f1f60d784913afc45ff2c387a5aeb8 Author: Theodore Ts'o Date: Thu Jul 14 21:59:12 2022 -0400 mm/shmem: support FS_IOC_[SG]ETFLAGS in tmpfs This allows userspace to set flags like FS_APPEND_FL, FS_IMMUTABLE_FL, FS_NODUMP_FL, etc., like all other standard Linux file systems. [akpm@linux-foundation.org: fix CONFIG_TMPFS_XATTR=n warnings] Link: https://lkml.kernel.org/r/20220715015912.2560575-1-tytso@mit.edu Signed-off-by: Theodore Ts'o Cc: Hugh Dickins Signed-off-by: Andrew Morton include/linux/shmem_fs.h | 11 +++++++++ mm/shmem.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 74 insertions(+), 1 deletion(-) commit 188043c7f4f2bd662f2a55957d684fffa543e600 Author: Jianglei Nie Date: Thu Jul 14 14:37:46 2022 +0800 mm/damon/reclaim: fix potential memory leak in damon_reclaim_init() damon_reclaim_init() allocates a memory chunk for ctx with damon_new_ctx(). When damon_select_ops() fails, ctx is not released, which will lead to a memory leak. We should release the ctx with damon_destroy_ctx() when damon_select_ops() fails to fix the memory leak. Link: https://lkml.kernel.org/r/20220714063746.2343549-1-niejianglei2021@163.com Fixes: 4d69c3457821 ("mm/damon/reclaim: use damon_select_ops() instead of damon_{v,p}a_set_operations()") Signed-off-by: Jianglei Nie Reviewed-by: SeongJae Park Cc: Signed-off-by: Andrew Morton mm/damon/reclaim.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 73b73bac90d97400e29e585c678c4d0ebfd2680d Author: Yosry Ahmed Date: Thu Jul 14 06:49:18 2022 +0000 mm: vmpressure: don't count proactive reclaim in vmpressure memory.reclaim is a cgroup v2 interface that allows users to proactively reclaim memory from a memcg, without real memory pressure. Reclaim operations invoke vmpressure, which is used: (a) To notify userspace of reclaim efficiency in cgroup v1, and (b) As a signal for a memcg being under memory pressure for networking (see mem_cgroup_under_socket_pressure()). For (a), vmpressure notifications in v1 are not affected by this change since memory.reclaim is a v2 feature. For (b), the effects of the vmpressure signal (according to Shakeel [1]) are as follows: 1. Reducing send and receive buffers of the current socket. 2. May drop packets on the rx path. 3. May throttle current thread on the tx path. Since proactive reclaim is invoked directly by userspace, not by memory pressure, it makes sense not to throttle networking. Hence, this change makes sure that proactive reclaim caused by memory.reclaim does not trigger vmpressure. [1] https://lore.kernel.org/lkml/CALvZod68WdrXEmBpOkadhB5GPYmCXaDZzXH=yyGOCAjFRn4NDQ@mail.gmail.com/ [yosryahmed@google.com: update documentation] Link: https://lkml.kernel.org/r/20220721173015.2643248-1-yosryahmed@google.com Link: https://lkml.kernel.org/r/20220714064918.2576464-1-yosryahmed@google.com Signed-off-by: Yosry Ahmed Acked-by: Shakeel Butt Acked-by: Michal Hocko Acked-by: David Rientjes Cc: Johannes Weiner Cc: Roman Gushchin Cc: Muchun Song Cc: Matthew Wilcox Cc: Vlastimil Babka Cc: David Hildenbrand Cc: Miaohe Lin Cc: NeilBrown Cc: Alistair Popple Cc: Suren Baghdasaryan Cc: Peter Xu Signed-off-by: Andrew Morton Documentation/admin-guide/cgroup-v2.rst | 7 +++++++ include/linux/swap.h | 5 ++++- mm/memcontrol.c | 24 ++++++++++++++---------- mm/vmscan.c | 27 +++++++++++++++++---------- 4 files changed, 42 insertions(+), 21 deletions(-) commit c7e6f17b52e9486a9d997368819dfec032b550e2 Author: Hui Zhu Date: Thu Jul 14 16:07:57 2022 +0800 zsmalloc: zs_malloc: return ERR_PTR on failure zs_malloc returns 0 if it fails. zs_zpool_malloc will return -1 when zs_malloc return 0. But -1 makes the return value unclear. For example, when zswap_frontswap_store calls zs_malloc through zs_zpool_malloc, it will return -1 to its caller. The other return value is -EINVAL, -ENODEV or something else. This commit changes zs_malloc to return ERR_PTR on failure. It didn't just let zs_zpool_malloc return -ENOMEM becaue zs_malloc has two types of failure: - size is not OK return -EINVAL - memory alloc fail return -ENOMEM. Link: https://lkml.kernel.org/r/20220714080757.12161-1-teawater@gmail.com Signed-off-by: Hui Zhu Cc: Minchan Kim Cc: Nitin Gupta Cc: Sergey Senozhatsky Cc: Jens Axboe Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 4 ++-- mm/zsmalloc.c | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) commit fef3e9066d19230f661048ca86937d954c12cd50 Author: Xiu Jianfeng Date: Thu Jul 14 16:41:47 2022 +0800 writeback: remove inode_to_wb_is_valid() inode_to_wb_is_valid() is no longer used since commit fe55d563d417 ("remove inode_congested()"), remove it. Link: https://lkml.kernel.org/r/20220714084147.140324-1-xiujianfeng@huawei.com Signed-off-by: Xiu Jianfeng Reviewed-by: Johannes Thumshirn Reviewed-by: Jan Kara Signed-off-by: Andrew Morton include/linux/backing-dev.h | 17 ----------------- 1 file changed, 17 deletions(-) commit 450d0e74d886c172ac2f72518b797a18ee8d1327 Author: Zhou Guanghui Date: Wed Jun 15 10:27:42 2022 +0000 memblock,arm64: expand the static memblock memory table In a system(Huawei Ascend ARM64 SoC) using HBM, a multi-bit ECC error occurs, and the BIOS will mark the corresponding area (for example, 2 MB) as unusable. When the system restarts next time, these areas are not reported or reported as EFI_UNUSABLE_MEMORY. Both cases lead to an increase in the number of memblocks, whereas EFI_UNUSABLE_MEMORY leads to a larger number of memblocks. For example, if the EFI_UNUSABLE_MEMORY type is reported: ... memory[0x92] [0x0000200834a00000-0x0000200835bfffff], 0x0000000001200000 bytes on node 7 flags: 0x0 memory[0x93] [0x0000200835c00000-0x0000200835dfffff], 0x0000000000200000 bytes on node 7 flags: 0x4 memory[0x94] [0x0000200835e00000-0x00002008367fffff], 0x0000000000a00000 bytes on node 7 flags: 0x0 memory[0x95] [0x0000200836800000-0x00002008369fffff], 0x0000000000200000 bytes on node 7 flags: 0x4 memory[0x96] [0x0000200836a00000-0x0000200837bfffff], 0x0000000001200000 bytes on node 7 flags: 0x0 memory[0x97] [0x0000200837c00000-0x0000200837dfffff], 0x0000000000200000 bytes on node 7 flags: 0x4 memory[0x98] [0x0000200837e00000-0x000020087fffffff], 0x0000000048200000 bytes on node 7 flags: 0x0 memory[0x99] [0x0000200880000000-0x0000200bcfffffff], 0x0000000350000000 bytes on node 6 flags: 0x0 memory[0x9a] [0x0000200bd0000000-0x0000200bd01fffff], 0x0000000000200000 bytes on node 6 flags: 0x4 memory[0x9b] [0x0000200bd0200000-0x0000200bd07fffff], 0x0000000000600000 bytes on node 6 flags: 0x0 memory[0x9c] [0x0000200bd0800000-0x0000200bd09fffff], 0x0000000000200000 bytes on node 6 flags: 0x4 memory[0x9d] [0x0000200bd0a00000-0x0000200fcfffffff], 0x00000003ff600000 bytes on node 6 flags: 0x0 memory[0x9e] [0x0000200fd0000000-0x0000200fd01fffff], 0x0000000000200000 bytes on node 6 flags: 0x4 memory[0x9f] [0x0000200fd0200000-0x0000200fffffffff], 0x000000002fe00000 bytes on node 6 flags: 0x0 ... The EFI memory map is parsed to construct the memblock arrays before the memblock arrays can be resized. As the result, memory regions beyond INIT_MEMBLOCK_REGIONS are lost. Add a new macro INIT_MEMBLOCK_MEMORY_REGIONS to replace INIT_MEMBLOCK_REGTIONS to define the size of the static memblock.memory array. Allow overriding memblock.memory array size with architecture defined INIT_MEMBLOCK_MEMORY_REGIONS and make arm64 to set INIT_MEMBLOCK_MEMORY_REGIONS to 1024 when CONFIG_EFI is enabled. Link: https://lkml.kernel.org/r/20220615102742.96450-1-zhouguanghui1@huawei.com Signed-off-by: Zhou Guanghui Acked-by: Mike Rapoport Tested-by: Darren Hart Acked-by: Will Deacon [arm64] Reviewed-by: Anshuman Khandual Cc: Xu Qiang Signed-off-by: Andrew Morton arch/arm64/include/asm/memory.h | 9 +++++++++ mm/memblock.c | 14 +++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) commit 0f0b6931ff0d8de344392f5d470f88af64130709 Author: Miaohe Lin Date: Sat Jul 16 16:03:59 2022 +0800 mm: remove obsolete comment in do_fault_around() Since commit 7267ec008b5c ("mm: postpone page table allocation until we have page to map"), do_fault_around is not called with page table lock held. Cleanup the corresponding comments. Link: https://lkml.kernel.org/r/20220716080359.38791-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton mm/memory.c | 4 ---- 1 file changed, 4 deletions(-) commit b717d6b93b54ec2a2a7d3bb7268d3ff847cc54c5 Author: William Lam Date: Mon Jul 11 21:28:06 2022 +0100 mm: compaction: include compound page count for scanning in pageblock isolation The number of scanned pages can be lower than the number of isolated pages when isolating mirgratable or free pageblock. The metric is being reported in trace event and also used in vmstat. some example output from trace where it shows nr_taken can be greater than nr_scanned: Produced by kernel v5.19-rc6 kcompactd0-42 [001] ..... 1210.268022: mm_compaction_isolate_migratepages: range=(0x107ae4 ~ 0x107c00) nr_scanned=265 nr_taken=255 [...] kcompactd0-42 [001] ..... 1210.268382: mm_compaction_isolate_freepages: range=(0x215800 ~ 0x215a00) nr_scanned=13 nr_taken=128 kcompactd0-42 [001] ..... 1210.268383: mm_compaction_isolate_freepages: range=(0x215600 ~ 0x215680) nr_scanned=1 nr_taken=128 mm_compaction_isolate_migratepages does not seem to have this behaviour, but for the reason of consistency, nr_scanned should also be taken care of in that side. This behaviour is confusing since currently the count for isolated pages takes account of compound page but not for the case of scanned pages. And given that the number of isolated pages(nr_taken) reported in mm_compaction_isolate_template trace event is on a single-page basis, the ambiguity when reporting the number of scanned pages can be removed by also including compound page count. Link: https://lkml.kernel.org/r/20220711202806.22296-1-william.lam@bytedance.com Signed-off-by: William Lam Reviewed-by: Punit Agrawal Cc: Mel Gorman Signed-off-by: Andrew Morton mm/compaction.c | 3 +++ 1 file changed, 3 insertions(+) commit ac3ced5fc12fb3d7268054485cbc36441c05cf24 Author: Adam Sindelar Date: Mon Jul 4 14:38:13 2022 +0200 selftests/vm: skip 128TBswitch on unsupported arch The test va_128TBswitch.c exercises a feature only supported on PPC and x86_64, but it's run on other 64-bit archs as well. Before this patch, the test did nothing and returned 0 for KSFT_PASS. This patch makes it return the KSFT codes from kselftest.h, including KSFT_SKIP when appropriate. Verified on arm64 and x86_64. Link: https://lkml.kernel.org/r/20220704123813.427625-1-adam@wowsignal.io Signed-off-by: Adam Sindelar Cc: David Vernet Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/vm/va_128TBswitch.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3b8e7f5c42d1aa44f71fd219717c80e34101361e Author: Adam Sindelar Date: Mon Jul 4 19:33:51 2022 +0200 selftests/vm: fix errno handling in mrelease_test mrelease_test should return KSFT_SKIP when process_mrelease is not defined, but due to a perror call consuming the errno, it returns KSFT_FAIL. This patch decides the exit code before calling perror. [adam@wowsignal.io: fix remaining instances of errno mishandling] Link: https://lkml.kernel.org/r/20220706141602.10159-1-adam@wowsignal.io Link: https://lkml.kernel.org/r/20220704173351.19595-1-adam@wowsignal.io Fixes: 33776141b812 ("selftests: vm: add process_mrelease tests") Signed-off-by: Adam Sindelar Reviewed-by: David Vernet Reviewed-by: Suren Baghdasaryan Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/vm/mrelease_test.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit d6e103a757fa7876e7ded76128d5dffe12402ab9 Author: Roman Gushchin Date: Fri Jul 1 20:35:21 2022 -0700 mm: memcontrol: do not miss MEMCG_MAX events for enforced allocations Yafang Shao reported an issue related to the accounting of bpf memory: if a bpf map is charged indirectly for memory consumed from an interrupt context and allocations are enforced, MEMCG_MAX events are not raised. It's not/less of an issue in a generic case because consequent allocations from a process context will trigger the direct reclaim and MEMCG_MAX events will be raised. However a bpf map can belong to a dying/abandoned memory cgroup, so there will be no allocations from a process context and no MEMCG_MAX events will be triggered. Link: https://lkml.kernel.org/r/20220702033521.64630-1-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Reported-by: Yafang Shao Acked-by: Shakeel Butt Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Muchun Song Signed-off-by: Andrew Morton mm/memcontrol.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit ccac11da679bc283a5fe3db694d9f4f40245a07e Author: Miaohe Lin Date: Mon Jun 27 21:23:51 2022 +0800 filemap: minor cleanup for filemap_write_and_wait_range Restructure the logic in filemap_write_and_wait_range to simplify the code and make it more consistent with file_write_and_wait_range. No functional change intended. Link: https://lkml.kernel.org/r/20220627132351.55680-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Muchun Song Cc: Matthew Wilcox Signed-off-by: Andrew Morton mm/filemap.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 7f82f922319ede486540e8746769865b9508d2c2 Author: Miaohe Lin Date: Sat Jun 18 16:20:27 2022 +0800 mm/mmap.c: fix missing call to vm_unacct_memory in mmap_region Since the beginning, charged is set to 0 to avoid calling vm_unacct_memory twice because vm_unacct_memory will be called by above unmap_region. But since commit 4f74d2c8e827 ("vm: remove 'nr_accounted' calculations from the unmap_vmas() interfaces"), unmap_region doesn't call vm_unacct_memory anymore. So charged shouldn't be set to 0 now otherwise the calling to paired vm_unacct_memory will be missed and leads to imbalanced account. Link: https://lkml.kernel.org/r/20220618082027.43391-1-linmiaohe@huawei.com Fixes: 4f74d2c8e827 ("vm: remove 'nr_accounted' calculations from the unmap_vmas() interfaces") Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton mm/mmap.c | 1 - 1 file changed, 1 deletion(-) commit b0cab80ecd54ae3b2356bb081af0bffd538c8265 Author: Liam Howlett Date: Mon Jun 27 15:18:59 2022 +0000 android: binder: fix lockdep check on clearing vma When munmapping a vma, the mmap_lock can be degraded to a write before calling close() on the file handle. The binder close() function calls binder_alloc_set_vma() to clear the vma address, which now has a lock dep check for writing on the mmap_lock. Change the lockdep check to ensure the reading lock is held while clearing and keep the write check while writing. Link: https://lkml.kernel.org/r/20220627151857.2316964-1-Liam.Howlett@oracle.com Fixes: 472a68df605b ("android: binder: stop saving a pointer to the VMA") Signed-off-by: Liam R. Howlett Reported-by: syzbot+da54fa8d793ca89c741f@syzkaller.appspotmail.com Acked-by: Todd Kjos Cc: "Arve Hjønnevåg" Cc: Christian Brauner (Microsoft) Cc: Greg Kroah-Hartman Cc: Hridya Valsaraju Cc: Joel Fernandes Cc: Martijn Coenen Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton drivers/android/binder_alloc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit a43cfc87caaf46710c8027a8c23b8a55f1078f19 Author: Liam R. Howlett Date: Mon Jun 20 21:09:09 2022 -0400 android: binder: stop saving a pointer to the VMA Do not record a pointer to a VMA outside of the mmap_lock for later use. This is unsafe and there are a number of failure paths *after* the recorded VMA pointer may be freed during setup. There is no callback to the driver to clear the saved pointer from generic mm code. Furthermore, the VMA pointer may become stale if any number of VMA operations end up freeing the VMA so saving it was fragile to being with. Instead, change the binder_alloc struct to record the start address of the VMA and use vma_lookup() to get the vma when needed. Add lockdep mmap_lock checks on updates to the vma pointer to ensure the lock is held and depend on that lock for synchronization of readers and writers - which was already the case anyways, so the smp_wmb()/smp_rmb() was not necessary. [akpm@linux-foundation.org: fix drivers/android/binder_alloc_selftest.c] Link: https://lkml.kernel.org/r/20220621140212.vpkio64idahetbyf@revolver Fixes: da1b9564e85b ("android: binder: fix the race mmap and alloc_new_buf_locked") Reported-by: syzbot+58b51ac2b04e388ab7b0@syzkaller.appspotmail.com Signed-off-by: Liam R. Howlett Cc: Minchan Kim Cc: Christian Brauner (Microsoft) Cc: Greg Kroah-Hartman Cc: Hridya Valsaraju Cc: Joel Fernandes Cc: Martijn Coenen Cc: Suren Baghdasaryan Cc: Todd Kjos Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton drivers/android/binder_alloc.c | 30 ++++++++++++++---------------- drivers/android/binder_alloc.h | 2 +- drivers/android/binder_alloc_selftest.c | 2 +- 3 files changed, 16 insertions(+), 18 deletions(-) commit 15d2ce7129f25c51d8a840a8a002c7ba0bb1509d Author: Liam R. Howlett Date: Fri Jul 29 18:07:13 2022 -0700 mips: rename mt_init to mips_mt_init Move mt_init out of the way for the maple tree. Use mips_mt prefix to match the rest of the functions in the file. Link: https://lkml.kernel.org/r/20220504002554.654642-2-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Cc: Catalin Marinas Cc: David Howells Cc: "Matthew Wilcox (Oracle)" Cc: SeongJae Park Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton arch/mips/kernel/mips-mt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14773bfa70e67f4d4ebd60e60cb6e25e8c84d4c0 Author: Tetsuo Handa Date: Wed Jul 20 23:47:55 2022 +0900 mm: shrinkers: fix double kfree on shrinker name syzbot is reporting double kfree() at free_prealloced_shrinker() [1], for destroy_unused_super() calls free_prealloced_shrinker() even if prealloc_shrinker() returned an error. Explicitly clear shrinker name when prealloc_shrinker() called kfree(). [roman.gushchin@linux.dev: zero shrinker->name in all cases where shrinker->name is freed] Link: https://lkml.kernel.org/r/YtgteTnQTgyuKUSY@castle Link: https://syzkaller.appspot.com/bug?extid=8b481578352d4637f510 [1] Link: https://lkml.kernel.org/r/ffa62ece-6a42-2644-16cf-0d33ef32c676@I-love.SAKURA.ne.jp Fixes: e33c267ab70de424 ("mm: shrinkers: provide shrinkers with names") Reported-by: syzbot Signed-off-by: Tetsuo Handa Acked-by: Roman Gushchin Signed-off-by: Andrew Morton mm/shrinker_debug.c | 1 + mm/vmscan.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit d6a97d3f589a3a46a16183e03f3774daee251317 Author: NeilBrown Date: Tue Jul 26 16:45:30 2022 +1000 NFSD: add security label to struct nfsd_attrs nfsd_setattr() now sets a security label if provided, and nfsv4 provides it in the 'open' and 'create' paths and the 'setattr' path. If setting the label failed (including because the kernel doesn't support labels), an error field in 'struct nfsd_attrs' is set, and the caller can respond. The open/create callers clear FATTR4_WORD2_SECURITY_LABEL in the returned attr set in this case. The setattr caller returns the error. Signed-off-by: NeilBrown Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 49 +++++++++---------------------------------------- fs/nfsd/vfs.c | 29 +++-------------------------- fs/nfsd/vfs.h | 5 +++-- 3 files changed, 15 insertions(+), 68 deletions(-) commit 93adc1e391a761441d783828b93979b38093d011 Author: NeilBrown Date: Tue Jul 26 16:45:30 2022 +1000 NFSD: set attributes when creating symlinks The NFS protocol includes attributes when creating symlinks. Linux does store attributes for symlinks and allows them to be set, though they are not used for permission checking. NFSD currently doesn't set standard (struct iattr) attributes when creating symlinks, but for NFSv4 it does set ACLs and security labels. This is inconsistent. To improve consistency, pass the provided attributes into nfsd_symlink() and call nfsd_create_setattr() to set them. NOTE: this results in a behaviour change for all NFS versions when the client sends non-default attributes with a SYMLINK request. With the Linux client, the only attributes are: attr.ia_mode = S_IFLNK | S_IRWXUGO; attr.ia_valid = ATTR_MODE; so the final outcome will be unchanged. Other clients might sent different attributes, and if they did they probably expect them to be honoured. We ignore any error from nfsd_create_setattr(). It isn't really clear what should be done if a file is successfully created, but the attributes cannot be set. NFS doesn't allow partial success to be reported. Reporting failure is probably more misleading than reporting success, so the status is ignored. Signed-off-by: NeilBrown Signed-off-by: Chuck Lever fs/nfsd/nfs3proc.c | 5 ++++- fs/nfsd/nfs4proc.c | 2 +- fs/nfsd/nfsproc.c | 5 ++++- fs/nfsd/vfs.c | 25 ++++++++++++++++++------- fs/nfsd/vfs.h | 5 +++-- 5 files changed, 30 insertions(+), 12 deletions(-) commit 7fe2a71dda349a1afa75781f0cc7975be9784d15 Author: NeilBrown Date: Tue Jul 26 16:45:30 2022 +1000 NFSD: introduce struct nfsd_attrs The attributes that nfsd might want to set on a file include 'struct iattr' as well as an ACL and security label. The latter two are passed around quite separately from the first, in part because they are only needed for NFSv4. This leads to some clumsiness in the code, such as the attributes NOT being set in nfsd_create_setattr(). We need to keep the directory locked until all attributes are set to ensure the file is never visibile without all its attributes. This need combined with the inconsistent handling of attributes leads to more clumsiness. As a first step towards tidying this up, introduce 'struct nfsd_attrs'. This is passed (by reference) to vfs.c functions that work with attributes, and is assembled by the various nfs*proc functions which call them. As yet only iattr is included, but future patches will expand this. Signed-off-by: NeilBrown Signed-off-by: Chuck Lever fs/nfsd/nfs3proc.c | 20 ++++++++++++++++---- fs/nfsd/nfs4proc.c | 23 ++++++++++++++++------- fs/nfsd/nfs4state.c | 5 ++++- fs/nfsd/nfsproc.c | 17 +++++++++++++---- fs/nfsd/vfs.c | 24 ++++++++++++++---------- fs/nfsd/vfs.h | 12 ++++++++---- 6 files changed, 71 insertions(+), 30 deletions(-) commit 876c553cb41026cb6ad3cef970a35e5f69c42a25 Author: Jeff Layton Date: Tue Jul 26 16:45:30 2022 +1000 NFSD: verify the opened dentry after setting a delegation Between opening a file and setting a delegation on it, someone could rename or unlink the dentry. If this happens, we do not want to grant a delegation on the open. On a CLAIM_NULL open, we're opening by filename, and we may (in the non-create case) or may not (in the create case) be holding i_rwsem when attempting to set a delegation. The latter case allows a race. After getting a lease, redo the lookup of the file being opened and validate that the resulting dentry matches the one in the open file description. To properly redo the lookup we need an rqst pointer to pass to nfsd_lookup_dentry(), so make sure that is available. Signed-off-by: Jeff Layton Signed-off-by: NeilBrown Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 1 + fs/nfsd/nfs4state.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++----- fs/nfsd/xdr4.h | 1 + 3 files changed, 51 insertions(+), 5 deletions(-) commit bbf936edd543e7220f60f9cbd6933b916550396d Author: Jeff Layton Date: Tue Jul 26 16:45:30 2022 +1000 NFSD: drop fh argument from alloc_init_deleg Currently, we pass the fh of the opened file down through several functions so that alloc_init_deleg can pass it to delegation_blocked. The filehandle of the open file is available in the nfs4_file however, so there's no need to pass it in a separate argument. Drop the argument from alloc_init_deleg, nfs4_open_delegation and nfs4_set_delegation. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4state.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit a11ada99ce93a79393dc6683d22f7915748c8f6b Author: Chuck Lever Date: Wed Jul 27 14:41:18 2022 -0400 NFSD: Move copy offload callback arguments into a separate structure Refactor so that CB_OFFLOAD arguments can be passed without allocating a whole struct nfsd4_copy object. On my system (x86_64) this removes another 96 bytes from struct nfsd4_copy. Signed-off-by: Chuck Lever fs/nfsd/nfs4callback.c | 37 ++++++++++++++++++------------------- fs/nfsd/nfs4proc.c | 44 ++++++++++++++++++++++---------------------- fs/nfsd/xdr4.h | 11 +++++++---- 3 files changed, 47 insertions(+), 45 deletions(-) commit e72f9bc006c08841c46d27747a4debc747a8fe13 Author: Chuck Lever Date: Wed Jul 27 14:41:12 2022 -0400 NFSD: Add nfsd4_send_cb_offload() Refactor for legibility. Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit ad1e46c9b07b13659635ee5405f83ad0df143116 Author: Chuck Lever Date: Wed Jul 27 14:41:06 2022 -0400 NFSD: Remove kmalloc from nfsd4_do_async_copy() Instead of manufacturing a phony struct nfsd_file, pass the struct file returned by nfs42_ssc_open() directly to nfsd4_do_copy(). Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 3b7bf5933cada732783554edf0dc61283551c6cf Author: Chuck Lever Date: Wed Jul 27 14:40:59 2022 -0400 NFSD: Refactor nfsd4_do_copy() Refactor: Now that nfsd4_do_copy() no longer calls the cleanup helpers, plumb the use of struct file pointers all the way down to _nfsd_copy_file_range(). Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 478ed7b10d875da2743d1a22822b9f8a82df8f12 Author: Chuck Lever Date: Wed Jul 27 14:40:53 2022 -0400 NFSD: Refactor nfsd4_cleanup_inter_ssc() (2/2) Move the nfsd4_cleanup_*() call sites out of nfsd4_do_copy(). A subsequent patch will modify one of the new call sites to avoid the need to manufacture the phony struct nfsd_file. Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 24d796ea383b8a4c8234e06d1b14bbcd371192ea Author: Chuck Lever Date: Wed Jul 27 14:40:47 2022 -0400 NFSD: Refactor nfsd4_cleanup_inter_ssc() (1/2) The @src parameter is sometimes a pointer to a struct nfsd_file and sometimes a pointer to struct file hiding in a phony struct nfsd_file. Refactor nfsd4_cleanup_inter_ssc() so the @src parameter is always an explicit struct file. Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1913cdf56cb5bfbc8170873728d13598cbecda23 Author: Chuck Lever Date: Wed Jul 27 14:40:41 2022 -0400 NFSD: Replace boolean fields in struct nfsd4_copy Clean up: saves 8 bytes, and we can replace check_and_set_stop_copy() with an atomic bitop. Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 51 +++++++++++++++++++-------------------------------- fs/nfsd/nfs4xdr.c | 12 ++++++------ fs/nfsd/xdr4.h | 33 ++++++++++++++++++++++++++++----- 3 files changed, 53 insertions(+), 43 deletions(-) commit 8ea6e2c90bb0eb74a595a12e23a1dff9abbc760a Author: Chuck Lever Date: Wed Jul 27 14:40:35 2022 -0400 NFSD: Make nfs4_put_copy() static Clean up: All call sites are in fs/nfsd/nfs4proc.c. Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 2 +- fs/nfsd/state.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit d314309425ad5dc1b6facdb2d456580fb5fa5e3a Author: Chuck Lever Date: Wed Jul 27 14:40:28 2022 -0400 NFSD: Reorder the fields in struct nfsd4_op Pack the fields to reduce the size of struct nfsd4_op, which is used an array in struct nfsd4_compoundargs. sizeof(struct nfsd4_op): Before: /* size: 672, cachelines: 11, members: 5 */ After: /* size: 640, cachelines: 10, members: 5 */ Signed-off-by: Chuck Lever fs/nfsd/xdr4.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 87689df694916c40e8e6c179ab1c8710f65cb6c6 Author: Chuck Lever Date: Wed Jul 27 14:40:22 2022 -0400 NFSD: Shrink size of struct nfsd4_copy struct nfsd4_copy is part of struct nfsd4_op, which resides in an 8-element array. sizeof(struct nfsd4_op): Before: /* size: 1696, cachelines: 27, members: 5 */ After: /* size: 672, cachelines: 11, members: 5 */ Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 8 ++++++-- fs/nfsd/nfs4xdr.c | 5 ++++- fs/nfsd/xdr4.h | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) commit 09426ef2a64ee189ca1e3298f1e874842dbf35ea Author: Chuck Lever Date: Wed Jul 27 14:40:16 2022 -0400 NFSD: Shrink size of struct nfsd4_copy_notify struct nfsd4_copy_notify is part of struct nfsd4_op, which resides in an 8-element array. sizeof(struct nfsd4_op): Before: /* size: 2208, cachelines: 35, members: 5 */ After: /* size: 1696, cachelines: 27, members: 5 */ Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 4 ++-- fs/nfsd/nfs4xdr.c | 12 ++++++++++-- fs/nfsd/xdr4.h | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) commit bb4d842722b84a2731257054b6405f2d866fc5f3 Author: Chuck Lever Date: Wed Jul 27 14:40:09 2022 -0400 NFSD: nfserrno(-ENOMEM) is nfserr_jukebox Suggested-by: Dai Ngo Signed-off-by: Chuck Lever fs/nfsd/nfs4xdr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5304877936c0a67e1a01464d113bae4c81eacdb6 Author: Chuck Lever Date: Wed Jul 27 14:40:03 2022 -0400 NFSD: Fix strncpy() fortify warning In function ‘strncpy’, inlined from ‘nfsd4_ssc_setup_dul’ at /home/cel/src/linux/manet/fs/nfsd/nfs4proc.c:1392:3, inlined from ‘nfsd4_interssc_connect’ at /home/cel/src/linux/manet/fs/nfsd/nfs4proc.c:1489:11: /home/cel/src/linux/manet/include/linux/fortify-string.h:52:33: warning: ‘__builtin_strncpy’ specified bound 63 equals destination size [-Wstringop-truncation] 52 | #define __underlying_strncpy __builtin_strncpy | ^ /home/cel/src/linux/manet/include/linux/fortify-string.h:89:16: note: in expansion of macro ‘__underlying_strncpy’ 89 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 2 +- include/linux/nfs_ssc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 99b002a1fa00d90e66357315757e7277447ce973 Author: Chuck Lever Date: Fri Jul 22 16:09:23 2022 -0400 NFSD: Clean up nfsd4_encode_readlink() Similar changes to nfsd4_encode_readv(), all bundled into a single patch. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4xdr.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit 5e64d85c7d0c59cfcd61d899720b8ccfe895d743 Author: Chuck Lever Date: Fri Jul 22 16:09:16 2022 -0400 NFSD: Use xdr_pad_size() Clean up: Use a helper instead of open-coding the calculation of the XDR pad size. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4xdr.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 071ae99feadfc55979f89287d6ad2c6a315cb46d Author: Chuck Lever Date: Fri Jul 22 16:09:10 2022 -0400 NFSD: Simplify starting_len Clean-up: Now that nfsd4_encode_readv() does not have to encode the EOF or rd_length values, it no longer needs to subtract 8 from @starting_len. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4xdr.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 28d5bc468efe74b790e052f758ce083a5015c665 Author: Chuck Lever Date: Fri Jul 22 16:09:04 2022 -0400 NFSD: Optimize nfsd4_encode_readv() write_bytes_to_xdr_buf() is pretty expensive to use for inserting an XDR data item that is always 1 XDR_UNIT at an address that is always XDR word-aligned. Since both the readv and splice read paths encode EOF and maxcount values, move both to a common code path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4xdr.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 24c7fb85498eda1d4c6b42cc4886328429814990 Author: Chuck Lever Date: Fri Jul 22 16:08:57 2022 -0400 NFSD: Add an nfsd4_read::rd_eof field Refactor: Make the EOF result available in the entire NFSv4 READ path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4xdr.c | 11 +++++------ fs/nfsd/xdr4.h | 5 +++-- 2 files changed, 8 insertions(+), 8 deletions(-) commit c738b218a2e5a753a336b4b7fee6720b902c7ace Author: Chuck Lever Date: Fri Jul 22 16:08:51 2022 -0400 NFSD: Clean up SPLICE_OK in nfsd4_encode_read() Do the test_bit() once -- this reduces the number of locked-bus operations and makes the function a little easier to read. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4xdr.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit ab04de60ae1cc64ae16b77feae795311b97720c7 Author: Chuck Lever Date: Fri Jul 22 16:08:45 2022 -0400 NFSD: Optimize nfsd4_encode_fattr() write_bytes_to_xdr_buf() is a generic way to place a variable-length data item in an already-reserved spot in the encoding buffer. However, it is costly. In nfsd4_encode_fattr(), it is unnecessary because the data item is fixed in size and the buffer destination address is always word-aligned. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4xdr.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 095a764b7afb06c9499b798c04eaa3cbf70ebe2d Author: Chuck Lever Date: Fri Jul 22 16:08:38 2022 -0400 NFSD: Optimize nfsd4_encode_operation() write_bytes_to_xdr_buf() is a generic way to place a variable-length data item in an already-reserved spot in the encoding buffer. However, it is costly, and here, it is unnecessary because the data item is fixed in size, the buffer destination address is always word-aligned, and the destination location is already in @p. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4xdr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3a5940bfa17fb9964bf9688b4356ca643a8f5e2d Author: Jeff Layton Date: Wed Jul 20 08:39:23 2022 -0400 nfsd: silence extraneous printk on nfsd.ko insertion This printk pops every time nfsd.ko gets plugged in. Most kmods don't do that and this one is not very informative. Olaf's email address seems to be defunct at this point anyway. Just drop it. Cc: Olaf Kirch Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfsctl.c | 1 - 1 file changed, 1 deletion(-) commit 4271c2c0887562318a0afef97d32d8a71cbe0743 Author: Dai Ngo Date: Fri Jul 15 16:54:53 2022 -0700 NFSD: limit the number of v4 clients to 1024 per 1GB of system memory Currently there is no limit on how many v4 clients are supported by the system. This can be a problem in systems with small memory configuration to function properly when a very large number of clients exist that creates memory shortage conditions. This patch enforces a limit of 1024 NFSv4 clients, including courtesy clients, per 1GB of system memory. When the number of the clients reaches the limit, requests that create new clients are returned with NFS4ERR_DELAY and the laundromat is kicked start to trim old clients. Due to the overhead of the upcall to remove the client record, the maximun number of clients the laundromat removes on each run is limited to 128. This is done to ensure the laundromat can still process the other tasks in a timely manner. Since there is now a limit of the number of clients, the 24-hr idle time limit of courtesy client is no longer needed and was removed. Signed-off-by: Dai Ngo Signed-off-by: Chuck Lever fs/nfsd/netns.h | 1 + fs/nfsd/nfs4state.c | 27 +++++++++++++++++++++------ fs/nfsd/nfsd.h | 2 ++ 3 files changed, 24 insertions(+), 6 deletions(-) commit 0926c39515aa065a296e97dfc8790026f1e53f86 Author: Dai Ngo Date: Fri Jul 15 16:54:52 2022 -0700 NFSD: keep track of the number of v4 clients in the system Add counter nfs4_client_count to keep track of the total number of v4 clients, including courtesy clients, in the system. Signed-off-by: Dai Ngo Signed-off-by: Chuck Lever fs/nfsd/netns.h | 2 ++ fs/nfsd/nfs4state.c | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit 6867137ebcf4155fe25f2ecf7c29b9fb90a76d1d Author: Dai Ngo Date: Fri Jul 15 16:54:51 2022 -0700 NFSD: refactoring v4 specific code to a helper in nfs4state.c This patch moves the v4 specific code from nfsd_init_net() to nfsd4_init_leases_net() helper in nfs4state.c Signed-off-by: Dai Ngo Signed-off-by: Chuck Lever fs/nfsd/nfs4state.c | 12 ++++++++++++ fs/nfsd/nfsctl.c | 9 +-------- fs/nfsd/nfsd.h | 4 ++++ 3 files changed, 17 insertions(+), 8 deletions(-) commit 427f5f83a3191cbf024c5aea6e5b601cdf88d895 Author: Chuck Lever Date: Fri Jul 8 14:27:09 2022 -0400 NFSD: Ensure nf_inode is never dereferenced The documenting comment for struct nf_file states: /* * A representation of a file that has been opened by knfsd. These are hashed * in the hashtable by inode pointer value. Note that this object doesn't * hold a reference to the inode by itself, so the nf_inode pointer should * never be dereferenced, only used for comparison. */ Replace the two existing dereferences to make the comment always true. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 5 ++--- fs/nfsd/filecache.h | 2 +- fs/nfsd/nfs4state.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) commit 5e138c4a750dc140d881dab4a8804b094bbc08d2 Author: Chuck Lever Date: Fri Jul 8 14:27:02 2022 -0400 NFSD: NFSv4 CLOSE should release an nfsd_file immediately The last close of a file should enable other accessors to open and use that file immediately. Leaving the file open in the filecache prevents other users from accessing that file until the filecache garbage-collects the file -- sometimes that takes several seconds. Reported-by: Wang Yugui Link: https://bugzilla.linux-nfs.org/show_bug.cgi?387 Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 18 ++++++++++++++++++ fs/nfsd/filecache.h | 1 + fs/nfsd/nfs4state.c | 4 ++-- 3 files changed, 21 insertions(+), 2 deletions(-) commit b40a2839470cd62ed68c4a32d72a18ee8975b1ac Author: Chuck Lever Date: Fri Jul 8 14:26:49 2022 -0400 NFSD: Move nfsd_file_trace_alloc() tracepoint Avoid recording the allocation of an nfsd_file item that is immediately released because a matching item was already inserted in the hash. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 2 +- fs/nfsd/trace.h | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) commit be0230069fcbf7d332d010b57c1d0cfd623a84d6 Author: Chuck Lever Date: Fri Jul 8 14:26:43 2022 -0400 NFSD: Separate tracepoints for acquire and create These tracepoints collect different information: the create case does not open a file, so there's no nf_file available. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 9 +++++---- fs/nfsd/nfs4state.c | 1 + fs/nfsd/trace.h | 54 +++++++++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 52 insertions(+), 12 deletions(-) commit 0ec8e9d1539a7b8109a554028bbce441052f847e Author: Chuck Lever Date: Fri Jul 8 14:26:36 2022 -0400 NFSD: Clean up unused code after rhashtable conversion Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 33 +-------------------------------- fs/nfsd/filecache.h | 1 - 2 files changed, 1 insertion(+), 33 deletions(-) commit ce502f81ba884c1fe45dc0ebddbcaaa4ec0fc5fb Author: Chuck Lever Date: Fri Jul 8 14:26:30 2022 -0400 NFSD: Convert the filecache to use rhashtable Enable the filecache hash table to start small, then grow with the workload. Smaller server deployments benefit because there should be lower memory utilization. Larger server deployments should see improved scaling with the number of open files. Suggested-by: Jeff Layton Suggested-by: Dave Chinner Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 265 +++++++++++++++++++++++----------------------------- fs/nfsd/trace.h | 63 ++++++++++++- 2 files changed, 179 insertions(+), 149 deletions(-) commit fc22945ecc2a0a028f3683115f98a922d506c284 Author: Chuck Lever Date: Fri Jul 8 14:26:23 2022 -0400 NFSD: Set up an rhashtable for the filecache Add code to initialize and tear down an rhashtable. The rhashtable is not used yet. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 160 +++++++++++++++++++++++++++++++++++++++++++++------- fs/nfsd/filecache.h | 1 + 2 files changed, 140 insertions(+), 21 deletions(-) commit c7b824c3d06c85e054caf86e227255112c5e3c38 Author: Chuck Lever Date: Fri Jul 8 14:26:16 2022 -0400 NFSD: Replace the "init once" mechanism In a moment, the nfsd_file_hashtbl global will be replaced with an rhashtable. Replace the one or two spots that need to check if the hash table is available. We can easily reuse the SHUTDOWN flag for this purpose. Document that this mechanism relies on callers to hold the nfsd_mutex to prevent init, shutdown, and purging to run concurrently. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) commit f0743c2b25c65debd4f599a7c861428cd9de5906 Author: Chuck Lever Date: Fri Jul 8 14:26:10 2022 -0400 NFSD: Remove nfsd_file::nf_hashval The value in this field can always be computed from nf_inode, thus it is no longer used. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 6 ++---- fs/nfsd/filecache.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) commit cb7ec76e73ff6640241c8f1f2f35c81d4005a2d6 Author: Chuck Lever Date: Fri Jul 8 14:26:03 2022 -0400 NFSD: nfsd_file_hash_remove can compute hashval Remove an unnecessary use of nf_hashval. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit a845511007a63467fee575353c706806c21218b1 Author: Chuck Lever Date: Fri Jul 8 14:25:57 2022 -0400 NFSD: Refactor __nfsd_file_close_inode() The code that computes the hashval is the same in both callers. To prevent them from going stale, reframe the documenting comments to remove descriptions of the underlying hash table structure, which is about to be replaced. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 40 +++++++++++++++++++++------------------- fs/nfsd/trace.h | 44 +++++++++++++++++++++++++++++++++----------- 2 files changed, 54 insertions(+), 30 deletions(-) commit 8755326399f471ec3b31e2ab8c5074c0d28a0fb5 Author: Chuck Lever Date: Fri Jul 8 14:25:50 2022 -0400 NFSD: nfsd_file_unhash can compute hashval from nf->nf_inode Remove an unnecessary usage of nf_hashval. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f53cef15dddec7203df702cdc62e554190385450 Author: Chuck Lever Date: Fri Jul 8 14:25:44 2022 -0400 NFSD: Remove lockdep assertion from unhash_and_release_locked() IIUC, holding the hash bucket lock is needed only in nfsd_file_unhash, and there is already a lockdep assertion there. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 2 -- 1 file changed, 2 deletions(-) commit 54f7df7094b329ca35d9f9808692bb16c48b13e9 Author: Chuck Lever Date: Fri Jul 8 14:25:37 2022 -0400 NFSD: No longer record nf_hashval in the trace log I'm about to replace nfsd_file_hashtbl with an rhashtable. The individual hash values will no longer be visible or relevant, so remove them from the tracepoints. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 15 ++++++++------- fs/nfsd/trace.h | 45 +++++++++++++++++++++------------------------ 2 files changed, 29 insertions(+), 31 deletions(-) commit 6df19411367a5fb4ef61854cbd1af269c077f917 Author: Chuck Lever Date: Fri Jul 8 14:25:30 2022 -0400 NFSD: Never call nfsd_file_gc() in foreground paths The checks in nfsd_file_acquire() and nfsd_file_put() that directly invoke filecache garbage collection are intended to keep cache occupancy between a low- and high-watermark. The reason to limit the capacity of the filecache is to keep filecache lookups reasonably fast. However, invoking garbage collection at those points has some undesirable negative impacts. Files that are held open by NFSv4 clients often push the occupancy of the filecache over these watermarks. At that point: - Every call to nfsd_file_acquire() and nfsd_file_put() results in an LRU walk. This has the same effect on lookup latency as long chains in the hash table. - Garbage collection will then run on every nfsd thread, causing a lot of unnecessary lock contention. - Limiting cache capacity pushes out files used only by NFSv3 clients, which are the type of files the filecache is supposed to help. To address those negative impacts, remove the direct calls to the garbage collector. Subsequent patches will address maintaining lookup efficiency as cache capacity increases. Suggested-by: Wang Yugui Suggested-by: Dave Chinner Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit edead3a55804739b2e4af0f35e9c7326264e7b22 Author: Chuck Lever Date: Fri Jul 8 14:25:24 2022 -0400 NFSD: Fix the filecache LRU shrinker Without LRU item rotation, the shrinker visits only a few items on the end of the LRU list, and those would always be long-term OPEN files for NFSv4 workloads. That makes the filecache shrinker completely ineffective. Adopt the same strategy as the inode LRU by using LRU_ROTATE. Suggested-by: Dave Chinner Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4a0e73e635e3f36b616ad5c943e3d23debe4632f Author: Chuck Lever Date: Fri Jul 8 14:25:17 2022 -0400 NFSD: Leave open files out of the filecache LRU There have been reports of problems when running fstests generic/531 against Linux NFS servers with NFSv4. The NFS server that hosts the test's SCRATCH_DEV suffers from CPU soft lock-ups during the test. Analysis shows that: fs/nfsd/filecache.c 482 ret = list_lru_walk(&nfsd_file_lru, 483 nfsd_file_lru_cb, 484 &head, LONG_MAX); causes nfsd_file_gc() to walk the entire length of the filecache LRU list every time it is called (which is quite frequently). The walk holds a spinlock the entire time that prevents other nfsd threads from accessing the filecache. What's more, for NFSv4 workloads, none of the items that are visited during this walk may be evicted, since they are all files that are held OPEN by NFS clients. Address this by ensuring that open files are not kept on the LRU list. Reported-by: Frank van der Linden Reported-by: Wang Yugui Link: https://bugzilla.linux-nfs.org/show_bug.cgi?id=386 Suggested-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 24 +++++++++++++++++++----- fs/nfsd/trace.h | 2 ++ 2 files changed, 21 insertions(+), 5 deletions(-) commit c46203acddd9b9200dbc53d0603c97355fd3a03b Author: Chuck Lever Date: Fri Jul 8 14:25:11 2022 -0400 NFSD: Trace filecache LRU activity Observe the operation of garbage collection and the lifetime of filecache items. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 44 +++++++++++++++++++++++++++++++------------- fs/nfsd/trace.h | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 13 deletions(-) commit 668ed92e651d3c25f9b6e8cb7ceca54d00daa96d Author: Chuck Lever Date: Fri Jul 8 14:25:04 2022 -0400 NFSD: WARN when freeing an item still linked via nf_lru Add a guardrail to prevent freeing memory that is still on a list. This includes either a dispose list or the LRU list. This is the sign of a bug, but this class of bugs can be detected so that they don't endanger system stability, especially while debugging. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 2e6c6e4c4375bfd3defa5b1ff3604d9f33d1c936 Author: Chuck Lever Date: Fri Jul 8 14:24:58 2022 -0400 NFSD: Hook up the filecache stat file There has always been the capability of exporting filecache metrics via /proc, but it was never hooked up. Let's surface these metrics to enable better observability of the filecache. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfsctl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 8b330f78040cbe16cf8029df70391b2a491f17e2 Author: Chuck Lever Date: Fri Jul 8 14:24:51 2022 -0400 NFSD: Zero counters when the filecache is re-initialized If nfsd_file_cache_init() is called after a shutdown, be sure the stat counters are reset. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit df2aff524faceaf743b7c5ab0f4fb86cb511f782 Author: Chuck Lever Date: Fri Jul 8 14:24:45 2022 -0400 NFSD: Record number of flush calls Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 94660cc19c75083af046b0f8362e3d3bc2eba21d Author: Chuck Lever Date: Fri Jul 8 14:24:38 2022 -0400 NFSD: Report the number of items evicted by the LRU walk Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 13 ++++++++++--- fs/nfsd/trace.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 3 deletions(-) commit 39f1d1ff8148902c5692ffb0e1c4479416ab44a7 Author: Chuck Lever Date: Fri Jul 8 14:24:31 2022 -0400 NFSD: Refactor nfsd_file_lru_scan() Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) commit 3bc6d3470fe412f818f9bff6b71d1be3a76af8f3 Author: Chuck Lever Date: Fri Jul 8 14:24:25 2022 -0400 NFSD: Refactor nfsd_file_gc() Refactor nfsd_file_gc() to use the new list_lru helper. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0bac5a264d9a923f5b01f3521e1519a8d0358342 Author: Chuck Lever Date: Fri Jul 8 14:24:18 2022 -0400 NFSD: Add nfsd_file_lru_dispose_list() helper Refactor the invariant part of nfsd_file_lru_walk_list() into a separate helper function. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) commit 904940e94a887701db24401e3ed6928a1d4e329f Author: Chuck Lever Date: Fri Jul 8 14:24:12 2022 -0400 NFSD: Report average age of filecache items This is a measure of how long items stay in the filecache, to help assess how efficient the cache is. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 11 ++++++++++- fs/nfsd/filecache.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) commit d63293272abb51c02457f1017dfd61c3270d9ae3 Author: Chuck Lever Date: Fri Jul 8 14:24:05 2022 -0400 NFSD: Report count of freed filecache items Surface the count of freed nfsd_file items. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 29d4bdbbb910f33d6058d2c51278f00f656df325 Author: Chuck Lever Date: Fri Jul 8 14:23:59 2022 -0400 NFSD: Report count of calls to nfsd_file_acquire() Count the number of successful acquisitions that did not create a file (ie, acquisitions that do not result in a compulsory cache miss). This count can be compared directly with the reported hit count to compute a hit ratio. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 0fd244c115f0321fc5e34ad2291f2a572508e3f7 Author: Chuck Lever Date: Fri Jul 8 14:23:52 2022 -0400 NFSD: Report filecache LRU size Surface the NFSD filecache's LRU list length to help field troubleshooters monitor filecache issues. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ca3f9acb6d3faf78da2b63324f7c737dbddf7f69 Author: Chuck Lever Date: Fri Jul 8 14:23:45 2022 -0400 NFSD: Demote a WARN to a pr_warn() The call trace doesn't add much value, but it sure is noisy. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 36f2ef2dd44e1c34b281336a41cf42a477d4b43f Author: Chuck Lever Date: Fri Jul 1 10:37:15 2022 -0400 SUNRPC: Fix server-side fault injection documentation Fixes: 37324e6bb120 ("SUNRPC: Cache deferral injection") Signed-off-by: Chuck Lever Documentation/fault-injection/fault-injection.rst | 7 +++++++ 1 file changed, 7 insertions(+) commit 842e00ac3aa3b4a4f7f750c8ab54f8578fc875d3 Author: Colin Ian King Date: Tue Jun 28 22:25:25 2022 +0100 nfsd: remove redundant assignment to variable len Variable len is being assigned a value zero and this is never read, it is being re-assigned later. The assignment is redundant and can be removed. Cleans up clang scan-build warning: fs/nfsd/nfsctl.c:636:2: warning: Value stored to 'len' is never read Signed-off-by: Colin Ian King Signed-off-by: Chuck Lever fs/nfsd/nfsctl.c | 1 - 1 file changed, 1 deletion(-) commit f532c9ff103897be0e2a787c0876683c3dc39ed3 Author: Zhang Jiaming Date: Thu Jun 23 16:20:05 2022 +0800 NFSD: Fix space and spelling mistake Add a blank space after ','. Change 'succesful' to 'successful'. Signed-off-by: Zhang Jiaming Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 051382885552e12541cc0ebf82092be374a9ed2a Author: Chuck Lever Date: Tue Jun 21 10:06:23 2022 -0400 NFSD: Instrument fh_verify() Capture file handles and how they map to local inodes. In particular, NFSv4 PUTFH uses fh_verify() so we can now observe which file handles are the target of OPEN, LOOKUP, RENAME, and so on. Signed-off-by: Chuck Lever fs/nfsd/nfsfh.c | 5 +++-- fs/nfsd/trace.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) commit 28fffa6c57906ffa07e84f12aae5d99993cafdae Author: Chuck Lever Date: Tue Jun 21 10:06:16 2022 -0400 SUNRPC: Expand the svc_alloc_arg_err tracepoint Record not only the number of pages requested, but the number of pages that were actually allocated, to get a measure of progress (or lack thereof). Signed-off-by: Chuck Lever include/trace/events/sunrpc.h | 14 +++++++++----- net/sunrpc/svc_xprt.c | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) commit 184cefbe62627730c30282df12bcff9aae4816ea Author: Benjamin Coddington Date: Mon Jun 13 09:40:06 2022 -0400 NLM: Defend against file_lock changes after vfs_test_lock() Instead of trusting that struct file_lock returns completely unchanged after vfs_test_lock() when there's no conflicting lock, stash away our nlm_lockowner reference so we can properly release it for all cases. This defends against another file_lock implementation overwriting fl_owner when the return type is F_UNLCK. Reported-by: Roberto Bergantinos Corpas Tested-by: Roberto Bergantinos Corpas Signed-off-by: Benjamin Coddington Signed-off-by: Chuck Lever fs/lockd/svc4proc.c | 4 +++- fs/lockd/svclock.c | 10 +--------- fs/lockd/svcproc.c | 5 ++++- include/linux/lockd/lockd.h | 1 + 4 files changed, 9 insertions(+), 11 deletions(-) commit c770f31d8f580ed4b965c64f924ec1cc50e41734 Author: Chuck Lever Date: Tue Jul 19 09:18:35 2022 -0400 SUNRPC: Fix xdr_encode_bool() I discovered that xdr_encode_bool() was returning the same address that was passed in the @p parameter. The documenting comment states that the intent is to return the address of the next buffer location, just like the other "xdr_encode_*" helpers. The result was the encoded results of NFSv3 PATHCONF operations were not formed correctly. Fixes: ded04a587f6c ("NFSD: Update the NFSv3 PATHCONF3res encoder to use struct xdr_stream") Signed-off-by: Chuck Lever Reviewed-by: Jeff Layton include/linux/sunrpc/xdr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 23ba98de6dcec665e15c0ca19244379bb0d30932 Author: Jeff Layton Date: Fri Jul 29 17:01:07 2022 -0400 nfsd: eliminate the NFSD_FILE_BREAK_* flags We had a report from the spring Bake-a-thon of data corruption in some nfstest_interop tests. Looking at the traces showed the NFS server allowing a v3 WRITE to proceed while a read delegation was still outstanding. Currently, we only set NFSD_FILE_BREAK_* flags if NFSD_MAY_NOT_BREAK_LEASE was set when we call nfsd_file_alloc. NFSD_MAY_NOT_BREAK_LEASE was intended to be set when finding files for COMMIT ops, where we need a writeable filehandle but don't need to break read leases. It doesn't make any sense to consult that flag when allocating a file since the file may be used on subsequent calls where we do want to break the lease (and the usage of it here seems to be reverse from what it should be anyway). Also, after calling nfsd_open_break_lease, we don't want to clear the BREAK_* bits. A lease could end up being set on it later (more than once) and we need to be able to break those leases as well. This means that the NFSD_FILE_BREAK_* flags now just mirror NFSD_MAY_{READ,WRITE} flags, so there's no need for them at all. Just drop those flags and unconditionally call nfsd_open_break_lease every time. Reported-by: Olga Kornieskaia Link: https://bugzilla.redhat.com/show_bug.cgi?id=2107360 Fixes: 65294c1f2c5e (nfsd: add a new struct file caching facility to nfsd) Cc: # 5.4.x : bb283ca18d1e NFSD: Clean up the show_nf_flags() macro Cc: # 5.4.x Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 22 +--------------------- fs/nfsd/filecache.h | 4 +--- fs/nfsd/trace.h | 2 -- 3 files changed, 2 insertions(+), 26 deletions(-) commit 6ebd5247ad2aa210b3ff4481c6ed8aa32a032b12 Author: Marijn Suijten Date: Thu Jun 30 00:53:23 2022 +0200 clk: fixed-factor: Introduce *clk_hw_register_fixed_factor_parent_hw() Add the devres and non-devres variant of clk_hw_register_fixed_factor_parent_hw() for registering a fixed factor clock with clk_hw parent pointer instead of parent name. Signed-off-by: Marijn Suijten Link: https://lore.kernel.org/r/20220629225331.357308-4-marijn.suijten@somainline.org Signed-off-by: Stephen Boyd drivers/clk/clk-fixed-factor.c | 45 +++++++++++++++++++++++++++++++++++++----- include/linux/clk-provider.h | 8 ++++++++ 2 files changed, 48 insertions(+), 5 deletions(-) commit df63af17f3375239e0be124844f304b4a4b60665 Author: Marijn Suijten Date: Thu Jun 30 00:53:22 2022 +0200 clk: mux: Introduce devm_clk_hw_register_mux_parent_hws() Add the devres variant of clk_hw_register_mux_hws() for registering a mux clock with clk_hw parent pointers instead of parent names. Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220629225331.357308-3-marijn.suijten@somainline.org Signed-off-by: Stephen Boyd include/linux/clk-provider.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 909fcb195201f7c3aa81523cc182a4c9b52210e5 Author: Marijn Suijten Date: Thu Jun 30 00:53:21 2022 +0200 clk: divider: Introduce devm_clk_hw_register_divider_parent_hw() Add the devres variant of clk_hw_register_divider_parent_hw() for registering a divider clock with clk_hw parent pointer instead of parent name. Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220629225331.357308-2-marijn.suijten@somainline.org Signed-off-by: Stephen Boyd include/linux/clk-provider.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit b600d6a6c55eac2c4af6f3bf8cf7a2deacecd83b Author: Krzysztof Kozlowski Date: Wed Jul 27 18:44:24 2022 +0200 dt-bindings: eeprom: microchip,93lc46b: move to eeprom directory Move the Atmel/Microchip 93xx46 SPI compatible EEPROM family bindings from misc to eeprom directory to properly match subsystem. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220727164424.386499-2-krzysztof.kozlowski@linaro.org .../bindings/{misc/eeprom-93xx46.yaml => eeprom/microchip,93lc46b.yaml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 532b04d846ddf3c90c37547baeb1c54de7b36ea6 Author: Krzysztof Kozlowski Date: Wed Jul 27 18:44:23 2022 +0200 dt-bindings: eeprom: at25: use spi-peripheral-props.yaml Instead of listing directly properties typical for SPI peripherals, reference the spi-peripheral-props.yaml schema. This allows using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. Remove the spi-* properties which now come via spi-peripheral-props.yaml schema, except for the cases when device schema adds some constraints like maximum frequency. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220727164424.386499-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/eeprom/at25.yaml | 5 ++--- Documentation/devicetree/bindings/misc/eeprom-93xx46.yaml | 9 ++++----- 2 files changed, 6 insertions(+), 8 deletions(-) commit 944ad762bb47529da644e19bad65b1ef24e57844 Author: Krzysztof Kozlowski Date: Wed Jul 27 18:43:12 2022 +0200 dt-bindings: display: use spi-peripheral-props.yaml Instead of listing directly properties typical for SPI peripherals, reference the spi-peripheral-props.yaml schema. This allows using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. Remove the spi-* properties which now come via spi-peripheral-props.yaml schema, except for the cases when device schema adds some constraints like maximum frequency. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. The sitronix,st7735r references also panel-common.yaml and lists explicitly allowed properties, thus here reference only spi-peripheral-props.yaml for purpose of documenting the SPI slave device and bringing spi-max-frequency type validation. Signed-off-by: Krzysztof Kozlowski Acked-by: Sam Ravnborg Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220727164312.385836-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/display/panel/lg,lg4573.yaml | 2 +- Documentation/devicetree/bindings/display/sitronix,st7735r.yaml | 1 + Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml | 7 +++---- 3 files changed, 5 insertions(+), 5 deletions(-) commit 7f637be4d46029bd7700c9f244945a42dbd976fa Author: Jason A. Donenfeld Date: Sat Jul 30 01:12:25 2022 +0200 random: correct spelling of "overwrites" It was missing an 'r'. Fixes: 186873c549df ("random: use simpler fast key erasure flow on per-cpu keys") Signed-off-by: Jason A. Donenfeld drivers/char/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14250fa4839b3a48c979e7faaf4cbcce619d02bd Author: Yang Li Date: Tue Jul 26 06:27:33 2022 +0800 bpf: Remove unneeded semicolon Eliminate the following coccicheck warning: /kernel/bpf/trampoline.c:101:2-3: Unneeded semicolon Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220725222733.55613-1-yang.lee@linux.alibaba.com kernel/bpf/trampoline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 395fc4fa33e98944384d0d6c8b3ecd9fb4b50d00 Author: Joe Burton Date: Fri Jul 29 20:27:27 2022 +0000 libbpf: Add bpf_obj_get_opts() Add an extensible variant of bpf_obj_get() capable of setting the `file_flags` parameter. This parameter is needed to enable unprivileged access to BPF maps. Without a method like this, users must manually make the syscall. Signed-off-by: Joe Burton Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220729202727.3311806-1-jevburton.kernel@gmail.com tools/lib/bpf/bpf.c | 9 +++++++++ tools/lib/bpf/bpf.h | 11 +++++++++++ tools/lib/bpf/libbpf.map | 1 + 3 files changed, 21 insertions(+) commit d0b80a9edb1a029ff913e81b47540e57ad034329 Author: Jakub Kicinski Date: Tue Jul 26 14:36:05 2022 -0700 netdevsim: Avoid allocation warnings triggered from user space We need to suppress warnings from sily map sizes. Also switch from GFP_USER to GFP_KERNEL_ACCOUNT, I'm pretty sure I misunderstood the flags when writing this code. Fixes: 395cacb5f1a0 ("netdevsim: bpf: support fake map offload") Reported-by: syzbot+ad24705d3fd6463b18c6@syzkaller.appspotmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220726213605.154204-1-kuba@kernel.org drivers/net/netdevsim/bpf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3b317abc71598bda8ff9a9c483ad8ae167b18382 Author: Xu Kuohai Date: Thu Jul 28 07:40:48 2022 -0400 bpf: Fix NULL pointer dereference when registering bpf trampoline A panic was reported on arm64: [ 44.517109] audit: type=1334 audit(1658859870.268:59): prog-id=19 op=LOAD [ 44.622031] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010 [ 44.624321] Mem abort info: [ 44.625049] ESR = 0x0000000096000004 [ 44.625935] EC = 0x25: DABT (current EL), IL = 32 bits [ 44.627182] SET = 0, FnV = 0 [ 44.627930] EA = 0, S1PTW = 0 [ 44.628684] FSC = 0x04: level 0 translation fault [ 44.629788] Data abort info: [ 44.630474] ISV = 0, ISS = 0x00000004 [ 44.631362] CM = 0, WnR = 0 [ 44.632041] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000100ab5000 [ 44.633494] [0000000000000010] pgd=0000000000000000, p4d=0000000000000000 [ 44.635202] Internal error: Oops: 96000004 [#1] SMP [ 44.636452] Modules linked in: xfs crct10dif_ce ghash_ce virtio_blk virtio_console virtio_mmio qemu_fw_cfg [ 44.638713] CPU: 2 PID: 1 Comm: systemd Not tainted 5.19.0-rc7 #1 [ 44.640164] Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 [ 44.641799] pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 44.643404] pc : ftrace_set_filter_ip+0x24/0xa0 [ 44.644659] lr : bpf_trampoline_update.constprop.0+0x428/0x4a0 [ 44.646118] sp : ffff80000803b9f0 [ 44.646950] x29: ffff80000803b9f0 x28: ffff0b5d80364400 x27: ffff80000803bb48 [ 44.648721] x26: ffff8000085ad000 x25: ffff0b5d809d2400 x24: 0000000000000000 [ 44.650493] x23: 00000000ffffffed x22: ffff0b5dd7ea0900 x21: 0000000000000000 [ 44.652279] x20: 0000000000000000 x19: 0000000000000000 x18: ffffffffffffffff [ 44.654067] x17: 0000000000000000 x16: 0000000000000000 x15: ffffffffffffffff [ 44.655787] x14: ffff0b5d809d2498 x13: ffff0b5d809d2432 x12: 0000000005f5e100 [ 44.657535] x11: abcc77118461cefd x10: 000000000000005f x9 : ffffa7219cb5b190 [ 44.659254] x8 : ffffa7219c8e0000 x7 : 0000000000000000 x6 : ffffa7219db075e0 [ 44.661066] x5 : ffffa7219d3130e0 x4 : ffffa7219cab9da0 x3 : 0000000000000000 [ 44.662837] x2 : 0000000000000000 x1 : ffffa7219cb7a5c0 x0 : 0000000000000000 [ 44.664675] Call trace: [ 44.665274] ftrace_set_filter_ip+0x24/0xa0 [ 44.666327] bpf_trampoline_update.constprop.0+0x428/0x4a0 [ 44.667696] __bpf_trampoline_link_prog+0xcc/0x1c0 [ 44.668834] bpf_trampoline_link_prog+0x40/0x64 [ 44.669919] bpf_tracing_prog_attach+0x120/0x490 [ 44.671011] link_create+0xe0/0x2b0 [ 44.671869] __sys_bpf+0x484/0xd30 [ 44.672706] __arm64_sys_bpf+0x30/0x40 [ 44.673678] invoke_syscall+0x78/0x100 [ 44.674623] el0_svc_common.constprop.0+0x4c/0xf4 [ 44.675783] do_el0_svc+0x38/0x4c [ 44.676624] el0_svc+0x34/0x100 [ 44.677429] el0t_64_sync_handler+0x11c/0x150 [ 44.678532] el0t_64_sync+0x190/0x194 [ 44.679439] Code: 2a0203f4 f90013f5 2a0303f5 f9001fe1 (f9400800) [ 44.680959] ---[ end trace 0000000000000000 ]--- [ 44.682111] Kernel panic - not syncing: Oops: Fatal exception [ 44.683488] SMP: stopping secondary CPUs [ 44.684551] Kernel Offset: 0x2721948e0000 from 0xffff800008000000 [ 44.686095] PHYS_OFFSET: 0xfffff4a380000000 [ 44.687144] CPU features: 0x010,00022811,19001080 [ 44.688308] Memory Limit: none [ 44.689082] ---[ end Kernel panic - not syncing: Oops: Fatal exception ]--- It's caused by a NULL tr->fops passed to ftrace_set_filter_ip(). tr->fops is initialized to NULL and is assigned to an allocated memory address if CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS is enabled. Since there is no direct call on arm64 yet, the config can't be enabled. To fix it, call ftrace_set_filter_ip() only if tr->fops is not NULL. Fixes: 00963a2e75a8 ("bpf: Support bpf_trampoline on functions with IPMODIFY (e.g. livepatch)") Reported-by: Bruno Goncalves Signed-off-by: Xu Kuohai Signed-off-by: Andrii Nakryiko Tested-by: Bruno Goncalves Acked-by: Song Liu Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20220728114048.3540461-1-xukuohai@huaweicloud.com kernel/bpf/trampoline.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit dc81f8d1e8ea3f5dfa88919cb834a135a6a536b8 Author: Song Liu Date: Fri Jul 29 12:41:06 2022 -0700 bpf: Fix test_progs -j error with fentry/fexit tests When multiple threads are attaching/detaching fentry/fexit programs to the same trampoline, we may call register_fentry on the same trampoline twice: register_fentry(), unregister_fentry(), then register_fentry again. This causes ftrace_set_filter_ip() for the same ip on tr->fops twice, which leaves duplicated ip in tr->fops. The extra ip is not cleaned up properly on unregister and thus causes failures with further register in register_ftrace_direct_multi(): register_ftrace_direct_multi() { ... for (i = 0; i < size; i++) { hlist_for_each_entry(entry, &hash->buckets[i], hlist) { if (ftrace_find_rec_direct(entry->ip)) goto out_unlock; } } ... } This can be triggered with parallel fentry/fexit tests with test_progs: ./test_progs -t fentry,fexit -j Fix this by resetting tr->fops in ftrace_set_filter_ip(), so that there will never be duplicated entries in tr->fops. Fixes: 00963a2e75a8 ("bpf: Support bpf_trampoline on functions with IPMODIFY (e.g. livepatch)") Reported-by: Andrii Nakryiko Signed-off-by: Song Liu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220729194106.1207472-1-song@kernel.org kernel/bpf/trampoline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5c7502e960d9128eae1a5663fb62506d8685ac3 Author: Yang Yingliang Date: Fri Jul 29 10:41:34 2022 +0800 video: fbdev: imxfb: fix return value check in imxfb_probe() If devm_ioremap_resource() fails, it never return NULL, replace NULL test with IS_ERR(). Fixes: b083c22d5114 ("video: fbdev: imxfb: Convert request_mem_region + ioremap to devm_ioremap_resource") Signed-off-by: Yang Yingliang Signed-off-by: Helge Deller drivers/video/fbdev/imxfb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 52e0ea900202d23843daee8f7089817e81dd3dd7 Author: Stafford Horne Date: Fri Jul 29 19:54:08 2022 +0900 openrisc: io: Define iounmap argument as volatile When OpenRISC enables PCI it allows for more drivers to be compiled resulting in exposing the following with -Werror. drivers/video/fbdev/riva/fbdev.c: In function 'rivafb_probe': drivers/video/fbdev/riva/fbdev.c:2062:42: error: passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type drivers/video/fbdev/nvidia/nvidia.c: In function 'nvidiafb_probe': drivers/video/fbdev/nvidia/nvidia.c:1414:20: error: passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type drivers/scsi/aic7xxx/aic7xxx_osm.c: In function 'ahc_platform_free': drivers/scsi/aic7xxx/aic7xxx_osm.c:1231:41: error: passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type Most architectures define the iounmap argument to be volatile. To fix this issue we do the same for OpenRISC. This patch must go before PCI is enabled on OpenRISC to avoid any compile failures. Link: https://lore.kernel.org/lkml/20220729033728.GA2195022@roeck-us.net/ Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Stafford Horne arch/openrisc/include/asm/io.h | 2 +- arch/openrisc/mm/ioremap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3d316164e9a9699c322e003a37f528e8aecda24e Author: Stafford Horne Date: Sat Jul 23 06:00:41 2022 +0900 MAINTAINERS: Update Richard Henderson's address Richard's address at twiddle.net no longer works and we are getting bounces. This patch updates to his Linaro address. Reviewed-by: Richard Henderson Signed-off-by: Stafford Horne MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 740ea2bb22aa53a2ad5845b8bd8f013d08b037b7 Author: Stafford Horne Date: Sun Jun 5 11:03:31 2022 +0900 openrisc: Add virt defconfig I have been developing a new qemu virt platform to help with more efficient toolchain and kernel testing [1]. This patch adds the defconfig which is needed to support booting linux on the platform. [1] https://lore.kernel.org/qemu-devel/YpwNtowUTxRbh2Uq@antec/T/#m6db180b0d682785fb320e4a05345c12a063e0c47 Signed-off-by: Stafford Horne arch/openrisc/configs/virt_defconfig | 108 +++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) commit ded2ee36313c941f1a12b6f85cde295b575264ae Author: Stafford Horne Date: Sun Jun 12 08:42:33 2022 +0900 openrisc: Add pci bus support This patch adds required definitions to allow for PCI buses on OpenRISC. This is being tested on the OpenRISC QEMU virt platform which is in development. OpenRISC does not have IO ports so we keep the definition of IO_SPACE_LIMIT and PIO_RESERVED to be 0. Note, since commit 66bcd06099bb ("parport_pc: Also enable driver for PCI systems") all platforms that support PCI also need to support parallel port. We add a generic header to support compiling parallel port drivers, though they generally will not work as they require IO ports. Signed-off-by: Stafford Horne arch/openrisc/Kconfig | 5 ++++- arch/openrisc/include/asm/Kbuild | 1 + arch/openrisc/include/asm/io.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) commit 0757060a438835df82bd8aec40d4abc7dc4c9584 Merge: 32346491ddf2 933c5a4f87d9 Author: Stafford Horne Date: Sat Jul 30 05:47:13 2022 +0900 Merge branch 'pci/header-cleanup-immutable' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git The OpenRISC PCI support depends on the fixups done in the pci/header-cleanup-immutable branch. Also, there are OpenRISC irqchip fixups in v5.19-rc6 that are needed to test the virt platform. This merge creates a base for the OpenRISC PCI changes. commit b5605148e6ce36bb21020d49010b617693933128 Author: Bart Van Assche Date: Wed Jul 27 12:34:15 2022 -0700 RDMA/srpt: Fix a use-after-free Change the LIO port members inside struct srpt_port from regular members into pointers. Allocate the LIO port data structures from inside srpt_make_tport() and free these from inside srpt_make_tport(). Keep struct srpt_device as long as either an RDMA port or a LIO target port is associated with it. This patch decouples the lifetime of struct srpt_port (controlled by the RDMA core) and struct srpt_port_id (controlled by LIO). This patch fixes the following KASAN complaint: BUG: KASAN: use-after-free in srpt_enable_tpg+0x31/0x70 [ib_srpt] Read of size 8 at addr ffff888141cc34b8 by task check/5093 Call Trace: show_stack+0x4e/0x53 dump_stack_lvl+0x51/0x66 print_address_description.constprop.0.cold+0xea/0x41e print_report.cold+0x90/0x205 kasan_report+0xb9/0xf0 __asan_load8+0x69/0x90 srpt_enable_tpg+0x31/0x70 [ib_srpt] target_fabric_tpg_base_enable_store+0xe2/0x140 [target_core_mod] configfs_write_iter+0x18b/0x210 new_sync_write+0x1f2/0x2f0 vfs_write+0x3e3/0x540 ksys_write+0xbb/0x140 __x64_sys_write+0x42/0x50 do_syscall_64+0x34/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Link: https://lore.kernel.org/r/20220727193415.1583860-4-bvanassche@acm.org Reported-by: Li Zhijian Tested-by: Li Zhijian Fixes: a42d985bd5b2 ("ib_srpt: Initial SRP Target merge for v3.3-rc1") Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/srpt/ib_srpt.c | 130 +++++++++++++++++++++++----------- drivers/infiniband/ulp/srpt/ib_srpt.h | 10 +-- 2 files changed, 94 insertions(+), 46 deletions(-) commit aa7dfbb41b5a60ab90e244d6f586b8cb5c791c3e Author: Bart Van Assche Date: Wed Jul 27 12:34:14 2022 -0700 RDMA/srpt: Introduce a reference count in struct srpt_device This will be used to keep struct srpt_device around as long as either the RDMA port exists or a LIO target port is associated with the struct srpt_device. Link: https://lore.kernel.org/r/20220727193415.1583860-3-bvanassche@acm.org Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/srpt/ib_srpt.c | 17 +++++++++++++++-- drivers/infiniband/ulp/srpt/ib_srpt.h | 2 ++ 2 files changed, 17 insertions(+), 2 deletions(-) commit b03b1ae2a3125d4475452e4f19f5d3a6e910ff6e Author: Bart Van Assche Date: Wed Jul 27 12:34:13 2022 -0700 RDMA/srpt: Duplicate port name members Prepare for decoupling the lifetimes of struct srpt_port and struct srpt_port_id by duplicating the port name into struct srpt_port. Link: https://lore.kernel.org/r/20220727193415.1583860-2-bvanassche@acm.org Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/srpt/ib_srpt.c | 9 ++++++--- drivers/infiniband/ulp/srpt/ib_srpt.h | 10 +++++++--- 2 files changed, 13 insertions(+), 6 deletions(-) commit 64f991590ff4410041a70ee7ec2db079bc953929 Author: Rodrigo Siqueira Date: Thu Jul 28 16:33:47 2022 -0400 drm/amd/display: Fix a compilation failure on PowerPC caused by FPU code We got a report from Stephen/Michael that the PowerPC build was failing with the following error: ld: drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.o uses hard float, drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.o uses soft float ld: failed to merge target specific data of file drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.o This error happened because of the function optc3_set_vrr_m_const. This function expects a double as a parameter in a code that is not allowed to have FPU operations. After further investigation, it became clear that optc3_set_vrr_m_const was never invoked, so we can safely drop this function and fix the ld issue. Cc: Alex Deucher Cc: Melissa Wen Reported-by: Stephen Rothwell Reported-by: Michael Ellerman Tested-by: Michael Ellerman Acked-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.c | 8 -------- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h | 3 --- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_optc.c | 1 - drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h | 2 -- 4 files changed, 14 deletions(-) commit 7e8a3ca972adfc89609718c931577a86c494967b Author: Xiaojian Du Date: Wed Jul 27 15:52:33 2022 +0800 drm/amdgpu: enable support for psp 13.0.4 block This patch will enable support for psp 13.0.4 blcok. Signed-off-by: Xiaojian Du Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 13 +++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1 + 4 files changed, 19 insertions(+), 2 deletions(-) commit 2605e60c82604508f60dbf427b82cd48154d88ee Author: Xiaojian Du Date: Thu Jul 28 13:25:26 2022 +0800 drm/amdgpu: add files for PSP 13.0.4 This patch will add files for PSP 13.0.4. Signed-off-by: Xiaojian Du Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v13_0_4.c | 387 +++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/psp_v13_0_4.h | 30 +++ 2 files changed, 417 insertions(+) commit 492af34c9f67ef864319d0db930c8518a04b1937 Author: Xiaojian Du Date: Thu Jul 28 13:23:38 2022 +0800 drm/amdgpu: add header files for MP 13.0.4 This patch will add header files for MP 13.0.4. Signed-off-by: Xiaojian Du Reviewed-by: Tim Huang Signed-off-by: Alex Deucher .../drm/amd/include/asic_reg/mp/mp_13_0_4_offset.h | 402 ++++++++++++++ .../amd/include/asic_reg/mp/mp_13_0_4_sh_mask.h | 595 +++++++++++++++++++++ 2 files changed, 997 insertions(+) commit a16161a869d5633d7d9a825a2546b68953e3a6f0 Author: Yifan Zhang Date: Wed Jul 27 14:53:47 2022 +0800 drm/amdgpu: correct RLC_RLCS_BOOTLOAD_STATUS offset and index This patch corrects RLC_RLCS_BOOTLOAD_STATUS offset and index for GC 11.0.1. Signed-off-by: Yifan Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 69243df953e70c134c6735b31ba0e658c53d3cda Merge: 66bbf1441d21 a1848b0fa251 Author: Mark Brown Date: Fri Jul 29 20:22:22 2022 +0100 Add SPI Driver to HPE GXP Architecture Merge series from nick.hawkins@hpe.com : The GXP supports 3 separate SPI interfaces to accommodate the system flash, core flash, and other functions. The SPI engine supports variable clock frequency, selectable 3-byte or 4-byte addressing and a configurable x1, x2, and x4 command/address/data modes. The memory buffer for reading and writing ranges between 256 bytes and 8KB. This driver supports access to the core flash and bios part. commit b834fc94c102eef751ff741aa0d9b814d0a81af1 Author: Xiaojian Du Date: Wed Jul 27 14:40:21 2022 +0800 drm/amdgpu: send msg to IMU for the front-door loading This patch will make SMU send msg to IMU for the front-door loading, it is required by some ASICs. Signed-off-by: Yifan Zhang Signed-off-by: Xiaojian Du Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit dcfe584b00f1d6dcbeeb769b939f53a3c4f04143 Author: Yu Zhe Date: Thu Jul 28 11:30:26 2022 +0800 drm/amdkfd: use time_is_before_jiffies(a + b) to replace "jiffies - a > b" time_is_before_jiffies deals with timer wrapping correctly. Signed-off-by: Yu Zhe Signed-off-by: Felix Kuehling Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6352f3478a95cc413ecfee4fdb3300009fd3679a Merge: 59fa06cd8529 03c440a26cba 2c65e312bc6b 9066e151c379 Author: Rafael J. Wysocki Date: Fri Jul 29 20:27:37 2022 +0200 Merge branches 'acpi-video', 'acpi-pci' and 'acpi-docs' Merge ACPI backlight driver changes, ACPI changes related to PCI and ACPI documentation changes for v5.20-rc1: - Use native backlight on Dell Inspiron N4010 (Hans de Goede). - Use native backlight on some TongFang devices (Werner Sembach). - Drop X86 dependency from the ACPI backlight driver Kconfig (Riwen Lu). - Shorten the quirk list in the ACPI backlight driver by identifying Clevo by board_name only (Werner Sembach). - Remove useless NULL pointer checks from 2 ACPI PCI link management functions (Andrey Strachuk). - Fix obsolete example in the ACPI EINJ documentation (Qifu Zhang). - Update links and references to _DSD-related documents (Sudeep Holla). * acpi-video: ACPI: video: Use native backlight on Dell Inspiron N4010 ACPI: video: Shortening quirk list by identifying Clevo by board_name only ACPI: video: Force backlight native for some TongFang devices ACPI: video: Drop X86 dependency from Kconfig * acpi-pci: ACPI/PCI: Remove useless NULL pointer checks * acpi-docs: Documentation: ACPI: EINJ: Fix obsolete example Documentation: ACPI: Update links and references to DSD related docs commit 59fa06cd8529e05a1498f810d61d99008597cf49 Merge: 198c414ef21a ec6c05031904 b4f1f61ed592 3dcb861dbc6a 9946e39fe8d0 Author: Rafael J. Wysocki Date: Fri Jul 29 20:16:42 2022 +0200 Merge branches 'acpi-pm', 'acpi-soc', 'acpi-tables' and 'acpi-resource' Merge ACPI power management changes, ACPI LPSS driver changes, ACPI table parsing code changes and ACPI resource handling changes for v5.20-rc1: - Save NVS memory during transitions into S3 on Lenovo G40-45 (Manyi Li). - Add support for upcoming AMD uPEP device ID AMDI008 to the ACPI suspend-to-idle driver for x86 platforms (Shyam Sundar S K). - Clean up checks related to the ACPI_FADT_LOW_POWER_S0 platform flag in the LPIT table driver and the suspend-to-idle driver for x86 platforms (Rafael Wysocki). - Print information messages regarding declared LPS0 idle support in the platform firmware (Rafael Wysocki). - Fix missing check in register_device_clock() in the ACPI driver for Intel SoCs (huhai). - Fix ACS setup in the VIOT table parser (Eric Auger). - Skip IRQ override on AMD Zen platforms where it's harmful (Chuanhong Guo). * acpi-pm: ACPI: PM: x86: Print messages regarding LPS0 idle support ACPI: PM: s2idle: Use LPS0 idle if ACPI_FADT_LOW_POWER_S0 is unset Revert "ACPI / PM: LPIT: Register sysfs attributes based on FADT" ACPI: PM: s2idle: Add support for upcoming AMD uPEP HID AMDI008 ACPI: PM: save NVS memory for Lenovo G40-45 * acpi-soc: ACPI: LPSS: Fix missing check in register_device_clock() * acpi-tables: ACPI: VIOT: Fix ACS setup * acpi-resource: ACPI: resource: skip IRQ override on AMD Zen platforms commit 639de43ef0dda165441af400ecb372e16b7f9354 Author: Daniel Müller Date: Wed Jul 27 18:29:55 2022 +0000 selftests/bpf: Bump internal send_signal/send_signal_tracepoint timeout The send_signal/send_signal_tracepoint is pretty flaky, with at least one failure in every ten runs on a few attempts I've tried it: > test_send_signal_common:PASS:pipe_c2p 0 nsec > test_send_signal_common:PASS:pipe_p2c 0 nsec > test_send_signal_common:PASS:fork 0 nsec > test_send_signal_common:PASS:skel_open_and_load 0 nsec > test_send_signal_common:PASS:skel_attach 0 nsec > test_send_signal_common:PASS:pipe_read 0 nsec > test_send_signal_common:PASS:pipe_write 0 nsec > test_send_signal_common:PASS:reading pipe 0 nsec > test_send_signal_common:PASS:reading pipe error: size 0 0 nsec > test_send_signal_common:FAIL:incorrect result unexpected incorrect result: actual 48 != expected 50 > test_send_signal_common:PASS:pipe_write 0 nsec > #139/1 send_signal/send_signal_tracepoint:FAIL The reason does not appear to be a correctness issue in the strict sense. Rather, we merely do not receive the signal we are waiting for within the provided timeout. Let's bump the timeout by a factor of ten. With that change I have not been able to reproduce the failure in 150+ iterations. I am also sneaking in a small simplification to the test_progs test selection logic. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220727182955.4044988-1-deso@posteo.net tools/testing/selftests/bpf/prog_tests/send_signal.c | 2 +- tools/testing/selftests/bpf/test_progs.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) commit 198c414ef21a0b3521490430cade6aa7863a249e Merge: d60b6b0bc003 e414207d12f3 b13a3e5fd40b 3e6573c5d275 Author: Rafael J. Wysocki Date: Fri Jul 29 20:08:25 2022 +0200 Merge branches 'acpi-processor', 'acpi-apei' and 'acpi-ec' Merge ACPI processor driver changes, APEI changes and ACPI EC driver changes for v5.20-rc1: - Drop leftover acpi_processor_get_limit_info() declaration (Riwen Lu). - Split out thermal initialization from ACPI PSS (Riwen Lu). - Annotate more functions in the ACPI CPU idle driver to live in the cpuidle section (Guilherme G. Piccoli). - Fix _EINJ vs "special purpose" EFI memory regions (Dan Williams). - Implement a better fix to avoid spamming the console with old error logs (Tony Luck). - Fix typo in a comment in the APEI code (Xiang wangx). - Clean up the ACPI EC driver after previous changes in it (Hans de Goede). * acpi-processor: ACPI: processor: Drop leftover acpi_processor_get_limit_info() declaration ACPI: processor: Split out thermal initialization from ACPI PSS ACPI: processor/idle: Annotate more functions to live in cpuidle section * acpi-apei: ACPI: APEI: Fix _EINJ vs EFI_MEMORY_SP ACPI: APEI: Better fix to avoid spamming the console with old error logs ACPI: APEI: Fix double word in a comment * acpi-ec: ACPI: EC: Drop unused ident initializers from dmi_system_id tables ACPI: EC: Re-use boot_ec when possible even when EC_FLAGS_TRUST_DSDT_GPE is set ACPI: EC: Drop the EC_FLAGS_IGNORE_DSDT_GPE quirk ACPI: EC: Remove duplicate ThinkPad X1 Carbon 6th entry from DMI quirks commit d60b6b0bc00365ab338804213437785d269f777b Merge: 4f4179fcf420 e6bdbcc764af Author: Rafael J. Wysocki Date: Fri Jul 29 19:58:52 2022 +0200 Merge branch 'acpi-bus' Merge ACPI device object management changes for v5.20-rc1. - Use the facilities provided by the driver core and some additional helpers to handle the children of a given ACPI device object in multiple places instead of using the children and node list heads in struct acpi_device which is error prone (Rafael Wysocki). - Fix ACPI-related device reference counting issue in the hisi_lpc bus driver (Yang Yingliang). - Drop the children and node list heads that are not needed any more from struct acpi_device (Rafael Wysocki). - Drop driver member from struct acpi_device (Uwe Kleine-König). - Drop redundant check from acpi_device_remove() (Uwe Kleine-König). * acpi-bus: ACPI: bus: Drop unused list heads from struct acpi_device hisi_lpc: Use acpi_dev_for_each_child() bus: hisi_lpc: fix missing platform_device_put() in hisi_lpc_acpi_probe() ACPI: bus: Drop driver member of struct acpi_device ACPI: bus: Drop redundant check in acpi_device_remove() mfd: core: Use acpi_dev_for_each_child() ACPI / MMC: PM: Unify fixing up device power soundwire: Use acpi_dev_for_each_child() platform/x86/thinkpad_acpi: Use acpi_dev_for_each_child() ACPI: scan: Walk ACPI device's children using driver core ACPI: bus: Introduce acpi_dev_for_each_child_reverse() ACPI: video: Use acpi_dev_for_each_child() ACPI: bus: Export acpi_dev_for_each_child() to modules ACPI: property: Use acpi_dev_for_each_child() for child lookup ACPI: container: Use acpi_dev_for_each_child() USB: ACPI: Replace usb_acpi_find_port() with acpi_find_child_by_adr() thunderbolt: ACPI: Replace tb_acpi_find_port() with acpi_find_child_by_adr() ACPI: glue: Introduce acpi_find_child_by_adr() ACPI: glue: Introduce acpi_dev_has_children() ACPI: glue: Use acpi_dev_for_each_child() commit aa727b7b4b67dba2a6cfebdd98767c455c2b3d69 Merge: 954a83fc60c8 b2111a01dc3c 8d36694245f2 b3f6c43d008c 7c4300eb05fb Author: Rafael J. Wysocki Date: Fri Jul 29 19:46:00 2022 +0200 Merge branches 'pm-devfreq', 'pm-qos', 'pm-tools' and 'pm-docs' Merge devfreq changes, PM QoS change, and power management tools and documentation changes for v5.20-rc1: - Add new devfreq driver for Mediatek CCI (Cache Coherent Interconnect) (Johnson Wang). - Convert the Samsung Exynos SoC Bus bindings to DT schema of exynos-bus.c (Krzysztof Kozlowski). - Address kernel-doc warnings by adding the description for unused fucntion parameters in devfreq core (Mauro Carvalho Chehab). - Use NULL to pass a null pointer rather than zero according to the function propotype in imx-bus.c (Colin Ian King). - Print error message instead of error interger value in tegra30-devfreq.c (Dmitry Osipenko). - Add checks to prevent setting negative frequency QoS limits for CPUs (Shivnandan Kumar). - Update the pm-graph suite of utilities to the latest revision 5.9 including multiple improvements (Todd Brandt). - Drop pme_interrupt reference from the PCI power management documentation (Mario Limonciello). * pm-devfreq: PM / devfreq: tegra30: Add error message for devm_devfreq_add_device() PM / devfreq: imx-bus: use NULL to pass a null pointer rather than zero PM / devfreq: shut up kernel-doc warnings dt-bindings: interconnect: samsung,exynos-bus: convert to dtschema PM / devfreq: mediatek: Introduce MediaTek CCI devfreq driver dt-bindings: interconnect: Add MediaTek CCI dt-bindings * pm-qos: PM: QoS: Add check to make sure CPU freq is non-negative * pm-tools: pm-graph v5.9 * pm-docs: Documentation: PM: Drop pme_interrupt reference commit a6df06744b2d0b953615e0d6ca8b5e84ae4019fc Author: Jörn-Thorben Hinz Date: Tue Jul 26 15:32:03 2022 +0200 bpftool: Don't try to return value from void function in skeleton A skeleton generated by bpftool previously contained a return followed by an expression in OBJ_NAME__detach(), which has return type void. This did not hurt, the bpf_object__detach_skeleton() called there returns void itself anyway, but led to a warning when compiling with e.g. -pedantic. Signed-off-by: Jörn-Thorben Hinz Signed-off-by: Andrii Nakryiko Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20220726133203.514087-1-jthinz@mailbox.tu-berlin.de tools/bpf/bpftool/gen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5eff8c18f124e47da0be79fb2b776e1c2cac0b07 Author: Rongguang Wei Date: Tue Jul 26 17:30:45 2022 +0800 bpftool: Replace sizeof(arr)/sizeof(arr[0]) with ARRAY_SIZE macro Use the ARRAY_SIZE macro and make the code more compact. Signed-off-by: Rongguang Wei Signed-off-by: Andrii Nakryiko Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20220726093045.3374026-1-clementwei90@163.com tools/bpf/bpftool/prog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 954a83fc60c805f138db26747645710f243a9939 Merge: 82b6c2e7df79 c46a0d5ae4f9 8386c414e27c b08b95cf30f5 37101d3c7193 f3ac888fc5fb Author: Rafael J. Wysocki Date: Fri Jul 29 19:33:13 2022 +0200 Merge branches 'pm-core', 'pm-sleep', 'powercap', 'pm-domains' and 'pm-em' Merge core device power management changes for v5.20-rc1: - Extend support for wakeirq to callback wrappers used during system suspend and resume (Ulf Hansson). - Defer waiting for device probe before loading a hibernation image till the first actual device access to avoid possible deadlocks reported by syzbot (Tetsuo Handa). - Unify device_init_wakeup() for PM_SLEEP and !PM_SLEEP (Bjorn Helgaas). - Add Raptor Lake-P to the list of processors supported by the Intel RAPL driver (George D Sworo). - Add Alder Lake-N and Raptor Lake-P to the list of processors for which Power Limit4 is supported in the Intel RAPL driver (Sumeet Pawnikar). - Make pm_genpd_remove() check genpd_debugfs_dir against NULL before attempting to remove it (Hsin-Yi Wang). - Change the Energy Model code to represent power in micro-Watts and adjust its users accordingly (Lukasz Luba). * pm-core: PM: runtime: Extend support for wakeirq for force_suspend|resume * pm-sleep: PM: hibernate: defer device probing when resuming from hibernation PM: wakeup: Unify device_init_wakeup() for PM_SLEEP and !PM_SLEEP * powercap: powercap: RAPL: Add Power Limit4 support for Alder Lake-N and Raptor Lake-P powercap: intel_rapl: Add support for RAPTORLAKE_P * pm-domains: PM: domains: Ensure genpd_debugfs_dir exists before remove * pm-em: cpufreq: scmi: Support the power scale in micro-Watts in SCMI v3.1 firmware: arm_scmi: Get detailed power scale from perf Documentation: EM: Switch to micro-Watts scale PM: EM: convert power field to micro-Watts precision and align drivers commit 82b6c2e7df79eb01ef561f8bf7a881f7db466c7a Merge: 3e5c04f97c87 f611b33af2a8 Author: Rafael J. Wysocki Date: Fri Jul 29 19:19:23 2022 +0200 Merge branches 'pm-cpufreq' and 'pm-cpuidle' Merge processor power management changes for v5.20-rc1: - Make cpufreq_show_cpus() more straightforward (Viresh Kumar). - Drop unnecessary CPU hotplug locking from store() used by cpufreq sysfs attributes (Viresh Kumar). - Make the ACPI cpufreq driver support the boost control interface on Zhaoxin/Centaur processors (Tony W Wang-oc). - Print a warning message on attempts to free an active cpufreq policy which should never happen (Viresh Kumar). - Fix grammar in the Kconfig help text for the loongson2 cpufreq driver (Randy Dunlap). - Use cpumask_var_t for an on-stack CPU mask in the ondemand cpufreq governor (Zhao Liu). - Add trace points for guest_halt_poll_ns grow/shrink to the haltpoll cpuidle driver (Eiichi Tsukata). - Modify intel_idle to treat C1 and C1E as independent idle states on Sapphire Rapids (Artem Bityutskiy). * pm-cpufreq: cpufreq: ondemand: Use cpumask_var_t for on-stack cpu mask cpufreq: loongson2: fix Kconfig "its" grammar cpufreq: Warn users while freeing active policy cpufreq: ACPI: Add Zhaoxin/Centaur turbo boost control interface support cpufreq: Drop unnecessary cpus locking from store() cpufreq: Optimize cpufreq_show_cpus() * pm-cpuidle: intel_idle: make SPR C1 and C1E be independent cpuidle: haltpoll: Add trace points for guest_halt_poll_ns grow/shrink commit 5147ba8af2d707d9bbd65e84286c42b11d612c83 Author: Krishna chaitanya chundru Date: Fri Jul 15 17:29:25 2022 +0530 PCI: qcom: Allow ASPM L1 and substates for 2.7.0 Allow ASPM L1 and its substates. By default this is disabled in the qcom specific hardware. Enable it explicitly only for controllers belonging to 2_7_0. This does not affect any link capability registers; it will allow the link transitions to L1 and its substates only if they are already supported. Link: https://lore.kernel.org/r/1657886366-32685-1-git-send-email-quic_krichai@quicinc.com Signed-off-by: Krishna chaitanya chundru Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Stanimir Varbanov drivers/pci/controller/dwc/pcie-qcom.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit da9d01794e31714a90a38e395c14723fb46f90b0 Merge: a2ed4e7e3b3a d0c75fa2c17f Author: Rafael J. Wysocki Date: Fri Jul 29 19:10:56 2022 +0200 Merge tag 'thermal-v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal control changes for 5.20-rc1 from Daniel Lezcano: "- Make per cpufreq / devfreq cooling device ops instead of using a global variable, fix comments and rework the trace information (Lukasz Luba) - Add the include/dt-bindings/thermal.h under the area covered by the thermal maintainer in the MAINTAINERS file (Lukas Bulwahn) - Improve the error output by giving the sensor identification when a thermal zone failed to initialize, the DT bindings by changing the positive logic and adding the r8a779f0 support on the rcar3 (Wolfram Sang) - Convert the QCom tsens DT binding to the dtsformat format (Krzysztof Kozlowski) - Remove the pointless get_trend() function in the QCom, Ux500 and tegra thermal drivers, along with the unused DROP_FULL and RAISE_FULL trends definitions. Simplify the code by using clamp() macros (Daniel Lezcano) - Fix ref_table memory leak at probe time on the k3_j72xx bandgap (Bryan Brattlof) - Fix array underflow in prep_lookup_table (Dan Carpenter) - Add static annotation to the k3_j72xx_bandgap_j7* data structure (Jin Xiaoyun) - Fix typos in comments detected on sun8i by Coccinelle (Julia Lawall) - Fix typos in comments on rzg2l (Biju Das) - Remove as unnecessary call to dev_err() as the error is already printed by the failing function on u8500 (Yang Li) - Register the thermal zones as hwmon sensors for the Qcom thermal sensors (Dmitry Baryshkov) - Fix 'tmon' tool compilation issue by adding phtread.h include (Markus Mayer) - Fix typo in the comments for the 'tmon' tool (Slark Xiao) - Consolidate the thermal core code by beginning to move the thermal trip structure from the thermal OF code as a generic structure to be used by the different sensors when registering a thermal zone (Daniel Lezcano)" * tag 'thermal-v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (36 commits) thermal/of: Initialize trip points separately thermal/of: Use thermal trips stored in the thermal zone thermal/core: Add thermal_trip in thermal_zone thermal/core: Rename 'trips' to 'num_trips' thermal/core: Move thermal_set_delay_jiffies to static thermal/core: Remove unneeded EXPORT_SYMBOLS thermal/of: Move thermal_trip structure to thermal.h thermal/of: Remove the device node pointer for thermal_trip thermal/of: Replace device node match with device node search thermal/core: Remove duplicate information when an error occurs thermal/core: Avoid calling ->get_trip_temp() unnecessarily thermal/tools/tmon: Fix typo 'the the' in comment thermal/tools/tmon: Include pthread and time headers in tmon.h thermal/ti-soc-thermal: Fix comment typo thermal/drivers/qcom/spmi-adc-tm5: Register thermal zones as hwmon sensors thermal/drivers/qcom/temp-alarm: Register thermal zones as hwmon sensors thermal/drivers/u8500: Remove unnecessary print function dev_err() thermal/drivers/rzg2l: Fix comments thermal/drivers/sun8i: Fix typo in comment thermal/drivers/k3_j72xx_bandgap: Make k3_j72xx_bandgap_j721e_data and k3_j72xx_bandgap_j7200_data static ... commit c1ef322491cb880fea4e52535b15448f2a573ded Author: Arnd Bergmann Date: Fri Jul 15 17:36:17 2022 +0200 sparc: Use generic pci_mmap_resource_range() The main feature of the sparc-specific implementation of pci_mmap_resource_range() is that it allows mapping the entire PCI I/O space for a PCI host bridge using the /proc/bus/pci interface on a bridge device. The generic implementation cannot do this, but it also appears that this got broken for sparc by commit 9eff02e2042f ("PCI: check mmap range of /proc/bus/pci files too"), which enforces that each address is part of a BAR for kernels after 2.6.28. Remove it all, assuming that the corresponding user space code has already been changed to access /dev/ioport instead a long time ago. Add pci_iobar_pfn() to make it possible to map I/O resources. This is adapted from the powerpc version. Link: https://lore.kernel.org/lkml/1519887203.622.3.camel@infradead.org/t/ Link: https://lore.kernel.org/r/20220715153617.3393420-2-arnd@kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Helgaas arch/sparc/include/asm/pci.h | 1 + arch/sparc/kernel/pci.c | 154 ++----------------------------------------- 2 files changed, 5 insertions(+), 150 deletions(-) commit 0ad722f159e44983ddea1929ffd90d0c20a86f24 Author: Arnd Bergmann Date: Fri Jul 15 17:36:16 2022 +0200 PCI: Remove pci_mmap_page_range() wrapper The ARCH_GENERIC_PCI_MMAP_RESOURCE symbol came up in a recent discussion, and I noticed that this was left behind by an unfinished cleanup from 2017. The only architecture that still relies on providing its own pci_mmap_page_range() helper instead of using the generic pci_mmap_resource_range() is sparc. Presumably the reasons for this have not changed, but at least this can be simplified by converting sparc to use the same interface as the others. The only difference between the two is the device-specific offset that gets added to or subtracted from vma->vm_pgoff. Change the only caller of pci_mmap_page_range() in common code to subtract this offset and call the modern interface, while adding it back in the sparc implementation to preserve the existing behavior. This removes the complexities of the dual interfaces from the common code, and keeps it all specific to the sparc architecture code. According to David Miller, the sparc code lets user space poke into the VGA I/O port registers by mmapping the I/O space of the parent bridge device, which is something that the generic pci_mmap_resource_range() code apparently does not. Link: https://lore.kernel.org/lkml/1519887203.622.3.camel@infradead.org/t/ Link: https://lore.kernel.org/lkml/20220714214657.2402250-3-shorne@gmail.com/ Link: https://lore.kernel.org/r/20220715153617.3393420-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Helgaas Cc: David Woodhouse Cc: David S. Miller Cc: Stafford Horne Documentation/PCI/sysfs-pci.rst | 2 +- arch/sparc/kernel/pci.c | 13 ++++++++---- drivers/pci/mmap.c | 44 ----------------------------------------- drivers/pci/proc.c | 7 ++++++- include/linux/pci.h | 12 +---------- 5 files changed, 17 insertions(+), 61 deletions(-) commit a2ed4e7e3b3ac20769ee292795e7c2d086800261 Merge: b3ca7aff3cbb 5a5b7d8d5416 Author: Rafael J. Wysocki Date: Fri Jul 29 19:08:18 2022 +0200 Merge branch 'thermal-core' Merge changes that make the thermal core use ida_alloc()/free() directly instead of ida_simple_get()/ida_simple_remove() that have been deprecated. * thermal-core: thermal: Directly use ida_alloc()/free() commit 933c5a4f87d92a865d1db76caf190f1a4a1927f9 Author: Stafford Horne Date: Sat Jul 23 06:22:48 2022 +0900 PCI: Stub __pci_ioport_map() for arches that don't support it at all When building OpenRISC PCI, which has no ioport_map(), we get the following build error: lib/pci_iomap.c: In function 'pci_iomap_range': CC drivers/i2c/i2c-core-base.o ./include/asm-generic/pci_iomap.h:29:41: error: implicit declaration of function 'ioport_map'; did you mean 'ioremap'? [-Werror=implicit-function-declaration] 29 | #define __pci_ioport_map(dev, port, nr) ioport_map((port), (nr)) | ^~~~~~~~~~ lib/pci_iomap.c:44:24: note: in expansion of macro '__pci_ioport_map' 44 | return __pci_ioport_map(dev, start, len); | ^~~~~~~~~~~~~~~~ Add a NULL definition of __pci_ioport_map() for architectures that do not support ioport_map(). Suggested-by: Arnd Bergmann Link: https://lore.kernel.org/r/20220722212248.802500-1-shorne@gmail.com Signed-off-by: Stafford Horne Signed-off-by: Bjorn Helgaas include/asm-generic/pci_iomap.h | 2 ++ 1 file changed, 2 insertions(+) commit 58250ae350de8d28ce91ade4605d32c9e7f062a8 Author: Fedor Tokarev Date: Mon Jul 11 23:13:17 2022 +0200 bpf: btf: Fix vsnprintf return value check vsnprintf 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 'len_left' means that the last character has been dropped. Signed-off-by: Fedor Tokarev Signed-off-by: Andrii Nakryiko Acked-by: Alan Maguire Link: https://lore.kernel.org/bpf/20220711211317.GA1143610@laptop kernel/bpf/btf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a0b36266f7a83912592052035b84f13b12e30da Author: Zhengjun Xing Date: Thu Jul 21 14:57:06 2022 +0800 perf stat: Add topdown metrics in the default perf stat on the hybrid machine Topdown metrics are missed in the default perf stat on the hybrid machine, add Topdown metrics in default perf stat for hybrid systems. Currently, we support the perf metrics Topdown for the p-core PMU in the perf stat default, the perf metrics Topdown support for e-core PMU will be implemented later separately. Refactor the code adds two x86 specific functions. Widen the size of the event name column by 7 chars, so that all metrics after the "#" become aligned again. The perf metrics topdown feature is supported on the cpu_core of ADL. The dedicated perf metrics counter and the fixed counter 3 are used for the topdown events. Adding the topdown metrics doesn't trigger multiplexing. Before: # ./perf stat -a true Performance counter stats for 'system wide': 53.70 msec cpu-clock # 25.736 CPUs utilized 80 context-switches # 1.490 K/sec 24 cpu-migrations # 446.951 /sec 52 page-faults # 968.394 /sec 2,788,555 cpu_core/cycles/ # 51.931 M/sec 851,129 cpu_atom/cycles/ # 15.851 M/sec 2,974,030 cpu_core/instructions/ # 55.385 M/sec 416,919 cpu_atom/instructions/ # 7.764 M/sec 586,136 cpu_core/branches/ # 10.916 M/sec 79,872 cpu_atom/branches/ # 1.487 M/sec 14,220 cpu_core/branch-misses/ # 264.819 K/sec 7,691 cpu_atom/branch-misses/ # 143.229 K/sec 0.002086438 seconds time elapsed After: # ./perf stat -a true Performance counter stats for 'system wide': 61.39 msec cpu-clock # 24.874 CPUs utilized 76 context-switches # 1.238 K/sec 24 cpu-migrations # 390.968 /sec 52 page-faults # 847.097 /sec 2,753,695 cpu_core/cycles/ # 44.859 M/sec 903,899 cpu_atom/cycles/ # 14.725 M/sec 2,927,529 cpu_core/instructions/ # 47.690 M/sec 428,498 cpu_atom/instructions/ # 6.980 M/sec 581,299 cpu_core/branches/ # 9.470 M/sec 83,409 cpu_atom/branches/ # 1.359 M/sec 13,641 cpu_core/branch-misses/ # 222.216 K/sec 8,008 cpu_atom/branch-misses/ # 130.453 K/sec 14,761,308 cpu_core/slots/ # 240.466 M/sec 3,288,625 cpu_core/topdown-retiring/ # 22.3% retiring 1,323,323 cpu_core/topdown-bad-spec/ # 9.0% bad speculation 5,477,470 cpu_core/topdown-fe-bound/ # 37.1% frontend bound 4,679,199 cpu_core/topdown-be-bound/ # 31.7% backend bound 646,194 cpu_core/topdown-heavy-ops/ # 4.4% heavy operations # 17.9% light operations 1,244,999 cpu_core/topdown-br-mispredict/ # 8.4% branch mispredict # 0.5% machine clears 3,891,800 cpu_core/topdown-fetch-lat/ # 26.4% fetch latency # 10.7% fetch bandwidth 1,879,034 cpu_core/topdown-mem-bound/ # 12.7% memory bound # 19.0% Core bound 0.002467839 seconds time elapsed Reviewed-by: Kan Liang Signed-off-by: Xing Zhengjun Acked-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220721065706.2886112-6-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/evlist.c | 13 ++-------- tools/perf/arch/x86/util/topdown.c | 51 ++++++++++++++++++++++++++++++++++++++ tools/perf/arch/x86/util/topdown.h | 1 + tools/perf/builtin-stat.c | 14 ++--------- tools/perf/util/stat-display.c | 2 +- tools/perf/util/topdown.c | 7 ++++++ tools/perf/util/topdown.h | 3 ++- 7 files changed, 66 insertions(+), 25 deletions(-) commit cdb204ad42232070ccc2deb0c451b25d1d4cc892 Author: Kan Liang Date: Thu Jul 21 14:57:05 2022 +0800 perf x86 evlist: Add default hybrid events for perf stat Provide a new solution to replace the reverted commit ac2dc29edd21f9ec ("perf stat: Add default hybrid events") For the default software attrs, nothing is changed. For the default hardware attrs, create a new evsel for each hybrid pmu. With the new solution, adding a new default attr will not require the special support for the hybrid platform anymore. Also, the "--detailed" is supported on the hybrid platform With the patch, $ perf stat -a -ddd sleep 1 Performance counter stats for 'system wide': 32,231.06 msec cpu-clock # 32.056 CPUs utilized 529 context-switches # 16.413 /sec 32 cpu-migrations # 0.993 /sec 69 page-faults # 2.141 /sec 176,754,151 cpu_core/cycles/ # 5.484 M/sec (41.65%) 161,695,280 cpu_atom/cycles/ # 5.017 M/sec (49.92%) 48,595,992 cpu_core/instructions/ # 1.508 M/sec (49.98%) 32,363,337 cpu_atom/instructions/ # 1.004 M/sec (58.26%) 10,088,639 cpu_core/branches/ # 313.010 K/sec (58.31%) 6,390,582 cpu_atom/branches/ # 198.274 K/sec (58.26%) 846,201 cpu_core/branch-misses/ # 26.254 K/sec (66.65%) 676,477 cpu_atom/branch-misses/ # 20.988 K/sec (58.27%) 14,290,070 cpu_core/L1-dcache-loads/ # 443.363 K/sec (66.66%) 9,983,532 cpu_atom/L1-dcache-loads/ # 309.749 K/sec (58.27%) 740,725 cpu_core/L1-dcache-load-misses/ # 22.982 K/sec (66.66%) cpu_atom/L1-dcache-load-misses/ 480,441 cpu_core/LLC-loads/ # 14.906 K/sec (66.67%) 326,570 cpu_atom/LLC-loads/ # 10.132 K/sec (58.27%) 329 cpu_core/LLC-load-misses/ # 10.208 /sec (66.68%) 0 cpu_atom/LLC-load-misses/ # 0.000 /sec (58.32%) cpu_core/L1-icache-loads/ 21,982,491 cpu_atom/L1-icache-loads/ # 682.028 K/sec (58.43%) 4,493,189 cpu_core/L1-icache-load-misses/ # 139.406 K/sec (33.34%) 4,711,404 cpu_atom/L1-icache-load-misses/ # 146.176 K/sec (50.08%) 13,713,090 cpu_core/dTLB-loads/ # 425.462 K/sec (33.34%) 9,384,727 cpu_atom/dTLB-loads/ # 291.170 K/sec (50.08%) 157,387 cpu_core/dTLB-load-misses/ # 4.883 K/sec (33.33%) 108,328 cpu_atom/dTLB-load-misses/ # 3.361 K/sec (50.08%) cpu_core/iTLB-loads/ cpu_atom/iTLB-loads/ 37,655 cpu_core/iTLB-load-misses/ # 1.168 K/sec (33.32%) 61,661 cpu_atom/iTLB-load-misses/ # 1.913 K/sec (50.03%) cpu_core/L1-dcache-prefetches/ cpu_atom/L1-dcache-prefetches/ cpu_core/L1-dcache-prefetch-misses/ cpu_atom/L1-dcache-prefetch-misses/ 1.005466919 seconds time elapsed Signed-off-by: Kan Liang Acked-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220721065706.2886112-5-zhengjun.xing@linux.intel.com Signed-off-by: Xing Zhengjun Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/evlist.c | 52 ++++++++++++++++++++++++++++++++++++++- tools/perf/util/evlist.c | 2 +- tools/perf/util/evlist.h | 2 ++ 3 files changed, 54 insertions(+), 2 deletions(-) commit a9c1ecdabc4f2ef04ef5334b8deb3a5c5910136d Author: Kan Liang Date: Thu Jul 21 14:57:04 2022 +0800 perf evlist: Always use arch_evlist__add_default_attrs() Current perf stat uses the evlist__add_default_attrs() to add the generic default attrs, and uses arch_evlist__add_default_attrs() to add the Arch specific default attrs, e.g., Topdown for x86. It works well for the non-hybrid platforms. However, for a hybrid platform, the hard code generic default attrs don't work. Uses arch_evlist__add_default_attrs() to replace the evlist__add_default_attrs(). The arch_evlist__add_default_attrs() is modified to invoke the same __evlist__add_default_attrs() for the generic default attrs. No functional change. Add default_null_attrs[] to indicate the arch specific attrs. No functional change for the arch specific default attrs either. Signed-off-by: Kan Liang Acked-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220721065706.2886112-4-zhengjun.xing@linux.intel.com Signed-off-by: Xing Zhengjun Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/evlist.c | 7 ++++++- tools/perf/builtin-stat.c | 6 +++++- tools/perf/util/evlist.c | 9 +++++++-- tools/perf/util/evlist.h | 7 +++++-- 4 files changed, 23 insertions(+), 6 deletions(-) commit ff4207f79307dc4910a27771e4306e1a64fde3e1 Author: Kan Liang Date: Thu Jul 21 14:57:03 2022 +0800 perf evsel: Add arch_evsel__hw_name() The commit 55bcf6ef314ae8ba ("perf: Extend PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE") extends the two types to become PMU aware types for a hybrid system. However, current evsel__hw_name doesn't take the PMU type into account. It mistakenly returns the "unknown-hardware" for the hardware event with a specific PMU type. Add an arch specific arch_evsel__hw_name() to specially handle the PMU aware hardware event. Currently, the extend PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE is only supported by X86. Only implement the specific arch_evsel__hw_name() for X86 in the patch. Nothing is changed for the other archs. Signed-off-by: Kan Liang Acked-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220721065706.2886112-3-zhengjun.xing@linux.intel.com Signed-off-by: Xing Zhengjun Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/evsel.c | 20 ++++++++++++++++++++ tools/perf/util/evsel.c | 7 ++++++- tools/perf/util/evsel.h | 1 + 3 files changed, 27 insertions(+), 1 deletion(-) commit ace3e31e653e79cae9b047e85f567e6b44c98532 Author: Kan Liang Date: Thu Jul 21 14:57:02 2022 +0800 perf stat: Revert "perf stat: Add default hybrid events" This reverts commit Fixes: ac2dc29edd21f9ec ("perf stat: Add default hybrid events") Between this patch and the reverted patch, the commit 6c1912898ed21bef ("perf parse-events: Rename parse_events_error functions") and the commit 07eafd4e053a41d7 ("perf parse-event: Add init and exit to parse_event_error") clean up the parse_events_error_*() codes. The related change is also reverted. The reverted patch is hard to be extended to support new default events, e.g., Topdown events, and the existing "--detailed" option on a hybrid platform. A new solution will be proposed in the following patch to enable the perf stat default on a hybrid platform. Signed-off-by: Kan Liang Acked-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220721065706.2886112-2-zhengjun.xing@linux.intel.com Signed-off-by: Xing Zhengjun Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 30 ------------------------------ 1 file changed, 30 deletions(-) commit a1848b0fa2517a8d0bbc2783c90aefd4b7e7567a Author: Nick Hawkins Date: Thu Jul 28 11:14:59 2022 -0500 MAINTAINERS: add spi support to GXP Add the spi driver and dt-binding documentation Signed-off-by: Nick Hawkins Link: https://lore.kernel.org/r/20220728161459.7738-6-nick.hawkins@hpe.com Signed-off-by: Mark Brown MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 8cc35b86546dc35fb4f5ff7d1d163c5efc78bf0e Author: Nick Hawkins Date: Thu Jul 28 11:14:56 2022 -0500 spi: dt-bindings: add documentation for hpe,gxp-spifi Create documentation for the hpe,gxp-spifi binding to support access to the SPI parts Signed-off-by: Nick Hawkins Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220728161459.7738-3-nick.hawkins@hpe.com Signed-off-by: Mark Brown .../devicetree/bindings/spi/hpe,gxp-spifi.yaml | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 730bc8ba5e9ec103065142975015a793558f09a0 Author: Nick Hawkins Date: Thu Jul 28 11:14:55 2022 -0500 spi: spi-gxp: Add support for HPE GXP SoCs The GXP supports 3 separate SPI interfaces to accommodate the system flash, core flash, and other functions. The SPI engine supports variable clock frequency, selectable 3-byte or 4-byte addressing and a configurable x1, x2, and x4 command/address/data modes. The memory buffer for reading and writing ranges between 256 bytes and 8KB. This driver supports access to the core flash and bios part. Signed-off-by: Nick Hawkins Link: https://lore.kernel.org/r/20220728161459.7738-2-nick.hawkins@hpe.com Signed-off-by: Mark Brown drivers/spi/Kconfig | 7 ++ drivers/spi/Makefile | 1 + drivers/spi/spi-gxp.c | 325 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 333 insertions(+) commit 93cb804edab1b9a5bb7bb7b6824012dbb20abf22 Author: Przemyslaw Patynowski Date: Wed Jun 15 15:36:29 2022 +0200 iavf: Fix 'tc qdisc show' listing too many queues Fix tc qdisc show dev root displaying too many fq_codel qdiscs. tc_modify_qdisc, which is caller of ndo_setup_tc, expects driver to call netif_set_real_num_tx_queues, which prepares qdiscs. Without this patch, fq_codel qdiscs would not be adjusted to number of queues on VF. e.g.: tc qdisc show dev qdisc mq 0: root qdisc fq_codel 0: parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc fq_codel 0: parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc fq_codel 0: parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc fq_codel 0: parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 tc qdisc add dev root mqprio num_tc 2 map 1 0 0 0 0 0 0 0 queues 1@0 1@1 hw 1 mode channel shaper bw_rlimit max_rate 5000Mbit 150Mbit tc qdisc show dev qdisc mqprio 8003: root tc 2 map 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 queues:(0:0) (1:1) mode:channel shaper:bw_rlimit max_rate:5Gbit 150Mbit qdisc fq_codel 0: parent 8003:4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc fq_codel 0: parent 8003:3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc fq_codel 0: parent 8003:2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc fq_codel 0: parent 8003:1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 While after fix: tc qdisc add dev root mqprio num_tc 2 map 1 0 0 0 0 0 0 0 queues 1@0 1@1 hw 1 mode channel shaper bw_rlimit max_rate 5000Mbit 150Mbit tc qdisc show dev #should show 2, shows 4 qdisc mqprio 8004: root tc 2 map 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 queues:(0:0) (1:1) mode:channel shaper:bw_rlimit max_rate:5Gbit 150Mbit qdisc fq_codel 0: parent 8004:2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc fq_codel 0: parent 8004:1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 Fixes: d5b33d024496 ("i40evf: add ndo_setup_tc callback to i40evf") Signed-off-by: Przemyslaw Patynowski Co-developed-by: Grzegorz Szczurek Signed-off-by: Grzegorz Szczurek Co-developed-by: Kiran Patil Signed-off-by: Kiran Patil Signed-off-by: Jedrzej Jagielski Tested-by: Bharathi Sreenivas Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf.h | 5 +++++ drivers/net/ethernet/intel/iavf/iavf_main.c | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) commit ec60d54cb9a3d43a02c5612a03093c18233e6601 Author: Przemyslaw Patynowski Date: Mon Jun 13 18:41:23 2022 -0400 iavf: Fix max_rate limiting Fix max_rate option in TC, check for proper quanta boundaries. Check for minimum value provided and if it fits expected 50Mbps quanta. Without this patch, iavf could send settings for max_rate limiting that would be accepted from by PF even the max_rate option is less than expected 50Mbps quanta. It results in no rate limiting on traffic as rate limiting will be floored to 0. Example: tc qdisc add dev $vf root mqprio num_tc 3 map 0 2 1 queues \ 2@0 2@2 2@4 hw 1 mode channel shaper bw_rlimit \ max_rate 50Mbps 500Mbps 500Mbps Should limit TC0 to circa 50 Mbps tc qdisc add dev $vf root mqprio num_tc 3 map 0 2 1 queues \ 2@0 2@2 2@4 hw 1 mode channel shaper bw_rlimit \ max_rate 0Mbps 100Kbit 500Mbps Should return error Fixes: d5b33d024496 ("i40evf: add ndo_setup_tc callback to i40evf") Signed-off-by: Przemyslaw Patynowski Signed-off-by: Jun Zhang Tested-by: Bharathi Sreenivas Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf.h | 1 + drivers/net/ethernet/intel/iavf/iavf_main.c | 25 +++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) commit f611b33af2a88f4179b130d4bf7c482271ce1c81 Merge: d295ad34f236 1548fac47a11 Author: Rafael J. Wysocki Date: Fri Jul 29 17:15:30 2022 +0200 Merge back cpuidle material for 5.20. commit 452e21cf3438aca19b678d1f182d7d6525648956 Author: Michael Ellerman Date: Fri Jul 29 16:13:55 2022 +1000 powerpc/mm: Export memory_add_physaddr_to_nid() for modules The cxl_pmem module wants to call memory_add_physaddr_to_nid(), so export the symbol. Link: http://lore.kernel.org/r/87sfmkbfyg.fsf@mpe.ellerman.id.au Fixes: 04ad63f086d1 ("cxl/region: Introduce cxl_pmem_region objects") Reported-by: Sachin Sant Signed-off-by: Michael Ellerman Tested-by: Sachin Sant Signed-off-by: Dan Williams arch/powerpc/mm/mem.c | 1 + 1 file changed, 1 insertion(+) commit 273aaa24369cb8d0f246bb16f7122b91a1ef5188 Author: Greg Kroah-Hartman Date: Fri Jul 29 15:45:17 2022 +0200 docs: embargoed-hardware-issues: fix invalid AMD contact email The current AMD contact info email address is incorrect, so fix it up to use the correct one. Cc: Jonathan Corbet Cc: Alex Shi Cc: Yanteng Si Cc: Hu Haowen Cc: Tom Lendacky Acked-by: Tom Lendacky Link: https://lore.kernel.org/r/20220729134517.2284700-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman Documentation/process/embargoed-hardware-issues.rst | 2 +- Documentation/translations/zh_CN/process/embargoed-hardware-issues.rst | 2 +- Documentation/translations/zh_TW/process/embargoed-hardware-issues.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 35610745d71df567297bb40c5e4263cda38dddd5 Merge: 42bbf810e155 5cc8cc4406ed Author: Kalle Valo Date: Fri Jul 29 16:38:03 2022 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.20. Major changes: ath11k: * fix WCN9074 to work again * revert rfkill support as it was causing problems commit 42bbf810e155efc6129a3a648ae5300f00b79d7b Author: William Dean Date: Sat Jul 23 14:37:56 2022 +0800 wifi: rtw88: check the return value of alloc_workqueue() The function alloc_workqueue() in rtw_core_init() can fail, but there is no check of its return value. To fix this bug, its return value should be checked with new error handling code. Fixes: fe101716c7c9d ("rtw88: replace tx tasklet with work queue") Reported-by: Hacash Robot Signed-off-by: William Dean Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220723063756.2956189-1-williamsukatube@163.com drivers/net/wireless/realtek/rtw88/main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 334facd651b98f2e6c6bb699405f8b7421b9b40c Author: Zong-Zhe Yang Date: Thu Jul 21 15:49:52 2022 +0800 wifi: rtw89: 8852a: adjust IMR for SER L1 SER (system error recovery) L1 (level 1) has a step-by-step handshake process with FW. These handshakes still rely on B_AX_HS0ISR_IND_INT_EN. So, even already during recovery, we enable this bit in IMR. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220721074952.19676-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87de35cbf65cdb5b059dc30801aa63cdec3c7c2a Author: Ping-Ke Shih Date: Wed Jun 22 17:19:37 2022 +0800 wifi: rtw89: 8852a: update RF radio A/B R56 Update to internal tag HALRF_027_00_060. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220622091937.11325-1-pkshih@realtek.com .../net/wireless/realtek/rtw89/rtw8852a_table.c | 896 ++++++++++----------- 1 file changed, 446 insertions(+), 450 deletions(-) commit 2e2e91158febfeb73b5d4f249440218304f34101 Merge: e0dccc3b76fb 6bb2e00ea304 Author: Paolo Bonzini Date: Fri Jul 29 09:34:45 2022 -0400 Merge tag 'kvm-riscv-5.20-1' of https://github.com/kvm-riscv/linux into HEAD KVM/riscv changes for 5.20 * Track ISA extensions used by Guest using bitmap * Added system instruction emulation framework * Added CSR emulation framework * Added gfp_custom flag in struct kvm_mmu_memory_cache * Added G-stage ioremap() and iounmap() functions * Added support for Svpbmt inside Guest commit fb5962f81ebbd8b4f3199115b5ddb7b7c7545458 Author: Thomas Richter Date: Wed Jul 27 16:14:39 2022 +0200 perf test: Fix test case 95 ("Check branch stack sampling") on s390 and use same event On linux-next tree 'perf test 95' ("Check branch stack sampling") was added recently. s390 does not support branch sampling at all and the test case fails despite for checking branch support before hand. The check for support of branching uses the software event named "dummy", as seen in the line: perf record -b -o- -e dummy -B true > /dev/null 2>&1 || exit 2 However when the branch recording is actually done, a different event is used, as seen in the line: perf record -o $TMPDIR/... --branch-filter any,save_type,u -- ... The event is omitted and for "perf record" the default event is cycles, which is not supported by s390 and this fails when executed on s390: # perf record --branch-filter any,save_type,u -- /tmp/__perf_test.program.iDSmQ/a.out Error: cycles: PMU Hardware or event type doesn't support branch stack sampling. # Therefore fix this and use the same event cycles for testing support and actually running the test. Output before: # ./perf test -Fv 95 95: Check branch stack sampling : --- start --- Testing user branch stack sampling ---- end ---- Check branch stack sampling: FAILED! # Output after: # ./perf test -Fv 95 95: Check branch stack sampling : --- start --- ---- end ---- Check branch stack sampling: Skip # Fixes: b55878c90ab92a24 ("perf test: Add test for branch stack sampling") Reviewed-by: James Clark Signed-off-by: Thomas Richter Acked-by: German Gomez Cc: German Gomez Cc: Heiko Carstens Cc: Sumanth Korikkar Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20220727141439.712582-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/test_brstack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5cc8cc4406edee1bc22991c23d38efbbb797aa6d Author: Bryan O'Donoghue Date: Wed Jul 27 17:16:55 2022 +0100 wifi: wcn36xx: Add debugfs entry to read firmware feature strings Add in the ability to easily find the firmware feature bits reported in the get feature exchange without having to compile-in debug prints. root@linaro-alip:~# cat /sys/kernel/debug/ieee80211/phy0/wcn36xx/firmware_feat_caps MCC P2P DOT11AC SLM_SESSIONIZATION DOT11AC_OPMODE SAP32STA TDLS P2P_GO_NOA_DECOUPLE_INIT_SCAN WLANACTIVE_OFFLOAD BEACON_OFFLOAD SCAN_OFFLOAD BCN_MISS_OFFLOAD STA_POWERSAVE STA_ADVANCED_PWRSAVE BCN_FILTER RTT RATECTRL WOW WLAN_ROAM_SCAN_OFFLOAD SPECULATIVE_PS_POLL IBSS_HEARTBEAT_OFFLOAD WLAN_SCAN_OFFLOAD WLAN_PERIODIC_TX_PTRN ADVANCE_TDLS BATCH_SCAN FW_IN_TX_PATH EXTENDED_NSOFFLOAD_SLOT CH_SWITCH_V1 HT40_OBSS_SCAN UPDATE_CHANNEL_LIST WLAN_MCADDR_FLT WLAN_CH144 TDLS_SCAN_COEXISTENCE LINK_LAYER_STATS_MEAS MU_MIMO EXTENDED_SCAN DYNAMIC_WMM_PS MAC_SPOOFED_SCAN FW_STATS WPS_PRBRSP_TMPL BCN_IE_FLT_DELTA Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220727161655.2286867-5-bryan.odonoghue@linaro.org drivers/net/wireless/ath/wcn36xx/debug.c | 39 ++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/wcn36xx/debug.h | 1 + 2 files changed, 40 insertions(+) commit 75072b2970a8f806595017a57ad7daf4b67533f1 Author: Bryan O'Donoghue Date: Wed Jul 27 17:16:54 2022 +0100 wifi: wcn36xx: Move capability bitmap to string translation function to firmware.c Move wcn36xx_get_cap_name() function in main.c into firmware.c as wcn36xx_firmware_get_cap_name(). Reviewed-by: Loic Poulain Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220727161655.2286867-4-bryan.odonoghue@linaro.org drivers/net/wireless/ath/wcn36xx/firmware.c | 75 ++++++++++++++++++++++++++ drivers/net/wireless/ath/wcn36xx/firmware.h | 2 + drivers/net/wireless/ath/wcn36xx/main.c | 81 ++--------------------------- 3 files changed, 81 insertions(+), 77 deletions(-) commit 37de943d01539a0b36ab52cf73c1dfad140f697a Author: Bryan O'Donoghue Date: Wed Jul 27 17:16:53 2022 +0100 wifi: wcn36xx: Move firmware feature bit storage to dedicated firmware.c file The naming of the get/set/clear firmware feature capability bits doesn't really follow the established namespace pattern of wcn36xx_logicalblock_do_something(); The feature bits are accessed by smd.c and main.c. It would be nice to display the found feature bits in debugfs. To do so though we should tidy up the namespace a bit. Move the firmware feature exchange API to its own file - firmware.c giving us the opportunity to functionally decompose other firmware related accessors as appropriate in future. Reviewed-by: Loic Poulain Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220727161655.2286867-3-bryan.odonoghue@linaro.org drivers/net/wireless/ath/wcn36xx/Makefile | 3 +- drivers/net/wireless/ath/wcn36xx/firmware.c | 50 ++++++++++++++++++ drivers/net/wireless/ath/wcn36xx/firmware.h | 82 +++++++++++++++++++++++++++++ drivers/net/wireless/ath/wcn36xx/hal.h | 68 ------------------------ drivers/net/wireless/ath/wcn36xx/main.c | 7 +-- drivers/net/wireless/ath/wcn36xx/smd.c | 57 +++----------------- drivers/net/wireless/ath/wcn36xx/smd.h | 3 -- 7 files changed, 146 insertions(+), 124 deletions(-) commit 5b7fc772e657824455507fc97f6b92287075a237 Author: Bryan O'Donoghue Date: Wed Jul 27 17:16:52 2022 +0100 wifi: wcn36xx: Rename clunky firmware feature bit enum The enum name "place_holder_in_cap_bitmap" is self descriptively asking to be changed to something else. Rename place_holder_in_cap_bitmap to wcn36xx_firmware_feat_caps so that the contents and intent of the enum is obvious. Reviewed-by: Loic Poulain Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220727161655.2286867-2-bryan.odonoghue@linaro.org drivers/net/wireless/ath/wcn36xx/hal.h | 2 +- drivers/net/wireless/ath/wcn36xx/main.c | 2 +- drivers/net/wireless/ath/wcn36xx/smd.c | 6 +++--- drivers/net/wireless/ath/wcn36xx/smd.h | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) commit 6bb2e00ea304ffc0446f345c46fe22713ce43cbf Author: Anup Patel Date: Fri Jul 29 17:15:18 2022 +0530 RISC-V: KVM: Add support for Svpbmt inside Guest/VM The Guest/VM can use Svpbmt in VS-stage page tables when allowed by the Hypervisor using the henvcfg.PBMTE bit. We add Svpbmt support for the KVM Guest/VM which can be enabled/disabled by the KVM user-space (QEMU/KVMTOOL) using the ISA extension ONE_REG interface. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Anup Patel arch/riscv/include/asm/csr.h | 16 ++++++++++++++++ arch/riscv/include/uapi/asm/kvm.h | 1 + arch/riscv/kvm/vcpu.c | 16 ++++++++++++++++ 3 files changed, 33 insertions(+) commit 659ad6d82c3121088daeaa38ba94d182b55bbb22 Author: Anup Patel Date: Fri Jul 29 17:15:12 2022 +0530 RISC-V: KVM: Use PAGE_KERNEL_IO in kvm_riscv_gstage_ioremap() When the host has Svpbmt extension, we should use page based memory type 2 (i.e. IO) for IO mappings in the G-stage page table. To achieve this, we replace use of PAGE_KERNEL with PAGE_KERNEL_IO in the kvm_riscv_gstage_ioremap(). Signed-off-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Anup Patel arch/riscv/kvm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9d57373fc87a3ad00d12cffd0bb4c8108c73ff9 Author: Anup Patel Date: Fri Jul 29 17:15:06 2022 +0530 RISC-V: KVM: Add G-stage ioremap() and iounmap() functions The in-kernel AIA IMSIC support requires on-demand mapping / unmapping of Guest IMSIC address to Host IMSIC guest files. To help achieve this, we add kvm_riscv_stage2_ioremap() and kvm_riscv_stage2_iounmap() functions. These new functions for updating G-stage page table mappings will be called in atomic context so we have special "in_atomic" parameter for this purpose. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Anup Patel arch/riscv/include/asm/kvm_host.h | 5 +++++ arch/riscv/kvm/mmu.c | 18 ++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) commit 4ab0e470c06dc741f6583578da44961669331b78 Author: Anup Patel Date: Fri Jul 29 17:15:00 2022 +0530 KVM: Add gfp_custom flag in struct kvm_mmu_memory_cache The kvm_mmu_topup_memory_cache() always uses GFP_KERNEL_ACCOUNT for memory allocation which prevents it's use in atomic context. To address this limitation of kvm_mmu_topup_memory_cache(), we add gfp_custom flag in struct kvm_mmu_memory_cache. When the gfp_custom flag is set to some GFP_xyz flags, the kvm_mmu_topup_memory_cache() will use that instead of GFP_KERNEL_ACCOUNT. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Anup Patel include/linux/kvm_types.h | 1 + virt/kvm/kvm_main.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 8a061562e2f2b32bfb5bff5bf3afc64e37d95a27 Author: Anup Patel Date: Fri Jul 29 17:14:53 2022 +0530 RISC-V: KVM: Add extensible CSR emulation framework We add an extensible CSR emulation framework which is based upon the existing system instruction emulation. This will be useful to upcoming AIA, PMU, Nested and other virtualization features. The CSR emulation framework also has provision to emulate CSR in user space but this will be used only in very specific cases such as AIA IMSIC CSR emulation in user space or vendor specific CSR emulation in user space. By default, all CSRs not handled by KVM RISC-V will be redirected back to Guest VCPU as illegal instruction trap. Signed-off-by: Anup Patel Signed-off-by: Anup Patel arch/riscv/include/asm/kvm_host.h | 5 + arch/riscv/include/asm/kvm_vcpu_insn.h | 6 ++ arch/riscv/kvm/vcpu.c | 34 ++++--- arch/riscv/kvm/vcpu_insn.c | 172 ++++++++++++++++++++++++++++++++- include/uapi/linux/kvm.h | 8 ++ 5 files changed, 209 insertions(+), 16 deletions(-) commit 1222b55cee2396a1a286e924d9f6abb6d7a04f55 Author: Anup Patel Date: Fri Jul 29 17:14:46 2022 +0530 RISC-V: KVM: Add extensible system instruction emulation framework We will be emulating more system instructions in near future with upcoming AIA, PMU, Nested and other virtualization features. To accommodate above, we add an extensible system instruction emulation framework in vcpu_insn.c. Signed-off-by: Anup Patel Signed-off-by: Anup Patel arch/riscv/include/asm/kvm_vcpu_insn.h | 9 ++++ arch/riscv/kvm/vcpu_insn.c | 82 ++++++++++++++++++++++++++++++---- 2 files changed, 82 insertions(+), 9 deletions(-) commit b91f0e4cb8a3ce4f2716a13739ade0f7bea8eadb Author: Anup Patel Date: Fri Jul 29 17:14:40 2022 +0530 RISC-V: KVM: Factor-out instruction emulation into separate sources The instruction and CSR emulation for VCPU is going to grow over time due to upcoming AIA, PMU, Nested and other virtualization features. Let us factor-out VCPU instruction emulation from vcpu_exit.c to a separate source dedicated for this purpose. Signed-off-by: Anup Patel Signed-off-by: Anup Patel arch/riscv/include/asm/kvm_host.h | 11 +- arch/riscv/include/asm/kvm_vcpu_insn.h | 33 +++ arch/riscv/kvm/Makefile | 1 + arch/riscv/kvm/vcpu_exit.c | 490 +------------------------------ arch/riscv/kvm/vcpu_insn.c | 520 +++++++++++++++++++++++++++++++++ 5 files changed, 562 insertions(+), 493 deletions(-) commit fe283e5fa1edc59f37265c91dc79bf119a5ccc79 Author: Nikolay Borisov Date: Fri Jul 29 17:14:34 2022 +0530 RISC-V: KVM: move preempt_disable() call in kvm_arch_vcpu_ioctl_run local_irq_disable provides stronger guarantees than preempt_disable so calling the latter is redundant when interrupts are disabled. Instead, explicitly disable preemption right before interrupts are enabled/disabled to ensure that the time accounted in guest_timing_exit_irqoff includes time taken by the guest or interrupts. Signed-off-by: Nikolay Borisov Signed-off-by: Anup Patel arch/riscv/kvm/vcpu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cca986fab9e819319353bece789cb9d2890c1115 Author: Nikolay Borisov Date: Fri Jul 29 17:14:26 2022 +0530 RISC-V: KVM: Make kvm_riscv_guest_timer_init a void function It can never fail so convey that fact explicitly by making the function void. Also in kvm_arch_init_vm it makes it clear that there no need to do any cleanup after kvm_riscv_gstage_vmid_init has been called. Signed-off-by: Nikolay Borisov Signed-off-by: Anup Patel arch/riscv/include/asm/kvm_vcpu_timer.h | 2 +- arch/riscv/kvm/vcpu_timer.c | 4 +--- arch/riscv/kvm/vm.c | 4 +++- 3 files changed, 5 insertions(+), 5 deletions(-) commit 6259d2f834f2834e32254e0c02a4c4996d34495a Author: Zhang Jiaming Date: Fri Jul 29 17:14:17 2022 +0530 RISC-V: KVM: Fix variable spelling mistake There is a spelling mistake in mmu.c and vcpu_exit.c. Fix it. Signed-off-by: Zhang Jiaming Signed-off-by: Anup Patel arch/riscv/kvm/mmu.c | 8 ++++---- arch/riscv/kvm/vcpu_exit.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) commit 9bfd900beeecaba009ccde8cf13716d3cac4d2e1 Author: Atish Patra Date: Fri Jul 29 17:14:11 2022 +0530 RISC-V: KVM: Improve ISA extension by using a bitmap Currently, the every vcpu only stores the ISA extensions in a unsigned long which is not scalable as number of extensions will continue to grow. Using a bitmap allows the ISA extension to support any number of extensions. The CONFIG one reg interface implementation is modified to support the bitmap as well. But it is meant only for base extensions. Thus, the first element of the bitmap array is sufficient for that interface. In the future, all the new multi-letter extensions must use the ISA_EXT one reg interface that allows enabling/disabling any extension now. Signed-off-by: Atish Patra Signed-off-by: Anup Patel arch/riscv/include/asm/kvm_host.h | 3 +- arch/riscv/include/asm/kvm_vcpu_fp.h | 8 +- arch/riscv/kvm/vcpu.c | 148 +++++++++++++++++++++++------------ arch/riscv/kvm/vcpu_fp.c | 27 +++---- 4 files changed, 115 insertions(+), 71 deletions(-) commit 8933d30c5f468d6cc1e4bf9bb535149da35f202e Author: Uwe Kleine-König Date: Tue Jul 12 18:15:19 2022 +0200 pwm: lpc18xx: Fix period handling The calculation: val = (u64)NSEC_PER_SEC * LPC18XX_PWM_TIMER_MAX; do_div(val, lpc18xx_pwm->clk_rate); lpc18xx_pwm->max_period_ns = val; is bogus because with NSEC_PER_SEC = 1000000000, LPC18XX_PWM_TIMER_MAX = 0xffffffff and clk_rate < NSEC_PER_SEC this overflows the (on lpc18xx (i.e. ARM32) 32 bit wide) unsigned int .max_period_ns. This results (dependant of the actual clk rate) in an arbitrary limitation of the maximal period. E.g. for clkrate = 333333333 (Hz) we get max_period_ns = 9 instead of 12884901897. So make .max_period_ns an u64 and pass period and duty as u64 to not discard relevant digits. And also make use of mul_u64_u64_div_u64() which prevents all overflows assuming clk_rate < NSEC_PER_SEC. Fixes: 841e6f90bb78 ("pwm: NXP LPC18xx PWM/SCT driver") Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-lpc18xx-sct.c | 47 ++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 16 deletions(-) commit 2ba1aede6d4184a6fd95bef3eda9acb1f40e2221 Author: Uwe Kleine-König Date: Tue Jul 12 18:15:18 2022 +0200 pwm: lpc18xx: Convert to use dev_err_probe() This has various upsides: - It emits the symbolic name of the error code - It is silent in the EPROBE_DEFER case and properly sets the defer reason - It reduces the number of code lines slightly Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-lpc18xx-sct.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit ea95b29983b999eac4522d50da78e6ba70c3d065 Author: Uwe Kleine-König Date: Tue Jul 12 10:46:56 2022 +0200 pwm: twl-led: Document some limitations and link to the reference manual I found these just from reading the reference manual and the driver source. It's unclear to me if there are glitches when updating the ON and OFF registers. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-twl-led.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 3391780b74b94f39d6619c5c3570468f7170643d Author: Lee Jones Date: Thu Jul 14 12:25:28 2022 +0100 MAINTAINERS: Remove myself as PWM maintainer Thierry and Uwe are doing a fine job, leaving me surplus to requirement. Happy to pop back on-board if anything changes in the future. Cc: Thierry Reding Cc: Uwe Kleine-König Cc: linux-pwm@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Lee Jones Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 0afe57ca3a776ced18d88d1236163ad02a4d0f6b Author: Lukas Bulwahn Date: Mon Jun 13 14:33:19 2022 +0200 MAINTAINERS: Add include/dt-bindings/pwm to PWM SUBSYSTEM Maintainers of the directory Documentation/devicetree/bindings/pwm are also the maintainers of the corresponding directory include/dt-bindings/pwm. Add the file entry for include/dt-bindings/pwm to the appropriate section in MAINTAINERS. Signed-off-by: Lukas Bulwahn Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 3bf5f2f0c02ef7f8047a26ca599035d4a5eab34a Author: Fabien Parent Date: Tue May 31 13:45:43 2022 +0200 dt-bindings: pwm: mediatek: Add compatible string for MT8195 MT8195's PWM IP is compatible with the MT8183 PWM IP. Signed-off-by: Fabien Parent Acked-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 1 + 1 file changed, 1 insertion(+) commit 901f8f5404f14fe0cf62bc3cd52ccff32738b404 Author: Nikita Travkin Date: Tue Jul 12 01:33:40 2022 +0500 pwm: Add clock based PWM output driver Some systems have clocks exposed to external devices. If the clock controller supports duty-cycle configuration, such clocks can be used as pwm outputs. In fact PWM and CLK subsystems are interfaced with in a similar way and an "opposite" driver already exists (clk-pwm). Add a driver that would enable pwm devices to be used via clk subsystem. Acked-by: Uwe Kleine-König Signed-off-by: Nikita Travkin Signed-off-by: Thierry Reding drivers/pwm/Kconfig | 10 ++++ drivers/pwm/Makefile | 1 + drivers/pwm/pwm-clk.c | 148 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 159 insertions(+) commit c2252c181ab5d6d764e505143a55775187670543 Author: Nikita Travkin Date: Tue Jul 12 01:33:39 2022 +0500 dt-bindings: pwm: Document clk based PWM controller Add YAML devicetree binding for clk based PWM controller Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Nikita Travkin Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/clk-pwm.yaml | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 2375e964d541bb09158cd2dff67b5d74e8de61cd Author: Uwe Kleine-König Date: Thu Jul 21 12:31:29 2022 +0200 pwm: sifive: Shut down hardware only after pwmchip_remove() completed The PWMs are expected to be functional until pwmchip_remove() is called. So disable the clks only afterwards. Fixes: 9e37a53eb051 ("pwm: sifive: Add a driver for SiFive SoC PWM") Signed-off-by: Uwe Kleine-König Tested-by: Emil Renner Berthing Signed-off-by: Thierry Reding drivers/pwm/pwm-sifive.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ace41d7564e655c39f709a78c035188a460c7cbd Author: Uwe Kleine-König Date: Thu Jul 21 12:31:28 2022 +0200 pwm: sifive: Ensure the clk is enabled exactly once per running PWM .apply() assumes the clk to be for a given PWM iff the PWM is enabled. So make sure this is the case when .probe() completes. And in .remove() disable the according number of times. This fixes a clk enable/disable imbalance, if some PWMs are already running at probe time. Fixes: 9e37a53eb051 (pwm: sifive: Add a driver for SiFive SoC PWM) Signed-off-by: Uwe Kleine-König Tested-by: Emil Renner Berthing Signed-off-by: Thierry Reding drivers/pwm/pwm-sifive.c | 46 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 9 deletions(-) commit 1695b421e1b587caf7931eae927a9c5fb34a75f1 Author: Uwe Kleine-König Date: Thu Jul 21 12:31:27 2022 +0200 pwm: sifive: Simplify clk handling The clk is necessary for both register access and (enabled) operation of the PWM. Instead of clk_enable() update_hw() if pwm_got_enabled(): clk_enable() elif pwm_got_disabled(): clk_disable() clk_disable() which is some cases only calls clk_enable() to immediately afterwards call clk_disable again, do: if (!prev_state.enabled) clk_enable() # clk enabled exactly once update_hw() if (!next_state.enabled) clk_disable() which is much easier. Signed-off-by: Uwe Kleine-König Tested-by: Emil Renner Berthing Signed-off-by: Thierry Reding drivers/pwm/pwm-sifive.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 3586b02663f098a9b0a3df13bcb3ea2d67635562 Author: Uwe Kleine-König Date: Thu Jul 21 12:31:26 2022 +0200 pwm: sifive: Enable clk only after period check in .apply() For the period check and the initial calculations of register values there is no hardware access needed. So delay enabling the clk a bit to simplify the code flow a bit. Signed-off-by: Uwe Kleine-König Tested-by: Emil Renner Berthing Signed-off-by: Thierry Reding drivers/pwm/pwm-sifive.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 0f02f491b786143f08eb19840f1cf4f12aec6dee Author: Uwe Kleine-König Date: Thu Jul 21 12:31:25 2022 +0200 pwm: sifive: Reduce time the controller lock is held The lock is only to serialize access and update to user_count and approx_period between different PWMs served by the same pwm_chip. So the lock needs only to be taken during the check if the (chip global) period can and/or needs to be changed. Signed-off-by: Uwe Kleine-König Tested-by: Emil Renner Berthing Signed-off-by: Thierry Reding drivers/pwm/pwm-sifive.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 61180f68ad5b9058008e227d5f289934a963af1f Author: Uwe Kleine-König Date: Thu Jul 21 12:31:24 2022 +0200 pwm: sifive: Fold pwm_sifive_enable() into its only caller There is only a single caller of pwm_sifive_enable() which only enables or disables the clk. Put this implementation directly into pwm_sifive_apply() which allows further simplification in the next change. There is no change in behaviour. Signed-off-by: Uwe Kleine-König Tested-by: Emil Renner Berthing Signed-off-by: Thierry Reding drivers/pwm/pwm-sifive.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) commit 20550a61880fc55e68a0d290ad195b74729c0e7b Author: Uwe Kleine-König Date: Thu Jul 21 12:31:23 2022 +0200 pwm: sifive: Simplify offset calculation for PWMCMP registers Instead of explicitly using PWM_SIFIVE_PWMCMP0 + pwm->hwpwm * PWM_SIFIVE_SIZE_PWMCMP for each access to one of the PWMCMP registers, introduce a macro that takes the hwpwm id as parameter. For the register definition using a plain 4 instead of the cpp constant PWM_SIFIVE_SIZE_PWMCMP is easier to read, so define the offset macro without the constant. The latter can then be dropped as there are no users left. Signed-off-by: Uwe Kleine-König Tested-by: Emil Renner Berthing Signed-off-by: Thierry Reding drivers/pwm/pwm-sifive.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit b65a1534cfd60929b671aecf8a20a3c8daf4c804 Merge: 944fd1aeacb6 40823f3ee05f Author: David S. Miller Date: Fri Jul 29 12:21:02 2022 +0100 Merge branch 'netdevsim-fib-route-delete-leak' Ido Schimmel says: ==================== netdevsim: fib: Fix reference count leak on route deletion failure Fix a recently reported netdevsim bug found using syzkaller. Patch #1 fixes the bug. Patch #2 adds a debugfs knob to allow us to test the fix. Patch #3 adds test cases. ==================== Signed-off-by: David S. Miller commit 40823f3ee05f7f55cbd4419062a1a388249e88da Author: Ido Schimmel Date: Thu Jul 28 14:45:35 2022 +0300 selftests: netdevsim: Add test cases for route deletion failure Add IPv4 and IPv6 test cases that ensure that we are not leaking a reference on the nexthop device when we are unable to delete its associated route. Without the fix in a previous patch ("netdevsim: fib: Fix reference count leak on route deletion failure") both test cases get stuck, waiting for the reference to be released from the dummy device [1][2]. [1] unregister_netdevice: waiting for dummy1 to become free. Usage count = 5 leaked reference. fib_check_nh+0x275/0x620 fib_create_info+0x237c/0x4d30 fib_table_insert+0x1dd/0x1d20 inet_rtm_newroute+0x11b/0x200 rtnetlink_rcv_msg+0x43b/0xd20 netlink_rcv_skb+0x15e/0x430 netlink_unicast+0x53b/0x800 netlink_sendmsg+0x945/0xe40 ____sys_sendmsg+0x747/0x960 ___sys_sendmsg+0x11d/0x190 __sys_sendmsg+0x118/0x1e0 do_syscall_64+0x34/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd [2] unregister_netdevice: waiting for dummy1 to become free. Usage count = 5 leaked reference. fib6_nh_init+0xc46/0x1ca0 ip6_route_info_create+0x1167/0x19a0 ip6_route_add+0x27/0x150 inet6_rtm_newroute+0x161/0x170 rtnetlink_rcv_msg+0x43b/0xd20 netlink_rcv_skb+0x15e/0x430 netlink_unicast+0x53b/0x800 netlink_sendmsg+0x945/0xe40 ____sys_sendmsg+0x747/0x960 ___sys_sendmsg+0x11d/0x190 __sys_sendmsg+0x118/0x1e0 do_syscall_64+0x34/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Reviewed-by: David Ahern Signed-off-by: David S. Miller .../testing/selftests/drivers/net/netdevsim/fib.sh | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 974be75f250378a6913c7bb268adbfd9a76a6df9 Author: Ido Schimmel Date: Thu Jul 28 14:45:34 2022 +0300 netdevsim: fib: Add debugfs knob to simulate route deletion failure The previous patch ("netdevsim: fib: Fix reference count leak on route deletion failure") fixed a reference count leak that happens on route deletion failure. Such failures can only be simulated by injecting slab allocation failures, which cannot be surgically injected. In order to be able to specifically test this scenario, add a debugfs knob that allows user space to fail route deletion requests when enabled. Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Reviewed-by: David Ahern Signed-off-by: David S. Miller drivers/net/netdevsim/fib.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 180a6a3ee60a7cb69ed1232388460644f6a21f00 Author: Ido Schimmel Date: Thu Jul 28 14:45:33 2022 +0300 netdevsim: fib: Fix reference count leak on route deletion failure As part of FIB offload simulation, netdevsim stores IPv4 and IPv6 routes and holds a reference on FIB info structures that in turn hold a reference on the associated nexthop device(s). In the unlikely case where we are unable to allocate memory to process a route deletion request, netdevsim will not release the reference from the associated FIB info structure, thereby preventing the associated nexthop device(s) from ever being removed [1]. Fix this by scheduling a work item that will flush netdevsim's FIB table upon route deletion failure. This will cause netdevsim to release its reference from all the FIB info structures in its table. Reported by Lucas Leong of Trend Micro Zero Day Initiative. Fixes: 0ae3eb7b4611 ("netdevsim: fib: Perform the route programming in a non-atomic context") Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Reviewed-by: David Ahern Signed-off-by: David S. Miller drivers/net/netdevsim/fib.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 6957730e20389a63eb333afb6fcf38b45f549ea8 Merge: ed6dc4b871c0 853246dbf5e8 Author: David S. Miller Date: Fri Jul 29 12:18:10 2022 +0100 Merge branch 'mtk_eth_soc-xdp-multi-frame' Lorenzo Bianconi says: ==================== mtk_eth_soc: introduce xdp multi-frag support Convert mtk_eth_soc driver to xdp_return_frame_bulk APIs. =================== Signed-off-by: David S. Miller commit 853246dbf5e806e2775b584a0726be281ab7b0a0 Author: Lorenzo Bianconi Date: Wed Jul 27 23:20:52 2022 +0200 net: ethernet: mtk_eth_soc: add xdp tx return bulking support Convert mtk_eth_soc driver to xdp_return_frame_bulk APIs. Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 155738a4f319538a09f734ce1f5a2eac3ada1de2 Author: Lorenzo Bianconi Date: Wed Jul 27 23:20:51 2022 +0200 net: ethernet: mtk_eth_soc: introduce xdp multi-frag support Add the capability to map non-linear xdp frames in XDP_TX and ndo_xdp_xmit callback. Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 125 ++++++++++++++++++---------- 1 file changed, 82 insertions(+), 43 deletions(-) commit b16fe6d82b71fa0dd5c957bc22d66a694976d6eb Author: Lorenzo Bianconi Date: Wed Jul 27 23:20:50 2022 +0200 net: ethernet: mtk_eth_soc: introduce mtk_xdp_frame_map utility routine This is a preliminary patch to add xdp multi-frag support to mtk_eth_soc driver Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 68 ++++++++++++++++++----------- 1 file changed, 42 insertions(+), 26 deletions(-) commit ed6dc4b871c0a1cf298298bbe96f51104abfb55c Merge: 5b91884bf50b 95baa4e8fe69 Author: David S. Miller Date: Fri Jul 29 12:14:03 2022 +0100 Merge branch 'seg6-headend-reduced' Andrea Mayer says: ==================== seg6: add support for SRv6 Headend Reduced This patchset adds support for SRv6 Headend behavior with Reduced Encapsulation. It introduces the H.Encaps.Red and H.L2Encaps.Red versions of the SRv6 H.Encaps and H.L2Encaps behaviors, according to RFC 8986 [1]. In details, the patchset is made of: - patch 1/4: add support for SRv6 H.Encaps.Red behavior; - Patch 2/4: add support for SRv6 H.L2Encaps.Red behavior; - patch 2/4: add selftest for SRv6 H.Encaps.Red behavior; - patch 3/4: add selftest for SRv6 H.L2Encaps.Red behavior. The corresponding iproute2 patch for supporting SRv6 H.Encaps.Red and H.L2Encaps.Red behaviors is provided in a separated patchset. [1] - https://datatracker.ietf.org/doc/html/rfc8986 V4 -> v5: - Fix skb checksum for SRH Reduced encapsulation/insertion; - Improve selftests by: i) adding a random suffix to network namespaces; ii) creating net devices directly into network namespaces; iii) using trap EXIT command to properly clean up selftest networks. Thanks to Paolo Abeni. v3 -> v4: - Add selftests to the Makefile, thanks to Jakub Kicinski. v2 -> v3: - Keep SRH when HMAC TLV is present; - Split the support for H.Encaps.Red and H.L2Encaps.Red behaviors in two patches (respectively, patch 1/4 and patch 2/4); - Add selftests for SRv6 H.Encaps.Red and H.L2Encaps.Red. v1 -> v2: - Fixed sparse warnings; - memset now uses sizeof() instead of hardcoded value; - Removed EXPORT_SYMBOL_GPL. ==================== Signed-off-by: David S. Miller commit 95baa4e8fe69ae511cbbcfd0ffef010108e2ca43 Author: Andrea Mayer Date: Wed Jul 27 20:54:08 2022 +0200 selftests: seg6: add selftest for SRv6 H.L2Encaps.Red behavior This selftest is designed for testing the H.L2Encaps.Red behavior. It instantiates a virtual network composed of several nodes: hosts and SRv6 routers. Each node is realized using a network namespace that is properly interconnected to others through veth pairs. The test considers SRv6 routers implementing a L2 VPN leveraged by hosts for communicating with each other. Such routers make use of the SRv6 H.L2Encaps.Red behavior for applying SRv6 policies to L2 traffic coming from hosts. The correct execution of the behavior is verified through reachability tests carried out between hosts belonging to the same VPN. Signed-off-by: Andrea Mayer Signed-off-by: David S. Miller tools/testing/selftests/net/Makefile | 1 + .../selftests/net/srv6_hl2encap_red_l2vpn_test.sh | 821 +++++++++++++++++++++ 2 files changed, 822 insertions(+) commit 6ab4eb5a52a734dc60e0366c66e06446a0032903 Author: Andrea Mayer Date: Wed Jul 27 20:54:07 2022 +0200 selftests: seg6: add selftest for SRv6 H.Encaps.Red behavior This selftest is designed for testing the H.Encaps.Red behavior. It instantiates a virtual network composed of several nodes: hosts and SRv6 routers. Each node is realized using a network namespace that is properly interconnected to others through veth pairs. The test considers SRv6 routers implementing L3 VPNs leveraged by hosts for communicating with each other. Such routers make use of the SRv6 H.Encaps.Red behavior for applying SRv6 policies to L3 traffic coming from hosts. The correct execution of the behavior is verified through reachability tests carried out between hosts belonging to the same VPN. Signed-off-by: Andrea Mayer Signed-off-by: David S. Miller tools/testing/selftests/net/Makefile | 1 + .../selftests/net/srv6_hencap_red_l3vpn_test.sh | 879 +++++++++++++++++++++ 2 files changed, 880 insertions(+) commit 13f0296be8ece1189cbc4383a45ba97cafaecc09 Author: Andrea Mayer Date: Wed Jul 27 20:54:06 2022 +0200 seg6: add support for SRv6 H.L2Encaps.Red behavior The SRv6 H.L2Encaps.Red behavior described in [1] is an optimization of the SRv6 H.L2Encaps behavior [2]. H.L2Encaps.Red reduces the length of the SRH by excluding the first segment (SID) in the SRH of the pushed IPv6 header. The first SID is only placed in the IPv6 Destination Address field of the pushed IPv6 header. When the SRv6 Policy only contains one SID the SRH is omitted, unless there is an HMAC TLV to be carried. [1] - https://datatracker.ietf.org/doc/html/rfc8986#section-5.4 [2] - https://datatracker.ietf.org/doc/html/rfc8986#section-5.3 Signed-off-by: Andrea Mayer Signed-off-by: Anton Makarov Signed-off-by: David S. Miller include/uapi/linux/seg6_iptunnel.h | 1 + net/ipv6/seg6_iptunnel.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) commit b07c8cdbe918aa17da864da9a89b22afaed0393e Author: Andrea Mayer Date: Wed Jul 27 20:54:05 2022 +0200 seg6: add support for SRv6 H.Encaps.Red behavior The SRv6 H.Encaps.Red behavior described in [1] is an optimization of the SRv6 H.Encaps behavior [2]. H.Encaps.Red reduces the length of the SRH by excluding the first segment (SID) in the SRH of the pushed IPv6 header. The first SID is only placed in the IPv6 Destination Address field of the pushed IPv6 header. When the SRv6 Policy only contains one SID the SRH is omitted, unless there is an HMAC TLV to be carried. [1] - https://datatracker.ietf.org/doc/html/rfc8986#section-5.2 [2] - https://datatracker.ietf.org/doc/html/rfc8986#section-5.1 Signed-off-by: Andrea Mayer Signed-off-by: Anton Makarov Signed-off-by: David S. Miller include/uapi/linux/seg6_iptunnel.h | 1 + net/ipv6/seg6_iptunnel.c | 128 ++++++++++++++++++++++++++++++++++++- 2 files changed, 128 insertions(+), 1 deletion(-) commit 5b91884bf50b21d34bd3daa5c8f8b7e92e0a2c46 Author: Ronak Doshi Date: Wed Jul 27 10:30:37 2022 -0700 vmxnet3: do not reschedule napi for rx processing Commit '2c5a5748105a ("vmxnet3: add support for out of order rx completion")' added support for out of order rx completion. Within that patch, an enhancement was done to reschedule napi for processing rx completions. However, it can lead to missing an interrupt. So, this patch reverts that part of the code. Fixes: 2c5a5748105a ("vmxnet3: add support for out of order rx completion") Signed-off-by: Ronak Doshi Acked-by: Guolin Yang Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_drv.c | 9 --------- 1 file changed, 9 deletions(-) commit 1c7249e4af8e1aea1c47739ec9dc63cc828b5d08 Author: Guillaume Nault Date: Wed Jul 27 13:18:21 2022 +0200 Documentation: Describe net.ipv4.tcp_reflect_tos. The tcp_reflect_tos option was introduced in Linux 5.10 but was still undocumented. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) commit dc633700f00f726e027846a318c5ffeb8deaaeda Author: Zhengchao Shao Date: Wed Jul 27 17:33:12 2022 +0800 net/af_packet: check len when min_header_len equals to 0 User can use AF_PACKET socket to send packets with the length of 0. When min_header_len equals to 0, packet_snd will call __dev_queue_xmit to send packets, and sock->type can be any type. Reported-by: syzbot+5ea725c25d06fb9114c4@syzkaller.appspotmail.com Fixes: fd1894224407 ("bpf: Don't redirect packets with invalid pkt_len") Signed-off-by: Zhengchao Shao Signed-off-by: David S. Miller net/packet/af_packet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 944fd1aeacb627fa617f85f8e5a34f7ae8ea4d8e Author: Mike Manning Date: Mon Jul 25 19:14:42 2022 +0100 net: allow unbound socket for packets in VRF when tcp_l3mdev_accept set The commit 3c82a21f4320 ("net: allow binding socket in a VRF when there's an unbound socket") changed the inet socket lookup to avoid packets in a VRF from matching an unbound socket. This is to ensure the necessary isolation between the default and other VRFs for routing and forwarding. VRF-unaware processes running in the default VRF cannot access another VRF and have to be run with 'ip vrf exec '. This is to be expected with tcp_l3mdev_accept disabled, but could be reallowed when this sysctl option is enabled. So instead of directly checking dif and sdif in inet[6]_match, here call inet_sk_bound_dev_eq(). This allows a match on unbound socket for non-zero sdif i.e. for packets in a VRF, if tcp_l3mdev_accept is enabled. Fixes: 3c82a21f4320 ("net: allow binding socket in a VRF when there's an unbound socket") Signed-off-by: Mike Manning Link: https://lore.kernel.org/netdev/a54c149aed38fded2d3b5fdb1a6c89e36a083b74.camel@lasnet.de/ Reviewed-by: David Ahern Signed-off-by: David S. Miller include/net/inet6_hashtables.h | 7 +++---- include/net/inet_hashtables.h | 19 +++---------------- include/net/inet_sock.h | 11 +++++++++++ 3 files changed, 17 insertions(+), 20 deletions(-) commit 4a971e84a7ae10a38d875cd2d4e487c8d1682ca3 Author: Takashi Iwai Date: Thu Jul 28 14:59:45 2022 +0200 ALSA: control: Use deferred fasync helper For avoiding the potential deadlock via kill_fasync() call, use the new fasync helpers to defer the invocation from the control API. Note that it's merely a workaround. Another note: although we haven't received reports about the deadlock with the control API, the deadlock is still potentially possible, and it's better to align the behavior with other core APIs (PCM and timer); so let's move altogether. Link: https://lore.kernel.org/r/20220728125945.29533-5-tiwai@suse.de Signed-off-by: Takashi Iwai include/sound/control.h | 2 +- sound/core/control.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 96b097091c66df4f6fbf5cbff21df6cc02a2f055 Author: Takashi Iwai Date: Thu Jul 28 14:59:44 2022 +0200 ALSA: pcm: Use deferred fasync helper For avoiding the potential deadlock via kill_fasync() call, use the new fasync helpers to defer the invocation from timer API. Note that it's merely a workaround. Reported-by: syzbot+8285e973a41b5aa68902@syzkaller.appspotmail.com Reported-by: syzbot+669c9abf11a6a011dd09@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20220728125945.29533-4-tiwai@suse.de Signed-off-by: Takashi Iwai include/sound/pcm.h | 2 +- sound/core/pcm.c | 1 + sound/core/pcm_lib.c | 2 +- sound/core/pcm_native.c | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) commit 95cc637c1afd83fb7dd3d7c8a53710488f4caf9c Author: Takashi Iwai Date: Thu Jul 28 14:59:43 2022 +0200 ALSA: timer: Use deferred fasync helper For avoiding the potential deadlock via kill_fasync() call, use the new fasync helpers to defer the invocation from PCI API. Note that it's merely a workaround. Reported-by: syzbot+1ee0910eca9c94f71f25@syzkaller.appspotmail.com Reported-by: syzbot+49b10793b867871ee26f@syzkaller.appspotmail.com Reported-by: syzbot+8285e973a41b5aa68902@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20220728125945.29533-3-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/timer.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit ef34a0ae7a2654bc9e58675e36898217fb2799d8 Author: Takashi Iwai Date: Thu Jul 28 14:59:42 2022 +0200 ALSA: core: Add async signal helpers Currently the call of kill_fasync() from an interrupt handler might lead to potential spin deadlocks, as spotted by syzkaller. Unfortunately, it's not so trivial to fix this lock chain as it's involved with the tasklist_lock that is touched in allover places. As a temporary workaround, this patch provides the way to defer the async signal notification in a work. The new helper functions, snd_fasync_helper() and snd_kill_faync() are replacements for fasync_helper() and kill_fasync(), respectively. In addition, snd_fasync_free() needs to be called at the destructor of the relevant file object. Link: https://lore.kernel.org/r/20220728125945.29533-2-tiwai@suse.de Signed-off-by: Takashi Iwai include/sound/core.h | 8 +++++ sound/core/misc.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) commit 5b7d1d575e3f1917cd493761781314be7bc73ef4 Author: Slark Xiao Date: Thu Jul 21 15:15:20 2022 +0800 microblaze: Fix some typos in comment Replace 'the the' with 'like the' in the comment. Replace 'an' with 'a'. Signed-off-by: Slark Xiao Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/20220721071520.48384-1-slark_xiao@163.com arch/microblaze/kernel/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af5d35b83f642399c719ea9a8599a13b8a0c4167 Author: Jason Wang Date: Sat Jul 23 17:26:40 2022 +0800 crypto: tcrypt - Remove the static variable initialisations to NULL Initialise global and static variable to NULL is always unnecessary. Remove the unnecessary initialisations. Signed-off-by: Jason Wang Signed-off-by: Herbert Xu crypto/tcrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ae19d422c7da84b5f13bc08b98bd737a08d3a53 Author: GUO Zihua Date: Fri Jul 22 14:31:57 2022 +0800 crypto: arm64/poly1305 - fix a read out-of-bound A kasan error was reported during fuzzing: BUG: KASAN: slab-out-of-bounds in neon_poly1305_blocks.constprop.0+0x1b4/0x250 [poly1305_neon] Read of size 4 at addr ffff0010e293f010 by task syz-executor.5/1646715 CPU: 4 PID: 1646715 Comm: syz-executor.5 Kdump: loaded Not tainted 5.10.0.aarch64 #1 Hardware name: Huawei TaiShan 2280 /BC11SPCD, BIOS 1.59 01/31/2019 Call trace: dump_backtrace+0x0/0x394 show_stack+0x34/0x4c arch/arm64/kernel/stacktrace.c:196 __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x158/0x1e4 lib/dump_stack.c:118 print_address_description.constprop.0+0x68/0x204 mm/kasan/report.c:387 __kasan_report+0xe0/0x140 mm/kasan/report.c:547 kasan_report+0x44/0xe0 mm/kasan/report.c:564 check_memory_region_inline mm/kasan/generic.c:187 [inline] __asan_load4+0x94/0xd0 mm/kasan/generic.c:252 neon_poly1305_blocks.constprop.0+0x1b4/0x250 [poly1305_neon] neon_poly1305_do_update+0x6c/0x15c [poly1305_neon] neon_poly1305_update+0x9c/0x1c4 [poly1305_neon] crypto_shash_update crypto/shash.c:131 [inline] shash_finup_unaligned+0x84/0x15c crypto/shash.c:179 crypto_shash_finup+0x8c/0x140 crypto/shash.c:193 shash_digest_unaligned+0xb8/0xe4 crypto/shash.c:201 crypto_shash_digest+0xa4/0xfc crypto/shash.c:217 crypto_shash_tfm_digest+0xb4/0x150 crypto/shash.c:229 essiv_skcipher_setkey+0x164/0x200 [essiv] crypto_skcipher_setkey+0xb0/0x160 crypto/skcipher.c:612 skcipher_setkey+0x3c/0x50 crypto/algif_skcipher.c:305 alg_setkey+0x114/0x2a0 crypto/af_alg.c:220 alg_setsockopt+0x19c/0x210 crypto/af_alg.c:253 __sys_setsockopt+0x190/0x2e0 net/socket.c:2123 __do_sys_setsockopt net/socket.c:2134 [inline] __se_sys_setsockopt net/socket.c:2131 [inline] __arm64_sys_setsockopt+0x78/0x94 net/socket.c:2131 __invoke_syscall arch/arm64/kernel/syscall.c:36 [inline] invoke_syscall+0x64/0x100 arch/arm64/kernel/syscall.c:48 el0_svc_common.constprop.0+0x220/0x230 arch/arm64/kernel/syscall.c:155 do_el0_svc+0xb4/0xd4 arch/arm64/kernel/syscall.c:217 el0_svc+0x24/0x3c arch/arm64/kernel/entry-common.c:353 el0_sync_handler+0x160/0x164 arch/arm64/kernel/entry-common.c:369 el0_sync+0x160/0x180 arch/arm64/kernel/entry.S:683 This error can be reproduced by the following code compiled as ko on a system with kasan enabled: #include #include #include #include char test_data[] = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" "\x10\x11\x12\x13\x14\x15\x16\x17" "\x18\x19\x1a\x1b\x1c\x1d\x1e"; int init(void) { struct crypto_shash *tfm = NULL; char *data = NULL, *out = NULL; tfm = crypto_alloc_shash("poly1305", 0, 0); data = kmalloc(POLY1305_KEY_SIZE - 1, GFP_KERNEL); out = kmalloc(POLY1305_DIGEST_SIZE, GFP_KERNEL); memcpy(data, test_data, POLY1305_KEY_SIZE - 1); crypto_shash_tfm_digest(tfm, data, POLY1305_KEY_SIZE - 1, out); kfree(data); kfree(out); return 0; } void deinit(void) { } module_init(init) module_exit(deinit) MODULE_LICENSE("GPL"); The root cause of the bug sits in neon_poly1305_blocks. The logic neon_poly1305_blocks() performed is that if it was called with both s[] and r[] uninitialized, it will first try to initialize them with the data from the first "block" that it believed to be 32 bytes in length. First 16 bytes are used as the key and the next 16 bytes for s[]. This would lead to the aforementioned read out-of-bound. However, after calling poly1305_init_arch(), only 16 bytes were deducted from the input and s[] is initialized yet again with the following 16 bytes. The second initialization of s[] is certainly redundent which indicates that the first initialization should be for r[] only. This patch fixes the issue by calling poly1305_init_arm64() instead of poly1305_init_arch(). This is also the implementation for the same algorithm on arm platform. Fixes: f569ca164751 ("crypto: arm64/poly1305 - incorporate OpenSSL/CRYPTOGAMS NEON implementation") Cc: stable@vger.kernel.org Signed-off-by: GUO Zihua Reviewed-by: Eric Biggers Acked-by: Will Deacon Signed-off-by: Herbert Xu arch/arm64/crypto/poly1305-glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11364d61314eb97b12d6b6facb1ededada52fcc1 Author: Christophe JAILLET Date: Thu Jul 21 22:58:53 2022 +0200 crypto: hisilicon/zip - Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. While at it, add an explicit include . Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu drivers/crypto/hisilicon/zip/zip_crypto.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 45f5d0176d8426cc1ab0bab84fbd8ef5c57526c6 Author: Kai Ye Date: Thu Jul 21 10:18:31 2022 +0800 crypto: hisilicon/sec - fix auth key size error The authentication algorithm supports a maximum of 128-byte keys. The allocated key memory is insufficient. Fixes: 2f072d75d1ab ("crypto: hisilicon - Add aead support on SEC2") Signed-off-by: Kai Ye Signed-off-by: Herbert Xu drivers/crypto/hisilicon/sec2/sec_crypto.c | 6 +++--- drivers/crypto/hisilicon/sec2/sec_crypto.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) commit 383ce25dd2b117da0c092dc0b45e7ad0e9ffcbb2 Author: Christophe JAILLET Date: Wed Jul 20 15:28:44 2022 +0200 crypto: ccree - Remove a useless dma_supported() call There is no point in calling dma_supported() before calling dma_set_coherent_mask(). This function already calls dma_supported() and returns an error (-EIO) if it fails. So remove the superfluous dma_supported() call. Moreover, setting a larger DMA mask will never fail when setting a smaller one will succeed, so the whole "while" loop can be removed as well. (see [1]) While at it, fix the name of the function reported in a dev_err(). [1]: https://lore.kernel.org/all/YteQ6Vx2C03UtCkG@infradead.org/ Suggested-by: Christoph Hellwig Signed-off-by: Christophe JAILLET Acked-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu drivers/crypto/ccree/cc_driver.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 96ec8dfdd094b7b2b015e092d581835a732949ff Author: Mario Limonciello Date: Tue Jul 19 11:13:28 2022 -0500 crypto: ccp - Add support for new CCP/PSP device ID Add a new CCP/PSP PCI device ID. This uses same register offsets as the previously supported structure. Signed-off-by: Mario Limonciello Acked-by: Tom Lendacky Acked-by: Rijo Thomas Signed-off-by: Herbert Xu drivers/crypto/ccp/sp-pci.c | 7 +++++++ 1 file changed, 7 insertions(+) commit fa4d57b85786ec0e16565c75a51c208834b0c24d Author: Pali Rohár Date: Tue Jul 19 09:54:03 2022 +0200 crypto: inside-secure - Add missing MODULE_DEVICE_TABLE for of Without MODULE_DEVICE_TABLE, crypto_safexcel.ko module is not automatically loaded on platforms where inside-secure crypto HW is specified in device tree (e.g. Armada 3720). So add missing MODULE_DEVICE_TABLE for of. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") Signed-off-by: Pali Rohár Acked-by: Marek Behún Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 2 ++ 1 file changed, 2 insertions(+) commit 98dfa9343f37bdd4112966292751e3a93aaf2e56 Author: Zhengchao Shao Date: Tue Jul 19 12:23:23 2022 +0800 crypto: hisilicon/hpre - don't use GFP_KERNEL to alloc mem during softirq The hpre encryption driver may be used to encrypt and decrypt packets during the rx softirq, it is not allowed to use GFP_KERNEL. Fixes: c8b4b477079d ("crypto: hisilicon - add HiSilicon HPRE accelerator") Signed-off-by: Zhengchao Shao Signed-off-by: Herbert Xu drivers/crypto/hisilicon/hpre/hpre_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c10100a416c16b598bf5155e759307b34dac0d7d Merge: e0dccc3b76fb 7fee5d6f41b4 3168010d2ab4 f066b8f7d961 d4ebd11f32a1 7e62edd7a33a 25357900f4e6 be280ea763f7 de0269765b26 Author: Joerg Roedel Date: Fri Jul 29 12:06:56 2022 +0200 Merge branches 'arm/exynos', 'arm/mediatek', 'arm/msm', 'arm/smmu', 'virtio', 'x86/vt-d', 'x86/amd' and 'core' into next commit be280ea763f7db492e0e30ba22873433aea0f468 Author: Joerg Roedel Date: Fri Jul 29 12:04:32 2022 +0200 iommu/amd: Fix compile warning in init code A recent commit introduced these compile warnings: CC drivers/iommu/amd/init.o drivers/iommu/amd/init.c:938:12: error: ‘iommu_init_ga_log’ defined but not used [-Werror=unused-function] 938 | static int iommu_init_ga_log(struct amd_iommu *iommu) | ^~~~~~~~~~~~~~~~~ drivers/iommu/amd/init.c:902:12: error: ‘iommu_ga_log_enable’ defined but not used [-Werror=unused-function] 902 | static int iommu_ga_log_enable(struct amd_iommu *iommu) | ^~~~~~~~~~~~~~~~~~~ The warnings appear because both functions are defined when IRQ remapping is not enabled, but only used when IRQ remapping is enabled. Fix it by only defining the functions when IRQ remapping is enabled. Fixes: c5e1a1eb9279 ("iommu/amd: Simplify and Consolidate Virtual APIC (AVIC) Enablement") Signed-off-by: Joerg Roedel Link: https://lore.kernel.org/r/20220729100432.22474-1-joro@8bytes.org drivers/iommu/amd/init.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 3b1c31474cb934be352a8d75389bfe04773799c6 Merge: ba323f6bee1d eba28aaf2f53 Author: David S. Miller Date: Fri Jul 29 11:02:24 2022 +0100 Merge branch 'mlxsw-ptp-spectrum-2' Ido Schimmel says: ==================== mlxsw: Add PTP support for Spectrum-2 and newer ASICs This patchset adds PTP support for Spectrum-{2,3,4} switch ASICs. They all act largely the same with respect to PTP except for a workaround implemented for Spectrum-{2,3} in patch #6. Spectrum-2 and newer ASICs essentially implement a transparent clock between all the switch ports, including the CPU port. The hardware will generate the UTC time stamp for transmitted / received packets at the CPU port, but will compensate for forwarding delays in the ASIC by adjusting the correction field in the PTP header (for PTP events) at the ingress and egress ports. Specifically, the hardware will subtract the current time stamp from the correction field at the ingress port and will add the current time stamp to the correction field at the egress port. For the purpose of an ordinary or boundary clock (this patchset), the correction field will always be adjusted between the CPU port and one of the front panel ports, but never between two front panel ports. Patchset overview: Patch #1 extracts a helper to configure traps for PTP packets (event and general messages). The helper is shared between all Spectrum generations. Patch #2 transitions Spectrum-2 and newer ASICs to use a different format of Tx completions that includes the UTC time stamp of transmitted packets. Patch #3 adds basic initialization required for Spectrum-2 PTP support. It mainly invokes the helper from patch #1. Patch #4 adds helpers to read the UTC time (seconds and nanoseconds) from the device over memory-mapped I/O instead of going through firmware which is slower and therefore inaccurate. The helpers will be used to implement various PHC operations (e.g., gettimex64) and to construct the full UTC time stamp from the truncated one reported over Tx / Rx completions. Patch #5 implements the various PHC operations. Patch #6 implements the previously described workaround for Spectrum-{2,3}. Patch #7 adds the ability to report a hardware time stamp for a received / transmitted packet based off the associated Rx / Tx completion that includes a truncated UTC time stamp. Patches #8 and #9 implement support for the SIOCGHWTSTAMP / SIOCSHWTSTAMP ioctls and the get_ts_info ethtool callback, respectively. ==================== Signed-off-by: David S. Miller commit eba28aaf2f539c3a8844878d64ad4a43d60d4e48 Author: Danielle Ratson Date: Wed Jul 27 09:23:28 2022 +0300 mlxsw: spectrum: Support ethtool 'get_ts_info' callback in Spectrum-2 The 'get_ts_info' callback is used for obtaining information about time stamping and PTP hardware clock capabilities of a network device. The existing function of Spectrum-1 is used to advertise the PHC capabilities and the supported RX and TX filters. Implement a similar function for Spectrum-2, expose that the supported 'rx_filters' are all PTP event packets, as for these packets the driver fills the time stamp from the CQE in the SKB. In the future, mlxsw driver will be extended to support one-step PTP in Spectrum-2 and newer ASICs. Then additional 'tx_types' will be supported. Signed-off-by: Danielle Ratson Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 19 +++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 15 +++++++++------ 2 files changed, 28 insertions(+), 6 deletions(-) commit 08ef8bc825d961d6adde6fc2665f293e43ab3777 Author: Danielle Ratson Date: Wed Jul 27 09:23:27 2022 +0300 mlxsw: spectrum_ptp: Support SIOCGHWTSTAMP, SIOCSHWTSTAMP ioctls The SIOCSHWTSTAMP ioctl configures HW timestamping on a given port. In Spectrum-2 and above, each packet gets time stamp by default, but in order to provide an accurate time stamp, software should configure to update the correction field. In addition, the PTP traps are not enabled by default, software should enable it per port or for all ports. The switch behaves like a transparent clock between CPU port and each front panel port. If ingress correction is set on a port for a given packet type, then when such a packet is received via the port, the current time stamp is subtracted from the correction field. If egress correction is set on a port for a given packet type, then when such a packet is transmitted via the port, the current time stamp is added to the correction field. The result is that as the packet ingresses through a port with ingress correction enabled, and egresses through a port with egress correction enabled, the PTP correction field is updated to reflect the time that the packet spent in the ASIC. This can be used to update the correction field of trapped packets by enabling ingress correction on a port where time stamping was enabled, and egress correction on the CPU port. Similarly, for packets transmitted from the host, ingress correction should be enabled on the CPU port, and egress correction on a front-panel port. However, since the correction fields will be updated for all PTP packets crossing the CPU port, in order not to mangle the correction field, the front panel port involved in the packet transfer must have the corresponding correction enabled as well. Therefore, when HW timestamping is enabled on at least one port, we have to configure hardware to update the correction field and trap PTP event packets on all ports. Add reference count as part of 'struct mlxsw_sp_ptp_state', to maintain how many ports use HW timestamping. Handle the correction field configuration only when the first port enables time stamping and when the last port disables time stamping. Store the configuration as part of 'struct mlxsw_sp_ptp_state', as it is global for all ports. The SIOCGHWTSTAMP ioctl is a getter for the current configuration, implement it and use the global configuration. Signed-off-by: Danielle Ratson Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 208 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 24 ++- 2 files changed, 223 insertions(+), 9 deletions(-) commit 382ad0d957932dded55984c1da3a98e8c3544d93 Author: Danielle Ratson Date: Wed Jul 27 09:23:26 2022 +0300 mlxsw: spectrum: Support time stamping on Spectrum-2 As opposed to Spectrum-1, in which time stamps arrive through a pair of dedicated events into a queue and later are being matched to the corresponding packets, in Spectrum-2 we are reading the time stamps directly from the CQE. Software can get the time stamp in UTC format using CQEv2. Add a time stamp field to 'struct mlxsw_skb_cb'. In mlxsw_pci_cqe_{rdq,sdq}_handle() extract the time stamp from the CQE into the new time stamp field. Note that the time stamp in the CQE is represented by 38 bits, which is a short representation of UTC time. Software should create the full time stamp using the global UTC clock. Read UTC clock from hardware only for PTP packets which were trapped to CPU with PTP0 trap ID (event packets). Use the time stamp from the SKB when packet is received or transmitted. Signed-off-by: Danielle Ratson Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.h | 6 +++ drivers/net/ethernet/mellanox/mlxsw/pci.c | 22 +++++++- drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 62 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 24 +++++---- 4 files changed, 104 insertions(+), 10 deletions(-) commit 24157bc69f45e8340af5ed72422afe8a248e0153 Author: Danielle Ratson Date: Wed Jul 27 09:23:25 2022 +0300 mlxsw: Send PTP packets as data packets to overcome a limitation In Spectrum-2 and Spectrum-3, the correction field of PTP packets which are sent as control packets is not updated at egress port. To overcome this limitation, PTP packets which require time stamp, should be sent as data packets with the following details: 1. FID valid = 1 2. FID value above the maximum FID 3. rx_router_port = 1 >From Spectrum-4 and on, this limitation will be solved. Extend the function which handles TX header, in case that the packet is a PTP packet, add TX header with type=data and all the above mentioned requirements. Add operation as part of 'struct mlxsw_sp_ptp_ops', to be able to separate the handling of PTP packets between different ASICs. Use the data packet solution only for Spectrum-2 and Spectrum-3. Therefore, add a dedicated operation structure for Spectrum-4, as it will be same to Spectrum-2 in PTP implementation, just will not have the limitation of control packets. Signed-off-by: Danielle Ratson Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 114 +++++++++++++++++++-- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 10 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 34 ++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 27 +++++ 4 files changed, 175 insertions(+), 10 deletions(-) commit a5bf8e5e8b8d36c4bfa7e41f18c40afa03a18161 Author: Danielle Ratson Date: Wed Jul 27 09:23:24 2022 +0300 mlxsw: spectrum_ptp: Add implementation for physical hardware clock operations Implement physical hardware clock operations. The main difference between the existing operations of Spectrum-1 and the new operations of Spectrum-2 is the usage of UTC hardware clock instead of FRC. Add support for init() and fini() functions for PTP clock in Spectrum-2. Signed-off-by: Danielle Ratson Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 147 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 19 ++- 2 files changed, 159 insertions(+), 7 deletions(-) commit bbd300570a9e8628a6e2b644f1dbda1ae7e0effe Author: Danielle Ratson Date: Wed Jul 27 09:23:23 2022 +0300 mlxsw: Query UTC sec and nsec PCI offsets and values Query UTC sec and nsec PCI offsets during the pci_init(), to be able to read UTC time later. Implement functions to read UTC seconds and nanoseconds from the offset which was read as part of initialization. Signed-off-by: Danielle Ratson Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.c | 12 ++++++++++ drivers/net/ethernet/mellanox/mlxsw/core.h | 5 ++++ drivers/net/ethernet/mellanox/mlxsw/pci.c | 38 ++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) commit d25ff63a181b6943d94797c350de332cffadfab2 Author: Danielle Ratson Date: Wed Jul 27 09:23:22 2022 +0300 mlxsw: spectrum_ptp: Add PTP initialization / finalization for Spectrum-2 Lay the groundwork for Spectrum-2 support. On Spectrum-2, the packets get the time stamps from the CQE, which means that the time stamp is attached to its packet. Configure MTPTPT to set which message types should arrive under which PTP trap. PTP0 will be used for event message types, which means that the packets require time stamp. PTP1 will be used for other packets. Note that in Spectrum-2, all packets contain time stamp by default. The two types of traps (PTP0, PTP1) will be used to separate between PTP_EVENT traps and PTP_GENERAL traps, so then the driver will fill the time stamp as part of the SKB only for event message types. Later the driver will enable the traps using 'MTPCPC.ptp_trap_en' bit. Then, PTP packets start arriving through the PTP traps. Currently, the structure 'mlxsw_sp2_ptp_state' contains only the common structure, the next patches will extend it. Signed-off-by: Danielle Ratson Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 44 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 17 +++++---- 2 files changed, 54 insertions(+), 7 deletions(-) commit 42823208b946d85d20a7065a1b2ef6e35a7be3a9 Author: Danielle Ratson Date: Wed Jul 27 09:23:21 2022 +0300 mlxsw: Support CQEv2 for SDQ in Spectrum-2 and newer ASICs Currently, Tx completions are reported using Completion Queue Element version 1 (CQEv1). These elements do not contain the Tx time stamp, which is fine as Spectrum-1 reads Tx time stamps via a dedicated FIFO and Spectrum-2 does not currently support PTP. In preparation for Spectrum-2 PTP support, use CQEv2 for Spectrum-2 and newer ASICs, as this CQE format encodes the Tx time stamp. Signed-off-by: Danielle Ratson Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.c | 6 ++++++ drivers/net/ethernet/mellanox/mlxsw/core.h | 3 +++ drivers/net/ethernet/mellanox/mlxsw/pci.c | 4 ++-- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++++ 4 files changed, 15 insertions(+), 2 deletions(-) commit 37b62b282b182acd2113f97c1b9fd651d4211027 Author: Amit Cohen Date: Wed Jul 27 09:23:20 2022 +0300 mlxsw: spectrum_ptp: Add helper functions to configure PTP traps MTPTPT register is used to set which message types should arrive under which PTP trap. Currently, PTP0 is used for event message types, which means that the packets require time stamp. PTP1 is used for other packets. This configuration will be same for Spectrum-2 and newer ASICs. In preparation for Spectrum-2 PTP support, add helper functions to configure PTP traps and use them for Spectrum-1. These functions will be used later also for Spectrum-2. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 62 ++++++++++++++-------- 1 file changed, 40 insertions(+), 22 deletions(-) commit 432e5dfc7eb75681b412c2b0cafb8604475e0aba Author: Suravee Suthikulpanit Date: Tue Jul 26 08:43:48 2022 -0500 iommu/amd: Add support for AVIC when SNP is enabled In order to support AVIC on SNP-enabled system, The IOMMU driver needs to check EFR2[SNPAVICSup] and enables the support by setting SNPAVICEn bit in the IOMMU control register (MMIO offset 18h). For detail, please see section "SEV-SNP Guest Virtual APIC Support" of the AMD I/O Virtualization Technology (IOMMU) Specification. (https://www.amd.com/system/files/TechDocs/48882_IOMMU.pdf) Signed-off-by: Suravee Suthikulpanit Reviewed-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20220726134348.6438-3-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 7 +++++++ drivers/iommu/amd/init.c | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) commit c5e1a1eb9279fdb28d47ca2a4493a4c53b7d6a0b Author: Suravee Suthikulpanit Date: Tue Jul 26 08:43:47 2022 -0500 iommu/amd: Simplify and Consolidate Virtual APIC (AVIC) Enablement Currently, enabling AVIC requires individually detect and enable GAM and GALOG features on each IOMMU, which is difficult to keep track on multi-IOMMU system, where the features needs to be enabled system-wide. In addition, these features do not need to be enabled in early stage. It can be delayed until after amd_iommu_init_pci(). Therefore, consolidate logic for detecting and enabling IOMMU GAM and GALOG features into a helper function, enable_iommus_vapic(), which uses the check_feature_on_all_iommus() helper function to ensure system-wide support of the features before enabling them, and postpone until after amd_iommu_init_pci(). The new function also check and clean up feature enablement residue from previous boot (e.g. in case of booting into kdump kernel), which triggers a WARN_ON (shown below) introduced by the commit a8d4a37d1bb9 ("iommu/amd: Restore GA log/tail pointer on host resume") in iommu_ga_log_enable(). [ 7.731955] ------------[ cut here ]------------ [ 7.736575] WARNING: CPU: 0 PID: 1 at drivers/iommu/amd/init.c:829 iommu_ga_log_enable.isra.0+0x16f/0x190 [ 7.746135] Modules linked in: [ 7.749193] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W -------- --- 5.19.0-0.rc7.53.eln120.x86_64 #1 [ 7.759706] Hardware name: Dell Inc. PowerEdge R7525/04D5GJ, BIOS 2.1.6 03/09/2021 [ 7.767274] RIP: 0010:iommu_ga_log_enable.isra.0+0x16f/0x190 [ 7.772931] Code: 20 20 00 00 8b 00 f6 c4 01 74 da 48 8b 44 24 08 65 48 2b 04 25 28 00 00 00 75 13 48 83 c4 10 5b 5d e9 f5 00 72 00 0f 0b eb e1 <0f> 0b eb dd e8 f8 66 42 00 48 8b 15 f1 85 53 01 e9 29 ff ff ff 48 [ 7.791679] RSP: 0018:ffffc90000107d20 EFLAGS: 00010206 [ 7.796905] RAX: ffffc90000780000 RBX: 0000000000000100 RCX: ffffc90000780000 [ 7.804038] RDX: 0000000000000001 RSI: ffffc90000780000 RDI: ffff8880451f9800 [ 7.811170] RBP: ffff8880451f9800 R08: ffffffffffffffff R09: 0000000000000000 [ 7.818303] R10: 0000000000000000 R11: 0000000000000000 R12: 0008000000000000 [ 7.825435] R13: ffff8880462ea900 R14: 0000000000000021 R15: 0000000000000000 [ 7.832572] FS: 0000000000000000(0000) GS:ffff888054a00000(0000) knlGS:0000000000000000 [ 7.840657] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 7.846400] CR2: ffff888054dff000 CR3: 0000000053210000 CR4: 0000000000350eb0 [ 7.853533] Call Trace: [ 7.855979] [ 7.858085] amd_iommu_enable_interrupts+0x180/0x270 [ 7.863051] ? iommu_setup+0x271/0x271 [ 7.866803] state_next+0x197/0x2c0 [ 7.870295] ? iommu_setup+0x271/0x271 [ 7.874049] iommu_go_to_state+0x24/0x2c [ 7.877976] amd_iommu_init+0xf/0x29 [ 7.881554] pci_iommu_init+0xe/0x36 [ 7.885133] do_one_initcall+0x44/0x200 [ 7.888975] do_initcalls+0xc8/0xe1 [ 7.892466] kernel_init_freeable+0x14c/0x199 [ 7.896826] ? rest_init+0xd0/0xd0 [ 7.900231] kernel_init+0x16/0x130 [ 7.903723] ret_from_fork+0x22/0x30 [ 7.907306] [ 7.909497] ---[ end trace 0000000000000000 ]--- Fixes: commit a8d4a37d1bb9 ("iommu/amd: Restore GA log/tail pointer on host resume") Reported-by: Jerry Snitselaar Cc: Joerg Roedel Cc: Maxim Levitsky Cc: Will Deacon (maintainer:IOMMU DRIVERS) Signed-off-by: Suravee Suthikulpanit Reviewed-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20220726134348.6438-2-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/init.c | 85 +++++++++++++++++++++++++++++++----------------- 1 file changed, 55 insertions(+), 30 deletions(-) commit de0269765b268717b70f16f809560e83d5a8d0e7 Author: Ren Zhijie Date: Tue Jul 26 11:35:20 2022 +0800 ACPI/IORT: Fix build error implicit-function-declaration If CONFIG_ACPI_IORT=y and CONFIG_IOMMU_API is not set, make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-, will be failed, like this: drivers/acpi/arm64/iort.c: In function ‘iort_get_rmr_sids’: drivers/acpi/arm64/iort.c:1406:2: error: implicit declaration of function ‘iort_iommu_rmr_get_resv_regions’; did you mean ‘iort_iommu_get_resv_regions’? [-Werror=implicit-function-declaration] iort_iommu_rmr_get_resv_regions(iommu_fwnode, NULL, head); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ iort_iommu_get_resv_regions cc1: some warnings being treated as errors make[3]: *** [drivers/acpi/arm64/iort.o] Error 1 The function iort_iommu_rmr_get_resv_regions() is declared under CONFIG_IOMMU_API, and the callers of iort_get_rmr_sids() and iort_put_rmr_sids() would select IOMMU_API. To fix this error, move the definitions to #ifdef CONFIG_IOMMU_API. Fixes: e302eea8f497 ("ACPI/IORT: Add a helper to retrieve RMR info directly") Signed-off-by: Ren Zhijie Acked-by: Hanjun Guo Link: https://lore.kernel.org/r/20220726033520.47865-1-renzhijie2@huawei.com Signed-off-by: Joerg Roedel drivers/acpi/arm64/iort.c | 56 +++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 28 deletions(-) commit e0f3907b3901df814c12ca54d65ef37000ce1515 Author: Vincent Mailhol Date: Fri Jul 29 17:09:02 2022 +0900 can: etas_es58x: remove useless calls to usb_fill_bulk_urb() Aside of urb->transfer_buffer_length and urb->context which might change in the TX path, all the other URB parameters remains constant during runtime. So, there is no reasons to call usb_fill_bulk_urb() each time before submitting an URB. Make sure to initialize all the fields of the URB at allocation time. For the TX branch, replace the call usb_fill_bulk_urb() by an assignment of urb->context. urb->urb->transfer_buffer_length is already set by the caller functions, no need to set it again. For the RX branch, because all parameters are unchanged, simply remove the call to usb_fill_bulk_urb(). Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220729080902.25839-1-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/etas_es58x/es58x_core.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit f3a76018dd55d8ddcd28cb47049f46ae5c0ce557 Author: Phillip Potter Date: Fri Jul 29 00:11:49 2022 +0100 staging: r8188eu: remove initializer from ret in rtw_pwr_wakeup Remove the success initializer from the ret variable in rtw_pwr_wakeup, as we set it later anyway in the success path, and also set on failure. This makes the function appear cleaner and more consistent. Suggested-by: Dan Carpenter Tested-by: Philipp Hortmann Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20220728231150.972-2-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_pwrctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a7e91528202bec8e8dc5787c7568e6c60ce7f43 Author: Liu Xinpeng Date: Wed Jul 27 18:07:33 2022 +0800 memblock tests: fix compilation errors Do 'make -C tools/testing/memblock', get the following errors: memblock.o: In function `memblock_find_in_range.constprop.9': memblock.c:(.text+0x4651): undefined reference to `pr_warn_ratelimited' memblock.o: In function `memblock_mark_mirror': memblock.c:(.text+0x7171): undefined reference to `mirrored_kernelcore' Fixes: 902c2d91582c ("memblock: Disable mirror feature if kernelcore is not specified") Fixes: 14d9a675fd0d ("mm: Ratelimited mirrored memory related warning messages") Signed-off-by: Liu Xinpeng Tested-by: Ma Wupeng Signed-off-by: Mike Rapoport Link: https://lore.kernel.org/r/1658916453-26312-1-git-send-email-liuxp11@chinatelecom.cn tools/testing/memblock/internal.h | 4 ++++ 1 file changed, 4 insertions(+) commit ba323f6bee1d1e70aed280f8c89ac06959559855 Author: Krzysztof Kozlowski Date: Wed Jul 27 18:41:29 2022 +0200 dt-bindings: nfc: use spi-peripheral-props.yaml Instead of listing directly properties typical for SPI peripherals, reference the spi-peripheral-props.yaml schema. This allows using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. Remove the spi-* properties which now come via spi-peripheral-props.yaml schema, except for the cases when device schema adds some constraints like maximum frequency. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220727164130.385411-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/nfc/marvell,nci.yaml | 4 ++-- Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml | 5 ++--- Documentation/devicetree/bindings/net/nfc/st,st95hf.yaml | 7 ++++--- Documentation/devicetree/bindings/net/nfc/ti,trf7970a.yaml | 7 ++++--- 4 files changed, 12 insertions(+), 11 deletions(-) commit 92b54e09c002c8d48e5c3b7d8d8feee5281340bf Merge: 29192a170e15 9d1bcb1f293f Author: Jakub Kicinski Date: Thu Jul 28 22:24:41 2022 -0700 Merge branch 'net-dsa-qca8k-code-split-for-qca8k' Christian Marangi says: ==================== net: dsa: qca8k: code split for qca8k This is needed ad ipq4019 SoC have an internal switch that is based on qca8k with very minor changes. The general function is equal. Because of this we split the driver to common and specific code. As the common function needs to be moved to a different file to be reused, we had to convert every remaining user of qca8k_read/write/rmw to regmap variant. We had also to generilized the special handling for the ethtool_stats function that makes use of the autocast mib. (ipq4019 will have a different tagger and use mmio so it could be quicker to use mmio instead of automib feature) And we had to convert the regmap read/write to bulk implementation to drop the special function that makes use of it. This will be compatible with ipq4019 and at the same time permits normal switch to use the eth mgmt way to send the entire ATU table read/write in one go. ==================== Link: https://lore.kernel.org/r/20220727113523.19742-1-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit 9d1bcb1f293f1391302a109c9819c3705c804700 Author: Christian Marangi Date: Wed Jul 27 13:35:23 2022 +0200 net: dsa: qca8k: move read_switch_id function to common code The same function to read the switch id is used by drivers based on qca8k family switch. Move them to common code to make them accessible also by other drivers. Signed-off-by: Christian Marangi Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/qca/qca8k-8xxx.c | 29 ----------------------------- drivers/net/dsa/qca/qca8k-common.c | 29 +++++++++++++++++++++++++++++ drivers/net/dsa/qca/qca8k.h | 1 + 3 files changed, 30 insertions(+), 29 deletions(-) commit e9bbf019af44b204b71ef8edf224002550aab641 Author: Christian Marangi Date: Wed Jul 27 13:35:22 2022 +0200 net: dsa: qca8k: move port LAG functions to common code The same port LAG functions are used by drivers based on qca8k family switch. Move them to common code to make them accessible also by other drivers. Signed-off-by: Christian Marangi Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/qca/qca8k-8xxx.c | 168 ------------------------------------- drivers/net/dsa/qca/qca8k-common.c | 165 ++++++++++++++++++++++++++++++++++++ drivers/net/dsa/qca/qca8k.h | 6 ++ 3 files changed, 171 insertions(+), 168 deletions(-) commit c5290f636624b98e76a82bd63ffec0a8a9daa620 Author: Christian Marangi Date: Wed Jul 27 13:35:21 2022 +0200 net: dsa: qca8k: move port VLAN functions to common code The same port VLAN functions are used by drivers based on qca8k family switch. Move them to common code to make them accessible also by other drivers. Also drop exposing busy_wait and make it static. Signed-off-by: Christian Marangi Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/qca/qca8k-8xxx.c | 182 ------------------------------------- drivers/net/dsa/qca/qca8k-common.c | 179 +++++++++++++++++++++++++++++++++++- drivers/net/dsa/qca/qca8k.h | 10 +- 3 files changed, 187 insertions(+), 184 deletions(-) commit 742d37a84d3f7bb60d9b2d9ada9ad4e599f65ebf Author: Christian Marangi Date: Wed Jul 27 13:35:20 2022 +0200 net: dsa: qca8k: move port mirror functions to common code The same port mirror functions are used by drivers based on qca8k family switch. Move them to common code to make them accessible also by other drivers. Signed-off-by: Christian Marangi Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/qca/qca8k-8xxx.c | 93 -------------------------------------- drivers/net/dsa/qca/qca8k-common.c | 91 +++++++++++++++++++++++++++++++++++++ drivers/net/dsa/qca/qca8k.h | 7 +++ 3 files changed, 98 insertions(+), 93 deletions(-) commit 2e5bd96eea86a246b4de3bf756f7a11b43e6187d Author: Christian Marangi Date: Wed Jul 27 13:35:19 2022 +0200 net: dsa: qca8k: move port FDB/MDB function to common code The same port FDB/MDB function are used by drivers based on qca8k family switch. Move them to common code to make them accessible also by other drivers. Also drop bulk read/write functions and make them static Signed-off-by: Christian Marangi Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/qca/qca8k-8xxx.c | 306 ------------------------------------- drivers/net/dsa/qca/qca8k-common.c | 297 ++++++++++++++++++++++++++++++++++- drivers/net/dsa/qca/qca8k.h | 25 ++- 3 files changed, 317 insertions(+), 311 deletions(-) commit b3a302b171f73425b41de8d3357fae3fa7057322 Author: Christian Marangi Date: Wed Jul 27 13:35:18 2022 +0200 net: dsa: qca8k: move set age/MTU/port enable/disable functions to common code The same set age, MTU and port enable/disable function are used by driver based on qca8k family switch. Move them to common code to make them accessible also by other drivers. While at it also drop unnecessary qca8k_priv cast for void pointers. Signed-off-by: Christian Marangi Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/qca/qca8k-8xxx.c | 88 -------------------------------------- drivers/net/dsa/qca/qca8k-common.c | 85 ++++++++++++++++++++++++++++++++++++ drivers/net/dsa/qca/qca8k.h | 12 ++++++ 3 files changed, 97 insertions(+), 88 deletions(-) commit fd3cae2f3ac190d06e48f43739237e02f9dc51ff Author: Christian Marangi Date: Wed Jul 27 13:35:17 2022 +0200 net: dsa: qca8k: move bridge functions to common code The same bridge functions are used by drivers based on qca8k family switch. Move them to common code to make them accessible also by other drivers. While at it also drop unnecessary qca8k_priv cast for void pointers. Signed-off-by: Christian Marangi Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/qca/qca8k-8xxx.c | 93 -------------------------------------- drivers/net/dsa/qca/qca8k-common.c | 93 ++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/qca/qca8k.h | 9 ++++ 3 files changed, 102 insertions(+), 93 deletions(-) commit 472fcea160f27a5d9b7526093d9d8d89ba0b6137 Author: Christian Marangi Date: Wed Jul 27 13:35:16 2022 +0200 net: dsa: qca8k: move port set status/eee/ethtool stats function to common code The same logic to disable/enable port, set eee and get ethtool stats is used by drivers based on qca8k family switch. Move it to common code to make it accessible also by other drivers. While at it also drop unnecessary qca8k_priv cast for void pointers. Signed-off-by: Christian Marangi Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/qca/qca8k-8xxx.c | 105 ------------------------------------- drivers/net/dsa/qca/qca8k-common.c | 102 +++++++++++++++++++++++++++++++++++ drivers/net/dsa/qca/qca8k.h | 11 ++++ 3 files changed, 113 insertions(+), 105 deletions(-) commit fce1ec0c4e2d03d9c62ffc615a42bdba78eb4c14 Author: Christian Marangi Date: Wed Jul 27 13:35:15 2022 +0200 net: dsa: qca8k: move mib init function to common code The same mib function is used by drivers based on qca8k family switch. Move it to common code to make it accessible also by other drivers. Signed-off-by: Christian Marangi Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/qca/qca8k-8xxx.c | 37 ------------------------------------- drivers/net/dsa/qca/qca8k-common.c | 35 +++++++++++++++++++++++++++++++++++ drivers/net/dsa/qca/qca8k.h | 4 ++++ 3 files changed, 39 insertions(+), 37 deletions(-) commit 910746444313dc463396cd63024cdf54ef04ef39 Author: Christian Marangi Date: Wed Jul 27 13:35:14 2022 +0200 net: dsa: qca8k: move qca8k bulk read/write helper to common code The same ATU function are used by drivers based on qca8k family switch. Move the bulk read/write helper to common code to declare these shared ATU functions in common code. These helper will be dropped when regmap correctly support bulk read/write. Signed-off-by: Christian Marangi Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/qca/qca8k-8xxx.c | 39 ++------------------------------------ drivers/net/dsa/qca/qca8k-common.c | 39 ++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/qca/qca8k.h | 8 ++++++++ 3 files changed, 49 insertions(+), 37 deletions(-) commit d5f901eab2e9dfed1095995dfc98f231f4fd2971 Author: Christian Marangi Date: Wed Jul 27 13:35:13 2022 +0200 net: dsa: qca8k: move qca8k read/write/rmw and reg table to common code The same reg table and read/write/rmw function are used by drivers based on qca8k family switch. Move them to common code to make it accessible also by other drivers. Signed-off-by: Christian Marangi Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/qca/qca8k-8xxx.c | 42 -------------------------------------- drivers/net/dsa/qca/qca8k-common.c | 38 ++++++++++++++++++++++++++++++++++ drivers/net/dsa/qca/qca8k.h | 6 ++++++ 3 files changed, 44 insertions(+), 42 deletions(-) commit 027152b830434e3632ad5dd678cc5d4740358dbb Author: Christian Marangi Date: Wed Jul 27 13:35:12 2022 +0200 net: dsa: qca8k: move mib struct to common code The same MIB struct is used by drivers based on qca8k family switch. Move it to common code to make it accessible also by other drivers. Signed-off-by: Christian Marangi Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/qca/Makefile | 1 + drivers/net/dsa/qca/{qca8k.c => qca8k-8xxx.c} | 51 ---------------------- drivers/net/dsa/qca/qca8k-common.c | 63 +++++++++++++++++++++++++++ drivers/net/dsa/qca/qca8k.h | 3 ++ 4 files changed, 67 insertions(+), 51 deletions(-) commit 533c64bca62a8654f00698bc893f639013e38c7b Author: Christian Marangi Date: Wed Jul 27 13:35:11 2022 +0200 net: dsa: qca8k: make mib autocast feature optional Some switch may not support mib autocast feature and require the legacy way of reading the regs directly. Make the mib autocast feature optional and permit to declare support for it using match_data struct in a dedicated qca8k_info_ops struct. Signed-off-by: Christian Marangi Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/qca/qca8k.c | 11 +++++++++-- drivers/net/dsa/qca/qca8k.h | 5 +++++ 2 files changed, 14 insertions(+), 2 deletions(-) commit 3bb0844e7bcd0fb0bcfab6202b5edd349ef5250a Author: Christian Marangi Date: Wed Jul 27 13:35:10 2022 +0200 net: dsa: qca8k: cache match data to speed up access Using of_device_get_match_data is expensive. Cache match data to speed up access and rework user of match data to use the new cached value. Signed-off-by: Christian Marangi Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/qca/qca8k.c | 35 +++++++++++------------------------ drivers/net/dsa/qca/qca8k.h | 1 + 2 files changed, 12 insertions(+), 24 deletions(-) commit 29192a170e1579ac8293d00c88d9938c2b2f5aab Author: Andy Shevchenko Date: Tue Jul 26 17:49:06 2022 +0300 firewire: net: Make use of get_unaligned_be48(), put_unaligned_be48() Since we have a proper endianness converters for BE 48-bit data use them. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220726144906.5217-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jakub Kicinski drivers/firewire/net.c | 14 ++------------ include/net/firewire.h | 3 +-- 2 files changed, 3 insertions(+), 14 deletions(-) commit 39befe3a43a5856b36de4e880804b9b110dd2885 Author: Ruffalo Lavoisier Date: Thu Jul 28 12:28:54 2022 +0900 amt: fix typo in comment Correct spelling on 'non-existent' in comment Signed-off-by: Ruffalo Lavoisier Link: https://lore.kernel.org/r/20220728032854.151180-1-RuffaloLavoisier@gmail.com Signed-off-by: Jakub Kicinski drivers/net/amt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 707e304dd2e8e169c2a34220b7081649249ec8e7 Author: Yang Li Date: Thu Jul 28 07:38:01 2022 +0800 mlxsw: core_linecards: Remove duplicated include in core_linecard_dev.c Fix following includecheck warning: ./drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.c: linux/err.h is included more than once. Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/20220727233801.23781-1-yang.lee@linux.alibaba.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.c | 1 - 1 file changed, 1 deletion(-) commit d7c4c9e075f8cc6d88d277bc24e5d99297f03c06 Author: Eric Dumazet Date: Wed Jul 27 22:18:21 2022 -0700 ax25: fix incorrect dev_tracker usage While investigating a separate rose issue [1], and enabling CONFIG_NET_DEV_REFCNT_TRACKER=y, Bernard reported an orthogonal ax25 issue [2] An ax25_dev can be used by one (or many) struct ax25_cb. We thus need different dev_tracker, one per struct ax25_cb. After this patch is applied, we are able to focus on rose. [1] https://lore.kernel.org/netdev/fb7544a1-f42e-9254-18cc-c9b071f4ca70@free.fr/ [2] [ 205.798723] reference already released. [ 205.798732] allocated in: [ 205.798734] ax25_bind+0x1a2/0x230 [ax25] [ 205.798747] __sys_bind+0xea/0x110 [ 205.798753] __x64_sys_bind+0x18/0x20 [ 205.798758] do_syscall_64+0x5c/0x80 [ 205.798763] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 205.798768] freed in: [ 205.798770] ax25_release+0x115/0x370 [ax25] [ 205.798778] __sock_release+0x42/0xb0 [ 205.798782] sock_close+0x15/0x20 [ 205.798785] __fput+0x9f/0x260 [ 205.798789] ____fput+0xe/0x10 [ 205.798792] task_work_run+0x64/0xa0 [ 205.798798] exit_to_user_mode_prepare+0x18b/0x190 [ 205.798804] syscall_exit_to_user_mode+0x26/0x40 [ 205.798808] do_syscall_64+0x69/0x80 [ 205.798812] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 205.798827] ------------[ cut here ]------------ [ 205.798829] WARNING: CPU: 2 PID: 2605 at lib/ref_tracker.c:136 ref_tracker_free.cold+0x60/0x81 [ 205.798837] Modules linked in: rose netrom mkiss ax25 rfcomm cmac algif_hash algif_skcipher af_alg bnep snd_hda_codec_hdmi nls_iso8859_1 i915 rtw88_8821ce rtw88_8821c x86_pkg_temp_thermal rtw88_pci intel_powerclamp rtw88_core snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio coretemp snd_hda_intel kvm_intel snd_intel_dspcfg mac80211 snd_hda_codec kvm i2c_algo_bit drm_buddy drm_dp_helper btusb drm_kms_helper snd_hwdep btrtl snd_hda_core btbcm joydev crct10dif_pclmul btintel crc32_pclmul ghash_clmulni_intel mei_hdcp btmtk intel_rapl_msr aesni_intel bluetooth input_leds snd_pcm crypto_simd syscopyarea processor_thermal_device_pci_legacy sysfillrect cryptd intel_soc_dts_iosf snd_seq sysimgblt ecdh_generic fb_sys_fops rapl libarc4 processor_thermal_device intel_cstate processor_thermal_rfim cec snd_timer ecc snd_seq_device cfg80211 processor_thermal_mbox mei_me processor_thermal_rapl mei rc_core at24 snd intel_pch_thermal intel_rapl_common ttm soundcore int340x_thermal_zone video [ 205.798948] mac_hid acpi_pad sch_fq_codel ipmi_devintf ipmi_msghandler drm msr parport_pc ppdev lp parport ramoops pstore_blk reed_solomon pstore_zone efi_pstore ip_tables x_tables autofs4 hid_generic usbhid hid i2c_i801 i2c_smbus r8169 xhci_pci ahci libahci realtek lpc_ich xhci_pci_renesas [last unloaded: ax25] [ 205.798992] CPU: 2 PID: 2605 Comm: ax25ipd Not tainted 5.18.11-F6BVP #3 [ 205.798996] Hardware name: To be filled by O.E.M. To be filled by O.E.M./CK3, BIOS 5.011 09/16/2020 [ 205.798999] RIP: 0010:ref_tracker_free.cold+0x60/0x81 [ 205.799005] Code: e8 d2 01 9b ff 83 7b 18 00 74 14 48 c7 c7 2f d7 ff 98 e8 10 6e fc ff 8b 7b 18 e8 b8 01 9b ff 4c 89 ee 4c 89 e7 e8 5d fd 07 00 <0f> 0b b8 ea ff ff ff e9 30 05 9b ff 41 0f b6 f7 48 c7 c7 a0 fa 4e [ 205.799008] RSP: 0018:ffffaf5281073958 EFLAGS: 00010286 [ 205.799011] RAX: 0000000080000000 RBX: ffff9a0bd687ebe0 RCX: 0000000000000000 [ 205.799014] RDX: 0000000000000001 RSI: 0000000000000282 RDI: 00000000ffffffff [ 205.799016] RBP: ffffaf5281073a10 R08: 0000000000000003 R09: fffffffffffd5618 [ 205.799019] R10: 0000000000ffff10 R11: 000000000000000f R12: ffff9a0bc53384d0 [ 205.799022] R13: 0000000000000282 R14: 00000000ae000001 R15: 0000000000000001 [ 205.799024] FS: 0000000000000000(0000) GS:ffff9a0d0f300000(0000) knlGS:0000000000000000 [ 205.799028] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 205.799031] CR2: 00007ff6b8311554 CR3: 000000001ac10004 CR4: 00000000001706e0 [ 205.799033] Call Trace: [ 205.799035] [ 205.799038] ? ax25_dev_device_down+0xd9/0x1b0 [ax25] [ 205.799047] ? ax25_device_event+0x9f/0x270 [ax25] [ 205.799055] ? raw_notifier_call_chain+0x49/0x60 [ 205.799060] ? call_netdevice_notifiers_info+0x52/0xa0 [ 205.799065] ? dev_close_many+0xc8/0x120 [ 205.799070] ? unregister_netdevice_many+0x13d/0x890 [ 205.799073] ? unregister_netdevice_queue+0x90/0xe0 [ 205.799076] ? unregister_netdev+0x1d/0x30 [ 205.799080] ? mkiss_close+0x7c/0xc0 [mkiss] [ 205.799084] ? tty_ldisc_close+0x2e/0x40 [ 205.799089] ? tty_ldisc_hangup+0x137/0x210 [ 205.799092] ? __tty_hangup.part.0+0x208/0x350 [ 205.799098] ? tty_vhangup+0x15/0x20 [ 205.799103] ? pty_close+0x127/0x160 [ 205.799108] ? tty_release+0x139/0x5e0 [ 205.799112] ? __fput+0x9f/0x260 [ 205.799118] ax25_dev_device_down+0xd9/0x1b0 [ax25] [ 205.799126] ax25_device_event+0x9f/0x270 [ax25] [ 205.799135] raw_notifier_call_chain+0x49/0x60 [ 205.799140] call_netdevice_notifiers_info+0x52/0xa0 [ 205.799146] dev_close_many+0xc8/0x120 [ 205.799152] unregister_netdevice_many+0x13d/0x890 [ 205.799157] unregister_netdevice_queue+0x90/0xe0 [ 205.799161] unregister_netdev+0x1d/0x30 [ 205.799165] mkiss_close+0x7c/0xc0 [mkiss] [ 205.799170] tty_ldisc_close+0x2e/0x40 [ 205.799173] tty_ldisc_hangup+0x137/0x210 [ 205.799178] __tty_hangup.part.0+0x208/0x350 [ 205.799184] tty_vhangup+0x15/0x20 [ 205.799188] pty_close+0x127/0x160 [ 205.799193] tty_release+0x139/0x5e0 [ 205.799199] __fput+0x9f/0x260 [ 205.799203] ____fput+0xe/0x10 [ 205.799208] task_work_run+0x64/0xa0 [ 205.799213] do_exit+0x33b/0xab0 [ 205.799217] ? __handle_mm_fault+0xc4f/0x15f0 [ 205.799224] do_group_exit+0x35/0xa0 [ 205.799228] __x64_sys_exit_group+0x18/0x20 [ 205.799232] do_syscall_64+0x5c/0x80 [ 205.799238] ? handle_mm_fault+0xba/0x290 [ 205.799242] ? debug_smp_processor_id+0x17/0x20 [ 205.799246] ? fpregs_assert_state_consistent+0x26/0x50 [ 205.799251] ? exit_to_user_mode_prepare+0x49/0x190 [ 205.799256] ? irqentry_exit_to_user_mode+0x9/0x20 [ 205.799260] ? irqentry_exit+0x33/0x40 [ 205.799263] ? exc_page_fault+0x87/0x170 [ 205.799268] ? asm_exc_page_fault+0x8/0x30 [ 205.799273] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 205.799277] RIP: 0033:0x7ff6b80eaca1 [ 205.799281] Code: Unable to access opcode bytes at RIP 0x7ff6b80eac77. [ 205.799283] RSP: 002b:00007fff6dfd4738 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 205.799287] RAX: ffffffffffffffda RBX: 00007ff6b8215a00 RCX: 00007ff6b80eaca1 [ 205.799290] RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001 [ 205.799293] RBP: 0000000000000001 R08: ffffffffffffff80 R09: 0000000000000028 [ 205.799295] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff6b8215a00 [ 205.799298] R13: 0000000000000000 R14: 00007ff6b821aee8 R15: 00007ff6b821af00 [ 205.799304] Fixes: feef318c855a ("ax25: fix UAF bugs of net_device caused by rebinding operation") Reported-by: Bernard F6BVP Signed-off-by: Eric Dumazet Cc: Duoming Zhou Link: https://lore.kernel.org/r/20220728051821.3160118-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski include/net/ax25.h | 1 + net/ax25/af_ax25.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 6ecf206d602fafd077811b6033c183deb0c0a9c8 Author: Martin Blumenstingl Date: Wed Jul 27 21:16:42 2022 +0200 selftests: net: dsa: Add a Makefile which installs the selftests Add a Makefile which takes care of installing the selftests in tools/testing/selftests/drivers/net/dsa. This can be used to install all DSA specific selftests and forwarding.config using the same approach as for the selftests in tools/testing/selftests/net/forwarding. Signed-off-by: Martin Blumenstingl Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220727191642.480279-1-martin.blumenstingl@googlemail.com Signed-off-by: Jakub Kicinski tools/testing/selftests/drivers/net/dsa/Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 13719a5bf19254a3daada33445073d6c8d4f98d9 Merge: 1515a1b8991d c90005b5f75c Author: Jakub Kicinski Date: Thu Jul 28 21:58:49 2022 -0700 Merge branch 'take-devlink-lock-on-mlx4-and-mlx5-callbacks' Moshe Shemesh says: ==================== Take devlink lock on mlx4 and mlx5 callbacks Prepare mlx4 and mlx5 drivers to have all devlink callbacks called with devlink instance locked. Change mlx4 driver to use devl_ API where needed to have devlink reload callbacks locked. Change mlx5 driver to use devl_ API where needed to have devlink reload and devlink health callbacks locked. As mlx5 is the only driver which needed changes to enable calling health callbacks with devlink instance locked, this patchset also removes DEVLINK_NL_FLAG_NO_LOCK flag from devlink health callbacks. This patchset will be followed by a patchset that will remove DEVLINK_NL_FLAG_NO_LOCK flag from devlink and will remove devlink_mutex. ==================== Link: https://lore.kernel.org/r/1659023630-32006-1-git-send-email-moshe@nvidia.com Signed-off-by: Jakub Kicinski commit c90005b5f75ce3ef6170281ac4d77e8b7123995b Author: Moshe Shemesh Date: Thu Jul 28 18:53:50 2022 +0300 devlink: Hold the instance lock in health callbacks Let the core take the devlink instance lock around health callbacks and remove the now redundant locking in the drivers. Signed-off-by: Moshe Shemesh Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/health.c | 8 +------ net/core/devlink.c | 30 +++++++++++------------- 2 files changed, 15 insertions(+), 23 deletions(-) commit d3dbdc9f8ddce46ae2646b2257106d8cdb3d5887 Author: Moshe Shemesh Date: Thu Jul 28 18:53:49 2022 +0300 net/mlx5: Lock mlx5 devlink health recovery callback Change devlink instance locks in mlx5 driver to have devlink health recovery callback locked, while keeping all driver paths which lead to devl_ API functions called by the driver locked. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/health.c | 12 +++++++++++- drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) commit 60d7ceea4b2a2f7106f61a0bb712a71868875106 Author: Moshe Shemesh Date: Thu Jul 28 18:53:48 2022 +0300 net/mlx4: Lock mlx4 devlink reload callback Change devlink instance locks in mlx4 driver to have devlink reload callback locked, while keeping all driver paths which leads to devl_ API functions called by the mlx4 driver locked. Signed-off-by: Moshe Shemesh Reviewed-by: Tariq Toukan Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx4/catas.c | 5 ++++ drivers/net/ethernet/mellanox/mlx4/main.c | 45 +++++++++++++++++++++--------- 2 files changed, 37 insertions(+), 13 deletions(-) commit a8c05514b2f8fe105d69796cce31fb344c50fb2a Author: Moshe Shemesh Date: Thu Jul 28 18:53:47 2022 +0300 net/mlx4: Use devl_ API for devlink port register / unregister Use devl_ API to call devl_port_register() and devl_port_unregister() instead of devlink_port_register() and devlink_port_unregister(). Add devlink instance lock in mlx4 driver paths to these functions. This will be used by the downstream patch to invoke mlx4 devlink reload callbacks with devlink lock held. Signed-off-by: Moshe Shemesh Reviewed-by: Tariq Toukan Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx4/main.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 9cb7e94a78b54f935de602f514313e73cc5b8a48 Author: Moshe Shemesh Date: Thu Jul 28 18:53:46 2022 +0300 net/mlx4: Use devl_ API for devlink region create / destroy Use devl_ API to call devl_region_create() and devl_region_destroy() instead of devlink_region_create() and devlink_region_destroy(). Add devlink instance lock in mlx4 driver paths to these functions. This will be used by the downstream patch to invoke mlx4 devlink reload callbacks with devlink lock held. Signed-off-by: Moshe Shemesh Reviewed-by: Tariq Toukan Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx4/crdump.c | 20 ++++++++++---------- drivers/net/ethernet/mellanox/mlx4/main.c | 7 +++++++ 2 files changed, 17 insertions(+), 10 deletions(-) commit 84a433a40d0ebf3bbf36b8bfa58c6f45dc782344 Author: Moshe Shemesh Date: Thu Jul 28 18:53:45 2022 +0300 net/mlx5: Lock mlx5 devlink reload callbacks Change devlink instance locks in mlx5 driver to have devlink reload callbacks locked, while keeping all driver paths which lead to devl_ API functions called by the driver locked. Add mlx5_load_one_devl_locked() and mlx5_unload_one_devl_locked() which are used by the paths which are already locked such as devlink reload callbacks. This patch makes the driver use devl_ API also for traps register as these functions are called from the driver paths parallel to reload that requires locking now. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/dev.c | 19 ++------ drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 50 ++++++++++++++-------- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 18 ++------ drivers/net/ethernet/mellanox/mlx5/core/main.c | 34 ++++++++++++++- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 2 + drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 6 +++ 6 files changed, 79 insertions(+), 50 deletions(-) commit c12f4c6ac3b49bdf38b31f7362cfde5ed63ea7cb Author: Moshe Shemesh Date: Thu Jul 28 18:53:44 2022 +0300 net/mlx5: Move fw reset unload to mlx5_fw_reset_complete_reload Refactor fw reset code to have the unload driver part done on mlx5_fw_reset_complete_reload(), so if it was called by the PF which initiated the reload fw activate flow, the unload part will be handled by the mlx5_devlink_reload_fw_activate() callback itself and not by the reset event work. This will be used by the downstream patch to invoke devlink reload callbacks with devlink lock held. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 11 ++++++++++- drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c | 10 +++------- 2 files changed, 13 insertions(+), 8 deletions(-) commit 2dec18ad826f52658f7781ee995d236cc449b678 Author: Jiri Pirko Date: Thu Jul 28 18:53:43 2022 +0300 net: devlink: remove region snapshots list dependency on devlink->lock After mlx4 driver is converted to do locked reload, devlink_region_snapshot_create() may be called from both locked and unlocked context. Note that in mlx4 region snapshots could be created on any command failure. That can happen in any flow that involves commands to FW, which means most of the driver flows. So resolve this by removing dependency on devlink->lock for region snapshots list consistency and introduce new mutex to ensure it. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) commit 5502e8712c9be509a0b16e15ed64ef4e4bbc7e2c Author: Jiri Pirko Date: Thu Jul 28 18:53:42 2022 +0300 net: devlink: remove region snapshot ID tracking dependency on devlink->lock After mlx4 driver is converted to do locked reload, functions to get/put regions snapshot ID may be called from both locked and unlocked context. So resolve this by removing dependency on devlink->lock for region snapshot ID tracking by using internal xa_lock() to maintain shapshot_ids xa_array consistency. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 64 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 31 deletions(-) commit 1515a1b8991d00079d78e333bbd0c5e29a5de104 Merge: 68be7b82e77f 5b6ff128fdf6 Author: Jakub Kicinski Date: Thu Jul 28 21:57:11 2022 -0700 Merge branch 'add-framework-for-selftests-in-devlink' Vikas Gupta says: ==================== add framework for selftests in devlink Add support for selftests in the devlink framework. Adds a callback .selftests_check and .selftests_run in devlink_ops. User can add test(s) suite which is subsequently passed to the driver and driver can opt for running particular tests based on its capabilities. Patchset adds a flash based test for the bnxt_en driver. ==================== Link: https://lore.kernel.org/r/20220727165721.37959-1-vikas.gupta@broadcom.com Signed-off-by: Jakub Kicinski commit 5b6ff128fdf60b08c67b9b50addadc8fb8da4410 Author: vikas Date: Wed Jul 27 22:27:21 2022 +0530 bnxt_en: implement callbacks for devlink selftests Add callbacks ============= .selftest_check: returns true for flash selftest. .selftest_run: runs a flash selftest. Also, refactor NVM APIs so that they can be used with devlink and ethtool both. Signed-off-by: Vikas Gupta Reviewed-by: Andy Gospodarek Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 61 +++++++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 24 ++++----- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.h | 12 +++++ 3 files changed, 85 insertions(+), 12 deletions(-) commit 08f588fa301bef264576fc915da6bf31b585a824 Author: Vikas Gupta Date: Wed Jul 27 22:27:20 2022 +0530 devlink: introduce framework for selftests Add a framework for running selftests. Framework exposes devlink commands and test suite(s) to the user to execute and query the supported tests by the driver. Below are new entries in devlink_nl_ops devlink_nl_cmd_selftests_show_doit/dumpit: To query the supported selftests by the drivers. devlink_nl_cmd_selftests_run: To execute selftests. Users can provide a test mask for executing group tests or standalone tests. Documentation/networking/devlink/ path is already part of MAINTAINERS & the new files come under this path. Hence no update needed to the MAINTAINERS Signed-off-by: Vikas Gupta Reviewed-by: Andy Gospodarek Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski .../networking/devlink/devlink-selftests.rst | 38 ++++ include/net/devlink.h | 21 ++ include/uapi/linux/devlink.h | 29 +++ net/core/devlink.c | 216 +++++++++++++++++++++ 4 files changed, 304 insertions(+) commit 68be7b82e77f5ddf4a216f49fd965e74caf3f2e8 Merge: 8fd1e1517792 624bf0992133 Author: Jakub Kicinski Date: Thu Jul 28 21:50:57 2022 -0700 Merge branch 'mlx5e-use-tls-tx-pool-to-improve-connection-rate' Tariq Toukan says: ==================== mlx5e use TLS TX pool to improve connection rate To offload encryption operations, the mlx5 device maintains state and keeps track of every kTLS device-offloaded connection. Two HW objects are used per TX context of a kTLS offloaded connection: a. Transport interface send (TIS) object, to reach the HW context. b. Data Encryption Key (DEK) to perform the crypto operations. These two objects are created and destroyed per TLS TX context, via FW commands. In total, 4 FW commands are issued per TLS TX context, which seriously limits the connection rate. In this series, we aim to save creation and destroy of TIS objects by recycling them. Upon recycling of a TIS, the HW still needs to be notified for the re-mapping between a TIS and a context. This is done by posting WQEs via an SQ, significantly faster API than the FW command interface. A pool is used for recycling. The pool dynamically interacts to the load and connection rate, growing and shrinking accordingly. Saving the TIS FW commands per context increases connection rate by ~42%, from 11.6K to 16.5K connections per sec. Connection rate is still limited by FW bottleneck due to the remaining per context FW commands (DEK create/destroy). This will soon be addressed in a followup series. By combining the two series, the FW bottleneck will be released, and a significantly higher (about 100K connections per sec) kTLS TX device-offloaded connection rate is reached. ==================== Link: https://lore.kernel.org/r/20220727094346.10540-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 624bf09921338f977ca81e70817ff2fd3aa9216d Author: Tariq Toukan Date: Wed Jul 27 12:43:46 2022 +0300 net/mlx5e: kTLS, Dynamically re-size TX recycling pool Let the TLS TX recycle pool be more flexible in size, by continuously and dynamically allocating and releasing HW resources in response to changes in the connections rate and load. Allocate and release pool entries in bulks (16). Use a workqueue to release/allocate in the background. Allocate a new bulk when the pool size goes lower than the low threshold (1K). Symmetric operation is done when the pool size gets greater than the upper threshold (4K). Every idle pool entry holds: 1 TIS, 1 DEK (HW resources), in addition to ~100 bytes in host memory. Start with an empty pool to minimize memory and HW resources waste for non-TLS users that have the device-offload TLS enabled. Upon a new request, in case the pool is empty, do not wait for a whole bulk allocation to complete. Instead, trigger an instant allocation of a single resource to reduce latency. Performance tests: Before: 11,684 CPS After: 16,556 CPS Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: Jakub Kicinski .../ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 315 +++++++++++++++++++-- 1 file changed, 289 insertions(+), 26 deletions(-) commit c4dfe704f53fb530e2a198c8d68e489cb68ebd70 Author: Tariq Toukan Date: Wed Jul 27 12:43:45 2022 +0300 net/mlx5e: kTLS, Recycle objects of device-offloaded TLS TX connections The transport interface send (TIS) object is responsible for performing all transport related operations of the transmit side. The ConnectX HW uses a TIS object to save and access the TLS crypto information and state of an offloaded TX kTLS connection. Before this patch, we used to create a new TIS per connection and destroy it once it’s closed. Every create and destroy of a TIS is a FW command. Same applies for the private TLS context, where we used to dynamically allocate and free it per connection. Resources recycling reduce the impact of the allocation/free operations and helps speeding up the connection rate. In this feature we maintain a pool of TX objects and use it to recycle the resources instead of re-creating them per connection. A cached TIS popped from the pool is updated to serve the new connection via the fast-path HW interface, updating the tls static and progress params. This is a very fast operation, significantly faster than FW commands. On recycling, a WQE fence is required after the context params change. This guarantees that the data is sent after the context has been successfully updated in hardware, and that the context modification doesn't interfere with existing traffic. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed Signed-off-by: Jakub Kicinski .../mellanox/mlx5/core/en_accel/en_accel.h | 10 + .../ethernet/mellanox/mlx5/core/en_accel/ktls.h | 14 ++ .../mellanox/mlx5/core/en_accel/ktls_stats.c | 2 + .../ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 211 ++++++++++++++++----- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 9 + 5 files changed, 199 insertions(+), 47 deletions(-) commit 23b1cf1e3fe02c997f21d6c8412432d4713ba2c7 Author: Tariq Toukan Date: Wed Jul 27 12:43:44 2022 +0300 net/mlx5e: kTLS, Take stats out of OOO handler Let the caller of mlx5e_ktls_tx_handle_ooo() take care of updating the stats, according to the returned value. As the switch/case blocks are already there, this change saves unnecessary branches in the handler. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed Signed-off-by: Jakub Kicinski .../ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 27 +++++++++------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit da6682faa82f4dfa5dbc2bc05bd166f1800c4f80 Author: Tariq Toukan Date: Wed Jul 27 12:43:43 2022 +0300 net/mlx5e: kTLS, Introduce TLS-specific create TIS TLS TIS objects have a defined role in mapping and reaching the HW TLS contexts. Some standard TIS attributes (like LAG port affinity) are not relevant for them. Use a dedicated TLS TIS create function instead of the generic mlx5e_create_tis. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 7adc91e0c93901a0eeeea10665d0feb48ffde2d4 Author: Tariq Toukan Date: Wed Jul 27 12:43:42 2022 +0300 net/tls: Multi-threaded calls to TX tls_dev_del Multiple TLS device-offloaded contexts can be added in parallel via concurrent calls to .tls_dev_add, while calls to .tls_dev_del are sequential in tls_device_gc_task. This is not a sustainable behavior. This creates a rate gap between add and del operations (addition rate outperforms the deletion rate). When running for enough time, the TLS device resources could get exhausted, failing to offload new connections. Replace the single-threaded garbage collector work with a per-context alternative, so they can be handled on several cores in parallel. Use a new dedicated destruct workqueue for this. Tested with mlx5 device: Before: 22141 add/sec, 103 del/sec After: 11684 add/sec, 11684 del/sec Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed Signed-off-by: Jakub Kicinski include/net/tls.h | 2 ++ net/tls/tls_device.c | 63 ++++++++++++++++++++++++++-------------------------- 2 files changed, 33 insertions(+), 32 deletions(-) commit 113671b255ee3b9f5585a6d496ef0e675e698698 Author: Tariq Toukan Date: Wed Jul 27 12:43:41 2022 +0300 net/tls: Perform immediate device ctx cleanup when possible TLS context destructor can be run in atomic context. Cleanup operations for device-offloaded contexts could require access and interaction with the device callbacks, which might sleep. Hence, the cleanup of such contexts must be deferred and completed inside an async work. For all others, this is not necessary, as cleanup is atomic. Invoke cleanup immediately for them, avoiding queueing redundant gc work. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed Signed-off-by: Jakub Kicinski net/tls/tls_device.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 8fd1e151779285b211e7184e9237bba69bd74386 Author: Yang Li Date: Thu Jul 28 11:10:19 2022 +0800 tls: rx: Fix unsigned comparison with less than zero The return from the call to tls_rx_msg_size() is int, it can be a negative error code, however this is being assigned to an unsigned long variable 'sz', so making 'sz' an int. Eliminate the following coccicheck warning: ./net/tls/tls_strp.c:211:6-8: WARNING: Unsigned expression compared with zero: sz < 0 Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20220728031019.32838-1-yang.lee@linux.alibaba.com Signed-off-by: Jakub Kicinski net/tls/tls_strp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 37e26188345b454aaffe05d651ada0dd7f470234 Merge: efe3e6b5aeef e20691fa36c4 Author: Jakub Kicinski Date: Thu Jul 28 21:50:02 2022 -0700 Merge branch 'tls-rx-follow-ups-to-rx-work' Jakub Kicinski says: ==================== tls: rx: follow ups to rx work A selection of unrelated changes. First some selftest polishing. Next a change to rcvtimeo handling for locking based on an exchange with Eric. Follow up to Paolo's comments from yesterday. Last but not least a fix to a false positive warning, turns out I've been testing with DEBUG_NET=n this whole time. ==================== Link: https://lore.kernel.org/r/20220727031524.358216-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit e20691fa36c42ff89c2b582f38ca0cc9e3d043ba Author: Jakub Kicinski Date: Tue Jul 26 20:15:24 2022 -0700 tls: rx: fix the false positive warning I went too far in the accessor conversion, we can't use tls_strp_msg() after decryption because the message may not be ready. What we care about on this path is that the output skb is detached, i.e. we didn't somehow just turn around and used the input skb with its TCP data still attached. So look at the anchor directly. Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser") Signed-off-by: Jakub Kicinski net/tls/tls_sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d11ef9cc5a6792c8508cb00308b604836f9a9053 Author: Jakub Kicinski Date: Tue Jul 26 20:15:23 2022 -0700 tls: strp: rename and multithread the workqueue Paolo points out that there seems to be no strong reason strparser users a single threaded workqueue. Perhaps there were some performance or pinning considerations? Since we don't know (and it's the slow path) let's default to the most natural, multi-threaded choice. Also rename the workqueue to "tls-". Suggested-by: Paolo Abeni Signed-off-by: Jakub Kicinski net/tls/tls_strp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70f03fc2fc142d8c18e891dfa55ae8c5579f1e82 Author: Jakub Kicinski Date: Tue Jul 26 20:15:22 2022 -0700 tls: rx: don't consider sock_rcvtimeo() cumulative Eric indicates that restarting rcvtimeo on every wait may be fine. I thought that we should consider it cumulative, and made tls_rx_reader_lock() return the remaining timeo after acquiring the reader lock. tls_rx_rec_wait() gets its timeout passed in by value so it does not keep track of time previously spent. Make the lock waiting consistent with tls_rx_rec_wait() - don't keep track of time spent. Read the timeo fresh in tls_rx_rec_wait(). It's unclear to me why callers are supposed to cache the value. Link: https://lore.kernel.org/all/CANn89iKcmSfWgvZjzNGbsrndmCch2HC_EPZ7qmGboDNaWoviNQ@mail.gmail.com/ Signed-off-by: Jakub Kicinski net/tls/tls_sw.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) commit 86c591fb9142e772d3ba26b601f4a49123e7079c Author: Jakub Kicinski Date: Tue Jul 26 20:15:21 2022 -0700 selftests: tls: handful of memrnd() and length checks Add a handful of memory randomizations and precise length checks. Nothing is really broken here, I did this to increase confidence when debugging. It does fix a GCC warning, tho. Apparently GCC recognizes that memory needs to be initialized for send() but does not recognize that for write(). Signed-off-by: Jakub Kicinski tools/testing/selftests/net/tls.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit efe3e6b5aeefaabed9ad5dcb3682b581bf34c187 Author: Xie Shaowen Date: Wed Jul 27 16:12:53 2022 +0800 net: usb: delete extra space and tab in blank line delete extra space and tab in blank line, there is no functional change. Signed-off-by: Xie Shaowen Link: https://lore.kernel.org/r/20220727081253.3043941-1-studentxswpy@163.com Signed-off-by: Jakub Kicinski drivers/net/usb/catc.c | 44 ++++++++++++++++++++++---------------------- drivers/net/usb/cdc_subset.c | 10 +++++----- drivers/net/usb/kaweth.c | 2 +- drivers/net/usb/plusb.c | 2 +- drivers/net/usb/usbnet.c | 2 +- 5 files changed, 30 insertions(+), 30 deletions(-) commit 27603a606fda0806d7c08914bc976931aa42020e Author: Matthias Kaehlcke Date: Thu Jul 28 08:54:41 2022 -0700 dm: verity-loadpin: Drop use of dm_table_get_num_targets() Commit 2aec377a2925 ("dm table: remove dm_table_get_num_targets() wrapper") in linux-dm/for-next removed the function dm_table_get_num_targets() which is used by verity-loadpin. Access table->num_targets directly instead of using the defunct wrapper. Fixes: b6c1c5745ccc ("dm: Add verity helpers for LoadPin") Reported-by: Stephen Rothwell Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220728085412.1.I242d21b378410eb6f9897a3160efb56e5608c59d@changeid drivers/md/dm-verity-loadpin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 272ac32f566e3f925b20c231a2b30f6893aa258a Merge: 623cd8700698 33ea1340bafe Author: Jakub Kicinski Date: Thu Jul 28 18:21:16 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net No conflicts. Signed-off-by: Jakub Kicinski commit 64893e83f916145fd23182209009e9d2ce36d2df Author: Daniel Müller Date: Thu Jul 28 22:23:45 2022 +0000 libbpf: Support PPC in arch_specific_syscall_pfx Commit 708ac5bea0ce ("libbpf: add ksyscall/kretsyscall sections support for syscall kprobes") added the arch_specific_syscall_pfx() function, which returns a string representing the architecture in use. As it turns out this function is currently not aware of Power PC, where NULL is returned. That's being flagged by the libbpf CI system, which builds for ppc64le and the compiler sees a NULL pointer being passed in to a %s format string. With this change we add representations for two more architectures, for Power PC and Power PC 64, and also adjust the string format logic to handle NULL pointers gracefully, in an attempt to prevent similar issues with other architectures in the future. Fixes: 708ac5bea0ce ("libbpf: add ksyscall/kretsyscall sections support for syscall kprobes") Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220728222345.3125975-1-deso@posteo.net tools/lib/bpf/libbpf.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 1631ba1259d6d7f49b6028f2a1a0fa02be1c522a Author: Heiko Stuebner Date: Thu Jul 7 01:15:35 2022 +0200 riscv: Add support for non-coherent devices using zicbom extension The Zicbom ISA-extension was ratified in november 2021 and introduces instructions for dcache invalidate, clean and flush operations. Implement cache management operations for non-coherent devices based on them. Of course not all cores will support this, so implement an alternative-based mechanism that replaces empty instructions with ones done around Zicbom instructions. As discussed in previous versions, assume the platform being coherent by default so that non-coherent devices need to get marked accordingly by firmware. Reviewed-by: Christoph Hellwig Signed-off-by: Heiko Stuebner Reviewed-by: Guo Ren Link: https://lore.kernel.org/r/20220706231536.2041855-4-heiko@sntech.de Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 31 ++++++++++ arch/riscv/Makefile | 4 ++ arch/riscv/include/asm/cache.h | 4 ++ arch/riscv/include/asm/cacheflush.h | 10 ++++ arch/riscv/include/asm/errata_list.h | 19 +++++- arch/riscv/include/asm/hwcap.h | 1 + arch/riscv/kernel/cpu.c | 1 + arch/riscv/kernel/cpufeature.c | 24 ++++++++ arch/riscv/kernel/setup.c | 2 + arch/riscv/mm/Makefile | 1 + arch/riscv/mm/dma-noncoherent.c | 112 +++++++++++++++++++++++++++++++++++ 11 files changed, 208 insertions(+), 1 deletion(-) commit d1afce6709595b39cd159bdc54fe2093808c02fc Author: Heiko Stuebner Date: Thu Jul 7 01:15:34 2022 +0200 dt-bindings: riscv: document cbom-block-size The Zicbom operates on a block-size defined for the cpu-core, which does not necessarily match other cache-sizes used. So add the necessary property for the system to know the core's block-size. Reviewed-by: Anup Patel Reviewed-by: Guo Ren Acked-by: Rob Herring Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20220706231536.2041855-3-heiko@sntech.de Signed-off-by: Palmer Dabbelt Documentation/devicetree/bindings/riscv/cpus.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit 12b827758f51d4b614a677dd453b0e854e46aa65 Author: Heiko Stuebner Date: Thu Jul 7 01:15:33 2022 +0200 of: also handle dma-noncoherent in of_dma_is_coherent() of_dma_is_coherent() currently expects the architecture to be non-coherent and some devices being coherent getting marked as such with the dma-coherent devicetree property. For PowerPC CONFIG_OF_DMA_DEFAULT_COHERENT was added which currently makes of_dma_is_coherent() always return true but doesn't handle the case of the architecture being coherent but some devices not. So modify the function to also check for dma-noncoherent and set a suitable default return value. If CONFIG_OF_DMA_DEFAULT_COHERENT is set the value starts with true and finding dma-noncoherent will set it to false and without CONFIG_OF_DMA_DEFAULT_COHERENT, the behaviour is reversed. Reviewed-by: Christoph Hellwig Reviewed-by: Rob Herring Reviewed-by: Guo Ren Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20220706231536.2041855-2-heiko@sntech.de Signed-off-by: Palmer Dabbelt drivers/of/address.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit b32d45824aa7e07a0c3257a16e3a2a691b11b39a Author: Nathan Huckleberry Date: Fri Jul 22 09:38:22 2022 +0000 dm bufio: Add DM_BUFIO_CLIENT_NO_SLEEP flag Add an optional flag that ensures dm_bufio_client does not sleep (primary focus is to service dm_bufio_get without sleeping). This allows the dm-bufio cache to be queried from interrupt context. To ensure that dm-bufio does not sleep, dm-bufio must use a spinlock instead of a mutex. Additionally, to avoid deadlocks, special care must be taken so that dm-bufio does not sleep while holding the spinlock. But again: the scope of this no_sleep is initially confined to dm_bufio_get, so __alloc_buffer_wait_no_callback is _not_ changed to avoid sleeping because __bufio_new avoids allocation for NF_GET. Signed-off-by: Nathan Huckleberry Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 22 +++++++++++++++++++--- include/linux/dm-bufio.h | 5 +++++ 2 files changed, 24 insertions(+), 3 deletions(-) commit 0fcb100d50835d6823723ef0898cd565b3796e0a Author: Nathan Huckleberry Date: Fri Jul 22 09:38:21 2022 +0000 dm bufio: Add flags argument to dm_bufio_client_create Add a flags argument to dm_bufio_client_create and update all the callers. This is in preparation to add the DM_BUFIO_NO_SLEEP flag. Signed-off-by: Nathan Huckleberry Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 3 ++- drivers/md/dm-ebs-target.c | 3 ++- drivers/md/dm-integrity.c | 2 +- drivers/md/dm-snap-persistent.c | 2 +- drivers/md/dm-verity-fec.c | 4 ++-- drivers/md/dm-verity-target.c | 2 +- drivers/md/persistent-data/dm-block-manager.c | 3 ++- include/linux/dm-bufio.h | 3 ++- 8 files changed, 13 insertions(+), 9 deletions(-) commit 9dd1cd3220eca534f2d47afad7ce85f4c40118d8 Author: Mike Snitzer Date: Wed Jul 20 13:58:04 2022 -0400 dm: fix dm-raid crash if md_handle_request() splits bio Commit ca522482e3eaf ("dm: pass NULL bdev to bio_alloc_clone") introduced the optimization to _not_ perform bio_associate_blkg()'s relatively costly work when DM core clones its bio. But in doing so it exposed the possibility for DM's cloned bio to alter DM target behavior (e.g. crash) if a target were to issue IO without first calling bio_set_dev(). The DM raid target can trigger an MD crash due to its need to split the DM bio that is passed to md_handle_request(). The split will recurse to submit_bio_noacct() using a bio with an uninitialized ->bi_blkg. This NULL bio->bi_blkg causes blk_throtl_bio() to dereference a NULL blkg_to_tg(bio->bi_blkg). Fix this in DM core by adding a new 'needs_bio_set_dev' target flag that will make alloc_tio() call bio_set_dev() on behalf of the target. dm-raid is the only target that requires this flag. bio_set_dev() initializes the DM cloned bio's ->bi_blkg, using bio_associate_blkg, before passing the bio to md_handle_request(). Long-term fix would be to audit and refactor MD code to rely on DM to split its bio, using dm_accept_partial_bio(), but there are MD raid personalities (e.g. raid1 and raid10) whose implementation are tightly coupled to handling the bio splitting inline. Fixes: ca522482e3eaf ("dm: pass NULL bdev to bio_alloc_clone") Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 1 + drivers/md/dm.c | 13 ++++++------- include/linux/device-mapper.h | 6 ++++++ include/uapi/linux/dm-ioctl.h | 4 ++-- 4 files changed, 15 insertions(+), 9 deletions(-) commit 7dad24db59d2d2803576f2e3645728866a056dab Author: Mikulas Patocka Date: Sun Jul 24 14:33:52 2022 -0400 dm raid: fix address sanitizer warning in raid_resume There is a KASAN warning in raid_resume when running the lvm test lvconvert-raid.sh. The reason for the warning is that mddev->raid_disks is greater than rs->raid_disks, so the loop touches one entry beyond the allocated length. Cc: stable@vger.kernel.org Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fbeea217d8f297fe0e0956a1516d14ba97d0396 Author: Mikulas Patocka Date: Sun Jul 24 14:31:35 2022 -0400 dm raid: fix address sanitizer warning in raid_status There is this warning when using a kernel with the address sanitizer and running this testsuite: https://gitlab.com/cki-project/kernel-tests/-/tree/main/storage/swraid/scsi_raid ================================================================== BUG: KASAN: slab-out-of-bounds in raid_status+0x1747/0x2820 [dm_raid] Read of size 4 at addr ffff888079d2c7e8 by task lvcreate/13319 CPU: 0 PID: 13319 Comm: lvcreate Not tainted 5.18.0-0.rc3. #1 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 Call Trace: dump_stack_lvl+0x6a/0x9c print_address_description.constprop.0+0x1f/0x1e0 print_report.cold+0x55/0x244 kasan_report+0xc9/0x100 raid_status+0x1747/0x2820 [dm_raid] dm_ima_measure_on_table_load+0x4b8/0xca0 [dm_mod] table_load+0x35c/0x630 [dm_mod] ctl_ioctl+0x411/0x630 [dm_mod] dm_ctl_ioctl+0xa/0x10 [dm_mod] __x64_sys_ioctl+0x12a/0x1a0 do_syscall_64+0x5b/0x80 The warning is caused by reading conf->max_nr_stripes in raid_status. The code in raid_status reads mddev->private, casts it to struct r5conf and reads the entry max_nr_stripes. However, if we have different raid type than 4/5/6, mddev->private doesn't point to struct r5conf; it may point to struct r0conf, struct r1conf, struct r10conf or struct mpconf. If we cast a pointer to one of these structs to struct r5conf, we will be reading invalid memory and KASAN warns about it. Fix this bug by reading struct r5conf only if raid type is 4, 5 or 6. Cc: stable@vger.kernel.org Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6adada5b70403d526e0ac5b5c50ae245ac92bc7 Author: Mike Christie Date: Sun Jul 17 17:45:08 2022 -0500 dm: Start pr_preempt from the same starting path pr_preempt has a similar issue as reserve where for all the reservation types except the All Registrants ones the preempt can create a reservation. And a follow up reservation or release needs to go down the same path the preempt did. This has the pr_preempt work like reserve and release where we always start from the first path in the first group. This commit has been tested with windows failover clustering's validation test and libiscsi's PGR tests to check for regressions. They both don't have tests to verify this case, so I tested it manually. Signed-off-by: Mike Christie Signed-off-by: Mike Snitzer drivers/md/dm.c | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) commit 08a3c338e080d25dd5613a22d71741f19fc0e0fa Author: Mike Christie Date: Sun Jul 17 17:45:07 2022 -0500 dm: Fix PR release handling for non All Registrants This commit fixes a bug where we are leaving the reservation in place even though pr_release has run and returned success. If we have a Write Exclusive, Exclusive Access, or Write/Exclusive Registrants only reservation, the release must be sent down the path that is the reservation holder. The problem is multipath_prepare_ioctl most likely selected path N for the reservation, then later when we do the release multipath_prepare_ioctl will select a completely different path. The device will then return success becuase the nvme and scsi specs say to return success if there is no reservation or if the release is sent down from a path that is not the holder. We then think we have released the reservation. This commit has us loop over each path and send a release so we can make sure the release is executed on the correct path. It has been tested with windows failover clustering's validation test which checks this case, and it has been tested manually (the libiscsi PGR tests don't have a test case for this yet, but I will be adding one). Signed-off-by: Mike Christie Signed-off-by: Mike Snitzer drivers/md/dm.c | 48 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 14 deletions(-) commit 701510875975ed7e188566de205990d29f34c8d8 Author: Mike Christie Date: Sun Jul 17 17:45:06 2022 -0500 dm: Start pr_reserve from the same starting path When an app does a pr_reserve it will go to whatever path we happen to be using at the time. This can result in errors when the app does a second pr_reserve call and expects success but gets a failure because the reserve is not done on the holder's path. This commit has us always start trying to do reserves from the first path in the first group. Windows failover clustering will produce the type of pattern above. With this commit, we will now pass its validation test for this case. Signed-off-by: Mike Christie Signed-off-by: Mike Snitzer drivers/md/dm.c | 46 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 14 deletions(-) commit 8dd87f3c5283de7f95396a236e420487226f3951 Author: Mike Christie Date: Sun Jul 17 17:45:05 2022 -0500 dm: Allow dm_call_pr to be used for path searches The specs state that if you send a reserve down a path that is already the holder success must be returned and if it goes down a path that is not the holder reservation conflict must be returned. Windows failover clustering will send a second reservation and expects that a device returns success. The problem for multipathing is that for an All Registrants reservation, we can send the reserve down any path but for all other reservation types there is one path that is the holder. To handle this we could add PR state to dm but that can get nasty. Look at target_core_pr.c for an example of the type of things we'd have to track. It will also get more complicated because other initiators can change the state so we will have to add in async event/sense handling. This commit, and the 3 commits that follow, tries to keep dm simple and keep just doing passthrough. This commit modifies dm_call_pr to be able to find the first usable path that can execute our pr_op then return. When dm_pr_reserve is converted to dm_call_pr in the next commit for the normal case we will use the same path for every reserve. Signed-off-by: Mike Christie Signed-off-by: Mike Snitzer drivers/md/dm.c | 50 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 12 deletions(-) commit e120a5f1e78fab6223544e425015f393d90d6f0d Author: Mike Snitzer Date: Fri Jul 22 15:31:23 2022 -0400 dm: return early from dm_pr_call() if DM device is suspended Otherwise PR ops may be issued while the broader DM device is being reconfigured, etc. Fixes: 9c72bad1f31a ("dm: call PR reserve/unreserve on each underlying device") Signed-off-by: Mike Snitzer drivers/md/dm.c | 5 +++++ 1 file changed, 5 insertions(+) commit 069448b2fd0a40b5252915dc10ae561c4b5c8c5a Author: Lama Kayal Date: Mon Jan 31 15:58:30 2022 +0200 net/mlx5e: Move mlx5e_init_l2_addr to en_main Move the function declaration of mlx5e_init_l2_addr to en/fs.h, rename to mlx5e_fs_init_l2_addr to align with the fs API functions naming convention and let it take mlx5e_flow_steering as arguments while keeping implementation at en_fs.c file. This helps maintain a clean driver code and avoids unnecessary dependencies. Signed-off-by: Lama Kayal Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/en/fs.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit a02c07ea5d0b38815282a787a9621007f86965d1 Author: Lama Kayal Date: Sun Jan 23 17:44:12 2022 +0200 net/mlx5e: Split en_fs ndo's and move to en_main Add inner callee for ndo mlx5e_vlan_rx_add_vid and mlx5e_vlan_rx_kill_vid, to separate the priv usage from other flow steering flows. Move wrapper ndo's into en_main, and split the rest of the functionality into a separate part inside en_fs. Signed-off-by: Lama Kayal Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/fs.h | 6 + drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 180 +++++++++++----------- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 22 +++ 3 files changed, 120 insertions(+), 88 deletions(-) commit 5b031add2f94b3c34b0ab2057cdc061132bd3eb9 Author: Lama Kayal Date: Sun Jan 23 13:13:18 2022 +0200 net/mlx5e: Separate mlx5e_set_rx_mode_work and move caller to en_main Separate mlx5e_set_rx_mode into two, and move caller to en_main while keeping implementation in en_fs in the newly declared function mlx5e_fs_set_rx_mode. This; to minimize the coupling of flow_steering to priv. Add a parallel boolean member vlan_strip_disable to mlx5e_flow_steering that's updated similarly as its identical in priv, thus making it possible to adjust the rx_mode work handler to current changes. Also, add state_destroy boolean to mlx5e_flow_steering struct which replaces the old check : !test_bit(MLX5E_STATE_DESTROYING, &priv->state). This state member is updated accordingly prior to INIT_WORK(mlx5e_set_rx_mode_work), This is done for similar purposes as mentioned earlier and to minimize argument passings. Signed-off-by: Lama Kayal Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/fs.h | 7 +- drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 178 ++++++++++----------- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 24 ++- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 3 +- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 3 +- 5 files changed, 119 insertions(+), 96 deletions(-) commit 7bb7071568e3faec8f5a59c52c15ff9ec879ddb7 Author: Lama Kayal Date: Sun Jan 23 14:15:19 2022 +0200 net/mlx5e: Add mdev to flow_steering struct Make flow_steering struct contain mlx5_core_dev such that it becomes self contained and easier to decouple later on this series. Let its values be initialized in mlx5e_fs_init(). Signed-off-by: Lama Kayal Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/fs.h | 4 +- drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 70 +++++++++++----------- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 2 +- 5 files changed, 42 insertions(+), 38 deletions(-) commit 6a7bc5d0e1c34444eb82ab325fb9dd9ddefc6b73 Author: Lama Kayal Date: Sun Jan 9 11:23:05 2022 +0200 net/mlx5e: Report flow steering errors with mdev err report API Let en_fs report errors via mdev error report API, aka mlx5_core_* macros, thus replace the netdev API reports. This to minimize netdev coupling to the flow steering struct. Signed-off-by: Lama Kayal Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 70 ++++++++++++------------- 1 file changed, 34 insertions(+), 36 deletions(-) commit af8bbf7300686961f74e72e2dc10a76672603cb3 Author: Lama Kayal Date: Sun Jan 9 11:23:05 2022 +0200 net/mlx5e: Convert mlx5e_flow_steering member of mlx5e_priv to pointer Make mlx5e_flow_steering member of mlx5e_priv a pointer. Add dynamic allocation respectively. Allocate fs for all profiles when initializing profile, symmetrically deallocate at profile cleanup. Signed-off-by: Lama Kayal Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en/fs.h | 5 +- .../mellanox/mlx5/core/en/fs_tt_redirect.c | 72 +++---- drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c | 8 +- .../ethernet/mellanox/mlx5/core/en/tc/act/goto.c | 2 +- .../ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c | 32 +-- .../mellanox/mlx5/core/en_accel/ipsec_fs.c | 10 +- drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c | 58 +++--- drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 226 +++++++++++---------- .../ethernet/mellanox/mlx5/core/en_fs_ethtool.c | 24 +-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 13 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 31 ++- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 60 +++--- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 19 +- 14 files changed, 298 insertions(+), 264 deletions(-) commit 454533aa87f4472826779bc8a2925548bf1ed4da Author: Lama Kayal Date: Thu Apr 28 16:41:20 2022 +0300 net/mlx5e: Allocate VLAN and TC for featured profiles only Introduce allocation and de-allocation functions for both flow steering VLAN and TC as part of fs API. Add allocations of VLAN and TC as nic profile feature, such that fs_init() will allocate both VLAN and TC only if they're featured in the profile. VLAN and TC are relevant for nic_profile only. Signed-off-by: Lama Kayal Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 + drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 52 ++++++++++++++++++----- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 +- 3 files changed, 46 insertions(+), 12 deletions(-) commit 23bde065c3a228e1e65c7ba9495f0b54535bea1a Author: Lama Kayal Date: Mon Jan 31 10:14:58 2022 +0200 net/mlx5e: Make mlx5e_tc_table private Move mlx5e_tc_table struct to en_tc.c thus make it private. Introduce allocation and deallocation functions as part of the tc API to allow this switch smoothly. Convert mlx5e_nic_chain() macro to a function of en_tc.c. Signed-off-by: Lama Kayal Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/fs.h | 24 ----------- .../ethernet/mellanox/mlx5/core/en/tc/act/goto.c | 2 +- .../net/ethernet/mellanox/mlx5/core/en/tc_priv.h | 3 +- drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 9 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 49 ++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 4 ++ 6 files changed, 59 insertions(+), 32 deletions(-) commit 65f586c2730ca342404abe1363a7ecaa8f48ca38 Author: Lama Kayal Date: Mon Jan 10 13:36:59 2022 +0200 net/mlx5e: Convert mlx5e_tc_table member of mlx5e_flow_steering to pointer Make fs.tc be a pointer and allocate it dynamically. Add mlx5e_priv pointer to mlx5e_tc_table, and thus get a work-around to accessing priv via tc when handling tc events inside mlx5e_tc_netdev_event. Signed-off-by: Lama Kayal Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/fs.h | 3 +- .../net/ethernet/mellanox/mlx5/core/en/tc_priv.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 11 +++- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 61 +++++++++++----------- 4 files changed, 43 insertions(+), 34 deletions(-) commit 7d1a5ce46e475378761432263e9b1a385968a9af Author: Roi Dayan Date: Thu Jul 21 11:04:51 2022 +0300 net/mlx5e: TC, Support tc action api for police Add support for tc action api for police. Offloading standalone police action without a tc rule and reporting stats. Signed-off-by: Roi Dayan Reviewed-by: Jianbo Liu Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en/rep/tc.c | 117 ++++++++++++++++++++- .../ethernet/mellanox/mlx5/core/en/tc/act/act.h | 10 ++ .../ethernet/mellanox/mlx5/core/en/tc/act/police.c | 100 ++++++++++++++++-- .../net/ethernet/mellanox/mlx5/core/en/tc/meter.c | 16 +++ .../net/ethernet/mellanox/mlx5/core/en/tc/meter.h | 4 + 5 files changed, 239 insertions(+), 8 deletions(-) commit f8e9d413a28a36f7451ca3b53306a6a8daa7b997 Author: Roi Dayan Date: Sun Jul 24 14:14:55 2022 +0300 net/mlx5e: TC, Separate get/update/replace meter functions mlx5e_tc_meter_get() to get an existing meter. mlx5e_tc_meter_update() to update an existing meter without refcount. mlx5e_tc_meter_replace() to get/create a meter and update if needed. Signed-off-by: Roi Dayan Reviewed-by: Jianbo Liu Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en/tc/meter.c | 132 +++++++++++++++++---- .../net/ethernet/mellanox/mlx5/core/en/tc/meter.h | 5 + drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +- 3 files changed, 112 insertions(+), 27 deletions(-) commit b50ce4350c107c96a6a3e481b5e07208f0d058bb Author: Roi Dayan Date: Tue Jul 19 16:09:41 2022 +0300 net/mlx5e: Add red and green counters for metering Add red and green counters per meter instance. TC police action is implemented as a meter instance. The meter counters represent the police action notexceed/exceed counters. TC rules using the same meter instance will use the same counters. Signed-off-by: Roi Dayan Reviewed-by: Jianbo Liu Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en/tc/meter.c | 22 +++++++++++++++ .../net/ethernet/mellanox/mlx5/core/en/tc/meter.h | 3 ++ .../ethernet/mellanox/mlx5/core/en/tc/post_meter.c | 33 ++++++++++++++-------- .../ethernet/mellanox/mlx5/core/en/tc/post_meter.h | 4 ++- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 3 +- 5 files changed, 52 insertions(+), 13 deletions(-) commit e5b1db27410e5d625a49b57db133f0551e01dd56 Author: Roi Dayan Date: Tue Feb 22 16:30:35 2022 +0200 net/mlx5e: TC, Allocate post meter ft per rule To support a TC police action notexceed counter and supporting actions other than drop/pipe there is a need to create separate ft and rules per rule and not to use a common one created on eswitch init. Signed-off-by: Roi Dayan Reviewed-by: Jianbo Liu Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en/tc/meter.c | 19 +++------------- .../net/ethernet/mellanox/mlx5/core/en/tc/meter.h | 6 +++-- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 26 ++++++++++++++++++++-- 3 files changed, 31 insertions(+), 20 deletions(-) commit 8920d92b8be61c8a209ac21769028bbefdc17a4f Author: Yevgeny Kliteynik Date: Fri Jul 16 00:16:53 2021 +0300 net/mlx5: DR, Add support for flow metering ASO Add support for ASO action of type flow metering on device that supports STEv1. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Hamdan Igbaria Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed .../mellanox/mlx5/core/steering/dr_action.c | 99 ++++++++++++++++++++++ .../mellanox/mlx5/core/steering/dr_ste_v1.c | 56 ++++++++++++ .../mellanox/mlx5/core/steering/dr_types.h | 17 ++++ .../ethernet/mellanox/mlx5/core/steering/fs_dr.c | 21 +++++ .../mellanox/mlx5/core/steering/mlx5_ifc_dr.h | 26 ++++++ .../ethernet/mellanox/mlx5/core/steering/mlx5dr.h | 8 ++ 6 files changed, 227 insertions(+) commit ec082d31c161976a0e81c5d2e3ac317237ac5a0d Author: Gal Pressman Date: Sun Jul 17 14:04:29 2022 +0300 net/mlx5e: Fix wrong use of skb_tcp_all_headers() with encapsulation Use skb_inner_tcp_all_headers() instead of skb_tcp_all_headers() when transmitting an encapsulated packet in mlx5e_tx_get_gso_ihs(). Fixes: 504148fedb85 ("net: add skb_[inner_]tcp_all_headers helpers") Cc: Eric Dumazet Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42b4f7f66a43cdb9216e76e595c8a9af154806da Author: Shay Drory Date: Mon Jun 27 16:05:31 2022 +0300 net/mlx5: Fix driver use of uninitialized timeout Currently, driver is setting default values to all timeouts during function setup. The offending commit is using a timeout before function setup, meaning: the timeout is 0 (or garbage), since no value have been set. This may result in failure to probe the driver: mlx5_function_setup:1034:(pid 69850): Firmware over 4294967296 MS in pre-initializing state, aborting probe_one:1591:(pid 69850): mlx5_init_one failed with error code -16 Hence, set default values to timeouts during tout_init() Fixes: 37ca95e62ee2 ("net/mlx5: Increase FW pre-init timeout for health recovery") Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/lib/tout.c | 11 ++++------- drivers/net/ethernet/mellanox/mlx5/core/lib/tout.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 -- 3 files changed, 4 insertions(+), 10 deletions(-) commit 62d2664351ef37da34f6f3a3fd8ab34257d6fe30 Author: Yevgeny Kliteynik Date: Mon Jul 25 00:06:12 2022 +0300 net/mlx5: DR, Fix SMFS steering info dump format Fix several issues in SMFS steering info dump: - Fix outdated macro value for matcher mask in the SMFS debug dump format. The existing value denotes the old format of the matcher mask, as it was used during the early stages of development, and it results in wrong parsing by the steering dump parser - wrong fields are shown in the parsed output. - Add the missing destination table to the dumped action. The missing dest table handle breaks the ability to associate between the "go to table" action and the actual table in the steering info. Fixes: 9222f0b27da2 ("net/mlx5: DR, Add support for dumping steering info") Signed-off-by: Yevgeny Kliteynik Signed-off-by: Muhammad Sammar Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/steering/dr_dbg.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit a6e9085d791f8306084fd5bc44dd3fdd4e1ac27b Author: Maher Sanalla Date: Sun Jul 24 11:28:21 2022 +0300 net/mlx5: Adjust log_max_qp to be 18 at most The cited commit limited log_max_qp to be 17 due to FW capabilities. Recently, it turned out that there are old FW versions that supported more than 17, so the cited commit caused a degradation. Thus, set the maximum log_max_qp back to 18 as it was before the cited commit. Fixes: 7f839965b2d7 ("net/mlx5: Update log_max_qp value to be 17 at most") Signed-off-by: Maher Sanalla Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0063a43700fa8c98cac2637aa1afcf40bb9e403 Author: Vlad Buslov Date: Thu Jul 7 21:49:18 2022 +0200 net/mlx5e: Modify slow path rules to go to slow fdb While extending available range of supported chains/prios referenced commit also modified slow path rules to go to FT chain instead of actual slow FDB. However neither of existing users of the MLX5_ATTR_FLAG_SLOW_PATH flag (tunnel encap entries with invalid encap and flows with trap action) need to match on FT chain. After bridge offload was implemented packets of such flows can also be matched by bridge priority tables which is undesirable. Restore slow path flows implementation to redirect packets to slow_fdb. Fixes: 278d51f24330 ("net/mlx5: E-Switch, Increase number of chains and priorities") Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 23 ++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 677e78c8d44f326a73a77d71acf3a49ea562c1d9 Author: Maxim Mikityanskiy Date: Thu Jun 2 15:14:08 2022 +0300 net/mlx5e: Fix calculations related to max MPWQE size Before commit 76c31e5f7585 ("net/mlx5e: Use FW limitation for max MPW WQEBBs"), the maximum size of MPWQE in WQEBBs was hardcoded as a driver constant. That commit started using the firmware capability that can further limit the size, however, it unintentionally changed a few things: 1. The calculation of MLX5E_MAX_KLM_PER_WQE used the size in DS, which was replaced by the size in WQEBBs, making the resulting value 4 times smaller. 2. MLX5E_TX_MPW_MAX_WQEBBS used to be aligned to the cache line size (either 64 or 128 bytes, i.e. 1 or 2 WQEBBs), but it's no longer the case if the firmware capability is smaller than the driver maximum. Fix both issues by using the correct units for MLX5E_MAX_KLM_PER_WQE and by aligning mlx5e_get_sw_max_sq_mpw_wqebbs after taking the minimum. Besides fixing the arithmetics in calculation of MLX5E_MAX_KLM_PER_WQE, also use appropriate constants: `size of BSF * num of DS per WQEBB * number of WQEBBs` (the calculation before the blamed commit) doesn't make much sense to calculate the WQE size in bytes, so just use `size of WQEBB * number of WQEBBs`. While at it, replace the types that hold the number of WQEBBs by u8. These values don't exceed 16, and it allows to fill holes in two structs. Fixes: 76c31e5f7585 ("net/mlx5e: Use FW limitation for max MPW WQEBBs") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 52586d2f56b3e4f528ca7268d65074e92c936681 Author: Maxim Mikityanskiy Date: Mon May 30 21:06:03 2022 +0300 net/mlx5e: xsk: Account for XSK RQ UMRs when calculating ICOSQ size ICOSQ is used to post UMR WQEs for both regular RQ and XSK RQ. However, space in ICOSQ is reserved only for the regular RQ, which may cause ICOSQ overflows when using XSK (the most risk is on activating channels). This commit fixes the issue by reserving space for XSK UMR WQEs as well. As XSK may be enabled without restarting the channel and recreating the ICOSQ, this space is reserved unconditionally. Fixes: db05815b36cb ("net/mlx5e: Add XSK zero-copy support") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/params.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 562696c3c62c7c23dd896e9447252ce9268cb812 Author: Maxim Mikityanskiy Date: Thu May 26 16:48:47 2022 +0300 net/mlx5e: Fix the value of MLX5E_MAX_RQ_NUM_MTTS MLX5E_MAX_RQ_NUM_MTTS should be the maximum value, so that MLX5_MTT_OCTW(MLX5E_MAX_RQ_NUM_MTTS) fits into u16. The current value of 1 << 17 results in MLX5_MTT_OCTW(1 << 17) = 1 << 16, which doesn't fit into u16. This commit replaces it with the maximum value that still fits u16. Fixes: 73281b78a37a ("net/mlx5e: Derive Striding RQ size from MTU") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 903f2194f74bbd289f3170114035d472a36a8ab4 Author: Maor Dickman Date: Mon Jul 18 09:44:13 2022 +0300 net/mlx5e: TC, Fix post_act to not match on in_port metadata The cited commit changed CT to use multi table actions post act infrastructure instead of using it own post act infrastructure, this broke decap during VF tunnel offload (Stack devices) with CT due to wrong match on in_port metadata in the post act table. This changed only broke VF tunnel offload because it modify the packet in_port metadata to be VF metadata and it isn't propagate the post act creation. Fixed by modify post act rules to match only on fte_id and not match on in_port metadata which isn't needed. Fixes: a81283263bb0 ("net/mlx5e: Use multi table support for CT and sample actions") Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c | 1 + 1 file changed, 1 insertion(+) commit 115d9f95ea7ab780ef315dc356bebba2e07cb731 Author: Gal Pressman Date: Wed Jul 13 13:57:03 2022 +0300 net/mlx5e: Remove WARN_ON when trying to offload an unsupported TLS cipher/version The driver reports whether TX/RX TLS device offloads are supported, but not which ciphers/versions, these should be handled by returning -EOPNOTSUPP when .tls_dev_add() is called. Remove the WARN_ON kernel trace when the driver gets a request to offload a cipher/version that is not supported as it is expected. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ff186ff32997049a6d263031819517eab4e93aa Author: Jonathan Kim Date: Thu Jul 28 12:36:09 2022 -0400 drm/amdgpu: fix hive reference leak when reflecting psp topology info Hives that require psp topology info to be reflected will leak hive reference so fix it. Signed-off-by: Jonathan Kim Reviewed-by: Shaoyun Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 ++ 1 file changed, 2 insertions(+) commit e1c42213f3f9b24200d4b60da806303dbeae5a4d Author: Evan Quan Date: Fri Jul 15 11:03:01 2022 +0800 drm/amd/pm: enable GFX ULV feature support for SMU13.0.0 The feature is ready with latest firmwares. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 3 +++ 1 file changed, 3 insertions(+) commit 1f3dfde4fba4f4b7822c389b9c994089a4ab588b Author: Evan Quan Date: Mon Jul 25 11:45:43 2022 +0800 drm/amd/pm: update driver if header for SMU 13.0.0 And get the version bumped to 0x2C to match the latest PMFW. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 2 +- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ed67f7292b99f5d3876fa02dd51a43f46986c61c Author: Jack Xiao Date: Wed Jul 20 15:57:22 2022 +0800 drm/amdgpu: move mes self test after drm sched re-started mes self test rely on vm mapping, move it after drm sched re-started so that vm mapping can work during gpu reset. Signed-off-by: Jack Xiao Acked-and-tested-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 3 ++- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) commit 0da0def7705dff7ee938662ea06f90770cb6f9fc Author: Evan Quan Date: Wed Jul 20 16:51:58 2022 +0800 drm/amdgpu: drop non-necessary call trace dump This extra call trace dump comes out in every gpu reset. And it gives people a wrong impression that something went wrong. Although actually there was not. Signed-off-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - 1 file changed, 1 deletion(-) commit 47231d5e396a94e869b877bb1a0dcd526d91ac6e Author: Sonny Jiang Date: Thu Jul 21 13:27:12 2022 -0400 drm/amdgpu: enable VCN cg and JPEG cg/pg Not enable VCN pg because encode issue Signed-off-by: Sonny Jiang Reviewed-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1c0a90364859c17d57a7f08d6209b73e7e1142cd Author: Sonny Jiang Date: Thu Jul 21 13:27:11 2022 -0400 drm/amdgpu: vcn_4_0_2 video codec query Enable support for vcn_4_0_2 video codec Signed-off-by: Sonny Jiang Reviewed-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + 1 file changed, 1 insertion(+) commit cbe93a234bcce489be319e678dbf167b7a5f915a Author: Sonny Jiang Date: Thu Jul 21 13:27:10 2022 -0400 drm/amdgpu: add VCN_4_0_2 firmware support Add VCN_4_0_2 firmware support Signed-off-by: Sonny Jiang Reviewed-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4ac77cce84a4afa3b76fe7c763aa3e754cdac422 Author: Sonny Jiang Date: Thu Jul 21 13:27:09 2022 -0400 drm/amdgpu: add VCN function in NBIO v7.7 Add function to support VCN_4_0_2 doorbell Signed-off-by: Sonny Jiang Reviewed-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 736f7308d3e6201322142d98abe4e9af33a429f7 Author: Sonny Jiang Date: Thu Jul 21 13:27:08 2022 -0400 drm/amdgpu: fix a vcn4 boot poll bug in emulation mode The return value should be set in vcn4 boot poll. Signed-off-by: Sonny Jiang Reviewed-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 1 + 1 file changed, 1 insertion(+) commit 6fdd2077ec03f4b34d127a1713ca19248539d6e0 Author: Chengming Gui Date: Thu Jul 28 09:15:43 2022 +0800 drm/amd/amdgpu: add memory training support for PSP_V13 Add PSP_V13 memory training support funcs. v2: replace DRM_{DEBUG/ERROR} with dev_{dbg/err}. (Hawking) v3: fix checkpatch error (Alex) Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 159 +++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) commit e22ec18750be01298763b10f7056ec8edfbf064f Author: Lang Yu Date: Mon Jul 25 15:06:55 2022 +0800 drm/amdkfd: remove an unnecessary amdgpu_bo_ref No need to reference the BO here, dmabuf framework will handle that. Signed-off-by: Lang Yu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 1 - 1 file changed, 1 deletion(-) commit 674b9e08a02903fef75beadca0df490348d8f560 Author: Shikai Guo Date: Wed Jul 20 19:38:24 2022 +0800 drm/amd/pm: Add get_gfx_off_status interface for yellow carp add get_gfx_off_status interface to yellow_carp_ppt_funcs structure. Signed-off-by: Shikai Guo Reviewed-by: Aaron Liu Reviewed-by: Prike Liang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher .../gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit e4bb7fee188dab08b7e589fff7616716cdbd5c3b Author: Krzysztof Kozlowski Date: Thu Jul 28 13:16:02 2022 -0700 dt-bindings: input: ariel-pwrbutton: use spi-peripheral-props.yaml Instead of listing directly properties typical for SPI peripherals, reference the spi-peripheral-props.yaml schema. This allows using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. Remove the spi-* properties which now come via spi-peripheral-props.yaml schema, except for the cases when device schema adds some constraints like maximum frequency. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS.a The binding references also input.yaml and lists explicitly allowed properties, thus here reference only spi-peripheral-props.yaml for purpose of documenting the SPI slave device and bringing spi-max-frequency type validation. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220727164230.385614-1-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/ariel-pwrbutton.yaml | 1 + 1 file changed, 1 insertion(+) commit 2182cb7029e9c5cc4b63d1c5682f62ebb65cc952 Author: Maíra Canal Date: Wed Jul 27 14:50:33 2022 -0300 drm/amd/display: Remove unused struct freesync_context All references to struct freesync_context were removed, so remove the struct freesync_context itself and its entry on struct dc_stream_state. Reviewed-by: Rodrigo Siqueira Signed-off-by: Maíra Canal Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_stream.h | 8 -------- 1 file changed, 8 deletions(-) commit 7c8e4a257246399c4f1ff43a06fc53ec53423754 Author: Chengming Gui Date: Mon Jun 20 15:52:29 2022 +0800 drm/amd/amdgpu: add additional page fault settings for gfx11 Add three additional page fault settings. V2: move reg offset definition to header file. (Alex) V3: add all shift/mask definitions of used reg. (Hawking) Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0.c | 32 +++++++++++++++++++--- .../drm/amd/include/asic_reg/gc/gc_11_0_0_offset.h | 3 ++ .../amd/include/asic_reg/gc/gc_11_0_0_sh_mask.h | 25 +++++++++++++++++ 3 files changed, 56 insertions(+), 4 deletions(-) commit 53bd83dfff8618d4a1affa171288b895add40476 Author: Yang Li Date: Wed Jul 27 06:28:09 2022 +0800 drm/amd/display: remove unneeded semicolon Eliminate the following coccicheck warning: ./drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c:2344:67-68: Unneeded semicolon Reported-by: Abaci Robot Reviewed-by: Rodrigo Siqueira Signed-off-by: Yang Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2065fb21d9a789b14f737ea90facedabadeb8a4 Author: Vijendar Mukunda Date: Wed Jul 27 16:15:43 2022 +0530 drm/amdgpu: fix i2s_pdata out of bound array access Fixed following Smatch static checker warning: drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:393 acp_hw_init() error: buffer overflow 'i2s_pdata' 3 <= 3 drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:396 acp_hw_init() error: buffer overflow 'i2s_pdata' 3 <= 3 Fixes: 4c33e5179ff1 ("drm/amdgpu: create I2S platform devices for Jadeite platform") Reported-by: Dan Carpenter Signed-off-by: Vijendar Mukunda Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 8 -------- 1 file changed, 8 deletions(-) commit 0dc204bc3f199de0a0924f3d5f7c26295e5c012e Author: Lang Yu Date: Tue Jul 26 13:32:39 2022 +0800 drm/amdkfd: fix kgd_mem memory leak when importing dmabuf The kgd_mem memory allocated in amdgpu_amdkfd_gpuvm_import_dmabuf() is not freed properly. Explicitly free it in amdgpu_amdkfd_gpuvm_free_memory_of_gpu() under condition "mem->bo->kfd_bo != mem". Suggested-by: Felix Kuehling Signed-off-by: Lang Yu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3d2af401cf851be0bf2d4d89af6f120819b786a7 Author: Alex Sierra Date: Mon Jun 13 13:31:41 2022 -0500 drm/amdgpu: add debugfs for kfd system and ttm mem used This keeps track of kfd system mem used and kfd ttm mem used. Signed-off-by: Alex Sierra Reviewed-by: Philip Yang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 19 +++++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c | 2 ++ 3 files changed, 24 insertions(+) commit f9af3c16bfe19d145cf0588afa06d7f1070cbe2d Author: Alex Sierra Date: Tue May 17 17:43:06 2022 -0500 drm/amdkfd: track unified memory reservation with xnack off [WHY] Unified memory with xnack off should be tracked, as userptr mappings and legacy allocations do. To avoid oversuscribe system memory when xnack off. [How] Exposing functions reserve_mem_limit and unreserve_mem_limit to SVM API and call them on every prange creation and free. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 4 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 23 ++++++---- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 58 +++++++++++++++++------- 3 files changed, 59 insertions(+), 26 deletions(-) commit 06ac561fb0edf868f7b292fb4a3c8ffbbb1e14bb Author: Dan Carpenter Date: Tue Jul 26 18:15:31 2022 +0300 drm/amd/display: fix signedness bug in execute_synaptics_rc_command() The "ret" variable needs to be signed for the error handling to work. Fixes: 2ca97adccdc9 ("drm/amd/display: Add Synaptics Fifo Reset Workaround") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3b0079be8f0a2ccb533f7e38757b27ab6b6018c Author: Jiapeng Chong Date: Tue Jul 26 15:25:55 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warnings: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1372 dp_dsc_clock_en_read() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1478 dp_dsc_clock_en_write() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1563 dp_dsc_slice_width_read() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1667 dp_dsc_slice_width_write() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1752 dp_dsc_slice_height_read() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1856 dp_dsc_slice_height_write() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1937 dp_dsc_bits_per_pixel_read() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2038 dp_dsc_bits_per_pixel_write() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2117 dp_dsc_pic_width_read() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2178 dp_dsc_pic_height_read() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2254 dp_dsc_chunk_size_read() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2330 dp_dsc_slice_bpg_offset_read() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 72 +++++++++++----------- 1 file changed, 36 insertions(+), 36 deletions(-) commit 66bd94debe4aca171bd0220de7af3feee6542d8a Author: Jiapeng Chong Date: Tue Jul 26 15:25:54 2022 +0800 drm/amd/display: Clean up some inconsistent indenting Clean up some inconsistent indenting, replace sizeof(x) / sizeof((x)[0])) with ARRAY_SIZE(x). smatch warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/dcn30_fpu.c:185 optc3_fpu_set_vrr_m_const() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/dcn30_fpu.c:355 dcn30_fpu_set_mcif_arb_params() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/dcn30_fpu.c:384 dcn30_fpu_calculate_wm_and_dlg() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/dcn30_fpu.c:390 dcn30_fpu_calculate_wm_and_dlg() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 1be3188a6dda544dd4d78503eba5f5a77462b348 Author: Jiapeng Chong Date: Tue Jul 26 15:25:53 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn303/dcn303_fpu.c:205 dcn303_fpu_update_bw_bounding_box() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn303/dcn303_fpu.c:355 dcn303_fpu_init_soc_bounding_box() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn303/dcn303_fpu.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 1422ca01be6a816ec5a445a6fdce00342adcc5f8 Author: Jiapeng Chong Date: Tue Jul 26 15:25:52 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_util_32.c:713 dml32_CalculateSwathWidth() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4557489e0370ac0e9f1f5f100f300e9278be0733 Author: Jiapeng Chong Date: Tue Jul 26 15:25:51 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:51 dml32_rq_dlg_get_rq_reg() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:68 dml32_rq_dlg_get_rq_reg() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:220 dml32_rq_dlg_get_dlg_reg() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:224 dml32_rq_dlg_get_dlg_reg() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:235 dml32_rq_dlg_get_dlg_reg() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:240 dml32_rq_dlg_get_dlg_reg() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher .../display/dc/dml/dcn32/display_rq_dlg_calc_32.c | 81 +++++++++++----------- 1 file changed, 40 insertions(+), 41 deletions(-) commit 931fa55b2fac18f226622a95e42bc968bb852cd8 Author: Jiapeng Chong Date: Tue Jul 26 15:25:50 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_hwseq.c:1728 dcn20_program_front_end_for_ctx() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 64f857b5479a7ce2eaa56bef5f459da5542ad90d Author: Jiapeng Chong Date: Tue Jul 26 15:25:49 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp_cm.c:450 dpp20_get_blndgam_current() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp_cm.c:543 dpp20_get_shaper_current() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c | 68 +++++++++++----------- 1 file changed, 34 insertions(+), 34 deletions(-) commit 292956cfd9d38835f95021445525b35502837ff7 Author: Jiapeng Chong Date: Tue Jul 26 15:25:48 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_mpc.c:305 mpc20_get_ogam_current() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_mpc.c | 36 ++++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit fbad6c418e1e63a29c83e8b56a3636915406a9b7 Author: Jiapeng Chong Date: Tue Jul 26 15:25:47 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dwb.c:104 dwb2_enable() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9ced2e492ba9436524a2beed27df730042cbcc3e Author: Jiapeng Chong Date: Tue Jul 26 15:25:46 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_optc.c:186 optc3_set_dsc_config() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit e3b2bbb33e26d0a0327f878782632ec35cf96a72 Author: Jiapeng Chong Date: Tue Jul 26 15:25:45 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_mpc.c:116 mpc3_get_ogam_current() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_mpc.c:445 mpc3_get_shaper_current() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 70 ++++++++++++------------ 1 file changed, 35 insertions(+), 35 deletions(-) commit afb185008d40930895a7f7465a9661afeac0b84b Author: Jiapeng Chong Date: Tue Jul 26 15:25:44 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp.c:724 dpp3_get_blndgam_current() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp.c:823 dpp3_get_shaper_current() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c | 77 ++++++++++++------------ 1 file changed, 38 insertions(+), 39 deletions(-) commit 980e09e8b74c26baa32f0d65d272ecb1401606c9 Author: Jiapeng Chong Date: Tue Jul 26 15:25:43 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp_cm.c:67 dpp30_get_gamcor_current() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c | 25 ++++++++++------------ 1 file changed, 11 insertions(+), 14 deletions(-) commit 05381583a1d0c38cd2c4907ee93ec624250b8912 Author: Jiapeng Chong Date: Tue Jul 26 15:25:42 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warning: drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c:726 dcn31_clk_mgr_construct() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 203dc777865621b0c7f8f5b19ec18e572730278c Author: Jiapeng Chong Date: Tue Jul 26 15:25:41 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warning: drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c:655 dcn315_clk_mgr_construct() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 84e2fd649482435c3e12d9099784976ce8bea1e2 Author: Jiapeng Chong Date: Tue Jul 26 15:25:40 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warning: drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c:683 dcn316_clk_mgr_construct() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ed63b7cf2d6ebc01a765be31630c3e4a64f7f095 Author: Jiapeng Chong Date: Tue Jul 26 15:25:39 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warning: drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c:107 dcn201_update_clocks() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fcac1ac7f1e3fb877aad51c134ff2776bd24f9d6 Author: Jiapeng Chong Date: Tue Jul 26 15:25:38 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c:716 dcn314_clk_mgr_construct() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3f5a3881f1e26aa5e3ae34e34e439edce291ef5a Author: Jiapeng Chong Date: Tue Jul 26 15:25:37 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_mpc.c:306 mpc32_get_shaper_current() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c | 36 ++++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 8b3120dfc192a4c61f73a0798755713ba2d3eb8a Author: Jiapeng Chong Date: Tue Jul 26 15:25:36 2022 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. smatch warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_hwseq.c:910 dcn32_init_hw() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5640cb8921c9aff1270557482237e06af00c388b Author: Philip Yang Date: Mon Jul 25 07:10:10 2022 -0400 drm/amdkfd: Split giant svm range Giant svm range split to smaller ranges, align the range start address to max svm range pages to improve MMU TLB usage. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 49 ++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 16 deletions(-) commit 4959e609de1ed4199f33124a88a4c9ab95f5cd9a Author: Philip Yang Date: Mon Jul 25 07:06:38 2022 -0400 drm/amdkfd: Set svm range max pages This will be used to split giant svm range into smaller ranges, to support VRAM overcommitment by giant range and improve GPU retry fault recover on giant range. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 2 ++ drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 21 +++++++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_svm.h | 3 +++ 3 files changed, 26 insertions(+) commit 79b2c54f19110235041d8f1250e3c3694047a902 Author: Philip Yang Date: Fri Jul 22 15:07:00 2022 -0400 drm/amdgpu: Allow TTM to evict svm bo from same process To support SVM range VRAM overcommitment, TTM should be able to evict svm bo of same process to system memory, to get space to alloc new svm bo. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 1f83db6be37c53f6d395a41ee2602e3280ee60c2 Author: Roy Sun Date: Wed Jul 20 16:19:50 2022 +0800 drm/amdgpu: Fix the incomplete product number The comments say that the product number is a 16-digit HEX string so the buffer needs to be at least 17 characters to hold the NUL terminator. Expand the buffer size to 20 to avoid the alignment issues. The comment:Product number should only be 16 characters. Any more,and something could be wrong. Cap it at 16 to be safe Signed-off-by: Roy Sun Reviewed-by: André Almeida Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8585732baa40455fbae9575d0c8316f4b0cf68f5 Author: Guchun Chen Date: Mon Jul 25 14:15:09 2022 +0800 drm/amdgpu: use adev_to_drm for consistency Keep code consistency when accessing drm_device from amdgpu driver. Signed-off-by: Guchun Chen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa316247c726d96f0bc205413c54ab49622ca737 Author: wangjianli Date: Sun Jul 24 15:41:50 2022 +0800 drm/amdgpu/dc/dce: fix repeated words in comments Delete the redundant word 'in'. Signed-off-by: wangjianli Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08c1d7a1595e9a7f14d85937c66f02f7ae1733ad Author: Nick Forrington Date: Fri Jun 10 18:44:59 2022 +0100 perf vendor events arm64: Arm Cortex-A78C and X1C Add PMU events for the Arm Cortex-A78C and Arm Cortex-X1C CPUs. Events for Arm Cortex-A78C match those for Arm Cortex-A78. Events for Arm Cortex-X1C match those for Arm Cortex- X1. As such, this is just a mapfile change. Main ID Register (MIDR) and event data is sourced from the corresponding Arm Technical Reference Manuals: Arm Cortex-A78C: https://developer.arm.com/documentation/102226/ Arm Cortex-X1C: https://developer.arm.com/documentation/101968/ Reviewed-by: John Garry Signed-off-by: Nick Forrington Cc: Alexander Shishkin Cc: Andrew Kilroy Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220610174459.615995-1-nick.forrington@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/arm64/mapfile.csv | 2 ++ 1 file changed, 2 insertions(+) commit ebcdbf7a6aa610ed555c94db14256403907432ad Author: Ian Rogers Date: Wed Jul 27 15:08:32 2022 -0700 perf vendor events: Update Intel snowridgex Update to v1.20, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the snowridgex files into perf and update mapfile.csv. Tested on a non-snowridgex with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok This change just updates the version number. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-31-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b47be608b84d6c44f9f26d6be1cc1637d804011 Author: Ian Rogers Date: Wed Jul 27 15:08:31 2022 -0700 perf vendor events: Update Intel westmereex Update to v3, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the westmereex files into perf and update mapfile.csv. This change just aligns whitespace and updates the version number. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-30-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- tools/perf/pmu-events/arch/x86/westmereex/floating-point.json | 2 +- tools/perf/pmu-events/arch/x86/westmereex/frontend.json | 2 +- tools/perf/pmu-events/arch/x86/westmereex/virtual-memory.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 4823edd648c71d8bc38ad796e0c232ccbf541ad5 Author: Ian Rogers Date: Wed Jul 27 15:08:30 2022 -0700 perf vendor events: Update Intel westmereep-sp Update to v3, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the westmereep-sp files into perf and update mapfile.csv. This change just aligns whitespace and updates the version number. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-29-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- tools/perf/pmu-events/arch/x86/westmereep-sp/floating-point.json | 2 +- tools/perf/pmu-events/arch/x86/westmereep-sp/frontend.json | 2 +- tools/perf/pmu-events/arch/x86/westmereep-sp/virtual-memory.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit ae2fa1ccf10e8eda240ce328a4c210ea98b6caa7 Author: Ian Rogers Date: Wed Jul 27 15:08:29 2022 -0700 perf vendor events: Update Intel westmereep-dp Update to v2, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the westmereep-dp files into perf and update mapfile.csv. This change just aligns whitespace. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-28-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/westmereep-dp/cache.json | 2 +- tools/perf/pmu-events/arch/x86/westmereep-dp/floating-point.json | 2 +- tools/perf/pmu-events/arch/x86/westmereep-dp/frontend.json | 2 +- tools/perf/pmu-events/arch/x86/westmereep-dp/memory.json | 2 +- tools/perf/pmu-events/arch/x86/westmereep-dp/virtual-memory.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 5e1dd4f24ab5c8c0d7eee1ff99a4631f177298da Author: Ian Rogers Date: Wed Jul 27 15:08:28 2022 -0700 perf vendor events: Update Intel tigerlake Update to v1.07, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the tigerlake files into perf and update mapfile.csv. Tested on a non-tigerlake with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-27-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- .../perf/pmu-events/arch/x86/tigerlake/cache.json | 48 ++- .../arch/x86/tigerlake/floating-point.json | 2 +- .../pmu-events/arch/x86/tigerlake/frontend.json | 2 +- .../perf/pmu-events/arch/x86/tigerlake/memory.json | 2 +- .../perf/pmu-events/arch/x86/tigerlake/other.json | 1 - .../pmu-events/arch/x86/tigerlake/pipeline.json | 4 +- .../pmu-events/arch/x86/tigerlake/tgl-metrics.json | 378 ++++++++++++++++++--- .../arch/x86/tigerlake/uncore-other.json | 65 ++++ .../arch/x86/tigerlake/virtual-memory.json | 2 +- 10 files changed, 439 insertions(+), 67 deletions(-) commit 59fd7d3225c2eee16a7010cb727b2f723a130822 Author: Ian Rogers Date: Wed Jul 27 15:08:27 2022 -0700 perf vendor events: Update Intel skylakex Update to v1.28, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the skylakex files into perf and update mapfile.csv. Tested with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok 90: perf all metricgroups test : Ok 91: perf all metrics test : Skip 93: perf all PMU test : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-26-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- .../arch/x86/skylakex/floating-point.json | 2 +- .../pmu-events/arch/x86/skylakex/frontend.json | 2 +- tools/perf/pmu-events/arch/x86/skylakex/other.json | 66 +- .../pmu-events/arch/x86/skylakex/pipeline.json | 11 + .../pmu-events/arch/x86/skylakex/skx-metrics.json | 667 +++++++++++++++++-- .../arch/x86/skylakex/uncore-memory.json | 9 + .../pmu-events/arch/x86/skylakex/uncore-other.json | 730 ++++++++++++++++++++- .../arch/x86/skylakex/virtual-memory.json | 2 +- 9 files changed, 1414 insertions(+), 77 deletions(-) commit 35d652770172a41efe2a7a6ebfa75a7883f9b5ea Author: Ian Rogers Date: Wed Jul 27 15:08:26 2022 -0700 perf vendor events: Update Intel skylake Update to v53, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the skylake files into perf and update mapfile.csv. Tested on a non-skylake with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-25-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 3 +- .../arch/x86/skylake/floating-point.json | 2 +- .../perf/pmu-events/arch/x86/skylake/frontend.json | 2 +- tools/perf/pmu-events/arch/x86/skylake/other.json | 2 +- .../pmu-events/arch/x86/skylake/skl-metrics.json | 178 ++++++++++----- .../pmu-events/arch/x86/skylake/uncore-cache.json | 142 ++++++++++++ .../pmu-events/arch/x86/skylake/uncore-other.json | 79 +++++++ tools/perf/pmu-events/arch/x86/skylake/uncore.json | 254 --------------------- .../arch/x86/skylake/virtual-memory.json | 2 +- 9 files changed, 345 insertions(+), 319 deletions(-) commit 89072caf14c0b27f4b0c762c3deef4319bdf4d4a Author: Ian Rogers Date: Wed Jul 27 15:08:25 2022 -0700 perf vendor events: Update Intel silvermont Update to v14, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the silvermont files into perf and update mapfile.csv. Other than aligning whitespace this change just folds the mapfile.csv entries for silvertmont onto one line. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-24-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 4 +--- tools/perf/pmu-events/arch/x86/silvermont/cache.json | 2 +- tools/perf/pmu-events/arch/x86/silvermont/floating-point.json | 2 +- tools/perf/pmu-events/arch/x86/silvermont/frontend.json | 2 +- tools/perf/pmu-events/arch/x86/silvermont/memory.json | 2 +- tools/perf/pmu-events/arch/x86/silvermont/other.json | 2 +- tools/perf/pmu-events/arch/x86/silvermont/pipeline.json | 2 +- tools/perf/pmu-events/arch/x86/silvermont/virtual-memory.json | 2 +- 8 files changed, 8 insertions(+), 10 deletions(-) commit 34122105f9e89e76de510d684fcd0aa5de2ae5b0 Author: Ian Rogers Date: Wed Jul 27 15:08:24 2022 -0700 perf vendor events: Update Intel sapphirerapids Update to v1.04, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the sapphirerapids files into perf and update mapfile.csv. Tested on a non-sapphirerapids with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-23-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- .../pmu-events/arch/x86/sapphirerapids/cache.json | 46 +- .../pmu-events/arch/x86/sapphirerapids/memory.json | 11 + .../pmu-events/arch/x86/sapphirerapids/other.json | 64 ++- .../arch/x86/sapphirerapids/pipeline.json | 18 +- .../arch/x86/sapphirerapids/spr-metrics.json | 566 ++++++++++++++++++++- .../arch/x86/sapphirerapids/uncore-other.json | 9 - 7 files changed, 691 insertions(+), 25 deletions(-) commit 777e1312440f3655f1cefceb4561adafc156a9ce Author: Ian Rogers Date: Wed Jul 27 15:08:23 2022 -0700 perf vendor events: Update Intel sandybridge Update to v17, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the sandybridge files into perf and update mapfile.csv. Tested on a non-sandybridge with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-22-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- tools/perf/pmu-events/arch/x86/sandybridge/cache.json | 2 +- .../perf/pmu-events/arch/x86/sandybridge/floating-point.json | 2 +- tools/perf/pmu-events/arch/x86/sandybridge/frontend.json | 4 ++-- tools/perf/pmu-events/arch/x86/sandybridge/memory.json | 2 +- tools/perf/pmu-events/arch/x86/sandybridge/other.json | 2 +- tools/perf/pmu-events/arch/x86/sandybridge/pipeline.json | 10 +++++----- tools/perf/pmu-events/arch/x86/sandybridge/snb-metrics.json | 11 +++++++++-- tools/perf/pmu-events/arch/x86/sandybridge/uncore-other.json | 2 +- .../perf/pmu-events/arch/x86/sandybridge/virtual-memory.json | 2 +- 10 files changed, 23 insertions(+), 16 deletions(-) commit 8fe33fd5d3a28a3429e0a311089b28a0be06d710 Author: Ian Rogers Date: Wed Jul 27 15:08:22 2022 -0700 perf vendor events: Update Intel nehalemex Update to v3, there are no TMA metrics for nehalemex. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the nehalemex files into perf and update mapfile.csv. Tested on a non-nehalemex with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Note: most of this change is just sorting the keys in the json dictionaries. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-21-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- .../perf/pmu-events/arch/x86/nehalemex/cache.json | 2974 ++++++++++---------- .../arch/x86/nehalemex/floating-point.json | 182 +- .../pmu-events/arch/x86/nehalemex/frontend.json | 20 +- .../perf/pmu-events/arch/x86/nehalemex/memory.json | 672 ++--- .../perf/pmu-events/arch/x86/nehalemex/other.json | 170 +- .../pmu-events/arch/x86/nehalemex/pipeline.json | 830 +++--- .../arch/x86/nehalemex/virtual-memory.json | 92 +- 8 files changed, 2471 insertions(+), 2471 deletions(-) commit bcc344a3bfc8a38e0dd6941c394db3a4d763d81c Author: Ian Rogers Date: Wed Jul 27 15:08:21 2022 -0700 perf vendor events: Update Intel nehalemep Update to v3, the are no TMA metrics for nehalemep. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the nehalemep files into perf and update mapfile.csv. Tested on a non-nehalemep with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-20-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 4 +--- tools/perf/pmu-events/arch/x86/nehalemep/cache.json | 14 +++++++------- .../perf/pmu-events/arch/x86/nehalemep/floating-point.json | 2 +- tools/perf/pmu-events/arch/x86/nehalemep/frontend.json | 2 +- tools/perf/pmu-events/arch/x86/nehalemep/memory.json | 6 +++--- .../perf/pmu-events/arch/x86/nehalemep/virtual-memory.json | 2 +- 6 files changed, 14 insertions(+), 16 deletions(-) commit 1ab4ef06fa82b0e5c54a370073539b3ea6969463 Author: Ian Rogers Date: Wed Jul 27 15:08:20 2022 -0700 perf vendor events: Add Intel meteorlake Events are v1.00, there are no metrics yet. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the events and metrics. Manually copy the meteorlake files into perf and update mapfile.csv. Tested on a non-meteorlake with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-19-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 1 + .../perf/pmu-events/arch/x86/meteorlake/cache.json | 262 +++++++++++++++++++++ .../pmu-events/arch/x86/meteorlake/frontend.json | 24 ++ .../pmu-events/arch/x86/meteorlake/memory.json | 185 +++++++++++++++ .../perf/pmu-events/arch/x86/meteorlake/other.json | 46 ++++ .../pmu-events/arch/x86/meteorlake/pipeline.json | 254 ++++++++++++++++++++ .../arch/x86/meteorlake/virtual-memory.json | 46 ++++ 7 files changed, 818 insertions(+) commit ae7bcd600e1ccfdef2373754587b49bed2fdb487 Author: Ian Rogers Date: Wed Jul 27 15:08:19 2022 -0700 perf vendor events: Update Intel knightslanding Update to v9, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the knightslanding files into perf and update mapfile.csv. Tested on a non-knightslanding with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Note: uncore-memory has become uncore-other as the topic was determined this way in the conversion scripts. For simplicity the scripts naming is maintained. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-18-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/knightslanding/cache.json | 2 +- .../arch/x86/knightslanding/floating-point.json | 2 +- .../arch/x86/knightslanding/frontend.json | 2 +- .../pmu-events/arch/x86/knightslanding/memory.json | 2 +- .../arch/x86/knightslanding/pipeline.json | 2 +- .../arch/x86/knightslanding/uncore-memory.json | 42 - .../arch/x86/knightslanding/uncore-other.json | 3890 ++++++++++++++++++++ .../arch/x86/knightslanding/virtual-memory.json | 2 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 3 +- 9 files changed, 3897 insertions(+), 50 deletions(-) commit 376d8b581b7639c9c41cef8392e68f10aff613e3 Author: Ian Rogers Date: Wed Jul 27 15:08:18 2022 -0700 perf vendor events: Update Intel jaketown Update to v21, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the jaketown files into perf and update mapfile.csv. Tested on a non-jaketown with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-17-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/jaketown/cache.json | 2 +- .../arch/x86/jaketown/floating-point.json | 2 +- .../pmu-events/arch/x86/jaketown/frontend.json | 2 +- .../pmu-events/arch/x86/jaketown/jkt-metrics.json | 11 +- .../perf/pmu-events/arch/x86/jaketown/memory.json | 2 +- tools/perf/pmu-events/arch/x86/jaketown/other.json | 2 +- .../pmu-events/arch/x86/jaketown/pipeline.json | 16 +- .../pmu-events/arch/x86/jaketown/uncore-cache.json | 1960 +++++++++++++++++++- .../arch/x86/jaketown/uncore-interconnect.json | 824 +++++++- .../arch/x86/jaketown/uncore-memory.json | 445 ++++- .../pmu-events/arch/x86/jaketown/uncore-other.json | 1551 ++++++++++++++++ .../pmu-events/arch/x86/jaketown/uncore-power.json | 362 ++-- .../arch/x86/jaketown/virtual-memory.json | 2 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 14 files changed, 4910 insertions(+), 273 deletions(-) commit 6220136831e346152a58b13a5bde14dda1437446 Author: Ian Rogers Date: Wed Jul 27 15:08:17 2022 -0700 perf vendor events: Update Intel ivytown Update to v21, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the ivytown files into perf and update mapfile.csv. Tested on a non-ivytown with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-16-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/ivytown/cache.json | 2 +- .../arch/x86/ivytown/floating-point.json | 2 +- .../perf/pmu-events/arch/x86/ivytown/frontend.json | 2 +- .../pmu-events/arch/x86/ivytown/ivt-metrics.json | 94 +- tools/perf/pmu-events/arch/x86/ivytown/memory.json | 2 +- tools/perf/pmu-events/arch/x86/ivytown/other.json | 2 +- .../pmu-events/arch/x86/ivytown/uncore-cache.json | 3495 +++++++++++++++++++- .../arch/x86/ivytown/uncore-interconnect.json | 1750 +++++++++- .../pmu-events/arch/x86/ivytown/uncore-memory.json | 1775 +++++++++- .../pmu-events/arch/x86/ivytown/uncore-other.json | 2411 ++++++++++++++ .../pmu-events/arch/x86/ivytown/uncore-power.json | 696 +++- .../arch/x86/ivytown/virtual-memory.json | 2 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 13 files changed, 9864 insertions(+), 371 deletions(-) commit 80c14459f6a3686b1e906da7067b51c0cc383967 Author: Ian Rogers Date: Wed Jul 27 15:08:16 2022 -0700 perf vendor events: Update Intel ivybridge Update to v22, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the ivybridge files into perf and update mapfile.csv. Tested on a non-ivybridge with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-15-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/pmu-events/arch/x86/ivybridge/cache.json | 2 +- .../arch/x86/ivybridge/floating-point.json | 2 +- .../pmu-events/arch/x86/ivybridge/frontend.json | 2 +- .../pmu-events/arch/x86/ivybridge/ivb-metrics.json | 94 +++++++++++++++------- .../perf/pmu-events/arch/x86/ivybridge/memory.json | 2 +- .../perf/pmu-events/arch/x86/ivybridge/other.json | 2 +- .../pmu-events/arch/x86/ivybridge/pipeline.json | 4 +- .../arch/x86/ivybridge/uncore-other.json | 2 +- .../arch/x86/ivybridge/virtual-memory.json | 2 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 10 files changed, 75 insertions(+), 39 deletions(-) commit d214d0c2612a3070d21ee6355ca21ba768538fc6 Author: Ian Rogers Date: Wed Jul 27 15:08:15 2022 -0700 perf vendor events: Update Intel icelakex Update to v1.15, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the icelakex files into perf and update mapfile.csv. Tested with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok 90: perf all metricgroups test : Ok 91: perf all metrics test : Skip 93: perf all PMU test : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-14-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/icelakex/cache.json | 28 +- .../arch/x86/icelakex/floating-point.json | 2 +- .../pmu-events/arch/x86/icelakex/frontend.json | 2 +- .../pmu-events/arch/x86/icelakex/icx-metrics.json | 691 +++++++++++++++++++-- .../perf/pmu-events/arch/x86/icelakex/memory.json | 6 +- tools/perf/pmu-events/arch/x86/icelakex/other.json | 51 +- .../pmu-events/arch/x86/icelakex/pipeline.json | 12 + .../arch/x86/icelakex/virtual-memory.json | 2 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 3 +- 9 files changed, 689 insertions(+), 108 deletions(-) commit a4a4353ebf80b9fbb32ea8a38cb2a946930f5a14 Author: Ian Rogers Date: Wed Jul 27 15:08:14 2022 -0700 perf vendor events: Update Intel icelake Update to v1.14, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the icelake files into perf and update mapfile.csv. Tested on a non-icelake with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-13-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/icelake/cache.json | 8 +- .../arch/x86/icelake/floating-point.json | 2 +- .../perf/pmu-events/arch/x86/icelake/frontend.json | 2 +- .../pmu-events/arch/x86/icelake/icl-metrics.json | 126 ++++++++++++++------- .../pmu-events/arch/x86/icelake/uncore-other.json | 31 +++++ .../arch/x86/icelake/virtual-memory.json | 2 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 4 +- 7 files changed, 123 insertions(+), 52 deletions(-) commit 859fe0f4f2be73c1727fffaa4eed1a4e0d16cf5e Author: Ian Rogers Date: Wed Jul 27 15:08:13 2022 -0700 perf vendor events: Update Intel haswellx Update to v25, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the haswellx files into perf and update mapfile.csv. Tested with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok 90: perf all metricgroups test : Ok 91: perf all metrics test : Failed 93: perf all PMU test : Ok The test 91 failure is a pre-existing failure on the test system with the metric Load_Miss_Real_Latency which is fixed by prefixing it with --metric-no-group. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-12-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/haswellx/cache.json | 9 ++- .../pmu-events/arch/x86/haswellx/hsx-metrics.json | 85 +++++++++++++++------- .../pmu-events/arch/x86/haswellx/pipeline.json | 5 -- .../pmu-events/arch/x86/haswellx/uncore-cache.json | 8 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 5 files changed, 67 insertions(+), 42 deletions(-) commit 8e6389f931444f1833baf4778cd1925463d9b7c0 Author: Ian Rogers Date: Wed Jul 27 15:08:12 2022 -0700 perf vendor events: Update Intel haswell Update to v31, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the haswell files into perf and update mapfile.csv. Tested on a non-haswell with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-11-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/haswell/cache.json | 78 ++++++++------------ .../arch/x86/haswell/floating-point.json | 2 +- .../perf/pmu-events/arch/x86/haswell/frontend.json | 2 +- .../pmu-events/arch/x86/haswell/hsw-metrics.json | 85 +++++++++++++++------- tools/perf/pmu-events/arch/x86/haswell/memory.json | 75 +++++++------------ tools/perf/pmu-events/arch/x86/haswell/other.json | 2 +- .../perf/pmu-events/arch/x86/haswell/pipeline.json | 9 +-- .../pmu-events/arch/x86/haswell/uncore-other.json | 7 +- .../arch/x86/haswell/virtual-memory.json | 2 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 4 +- 10 files changed, 125 insertions(+), 141 deletions(-) commit ae54f70dd9d5a962e823a3577271c5dddf046522 Author: Ian Rogers Date: Wed Jul 27 15:08:11 2022 -0700 perf vendor events: Update goldmontplus mapfile.csv Align end of file whitespace with what is generated by: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py Correct the version in mapfile.csv. Event json remains at v1.01, there are no goldmontplus metrics. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-10-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/goldmontplus/cache.json | 2 +- tools/perf/pmu-events/arch/x86/goldmontplus/floating-point.json | 2 +- tools/perf/pmu-events/arch/x86/goldmontplus/frontend.json | 2 +- tools/perf/pmu-events/arch/x86/goldmontplus/memory.json | 2 +- tools/perf/pmu-events/arch/x86/goldmontplus/pipeline.json | 2 +- tools/perf/pmu-events/arch/x86/goldmontplus/virtual-memory.json | 2 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit beb2db9bed367ea28433f4a1088f0be2069529e5 Author: Ian Rogers Date: Wed Jul 27 15:08:10 2022 -0700 perf vendor events: Update goldmont mapfile.csv Align end of file whitespace with what is generated by: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py Modify mapfile.csv to have a missing goldmont cpuid. Event json remains at v13, there are no goldmont metrics. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-9-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/goldmont/cache.json | 2 +- tools/perf/pmu-events/arch/x86/goldmont/floating-point.json | 2 +- tools/perf/pmu-events/arch/x86/goldmont/frontend.json | 2 +- tools/perf/pmu-events/arch/x86/goldmont/memory.json | 2 +- tools/perf/pmu-events/arch/x86/goldmont/pipeline.json | 2 +- tools/perf/pmu-events/arch/x86/goldmont/virtual-memory.json | 2 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit 3c9c31571105fcc1844b813743b676aaf63c9077 Author: Ian Rogers Date: Wed Jul 27 15:08:09 2022 -0700 perf vendor events: Update Intel elkhartlake Update to v1.03. Elkhartlake metrics aren't in TMA but basic metrics are left unchanged. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the elkhartlake files into perf and update mapfile.csv. Tested on a non-elkhartlake with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/elkhartlake/cache.json | 956 ++++++++++++++++++++- .../arch/x86/elkhartlake/floating-point.json | 19 +- .../pmu-events/arch/x86/elkhartlake/frontend.json | 34 +- .../pmu-events/arch/x86/elkhartlake/memory.json | 388 ++++++++- .../pmu-events/arch/x86/elkhartlake/other.json | 527 +++++++++++- .../pmu-events/arch/x86/elkhartlake/pipeline.json | 203 ++++- .../arch/x86/elkhartlake/virtual-memory.json | 151 +++- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 8 files changed, 2150 insertions(+), 130 deletions(-) commit 4c392516accfe51a1aaf80ed163517646f8f0476 Author: Maíra Canal Date: Wed Jul 20 15:57:19 2022 -0300 Documentation: KUnit: Fix example with compilation error The Parameterized Testing example contains a compilation error, as the signature for the description helper function is void(*)(const struct sha1_test_case *, char *), and the struct is non-const. This is warned by Clang: error: initialization of ‘void (*)(struct sha1_test_case *, char *)’ from incompatible pointer type ‘void (*)(const struct sha1_test_case *, char *)’ [-Werror=incompatible-pointer-types] 33 | KUNIT_ARRAY_PARAM(sha1, cases, case_to_desc); | ^~~~~~~~~~~~ ../include/kunit/test.h:1339:70: note: in definition of macro ‘KUNIT_ARRAY_PARAM’ 1339 | void (*__get_desc)(typeof(__next), char *) = get_desc; \ Signed-off-by: Maíra Canal Reviewed-by: Daniel Latypov Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan Documentation/dev-tools/kunit/usage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9d45862eca393ee2beb9e09db13bcb08f9588fc Author: Ian Rogers Date: Wed Jul 27 15:08:08 2022 -0700 perf vendor events: Update Intel cascadelakex Update to v1.16, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the cascadelakex files into perf and update mapfile.csv. Tested with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok 90: perf all metricgroups test : Ok 91: perf all metrics test : Skip 93: perf all PMU test : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/cascadelakex/cache.json | 8 +- .../arch/x86/cascadelakex/clx-metrics.json | 724 +++++++++++++++++++-- .../arch/x86/cascadelakex/floating-point.json | 2 +- .../pmu-events/arch/x86/cascadelakex/frontend.json | 2 +- .../pmu-events/arch/x86/cascadelakex/other.json | 63 ++ .../pmu-events/arch/x86/cascadelakex/pipeline.json | 11 + .../arch/x86/cascadelakex/uncore-memory.json | 9 + .../arch/x86/cascadelakex/uncore-other.json | 697 +++++++++++++++++++- .../arch/x86/cascadelakex/virtual-memory.json | 2 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 10 files changed, 1439 insertions(+), 81 deletions(-) commit 9709ede1a179b29129c51c683c8375db6a1262b5 Author: Ian Rogers Date: Wed Jul 27 15:08:07 2022 -0700 perf vendor events: Update bonnell mapfile.csv Align end of file whitespace with what is generated by: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py Fold the mapfile.csv entries together with a more complex regular expression. This will reduce the pmu-events.c table size. The files following this change are still at v4. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/bonnell/cache.json | 2 +- tools/perf/pmu-events/arch/x86/bonnell/floating-point.json | 2 +- tools/perf/pmu-events/arch/x86/bonnell/frontend.json | 2 +- tools/perf/pmu-events/arch/x86/bonnell/memory.json | 2 +- tools/perf/pmu-events/arch/x86/bonnell/other.json | 2 +- tools/perf/pmu-events/arch/x86/bonnell/pipeline.json | 2 +- tools/perf/pmu-events/arch/x86/bonnell/virtual-memory.json | 2 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 6 +----- 8 files changed, 8 insertions(+), 12 deletions(-) commit a95ab294a50847ce75c8feb4530843795bba96fa Author: Ian Rogers Date: Wed Jul 27 15:08:06 2022 -0700 perf vendor events: Update Intel alderlake Update to v1.13, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the alderlake files into perf and update mapfile.csv. Tested on a non-alderlake with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/alderlake/adl-metrics.json | 4 +- .../perf/pmu-events/arch/x86/alderlake/cache.json | 33 ++- .../perf/pmu-events/arch/x86/alderlake/other.json | 54 ++++ .../pmu-events/arch/x86/alderlake/pipeline.json | 285 ++++++++++++++++++++- .../arch/x86/alderlake/uncore-other.json | 2 +- .../arch/x86/alderlake/virtual-memory.json | 36 +++ tools/perf/pmu-events/arch/x86/mapfile.csv | 3 +- 7 files changed, 398 insertions(+), 19 deletions(-) commit ef908a192512bf45b542672973c2a2fffa13e2f2 Author: Ian Rogers Date: Wed Jul 27 15:08:05 2022 -0700 perf vendor events: Update Intel broadwellde Update to v7, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the broadwellde files into perf and update mapfile.csv. Tested on a non-broadwellde with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/broadwellde/bdwde-metrics.json | 136 +- .../pmu-events/arch/x86/broadwellde/cache.json | 2 +- .../arch/x86/broadwellde/floating-point.json | 2 +- .../pmu-events/arch/x86/broadwellde/frontend.json | 2 +- .../pmu-events/arch/x86/broadwellde/memory.json | 2 +- .../pmu-events/arch/x86/broadwellde/other.json | 2 +- .../pmu-events/arch/x86/broadwellde/pipeline.json | 2 +- .../arch/x86/broadwellde/uncore-cache.json | 3818 +++++++++++++++++++- .../arch/x86/broadwellde/uncore-memory.json | 2867 ++++++++++++++- .../arch/x86/broadwellde/uncore-power.json | 492 ++- .../arch/x86/broadwellde/virtual-memory.json | 2 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 12 files changed, 7062 insertions(+), 267 deletions(-) commit 1775634ea406af3befaa8d4e0dc5b245f8cb8fe1 Author: Ian Rogers Date: Wed Jul 27 15:08:04 2022 -0700 perf vendor events: Update Intel broadwell Update to v26, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the broadwell files into perf and update mapfile.csv. Tested on a non-broadwell with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/broadwell/bdw-metrics.json | 130 +- .../perf/pmu-events/arch/x86/broadwell/cache.json | 2 +- .../arch/x86/broadwell/floating-point.json | 2 +- .../pmu-events/arch/x86/broadwell/frontend.json | 2 +- .../perf/pmu-events/arch/x86/broadwell/memory.json | 2 +- .../perf/pmu-events/arch/x86/broadwell/other.json | 2 +- .../pmu-events/arch/x86/broadwell/pipeline.json | 2 +- .../arch/x86/broadwell/uncore-cache.json | 152 +++ .../arch/x86/broadwell/uncore-other.json | 82 ++ .../perf/pmu-events/arch/x86/broadwell/uncore.json | 278 ----- .../arch/x86/broadwell/virtual-memory.json | 2 +- .../arch/x86/broadwellde/uncore-other.json | 1246 ++++++++++++++++++++ tools/perf/pmu-events/arch/x86/mapfile.csv | 3 +- 13 files changed, 1571 insertions(+), 334 deletions(-) commit 4266081e33082f029c4d03c9412ea0674f00ded4 Author: Ian Rogers Date: Wed Jul 27 15:08:03 2022 -0700 perf vendor events: Update Intel broadwellx Update to v19, the metrics are based on TMA 4.4 full. Use script at: https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py to download and generate the latest events and metrics. Manually copy the broadwellx files into perf and update mapfile.csv. Tested with 'perf test': 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 : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok 90: perf all metricgroups test : Ok 91: perf all metrics test : Skip 93: perf all PMU test : Ok Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220727220832.2865794-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/broadwellx/bdx-metrics.json | 570 +++++++++++++++++++-- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 2 files changed, 518 insertions(+), 54 deletions(-) commit 6dd71251b9aeedd540fd7003bc5f73d59dd6dcb2 Author: Xin Gao Date: Fri Jul 22 10:23:37 2022 +0800 platform/x86: pmc_atom: Fix comment typo The double `of' is duplicated in line 50, remove one. Signed-off-by: Xin Gao Link: https://lore.kernel.org/r/20220722022337.15903-1-gaoxin@cdjrlc.com Signed-off-by: Hans de Goede include/linux/platform_data/x86/pmc_atom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44ece4e1a3ecb07fd757699ffc2483463a202965 Author: Maciej Fijalkowski Date: Thu Jul 7 12:16:51 2022 +0200 ice: allow toggling loopback mode via ndo_set_features callback Add support for NETIF_F_LOOPBACK. This feature can be set via: $ ethtool -K eth0 loopback Feature can be useful for local data path tests. Acked-by: Jakub Kicinski Acked-by: John Fastabend Signed-off-by: Maciej Fijalkowski Tested-by: George Kuruvinakunnel Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_main.c | 32 ++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) commit c67672fa26959b5b636c149634e69491a4d64206 Author: Maciej Fijalkowski Date: Thu Jul 7 12:16:50 2022 +0200 ice: compress branches in ice_set_features() Instead of rather verbose comparison of current netdev->features bits vs the incoming ones from user, let us compress them by a helper features set that will be the result of netdev->features XOR features. This way, current, extensive branches: if (features & NETIF_F_BIT && !(netdev->features & NETIF_F_BIT)) set_feature(true); else if (!(features & NETIF_F_BIT) && netdev->features & NETIF_F_BIT) set_feature(false); can become: netdev_features_t changed = netdev->features ^ features; if (changed & NETIF_F_BIT) set_feature(!!(features & NETIF_F_BIT)); This is nothing new as currently several other drivers use this approach, which I find much more convenient. Acked-by: John Fastabend Signed-off-by: Maciej Fijalkowski Tested-by: George Kuruvinakunnel Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_main.c | 40 +++++++++++++++---------------- 1 file changed, 19 insertions(+), 21 deletions(-) commit a419526de6079e4b8a001bcbb8ac7370ba581963 Author: Michal Wilczynski Date: Mon Jul 4 15:12:27 2022 +0200 ice: Fix promiscuous mode not turning off When trust is turned off for the VF, the expectation is that promiscuous and allmulticast filters are removed. Currently default VSI filter is not getting cleared in this flow. Example: ip link set enp236s0f0 vf 0 trust on ip link set enp236s0f0v0 promisc on ip link set enp236s0f0 vf 0 trust off /* promiscuous mode is still enabled on VF0 */ Remove switch filters for both cases. This commit fixes above behavior by removing default VSI filters and allmulticast filters when vf-true-promisc-support is OFF. Signed-off-by: Michal Wilczynski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_vf_lib.c | 79 +++++++++++++++++++++++---- drivers/net/ethernet/intel/ice/ice_vf_lib.h | 3 + drivers/net/ethernet/intel/ice/ice_virtchnl.c | 9 +-- 3 files changed, 72 insertions(+), 19 deletions(-) commit d7393425e7c8819ac4a6dbc03f061954665f62ee Author: Michal Wilczynski Date: Mon Jul 4 15:12:26 2022 +0200 ice: Introduce enabling promiscuous mode on multiple VF's In current implementation default VSI switch filter is only able to forward traffic to a single VSI. This limits promiscuous mode with private flag 'vf-true-promisc-support' to a single VF. Enabling it on the second VF won't work. Also allmulticast support doesn't seem to be properly implemented when vf-true-promisc-support is true. Use standard ice_add_rule_internal() function that already implements forwarding to multiple VSI's instead of constructing AQ call manually. Add switch filter for allmulticast mode when vf-true-promisc-support is enabled. The same filter is added regardless of the flag - it doesn't matter for this case. Remove unnecessary fields in switch structure. From now on book keeping will be done by ice_add_rule_internal(). Refactor unnecessarily passed function arguments. To test: 1) Create 2 VM's, and two VF's. Attach VF's to VM's. 2) Enable promiscuous mode on both of them and check if traffic is seen on both of them. Signed-off-by: Michal Wilczynski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice.h | 2 - drivers/net/ethernet/intel/ice/ice_eswitch.c | 8 +- drivers/net/ethernet/intel/ice/ice_ethtool.c | 2 +- drivers/net/ethernet/intel/ice/ice_lib.c | 67 +++++-------- drivers/net/ethernet/intel/ice/ice_lib.h | 11 +-- drivers/net/ethernet/intel/ice/ice_main.c | 14 +-- drivers/net/ethernet/intel/ice/ice_switch.c | 136 ++++++++++++++------------ drivers/net/ethernet/intel/ice/ice_switch.h | 8 +- drivers/net/ethernet/intel/ice/ice_type.h | 4 - drivers/net/ethernet/intel/ice/ice_vf_lib.c | 10 +- drivers/net/ethernet/intel/ice/ice_vf_lib.h | 4 +- drivers/net/ethernet/intel/ice/ice_virtchnl.c | 58 ++++++----- 12 files changed, 155 insertions(+), 169 deletions(-) commit e6abe8ff8e0c4fa905567775f48e102005ae960b Author: Maximilian Luz Date: Thu Jul 21 14:11:20 2022 +0200 platform/surface: gpe: Add support for 13" Intel version of Surface Laptop 4 The 13" Intel version of the Surface Laptop 4 uses the same GPE as the Surface Laptop Studio for wakeups via the lid. Set it up accordingly. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220721121120.2002430-1-luzmaximilian@gmail.com Signed-off-by: Hans de Goede drivers/platform/surface/surface_gpe.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 40ec787e1adf302c11668d4cc69838f4d584187d Author: Dan Carpenter Date: Wed Jul 20 21:23:38 2022 +0300 platform/olpc: Fix uninitialized data in debugfs write The call to: size = simple_write_to_buffer(cmdbuf, sizeof(cmdbuf), ppos, buf, size); will succeed if at least one byte is written to the "cmdbuf" buffer. The "*ppos" value controls which byte is written. Another problem is that this code does not check for errors so it's possible for the entire buffer to be uninitialized. Inintialize the struct to zero to prevent reading uninitialized stack data. Debugfs is normally only writable by root so the impact of this bug is very minimal. Fixes: 6cca83d498bd ("Platform: OLPC: move debugfs support from x86 EC driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YthIKn+TfZSZMEcM@kili Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/olpc/olpc-ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3afe697b74bc6c59f0b9a9c89d5b163db56fd4b1 Author: Len Brown Date: Thu Jul 28 14:38:55 2022 -0400 tools/power turbostat: version 2022.07.28 update version number Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4b830a34d8046633231b7fe87f6f2cb6240dc9f Author: Vadim Pasternak Date: Tue Jul 19 18:35:40 2022 +0300 platform/mellanox: mlxreg-lc: Fix error flow and extend verbosity Fix error flow: - Clean-up client object in case of probing failure. - Prevent running remove routine in case of probing failure. Probing and removing are invoked by hotplug events raised upon line card insertion and removing. If probing procedure failed all data is cleared and there is nothing to do in remove routine. Fixes: 62f9529b8d5c ("platform/mellanox: mlxreg-lc: Add initial support for Nvidia line card devices") Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20220719153540.61304-1-vadimp@nvidia.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/mellanox/mlxreg-lc.c | 82 +++++++++++++++++++++++++++-------- 1 file changed, 63 insertions(+), 19 deletions(-) commit 6287e6f0fdd36be4bbde6f539df6ea85eb2476c2 Author: Artem Bityutskiy Date: Tue Jul 26 18:29:35 2022 +0300 tools/power turbostat: do not decode ACC for ICX and SPR The ACC (automatic C-state conversion) feature was available on Sky Lake and Cascade Lake Xeons (SKX and CLX), but it is not available on Ice Lake and Sapphire Rapids Xeons (ICX and SPR). Therefore, stop decoding it for ICX and SPR. Signed-off-by: Artem Bityutskiy Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 -- 1 file changed, 2 deletions(-) commit 0e4d42af81471ab801e059e1feac8e27547230cf Author: Artem Bityutskiy Date: Tue Jul 26 18:29:34 2022 +0300 tools/power turbostat: fix SPR PC6 limits Sapphire Rapids Xeon (SPR) supports 2 flavors of PC6 - PC6N (non-retention) and PC6R (retention). Before this patch we used ICX package C-state limits, which was wrong, because ICX has only one PC6 flavor. With this patch, we use SKX PC6 limits for SPR, because they are the same. Signed-off-by: Artem Bityutskiy Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eade39b2bf7f35294a814e62e2f5d8117615f18b Author: Artem Bityutskiy Date: Tue Jul 26 18:29:33 2022 +0300 tools/power turbostat: cleanup 'automatic_cstate_conversion_probe()' The 'automatic_cstate_conversion_probe()' function has a too long 'if' statement, convert it to a 'switch' statement in order to improve code readability a bit. Signed-off-by: Artem Bityutskiy Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 684e40e99e594e0da1dc1b358fbd51c03c606e75 Author: Artem Bityutskiy Date: Tue Jul 26 18:29:32 2022 +0300 tools/power turbostat: separate SPR from ICX Before this patch, SPR platform was considered identical to ICX platform. This patch separates SPR support from ICX. This patch is a preparation for adding SPR-specific package C-state limits support. Signed-off-by: Artem Bityutskiy Reviewed-by: Chen Yu Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) commit 2db0e5eb9c4843cde76bb118750369ef231254e8 Author: Jiang Jian Date: Tue Jun 21 16:16:17 2022 +0800 tools/power turbosstat: fix comment remove duplicate "the" in comment Signed-off-by: Jiang Jian Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f9cf553deb84ca5d390dfe7b23022fecbd838df Author: George D Sworo Date: Wed Jun 1 14:49:23 2022 -0700 tools/power turbostat: Support RAPTORLAKE P Add initial support for Raptorlake model Signed-off-by: George D Sworo Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 1 + 1 file changed, 1 insertion(+) commit c9d959fc32a5f9312282817052d8986614f2dc08 Author: Hans de Goede Date: Thu Jul 28 20:06:35 2022 +0200 platform/x86: pmc_atom: Match all Lex BayTrail boards with critclk_systems DMI table The critclk_systems[] DMI match table already contains 2 Lex BayTrail boards and patches were just submitted to add 3 more entries for the following models: 3I380NX, 3I380A, 3I380CW. Looking at: https://www.lex.com.tw/products/embedded-ipc-board/ we can see that Lex BayTrail makes many embedded boards with multiple ethernet boards and none of their products are battery powered so we don't need to worry (too much) about power consumption when suspended. Add a new DMI match which simply matches all Lex BayTrail boards and drop the 2 existing board specific quirks. Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL") Reported-by: Michael Schöne Reported-by: Paul Spooren Reported-by: Matwey V. Kornilov Signed-off-by: Hans de Goede drivers/platform/x86/pmc_atom.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 1c1313b50af7300865bcfa5b805122f06aa95422 Author: Zhang Rui Date: Fri May 13 13:02:29 2022 +0800 tools/power turbostat: add support for ALDERLAKE_N Add support for ALDERLAKE_N platform. Signed-off-by: Zhang Rui Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 1 + 1 file changed, 1 insertion(+) commit 4af184ee8b2c0a69a038483ba605510203bf015b Author: Len Brown Date: Tue May 31 17:29:13 2022 -1000 tools/power turbostat: dump secondary Turbo-Ratio-Limit Intel Performance Hybrid processors have a 2nd MSR describing the turbo limits enforced on the Ecores. Note, TRL and Secondary-TRL are usually R/O information, but on overclock-capable parts, they can be written. Signed-off-by: Len Brown arch/x86/include/asm/msr-index.h | 1 + tools/power/x86/turbostat/turbostat.c | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) commit 5d6228452c008d1186e8d6a5ef3079e608e7a888 Author: Len Brown Date: Tue May 31 17:21:06 2022 -1000 tools/power turbostat: simplify dump_turbo_ratio_limits() code cleanup only. no functional change. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 55 ++++++----------------------------- 1 file changed, 9 insertions(+), 46 deletions(-) commit 774627c59848844e4bc46bb45a0d13e3a1b723e9 Author: Len Brown Date: Tue May 31 17:08:25 2022 -1000 tools/power turbostat: dump CPUID.7.EDX.Hybrid CPUID leaf 7 EDX now tells us if the processor has hybrid CPUs Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 7535249d10a889577b5d344e0bd52c28716a6e2f Author: Len Brown Date: Thu May 12 21:35:39 2022 -1000 tools/power turbostat: update turbostat.8 Update turbostat.8 to reflect new uncore frequency output (UncMHz) Also, refresh examples. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.8 | 200 +++++++++++++++++++++------------- 1 file changed, 124 insertions(+), 76 deletions(-) commit a5c6d65d06ebd09251fc3ff43f600d4d70966a4d Author: Len Brown Date: Thu May 12 21:35:39 2022 -1000 tools/power turbostat: Show uncore frequency When CONFIG_INTEL_UNCORE_FREQ_CONTROL is effective, (Linux 5.9 and later), print the current (and default) min and max uncore frequency limits. When that driver provides the current uncore frequency (Linux 5.18 and later), print a UncMHz column reflecting the current uncore frequency. Note that UncMHz is an instantaneous sample, not an average. eg. $ sudo ./turbostat -S --show frequency ... Uncore Frequency pkg0 die0: 800 - 3900 MHz (800 - 3900 MHz) ... Avg_MHz Busy% Bzy_MHz TSC_MHz UncMHz 28 0.70 4049 3095 3900 Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 89 ++++++++++++++++++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) commit 5e5fd36c58d6c820f7292ee492c3731c9a104a41 Author: Colin Ian King Date: Tue Apr 26 14:16:07 2022 +0100 tools/power turbostat: Fix file pointer leak Currently if a fscanf fails then an early return leaks an open file pointer. Fix this by fclosing the file before the return. Detected using static analysis with cppcheck: tools/power/x86/turbostat/turbostat.c:2039:3: error: Resource leak: fp [resourceLeak] Fixes: eae97e053fe3 ("tools/power turbostat: Support thermal throttle count print") Signed-off-by: Colin Ian King Acked-by: Chen Yu Reviewed-by: Tom Rix Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e13da9a1dbe4c97431286660ec35eceb50003bb3 Author: Colin Ian King Date: Tue Apr 26 14:10:24 2022 +0100 tools/power turbostat: replace strncmp with single character compare Using strncmp for a single character comparison is overly complicated, just use a simpler single character comparison instead. Also stops static analyzers (such as cppcheck) from complaining about strncmp on non-null terminated strings. Signed-off-by: Colin Ian King Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 033312336d67a2ca9b5ff4ad35e5dfd99042d2a3 Author: Chen Yu Date: Thu Apr 21 22:38:34 2022 +0800 tools/power turbostat: print the kernel boot commandline It would be handy to have cmdline in turbostat output. For example, according to the turbostat output, there are no C-states requested. In this case the user is very curious if something like intel_idle.max_cstate=0 was used, or may be idle=none too. It is also curious whether things like intel_pstate=nohwp were used. Print the boot command line accordingly: turbostat version 21.05.04 - Len Brown Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.16.0+ root=UUID= b42359ed-1e05-42eb-8757-6bf2a1c19070 ro quiet splash vt.handoff=7 Suggested-by: Artem Bityutskiy Signed-off-by: Chen Yu Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit fb5e29df8d15a131a02a4e04bbd9df8450eecc7d Author: Zhang Rui Date: Thu Apr 21 22:19:08 2022 +0800 tools/power turbostat: Introduce support for RaptorLake RaptorLake is compatible with AlderLake. Signed-off-by: Zhang Rui Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 1 + 1 file changed, 1 insertion(+) commit d8fae2504efee73958cbbf9c7122f13f95495222 Author: Jacob Keller Date: Thu Jul 21 14:30:01 2022 -0700 igb: convert .adjfreq to .adjfine The 82576 PTP implementation still uses .adjfreq instead of using the newer .adjfine. This implementation uses a pre-simplified calculation since the base increment value for the 82576 is just 16 * 2^19. Converting this into scaled_ppm is tricky, and makes the intent a bit less clear. Simply convert to the normal flow of multiplying the base increment value by the scaled_ppm and then dividing by 1000000ULL << 16. This can be implemented using mul_u64_u64_div_u64 which can avoid the possible overflow that might occur for large adjustments. Use of .adjfine can improve the precision of small adjustments and gets us one driver closer to removing the old implementation from the kernel entirely. Signed-off-by: Jacob Keller Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igb/igb_ptp.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 7edc3a68038ab151a8791ddb6217755a5e4a5809 Author: Kai Huang Date: Thu Jul 28 15:04:52 2022 +1200 KVM, x86/mmu: Fix the comment around kvm_tdp_mmu_zap_leafs() Now kvm_tdp_mmu_zap_leafs() only zaps leaf SPTEs but not any non-root pages within that GFN range anymore, so the comment around it isn't right. Fix it by shifting the comment from tdp_mmu_zap_leafs() instead of duplicating it, as tdp_mmu_zap_leafs() is static and is only called by kvm_tdp_mmu_zap_leafs(). Opportunistically tweak the blurb about SPTEs being cleared to (a) say "zapped" instead of "cleared" because "cleared" will be wrong if/when KVM allows a non-zero value for non-present SPTE (i.e. for Intel TDX), and (b) to clarify that a flush is needed if and only if a SPTE has been zapped since MMU lock was last acquired. Fixes: f47e5bbbc92f ("KVM: x86/mmu: Zap only TDP MMU leafs in zap range and mmu_notifier unmap") Suggested-by: Sean Christopherson Reviewed-by: Sean Christopherson Signed-off-by: Kai Huang Message-Id: <20220728030452.484261-1-kai.huang@intel.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/tdp_mmu.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 6fac42f127b8e8464b8c13036dfed825981881d9 Author: Jarkko Sakkinen Date: Thu Jul 28 08:09:19 2022 +0300 KVM: SVM: Dump Virtual Machine Save Area (VMSA) to klog As Virtual Machine Save Area (VMSA) is essential in troubleshooting attestation, dump it to the klog with the KERN_DEBUG level of priority. Cc: Jarkko Sakkinen Suggested-by: Harald Hoyer Signed-off-by: Jarkko Sakkinen Message-Id: <20220728050919.24113-1-jarkko@profian.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/sev.c | 3 +++ 1 file changed, 3 insertions(+) commit 5a5542324a4af2e161bb8709d330fab7d895cd6e Author: Jacob Keller Date: Thu Jul 21 14:30:00 2022 -0700 ixgbe: convert .adjfreq to .adjfine Convert the ixgbe PTP frequency adjustment implementations from .adjfreq to .adjfine. This allows using the scaled parts per million adjustment from the PTP core and results in a more precise adjustment for small corrections. To avoid overflow, use mul_u64_u64_div_u64 to perform the calculation. On X86 platforms, this will use instructions that perform the operations with 128bit intermediate values. For other architectures, the implementation will limit the loss of precision as much as possible. This change slightly improves the precision of frequency adjustments for all ixgbe based devices, and gets us one driver closer to being able to remove the older .adjfreq implementation from the kernel. Signed-off-by: Jacob Keller Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 73 +++++++++++++++------------- 1 file changed, 40 insertions(+), 33 deletions(-) commit ccd3bf98592117f59be2daa0f2ca00f352d7abbc Author: Jacob Keller Date: Thu Jul 21 14:29:59 2022 -0700 i40e: convert .adjfreq to .adjfine The i40e driver currently implements the .adjfreq handler for frequency adjustments. This takes the adjustment parameter in parts per billion. The PTP core supports .adjfine which provides an adjustment in scaled parts per million. This has a higher resolution and can result in more precise adjustments for small corrections. Convert the existing .adjfreq implementation to the newer .adjfine implementation. This is trivial since it just requires changing the divisor from 1000000000ULL to (1000000ULL << 16) in the mul_u64_u64_div_u64 call. This improves the precision of the adjustments and gets us one driver closer to removing the old .adjfreq support from the kernel. Signed-off-by: Jacob Keller Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e_ptp.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 3626a690b717c18a969274e1fe000f8885d5afad Author: Jacob Keller Date: Thu Jul 21 14:29:58 2022 -0700 i40e: use mul_u64_u64_div_u64 for PTP frequency calculation The i40e device has a different clock rate depending on the current link speed. This requires using a different increment rate for the PTP clock registers. For slower link speeds, the base increment value is larger. Directly multiplying the larger increment value by the parts per billion adjustment might overflow. To avoid this, the i40e implementation defaults to using the lower increment value and then multiplying the adjustment afterwards. This causes a loss of precision for lower link speeds. We can fix this by using mul_u64_u64_div_u64 instead of performing the multiplications using standard C operations. On X86, this will use special instructions that perform the multiplication and division with 128bit intermediate values. For other architectures, the fallback implementation will limit the loss of precision for large values. Small adjustments don't overflow anyways and won't lose precision at all. This allows first multiplying the base increment value and then performing the adjustment calculation, since we no longer fear overflowing. It also makes it easier to convert to the even more precise .adjfine implementation in a following change. Signed-off-by: Jacob Keller Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e_ptp.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit abab010f16378c73e14257573bbcbad4378e80c3 Author: Jacob Keller Date: Thu Jul 21 14:29:57 2022 -0700 e1000e: convert .adjfreq to .adjfine The PTP implementation for the e1000e driver uses the older .adjfreq method. This method takes an adjustment in parts per billion. The newer .adjfine implementation uses scaled_ppm. The use of scaled_ppm allows for finer grained adjustments and is preferred over using the older implementation. Make use of mul_u64_u64_div_u64 in order to handle possible overflow of the multiplication used to calculate the desired adjustment to the hardware increment value. Signed-off-by: Jacob Keller Tested-by: Naama Meir Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/e1000e/e1000.h | 2 +- drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++-- drivers/net/ethernet/intel/e1000e/ptp.c | 15 ++++++++------- 3 files changed, 11 insertions(+), 10 deletions(-) commit ab8e8db27e829bc7077c4db36ed9e3e0c5daeae8 Author: Jacob Keller Date: Thu Jul 21 14:29:56 2022 -0700 e1000e: remove unnecessary range check in e1000e_phc_adjfreq The e1000e_phc_adjfreq function validates that the input delta is within the maximum range. This is already handled by the core PTP code and this is a duplicate and thus unnecessary check. It also complicates refactoring to use the newer .adjfine implementation, where the input is no longer specified in parts per billion. Remove the range validation check. Signed-off-by: Jacob Keller Tested-by: Naama Meir Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/e1000e/ptp.c | 3 --- 1 file changed, 3 deletions(-) commit 4488df1401522cd263166ef8799d56661baf83b0 Author: Jacob Keller Date: Thu Jul 21 14:29:54 2022 -0700 ice: implement adjfine with mul_u64_u64_div_u64 The PTP frequency adjustment code needs to determine an appropriate adjustment given an input scaled_ppm adjustment. We calculate the adjustment to the register by multiplying the base (nominal) increment value by the scaled_ppm and then dividing by the scaled one million value. For very large adjustments, this might overflow. To avoid this, both the scaled_ppm and divisor values are downshifted. We can avoid that on X86 architectures by using mul_u64_u64_div_u64. This helper function will perform the multiplication and division with 128bit intermediate values. We know that scaled_ppm is never larger than the divisor so this operation will never result in an overflow. This improves the accuracy of the calculations for large adjustment values on X86. It is likely an improvement on other architectures as well because the default implementation of mul_u64_u64_div_u64 is smarter than the original approach taken in the ice code. Additionally, this implementation is easier to read, using fewer local variables and lines of code to implement. Signed-off-by: Jacob Keller Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 6c6ab524cfae0799e55c82b2c1d61f1af0156f8d Author: Sean Christopherson Date: Sat Jul 23 01:30:29 2022 +0000 KVM: x86/mmu: Treat NX as a valid SPTE bit for NPT Treat the NX bit as valid when using NPT, as KVM will set the NX bit when the NX huge page mitigation is enabled (mindblowing) and trigger the WARN that fires on reserved SPTE bits being set. KVM has required NX support for SVM since commit b26a71a1a5b9 ("KVM: SVM: Refuse to load kvm_amd if NX support is not available") for exactly this reason, but apparently it never occurred to anyone to actually test NPT with the mitigation enabled. ------------[ cut here ]------------ spte = 0x800000018a600ee7, level = 2, rsvd bits = 0x800f0000001fe000 WARNING: CPU: 152 PID: 15966 at arch/x86/kvm/mmu/spte.c:215 make_spte+0x327/0x340 [kvm] Hardware name: Google, Inc. Arcadia_IT_80/Arcadia_IT_80, BIOS 10.48.0 01/27/2022 RIP: 0010:make_spte+0x327/0x340 [kvm] Call Trace: tdp_mmu_map_handle_target_level+0xc3/0x230 [kvm] kvm_tdp_mmu_map+0x343/0x3b0 [kvm] direct_page_fault+0x1ae/0x2a0 [kvm] kvm_tdp_page_fault+0x7d/0x90 [kvm] kvm_mmu_page_fault+0xfb/0x2e0 [kvm] npf_interception+0x55/0x90 [kvm_amd] svm_invoke_exit_handler+0x31/0xf0 [kvm_amd] svm_handle_exit+0xf6/0x1d0 [kvm_amd] vcpu_enter_guest+0xb6d/0xee0 [kvm] ? kvm_pmu_trigger_event+0x6d/0x230 [kvm] vcpu_run+0x65/0x2c0 [kvm] kvm_arch_vcpu_ioctl_run+0x355/0x610 [kvm] kvm_vcpu_ioctl+0x551/0x610 [kvm] __se_sys_ioctl+0x77/0xc0 __x64_sys_ioctl+0x1d/0x20 do_syscall_64+0x44/0xa0 entry_SYSCALL_64_after_hwframe+0x46/0xb0 ---[ end trace 0000000000000000 ]--- Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20220723013029.1753623-1-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bd9dfec9fd419920572b057e2c98d9877190b06 Author: Suravee Suthikulpanit Date: Mon Jul 25 00:33:56 2022 -0500 KVM: x86: Do not block APIC write for non ICR registers The commit 5413bcba7ed5 ("KVM: x86: Add support for vICR APIC-write VM-Exits in x2APIC mode") introduces logic to prevent APIC write for offset other than ICR in kvm_apic_write_nodecode() function. This breaks x2AVIC support, which requires KVM to trap and emulate x2APIC MSR writes. Therefore, removes the warning and modify to logic to allow MSR write. Fixes: 5413bcba7ed5 ("KVM: x86: Add support for vICR APIC-write VM-Exits in x2APIC mode") Cc: Zeng Guang Suggested-by: Sean Christopherson Signed-off-by: Suravee Suthikulpanit Message-Id: <20220725053356.4275-1-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 0a8735a6acf36ac35499563dc44f3e3d5034a2ce Author: Suravee Suthikulpanit Date: Sun Jul 24 22:34:28 2022 -0500 KVM: SVM: Do not virtualize MSR accesses for APIC LVTT register AMD does not support APIC TSC-deadline timer mode. AVIC hardware will generate GP fault when guest kernel writes 1 to bits [18] of the APIC LVTT register (offset 0x32) to set the timer mode. (Note: bit 18 is reserved on AMD system). Therefore, always intercept and let KVM emulate the MSR accesses. Fixes: f3d7c8aa6882 ("KVM: SVM: Fix x2APIC MSRs interception") Signed-off-by: Suravee Suthikulpanit Message-Id: <20220725033428.3699-1-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/svm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 7842efa5e194122ba2d2795102c70db00906024e Author: Andrey Strachuk Date: Tue Jul 19 14:03:41 2022 +0300 platform/x86: sony-laptop: Remove useless comparisons in sony_pic_read_possible_resource() Local variable 'p' is initialized by an address of field of acpi_resource structure, so it does not make sense to compare 'p' with NULL. Local variable 'io' is initialized by an address of field of acpi_resource structure, so it does not make sense to compare 'io' with NULL. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Andrey Strachuk Link: https://lore.kernel.org/r/20220719110341.7239-1-strochuk@ispras.ru Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/sony-laptop.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit c55ae10230a719020d8ad5a221cbe347d5225157 Author: Xin Gao Date: Mon Jul 18 20:49:07 2022 +0800 tools/power/x86/intel-speed-select: Remove unneeded semicolon Remove an unneeded semicolon. Signed-off-by: Xin Gao Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede tools/power/x86/intel-speed-select/hfi-events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9f74d98bbec978edbf860f729b531281ba0d8ff Author: Dan Carpenter Date: Mon Jul 18 16:17:17 2022 +0300 tools/power/x86/intel-speed-select: Fix off by one check Change > MAX_DIE_PER_PACKAGE to >= MAX_DIE_PER_PACKAGE to prevent accessing one element beyond the end of the array. Fixes: 7fd786dfbd2c ("tools/power/x86/intel-speed-select: OOB daemon mode") Signed-off-by: Dan Carpenter Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede tools/power/x86/intel-speed-select/isst-daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 265792d0dede9259f0ca56bb3efcc23eceee7d01 Author: Waiman Long Date: Wed Jul 27 20:58:15 2022 -0400 cgroup: Skip subtree root in cgroup_update_dfl_csses() The cgroup_update_dfl_csses() function updates css associations when a cgroup's subtree_control file is modified. Any changes made to a cgroup's subtree_control file, however, will only affect its descendants but not the cgroup itself. So there is no point in migrating csses associated with that cgroup. We can skip them instead. Signed-off-by: Waiman Long Reviewed-by: Michal Koutný Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit ce30d8b976b46b697cfcbc0aa5dab03edb0301dc Author: Sean Christopherson Date: Tue Jun 7 21:36:04 2022 +0000 KVM: selftests: Verify VMX MSRs can be restored to KVM-supported values Verify that KVM allows toggling VMX MSR bits to be "more" restrictive, and also allows restoring each MSR to KVM's original, less restrictive value. Signed-off-by: Sean Christopherson Message-Id: <20220607213604.3346000-16-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/.gitignore | 1 + tools/testing/selftests/kvm/Makefile | 1 + .../selftests/kvm/include/x86_64/processor.h | 1 + tools/testing/selftests/kvm/x86_64/vmx_msrs_test.c | 84 ++++++++++++++++++++++ 4 files changed, 87 insertions(+) commit a910b5ab6b250a88fff1866bf708642d83317466 Author: Sean Christopherson Date: Tue Jun 7 21:36:00 2022 +0000 KVM: nVMX: Set UMIP bit CR4_FIXED1 MSR when emulating UMIP Make UMIP an "allowed-1" bit CR4_FIXED1 MSR when KVM is emulating UMIP. KVM emulates UMIP for both L1 and L2, and so should enumerate that L2 is allowed to have CR4.UMIP=1. Not setting the bit doesn't immediately break nVMX, as KVM does set/clear the bit in CR4_FIXED1 in response to a guest CPUID update, i.e. KVM will correctly (dis)allow nested VM-Entry based on whether or not UMIP is exposed to L1. That said, KVM should enumerate the bit as being allowed from time zero, e.g. userspace will see the wrong value if the MSR is read before CPUID is written. Fixes: 0367f205a3b7 ("KVM: vmx: add support for emulating UMIP") Signed-off-by: Sean Christopherson Message-Id: <20220607213604.3346000-12-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 3 +++ 1 file changed, 3 insertions(+) commit 9389d5774aca444b6343d3b5f9b05f0820fe705e Author: Paolo Bonzini Date: Fri Jul 22 22:44:09 2022 +0000 Revert "KVM: nVMX: Expose load IA32_PERF_GLOBAL_CTRL VM-{Entry,Exit} control" This reverts commit 03a8871add95213827e2bea84c12133ae5df952e. Since commit 03a8871add95 ("KVM: nVMX: Expose load IA32_PERF_GLOBAL_CTRL VM-{Entry,Exit} control"), KVM has taken ownership of the "load IA32_PERF_GLOBAL_CTRL" VMX entry/exit control bits, trying to set these bits in the IA32_VMX_TRUE_{ENTRY,EXIT}_CTLS MSRs if the guest's CPUID supports the architectural PMU (CPUID[EAX=0Ah].EAX[7:0]=1), and clear otherwise. This was a misguided attempt at mimicking what commit 5f76f6f5ff96 ("KVM: nVMX: Do not expose MPX VMX controls when guest MPX disabled", 2018-10-01) did for MPX. However, that commit was a workaround for another KVM bug and not something that should be imitated. Mucking with the VMX MSRs creates a subtle, difficult to maintain ABI as KVM must ensure that any internal changes, e.g. to how KVM handles _any_ guest CPUID changes, yield the same functional result. Therefore, KVM's policy is to let userspace have full control of the guest vCPU model so long as the host kernel is not at risk. Now that KVM really truly ensures kvm_set_msr() will succeed by loading PERF_GLOBAL_CTRL if and only if it exists, revert KVM's misguided and roundabout behavior. Signed-off-by: Paolo Bonzini [sean: make it a pure revert] Signed-off-by: Sean Christopherson Message-Id: <20220722224409.1336532-6-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 22 ---------------------- arch/x86/kvm/vmx/nested.h | 2 -- arch/x86/kvm/vmx/pmu_intel.c | 3 --- 3 files changed, 27 deletions(-) commit 4496a6f9b45e8cd83343ad86a3984d614e22cf54 Author: Sean Christopherson Date: Fri Jul 22 22:44:08 2022 +0000 KVM: nVMX: Attempt to load PERF_GLOBAL_CTRL on nVMX xfer iff it exists Attempt to load PERF_GLOBAL_CTRL during nested VM-Enter/VM-Exit if and only if the MSR exists (according to the guest vCPU model). KVM has very misguided handling of VM_{ENTRY,EXIT}_LOAD_IA32_PERF_GLOBAL_CTRL and attempts to force the nVMX MSR settings to match the vPMU model, i.e. to hide/expose the control based on whether or not the MSR exists from the guest's perspective. KVM's modifications fail to handle the scenario where the vPMU is hidden from the guest _after_ being exposed to the guest, e.g. by userspace doing multiple KVM_SET_CPUID2 calls, which is allowed if done before any KVM_RUN. nested_vmx_pmu_refresh() is called if and only if there's a recognized vPMU, i.e. KVM will leave the bits in the allow state and then ultimately reject the MSR load and WARN. KVM should not force the VMX MSRs in the first place. KVM taking control of the MSRs was a misguided attempt at mimicking what commit 5f76f6f5ff96 ("KVM: nVMX: Do not expose MPX VMX controls when guest MPX disabled", 2018-10-01) did for MPX. However, the MPX commit was a workaround for another KVM bug and not something that should be imitated (and it should never been done in the first place). In other words, KVM's ABI _should_ be that userspace has full control over the MSRs, at which point triggering the WARN that loading the MSR must not fail is trivial. The intent of the WARN is still valid; KVM has consistency checks to ensure that vmcs12->{guest,host}_ia32_perf_global_ctrl is valid. The problem is that '0' must be considered a valid value at all times, and so the simple/obvious solution is to just not actually load the MSR when it does not exist. It is userspace's responsibility to provide a sane vCPU model, i.e. KVM is well within its ABI and Intel's VMX architecture to skip the loads if the MSR does not exist. Fixes: 03a8871add95 ("KVM: nVMX: Expose load IA32_PERF_GLOBAL_CTRL VM-{Entry,Exit} control") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20220722224409.1336532-5-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b663f0b5f3d665c261256d1f76e98f077c6e56af Author: Sean Christopherson Date: Fri Jul 22 22:44:07 2022 +0000 KVM: VMX: Add helper to check if the guest PMU has PERF_GLOBAL_CTRL Add a helper to check of the guest PMU has PERF_GLOBAL_CTRL, which is unintuitive _and_ diverges from Intel's architecturally defined behavior. Even worse, KVM currently implements the check using two different (but equivalent) checks, _and_ there has been at least one attempt to add a _third_ flavor. Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20220722224409.1336532-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/pmu_intel.c | 4 ++-- arch/x86/kvm/vmx/vmx.h | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) commit 93255bf92939d948bc86d81c6bb70bb0fecc5db1 Author: Sean Christopherson Date: Fri Jul 22 22:44:06 2022 +0000 KVM: VMX: Mark all PERF_GLOBAL_(OVF)_CTRL bits reserved if there's no vPMU Mark all MSR_CORE_PERF_GLOBAL_CTRL and MSR_CORE_PERF_GLOBAL_OVF_CTRL bits as reserved if there is no guest vPMU. The nVMX VM-Entry consistency checks do not check for a valid vPMU prior to consuming the masks via kvm_valid_perf_global_ctrl(), i.e. may incorrectly allow a non-zero mask to be loaded via VM-Enter or VM-Exit (well, attempted to be loaded, the actual MSR load will be rejected by intel_is_valid_msr()). Fixes: f5132b01386b ("KVM: Expose a version 2 architectural PMU to a guests") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20220722224409.1336532-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/pmu_intel.c | 2 ++ 1 file changed, 2 insertions(+) commit 8805875aa4732340af49aa601f59a60e482f635f Author: Paolo Bonzini Date: Fri Jul 22 05:07:39 2022 -0400 Revert "KVM: nVMX: Do not expose MPX VMX controls when guest MPX disabled" Since commit 5f76f6f5ff96 ("KVM: nVMX: Do not expose MPX VMX controls when guest MPX disabled"), KVM has taken ownership of the "load IA32_BNDCFGS" and "clear IA32_BNDCFGS" VMX entry/exit controls, trying to set these bits in the IA32_VMX_TRUE_{ENTRY,EXIT}_CTLS MSRs if the guest's CPUID supports MPX, and clear otherwise. The intent of the patch was to apply it to L0 in order to work around L1 kernels that lack the fix in commit 691bd4340bef ("kvm: vmx: allow host to access guest MSR_IA32_BNDCFGS", 2017-07-04): by hiding the control bits from L0, L1 hides BNDCFGS from KVM_GET_MSR_INDEX_LIST, and the L1 bug is neutralized even in the lack of commit 691bd4340bef. This was perhaps a sensible kludge at the time, but a horrible idea in the long term and in fact it has not been extended to other CPUID bits like these: X86_FEATURE_LM => VM_EXIT_HOST_ADDR_SPACE_SIZE, VM_ENTRY_IA32E_MODE, VMX_MISC_SAVE_EFER_LMA X86_FEATURE_TSC => CPU_BASED_RDTSC_EXITING, CPU_BASED_USE_TSC_OFFSETTING, SECONDARY_EXEC_TSC_SCALING X86_FEATURE_INVPCID_SINGLE => SECONDARY_EXEC_ENABLE_INVPCID X86_FEATURE_MWAIT => CPU_BASED_MONITOR_EXITING, CPU_BASED_MWAIT_EXITING X86_FEATURE_INTEL_PT => SECONDARY_EXEC_PT_CONCEAL_VMX, SECONDARY_EXEC_PT_USE_GPA, VM_EXIT_CLEAR_IA32_RTIT_CTL, VM_ENTRY_LOAD_IA32_RTIT_CTL X86_FEATURE_XSAVES => SECONDARY_EXEC_XSAVES These days it's sort of common knowledge that any MSR in KVM_GET_MSR_INDEX_LIST must allow *at least* setting it with KVM_SET_MSR to a default value, so it is unlikely that something like commit 5f76f6f5ff96 will be needed again. So revert it, at the potential cost of breaking L1s with a 6 year old kernel. While in principle the L0 owner doesn't control what runs on L1, such an old hypervisor would probably have many other bugs. Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit f8ae08f9789ad59d318ea75b570caa454aceda81 Author: Sean Christopherson Date: Tue Jun 7 21:35:54 2022 +0000 KVM: nVMX: Let userspace set nVMX MSR to any _host_ supported value Restrict the nVMX MSRs based on KVM's config, not based on the guest's current config. Using the guest's config to audit the new config prevents userspace from restoring the original config (KVM's config) if at any point in the past the guest's config was restricted in any way. Fixes: 62cc6b9dc61e ("KVM: nVMX: support restore of VMX capability MSRs") Cc: stable@vger.kernel.org Cc: David Matlack Signed-off-by: Sean Christopherson Message-Id: <20220607213604.3346000-6-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 70 +++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 33 deletions(-) commit a645c2b506fbca06f671b22f0991bd99064d7e69 Author: Sean Christopherson Date: Tue Jun 7 21:35:53 2022 +0000 KVM: nVMX: Rename handle_vm{on,off}() to handle_vmx{on,off}() Rename the exit handlers for VMXON and VMXOFF to match the instruction names, the terms "vmon" and "vmoff" are not used anywhere in Intel's documentation, nor are they used elsehwere in KVM. Sadly, the exit reasons are exposed to userspace and so cannot be renamed without breaking userspace. :-( Fixes: ec378aeef9df ("KVM: nVMX: Implement VMXON and VMXOFF") Signed-off-by: Sean Christopherson Message-Id: <20220607213604.3346000-5-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c7d855c2aff2d511fd60ee2e356134c4fb394799 Author: Sean Christopherson Date: Tue Jun 7 21:35:52 2022 +0000 KVM: nVMX: Inject #UD if VMXON is attempted with incompatible CR0/CR4 Inject a #UD if L1 attempts VMXON with a CR0 or CR4 that is disallowed per the associated nested VMX MSRs' fixed0/1 settings. KVM cannot rely on hardware to perform the checks, even for the few checks that have higher priority than VM-Exit, as (a) KVM may have forced CR0/CR4 bits in hardware while running the guest, (b) there may incompatible CR0/CR4 bits that have lower priority than VM-Exit, e.g. CR0.NE, and (c) userspace may have further restricted the allowed CR0/CR4 values by manipulating the guest's nested VMX MSRs. Note, despite a very strong desire to throw shade at Jim, commit 70f3aac964ae ("kvm: nVMX: Remove superfluous VMX instruction fault checks") is not to blame for the buggy behavior (though the comment...). That commit only removed the CR0.PE, EFLAGS.VM, and COMPATIBILITY mode checks (though it did erroneously drop the CPL check, but that has already been remedied). KVM may force CR0.PE=1, but will do so only when also forcing EFLAGS.VM=1 to emulate Real Mode, i.e. hardware will still #UD. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216033 Fixes: ec378aeef9df ("KVM: nVMX: Implement VMXON and VMXOFF") Reported-by: Eric Li Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20220607213604.3346000-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit ca58f3aa53d165afe4ab74c755bc2f6d168617ac Author: Sean Christopherson Date: Tue Jun 7 21:35:51 2022 +0000 KVM: nVMX: Account for KVM reserved CR4 bits in consistency checks Check that the guest (L2) and host (L1) CR4 values that would be loaded by nested VM-Enter and VM-Exit respectively are valid with respect to KVM's (L0 host) allowed CR4 bits. Failure to check KVM reserved bits would allow L1 to load an illegal CR4 (or trigger hardware VM-Fail or failed VM-Entry) by massaging guest CPUID to allow features that are not supported by KVM. Amusingly, KVM itself is an accomplice in its doom, as KVM adjusts L1's MSR_IA32_VMX_CR4_FIXED1 to allow L1 to enable bits for L2 based on L1's CPUID model. Note, although nested_{guest,host}_cr4_valid() are _currently_ used if and only if the vCPU is post-VMXON (nested.vmxon == true), that may not be true in the future, e.g. emulating VMXON has a bug where it doesn't check the allowed/required CR0/CR4 bits. Cc: stable@vger.kernel.org Fixes: 3899152ccbf4 ("KVM: nVMX: fix checks on CR{0,4} during virtual VMX operation") Signed-off-by: Sean Christopherson Message-Id: <20220607213604.3346000-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c33f6f2228fe8517e38941a508e9f905f99ecba9 Author: Sean Christopherson Date: Tue Jun 7 21:35:50 2022 +0000 KVM: x86: Split kvm_is_valid_cr4() and export only the non-vendor bits Split the common x86 parts of kvm_is_valid_cr4(), i.e. the reserved bits checks, into a separate helper, __kvm_is_valid_cr4(), and export only the inner helper to vendor code in order to prevent nested VMX from calling back into vmx_is_valid_cr4() via kvm_is_valid_cr4(). On SVM, this is a nop as SVM doesn't place any additional restrictions on CR4. On VMX, this is also currently a nop, but only because nested VMX is missing checks on reserved CR4 bits for nested VM-Enter. That bug will be fixed in a future patch, and could simply use kvm_is_valid_cr4() as-is, but nVMX has _another_ bug where VMXON emulation doesn't enforce VMX's restrictions on CR0/CR4. The cleanest and most intuitive way to fix the VMXON bug is to use nested_host_cr{0,4}_valid(). If the CR4 variant routes through kvm_is_valid_cr4(), using nested_host_cr4_valid() won't do the right thing for the VMXON case as vmx_is_valid_cr4() enforces VMX's restrictions if and only if the vCPU is post-VMXON. Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20220607213604.3346000-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/nested.c | 3 ++- arch/x86/kvm/vmx/vmx.c | 4 ++-- arch/x86/kvm/x86.c | 12 +++++++++--- arch/x86/kvm/x86.h | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) commit cfe12e64b0657142824819d939fcfe62f14104a1 Author: Sean Christopherson Date: Fri Jul 15 23:21:07 2022 +0000 KVM: selftests: Add an option to run vCPUs while disabling dirty logging Add a command line option to dirty_log_perf_test to run vCPUs for the entire duration of disabling dirty logging. By default, the test stops running runs vCPUs before disabling dirty logging, which is faster but less interesting as it doesn't stress KVM's handling of contention between page faults and the zapping of collapsible SPTEs. Enabling the flag also lets the user verify that KVM is indeed rebuilding zapped SPTEs as huge pages by checking KVM's pages_{1g,2m,4k} stats. Without vCPUs to fault in the zapped SPTEs, the stats will show that KVM is zapping pages, but they never show whether or not KVM actually allows huge pages to be recreated. Note! Enabling the flag can _significantly_ increase runtime, especially if the thread that's disabling dirty logging doesn't have a dedicated pCPU, e.g. if all pCPUs are used to run vCPUs. Signed-off-by: Sean Christopherson Message-Id: <20220715232107.3775620-5-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/dirty_log_perf_test.c | 30 ++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) commit 85f44f8cc07b5f61bef30fe5343d629fd4263230 Author: Sean Christopherson Date: Fri Jul 15 23:21:06 2022 +0000 KVM: x86/mmu: Don't bottom out on leafs when zapping collapsible SPTEs When zapping collapsible SPTEs in the TDP MMU, don't bottom out on a leaf SPTE now that KVM doesn't require a PFN to compute the host mapping level, i.e. now that there's no need to first find a leaf SPTE and then step back up. Drop the now unused tdp_iter_step_up(), as it is not the safest of helpers (using any of the low level iterators requires some understanding of the various side effects). Signed-off-by: Sean Christopherson Message-Id: <20220715232107.3775620-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/tdp_iter.c | 9 -------- arch/x86/kvm/mmu/tdp_iter.h | 1 - arch/x86/kvm/mmu/tdp_mmu.c | 51 +++++++++++++++++++++------------------------ 3 files changed, 24 insertions(+), 37 deletions(-) commit 65e3b446bcceaac7448cb25a2a5bf4adbcf25fe6 Author: Sean Christopherson Date: Fri Jul 15 23:21:05 2022 +0000 KVM: x86/mmu: Document the "rules" for using host_pfn_mapping_level() Add a comment to document how host_pfn_mapping_level() can be used safely, as the line between safe and dangerous is quite thin. E.g. if KVM were to ever support in-place promotion to create huge pages, consuming the level is safe if the caller holds mmu_lock and checks that there's an existing _leaf_ SPTE, but unsafe if the caller only checks that there's a non-leaf SPTE. Opportunistically tweak the existing comments to explicitly document why KVM needs to use READ_ONCE(). No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220715232107.3775620-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) commit a8ac499bb6abbd55fe60f1dc2d053f4b5b13aa73 Author: Sean Christopherson Date: Fri Jul 15 23:21:04 2022 +0000 KVM: x86/mmu: Don't require refcounted "struct page" to create huge SPTEs Drop the requirement that a pfn be backed by a refcounted, compound or or ZONE_DEVICE, struct page, and instead rely solely on the host page tables to identify huge pages. The PageCompound() check is a remnant of an old implementation that identified (well, attempt to identify) huge pages without walking the host page tables. The ZONE_DEVICE check was added as an exception to the PageCompound() requirement. In other words, neither check is actually a hard requirement, if the primary has a pfn backed with a huge page, then KVM can back the pfn with a huge page regardless of the backing store. Dropping the @pfn parameter will also allow KVM to query the max host mapping level without having to first get the pfn, which is advantageous for use outside of the page fault path where KVM wants to take action if and only if a page can be mapped huge, i.e. avoids the pfn lookup for gfns that can't be backed with a huge page. Cc: Mingwei Zhang Signed-off-by: Sean Christopherson Reviewed-by: Mingwei Zhang Message-Id: <20220715232107.3775620-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 23 +++++------------------ arch/x86/kvm/mmu/mmu_internal.h | 2 +- arch/x86/kvm/mmu/tdp_mmu.c | 8 +------- 3 files changed, 7 insertions(+), 26 deletions(-) commit d5e90a699875ce552d0058d05b9b4b458b46fa6a Author: Sean Christopherson Date: Fri Jul 15 23:00:16 2022 +0000 KVM: x86/mmu: Restrict mapping level based on guest MTRR iff they're used Restrict the mapping level for SPTEs based on the guest MTRRs if and only if KVM may actually use the guest MTRRs to compute the "real" memtype. For all forms of paging, guest MTRRs are purely virtual in the sense that they are completely ignored by hardware, i.e. they affect the memtype only if software manually consumes them. The only scenario where KVM consumes the guest MTRRs is when shadow_memtype_mask is non-zero and the guest has non-coherent DMA, in all other cases KVM simply leaves the PAT field in SPTEs as '0' to encode WB memtype. Note, KVM may still ultimately ignore guest MTRRs, e.g. if the backing pfn is host MMIO, but false positives are ok as they only cause a slight performance blip (unless the guest is doing weird things with its MTRRs, which is extremely unlikely). Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Message-Id: <20220715230016.3762909-5-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit 38bf9d7bf277bb40c4dceedd2b5eb87d02c36d5b Author: Sean Christopherson Date: Fri Jul 15 23:00:15 2022 +0000 KVM: x86/mmu: Add shadow mask for effective host MTRR memtype Add shadow_memtype_mask to capture that EPT needs a non-zero memtype mask instead of relying on TDP being enabled, as NPT doesn't need a non-zero mask. This is a glorified nop as kvm_x86_ops.get_mt_mask() returns zero for NPT anyways. No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Message-Id: <20220715230016.3762909-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/spte.c | 21 ++++++++++++++++++--- arch/x86/kvm/mmu/spte.h | 1 + 2 files changed, 19 insertions(+), 3 deletions(-) commit 82ffad2ddf5d7b5b9c14c705fed4a7d5f2ec4c38 Author: Sean Christopherson Date: Fri Jul 15 23:00:14 2022 +0000 KVM: x86: Drop unnecessary goto+label in kvm_arch_init() Return directly if kvm_arch_init() detects an error before doing any real work, jumping through a label obfuscates what's happening and carries the unnecessary risk of leaving 'r' uninitialized. No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Message-Id: <20220715230016.3762909-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit 94bda2f4cd868046094351b06b87d7d1053e990d Author: Sean Christopherson Date: Fri Jul 15 23:00:13 2022 +0000 KVM: x86: Reject loading KVM if host.PAT[0] != WB Reject KVM if entry '0' in the host's IA32_PAT MSR is not programmed to writeback (WB) memtype. KVM subtly relies on IA32_PAT entry '0' to be programmed to WB by leaving the PAT bits in shadow paging and NPT SPTEs as '0'. If something other than WB is in PAT[0], at _best_ guests will suffer very poor performance, and at worst KVM will crash the system by breaking cache-coherency expecations (e.g. using WC for guest memory). Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Message-Id: <20220715230016.3762909-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 01e69cef63f88d809181f62f03a01d7295f2d5a4 Author: Suravee Suthikulpanit Date: Mon Jul 18 03:38:33 2022 -0500 KVM: SVM: Fix x2APIC MSRs interception The index for svm_direct_access_msrs was incorrectly initialized with the APIC MMIO register macros. Fix by introducing a macro for calculating x2APIC MSRs. Fixes: 5c127c85472c ("KVM: SVM: Adding support for configuring x2APIC MSRs interception") Cc: Maxim Levitsky Signed-off-by: Suravee Suthikulpanit Message-Id: <20220718083833.222117-1-suravee.suthikulpanit@amd.com> Reviewed-by: Maxim Levitsky Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/svm.c | 52 ++++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 25 deletions(-) commit 3c2e10373ec73cdd78411a28a14a9abb9da1bef6 Author: Sean Christopherson Date: Fri Jul 15 22:42:26 2022 +0000 KVM: x86/mmu: Remove underscores from __pte_list_remove() Remove the underscores from __pte_list_remove(), the function formerly known as pte_list_remove() is now named kvm_zap_one_rmap_spte() to show that it zaps rmaps/PTEs, i.e. doesn't just remove an entry from a list. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220715224226.3749507-8-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9202aee816c84d69179f94193c5dd321bb0e8530 Author: Sean Christopherson Date: Fri Jul 15 22:42:25 2022 +0000 KVM: x86/mmu: Rename pte_list_{destroy,remove}() to show they zap SPTEs Rename pte_list_remove() and pte_list_destroy() to kvm_zap_one_rmap_spte() and kvm_zap_all_rmap_sptes() respectively to document that (a) they zap SPTEs and (b) to better document how they differ (remove vs. destroy does not exactly scream "one vs. all"). No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220715224226.3749507-7-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit f8480721a74b82c6e88fff09286aa452d5ed6d71 Author: Sean Christopherson Date: Fri Jul 15 22:42:24 2022 +0000 KVM: x86/mmu: Rename rmap zap helpers to eliminate "unmap" wrapper Rename kvm_unmap_rmap() and kvm_zap_rmap() to kvm_zap_rmap() and __kvm_zap_rmap() respectively to show that what was the "unmap" helper is just a wrapper for the "zap" helper, i.e. that they do the exact same thing, one just exists to deal with its caller passing in more params. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220715224226.3749507-6-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 2833eda0e296ba3c410e9d57636de14d2589ad4e Author: Sean Christopherson Date: Fri Jul 15 22:42:23 2022 +0000 KVM: x86/mmu: Rename __kvm_zap_rmaps() to align with other nomenclature Rename __kvm_zap_rmaps() to kvm_rmap_zap_gfn_range() to avoid future confusion with a soon-to-be-introduced __kvm_zap_rmap(). Using a plural "rmaps" is somewhat ambiguous without additional context, as it's not obvious whether it's referring to multiple rmap lists, versus multiple rmap entries within a single list. Use kvm_rmap_zap_gfn_range() to align with the pattern established by kvm_rmap_zap_collapsible_sptes(), without losing the information that it zaps only rmap-based MMUs, i.e. don't rename it to __kvm_zap_gfn_range(). No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220715224226.3749507-5-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aed02fe3cae41c4f9a5f31390b198025bfc9cf88 Author: Sean Christopherson Date: Fri Jul 15 22:42:22 2022 +0000 KVM: x86/mmu: Drop the "p is for pointer" from rmap helpers Drop the trailing "p" from rmap helpers, i.e. rename functions to simply be kvm__rmap(). Declaring that a function takes a pointer is completely unnecessary and goes against kernel style. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220715224226.3749507-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) commit a42989e7fbb0186d9fee05b29e0ea9cb639d0bd3 Author: Sean Christopherson Date: Fri Jul 15 22:42:21 2022 +0000 KVM: x86/mmu: Directly "destroy" PTE list when recycling rmaps Use pte_list_destroy() directly when recycling rmaps instead of bouncing through kvm_unmap_rmapp() and kvm_zap_rmapp(). Calling kvm_unmap_rmapp() is unnecessary and odd as it requires passing dummy parameters; passing NULL for @slot when __rmap_add() already has a valid slot is especially weird and confusing. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220715224226.3749507-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35d539c3e44f2021ff47a91cf4e6a35c550b6fbc Author: Sean Christopherson Date: Fri Jul 15 22:42:20 2022 +0000 KVM: x86/mmu: Return a u64 (the old SPTE) from mmu_spte_clear_track_bits() Return a u64, not an int, from mmu_spte_clear_track_bits(). The return value is the old SPTE value, which is very much a 64-bit value. The sole caller that consumes the return value, drop_spte(), already uses a u64. The only reason that truncating the SPTE value is not problematic is because drop_spte() only queries the shadow-present bit, which is in the lower 32 bits. Signed-off-by: Sean Christopherson Message-Id: <20220715224226.3749507-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da0b93d65e5bba6d4381f9dc99c547b60582e7a7 Author: Maciej S. Szmigiero Date: Mon Jul 18 17:47:13 2022 +0200 KVM: nSVM: Pull CS.Base from actual VMCB12 for soft int/ex re-injection enter_svm_guest_mode() first calls nested_vmcb02_prepare_control() to copy control fields from VMCB12 to the current VMCB, then nested_vmcb02_prepare_save() to perform a similar copy of the save area. This means that nested_vmcb02_prepare_control() still runs with the previous save area values in the current VMCB so it shouldn't take the L2 guest CS.Base from this area. Explicitly pull CS.Base from the actual VMCB12 instead in enter_svm_guest_mode(). Granted, having a non-zero CS.Base is a very rare thing (and even impossible in 64-bit mode), having it change between nested VMRUNs is probably even rarer, but if it happens it would create a really subtle bug so it's better to fix it upfront. Fixes: 6ef88d6e36c2 ("KVM: SVM: Re-inject INT3/INTO instead of retrying the instruction") Signed-off-by: Maciej S. Szmigiero Message-Id: <4caa0f67589ae3c22c311ee0e6139496902f2edc.1658159083.git.maciej.szmigiero@oracle.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/nested.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit ded466e1806686794b403ebf031133bbaca76bb2 Author: Sumanth Korikkar Date: Tue Jul 26 18:57:59 2022 +0200 s390/unwind: fix fgraph return address recovery When HAVE_FUNCTION_GRAPH_RET_ADDR_PTR is defined, the return address to the fgraph caller is recovered by tagging it along with the stack pointer of ftrace stack. This makes the stack unwinding more reliable. When the fgraph return address is modified to return_to_handler, ftrace_graph_ret_addr tries to restore it to the original value using tagged stack pointer. Fix this by passing tagged sp to ftrace_graph_ret_addr. Fixes: d81675b60d09 ("s390/unwind: recover kretprobe modified return address in stacktrace") Cc: # 5.18 Reviewed-by: Vasily Gorbik Signed-off-by: Sumanth Korikkar Signed-off-by: Alexander Gordeev arch/s390/include/asm/unwind.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 520763a3272abf0ebf161c748bdbc8dad275521c Author: Sven Schnelle Date: Tue Jul 26 09:43:53 2022 +0200 s390/nmi: use irqentry_nmi_enter()/irqentry_nmi_exit() With generic entry in place switch the nmi handler to use the generic entry helper functions. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/kernel/nmi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit a0c0c44e9aa2b5da876467083c359b368f3ce95e Author: Janosch Frank Date: Wed Jul 20 12:43:28 2022 +0000 s390: add ELF note type for encrypted CPU state of a PV VCPU The type NT_S390_PV_CPU_DATA note contains the encrypted CPU state of a PV VCPU. It's only relevant in dumps of s390 PV VMs and can't be decrypted without a second block of encrypted data which provides key parts. Therefore we only reserve the note type here. The zgetdump tool from the s390-tools package can, together with a Customer Communication Key, be used to convert a PV VM dump into a normal VM dump. zgetdump will decrypt the CPU data and overwrite the other respective notes to make the data accessible for crash and other debugging tools. Signed-off-by: Janosch Frank Acked-by: Heiko Carstens [agordeev@linux.ibm.com changed desctiption] Signed-off-by: Alexander Gordeev include/uapi/linux/elf.h | 1 + 1 file changed, 1 insertion(+) commit e409b7f19172a3c154de62de4baf32a2c25a375a Author: Alexander Gordeev Date: Wed Jul 20 08:32:13 2022 +0200 s390/smp,ptdump: add absolute lowcore markers Add "Lowcore Area Start" and "Lowcore Area End" markers that fence pages where absolute lowcore resides. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/mm/dump_pagetables.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7d06fed77b7d8fc9f6cc41b4e3f2823d32532ad8 Author: Alexander Gordeev Date: Wed Jul 20 08:22:01 2022 +0200 s390/smp: rework absolute lowcore access Temporary unsetting of the prefix page in memcpy_absolute() routine poses a risk of executing code path with unexpectedly disabled prefix page. This rework avoids the prefix page uninstalling and disabling of normal and machine check interrupts when accessing the absolute zero memory. Although memcpy_absolute() routine can access the whole memory, it is only used to update the absolute zero lowcore. This rework therefore introduces a new mechanism for the absolute zero lowcore access and scraps memcpy_absolute() routine for good. Instead, an area is reserved in the virtual memory that is used for the absolute lowcore access only. That area holds an array of 8KB virtual mappings - one per CPU. Whenever a CPU is brought online, the corresponding item is mapped to the real address of the previously installed prefix page. The absolute zero lowcore access works like this: a CPU calls the new primitive get_abs_lowcore() to obtain its 8KB mapping as a pointer to the struct lowcore. Virtual address references to that pointer get translated to the real addresses of the prefix page, which in turn gets swapped with the absolute zero memory addresses due to prefixing. Once the pointer is not needed it must be released with put_abs_lowcore() primitive: struct lowcore *abs_lc; unsigned long flags; abs_lc = get_abs_lowcore(&flags); abs_lc->... = ...; put_abs_lowcore(abs_lc, flags); To ensure the described mechanism works large segment- and region- table entries must be avoided for the 8KB mappings. Failure to do so results in usage of Region-Frame Absolute Address (RFAA) or Segment-Frame Absolute Address (SFAA) large page fields. In that case absolute addresses would be used to address the prefix page instead of the real ones and the prefixing would get bypassed. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/startup.c | 5 ++- arch/s390/include/asm/abs_lowcore.h | 17 +++++++ arch/s390/include/asm/pgtable.h | 2 + arch/s390/include/asm/processor.h | 15 ------- arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/abs_lowcore.c | 88 +++++++++++++++++++++++++++++++++++++ arch/s390/kernel/ipl.c | 9 +++- arch/s390/kernel/machine_kexec.c | 8 +++- arch/s390/kernel/os_info.c | 9 ++-- arch/s390/kernel/setup.c | 34 ++++++++------ arch/s390/kernel/smp.c | 34 ++++++++++---- arch/s390/mm/init.c | 2 +- arch/s390/mm/maccess.c | 67 +++++++++++++--------------- arch/s390/mm/vmem.c | 85 +++++++++++++++++++++++++++++++++++ 14 files changed, 294 insertions(+), 83 deletions(-) commit 2e2493c675dfdb75d8aa1bc6ae436b9d7cc4abfa Author: Alexander Gordeev Date: Fri Jul 22 20:34:05 2022 +0200 s390/setup: rearrange absolute lowcore initialization Make the absolute lowcore assignments immediately follow the boot CPU lowcore same member assignments. This way readability improves when reading from up to down, with no out of order mcck stack allocation in-between. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/kernel/setup.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 57ad19bcdefb1c65b0a90330b7b29ce658ef1a76 Author: Alexander Gordeev Date: Thu May 26 07:57:36 2022 +0200 s390/boot: cleanup adjust_to_uv_max() function Uncouple input and output arguments by making the latter the function return value. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/startup.c | 10 ++++++---- arch/s390/boot/uv.c | 5 +++-- arch/s390/boot/uv.h | 7 +++++-- 3 files changed, 14 insertions(+), 8 deletions(-) commit 6f5c672d17f583b081e283927f5040f726c54598 Author: Alexander Gordeev Date: Wed Jul 20 07:24:03 2022 +0200 s390/smp: enforce lowcore protection on CPU restart As result of commit 915fea04f932 ("s390/smp: enable DAT before CPU restart callback is called") the low-address protection bit gets mistakenly unset in control register 0 save area of the absolute zero memory. That area is used when manual PSW restart happened to hit an offline CPU. In this case the low-address protection for that CPU will be dropped. Reviewed-by: Heiko Carstens Fixes: 915fea04f932 ("s390/smp: enable DAT before CPU restart callback is called") Signed-off-by: Alexander Gordeev arch/s390/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc7fab3f9156df73cd5f2705f001451265453d34 Author: Jason Wang Date: Fri Jul 15 13:38:38 2022 +0800 s390/tape: fix comment typo Remove duplicated `that' in a comment Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20220715053838.5005-1-wangborong@cdjrlc.com [agordeev@linux.ibm.com rephrased commit message] Signed-off-by: Alexander Gordeev drivers/s390/char/tape_34xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57c3ae8e44bba158c3f7064a3f9628eddfd5c276 Author: Randy Dunlap Date: Thu Jul 14 19:00:10 2022 -0700 s390/hmcdrv: fix Kconfig "its" grammar Use the possessive "its" instead of the contraction "it's" where appropriate. Signed-off-by: Randy Dunlap Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: linux-s390@vger.kernel.org Link: https://lore.kernel.org/r/20220715020010.12678-1-rdunlap@infradead.org Signed-off-by: Alexander Gordeev drivers/s390/char/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f089a3846a28b9893697e807f85c2177fd9d829 Merge: 9aa938ddce81 ebbc95701691 Author: Alexander Gordeev Date: Thu Jul 28 17:53:11 2022 +0200 Merge branch 'vmcore-iov_iter' into features Pull changes that finalize switching of copy_oldmem_page() callback to iov_iter interface. These changes were pulled in work.iov_iter of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git Signed-off-by: Alexander Gordeev commit dd390cba54bbd74fb675a4ac0a78dc23a20d49e2 Author: wangjianli Date: Sun Jul 24 15:44:07 2022 +0800 IB/qib: Fix repeated "in" within comments Delete the redundant word 'in'. Link: https://lore.kernel.org/r/20220724074407.18552-1-wangjianli@cdjrlc.com Signed-off-by: wangjianli Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/qib/qib_iba7220.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 339170d8d3da5685762619080263abb78700ab4c Author: João Paulo Rechi Vita Date: Wed Jul 27 10:05:39 2022 -0400 docs: efi-stub: Fix paths for x86 / arm stubs This fixes the paths of x86 / arm efi-stub source files. Signed-off-by: João Paulo Rechi Vita Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220727140539.10021-1-jprvita@endlessos.org Signed-off-by: Jonathan Corbet Documentation/admin-guide/efi-stub.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4116ff79749d8842f6a6dfce5a17a5ea15fc290b Author: Yanteng Si Date: Thu Jul 28 13:08:43 2022 +0800 Docs/zh_CN: Update the translation of sched-stats to 5.19-rc8 Update to commit 6c757e9f55f0 ("docs/scheduler: fix unit error") ddb21d27a6a5 ("docs/scheduler: Change unit of cpu_time and rq_time to nanoseconds") Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/3cb1c4c466dfa38d72a867dc6e2c833ceb69ecb7.1658983157.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/scheduler/sched-stats.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ce1120076c53681fc084240627bc9c974039da97 Author: Yanteng Si Date: Thu Jul 28 13:08:26 2022 +0800 Docs/zh_CN: Update the translation of pci to 5.19-rc8 Update to commit f21949c14968 ("PCI/doc:Update obsolete pci_set_dma_mask() references") 05b0ebd06ae6 ("PCI/doc: cleanup references to the legacy PCI DMA API") Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/bccb98a1c6706ecfd4aaba8c27f1c64024e1c139.1658983157.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/PCI/pci.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c78478e164d4163419dc027fba7e3a2261d0c1d9 Author: Yanteng Si Date: Thu Jul 28 13:08:10 2022 +0800 Docs/zh_CN: Update the translation of pci-iov-howto to 5.19-rc8 Update to commit 4f23bd5d09af ("PCI/doc: Convert examples to generic power management") Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/24c53aabc9d942f6fe38b8d3a843329edca3d18c.1658983157.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/PCI/pci-iov-howto.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 83b41bb27b25b4b972d03b593e8da7e3dd5735aa Author: Yanteng Si Date: Thu Jul 28 13:07:59 2022 +0800 Docs/zh_CN: Update the translation of usage to 5.19-rc8 Update to commit b57e39a743e4 ("Docs/admin-guide /damon/sysfs: document 'LRU_DEPRIO' scheme action") 0bcba960b1fa ("Docs/admin-guide/damon/sysfs: document 'LRU_PRIO' scheme action") Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/130795ae1a4097e25e8e354870e65c3018241a8e.1658983157.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/admin-guide/mm/damon/usage.rst | 2 ++ 1 file changed, 2 insertions(+) commit 63c1d2516b057e2d49f58812d8c149acfd5348a5 Author: Yanteng Si Date: Thu Jul 28 13:07:48 2022 +0800 Docs/zh_CN: Update the translation of testing-overview to 5.19-rc8 Update to commit 12379401c000 ("Documentation: dev-tools: Add a section for static analysis tools") Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/b9911916446f858fe95e4d4bfeaecdab14bc0b6a.1658983157.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet .../zh_CN/dev-tools/testing-overview.rst | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 6a5057e9dc13dd31d1577652162c4ca2869d8950 Author: Yanteng Si Date: Thu Jul 28 13:05:58 2022 +0800 Docs/zh_CN: Update the translation of sparse to 5.19-rc8 Update to commit179fd6ba3bac ("Documentation/sparse: add hints about __CHECKER__") Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/2ecdf7ddc8644e9031e4e2af947b97d63ab046f0.1658983157.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/dev-tools/sparse.rst | 2 ++ 1 file changed, 2 insertions(+) commit 507f48799ab0915788df79edf794d659ad8104c7 Author: Yanteng Si Date: Thu Jul 28 13:05:57 2022 +0800 Docs/zh_CN: Update the translation of kasan to 5.19-rc8 update to commit 3ff16d30f593 ("kasan: test: improve failure message in KUNIT_EXPECT_KASAN_FAIL()") c9d1af2b780a ("mm/kasan: move kasan.fault to mm/kasan/report.c") 2d27e5851473 ("kasan: Extend KASAN mode kernel parameter") 8479d7b5be2f ("kasan: documentation updates") c2ec0c8f6877 ("kasan: update documentation") Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/abbb6c5cc5a7daf0720a9cb0a8255472d4ac69b4.1658983157.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet .../translations/zh_CN/dev-tools/kasan.rst | 117 ++++++++++++++------- 1 file changed, 77 insertions(+), 40 deletions(-) commit 659797dc4d64ee4814e5e9a5387933e38a11fb7a Author: Yanteng Si Date: Thu Jul 28 13:05:56 2022 +0800 Docs/zh_CN: Update the translation of iio_configfs to 5.19-rc8 update to commit dafcf4ed8392 ("iio: hrtimer: Allow sub Hz granularity"). c1d82dbcb0a6 ("docs: iio: fix example formatting"). Remove some useless spaces. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/1c0ae3e0932d813d41de666c1c65379786e79ba6.1658983157.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/iio/iio_configfs.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit da1d9caf95def6f0320819cf941c9fd1069ba9e1 Author: Federico Vaga Date: Sat Jul 2 23:08:20 2022 +0200 doc:it_IT: align Italian documentation Translation for the following patches commit df05c0e9496c ("Documentation: Raise the minimum supported version of LLVM to 11.0.0") commit 333b11e541fe ("Documentation: Add minimum pahole version") commit 6d6a8d6a4ed0 ("docs: Update Sphinx requirements") commit 76ae847497bc ("Documentation: raise minimum supported version of GCC to 5.1") commit 59c6a716b14b ("Documentation/process/maintainer-pgp-guide: Replace broken link to PGP path finder") commit 85eafc63d032 ("docs: update file link location") commit 869f496e1aa6 ("docs: process: submitting-patches: Clarify the Reported-by usage") commit 6c5ccd24ff17 ("Remove mentions of the Trivial Patch Monkey") commit aa9b5e0df226 ("Documentation/process: fix self reference") commit b96ff02ab2be ("Documentation/process: fix a cross reference") commit 1f57bd42b77c ("docs: submitting-patches: make section about the Link: tag more explicit") commit a9d85efb25fb ("docs: use the lore redirector everywhere") commit 31c9d7c82975 ("Documentation/process: Add tip tree handbook") commit 604370e106cc ("Documentation/process: Add maintainer handbooks section") commit bf33a9d42d0c ("docs: 5.Posting.rst: describe Fixes: and Link: tags") commit c04639a7d2fb ("coding-style.rst: trivial: fix location of driver model macros") commit d5b421fe0282 ("docs: Explain the desired position of function attributes") commit 3577cdb23b8f ("docs: deprecated.rst: Clarify open-coded arithmetic with literals") commit db67eb748e7a ("docs: discourage use of list tables") commit 0e805b118662 ("docs: address some text issues with css/theme support") commit 135707d3765e ("docs: allow to pass extra DOCS_CSS themes via make") commit fe450eeb4e6f ("Documentation: in_irq() cleanup") commit 10855b45a428 ("docs: fix typo in Documentation/kernel-hacking/locking.rst") commit bc67f1c454fb ("docs: futex: Fix kernel-doc references") commit abf36fe0be7d ("docs: kernel-hacking: Remove inappropriate text") commit f35cf1a59e9a ("Documentation: kernel-hacking: minor edits for style") commit f35cf1a59e9a ("Documentation: kernel-hacking: minor edits for style") commit 980c3799c500 ("Documentation: kernel-doc: Promote two chapter headings to page title") commit e1be43d9b5d0 ("overflow: Implement size_t saturating arithmetic helpers") commit 615f3eea0d5f ("Documentation: add note block surrounding security patch note") commit 587d39b260c4 ("Documentation: add link to stable release candidate tree") commit 555d44932c67 ("Documentation: update stable tree link") commit 88d99e870143 ("Documentation: update stable review cycle documentation") commit 0c603a5c704f ("Documentation/process: mention patch changelog in review process") commit 6d5aa418b3bd ("docs: submitting-patches: Fix crossref to 'The canonical patch format'") commit f1a693994b1c ("Documentation/process: use scripts/get_maintainer.pl on patches") commit 69ef0920bdd3 ("Docs: Add cpio requirement to changes.rst") commit 5a5866c28b43 ("Docs: Replace version by 'current' in changes.rst") commit 9b5a7f4a2a8d ("x86/configs: Add x86 debugging Kconfig fragment plus docs") commit f1a693994b1c ("Documentation/process: use scripts/get_maintainer.pl on patches") commit e8c07082a810 ("Kbuild: move to -std=gnu11") Signed-off-by: Federico Vaga Link: https://lore.kernel.org/r/20220702210820.13118-1-federico.vaga@vaga.pv.it Signed-off-by: Jonathan Corbet .../devicetree/bindings/submitting-patches.rst | 11 ++++ .../translations/it_IT/doc-guide/kernel-doc.rst | 2 + .../translations/it_IT/doc-guide/sphinx.rst | 18 +++--- .../translations/it_IT/kernel-hacking/hacking.rst | 24 ++++---- .../translations/it_IT/kernel-hacking/locking.rst | 14 +---- .../it_IT/maintainer/configure-git.rst | 10 ++++ .../translations/it_IT/process/3.Early-stage.rst | 17 +++--- .../translations/it_IT/process/5.Posting.rst | 27 +++++++-- .../translations/it_IT/process/changes.rst | 25 ++++++-- .../translations/it_IT/process/coding-style.rst | 42 +++++++++++++- .../translations/it_IT/process/deprecated.rst | 24 ++++++-- Documentation/translations/it_IT/process/index.rst | 1 + .../it_IT/process/maintainer-handbooks.rst | 24 ++++++++ .../it_IT/process/maintainer-pgp-guide.rst | 14 ++--- .../translations/it_IT/process/maintainer-tip.rst | 10 ++++ .../translations/it_IT/process/maintainers.rst | 13 +++++ .../it_IT/process/stable-kernel-rules.rst | 42 ++++++++++---- .../it_IT/process/submitting-patches.rst | 66 +++++++++++++++------- 18 files changed, 288 insertions(+), 96 deletions(-) commit d0c75fa2c17f082b32a5f26ff40bf378b12952de Author: Daniel Lezcano Date: Fri Jul 22 22:00:07 2022 +0200 thermal/of: Initialize trip points separately Self contain the trip initialization from the device tree in a single function for the sake of making the code flow more clear. Cc: Alexandre Bailon Cc: Kevin Hilman Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20220722200007.1839356-11-daniel.lezcano@linexp.org Signed-off-by: Daniel Lezcano drivers/thermal/thermal_of.c | 86 +++++++++++++++++++++++++++++--------------- 1 file changed, 57 insertions(+), 29 deletions(-) commit 14ccb5edd76e40259d8c1bd8f984cfc9016e1633 Author: Daniel Lezcano Date: Fri Jul 22 22:00:06 2022 +0200 thermal/of: Use thermal trips stored in the thermal zone Now that we have the thermal trip stored in the thermal zone in a generic way, we can rely on them and remove one indirection we found in the thermal_of code and do one more step forward the removal of the duplicated structures. Cc: Alexandre Bailon Cc: Kevin Hilman Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20220722200007.1839356-10-daniel.lezcano@linexp.org Signed-off-by: Daniel Lezcano drivers/thermal/thermal_of.c | 53 +++++++++++++------------------------------- 1 file changed, 16 insertions(+), 37 deletions(-) commit fae11de507f0e420ba3733729317559e7cea6274 Author: Daniel Lezcano Date: Fri Jul 22 22:00:05 2022 +0200 thermal/core: Add thermal_trip in thermal_zone The thermal trip points are properties of a thermal zone and the different sub systems should be able to save them in the thermal zone structure instead of having their own definition. Give the opportunity to the drivers to create a thermal zone with thermal trips which will be accessible directly from the thermal core framework. As we added the thermal trip points structure in the thermal zone, let's extend the thermal zone register function to have the thermal trip structures as a parameter and store it in the 'trips' field of the thermal zone structure. The thermal zone contains the trip point, we can store them directly when registering the thermal zone. That will allow another step forward to remove the duplicate thermal zone structure we find in the thermal_of code. Cc: Alexandre Bailon Cc: Kevin Hilman Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20220722200007.1839356-9-daniel.lezcano@linexp.org Signed-off-by: Daniel Lezcano drivers/thermal/thermal_core.c | 22 +++++++++++++++++----- drivers/thermal/thermal_of.c | 8 +++----- include/linux/thermal.h | 8 ++++++++ 3 files changed, 28 insertions(+), 10 deletions(-) commit e5bfcd30f88fdb0ce830229e7ccdeddcb7a59b04 Author: Daniel Lezcano Date: Fri Jul 22 22:00:04 2022 +0200 thermal/core: Rename 'trips' to 'num_trips' In order to use thermal trips defined in the thermal structure, rename the 'trips' field to 'num_trips' to have the 'trips' field containing the thermal trip points. Cc: Alexandre Bailon Cc: Kevin Hilman Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20220722200007.1839356-8-daniel.lezcano@linexp.org Signed-off-by: Daniel Lezcano drivers/thermal/gov_fair_share.c | 6 +++--- drivers/thermal/gov_power_allocator.c | 4 ++-- drivers/thermal/tegra/tegra30-tsensor.c | 2 +- drivers/thermal/thermal_core.c | 20 ++++++++++---------- drivers/thermal/thermal_helpers.c | 4 ++-- drivers/thermal/thermal_netlink.c | 2 +- drivers/thermal/thermal_sysfs.c | 22 +++++++++++----------- include/linux/thermal.h | 4 ++-- 8 files changed, 32 insertions(+), 32 deletions(-) commit e5f2cda61d068e14af95ed8ee74c80e565af3f29 Author: Daniel Lezcano Date: Fri Jul 22 22:00:03 2022 +0200 thermal/core: Move thermal_set_delay_jiffies to static The function 'thermal_set_delay_jiffies' is only used in thermal_core.c but it is defined and implemented in a separate file. Move the function to thermal_core.c and make it static. Cc: Alexandre Bailon Cc: Kevin Hilman Signed-off-by: Daniel Lezcano Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/20220722200007.1839356-7-daniel.lezcano@linexp.org Signed-off-by: Daniel Lezcano drivers/thermal/thermal_core.c | 7 +++++++ drivers/thermal/thermal_core.h | 1 - drivers/thermal/thermal_helpers.c | 7 ------- 3 files changed, 7 insertions(+), 8 deletions(-) commit 6390383b67fab6bfa652a39e87e904bfc3066235 Author: Daniel Lezcano Date: Fri Jul 22 22:00:02 2022 +0200 thermal/core: Remove unneeded EXPORT_SYMBOLS Different functions are exporting the symbols but are actually only used by the thermal framework internals. Remove these EXPORT_SYMBOLS. Cc: Alexandre Bailon Cc: Kevin Hilman Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20220722200007.1839356-6-daniel.lezcano@linexp.org Signed-off-by: Daniel Lezcano drivers/thermal/thermal_helpers.c | 2 -- 1 file changed, 2 deletions(-) commit 646274ddaf756dc549fc98cc581fc1ce4fef517a Author: Daniel Lezcano Date: Fri Jul 22 22:00:01 2022 +0200 thermal/of: Move thermal_trip structure to thermal.h The structure thermal_trip is now generic and will be usable by the different sensor drivers in place of their own structure. Move its definition to thermal.h to make it accessible. Cc: Alexandre Bailon Cc: Kevin Hilman Signed-off-by: Daniel Lezcano Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/20220722200007.1839356-5-daniel.lezcano@linexp.org Signed-off-by: Daniel Lezcano drivers/thermal/thermal_core.h | 12 ------------ include/linux/thermal.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) commit af9f251b8e396eca8355904ad8a4361a95af4e61 Author: Daniel Lezcano Date: Fri Jul 22 22:00:00 2022 +0200 thermal/of: Remove the device node pointer for thermal_trip The device node pointer is no longer needed in the thermal trip structure, remove it. Cc: Alexandre Bailon Cc: Kevin Hilman Signed-off-by: Daniel Lezcano Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/20220722200007.1839356-4-daniel.lezcano@linexp.org Signed-off-by: Daniel Lezcano drivers/thermal/thermal_core.h | 2 -- drivers/thermal/thermal_of.c | 8 -------- 2 files changed, 10 deletions(-) commit a3193edcbdf9a8ae73b6e1f2da96e920582c1849 Author: Daniel Lezcano Date: Fri Jul 22 21:59:59 2022 +0200 thermal/of: Replace device node match with device node search The thermal_of code builds a trip array associated with the node pointer in order to compare the trip point phandle with the list. The thermal trip is a thermal zone property and should be moved there. If some sensors have hardcoded trip points, they should use the exported structure instead of redefining again and again their own structure and data to describe exactly the same things. In order to move this to the thermal.h header and allow more cleanup, we need to remove the node pointer from the structure. Instead of building storing the device node, we search directly in the device tree the corresponding node. That results in a simplification of the code and allows to move the structure to thermal.h Cc: Alexandre Bailon Cc: Kevin Hilman Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20220722200007.1839356-3-daniel.lezcano@linexp.org Signed-off-by: Daniel Lezcano drivers/thermal/thermal_of.c | 64 ++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 20 deletions(-) commit 3f95ac324535eafafd436d35bf58f0319dd4a70b Author: Daniel Lezcano Date: Fri Jul 22 21:59:58 2022 +0200 thermal/core: Remove duplicate information when an error occurs The pr_err already tells it is an error, it is pointless to add the 'Error:' string in the messages. Remove them. Cc: Alexandre Bailon Cc: Kevin Hilman Signed-off-by: Daniel Lezcano Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/20220722200007.1839356-2-daniel.lezcano@linexp.org Signed-off-by: Daniel Lezcano drivers/thermal/thermal_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 50e53291e9f188a44652f11606ae6b544facdccc Author: Daniel Lezcano Date: Mon Jul 18 16:50:36 2022 +0200 thermal/core: Avoid calling ->get_trip_temp() unnecessarily As the trip temperature is already available when calling the function handle_critical_trips(), pass it as a parameter instead of having this function calling the ops again to retrieve the same data. Reviewed-by: Lukasz Luba Reviewed-by: Zhang Rui Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20220718145038.1114379-2-daniel.lezcano@linaro.org drivers/thermal/thermal_core.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 7a12f9188529d9529704b54ca51d3b6ef4a14094 Author: Slark Xiao Date: Fri Jul 22 18:40:47 2022 +0800 thermal/tools/tmon: Fix typo 'the the' in comment Replace 'the the' with 'the' in the comment. Signed-off-by: Slark Xiao Link: https://lore.kernel.org/r/20220722104047.83312-1-slark_xiao@163.com Signed-off-by: Daniel Lezcano tools/thermal/tmon/pid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0cf51bfe999524377fbb71becb583b4ca6d07cfc Author: Markus Mayer Date: Sun Jul 17 20:10:39 2022 -0700 thermal/tools/tmon: Include pthread and time headers in tmon.h Include sys/time.h and pthread.h in tmon.h, so that types "pthread_mutex_t" and "struct timeval tv" are known when tmon.h references them. Without these headers, compiling tmon against musl-libc will fail with these errors: In file included from sysfs.c:31:0: tmon.h:47:8: error: unknown type name 'pthread_mutex_t' extern pthread_mutex_t input_lock; ^~~~~~~~~~~~~~~ make[3]: *** [: sysfs.o] Error 1 make[3]: *** Waiting for unfinished jobs.... In file included from tui.c:31:0: tmon.h:54:17: error: field 'tv' has incomplete type struct timeval tv; ^~ make[3]: *** [: tui.o] Error 1 make[2]: *** [Makefile:83: tmon] Error 2 Signed-off-by: Markus Mayer Acked-by: Florian Fainelli Reviewed-by: Sumeet Pawnikar Acked-by: Alejandro González Tested-by: Alejandro González Fixes: 94f69966faf8 ("tools/thermal: Introduce tmon, a tool for thermal subsystem") Link: https://lore.kernel.org/r/20220718031040.44714-1-f.fainelli@gmail.com Signed-off-by: Daniel Lezcano tools/thermal/tmon/tmon.h | 3 +++ 1 file changed, 3 insertions(+) commit 8b74a003a94134c791fb9bb3d474d1bce6a05b2d Author: Jason Wang Date: Fri Jul 15 13:18:29 2022 +0800 thermal/ti-soc-thermal: Fix comment typo The double `and' is duplicated in line 229, remove one. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20220715051829.30927-1-wangborong@cdjrlc.com Signed-off-by: Daniel Lezcano drivers/thermal/ti-soc-thermal/ti-bandgap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee35f721477a96cd7a5ee8b0d24507ff4e67fa65 Author: Dmitry Baryshkov Date: Tue Jul 19 08:49:40 2022 +0300 thermal/drivers/qcom/spmi-adc-tm5: Register thermal zones as hwmon sensors Register thermal zones as hwmon sensors to let userspace read temperatures using standard hwmon interface. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bhupesh Sharma Link: https://lore.kernel.org/r/20220719054940.755907-2-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 5 +++++ 1 file changed, 5 insertions(+) commit fb55b0129787ec98eace23ddccd429188d318574 Author: Dmitry Baryshkov Date: Tue Jul 19 08:49:39 2022 +0300 thermal/drivers/qcom/temp-alarm: Register thermal zones as hwmon sensors Register thermal zones as hwmon sensors to let userspace read temperatures using standard hwmon interface. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bhupesh Sharma Link: https://lore.kernel.org/r/20220719054940.755907-1-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8cf18eea46e24a337c5a095edeed42ca03e97811 Author: Yang Li Date: Tue Jul 19 08:35:56 2022 +0800 thermal/drivers/u8500: Remove unnecessary print function dev_err() The print function dev_err() is redundant because platform_get_irq() already prints an error. Eliminate the follow coccicheck warnings: ./drivers/thermal/db8500_thermal.c:162:2-9: line 162 is redundant because platform_get_irq() already prints an error ./drivers/thermal/db8500_thermal.c:176:2-9: line 176 is redundant because platform_get_irq() already prints an error Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20220719003556.74460-1-yang.lee@linux.alibaba.com Signed-off-by: Daniel Lezcano drivers/thermal/db8500_thermal.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 8f5a9371e69664cf4ad22a84204340323d5165cc Author: Biju Das Date: Mon Jul 18 13:14:40 2022 +0100 thermal/drivers/rzg2l: Fix comments This patch replaces 'Capture times'->'Total number of ADC data samples' as the former does not really explain much. It also fixes the typo * caliberation->calibration Lastly, as per the coding style /* should be on a separate line. This patch fixes this issue. Reported-by: Pavel Machek Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20220718121440.556408-1-biju.das.jz@bp.renesas.com Signed-off-by: Daniel Lezcano drivers/thermal/rzg2l_thermal.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 11188b439974b8ef8fe8c4c6df6ab8b6486c8c45 Author: Julia Lawall Date: Sat May 21 13:10:46 2022 +0200 thermal/drivers/sun8i: Fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Vasily Khoruzhick Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220521111145.81697-36-Julia.Lawall@inria.fr Signed-off-by: Daniel Lezcano drivers/thermal/sun8i_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4aaec53b84418e83fcee6907fcff177df1f12f44 Author: Jin Xiaoyun Date: Mon Jun 13 14:31:11 2022 +0800 thermal/drivers/k3_j72xx_bandgap: Make k3_j72xx_bandgap_j721e_data and k3_j72xx_bandgap_j7200_data static Fix sparse warnings: drivers/thermal/k3_j72xx_bandgap.c:532:36: sparse: sparse: symbol 'k3_j72xx_bandgap_j721e_data' was not declared. Should it be static? drivers/thermal/k3_j72xx_bandgap.c:536:36: sparse: sparse: symbol 'k3_j72xx_bandgap_j7200_data' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jin Xiaoyun Link: https://lore.kernel.org/r/20220613063111.654893-1-jinxiaoyun2@huawei.com Signed-off-by: Daniel Lezcano drivers/thermal/k3_j72xx_bandgap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cc67ca28cf8b29245b71e01117927ed2793f35b7 Author: Dan Carpenter Date: Fri May 20 18:02:39 2022 +0300 thermal/drivers/k3_j72xx_bandgap: Fix array underflow in prep_lookup_table() This while loop exits with "i" set to -1 and so then it sets: derived_table[-1] = derived_table[0] - 300; There is no need for this assignment at all. Just delete it. Fixes: 72b3fc61c752 ("thermal: k3_j72xx_bandgap: Add the bandgap driver support") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YoetjwcOEzYEFp9b@kili Signed-off-by: Daniel Lezcano drivers/thermal/k3_j72xx_bandgap.c | 2 -- 1 file changed, 2 deletions(-) commit 99a049aace3257cf7644c3bbf67cb1a655248cc2 Author: Bryan Brattlof Date: Wed May 25 16:36:17 2022 -0500 thermal/drivers/k3_j72xx_bandgap: Fix ref_table memory leak during probe If an error occurs in the k3_j72xx_bandgap_probe() function the memory allocated to the 'ref_table' will not be released. Add a err_free_ref_table step to the error path to free 'ref_table' Fixes: 72b3fc61c752 ("thermal: k3_j72xx_bandgap: Add the bandgap driver support") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Bryan Brattlof Reviewed-by: Keerthy Link: https://lore.kernel.org/r/20220525213617.30002-1-bb@ti.com Signed-off-by: Daniel Lezcano drivers/thermal/k3_j72xx_bandgap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 4102c4042a33c682021683ec26c2dca3fd9d7cc2 Author: Daniel Lezcano Date: Wed Jun 29 17:10:12 2022 +0200 thermal/core: Remove DROP_FULL and RAISE_FULL The trends DROP_FULL and RAISE_FULL are not used and were never used in the past AFAICT. Remove these conditions as they seems to not be handled anywhere. Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20220629151012.3115773-2-daniel.lezcano@linaro.org Signed-off-by: Daniel Lezcano drivers/thermal/gov_step_wise.c | 11 ----------- include/linux/thermal.h | 2 -- 2 files changed, 13 deletions(-) commit 25bff3ed9a8aaee45c3b554cca58673f1bea1bdc Author: Daniel Lezcano Date: Wed Jun 29 17:10:11 2022 +0200 thermal/core: Use clamp() helper in the stepwise governor The code is actually clampling the next cooling device state using the lowest and highest states of the thermal instance. That code can be replaced by the clamp() macro which does exactly the same. It results in a simpler routine to read. Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20220629151012.3115773-1-daniel.lezcano@linaro.org Signed-off-by: Daniel Lezcano drivers/thermal/gov_step_wise.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 66a0b101efca70097a14aece9c76bc24cd0da119 Author: Daniel Lezcano Date: Thu Jun 16 22:25:37 2022 +0200 thermal/drivers/u8500: Remove the get_trend function The get_trend function relies on the interrupt to set the raising or dropping trend. However the interpolated temperature is already giving the temperature information to the thermal framework which is able to deduce the trend. Remove the trend code. Signed-off-by: Daniel Lezcano Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20220616202537.303655-3-daniel.lezcano@linaro.org Signed-off-by: Daniel Lezcano drivers/thermal/db8500_thermal.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) commit afbeb99e2e33df7cb0833f94128320989c58d6d2 Author: Daniel Lezcano Date: Thu Jun 16 22:25:36 2022 +0200 thermal/drivers/tegra: Remove get_trend function The get_trend function does already what the generic framework does. Remove it. Signed-off-by: Daniel Lezcano Tested-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20220616202537.303655-2-daniel.lezcano@linaro.org Signed-off-by: Daniel Lezcano drivers/thermal/tegra/soctherm.c | 32 -------------------------------- 1 file changed, 32 deletions(-) commit 198fa45252d84baea593456cfda01deeb9dff13f Author: Daniel Lezcano Date: Thu Jun 16 22:25:35 2022 +0200 thermal/drivers/qcom: Remove get_trend function There is a get_trend function which is a wrapper to call a private get_trend function. However, this private get_trend function is not assigned anywhere. Remove this dead code. Signed-off-by: Daniel Lezcano Acked-by: Amit Kucheria Link: https://lore.kernel.org/r/20220616202537.303655-1-daniel.lezcano@linaro.org Signed-off-by: Daniel Lezcano drivers/thermal/qcom/tsens.c | 12 ------------ drivers/thermal/qcom/tsens.h | 2 -- 2 files changed, 14 deletions(-) commit 83b4466b3f1b00da0cbc754e055e89a7b02b2034 Author: Wolfram Sang Date: Fri Jun 10 22:17:01 2022 +0200 dt-bindings: thermal: rcar-gen3-thermal: Add r8a779f0 support Add support for R-Car S4. The S4 IP differs a bit from its siblings in such way that it has 3 out of 4 TSC nodes for Linux and the interrupts are not routed to the INTC-AP but to the ECM. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220610201701.7946-2-wsa+renesas@sang-engineering.com Signed-off-by: Daniel Lezcano .../bindings/thermal/rcar-gen3-thermal.yaml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 3c1fa94cd0baca8d573aead43f33785eca66ed42 Author: Wolfram Sang Date: Fri Jun 10 22:17:00 2022 +0200 dt-bindings: thermal: rcar-gen3-thermal: use positive logic When handling the V3U/r8a779a0 exception, avoid using 'not:' because then its subschemas are far away in the 'else:' branch. Keep them together using positive logic. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20220610201701.7946-1-wsa+renesas@sang-engineering.com Signed-off-by: Daniel Lezcano .../bindings/thermal/rcar-gen3-thermal.yaml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit f16d37056be2feeae0680b3675b95ae876ab8c5c Author: Krzysztof Kozlowski Date: Wed Jun 8 13:27:01 2022 +0200 dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema Convert the Qualcomm QPNP PMIC Temperature Alarm to DT Schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220608112702.80873-1-krzysztof.kozlowski@linaro.org Signed-off-by: Daniel Lezcano .../bindings/thermal/qcom,spmi-temp-alarm.yaml | 85 ++++++++++++++++++++++ .../bindings/thermal/qcom-spmi-temp-alarm.txt | 51 ------------- 2 files changed, 85 insertions(+), 51 deletions(-) commit 404dd7dfb13028d315514f63ed3cf9da46307a39 Author: Wolfram Sang Date: Fri Jun 10 22:04:59 2022 +0200 drivers/thermal/rcar_gen3_thermal: Improve logging during probe When setting up a new board, a plain "Can't register thermal zone" didn't help me much because the thermal zones in DT were all fine. I just had a sensor entry too much in the parent TSC node. Reword the failure/success messages to contain the sensor number to make it easier to understand which sensor is affected. Example output now: rcar_gen3_thermal e6198000.thermal: Sensor 0: Loaded 1 trip points rcar_gen3_thermal e6198000.thermal: Sensor 1: Loaded 1 trip points rcar_gen3_thermal e6198000.thermal: Sensor 2: Loaded 1 trip points rcar_gen3_thermal e6198000.thermal: Sensor 3: Can't register thermal zone Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20220610200500.6727-1-wsa+renesas@sang-engineering.com Signed-off-by: Daniel Lezcano drivers/thermal/rcar_gen3_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 037a6ea0debbe3da3f5cef311d835fb7f1a5e2c7 Author: Lukas Bulwahn Date: Mon Jun 13 14:43:09 2022 +0200 MAINTAINERS: add include/dt-bindings/thermal to THERMAL Maintainers of the directory Documentation/devicetree/bindings/thermal are also the maintainers of the corresponding directory include/dt-bindings/thermal. Add the file entry for include/dt-bindings/thermal to the appropriate section in MAINTAINERS. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220613124309.28790-1-lukas.bulwahn@gmail.com Signed-off-by: Daniel Lezcano MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 829f416643f9738b0fda9e3f1bf8712113f61a23 Author: Lukasz Luba Date: Mon Jun 13 13:43:27 2022 +0100 drivers/thermal/devfreq_cooling: Extend the devfreq_cooling_device with ops Remove unneeded global variable devfreq_cooling_ops which is used only as a copy pattern. Instead, extend the struct devfreq_cooling_device with the needed ops structure. This also simplifies the allocation/free code during the setup/cleanup. Signed-off-by: Lukasz Luba Link: https://lore.kernel.org/r/20220613124327.30766-5-lukasz.luba@arm.com Signed-off-by: Daniel Lezcano drivers/thermal/devfreq_cooling.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) commit 9784d2fbb858ec0dd8d0032293aa06fa736d6ea2 Author: Lukasz Luba Date: Mon Jun 13 13:43:26 2022 +0100 drivers/thermal/cpufreq_cooling: Update outdated comments The code has moved and left some comments stale. Update them where there is a need. Acked-by: Viresh Kumar Signed-off-by: Lukasz Luba Link: https://lore.kernel.org/r/20220613124327.30766-4-lukasz.luba@arm.com Signed-off-by: Daniel Lezcano drivers/thermal/cpufreq_cooling.c | 44 ++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 26 deletions(-) commit 3f7ced7ac9af43fbc0b886aa9ef4397a5fa4b6e1 Author: Lukasz Luba Date: Mon Jun 13 13:43:25 2022 +0100 drivers/thermal/cpufreq_cooling : Refactor thermal_power_cpu_get_power tracing Simplify the thermal_power_cpu_get_power trace event by removing complicated cpumask and variable length array. Now the tools parsing trace output don't have to hassle to get this power data. The simplified format version uses 'policy->cpu'. Remove also the 'load' information completely since there is very little value of it in this trace event. To get the CPUs' load (or utilization) there are other dedicated trace hooks in the kernel. This patch also simplifies and speeds-up the main cooling code when that trace event is enabled. Rename the trace event to avoid confusion of tools which parse the trace file. Acked-by: Viresh Kumar Signed-off-by: Lukasz Luba Link: https://lore.kernel.org/r/20220613124327.30766-3-lukasz.luba@arm.com Signed-off-by: Daniel Lezcano drivers/thermal/cpufreq_cooling.c | 18 +----------------- include/trace/events/thermal.h | 28 ++++++++-------------------- 2 files changed, 9 insertions(+), 37 deletions(-) commit 3cbf6a8ab70b21de75bc389d384911392cf7f616 Author: Lukasz Luba Date: Mon Jun 13 13:43:24 2022 +0100 drivers/thermal/cpufreq_cooling: Use private callback ops for each cooling device It is very unlikely that one CPU cluster would have the EM and some other won't have it (because EM registration failed or DT lacks needed entry). Although, we should avoid modifying global variable with callbacks anyway. Redesign this and add safety for such situation. Signed-off-by: Lukasz Luba Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20220613124327.30766-2-lukasz.luba@arm.com Signed-off-by: Daniel Lezcano drivers/thermal/cpufreq_cooling.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 014482b667d3550d7a610c5f11b6351fe47eb39a Author: Jason Wang Date: Fri Jul 15 13:44:01 2022 +0800 tty: amiserial: Fix comment typo The double `should' is duplicated in line 15, remove one. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20220715054401.9870-1-wangborong@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/tty/amiserial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2d57765b79857264fb0ddc52679d661b60ecc21 Author: Fabio M. De Francesco Date: Fri Jul 15 01:50:30 2022 +0200 firmware_loader: Replace kmap() with kmap_local_page() The use of kmap() is being deprecated in favor of kmap_local_page(). Two main problems with kmap(): (1) It comes with an overhead as mapping space is restricted and protected by a global lock for synchronization and (2) kmap() also requires global TLB invalidation when the kmap’s pool wraps and it might block when the mapping space is fully utilized until a slot becomes available. kmap_local_page() is preferred over kmap() and kmap_atomic(). Where it cannot mechanically replace the latters, code refactor should be considered (special care must be taken if kernel virtual addresses are aliases in different contexts). With kmap_local_page() the mappings are per thread, CPU local, can take page faults, and can be called from any context (including interrupts). Call kmap_local_page() in firmware_loader wherever kmap() is currently used. In firmware_rw() use the helpers copy_{from,to}_page() instead of open coding the local mappings + memcpy(). Successfully tested with "firmware" selftests on a QEMU/KVM 32-bits VM with 4GB RAM, booting a kernel with HIGHMEM64GB enabled. Cc: Greg Kroah-Hartman Cc: Luis Chamberlain Suggested-by: Ira Weiny Reviewed-by: Takashi Iwai Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20220714235030.12732-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/main.c | 4 ++-- drivers/base/firmware_loader/sysfs.c | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) commit b18ee4a44e3ff21936d35a9b215cfd6cd5f3af9a Author: Slark Xiao Date: Thu Jul 21 10:06:23 2022 +0800 sysfs docs: ABI: Fix typo in comment Fix typo in the comment Signed-off-by: Slark Xiao Link: https://lore.kernel.org/r/20220721020623.20974-1-slark_xiao@163.com Signed-off-by: Greg Kroah-Hartman Documentation/ABI/stable/sysfs-module | 2 +- Documentation/ABI/testing/sysfs-class-rtrs-client | 2 +- Documentation/ABI/testing/sysfs-class-rtrs-server | 2 +- Documentation/ABI/testing/sysfs-devices-platform-ACPI-TAD | 2 +- Documentation/ABI/testing/sysfs-devices-power | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit b6c694740ea21620c2b86ad37be2c0dc7051a48c Author: Randy Dunlap Date: Thu Jul 14 18:59:59 2022 -0700 kobject: fix Kconfig.debug "its" grammar Use the possessive "its" instead of the contraction "it's" where appropriate. Cc: Russell King Cc: Greg Kroah-Hartman Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20220715015959.12657-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f38e6458e16df7bac3871f4e69f9681c0b3c58bd Merge: cf33ce6f0c22 30097967e056 Author: Takashi Iwai Date: Thu Jul 28 16:28:24 2022 +0200 Merge tag 'asoc-fix-v5.19-rc8' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.19 A few more small fixes, they could all wait for the merge window if you prefer. commit 5c850d31880e00f063fa2a3746ba212c4bcc510f Author: Tianyu Lan Date: Thu Jul 28 03:24:20 2022 -0400 swiotlb: fix passing local variable to debugfs_create_ulong() Debugfs node will be run-timely checked and so local variable should be not passed to debugfs_create_ulong(). Fix it via debugfs_create_file() to create io_tlb_used node and calculate used io tlb number with fops_io_tlb_used attribute. Fixes: 20347fca71a3 ("swiotlb: split up the global swiotlb lock") Signed-off-by: Tianyu Lan Signed-off-by: Christoph Hellwig kernel/dma/swiotlb.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 8419702489f3be7f9e4fcf12c04d9d3f00114d35 Author: Logan Gunthorpe Date: Wed Jul 27 13:15:22 2022 -0600 dma-mapping: reformat comment to suppress htmldoc warning make html doc reports a cryptic warning with the commit named below: kernel/dma/mapping.c:258: WARNING: Option list ends without a blank line; unexpected unindent. Seems the parser is a bit fussy about the tabbing and having a single space tab causes the warning. To suppress the warning add another tab to the list and reindent everything. Fixes: 7c2645a2a30a ("dma-mapping: allow EREMOTEIO return code for P2PDMA transfers") Signed-off-by: Logan Gunthorpe Signed-off-by: Christoph Hellwig kernel/dma/mapping.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit b5276c924497705ca927ad85a763c37f2de98349 Author: Justin Stitt Date: Thu Jul 21 14:57:06 2022 -0700 drivers: lkdtm: fix clang -Wformat warning When building with Clang we encounter the following warning (ARCH=hexagon + CONFIG_FRAME_WARN=0): | ../drivers/misc/lkdtm/bugs.c:107:3: error: format specifies type | 'unsigned long' but the argument has type 'int' [-Werror,-Wformat] | REC_STACK_SIZE, recur_count); | ^~~~~~~~~~~~~~ Cast REC_STACK_SIZE to `unsigned long` to match format specifier `%lu` as well as maintain symmetry with `#define REC_STACK_SIZE (_AC(CONFIG_FRAME_WARN, UL) / 2)`. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Fixes: 24cccab42c419 ("lkdtm/bugs: Adjust recursion test to avoid elision") Reported-by: Nathan Chancellor Suggested-by: Nathan Chancellor Suggested-by: Nick Desaulniers Tested-by: Nathan Chancellor Reviewed-by: Nathan Chancellor Acked-by: Kees Cook Signed-off-by: Justin Stitt Link: https://lore.kernel.org/r/20220721215706.4153027-1-justinstitt@google.com Signed-off-by: Greg Kroah-Hartman drivers/misc/lkdtm/bugs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1208ec59eac7d9fceb016c7b565d48838776f779 Author: Thomas Bogendoerfer Date: Sat Jul 16 15:08:01 2022 +0200 char: remove VR41XX related char driver Commit d3164e2f3b0a ("MIPS: Remove VR41xx support") removed support for MIPS VR41xx platform, so remove exclusive drivers for this platform, too. Signed-off-by: Thomas Bogendoerfer Link: https://lore.kernel.org/r/20220716130802.11660-1-tsbogend@alpha.franken.de Signed-off-by: Greg Kroah-Hartman drivers/char/Kconfig | 5 - drivers/char/Makefile | 1 - drivers/char/tb0219.c | 359 -------------------------------------------------- 3 files changed, 365 deletions(-) commit f2d3b9a46e0ed4742abaa00506b18bb2ca9179d8 Author: Saravana Kannan Date: Wed Jul 27 19:19:35 2022 +0100 ARM: 9220/1: amba: Remove deferred device addition The uevents generated for an amba device need PID and CID information that's available only when the amba device is powered on, clocked and out of reset. So, if those resources aren't available, the information can't be read to generate the uevents. To workaround this requirement, if the resources weren't available, the device addition was deferred and retried periodically. However, this deferred addition retry isn't based on resources becoming available. Instead, it's retried every 5 seconds and causes arbitrary probe delays for amba devices and their consumers. Also, maintaining a separate deferred-probe like mechanism is maintenance headache. With this commit, instead of deferring the device addition, we simply defer the generation of uevents for the device and probing of the device (because drivers needs PID and CID to match) until the PID and CID information can be read. This allows us to delete all the amba specific deferring code and also avoid the arbitrary probing delays. Cc: Rob Herring Cc: Ulf Hansson Cc: Saravana Kannan Cc: Linus Walleij Cc: Sudeep Holla Cc: Nicolas Saenz Julienne Cc: Geert Uytterhoeven Cc: Marek Szyprowski Cc: Kefeng Wang Cc: Greg Kroah-Hartman Cc: patches@armlinux.org.uk Signed-off-by: Saravana Kannan Tested-by: Marek Szyprowski Tested-by: Kefeng Wang Tested-by: Sudeep Holla Signed-off-by: Russell King (Oracle) drivers/amba/bus.c | 313 +++++++++++++++++++++++++---------------------------- 1 file changed, 145 insertions(+), 168 deletions(-) commit fe520635ddc4377e84f78c6cf1c54393f1dfa33b Author: Ben Dooks Date: Sun Jul 24 23:39:22 2022 +0100 ARM: 9219/1: fix undeclared soft_restart The soft_restart() is declared in so include that to fix the following sparse warning: arch/arm/kernel/reboot.c:78:6: warning: symbol 'soft_restart' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Russell King (Oracle) arch/arm/kernel/reboot.c | 1 + 1 file changed, 1 insertion(+) commit 3437021484dd8f71685012d47c2d2de6f020e943 Author: Ben Dooks Date: Sun Jul 24 23:39:21 2022 +0100 ARM: 9218/1: dma-mapping: fix pointer/integer warning Fix the use of a pointer assignment from integer where false is being used instead of NULL. Fix the following warning by usign NULL: arch/arm/mm/dma-mapping.c:712:52: warning: Using plain integer as NULL pointer Signed-off-by: Ben Dooks Signed-off-by: Russell King (Oracle) arch/arm/mm/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b97abb4d0e23766650619a6a57a52c91deb89b8a Author: Ben Dooks Date: Sun Jul 24 23:39:20 2022 +0100 ARM: 9217/1: add definition of arch_irq_work_raise() The arm does not define arch_irq_work_raise() so is triggering the following sparse warning. Add a definiton to fix this: kernel/irq_work.c:70:13: warning: symbol 'arch_irq_work_raise' was not declared. Should it be static? arch/arm/kernel/smp.c:582:6: warning: symbol 'arch_irq_work_raise' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Russell King (Oracle) arch/arm/include/asm/irq_work.h | 2 ++ 1 file changed, 2 insertions(+) commit 8fa7ea40bf56945c3ff5af00c0dca1fd9e26f129 Author: Lecopzer Chen Date: Wed Apr 27 15:30:00 2022 +0100 ARM: 9203/1: kconfig: fix MODULE_PLTS for KASAN with KASAN_VMALLOC When we run out of module space address with ko insertion, and with MODULE_PLTS, module would turn to try to find memory from VMALLOC address space. Unfortunately, with KASAN enabled, VMALLOC doesn't work without KASAN_VMALLOC, thus select KASAN_VMALLOC by default. 8<--- cut here --- Unable to handle kernel paging request at virtual address bd300860 [bd300860] *pgd=41cf1811, *pte=41cf26df, *ppte=41cf265f Internal error: Oops: 80f [#1] PREEMPT SMP ARM Modules linked in: hello(O+) CPU: 0 PID: 89 Comm: insmod Tainted: G O 5.16.0-rc6+ #19 Hardware name: Generic DT based system PC is at mmioset+0x30/0xa8 LR is at 0x0 pc : [] lr : [<00000000>] psr: 20000013 sp : c451fc18 ip : bd300860 fp : c451fc2c r10: f18042cc r9 : f18042d0 r8 : 00000000 r7 : 00000001 r6 : 00000003 r5 : 01312d00 r4 : f1804300 r3 : 00000000 r2 : 00262560 r1 : 00000000 r0 : bd300860 Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 43e9406a DAC: 00000051 Register r0 information: non-paged memory Register r1 information: NULL pointer Register r2 information: non-paged memory Register r3 information: NULL pointer Register r4 information: 4887-page vmalloc region starting at 0xf1802000 allocated at load_module+0x14f4/0x32a8 Register r5 information: non-paged memory Register r6 information: non-paged memory Register r7 information: non-paged memory Register r8 information: NULL pointer Register r9 information: 4887-page vmalloc region starting at 0xf1802000 allocated at load_module+0x14f4/0x32a8 Register r10 information: 4887-page vmalloc region starting at 0xf1802000 allocated at load_module+0x14f4/0x32a8 Register r11 information: non-slab/vmalloc memory Register r12 information: non-paged memory Process insmod (pid: 89, stack limit = 0xc451c000) Stack: (0xc451fc18 to 0xc4520000) fc00: f18041f0 c04803a4 fc20: c451fc44 c451fc30 c048053c c0480358 f1804030 01312cff c451fc64 c451fc48 fc40: c047f330 c0480500 f18040c0 c1b52ccc 00000001 c5be7700 c451fc74 c451fc68 fc60: f1802098 c047f300 c451fcb4 c451fc78 c026106c f180208c c4880004 00000000 fc80: c451fcb4 bf001000 c044ff48 c451fec0 f18040c0 00000000 c1b54cc4 00000000 fca0: c451fdf0 f1804268 c451fe64 c451fcb8 c0264e88 c0260d48 ffff8000 00007fff fcc0: f18040c0 c025cd00 c451fd14 00000003 0157f008 f1804258 f180425c f1804174 fce0: f1804154 f180424c f18041f0 f180414c f1804178 f18041c0 bf0025d4 188a3fa8 fd00: 0000009e f1804170 f2b18000 c451ff10 c0d92e40 f180416c c451feec 00000001 fd20: 00000000 c451fec8 c451fe20 c451fed0 f18040cc 00000000 f17ea000 c451fdc0 fd40: 41b58ab3 c1387729 c0261c28 c047fb5c c451fe2c c451fd60 c0525308 c048033c fd60: 188a3fb4 c3ccb090 c451fe00 c3ccb080 00000000 00000000 00016920 00000000 fd80: c02d0388 c047f55c c02d0388 00000000 c451fddc c451fda0 c02d0388 00000000 fda0: 41b58ab3 c13a72d0 c0524ff0 c1705f48 c451fdfc c451fdc0 c02d0388 c047f55c fdc0: 00016920 00000000 00000003 c1bb2384 c451fdfc c3ccb080 c1bb2384 00000000 fde0: 00000000 00000000 00000000 00000000 c451fe1c c451fe00 c04e9d70 c1705f48 fe00: c1b54cc4 c1bbc71c c3ccb080 00000000 c3ccb080 00000000 00000003 c451fec0 fe20: c451fe64 c451fe30 c0525918 c0524ffc c451feb0 c1705f48 00000000 c1b54cc4 fe40: b78a3fd0 c451ff60 00000000 0157f008 00000003 c451fec0 c451ffa4 c451fe68 fe60: c0265480 c0261c34 c451feb0 7fffffff 00000000 00000002 00000000 c4880000 fe80: 41b58ab3 c138777b c02652cc c04803ec 000a0000 c451ff00 ffffff9c b6ac9f60 fea0: c451fed4 c1705f48 c04a4a90 b78a3fdc f17ea000 ffffff9c b6ac9f60 c0100244 fec0: f17ea21a f17ea300 f17ea000 00016920 f1800240 f18000ac f17fb7dc 01316000 fee0: 013161b0 00002590 01316250 00000000 00000000 00000000 00002580 00000029 ff00: 0000002a 00000013 00000000 0000000c 00000000 00000000 0157f004 c451ffb0 ff20: c1719be0 aed6f410 c451ff74 c451ff38 c0c4103c c0c407d0 c451ff84 c451ff48 ff40: 00000805 c02c8658 c1604230 c1719c30 00000805 0157f004 00000005 c451ffb0 ff60: c1719be0 aed6f410 c451ffac c451ff78 c0122130 c1705f48 c451ffac 0157f008 ff80: 00000006 0000005f 0000017b c0100244 c4880000 0000017b 00000000 c451ffa8 ffa0: c0100060 c02652d8 0157f008 00000006 00000003 0157f008 00000000 b6ac9f60 ffc0: 0157f008 00000006 0000005f 0000017b 00000000 00000000 aed85f74 00000000 ffe0: b6ac9cd8 b6ac9cc8 00030200 aecf2d60 a0000010 00000003 00000000 00000000 Backtrace: [] (kasan_poison) from [] (kasan_unpoison+0x48/0x5c) [] (kasan_unpoison) from [] (__asan_register_globals+0x3c/0x64) r5:01312cff r4:f1804030 [] (__asan_register_globals) from [] (_sub_I_65535_1+0x18/0xf80 [hello]) r7:c5be7700 r6:00000001 r5:c1b52ccc r4:f18040c0 [] (_sub_I_65535_1 [hello]) from [] (do_init_module+0x330/0x72c) [] (do_init_module) from [] (load_module+0x3260/0x32a8) r10:f1804268 r9:c451fdf0 r8:00000000 r7:c1b54cc4 r6:00000000 r5:f18040c0 r4:c451fec0 [] (load_module) from [] (sys_finit_module+0x1b4/0x1e8) r10:c451fec0 r9:00000003 r8:0157f008 r7:00000000 r6:c451ff60 r5:b78a3fd0 r4:c1b54cc4 [] (sys_finit_module) from [] (ret_fast_syscall+0x0/0x1c) Exception stack(0xc451ffa8 to 0xc451fff0) ffa0: 0157f008 00000006 00000003 0157f008 00000000 b6ac9f60 ffc0: 0157f008 00000006 0000005f 0000017b 00000000 00000000 aed85f74 00000000 ffe0: b6ac9cd8 b6ac9cc8 00030200 aecf2d60 r10:0000017b r9:c4880000 r8:c0100244 r7:0000017b r6:0000005f r5:00000006 r4:0157f008 Code: e92d4100 e1a08001 e1a0e003 e2522040 (a8ac410a) ---[ end trace df6e12843197b6f5 ]--- Signed-off-by: Lecopzer Chen Tested-by: Linus Walleij Reviewed-by: Linus Walleij Signed-off-by: Russell King (Oracle) arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 565cbaad83d83e288927b96565211109bc984007 Author: Lecopzer Chen Date: Wed Apr 27 15:29:01 2022 +0100 ARM: 9202/1: kasan: support CONFIG_KASAN_VMALLOC Simply make shadow of vmalloc area mapped on demand. Since the virtual address of vmalloc for Arm is also between MODULE_VADDR and 0x100000000 (ZONE_HIGHMEM), which means the shadow address has already included between KASAN_SHADOW_START and KASAN_SHADOW_END. Thus we need to change nothing for memory map of Arm. This can fix ARM_MODULE_PLTS with KASan, support KASan for higmem and support CONFIG_VMAP_STACK with KASan. Signed-off-by: Lecopzer Chen Tested-by: Linus Walleij Reviewed-by: Linus Walleij Signed-off-by: Russell King (Oracle) arch/arm/Kconfig | 1 + arch/arm/mm/kasan_init.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit c4f0d16daa6d1c5d862d063379c03310387095d5 Author: Jesse Taube Date: Sat Jul 23 12:05:04 2022 -0400 dt-bindings: gpio: fsl-imx-gpio: Add i.MXRT compatibles Both the i.MXRT1170 and 1050 have the same gpio controller as "fsl,imx35-gpio". Add i.MXRT to the compatible list. Signed-off-by: Jesse Taube Acked-by: Rob Herring Acked-by: Linus Walleij Signed-off-by: Bartosz Golaszewski Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml | 2 ++ 1 file changed, 2 insertions(+) commit e3c1d6c8c59ae542e53c6ef4602eabc39c108575 Author: Andy Shevchenko Date: Tue Jul 26 12:14:48 2022 +0300 gpio: 74xx-mmio: Use bits instead of plain numbers for flags The initial code was misleading to use bitwise AND against plain number, and the commit d3054ba1db62 ("gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in()") missed that. Switch definitions to be defined bits for the correct comparison. Fixes: d3054ba1db62 ("gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in()") Reported-by: Dan Carpenter Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-74xx-mmio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dd524b7f317de8d31d638cbfdc7be4cf9b770e42 Author: Jiachen Zhang Date: Thu Jul 28 19:49:15 2022 +0800 ovl: drop WARN_ON() dentry is NULL in ovl_encode_fh() Some code paths cannot guarantee the inode have any dentry alias. So WARN_ON() all !dentry may flood the kernel logs. For example, when an overlayfs inode is watched by inotifywait (1), and someone is trying to read the /proc/$(pidof inotifywait)/fdinfo/INOTIFY_FD, at that time if the dentry has been reclaimed by kernel (such as echo 2 > /proc/sys/vm/drop_caches), there will be a WARN_ON(). The printed call stack would be like: ? show_mark_fhandle+0xf0/0xf0 show_mark_fhandle+0x4a/0xf0 ? show_mark_fhandle+0xf0/0xf0 ? seq_vprintf+0x30/0x50 ? seq_printf+0x53/0x70 ? show_mark_fhandle+0xf0/0xf0 inotify_fdinfo+0x70/0x90 show_fdinfo.isra.4+0x53/0x70 seq_show+0x130/0x170 seq_read+0x153/0x440 vfs_read+0x94/0x150 ksys_read+0x5f/0xe0 do_syscall_64+0x59/0x1e0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 So let's drop WARN_ON() to avoid kernel log flooding. Reported-by: Hongbo Yin Signed-off-by: Jiachen Zhang Signed-off-by: Tianci Zhang Fixes: 8ed5eec9d6c4 ("ovl: encode pure upper file handles") Cc: # v4.16 Signed-off-by: Miklos Szeredi fs/overlayfs/export.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d985db83622679fc496ed824088e066528b3a872 Author: Colin Ian King Date: Thu Jul 28 12:05:54 2022 +0100 reset: tps380x: Fix spelling mistake "Voltags" -> "Voltage" There is a spelling mistake in the MODULE_DESCRIPTION text. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Philipp Zabel Link: https://lore.kernel.org/r/20220728110554.18320-1-colin.i.king@gmail.com drivers/reset/reset-tps380x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ded536561a3674327dfa4bb389085705cae22b8a Author: Yang Xu Date: Thu Jul 28 10:49:24 2022 +0800 ovl: improve ovl_get_acl() if POSIX ACL support is off Provide a proper stub for the !CONFIG_FS_POSIX_ACL case. Signed-off-by: Yang Xu Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 4 +++- fs/overlayfs/overlayfs.h | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 623cd87006983935de6c2ad8e2d50e68f1b7d6e7 Author: Krzysztof Kozlowski Date: Tue Jul 26 09:08:02 2022 +0200 net: cdns,macb: use correct xlnx prefix for Xilinx Use correct vendor for Xilinx versions of Cadence MACB/GEM Ethernet controller. The Versal compatible was not released, so it can be changed. Zynq-7xxx and Ultrascale+ has to be kept in new and deprecated form. Signed-off-by: Krzysztof Kozlowski Acked-by: Harini Katakam Link: https://lore.kernel.org/r/20220726070802.26579-2-krzysztof.kozlowski@linaro.org Signed-off-by: Paolo Abeni drivers/net/ethernet/cadence/macb_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit afa950b8adc91c9bacf66c5987fa912bf971188f Author: Krzysztof Kozlowski Date: Tue Jul 26 09:08:01 2022 +0200 dt-bindings: net: cdns,macb: use correct xlnx prefix for Xilinx Use correct vendor for Xilinx versions of Cadence MACB/GEM Ethernet controller. The Versal compatible was not released, so it can be changed. Zynq-7xxx and Ultrascale+ has to be kept in new and deprecated form. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220726070802.26579-1-krzysztof.kozlowski@linaro.org Signed-off-by: Paolo Abeni Documentation/devicetree/bindings/net/cdns,macb.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 40d060b8158e26438398bf1132925f666e3b6480 Author: Gustavo A. R. Silva Date: Wed Oct 6 13:08:10 2021 -0500 ASoC: q6asm: use kcalloc() instead of kzalloc() Use 2-factor multiplication argument form kcalloc() instead of kzalloc(). Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20211006180810.GA913370@embeddedor Signed-off-by: Mark Brown sound/soc/qcom/qdsp6/q6asm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 779fda86bdeb86bad6daa4f0ecf37788dfc26f6c Merge: ac165aab4698 2bd1753e8c43 Author: Thomas Gleixner Date: Thu Jul 28 12:36:35 2022 +0200 Merge tag 'irqchip-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip/genirq updates from Marc Zyngier: * Core code update: - Non-SMP IRQ affinity fixes, allowing UP kernel to behave similarly to SMP ones for the purpose of interrupt affinity - Let irq_set_chip_handler_name_locked() take a const struct irq_chip * - Tidy-up the NOMAP irqdomain API variant - Teach action_show() to use for_each_action_of_desc() - Make irq_chip_request_resources_parent() allow the parent callback to be optional - Remove dynamic allocations from populate_parent_alloc_arg() * New drivers: - Merge the long awaited IRQ support for the LoongArch architecture, with the provisional ACPICA update (to be reverted once the official support lands) - New Renesas RZ/G2L IRQC driver, equipped with its companion GPIO driver * Driver updates - Optimise the hot path operations for the SiFive PLIC, trading the locking for per-CPU priority masking masking operations which are apparently faster - Work around broken PLIC implementations that deal pretty badly with edge-triggered interrupts. Flag two implementations as affected. - Simplify the irq-stm32-exti driver, particularly the table that remaps the interrupts from exti to the GIC, reducing the memory usage - Convert the ocelot irq_chip to being immutable - Check ioremap() return value in the MIPS GIC driver - Move MMP driver init function declarations into the common .h - The obligatory typo fixes Link: https://lore.kernel.org/all/20220727192356.1860546-1-maz@kernel.org commit cceeeb6a6d02e7b9a74ddd27a3225013b34174aa Author: Juri Lelli Date: Mon Jun 27 11:50:51 2022 +0200 wait: Fix __wait_event_hrtimeout for RT/DL tasks Changes to hrtimer mode (potentially made by __hrtimer_init_sleeper on PREEMPT_RT) are not visible to hrtimer_start_range_ns, thus not accounted for by hrtimer_start_expires call paths. In particular, __wait_event_hrtimeout suffers from this problem as we have, for example: fs/aio.c::read_events wait_event_interruptible_hrtimeout __wait_event_hrtimeout hrtimer_init_sleeper_on_stack <- this might "mode |= HRTIMER_MODE_HARD" on RT if task runs at RT/DL priority hrtimer_start_range_ns WARN_ON_ONCE(!(mode & HRTIMER_MODE_HARD) ^ !timer->is_hard) fires since the latter doesn't see the change of mode done by init_sleeper Fix it by making __wait_event_hrtimeout call hrtimer_sleeper_start_expires, which is aware of the special RT/DL case, instead of hrtimer_start_range_ns. Reported-by: Bruno Goncalves Signed-off-by: Juri Lelli Signed-off-by: Thomas Gleixner Reviewed-by: Daniel Bristot de Oliveira Reviewed-by: Valentin Schneider Link: https://lore.kernel.org/r/20220627095051.42470-1-juri.lelli@redhat.com include/linux/wait.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 75fed76ebc8f75e7a9f8c9ca39482aa34932ad41 Merge: e0dccc3b76fb 148399c90e25 Author: Thomas Gleixner Date: Thu Jul 28 12:33:34 2022 +0200 Merge tag 'timers-v5.20-rc1' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clockevent/source updates from Daniel Lezcano: - Add the missing DT bindings for the MTU nomadik timer (Linus Walleij) - Fix grammar typo in the ARM global timer Kconfig option (Randy Dunlap) - Add the tegra186 timer and use it on the tegra234 board (Thierry Reding) - Add the 'CPUXGPT' CPU timer for Mediatek MT6795 and implement a workaround to overcome an ATF bug where the timer is not correctly initialized (AngeloGioacchino Del Regno) - Rework the suspend/resume approach to enable the feature on the timer even it is not an active clock and fix a compilation warning (Claudiu Beznea) - Add the Add R-Car Gen4 timer support along with the DT bindings (Wolfram Sang) - Add compatible for ti,am654-timer to support AM6 SoC (Tony Lindgren) - Fix Kconfig option to put it back to 'bool' instead of 'tristate' for the tegra186 (Daniel Lezcano) - Sort 'family,type' DT bindings for the Renesas timers (Geert Uytterhoeven) - Add compatible 'allwinner,sun20i-d1-timer' for Allwinner D1 (Samuel Holland) - Remove unnecessary (void*) conversions for sun4i (XU pengfei) - Remove unnecessary (void*) conversions for sun5i (Li zeming) Link: https://lore.kernel.org/all/7472984e-f502-5f27-82bf-070127dd85a5@linaro.org commit cb774bd35318c1b4cb61f6f2caac85537d07fbde Author: Danny van Heumen Date: Mon Jul 11 23:21:16 2022 +0000 wifi: brcmfmac: prevent double-free on hardware-reset In case of buggy firmware, brcmfmac may perform a hardware reset. If during reset and subsequent probing an early failure occurs, a memory region is accidentally double-freed. With hardened memory allocation enabled, this error will be detected. - return early where appropriate to skip unnecessary clean-up. - set '.freezer' pointer to NULL to prevent double-freeing under possible other circumstances and to re-align result under various different behaviors of memory allocation freeing. - correctly claim host on func1 for disabling func2. - after reset, do not initiate probing immediately, but rely on events. Given a firmware crash, function 'brcmf_sdio_bus_reset' is called. It calls 'brcmf_sdiod_remove', then follows up with 'brcmf_sdiod_probe' to reinitialize the hardware. If 'brcmf_sdiod_probe' fails to "set F1 blocksize", it exits early, which includes calling 'brcmf_sdiod_remove'. In both cases 'brcmf_sdiod_freezer_detach' is called to free allocated '.freezer', which has not yet been re-allocated the second time. Stacktrace of (failing) hardware reset after firmware-crash: Code: b9402b82 8b0202c0 eb1a02df 54000041 (d4210000) ret_from_fork+0x10/0x20 kthread+0x154/0x160 worker_thread+0x188/0x504 process_one_work+0x1f4/0x490 brcmf_core_bus_reset+0x34/0x44 [brcmfmac] brcmf_sdio_bus_reset+0x68/0xc0 [brcmfmac] brcmf_sdiod_probe+0x170/0x21c [brcmfmac] brcmf_sdiod_remove+0x48/0xc0 [brcmfmac] kfree+0x210/0x220 __slab_free+0x58/0x40c Call trace: x2 : 0000000000000040 x1 : fffffc00002d2b80 x0 : ffff00000b4aee40 x5 : ffff8000013fa728 x4 : 0000000000000001 x3 : ffff00000b4aee00 x8 : ffff800009967ce0 x7 : ffff8000099bfce0 x6 : 00000006f8005d01 x11: ffff8000099bfce0 x10: 00000000fffff000 x9 : ffff8000083401d0 x14: 0000000000000000 x13: 657a69736b636f6c x12: 6220314620746573 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000030 x20: fffffc00002d2ba0 x19: fffffc00002d2b80 x18: 0000000000000000 x23: ffff00000b4aee00 x22: ffff00000b4aee00 x21: 0000000000000001 x26: ffff00000b4aee00 x25: ffff0000f7753705 x24: 000000000001288a x29: ffff80000a22bbf0 x28: ffff000000401200 x27: 000000008020001a sp : ffff80000a22bbf0 lr : kfree+0x210/0x220 pc : __slab_free+0x58/0x40c pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) Workqueue: events brcmf_core_bus_reset [brcmfmac] Hardware name: Pine64 Pinebook Pro (DT) CPU: 2 PID: 639 Comm: kworker/2:2 Tainted: G C 5.16.0-0.bpo.4-arm64 #1 Debian 5.16.12-1~bpo11+1 nvmem_rockchip_efuse industrialio_triggered_buffer videodev snd_soc_core snd_pcm_dmaengine kfifo_buf snd_pcm io_domain mc industrialio mt> Modules linked in: snd_seq_dummy snd_hrtimer snd_seq snd_seq_device nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reje> Internal error: Oops - BUG: 0 [#1] SMP kernel BUG at mm/slub.c:379! Signed-off-by: Danny van Heumen Reviewed-by: Arend van Spriel Reviewed-by: Ulf Hansson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/id1HN6qCMAirApBzTA6fT7ZFWBBGCJhULpflxQ7NT6cgCboVnn3RHpiOFjA9SbRqzBRFLk9ES0C4FNvO6fUQsNg7pqF6ZSNAYUo99nHy8PY=@dannyvanheumen.nl drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 13 +++++-------- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 10 +--------- 2 files changed, 6 insertions(+), 17 deletions(-) commit 5c54ab24377b999c7f1c30b41218e6490cd4ac80 Author: Alvin Šipraga Date: Mon Jul 11 14:30:04 2022 +0200 wifi: brcmfmac: support brcm,ccode-map-trivial DT property Commit a21bf90e927f ("brcmfmac: use ISO3166 country code and 0 rev as fallback on some devices") introduced a fallback mechanism whereby a trivial mapping from ISO3166 country codes to firmware country code and revision is used on some devices. This fallback operates on the device level, so it is enabled only for certain supported chipsets. In general though, the firmware country codes are determined by the CLM blob, which is board-specific and may vary despite the underlying chipset being the same. The aforementioned commit is actually a refinement of a previous commit that was reverted in commit 151a7c12c4fc ("Revert "brcmfmac: use ISO3166 country code and 0 rev as fallback"") due to regressions with a BCM4359 device. The refinement restricted the fallback mechanism to specific chipsets such as the BCM4345. We use a chipset - CYW88359 - that the driver identifies as a BCM4359 too. But in our case, the CLM blob uses ISO3166 country codes internally, and all with revision 0. So the trivial mapping is exactly what is needed in order for the driver to sync the kernel regulatory domain to the firmware. This is just a matter of how the CLM blob was prepared by the hardware vendor. The same could hold for other boards too. Although the brcm,ccode-map device tree property is useful for cases where the mapping is more complex, the trivial case invites a much simpler specification. This patch adds support for parsing the brcm,ccode-map-trivial device tree property. Subordinate to the more specific brcm,ccode-map property, this new proprety simply informs the driver that the fallback method should be used in every case. In the absence of the new property in the device tree, expect no functional change. Signed-off-by: Alvin Šipraga Reviewed-by: Ahmad Fatoum Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220711123005.3055300-3-alvin@pqrs.dk drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h | 2 ++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 6 ++++++ 3 files changed, 11 insertions(+) commit 8406993a891f39a0c7062bf071f7591bacb800bc Author: Alvin Šipraga Date: Mon Jul 11 14:30:03 2022 +0200 dt-bindings: bcm4329-fmac: add optional brcm,ccode-map-trivial The bindings already offer a brcm,ccode-map property to describe the mapping between the kernel's ISO3166 alpha 2 country code string and the firmware's country code string and revision number. This is a board-specific property and determined by the CLM blob firmware provided by the hardware vendor. However, in some cases the firmware will also use ISO3166 country codes internally, and the revision will always be zero. This implies a trivial mapping: cc -> { cc, 0 }. For such cases, add an optional property brcm,ccode-map-trivial which obviates the need to describe every trivial country code mapping in the device tree with the existing brcm,ccode-map property. The new property is subordinate to the more explicit brcm,ccode-map property. Signed-off-by: Alvin Šipraga Reviewed-by: Ahmad Fatoum Acked-by: Rob Herring Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220711123005.3055300-2-alvin@pqrs.dk .../devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 4af4c0b93c15ece3732dee5e5dbcf0a01904413a Author: Hans de Goede Date: Fri Jul 8 15:37:12 2022 +0200 wifi: brcmfmac: Replace default (not configured) MAC with a random MAC On some boards there is no eeprom to hold the nvram, in this case instead a board specific nvram is loaded from /lib/firmware. On most boards the macaddr=... setting in the /lib/firmware nvram file is ignored because the wifi/bt chip has a unique MAC programmed into the chip itself. But in some cases the actual MAC from the /lib/firmware nvram file gets used, leading to MAC conflicts. The MAC addresses in the troublesome nvram files seem to all come from the same nvram file template, so we can detect this by checking for the template nvram file MAC. Detect that the default MAC address is being used and replace it with a random MAC address to avoid MAC address conflicts. Note that udev will detect this is a random MAC based on /sys/class/net/wlan0/addr_assign_type and then replace this with a MAC based on hashing the netdev-name + the machine-id. So that the MAC address is both guaranteed to be unique per machine while it is still the same/persistent at each boot (assuming the default Link.MACAddressPolicy=persistent udev setting). Signed-off-by: Hans de Goede Reviewed-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220708133712.102179-2-hdegoede@redhat.com .../wireless/broadcom/brcm80211/brcmfmac/common.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit cf1239e5b7bf3db82cb54dc754fca5b5d4a6b3eb Author: Hans de Goede Date: Fri Jul 8 15:37:11 2022 +0200 wifi: brcmfmac: Add brcmf_c_set_cur_etheraddr() helper Add a little helper to send "cur_etheraddr" commands to the interface and to handle the error reporting of it in a single place. Signed-off-by: Hans de Goede Acked-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220708133712.102179-1-hdegoede@redhat.com .../net/wireless/broadcom/brcm80211/brcmfmac/common.c | 18 +++++++++++++----- .../net/wireless/broadcom/brcm80211/brcmfmac/common.h | 1 + .../net/wireless/broadcom/brcm80211/brcmfmac/core.c | 8 ++------ 3 files changed, 16 insertions(+), 11 deletions(-) commit 02a186f1e96bfca8fd19862dad14ea011712ce9d Author: Paul Cercueil Date: Mon Jun 27 20:37:01 2022 +0100 wifi: brcmfmac: Remove #ifdef guards for PM related functions Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. Some other functions not directly called by the .suspend/.resume callbacks, but still related to PM were also taken outside #ifdef guards. The advantage is then that these functions are now always compiled independently of any Kconfig option, and thanks to that bugs and regressions are easier to catch. Signed-off-by: Paul Cercueil Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220627193701.31074-1-paul@crapouillou.net .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 36 ++++++++-------------- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 5 ++- .../wireless/broadcom/brcm80211/brcmfmac/sdio.h | 16 ---------- 3 files changed, 15 insertions(+), 42 deletions(-) commit bef11f1edc40cee156c60f9dbbbd9725a56b3639 Author: Dan Carpenter Date: Thu Jun 16 10:54:24 2022 +0300 wifi: brcmfmac: use strreplace() in brcmf_of_probe() The for loop in brcmf_of_probe() would ideally end with something like "i <= strlen(board_type)" instead of "i < board_type[i]". But fortunately, the two are equivalent. Anyway, it's simpler to use strreplace() instead. Signed-off-by: Dan Carpenter Suggested-by: Johannes Berg Reviewed-by: Linus Walleij Acked-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/YqrhsKcjEA7B2pC4@kili drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 7d85e9cb405e00bb6583dc1f821eae905711382d Merge: 5f10376b6bc1 cd8efeeed16e Author: Paolo Abeni Date: Thu Jul 28 11:54:56 2022 +0200 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== ice: PPPoE offload support Marcin Szycik says: Add support for dissecting PPPoE and PPP-specific fields in flow dissector: PPPoE session id and PPP protocol type. Add support for those fields in tc-flower and support offloading PPPoE. Finally, add support for hardware offload of PPPoE packets in switchdev mode in ice driver. Example filter: tc filter add dev $PF1 ingress protocol ppp_ses prio 1 flower pppoe_sid \ 1234 ppp_proto ip skip_sw action mirred egress redirect dev $VF1_PR Changes in iproute2 are required to use the new fields (will be submitted soon). ICE COMMS DDP package is required to create a filter in ice. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: Add support for PPPoE hardware offload flow_offload: Introduce flow_match_pppoe net/sched: flower: Add PPPoE filter flow_dissector: Add PPPoE dissectors ==================== Link: https://lore.kernel.org/r/20220726203133.2171332-1-anthony.l.nguyen@intel.com Signed-off-by: Paolo Abeni commit 12a18d79dc14c80b358dbd26461614b97f2ea4a6 Merge: 7c862ee928ad bedd94835a35 Author: Marc Kleine-Budde Date: Thu Jul 28 09:32:28 2022 +0200 Merge patch series "can: add ethtool support and reporting of timestamping capabilities" Vincent Mailhol says: ==================== This series revolves around ethtool and timestamping. Its ultimate goal is that the timestamping implementation within socketCAN meets the specification of other network drivers in the kernel. This way, tcpdump or other tools derived from libpcap can be used to do timestamping on CAN devices. * Example on a device with hardware timestamp support * Before this series: | # tcpdump -j adapter_unsynced -i can0 | tcpdump: WARNING: When trying to set timestamp type | 'adapter_unsynced' on can0: That type of time stamp is not supported | by that device After applying this series, the warning disappears and tcpdump can be used to get RX hardware timestamps. This series is articulated in three major parts. * Part 1: Add TX software timestamps and report the software timestamping capabilities through ethtool. All the drivers using can_put_echo_skb() already support TX software timestamps. However, the five drivers not using this function (namely can327, janz-ican3, slcan, vcan and vxcan) lack such support. Patch 1 to 4 adds this support. Finally, patch 5 advertises the timesamping capabilities of all drivers which do not support hardware timestamps. * Part 2: add TX hardware timestapms This part is a single patch. In SocketCAN TX hardware is equal to the RX hardware timestamps of the corresponding loopback frame. Reuse the TX hardware timestamp to populate the RX hardware timestamp. While the need of this feature can be debatable, we implement it here so that generic timestamping tools which are agnostic of the specificity of SocketCAN can still obtain the value. For example, tcpdump expects for both TX and RX hardware timestamps to be supported in order to do: | # tcpdump -j adapter_unsynced -i canX * Part 3: report the hardware timestamping capabilities and implement the hardware timestamps ioctls. The kernel documentation specifies in [1] that, for the drivers which support hardware timestamping, SIOCSHWTSTAMP ioctl must be supported and that SIOCGHWTSTAMP ioctl should be supported. Currently, none of the CAN drivers do so. This is a gap. Furthermore, even if not specified, the tools based on libpcap (e.g. tcpdump) also expect ethtool_ops::get_ts_info to be implemented. This last part first adds some generic implementation of net_device_ops::ndo_eth_ioctl and ethtool_ops::get_ts_info which can be used by the drivers with hardware timestamping capabilities. It then uses those generic functions to add ioctl and reporting functionalities to the drivers with hardware timestamping support (namely: mcp251xfd, etas_es58x, kvaser_{pciefd,usb}, peak_{canfd,usb}) [1] Kernel doc: Timestamping, section 3.1 "Hardware Timestamping Implementation: Device Drivers" Link: https://docs.kernel.org/networking/timestamping.html#hardware-timestamping-implementation-device-drivers * Testing * I also developed a tool to test all the different timestamps. For those who would also like to test it, please have a look at: https://lore.kernel.org/linux-can/20220725134345.432367-1-mailhol.vincent@wanadoo.fr/T/ * Changelog * changes since v3: https://lore.kernel.org/all/20220726102454.95096-1-mailhol.vincent@wanadoo.fr * The peak drivers (both PCI and USB) do not support hardware TX timestamps (only RX). Implement specific ioctl and ethtool callback functions for this device. changes since v2: https://lore.kernel.org/all/20220725155354.482986-1-mailhol.vincent@wanadoo.fr * The c_can, flexcan, mcp251xfd and the slcan drivers already declared a struct ethtool_ops. Do not declare again the same structure and instead populate the .get_ts_info() field of the existing structures. changes since v1: https://lore.kernel.org/all/20220725133208.432176-1-mailhol.vincent@wanadoo.fr * First series had a patch to implement ethtool_ops::get_drvinfo. This proved to be useless. This patch was removed and all the clean-up patches made in preparation of that one were moved to a separate series: https://lore.kernel.org/linux-can/20220725153124.467061-1-mailhol.vincent@wanadoo.fr/T/#u ==================== Link: https://lore.kernel.org/all/20220727101641.198847-1-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde commit bedd94835a352ba4ec352c7a7ad13f41861590dd Author: Vincent Mailhol Date: Wed Jul 27 19:16:41 2022 +0900 can: peak_usb: advertise timestamping capabilities and add ioctl support Currently, userland has no method to query which timestamping features are supported by the peak_usb driver (aside maybe of getting RX messages and observe whether or not hardware timestamps stay at zero). The canonical way to add hardware timestamp support is to implement ethtool_ops::get_ts_info() in order to advertise the timestamping capabilities and to implement net_device_ops::ndo_eth_ioctl() as requested in [1]. Currently, the driver only supports hardware RX timestamps [2] but not hardware TX. For this reason, the generic function can_ethtool_op_get_ts_info_hwts() and can_eth_ioctl_hwts() can not be reused and instead this patch adds pcan_get_ts_info() and peak_eth_ioctl(). [1] kernel doc Timestamping, section 3.1: "Hardware Timestamping Implementation: Device Drivers" Link: https://docs.kernel.org/networking/timestamping.html#hardware-timestamping-implementation-device-drivers [2] https://lore.kernel.org/linux-can/20220727080634.l6uttnbrmwbabh3o@pengutronix.de/ CC: Stephane Grosjean Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220727101641.198847-15-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/peak_usb/pcan_usb.c | 1 + drivers/net/can/usb/peak_usb/pcan_usb_core.c | 41 ++++++++++++++++++++++++++++ drivers/net/can/usb/peak_usb/pcan_usb_core.h | 1 + drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 1 + drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 1 + 5 files changed, 45 insertions(+) commit 8ba09bfa2b08802e023519e91798ea83c32f2c2f Author: Vincent Mailhol Date: Wed Jul 27 19:16:40 2022 +0900 can: peak_canfd: advertise timestamping capabilities and add ioctl support Currently, userland has no method to query which timestamping features are supported by the peak_canfd driver (aside maybe of getting RX messages and observe whether or not hardware timestamps stay at zero). The canonical way to add hardware timestamp support is to implement ethtool_ops::get_ts_info() in order to advertise the timestamping capabilities and to implement net_device_ops::ndo_eth_ioctl() as requested in [1]. Currently, the driver only supports hardware RX timestamps [2] but not hardware TX. For this reason, the generic function can_ethtool_op_get_ts_info_hwts() and can_eth_ioctl_hwts() can not be reused and instead this patch adds peak_get_ts_info() and peak_eth_ioctl(). [1] kernel doc Timestamping, section 3.1: "Hardware Timestamping Implementation: Device Drivers" Link: https://docs.kernel.org/networking/timestamping.html#hardware-timestamping-implementation-device-drivers [2] https://lore.kernel.org/linux-can/20220727084257.brcbbf7lksoeekbr@pengutronix.de/ CC: Stephane Grosjean Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220727101641.198847-14-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/peak_canfd/peak_canfd.c | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 1d5eeda23f361827ef6fe459732f0573dce22670 Author: Vincent Mailhol Date: Wed Jul 27 19:16:39 2022 +0900 can: kvaser_usb: advertise timestamping capabilities and add ioctl support Currently, userland has no method to query which timestamping features are supported by the kvaser_usb driver (aside maybe of getting RX messages and observe whether or not hardware timestamps stay at zero). The canonical way for a network driver to advertise what kind of timestamping it supports is to implement ethtool_ops::get_ts_info(). Here, we use the CAN specific can_ethtool_op_get_ts_info_hwts() function to achieve this. In addition, the driver currently does not support the hardware timestamps ioctls. According to [1], SIOCSHWTSTAMP is "must" and SIOCGHWTSTAMP is "should". This patch fills up that gap by implementing net_device_ops::ndo_eth_ioctl() using the CAN specific function can_eth_ioctl_hwts(). [1] kernel doc Timestamping, section 3.1: "Hardware Timestamping Implementation: Device Drivers" Link: https://docs.kernel.org/networking/timestamping.html#hardware-timestamping-implementation-device-drivers CC: Jimmy Assarsson Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220727101641.198847-13-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/kvaser_usb.h | 1 + drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 27 ++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) commit fa5cc7e115d7b7e0a55ba347070984553a952bf0 Author: Vincent Mailhol Date: Wed Jul 27 19:16:38 2022 +0900 can: kvaser_pciefd: advertise timestamping capabilities and add ioctl support Currently, userland has no method to query which timestamping features are supported by the kvaser_pciefd driver (aside maybe of getting RX messages and observe whether or not hardware timestamps stay at zero). The canonical way for a network driver to advertise what kind of timestamping it supports is to implement ethtool_ops::get_ts_info(). Here, we use the CAN specific can_ethtool_op_get_ts_info_hwts() function to achieve this. In addition, the driver currently does not support the hardware timestamps ioctls. According to [1], SIOCSHWTSTAMP is "must" and SIOCGHWTSTAMP is "should". This patch fills up that gap by implementing net_device_ops::ndo_eth_ioctl() using the CAN specific function can_eth_ioctl_hwts(). [1] kernel doc Timestamping, section 3.1: "Hardware Timestamping Implementation: Device Drivers" Link: https://docs.kernel.org/networking/timestamping.html#hardware-timestamping-implementation-device-drivers CC: Jimmy Assarsson Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220727101641.198847-12-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/kvaser_pciefd.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1d46efa0008a6d73dad40e78a2b3fa6d3cfb74e4 Author: Vincent Mailhol Date: Wed Jul 27 19:16:37 2022 +0900 can: etas_es58x: advertise timestamping capabilities and add ioctl support Currently, userland has no method to query which timestamping features are supported by the etas_es58x driver (aside maybe of getting RX messages and observe whether or not hardware timestamps stay at zero). The canonical way for a network driver to advertise what kind of timestamping is supports is to implement ethtool_ops::get_ts_info(). Here, we use the CAN specific can_ethtool_op_get_ts_info_hwts() function to achieve this. In addition, the driver currently does not support the hardware timestamps ioctls. According to [1], SIOCSHWTSTAMP is "must" and SIOCGHWTSTAMP is "should". This patch fills up that gap by implementing net_device_ops::ndo_eth_ioctl() using the CAN specific function can_eth_ioctl_hwts(). [1] kernel doc Timestamping, section 3.1: "Hardware Timestamping Implementation: Device Drivers" Link: https://docs.kernel.org/networking/timestamping.html#hardware-timestamping-implementation-device-drivers Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220727101641.198847-11-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/etas_es58x/es58x_core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit b1f6b93e678fb0ce2cecb0032709fc17c6526299 Author: Vincent Mailhol Date: Wed Jul 27 19:16:36 2022 +0900 can: mcp251xfd: advertise timestamping capabilities and add ioctl support Currently, userland has no methods to query which timestamping features are supported by the mcp251xfd driver (aside maybe of getting RX messages and observe whether or not hardware timestamps stay at zero). The canonical way for a network driver to advertise what kind of timestamping it supports is to implement ethtool_ops::get_ts_info(). Here, we use the CAN specific can_ethtool_op_get_ts_info_hwts() function to achieve this. In addition, the driver currently does not support the hardware timestamps ioctls. According to [1], SIOCSHWTSTAMP is "must" and SIOCGHWTSTAMP is "should". This patch fills up that gap by implementing net_device_ops::ndo_eth_ioctl() using the CAN specific function can_eth_ioctl_hwts(). [1] kernel doc Timestamping, section 3.1: "Hardware Timestamping Implementation: Device Drivers" Link: https://docs.kernel.org/networking/timestamping.html#hardware-timestamping-implementation-device-drivers Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220727101641.198847-10-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 1 + drivers/net/can/spi/mcp251xfd/mcp251xfd-ethtool.c | 1 + 2 files changed, 2 insertions(+) commit 90f942c5a6d775bad1be33ba214755314105da4a Author: Vincent Mailhol Date: Wed Jul 27 19:16:35 2022 +0900 can: dev: add generic function can_eth_ioctl_hwts() Tools based on libpcap (such as tcpdump) expect the SIOCSHWTSTAMP ioctl call to be supported. This is also specified in the kernel doc [1]. The purpose of this ioctl is to toggle the hardware timestamps. Currently, CAN devices which support hardware timestamping have those always activated. can_eth_ioctl_hwts() is a dumb function that will always succeed when requested to set tx_type to HWTSTAMP_TX_ON or rx_filter to HWTSTAMP_FILTER_ALL. [1] Kernel doc: Timestamping, section 3.1 "Hardware Timestamping Implementation: Device Drivers" Link: https://docs.kernel.org/networking/timestamping.html#hardware-timestamping-implementation-device-drivers Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220727101641.198847-9-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/dev/dev.c | 29 +++++++++++++++++++++++++++++ include/linux/can/dev.h | 1 + 2 files changed, 30 insertions(+) commit 7fb48d25b5ce3bc488dbb019bf1736248181de9a Author: Vincent Mailhol Date: Wed Jul 27 19:16:34 2022 +0900 can: dev: add generic function can_ethtool_op_get_ts_info_hwts() Add function can_ethtool_op_get_ts_info_hwts(). This function will be used by CAN devices with hardware TX/RX timestamping support to implement ethtool_ops::get_ts_info. This function does not offer support to activate/deactivate hardware timestamps at device level nor support the filter options (which is currently the case for all CAN devices with hardware timestamping support). The fact that hardware timestamp can not be deactivated at hardware level does not impact the userland. As long as the user do not set SO_TIMESTAMPING using a setsockopt() or ioctl(), the kernel will not emit TX timestamps (RX timestamps will still be reproted as it is the case currently). Drivers which need more fine grained control remains free to implement their own function, but we foresee that the generic function introduced here will be sufficient for the majority. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220727101641.198847-8-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/dev/dev.c | 21 +++++++++++++++++++++ include/linux/can/dev.h | 3 +++ 2 files changed, 24 insertions(+) commit 8bdd1112edcd3edce2843e03826204a84a61042d Author: Vincent Mailhol Date: Wed Jul 27 19:16:33 2022 +0900 can: dev: add hardware TX timestamp Because of the loopback feature of socket CAN, hardware TX timestamps are nothing else than the hardware RX timespamp of the corresponding loopback packet. This patch simply reuses the hardware RX timestamp. The rationale to clone this timestamp value is that existing tools which rely of libpcap (such as tcpdump) expect support for both TX and RX hardware timestamps in order to activate the feature (i.e. no granular control to activate either of TX or RX hardware timestamps). Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220727101641.198847-7-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/dev/skb.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 409c188c57cdb5cb1dfcac79e72b5169f0463fe4 Author: Vincent Mailhol Date: Wed Jul 27 19:16:32 2022 +0900 can: tree-wide: advertise software timestamping capabilities Currently, some CAN drivers support hardware timestamping, some do not. But userland has no method to query which features are supported (aside maybe of getting RX messages and observe whether or not hardware timestamps stay at zero). The canonical way for a network driver to advertised what kind of timestamping it supports is to implement ethtool_ops::get_ts_info(). This patch only targets the CAN drivers which *do not* support hardware timestamping. For each of those CAN drivers, implement the get_ts_info() using the generic ethtool_op_get_ts_info(). This way, userland can do: | $ ethtool --show-time-stamping canX to confirm the device timestamping capacities. N.B. the drivers which support hardware timestamping will be migrated in separate patches. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220727101641.198847-6-mailhol.vincent@wanadoo.fr [mkl: mscan: add missing mscan_ethtool_ops] Signed-off-by: Marc Kleine-Budde drivers/net/can/at91_can.c | 6 ++++++ drivers/net/can/c_can/c_can_ethtool.c | 1 + drivers/net/can/can327.c | 5 +++++ drivers/net/can/cc770/cc770.c | 6 ++++++ drivers/net/can/ctucanfd/ctucanfd_base.c | 6 ++++++ drivers/net/can/flexcan/flexcan-ethtool.c | 1 + drivers/net/can/grcan.c | 6 ++++++ drivers/net/can/ifi_canfd/ifi_canfd.c | 6 ++++++ drivers/net/can/janz-ican3.c | 6 ++++++ drivers/net/can/m_can/m_can.c | 6 ++++++ drivers/net/can/mscan/mscan.c | 5 +++++ drivers/net/can/pch_can.c | 6 ++++++ drivers/net/can/rcar/rcar_can.c | 6 ++++++ drivers/net/can/rcar/rcar_canfd.c | 6 ++++++ drivers/net/can/sja1000/sja1000.c | 6 ++++++ drivers/net/can/slcan/slcan-ethtool.c | 1 + drivers/net/can/softing/softing_main.c | 6 ++++++ drivers/net/can/spi/hi311x.c | 6 ++++++ drivers/net/can/spi/mcp251x.c | 6 ++++++ drivers/net/can/sun4i_can.c | 6 ++++++ drivers/net/can/ti_hecc.c | 6 ++++++ drivers/net/can/usb/ems_usb.c | 6 ++++++ drivers/net/can/usb/esd_usb.c | 6 ++++++ drivers/net/can/usb/gs_usb.c | 2 ++ drivers/net/can/usb/mcba_usb.c | 6 ++++++ drivers/net/can/usb/ucan.c | 6 ++++++ drivers/net/can/usb/usb_8dev.c | 6 ++++++ drivers/net/can/vcan.c | 6 ++++++ drivers/net/can/vxcan.c | 6 ++++++ drivers/net/can/xilinx_can.c | 6 ++++++ 30 files changed, 159 insertions(+) commit 87eb04bb87fbdf1d53f0fc64e6fc56ba2b504762 Author: Lucas Tanure Date: Wed Jul 27 10:59:23 2022 +0100 ACPI: scan: Add CLSA0101 Laptop Support Add CLSA0101 id to the ignore_serial_bus_ids so serial-multi-instantiate can correctly instantiate the driver. Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20220727095924.80884-4-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai drivers/acpi/scan.c | 1 + 1 file changed, 1 insertion(+) commit 1e24881d8b2a7c198a67fe9e5179e9efb2140df7 Author: Lucas Tanure Date: Wed Jul 27 10:59:22 2022 +0100 ALSA: hda: cs35l41: Support CLSA0101 Add support for Intel version of Legion 7 laptop. Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20220727095924.80884-3-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 66 +++++++++++++++++++++++++---------------- sound/pci/hda/cs35l41_hda_i2c.c | 3 ++ sound/pci/hda/patch_realtek.c | 12 ++++++++ 3 files changed, 55 insertions(+), 26 deletions(-) commit f81ee579c0898201eb2b5105718bedf34c0401f9 Author: Lucas Tanure Date: Wed Jul 27 10:59:21 2022 +0100 ALSA: hda: cs35l41: Use the CS35L41 HDA internal define Follow GPIO1 pattern, use cs35l41 HDA internal define for IRQ and then translate to ASoC cs35l41 define. Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20220727095924.80884-2-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5f10376b6bc1e2773f56977980ab08c9e4fa91a7 Author: Jakub Kicinski Date: Tue Jul 26 14:56:52 2022 -0700 add missing includes and forward declarations to networking includes under linux/ Similarly to a recent include/net/ cleanup, this patch adds missing includes to networking headers under include/linux. All these problems are currently masked by the existing users including the missing dependency before the broken header. Link: https://lore.kernel.org/all/20220723045755.2676857-1-kuba@kernel.org/ v1 Signed-off-by: Jakub Kicinski Link: https://lore.kernel.org/r/20220726215652.158167-1-kuba@kernel.org Signed-off-by: Paolo Abeni include/linux/atm_tcp.h | 2 ++ include/linux/dsa/tag_qca.h | 5 +++++ include/linux/hippidevice.h | 4 ++++ include/linux/if_eql.h | 1 + include/linux/if_hsr.h | 4 ++++ include/linux/if_rmnet.h | 2 ++ include/linux/if_tap.h | 11 ++++++----- include/linux/mdio/mdio-xgene.h | 4 ++++ include/linux/nl802154.h | 2 ++ include/linux/phy_fixed.h | 3 +++ include/linux/ppp-comp.h | 2 +- include/linux/ppp_channel.h | 2 ++ include/linux/ptp_kvm.h | 2 ++ include/linux/ptp_pch.h | 4 ++++ include/linux/seq_file_net.h | 1 + include/linux/sungem_phy.h | 2 ++ include/linux/usb/usbnet.h | 6 ++++++ include/net/llc_s_st.h | 6 ++++++ 18 files changed, 57 insertions(+), 6 deletions(-) commit 3fe4076482789c2c4a772f6676b246a0d96c99c4 Author: Slark Xiao Date: Fri Jul 22 18:05:18 2022 +0800 kernfs: Fix typo 'the the' in comment Replace 'the the' with 'the' in the comment. Signed-off-by: Slark Xiao Link: https://lore.kernel.org/r/20220722100518.79741-1-slark_xiao@163.com Signed-off-by: Greg Kroah-Hartman fs/kernfs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 321eaf317dec3710e7a4ad3b3c363d9314c15195 Author: Dave Airlie Date: Thu Jul 21 14:43:52 2022 +1000 docs: driver-api: firmware: add driver firmware guidelines. (v3) A recent snafu where Intel ignored upstream feedback on a firmware change, led to a late rc6 fix being required. In order to avoid this in the future we should document some expectations around linux-firmware. I was originally going to write this for drm, but it seems quite generic advice. v2: rewritten with suggestions from Thorsten Leemhuis v3: rewritten with suggestions from Mauro Acked-by: Luis Chamberlain Acked-by: Rodrigo Vivi Acked-by: Daniel Vetter Acked-by: Harry Wentland Signed-off-by: Dave Airlie Link: https://lore.kernel.org/r/20220721044352.3110507-1-airlied@gmail.com Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/firmware/core.rst | 1 + .../firmware/firmware-usage-guidelines.rst | 44 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) commit 4158e38967975f14c3e6fb0e04df90e32061d463 Author: Paolo Abeni Date: Tue Jul 26 13:09:27 2022 +0200 Revert "Merge branch 'octeontx2-minor-tc-fixes'" This reverts commit 35d099da41967f114c6472b838e12014706c26e7, reversing changes made to 58d8bcd47ecc55f1ab92320fe36c31ff4d83cc0c. I wrongly applied that to the net-next tree instead of the intended target tree (net). Reverting it on net-next. Signed-off-by: Paolo Abeni .../net/ethernet/marvell/octeontx2/nic/otx2_tc.c | 106 +++++++-------------- 1 file changed, 33 insertions(+), 73 deletions(-) commit c528bbb7dc062c707f6064eec1bccafb8490758f Author: Philipp Hortmann Date: Thu Jul 28 07:59:45 2022 +0200 staging: vt6655: Convert macro vt6655_mac_clear_stck_ds to function Convert once used macro to static function. Multiline macros are not liked by kernel community. Rename variable byOrgValue to reg_value to avoid CamelCase which is not accepted by checkpatch.pl. Change variable declaration to u8 as this improves readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/cbfe5cc170b68564ff45bb7f45c63de241c2a664.1658986804.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 9 +++++++++ drivers/staging/vt6655/mac.h | 8 -------- 2 files changed, 9 insertions(+), 8 deletions(-) commit 899336721928914bfbda515457706616bf2e676d Author: Philipp Hortmann Date: Thu Jul 28 07:59:32 2022 +0200 staging: vt6655: Rename MACvClearStckDS Rename MACvClearStckDS macro to vt6655_mac_clear_stck_ds to avoid CamelCase which is not accepted by checkpatch.pl and to clean up namespace. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/8ba4413d52e95406393755f48da065511b891f03.1658986804.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 2 +- drivers/staging/vt6655/mac.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 81e878887ff82a7dd42f22951391069a5d520627 Author: Peter Suti Date: Wed Jul 27 09:35:50 2022 +0200 staging: fbtft: core: set smem_len before fb_deferred_io_init call The fbtft_framebuffer_alloc() calls fb_deferred_io_init() before initializing info->fix.smem_len. It is set to zero by the framebuffer_alloc() function. It will trigger a WARN_ON() at the start of fb_deferred_io_init() and the function will not do anything. Fixes: 856082f021a2 ("fbdev: defio: fix the pagelist corruption") Signed-off-by: Peter Suti Link: https://lore.kernel.org/r/20220727073550.1491126-1-peter.suti@streamunlimited.com Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96dd9a2f958be4781d8d01ed881a46864bf458aa Author: Justin Stitt Date: Mon Jul 18 16:06:26 2022 -0700 lib/test_printf.c: fix clang -Wformat warnings see warnings: | lib/test_printf.c:157:52: error: format specifies type 'unsigned char' | but the argument has type 'int' [-Werror,-Wformat] test("0|1|1|128|255", | "%hhu|%hhu|%hhu|%hhu|%hhu", 0, 1, 257, 128, -1); - | lib/test_printf.c:158:55: error: format specifies type 'char' but the | argument has type 'int' [-Werror,-Wformat] test("0|1|1|-128|-1", | "%hhd|%hhd|%hhd|%hhd|%hhd", 0, 1, 257, 128, -1); - | lib/test_printf.c:159:41: error: format specifies type 'unsigned short' | but the argument has type 'int' [-Werror,-Wformat] | test("2015122420151225", "%ho%ho%#ho", 1037, 5282, -11627); There's an ongoing movement to eventually enable the -Wformat flag for clang. Previous patches have targeted incorrect usage of format specifiers. In this case, however, the "incorrect" format specifiers are intrinsically part of the test cases. Hence, fixing them would be misaligned with their intended purpose. My proposed fix is to simply disable the warnings so that one day a clean build of the kernel with clang (and -Wformat enabled) would be possible. It would also keep us in the green for alot of the CI bots. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Suggested-by: Nathan Chancellor Suggested-by: Nick Desaulniers Signed-off-by: Justin Stitt Reviewed-by: Petr Mladek Reviewed-by: Nick Desaulniers Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20220718230626.1029318-1-justinstitt@google.com lib/test_printf.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 9e5f399f5c9f62e537735f2f8e42bd2f7c255c1f Author: Jiri Slaby Date: Thu Jul 28 08:10:56 2022 +0200 tty: serial: document uart_get_console() This was the only function mentioned in the text, but was neither linked nor documented. So document and link it, so that hyperlinking works in the text. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220728061056.20799-6-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/serial/driver.rst | 2 +- drivers/tty/serial/serial_core.c | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) commit 987233b342b950653d21c5e3e5b78689c995c869 Author: Jiri Slaby Date: Thu Jul 28 08:10:55 2022 +0200 tty: serial: serial_core, reformat kernel-doc for functions There are many annotated functions in serial_core.c, but they do not completely conform to the kernel-doc style. So reformat them and link them from the Documentation. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220728061056.20799-5-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/serial/driver.rst | 11 +-- drivers/tty/serial/serial_core.c | 107 ++++++++++++++--------------- 2 files changed, 60 insertions(+), 58 deletions(-) commit d34d7c4b774dac1d4be440207ab9e347f599dd30 Author: Jiri Slaby Date: Thu Jul 28 08:10:54 2022 +0200 Documentation: serial: link uart_ops properly The syntax to reference a struct in text is "struct XY". So reference uart_ops properly, so that hyperlinks work. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220728061056.20799-4-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/serial/driver.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27940abd555228fdda39a40081ae02450c500f35 Author: Jiri Slaby Date: Thu Jul 28 08:10:53 2022 +0200 Documentation: serial: move GPIO kernel-doc to the functions The GPIO uart functions are documented in Documentation. Move and transform this documentation into kernel-doc directly in the code and reference it in Documentation using kernel-doc:. This makes it easier to update, maintain and check by the build. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220728061056.20799-3-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/serial/driver.rst | 32 +++----------------- drivers/tty/serial/serial_mctrl_gpio.c | 48 ++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 28 deletions(-) commit c4bd17a6ddf3b92bf9d7939ae251570ace14bb52 Author: Jiri Slaby Date: Thu Jul 28 08:10:52 2022 +0200 Documentation: serial: dedup kernel-doc for uart functions Some of the serial (uart_*) functions are documented twice. Once as kernel-doc along their sources and once in Documentation. So deduplicate these texts, merge them into kernel-doc in the sources, and link them using kernel-doc: from the Documentation. To be properly linked and rendered, tabulators had to be removed from the comments. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220728061056.20799-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/serial/driver.rst | 84 +---------------- drivers/tty/serial/serial_core.c | 141 +++++++++++++++++------------ 2 files changed, 87 insertions(+), 138 deletions(-) commit e60a7233684aa8bbe9090537720fe6a1e901d823 Author: Jiri Slaby Date: Thu Jul 28 08:10:51 2022 +0200 Documentation: serial: move uart_ops documentation to the struct While it's a lot of text, it always helps to keep it up to date when it's by the source. (And not in a separate file.) The documentation tooling also makes sure that all members of the structure are documented. (If not, it complains loudly.) Finally, there needs to be no comments inlined in the structure, so they are dropped as they are superfluous now. The compilation time of this header (tested with serial_core.c) didn't change in my testing at all. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220728061056.20799-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/serial/driver.rst | 358 +---------------------------- include/linux/serial_core.h | 345 +++++++++++++++++++++++++-- 2 files changed, 331 insertions(+), 372 deletions(-) commit 0f42d7f23fd9be143de73eb040c2806a75db8853 Author: Jagan Teki Date: Sun Jul 24 02:13:25 2022 +0530 dt-bindings: serial: snps-dw-apb-uart: Document Rockchip RV1126 Document compatible string for Rockchip RV1126 SoC. Signed-off-by: Jagan Teki Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220723204335.750095-13-jagan@edgeble.ai Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml | 1 + 1 file changed, 1 insertion(+) commit a7209541239e5dd44d981289e5f9059222d40fd1 Author: Narendra Hadke Date: Tue Jul 26 11:12:21 2022 +0200 serial: mvebu-uart: uart2 error bits clearing For mvebu uart2, error bits are not cleared on buffer read. This causes interrupt loop and system hang. Cc: stable@vger.kernel.org Reviewed-by: Yi Guo Reviewed-by: Nadav Haklai Signed-off-by: Narendra Hadke Signed-off-by: Pali Rohár Link: https://lore.kernel.org/r/20220726091221.12358-1-pali@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mvebu-uart.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 707f816f25590c20e056b3bd4a17ce69b03fe856 Author: Sherry Sun Date: Mon Jul 25 13:01:15 2022 +0800 tty: serial: fsl_lpuart: correct the count of break characters The LPUART can't distinguish between a break signal and a framing error, so need to count the break characters if there is a framing error and received data is zero instead of the parity error. Fixes: 5541a9bacfe5 ("serial: fsl_lpuart: handle break and make sysrq work") Reviewed-by: Michael Walle Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20220725050115.12396-1-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c7039ce904c0f80253a1171d10353e7832c3e4b3 Author: Ben Dooks Date: Thu Jul 21 22:24:30 2022 +0100 serial: stm32: make info structs static to avoid sparse warnings The info structs are local only to the stm32-usart.c driver and are triggering sparse warnings about being undecalred. Move these into the main driver code and make them static to avoid the following warnings: drivers/tty/serial/stm32-usart.h:42:25: warning: symbol 'stm32f4_info' was not declared. Should it be static? drivers/tty/serial/stm32-usart.h:63:25: warning: symbol 'stm32f7_info' was not declared. Should it be static? drivers/tty/serial/stm32-usart.h:85:25: warning: symbol 'stm32h7_info' was not declared. Should it be static? Signed-off-by: Ben Dooks Link: https://lore.kernel.org/r/20220721212430.453192-1-ben-linux@fluff.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 69 ++++++++++++++++++++++++++++++++++++++++ drivers/tty/serial/stm32-usart.h | 68 --------------------------------------- 2 files changed, 69 insertions(+), 68 deletions(-) commit 070298c84e5b924c688a4d08c3a9193175cdffd8 Author: Shenwei Wang Date: Thu Jul 14 13:58:58 2022 -0500 serial: fsl_lpuart: zero out parity bit in CS7 mode The LPUART hardware doesn't zero out the parity bit on the received characters. This behavior won't impact the use cases of CS8 because the parity bit is the 9th bit which is not currently used by software. But the parity bit for CS7 must be zeroed out by software in order to get the correct raw data. Signed-off-by: Shenwei Wang Link: https://lore.kernel.org/r/20220714185858.615373-1-shenwei.wang@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit c474c775716edd46a51bf8161142bbd1545f8733 Author: Vijaya Krishna Nivarthi Date: Sat Jul 16 00:25:43 2022 +0530 tty: serial: qcom-geni-serial: Fix get_clk_div_rate() which otherwise could return a sub-optimal clock rate. In the logic around call to clk_round_rate(), for some corner conditions, get_clk_div_rate() could return an sub-optimal clock rate. Also, if an exact clock rate was not found lowest clock was being returned. Search for suitable clock rate in 2 steps a) exact match or within 2% tolerance b) within 5% tolerance This also takes care of corner conditions. Fixes: c2194bc999d4 ("tty: serial: qcom-geni-serial: Remove uart frequency table. Instead, find suitable frequency with call to clk_round_rate") Reviewed-by: Douglas Anderson Signed-off-by: Vijaya Krishna Nivarthi Link: https://lore.kernel.org/r/1657911343-1909-1-git-send-email-quic_vnivarth@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/qcom_geni_serial.c | 88 +++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 35 deletions(-) commit b9f1736e475dba0d6da48fdcb831248ab1597886 Author: Guo Mengqi Date: Fri Jul 15 10:33:12 2022 +0800 serial: 8250_bcm2835aux: Add missing clk_disable_unprepare() The error path when get clock frequency fails in bcm2835aux_serial driver does not correctly disable the clock. This flaw was found using a static analysis tool "Hulk Robot", which reported the following warning when analyzing linux-next/master: drivers/tty/serial/8250/8250_bcm2835aux.c: warning: clk_disable_unprepare_missing.cocci The cocci script checks for the existence of clk_disable_unprepare() paired with clk_prepare_enable(). Add the missing clk_disable_unprepare() to the error path. Fixes: fcc446c8aa63 ("serial: 8250_bcm2835aux: Add ACPI support") Reported-by: Hulk Robot Reviewed-by: Florian Fainelli Signed-off-by: Guo Mengqi Link: https://lore.kernel.org/r/20220715023312.37808-1-guomengqi3@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_bcm2835aux.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6a37a28b1864c447a20a1609f90f3e2dfaff0705 Author: Vincent Mailhol Date: Wed Jul 27 19:16:31 2022 +0900 can: v(x)can: add software tx timestamps TX timestamps were added to the can_put_echo_skb() function of can_dev modules in [1]. However, vcan and vxcan do not rely on that function and as such do not offer TX timestamping. While it could be arguable whether TX timestamps are really needed for virtual interfaces, we prefer to still add it so that all CAN drivers, without exception, support the software TX timestamps. Add a call to skb_tx_timestamp() in the vcan_tx() and vxcan_xmit() functions so that the modules now support TX software timestamps. [1] commit 741b91f1b0ea ("can: dev: can_put_echo_skb(): add software tx timestamps") Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=741b91f1b0ea34f00f6a7d4539b767c409291fcf Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220727101641.198847-5-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/vcan.c | 2 ++ drivers/net/can/vxcan.c | 2 ++ 2 files changed, 4 insertions(+) commit 6153a7ea650ff1249d703d09a3351c3f77f1fbfa Author: Vincent Mailhol Date: Wed Jul 27 19:16:30 2022 +0900 can: slcan: add software tx timestamps TX timestamps were added to the can_put_echo_skb() function of can_dev modules in [1]. However, slcan does not rely on that function and as such does not offer TX timestamping. Add a call to skb_tx_timestamp() in the slc_xmit() function so that the module now supports TX software timestamps. [1] commit 741b91f1b0ea ("can: dev: can_put_echo_skb(): add software tx timestamps") Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=741b91f1b0ea34f00f6a7d4539b767c409291fcf CC: Dario Binacchi Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220727101641.198847-4-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 2 ++ 1 file changed, 2 insertions(+) commit 221d14bd3d2e9acc3a33cfcf8f66485d592e5038 Author: Vincent Mailhol Date: Wed Jul 27 19:16:29 2022 +0900 can: janz-ican3: add software tx timestamp TX timestamps were added to the can_put_echo_skb() function of can_dev modules in [1]. However, janz-ican3 does not rely on that function but instead implements its own echo_skb logic. As such it does not offer TX timestamping. Add a call to skb_tx_timestamp() in the ican3_put_echo_skb() function so that the module now supports TX software timestamps. [1] commit 741b91f1b0ea ("can: dev: can_put_echo_skb(): add software tx timestamps") Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=741b91f1b0ea34f00f6a7d4539b767c409291fcf Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220727101641.198847-3-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/janz-ican3.c | 2 ++ 1 file changed, 2 insertions(+) commit 303066fc5a4916cfc777d360391a95fb8eb8a527 Author: Vincent Mailhol Date: Wed Jul 27 19:16:28 2022 +0900 can: can327: add software tx timestamps TX timestamps were added to the can_put_echo_skb() function of can_dev modules in [1]. However, can327 does not rely on that function and as such does not offer TX timestamping. Add a call to skb_tx_timestamp() in the can327_netdev_start_xmit() function so that the module now supports TX software timestamps. [1] commit 741b91f1b0ea ("can: dev: can_put_echo_skb(): add software tx timestamps") Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=741b91f1b0ea34f00f6a7d4539b767c409291fcf Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220727101641.198847-2-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/can327.c | 2 ++ 1 file changed, 2 insertions(+) commit 8288c99fc263bcafc5df5fa8c278b2eb8106364e Author: Alexander Stein Date: Thu Jul 28 08:49:37 2022 +0200 usb: misc: onboard_usb_hub: Remove duplicated power_on delay onboard_hub_power_on() already ensures the reset pulse width delay, so there is no need to wait right after requesting GPIO as well. Fixes: 40758e493f4d ("usb: misc: onboard_usb_hub: Add reset-gpio support") Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20220728064937.917935-1-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/onboard_usb_hub.c | 3 --- 1 file changed, 3 deletions(-) commit 7c862ee928adfa0c2652b8acaa50e97b99716da3 Merge: 9d8dd3725f40 4aeccfd84d28 Author: Marc Kleine-Budde Date: Thu Jul 28 09:16:27 2022 +0200 Merge patch series "can: slcan: extend supported features (step 2)" Dario Binacchi says: ==================== With this series I try to finish the task, started with the series [1], of completely removing the dependency of the slcan driver from the userspace slcand/slcan_attach applications. The series also contains patches that remove the legacy stuff (slcan_devs, SLCAN_MAGIC, ...) and do some module cleanup. The series has been created on top of the patches: can: slcan: convert comments to network style comments can: slcan: slcan_init() convert printk(LEVEL ...) to pr_level() can: slcan: fix whitespace issues can: slcan: convert comparison to NULL into !val can: slcan: clean up if/else can: slcan: use scnprintf() as a hardening measure can: slcan: do not report txerr and rxerr during bus-off can: slcan: do not sleep with a spin lock held applied to linux-next. [1] https://lore.kernel.org/all/20220628163137.413025-1-dario.binacchi@amarulasolutions.com Changes since v3: https://lore.kernel.org/all/20220726210217.3368497-1-dario.binacchi@amarulasolutions.com - Add Max Staudt's `Reviewed-by' tag. - Drop the patch "ethtool: add support to get/set CAN bit time register". - Drop the patch "can: slcan: add support to set bit time register (btr)". - Remove the RFC prefix from the series. Changes since v2: https://lore.kernel.org/all/20220725065419.3005015-1-dario.binacchi@amarulasolutions.com - Update the commit message. - Use 1 space in front of the =. - Put the series as RFC again. - Pick up the patch "can: slcan: use KBUILD_MODNAME and define pr_fmt to replace hardcoded names". - Add the patch "ethtool: add support to get/set CAN bit time register" to the series. - Add the patch "can: slcan: add support to set bit time register (btr)" to the series. - Replace the link https://marc.info/?l=linux-can&m=165806705927851&w=2 with https://lore.kernel.org/all/507b5973-d673-4755-3b64-b41cb9a13b6f@hartkopp.net. - Add the `Suggested-by' tag. Changes since RFC: https://lore.kernel.org/all/20220716170007.2020037-1-dario.binacchi@amarulasolutions.com - Re-add headers that export at least one symbol used by the module. - Update the commit description. - Drop the old "slcan" name to use the standard canX interface naming. - Remove comment on listen-only command. - Update the commit subject and description. - Add the patch "MAINTAINERS: Add myself as maintainer of the SLCAN driver" to the series. ==================== mkl: rebased to can-next/master Link: https://lore.kernel.org/all/20220728070254.267974-1-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde commit 4aeccfd84d2808574ef32b19877f022462c81d79 Author: Dario Binacchi Date: Thu Jul 28 09:02:54 2022 +0200 MAINTAINERS: Add maintainer for the slcan driver At the suggestion of its author Oliver Hartkopp ([1]), I take over the maintainer-ship and add myself to the authors of the driver. [1] https://lore.kernel.org/all/507b5973-d673-4755-3b64-b41cb9a13b6f@hartkopp.net Suggested-by: Oliver Hartkopp Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/all/20220728070254.267974-8-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde MAINTAINERS | 6 ++++++ drivers/net/can/slcan/slcan-core.c | 1 + 2 files changed, 7 insertions(+) commit 3e720131960bb724e2ae365aa9e240c1c11f45c1 Author: Dario Binacchi Date: Thu Jul 28 09:02:53 2022 +0200 can: slcan: add support for listen-only mode For non-legacy, i.e. ip based configuration, add support for listen-only mode. If listen-only is requested send a listen-only ("L\r") command instead of an open ("O\r") command to the adapter. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/all/20220728070254.267974-7-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 341c5724d7a1c71899752201dab88f87343c0c2b Author: Dario Binacchi Date: Thu Jul 28 09:02:52 2022 +0200 can: slcan: use the generic can_change_mtu() It is useless to define a custom function that does nothing but always return the same error code. Better to use the generic can_change_mtu() function. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/all/20220728070254.267974-6-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 0cef03b109ca671252cf00481eabc3032acb9d80 Author: Dario Binacchi Date: Thu Jul 28 09:02:51 2022 +0200 can: slcan: change every `slc' occurrence in `slcan' In the driver there are parts of code where the prefix `slc' is used and others where the prefix `slcan' is used instead. The patch replaces every occurrence of `slc' with `slcan', except for the netdev functions where, to avoid compilation conflicts, it was necessary to replace `slc' with `slcan_netdev'. The patch does not make any functional changes. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/all/20220728070254.267974-5-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 109 +++++++++++++++++++------------------ 1 file changed, 56 insertions(+), 53 deletions(-) commit cfcb4465e9923bb9ac168abcea84e880633f9cef Author: Dario Binacchi Date: Thu Jul 28 09:02:50 2022 +0200 can: slcan: remove legacy infrastructure Taking inspiration from the drivers/net/can/can327.c driver and at the suggestion of its author Max Staudt, I removed legacy stuff like `SLCAN_MAGIC' and `slcan_devs' resulting in simplification of the code and its maintainability. The use of slcan_devs is derived from a very old kernel, since slip.c is about 30 years old, so today's kernel allows us to remove it. The .hangup() ldisc function, which only called the ldisc .close(), has been removed since the ldisc layer calls .close() in a good place anyway. The old slcanX name has been dropped in order to use the standard canX interface naming. The ioctl SIOCGIFNAME can be used to query the name of the created interface. Furthermore, there are several ways to get stable interfaces names in user space, e.g. udev or systemd-networkd. The `maxdev' module parameter has also been removed. CC: Max Staudt Signed-off-by: Dario Binacchi Reviewed-by: Max Staudt Link: https://lore.kernel.org/all/20220728070254.267974-4-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 318 ++++++++----------------------------- 1 file changed, 63 insertions(+), 255 deletions(-) commit 7a1fc3eea76f0d85ddfaede0885fca765d17cf6a Author: Dario Binacchi Date: Thu Jul 28 09:02:49 2022 +0200 can: slcan: remove useless header inclusions Include only the necessary headers. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/all/20220728070254.267974-3-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 3 --- 1 file changed, 3 deletions(-) commit e2c9bb0297a32eedab83294e350896053900e20a Author: Vincent Mailhol Date: Thu Jul 28 09:02:48 2022 +0200 can: slcan: use KBUILD_MODNAME and define pr_fmt to replace hardcoded names The driver uses the string "slcan" to populate tty_ldisc_ops::name. KBUILD_MODNAME also evaluates to "slcan". Use KBUILD_MODNAME to get rid on the hardcoded string names. Similarly, the pr_info() and pr_err() hardcoded the "slcan" prefix. Define pr_fmt so that the "slcan" prefix gets automatically added. CC: Dario Binacchi Signed-off-by: Vincent Mailhol Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/all/20220728070254.267974-2-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit f4a0318f278d98d9492916722e85f258c2221f88 Author: Xiu Jianfeng Date: Fri Jul 1 16:24:35 2022 +0800 powerpc: add support for syscall stack randomization Add support for adding a random offset to the stack while handling syscalls. This patch uses mftb() instead of get_random_int() for better performance. In order to avoid unconditional stack canaries on syscall entry (due to the use of alloca()), also disable stack protector to avoid triggering needless checks and slowing down the entry path. As there is no general way to control stack protector coverage with a function attribute, this must be disabled at the compilation unit level. Signed-off-by: Xiu Jianfeng Reviewed-by: Kees Cook Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220701082435.126596-3-xiujianfeng@huawei.com arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/Makefile | 7 +++++++ arch/powerpc/kernel/syscall.c | 19 ++++++++++++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) commit 1547db7d1f4481c1f3ec731f3edc724ef3026ede Author: Xiu Jianfeng Date: Fri Jul 1 16:24:34 2022 +0800 powerpc: Move system_call_exception() to syscall.c This is a lead-up patch to enable syscall stack randomization, which uses alloca() and makes the compiler add unconditional stack canaries on syscall entry. In order to avoid triggering needless checks and slowing down the entry path, the feature needs to disable stack protector at the compilation unit level as there is no general way to control stack protector coverage with a function attribute. So move system_call_exception() to syscall.c to avoid affecting other functions in interrupt.c. Suggested-by: Michael Ellerman Signed-off-by: Xiu Jianfeng Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220701082435.126596-2-xiujianfeng@huawei.com arch/powerpc/kernel/Makefile | 2 +- arch/powerpc/kernel/interrupt.c | 161 ------------------------------------- arch/powerpc/kernel/syscall.c | 173 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 174 insertions(+), 162 deletions(-) commit 978030f054ff97d9079b35f0178e2013918fb316 Author: Jason A. Donenfeld Date: Thu Jul 28 00:32:19 2022 +1000 powerpc/powernv: rename remaining rng powernv_ functions to pnv_ The preferred nomenclature is pnv_, not powernv_, but rng.c used powernv_ for some reason, which isn't consistent with the rest. A recent commit added a few pnv_ functions to rng.c, making the file a bit of a mishmash. This commit just replaces the rest of them. Fixes: f3eac426657d ("powerpc/powernv: wire up rng during setup_arch") Signed-off-by: Jason A. Donenfeld Tested-by: Sachin Sant [mpe: Reorder after bug fix commits] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220727143219.2684192-3-mpe@ellerman.id.au arch/powerpc/include/asm/archrandom.h | 2 +- arch/powerpc/platforms/powernv/rng.c | 34 +++++++++++++++++----------------- drivers/char/hw_random/powernv-rng.c | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) commit 7ef3d06f1bc4a5e62273726f3dc2bd258ae1c71f Author: Jason A. Donenfeld Date: Thu Jul 28 00:32:18 2022 +1000 powerpc/powernv/kvm: Use darn for H_RANDOM on Power9 The existing logic in KVM to support guests calling H_RANDOM only works on Power8, because it looks for an RNG in the device tree, but on Power9 we just use darn. In addition the existing code needs to work in real mode, so we have the special cased powernv_get_random_real_mode() to deal with that. Instead just have KVM call ppc_md.get_random_seed(), and do the real mode check inside of there, that way we use whatever RNG is available, including darn on Power9. Fixes: e928e9cb3601 ("KVM: PPC: Book3S HV: Add fast real-mode H_RANDOM implementation.") Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Jason A. Donenfeld Tested-by: Sachin Sant [mpe: Rebase on previous commit, update change log appropriately] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220727143219.2684192-2-mpe@ellerman.id.au arch/powerpc/include/asm/archrandom.h | 5 ----- arch/powerpc/kvm/book3s_hv_builtin.c | 7 ++++--- arch/powerpc/platforms/powernv/rng.c | 36 ++++++++--------------------------- 3 files changed, 12 insertions(+), 36 deletions(-) commit 90b5d4fe0b3ba7f589c6723c6bfb559d9e83956a Author: Michael Ellerman Date: Thu Jul 28 00:32:17 2022 +1000 powerpc/powernv: Avoid crashing if rng is NULL On a bare-metal Power8 system that doesn't have an "ibm,power-rng", a malicious QEMU and guest that ignore the absence of the KVM_CAP_PPC_HWRNG flag, and calls H_RANDOM anyway, will dereference a NULL pointer. In practice all Power8 machines have an "ibm,power-rng", but let's not rely on that, add a NULL check and early return in powernv_get_random_real_mode(). Fixes: e928e9cb3601 ("KVM: PPC: Book3S HV: Add fast real-mode H_RANDOM implementation.") Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Jason A. Donenfeld Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220727143219.2684192-1-mpe@ellerman.id.au arch/powerpc/platforms/powernv/rng.c | 2 ++ 1 file changed, 2 insertions(+) commit cd1e64935f79e31d666172c52c951ca97152b783 Author: Rashmica Gupta Date: Fri Jun 17 14:39:35 2022 +1000 selftests/powerpc: Fix matrix multiply assist test The ISA states: "when ACC[i] contains defined data, the contents of VSRs 4×i to 4×i+3 are undefined until either a VSX Move From ACC instruction is used to copy the contents of ACC[i] to VSRs 4×i to 4×i+3 or some other instruction directly writes to one of these VSRs." We aren't doing this. This test only works on Power10 because the hardware implementation happens to map ACC0 to VSRs 0-3, but will fail on any other implementation that doesn't do this. So add xxmfacc between writing to the accumulator and accessing the VSRs. Fixes: 3527e1ab9a79 ("selftests/powerpc: Add matrix multiply assist (MMA) test") Signed-off-by: Rashmica Gupta Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220617043935.428083-1-rashmica@linux.ibm.com tools/testing/selftests/powerpc/math/mma.S | 3 +++ 1 file changed, 3 insertions(+) commit e4787e71ae2de3f60bc04fe09d1be4ef628b6c68 Author: Rashmica Gupta Date: Fri Jun 17 14:31:35 2022 +1000 powerpc/signal: Update comment for clarity The comment being referred to was deleted in commit af1bbc3dd3d5 ("powerpc: Remove UP only lazy floating point and vector optimisations"). Add a bit more detail so it's clear why we need to clear the FP/VEC/VSX bits here. Signed-off-by: Rashmica Gupta Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220617043135.426897-1-rashmica@linux.ibm.com arch/powerpc/kernel/signal_64.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit fcdb758ce113c5d1b2b7034a058a9c472e42415e Author: Rashmica Gupta Date: Fri Jun 17 14:28:05 2022 +1000 powerpc: make facility_unavailable_exception 64s The facility unavailable exception is only available on ppc book3s machines so use CONFIG_PPC_BOOK3S_64 rather than CONFIG_PPC64. tm_unavailable is only called from facility_unavailable_exception so can also be under this Kconfig symbol. Signed-off-by: Rashmica Gupta Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220617042805.426231-1-rashmica@linux.ibm.com arch/powerpc/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95b002e4e47a36d88deec70808ef36674fb33cf5 Author: Uwe Kleine-König Date: Thu Jul 7 08:14:41 2022 +0200 powerpc/platforms/83xx/suspend: Remove write-only global variable pmc_dev is only assigned in .probe(), otherwise the variable is unused. So drop this pointer that serves no purpose. Signed-off-by: Uwe Kleine-König Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220707061441.193869-3-u.kleine-koenig@pengutronix.de arch/powerpc/platforms/83xx/suspend.c | 2 -- 1 file changed, 2 deletions(-) commit ccc1439b924bca5d5a5d81cf6b0d4b10b321282e Author: Uwe Kleine-König Date: Thu Jul 7 08:14:40 2022 +0200 powerpc/platforms/83xx/suspend: Prevent unloading the driver Returning an error in .remove() doesn't prevent a driver from being unloaded. On unbind this only results in an error message, but the device is remove anyhow. I guess the author's idea of just returning -EPERM in .remove() was to prevent unbinding a device. To achieve that set the suppress_bind_attrs driver property and drop the useless .remove callback. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Reviewed-by: Christophe Leroy Acked-by: Scott Wood Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220707061441.193869-2-u.kleine-koenig@pengutronix.de arch/powerpc/platforms/83xx/suspend.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit fde345e4d39a4f16697a8060564fff1dbac05035 Author: Uwe Kleine-König Date: Thu Jul 7 08:14:39 2022 +0200 powerpc/platforms/83xx/suspend: Reorder to get rid of a forward declaration By moving up pmc_types and pmc_match, the forward declaration for pmc_match can be dropped. Signed-off-by: Uwe Kleine-König Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220707061441.193869-1-u.kleine-koenig@pengutronix.de arch/powerpc/platforms/83xx/suspend.c | 43 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 22 deletions(-) commit 738f9dca0df3bb630e6f06a19573ab4e31bd443a Author: Jason Wang Date: Fri Jul 15 11:52:50 2022 +0800 powerpc/sysdev: Fix comment typo The double `is' is duplicated in line 110, remove one. Signed-off-by: Jason Wang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220715035250.5978-1-wangborong@cdjrlc.com arch/powerpc/sysdev/cpm2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 901a30cf5f765a26f1308701d9df9e7f3d0023a5 Author: Jason Wang Date: Mon Jul 18 15:55:53 2022 +0800 powerpc/pseries/vas: Fix comment typo The double `the' in line 807 is duplicated, remove one. Signed-off-by: Jason Wang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220718075553.70897-1-wangborong@cdjrlc.com arch/powerpc/platforms/pseries/vas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f00b5ab992c122c51bc37662b3b4df5963462f3 Author: Pali Rohár Date: Wed May 4 20:08:22 2022 +0200 powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes DT law_trgt_if property defines Local Access Window Target Interface. Local Access Window Target Interface is used for identifying individual peripheral and mapping its memory to CPU. Interface id is defined by hardware itself. U-Boot uses law_trgt_if DT property in PCIe nodes for configuring memory mapping of individual PCIe controllers. Linux kernel fsl_pci.c driver currently does not touch Local Access Window and expects that U-Boot configures it properly. Add law_trgt_if property to PCIe DT nodes for P2020. This allows usage of kernel P2020 PCIe DT nodes in U-Boot. And therefore allows to share P2020 DTS files between Linux kernel and U-Boot. Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220504180822.29782-1-pali@kernel.org arch/powerpc/boot/dts/fsl/p2020si-post.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 0fe1e96fef0a5c53b4c0d1500d356f3906000f81 Author: Pali Rohár Date: Wed Jul 6 12:21:48 2022 +0200 powerpc/pci: Prefer PCI domain assignment via DT 'linux,pci-domain' and alias Other Linux architectures use DT property 'linux,pci-domain' for specifying fixed PCI domain of PCI controller specified in Device-Tree. And lot of Freescale powerpc boards have defined numbered pci alias in Device-Tree for every PCIe controller which number specify preferred PCI domain. So prefer usage of DT property 'linux,pci-domain' (via function of_get_pci_domain_nr()) and DT pci alias (via function of_alias_get_id()) on powerpc architecture for assigning PCI domain to PCI controller. Fixes: 63a72284b159 ("powerpc/pci: Assign fixed PHB number based on device-tree properties") Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220706102148.5060-2-pali@kernel.org arch/powerpc/kernel/pci-common.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit d20c96deb3e2c1cedc47d2be9fc110ffed81b1af Author: Pali Rohár Date: Sat Jul 9 14:43:05 2022 +0200 powerpc/85xx: Fix description of MPC85xx and P1/P2 boards options More MPC85xx and P1/P2 boards options have incorrect description. Fix them to include list of all boards for which they enable/disable support. Signed-off-by: Pali Rohár Acked-by: Scott Wood Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220709124305.17559-1-pali@kernel.org arch/powerpc/platforms/85xx/Kconfig | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 2454a7af0f2a42918aa972147a0bec38e6656cd8 Author: Nayna Jain Date: Sat Jul 23 07:30:46 2022 -0400 powerpc/pseries: define driver for Platform KeyStore PowerVM provides an isolated Platform Keystore(PKS) storage allocation for each LPAR with individually managed access controls to store sensitive information securely. It provides a new set of hypervisor calls for Linux kernel to access PKS storage. Define POWER LPAR Platform KeyStore(PLPKS) driver using H_CALL interface to access PKS storage. Signed-off-by: Nayna Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220723113048.521744-2-nayna@linux.ibm.com arch/powerpc/include/asm/hvcall.h | 11 + arch/powerpc/platforms/pseries/Kconfig | 13 + arch/powerpc/platforms/pseries/Makefile | 1 + arch/powerpc/platforms/pseries/plpks.c | 460 ++++++++++++++++++++++++++++++++ arch/powerpc/platforms/pseries/plpks.h | 71 +++++ 5 files changed, 556 insertions(+) commit d80f6de9d601c30b53c17f00cb7cfe3169f2ddad Author: Alexey Kardashevskiy Date: Thu Jul 14 18:11:19 2022 +1000 powerpc/iommu: Fix iommu_table_in_use for a small default DMA window case The existing iommu_table_in_use() helper checks if the kernel is using any of TCEs. There are some reserved TCEs: 1) the very first one if DMA window starts from 0 to avoid having a zero but still valid DMA handle; 2) it_reserved_start..it_reserved_end to exclude MMIO32 window in case the default window spans across that - this is the default for the first DMA window on PowerNV. When 1) is the case and 2) is not the helper does not skip 1) and returns wrong status. This only seems occurring when passing through a PCI device to a nested guest (not something we support really well) so it has not been seen before. This fixes the bug by adding a special case for no MMIO32 reservation. Fixes: 3c33066a2190 ("powerpc/kernel/iommu: Add new iommu_table_in_use() helper") Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220714081119.3714605-1-aik@ozlabs.ru arch/powerpc/kernel/iommu.c | 5 +++++ 1 file changed, 5 insertions(+) commit d73b46c3c1449bf27f793b9d9ee86ed70c7a7163 Author: Alexey Kardashevskiy Date: Thu Jul 14 18:08:00 2022 +1000 powerpc/ioda/iommu/debugfs: Generate unique debugfs entries The iommu_table::it_index is a LIOBN which is not initialized on PowerNV as it is not used except IOMMU debugfs where it is used for a node name. This initializes it_index witn a unique number to avoid warnings and have a node for every iommu_table. This should not cause any behavioral change without CONFIG_IOMMU_DEBUGFS. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220714080800.3712998-1-aik@ozlabs.ru arch/powerpc/platforms/powernv/pci-ioda.c | 2 ++ 1 file changed, 2 insertions(+) commit b1fc44eaa9ba31e28c4125d6b9205a3582b47b5d Author: Alexey Kardashevskiy Date: Wed Jun 29 16:06:14 2022 +1000 pseries/iommu/ddw: Fix kdump to work in absence of ibm,dma-window The pseries platform uses 32bit default DMA window (always 4K pages) and optional 64bit DMA window available via DDW ("Dynamic DMA Windows"), 64K or 2M pages. For ages the default one was not removed and a huge window was created in addition. Things changed with SRIOV-enabled PowerVM which creates a default-and-bigger DMA window in 64bit space (still using 4K pages) for IOV VFs so certain OSes do not need to use the DDW API in order to utilize all available TCE budget. Linux on the other hand removes the default window and creates a bigger one (with more TCEs or/and a bigger page size - 64K/2M) in a bid to map the entire RAM, and if the new window size is smaller than that - it still uses this new bigger window. The result is that the default window is removed but the "ibm,dma-window" property is not. When kdump is invoked, the existing code tries reusing the existing 64bit DMA window which location and parameters are stored in the device tree but this fails as the new property does not make it to the kdump device tree blob. So the code falls back to the default window which does not exist anymore although the device tree says that it does. The result of that is that PCI devices become unusable and cannot be used for kdumping. This preserves the DMA64 and DIRECT64 properties in the device tree blob for the crash kernel. Since the crash kernel setup is done after device drivers are loaded and probed, the proper DMA config is stored at least for boot time devices. Because DDW window is optional and the code configures the default window first, the existing code creates an IOMMU table descriptor for the non-existing default DMA window. It is harmless for kdump as it does not touch the actual window (only reads what is mapped and marks those IO pages as used) but it is bad for kexec which clears it thinking it is a smaller default window rather than a bigger DDW window. This removes the "ibm,dma-window" property from the device tree after a bigger window is created and the crash kernel setup picks it up. Fixes: 381ceda88c4c ("powerpc/pseries/iommu: Make use of DDW for indirect mapping") Signed-off-by: Alexey Kardashevskiy Acked-by: Hari Bathini Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220629060614.1680476-1-aik@ozlabs.ru arch/powerpc/kexec/file_load_64.c | 54 +++++++++++++++++++++ arch/powerpc/platforms/pseries/iommu.c | 89 ++++++++++++++++++---------------- 2 files changed, 102 insertions(+), 41 deletions(-) commit c7255058b5430b5c42932383bd8887d591e7973a Author: Hari Bathini Date: Thu Jun 30 12:19:42 2022 +0530 powerpc/crash: save cpu register data in crash_smp_send_stop() During kdump, two set of NMI IPIs are sent to secondary CPUs, if 'crash_kexec_post_notifiers' option is set. The first set of NMI IPIs to stop the CPUs and the other set to collect register data. Instead, capture register data for secondary CPUs while stopping them itself. Also, fallback to smp_send_stop() in case the function gets called without kdump configured. Signed-off-by: Hari Bathini Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220630064942.192283-1-hbathini@linux.ibm.com arch/powerpc/include/asm/kexec.h | 1 + arch/powerpc/kernel/smp.c | 29 +++++---------- arch/powerpc/kexec/crash.c | 77 ++++++++++++++++++++++++---------------- 3 files changed, 57 insertions(+), 50 deletions(-) commit 51ac6d4ceaa4f2e878c1aa399135f2514a6acc24 Author: Michael Ellerman Date: Wed Jun 29 16:08:17 2022 +1000 powerpc: Update reviewers Christophe and Nick have been active in recent years on the mailing list and making contributions, add them as reviewers. Paul and Ben are no longer actively reviewing powerpc patches, remove them from the reviewers, they're still on linuxppc-dev if needed. Acked-by: Benjamin Herrenschmidt Acked-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220629060817.2943966-1-mpe@ellerman.id.au MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 36afe68714d45edf34430d28e3dc787425ad8b22 Author: Christophe Leroy Date: Fri Jul 8 09:11:08 2022 +0200 powerpc: Finally remove unnecessary headers from asm/prom.h Remove all headers included from asm/prom.h which are not used by asm/prom.h itself. Declare struct device_node and struct property locally to avoid including of.h Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4be954abef978b34cff9193fc566ffefdd3517bb.1657264228.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/prom.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 4d5c5bad51935482437528f7fa4dffdcb3330d8b Author: Christophe Leroy Date: Fri Jul 8 09:11:07 2022 +0200 powerpc: Remove asm/prom.h from asm/mpc52xx.h and asm/pci.h asm/pci.h and asm/mpc52xx.h don't need asm/prom.h Declare struct device_node locally to avoid including of.h Signed-off-by: Christophe Leroy [mpe: Add missing include of prom.h to of_rtc.c] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/cf5243343e2364c2b40f22ee5ad9a6e2453d1121.1657264228.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/mpc52xx.h | 3 ++- arch/powerpc/include/asm/pci.h | 1 - arch/powerpc/kernel/prom.c | 1 + arch/powerpc/sysdev/of_rtc.c | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-) commit 4177ab2283dcd98735572ebda56b9d479dc1d7f2 Author: Michael Ellerman Date: Wed Jul 27 15:03:52 2022 +1000 EDAC/mpc85xx: Include required of headers directly A subsequent commit to cleanup powerpc's asm/prom.h leads to build errors in mpc85xx_edac.c due to missing headers. Include all required headers directly to avoid the build failure. Reported-by: kernel test robot Signed-off-by: Michael Ellerman drivers/edac/mpc85xx_edac.c | 2 ++ 1 file changed, 2 insertions(+) commit 61657dcd528b75cd196adaf56890124c13953c8d Author: Christophe Leroy Date: Fri Jul 8 09:11:06 2022 +0200 scsi: cxlflash: Include missing linux/irqdomain.h powerpc's asm/prom.h brings some headers that it doesn't need itself. Once those headers are removed from asm/prom.h, the following errors occur: CC [M] drivers/scsi/cxlflash/ocxl_hw.o drivers/scsi/cxlflash/ocxl_hw.c: In function 'afu_map_irq': drivers/scsi/cxlflash/ocxl_hw.c:195:16: error: implicit declaration of function 'irq_create_mapping' [-Werror=implicit-function-declaration] 195 | virq = irq_create_mapping(NULL, irq->hwirq); | ^~~~~~~~~~~~~~~~~~ drivers/scsi/cxlflash/ocxl_hw.c:222:9: error: implicit declaration of function 'irq_dispose_mapping' [-Werror=implicit-function-declaration] 222 | irq_dispose_mapping(virq); | ^~~~~~~~~~~~~~~~~~~ drivers/scsi/cxlflash/ocxl_hw.c: In function 'afu_unmap_irq': drivers/scsi/cxlflash/ocxl_hw.c:264:13: error: implicit declaration of function 'irq_find_mapping'; did you mean 'is_cow_mapping'? [-Werror=implicit-function-declaration] 264 | if (irq_find_mapping(NULL, irq->hwirq)) { | ^~~~~~~~~~~~~~~~ | is_cow_mapping cc1: some warnings being treated as errors Fix it by including linux/irqdomain.h Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c6c0cc5e9179a642370a61439f95158271a78c03.1657264228.git.christophe.leroy@csgroup.eu drivers/scsi/cxlflash/ocxl_hw.c | 1 + 1 file changed, 1 insertion(+) commit ebef8abc963b9e537c0a0d619dd8faf1b8f2b183 Author: Christophe Leroy Date: Fri Jul 8 09:11:05 2022 +0200 video: fbdev: offb: Include missing linux/platform_device.h A lot of drivers were getting platform and of headers indirectly via headers like asm/pci.h or asm/prom.h Most of them were fixed during 5.19 cycle but a newissue was introduced by commit 52b1b46c39ae ("of: Create platform devices for OF framebuffers") Include missing platform_device.h to allow cleaning asm/pci.h Fixes: 52b1b46c39ae ("of: Create platform devices for OF framebuffers") Signed-off-by: Christophe Leroy Acked-by: Helge Deller Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f75b383673663e27f6b57e50b4abfb9fe3780b00.1657264228.git.christophe.leroy@csgroup.eu drivers/video/fbdev/offb.c | 1 + 1 file changed, 1 insertion(+) commit a05aae92f84ba6d2705f6dac206ef5dcf097ea96 Author: Bagas Sanjaya Date: Thu Jul 28 10:33:33 2022 +0700 docs: powerpc: add elf_hwcaps to table of contents elf_hwcaps documentation is missing from table of contents at index.rst, hence triggers Sphinx warning: Documentation/powerpc/elf_hwcaps.rst: WARNING: document isn't included in any toctree Add the documentation to the index to fix the warning. Fixes: 3df1ff42e69e91 ("powerpc: add documentation for HWCAPs") Reported-by: Stephen Rothwell Signed-off-by: Bagas Sanjaya Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/linuxppc-dev/20220727220050.549db613@canb.auug.org.au/ Link: https://lore.kernel.org/r/20220728033332.27836-4-bagasdotme@gmail.com Documentation/powerpc/index.rst | 1 + 1 file changed, 1 insertion(+) commit 0595a216920cb035030c73cec3ab9fe413ef1d77 Author: Bagas Sanjaya Date: Thu Jul 28 10:33:32 2022 +0700 docs: powerpc: use different label name for elf_hwcaps.rst Sphinx reported duplicate label warning: WARNING: duplicate label elf_hwcaps_index, other instance in Documentation/arm64/elf_hwcaps.rst The warning is caused by elf_hwcaps_index label name is already used for arm64 documentation, whileas powerpc use the same name. Disambiguate the label name for powerpc. Fixes: 3df1ff42e69e91 ("powerpc: add documentation for HWCAPs") Reported-by: Stephen Rothwell Signed-off-by: Bagas Sanjaya Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/linuxppc-dev/20220727220050.549db613@canb.auug.org.au/ Link: https://lore.kernel.org/r/20220728033332.27836-3-bagasdotme@gmail.com Documentation/powerpc/elf_hwcaps.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4515862b66d3bdaf681cade1c72f047c93d94d01 Author: Bagas Sanjaya Date: Thu Jul 28 10:33:31 2022 +0700 docs: powerpc: fix indentation warnings Sphinx reported unexpected indentation warnings: Documentation/powerpc/elf_hwcaps.rst:82: WARNING: Unexpected indentation. Documentation/powerpc/elf_hwcaps.rst:100: WARNING: Unexpected indentation. Documentation/powerpc/elf_hwcaps.rst:117: WARNING: Unexpected indentation. Documentation/powerpc/elf_hwcaps.rst:122: WARNING: Unexpected indentation. Documentation/powerpc/elf_hwcaps.rst:144: WARNING: Unexpected indentation. Fix these warnings by unindenting commit references and using literal code block for instructions list for PPC_FEATURE_ICACHE_SNOOP. Fixes: 3df1ff42e69e91 ("powerpc: add documentation for HWCAPs") Reported-by: Stephen Rothwell Signed-off-by: Bagas Sanjaya Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/linuxppc-dev/20220727220050.549db613@canb.auug.org.au/ Link: https://lore.kernel.org/r/20220728033332.27836-2-bagasdotme@gmail.com Documentation/powerpc/elf_hwcaps.rst | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit cc1049ccee20df870f2394c4d5d5fa8cabc4d0af Author: Marcin Wojtas Date: Wed Jul 27 01:09:18 2022 +0200 net: dsa: mv88e6xxx: fix speed setting for CPU/DSA ports Commit 3c783b83bd0f ("net: dsa: mv88e6xxx: get rid of SPEED_MAX setting") stopped relying on SPEED_MAX constant and hardcoded speed settings for the switch ports and rely on phylink configuration. It turned out, however, that when the relevant code is called, the mac_capabilites of CPU/DSA port remain unset. mv88e6xxx_setup_port() is called via mv88e6xxx_setup() in dsa_tree_setup_switches(), which precedes setting the caps in phylink_get_caps down in the chain of dsa_tree_setup_ports(). As a result the mac_capabilites are 0 and the default speed for CPU/DSA port is 10M at the start. To fix that, execute mv88e6xxx_get_caps() and obtain the capabilities driectly. Fixes: 3c783b83bd0f ("net: dsa: mv88e6xxx: get rid of SPEED_MAX setting") Signed-off-by: Marcin Wojtas Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220726230918.2772378-1-mw@semihalf.com Signed-off-by: Jakub Kicinski drivers/net/dsa/mv88e6xxx/chip.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit f8cd9f632f4415b1e8838bdca8ab42cfb37a6584 Author: Patrice Chotard Date: Wed Jun 29 15:30:13 2022 +0200 mtd: spi-nor: fix spi_nor_spimem_setup_op() call in spi_nor_erase_{sector,chip}() For erase operations, reg_proto must be used as indicated in struct spi_nor description in spi-nor.h. This issue was found when DT property spi-tx-bus-width is set to 4. In this case the spi_mem_op->addr.buswidth is set to 4 for erase command which is not correct. Tested on stm32mp157c-ev1 board with mx66l51235f spi-nor. Fixes: 0e30f47232ab ("mtd: spi-nor: add support for DTR protocol") Signed-off-by: Patrice Chotard [ta: use nor->reg_proto in spi_nor_controller_ops_erase()] Signed-off-by: Tudor Ambarus Tested-by: Alexander Sverdlin Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20220629133013.3382393-1-patrice.chotard@foss.st.com drivers/mtd/spi-nor/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b6b23833fc42a10ceed00006cb0a6184f9b9bbde Author: Takahiro Kuwano Date: Mon Jul 25 12:25:05 2022 +0300 mtd: spi-nor: spansion: Add s25hl-t/s25hs-t IDs and fixups The S25HL-T/S25HS-T family is the Infineon SEMPER Flash with Quad SPI. These Infineon chips support volatile version of configuration registers and it is recommended to update volatile registers in the field application due to a risk of the non-volatile registers corruption by power interrupt. Add support for volatile QE bit. For the single-die package parts (512Mb and 1Gb), only bottom 4KB and uniform sector sizes are supported. This is due to missing or incorrect entries in SMPT. Fixup for other sector sizes configurations will be followed up as needed. Tested on Xilinx Zynq-7000 FPGA board. Signed-off-by: Takahiro Kuwano Signed-off-by: Tudor Ambarus Acked-by: Michael Walle Link: https://lore.kernel.org/r/20220725092505.446315-8-tudor.ambarus@microchip.com drivers/mtd/spi-nor/spansion.c | 132 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) commit a6b50aa1279614df7033f8b57d6854fce0334e27 Author: Takahiro Kuwano Date: Mon Jul 25 12:25:04 2022 +0300 mtd: spi-nor: spansion: Add local function to discover page size The page size check in s28hs512t fixup can be used for s25hs/hl-t as well. Move that to a newly created local function. Signed-off-by: Takahiro Kuwano Signed-off-by: Tudor Ambarus Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20220725092505.446315-7-tudor.ambarus@microchip.com drivers/mtd/spi-nor/spansion.c | 53 ++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 22 deletions(-) commit d7931a21506321327351f68fdebf74a56a58e675 Author: Tudor Ambarus Date: Mon Jul 25 12:25:03 2022 +0300 mtd: spi-nor: core: Track flash's internal address mode We need to track the flash's internal address mode as there are flashes that can operate with 4B opcodes but unfortunately do not have a 4B opcode correspondent for all the 3B opcodes. Such an example is the Infineon Semper chips which provide 4B opcodes for read/program/erase but do not provide 4B opcodes for Read/Write Any Register. These registers are indexed by address and require the internal address mode of the flash before Read/Write Any Register opcodes are issued. 4B opcodes are preferred over changing the flash's address mode to 4byte, as set_4byte_addr_mode could be done in a non-volatile way and could break the boot sequence. Thus we need to track the flash's internal address mode so that we can use 4B opcodes together with opcodes that don't have a 4B opcode correspondent. Track flash's internal address mode. addr_mode_nbytes is discovered when parsing BFPT. For the BFPT_DWORD1_ADDRESS_BYTES_3_OR_4 case, one could introduce a method that queries the flash's internal address mode at run-time (works for Winbond). If a run-time querying can not be accomplished or if SFDP is not defined at all, but the address mode is volatile and resets to a default known value at boot, one can change the default addr_mode_nbytes value of 3 by introducing a flash_info flag. If the address mode can not be queried, discovered and it is configured via a non-volatile register, we may introduce a dt property, but it will harm the generic approach of the jedec,spi-nor compatible. All this complexity is not needed now, so let it for future development. Signed-off-by: Tudor Ambarus Reviewed-by: Takahiro Kuwano Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20220725092505.446315-6-tudor.ambarus@microchip.com drivers/mtd/spi-nor/core.h | 5 +++++ drivers/mtd/spi-nor/sfdp.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) commit 08412e72afba3a2daef3e7f3378c3753255a0017 Author: Takahiro Kuwano Date: Mon Jul 25 12:25:02 2022 +0300 mtd: spi-nor: core: Return error code from set_4byte_addr_mode() The prams->set_4byte_addr_mode returns error code but is not handled in spi_nor_init(). Handle the return code from set_4byte_addr_mode(). Suggested-by: Michael Walle Signed-off-by: Takahiro Kuwano Signed-off-by: Tudor Ambarus Reviewed-by: Pratyush Yadav Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20220725092505.446315-5-tudor.ambarus@microchip.com drivers/mtd/spi-nor/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47c6f8a67f2ce1b95202c16fa126411d6f5c7d5c Author: Tudor Ambarus Date: Mon Jul 25 12:25:01 2022 +0300 mtd: spi-nor: Do not change nor->addr_nbytes at SFDP parsing time At the SFDP parsing time we should not change members of struct spi_nor, but instead fill members of struct spi_nor_flash_parameters which could later on be used by callers. The caller will then decide if SFDP params should be used and more importantly when they should be used. Clean the code flow and don't initialize nor->addr_nbytes at SFDP parsing time. Signed-off-by: Tudor Ambarus Tested-by: Takahiro Kuwano Reviewed-by: Michael Walle Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20220725092505.446315-4-tudor.ambarus@microchip.com drivers/mtd/spi-nor/core.c | 5 ++--- drivers/mtd/spi-nor/core.h | 2 ++ drivers/mtd/spi-nor/issi.c | 2 +- drivers/mtd/spi-nor/sfdp.c | 8 ++++---- 4 files changed, 9 insertions(+), 8 deletions(-) commit aa5d980a144cd0bf717eb16609c29ff276f8bd47 Author: Tudor Ambarus Date: Mon Jul 25 12:25:00 2022 +0300 mtd: spi-nor: core: Shrink the storage size of the flash_info's addr_nbytes The maximum number of address bytes in SPI NOR is 4. Shrink the storage size of the flash_info's addr_nbytes. Signed-off-by: Tudor Ambarus Reviewed-by: Michael Walle Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20220725092505.446315-3-tudor.ambarus@microchip.com drivers/mtd/spi-nor/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c452d49849d48bd37ae97fc2bc92c6435707c35f Author: Tudor Ambarus Date: Mon Jul 25 12:24:59 2022 +0300 mtd: spi-nor: s/addr_width/addr_nbytes Address width was an unfortunate name, as it means the number of IO lines used for the address, whereas in the code it is used as the number of address bytes. s/addr_width/addr_nbytes throughout the entire SPI NOR framework. Signed-off-by: Tudor Ambarus Reviewed-by: Michael Walle Acked-by: Pratyush Yadav Link: https://lore.kernel.org/r/20220725092505.446315-2-tudor.ambarus@microchip.com drivers/mtd/spi-nor/controllers/hisi-sfc.c | 2 +- drivers/mtd/spi-nor/controllers/nxp-spifi.c | 8 ++--- drivers/mtd/spi-nor/core.c | 54 ++++++++++++++--------------- drivers/mtd/spi-nor/core.h | 12 +++---- drivers/mtd/spi-nor/debugfs.c | 2 +- drivers/mtd/spi-nor/issi.c | 8 ++--- drivers/mtd/spi-nor/otp.c | 12 +++---- drivers/mtd/spi-nor/sfdp.c | 32 ++++++++--------- drivers/mtd/spi-nor/xilinx.c | 2 +- include/linux/mtd/spi-nor.h | 4 +-- 10 files changed, 68 insertions(+), 68 deletions(-) commit 2bb88b2c4f7334bd91c734f3983492a133250edb Author: Jiri Pirko Date: Wed Jul 27 07:59:12 2022 +0200 net: devlink: remove redundant net_eq() check from sb_pool_get_dumpit() The net_eq() check is already performed inside devlinks_xa_for_each_registered_get() helper, so remove the redundant appearance. Signed-off-by: Jiri Pirko Link: https://lore.kernel.org/r/20220727055912.568391-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski net/core/devlink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a683dc5c148aeda51384a780945c0affda74f20c Author: Krzysztof Kozlowski Date: Tue Jul 26 13:56:50 2022 +0200 dt-bindings: net: hirschmann,hellcreek: use absolute path to other schema Absolute path to other DT schema is preferred over relative one. Signed-off-by: Krzysztof Kozlowski Acked-by: Kurt Kanzenbach Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220726115650.100726-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a482d47d33ac06295840e1e2ec3806713ccc04f3 Author: Zhengchao Shao Date: Tue Jul 26 11:07:48 2022 +0800 net/sched: sch_cbq: change the type of cbq_set_lss to void Change the type of cbq_set_lss to void. Signed-off-by: Zhengchao Shao Link: https://lore.kernel.org/r/20220726030748.243505-1-shaozhengchao@huawei.com Signed-off-by: Jakub Kicinski net/sched/sch_cbq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b01156128f4953204e83ff0e67b4a8b52e67f3d8 Merge: abed2baf6814 403fcb5118a0 Author: Mark Brown Date: Thu Jul 28 01:21:40 2022 +0100 ASoC: atmel: one fix and one cleanup Merge series from Claudiu Beznea : Hi, The series adds one fix for mchp-spdifrx and one cleanups for mchp-spdifrx and mchp-spdifrx drivers. Thank you, Claudiu Beznea Changes in v3: - changed cover letter title s/few/one, s/cleanups/cleanup - fix compilation error and warnings - keep only patch 1/5 and patch 3/5 from previous version as the rest of them were integrated Changes in v2: - s/tag/tab in the title of patch 2/5 Claudiu Beznea (2): ASoC: mchp-spdifrx: disable end of block interrupt on failures ASoC: mchp-spdiftx: remove references to mchp_i2s_caps sound/soc/atmel/mchp-spdifrx.c | 9 ++++++--- sound/soc/atmel/mchp-spdiftx.c | 8 -------- 2 files changed, 6 insertions(+), 11 deletions(-) -- 2.34.1 commit efc93392960cb9c3534e7aed15481ca7bcfdf15c Merge: 9cc0590ae351 1de452a0edda Author: Mark Brown Date: Thu Jul 28 00:01:30 2022 +0100 regulator: Consumer load management improvements Merge series from Douglas Anderson : The main goal of this series is to make a small dent in cleaning up the way we deal with regulator loads. The idea is to add some extra functionality to the regulator "bulk" API so that consumers can specify the load using that. commit c6e8e36c6ae4b11bed5643317afb66b6c3cadba8 Author: Fabio M. De Francesco Date: Sun Jul 24 23:25:23 2022 +0200 exec: Call kmap_local_page() in copy_string_kernel() The use of kmap_atomic() is being deprecated in favor of kmap_local_page(). With kmap_local_page(), the mappings are per thread, CPU local and not globally visible. Furthermore, the mappings can be acquired from any context (including interrupts). Therefore, replace kmap_atomic() with kmap_local_page() in copy_string_kernel(). Instead of open-coding local mapping + memcpy(), use memcpy_to_page(). Delete a redundant call to flush_dcache_page(). Tested with xfstests on a QEMU/ KVM x86_32 VM, 6GB RAM, booting a kernel with HIGHMEM64GB enabled. Suggested-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220724212523.13317-1-fmdefrancesco@gmail.com fs/exec.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 485ade76c95ac5ccaa52fee9d712471c9211b989 Author: Ezequiel Garcia Date: Mon Jul 18 23:41:22 2022 +0200 media: hantro: Remove dedicated control documentation The dedicated control required by the HEVC support was removed, and the driver now calculates the value internally. Remove the ad-hoc documentation as well. [hverkuil: remove hantro from Documentation/userspace-api/media/drivers/index.rst] Fixes: 3360755ef89ab ("media: hantro: Stop using Hantro dedicated control") Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/userspace-api/media/drivers/hantro.rst | 19 ------------------- Documentation/userspace-api/media/drivers/index.rst | 1 - 2 files changed, 20 deletions(-) commit aaf50b1969d7933a51ea421b11432a7fb90974e3 Author: Kees Cook Date: Wed Jun 8 14:40:24 2022 -0700 kasan: test: Silence GCC 12 warnings GCC 12 continues to get smarter about array accesses. The KASAN tests are expecting to explicitly test out-of-bounds conditions at run-time, so hide the variable from GCC, to avoid warnings like: ../lib/test_kasan.c: In function 'ksize_uaf': ../lib/test_kasan.c:790:61: warning: array subscript 120 is outside array bounds of 'void[120]' [-Warray-bounds] 790 | KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)ptr)[size]); | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~ ../lib/test_kasan.c:97:9: note: in definition of macro 'KUNIT_EXPECT_KASAN_FAIL' 97 | expression; \ | ^~~~~~~~~~ Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Vincenzo Frascino Cc: kasan-dev@googlegroups.com Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220608214024.1068451-1-keescook@chromium.org lib/test_kasan.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 72691a269f0baad6d5f4aa7af97c29081b86d70f Author: Trond Myklebust Date: Wed Jul 27 13:02:27 2022 -0400 SUNRPC: Don't reuse bvec on retransmission of the request If a request is re-encoded and then retransmitted, we need to make sure that we also re-encode the bvec, in case the page lists have changed. Fixes: ff053dbbaffe ("SUNRPC: Move the call to xprt_send_pagedata() out of xprt_sock_sendmsg()") Signed-off-by: Trond Myklebust include/linux/sunrpc/xprt.h | 3 ++- net/sunrpc/clnt.c | 1 - net/sunrpc/xprt.c | 27 ++++++++++++++++++--------- net/sunrpc/xprtsock.c | 12 ++---------- 4 files changed, 22 insertions(+), 21 deletions(-) commit abed2baf6814597f244cd879285b2210b0870548 Author: Krzysztof Kozlowski Date: Wed Jul 27 18:40:50 2022 +0200 ASoC: dt-bindings: use spi-peripheral-props.yaml Instead of listing directly properties typical for SPI peripherals, reference the spi-peripheral-props.yaml schema. This allows using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. Remove the spi-* properties which now come via spi-peripheral-props.yaml schema, except for the cases when device schema adds some constraints like maximum frequency. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. Signed-off-by: Krzysztof Kozlowski Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20220727164050.385241-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/adi,adau1977.yaml | 7 ++++--- Documentation/devicetree/bindings/sound/wlf,wm8731.yaml | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) commit 74944c873602a3ed8d16ff7af3f64af80c0f9dac Author: Josef Bacik Date: Mon Jul 25 13:05:05 2022 -0400 btrfs: reset RO counter on block group if we fail to relocate With the automatic block group reclaim code we will preemptively try to mark the block group RO before we start the relocation. We do this to make sure we should actually try to relocate the block group. However if we hit an error during the actual relocation we won't clean up our RO counter and the block group will remain RO. This was observed internally with file systems reporting less space available from df when we had failed background relocations. Fix this by doing the dec_ro in the error case. Fixes: 18bb8bbf13c1 ("btrfs: zoned: automatically reclaim zones") CC: stable@vger.kernel.org # 5.15+ Reviewed-by: Boris Burkov Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/block-group.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2c65e312bc6bb6e175c16a17db8ec86d2dcd1608 Author: Andrey Strachuk Date: Thu Jul 21 17:11:33 2022 +0300 ACPI/PCI: Remove useless NULL pointer checks Local variable 'p' is initialized by an address of field of acpi_resource, so it does not make sense to compare 'p' with NULL. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Andrey Strachuk Reviewed-by: Bjorn Helgaas Signed-off-by: Rafael J. Wysocki drivers/acpi/pci_link.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 369af6bf2c28f9f57438e82f953f6351cf2a94cd Author: Sakari Ailus Date: Mon Jul 11 14:26:06 2022 +0300 ACPI: property: Read buffer properties as integers Instead of adding a new property type, read buffer properties as integers. Even though the internal representation in ACPI is different, the data type is the same (byte) than on 8-bit integers. Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) commit 103e10c69c611efabccf57d799c4b191d53ee765 Author: Sakari Ailus Date: Fri Jul 22 09:57:46 2022 +0300 ACPI: property: Add support for parsing buffer property UUID Add support for newly added buffer property UUID, as defined in the DSD guide section 3.3 [1] Link: https://github.com/UEFI/DSD-Guide/blob/main/src/dsd-guide.adoc#buffer-data-extension-uuid # [1] Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 142 +++++++++++++++++++++++++++++++++++++++++++----- include/acpi/acpi_bus.h | 3 +- include/linux/acpi.h | 2 +- 3 files changed, 132 insertions(+), 15 deletions(-) commit 923044133367c8d72662938da0ea531bbdb39799 Author: Sakari Ailus Date: Mon Jul 11 14:26:04 2022 +0300 ACPI: property: Unify integer value reading functions Unify functions reading ACPI property integer values into a single macro using C99 _Generic(). Also use size_t for the counter instead of int. Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 96 ++++++++++++++++--------------------------------- 1 file changed, 31 insertions(+), 65 deletions(-) commit 88af7bbdea37af59a43072243b358753189fd7a5 Author: Sakari Ailus Date: Mon Jul 11 14:26:03 2022 +0300 ACPI: property: Switch node property referencing from ifs to a switch __acpi_node_get_property_reference() uses a series of if () statements for testing the same variable. There's soon going to be one more value to be tested. Switch to use switch() instead. Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) commit 1aef25d9d1edbcf5b9af4611448d931d0752377c Author: Sakari Ailus Date: Mon Jul 11 14:26:02 2022 +0300 ACPI: property: Move property ref argument parsing into a new function Split out property reference argument parsing out of the __acpi_node_get_property_reference() function into a new one, acpi_get_ref_args(). The new function will be needed also for parsing string references soon. Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 103 +++++++++++++++++++++++++++--------------------- 1 file changed, 58 insertions(+), 45 deletions(-) commit 5ee772883af5ed2dfe17e8af2b09d7003344be6c Author: Sakari Ailus Date: Mon Jul 11 14:26:01 2022 +0300 ACPI: property: Use acpi_object_type consistently in property ref parsing The type of union acpi_object field type is acpi_object_type. Use that instead of int. Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d52f10917a751f90e269a0ed9b6cca60dbe0300 Author: Sakari Ailus Date: Mon Jul 11 14:26:00 2022 +0300 ACPI: property: Tie data nodes to acpi handles ACPICA allows associating additional information (i.e. pointers with specific tag) to acpi_handles. The acpi_device's are associated to acpi_handle's in acpi_tie_acpi_dev() in scan.c, do the same here for the _DSD data nodes. This allows direct data node references in properties, implemented later on in the series. Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) commit 85140ef275f577f64e8a2c5789447222dfc14fc4 Author: Sakari Ailus Date: Mon Jul 11 14:25:59 2022 +0300 ACPI: property: Return type of acpi_add_nondev_subnodes() should be bool The value acpi_add_nondev_subnodes() returns is bool so change the return type of the function to match that. Fixes: 445b0eb058f5 ("ACPI / property: Add support for data-only subnodes") Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b4909252da9be56fe1e0a23c2c1908c5630525fa Author: Justin Stitt Date: Thu Jul 21 14:57:06 2022 -0700 drivers: lkdtm: fix clang -Wformat warning When building with Clang we encounter the following warning (ARCH=hexagon + CONFIG_FRAME_WARN=0): | ../drivers/misc/lkdtm/bugs.c:107:3: error: format specifies type | 'unsigned long' but the argument has type 'int' [-Werror,-Wformat] | REC_STACK_SIZE, recur_count); | ^~~~~~~~~~~~~~ Cast REC_STACK_SIZE to `unsigned long` to match format specifier `%lu` as well as maintain symmetry with `#define REC_STACK_SIZE (_AC(CONFIG_FRAME_WARN, UL) / 2)`. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Reported-by: Nathan Chancellor Suggested-by: Nathan Chancellor Suggested-by: Nick Desaulniers Signed-off-by: Justin Stitt Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Acked-by: Kees Cook Fixes: 24cccab42c419 ("lkdtm/bugs: Adjust recursion test to avoid elision") Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220721215706.4153027-1-justinstitt@google.com drivers/misc/lkdtm/bugs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ce4b78f73e8e00fb86bad67ee7f6fe12019707e Author: YiFei Zhu Date: Thu May 26 22:34:07 2022 +0000 selftests/seccomp: Fix compile warning when CC=clang clang has -Wconstant-conversion by default, and the constant 0xAAAAAAAAA (9 As) being converted to an int, which is generally 32 bits, results in the compile warning: clang -Wl,-no-as-needed -Wall -isystem ../../../../usr/include/ -lpthread seccomp_bpf.c -lcap -o seccomp_bpf seccomp_bpf.c:812:67: warning: implicit conversion from 'long' to 'int' changes value from 45812984490 to -1431655766 [-Wconstant-conversion] int kill = kill_how == KILL_PROCESS ? SECCOMP_RET_KILL_PROCESS : 0xAAAAAAAAA; ~~~~ ^~~~~~~~~~~ 1 warning generated. -1431655766 is the expected truncation, 0xAAAAAAAA (8 As), so use this directly in the code to avoid the warning. Fixes: 3932fcecd962 ("selftests/seccomp: Add test for unknown SECCOMP_RET kill behavior") Signed-off-by: YiFei Zhu Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220526223407.1686936-1-zhuyifei@google.com tools/testing/selftests/seccomp/seccomp_bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e93c0b8a981b55c8ee45aae2abf6028730ab194 Merge: 0113780870b1 ca7fd6cff3b8 Author: Jason Gunthorpe Date: Wed Jul 27 16:09:25 2022 -0300 Merge branch 'erdma' into rdma.git for-next Cheng Xu says ==================== This v14 patch set introduces the Elastic RDMA Adapter (ERDMA) driver, which released in Apsara Conference 2021 by Alibaba. The PR of ERDMA userspace provider has already been created [1]. ERDMA enables large-scale RDMA acceleration capability in Alibaba ECS environment, initially offered in g7re instance. It can improve the efficiency of large-scale distributed computing and communication significantly and expand dynamically with the cluster scale of Alibaba Cloud. ERDMA is a RDMA networking adapter based on the Alibaba MOC hardware. It works in the VPC network environment (overlay network), and uses iWarp transport protocol. ERDMA supports reliable connection (RC). ERDMA also supports both kernel space and user space verbs. Now we have already supported HPC/AI applications with libfabric, NoF and some other internal verbs libraries, such as xrdma, epsl, etc,. For the ECS instance with RDMA enabled, our MOC hardware generates two kinds of PCI devices: one for ERDMA, and one for the original net device (virtio-net). They are separated PCI devices. ==================== * branch 'erdma': RDMA/erdma: Add driver to kernel build environment RDMA/erdma: Add the ABI definitions RDMA/erdma: Add the erdma module RDMA/erdma: Add connection management (CM) support RDMA/erdma: Add verbs implementation RDMA/erdma: Add verbs header file RDMA/erdma: Add event queue implementation RDMA/erdma: Add cmdq implementation RDMA/erdma: Add main include file RDMA/erdma: Add the hardware related definitions RDMA: Add ERDMA to rdma_driver_id definition Signed-off-by: Jason Gunthorpe commit ca7fd6cff3b8df436f3e46b8fc80e6989700c8da Author: Cheng Xu Date: Wed Jul 27 09:49:27 2022 +0800 RDMA/erdma: Add driver to kernel build environment Add erdma to the kernel build environment, and sort the source order in drivers/infiniband/Kconfig. Link: https://lore.kernel.org/r/20220727014927.76564-12-chengyou@linux.alibaba.com Signed-off-by: Cheng Xu Signed-off-by: Jason Gunthorpe MAINTAINERS | 8 ++++++++ drivers/infiniband/Kconfig | 15 ++++++++------- drivers/infiniband/hw/Makefile | 1 + drivers/infiniband/hw/erdma/Kconfig | 12 ++++++++++++ drivers/infiniband/hw/erdma/Makefile | 4 ++++ 5 files changed, 33 insertions(+), 7 deletions(-) commit f5995fe2a0b1f4ec5e52e2022452246a13bf89b7 Author: Cheng Xu Date: Wed Jul 27 09:49:26 2022 +0800 RDMA/erdma: Add the ABI definitions Add erdma ABI definitions which will be shared between kernel and userspace. This commit also fix compile issues reported by lkp. Link: https://lore.kernel.org/r/20220727014927.76564-11-chengyou@linux.alibaba.com Reported-by: kernel test robot Signed-off-by: Cheng Xu Signed-off-by: Jason Gunthorpe include/uapi/rdma/erdma-abi.h | 49 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit df9ec2fc8e70e01532fd9161cd98711969561ff6 Author: Ezequiel Garcia Date: Mon Jul 18 18:41:23 2022 -0300 hantro: Remove incorrect HEVC SPS validation Currently, the driver tries to validat the HEVC SPS against the CAPTURE queue format (i.e. the decoded format). This is not correct, because typically the SPS control is set before the CAPTURE queue is negotiated. Fixes: 135ad96cb4d6b ("media: hantro: Be more accurate on pixel formats step_width constraints") Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro_drv.c | 12 ++++++------ drivers/staging/media/hantro/hantro_hevc.c | 9 +-------- drivers/staging/media/hantro/hantro_hw.h | 1 - 3 files changed, 7 insertions(+), 15 deletions(-) commit d55e6fb4803c274918d7b41ea80b3848ef12695c Author: Cheng Xu Date: Wed Jul 27 09:49:25 2022 +0800 RDMA/erdma: Add the erdma module Add the main erdma module, which provides interface to infiniband subsystem. This commit includes a modification from Christophe, that using the bitmap API to allocate bitmaps instead of hand-writing. And the commit also fixes warnings reported by static checkers. Link: https://lore.kernel.org/r/20220727014927.76564-10-chengyou@linux.alibaba.com Signed-off-by: Christophe JAILLET Signed-off-by: Dan Carpenter Reported-by: kernel test robot Signed-off-by: Cheng Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/erdma/erdma_main.c | 608 +++++++++++++++++++++++++++++++ 1 file changed, 608 insertions(+) commit 920d93eac8b97778fef48f34f10e58ddf870fc2a Author: Cheng Xu Date: Wed Jul 27 09:49:24 2022 +0800 RDMA/erdma: Add connection management (CM) support ERDMA's transport protocol is iWarp, so the driver must support CM interface. In CM part, we use the same way as SoftiWarp: using kernel socket to set up the connection, then performing MPA negotiation in kernel. So, this part of code mainly comes from SoftiWarp, base on it, we add some more features, such as non-blocking iw_connect implementation. This commit also fixes a duplicated include issue reported by Abaci Robot. Link: https://lore.kernel.org/r/20220727014927.76564-9-chengyou@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Cheng Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/erdma/erdma_cm.c | 1430 ++++++++++++++++++++++++++++++++ drivers/infiniband/hw/erdma/erdma_cm.h | 167 ++++ 2 files changed, 1597 insertions(+) commit 155055771704f8cbb5c176a4309b7dc30a50450c Author: Cheng Xu Date: Wed Jul 27 09:49:23 2022 +0800 RDMA/erdma: Add verbs implementation The RDMA verbs implementation of erdma is divided into three files: erdma_qp.c, erdma_cq.c, and erdma_verbs.c. Internal used functions and datapath functions of QP/CQ are put in erdma_qp.c and erdma_cq.c, the rest is in erdma_verbs.c. This commit also fixes some static check warnings. Link: https://lore.kernel.org/r/20220727014927.76564-8-chengyou@linux.alibaba.com Reported-by: Dan Carpenter Reported-by: Abaci Robot Signed-off-by: Yang Li Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Cheng Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/erdma/erdma_cq.c | 205 ++++ drivers/infiniband/hw/erdma/erdma_qp.c | 566 +++++++++++ drivers/infiniband/hw/erdma/erdma_verbs.c | 1460 +++++++++++++++++++++++++++++ 3 files changed, 2231 insertions(+) commit db23ae64caac84622c025860df69d4bc4859fa9c Author: Cheng Xu Date: Wed Jul 27 09:49:22 2022 +0800 RDMA/erdma: Add verbs header file This header file defines the main structures and functions used for RDMA Verbs, including qp, cq, mr, ucontext, etc,. Link: https://lore.kernel.org/r/20220727014927.76564-7-chengyou@linux.alibaba.com Signed-off-by: Cheng Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/erdma/erdma_verbs.h | 342 ++++++++++++++++++++++++++++++ 1 file changed, 342 insertions(+) commit f2a0a630b953451a59a2612ad8c29246638f0a38 Author: Cheng Xu Date: Wed Jul 27 09:49:21 2022 +0800 RDMA/erdma: Add event queue implementation Event queue (EQ) is the main notification way from erdma hardware to its driver. Each erdma device contains 2 kinds EQs: asynchronous EQ (AEQ) and completion EQ (CEQ). Per device has 1 AEQ, which used for RDMA async event report, and max to 32 CEQs (numbered for CEQ0 to CEQ31). CEQ0 is used for cmdq completion event report, and the rest CEQs are used for RDMA completion event report. Link: https://lore.kernel.org/r/20220727014927.76564-6-chengyou@linux.alibaba.com Signed-off-by: Cheng Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/erdma/erdma_eq.c | 329 +++++++++++++++++++++++++++++++++ 1 file changed, 329 insertions(+) commit 2af541bf8e32ee73f17fb28e2b3766a96b7311e5 Author: Cheng Xu Date: Wed Jul 27 09:49:20 2022 +0800 RDMA/erdma: Add cmdq implementation Cmdq is the main control plane channel between erdma driver and hardware. After erdma device is initialized, the cmdq channel will be active in the whole lifecycle of this driver. This commit also includes two modifications from Christophe, one is using the bitmap API to allocate bitmaps instead of hand-writing, and another is using the non-atomic bitmap API when applicable. Link: https://lore.kernel.org/r/20220727014927.76564-5-chengyou@linux.alibaba.com Signed-off-by: Christophe JAILLET Signed-off-by: Cheng Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/erdma/erdma_cmdq.c | 493 +++++++++++++++++++++++++++++++ 1 file changed, 493 insertions(+) commit bee85e0e31ecd2afbd19d2ae900f029a6f0c9e6d Author: Cheng Xu Date: Wed Jul 27 09:49:19 2022 +0800 RDMA/erdma: Add main include file Add ERDMA driver main header file, defining internal used data structures and operations. The defined data structures includes *cmdq*, which is used as the communication channel between ERDMA driver and hardware. Link: https://lore.kernel.org/r/20220727014927.76564-4-chengyou@linux.alibaba.com Signed-off-by: Cheng Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/erdma/erdma.h | 287 ++++++++++++++++++++++++++++++++++++ 1 file changed, 287 insertions(+) commit be3cff0f242d8b5ea43ca5beb4c2b44b216d0fe1 Author: Cheng Xu Date: Wed Jul 27 09:49:18 2022 +0800 RDMA/erdma: Add the hardware related definitions ERDMA is a PCIe device, and this file provides ERDMA hardware related definitions, mainly including PCIe device capabilities and restrictions, device registers definitions, doorbell space, doorbell structure definitions and WQE definitions. Link: https://lore.kernel.org/r/20220727014927.76564-3-chengyou@linux.alibaba.com Signed-off-by: Cheng Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/erdma/erdma_hw.h | 508 +++++++++++++++++++++++++++++++++ 1 file changed, 508 insertions(+) commit d8f70c47394c26a8d7c6e602d909de88d1bdae5e Author: Cheng Xu Date: Wed Jul 27 09:49:17 2022 +0800 RDMA: Add ERDMA to rdma_driver_id definition Define RDMA_DRIVER_ERDMA in enum rdma_driver_id. Link: https://lore.kernel.org/r/20220727014927.76564-2-chengyou@linux.alibaba.com Signed-off-by: Cheng Xu Signed-off-by: Jason Gunthorpe include/uapi/rdma/ib_user_ioctl_verbs.h | 1 + 1 file changed, 1 insertion(+) commit 143201a6435bf65f0115435e9dc6d95c66b908e9 Author: Jernej Skrabec Date: Mon Jul 18 18:56:49 2022 +0200 media: cedrus: hevc: Add check for invalid timestamp Not all DPB entries will be used most of the time. Unused entries will thus have invalid timestamps. They will produce negative buffer index which is not specifically handled. This works just by chance in current code. It will even produce bogus pointer, but since it's not used, it won't do any harm. Let's fix that brittle design by skipping writing DPB entry altogether if timestamp is invalid. Fixes: 86caab29da78 ("media: cedrus: Add HEVC/H.265 decoding support") Signed-off-by: Jernej Skrabec Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 3 +++ 1 file changed, 3 insertions(+) commit e39cc4960207a67a26b39ebc8449f15c53da0a99 Author: Hans Verkuil Date: Mon Jul 18 16:54:53 2022 +0200 media: sunxi: sun6i_mipi_csi2.c/sun8i_a83t_mipi_csi2.c: clarify error handling Both sun6i_mipi_csi2.c and sun8i_a83t_mipi_csi2.c have the same issue: the comment before the ret = 0 assignment is incorrect, drop it and always assign the result of the v4l2_subdev_call(..., 0) to ret. In the disable label check for !on and set ret to 0 in that case. This fixes two smatch warnings: drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c:193 sun6i_mipi_csi2_s_stream() warn: missing error code 'ret' drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c:225 sun8i_a83t_mipi_csi2_s_stream() warn: missing error code 'ret' Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c | 7 ++++--- .../platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) commit 21b1b6797fbe4fb5863c96f350359d0e982faddd Author: Laurent Pinchart Date: Mon Jul 18 14:12:19 2022 +0200 media: uvcvideo: Fix invalid pointer in uvc_ctrl_init_ctrl() The handling of per-device mappings introduced in commit 86f7ef773156 ("media: uvcvideo: Add support for per-device control mapping overrides") overwrote the mapping variable after it was initialized and before it was used, leading to usage of an invalid pointer for devices with per-device mappings. Fix it. Fixes: 86f7ef773156 ("media: uvcvideo: Add support for per-device control mapping overrides") Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_ctrl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit bb85604b9a05135e2c821e0506a59cfbee404aa9 Author: Laurent Pinchart Date: Mon Jul 18 14:24:02 2022 +0200 media: Documentation: mc-core: Fix typo Fix a typo in the mc-core.rst media driver API documentation. Due to its nature, the typo unfortunately caused a warning during documentation build. Fixes: 03b282861ca7 ("media: mc-entity: Add a new helper function to get a remote pad for a pad") Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/driver-api/media/mc-core.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b9233731f78298fcbdf2c16f0801c36d65863bb Author: Hans Verkuil Date: Fri Jul 15 17:10:33 2022 +0200 media: videodev2.h.rst.exceptions: add missing exceptions Add new exceptions for V4L2_COLORSPACE_LAST, V4L2_XFER_FUNC_LAST and V4L2_YCBCR_ENC_LAST. This fixes documentation warnings: Documentation/output/videodev2.h.rst:6: WARNING: undefined label: v4l2-colorspace-last Documentation/output/videodev2.h.rst:6: WARNING: undefined label: v4l2-xfer-func-last Documentation/output/videodev2.h.rst:6: WARNING: undefined label: v4l2-ycbcr-enc-last Signed-off-by: Hans Verkuil Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab Documentation/userspace-api/media/videodev2.h.rst.exceptions | 3 +++ 1 file changed, 3 insertions(+) commit af89bb206d66950c3abe96970c766d3afca1cc43 Author: Hans Verkuil Date: Fri Jul 15 17:06:05 2022 +0200 media: vimc: wrong pointer is used with PTR_ERR Fix smatch warning: drivers/media/test-drivers/vimc/vimc-core.c:214 vimc_create_links() warn: passing a valid pointer to 'PTR_ERR' Signed-off-by: Hans Verkuil Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab drivers/media/test-drivers/vimc/vimc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c808f4632349bda65b2ec41220f0a2035f780619 Author: Tejun Heo Date: Wed Jul 27 07:54:55 2022 -1000 cgroup: remove "no" prefixed mount options 30312730bd02 ("cgroup: Add "no" prefixed mount options") added "no" prefixed mount options to allow turning them off and 6a010a49b63a ("cgroup: Make !percpu threadgroup_rwsem operations optional") added one more "no" prefixed mount option. However, Michal pointed out that the "no" prefixed options aren't necessary in allowing mount options to be turned off: # grep group /proc/mounts cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,relatime,nsdelegate,memory_recursiveprot 0 0 # mount -o remount,nsdelegate,memory_recursiveprot none /sys/fs/cgroup # grep cgroup /proc/mounts cgroup2 /sys/fs/cgroup cgroup2 rw,relatime,nsdelegate,memory_recursiveprot 0 0 Note that this is different from the remount behavior when the mount(1) is invoked without the device argument - "none": # grep cgroup /proc/mounts cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot 0 0 # mount -o remount,nsdelegate,memory_recursiveprot /sys/fs/cgroup # grep cgroup /proc/mounts cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot 0 0 While a bit confusing, given that there is a way to turn off the options, there's no reason to have the explicit "no" prefixed options. Let's remove them. Signed-off-by: Tejun Heo Cc: Michal Koutný Signed-off-by: Tejun Heo Documentation/admin-guide/cgroup-v2.rst | 8 ++++---- kernel/cgroup/cgroup.c | 24 ++++-------------------- 2 files changed, 8 insertions(+), 24 deletions(-) commit 0113780870b1597ae49f30abfa4957c239f913d3 Author: Aharon Landau Date: Tue Jul 26 10:19:11 2022 +0300 RDMA/mlx5: Rename the mkey cache variables and functions After replacing the MR cache with an Mkey cache, rename the variables and functions to fit the new meaning. Link: https://lore.kernel.org/r/20220726071911.122765-6-michaelgur@nvidia.com Signed-off-by: Aharon Landau Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 4 +-- drivers/infiniband/hw/mlx5/mlx5_ib.h | 14 +++++----- drivers/infiniband/hw/mlx5/mr.c | 54 ++++++++++++++++++------------------ drivers/infiniband/hw/mlx5/odp.c | 2 +- include/linux/mlx5/driver.h | 6 ++-- 5 files changed, 40 insertions(+), 40 deletions(-) commit 6b7533869523ae58e2b914551305b0e47cbeb247 Author: Aharon Landau Date: Tue Jul 26 10:19:10 2022 +0300 RDMA/mlx5: Store in the cache mkeys instead of mrs Currently, the driver stores mlx5_ib_mr struct in the cache entries, although the only use of the cached MR is the mkey. Store only the mkey in the cache. Link: https://lore.kernel.org/r/20220726071911.122765-5-michaelgur@nvidia.com Signed-off-by: Aharon Landau Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/mlx5_ib.h | 26 ++--- drivers/infiniband/hw/mlx5/mr.c | 200 +++++++++++++++-------------------- 2 files changed, 97 insertions(+), 129 deletions(-) commit 19591f134c59703dfc272356808e6fe2037d0d40 Author: Aharon Landau Date: Tue Jul 26 10:19:09 2022 +0300 RDMA/mlx5: Store the number of in_use cache mkeys instead of total_mrs total_mrs is used only to calculate the number of mkeys currently in use. To simplify things, replace it with a new member called "in_use" and directly store the number of mkeys currently in use. Link: https://lore.kernel.org/r/20220726071911.122765-4-michaelgur@nvidia.com Signed-off-by: Aharon Landau Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/mlx5_ib.h | 4 +--- drivers/infiniband/hw/mlx5/mr.c | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 18 deletions(-) commit 86457a92df1bebdcd8e20afa286427e4b525aa08 Author: Aharon Landau Date: Tue Jul 26 10:19:08 2022 +0300 RDMA/mlx5: Replace cache list with Xarray The Xarray allows us to store the cached mkeys in memory efficient way. Entries are reserved in the Xarray using xa_cmpxchg before calling to the upcoming callbacks to avoid allocations in interrupt context. The xa_cmpxchg can sleep when using GFP_KERNEL, so we call it in a loop to ensure one reserved entry for each process trying to reserve. Link: https://lore.kernel.org/r/20220726071911.122765-3-michaelgur@nvidia.com Signed-off-by: Aharon Landau Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/mlx5_ib.h | 14 +-- drivers/infiniband/hw/mlx5/mr.c | 226 +++++++++++++++++++++++------------ 2 files changed, 152 insertions(+), 88 deletions(-) commit 17ae355926ed1832449d52748334b8fa799301f1 Author: Aharon Landau Date: Tue Jul 26 10:19:07 2022 +0300 RDMA/mlx5: Replace ent->lock with xa_lock In the next patch, ent->list will be replaced with an xarray. The xarray uses an internal lock to protect the indexes. Use it to protect all the entry fields, and get rid of ent->lock. Link: https://lore.kernel.org/r/20220726071911.122765-2-michaelgur@nvidia.com Signed-off-by: Aharon Landau Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/mlx5_ib.h | 5 +- drivers/infiniband/hw/mlx5/mr.c | 92 ++++++++++++++++++------------------ 2 files changed, 47 insertions(+), 50 deletions(-) commit 0982c8d859f8f7022b9fd44d421c7ec721bb41f9 Merge: ae98a4a98993 a4c750e2328a Author: Marc Zyngier Date: Wed Jul 27 18:33:27 2022 +0100 Merge branch kvm-arm64/nvhe-stacktrace into kvmarm-master/next * kvm-arm64/nvhe-stacktrace: (27 commits) : . : Add an overflow stack to the nVHE EL2 code, allowing : the implementation of an unwinder, courtesy of : Kalesh Singh. From the cover letter (slightly edited): : : "nVHE has two modes of operation: protected (pKVM) and unprotected : (conventional nVHE). Depending on the mode, a slightly different approach : is used to dump the hypervisor stacktrace but the core unwinding logic : remains the same. : : * Protected nVHE (pKVM) stacktraces: : : In protected nVHE mode, the host cannot directly access hypervisor memory. : : The hypervisor stack unwinding happens in EL2 and is made accessible to : the host via a shared buffer. Symbolizing and printing the stacktrace : addresses is delegated to the host and happens in EL1. : : * Non-protected (Conventional) nVHE stacktraces: : : In non-protected mode, the host is able to directly access the hypervisor : stack pages. : : The hypervisor stack unwinding and dumping of the stacktrace is performed : by the host in EL1, as this avoids the memory overhead of setting up : shared buffers between the host and hypervisor." : : Additional patches from Oliver Upton and Marc Zyngier, tidying up : the initial series. : . arm64: Update 'unwinder howto' KVM: arm64: Don't open code ARRAY_SIZE() KVM: arm64: Move nVHE-only helpers into kvm/stacktrace.c KVM: arm64: Make unwind()/on_accessible_stack() per-unwinder functions KVM: arm64: Move nVHE stacktrace unwinding into its own compilation unit KVM: arm64: Move PROTECTED_NVHE_STACKTRACE around KVM: arm64: Introduce pkvm_dump_backtrace() KVM: arm64: Implement protected nVHE hyp stack unwinder KVM: arm64: Save protected-nVHE (pKVM) hyp stacktrace KVM: arm64: Stub implementation of pKVM HYP stack unwinder KVM: arm64: Allocate shared pKVM hyp stacktrace buffers KVM: arm64: Add PROTECTED_NVHE_STACKTRACE Kconfig KVM: arm64: Introduce hyp_dump_backtrace() KVM: arm64: Implement non-protected nVHE hyp stack unwinder KVM: arm64: Prepare non-protected nVHE hypervisor stacktrace KVM: arm64: Stub implementation of non-protected nVHE HYP stack unwinder KVM: arm64: On stack overflow switch to hyp overflow_stack arm64: stacktrace: Add description of stacktrace/common.h arm64: stacktrace: Factor out common unwind() arm64: stacktrace: Handle frame pointer from different address spaces ... Signed-off-by: Marc Zyngier commit a4c750e2328a117dc9b19a2a61db0d4347902029 Author: Marc Zyngier Date: Wed Jul 27 15:29:06 2022 +0100 arm64: Update 'unwinder howto' Implementing a new unwinder is a bit more involved than writing a couple of helpers, so let's not lure the reader into a false sense of comfort. Instead, let's point out what they should call into, and what sort of parameter they need to provide. Signed-off-by: Marc Zyngier Reviewed-by: Kalesh Singh Tested-by: Kalesh Singh Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20220727142906.1856759-7-maz@kernel.org arch/arm64/include/asm/stacktrace/common.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 62ae21627aa96f6ef361981dd181c74dc7aa314c Author: Oliver Upton Date: Wed Jul 27 15:29:05 2022 +0100 KVM: arm64: Don't open code ARRAY_SIZE() Use ARRAY_SIZE() instead of an open-coded version. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Reviewed-by: Kalesh Singh Tested-by: Kalesh Singh Link: https://lore.kernel.org/r/20220727142906.1856759-6-maz@kernel.org arch/arm64/kvm/hyp/nvhe/stacktrace.c | 3 +-- arch/arm64/kvm/stacktrace.c | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) commit 0e773da1e688a1425ef7deae58fa11c5c7e09533 Author: Marc Zyngier Date: Wed Jul 27 15:29:04 2022 +0100 KVM: arm64: Move nVHE-only helpers into kvm/stacktrace.c kvm_nvhe_stack_kern_va() only makes sense as part of the nVHE unwinder, so simply move it there. Signed-off-by: Marc Zyngier Reviewed-by: Kalesh Singh Tested-by: Kalesh Singh Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20220727142906.1856759-5-maz@kernel.org arch/arm64/include/asm/stacktrace/nvhe.h | 41 -------------------------------- arch/arm64/kvm/stacktrace.c | 41 ++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 41 deletions(-) commit 4e00532f37365967e9896966b1fe61888e659259 Author: Marc Zyngier Date: Wed Jul 27 15:29:03 2022 +0100 KVM: arm64: Make unwind()/on_accessible_stack() per-unwinder functions Having multiple versions of on_accessible_stack() (one per unwinder) makes it very hard to reason about what is used where due to the complexity of the various includes, the forward declarations, and the reliance on everything being 'inline'. Instead, move the code back where it should be. Each unwinder implements: - on_accessible_stack() as well as the helpers it depends on, - unwind()/unwind_next(), as they pass on_accessible_stack as a parameter to unwind_next_common() (which is the only common code here) This hardly results in any duplication, and makes it much easier to reason about the code. Signed-off-by: Marc Zyngier Reviewed-by: Kalesh Singh Tested-by: Kalesh Singh Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20220727142906.1856759-4-maz@kernel.org arch/arm64/include/asm/stacktrace.h | 74 ------------------------ arch/arm64/include/asm/stacktrace/common.h | 55 +++++------------- arch/arm64/include/asm/stacktrace/nvhe.h | 84 +--------------------------- arch/arm64/kernel/stacktrace.c | 90 ++++++++++++++++++++++++++++++ arch/arm64/kvm/hyp/nvhe/stacktrace.c | 52 +++++++++++++++++ arch/arm64/kvm/stacktrace.c | 55 ++++++++++++++++++ 6 files changed, 213 insertions(+), 197 deletions(-) commit 9f5fee05f6897d0fe0e3a44ade71bb85cd97b2ef Author: Marc Zyngier Date: Wed Jul 27 15:29:02 2022 +0100 KVM: arm64: Move nVHE stacktrace unwinding into its own compilation unit The unwinding code doesn't really belong to the exit handling code. Instead, move it to a file (conveniently named stacktrace.c to confuse the reviewer), and move all the stacktrace-related stuff there. It will be joined by more code very soon. Signed-off-by: Marc Zyngier Reviewed-by: Kalesh Singh Tested-by: Kalesh Singh Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20220727142906.1856759-3-maz@kernel.org arch/arm64/include/asm/stacktrace/nvhe.h | 2 + arch/arm64/kvm/Makefile | 2 +- arch/arm64/kvm/handle_exit.c | 98 ------------------------- arch/arm64/kvm/stacktrace.c | 120 +++++++++++++++++++++++++++++++ 4 files changed, 123 insertions(+), 99 deletions(-) commit 03fe9cd05b9f38353208c23bd791dac47c912054 Author: Marc Zyngier Date: Wed Jul 27 15:29:01 2022 +0100 KVM: arm64: Move PROTECTED_NVHE_STACKTRACE around Make the dependency with EL2_DEBUG more obvious by moving the stacktrace configurtion *after* it. Signed-off-by: Marc Zyngier Reviewed-by: Kalesh Singh Tested-by: Kalesh Singh Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20220727142906.1856759-2-maz@kernel.org arch/arm64/kvm/Kconfig | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 19b7858c3357df038d896c10e0d5e4572a77dd25 Author: Bjorn Helgaas Date: Tue Jul 19 16:13:25 2022 -0500 PCI: Convert to new *_PM_OPS macros Replace SET_*_PM_OPS with *_PM_OPS, which which have the advantage that the compiler always sees the PM callbacks as referenced, so they don't need to be wrapped with "#ifdef CONFIG_PM_SLEEP" or tagged with "__maybe_unused" to avoid "defined but not used" warnings. See 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones"). Link: https://lore.kernel.org/r/20220719215108.1583108-1-helgaas@kernel.org Tested-by: Arnd Bergmann Signed-off-by: Bjorn Helgaas Reviewed-by: Pali Rohár # pci-mvebu.c Reviewed-by: Arnd Bergmann drivers/pci/controller/cadence/pcie-cadence.c | 6 ++---- drivers/pci/controller/dwc/pci-dra7xx.c | 8 +++----- drivers/pci/controller/dwc/pci-exynos.c | 8 ++++---- drivers/pci/controller/dwc/pcie-intel-gw.c | 8 ++++---- drivers/pci/controller/pci-mvebu.c | 4 +--- drivers/pci/controller/pci-tegra.c | 9 ++++----- drivers/pci/controller/pcie-mediatek-gen3.c | 14 +++++++------- drivers/pci/controller/pcie-mediatek.c | 8 ++++---- drivers/pci/controller/pcie-rcar-host.c | 4 ++-- drivers/pci/controller/pcie-rockchip-host.c | 8 ++++---- 10 files changed, 35 insertions(+), 42 deletions(-) commit 94c6511636302889be7d0d7cc216d6a1a2433c7b Author: Jim Quinlan Date: Tue Jul 26 12:39:11 2022 -0500 PCI: brcmstb: Rename .map_bus() functions to end with 'map_bus' Rename the .map_bus() functions to end with 'map_bus' so they're easy to find with, e.g., 'git grep "^static.*_map_bus" drivers/pci/'. [bhelgaas: rename brcm_pcie_map_bus32() to brcm7425_pcie_map_bus() for better cscope-ability (".*_map_bus" is not the same as ".*_map_bus.*")] Link: https://lore.kernel.org/r/20220725151258.42574-8-jim2101024@gmail.com Signed-off-by: Jim Quinlan Signed-off-by: Bjorn Helgaas Tested-by: Florian Fainelli drivers/pci/controller/pcie-brcmstb.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 7a32e9b3ff01cdc12ea124fa258aacd31490dd11 Author: Jim Quinlan Date: Mon Jul 25 11:12:54 2022 -0400 PCI: brcmstb: Disable/enable regulators in suspend/resume If we found power regulators for a device below the Root Port, disable them during suspend and re-enable them during resume. If any downstream device can be a wakeup device, do not turn off the regulators as the device will need them on. [bhelgaas: drop unused regulator_oops, skip wrapping of .add_bus()/ .remove_bus(), move brcm_pcie_start_link() to .add_bus() in previous patch, squash WOL checking into this patch] Link: https://lore.kernel.org/r/20220725151258.42574-6-jim2101024@gmail.com Link: https://lore.kernel.org/r/20220725151258.42574-7-jim2101024@gmail.com Signed-off-by: Jim Quinlan Signed-off-by: Bjorn Helgaas Tested-by: Florian Fainelli drivers/pci/controller/pcie-brcmstb.c | 64 ++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 5 deletions(-) commit 9e6be018b26347c26a93e63fb50a37ee2c9311de Author: Jim Quinlan Date: Mon Jul 25 11:12:53 2022 -0400 PCI: brcmstb: Enable child bus device regulators from DT Some platforms have power regulators for slots or devices below Root Ports. On platforms like Raspberry Pi 4, these regulators are described in the Root Port device tree node, since they logically belong to the Root Port, not to the host bridge itself. Add an .add_bus() hook (called when pci_alloc_child_bus() allocates the secondary ("child") bus for a bridge), and look for such regulators. If we find some, enable them before bringing up the link and enumerating devices on the child bus. Similarly, when pci_remove_bus() calls the ops->remove_bus() hook, disable the regulators. The regulators that may be described in a Root Port DT device are: vpcie3v3 vpcie3v3aux vpcie12v These control power to the device downstream from the Root Port. [bhelgaas: commit log, name hooks brcm_pcie_add_bus(), etc, since we only support one set of subregulator info, save info in struct brcm_pcie instead of dev->driver_data, move brcm_pcie_start_link() from probe to .add_bus() (from subsequent patch)] Link: https://lore.kernel.org/r/20220725151258.42574-5-jim2101024@gmail.com Signed-off-by: Jim Quinlan Signed-off-by: Bjorn Helgaas Tested-by: Florian Fainelli drivers/pci/controller/pcie-brcmstb.c | 103 ++++++++++++++++++++++++++++++++-- 1 file changed, 98 insertions(+), 5 deletions(-) commit 0693b4207fd73c1a23edb21fbfc0020532f53fb9 Author: Jim Quinlan Date: Mon Jul 25 11:12:51 2022 -0400 PCI: brcmstb: Split post-link up initialization to brcm_pcie_start_link() Previously brcm_pcie_setup() initialized the Root Port itself as well as doing the actual link-up. Split brcm_pcie_setup() into two functions: - brcm_pcie_setup(), which initializes everything that does not require the link itself to be up, and - brcm_pcie_start_link(), which brings up the link and initializes things that depend on the link being up. [bhelgaas: condense commit log, deferring details for future changes] Link: https://lore.kernel.org/r/20220725151258.42574-3-jim2101024@gmail.com Signed-off-by: Jim Quinlan Signed-off-by: Bjorn Helgaas Tested-by: Florian Fainelli drivers/pci/controller/pcie-brcmstb.c | 111 ++++++++++++++++++++-------------- 1 file changed, 64 insertions(+), 47 deletions(-) commit 5fb8f2628edf26c679d0079fae19b99aef82af03 Author: Jim Quinlan Date: Mon Jul 25 11:12:52 2022 -0400 PCI: brcmstb: Prevent config space access when link is down When the link is down, config accesses to downstream devices cause CPU aborts. Allow config accesses only when the link is up. As the following scenario shows, this check is racy and cannot completely avoid CPU aborts, but it makes them less likely: pci_generic_config_read addr = brcm_pcie_map_conf # bus->ops->map_bus() brcm_pcie_link_up # returns "true"; link is up *val = readb(addr) # link is now down Note that config space accesses to the Root Port are not affected by link status. [bhelgaas: commit log, use PCIE_ECAM_REG() instead of magic 0xfff masks; note that pci_generic_config_read32() masks low two bits already] Link: https://lore.kernel.org/r/20220725151258.42574-4-jim2101024@gmail.com Signed-off-by: Jim Quinlan Signed-off-by: Bjorn Helgaas Tested-by: Florian Fainelli drivers/pci/controller/pcie-brcmstb.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 0ac2ff426e3d48e6c642b14b53858e2174607231 Author: Jim Quinlan Date: Mon Jul 25 11:12:50 2022 -0400 PCI: brcmstb: Remove unnecessary forward declarations Remove forward function declarations in this driver. Also move some constant structure definitions lower in the file. There are no changes to the code that has been moved. Link: https://lore.kernel.org/r/20220725151258.42574-2-jim2101024@gmail.com Signed-off-by: Jim Quinlan Signed-off-by: Bjorn Helgaas Tested-by: Florian Fainelli drivers/pci/controller/pcie-brcmstb.c | 149 ++++++++++++++++------------------ 1 file changed, 72 insertions(+), 77 deletions(-) commit 6622e3a73112fc336c1c2c582428fb5ef18e456a Author: Trond Myklebust Date: Wed Jul 27 12:27:54 2022 -0400 SUNRPC: Reinitialise the backchannel request buffers before reuse When we're reusing the backchannel requests instead of freeing them, then we should reinitialise any values of the send/receive xdr_bufs so that they reflect the available space. Fixes: 0d2a970d0ae5 ("SUNRPC: Fix a backchannel race") Signed-off-by: Trond Myklebust net/sunrpc/backchannel_rqst.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 60320e6ef485079ded4c081326e96aaadbe96ae1 Author: Krzysztof Kozlowski Date: Tue Jul 26 14:02:15 2022 +0200 dt-bindings: watchdog: qcom,pm8916-wdt: convert to dtschema Convert the Qualcomm PM8916 watchdog timer controller bindings to DT schema and include them in parent device schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vinod Koul Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220726120215.101868-3-krzysztof.kozlowski@linaro.org .../devicetree/bindings/power/reset/qcom,pon.yaml | 4 ++ .../bindings/watchdog/qcom,pm8916-wdt.txt | 28 ------------ .../bindings/watchdog/qcom,pm8916-wdt.yaml | 51 ++++++++++++++++++++++ 3 files changed, 55 insertions(+), 28 deletions(-) commit 99cab201fc634f2cdb1fd2c99be00df99ee04f6c Author: Krzysztof Kozlowski Date: Tue Jul 26 14:02:14 2022 +0200 dt-bindings: power: reset: qcom,pon: use absolute path to other schema Absolute path to other DT schema is preferred over relative one. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vinod Koul Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220726120215.101868-2-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/power/reset/qcom,pon.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 40b09653b1977c9630f24c9ca17322d5b38f1ca5 Author: Daniel Müller Date: Wed Jul 27 00:11:56 2022 +0000 selftests/bpf: Adjust vmtest.sh to use local kernel configuration So far the vmtest.sh script, which can be used as a convenient way to run bpf selftests, has obtained the kernel config safe to use for testing from the libbpf/libbpf GitHub repository [0]. Given that we now have included this configuration into this very repository, we can just consume it from here as well, eliminating the necessity of remote accesses. With this change we adjust the logic in the script to use the configuration from below tools/testing/selftests/bpf/configs/ instead of pulling it over the network. [0] https://github.com/libbpf/libbpf Signed-off-by: Daniel Müller Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Acked-by: Mykola Lysenko Link: https://lore.kernel.org/bpf/20220727001156.3553701-4-deso@posteo.net tools/testing/selftests/bpf/vmtest.sh | 53 ++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 19 deletions(-) commit cbd620fc18cad51500c46e222328ca60adaa4644 Author: Daniel Müller Date: Wed Jul 27 00:11:55 2022 +0000 selftests/bpf: Copy over libbpf configs This change integrates libbpf maintained configurations and black/white lists [0] into the repository, co-located with the BPF selftests themselves. We minimize the kernel configurations to keep future updates as small as possible [1]. Furthermore, we make both kernel configurations build on top of the existing configuration tools/testing/selftests/bpf/config (to be concatenated before build). Lastly, we replaced the terms blacklist & whitelist with denylist and allowlist, respectively. [0] https://github.com/libbpf/libbpf/tree/20f03302350a4143825cedcbd210c4d7112c1898/travis-ci/vmtest/configs [1] https://lore.kernel.org/bpf/20220712212124.3180314-1-deso@posteo.net/T/#m30a53648352ed494e556ac003042a9ad0a8f98c6 Signed-off-by: Daniel Müller Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Acked-by: Mykola Lysenko Link: https://lore.kernel.org/bpf/20220727001156.3553701-3-deso@posteo.net tools/testing/selftests/bpf/DENYLIST | 6 + tools/testing/selftests/bpf/DENYLIST.s390x | 67 ++++++++ tools/testing/selftests/bpf/config.s390x | 147 +++++++++++++++++ tools/testing/selftests/bpf/config.x86_64 | 251 +++++++++++++++++++++++++++++ 4 files changed, 471 insertions(+) commit aee993bbd05cede097885fa74e2627a458d3418a Author: Daniel Müller Date: Wed Jul 27 00:11:54 2022 +0000 selftests/bpf: Sort configuration This change makes sure to sort the existing minimal kernel configuration containing options required for running BPF selftests alphabetically. Doing so will make it easier to diff it against other configurations, which in turn helps with maintaining disjunct config files that build on top of each other. It also helped identify the CONFIG_IPV6_GRE being set twice and removes one of the occurrences. Lastly, we change NET_CLS_BPF from 'm' to 'y'. Having this option as 'm' will cause failures of the btf_skc_cls_ingress selftest. Signed-off-by: Daniel Müller Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Acked-by: Mykola Lysenko Link: https://lore.kernel.org/bpf/20220727001156.3553701-2-deso@posteo.net tools/testing/selftests/bpf/config | 99 +++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 50 deletions(-) commit 148399c90e25bb5d1aa6f3e1dde25fec6f4005f2 Author: Li zeming Date: Wed Jul 27 16:37:51 2022 +0800 clocksource/drivers/sun5i: Remove unnecessary (void*) conversions Remove unnecessary void* type castings. Signed-off-by: Li zeming Link: https://lore.kernel.org/r/20220727083751.5540-1-zeming@nfschina.com Signed-off-by: Daniel Lezcano drivers/clocksource/timer-sun5i.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c329fb5318ef82e8793432f845ad916c3199a5b6 Author: Samuel Holland Date: Mon Jul 25 00:17:14 2022 -0500 dt-bindings: timer: allwinner,sun4i-a10-timer: Add D1 compatible Allwinner D1 contains the usual sun4i MMIO timer device. It contains two timers like other recent SoCs, so it is compatible with the A23 variant. Signed-off-by: Samuel Holland Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220725051715.56427-1-samuel@sholland.org Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/timer/allwinner,sun4i-a10-timer.yaml | 1 + 1 file changed, 1 insertion(+) commit 561a0846182ef6fe87c20426d43fd956a644687a Author: Krzysztof Kozlowski Date: Tue Jul 26 13:59:37 2022 +0200 dt-bindings: timer: ingenic,tcu: use absolute path to other schema Absolute path to other DT schema is preferred over relative one. Signed-off-by: Krzysztof Kozlowski Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/20220726115937.101432-1-krzysztof.kozlowski@linaro.org Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/timer/ingenic,tcu.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7a93d490900edcdbd3833d8bb9a01b23d8bb461e Author: XU pengfei Date: Wed Jul 20 10:07:35 2022 +0800 clocksource/drivers/sun4i: Remove unnecessary (void*) conversions Remove unnecessary void* type casting. Signed-off-by: XU pengfei Link: https://lore.kernel.org/r/20220720020735.3771-1-xupengfei@nfschina.com Signed-off-by: Daniel Lezcano drivers/clocksource/timer-sun4i.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4abb38595b1b116bd1440c76c69c9f0416ec55a4 Author: Geert Uytterhoeven Date: Wed Jul 20 09:53:34 2022 +0200 dt-bindings: timer: renesas,cmt: Fix R-Car Gen4 fall-out Restore sort order (by family, followed by type). Update the conditional sections specifying the number of interrupts. Fixes: 525b296185b4b0ab ("dt-bindings: timer: renesas,cmt: Add r8a779f0 and generic Gen4 CMT support") Signed-off-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/2e3863ae32e17d49f41111580f195dd34e2b769d.1658303544.git.geert+renesas@glider.be Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/timer/renesas,cmt.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 110a25357584a2d2d9f50accb1e89455c54290b6 Author: Daniel Lezcano Date: Mon Jul 18 23:36:57 2022 +0200 clocksource/drivers/tegra186: Put Kconfig option 'tristate' to 'bool' The clocksources are built-in, they are not modules. We don't know if the core time framework is ready for clockevents / clocksources as modules. Revert back this option to 'bool'. Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20220718213657.1303538-1-daniel.lezcano@linaro.org drivers/clocksource/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 775343f9fde99b4e5e6470f9d8afd519ee67dfa3 Author: Tony Lindgren Date: Mon May 23 18:14:48 2022 +0300 clocksource/drivers/timer-ti-dm: Make driver selection bool for TI K3 The clocksource drivers do not currently have loadable modules as pointed out by Daniel Lezcano . Let's reconsider this later on once timer removal discussion has been done, and set timer-ti-dm to bool for TI K3 SoC. Cc: Keerthy Cc: Nishanth Menon Cc: Vignesh Raghavendra Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20220523151448.23732-1-tony@atomide.com Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4e3203610a889c72e96ddfc9e601b9349ef19c00 Author: Tony Lindgren Date: Fri Apr 8 13:17:15 2022 +0300 clocksource/drivers/timer-ti-dm: Add compatible for am6 SoCs Add compatible for ti,am654-timer to support the timers. For example, am654 has four timers in the MCU domain and 12 timers in the MAIN domain. Cc: Keerthy Cc: Nishanth Menon Cc: Vignesh Raghavendra Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20220408101715.43697-4-tony@atomide.com Signed-off-by: Daniel Lezcano drivers/clocksource/timer-ti-dm.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ab0bbef3ae0f6b5a3b60671cd0124d0fc4fc2567 Author: Tony Lindgren Date: Fri Apr 8 13:17:14 2022 +0300 clocksource/drivers/timer-ti-dm: Make timer selectable for ARCH_K3 Let's make timer-ti-dm selectable for ARCH_K3, and add a separate option for OMAP_DM_SYSTIMER as there should be no need for it on ARCH_K3. For older TI SoCs, we are already selecting OMAP_DM_TIMER in arch/arm/mach-omap*/Kconfig. For mach-omap2, we need to now also select OMAP_DM_SYSTIMER. Cc: Keerthy Cc: Nishanth Menon Cc: Vignesh Raghavendra Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20220408101715.43697-3-tony@atomide.com Signed-off-by: Daniel Lezcano arch/arm/mach-omap2/Kconfig | 2 ++ drivers/clocksource/Kconfig | 8 +++++++- drivers/clocksource/Makefile | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) commit 41e79b1d458477212d0a880c87622bcaa69ab3ea Author: Tony Lindgren Date: Fri Apr 8 13:17:13 2022 +0300 clocksource/drivers/timer-ti-dm: Move inline functions to driver for am6 The __omap_dm_timer_* inline functions in the header are no longer needed outside the driver, and the header ifdefs prevent the driver working for ARCH_K3. Let's move the inline functions to the driver and drop the ifdefs and drop the unused functions __omap_dm_timer_override_errata() and __omap_dm_timer_load_start(). Cc: Keerthy Cc: Nishanth Menon Cc: Vignesh Raghavendra Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20220408101715.43697-2-tony@atomide.com Signed-off-by: Daniel Lezcano drivers/clocksource/timer-ti-dm.c | 115 ++++++++++++++++++++++++++++++ include/clocksource/timer-ti-dm.h | 144 -------------------------------------- 2 files changed, 115 insertions(+), 144 deletions(-) commit f9d88f93ec6d1f81e6907d0e18aa201bf649f4f7 Author: Rob Herring Date: Tue Jul 19 15:51:52 2022 -0600 dt-bindings: iio/dac: adi,ad5766: Add missing type to 'output-range-microvolts' 'output-range-microvolts' is missing a type definition. '-microvolts' is not a standard unit (should be '-microvolt'). As the property is already in use, add a type reference. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220719215152.1877776-1-robh@kernel.org Documentation/devicetree/bindings/iio/dac/adi,ad5766.yaml | 2 ++ 1 file changed, 2 insertions(+) commit fe75ac871214e83b192fe64c8329489d8e1a6a14 Author: Rob Herring Date: Tue Jul 19 15:50:16 2022 -0600 dt-bindings: power: supply: charger-manager: Add missing type for 'cm-battery-stat' 'cm-battery-stat' is missing a type definition and is not a common property. The type is boolean. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220719215017.1875530-1-robh@kernel.org Documentation/devicetree/bindings/power/supply/charger-manager.yaml | 1 + 1 file changed, 1 insertion(+) commit 14b146b688ad9593f5eee93d51a34d09a47e50b5 Author: Pavel Begunkov Date: Wed Jul 27 10:30:41 2022 +0100 io_uring: notification completion optimisation We want to use all optimisations that we have for io_uring requests like completion batching, memory caching and more but for zc notifications. Fortunately, notification perfectly fit the request model so we can overlay them onto struct io_kiocb and use all the infratructure. Most of the fields of struct io_notif natively fits into io_kiocb, so we replace struct io_notif with struct io_kiocb carrying struct io_notif_data in the cmd cache line. Then we adapt io_alloc_notif() to use io_alloc_req()/io_alloc_req_refill(), and kill leftovers of hand coded caching. __io_notif_complete_tw() is converted to use io_uring's tw infra. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9e010125175e80baf51f0ca63bdc7cc6a4a9fa56.1658913593.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/linux/io_uring_types.h | 7 -- io_uring/io_uring.c | 3 - io_uring/net.c | 4 +- io_uring/notif.c | 159 ++++++++++++++--------------------------- io_uring/notif.h | 42 ++++------- 5 files changed, 67 insertions(+), 148 deletions(-) commit bd1a3783dd749012134b142b52e5704f7c142897 Author: Pavel Begunkov Date: Wed Jul 27 10:30:40 2022 +0100 io_uring: export req alloc from core We want to do request allocation out of the core io_uring code, make the allocation functions public for other io_uring parts. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/0314fedd3a02a514210ba42d4720332538c65956.1658913593.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 22 +--------------------- io_uring/io_uring.h | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 21 deletions(-) commit 9c5dd8034e3544d139c2531e58d3ca41bbf343dd Author: Yang Li Date: Wed Jun 1 10:28:14 2022 +0800 ovl: fix some kernel-doc comments Remove warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'. fs/overlayfs/super.c:311: warning: Function parameter or member 'dentry' not described in 'ovl_statfs' fs/overlayfs/super.c:311: warning: Excess function parameter 'sb' description in 'ovl_statfs' fs/overlayfs/super.c:357: warning: Function parameter or member 'm' not described in 'ovl_show_options' fs/overlayfs/super.c:357: warning: Function parameter or member 'dentry' not described in 'ovl_show_options' Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b10b85fe5149ee8b39fbbf86095b303632dde2cd Author: Miklos Szeredi Date: Wed Jul 27 16:31:30 2022 +0200 ovl: warn if trusted xattr creation fails When mounting overlayfs in an unprivileged user namespace, trusted xattr creation will fail. This will lead to failures in some file operations, e.g. in the following situation: mkdir lower upper work merged mkdir lower/directory mount -toverlay -olowerdir=lower,upperdir=upper,workdir=work none merged rmdir merged/directory mkdir merged/directory The last mkdir will fail: mkdir: cannot create directory 'merged/directory': Input/output error The cause for these failures is currently extremely non-obvious and hard to debug. Hence, warn the user and suggest using the userxattr mount option, if it is not already supplied and xattr creation fails during the self-check. Reported-by: Alois Wohlschlager Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 47d8f8b78b9b42e9817feeb75bbf758f2a3cbff8 Author: Krzysztof Kozlowski Date: Tue Jul 26 13:58:39 2022 +0200 dt-bindings: soc: bcm: use absolute path to other schema Absolute path to other DT schema is preferred over relative one. Signed-off-by: Krzysztof Kozlowski Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20220726115841.101249-2-krzysztof.kozlowski@linaro.org' Signed-off-by: Arnd Bergmann Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d07ae9004f18f06a8c9c0c3470daa49dd6b56bb9 Author: Krzysztof Kozlowski Date: Tue Jul 26 13:58:38 2022 +0200 dt-bindings: soc: bcm: drop quotes when not needed Id and schema fields do not need quotes. Signed-off-by: Krzysztof Kozlowski Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20220726115841.101249-1-krzysztof.kozlowski@linaro.org' Signed-off-by: Arnd Bergmann Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ed92f4353ef53e544db5311fd8efa0cd7fdc4e08 Author: Alexander Stein Date: Wed Jul 27 16:11:17 2022 +0200 usb: misc: onboard_usb_hub: Add TI USB8041 hub support This is a 4-port 3.0 USB hub. Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20220727141117.909361-2-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/onboard_usb_hub.c | 3 +++ drivers/usb/misc/onboard_usb_hub.h | 6 ++++++ 2 files changed, 9 insertions(+) commit 40758e493f4d08093fbf58390f8a4bc55b501a49 Author: Alexander Stein Date: Wed Jul 27 16:11:16 2022 +0200 usb: misc: onboard_usb_hub: Add reset-gpio support Despite default reset upon probe, release reset line after powering up the hub and assert reset again before powering down. Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20220727141117.909361-1-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/onboard_usb_hub.c | 28 ++++++++++++++++++++++++++++ drivers/usb/misc/onboard_usb_hub.h | 22 +++++++++++++++++----- 2 files changed, 45 insertions(+), 5 deletions(-) commit 40d02efad9801c1277b092c83f6471a31e77c59b Merge: a061a8ad3f90 39c3c396f813 Author: Arnaldo Carvalho de Melo Date: Wed Jul 27 11:08:48 2022 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To get upstream fixes. Signed-off-by: Arnaldo Carvalho de Melo commit e35a5e782f67ed76a65ad0f23a484444a95f000f Author: Zhang Xianwei Date: Wed Jul 27 18:01:07 2022 +0800 NFSv4.1: RECLAIM_COMPLETE must handle EACCES A client should be able to handle getting an EACCES error while doing a mount operation to reclaim state due to NFS4CLNT_RECLAIM_REBOOT being set. If the server returns RPC_AUTH_BADCRED because authentication failed when we execute "exportfs -au", then RECLAIM_COMPLETE will go a wrong way. After mount succeeds, all OPEN call will fail due to an NFS4ERR_GRACE error being returned. This patch is to fix it by resending a RPC request. Signed-off-by: Zhang Xianwei Signed-off-by: Yi Wang Fixes: aa5190d0ed7d ("NFSv4: Kill nfs4_async_handle_error() abuses by NFSv4.1") Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 3 +++ 1 file changed, 3 insertions(+) commit 28188546df027970eb61ef2be4c2174aa6d77a93 Merge: 10c4c5279b76 e48ef9a9c529 Author: Arnd Bergmann Date: Wed Jul 27 15:47:13 2022 +0200 Merge tag 'at91-dt-5.20-4' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt AT91 DT for v5.20 #4 It contains one new LAN966 based board, namely pcb8309, a cleanup on Makefile to sort alphabetically LAN966 entries and 2 cleanups on bindings. * tag 'at91-dt-5.20-4' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: dt-bindings: soc: microchip: use absolute path to other schema dt-bindings: soc: microchip: drop quotes when not needed ARM: dts: lan966x: keep lan966 entries alphabetically sorted ARM: dts: lan966x: add support for pcb8309 dt-bindings: arm: at91: add lan966 pcb8309 board Link: https://lore.kernel.org/r/20220727075749.2445000-1-claudiu.beznea@microchip.com Signed-off-by: Arnd Bergmann commit 30097967e0566cac817273ef76add100f6b0f463 Author: Srinivas Kandagatla Date: Wed Jul 27 13:47:49 2022 +0100 ASoC: codecs: va-macro: use fsgen as clock VA Macro fsgen clock is supplied to other LPASS Macros using proper clock apis, however the internal user uses the registers directly without clk apis. This approch has race condition where in external users of the clock might cut the clock while VA macro is actively using this. Moving the internal usage to clk apis would provide a proper refcounting and avoid such race conditions. This issue was noticed while headset was pulled out while recording is in progress and shifting record patch to DMIC. Reported-by: Srinivasa Rao Mandadapu Signed-off-by: Srinivas Kandagatla Tested-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/20220727124749.4604-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/codecs/lpass-va-macro.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit c95a5712beee635c4626f78218e52b978f075a17 Author: John Garry Date: Tue Jul 26 17:24:33 2022 +0800 arm64: defconfig: Sync some configs with savedefconfig Some configs can obviously be removed when sync'ing with savedefconfig, as follows: - config SECCOMP was changed to def_bool y in commit 282a181b1a0d (" seccomp: Move config option SECCOMP to arch/Kconfig"), so no need to explicitly enable in the defconfig. - config MAILBOX is already selected by some drivers enabled in the defconfig, so no need to explicitly enable. - config QRTR was enabled in the defconfig from commit 1bdf91fd2ae82 (" arm64: defconfig: Enable Qualcomm QRTR"). However until many kernel versions later in commit 231a136fdf46 ("arm64: defconfig: enable ath11k driver"), no driver depended on config QRTR - not for building anyway. In commit 231a136fdf46, config ATH11K_PCI was enabled and this selects config QRTR, so there is no need to explicitly enable in the defconfig. Signed-off-by: John Garry Link: https://lore.kernel.org/r/1658827473-121156-1-git-send-email-john.garry@huawei.com' Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 3 --- 1 file changed, 3 deletions(-) commit 70c898d4bad1a21e0889ae12f355ff8c68ce5b9f Author: Xu Qiang Date: Fri Jul 1 08:29:35 2022 +0000 wifi: plfxlc: Use eth_zero_addr() to assign zero address Using eth_zero_addr() to assign zero address instead of memset(). Reported-by: Hulk Robot Signed-off-by: Xu Qiang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220701082935.110924-1-xuqiang36@huawei.com drivers/net/wireless/purelifi/plfxlc/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdbe34da01e32024e56fff5c6854a263a012d7ff Author: Aleksa Savic Date: Wed Jul 27 12:06:05 2022 +0200 hwmon: (aquacomputer_d5next) Add support for Aquacomputer Quadro fan controller Extend aquacomputer_d5next driver to expose hardware temperature sensors and fans of the Aquacomputer Quadro fan controller, which communicates through a proprietary USB HID protocol. Implemented by Jack Doan [1]. Four temperature sensors and PWM controllable fans are available. The liquid flow sensor is also exposed, implemented by Leonard Anderweit [2]. Additionally, serial number, firmware version and power-on count are exposed through debugfs. This driver has been tested on x86_64. [1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/5 [2] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/9 Originally-from: Jack Doan Originally-from: Leonard Anderweit Signed-off-by: Aleksa Savic Link: https://lore.kernel.org/r/20220727100606.9328-1-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck Documentation/hwmon/aquacomputer_d5next.rst | 17 ++++--- drivers/hwmon/Kconfig | 6 +-- drivers/hwmon/aquacomputer_d5next.c | 69 ++++++++++++++++++++++++++--- 3 files changed, 78 insertions(+), 14 deletions(-) commit 41cd4373274239a79a5a3e1127607225908a0fbb Author: Armin Wolf Date: Wed Jul 27 10:30:04 2022 +0200 hwmon: (dell-smm) Improve documentation Notify users of this driver that each pwmX attribute controls fan number X, meaning that probing of pwm channels is unnecessary. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20220727083004.5684-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck Documentation/hwmon/dell-smm-hwmon.rst | 3 +++ 1 file changed, 3 insertions(+) commit 4c2742146de06a39d24e91155e3deec278e11932 Author: Ajay Singh Date: Wed Jul 20 16:03:06 2022 +0000 wifi: wilc1000: use existing iftype variable to store the interface type For consistency, use an existing 'iftype' element which was already having the interface type. Replace 'mode' with 'iftype' as it was used for the same purpose. Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220720160302.231516-8-ajay.kathat@microchip.com drivers/net/wireless/microchip/wilc1000/netdev.c | 6 +++--- drivers/net/wireless/microchip/wilc1000/netdev.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) commit 39d0f1b0bf914885880d73f89e1eb1508d5eaa16 Author: Ajay Singh Date: Wed Jul 20 16:03:05 2022 +0000 wifi: wilc1000: add 'isinit' flag for SDIO bus similar to SPI Similar to SPI priv data, add 'isinit' variable in SDIO priv. Make use of the state to invoke hif_init() once, and acquire the lock before accessing hif function. Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220720160302.231516-7-ajay.kathat@microchip.com drivers/net/wireless/microchip/wilc1000/sdio.c | 13 +++++++++++++ drivers/net/wireless/microchip/wilc1000/spi.c | 8 ++++++++ drivers/net/wireless/microchip/wilc1000/wlan.c | 9 ++++++--- drivers/net/wireless/microchip/wilc1000/wlan.h | 1 + 4 files changed, 28 insertions(+), 3 deletions(-) commit ad3e683ae4dc311baea7a8724315b6d8d9a7aaa9 Author: Ajay Singh Date: Wed Jul 20 16:03:05 2022 +0000 wifi: wilc1000: cancel the connect operation during interface down Cancel the ongoing connection request to avoid any issue if the interface is set down before the connection request is completed. host_int_handle_disconnect was already available, so renamed it and used the same API for 'ndio_close' cb. Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220720160302.231516-6-ajay.kathat@microchip.com drivers/net/wireless/microchip/wilc1000/hif.c | 6 ++---- drivers/net/wireless/microchip/wilc1000/hif.h | 1 + drivers/net/wireless/microchip/wilc1000/netdev.c | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) commit 12fb1ae537a416b77ac9cbaefa6dd9dacaa27ed0 Author: Ajay Singh Date: Wed Jul 20 16:03:04 2022 +0000 wifi: wilc1000: get correct length of string WID from received config packet For string type WID packet, the data length is received as 16-bit value so use 'get_unaligned_le16' conversion API to extract the correct length. Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220720160302.231516-5-ajay.kathat@microchip.com drivers/net/wireless/microchip/wilc1000/wlan_cfg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 33d4a577c7b184bac755deb68fe6e84ae009d70f Author: Ajay Singh Date: Wed Jul 20 16:03:04 2022 +0000 wifi: wilc1000: set station_info flag only when signal value is valid Set station_info->filled to indicate signal level only when its value is received successfully using wilc_get_rssi(). Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220720160302.231516-4-ajay.kathat@microchip.com drivers/net/wireless/microchip/wilc1000/cfg80211.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f589b5d941c712d982868fd548a000e07fc5cf59 Author: Ajay Singh Date: Wed Jul 20 16:03:03 2022 +0000 wifi: wilc1000: set correct value of 'close' variable in failure case Set 'close' variable to '1' to indicate closing operation when initialisation fails during wlan_initialize_threads() call. Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220720160302.231516-3-ajay.kathat@microchip.com drivers/net/wireless/microchip/wilc1000/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f6e44ee6e969ea22d330c2810d7c891e63e6a08 Author: Ajay Singh Date: Wed Jul 20 16:03:03 2022 +0000 wifi: wilc1000: add WID_TX_POWER WID in g_cfg_byte array WID_TX_POWER WID value is fetched from the firmware so it should be added in'g_cfg_byte' array to store the data which is received from firmware. Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220720160302.231516-2-ajay.kathat@microchip.com drivers/net/wireless/microchip/wilc1000/wlan_cfg.c | 1 + 1 file changed, 1 insertion(+) commit dbf8cd368a4786d7a6a3a4c842d083a4924658f5 Author: Xin Gao Date: Thu Jul 21 03:42:45 2022 +0800 wifi: b43: do not initialise static variable to 0 No need to initialise static variables to zero. Signed-off-by: Xin Gao Acked-by: Larry Finger [kvalo@kernel.org: improve commit log] Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220720194245.8442-1-gaoxin@cdjrlc.com drivers/net/wireless/broadcom/b43/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d13c0ae38a62835ead261527727a9f9bf949d43 Author: Yang Li Date: Tue Jul 19 15:56:37 2022 +0800 wifi: b43legacy: clean up one inconsistent indenting Eliminate the follow smatch warning: drivers/net/wireless/broadcom/b43legacy/main.c:2947 b43legacy_wireless_core_stop() warn: inconsistent indenting Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220719075637.111716-1-yang.lee@linux.alibaba.com drivers/net/wireless/broadcom/b43legacy/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13876f2a087ad352bf640a7a0a4a4229ea6e9e4f Author: Zheyu Ma Date: Sat Jul 16 21:04:44 2022 +0800 wifi: rtl8xxxu: Fix the error handling of the probe function When the driver fails at ieee80211_alloc_hw() at the probe time, the driver will free the 'hw' which is not allocated, causing a bug. The following log can reveal it: [ 15.981294] BUG: KASAN: user-memory-access in mutex_is_locked+0xe/0x40 [ 15.981558] Read of size 8 at addr 0000000000001ab0 by task modprobe/373 [ 15.982583] Call Trace: [ 15.984282] ieee80211_free_hw+0x22/0x390 [ 15.984446] rtl8xxxu_probe+0x3a1/0xab30 [rtl8xxxu] Fix the bug by changing the order of the error handling. Signed-off-by: Zheyu Ma Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220716130444.2950690-1-zheyuma97@gmail.com .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 69ddcea564437ce4b0d5143f37a9154fcef8d3d2 Author: Uwe Kleine-König Date: Sat Jul 16 00:46:19 2022 +0200 wifi: wl12xx: Drop if with an always false condition The remove callback is only called after probe completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument (in wlcore_probe()) and so wl is never NULL. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220715224619.ht7bbzzrmysielm7@pengutronix.de drivers/net/wireless/ti/wl12xx/main.c | 3 --- 1 file changed, 3 deletions(-) commit 6fd57e1d120bf13d4dc6c200a7cf914e6347a316 Author: Hangyu Hua Date: Mon Jun 20 17:23:50 2022 +0800 wifi: libertas: Fix possible refcount leak in if_usb_probe() usb_get_dev will be called before lbs_get_firmware_async which means that usb_put_dev need to be called when lbs_get_firmware_async fails. Fixes: ce84bb69f50e ("libertas USB: convert to asynchronous firmware loading") Signed-off-by: Hangyu Hua Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220620092350.39960-1-hbh25y@gmail.com Link: https://lore.kernel.org/r/20220622113402.16969-1-colin.i.king@gmail.com drivers/net/wireless/marvell/libertas/if_usb.c | 1 + 1 file changed, 1 insertion(+) commit e0c6b1f3d7574dea3bec7deb18578e896d2cfaa2 Author: Xuezhi Zhang Date: Wed Jul 27 20:44:15 2022 +0800 USB: usbsevseg: convert sysfs snprintf to sysfs_emit Fix the following coccincheck warning: drivers/usb/misc/usbsevseg.c:170:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Xuezhi Zhang Link: https://lore.kernel.org/r/20220727124415.8340-1-zhangxuezhi3@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usbsevseg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06ce07860b3237296da299dede242b114d184849 Author: Yang Li Date: Wed Jun 15 08:53:16 2022 +0800 wifi: mwifiex: clean up one inconsistent indenting Eliminate the follow smatch warning: drivers/net/wireless/marvell/mwifiex/pcie.c:3364 mwifiex_unregister_dev() warn: inconsistent indenting Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220615005316.9596-1-yang.lee@linux.alibaba.com drivers/net/wireless/marvell/mwifiex/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1de452a0edda26f1483d1d934f692eab13ba669a Author: Douglas Anderson Date: Tue Jul 26 10:38:23 2022 -0700 regulator: core: Allow drivers to define their init data as const Drivers tend to want to define the names of their regulators somewhere in their source file as "static const". This means, inevitable, that every driver out there open codes something like this: static const char * const supply_names[] = { "vcc", "vccl", }; static int get_regulators(struct my_data *data) { int i; data->supplies = devm_kzalloc(...) if (!data->supplies) return -ENOMEM; for (i = 0; i < ARRAY_SIZE(supply_names); i++) data->supplies[i].supply = supply_names[i]; return devm_regulator_bulk_get(data->dev, ARRAY_SIZE(supply_names), data->supplies); } Let's make this more convenient by doing providing a helper that does the copy. I have chosen to have the "const" input structure here be the exact same structure as the normal one passed to devm_regulator_bulk_get(). This is slightly inefficent since the input data can't possibly have anything useful for "ret" or consumer and thus we waste 8 bytes per structure. This seems an OK tradeoff for not introducing an extra structure. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20220726103631.v2.6.I38fc508a73135a5c1b873851f3553ff2a3a625f5@changeid Signed-off-by: Mark Brown drivers/regulator/devres.c | 28 ++++++++++++++++++++++++++++ include/linux/regulator/consumer.h | 4 ++++ 2 files changed, 32 insertions(+) commit 6eabfc018e8d1033e7fc1efce30a872e2dccb537 Author: Douglas Anderson Date: Tue Jul 26 10:38:21 2022 -0700 regulator: core: Allow specifying an initial load w/ the bulk API There are a number of drivers that follow a pattern that looks like this: 1. Use the regulator bulk API to get a bunch of regulators. 2. Set the load on each of the regulators to use whenever the regulators are enabled. Let's make this easier by just allowing the drivers to pass the load in. As part of this change we need to move the error printing in regulator_bulk_get() around; let's switch to the new dev_err_probe() to simplify it. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20220726103631.v2.4.Ie85f68215ada39f502a96dcb8a1f3ad977e3f68a@changeid Signed-off-by: Mark Brown drivers/regulator/core.c | 20 ++++++++++++-------- include/linux/regulator/consumer.h | 12 ++++++++---- 2 files changed, 20 insertions(+), 12 deletions(-) commit 40e58a8a7ca6ac7f03a5fbfdbc0119fc0caaa072 Author: Alexander Stein Date: Wed Jul 27 11:37:59 2022 +0200 dt-bindings: usb: Add binding for TI USB8041 hub controller The TI USB8041 is a USB 3.0 hub controller with 4 ports. This initial version of the binding only describes USB related aspects of the USB8041, it does not cover the option of connecting the controller as an i2c slave. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20220727093801.687361-1-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/usb/ti,usb8041.yaml | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit 76e960597635ee80d7c713f606b0f6ac9228d98e Author: Fabrice Gasnier Date: Tue Jul 26 10:07:08 2022 +0200 ARM: multi_v7_defconfig: enable USB onboard HUB driver Enable the USB onboard HUB driver, used on STM32MP1 boards. Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20220726080708.162547-5-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 0d0fb2b605c7512e67b328f3077d24ec5e4c5b38 Author: Fabrice Gasnier Date: Tue Jul 26 10:07:07 2022 +0200 ARM: dts: stm32: add support for USB2514B onboard hub on stm32mp15xx-dkx Add support for USB2514B onboard hub on stm32mp15 DK boards. The HUB is supplied by a 3v3 PMIC regulator. Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20220726080708.162547-4-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman arch/arm/boot/dts/stm32mp15xx-dkx.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 43993626de00f8faea2cf4d54aaea8f607331fcf Author: Fabrice Gasnier Date: Tue Jul 26 10:07:06 2022 +0200 usb: misc: onboard-hub: add support for Microchip USB2514B USB 2.0 hub Add support for Microchip USB2514B USB 2.0 hub to the onboard usb hub driver. Adopt the generic usb-device compatible ("usbVID,PID"). Some STM32MP1 boards have this hub on-board, with a supply that needs to be enabled for proper operation. Acked-by: Matthias Kaehlcke Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20220726080708.162547-3-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/onboard_usb_hub.c | 2 ++ drivers/usb/misc/onboard_usb_hub.h | 1 + 2 files changed, 3 insertions(+) commit 817f9ee0dad570a6ba6a285f662de657760094cd Author: Fabrice Gasnier Date: Tue Jul 26 10:07:05 2022 +0200 dt-bindings: usb: generic-ehci: allow usb-hcd schema properties Allow properties and usb-device child nodes as defined in usb-hcd.yaml, by using unevaluatedProperties: false. By the way, remove the "companion" property as it's redundant with usb-hcd.yaml. As example, this allows an onboard hub, to be described in generic-ehci controller node: usb { compatible = "generic-ehci"; #address-cells = <1>; #size-cells = <0>; /* onboard HUB */ hub@1 { compatible = "usb424,2514"; reg = <1>; vdd-supply = <&v3v3>; }; }; Without this, dtbs_check complains on '#address-cells', '#size-cells', 'hub@1' do not match any of the regexes: 'pinctrl-[0-9]+' From schema: ..../generic-ehci.yaml Reviewed-by: Rob Herring Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20220726080708.162547-2-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/generic-ehci.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 2d945194cce11ce2800949c8746bc3e788d89067 Author: Fabrice Gasnier Date: Wed Jul 13 14:08:42 2022 +0200 usb: typec: ucsi: stm32g0: add bootloader support STM32G0 comes with STM32 bootloader in its system memory. Add support for some I2C bootloader commands as described in application notes AN2606 and AN4221, to enable STM32G0 UCSI firmware update. Upon probing, the driver needs to know the STM32G0 state: - In bootloader mode, STM32 G0 answers at i2c addr 0x51. - In running mode, STM32 G0 firmware may answer at two address. - The main address specified in DT is used for UCSI. - 0x51 addr can be re-used for FW controls like getting software version or jump to booloader request. So probe using the main firmware i2c address first, before attempting bootloader address (e.g. check for blank, erased or previously aborted firmware update). Acked-by: Heikki Krogerus Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20220713120842.560902-4-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/ucsi_stm32g0.c | 539 +++++++++++++++++++++++++++++++++- 1 file changed, 526 insertions(+), 13 deletions(-) commit 72849d4fcee7cc9e6b98637738b722f78502525d Author: Fabrice Gasnier Date: Wed Jul 13 14:08:41 2022 +0200 usb: typec: ucsi: stm32g0: add support for stm32g0 controller STM32G0 provides an integrated USB Type-C and power delivery interface. It can be programmed with a firmware to handle UCSI protocol over I2C interface. A GPIO is used as an interrupt line. Type-C connector can be used as a wakeup source (typically to detect changes on the port, like attach or detach). PM suspend / resume routines are used to enable wake irqs, and signal a wakeup event in case the IRQ has fired while in suspend. The i2c core is doing the necessary initialization when the "wakeup-source" flag is provided. Note: the interrupt handler shouldn't be called before the i2c bus resumes. So, the interrupts are disabled during suspend period, and re-enabled upon resume, to avoid i2c transfer while suspended, from the irq handler. Acked-by: Heikki Krogerus Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20220713120842.560902-3-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/Kconfig | 10 ++ drivers/usb/typec/ucsi/Makefile | 1 + drivers/usb/typec/ucsi/ucsi_stm32g0.c | 264 ++++++++++++++++++++++++++++++++++ 3 files changed, 275 insertions(+) commit b60fd9361b6e0041299e9e677603dd1df7c9677b Author: Fabrice Gasnier Date: Wed Jul 13 14:08:40 2022 +0200 dt-bindings: usb: typec: add bindings for stm32g0 controller Add DT schema documentation for the STM32G0 Type-C PD (Power Delivery) controller. STM32G0 provides an integrated USB Type-C and power delivery interface. It can be programmed with a firmware to handle UCSI protocol over I2C interface. A GPIO is used as an interrupt line. It may be used as a wakeup source, so use optional "wakeup-source" and "power-domains" properties to support wakeup. The firmware itself may be flashed or later updated (optional). Choice is let to the application to allow firmware update. A default firmware could be already programmed in production and be customized (to not allow it). So the firmware-name is made optional to represent this option. Reviewed-by: Rob Herring Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20220713120842.560902-2-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/usb/st,typec-stm32g0.yaml | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) commit a7dc438b5e446afcd1b3b6651da28271400722f2 Author: Linyu Yuan Date: Tue Jul 26 14:45:49 2022 +0800 usb: typec: ucsi: Acknowledge the GET_ERROR_STATUS command completion We found PPM will not send any notification after it report error status and OPM issue GET_ERROR_STATUS command to read the details about error. According UCSI spec, PPM may clear the Error Status Data after the OPM has acknowledged the command completion. This change add operation to acknowledge the command completion from PPM. Fixes: bdc62f2bae8f (usb: typec: ucsi: Simplified registration and I/O API) Cc: # 5.10 Signed-off-by: Jack Pham Signed-off-by: Linyu Yuan Link: https://lore.kernel.org/r/1658817949-4632-1-git-send-email-quic_linyyuan@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/ucsi.c | 4 ++++ 1 file changed, 4 insertions(+) commit c3ffc9c4ca44bfe9562166793d133e1fb0630ea6 Author: Andrey Strachuk Date: Mon Jul 18 19:00:52 2022 +0300 usb: cdns3: change place of 'priv_ep' assignment in cdns3_gadget_ep_dequeue(), cdns3_gadget_ep_enable() If 'ep' is NULL, result of ep_to_cdns3_ep(ep) is invalid pointer and its dereference with priv_ep->cdns3_dev may cause panic. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Acked-by: Peter Chen Signed-off-by: Andrey Strachuk Link: https://lore.kernel.org/r/20220718160052.4188-1-strochuk@ispras.ru Signed-off-by: Greg Kroah-Hartman drivers/usb/cdns3/cdns3-gadget.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit fe3cc0cebe6091675c8bacd94e232a3203b939b8 Author: Jilin Yuan Date: Sat Jul 16 21:16:30 2022 +0800 usb/chipidea: fix repeated words in comments Delete the redundant word 'power'. Acked-by: Peter Chen Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220716131630.33151-1-yuanjilin@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/otg_fsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2d0dd5155c437ec5aad2141d74a8fac97ef755f Author: Chen Xingdi Date: Wed Jul 27 11:11:46 2022 +0800 usb: renesas-xhci: Do not print any log while fw verif success When drivers are working properly, they should be quiet. Signed-off-by: Chen Xingdi Link: https://lore.kernel.org/r/20220727031146.19345-1-chenxingdi@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci-renesas.c | 4 ---- 1 file changed, 4 deletions(-) commit 0c34043897736a3fac259564a6323a1f045100bb Author: Nícolas F. R. A. Prado Date: Mon Jul 25 16:31:29 2022 -0400 usb: typec: retimer: Add missing id check in match callback The fwnode_connection_find_match() function handles two cases: named references and graph endpoints. In the second case, the match function passed in is called with the id to check for the match. However, the match function for the recently added type-c retimer class assumes the connection has already been matched (which is only true for the first case). The result is that with that change, all type-c nodes with graph endpoints defer probe indefinitely, independently of having a retimer connection or not. Add the missing check, like is done by the type-c mux and usb role switch code, to fix the issue. Fixes: ddaf8d96f93b ("usb: typec: Add support for retimers") Reviewed-by: Prashant Malani Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220725203129.1973260-1-nfraprado@collabora.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/retimer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 13da6f41fbe01afc4937aabef87950223d52c83f Author: Jason Wang Date: Sat Jul 16 12:17:55 2022 +0800 USB: xhci: Fix comment typo The double `the' is duplicated in the comment, remove one. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20220716041755.34016-1-wangborong@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 908d34aad1ef9214899ec07bfb2a9924f8ed52ff Author: Jilin Yuan Date: Sat Jul 16 21:56:42 2022 +0800 usb/typec/tcpm: fix repeated words in comments Delete the redundant word 'to'. Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220716135642.52460-1-yuanjilin@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5851c2480253e6a58965d832d5ffbffba6c4729 Author: Jilin Yuan Date: Sat Jul 16 21:44:57 2022 +0800 usb/musb: fix repeated words in comments Delete the redundant word 'mode'. Delete the redundant word 'than'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220716134457.46535-1-yuanjilin@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_cppi41.c | 2 +- drivers/usb/musb/tusb6010.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 676cb83b11c3648f513e84cf3a8616e9e1539d44 Author: Jilin Yuan Date: Sat Jul 16 21:41:05 2022 +0800 usb/misc: fix repeated words in comments Delete the redundant word 'with'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220716134105.44710-1-yuanjilin@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usbtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd86f367eb6b5154230650c8f8c4003da0c12f54 Author: Jilin Yuan Date: Sat Jul 16 21:38:25 2022 +0800 usb/image: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220716133825.43161-1-yuanjilin@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/image/mdc800.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 973939279a20c1368bbd818b49ad2443689cd926 Author: Jilin Yuan Date: Sat Jul 16 21:36:24 2022 +0800 usb/host: fix repeated words in comments Delete the redundant word 'the'. Delete the redundant word 'to'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220716133624.41994-1-yuanjilin@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/uhci-grlib.c | 2 +- drivers/usb/host/uhci-hcd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a7a9f4c0060e8f29a5fc2fe610575c3eabfc2253 Author: Jilin Yuan Date: Sat Jul 16 21:24:03 2022 +0800 usb/core: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220716132403.35270-1-yuanjilin@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/driver.c | 2 +- drivers/usb/core/usb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 86c4bb4f124eec79423b90ef138402bf0b809bce Author: Jilin Yuan Date: Sat Jul 16 21:13:12 2022 +0800 usb/atm: fix repeated words in comments Delete the redundant word 'was'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220716131312.31767-1-yuanjilin@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/ueagle-atm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2191c00855b03aa59c20e698be713d952d51fc18 Author: Alan Stern Date: Thu Jul 21 11:07:10 2022 -0400 USB: gadget: Fix use-after-free Read in usb_udc_uevent() The syzbot fuzzer found a race between uevent callbacks and gadget driver unregistration that can cause a use-after-free bug: --------------------------------------------------------------- BUG: KASAN: use-after-free in usb_udc_uevent+0x11f/0x130 drivers/usb/gadget/udc/core.c:1732 Read of size 8 at addr ffff888078ce2050 by task udevd/2968 CPU: 1 PID: 2968 Comm: udevd Not tainted 5.19.0-rc4-next-20220628-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report+0xbe/0x1f0 mm/kasan/report.c:495 usb_udc_uevent+0x11f/0x130 drivers/usb/gadget/udc/core.c:1732 dev_uevent+0x290/0x770 drivers/base/core.c:2424 --------------------------------------------------------------- The bug occurs because usb_udc_uevent() dereferences udc->driver but does so without acquiring the udc_lock mutex, which protects this field. If the gadget driver is unbound from the udc concurrently with uevent processing, the driver structure may be accessed after it has been deallocated. To prevent the race, we make sure that the routine holds the mutex around the racing accesses. Link: CC: stable@vger.kernel.org # fc274c1e9973 Reported-and-tested-by: syzbot+b0de012ceb1e2a97891b@syzkaller.appspotmail.com Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/YtlrnhHyrHsSky9m@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/core.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 26c6c2f8a907c9e3a2f24990552a4d77235791e6 Author: Weitao Wang Date: Tue Jul 26 15:49:18 2022 +0800 USB: HCD: Fix URB giveback issue in tasklet function Usb core introduce the mechanism of giveback of URB in tasklet context to reduce hardware interrupt handling time. On some test situation(such as FIO with 4KB block size), when tasklet callback function called to giveback URB, interrupt handler add URB node to the bh->head list also. If check bh->head list again after finish all URB giveback of local_list, then it may introduce a "dynamic balance" between giveback URB and add URB to bh->head list. This tasklet callback function may not exit for a long time, which will cause other tasklet function calls to be delayed. Some real-time applications(such as KB and Mouse) will see noticeable lag. In order to prevent the tasklet function from occupying the cpu for a long time at a time, new URBS will not be added to the local_list even though the bh->head list is not empty. But also need to ensure the left URB giveback to be processed in time, so add a member high_prio for structure giveback_urb_bh to prioritize tasklet and schelule this tasklet again if bh->head list is not empty. At the same time, we are able to prioritize tasklet through structure member high_prio. So, replace the local high_prio_bh variable with this structure member in usb_hcd_giveback_urb. Fixes: 94dfd7edfd5c ("USB: HCD: support giveback of URB in tasklet context") Cc: stable Reviewed-by: Alan Stern Signed-off-by: Weitao Wang Link: https://lore.kernel.org/r/20220726074918.5114-1-WeitaoWang-oc@zhaoxin.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 26 +++++++++++++++----------- include/linux/usb/hcd.h | 1 + 2 files changed, 16 insertions(+), 11 deletions(-) commit d7de14d74d6551f0d097430f9893ce82ad17e5b8 Author: Alexey Sheplyakov Date: Fri Jul 22 18:17:00 2022 +0400 usb: xhci_plat_remove: avoid NULL dereference Since commit 4736ebd7fcaff1eb8481c140ba494962847d6e0a ("usb: host: xhci-plat: omit shared hcd if either root hub has no ports") xhci->shared_hcd can be NULL, which causes the following Oops on reboot: [ 710.124450] systemd-shutdown[1]: Rebooting. [ 710.298861] xhci-hcd xhci-hcd.2.auto: remove, state 4 [ 710.304217] usb usb3: USB disconnect, device number 1 [ 710.317441] xhci-hcd xhci-hcd.2.auto: USB bus 3 deregistered [ 710.323280] xhci-hcd xhci-hcd.2.auto: remove, state 1 [ 710.328401] usb usb2: USB disconnect, device number 1 [ 710.333515] usb 2-3: USB disconnect, device number 2 [ 710.467649] xhci-hcd xhci-hcd.2.auto: USB bus 2 deregistered [ 710.475450] Unable to handle kernel NULL pointer dereference at virtual address 00000000000003b8 [ 710.484425] Mem abort info: [ 710.487265] ESR = 0x0000000096000004 [ 710.491060] EC = 0x25: DABT (current EL), IL = 32 bits [ 710.496427] SET = 0, FnV = 0 [ 710.499525] EA = 0, S1PTW = 0 [ 710.502716] FSC = 0x04: level 0 translation fault [ 710.507648] Data abort info: [ 710.510577] ISV = 0, ISS = 0x00000004 [ 710.514462] CM = 0, WnR = 0 [ 710.517480] user pgtable: 4k pages, 48-bit VAs, pgdp=00000008b0050000 [ 710.523976] [00000000000003b8] pgd=0000000000000000, p4d=0000000000000000 [ 710.530961] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 710.536551] Modules linked in: rfkill input_leds snd_soc_simple_card snd_soc_simple_card_utils snd_soc_nau8822 designware_i2s snd_soc_core dw_hdmi_ahb_audio snd_pcm_dmaengine arm_ccn panfrost ac97_bus gpu_sched snd_pcm at24 fuse configfs sdhci_of_dwcmshc sdhci_pltfm sdhci nvme led_class mmc_core nvme_core bt1_pvt polynomial tp_serio snd_seq_midi snd_seq_midi_event snd_seq snd_timer snd_rawmidi snd_seq_device snd soundcore efivarfs ipv6 [ 710.575286] CPU: 7 PID: 1 Comm: systemd-shutdow Not tainted 5.19.0-rc7-00043-gfd8619f4fd54 #1 [ 710.583822] Hardware name: T-Platforms TF307-MB/BM1BM1-A, BIOS 5.6 07/06/2022 [ 710.590972] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 710.597949] pc : usb_remove_hcd+0x34/0x1e4 [ 710.602067] lr : xhci_plat_remove+0x74/0x140 [ 710.606351] sp : ffff800009f3b7c0 [ 710.609674] x29: ffff800009f3b7c0 x28: ffff000800960040 x27: 0000000000000000 [ 710.616833] x26: ffff800008dc22a0 x25: 0000000000000000 x24: 0000000000000000 [ 710.623992] x23: 0000000000000000 x22: ffff000805465810 x21: ffff000805465800 [ 710.631149] x20: ffff000800f80000 x19: 0000000000000000 x18: ffffffffffffffff [ 710.638307] x17: ffff000805096000 x16: ffff00080633b800 x15: ffff000806537a1c [ 710.645465] x14: 0000000000000001 x13: 0000000000000000 x12: ffff00080378d6f0 [ 710.652621] x11: ffff00080041a900 x10: ffff800009b204e8 x9 : ffff8000088abaa4 [ 710.659779] x8 : ffff000800960040 x7 : ffff800009409000 x6 : 0000000000000001 [ 710.666936] x5 : ffff800009241000 x4 : ffff800009241440 x3 : 0000000000000000 [ 710.674094] x2 : ffff000800960040 x1 : ffff000800960040 x0 : 0000000000000000 [ 710.681251] Call trace: [ 710.683704] usb_remove_hcd+0x34/0x1e4 [ 710.687467] xhci_plat_remove+0x74/0x140 [ 710.691400] platform_remove+0x34/0x70 [ 710.695165] device_remove+0x54/0x90 [ 710.698753] device_release_driver_internal+0x200/0x270 [ 710.703992] device_release_driver+0x24/0x30 [ 710.708273] bus_remove_device+0xe0/0x16c [ 710.712293] device_del+0x178/0x390 [ 710.715797] platform_device_del.part.0+0x24/0x90 [ 710.720514] platform_device_unregister+0x30/0x50 [ 710.725232] dwc3_host_exit+0x20/0x30 [ 710.728907] dwc3_remove+0x174/0x1b0 [ 710.732494] platform_remove+0x34/0x70 [ 710.736254] device_remove+0x54/0x90 [ 710.739840] device_release_driver_internal+0x200/0x270 [ 710.745078] device_release_driver+0x24/0x30 [ 710.749359] bus_remove_device+0xe0/0x16c [ 710.753380] device_del+0x178/0x390 [ 710.756881] platform_device_del.part.0+0x24/0x90 [ 710.761598] platform_device_unregister+0x30/0x50 [ 710.766314] of_platform_device_destroy+0xe8/0x100 [ 710.771119] device_for_each_child_reverse+0x70/0xc0 [ 710.776099] of_platform_depopulate+0x48/0x90 [ 710.780468] __dwc3_of_simple_teardown+0x28/0xe0 [ 710.785099] dwc3_of_simple_shutdown+0x20/0x30 [ 710.789555] platform_shutdown+0x30/0x40 [ 710.793490] device_shutdown+0x138/0x32c [ 710.797425] __do_sys_reboot+0x1c4/0x2ac [ 710.801362] __arm64_sys_reboot+0x30/0x40 [ 710.805383] invoke_syscall+0x50/0x120 [ 710.809146] el0_svc_common.constprop.0+0x68/0x124 [ 710.813950] do_el0_svc+0x3c/0xcc [ 710.817275] el0_svc+0x60/0x12c [ 710.820428] el0t_64_sync_handler+0xc0/0x13c [ 710.824710] el0t_64_sync+0x18c/0x190 [ 710.828386] Code: a9025bf5 f942c420 f9001fe0 d2800000 (b943ba62) [ 710.834498] ---[ end trace 0000000000000000 ]--- [ 710.875958] pstore: crypto_comp_compress failed, ret = -22! [ 710.895047] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 710.902757] Kernel Offset: disabled [ 710.906255] CPU features: 0x800,00004811,00001082 [ 710.910971] Memory Limit: none [ 710.927474] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]--- To avoid the problem check for NULL in usb_remove_hcd. Fixes: 4736ebd7fcaf ("usb: host: xhci-plat: omit shared hcd if either root hub has no ports") Signed-off-by: Alexey Sheplyakov Link: https://lore.kernel.org/r/20220722141700.1271439-1-asheplyakov@basealt.ru Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 23bb7b49597139d38f4da9392df28a24229697b6 Author: Xin Ji Date: Fri Jul 22 16:18:34 2022 +0800 usb: typec: anx7411: fix passing zero to 'PTR_ERR' Fix anx7411_register_partner() warn: passing zero to 'PTR_ERR' Fixes: fe6d8a9c8e64 ("usb: typec: anx7411: Add Analogix PD ANX7411 support") Signed-off-by: Xin Ji Link: https://lore.kernel.org/r/20220722081836.3380885-1-xji@analogixsemi.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/anx7411.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit d183a57cad920087a770c45721e98f45feea0fde Author: Yang Yingliang Date: Thu Jul 21 15:12:01 2022 +0800 usb: typec: anx7411: Fix error return code in anx7411_i2c_probe() Add mising error return code when failed to get interrupt or failed to register psy. Fixes: fe6d8a9c8e64 ("usb: typec: anx7411: Add Analogix PD ANX7411 support") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220721071201.269344-3-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/anx7411.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5cda657679f8fcb2896e4ac0aa8e231f12f9fb04 Author: Yang Yingliang Date: Thu Jul 21 15:12:00 2022 +0800 usb: typec: anx7411: Fix return value check in anx7411_register_i2c_dummy_clients() If i2c_new_dummy_device() fails, it never return NULL pointer, replace NULL test with IS_ERR() to fix it. Fixes: fe6d8a9c8e64 ("usb: typec: anx7411: Add Analogix PD ANX7411 support") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220721071201.269344-2-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/anx7411.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67fb0cc02f89049e532b008faa35818c82aa0d62 Author: Yang Yingliang Date: Thu Jul 21 15:11:59 2022 +0800 usb: typec: anx7411: Fix wrong pointer passed to PTR_ERR() It should be 'ctx->typec.amode[i]' passed to PTR_ERR() when typec_partner_register_altmode() failed. Fixes: fe6d8a9c8e64 ("usb: typec: anx7411: Add Analogix PD ANX7411 support") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220721071201.269344-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/anx7411.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0c25bab1abb43dbe2662e88f56e157ccac76f8c2 Author: Dan Carpenter Date: Fri Jul 22 09:29:52 2022 +0300 usb: typec: anx7411: use semi-colons instead of commas Semi colons and commas are equivalent in this context but semi-colons are better style. Reviewed-by: Xin Ji Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YtpD4MKBa43higNc@kili Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/anx7411.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 9310bd4bf20ff9ab180a0158f917b1d9af3247dc Author: Dan Carpenter Date: Fri Jul 22 09:29:07 2022 +0300 usb: typec: anx7411: fix error checking in anx7411_get_gpio_irq() This is a minor bug which means that certain error messages are not printed. The devm_gpiod_get_optional() function can return either error pointers or NULL. It returns error pointers if there is an allocation failure, or a similar issue. It returns NULL if no GPIO was assigned to the requested function. Print an error in either case. The gpiod_to_irq() function never returns zero. It either returns a positive IRQ number or a negative error code. Fixes: fe6d8a9c8e64 ("usb: typec: anx7411: Add Analogix PD ANX7411 support") Reviewed-by: Xin Ji Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YtpDs8VsWIbl/Smd@kili Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/anx7411.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cfed201e2db273562de152d22b74f74dee77e301 Author: Dan Carpenter Date: Fri Jul 22 09:25:42 2022 +0300 usb: typec: anx7411: Fix an array out of bounds This should be ARRAY_SIZE() instead of sizeof(). ARRAY_SIZE is 4 and sizeof is 8. Fixes: fe6d8a9c8e64 ("usb: typec: anx7411: Add Analogix PD ANX7411 support") Reviewed-by: Xin Ji Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YtpC5s4/AD8vFz+X@kili Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/anx7411.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff50a91ee5e6db357c900dce280a7129dc9e363c Author: Colin Ian King Date: Fri Jul 15 23:56:57 2022 +0100 usb: phy: remove redundant store to variable var after & operation There is no need to store the result of the & operation back to the variable var. The store is redundant, replace &= with just &. Cleans up clang scan warning: drivers/usb/phy/phy-keystone.c:62:5: warning: Although the value stored to 'val' is used in the enclosing expression, the value is never actually read from 'val' [deadcode.DeadStores] Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20220715225657.353828-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/phy-keystone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ffcba41de5579566f7d6933b96e8ca63335f790 Merge: 2f0f6b176e08 28ec53f3a830 Author: David S. Miller Date: Wed Jul 27 13:24:43 2022 +0100 Merge branch 'smc-updates' Wenjia Zhang says: ==================== net/smc: updates 2022-07-25 please apply the following patches to netdev's net-next tree. These patches do some preparation to make ISM available for uses beyond SMC-D, and a bunch of cleanups. v2: add "Reviewed-by: Tony Lu " ==================== Signed-off-by: David S. Miller commit 28ec53f3a830750f1b5ccf73cb13dae66ade1660 Author: Stefan Raspl Date: Mon Jul 25 16:10:00 2022 +0200 net/smc: Enable module load on netlink usage Previously, the smc and smc_diag modules were automatically loaded as dependencies of the ism module whenever an ISM device was present. With the pending rework of the ISM API, the smc module will no longer automatically be loaded in presence of an ISM device. Usage of an AF_SMC socket will still trigger loading of the smc modules, but usage of a netlink socket will not. This is addressed by setting the correct module aliases. Signed-off-by: Stefan Raspl Signed-off-by: Wenjia Zhang < wenjia@linux.ibm.com> Reviewed-by: Tony Lu Signed-off-by: David S. Miller net/smc/af_smc.c | 1 + net/smc/smc_diag.c | 1 + 2 files changed, 2 insertions(+) commit 8b2fed8e2712e8c23665df3c9e0fbabbb76e466c Author: Stefan Raspl Date: Mon Jul 25 16:09:59 2022 +0200 net/smc: Pass on DMBE bit mask in IRQ handler Make the DMBE bits, which are passed on individually in ism_move() as parameter idx, available to the receiver. Signed-off-by: Stefan Raspl Signed-off-by: Wenjia Zhang < wenjia@linux.ibm.com> Reviewed-by: Tony Lu Signed-off-by: David S. Miller drivers/s390/net/ism_drv.c | 4 +++- include/net/smc.h | 2 +- net/smc/smc_ism.c | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) commit 0a2f4f9893c83bd722bd55a903fb682da2eb24ba Author: Stefan Raspl Date: Mon Jul 25 16:09:58 2022 +0200 s390/ism: Cleanups Reworked signature of the function to retrieve the system EID: No plausible reason to use a double pointer. And neither to pass in the device as an argument, as this identifier is by definition per system, not per device. Plus some minor consistency edits. Signed-off-by: Stefan Raspl Signed-off-by: Wenjia Zhang < wenjia@linux.ibm.com> Reviewed-by: Tony Lu Signed-off-by: David S. Miller drivers/s390/net/ism_drv.c | 11 +++++------ include/net/smc.h | 2 +- net/smc/smc_ism.c | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) commit eb481b02bd182a96e22070895bf887277b82150f Author: Heiko Carstens Date: Mon Jul 25 16:09:57 2022 +0200 net/smc: Eliminate struct smc_ism_position This struct is used in a single place only, and its usage generates inefficient code. Time to clean up! Signed-off-by: Heiko Carstens Reviewed-and-tested-by: Stefan Raspl Signed-off-by: Wenjia Zhang < wenjia@linux.ibm.com> Reviewed-by: Tony Lu Signed-off-by: David S. Miller net/smc/smc_ism.c | 11 ----------- net/smc/smc_ism.h | 20 +++++++++++--------- net/smc/smc_tx.c | 10 +++------- 3 files changed, 14 insertions(+), 27 deletions(-) commit 7dea20f2fecbde5df321d6d9d0b7765be6edc28c Author: Randy Dunlap Date: Wed Jul 20 10:37:49 2022 -0700 kconfig: Qt5: tell the user which packages are required Along with saying "Please install Qt5 ...", tell exactly which parts of Qt5 are needed. This is useful when parts of Qt5 are installed but some of the required pieces are missing, and it eliminates the need for the user to find the shell script and the line in it that provide that information. Signed-off-by: Randy Dunlap Signed-off-by: Masahiro Yamada scripts/kconfig/qconf-cfg.sh | 1 + 1 file changed, 1 insertion(+) commit abe864b8e19adf33b48997de8bc1a8f095390ade Author: Masahiro Yamada Date: Wed Jul 20 01:53:00 2022 +0900 modpost: use sym_get_data() to get module device_table data Use sym_get_data() to replace the long code. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers scripts/mod/file2alias.c | 4 +--- scripts/mod/modpost.c | 2 +- scripts/mod/modpost.h | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) commit 5764f6626f5f334b27e168a33735b3899d08bcd2 Author: Masahiro Yamada Date: Wed Jul 20 01:52:59 2022 +0900 modpost: drop executable ELF support Since commit 269a535ca931 ("modpost: generate vmlinux.symvers and reuse it for the second modpost"), modpost only parses relocatable files (ET_REL). Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers scripts/mod/modpost.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 1fd49a0b5c4330ceefef4de498cec271e240aaf1 Author: Wadim Mueller Date: Wed Jul 13 21:41:10 2022 +0200 checkstack: add riscv support for scripts/checkstack.pl scripts/checkstack.pl lacks support for the riscv architecture. Add support to detect "addi sp,sp,-FRAME_SIZE" stack frame generation instruction Signed-off-by: Wadim Mueller Signed-off-by: Masahiro Yamada scripts/checkstack.pl | 4 ++++ 1 file changed, 4 insertions(+) commit 10269fd37fc60bda700dd2554ff382446d45771d Author: Masahiro Yamada Date: Tue Jul 19 11:35:39 2022 +0900 kconfig: shorten the temporary directory name for cc-option The cc-option macro creates the temporary directory, .tmp_$$$$. Shell expands '$$' into its process ID. '$$$$' results in repeated PID. In Makefile, '$$$$' is correct (see TMPOUT in scripts/Malefile.compiler) because '$$' is an escape sequence of '$'. Make expands '$$$$' into '$$', then shell expands it into the process ID. This does not apply to Kconfig because Kconfig requires variable references to be enclosed by curly braces, like ${variable}. The '$' that is not followed by '{' loses its effect. Signed-off-by: Masahiro Yamada Tested-by: Nicolas Schier scripts/Kconfig.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3b746a384fc2f3b7b4a8c9aad5024130a975c43 Author: Nicolas Schier Date: Mon Jul 18 08:14:13 2022 +0200 scripts: headers_install.sh: Update config leak ignore entries Remove two dated config leak ignore entries from scripts/headers_install.sh: arch/alpha/include/uapi/asm/setup.h does no more leak any CONFIG_* symbol to user-space any more since commit 3cb8b1537f8a ("alpha: Move setup.h out of uapi"). Same holds for include/uapi/asm-generic/fcntl.h since commit 306f7cc1e906 ("uapi: always define F_GETLK64/F_SETLK64/F_SETLKW64 in fcntl.h"). Signed-off-by: Nicolas Schier Signed-off-by: Masahiro Yamada scripts/headers_install.sh | 2 -- 1 file changed, 2 deletions(-) commit 84850dbbbe60a75b27eb0f272fdbc28cfaae689b Author: Masahiro Yamada Date: Thu Jul 14 14:02:43 2022 +0900 kbuild: error out if $(INSTALL_MOD_PATH) contains % or : If the directory path given to INSTALL_MOD_PATH contains % or :, the module_install fails. % is used in pattern rules, and : as the separator of dependencies. Bail out with a clearer error message. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier scripts/Makefile.modinst | 3 +++ 1 file changed, 3 insertions(+) commit 9a68fd7fd8b05050b27ae67a829a2035b2b7a993 Author: Masahiro Yamada Date: Thu Jul 14 14:02:42 2022 +0900 kbuild: error out if $(KBUILD_EXTMOD) contains % or : If the directory path given to KBUILD_EXTMOD (or M=) contains % or :, the module fails to build. % is used in pattern rules, and : as the separator of dependencies. Bail out with a clearer error message. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Makefile | 3 +++ 1 file changed, 3 insertions(+) commit 6105e4f6511d6b383738be89efb99c607e158a29 Author: Masahiro Yamada Date: Thu Jul 14 14:02:41 2022 +0900 kbuild: rpm-pkg: pass 'linux' to --target option of rpmbuild Presumably, _target_os is defined even if the --target flag does not specify it, but it is better to make it explicit. Signed-off-by: Masahiro Yamada scripts/Makefile.package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3089b2be0cce14bd026a1018b8f6e5aed8244545 Author: Masahiro Yamada Date: Thu Jul 14 14:02:40 2022 +0900 kbuild: rpm-pkg: fix build error when _arch is undefined Cross-building (bin)rpm-pkg fails on several architectures. For example, 'make ARCH=arm binrpm-pkg' fails like follows: sh ./scripts/package/mkspec prebuilt > ./binkernel.spec rpmbuild --define "_builddir ." --target \ arm -bb ./binkernel.spec Building target platforms: arm Building for target arm warning: line 19: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-headers Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.0S8t2F + umask 022 + cd . + mkdir -p /home/masahiro/rpmbuild/BUILDROOT/kernel-5.19.0_rc6-19.%{_arch}/boot + make -f ./Makefile image_name + cp arch/arm/boot/zImage /home/masahiro/rpmbuild/BUILDROOT/kernel-5.19.0_rc6-19.%{_arch}/boot/vmlinuz-5.19.0-rc6 + make -f ./Makefile INSTALL_MOD_PATH=/home/masahiro/rpmbuild/BUILDROOT/kernel-5.19.0_rc6-19.%{_arch} modules_install make[3]: *** No rule to make target '/home/masahiro/rpmbuild/BUILDROOT/kernel-5.19.0_rc6-19.arch/arm/crypto/aes-arm-bs.ko{_arch}/lib/modules/5.19.0-rc6/kernel/%', needed by '__modinst'. Stop. make[2]: *** [Makefile:1768: modules_install] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.0S8t2F (%install) By default, 'buildroot' contains %{_arch} (see /usr/lib/rpm/macros). _arch is generally defined in /usr/lib/rpm/platforms/*/macros, where the platform sub-directory is specified by --target= option for cross builds. If the given arch does not exist, %{_arch} is not expanded. In the example above, --target=arm is passed to rpmbuild, but /usr/lib/rpm/platforms/arm-linux/ does not exist. The '%' character in the path confuses GNU make and rpmbuild. The same occurs for such architectures as csky, microblaze, nios2, etc. Define _arch if it has not been defined. Reported-by: Jason Self Signed-off-by: Masahiro Yamada scripts/package/mkspec | 3 +++ 1 file changed, 3 insertions(+) commit 59316eac0e5ba5863594a793f6d8b5d8ccb8e880 Author: Baruch Siach Date: Thu Jul 14 07:25:46 2022 +0300 docs: kbuild: fix typo on -> one. Signed-off-by: Baruch Siach Signed-off-by: Masahiro Yamada Documentation/kbuild/kconfig-language.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aac289653fa5adf9e9985e4912c1d24a3e8cbab2 Author: Ondrej Mosnacek Date: Mon Jul 11 14:09:23 2022 +0200 kbuild: dummy-tools: avoid tmpdir leak in dummy gcc When passed -print-file-name=plugin, the dummy gcc script creates a temporary directory that is never cleaned up. To avoid cluttering $TMPDIR, instead use a static directory included in the source tree. Fixes: 76426e238834 ("kbuild: add dummy toolchains to enable all cc-option etc. in Kconfig") Signed-off-by: Ondrej Mosnacek Signed-off-by: Masahiro Yamada scripts/dummy-tools/dummy-plugin-dir/include/plugin-version.h | 0 scripts/dummy-tools/gcc | 8 ++------ 2 files changed, 2 insertions(+), 6 deletions(-) commit 028062ec222d6ed0235bbf9612ba8a05efc9e633 Author: Masahiro Yamada Date: Mon Jul 11 13:49:41 2022 +0900 Revert "scripts/mod/modpost.c: permit '.cranges' secton for sh64 architecture." This reverts commit 4d10c223baab8be8f717df3625cfece5be26dead. Commit 37744feebc08 ("sh: remove sh5 support") removed the sh64 support entirely. Note: .cranges was only used for sh64 ever. Commit 211dc24b8744 ("Remove sh5 and sh64 support") in binutils-gdb already removed the relevant code. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers scripts/mod/modpost.c | 1 - 1 file changed, 1 deletion(-) commit bdf0fe33a4dc57e6397d90a4e024f7bbf89b1c08 Author: Baruch Siach Date: Thu Jul 7 07:43:29 2022 +0300 init/Kconfig: update KALLSYMS_ALL help text CONFIG_KALLSYMS_ALL is required for kernel live patching which is a common use case that is enabled in some major distros. Update the Kconfig help text to reflect that. While at it, s/e.g./i.e./ to match the text intention. Signed-off-by: Baruch Siach Signed-off-by: Masahiro Yamada init/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit a6036a41bffba3d5007e377483b425d470ad8042 Author: Nick Desaulniers Date: Tue Jun 28 14:04:07 2022 -0700 kbuild: drop support for CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 The difference in most compilers between `-O3` and `-O2` is mostly down to whether loops with statically determinable trip counts are fully unrolled vs unrolled to a multiple of SIMD width. This patch is effectively a revert of commit 15f5db60a137 ("kbuild,arc: add CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 for ARC") without re-adding ARCH_CFLAGS Ever since commit cfdbc2e16e65 ("ARC: Build system: Makefiles, Kconfig, Linker script") ARC has been built with -O3, though the reason for doing so was not specified in inline comments or the commit message. This commit does not re-add -O3 to arch/arc/Makefile. Folks looking to experiment with `-O3` (or any compiler flag for that matter) may pass them along to the command line invocation of make: $ make KCFLAGS=-O3 Code that looks to re-add an explicit Kconfig option for `-O3` should provide: 1. A rigorous and reproducible performance profile of a reasonable userspace workload that demonstrates a hot loop in the kernel that would benefit from `-O3` over `-O2`. 2. Disassembly of said loop body before and after. 3. Provides stats on terms of increase in file size. Link: https://lore.kernel.org/linux-kbuild/CA+55aFz2sNBbZyg-_i8_Ldr2e8o9dfvdSfHHuRzVtP2VMAUWPg@mail.gmail.com/ Signed-off-by: Nick Desaulniers Signed-off-by: Masahiro Yamada Makefile | 2 -- arch/arc/configs/axs101_defconfig | 1 - arch/arc/configs/axs103_defconfig | 1 - arch/arc/configs/axs103_smp_defconfig | 1 - arch/arc/configs/haps_hs_defconfig | 1 - arch/arc/configs/haps_hs_smp_defconfig | 1 - arch/arc/configs/hsdk_defconfig | 1 - arch/arc/configs/nsim_700_defconfig | 1 - arch/arc/configs/nsimosci_defconfig | 1 - arch/arc/configs/nsimosci_hs_defconfig | 1 - arch/arc/configs/nsimosci_hs_smp_defconfig | 1 - arch/arc/configs/tb10x_defconfig | 1 - arch/arc/configs/vdk_hs38_defconfig | 1 - arch/arc/configs/vdk_hs38_smp_defconfig | 1 - init/Kconfig | 7 ------- 15 files changed, 22 deletions(-) commit 5439d4d4dcee548b1ad984c293225c1668045ad2 Author: Masahiro Yamada Date: Tue Jun 14 14:51:49 2022 +0900 kbuild: remove sed command from cmd_ar_builtin Replace a pipeline of echo and sed with printf to decrease process forks. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers scripts/Makefile.build | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 31f6d95c2cab1898c05a95f434f54a327431f158 Author: Masahiro Yamada Date: Sun Jun 12 02:22:33 2022 +0900 certs: unify blacklist_hashes.c and blacklist_nohashes.c These two files are very similar. Unify them. Signed-off-by: Masahiro Yamada Reviewed-by: Mickaël Salaün Reviewed-by: Jarkko Sakkinen certs/Makefile | 12 +++++------- certs/blacklist_hashes.c | 1 - certs/blacklist_nohashes.c | 6 ------ 3 files changed, 5 insertions(+), 14 deletions(-) commit 9008a676662a77ab98727d05bdffa0e3c38cba53 Author: Masahiro Yamada Date: Sun Jun 12 02:22:32 2022 +0900 certs: move scripts/check-blacklist-hashes.awk to certs/ This script is only used in certs/Makefile, so certs/ is a better home for it. Signed-off-by: Masahiro Yamada Reviewed-by: Mickaël Salaün Reviewed-by: Jarkko Sakkinen MAINTAINERS | 1 - certs/Makefile | 2 +- {scripts => certs}/check-blacklist-hashes.awk | 0 3 files changed, 1 insertion(+), 2 deletions(-) commit 9cc0590ae351a354c51375a1ee22edc2e4931fd0 Author: Jean Delvare Date: Wed Jul 27 13:26:37 2022 +0200 regulator: mt6380: Fix unused array warning With the following configuration options: CONFIG_OF is not set CONFIG_REGULATOR_MT6380=y we get the following build warning: CC drivers/regulator/mt6380-regulator.o drivers/regulator/mt6380-regulator.c:322:34: warning: ‘mt6380_of_match’ defined but not used [-Wunused-const-variable=] Fix this by annotating that array with __maybe_unused, as done in various regulator drivers. Signed-off-by: Jean Delvare Reported-by: kernel test robot Link: https://lore.kernel.org/all/202207240252.ZY5hSCNB-lkp@intel.com/ Cc: Liam Girdwood Cc: Mark Brown Cc: Matthias Brugger Cc: Chenglin Xu Link: https://lore.kernel.org/r/20220727132637.76d6073f@endymion.delvare Signed-off-by: Mark Brown drivers/regulator/mt6380-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7bffbe9cbd3c96fe51a8482127cabf6fa1fd9b2 Author: Jiaxin Yu Date: Tue Jul 26 23:42:20 2022 +0800 ASoC: mediatek: mt8186: remove unnecessary judgments The afe_priv->dai_priv[] is allocated when platform driver probe(), if it failed, the ASoC platform driver probe() will return fail first. Therefore, this is excessive judgment, and the condition will never be established. Bug report: https://www.spinics.net/lists/alsa-devel/msg145609.html This is a semi-automatic email about new static checker warnings. The patch ae92dcbee8b6: "ASoC: mediatek: mt8186: support tdm in platform driver" from May 23, 2022, leads to the following Smatch complaint: sound/soc/mediatek/mt8186/mt8186-dai-tdm.c:424 mtk_dai_tdm_hw_params() warn: variable dereferenced before check 'tdm_priv' (see line 406) sound/soc/mediatek/mt8186/mt8186-dai-tdm.c 405 struct mtk_afe_tdm_priv *tdm_priv = afe_priv->dai_priv[tdm_id]; 406 unsigned int tdm_mode = tdm_priv->tdm_mode; ^^^^^^^^^^^^^^^^^^^ Lot's of dereferences 407 unsigned int data_mode = tdm_priv->data_mode; 408 unsigned int rate = params_rate(params); 409 unsigned int channels = params_channels(params); 410 snd_pcm_format_t format = params_format(params); 411 unsigned int bit_width = 412 snd_pcm_format_physical_width(format); 413 unsigned int tdm_channels = (data_mode == TDM_DATA_ONE_PIN) ? 414 get_tdm_ch_per_sdata(tdm_mode, channels) : 2; 415 unsigned int lrck_width = 416 get_tdm_lrck_width(format, tdm_mode); 417 unsigned int tdm_con = 0; 418 bool slave_mode = tdm_priv->slave_mode; 419 bool lrck_inv = tdm_priv->lck_invert; 420 bool bck_inv = tdm_priv->bck_invert; 421 unsigned int tran_rate; 422 unsigned int tran_relatch_rate; 423 424 if (!tdm_priv) { ^^^^^^^^^ Checked too late 425 dev_err(afe->dev, "%s(), tdm_priv == NULL", __func__); 426 return -EINVAL; Fixes: ae92dcbee8b6 ("ASoC: mediatek: mt8186: support tdm in platform driver") Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/20220726154220.28141-1-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-dai-adda.c | 5 --- sound/soc/mediatek/mt8186/mt8186-dai-i2s.c | 63 ----------------------------- sound/soc/mediatek/mt8186/mt8186-dai-pcm.c | 5 --- sound/soc/mediatek/mt8186/mt8186-dai-tdm.c | 55 +------------------------ 4 files changed, 1 insertion(+), 127 deletions(-) commit 9f8267b9b29937d997c3b4cec426252aae6311b5 Author: Borislav Petkov Date: Wed Jul 27 13:49:48 2022 +0200 misc: Mark MICROCODE_MINOR unused This one is unused since 181b6f40e9ea ("x86/microcode: Rip out the OLD_INTERFACE") so comment it out. Link: https://lore.kernel.org/r/20220525161232.14924-1-bp@alien8.de Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20220727114948.30123-1-bp@alien8.de Signed-off-by: Greg Kroah-Hartman include/linux/miscdevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 326ecc15c61c349cd49d1700ff9e3e31c6fd1cd5 Author: Ravi Bangoria Date: Sat Jun 4 10:15:17 2022 +0530 perf/x86/ibs: Add new IBS register bits into header IBS support has been enhanced with two new features in upcoming uarch: 1. DataSrc extension and 2. L3 miss filtering. Additional set of bits has been introduced in IBS registers to use these features. Define these new bits into arch/x86/ header. [ bp: Massage commit message. ] Signed-off-by: Ravi Bangoria Signed-off-by: Borislav Petkov Acked-by: Ian Rogers Link: https://lore.kernel.org/r/20220604044519.594-7-ravi.bangoria@amd.com arch/x86/include/asm/amd-ibs.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit d6b551b8f90cc92c7d3c09cf38c748efe305ecb4 Author: Christophe Leroy Date: Mon Jul 11 16:19:33 2022 +0200 powerpc/64e: Fix build failure with GCC 12 (unrecognized opcode: `wrteei') With GCC 12, corenet64_smp_defconfig leads to the following build errors: CC arch/powerpc/kernel/irq.o {standard input}: Assembler messages: {standard input}:3616: Error: unrecognized opcode: `wrteei' {standard input}:5689: Error: unrecognized opcode: `wrteei' CC arch/powerpc/kernel/pmc.o {standard input}: Assembler messages: {standard input}:42: Error: unrecognized opcode: `mfpmr' {standard input}:53: Error: unrecognized opcode: `mtpmr' CC arch/powerpc/kernel/io.o {standard input}: Assembler messages: {standard input}:376: Error: unrecognized opcode: `mbar' ... CC arch/powerpc/mm/nohash/book3e_hugetlbpage.o {standard input}: Assembler messages: {standard input}:291: Error: unrecognized opcode: `tlbsx' {standard input}:482: Error: unrecognized opcode: `tlbwe' {standard input}:608: Error: unrecognized opcode: `lbarx' {standard input}:608: Error: unrecognized opcode: `stbcx.' -mpcu=powerpc64 cannot be used anymore for book3e, it must be a booke CPU. But then we get: CC arch/powerpc/lib/xor_vmx.o cc1: error: AltiVec not supported in this target Altivec is not supported with -mcpu=e5500 so don't allow selection of altivec when e5500 is selected. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/77255a5a957967723b84d0356d9e5fb21569f4e8.1657549153.git.christophe.leroy@csgroup.eu arch/powerpc/Makefile | 8 +------- arch/powerpc/platforms/Kconfig.cputype | 8 ++++---- 2 files changed, 5 insertions(+), 11 deletions(-) commit 2255411d1d0f0661d1e5acd5f6edf4e6652a345a Author: Christophe Leroy Date: Mon Jul 11 16:19:32 2022 +0200 powerpc/44x: Fix build failure with GCC 12 (unrecognized opcode: `wrteei') Building ppc40x_defconfig leads to following error CC arch/powerpc/kernel/idle.o {standard input}: Assembler messages: {standard input}:67: Error: unrecognized opcode: `wrteei' {standard input}:78: Error: unrecognized opcode: `wrteei' Add -mcpu=440 by default and alternatively 464 and 476. Once that's done, -mcpu=powerpc is only for book3s/32 now. But then comes CC arch/powerpc/kernel/io.o {standard input}: Assembler messages: {standard input}:198: Error: unrecognized opcode: `eieio' {standard input}:230: Error: unrecognized opcode: `eieio' {standard input}:245: Error: unrecognized opcode: `eieio' {standard input}:254: Error: unrecognized opcode: `eieio' {standard input}:273: Error: unrecognized opcode: `eieio' {standard input}:396: Error: unrecognized opcode: `eieio' {standard input}:404: Error: unrecognized opcode: `eieio' {standard input}:423: Error: unrecognized opcode: `eieio' {standard input}:512: Error: unrecognized opcode: `eieio' {standard input}:520: Error: unrecognized opcode: `eieio' {standard input}:539: Error: unrecognized opcode: `eieio' {standard input}:628: Error: unrecognized opcode: `eieio' {standard input}:636: Error: unrecognized opcode: `eieio' {standard input}:655: Error: unrecognized opcode: `eieio' Fix it by replacing eieio by mbar on booke. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b0d982e223314ed82ab959f5d4ad2c4c00bedb99.1657549153.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/barrier.h | 2 ++ arch/powerpc/include/asm/nohash/pgtable.h | 2 +- arch/powerpc/include/asm/synch.h | 5 ++++- arch/powerpc/mm/nohash/tlb_low.S | 4 ++-- arch/powerpc/platforms/Kconfig.cputype | 17 ++++++++++++++++- arch/powerpc/sysdev/fsl_rio.c | 12 ++++++++++-- 6 files changed, 35 insertions(+), 7 deletions(-) commit ff27d9200a98757efc7c2cdf198904fd79cf4ffd Author: Christophe Leroy Date: Mon Jul 11 16:19:31 2022 +0200 powerpc/405: Fix build failure with GCC 12 (unrecognized opcode: `wrteei') Building ppc40x_defconfig leads to following error CC arch/powerpc/kernel/process.o {standard input}: Assembler messages: {standard input}:626: Error: unrecognized opcode: `wrteei' Add -mcpu=405 by default. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d344a42c99061cfe10a28e00de4e31a1363f4251.1657549153.git.christophe.leroy@csgroup.eu arch/powerpc/platforms/Kconfig.cputype | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 446cda1b21d9a6b3697fe399c6a3a00ff4a285f5 Author: Christophe Leroy Date: Mon Jul 11 16:19:30 2022 +0200 powerpc/32: Don't always pass -mcpu=powerpc to the compiler Since commit 4bf4f42a2feb ("powerpc/kbuild: Set default generic machine type for 32-bit compile"), when building a 32 bits kernel with a bi-arch version of GCC, or when building a book3s/32 kernel, the option -mcpu=powerpc is passed to GCC at all time, relying on it being eventually overriden by a subsequent -mcpu=xxxx. But when building the same kernel with a 32 bits only version of GCC, that is not done, relying on gcc being built with the expected default CPU. This logic has two problems. First, it is a bit fragile to rely on whether the GCC version is bi-arch or not, because today we can have bi-arch versions of GCC configured with a 32 bits default. Second, there are some versions of GCC which don't support -mcpu=powerpc, for instance for e500 SPE-only versions. So, stop relying on this approximative logic and allow the user to decide whether he/she wants to use the toolchain's default CPU or if he/she wants to set one, and allow only possible CPUs based on the selected target. Reported-by: Pali Rohár Signed-off-by: Christophe Leroy Tested-by: Pali Rohár Reviewed-by: Arnd Bergmann Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d4df724691351531bf46d685d654689e5dfa0d74.1657549153.git.christophe.leroy@csgroup.eu arch/powerpc/Makefile | 26 +------------------------- arch/powerpc/platforms/Kconfig.cputype | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 28 deletions(-) commit 9be013b2a9ecb29b5168e4b9db0e48ed53acf37c Author: Christophe Leroy Date: Mon Jul 11 16:19:29 2022 +0200 powerpc/32: Do not allow selection of e5500 or e6500 CPUs on PPC32 Commit 0e00a8c9fd92 ("powerpc: Allow CPU selection also on PPC32") enlarged the CPU selection logic to PPC32 by removing depend to PPC64, and failed to restrict that depend to E5500_CPU and E6500_CPU. Fortunately that got unnoticed because -mcpu=8540 will override the -mcpu=e500mc64 or -mpcu=e6500 as they are ealier, but that's fragile and may no be right in the future. Add back the depend PPC64 on E5500_CPU and E6500_CPU. Fixes: 0e00a8c9fd92 ("powerpc: Allow CPU selection also on PPC32") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8abab4888da69ff78b73a56f64d9678a7bf684e9.1657549153.git.christophe.leroy@csgroup.eu arch/powerpc/platforms/Kconfig.cputype | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit de40303b54bc458d7df0d4b4ee1d296df7fe98c7 Author: Christophe Leroy Date: Thu Jul 7 16:55:16 2022 +0200 powerpc/ppc-opcode: Define and use PPC_RAW_SETB() We have PPC_INST_SETB then build the 'setb' instruction in the user. Instead, define PPC_RAW_SETB() and use it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b08a4f26919a8f8cdcf7544ab552d9c1c63418b5.1657205708.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/ppc-opcode.h | 2 +- arch/powerpc/lib/test_emulate_step.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) commit d00d762daf1278641eec92d74011a7e625e84a68 Author: Christophe Leroy Date: Thu Jul 7 16:55:15 2022 +0200 powerpc/ppc-opcode: Define and use PPC_RAW_TRAP() and PPC_RAW_TW() Add and use PPC_RAW_TRAP() instead of opencoding. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/52c7e522e56a38e3ff0363906919445920005a8f.1657205708.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/ppc-opcode.h | 2 ++ arch/powerpc/include/asm/probes.h | 3 ++- arch/powerpc/xmon/xmon.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) commit 7b48377e1d9f68a1b58dfd22d40b083f38ce76a0 Author: Christophe Leroy Date: Thu Jul 7 16:55:14 2022 +0200 powerpc/probes: Remove ppc_opcode_t ppc_opcode_t is just an u32. There is no point in hiding u32 behind such a typedef. Remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b2d762191b095530789ac8b71b167c6740bb6aed.1657205708.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/kprobes.h | 2 +- arch/powerpc/include/asm/probes.h | 1 - arch/powerpc/include/asm/uprobes.h | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) commit 62ccae78820b25a0ac64bb0f648388ec834fcb3c Author: Christophe Leroy Date: Thu Jul 7 16:37:18 2022 +0200 powerpc: Remove remaining parts of oprofile Commit 9850b6c69356 ("arch: powerpc: Remove oprofile") removed oprofile. Remove all remaining parts of it. Signed-off-by: Christophe Leroy Acked-by: Viresh Kumar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/298432fe1a14c0a415760011d72c3f0999efd5e2.1657204631.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/cputable.h | 3 -- arch/powerpc/kernel/cputable.c | 67 +------------------------------ arch/powerpc/kernel/dt_cpu_ftrs.c | 4 -- arch/powerpc/platforms/cell/spufs/spufs.h | 2 +- arch/powerpc/platforms/ps3/Kconfig | 2 +- 5 files changed, 4 insertions(+), 74 deletions(-) commit ec3eb9d941a98f4c0dac263110729680a734279b Author: Rashmica Gupta Date: Thu Jul 7 16:37:17 2022 +0200 powerpc/perf: Use PVR rather than oprofile field to determine CPU version Currently the perf CPU backend drivers detect what CPU they're on using cur_cpu_spec->oprofile_cpu_type. Although that works, it's a bit crufty to be using oprofile related fields, especially seeing as oprofile is more or less unused these days. It also means perf is reliant on the fragile logic in setup_cpu_spec() which detects when we're using a logical PVR and copies back the PMU related fields from the raw CPU entry. So lets check the PVR directly. Suggested-by: Michael Ellerman Signed-off-by: Rashmica Gupta Signed-off-by: Christophe Leroy Reviewed-by: Madhavan Srinivasan [chleroy: Added power10 and fixed checkpatch issues] Reviewed-and-tested-by: Athira Rajeev Reviewed-and-tested-By: Kajol Jain [For 24x7 side changes] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20c0ee7f99dbf0dbf8658df6b39f84753e6db1ef.1657204631.git.christophe.leroy@csgroup.eu arch/powerpc/perf/e500-pmu.c | 9 +++++---- arch/powerpc/perf/e6500-pmu.c | 5 +++-- arch/powerpc/perf/hv-24x7.c | 6 +++--- arch/powerpc/perf/mpc7450-pmu.c | 5 +++-- arch/powerpc/perf/power10-pmu.c | 6 ++---- arch/powerpc/perf/power5+-pmu.c | 6 +++--- arch/powerpc/perf/power5-pmu.c | 5 +++-- arch/powerpc/perf/power6-pmu.c | 5 +++-- arch/powerpc/perf/power7-pmu.c | 7 ++++--- arch/powerpc/perf/power8-pmu.c | 5 +++-- arch/powerpc/perf/power9-pmu.c | 4 +--- arch/powerpc/perf/ppc970-pmu.c | 7 ++++--- 12 files changed, 37 insertions(+), 33 deletions(-) commit 6042a1652d643d1d34fa89bb314cb102960c0800 Author: Christophe Leroy Date: Fri Jul 1 08:06:15 2022 +0200 powerpc/32s: Fix boot failure with KASAN + SMP + JUMP_LABEL_FEATURE_CHECK_DEBUG Since commit 4291d085b0b0 ("powerpc/32s: Make pte_update() non atomic on 603 core"), pte_update() has been using mmu_has_feature(MMU_FTR_HPTE_TABLE) to avoid a useless atomic operation on 603 cores. When kasan_early_init() sets up the early zero shadow, it uses __set_pte_at(). On book3s/32, __set_pte_at() calls pte_update() when CONFIG_SMP is selected in order to ensure the preservation of _PAGE_HASHPTE in case of concurrent update of the PTE. But that's too early for mmu_has_feature(), so when CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG is selected, mmu_has_feature() calls printk(). That's too early to call printk() because KASAN early zero shadow page is not set up yet. It leads to a deadlock. However, when kasan_early_init() is called, there is only one CPU running and no risk of concurrent PTE update. So __set_pte_at() can be called with the 'percpu' flag. With that flag set, the PTE is written directly instead of being written via pte_update(). Fixes: 4291d085b0b0 ("powerpc/32s: Make pte_update() non atomic on 603 core") Reported-by: Erhard Furtner Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2ee707512b8b212b079b877f4ceb525a1606a3fb.1656655567.git.christophe.leroy@csgroup.eu arch/powerpc/mm/kasan/init_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a0fb3c155c97c75176e557d61f8e66c1bd9b735 Author: Christophe Leroy Date: Tue Jun 14 12:34:09 2022 +0200 powerpc/32: Set an IBAT covering up to _einittext during init Always set an IBAT covering up to _einittext during init because when CONFIG_MODULES is not selected there is no reason to have an exception handler for kernel instruction TLB misses. It implies DBAT and IBAT are now totaly independent, IBATs are set by setibat() and DBAT by setbat(). This allows to revert commit 9bb162fa26ed ("powerpc/603: Fix boot failure with DEBUG_PAGEALLOC and KFENCE") Reported-by: Maxime Bizon Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ce7f04a39593934d9b1ee68c69144ccd3d4da4a1.1655202804.git.christophe.leroy@csgroup.eu arch/powerpc/kernel/head_book3s_32.S | 4 ++-- arch/powerpc/mm/book3s32/mmu.c | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) commit 980bbf7ca72012d317617fcdbfabe8708e4cef29 Author: Christophe Leroy Date: Tue Jun 14 12:34:08 2022 +0200 powerpc/32: Call mmu_mark_initmem_nx() regardless of data block mapping. mark_initmem_nx() calls either mmu_mark_initmem_nx() or set_memory_attr() based on return from v_block_mapped() of _sinittext. But we can now handle text and data independently, so that text may be mapped by block even when data is mapped by pages. On the 8xx for instance, at startup 32Mbytes of memory are pinned in TLB. So the pinned entries need to go away for sinittext. In next patch a BAT will be set to also covers sinittext on book3s/32. So it will also be needed to call mmu_mark_initmem_nx() even when data above sinittext is not mapped with BATs. As this is highly dependent on the platform, call mmu_mark_initmem_nx() regardless of data block mapping. Then the platform will know what to do. Modify 8xx mmu_mark_initmem_nx() so that inittext mapping is modified only when pagealloc debug and kfence are not active, otherwise inittext is mapped with standard pages. And don't do anything on kernel text which is already mapped with PAGE_KERNEL_TEXT. Fixes: da1adea07576 ("powerpc/8xx: Allow STRICT_KERNEL_RwX with pinned TLB") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/db3fc14f3bfa6215b0786ef58a6e2bc1e1f964d7.1655202804.git.christophe.leroy@csgroup.eu arch/powerpc/mm/nohash/8xx.c | 4 ++-- arch/powerpc/mm/pgtable_32.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit f57261e69825b332f22480b37a33e03d066c0da2 Author: Nicholas Piggin Date: Mon Jul 11 13:06:52 2022 +1000 powerpc/mce: use early_cpu_to_node() in mce_init() cpu_to_node() is not yet available (setup_arch() is called before setup_per_cpu_areas() by start_kernel()). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220711030653.150950-1-npiggin@gmail.com arch/powerpc/kernel/mce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd193f85d3206cc7e7aeea2b6033d105cca38d01 Author: Nicholas Piggin Date: Wed May 25 12:23:58 2022 +1000 powerpc/64s: Remove spurious fault flushing for NMMU Commit 6d8278c414cb2 ("powerpc/64s/radix: do not flush TLB on spurious fault") removed the TLB flush for spurious faults, except when a coprocessor (nest MMU) maps the address space. This is not needed because the NMMU workaround in the PTE permission upgrade paths prevents PTEs existing with less restrictive access permissions than their corresponding TLB entries have. Remove it and replace with a comment. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220525022358.780745-4-npiggin@gmail.com arch/powerpc/include/asm/book3s/64/tlbflush.h | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) commit 2a8a0f420f74425bf5f80760fd14d7a2c3abb87d Author: Nicholas Piggin Date: Wed May 25 12:23:57 2022 +1000 powerpc/64s: POWER10 nest MMU can upgrade PTE access authority without TLB flush The nest MMU in POWER9 does not re-fetch the PTE in response to permission mismatch, contrary to the architecture[*] and unlike the core MMU. This requires a TLB flush before upgrading permissions of valid PTEs, for any address space with a coprocessor attached. Per (non-public) Nest MMU Workbook, POWER10 nest MMU conforms to the architecture in this regard, so skip the workaround. [*] See: Power ISA Version 3.1B, 6.10.1.2 Modifying a Translation Table Entry, Setting a Reference or Change Bit or Upgrading Access Authority (PTE Subject to Atomic Hardware Updates): "If the only change being made to a valid PTE that is subject to atomic hardware updates is to set the Reference or Change bit to 1 or to upgrade access authority, a simpler sequence suffices because the translation hardware will refetch the PTE if an access is attempted for which the only problems were reference and/or change bits needing to be set or insufficient access authority." Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220525022358.780745-3-npiggin@gmail.com arch/powerpc/mm/book3s64/radix_hugetlbpage.c | 10 ++++---- arch/powerpc/mm/book3s64/radix_pgtable.c | 35 +++++++++++++++++----------- 2 files changed, 28 insertions(+), 17 deletions(-) commit abf0878ce95f8a9b47d8ecf2de1d4617bec21711 Author: Nicholas Piggin Date: Wed May 25 12:23:56 2022 +1000 powerpc/64s: POWER10 nest MMU does not require flush escalation workaround Per (non-public) Nest MMU Workbook, POWER10 and POWER9P NMMU does not cache PTEs in PWC, so does not require PWC flush to invalidate these translations. Skip the workaround on POWER10 and later. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220525022358.780745-2-npiggin@gmail.com arch/powerpc/mm/book3s64/radix_tlb.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit ef1911c6d26678b0e91fea33f076e98925997f0c Author: Nicholas Piggin Date: Fri Jul 15 11:26:36 2022 +1000 powerpc: add documentation for HWCAPs Take the arm64 HWCAP documentation file and adjust it for powerpc. Signed-off-by: Nicholas Piggin Reviewed-by: Segher Boessenkool [mpe: Fix ARCH_2_05 comment, as noticed by Tulio.] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220715012636.165948-1-npiggin@gmail.com Documentation/powerpc/elf_hwcaps.rst | 234 +++++++++++++++++++++++++++++++++++ 1 file changed, 234 insertions(+) commit 28f07fab26319dacc5675ae01dfc84d82122c59b Author: Nicholas Piggin Date: Fri May 20 22:36:49 2022 +1000 powerpc/vdso: Fix __kernel_sync_dicache sequence with coherent icache Processors with coherent icache require the sequence sync ; icbi ; isync to entire store->execute coherency. icbi (to any address) must be executed to ensure isync flushes the pipeline. See "POWER9 Processor User's Manual, 4.6.2.2 Instruction Cache Block Invalidate (icbi)" for details. __kernel_sync_dicache is missing icbi for the coherent icache path. Add it. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220520123649.258440-1-npiggin@gmail.com arch/powerpc/kernel/vdso/cacheflush.S | 1 + 1 file changed, 1 insertion(+) commit 5663568130825458a2a8535ccef0db9a1bf7be82 Author: Pali Rohár Date: Wed Jul 6 12:43:08 2022 +0200 powerpc/pci: Add config option for using all 256 PCI buses By default on PPC32 PCI bus numbers are unique across all PCI domains. So a system could have only 256 PCI buses independently of available PCI domains. This is due to filling DT property pci-OF-bus-map which does not support a multi-domain setup. On all powerpc platforms except chrp and powermac there is no DT property pci-OF-bus-map anymore and therefore it is possible on non-chrp/powermac platforms to avoid this limitation of maximum number of 256 PCI buses in a system even on multi-domain setup. But avoiding this limitation would mean that all PCI and PCIe devices would be present on completely different BDF addresses as every PCI domain starts numbering PCI bueses from zero (instead of the last bus number of previous enumerated PCI domain). Such change could break existing software which expects fixed PCI bus numbers. So add a new config option CONFIG_PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT which enables this change. By default it is disabled. It causes the initial value of hose->first_busno to be zero. Signed-off-by: Pali Rohár [mpe: Minor change log wording] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220706104308.5390-6-pali@kernel.org arch/powerpc/Kconfig | 11 +++++++++++ arch/powerpc/kernel/pci_32.c | 6 ++++++ 2 files changed, 17 insertions(+) commit 7f102d61983275ab68b5ac2715afa35c5f4ffd86 Author: Pali Rohár Date: Wed Jul 6 12:43:07 2022 +0200 powerpc/pci: Disable filling pci-OF-bus-map for non-chrp/powermac Creating or filling pci-OF-bus-map property in the device-tree is deprecated since May 2006 [1] and was used only in old platforms like PowerMac. Currently kernel code handles it only for chrp and powermac code. So completely disable filling pci-OF-bus-map property for non-chrp and non-powermac platforms. [1] - https://lore.kernel.org/linuxppc-dev/1148016268.13249.14.camel@localhost.localdomain/ Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220706104308.5390-5-pali@kernel.org arch/powerpc/kernel/pci_32.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 704544588735b2e1115212dbba1c210b3687ff7a Author: Pali Rohár Date: Wed Jul 6 12:43:06 2022 +0200 powerpc/pci: Hide pci_create_OF_bus_map() for non-chrp code Function pci_create_OF_bus_map() is used only in chrp code. So hide it from all other platforms. Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220706104308.5390-4-pali@kernel.org arch/powerpc/include/asm/pci-bridge.h | 2 ++ arch/powerpc/kernel/pci_32.c | 2 ++ 2 files changed, 4 insertions(+) commit 407a767182d3dc87176aabddd7c109b36a5727e9 Author: Pali Rohár Date: Wed Jul 6 12:43:05 2022 +0200 powerpc/pci: Make pcibios_make_OF_bus_map() static Function pcibios_make_OF_bus_map() is used only in pci_32.c. So make it static. Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220706104308.5390-3-pali@kernel.org arch/powerpc/kernel/pci_32.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a2954a7e47b60bb8d8c51f1b4d55af7585a4108a Author: Pali Rohár Date: Wed Jul 6 12:43:04 2022 +0200 powerpc/pci: Hide pci_device_from_OF_node() for non-powermac code Function pci_device_from_OF_node() is used only in powermac code. So hide it from all other platforms. Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220706104308.5390-2-pali@kernel.org arch/powerpc/include/asm/pci-bridge.h | 2 ++ arch/powerpc/kernel/pci_32.c | 2 ++ arch/powerpc/kernel/pci_64.c | 2 ++ 3 files changed, 6 insertions(+) commit 0531a4abd1c6c2e270f5ac6fc725ff550fcd14ab Author: Pali Rohár Date: Wed Jul 13 15:44:29 2022 +0200 powerpc: dts: turris1x.dts: Add CPLD reboot node CPLD firmware can reset board by writing value 0x01 at CPLD memory offset 0x0d. Define syscon-reboot node for this reset support. Fixes: 54c15ec3b738 ("powerpc: dts: Add DTS file for CZ.NIC Turris 1.x routers") Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220713134429.18748-1-pali@kernel.org arch/powerpc/boot/dts/turris1x.dts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 0c551abfa004ce154d487d91777bf221c808a64f Author: Pali Rohár Date: Wed Jul 6 12:10:43 2022 +0200 powerpc/fsl-pci: Fix Class Code of PCIe Root Port By default old pre-3.0 Freescale PCIe controllers reports invalid PCI Class Code 0x0b20 for PCIe Root Port. It can be seen by lspci -b output on P2020 board which has this pre-3.0 controller: $ lspci -bvnn 00:00.0 Power PC [0b20]: Freescale Semiconductor Inc P2020E [1957:0070] (rev 21) !!! Invalid class 0b20 for header type 01 Capabilities: [4c] Express Root Port (Slot-), MSI 00 Fix this issue by programming correct PCI Class Code 0x0604 for PCIe Root Port to the Freescale specific PCIe register 0x474. With this change lspci -b output is: $ lspci -bvnn 00:00.0 PCI bridge [0604]: Freescale Semiconductor Inc P2020E [1957:0070] (rev 21) (prog-if 00 [Normal decode]) Capabilities: [4c] Express Root Port (Slot-), MSI 00 Without any "Invalid class" error. So class code was properly reflected into standard (read-only) PCI register 0x08. Same fix is already implemented in U-Boot pcie_fsl.c driver in commit: http://source.denx.de/u-boot/u-boot/-/commit/d18d06ac35229345a0af80977a408cfbe1d1015b Fix activated by U-Boot stay active also after booting Linux kernel. But boards which use older U-Boot version without that fix are affected and still require this fix. So implement this class code fix also in kernel fsl_pci.c driver. Cc: stable@vger.kernel.org Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220706101043.4867-1-pali@kernel.org arch/powerpc/sysdev/fsl_pci.c | 8 ++++++++ arch/powerpc/sysdev/fsl_pci.h | 1 + 2 files changed, 9 insertions(+) commit 9257971377e2fe6e82f41f688651a82a2f160a88 Author: Masahiro Yamada Date: Mon Jul 25 10:56:19 2022 +0900 powerpc/purgatory: Omit use of bin2c The .incbin assembler directive is much faster than bin2c + $(CC). Do similar refactoring as in commit 4c0f032d4963 ("s390/purgatory: Omit use of bin2c"). Please note the .quad directive matches to size_t in C (both 8 byte) because the purgatory is compiled only for the 64-bit kernel. (KEXEC_FILE depends on PPC64). Signed-off-by: Masahiro Yamada Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220725015619.618070-1-masahiroy@kernel.org arch/powerpc/Kconfig | 1 - arch/powerpc/purgatory/.gitignore | 1 - arch/powerpc/purgatory/Makefile | 8 ++------ arch/powerpc/purgatory/kexec-purgatory.S | 14 ++++++++++++++ scripts/remove-stale-files | 2 ++ 5 files changed, 18 insertions(+), 8 deletions(-) commit 118b1366930c8c833b8b36abef657f40d4e26610 Author: Laurent Dufour Date: Wed Jul 13 17:47:29 2022 +0200 powerpc/pseries/mobility: set NMI watchdog factor during an LPM During an LPM, while the memory transfer is in progress on the arrival side, some latencies are generated when accessing not yet transferred pages on the arrival side. Thus, the NMI watchdog may be triggered too frequently, which increases the risk to hit an NMI interrupt in a bad place in the kernel, leading to a kernel panic. Disabling the Hard Lockup Watchdog until the memory transfer could be a too strong work around, some users would want this timeout to be eventually triggered if the system is hanging even during an LPM. Introduce a new sysctl variable nmi_watchdog_factor. It allows to apply a factor to the NMI watchdog timeout during an LPM. Just before the CPUs are stopped for the switchover sequence, the NMI watchdog timer is set to watchdog_thresh + factor% A value of 0 has no effect. The default value is 200, meaning that the NMI watchdog is set to 30s during LPM (based on a 10s watchdog_thresh value). Once the memory transfer is achieved, the factor is reset to 0. Setting this value to a high number is like disabling the NMI watchdog during an LPM. Signed-off-by: Laurent Dufour Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220713154729.80789-5-ldufour@linux.ibm.com Documentation/admin-guide/sysctl/kernel.rst | 12 ++++++++ arch/powerpc/platforms/pseries/mobility.c | 43 +++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) commit f5e74e836097d1004077390717d4bd95d4a2c27a Author: Laurent Dufour Date: Wed Jul 13 17:47:28 2022 +0200 powerpc/watchdog: introduce a NMI watchdog's factor Introduce a factor which would apply to the NMI watchdog timeout. This factor is a percentage added to the watchdog_tresh value. The value is set under the watchdog_mutex protection and lockup_detector_reconfigure() is called to recompute wd_panic_timeout_tb. Once the factor is set, it remains until it is set back to 0, which means no impact. Signed-off-by: Laurent Dufour Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220713154729.80789-4-ldufour@linux.ibm.com arch/powerpc/include/asm/nmi.h | 2 ++ arch/powerpc/kernel/watchdog.c | 21 ++++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) commit 7c56a8733d0a2a4be2438a7512566e5ce552fccf Author: Laurent Dufour Date: Wed Jul 13 17:47:27 2022 +0200 watchdog: export lockup_detector_reconfigure In some circumstances it may be interesting to reconfigure the watchdog from inside the kernel. On PowerPC, this may helpful before and after a LPAR migration (LPM) is initiated, because it implies some latencies, watchdog, and especially NMI watchdog is expected to be triggered during this operation. Reconfiguring the watchdog with a factor, would prevent it to happen too frequently during LPM. Rename lockup_detector_reconfigure() as __lockup_detector_reconfigure() and create a new function lockup_detector_reconfigure() calling __lockup_detector_reconfigure() under the protection of watchdog_mutex. Signed-off-by: Laurent Dufour [mpe: Squash in build fix from Laurent, reported by Sachin] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220713154729.80789-3-ldufour@linux.ibm.com include/linux/nmi.h | 2 ++ kernel/watchdog.c | 21 ++++++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) commit 9d8dd3725f4032f94d9cf65304559e0780e04ad7 Merge: a6e6231ac10a b4b97079a49e Author: Marc Kleine-Budde Date: Wed Jul 27 13:09:39 2022 +0200 Merge patch series "can: export export slcan_ethtool_ops and remove setter functions" Vincent Mailhol says: ==================== The c_can, flexcan and slcan use a setter function to populate net_device::ethtool_ops. Using a setter here add one additional function call and add some small bloat in the object file. Exporting the structure allow to remove this setter. The mcp251xfd uses a similar pattern except that it does some additional initialization. As such, this driver is left untouched. * Statistics * For the slcan driver, this patch reduces the object file by 14 bytes (details in the first patch). Although we did not conduct a benchmark for the other drivers but we expect the exact same figures. ==================== Link: https://lore.kernel.org/all/20220727104939.279022-1-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde commit b4b97079a49ec81fa2236fb2ebbba867fff5d4ba Author: Vincent Mailhol Date: Wed Jul 27 19:49:39 2022 +0900 can: flexcan: export flexcan_ethtool_ops and remove flexcan_set_ethtool_ops() The function flexcan_set_ethtool_ops() does one thing: populate net_device::ethtool_ops. Instead, it is possible to directly assign this field and remove one function call and slightly reduce the object size. To do so, export flexcan_ethtool_ops so it becomes visible to flexcan-core.c. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220727104939.279022-4-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan/flexcan-core.c | 2 +- drivers/net/can/flexcan/flexcan-ethtool.c | 7 +------ drivers/net/can/flexcan/flexcan.h | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) commit 0ccb3e0b0a001c9de1e039bef43040351df9b8aa Author: Vincent Mailhol Date: Wed Jul 27 19:49:38 2022 +0900 can: c_can: export c_can_ethtool_ops and remove c_can_set_ethtool_ops() The function c_can_set_ethtool_ops() does one thing: populate net_device::ethtool_ops. Instead, it is possible to directly assign this field and remove one function call and slightly reduce the object size. To do so, export c_can_ethtool_ops so it becomes visible to c_can_main.c. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220727104939.279022-3-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/c_can/c_can.h | 2 +- drivers/net/can/c_can/c_can_ethtool.c | 7 +------ drivers/net/can/c_can/c_can_main.c | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) commit 1851532fd39c674906f83b431650c73e065c4a77 Author: Vincent Mailhol Date: Wed Jul 27 19:49:37 2022 +0900 can: slcan: export slcan_ethtool_ops and remove slcan_set_ethtool_ops() The function slcan_set_ethtool_ops() does one thing: populate net_device::ethtool_ops. Instead, it is possible to directly assign this field and remove one function call and slightly reduce the object size. To do so, export slcan_ethtool_ops so it becomes visible to sclan-core.c. This patch reduces the footprint by 14 bytes: | $ ./scripts/bloat-o-meter drivers/net/can/slcan/slcan.{old,new}.o | drivers/net/can/slcan/slcan.o | add/remove: 0/1 grow/shrink: 1/0 up/down: 15/-29 (-14) | Function old new delta | slcan_open 1010 1025 +15 | slcan_set_ethtool_ops 29 - -29 | Total: Before=11115, After=11101, chg -0.13% Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220727104939.279022-2-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 2 +- drivers/net/can/slcan/slcan-ethtool.c | 7 +------ drivers/net/can/slcan/slcan.h | 3 ++- 3 files changed, 4 insertions(+), 8 deletions(-) commit 8a7a5c0251e19ae7a288c94ab8de8d6302b98927 Author: Zhang Jiaming Date: Wed Jun 22 16:25:24 2022 +0800 wifi: rtlwifi: Remove duplicate word and Fix typo Remove duplicate 'in'. Change 'entrys' to 'entries'. Signed-off-by: Zhang Jiaming Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220622082524.21304-1-jiaming@nfschina.com drivers/net/wireless/realtek/rtlwifi/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 403fcb5118a0f4091001a537e76923031fb45eaf Author: Claudiu Beznea Date: Wed Jul 27 12:08:14 2022 +0300 ASoC: mchp-spdiftx: remove references to mchp_i2s_caps Remove references to struct mchp_i2s_caps as they are not used. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220727090814.2446111-3-claudiu.beznea@microchip.com Signed-off-by: Mark Brown sound/soc/atmel/mchp-spdiftx.c | 8 -------- 1 file changed, 8 deletions(-) commit 768ac4f12ca0fda935f58eb8c5120e9d795bc6e3 Author: Claudiu Beznea Date: Wed Jul 27 12:08:13 2022 +0300 ASoC: mchp-spdifrx: disable end of block interrupt on failures Disable end of block interrupt in case of wait for completion timeout or errors to undo previously enable operation (done in mchp_spdifrx_isr_blockend_en()). Otherwise we can end up with an unbalanced reference counter for this interrupt. Fixes: ef265c55c1ac ("ASoC: mchp-spdifrx: add driver for SPDIF RX") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220727090814.2446111-2-claudiu.beznea@microchip.com Signed-off-by: Mark Brown sound/soc/atmel/mchp-spdifrx.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 08df8fbeb24114eaa9aa0f55b3555f7b2b9cefff Author: Jason Wang Date: Fri Jul 15 13:00:53 2022 +0800 wifi: mwifiex: Fix comment typo The double `the' is duplicated in line 1540, remove one. Signed-off-by: Jason Wang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220715050053.24382-1-wangborong@cdjrlc.com Link: https://lore.kernel.org/r/20220722083031.74847-1-slark_xiao@163.com Link: https://lore.kernel.org/r/20220722084158.75647-1-slark_xiao@163.com Link: https://lore.kernel.org/r/20220722084833.76159-1-slark_xiao@163.com drivers/net/wireless/marvell/mwifiex/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2ce2145f7f3c1e92b9adceb729756a8be7ca145 Author: Li Qiong Date: Mon Jun 6 21:54:49 2022 +0800 wifi: mwl8k: use time_after to replace "jiffies > a" time_after deals with timer wrapping correctly. Signed-off-by: Li Qiong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220606135449.23256-1-liqiong@nfschina.com Link: https://lore.kernel.org/r/20220618131305.13101-1-wangxiang@cdjrlc.com Link: https://lore.kernel.org/r/20220715050016.24164-1-wangborong@cdjrlc.com drivers/net/wireless/marvell/mwl8k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14a3aacf517a9de725dd3219dbbcf741e31763c4 Author: Jose Ignacio Tornos Martinez Date: Tue Jul 19 17:35:42 2022 +0200 wifi: iwlwifi: mvm: fix double list_add at iwl_mvm_mac_wake_tx_queue After successfull station association, if station queues are disabled for some reason, the related lists are not emptied. So if some new element is added to the list in iwl_mvm_mac_wake_tx_queue, it can match with the old one and produce a BUG like this: [ 46.535263] list_add corruption. prev->next should be next (ffff94c1c318a360), but was 0000000000000000. (prev=ffff94c1d02d3388). [ 46.535283] ------------[ cut here ]------------ [ 46.535284] kernel BUG at lib/list_debug.c:26! [ 46.535290] invalid opcode: 0000 [#1] PREEMPT SMP PTI [ 46.585304] CPU: 0 PID: 623 Comm: wpa_supplicant Not tainted 5.19.0-rc3+ #1 [ 46.592380] Hardware name: Dell Inc. Inspiron 660s/0478VN , BIOS A07 08/24/2012 [ 46.600336] RIP: 0010:__list_add_valid.cold+0x3d/0x3f [ 46.605475] Code: f2 4c 89 c1 48 89 fe 48 c7 c7 c8 40 67 93 e8 20 cc fd ff 0f 0b 48 89 d1 4c 89 c6 4c 89 ca 48 c7 c7 70 40 67 93 e8 09 cc fd ff <0f> 0b 48 89 fe 48 c7 c7 00 41 67 93 e8 f8 cb fd ff 0f 0b 48 89 d1 [ 46.624469] RSP: 0018:ffffb20800ab76d8 EFLAGS: 00010286 [ 46.629854] RAX: 0000000000000075 RBX: ffff94c1c318a0e0 RCX: 0000000000000000 [ 46.637105] RDX: 0000000000000201 RSI: ffffffff9365e100 RDI: 00000000ffffffff [ 46.644356] RBP: ffff94c1c5f43370 R08: 0000000000000075 R09: 3064316334396666 [ 46.651607] R10: 3364323064316334 R11: 39666666663d7665 R12: ffff94c1c5f43388 [ 46.658857] R13: ffff94c1d02d3388 R14: ffff94c1c318a360 R15: ffff94c1cf2289c0 [ 46.666108] FS: 00007f65634ff7c0(0000) GS:ffff94c1da200000(0000) knlGS:0000000000000000 [ 46.674331] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 46.680170] CR2: 00007f7dfe984460 CR3: 000000010e894003 CR4: 00000000000606f0 [ 46.687422] Call Trace: [ 46.689906] [ 46.691950] iwl_mvm_mac_wake_tx_queue+0xec/0x15c [iwlmvm] [ 46.697601] ieee80211_queue_skb+0x4b3/0x720 [mac80211] [ 46.702973] ? sta_info_get+0x46/0x60 [mac80211] [ 46.707703] ieee80211_tx+0xad/0x110 [mac80211] [ 46.712355] __ieee80211_tx_skb_tid_band+0x71/0x90 [mac80211] ... In order to avoid this problem, we must also remove the related lists when station queues are disabled. Fixes: cfbc6c4c5b91c ("iwlwifi: mvm: support mac80211 TXQs model") Reported-by: Takayuki Nagata Reported-by: Petr Stourac Tested-by: Petr Stourac Signed-off-by: Jose Ignacio Tornos Martinez Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220719153542.81466-1-jtornosm@redhat.com drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 1 + 1 file changed, 1 insertion(+) commit 7819b3d1dab585602905b7a213ad17ec6de6b005 Author: Justin Stitt Date: Mon Jul 11 15:29:19 2022 -0700 wifi: iwlwifi: mvm: fix clang -Wformat warnings When building with Clang we encounter these warnings: | drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c:1108:47: error: | format specifies type 'unsigned char' but the argument has type 's16' | (aka 'short') [-Werror,-Wformat] IWL_DEBUG_INFO(mvm, "\tburst index: | %hhu\n", res->ftm.burst_index); - | drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c:1111:47: error: | format specifies type 'unsigned char' but the argument has type 's32' | (aka 'int') [-Werror,-Wformat] IWL_DEBUG_INFO(mvm, "\trssi spread: | %hhu\n", res->ftm.rssi_spread); The previous format specifier `%hhu` describes a u8 but our arguments are wider than this which means bits are potentially being lost. Variadic functions (printf-like) undergo default argument promotion. Documentation/core-api/printk-formats.rst specifically recommends using the promoted-to-type's format flag. As per C11 6.3.1.1: (https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf) `If an int can represent all values of the original type ..., the value is converted to an int; otherwise, it is converted to an unsigned int. These are called the integer promotions.` Thus it makes sense to change `%hhu` to `%d` for both instances of the warning. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Justin Stitt Reviewed-by: Nick Desaulniers Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220711222919.2043613-1-justinstitt@google.com drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d578e0af3a003736f6c440188b156483d451b329 Author: Ammar Faizi Date: Mon Jul 25 20:49:11 2022 +0300 wifi: wil6210: debugfs: fix uninitialized variable use in `wil_write_file_wmi()` Commit 7a4836560a61 changes simple_write_to_buffer() with memdup_user() but it forgets to change the value to be returned that came from simple_write_to_buffer() call. It results in the following warning: warning: variable 'rc' is uninitialized when used here [-Wuninitialized] return rc; ^~ Remove rc variable and just return the passed in length if the memdup_user() succeeds. Cc: Dan Carpenter Reported-by: kernel test robot Fixes: 7a4836560a6198d245d5732e26f94898b12eb760 ("wifi: wil6210: debugfs: fix info leak in wil_write_file_wmi()") Fixes: ff974e4083341383d3dd4079e52ed30f57f376f0 ("wil6210: debugfs interface to send raw WMI command") Signed-off-by: Ammar Faizi Reviewed-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220724202452.61846-1-ammar.faizi@intel.com drivers/net/wireless/ath/wil6210/debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 169ede1f594809d1f0f46d95c071d672dbfc0eb1 Author: Kalle Valo Date: Mon Jul 25 20:49:10 2022 +0300 Revert "ath11k: add support for hardware rfkill for QCA6390" This reverts commit ec038c6127fa772d2c5604e329f22371830d5fa6. Tyler reported that on L390 Yoga Thinkpad with QCA6390 the suspend was failing because of this commit. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9 Link: https://bugzilla.kernel.org/show_bug.cgi?id=215881 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220708164656.29549-1-kvalo@kernel.org drivers/net/wireless/ath/ath11k/core.c | 73 ---------------------------------- drivers/net/wireless/ath/ath11k/core.h | 4 -- drivers/net/wireless/ath/ath11k/hw.h | 3 -- drivers/net/wireless/ath/ath11k/mac.c | 58 --------------------------- drivers/net/wireless/ath/ath11k/mac.h | 2 - drivers/net/wireless/ath/ath11k/wmi.c | 41 ------------------- drivers/net/wireless/ath/ath11k/wmi.h | 25 ------------ 7 files changed, 206 deletions(-) commit 867f4eeee862d6568a0f142d6a38f8bb724ff80e Author: Manikanta Pubbisetty Date: Mon Jul 25 20:49:10 2022 +0300 wifi: ath11k: Fix register write failure on QCN9074 Commit 56c8ccf331bd ("ath11k: Add register access logic for WCN6750") regressed QCN9074. With the above mentioned commit, writes are failing for some registers on QCN9074 although the device seems to work normally. ath11k_pci 0000:03:00.0: failed to set pcie link register0x01e0e0a8: 0xffffffff != 0x00000010 ath11k_pci 0000:03:00.0: failed to set sysclk: -110 PCIe devices in ath11k (QCA6390, WCN6855, QCN9074, WCN6750) use window concept for register accesses. There are two schemes, dynamic & static window. In dynamic window scheme, a single window(region in the BAR) is mapped either to CE or DP register windows at any give time. QCA6390 & WCN6855 follow this scheme for register accesses. In static window scheme, CE & DP register windows are statically mapped to separate regions with in the BAR so that there is no switching of register windows between CE & DP register accesses. QCN9074 & WCN6750 follow this scheme although the window start offsets are different for QCN9074 & WCN6750. QCN9074 uses 3rd & 2nd window for DP & CE register accesses respectively whereas WCN6750 uses 1st & 2nd window for DP & CE. In QCN9074, along with 2nd & 3rd windows, 1st window is also used for certain configurations which commit 56c8ccf331bd ("ath11k: Add register access logic for WCN6750") did not account for and hence the regression. Fix this by going back to the original way of accessing the registers on QCN9074. Since this diverges from WCN6750 way of accessing registers, it is required to register window_read32/window_write32() pci_ops for WCN6750. We can also get rid of dp_window_idx & ce_window_idx members in hw_params, so remove them. Also add a new API ath11k_pcic_register_pci_ops() for registering pci_ops to the ath11k core. This API checks for mandatory pci_ops() and reports error if those are missing. Also initialize unused pci_ops to NULL. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1 Fixes: 56c8ccf331bd ("ath11k: Add register access logic for WCN6750") Reported-by: Maxime Bizon Tested-by: Maxime Bizon Signed-off-by: Manikanta Pubbisetty Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220608062954.27792-1-quic_mpubbise@quicinc.com drivers/net/wireless/ath/ath11k/ahb.c | 52 ++++++++++++++++++++++++- drivers/net/wireless/ath/ath11k/core.c | 14 ------- drivers/net/wireless/ath/ath11k/hw.h | 2 - drivers/net/wireless/ath/ath11k/pci.c | 70 ++++++++++++++++++++++++++-------- drivers/net/wireless/ath/ath11k/pcic.c | 57 ++++++++++----------------- drivers/net/wireless/ath/ath11k/pcic.h | 2 + 6 files changed, 128 insertions(+), 69 deletions(-) commit 247861c325c2e4f5ad3c2f9a77ab9d85d15cbcfc Author: Daniil Lunev Date: Wed Jul 27 16:44:25 2022 +1000 fuse: retire block-device-based superblock on force unmount Force unmount of FUSE severes the connection with the user space, even if there are still open files. Subsequent remount tries to re-use the superblock held by the open files, which is meaningless in the FUSE case after disconnect - reused super block doesn't have userspace counterpart attached to it and is incapable of doing any IO. This patch adds the functionality only for the block-device-based supers, since the primary use case of the feature is to gracefully handle force unmount of external devices, mounted with FUSE. This can be further extended to cover all superblocks, if the need arises. Signed-off-by: Daniil Lunev Signed-off-by: Miklos Szeredi fs/fuse/inode.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 04b9407197789c81fffac52921e703cb47967d6a Author: Daniil Lunev Date: Wed Jul 27 16:44:24 2022 +1000 vfs: function to prevent re-use of block-device-based superblocks The function is to be called from filesystem-specific code to mark a superblock to be ignored by superblock test and thus never re-used. The function also unregisters bdi if the bdi is per-superblock to avoid collision if a new superblock is created to represent the filesystem. generic_shutdown_super() skips unregistering bdi for a retired superlock as it assumes retire function has already done it. This patch adds the functionality only for the block-device-based supers, since the primary use case of the feature is to gracefully handle force unmount of external devices, mounted with FUSE. This can be further extended to cover all superblocks, if the need arises. Signed-off-by: Daniil Lunev Reviewed-by: Christoph Hellwig Signed-off-by: Miklos Szeredi fs/super.c | 33 +++++++++++++++++++++++++++++++-- include/linux/fs.h | 2 ++ 2 files changed, 33 insertions(+), 2 deletions(-) commit 1e75550648da1fa1cd1969e7597355de8fe8caf6 Author: Li Zhijian Date: Tue Jul 26 03:16:26 2022 +0000 Revert "RDMA/rxe: Create duplicate mapping tables for FMRs" Below 2 commits will be reverted: commit 8ff5f5d9d8cf ("RDMA/rxe: Prevent double freeing rxe_map_set()") commit 647bf13ce944 ("RDMA/rxe: Create duplicate mapping tables for FMRs") The community has a few bug reports which pointed this commit at last. Some proposals are raised up in the meantime but all of them have no follow-up operation. The previous commit led the map_set of FMR to be not available any more if the MR is registered again after invalidating. Although the mentioned patch try to fix a potential race in building/accessing the same table for fast memory regions, it broke rtrs etc ULPs. Since the latter could be worse, revert this patch. With previous commit, it's observed that a same MR in rnbd server will trigger below code path: -> rxe_mr_init_fast() |-> alloc map_set() # map_set is uninitialized |...-> rxe_map_mr_sg() # build the map_set |-> rxe_mr_set_page() |...-> rxe_reg_fast_mr() # mr->state change to VALID from FREE that means # we can access host memory(such rxe_mr_copy) |...-> rxe_invalidate_mr() # mr->state change to FREE from VALID |...-> rxe_reg_fast_mr() # mr->state change to VALID from FREE, # but map_set was not built again |...-> rxe_mr_copy() # kernel crash due to access wild addresses # that lookup from the map_set The backtraces are not always identical. [1st]---------- RIP: 0010:lookup_iova+0x66/0xa0 [rdma_rxe] Code: 00 00 00 48 d3 ee 89 32 c3 4c 8b 18 49 8b 3b 48 8b 47 08 48 39 c6 72 38 48 29 c6 45 31 d2 b8 01 00 00 00 48 63 c8 48 c1 e1 04 <48> 8b 4c 0f 08 48 39 f1 77 21 83 c0 01 48 29 ce 3d 00 01 00 00 75 RSP: 0018:ffffb7ff80063bf0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff9b9949d86800 RCX: 0000000000000000 RDX: ffffb7ff80063c00 RSI: 0000000049f6b378 RDI: 002818da00000004 RBP: 0000000000000120 R08: ffffb7ff80063c08 R09: ffffb7ff80063c04 R10: 0000000000000002 R11: ffff9b9916f7eef8 R12: ffff9b99488a0038 R13: ffff9b99488a0038 R14: ffff9b9914fb346a R15: ffff9b990ab27000 FS: 0000000000000000(0000) GS:ffff9b997dc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007efc33a98ed0 CR3: 0000000014f32004 CR4: 00000000001706f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: rxe_mr_copy.part.0+0x6f/0x140 [rdma_rxe] rxe_responder+0x12ee/0x1b60 [rdma_rxe] ? rxe_icrc_check+0x7e/0x100 [rdma_rxe] ? rxe_rcv+0x1d0/0x780 [rdma_rxe] ? rxe_icrc_hdr.isra.0+0xf6/0x160 [rdma_rxe] rxe_do_task+0x67/0xb0 [rdma_rxe] rxe_xmit_packet+0xc7/0x210 [rdma_rxe] rxe_requester+0x680/0xee0 [rdma_rxe] ? update_load_avg+0x5f/0x690 ? update_load_avg+0x5f/0x690 ? rtrs_clt_recv_done+0x1b/0x30 [rtrs_client] [2nd]---------- RIP: 0010:rxe_mr_copy.part.0+0xa8/0x140 [rdma_rxe] Code: 00 00 49 c1 e7 04 48 8b 00 4c 8d 2c d0 48 8b 44 24 10 4d 03 7d 00 85 ed 7f 10 eb 6c 89 54 24 0c 49 83 c7 10 31 c0 85 ed 7e 5e <49> 8b 3f 8b 14 24 4c 89 f6 48 01 c7 85 d2 74 06 48 89 fe 4c 89 f7 RSP: 0018:ffffae3580063bf8 EFLAGS: 00010202 RAX: 0000000000018978 RBX: ffff9d7ef7a03600 RCX: 0000000000000008 RDX: 000000000000007c RSI: 000000000000007c RDI: ffff9d7ef7a03600 RBP: 0000000000000120 R08: ffffae3580063c08 R09: ffffae3580063c04 R10: ffff9d7efece0038 R11: ffff9d7ec4b1db00 R12: ffff9d7efece0038 R13: ffff9d7ef4098260 R14: ffff9d7f11e23c6a R15: 4c79500065708144 FS: 0000000000000000(0000) GS:ffff9d7f3dc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fce47276c60 CR3: 0000000003f66004 CR4: 00000000001706f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: rxe_responder+0x12ee/0x1b60 [rdma_rxe] ? rxe_icrc_check+0x7e/0x100 [rdma_rxe] ? rxe_rcv+0x1d0/0x780 [rdma_rxe] ? rxe_icrc_hdr.isra.0+0xf6/0x160 [rdma_rxe] rxe_do_task+0x67/0xb0 [rdma_rxe] rxe_xmit_packet+0xc7/0x210 [rdma_rxe] rxe_requester+0x680/0xee0 [rdma_rxe] ? update_load_avg+0x5f/0x690 ? update_load_avg+0x5f/0x690 ? rtrs_clt_recv_done+0x1b/0x30 [rtrs_client] rxe_do_task+0x67/0xb0 [rdma_rxe] tasklet_action_common.constprop.0+0x92/0xc0 __do_softirq+0xe1/0x2d8 run_ksoftirqd+0x21/0x30 smpboot_thread_fn+0x183/0x220 ? sort_range+0x20/0x20 kthread+0xe2/0x110 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x22/0x30 Link: https://lore.kernel.org/r/1658805386-2-1-git-send-email-lizhijian@fujitsu.com Link: https://lore.kernel.org/all/20220210073655.42281-1-guoqing.jiang@linux.dev/T/ Link: https://www.spinics.net/lists/linux-rdma/msg110836.html Link: https://lore.kernel.org/lkml/94a5ea93-b8bb-3a01-9497-e2021f29598a@linux.dev/t/ Tested-by: Md Haris Iqbal Reviewed-by: Bob Pearson Signed-off-by: Li Zhijian Signed-off-by: Leon Romanovsky drivers/infiniband/sw/rxe/rxe_loc.h | 1 - drivers/infiniband/sw/rxe/rxe_mr.c | 199 +++++++++++----------------------- drivers/infiniband/sw/rxe/rxe_mw.c | 6 +- drivers/infiniband/sw/rxe/rxe_verbs.c | 39 +++++-- drivers/infiniband/sw/rxe/rxe_verbs.h | 21 ++-- 5 files changed, 104 insertions(+), 162 deletions(-) commit 8a4e6154fb17b691917dcf7f4b0cc1d2fb8d46c6 Author: Marco Felsch Date: Mon May 30 11:22:26 2022 +0200 reset: tps380x: Add TPS380x device driver supprt The TI TPS380x family [1] is a voltage supervisor with a dedicated manual reset (mr) line input and a reset output. The chip(s) have a build in reset delay, depending on the chip partnumber. This simple driver addresses this so the cosumer don't need to care about it. [1] https://www.ti.com/product/TPS3801 Signed-off-by: Marco Felsch [p.zabel@pengutronix.de: drop Todo comment about min/typ/max reset time] Signed-off-by: Philipp Zabel Link: https://lore.kernel.org/r/20220530092226.748644-2-m.felsch@pengutronix.de drivers/reset/Kconfig | 8 +++ drivers/reset/Makefile | 1 + drivers/reset/reset-tps380x.c | 126 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 135 insertions(+) commit 2f0f6b176e083b08667b22d52eaf56d8403ff6f4 Merge: 060468f0ddbb f3d890f5f90e Author: David S. Miller Date: Wed Jul 27 09:39:17 2022 +0100 Merge branch 'dsa-microchip-phylink-mac-config' Arun Ramadoss says: ==================== net: dsa: microchip: add support for phylink mac config and link up This patch series add support common phylink mac config and link up for the ksz series switches. At present, ksz8795 and ksz9477 doesn't implement the phylink mac config and link up. It configures the mac interface in the port setup hook. ksz8830 series switch does not mac link configuration. For lan937x switches, in the part support patch series has support only for MII and RMII configuration. Some group of switches have some register address and bit fields common and others are different. So, this patch aims to have common phylink implementation which configures the register based on the chip id. Changes in v2 - combined the modification of duplex, tx_pause and rx_pause into single function. Changes in v1 - Squash the reading rgmii value from dt to patch which apply the rgmii value - Created the new function ksz_port_set_xmii_speed - Seperated the namespace values for xmii_ctrl_0 and xmii_ctrl_1 register - Applied the rgmii delay value based on the rx/tx-internal-delay-ps ==================== Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit f3d890f5f90ebadab82fbfce4bb80aefd97def34 Author: Arun Ramadoss Date: Sun Jul 24 15:08:12 2022 +0530 net: dsa: microchip: add support for phylink mac config This patch add support for phylink mac config for ksz series of switches. All the files ksz8795, ksz9477 and lan937x uses the ksz common xmii function. Instead of calling from the individual files, it is moved to the ksz common phylink mac config function. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8795.c | 7 ------- drivers/net/dsa/microchip/ksz9477.c | 4 ---- drivers/net/dsa/microchip/ksz_common.c | 18 ++++++++++++++++-- drivers/net/dsa/microchip/ksz_common.h | 6 +++++- drivers/net/dsa/microchip/lan937x.h | 3 --- drivers/net/dsa/microchip/lan937x_main.c | 16 ---------------- 6 files changed, 21 insertions(+), 33 deletions(-) commit c476bede4b0f07a26c84e38b0bc34bdaca8135da Author: Arun Ramadoss Date: Sun Jul 24 14:58:22 2022 +0530 net: dsa: microchip: ksz8795: use common xmii function This patch updates the ksz8795 cpu configuration to use the ksz common xmii set functions. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8795.c | 35 +-------------------------------- drivers/net/dsa/microchip/ksz8795_reg.h | 8 -------- 2 files changed, 1 insertion(+), 42 deletions(-) commit 0ab7f6bf1675b5ffbfcd6fffd13be8d98a4d5757 Author: Arun Ramadoss Date: Sun Jul 24 14:58:21 2022 +0530 net: dsa: microchip: ksz9477: use common xmii function In ksz9477.c file, configuring the xmii register is performed based on the flag NEW_XMII. The flag is reset for ksz9893 switch and set for other switch. This patch uses the ksz common xmii set and get function. The bit values are configured based on the chip id. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477.c | 153 ++------------------------------ drivers/net/dsa/microchip/ksz9477_reg.h | 18 ---- drivers/net/dsa/microchip/ksz_common.c | 38 +++++++- drivers/net/dsa/microchip/ksz_common.h | 7 +- 4 files changed, 49 insertions(+), 167 deletions(-) commit b19ac41faa3f9602f245d1ab679f7fa96d388320 Author: Arun Ramadoss Date: Sun Jul 24 14:58:20 2022 +0530 net: dsa: microchip: apply rgmii tx and rx delay in phylink mac config This patch read the rgmii tx and rx delay from device tree and stored it in the ksz_port. It applies the rgmii delay to the xmii tune adjust register based on the interface selected in phylink mac config. There are two rgmii port in LAN937x and value to be loaded in the register vary depends on the port selected. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz_common.c | 53 +++++++++++++++++++++++++++++- drivers/net/dsa/microchip/ksz_common.h | 3 ++ drivers/net/dsa/microchip/lan937x.h | 1 + drivers/net/dsa/microchip/lan937x_main.c | 56 ++++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/lan937x_reg.h | 18 ++++++++++ 5 files changed, 130 insertions(+), 1 deletion(-) commit dc1c596edba5e656256c2d6e6922246c7803f2de Author: Arun Ramadoss Date: Sun Jul 24 14:58:19 2022 +0530 net: dsa: microchip: lan937x: add support for configuing xMII register This patch add the common ksz_set_xmii function for ksz series switch and update the lan937x code phylink mac config. The register address for the ksz8795 is Port 5 Interface control 6 and for all other switch is xMII Control 1. The bit value for selecting the interface is same for KSZ8795 and KSZ9893 are same. The bit values for KSZ9477 and lan973x are same. So, this patch add the bit value for each switches in ksz_chip_data and configure the registers based on the chip id. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz_common.c | 44 ++++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 8 ++++++ drivers/net/dsa/microchip/lan937x_main.c | 32 +---------------------- drivers/net/dsa/microchip/lan937x_reg.h | 9 ------- 4 files changed, 53 insertions(+), 40 deletions(-) commit da8cd08520f3abac9ff288136b70ea991e1ec6ab Author: Arun Ramadoss Date: Sun Jul 24 14:58:18 2022 +0530 net: dsa: microchip: add support for common phylink mac link up This patch add the support for common phylink mac link up for the ksz series switch. The register address, bit position and values are configured based on the chip id to the dev->info structure. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz_common.c | 20 ++++++++++++++++---- drivers/net/dsa/microchip/ksz_common.h | 3 --- drivers/net/dsa/microchip/lan937x.h | 4 ---- drivers/net/dsa/microchip/lan937x_main.c | 22 ---------------------- 4 files changed, 16 insertions(+), 33 deletions(-) commit 8560664fd32aa055b3c128337356e32e8fc25b5a Author: Arun Ramadoss Date: Sun Jul 24 14:58:17 2022 +0530 net: dsa: microchip: add common duplex and flow control function This patch add common function for configuring the Full/Half duplex and transmit/receive flow control. KSZ8795 uses the Global control register 4 for configuring the duplex and flow control, whereas all other KSZ9477 based switch uses the xMII Control 0 register. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477_reg.h | 1 - drivers/net/dsa/microchip/ksz_common.c | 36 ++++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 15 +++++++++++++ drivers/net/dsa/microchip/lan937x_main.c | 25 ++++++---------------- drivers/net/dsa/microchip/lan937x_reg.h | 3 --- 5 files changed, 57 insertions(+), 23 deletions(-) commit aa5b8b73d4bd34618508165bc0e5b7eb4b7c2c20 Author: Arun Ramadoss Date: Sun Jul 24 14:58:16 2022 +0530 net: dsa: microchip: add common ksz port xmii speed selection function This patch adds the function for configuring the 100/10Mbps speed selection for the ksz switches. KSZ8795 switch uses Global control 4 register 0x06 bit 4 for choosing 100/10Mpbs. Other switches uses xMII control 1 0xN300 for it. For KSZ8795, if the bit is set then 10Mbps is chosen and if bit is clear then 100Mbps chosen. For all other switches it is other way around, if the bit is set then 100Mbps is chosen. So, this patch add the generic function for ksz switch to select the 100/10Mbps speed selection. While configuring, first it disables the gigabit functionality and then configure the respective speed. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477_reg.h | 1 - drivers/net/dsa/microchip/ksz_common.c | 54 ++++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 10 ++++++ drivers/net/dsa/microchip/lan937x_main.c | 18 +++-------- drivers/net/dsa/microchip/lan937x_reg.h | 1 - 5 files changed, 69 insertions(+), 15 deletions(-) commit 46f80fa8981bcbb0ab522b34c919d0186a0cff02 Author: Arun Ramadoss Date: Sun Jul 24 14:58:15 2022 +0530 net: dsa: microchip: add common gigabit set and get function This patch add helper function for setting and getting the gigabit enable for the ksz series switch. KSZ8795 switch has different register address compared to all other ksz switches. KSZ8795 series uses the Port 5 Interface control 6 Bit 6 for configuring the 1Gbps or 100/10Mbps speed selection. All other switches uses the xMII control 1 0xN301 register Bit6 for gigabit. Further, for KSZ8795 & KSZ9893 switches if bit 1 then 1Gbps is chosen and if bit 0 then 100/10Mbps is chosen. It is other way around for other switches bit 0 is for 1Gbps. So, this patch implements the common function for configuring the gigabit set and get capability. Signed-off-by: Arun Ramadoss Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477.c | 36 +++---------------- drivers/net/dsa/microchip/ksz9477_reg.h | 4 --- drivers/net/dsa/microchip/ksz_common.c | 61 ++++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 12 +++++++ drivers/net/dsa/microchip/lan937x_main.c | 16 +++------ drivers/net/dsa/microchip/lan937x_reg.h | 1 - 6 files changed, 82 insertions(+), 48 deletions(-) commit ba40a57ff08bf606135866bfe5fddc572089ac16 Author: Christian Brauner Date: Tue Jul 26 16:16:15 2022 +0200 Add Seth Forshee as co-maintainer for idmapped mounts Seth has been integral in the design and implementation of idmapped mounts and was the main architect behind the s_user_ns work which ultimately made filesystems such as FUSE and overlayfs available in containers. He continues to be active in both development and review. I'm very happy he decided to maintain this feature. He has my full trust. Link: https://lore.kernel.org/r/20220726141615.1046027-1-brauner@kernel.org Cc: Seth Forshee Signed-off-by: Christian Brauner (Microsoft) MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit e48ef9a9c52972d14c788d59024dcc7f566ed2c9 Author: Krzysztof Kozlowski Date: Tue Jul 26 13:58:41 2022 +0200 dt-bindings: soc: microchip: use absolute path to other schema Absolute path to other DT schema is preferred over relative one. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Claudiu Beznea Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220726115841.101249-4-krzysztof.kozlowski@linaro.org .../devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43f45415f31d0ca5b623dc5f7e22299da93d61f3 Author: Krzysztof Kozlowski Date: Tue Jul 26 13:58:40 2022 +0200 dt-bindings: soc: microchip: drop quotes when not needed Id and schema fields do not need quotes. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Claudiu Beznea Reviewed-by: Conor Dooley Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220726115841.101249-3-krzysztof.kozlowski@linaro.org .../devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml | 4 ++-- .../bindings/soc/microchip/microchip,mpfs-sys-controller.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit ed65704f3a8f5add6542c1f363abc715934ade98 Author: Claudiu Beznea Date: Tue Jul 26 11:49:31 2022 +0300 ARM: dts: lan966x: keep lan966 entries alphabetically sorted Keep LAN966 entries alphabetically sorted. Signed-off-by: Claudiu Beznea Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220726084931.1789855-1-claudiu.beznea@microchip.com arch/arm/boot/dts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b5002e2cc1483b6333d31e21902b78a1997909e Author: Phillip Potter Date: Mon Jul 25 23:07:45 2022 +0100 staging: r8188eu: convert rtw_pwr_wakeup to correct error code semantics Convert the rtw_pwr_wakeup function to use 0 on success and an appropriate error code on error. For the first failure block where ips_leave is invoked, use -ENOMEM as this is the main cause of failure here anyway. For the second failure block, use -EBUSY, as it seems the most appropriate. Finally, within the functions rtw_wx_set_mode, rtw_wx_set_wap, rtw_wx_set_scan and rtw_wx_set_essid, pass the error code on from rtw_pwr_wakeup as appropriate now that it is converted. This gets the driver closer to removal of the non-standard _SUCCESS and _FAIL definitions, which are inverted compared to the standard in-kernel error code mechanism. Tested-by: Philipp Hortmann # Edimax N150 Reviewed-by: Dan Carpenter Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20220725220745.12739-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_p2p.c | 4 ++-- drivers/staging/r8188eu/core/rtw_pwrctrl.c | 10 +++++----- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 24 ++++++++---------------- 3 files changed, 15 insertions(+), 23 deletions(-) commit 47092381023050ab90c3f0603a587f798d37f194 Author: Michael Straube Date: Sun Jul 24 20:25:20 2022 +0200 staging: r8188eu: make dump_chip_info() static The function dump_chip_info() is only used in rtl8188e_hal_init.c. Make it static to reduce the driver object file size by 281 bytes. before: text data bss dec hex filename 530606 43897 7072 581575 8dfc7 drivers/staging/r8188eu/r8188eu.o after: text data bss dec hex filename 530405 43817 7072 581294 8deae drivers/staging/r8188eu/r8188eu.o Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20220724182520.7794-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/hal_com.c | 39 ------------------------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 39 +++++++++++++++++++++++++ drivers/staging/r8188eu/include/hal_com.h | 3 -- 3 files changed, 39 insertions(+), 42 deletions(-) commit 123b3b754e3fb4f3c8632eb88e32a36d356513eb Author: Martin Kaiser Date: Sun Jul 24 17:33:49 2022 +0200 staging: r8188eu: remove DoReserved prototype The DoReserved function was removed in commit 869ddbfccdea ("staging: r8188eu: remove dummy entries from OnAction_tbl"). Remove the prototype as well. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220724153349.138741-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 1 file changed, 2 deletions(-) commit 51ee8ea588bca025cb03b0caa922d78bdb8ba901 Author: Martin Kaiser Date: Sun Jul 24 17:33:48 2022 +0200 staging: r8188eu: remove OnAtim prototype The OnAtim function was removed in commit 6d933902c609 ("staging: r8188eu: remove OnAtim"). Remove the prototype as well. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220724153349.138741-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 1 file changed, 2 deletions(-) commit b9ad667059d72713729761fa3d9e087cfa065e52 Author: Michael Straube Date: Fri Jul 15 08:29:08 2022 +0200 staging: r8188eu: remove SetHwReg8188EU() Remove the case HW_VAR_CORRECT_TSF from SetHwReg8188EU() and move the functionality to the function that calls SetHwReg8188EU() with HW_VAR_CORRECT_TSF. SetHwReg8188EU() is empty now and we can finally remove it. Tested-by: Martin Kaiser Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20220715062908.8547-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 34 +++++++++++++++++++++- drivers/staging/r8188eu/hal/usb_halinit.c | 45 ----------------------------- drivers/staging/r8188eu/include/hal_intf.h | 6 ---- 3 files changed, 33 insertions(+), 52 deletions(-) commit 7136ef70a067095ec207ad1d710fed44154d51a6 Author: Michael Straube Date: Fri Jul 15 08:29:07 2022 +0200 staging: r8188eu: make update_TSF() and correct_TSF() static The functions update_TSF() and correct_TSF() are only used in rtw_mlme_ext.c. Make them static. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20220715062908.8547-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 20 ++++++++++++++++++++ drivers/staging/r8188eu/core/rtw_wlan_util.c | 20 -------------------- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 3 --- 3 files changed, 20 insertions(+), 23 deletions(-) commit 21b044c903384898b1972c35a7927ed184a46e47 Author: Michael Straube Date: Fri Jul 15 08:29:06 2022 +0200 staging: r8188eu: remove unused parameter from update_TSF() The parameter 'len' of update_TSF() is unused. Remove it. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20220715062908.8547-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 ++-- drivers/staging/r8188eu/core/rtw_wlan_util.c | 2 +- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 0f83ff0129577f113242b207bdae284eb15696e5 Author: Michael Straube Date: Fri Jul 15 08:29:05 2022 +0200 staging: r8188eu: remove unused parameter from correct_TSF() The parameter 'pmlmeext' of correct_TSF() is unused. Remove it. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20220715062908.8547-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 ++-- drivers/staging/r8188eu/core/rtw_wlan_util.c | 2 +- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 3cc664a99e2f6f06cccee1941b6ea221779031fb Author: Michael Straube Date: Fri Jul 15 08:29:04 2022 +0200 staging: r8188eu: remove HW_VAR_SET_OPMODE from SetHwReg8188EU() Remove the HW_VAR_SET_OPMODE case from SetHwReg8188EU() and move the functions that are called by that case to rtw_mlme_ext.c. This is part of the ongoing effort to get rid of SetHwReg8188EU(). Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20220715062908.8547-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 103 ++++++++++++++++++++++- drivers/staging/r8188eu/hal/usb_halinit.c | 111 +------------------------ drivers/staging/r8188eu/include/hal_intf.h | 1 - drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 + 4 files changed, 107 insertions(+), 110 deletions(-) commit 6a74f103e3e0ce81ea29146070900d563b984e0f Author: Sidong Yang Date: Mon Jul 25 12:45:13 2022 +0100 staging: pi433: remove duplicated comments Remove duplicated words in comments for readability. The words are duplicated from a sentence below. Signed-off-by: Sidong Yang Link: https://lore.kernel.org/r/20220725114513.85089-1-realwakka@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/pi433_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97c9a70f129f43f90b8b3fa7af8a02ed6c977a60 Author: Binyi Han Date: Thu Jul 14 23:17:54 2022 -0700 staging: qlge: refine variable name tmp as a variable name don't have much information, change tmp to dma. Signed-off-by: Binyi Han Link: https://lore.kernel.org/r/20220715061754.GA6657@cloud-MacBookPro Signed-off-by: Greg Kroah-Hartman drivers/staging/qlge/qlge_main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 17ea92a9f6d0b9a97aaec5ab748e4591d70a562c Author: Namjae Jeon Date: Fri Jul 22 10:17:06 2022 +0900 ksmbd: fix kernel oops from idr_remove() There is a report that kernel oops happen from idr_remove(). kernel: BUG: kernel NULL pointer dereference, address: 0000000000000010 kernel: RIP: 0010:idr_remove+0x1/0x20 kernel: __ksmbd_close_fd+0xb2/0x2d0 [ksmbd] kernel: ksmbd_vfs_read+0x91/0x190 [ksmbd] kernel: ksmbd_fd_put+0x29/0x40 [ksmbd] kernel: smb2_read+0x210/0x390 [ksmbd] kernel: __process_request+0xa4/0x180 [ksmbd] kernel: __handle_ksmbd_work+0xf0/0x290 [ksmbd] kernel: handle_ksmbd_work+0x2d/0x50 [ksmbd] kernel: process_one_work+0x21d/0x3f0 kernel: worker_thread+0x50/0x3d0 kernel: rescuer_thread+0x390/0x390 kernel: kthread+0xee/0x120 kthread_complete_and_exit+0x20/0x20 kernel: ret_from_fork+0x22/0x30 While accessing files, If connection is disconnected, windows send session setup request included previous session destroy. But while still processing requests on previous session, this request destroy file table, which mean file table idr will be freed and set to NULL. So kernel oops happen from ft->idr in __ksmbd_close_fd(). This patch don't directly destroy session in destroy_previous_session(). It just set to KSMBD_SESS_EXITING so that connection will be terminated after finishing the rest of requests. Signed-off-by: Namjae Jeon Reviewed-by: Hyunchul Lee Signed-off-by: Steve French fs/ksmbd/mgmt/user_session.c | 2 ++ fs/ksmbd/smb2pdu.c | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit 8e06b31e348107c5d78e2c90bb7e69388cb97fb6 Author: Namjae Jeon Date: Fri Jul 22 10:15:57 2022 +0900 ksmbd: add channel rwlock Add missing rwlock for channel list in session. Signed-off-by: Namjae Jeon Reviewed-by: Hyunchul Lee Signed-off-by: Steve French fs/ksmbd/mgmt/user_session.c | 3 +++ fs/ksmbd/mgmt/user_session.h | 1 + fs/ksmbd/smb2pdu.c | 20 ++++++++++++++++++-- 3 files changed, 22 insertions(+), 2 deletions(-) commit e4d3e6b524c0c928f7fc9e03e047885c4951ae60 Author: Namjae Jeon Date: Fri Jul 22 10:15:10 2022 +0900 ksmbd: replace sessions list in connection with xarray Replace sessions list in connection with xarray. Signed-off-by: Namjae Jeon Reviewed-by: Hyunchul Lee Signed-off-by: Steve French fs/ksmbd/connection.c | 3 ++- fs/ksmbd/connection.h | 2 +- fs/ksmbd/mgmt/user_session.c | 31 +++++++------------------------ fs/ksmbd/mgmt/user_session.h | 5 ++--- fs/ksmbd/smb2pdu.c | 13 +++++++++---- 5 files changed, 21 insertions(+), 33 deletions(-) commit 060468f0ddbbd3396944ad234077e44af1841efc Author: Slark Xiao Date: Mon Jul 25 10:01:24 2022 +0800 selftests: net: Fix typo 'the the' in comment Replace 'the the' with 'the' in the comment. Signed-off-by: Slark Xiao Link: https://lore.kernel.org/r/20220725020124.5760-1-slark_xiao@163.com Signed-off-by: Jakub Kicinski tools/testing/selftests/net/forwarding/vxlan_asymmetric.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38ac173b0ef85a66bfd6d03ce74d4afe37f7f00c Author: Robert Schmidt Date: Tue Jul 26 23:16:17 2022 +0200 hwmon: (nct6775) add ASUS TUF GAMING B550-PLUS WIFI II Add ASUS TUF GAMING B550-PLUS WIFI II to the WMI monitoring list to enable support for HW monitoring on that board. Signed-off-by: Robert Schmidt Link: https://lore.kernel.org/r/YuBZodZHOnDll5zy@hydra Signed-off-by: Guenter Roeck drivers/hwmon/nct6775-platform.c | 1 + 1 file changed, 1 insertion(+) commit a7e555d4a184d7da72ed6df7d6741dc190b5ca5b Author: Eric Dumazet Date: Mon Jul 25 13:05:54 2022 -0700 ip6mr: remove stray rcu_read_unlock() from ip6_mr_forward() One rcu_read_unlock() should have been removed in blamed commit. Fixes: 9b1c21d898fd ("ip6mr: do not acquire mrt_lock while calling ip6_mr_forward()") Reported-by: Vladimir Oltean Signed-off-by: Eric Dumazet Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220725200554.2563581-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski net/ipv6/ip6mr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8fcdc238ce1b492e1f57a73a2ce4131d63f45397 Author: Mike Christie Date: Tue Jul 26 18:53:39 2022 -0500 scsi: target: Remove XDWRITEREAD emulated support This patch removes XDWRITEREAD support because it never fully worked when it was added in the initial LIO merge and it's been fully broken since 2013 from commit a2890087499a ("target: Add compare_and_write_post() completion callback fall through"). The two issues above are: 1. XDWRITEREAD support was just never completed when LIO was merged. We never did the DISABLE WRITE check and so we never write data out. 2. Since the commit above, we never complete the command. After we do the XOR, we return from xdreadwrite_callback and that's it. We never send a response for the command, so the command will always time out and fail. Since this has been fully broken for almost nine years this patch just removes emulated support. Link: https://lore.kernel.org/r/20220726235339.14551-1-michael.christie@oracle.com Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_sbc.c | 99 ---------------------------------------- 1 file changed, 99 deletions(-) commit 68126eeb6df6cb53aae4dc450ec20792e1819861 Author: Jason Wang Date: Sat Jul 23 17:16:20 2022 +0800 scsi: megaraid: Remove the static variable initialisation Initialising global and static variables to 0 is unnecessary. Remove the initialisation. Link: https://lore.kernel.org/r/20220723091620.5463-1-wangborong@cdjrlc.com Signed-off-by: Jason Wang Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_mbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 241b79b1e964bed8cda8892ac0448721bfe4b55a Author: Xin Gao Date: Thu Jul 21 03:52:29 2022 +0800 scsi: ch: Do not initialise statics to 0 Link: https://lore.kernel.org/r/20220720195229.9109-1-gaoxin@cdjrlc.com Signed-off-by: Xin Gao Signed-off-by: Martin K. Petersen drivers/scsi/ch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aaa26e383bfc566eca059dcfe1123338cfc9f659 Author: Colin Ian King Date: Tue Jul 19 12:06:49 2022 +0100 scsi: ufs: core: Fix spelling mistake "Cannnot" -> "Cannot" There is a spelling mistake in a dev_dbg message. Fix it. Link: https://lore.kernel.org/r/20220719110649.759821-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 292cef5e6262e7976dca310ed9c86f135b807bb4 Author: Dmitry Bogdanov Date: Mon Jul 18 18:25:55 2022 +0300 scsi: target: iscsi: Do not require target authentication RFC7143 states that Initiator decides what type of authentication to use: The initiator MUST continue with: CHAP_N= CHAP_R= or, if it requires target authentication, with: CHAP_N= CHAP_R= CHAP_I= CHAP_C= Allow one way authentication if mutual authentication is configured. That passes some tests from Windows HLK for Mutual CHAP with iSNS. Link: https://lore.kernel.org/r/20220718152555.17084-5-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Dmitry Bogdanov Signed-off-by: Martin K. Petersen drivers/target/iscsi/iscsi_target_auth.c | 8 +++++++- drivers/target/iscsi/iscsi_target_nego.c | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) commit e52b904b49273df35766826ce8dfb8cc3dd1ff37 Author: Dmitry Bogdanov Date: Mon Jul 18 18:25:54 2022 +0300 scsi: target: iscsi: Allow AuthMethod=None Allow negotiating AuthMethod=None at CSG=0 (Security Negotiation) when authentication is not required. That is required by the CHAP test in Windows HLK. Link: https://lore.kernel.org/r/20220718152555.17084-4-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Dmitry Bogdanov Signed-off-by: Martin K. Petersen drivers/target/iscsi/iscsi_target_login.c | 13 +++++++++++++ drivers/target/iscsi/iscsi_target_nego.c | 2 +- drivers/target/iscsi/iscsi_target_nego.h | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) commit 1e5733883421495908f3b90d9d807663038b4136 Author: Dmitry Bogdanov Date: Mon Jul 18 18:25:53 2022 +0300 scsi: target: iscsi: Support base64 in CHAP RFC7143 allows both Base64 and Hex encoding for CHAP binary entities like Challenge and Response. Currently the Linux iSCSI target supports only Hex encoding. Add support for Base64 encoded CHAP Challenge and CHAP Response required for CHAP tests in Windows HLK. Link: https://lore.kernel.org/r/20220718152555.17084-3-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Dmitry Bogdanov Signed-off-by: Martin K. Petersen drivers/target/iscsi/iscsi_target_auth.c | 114 ++++++++++++++++++++++++------- drivers/target/iscsi/iscsi_target_nego.c | 3 + drivers/target/iscsi/iscsi_target_nego.h | 1 + 3 files changed, 94 insertions(+), 24 deletions(-) commit 8f1f7d297bce50d9daea95ca67e1c10aea6c232c Author: Dmitry Bogdanov Date: Mon Jul 18 18:25:52 2022 +0300 scsi: target: iscsi: Add support for extended CDB AHS Variable length SCSI commands are transferred over iSCSI via two CDB buffers - in Basic Header Segment and in Additional Header Segment (AHS). Since AHS is not supported yet, a target reads just BHS (48 byte) from TCP and treats the remaining octets as a next new iSCSI PDU that causes protocol errors. Add support for the Extended CDB AHS type. Link: https://lore.kernel.org/r/20220718152555.17084-2-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Dmitry Bogdanov Signed-off-by: Martin K. Petersen drivers/target/iscsi/iscsi_target.c | 55 +++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 3 deletions(-) commit 2f3b3200ac389d09135fa42ade45ff23de7ce605 Author: Johan Hovold Date: Mon Jul 11 12:14:41 2022 +0200 scsi: ufs: dt-bindings: Add SC8280XP binding Add SC8280XP to the DT schema. Link: https://lore.kernel.org/r/20220711101441.4896-1-johan+linaro@kernel.org Reviewed-by: Alim Akhtar Acked-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Signed-off-by: Martin K. Petersen Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 2bc7ea71a73747a77e7f83bc085b0d2393235410 Merge: ee8b1ef9a6b0 dfc4005f8c17 Author: Dave Airlie Date: Wed Jul 27 10:11:59 2022 +1000 Merge tag 'topic/nouveau-misc-2022-07-27' of git://anongit.freedesktop.org/drm/drm into drm-next drm/nouveau-misc: display patches. These are just some precursor and cleanup display patches from Ben, tested by Lyude. Signed-off-by: Dave Airlie From: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/CAPM=9ty0R37q0mohBr_CegpYLXK2=fAH54QfAsMhHfPygTsdQA@mail.gmail.com commit 4062eba9f3d072e72645860fbc5d160428a75c50 Author: Guillaume Tucker Date: Wed Jul 13 08:33:43 2022 +0200 Makefile: replace headers_install with headers for kselftest Replace headers_install with headers as kselftest uses the header files from within the kernel tree rather than from a system-wide installation. We can still run this directly: $ make O=build kselftest-all and when building from the selftests directory: $ make O=build headers $ make O=build -C tools/testing/selftests all Signed-off-by: Guillaume Tucker Reported-by: Masahiro Yamada Acked-by: Shuah Khan Signed-off-by: Shuah Khan Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 187e7c41445a0f202bb551f08ca7f8158fea1cd7 Author: Adam Sindelar Date: Fri Jul 8 11:06:46 2022 +0200 selftests/vm: fix va_128TBswitch.sh permissions Restore the +x bit to va_128TBswitch.sh, which got dropped from the previous patch, somehow. Link: https://lkml.kernel.org/r/20220708090646.34927-1-adam@wowsignal.io Fixes: 1afd01d43efc3 ("selftests/vm: Only run 128TBswitch with 5-level paging") Signed-off-by: Adam Sindelar Signed-off-by: Andrew Morton tools/testing/selftests/vm/va_128TBswitch.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) commit ee8b1ef9a6b089abf7a9c7d094b6e93fa05f15b9 Merge: 417c1c196354 1b54a0121dba Author: Dave Airlie Date: Wed Jul 27 09:33:44 2022 +1000 Merge tag 'amd-drm-next-5.20-2022-07-26' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amdgpu: - VCN4 fixes - RAS support for UMC 8.10 - ACP support for jadeite platforms - NBIO HDP flush fixes - Misc spelling and grammar fixes - Runtime PM fixes - Non-DC HPD fix - Clean up amdgpu DM code - DSC fixes - Expose some additional GFXOFF data via debugfs - More FP clean up for new DCN blocks - PPC DC FP fixes - DCN 3.1.4 fixes - DC DML stack usage fixes - GMC fixes - SPM fixes for RDNA2 amdkfd: - MMU notifier fix - Mutex fix UAPI: - Add a comment about VCN4 unified queues - IP version information for UMDs Proposed mesa change: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411/diffs?commit_id=c8a63590dfd0d64e6e6a634dcfed993f135dd075 Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20220726181536.5759-1-alexander.deucher@amd.com commit dfc4005f8c172eea359f9db08c3b2b0ff0153699 Author: Ben Skeggs Date: Wed Jun 1 20:46:31 2022 +1000 drm/nouveau/disp: move DAC load detection method Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/dispnv50/disp.c | 21 ++++++------------ drivers/gpu/drm/nouveau/include/nvif/cl5070.h | 8 ------- drivers/gpu/drm/nouveau/include/nvif/if0012.h | 11 ++++++++++ drivers/gpu/drm/nouveau/include/nvif/outp.h | 1 + drivers/gpu/drm/nouveau/nvif/outp.c | 14 ++++++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 21 ------------------ drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c | 25 ++++++++++++++++++++++ 7 files changed, 57 insertions(+), 44 deletions(-) commit 1b255f1ccc883256e23db279ea164273ea0f7462 Author: Ben Skeggs Date: Wed Jun 1 20:46:31 2022 +1000 drm/nouveau/disp: add output class Will be used to more cleanly implement existing method interfaces that take some confusing (IEDTkey, inherited from VBIOS, which RM no longer uses on Ampere) match values to determine which display path to operate on. Methods will be protected from racing with supervisor, and from being called where they shouldn't be (ie. without an OR assigned). v2: - use ?: (lyude) v3: - fix return code if noacquire() method fails Signed-off-by: Ben Skeggs Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/dispnv50/disp.c | 18 +++- drivers/gpu/drm/nouveau/include/nvif/class.h | 1 + drivers/gpu/drm/nouveau/include/nvif/disp.h | 1 + drivers/gpu/drm/nouveau/include/nvif/if0010.h | 1 + drivers/gpu/drm/nouveau/include/nvif/if0012.h | 12 +++ drivers/gpu/drm/nouveau/include/nvif/outp.h | 13 +++ .../gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h | 1 + drivers/gpu/drm/nouveau/nouveau_bios.c | 2 + drivers/gpu/drm/nouveau/nouveau_encoder.h | 3 +- drivers/gpu/drm/nouveau/nvif/Kbuild | 1 + drivers/gpu/drm/nouveau/nvif/disp.c | 4 +- drivers/gpu/drm/nouveau/nvif/outp.c | 48 ++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/udisp.c | 12 +++ drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c | 104 +++++++++++++++++++++ 17 files changed, 221 insertions(+), 6 deletions(-) commit a6fd8f936402c3bcc5ac6aed9cca8e73b5ca08f7 Author: Ben Skeggs Date: Wed Jun 1 20:46:31 2022 +1000 drm/nouveau/disp: add supervisor mutex Will be used to protect NVIF_CLASS_OUTP method calls from racing with in-progress supervisor handling. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 6 +++++- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 4 ++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c | 8 ++++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 6 +++++- 5 files changed, 21 insertions(+), 4 deletions(-) commit 32dd9236698bcd2ffdb69954b167a851fd50182a Author: Ben Skeggs Date: Wed Jun 1 20:46:30 2022 +1000 drm/nouveau/disp: add conn method to query HPD pin status And use it to bail early in DP detection and avoid futile AUX transactions. This could be used on other connector types too in theory, but it's not something we've ever done before and I'd rather not risk breaking working systems without looking into it more closely. It's safe for DP though. We already do this by checking an AUX register that contains HPD status and aborting the transaction. However, this is much deeper in the stack - after taking various mutexes, poking HW for no good reason, and making a mess in debug logs. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/include/nvif/conn.h | 5 +++ drivers/gpu/drm/nouveau/include/nvif/if0011.h | 11 ++++++ drivers/gpu/drm/nouveau/nouveau_dp.c | 12 ++++++- drivers/gpu/drm/nouveau/nvif/conn.c | 14 ++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.c | 6 ++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/uconn.c | 43 ++++++++++++++++++++++++ 6 files changed, 88 insertions(+), 3 deletions(-) commit 95983aea80038539ebc70e41e73e9bb4eabd1a92 Author: Ben Skeggs Date: Wed Jun 1 20:46:30 2022 +1000 drm/nouveau/disp: add connector class Will be used to provide more solid driver interfaces in general, but the immediate motivation is work towards fixing issues with handling hotplug/DP IRQ events. Its use is currently limited to where we support non-polled hotplug already (ie. any GPU since NV40ish era, where our DCB handling works well enough), until that gets cleaned up someday. v2: - use ?: (lyude) Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/include/nvif/class.h | 1 + drivers/gpu/drm/nouveau/include/nvif/conn.h | 13 +++++ drivers/gpu/drm/nouveau/include/nvif/disp.h | 1 + drivers/gpu/drm/nouveau/include/nvif/if0010.h | 3 +- drivers/gpu/drm/nouveau/include/nvif/if0011.h | 12 ++++ drivers/gpu/drm/nouveau/nouveau_connector.c | 10 ++++ drivers/gpu/drm/nouveau/nouveau_connector.h | 3 +- drivers/gpu/drm/nouveau/nvif/Kbuild | 1 + drivers/gpu/drm/nouveau/nvif/conn.c | 48 +++++++++++++++ drivers/gpu/drm/nouveau/nvif/disp.c | 7 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.h | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/uconn.c | 74 ++++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/udisp.c | 14 +++++ 15 files changed, 189 insertions(+), 4 deletions(-) commit 889fcbe949bdd8470931a90b91f273ca18c510c1 Author: Ben Skeggs Date: Wed Jun 1 20:46:29 2022 +1000 drm/nouveau/disp: add common channel class handling Replaces a bunch of unnecessarily duplicated boilerplate in per-chipset code with a simpler, common, implementation. Channel "awaken" notify code is completely gone for now. KMS has never made use of it so far, and event notify handling is about to be changed in general anyway. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/dispnv50/base507c.c | 17 +- drivers/gpu/drm/nouveau/dispnv50/core507d.c | 4 +- drivers/gpu/drm/nouveau/dispnv50/curs507a.c | 6 +- drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 +- drivers/gpu/drm/nouveau/dispnv50/oimm507b.c | 6 +- drivers/gpu/drm/nouveau/dispnv50/ovly507e.c | 17 +- drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c | 7 +- drivers/gpu/drm/nouveau/dispnv50/wndw.c | 9 - drivers/gpu/drm/nouveau/dispnv50/wndw.h | 3 - drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c | 7 +- drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c | 1 - drivers/gpu/drm/nouveau/include/nvif/cl507a.h | 12 - drivers/gpu/drm/nouveau/include/nvif/cl507b.h | 12 - drivers/gpu/drm/nouveau/include/nvif/cl507c.h | 13 - drivers/gpu/drm/nouveau/include/nvif/cl507d.h | 12 - drivers/gpu/drm/nouveau/include/nvif/cl507e.h | 13 - drivers/gpu/drm/nouveau/include/nvif/class.h | 107 ++++---- drivers/gpu/drm/nouveau/include/nvif/clc37b.h | 11 - drivers/gpu/drm/nouveau/include/nvif/clc37e.h | 13 - drivers/gpu/drm/nouveau/include/nvif/if0014.h | 13 + drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/chan.c | 82 +++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/chan.h | 127 +++------- drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 52 ++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c | 24 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/ga102.c | 8 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 81 +++---- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 38 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c | 10 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 10 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 10 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 10 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c | 80 +++--- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt200.c | 24 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 10 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c | 139 +++-------- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp77.c | 10 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.c | 10 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 269 ++++----------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h | 8 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/tu102.c | 8 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/udisp.c | 13 +- 42 files changed, 470 insertions(+), 841 deletions(-) commit 7bcf89eed48f3fba8d0e2c19236e7dc547b6e037 Author: Ben Skeggs Date: Wed Jun 1 20:46:29 2022 +1000 drm/nouveau/disp: split sor hda funcs out to their own struct Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nvkm/engine/disp/ga102.c | 6 +----- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 17 ++++++++++------- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 6 +----- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 6 +----- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 6 +----- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 6 +----- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 15 +++++++++------ drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c | 15 +++++++++------ drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 11 +++++------ drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.c | 5 +---- drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 8 ++++---- drivers/gpu/drm/nouveau/nvkm/engine/disp/tu102.c | 6 +----- 12 files changed, 44 insertions(+), 63 deletions(-) commit 9a4514fbffda6083d9f7fba4882142686783cfe4 Author: Ben Skeggs Date: Wed Jun 1 20:46:29 2022 +1000 drm/nouveau/disp: split sor dp funcs out to their own struct Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 8 +++--- drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c | 27 +++++++++++--------- drivers/gpu/drm/nouveau/nvkm/engine/disp/ga102.c | 25 +++++++++++-------- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 29 ++++++++++++---------- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 12 +-------- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 25 +++++++++++-------- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 27 +++++++++++--------- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 12 +-------- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 25 +++++++++++-------- drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c | 23 +++++++++-------- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 8 +++--- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp77.c | 11 +------- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.c | 25 +++++++++++-------- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 21 +++++++++------- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 8 +++--- drivers/gpu/drm/nouveau/nvkm/engine/disp/tu102.c | 25 +++++++++++-------- 16 files changed, 157 insertions(+), 154 deletions(-) commit 79c453af55d9f1e85b906211ea4051364d28dcb4 Author: Ben Skeggs Date: Wed Jun 1 20:46:28 2022 +1000 drm/nouveau/disp: replace hda func pointer check with flag Simpler, and less error-prone than a separate set of function pointers. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/ga102.c | 33 +++--------------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 4 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 33 ++---------------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 32 ++--------------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c | 32 ++--------------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 3 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp77.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 6 ++--- drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c | 6 ++--- drivers/gpu/drm/nouveau/nvkm/engine/disp/tu102.c | 33 +++--------------------- 17 files changed, 31 insertions(+), 168 deletions(-) commit 1c6aab75ece7c1d450e4561cb2263403eeb7ae2f Author: Ben Skeggs Date: Wed Jun 1 20:46:28 2022 +1000 drm/nouveau/disp: merge nv50_disp_new_() and nvkm_disp_new() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 41 +++++++++++++++-------- drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/ga102.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt200.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp77.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 42 +----------------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h | 4 --- drivers/gpu/drm/nouveau/nvkm/engine/disp/tu102.c | 3 +- 19 files changed, 45 insertions(+), 90 deletions(-) commit 3517e6b6fee05b6259ca21741cbe5d7bf68aa672 Author: Ben Skeggs Date: Wed Jun 1 20:46:28 2022 +1000 drm/nouveau/disp: group supervisor-related struct members Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h | 8 ++++--- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 16 ++++++------- drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c | 16 ++++++------- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 26 +++++++++++----------- 4 files changed, 34 insertions(+), 32 deletions(-) commit acbe9ecfb7fb14db868ddbeda8f43e623026316b Author: Ben Skeggs Date: Wed Jun 1 20:46:27 2022 +1000 drm/nouveau/disp: merge head/outp/ior code into chipset files No changes to code at all here, just shuffling it around and removing a bunch of (now unnecessary) forward-declarations from headers. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild | 99 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/baseg84.c | 74 -- .../gpu/drm/nouveau/nvkm/engine/disp/basegf119.c | 108 -- .../gpu/drm/nouveau/nvkm/engine/disp/basegp102.c | 32 - .../gpu/drm/nouveau/nvkm/engine/disp/basenv50.c | 119 -- .../gpu/drm/nouveau/nvkm/engine/disp/capsgv100.c | 60 - drivers/gpu/drm/nouveau/nvkm/engine/disp/chan.c | 223 ++++ .../nvkm/engine/disp/{channv50.h => chan.h} | 131 +- .../gpu/drm/nouveau/nvkm/engine/disp/changf119.c | 62 - .../gpu/drm/nouveau/nvkm/engine/disp/changv100.c | 34 - .../gpu/drm/nouveau/nvkm/engine/disp/channv50.c | 363 ------ drivers/gpu/drm/nouveau/nvkm/engine/disp/coreg84.c | 111 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/coreg94.c | 57 - .../gpu/drm/nouveau/nvkm/engine/disp/coregf119.c | 231 ---- .../gpu/drm/nouveau/nvkm/engine/disp/coregk104.c | 126 -- .../gpu/drm/nouveau/nvkm/engine/disp/coregp102.c | 70 -- .../gpu/drm/nouveau/nvkm/engine/disp/coregv100.c | 207 ---- .../gpu/drm/nouveau/nvkm/engine/disp/corenv50.c | 234 ---- .../gpu/drm/nouveau/nvkm/engine/disp/cursgf119.c | 32 - .../gpu/drm/nouveau/nvkm/engine/disp/cursgp102.c | 32 - .../gpu/drm/nouveau/nvkm/engine/disp/cursgv100.c | 81 -- .../gpu/drm/nouveau/nvkm/engine/disp/cursnv50.c | 64 - .../gpu/drm/nouveau/nvkm/engine/disp/dacgf119.c | 70 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/dacnv50.c | 121 -- .../gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c | 96 -- .../gpu/drm/nouveau/nvkm/engine/disp/dmacgp102.c | 64 - .../gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c | 79 -- .../gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c | 137 --- drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 274 ++++- drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c | 321 ++++- drivers/gpu/drm/nouveau/nvkm/engine/disp/ga102.c | 130 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 954 ++++++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 272 ++++- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c | 6 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 62 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 159 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 77 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c | 122 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt200.c | 56 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 149 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c | 862 +++++++++++++- .../gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c | 62 - .../gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c | 51 - .../gpu/drm/nouveau/nvkm/engine/disp/hdagv100.c | 30 - drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmig84.c | 91 -- .../gpu/drm/nouveau/nvkm/engine/disp/hdmigf119.c | 82 -- .../gpu/drm/nouveau/nvkm/engine/disp/hdmigk104.c | 82 -- .../gpu/drm/nouveau/nvkm/engine/disp/hdmigm200.c | 36 - .../gpu/drm/nouveau/nvkm/engine/disp/hdmigt215.c | 91 -- .../gpu/drm/nouveau/nvkm/engine/disp/hdmigv100.c | 84 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h | 19 +- .../gpu/drm/nouveau/nvkm/engine/disp/headgf119.c | 104 -- .../gpu/drm/nouveau/nvkm/engine/disp/headgv100.c | 105 -- .../gpu/drm/nouveau/nvkm/engine/disp/headnv04.c | 74 -- .../gpu/drm/nouveau/nvkm/engine/disp/headnv50.c | 99 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 81 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp77.c | 32 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.c | 37 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv04.c | 50 + drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 1252 ++++++++++++++++++-- .../gpu/drm/nouveau/nvkm/engine/disp/oimmgf119.c | 32 - .../gpu/drm/nouveau/nvkm/engine/disp/oimmgp102.c | 32 - .../gpu/drm/nouveau/nvkm/engine/disp/oimmnv50.c | 64 - drivers/gpu/drm/nouveau/nvkm/engine/disp/ovlyg84.c | 71 -- .../gpu/drm/nouveau/nvkm/engine/disp/ovlygf119.c | 95 -- .../gpu/drm/nouveau/nvkm/engine/disp/ovlygk104.c | 97 -- .../gpu/drm/nouveau/nvkm/engine/disp/ovlygp102.c | 32 - .../gpu/drm/nouveau/nvkm/engine/disp/ovlygt200.c | 74 -- .../gpu/drm/nouveau/nvkm/engine/disp/ovlynv50.c | 107 -- .../gpu/drm/nouveau/nvkm/engine/disp/piocgf119.c | 77 -- .../gpu/drm/nouveau/nvkm/engine/disp/piocnv50.c | 86 -- .../gpu/drm/nouveau/nvkm/engine/disp/piornv50.c | 139 --- drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h | 24 +- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg84.c | 38 - drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 302 ----- .../gpu/drm/nouveau/nvkm/engine/disp/sorga102.c | 144 --- .../gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 208 ---- .../gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c | 54 - .../gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 80 -- .../gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 161 --- .../gpu/drm/nouveau/nvkm/engine/disp/sorgp100.c | 93 -- .../gpu/drm/nouveau/nvkm/engine/disp/sorgt215.c | 69 -- .../gpu/drm/nouveau/nvkm/engine/disp/sorgv100.c | 155 --- .../gpu/drm/nouveau/nvkm/engine/disp/sormcp77.c | 48 - .../gpu/drm/nouveau/nvkm/engine/disp/sormcp89.c | 53 - drivers/gpu/drm/nouveau/nvkm/engine/disp/sornv50.c | 106 -- .../gpu/drm/nouveau/nvkm/engine/disp/sortu102.c | 129 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/tu102.c | 110 +- .../gpu/drm/nouveau/nvkm/engine/disp/wimmgv100.c | 82 -- .../gpu/drm/nouveau/nvkm/engine/disp/wndwgv100.c | 184 --- 92 files changed, 5151 insertions(+), 6822 deletions(-) commit 168c02994399f2714bc6c73f85b7ce4d827f97aa Author: Ben Skeggs Date: Wed Jun 1 20:46:27 2022 +1000 drm/nouveau/disp: add common class handling between =nv50 About to expose head/output path/connector objects everywhere, so we will need support for child classes prior to nv50 now. Somewhat cleaner than the code >=nv50 used previously. v2: - use ?: (lyude) Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/include/nvif/class.h | 32 +++---- drivers/gpu/drm/nouveau/include/nvif/if0010.h | 11 +++ drivers/gpu/drm/nouveau/include/nvif/printf.h | 9 ++ drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h | 3 +- drivers/gpu/drm/nouveau/nvif/disp.c | 54 ++++++----- drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild | 16 +--- drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 39 +------- .../gpu/drm/nouveau/nvkm/engine/disp/capsgv100.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/channv50.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 14 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c | 14 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/ga102.c | 13 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 13 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 14 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c | 14 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 14 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 14 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 14 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c | 13 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt200.c | 14 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 14 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c | 13 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp77.c | 14 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.c | 14 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv04.c | 5 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 13 ++- .../gpu/drm/nouveau/nvkm/engine/disp/piocgf119.c | 1 - .../gpu/drm/nouveau/nvkm/engine/disp/piocnv50.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h | 21 +++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/rootg84.c | 55 ------------ drivers/gpu/drm/nouveau/nvkm/engine/disp/rootg94.c | 55 ------------ .../gpu/drm/nouveau/nvkm/engine/disp/rootga102.c | 52 ----------- .../gpu/drm/nouveau/nvkm/engine/disp/rootgf119.c | 55 ------------ .../gpu/drm/nouveau/nvkm/engine/disp/rootgk104.c | 55 ------------ .../gpu/drm/nouveau/nvkm/engine/disp/rootgk110.c | 55 ------------ .../gpu/drm/nouveau/nvkm/engine/disp/rootgm107.c | 55 ------------ .../gpu/drm/nouveau/nvkm/engine/disp/rootgm200.c | 55 ------------ .../gpu/drm/nouveau/nvkm/engine/disp/rootgp100.c | 55 ------------ .../gpu/drm/nouveau/nvkm/engine/disp/rootgp102.c | 55 ------------ .../gpu/drm/nouveau/nvkm/engine/disp/rootgt200.c | 55 ------------ .../gpu/drm/nouveau/nvkm/engine/disp/rootgt215.c | 55 ------------ .../gpu/drm/nouveau/nvkm/engine/disp/rootgv100.c | 53 ----------- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv04.c | 42 +-------- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 91 +------------------ .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.h | 45 ---------- .../gpu/drm/nouveau/nvkm/engine/disp/roottu102.c | 53 ----------- drivers/gpu/drm/nouveau/nvkm/engine/disp/tu102.c | 13 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/udisp.c | 100 +++++++++++++++++++++ 48 files changed, 396 insertions(+), 1072 deletions(-) commit 92fba5d3c8f5b757c4e3fdc89afe76a8f6c4da68 Author: Ben Skeggs Date: Wed Jun 1 20:46:26 2022 +1000 drm/nouveau/disp: collapse nv50_disp into nvkm_disp Dump of one struct's members into another, with a couple of list renames because of collisions. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h | 36 +++++- drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 54 ++++----- drivers/gpu/drm/nouveau/nvkm/engine/disp/baseg84.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/basegf119.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/basegp102.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/basenv50.c | 6 +- .../gpu/drm/nouveau/nvkm/engine/disp/capsgv100.c | 6 +- .../gpu/drm/nouveau/nvkm/engine/disp/changf119.c | 10 +- .../gpu/drm/nouveau/nvkm/engine/disp/channv50.c | 40 +++---- .../gpu/drm/nouveau/nvkm/engine/disp/channv50.h | 70 +++++------ drivers/gpu/drm/nouveau/nvkm/engine/disp/coreg84.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/coreg94.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/coregf119.c | 6 +- .../gpu/drm/nouveau/nvkm/engine/disp/coregk104.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/coregp102.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/disp/coregv100.c | 10 +- .../gpu/drm/nouveau/nvkm/engine/disp/corenv50.c | 8 +- .../gpu/drm/nouveau/nvkm/engine/disp/cursgf119.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/cursgp102.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/cursgv100.c | 10 +- .../gpu/drm/nouveau/nvkm/engine/disp/cursnv50.c | 6 +- .../gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/disp/dmacgp102.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c | 6 +- .../gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c | 6 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 15 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c | 15 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/ga102.c | 15 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 61 +++++----- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 15 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c | 15 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 15 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 15 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 15 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c | 19 ++- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt200.c | 15 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 15 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c | 79 ++++++------- drivers/gpu/drm/nouveau/nvkm/engine/disp/head.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.c | 7 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp77.c | 15 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.c | 15 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 131 ++++++++------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 83 ------------- .../gpu/drm/nouveau/nvkm/engine/disp/oimmgf119.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/oimmgp102.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/oimmnv50.c | 6 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c | 10 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/ovlyg84.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/ovlygf119.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/ovlygk104.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/ovlygp102.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/ovlygt200.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/ovlynv50.c | 6 +- .../gpu/drm/nouveau/nvkm/engine/disp/piocgf119.c | 8 +- .../gpu/drm/nouveau/nvkm/engine/disp/piocnv50.c | 8 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h | 58 +++++++-- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 12 +- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.h | 8 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/tu102.c | 23 ++-- .../gpu/drm/nouveau/nvkm/engine/disp/wimmgv100.c | 6 +- .../gpu/drm/nouveau/nvkm/engine/disp/wndwgv100.c | 6 +- 65 files changed, 472 insertions(+), 562 deletions(-) commit 0407b33fadcd7a5d31ba3c473cef95b2b418d8c4 Author: Ben Skeggs Date: Wed Jun 1 20:46:26 2022 +1000 drm/nouveau/disp: collapse nv50_disp_func into nvkm_disp_func Aside from a chicken-and-egg problem with a duplicate 'root' member, this is a straight dump of function pointers from one struct into another. The left-over wrapping mess in >=nv50 structs will be fixed later. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 5 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 13 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/g94.c | 13 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/ga102.c | 13 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 13 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 13 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c | 13 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 13 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 13 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 13 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c | 13 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt200.c | 13 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 13 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c | 13 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp77.c | 13 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.c | 13 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv04.c | 8 +--- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 51 ++++++++++-------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 23 +---------- drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h | 24 ++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/disp/tu102.c | 13 ++++-- 21 files changed, 192 insertions(+), 127 deletions(-) commit 412dfcf34e0695fa1714ad422b2a5d0ed1406437 Author: Ben Skeggs Date: Wed Jun 1 20:46:25 2022 +1000 drm/nouveau/disp: clean up nvkm_outp constructors Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 32 +++++++------------------ drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c | 12 ++++++---- drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 7 +++--- 3 files changed, 19 insertions(+), 32 deletions(-) commit 7786fb366e598e984ee9307616b0c72979bd191c Author: Ben Skeggs Date: Wed Jun 1 20:46:25 2022 +1000 drm/nouveau/disp: collapse nvkm_dp into nvkm_outp There should be no changes to code here other than modifying the dereferences. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 435 ++++++++++----------- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.h | 33 -- drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 30 ++ .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 4 +- 4 files changed, 240 insertions(+), 262 deletions(-) commit 48c022d1627295ef4c4a85f00caf002b59800f67 Merge: 4fd310c74432 84c61fe1a75b Author: Jakub Kicinski Date: Tue Jul 26 14:38:53 2022 -0700 Merge branch 'tls-rx-decrypt-from-the-tcp-queue' Jakub Kicinski says: ==================== tls: rx: decrypt from the TCP queue This is the final part of my TLS Rx rework. It switches from strparser to decrypting data from skbs queued in TCP. We don't need the full strparser for TLS, its needs are very basic. This set gives us a small but measurable (6%) performance improvement (continuous stream). ==================== Link: https://lore.kernel.org/r/20220722235033.2594446-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 84c61fe1a75b4255df1e1e7c054c9e6d048da417 Author: Jakub Kicinski Date: Fri Jul 22 16:50:33 2022 -0700 tls: rx: do not use the standard strparser TLS is a relatively poor fit for strparser. We pause the input every time a message is received, wait for a read which will decrypt the message, start the parser, repeat. strparser is built to delineate the messages, wrap them in individual skbs and let them float off into the stack or a different socket. TLS wants the data pages and nothing else. There's no need for TLS to keep cloning (and occasionally skb_unclone()'ing) the TCP rx queue. This patch uses a pre-allocated skb and attaches the skbs from the TCP rx queue to it as frags. TLS is careful never to modify the input skb without CoW'ing / detaching it first. Since we call TCP rx queue cleanup directly we also get back the benefit of skb deferred free. Overall this results in a 6% gain in my benchmarks. Acked-by: Paolo Abeni Signed-off-by: Jakub Kicinski include/net/tls.h | 19 ++- net/tls/tls.h | 24 ++- net/tls/tls_main.c | 20 ++- net/tls/tls_strp.c | 484 +++++++++++++++++++++++++++++++++++++++++++++++++++-- net/tls/tls_sw.c | 80 ++++----- 5 files changed, 558 insertions(+), 69 deletions(-) commit 8b3c59a7a0bed6fe365755ac211dcf94fdac81b4 Author: Jakub Kicinski Date: Fri Jul 22 16:50:32 2022 -0700 tls: rx: device: add input CoW helper Wrap the remaining skb_cow_data() into a helper, so it's easier to replace down the lane. The new version will change the skb so make sure relevant pointers get reloaded after the call. Signed-off-by: Jakub Kicinski net/tls/tls.h | 1 + net/tls/tls_device.c | 19 +++++++++---------- net/tls/tls_strp.c | 11 +++++++++++ 3 files changed, 21 insertions(+), 10 deletions(-) commit 3f92a64e44e5823a975cbf2c9f05ab1893fd4cb7 Author: Jakub Kicinski Date: Fri Jul 22 16:50:31 2022 -0700 tcp: allow tls to decrypt directly from the tcp rcv queue Expose TCP rx queue accessor and cleanup, so that TLS can decrypt directly from the TCP queue. The expectation is that the caller can access the skb returned from tcp_recv_skb() and up to inq bytes worth of data (some of which may be in ->next skbs) and then call tcp_read_done() when data has been consumed. The socket lock must be held continuously across those two operations. Signed-off-by: Jakub Kicinski include/net/tcp.h | 2 ++ net/ipv4/tcp.c | 42 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) commit d4e5db6452211467f668521f5a3bd3c3928918e1 Author: Jakub Kicinski Date: Fri Jul 22 16:50:30 2022 -0700 tls: rx: device: keep the zero copy status with offload The non-zero-copy path assumes a full skb with decrypted contents. This means the device offload would have to CoW the data. Try to keep the zero-copy status instead, copy the data to user space. Signed-off-by: Jakub Kicinski net/tls/tls.h | 1 + net/tls/tls_strp.c | 9 +++++++++ net/tls/tls_sw.c | 30 +++++++++++++++++++++++++----- 3 files changed, 35 insertions(+), 5 deletions(-) commit b93f5700164dabc59f5c82857dbe571e0ccb2d35 Author: Jakub Kicinski Date: Fri Jul 22 16:50:29 2022 -0700 tls: rx: don't free the output in case of zero-copy In the future we'll want to reuse the input skb in case of zero-copy so we shouldn't always free darg.skb. Move the freeing of darg.skb into the non-zc cases. All cases will now free ctx->recv_pkt (inside let tls_rx_rec_done()). Signed-off-by: Jakub Kicinski net/tls/tls_sw.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit dd47ed3620e693636b4d912db4810fe0c092eb2c Author: Jakub Kicinski Date: Fri Jul 22 16:50:28 2022 -0700 tls: rx: factor SW handling out of tls_rx_one_record() After recent changes the SW side of tls_rx_one_record() can be nicely encapsulated in its own function. Move the pad handling as well. This will be useful for ->zc handling in tls_decrypt_device(). Signed-off-by: Jakub Kicinski net/tls/tls_sw.c | 93 ++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 57 insertions(+), 36 deletions(-) commit b92a13d488de2e87c869a4a6c0393d1f9eebe6dd Author: Jakub Kicinski Date: Fri Jul 22 16:50:27 2022 -0700 tls: rx: wrap recv_pkt accesses in helpers To allow for the logic to change later wrap accesses which interrogate the input skb in helper functions. Signed-off-by: Jakub Kicinski net/tls/tls.h | 5 +++++ net/tls/tls_sw.c | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) commit a11821495fd4d9b5c97945db929e02c473b7a5d9 Author: Wolfram Sang Date: Sun Jul 24 20:46:28 2022 +0200 i2c: extend documentation about retvals of master_xfer functions It was stated how the error codes should be. It was not stated what the regular case should return. Add this. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang include/linux/i2c.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6435319c34704994e19b0767f6a4e6f37439867b Author: Liang He Date: Fri Jul 22 09:24:01 2022 +0800 i2c: mux-gpmux: Add of_node_put() when breaking out of loop In i2c_mux_probe(), we should call of_node_put() when breaking out of for_each_child_of_node() which will automatically increase and decrease the refcount. Fixes: ac8498f0ce53 ("i2c: i2c-mux-gpmux: new driver") Signed-off-by: Liang He Acked-by: Peter Rosin Signed-off-by: Wolfram Sang drivers/i2c/muxes/i2c-mux-gpmux.c | 1 + 1 file changed, 1 insertion(+) commit 49897cfe620dc7445d18d6ae6e1da9c8d4c02c94 Author: Jagan Teki Date: Sun Jul 24 02:13:26 2022 +0530 dt-bindings: i2c: i2c-rk3x: Document Rockchip RV1126 Document compatible string for Rockchip RV1126 SoC. Signed-off-by: Jagan Teki Acked-by: Rob Herring [wsa: rebased] Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-rk3x.yaml | 1 + 1 file changed, 1 insertion(+) commit 9c9cb23e00ddf45679b21b4dacc11d1ae7961ebe Author: Xin Xiong Date: Sun Jul 24 17:55:58 2022 +0800 xfrm: fix refcount leak in __xfrm_policy_check() The issue happens on an error path in __xfrm_policy_check(). When the fetching process of the object `pols[1]` fails, the function simply returns 0, forgetting to decrement the reference count of `pols[0]`, which is incremented earlier by either xfrm_sk_policy_lookup() or xfrm_policy_lookup(). This may result in memory leaks. Fix it by decreasing the reference count of `pols[0]` in that path. Fixes: 134b0fc544ba ("IPsec: propagate security module errors up from flow_cache_lookup") Signed-off-by: Xin Xiong Signed-off-by: Xin Tan Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 1 + 1 file changed, 1 insertion(+) commit 4fd310c74432d19e8f58a4291b44db0ddebe7bf3 Merge: 35d099da4196 949c84f05eb6 Author: Jakub Kicinski Date: Tue Jul 26 13:54:58 2022 -0700 Merge branch 'implement-dev-info-and-dev-flash-for-line-cards' Jiri Pirko says: ==================== Implement dev info and dev flash for line cards This patchset implements two features: 1) "devlink dev info" is exposed for line card (patches 6-9) 2) "devlink dev flash" is implemented for line card gearbox flashing (patch 10) For every line card, "a nested" auxiliary device is created which allows to bind the features mentioned above (patch 4). The relationship between line card and its auxiliary dev devlink is carried over extra line card netlink attribute (patches 3 and 5). The first patch removes devlink_mutex from devlink_register/unregister() which eliminates possible deadlock during devlink reload command. The second patchset follows up with putting net pointer check into new helper. Examples: $ devlink lc show pci/0000:01:00.0 lc 1 pci/0000:01:00.0: lc 1 state active type 16x100G nested_devlink auxiliary/mlxsw_core.lc.0 supported_types: 16x100G $ devlink dev show auxiliary/mlxsw_core.lc.0 auxiliary/mlxsw_core.lc.0 $ devlink dev info auxiliary/mlxsw_core.lc.0 auxiliary/mlxsw_core.lc.0: versions: fixed: hw.revision 0 fw.psid MT_0000000749 running: ini.version 4 fw 19.2010.1312 $ devlink dev flash auxiliary/mlxsw_core.lc.0 file mellanox/fw-AGB-rel-19_2010_1312-022-EVB.mfa2 ==================== Link: https://lore.kernel.org/r/20220725082925.366455-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 949c84f05eb65b0a41f7f5c62ee9ffc5d8e39c89 Author: Jiri Pirko Date: Mon Jul 25 10:29:25 2022 +0200 selftests: mlxsw: Check line card info on activated line card Once line card is activated, check the FW version and PSID are exposed. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski .../drivers/net/mlxsw/devlink_linecard.sh | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit e96c8da380391cca7889a4fd4b09c8fbc14aeef8 Author: Jiri Pirko Date: Mon Jul 25 10:29:24 2022 +0200 selftests: mlxsw: Check line card info on provisioned line card Once line card is provisioned, check if HW revision and INI version are exposed on associated nested auxiliary device. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski .../drivers/net/mlxsw/devlink_linecard.sh | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 9ca6a7a5f42de2ef330d6bc4243d850663d9acab Author: Jiri Pirko Date: Mon Jul 25 10:29:23 2022 +0200 mlxsw: core_linecards: Implement line card device flashing Implement flash_update() devlink op for the line card devlink instance to allow user to update line card gearbox FW using MDDT register and mlxfw. Example: $ devlink dev flash auxiliary/mlxsw_core.lc.0 file mellanox/fw-AGB-rel-19_2010_1312-022-EVB.mfa2 Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/core.c | 31 ++- drivers/net/ethernet/mellanox/mlxsw/core.h | 11 + .../ethernet/mellanox/mlxsw/core_linecard_dev.c | 13 + .../net/ethernet/mellanox/mlxsw/core_linecards.c | 278 +++++++++++++++++++++ 4 files changed, 323 insertions(+), 10 deletions(-) commit 3fc0c51905fb0f57d8f7093cc5efe45d8a9557ca Author: Jiri Pirko Date: Mon Jul 25 10:29:22 2022 +0200 mlxsw: core_linecards: Expose device PSID over device info Use tunneled MGIR to obtain PSID of line card device and extend device_info_get() op to fill up the info with that. Example: $ devlink dev info auxiliary/mlxsw_core.lc.0 auxiliary/mlxsw_core.lc.0: versions: fixed: hw.revision 0 fw.psid MT_0000000749 running: ini.version 4 fw 19.2010.1312 Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: Jakub Kicinski Documentation/networking/devlink/mlxsw.rst | 3 +++ drivers/net/ethernet/mellanox/mlxsw/core.h | 1 + .../net/ethernet/mellanox/mlxsw/core_linecards.c | 31 ++++++++++++++++++++++ 3 files changed, 35 insertions(+) commit 8f9b0513a950040e2e9414059854b9a2372c1fb7 Author: Jiri Pirko Date: Mon Jul 25 10:29:21 2022 +0200 mlxsw: reg: Add Management DownStream Device Tunneling Register The MDDT register allows to deliver query and request messages (PRM registers, commands) to a DownStream device. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/reg.h | 90 +++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) commit 4da0eb2a75eb14a474a94d9249255f97a9175a3c Author: Jiri Pirko Date: Mon Jul 25 10:29:20 2022 +0200 mlxsw: core_linecards: Probe active line cards for devices and expose FW version In case the line card is active, go over all possible existing devices (gearboxes) on it and expose FW version of the flashable one. Example: $ devlink dev info auxiliary/mlxsw_core.lc.0 auxiliary/mlxsw_core.lc.0: versions: fixed: hw.revision 0 running: ini.version 4 fw 19.2010.1312 Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: Jakub Kicinski Documentation/networking/devlink/mlxsw.rst | 3 ++ drivers/net/ethernet/mellanox/mlxsw/core.h | 9 ++++ .../net/ethernet/mellanox/mlxsw/core_linecards.c | 57 ++++++++++++++++++++++ 3 files changed, 69 insertions(+) commit 4ea07cf638dbd6260664b69b0f69cc951934194d Author: Jiri Pirko Date: Mon Jul 25 10:29:19 2022 +0200 mlxsw: reg: Extend MDDQ by device_info Extend existing MDDQ register by possibility to query information about devices residing on a line card. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/reg.h | 83 ++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) commit 5ba325fec511fecdfcf3815695c275f6c0ba817b Author: Jiri Pirko Date: Mon Jul 25 10:29:18 2022 +0200 mlxsw: core_linecards: Expose HW revision and INI version Implement info_get() to expose HW revision of a linecard and loaded INI version. Example: $ devlink dev info auxiliary/mlxsw_core.lc.0 auxiliary/mlxsw_core.lc.0: versions: fixed: hw.revision 0 running: ini.version 4 Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: Jakub Kicinski Documentation/networking/devlink/mlxsw.rst | 18 ++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/core.h | 4 ++++ .../ethernet/mellanox/mlxsw/core_linecard_dev.c | 11 +++++++++ .../net/ethernet/mellanox/mlxsw/core_linecards.c | 28 ++++++++++++++++++++++ 4 files changed, 61 insertions(+) commit bd02fd76d1909637c95e8ef13e7fd1e748af910d Author: Jiri Pirko Date: Mon Jul 25 10:29:17 2022 +0200 mlxsw: core_linecards: Introduce per line card auxiliary device In order to be eventually able to expose line card gearbox version and possibility to flash FW, model the line card as a separate device on auxiliary bus. Add the auxiliary device for provisioned line card in order to be able to expose provisioned line card info over devlink dev info. When the line card becomes active, there may be other additional info added to the output. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/Kconfig | 1 + drivers/net/ethernet/mellanox/mlxsw/Makefile | 2 +- drivers/net/ethernet/mellanox/mlxsw/core.c | 13 +- drivers/net/ethernet/mellanox/mlxsw/core.h | 10 ++ .../ethernet/mellanox/mlxsw/core_linecard_dev.c | 160 +++++++++++++++++++++ .../net/ethernet/mellanox/mlxsw/core_linecards.c | 11 ++ 6 files changed, 194 insertions(+), 3 deletions(-) commit 7b2d9a1a50ec3bedf067fe234a4a71196c89e826 Author: Jiri Pirko Date: Mon Jul 25 10:29:16 2022 +0200 net: devlink: introduce nested devlink entity for line card For the purpose of exposing device info and allow flash update which is going to be implemented in follow-up patches, introduce a possibility for a line card to expose relation to nested devlink entity. The nested devlink entity represents the line card. Example: $ devlink lc show pci/0000:01:00.0 lc 1 pci/0000:01:00.0: lc 1 state active type 16x100G nested_devlink auxiliary/mlxsw_core.lc.0 supported_types: 16x100G $ devlink dev show auxiliary/mlxsw_core.lc.0 auxiliary/mlxsw_core.lc.0 Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Reviewed-by: Ido Schimmel Signed-off-by: Jakub Kicinski include/net/devlink.h | 2 ++ include/uapi/linux/devlink.h | 2 ++ net/core/devlink.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) commit 294c4f57cfe3303ee2f050d1728c76a401e573a7 Author: Jiri Pirko Date: Mon Jul 25 10:29:15 2022 +0200 net: devlink: move net check into devlinks_xa_for_each_registered_get() Benefit from having devlinks iterator helper devlinks_xa_for_each_registered_get() and move the net pointer check inside. Suggested-by: Jakub Kicinski Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski net/core/devlink.c | 135 ++++++++++++++++------------------------------------- 1 file changed, 39 insertions(+), 96 deletions(-) commit 30bab7cdb56da4819ff081ad658646f2df16c098 Author: Jiri Pirko Date: Mon Jul 25 10:29:14 2022 +0200 net: devlink: make sure that devlink_try_get() works with valid pointer during xarray iteration Remove dependency on devlink_mutex during devlinks xarray iteration. The reason is that devlink_register/unregister() functions taking devlink_mutex would deadlock during devlink reload operation of devlink instance which registers/unregisters nested devlink instances. The devlinks xarray consistency is ensured internally by xarray. There is a reference taken when working with devlink using devlink_try_get(). But there is no guarantee that devlink pointer picked during xarray iteration is not freed before devlink_try_get() is called. Make sure that devlink_try_get() works with valid pointer. Achieve it by: 1) Splitting devlink_put() so the completion is sent only after grace period. Completion unblocks the devlink_unregister() routine, which is followed-up by devlink_free() 2) During devlinks xa_array iteration, get devlink pointer from xa_array holding RCU read lock and taking reference using devlink_try_get() before unlock. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski net/core/devlink.c | 171 +++++++++++++++++++++++++---------------------------- 1 file changed, 80 insertions(+), 91 deletions(-) commit 957063874c76ff0cba4b62716e708af2a63cdf63 Author: Sadiya Kazi Date: Tue Jul 26 04:12:50 2022 +0000 Documentation: kunit: Add CLI args for kunit_tool Some kunit_tool command line arguments are missing in run_wrapper.rst. Document them. Reported-by: Bagas Sanjaya Reported-by: kernel test robot Reviewed-by: David Gow Reviewed-by: Brendan Higgins Reviewed-by: Daniel Latypov Reviewed-by: Maíra Canal Signed-off-by: Sadiya Kazi Reviewed-by: Bagas Sanjaya Tested-by: Bagas Sanjaya Signed-off-by: Shuah Khan Documentation/dev-tools/kunit/run_wrapper.rst | 63 ++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) commit 88b61b130334212f8f05175e291c04adeb2bf30b Merge: c808a6ec7166 0828c4a39be5 Author: Mimi Zohar Date: Fri Jul 15 12:54:01 2022 -0400 Merge remote-tracking branch 'linux-integrity/kexec-keyrings' into next-integrity From the cover letter: Currently when loading a kernel image via the kexec_file_load() system call, x86 can make use of three keyrings i.e. the .builtin_trusted_keys, .secondary_trusted_keys and .platform keyrings to verify a signature. However, arm64 and s390 can only use the .builtin_trusted_keys and .platform keyring respectively. For example, one resulting problem is kexec'ing a kernel image would be rejected with the error "Lockdown: kexec: kexec of unsigned images is restricted; see man kernel_lockdown.7". This patch set enables arm64 and s390 to make use of the same keyrings as x86 to verify the signature kexec'ed kernel image. The recently introduced .machine keyring impacts the roots of trust by linking the .machine keyring to the .secondary keyring. The roots of trust for different keyrings are described as follows, .builtin_trusted_keys: Keys may be built into the kernel during build or inserted into memory reserved for keys post build. The root of trust is based on verification of the kernel image signature. For example, on a physical system in a secure boot environment, this trust is rooted in hardware. .machine: If the end-users choose to trust the keys provided by first-stage UEFI bootloader shim i.e. Machine Owner Keys (MOK keys), the keys will be added to this keyring which is linked to the .secondary_trusted_keys keyring as the same as the .builtin_trusted_keys keyring. Shim has built-in keys from a Linux distribution or the end-users-enrolled keys. So the root of trust of this keyring is either a Linux distribution vendor or the end-users. .secondary_trusted_keys: Certificates signed by keys on the .builtin_trusted_keys, .machine, or existing keys on the .secondary_trusted_keys keryings may be loaded onto the .secondary_trusted_keys keyring. This establishes a signature chain of trust based on keys loaded on either the .builtin_trusted_keys or .machine keyrings, if configured and enabled. .platform: The .platform keyring consist of UEFI db and MOK keys which are used by shim to verify the first boot kernel's image signature. If end-users choose to trust MOK keys and the kernel has the .machine keyring enabled, the .platform keyring only consists of UEFI db keys since the MOK keys are added to the .machine keyring instead. Because the end-users could also enroll their own MOK keys, the root of trust could be hardware and the end-users. commit a061a8ad3f906d331020006084558e2acddc2ff7 Author: Ian Rogers Date: Mon Jul 25 15:36:02 2022 -0700 perf test: Avoid sysfs state affecting fake events Icelake has a slots event, on my Skylakex I have CPU events in sysfs of topdown-slots-issued and topdown-total-slots. Legacy event parsing would try to use '-' to separate parts of an event and so perf_pmu__parse_init sets 'slots' to be a PMU_EVENT_SYMBOL_SUFFIX2. As such parsing the slots event for a fake PMU fails as a PMU_EVENT_SYMBOL_SUFFIX2 isn't made into the PE_PMU_EVENT_FAKE token. Resolve this issue by test initializing the PMU parsing state before every parse. This must be done every parse as the state is removes after each parse_events. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20220725223633.2301737-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/pmu-events.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit bedd17381b9cc34ad20c1d545a4ed2dfbb4d8068 Author: Zhengjun Xing Date: Tue Jun 14 22:50:19 2022 +0800 perf vendor events intel: Update event list for haswellx Update JSON core/uncore events for haswellx to perf. Based on HSX JSON list v24: https://download.01.org/perfmon/HSX Reviewed-by: Kan Liang Signed-off-by: Xing Zhengjun Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220614145019.2177071-2-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/haswellx/cache.json | 37 +- .../arch/x86/haswellx/floating-point.json | 2 +- .../pmu-events/arch/x86/haswellx/frontend.json | 2 +- .../perf/pmu-events/arch/x86/haswellx/memory.json | 52 +- tools/perf/pmu-events/arch/x86/haswellx/other.json | 2 +- .../pmu-events/arch/x86/haswellx/pipeline.json | 4 +- .../pmu-events/arch/x86/haswellx/uncore-cache.json | 3779 +++++++++++++++++++- .../arch/x86/haswellx/uncore-interconnect.json | 1430 +++++++- .../arch/x86/haswellx/uncore-memory.json | 2839 ++++++++++++++- .../pmu-events/arch/x86/haswellx/uncore-other.json | 3170 ++++++++++++++++ .../pmu-events/arch/x86/haswellx/uncore-power.json | 477 ++- .../arch/x86/haswellx/virtual-memory.json | 2 +- 12 files changed, 11520 insertions(+), 276 deletions(-) commit 28738de918b530e41b305eb4209e47fe36960529 Author: Zhengjun Xing Date: Tue Jun 14 22:50:18 2022 +0800 perf vendor events intel: Update event list for broadwellx Update JSON core/uncore events for broadwellx to perf. Based on BDX JSON list v19: https://download.01.org/perfmon/BDX Reviewed-by: Kan Liang Signed-off-by: Xing Zhengjun Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220614145019.2177071-1-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/pmu-events/arch/x86/broadwellx/cache.json | 22 +- .../arch/x86/broadwellx/floating-point.json | 9 +- .../pmu-events/arch/x86/broadwellx/frontend.json | 2 +- .../pmu-events/arch/x86/broadwellx/memory.json | 39 +- .../perf/pmu-events/arch/x86/broadwellx/other.json | 2 +- .../pmu-events/arch/x86/broadwellx/pipeline.json | 4 +- .../arch/x86/broadwellx/uncore-cache.json | 3788 +++++++++++++++++++- .../arch/x86/broadwellx/uncore-interconnect.json | 1438 +++++++- .../arch/x86/broadwellx/uncore-memory.json | 2849 ++++++++++++++- .../arch/x86/broadwellx/uncore-other.json | 3252 +++++++++++++++++ .../arch/x86/broadwellx/uncore-power.json | 437 ++- .../arch/x86/broadwellx/virtual-memory.json | 2 +- 12 files changed, 11585 insertions(+), 259 deletions(-) commit b43a5442d894ef66fb861b25680b32acd0e0dd7c Author: Zhengjun Xing Date: Thu Jun 9 17:42:22 2022 +0800 perf vendor events intel: Update event list for Snowridgex More uncore events are added in the converter tool: https://github.com/intel/event-converter-for-linux-perf Keep both alias and the original name for the events, in case someone already used the alias in their script. Generate the perf events based on Snowridgex(SNR) event list v1.20: https://download.01.org/perfmon/SNR/ Signed-off-by: Xing Zhengjun Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220609094222.2030167-2-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/pmu-events/arch/x86/snowridgex/cache.json | 60 +- .../arch/x86/snowridgex/floating-point.json | 9 +- .../pmu-events/arch/x86/snowridgex/frontend.json | 20 +- .../pmu-events/arch/x86/snowridgex/memory.json | 4 +- .../perf/pmu-events/arch/x86/snowridgex/other.json | 18 +- .../pmu-events/arch/x86/snowridgex/pipeline.json | 98 +- .../arch/x86/snowridgex/uncore-memory.json | 520 +- .../arch/x86/snowridgex/uncore-other.json | 25562 ++++++++++++++++++- .../arch/x86/snowridgex/uncore-power.json | 226 +- .../arch/x86/snowridgex/virtual-memory.json | 69 +- 10 files changed, 25009 insertions(+), 1577 deletions(-) commit 9146af441315d03efdf95f4d53682f5e621a79a6 Author: Zhengjun Xing Date: Thu Jun 9 17:42:21 2022 +0800 perf vendor events intel: Rename tremontx to snowridgex Tremontx was an old name for Snowridgex, so rename Tremontx to Snowridgex. Reviewed-by: Kan Liang Signed-off-by: Xing Zhengjun Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220609094222.2030167-1-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- tools/perf/pmu-events/arch/x86/{tremontx => snowridgex}/cache.json | 0 .../pmu-events/arch/x86/{tremontx => snowridgex}/floating-point.json | 0 tools/perf/pmu-events/arch/x86/{tremontx => snowridgex}/frontend.json | 0 tools/perf/pmu-events/arch/x86/{tremontx => snowridgex}/memory.json | 0 tools/perf/pmu-events/arch/x86/{tremontx => snowridgex}/other.json | 0 tools/perf/pmu-events/arch/x86/{tremontx => snowridgex}/pipeline.json | 0 .../pmu-events/arch/x86/{tremontx => snowridgex}/uncore-memory.json | 0 .../perf/pmu-events/arch/x86/{tremontx => snowridgex}/uncore-other.json | 0 .../perf/pmu-events/arch/x86/{tremontx => snowridgex}/uncore-power.json | 0 .../pmu-events/arch/x86/{tremontx => snowridgex}/virtual-memory.json | 0 11 files changed, 1 insertion(+), 1 deletion(-) commit 6a92916de5189ee71dfaec50c4708161f02a9270 Author: Zhengjun Xing Date: Tue Jun 7 17:27:49 2022 +0800 perf vendor events intel: Update event list for Sapphirerapids Update JSON event list for Sapphirerapids to perf. Based on JSON list v1.02: https://download.01.org/perfmon/SPR/ Signed-off-by: Xing Zhengjun Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220607092749.1976878-2-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/sapphirerapids/cache.json | 89 ++++++++++++++++++++-- .../arch/x86/sapphirerapids/floating-point.json | 6 ++ .../arch/x86/sapphirerapids/frontend.json | 16 ++++ .../pmu-events/arch/x86/sapphirerapids/memory.json | 12 ++- .../pmu-events/arch/x86/sapphirerapids/other.json | 4 + .../arch/x86/sapphirerapids/pipeline.json | 81 +++++++++++++++++++- .../arch/x86/sapphirerapids/virtual-memory.json | 20 +++++ 7 files changed, 217 insertions(+), 11 deletions(-) commit 5fa2481cdfe05855ba99a2a9028fd2c9c1af2dcf Author: Zhengjun Xing Date: Tue Jun 7 17:27:48 2022 +0800 perf vendor events intel: Update event list for Alderlake Update JSON event list for Alderlake to perf. It is a hybrid event list for both Atom and Core. Based on JSON list v1.11: https://download.01.org/perfmon/ADL/ Signed-off-by: Xing Zhengjun Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220607092749.1976878-1-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/pmu-events/arch/x86/alderlake/cache.json | 147 +++++++++++--- .../arch/x86/alderlake/floating-point.json | 19 +- .../pmu-events/arch/x86/alderlake/frontend.json | 38 +++- .../perf/pmu-events/arch/x86/alderlake/memory.json | 40 ++-- .../perf/pmu-events/arch/x86/alderlake/other.json | 43 ++-- .../pmu-events/arch/x86/alderlake/pipeline.json | 222 ++++++++++++++++++--- .../arch/x86/alderlake/virtual-memory.json | 27 ++- 7 files changed, 440 insertions(+), 96 deletions(-) commit 8147f79ea575463d60ddc0735bceaef89bb34a4c Author: Colin Ian King Date: Thu Jul 21 13:45:28 2022 +0100 perf inject: Fix spelling mistake "theads" -> "threads" There is a spelling mistake in a pr_err message. Fix it. Signed-off-by: Colin Ian King Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: kernel-janitors@vger.kernel.org Link: https://lore.kernel.org/r/20220721124528.20997-1-colin.i.king@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-inject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit acfb65fe1d11a97fcbac2e9dd857eb60a1af2897 Author: Yang Jihong Date: Sat Jul 9 09:50:33 2022 +0800 perf kwork: Add workqueue trace BPF support Implements workqueue trace bpf function. Test cases: # perf kwork -k workqueue lat -b Starting trace, Hit to stop and report ^C Kwork Name | Cpu | Avg delay | Count | Max delay | Max delay start | Max delay end | -------------------------------------------------------------------------------------------------------------------------------- (w)addrconf_verify_work | 0002 | 5.856 ms | 1 | 5.856 ms | 111994.634313 s | 111994.640169 s | (w)vmstat_update | 0001 | 1.247 ms | 1 | 1.247 ms | 111996.462651 s | 111996.463899 s | (w)neigh_periodic_work | 0001 | 1.183 ms | 1 | 1.183 ms | 111996.462789 s | 111996.463973 s | (w)neigh_managed_work | 0001 | 0.989 ms | 2 | 1.635 ms | 111996.462820 s | 111996.464455 s | (w)wb_workfn | 0000 | 0.667 ms | 1 | 0.667 ms | 111996.384273 s | 111996.384940 s | (w)bpf_prog_free_deferred | 0001 | 0.495 ms | 1 | 0.495 ms | 111986.314201 s | 111986.314696 s | (w)mix_interrupt_randomness | 0002 | 0.421 ms | 6 | 0.749 ms | 111995.927750 s | 111995.928499 s | (w)vmstat_shepherd | 0000 | 0.374 ms | 2 | 0.385 ms | 111991.265242 s | 111991.265627 s | (w)e1000_watchdog | 0002 | 0.356 ms | 5 | 0.390 ms | 111994.528380 s | 111994.528770 s | (w)vmstat_update | 0000 | 0.231 ms | 2 | 0.365 ms | 111996.384407 s | 111996.384772 s | (w)flush_to_ldisc | 0006 | 0.165 ms | 1 | 0.165 ms | 111995.930606 s | 111995.930771 s | (w)flush_to_ldisc | 0000 | 0.094 ms | 2 | 0.095 ms | 111996.460453 s | 111996.460548 s | -------------------------------------------------------------------------------------------------------------------------------- # perf kwork -k workqueue rep -b Starting trace, Hit to stop and report ^C Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- (w)e1000_watchdog | 0002 | 0.627 ms | 2 | 0.324 ms | 112002.720665 s | 112002.720989 s | (w)flush_to_ldisc | 0007 | 0.598 ms | 2 | 0.534 ms | 112000.875226 s | 112000.875761 s | (w)wq_barrier_func | 0007 | 0.492 ms | 1 | 0.492 ms | 112000.876981 s | 112000.877473 s | (w)flush_to_ldisc | 0007 | 0.281 ms | 1 | 0.281 ms | 112005.826882 s | 112005.827163 s | (w)mix_interrupt_randomness | 0002 | 0.229 ms | 3 | 0.102 ms | 112005.825671 s | 112005.825774 s | (w)vmstat_shepherd | 0000 | 0.202 ms | 1 | 0.202 ms | 112001.504511 s | 112001.504713 s | (w)bpf_prog_free_deferred | 0001 | 0.181 ms | 1 | 0.181 ms | 112000.883251 s | 112000.883432 s | (w)wb_workfn | 0007 | 0.130 ms | 1 | 0.130 ms | 112001.505195 s | 112001.505325 s | (w)vmstat_update | 0000 | 0.053 ms | 1 | 0.053 ms | 112001.504763 s | 112001.504815 s | -------------------------------------------------------------------------------------------------------------------------------- Signed-off-by: Yang Jihong Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220709015033.38326-18-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_kwork.c | 18 ++++++- tools/perf/util/bpf_skel/kwork_trace.bpf.c | 84 ++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 1 deletion(-) commit 5a81927a407c050ab870a253b2684a7e48d604a3 Author: Yang Jihong Date: Sat Jul 9 09:50:32 2022 +0800 perf kwork: Add softirq trace BPF support Implements softirq trace bpf function. Test cases: Trace softirq latency without filter: # perf kwork -k softirq lat -b Starting trace, Hit to stop and report ^C Kwork Name | Cpu | Avg delay | Count | Max delay | Max delay start | Max delay end | -------------------------------------------------------------------------------------------------------------------------------- (s)RCU:9 | 0005 | 0.281 ms | 3 | 0.338 ms | 111295.752222 s | 111295.752560 s | (s)RCU:9 | 0002 | 0.262 ms | 24 | 1.400 ms | 111301.335986 s | 111301.337386 s | (s)SCHED:7 | 0005 | 0.177 ms | 14 | 0.212 ms | 111295.752270 s | 111295.752481 s | (s)RCU:9 | 0007 | 0.161 ms | 47 | 2.022 ms | 111295.402159 s | 111295.404181 s | (s)NET_RX:3 | 0003 | 0.149 ms | 12 | 1.261 ms | 111301.192964 s | 111301.194225 s | (s)TIMER:1 | 0001 | 0.105 ms | 9 | 0.198 ms | 111301.180191 s | 111301.180389 s | ... ... (s)NET_RX:3 | 0002 | 0.098 ms | 6 | 0.124 ms | 111295.403760 s | 111295.403884 s | (s)SCHED:7 | 0001 | 0.093 ms | 19 | 0.242 ms | 111301.180256 s | 111301.180498 s | (s)SCHED:7 | 0007 | 0.078 ms | 15 | 0.188 ms | 111300.064226 s | 111300.064415 s | (s)SCHED:7 | 0004 | 0.077 ms | 11 | 0.213 ms | 111301.361759 s | 111301.361973 s | (s)SCHED:7 | 0000 | 0.063 ms | 33 | 0.805 ms | 111295.401811 s | 111295.402616 s | (s)SCHED:7 | 0003 | 0.063 ms | 14 | 0.085 ms | 111301.192255 s | 111301.192340 s | -------------------------------------------------------------------------------------------------------------------------------- Trace softirq latency with cpu filter: # perf kwork -k softirq lat -b -C 1 Starting trace, Hit to stop and report ^C Kwork Name | Cpu | Avg delay | Count | Max delay | Max delay start | Max delay end | -------------------------------------------------------------------------------------------------------------------------------- (s)RCU:9 | 0001 | 0.178 ms | 5 | 0.572 ms | 111435.534135 s | 111435.534707 s | -------------------------------------------------------------------------------------------------------------------------------- Trace softirq latency with name filter: # perf kwork -k softirq lat -b -n SCHED Starting trace, Hit to stop and report ^C Kwork Name | Cpu | Avg delay | Count | Max delay | Max delay start | Max delay end | -------------------------------------------------------------------------------------------------------------------------------- (s)SCHED:7 | 0001 | 0.295 ms | 15 | 2.183 ms | 111452.534950 s | 111452.537133 s | (s)SCHED:7 | 0002 | 0.215 ms | 10 | 0.315 ms | 111460.000238 s | 111460.000553 s | (s)SCHED:7 | 0005 | 0.190 ms | 29 | 0.338 ms | 111457.032538 s | 111457.032876 s | (s)SCHED:7 | 0003 | 0.097 ms | 10 | 0.319 ms | 111452.434351 s | 111452.434670 s | (s)SCHED:7 | 0006 | 0.089 ms | 1 | 0.089 ms | 111450.737450 s | 111450.737539 s | (s)SCHED:7 | 0007 | 0.085 ms | 17 | 0.169 ms | 111452.471333 s | 111452.471502 s | (s)SCHED:7 | 0004 | 0.071 ms | 15 | 0.221 ms | 111452.535252 s | 111452.535473 s | (s)SCHED:7 | 0000 | 0.044 ms | 32 | 0.130 ms | 111460.001982 s | 111460.002112 s | -------------------------------------------------------------------------------------------------------------------------------- Signed-off-by: Yang Jihong Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220709015033.38326-17-yangjihong1@huawei.com [ Add {} for multiline if blocks ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_kwork.c | 18 ++++++- tools/perf/util/bpf_skel/kwork_trace.bpf.c | 75 ++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 1 deletion(-) commit 420298aefe94840f577a711add335105306faece Author: Yang Jihong Date: Sat Jul 9 09:50:31 2022 +0800 perf kwork: Add IRQ trace BPF support Implements irq trace bpf function. Test cases: Trace irq without filter: # perf kwork -k irq rep -b Starting trace, Hit to stop and report ^C Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- virtio0-requests:25 | 0000 | 31.026 ms | 285 | 1.493 ms | 110326.049963 s | 110326.051456 s | eth0:10 | 0002 | 7.875 ms | 96 | 1.429 ms | 110313.916835 s | 110313.918264 s | ata_piix:14 | 0002 | 2.510 ms | 28 | 0.396 ms | 110331.367987 s | 110331.368383 s | -------------------------------------------------------------------------------------------------------------------------------- Trace irq with cpu filter: # perf kwork -k irq rep -b -C 0 Starting trace, Hit to stop and report ^C Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- virtio0-requests:25 | 0000 | 34.288 ms | 282 | 2.061 ms | 110358.078968 s | 110358.081029 s | -------------------------------------------------------------------------------------------------------------------------------- Trace irq with name filter: # perf kwork -k irq rep -b -n eth0 Starting trace, Hit to stop and report ^C Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- eth0:10 | 0002 | 2.184 ms | 21 | 0.572 ms | 110386.541699 s | 110386.542271 s | -------------------------------------------------------------------------------------------------------------------------------- Trace irq with summary: # perf kwork -k irq rep -b -S Starting trace, Hit to stop and report ^C Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- virtio0-requests:25 | 0000 | 42.923 ms | 285 | 1.181 ms | 110418.128867 s | 110418.130049 s | eth0:10 | 0002 | 2.085 ms | 20 | 0.668 ms | 110416.002935 s | 110416.003603 s | ata_piix:14 | 0002 | 0.970 ms | 4 | 0.656 ms | 110424.034482 s | 110424.035138 s | -------------------------------------------------------------------------------------------------------------------------------- Total count : 309 Total runtime (msec) : 45.977 (0.003% load average) Total time span (msec) : 17017.655 -------------------------------------------------------------------------------------------------------------------------------- Committer testing: # perf kwork -k irq rep -b Starting trace, Hit to stop and report ^C Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- nvme0q20:145 | 0019 | 0.570 ms | 28 | 0.064 ms | 26966.635102 s | 26966.635167 s | amdgpu:162 | 0002 | 0.568 ms | 29 | 0.068 ms | 26966.644346 s | 26966.644414 s | nvme0q4:129 | 0003 | 0.565 ms | 31 | 0.037 ms | 26966.614830 s | 26966.614866 s | nvme0q16:141 | 0015 | 0.205 ms | 66 | 0.012 ms | 26967.145161 s | 26967.145174 s | nvme0q29:154 | 0028 | 0.154 ms | 44 | 0.014 ms | 26967.078970 s | 26967.078984 s | nvme0q10:135 | 0009 | 0.134 ms | 43 | 0.011 ms | 26967.132093 s | 26967.132104 s | nvme0q2:127 | 0001 | 0.132 ms | 26 | 0.011 ms | 26966.883584 s | 26966.883595 s | nvme0q25:150 | 0024 | 0.127 ms | 32 | 0.014 ms | 26966.631419 s | 26966.631433 s | nvme0q14:139 | 0013 | 0.110 ms | 21 | 0.017 ms | 26966.760843 s | 26966.760861 s | nvme0q30:155 | 0029 | 0.102 ms | 30 | 0.022 ms | 26966.677171 s | 26966.677193 s | nvme0q13:138 | 0012 | 0.088 ms | 20 | 0.015 ms | 26966.738733 s | 26966.738748 s | nvme0q6:131 | 0005 | 0.087 ms | 13 | 0.020 ms | 26966.648445 s | 26966.648465 s | nvme0q28:153 | 0027 | 0.066 ms | 12 | 0.015 ms | 26966.771431 s | 26966.771447 s | nvme0q26:151 | 0025 | 0.060 ms | 13 | 0.012 ms | 26966.704266 s | 26966.704278 s | nvme0q21:146 | 0020 | 0.054 ms | 20 | 0.011 ms | 26967.322082 s | 26967.322094 s | nvme0q1:126 | 0000 | 0.046 ms | 11 | 0.013 ms | 26966.859754 s | 26966.859767 s | nvme0q17:142 | 0016 | 0.046 ms | 10 | 0.011 ms | 26967.114513 s | 26967.114524 s | xhci_hcd:74 | 0015 | 0.041 ms | 3 | 0.016 ms | 26967.086004 s | 26967.086020 s | nvme0q8:133 | 0007 | 0.039 ms | 12 | 0.008 ms | 26966.712056 s | 26966.712063 s | nvme0q32:157 | 0031 | 0.036 ms | 10 | 0.014 ms | 26966.627054 s | 26966.627068 s | nvme0q9:134 | 0008 | 0.036 ms | 11 | 0.011 ms | 26967.258452 s | 26967.258462 s | nvme0q7:132 | 0006 | 0.024 ms | 3 | 0.014 ms | 26966.767404 s | 26966.767418 s | nvme0q11:136 | 0010 | 0.023 ms | 5 | 0.006 ms | 26966.935455 s | 26966.935461 s | nvme0q31:156 | 0030 | 0.018 ms | 5 | 0.006 ms | 26966.627517 s | 26966.627524 s | nvme0q12:137 | 0011 | 0.015 ms | 2 | 0.014 ms | 26966.799588 s | 26966.799602 s | enp5s0-rx-0:164 | 0006 | 0.009 ms | 2 | 0.005 ms | 26966.742024 s | 26966.742028 s | enp5s0-rx-1:165 | 0007 | 0.006 ms | 2 | 0.004 ms | 26966.939486 s | 26966.939490 s | enp5s0-tx-0:166 | 0008 | 0.005 ms | 1 | 0.005 ms | 26966.939484 s | 26966.939489 s | enp5s0-tx-1:167 | 0009 | 0.005 ms | 1 | 0.005 ms | 26966.939484 s | 26966.939489 s | -------------------------------------------------------------------------------------------------------------------------------- #t Signed-off-by: Yang Jihong Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220709015033.38326-16-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_kwork.c | 38 +++++++- tools/perf/util/bpf_skel/kwork_trace.bpf.c | 150 +++++++++++++++++++++++++++++ 2 files changed, 187 insertions(+), 1 deletion(-) commit daf07d220710a3c8a3a6d2170486fa9d2b1f80fd Author: Yang Jihong Date: Sat Jul 9 09:50:30 2022 +0800 perf kwork: Implement BPF trace 'perf record' generates perf.data, which generates extra interrupts for hard disk, amount of data to be collected increases with time. Using eBPF trace can process the data in kernel, which solves the preceding two problems. Add -b/--use-bpf option for latency and report to support tracing kwork events using eBPF: 1. Create bpf prog and attach to tracepoints, 2. Start tracing after command is entered, 3. After user hit "ctrl+c", stop tracing and report, 4. Support CPU and name filtering. This commit implements the framework code and does not add specific event support. Test cases: # perf kwork rep -h Usage: perf kwork report [] -b, --use-bpf Use BPF to measure kwork runtime -C, --cpu list of cpus to profile -i, --input input file name -n, --name event name to profile -s, --sort sort by key(s): runtime, max, count -S, --with-summary Show summary with statistics --time Time span for analysis (start,stop) # perf kwork lat -h Usage: perf kwork latency [] -b, --use-bpf Use BPF to measure kwork latency -C, --cpu list of cpus to profile -i, --input input file name -n, --name event name to profile -s, --sort sort by key(s): avg, max, count --time Time span for analysis (start,stop) # perf kwork lat -b Unsupported bpf trace class irq # perf kwork rep -b Unsupported bpf trace class irq Signed-off-by: Yang Jihong Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220709015033.38326-15-yangjihong1@huawei.com [ Simplify work_findnew() ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-kwork.txt | 10 ++ tools/perf/Makefile.perf | 1 + tools/perf/builtin-kwork.c | 74 +++++++- tools/perf/util/Build | 1 + tools/perf/util/bpf_kwork.c | 278 +++++++++++++++++++++++++++++ tools/perf/util/bpf_skel/kwork_trace.bpf.c | 74 ++++++++ tools/perf/util/kwork.h | 35 ++++ 7 files changed, 467 insertions(+), 6 deletions(-) commit bcc8b3e88d6fa1a3a3662bfebd26214b62b61c81 Author: Yang Jihong Date: Sat Jul 9 09:50:29 2022 +0800 perf kwork: Implement perf kwork timehist Implements framework of perf kwork timehist, to provide an analysis of kernel work events. Test cases: # perf kwork tim Runtime start Runtime end Cpu Kwork name Runtime Delaytime (TYPE)NAME:NUM (msec) (msec) ----------------- ----------------- ------ ------------------------------ ---------- ---------- 91576.060290 91576.060344 [0000] (s)RCU:9 0.055 0.111 91576.061470 91576.061547 [0000] (s)SCHED:7 0.077 0.073 91576.062604 91576.062697 [0001] (s)RCU:9 0.094 0.409 91576.064443 91576.064517 [0002] (s)RCU:9 0.074 0.114 91576.065144 91576.065211 [0000] (s)SCHED:7 0.067 0.058 91576.066564 91576.066609 [0003] (s)RCU:9 0.045 0.110 91576.068495 91576.068559 [0000] (s)SCHED:7 0.064 0.059 91576.068900 91576.068996 [0004] (s)RCU:9 0.096 0.726 91576.069364 91576.069420 [0002] (s)RCU:9 0.056 0.082 91576.069649 91576.069701 [0004] (s)RCU:9 0.052 0.111 91576.070147 91576.070206 [0000] (s)SCHED:7 0.060 0.057 91576.073147 91576.073202 [0000] (s)SCHED:7 0.054 0.060 # perf kwork tim --max-stack 2 -g Runtime start Runtime end Cpu Kwork name Runtime Delaytime (TYPE)NAME:NUM (msec) (msec) ----------------- ----------------- ------ ------------------------------ ---------- ---------- 91576.060290 91576.060344 [0000] (s)RCU:9 0.055 0.111 irq_exit_rcu <- sysvec_apic_timer_interrupt 91576.061470 91576.061547 [0000] (s)SCHED:7 0.077 0.073 irq_exit_rcu <- sysvec_call_function_single 91576.062604 91576.062697 [0001] (s)RCU:9 0.094 0.409 irq_exit_rcu <- sysvec_apic_timer_interrupt 91576.064443 91576.064517 [0002] (s)RCU:9 0.074 0.114 irq_exit_rcu <- sysvec_apic_timer_interrupt 91576.065144 91576.065211 [0000] (s)SCHED:7 0.067 0.058 irq_exit_rcu <- sysvec_call_function_single 91576.066564 91576.066609 [0003] (s)RCU:9 0.045 0.110 irq_exit_rcu <- sysvec_apic_timer_interrupt 91576.068495 91576.068559 [0000] (s)SCHED:7 0.064 0.059 irq_exit_rcu <- sysvec_call_function_single 91576.068900 91576.068996 [0004] (s)RCU:9 0.096 0.726 irq_exit_rcu <- sysvec_apic_timer_interrupt 91576.069364 91576.069420 [0002] (s)RCU:9 0.056 0.082 irq_exit_rcu <- sysvec_apic_timer_interrupt 91576.069649 91576.069701 [0004] (s)RCU:9 0.052 0.111 irq_exit_rcu <- sysvec_apic_timer_interrupt Committer testing: # perf kwork -k workqueue timehist | head -40 Runtime start Runtime end Cpu Kwork name Runtime Delaytime (TYPE)NAME:NUM (msec) (msec) ----------------- ----------------- ------ ------------------------------ ---------- ---------- 26520.211825 26520.211832 [0019] (w)free_work 0.007 0.004 26520.212929 26520.212934 [0020] (w)free_work 0.005 0.004 26520.213226 26520.213228 [0014] (w)kfree_rcu_work 0.002 0.004 26520.214057 26520.214061 [0021] (w)free_work 0.004 0.004 26520.221239 26520.221241 [0007] (w)kfree_rcu_work 0.002 0.009 26520.223232 26520.223238 [0013] (w)psi_avgs_work 0.005 0.006 26520.230057 26520.230060 [0020] (w)free_work 0.003 0.003 26520.270428 26520.270434 [0015] (w)free_work 0.006 0.004 26520.270546 26520.270550 [0014] (w)free_work 0.004 0.003 26520.281626 26520.281629 [0015] (w)free_work 0.003 0.002 26520.287225 26520.287230 [0012] (w)psi_avgs_work 0.005 0.008 26520.287231 26520.287235 [0001] (w)psi_avgs_work 0.004 0.011 26520.287236 26520.287239 [0001] (w)psi_avgs_work 0.003 0.012 26520.329488 26520.329492 [0024] (w)free_work 0.004 0.004 26520.330600 26520.330605 [0007] (w)free_work 0.005 0.004 26520.334218 26520.334218 [0007] (w)kfree_rcu_monitor 0.001 0.002 26520.335220 26520.335221 [0005] (w)kfree_rcu_monitor 0.001 0.004 26520.343980 26520.343985 [0007] (w)free_work 0.005 0.002 26520.345093 26520.345097 [0006] (w)free_work 0.004 0.003 26520.351233 26520.351238 [0027] (w)psi_avgs_work 0.005 0.008 26520.353228 26520.353229 [0007] (w)kfree_rcu_work 0.001 0.002 26520.353229 26520.353231 [0005] (w)kfree_rcu_work 0.001 0.006 26520.382381 26520.382383 [0006] (w)free_work 0.003 0.002 26520.386547 26520.386548 [0006] (w)free_work 0.002 0.001 26520.391243 26520.391245 [0015] (w)console_callback 0.002 0.016 26520.415369 26520.415621 [0027] (w)btrfs_work_helper 0.252 26520.415351 26520.416174 [0002] (w)btrfs_work_helper 0.823 0.037 26520.415343 26520.416304 [0031] (w)btrfs_work_helper 0.961 26520.415335 26520.417078 [0001] (w)btrfs_work_helper 1.743 26520.415250 26520.417564 [0002] (w)wb_workfn 2.314 26520.424777 26520.424787 [0002] (w)btrfs_work_helper 0.010 26520.424788 26520.424798 [0002] (w)btrfs_work_helper 0.010 26520.424790 26520.424805 [0001] (w)btrfs_work_helper 0.016 0.016 26520.424801 26520.424807 [0002] (w)btrfs_work_helper 0.006 26520.424809 26520.424831 [0002] (w)btrfs_work_helper 0.022 0.030 26520.424824 26520.424835 [0027] (w)btrfs_work_helper 0.011 26520.424809 26520.424867 [0001] (w)btrfs_work_helper 0.059 0.032 # Signed-off-by: Yang Jihong Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220709015033.38326-14-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-kwork.txt | 65 +++++++ tools/perf/builtin-kwork.c | 299 +++++++++++++++++++++++++++++++- tools/perf/util/kwork.h | 3 + 3 files changed, 366 insertions(+), 1 deletion(-) commit 53e49e32ae651984463b536fa379eab5149b5ead Author: Yang Jihong Date: Sat Jul 9 09:50:28 2022 +0800 perf kwork: Add workqueue latency support Implements workqueue latency function. Test cases: # perf kwork -k workqueue lat Kwork Name | Cpu | Avg delay | Count | Max delay | Max delay start | Max delay end | -------------------------------------------------------------------------------------------------------------------------------- (w)vmstat_update | 0001 | 5.004 ms | 1 | 5.004 ms | 44001.745646 s | 44001.750650 s | (w)vmstat_update | 0006 | 1.773 ms | 1 | 1.773 ms | 44000.830840 s | 44000.832613 s | (w)vmstat_shepherd | 0000 | 0.992 ms | 8 | 2.474 ms | 44007.717845 s | 44007.720318 s | (w)vmstat_update | 0000 | 0.974 ms | 5 | 2.624 ms | 44004.785970 s | 44004.788594 s | (w)e1000_watchdog | 0002 | 0.687 ms | 5 | 2.632 ms | 44005.009334 s | 44005.011966 s | (w)vmstat_update | 0002 | 0.307 ms | 1 | 0.307 ms | 44004.817395 s | 44004.817702 s | (w)vmstat_update | 0004 | 0.296 ms | 1 | 0.296 ms | 43997.913677 s | 43997.913973 s | (w)mix_interrupt_randomness | 0000 | 0.283 ms | 285 | 3.724 ms | 44006.790889 s | 44006.794613 s | (w)neigh_managed_work | 0001 | 0.271 ms | 1 | 0.271 ms | 43997.665542 s | 43997.665813 s | (w)vmstat_update | 0005 | 0.261 ms | 1 | 0.261 ms | 44007.820542 s | 44007.820803 s | (w)neigh_managed_work | 0004 | 0.220 ms | 1 | 0.220 ms | 44002.953287 s | 44002.953507 s | (w)neigh_periodic_work | 0004 | 0.217 ms | 1 | 0.217 ms | 43999.929718 s | 43999.929935 s | (w)mix_interrupt_randomness | 0002 | 0.199 ms | 5 | 0.310 ms | 44005.012316 s | 44005.012625 s | (w)vmstat_update | 0003 | 0.199 ms | 4 | 0.307 ms | 44005.714391 s | 44005.714699 s | (w)gc_worker | 0001 | 0.071 ms | 173 | 1.128 ms | 44002.062579 s | 44002.063707 s | -------------------------------------------------------------------------------------------------------------------------------- INFO: 0.020% skipped events (17 including 10 raise, 7 entry, 0 exit) Signed-off-by: Yang Jihong Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220709015033.38326-13-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kwork.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 19807bba5ad612c4f95139152aa059c4efb4aba7 Author: Yang Jihong Date: Sat Jul 9 09:50:27 2022 +0800 perf kwork: Add softirq latency support Implements softirq latency function. Test cases: # perf kwork -k softirq lat Kwork Name | Cpu | Avg delay | Count | Max delay | Max delay start | Max delay end | -------------------------------------------------------------------------------------------------------------------------------- (s)TIMER:1 | 0006 | 1.048 ms | 1 | 1.048 ms | 44000.829759 s | 44000.830807 s | (s)TIMER:1 | 0001 | 1.008 ms | 4 | 3.434 ms | 43997.662069 s | 43997.665503 s | (s)RCU:9 | 0006 | 0.675 ms | 7 | 1.328 ms | 43997.670304 s | 43997.671632 s | (s)RCU:9 | 0000 | 0.414 ms | 701 | 3.996 ms | 43997.661170 s | 43997.665167 s | (s)RCU:9 | 0005 | 0.245 ms | 88 | 1.866 ms | 43997.683105 s | 43997.684971 s | (s)SCHED:7 | 0000 | 0.158 ms | 677 | 2.639 ms | 44004.785716 s | 44004.788355 s | ... ... (s)RCU:9 | 0002 | 0.141 ms | 932 | 1.662 ms | 44005.010206 s | 44005.011868 s | (s)RCU:9 | 0003 | 0.129 ms | 2193 | 1.507 ms | 44006.010208 s | 44006.011715 s | (s)TIMER:1 | 0005 | 0.128 ms | 1 | 0.128 ms | 44007.820346 s | 44007.820474 s | (s)SCHED:7 | 0002 | 0.040 ms | 1731 | 0.211 ms | 44005.009237 s | 44005.009447 s | -------------------------------------------------------------------------------------------------------------------------------- # perf kwork -k softirq lat -C 1,2 Kwork Name | Cpu | Avg delay | Count | Max delay | Max delay start | Max delay end | -------------------------------------------------------------------------------------------------------------------------------- (s)TIMER:1 | 0001 | 1.008 ms | 4 | 3.434 ms | 43997.662069 s | 43997.665503 s | (s)RCU:9 | 0001 | 0.216 ms | 1619 | 3.659 ms | 43997.662069 s | 43997.665727 s | (s)RCU:9 | 0002 | 0.141 ms | 932 | 1.662 ms | 44005.010206 s | 44005.011868 s | (s)NET_RX:3 | 0002 | 0.106 ms | 5 | 0.163 ms | 44005.012255 s | 44005.012418 s | (s)TIMER:1 | 0002 | 0.084 ms | 9 | 0.114 ms | 44005.009168 s | 44005.009282 s | (s)SCHED:7 | 0001 | 0.049 ms | 655 | 0.837 ms | 44005.707998 s | 44005.708835 s | (s)SCHED:7 | 0002 | 0.040 ms | 1731 | 0.211 ms | 44005.009237 s | 44005.009447 s | -------------------------------------------------------------------------------------------------------------------------------- # perf kwork -k softirq lat -n RCU Kwork Name | Cpu | Avg delay | Count | Max delay | Max delay start | Max delay end | -------------------------------------------------------------------------------------------------------------------------------- (s)RCU:9 | 0006 | 0.675 ms | 7 | 1.328 ms | 43997.670304 s | 43997.671632 s | (s)RCU:9 | 0000 | 0.414 ms | 701 | 3.996 ms | 43997.661170 s | 43997.665167 s | (s)RCU:9 | 0005 | 0.245 ms | 88 | 1.866 ms | 43997.683105 s | 43997.684971 s | (s)RCU:9 | 0004 | 0.237 ms | 26 | 0.792 ms | 43997.683018 s | 43997.683810 s | (s)RCU:9 | 0007 | 0.217 ms | 140 | 1.335 ms | 43997.671080 s | 43997.672415 s | (s)RCU:9 | 0001 | 0.216 ms | 1619 | 3.659 ms | 43997.662069 s | 43997.665727 s | (s)RCU:9 | 0002 | 0.141 ms | 932 | 1.662 ms | 44005.010206 s | 44005.011868 s | (s)RCU:9 | 0003 | 0.129 ms | 2193 | 1.507 ms | 44006.010208 s | 44006.011715 s | -------------------------------------------------------------------------------------------------------------------------------- # perf kwork -k softirq lat -s count,avg -n RCU Kwork Name | Cpu | Avg delay | Count | Max delay | Max delay start | Max delay end | -------------------------------------------------------------------------------------------------------------------------------- (s)RCU:9 | 0003 | 0.129 ms | 2193 | 1.507 ms | 44006.010208 s | 44006.011715 s | (s)RCU:9 | 0001 | 0.216 ms | 1619 | 3.659 ms | 43997.662069 s | 43997.665727 s | (s)RCU:9 | 0002 | 0.141 ms | 932 | 1.662 ms | 44005.010206 s | 44005.011868 s | (s)RCU:9 | 0000 | 0.414 ms | 701 | 3.996 ms | 43997.661170 s | 43997.665167 s | (s)RCU:9 | 0007 | 0.217 ms | 140 | 1.335 ms | 43997.671080 s | 43997.672415 s | (s)RCU:9 | 0005 | 0.245 ms | 88 | 1.866 ms | 43997.683105 s | 43997.684971 s | (s)RCU:9 | 0004 | 0.237 ms | 26 | 0.792 ms | 43997.683018 s | 43997.683810 s | (s)RCU:9 | 0006 | 0.675 ms | 7 | 1.328 ms | 43997.670304 s | 43997.671632 s | -------------------------------------------------------------------------------------------------------------------------------- # perf kwork -k softirq lat --time 43997, Kwork Name | Cpu | Avg delay | Count | Max delay | Max delay start | Max delay end | -------------------------------------------------------------------------------------------------------------------------------- (s)TIMER:1 | 0006 | 1.048 ms | 1 | 1.048 ms | 44000.829759 s | 44000.830807 s | (s)TIMER:1 | 0001 | 1.008 ms | 4 | 3.434 ms | 43997.662069 s | 43997.665503 s | (s)RCU:9 | 0006 | 0.675 ms | 7 | 1.328 ms | 43997.670304 s | 43997.671632 s | (s)RCU:9 | 0000 | 0.414 ms | 701 | 3.996 ms | 43997.661170 s | 43997.665167 s | (s)TIMER:1 | 0004 | 0.083 ms | 21 | 0.127 ms | 44004.969171 s | 44004.969298 s | ... ... (s)SCHED:7 | 0005 | 0.050 ms | 4 | 0.086 ms | 43997.684852 s | 43997.684938 s | (s)SCHED:7 | 0001 | 0.049 ms | 655 | 0.837 ms | 44005.707998 s | 44005.708835 s | (s)SCHED:7 | 0007 | 0.044 ms | 171 | 0.077 ms | 43997.943265 s | 43997.943342 s | (s)SCHED:7 | 0002 | 0.040 ms | 1731 | 0.211 ms | 44005.009237 s | 44005.009447 s | -------------------------------------------------------------------------------------------------------------------------------- Signed-off-by: Yang Jihong Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220709015033.38326-12-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kwork.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit ad3d9f7a929ab2df9615f3068f2c1c61bdbd4535 Author: Yang Jihong Date: Sat Jul 9 09:50:26 2022 +0800 perf kwork: Implement perf kwork latency Implements framework of perf kwork latency, which is used to report time properties such as delay time and frequency. Test cases: # perf kwork lat -h Usage: perf kwork latency [] -C, --cpu list of cpus to profile -i, --input input file name -n, --name event name to profile -s, --sort sort by key(s): avg, max, count --time Time span for analysis (start,stop) # perf kwork lat -C 199 Requested CPU 199 too large. Consider raising MAX_NR_CPUS Invalid cpu bitmap # perf kwork lat -i perf_no_exist.data failed to open perf_no_exist.data: No such file or directory # perf kwork lat -s avg1 Error: Unknown --sort key: `avg1' Usage: perf kwork latency [] -C, --cpu list of cpus to profile -i, --input input file name -n, --name event name to profile -s, --sort sort by key(s): avg, max, count --time Time span for analysis (start,stop) # perf kwork lat --time FFFF, Invalid time span # perf kwork lat Kwork Name | Cpu | Avg delay | Count | Max delay | Max delay start | Max delay end | -------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- INFO: 36.570% skipped events (31537 including 0 raise, 31537 entry, 0 exit) Since there are no latency-enabled events, the output is empty. Signed-off-by: Yang Jihong Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220709015033.38326-11-yangjihong1@huawei.com [ Add {} for multiline if blocks ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-kwork.txt | 29 ++++++ tools/perf/builtin-kwork.c | 163 +++++++++++++++++++++++++++++++- tools/perf/util/kwork.h | 14 +++ 3 files changed, 205 insertions(+), 1 deletion(-) commit 8dbc3c86896f75cd3b23926fe04ced49b92796e4 Author: Yang Jihong Date: Sat Jul 9 09:50:25 2022 +0800 perf kwork: Add workqueue report support Implements workqueue report function. Test cases: # perf kwork -k workqueue rep Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- (w)gc_worker | 0001 | 1912.389 ms | 173 | 12.896 ms | 44002.050787 s | 44002.063683 s | (w)mix_interrupt_randomness | 0000 | 24.308 ms | 285 | 3.349 ms | 44004.784908 s | 44004.788257 s | (w)e1000_watchdog | 0002 | 5.332 ms | 5 | 2.059 ms | 44000.914366 s | 44000.916424 s | (w)vmstat_update | 0005 | 0.989 ms | 2 | 0.953 ms | 43997.986991 s | 43997.987944 s | (w)vmstat_shepherd | 0000 | 0.964 ms | 8 | 0.195 ms | 43997.986453 s | 43997.986648 s | (w)vmstat_update | 0003 | 0.306 ms | 6 | 0.077 ms | 44004.689543 s | 44004.689620 s | (w)vmstat_update | 0000 | 0.196 ms | 5 | 0.049 ms | 44005.713732 s | 44005.713781 s | (w)vmstat_update | 0001 | 0.162 ms | 2 | 0.130 ms | 44000.192034 s | 44000.192164 s | (w)mix_interrupt_randomness | 0002 | 0.114 ms | 5 | 0.037 ms | 44005.012625 s | 44005.012662 s | (w)vmstat_update | 0002 | 0.084 ms | 2 | 0.043 ms | 44004.817702 s | 44004.817745 s | (w)vmstat_update | 0006 | 0.067 ms | 2 | 0.041 ms | 43997.987214 s | 43997.987254 s | (w)neigh_periodic_work | 0004 | 0.039 ms | 1 | 0.039 ms | 43999.929935 s | 43999.929974 s | (w)vmstat_update | 0007 | 0.037 ms | 1 | 0.037 ms | 43997.988969 s | 43997.989006 s | (w)neigh_managed_work | 0001 | 0.036 ms | 1 | 0.036 ms | 43997.665813 s | 43997.665849 s | (w)neigh_managed_work | 0004 | 0.036 ms | 1 | 0.036 ms | 44002.953507 s | 44002.953543 s | (w)vmstat_update | 0004 | 0.027 ms | 1 | 0.027 ms | 43997.913973 s | 43997.914000 s | -------------------------------------------------------------------------------------------------------------------------------- # perf kwork -k workqueue rep -S Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- (w)gc_worker | 0001 | 1912.389 ms | 173 | 12.896 ms | 44002.050787 s | 44002.063683 s | (w)mix_interrupt_randomness | 0000 | 24.308 ms | 285 | 3.349 ms | 44004.784908 s | 44004.788257 s | (w)e1000_watchdog | 0002 | 5.332 ms | 5 | 2.059 ms | 44000.914366 s | 44000.916424 s | (w)vmstat_update | 0005 | 0.989 ms | 2 | 0.953 ms | 43997.986991 s | 43997.987944 s | (w)vmstat_shepherd | 0000 | 0.964 ms | 8 | 0.195 ms | 43997.986453 s | 43997.986648 s | (w)vmstat_update | 0003 | 0.306 ms | 6 | 0.077 ms | 44004.689543 s | 44004.689620 s | (w)vmstat_update | 0000 | 0.196 ms | 5 | 0.049 ms | 44005.713732 s | 44005.713781 s | (w)vmstat_update | 0001 | 0.162 ms | 2 | 0.130 ms | 44000.192034 s | 44000.192164 s | (w)mix_interrupt_randomness | 0002 | 0.114 ms | 5 | 0.037 ms | 44005.012625 s | 44005.012662 s | (w)vmstat_update | 0002 | 0.084 ms | 2 | 0.043 ms | 44004.817702 s | 44004.817745 s | (w)vmstat_update | 0006 | 0.067 ms | 2 | 0.041 ms | 43997.987214 s | 43997.987254 s | (w)neigh_periodic_work | 0004 | 0.039 ms | 1 | 0.039 ms | 43999.929935 s | 43999.929974 s | (w)vmstat_update | 0007 | 0.037 ms | 1 | 0.037 ms | 43997.988969 s | 43997.989006 s | (w)neigh_managed_work | 0001 | 0.036 ms | 1 | 0.036 ms | 43997.665813 s | 43997.665849 s | (w)neigh_managed_work | 0004 | 0.036 ms | 1 | 0.036 ms | 44002.953507 s | 44002.953543 s | (w)vmstat_update | 0004 | 0.027 ms | 1 | 0.027 ms | 43997.913973 s | 43997.914000 s | -------------------------------------------------------------------------------------------------------------------------------- Total count : 500 Total runtime (msec) : 1945.085 (0.192% load average) Total time span (msec) : 10155.026 -------------------------------------------------------------------------------------------------------------------------------- # perf kwork -k workqueue rep -n vmstat_update Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- (w)vmstat_update | 0005 | 0.989 ms | 2 | 0.953 ms | 43997.986991 s | 43997.987944 s | (w)vmstat_update | 0003 | 0.306 ms | 6 | 0.077 ms | 44004.689543 s | 44004.689620 s | (w)vmstat_update | 0000 | 0.196 ms | 5 | 0.049 ms | 44005.713732 s | 44005.713781 s | (w)vmstat_update | 0001 | 0.162 ms | 2 | 0.130 ms | 44000.192034 s | 44000.192164 s | (w)vmstat_update | 0002 | 0.084 ms | 2 | 0.043 ms | 44004.817702 s | 44004.817745 s | (w)vmstat_update | 0006 | 0.067 ms | 2 | 0.041 ms | 43997.987214 s | 43997.987254 s | (w)vmstat_update | 0007 | 0.037 ms | 1 | 0.037 ms | 43997.988969 s | 43997.989006 s | (w)vmstat_update | 0004 | 0.027 ms | 1 | 0.027 ms | 43997.913973 s | 43997.914000 s | -------------------------------------------------------------------------------------------------------------------------------- Committer testing: # perf kwork -k workqueue rep -C 1 | head -20 Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- (w)commit_work | 0001 | 25.896 ms | 2 | 13.200 ms | 26522.906700 s | 26522.919900 s | (w)commit_work | 0001 | 13.316 ms | 1 | 13.316 ms | 26522.573246 s | 26522.586562 s | (w)commit_work | 0001 | 13.177 ms | 1 | 13.177 ms | 26522.673406 s | 26522.686583 s | (w)commit_work | 0001 | 12.630 ms | 1 | 12.630 ms | 26522.123921 s | 26522.136551 s | (w)btrfs_work_helper | 0001 | 3.544 ms | 1 | 3.544 ms | 26529.131296 s | 26529.134840 s | (w)btrfs_work_helper | 0001 | 3.330 ms | 1 | 3.330 ms | 26529.137698 s | 26529.141028 s | (w)btrfs_work_helper | 0001 | 2.855 ms | 1 | 2.855 ms | 26529.134842 s | 26529.137697 s | (w)btrfs_work_helper | 0001 | 2.757 ms | 1 | 2.757 ms | 26529.124086 s | 26529.126843 s | (w)btrfs_work_helper | 0001 | 2.182 ms | 1 | 2.182 ms | 26529.141030 s | 26529.143212 s | (w)btrfs_work_helper | 0001 | 1.743 ms | 1 | 1.743 ms | 26520.415335 s | 26520.417078 s | (w)btrfs_work_helper | 0001 | 1.499 ms | 1 | 1.499 ms | 26529.127774 s | 26529.129272 s | (w)btrfs_work_helper | 0001 | 1.446 ms | 1 | 1.446 ms | 26529.129848 s | 26529.131294 s | (w)btrfs_work_helper | 0001 | 1.373 ms | 1 | 1.373 ms | 26523.808270 s | 26523.809643 s | (w)wb_workfn | 0001 | 1.165 ms | 2 | 0.763 ms | 26527.071056 s | 26527.071819 s | (w)btrfs_work_helper | 0001 | 0.926 ms | 1 | 0.926 ms | 26529.126846 s | 26529.127771 s | (w)btrfs_work_helper | 0001 | 0.571 ms | 1 | 0.571 ms | 26529.129275 s | 26529.129846 s | (w)wb_workfn | 0001 | 0.525 ms | 1 | 0.525 ms | 26522.975151 s | 26522.975676 s | # Signed-off-by: Yang Jihong Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220709015033.38326-10-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kwork.c | 74 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 2 deletions(-) commit 4c14819169b7a89b0fd016c0e7c2f1e50a82744c Author: Yang Jihong Date: Sat Jul 9 09:50:24 2022 +0800 perf kwork: Add softirq report support Implements softirq kwork report function. Test cases: # perf kwork -k softirq rep Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- (s)TIMER:1 | 0003 | 181.387 ms | 2476 | 1.240 ms | 44004.787960 s | 44004.789201 s | (s)RCU:9 | 0003 | 91.573 ms | 2193 | 0.650 ms | 44004.790258 s | 44004.790908 s | (s)RCU:9 | 0001 | 78.960 ms | 1619 | 1.195 ms | 44001.496553 s | 44001.497749 s | (s)SCHED:7 | 0003 | 55.962 ms | 1255 | 0.954 ms | 44004.812008 s | 44004.812962 s | ... ... (s)RCU:9 | 0004 | 0.830 ms | 26 | 0.058 ms | 43997.666418 s | 43997.666476 s | (s)TIMER:1 | 0001 | 0.471 ms | 4 | 0.158 ms | 44007.834694 s | 44007.834852 s | (s)RCU:9 | 0006 | 0.220 ms | 7 | 0.048 ms | 44004.833764 s | 44004.833812 s | (s)NET_RX:3 | 0002 | 0.164 ms | 5 | 0.049 ms | 44005.012418 s | 44005.012466 s | (s)TIMER:1 | 0005 | 0.164 ms | 1 | 0.164 ms | 44007.820474 s | 44007.820638 s | (s)TIMER:1 | 0006 | 0.087 ms | 1 | 0.087 ms | 44000.830807 s | 44000.830894 s | (s)SCHED:7 | 0006 | 0.080 ms | 2 | 0.044 ms | 43997.826145 s | 43997.826189 s | -------------------------------------------------------------------------------------------------------------------------------- # # perf kwork -k softirq rep -S Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- (s)TIMER:1 | 0003 | 181.387 ms | 2476 | 1.240 ms | 44004.787960 s | 44004.789201 s | (s)RCU:9 | 0003 | 91.573 ms | 2193 | 0.650 ms | 44004.790258 s | 44004.790908 s | (s)RCU:9 | 0001 | 78.960 ms | 1619 | 1.195 ms | 44001.496553 s | 44001.497749 s | (s)SCHED:7 | 0000 | 63.631 ms | 680 | 2.690 ms | 44006.721976 s | 44006.724666 s | ... ... (s)SCHED:7 | 0003 | 55.962 ms | 1255 | 0.954 ms | 44004.812008 s | 44004.812962 s | (s)RCU:9 | 0006 | 0.220 ms | 7 | 0.048 ms | 44004.833764 s | 44004.833812 s | (s)NET_RX:3 | 0002 | 0.164 ms | 5 | 0.049 ms | 44005.012418 s | 44005.012466 s | (s)TIMER:1 | 0005 | 0.164 ms | 1 | 0.164 ms | 44007.820474 s | 44007.820638 s | (s)TIMER:1 | 0006 | 0.087 ms | 1 | 0.087 ms | 44000.830807 s | 44000.830894 s | (s)SCHED:7 | 0006 | 0.080 ms | 2 | 0.044 ms | 43997.826145 s | 43997.826189 s | -------------------------------------------------------------------------------------------------------------------------------- Total count : 12748 Total runtime (msec) : 661.433 (0.065% load average) Total time span (msec) : 10176.441 -------------------------------------------------------------------------------------------------------------------------------- # # perf kwork -k softirq rep -s count,max Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- (s)TIMER:1 | 0003 | 181.387 ms | 2476 | 1.240 ms | 44004.787960 s | 44004.789201 s | (s)RCU:9 | 0003 | 91.573 ms | 2193 | 0.650 ms | 44004.790258 s | 44004.790908 s | (s)SCHED:7 | 0002 | 50.039 ms | 1731 | 0.074 ms | 44005.009447 s | 44005.009521 s | (s)RCU:9 | 0001 | 78.960 ms | 1619 | 1.195 ms | 44001.496553 s | 44001.497749 s | (s)SCHED:7 | 0003 | 55.962 ms | 1255 | 0.954 ms | 44004.812008 s | 44004.812962 s | ... ... (s)RCU:9 | 0002 | 35.241 ms | 932 | 0.407 ms | 44005.009541 s | 44005.009949 s | (s)RCU:9 | 0000 | 45.710 ms | 702 | 1.144 ms | 44004.787023 s | 44004.788167 s | (s)SCHED:7 | 0006 | 0.080 ms | 2 | 0.044 ms | 43997.826145 s | 43997.826189 s | (s)TIMER:1 | 0005 | 0.164 ms | 1 | 0.164 ms | 44007.820474 s | 44007.820638 s | (s)TIMER:1 | 0006 | 0.087 ms | 1 | 0.087 ms | 44000.830807 s | 44000.830894 s | -------------------------------------------------------------------------------------------------------------------------------- Committer testing: # perf kwork -k softirq report -C 2 -s count,max Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- (s)SCHED:7 | 0002 | 0.980 ms | 159 | 0.024 ms | 26035.571037 s | 26035.571061 s | (s)RCU:9 | 0002 | 0.124 ms | 88 | 0.021 ms | 26035.177050 s | 26035.177071 s | (s)TIMER:1 | 0002 | 0.122 ms | 56 | 0.007 ms | 26035.468045 s | 26035.468052 s | -------------------------------------------------------------------------------------------------------------------------------- # Signed-off-by: Yang Jihong Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220709015033.38326-9-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kwork.c | 98 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 2 deletions(-) commit 94348520c6f1313041373d5f7f9c7d636996fdba Author: Yang Jihong Date: Sat Jul 9 09:50:23 2022 +0800 perf kwork: Add irq report support Implements irq kwork report function. Test cases: # perf kwork record -- sleep 10 [ perf record: Woken up 0 times to write data ] [ perf record: Captured and wrote 6.134 MB perf.data ] # perf kwork report Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- virtio0-requests:25 | 0000 | 1167.501 ms | 18284 | 1.096 ms | 44004.464905 s | 44004.466001 s | eth0:10 | 0002 | 0.185 ms | 5 | 0.058 ms | 44005.012222 s | 44005.012280 s | -------------------------------------------------------------------------------------------------------------------------------- # perf kwork report -C 2 Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- eth0:10 | 0002 | 0.185 ms | 5 | 0.058 ms | 44005.012222 s | 44005.012280 s | -------------------------------------------------------------------------------------------------------------------------------- # perf kwork report -C 3 Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- # perf kwork report -i perf.data Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- virtio0-requests:25 | 0000 | 1167.501 ms | 18284 | 1.096 ms | 44004.464905 s | 44004.466001 s | eth0:10 | 0002 | 0.185 ms | 5 | 0.058 ms | 44005.012222 s | 44005.012280 s | -------------------------------------------------------------------------------------------------------------------------------- # perf kwork report -s max,freq Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- virtio0-requests:25 | 0000 | 1167.501 ms | 18284 | 1.096 ms | 44004.464905 s | 44004.466001 s | eth0:10 | 0002 | 0.185 ms | 5 | 0.058 ms | 44005.012222 s | 44005.012280 s | -------------------------------------------------------------------------------------------------------------------------------- # perf kwork report -S Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- virtio0-requests:25 | 0000 | 1167.501 ms | 18284 | 1.096 ms | 44004.464905 s | 44004.466001 s | eth0:10 | 0002 | 0.185 ms | 5 | 0.058 ms | 44005.012222 s | 44005.012280 s | -------------------------------------------------------------------------------------------------------------------------------- Total count : 18289 Total runtime (msec) : 1167.686 (0.115% load average) Total time span (msec) : 10159.155 -------------------------------------------------------------------------------------------------------------------------------- # perf kwork report --time 44005, Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- virtio0-requests:25 | 0000 | 402.173 ms | 4695 | 0.981 ms | 44007.831992 s | 44007.832973 s | eth0:10 | 0002 | 0.089 ms | 2 | 0.058 ms | 44005.012222 s | 44005.012280 s | -------------------------------------------------------------------------------------------------------------------------------- Committer testing: # perf kwork report Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- nvme0q5:130 | 0004 | 1.101 ms | 49 | 0.051 ms | 26035.056403 s | 26035.056455 s | amdgpu:162 | 0002 | 0.176 ms | 9 | 0.046 ms | 26035.268020 s | 26035.268066 s | nvme0q24:149 | 0023 | 0.161 ms | 55 | 0.009 ms | 26035.655280 s | 26035.655288 s | nvme0q20:145 | 0019 | 0.090 ms | 33 | 0.014 ms | 26035.939018 s | 26035.939032 s | nvme0q31:156 | 0030 | 0.075 ms | 21 | 0.010 ms | 26035.052237 s | 26035.052247 s | nvme0q8:133 | 0007 | 0.062 ms | 12 | 0.021 ms | 26035.416840 s | 26035.416861 s | nvme0q6:131 | 0005 | 0.054 ms | 22 | 0.010 ms | 26035.199919 s | 26035.199929 s | nvme0q19:144 | 0018 | 0.052 ms | 14 | 0.010 ms | 26035.110615 s | 26035.110625 s | nvme0q7:132 | 0006 | 0.049 ms | 13 | 0.007 ms | 26035.125180 s | 26035.125187 s | nvme0q18:143 | 0017 | 0.033 ms | 14 | 0.007 ms | 26035.169698 s | 26035.169705 s | nvme0q17:142 | 0016 | 0.013 ms | 1 | 0.013 ms | 26035.565147 s | 26035.565160 s | enp5s0-rx-0:164 | 0006 | 0.004 ms | 4 | 0.002 ms | 26035.928882 s | 26035.928884 s | enp5s0-tx-0:166 | 0008 | 0.003 ms | 3 | 0.002 ms | 26035.870923 s | 26035.870925 s | -------------------------------------------------------------------------------------------------------------------------------- # Signed-off-by: Yang Jihong Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220709015033.38326-8-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kwork.c | 63 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 2 deletions(-) commit f98919ec4fccdacf45c63c4ee73b31f3e6b6024d Author: Yang Jihong Date: Sat Jul 9 09:50:22 2022 +0800 perf kwork: Implement 'report' subcommand Implements framework of 'perf kwork report', which is used to report time properties such as run time and frequency: Test cases: # perf kwork Usage: perf kwork [] {record|report} -D, --dump-raw-trace dump raw trace in ASCII -f, --force don't complain, do it -k, --kwork list of kwork to profile (irq, softirq, workqueue, etc) -v, --verbose be more verbose (show symbol address, etc) # perf kwork report -h Usage: perf kwork report [] -C, --cpu list of cpus to profile -i, --input input file name -n, --name event name to profile -s, --sort sort by key(s): runtime, max, count -S, --with-summary Show summary with statistics --time Time span for analysis (start,stop) # perf kwork report Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- # perf kwork report -S Kwork Name | Cpu | Total Runtime | Count | Max runtime | Max runtime start | Max runtime end | -------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- Total count : 0 Total runtime (msec) : 0.000 (0.000% load average) Total time span (msec) : 0.000 -------------------------------------------------------------------------------------------------------------------------------- # perf kwork report -C 0,100 Requested CPU 100 too large. Consider raising MAX_NR_CPUS Invalid cpu bitmap # perf kwork report -s runtime1 Error: Unknown --sort key: `runtime1' Usage: perf kwork report [] -C, --cpu list of cpus to profile -i, --input input file name -n, --name event name to profile -s, --sort sort by key(s): runtime, max, count -S, --with-summary Show summary with statistics --time Time span for analysis (start,stop) # perf kwork report -i perf_no_exist.data failed to open perf_no_exist.data: No such file or directory # perf kwork report --time 00FFF, Invalid time span Since there are no report supported events, the output is empty. Briefly describe the data structure: 1. "class" indicates event type. For example, irq and softiq correspond to different types. 2. "cluster" refers to a specific event corresponding to a type. For example, RCU and TIMER in softirq correspond to different clusters, which contains three types of events: raise, entry, and exit. 3. "atom" includes time of each sample and sample of the previous phase. (For example, exit corresponds to entry, which is used for timehist.) Committer notes: - Add {} for multiline if blocks. - report_print_work() should either return that ret variable that accounts how many bytes were printed or stop accounting and be void. Do the former for now to avoid this: builtin-kwork.c:534:6: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable] int ret = 0; ^ 1 error generated. When building with: ⬢[acme@toolbox perf]$ clang --version clang version 13.0.0 (https://github.com/llvm/llvm-project e8991caea8690ec2d17b0b7e1c29bf0da6609076) Also: - if ((dst_type >= 0) && (dst_type < KWORK_TRACE_MAX)) { + if (dst_type < KWORK_TRACE_MAX) { Several versions of clang and at least this gcc: 3 51.40 alpine:3.9 : FAIL gcc version 8.3.0 (Alpine 8.3.0) builtin-kwork.c:411:16: error: comparison of unsigned enum expression >= 0 is always true [-Werror,-Wtautological-compare] if ((dst_type >= 0) && (dst_type < KWORK_TRACE_MAX)) { As the first entry in a enum is zero. Signed-off-by: Yang Jihong Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220709015033.38326-7-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-kwork.txt | 33 ++ tools/perf/builtin-kwork.c | 862 +++++++++++++++++++++++++++++++- tools/perf/util/kwork.h | 161 ++++++ 3 files changed, 1054 insertions(+), 2 deletions(-) commit 17d9c15c9b9e7fb285f7ac5367dfb5f00ff575e3 Author: Li Jinlin Date: Mon Jul 25 11:20:50 2022 +0800 fsdax: Fix infinite loop in dax_iomap_rw() I got an infinite loop and a WARNING report when executing a tail command in virtiofs. WARNING: CPU: 10 PID: 964 at fs/iomap/iter.c:34 iomap_iter+0x3a2/0x3d0 Modules linked in: CPU: 10 PID: 964 Comm: tail Not tainted 5.19.0-rc7 Call Trace: dax_iomap_rw+0xea/0x620 ? __this_cpu_preempt_check+0x13/0x20 fuse_dax_read_iter+0x47/0x80 fuse_file_read_iter+0xae/0xd0 new_sync_read+0xfe/0x180 ? 0xffffffff81000000 vfs_read+0x14d/0x1a0 ksys_read+0x6d/0xf0 __x64_sys_read+0x1a/0x20 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd The tail command will call read() with a count of 0. In this case, iomap_iter() will report this WARNING, and always return 1 which casuing the infinite loop in dax_iomap_rw(). Fixing by checking count whether is 0 in dax_iomap_rw(). Fixes: ca289e0b95af ("fsdax: switch dax_iomap_rw to use iomap_iter") Signed-off-by: Li Jinlin Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20220725032050.3873372-1-lijinlin3@huawei.com Signed-off-by: Dan Williams fs/dax.c | 3 +++ 1 file changed, 3 insertions(+) commit 04ad63f086d1a9649b8b082748cbc7a570ade461 Author: Dan Williams Date: Tue Jan 11 08:06:40 2022 -0800 cxl/region: Introduce cxl_pmem_region objects The LIBNVDIMM subsystem is a platform agnostic representation of system NVDIMM / persistent memory resources. To date, the CXL subsystem's interaction with LIBNVDIMM has been to register an nvdimm-bridge device and cxl_nvdimm objects to proxy CXL capabilities into existing LIBNVDIMM subsystem mechanics. With regions the approach is the same. Create a new cxl_pmem_region object to proxy CXL region details into a LIBNVDIMM definition. With this enabling LIBNVDIMM can partition CXL persistent memory regions with legacy namespace labels. A follow-on patch will add CXL region label and CXL namespace label support to persist region configurations across driver reload / system-reset events. Co-developed-by: Ben Widawsky Signed-off-by: Ben Widawsky Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784340111.1758207.3036498385188290968.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/core.h | 3 + drivers/cxl/core/pmem.c | 4 +- drivers/cxl/core/port.c | 2 + drivers/cxl/core/region.c | 142 +++++++++++++++++++++++++- drivers/cxl/cxl.h | 36 ++++++- drivers/cxl/pmem.c | 238 ++++++++++++++++++++++++++++++++++++++++++- drivers/nvdimm/region_devs.c | 28 +++-- include/linux/libnvdimm.h | 5 + 8 files changed, 446 insertions(+), 12 deletions(-) commit 99183d26ed6191010fca09518dae34d6aff3cd14 Author: Dan Williams Date: Fri Jun 10 17:39:59 2022 -0700 cxl/pmem: Fix offline_nvdimm_bus() to offline by bridge Be careful to only disable cxl_pmem objects related to a given cxl_nvdimm_bridge. Otherwise, offline_nvdimm_bus() reaches across CXL domains and disables more than is expected. Fixes: 21083f51521f ("cxl/pmem: Register 'pmem' / cxl_nvdimm devices") Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784339569.1758207.1557084545278004577.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/cxl.h | 1 + drivers/cxl/pmem.c | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) commit 8d48817df6ac2049955b6b3a4f1b68dbe5b31f1b Author: Dan Williams Date: Tue Jun 15 14:00:40 2021 -0700 cxl/region: Add region driver boiler plate The CXL region driver is responsible for routing fully formed CXL regions to one of libnvdimm, for persistent memory regions, device-dax for volatile memory regions, or just act as an enumeration placeholder if the region was setup and configuration locked by platform firmware. In the platform-firmware-setup case the expectation is that region is already accounted in the system memory map, i.e. already enabled as "System RAM". For now, just attach to CXL regions in the CXL_CONFIG_COMMIT state, and take no further action. Given this driver is just a small / simple router, include it in the core rather than its own module. Co-developed-by: Ben Widawsky Signed-off-by: Ben Widawsky Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220624041950.559155-18-dan.j.williams@intel.com Signed-off-by: Dan Williams drivers/cxl/core/core.h | 12 ++++++++++++ drivers/cxl/core/port.c | 9 +++++++++ drivers/cxl/core/region.c | 45 ++++++++++++++++++++++++++++++++++++++++++++- drivers/cxl/cxl.h | 1 + 4 files changed, 66 insertions(+), 1 deletion(-) commit d63ed7fe85eed2e70bdb16610f327edc765f4c44 Author: Randy Dunlap Date: Mon Jul 25 13:22:24 2022 -0700 x86/cyrix: include header linux/isa-dma.h x86/kernel/cpu/cyrix.c now needs to include since the 'isa_dma_bridge_buggy' variable was moved to it. Fixes this build error: ../arch/x86/kernel/cpu/cyrix.c: In function ‘init_cyrix’: ../arch/x86/kernel/cpu/cyrix.c:277:17: error: ‘isa_dma_bridge_buggy’ undeclared (first use in this function) 277 | isa_dma_bridge_buggy = 2; Fixes: abb4970ac335 ("PCI: Move isa_dma_bridge_buggy out of asm/dma.h") Link: https://lore.kernel.org/r/20220725202224.29269-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Signed-off-by: Bjorn Helgaas Acked-by: Stafford Horne Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org arch/x86/kernel/cpu/cyrix.c | 1 + 1 file changed, 1 insertion(+) commit e432947ef5500f0c89ab044e00ee7842d38bdb39 Author: Yang Jihong Date: Sat Jul 9 09:50:21 2022 +0800 tools lib: Add list_last_entry_or_null() Add list_last_entry_or_null() to get the last element from a list, returns NULL if the list is empty. Signed-off-by: Yang Jihong Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220709015033.38326-6-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/list.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 97179d9d086ff96b3af0f00f0e279203ec7b57c4 Author: Yang Jihong Date: Sat Jul 9 09:50:20 2022 +0800 perf kwork: Add workqueue kwork record support Record workqueue events workqueue:workqueue_activate_work, workqueue:workqueue_execute_start & workqueue:workqueue_execute_end Tese cases: Record all events: # perf kwork record -o perf_kwork.date -- sleep 1 [ perf record: Woken up 0 times to write data ] [ perf record: Captured and wrote 0.857 MB perf_kwork.date ] # # perf evlist -i perf_kwork.date irq:irq_handler_entry irq:irq_handler_exit irq:softirq_raise irq:softirq_entry irq:softirq_exit workqueue:workqueue_activate_work workqueue:workqueue_execute_start workqueue:workqueue_execute_end dummy:HG # Tip: use 'perf evlist --trace-fields' to show fields for tracepoint events Record workqueue events: # perf kwork -k workqueue record -o perf_kwork.date -- sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.081 MB perf_kwork.date ] # # perf evlist -i perf_kwork.date workqueue:workqueue_activate_work workqueue:workqueue_execute_start workqueue:workqueue_execute_end dummy:HG # Tip: use 'perf evlist --trace-fields' to show fields for tracepoint events Committer testing: # perf kwork record sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 3.430 MB perf.data (24130 samples) ] # perf evlist -v irq:irq_handler_entry: type: 2, size: 128, config: 0x97, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|RAW|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, sample_id_all: 1, exclude_guest: 1 irq:irq_handler_exit: type: 2, size: 128, config: 0x96, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|RAW|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, sample_id_all: 1, exclude_guest: 1 irq:softirq_raise: type: 2, size: 128, config: 0x93, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|RAW|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, sample_id_all: 1, exclude_guest: 1 irq:softirq_entry: type: 2, size: 128, config: 0x95, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|RAW|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, sample_id_all: 1, exclude_guest: 1 irq:softirq_exit: type: 2, size: 128, config: 0x94, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|RAW|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, sample_id_all: 1, exclude_guest: 1 workqueue:workqueue_activate_work: type: 2, size: 128, config: 0x106, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|RAW|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, sample_id_all: 1, exclude_guest: 1 workqueue:workqueue_execute_start: type: 2, size: 128, config: 0x105, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|RAW|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, sample_id_all: 1, exclude_guest: 1 workqueue:workqueue_execute_end: type: 2, size: 128, config: 0x104, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|RAW|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, sample_id_all: 1, exclude_guest: 1 dummy:HG: type: 1, size: 128, config: 0x9, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|RAW|IDENTIFIER, read_format: ID, inherit: 1, mmap: 1, comm: 1, task: 1, sample_id_all: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1 # Tip: use 'perf evlist --trace-fields' to show fields for tracepoint events # perf script | grep workqueue | head swapper 0 [018] 26035.043289: workqueue:workqueue_activate_work: work struct 0xffff8b8ffeeae368 kworker/18:2-ev 70440 [018] 26035.043293: workqueue:workqueue_execute_start: work struct 0xffff8b8ffeeae368: function free_work kworker/18:2-ev 70440 [018] 26035.043301: workqueue:workqueue_execute_end: work struct 0xffff8b8ffeeae368: function free_work swapper 0 [021] 26035.044704: workqueue:workqueue_activate_work: work struct 0xffff8b8ffef6e368 kworker/21:0-ev 4080535 [021] 26035.044709: workqueue:workqueue_execute_start: work struct 0xffff8b8ffef6e368: function free_work kworker/21:0-ev 4080535 [021] 26035.044716: workqueue:workqueue_execute_end: work struct 0xffff8b8ffef6e368: function free_work swapper 0 [018] 26035.045230: workqueue:workqueue_activate_work: work struct 0xffff8b8ffeeae368 kworker/18:2-ev 70440 [018] 26035.045232: workqueue:workqueue_execute_start: work struct 0xffff8b8ffeeae368: function free_work kworker/18:2-ev 70440 [018] 26035.045235: workqueue:workqueue_execute_end: work struct 0xffff8b8ffeeae368: function free_work swapper 0 [001] 26035.052046: workqueue:workqueue_activate_work: work struct 0xffff8b8108901590 # Signed-off-by: Yang Jihong Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220709015033.38326-5-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-kwork.txt | 2 +- tools/perf/builtin-kwork.c | 16 +++++++++++++++- tools/perf/util/kwork.h | 1 + 3 files changed, 17 insertions(+), 2 deletions(-) commit e64393219069879e26483a6f92ec0cf2e1c43582 Author: Yang Jihong Date: Sat Jul 9 09:50:19 2022 +0800 perf kwork: Add softirq kwork record support Record softirq events irq:softirq_raise, irq:softirq_entry & irq:softirq_exit. Test cases: Record all events: # perf kwork record -o perf_kwork.date -- sleep 1 [ perf record: Woken up 0 times to write data ] [ perf record: Captured and wrote 0.897 MB perf_kwork.date ] # # perf evlist -i perf_kwork.date irq:irq_handler_entry irq:irq_handler_exit irq:softirq_raise irq:softirq_entry irq:softirq_exit dummy:HG # Tip: use 'perf evlist --trace-fields' to show fields for tracepoint events Record softirq events: # perf kwork -k softirq record -o perf_kwork.date -- sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.141 MB perf_kwork.date ] # # perf evlist -i perf_kwork.date irq:softirq_raise irq:softirq_entry irq:softirq_exit dummy:HG # Tip: use 'perf evlist --trace-fields' to show fields for tracepoint events Committer testing: # perf kwork record sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 3.078 MB perf.data (17433 samples) ] # perf evlist -v irq:irq_handler_entry: type: 2, size: 128, config: 0x97, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|RAW|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, sample_id_all: 1, exclude_guest: 1 irq:irq_handler_exit: type: 2, size: 128, config: 0x96, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|RAW|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, sample_id_all: 1, exclude_guest: 1 irq:softirq_raise: type: 2, size: 128, config: 0x93, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|RAW|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, sample_id_all: 1, exclude_guest: 1 irq:softirq_entry: type: 2, size: 128, config: 0x95, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|RAW|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, sample_id_all: 1, exclude_guest: 1 irq:softirq_exit: type: 2, size: 128, config: 0x94, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|RAW|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, sample_id_all: 1, exclude_guest: 1 dummy:HG: type: 1, size: 128, config: 0x9, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|RAW|IDENTIFIER, read_format: ID, inherit: 1, mmap: 1, comm: 1, task: 1, sample_id_all: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1 # Tip: use 'perf evlist --trace-fields' to show fields for tracepoint events # perf script | head migration/12 73 [012] 25884.940992: irq:softirq_raise: vec=9 [action=RCU] migration/12 73 [012] 25884.940994: irq:softirq_entry: vec=9 [action=RCU] migration/12 73 [012] 25884.940995: irq:softirq_exit: vec=9 [action=RCU] swapper 0 [004] 25884.940995: irq:softirq_raise: vec=9 [action=RCU] swapper 0 [004] 25884.940998: irq:softirq_entry: vec=9 [action=RCU] swapper 0 [004] 25884.940999: irq:softirq_exit: vec=9 [action=RCU] cc1 71212 [021] 25884.941990: irq:softirq_raise: vec=9 [action=RCU] swapper 0 [004] 25884.941991: irq:softirq_raise: vec=9 [action=RCU] cc1 71212 [021] 25884.941992: irq:softirq_raise: vec=7 [action=SCHED] perf-exec 71208 [013] 25884.941992: irq:softirq_raise: vec=9 [action=RCU] # Signed-off-by: Yang Jihong Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220709015033.38326-4-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-kwork.txt | 2 +- tools/perf/builtin-kwork.c | 16 +++++++++++++++- tools/perf/util/kwork.h | 1 + 3 files changed, 17 insertions(+), 2 deletions(-) commit 4f8ae962f0f71c682f97be5a9491694f9fbd814a Author: Yang Jihong Date: Sat Jul 9 09:50:18 2022 +0800 perf kwork: Add irq kwork record support Record interrupt events irq:irq_handler_entry & irq_handler_exit Test cases: # perf kwork record -o perf_kwork.date -- sleep 1 [ perf record: Woken up 0 times to write data ] [ perf record: Captured and wrote 0.556 MB perf_kwork.date ] # # perf evlist -i perf_kwork.date irq:irq_handler_entry irq:irq_handler_exit dummy:HG # Tip: use 'perf evlist --trace-fields' to show fields for tracepoint events # Signed-off-by: Yang Jihong Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220709015033.38326-3-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-kwork.txt | 2 +- tools/perf/builtin-kwork.c | 15 ++++++++++++++- tools/perf/util/kwork.h | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) commit 0f70d8e9db4f250f694a3befe88501027b1dc88e Author: Yang Jihong Date: Sat Jul 9 09:50:17 2022 +0800 perf kwork: New tool to trace time properties of kernel work (such as softirq, and workqueue) The 'perf kwork' tool is used to trace time properties of kernel work (such as irq, softirq, and workqueue), including runtime, latency, and timehist, using the infrastructure in the perf tools to allow tracing extra targets. This is the first commit to reuse the 'perf record' framework code to implement a simple record function, kwork is not supported currently. Test cases: # perf usage: perf [--version] [--help] [OPTIONS] COMMAND [ARGS] The most commonly used perf commands are: iostat Show I/O performance metrics kallsyms Searches running kernel for symbols kmem Tool to trace/measure kernel memory properties kvm Tool to trace/measure kvm guest os kwork Tool to trace/measure kernel work properties (latencies) list List all symbolic event types lock Analyze lock events mem Profile memory accesses record Run a command and record its profile into perf.data See 'perf help COMMAND' for more information on a specific command. # perf kwork Usage: perf kwork [] {record} -D, --dump-raw-trace dump raw trace in ASCII -f, --force don't complain, do it -k, --kwork list of kwork to profile -v, --verbose be more verbose (show symbol address, etc) # perf kwork record -- sleep 1 [ perf record: Woken up 0 times to write data ] [ perf record: Captured and wrote 1.787 MB perf.data ] Signed-off-by: Yang Jihong Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220709015033.38326-2-yangjihong1@huawei.com [ Add {} for multiline if blocks ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Build | 1 + tools/perf/Documentation/perf-kwork.txt | 43 +++++++++ tools/perf/builtin-kwork.c | 162 ++++++++++++++++++++++++++++++++ tools/perf/builtin.h | 1 + tools/perf/command-list.txt | 1 + tools/perf/perf.c | 1 + tools/perf/util/kwork.h | 41 ++++++++ 7 files changed, 250 insertions(+) commit b08b95cf30f53b674bdef510d4cfd0623199b036 Author: Sumeet Pawnikar Date: Tue Jul 26 18:32:29 2022 +0530 powercap: RAPL: Add Power Limit4 support for Alder Lake-N and Raptor Lake-P Add Alder Lake-N and Raptor Lake-P to the list of processor models for which Power Limit4 is supported by the Intel RAPL driver. Signed-off-by: Sumeet Pawnikar Reviewed-by: Srinivas Pandruvada Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl_msr.c | 2 ++ 1 file changed, 2 insertions(+) commit 4f4179fcf420873002035cf1941d844c9e0e7cb3 Author: Rafael J. Wysocki Date: Thu Jul 21 19:41:10 2022 +0200 ACPI: CPPC: Do not prevent CPPC from working in the future There is a problem with the current revision checks in is_cppc_supported() that they essentially prevent the CPPC support from working if a new _CPC package format revision being a proper superset of the v3 and only causing _CPC to return a package with more entries (while retaining the types and meaning of the entries defined by the v3) is introduced in the future and used by the platform firmware. In that case, as long as the number of entries in the _CPC return package is at least CPPC_V3_NUM_ENT, it should be perfectly fine to use the v3 support code and disregard the additional package entries added by the new package format revision. For this reason, drop is_cppc_supported() altogether, put the revision checks directly into acpi_cppc_processor_probe() so they are easier to follow and rework them to take the case mentioned above into account. Fixes: 4773e77cdc9b ("ACPI / CPPC: Add support for CPPC v3") Cc: 4.18+ # 4.18+ Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 54 +++++++++++++++++++++--------------------------- include/acpi/cppc_acpi.h | 2 +- 2 files changed, 25 insertions(+), 31 deletions(-) commit ec6c0503190417abf8b8f8e3e955ae583a4e50d4 Author: Rafael J. Wysocki Date: Thu Jul 21 18:13:30 2022 +0200 ACPI: PM: x86: Print messages regarding LPS0 idle support Because suspend-to-idle is always supported and on x86 it is the only way to suspend the system if S3 is not supported by the platform, the kernel attempts to enter low-power S0 idle in the suspend-to-idle flow regardless of whether or not the ACPI_FADT_LOW_POWER_S0 flag is set in the FADT. However, if that flag is not set, residency counters associated with low-power S0 idle may not count and the platform may refuse to put the EC into a low-power mode, for example. For this reason, print diagnostic messages when the platform should achieve significant energy savings in low-power S0 idle (because the ACPI_FADT_LOW_POWER_S0 flag is set in the FADT) and when suspend-to-idle becomes the default suspend method (because low-power S0 idle should be equally or more efficient than S3, if available). Signed-off-by: Rafael J. Wysocki Reviewed-by: Mario Limonciello drivers/acpi/sleep.c | 3 +++ drivers/acpi/x86/s2idle.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 8d36694245f2aec17f03a5e0b2797953d2e36704 Author: Shivnandan Kumar Date: Fri Jul 15 17:55:39 2022 +0530 PM: QoS: Add check to make sure CPU freq is non-negative CPU frequency should never be negative. If some client driver calls freq_qos_update_request with a negative value which will be very high in absolute terms, then frequency QoS sets max CPU freq at fmax as it considers it's absolute value but it will add plist node with negative priority. plist node has priority from INT_MIN (highest) to INT_MAX(lowest). Once priority is set as negative, another client will not be able to reduce CPU frequency. Adding check to make sure CPU freq is non-negative will fix this problem. Signed-off-by: Shivnandan Kumar [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki kernel/power/qos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8386c414e27caba8501119948e9551e52b527f59 Author: Tetsuo Handa Date: Fri Jul 15 14:49:58 2022 +0900 PM: hibernate: defer device probing when resuming from hibernation syzbot is reporting hung task at misc_open() [1], for there is a race window of AB-BA deadlock which involves probe_count variable. Currently wait_for_device_probe() from snapshot_open() from misc_open() can sleep forever with misc_mtx held if probe_count cannot become 0. When a device is probed by hub_event() work function, probe_count is incremented before the probe function starts, and probe_count is decremented after the probe function completed. There are three cases that can prevent probe_count from dropping to 0. (a) A device being probed stopped responding (i.e. broken/malicious hardware). (b) A process emulating a USB device using /dev/raw-gadget interface stopped responding for some reason. (c) New device probe requests keeps coming in before existing device probe requests complete. The phenomenon syzbot is reporting is (b). A process which is holding system_transition_mutex and misc_mtx is waiting for probe_count to become 0 inside wait_for_device_probe(), but the probe function which is called from hub_event() work function is waiting for the processes which are blocked at mutex_lock(&misc_mtx) to respond via /dev/raw-gadget interface. This patch mitigates (b) by deferring wait_for_device_probe() from snapshot_open() to snapshot_write() and snapshot_ioctl(). Please note that the possibility of (b) remains as long as any thread which is emulating a USB device via /dev/raw-gadget interface can be blocked by uninterruptible blocking operations (e.g. mutex_lock()). Please also note that (a) and (c) are not addressed. Regarding (c), we should change the code to wait for only one device which contains the image for resuming from hibernation. I don't know how to address (a), for use of timeout for wait_for_device_probe() might result in loss of user data in the image. Maybe we should require the userland to wait for the image device before opening /dev/snapshot interface. Link: https://syzkaller.appspot.com/bug?extid=358c9ab4c93da7b7238c [1] Reported-by: syzbot Signed-off-by: Tetsuo Handa Tested-by: syzbot Signed-off-by: Rafael J. Wysocki kernel/power/user.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 8d9fdb6011b4d413271eba3a62e10f89efecc419 Author: Dan Carpenter Date: Tue Jul 26 17:12:23 2022 +0300 ublk_drv: fix double shift bug The test/clear_bit() functions take a bit number, but this code is passing as shifted value. It's the equivalent of saying BIT(BIT(0)) instead of just BIT(0). This doesn't affect runtime because numbers are small and it's done consistently. Fixes: fa362045564e ("ublk: simplify ublk_ch_open and ublk_ch_release") Signed-off-by: Dan Carpenter Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/Yt/2R/+MJf/MSoyl@kili Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cd8efeeed16e8ecf30071583865f3f468db9e854 Author: Marcin Szycik Date: Mon Jul 18 14:18:13 2022 +0200 ice: Add support for PPPoE hardware offload Add support for creating PPPoE filters in switchdev mode. Add support for parsing PPPoE and PPP-specific tc options: pppoe_sid and ppp_proto. Example filter: tc filter add dev $PF1 ingress protocol ppp_ses prio 1 flower pppoe_sid \ 1234 ppp_proto ip skip_sw action mirred egress redirect dev $VF1_PR Changes in iproute2 are required to use the new fields. ICE COMMS DDP package is required to create a filter as it contains PPPoE profiles. Added a warning message when loaded DDP package does not contain required profiles. Signed-off-by: Marcin Szycik Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice.h | 1 + drivers/net/ethernet/intel/ice/ice_flex_pipe.c | 5 +- drivers/net/ethernet/intel/ice/ice_protocol_type.h | 11 ++ drivers/net/ethernet/intel/ice/ice_switch.c | 165 +++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_tc_lib.c | 71 ++++++++- drivers/net/ethernet/intel/ice/ice_tc_lib.h | 8 + 6 files changed, 259 insertions(+), 2 deletions(-) commit 6a21b0856daaf9b7f63225f5b449ddee170c6f0a Author: Wojciech Drewek Date: Mon Jul 18 14:18:12 2022 +0200 flow_offload: Introduce flow_match_pppoe Allow to offload PPPoE filters by adding flow_rule_match_pppoe. Drivers can extract PPPoE specific fields from now on. Signed-off-by: Wojciech Drewek Signed-off-by: Tony Nguyen include/net/flow_offload.h | 6 ++++++ net/core/flow_offload.c | 7 +++++++ 2 files changed, 13 insertions(+) commit f2a2f2c9aed21944095c2f867640a9089759c7e7 Author: Shubhrajyoti Datta Date: Thu Jul 21 14:30:21 2022 +0530 gpio: xilinx: add missing blank line after declarations Add a missing blank line. No functional changes. WARNING: Missing a blank line after declarations 128: FILE: drivers/gpio/gpio-xilinx.c:120: + void __iomem *addr = chip->regs + reg + xgpio_regoffset(chip, bit / 32); + xgpio_set_value32(a, bit, xgpio_readreg(addr)); WARNING: Missing a blank line after declarations 136: FILE: drivers/gpio/gpio-xilinx.c:126: + void __iomem *addr = chip->regs + reg + xgpio_regoffset(chip, bit / 32); + xgpio_writereg(addr, xgpio_get_value32(a, bit)); Signed-off-by: Shubhrajyoti Datta Reviewed-by: Michal Simek Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-xilinx.c | 2 ++ 1 file changed, 2 insertions(+) commit 5008750eff5d4af8a3aed4a7567c4cfb2b3cb156 Author: Wojciech Drewek Date: Mon Jul 18 14:18:11 2022 +0200 net/sched: flower: Add PPPoE filter Add support for PPPoE specific fields for tc-flower. Those fields can be provided only when protocol was set to ETH_P_PPP_SES. Defines, dump, load and set are being done here. Overwrite basic.n_proto only in case of PPP_IP and PPP_IPV6, otherwise leave it as ETH_P_PPP_SES. Signed-off-by: Wojciech Drewek Acked-by: Guillaume Nault Signed-off-by: Tony Nguyen include/uapi/linux/pkt_cls.h | 3 +++ net/sched/cls_flower.c | 64 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) commit 46126db9c86110e5fc1e369b9bb89735ddefdae4 Author: Wojciech Drewek Date: Mon Jul 18 14:18:10 2022 +0200 flow_dissector: Add PPPoE dissectors Allow to dissect PPPoE specific fields which are: - session ID (16 bits) - ppp protocol (16 bits) - type (16 bits) - this is PPPoE ethertype, for now only ETH_P_PPP_SES is supported, possible ETH_P_PPP_DISC in the future The goal is to make the following TC command possible: # tc filter add dev ens6f0 ingress prio 1 protocol ppp_ses \ flower \ pppoe_sid 12 \ ppp_proto ip \ action drop Note that only PPPoE Session is supported. Signed-off-by: Wojciech Drewek Acked-by: Guillaume Nault Signed-off-by: Tony Nguyen include/linux/ppp_defs.h | 14 ++++++++++++ include/net/flow_dissector.h | 13 +++++++++++ net/core/flow_dissector.c | 53 ++++++++++++++++++++++++++++++++++++++------ 3 files changed, 73 insertions(+), 7 deletions(-) commit a1873f837f9e5c1001462a635af1b0bab31aa9fd Author: Slark Xiao Date: Thu Jul 21 13:56:47 2022 +0800 dmaengine: mediatek: mtk-hsdma: Fix typo 'the the' in comment Replace 'the the' with 'the' in the comment. Signed-off-by: Slark Xiao Link: https://lore.kernel.org/r/20220721055647.46085-1-slark_xiao@163.com Signed-off-by: Vinod Koul drivers/dma/mediatek/mtk-hsdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9327c7e7539371c6f202303d5539afbae006ec72 Author: Mathias Tausen Date: Tue Jul 26 16:02:12 2022 +0200 dmaengine: axi-dmac: check cache coherency register Marking the DMA as cache coherent (dma-coherent in devicetree) is only safe with versions of axi_dmac that have this feature enabled. Cc: Lars-Peter Clausen Cc: Vinod Koul Acked-by: Nuno Sá Signed-off-by: Mathias Tausen Link: https://lore.kernel.org/r/20220726140213.786939-1-mta@satlab.com Signed-off-by: Vinod Koul drivers/dma/dma-axi-dmac.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 7df92384c86f36d0452e7abad21c7eaa91aeeef7 Author: Jiaxin Yu Date: Tue Jul 26 23:31:30 2022 +0800 ASoC: mediatek: mt8186: set the correct string to strncmp() Fix Smatch static checker warning. strncmp() here only needs to compare the first seven bytes, so in order to make the code more clear, only the first seven bytes of the string used as the comparison are reserved. Bug report: https://www.spinics.net/lists/alsa-devel/msg145608.html sound/soc/mediatek/mt8186/mt8186-dai-adda.c:78 get_adda_priv_by_name() warn: strncmp() with weird length: 17 vs 7 sound/soc/mediatek/mt8186/mt8186-dai-adda.c 72 static struct mtk_afe_adda_priv *get_adda_priv_by_name(struct mtk_base_afe *afe, 73 const char *name) 74 { 75 struct mt8186_afe_private *afe_priv = afe->platform_priv; 76 int dai_id; 77 --> 78 if (strncmp(name, "aud_dac_hires_clk", 7) == 0 || 79 strncmp(name, "aud_adc_hires_clk", 7) == 0) Fixes: b65c466220b3 ("ASoC: mediatek: mt8186: support adda in platform driver") Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/20220726153130.27584-1-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-dai-adda.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 66bbf1441d218316948877f7ec6b477c9a49d554 Author: Noam Date: Tue Jul 26 16:00:37 2022 +0300 spi: a3700: support BE for AC5 SPI driver Signed-off-by: Noam Tested-by: Raz Adashi Reviewed-by: Raz Adashi Signed-off-by: Vadym Kochan Link: https://lore.kernel.org/r/20220726130038.20995-1-vadym.kochan@plvision.eu Signed-off-by: Mark Brown drivers/spi/spi-armada-3700.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 729a8a57355f12d9ecba150fbef693e51b99e7ec Author: Marco Felsch Date: Mon May 30 11:22:25 2022 +0200 dt-bindings: reset: Add TPS380x documentation Add device-tree binding documentation for the tps380x reset driver. The binding uses enum to make it easy to add more devices from that family. Signed-off-by: Marco Felsch Reviewed-by: Krzysztof Kozlowski Signed-off-by: Philipp Zabel Link: https://lore.kernel.org/r/20220530092226.748644-1-m.felsch@pengutronix.de .../bindings/reset/ti,tps380x-reset.yaml | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 9c68d4e621ebfc166f672fa7afe14591f91d144c Author: Biju Das Date: Sat Apr 23 14:46:01 2022 +0100 dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G2UL USBPHY Control bindings Add device tree binding document for RZ/G2UL USBPHY Control Device. RZ/G2UL USBPHY Control Device is identical to one found on the RZ/G2L SoC. No driver changes are required as generic compatible string "renesas,rzg2l-usbphy-ctrl" will be used as a fallback. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski Signed-off-by: Philipp Zabel Link: https://lore.kernel.org/r/20220423134601.141975-1-biju.das.jz@bp.renesas.com Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml | 1 + 1 file changed, 1 insertion(+) commit 7209344223f77311aee677ea820a93b9ba0bcae0 Author: Raphael-Xu <13691752556@139.com> Date: Fri Jul 22 18:53:45 2022 +0800 ASoC: dt-bindings: tas2780: remove tas2780 and will merge it to tas27xx Remove tas2780 binding documentation, the binding will be documented in the tax27xx binding. Signed-off-by: Raphael-Xu <13691752556@139.com> Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220722105345.175-1-13691752556@139.com Signed-off-by: Mark Brown .../devicetree/bindings/sound/tas2780.yaml | 72 ---------------------- 1 file changed, 72 deletions(-) commit 5adbaed16cc63542057627642d2414f603f2db69 Author: Mia Lin Date: Wed Jul 13 17:06:47 2022 +0800 rtc: Add NCT3018Y real time clock driver Add real time clock support for NCT3018Y. Signed-off-by: Mia Lin Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220713090647.8028-4-mimi05633@gmail.com MAINTAINERS | 1 + drivers/rtc/Kconfig | 10 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-nct3018y.c | 553 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 565 insertions(+) commit 8b30b09317ec6fda5f36a428e9e331253b5c4739 Author: Mia Lin Date: Wed Jul 13 17:06:45 2022 +0800 dt-bindings: rtc: nuvoton: add NCT3018Y Real Time Clock Document devicetree bindings for the Nuvoton NCT3018Y Real Time Clock. Reviewed-by: Rob Herring Signed-off-by: Mia Lin Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220713090647.8028-2-mimi05633@gmail.com .../devicetree/bindings/rtc/nuvoton,nct3018y.yaml | 45 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 46 insertions(+) commit 03009a605f2ae18c0cb77a78b329f79821a4c545 Author: Andy Shevchenko Date: Tue Jul 26 17:31:10 2022 +0300 hwmon: (occ) Replace open-coded variant of %*phN specifier printf()-like functions in the kernel have extensions, such as %*phN to dump small pieces of memory as hex bytes. Replace custom approach with the direct use of %*phN. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220726143110.4809-1-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck drivers/hwmon/occ/common.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 10e1fb88c7b7e71ae04895511f4f98a7721c9e6e Author: Alexander Stein Date: Mon Jul 25 09:19:19 2022 +0200 dt-bindings: rtc: nxp,pcf85063: Convert to DT schema Convert the NXP PCF85063 RTC binding to DT schema format. Add 'interrupts' and 'wakeup-source' as this device has an interrupt which was not documented, but is in use. 'clock-output-names' and '#clock-cells' are added as well, those were probably missed when adding clkout support in commit 8c229ab6048b ("rtc: pcf85063: Add pcf85063 clkout control to common clock framework") Signed-off-by: Alexander Stein Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220725071919.25342-1-alexander.stein@ew.tq-group.com .../devicetree/bindings/rtc/nxp,pcf85063.txt | 32 -------- .../devicetree/bindings/rtc/nxp,pcf85063.yaml | 92 ++++++++++++++++++++++ 2 files changed, 92 insertions(+), 32 deletions(-) commit 527f36f5efa45b6a897190cabf982e2d207887da Author: Axe Yang Date: Tue Jul 26 14:28:42 2022 +0800 mmc: mediatek: add support for SDIO eint wakup IRQ Add support for eint IRQ when MSDC is used as an SDIO host. This feature requires SDIO device support async IRQ function. With this feature, SDIO host can be awakened by SDIO card in suspend state, without additional pin. MSDC driver will time-share the SDIO DAT1 pin. During suspend, MSDC turn off clock and switch SDIO DAT1 pin to GPIO mode. And during resume, switch GPIO function back to DAT1 mode then turn on clock. Some device tree property should be added or modified in MSDC node to support SDIO eint IRQ. Pinctrls "state_eint" is mandatory. Since this feature depends on asynchronous interrupts, "wakeup-source", "keep-power-in-suspend" and "cap-sdio-irq" flags are necessary, and the interrupts list should be extended(the interrupt named with sdio_wakeup): &mmcX { ... interrupt-names = "msdc", "sdio_wakeup"; interrupts-extended = <...>, <&pio xxx IRQ_TYPE_LEVEL_LOW>; ... pinctrl-names = "default", "state_uhs", "state_eint"; ... pinctrl-2 = <&mmc2_pins_eint>; ... cap-sdio-irq; keep-power-in-suspend; wakeup-source; ... }; Co-developed-by: Yong Mao Signed-off-by: Yong Mao Reviewed-by: Chaotian Jing Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Linus Walleij Signed-off-by: Axe Yang Link: https://lore.kernel.org/r/20220726062842.18846-4-axe.yang@mediatek.com Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 86 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 6 deletions(-) commit 019e442bb0d5e7f25ada8eb4252e22e62d17a95e Author: Axe Yang Date: Tue Jul 26 14:28:41 2022 +0800 mmc: core: Add support for SDIO wakeup interrupt If wakeup-source flag is set in host dts node, parse EAI information from SDIO CCCR interrupt externsion segment for in-band wakeup. If async interrupt is supported by SDIO card then enable it and set enable_async_irq flag in sdio_cccr structure to 1. The parse flow is implemented in sdio_read_cccr(). Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Axe Yang Link: https://lore.kernel.org/r/20220726062842.18846-3-axe.yang@mediatek.com Signed-off-by: Ulf Hansson drivers/mmc/core/sdio.c | 14 ++++++++++++++ include/linux/mmc/card.h | 8 +++++++- include/linux/mmc/sdio.h | 5 +++++ 3 files changed, 26 insertions(+), 1 deletion(-) commit 035cc3951797df0e1e831f9fd71b7cda63e71705 Author: Axe Yang Date: Tue Jul 26 14:28:40 2022 +0800 dt-bindings: mmc: mtk-sd: extend interrupts and pinctrls properties Extend interrupts and pinctrls for SDIO wakeup interrupt feature. This feature allow SDIO devices alarm asynchronous interrupt to host even when host stop providing clock to SDIO card. An extra wakeup interrupt and pinctrl states for SDIO DAT1 pin state switching are required in this scenario. Reviewed-by: Rob Herring Signed-off-by: Axe Yang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220726062842.18846-2-axe.yang@mediatek.com Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 50 ++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) commit 2830320122d87fb65632f09cdffe129046915d51 Author: Rob Herring Date: Tue Jul 19 15:51:42 2022 -0600 dt-bindings: rtc: microcrystal,rv3032: Add missing type to 'trickle-voltage-millivolt' 'trickle-voltage-millivolt' is missing a type definition. '-millivolt' is not a standard unit (should be '-microvolt'). As the property is already in use, add a type reference. Signed-off-by: Rob Herring Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220719215143.1877566-1-robh@kernel.org Documentation/devicetree/bindings/rtc/microcrystal,rv3032.yaml | 1 + 1 file changed, 1 insertion(+) commit 71af91565052214ad86f288e0d8ffb165f790995 Author: Mathew McBride Date: Wed Jul 6 07:42:36 2022 +0000 rtc: rx8025: fix 12/24 hour mode detection on RX-8035 The 12/24hr flag in the RX-8035 can be found in the hour register, instead of the CTRL1 on the RX-8025. This was overlooked when support for the RX-8035 was added, and was causing read errors when the hour register 'overflowed'. To deal with the relevant register not always being visible in the relevant functions, determine the 12/24 mode at startup and store it in the driver state. Signed-off-by: Mathew McBride Fixes: f120e2e33ac8 ("rtc: rx8025: implement RX-8035 support") Cc: stable@vger.kernel.org Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220706074236.24011-1-matt@traverse.com.au drivers/rtc/rtc-rx8025.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit d2f35ed0aae12bf7b3c5f9bae41b0ada4a292f20 Author: Jagan Teki Date: Sun Jul 24 02:13:24 2022 +0530 dt-bindings: mmc: rockchip-dw-mshc: Document Rockchip RV1126 Add a compatible string for Rockchip RV1126 SoC. Signed-off-by: Jagan Teki Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220723204335.750095-12-jagan@edgeble.ai Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml | 1 + 1 file changed, 1 insertion(+) commit 5c9f41443e8d5fbd414ad0dfa8e0996b937d135a Author: Uwe Kleine-König Date: Thu Jul 7 17:31:56 2022 +0200 rtc: cros-ec: Only warn once in .remove() about notifier_chain problems When a remove platform device callback returns an error code, the driver core emits an error message ("remove callback returned a non-zero value. This will be ignored.\n") and still removes the device. As the driver already emits a more specific error message, return 0 to suppress the core's error message. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Acked-by: Tzung-Bi Shih Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220707153156.214841-1-u.kleine-koenig@pengutronix.de drivers/rtc/rtc-cros-ec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2a692245b6de1f17baef24db46fed03186ff3cc3 Author: Thomas Bogendoerfer Date: Fri Jul 15 15:53:30 2022 +0200 rtc: vr41xx: remove driver Commit d3164e2f3b0a ("MIPS: Remove VR41xx support") removed support for MIPS VR41xx platform, so remove exclusive drivers for this platform, too. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220715135330.134684-1-tsbogend@alpha.franken.de drivers/rtc/Kconfig | 10 -- drivers/rtc/Makefile | 1 - drivers/rtc/rtc-vr41xx.c | 363 ----------------------------------------------- 3 files changed, 374 deletions(-) commit 03d7a732815069a78c8c655092e48fcdd52734fb Author: Tom Rix Date: Mon Jun 27 16:59:43 2022 -0400 rtc: mpfs: remove 'pending' variable from mpfs_rtc_wakeup_irq_handler() cppcheck reports [drivers/rtc/rtc-mpfs.c:219]: (style) Variable 'pending' is assigned a value that is never used. The fetched CONTROL_REG stored in pending is unused and partially duplicates the functionality of the later call to mpfs_rtc_clear(). This looks like leftover development code, so remove pending. Fixes: 0b31d703598d ("rtc: Add driver for Microchip PolarFire SoC") Signed-off-by: Tom Rix Reviewed-by: Conor Dooley Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220627205943.2075043-1-trix@redhat.com drivers/rtc/rtc-mpfs.c | 3 --- 1 file changed, 3 deletions(-) commit d295daf505758f9a0e4d05f4ee3bfdfb4192c18f Author: Ilya Leoshkevich Date: Tue Jul 26 15:40:08 2022 +0200 selftests/bpf: Attach to socketcall() in test_probe_user test_probe_user fails on architectures where libc uses socketcall(SYS_CONNECT) instead of connect(). Fix by attaching to socketcall as well. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20220726134008.256968-3-iii@linux.ibm.com .../testing/selftests/bpf/prog_tests/probe_user.c | 35 +++++++++++++++------- .../testing/selftests/bpf/progs/test_probe_user.c | 29 ++++++++++++++++-- 2 files changed, 51 insertions(+), 13 deletions(-) commit 2d369b4b0044d4f6a3fa4071807f66eced0f2725 Author: Ilya Leoshkevich Date: Tue Jul 26 15:40:07 2022 +0200 libbpf: Extend BPF_KSYSCALL documentation Explicitly list known quirks. Mention that socket-related syscalls can be invoked via socketcall(). Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20220726134008.256968-2-iii@linux.ibm.com tools/lib/bpf/bpf_tracing.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit bd82ea52f0ee2890b698155a6d7bf9ea5bd8930d Author: Lorenzo Bianconi Date: Sat Jul 23 19:17:10 2022 +0200 bpf, devmap: Compute proper xdp_frame len redirecting frames Even if it is currently forbidden to XDP_REDIRECT a multi-frag xdp_frame into a devmap, compute proper xdp_frame length in __xdp_enqueue and is_valid_dst routines running xdp_get_frame_len(). Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/894d99c01139e921bdb6868158ff8e67f661c072.1658596075.git.lorenzo@kernel.org kernel/bpf/devmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7d4edccc9bbfe1dcdff641343f7b0c6763fbe774 Author: Uwe Kleine-König Date: Mon Jul 25 21:43:44 2022 +0200 hwmon: (sht15) Fix wrong assumptions in device remove callback Taking a lock at the beginning of .remove() doesn't prevent new readers. With the existing approach it can happen, that a read occurs just when the lock was taken blocking the reader until the lock is released at the end of the remove callback which then accessed *data that is already freed then. To actually fix this problem the hwmon core needs some adaption. Until this is implemented take the optimistic approach of assuming that all readers are gone after hwmon_device_unregister() and sysfs_remove_group() as most other drivers do. (And once the core implements that, taking the lock would deadlock.) So drop the lock, move the reset to after device unregistration to keep the device in a workable state until it's deregistered. Also add a error message in case the reset fails and return 0 anyhow. (Returning an error code, doesn't stop the platform device unregistration and only results in a little helpful error message before the devm cleanup handlers are called.) Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220725194344.150098-1-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck drivers/hwmon/sht15.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit f4caa26216411040e3c7cb80bf351104e3cd3488 Author: Aleksa Savic Date: Tue Jul 26 14:02:03 2022 +0200 hwmon: (aquacomputer_d5next) Add support for reading the +12V voltage sensor on D5 Next Add support for reading the +12V voltage that the D5 Next pump receives. Signed-off-by: Aleksa Savic Link: https://lore.kernel.org/r/20220726120203.33773-1-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck drivers/hwmon/aquacomputer_d5next.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit ffe71829574a4848e9a376010a2ea74ae6d2d211 Author: Krzysztof Kozlowski Date: Tue Jul 26 13:59:17 2022 +0200 ASoC: dt-bindings: qcom,wcd934x: use absolute path to other schema Absolute path to other DT schema is preferred over relative one. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220726115917.101371-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcc5b37cfd9e177d735af31a6e2938a8087ac854 Merge: d81677410f17 96f6017d652a Author: Mark Brown Date: Tue Jul 26 14:06:52 2022 +0100 ASoC: atmel: one fix and few cleanups Merge series from Claudiu Beznea : The series adds one fix for mchp-spdifrx and few cleanups for mchp-spdifrx and mchp-spdifrx drivers. commit 7d3a3aaaa9cc8ec53e9ef4f3e1711827107f76c5 Author: Biju Das Date: Fri Jul 22 09:44:30 2022 +0100 dmaengine: sh: rz-dmac: Add device_synchronize callback Some on-chip peripheral modules(for eg:- rspi) on RZ/G2L SoC use the same signal for both interrupt and DMA transfer requests. The signal works as a DMA transfer request signal by setting DMARS, and subsequent interrupt requests to the interrupt controller are masked. We can re-enable the interrupt by clearing the DMARS. This patch adds device_synchronize callback for clearing DMARS and thereby allowing DMA consumers to switch to interrupt mode. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20220722084430.969333-1-biju.das.jz@bp.renesas.com Signed-off-by: Vinod Koul drivers/dma/sh/rz-dmac.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 1e42f82cbec7b2cc4873751e7791e6611901c5fc Author: Uwe Kleine-König Date: Thu Jul 21 22:40:54 2022 +0200 dmaengine: sprd: Cleanup in .remove() after pm_runtime_get_sync() failed It's not allowed to quit remove early without cleaning up completely. Otherwise this results in resource leaks that probably yield graver problems later. Here for example some tasklets might survive the lifetime of the sprd-dma device and access sdev which is freed after .remove() returns. As none of the device freeing requires an active device, just ignore the return value of pm_runtime_get_sync(). Signed-off-by: Uwe Kleine-König Reviewed-by: Baolin Wang Link: https://lore.kernel.org/r/20220721204054.323602-1-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul drivers/dma/sprd-dma.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit a6e6231ac10a0e94ed298de8297574b8944f7bfa Merge: 1dba745ca8c6 ddbce345f194 Author: Marc Kleine-Budde Date: Tue Jul 26 10:47:39 2022 +0200 Merge patch series "can: remove litteral strings used for driver names and remove DRV_VERSION" Vincent Mailhol says: ==================== This is a cleanup series. The patches 1 to 8 get rid of any hardcoded strings and instead relies on the KBUILD_MODNAME macros to get the device name. Patch 9 replaces the ES58X_MODULE_NAME macro with KBUILD_MODNAME in etas_es58x. Finally, also in etas_es58x, patch 10 removes the DRV_VERSION so that the module uses the default behavior and advertise the kernel version instead of a custom version. * Changelog * v1 -> v2: * The patch for esd_usb contained some changes for ems_usb. * v1 assumed that KBUILD_MODNAME could only be used when the file basename and the module had the same name (e.g. vcan.c for the vcan.ko). The fact is that KBUILD_NAME extends to the module name and can thus be used even if the basename is different (e.g. slcan-core.c and slcan.ko) * Add patch #9: can: etas_es58x: replace ES58X_MODULE_NAME with KBUILD_MODNAME v1: https://lore.kernel.org/all/20220725153124.467061-1-mailhol.vincent@wanadoo.fr This series are the first 9 patches of: https://lore.kernel.org/linux-can/20220725133208.432176-1-mailhol.vincent@wanadoo.fr/T/ The initial intent of those 9 patches was to do so cleanup in order to implement ethtool_ops::get_drvinfo but this appeared to be useless: https://lore.kernel.org/linux-can/20220725140911.2djwxfrx3kdmjeuc@pengutronix.de/ Instead, those patch are send as a standalone series. ==================== Drop "[PATCH v2 03/10] can: slcan: use KBUILD_MODNAME and define pr_fmt to replace hardcoded names" to avoid conflicts with Dario Binacchi's work on the slcan driver. Link: https://lore.kernel.org/all/20220726082707.58758-1-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde commit 36834c67016794b8fa03d7672a5b7f2cc4529298 Author: Akhil R Date: Wed Jul 20 16:10:44 2022 +0530 dmaengine: tegra: Add terminate() for Tegra234 In certain cases where the DMA client bus gets corrupted or if the end device ceases to send/receive data, DMA can wait indefinitely for the data to be received/sent. Attempting to terminate the transfer will put the DMA in pause flush mode and it remains there. The channel is irrecoverable once this pause times out in Tegra194 and earlier chips. Whereas, from Tegra234, it can be recovered by disabling the channel and reprograming it. Hence add a new terminate() function that ignores the outcome of dma_pause() so that terminate_all() can proceed to disable the channel. Signed-off-by: Akhil R Reviewed-by: Jon Hunter Link: https://lore.kernel.org/r/20220720104045.16099-3-akhilrajeev@nvidia.com Signed-off-by: Vinod Koul drivers/dma/tegra186-gpc-dma.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit 37a0d69d00f50f2a0c387bbbbb2946e771af243d Author: Akhil R Date: Wed Jul 20 16:10:43 2022 +0530 dt-bindings: dmaengine: Add compatible for Tegra234 Document the compatible string used by GPCDMA controller for Tegra234. Signed-off-by: Akhil R Reviewed-by: Jon Hunter Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220720104045.16099-2-akhilrajeev@nvidia.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d81677410f172c2b946393c09b46ff9e8dc1b6ec Author: Nathan Chancellor Date: Mon Jul 25 11:05:39 2022 -0700 ASoC: amd: acp: Fix initialization of ext_intr_stat1 in i2s_irq_handler() Clang warns: ../sound/soc/amd/acp/acp-platform.c:117:19: error: variable 'ext_intr_stat1' is uninitialized when used here [-Werror,-Wuninitialized] if (stream && (ext_intr_stat1 & stream->irq_bit)) { ^~~~~~~~~~~~~~ ../sound/soc/amd/acp/acp-platform.c:97:35: note: initialize the variable 'ext_intr_stat1' to silence this warning u32 ext_intr_stat, ext_intr_stat1, i; ^ = 0 1 error generated. The variable was not properly renamed, correct it to resolve the warning. Fixes: 93f53881473c ("ASoC: amd: acp: Modify local variables name to generic") Link: https://github.com/ClangBuiltLinux/linux/issues/1675 Signed-off-by: Nathan Chancellor Reviewed-by: Tom Rix Link: https://lore.kernel.org/r/20220725180539.1315066-1-nathan@kernel.org Signed-off-by: Mark Brown sound/soc/amd/acp/acp-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit feee1ce45a5666bbdb08c5bb2f5f394047b1915b Author: Xin Gao Date: Sat Jul 23 03:46:39 2022 +0800 fsnotify: Fix comment typo The double `if' is duplicated in line 104, remove one. Signed-off-by: Xin Gao Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20220722194639.18545-1-gaoxin@cdjrlc.com fs/notify/fsnotify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 494afd7a3535ac963e02f6ee2320a6c90aef79b2 Merge: 4782b7cb6ff8 5b56db90bbaf Author: Mark Brown Date: Tue Jul 26 12:29:57 2022 +0100 ASoC: Intel: machine driver updates for 5.20 Merge series from Pierre-Louis Bossart : A couple of minor updates contributed and tested by Intel teams or end-users. commit 4782b7cb6ff836b35342a75e217aa6821b1928f5 Merge: f20d5116b7f3 af468aadf004 Author: Mark Brown Date: Tue Jul 26 12:29:56 2022 +0100 ASoC: SOF: minor updates for 5.20 Merge series from Pierre-Louis Bossart : One sanity check for SSP index reported by NHLT/BIOS and two updates for Mediatek and Intel Chromebooks related to already-merged firmware changes. commit 0d06132fc84bd91379300768c75a19474e06d0c5 Author: Logan Gunthorpe Date: Fri Jul 8 10:51:04 2022 -0600 PCI/P2PDMA: Remove pci_p2pdma_[un]map_sg() This interface is superseded by support in dma_map_sg() which now supports heterogeneous scatterlists. There are no longer any users, so remove it. Signed-off-by: Logan Gunthorpe Acked-by: Bjorn Helgaas Reviewed-by: Jason Gunthorpe Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig drivers/pci/p2pdma.c | 66 ---------------------------------------------- include/linux/pci-p2pdma.h | 27 ------------------- 2 files changed, 93 deletions(-) commit 1e97af7f2f0ed487e5abbb6b755d1df156cf3d7e Author: Logan Gunthorpe Date: Fri Jul 8 10:51:03 2022 -0600 RDMA/rw: drop pci_p2pdma_[un]map_sg() dma_map_sg() now supports the use of P2PDMA pages so pci_p2pdma_map_sg() is no longer necessary and may be dropped. This means the rdma_rw_[un]map_sg() helpers are no longer necessary. Remove it all. Signed-off-by: Logan Gunthorpe Reviewed-by: Jason Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig drivers/infiniband/core/rw.c | 45 +++++++++----------------------------------- 1 file changed, 9 insertions(+), 36 deletions(-) commit 495758bb1a72316094ee854dc51f667ad3db29b5 Author: Logan Gunthorpe Date: Fri Jul 8 10:51:02 2022 -0600 RDMA/core: introduce ib_dma_pci_p2p_dma_supported() Introduce the helper function ib_dma_pci_p2p_dma_supported() to check if a given ib_device can be used in P2PDMA transfers. This ensures the ib_device is not using virt_dma and also that the underlying dma_device supports P2PDMA. Use the new helper in nvme-rdma to replace the existing check for ib_uses_virt_dma(). Adding the dma_pci_p2pdma_supported() check allows switching away from pci_p2pdma_[un]map_sg(). Signed-off-by: Logan Gunthorpe Reviewed-by: Jason Gunthorpe Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig drivers/nvme/target/rdma.c | 2 +- include/rdma/ib_verbs.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) commit 91fb2b6052f75a2f9375db5d5924860ab2313a1d Author: Logan Gunthorpe Date: Fri Jul 8 10:51:01 2022 -0600 nvme-pci: convert to using dma_map_sgtable() The dma_map operations now support P2PDMA pages directly. So remove the calls to pci_p2pdma_[un]map_sg_attrs() and replace them with calls to dma_map_sgtable(). dma_map_sgtable() returns more complete error codes than dma_map_sg() and allows differentiating EREMOTEIO errors in case an unsupported P2PDMA transfer is requested. When this happens, return BLK_STS_TARGET so the request isn't retried. Signed-off-by: Logan Gunthorpe Reviewed-by: Max Gurtovoy Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 69 +++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 40 deletions(-) commit 2f8594412b4b21023a1f147d881ca05ddffc1e36 Author: Logan Gunthorpe Date: Fri Jul 8 10:51:00 2022 -0600 nvme-pci: check DMA ops when indicating support for PCI P2PDMA Introduce a supports_pci_p2pdma() operation in nvme_ctrl_ops to replace the fixed NVME_F_PCI_P2PDMA flag such that the dma_map_ops flags can be checked for PCI P2PDMA support. Signed-off-by: Logan Gunthorpe Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 3 ++- drivers/nvme/host/nvme.h | 2 +- drivers/nvme/host/pci.c | 12 +++++++++--- 3 files changed, 12 insertions(+), 5 deletions(-) commit 30280eee2db10ed6f9f2e1b4ec9197465a96b996 Author: Logan Gunthorpe Date: Fri Jul 8 10:50:59 2022 -0600 iommu/dma: support PCI P2PDMA pages in dma-iommu map_sg Call pci_p2pdma_map_segment() when a PCI P2PDMA page is seen so the bus address is set in the dma address and the segment is marked with sg_dma_mark_bus_address(). iommu_map_sg() will then skip these segments. Then, in __finalise_sg(), copy the dma address from the input segment to the output segment. __invalidate_sg() must also learn to skip these segments. A P2PDMA page may have three possible outcomes when being mapped: 1) If the data path between the two devices doesn't go through the root port, then it should be mapped with a PCI bus address 2) If the data path goes through the host bridge, it should be mapped normally with an IOMMU IOVA. 3) It is not possible for the two devices to communicate and thus the mapping operation should fail (and it will return -EREMOTEIO). Similar to dma-direct, the sg_dma_mark_pci_p2pdma() flag is used to indicate bus address segments. On unmap, P2PDMA segments are skipped over when determining the start and end IOVA addresses. With this change, the flags variable in the dma_map_ops is set to DMA_F_PCI_P2PDMA_SUPPORTED to indicate support for P2PDMA pages. Signed-off-by: Logan Gunthorpe Signed-off-by: Christoph Hellwig drivers/iommu/dma-iommu.c | 99 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 85 insertions(+), 14 deletions(-) commit c96321834b2f7aa442cf4c076f73d8273e622725 Author: Logan Gunthorpe Date: Fri Jul 8 10:50:58 2022 -0600 iommu: Explicitly skip bus address marked segments in __iommu_map_sg() In order to support PCI P2PDMA mappings with dma-iommu, explicitly skip any segments marked with sg_dma_mark_bus_address() in __iommu_map_sg(). These segments should not be mapped into the IOVA and will be handled separately in as subsequent patch for dma-iommu. Signed-off-by: Logan Gunthorpe Signed-off-by: Christoph Hellwig drivers/iommu/iommu.c | 4 ++++ 1 file changed, 4 insertions(+) commit 159bf19270e80b5bc4b13aa88072dcb390b4d297 Author: Logan Gunthorpe Date: Fri Jul 8 10:50:57 2022 -0600 dma-mapping: add flags to dma_map_ops to indicate PCI P2PDMA support Add a flags member to the dma_map_ops structure with one flag to indicate support for PCI P2PDMA. Also, add a helper to check if a device supports PCI P2PDMA. Signed-off-by: Logan Gunthorpe Reviewed-by: Jason Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig include/linux/dma-map-ops.h | 10 ++++++++++ include/linux/dma-mapping.h | 5 +++++ kernel/dma/mapping.c | 18 ++++++++++++++++++ 3 files changed, 33 insertions(+) commit f02ad36d4f76645e7e1c21f572260e9a2e61c26b Author: Logan Gunthorpe Date: Fri Jul 8 10:50:56 2022 -0600 dma-direct: support PCI P2PDMA pages in dma-direct map_sg Add PCI P2PDMA support for dma_direct_map_sg() so that it can map PCI P2PDMA pages directly without a hack in the callers. This allows for heterogeneous SGLs that contain both P2PDMA and regular pages. A P2PDMA page may have three possible outcomes when being mapped: 1) If the data path between the two devices doesn't go through the root port, then it should be mapped with a PCI bus address 2) If the data path goes through the host bridge, it should be mapped normally, as though it were a CPU physical address 3) It is not possible for the two devices to communicate and thus the mapping operation should fail (and it will return -EREMOTEIO). SGL segments that contain PCI bus addresses are marked with sg_dma_mark_pci_p2pdma() and are ignored when unmapped. P2PDMA mappings are also failed if swiotlb needs to be used on the mapping. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig kernel/dma/direct.c | 43 +++++++++++++++++++++++++++++++++++++------ kernel/dma/direct.h | 8 +++++++- 2 files changed, 44 insertions(+), 7 deletions(-) commit 7c2645a2a30a45d3dc4c98b315a51be44ec69a67 Author: Logan Gunthorpe Date: Fri Jul 8 10:50:55 2022 -0600 dma-mapping: allow EREMOTEIO return code for P2PDMA transfers Add EREMOTEIO error return to dma_map_sgtable() which will be used by .map_sg() implementations that detect P2PDMA pages that the underlying DMA device cannot access. Signed-off-by: Logan Gunthorpe Reviewed-by: Jason Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig kernel/dma/mapping.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5e180ff326b43bd3fb72892e1083b2707159aa6e Author: Logan Gunthorpe Date: Fri Jul 8 10:50:54 2022 -0600 PCI/P2PDMA: Introduce helpers for dma_map_sg implementations Add pci_p2pdma_map_segment() as a helper for dma_map_sg() implementations. It takes an scatterlist segment that must point to a pci_p2pdma struct page and will map it if the mapping requires a bus address. The return value indicates whether the mapping required a bus address or whether the caller still needs to map the segment normally. If the segment should not be mapped, -EREMOTEIO is returned. This helper uses a state structure to track the changes to the pgmap across calls and avoid needing to lookup into the xarray for every page. The prototype for the helper is added to dma-map-ops.h as it is only useful to dma map implementations and don't need to pollute the public pci-p2pdma header. Signed-off-by: Logan Gunthorpe Acked-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig drivers/pci/p2pdma.c | 44 +++++++++++++++++++++++++++++++------ include/linux/dma-map-ops.h | 53 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 7 deletions(-) commit 719c98658058f4aca0f7663ff11f2606e99cce4f Author: Logan Gunthorpe Date: Fri Jul 8 10:50:53 2022 -0600 PCI/P2PDMA: Attempt to set map_type if it has not been set Attempt to find the mapping type for P2PDMA pages on the first DMA map attempt if it has not been done ahead of time. Previously, the mapping type was expected to be calculated ahead of time, but if pages are to come from userspace then there's no way to ensure the path was checked ahead of time. This change will calculate the mapping type if it hasn't pre-calculated so it is no longer invalid to call pci_p2pdma_map_sg() before the mapping type is calculated, so drop the WARN_ON when that is the case. Signed-off-by: Logan Gunthorpe Acked-by: Bjorn Helgaas Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig drivers/pci/p2pdma.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 42399301203e3cddef36cde457228f9247618313 Author: Logan Gunthorpe Date: Fri Jul 8 10:50:52 2022 -0600 lib/scatterlist: add flag for indicating P2PDMA segments in an SGL Introduce a dma_flags field in struct scatterlist. These flags will be used by dma_[un]map_sg_p2pdma() to determine when a given SGL segments dma_address points to a PCI bus address. dma_unmap_sg_p2pdma() will need to perform different cleanup when a segment is marked as a bus address. The dma_flags field will fit in the existing padding on 64BIT systems (assuming CONFIG_NEED_SG_DMA_LENGTH is also set). The new bit will only be used when CONFIG_PCI_P2PDMA is set; this means PCI P2PDMA will require CONFIG_64BIT. This should be acceptable as the majority of P2PDMA use cases are restricted to newer root complexes and roughly require the extra address space for memory BARs used in the transactions. Signed-off-by: Logan Gunthorpe Signed-off-by: Christoph Hellwig drivers/pci/Kconfig | 5 ++++ include/linux/scatterlist.h | 69 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) commit fa78f336937240d1bc598db817d638086060e7e9 Author: Jan Kara Date: Tue Jul 26 13:13:50 2022 +0200 ext2: Add more validity checks for inode counts Add checks verifying number of inodes stored in the superblock matches the number computed from number of inodes per group. Also verify we have at least one block worth of inodes per group. This prevents crashes on corrupted filesystems. Reported-by: syzbot+d273f7d7f58afd93be48@syzkaller.appspotmail.com Signed-off-by: Jan Kara fs/ext2/super.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 233363aba72ac638dda6838f8e817c46d36c2431 Author: Krzysztof Kozlowski Date: Fri Jul 22 21:15:39 2022 +0200 spi/panel: dt-bindings: drop CPHA and CPOL from common properties The spi-cpha and spi-cpol properties are device specific and should be accepted only if device really needs them. Drop them from common spi-peripheral-props.yaml schema, mention in few panel drivers which use them and include instead in the SPI controller bindings. The controller bindings will provide CPHA/CPOL type validation and one place for description. Each device schema must list the properties if they are applicable. Suggested-by: Jonathan Cameron Suggested-by: Rob Herring Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220722191539.90641-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../devicetree/bindings/display/panel/lgphilips,lb035q02.yaml | 3 +++ .../devicetree/bindings/display/panel/samsung,ld9040.yaml | 3 +++ .../devicetree/bindings/display/panel/sitronix,st7789v.yaml | 3 +++ Documentation/devicetree/bindings/display/panel/tpo,td.yaml | 3 +++ Documentation/devicetree/bindings/spi/spi-controller.yaml | 11 +++++++++++ .../devicetree/bindings/spi/spi-peripheral-props.yaml | 10 ---------- 6 files changed, 23 insertions(+), 10 deletions(-) commit bbd52178e249fe893ef4a9b87cde5b6c473b0a7c Author: Joanne Koong Date: Fri Jul 22 15:01:05 2022 -0700 bpf: Fix bpf_xdp_pointer return pointer For the case where offset + len == size, bpf_xdp_pointer should return a valid pointer to the addr because that access is permitted. We should only return NULL in the case where offset + len exceeds size. Fixes: 3f364222d032 ("net: xdp: introduce bpf_xdp_pointer utility routine") Signed-off-by: Joanne Koong Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Acked-by: Lorenzo Bianconi Link: https://lore.kernel.org/bpf/20220722220105.2065466-1-joannelkoong@gmail.com net/core/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35d099da41967f114c6472b838e12014706c26e7 Merge: 58d8bcd47ecc d351c90ce248 Author: Paolo Abeni Date: Tue Jul 26 12:51:54 2022 +0200 Merge branch 'octeontx2-minor-tc-fixes' Subbaraya Sundeep says: ==================== Octeontx2 minor tc fixes This patch set fixes two problems found in tc code wrt to ratelimiting and when installing UDP/TCP filters. Patch 1: CN10K has different register format compared to CN9xx hence fixes that. Patch 2: Check flow mask also before installing a src/dst port filter, otherwise installing for one port installs for other one too. ==================== Link: https://lore.kernel.org/r/1658650874-16459-1-git-send-email-sbhatta@marvell.com Signed-off-by: Paolo Abeni commit d351c90ce248601ce34fbc5ac817e3362b441b55 Author: Subbaraya Sundeep Date: Sun Jul 24 13:51:14 2022 +0530 octeontx2-pf: Fix UDP/TCP src and dst port tc filters Check the mask for non-zero value before installing tc filters for L4 source and destination ports. Otherwise installing a filter for source port installs destination port too and vice-versa. Fixes: 1d4d9e42c240 ("octeontx2-pf: Add tc flower hardware offload on ingress traffic") Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Paolo Abeni .../net/ethernet/marvell/octeontx2/nic/otx2_tc.c | 30 +++++++++++++--------- 1 file changed, 18 insertions(+), 12 deletions(-) commit 5ec9c514d4a0e1749781c4c61485f9a69c212716 Author: Sunil Goutham Date: Sun Jul 24 13:51:13 2022 +0530 octeontx2-pf: cn10k: Fix egress ratelimit configuration NIX_AF_TLXX_PIR/CIR register format has changed from OcteonTx2 to CN10K. CN10K supports larger burst size. Fix burst exponent and burst mantissa configuration for CN10K. Also fixed 'maxrate' from u32 to u64 since 'police.rate_bytes_ps' passed by stack is also u64. Fixes: e638a83f167e ("octeontx2-pf: TC_MATCHALL egress ratelimiting offload") Signed-off-by: Sunil Goutham Signed-off-by: Subbaraya Sundeep Signed-off-by: Paolo Abeni .../net/ethernet/marvell/octeontx2/nic/otx2_tc.c | 76 ++++++++++++++++------ 1 file changed, 55 insertions(+), 21 deletions(-) commit 96f6017d652a78e06e34e535526826a22aa69dfa Author: Claudiu Beznea Date: Mon Jul 25 16:09:25 2022 +0300 ASoC: mchp-spdiftx: add and remove black line around MODULE_DEVICE_TABLE() Add blank line after MODULE_DEVICE_TABLE() and remove the one before it. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220725130925.1781791-6-claudiu.beznea@microchip.com Signed-off-by: Mark Brown sound/soc/atmel/mchp-spdiftx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d346a4ad305bf3f99e5824e0c132fac7e0b53657 Author: Claudiu Beznea Date: Mon Jul 25 16:09:24 2022 +0300 ASoC: mchp-spdiftx: return directly ret Avoid having patterns like: int ret; // ... ret = 0; // ... ret = call_function(); if (ret) return ret; return 0; and return directly ret for all cases. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220725130925.1781791-5-claudiu.beznea@microchip.com Signed-off-by: Mark Brown sound/soc/atmel/mchp-spdiftx.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 24e89d6d7da52f8678dc111ffb0ae3590b678ef0 Author: Claudiu Beznea Date: Mon Jul 25 16:09:22 2022 +0300 ASoC: mchp-spdifrx: use single tab indent for structure Use single tab indentation for mchp_spdifrx_mixer_control structure. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220725130925.1781791-3-claudiu.beznea@microchip.com Signed-off-by: Mark Brown sound/soc/atmel/mchp-spdifrx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit bd6e21a9044ffc0d15cc362dcc10662e644a43bc Author: Zeng Jingxiang Date: Wed Jul 20 16:30:29 2022 +0800 fs/reiserfs/inode: remove dead code in _get_block_create_0() Since commit 27b3a5c51b50 ("kill-the-bkl/reiserfs: drop the fs race watchdog from _get_block_create_0()"), which removed a label that may have the pointer 'p' touched in its control flow, related if statements now eval to constant value now. Just remove them. Assigning value NULL to p here 293 char *p = NULL; In the following conditional expression, the value of p is always NULL, As a result, the kunmap() cannot be executed. 308 if (p) 309 kunmap(bh_result->b_page); 355 if (p) 356 kunmap(bh_result->b_page); 366 if (p) 367 kunmap(bh_result->b_page); Also, the kmap() cannot be executed. 399 if (!p) 400 p = (char *)kmap(bh_result->b_page); [JK: Removed unnecessary initialization of 'p' to NULL] Signed-off-by: Zeng Jingxiang Signed-off-by: Kairui Song Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20220720083029.1065578-1-zengjx95@gmail.com fs/reiserfs/inode.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 1115169f47ae45eeb04c616c404492bc8268daa0 Author: Paul Chaignon Date: Mon Jul 25 16:32:53 2022 +0200 selftests/bpf: Don't assign outer source IP to host The previous commit fixed a bug in the bpf_skb_set_tunnel_key helper to avoid dropping packets whose outer source IP address isn't assigned to a host interface. This commit changes the corresponding selftest to not assign the outer source IP address to an interface. Not assigning the source IP to an interface causes two issues in the existing test: 1. The ARP requests will fail for that IP address so we need to add the ARP entry manually. 2. The encapsulated ICMP echo reply traffic will not reach the VXLAN device. It will be dropped by the stack before, because the outer destination IP is unknown. To solve 2., we have two choices. Either we perform decapsulation ourselves in a BPF program attached at veth1 (the base device for the VXLAN device), or we switch the outer destination address when we receive the packet at veth1, such that the stack properly demultiplexes it to the VXLAN device afterward. This commit implements the second approach, where we switch the outer destination address from the unassigned IP address to the assigned one, only for VXLAN traffic ingressing veth1. Then, at the vxlan device, the BPF program that checks the output of bpf_skb_get_tunnel_key needs to be updated as the expected local IP address is now the unassigned one. Signed-off-by: Paul Chaignon Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/4addde76eaf3477a58975bef15ed2788c44e5f55.1658759380.git.paul@isovalent.com .../testing/selftests/bpf/prog_tests/test_tunnel.c | 17 ++++- .../testing/selftests/bpf/progs/test_tunnel_kern.c | 80 +++++++++++++++++++--- 2 files changed, 86 insertions(+), 11 deletions(-) commit b8fff748521c7178b9a7d32b5a34a81cec8396f3 Author: Paul Chaignon Date: Mon Jul 25 16:32:34 2022 +0200 bpf: Set flow flag to allow any source IP in bpf_tunnel_key Commit 26101f5ab6bd ("bpf: Add source ip in "struct bpf_tunnel_key"") added support for getting and setting the outer source IP of encapsulated packets via the bpf_skb_{get,set}_tunnel_key BPF helper. This change allows BPF programs to set any IP address as the source, including for example the IP address of a container running on the same host. In that last case, however, the encapsulated packets are dropped when looking up the route because the source IP address isn't assigned to any interface on the host. To avoid this, we need to set the FLOWI_FLAG_ANYSRC flag. Fixes: 26101f5ab6bd ("bpf: Add source ip in "struct bpf_tunnel_key"") Signed-off-by: Paul Chaignon Signed-off-by: Daniel Borkmann Reviewed-by: Nikolay Aleksandrov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/76873d384e21288abe5767551a0799ac93ec07fb.1658759380.git.paul@isovalent.com net/core/filter.c | 1 + 1 file changed, 1 insertion(+) commit 861396ac0b47780210b72c4fea359540965a4970 Author: Paul Chaignon Date: Mon Jul 25 16:32:15 2022 +0200 geneve: Use ip_tunnel_key flow flags in route lookups Use the new ip_tunnel_key field with the flow flags in the IPv4 route lookups for the encapsulated packet. This will be used by the bpf_skb_set_tunnel_key helper in the subsequent commit. Signed-off-by: Paul Chaignon Signed-off-by: Daniel Borkmann Reviewed-by: Nikolay Aleksandrov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/fcc2e0eea01e8ea465a180126366ec20596ba530.1658759380.git.paul@isovalent.com drivers/net/geneve.c | 1 + 1 file changed, 1 insertion(+) commit 7e2fb8bc7ef6c7a63ca95751b90162dece0b3f4c Author: Paul Chaignon Date: Mon Jul 25 16:31:58 2022 +0200 vxlan: Use ip_tunnel_key flow flags in route lookups Use the new ip_tunnel_key field with the flow flags in the IPv4 route lookups for the encapsulated packet. This will be used by the bpf_skb_set_tunnel_key helper in a subsequent commit. Signed-off-by: Paul Chaignon Signed-off-by: Daniel Borkmann Reviewed-by: Nikolay Aleksandrov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/1ffc95c3d60182fd5ec0cf6602083f8f68afe98f.1658759380.git.paul@isovalent.com drivers/net/vxlan/vxlan_core.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 451ef36bd229f8aa329cb2258a859b4c636d08ef Author: Paul Chaignon Date: Mon Jul 25 16:31:37 2022 +0200 ip_tunnels: Add new flow flags field to ip_tunnel_key This commit extends the ip_tunnel_key struct with a new field for the flow flags, to pass them to the route lookups. This new field will be populated and used in subsequent commits. Signed-off-by: Paul Chaignon Signed-off-by: Daniel Borkmann Reviewed-by: Nikolay Aleksandrov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/f8bfd4983bd06685a59b1e3ba76ca27496f51ef3.1658759380.git.paul@isovalent.com include/net/ip_tunnels.h | 1 + 1 file changed, 1 insertion(+) commit 58d8bcd47ecc55f1ab92320fe36c31ff4d83cc0c Author: wangjianli Date: Sun Jul 24 15:52:07 2022 +0800 sfc/siena: fix repeated words in comments Delete the redundant word 'in'. Signed-off-by: wangjianli Link: https://lore.kernel.org/r/20220724075207.21080-1-wangjianli@cdjrlc.com Signed-off-by: Paolo Abeni drivers/net/ethernet/sfc/siena/net_driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63f1b471a0446e24aa8908efeef3b2213cd34e90 Author: wangjianli Date: Sun Jul 24 15:47:46 2022 +0800 sfc/falcon: fix repeated words in comments Delete the redundant word 'in'. Signed-off-by: wangjianli Link: https://lore.kernel.org/r/20220724074746.19550-1-wangjianli@cdjrlc.com Signed-off-by: Paolo Abeni drivers/net/ethernet/sfc/falcon/net_driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a7e1b55aad45c0cf86bd4e2f212bb9a61905142 Author: Kalesh Singh Date: Tue Jul 26 00:37:50 2022 -0700 KVM: arm64: Introduce pkvm_dump_backtrace() Dumps the pKVM hypervisor backtrace from EL1 by reading the unwinded addresses from the shared stacktrace buffer. The nVHE hyp backtrace is dumped on hyp_panic(), before panicking the host. [ 111.623091] kvm [367]: nVHE call trace: [ 111.623215] kvm [367]: [] __kvm_nvhe_hyp_panic+0xac/0xf8 [ 111.623448] kvm [367]: [] __kvm_nvhe_hyp_panic_bad_stack+0x10/0x10 [ 111.623642] kvm [367]: [] __kvm_nvhe_recursive_death+0x24/0x34 . . . [ 111.640366] kvm [367]: [] __kvm_nvhe_recursive_death+0x24/0x34 [ 111.640467] kvm [367]: [] __kvm_nvhe_recursive_death+0x24/0x34 [ 111.640574] kvm [367]: [] __kvm_nvhe___kvm_vcpu_run+0x30/0x40c [ 111.640676] kvm [367]: [] __kvm_nvhe_handle___kvm_vcpu_run+0x30/0x48 [ 111.640778] kvm [367]: [] __kvm_nvhe_handle_trap+0xc4/0x128 [ 111.640880] kvm [367]: [] __kvm_nvhe___host_exit+0x64/0x64 [ 111.640996] kvm [367]: ---[ end nVHE call trace ]--- Signed-off-by: Kalesh Singh Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220726073750.3219117-18-kaleshsingh@google.com arch/arm64/kvm/handle_exit.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit 75e9459e48d4867caf549e388bd4faabe1dbcbd3 Author: Kalesh Singh Date: Tue Jul 26 00:37:49 2022 -0700 KVM: arm64: Implement protected nVHE hyp stack unwinder Implements the common framework necessary for unwind() to work in the protected nVHE context: - on_accessible_stack() - on_overflow_stack() - unwind_next() Protected nVHE unwind() is used to unwind and save the hyp stack addresses to the shared stacktrace buffer. The host reads the entries in this buffer, symbolizes and dumps the stacktrace (later patch in the series). Signed-off-by: Kalesh Singh Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220726073750.3219117-17-kaleshsingh@google.com arch/arm64/include/asm/stacktrace/nvhe.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 871c5d931417d3c0e1aa32c9e04da1dc74703843 Author: Kalesh Singh Date: Tue Jul 26 00:37:48 2022 -0700 KVM: arm64: Save protected-nVHE (pKVM) hyp stacktrace In protected nVHE mode, the host cannot access private owned hypervisor memory. Also the hypervisor aims to remains simple to reduce the attack surface and does not provide any printk support. For the above reasons, the approach taken to provide hypervisor stacktraces in protected mode is: 1) Unwind and save the hyp stack addresses in EL2 to a shared buffer with the host (done in this patch). 2) Delegate the dumping and symbolization of the addresses to the host in EL1 (later patch in the series). On hyp_panic(), the hypervisor prepares the stacktrace before returning to the host. Signed-off-by: Kalesh Singh Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220726073750.3219117-16-kaleshsingh@google.com arch/arm64/kvm/hyp/nvhe/stacktrace.c | 55 +++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) commit 25aa73b6db1831527cd4f14bf0ddf8dceadec802 Author: Kalesh Singh Date: Tue Jul 26 00:37:47 2022 -0700 KVM: arm64: Stub implementation of pKVM HYP stack unwinder Add some stub implementations of protected nVHE stack unwinder, for building. These are implemented later in this series. Signed-off-by: Kalesh Singh Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220726073750.3219117-15-kaleshsingh@google.com arch/arm64/include/asm/stacktrace/nvhe.h | 35 ++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) commit 6928bcc84bc4bd9a24a1cb1986418c3de76e1d99 Author: Kalesh Singh Date: Tue Jul 26 00:37:46 2022 -0700 KVM: arm64: Allocate shared pKVM hyp stacktrace buffers In protected nVHE mode the host cannot directly access hypervisor memory, so we will dump the hypervisor stacktrace to a shared buffer with the host. The minimum size for the buffer required, assuming the min frame size of [x29, x30] (2 * sizeof(long)), is half the combined size of the hypervisor and overflow stacks plus an additional entry to delimit the end of the stacktrace. The stacktrace buffers are used later in the series to dump the nVHE hypervisor stacktrace when using protected-mode. Signed-off-by: Kalesh Singh Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220726073750.3219117-14-kaleshsingh@google.com arch/arm64/include/asm/memory.h | 8 ++++++++ arch/arm64/kvm/hyp/nvhe/stacktrace.c | 4 ++++ 2 files changed, 12 insertions(+) commit 72adac1bd234002a65cef738e0eebfd6c2ce2e30 Author: Kalesh Singh Date: Tue Jul 26 00:37:45 2022 -0700 KVM: arm64: Add PROTECTED_NVHE_STACKTRACE Kconfig This can be used to disable stacktrace for the protected KVM nVHE hypervisor, in order to save on the associated memory usage. This option is disabled by default, since protected KVM is not widely used on platforms other than Android currently. Signed-off-by: Kalesh Singh Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220726073750.3219117-13-kaleshsingh@google.com arch/arm64/kvm/Kconfig | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 314a61dc31845c233e47c53db3fe6f34284034f4 Author: Kalesh Singh Date: Tue Jul 26 00:37:44 2022 -0700 KVM: arm64: Introduce hyp_dump_backtrace() In non-protected nVHE mode, unwinds and dumps the hypervisor backtrace from EL1. This is possible beacause the host can directly access the hypervisor stack pages in non-protected mode. The nVHE backtrace is dumped on hyp_panic(), before panicking the host. [ 101.498183] kvm [377]: nVHE call trace: [ 101.498363] kvm [377]: [] __kvm_nvhe_hyp_panic+0xac/0xf8 [ 101.499045] kvm [377]: [] __kvm_nvhe_hyp_panic_bad_stack+0x10/0x10 [ 101.499498] kvm [377]: [] __kvm_nvhe_recursive_death+0x24/0x34 . . . [ 101.524929] kvm [377]: [] __kvm_nvhe_recursive_death+0x24/0x34 [ 101.525062] kvm [377]: [] __kvm_nvhe_recursive_death+0x24/0x34 [ 101.525195] kvm [377]: [] __kvm_nvhe___kvm_vcpu_run+0x30/0x40c [ 101.525333] kvm [377]: [] __kvm_nvhe_handle___kvm_vcpu_run+0x30/0x48 [ 101.525468] kvm [377]: [] __kvm_nvhe_handle_trap+0xc4/0x128 [ 101.525602] kvm [377]: [] __kvm_nvhe___host_exit+0x64/0x64 [ 101.525745] kvm [377]: ---[ end nVHE call trace ]--- Signed-off-by: Kalesh Singh Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220726073750.3219117-12-kaleshsingh@google.com arch/arm64/include/asm/stacktrace/nvhe.h | 17 ++++++++ arch/arm64/kvm/handle_exit.c | 69 ++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) commit db129d486ebdf4e3168282236f9d9008b42cac7e Author: Kalesh Singh Date: Tue Jul 26 00:37:43 2022 -0700 KVM: arm64: Implement non-protected nVHE hyp stack unwinder Implements the common framework necessary for unwind() to work for non-protected nVHE mode: - on_accessible_stack() - on_overflow_stack() - unwind_next() Non-protected nVHE unwind() is used to unwind and dump the hypervisor stacktrace by the host in EL1 Signed-off-by: Kalesh Singh Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220726073750.3219117-11-kaleshsingh@google.com arch/arm64/include/asm/stacktrace/common.h | 2 + arch/arm64/include/asm/stacktrace/nvhe.h | 76 +++++++++++++++++++++++++++++- arch/arm64/kvm/arm.c | 2 +- 3 files changed, 77 insertions(+), 3 deletions(-) commit 879e5ac7b2e4db05799a905b5a07fc9e5dedf651 Author: Kalesh Singh Date: Tue Jul 26 00:37:42 2022 -0700 KVM: arm64: Prepare non-protected nVHE hypervisor stacktrace In non-protected nVHE mode (non-pKVM) the host can directly access hypervisor memory; and unwinding of the hypervisor stacktrace is done from EL1 to save on memory for shared buffers. To unwind the hypervisor stack from EL1 the host needs to know the starting point for the unwind and information that will allow it to translate hypervisor stack addresses to the corresponding kernel addresses. This patch sets up this book keeping. It is made use of later in the series. Signed-off-by: Kalesh Singh Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220726073750.3219117-10-kaleshsingh@google.com arch/arm64/include/asm/kvm_asm.h | 16 ++++++++++++++ arch/arm64/kvm/hyp/nvhe/stacktrace.c | 41 ++++++++++++++++++++++++++++++++++++ arch/arm64/kvm/hyp/nvhe/switch.c | 6 ++++++ 3 files changed, 63 insertions(+) commit 573e1e8275f7167ddd533c6e4e0f500f8be4d974 Author: Kalesh Singh Date: Tue Jul 26 00:37:41 2022 -0700 KVM: arm64: Stub implementation of non-protected nVHE HYP stack unwinder Add stub implementations of non-protected nVHE stack unwinder, for building. These are implemented later in this series. Signed-off-by: Kalesh Singh Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220726073750.3219117-9-kaleshsingh@google.com arch/arm64/include/asm/stacktrace/nvhe.h | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 548ec3336f323db56260b312c232ab37285f0284 Author: Kalesh Singh Date: Tue Jul 26 00:37:40 2022 -0700 KVM: arm64: On stack overflow switch to hyp overflow_stack On hyp stack overflow switch to 16-byte aligned secondary stack. This provides us stack space to better handle overflows; and is used in a subsequent patch to dump the hypervisor stacktrace. Signed-off-by: Kalesh Singh Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220726073750.3219117-8-kaleshsingh@google.com arch/arm64/kvm/hyp/nvhe/Makefile | 2 +- arch/arm64/kvm/hyp/nvhe/host.S | 9 ++------- arch/arm64/kvm/hyp/nvhe/stacktrace.c | 11 +++++++++++ 3 files changed, 14 insertions(+), 8 deletions(-) commit 051ece6758cc10c2a6f1700ffe86d23fbb0b2553 Author: Kalesh Singh Date: Tue Jul 26 00:37:39 2022 -0700 arm64: stacktrace: Add description of stacktrace/common.h Add brief description on how to use stacktrace/common.h to implement a stack unwinder. Signed-off-by: Kalesh Singh Reviewed-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220726073750.3219117-7-kaleshsingh@google.com arch/arm64/include/asm/stacktrace/common.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit f51e7146740514347d6c5526a2c393e224a19c0d Author: Kalesh Singh Date: Tue Jul 26 00:37:38 2022 -0700 arm64: stacktrace: Factor out common unwind() Move unwind() to stacktrace/common.h, and as a result the kernel unwind_next() to asm/stacktrace.h. This allow reusing unwind() in the implementation of the nVHE HYP stack unwinder, later in the series. Signed-off-by: Kalesh Singh Reviewed-by: Fuad Tabba Reviewed-by: Mark Brown Tested-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220726073750.3219117-6-kaleshsingh@google.com arch/arm64/include/asm/stacktrace.h | 51 +++++++++++++++++++++++ arch/arm64/include/asm/stacktrace/common.h | 19 +++++++++ arch/arm64/kernel/stacktrace.c | 67 ------------------------------ 3 files changed, 70 insertions(+), 67 deletions(-) commit 5b1b08619f50422c3e43d1fd7af257595a9e4a67 Author: Kalesh Singh Date: Tue Jul 26 00:37:37 2022 -0700 arm64: stacktrace: Handle frame pointer from different address spaces The unwinder code is made reusable so that it can be used to unwind various types of stacks. One usecase is unwinding the nVHE hyp stack from the host (EL1) in non-protected mode. This means that the unwinder must be able to translate HYP stack addresses to kernel addresses. Add a callback (stack_trace_translate_fp_fn) to allow specifying the translation function. Signed-off-by: Kalesh Singh Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220726073750.3219117-5-kaleshsingh@google.com arch/arm64/include/asm/stacktrace/common.h | 29 +++++++++++++++++++++++++---- arch/arm64/kernel/stacktrace.c | 2 +- 2 files changed, 26 insertions(+), 5 deletions(-) commit be63c647fd28d25484257f5f36a008db7d99991d Author: Kalesh Singh Date: Tue Jul 26 00:37:36 2022 -0700 arm64: stacktrace: Factor out unwind_next_common() Move common unwind_next logic to stacktrace/common.h. This allows reusing the code in the implementation the nVHE hypervisor stack unwinder, later in this series. Signed-off-by: Kalesh Singh Reviewed-by: Fuad Tabba Reviewed-by: Mark Brown Tested-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220726073750.3219117-4-kaleshsingh@google.com arch/arm64/include/asm/stacktrace/common.h | 50 ++++++++++++++++++++++++++++++ arch/arm64/kernel/stacktrace.c | 41 +++--------------------- 2 files changed, 54 insertions(+), 37 deletions(-) commit 15a59f19a015185bff90a68f601caec151dea4b4 Author: Kalesh Singh Date: Tue Jul 26 00:37:35 2022 -0700 arm64: stacktrace: Factor out on_accessible_stack_common() Move common on_accessible_stack checks to stacktrace/common.h. This is used in the implementation of the nVHE hypervisor unwinder later in this series. Signed-off-by: Kalesh Singh Reviewed-by: Fuad Tabba Reviewed-by: Mark Brown Tested-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220726073750.3219117-3-kaleshsingh@google.com arch/arm64/include/asm/stacktrace.h | 6 ++---- arch/arm64/include/asm/stacktrace/common.h | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) commit 6bf212c89c48458d8deef1c973678c62528dab04 Author: Kalesh Singh Date: Tue Jul 26 00:37:34 2022 -0700 arm64: stacktrace: Add shared header for common stack unwinding code In order to reuse the arm64 stack unwinding logic for the nVHE hypervisor stack, move the common code to a shared header (arch/arm64/include/asm/stacktrace/common.h). The nVHE hypervisor cannot safely link against kernel code, so we make use of the shared header to avoid duplicated logic later in this series. Signed-off-by: Kalesh Singh Reviewed-by: Mark Brown Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220726073750.3219117-2-kaleshsingh@google.com arch/arm64/include/asm/stacktrace.h | 35 +--------- arch/arm64/include/asm/stacktrace/common.h | 105 +++++++++++++++++++++++++++++ arch/arm64/kernel/stacktrace.c | 57 ---------------- 3 files changed, 106 insertions(+), 91 deletions(-) commit bb42b7e9e30e7a07b7cb6790a22dc758b0dc123e Author: Yang Yingliang Date: Mon Jun 27 16:08:22 2022 +0800 rtc: rv8803: fix missing unlock on error in rv8803_set_time() Add the missing unlock before return from function rv8803_set_time() in the error handling case. Fixes: f8176e0bb83f ("rtc: rv8803: initialize registers on post-probe voltage loss") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Sascha Hauer Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220627080822.3881072-1-yangyingliang@huawei.com drivers/rtc/rtc-rv8803.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 07dcc6f9c76275d6679f28a69e042a2f9dc8f128 Author: Srinivas Neeli Date: Sun Jun 26 12:38:17 2022 +0530 rtc: zynqmp: Add calibration set and get support Zynqmp RTC controller has a calibration feature to compensate time deviation due to input clock inaccuracy. Set and get calibration API's are used for setting and getting calibration value from the controller calibration register. Signed-off-by: Srinivas Neeli Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220626070817.3780977-3-srinivas.neeli@xilinx.com drivers/rtc/rtc-zynqmp.c | 113 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 94 insertions(+), 19 deletions(-) commit 85cab027d4e31beb082ec41b71cb8670eeb6fd46 Author: Srinivas Neeli Date: Sun Jun 26 12:38:16 2022 +0530 rtc: zynqmp: Updated calibration value As per RTC spec default calibration value is 0x7FFF. We are in process to update the 0x7FFF as default value in the next version of TRM. Signed-off-by: Srinivas Neeli Acked-by: Peter Korsgaard Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220626070817.3780977-2-srinivas.neeli@xilinx.com drivers/rtc/rtc-zynqmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f69060c14431f476b6993ea92bef77e20437af4e Author: Srinivas Neeli Date: Sun Jun 26 12:38:15 2022 +0530 dt-bindings: rtc: zynqmp: Add clock information Added clock information and deprecated calibration support. Signed-off-by: Srinivas Neeli Reviewed-by: Rob Herring Acked-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220626070817.3780977-1-srinivas.neeli@xilinx.com Documentation/devicetree/bindings/rtc/xlnx,zynqmp-rtc.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit b9d982385d0544132bc398b7a7e062d9a554d941 Author: Icenowy Zheng Date: Sat Jun 25 23:27:56 2022 -0500 rtc: sun6i: add support for R329 RTC Allwinner R329 has a RTC with a similar time storage with H616 but a slightly different clock part. As we have already handled the R329 RTC clocks in the CCU driver, add a compatible string to RTC driver to allow probing of the RTC. Signed-off-by: Icenowy Zheng Signed-off-by: Samuel Holland Tested-by: Heiko Stuebner Reviewed-by: Heiko Stuebner Reviewed-by: Jernej Skrabec Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220626042756.58961-1-samuel@sholland.org drivers/rtc/rtc-sun6i.c | 2 ++ 1 file changed, 2 insertions(+) commit ddbce345f194e358de2ac8a7973aae15f37e4e56 Author: Vincent Mailhol Date: Tue Jul 26 17:27:07 2022 +0900 can: etas_es58x: remove DRV_VERSION DRV_VERSION is a leftover from when the driver was an out of tree module. The driver version was never incremented despite of the numerous changes made since it was mainstreamed. Keeping an unmaintained driver version number makes no sense. Remove it and rely on the kernel version instead. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220726082707.58758-11-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/etas_es58x/es58x_core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 1190f520826ac5ce1e86182bf940b3ccfc576e60 Author: Vincent Mailhol Date: Tue Jul 26 17:27:06 2022 +0900 can: etas_es58x: replace ES58X_MODULE_NAME with KBUILD_MODNAME ES58X_MODULE_NAME is set to "etas_es58x". KBUILD_MODNAME also evaluates to "etas_es58x". Get rid of ES58X_MODULE_NAME and rely on KBUILD_MODNAME instead. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220726082707.58758-10-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/etas_es58x/es58x_core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 6f2660607282df1c9b57aafb131c6e4432a3bf7a Author: Vincent Mailhol Date: Tue Jul 26 17:27:05 2022 +0900 can: ubs_8dev: use KBUILD_MODNAME instead of hard coded names The driver uses the string "usb_8dev" to populate usb_driver::name and can_bittiming_const::name. KBUILD_MODNAME also evaluates to "ubs_8dev". Use KBUILD_MODNAME and get rid on the hardcoded string names. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220726082707.58758-9-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/usb_8dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 63c286e60892b5ea4b6b9005dae4a9a8b5bc1379 Author: Vincent Mailhol Date: Tue Jul 26 17:27:04 2022 +0900 can: kvaser_usb: use KBUILD_MODNAME instead of hard coded names The driver uses the string "kvaser_usb" to populate usb_driver::name. KBUILD_MODNAME also evaluates to "kvaser_ubs". Use KBUILD_MODNAME and get rid on the hardcoded string names. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220726082707.58758-8-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c250d5eb22253f8743b67d8eb581a9fdfbd8b895 Author: Vincent Mailhol Date: Tue Jul 26 17:27:03 2022 +0900 can: gs_ubs: use KBUILD_MODNAME instead of hard coded names The driver uses the string "gs_usb" to populate usb_driver::name, can_bittiming_const::name and can_data_bittiming_const::name. KBUILD_MODNAME evaluates to "gs_ubs". Use KBUILD_MODNAME and get rid on the hardcoded string names. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220726082707.58758-7-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4741b3aedc117d2087e8dfc6d58b1b27896a3124 Author: Vincent Mailhol Date: Tue Jul 26 17:27:02 2022 +0900 can: esd_usb: use KBUILD_MODNAME instead of hard coded names The driver uses the string "ems_usb" to populate usb_driver::name. KBUILD_MODNAME also evaluates to "esd_ubs". Use KBUILD_MODNAME and get rid on the hardcoded string names. CC: Frank Jungclaus Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220726082707.58758-6-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/esd_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90a13aec104d85101999bd1614e17a76d9322a78 Author: Vincent Mailhol Date: Tue Jul 26 17:27:01 2022 +0900 can: softing: use KBUILD_MODNAME instead of hard coded names The driver uses the string "softing" to populate platform_driver::name and can_bittiming_const::name. KBUILD_MODNAME also evaluates to "softing". Use KBUILD_MODNAME and get rid on the hardcoded string names. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220726082707.58758-5-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/softing/softing_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f60df831d4c40daff510e02ea169771703aa94f1 Author: Vincent Mailhol Date: Tue Jul 26 17:26:59 2022 +0900 can: ems_usb: use KBUILD_MODNAME instead of hard coded names The driver uses the string "ems_usb" to populate usb_driver::name and can_bittiming_const::name. KBUILD_MODNAME also evaluates to "ems_ubs". Use KBUILD_MODNAME and get rid on the hardcoded string names. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220726082707.58758-3-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/ems_usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 63fe85678933ab8431cfc9b882a6d3d604fcc6db Author: Vincent Mailhol Date: Tue Jul 26 17:26:58 2022 +0900 can: can327: use KBUILD_MODNAME instead of hard coded names The driver uses the string "can327" to populate tty_ldisc_ops::name. KBUILD_MODNAME also evaluates to "can327". Use KBUILD_MODNAME and get rid on the hardcoded string names. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20220726082707.58758-2-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/can327.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1dba745ca8c632d0228c7148fa678db65560c4fb Author: Marc Kleine-Budde Date: Fri Jul 22 10:12:27 2022 +0200 can: mcp251xfd: mcp251xfd_dump(): fix comment The driver uses only 1 TEF and 1 TX ring, but a variable number of RX rings. Fix comment accordingly. Fixes: e0ab3dd5f98f ("can: mcp251xfd: add dev coredump support") Link: https://lore.kernel.org/all/20220726084328.4042678-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/spi/mcp251xfd/mcp251xfd-dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73fb2c8b61783e2e8a87f91d141bf72a12404566 Author: Deming Wang Date: Wed Jun 22 17:17:58 2022 -0400 virtio_fs: Modify format for virtio_fs_direct_access We should isolate operators with spaces. Signed-off-by: Deming Wang Signed-off-by: Miklos Szeredi fs/fuse/virtio_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6239b21bbc538e94a4362eb21b0d1479e2a0a1df Author: Horatiu Vultur Date: Fri Jul 22 15:18:36 2022 +0200 ARM: dts: lan966x: add support for pcb8309 Add basic support for pcb8309. It is similar with pcb8291 with one big difference that is having 2 SFP cages. Therefore it has 4 network ports. Signed-off-by: Horatiu Vultur Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220722131836.2377720-3-horatiu.vultur@microchip.com arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/lan966x-pcb8309.dts | 184 ++++++++++++++++++++++++++++++++++ 2 files changed, 186 insertions(+), 1 deletion(-) commit f4526ae80dbdef7078ab2aae30dfc70bbc0098c6 Author: Allen-KH Cheng Date: Mon Jul 25 19:07:02 2022 +0800 dt-bindings: pinctrl: mt8186: Add and use drive-strength-microamp Commit e5fabbe43f3f ("pinctrl: mediatek: paris: Support generic PIN_CONFIG_DRIVE_STRENGTH_UA") added support for using drive-strength-microamp instead of mediatek,drive-strength-adv. Similarly to the mt8192 and mt8195, there's no user of property 'mediatek,drive-strength-adv', hence removing it is safe. Fixes: 338e953f1bd1 ("dt-bindings: pinctrl: mt8186: add pinctrl file and binding document") Signed-off-by: Allen-KH Cheng Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220725110702.11362-3-allen-kh.cheng@mediatek.com Signed-off-by: Linus Walleij .../bindings/pinctrl/pinctrl-mt8186.yaml | 29 +++------------------- 1 file changed, 3 insertions(+), 26 deletions(-) commit f174b668fea48162e18641a8404d10a1fded4559 Author: Allen-KH Cheng Date: Mon Jul 25 19:07:01 2022 +0800 dt-bindings: pinctrl: mt8186: Add gpio-line-names property Add the 'gpio-line-names' property to mt8186-pinctrl, as this will be used in devicetrees to describe pin names. Signed-off-by: Allen-KH Cheng Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220725110702.11362-2-allen-kh.cheng@mediatek.com Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/pinctrl-mt8186.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 45f74532278dd3914b821e0994e72d27544bcaa5 Author: Jesse Taube Date: Sat Jul 23 12:05:11 2022 -0400 ARM: dts: imxrt1170-pinfunc: Add pinctrl binding header Add binding header for i.MXRT1170 pinctrl device tree. Cc: Giulio Benetti Signed-off-by: Jesse Taube Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220723160513.271692-11-Mr.Bossman075@gmail.com Signed-off-by: Linus Walleij arch/arm/boot/dts/imxrt1170-pinfunc.h | 1561 +++++++++++++++++++++++++++++++++ 1 file changed, 1561 insertions(+) commit e8129a076a509c7e8eae04b78715ac8648c4e63e Author: Mario Limonciello Date: Fri Jul 22 17:08:10 2022 -0500 pinctrl: amd: Use unicode for debugfs output The output is currently split across two lines making it more difficult to parse unless the newlines are removed between pins or it's read in by a parser like Libreoffice Calc or Google docs. To make it easier to follow to the naked eye in a terminal window: * drop the newline in the middle of pin definitions * shorten all output using unicode characters * align all pipe delimitters * output the same phrase even for disabled functions (but with a ∅ character) Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20220722220810.28894-2-mario.limonciello@amd.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 114 +++++++++++++++++++++--------------------- 1 file changed, 56 insertions(+), 58 deletions(-) commit dc24b7530dff6d2c1f92ba75e10f335eebc48ccc Author: Mario Limonciello Date: Fri Jul 22 17:08:09 2022 -0500 pinctrl: amd: Fix newline declaration in debugfs output Currently the debugfs output for pinctrl-amd puts the first line combined with "GPIO bank". This makes it a little harder to process as the file needs to be manually corrected for the mistake. Change this to be a new line character instead. Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20220722220810.28894-1-mario.limonciello@amd.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53dd4188a8c56cd2abd1973327d3e1b070300b17 Author: Slark Xiao Date: Fri Jul 22 17:24:19 2022 +0800 pinctrl: at91: Fix typo 'the the' in comment Replace 'the the' with 'the' in the comment. Signed-off-by: Slark Xiao Link: https://lore.kernel.org/r/20220722092419.77052-1-slark_xiao@163.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-at91.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e79368b15d7735cbc1dff86bb414847d697487c5 Author: Rob Herring Date: Tue Jul 19 15:49:54 2022 -0600 dt-bindings: pinctrl: st,stm32: Correct 'resets' property name The correct property name for the reset binding is 'resets', not 'reset'. Assuming actual users are correct, this error didn't show up due to missing 'additionalProperties: false'. Fix the name and add missing 'additionalProperties'. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220719214955.1875020-1-robh@kernel.org Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c3e4fa4b4eb10bb12b330118fa5a6bacadeecfc6 Author: Xin Gao Date: Wed Jul 20 02:26:47 2022 +0800 pinctrl: mvebu: Missing a blank line after declarations. Missing a blank line after declarations. Signed-off-by: Xin Gao Link: https://lore.kernel.org/r/20220719182647.9038-1-gaoxin@cdjrlc.com Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-mvebu.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f1a5013f9193989bc0b4f58f78fc3f5cdda324e4 Author: Konrad Dybcio Date: Sat Jul 16 21:29:00 2022 +0200 pinctrl: qcom: Add SM6375 TLMM driver Add a driver to control the TLMM block on SM6375. This is an adapted version of msm-5.4's pinctrl-blair driver. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20220716192900.454653-2-konrad.dybcio@somainline.org Signed-off-by: Linus Walleij drivers/pinctrl/qcom/Kconfig | 9 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-sm6375.c | 1544 +++++++++++++++++++++++++++++++++ 3 files changed, 1554 insertions(+) commit 2064b662e8881b20ebfa481956c6de78bef99f24 Author: Konrad Dybcio Date: Sat Jul 16 21:28:59 2022 +0200 dt-bindings: pinctrl: Add DT schema for SM6375 TLMM Document the TLMM driver for SM6375. Signed-off-by: Konrad Dybcio Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220716192900.454653-1-konrad.dybcio@somainline.org Signed-off-by: Linus Walleij .../bindings/pinctrl/qcom,sm6375-tlmm.yaml | 158 +++++++++++++++++++++ 1 file changed, 158 insertions(+) commit 3eb8fccc244bfb41a7961969e4db280d44911226 Author: Rustam Subkhankulov Date: Mon Jul 18 15:43:43 2022 +0300 video: fbdev: sis: fix typos in SiS_GetModeID() The second operand of a '&&' operator has no impact on expression result for cases 400 and 512 in SiS_GetModeID(). Judging by the logic and the names of the variables, in both cases a typo was made. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Rustam Subkhankulov Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Helge Deller drivers/video/fbdev/sis/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b083c22d51148f3d3028291343196471be5d9f36 Author: Uwe Kleine-König Date: Sat Jul 23 19:57:20 2022 +0200 video: fbdev: imxfb: Convert request_mem_region + ioremap to devm_ioremap_resource This has several advantages: - No need for manual undo of the two functions in the error path and the remove function. - Drops error handling in .remove() Note that returning early in .remove() yields resource leaks that often result in access of freed memory or unmapped registers later. - Fixes a resource leak request_mem_region allocates memory for the returned pointer that was never freed. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller drivers/video/fbdev/imxfb.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit ded77a74ee6bc3dea72ad41129823a812e4b64f3 Author: Uwe Kleine-König Date: Sat Jul 23 19:57:19 2022 +0200 video: fbdev: imxfb: Fold into only user No source file but the driver itself includes the header containing the platform data definition. The last user is gone since commit 8485adf17a15 ("ARM: imx: Remove imx device directory"). Move the remaining symbols directly into the driver and remove the then unused header file. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller MAINTAINERS | 1 - drivers/video/fbdev/imxfb.c | 13 ++++++++++++- include/linux/platform_data/video-imxfb.h | 23 ----------------------- 3 files changed, 12 insertions(+), 25 deletions(-) commit e2279cc92919f37b4af985cb28ae350bb3e62e71 Author: Uwe Kleine-König Date: Sat Jul 23 19:57:18 2022 +0200 video: fbdev: imxfb: Drop unused symbols from header The only file that includes is the imxfb driver. Drop all symbols that are unused there. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller include/linux/platform_data/video-imxfb.h | 35 ------------------------------- 1 file changed, 35 deletions(-) commit e948d32c54fa45cc1601c98956bdbbf5f17a3db2 Author: Uwe Kleine-König Date: Sat Jul 23 19:57:17 2022 +0200 video: fbdev: imxfb: Drop platform data support No source file but the driver itself includes the header containing the platform data definition. The last user is gone since commit 8485adf17a15 ("ARM: imx: Remove imx device directory"). So we can safely drop platform data support. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller drivers/video/fbdev/imxfb.c | 99 +++++++++++-------------------- include/linux/platform_data/video-imxfb.h | 12 ---- 2 files changed, 34 insertions(+), 77 deletions(-) commit 26c2b7d9fac42eb8317f3ceefa4c1a9a9170ca69 Author: Liang He Date: Tue Jul 19 16:25:46 2022 +0800 video: fbdev: amba-clcd: Fix refcount leak bugs In clcdfb_of_init_display(), we should call of_node_put() for the references returned by of_graph_get_next_endpoint() and of_graph_get_remote_port_parent() which have increased the refcount. Besides, we should call of_node_put() both in fail path or when the references are not used anymore. Fixes: d10715be03bd ("video: ARM CLCD: Add DT support") Signed-off-by: Liang He Signed-off-by: Helge Deller drivers/video/fbdev/amba-clcd.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 8e4372e617854a16d4ec549ba821aad78fd748a6 Merge: aa246499bb5f 347007968744 Author: Jakub Kicinski Date: Mon Jul 25 19:39:35 2022 -0700 Merge branch 'add-mtu-change-with-stmmac-interface-running' Christian Marangi says: ==================== Add MTU change with stmmac interface running This series is to permit MTU change while the interface is running. Major rework are needed to permit to allocate a new dma conf based on the new MTU before applying it. This is to make sure there is enough space to allocate all the DMA queue before releasing the stmmac driver. This was tested with a simple way to stress the network while the interface is running. 2 ssh connection to the device: - One generating simple traffic with while true; do free; done - The other making the mtu change with a delay of 1 second The connection is correctly stopped and recovered after the MTU is changed. The first 2 patch of this series are minor fixup that fix problems presented while testing this. One fix a problem when we renable a queue while we are generating a new dma conf. The other is a corner case that was notice while stressing the driver and turning down the interface while there was some traffic. (this is a follow-up of a simpler patch that wanted to add the same feature. It was suggested to first try to check if it was possible to apply the new configuration. Posting as RFC as it does major rework for the new concept of DMA conf) ==================== Link: https://lore.kernel.org/r/20220723142933.16030-1-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit 3470079687448abac42deb62774253be1d6bdef3 Author: Christian Marangi Date: Sat Jul 23 16:29:33 2022 +0200 net: ethernet: stmicro: stmmac: permit MTU change with interface up Remove the limitation where the interface needs to be down to change MTU by releasing and opening the stmmac driver to set the new MTU. Also call the set_filter function to correctly init the port. This permits to remove the EBUSY error while the ethernet port is running permitting a correct MTU change if for example a DSA request a MTU change for a switch CPU port. Signed-off-by: Christian Marangi Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 30 ++++++++++++++++++----- 1 file changed, 24 insertions(+), 6 deletions(-) commit ba39b344e9240a4a5fd4ab8178200b85cd1809da Author: Christian Marangi Date: Sat Jul 23 16:29:32 2022 +0200 net: ethernet: stmicro: stmmac: generate stmmac dma conf before open Rework the driver to generate the stmmac dma_conf before stmmac_open. This permits a function to first check if it's possible to allocate a new dma_config and then pass it directly to __stmmac_open and "open" the interface with the new configuration. Signed-off-by: Christian Marangi Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 462 ++++++++++++++-------- 1 file changed, 289 insertions(+), 173 deletions(-) commit 8531c80800c10e8ef7952022326c2f983e1314bf Author: Christian Marangi Date: Sat Jul 23 16:29:31 2022 +0200 net: ethernet: stmicro: stmmac: move dma conf to dedicated struct Move dma buf conf to dedicated struct. This in preparation for code rework that will permit to allocate separate dma_conf without affecting the priv struct. Signed-off-by: Christian Marangi Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/chain_mode.c | 6 +- drivers/net/ethernet/stmicro/stmmac/ring_mode.c | 4 +- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 21 +- .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 4 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 286 +++++++++++---------- .../net/ethernet/stmicro/stmmac/stmmac_selftests.c | 8 +- drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 6 +- 7 files changed, 172 insertions(+), 163 deletions(-) commit 7028471edb646bfc532fec0973e50e784cdcb7c6 Author: Christian Marangi Date: Sat Jul 23 16:29:30 2022 +0200 net: ethernet: stmicro: stmmac: first disable all queues and disconnect in release Disable all queues and disconnect before tx_disable in stmmac_release to prevent a corner case where packet may be still queued at the same time tx_disable is called resulting in kernel panic if some packet still has to be processed. Signed-off-by: Christian Marangi Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f9ec5723c3dbfcede9c7b0dcdf85e401ce16316c Author: Christian Marangi Date: Sat Jul 23 16:29:29 2022 +0200 net: ethernet: stmicro: stmmac: move queue reset to dedicated functions Move queue reset to dedicated functions. This aside from a simple cleanup is also required to allocate a dma conf without resetting the tx queue while the device is temporarily detached as now the reset is not part of the dma init function and can be done later in the code flow. Signed-off-by: Christian Marangi Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 59 ++++++++++++----------- 1 file changed, 31 insertions(+), 28 deletions(-) commit aa246499bb5f44bf4822ff1966213c14912c732c Author: William Dean Date: Sat Jul 23 15:32:22 2022 +0800 net: delete extra space and tab in blank line delete extra space and tab in blank line, there is no functional change. Reported-by: Hacash Robot Signed-off-by: William Dean Link: https://lore.kernel.org/r/20220723073222.2961602-1-williamsukatube@163.com Signed-off-by: Jakub Kicinski net/ethtool/cabletest.c | 2 +- net/rxrpc/protocol.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2baf8ba532a12579a090d79d4522b9ec324073d5 Merge: 5030a9a03f01 9fab4cc8c345 Author: Jakub Kicinski Date: Mon Jul 25 18:20:51 2022 -0700 Merge tag 'wireless-next-2022-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v5.20 Third set of patches for v5.20. MLO work continues and we have a lot of stack changes due to that, including driver API changes. Not much driver patches except on mt76. Major changes: cfg80211/mac80211 - more prepartion for Wi-Fi 7 Multi-Link Operation (MLO) support, works with one link now - align with IEEE Draft P802.11be_D2.0 - hardware timestamps for receive and transmit mt76 - preparation for new chipset support - ACPI SAR support * tag 'wireless-next-2022-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (254 commits) wifi: mac80211: fix link data leak wifi: mac80211: mlme: fix disassoc with MLO wifi: mac80211: add macros to loop over active links wifi: mac80211: remove erroneous sband/link validation wifi: mac80211: mlme: transmit assoc frame with address translation wifi: mac80211: verify link addresses are different wifi: mac80211: rx: track link in RX data wifi: mac80211: optionally implement MLO multicast TX wifi: mac80211: expand ieee80211_mgmt_tx() for MLO wifi: nl80211: add MLO link ID to the NL80211_CMD_FRAME TX API wifi: mac80211: report link ID to cfg80211 on mgmt RX wifi: cfg80211: report link ID in NL80211_CMD_FRAME wifi: mac80211: add hardware timestamps for RX and TX wifi: cfg80211: add hardware timestamps to frame RX info wifi: cfg80211/nl80211: move rx management data into a struct wifi: cfg80211: add a function for reporting TX status with hardware timestamps wifi: nl80211: add RX and TX timestamp attributes wifi: ieee80211: add helper functions for detecting TM/FTM frames wifi: mac80211_hwsim: handle links for wmediumd/virtio wifi: mac80211: sta_info: fix link_sta insertion ... ==================== Link: https://lore.kernel.org/r/20220725174547.EA465C341C6@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 5030a9a03f0107f645772450bcba521b2ec19a51 Author: Alexander Stein Date: Wed Jul 20 08:39:24 2022 +0200 dt-bindings: net: fsl,fec: Add nvmem-cells / nvmem-cell-names properties These properties are inherited from ethernet-controller.yaml. This fixes the dt_binding_check warning: imx8mm-tqma8mqml-mba8mx.dt.yaml: ethernet@30be0000: 'nvmem-cell-names', 'nvmem-cells' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Alexander Stein Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220720063924.1412799-1-alexander.stein@ew.tq-group.com Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/fsl,fec.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5b56db90bbaf9d8581e5e6268727d8ad706555e4 Author: Yong Zhi Date: Mon Jul 25 14:49:09 2022 -0500 ASoC: Intel: sof_nau8825: Move quirk check to the front in late probe The sof_rt5682_quirk check was placed in the middle of hdmi handling code, move it to the front to be consistent with sof_rt5682.c/sof_card_late_probe(). Reviewed-by: Ranjani Sridharan Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220725194909.145418-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_nau8825.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 371a3f01fc1862c23fae35cb2c98ffb2eec143f1 Author: Yong Zhi Date: Mon Jul 25 14:49:08 2022 -0500 ASoC: Intel: sof_rt5682: Perform quirk check first in card late probe The check of sof_rt5682_quirk should not be skipped unless the HDMI handling code exits with error, fix by moving the quirk check to the front. Fixes: 94d2d0897474 ("ASoC: Intel: Boards: tgl_max98373: add dai_trigger function") Reviewed-by: Ranjani Sridharan Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220725194909.145418-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_rt5682.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 1f6645b1ee792fcb5bd621af7845430cc0de1531 Author: Yong Zhi Date: Mon Jul 25 14:49:07 2022 -0500 ASoC: Intel: sof_rt5682: Add support for mtl_mx98357_rt5682 This patch adds the driver data for rt5682 codec on SSP0 and max98357a speaker amplifiers on SSP1 for MTL platform. Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220725194909.145418-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_rt5682.c | 8 ++++++++ sound/soc/intel/common/soc-acpi-intel-mtl-match.c | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) commit 24913664b5103c3dd454081f79ba663ec18f65a1 Author: Pierre-Louis Bossart Date: Mon Jul 25 14:49:06 2022 -0500 ASoC: Intel: sof_es8336: remove hard-coded SSP selection For some reason we open-coded the SSP selection and only supported SSP0, 1 and 2. On ApolloLake platforms, the SSP5 can be used as well for the ES8336 hardware link. Remove hard-coded if/else code and align with same code already used in the SOF driver. BugLink: https://github.com/thesofproject/sof/issues/6015 Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220725194909.145418-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_es8336.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit fae93e3b952aeb0bad1a3d80ed9592cfc24aa8c6 Author: Muralidhar Reddy Date: Mon Jul 25 14:49:05 2022 -0500 ASoC: Intel: sof_es8336: reset the num_links during probe The number of dai_links for sound cards needs to be reset during probe. This is done in all machine drivers except this one. Reviewed-by: Bard Liao Signed-off-by: Muralidhar Reddy Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220725194909.145418-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_es8336.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 86b1959a2ccb1cd3c91f99a6ad06dcd0940a2058 Author: Muralidhar Reddy Date: Mon Jul 25 14:49:04 2022 -0500 ASoC: Intel: sof_es8336: add support for HDMI_In capture Adding support for 2 streams of HDMI-In capture via I2S in CBP_CFP configuration (codec provides bit clock and frame sync). Reviewed-by: Bard Liao Signed-off-by: Muralidhar Reddy Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220725194909.145418-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_es8336.c | 126 ++++++++++++++++++---- sound/soc/intel/common/soc-acpi-intel-adl-match.c | 12 +++ 2 files changed, 118 insertions(+), 20 deletions(-) commit 751e77011f7a43a204bf2a5d02fbf5f8219bc531 Author: Andrey Turkin Date: Mon Jul 25 14:49:03 2022 -0500 ASoC: Intel: sof_es8336: ignore GpioInt when looking for speaker/headset GPIO lines This fixes speaker GPIO detection on machines those ACPI tables list their jack detection GpioInt before output GpioIo. GpioInt entry can never be the speaker/headphone amplifier control so it makes sense to only look for GpioIo entries when looking for them. Reviewed-by: Andy Shevchenko Signed-off-by: Andrey Turkin Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220725194909.145418-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_es8336.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5e60f1cfb830342304200437121f440b72b54f54 Author: Andrey Turkin Date: Mon Jul 25 14:49:02 2022 -0500 ASoC: Intel: sof_es8336: Fix GPIO quirks set via module option The two GPIO quirk bits only affected actual GPIO selection when set by the quirks table. They were reported as being in effect when set via module options but actually did nothing. Reviewed-by: Andy Shevchenko Signed-off-by: Andrey Turkin Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220725194909.145418-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_es8336.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 2ec8b081d59f5c39eb262f09ebc9e81178d222be Author: Muralidhar Reddy Date: Mon Jul 25 14:49:01 2022 -0500 ASoC: Intel: soc-acpi: Add entry for sof_es8336 in ADL match table Adding support for ES83x6 codec in ADL match table Reviewed-by: Bard Liao Signed-off-by: Muralidhar Reddy Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220725194909.145418-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/hda/intel-dsp-config.c | 5 +++++ sound/soc/intel/common/soc-acpi-intel-adl-match.c | 13 +++++++++++++ 2 files changed, 18 insertions(+) commit 4e68eef41966771d0a109adaab2a632dbca2a983 Author: Pierre-Louis Bossart Date: Mon Jul 25 14:49:00 2022 -0500 ASoC: Intel: sof_sdw: add support for Dell SKU 0AF0 Somehow this device was not added in the initial AlderLake batch. From the ACPI definition this looks like a standard SDCA version with RT711 on link0, RT1316 on link1/2 and RT714 on link3. BugLink: https://github.com/thesofproject/linux/issues/3772 Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220725194909.145418-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit af468aadf00485a2f5e804fe97db4731bc7a9c24 Author: Brent Lu Date: Mon Jul 25 14:53:43 2022 -0500 ASoC: SOF: dai-intel: add SOF_DAI_INTEL_SSP_CLKCTRL_MCLK_AON bit Update definition for mclk always-on feature and increase the SOF_ABI_MINOR number for interface change. Reviewed-by: Ranjani Sridharan Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220725195343.145603-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown include/sound/sof/dai-intel.h | 2 ++ include/uapi/sound/sof/abi.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit d95610a1832993c539be22f0ec3ea8e34a29acff Author: YC Hung Date: Mon Jul 25 14:53:42 2022 -0500 ASoC: SOF: Add cont_update_posn to platform parameters Add cont_update_posn to platform parameters to support continue update position for platform. Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Chao Song Reviewed-by: Daniel Baluta Signed-off-by: YC Hung Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220725195343.145603-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc3-pcm.c | 3 +++ sound/soc/sof/sof-priv.h | 1 + 2 files changed, 4 insertions(+) commit e51699505042fb365df3a0ce68b850ccd9ad0108 Author: Pierre-Louis Bossart Date: Mon Jul 25 14:53:41 2022 -0500 ASoC: SOF: Intel: hda: add sanity check on SSP index reported by NHLT We should have a limited trust in the BIOS and verify that the SSP index reported in NHLT is valid for each platform. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220725195343.145603-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1b54a0121dba12af268fb75c413feabdb9f573d4 Author: Rodrigo Siqueira Date: Fri Jul 22 13:56:17 2022 -0400 drm/amd/display: Reduce stack size in the mode support function When we use the allmodconfig option we see the following error: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c: In function 'dml32_ModeSupportAndSystemConfigurationFull': drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c:3799:1: error: the frame size of 2464 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] 3799 | } // ModeSupportAndSystemConfigurationFull This commit fixes this issue by moving part of the mode support operation from ModeSupportAndSystemConfigurationFull to a dedicated function. Cc: Harry Wentland Cc: Alex Deucher Cc: Aurabindo Pillai Cc: Stephen Rothwell Tested-by: Stephen Rothwell Acked-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 132 +++++++++++---------- 1 file changed, 70 insertions(+), 62 deletions(-) commit d58715704c5c7d82d7194540780fb335ab337da0 Author: Anthony Koo Date: Sun Jul 17 11:41:44 2022 -0400 drm/amd/display: 3.2.196 This version brings along following fixes: - Copy crc_skip_count when duplicating CRTC state - Add debug option for idle optimizations on cursor updates - Disable MPC split for DCN32/321 - Add missing ODM 2:1 policy logic - Update DCN32 and DCN321 SR latencies - Add reinstate dram in the FPO logic - Add dc_ctx to link_enc_create() parameters - Cache cursor when cursor exceeds 64x64 - Add support for manual DMUB FAMS trigger - Fix dpstreamclk programming - Add missing AUDIO_DTO_SEL reg field - Add OTG/ODM functions - Use correct clock source constructor for DCN314 - Use correct DTO_SRC_SEL for 128b/132b encoding - Add pixel rate div calcs and programming - Remove FPU flags from DCN30 Makefile - Create patch bounding box function for isolate FPU - Move mclk calculation function to DML - Remove FPU operations from dcn201 resources - Fallback to SW cursor if SubVP + cursor too big - Drop unnecessary FPU flags on dcn302 files - Reboot while unplug hdcp enabled dp from mst hub - Reset pipe count when iterating for DET override - Calculate MALL cache lines based on Mblks required - Fix two MPO videos in single display ODM combine mode - Guard against zero memory channels - Updates SubVP + SubVP DRR cases updates - Fix OPTC function pointers for DCN314 - Add enable/disable FIFO callbacks to stream setup - Avoid MPC infinite loop Acked-by: Alex Hung Signed-off-by: Anthony Koo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c13423c63f73ee2f9807fdb2a3a7e647421a8114 Author: Leo Li Date: Thu Nov 4 19:41:55 2021 -0400 drm/amd/display: Copy crc_skip_count when duplicating CRTC state [Why] crc_skip_count is used to track how many frames to skip to allow the OTG CRC engine to "warm up" before it outputs correct CRC values. Experimentally, this seems to be 2 frames. When duplicating CRTC states, this value was not copied to the duplicated state. Therefore, when this state is committed, we will needlessly wait 2 frames before outputing CRC values. Even if the CRC engine is already warmed up. [How] Copy the crc_skip_count as part of dm_crtc_duplicate_state. Acked-by: Alex Hung Signed-off-by: Leo Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 1 + 1 file changed, 1 insertion(+) commit b1babe8623f91a71a5acc34eb323c718e0413b74 Author: Alvin Lee Date: Fri Jun 3 16:39:48 2022 -0400 drm/amd/display: Add debug option for idle optimizations on cursor updates For optimizations and debug purposes we added an option to exit idle operations on cursor updates. Acked-by: Alex Hung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 1 + 2 files changed, 2 insertions(+) commit 3facca7489be2d42c6256350dae72c342a47d7e5 Author: Alvin Lee Date: Thu Jun 2 16:01:33 2022 -0400 drm/amd/display: Disable MPC split for DCN32/321 Due to CRB, no need to rely on MPC splitting to maximize use of DET anymore. Reviewed-by: Rodrigo Siqueira Acked-by: Alex Hung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ffccfdbab1056954fd400d2864a1c1b38915c143 Author: Samson Tam Date: Thu May 26 21:12:23 2022 -0400 drm/amd/display: Add missing ODM 2:1 policy logic Phantom pipes must use the same configuration used in main pipes. This commit add this check. Reviewed-by: Rodrigo Siqueira Acked-by: Alex Hung Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 1 - drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 493af96d61b1361a44d016057e0fc6e5d4c92fc7 Author: Alvin Lee Date: Thu May 19 14:03:09 2022 -0400 drm/amd/display: Update DCN32 and DCN321 SR latencies Update worst case SR latencies according to values measured by hardware team. Reviewed-by: Rodrigo Siqueira Acked-by: Alex Hung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 6290ba4c1656ce2374996b2ed11c3997ebbc4af5 Author: Rodrigo Siqueira Date: Tue Apr 19 11:22:17 2022 -0400 drm/amd/display: Add reinstate dram in the FPO logic In order to handle FPO correctly, we need to reinstate the dram values. This function adds the required code to handle the vblank stretch and the dram calculation. Acked-by: Alex Hung Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn30/dcn30_resource.h | 3 + .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 67 ++++++++++++++++++---- 2 files changed, 60 insertions(+), 10 deletions(-) commit e216431b63aef8b7d9cf6e59aea39582d48b1808 Author: Aurabindo Pillai Date: Fri Apr 1 15:29:21 2022 -0400 drm/amd/display: Add dc_ctx to link_enc_create() parameters [Why&How] Preparation to enable run time initialization of register offsets to add dc_context to the link_enc_create callback. This is needed to get the dc_ctx handle where register offset initialization routine is called. Reviewed-by: Rodrigo Siqueira Acked-by: Alan Liu Acked-by: Alex Hung Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dce60/dce60_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h | 1 + drivers/gpu/drm/amd/display/dc/dcn201/dcn201_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c | 4 +++- drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c | 4 +++- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 1 + drivers/gpu/drm/amd/display/dc/inc/core_types.h | 1 + 23 files changed, 27 insertions(+), 3 deletions(-) commit 4074f96d0f2db2fcbd8e223aebe60ca445b8aeae Author: Chris Park Date: Tue Jun 28 12:36:04 2022 -0400 drm/amd/display: Cache cursor when cursor exceeds 64x64 [Why] When Static screen from MALL, the cursor needs to be cached if cursor exceeds 64x64 size. [How] Program the bit that cache cursor in MALL when size of the cursor exceeds 64x64. Reviewed-by: Jun Lei Acked-by: Alan Liu Acked-by: Alex Hung Signed-off-by: Chris Park Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubp.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubp.h | 2 +- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 9 +++++++-- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) commit 81f776b670a0eb17bf9cfbfd2df32f66a34bc453 Author: Anthony Koo Date: Sat Jul 16 23:14:01 2022 -0400 drm/amd/display: Add support for manual DMUB FAMS trigger - Add is_drr parameter to indicate DRR is enabled on the panel to determine whether SubVP MCLK switch logic should be enabled - Add DRR manual trigger in FW (instead of driver) because manual trigger programming triggers DRR update pending and can block SubVP MCLK switches from taking place Acked-by: Alex Hung Signed-off-by: Anthony Koo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 1f5dcb7365e4e0a8a6fca44352218ccc6f41a8b9 Author: Michael Strauss Date: Fri Jun 10 16:28:03 2022 -0400 drm/amd/display: Fix dpstreamclk programming [WHY] Currently programming incorrect hpo inst as well as selecting incorrect source [HOW] Use hpo inst instead of otg inst to select dpstreamclk inst Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Hung Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.c | 8 +++++--- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.h | 8 ++------ drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c | 13 +++++++------ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c | 3 ++- drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h | 3 ++- drivers/gpu/drm/amd/display/dc/link/link_hwss_hpo_dp.c | 4 ++-- 6 files changed, 20 insertions(+), 19 deletions(-) commit b5e924bd7cce823e604f9b7834fac846a910331c Author: Michael Strauss Date: Thu Jun 9 11:02:15 2022 -0400 drm/amd/display: Add missing AUDIO_DTO_SEL reg field [WHY] Needed to program audio dto Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Hung Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5ade1b951dec63a81b23c2ff75c5b4c191977620 Author: Michael Strauss Date: Thu Jun 9 10:52:52 2022 -0400 drm/amd/display: Add OTG/ODM functions [WHY] Required for correct OTG_H_TIMING_CNTL programming Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Hung Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn314/dcn314_optc.c | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 0d60f2b47d8312d6a88454a373990579624edbde Author: Michael Strauss Date: Thu Jun 9 10:48:43 2022 -0400 drm/amd/display: Use correct clock source constructor for DCN314 [WHY] Previously was pointing to DCN3 clock constructor rather than DCN31's Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Hung Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c5a2fa97b91d37375f4fc8aeb37c9456c93c828 Author: Michael Strauss Date: Thu Jun 9 10:45:34 2022 -0400 drm/amd/display: Use correct DTO_SRC_SEL for 128b/132b encoding [WHY] DP DTO isn't used for 128b/132b encoding [HOW] Check current link rate to determine whether using 8b/10b or 128/132b encoding Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Hung Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 1 + .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 20 +++++++++++++++----- .../drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 1 + .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 + drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 1 + drivers/gpu/drm/amd/display/dc/inc/clock_source.h | 7 +++++-- 6 files changed, 24 insertions(+), 7 deletions(-) commit cb849b4dc73d414149fea96330cdf96a82919fc9 Author: Michael Strauss Date: Tue May 31 16:55:32 2022 -0400 drm/amd/display: Add pixel rate div calcs and programming [WHY/HOW] Need to calculate and set some pixel rate divisors on correct otg_inst Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Hung Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c | 17 ++++++++++ .../gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c | 36 ++++++++++++++++++++++ .../gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.h | 2 ++ .../gpu/drm/amd/display/dc/dcn314/dcn314_init.c | 1 + 4 files changed, 56 insertions(+) commit 40b31e5355ba8c4f7e58f1c458bbe46763dca541 Author: Rodrigo Siqueira Date: Thu Jul 14 16:32:54 2022 -0400 drm/amd/display: Remove FPU flags from DCN30 Makefile At this stage, we must have all the FPU code for DCN30 isolated in the DML folder. Drop FPU flags from Makefile. Reviewed-by: Harry Wentland Acked-by: Alex Hung Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn30/Makefile | 30 --------------------------- 1 file changed, 30 deletions(-) commit bdf4473394deffc94c16c0502e73f2daabbdc1d0 Author: Rodrigo Siqueira Date: Thu Jul 14 16:13:10 2022 -0400 drm/amd/display: Create patch bounding box function for isolate FPU In the DCN30 resource, we have a small patch to the bounding box struct; this patch uses FPU operations. This commit moves that specific part to its function under the DML folder. Reviewed-by: Harry Wentland Acked-by: Alex Hung Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 19 ++----------------- drivers/gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c | 20 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.h | 2 ++ 3 files changed, 24 insertions(+), 17 deletions(-) commit 05674cc9ea97079ad7c819628e3e56b046c2f497 Author: Rodrigo Siqueira Date: Thu Jul 14 15:27:58 2022 -0400 drm/amd/display: Move mclk calculation function to DML The function responsible for calculating the MCLK switching has FPU operations. This commit moves it to the dcn30_fpu file. Reviewed-by: Harry Wentland Acked-by: Alex Hung Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 38 ------------------- .../gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c | 43 ++++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.h | 6 +++ 3 files changed, 49 insertions(+), 38 deletions(-) commit 6a7379f196230cfa35335ec627e0c0e08da6a8b8 Author: Rodrigo Siqueira Date: Thu Jul 14 15:11:31 2022 -0400 drm/amd/display: Remove FPU operations from dcn201 resources We have some FPU operations on the resource part of the DCN201. This commit drops FPU flags and moves any required FPU code to the DML folder. Reviewed-by: Harry Wentland Acked-by: Alex Hung Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn201/Makefile | 24 ------ .../drm/amd/display/dc/dcn201/dcn201_resource.c | 10 ++- .../gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 87 ++++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.h | 4 + 4 files changed, 100 insertions(+), 25 deletions(-) commit a4f1b04216023ff0f4cd89328b59ee6890248130 Author: Alvin Lee Date: Thu Jul 14 18:21:28 2022 -0400 drm/amd/display: Fallback to SW cursor if SubVP + cursor too big [Description] - For SubVP cursor cannot be cached in MALL, therefore we will switch to SW cursor if the cursor size exceeds what can fit in the local DCN buffers (64x64x4) - Returning false / failure for set_cursor_attributes will fallback to SW cursor Reviewed-by: Jun Lei Acked-by: Alex Hung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 5 +++++ 1 file changed, 5 insertions(+) commit ee4a26b4ea029aeed749c6560ed9eba224337b04 Author: Rodrigo Siqueira Date: Thu Jul 14 12:29:12 2022 -0400 drm/amd/display: Drop unnecessary FPU flags on dcn302 files We already isolated the DCN302 code in the DML folder, but we forgot to drop the FPU flags from the Makefile. This commit drops those flags. Reviewed-by: Harry Wentland Acked-by: Alex Hung Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn302/Makefile | 25 ------------------------- 1 file changed, 25 deletions(-) commit 72bb503097e79113503dc6d1d49c4063ef97970a Author: hersen wu Date: Thu Jul 14 10:00:28 2022 -0400 drm/amd/display: Reboot while unplug hdcp enabled dp from mst hub [Why] event_property_update does not check NULL pointer [How] check aconnector->base.state equals NULL Reviewed-by: Bhawanpreet Lakha Acked-by: Alex Hung Signed-off-by: hersen wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 34 ++++++++++++++-------- 1 file changed, 22 insertions(+), 12 deletions(-) commit f46e3f28f89b893685ec9204405677dac410d8ad Author: Taimur Hassan Date: Wed Jul 13 17:07:43 2022 -0400 drm/amd/display: Reset pipe count when iterating for DET override [Why] Coding error in DET allocation was resulting in too few DET segments being allocated, causing underflow. [How] Reset pipe count each time we begin iterating through pipes for a stream. Reviewed-by: Alvin Lee Acked-by: Alex Hung Signed-off-by: Taimur Hassan Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4a21ab548a7ac19b15aba9aa8df39972ed82f4ad Author: Alvin Lee Date: Wed Jul 13 12:33:37 2022 -0400 drm/amd/display: Calculate MALL cache lines based on Mblks required [Description] - Calculation for NumWays in MALL should be based on number of MBlks Reviewed-by: Jun Lei Acked-by: Alex Hung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.h | 1 + .../gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) commit eb54e014367e1700fa5b94e4c788520081a70661 Author: Samson Tam Date: Tue Jul 12 05:54:38 2022 -0400 drm/amd/display: Fix two MPO videos in single display ODM combine mode [Why] In single display ODM combine mode, two MPO videos ( three planes ) are not working [How] When we detect three planes, don't set odm combine 2to1 policy for the MPO planes. Otherwise, we run out of pipes available Add support for two MPO videos in dc_add_plane_to_context(). Don't allow both videos to be on the same side of the display. Add extra check when fetching free pipe for two MPO videos. Reviewed-by: Alvin Lee Acked-by: Alex Hung Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 136 ++++++++++++++++--- .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 149 +++++++++++++++++++-- .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.h | 6 + 3 files changed, 260 insertions(+), 31 deletions(-) commit a7cefb0b40dcfdafedc54a3ba659327d0336956d Author: Nicholas Kazlauskas Date: Tue Jul 12 14:32:45 2022 -0400 drm/amd/display: Guard against zero memory channels [Why] If BIOS doesn't specify number of memory channels then bandwidth validation will fail due to insufficient BW in DML. [How] If BIOS is setting zero channels then use the default in the table. If no entry is in the table and no BIOS value is specified then throw an ASSERT for future developers to look into. Reviewed-by: Michael Strauss Acked-by: Alex Hung Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 319568d75f5f91cd4f362b26e65af2a4437c64bf Author: Alvin Lee Date: Tue Jul 12 15:49:19 2022 -0400 drm/amd/display: Updates SubVP and SubVP DRR cases [Description] - For any DRR cases in SubVP, don't lock for VSYNC flips - For DCN32/321 use FW to do DRR manual trigger programming - Add bit in SubVP cmd to indicate if the SubVP pipe is DRR Reviewed-by: Jun Lei Acked-by: Alex Hung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 17 ++++++ drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 1 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 7 +-- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_optc.c | 63 +++++++++++++++++++++- 4 files changed, 82 insertions(+), 6 deletions(-) commit 2ce0b2186c057a54a4d980b296bd1659d0091716 Author: Nicholas Kazlauskas Date: Thu Jul 7 10:19:53 2022 -0400 drm/amd/display: Fix OPTC function pointers for DCN314 [Why] Access violation occurs when swapping between HDMI and FRL monitors because we're missing the immediate_disable_crtc callback and it's required for the DCN314 clk manager. [How] Update the table to match the DCN31 optc functions for ones that should be the same: - immediate_disable_crtc - configure_crc Reviewed-by: Michael Strauss Acked-by: Alex Hung Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn31/dcn31_optc.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_optc.h | 2 ++ drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) commit 44584b417a698bfaac0c2577e7cc4015ea7359ce Author: Nicholas Kazlauskas Date: Wed Jul 6 16:26:40 2022 -0400 drm/amd/display: Add enable/disable FIFO callbacks to stream setup [Why] We don't write out attributes after disabling and re-enabling the link on some monitors, causing some, but not all, HDMI displays to fail to lightup on DCN314. [How] Firmware used to do this after DIG link setup. Since firmware is no longer doing this to support USB4 and dynamic link remapping we'll need to add this to driver in the equivalent paths. New optional callbacks were created in the stream encoder interface and implementations were added for DCN314. Reviewed-by: Michael Strauss Acked-by: Alex Hung Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../display/dc/dcn314/dcn314_dio_stream_encoder.c | 38 +++++++++++++++------- .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 2 ++ .../gpu/drm/amd/display/dc/link/link_hwss_dio.c | 7 ++++ 3 files changed, 35 insertions(+), 12 deletions(-) commit 8de297dc046c180651c0500f8611663ae1c3828a Author: Aric Cyr Date: Mon Jul 11 10:03:03 2022 -0400 drm/amd/display: Avoid MPC infinite loop [why] In some cases MPC tree bottom pipe ends up point to itself. This causes iterating from top to bottom to hang the system in an infinite loop. [how] When looping to next MPC bottom pipe, check that the pointer is not same as current to avoid infinite loop. Reviewed-by: Josip Pavic Reviewed-by: Jun Lei Acked-by: Alex Hung Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 5 +++++ 1 file changed, 5 insertions(+) commit 4c5aa594928f97593502a66d5a9075f5f5dd064b Author: Aaron Liu Date: Mon Jul 25 08:45:56 2022 +0800 drm/amdgpu: enable swiotlb for gmc 11.0 Enable swiotlb for gmc 11.0. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3616d49da5dab635c4bb0eeb183b61df72cd0757 Author: Aaron Liu Date: Tue Apr 19 14:17:05 2022 +0800 drm/amdgpu: enable swiotlb for gmc 10.0 (V2) Enable swiotlb for gmc 10.0. v2: include drm_cache.h to use the function ‘drm_need_swiotlb’ Signed-off-by: Aaron Liu Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 5 +++++ 1 file changed, 5 insertions(+) commit ade535395088aa01a0f1f53ff95da04126eef3f3 Author: Arnaldo Carvalho de Melo Date: Mon Jul 25 18:09:08 2022 -0300 perf data: Add missing unistd.h header needed for pid_t Noticed when processing 'perf kwork' that includes util/data.h without, by luck, having included unistd.h indirectly to get the pid_t typedef. Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/data.h | 1 + 1 file changed, 1 insertion(+) commit 1ab55323c5ef379e96ff6b225cd95e80fef4939a Author: Namhyung Kim Date: Mon Jul 25 11:31:24 2022 -0700 perf lock: Support -t option for 'contention' subcommand Like perf lock report, it can report lock contention stat of each task. $ perf lock contention -t contended total wait max wait avg wait pid comm 5 945.20 us 902.08 us 189.04 us 316167 EventManager_De 33 98.17 us 6.78 us 2.97 us 766063 kworker/0:1-get 7 92.47 us 61.26 us 13.21 us 316170 EventManager_De 14 76.31 us 12.87 us 5.45 us 12949 timedcall 24 76.15 us 12.27 us 3.17 us 767992 sched-pipe 15 75.62 us 11.93 us 5.04 us 15127 switchto-defaul 24 71.84 us 5.59 us 2.99 us 629168 kworker/u513:2- 17 67.41 us 7.94 us 3.96 us 13504 coroner- 1 59.56 us 59.56 us 59.56 us 316165 EventManager_De 14 56.21 us 6.89 us 4.01 us 0 swapper Signed-off-by: Namhyung Kim Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220725183124.368304-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-lock.txt | 4 ++++ tools/perf/builtin-lock.c | 22 ++++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) commit 79079f21f50a501f03ee237be6efaa0e533f9f87 Author: Namhyung Kim Date: Mon Jul 25 11:31:23 2022 -0700 perf lock: Add -k and -F options to 'contention' subcommand Like perf lock report, add -k/--key and -F/--field options to control output formatting and sorting. Note that it has slightly different default options as some fields are not available and to optimize the screen space. Signed-off-by: Namhyung Kim Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220725183124.368304-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-lock.txt | 15 ++++++++++ tools/perf/builtin-lock.c | 51 ++++++++++++++++++++++++++-------- 2 files changed, 55 insertions(+), 11 deletions(-) commit 528b9cab3b813a3b94a4af14845308f720eb13fd Author: Namhyung Kim Date: Mon Jul 25 11:31:22 2022 -0700 perf lock: Add 'contention' subcommand The 'perf lock contention' processes the lock contention events and displays the result like perf lock report. Right now, there's not much difference between the two but the lock contention specific features will come soon. $ perf lock contention contended total wait max wait avg wait type caller 238 1.41 ms 29.20 us 5.94 us spinlock update_blocked_averages+0x4c 1 902.08 us 902.08 us 902.08 us rwsem:R do_user_addr_fault+0x1dd 81 330.30 us 17.24 us 4.08 us spinlock _nohz_idle_balance+0x172 2 89.54 us 61.26 us 44.77 us spinlock do_anonymous_page+0x16d 24 78.36 us 12.27 us 3.27 us mutex pipe_read+0x56 2 71.58 us 59.56 us 35.79 us spinlock __handle_mm_fault+0x6aa 6 25.68 us 6.89 us 4.28 us spinlock do_idle+0x28d 1 18.46 us 18.46 us 18.46 us rtmutex exec_fw_cmd+0x21b 3 15.25 us 6.26 us 5.08 us spinlock tick_do_update_jiffies64+0x2c Signed-off-by: Namhyung Kim Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220725183124.368304-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-lock.txt | 4 +- tools/perf/builtin-lock.c | 212 ++++++++++++++++++++++++++++++++- 2 files changed, 214 insertions(+), 2 deletions(-) commit f9c695a21103bb1665aaa87c7592ac17303fc160 Author: Namhyung Kim Date: Mon Jul 25 11:31:21 2022 -0700 perf lock: Add lock aggregation enum Introduce the aggr_mode variable to prepare a later code change. The default is LOCK_AGGR_ADDR which aggregates the result for the lock instances. When -t/--threads option is given, it'd be set to LOCK_AGGR_TASK. The LOCK_AGGR_CALLER is for the contention analysis and it'd aggregate the stat by comparing the callstacks. Signed-off-by: Namhyung Kim Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220725183124.368304-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 114 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 94 insertions(+), 20 deletions(-) commit fb87158bab32607669124b240a17125a0190647d Author: Namhyung Kim Date: Mon Jul 25 11:31:20 2022 -0700 perf lock: Add flags field in the lock_stat For lock contention tracepoint analysis, it needs to keep the flags. As nr_readlock and nr_trylock fields are not used for it, let's make it a union. Signed-off-by: Namhyung Kim Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220725183124.368304-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 91118fa994a9c9e38b6aed0a4081849886c37ade Author: Rob Herring Date: Tue Jul 19 15:52:01 2022 -0600 dt-bindings: panel: raydium,rm67191: Add missing type to 'video-mode' 'video-mode' is missing a type definition and is not a common property. The type is 'uint32'. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220719215201.1877997-1-robh@kernel.org Documentation/devicetree/bindings/display/panel/raydium,rm67191.yaml | 1 + 1 file changed, 1 insertion(+) commit b3cbbb58632fa6f9cebf3f5c3ba210f11a3bdeb8 Author: Dinh Nguyen Date: Mon Jul 25 15:03:07 2022 -0500 ARM: dts: add EMAC AXI settings for Cyclone5 Add the dts entries needed to support the EMAC AXI bus settings on the Cyclone5. Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit f8a855ed8d07f6f11c6b0d6a692f0220c64f8c21 Author: Peter Collingbourne Date: Fri Jul 22 18:53:31 2022 -0700 of/fdt: Clean up early_init_dt_reserve_memory_arch() As of commit 18250b43f7b6 ("of: fdt: Remove early_init_dt_reserve_memory_arch() override capability") this is no longer an arch hook, so rename it to remove the confusing _arch suffix. Also remove some unnecessary indirection from all but one of the callers by calling memblock_reserve() directly instead. Signed-off-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/I3362bdd92ae6e47e8f5bac01aa228d32f9d01aad Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220723015331.1607029-1-pcc@google.com drivers/of/fdt.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 34a255e67615995f729254307a0581c143e03752 Author: Nicolin Chen Date: Fri Jul 22 19:02:56 2022 -0700 vfio: Replace phys_pfn with pages for vfio_pin_pages() Most of the callers of vfio_pin_pages() want "struct page *" and the low-level mm code to pin pages returns a list of "struct page *" too. So there's no gain in converting "struct page *" to PFN in between. Replace the output parameter "phys_pfn" list with a "pages" list, to simplify callers. This also allows us to replace the vfio_iommu_type1 implementation with a more efficient one. And drop the pfn_valid check in the gvt code, as there is no need to do such a check at a page-backed struct page pointer. For now, also update vfio_iommu_type1 to fit this new parameter too. Reviewed-by: Christoph Hellwig Reviewed-by: Kirti Wankhede Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Acked-by: Eric Farman Tested-by: Terrence Xu Tested-by: Eric Farman Signed-off-by: Nicolin Chen Link: https://lore.kernel.org/r/20220723020256.30081-11-nicolinc@nvidia.com Signed-off-by: Alex Williamson Documentation/driver-api/vfio-mediated-device.rst | 2 +- drivers/gpu/drm/i915/gvt/kvmgt.c | 19 ++++++------------- drivers/s390/cio/vfio_ccw_cp.c | 19 +++++++++---------- drivers/s390/crypto/vfio_ap_ops.c | 6 +++--- drivers/vfio/vfio.c | 8 ++++---- drivers/vfio/vfio.h | 2 +- drivers/vfio/vfio_iommu_type1.c | 19 +++++++++++-------- include/linux/vfio.h | 2 +- 8 files changed, 36 insertions(+), 41 deletions(-) commit c2863febd88bb2d0028eebcf0ee94b49859a06d3 Author: Nicolin Chen Date: Fri Jul 22 19:02:55 2022 -0700 vfio/ccw: Add kmap_local_page() for memcpy A PFN is not secure enough to promise that the memory is not IO. And direct access via memcpy() that only handles CPU memory will crash on S390 if the PFN is an IO PFN, as we have to use the memcpy_to/fromio() that uses the special S390 IO access instructions. On the other hand, a "struct page *" is always a CPU coherent thing that fits memcpy(). Also, casting a PFN to "void *" for memcpy() is not a proper practice, kmap_local_page() is the correct API to call here, though S390 doesn't use highmem, which means kmap_local_page() is a NOP. There's a following patch changing the vfio_pin_pages() API to return a list of "struct page *" instead of PFNs. It will block any IO memory from ever getting into this call path, for such a security purpose. In this patch, add kmap_local_page() to prepare for that. Suggested-by: Jason Gunthorpe Reviewed-by: Jason Gunthorpe Acked-by: Eric Farman Tested-by: Eric Farman Signed-off-by: Nicolin Chen Link: https://lore.kernel.org/r/20220723020256.30081-10-nicolinc@nvidia.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_cp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 8561aa4fb7d72011c2352af2b1b9caf588942181 Author: Nicolin Chen Date: Fri Jul 22 19:02:54 2022 -0700 vfio: Rename user_iova of vfio_dma_rw() Following the updated vfio_pin/unpin_pages(), use the simpler "iova". Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Tested-by: Terrence Xu Tested-by: Eric Farman Signed-off-by: Nicolin Chen Link: https://lore.kernel.org/r/20220723020256.30081-9-nicolinc@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/vfio.c | 6 +++--- include/linux/vfio.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 1331460514ff7d378373223109eefae4cd55ec77 Author: Nicolin Chen Date: Fri Jul 22 19:02:53 2022 -0700 vfio/ccw: Change pa_pfn list to pa_iova list The vfio_ccw_cp code maintains both iova and its PFN list because the vfio_pin/unpin_pages API wanted pfn list. Since vfio_pin/unpin_pages() now accept "iova", change to maintain only pa_iova list and rename all "pfn_array" strings to "page_array", so as to simplify the code. Reviewed-by: Jason Gunthorpe Reviewed-by: Eric Farman Tested-by: Eric Farman Signed-off-by: Nicolin Chen Link: https://lore.kernel.org/r/20220723020256.30081-8-nicolinc@nvidia.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_cp.c | 135 +++++++++++++++++++---------------------- 1 file changed, 64 insertions(+), 71 deletions(-) commit 3fad3a26139d5a41bc6b20df47ff067f5db2fe75 Author: Nicolin Chen Date: Fri Jul 22 19:02:52 2022 -0700 vfio/ap: Change saved_pfn to saved_iova The vfio_ap_ops code maintains both nib address and its PFN, which is redundant, merely because vfio_pin/unpin_pages API wanted pfn. Since vfio_pin/unpin_pages() now accept "iova", change "saved_pfn" to "saved_iova" and remove pfn in the vfio_ap_validate_nib(). Reviewed-by: Jason Gunthorpe Reviewed-by: Tony Krowiak Tested-by: Eric Farman Signed-off-by: Nicolin Chen Link: https://lore.kernel.org/r/20220723020256.30081-7-nicolinc@nvidia.com Signed-off-by: Alex Williamson drivers/s390/crypto/vfio_ap_ops.c | 42 ++++++++++++++--------------------- drivers/s390/crypto/vfio_ap_private.h | 4 ++-- 2 files changed, 19 insertions(+), 27 deletions(-) commit 44abdd1646e1fbfb781972c0bffc90b4eb3e87b3 Author: Nicolin Chen Date: Fri Jul 22 19:02:51 2022 -0700 vfio: Pass in starting IOVA to vfio_pin/unpin_pages API The vfio_pin/unpin_pages() so far accepted arrays of PFNs of user IOVA. Among all three callers, there was only one caller possibly passing in a non-contiguous PFN list, which is now ensured to have contiguous PFN inputs too. Pass in the starting address with "iova" alone to simplify things, so callers no longer need to maintain a PFN list or to pin/unpin one page at a time. This also allows VFIO to use more efficient implementations of pin/unpin_pages. For now, also update vfio_iommu_type1 to fit this new parameter too, while keeping its input intact (being user_iova) since we don't want to spend too much effort swapping its parameters and local variables at that level. Reviewed-by: Christoph Hellwig Reviewed-by: Kirti Wankhede Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Reviewed-by: Tony Krowiak Acked-by: Eric Farman Tested-by: Terrence Xu Tested-by: Eric Farman Signed-off-by: Nicolin Chen Link: https://lore.kernel.org/r/20220723020256.30081-6-nicolinc@nvidia.com Signed-off-by: Alex Williamson Documentation/driver-api/vfio-mediated-device.rst | 4 ++-- drivers/gpu/drm/i915/gvt/kvmgt.c | 18 +++++---------- drivers/s390/cio/vfio_ccw_cp.c | 4 ++-- drivers/s390/crypto/vfio_ap_ops.c | 9 ++++---- drivers/vfio/vfio.c | 27 ++++++++++------------- drivers/vfio/vfio.h | 4 ++-- drivers/vfio/vfio_iommu_type1.c | 15 ++++++------- include/linux/vfio.h | 5 ++--- 8 files changed, 37 insertions(+), 49 deletions(-) commit 176baefb2eb5d7a3ddebe3ff803db1fce44574b5 Author: Dan Williams Date: Wed Jun 8 22:56:37 2022 -0700 cxl/hdm: Commit decoder state to hardware After all the soft validation of the region has completed, convey the region configuration to hardware while being careful to commit decoders in specification mandated order. In addition to programming the endpoint decoder base-address, interleave ways and granularity, the switch decoder target lists are also established. While the kernel can enforce spec-mandated commit order, it can not enforce spec-mandated reset order. For example, the kernel can't stop someone from removing an endpoint device that is occupying decoderN in a switch decoder where decoderN+1 is also committed. To reset decoderN, decoderN+1 must be torn down first. That "tear down the world" implementation is saved for a follow-on patch. Callback operations are provided for the 'commit' and 'reset' operations. While those callbacks may prove useful for CXL accelerators (Type-2 devices with memory) the primary motivation is to enable a simple way for cxl_test to intercept those operations. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784338418.1758207.14659830845389904356.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams Documentation/ABI/testing/sysfs-bus-cxl | 16 +++ drivers/cxl/core/hdm.c | 227 ++++++++++++++++++++++++++++++++ drivers/cxl/core/port.c | 1 + drivers/cxl/core/region.c | 194 +++++++++++++++++++++++++-- drivers/cxl/cxl.h | 13 +- tools/testing/cxl/test/cxl.c | 46 +++++++ 6 files changed, 486 insertions(+), 11 deletions(-) commit 27b3f8d13830cdbd8deae2b709af182d88237ba5 Author: Dan Williams Date: Mon Jun 6 15:18:31 2022 -0700 cxl/region: Program target lists Once the region's interleave geometry (ways, granularity, size) is established and all the endpoint decoder targets are assigned, the next phase is to program all the intermediate decoders. Specifically, each CXL switch in the path between the endpoint and its CXL host-bridge (including the logical switch internal to the host-bridge) needs to have its decoders programmed and the target list order assigned. The difficulty in this implementation lies in determining which endpoint decoder ordering combinations are valid. Consider the cxl_test case of 2 host bridges, each of those host-bridges attached to 2 switches, and each of those switches attached to 2 endpoints for a potential 8-way interleave. The x2 interleave at the host-bridge level requires that all even numbered endpoint decoder positions be located on the "left" hand side of the topology tree, and the odd numbered positions on the other. The endpoints that are peers on the same switch need to have a position that can be routed with a dedicated address bit per-endpoint. See check_last_peer() for the details. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784337827.1758207.132121746122685208.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/core.h | 4 + drivers/cxl/core/port.c | 4 +- drivers/cxl/core/region.c | 260 ++++++++++++++++++++++++++++++++++++++++++++-- drivers/cxl/cxl.h | 2 + 4 files changed, 259 insertions(+), 11 deletions(-) commit 384e624bb211b406db40edc900bb51af8bb267d0 Author: Dan Williams Date: Tue Jun 7 10:56:10 2022 -0700 cxl/region: Attach endpoint decoders CXL regions (interleave sets) are made up of a set of memory devices where each device maps a portion of the interleave with one of its decoders (see CXL 2.0 8.2.5.12 CXL HDM Decoder Capability Structure). As endpoint decoders are identified by a provisioning tool they can be added to a region provided the region interleave properties are set (way, granularity, HPA) and DPA has been assigned to the decoder. The attach event triggers several validation checks, for example: - is the DPA sized appropriately for the region - is the decoder reachable via the host-bridges identified by the region's root decoder - is the device already active in a different region position slot - are there already regions with a higher HPA active on a given port (per CXL 2.0 8.2.5.12.20 Committing Decoder Programming) ...and the attach event affords an opportunity to collect data and resources relevant to later programming the target lists in switch decoders, for example: - allocate a decoder at each cxl_port in the decode chain - for a given switch port, how many the region's endpoints are hosted through the port - how many unique targets (next hops) does a port need to map to reach those endpoints The act of reconciling this information and deploying it to the decoder configuration is saved for a follow-on patch. Co-developed-by: Ben Widawsky Signed-off-by: Ben Widawsky Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784337277.1758207.4108508181328528703.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/core.h | 7 + drivers/cxl/core/port.c | 10 +- drivers/cxl/core/region.c | 364 +++++++++++++++++++++++++++++++++++++++++++++- drivers/cxl/cxl.h | 20 +++ drivers/cxl/cxlmem.h | 5 + 5 files changed, 394 insertions(+), 12 deletions(-) commit 6aa41144e7f1a624062f1e66a4744c168ade1f31 Author: Dan Williams Date: Mon Jun 6 13:32:01 2022 -0700 cxl/acpi: Add a host-bridge index lookup mechanism The ACPI CXL Fixed Memory Window Structure (CFMWS) defines multiple methods to determine which host bridge provides access to a given endpoint relative to that device's position in the interleave. The "Interleave Arithmetic" defines either a "standard modulo" / round-random algorithm, or "xormap" based algorithm which can be defined as a non-linear transform. Given that there are already more options beyond "standard modulo" and that "xormap" may turn out to be ACPI CXL specific, provide a callback for the region provisioning code to map endpoint positions back to expected host bridge id (cxl_dport target). For now just support the simple modulo math case and save the xormap for a follow-on change. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220624041950.559155-14-dan.j.williams@intel.com Signed-off-by: Dan Williams drivers/cxl/core/port.c | 16 ++++++++++++++++ drivers/cxl/cxl.h | 2 ++ 2 files changed, 18 insertions(+) commit b9686e8c8e39d4072081ef078c04915ee51c8af4 Author: Dan Williams Date: Sat Jun 4 15:49:53 2022 -0700 cxl/region: Enable the assignment of endpoint decoders to regions The region provisioning process involves allocating DPA to a set of endpoint decoders, and HPA plus the region geometry to a region device. Then the decoder is assigned to the region. At this point several validation steps can be performed to validate that the decoder is suitable to participate in the region. Co-developed-by: Ben Widawsky Signed-off-by: Ben Widawsky Reviewed-by: Jonathan Cameron Reported-by: kernel test robot Link: https://lore.kernel.org/r/165784336184.1758207.16403282029203949622.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams Documentation/ABI/testing/sysfs-bus-cxl | 19 +++ drivers/cxl/core/core.h | 6 + drivers/cxl/core/hdm.c | 15 +- drivers/cxl/core/port.c | 9 + drivers/cxl/core/region.c | 282 +++++++++++++++++++++++++++++++- drivers/cxl/cxl.h | 11 ++ 6 files changed, 340 insertions(+), 2 deletions(-) commit 23a22cd1c98be518774fe7f7e8a5203af050525a Author: Dan Williams Date: Mon Apr 25 11:43:44 2022 -0700 cxl/region: Allocate HPA capacity to regions After a region's interleave parameters (ways and granularity) are set, add a way for regions to allocate HPA (host physical address space) from the free capacity in their parent root-decoder. The allocator for this capacity reuses the 'struct resource' based allocator used for CONFIG_DEVICE_PRIVATE. Once the tuple of "ways, granularity, [uuid], and size" is set the region configuration transitions to the CXL_CONFIG_INTERLEAVE_ACTIVE state which is a precursor to allowing endpoint decoders to be added to a region. Co-developed-by: Ben Widawsky Signed-off-by: Ben Widawsky Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784335630.1758207.420216490941955417.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams Documentation/ABI/testing/sysfs-bus-cxl | 29 ++++++ drivers/cxl/Kconfig | 3 + drivers/cxl/core/region.c | 150 +++++++++++++++++++++++++++++++- drivers/cxl/cxl.h | 2 + 4 files changed, 183 insertions(+), 1 deletion(-) commit 80d10a6cee05029cae9d9d6e8ddb799ea6d01e0c Author: Ben Widawsky Date: Mon Apr 25 11:36:48 2022 -0700 cxl/region: Add interleave geometry attributes Add ABI to allow the number of devices that comprise a region to be set as well as the interleave granularity for the region. Signed-off-by: Ben Widawsky [djbw: reword changelog] Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220624041950.559155-11-dan.j.williams@intel.com Signed-off-by: Dan Williams Documentation/ABI/testing/sysfs-bus-cxl | 21 +++++ drivers/cxl/core/region.c | 134 ++++++++++++++++++++++++++++++++ drivers/cxl/cxl.h | 33 ++++++++ 3 files changed, 188 insertions(+) commit dd5ba0ebbdc414f4dda4dc4ec076f46fb6f26ffd Author: Ben Widawsky Date: Thu May 27 13:30:41 2021 -0700 cxl/region: Add a 'uuid' attribute The process of provisioning a region involves triggering the creation of a new region object, pouring in the configuration, and then binding that configured object to the region driver to start its operation. For persistent memory regions the CXL specification mandates that it identified by a uuid. Add an ABI for userspace to specify a region's uuid. Signed-off-by: Ben Widawsky [djbw: simplify locking] Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784334465.1758207.8224025435884752570.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams Documentation/ABI/testing/sysfs-bus-cxl | 10 +++ drivers/cxl/core/region.c | 118 ++++++++++++++++++++++++++++++++ drivers/cxl/cxl.h | 25 +++++++ 3 files changed, 153 insertions(+) commit 1548fac47a114b42063def551eb152a536ed9697 Author: Artem Bityutskiy Date: Sat Jul 16 09:26:55 2022 +0300 intel_idle: make SPR C1 and C1E be independent This patch partially reverts the changes made by the following commit: da0e58c038e6 intel_idle: add 'preferred_cstates' module argument As that commit describes, on early Sapphire Rapids Xeon platforms the C1 and C1E states were mutually exclusive, so that users could only have either C1 and C6, or C1E and C6. However, Intel firmware engineers managed to remove this limitation and make C1 and C1E to be completely independent, just like on previous Xeon platforms. Therefore, this patch: * Removes commentary describing the old, and now non-existing SPR C1E limitation. * Marks SPR C1E as available by default. * Removes the 'preferred_cstates' parameter handling for SPR. Both C1 and C1E will be available regardless of 'preferred_cstates' value. We expect that all SPR systems are shipping with new firmware, which includes the C1/C1E improvement. Cc: v5.18+ # v5.18+ Signed-off-by: Artem Bityutskiy Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) commit 3e5c04f97c87f5061a37edad11a7b37c3fee2466 Author: Zhao Liu Date: Fri Jul 22 10:50:24 2022 +0800 cpufreq: ondemand: Use cpumask_var_t for on-stack cpu mask A cpumask structure on the stack can cause a warning with CONFIG_NR_CPUS=8192 (e.g. Ubuntu 22.04 uses this): drivers/cpufreq/cpufreq_ondemand.c: In function 'od_set_powersave_bias': drivers/cpufreq/cpufreq_ondemand.c:449:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=] 449 | } | ^ CONFIG_CPUMASK_OFFSTACK=y is enabled by default for most distros, and hence we can work around the warning by using cpumask_var_t. Signed-off-by: Zhao Liu Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_ondemand.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 9d822ccf337299d08cf5121929013f3ac21932c9 Author: Randy Dunlap Date: Thu Jul 14 18:59:03 2022 -0700 cpufreq: loongson2: fix Kconfig "its" grammar Use the possessive "its" instead of the contraction "it's" where appropriate. Signed-off-by: Randy Dunlap Signed-off-by: Rafael J. Wysocki drivers/cpufreq/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b078d9db8793b1bd911e97be854e3c964235c78 Author: Christoph Hellwig Date: Thu Jul 7 07:33:31 2022 +0200 btrfs: don't call btrfs_page_set_checked in finish_compressed_bio_read This flag was used to communicate that the low-level compression code already did verify the checksum to the high-level I/O completion code. But it has been unused for a long time as the upper btrfs_bio for the decompressed data had a NULL csum pointer basically since that pointer existed and the code already checks for that a little later. Note that this does not affect the other use of the checked flag, which is only used for the COW fixup worker. Reviewed-by: Nikolay Borisov Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/compression.c | 24 ++---------------------- fs/btrfs/inode.c | 5 ----- 2 files changed, 2 insertions(+), 27 deletions(-) commit 81bd9328ab9f9bf818923b92a64896fd4cf58f2b Author: Christoph Hellwig Date: Thu Jul 7 07:33:30 2022 +0200 btrfs: fix repair of compressed extents Currently the checksum of compressed extents is verified based on the compressed data and the lower btrfs_bio, but the actual repair process is driven by end_bio_extent_readpage on the upper btrfs_bio for the decompressed data. This has a bunch of issues, including not being able to properly communicate the failed mirror up in case that the I/O submission got preempted, a general loss of if an error was an I/O error or a checksum verification failure, but most importantly that this design causes btrfs_clean_io_failure to eventually write back the uncompressed good data onto the disk sectors that are supposed to contain compressed data. Fix this by moving the repair to the lower btrfs_bio. To do so, a fair amount of code has to be reshuffled: a) the lower btrfs_bio now needs a valid csum pointer. The easiest way to achieve that is to pass NULL btrfs_lookup_bio_sums and just use the btrfs_bio management of csums. For a compressed_bio that is split into multiple btrfs_bios this means additional memory allocations, but the code becomes a lot more regular. b) checksum verification now runs directly on the lower btrfs_bio instead of the compressed_bio. This actually nicely simplifies the end I/O processing. c) btrfs_repair_one_sector can't just look up the logical address for the file offset any more, as there is no corresponding relative offsets that apply to the file offset and the logic address for compressed extents. Instead require that the saved bvec_iter in the btrfs_bio is filled out for all read bios and use that, which again removes a fair amount of code. Reviewed-by: Nikolay Borisov Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/compression.c | 171 +++++++++++++++++-------------------------------- fs/btrfs/compression.h | 7 -- fs/btrfs/ctree.h | 2 + fs/btrfs/extent_io.c | 45 +++---------- fs/btrfs/extent_io.h | 1 - fs/btrfs/inode.c | 7 ++ 6 files changed, 76 insertions(+), 157 deletions(-) commit 7959bd4411766899ad9c66235dab789a3e8dd7db Author: Christoph Hellwig Date: Thu Jul 7 07:33:29 2022 +0200 btrfs: remove the start argument to check_data_csum and export Derive the value of start from the btrfs_bio now that ->file_offset is always valid. Also export and rename the function so it's available outside of inode.c as we'll need that soon. Reviewed-by: Nikolay Borisov Reviewed-by: Boris Burkov Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 ++ fs/btrfs/inode.c | 26 +++++++++++--------------- 2 files changed, 13 insertions(+), 15 deletions(-) commit 7aa51232e2046cdd719a2f5c9a4537b84554d5a4 Author: Christoph Hellwig Date: Thu Jul 7 07:33:28 2022 +0200 btrfs: pass a btrfs_bio to btrfs_repair_one_sector Pass the btrfs_bio instead of the plain bio to btrfs_repair_one_sector, and remove the start and failed_mirror arguments in favor of deriving them from the btrfs_bio. For this to work ensure that the file_offset field is also initialized for buffered I/O. Reviewed-by: Nikolay Borisov Reviewed-by: Boris Burkov Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 48 ++++++++++++++++++++++++++---------------------- fs/btrfs/extent_io.h | 7 +++---- fs/btrfs/inode.c | 5 ++--- 3 files changed, 31 insertions(+), 29 deletions(-) commit 524bcd1e178da1dccf24d9fc60fb20a35ec45e88 Author: Christoph Hellwig Date: Thu Jul 7 07:33:27 2022 +0200 btrfs: simplify the pending I/O counting in struct compressed_bio Instead of counting the sectors just count the bios, with an extra reference held during submission. This significantly simplifies the submission side error handling. This slightly changes completion and error handling of btrfs_submit_compressed_{read,write} because with the old code the compressed_bio could have been completed in submit_compressed_{read,write} only if there was an error during submission for one of the lower bio, whilst with the new code there is a chance for this to happen even for successful submission if the all the lower bios complete before the end of the function is reached. Reviewed-by: Nikolay Borisov Reviewed-by: Boris Burkov Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/compression.c | 125 ++++++++++++------------------------------------- fs/btrfs/compression.h | 4 +- 2 files changed, 32 insertions(+), 97 deletions(-) commit bd1963d837a082e1083cd396803d3d263a9ef68b Author: Ryan Lee Date: Fri Jul 22 18:52:20 2022 -0700 ASoC: max98373: Removing 0x203E from the volatile reg The 0x203E speaker gain register should be non-volatile. This register value was not able to be synced because it was marked as volatile. Signed-off-by: Ryan Lee Link: https://lore.kernel.org/r/20220723015220.4169-1-ryans.lee@analog.com Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/codecs/max98373-i2c.c | 1 - 1 file changed, 1 deletion(-) commit 9fab4cc8c3450df15c9bcaedd0d3c954211a7a54 Merge: fa28981b3512 ec65e0e9acf7 Author: Kalle Valo Date: Mon Jul 25 19:50:38 2022 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.20. One fix and rest minor cleanup. commit 293402e564a7391f38541c7694e736f5fde20aea Author: Pavel Begunkov Date: Mon Jul 25 10:52:06 2022 +0100 io_uring/net: use unsigned for flags Use unsigned int type for msg flags. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/5cfaed13d3191337b14b8664ca68b515d9e2d1b4.1658742118.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6a9ce66f4d0872861e0bbc67eee6ce5dca5dd886 Author: Pavel Begunkov Date: Mon Jul 25 10:52:05 2022 +0100 io_uring/net: make page accounting more consistent Make network page accounting more consistent with how buffer registration is working, i.e. account all memory to ctx->user. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4aacfe64bbb81b27f9ecf5d5c219c69a07e5aa56.1658742118.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 2 +- io_uring/notif.c | 9 ++++----- io_uring/notif.h | 19 +++++++++++++++++++ io_uring/rsrc.c | 12 ++++-------- io_uring/rsrc.h | 9 +++++++++ 5 files changed, 37 insertions(+), 14 deletions(-) commit 2e32ba5607ee2b668baa8831dd74f7cc867a1f7e Author: Pavel Begunkov Date: Mon Jul 25 10:52:04 2022 +0100 io_uring/net: checks errors of zc mem accounting mm_account_pinned_pages() may fail, don't ignore the return value. Fixes: e29e3bd4b968 ("io_uring: account locked pages for non-fixed zc") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/dae0542ed8e6706071bb83ad3e7ad6a70d207fd9.1658742118.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cb309ae49da7a7c28f0051deea13970291134fac Author: Pavel Begunkov Date: Mon Jul 25 10:52:03 2022 +0100 io_uring/net: improve io_get_notif_slot types Don't use signed int for slot indexing. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e4d15aefebb5e55729dd9b5ec01ab16b70033343.1658742118.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/notif.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf24ecc85a6329a8f3c3c5e8fd4834f08348b86f Author: wangjianli Date: Sun Jul 24 15:34:18 2022 +0800 drivers/remoteproc: fix repeated words in comments Delete the redundant word 'in'. Signed-off-by: wangjianli Link: https://lore.kernel.org/r/20220724073418.15793-1-wangjianli@cdjrlc.com Signed-off-by: Mathieu Poirier drivers/remoteproc/remoteproc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c144c63fd33a1fc0e43e0b851a35b09c9460d94d Author: Christoph Hellwig Date: Thu Jul 7 07:33:26 2022 +0200 btrfs: repair all known bad mirrors When there is more than a single level of redundancy there can also be multiple bad mirrors, and the current read repair code only repairs the last bad one. Restructure btrfs_repair_one_sector so that it records the originally failed mirror and the number of copies, and then repair all known bad copies until we reach the originally failed copy in clean_io_failure. Note that this also means the read repair reads will always start from the next bad mirror and not mirror 0. This fixes btrfs/265 in xfstests. Reviewed-by: Nikolay Borisov Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 126 ++++++++++++++++++++++++--------------------------- fs/btrfs/extent_io.h | 1 + 2 files changed, 61 insertions(+), 66 deletions(-) commit d28beb3e8131b3cb322052410d8ad20c4a841c83 Author: Christoph Hellwig Date: Mon Jul 18 13:37:23 2022 +0200 btrfs: merge btrfs_dev_stat_print_on_error with its only caller Fold it into the only caller. Reviewed-by: Nikolay Borisov Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 5 ----- 1 file changed, 5 deletions(-) commit 723df2bcc9e166ac7fb82b3932a53e09415dfcde Author: Filipe Manana Date: Sun Jul 17 22:05:05 2022 +0100 btrfs: join running log transaction when logging new name When logging a new name, in case of a rename, we pin the log before changing it. We then either delete a directory entry from the log or insert a key range item to mark the old name for deletion on log replay. However when doing one of those log changes we may have another task that started writing out the log (at btrfs_sync_log()) and it started before we pinned the log root. So we may end up changing a log tree while its writeback is being started by another task syncing the log. This can lead to inconsistencies in a log tree and other unexpected results during log replay, because we can get some committed node pointing to a node/leaf that ends up not getting written to disk before the next log commit. The problem, conceptually, started to happen in commit 88d2beec7e53fc ("btrfs: avoid logging all directory changes during renames"), because there we started to update the log without joining its current transaction first. However the problem only became visible with commit 259c4b96d78dda ("btrfs: stop doing unnecessary log updates during a rename"), and that is because we used to pin the log at btrfs_rename() and then before entering btrfs_log_new_name(), when unlinking the old dentry, we ended up at btrfs_del_inode_ref_in_log() and btrfs_del_dir_entries_in_log(). Both of them join the current log transaction, effectively waiting for any log transaction writeout (due to acquiring the root's log_mutex). This made it safe even after leaving the current log transaction, because we remained with the log pinned when we called btrfs_log_new_name(). Then in commit 259c4b96d78dda ("btrfs: stop doing unnecessary log updates during a rename"), we removed the log pinning from btrfs_rename() and stopped calling btrfs_del_inode_ref_in_log() and btrfs_del_dir_entries_in_log() during the rename, and started to do all the needed work at btrfs_log_new_name(), but without joining the current log transaction, only pinning the log, which is racy because another task may have started writeout of the log tree right before we pinned the log. Both commits landed in kernel 5.18, so it doesn't make any practical difference which should be blamed, but I'm blaming the second commit only because with the first one, by chance, the problem did not happen due to the fact we joined the log transaction after pinning the log and unpinned it only after calling btrfs_log_new_name(). So make btrfs_log_new_name() join the current log transaction instead of pinning it, so that we never do log updates if it's writeout is starting. Fixes: 259c4b96d78dda ("btrfs: stop doing unnecessary log updates during a rename") CC: stable@vger.kernel.org # 5.18+ Reported-by: Zygo Blaxell Tested-by: Zygo Blaxell Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/tree-log.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit fc8b235fdc090a000e164b49c3384802ea44c636 Author: Nikolay Borisov Date: Thu Jul 14 13:48:10 2022 +0300 btrfs: simplify error handling in btrfs_lookup_dentry In btrfs_lookup_dentry releasing the reference of the sub_root and the running orphan cleanup should only happen if the dentry found actually represents a subvolume. This can only be true in the 'else' branch as otherwise either fixup_tree_root_location returned an ENOENT error, in which case sub_root wouldn't have been changed or if we got a different errno this means btrfs_get_fs_root couldn't have executed successfully again meaning sub_root will equal to root. So simplify all the branches by moving the code into the 'else'. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0d8869fb6b6f82d5647ddaa6652e159d0f81d008 Author: Filipe Manana Date: Tue Jul 12 16:31:22 2022 +0100 btrfs: send: always use the rbtree based inode ref management infrastructure After the patch "btrfs: send: fix sending link commands for existing file paths", we now have two infrastructures to detect and eliminate duplicated inode references (due to names that got removed and re-added between the send and parent snapshots): 1) One that works on a single inode ref/extref item; 2) A new one that works acrosss all ref/extref items for an inode, and it's also more efficient because even in the single ref/extref item case, it does not do a linear search for all the names encoded in the ref/extref item, it uses red black trees to speedup up the search. There's no good reason to keep both infrastructures, we can use the new one everywhere, and it's always more efficient. So remove the old infrastructure and change all sites that are using it to use the new one. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/send.c | 193 ++++---------------------------------------------------- 1 file changed, 12 insertions(+), 181 deletions(-) commit 3aa5bd367fa5a381796850ef74c2bd855b017635 Author: BingJing Chang Date: Tue Jul 12 09:36:32 2022 +0800 btrfs: send: fix sending link commands for existing file paths There is a bug sending link commands for existing file paths. When we're processing an inode, we go over all references. All the new file paths are added to the "new_refs" list. And all the deleted file paths are added to the "deleted_refs" list. In the end, when we finish processing the inode, we iterate over all the items in the "new_refs" list and send link commands for those file paths. After that, we go over all the items in the "deleted_refs" list and send unlink commands for them. If there are duplicated file paths in both lists, we will try to create them before we remove them. Then the receiver gets an -EEXIST error when trying the link operations. Example for having duplicated file paths in both list: $ btrfs subvolume create vol # create a file and 2000 hard links to the same inode $ touch vol/foo $ for i in {1..2000}; do link vol/foo vol/$i ; done # take a snapshot for a parent snapshot $ btrfs subvolume snapshot -r vol snap1 # remove 2000 hard links and re-create the last 1000 links $ for i in {1..2000}; do rm vol/$i; done; $ for i in {1001..2000}; do link vol/foo vol/$i; done # take another one for a send snapshot $ btrfs subvolume snapshot -r vol snap2 $ mkdir receive_dir $ btrfs send snap2 -p snap1 | btrfs receive receive_dir/ At subvol snap2 link 1238 -> foo ERROR: link 1238 -> foo failed: File exists In this case, we will have the same file paths added to both lists. In the parent snapshot, reference paths {1..1237} are stored in inode references, but reference paths {1238..2000} are stored in inode extended references. In the send snapshot, all reference paths {1001..2000} are stored in inode references. During the incremental send, we process their inode references first. In record_changed_ref(), we iterate all its inode references in the send/parent snapshot. For every inode reference, we also use find_iref() to check whether the same file path also appears in the parent/send snapshot or not. Inode references {1238..2000} which appear in the send snapshot but not in the parent snapshot are added to the "new_refs" list. On the other hand, Inode references {1..1000} which appear in the parent snapshot but not in the send snapshot are added to the "deleted_refs" list. Next, when we process their inode extended references, reference paths {1238..2000} are added to the "deleted_refs" list because all of them only appear in the parent snapshot. Now two lists contain items as below: "new_refs" list: {1238..2000} "deleted_refs" list: {1..1000}, {1238..2000} Reference paths {1238..2000} appear in both lists. And as the processing order mentioned about before, the receiver gets an -EEXIST error when trying the link operations. To fix the bug, the idea is to process the "deleted_refs" list before the "new_refs" list. However, it's not easy to reshuffle the processing order. For one reason, if we do so, we may unlink all the existing paths first, there's no valid path anymore for links. And it's inefficient because we do a bunch of unlinks followed by links for the same paths. Moreover, it makes less sense to have duplications in both lists. A reference path cannot not only be regarded as new but also has been seen in the past, or we won't call it a new path. However, it's also not a good idea to make find_iref() check a reference against all inode references and all inode extended references because it may result in large disk reads. So we introduce two rbtrees to make the references easier for lookups. And we also introduce record_new_ref_if_needed() and record_deleted_ref_if_needed() for changed_ref() to check and remove duplicated references early. Reviewed-by: Robbie Ko Reviewed-by: Filipe Manana Signed-off-by: BingJing Chang Signed-off-by: David Sterba fs/btrfs/send.c | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 152 insertions(+), 4 deletions(-) commit 71ecfc133b035a18cbe4f0ddb55345a85cb16537 Author: BingJing Chang Date: Tue Jul 12 09:36:31 2022 +0800 btrfs: send: introduce recorded_ref_alloc and recorded_ref_free Introduce wrappers to allocate and free recorded_ref structures. Reviewed-by: Robbie Ko Reviewed-by: Filipe Manana Signed-off-by: BingJing Chang Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/send.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit 2ce543f478433a0eec0f72090d7e814f1d53d456 Author: Naohiro Aota Date: Sat Jul 9 08:18:50 2022 +0900 btrfs: zoned: wait until zone is finished when allocation didn't progress When the allocated position doesn't progress, we cannot submit IOs to finish a block group, but there should be ongoing IOs that will finish a block group. So, in that case, we wait for a zone to be finished and retry the allocation after that. Introduce a new flag BTRFS_FS_NEED_ZONE_FINISH for fs_info->flags to indicate we need a zone finish to have proceeded. The flag is set when the allocator detected it cannot activate a new block group. And, it is cleared once a zone is finished. CC: stable@vger.kernel.org # 5.16+ Fixes: afba2bc036b0 ("btrfs: zoned: implement active zone tracking") Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/ctree.h | 5 +++++ fs/btrfs/disk-io.c | 1 + fs/btrfs/inode.c | 9 +++++++-- fs/btrfs/zoned.c | 6 ++++++ 4 files changed, 19 insertions(+), 2 deletions(-) commit 898793d992c23dac6126a6a94ad893eae1a2c9df Author: Naohiro Aota Date: Sat Jul 9 08:18:49 2022 +0900 btrfs: zoned: write out partially allocated region cow_file_range() works in an all-or-nothing way: if it fails to allocate an extent for a part of the given region, it gives up all the region including the successfully allocated parts. On cow_file_range(), run_delalloc_zoned() writes data for the region only when it successfully allocate all the region. This all-or-nothing allocation and write-out are problematic when available space in all the block groups are get tight with the active zone restriction. btrfs_reserve_extent() try hard to utilize the left space in the active block groups and gives up finally and fails with -ENOSPC. However, if we send IOs for the successfully allocated region, we can finish a zone and can continue on the rest of the allocation on a newly allocated block group. This patch implements the partial write-out for run_delalloc_zoned(). With this patch applied, cow_file_range() returns -EAGAIN to tell the caller to do something to progress the further allocation, and tells the successfully allocated region with done_offset. Furthermore, the zoned extent allocator returns -EAGAIN to tell cow_file_range() going back to the caller side. Actually, we still need to wait for an IO to complete to continue the allocation. The next patch implements that part. CC: stable@vger.kernel.org # 5.16+ Fixes: afba2bc036b0 ("btrfs: zoned: implement active zone tracking") Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 10 ++++++++ fs/btrfs/inode.c | 63 +++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 59 insertions(+), 14 deletions(-) commit b6a98021e4019c562a23ad151a7e40adfa9f91e5 Author: Naohiro Aota Date: Sat Jul 9 08:18:48 2022 +0900 btrfs: zoned: activate necessary block group There are two places where allocating a chunk is not enough. These two places are trying to ensure the space by allocating a chunk. To meet the condition for active_total_bytes, we also need to activate a block group there. CC: stable@vger.kernel.org # 5.16+ Fixes: afba2bc036b0 ("btrfs: zoned: implement active zone tracking") Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/block-group.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit b0931513913633044ed6e3800334c28433c007b0 Author: Naohiro Aota Date: Sat Jul 9 08:18:47 2022 +0900 btrfs: zoned: activate metadata block group on flush_space For metadata space on zoned filesystem, reaching ALLOC_CHUNK{,_FORCE} means we don't have enough space left in the active_total_bytes. Before allocating a new chunk, we can try to activate an existing block group in this case. Also, allocating a chunk is not enough to grant a ticket for metadata space on zoned filesystem we need to activate the block group to increase the active_total_bytes. btrfs_zoned_activate_one_bg() implements the activation feature. It will activate a block group by (maybe) finishing a block group. It will give up activating a block group if it cannot finish any block group. CC: stable@vger.kernel.org # 5.16+ Fixes: afba2bc036b0 ("btrfs: zoned: implement active zone tracking") Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/space-info.c | 30 +++++++++++++++++++++++++++++ fs/btrfs/zoned.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/zoned.h | 10 ++++++++++ 3 files changed, 93 insertions(+) commit 79417d040f4f77b19c701bccc23013b9cdac358d Author: Naohiro Aota Date: Sat Jul 9 08:18:46 2022 +0900 btrfs: zoned: disable metadata overcommit for zoned The metadata overcommit makes the space reservation flexible but it is also harmful to active zone tracking. Since we cannot finish a block group from the metadata allocation context, we might not activate a new block group and might not be able to actually write out the overcommit reservations. So, disable metadata overcommit for zoned filesystems. We will ensure the reservations are under active_total_bytes in the following patches. CC: stable@vger.kernel.org # 5.16+ Fixes: afba2bc036b0 ("btrfs: zoned: implement active zone tracking") Signed-off-by: Naohiro Aota Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/space-info.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6a921de589926a350634e6e279f43fa5b9dbf5ba Author: Naohiro Aota Date: Sat Jul 9 08:18:45 2022 +0900 btrfs: zoned: introduce space_info->active_total_bytes The active_total_bytes, like the total_bytes, accounts for the total bytes of active block groups in the space_info. With an introduction of active_total_bytes, we can check if the reserved bytes can be written to the block groups without activating a new block group. The check is necessary for metadata allocation on zoned filesystem. We cannot finish a block group, which may require waiting for the current transaction, from the metadata allocation context. Instead, we need to ensure the ongoing allocation (reserved bytes) fits in active block groups. Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/block-group.c | 12 +++++++++--- fs/btrfs/space-info.c | 41 ++++++++++++++++++++++++++++++++--------- fs/btrfs/space-info.h | 4 +++- fs/btrfs/zoned.c | 6 ++++++ 4 files changed, 50 insertions(+), 13 deletions(-) commit 393f646e34c18b85d0f41272bfcbd475ae3a0d34 Author: Naohiro Aota Date: Sat Jul 9 08:18:44 2022 +0900 btrfs: zoned: finish least available block group on data bg allocation When we run out of active zones and no sufficient space is left in any block groups, we need to finish one block group to make room to activate a new block group. However, we cannot do this for metadata block groups because we can cause a deadlock by waiting for a running transaction commit. So, do that only for a data block group. Furthermore, the block group to be finished has two requirements. First, the block group must not have reserved bytes left. Having reserved bytes means we have an allocated region but did not yet send bios for it. If that region is allocated by the thread calling btrfs_zone_finish(), it results in a deadlock. Second, the block group to be finished must not be a SYSTEM block group. Finishing a SYSTEM block group easily breaks further chunk allocation by nullifying the SYSTEM free space. In a certain case, we cannot find any zone finish candidate or btrfs_zone_finish() may fail. In that case, we fall back to split the allocation bytes and fill the last spaces left in the block groups. CC: stable@vger.kernel.org # 5.16+ Fixes: afba2bc036b0 ("btrfs: zoned: implement active zone tracking") Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 50 ++++++++++++++++++++++++++++++++++++++++---------- fs/btrfs/zoned.c | 40 ++++++++++++++++++++++++++++++++++++++++ fs/btrfs/zoned.h | 7 +++++++ 3 files changed, 87 insertions(+), 10 deletions(-) commit bb9950d3df7169a673c594d38fb74e241ed4fb2a Author: Naohiro Aota Date: Sat Jul 9 08:18:43 2022 +0900 btrfs: let can_allocate_chunk return error For the later patch, convert the return type from bool to int and return errors. No functional changes. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit d760156601af233f9223c23588e9c65950539ded Author: Naohiro Aota Date: Sat Jul 9 08:18:42 2022 +0900 btrfs: use fs_info->max_extent_size in get_extent_max_capacity() Use fs_info->max_extent_size also in get_extent_max_capacity() for the completeness. This is only used for defrag and not really necessary to fix the metadata reservation size. But, it still suppresses unnecessary defrag operations. Signed-off-by: Naohiro Aota Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/ioctl.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 7d7672bc5d1038c745716c397d892d21e29de71c Author: Naohiro Aota Date: Sat Jul 9 08:18:41 2022 +0900 btrfs: convert count_max_extents() to use fs_info->max_extent_size If count_max_extents() uses BTRFS_MAX_EXTENT_SIZE to calculate the number of extents needed, btrfs release the metadata reservation too much on its way to write out the data. Now that BTRFS_MAX_EXTENT_SIZE is replaced with fs_info->max_extent_size, convert count_max_extents() to use it instead, and fix the calculation of the metadata reservation. CC: stable@vger.kernel.org # 5.12+ Fixes: d8e3fb106f39 ("btrfs: zoned: use ZONE_APPEND write for zoned mode") Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/ctree.h | 21 +++++++++++++-------- fs/btrfs/delalloc-space.c | 6 +++--- fs/btrfs/inode.c | 16 ++++++++-------- 3 files changed, 24 insertions(+), 19 deletions(-) commit f7b12a62f008a3041f42f2426983e59a6a0a3c59 Author: Naohiro Aota Date: Sat Jul 9 08:18:40 2022 +0900 btrfs: replace BTRFS_MAX_EXTENT_SIZE with fs_info->max_extent_size On zoned filesystem, data write out is limited by max_zone_append_size, and a large ordered extent is split according the size of a bio. OTOH, the number of extents to be written is calculated using BTRFS_MAX_EXTENT_SIZE, and that estimated number is used to reserve the metadata bytes to update and/or create the metadata items. The metadata reservation is done at e.g, btrfs_buffered_write() and then released according to the estimation changes. Thus, if the number of extent increases massively, the reserved metadata can run out. The increase of the number of extents easily occurs on zoned filesystem if BTRFS_MAX_EXTENT_SIZE > max_zone_append_size. And, it causes the following warning on a small RAM environment with disabling metadata over-commit (in the following patch). [75721.498492] ------------[ cut here ]------------ [75721.505624] BTRFS: block rsv 1 returned -28 [75721.512230] WARNING: CPU: 24 PID: 2327559 at fs/btrfs/block-rsv.c:537 btrfs_use_block_rsv+0x560/0x760 [btrfs] [75721.581854] CPU: 24 PID: 2327559 Comm: kworker/u64:10 Kdump: loaded Tainted: G W 5.18.0-rc2-BTRFS-ZNS+ #109 [75721.597200] Hardware name: Supermicro Super Server/H12SSL-NT, BIOS 2.0 02/22/2021 [75721.607310] Workqueue: btrfs-endio-write btrfs_work_helper [btrfs] [75721.616209] RIP: 0010:btrfs_use_block_rsv+0x560/0x760 [btrfs] [75721.646649] RSP: 0018:ffffc9000fbdf3e0 EFLAGS: 00010286 [75721.654126] RAX: 0000000000000000 RBX: 0000000000004000 RCX: 0000000000000000 [75721.663524] RDX: 0000000000000004 RSI: 0000000000000008 RDI: fffff52001f7be6e [75721.672921] RBP: ffffc9000fbdf420 R08: 0000000000000001 R09: ffff889f8d1fc6c7 [75721.682493] R10: ffffed13f1a3f8d8 R11: 0000000000000001 R12: ffff88980a3c0e28 [75721.692284] R13: ffff889b66590000 R14: ffff88980a3c0e40 R15: ffff88980a3c0e8a [75721.701878] FS: 0000000000000000(0000) GS:ffff889f8d000000(0000) knlGS:0000000000000000 [75721.712601] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [75721.720726] CR2: 000055d12e05c018 CR3: 0000800193594000 CR4: 0000000000350ee0 [75721.730499] Call Trace: [75721.735166] [75721.739886] btrfs_alloc_tree_block+0x1e1/0x1100 [btrfs] [75721.747545] ? btrfs_alloc_logged_file_extent+0x550/0x550 [btrfs] [75721.756145] ? btrfs_get_32+0xea/0x2d0 [btrfs] [75721.762852] ? btrfs_get_32+0xea/0x2d0 [btrfs] [75721.769520] ? push_leaf_left+0x420/0x620 [btrfs] [75721.776431] ? memcpy+0x4e/0x60 [75721.781931] split_leaf+0x433/0x12d0 [btrfs] [75721.788392] ? btrfs_get_token_32+0x580/0x580 [btrfs] [75721.795636] ? push_for_double_split.isra.0+0x420/0x420 [btrfs] [75721.803759] ? leaf_space_used+0x15d/0x1a0 [btrfs] [75721.811156] btrfs_search_slot+0x1bc3/0x2790 [btrfs] [75721.818300] ? lock_downgrade+0x7c0/0x7c0 [75721.824411] ? free_extent_buffer.part.0+0x107/0x200 [btrfs] [75721.832456] ? split_leaf+0x12d0/0x12d0 [btrfs] [75721.839149] ? free_extent_buffer.part.0+0x14f/0x200 [btrfs] [75721.846945] ? free_extent_buffer+0x13/0x20 [btrfs] [75721.853960] ? btrfs_release_path+0x4b/0x190 [btrfs] [75721.861429] btrfs_csum_file_blocks+0x85c/0x1500 [btrfs] [75721.869313] ? rcu_read_lock_sched_held+0x16/0x80 [75721.876085] ? lock_release+0x552/0xf80 [75721.881957] ? btrfs_del_csums+0x8c0/0x8c0 [btrfs] [75721.888886] ? __kasan_check_write+0x14/0x20 [75721.895152] ? do_raw_read_unlock+0x44/0x80 [75721.901323] ? _raw_write_lock_irq+0x60/0x80 [75721.907983] ? btrfs_global_root+0xb9/0xe0 [btrfs] [75721.915166] ? btrfs_csum_root+0x12b/0x180 [btrfs] [75721.921918] ? btrfs_get_global_root+0x820/0x820 [btrfs] [75721.929166] ? _raw_write_unlock+0x23/0x40 [75721.935116] ? unpin_extent_cache+0x1e3/0x390 [btrfs] [75721.942041] btrfs_finish_ordered_io.isra.0+0xa0c/0x1dc0 [btrfs] [75721.949906] ? try_to_wake_up+0x30/0x14a0 [75721.955700] ? btrfs_unlink_subvol+0xda0/0xda0 [btrfs] [75721.962661] ? rcu_read_lock_sched_held+0x16/0x80 [75721.969111] ? lock_acquire+0x41b/0x4c0 [75721.974982] finish_ordered_fn+0x15/0x20 [btrfs] [75721.981639] btrfs_work_helper+0x1af/0xa80 [btrfs] [75721.988184] ? _raw_spin_unlock_irq+0x28/0x50 [75721.994643] process_one_work+0x815/0x1460 [75722.000444] ? pwq_dec_nr_in_flight+0x250/0x250 [75722.006643] ? do_raw_spin_trylock+0xbb/0x190 [75722.013086] worker_thread+0x59a/0xeb0 [75722.018511] kthread+0x2ac/0x360 [75722.023428] ? process_one_work+0x1460/0x1460 [75722.029431] ? kthread_complete_and_exit+0x30/0x30 [75722.036044] ret_from_fork+0x22/0x30 [75722.041255] [75722.045047] irq event stamp: 0 [75722.049703] hardirqs last enabled at (0): [<0000000000000000>] 0x0 [75722.057610] hardirqs last disabled at (0): [] copy_process+0x1c1a/0x66b0 [75722.067533] softirqs last enabled at (0): [] copy_process+0x1c59/0x66b0 [75722.077423] softirqs last disabled at (0): [<0000000000000000>] 0x0 [75722.085335] ---[ end trace 0000000000000000 ]--- To fix the estimation, we need to introduce fs_info->max_extent_size to replace BTRFS_MAX_EXTENT_SIZE, which allow setting the different size for regular vs zoned filesystem. Set fs_info->max_extent_size to BTRFS_MAX_EXTENT_SIZE by default. On zoned filesystem, it is set to fs_info->max_zone_append_size. CC: stable@vger.kernel.org # 5.12+ Fixes: d8e3fb106f39 ("btrfs: zoned: use ZONE_APPEND write for zoned mode") Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/ctree.h | 6 ++++++ fs/btrfs/disk-io.c | 2 ++ fs/btrfs/extent_io.c | 4 +++- fs/btrfs/inode.c | 6 ++++-- fs/btrfs/zoned.c | 5 ++++- 5 files changed, 19 insertions(+), 4 deletions(-) commit c2ae7b772ef4e86c5ddf3fd47bf59045ae96a414 Author: Naohiro Aota Date: Sat Jul 9 08:18:39 2022 +0900 btrfs: zoned: revive max_zone_append_bytes This patch is basically a revert of commit 5a80d1c6a270 ("btrfs: zoned: remove max_zone_append_size logic"), but without unnecessary ASSERT and check. The max_zone_append_size will be used as a hint to estimate the number of extents to cover delalloc/writeback region in the later commits. The size of a ZONE APPEND bio is also limited by queue_max_segments(), so this commit considers it to calculate max_zone_append_size. Technically, a bio can be larger than queue_max_segments() * PAGE_SIZE if the pages are contiguous. But, it is safe to consider "queue_max_segments() * PAGE_SIZE" as an upper limit of an extent size to calculate the number of extents needed to write data. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 ++ fs/btrfs/zoned.c | 17 +++++++++++++++++ fs/btrfs/zoned.h | 1 + 3 files changed, 20 insertions(+) commit 65ea1b66482f415d51cd46515b02477257330339 Author: Naohiro Aota Date: Sat Jul 9 08:18:38 2022 +0900 block: add bdev_max_segments() helper Add bdev_max_segments() like other queue parameters. Reviewed-by: Johannes Thumshirn Reviewed-by: Jens Axboe Reviewed-by: Christoph Hellwig Signed-off-by: Naohiro Aota Signed-off-by: David Sterba include/linux/blkdev.h | 5 +++++ 1 file changed, 5 insertions(+) commit cf2404a976268f2b1b3448724c43060acb224034 Author: Filipe Manana Date: Mon Jul 11 15:22:50 2022 +0100 btrfs: add optimized btrfs_ino() version for 64 bits systems Currently btrfs_ino() tries to use first the objectid of the inode's location key. This is to avoid truncation of the inode number on 32 bits platforms because the i_ino field of struct inode has the unsigned long type, while the objectid is a 64 bits unsigned type (u64) on every system. This logic was added in commit 33345d01522f81 ("Btrfs: Always use 64bit inode number"). However if we are running on a 64 bits system, we can always directly return the i_ino value from struct inode, which eliminates the need for he special if statement that tests for a location key type of BTRFS_ROOT_ITEM_KEY - in which case i_ino may not have the same value as the objectid in the inode's location objectid, it may have a value of BTRFS_EMPTY_SUBVOL_DIR_OBJECTID, for the case of snapshots of trees with subvolumes/snapshots inside them. So add a special version for 64 bits system that directly returns i_ino of struct inode. This eliminates one branch and reduces the overall code size, since btrfs_ino() is an inline function that is extensively used. Before: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1617487 189240 29032 1835759 1c02ef fs/btrfs/btrfs.ko After: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1612028 189180 29032 1830240 1bed60 fs/btrfs/btrfs.ko Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 15 +++++++++++++++ fs/btrfs/tests/btrfs-tests.c | 1 + 2 files changed, 16 insertions(+) commit adac558416d24be3280d1243be1c8012deacbf49 Author: Filipe Manana Date: Mon Jul 11 15:22:49 2022 +0100 btrfs: set the objectid of the btree inode's location key We currently don't use the location key of the btree inode, its content is set to zeroes, as it's a special inode that is not persisted (it has no inode item stored in any btree). At btrfs_ino(), an inline function used extensively in btrfs, we have this special check if the given inode's location objectid is 0, and if it is, we return the value stored in the VFS' inode i_ino field instead (which is BTRFS_BTREE_INODE_OBJECTID for the btree inode). To reduce the code at btrfs_ino(), we can simply set the objectid of the btree inode to the value BTRFS_BTREE_INODE_OBJECTID. This eliminates the need to check for the special case of the objectid being zero, with the side effect of reducing the overall code size and having less code to execute, as btrfs_ino() is an inline function. Before: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1620502 189240 29032 1838774 1c0eb6 fs/btrfs/btrfs.ko After: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1617487 189240 29032 1835759 1c02ef fs/btrfs/btrfs.ko Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 7 ++----- fs/btrfs/disk-io.c | 4 +++- 2 files changed, 5 insertions(+), 6 deletions(-) commit 4cb2e5e8fe47e3f31e00d8bf0e6e4acff26f520f Author: Fabio M. De Francesco Date: Mon Jun 27 19:48:49 2022 +0200 btrfs: replace kmap_atomic() with kmap_local_page() kmap_atomic() is being deprecated in favor of kmap_local_page() where it is feasible. With kmap_local_page() mappings are per thread, CPU local, and not globally visible. The last use of kmap_atomic is in inode.c where the context is atomic [1] and can be safely replaced by kmap_local_page. Tested with xfstests on a QEMU + KVM 32-bits VM with 4GB RAM and booting a kernel with HIGHMEM64GB enabled. [1] https://lore.kernel.org/linux-btrfs/20220601132545.GM20633@twin.jikos.cz/ Suggested-by: Ira Weiny Reviewed-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5a6e6e7ce6b7df615a971f30bf4215b2dc389612 Author: Fabio M. De Francesco Date: Sat Jun 18 11:19:01 2022 +0200 btrfs: zlib: replace kmap() with kmap_local_page() in zlib_decompress_bio() The use of kmap() is being deprecated in favor of kmap_local_page(). With kmap_local_page(), the mapping is per thread, CPU local and not globally visible. Therefore, use kmap_local_page() / kunmap_local() in zlib_decompress_bio() because in this function the mappings are per thread and are not visible in other contexts. Tested with xfstests on QEMU + KVM 32-bits VM with 4GB of RAM and HIGHMEM64G enabled. This patch passes 26/26 tests of group "compress". Suggested-by: Ira Weiny Reviewed-by: Ira Weiny Reviewed-by: Qu Wenruo Signed-off-by: Fabio M. De Francesco Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/zlib.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 718e58551aecf7a63aa643ec0668a0374eee9de0 Author: Fabio M. De Francesco Date: Mon Jun 27 18:33:05 2022 +0200 btrfs: zlib: replace kmap() with kmap_local_page() in zlib_compress_pages() The use of kmap() is being deprecated in favor of kmap_local_page(). With kmap_local_page(), the mapping is per thread, CPU local and not globally visible. Therefore, use kmap_local_page() / kunmap_local() in zlib_compress_pages() because in this function the mappings are per thread and are not visible in other contexts. Furthermore, drop the mappings of "out_page" which is allocated within zlib_compress_pages() with alloc_page(GFP_NOFS) and use page_address(). Tested with xfstests on a QEMU + KVM 32-bits VM with 4GB of RAM booting a kernel with HIGHMEM64G enabled. This patch passes 26/26 tests of group "compress". CC: Qu Wenruo Suggested-by: Ira Weiny Reviewed-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/zlib.c | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) commit ebd23482efa3d077a9461af29a093bdce3d3a2b8 Author: Fabio M. De Francesco Date: Wed Jul 6 13:15:20 2022 +0200 btrfs: zstd: replace kmap() with kmap_local_page() The use of kmap() is being deprecated in favor of kmap_local_page(). With kmap_local_page(), the mapping is per thread, CPU local and not globally visible. Therefore, use kmap_local_page() / kunmap_local() in zstd.c because in this file the mappings are per thread and are not visible in other contexts. In the meanwhile use plain page_address() on output pages allocated with the GFP_NOFS flag instead of calling kmap*() on them (since they are always allocated from ZONE_NORMAL). Tested with xfstests on QEMU + KVM 32 bits VM with 4GB of RAM, booting a kernel with HIGHMEM64G enabled. Suggested-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/zstd.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) commit 39ade048a32ea653b94dcfbf816b0b13a6be8a33 Author: Fabio M. De Francesco Date: Wed Jul 6 13:15:19 2022 +0200 highmem: Make __kunmap_{local,atomic}() take const void pointer __kunmap_ {local,atomic}() currently take pointers to void. However, this is semantically incorrect, since these functions do not change the memory their arguments point to. Therefore, make this semantics explicit by modifying the __kunmap_{local,atomic}() prototypes to take pointers to const void. As a side effect, compilers may produce more efficient code. Acked-by: Andrew Morton Acked-by: Helge Deller # parisc Suggested-by: David Sterba Suggested-by: Ira Weiny Reviewed-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Reviewed-by: David Sterba Signed-off-by: David Sterba arch/parisc/include/asm/cacheflush.h | 6 +++--- arch/parisc/kernel/cache.c | 2 +- include/linux/highmem-internal.h | 10 +++++----- mm/highmem.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) commit ac5e666951507ceb1da2ed85c4f5c7bb88bec06e Author: Filipe Manana Date: Mon Jul 4 12:42:04 2022 +0100 btrfs: don't fallback to buffered IO for NOWAIT direct IO writes Currently, for a direct IO write, if we need to fallback to buffered IO, either to satisfy the whole write operation or just a part of it, we do it in the current context even if it's a NOWAIT context. This is not ideal because we currently don't have support for NOWAIT semantics in the buffered IO path (we can block for several reasons), so we should instead return -EAGAIN to the caller, so that it knows it should retry (the whole operation or what's left of it) in a context where blocking is acceptable. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/file.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 8bfc9b2cf468c37870b980a16c345c9ba3a2010a Author: David Sterba Date: Thu Jun 23 17:15:37 2022 +0200 btrfs: use enum for btrfs_block_rsv::type The number of block group reserve types BTRFS_BLOCK_RSV_* is small and fits to u8 and there's enough left in case we want to add more. For type safety use the enum but make it 8 bits in the structure to save space. The structure size is now 48 on release build, making a slight improvement in structures where it's embedded, like btrfs_fs_info or btrfs_inode. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/block-rsv.c | 6 +++--- fs/btrfs/block-rsv.h | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) commit 710d5921d1431fa7d6fef8b47bb391256560bfd0 Author: David Sterba Date: Thu Jun 23 17:08:14 2022 +0200 btrfs: switch btrfs_block_rsv::failfast to bool Use simple bool type for the block reserve failfast status, there's short to save space as there used to be int but there's no reason for that. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/block-rsv.h | 2 +- fs/btrfs/file.c | 2 +- fs/btrfs/inode.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit c70c2c5bc9a14166a409f18567815d3bc426ebbb Author: David Sterba Date: Thu Jun 23 17:08:14 2022 +0200 btrfs: switch btrfs_block_rsv::full to bool Use simple bool type for the block reserve full status, there's short to save space as there used to be int but there's no reason for that. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/block-rsv.c | 15 ++++++--------- fs/btrfs/block-rsv.h | 2 +- fs/btrfs/delayed-ref.c | 4 ++-- 3 files changed, 9 insertions(+), 12 deletions(-) commit 37899117e8a000bc2d8395e1b2f01e68682ec85e Author: Christoph Hellwig Date: Fri Jun 17 12:04:13 2022 +0200 btrfs: do not return errors from btrfs_submit_dio_bio Always consume the bio and call the end_io handler on error instead of returning an error and letting the caller handle it. This matches what the block layer submission and the other btrfs bio submission handlers do and avoids any confusion on who needs to handle errors. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/inode.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit ea1f0cedefe9abd903a35900e4c1ba3e0413b017 Author: Christoph Hellwig Date: Fri Jun 17 12:04:12 2022 +0200 btrfs: handle allocation failure in btrfs_wq_submit_bio gracefully btrfs_wq_submit_bio is used for writeback under memory pressure. Instead of failing the I/O when we can't allocate the async_submit_bio, just punt back to the synchronous submission path. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/disk-io.c | 43 ++++++++++++++++++++++++------------------- fs/btrfs/disk-io.h | 6 +++--- fs/btrfs/inode.c | 17 +++++++++-------- 3 files changed, 36 insertions(+), 30 deletions(-) commit 82443fd55c5adb0643f28fb7576a8605d0d41485 Author: Christoph Hellwig Date: Fri Jun 17 12:04:11 2022 +0200 btrfs: simplify sync/async submission in btrfs_submit_data_write_bio btrfs_submit_data_write_bio special cases the reloc root because the checksums are preloaded, but only does so for the !sync case. The sync case can't happen for data relocation, but just handling it more generally significantly simplifies the logic. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/inode.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit b9af128d1e81645e7d9030e30def06ea5032f201 Author: Christoph Hellwig Date: Fri Jun 17 12:04:10 2022 +0200 btrfs: raid56: transfer the bio counter reference to the raid submission helpers Transfer the bio counter reference acquired by btrfs_submit_bio to raid56_parity_write and raid56_parity_recovery together with the bio that the reference was acquired for instead of acquiring another reference in those helpers and dropping the original one in btrfs_submit_bio. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/raid56.c | 16 ++++++---------- fs/btrfs/volumes.c | 15 +++++++-------- 2 files changed, 13 insertions(+), 18 deletions(-) commit 6065fd95dae1013f339c78d067eb71f0761c654b Author: Christoph Hellwig Date: Fri Jun 17 12:04:09 2022 +0200 btrfs: do not return errors from raid56_parity_recover Always consume the bio and call the end_io handler on error instead of returning an error and letting the caller handle it. This matches what the block layer submission does and avoids any confusion on who needs to handle errors. Also use the proper bool type for the generic_io argument. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/raid56.c | 39 ++++++++++++++++----------------------- fs/btrfs/raid56.h | 4 ++-- fs/btrfs/scrub.c | 10 ++-------- fs/btrfs/volumes.c | 2 +- 4 files changed, 21 insertions(+), 34 deletions(-) commit 31683f4aae4def0ecf07c77b5440833cd686bc7a Author: Christoph Hellwig Date: Fri Jun 17 12:04:08 2022 +0200 btrfs: do not return errors from raid56_parity_write Always consume the bio and call the end_io handler on error instead of returning an error and letting the caller handle it. This matches what the block layer submission does and avoids any confusion on who needs to handle errors. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/raid56.c | 23 +++++++++++++++-------- fs/btrfs/raid56.h | 2 +- fs/btrfs/volumes.c | 2 +- 3 files changed, 17 insertions(+), 10 deletions(-) commit 1a722d8f5be22b0d8c9db365abb67cb3c2e4215c Author: Christoph Hellwig Date: Fri Jun 17 12:04:07 2022 +0200 btrfs: do not return errors from btrfs_map_bio Always consume the bio and call the end_io handler on error instead of returning an error and letting the caller handle it. This matches what the block layer submission does and avoids any confusion on who needs to handle errors. As this requires touching all the callers, rename the function to btrfs_submit_bio, which describes the functionality much better. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/compression.c | 8 ++------ fs/btrfs/disk-io.c | 21 ++++++++++----------- fs/btrfs/inode.c | 25 ++++++++++--------------- fs/btrfs/volumes.c | 12 +++++++----- fs/btrfs/volumes.h | 3 +-- 5 files changed, 30 insertions(+), 39 deletions(-) commit 462b0b2a86c4d5a902812a449f99722e65c6cc66 Author: Qu Wenruo Date: Fri Jun 17 12:04:06 2022 +0200 btrfs: return proper mapped length for RAID56 profiles in __btrfs_map_block() For profiles other than RAID56, __btrfs_map_block() returns @map_length as min(stripe_end, logical + *length), which is also the same result from btrfs_get_io_geometry(). But for RAID56, __btrfs_map_block() returns @map_length as stripe_len. This strange behavior is going to hurt incoming bio split at btrfs_map_bio() time, as we will use @map_length as bio split size. Fix this behavior by returning @map_length by the same calculation as for other profiles. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/volumes.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ff18a4afebdd9b4441983a777b88095250e9de1d Author: Christoph Hellwig Date: Fri Jun 17 12:04:05 2022 +0200 btrfs: raid56: use fixed stripe length everywhere The raid56 code assumes a fixed stripe length BTRFS_STRIPE_LEN but there are functions passing it as arguments, this is not necessary. The fixed value has been used for a long time and though the stripe length should be configurable by super block member stripesize, this hasn't been implemented and would require more changes so we don't need to keep this code around until then. Partially based on a patch from Qu Wenruo. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig [ update changelog ] Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/raid56.c | 61 ++++++++++++++++++++++++------------------------------ fs/btrfs/raid56.h | 12 ++++------- fs/btrfs/scrub.c | 9 +++----- fs/btrfs/volumes.c | 13 +++++------- 4 files changed, 39 insertions(+), 56 deletions(-) commit 0201fceb9f5f65757ae7c40be658aa82f0940876 Author: Filipe Manana Date: Wed Jul 6 11:14:23 2022 +0100 btrfs: remove the inode cache check at btrfs_is_free_space_inode() The inode cache feature was removed in kernel 5.11, and we no longer have any code that reads from or writes to inode caches. We may still mount a filesystem that has inode caches, but they are ignored. Remove the check for an inode cache from btrfs_is_free_space_inode(), since we no longer have code to trigger reads from an inode cache or writes to an inode cache. The check at send.c is still needed, because in case we find a filesystem with an inode cache, we must ignore it. Also leave the checks at tree-checker.c, as they are sanity checks. This eliminates a dead branch and reduces the amount of code since it's in an inline function. Before: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1620662 189240 29032 1838934 1c0f56 fs/btrfs/btrfs.ko After: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1620502 189240 29032 1838774 1c0eb6 fs/btrfs/btrfs.ko Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 74860816e804ca175fa790f9bf5a369ab29d93ce Author: Nikolay Borisov Date: Fri Jun 24 11:01:23 2022 +0300 btrfs: sysfs: remove BIG_METADATA feature files This flag has been merged in 3.10 and is effectively always-on. Its status depends on the host page size so there's another way to guarantee compatibility with old kernels. Due to a bug introduced in 6f93e834fa7c ("btrfs: fix upper limit for max_inline for page size 64K") the flag is not persisted among features in the superblock so it's not reliable. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba fs/btrfs/sysfs.c | 2 -- 1 file changed, 2 deletions(-) commit 0766837b0d8d29928ec0369621f560353217e3da Author: Nikolay Borisov Date: Fri Jun 24 11:01:22 2022 +0300 btrfs: sysfs: remove MIXED_BACKREF feature file This feature has been the default for about 13 year. At this point it's safe to consider it an indispensable feature of BTRFS as such there's no need to advertise it in sysfs. Remove the global sysfs feature file, the per-filesystem feature file has never been there. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/sysfs.c | 2 -- 1 file changed, 2 deletions(-) commit 49f468c93807b61897bafa15a180ff2297bfde30 Author: Nikolay Borisov Date: Thu Jun 23 11:08:58 2022 +0300 btrfs: don't print 'has skinny extents' anymore on mount Skinny extents have been a default mkfs feature since version 3.18 i (introduced in btrfs-progs commit 6715de04d9a7 ("btrfs-progs: mkfs: make skinny-metadata default") ). It really doesn't bring any value to users to simply remove it. Reviewed-by: Qu Wenruo Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 3 --- 1 file changed, 3 deletions(-) commit 6b769dac219d069712a0d1a38bffd59ba2bbc1ca Author: Nikolay Borisov Date: Thu Jun 23 10:57:52 2022 +0300 btrfs: don't print 'flagging with big metadata' anymore on mount Added in commit 727011e07cbd ("Btrfs: allow metadata blocks larger than the page size") in 2010 and it's been default for mkfs since 3.12 (2013). The message doesn't really convey any useful information to users. Remove it. Reviewed-by: Qu Wenruo Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c1867eb33e15b93bca02b7ecde905e3042d90f22 Author: David Sterba Date: Tue Jun 21 18:40:48 2022 +0200 btrfs: clean up chained assignments The chained assignments may be convenient to write, but make readability a bit worse as it's too easy to overlook that there are several values set on the same line while this is rather an exception. Making it consistent everywhere avoids surprises. The pattern where inode times are initialized reuses the first value and the order is mtime, ctime. In other blocks the assignments are expanded so the order of variables is similar to the neighboring code. Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 3 ++- fs/btrfs/file.c | 9 +++++--- fs/btrfs/free-space-cache.c | 3 ++- fs/btrfs/inode.c | 41 +++++++++++++++++++++++------------- fs/btrfs/reflink.c | 6 ++++-- fs/btrfs/tests/extent-buffer-tests.c | 3 ++- fs/btrfs/transaction.c | 4 ++-- fs/btrfs/volumes.c | 3 ++- 8 files changed, 46 insertions(+), 26 deletions(-) commit ac0677348f3c2373183323f20ccfebe7cb00f9ab Author: David Sterba Date: Thu Jun 23 16:57:02 2022 +0200 btrfs: merge calculations for simple striped profiles in btrfs_rmap_block Use the same expression for stripe_nr for RAID0 (map->sub_stripes is 1) and RAID10 (map->sub_stripes is 2), with equivalent results. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/block-group.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d09cb9e18845c7ba5864282c7cc13c3cabad04f0 Author: David Sterba Date: Thu Jun 23 16:57:00 2022 +0200 btrfs: use mask for all RAID1* profiles in btrfs_calc_avail_data_space There's a sequence of hard coded values for RAID1 profiles that are already stored in the raid_attr table that should be used instead. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/super.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit e26b04c4c91925dba57324db177a24e18e2d0013 Author: Nikolay Borisov Date: Thu Jun 23 10:55:47 2022 +0300 btrfs: properly flag filesystem with BTRFS_FEATURE_INCOMPAT_BIG_METADATA Commit 6f93e834fa7c seemingly inadvertently moved the code responsible for flagging the filesystem as having BIG_METADATA to a place where setting the flag was essentially lost. This means that filesystems created with kernels containing this bug (starting with 5.15) can potentially be mounted by older (pre-3.4) kernels. In reality chances for this happening are low because there are other incompat flags introduced in the mean time. Still the correct behavior is to set INCOMPAT_BIG_METADATA flag and persist this in the superblock. Fixes: 6f93e834fa7c ("btrfs: fix upper limit for max_inline for page size 64K") CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Qu Wenruo Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit c8a5f8ca9a9c7d5c5bc31d54f47ea9d86f93ed69 Author: David Sterba Date: Wed Jun 22 20:45:18 2022 +0200 btrfs: print checksum type and implementation at mount time Per user request, print the checksum type and implementation at mount time among the messages. The checksum is user configurable and the actual crypto implementation is useful to see for performance reasons. The same information is also available after mount in /sys/fs/FSID/checksum file. Example: [25.323662] BTRFS info (device vdb): using sha256 (sha256-generic) checksum algorithm Link: https://github.com/kdave/btrfs-progs/issues/483 Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/disk-io.c | 3 +++ 1 file changed, 3 insertions(+) commit 1314ca78b2c35d3e7d0f097268a2ee6dc0d369ef Author: Josef Bacik Date: Mon Jun 13 18:31:17 2022 -0400 btrfs: reset block group chunk force if we have to wait If you try to force a chunk allocation, but you race with another chunk allocation, you will end up waiting on the chunk allocation that just occurred and then allocate another chunk. If you have many threads all doing this at once you can way over-allocate chunks. Fix this by resetting force to NO_FORCE, that way if we think we need to allocate we can, otherwise we don't force another chunk allocation if one is already happening. Reviewed-by: Filipe Manana CC: stable@vger.kernel.org # 5.4+ Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/block-group.c | 1 + 1 file changed, 1 insertion(+) commit 4824735918a1b7f79cdb310aa365c239be10ae5d Author: David Sterba Date: Wed May 18 18:02:55 2022 +0200 btrfs: send: add new command FILEATTR for file attributes There are file attributes inherited from previous ext2 SETFLAGS/GETFLAGS and later from XFLAGS interfaces, now commonly found under the 'fileattr' API. This corresponds to the individual inode bits and that's part of the on-disk format, so this is suitable for the protocol. The other interfaces contain a lot of cruft or bits that btrfs does not support yet. Currently the value is u64 and matches btrfs_inode_item. Not all the bits can be set by ioctls (like NODATASUM or READONLY), but we can send them over the protocol and leave it up to the receiving side what and how to apply. As some of the flags, eg. IMMUTABLE, can prevent any further changes, the receiving side needs to understand that and apply the changes in the right order, or possibly with some intermediate steps. This should be easier, future proof and simpler on the protocol layer than implementing in kernel. Reviewed-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/send.c | 104 +++++++++++++++++++++++++++++++++++++++++--------------- fs/btrfs/send.h | 10 ++++-- 2 files changed, 85 insertions(+), 29 deletions(-) commit 22a5b2abb7340cb05a34eb47d0271a6714cf5e3f Author: David Sterba Date: Tue May 17 16:50:30 2022 +0200 btrfs: send: add OTIME as utimes attribute for proto 2+ by default When send v1 was introduced the otime (inode creation time) was not available, however the attribute in btrfs send protocol exists. Though it would be possible to add it for v1 too as the attribute would be ignored by v1 receive, let's not change the layout of v1 and only add that to v2+. The otime cannot be changed and is only informative. Signed-off-by: David Sterba fs/btrfs/send.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8f0ed7d4e7bd87c9207a59d6d887777f632a5ed5 Author: Qu Wenruo Date: Sun Jun 19 21:47:56 2022 +0800 btrfs: output mirror number for bad metadata When handling a real world transid mismatch image, it's hard to know which copy is corrupted, as the error messages just look like this: BTRFS warning (device dm-3): checksum verify failed on 30408704 wanted 0xcdcdcdcd found 0x3c0adc8e level 0 BTRFS warning (device dm-3): checksum verify failed on 30408704 wanted 0xcdcdcdcd found 0x3c0adc8e level 0 BTRFS warning (device dm-3): checksum verify failed on 30408704 wanted 0xcdcdcdcd found 0x3c0adc8e level 0 BTRFS warning (device dm-3): checksum verify failed on 30408704 wanted 0xcdcdcdcd found 0x3c0adc8e level 0 We don't even know if the retry is caused by btrfs or the VFS retry. To make things a little easier to read, add mirror number for all related tree block read errors. So the above messages would look like this: BTRFS warning (device dm-3): checksum verify failed on logical 30408704 mirror 1 wanted 0xcdcdcdcd found 0x3c0adc8e level 0 BTRFS warning (device dm-3): checksum verify failed on logical 30408704 mirror 2 wanted 0xcdcdcdcd found 0x3c0adc8e level 0 BTRFS warning (device dm-3): checksum verify failed on logical 30408704 mirror 1 wanted 0xcdcdcdcd found 0x3c0adc8e level 0 BTRFS warning (device dm-3): checksum verify failed on logical 30408704 mirror 2 wanted 0xcdcdcdcd found 0x3c0adc8e level 0 Signed-off-by: Qu Wenruo [ update messages, add "logical" ] Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit aaafa1ebd6dbbe57d8b7587815b12e647b8b7b4a Author: Naohiro Aota Date: Tue Jun 21 15:41:02 2022 +0900 btrfs: replace unnecessary goto with direct return at cow_file_range() The 'goto out' in cow_file_range() in the exit block are not necessary and jump back. Replace them with return, while still keeping 'goto out' in the main code. Reviewed-by: Filipe Manana Signed-off-by: Naohiro Aota Reviewed-by: David Sterba [ keep goto in the main code, update changelog ] Signed-off-by: David Sterba fs/btrfs/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 71aa147b4d9d81fa65afa6016f50d7818b64a54f Author: Naohiro Aota Date: Tue Jun 21 15:41:01 2022 +0900 btrfs: fix error handling of fallback uncompress write When cow_file_range() fails in the middle of the allocation loop, it unlocks the pages but leaves the ordered extents intact. Thus, we need to call btrfs_cleanup_ordered_extents() to finish the created ordered extents. Also, we need to call end_extent_writepage() if locked_page is available because btrfs_cleanup_ordered_extents() never processes the region on the locked_page. Furthermore, we need to set the mapping as error if locked_page is unavailable before unlocking the pages, so that the errno is properly propagated to the user space. CC: stable@vger.kernel.org # 5.18+ Reviewed-by: Filipe Manana Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/inode.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 99826e4cab979aed35993ac855b354f91f7474d9 Author: Naohiro Aota Date: Tue Jun 21 15:41:00 2022 +0900 btrfs: extend btrfs_cleanup_ordered_extents for NULL locked_page btrfs_cleanup_ordered_extents() assumes locked_page to be non-NULL, so it is not usable for submit_uncompressed_range() which can have NULL locked_page. Add support supports locked_page == NULL case. Also, it rewrites redundant "page_offset(locked_page)". Reviewed-by: Filipe Manana Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/inode.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) commit 9ce7466f372d83054c7494f6b3e4b9abaf3f0355 Author: Naohiro Aota Date: Tue Jun 21 15:40:59 2022 +0900 btrfs: ensure pages are unlocked on cow_file_range() failure There is a hung_task report on zoned btrfs like below. https://github.com/naota/linux/issues/59 [726.328648] INFO: task rocksdb:high0:11085 blocked for more than 241 seconds. [726.329839] Not tainted 5.16.0-rc1+ #1 [726.330484] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [726.331603] task:rocksdb:high0 state:D stack: 0 pid:11085 ppid: 11082 flags:0x00000000 [726.331608] Call Trace: [726.331611] [726.331614] __schedule+0x2e5/0x9d0 [726.331622] schedule+0x58/0xd0 [726.331626] io_schedule+0x3f/0x70 [726.331629] __folio_lock+0x125/0x200 [726.331634] ? find_get_entries+0x1bc/0x240 [726.331638] ? filemap_invalidate_unlock_two+0x40/0x40 [726.331642] truncate_inode_pages_range+0x5b2/0x770 [726.331649] truncate_inode_pages_final+0x44/0x50 [726.331653] btrfs_evict_inode+0x67/0x480 [726.331658] evict+0xd0/0x180 [726.331661] iput+0x13f/0x200 [726.331664] do_unlinkat+0x1c0/0x2b0 [726.331668] __x64_sys_unlink+0x23/0x30 [726.331670] do_syscall_64+0x3b/0xc0 [726.331674] entry_SYSCALL_64_after_hwframe+0x44/0xae [726.331677] RIP: 0033:0x7fb9490a171b [726.331681] RSP: 002b:00007fb943ffac68 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 [726.331684] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fb9490a171b [726.331686] RDX: 00007fb943ffb040 RSI: 000055a6bbe6ec20 RDI: 00007fb94400d300 [726.331687] RBP: 00007fb943ffad00 R08: 0000000000000000 R09: 0000000000000000 [726.331688] R10: 0000000000000031 R11: 0000000000000246 R12: 00007fb943ffb000 [726.331690] R13: 00007fb943ffb040 R14: 0000000000000000 R15: 00007fb943ffd260 [726.331693] While we debug the issue, we found running fstests generic/551 on 5GB non-zoned null_blk device in the emulated zoned mode also had a similar hung issue. Also, we can reproduce the same symptom with an error injected cow_file_range() setup. The hang occurs when cow_file_range() fails in the middle of allocation. cow_file_range() called from do_allocation_zoned() can split the give region ([start, end]) for allocation depending on current block group usages. When btrfs can allocate bytes for one part of the split regions but fails for the other region (e.g. because of -ENOSPC), we return the error leaving the pages in the succeeded regions locked. Technically, this occurs only when @unlock == 0. Otherwise, we unlock the pages in an allocated region after creating an ordered extent. Considering the callers of cow_file_range(unlock=0) won't write out the pages, we can unlock the pages on error exit from cow_file_range(). So, we can ensure all the pages except @locked_page are unlocked on error case. In summary, cow_file_range now behaves like this: - page_started == 1 (return value) - All the pages are unlocked. IO is started. - unlock == 1 - All the pages except @locked_page are unlocked in any case - unlock == 0 - On success, all the pages are locked for writing out them - On failure, all the pages except @locked_page are unlocked Fixes: 42c011000963 ("btrfs: zoned: introduce dedicated data write path for zoned filesystems") CC: stable@vger.kernel.org # 5.12+ Reviewed-by: Filipe Manana Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/inode.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 64 insertions(+), 8 deletions(-) commit 140a8ff76547de36291e948df0de294d5f951678 Author: Ioannis Angelakopoulos Date: Tue Jun 14 15:22:34 2022 -0700 btrfs: sysfs: export commit stats Export commit stats in file /sys/fs/btrfs/UUID/commit_stats with example output like: commits 123 last_commit_ms 11 max_commit_ms 150 total_commit_ms 2000 The values are in one file so reading them at a single time will give a more consistent view. The stats are internally tracked in nanoseconds so the cumulative values should not suffer from rounding errors. Writing 0 to the file 'commit_stats' will reset max_commit_ms. Initial values are set at first mount of the filesystem. Reviewed-by: Nikolay Borisov Signed-off-by: Ioannis Angelakopoulos [ update changelog ] Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/sysfs.c | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) commit e55958c8a0e4d12a5f1bc9942c52dd793dd2e8dd Author: Ioannis Angelakopoulos Date: Tue Jun 14 15:22:32 2022 -0700 btrfs: collect commit stats, count, duration Track several stats about transaction commit, to be later exported via sysfs: - number of commits so far - duration of the last commit in ns - maximum commit duration seen so far in ns - total duration for all commits so far in ns The update of the commit stats occurs after the commit thread has gone through all the logic that checks if there is another thread committing at the same time. This means that we only account for actual commit work in the commit stats we report and not the time the thread spends waiting until it is ready to do the commit work. Reviewed-by: Nikolay Borisov Signed-off-by: Ioannis Angelakopoulos Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 15 +++++++++++++++ fs/btrfs/transaction.c | 22 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit f3e90c1ca93d18d03188ea2c2ca9c2ccc7ffad04 Author: Christoph Hellwig Date: Tue Jun 21 09:49:44 2022 +0200 btrfs: remove extent writepage address space operation Same as in commit 21b4ee7029c9 ("xfs: drop ->writepage completely"): we can remove the callback as it's only used in one place - single page writeback from memory reclaim and is not called for cgroup writeback at all. We only allow such writeback from kswapd, not from direct memory reclaim, and so it is rarely used. When it comes from kswapd, it is effectively random dirty page shoot-down, which is horrible for IO patterns. We can rely on background writeback to clean all dirty pages in an efficient way and not let it be interrupted by kswapd. Suggested-by: Johannes Weiner Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/extent_io.c | 14 -------------- fs/btrfs/extent_io.h | 1 - fs/btrfs/inode.c | 28 +--------------------------- fs/btrfs/subpage.c | 2 +- 4 files changed, 2 insertions(+), 43 deletions(-) commit 9555e1f1887f4ac2c106f2ea8b8b7f4c93a91b9b Author: David Sterba Date: Thu Jun 2 18:03:08 2022 +0200 btrfs: send: use boolean types for current inode status The new, new_gen and deleted indicate a status, use boolean type instead of int. Signed-off-by: David Sterba fs/btrfs/send.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit cec3dad943f478eb8540964d2fac934a7b59d172 Author: David Sterba Date: Thu Jun 2 15:40:46 2022 +0200 btrfs: send: remove old TODO regarding ERESTARTSYS The whole send operation is restartable and handling properly a buffer write may not be easy. We can't know what caused that and if a short delay and retry will fix it or how many retries should be performed in case it's a temporary condition. The error value is returned to the ioctl caller so in case it's transient problem, the user would be notified about the reason. Remove the TODO note as there's no plan to handle ERESTARTSYS. Signed-off-by: David Sterba fs/btrfs/send.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 8234d3f658b65584f1298960fc96a62f9e2a9f38 Author: David Sterba Date: Thu Jun 2 15:28:41 2022 +0200 btrfs: send: simplify includes We don't need the whole ctree.h in send.h, none of the data types defined there are used. Signed-off-by: David Sterba fs/btrfs/send.c | 1 + fs/btrfs/send.h | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) commit e3b4b9040b0f59a27cdd3db31417aeced473f345 Author: David Sterba Date: Thu Jun 2 15:25:32 2022 +0200 btrfs: send: drop __KERNEL__ ifdef from send.h We don't need this ifdef as the header file is not shared, the protocol definition used by userspace should be from libbtrfs or libbtrfsutil. Signed-off-by: David Sterba fs/btrfs/send.h | 2 -- 1 file changed, 2 deletions(-) commit ee5b46a353afe23d04fac464e83a8c788342d453 Author: Christoph Hellwig Date: Tue Jun 21 08:26:27 2022 +0200 btrfs: increase direct io read size limit to 256 sectors Btrfs currently limits direct I/O reads to a single sector, which goes back to commit c329861da406 ("Btrfs: don't allocate a separate csums array for direct reads") from Josef. That commit changes the direct I/O code to ".. use the private part of the io_tree for our csums.", but ten years later that isn't how checksums for direct reads work, instead they use a csums allocation on a per-btrfs_dio_private basis (which have their own performance problem for small I/O, but that will be addressed later). There is no fundamental limit in btrfs itself to limit the I/O size except for the size of the checksum array that scales linearly with the number of sectors in an I/O. Pick a somewhat arbitrary limit of 256 limits, which matches what the buffered reads typically see as the upper limit as the limit for direct I/O as well. This significantly improves direct read performance. For example a fio run doing 1 MiB aio reads with a queue depth of 1 roughly triples the throughput: Baseline: READ: bw=65.3MiB/s (68.5MB/s), 65.3MiB/s-65.3MiB/s (68.5MB/s-68.5MB/s), io=19.1GiB (20.6GB), run=300013-300013msec With this patch: READ: bw=196MiB/s (206MB/s), 196MiB/s-196MiB/s (206MB/s-206MB/s), io=57.5GiB (61.7GB), run=300006-300006msc Reviewed-by: Qu Wenruo Reviewed-by: Nikolay Borisov Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/inode.c | 6 +++++- fs/btrfs/volumes.h | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) commit f6065f8edeb25f4a9dfe0b446030ad995a84a088 Author: Qu Wenruo Date: Thu Jun 9 13:18:44 2022 +0800 btrfs: raid56: don't trust any cached sector in __raid56_parity_recover() [BUG] There is a small workload which will always fail with recent kernel: (A simplified version from btrfs/125 test case) mkfs.btrfs -f -m raid5 -d raid5 -b 1G $dev1 $dev2 $dev3 mount $dev1 $mnt xfs_io -f -c "pwrite -S 0xee 0 1M" $mnt/file1 sync umount $mnt btrfs dev scan -u $dev3 mount -o degraded $dev1 $mnt xfs_io -f -c "pwrite -S 0xff 0 128M" $mnt/file2 umount $mnt btrfs dev scan mount $dev1 $mnt btrfs balance start --full-balance $mnt umount $mnt The failure is always failed to read some tree blocks: BTRFS info (device dm-4): relocating block group 217710592 flags data|raid5 BTRFS error (device dm-4): parent transid verify failed on 38993920 wanted 9 found 7 BTRFS error (device dm-4): parent transid verify failed on 38993920 wanted 9 found 7 ... [CAUSE] With the recently added debug output, we can see all RAID56 operations related to full stripe 38928384: 56.1183: raid56_read_partial: full_stripe=38928384 devid=2 type=DATA1 offset=0 opf=0x0 physical=9502720 len=65536 56.1185: raid56_read_partial: full_stripe=38928384 devid=3 type=DATA2 offset=16384 opf=0x0 physical=9519104 len=16384 56.1185: raid56_read_partial: full_stripe=38928384 devid=3 type=DATA2 offset=49152 opf=0x0 physical=9551872 len=16384 56.1187: raid56_write_stripe: full_stripe=38928384 devid=3 type=DATA2 offset=0 opf=0x1 physical=9502720 len=16384 56.1188: raid56_write_stripe: full_stripe=38928384 devid=3 type=DATA2 offset=32768 opf=0x1 physical=9535488 len=16384 56.1188: raid56_write_stripe: full_stripe=38928384 devid=1 type=PQ1 offset=0 opf=0x1 physical=30474240 len=16384 56.1189: raid56_write_stripe: full_stripe=38928384 devid=1 type=PQ1 offset=32768 opf=0x1 physical=30507008 len=16384 56.1218: raid56_write_stripe: full_stripe=38928384 devid=3 type=DATA2 offset=49152 opf=0x1 physical=9551872 len=16384 56.1219: raid56_write_stripe: full_stripe=38928384 devid=1 type=PQ1 offset=49152 opf=0x1 physical=30523392 len=16384 56.2721: raid56_parity_recover: full stripe=38928384 eb=39010304 mirror=2 56.2723: raid56_parity_recover: full stripe=38928384 eb=39010304 mirror=2 56.2724: raid56_parity_recover: full stripe=38928384 eb=39010304 mirror=2 Before we enter raid56_parity_recover(), we have triggered some metadata write for the full stripe 38928384, this leads to us to read all the sectors from disk. Furthermore, btrfs raid56 write will cache its calculated P/Q sectors to avoid unnecessary read. This means, for that full stripe, after any partial write, we will have stale data, along with P/Q calculated using that stale data. Thankfully due to patch "btrfs: only write the sectors in the vertical stripe which has data stripes" we haven't submitted all the corrupted P/Q to disk. When we really need to recover certain range, aka in raid56_parity_recover(), we will use the cached rbio, along with its cached sectors (the full stripe is all cached). This explains why we have no event raid56_scrub_read_recover() triggered. Since we have the cached P/Q which is calculated using the stale data, the recovered one will just be stale. In our particular test case, it will always return the same incorrect metadata, thus causing the same error message "parent transid verify failed on 39010304 wanted 9 found 7" again and again. [BTRFS DESTRUCTIVE RMW PROBLEM] Test case btrfs/125 (and above workload) always has its trouble with the destructive read-modify-write (RMW) cycle: 0 32K 64K Data1: | Good | Good | Data2: | Bad | Bad | Parity: | Good | Good | In above case, if we trigger any write into Data1, we will use the bad data in Data2 to re-generate parity, killing the only chance to recovery Data2, thus Data2 is lost forever. This destructive RMW cycle is not specific to btrfs RAID56, but there are some btrfs specific behaviors making the case even worse: - Btrfs will cache sectors for unrelated vertical stripes. In above example, if we're only writing into 0~32K range, btrfs will still read data range (32K ~ 64K) of Data1, and (64K~128K) of Data2. This behavior is to cache sectors for later update. Incidentally commit d4e28d9b5f04 ("btrfs: raid56: make steal_rbio() subpage compatible") has a bug which makes RAID56 to never trust the cached sectors, thus slightly improve the situation for recovery. Unfortunately, follow up fix "btrfs: update stripe_sectors::uptodate in steal_rbio" will revert the behavior back to the old one. - Btrfs raid56 partial write will update all P/Q sectors and cache them This means, even if data at (64K ~ 96K) of Data2 is free space, and only (96K ~ 128K) of Data2 is really stale data. And we write into that (96K ~ 128K), we will update all the parity sectors for the full stripe. This unnecessary behavior will completely kill the chance of recovery. Thankfully, an unrelated optimization "btrfs: only write the sectors in the vertical stripe which has data stripes" will prevent submitting the write bio for untouched vertical sectors. That optimization will keep the on-disk P/Q untouched for a chance for later recovery. [FIX] Although we have no good way to completely fix the destructive RMW (unless we go full scrub for each partial write), we can still limit the damage. With patch "btrfs: only write the sectors in the vertical stripe which has data stripes" now we won't really submit the P/Q of unrelated vertical stripes, so the on-disk P/Q should still be fine. Now we really need to do is just drop all the cached sectors when doing recovery. By this, we have a chance to read the original P/Q from disk, and have a chance to recover the stale data, while still keep the cache to speed up regular write path. In fact, just dropping all the cache for recovery path is good enough to allow the test case btrfs/125 along with the small script to pass reliably. The lack of metadata write after the degraded mount, and forced metadata COW is saving us this time. So this patch will fix the behavior by not trust any cache in __raid56_parity_recover(), to solve the problem while still keep the cache useful. But please note that this test pass DOES NOT mean we have solved the destructive RMW problem, we just do better damage control a little better. Related patches: - btrfs: only write the sectors in the vertical stripe - d4e28d9b5f04 ("btrfs: raid56: make steal_rbio() subpage compatible") - btrfs: update stripe_sectors::uptodate in steal_rbio Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 711f447b4fdf18b970e967469c6693577e9cc080 Author: Christoph Hellwig Date: Sun Jun 19 08:07:05 2022 +0200 btrfs: remove the finish_func argument to btrfs_mark_ordered_io_finished finish_func is always set to finish_ordered_fn, so remove it and also the now pointless and somewhat confusingly named __endio_write_update_ordered wrapper. Reviewed-by: Nikolay Borisov Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/inode.c | 40 +++++++++------------------------------- fs/btrfs/ordered-data.c | 17 +++++++++++------ fs/btrfs/ordered-data.h | 5 +++-- 3 files changed, 23 insertions(+), 39 deletions(-) commit 1f4f639fe729bcfe097fa6c2305eea664110bf6a Author: Nikolay Borisov Date: Fri Jun 17 15:53:34 2022 +0300 btrfs: batch up release of reserved metadata for delayed items used for deletion With Filipe's recent rework of the delayed inode code one aspect which isn't batched is the release of the reserved metadata of delayed inode's delete items. With this patch on top of Filipe's rework and running the same test as provided in the description of a patch titled "btrfs: improve batch deletion of delayed dir index items" I observe the following change of the number of calls to btrfs_block_rsv_release: Before this change: - block_rsv_release: 1004 - btrfs_delete_delayed_items_total_time: 14602 - delete_batches: 505 After: - block_rsv_release: 510 - btrfs_delete_delayed_items_total_time: 13643 - delete_batches: 507 Reviewed-by: Filipe Manana Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 3613249a1b30ef6f7a7566e39878ea550af51049 Author: Qu Wenruo Date: Mon Jun 13 15:06:35 2022 +0800 btrfs: warn about dev extents that are inside the reserved range Btrfs on-disk format has reserved the first 1MiB for the primary super block (at 64KiB offset) and bootloaders may also use this space. This behavior is only introduced since v4.1 btrfs-progs release, although kernel can ensure we never touch the reserved range of super blocks, it's better to inform the end users, and a balance will resolve the problem. Signed-off-by: Qu Wenruo [ update changelog and message ] Signed-off-by: David Sterba fs/btrfs/volumes.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 37f85ec320e6d73b92c8f8b5b2ddf33077970a23 Author: Qu Wenruo Date: Mon Jun 13 15:06:34 2022 +0800 btrfs: use named constant for reserved device space There's a reserved space on each device of size 1MiB that can be used by bootloaders or to avoid accidental overwrite. Use a symbolic constant with the explaining comment instead of hard coding the value and multiple comments. Note: since btrfs-progs v4.1, mkfs.btrfs will reserve the first 1MiB for the primary super block (at offset 64KiB), until then the range could have been used by mistake. Kernel has been always respecting the 1MiB range for writes. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba fs/btrfs/ctree.h | 7 +++++++ fs/btrfs/extent-tree.c | 6 +++--- fs/btrfs/super.c | 12 ++++-------- fs/btrfs/volumes.c | 7 +------ 4 files changed, 15 insertions(+), 17 deletions(-) commit bfceac7fd3c47175fec75c32071051de5969a34c Author: David Sterba Date: Mon Jun 6 19:07:02 2022 +0200 btrfs: remove unused typedefs get_extent_t and btrfs_work_func_t Signed-off-by: David Sterba fs/btrfs/async-thread.h | 1 - fs/btrfs/extent_io.h | 4 ---- 2 files changed, 5 deletions(-) commit e3059ec06b9f1a96826cc2bb6ed131aac0942446 Author: David Sterba Date: Mon Jun 6 19:32:59 2022 +0200 btrfs: sink iterator parameter to btrfs_ioctl_logical_to_ino There's only one function we pass to iterate_inodes_from_logical as iterator, so we can drop the indirection and call it directly, after moving the function to backref.c Signed-off-by: David Sterba fs/btrfs/backref.c | 25 ++++++++++++++++++++++--- fs/btrfs/backref.h | 3 +-- fs/btrfs/ioctl.c | 22 +--------------------- 3 files changed, 24 insertions(+), 26 deletions(-) commit 875d1daa7bc683821a4209e1c6aab24909e95217 Author: David Sterba Date: Mon Jun 6 19:06:17 2022 +0200 btrfs: simplify parameters of backref iterators The inode reference iterator interface takes parameters that are derived from the context parameter, but as it's a void* type the values are passed individually. Change the ctx type to inode_fs_path as it's the only thing we pass and drop any parameters that are derived from that. Signed-off-by: David Sterba fs/btrfs/backref.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit ad6240f662cd7dfb449ac83dfcc74afb17750130 Author: David Sterba Date: Mon Jun 6 18:52:24 2022 +0200 btrfs: call inode_to_path directly and drop indirection The functions for iterating inode reference take a function parameter but there's only one value, inode_to_path(). Remove the indirection and call the function. As paths_from_inode would become just an alias for iterate_irefs(), merge the two into one function. Signed-off-by: David Sterba fs/btrfs/backref.c | 50 ++++++++++++++++++++------------------------------ 1 file changed, 20 insertions(+), 30 deletions(-) commit 6d322b483976f34b1217b9c1b4a54fa16c10bdc8 Author: Qu Wenruo Date: Fri May 13 16:34:31 2022 +0800 btrfs: use ncopies from btrfs_raid_array in btrfs_num_copies() For all non-RAID56 profiles, we can use btrfs_raid_array[].ncopies directly, only for RAID5 and RAID6 we need some extra handling as there's no table value for that. For RAID10 there's a change from sub_stripes to ncopies. The values are the same but semantically we want to use number of copies, as this is what btrfs_num_copies does. Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 0b30f719451ebbf313cdb444a27b00c10cf6e8a5 Author: Qu Wenruo Date: Fri May 13 16:34:30 2022 +0800 btrfs: use btrfs_raid_array to calculate number of parity stripes Use the raid table instead of hard coded values and rename the helper as it is exported. This could make later extension on RAID56 based profiles easier. Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/raid56.c | 10 ++-------- fs/btrfs/raid56.h | 12 +----------- fs/btrfs/volumes.c | 7 +++++++ fs/btrfs/volumes.h | 1 + 4 files changed, 11 insertions(+), 19 deletions(-) commit 6dead96c1a1e091e78ee80a2484279c3861c60d8 Author: Qu Wenruo Date: Fri May 13 16:34:29 2022 +0800 btrfs: use btrfs_chunk_max_errors() to replace tolerance calculation In __btrfs_map_block() we have an assignment to @max_errors using nr_parity_stripes(). Although it works for RAID56 it's confusing. Replace it with btrfs_chunk_max_errors(). Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc88b486d54b2a1ec1f0f40e106f8da4ea3dfb25 Author: Qu Wenruo Date: Fri May 13 16:34:28 2022 +0800 btrfs: remove parameter dev_extent_len from scrub_stripe() For scrub_stripe() we can easily calculate the dev extent length as we have the full info of the chunk. Thus there is no need to pass @dev_extent_len from the caller, and we introduce a helper, btrfs_calc_stripe_length(), to do the calculation from extent_map structure. Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/scrub.c | 15 ++++++++------- fs/btrfs/volumes.c | 12 ++++++------ fs/btrfs/volumes.h | 1 + 3 files changed, 15 insertions(+), 13 deletions(-) commit 9db33891c79dde09384ed56a0670a02648d8ce05 Author: David Sterba Date: Thu Jun 25 19:03:41 2020 +0200 btrfs: unify tree search helper returning prev and next nodes Simplify helper to return only next and prev pointers, we don't need all the node/parent/prev/next pointers of __etree_search as there are now other specialized helpers. Rename parameters so they follow the naming. Signed-off-by: David Sterba fs/btrfs/extent_io.c | 122 ++++++++++++++++++++++++++------------------------- 1 file changed, 62 insertions(+), 60 deletions(-) commit ec60c76f532f94081d2605b77101246073a9ae6f Author: David Sterba Date: Thu Jun 25 18:49:39 2020 +0200 btrfs: make tree search for insert more generic and use it for tree_search With a slight extension of tree_search_for_insert (fill the return node and parent return parameters) we can avoid calling __etree_search from tree_search, that could be removed eventually in followup patches. Signed-off-by: David Sterba fs/btrfs/extent_io.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit bebb22c13dc147aa80cd5c9d397d286f133fabb1 Author: David Sterba Date: Thu Jun 25 18:35:24 2020 +0200 btrfs: open code inexact rbtree search in tree_search The call chain from tree_search tree_search_for_insert __etree_search can be open coded and allow further simplifications, here we need a tree search with fallback to the next node in case it's not found. This is represented as __etree_search parameters next_ret=valid, prev_ret=NULL. Signed-off-by: David Sterba fs/btrfs/extent_io.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit c367602a78a24dae5444d2810e94aa8dc6338ac2 Author: David Sterba Date: Thu Jun 25 18:15:31 2020 +0200 btrfs: remove node and parent parameters from insert_state There's no caller left that would pass valid pointers to insert_state so we can drop them. Signed-off-by: David Sterba fs/btrfs/extent_io.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit fb8f07d2d8e80738d5c6094e332950bfd0842b7a Author: David Sterba Date: Thu Jun 25 18:11:31 2020 +0200 btrfs: add fast path for extent_state insertion In two cases the exact location where to insert the extent state is known at the call time so we don't need to pass it to insert_state that takes the fast path. Signed-off-by: David Sterba fs/btrfs/extent_io.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 6d92b304ec6b929f9aa87ae96488daf180d07585 Author: David Sterba Date: Thu Jun 25 17:54:54 2020 +0200 btrfs: pass bits by value not by pointer for extent_state helpers The bits are passed to all extent state helpers for no apparent reason, the value only read and never updated so remove the indirection and pass it directly. Also unify the type to u32 where needed. Signed-off-by: David Sterba fs/btrfs/ctree.h | 4 ++-- fs/btrfs/extent_io.c | 46 ++++++++++++++++++++++------------------------ fs/btrfs/inode.c | 24 ++++++++++++------------ 3 files changed, 36 insertions(+), 38 deletions(-) commit cee512682535e0628dd926f56fa86b43f21d10ed Author: David Sterba Date: Thu Jun 25 17:18:24 2020 +0200 btrfs: lift start and end parameters to callers of insert_state Let callers of insert_state to set up the extent state to allow further simplifications of the parameters. Signed-off-by: David Sterba fs/btrfs/extent_io.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) commit c7e118cf98c7376e840fb73f096791ff61380310 Author: David Sterba Date: Thu Jun 25 17:14:17 2020 +0200 btrfs: open code rbtree search in insert_state The rbtree search is a known pattern and can be open coded, allowing to remove the tree_insert and further cleanups. Signed-off-by: David Sterba fs/btrfs/extent_io.c | 80 ++++++++++++++++++++++------------------------------ 1 file changed, 33 insertions(+), 47 deletions(-) commit 12c9cdda620845e80da85e0ef979fa52d6d6250e Author: David Sterba Date: Thu Jun 25 16:49:48 2020 +0200 btrfs: open code rbtree search in split_state Preparatory work to remove tree_insert from extent_io.c, the rbtree search loop is a known and simple so it can be open coded. Signed-off-by: David Sterba fs/btrfs/extent_io.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) commit 1c10702e7cb9ddecdcf032f83dad7a3583689a8e Author: Qu Wenruo Date: Wed Jun 8 08:34:36 2022 +0800 btrfs: raid56: avoid double for loop inside raid56_parity_scrub_stripe() Originally it's iterating all the sectors which has dbitmap sector for the vertical stripe. It can be easily converted to sector bytenr iteration with an test_bit() call. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/raid56.c | 62 +++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit 550cdeb3e09808540454012ddf896dae466d8822 Author: Qu Wenruo Date: Wed Jun 8 08:34:35 2022 +0800 btrfs: raid56: avoid double for loop inside raid56_rmw_stripe() This function doesn't even utilize full stripe skip, just iterate all the data sectors is definitely enough. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/raid56.c | 59 ++++++++++++++++++++++++++----------------------------- 1 file changed, 28 insertions(+), 31 deletions(-) commit aee35e4bcc3029fc3be15f696043107125b7209f Author: Qu Wenruo Date: Wed Jun 8 08:34:34 2022 +0800 btrfs: raid56: avoid double for loop inside alloc_rbio_essential_pages() The double loop is just checking if the page for the vertical stripe is allocated. We can easily convert it to single loop and get rid of @stripe variable. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/raid56.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit ef340fccbe982a14588ed15eb3a20b2e5b78a3e1 Author: Qu Wenruo Date: Thu Jun 2 15:51:19 2022 +0800 btrfs: raid56: avoid double for loop inside __raid56_parity_recover() The double for loop can be easily converted to single for loop as we're really iterating the sectors in their bytenr order. The only exception is the full stripe skip, however that can also easily be done inside the loop. Add an ASSERT() along with a comment for that specific case. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/raid56.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) commit 369200446564f04b5cd14596d69e17880be7d926 Author: Qu Wenruo Date: Thu Jun 2 15:51:18 2022 +0800 btrfs: raid56: avoid double for loop inside finish_rmw() We can easily calculate the stripe number and sector number inside the stripe. Thus there is not much need for a double for loop. For the only case we want to skip the whole stripe, we can manually increase @total_sector_nr. This is not a recommended behavior, thus every time the iterator gets modified there will be a comment along with an ASSERT() for it. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/raid56.c | 97 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 42 deletions(-) commit f31f09f6be1c6c1a673e0566e258281a7bbaaa51 Author: Josef Bacik Date: Mon Jun 13 15:09:48 2022 -0400 btrfs: tree-log: make the return value for log syncing consistent Currently we will return 1 or -EAGAIN if we decide we need to commit the transaction rather than sync the log. In practice this doesn't really matter, we interpret any !0 and !BTRFS_NO_LOG_SYNC as needing to commit the transaction. However this makes it hard to figure out what the correct thing to do is. Fix this up by defining BTRFS_LOG_FORCE_COMMIT and using this in all the places where we want to force the transaction to be committed. CC: stable@vger.kernel.org # 5.15+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/file.c | 2 +- fs/btrfs/tree-log.c | 18 +++++++++--------- fs/btrfs/tree-log.h | 3 +++ 3 files changed, 13 insertions(+), 10 deletions(-) commit 5bea2508811ec76105b01c90c1f1661024c257a9 Author: Johannes Thumshirn Date: Thu Jun 9 09:28:04 2022 -0700 btrfs: add tracepoints for ordered extents When debugging a reference counting issue with ordered extents, I've found we're lacking a lot of tracepoint coverage in the ordered extent code. Close these gaps by adding tracepoints after every refcount_inc() in the ordered extent code. Reviewed-by: Boris Burkov Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ordered-data.c | 19 ++++++++++--- include/trace/events/btrfs.h | 64 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 3 deletions(-) commit 15dcccdb8b48fa3514c038bcaf0fa455fa6d89a0 Author: David Sterba Date: Mon Jun 6 18:36:35 2022 +0200 btrfs: sysfs: advertise zoned support among features We've hidden the zoned support in sysfs under debug config for the first releases but now the stability is reasonable, though not all features have been implemented. Signed-off-by: David Sterba fs/btrfs/sysfs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit a4012f06f188b51a69a1f31f0fa10f37e671cebb Author: Christoph Hellwig Date: Fri Jun 3 08:57:25 2022 +0200 btrfs: split discard handling out of btrfs_map_block Mapping block for discard doesn't really share any code with the regular block mapping case. Split it out into an entirely separate helper that just returns an array of btrfs_discard_stripe structures and the number of stripes. This removes the need for the length field in the btrfs_io_context structure, so remove tht. Reviewed-by: Nikolay Borisov Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 72 ++++++++++++++++++++------------------------------ fs/btrfs/volumes.c | 67 +++++++++++++++++++--------------------------- fs/btrfs/volumes.h | 10 ++++++- 3 files changed, 64 insertions(+), 85 deletions(-) commit 5eecef7108350f6506a55d8fd9508ea32caeecad Author: Christoph Hellwig Date: Fri Jun 3 08:57:42 2022 +0200 btrfs: stop looking at btrfs_bio->iter in index_one_bio All the bios that index_one_bio operates on are the bios submitted by the upper layer. These are never resubmitted to an actual device by the raid56 code, and thus the iter never changes from the initial state. Thus we can always just use bi_iter directly as it will be the same as the saved copy. Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/raid56.c | 3 --- 1 file changed, 3 deletions(-) commit dc4d31684974d140250f3ee612c3f0cab13b3146 Author: Qu Wenruo Date: Tue Jun 7 19:48:24 2022 +0800 btrfs: reject log replay if there is unsupported RO compat flag [BUG] If we have a btrfs image with dirty log, along with an unsupported RO compatible flag: log_root 30474240 ... compat_flags 0x0 compat_ro_flags 0x40000003 ( FREE_SPACE_TREE | FREE_SPACE_TREE_VALID | unknown flag: 0x40000000 ) Then even if we can only mount it RO, we will still cause metadata update for log replay: BTRFS info (device dm-1): flagging fs with big metadata feature BTRFS info (device dm-1): using free space tree BTRFS info (device dm-1): has skinny extents BTRFS info (device dm-1): start tree-log replay This is definitely against RO compact flag requirement. [CAUSE] RO compact flag only forces us to do RO mount, but we will still do log replay for plain RO mount. Thus this will result us to do log replay and update metadata. This can be very problematic for new RO compat flag, for example older kernel can not understand v2 cache, and if we allow metadata update on RO mount and invalidate/corrupt v2 cache. [FIX] Just reject the mount unless rescue=nologreplay is provided: BTRFS error (device dm-1): cannot replay dirty log with unsupport optional features (0x40000000), try rescue=nologreplay instead We don't want to set rescue=nologreply directly, as this would make the end user to read the old data, and cause confusion. Since the such case is really rare, we're mostly fine to just reject the mount with an error message, which also includes the proper workaround. CC: stable@vger.kernel.org #4.9+ Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 97f09d55f194d26d8b3bd367eba07fafbf1c82a0 Author: Qu Wenruo Date: Tue Jun 7 19:50:59 2022 +0800 btrfs: make btrfs_super_block::log_root_transid deprecated When using "btrfs inspect-internal dump-super" to inspect an fs with dirty log, it always shows the log_root_transid as 0: log_root 30474240 log_root_transid 0 <<< log_root_level 0 It turns out that, btrfs_super_block::log_root_transid is never really utilized (even no read for it). This can date back to the introduction of btrfs into upstream kernel. In fact, when reading log tree root, we always use btrfs_super_block::generation + 1 as the expected generation. So here we're completely safe to mark this member deprecated. In theory we can easily reuse this member for other purposes, but to be extra safe, here we follow the leafsize way, by adding "__unused_" for log_root_transid. And we can safely remove the accessors, since there is no such callers from the very beginning. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 722c82ac9ee658cd99d04a61595c7920f3ee24cf Author: Christoph Hellwig Date: Fri Jun 3 09:11:03 2022 +0200 btrfs: pass the btrfs_bio_ctrl to submit_one_bio submit_one_bio always works on the bio and compression flags from a btrfs_bio_ctrl structure. Pass the explicitly and clean up the calling conventions by handling a NULL bio in submit_one_bio, and using the btrfs_bio_ctrl to pass the mirror number as well. Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 85 ++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 46 deletions(-) commit 9845e5ddcbfe160f4a668c51f38515729a3fb794 Author: Christoph Hellwig Date: Fri Jun 3 09:11:02 2022 +0200 btrfs: merge end_write_bio and flush_write_bio Merge end_write_bio and flush_write_bio into a single submit_write_bio helper, that either submits the bio or ends it if a negative errno was passed in. This consolidates a lot of duplicated checks in the callers. Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 94 ++++++++++++++++------------------------------------ 1 file changed, 29 insertions(+), 65 deletions(-) commit 2d5ac130fa498d66d91c3aa46c0f87e63664d9e9 Author: Christoph Hellwig Date: Fri Jun 3 09:11:01 2022 +0200 btrfs: don't use bio->bi_private to pass the inode to submit_one_bio submit_one_bio is only used for page cache I/O, so the inode can be trivially derived from the first page in the bio. Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 234fdd2815ce8fe4da6782109580f3b166aeb97b Author: David Sterba Date: Mon Jul 27 20:59:20 2020 +0200 btrfs: remove redundant check in up check_setget_bounds There are two separate checks in the bounds checker, the first one being a special case of the second. As this function is performance critical due to checking access to any eb member, reducing the size can slightly improve performance. On a release build on x86_64 the helper is completely inlined so the function call overhead is also gone. There was a report of 5% performance drop on metadata heavy workload, that disappeared after disabling asserts. The most significant part of that is the bounds checker. https://lore.kernel.org/linux-btrfs/20200724164147.39925-1-josef@toxicpanda.com/ After the analysis, the optimized code removes the worst overhead which is the function call and the performance was restored. https://lore.kernel.org/linux-btrfs/20200730110943.GE3703@twin.jikos.cz/ 1. baseline, asserts on, setget check on run time: 46s run time with perf: 48s 2. asserts on, comment out setget check run time: 44s run time with perf: 47s So this is confirms the 5% difference 3. asserts on, optimized seget check run time: 44s run time with perf: 47s The optimizations are reducing the number of ifs to 1 and inlining the hot path. Low-level stuff, gets the performance back. Patch below. 4. asserts off, no setget check run time: 44s run time with perf: 45s This verifies that asserts other than the setget check have negligible impact on performance and it's not harmful to keep them on. Analysis where the performance is lost: * check_setget_bounds is short function, but it's still a function call, changing the flow of instructions and given how many times it's called the overhead adds up * there are two conditions, one to check if the range is completely outside (member_offset > eb->len) or partially inside (member_offset + size > eb->len) Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/struct-funcs.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 51c0674a56f9823e83dcc2f3d7f0d4f61c4927fc Author: Fabio M. De Francesco Date: Tue May 31 16:53:34 2022 +0200 btrfs: replace kmap() with kmap_local_page() in lzo.c The use of kmap() is being deprecated in favor of kmap_local_page() where it is feasible. With kmap_local_page(), the mapping is per thread, CPU local and not globally visible. Therefore, use kmap_local_page() / kunmap_local() in lzo.c wherever the mappings are per thread and not globally visible. Tested on QEMU + KVM 32 bits VM with 4GB of RAM and HIGHMEM64G enabled. Suggested-by: Ira Weiny Reviewed-by: Christoph Hellwig Signed-off-by: Fabio M. De Francesco Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/lzo.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit 70826b6bd583a8e766ffec8415cc7d5395836370 Author: Fabio M. De Francesco Date: Tue May 31 16:53:33 2022 +0200 btrfs: replace kmap() with kmap_local_page() in inode.c The use of kmap() is being deprecated in favor of kmap_local_page() where it is feasible. With kmap_local_page(), the mapping is per thread, CPU local and not globally visible. Therefore, use kmap_local_page() / kunmap_local() in inode.c wherever the mappings are per thread and not globally visible. Tested on QEMU + KVM 32 bits VM with 4GB of RAM and HIGHMEM64G enabled. Suggested-by: Ira Weiny Reviewed-by: Christoph Hellwig Signed-off-by: Fabio M. De Francesco Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9ff7ddd3c7ad7f6537cd66d3f455c7717bd358b9 Author: Christoph Hellwig Date: Thu May 26 09:36:42 2022 +0200 btrfs: do not allocate a btrfs_bio for low-level bios The bios submitted from btrfs_map_bio don't really interact with the rest of btrfs and the only btrfs_bio member actually used in the low-level bios is the pointer to the btrfs_io_context used for endio handler. Use a union in struct btrfs_io_stripe that allows the endio handler to find the btrfs_io_context and remove the spurious ->device assignment so that a plain fs_bio_set bio can be used for the low-level bios allocated inside btrfs_map_bio. Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/extent_io.c | 13 ------------- fs/btrfs/extent_io.h | 1 - fs/btrfs/volumes.c | 19 +++++++++---------- fs/btrfs/volumes.h | 7 ++++++- 4 files changed, 15 insertions(+), 25 deletions(-) commit a316a25991688ab037e5a41209736c017b5a9511 Author: Christoph Hellwig Date: Thu May 26 09:36:41 2022 +0200 btrfs: factor stripe submission logic out of btrfs_map_bio Move all per-stripe handling into submit_stripe_bio and use a label to cleanup instead of duplicating the logic. Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/volumes.c | 74 ++++++++++++++++++++++++++---------------------------- 1 file changed, 35 insertions(+), 39 deletions(-) commit d7b9416fe5c581c69e446b971c4a0394c609fd89 Author: Christoph Hellwig Date: Thu May 26 09:36:40 2022 +0200 btrfs: remove btrfs_end_io_wq All reads bio that go through btrfs_map_bio need to be completed in user context. And read I/Os are the most common and timing critical in almost any file system workloads. Embed a work_struct into struct btrfs_bio and use it to complete all read bios submitted through btrfs_map, using the REQ_META flag to decide which workqueue they are placed on. This removes the need for a separate 128 byte allocation (typically rounded up to 192 bytes by slab) for all reads with a size increase of 24 bytes for struct btrfs_bio. Future patches will reorganize struct btrfs_bio to make use of this extra space for writes as well. (All sizes are based a on typical 64-bit non-debug build) Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/compression.c | 4 -- fs/btrfs/ctree.h | 4 +- fs/btrfs/disk-io.c | 120 +++---------------------------------------------- fs/btrfs/disk-io.h | 10 ----- fs/btrfs/inode.c | 24 +--------- fs/btrfs/super.c | 11 +---- fs/btrfs/volumes.c | 33 +++++++++++--- fs/btrfs/volumes.h | 3 ++ 8 files changed, 42 insertions(+), 167 deletions(-) commit 08a6f464342cc09b14680dcefb3c5eeac8a06aeb Author: Christoph Hellwig Date: Thu May 26 09:36:39 2022 +0200 btrfs: centralize setting REQ_META Set REQ_META in btrfs_submit_metadata_bio instead of the various callers. We'll start relying on this flag inside of btrfs in a bit, and this ensures it is always set correctly. Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 2 ++ fs/btrfs/extent_io.c | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) commit fed8a72df126fdf03bf6bd46d83be9ff3bd90892 Author: Christoph Hellwig Date: Thu May 26 09:36:38 2022 +0200 btrfs: don't use btrfs_bio_wq_end_io for compressed writes Compressed write bio completion is the only user of btrfs_bio_wq_end_io for writes, and the use of btrfs_bio_wq_end_io is a little suboptimal here as we only real need user context for the final completion of a compressed_bio structure, and not every single bio completion. Add a work_struct to struct compressed_bio instead and use that to call finish_compressed_bio_write. This allows to remove all handling of write bios in the btrfs_bio_wq_end_io infrastructure. Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/compression.c | 44 ++++++++++++++++++++++---------------------- fs/btrfs/compression.h | 7 +++++-- fs/btrfs/ctree.h | 2 +- fs/btrfs/disk-io.c | 30 ++++++++++++------------------ fs/btrfs/super.c | 2 -- 5 files changed, 40 insertions(+), 45 deletions(-) commit 02bb5b72470facec78e03cdea9f01ca8c7fe7835 Author: Christoph Hellwig Date: Thu May 26 09:36:37 2022 +0200 btrfs: don't double-defer bio completions for compressed reads The bio completion handler of the bio used for the compressed data is already run in a workqueue using btrfs_bio_wq_end_io, so don't schedule the completion of the original bio to the same workqueue again but just execute it directly. Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/inode.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d34e123de1e66061051cd19e61b62fad6027fc4a Author: Christoph Hellwig Date: Thu May 26 09:36:36 2022 +0200 btrfs: defer I/O completion based on the btrfs_raid_bio Instead of attaching an extra allocation an indirect call to each low-level bio issued by the RAID code, add a work_struct to struct btrfs_raid_bio and only defer the per-rbio completion action. The per-bio action for all the I/Os are trivial and can be safely done from interrupt context. As a nice side effect this also allows sharing the boilerplate code for the per-bio completions Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/disk-io.c | 12 +++---- fs/btrfs/disk-io.h | 1 - fs/btrfs/raid56.c | 102 +++++++++++++++++++++-------------------------------- fs/btrfs/raid56.h | 2 ++ 5 files changed, 47 insertions(+), 72 deletions(-) commit c93104e7588e04debb20bdc481e431f87748f3c1 Author: Christoph Hellwig Date: Thu May 26 09:36:35 2022 +0200 btrfs: split btrfs_submit_data_bio to read and write parts Split btrfs_submit_data_bio into one helper for reads and one for writes. Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 5 +- fs/btrfs/extent_io.c | 13 ++++-- fs/btrfs/inode.c | 130 ++++++++++++++++++++++++--------------------------- 3 files changed, 71 insertions(+), 77 deletions(-) commit e6484bd4881f340e04de6833230225ee3ba7ce6d Author: Christoph Hellwig Date: Thu May 26 09:36:34 2022 +0200 btrfs: simplify code flow in btrfs_submit_dio_bio There is no exit block and cleanup and the function is reasonably short so we can use inline return and not the goto. This makes the function more straight forward. Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit b4c46bdea96af1c79cfc0bcd0b387af311368145 Author: Christoph Hellwig Date: Thu May 26 09:36:33 2022 +0200 btrfs: move more work into btrfs_end_bioc Assign ->mirror_num and ->bi_status in btrfs_end_bioc instead of duplicating the logic in the callers. Also remove the bio argument as it always must be bioc->orig_bio and the now pointless bioc_error that did nothing but assign bi_sector to the same value just sampled in the caller. Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 72 +++++++++++++++++------------------------------------- 1 file changed, 22 insertions(+), 50 deletions(-) commit d6815592806f481244d0e3435ca1f5383d90a14c Author: Omar Sandoval Date: Thu Mar 17 10:25:43 2022 -0700 btrfs: send: enable support for stream v2 and compressed writes Now that the new support is implemented, allow the ioctl to accept v2 and the compressed flag, and update the version in sysfs. Signed-off-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/send.c | 7 +++++-- fs/btrfs/send.h | 2 +- include/uapi/linux/btrfs.h | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) commit 3ea4dc5bf00c7d16e17efe5b29c38ded0b6ffeef Author: Omar Sandoval Date: Thu Mar 17 10:25:42 2022 -0700 btrfs: send: send compressed extents with encoded writes Now that all of the pieces are in place, we can use the ENCODED_WRITE command to send compressed extents when appropriate. Signed-off-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/ctree.h | 6 ++ fs/btrfs/inode.c | 13 ++-- fs/btrfs/send.c | 232 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 226 insertions(+), 25 deletions(-) commit a4b333f2277b13eaf15b09235b243b8eda891d3d Author: Omar Sandoval Date: Mon Apr 4 10:29:07 2022 -0700 btrfs: send: get send buffer pages for protocol v2 For encoded writes in send v2, we will get the encoded data with btrfs_encoded_read_regular_fill_pages(), which expects a list of raw pages. To avoid extra buffers and copies, we should read directly into the send buffer. Therefore, we need the raw pages for the send buffer. We currently allocate the send buffer with kvmalloc(), which may return a kmalloc'd buffer or a vmalloc'd buffer. For vmalloc, we can get the pages with vmalloc_to_page(). For kmalloc, we could use virt_to_page(). However, the buffer size we use (144K) is not a power of two, which in theory is not guaranteed to return a page-aligned buffer, and in practice would waste a lot of memory due to rounding up to the next power of two. 144K is large enough that it usually gets allocated with vmalloc(), anyways. So, for send v2, replace kvmalloc() with vmalloc() and save the pages in an array. Signed-off-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/send.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) commit 356bbbb66bb1dbde45d36d0d29a9fa47fe3223c1 Author: Omar Sandoval Date: Thu Mar 17 10:25:40 2022 -0700 btrfs: send: write larger chunks when using stream v2 The length field of the send stream TLV header is 16 bits. This means that the maximum amount of data that can be sent for one write is 64K minus one. However, encoded writes must be able to send the maximum compressed extent (128K) in one command, or more. To support this, send stream version 2 encodes the DATA attribute differently: it has no length field, and the length is implicitly up to the end of containing command (which has a 32bit length field). Although this is necessary for encoded writes, normal writes can benefit from it, too. Also add a check to enforce that the DATA attribute is last. It is only strictly necessary for v2, but we might as well make v1 consistent with it. For v2, let's bump up the send buffer to the maximum compressed extent size plus 16K for the other metadata (144K total). Since this will most likely be vmalloc'd (and always will be after the next commit), we round it up to the next page since we might as well use the rest of the page on systems with >16K pages. Reviewed-by: Nikolay Borisov Signed-off-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/send.c | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) commit b7c14f23fb604fc66edae7514ed9b4b93930b5ba Author: Omar Sandoval Date: Thu Mar 17 10:25:39 2022 -0700 btrfs: send: add stream v2 definitions This adds the definitions of the new commands for send stream version 2 and their respective attributes: fallocate, FS_IOC_SETFLAGS (a.k.a. chattr), and encoded writes. It also documents two changes to the send stream format in v2: the receiver shouldn't assume a maximum command size, and the DATA attribute is encoded differently to allow for writes larger than 64k. These will be implemented in subsequent changes, and then the ioctl will accept the new version and flag. Reviewed-by: Josef Bacik Signed-off-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/send.c | 2 +- fs/btrfs/send.h | 40 ++++++++++++++++++++++++++++++++++++---- include/uapi/linux/btrfs.h | 7 +++++++ 3 files changed, 44 insertions(+), 5 deletions(-) commit 54cab6aff811d328c5add37e0faf32f6328741ea Author: Omar Sandoval Date: Thu Mar 17 10:25:38 2022 -0700 btrfs: send: explicitly number commands and attributes Commit e77fbf990316 ("btrfs: send: prepare for v2 protocol") added _BTRFS_SEND_C_MAX_V* macros equal to the maximum command number for the version plus 1, but as written this creates gaps in the number space. The maximum command number is currently 22, and __BTRFS_SEND_C_MAX_V1 is accordingly 23. But then __BTRFS_SEND_C_MAX_V2 is 24, suggesting that v2 has a command numbered 23, and __BTRFS_SEND_C_MAX is 25, suggesting that 23 and 24 are valid commands. Instead, let's explicitly number all of the commands, attributes, and sentinel MAX constants. Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/send.c | 4 +- fs/btrfs/send.h | 120 ++++++++++++++++++++++++++++---------------------------- 2 files changed, 61 insertions(+), 63 deletions(-) commit ca182acc53df2ab795354c535dfd966d0fa2ae8b Author: Omar Sandoval Date: Thu Mar 17 10:25:37 2022 -0700 btrfs: send: remove unused send_ctx::{total,cmd}_send_size We collect these statistics but have never exposed them in any way. I also didn't find any patches that ever attempted to make use of them. Signed-off-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/send.c | 4 ---- 1 file changed, 4 deletions(-) commit 22c55e3bbb20c60846812ea2b8ea0f3153c0df73 Author: Stefan Roesch Date: Tue Feb 8 11:31:22 2022 -0800 btrfs: sysfs: add force_chunk_alloc trigger to force allocation Adds write-only trigger to force new chunk allocation for a given block group type. It is at /sys/fs/btrfs//allocation//force_chunk_alloc Note: this is now only for debugging and testing and is enabled with the CONFIG_BTRFS_DEBUG configuration option. The transaction is started from sysfs context and can be problematic in some cases. Signed-off-by: Stefan Roesch Reviewed-by: David Sterba [ Changes from the original submission: - update changelog - drop unnecessary error messages - switch value to bool and use kstrtobool - move BTRFS_ATTR_W definition - add comment for using transaction ] Signed-off-by: David Sterba fs/btrfs/sysfs.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit 19fc516a516f624fa3b0c329929561186247537e Author: Stefan Roesch Date: Tue Feb 8 11:31:21 2022 -0800 btrfs: sysfs: export chunk size in space infos Add new sysfs knob /sys/fs/btrfs//allocation//chunk_size. This allows to query the chunk size and also set the chunk size. Constraints: - can be changed by root only - system chunk size can't be set - maximum chunk size is 10% of the filesystem size - final value is rounded down to a multiple of 256M - cannot be set on zoned filesystem Note, that rounding and the 10% clamp will result to a different value on filesystems smaller than 10G, typically 768M. Signed-off-by: Stefan Roesch Reviewed-by: David Sterba [ Changes to original submission: - document setting constraints - drop read-only requirement - drop unnecessary error messages - fix return values of _store callback - use memparse for the value - fix rounding down to 256M ] Signed-off-by: David Sterba fs/btrfs/sysfs.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit f6fca3917b4d99d8c13901738afec35f570a3c2f Author: Stefan Roesch Date: Tue Feb 8 11:31:20 2022 -0800 btrfs: store chunk size in space-info struct The chunk size is stored in the btrfs_space_info structure. It is initialized at the start and is then used. A new API is added to update the current chunk size. This API is used to be able to expose the chunk_size as a sysfs setting. Signed-off-by: Stefan Roesch Reviewed-by: David Sterba [ rename and merge helpers, switch atomic type to u64, style fixes ] Signed-off-by: David Sterba fs/btrfs/space-info.c | 32 ++++++++++++++++++++++++++++++++ fs/btrfs/space-info.h | 4 ++++ fs/btrfs/volumes.c | 28 +++++++++------------------- 3 files changed, 45 insertions(+), 19 deletions(-) commit 71b68e9e35827a3f0ba3742cd1b10c1fceea55d7 Author: Josef Bacik Date: Thu Jul 21 09:47:39 2022 -0400 btrfs: do not batch insert non-consecutive dir indexes during log replay While running generic/475 in a loop I got the following error BTRFS critical (device dm-11): corrupt leaf: root=5 block=31096832 slot=69, bad key order, prev (263 96 531) current (263 96 524) item 65 key (263 96 517) itemoff 14132 itemsize 33 item 66 key (263 96 523) itemoff 14099 itemsize 33 item 67 key (263 96 525) itemoff 14066 itemsize 33 item 68 key (263 96 531) itemoff 14033 itemsize 33 item 69 key (263 96 524) itemoff 14000 itemsize 33 As you can see here we have 3 dir index keys with the dir index value of 523, 524, and 525 inserted between 517 and 524. This occurs because our dir index insertion code will bulk insert all dir index items on the node regardless of their actual key value. This makes sense on a normally running system, because if there's a gap in between the items there was a deletion before the item was inserted, so there's not going to be an overlap of the dir index items that need to be inserted and what exists on disk. However during log replay this isn't necessarily true, we could have any number of dir indexes in the tree already. Fix this by seeing if we're replaying the log, and if we are simply skip batching if there's a gap in the key space. This file system was left broken from the fstest, I tested this patch against the broken fs to make sure it replayed the log properly, and then btrfs checked the file system after the log replay to verify everything was ok. Reviewed-by: Filipe Manana Reviewed-by: Sweet Tea Dorminy Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) commit 763748b238ef78bed183da40e02baaea50540036 Author: Filipe Manana Date: Wed Jun 22 10:37:45 2022 +0100 btrfs: reduce amount of reserved metadata for delayed item insertion Whenever we want to create a new dir index item (when creating an inode, create a hard link, rename a file) we reserve 1 unit of metadata space for it in a transaction (that's 256K for a node/leaf size of 16K), and then create a delayed insertion item for it to be added later to the subvolume's tree. That unit of metadata is kept until the delayed item is inserted into the subvolume tree, which may take a while to happen (in the worst case, it's done only when the transaction commits). If we have multiple dir index items to insert for the same directory, say N index items, and they all fit in a single leaf of metadata, then we are holding N units of reserved metadata space when all we need is 1 unit. This change addresses that, whenever a new delayed dir index item is added, we release the unit of metadata the caller has reserved when it started the transaction if adding that new dir index item does not result in touching one more metadata leaf, otherwise the reservation is kept by transferring it from the transaction block reserve to the delayed items block reserve, just like before. Given that with a leaf size of 16K we can have a few hundred dir index items in a single leaf (the exact value depends on file name lengths), this reduces pressure on metadata reservation by releasing unnecessary space much sooner. The following fs_mark test showed some improvement when creating many files in parallel on machine running a non debug kernel (debian's default kernel config) with 12 cores: $ cat test.sh #!/bin/bash DEV=/dev/nvme0n1 MNT=/mnt/nvme0n1 MOUNT_OPTIONS="-o ssd" FILES=100000 THREADS=$(nproc --all) echo "performance" | \ tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor mkfs.btrfs -f $DEV mount $MOUNT_OPTIONS $DEV $MNT OPTS="-S 0 -L 10 -n $FILES -s 0 -t $THREADS -k" for ((i = 1; i <= $THREADS; i++)); do OPTS="$OPTS -d $MNT/d$i" done fs_mark $OPTS umount $MNT Before: FSUse% Count Size Files/sec App Overhead 2 1200000 0 225991.3 5465891 4 2400000 0 345728.1 5512106 4 3600000 0 346959.5 5557653 8 4800000 0 329643.0 5587548 8 6000000 0 312657.4 5606717 8 7200000 0 281707.5 5727985 12 8400000 0 88309.8 5020422 12 9600000 0 85835.9 5207496 16 10800000 0 81039.2 5404964 16 12000000 0 58548.6 5842468 After: FSUse% Count Size Files/sec App Overhead 2 1200000 0 230604.5 5778375 4 2400000 0 348908.3 5508072 4 3600000 0 357028.7 5484337 6 4800000 0 342898.3 5565703 6 6000000 0 314670.8 5751555 8 7200000 0 282548.2 5778177 12 8400000 0 90844.9 5306819 12 9600000 0 86963.1 5304689 16 10800000 0 89113.2 5455248 16 12000000 0 86693.5 5518933 The "after" results are after applying this patch and all the other patches in the same patchset, which is comprised of the following changes: btrfs: balance btree dirty pages and delayed items after a rename btrfs: free the path earlier when creating a new inode btrfs: balance btree dirty pages and delayed items after clone and dedupe btrfs: add assertions when deleting batches of delayed items btrfs: deal with deletion errors when deleting delayed items btrfs: refactor the delayed item deletion entry point btrfs: improve batch deletion of delayed dir index items btrfs: assert that delayed item is a dir index item when adding it btrfs: improve batch insertion of delayed dir index items btrfs: do not BUG_ON() on failure to reserve metadata for delayed item btrfs: set delayed item type when initializing it btrfs: reduce amount of reserved metadata for delayed item insertion Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 157 ++++++++++++++++++++++++++++++++++++++++++----- fs/btrfs/delayed-inode.h | 11 ++++ 2 files changed, 154 insertions(+), 14 deletions(-) commit c9d02ab4b436cd6a40e772b0b727a8de6cea9d4a Author: Filipe Manana Date: Tue May 31 16:06:42 2022 +0100 btrfs: set delayed item type when initializing it Currently we set the type of a delayed item only after successfully inserting it into its respective rbtree. This is fine, as the type is not used anywhere before that point, but for the next patch in the series, there will be the need to check the type of a delayed item before inserting it into a rbtree. So set the type of a delayed item immediately after allocating it. This also makes the trivial wrappers for adding insertion and deletion useless, so it removes them as well. Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) commit 3bae13e9d42eae0fea7afd6a9aea6b4fe81770ad Author: Filipe Manana Date: Tue May 31 16:06:41 2022 +0100 btrfs: do not BUG_ON() on failure to reserve metadata for delayed item At btrfs_insert_delayed_dir_index(), we don't expect the metadata reservation for the delayed dir index item insertion to fail, because the caller is supposed to have reserved 1 unit of metadata space for that. All callers are able to deal with an error in case that happens, so there is no need for something so drastic as a BUG_ON() in case of failure. Instead just emit a warning, so that's easily noticed during development (fstests in particular), and return the error to the caller. Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 06ac264f3fe56daaadf0bd4fca5910859d34f611 Author: Filipe Manana Date: Tue May 31 16:06:40 2022 +0100 btrfs: improve batch insertion of delayed dir index items Currently we group delayed dir index items for insertion as a single batch (a single btree operation) as long as their keys are sequential in the key space. For example we have delayed index items for the following index keys: 10, 11, 12, 15, 16, 20, 21 We end up building three batches: 1) First one for index keys 10, 11 and 12; 2) Second one for index keys 15 and 16; 3) Third one for index keys 20 and 21. However, since the dir index numbers come from a monotonically increasing counter and are never reused, we could group all these items into a single batch. The existence of holes in the sequence happens only when we had delayed dir index items for insertion that got deleted before they were flushed to the subvolume's tree. The delayed items are stored in a rbtree based on their key order, so we can just group items into a batch as long as they all fit in a leaf, and ignore if there's a gap (key offset, index number) between two consecutive items. This is more efficient and reduces the amount of time spent when running delayed items if there are gaps between dir index items. For example running the following test script: $ cat test.sh #!/bin/bash DEV=/dev/sdj MNT=/mnt/sdj mkfs.btrfs -f $DEV mount $DEV $MNT NUM_FILES=100 mkdir $MNT/testdir for ((i = 1; i <= $NUM_FILES; i++)); do echo -n > $MNT/testdir/file_$i done # Now delete every other file, to create gaps in the dir index keys. for ((i = 1; i <= $NUM_FILES; i += 2)); do rm -f $MNT/testdir/file_$i done start=$(date +%s%N) sync end=$(date +%s%N) dur=$(( (end - start) / 1000000 )) echo -e "\nsync took $dur milliseconds" umount $MNT While having the following bpftrace script running in another shell: $ cat bpf-delayed-items-inserts.sh #!/usr/bin/bpftrace /* Must add 'noinline' to btrfs_insert_delayed_items(). */ k:btrfs_insert_delayed_items { @start_insert_delayed_items[tid] = nsecs; } k:btrfs_insert_empty_items /@start_insert_delayed_items[tid]/ { @insert_batches = count(); } kr:btrfs_insert_delayed_items /@start_insert_delayed_items[tid]/ { $dur = (nsecs - @start_insert_delayed_items[tid]) / 1000; @btrfs_insert_delayed_items_total_time = sum($dur); delete(@start_insert_delayed_items[tid]); } Before this change: @btrfs_insert_delayed_items_total_time: 576 @insert_batches: 51 After this change: @btrfs_insert_delayed_items_total_time: 174 @insert_batches: 2 Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit a176affe547ce852ebd458ac48a4c5764ad06441 Author: Filipe Manana Date: Tue May 31 16:06:39 2022 +0100 btrfs: assert that delayed item is a dir index item when adding it All delayed items are for dir index items, we don't support any other item types at the moment. So simplify __btrfs_add_delayed_item() and add an assertion for checking the item's key type. This also allows the next change to be simpler and avoid to check key types. In case we add support for different item types in the future, then we'll hit the assertion during development and be able to adjust any code that is assuming delayed items are always associated to dir index items. Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 4bd02d901212359438db735e79dbb45c054a91d4 Author: Filipe Manana Date: Tue May 31 16:06:38 2022 +0100 btrfs: improve batch deletion of delayed dir index items Currently we group delayed dir index items for deletion in a single batch (single btree operation) as long as they all exist in the same leaf and as long as their keys are sequential in the key space. For example if we have a leaf that has dir index items with offsets: 2, 3, 4, 6, 7, 10 And we have delayed dir index items for deleting all these indexes, and no delayed items for any other index keys in between, then we end up deleting in 3 batches: 1) First batch for indexes 2, 3 and 4; 2) Second batch for indexes 6 and 7; 3) Third batch for index 10. This is a waste because we can delete all the index keys in a single batch. What matters is that each consecutive delayed index key matches each consecutive dir index key in a leaf. So update the logic at btrfs_batch_delete_items() to check only for a key match between delayed dir index items and dir index items in a leaf. Also avoid the useless first iteration on comparing the key of the first slot to delete with the key of the first delayed item, as it's silly since they always match, as the delayed item's key was used for the btree search that gave us the path we have. This is more efficient and reduces runtime of running delayed items, as well as lock contention on the subvolume's tree. For example, the following test script: $ cat test.sh #!/bin/bash DEV=/dev/sdj MNT=/mnt/sdj mkfs.btrfs -f $DEV mount $DEV $MNT NUM_FILES=1000 mkdir $MNT/testdir for ((i = 1; i <= $NUM_FILES; i++)); do echo -n > $MNT/testdir/file_$i done # Now delete every other file, to create gaps in the dir index keys. for ((i = 1; i <= $NUM_FILES; i += 2)); do rm -f $MNT/testdir/file_$i done # Sync to force any delayed items to be flushed to the tree. sync start=$(date +%s%N) rm -fr $MNT/testdir end=$(date +%s%N) dur=$(( (end - start) / 1000000 )) echo -e "\nrm -fr took $dur milliseconds" umount $MNT Running that test script while having the following bpftrace script running in another shell: $ cat bpf-measure.sh #!/usr/bin/bpftrace /* Add 'noinline' to btrfs_delete_delayed_items()'s definition. */ k:btrfs_delete_delayed_items { @start_delete_delayed_items[tid] = nsecs; } k:btrfs_del_items /@start_delete_delayed_items[tid]/ { @delete_batches = count(); } kr:btrfs_delete_delayed_items /@start_delete_delayed_items[tid]/ { $dur = (nsecs - @start_delete_delayed_items[tid]) / 1000; @btrfs_delete_delayed_items_total_time = sum($dur); delete(@start_delete_delayed_items[tid]); } Before this change: @btrfs_delete_delayed_items_total_time: 9563 @delete_batches: 1001 After this change: @btrfs_delete_delayed_items_total_time: 7328 @delete_batches: 509 Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 60 ++++++++++++++++++++---------------------------- 1 file changed, 25 insertions(+), 35 deletions(-) commit 36baa2c75121651710d68ab7fc3abc072fb408bd Author: Filipe Manana Date: Tue May 31 16:06:37 2022 +0100 btrfs: refactor the delayed item deletion entry point The delayed item deletion entry point, btrfs_delete_delayed_items(), is a bit convoluted for a few reasons: 1) It's really a loop disguised with labels and goto statements; 2) There's a 'delete_fail' label which isn't only for error cases, we can jump to that label even if no error happened, if we simply don't have more delayed items to delete; 3) Unnecessarily keeps track of the current and previous items for no good reason, as after getting the next item and releasing the current one, it just jumps to the 'again' label just to look again for the first delayed item; 4) When a delayed item is not in the tree (because it was already deleted before), it releases the item while holding a path locked, which is not necessary and adds more contention to the tree, specially taking into account that the path came from a deletion search, meaning we have write locks for nodes at levels 2, 1 and 0. And releasing the item is not computationally trivial (rb tree deletion, a kfree() and some trivial things). So refactor it to use a while loop and add some comments to make it more obvious why we can have delayed items without a matching item in the tree as well as why not keep the delayed node locked all the time when running all its deletion items. This is also a preparation for some upcoming work involving delayed items. Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 71 ++++++++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 32 deletions(-) commit 2b1d260de14064606601f2e125cb8627ffeecd7e Author: Filipe Manana Date: Tue May 31 16:06:36 2022 +0100 btrfs: deal with deletion errors when deleting delayed items Currently, btrfs_delete_delayed_items() ignores any errors returned from btrfs_batch_delete_items(). This looks fishy but it's not a problem at the moment because: 1) Two of the errors returned from btrfs_batch_delete_items() are for impossible cases, cases where a delayed item does not match any item in the leaf the path points to - btrfs_delete_delayed_items() always calls btrfs_batch_delete_items() with a path that points to a leaf that contains an item matching a delayed item; 2) btrfs_batch_delete_items() may return an error from btrfs_del_items(), in which case it does not release the delayed items of the batch. At the moment this is harmless because btrfs_del_items() actually is always able to delete items, even if it returns an error - when it returns an error it's because it ended up with a leaf mostly empty (less than 1/3 full) and failed to migrate items from that leaf into its neighbour leaves - this is not critical, as all the items were deleted, we just left the tree a bit unbalanced, but it's still a valid tree and causes no harm, and future operations on the tree will eventually balance it. So even if we get an error from btrfs_del_items(), the delayed items will not be released but the next time we run delayed items we will find out, at btrfs_delete_delayed_items(), that they are not present in the tree anymore and then release them. This is all a bit subtle, and it's certainly prone to be a disaster in case btrfs_del_items() changes one day and may return errors before being able to delete all the requested items, in which case we could leave the filesystem in an inconsistent state as we would commit a transaction despite a failure from deleting items from the tree. So make btrfs_delete_delayed_items() check for any errors from the call to btrfs_batch_delete_items(). Reviewed-by: Anand Jain Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 659192e668d32f9bfde04ddff6c1914ee24183ce Author: Filipe Manana Date: Tue May 31 16:06:35 2022 +0100 btrfs: add assertions when deleting batches of delayed items There are a few impossible cases that btrfs_batch_delete_items() tries to deal with: 1) Getting a path pointing to a NULL leaf; 2) The leaf slot is pointing beyond the last item in the leaf; 3) We can't find a single item to delete. The first case is impossible because the given path was returned by a successful call to btrfs_search_slot(). Replace the BUG_ON() with an ASSERT for this. The second case is impossible because we are always called when a delayed item matches an item in the given leaf. So add an ASSERT() for that and if that condition is not satisfied, trigger a warning and return an error. The third case is impossible exactly because of the same reason as the second case. The given delayed item matches one item in the leaf, so we know that our batch always has at least one item. Add an ASSERT to check that, trigger a warning if that expectation fails and return an error. Reviewed-by: Anand Jain Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 6fe81a3a3ac823e4be715c87657b9894d809fa95 Author: Filipe Manana Date: Tue May 31 16:06:34 2022 +0100 btrfs: balance btree dirty pages and delayed items after clone and dedupe When reflinking extents (clone and deduplication), we need to touch the btree of the destination inode's subvolume, as well as potentially create a delayed inode for the destination inode (if it was not created before). However we are neither balancing the btree dirty pages nor the delayed items after such operations, so if we have a task that is doing a long series of clone or deduplication operations, it can result in accumulation of too many btree dirty pages and delayed items. So just call btrfs_btree_balance_dirty() after clone and deduplication, just like we do for every other system call that results on modifying a btree and adding delayed items. Reviewed-by: Anand Jain Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/reflink.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 814e77182b883702de7ce19854bbffae9cd4756b Author: Filipe Manana Date: Tue May 31 16:06:33 2022 +0100 btrfs: free the path earlier when creating a new inode When creating an inode, through btrfs_create_new_inode(), we release the path we allocated before once we don't need it anymore. But we keep it allocated until we return from that function, which is wasteful because after we release the path we do several things that can allocate yet another path: inheriting properties, setting the xattrs used by ACLs and secutiry modules, adding an orphan item (O_TMPFILE case) or adding a dir item (for the non-O_TMPFILE case). So instead of releasing the path once we don't need it anymore, free it instead. This way we avoid having two paths allocated until we return from btrfs_create_new_inode(). Reviewed-by: Nikolay Borisov Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit ca6dee6b7946794fa340a7290ca399a50b61705f Author: Filipe Manana Date: Tue May 31 16:06:32 2022 +0100 btrfs: balance btree dirty pages and delayed items after a rename A rename operation modifies a subvolume's btree, to remove the old dir item, add the new dir item, remove an inode ref and add a new inode ref. It can also create the delayed inode for the inodes involved in the operation, and it creates two delayed dir index items, one to delete the old name and another one to add the new name. However we are neither balancing the btree dirty pages nor the delayed items after a rename, which can result in accumulation of too many btree dirty pages and delayed items, specially if a task is doing a series of rename operations (for example it can happen for package installations/upgrades through the zypper tool). So just call btrfs_btree_balance_dirty() after a rename, just like we do for every other system call that results on modifying a btree and adding delayed items. Reviewed-by: Anand Jain Reviewed-by: Nikolay Borisov Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit b8bea09a456fc31af8f10029e69d105cac7e530e Author: Qu Wenruo Date: Wed Jun 1 17:46:59 2022 +0800 btrfs: add trace event for submitted RAID56 bio Add tracepoint for better insight to how the RAID56 data are submitted. The output looks like this: (trace event header and UUID skipped) raid56_read_partial: full_stripe=389152768 devid=3 type=DATA1 offset=32768 opf=0x0 physical=323059712 len=32768 raid56_read_partial: full_stripe=389152768 devid=1 type=DATA2 offset=0 opf=0x0 physical=67174400 len=65536 raid56_write_stripe: full_stripe=389152768 devid=3 type=DATA1 offset=0 opf=0x1 physical=323026944 len=32768 raid56_write_stripe: full_stripe=389152768 devid=2 type=PQ1 offset=0 opf=0x1 physical=323026944 len=32768 The above debug output is from a 32K data write into an empty RAID56 data chunk. Some explanation on the event output: full_stripe: the logical bytenr of the full stripe devid: btrfs devid type: raid stripe type. DATA1: the first data stripe DATA2: the second data stripe PQ1: the P stripe PQ2: the Q stripe offset: the offset inside the stripe. opf: the bio op type physical: the physical offset the bio is for len: the length of the bio The first two lines are from partial RMW read, which is reading the remaining data stripes from disks. The last two lines are for full stripe RMW write, which is writing the involved two 16K stripes (one for DATA1 stripe, one for P stripe). The stripe for DATA2 doesn't need to be written. There are 5 types of trace events: - raid56_read_partial Read remaining data for regular read/write path. - raid56_write_stripe Write the modified stripes for regular read/write path. - raid56_scrub_read_recover Read remaining data for scrub recovery path. - raid56_scrub_write_stripe Write the modified stripes for scrub path. - raid56_scrub_read Read remaining data for scrub path. Also, since the trace events are included at super.c, we have to export needed structure definitions to 'raid56.h' and include the header in super.c, or we're unable to access those members. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba [ reformat comments ] Signed-off-by: David Sterba fs/btrfs/raid56.c | 190 +++++++++++++------------------------------ fs/btrfs/raid56.h | 148 ++++++++++++++++++++++++++++++++- fs/btrfs/super.c | 1 + include/trace/events/btrfs.h | 94 +++++++++++++++++++++ 4 files changed, 300 insertions(+), 133 deletions(-) commit 4d10046613333508d31fe926c545c8c0b620508a Author: Qu Wenruo Date: Wed Jun 1 13:54:28 2022 +0800 btrfs: update stripe_sectors::uptodate in steal_rbio [BUG] With added debugging, it turns out the following write sequence would cause extra read which is unnecessary: # xfs_io -f -s -c "pwrite -b 32k 0 32k" -c "pwrite -b 32k 32k 32k" \ -c "pwrite -b 32k 64k 32k" -c "pwrite -b 32k 96k 32k" \ $mnt/file The debug message looks like this (btrfs header skipped): partial rmw, full stripe=389152768 opf=0x0 devid=3 type=1 offset=32768 physical=323059712 len=32768 partial rmw, full stripe=389152768 opf=0x0 devid=1 type=2 offset=0 physical=67174400 len=65536 full stripe rmw, full stripe=389152768 opf=0x1 devid=3 type=1 offset=0 physical=323026944 len=32768 full stripe rmw, full stripe=389152768 opf=0x1 devid=2 type=-1 offset=0 physical=323026944 len=32768 partial rmw, full stripe=298844160 opf=0x0 devid=1 type=1 offset=32768 physical=22052864 len=32768 partial rmw, full stripe=298844160 opf=0x0 devid=2 type=2 offset=0 physical=277872640 len=65536 full stripe rmw, full stripe=298844160 opf=0x1 devid=1 type=1 offset=0 physical=22020096 len=32768 full stripe rmw, full stripe=298844160 opf=0x1 devid=3 type=-1 offset=0 physical=277872640 len=32768 partial rmw, full stripe=389152768 opf=0x0 devid=3 type=1 offset=0 physical=323026944 len=32768 partial rmw, full stripe=389152768 opf=0x0 devid=1 type=2 offset=0 physical=67174400 len=65536 ^^^^ Still partial read, even 389152768 is already cached by the first. write. full stripe rmw, full stripe=389152768 opf=0x1 devid=3 type=1 offset=32768 physical=323059712 len=32768 full stripe rmw, full stripe=389152768 opf=0x1 devid=2 type=-1 offset=32768 physical=323059712 len=32768 partial rmw, full stripe=298844160 opf=0x0 devid=1 type=1 offset=0 physical=22020096 len=32768 partial rmw, full stripe=298844160 opf=0x0 devid=2 type=2 offset=0 physical=277872640 len=65536 ^^^^ Still partial read for 298844160. full stripe rmw, full stripe=298844160 opf=0x1 devid=1 type=1 offset=32768 physical=22052864 len=32768 full stripe rmw, full stripe=298844160 opf=0x1 devid=3 type=-1 offset=32768 physical=277905408 len=32768 This means every 32K writes, even they are in the same full stripe, still trigger read for previously cached data. This would cause extra RAID56 IO, making the btrfs raid56 cache useless. [CAUSE] Commit d4e28d9b5f04 ("btrfs: raid56: make steal_rbio() subpage compatible") tries to make steal_rbio() subpage compatible, but during that conversion, there is one thing missing. We no longer rely on PageUptodate(rbio->stripe_pages[i]), but rbio->stripe_nsectors[i].uptodate to determine if a sector is uptodate. This means, previously if we switch the pointer, everything is done, as the PageUptodate flag is still bound to that page. But now we have to manually mark the involved sectors uptodate, or later raid56_rmw_stripe() will find the stolen sector is not uptodate, and assemble the read bio for it, wasting IO. [FIX] We can easily fix the bug, by also update the rbio->stripe_sectors[].uptodate in steal_rbio(). With this fixed, now the same write pattern no longer leads to the same unnecessary read: partial rmw, full stripe=389152768 opf=0x0 devid=3 type=1 offset=32768 physical=323059712 len=32768 partial rmw, full stripe=389152768 opf=0x0 devid=1 type=2 offset=0 physical=67174400 len=65536 full stripe rmw, full stripe=389152768 opf=0x1 devid=3 type=1 offset=0 physical=323026944 len=32768 full stripe rmw, full stripe=389152768 opf=0x1 devid=2 type=-1 offset=0 physical=323026944 len=32768 partial rmw, full stripe=298844160 opf=0x0 devid=1 type=1 offset=32768 physical=22052864 len=32768 partial rmw, full stripe=298844160 opf=0x0 devid=2 type=2 offset=0 physical=277872640 len=65536 full stripe rmw, full stripe=298844160 opf=0x1 devid=1 type=1 offset=0 physical=22020096 len=32768 full stripe rmw, full stripe=298844160 opf=0x1 devid=3 type=-1 offset=0 physical=277872640 len=32768 ^^^ No more partial read, directly into the write path. full stripe rmw, full stripe=389152768 opf=0x1 devid=3 type=1 offset=32768 physical=323059712 len=32768 full stripe rmw, full stripe=389152768 opf=0x1 devid=2 type=-1 offset=32768 physical=323059712 len=32768 full stripe rmw, full stripe=298844160 opf=0x1 devid=1 type=1 offset=32768 physical=22052864 len=32768 full stripe rmw, full stripe=298844160 opf=0x1 devid=3 type=-1 offset=32768 physical=277905408 len=32768 Fixes: d4e28d9b5f04 ("btrfs: raid56: make steal_rbio() subpage compatible") Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/raid56.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit 21a8935ead31c09a8ecb06e3b7a5289a630645ac Author: David Sterba Date: Wed Jun 1 13:47:54 2022 +0200 btrfs: remove redundant calls to flush_dcache_page Both memzero_page and memcpy_to_page already call flush_dcache_page so we can remove the calls from btrfs code. Reviewed-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/compression.c | 2 -- fs/btrfs/extent_io.c | 7 +------ fs/btrfs/inode.c | 6 ++---- fs/btrfs/reflink.c | 5 +---- 4 files changed, 4 insertions(+), 16 deletions(-) commit bd8f7e627703ca5707833d623efcd43f104c7b3f Author: Qu Wenruo Date: Fri May 27 15:28:19 2022 +0800 btrfs: only write the sectors in the vertical stripe which has data stripes If we have only 8K partial write at the beginning of a full RAID56 stripe, we will write the following contents: 0 8K 32K 64K Disk 1 (data): |XX| | | Disk 2 (data): | | | Disk 3 (parity): |XXXXXXXXXXXXXXX|XXXXXXXXXXXXXXX| |X| means the sector will be written back to disk. Note that, although we won't write any sectors from disk 2, but we will write the full 64KiB of parity to disk. This behavior is fine for now, but not for the future (especially for RAID56J, as we waste quite some space to journal the unused parity stripes). So here we will also utilize the btrfs_raid_bio::dbitmap, anytime we queue a higher level bio into an rbio, we will update rbio::dbitmap to indicate which vertical stripes we need to writeback. And at finish_rmw(), we also check dbitmap to see if we need to write any sector in the vertical stripe. So after the patch, above example will only lead to the following writeback pattern: 0 8K 32K 64K Disk 1 (data): |XX| | | Disk 2 (data): | | | Disk 3 (parity): |XX| | | Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 4 deletions(-) commit 381b9b4c9cf968c3154d1bad736d11559a38f1c9 Author: Qu Wenruo Date: Fri May 27 15:28:18 2022 +0800 btrfs: use integrated bitmaps for scrub_parity::dbitmap and ebitmap Previously we use "unsigned long *" for those two bitmaps. But since we only support fixed stripe length (64KiB, already checked in tree-checker), "unsigned long *" is really a waste of memory, while we can just use "unsigned long". This saves us 8 bytes in total for scrub_parity. To be extra safe, add an ASSERT() making sure calclulated @nsectors is always smaller than BITS_PER_LONG. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/scrub.c | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) commit c67c68eb57f1343dd7e315156ff0334ab72158fd Author: Qu Wenruo Date: Fri May 27 15:28:17 2022 +0800 btrfs: use integrated bitmaps for btrfs_raid_bio::dbitmap and finish_pbitmap Previsouly we use "unsigned long *" for those two bitmaps. But since we only support fixed stripe length (64KiB, already checked in tree-checker), "unsigned long *" is really a waste of memory, while we can just use "unsigned long". This saves us 8 bytes in total for btrfs_raid_bio. To be extra safe, add an ASSERT() making sure calculated @stripe_nsectors is always smaller than BITS_PER_LONG. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit 099aa97213fa99ee5ce8e35c3e9f0ec150517609 Author: Nikolay Borisov Date: Thu May 5 10:08:25 2022 +0300 btrfs: use btrfs_try_lock_balance in btrfs_ioctl_balance This eliminates 2 labels and makes the code generally more streamlined. Also rename the 'out_bargs' label to 'out_unlock' since bargs is going to be freed under the 'out' label. This also fixes a memory leak since bargs wasn't correctly freed in one of the condition which are now moved in btrfs_try_lock_balance. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ioctl.c | 51 +++++---------------------------------------------- 1 file changed, 5 insertions(+), 46 deletions(-) commit 7fb10ed89e95e26f5f81087a75f2a4bfa43b1705 Author: Nikolay Borisov Date: Tue May 3 11:36:36 2022 +0300 btrfs: introduce btrfs_try_lock_balance This function contains the factored out locking sequence of btrfs_ioctl_balance. Having this piece of code separate helps to simplify btrfs_ioctl_balance which has too complicated. This will be used in the next patch to streamline the logic in btrfs_ioctl_balance. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ioctl.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit 1e87770cb35c0757ef72939c0e83a03de3f8fdc7 Author: Christoph Hellwig Date: Sun May 22 13:47:54 2022 +0200 btrfs: use btrfs_bio_for_each_sector in btrfs_check_read_dio_bio Use the new btrfs_bio_for_each_sector iterator to simplify btrfs_check_read_dio_bio. Reviewed-by: Qu Wenruo Reviewed-by: Nikolay Borisov Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 56 ++++++++++++++++++++++---------------------------------- 1 file changed, 22 insertions(+), 34 deletions(-) commit 261d812b04ef82808d25c0e07c8487d82ce18e4e Author: Qu Wenruo Date: Sun May 22 13:47:53 2022 +0200 btrfs: add a helper to iterate through a btrfs_bio with sector sized chunks Add a helper that works similar to __bio_for_each_segment, but instead of iterating over PAGE_SIZE chunks it iterates over each sector. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo [hch: split from a larger patch, and iterate over the offset instead of the offset bits] Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba [ add parameter comments ] Signed-off-by: David Sterba fs/btrfs/volumes.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit a89ce08ce63808308bb41a087860c245f136928a Author: Christoph Hellwig Date: Sun May 22 13:47:52 2022 +0200 btrfs: factor out a btrfs_csum_ptr helper Add a helper to find the csum for a byte offset into the csum buffer. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/ctree.h | 8 ++++++++ fs/btrfs/inode.c | 13 +++---------- 2 files changed, 11 insertions(+), 10 deletions(-) commit 97861cd1660de638e6fd588030afe8965ebfbe90 Author: Christoph Hellwig Date: Sun May 22 13:47:51 2022 +0200 btrfs: refactor end_bio_extent_readpage code flow Untangle the goto and move the code it jumps to so it goes in the order of the most likely states first. Reviewed-by: Nikolay Borisov Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba fs/btrfs/extent_io.c | 86 ++++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 46 deletions(-) commit a5aa7ab6e77b2267638dec6a9522b57421522d8c Author: Christoph Hellwig Date: Sun May 22 13:47:50 2022 +0200 btrfs: factor out a helper to end a single sector buffer I/O Add a helper to end I/O on a single sector, which will come in handy with the new read repair code. Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Reviewed-by: Nikolay Borisov Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit fd5a6f63cb29dd2c75e59c6dd60650f398855ecf Author: Qu Wenruo Date: Sun May 22 13:47:49 2022 +0200 btrfs: remove duplicated parameters from submit_data_read_repair() The function submit_data_read_repair() is only called for buffered data read path, thus those members can be calculated using bvec directly: - start start = page_offset(bvec->bv_page) + bvec->bv_offset; - end end = start + bvec->bv_len - 1; - page page = bvec->bv_page; - pgoff pgoff = bvec->bv_offset; Thus we can safely replace those 4 parameters with just one bio_vec. Also remove the unused return value. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo [hch: also remove the return value] Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba fs/btrfs/extent_io.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit ae643a74ebdb150b004601d0d5fe5a1faba9b04d Author: Qu Wenruo Date: Sun May 22 13:47:48 2022 +0200 btrfs: introduce a data checksum checking helper Although we have several data csum verification code, we never have a function really just to verify checksum for one sector. Function check_data_csum() do extra work for error reporting, thus it requires a lot of extra things like file offset, bio_offset etc. Function btrfs_verify_data_csum() is even worse, it will utilize page checked flag, which means it can not be utilized for direct IO pages. Here we introduce a new helper, btrfs_check_sector_csum(), which really only accept a sector in page, and expected checksum pointer. We use this function to implement check_data_csum(), and export it for incoming patch. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo [hch: keep passing the csum array as an arguments, as the callers want to print it, rename per request] Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/compression.c | 13 ++++--------- fs/btrfs/ctree.h | 2 ++ fs/btrfs/inode.c | 38 ++++++++++++++++++++++++++++---------- 3 files changed, 34 insertions(+), 19 deletions(-) commit b036f47996c5c9b4926d47f31bcd156e16c53617 Author: Qu Wenruo Date: Sun May 22 13:47:47 2022 +0200 btrfs: quit early if the fs has no RAID56 support for raid56 related checks The following functions do special handling for RAID56 chunks: - btrfs_is_parity_mirror() Check if the range is in RAID56 chunks. - btrfs_full_stripe_len() Either return sectorsize for non-RAID56 profiles or full stripe length for RAID56 chunks. But if a filesystem without any RAID56 chunks, it will not have RAID56 incompat flags, and we can skip the chunk tree looking up completely. Reviewed-by: Nikolay Borisov Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1280d2d1651bf47a7084538976effa70ee75293c Author: Fanjun Kong Date: Thu May 26 22:35:40 2022 +0800 btrfs: use PAGE_ALIGNED instead of IS_ALIGNED The already provides the PAGE_ALIGNED macro. Let's use it instead of IS_ALIGNED and passing PAGE_SIZE directly. Reviewed-by: Muchun Song Reviewed-by: Nikolay Borisov Signed-off-by: Fanjun Kong Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 2 +- fs/btrfs/inode.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 31f37269802b7d2ce5ec98240b801948345809b4 Author: Pankaj Raghav Date: Tue May 17 20:45:32 2022 +0200 btrfs: zoned: fix comment description for sb_write_pointer logic Fix the comment to represent the actual logic used for sb_write_pointer - Empty[0] && In use[1] should be an invalid state instead of returning zone 0 wp - Empty[0] && Full[1] should be returning zone 0 wp instead of zone 1 wp - In use[0] && Empty[1] should be returning zone 0 wp instead of being an invalid state - In use[0] && Full[1] should be returning zone 0 wp instead of returning zone 1 wp - Full[0] && Empty[1] should be returning zone 1 wp instead of returning zone 0 wp - Full[0] && In use[1] should be returning zone 1 wp instead of returning zone 0 wp Reviewed-by: Johannes Thumshirn Signed-off-by: Pankaj Raghav Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/zoned.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 143823cf4d5a36cb8c83f5a6adb291bc45f40bc3 Author: David Sterba Date: Wed May 25 16:27:25 2022 +0200 btrfs: fix typos in comments Codespell has found a few typos. Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/disk-io.c | 2 +- fs/btrfs/inode.c | 2 +- fs/btrfs/ordered-data.c | 4 ++-- fs/btrfs/raid56.c | 2 +- fs/btrfs/space-info.c | 2 +- fs/btrfs/subpage.c | 2 +- fs/btrfs/super.c | 2 +- fs/btrfs/sysfs.c | 2 +- fs/btrfs/tree-log.c | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) commit 6923397cb72230da9a0139418e2b1410ebb25834 Author: Ian Rogers Date: Mon Jul 18 09:43:12 2022 -0700 perf test: Add test for #system_tsc_freq in metrics The value should be non-zero on Intel while zero on everything else. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20220718164312.3994191-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/expr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 1276ade6a5b6fac50ea43962af85ce6e444b4025 Author: Ian Rogers Date: Mon Jul 18 09:43:11 2022 -0700 perf tsc: Add cpuinfo fall back for arch_get_tsc_freq() The CPUID method of arch_get_tsc_freq fails for older Intel processors, such as Skylake. Compute using /proc/cpuinfo. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20220718164312.3994191-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/tsc.c | 52 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 4 deletions(-) commit bc2373a58aacb241bf135b9a7452a1499d0d457e Author: Kan Liang Date: Mon Jul 18 09:43:10 2022 -0700 perf tsc: Add arch TSC frequency information The TSC frequency information is required for the event metrics with the literal, system_tsc_freq. For the newer Intel platform, the TSC frequency information can be retrieved from the CPUID leaf 0x15. If the TSC frequency information isn't present the /proc/cpuinfo approach is used. Refactor cpuid() for this use. Note, the previous stack pushing/popping approach was broken on x86-64 that has stack red zones that would be clobbered. Committer testing: Before: $ perf record sleep 0.0001 [ perf record: Woken up 1 times to write data ] $ perf report --header-only |& grep cpuid # cpuid : AuthenticAMD,25,33,0 $ After the patch: $ perf record sleep 0.0001 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.002 MB perf.data (8 samples) ] $ perf report --header-only |& grep cpuid # cpuid : AuthenticAMD,25,33,0 $ Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andi Kleen Cc: Caleb Biggers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kshipra Bopardikar Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20220718164312.3994191-2-irogers@google.com Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/cpuid.h | 34 ++++++++++++++++++++++++++++++++++ tools/perf/arch/x86/util/header.c | 27 +++++++++++---------------- tools/perf/arch/x86/util/tsc.c | 33 +++++++++++++++++++++++++++++++++ tools/perf/util/expr.c | 13 +++++++++++++ tools/perf/util/tsc.h | 1 + 5 files changed, 92 insertions(+), 16 deletions(-) commit 10c4c5279b76ecf46816354b06e0d5cb0e84dfde Merge: 2c947cd63bfb d3e71a2eae1f Author: Arnd Bergmann Date: Mon Jul 25 16:54:46 2022 +0200 Merge tag 'at91-dt-5.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt AT91 DT for v5.20 #3 It contains updates for LAN966X devices as follows: - clock gating support - gpio restart and network switch for lan966x-pcb8291 board * tag 'at91-dt-5.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: lan966x: Enable network driver on pcb8291 ARM: dts: lan966x: Disable can0 on pcb8291 ARM: dts: lan966x: Add gpio-restart ARM: dts: lan966x: add clock gating register Link: https://lore.kernel.org/r/20220722152041.1752962-1-claudiu.beznea@microchip.com Signed-off-by: Arnd Bergmann commit f201bdfd7c87967480000db8974f683c14aa6eb2 Author: Olga Kornievskaia Date: Mon Jul 25 09:32:31 2022 -0400 NFSv4.1 probe offline transports for trunking on session creation Once the session is established call into the SUNRPC layer to check if any offlined trunking connections should be re-enabled. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 92cc04f60ab4ae199eee507e5cd4d5aa6c722e9c Author: Olga Kornievskaia Date: Mon Jul 25 09:32:30 2022 -0400 SUNRPC create a function that probes only offline transports For only offline transports, attempt to check connectivity via a NULL call and, if that succeeds, call a provided session trunking detection function. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust include/linux/sunrpc/clnt.h | 2 ++ net/sunrpc/clnt.c | 65 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) commit 273d6aed9e5a1859dda15256f45561315c3d237a Author: Olga Kornievskaia Date: Mon Jul 25 09:32:29 2022 -0400 SUNRPC export xprt_iter_rewind function Make xprt_iter_rewind callable outside of xprtmultipath.c Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust include/linux/sunrpc/xprtmultipath.h | 2 ++ net/sunrpc/xprtmultipath.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) commit 7960aa9e4d09504a0a3aff9e34329230a5d0aa9b Author: Olga Kornievskaia Date: Mon Jul 25 09:32:28 2022 -0400 SUNRPC restructure rpc_clnt_setup_test_and_add_xprt In preparation for code re-use, pull out the part of the rpc_clnt_setup_test_and_add_xprt() portion that sends a NULL rpc and then calls a session trunking function into a helper function. Re-organize the end of the function for code re-use. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust net/sunrpc/clnt.c | 52 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 21 deletions(-) commit e818bd085baf18cc3271c0f5549d9f5a7069efba Author: Olga Kornievskaia Date: Mon Jul 25 09:32:27 2022 -0400 NFSv4.1 remove xprt from xprt_switch if session trunking test fails If we are doing a session trunking test and it fails for the transport, then remove this transport from the xprt_switch group. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 3 +++ 1 file changed, 3 insertions(+) commit 497e6464d6adcee64f071b18fc826e63cfd2f0a5 Author: Olga Kornievskaia Date: Mon Jul 25 09:32:26 2022 -0400 SUNRPC create an rpc function that allows xprt removal from rpc_clnt Expose a function that allows a removal of xprt from the rpc_clnt. When called from NFS that's running a trunked transport then don't decrement the active transport counter. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust include/linux/sunrpc/clnt.h | 1 + include/linux/sunrpc/xprtmultipath.h | 2 +- net/sunrpc/clnt.c | 16 +++++++++++++++- net/sunrpc/xprt.c | 2 +- net/sunrpc/xprtmultipath.c | 11 ++++++----- 5 files changed, 24 insertions(+), 8 deletions(-) commit 9368fd6c75053630e95a6dbd17c9522e82101276 Author: Olga Kornievskaia Date: Mon Jul 25 09:32:25 2022 -0400 SUNRPC enable back offline transports in trunking discovery When we are adding a transport to a xprt_switch that's already on the list but has been marked OFFLINE, then make the state ONLINE since it's been tested now. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust include/linux/sunrpc/clnt.h | 1 + net/sunrpc/clnt.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) commit 95d0d30c66b855f614e677b8cd0455eed0765a6f Author: Olga Kornievskaia Date: Mon Jul 25 09:32:24 2022 -0400 SUNRPC create an iterator to list only OFFLINE xprts Create a new iterator helper that will go thru the all the transports in the switch and return transports that are marked OFFLINE. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust include/linux/sunrpc/xprtmultipath.h | 3 ++ net/sunrpc/clnt.c | 11 +++- net/sunrpc/xprtmultipath.c | 99 ++++++++++++++++++++++++++++++++---- 3 files changed, 101 insertions(+), 12 deletions(-) commit 88363d3e9db66e697fd0198cc2c1785377f2459a Author: Olga Kornievskaia Date: Mon Jul 25 09:32:23 2022 -0400 NFSv4.1 offline trunkable transports on DESTROY_SESSION When session is destroy, some of the transports might no longer be valid trunks for the new session. Offline existing transports. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 1 + 1 file changed, 1 insertion(+) commit 895245ccea251ff54ea19bc364c9a49007918115 Author: Olga Kornievskaia Date: Mon Jul 25 09:32:22 2022 -0400 SUNRPC add function to offline remove trunkable transports Iterate thru available transports in the xprt_switch for all trunkable transports offline and possibly remote them as well. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust include/linux/sunrpc/clnt.h | 1 + net/sunrpc/clnt.c | 46 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) commit 7ffcdaa670164a2ad3844a5ef6df5423782ba290 Author: Olga Kornievskaia Date: Mon Jul 25 09:32:21 2022 -0400 SUNRPC expose functions for offline remote xprt functionality Re-arrange the code that make offline transport and delete transport callable functions. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust include/linux/sunrpc/xprt.h | 3 +++ net/sunrpc/sysfs.c | 28 +++++----------------------- net/sunrpc/xprt.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 23 deletions(-) commit 9dd4545f65679042273a93054ec3bb665ecf7366 Author: Slark Xiao Date: Thu Jul 21 14:09:46 2022 +0800 drm/amd: Fix typo 'the the' in comment Replace 'the the' with 'the' in the comment. Signed-off-by: Slark Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 2 +- drivers/gpu/drm/amd/include/atombios.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 86e4863e67a9bd1e257f162f3d740ebb61206c91 Author: Alex Deucher Date: Thu Jul 21 00:35:35 2022 -0400 drm/amd/display: reduce stack for dml32_CalculatePrefetchSchedule Move stack variables to dummy structure. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher Cc: Stephen Rothwell .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 5 +- .../dc/dml/dcn32/display_mode_vba_util_32.c | 394 ++++++++++----------- .../dc/dml/dcn32/display_mode_vba_util_32.h | 1 + .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 38 ++ 4 files changed, 227 insertions(+), 211 deletions(-) commit 3c3abac60117cfd09460980d9a14c253b37f7b00 Author: Alex Deucher Date: Wed Jul 20 23:50:08 2022 -0400 drm/amd/display: reduce stack for dml32_CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport Move stack variables to dummy structure. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher Cc: Stephen Rothwell .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 2 + .../dc/dml/dcn32/display_mode_vba_util_32.c | 187 +++++++++------------ .../dc/dml/dcn32/display_mode_vba_util_32.h | 1 + .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 34 ++++ 4 files changed, 120 insertions(+), 104 deletions(-) commit c3b3f9ba25e6cbe59673505fbc5fff6c4cda0ef7 Author: Alex Deucher Date: Wed Jul 20 23:25:25 2022 -0400 drm/amd/display: reduce stack for dml32_CalculateVMRowAndSwath Move stack variables to dummy structure. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher Cc: Stephen Rothwell .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 2 + .../dc/dml/dcn32/display_mode_vba_util_32.c | 110 +++++++++------------ .../dc/dml/dcn32/display_mode_vba_util_32.h | 1 + .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 19 ++++ 4 files changed, 70 insertions(+), 62 deletions(-) commit bac4b41d917a1d999308bb1e779f8c3b39c19f67 Author: Alex Deucher Date: Wed Jul 20 23:06:49 2022 -0400 drm/amd/display: reduce stack for dml32_CalculateSwathAndDETConfiguration Move stack variables to dummy structure. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher Cc: Stephen Rothwell .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 3 + .../dc/dml/dcn32/display_mode_vba_util_32.c | 121 ++++++++++----------- .../dc/dml/dcn32/display_mode_vba_util_32.h | 2 + .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 15 +++ 4 files changed, 77 insertions(+), 64 deletions(-) commit 7acc487ab57e076c823b2b7559aa9e3997962ca2 Author: Alex Deucher Date: Wed Jul 20 16:00:56 2022 -0400 drm/amd/display: reduce stack size in dcn32 dml (v2) Move additional dummy structures off the stack and into the dummy vars structure. Fixes the following: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c: In function 'DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation': drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c:1659:1: error: the frame size of 2144 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] 1659 | } | ^ drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c: In function 'dml32_ModeSupportAndSystemConfigurationFull': drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c:3799:1: error: the frame size of 2464 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] 3799 | } // ModeSupportAndSystemConfigurationFull | ^ v2: move more stuff to dummy structure, fix init order (Alex) Acked-by: Christian König Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher Cc: Stephen Rothwell .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 411 +++++++++------------ .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 36 ++ 2 files changed, 217 insertions(+), 230 deletions(-) commit 74097f9fd2f5ebdae04fcba59da345386415cbf3 Author: Philip Yang Date: Thu Jul 7 16:54:19 2022 -0400 drm/amdkfd: Process notifier release callback don't take mutex Move process queues cleanup to deferred work kfd_process_wq_release, to avoid potential deadlock circular locking warning: WARNING: possible circular locking dependency detected the existing dependency chain (in reverse order) is: -> #2 ((work_completion)(&svms->deferred_list_work)){+.+.}-{0:0}: __flush_work+0x343/0x4a0 svm_range_list_lock_and_flush_work+0x39/0xc0 svm_range_set_attr+0xe8/0x1080 [amdgpu] kfd_ioctl+0x19b/0x600 [amdgpu] __x64_sys_ioctl+0x81/0xb0 do_syscall_64+0x34/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae -> #1 (&info->lock#2){+.+.}-{3:3}: __mutex_lock+0xa4/0x940 amdgpu_amdkfd_gpuvm_acquire_process_vm+0x2e3/0x590 kfd_process_device_init_vm+0x61/0x200 [amdgpu] kfd_ioctl_acquire_vm+0x83/0xb0 [amdgpu] kfd_ioctl+0x19b/0x600 [amdgpu] __x64_sys_ioctl+0x81/0xb0 do_syscall_64+0x34/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae -> #0 (&process->mutex){+.+.}-{3:3}: __lock_acquire+0x1365/0x23d0 lock_acquire+0xc9/0x2e0 __mutex_lock+0xa4/0x940 kfd_process_notifier_release+0x96/0xe0 [amdgpu] __mmu_notifier_release+0x94/0x210 exit_mmap+0x35/0x1f0 mmput+0x63/0x120 svm_range_deferred_list_work+0x177/0x2c0 [amdgpu] process_one_work+0x2a4/0x600 worker_thread+0x39/0x3e0 kthread+0x16d/0x1a0 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((work_completion)(&svms->deferred_list_work)); lock(&info->lock#2); lock((work_completion)(&svms->deferred_list_work)); lock(&process->mutex); Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_process.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 0593ad215359d51514c1e6c81ce28ea598efed6b Author: Philip Yang Date: Wed Jul 20 18:00:45 2022 -0400 drm/amdkfd: Correct mmu_notifier_get failure handling If process has signal pending, mmu_notifier_get_locked fails and calls ops->free_notifier, kfd_process_free_notifier will schedule kfd_process_wq_release as process refcount is 1, but process structure is already freed. This use after free bug causes system crash with different backtrace. The fix is to increase process refcount and then decrease the refcount after mmu_notifier_get success. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_process.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1c05d9e53d2cfad1f99d9087a8ad24da4ebc0905 Author: Roman Li Date: Thu Jul 21 17:52:23 2022 -0400 drm/amd/display: Specify supported modifiers for dcn314 Use same modifiers as for AMDGPU_FAMILY_GC_11_0_0 Signed-off-by: Roman Li Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 1 + 1 file changed, 1 insertion(+) commit 77299956e8867a4cc19c5fd41b797c5152aad1dd Author: Roman Li Date: Thu Jul 21 17:21:12 2022 -0400 drm/amd/display: Fix dc_version detect for dcn314 [Why] While parsing dc_version redundant check leads to invalid dc_version for dcn314. [How] Remove redundant check Fixes: ee7b62e127c8 ("drm/amd/display: Enable DCN314 in DC") Signed-off-by: Roman Li Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5085e0361f5a3675fc0d0919f7b69aded453ceb7 Author: Melissa Wen Date: Wed Jul 20 18:32:08 2022 -0100 drm/amd/display: move FPU code from dcn301 clk mgr to DML folder The -mno-gnu-attribute option in dcn301 clk mgr makefile hides a soft vs hard fp error for powerpc. After removing this flag, we can see some FPU code remains there: gcc-11.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.o uses hard float, drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn301/vg_clk_mgr.o uses soft float Therefore, remove the -mno-gnu-attribute flag for dcn301/powerpc and move FPU-associated code to DML folder. Signed-off-by: Melissa Wen Reviewed-by: Maíra Canal Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile | 6 -- .../drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c | 85 ++-------------------- .../drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.h | 3 + .../gpu/drm/amd/display/dc/dml/dcn301/dcn301_fpu.c | 74 +++++++++++++++++++ 4 files changed, 83 insertions(+), 85 deletions(-) commit ddd0fa1f47edd794736e70d165341a5c4ff78e47 Author: Melissa Wen Date: Wed Jul 20 18:32:07 2022 -0100 drm/amd/display: move FPU code from dcn30 clk mgr to DML folder The -mno-gnu-attribute option in clk mgr makefile for dcn30 hides a soft vs hard fp error for powerpc. After removing this flag, we can see some FPU code remains there: gcc-11.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.o uses hard float, drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn30/dcn30_clk_mgr.o uses soft float Therefore, remove the -mno-gnu-attribute flag for dcn30/powerpc and move FPU-associated code to DML folder. Signed-off-by: Melissa Wen Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile | 6 --- .../amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 63 ++-------------------- .../gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c | 63 +++++++++++++++++++++- .../gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.h | 1 + 4 files changed, 68 insertions(+), 65 deletions(-) commit 1a3408259bfd5a383b3c7aa7c309c9fb81e35ce0 Author: Melissa Wen Date: Wed Jul 20 18:32:06 2022 -0100 drm/amd/display: move FPU code on dcn21 clk_mgr The -mno-gnu-attribute option in dcn21 clk mgr makefile hides a soft vs hard fp error for powerpc. After removing this flag, we can see some FPU code remains there: /gcc-11.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.o uses hard float, drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn21/rn_clk_mgr.o uses soft float Therefore, remove the -mno-gnu-attribute flag for dcn21/powerpc and move FPU-associated code to DML folder. Signed-off-by: Melissa Wen Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile | 6 - .../drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 234 +------------------- .../drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h | 7 + .../gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 235 +++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.h | 2 + 5 files changed, 248 insertions(+), 236 deletions(-) commit ca0273ab447853c014983951e2183991f8dbc7b9 Author: Melissa Wen Date: Wed Jul 20 18:32:05 2022 -0100 drm/amd/display: remove useless FPU protection wrapper from dcn31_resource file Many lines of code in dcn31_resource_construct are wrapped by DC_FP macro to protect FPU operations; however, there is no FPU in this region. Therefore, just remove the wrapper for clarity. Signed-off-by: Melissa Wen Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 6 ------ 1 file changed, 6 deletions(-) commit 39a6f3fe98ff03baab364acfec69a6f9803ce22c Author: Melissa Wen Date: Wed Jul 20 18:32:04 2022 -0100 drm/amd/display: fix soft-fp vs hard-fp on DCN 3.1 family for powerpc Move remaining FPU code to DML folder that caused compilation error for powerpc. This patch depends on [1] to prevent the error below: /gcc-11.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.o uses hard float, drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_resource.o uses soft float /gcc-11.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: failed to merge target specific data of file drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_resource.o /gcc-11.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.o uses hard float, drivers/gpu/drm/amd/amdgpu/../display/dc/dcn315/dcn315_resource.o uses soft float /gcc-11.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: failed to merge target specific data of file drivers/gpu/drm/amd/amdgpu/../display/dc/dcn315/dcn315_resource.o /gcc-11.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.o uses hard float, drivers/gpu/drm/amd/amdgpu/../display/dc/dcn316/dcn316_resource.o uses soft float /gcc-11.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: failed to merge target specific data of file drivers/gpu/drm/amd/amdgpu/../display/dc/dcn316/dcn316_resource.o [1] https://lore.kernel.org/amd-gfx/20220716195144.342960-1-mwen@igalia.com/ Reported-by: Guenter Roeck Signed-off-by: Melissa Wen Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 5 +++-- drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c | 5 +++-- drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.c | 5 +++-- drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 11 +++++++++++ drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.h | 3 +++ 5 files changed, 23 insertions(+), 6 deletions(-) commit 9a1dadb6d33173427b6f6c89ab1ddd0eca636afb Author: Aric Cyr Date: Mon Jul 11 00:43:58 2022 -0400 drm/amd/display: 3.2.195 This version brings along following fixes: - Isolate FPU operation for DCN32/321 under the DML folder - Create a specific file for CRTC and plane based on amdgpu_dm - Fix DSC issues - Update DML logic Acked-by: Alan Liu Signed-off-by: Aric Cyr Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 352b25a770712a954b1def1b8c6429b0825ee0b3 Author: Rodrigo Siqueira Date: Fri Jul 8 16:07:03 2022 -0400 drm/amd/display: Drop FPU code from dcn321 resource This commit fully move the missing FPU operations from dcn321 resource to dcn321 fpu. It also remove those FPU flags from the Makefile. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn321/Makefile | 25 -- .../drm/amd/display/dc/dcn321/dcn321_resource.c | 452 +-------------------- .../gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c | 446 ++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.h | 2 + 4 files changed, 450 insertions(+), 475 deletions(-) commit 197485c695430ab03d9f4a96aab4d4f76787f7c9 Author: Rodrigo Siqueira Date: Fri Jul 8 15:53:56 2022 -0400 drm/amd/display: Create dcn321_fpu file The file dcn321_resource has a lot of FPU operations that should be inside the dml folder. This commit introduces the dcn321_fpu file and moves some of the FPU operation functions to this new file. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn321/dcn321_resource.c | 225 ++----------------- .../drm/amd/display/dc/dcn321/dcn321_resource.h | 3 + drivers/gpu/drm/amd/display/dc/dml/Makefile | 2 + .../gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c | 238 +++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.h | 36 ++++ 5 files changed, 296 insertions(+), 208 deletions(-) commit f7907f6db81ca08f4f8bd9245b8fecd49bc82f6e Author: Rodrigo Siqueira Date: Fri Jul 8 12:08:34 2022 -0400 drm/amd/display: Drop FPU flags from dcn32 Makefile This is the final commit from the FPU isolation for DCN32 and for this reason we can finally remove flags related to FPU. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/Makefile | 28 --------------------------- 1 file changed, 28 deletions(-) commit 4e14e0fc9f0e47d9d3d39b6f92724f2038ee6e25 Author: Rodrigo Siqueira Date: Fri Jul 8 12:06:27 2022 -0400 drm/amd/display: Move bounding box to FPU folder The final part of the DCN32 code that uses FPU is the bounding box code, and this commit move it to dcn32_fpu. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 460 +------------------- .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 470 +++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h | 2 + 3 files changed, 474 insertions(+), 458 deletions(-) commit a4f8f294fe99a678ce0a50d649732440c41742b7 Author: Rodrigo Siqueira Date: Fri Jul 8 11:55:39 2022 -0400 drm/amd/display: Move ntuple to insert entry Move get_optimal_ntuple to the FPU code and call it inside insert_entry_into_table_sorted. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 28 ---------------------- .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 25 +++++++++++++++++++ 2 files changed, 25 insertions(+), 28 deletions(-) commit 5b4ee98713c7b42e270835fea08c3b6977b48e7e Author: Rodrigo Siqueira Date: Fri Jul 8 11:50:22 2022 -0400 drm/amd/display: Move dlg params calculation Move dlg params calculation to the FPU folder and make it static. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 485 +------------------- .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.h | 6 - .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 506 ++++++++++++++++++++- .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h | 13 +- 4 files changed, 513 insertions(+), 497 deletions(-) commit 0339530d8879cbd560cd3d3de5138dc797744274 Author: Rodrigo Siqueira Date: Fri Jul 8 11:24:05 2022 -0400 drm/amd/display: Move wm and dlg calculation to FPU code Move dcn32_calculate_wm_and_dlg from dcn32 resources to the FPU code. Additionally, this commit adds an interface to it. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 196 +-------------------- .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 185 +++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h | 5 + 3 files changed, 195 insertions(+), 191 deletions(-) commit 4cef2269318cdf5beb70c257f7aaba267f2157ae Author: Rodrigo Siqueira Date: Fri Jul 8 10:51:01 2022 -0400 drm/amd/display: Move SubVP functions to dcn32_fpu It looks like many of the code related to SubVP uses FPU operation, and we have many static functions that are part of this feature. This commit is a little bit large, but it only moves SubVP operation from one file to another, and I had to do it in a single change due to dependencies between functions. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 597 +-------------------- .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.h | 2 + .../amd/display/dc/dcn32/dcn32_resource_helpers.c | 11 + .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 597 +++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h | 8 + 5 files changed, 620 insertions(+), 595 deletions(-) commit 8f5bb69dd453666ff949079443ebce24381e163c Author: Rodrigo Siqueira Date: Fri Jul 8 10:28:23 2022 -0400 drm/amd/display: Move phanton stream to FPU code This commit moves phanton FPU stream to dcn32_fpu file. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 89 +--------------------- .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 84 ++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h | 8 ++ 3 files changed, 94 insertions(+), 87 deletions(-) commit 34a1b0f90e33b00b431d6e8636b787111c6c29d5 Author: Rodrigo Siqueira Date: Fri Jul 8 09:30:43 2022 -0400 drm/amd/display: Move insert entry table to the FPU code The insert_entry_into_table_sorted function uses FPU operation and calls other static functions support. This commit moves the insert entry function with all the required struct and static functions to the FPU file. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 188 ++------------------- .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.h | 3 + .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 186 ++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h | 9 + 4 files changed, 208 insertions(+), 178 deletions(-) commit 44998fbdcdc39253cb10293c3c27dabc040ad7e8 Author: Rajneesh Bhardwaj Date: Tue Apr 5 10:42:47 2022 -0400 drm/amdgpu: Refactor code to handle non coherent and uncached This simplifies existing coherence handling for Arcturus and Aldabaran to account for !coherent && uncached scenarios. Reviewed-by: Felix Kuehling Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 51 +++++++++++------------- 1 file changed, 24 insertions(+), 27 deletions(-) commit 2207efdd8388bd300a0051b1775705d890abd306 Author: Chengming Gui Date: Fri Jul 15 13:12:14 2022 +0800 drm/amd/amdgpu: add TAP_DELAYS upload support for gfx10 Support {GLOBAL/SE0/SE1/SE2/SE3}_TAP_DELAYS uploading. v2: upload TAP_DELAYS before RLC autoload was triggered. (Hawking) Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 15 +++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h | 10 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 30 +++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 20 ++++++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 53 ++++++++++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | 2 ++ 6 files changed, 129 insertions(+), 1 deletion(-) commit 42c7de9622b2ec64f7c15c336b75f8933ea7545c Author: Evan Quan Date: Mon Jul 18 10:45:35 2022 +0800 drm/amd/pm: revise the driver reloading fix for SMU 13.0.0 and 13.0.7 The current approach breaks S3/S4 as asic reset is needed for them. And putting SMU out of service(via SMU_MSG_PrepareMp1ForUnload) will make that(asic reset) failed. Considering with current designs, there is actually also asic reset involved on driver reloading. That can make asic back to a clean state. So, the SMU_MSG_PrepareMp1ForUnload operation will be not so necessary. Thus we will just drop the SMU_MSG_PrepareMp1ForUnload operation. We may revise the whole driver reloading sequences when there is a better design. Fixes: 72aeb6ee0c78 ("drm/amd/pm: fix driver reload SMC firmware fail issue for smu13") Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 7 ------- 1 file changed, 7 deletions(-) commit 326f0672153e0ff5b19f0ff9d6b5f75a64a9c2b5 Author: Evan Quan Date: Tue Jul 12 14:23:49 2022 +0800 drm/amd/pm: correct smu 13.0.0/7 mp1 state setup Only PP_MP1_STATE_UNLOAD is supported for now. For other mp1 state, we should just ignore it. Otherwise, there will be errors coming out. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 19 ++++++++++++++++++- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) commit 25dfc8fab47fb0d7231154e07e20b5fc0221f96e Author: Evan Quan Date: Fri Jul 15 16:48:09 2022 +0800 drm/amd/pm: update SMU13.0.0 driver_if header To fit the latest 78.49.0 PMFW. Also, bump the version to 0x2B. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 4 ++-- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit de0246ee9fc95f1072a0d26ec4025a3545f159b8 Author: Evan Quan Date: Thu Jul 14 14:45:18 2022 +0800 drm/amd/pm: enable GPO feature support for SMU13.0.0 The feature is ready with latest firmwares. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 ++ 1 file changed, 2 insertions(+) commit 34a65beccdea16a12d862e94d004ccf00de8cb3b Author: Kenneth Feng Date: Wed Jul 20 20:49:17 2022 +0800 drm/amd/pm: update driver if header for smu_13_0_7 update driver if header for smu_13_0_7 Signed-off-by: Kenneth Feng Acked-by: Hawking Zhang Signed-off-by: Alex Deucher .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h | 24 ++++++++++++++-------- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) commit 25e751642a38204da189e0e239055702caeb461c Author: Rodrigo Siqueira Date: Thu Jul 7 17:15:19 2022 -0400 drm/amd/display: Move predict pipe to dml fpu folder The function dcn32_predict_pipe_split uses FPU operations. This commit moves this function to the dcn32_fpu file, and we ensure that we only invoke it under the kernel_fpu protection. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 2 ++ .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.h | 2 -- .../amd/display/dc/dcn32/dcn32_resource_helpers.c | 33 ------------------ .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 39 +++++++++++++++++++++- .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h | 4 +++ 5 files changed, 44 insertions(+), 36 deletions(-) commit ccc4200cfb2518fea042b16f090962b07314439b Author: YiPeng Chai Date: Tue Jun 21 14:06:56 2022 +0800 drm/pm/swsmu: add ras eeprom i2c function for smu13 v13_0_0 Add ras eeprom i2c function for smu13 v13_0_0. Signed-off-by: YiPeng Chai Acked-by: Evan Quan Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 157 +++++++++++++++++++++ 1 file changed, 157 insertions(+) commit 8813381a62e1f1703f8fbeccc5fa4fcc988be882 Author: Leo Li Date: Wed Jul 6 14:56:28 2022 -0400 drm/amd/display: Add dcdebugmask option for disabling MPO [Why & How] It's useful to disable MPO when debugging or testing. Therefore, add a dcdebugmask option to disable MPO. Signed-off-by: Leo Li Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++ drivers/gpu/drm/amd/include/amd_shared.h | 1 + 2 files changed, 5 insertions(+) commit 792a0cdde34d417bc2c8266d8015c5fd58d44a0d Author: Leo Li Date: Wed Jul 6 14:48:52 2022 -0400 drm/amd/display: Add visualconfirm module parameter [Why] Being able to configure visual confirm at boot or in cmdline is helpful when debugging. [How] Add a module parameter to configure DC visual confirm, which works the same way as the equivalent debugfs entry. Signed-off-by: Leo Li Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 3 files changed, 7 insertions(+) commit f7bacd97af853a9bba9bb8d1baa12f997e60122f Author: Rodrigo Siqueira Date: Thu Jul 7 16:03:40 2022 -0400 drm/amd/display: Move populate phaton function to dml The function dcn32_helper_populate_phantom_dlg_params uses FPU operations. For this reason, this commit moves this function to the dcn32_fpu file, and we ensure that we only invoke it under the kernel_fpu protection. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 7 ++++ .../amd/display/dc/dcn32/dcn32_resource_helpers.c | 44 ---------------------- .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 43 +++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h | 5 +++ 4 files changed, 55 insertions(+), 44 deletions(-) commit 465576ca481caa9cf18550652efdc6b103701c68 Author: Alex Deucher Date: Fri May 20 10:59:35 2022 -0400 drm/amdgpu: bump driver version for IP discovery info in HW INFO So userspace knows when it is available. Proposed mesa patch: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411/diffs?commit_id=c8a63590dfd0d64e6e6a634dcfed993f135dd075 Reviewed-by: Marek Olšák Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit af14e7c2fc9b60af70b410a7dace116eaa5e4e65 Author: Alex Deucher Date: Thu May 5 18:09:11 2022 -0400 drm/amdgpu: add the IP discovery IP versions for HW INFO data Use the former pad element to store the IP versions from the IP discovery table. This allows userspace to get the IP version from the kernel to better align with hardware IP versions. Proposed mesa patch: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411/diffs?commit_id=c8a63590dfd0d64e6e6a634dcfed993f135dd075 Reviewed-by: Marek Olšák Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 24 ++++++++++++++++++++++++ include/uapi/drm/amdgpu_drm.h | 3 ++- 2 files changed, 26 insertions(+), 1 deletion(-) commit 041a11095abdd52b38f1ea1355357ecd2b66c0e2 Author: Rodrigo Siqueira Date: Thu Jul 7 10:11:08 2022 -0400 drm/amd/display: Drop FPU flags from dcn32_clk_mgr We are working to isolate FPU operations inside the DML folder, and the file dcn32_clk_mgr has some of these operations. This commit moves the FPU operations inside the clock manager and creates the dcn32_fpu file to aggregate those operations. Note that there is no functional change ere, just moving code from one part to another. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile | 25 ----- .../amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 81 +-------------- drivers/gpu/drm/amd/display/dc/dml/Makefile | 2 + .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 113 +++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h | 34 +++++++ 5 files changed, 153 insertions(+), 102 deletions(-) commit 26749aa8d1261bd6f2db9d019276d4277dde7df8 Author: Aurabindo Pillai Date: Thu Jul 7 17:17:25 2022 -0400 drm/amd/display: Revert "drm/amd/display: disable idle optimizations" This reverts commit e7ef5569e71bf3fec01ea513c27c6081c0dbbc64. Idle optimization was disabled due to SMU and firmware bugs. Enable it back for DCN32. DCN321 has them enabled already Fixes: 6a640b95b061 ("drm/amd/display: disable idle optimizations") Signed-off-by: Aurabindo Pillai Reviewed-and-tested-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 1 - 1 file changed, 1 deletion(-) commit f4b4e41a2e05270cd90c5817ab514ace95555874 Author: Jun Lei Date: Fri Jun 24 16:28:50 2022 -0400 drm/amd/display: Update DML logic for unbounded req handling [why] Unbounded request logic in resource/DML has some issues where unbounded request is being enabled incorrectly. SW today enables unbounded request unconditionally in hardware, on the assumption that HW can always support it in single pipe scenarios. This worked until now because the same assumption is made in DML. A new DML update is needed to fix a bug, where there are single pipe scenarios where unbounded cannot be enabled, and this change in DML needs to be ported in, and dcn32 resource logic fixed. [how] First, dcn32_resource should program unbounded req in HW according to unbounded req enablement output from DML, as opposed to DML input. Second, port in DML update which disables unbounded req in some scenarios to fix an issue with poor stutter performance Tested-by: Daniel Wheeler Reviewed-by: Rodrigo Siqueira Signed-off-by: Jun Lei Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 11 ++++- .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 44 ++++++++++++++++--- .../dc/dml/dcn32/display_mode_vba_util_32.c | 51 +++++++++++++++++++--- .../dc/dml/dcn32/display_mode_vba_util_32.h | 10 ++++- .../gpu/drm/amd/display/dc/dml/display_mode_vba.c | 1 + 5 files changed, 103 insertions(+), 14 deletions(-) commit 37edc99979b717312e60cf3463ab756f5a3d6de6 Author: Chris Park Date: Fri Jul 8 15:36:18 2022 -0400 drm/amd/display: Update Cursor Attribute MALL cache [Why] Cursor size can update without MALL cache update. Update the register on cursor attribute as well. [How] Update cursor MALL cache on cursor attribute update. Tested-by: Daniel Wheeler Reviewed-by: Alvin Lee Acked-by: Alan Liu Signed-off-by: Chris Park Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubp.c | 40 ++++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubp.h | 3 ++ 2 files changed, 42 insertions(+), 1 deletion(-) commit c19a23fadd279f433424b4d6436fe4ab0020e20c Author: Jason Wang Date: Sat Jul 16 12:28:41 2022 +0800 drm/amdgpu: Fix comment typo The double `to' is duplicated in the comment, remove one. Reviewed-by: Christian König Signed-off-by: Jason Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d37fd51b4440cf6a02942c0a169ee18a902fb5b Author: Jason Wang Date: Sat Jul 16 11:57:32 2022 +0800 drm/radeon: Fix comment typo The double `have' is duplicated in line 696, remove one. Reviewed-by: Christian König Signed-off-by: Jason Wang Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 869b10ac8d2300327f554d83f4dbab041bf27d49 Author: Roman Li Date: Mon Jun 13 12:21:59 2022 -0400 drm/amdgpu: add dm ip block for dcn 3.1.4 Adding dm ip block to enable display on dcn 3.1.4. Signed-off-by: Roman Li Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) commit f3cd57e499e6904b7e356d11bd33d617341b3f24 Author: Roman Li Date: Tue Jul 19 11:55:07 2022 -0400 drm/amd/display: Disable dmcu fw loading for dcn314 [Why] DCN 3.1.4 uses dmub not dmcu. Attempt to identify dmcu firmware for dcn314 results in dm init error: "Unsupported ASIC type" [How] Add dcn314 to the list of asics that don't require dmcu Signed-off-by: Roman Li Reviewed-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + 1 file changed, 1 insertion(+) commit 660f46e16c4b8a34978012a9f10a32a16db3e98f Author: Taimur Hassan Date: Fri Jul 8 13:32:46 2022 -0400 drm/amd/display: Loop through all pipes for DET allocation [Why & How] There are cases where the pipes populated are not all at the top of the pipes list under context. Loop through all pipes for DET allocation instead of just the number of populated ones, even if some unpopulated pipes are iterated through unnecessarily. Tested-by: Daniel Wheeler Reviewed-by: Alvin Lee Acked-by: Alan Liu Signed-off-by: Taimur Hassan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b5b0d196c2e6cad87cb1e3ce285c7885f2bd796 Author: Vladimir Stempen Date: Wed Jul 6 15:57:12 2022 -0400 drm/amd/display: Disable GPUVM in IP resource configuration [Why] VM enabled in IP configuration causes UCLK not reaching DPM0. The expectation for VM enable should be that KMD will indicate to DAL when VM is enabled, then DAL will set the bit accordingly [How] Set gpuvm_enable to zero in DCN3_20 and DCN3_21 resource. Tested-by: Daniel Wheeler Reviewed-by: Martin Leung Acked-by: Alan Liu Signed-off-by: Vladimir Stempen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7a06e125872929247f78f363d1dc2dbd528631ab Author: André Almeida Date: Thu Jul 14 16:17:45 2022 -0300 Documentation/gpu: Add GFXOFF section Add a GFXOFF section at "GPU Power Controls" file, explaining what it is and how userspace can interact with it. v2: minor tweaks to the documenation (Alex) Signed-off-by: André Almeida Signed-off-by: Alex Deucher Documentation/gpu/amdgpu/thermal.rst | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 4686177f7d2140cdd9d031702c2b53ac4c89340a Author: André Almeida Date: Thu Jul 14 16:17:44 2022 -0300 drm/amd/debugfs: Expose GFXOFF state to userspace GFXOFF has two different "state" values: one to define if the GPU is allowed/disallowed to enter GFXOFF, usually called state; and another one to define if currently GFXOFF is being used, usually called status. Even when GFXOFF is allowed, GPU firmware can decide to not used it accordingly to the GPU load. Userspace can allow/disallow GPUs to enter into GFXOFF via debugfs. The kernel maintains a counter of requests for GFXOFF (gfx_off_req_count) that should be decreased to allow GFXOFF and increased to disallow. The issue with this interface is that userspace can't be sure if GFXOFF is currently allowed. Even by checking amdgpu_gfxoff file, one might get an ambiguous 2, that means that GPU is currently out of GFXOFF, but that can be either because it's currently disallowed or because it's allowed but given the current GPU load it's enabled. Then, userspace needs to rely on the fact that GFXOFF is enabled by default on boot and to track this information. To make userspace life easier and GFXOFF more reliable, return the current state of GFXOFF to userspace when reading amdgpu_gfxoff with the same semantics of writing: 0 means not allowed, not 0 means allowed. Expose the current status of GFXOFF through a new file, amdgpu_gfxoff_status. Signed-off-by: André Almeida Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 49 +++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) commit fbcc38811fcb47335899a3776b4fd5670db4e228 Author: Melissa Wen Date: Sat Jul 16 18:51:44 2022 -0100 drm/amd/display: move dcn31_update_soc_for_wm_a func to dml fpu folder Although dcn31_update_soc_for_wm_a() is only called in dml/dcn31/dcn31_fpu by dc->res_pool->funcs->update_soc_for_wm_a(dc, context), it's declared in dcn31_resource that is not FPU protected. Move this function to dcn31_fpu file as part of the work to isolate FPU code. Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 9 --------- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.h | 1 - drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 9 +++++++++ drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.h | 2 ++ 5 files changed, 12 insertions(+), 10 deletions(-) commit 869618c3440227f848ff9ac55aa64d523a60476e Author: Maíra Canal Date: Thu Jul 14 13:45:04 2022 -0300 drm/amd/display: Remove unused MaxUsedBW variable Remove the variable MaxUsedBW from the function DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation. As a side-effect, the variables MaxPerPlaneVActiveWRBandwidth and WRBandwidth are also removed. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/display_mode_vba_30.c:3043:10: warning: variable 'MaxUsedBW' set but not used [-Wunused-but-set-variable] double MaxUsedBW = 0; ^ 1 warning generated. Reviewed-by: André Almeida Signed-off-by: Maíra Canal Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn30/display_mode_vba_30.c | 28 ---------------------- 1 file changed, 28 deletions(-) commit 54c3e9493cd502d63ff3643fa70b5f98b3201846 Author: Maíra Canal Date: Thu Jul 14 13:45:03 2022 -0300 drm/amd/display: Remove unused variables from dcn10_stream_encoder The variable regval from the function enc1_update_generic_info_packet and the variables dynamic_range_rgb and dynamic_range_ycbcr from the function enc1_stream_encoder_dp_set_stream_attribute are not currently used. This was pointed by clang with the following warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_stream_encoder.c:62:11: warning: variable 'regval' set but not used [-Wunused-but-set-variable] uint32_t regval; ^ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_stream_encoder.c:262:10: warning: variable 'dynamic_range_rgb' set but not used [-Wunused-but-set-variable] uint8_t dynamic_range_rgb = 0; /*full range*/ ^ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_stream_encoder.c:263:10: warning: variable 'dynamic_range_ycbcr' set but not used [-Wunused-but-set-variable] uint8_t dynamic_range_ycbcr = 1; /*bt709*/ ^ 3 warnings generated. Reviewed-by: André Almeida Signed-off-by: Maíra Canal Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c | 10 ---------- 1 file changed, 10 deletions(-) commit 1cccdfe21eb6b8dd4371378b4b61223eb37f1ef7 Author: Maíra Canal Date: Thu Jul 14 13:45:01 2022 -0300 drm/amd/display: Remove unused variables from dml_rq_dlg_get_dlg_params Remove the variables dispclk_delay_subtotal and dppclk_delay_subtotal from the function dml_rq_dlg_get_dlg_params. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/display_rq_dlg_calc_31.c:920:15: warning: variable 'dispclk_delay_subtotal' set but not used [-Wunused-but-set-variable] unsigned int dispclk_delay_subtotal; ^ drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/display_rq_dlg_calc_31.c:919:15: warning: variable 'dppclk_delay_subtotal' set but not used [-Wunused-but-set-variable] unsigned int dppclk_delay_subtotal; ^ 2 warnings generated. Reviewed-by: André Almeida Signed-off-by: Maíra Canal Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn31/display_rq_dlg_calc_31.c | 19 ------------------- 1 file changed, 19 deletions(-) commit 4f5a17b221cc48d66cce13fe1531ca8fc99078b9 Author: Maíra Canal Date: Thu Jul 14 13:45:00 2022 -0300 drm/amd/display: Remove unused NumberOfStates variable Remove the unused unsigned int NumberOfStates from the file, which was declared but never hooked up. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c:33:27: warning: unused variable 'NumberOfStates' [-Wunused-const-variable] static const unsigned int NumberOfStates = DC__VOLTAGE_STATES; ^ 1 warning generated. Reviewed-by: André Almeida Signed-off-by: Maíra Canal Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 2 -- 1 file changed, 2 deletions(-) commit d3e19f76121178420c3efc9688adfd5a448996e0 Author: Maíra Canal Date: Thu Jul 14 13:44:59 2022 -0300 drm/amd/display: Remove unused dml32_CalculatedoublePipeDPPCLKAndSCLThroughput function Remove dml32_CalculatedoublePipeDPPCLKAndSCLThroughput function, which is not used in the codebase. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_util_32.c:393:6: warning: no previous prototype for function 'dml32_CalculatedoublePipeDPPCLKAndSCLThroughput' [-Wmissing-prototypes] void dml32_CalculatedoublePipeDPPCLKAndSCLThroughput( ^ drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_util_32.c:393:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void dml32_CalculatedoublePipeDPPCLKAndSCLThroughput( ^ static 1 warning generated. Reviewed-by: André Almeida Signed-off-by: Maíra Canal Signed-off-by: Alex Deucher .../dc/dml/dcn32/display_mode_vba_util_32.c | 54 ---------------------- 1 file changed, 54 deletions(-) commit 557f9100c74cfa033488563240f567466613cefa Author: Maíra Canal Date: Thu Jul 14 13:44:58 2022 -0300 drm/amd/display: Remove unused clk_src variable Remove the variable clk_src from the function dcn3_get_pix_clk_dividers. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:1279:25: warning: variable 'clk_src' set but not used [-Wunused-but-set-variable] struct dce110_clk_src *clk_src; ^ 1 warning generated. Reviewed-by: André Almeida Signed-off-by: Maíra Canal Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 2 -- 1 file changed, 2 deletions(-) commit 44b0c964201e1e2fbfcdab4472f9260048befbaa Author: Taimur Hassan Date: Tue Jul 5 12:22:09 2022 -0400 drm/amd/display: Update de-tile override to anticipate pipe splitting [Why] For certain MPO configurations, DML will split a pipe after DET buffer has already been allocated by driver, resulting in allocation of more DET segments than the configurable return buffer has, causing underflow. [How] Determine during DET override calculation whether or not a pipe will be split later on by DML, and distribute DET segments based on expected number of pipes. Tested-by: Daniel Wheeler Reviewed-by: Dmytro Laktyushkin Acked-by: Alan Liu Signed-off-by: Taimur Hassan Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 22 ++-- .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.h | 6 +- .../amd/display/dc/dcn32/dcn32_resource_helpers.c | 112 +++++++++++---------- 3 files changed, 69 insertions(+), 71 deletions(-) commit a983d263186996002ecafc72f9a0dc5a3a2bfd6f Author: Alvin Lee Date: Thu Jun 16 10:58:08 2022 -0400 drm/amd/display: Don't set dram clock change requirement for SubVP [Description] In general cases we want to keep the dram clock change requirement (we prefer configs that support MCLK switch). Only override to false for SubVP. Tested-by: Daniel Wheeler Acked-by: Alan Liu Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 074293dd9f61f11898f1f6e01f1560fd4c474025 Author: Rodrigo Siqueira Date: Wed Jul 13 13:17:41 2022 -0400 drm/amd/display: Fix hard hang if DSC is disabled We want to calculate the DTB clock values when DSC is enabled; however, this is not the current behavior implemented in DCN32. Right now, DML is trying to calculate DSC values even if DSC is disabled; as a result, we can have a hard hang due to wrong clock calculation. This commit fixes this issue by moving the calculation after the DSC check. Tested-by: Daniel Wheeler Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../display/dc/dml/dcn32/display_mode_vba_util_32.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit e6c64182ed946f1cb65799de9ee75f8bcc42b2c6 Author: Wenjing Liu Date: Wed Jun 29 14:55:43 2022 -0400 drm/amd/display: remove number of DSC slices override in DML [why] Number of DSC slices is an input to DML with high dependency on display specific capability. This isn't something DML can decide on its own. DML has to use the original number of DSC slices input to DML during validation without modification. Otherwise the computed DSC delay will not reflect the current configuration and therefore causes validation failures. [how] Remove DML override for number of DSC slices parameter. Tested-by: Daniel Wheeler Reviewed-by: Alvin Lee Acked-by: Alan Liu Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 473683a03495a5ed9c75a02c7497f32d6cf92c7a Author: Rodrigo Siqueira Date: Wed Jul 20 15:43:21 2022 -0400 drm/amd/display: Create a file dedicated for CRTC [Why] The amdgpu_dm file contains most of the code that works as an interface between DRM API and DC. As a result, this file becomes very large since it comprises multiple abstractions such as CRTC manipulation. [How] This commit extracts the CRTC code to its specific file named amdgpu_dm_crtc. This change does not change anything inside the functions; the only exception is converting some static functions to a global function. v2: fix ifdef merge mix up (Alex) Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Acked-by: Alan Liu Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/Makefile | 1 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 434 +------------------ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 463 +++++++++++++++++++++ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.h | 51 +++ 4 files changed, 516 insertions(+), 433 deletions(-) commit 086f8246ed621bcc91d07e867fdbfae9382c1fbd Merge: 2830e314778d 40e589ba133c Author: David S. Miller Date: Mon Jul 25 14:09:52 2022 +0100 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 2022-07-22 This series contains updates to i40e and iavf drivers. Przemyslaw adds a helper function for determining whether TC MQPRIO is enabled for i40e. Avinash utilizes the driver's bookkeeping of filters to check for duplicate filter before sending the request to the PF for iavf. ==================== Signed-off-by: David S. Miller commit 2830e314778dc7d0a939befed0910a7622ec5ef0 Author: Lorenzo Bianconi Date: Fri Jul 22 09:06:19 2022 +0200 net: ethernet: mtk-ppe: fix traffic offload with bridged wlan A typical flow offload scenario for OpenWrt users is routed traffic received by the wan interface that is redirected to a wlan device belonging to the lan bridge. Current implementation fails to fill wdma offload info in mtk_flow_get_wdma_info() since odev device is the local bridge. Fix the issue running dev_fill_forward_path routine in mtk_flow_get_wdma_info in order to identify the wlan device. Tested-by: Paolo Valerio Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_ppe_offload.c | 30 +++++++++++-------------- 1 file changed, 13 insertions(+), 17 deletions(-) commit 360f9f3152a909d977173159b302a348f5582631 Merge: e222dc8d8408 a168e13f8448 Author: David S. Miller Date: Mon Jul 25 13:58:56 2022 +0100 Merge branch 'mlxsw-Spectrum-2-PTP-preparations' Ido Schimmel says: ==================== mlxsw: Spectrum-2 PTP preparations This patchset includes various preparations required for Spectrum-2 PTP support. Most of the changes are non-functional (e.g., renaming, adding registers). The only intentional user visible change is in patch #10 where the PHC time is initialized to zero in accordance with the recommendation of the PTP maintainer. ==================== Signed-off-by: David S. Miller commit a168e13f84488611f5b9453fab45649ac2d560ee Author: Amit Cohen Date: Sun Jul 24 11:03:29 2022 +0300 mlxsw: spectrum_ptp: Rename mlxsw_sp1_ptp_phc_adjfreq() The function mlxsw_sp_ptp_phc_adjfreq() configures MTUTC register to adjust hardware frequency by a given value. This configuration will be same for Spectrum-2. In preparation for Spectrum-2 PTP support, rename the function to not be Spectrum-1 specific. Later, it will be used for Spectrum-2 also. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4017d929649271541b1c7955fbf48fbe9296f46f Author: Amit Cohen Date: Sun Jul 24 11:03:28 2022 +0300 mlxsw: spectrum_ptp: Rename mlxsw_sp_ptp_get_message_types() Spectrum-1 and Spectrum-2 differ in their time stamping capabilities. The former can be configured to time stamp only a subset of received PTP events (e.g., only Sync), whereas the latter will time stamp all PTP events or none. In preparation for Spectrum-2 PTP support, rename the function that parses the hardware time stamping configuration upon %SIOCSHWTSTAMP to be Spectrum-1 specific. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 9bfe3c16fc23eb826e360c225e8a73556d60d1cb Author: Amit Cohen Date: Sun Jul 24 11:03:27 2022 +0300 mlxsw: spectrum_ptp: Use 'struct mlxsw_sp_ptp_clock' per ASIC Currently, there is one shared structure that holds the required structures for PTP clock. Most of the existing fields are relevant only for Spectrum-1 (cycles, timecounter, and more). Rename the structure to be specific for Spectrum-1 and align the existing code. Add a common structure which includes the structures which will be used also for Spectrum-2. This structure will be returned from clock_init() operation, as the definition is shared between all ASICs' operations. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 75 +++++++++++++--------- 1 file changed, 44 insertions(+), 31 deletions(-) commit e8fea346b5563b719f9437b71d788c1bd825c027 Author: Amit Cohen Date: Sun Jul 24 11:03:26 2022 +0300 mlxsw: spectrum_ptp: Use 'struct mlxsw_sp_ptp_state' per ASIC Currently, there is one shared structure that holds the required structures and details for PTP. Most of the existing fields are relevant only for Spectrum-1 (hash table, lock for hash table, delayed work, and more). Rename the structure to be specific for Spectrum-1 and align the existing code. Add a common structure which includes 'struct mlxsw_sp *mlxsw_sp' and will be returned from ptp_init() operation, as the definition is shared between all ASICs' operations. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 51 +++++++++++++++------- 1 file changed, 35 insertions(+), 16 deletions(-) commit 9468322963894fd7a6138f9bfe3aca88129738d8 Author: Amit Cohen Date: Sun Jul 24 11:03:25 2022 +0300 mlxsw: pci: Simplify FRC clock reading Currently, the reading of FRC values (high and low) is done using macro which calls to a function. In addition, to calculate the offset of FRC, a simple macro is used. This code can be simplified by adding an helper function and calculating the offset explicitly instead of using an additional macro for that. Add the helper function and convert the existing code. This helper will be used later to read UTC clock. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/pci.c | 18 ++++++++++++------ drivers/net/ethernet/mellanox/mlxsw/pci_hw.h | 3 --- 2 files changed, 12 insertions(+), 9 deletions(-) commit 22d950b79ea70b69386b3b131051fbe22f065bdf Author: Amit Cohen Date: Sun Jul 24 11:03:24 2022 +0300 mlxsw: spectrum_ptp: Initialize the clock to zero as part of initialization As lately recommended in the mailing list[1], set the clock to zero time as part of initialization. The idea is that when the clock reads 'Jan 1, 1970', then it is clearly wrong and user will not mistakenly think that the clock is set correctly. If as part of initialization, the driver sets the clock, user might see correct date and time (maybe with a small shift) and assume that there is no need to sync the clock. Fix the existing code of Spectrum-1 to set the 'timecounter' to zero. [1]: https://lore.kernel.org/netdev/20220201191041.GB7009@hoboy.vegasvil.org/ Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 33a9583f9a02d2d8d820f41eb1ed83e06a016bba Author: Danielle Ratson Date: Sun Jul 24 11:03:23 2022 +0300 mlxsw: Rename 'read_frc_capable' bit to 'read_clock_capable' Rename the 'read_frc_capable' bit to 'read_clock_capable' since now it can be both the FRC and UTC clocks. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.h | 2 +- drivers/net/ethernet/mellanox/mlxsw/pci.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 448e9cb3631ea57e4c41ea688f1689af2ed7fd60 Author: Amit Cohen Date: Sun Jul 24 11:03:22 2022 +0300 mlxsw: resources: Add resource identifier for maximum number of FIDs Add a resource identifier for maximum number of FIDs so that it could be later used to query the information from firmware. In Spectrum-2 and Spectrum-3, the correction field of PTP packets which are sent as control packets is not updated at egress port. To overcome this limitation, some packets will be sent as data packets. The header should include FID, which is supposed to be 'Max FID + port - 1'. As preparation, add the required resource, to be able to query the value from firmware later. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/resources.h | 2 ++ 1 file changed, 2 insertions(+) commit 81016180e3f46f2f9ad0b62561db0793ee81227f Author: Danielle Ratson Date: Sun Jul 24 11:03:21 2022 +0300 mlxsw: spectrum: Fix the shift of FID field in TX header Currently, the field FID in TX header is defined, but is not used as it is relevant only for data packets. mlxsw driver currently sends all host-generated traffic as control packets and not as data packets. In Spectrum-2 and Spectrum-3, the correction field of PTP packets which are sent as control packets is not updated at egress port. To overcome this limitation while adding support for PTP, some packets will be sent as data packets. Fix the wrong shift in the definition, to allow using the field later. Signed-off-by: Danielle Ratson Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 291fcb937e951a1db0c35ead766a660e5eeb9d68 Author: Danielle Ratson Date: Sun Jul 24 11:03:20 2022 +0300 mlxsw: Set time stamp type as part of config profile The type of time stamp field in the CQE is configured via the CONFIG_PROFILE command during driver initialization. Add the definition of the relevant fields to the command's payload and set the type to UTC for Spectrum-2 and above. This configuration can be done as part of the preparations to PTP support, as the type of the time stamp will not break any existing behavior. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/cmd.h | 26 ++++++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/core.h | 4 +++- drivers/net/ethernet/mellanox/mlxsw/pci.c | 7 +++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 ++ 4 files changed, 38 insertions(+), 1 deletion(-) commit 577d80238ff7a9226051b33b65b4c223d26a9cae Author: Danielle Ratson Date: Sun Jul 24 11:03:19 2022 +0300 mlxsw: cmd: Add UTC related fields to query firmware command Add UTC sec and nsec PCI BAR and offset to query firmware command for a future use. Signed-off-by: Danielle Ratson Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/cmd.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit aa98487cc96b798ff7c13eb251b1174264759928 Author: Danielle Ratson Date: Sun Jul 24 11:03:18 2022 +0300 mlxsw: pci_hw: Add 'time_stamp' and 'time_stamp_type' fields to CQEv2 The Completion Queue Element version 2 (CQEv2) includes various metadata fields of packets. Add 'time_stamp' and 'time_stamp_type' fields along with functions to extract the seconds and nanoseconds for a future use. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/pci_hw.h | 78 ++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) commit 731416e9ae5d5c3d5491aeef4fda53a191e8822d Author: Danielle Ratson Date: Sun Jul 24 11:03:17 2022 +0300 mlxsw: reg: Add Monitoring Time Precision Correction Port Configuration Register In Spectrum-2, all the packets are time stamped, the MTPCPC register is used to configure the types of packets that will adjust the correction field and which port will trap PTP packets. If ingress correction is set on a port for a given packet type, then when such a packet is received via the port, the current time stamp is subtracted from the correction field. If egress correction is set on a port for a given packet type, then when such a packet is transmitted via the port, the current time stamp is added to the correction field. Assuming the systems is configured correctly, the above means that the correction field will contain the transient delay between the ports. Add this register for a future use in order to support PTP in Spectrum-2. Signed-off-by: Danielle Ratson Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 62 +++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit 97b05cfb68aef12c649c5f8b6e787d143c9e5c8f Author: Danielle Ratson Date: Sun Jul 24 11:03:16 2022 +0300 mlxsw: reg: Add MTUTC register's fields for supporting PTP in Spectrum-2 The MTUTC register configures the HW UTC counter. Add the relevant fields and operations to support PTP in Spectrum-2 and update mlxsw_reg_mtutc_pack() with the new fields for a future use. Signed-off-by: Danielle Ratson Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 31 ++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 4 +-- 2 files changed, 31 insertions(+), 4 deletions(-) commit 1c358fedecd1f0121ba21d3b2a2144145ae24326 Author: Danielle Ratson Date: Sun Jul 24 11:03:15 2022 +0300 mlxsw: Rename mlxsw_reg_mtptptp_pack() to mlxsw_reg_mtptpt_pack() The right name of the register is MTPTPT, which refers to Monitoring Precision Time Protocol Trap Register. Therefore, rename the function mlxsw_reg_mtptptp_pack() to mlxsw_reg_mtptpt_pack(). Signed-off-by: Danielle Ratson Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 6 +++--- drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit e222dc8d8408788e906a5c0dd5f01fbe7f6cd1d3 Merge: 7e7125ddd8f9 5e25c25aa2c0 Author: David S. Miller Date: Mon Jul 25 13:25:39 2022 +0100 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2022-07-20 1) Don't set DST_NOPOLICY in IPv4, a recent patch made this superfluous. From Eyal Birger. 2) Convert alg_key to flexible array member to avoid an iproute2 compile warning when built with gcc-12. From Stephen Hemminger. 3) xfrm_register_km and xfrm_unregister_km do always return 0 so change the type to void. From Zhengchao Shao. 4) Fix spelling mistake in esp6.c From Zhang Jiaming. 5) Improve the wording of comment above XFRM_OFFLOAD flags. From Petr Vaněk. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 89fcdd53c2528b8f0ed34553aaf9826fe63848b5 Author: Martin Sperl Date: Tue Jul 19 12:53:05 2022 +0200 spi: bcm2835: enable shared interrupt support BCM2711 shares an interrupt betweem 5 SPI interfaces (0, 3, 4, 5 & 6). Another interrupt is shared between SPI1, SPI2 and UART1, which also affects BCM2835/6/7. Acting on an interrupt intended for another interface ought to be harmless (although potentially inefficient), but it can cause this driver to crash - presumably because some critical state is not ready. Add a test to the spi-bcm2835 interrupt service routine that interrupts are enabled on this interface to avoid the crash and improve efficiency. Signed-off-by: Martin Sperl Link: https://github.com/raspberrypi/linux/issues/5048 Suggested-by: https://github.com/boe-pi Co-developed-by: Phil Elwell Signed-off-by: Phil Elwell Cc: Mark Brown Cc: Lukas Wunner Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20220719105305.3076354-1-mkl@pengutronix.de Signed-off-by: Mark Brown drivers/spi/spi-bcm2835.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f20d5116b7f3d8d40e1248a59be89e667eaabd62 Author: Ren Zhijie Date: Sun Jul 24 19:06:19 2022 +0800 ASoC: mediatek: mt8186: fix Kconfig dependency If CONFIG_SND_SOC_MT8186=y and CONFIG_SND_SOC_MT6358 is not set, make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed, like this: sound/soc/mediatek/mt8186/mt8186-mt6366-common.o: In function `mt8186_mt6366_init': mt8186-mt6366-common.c:(.text+0x4d): undefined reference to `mt6358_set_mtkaif_protocol' make: *** [vmlinux] Error 1 To fix this build error, add select SND_SOC_MT6358 to config SND_SOC_MT8186 dependency. Fixes: 097e874ad3fc ("ASoC: mediatek: mt8186: add platform driver") Signed-off-by: Ren Zhijie Link: https://lore.kernel.org/r/20220724110619.212774-1-renzhijie2@huawei.com Signed-off-by: Mark Brown sound/soc/mediatek/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 7e7125ddd8f90ae8104e2f3be6dece32b28e9c45 Merge: 61aee772ebab 8a1c9753f165 Author: David S. Miller Date: Mon Jul 25 12:29:54 2022 +0100 Merge branch 'macb-versal-device-support' Harini Katakam says: ==================== macb: Add Versal compatible string to Macb driver Add Versal device support. v2: - Sort compatible strings alphabetically in DT bindings. - Reorganize new config and CAPS order to be cleaner. ==================== Signed-off-by: David S. Miller commit 8a1c9753f1653f30e508547a971f6a7ed365a4fb Author: Harini Katakam Date: Fri Jul 22 16:33:30 2022 +0530 net: macb: Update tsu clk usage in runtime suspend/resume for Versal On Versal TSU clock cannot be disabled irrespective of whether PTP is used. Hence introduce a new Versal config structure with a "need tsu" caps flag and check the same in runtime_suspend/resume before cutting off clocks. More information on this for future reference: This is an IP limitation on versions 1p11 and 1p12 when Qbv is enabled (See designcfg1, bit 3). However it is better to rely on an SoC specific check rather than the IP version because tsu clk property itself may not represent actual HW tsu clock on some chip designs. Signed-off-by: Harini Katakam Signed-off-by: Radhey Shyam Pandey Reviewed-by: Claudiu Beznea Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.h | 1 + drivers/net/ethernet/cadence/macb_main.c | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) commit 1d3ded642535cbb30b376dc3b321284762878e11 Author: Harini Katakam Date: Fri Jul 22 16:33:29 2022 +0530 net: macb: Sort CAPS flags by bit positions Sort capability flags by the bit position set. Signed-off-by: Harini Katakam Reviewed-by: Claudiu Beznea Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f1fa61b0453033b3015ba25530b2d8a6cb39b903 Author: Radhey Shyam Pandey Date: Fri Jul 22 16:33:28 2022 +0530 dt-bindings: net: cdns,macb: Add versal compatible string Add versal compatible string. Signed-off-by: Radhey Shyam Pandey Signed-off-by: Harini Katakam Acked-by: Krzysztof Kozlowski Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/cdns,macb.yaml | 1 + 1 file changed, 1 insertion(+) commit d349ab99eec7ab0f977fc4aac27aa476907acf90 Author: Jason A. Donenfeld Date: Sun Jul 17 12:35:24 2022 +0200 random: handle archrandom with multiple longs The archrandom interface was originally designed for x86, which supplies RDRAND/RDSEED for receiving random words into registers, resulting in one function to generate an int and another to generate a long. However, other architectures don't follow this. On arm64, the SMCCC TRNG interface can return between one and three longs. On s390, the CPACF TRNG interface can return arbitrary amounts, with four longs having the same cost as one. On UML, the os_getrandom() interface can return arbitrary amounts. So change the api signature to take a "max_longs" parameter designating the maximum number of longs requested, and then return the number of longs generated. Since callers need to check this return value and loop anyway, each arch implementation does not bother implementing its own loop to try again to fill the maximum number of longs. Additionally, all existing callers pass in a constant max_longs parameter. Taken together, these two things mean that the codegen doesn't really change much for one-word-at-a-time platforms, while performance is greatly improved on platforms such as s390. Acked-by: Heiko Carstens Acked-by: Catalin Marinas Acked-by: Mark Rutland Acked-by: Michael Ellerman Acked-by: Borislav Petkov Signed-off-by: Jason A. Donenfeld arch/arm64/include/asm/archrandom.h | 102 ++++++++++++++++------------------ arch/arm64/kernel/kaslr.c | 2 +- arch/powerpc/include/asm/archrandom.h | 30 ++-------- arch/powerpc/kvm/book3s_hv.c | 2 +- arch/s390/include/asm/archrandom.h | 29 +++------- arch/um/include/asm/archrandom.h | 21 +++---- arch/x86/include/asm/archrandom.h | 41 ++------------ arch/x86/kernel/espfix_64.c | 2 +- drivers/char/random.c | 45 ++++++++++----- include/asm-generic/archrandom.h | 18 ++---- include/linux/random.h | 12 ++-- 11 files changed, 116 insertions(+), 188 deletions(-) commit 892f7237b3ffb090f1b1f1e55fe7c50664405aed Author: Marc Zyngier Date: Wed Jul 20 11:52:19 2022 +0100 arm64: Delay initialisation of cpuinfo_arm64::reg_{zcr,smcr} Even if we are now able to tell the kernel to avoid exposing SVE/SME from the command line, we still have a couple of places where we unconditionally access the ZCR_EL1 (resp. SMCR_EL1) registers. On systems with broken firmwares, this results in a crash even if arm64.nosve (resp. arm64.nosme) was passed on the command-line. To avoid this, only update cpuinfo_arm64::reg_{zcr,smcr} once we have computed the sanitised version for the corresponding feature registers (ID_AA64PFR0 for SVE, and ID_AA64PFR1 for SME). This results in some minor refactoring. Reviewed-by: Mark Brown Reviewed-by: Peter Collingbourne Tested-by: Peter Collingbourne Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220720105219.1755096-1-maz@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 41 +++++++++++++++++++++++++++++------------ arch/arm64/kernel/cpuinfo.c | 16 ---------------- 2 files changed, 29 insertions(+), 28 deletions(-) commit f96d67a8af7a39f7ffaac464d8bccc4c720e52c2 Merge: 92867739e343 1191b6256e50 Author: Will Deacon Date: Mon Jul 25 10:59:15 2022 +0100 Merge branch 'for-next/boot' into for-next/core * for-next/boot: (34 commits) arm64: fix KASAN_INLINE arm64: Add an override for ID_AA64SMFR0_EL1.FA64 arm64: Add the arm64.nosve command line option arm64: Add the arm64.nosme command line option arm64: Expose a __check_override primitive for oddball features arm64: Allow the idreg override to deal with variable field width arm64: Factor out checking of a feature against the override into a macro arm64: Allow sticky E2H when entering EL1 arm64: Save state of HCR_EL2.E2H before switch to EL1 arm64: Rename the VHE switch to "finalise_el2" arm64: mm: fix booting with 52-bit address space arm64: head: remove __PHYS_OFFSET arm64: lds: use PROVIDE instead of conditional definitions arm64: setup: drop early FDT pointer helpers arm64: head: avoid relocating the kernel twice for KASLR arm64: kaslr: defer initialization to initcall where permitted arm64: head: record CPU boot mode after enabling the MMU arm64: head: populate kernel page tables with MMU and caches on arm64: head: factor out TTBR1 assignment into a macro arm64: idreg-override: use early FDT mapping in ID map ... commit 92867739e3439ecc9bfa0a106be515d93f14c735 Merge: e8da08fc3d32 a6a468f50d6a Author: Will Deacon Date: Mon Jul 25 10:58:10 2022 +0100 Merge branch 'for-next/cpufeature' into for-next/core * for-next/cpufeature: arm64/hwcap: Support FEAT_EBF16 arm64/cpufeature: Store elf_hwcaps as a bitmap rather than unsigned long arm64/hwcap: Document allocation of upper bits of AT_HWCAP arm64: trap implementation defined functionality in userspace commit e8da08fc3d329d59a9e338ca6b273fd9e14f7d54 Merge: 618ff55eec8d 9e07352ef779 Author: Will Deacon Date: Mon Jul 25 10:57:44 2022 +0100 Merge branch 'for-next/vdso' into for-next/core * for-next/vdso: arm64: vdso32: Add DWARF_DEBUG arm64: vdso32: Shuffle .ARM.exidx section above ELF_DETAILS arm64: compat: Move sigreturn32.S to .rodata section arm64: vdso*: place got/plt sections in .rodata arm64: vdso32: add ARM.exidx* sections arm64: compat: Move kuser32.S to .rodata section arm64: vdso32: enable orphan handling for VDSO arm64: vdso32: put ELF related sections in the linker script arm64: vdso: enable orphan handling for VDSO arm64: vdso: put ELF related sections in the linker script commit 618ff55eec8d1b772e2f84f9d46866b43a2063cf Merge: cb20311e5ee9 3bbeca99309f Author: Will Deacon Date: Mon Jul 25 10:57:37 2022 +0100 Merge branch 'for-next/sysregs' into for-next/core * for-next/sysregs: (28 commits) arm64/sysreg: Convert ID_AA64ZFR0_EL1 to automatic generation arm64/sysreg: Convert ID_AA64SMFR0_EL1 to automatic generation arm64/sysreg: Convert LORID_EL1 to automatic generation arm64/sysreg: Convert LORC_EL1 to automatic generation arm64/sysreg: Convert LORN_EL1 to automatic generation arm64/sysreg: Convert LOREA_EL1 to automatic generation arm64/sysreg: Convert LORSA_EL1 to automatic generation arm64/sysreg: Convert ID_AA64ISAR2_EL1 to automatic generation arm64/sysreg: Convert ID_AA64ISAR1_EL1 to automatic generation arm64/sysreg: Convert GMID to automatic generation arm64/sysreg: Convert DCZID_EL0 to automatic generation arm64/sysreg: Convert CTR_EL0 to automatic generation arm64/sysreg: Add _EL1 into ID_AA64ISAR2_EL1 definition names arm64/sysreg: Add _EL1 into ID_AA64ISAR1_EL1 definition names arm64/sysreg: Remove defines for RPRES enumeration arm64/sysreg: Standardise naming for ID_AA64ZFR0_EL1 fields arm64/sysreg: Standardise naming for ID_AA64SMFR0_EL1 enums arm64/sysreg: Standardise naming for WFxT defines arm64/sysreg: Make BHB clear feature defines match the architecture arm64/sysreg: Align pointer auth enumeration defines with architecture ... commit cb20311e5ee9118043f85edb5c036792b987f8d0 Merge: 0f05dad9eec9 82a592c13b0a Author: Will Deacon Date: Mon Jul 25 10:57:26 2022 +0100 Merge branch 'for-next/stacktrace' into for-next/core * for-next/stacktrace: arm64: Copy the task argument to unwind_state arm64: Split unwind_init() arm64: stacktrace: use non-atomic __set_bit arm64: kasan: do not instrument stacktrace.c commit 0f05dad9eec917ab9a5eb31d665199b18b5c4e4e Merge: 288e21b6b21c 4139320d19e6 Author: Will Deacon Date: Mon Jul 25 10:57:20 2022 +0100 Merge branch 'for-next/sme' into for-next/core * for-next/sme: arm64/fpsimd: Remove duplicate SYS_SVCR read arm64/signal: Clean up SVE/SME feature checking inconsistency arm64/sme: Expose SMIDR through sysfs commit 288e21b6b21c15666f0b03c9f51c8a113a985eb9 Merge: c436500d9f03 92f2b8bafa3d Author: Will Deacon Date: Mon Jul 25 10:57:14 2022 +0100 Merge branch 'for-next/perf' into for-next/core * for-next/perf: drivers/perf: arm_spe: Fix consistency of SYS_PMSCR_EL1.CX perf: RISC-V: Add of_node_put() when breaking out of for_each_of_cpu_node() docs: perf: Include hns3-pmu.rst in toctree to fix 'htmldocs' WARNING drivers/perf: hisi: add driver for HNS3 PMU drivers/perf: hisi: Add description for HNS3 PMU driver drivers/perf: riscv_pmu_sbi: perf format perf/arm-cci: Use the bitmap API to allocate bitmaps drivers/perf: riscv_pmu: Add riscv pmu pm notifier perf: hisi: Extract hisi_pmu_init perf/marvell_cn10k: Fix TAD PMU register offset perf/marvell_cn10k: Remove useless license text when SPDX-License-Identifier is already used arm64: cpufeature: Allow different PMU versions in ID_DFR0_EL1 perf/arm-cci: fix typo in comment drivers/perf:Directly use ida_alloc()/free() drivers/perf: Directly use ida_alloc()/free() commit c436500d9f03ecaf791674046e25ba85a1176454 Merge: 03939cf0d5d5 20794545c146 Author: Will Deacon Date: Mon Jul 25 10:57:08 2022 +0100 Merge branch 'for-next/mte' into for-next/core * for-next/mte: arm64: kasan: Revert "arm64: mte: reset the page tag in page->flags" mm: kasan: Skip page unpoisoning only if __GFP_SKIP_KASAN_UNPOISON mm: kasan: Skip unpoisoning of user pages mm: kasan: Ensure the tags are visible before the tag in page->flags commit 03939cf0d5d5eaf4141c594e427eb5ba14fbcd91 Merge: 02eab44c71df d0637c505f8a Author: Will Deacon Date: Mon Jul 25 10:57:02 2022 +0100 Merge branch 'for-next/mm' into for-next/core * for-next/mm: arm64: enable THP_SWAP for arm64 commit 02eab44c71df05882be9352ca12d8a60f7a10649 Merge: 8184a8bc1cea 19198abf3d81 Author: Will Deacon Date: Mon Jul 25 10:56:57 2022 +0100 Merge branch 'for-next/misc' into for-next/core * for-next/misc: arm64/mm: use GENMASK_ULL for TTBR_BADDR_MASK_52 arm64: numa: Don't check node against MAX_NUMNODES arm64: mm: Remove assembly DMA cache maintenance wrappers arm64/mm: Define defer_reserve_crashkernel() arm64: fix oops in concurrently setting insn_emulation sysctls arm64: Do not forget syscall when starting a new thread. arm64: boot: add zstd support commit 8184a8bc1ceaa97aa484d02495417373ddb18c82 Merge: b7c47fd771aa e92b25731ef6 Author: Will Deacon Date: Mon Jul 25 10:56:49 2022 +0100 Merge branch 'for-next/kpti' into for-next/core * for-next/kpti: arm64: correct the effect of mitigations off on kpti arm64: entry: simplify trampoline data page arm64: mm: install KPTI nG mappings with MMU enabled arm64: kpti-ng: simplify page table traversal logic commit b7c47fd771aa19d00e093742be2672b8d963c389 Merge: 570365d365dd 4d09caec2fab Author: Will Deacon Date: Mon Jul 25 10:56:40 2022 +0100 Merge branch 'for-next/kcsan' into for-next/core * for-next/kcsan: arm64: kcsan: Support detecting more missing memory barriers asm-generic: Add memory barrier dma_mb() commit 570365d365ddd28da2cf33b0cdfbe8c79ba67275 Merge: 84d8857af43a 3381da254fab Author: Will Deacon Date: Mon Jul 25 10:56:31 2022 +0100 Merge branch 'for-next/irqflags-nmi' into for-next/core * for-next/irqflags-nmi: arm64: select TRACE_IRQFLAGS_NMI_SUPPORT arch: make TRACE_IRQFLAGS_NMI_SUPPORT generic commit 84d8857af43a9d4289c53955f4d221ebda548b97 Merge: ee8b00a956e1 893dea9ccd08 Author: Will Deacon Date: Mon Jul 25 10:56:23 2022 +0100 Merge branch 'for-next/ioremap' into for-next/core * for-next/ioremap: arm64: Add HAVE_IOREMAP_PROT support arm64: mm: Convert to GENERIC_IOREMAP mm: ioremap: Add ioremap/iounmap_allowed() mm: ioremap: Setup phys_addr of struct vm_struct mm: ioremap: Use more sensible name in ioremap_prot() ARM: mm: kill unused runtime hook arch_iounmap() commit ee8b00a956e104e7cf52bb138ab597bf32ec46fc Merge: 2436387f2d24 bacac637025c Author: Will Deacon Date: Mon Jul 25 10:56:16 2022 +0100 Merge branch 'for-next/extable' into for-next/core * for-next/extable: arm64: extable: cleanup redundant extable type EX_TYPE_FIXUP arm64: extable: move _cond_extable to _cond_uaccess_extable arm64: extable: make uaaccess helper use extable type EX_TYPE_UACCESS_ERR_ZERO arm64: asm-extable: add asm uacess helpers arm64: asm-extable: move data fields arm64: extable: add new extable type EX_TYPE_KACCESS_ERR_ZERO support commit 2436387f2d246bd6728bea72ea7070f93ce79b8b Merge: 322d19b6cdf7 44b3834b2eed Author: Will Deacon Date: Mon Jul 25 10:56:08 2022 +0100 Merge branch 'for-next/errata' into for-next/core * for-next/errata: arm64: errata: Remove AES hwcap for COMPAT tasks arm64: errata: Add Cortex-A510 to the repeat tlbi list commit 322d19b6cdf72314f3f76f93b4e34c066e2d004c Merge: 464ef188e069 5bed6a93920d Author: Will Deacon Date: Mon Jul 25 10:56:02 2022 +0100 Merge branch 'for-next/docs' into for-next/core * for-next/docs: Documentation/arm64: update memory layout table. commit 464ef188e069f5894c11e6b59efe188b9000d93d Merge: a111daf0c53a 471f80db9ef1 Author: Will Deacon Date: Mon Jul 25 10:55:17 2022 +0100 Merge branch 'for-next/cpuidle' into for-next/core * for-next/cpuidle: arm64: cpuidle: remove generic cpuidle support cpuidle: cpuidle-arm: remove arm64 support commit 61aee772ebab2a0e9ba79b7ad9891260408fde72 Merge: 502c6f8cedcc 84b9cd389036 Author: David S. Miller Date: Mon Jul 25 10:38:58 2022 +0100 Merge branch 'mtk_eth_soc-xdp' Lorenzo Bianconi says: ==================== mtk_eth_soc: add xdp support Introduce XDP support for mtk_eth_soc driver if rx hwlro is not enabled in the chipset (e.g. mt7986). Supported XDP verdicts: - XDP_PASS - XDP_DROP - XDP_REDIRECT - XDP_TX - ndo_xdp_xmit Rely on page_pool allocator for single page buffers in order to keep them dma mapped and add skb recycling support. Changes since v3: - add missing rcu_read_lock()/rcu_read_unlock() - introduce mtk_page_pool_enabled() utility routine Changes since v2: - fix leftover sparse warning - add page_pool ethtool stats Changes since v1: - do not allocate mtk_xdp_stats array on the stack in mtk_rx_poll - add rcu annotation to bpf program ==================== Signed-off-by: David S. Miller commit 84b9cd389036d4a262d8cee794d56c04095358a7 Author: Lorenzo Bianconi Date: Fri Jul 22 09:19:40 2022 +0200 net: ethernet: mtk_eth_soc: add support for page_pool_get_stats Introduce support for the page_pool stats API into mtk_eth_soc driver. Report page_pool stats through ethtool. Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/Kconfig | 1 + drivers/net/ethernet/mediatek/mtk_eth_soc.c | 37 ++++++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) commit 5886d26fd25bbe26130e3e5f7474b9b3e98a3469 Author: Lorenzo Bianconi Date: Fri Jul 22 09:19:39 2022 +0200 net: ethernet: mtk_eth_soc: add xmit XDP support Introduce XDP support for XDP_TX verdict and ndo_xdp_xmit function pointer. Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 192 +++++++++++++++++++++++++--- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 10 +- 2 files changed, 180 insertions(+), 22 deletions(-) commit 916a6ee836d6b7b8ef1ed5f0515e256ca60e9968 Author: Lorenzo Bianconi Date: Fri Jul 22 09:19:38 2022 +0200 net: ethernet: mtk_eth_soc: introduce xdp ethtool counters Report xdp stats through ethtool Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 26 ++++++++++++++++++++++++-- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 12 ++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) commit 7c26c20da5d420cde55618263be4aa2f6de53056 Author: Lorenzo Bianconi Date: Fri Jul 22 09:19:37 2022 +0200 net: ethernet: mtk_eth_soc: add basic XDP support Introduce basic XDP support to mtk_eth_soc driver. Supported XDP verdicts: - XDP_PASS - XDP_DROP - XDP_REDIRECT Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 162 ++++++++++++++++++++++++---- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 + 2 files changed, 145 insertions(+), 19 deletions(-) commit 23233e577ef973c2c5d0dd757a0a4605e34ecb57 Author: Lorenzo Bianconi Date: Fri Jul 22 09:19:36 2022 +0200 net: ethernet: mtk_eth_soc: rely on page_pool for single page buffers Rely on page_pool allocator for single page buffers in order to keep them dma mapped and add skb recycling support. Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/Kconfig | 1 + drivers/net/ethernet/mediatek/mtk_eth_soc.c | 185 ++++++++++++++++++++++------ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 10 ++ 3 files changed, 156 insertions(+), 40 deletions(-) commit b6de1f901039cfcbd605842d454bd80c589105d8 Merge: d5e22360e907 688ee1d1785c Author: Greg Kroah-Hartman Date: Mon Jul 25 11:28:52 2022 +0200 Merge tag 'usb-serial-5.20-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for 5.20-rc1 Here are the USB-serial updates for 5.20-rc1, including - a fix up of some tty-port initialized comments that had got truncated and obfuscated Included are also various clean ups. All but the final commit have been in linux-next and with no reported issues. * tag 'usb-serial-5.20-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: fix tty-port initialized comments USB: serial: fix repeated word "the" in comments USB: serial: io_edgeport: fix spelling mistakes USB: serial: use kmemdup instead of kmalloc + memcpy commit 688ee1d1785c1359f9040f615dd8e6054962bce2 Author: Johan Hovold Date: Mon Jul 25 10:44:57 2022 +0200 USB: serial: fix tty-port initialized comments Fix up the tty-port initialized comments which got truncated and obfuscated when replacing the old ASYNCB_INITIALIZED flag. Fixes: d41861ca19c9 ("tty: Replace ASYNC_INITIALIZED bit and update atomically") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/sierra.c | 3 ++- drivers/usb/serial/usb-serial.c | 2 +- drivers/usb/serial/usb_wwan.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) commit d5e22360e907dbf570116c3c08be0d3e5be43a23 Author: Yan Xinyu Date: Mon Jul 25 09:58:41 2022 +0200 USB: serial: usb_wwan: replace DTR/RTS magic numbers with macros The usb_wwan_send_setup function generates DTR/RTS signals in compliance with CDC ACM standard. This patch changes magic numbers in this function to equivalent macros. Link: https://lore.kernel.org/r/20220722085040.704885-1-sdlyyxy@bupt.edu.cn [ johan: use the new CDC control-line defines ] Signed-off-by: Yan Xinyu Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220725075841.1187-8-johan@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/usb_wwan.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit f4beed1e91326630a4ec3fb2e209f06a7ca2e983 Author: Johan Hovold Date: Mon Jul 25 09:58:40 2022 +0200 USB: gadget: f_acm: use CDC defines Use the new CDC control-line and serial-state defines. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220725075841.1187-7-johan@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_acm.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit 0752670685c47203484731bdfae9607f4da735c4 Author: Johan Hovold Date: Mon Jul 25 09:58:39 2022 +0200 staging: gdm724x: drop unused CDC defines This driver has a copy of some of the CDC defines but which are currently unused. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220725075841.1187-6-johan@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_tty.c | 6 ------ 1 file changed, 6 deletions(-) commit 7333c87f7829dee2545fa5ba6476e971973263a0 Author: Johan Hovold Date: Mon Jul 25 09:58:38 2022 +0200 USB: cdc-acm: use CDC serial-state defines Use the new CDC serial-state defines. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220725075841.1187-5-johan@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 24 ++++++++++++------------ drivers/usb/class/cdc-acm.h | 13 ------------- 2 files changed, 12 insertions(+), 25 deletions(-) commit 3fb975e66ce2c6eb50e8ad1963c19bee20302757 Author: Johan Hovold Date: Mon Jul 25 09:58:37 2022 +0200 USB: cdc-acm: use CDC control-line defines Use the new CDC control-line defines. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220725075841.1187-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 18 +++++++++--------- drivers/usb/class/cdc-acm.h | 7 ------- 2 files changed, 9 insertions(+), 16 deletions(-) commit a0a3202b44a9fdf2a1f6330a0d176aee76c8631d Author: Johan Hovold Date: Mon Jul 25 09:58:36 2022 +0200 USB: cdc: add serial-state defines Add defines for the serial-state bitmap values from section 6.3.5 SerialState of the CDC specification version 1.1. Note that the bTxCarrier and bRxCarrier bits have been named after their RS-232 signal equivalents DSR and DCD. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220725075841.1187-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman include/uapi/linux/usb/cdc.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit b4023554b1fb49f73a09e5f346a5facbf27d7383 Author: Johan Hovold Date: Mon Jul 25 09:58:35 2022 +0200 USB: cdc: add control-signal defines Add defines for the Control Signal Bitmap Values from section 6.2.14 SetControlLineState of the CDC specification version 1.1. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220725075841.1187-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman include/uapi/linux/usb/cdc.h | 4 ++++ 1 file changed, 4 insertions(+) commit 2bd1753e8c431fc7475c04ac8d14a4e9930f47f6 Merge: 0fa72ed05ebf 9d9b010f12cc Author: Marc Zyngier Date: Mon Jul 25 09:45:34 2022 +0100 Merge branch irq/misc-5.20 into irq/irqchip-next * irq/misc-5.20: : . : Misc IRQ changes for 5.20: : : - Let irq_set_chip_handler_name_locked() take a const struct irq_chip * : : - Convert the ocelot irq_chip to being immutable (depends on the above) : : - Tidy-up the NOMAP irqdomain API variant : : - Teach action_show() to use for_each_action_of_desc() : : - Check ioremap() return value in the MIPS GIC driver : : - Move MMP driver init function declarations into the common .h : : - The obligatory typo fixes : . irqchip/mmp: Declare init functions in common header file irqchip/mips-gic: Check the return value of ioremap() in gic_of_init() genirq: Use for_each_action_of_desc in actions_show() irqdomain: Use hwirq_max instead of revmap_size for NOMAP domains irqdomain: Report irq number for NOMAP domains irqchip/gic-v3: Fix comment typo pinctrl: ocelot: Make irq_chip immutable genirq: Allow irq_set_chip_handler_name_locked() to take a const irq_chip Signed-off-by: Marc Zyngier commit 9d9b010f12cc4e254bbba32d79c965b564a8957f Author: Ben Dooks Date: Sun Jul 24 23:21:52 2022 +0100 irqchip/mmp: Declare init functions in common header file The functions icu_init_irq and mmp2_init_icu are exported from this code, so declare them in the header file to avoid the following sparse warnings: drivers/irqchip/irq-mmp.c:248:13: warning: symbol 'icu_init_irq' was not declared. Should it be static? drivers/irqchip/irq-mmp.c:271:13: warning: symbol 'mmp2_init_icu' was not declared. Should it be static? Signed-off-by: Ben Dooks [maz: fixup commit message] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220724222152.551850-1-ben-linux@fluff.org arch/arm/mach-mmp/mmp2.h | 2 +- arch/arm/mach-mmp/pxa168.h | 2 +- arch/arm/mach-mmp/pxa910.h | 2 +- include/linux/irqchip/mmp.h | 3 +++ 4 files changed, 6 insertions(+), 3 deletions(-) commit 2d17bd24b0169d3fdbf003dfd55af600e9a30553 Author: Masahiro Yamada Date: Mon Jul 25 11:08:12 2022 +0900 x86/purgatory: Omit use of bin2c The .incbin assembler directive is much faster than bin2c + $(CC). Do similar refactoring as in 4c0f032d4963 ("s390/purgatory: Omit use of bin2c"). Please note the .quad directive matches to size_t in C (both 8 byte) because the purgatory is compiled only for the 64-bit kernel. (KEXEC_FILE depends on X86_64). Signed-off-by: Masahiro Yamada Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20220725020812.622255-2-masahiroy@kernel.org arch/x86/.gitignore | 2 -- arch/x86/Kconfig | 1 - arch/x86/purgatory/Makefile | 8 +------- arch/x86/purgatory/kexec-purgatory.S | 14 ++++++++++++++ scripts/remove-stale-files | 2 ++ 5 files changed, 17 insertions(+), 10 deletions(-) commit 61922d3fa686733e08387a8a4e11b02b4af6d43c Author: Masahiro Yamada Date: Mon Jul 25 11:08:11 2022 +0900 x86/purgatory: Hard-code obj-y in Makefile arch/x86/Kbuild guards the entire purgatory/ directory, and CONFIG_KEXEC_FILE is bool type. $(CONFIG_KEXEC_FILE) is always 'y' when this directory is being built. Signed-off-by: Masahiro Yamada Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20220725020812.622255-1-masahiroy@kernel.org arch/x86/purgatory/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e39ac5515951331be8bd77660ed2f4925031f93d Author: Horatiu Vultur Date: Fri Jul 22 15:18:35 2022 +0200 dt-bindings: arm: at91: add lan966 pcb8309 board Add documentation for Microchip LAN9662 PCB8309. Signed-off-by: Horatiu Vultur Acked-by: Krzysztof Kozlowski Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220722131836.2377720-2-horatiu.vultur@microchip.com Documentation/devicetree/bindings/arm/atmel-at91.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c578d5da10dc429c6676ab09f3fec0b79b31633a Author: Kai-Heng Feng Date: Tue Jul 19 22:20:14 2022 +0800 ALSA: hda/realtek: Enable speaker and mute LEDs for HP laptops Two more HP laptops that use cs35l41 AMP for speaker and GPIO for mute LEDs. So use the existing quirk to enable them accordingly. [ Sort the entries at the SSID order by tiwai ] Signed-off-by: Kai-Heng Feng Reviewed-by: Lucas Tanure Link: https://lore.kernel.org/r/20220719142015.244426-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) commit d4edb0754fe4d341c0e22fdf2dab532792e938ae Merge: 26ae150bbb6d cf33ce6f0c22 Author: Takashi Iwai Date: Mon Jul 25 08:35:23 2022 +0200 Merge branch 'for-linus' into for-next Merge 5.19-rc devel branch for applying HD-audio quirk patches more cleanly. Signed-off-by: Takashi Iwai commit 26ae150bbb6d19767f10800e17ad0fd81f3da67e Author: Ren Zhijie Date: Mon Jul 25 10:36:11 2022 +0800 ALSA: hda: cs35l41: Fix build error unused-function If CONFIG_PM_SLEEP is not set, make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed, like this: sound/pci/hda/cs35l41_hda.c:583:12: error: ‘cs35l41_runtime_resume’ defined but not used [-Werror=unused-function] static int cs35l41_runtime_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~ sound/pci/hda/cs35l41_hda.c:565:12: error: ‘cs35l41_runtime_suspend’ defined but not used [-Werror=unused-function] static int cs35l41_runtime_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[3]: *** [sound/pci/hda/cs35l41_hda.o] Error 1 commit 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones"), add new marco RUNTIME_PM_OPS to fix this unused-function problem. Fixes: 1873ebd30cc8 ("ALSA: hda: cs35l41: Support Hibernation during Suspend") Signed-off-by: Ren Zhijie Link: https://lore.kernel.org/r/20220725023611.57055-1-renzhijie2@huawei.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e3b86509f9204f65842561ad8d37cf83c297550 Author: wangjianli Date: Sun Jul 24 15:18:29 2022 +0800 ALSA: hiface: fix repeated words in comments Delete the redundant word 'in'. Signed-off-by: wangjianli Link: https://lore.kernel.org/r/20220724071829.11117-1-wangjianli@cdjrlc.com Signed-off-by: Takashi Iwai sound/usb/hiface/pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 614b9febdc144c56b087dacc7c1268c25ef6d684 Author: wangjianli Date: Sun Jul 24 15:16:44 2022 +0800 ALSA: usb/6fire: fix repeated words in comments Delete the redundant word 'in'. Signed-off-by: wangjianli Link: https://lore.kernel.org/r/20220724071644.10630-1-wangjianli@cdjrlc.com Signed-off-by: Takashi Iwai sound/usb/6fire/pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ccc86a0a02139321df943313a99efa11745bd273 Author: wangjianli Date: Sun Jul 24 15:14:13 2022 +0800 ALSA: asihpi: fix repeated words in comments Delete the redundant word 'in'. Signed-off-by: wangjianli Link: https://lore.kernel.org/r/20220724071413.10085-1-wangjianli@cdjrlc.com Signed-off-by: Takashi Iwai sound/pci/asihpi/hpi6000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 882c0d1704cf61df13f01933269202d51e74b9f3 Author: Laurent Dufour Date: Wed Jul 13 17:47:26 2022 +0200 powerpc/mobility: wait for memory transfer to complete In pseries_migration_partition(), loop until the memory transfer is complete. This way the calling drmgr process will not exit earlier, allowing callbacks to be run only once the migration is fully completed. If reading the VASI state is done after the hypervisor has completed the migration, the HCALL is returning H_PARAMETER. We can safely assume that the memory transfer is achieved if this happens. This will also allow to manage the NMI watchdog state in the next commits. Signed-off-by: Laurent Dufour Reviewed-by: Nathan Lynch Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220713154729.80789-2-ldufour@linux.ibm.com arch/powerpc/platforms/pseries/mobility.c | 48 +++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) commit 6c9c7d8fbc3a2a0cfed0e7a5b39581847b632f0b Author: Michael Ellerman Date: Tue Jun 28 00:02:39 2022 +1000 selftests/powerpc/ptrace: Add peek/poke of FPRs Currently the ptrace-gpr test only tests the GET/SET(FP)REGS ptrace APIs. But there's an alternate (older) API, called PEEK/POKEUSR. Add some minimal testing of PEEK/POKEUSR of the FPRs. This is sufficient to detect the bug that was fixed recently in the 32-bit ptrace FPR handling. Depends-on: 8e1278444446 ("powerpc/32: Fix overread/overwrite of thread_struct via ptrace") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220627140239.2464900-13-mpe@ellerman.id.au .../testing/selftests/powerpc/ptrace/ptrace-gpr.c | 24 +++++++- tools/testing/selftests/powerpc/ptrace/ptrace.h | 65 ++++++++++++++++++++++ 2 files changed, 87 insertions(+), 2 deletions(-) commit c5a814cc992002c36fa5b7db5fbd55efb7430386 Author: Michael Ellerman Date: Tue Jun 28 00:02:38 2022 +1000 selftests/powerpc/ptrace: Use more interesting values The ptrace-gpr test uses fixed values to test that registers can be read/written via ptrace. In particular it sets all GPRs to 1, which means the test could miss some types of bugs - eg. if the kernel was only returning the low word. So generate some random values at startup and use those instead. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220627140239.2464900-12-mpe@ellerman.id.au .../testing/selftests/powerpc/ptrace/ptrace-gpr.c | 71 +++++++++++++++++----- 1 file changed, 57 insertions(+), 14 deletions(-) commit 7b1513d02edf4a6334618070641f47abbbef0cef Author: Michael Ellerman Date: Tue Jun 28 00:02:37 2022 +1000 selftests/powerpc/ptrace: Make child errors more obvious Use the FAIL_IF() macro so that errors in the child report a line number, rather than just silently exiting. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220627140239.2464900-11-mpe@ellerman.id.au tools/testing/selftests/powerpc/ptrace/ptrace-gpr.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 611e385087efc2cc3a7033aedd3f84ad0cf2a703 Author: Michael Ellerman Date: Tue Jun 28 00:02:36 2022 +1000 selftests/powerpc/ptrace: Do more of ptrace-gpr in asm The ptrace-gpr test includes some inline asm to load GPR and FPR registers. It then goes back to C to wait for the parent to trace it and then checks register contents. The split between inline asm and C is fragile, it relies on the compiler not using any non-volatile GPRs after the inline asm block. It also requires a very large and unwieldy inline asm block. So convert the logic to set registers, wait, and store registers to a single asm function, meaning there's no window for the compiler to intervene. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220627140239.2464900-10-mpe@ellerman.id.au .../testing/selftests/powerpc/include/basic_asm.h | 8 ++++ tools/testing/selftests/powerpc/ptrace/Makefile | 1 + .../testing/selftests/powerpc/ptrace/ptrace-gpr.S | 52 ++++++++++++++++++++++ .../testing/selftests/powerpc/ptrace/ptrace-gpr.c | 29 +++++------- 4 files changed, 73 insertions(+), 17 deletions(-) commit 149a497d5fda3e996a00437260a4c170e43909c8 Author: Michael Ellerman Date: Tue Jun 28 00:02:35 2022 +1000 selftests/powerpc/ptrace: Build the ptrace-gpr test as 32-bit when possible The ptrace-gpr test can now be built 32-bit, so do that if that's the compiler default rather than forcing a 64-bit build. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220627140239.2464900-9-mpe@ellerman.id.au tools/testing/selftests/powerpc/ptrace/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 53fa86e7ece54cbb1fae1443bd6b348088d8ce7e Author: Michael Ellerman Date: Tue Jun 28 00:02:34 2022 +1000 selftests/powerpc/ptrace: Convert to load/store doubles Some of the ptrace tests check the contents of floating pointer registers. Currently these use float, which is always 4 bytes, but the ptrace API supports saving/restoring 8 bytes per register, so switch to using doubles to exercise the code more fully. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220627140239.2464900-8-mpe@ellerman.id.au tools/testing/selftests/powerpc/include/reg.h | 68 ++++++++++----------- tools/testing/selftests/powerpc/lib/reg.S | 70 +++++++++++----------- .../testing/selftests/powerpc/ptrace/ptrace-gpr.c | 16 ++--- .../testing/selftests/powerpc/ptrace/ptrace-gpr.h | 14 ++--- .../selftests/powerpc/ptrace/ptrace-tm-gpr.c | 18 +++--- .../selftests/powerpc/ptrace/ptrace-tm-spd-gpr.c | 20 +++---- tools/testing/selftests/powerpc/ptrace/ptrace.h | 14 +++-- 7 files changed, 111 insertions(+), 109 deletions(-) commit af9f3f31f6cc8e3f637f19189e83d99f3fdd96ad Author: Michael Ellerman Date: Tue Jun 28 00:02:33 2022 +1000 selftests/powerpc/ptrace: Drop unused load_fpr_single_precision() This function is never called, drop it. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220627140239.2464900-7-mpe@ellerman.id.au tools/testing/selftests/powerpc/include/reg.h | 1 - tools/testing/selftests/powerpc/lib/reg.S | 37 --------------------------- 2 files changed, 38 deletions(-) commit bd4d3042e7570fc024b5ff15e895363e4bf5a78f Author: Michael Ellerman Date: Tue Jun 28 00:02:32 2022 +1000 selftests/powerpc: Add 32-bit support to asm helpers Add support for 32-bit builds to the asm helpers. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220627140239.2464900-6-mpe@ellerman.id.au .../testing/selftests/powerpc/include/basic_asm.h | 47 +++++++++++++++++----- 1 file changed, 38 insertions(+), 9 deletions(-) commit cfbc0723d18f5aeab4308c66d7d1992317eed7c9 Author: Michael Ellerman Date: Tue Jun 28 00:02:31 2022 +1000 selftests/powerpc: Don't save TOC by default in asm helpers Thare are some asm helpers for creating/popping stack frames in basic_asm.h. They always save/restore r2 (TOC pointer), but none of the selftests change r2, so it's unnecessary to save it by default. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220627140239.2464900-5-mpe@ellerman.id.au tools/testing/selftests/powerpc/include/basic_asm.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8f2e02394dc907f5e0140bfab80a9aa11e3449ed Author: Michael Ellerman Date: Tue Jun 28 00:02:30 2022 +1000 selftests/powerpc: Don't save CR by default in asm helpers Thare are some asm helpers for creating/popping stack frames in basic_asm.h. They always save/restore CR, but none of the selftests tests touch non-volatile CR fields, so it's unnecessary to save them by default. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220627140239.2464900-4-mpe@ellerman.id.au tools/testing/selftests/powerpc/include/basic_asm.h | 4 ---- 1 file changed, 4 deletions(-) commit 3c20a1d07c377d7260ca853e216cc85bbd7857fa Author: Michael Ellerman Date: Tue Jun 28 00:02:29 2022 +1000 selftests/powerpc/ptrace: Split CFLAGS better Currently all ptrace tests are built 64-bit and with TM enabled. Only the TM tests need TM enabled, so split those out into a separate variable so that can be specified precisely. Split the rest of the tests into a variable, and add -m64 to CFLAGS for those tests, so that in a subsequent patch some tests can be made to build 32-bit. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220627140239.2464900-3-mpe@ellerman.id.au tools/testing/selftests/powerpc/ptrace/Makefile | 33 +++++++++++++++++++++---- 1 file changed, 28 insertions(+), 5 deletions(-) commit cf4baafd7846b3def67057a09b7603a6b566417a Author: Michael Ellerman Date: Tue Jun 28 00:02:28 2022 +1000 selftests/powerpc/ptrace: Set LOCAL_HDRS Set LOCAL_HDRS so header changes cause rebuilds. The lib.mk logic adds all the headers in LOCAL_HDRS as dependencies, so there's no need to also list them explicitly. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220627140239.2464900-2-mpe@ellerman.id.au tools/testing/selftests/powerpc/ptrace/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fd19a1f72aa7bf687609e0810e644fe5b3846342 Author: Michael Ellerman Date: Tue Jun 28 00:02:27 2022 +1000 selftests/powerpc: Ensure 16-byte stack pointer alignment The PUSH/POP_BASIC_STACK helpers in basic_asm.h do not ensure that the stack pointer is always 16-byte aligned, which is required per the ABI. Fix the macros to do the alignment if the caller fails to. Currently only one caller passes a non-aligned size, tm_signal_self(), which hasn't been caught in testing, presumably because it's a leaf function. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220627140239.2464900-1-mpe@ellerman.id.au tools/testing/selftests/powerpc/include/basic_asm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2b461880c20777d317b4ad24ef040918860133ca Author: Michael Ellerman Date: Mon Jul 18 19:51:58 2022 +1000 powerpc: Fix all occurences of duplicate words Since commit 87c78b612f4f ("powerpc: Fix all occurences of "the the"") fixed "the the", there's now a steady stream of patches fixing other duplicate words. Just fix them all at once, to save the overhead of dealing with individual patches for each case. This leaves a few cases of "that that", which in some contexts is correct. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220718095158.326606-1-mpe@ellerman.id.au arch/powerpc/crypto/aes-spe-glue.c | 2 +- arch/powerpc/kernel/btext.c | 2 +- arch/powerpc/kernel/eeh_driver.c | 2 +- arch/powerpc/kernel/exceptions-64s.S | 2 +- arch/powerpc/kernel/pci-common.c | 2 +- arch/powerpc/kernel/pci_dn.c | 2 +- arch/powerpc/kernel/ptrace/ptrace-vsx.c | 2 +- arch/powerpc/kernel/trace/ftrace.c | 6 +++--- arch/powerpc/kernel/watchdog.c | 2 +- arch/powerpc/kvm/book3s_hv.c | 2 +- arch/powerpc/mm/book3s64/hash_utils.c | 2 +- arch/powerpc/platforms/4xx/cpm.c | 2 +- arch/powerpc/platforms/powernv/vas-fault.c | 2 +- arch/powerpc/platforms/pseries/eeh_pseries.c | 2 +- arch/powerpc/platforms/pseries/papr_scm.c | 2 +- 15 files changed, 17 insertions(+), 17 deletions(-) commit e7c45a08451e7a7499f1029522a70bbb15072be2 Merge: fd97e4ad6d3b be640317a1d0 Author: Michael Ellerman Date: Mon Jul 25 12:04:44 2022 +1000 Merge branch 'fixes' into next Bring in a build fix for GCC12 from our fixes branch. commit d8b6171bd58a5ffb9ad1dcfa60372db1b4db6d0d Author: Pavel Begunkov Date: Tue Jul 12 21:52:51 2022 +0100 selftests/io_uring: test zerocopy send Add selftests for io_uring zerocopy sends and io_uring's notification infrastructure. It's largely influenced by msg_zerocopy and uses it on the receive side. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/03d5ec78061cf52db420f88ed0b48eb8f47ce9f7.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe tools/testing/selftests/net/Makefile | 1 + tools/testing/selftests/net/io_uring_zerocopy_tx.c | 605 +++++++++++++++++++++ .../testing/selftests/net/io_uring_zerocopy_tx.sh | 131 +++++ 3 files changed, 737 insertions(+) commit 3ff1a0d395c00e42ee15f561431e0c04097595b9 Author: Pavel Begunkov Date: Tue Jul 12 21:52:50 2022 +0100 io_uring: enable managed frags with register buffers io_uring's registered buffers infra has a good performant way of pinning pages, so let's use SKBFL_MANAGED_FRAG_REFS when our requests are purely register buffer backed. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/278731d3f20caf346cfc025fbee0b4c9ee4ed751.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) commit 492dddb4f6e3a5839c27d41ff1fecdbe6c3ab851 Author: Pavel Begunkov Date: Tue Jul 12 21:52:49 2022 +0100 io_uring: add zc notification flush requests Overlay notification control onto IORING_OP_RSRC_UPDATE (former IORING_OP_FILES_UPDATE). It allows to flush a range of zc notifications from slots with indexes [sqe->off, sqe->off+sqe->len). If sqe->arg is not zero, it also copies sqe->arg as a new tag for all flushed notifications. Note, it doesn't flush a notification of a slot if there was no requests attached to it (since last flush or registration). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/df13e2363400682a73dd9e71c3b990b8d1ff0333.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 1 + io_uring/rsrc.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) commit 4379d5f15b3fd4224c37841029178aa8082a242e Author: Pavel Begunkov Date: Tue Jul 12 21:52:48 2022 +0100 io_uring: rename IORING_OP_FILES_UPDATE IORING_OP_FILES_UPDATE will be a more generic opcode serving different resource types, rename it into IORING_OP_RSRC_UPDATE and add subtype handling. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/0a907133907d9af3415a8a7aa1802c6aa97c03c6.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 12 +++++++++++- io_uring/opdef.c | 9 +++++---- io_uring/rsrc.c | 17 +++++++++++++++-- io_uring/rsrc.h | 4 ++-- 4 files changed, 33 insertions(+), 9 deletions(-) commit 63809137ebb58f0aa2ce359117422686e3304f45 Author: Pavel Begunkov Date: Tue Jul 12 21:52:47 2022 +0100 io_uring: flush notifiers after sendzc Allow to flush notifiers as a part of sendzc request by setting IORING_SENDZC_FLUSH flag. When the sendzc request succeedes it will flush the used [active] notifier. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e0b4d9a6797e2fd6092824fe42953db7a519bbc8.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 4 ++++ io_uring/io_uring.c | 11 +---------- io_uring/io_uring.h | 10 ++++++++++ io_uring/net.c | 5 ++++- io_uring/notif.c | 2 +- io_uring/notif.h | 11 +++++++++++ 6 files changed, 31 insertions(+), 12 deletions(-) commit 10c7d33ecd51619e453cf6aeee8e326f8ba5cfea Author: Pavel Begunkov Date: Tue Jul 12 21:52:46 2022 +0100 io_uring: sendzc with fixed buffers Allow zerocopy sends to use fixed buffers. There is an optimisation for this case, the network layer don't need to reference the pages, see SKBFL_MANAGED_FRAG_REFS, so io_uring have to ensure validity of fixed buffers until the notifier is released. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e1d8bd1b5934e541d90c1824eb4020ae3f5f43f3.1657643355.git.asml.silence@gmail.com [axboe: fold in 32-bit pointer cast warning fix] Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 6 +++++- io_uring/net.c | 29 ++++++++++++++++++++++++----- 2 files changed, 29 insertions(+), 6 deletions(-) commit 092aeedb750a9fad0f0252d6067fc91d76ca44bd Author: Pavel Begunkov Date: Tue Jul 12 21:52:45 2022 +0100 io_uring: allow to pass addr into sendzc Allow to specify an address to zerocopy sends making it more like sendto(2). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/70417a8f7c5b51ab454690bae08adc0c187f89e8.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 2 +- io_uring/net.c | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) commit e29e3bd4b968d50bfb3bbdcee6bfdc340f7792cf Author: Pavel Begunkov Date: Tue Jul 12 21:52:44 2022 +0100 io_uring: account locked pages for non-fixed zc Fixed buffers are RLIMIT_MEMLOCK accounted, however it doesn't cover iovec based zerocopy sends. Do the accounting on the io_uring side. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/19b6e3975440f59f1f6199c7ee7acf977b4eecdc.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 1 + io_uring/notif.c | 6 ++++++ 2 files changed, 7 insertions(+) commit 06a5464be84e4ae48394d34441baf34bf9706827 Author: Pavel Begunkov Date: Tue Jul 12 21:52:43 2022 +0100 io_uring: wire send zc request type Add a new io_uring opcode IORING_OP_SENDZC. The main distinction from IORING_OP_SEND is that the user should specify a notification slot index in sqe::notification_idx and the buffers are safe to reuse only when the used notification is flushed and completes. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a80387c6a68ce9cf99b3b6ef6f71068468761fb7.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 5 +++ io_uring/net.c | 94 +++++++++++++++++++++++++++++++++++++++++++ io_uring/net.h | 3 ++ io_uring/opdef.c | 15 +++++++ 4 files changed, 117 insertions(+) commit bc24d6bd32df0be19df3d30e74be4ba56493c0e2 Author: Pavel Begunkov Date: Tue Jul 12 21:52:42 2022 +0100 io_uring: add notification slot registration Let the userspace to register and unregister notification slots. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a0aa8161fe3ebb2a4cc6e5dbd0cffb96e6881cf5.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 17 +++++++++++++++++ io_uring/io_uring.c | 9 +++++++++ io_uring/notif.c | 43 +++++++++++++++++++++++++++++++++++++++++++ io_uring/notif.h | 3 +++ 4 files changed, 72 insertions(+) commit 68ef5578efc8893489400b1ec30af66dab4f75ff Author: Pavel Begunkov Date: Tue Jul 12 21:52:41 2022 +0100 io_uring: add rsrc referencing for notifiers In preparation to zerocopy sends with fixed buffers make notifiers to reference the rsrc node to protect the used fixed buffers. We can't just grab it for a send request as notifiers can likely outlive requests that used it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3cd7a01d26837945b6982fa9cf15a63230f2ed4f.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/notif.c | 5 +++++ io_uring/notif.h | 1 + io_uring/rsrc.h | 12 +++++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) commit e58d498e81baa9fd8acf5132d8b2d4f829361f6b Author: Pavel Begunkov Date: Tue Jul 12 21:52:40 2022 +0100 io_uring: complete notifiers in tw We need a task context to post CQEs but using wq is too expensive. Try to complete notifiers using task_work and fall back to wq if fails. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/089799ab665b10b78fdc614ae6d59fa7ef0d5f91.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/notif.c | 22 +++++++++++++++++++--- io_uring/notif.h | 3 +++ 2 files changed, 22 insertions(+), 3 deletions(-) commit eb4a299b2f95437af6183946c2a2e850621cefdb Author: Pavel Begunkov Date: Tue Jul 12 21:52:39 2022 +0100 io_uring: cache struct io_notif kmalloc'ing struct io_notif is too expensive when done frequently, cache them as many other resources in io_uring. Keep two list, the first one is from where we're getting notifiers, it's protected by ->uring_lock. The second is protected by ->completion_lock, to which we queue released notifiers. Then we splice one list into another when needed. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9dec18f7fcbab9f4bd40b96e5ae158b119945230.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/linux/io_uring_types.h | 7 ++++++ io_uring/io_uring.c | 3 +++ io_uring/notif.c | 57 ++++++++++++++++++++++++++++++++++++------ io_uring/notif.h | 5 ++++ 4 files changed, 65 insertions(+), 7 deletions(-) commit eb42cebb2cf24c48f60c32856a4bba93d42659c8 Author: Pavel Begunkov Date: Tue Jul 12 21:52:38 2022 +0100 io_uring: add zc notification infrastructure Add internal part of send zerocopy notifications. There are two main structures, the first one is struct io_notif, which carries inside struct ubuf_info and maps 1:1 to it. io_uring will be binding a number of zerocopy send requests to it and ask to complete (aka flush) it. When flushed and all attached requests and skbs complete, it'll generate one and only one CQE. There are intended to be passed into the network layer as struct msghdr::msg_ubuf. The second concept is notification slots. The userspace will be able to register an array of slots and subsequently addressing them by the index in the array. Slots are independent of each other. Each slot can have only one notifier at a time (called active notifier) but many notifiers during the lifetime. When active, a notifier not going to post any completion but the userspace can attach requests to it by specifying the corresponding slot while issueing send zc requests. Eventually, the userspace will want to "flush" the notifier losing any way to attach new requests to it, however it can use the next atomatically added notifier of this slot or of any other slot. When the network layer is done with all enqueued skbs attached to a notifier and doesn't need the specified in them user data, the flushed notifier will post a CQE. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3ecf54c31a85762bf679b0a432c9f43ecf7e61cc.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/linux/io_uring_types.h | 5 ++ io_uring/Makefile | 2 +- io_uring/io_uring.c | 8 ++-- io_uring/io_uring.h | 2 + io_uring/notif.c | 102 +++++++++++++++++++++++++++++++++++++++++ io_uring/notif.h | 64 ++++++++++++++++++++++++++ 6 files changed, 179 insertions(+), 4 deletions(-) commit e70cb60893ca64b7df06864aa16c1cf6d6c671db Author: Pavel Begunkov Date: Tue Jul 12 21:52:37 2022 +0100 io_uring: export io_put_task() Make io_put_task() available to non-core parts of io_uring, we'll need it for notification infrastructure. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3686807d4c03b72e389947b0e8692d4d44334ef0.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/linux/io_uring_types.h | 25 +++++++++++++++++++++++++ io_uring/io_uring.c | 11 +---------- io_uring/io_uring.h | 10 ++++++++++ io_uring/tctx.h | 26 -------------------------- 4 files changed, 36 insertions(+), 36 deletions(-) commit e02b66512738db161e83634255e9826c8cb51336 Author: Pavel Begunkov Date: Tue Jul 12 21:52:36 2022 +0100 io_uring: initialise msghdr::msg_ubuf Initialise newly added ->msg_ubuf in io_recv() and io_send(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b8f9f263875a4a36e7f26cc5d55ebe315308f57d.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 2 ++ 1 file changed, 2 insertions(+) commit 4effe18fc0da27ae5d51a702841e87fa13b8a32d Merge: 32e09298c8b3 f6b543fd03d3 Author: Jens Axboe Date: Sun Jul 24 18:41:03 2022 -0600 Merge branch 'for-5.20/io_uring' into for-5.20/io_uring-zerocopy-send * for-5.20/io_uring: (716 commits) io_uring: ensure REQ_F_ISREG is set async offload net: fix compat pointer in get_compat_msghdr() io_uring: Don't require reinitable percpu_ref io_uring: fix types in io_recvmsg_multishot_overflow io_uring: Use atomic_long_try_cmpxchg in __io_account_mem io_uring: support multishot in recvmsg net: copy from user before calling __get_compat_msghdr net: copy from user before calling __copy_msghdr io_uring: support 0 length iov in buffer select in compat io_uring: fix multishot ending when not polled io_uring: add netmsg cache io_uring: impose max limit on apoll cache io_uring: add abstraction around apoll cache io_uring: move apoll cache to poll.c io_uring: consolidate hash_locked io-wq handling io_uring: clear REQ_F_HASH_LOCKED on hash removal io_uring: don't race double poll setting REQ_F_ASYNC_DATA io_uring: don't miss setting REQ_F_DOUBLE_POLL io_uring: disable multishot recvmsg io_uring: only trace one of complete or overflow ... Signed-off-by: Jens Axboe commit 32e09298c8b3ff29177c825ab711a4a692d4caad Merge: 32346491ddf2 2829a267fca2 Author: Jens Axboe Date: Sun Jul 24 18:40:31 2022 -0600 Merge branch 'io_uring-zerocopy-send' of git://git.kernel.org/pub/scm/linux/kernel/git/kuba/linux into for-5.20/io_uring-zerocopy-send Merge prep net series for io_uring tx zc from the Jakub's tree. * 'io_uring-zerocopy-send' of git://git.kernel.org/pub/scm/linux/kernel/git/kuba/linux: net: fix uninitialised msghdr->sg_from_iter tcp: support externally provided ubufs ipv6/udp: support externally provided ubufs ipv4/udp: support externally provided ubufs net: introduce __skb_fill_page_desc_noacc net: introduce managed frags infrastructure net: Allow custom iter handler in msghdr skbuff: carry external ubuf_info in msghdr skbuff: add SKBFL_DONT_ORPHAN flag skbuff: don't mix ubuf_info from different sources ipv6: avoid partial copy for zc ipv4: avoid partial copy for zc commit 0dd316ba8692c2374fbb82cce57c0b23144f2977 Author: Jens Axboe Date: Fri Jul 1 14:04:43 2022 -0600 mm: honor FGP_NOWAIT for page cache page allocation If we're creating a page cache page with FGP_CREAT but FGP_NOWAIT is set, we should dial back the gfp flags to avoid frivolous blocking which is trivial to hit in low memory conditions: [ 10.117661] __schedule+0x8c/0x550 [ 10.118305] schedule+0x58/0xa0 [ 10.118897] schedule_timeout+0x30/0xdc [ 10.119610] __wait_for_common+0x88/0x114 [ 10.120348] wait_for_completion+0x1c/0x24 [ 10.121103] __flush_work.isra.0+0x16c/0x19c [ 10.121896] flush_work+0xc/0x14 [ 10.122496] __drain_all_pages+0x144/0x218 [ 10.123267] drain_all_pages+0x10/0x18 [ 10.123941] __alloc_pages+0x464/0x9e4 [ 10.124633] __folio_alloc+0x18/0x3c [ 10.125294] __filemap_get_folio+0x17c/0x204 [ 10.126084] iomap_write_begin+0xf8/0x428 [ 10.126829] iomap_file_buffered_write+0x144/0x24c [ 10.127710] xfs_file_buffered_write+0xe8/0x248 [ 10.128553] xfs_file_write_iter+0xa8/0x120 [ 10.129324] io_write+0x16c/0x38c [ 10.129940] io_issue_sqe+0x70/0x1cc [ 10.130617] io_queue_sqe+0x18/0xfc [ 10.131277] io_submit_sqes+0x5d4/0x600 [ 10.131946] __arm64_sys_io_uring_enter+0x224/0x600 [ 10.132752] invoke_syscall.constprop.0+0x70/0xc0 [ 10.133616] do_el0_svc+0xd0/0x118 [ 10.134238] el0_svc+0x78/0xa0 Clear IO, FS, and reclaim flags and mark the allocation as GFP_NOWAIT and add __GFP_NOWARN to avoid polluting dmesg with pointless allocations failures. A caller with FGP_NOWAIT must be expected to handle the resulting -EAGAIN return and retry from a suitable context without NOWAIT set. Reviewed-by: Shakeel Butt Signed-off-by: Jens Axboe mm/filemap.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1aa91d9c993397858a50c433933ea119903fdea2 Author: Stefan Roesch Date: Thu Jun 23 10:51:57 2022 -0700 xfs: Add async buffered write support This adds the async buffered write support to XFS. For async buffered write requests, the request will return -EAGAIN if the ilock cannot be obtained immediately. Signed-off-by: Stefan Roesch Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20220623175157.1715274-15-shr@fb.com Signed-off-by: Jens Axboe fs/xfs/xfs_file.c | 11 +++++------ fs/xfs/xfs_iomap.c | 5 ++++- 2 files changed, 9 insertions(+), 7 deletions(-) commit 9641506b2deed1bb6be7464a95d62c472eca0e8e Author: Stefan Roesch Date: Thu Jun 23 10:51:56 2022 -0700 xfs: Specify lockmode when calling xfs_ilock_for_iomap() This patch changes the helper function xfs_ilock_for_iomap such that the lock mode must be passed in. Signed-off-by: Stefan Roesch Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20220623175157.1715274-14-shr@fb.com Signed-off-by: Jens Axboe fs/xfs/xfs_iomap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1c849b481b3e4f8c36f297cd3aa88ef52a19cee9 Author: Stefan Roesch Date: Thu Jun 16 14:22:19 2022 -0700 io_uring: Add tracepoint for short writes This adds the io_uring_short_write tracepoint to io_uring. A short write is issued if not all pages that are required for a write are in the page cache and the async buffered writes have to return EAGAIN. Signed-off-by: Stefan Roesch Link: https://lore.kernel.org/r/20220616212221.2024518-13-shr@fb.com Signed-off-by: Jens Axboe include/trace/events/io_uring.h | 25 +++++++++++++++++++++++++ io_uring/rw.c | 3 +++ 2 files changed, 28 insertions(+) commit e053aaf4da56cbf0afb33a0fda4a62188e2c0637 Author: Jens Axboe Date: Fri Jun 24 10:24:45 2022 -0600 io_uring: fix issue with io_write() not always undoing sb_start_write() This is actually an older issue, but we never used to hit the -EAGAIN path before having done sb_start_write(). Make sure that we always call kiocb_end_write() if we need to retry the write, so that we keep the calls to sb_start_write() etc balanced. Signed-off-by: Jens Axboe io_uring/rw.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 4e17aaab54359fa2cdeb0080c822a08f2980f979 Author: Stefan Roesch Date: Thu Jun 16 14:22:18 2022 -0700 io_uring: Add support for async buffered writes This enables the async buffered writes for the filesystems that support async buffered writes in io-uring. Buffered writes are enabled for blocks that are already in the page cache or can be acquired with noio. Signed-off-by: Stefan Roesch Link: https://lore.kernel.org/r/20220616212221.2024518-12-shr@fb.com [axboe: adapt to 5.20 branch] Signed-off-by: Jens Axboe io_uring/rw.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) commit 66fa3cedf16abc82d19b943e3289c82e685419d5 Author: Stefan Roesch Date: Thu Jun 23 10:51:53 2022 -0700 fs: Add async write file modification handling. This adds a file_modified_async() function to return -EAGAIN if the request either requires to remove privileges or needs to update the file modification time. This is required for async buffered writes, so the request gets handled in the io worker of io-uring. Signed-off-by: Stefan Roesch Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Christian Brauner (Microsoft) Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20220623175157.1715274-11-shr@fb.com Signed-off-by: Jens Axboe fs/inode.c | 45 ++++++++++++++++++++++++++++++++++++++++++--- include/linux/fs.h | 1 + 2 files changed, 43 insertions(+), 3 deletions(-) commit 6a2aa5d85de534471dd023773236f113eaef26f0 Author: Stefan Roesch Date: Thu Jun 23 10:51:52 2022 -0700 fs: Split off inode_needs_update_time and __file_update_time This splits off the functions inode_needs_update_time() and __file_update_time() from the function file_update_time(). This is required to support async buffered writes. No intended functional changes in this patch. Signed-off-by: Stefan Roesch Reviewed-by: Jan Kara Reviewed-by: Christian Brauner (Microsoft) Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20220623175157.1715274-10-shr@fb.com Signed-off-by: Jens Axboe fs/inode.c | 76 +++++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 50 insertions(+), 26 deletions(-) commit faf99b563558f74188b7ca34faae1c1da49a7261 Author: Stefan Roesch Date: Thu Jun 23 10:51:51 2022 -0700 fs: add __remove_file_privs() with flags parameter This adds the function __remove_file_privs, which allows the caller to pass the kiocb flags parameter. No intended functional changes in this patch. Signed-off-by: Stefan Roesch Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Christian Brauner (Microsoft) Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20220623175157.1715274-9-shr@fb.com Signed-off-by: Jens Axboe fs/inode.c | 57 +++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 20 deletions(-) commit 8017553980d0bbfef3e66c583363828565afd6da Author: Stefan Roesch Date: Thu Jun 23 10:51:50 2022 -0700 fs: add a FMODE_BUF_WASYNC flags for f_mode This introduces the flag FMODE_BUF_WASYNC. If devices support async buffered writes, this flag can be set. It also modifies the check in generic_write_checks to take async buffered writes into consideration. Signed-off-by: Stefan Roesch Reviewed-by: Christoph Hellwig Reviewed-by: Christian Brauner (Microsoft) Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20220623175157.1715274-8-shr@fb.com Signed-off-by: Jens Axboe fs/read_write.c | 4 +++- include/linux/fs.h | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 18e419f6e80a6d3c8aaab94abd55c3b41741d8df Author: Stefan Roesch Date: Thu Jun 23 10:51:49 2022 -0700 iomap: Return -EAGAIN from iomap_write_iter() If iomap_write_iter() encounters -EAGAIN, return -EAGAIN to the caller. Signed-off-by: Stefan Roesch Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20220623175157.1715274-7-shr@fb.com Reviewed-by: Christoph Hellwig [axboe: make the suggested ternary edit] Signed-off-by: Jens Axboe fs/iomap/buffered-io.c | 4 ++++ 1 file changed, 4 insertions(+) commit cae2de6978915991a564e3c5c69b66b629c031af Author: Stefan Roesch Date: Thu Jun 23 10:51:48 2022 -0700 iomap: Add async buffered write support This adds async buffered write support to iomap. This replaces the call to balance_dirty_pages_ratelimited() with the call to balance_dirty_pages_ratelimited_flags. This allows to specify if the write request is async or not. In addition this also moves the above function call to the beginning of the function. If the function call is at the end of the function and the decision is made to throttle writes, then there is no request that io-uring can wait on. By moving it to the beginning of the function, the write request is not issued, but returns -EAGAIN instead. io-uring will punt the request and process it in the io-worker. By moving the function call to the beginning of the function, the write throttling will happen one page later. Signed-off-by: Stefan Roesch Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20220623175157.1715274-6-shr@fb.com Signed-off-by: Jens Axboe fs/iomap/buffered-io.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) commit 9753b868fda48330ce358df203c0069ac0788ac0 Author: Stefan Roesch Date: Thu Jun 23 10:51:47 2022 -0700 iomap: Add flags parameter to iomap_page_create() Add the kiocb flags parameter to the function iomap_page_create(). Depending on the value of the flags parameter it enables different gfp flags. No intended functional changes in this patch. Signed-off-by: Stefan Roesch Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20220623175157.1715274-5-shr@fb.com Signed-off-by: Jens Axboe fs/iomap/buffered-io.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit fe6c9c6e3e3e332b998393d214fba9d09ab0acb0 Author: Jan Kara Date: Thu Jun 23 10:51:46 2022 -0700 mm: Add balance_dirty_pages_ratelimited_flags() function This adds the helper function balance_dirty_pages_ratelimited_flags(). It adds the parameter flags to balance_dirty_pages_ratelimited(). The flags parameter is passed to balance_dirty_pages(). For async buffered writes the flag value will be BDP_ASYNC. If balance_dirty_pages() gets called for async buffered write, we don't want to wait. Instead we need to indicate to the caller that throttling is needed so that it can stop writing and offload the rest of the write to a context that can block. The new helper function is also used by balance_dirty_pages_ratelimited(). Signed-off-by: Jan Kara Signed-off-by: Stefan Roesch Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220623175157.1715274-4-shr@fb.com [axboe: fix kerneltest bot 'ret' issue] Signed-off-by: Jens Axboe include/linux/writeback.h | 7 +++++++ mm/page-writeback.c | 51 +++++++++++++++++++++++++++++++++++++---------- 2 files changed, 48 insertions(+), 10 deletions(-) commit e92eebbb09218e128e559cf12b65317721309324 Author: Jan Kara Date: Thu Jun 23 10:51:45 2022 -0700 mm: Move updates of dirty_exceeded into one place Transition of wb->dirty_exceeded from 0 to 1 happens before we go to sleep in balance_dirty_pages() while transition from 1 to 0 happens when exiting from balance_dirty_pages(), possibly based on old values. This does not make a lot of sense since wb->dirty_exceeded should simply reflect whether wb is over dirty limit and so we should ratelimit entering to balance_dirty_pages() less. Move the two updates together. Signed-off-by: Jan Kara Signed-off-by: Stefan Roesch Link: https://lore.kernel.org/r/20220623175157.1715274-3-shr@fb.com Signed-off-by: Jens Axboe mm/page-writeback.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit ea6813be07dcdc072aa9ad18099115a74cecb5e1 Author: Jan Kara Date: Thu Jun 23 10:51:44 2022 -0700 mm: Move starting of background writeback into the main balancing loop We start background writeback if we are over background threshold after exiting the main loop in balance_dirty_pages(). This may result in basing the decision on already stale values (we may have slept for significant amount of time) and it is also inconvenient for refactoring needed for async dirty throttling. Move the check into the main waiting loop. Signed-off-by: Jan Kara Signed-off-by: Stefan Roesch Link: https://lore.kernel.org/r/20220623175157.1715274-2-shr@fb.com Signed-off-by: Jens Axboe mm/page-writeback.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit f6b543fd03d347e8bf245cee4f2d54eb6ffd8fcb Author: Jens Axboe Date: Thu Jul 21 09:06:47 2022 -0600 io_uring: ensure REQ_F_ISREG is set async offload If we're offloading requests directly to io-wq because IOSQE_ASYNC was set in the sqe, we can miss hashing writes appropriately because we haven't set REQ_F_ISREG yet. This can cause a performance regression with buffered writes, as io-wq then no longer correctly serializes writes to that file. Ensure that we set the flags in io_prep_async_work(), which will cause the io-wq work item to be hashed appropriately. Fixes: 584b0180f0f4 ("io_uring: move read/write file prep state into actual opcode handler") Link: https://lore.kernel.org/io-uring/20220608080054.GB22428@xsang-OptiPlex-9020/ Reported-by: kernel test robot Tested-by: Yin Fengwei Signed-off-by: Jens Axboe io_uring/io_uring.c | 3 +++ io_uring/io_uring.h | 5 +++++ io_uring/rw.c | 5 ----- 3 files changed, 8 insertions(+), 5 deletions(-) commit 4f6a94d337408f23e199eee7d35ed6edc201df0c Author: Jens Axboe Date: Fri Jul 15 15:54:47 2022 -0600 net: fix compat pointer in get_compat_msghdr() A previous change enabled external users to copy the data before calling __get_compat_msghdr(), but didn't modify get_compat_msghdr() or __io_compat_recvmsg_copy_hdr() to take that into account. They are both stil passing in the __user pointer rather than the copied version. Ensure we pass in the kernel struct, not the pointer to the user data. Link: https://lore.kernel.org/all/46439555-644d-08a1-7d66-16f8f9a320f0@samsung.com/ Fixes: 1a3e4e94a1b9 ("net: copy from user before calling __get_compat_msghdr") Reported-by: Marek Szyprowski Signed-off-by: Jens Axboe io_uring/net.c | 2 +- net/compat.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 48904229928d941ce1db181b991948387ab463cd Author: Michal Koutný Date: Fri Jul 15 19:45:01 2022 +0200 io_uring: Don't require reinitable percpu_ref The commit 8bb649ee1da3 ("io_uring: remove ring quiesce for io_uring_register") removed the worklow relying on reinit/resurrection of the percpu_ref, hence, initialization with that requested is a relic. This is based on code review, this causes no real bug (and theoretically can't). Technically it's a revert of commit 214828962dea ("io_uring: initialize percpu refcounters using PERCU_REF_ALLOW_REINIT") but since the flag omission is now justified, I'm not making this a revert. Fixes: 8bb649ee1da3 ("io_uring: remove ring quiesce for io_uring_register") Signed-off-by: Michal Koutný Acked-by: Roman Gushchin Signed-off-by: Jens Axboe io_uring/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b0fc3c054ff2eb13753104884f1045b5bb3a627 Author: Dylan Yudaken Date: Fri Jul 15 06:02:52 2022 -0700 io_uring: fix types in io_recvmsg_multishot_overflow io_recvmsg_multishot_overflow had incorrect types on non x64 system. But also it had an unnecessary INT_MAX check, which could just be done by changing the type of the accumulator to int (also simplifying the casts). Reported-by: Stephen Rothwell Fixes: a8b38c4ce724 ("io_uring: support multishot in recvmsg") Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220715130252.610639-1-dylany@fb.com Signed-off-by: Jens Axboe io_uring/net.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4ccc6db0900fe337212b61650663a5dcedb69f25 Author: Uros Bizjak Date: Thu Jul 14 18:33:01 2022 +0200 io_uring: Use atomic_long_try_cmpxchg in __io_account_mem Use atomic_long_try_cmpxchg instead of atomic_long_cmpxchg (*ptr, old, new) == old in __io_account_mem. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). Also, atomic_long_try_cmpxchg implicitly assigns old *ptr value to "old" when cmpxchg fails, enabling further code simplifications. No functional change intended. Signed-off-by: Uros Bizjak Cc: Jens Axboe Cc: Pavel Begunkov Signed-off-by: Jens Axboe io_uring/rsrc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 9bb66906f23e50d6db1e11f7498b72dfca1982a2 Author: Dylan Yudaken Date: Thu Jul 14 04:02:58 2022 -0700 io_uring: support multishot in recvmsg Similar to multishot recv, this will require provided buffers to be used. However recvmsg is much more complex than recv as it has multiple outputs. Specifically flags, name, and control messages. Support this by introducing a new struct io_uring_recvmsg_out with 4 fields. namelen, controllen and flags match the similar out fields in msghdr from standard recvmsg(2), payloadlen is the length of the payload following the header. This struct is placed at the start of the returned buffer. Based on what the user specifies in struct msghdr, the next bytes of the buffer will be name (the next msg_namelen bytes), and then control (the next msg_controllen bytes). The payload will come at the end. The return value in the CQE is the total used size of the provided buffer. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220714110258.1336200-4-dylany@fb.com [axboe: style fixups, see link] Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 7 ++ io_uring/net.c | 180 +++++++++++++++++++++++++++++++++++++----- io_uring/net.h | 6 ++ 3 files changed, 174 insertions(+), 19 deletions(-) commit 72c531f8ef3052c682d39dc21dcb5576afda208c Author: Dylan Yudaken Date: Thu Jul 14 04:02:57 2022 -0700 net: copy from user before calling __get_compat_msghdr this is in preparation for multishot receive from io_uring, where it needs to have access to the original struct user_msghdr. functionally this should be a no-op. Acked-by: Paolo Abeni Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220714110258.1336200-3-dylany@fb.com Signed-off-by: Jens Axboe include/net/compat.h | 5 ++--- io_uring/net.c | 17 +++++++++-------- net/compat.c | 39 +++++++++++++++++---------------------- 3 files changed, 28 insertions(+), 33 deletions(-) commit 7fa875b8e53c288d616234b9daf417b0650ce1cc Author: Dylan Yudaken Date: Thu Jul 14 04:02:56 2022 -0700 net: copy from user before calling __copy_msghdr this is in preparation for multishot receive from io_uring, where it needs to have access to the original struct user_msghdr. functionally this should be a no-op. Acked-by: Paolo Abeni Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220714110258.1336200-2-dylany@fb.com Signed-off-by: Jens Axboe include/linux/socket.h | 7 +++---- io_uring/net.c | 17 +++++++++-------- net/socket.c | 37 ++++++++++++++++--------------------- 3 files changed, 28 insertions(+), 33 deletions(-) commit 6d2f75a0cf3048ef38c48493f66a923353bf664b Author: Dylan Yudaken Date: Fri Jul 8 11:18:36 2022 -0700 io_uring: support 0 length iov in buffer select in compat Match up work done in "io_uring: allow iov_len = 0 for recvmsg and buffer select", but for compat code path. Fixes: a68caad69ce5 ("io_uring: allow iov_len = 0 for recvmsg and buffer select") Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220708181838.1495428-3-dylany@fb.com Signed-off-by: Jens Axboe io_uring/net.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit e2df2ccb753e3b598a9045760e79f1847f7b31cd Author: Dylan Yudaken Date: Fri Jul 8 11:18:35 2022 -0700 io_uring: fix multishot ending when not polled If multishot is not actually polling then return IOU_OK rather than the result. If the result was > 0 this will confuse things further up the callstack which expect a return <= 0. Fixes: 1300ebb20286 ("io_uring: multishot recv") Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220708181838.1495428-2-dylany@fb.com Signed-off-by: Jens Axboe io_uring/net.c | 2 ++ 1 file changed, 2 insertions(+) commit 43e0bbbd0b0e30d232fd8e9e908125b5c49a9fbc Author: Jens Axboe Date: Thu Jul 7 14:30:09 2022 -0600 io_uring: add netmsg cache For recvmsg/sendmsg, if they don't complete inline, we currently need to allocate a struct io_async_msghdr for each request. This is a somewhat large struct. Hook up sendmsg/recvmsg to use the io_alloc_cache. This reduces the alloc + free overhead considerably, yielding 4-5% of extra performance running netbench. Signed-off-by: Jens Axboe include/linux/io_uring_types.h | 6 ++-- io_uring/io_uring.c | 3 ++ io_uring/net.c | 63 ++++++++++++++++++++++++++++++++++++------ io_uring/net.h | 13 ++++++++- 4 files changed, 73 insertions(+), 12 deletions(-) commit 9731bc9855dc169f27433fef3c4d0ff3496c512d Author: Jens Axboe Date: Thu Jul 7 14:20:54 2022 -0600 io_uring: impose max limit on apoll cache Caches like this tend to grow to the peak size, and then never get any smaller. Impose a max limit on the size, to prevent it from growing too big. A somewhat randomly chosen 512 is the max size we'll allow the cache to get. If a batch of frees come in and would bring it over that, we simply start kfree'ing the surplus. Signed-off-by: Jens Axboe include/linux/io_uring_types.h | 1 + io_uring/alloc_cache.h | 16 ++++++++++++++-- io_uring/io_uring.c | 3 ++- 3 files changed, 17 insertions(+), 3 deletions(-) commit 9b797a37c4bd83b03cedcfbd15852b836f5e562c Author: Jens Axboe Date: Thu Jul 7 14:16:20 2022 -0600 io_uring: add abstraction around apoll cache In preparation for adding limits, and one more user, abstract out the core bits of the allocation+free cache. Signed-off-by: Jens Axboe include/linux/io_uring_types.h | 6 +++++- io_uring/alloc_cache.h | 41 +++++++++++++++++++++++++++++++++++++++++ io_uring/io_uring.c | 8 ++++---- io_uring/poll.c | 18 +++++------------- io_uring/poll.h | 9 +++++++-- 5 files changed, 62 insertions(+), 20 deletions(-) commit 9da7471ed10dab52410062be74896a6c0aa1bf3a Author: Jens Axboe Date: Thu Jul 7 11:18:33 2022 -0600 io_uring: move apoll cache to poll.c This is where it's used, move the flush handler in there. Signed-off-by: Jens Axboe io_uring/io_uring.c | 12 ------------ io_uring/poll.c | 12 ++++++++++++ io_uring/poll.h | 2 ++ 3 files changed, 14 insertions(+), 12 deletions(-) commit e8375e43ca2d67f31b2408092eee4f91e1e140f4 Author: Pavel Begunkov Date: Thu Jul 7 15:13:17 2022 +0100 io_uring: consolidate hash_locked io-wq handling Don't duplicate code disabling REQ_F_HASH_LOCKED for IO_URING_F_UNLOCKED (i.e. io-wq), move the handling into __io_arm_poll_handler(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/0ff0ffdfaa65b3d536131535c3dad3c63d9b7bb0.1657203020.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit b21a51e26e9aed66159c2c18651da22d585d2998 Author: Pavel Begunkov Date: Thu Jul 7 15:13:16 2022 +0100 io_uring: clear REQ_F_HASH_LOCKED on hash removal Instead of clearing REQ_F_HASH_LOCKED while arming a poll, unset the bit when we're removing the entry from the table in io_poll_tw_hash_eject(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/02e48bb88d6f1480c94ac2924c43ad1fbd48e92a.1657203020.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit ceff501790a9789c748a9b851f30f4f7e2fe4d72 Author: Pavel Begunkov Date: Thu Jul 7 15:13:15 2022 +0100 io_uring: don't race double poll setting REQ_F_ASYNC_DATA Just as with io_poll_double_prepare() setting REQ_F_DOUBLE_POLL, we can race with the first poll entry when setting REQ_F_ASYNC_DATA. Move it under io_poll_double_prepare(). Fixes: a18427bb2d9b ("io_uring: optimise submission side poll_refs") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/df6920f509c11115aa2bce8b34dc5fdb0eb98920.1657203020.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7a121ced6e6430d49fb802067b4f020f6df62362 Author: Pavel Begunkov Date: Thu Jul 7 15:13:14 2022 +0100 io_uring: don't miss setting REQ_F_DOUBLE_POLL When adding a second poll entry we should set REQ_F_DOUBLE_POLL unconditionally. We might race with the first entry removal but that doesn't change the rule. Fixes: a18427bb2d9b ("io_uring: optimise submission side poll_refs") Reported-and-tested-by: syzbot+49950ba66096b1f0209b@syzkaller.appspotmail.com Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/8b680d83ded07424db83e8745585e7a6d72826ef.1657203020.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit cf0dd9527eee5d6d183fa724fdee6a128cb17b8d Author: Dylan Yudaken Date: Mon Jul 4 07:01:06 2022 -0700 io_uring: disable multishot recvmsg recvmsg has semantics that do not make it trivial to extend to multishot. Specifically it has user pointers and returns data in the original parameter. In order to make this API useful these will need to be somehow included with the provided buffers. For now remove multishot for recvmsg as it is not useful. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220704140106.200167-1-dylany@fb.com Signed-off-by: Jens Axboe io_uring/net.c | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) commit e0486f3f7c1b6ab7ba7e912bf48d17f04e71d86d Author: Dylan Yudaken Date: Thu Jun 30 02:12:31 2022 -0700 io_uring: only trace one of complete or overflow In overflow we see a duplcate line in the trace, and in some cases 3 lines (if initial io_post_aux_cqe fails). Instead just trace once for each CQE Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220630091231.1456789-13-dylany@fb.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 3 ++- io_uring/io_uring.h | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) commit 9b26e811e934eebda59362c9a03d082852552574 Author: Dylan Yudaken Date: Thu Jun 30 02:12:30 2022 -0700 io_uring: fix io_uring_cqe_overflow trace format Make the trace format consistent with io_uring_complete for cflags Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220630091231.1456789-12-dylany@fb.com Signed-off-by: Jens Axboe include/trace/events/io_uring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3fdea6ecb55c3ceea866ff66486927e51a982b3 Author: Dylan Yudaken Date: Thu Jun 30 02:12:29 2022 -0700 io_uring: multishot recv Support multishot receive for io_uring. Typical server applications will run a loop where for each recv CQE it requeues another recv/recvmsg. This can be simplified by using the existing multishot functionality combined with io_uring's provided buffers. The API is to add the IORING_RECV_MULTISHOT flag to the SQE. CQEs will then be posted (with IORING_CQE_F_MORE flag set) when data is available and is read. Once an error occurs or the socket ends, the multishot will be removed and a completion without IORING_CQE_F_MORE will be posted. The benefit to this is that the recv is much more performant. * Subsequent receives are queued up straight away without requiring the application to finish a processing loop. * If there are more data in the socket (sat the provided buffer size is smaller than the socket buffer) then the data is immediately returned, improving batching. * Poll is only armed once and reused, saving CPU cycles Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220630091231.1456789-11-dylany@fb.com Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 5 +++ io_uring/net.c | 102 ++++++++++++++++++++++++++++++++++++------ 2 files changed, 94 insertions(+), 13 deletions(-) commit cbd25748545c709d35734deb9220e0af0a69e5d2 Author: Dylan Yudaken Date: Thu Jun 30 02:12:28 2022 -0700 io_uring: fix multishot accept ordering Similar to multishot poll, drop multishot accept when CQE overflow occurs. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220630091231.1456789-10-dylany@fb.com Signed-off-by: Jens Axboe io_uring/net.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit a2da676376feb79224eacb9ac1f554bb3232b5de Author: Dylan Yudaken Date: Thu Jun 30 02:12:27 2022 -0700 io_uring: fix multishot poll on overflow On overflow, multishot poll can still complete with the IORING_CQE_F_MORE flag set. If in the meantime the user clears a CQE and a the poll was cancelled then the poll will post a CQE without the IORING_CQE_F_MORE (and likely result -ECANCELED). However when processing the application will encounter the non-overflow CQE which indicates that there will be no more events posted. Typical userspace applications would free memory associated with the poll in this case. It will then subsequently receive the earlier CQE which has overflowed, which breaks the contract given by the IORING_CQE_F_MORE flag. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220630091231.1456789-9-dylany@fb.com Signed-off-by: Jens Axboe io_uring/poll.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 52120f0fadcbdaaa981c19327f1865a714e85268 Author: Dylan Yudaken Date: Thu Jun 30 02:12:26 2022 -0700 io_uring: add allow_overflow to io_post_aux_cqe Some use cases of io_post_aux_cqe would not want to overflow as is, but might want to change the flags/result. For example multishot receive requires in order CQE, and so if there is an overflow it would need to stop receiving until the overflow is taken care of. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220630091231.1456789-8-dylany@fb.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 14 ++++++++++---- io_uring/io_uring.h | 3 ++- io_uring/msg_ring.c | 4 ++-- io_uring/net.c | 2 +- io_uring/poll.c | 2 +- io_uring/rsrc.c | 4 ++-- 6 files changed, 18 insertions(+), 11 deletions(-) commit 114eccdf0e368893b3d92e06e9788d9d94876853 Author: Dylan Yudaken Date: Thu Jun 30 02:12:25 2022 -0700 io_uring: add IOU_STOP_MULTISHOT return code For multishot we want a way to signal the caller that multishot has ended but also this might not be an error return. For example sockets return 0 when closed, which should end a multishot recv, but still have a CQE with result 0 Introduce IOU_STOP_MULTISHOT which does this and indicates that the return code is stored inside req->cqe Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220630091231.1456789-7-dylany@fb.com Signed-off-by: Jens Axboe io_uring/io_uring.h | 7 +++++++ io_uring/poll.c | 11 +++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) commit 2ba69707d9153eeca1ee8ac1bc55376b88978842 Author: Dylan Yudaken Date: Thu Jun 30 02:12:24 2022 -0700 io_uring: clean up io_poll_check_events return values The values returned are a bit confusing, where 0 and 1 have implied meaning, so add some definitions for them. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220630091231.1456789-6-dylany@fb.com Signed-off-by: Jens Axboe io_uring/poll.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit d4e097dae29c24bf33a5056a2a43cff2e45c4978 Author: Dylan Yudaken Date: Thu Jun 30 02:12:23 2022 -0700 io_uring: recycle buffers on error Rather than passing an error back to the user with a buffer attached, recycle the buffer immediately. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220630091231.1456789-5-dylany@fb.com Signed-off-by: Jens Axboe io_uring/net.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 5702196e7d9d1232c41769e197eb33ba78a9b463 Author: Dylan Yudaken Date: Thu Jun 30 02:12:22 2022 -0700 io_uring: allow iov_len = 0 for recvmsg and buffer select When using BUFFER_SELECT there is no technical requirement that the user actually provides iov, and this removes one copy_from_user call. So allow iov_len to be 0. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220630091231.1456789-4-dylany@fb.com Signed-off-by: Jens Axboe io_uring/net.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 32f3c434b14238a2eee0c726a1918de58c07faf6 Author: Dylan Yudaken Date: Thu Jun 30 02:12:21 2022 -0700 io_uring: restore bgid in io_put_kbuf Attempt to restore bgid. This is needed when recycling unused buffers as the next time around it will want the correct bgid. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220630091231.1456789-3-dylany@fb.com Signed-off-by: Jens Axboe io_uring/kbuf.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit b8c015598c8ef9195b8a2a5089e275c4f64ca999 Author: Dylan Yudaken Date: Thu Jun 30 02:12:20 2022 -0700 io_uring: allow 0 length for buffer select If user gives 0 for length, we can set it from the available buffer size. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220630091231.1456789-2-dylany@fb.com Signed-off-by: Jens Axboe io_uring/kbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6e73dffbb93cb8797cd4e42e98d837edf0f1a967 Author: Pavel Begunkov Date: Sat Jun 25 11:55:38 2022 +0100 io_uring: let to set a range for file slot allocation From recently io_uring provides an option to allocate a file index for operation registering fixed files. However, it's utterly unusable with mixed approaches when for a part of files the userspace knows better where to place it, as it may race and users don't have any sane way to pick a slot and hoping it will not be taken. Let the userspace to register a range of fixed file slots in which the auto-allocation happens. The use case is splittting the fixed table in two parts, where on of them is used for auto-allocation and another for slot-specified operations. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/66ab0394e436f38437cf7c44676e1920d09687ad.1656154403.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/linux/io_uring_types.h | 3 +++ include/uapi/linux/io_uring.h | 13 +++++++++++++ io_uring/filetable.c | 24 ++++++++++++++++++++---- io_uring/filetable.h | 20 +++++++++++++++++--- io_uring/io_uring.c | 6 ++++++ io_uring/rsrc.c | 2 ++ 6 files changed, 61 insertions(+), 7 deletions(-) commit e6130eba8a848a7a6ba6c534bd8f6d60749ae1a9 Author: Jens Axboe Date: Mon Jun 13 04:47:02 2022 -0600 io_uring: add support for passing fixed file descriptors With IORING_OP_MSG_RING, one ring can send a message to another ring. Extend that support to also allow sending a fixed file descriptor to that ring, enabling one ring to pass a registered descriptor to another one. Arguments are extended to pass in: sqe->addr3 fixed file slot in source ring sqe->file_index fixed file slot in destination ring IORING_OP_MSG_RING is extended to take a command argument in sqe->addr. If set to zero (or IORING_MSG_DATA), it sends just a message like before. If set to IORING_MSG_SEND_FD, a fixed file descriptor is sent according to the above arguments. Two common use cases for this are: 1) Server needs to be shutdown or restarted, pass file descriptors to another onei 2) Backend is split, and one accepts connections, while others then get the fd passed and handle the actual connection. Both of those are classic SCM_RIGHTS use cases, and it's not possible to support them with direct descriptors today. By default, this will post a CQE to the target ring, similarly to how IORING_MSG_DATA does it. If IORING_MSG_RING_CQE_SKIP is set, no message is posted to the target ring. The issuer is expected to notify the receiver side separately. Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 17 ++++++ io_uring/msg_ring.c | 130 +++++++++++++++++++++++++++++++++++++++--- 2 files changed, 140 insertions(+), 7 deletions(-) commit f110ed8498afa6ff8e9a8c08fb26880e02117616 Author: Jens Axboe Date: Mon Jun 13 04:42:56 2022 -0600 io_uring: split out fixed file installation and removal Put it with the filetable code, which is where it belongs. While doing so, have the helpers take a ctx rather than an io_kiocb. It doesn't make sense to use a request, as it's not an operation on the request itself. It applies to the ring itself. Signed-off-by: Jens Axboe io_uring/filetable.c | 66 ++++++++++++++++++++++++++++++++++++++++------------ io_uring/filetable.h | 3 +++ io_uring/openclose.c | 35 ++++------------------------ io_uring/openclose.h | 2 +- io_uring/rsrc.c | 2 +- 5 files changed, 60 insertions(+), 48 deletions(-) commit 8fcf4c48f44bd7b1b75db139f56ff1ad6477379e Author: Gustavo A. R. Silva Date: Tue Jun 28 21:33:20 2022 +0200 io_uring: 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.16/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/78 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbb8bb02911790147ea936f3b1c5ceb1be54bf34 Author: Pavel Begunkov Date: Sat Jun 25 11:53:02 2022 +0100 io_uring: remove ctx->refs pinning on enter io_uring_enter() takes ctx->refs, which was previously preventing racing with register quiesce. However, as register now doesn't touch the refs, we can freely kill extra ctx pinning and rely on the fact that we're holding a file reference preventing the ring from being destroyed. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a11c57ad33a1be53541fce90669c1b79cf4d8940.1656153286.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 3273c4407acd4348b1531e1f860fbf1da942893b Author: Pavel Begunkov Date: Sat Jun 25 11:53:01 2022 +0100 io_uring: don't check file ops of registered rings Registered rings are per definitions io_uring files, so we don't need to additionally verify them. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/425cd64fd885b8e329a46c205ee811987691baaf.1656153286.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit ad8b261d837400cb7ccc339e81d7c35ab018acd8 Author: Pavel Begunkov Date: Sat Jun 25 11:53:00 2022 +0100 io_uring: remove extra TIF_NOTIFY_SIGNAL check io_run_task_work() accounts for TIF_NOTIFY_SIGNAL, so no need to have an second check in io_run_task_work_sig(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/52ce41a592ad904511697f432141e5690fd4b968.1656153285.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 2 -- 1 file changed, 2 deletions(-) commit 3218e5d32dbcf1b9c6dc589eca21deebb14215fa Author: Pavel Begunkov Date: Sat Jun 25 11:52:59 2022 +0100 io_uring: fuse fallback_node and normal tw node Now as both normal and fallback paths use llist, just keep one node head in struct io_task_work and kill off ->fallback_node. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d04ebde409f7b162fe247b361b4486b193293e46.1656153285.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/linux/io_uring_types.h | 5 +---- io_uring/io_uring.c | 5 ++--- 2 files changed, 3 insertions(+), 7 deletions(-) commit 37c7bd31b3e9e4b6aee3c5227f789c0b586a33a2 Author: Pavel Begunkov Date: Sat Jun 25 11:52:58 2022 +0100 io_uring: improve io_fail_links() io_fail_links() is called with ->completion_lock held and for that reason we'd want to keep it as small as we can. Instead of doing __io_req_complete_post() for each linked request under the lock, fail them in a task_work handler under ->uring_lock. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a2f68708b970a21f4e84ddfa7b3abd67a8fffb27.1656153285.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/timeout.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) commit fe991a7688f894a74a6f6b4933bf6cd5fa086c1b Author: Jens Axboe Date: Tue Jun 21 14:34:15 2022 -0600 io_uring: move POLLFREE handling to separate function We really don't care about this at all in terms of performance. Outside of having it already be marked unlikely(), shove it into a separate __cold function. Signed-off-by: Jens Axboe io_uring/poll.c | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) commit 795bbbc8a9a1bbbafce762c706bfb5733c9d0426 Author: Hao Xu Date: Thu Jun 23 21:01:26 2022 +0800 io_uring: kbuf: inline io_kbuf_recycle_ring() Make io_kbuf_recycle_ring() inline since it is the fast path of provided buffer. Signed-off-by: Hao Xu Link: https://lore.kernel.org/r/20220623130126.179232-1-hao.xu@linux.dev Signed-off-by: Jens Axboe io_uring/kbuf.c | 28 ---------------------------- io_uring/kbuf.h | 28 +++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 29 deletions(-) commit 49f1c68e048f1706b71c8255faf8110113d1cc48 Author: Pavel Begunkov Date: Thu Jun 23 14:24:49 2022 +0100 io_uring: optimise submission side poll_refs The final poll_refs put in __io_arm_poll_handler() takes quite some cycles. When we're arming from the original task context task_work won't be run, so in this case we can assume that we won't race with task_works and so not take the initial ownership ref. One caveat is that after arming a poll we may race with it, so we have to add a bunch of io_poll_get_ownership() hidden inside of io_poll_can_finish_inline() whenever we want to complete arming inline. For the same reason we can't just set REQ_F_DOUBLE_POLL in __io_queue_proc() and so need to sync with the first poll entry by taking its wq head lock. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/8825315d7f5e182ac1578a031e546f79b1c97d01.1655990418.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 88 +++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 67 insertions(+), 21 deletions(-) commit de08356f4858628fdffb8bd7e9cceb60c7e08ead Author: Pavel Begunkov Date: Thu Jun 23 14:24:48 2022 +0100 io_uring: refactor poll arm error handling __io_arm_poll_handler() errors parsing is a horror, in case it failed it returns 0 and the caller is expected to look at ipt.error, which already led us to a number of problems before. When it returns a valid mask, leave it as it's not, i.e. return 1 and store the mask in ipt.result_mask. In case of a failure that can be handled inline return an error code (negative value), and return 0 if __io_arm_poll_handler() took ownership of the request and will complete it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/018cacdaef5fe95d7dc56b32e85d752cab7607f6.1655990418.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) commit 063a007996bf725ba4c7d8741701670be9858300 Author: Pavel Begunkov Date: Thu Jun 23 14:24:47 2022 +0100 io_uring: change arm poll return values The rules for __io_arm_poll_handler()'s result parsing are complicated, as the first step don't pass return a mask but pass back a positive return code and fill ipt->result_mask. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/529e29e9f97f2e6e383ccd44234d8b576a83a921.1655990418.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 5204aa8c43bd1c3428b8979229183ae8269a8c09 Author: Pavel Begunkov Date: Thu Jun 23 14:24:46 2022 +0100 io_uring: add a helper for apoll alloc Extract a helper function for apoll allocation, makes the code easier to read. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/2f93282b47dd678e805dd0d7097f66968ced495c.1655990418.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) commit 13a99017ff19f179b51e1c51559a9d7005df1830 Author: Pavel Begunkov Date: Thu Jun 23 14:24:45 2022 +0100 io_uring: remove events caching atavisms Remove events argument from *io_poll_execute(), it's not needed and not used. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/12efd4e15c6a90cf9e5b59807cfcb57852b51dc7.1655990418.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 0638cd7be21221c7b583a4901e25e63d96112395 Author: Pavel Begunkov Date: Thu Jun 23 14:24:44 2022 +0100 io_uring: clean poll ->private flagging We store a req pointer in wqe->private but also take one bit to mark double poll entries. Replace macro helpers with inline functions for better type checking and also name the double flag. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9a61240555c64ac0b7a9b0eb59a9efeb638a35a4.1655990418.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 78a861b9495920f8609dee5b670dacbff09d359f Author: Jens Axboe Date: Sat Jun 18 10:00:50 2022 -0600 io_uring: add sync cancelation API through io_uring_register() The io_uring cancelation API is async, like any other API that we expose there. For the case of finding a request to cancel, or not finding one, it is fully sync in that when submission returns, the CQE for both the cancelation request and the targeted request have been posted to the CQ ring. However, if the targeted work is being executed by io-wq, the API can only start the act of canceling it. This makes it difficult to use in some circumstances, as the caller then has to wait for the CQEs to come in and match on the same cancelation data there. Provide a IORING_REGISTER_SYNC_CANCEL command for io_uring_register() that does sync cancelations, always. For the io-wq case, it'll wait for the cancelation to come in before returning. The only expected returns from this API is: 0 Request found and canceled fine. > 0 Requests found and canceled. Only happens if asked to cancel multiple requests, and if the work wasn't in progress. -ENOENT Request not found. -ETIME A timeout on the operation was requested, but the timeout expired before we could cancel. and we won't get -EALREADY via this API. If the timeout value passed in is -1 (tv_sec and tv_nsec), then that means that no timeout is requested. Otherwise, the timespec passed in is the amount of time the sync cancel will wait for a successful cancelation. Link: https://github.com/axboe/liburing/discussions/608 Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 15 ++++++ io_uring/cancel.c | 107 ++++++++++++++++++++++++++++++++++++++++++ io_uring/cancel.h | 2 + io_uring/io_uring.c | 6 +++ 4 files changed, 130 insertions(+) commit 7d8ca7250197096bfa9f432c1d99b0555504bbba Author: Jens Axboe Date: Sat Jun 18 09:47:04 2022 -0600 io_uring: add IORING_ASYNC_CANCEL_FD_FIXED cancel flag In preparation for not having a request to pass in that carries this state, add a separate cancelation flag that allows the caller to ask for a fixed file for cancelation. Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 2 ++ io_uring/cancel.c | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) commit 88f52eaad2df2cb5ab49b864d79398c9cb9a57f2 Author: Jens Axboe Date: Sat Jun 18 09:23:54 2022 -0600 io_uring: have cancelation API accept io_uring_task directly We just use the io_kiocb passed in to find the io_uring_task, and we already pass in the ctx via cd->ctx anyway. Signed-off-by: Jens Axboe io_uring/cancel.c | 17 +++++++++-------- io_uring/cancel.h | 2 +- io_uring/timeout.c | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) commit 024b8fde3320ea34d7a5a3fc9dbc47ec736cd8eb Author: Hao Xu Date: Wed Jun 22 13:55:51 2022 +0800 io_uring: kbuf: kill __io_kbuf_recycle() __io_kbuf_recycle() is only called in io_kbuf_recycle(). Kill it and tweak the code so that the legacy pbuf and ring pbuf code become clear Signed-off-by: Hao Xu Link: https://lore.kernel.org/r/20220622055551.642370-1-hao.xu@linux.dev Signed-off-by: Jens Axboe io_uring/kbuf.c | 71 ++++++++++++++++++++++++++++++++++----------------------- io_uring/kbuf.h | 21 ++++++----------- 2 files changed, 49 insertions(+), 43 deletions(-) commit c6dd763c246024ed0dd603db4284cbd0bd164e27 Author: Dylan Yudaken Date: Wed Jun 22 06:40:28 2022 -0700 io_uring: trace task_work_run trace task_work_run to help provide stats on how often task work is run and what batch sizes are coming through. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220622134028.2013417-9-dylany@fb.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit eccd8801858f03a19a4d1f8fef27e3d6e17b21fd Author: Dylan Yudaken Date: Wed Jun 22 06:40:27 2022 -0700 io_uring: add trace event for running task work This is useful for investigating if task_work is batching Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220622134028.2013417-8-dylany@fb.com Signed-off-by: Jens Axboe include/trace/events/io_uring.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 3a0c037b0e16e38cf5d36d2ebc259e0ae644aaf4 Author: Dylan Yudaken Date: Wed Jun 22 06:40:25 2022 -0700 io_uring: batch task_work Batching task work up is an important performance optimisation, as task_work_add is expensive. In order to keep the semantics replace the task_list with a fake node while processing the old list, and then do a cmpxchg at the end to see if there is more work. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220622134028.2013417-6-dylany@fb.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 923d159247b732885b176b24e4bafad8eda5a477 Author: Dylan Yudaken Date: Wed Jun 22 06:40:24 2022 -0700 io_uring: introduce llist helpers Introduce helpers to atomically switch llist. Will later move this into common code Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220622134028.2013417-5-dylany@fb.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit f88262e60bb9cb5740891672ce9f405e7f9393e5 Author: Dylan Yudaken Date: Wed Jun 22 06:40:23 2022 -0700 io_uring: lockless task list With networking use cases we see contention on the spinlock used to protect the task_list when multiple threads try and add completions at once. Instead we can use a lockless list, and assume that the first caller to add to the list is responsible for kicking off task work. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220622134028.2013417-4-dylany@fb.com Signed-off-by: Jens Axboe include/linux/io_uring_types.h | 2 +- io_uring/io_uring.c | 38 +++++++++----------------------------- io_uring/tctx.c | 3 +-- io_uring/tctx.h | 6 +++--- 4 files changed, 14 insertions(+), 35 deletions(-) commit c34398a8c018e0d3d2d30b718d03c7290c696f51 Author: Dylan Yudaken Date: Wed Jun 22 06:40:22 2022 -0700 io_uring: remove __io_req_task_work_add this is no longer needed as there is only one caller Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220622134028.2013417-3-dylany@fb.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit ed5ccb3beeba0cadb0fcf353ae192021dfecf252 Author: Dylan Yudaken Date: Wed Jun 22 06:40:21 2022 -0700 io_uring: remove priority tw list optimisation This optimisation has some built in assumptions that make it easy to introduce bugs. It also does not have clear wins that make it worth keeping. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20220622134028.2013417-2-dylany@fb.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 77 ++++++++--------------------------------------------- io_uring/io_uring.h | 1 - io_uring/rw.c | 2 +- io_uring/tctx.c | 1 - io_uring/tctx.h | 1 - 5 files changed, 12 insertions(+), 70 deletions(-) commit 024f15e033a52660a045947ee56c7e842180fa81 Author: Pavel Begunkov Date: Tue Jun 21 10:09:02 2022 +0100 io_uring: dedup io_run_task_work We have an identical copy of io_run_task_work() for io-wq called io_flush_signals(), deduplicate them. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a157a4df5fa217b8bd03c73494f2fd0e24e44fbc.1655802465.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/filetable.h | 2 ++ io_uring/io-wq.c | 17 +++-------------- 2 files changed, 5 insertions(+), 14 deletions(-) commit a6b21fbb4ce3c4976ba478a9f0f10d4163038478 Author: Pavel Begunkov Date: Tue Jun 21 10:09:01 2022 +0100 io_uring: move list helpers to a separate file It's annoying to have io-wq.h as a dependency every time we want some of struct io_wq_work_list helpers, move them into a separate file. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/c1d891ce12b30767d1d2a3b7db2ca3abc1ecc4a2.1655802465.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io-wq.c | 1 + io_uring/io-wq.h | 131 ------------------------------------------------- io_uring/io_uring.h | 1 + io_uring/slist.h | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 140 insertions(+), 131 deletions(-) commit 625d38b3fd34c58afb969810c4b3105eabb3b143 Author: Pavel Begunkov Date: Tue Jun 21 10:09:00 2022 +0100 io_uring: improve io_run_task_work() Since SQPOLL now uses TWA_SIGNAL_NO_IPI, there won't be task work items without TIF_NOTIFY_SIGNAL. Simplify io_run_task_work() by removing task->task_works check. Even though looks it doesn't cause extra cache bouncing, it's still nice to not touch it an extra time when it might be not cached. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/75d4f34b0c671075892821a409e28da6cb1d64fe.1655802465.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a0fef62788b69df09267c8e3f3f11d4bb9d50e7 Author: Pavel Begunkov Date: Mon Jun 20 15:27:35 2022 +0100 io_uring: optimize io_uring_task layout task_work bits of io_uring_task are split into two cache lines causing extra cache bouncing, place them into a separate cache line. Also move the most used submission path fields closer together, so there are hot. Cc: stable@vger.kernel.org # 5.15+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe io_uring/tctx.h | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit bce5d70cd64a5d48aff613334b8a5fac450b9753 Author: Pavel Begunkov Date: Mon Jun 20 01:26:01 2022 +0100 io_uring: add a warn_once for poll_find io_poll_remove() expects poll_find() to search only for poll requests and passes a flag for this. Just be a little bit extra cautious considering lots of recent poll/cancellation changes and add a WARN_ON_ONCE checking that we don't get an apoll'ed request. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/ec9a66f1e22f99dcd02288d4e42f3cc6bb357804.1655684496.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 5 +++++ 1 file changed, 5 insertions(+) commit 9da070b142820031a0e273097f2b39982f45bbfd Author: Pavel Begunkov Date: Mon Jun 20 01:26:00 2022 +0100 io_uring: consistent naming for inline completion Improve naming of the inline/deferred completion helper so it's consistent with it's *_post counterpart. Add some comments and extra lockdeps to ensure the locking is done right. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/797c619943dac06529e9d3fcb16e4c3cde6ad1a3.1655684496.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 4 ++-- io_uring/io_uring.h | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) commit c059f785840807ed5e1f2810420c1555969b6246 Author: Pavel Begunkov Date: Mon Jun 20 01:25:59 2022 +0100 io_uring: move io_import_fixed() Move io_import_fixed() into rsrc.c where it belongs. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4d5becb21f332b4fef6a7cedd6a50e65e2371630.1655684496.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/rsrc.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ io_uring/rsrc.h | 3 +++ io_uring/rw.c | 60 --------------------------------------------------------- 3 files changed, 63 insertions(+), 60 deletions(-) commit f337a84d39527a2c46b1230470748d7bd0672ce0 Author: Pavel Begunkov Date: Mon Jun 20 01:25:58 2022 +0100 io_uring: opcode independent fixed buf import Fixed buffers are generic infrastructure, make io_import_fixed() opcode agnostic. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b1e765c8a1c2c913a05a28d2399fc53e1d3cf37a.1655684496.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/rw.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit 46929b086886ade8302cff6e85ccea66bce0cf98 Author: Pavel Begunkov Date: Mon Jun 20 01:25:57 2022 +0100 io_uring: add io_commit_cqring_flush() Since __io_commit_cqring_flush users moved to different files, introduce io_commit_cqring_flush() helper and encapsulate all flags testing details inside. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/0da03887435dd9869ffe46dcd3962bf104afcca3.1655684496.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 5 +---- io_uring/io_uring.h | 6 ++++++ io_uring/rw.c | 5 +---- 3 files changed, 8 insertions(+), 8 deletions(-) commit 253993210bd8aa3b39a392807c03c8ef1cd7dc3d Author: Pavel Begunkov Date: Mon Jun 20 01:25:56 2022 +0100 io_uring: introduce locking helpers for CQE posting spin_lock(&ctx->completion_lock); /* post CQEs */ io_commit_cqring(ctx); spin_unlock(&ctx->completion_lock); io_cqring_ev_posted(ctx); We have many places repeating this sequence, and the three function unlock section is not perfect from the maintainance perspective and also makes it harder to add new locking/sync trick. Introduce two helpers. io_cq_lock(), which is simple and only grabs ->completion_lock, and io_cq_unlock_post() encapsulating the three call section. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/fe0c682bf7f7b55d9be55b0d034be9c1949277dc.1655684496.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 57 ++++++++++++++++++++++++----------------------------- io_uring/io_uring.h | 9 ++++++++- io_uring/timeout.c | 6 ++---- 3 files changed, 36 insertions(+), 36 deletions(-) commit 305bef98870816ae58357d647521891ec558a92e Author: Pavel Begunkov Date: Mon Jun 20 01:25:55 2022 +0100 io_uring: hide eventfd assumptions in eventfd paths Some io_uring-eventfd users assume that there won't be spurious wakeups. That assumption has to be honoured by all io_cqring_ev_posted() callers, which is inconvenient and from time to time leads to problems but should be maintained to not break the userspace. Instead of making the callers track whether a CQE was posted or not, hide it inside io_eventfd_signal(). It saves ->cached_cq_tail it saw last time and triggers the eventfd only when ->cached_cq_tail changed since then. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/0ffc66bae37a2513080b601e4370e147faaa72c5.1655684496.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/linux/io_uring_types.h | 2 ++ io_uring/io_uring.c | 44 +++++++++++++++++++++++++----------------- io_uring/timeout.c | 3 +-- 3 files changed, 29 insertions(+), 20 deletions(-) commit b321823a03dc81a5b83b063e6e1904d612b53266 Author: Pavel Begunkov Date: Mon Jun 20 01:25:54 2022 +0100 io_uring: fix io_poll_remove_all clang warnings clang complains on bitwise operations with bools, add a bit more verbosity to better show that we want to call io_poll_remove_all_table() twice but with different arguments. Reported-by: Nathan Chancellor Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f11d21dcdf9233e0eeb15fa13b858a05a78eb310.1655684496.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ba3cdb6fbb6e8eb525c868c60e103c5711edc068 Author: Pavel Begunkov Date: Mon Jun 20 01:25:53 2022 +0100 io_uring: improve task exit timeout cancellations Don't spin trying to cancel timeouts that are reachable but not cancellable, e.g. already executing. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/ab8a7440a60bbdf69ae514f672ad050e43dd1b03.1655684496.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/timeout.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit affa87db90108d9f017f927bcdab536e32c3915e Author: Pavel Begunkov Date: Mon Jun 20 01:25:52 2022 +0100 io_uring: fix multi ctx cancellation io_uring_try_cancel_requests() loops until there is nothing left to do with the ring, however there might be several rings and they might have dependencies between them, e.g. via poll requests. Instead of cancelling rings one by one, try to cancel them all and only then loop over if we still potenially some work to do. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/8d491fe02d8ac4c77ff38061cf86b9a827e8845c.1655684496.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 87 ++++++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 41 deletions(-) commit d9dee4302a7cbd6c0142dbdf6d150acc7459de0d Author: Pavel Begunkov Date: Sun Jun 19 12:26:08 2022 +0100 io_uring: remove ->flush_cqes optimisation It's not clear how widely used IOSQE_CQE_SKIP_SUCCESS is, and how often ->flush_cqes flag prevents from completion being flushed. Sometimes it's high level of concurrency that enables it at least for one CQE, but sometimes it doesn't save much because nobody waiting on the CQ. Remove ->flush_cqes flag and the optimisation, it should benefit the normal use case. Note, that there is no spurious eventfd problem with that as checks for spuriousness were incorporated into io_eventfd_signal(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/692e81eeddccc096f449a7960365fa7b4a18f8e6.1655637157.git.asml.silence@gmail.com [axboe: remove now dead state->flush_cqes variable] Signed-off-by: Jens Axboe include/linux/io_uring_types.h | 1 - io_uring/io_uring.c | 23 ++++++++++------------- io_uring/io_uring.h | 2 -- 3 files changed, 10 insertions(+), 16 deletions(-) commit a830ffd28780627b6287bcd5b84e9fe2dd795935 Author: Pavel Begunkov Date: Sun Jun 19 12:26:06 2022 +0100 io_uring: move io_eventfd_signal() Move io_eventfd_signal() in the sources without any changes and kill its forward declaration. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9ebebb3f6f56f5a5448a621e0b6a537720c43334.1655637157.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit 9046c6415be60f51f60f8b771a74ac4e72e3599d Author: Pavel Begunkov Date: Sun Jun 19 12:26:05 2022 +0100 io_uring: reshuffle io_uring/io_uring.h It's a good idea to first do forward declarations and then inline helpers, otherwise there will be keep stumbling on dependencies between them. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1d7fa6672ed43f20ccc0c54ae201369ebc3ebfab.1655637157.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.h | 95 ++++++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 48 deletions(-) commit d142c3ec8d160bea9801f0d727e92007787df8c0 Author: Pavel Begunkov Date: Sun Jun 19 12:26:04 2022 +0100 io_uring: remove extra io_commit_cqring() We don't post events in __io_commit_cqring_flush() anymore but send all requests to tw, so no need to do io_commit_cqring() there. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f2481e32375e749be89c42e4804268b608722cef.1655637157.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 1 - 1 file changed, 1 deletion(-) commit ad163a7e2562230c77102c60f668bac440e60cce Author: Jens Axboe Date: Sat Jun 18 19:44:33 2022 -0600 io_uring: move a few private types to local headers Commit 3a3d47fa9cfd ("io_uring: make io_uring_types.h public") moved a bunch of io_uring types to a kernel wide header, so we could make tracing a bit saner rather than pass in a ton of arguments. However, there are a few types in there that are not really needed to be system wide. Move the cancel data and mapped buffers back to the appropriate io_uring local headers. Signed-off-by: Jens Axboe include/linux/io_uring_types.h | 18 ------------------ io_uring/cancel.h | 13 +++++++++++++ io_uring/fdinfo.c | 1 + io_uring/poll.h | 1 + io_uring/rsrc.h | 8 ++++++++ io_uring/timeout.h | 1 + 6 files changed, 24 insertions(+), 18 deletions(-) commit 48863ffd3e81b6ec98606d3479c50aa77b7a98a9 Author: Pavel Begunkov Date: Thu Jun 16 13:57:20 2022 +0100 io_uring: clean up tracing events We have lots of trace events accepting an io_uring request and wanting to print some of its fields like user_data, opcode, flags and so on. However, as trace points were unaware of io_uring structures, we had to pass all the fields as arguments. Teach trace/events/io_uring.h about struct io_kiocb and stop the misery of passing a horde of arguments to trace helpers. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/40ff72f92798114e56d400f2b003beb6cde6ef53.1655384063.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/trace/events/io_uring.h | 142 ++++++++++++++++------------------------ io_uring/io_uring.c | 16 ++--- io_uring/poll.c | 5 +- io_uring/timeout.c | 3 +- 4 files changed, 66 insertions(+), 100 deletions(-) commit ab1c84d855cf2c284fa0f4b17fc04063659c54a1 Author: Pavel Begunkov Date: Thu Jun 16 13:57:19 2022 +0100 io_uring: make io_uring_types.h public Move io_uring types to linux/include, need them public so tracing can see the definitions and we can clean trace/events/io_uring.h Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a15f12e8cb7289b2de0deaddcc7518d98a132d17.1655384063.git.asml.silence@gmail.com Signed-off-by: Jens Axboe {io_uring => include/linux}/io_uring_types.h | 28 ++++++++++++++++++++++++++-- io_uring/filetable.h | 11 ----------- io_uring/io-wq.h | 17 +---------------- io_uring/io_uring.h | 4 +++- io_uring/refs.h | 2 +- 5 files changed, 31 insertions(+), 31 deletions(-) commit 27a9d66fec77cff0e32d2ecd5d0ac7ef878a7bb0 Author: Pavel Begunkov Date: Thu Jun 16 13:57:18 2022 +0100 io_uring: kill extra io_uring_types.h includes io_uring/io_uring.h already includes io_uring_types.h, no need to include it every time. Kill it in a bunch of places, it prepares us for following patches. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/94d8c943fbe0ef949981c508ddcee7fc1c18850f.1655384063.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/advise.c | 1 - io_uring/cancel.c | 1 - io_uring/epoll.c | 1 - io_uring/fdinfo.c | 1 - io_uring/filetable.c | 1 - io_uring/fs.c | 1 - io_uring/io_uring.c | 1 - io_uring/kbuf.c | 1 - io_uring/msg_ring.c | 1 - io_uring/net.c | 1 - io_uring/nop.c | 1 - io_uring/opdef.c | 1 - io_uring/openclose.c | 1 - io_uring/poll.c | 1 - io_uring/rsrc.c | 1 - io_uring/rw.c | 1 - io_uring/splice.c | 1 - io_uring/sqpoll.c | 1 - io_uring/statx.c | 1 - io_uring/sync.c | 1 - io_uring/tctx.c | 1 - io_uring/timeout.c | 1 - io_uring/uring_cmd.c | 1 - io_uring/xattr.c | 1 - 24 files changed, 24 deletions(-) commit b3659a65be70eb68d9fc9802c4ce81e0f943abfd Author: Pavel Begunkov Date: Fri Jun 17 09:48:05 2022 +0100 io_uring: change ->cqe_cached invariant for CQE32 With IORING_SETUP_CQE32 ->cqe_cached doesn't store a real address but rather an implicit offset into cqes. Store the real cqe pointer and increment it accordingly if CQE32. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1ee1838cba16bed96381a006950b36ba640d998c.1655455613.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 15 ++++++++++----- io_uring/io_uring.h | 8 ++------ 2 files changed, 12 insertions(+), 11 deletions(-) commit e8c328c3913d381bf60f2aecdf350c04b5b7e67d Author: Pavel Begunkov Date: Fri Jun 17 09:48:04 2022 +0100 io_uring: deduplicate io_get_cqe() calls Deduplicate calls to io_get_cqe() from __io_fill_cqe_req(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4fa077986cc3abab7c59ff4e7c390c783885465f.1655455613.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.h | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) commit ae5735c69bf28fea0b8260a03caeb906319228a2 Author: Pavel Begunkov Date: Fri Jun 17 09:48:03 2022 +0100 io_uring: deduplicate __io_fill_cqe_req tracing Deduplicate two trace_io_uring_complete() calls in __io_fill_cqe_req(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/277ed85dba5189ab7d932164b314013a0f0b0fdc.1655455613.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 68494a65d0e2de3d99b28ae050971b6161eabac0 Author: Pavel Begunkov Date: Fri Jun 17 09:48:02 2022 +0100 io_uring: introduce io_req_cqe_overflow() __io_fill_cqe_req() is hot and inlined, we want it to be as small as possible. Add io_req_cqe_overflow() accepting only a request and doing all overflow accounting, and replace with it two calls to 6 argument io_cqring_event_overflow(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/048b9fbcce56814d77a1a540409c98c3d383edcb.1655455613.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 15 +++++++++++++-- io_uring/io_uring.h | 12 ++---------- 2 files changed, 15 insertions(+), 12 deletions(-) commit faf88dde060f74117b3a86a62cb32a20f27fd636 Author: Pavel Begunkov Date: Fri Jun 17 09:48:01 2022 +0100 io_uring: don't inline __io_get_cqe() __io_get_cqe() is not as hot as io_get_cqe(), no need to inline it, it sheds ~500B from the binary. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/c1ac829198a881b7af8710926f99a3559b9f24c0.1655455613.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 35 +++++++++++++++++++++++++++++++++++ io_uring/io_uring.h | 36 +----------------------------------- 2 files changed, 36 insertions(+), 35 deletions(-) commit d245bca6375bccfd589a6a7d5007df28575bb626 Author: Pavel Begunkov Date: Fri Jun 17 09:48:00 2022 +0100 io_uring: don't expose io_fill_cqe_aux() Deduplicate some code and add a helper for filling an aux CQE, locking and notification. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b7c6557c8f9dc5c4cfb01292116c682a0ff61081.1655455613.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 18 ++++++++++++++++-- io_uring/io_uring.h | 3 +-- io_uring/msg_ring.c | 11 +---------- io_uring/net.c | 20 +++++--------------- io_uring/poll.c | 24 ++++++++---------------- io_uring/rsrc.c | 14 +++++--------- 6 files changed, 36 insertions(+), 54 deletions(-) commit f09c8643f0fad0e287b9f737955276000fd76a5d Author: Hao Xu Date: Fri Jun 17 13:04:29 2022 +0800 io_uring: kbuf: add comments for some tricky code Add comments to explain why it is always under uring lock when incrementing head in __io_kbuf_recycle. And rectify one comemnt about kbuf consuming in iowq case. Signed-off-by: Hao Xu Link: https://lore.kernel.org/r/20220617050429.94293-1-hao.xu@linux.dev Signed-off-by: Jens Axboe io_uring/kbuf.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 9ca9fb24d5febccea354089c41f96a8ad0d853f8 Author: Pavel Begunkov Date: Thu Jun 16 10:22:12 2022 +0100 io_uring: mutex locked poll hashing Currently we do two extra spin lock/unlock pairs to add a poll/apoll request to the cancellation hash table and remove it from there. On the submission side we often already hold ->uring_lock and tw completion is likely to hold it as well. Add a second cancellation hash table protected by ->uring_lock. In concerns for latency because of a need to have the mutex locked on the completion side, use the new table only in following cases: 1) IORING_SETUP_SINGLE_ISSUER: only one task grabs uring_lock, so there is little to no contention and so the main tw hander will almost always end up grabbing it before calling callbacks. 2) IORING_SETUP_SQPOLL: same as with single issuer, only one task is a major user of ->uring_lock. 3) apoll: we normally grab the lock on the completion side anyway to execute the request, so it's free. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1bbad9c78c454b7b92f100bbf46730a37df7194f.1655371007.git.asml.silence@gmail.com Reviewed-by: Hao Xu Signed-off-by: Jens Axboe io_uring/io_uring.c | 9 +++- io_uring/io_uring_types.h | 4 ++ io_uring/poll.c | 117 +++++++++++++++++++++++++++++++++++++--------- 3 files changed, 108 insertions(+), 22 deletions(-) commit 5d7943d99df9326c7b02f773b2d6f09709c30594 Author: Pavel Begunkov Date: Thu Jun 16 10:22:11 2022 +0100 io_uring: propagate locking state to poll cancel Poll cancellation will be soon need to grab ->uring_lock inside, pass the locking state, i.e. issue_flags, inside the cancellation functions. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b86781d047727c07163443b57551a3fa57c7c5e1.1655371007.git.asml.silence@gmail.com Reviewed-by: Hao Xu Signed-off-by: Jens Axboe io_uring/cancel.c | 7 ++++--- io_uring/cancel.h | 3 ++- io_uring/poll.c | 3 ++- io_uring/poll.h | 3 ++- io_uring/timeout.c | 3 ++- 5 files changed, 12 insertions(+), 7 deletions(-) commit e6f89be61410ff5a0e690d87d7a308e81f0f5a71 Author: Pavel Begunkov Date: Thu Jun 16 10:22:10 2022 +0100 io_uring: introduce a struct for hash table Instead of passing around a pointer to hash buckets, add a bit of type safety and wrap it into a structure. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d65bc3faba537ec2aca9eabf334394936d44bd28.1655371007.git.asml.silence@gmail.com Reviewed-by: Hao Xu Signed-off-by: Jens Axboe io_uring/cancel.c | 6 +++--- io_uring/cancel.h | 7 +------ io_uring/fdinfo.c | 4 ++-- io_uring/io_uring.c | 29 +++++++++++++++++------------ io_uring/io_uring_types.h | 13 +++++++++++-- io_uring/poll.c | 40 ++++++++++++++++++++++------------------ 6 files changed, 56 insertions(+), 43 deletions(-) commit a2cdd5193218c557b4ee7828017cce83f251e99a Author: Pavel Begunkov Date: Thu Jun 16 10:22:09 2022 +0100 io_uring: pass hash table into poll_find In preparation for having multiple cancellation hash tables, pass a table pointer into io_poll_find() and other poll cancel functions. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a31c88502463dce09254240fa037352927d7ecc3.1655371007.git.asml.silence@gmail.com Reviewed-by: Hao Xu Signed-off-by: Jens Axboe io_uring/poll.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 97bbdc06a4446bc69d8ba71d722abae542a6b70c Author: Pavel Begunkov Date: Thu Jun 16 10:22:08 2022 +0100 io_uring: add IORING_SETUP_SINGLE_ISSUER Add a new IORING_SETUP_SINGLE_ISSUER flag and the userspace visible part of it, i.e. put limitations of submitters. Also, don't allow it together with IOPOLL as we're not going to put it to good use. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4bcc41ee467fdf04c8aab8baf6ce3ba21858c3d4.1655371007.git.asml.silence@gmail.com Reviewed-by: Hao Xu Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 5 ++++- io_uring/io_uring.c | 7 +++++-- io_uring/io_uring_types.h | 1 + io_uring/tctx.c | 27 ++++++++++++++++++++++++--- io_uring/tctx.h | 4 ++-- 5 files changed, 36 insertions(+), 8 deletions(-) commit 0ec6dca223195aca2f7df6e432c4205b5f63305b Author: Pavel Begunkov Date: Thu Jun 16 10:22:07 2022 +0100 io_uring: use state completion infra for poll reqs Use io_req_task_complete() for poll request completions, so it can utilise state completions and save lots of unnecessary locking. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/ced94cb5a728d8e386c640d052fd3da3f5d6891a.1655371007.git.asml.silence@gmail.com Reviewed-by: Hao Xu Signed-off-by: Jens Axboe io_uring/poll.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 8b1dfd343ae6a64ca2b4741ab47a162fa59f43be Author: Pavel Begunkov Date: Thu Jun 16 10:22:06 2022 +0100 io_uring: clean up io_ring_ctx_alloc Add a variable for the number of hash buckets in io_ring_ctx_alloc(), makes it more readable. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/993926ed0d614ba9a76b2a85bebae2babcb13983.1655371007.git.asml.silence@gmail.com Reviewed-by: Hao Xu Signed-off-by: Jens Axboe io_uring/io_uring.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 4a07723fb4bb2568a31d43709904ab0d4c33d6c8 Author: Pavel Begunkov Date: Thu Jun 16 10:22:05 2022 +0100 io_uring: limit the number of cancellation buckets Don't allocate to many hash/cancellation buckets, there might be too many, clamp it to 8 bits, or 256 * 64B = 16KB. We don't usually have too many requests, and 256 buckets should be enough, especially since we do hash search only in the cancellation path. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b9620c8072ba61a2d50eba894b89bd93a94a9abd.1655371007.git.asml.silence@gmail.com Reviewed-by: Hao Xu Signed-off-by: Jens Axboe io_uring/io_uring.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4dfab8abb4721da278a2ccd45c1b6a69f8a9dd14 Author: Pavel Begunkov Date: Thu Jun 16 10:22:04 2022 +0100 io_uring: clean up io_try_cancel Get rid of an unnecessary extra goto in io_try_cancel() and simplify the function. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/48cf5417b43a8386c6c364dba1ad9b4c7382d158.1655371007.git.asml.silence@gmail.com Reviewed-by: Hao Xu Signed-off-by: Jens Axboe io_uring/cancel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1ab1edb0a104dd683d83e7853aa5b624856f4127 Author: Pavel Begunkov Date: Thu Jun 16 10:22:03 2022 +0100 io_uring: pass poll_find lock back Instead of using implicit knowledge of what is locked or not after io_poll_find() and co returns, pass back a pointer to the locked bucket if any. If set the user must to unlock the spinlock. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/dae1dc5749aa34367812ecf62f82fd3f053aae44.1655371007.git.asml.silence@gmail.com Reviewed-by: Hao Xu Signed-off-by: Jens Axboe io_uring/poll.c | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) commit 38513c464d3d45b4088c82f6e42d9cdbc5ee57e6 Author: Hao Xu Date: Thu Jun 16 10:22:02 2022 +0100 io_uring: switch cancel_hash to use per entry spinlock Add a new io_hash_bucket structure so that each bucket in cancel_hash has separate spinlock. Use per entry lock for cancel_hash, this removes some completion lock invocation and remove contension between different cancel_hash entries. Signed-off-by: Hao Xu Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/05d1e135b0c8bce9d1441e6346776589e5783e26.1655371007.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/cancel.c | 14 +++++++-- io_uring/cancel.h | 6 ++++ io_uring/fdinfo.c | 9 ++++-- io_uring/io_uring.c | 9 ++++-- io_uring/io_uring_types.h | 2 +- io_uring/poll.c | 80 +++++++++++++++++++++++++++++------------------ 6 files changed, 80 insertions(+), 40 deletions(-) commit 3654ab0c51a91036d15dd2fd9c2809317edf2228 Author: Hao Xu Date: Thu Jun 16 10:22:01 2022 +0100 io_uring: poll: remove unnecessary req->ref set We now don't need to set req->refcount for poll requests since the reworked poll code ensures no request release race. Signed-off-by: Hao Xu Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/ec6fee45705890bdb968b0c175519242753c0215.1655371007.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 1 - 1 file changed, 1 deletion(-) commit 53ccf69bda6f51e462f3c4ab7eb9c0ec34e78be4 Author: Pavel Begunkov Date: Thu Jun 16 10:22:00 2022 +0100 io_uring: don't inline io_put_kbuf io_put_kbuf() is huge, don't bloat the kernel with inlining. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/2e21ccf0be471ffa654032914b9430813cae53f8.1655371007.git.asml.silence@gmail.com Reviewed-by: Hao Xu Signed-off-by: Jens Axboe io_uring/kbuf.c | 33 +++++++++++++++++++++++++++++++++ io_uring/kbuf.h | 38 ++++++-------------------------------- 2 files changed, 39 insertions(+), 32 deletions(-) commit 7012c81593d5a3bc6d0b8720345cf887ef1df914 Author: Pavel Begunkov Date: Thu Jun 16 10:21:59 2022 +0100 io_uring: refactor io_req_task_complete() Clean up io_req_task_complete() and deduplicate io_put_kbuf() calls. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/ae3148ac7eb5cce3e06895cde306e9e959d6f6ae.1655371007.git.asml.silence@gmail.com Reviewed-by: Hao Xu Signed-off-by: Jens Axboe io_uring/io_uring.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 75d7b3aec13be557f15d099dc612dd658d670d1d Author: Pavel Begunkov Date: Thu Jun 16 10:21:58 2022 +0100 io_uring: kill REQ_F_COMPLETE_INLINE REQ_F_COMPLETE_INLINE is only needed to delay queueing into the completion list to io_queue_sqe() as __io_req_complete() is inlined and we don't want to bloat the kernel. As now we complete in a more centralised fashion in io_issue_sqe() we can get rid of the flag and queue to the list directly. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/600ba20a9338b8a39b249b23d3d177803613dde4.1655371007.git.asml.silence@gmail.com Reviewed-by: Hao Xu Signed-off-by: Jens Axboe io_uring/io_uring.c | 18 +++++++----------- io_uring/io_uring.h | 5 ----- io_uring/io_uring_types.h | 3 --- 3 files changed, 7 insertions(+), 19 deletions(-) commit df9830d883b914296beb17e4f75017faac9c4312 Author: Pavel Begunkov Date: Thu Jun 16 10:21:57 2022 +0100 io_uring: rw: delegate sync completions to core io_uring io_issue_sqe() from the io_uring core knows how to complete requests based on the returned error code, we can delegate io_read()/io_write() completion to it. Make kiocb_done() to return the right completion code and propagate it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/32ef005b45d23bf6b5e6837740dc0331bb051bd4.1655371007.git.asml.silence@gmail.com Reviewed-by: Hao Xu Signed-off-by: Jens Axboe io_uring/rw.c | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) commit bb8f870031584ebf50fcc1f049fa421375556114 Author: Jens Axboe Date: Wed Jun 15 16:28:17 2022 -0600 io_uring: remove unused IO_REQ_CACHE_SIZE defined Signed-off-by: Jens Axboe io_uring/io_uring.c | 1 - 1 file changed, 1 deletion(-) commit c65f5279ba02e47c073520ecff3c84408a87fd17 Author: Pavel Begunkov Date: Wed Jun 15 17:33:56 2022 +0100 io_uring: don't set REQ_F_COMPLETE_INLINE in tw io_req_task_complete() enqueues requests for state completion itself, no need for REQ_F_COMPLETE_INLINE, which is only serve the purpose of not bloating the kernel. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/aca80f71464ad02c06f1311d998a2d6ee0b31573.1655310733.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 1 - 1 file changed, 1 deletion(-) commit 3a08576b96e365d424225dd034c651e963b3ae64 Author: Pavel Begunkov Date: Wed Jun 15 17:33:55 2022 +0100 io_uring: remove check_cq checking from hot paths All ctx->check_cq events are slow path, don't test every single flag one by one in the hot path, but add a common guarding if. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/dff026585cea7ff3a172a7c83894a3b0111bbf6a.1655310733.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit aeaa72c69473d7e68addbd31f43c7c12af252bfc Author: Pavel Begunkov Date: Wed Jun 15 17:33:54 2022 +0100 io_uring: never defer-complete multi-apoll Luckily, nnobody completes multi-apoll requests outside the polling functions, but don't set IO_URING_F_COMPLETE_DEFER in any case as there is nobody who is catching REQ_F_COMPLETE_INLINE, and so will leak requests if used. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a65ed3f5effd9321ee06e6edea294a03be3e15a0.1655310733.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a02e4be8187588ac476136496af9e3feeeb9a75 Author: Pavel Begunkov Date: Wed Jun 15 17:33:53 2022 +0100 io_uring: inline ->registered_rings There can be only 16 registered rings, no need to allocate an array for them separately but store it in tctx. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/495f0b953c87994dd9e13de2134019054fa5830d.1655310733.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/tctx.c | 10 ---------- io_uring/tctx.h | 3 ++- 2 files changed, 2 insertions(+), 11 deletions(-) commit 48c13d8980840e489a537e4af4b2503eb9d8a1ec Author: Pavel Begunkov Date: Wed Jun 15 17:33:52 2022 +0100 io_uring: explain io_wq_work::cancel_seq placement Add a comment on why we keep ->cancel_seq in struct io_wq_work instead of struct io_kiocb despite it needed only by io_uring but not io-wq. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/988e87eec9dc700b5dae933df3aefef303502f6c.1655310733.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io-wq.h | 1 + 1 file changed, 1 insertion(+) commit aa1e90f64ee5c82f6d3feb69b2a19370686f1f02 Author: Pavel Begunkov Date: Wed Jun 15 17:33:51 2022 +0100 io_uring: move small helpers to headers There is a bunch of inline helpers that will be useful not only to the core of io_uring, move them to headers. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/22df99c83723e44cba7e945e8519e64e3642c064.1655310733.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 17 ----------------- io_uring/io_uring.h | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 17 deletions(-) commit 22eb2a3fdea03e6056dcfb4c8bb9d3fde5ce02ff Author: Pavel Begunkov Date: Wed Jun 15 17:33:50 2022 +0100 io_uring: refactor ctx slow data placement Shove all slow path data at the end of ctx and get rid of extra indention. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/bcaf200298dd469af20787650550efc66d89bef2.1655310733.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring_types.h | 81 +++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 42 deletions(-) commit aff5b2df9e8b35f9814c5a4907f471472cd6be77 Author: Pavel Begunkov Date: Wed Jun 15 17:33:49 2022 +0100 io_uring: better caching for ctx timeout fields Following timeout fields access patterns, move all of them into a separate cache line inside ctx, so they don't intervene with normal completion caching, especially since timeout removals and completion are separated and the later is done via tw. It also sheds some bytes from io_ring_ctx, 1216B -> 1152B Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4b163793072840de53b3cb66e0c2995e7226ff78.1655310733.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring_types.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit b25436038f6cc20c3198792cbfab8a312d09282e Author: Pavel Begunkov Date: Wed Jun 15 17:33:48 2022 +0100 io_uring: move defer_list to slow data draining is slow path, move defer_list to the end where slow data lives inside the context. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e16379391ca72b490afdd24e8944baab849b4a7b.1655310733.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring_types.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5ff4fdffad483dad815b3701be8b82c5a07b156e Author: Pavel Begunkov Date: Wed Jun 15 17:33:47 2022 +0100 io_uring: make reg buf init consistent The default (i.e. empty) state of register buffer is dummy_ubuf, so set it to dummy on init instead of NULL. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/c5456aecf03d9627fbd6e65e100e2b5293a6151e.1655310733.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/rsrc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 61a2732af4b0337f7e36093612c846e9f5962965 Author: Jens Axboe Date: Wed Jun 1 12:36:42 2022 -0600 io_uring: deprecate epoll_ctl support As far as we know, nobody ever adopted the epoll_ctl management via io_uring. Deprecate it now with a warning, and plan on removing it in a later kernel version. When we do remove it, we can revert the following commits as well: 39220e8d4a2a ("eventpoll: support non-blocking do_epoll_ctl() calls") 58e41a44c488 ("eventpoll: abstract out epoll_ctl() handler") Suggested-by: Linus Torvalds Link: https://lore.kernel.org/io-uring/CAHk-=wiTyisXBgKnVHAGYCNvkmjk=50agS2Uk6nr+n3ssLZg2w@mail.gmail.com/ Signed-off-by: Jens Axboe io_uring/epoll.c | 4 ++++ 1 file changed, 4 insertions(+) commit b9ba8a4463cd78d0aee520c4bf2569820ac29929 Author: Jens Axboe Date: Fri May 27 10:55:07 2022 -0600 io_uring: add support for level triggered poll By default, the POLL_ADD command does edge triggered poll - if we get a non-zero mask on the initial poll attempt, we complete the request successfully. Support level triggered by always waiting for a notification, regardless of whether or not the initial mask matches the file state. Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 3 +++ io_uring/poll.c | 15 ++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) commit d9b57aa3cfc792ccac6858376c017dbea6cb2872 Author: Jens Axboe Date: Wed Jun 15 16:27:42 2022 -0600 io_uring: move opcode table to opdef.c We already have the declarations in opdef.h, move the rest into its own file rather than in the main io_uring.c file. Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/io_uring.c | 469 +------------------------------------------ io_uring/io_uring_types.h | 2 + io_uring/opdef.c | 495 ++++++++++++++++++++++++++++++++++++++++++++++ io_uring/opdef.h | 2 + 5 files changed, 501 insertions(+), 469 deletions(-) commit f3b44f92e59a804cf375479bda0bccbf4b6e6ef6 Author: Jens Axboe Date: Mon Jun 13 07:27:03 2022 -0600 io_uring: move read/write related opcodes to its own file Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/io_uring.c | 1239 +-------------------------------------------------- io_uring/io_uring.h | 131 ++++++ io_uring/rw.c | 1099 +++++++++++++++++++++++++++++++++++++++++++++ io_uring/rw.h | 23 + 5 files changed, 1263 insertions(+), 1231 deletions(-) commit c98817e6cd4471a6f6283813dd6efea162f5ac5f Author: Jens Axboe Date: Thu May 26 09:44:31 2022 -0600 io_uring: move remaining file table manipulation to filetable.c Signed-off-by: Jens Axboe io_uring/filetable.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++- io_uring/filetable.h | 5 ++- io_uring/io_uring.c | 82 ------------------------------------------------- io_uring/io_uring.h | 4 --- 4 files changed, 90 insertions(+), 88 deletions(-) commit 73572984481907d92673255b494c0ff4f77c8ed4 Author: Jens Axboe Date: Mon Jun 13 07:12:45 2022 -0600 io_uring: move rsrc related data, core, and commands Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/io_uring.c | 1644 ++++---------------------------------------------- io_uring/io_uring.h | 6 +- io_uring/openclose.c | 1 + io_uring/rsrc.c | 1320 ++++++++++++++++++++++++++++++++++++++++ io_uring/rsrc.h | 155 +++++ 6 files changed, 1595 insertions(+), 1533 deletions(-) commit 3b77495a97239faa27989f946d29b6be7dd091e9 Author: Jens Axboe Date: Mon Jun 13 07:07:23 2022 -0600 io_uring: split provided buffers handling into its own file Move both the opcodes related to it, and the internals code dealing with it. Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/io_uring.c | 602 +--------------------------------------------------- io_uring/io_uring.h | 36 +--- io_uring/kbuf.c | 524 +++++++++++++++++++++++++++++++++++++++++++++ io_uring/kbuf.h | 142 +++++++++++++ io_uring/net.c | 1 + io_uring/poll.c | 1 + 7 files changed, 672 insertions(+), 636 deletions(-) commit 7aaff708a768144ec6459f0a58301be1a6b982fc Author: Jens Axboe Date: Wed May 25 20:36:47 2022 -0600 io_uring: move cancelation into its own file This also helps cleanup the io_uring.h cancel parts, as we can make things static in the cancel.c file, mostly. Signed-off-by: Jens Axboe io_uring/Makefile | 3 +- io_uring/cancel.c | 194 ++++++++++++++++++++++++++++++++++++++++++++++++++++ io_uring/cancel.h | 6 ++ io_uring/io_uring.c | 177 +---------------------------------------------- io_uring/io_uring.h | 1 - io_uring/timeout.c | 1 + 6 files changed, 204 insertions(+), 178 deletions(-) commit 329061d3e2f9a0082a097e9558bd5497098586c6 Author: Jens Axboe Date: Wed May 25 20:31:09 2022 -0600 io_uring: move poll handling into its own file Add a io_poll_issue() rather than export the general task_work locking and io_issue_sqe(), and put the io_op_defs definition and structure into a separate header file so that poll can use it. Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/io_uring.c | 842 +--------------------------------------------------- io_uring/io_uring.h | 32 ++ io_uring/opdef.h | 40 +++ io_uring/poll.c | 760 +++++++++++++++++++++++++++++++++++++++++++++++ io_uring/poll.h | 30 ++ 6 files changed, 879 insertions(+), 827 deletions(-) commit cfd22e6b3319adc7c2a8a092e19ac16575dabc86 Author: Jens Axboe Date: Wed May 25 11:57:03 2022 -0600 io_uring: add opcode name to io_op_defs This kills the last per-op switch. Signed-off-by: Jens Axboe io_uring/io_uring.c | 150 ++++++++++++++++++---------------------------------- 1 file changed, 52 insertions(+), 98 deletions(-) commit 92ac8beaea1f4931f932da3dcc850547621107fc Author: Jens Axboe Date: Wed May 25 11:48:35 2022 -0600 io_uring: include and forward-declaration sanitation Remove some dead headers we no longer need, and get rid of the io_ring_ctx and io_uring_fops forward declarations. Signed-off-by: Jens Axboe io_uring/io_uring.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit c9f06aa7de153cdbe424e7e38be39f2272cf78bc Author: Jens Axboe Date: Wed May 25 11:01:04 2022 -0600 io_uring: move io_uring_task (tctx) helpers into its own file Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/io_uring.c | 368 +--------------------------------------------------- io_uring/io_uring.h | 4 + io_uring/tctx.c | 332 +++++++++++++++++++++++++++++++++++++++++++++++ io_uring/tctx.h | 55 ++++++++ 5 files changed, 396 insertions(+), 365 deletions(-) commit a4ad4f748ea96202451f88b6385d7283d0f2e513 Author: Jens Axboe Date: Wed May 25 10:40:19 2022 -0600 io_uring: move fdinfo helpers to its own file This also means moving a bit more of the fixed file handling to the filetable side, which makes sense separately too. Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/fdinfo.c | 191 +++++++++++++++++++++++++++++++++++++++++ io_uring/fdinfo.h | 3 + io_uring/filetable.h | 19 +++++ io_uring/io_uring.c | 210 +--------------------------------------------- io_uring/io_uring_types.h | 13 +++ 6 files changed, 230 insertions(+), 208 deletions(-) commit e5550a1447bf8d82f32b58e2ba54792a6985d080 Author: Jens Axboe Date: Wed May 25 10:28:04 2022 -0600 io_uring: use io_is_uring_fops() consistently Convert the last spots that check for io_uring_fops to use the provided helper instead. Signed-off-by: Jens Axboe io_uring/io_uring.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 17437f311490d873a5157f65a84317d16270fd38 Author: Jens Axboe Date: Wed May 25 09:13:39 2022 -0600 io_uring: move SQPOLL related handling into its own file Signed-off-by: Jens Axboe io_uring/Makefile | 3 +- io_uring/io_uring.c | 467 +--------------------------------------------------- io_uring/io_uring.h | 34 ++++ io_uring/sqpoll.c | 426 +++++++++++++++++++++++++++++++++++++++++++++++ io_uring/sqpoll.h | 29 ++++ 5 files changed, 497 insertions(+), 462 deletions(-) commit 59915143e89fb8dc7b5bd9dcaf628d8181fd54ac Author: Jens Axboe Date: Wed May 25 08:57:27 2022 -0600 io_uring: move timeout opcodes and handling into its own file Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/io_uring.c | 667 +--------------------------------------------- io_uring/io_uring.h | 13 +- io_uring/io_uring_types.h | 10 + io_uring/timeout.c | 634 +++++++++++++++++++++++++++++++++++++++++++ io_uring/timeout.h | 35 +++ 6 files changed, 701 insertions(+), 660 deletions(-) commit e418bbc97bffda868934acfdf8a1173ab044be69 Author: Jens Axboe Date: Wed May 25 08:56:52 2022 -0600 io_uring: move our reference counting into a header Signed-off-by: Jens Axboe io_uring/io_uring.c | 43 +------------------------------------------ io_uring/refs.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 42 deletions(-) commit 36404b09aa609e00f8f0108356830c22b99b3cbf Author: Jens Axboe Date: Wed May 25 06:42:08 2022 -0600 io_uring: move msg_ring into its own file Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/io_uring.c | 55 +-------------------------------------------- io_uring/msg_ring.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++ io_uring/msg_ring.h | 4 ++++ 4 files changed, 71 insertions(+), 55 deletions(-) commit f9ead18c10589a351f395ac5aa107360f2f6ce53 Author: Jens Axboe Date: Wed May 25 06:25:13 2022 -0600 io_uring: split network related opcodes into its own file While at it, convert the handlers to just use io_eopnotsupp_prep() if CONFIG_NET isn't set. Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/io_uring.c | 873 +++------------------------------------------------- io_uring/io_uring.h | 22 ++ io_uring/net.c | 779 ++++++++++++++++++++++++++++++++++++++++++++++ io_uring/net.h | 43 +++ 5 files changed, 884 insertions(+), 835 deletions(-) commit e0da14def1ee0a9cd9c88893321e9a3d900f8e23 Author: Jens Axboe Date: Wed May 25 06:12:18 2022 -0600 io_uring: move statx handling to its own file Signed-off-by: Jens Axboe io_uring/Makefile | 3 ++- io_uring/io_uring.c | 62 +------------------------------------------- io_uring/statx.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++ io_uring/statx.h | 5 ++++ 4 files changed, 82 insertions(+), 62 deletions(-) commit a9c210cebe13c36487a239ae7f4671a389fed127 Author: Jens Axboe Date: Wed May 25 06:09:18 2022 -0600 io_uring: move epoll handler to its own file Would be nice to sort out Kconfig for this and don't even compile epoll.c if we don't have epoll configured. Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/epoll.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++ io_uring/epoll.h | 6 ++++++ io_uring/io_uring.c | 50 +----------------------------------------- 4 files changed, 70 insertions(+), 50 deletions(-) commit 4cf90495281b43f5f597ef4a9abcc83a63973571 Author: Jens Axboe Date: Wed May 25 06:04:14 2022 -0600 io_uring: add a dummy -EOPNOTSUPP prep handler Add it and use it for the epoll handling, if epoll isn't configured. Signed-off-by: Jens Axboe io_uring/io_uring.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 99f15d8d61364299ae780cc739c74068a6d2538d Author: Jens Axboe Date: Wed May 25 05:59:19 2022 -0600 io_uring: move uring_cmd handling to its own file Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/io_uring.c | 127 ++------------------------------------------------- io_uring/io_uring.h | 9 ++++ io_uring/uring_cmd.c | 115 ++++++++++++++++++++++++++++++++++++++++++++++ io_uring/uring_cmd.h | 13 ++++++ 5 files changed, 142 insertions(+), 124 deletions(-) commit cd40cae29ef815de6f7e72207b677c78f43f4688 Author: Jens Axboe Date: Tue May 24 21:54:43 2022 -0600 io_uring: split out open/close operations Signed-off-by: Jens Axboe io_uring/Makefile | 3 +- io_uring/io_uring.c | 311 +++------------------------------------------------ io_uring/io_uring.h | 32 ++++++ io_uring/openclose.c | 283 ++++++++++++++++++++++++++++++++++++++++++++++ io_uring/openclose.h | 14 +++ 5 files changed, 345 insertions(+), 298 deletions(-) commit 453b329be5eacfc48dd43035af82bc7f28ecfedf Author: Jens Axboe Date: Tue May 24 21:43:10 2022 -0600 io_uring: separate out file table handling code Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/filetable.c | 57 +++++++++++++++++++++++++++++++ io_uring/filetable.h | 58 ++++++++++++++++++++++++++++++++ io_uring/io_uring.c | 86 ----------------------------------------------- io_uring/io_uring_types.h | 7 +--- 5 files changed, 117 insertions(+), 93 deletions(-) commit f4c163dd7d4b1031772317cd3cd58dd6711ee51e Author: Jens Axboe Date: Tue May 24 21:28:33 2022 -0600 io_uring: split out fadvise/madvise operations Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/advise.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++ io_uring/advise.h | 7 ++++ io_uring/io_uring.c | 85 +------------------------------------------- 4 files changed, 109 insertions(+), 85 deletions(-) commit 0d58472740370108f8ece9076d79f736f53b5b77 Author: Jens Axboe Date: Tue May 24 21:25:19 2022 -0600 io_uring: split out fs related sync/fallocate functions This splits out sync_file_range, fsync, and fallocate. Signed-off-by: Jens Axboe io_uring/Makefile | 3 +- io_uring/io_uring.c | 97 +-------------------------------------------- io_uring/sync.c | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++ io_uring/sync.h | 10 +++++ 4 files changed, 124 insertions(+), 97 deletions(-) commit 531113bbd5bfc93e8de45440752af11c751e4aaf Author: Jens Axboe Date: Tue May 24 21:19:47 2022 -0600 io_uring: split out splice related operations This splits out splice and tee support. Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/io_uring.c | 133 ++-------------------------------------------------- io_uring/io_uring.h | 19 ++++++++ io_uring/splice.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++++ io_uring/splice.h | 7 +++ 5 files changed, 154 insertions(+), 130 deletions(-) commit 11aeb71406ddd0ef526ad1df48b54aae628aad3b Author: Jens Axboe Date: Tue May 24 21:13:00 2022 -0600 io_uring: split out filesystem related operations This splits out renameat, unlinkat, mkdirat, symlinkat, and linkat. Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/fs.c | 294 ++++++++++++++++++++++++++++++++++++++++++++++++++++ io_uring/fs.h | 20 ++++ io_uring/io_uring.c | 283 +------------------------------------------------- 4 files changed, 316 insertions(+), 283 deletions(-) commit e28683bdfc2f2cb0dab042f9079cda89dbf589d9 Author: Jens Axboe Date: Tue May 24 11:56:42 2022 -0600 io_uring: move nop into its own file Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/io_uring.c | 15 +-------------- io_uring/nop.c | 26 ++++++++++++++++++++++++++ io_uring/nop.h | 4 ++++ 4 files changed, 32 insertions(+), 15 deletions(-) commit 5e2a18d93fec514fc74f58a6061b74a79764af69 Author: Jens Axboe Date: Tue May 24 11:46:43 2022 -0600 io_uring: move xattr related opcodes to its own file Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/io_uring.c | 248 +------------------------------------------------ io_uring/xattr.c | 259 ++++++++++++++++++++++++++++++++++++++++++++++++++++ io_uring/xattr.h | 15 +++ 4 files changed, 277 insertions(+), 247 deletions(-) commit 97b388d70b53fd7d286ac1b81e5a88bd6af98209 Author: Jens Axboe Date: Tue May 24 15:21:00 2022 -0600 io_uring: handle completions in the core Normally request handlers complete requests themselves, if they don't return an error. For the latter case, the core will complete it for them. This is unhandy for pushing opcode handlers further out, as we don't want a bunch of inline completion code and we don't want to make the completion path slower than it is now. Let the core handle any completion, unless the handler explicitly asks us not to. Signed-off-by: Jens Axboe io_uring/io_uring.c | 271 ++++++++++++++++++++++++++-------------------------- io_uring/io_uring.h | 5 + 2 files changed, 142 insertions(+), 134 deletions(-) commit de23077eda61f549dbdadc4b6aa95f6e7b251552 Author: Jens Axboe Date: Tue May 24 12:45:38 2022 -0600 io_uring: set completion results upfront Signed-off-by: Jens Axboe io_uring/io_uring.c | 21 +++++++++------------ io_uring/io_uring.h | 13 +++++++++++++ 2 files changed, 22 insertions(+), 12 deletions(-) commit e27f928ee1cb068ac6c18ea244351a4c90a61139 Author: Jens Axboe Date: Tue May 24 10:56:14 2022 -0600 io_uring: add io_uring_types.h This adds definitions of structs that both the core and the various opcode handlers need to know about. Signed-off-by: Jens Axboe io_uring/io_uring.c | 491 +-------------------------------------------- io_uring/io_uring_types.h | 496 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 499 insertions(+), 488 deletions(-) commit 4d4c9cff4f702d10f65473a6b4994ce1a13e64ff Author: Jens Axboe Date: Tue May 24 10:26:28 2022 -0600 io_uring: define a request type cleanup handler This can move request type specific cleanup into a private handler, removing the need for the core io_uring parts to know what types they are dealing with. Signed-off-by: Jens Axboe io_uring/io_uring.c | 155 +++++++++++++++++++++++++++++----------------------- 1 file changed, 86 insertions(+), 69 deletions(-) commit 890968dc03361b92957e183fe8f692371e4ef18b Author: Jens Axboe Date: Tue May 24 10:19:47 2022 -0600 io_uring: unify struct io_symlink and io_hardlink They are really just a subset of each other, just use the one type. Signed-off-by: Jens Axboe io_uring/io_uring.c | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) commit 9a3a11f977f9972b812cc8666d1ffdb93699bd92 Author: Jens Axboe Date: Tue May 24 10:09:32 2022 -0600 io_uring: convert iouring_cmd to io_cmd_type Signed-off-by: Jens Axboe io_uring/io_uring.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit ceb452e1b4ba4ab207dfe119c47bf61d4519dc2e Author: Jens Axboe Date: Tue May 24 10:06:46 2022 -0600 io_uring: convert xattr to use io_cmd_type Signed-off-by: Jens Axboe io_uring/io_uring.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit ea5af87d29cfe7323f9a401539c526bdd43416a5 Author: Jens Axboe Date: Tue May 24 10:05:49 2022 -0600 io_uring: convert rsrc_update to io_cmd_type Signed-off-by: Jens Axboe io_uring/io_uring.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit c1ee5595015502dedd2d602ecc65bff9907fb14b Author: Jens Axboe Date: Tue May 24 10:03:49 2022 -0600 io_uring: convert msg and nop to io_cmd_type Signed-off-by: Jens Axboe io_uring/io_uring.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 2511d3030c5eaea37baee030cb36e70426ad4e6a Author: Jens Axboe Date: Tue May 24 10:01:47 2022 -0600 io_uring: convert splice to use io_cmd_type Signed-off-by: Jens Axboe io_uring/io_uring.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 3e93a3571a17022d8bde08249e468349da6b7305 Author: Jens Axboe Date: Tue May 24 10:01:09 2022 -0600 io_uring: convert epoll to io_cmd_type Signed-off-by: Jens Axboe io_uring/io_uring.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit bb040a21fd0579ec7575a0ede7185d2504c021b7 Author: Jens Axboe Date: Tue May 24 09:59:28 2022 -0600 io_uring: convert file system request types to use io_cmd_type This converts statx, rename, unlink, mkdir, symlink, and hardlink to use io_cmd_type. Signed-off-by: Jens Axboe io_uring/io_uring.c | 102 +++++++++++++++++++++++++++++----------------------- 1 file changed, 57 insertions(+), 45 deletions(-) commit 37d4842f11c5a8d4eeb8e85bf2120a167d174456 Author: Jens Axboe Date: Tue May 24 09:51:05 2022 -0600 io_uring: convert madvise/fadvise to use io_cmd_type Signed-off-by: Jens Axboe io_uring/io_uring.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit dd752582e398d22fe6798f065953f4266bf4f5db Author: Jens Axboe Date: Tue May 24 09:49:25 2022 -0600 io_uring: convert open/close path to use io_cmd_type Signed-off-by: Jens Axboe io_uring/io_uring.c | 72 +++++++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 32 deletions(-) commit a43714ace50d85b4cb19af46152f624affeef2d3 Author: Jens Axboe Date: Tue May 24 09:45:22 2022 -0600 io_uring: convert timeout path to use io_cmd_type Signed-off-by: Jens Axboe io_uring/io_uring.c | 117 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 68 insertions(+), 49 deletions(-) commit f38987f09a062c17e9c5119e23b41abc6326cd4b Author: Jens Axboe Date: Tue May 24 09:33:01 2022 -0600 io_uring: convert cancel path to use io_cmd_type Signed-off-by: Jens Axboe io_uring/io_uring.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit e4a71006eace14a6699d66a514b6310cd8b57f7d Author: Jens Axboe Date: Tue May 24 09:30:45 2022 -0600 io_uring: convert the sync and fallocate paths to use io_cmd_type They all share the same struct io_sync, convert them to use the io_cmd_type approach instead. Signed-off-by: Jens Axboe io_uring/io_uring.c | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) commit 8ff86d85b74d547a4e5f09acc884dd4cc173d087 Author: Jens Axboe Date: Tue May 24 09:27:38 2022 -0600 io_uring: convert net related opcodes to use io_cmd_type This converts accept, connect, send/recv, sendmsg/recvmsg, shutdown, and socket to use io_cmd_type. Signed-off-by: Jens Axboe io_uring/io_uring.c | 53 +++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 26 deletions(-) commit bd8587e4997a88635a37fac546223346e512a30b Author: Jens Axboe Date: Tue May 24 09:24:42 2022 -0600 io_uring: remove recvmsg knowledge from io_arm_poll_handler() There's a special case for recvmsg with MSG_ERRQUEUE set. This is problematic as it means the core needs to know about this special request type. For now, just add a generic flag for it. Signed-off-by: Jens Axboe io_uring/io_uring.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c24b154967b6d335189eac25be59913538e2cdb4 Author: Jens Axboe Date: Tue May 24 09:16:40 2022 -0600 io_uring: convert poll_update path to use io_cmd_type Remove struct io_poll_update from io_kiocb, and convert the poll path to use the io_cmd_type approach instead. Signed-off-by: Jens Axboe io_uring/io_uring.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 8d4388d1166faa5e16fd100157c9cb3c9e982397 Author: Jens Axboe Date: Tue May 24 09:13:46 2022 -0600 io_uring: convert poll path to use io_cmd_type Remove struct io_poll_iocb from io_kiocb, and convert the poll path to use the io_cmd_type approach instead. While at it, rename io_poll_iocb to io_poll which is consistent with the other request type private structures. Signed-off-by: Jens Axboe io_uring/io_uring.c | 53 ++++++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 25 deletions(-) commit 3c306fb2f9463fd0e0e896dde9e3e53097d0e41e Author: Jens Axboe Date: Mon Jun 13 06:57:44 2022 -0600 io_uring: convert read/write path to use io_cmd_type Remove struct io_rw from io_kiocb, and convert the read/write path to use the io_cmd_type approach instead. Signed-off-by: Jens Axboe io_uring/io_uring.c | 194 ++++++++++++++++++++++++++++------------------------ 1 file changed, 106 insertions(+), 88 deletions(-) commit f49eca21563b6d919d49828aaed9eab5d8090361 Author: Jens Axboe Date: Tue May 24 08:32:05 2022 -0600 io_uring: add generic command payload type to struct io_kiocb Each opcode generally has a command structure in io_kiocb which it can use to store data associated with that request. In preparation for having the core layer not know about what's inside these fields, add a generic io_cmd_data type and put in the union as well. Signed-off-by: Jens Axboe io_uring/io_uring.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit dc919caff6b68dab1ae56cd341d96f50c2438aea Author: Jens Axboe Date: Mon May 23 17:30:37 2022 -0600 io_uring: move req async preparation into opcode handler Define an io_op_def->prep_async() handler and push the async preparation to there. Since we now have that, we can drop ->needs_async_setup, as they mean the same thing. Signed-off-by: Jens Axboe io_uring/io_uring.c | 38 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 28 deletions(-) commit ed29b0b4fd835b058ddd151c49d021e28d631ee6 Author: Jens Axboe Date: Mon May 23 17:05:03 2022 -0600 io_uring: move to separate directory In preparation for splitting io_uring up a bit, move it into its own top level directory. It didn't really belong in fs/ anyway, as it's not a file system only API. This adds io_uring/ and moves the core files in there, and updates the MAINTAINERS file for the new location. Signed-off-by: Jens Axboe MAINTAINERS | 7 +------ Makefile | 1 + fs/Makefile | 2 -- io_uring/Makefile | 6 ++++++ {fs => io_uring}/io-wq.c | 0 {fs => io_uring}/io-wq.h | 0 {fs => io_uring}/io_uring.c | 2 +- kernel/sched/core.c | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) commit 0702e5364f643bc86683d9f585edfe76dbabae39 Author: Jens Axboe Date: Mon May 23 16:56:21 2022 -0600 io_uring: define a 'prep' and 'issue' handler for each opcode Rather than have two giant switches for doing request preparation and then for doing request issue, add a prep and issue handler for each of them in the io_op_defs[] request definition. Signed-off-by: Jens Axboe fs/io_uring.c | 838 +++++++++++++++++++++++++--------------------------------- 1 file changed, 365 insertions(+), 473 deletions(-) commit 730dbb8ddac6b92573658c3cb03555df1bdf95aa Author: Steven Rostedt (Google) Date: Tue Jul 19 11:27:19 2022 -0400 USB: mtu3: tracing: Use the new __vstring() helper Instead of open coding a __dynamic_array() with a fixed length (which defeats the purpose of the dynamic array in the first place). Use the new __vstring() helper that will use a va_list and only write enough of the string into the ring buffer that is needed. Link: https://lkml.kernel.org/r/20220719112719.17e796c6@gandalf.local.home Cc: Ingo Molnar Cc: Andrew Morton Cc: linux-usb@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Acked-by: Greg Kroah-Hartman Tested-by: Chunfeng Yun Signed-off-by: Steven Rostedt (Google) drivers/usb/mtu3/mtu3_trace.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f71f3ba9b42381c2e52c079a0104e11c30ca4cc2 Author: Masami Hiramatsu (Google) Date: Mon Jul 18 16:05:10 2022 +0900 selftests/kprobe: Update test for no event name syntax error The commit 208003254c32 ("selftests/kprobe: Do not test for GRP/ without event failures") removed a syntax which is no more cause a syntax error (NO_EVENT_NAME error with GRP/). However, there are another case (NO_EVENT_NAME error without GRP/) which causes a same error. This adds a test for that case. Link: https://lkml.kernel.org/r/165812790993.1377963.9762767354560397298.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc | 1 + 1 file changed, 1 insertion(+) commit fea6ac554d9dea849e2517284b17f99fb9be423a Author: Steven Rostedt (Google) Date: Fri Jul 15 17:55:55 2022 -0400 tracing: Add example and documentation for new __vstring() macro Update the sample trace events to include an example that uses the new __vstring() helpers for TRACE_EVENTS. Link: https://lkml.kernel.org/r/20220715175555.16375a3b@gandalf.local.home Signed-off-by: Steven Rostedt (Google) samples/trace_events/trace-events-sample.c | 14 +++++++++++-- samples/trace_events/trace-events-sample.h | 32 ++++++++++++++++++++++++++---- 2 files changed, 40 insertions(+), 6 deletions(-) commit f5eab65ff2b76449286d18efc7fee3e0b72f7d9b Author: Steven Rostedt (Google) Date: Tue Jul 12 16:17:07 2022 -0400 selftests/kprobe: Do not test for GRP/ without event failures A new feature is added where kprobes (and other probes) do not need to explicitly state the event name when creating a probe. The event name will come from what is being attached. That is: # echo 'p:foo/ vfs_read' > kprobe_events Will no longer error, but instead create an event: # cat kprobe_events p:foo/p_vfs_read_0 vfs_read This should not be tested as an error case anymore. Remove it from the selftest as now this feature "breaks" the selftest as it no longer fails as expected. Link: https://lore.kernel.org/all/1656296348-16111-1-git-send-email-quic_linyyuan@quicinc.com/ Link: https://lkml.kernel.org/r/20220712161707.6dc08a14@gandalf.local.home Signed-off-by: Steven Rostedt (Google) tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc | 1 - 1 file changed, 1 deletion(-) commit 5db19792f0660ad1ece247829bddd24bb2f8db25 Author: Linyu Yuan Date: Mon Jun 27 10:19:08 2022 +0800 selftests/ftrace: Add test case for GRP/ only input Add kprobe and eprobe event test for new GRP/ only format. Link: https://lore.kernel.org/all/1656296348-16111-5-git-send-email-quic_linyyuan@quicinc.com/ Acked-by: Masami Hiramatsu (Google) Reviewed-by: Tom Zanussi Signed-off-by: Linyu Yuan Signed-off-by: Steven Rostedt (Google) .../selftests/ftrace/test.d/dynevent/add_remove_eprobe.tc | 9 ++++++++- .../selftests/ftrace/test.d/dynevent/add_remove_kprobe.tc | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) commit 95c104c378dc7d4cb3fb9f289dc5354bfc285fe0 Author: Linyu Yuan Date: Mon Jun 27 10:19:07 2022 +0800 tracing: Auto generate event name when creating a group of events Currently when creating a specific group of trace events, take kprobe event as example, the user must use the following format: p:GRP/EVENT [MOD:]KSYM[+OFFS]|KADDR [FETCHARGS], which means user must enter EVENT name, one example is: echo 'p:usb_gadget/config_usb_cfg_link config_usb_cfg_link $arg1' >> kprobe_events It is not simple if there are too many entries because the event name is the same as symbol name. This change allows user to specify no EVENT name, format changed as: p:GRP/ [MOD:]KSYM[+OFFS]|KADDR [FETCHARGS] It will generate event name automatically and one example is: echo 'p:usb_gadget/ config_usb_cfg_link $arg1' >> kprobe_events. Link: https://lore.kernel.org/all/1656296348-16111-4-git-send-email-quic_linyyuan@quicinc.com/ Acked-by: Masami Hiramatsu (Google) Reviewed-by: Tom Zanussi Signed-off-by: Linyu Yuan Signed-off-by: Steven Rostedt (Google) Documentation/trace/kprobetrace.rst | 8 ++++---- Documentation/trace/uprobetracer.rst | 8 ++++---- kernel/trace/trace.c | 8 ++++---- kernel/trace/trace_dynevent.c | 2 +- kernel/trace/trace_eprobe.c | 25 +++++++++++++------------ kernel/trace/trace_kprobe.c | 16 ++++++++++------ kernel/trace/trace_probe.c | 4 ++++ kernel/trace/trace_uprobe.c | 12 ++++++++---- 8 files changed, 48 insertions(+), 35 deletions(-) commit f360ea5641dc9473ad485e882c8ac3b1aa2672ff Author: Linyu Yuan Date: Mon Jun 27 10:19:06 2022 +0800 tracing: eprobe: Remove duplicate is_good_name() operation traceprobe_parse_event_name() already validate SYSTEM and EVENT name, there is no need to call is_good_name() after it. Link: https://lore.kernel.org/all/1656296348-16111-3-git-send-email-quic_linyyuan@quicinc.com/ Acked-by: Masami Hiramatsu (Google) Reviewed-by: Tom Zanussi Signed-off-by: Linyu Yuan Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_eprobe.c | 2 -- 1 file changed, 2 deletions(-) commit b774926c733850037b15c50f893383aa71bd8695 Author: Linyu Yuan Date: Mon Jun 27 10:19:05 2022 +0800 tracing: eprobe: Add missing log index Add trace_probe_log_set_index(1) to allow report correct error if user input wrong SYSTEM.EVENT format. Link: https://lore.kernel.org/all/1656296348-16111-2-git-send-email-quic_linyyuan@quicinc.com/ Reviewed-by: Tom Zanussi Signed-off-by: Linyu Yuan Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_eprobe.c | 1 + 1 file changed, 1 insertion(+) commit ded4a2f1ae608772dd95e819f04bbaba1f0e78b1 Author: Steven Rostedt (Google) Date: Tue Jul 5 18:45:06 2022 -0400 mac80211: tracing: Use the new __vstring() helper Instead of open coding a __dynamic_array() with a fixed length (which defeats the purpose of the dynamic array in the first place). Use the new __vstring() helper that will use a va_list and only write enough of the string into the ring buffer that is needed. Link: https://lkml.kernel.org/r/20220705224751.271015450@goodmis.org Cc: Johannes Berg Cc: Ingo Molnar Cc: Andrew Morton Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Steven Rostedt (Google) net/mac80211/trace_msg.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 472e68df4a5eacdbe4fd07cffef1b5ffdd95516b Author: Xiang wangx Date: Fri Jun 10 16:34:20 2022 +0800 m68k: Fix syntax errors in comments comments "the the" should be replaced by "of the" instead. Signed-off-by: Xiang wangx Signed-off-by: Greg Ungerer arch/m68k/coldfire/intc-2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90ebf501262da7a05ebe18042907dbe57f616825 Author: Wang Jingjin Date: Fri Jun 10 10:07:55 2022 +0800 m68k: coldfire: make symbol m523x_clk_lookup static Fix sparse warnings: arch/m68k/coldfire/m523x.c:31:19: sparse: sparse: symbol 'm523x_clk_lookup' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Wang Jingjin Signed-off-by: Greg Ungerer arch/m68k/coldfire/m523x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c2bf173501652fced1d058834e9c983d295b126 Author: Randy Dunlap Date: Mon May 30 19:17:12 2022 -0700 m68k: coldfire/device.c: protect FLEXCAN blocks When CAN_FLEXCAN=y and M5441x is not set/enabled, there are build errors in coldfire/device.c: ../arch/m68k/coldfire/device.c:595:26: error: 'MCFFLEXCAN_BASE0' undeclared here (not in a function); did you mean 'MCFDMA_BASE0'? 595 | .start = MCFFLEXCAN_BASE0, ../arch/m68k/coldfire/device.c:596:43: error: 'MCFFLEXCAN_SIZE' undeclared here (not in a function) 596 | .end = MCFFLEXCAN_BASE0 + MCFFLEXCAN_SIZE, ../arch/m68k/coldfire/device.c:600:26: error: 'MCF_IRQ_IFL0' undeclared here (not in a function); did you mean 'MCF_IRQ_I2C0'? 600 | .start = MCF_IRQ_IFL0, ../arch/m68k/coldfire/device.c:605:26: error: 'MCF_IRQ_BOFF0' undeclared here (not in a function); did you mean 'MCF_IRQ_I2C0'? 605 | .start = MCF_IRQ_BOFF0, ../arch/m68k/coldfire/device.c:610:26: error: 'MCF_IRQ_ERR0' undeclared here (not in a function); did you mean 'MCF_IRQ_I2C0'? 610 | .start = MCF_IRQ_ERR0, Protect the FLEXCAN code blocks by checking if MCFFLEXCAN_SIZE is defined. Fixes: 35a9f9363a89 ("m68k: m5441x: add flexcan support") Signed-off-by: Randy Dunlap Cc: Greg Ungerer Cc: Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org Cc: uclinux-dev@uclinux.org Cc: Angelo Dureghello Signed-off-by: Greg Ungerer arch/m68k/coldfire/device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 57d6ca98ba38d58463ad2139db79b6b1e38b0937 Author: Arnd Bergmann Date: Sun Jul 24 22:28:17 2022 +0200 arm64: refresh defconfig file A number of Kconfig options have moved around in the defconfig file over time. Move them to the place that they 'savedefconfig' puts them at now, to better see which options are now gone for some reason. Reported-by: John Garry Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 62 ++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit 8849e7545322c99c6b4fc3674b57e3117a3bd5dd Author: Namjae Jeon Date: Wed Jul 13 09:24:11 2022 +0900 MAINTAINERS: ksmbd: add entry for documentation Include Documentation/filesystems/cifs/ksmbd.rst in the ksmbd maintainers file entry. Signed-off-by: Namjae Jeon Signed-off-by: Steve French MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 1c90b54718fdea4f89e7e0c2415803f33f6d0b00 Author: Namjae Jeon Date: Wed Jul 13 09:14:29 2022 +0900 ksmbd: remove unused ksmbd_share_configs_cleanup function remove unused ksmbd_share_configs_cleanup function. Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/mgmt/share_config.c | 14 -------------- fs/ksmbd/mgmt/share_config.h | 2 -- 2 files changed, 16 deletions(-) commit b3f0ceb7c2037c6e3affd7d9c84ac5f97af7a5b5 Author: Bjorn Andersson Date: Sat Jul 16 20:50:25 2022 -0700 i2c: qcom-geni: Use the correct return value The introduction of GPI support moved things around and instead of returning the result from geni_i2c_xfer() the number of messages in the request was returned, ignoring the actual result. Fix this. Fixes: d8703554f4de ("i2c: qcom-geni: Add support for GPI DMA") Signed-off-by: Bjorn Andersson Reviewed-by: Andrew Halaney Reviewed-by: Vinod Koul Reviewed-by: Johan Hovold Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qcom-geni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2af28b241eea816e6f7668d1954f15894b45d7e3 Author: David Collins Date: Mon Jun 27 16:55:12 2022 -0700 spmi: trace: fix stack-out-of-bound access in SPMI tracing functions trace_spmi_write_begin() and trace_spmi_read_end() both call memcpy() with a length of "len + 1". This leads to one extra byte being read beyond the end of the specified buffer. Fix this out-of-bound memory access by using a length of "len" instead. Here is a KASAN log showing the issue: BUG: KASAN: stack-out-of-bounds in trace_event_raw_event_spmi_read_end+0x1d0/0x234 Read of size 2 at addr ffffffc0265b7540 by task thermal@2.0-ser/1314 ... Call trace: dump_backtrace+0x0/0x3e8 show_stack+0x2c/0x3c dump_stack_lvl+0xdc/0x11c print_address_description+0x74/0x384 kasan_report+0x188/0x268 kasan_check_range+0x270/0x2b0 memcpy+0x90/0xe8 trace_event_raw_event_spmi_read_end+0x1d0/0x234 spmi_read_cmd+0x294/0x3ac spmi_ext_register_readl+0x84/0x9c regmap_spmi_ext_read+0x144/0x1b0 [regmap_spmi] _regmap_raw_read+0x40c/0x754 regmap_raw_read+0x3a0/0x514 regmap_bulk_read+0x418/0x494 adc5_gen3_poll_wait_hs+0xe8/0x1e0 [qcom_spmi_adc5_gen3] ... __arm64_sys_read+0x4c/0x60 invoke_syscall+0x80/0x218 el0_svc_common+0xec/0x1c8 ... addr ffffffc0265b7540 is located in stack of task thermal@2.0-ser/1314 at offset 32 in frame: adc5_gen3_poll_wait_hs+0x0/0x1e0 [qcom_spmi_adc5_gen3] this frame has 1 object: [32, 33) 'status' Memory state around the buggy address: ffffffc0265b7400: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ffffffc0265b7480: 04 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 >ffffffc0265b7500: 00 00 00 00 f1 f1 f1 f1 01 f3 f3 f3 00 00 00 00 ^ ffffffc0265b7580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffffc0265b7600: f1 f1 f1 f1 01 f2 07 f2 f2 f2 01 f3 00 00 00 00 ================================================================== Fixes: a9fce374815d ("spmi: add command tracepoints for SPMI") Cc: stable@vger.kernel.org Reviewed-by: Stephen Boyd Acked-by: Steven Rostedt (Google) Signed-off-by: David Collins Link: https://lore.kernel.org/r/20220627235512.2272783-1-quic_collinsd@quicinc.com Signed-off-by: Greg Kroah-Hartman include/trace/events/spmi.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 71349cc85e5930dce78ed87084dee098eba24b59 Author: William Dean Date: Sat Jul 23 18:01:28 2022 +0800 irqchip/mips-gic: Check the return value of ioremap() in gic_of_init() The function ioremap() in gic_of_init() can fail, so its return value should be checked. Reported-by: Hacash Robot Signed-off-by: William Dean Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220723100128.2964304-1-williamsukatube@163.com drivers/irqchip/irq-mips-gic.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9fdf6d97f03035ad5298e2d1635036c74c2090ed Author: Lars-Peter Clausen Date: Sun Jul 17 16:52:44 2022 +0200 i2c: cadence: Support PEC for SMBus block read SMBus packet error checking (PEC) is implemented by appending one additional byte of checksum data at the end of the message. This provides additional protection and allows to detect data corruption on the I2C bus. SMBus block reads support variable length reads. The first byte in the read message is the number of available data bytes. The combination of PEC and block read is currently not supported by the Cadence I2C driver. * When PEC is enabled the maximum transfer length for block reads increases from 33 to 34 bytes. * The I2C core smbus emulation layer relies on the driver updating the `i2c_msg` `len` field with the number of received bytes. The updated length is used when checking the PEC. Add support to the Cadence I2C driver for handling SMBus block reads with PEC. To determine the maximum transfer length uses the initial `len` value of the `i2c_msg`. When PEC is enabled this will be 2, when it is disabled it will be 1. Once a read transfer is done also increment the `len` field by the amount of received data bytes. This change has been tested with a UCM90320 PMBus power monitor, which requires block reads to access certain data fields, but also has PEC enabled by default. Fixes: df8eb5691c48 ("i2c: Add driver for Cadence I2C controller") Signed-off-by: Lars-Peter Clausen Tested-by: Shubhrajyoti Datta Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-cadence.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 913ee46905ab48e1cae0dbd18de098f572ffa388 Author: Bjorn Andersson Date: Sat Jul 16 20:50:26 2022 -0700 i2c: qcom-geni: Propagate GENI_ABORT_DONE to geni_i2c_abort_xfer() Waiting for M_CMD_ABORT_EN in geni_i2c_abort_xfer() races with the interrupt handler which will read and clear the abort bit, the result is that every abort attempt takes 1 second and is followed by a message about the abort having times out. Introduce a new state variable to carry the abort_done state from the interrupt handler back to geni_i2c_abort_xfer(). Also, turn NACK and TIMEOUT errors into debug messages Signed-off-by: Bjorn Andersson Reviewed-by: Vinod Koul [wsa: squashed two patches into one] Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qcom-geni.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 29946fbcb2c31a2a367887dc58a2e7e5b012e285 Author: Anna Schumaker Date: Thu Jul 21 14:21:35 2022 -0400 SUNRPC: Remove xdr_align_data() and xdr_expand_hole() These functions are no longer needed now that the NFS client places data and hole segments directly. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust include/linux/sunrpc/xdr.h | 2 -- net/sunrpc/xdr.c | 66 ---------------------------------------------- 2 files changed, 68 deletions(-) commit d3b00a802c845a6021148ce2e669b5a0b5729959 Author: Anna Schumaker Date: Thu Jul 21 14:21:34 2022 -0400 NFS: Replace the READ_PLUS decoding code We now take a 2-step process that allows us to place data and hole segments directly at their final position in the xdr_stream without needing to do a bunch of redundant copies to expand holes. Due to the variable lengths of each segment, the xdr metadata might cross page boundaries which I account for by setting a small scratch buffer so xdr_inline_decode() won't fail. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs42xdr.c | 170 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 88 insertions(+), 82 deletions(-) commit e1bd87608d4b6f87813f79b91e834de610f1049b Author: Anna Schumaker Date: Thu Jul 21 14:21:33 2022 -0400 SUNRPC: Add a function for zeroing out a portion of an xdr_stream This will be used during READ_PLUS decoding for handling HOLE segments. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust include/linux/sunrpc/xdr.h | 2 ++ net/sunrpc/xdr.c | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) commit 7c4cd5f4d2dd4a028a46bfb696b0cd387caadf33 Author: Anna Schumaker Date: Thu Jul 21 14:21:32 2022 -0400 SUNRPC: Add a function for directly setting the xdr page len We need to do this step during READ_PLUS decoding so that we know pages are the right length and any extra data has been preserved in the tail. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust include/linux/sunrpc/xdr.h | 1 + net/sunrpc/xdr.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) commit 4f5f3b6028343d687d0533329b130e4b8280ab32 Author: Anna Schumaker Date: Thu Jul 21 14:21:31 2022 -0400 SUNRPC: Introduce xdr_stream_move_subsegment() I do this by creating an xdr subsegment for the range we will be operating over. This lets me shift data to the correct place without potentially overwriting anything already there. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust include/linux/sunrpc/xdr.h | 2 ++ net/sunrpc/xdr.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) commit 33ce83ef0bb048be259ff8ae92ad212918f1ef35 Author: Chuck Lever Date: Fri Jul 22 15:08:24 2022 -0400 NFS: Replace fs_context-related dprintk() call sites with tracepoints Contributed as part of the long patch series that converts NFS from using dprintk to tracepoints for observability. Signed-off-by: Chuck Lever Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust fs/nfs/fs_context.c | 24 +++++++++++++--------- fs/nfs/nfstrace.h | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 10 deletions(-) commit f67939e4b045e1c8e857055463c0b5a88eca4844 Author: Chuck Lever Date: Fri Jul 22 15:08:17 2022 -0400 SUNRPC: Replace dprintk() call site in xs_data_ready Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust include/trace/events/sunrpc.h | 20 ++++++++++++++++++++ net/sunrpc/xprtsock.c | 6 ++++-- 2 files changed, 24 insertions(+), 2 deletions(-) commit 0701214cd6e66585a999b132eb72ae0489beb724 Author: Chuck Lever Date: Fri Jul 22 15:08:04 2022 -0400 SUNRPC: Fail faster on bad verifier A bad verifier is not a garbage argument, it's an authentication failure. Retrying it doesn't make the problem go away, and delays upper layer recovery steps. Signed-off-by: Chuck Lever Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust net/sunrpc/clnt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69d966510d9f5de81588b37d23a9ee8ccc477b23 Author: Jeff Layton Date: Fri Jul 22 14:12:20 2022 -0400 nfs: only issue commit in DIO codepath if we have uncommitted data Currently, we try to determine whether to issue a commit based on nfs_write_need_commit which looks at the current verifier. In the case where we got a short write and then tried to follow it up with one that failed, the verifier can't be trusted. What we really want to know is whether the pgio request had any successful writes that came back as UNSTABLE. Add a new flag to the pgio request, and use that to indicate that we've had a successful unstable write. Only issue a commit if that flag is set. Signed-off-by: Jeff Layton Signed-off-by: Trond Myklebust fs/nfs/direct.c | 2 +- fs/nfs/write.c | 48 ++++++++++++++++++++++++++++++------------------ include/linux/nfs_xdr.h | 1 + 3 files changed, 32 insertions(+), 19 deletions(-) commit 55051c0ced7d322a169f8603d306ee6ec079f8ae Author: Jeff Layton Date: Fri Jul 22 14:12:19 2022 -0400 nfs: always check dreq->error after a commit When the client gets back a short DIO write, it will then attempt to issue another write to finish the DIO request. If that write then fails (as is often the case in an -ENOSPC situation), then we still may need to issue a COMMIT if the earlier short write was unstable. If that COMMIT then succeeds, then we don't want the client to reschedule the write requests, and to instead just return a short write. Otherwise, we can end up looping over the same DIO write forever. Always consult dreq->error after a successful RPC, even when the flag state is not NFS_ODIRECT_DONE. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2028370 Reported-by: Boyang Xue Signed-off-by: Jeff Layton Signed-off-by: Trond Myklebust fs/nfs/direct.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8efc4bbe84a8bdd26e848ed93a8900fad1b44ca2 Author: Jeff Layton Date: Fri Jul 22 14:12:18 2022 -0400 nfs: add new nfs_direct_req tracepoint events Add some new tracepoints to the DIO write code. Signed-off-by: Jeff Layton Signed-off-by: Trond Myklebust fs/nfs/direct.c | 45 ++++++++++-------------------------- fs/nfs/internal.h | 33 ++++++++++++++++++++++++++ fs/nfs/nfstrace.h | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+), 33 deletions(-) commit ba8ec7a607e98e8491a1fcf924a2e6c96ac9d413 Author: Trond Myklebust Date: Sat Jul 23 14:47:28 2022 -0400 SUNRPC: Shrink size of struct rpc_task Move the field 'tk_rpc_status' so that we eliminate a 4 byte hole in the structure. For x86_64, this shrinks the size of the struct by 8 bytes. 'pahole' output before the change: /* size: 232, cachelines: 4, members: 27 */ /* sum members: 222, holes: 1, sum holes: 4 */ /* sum bitfield members: 8 bits (1 bytes) */ /* padding: 5 */ /* last cacheline: 40 bytes */ 'pahole' output after the change: /* size: 224, cachelines: 4, members: 27 */ /* padding: 1 */ /* last cacheline: 32 bytes */ Signed-off-by: Trond Myklebust include/linux/sunrpc/sched.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5d4d0f15657535f6a122ab26d47230b5c2b944af Author: Basavaraj Natikar Date: Sat Jul 23 11:40:33 2022 +0530 HID: amd_sfh: Handle condition of "no sensors" Add a check for num_hid_devices to handle special case the situation of "no sensors". Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)") Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina drivers/hid/amd-sfh-hid/amd_sfh_client.c | 2 ++ 1 file changed, 2 insertions(+) commit 1a9c9657ba095e3b330daaef75e53329aa989195 Author: Basavaraj Natikar Date: Sat Jul 23 11:40:32 2022 +0530 HID: amd_sfh: Fix implicit declaration error on i386 Add depended header file to fix error on i386 due to implicit declaration of function ‘writeq’. Fixes: 93ce5e0231d7 ("HID: amd_sfh: Implement SFH1.1 functionality") Reported-by: Randy Dunlap Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c | 2 ++ 1 file changed, 2 insertions(+) commit 6a010a49b63ac8465851a79185d8deff966f8e1a Author: Tejun Heo Date: Sat Jul 23 04:28:28 2022 -1000 cgroup: Make !percpu threadgroup_rwsem operations optional 3942a9bd7b58 ("locking, rcu, cgroup: Avoid synchronize_sched() in __cgroup_procs_write()") disabled percpu operations on threadgroup_rwsem because the impiled synchronize_rcu() on write locking was pushing up the latencies too much for android which constantly moves processes between cgroups. This makes the hotter paths - fork and exit - slower as they're always forced into the slow path. There is no reason to force this on everyone especially given that more common static usage pattern can now completely avoid write-locking the rwsem. Write-locking is elided when turning on and off controllers on empty sub-trees and CLONE_INTO_CGROUP enables seeding a cgroup without grabbing the rwsem. Restore the default percpu operations and introduce the mount option "favordynmods" and config option CGROUP_FAVOR_DYNMODS for users who need lower latencies for the dynamic operations. Signed-off-by: Tejun Heo Cc: Christian Brauner Cc: Michal Koutn� Cc: Peter Zijlstra Cc: John Stultz Cc: Dmitry Shmidt Cc: Oleg Nesterov Documentation/admin-guide/cgroup-v2.rst | 8 ++++++ include/linux/cgroup-defs.h | 19 ++++++++++++--- init/Kconfig | 10 ++++++++ kernel/cgroup/cgroup-internal.h | 1 + kernel/cgroup/cgroup-v1.c | 17 ++++++++++++- kernel/cgroup/cgroup.c | 43 +++++++++++++++++++++++++++------ 6 files changed, 87 insertions(+), 11 deletions(-) commit cfedb3d5e602dbf12e254cf88aceac348342f9b2 Author: Nicolin Chen Date: Fri Jul 22 19:02:50 2022 -0700 vfio/ccw: Only pass in contiguous pages This driver is the only caller of vfio_pin/unpin_pages that might pass in a non-contiguous PFN list, but in many cases it has a contiguous PFN list to process. So letting VFIO API handle a non-contiguous PFN list is actually counterproductive. Add a pair of simple loops to pass in contiguous PFNs only, to have an efficient implementation in VFIO. Reviewed-by: Jason Gunthorpe Reviewed-by: Eric Farman Tested-by: Eric Farman Signed-off-by: Nicolin Chen Link: https://lore.kernel.org/r/20220723020256.30081-5-nicolinc@nvidia.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_cp.c | 70 +++++++++++++++++++++++++++++++++--------- 1 file changed, 56 insertions(+), 14 deletions(-) commit 10e19d492a326afe7f016a8735ccdfd7c65fc979 Author: Nicolin Chen Date: Fri Jul 22 19:02:49 2022 -0700 vfio/ap: Pass in physical address of ind to ap_aqic() The ap_aqic() is called by vfio_ap_irq_enable() where it passes in a virt value that's casted from a physical address "h_nib". Inside the ap_aqic(), it does virt_to_phys() again. Since ap_aqic() needs a physical address, let's just pass in a pa of ind directly. So change the "ind" to "pa_ind". Reviewed-by: Harald Freudenberger Reviewed-by: Jason Gunthorpe Tested-by: Eric Farman Signed-off-by: Nicolin Chen Link: https://lore.kernel.org/r/20220723020256.30081-4-nicolinc@nvidia.com Signed-off-by: Alex Williamson arch/s390/include/asm/ap.h | 6 +++--- drivers/s390/crypto/ap_queue.c | 2 +- drivers/s390/crypto/vfio_ap_ops.c | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) commit 2c9e8c01109fb65a63b6830adeb5d7c79ccf26d6 Author: Nicolin Chen Date: Fri Jul 22 19:02:48 2022 -0700 drm/i915/gvt: Replace roundup with DIV_ROUND_UP It's a bit redundant for the maths here using roundup. Suggested-by: Jason Gunthorpe Tested-by: Terrence Xu Signed-off-by: Nicolin Chen Link: https://lore.kernel.org/r/20220723020256.30081-3-nicolinc@nvidia.com Signed-off-by: Alex Williamson drivers/gpu/drm/i915/gvt/kvmgt.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit e8f90717ed3b58e81c480b3aa38e641c0da5a456 Author: Nicolin Chen Date: Fri Jul 22 19:02:47 2022 -0700 vfio: Make vfio_unpin_pages() return void There's only one caller that checks its return value with a WARN_ON_ONCE, while all other callers don't check the return value at all. Above that, an undo function should not fail. So, simplify the API to return void by embedding similar WARN_ONs. Also for users to pinpoint which condition fails, separate WARN_ON lines, yet remove the "driver->ops->unpin_pages" check, since it's unreasonable for callers to unpin on something totally random that wasn't even pinned. And remove NULL pointer checks for they would trigger oops vs. warnings. Note that npage is already validated in the vfio core, thus drop the same check in the type1 code. Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Kirti Wankhede Tested-by: Terrence Xu Signed-off-by: Nicolin Chen Link: https://lore.kernel.org/r/20220723020256.30081-2-nicolinc@nvidia.com Signed-off-by: Alex Williamson Documentation/driver-api/vfio-mediated-device.rst | 2 +- drivers/gpu/drm/i915/gvt/kvmgt.c | 5 +---- drivers/vfio/vfio.c | 21 +++++++-------------- drivers/vfio/vfio.h | 2 +- drivers/vfio/vfio_iommu_type1.c | 15 ++++++--------- include/linux/vfio.h | 4 ++-- 6 files changed, 18 insertions(+), 31 deletions(-) commit 2d27e52841092e5831dd41f313028c668d816eb0 Author: William Dean Date: Fri Jul 22 11:09:38 2022 +0800 watchdog: armada_37xx_wdt: check the return value of devm_ioremap() in armada_37xx_wdt_probe() The function devm_ioremap() in armada_37xx_wdt_probe() can fail, so its return value should be checked. Fixes: 54e3d9b518c8a ("watchdog: Add support for Armada 37xx CPU watchdog") Reported-by: Hacash Robot Signed-off-by: William Dean Reviewed-by: Marek Beh=C3=BAn Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220722030938.2925156-1-williamsukatube@163.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/armada_37xx_wdt.c | 2 ++ 1 file changed, 2 insertions(+) commit 30ebc985d1add0222ca37acb6fbf54b0ee79e9b1 Author: Jason Wang Date: Sat Jul 16 12:19:51 2022 +0800 watchdog: dw_wdt: Fix comment typo The double `have' is duplicated in the comment, remove one. Signed-off-by: Jason Wang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220716041951.34714-1-wangborong@cdjrlc.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/dw_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b79953090ab063fed67dbcb48a7e30be0db404f0 Author: Jason Wang Date: Sat Jul 16 12:18:56 2022 +0800 watchdog: Fix comment typo The double `and' is duplicated in the comment, remove one. Signed-off-by: Jason Wang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220716041856.34449-1-wangborong@cdjrlc.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/booke_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60e1fba4310f92522a567749d1ba6e2421115d61 Author: Abel Vesa Date: Thu Jul 7 15:50:15 2022 +0300 dt-bindings: watchdog: Add fsl,scu-wdt yaml file In order to replace the fsl,scu txt file from bindings/arm/freescale, we need to split it between the right subsystems. This patch documents separately the 'watchdog' child node of the SCU main node. Signed-off-by: Abel Vesa Signed-off-by: Viorel Suman Reviewed-by: Guenter Roeck Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220707125022.1156498-9-viorel.suman@oss.nxp.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck .../devicetree/bindings/arm/freescale/fsl,scu.txt | 15 --------------- 1 file changed, 15 deletions(-) commit 1cdaa0d5f430a97ec9471dc2a65ab23fd913461b Author: Luo Xueqin Date: Tue Jul 5 23:31:38 2022 +0800 watchdog:Fix typo in comment Spelling mistake in comment. Reported-by: k2ci Signed-off-by: Luo Xueqin Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220705153138.29657-1-luoxueqin66@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/pc87413_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 066951ca33ced33f84a725214494df2ee8ad49bd Author: Stephan Gerhold Date: Wed Jun 29 10:48:16 2022 +0200 watchdog: pm8916_wdt: Handle watchdog enabled by bootloader The bootloader might already enable the watchdog to catch hangs during the boot process. In that case the kernel needs to ping the watchdog temporarily until userspace is fully started. Add a check for this in the probe() function and set the WDOG_HW_RUNNING flag to make the watchdog core handle this automatically. Signed-off-by: Stephan Gerhold Reviewed-by: Loic Poulain Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220629084816.125515-4-stephan.gerhold@kernkonzept.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/pm8916_wdt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e7c54a412f49e9a9b8145d96a34ff3a06375dd43 Author: Stephan Gerhold Date: Wed Jun 29 10:48:15 2022 +0200 watchdog: pm8916_wdt: Report reboot reason The PM8916 PMIC provides "power-off reason" (POFF_REASON) registers to allow detecting why the board was powered off or rebooted. This can be used to expose if a reset happened due to a watchdog timeout. The watchdog API also provides status bits for overtemperature and undervoltage which happen to be reported in the same PMIC register. Make this information available as part of the watchdog device so userspace can decide to handle the situation accordingly. Signed-off-by: Stephan Gerhold Reviewed-by: Loic Poulain Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220629084816.125515-3-stephan.gerhold@kernkonzept.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/pm8916_wdt.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit 4e5b406514fce00b16b7fc8cc5a6c9ec51518b0a Author: Stephan Gerhold Date: Wed Jun 29 10:48:14 2022 +0200 watchdog: pm8916_wdt: Avoid read of write-only PET register PMIC_WD_RESET_PET is a write-only register that is used to ping the watchdog. It does not make sense to use read-modify-write for it: a register read will never return anything but zero. (And actually even if it did we would still want to write again to ensure the watchdog is pinged.) Reduce the overhead for the watchdog ping slightly by using regmap_write() directly instead. Signed-off-by: Stephan Gerhold Reviewed-by: Loic Poulain Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220629084816.125515-2-stephan.gerhold@kernkonzept.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/pm8916_wdt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5f02d033f3a512397e2304c3cd0c0d69471e5338 Author: Paul Cercueil Date: Tue Jun 28 20:34:49 2022 +0100 watchdog: wdat_wdt: Remove #ifdef guards for PM related functions Use the new NOIRQ_SYSTEM_SLEEP_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. Not using #ifdef guards means that the code is always compiled independently of any Kconfig option, and thanks to that bugs and regressions are easier to catch. Signed-off-by: Paul Cercueil Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220628193449.160585-9-paul@crapouillou.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/wdat_wdt.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit c1eaa8c559684459eae981f8fad4973a0ac674a4 Author: Paul Cercueil Date: Tue Jun 28 20:34:48 2022 +0100 watchdog: tegra_wdt: Remove #ifdef guards for PM related functions Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. Not using #ifdef guards means that the code is always compiled independently of any Kconfig option, and thanks to that bugs and regressions are easier to catch. While at it, the functions tegra_wdt_runtime_{suspend,resume} were renamed to tegra_wdt_{suspend,resume}, as they are *not* runtime-PM callbacks, but standard system suspend/resume callbacks. Signed-off-by: Paul Cercueil Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220628193449.160585-8-paul@crapouillou.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/tegra_wdt.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 29958ab702817c4a977fd17852f4d58f5c8f5a52 Author: Paul Cercueil Date: Tue Jun 28 20:34:47 2022 +0100 watchdog: st_lpc_wdt: Remove #ifdef guards for PM related functions Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. Not using #ifdef guards means that the code is always compiled independently of any Kconfig option, and thanks to that bugs and regressions are easier to catch. Signed-off-by: Paul Cercueil Cc: Patrice Chotard Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220628193449.160585-7-paul@crapouillou.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/st_lpc_wdt.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 5c040ea210185ce20f780906acca8231efa333b6 Author: Paul Cercueil Date: Tue Jun 28 20:34:46 2022 +0100 watchdog: sama5d4_wdt: Remove #ifdef guards for PM related functions Use the new LATE_SYSTEM_SLEEP_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. Not using #ifdef guards means that the code is always compiled independently of any Kconfig option, and thanks to that bugs and regressions are easier to catch. Signed-off-by: Paul Cercueil Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Claudiu Beznea Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Claudiu Beznea Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220628193449.160585-6-paul@crapouillou.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sama5d4_wdt.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit aa55761ab442f71cd4dded60f55bbd90a3c904af Author: Paul Cercueil Date: Tue Jun 28 20:34:45 2022 +0100 watchdog: s3c2410_wdt: Remove #ifdef guards for PM related functions Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. Not using #ifdef guards means that the code is always compiled independently of any Kconfig option, and thanks to that bugs and regressions are easier to catch. Signed-off-by: Paul Cercueil Cc: Krzysztof Kozlowski Cc: Alim Akhtar Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Reviewed-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220628193449.160585-5-paul@crapouillou.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/s3c2410_wdt.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit d4777d0f29913711793708e1b3392390956a527f Author: Paul Cercueil Date: Tue Jun 28 20:34:44 2022 +0100 watchdog: mtk_wdt: Remove #ifdef guards for PM related functions Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. Not using #ifdef guards means that the code is always compiled independently of any Kconfig option, and thanks to that bugs and regressions are easier to catch. Signed-off-by: Paul Cercueil Cc: Matthias Brugger Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220628193449.160585-4-paul@crapouillou.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/mtk_wdt.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 4ccfb98938e50133332ff22bb932d2f529f73738 Author: Paul Cercueil Date: Tue Jun 28 20:34:43 2022 +0100 watchdog: dw_wdt: Remove #ifdef guards for PM related functions Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. Not using #ifdef guards means that the code is always compiled independently of any Kconfig option, and thanks to that bugs and regressions are easier to catch. Signed-off-by: Paul Cercueil Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220628193449.160585-3-paul@crapouillou.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/dw_wdt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3b956c0aae96eca7e527cdcaeb3a168640507372 Author: Paul Cercueil Date: Tue Jun 28 20:34:42 2022 +0100 watchdog: bcm7038_wdt: Remove #ifdef guards for PM related functions Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. Not using #ifdef guards means that the code is always compiled independently of any Kconfig option, and thanks to that bugs and regressions are easier to catch. Signed-off-by: Paul Cercueil Cc: Florian Fainelli Cc: Broadcom internal kernel review list Reviewed-by: Florian Fainelli Tested-by: Florian Fainelli Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220628193449.160585-2-paul@crapouillou.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/bcm7038_wdt.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit c47c88555ffcc2deebea6140e66a9cac3b6302b8 Author: Sander Vanheule Date: Mon Jun 27 21:00:56 2022 +0200 watchdog: realtek-otto: add RTL9310 support The RTL9310 SoC series has a watchdog timer identical to the already supported SoCs. The peripheral is memory mapped at 0x18003260 and driven by the Lexra bus clock. Signed-off-by: Sander Vanheule Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/629e95e16c8dc812dc5a4ea34a2e2e1ff2faf88c.1656356377.git.sander@svanheule.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/realtek_otto_wdt.c | 1 + 1 file changed, 1 insertion(+) commit 595d9a69c45dbb167562abb6f120cac571a545fa Author: Sander Vanheule Date: Mon Jun 27 21:00:55 2022 +0200 dt-bindings: watchdog: realtek,otto-wdt: add RTL9310 Add the realtek,rtl9310-wdt compatible to the Realtek Otto watchdog binding. Signed-off-by: Sander Vanheule Acked-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/84d873d7dd375cd2392f89fa6bd9e0fe5dda4e1c.1656356377.git.sander@svanheule.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/realtek,otto-wdt.yaml | 1 + 1 file changed, 1 insertion(+) commit 3b1905456aad0d111bba3388165e7bb78537db72 Author: Bing Fan Date: Fri Jun 24 10:24:42 2022 +0800 watchdog: sp805_wdt: add arm cmsdk apb wdt support Support arm CMSDK ip apb watchdog device. Description details of this device can be found in the document DDI0479D_m_class_processor_system_r1p1_trm.pdf on the arm's document web. Which periphid is 0x001bb824. The registers are basically the same as the 805, just a few more: Periphid4/5/6/7 with offset 0xFD0/0xFD4/0xFD8/0xFDC. For the register description of arm,sp805, please refer to the document DDI0270-arm-sp805.pdf. Signed-off-by: Bing Fan Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1656037482-19505-1-git-send-email-hptsfb@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sp805_wdt.c | 5 +++++ 1 file changed, 5 insertions(+) commit c6d9c0798ed366a09a9e53d71edcd2266e34a6eb Author: Jean Delvare Date: Tue Jun 21 15:28:40 2022 +0200 watchdog: sp5100_tco: Fix a memory leak of EFCH MMIO resource Unlike release_mem_region(), a call to release_resource() does not free the resource, so it has to be freed explicitly to avoid a memory leak. Signed-off-by: Jean Delvare Fixes: 0578fff4aae5 ("Watchdog: sp5100_tco: Add initialization using EFCH MMIO") Cc: Terry Bowman Cc: Wim Van Sebroeck Cc: Guenter Roeck Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220621152840.420a0f4c@endymion.delvare Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sp5100_tco.c | 1 + 1 file changed, 1 insertion(+) commit 418c951d637a2685392f52fd26113bfe14408f89 Author: Luca Ceresoli Date: Fri Jun 3 17:57:27 2022 +0200 watchdog: max77620: update Luca Ceresoli's e-mail address My Bootlin address is preferred from now on. Signed-off-by: Luca Ceresoli Signed-off-by: Luca Ceresoli Reviewed-by: Guenter Roeck https://lore.kernel.org/r20220603155727.1232061-6-luca@lucaceresoli.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/max77620_wdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 79ded5088dd1f327e64d14afaa522b25eb830384 Author: Rohit Agarwal Date: Wed Jun 1 16:15:10 2022 +0530 dt-bindings: watchdog: Add binding for Qcom SDX65 Add devicetree binding for watchdog present in Qcom SDX65 platform. Signed-off-by: Rohit Agarwal Acked-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck https://lore.kernel.org/r/1654080312-5408-10-git-send-email-quic_rohiagar@quicinc.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml | 1 + 1 file changed, 1 insertion(+) commit 97d5ec548150764946f38632e62e79759832b54b Author: Jiasheng Jiang Date: Thu May 26 16:03:03 2022 +0800 watchdog: f71808e_wdt: Add check for platform_driver_register As platform_driver_register() could fail, it should be better to deal with the return value in order to maintain the code consisitency. Fixes: 27e0fe00a5c6 ("watchdog: f71808e_wdt: refactor to platform device/driver pair") Signed-off-by: Jiasheng Jiang Reviewed-by: Guenter Roeck https://lore.kernel.org/r/20220526080303.1005063-1-jiasheng@iscas.ac.cn Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/f71808e_wdt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ae662878e7ffa1f8aecdca0df9780ef1fb6b42de Author: Rob Herring Date: Wed May 25 20:41:27 2022 -0500 dt-bindings: watchdog: faraday: Fix typo in example 'timeout-sec' property The 'unevaluatedProperties' schema checks is not fully working and doesn't catch some cases where there's a $ref to another schema. A fix is pending, but results in new warnings in examples. The correct common watchdog property is 'timeout-sec', not 'timeout-secs'. Signed-off-by: Rob Herring Reviewed-by: Linus Walleij Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220526014127.2872254-1-robh@kernel.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7423bb23cdd0ee4850279742158a64a4bb25ef0 Author: Maxim Devaev Date: Sat Jul 23 13:14:32 2022 +0300 USB: docs: fixed table margin in configfs-usb-gadget-mass-storage After merging forced_eject patch, there was a broken margin in the configfs parameters table in the ABI documentation. This patch fixes it. Fixes: 421c8d9a20da ("usb: gadget: f_mass_storage: forced_eject attribute") Reported-by: Stephen Rothwell Signed-off-by: Maxim Devaev Link: https://lore.kernel.org/r/20220723101432.72178-1-mdevaev@gmail.com Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/configfs-usb-gadget-mass-storage | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 30312730bd029f567045c38098d7e5a62e9aa658 Author: Tejun Heo Date: Thu Jul 14 18:38:43 2022 -1000 cgroup: Add "no" prefixed mount options We allow modifying these mount options via remount. Let's add "no" prefixed variants so that they can be turned off too. Signed-off-by: Tejun Heo Cc: Christian Brauner Cc: Michal Koutný Documentation/admin-guide/cgroup-v2.rst | 6 +++--- kernel/cgroup/cgroup.c | 20 +++++++++++++++----- 2 files changed, 18 insertions(+), 8 deletions(-) commit 671c11f0619e5ccb380bcf0f062f69ba95fc974a Author: Tejun Heo Date: Thu Jul 14 18:38:15 2022 -1000 cgroup: Elide write-locking threadgroup_rwsem when updating csses on an empty subtree cgroup_update_dfl_csses() write-lock the threadgroup_rwsem as updating the csses can trigger process migrations. However, if the subtree doesn't contain any tasks, there aren't gonna be any cgroup migrations. This condition can be trivially detected by testing whether mgctx.preloaded_src_csets is empty. Elide write-locking threadgroup_rwsem if the subtree is empty. After this optimization, the usage pattern of creating a cgroup, enabling the necessary controllers, and then seeding it with CLONE_INTO_CGROUP and then removing the cgroup after it becomes empty doesn't need to write-lock threadgroup_rwsem at all. Signed-off-by: Tejun Heo Cc: Christian Brauner Cc: Michal Koutný kernel/cgroup/cgroup.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 502c6f8cedcce7889ccdefeb88ce36b39acd522f Merge: 7074732c8fae d6b98c8d242a Author: Jakub Kicinski Date: Fri Jul 22 21:55:57 2022 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2022-07-21 This series contains updates to ice driver only. Karol adds implementation for GNSS write; data is written to the GNSS module through TTY device using u-blox UBX protocol. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: add write functionality for GNSS TTY ice: add i2c write command ==================== Link: https://lore.kernel.org/r/20220721202842.3276257-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 7074732c8faee201a245a6f983008a5789c0be33 Author: Matthias May Date: Thu Jul 21 22:27:19 2022 +0200 ip_tunnels: allow VXLAN/GENEVE to inherit TOS/TTL from VLAN The current code allows for VXLAN and GENEVE to inherit the TOS respective the TTL when skb-protocol is ETH_P_IP or ETH_P_IPV6. However when the payload is VLAN encapsulated, then this inheriting does not work, because the visible skb-protocol is of type ETH_P_8021Q or ETH_P_8021AD. Instead of skb->protocol use skb_protocol(). Signed-off-by: Matthias May Link: https://lore.kernel.org/r/20220721202718.10092-1-matthias.may@westermo.com Signed-off-by: Jakub Kicinski include/net/ip_tunnels.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 7446b157fe9cf03023fe183b3961c243f480e560 Merge: 4a934eca7b39 5050531610a6 Author: Jakub Kicinski Date: Fri Jul 22 21:44:01 2022 -0700 Merge branch 'net-usb-ax88179_178a-improvements-and-bug-fixes' Justin Chen says: ==================== net: usb: ax88179_178a: improvements and bug fixes Power management was partially broken. There were two issues when dropping into a sleep state. 1. Resume was not doing a fully HW restore. Only a partial restore. This lead to a couple things being broken on resume. One of them being tcp rx. 2. wolopt was not being restored properly on resume. Also did some general improvements and clean up to make it easier to fix the issues mentioned above. ==================== Link: https://lore.kernel.org/r/1658363296-15734-1-git-send-email-justinpopo6@gmail.com Signed-off-by: Jakub Kicinski commit 5050531610a64f08461e0c309db80ca51b779fd5 Author: Justin Chen Date: Wed Jul 20 17:28:16 2022 -0700 net: usb: ax88179_178a: wol optimizations - Check if wol is supported on reset instead of everytime get_wol is called. - Save wolopts in private data instead of relying on the HW to save it. - Defer enabling WoL until suspend instead of enabling it everytime set_wol is called. Signed-off-by: Justin Chen Signed-off-by: Jakub Kicinski drivers/net/usb/ax88179_178a.c | 52 +++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 24 deletions(-) commit 2bcbd3d8a7b4525cdb741fe82330edb6f5452c7f Author: Justin Chen Date: Wed Jul 20 17:28:15 2022 -0700 net: usb: ax88179_178a: move priv to driver_priv We need more space to save WoL context. So lets allocate memory for ax88179_data instead of using struct usbnet data field which only supports 5 words. We continue to use the struct usbnet data field for multicast filters. However since we no longer have the private data stored there, we can shift it to the beginning. Signed-off-by: Justin Chen Signed-off-by: Jakub Kicinski drivers/net/usb/ax88179_178a.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) commit c4bf747c68892f165e8bf22da2a14dfa304bdaf7 Author: Justin Chen Date: Wed Jul 20 17:28:14 2022 -0700 net: usb: ax88179_178a: restore state on resume The hardware state was only partially restored, which meant certain functionality was broken on resume. Do a full HW reset on resume to fix this. Signed-off-by: Justin Chen Signed-off-by: Jakub Kicinski drivers/net/usb/ax88179_178a.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) commit 843f92052da7694e846e8e12bbe2342845d2033e Author: Justin Chen Date: Wed Jul 20 17:28:13 2022 -0700 net: usb: ax88179_178a: clean up pm calls Instead of passing in_pm flags all over the place, use the private struct to handle in_pm mode. Signed-off-by: Justin Chen Signed-off-by: Jakub Kicinski drivers/net/usb/ax88179_178a.c | 147 +++++++++++++++++------------------------ 1 file changed, 59 insertions(+), 88 deletions(-) commit 9718f9ce5b86e2f4e6364762018980f0222c2e5e Author: Justin Chen Date: Wed Jul 20 17:28:12 2022 -0700 net: usb: ax88179_178a: remove redundant init code Bind and reset are basically doing the same thing. Remove the duplicate code and have bind call into reset. Signed-off-by: Justin Chen Signed-off-by: Jakub Kicinski drivers/net/usb/ax88179_178a.c | 85 ++---------------------------------------- 1 file changed, 4 insertions(+), 81 deletions(-) commit 4a934eca7b39df35569f97a070701d6846ce46df Merge: b3fce974d423 14202eff214e Author: Jakub Kicinski Date: Fri Jul 22 19:00:17 2022 -0700 Merge tag 'for-net-next-2022-07-22' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Luiz Augusto von Dentz says: ==================== bluetooth-next pull request for net-next: - Add support for IM Networks PID 0x3568 - Add support for BCM4349B1 - Add support for CYW55572 - Add support for MT7922 VID/PID 0489/e0e2 - Add support for Realtek RTL8852C - Initial support for Isochronous Channels/ISO sockets - Remove HCI_QUIRK_BROKEN_ERR_DATA_REPORTING quirk * tag 'for-net-next-2022-07-22' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next: (58 commits) Bluetooth: btusb: Detect if an ACL packet is in fact an ISO packet Bluetooth: btusb: Add support for ISO packets Bluetooth: ISO: Add broadcast support Bluetooth: Add initial implementation of BIS connections Bluetooth: Add BTPROTO_ISO socket type Bluetooth: Add initial implementation of CIS connections Bluetooth: hci_core: Introduce hci_recv_event_data Bluetooth: Convert delayed discov_off to hci_sync Bluetooth: Remove update_scan hci_request dependancy Bluetooth: Remove dead code from hci_request.c Bluetooth: btrtl: Fix typo in comment Bluetooth: MGMT: Fix holding hci_conn reference while command is queued Bluetooth: mgmt: Fix using hci_conn_abort Bluetooth: Use bt_status to convert from errno Bluetooth: Add bt_status Bluetooth: hci_sync: Split hci_dev_open_sync Bluetooth: hci_sync: Refactor remove Adv Monitor Bluetooth: hci_sync: Refactor add Adv Monitor Bluetooth: hci_sync: Remove HCI_QUIRK_BROKEN_ERR_DATA_REPORTING Bluetooth: btusb: Remove HCI_QUIRK_BROKEN_ERR_DATA_REPORTING for fake CSR ... ==================== Link: https://lore.kernel.org/r/20220723002232.964796-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 01ab4649ef5a377074d2ad4bf2ba6d2270d2807b Author: Guo Ren Date: Tue Jul 5 14:16:21 2022 +0800 csky: Move HEAD_TEXT_SECTION out of __init_begin-end Prevent HEAD_TEXT_SECTION back into the buddy system. Signed-off-by: Guo Ren Signed-off-by: Guo Ren arch/csky/kernel/vmlinux.lds.S | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f54af50d7b6f9ddb54df422156864cfc59e32f8c Author: Guo Ren Date: Tue Jul 5 14:00:15 2022 +0800 csky: Correct position of _stext Correct position of _stext to prevent check_kernel_text_object warning [1]. [1] https://lore.kernel.org/linux-csky/YfLpNkmlvoR8iPcq@ls3530/ Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Helge Deller arch/csky/include/asm/sections.h | 10 ++++++++++ arch/csky/kernel/setup.c | 4 ++-- arch/csky/kernel/vmlinux.lds.S | 3 ++- 3 files changed, 14 insertions(+), 3 deletions(-) commit 49a1a3cf7316e464e559850a965f3826b1562458 Author: Christophe JAILLET Date: Mon Jul 4 21:06:46 2022 +0200 csky: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. While at it, turn a bitmap_clear() into an equivalent bitmap_zero(). It is also less verbose. Signed-off-by: Christophe JAILLET Signed-off-by: Guo Ren arch/csky/mm/asid.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a2310c74d418deca0f1d749c45f1f43162510f51 Author: Liao Chang Date: Wed May 25 16:02:41 2022 +0800 csky/kprobe: reclaim insn_slot on kprobe unregistration On kprobe registration kernel allocate one insn_slot for new kprobe, but it forget to reclaim the insn_slot on unregistration, leading to a potential leakage. Reported-by: Chen Guokai Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Liao Chang Signed-off-by: Guo Ren arch/csky/kernel/probes/kprobes.c | 4 ++++ 1 file changed, 4 insertions(+) commit 14202eff214e1e941fefa0366d4c3bc4b1a0d500 Author: Luiz Augusto von Dentz Date: Mon Oct 28 20:25:02 2019 +0200 Bluetooth: btusb: Detect if an ACL packet is in fact an ISO packet Fix up the packet type if ISO packets are sent over the bulk endpoint. Note: This is a stopgap since the Bluetooth specification currently doesn't define any endpoint to transport ISO packets. Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 70405f02728e657c32ccfb1d3a2f6a801a948c77 Author: Luiz Augusto von Dentz Date: Mon Oct 28 17:09:09 2019 +0200 Bluetooth: btusb: Add support for ISO packets This enabled btusb driver to properly transmit ISO packets. Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit f764a6c2c1e446f560faa3232271a0637369170b Author: Luiz Augusto von Dentz Date: Wed Mar 9 13:14:41 2022 -0800 Bluetooth: ISO: Add broadcast support This adds broadcast support for BTPROTO_ISO by extending the sockaddr_iso with a new struct sockaddr_iso_bc where the socket user can set the broadcast address when receiving, the SID and the BIS indexes it wants to synchronize. When using BTPROTO_ISO for broadcast the roles are: Broadcaster -> uses connect with address set to BDADDR_ANY: > tools/isotest -s 00:00:00:00:00:00 Broadcast Receiver -> uses listen with address set to broadcaster: > tools/isotest -d 00:AA:01:00:00:00 Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/bluetooth.h | 2 + include/net/bluetooth/iso.h | 11 ++ net/bluetooth/iso.c | 391 ++++++++++++++++++++++++++++++++++---- 3 files changed, 370 insertions(+), 34 deletions(-) commit eca0ae4aea66914515e5e3098ea051b518ee5316 Author: Luiz Augusto von Dentz Date: Wed Mar 9 13:22:20 2022 -0800 Bluetooth: Add initial implementation of BIS connections This adds initial support for BIS/BIG which includes: == Broadcaster role: Setup a periodic advertising and create a BIG == > tools/isotest -s 00:00:00:00:00:00 isotest[63]: Connected [00:00:00:00:00:00] isotest[63]: QoS BIG 0x00 BIS 0x00 Packing 0x00 Framing 0x00] isotest[63]: Output QoS [Interval 10000 us Latency 10 ms SDU 40 PHY 0x02 RTN 2] isotest[63]: Sending ... isotest[63]: Number of packets: 1 isotest[63]: Socket jitter buffer: 80 buffer < HCI Command: LE Set Perio.. (0x08|0x003e) plen 7 ... > HCI Event: Command Complete (0x0e) plen 4 LE Set Periodic Advertising Parameters (0x08|0x003e) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Perio.. (0x08|0x003f) plen 7 ... > HCI Event: Command Complete (0x0e) plen 4 LE Set Periodic Advertising Data (0x08|0x003f) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Perio.. (0x08|0x0040) plen 2 ... > HCI Event: Command Complete (0x0e) plen 4 LE Set Periodic Advertising Enable (0x08|0x0040) ncmd 1 Status: Success (0x00) < HCI Command: LE Create B.. (0x08|0x0068) plen 31 ... > HCI Event: Command Status (0x0f) plen 4 LE Create Broadcast Isochronous Group (0x08|0x0068) ncmd 1 Status: Success (0x00) > HCI Event: LE Meta Event (0x3e) plen 21 LE Broadcast Isochronous Group Complete (0x1b) ... == Broadcast Receiver role: Create a PA Sync and BIG Sync == > tools/isotest -i hci1 -d 00:AA:01:00:00:00 isotest[66]: Waiting for connection 00:AA:01:00:00:00... < HCI Command: LE Periodic Advert.. (0x08|0x0044) plen 14 ... > HCI Event: Command Status (0x0f) plen 4 LE Periodic Advertising Create Sync (0x08|0x0044) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Extended Sca.. (0x08|0x0041) plen 8 ... > HCI Event: Command Complete (0x0e) plen 4 LE Set Extended Scan Parameters (0x08|0x0041) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Extended Sca.. (0x08|0x0042) plen 6 ... > HCI Event: Command Complete (0x0e) plen 4 LE Set Extended Scan Enable (0x08|0x0042) ncmd 1 Status: Success (0x00) > HCI Event: LE Meta Event (0x3e) plen 29 LE Extended Advertising Report (0x0d) ... > HCI Event: LE Meta Event (0x3e) plen 16 LE Periodic Advertising Sync Established (0x0e) ... < HCI Command: LE Broadcast Isoch.. (0x08|0x006b) plen 25 ... > HCI Event: Command Status (0x0f) plen 4 LE Broadcast Isochronous Group Create Sync (0x08|0x006b) ncmd 1 Status: Success (0x00) > HCI Event: LE Meta Event (0x3e) plen 17 LE Broadcast Isochronous Group Sync Estabilished (0x1d) ... Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/bluetooth.h | 18 +- include/net/bluetooth/hci.h | 162 ++++++++++- include/net/bluetooth/hci_core.h | 89 +++++- include/net/bluetooth/hci_sync.h | 12 +- net/bluetooth/eir.c | 21 ++ net/bluetooth/eir.h | 1 + net/bluetooth/hci_conn.c | 561 ++++++++++++++++++++++++++++++++++---- net/bluetooth/hci_core.c | 80 ++++-- net/bluetooth/hci_event.c | 206 ++++++++++++++ net/bluetooth/hci_request.c | 36 ++- net/bluetooth/hci_request.h | 9 + net/bluetooth/hci_sync.c | 249 ++++++++++++++++- net/bluetooth/mgmt.c | 15 +- 13 files changed, 1333 insertions(+), 126 deletions(-) commit ccf74f2390d60a2f9a75ef496d2564abb478f46a Author: Luiz Augusto von Dentz Date: Thu Jan 16 15:55:57 2020 -0800 Bluetooth: Add BTPROTO_ISO socket type This introduces a new socket type BTPROTO_ISO which can be enabled with use of ISO Socket experiemental UUID, it can used to initiate/accept connections and transfer packets between userspace and kernel similarly to how BTPROTO_SCO works: Central -> uses connect with address set to destination bdaddr: > tools/isotest -s 00:AA:01:00:00:00 Peripheral -> uses listen: > tools/isotest -d Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/bluetooth.h | 21 + include/net/bluetooth/hci_core.h | 18 +- include/net/bluetooth/iso.h | 21 + net/bluetooth/Makefile | 1 + net/bluetooth/af_bluetooth.c | 4 +- net/bluetooth/hci_core.c | 6 +- net/bluetooth/iso.c | 1501 +++++++++++++++++++++++++++++++++++++ net/bluetooth/mgmt.c | 69 +- 8 files changed, 1636 insertions(+), 5 deletions(-) commit 26afbd826ee326e63a334c37fd45e82e50a615ec Author: Luiz Augusto von Dentz Date: Mon Jul 29 18:15:43 2019 +0300 Bluetooth: Add initial implementation of CIS connections This adds the initial implementation of CIS connections and introduces the ISO packets/links. == Central: Set CIG Parameters, create a CIS and Setup Data Path == > tools/isotest -s
< HCI Command: LE Extended Create... (0x08|0x0043) plen 26 ... > HCI Event: Command Status (0x0f) plen 4 LE Extended Create Connection (0x08|0x0043) ncmd 1 Status: Success (0x00) > HCI Event: LE Meta Event (0x3e) plen 31 LE Enhanced Connection Complete (0x0a) ... < HCI Command: LE Create Connected... (0x08|0x0064) plen 5 ... > HCI Event: Command Status (0x0f) plen 4 LE Create Connected Isochronous Stream (0x08|0x0064) ncmd 1 Status: Success (0x00) > HCI Event: LE Meta Event (0x3e) plen 29 LE Connected Isochronous Stream Established (0x19) ... < HCI Command: LE Setup Isochronou.. (0x08|0x006e) plen 13 ... > HCI Event: Command Complete (0x0e) plen 6 LE Setup Isochronous Data Path (0x08|0x006e) ncmd 1 Status: Success (0x00) Handle: 257 < HCI Command: LE Setup Isochronou.. (0x08|0x006e) plen 13 ... > HCI Event: Command Complete (0x0e) plen 6 LE Setup Isochronous Data Path (0x08|0x006e) ncmd 1 Status: Success (0x00) Handle: 257 == Peripheral: Accept CIS and Setup Data Path == > tools/isotest -d HCI Event: LE Meta Event (0x3e) plen 7 LE Connected Isochronous Stream Request (0x1a) ... < HCI Command: LE Accept Co.. (0x08|0x0066) plen 2 ... > HCI Event: LE Meta Event (0x3e) plen 29 LE Connected Isochronous Stream Established (0x19) ... < HCI Command: LE Setup Is.. (0x08|0x006e) plen 13 ... > HCI Event: Command Complete (0x0e) plen 6 LE Setup Isochronous Data Path (0x08|0x006e) ncmd 1 Status: Success (0x00) Handle: 257 < HCI Command: LE Setup Is.. (0x08|0x006e) plen 13 ... > HCI Event: Command Complete (0x0e) plen 6 LE Setup Isochronous Data Path (0x08|0x006e) ncmd 1 Status: Success (0x00) Handle: 257 Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/bluetooth.h | 33 ++- include/net/bluetooth/hci.h | 28 ++- include/net/bluetooth/hci_core.h | 107 ++++++++- include/net/bluetooth/hci_sock.h | 2 + include/net/bluetooth/hci_sync.h | 3 + net/bluetooth/Kconfig | 1 + net/bluetooth/hci_conn.c | 440 ++++++++++++++++++++++++++++++++++++++ net/bluetooth/hci_core.c | 230 ++++++++++++++++---- net/bluetooth/hci_event.c | 307 +++++++++++++++++++++++++- net/bluetooth/hci_sync.c | 49 ++++- 10 files changed, 1145 insertions(+), 55 deletions(-) commit b3fce974d4239bd46ae81bba07b59f255eb979d7 Merge: 3c47fb2f4c4d ea2babac63d4 Author: Jakub Kicinski Date: Fri Jul 22 16:55:43 2022 -0700 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== bpf-next 2022-07-22 We've added 73 non-merge commits during the last 12 day(s) which contain a total of 88 files changed, 3458 insertions(+), 860 deletions(-). The main changes are: 1) Implement BPF trampoline for arm64 JIT, from Xu Kuohai. 2) Add ksyscall/kretsyscall section support to libbpf to simplify tracing kernel syscalls through kprobe mechanism, from Andrii Nakryiko. 3) Allow for livepatch (KLP) and BPF trampolines to attach to the same kernel function, from Song Liu & Jiri Olsa. 4) Add new kfunc infrastructure for netfilter's CT e.g. to insert and change entries, from Kumar Kartikeya Dwivedi & Lorenzo Bianconi. 5) Add a ksym BPF iterator to allow for more flexible and efficient interactions with kernel symbols, from Alan Maguire. 6) Bug fixes in libbpf e.g. for uprobe binary path resolution, from Dan Carpenter. 7) Fix BPF subprog function names in stack traces, from Alexei Starovoitov. 8) libbpf support for writing custom perf event readers, from Jon Doron. 9) Switch to use SPDX tag for BPF helper man page, from Alejandro Colomar. 10) Fix xsk send-only sockets when in busy poll mode, from Maciej Fijalkowski. 11) Reparent BPF maps and their charging on memcg offlining, from Roman Gushchin. 12) Multiple follow-up fixes around BPF lsm cgroup infra, from Stanislav Fomichev. 13) Use bootstrap version of bpftool where possible to speed up builds, from Pu Lehui. 14) Cleanup BPF verifier's check_func_arg() handling, from Joanne Koong. 15) Make non-prealloced BPF map allocations low priority to play better with memcg limits, from Yafang Shao. 16) Fix BPF test runner to reject zero-length data for skbs, from Zhengchao Shao. 17) Various smaller cleanups and improvements all over the place. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (73 commits) bpf: Simplify bpf_prog_pack_[size|mask] bpf: Support bpf_trampoline on functions with IPMODIFY (e.g. livepatch) bpf, x64: Allow to use caller address from stack ftrace: Allow IPMODIFY and DIRECT ops on the same function ftrace: Add modify_ftrace_direct_multi_nolock bpf/selftests: Fix couldn't retrieve pinned program in xdp veth test bpf: Fix build error in case of !CONFIG_DEBUG_INFO_BTF selftests/bpf: Fix test_verifier failed test in unprivileged mode selftests/bpf: Add negative tests for new nf_conntrack kfuncs selftests/bpf: Add tests for new nf_conntrack kfuncs selftests/bpf: Add verifier tests for trusted kfunc args net: netfilter: Add kfuncs to set and change CT status net: netfilter: Add kfuncs to set and change CT timeout net: netfilter: Add kfuncs to allocate and insert CT net: netfilter: Deduplicate code in bpf_{xdp,skb}_ct_lookup bpf: Add documentation for kfuncs bpf: Add support for forcing kfunc args to be trusted bpf: Switch to new kfunc flags infrastructure tools/resolve_btfids: Add support for 8-byte BTF sets bpf: Introduce 8-byte BTF set ... ==================== Link: https://lore.kernel.org/r/20220722221218.29943-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit a2912b45b0826c6fc0ca9b264d03a2dacb7a72e8 Author: Stafford Horne Date: Sat Jul 23 06:49:44 2022 +0900 asm-generic: Add new pci.h and use it The asm/pci.h used for many newer architectures share similar definitions. Move the common parts to asm-generic/pci.h to allow for sharing code. Suggested-by: Arnd Bergmann Link: https://lore.kernel.org/lkml/CAK8P3a0JmPeczfmMBE__vn=Jbvf=nkbpVaZCycyv40pZNCJJXQ@mail.gmail.com/ Link: https://lore.kernel.org/r/20220722214944.831438-5-shorne@gmail.com Signed-off-by: Stafford Horne Signed-off-by: Bjorn Helgaas Reviewed-by: Arnd Bergmann Acked-by: Pierre Morel Acked-by: Geert Uytterhoeven arch/arm64/include/asm/pci.h | 10 ++-------- arch/csky/include/asm/pci.h | 17 ++--------------- arch/riscv/include/asm/pci.h | 23 ++++------------------- arch/um/include/asm/pci.h | 14 ++------------ include/asm-generic/pci.h | 30 ++++++++++++++++++++++++++++++ 5 files changed, 40 insertions(+), 54 deletions(-) commit f619d23576f76bae9b3135d96033650ca3af611d Author: Stafford Horne Date: Sat Jul 23 06:49:43 2022 +0900 csky: PCI: Define ARCH_GENERIC_PCI_MMAP_RESOURCE This looks to be something that was accidentally left out on the csky port. Define ARCH_GENERIC_PCI_MMAP_RESOURCE to keep it inline with other ports. Adding ARCH_GENERIC_PCI_MMAP_RESOURCE enables the definition of modern pci_mmap_resource_range() functions which is generally what new ports should be using. Link: https://lore.kernel.org/r/20220722214944.831438-4-shorne@gmail.com Signed-off-by: Stafford Horne Signed-off-by: Bjorn Helgaas Acked-by: Guo Ren arch/csky/include/asm/pci.h | 2 ++ 1 file changed, 2 insertions(+) commit 9cb633acfe65101854fce456ccba4108db3ccbdb Author: Alexey Kardashevskiy Date: Thu Jul 14 18:09:12 2022 +1000 vfio/spapr_tce: Fix the comment Grepping for "iommu_ops" finds this spot and gives wrong impression that iommu_ops is used in here, fix the comment. Signed-off-by: Alexey Kardashevskiy Link: https://lore.kernel.org/r/20220714080912.3713509-1-aik@ozlabs.ru [aw: convert to multi-line comment] Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_spapr_tce.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit abb4970ac33514c84b143516583eaf8cc47abd67 Author: Stafford Horne Date: Sat Jul 23 06:49:42 2022 +0900 PCI: Move isa_dma_bridge_buggy out of asm/dma.h The isa_dma_bridge_buggy symbol is only used for x86_32, and only x86_32 platforms or quirks ever set it. Add a new linux/isa-dma.h header that #defines isa_dma_bridge_buggy to 0 except on x86_32, where we keep it as a variable, and remove all the arch- specific definitions. [bhelgaas: commit log] Suggested-by: Arnd Bergmann Suggested-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220722214944.831438-3-shorne@gmail.com Signed-off-by: Stafford Horne Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Acked-by: Geert Uytterhoeven arch/alpha/include/asm/dma.h | 9 --------- arch/arc/include/asm/dma.h | 5 ----- arch/arm/include/asm/dma.h | 6 ------ arch/arm64/include/asm/pci.h | 2 -- arch/csky/include/asm/pci.h | 2 -- arch/ia64/include/asm/dma.h | 2 -- arch/m68k/include/asm/dma.h | 6 ------ arch/microblaze/include/asm/dma.h | 6 ------ arch/mips/include/asm/dma.h | 8 -------- arch/parisc/include/asm/dma.h | 6 ------ arch/powerpc/include/asm/dma.h | 6 ------ arch/riscv/include/asm/pci.h | 2 -- arch/s390/include/asm/dma.h | 6 ------ arch/sh/include/asm/dma.h | 6 ------ arch/sparc/include/asm/dma.h | 8 -------- arch/um/include/asm/pci.h | 2 -- arch/x86/include/asm/dma.h | 8 -------- arch/xtensa/include/asm/dma.h | 7 ------- drivers/comedi/drivers/comedi_isadma.c | 2 +- drivers/pci/pci.c | 2 ++ drivers/pci/quirks.c | 4 +++- include/linux/isa-dma.h | 14 ++++++++++++++ sound/core/isadma.c | 2 +- 23 files changed, 21 insertions(+), 100 deletions(-) commit ae85b23c65dbb079c83d8a08ff7699215f104e42 Author: Stafford Horne Date: Sat Jul 23 06:49:41 2022 +0900 PCI: Remove pci_get_legacy_ide_irq() and asm-generic/pci.h pci_get_legacy_ide_irq() is only used on platforms that support PNP, so many architectures define it but never use it. Replace uses of it with ATA_PRIMARY_IRQ() and ATA_SECONDARY_IRQ(), which provide the same functionality. Since pci_get_legacy_ide_irq() is no longer used, remove all the architecture-specific definitions of it as well as asm-generic/pci.h, which only provides pci_get_legacy_ide_irq() [bhelgaas: commit log] Co-developed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20220722214944.831438-2-shorne@gmail.com Signed-off-by: Arnd Bergmann Signed-off-by: Stafford Horne Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Acked-by: Geert Uytterhoeven Acked-by: Pierre Morel Acked-by: Rafael J. Wysocki arch/alpha/include/asm/pci.h | 6 ------ arch/arm/include/asm/pci.h | 5 ----- arch/arm64/include/asm/pci.h | 6 ------ arch/csky/include/asm/pci.h | 6 ------ arch/ia64/include/asm/pci.h | 6 ------ arch/m68k/include/asm/pci.h | 2 -- arch/mips/include/asm/pci.h | 6 ------ arch/parisc/include/asm/pci.h | 5 ----- arch/powerpc/include/asm/pci.h | 1 - arch/riscv/include/asm/pci.h | 6 ------ arch/s390/include/asm/pci.h | 1 - arch/sh/include/asm/pci.h | 6 ------ arch/sparc/include/asm/pci.h | 9 --------- arch/um/include/asm/pci.h | 8 -------- arch/x86/include/asm/pci.h | 3 --- arch/xtensa/include/asm/pci.h | 3 --- drivers/pnp/resource.c | 5 +++-- include/asm-generic/pci.h | 17 ----------------- 18 files changed, 3 insertions(+), 98 deletions(-) commit a54e190737181c12d2a49a8f6456622e8b70f4f1 Author: Vidya Sagar Date: Thu Jul 21 19:50:52 2022 +0530 PCI: tegra194: Add Tegra234 PCIe support Add support for Synopsys DesignWare core IP based PCIe host controllers present in the Tegra234 SoC. Link: https://lore.kernel.org/r/20220721142052.25971-17-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pcie-tegra194.c | 284 +++++++++++++++++++++++------ 1 file changed, 225 insertions(+), 59 deletions(-) commit f899983f71e5a86d2544b9fd5ab20819278942ad Author: Vidya Sagar Date: Thu Jul 21 19:50:51 2022 +0530 PCI: tegra194: Extend Endpoint mode support Since only Controller-5 can be used in the Endpoint mode in P2972-0000 platform, support is available only for Controller-5. Extend that support by enabling the Endpoint mode capable controller during initialization which otherwise is not required if it is only Controller-5. Link: https://lore.kernel.org/r/20220721142052.25971-16-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pcie-tegra194.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit e05fd6ae77c3e2cc0dba283005d24b6d56d2b1fa Author: Vidya Sagar Date: Thu Jul 21 19:50:50 2022 +0530 PCI: tegra194: Fix link up retry sequence Add the missing DLF capability offset while clearing DL_FEATURE_EXCHANGE_EN bit during link up retry. Link: https://lore.kernel.org/r/20220721142052.25971-15-vidyas@nvidia.com Fixes: 56e15a238d92 ("PCI: tegra: Add Tegra194 PCIe support") Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pcie-tegra194.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb617cbd81513092ae48ff7dfcaf766312b57bcf Author: Vidya Sagar Date: Thu Jul 21 19:50:49 2022 +0530 PCI: tegra194: Clean up the exit path for Endpoint mode Clean up the exit path during .remove() and .shutdown() calls when in Endpoint mode. Link: https://lore.kernel.org/r/20220721142052.25971-14-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pcie-tegra194.c | 45 ++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 14 deletions(-) commit 4fb8e46c1bc4ee16d8b4ec53933b2ed46e31e158 Author: Vidya Sagar Date: Thu Jul 21 19:50:48 2022 +0530 PCI: tegra194: Enable support for 256 Byte payload Set 256 byte payload as the default in the Device Control Register to allow the PCIe subsystem to enable 256 byte Max Payload Size when a capable link partner is connected. Link: https://lore.kernel.org/r/20220721142052.25971-13-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pcie-tegra194.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 6c12e3e139ab7511c9e9d6bc2b363aa4e59fc8ce Author: Vidya Sagar Date: Thu Jul 21 19:50:47 2022 +0530 PCI: tegra194: Clear bandwidth management status In the event of a bandwidth management interrupt, clear the bandwidth management status in the configuration space also along with clearing corresponding status in the application logic register to avoid slew of interrupts. Link: https://lore.kernel.org/r/20220721142052.25971-12-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pcie-tegra194.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6646e99bcec627e866bc84365af37942c72b4b76 Author: Vidya Sagar Date: Thu Jul 21 19:50:46 2022 +0530 PCI: tegra194: Fix Root Port interrupt handling As part of Root Port interrupt handling, level-0 register is read first and based on the bits set in that, corresponding level-1 registers are read for further interrupt processing. Since both these values are currently read into the same 'val' variable, checking level-0 bits the second time around is happening on the 'val' variable value of level-1 register contents instead of freshly reading the level-0 value again. Fix by using different variables to store level-0 and level-1 registers contents. Link: https://lore.kernel.org/r/20220721142052.25971-11-vidyas@nvidia.com Fixes: 56e15a238d92 ("PCI: tegra: Add Tegra194 PCIe support") Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pcie-tegra194.c | 46 ++++++++++++++---------------- 1 file changed, 22 insertions(+), 24 deletions(-) commit 997b99e3b386bde1d519d39f5276b10c67a8f172 Author: Vidya Sagar Date: Thu Jul 21 19:50:45 2022 +0530 PCI: tegra194: Find RAS DES PCIe capability offset Find RAS DES PCIe capability offset instead of hardcoding the offset for each controller. Link: https://lore.kernel.org/r/20220721142052.25971-10-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pcie-designware.h | 19 ++++++++++ drivers/pci/controller/dwc/pcie-tegra194.c | 53 +++++++++------------------- 2 files changed, 35 insertions(+), 37 deletions(-) commit f1ab409d5787528fbf46dd80a132f2c4d6a2c6d8 Author: Vidya Sagar Date: Thu Jul 21 19:50:44 2022 +0530 Revert "PCI: tegra194: Rename tegra_pcie_dw to tegra194_pcie" This reverts commit b572569183993b68dec0e990b33641e6f77744ba. Revert b57256918399 ("PCI: tegra194: Rename tegra_pcie_dw to tegra194_pcie") to keep the names of data structures generic and not contain any one particular chip name. This is a preparatory change for the upcoming changes that add support for Tegra234. This has no functional impact. Link: https://lore.kernel.org/r/20220721142052.25971-9-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pcie-tegra194.c | 222 ++++++++++++++--------------- 1 file changed, 111 insertions(+), 111 deletions(-) commit bf32b8f952cced43001f783b42e95c75dfec9ba1 Author: Vidya Sagar Date: Thu Jul 21 19:50:43 2022 +0530 PCI: Disable MSI for Tegra234 Root Ports Tegra234 PCIe Root Ports don't generate MSI interrupts for PME and AER events. Since PCIe spec (r6.0 sec 6.1.4.3) doesn't support using a mix of INTx and MSI/MSI-X, MSI needs to be disabled to avoid Root Port service drivers registering their respective ISRs with MSI interrupt and to let only INTx be used for all events. Link: https://lore.kernel.org/r/20220721142052.25971-8-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit b949e4661df3bca2f3ecfe982fa438a768551e76 Author: Vidya Sagar Date: Thu Jul 21 19:50:39 2022 +0530 dt-bindings: PCI: tegra234: Add schema for tegra234 Endpoint mode Add support for PCIe controllers that operate in the Endpoint mode in tegra234 chipset. Link: https://lore.kernel.org/r/20220721142052.25971-4-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring .../bindings/pci/nvidia,tegra194-pcie-ep.yaml | 98 +++++++++++++++++++++- 1 file changed, 96 insertions(+), 2 deletions(-) commit 3e4ff9a6e0c305f2fb84635167f0f9d4c224b671 Author: Vidya Sagar Date: Thu Jul 21 19:50:38 2022 +0530 dt-bindings: PCI: tegra234: Add schema for tegra234 Root Port mode Add support for PCIe controllers that operate in the Root Port mode in tegra234 chipset. Link: https://lore.kernel.org/r/20220721142052.25971-3-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring .../bindings/pci/nvidia,tegra194-pcie.yaml | 103 ++++++++++++++++++++- 1 file changed, 101 insertions(+), 2 deletions(-) commit e4dffb674cfd489a37314b606f6f1a0a6dc3e610 Author: Vidya Sagar Date: Thu Jul 21 19:50:37 2022 +0530 dt-bindings: PCI: tegra194: Convert to json-schema Convert the Tegra194 PCIe bindings from the free-form text format to json-schema. Link: https://lore.kernel.org/r/20220721142052.25971-2-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Thierry Reding Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring .../bindings/pci/nvidia,tegra194-pcie-ep.yaml | 225 ++++++++++++++++++ .../bindings/pci/nvidia,tegra194-pcie.txt | 245 -------------------- .../bindings/pci/nvidia,tegra194-pcie.yaml | 251 +++++++++++++++++++++ .../devicetree/bindings/pci/snps,dw-pcie.yaml | 4 +- 4 files changed, 478 insertions(+), 247 deletions(-) commit fba4866241e07f8f545b3dcc72fbbadde485530d Author: Rob Herring Date: Tue Jul 19 15:50:31 2022 -0600 dt-bindings: PCI: fsl,imx6q-pcie: Add missing type for 'reset-gpio-active-high' 'reset-gpio-active-high' is missing a type definition and is not a common property. The type is boolean. Signed-off-by: Rob Herring Acked-by: Richard Zhu Link: https://lore.kernel.org/r/20220719215031.1875860-1-robh@kernel.org Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml | 1 + 1 file changed, 1 insertion(+) commit 3c47fb2f4c4df33881fa540e35e21415a6ecfbb5 Merge: 1b5995e370e4 2829a267fca2 Author: Jakub Kicinski Date: Fri Jul 22 14:53:33 2022 -0700 Merge branch 'io_uring-zerocopy-send' of git://git.kernel.org/pub/scm/linux/kernel/git/kuba/linux Pull in Pavel's patch from a shared branch. Signed-off-by: Jakub Kicinski commit 2829a267fca297983b9302fa2cb833757328c857 Author: Pavel Begunkov Date: Thu Jul 21 15:25:46 2022 +0100 net: fix uninitialised msghdr->sg_from_iter Because of how struct msghdr is usually initialised some fields and sg_from_iter in particular might be left out not initialised, so we can't safely use it in __zerocopy_sg_from_iter(). For now use the callback only when there is ->msg_ubuf set relying on the fact that they're used together and we properly zero ->msg_ubuf. Fixes: ebe73a284f4de8 ("net: Allow custom iter handler in msghdr") Signed-off-by: Pavel Begunkov Message-Id: Signed-off-by: Jakub Kicinski net/core/datagram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b5995e370e4024e7bb7408247363e8e67f0393d Author: Jiri Pirko Date: Thu Jul 21 16:24:24 2022 +0200 mlxsw: core: Fix use-after-free calling devl_unlock() in mlxsw_core_bus_device_unregister() Do devl_unlock() before freeing the devlink in mlxsw_core_bus_device_unregister() function. Reported-by: Ido Schimmel Fixes: 72a4c8c94efa ("mlxsw: convert driver to use unlocked devlink API during init/fini") Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/20220721142424.3975704-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 960ac362648780469b2f5584bb8cff540444d119 Author: Niklas Schnelle Date: Tue Jun 28 16:31:00 2022 +0200 s390/pci: allow zPCI zbus without a function zero Currently the zPCI code blocks PCI bus creation and probing of a zPCI zbus unless there is a PCI function with devfn 0. This is always the case for the PCI functions with hidden RID, but may keep PCI functions from a multi-function PCI device with RID information invisible until the function 0 becomes visible. Worse, as a PCI bus is necessary to even present a PCI hotplug slot, even that remains invisible. With the probing of these so-called isolated PCI functions enabled for s390 in common code, this restriction is no longer necessary. On network cards with multiple ports and a PF per port this also allows using each port on its own while still providing the physical PCI topology information in the devfn needed to associate VFs with their parent PF. Link: https://lore.kernel.org/r/20220628143100.3228092-6-schnelle@linux.ibm.com Signed-off-by: Niklas Schnelle Signed-off-by: Bjorn Helgaas Reviewed-by: Pierre Morel arch/s390/pci/pci_bus.c | 82 ++++++++++++------------------------------------- 1 file changed, 20 insertions(+), 62 deletions(-) commit 189c6c33ff421def040b904fb14ef76c5bf5af4c Author: Niklas Schnelle Date: Tue Jun 28 16:30:59 2022 +0200 PCI: Extend isolated function probing to s390 Like the jailhouse hypervisor, s390's PCI architecture allows passing isolated PCI functions to a guest OS instance. As of now this is was not utilized even with multi-function support as the s390 PCI code makes sure that only virtual PCI busses including a function with devfn 0 are presented to the PCI subsystem. A subsequent change will remove this restriction. Allow probing such functions by replacing the existing check for jailhouse_paravirt() with a new hypervisor_isolated_pci_functions() helper. Link: https://lore.kernel.org/r/20220628143100.3228092-5-schnelle@linux.ibm.com Signed-off-by: Niklas Schnelle Signed-off-by: Bjorn Helgaas Reviewed-by: Pierre Morel Cc: Jan Kiszka drivers/pci/probe.c | 2 +- include/linux/hypervisor.h | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit db360b1ea7faef290471bc1b2a7463b96fd20a07 Author: Niklas Schnelle Date: Tue Jun 28 16:30:58 2022 +0200 PCI: Move jailhouse's isolated function handling to pci_scan_slot() The special case of the jailhouse hypervisor passing through individual PCI functions handles scanning for PCI functions even if function 0 does not exist. Previously this was done with an extra loop duplicating the one in pci_scan_slot(). By incorporating the check for jailhouse_paravirt() into pci_scan_slot() we can instead do this as part of the normal slot scan. Note that with the assignment of dev->multifunction gated by fn > 0 we set dev->multifunction unconditionally for all functions if function 0 is missing just as in the existing jailhouse loop. The only functional change is that we now call pcie_aspm_init_link_state() for these functions, but this already happened if function 0 was passed through and should not be a problem. Link: https://lore.kernel.org/linux-pci/20220408224514.GA353445@bhelgaas/ Suggested-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20220628143100.3228092-4-schnelle@linux.ibm.com Signed-off-by: Niklas Schnelle Signed-off-by: Bjorn Helgaas Reviewed-by: Pierre Morel Cc: Jan Kiszka drivers/pci/probe.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) commit fbed59ed8781d7eecd7f45cde0188cf24eeb5c38 Author: Niklas Schnelle Date: Tue Jun 28 16:30:57 2022 +0200 PCI: Split out next_ari_fn() from next_fn() In commit b1bd58e448f2 ("PCI: Consolidate "next-function" functions") the next_fn() function subsumed the traditional and ARI-based next function determination. This got rid of some needlessly complex function pointer handling but also reduced the separation between these very different methods of finding the next function. With the next_fn() cleaned up a bit we can re-introduce this separation by moving out the ARI handling while sticking with direct function calls. Link: https://lore.kernel.org/r/20220628143100.3228092-3-schnelle@linux.ibm.com Signed-off-by: Niklas Schnelle Signed-off-by: Bjorn Helgaas Reviewed-by: Pierre Morel drivers/pci/probe.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit c3df83e01a96ca569d261bcdffa2fb858b1012fa Author: Niklas Schnelle Date: Tue Jun 28 16:30:56 2022 +0200 PCI: Clean up pci_scan_slot() While determining the next PCI function is factored out of pci_scan_slot() into next_fn(), the former still handles the first function as a special case, which duplicates the code from the scan loop. Furthermore the non-ARI branch of next_fn() is generally hard to understand and especially the check for multifunction devices is hidden in the handling of NULL devices for non-contiguous multifunction. It also signals that no further functions need to be scanned by returning 0 via wraparound and this is a valid function number. Improve upon this by transforming the conditions in next_fn() to be easier to understand. By changing next_fn() to return -ENODEV instead of 0 when there is no next function we can then handle the initial function inside the loop and deduplicate the shared handling. This also makes it more explicit that only function 0 must exist. No functional change is intended. Link: https://lore.kernel.org/r/20220628143100.3228092-2-schnelle@linux.ibm.com Signed-off-by: Niklas Schnelle Signed-off-by: Bjorn Helgaas Cc: Jan Kiszka drivers/pci/probe.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit ba6cfef057e1c594c456627aad81c2343fdb5d13 Author: Heinrich Schuchardt Date: Wed Jun 8 02:02:51 2022 +0200 riscv: enable Docker requirements in defconfig The defconfig kernel should be able to run Docker. Enable the missing settings according to [1]. make savedefconfig eliminates CONFIG_STACKTRACE which is enabled by default. Many of the settings are also needed to run a defconfig kernel on default distro installations or to run snaps. [1] https://github.com/moby/moby/blob/master/contrib/check-config.sh Signed-off-by: Heinrich Schuchardt Reviewed-by: Anup Patel Acked-by: Guo Ren Link: https://lore.kernel.org/r/20220608000251.55271-1-heinrich.schuchardt@canonical.com [Palmer: Drop BLK_CGROUP, as it's causing panics with KASAN] Signed-off-by: Palmer Dabbelt arch/riscv/configs/defconfig | 64 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) commit c2ea08ca5e4a85d0adde7a87c239a2659a2e6bbf Author: Bob Pearson Date: Thu Jun 30 14:04:26 2022 -0500 RDMA/rxe: Replace __rxe_do_task by rxe_run_task In rxe_req.c replace calls to __rxe_do_task() by calls to rxe_run_task(.., 0). Using __rxe_do_task is an error because the completer tasklet is not designed to be re-entrant and __rxe_do_task() should only be called when it is clear that no one else could be calling the completer tasklet as is the case in rxe_qp.c where this call is used in safe environments. Link: https://lore.kernel.org/r/20220630190425.2251-10-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Reviewed-by: Li Zhijian Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_req.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eff6d998ca297cb0b2e53b032a56cf8e04dd8b17 Author: Bob Pearson Date: Thu Jun 30 14:04:25 2022 -0500 RDMA/rxe: Limit the number of calls to each tasklet Limit the maximum number of calls to each tasklet from rxe_do_task() before yielding the cpu. When the limit is reached reschedule the tasklet and exit the calling loop. This patch prevents one tasklet from consuming 100% of a cpu core and causing a deadlock or soft lockup. Link: https://lore.kernel.org/r/20220630190425.2251-9-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_param.h | 6 ++++++ drivers/infiniband/sw/rxe/rxe_task.c | 16 ++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) commit 8bb143c53436754b5e939ed648430c71198bc71b Author: Bob Pearson Date: Thu Jun 30 14:04:24 2022 -0500 RDMA/rxe: Make the tasklet exits the same Make changes to the three tasklets so that the exit logic from each is the same. This makes the code easier to understand. Link: https://lore.kernel.org/r/20220630190425.2251-8-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_comp.c | 35 +++++++++++------------ drivers/infiniband/sw/rxe/rxe_req.c | 54 +++++++++++++++++++++--------------- drivers/infiniband/sw/rxe/rxe_resp.c | 17 ++++++++---- 3 files changed, 60 insertions(+), 46 deletions(-) commit 445fd4f4fb76d513de6b05b08b3a4d0bb980fc80 Author: Bob Pearson Date: Thu Jun 30 14:04:22 2022 -0500 RDMA/rxe: Fix rnr retry behavior Currently the completer tasklet when retransmit timer or the rnr timer fires the same flag (qp->req.need_retry) is set so that if either timer fires it will attempt to perform a retry flow on the send queue. This has the effect of responding to an RNR NAK at the first retransmit timer event which might not allow the requested rnr timeout. This patch adds a new flag (qp->req.wait_for_rnr_timer) which, if set, prevents a retry flow until the rnr nak timer fires. This patch fixes rnr retry errors which can be observed by running the pyverbs test_rdmacm_async_traffic_external_qp multiple times. With this patch applied they do not occur. Link: https://lore.kernel.org/linux-rdma/a8287823-1408-4273-bc22-99a0678db640@gmail.com/ Link: https://lore.kernel.org/linux-rdma/2bafda9e-2bb6-186d-12a1-179e8f6a2678@talpey.com/ Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20220630190425.2251-6-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_comp.c | 8 +++++++- drivers/infiniband/sw/rxe/rxe_qp.c | 1 + drivers/infiniband/sw/rxe/rxe_req.c | 15 +++++++++++++-- drivers/infiniband/sw/rxe/rxe_verbs.h | 1 + 4 files changed, 22 insertions(+), 3 deletions(-) commit 930119a1720075d15e4c1e478b2b9412cd9eb6ad Author: Bob Pearson Date: Thu Jun 30 14:04:18 2022 -0500 RDMA/rxe: Add rxe_is_fenced() subroutine The code thc that decides whether to defer execution of a wqe in rxe_requester.c is isolated into a subroutine rxe_is_fenced() and removed from the call to req_next_wqe(). The condition whether a wqe should be fenced is changed to comply with the IBA. Currently an operation is fenced if the fence bit is set in the wqe flags and the last wqe has not completed. For normal operations the IBA actually only requires that the last read or atomic operation is complete. Link: https://lore.kernel.org/r/20220630190425.2251-2-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Reviewed-by: Li Zhijian Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_req.c | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) commit 174e7b137042f19b5ce88beb4fc0ff4ec6b0c72a Author: Md Haris Iqbal Date: Thu Jul 7 09:30:06 2022 +0200 RDMA/rxe: For invalidate compare according to set keys in mr The 'rkey' input can be an lkey or rkey, and in rxe the lkey or rkey have the same value, including the variant bits. So, if mr->rkey is set, compare the invalidate key with it, otherwise compare with the mr->lkey. Since we already did a lookup on the non-varient bits to get this far, the check's only purpose is to confirm that the wqe has the correct variant bits. Fixes: 001345339f4c ("RDMA/rxe: Separate HW and SW l/rkeys") Link: https://lore.kernel.org/r/20220707073006.328737-1-haris.phnx@gmail.com Signed-off-by: Md Haris Iqbal Reviewed-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_loc.h | 2 +- drivers/infiniband/sw/rxe/rxe_mr.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit be0aa8d4b0fcb4532bf7973141e911998ab39508 Author: syed sabakareem Date: Fri Jul 22 19:15:32 2022 +0530 ASoC: amd: yc: Update DMI table entries Removed intel DMI product id's 21AW/21AX/21D8/21D9/21BN/21BQ in DMI table and updated DMI entry for AMD platform X13 Gen 3 platform 21CM/21CN. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216267 Signed-off-by: syed sabakareem Reviewed-by: Mario Limonciello Reported-by: David Korth Fixes: fa991481b8b2 ("ASoC: amd: add YC machine driver using dmic") Link: https://lore.kernel.org/r/20220722134603.316668-1-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown sound/soc/amd/yc/acp6x-mach.c | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) commit 6f78675445ca243229303cd72898c4a2b95a2bc0 Author: Ryan Wanner Date: Fri Jul 22 08:29:45 2022 -0700 ASoC: dt-bindings: atmel-i2s: Convert to json-schema Convert atmel i2s devicetree binding to json-schema. Change file name to match json-schema naming. Signed-off-by: Ryan Wanner Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220722152945.2950807-1-Ryan.Wanner@microchip.com Signed-off-by: Mark Brown .../bindings/sound/atmel,sama5d2-i2s.yaml | 85 ++++++++++++++++++++++ .../devicetree/bindings/sound/atmel-i2s.txt | 46 ------------ 2 files changed, 85 insertions(+), 46 deletions(-) commit 8ebc4dd8250fd1cb5da2869c0fe6ae3686fe41e9 Author: Liang He Date: Fri Jul 22 22:18:01 2022 +0800 ASoC: audio-graph-card2: Add of_node_put() in fail path In asoc_simple_parse_dai(), we should call of_node_put() for the reference returned by of_graph_get_port_parent() in fail path. Fixes: 6e5f68fe3f2d ("ASoC: add Audio Graph Card2 driver") Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220722141801.1304854-1-windhl@126.com Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dfe6d5c3ec23c5b999261d989059aa35403d791d Author: Luiz Augusto von Dentz Date: Fri Feb 4 13:04:38 2022 -0800 Bluetooth: hci_core: Introduce hci_recv_event_data This introduces hci_recv_event_data to make it simpler to access the contents of last received event rather than having to pass its contents to the likes of *_ind/*_cfm callbacks. Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/hci_core.h | 2 ++ net/bluetooth/hci_core.c | 32 ++++++++++++++++++++++++++++++++ net/bluetooth/hci_event.c | 3 +++ 3 files changed, 37 insertions(+) commit ea2babac63d40e59926dc5de4550dac94cc3c6d2 Author: Song Liu Date: Wed Jul 13 13:49:50 2022 -0700 bpf: Simplify bpf_prog_pack_[size|mask] Simplify the logic that selects bpf_prog_pack_size, and always use (PMD_SIZE * num_possible_nodes()). This is a good tradeoff, as most of the performance benefit observed is from less direct map fragmentation [0]. Also, module_alloc(4MB) may not allocate 4MB aligned memory. Therefore, we cannot use (ptr & bpf_prog_pack_mask) to find the correct address of bpf_prog_pack. Fix this by checking the header address falls in the range of pack->ptr and (pack->ptr + bpf_prog_pack_size). [0] https://lore.kernel.org/bpf/20220707223546.4124919-1-song@kernel.org/ Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann Reviewed-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20220713204950.3015201-1-song@kernel.org kernel/bpf/core.c | 71 +++++++++++++------------------------------------------ 1 file changed, 17 insertions(+), 54 deletions(-) commit 00963a2e75a872e5fce4d0115ac2786ec86b57a6 Author: Song Liu Date: Tue Jul 19 17:21:26 2022 -0700 bpf: Support bpf_trampoline on functions with IPMODIFY (e.g. livepatch) When tracing a function with IPMODIFY ftrace_ops (livepatch), the bpf trampoline must follow the instruction pointer saved on stack. This needs extra handling for bpf trampolines with BPF_TRAMP_F_CALL_ORIG flag. Implement bpf_tramp_ftrace_ops_func and use it for the ftrace_ops used by BPF trampoline. This enables tracing functions with livepatch. This also requires moving bpf trampoline to *_ftrace_direct_mult APIs. Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/all/20220602193706.2607681-2-song@kernel.org/ Link: https://lore.kernel.org/bpf/20220720002126.803253-5-song@kernel.org include/linux/bpf.h | 8 +++ kernel/bpf/trampoline.c | 158 ++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 149 insertions(+), 17 deletions(-) commit 316cba62dfb7878b7353177e6a7da9cc0c979cde Author: Jiri Olsa Date: Tue Jul 19 17:21:25 2022 -0700 bpf, x64: Allow to use caller address from stack Currently we call the original function by using the absolute address given at the JIT generation. That's not usable when having trampoline attached to multiple functions, or the target address changes dynamically (in case of live patch). In such cases we need to take the return address from the stack. Adding support to retrieve the original function address from the stack by adding new BPF_TRAMP_F_ORIG_STACK flag for arch_prepare_bpf_trampoline function. Basically we take the return address of the 'fentry' call: function + 0: call fentry # stores 'function + 5' address on stack function + 5: ... The 'function + 5' address will be used as the address for the original function to call. Signed-off-by: Jiri Olsa Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220720002126.803253-4-song@kernel.org arch/x86/net/bpf_jit_comp.c | 13 +++++++++---- include/linux/bpf.h | 5 +++++ 2 files changed, 14 insertions(+), 4 deletions(-) commit 53cd885bc5c3ea283cc9c00ca6446c778f00bfba Author: Song Liu Date: Tue Jul 19 17:21:24 2022 -0700 ftrace: Allow IPMODIFY and DIRECT ops on the same function IPMODIFY (livepatch) and DIRECT (bpf trampoline) ops are both important users of ftrace. It is necessary to allow them work on the same function at the same time. First, DIRECT ops no longer specify IPMODIFY flag. Instead, DIRECT flag is handled together with IPMODIFY flag in __ftrace_hash_update_ipmodify(). Then, a callback function, ops_func, is added to ftrace_ops. This is used by ftrace core code to understand whether the DIRECT ops can share with an IPMODIFY ops. To share with IPMODIFY ops, the DIRECT ops need to implement the callback function and adjust the direct trampoline accordingly. If DIRECT ops is attached before the IPMODIFY ops, ftrace core code calls ENABLE_SHARE_IPMODIFY_PEER on the DIRECT ops before registering the IPMODIFY ops. If IPMODIFY ops is attached before the DIRECT ops, ftrace core code calls ENABLE_SHARE_IPMODIFY_SELF in __ftrace_hash_update_ipmodify. Owner of the DIRECT ops may return 0 if the DIRECT trampoline can share with IPMODIFY, so error code otherwise. The error code is propagated to register_ftrace_direct_multi so that onwer of the DIRECT trampoline can handle it properly. For more details, please refer to comment before enum ftrace_ops_cmd. Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/all/20220602193706.2607681-2-song@kernel.org/ Link: https://lore.kernel.org/all/20220718055449.3960512-1-song@kernel.org/ Link: https://lore.kernel.org/bpf/20220720002126.803253-3-song@kernel.org include/linux/ftrace.h | 38 ++++++++ kernel/trace/ftrace.c | 242 +++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 254 insertions(+), 26 deletions(-) commit f96f644ab97abeed3f7007c953836a574ce928cc Author: Song Liu Date: Tue Jul 19 17:21:23 2022 -0700 ftrace: Add modify_ftrace_direct_multi_nolock This is similar to modify_ftrace_direct_multi, but does not acquire direct_mutex. This is useful when direct_mutex is already locked by the user. Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/bpf/20220720002126.803253-2-song@kernel.org include/linux/ftrace.h | 5 +++ kernel/trace/ftrace.c | 86 ++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 67 insertions(+), 24 deletions(-) commit 0ef08313cefdd60d7be1e21c405f8f8e544d8ee9 Author: Brian Gix Date: Thu Jul 21 16:22:25 2022 -0700 Bluetooth: Convert delayed discov_off to hci_sync The timed ending of Discoverability was handled in hci_requst.c, with calls using the deprecated hci_req_add() mechanism. Converted to live inside mgmt.c using the same delayed work queue, but with hci_sync version of hci_update_discoverable(). Signed-off-by: Brian Gix Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_request.c | 89 --------------------------------------------- net/bluetooth/mgmt.c | 33 +++++++++++++++++ 2 files changed, 33 insertions(+), 89 deletions(-) commit bb87672562f871edd7a220222dd2480a87294580 Author: Brian Gix Date: Thu Jul 21 16:22:24 2022 -0700 Bluetooth: Remove update_scan hci_request dependancy This removes the remaining calls to HCI_OP_WRITE_SCAN_ENABLE from hci_request call chains, and converts them to hci_sync calls. Signed-off-by: Brian Gix Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/hci_core.h | 1 - include/net/bluetooth/hci_sync.h | 1 + net/bluetooth/hci_event.c | 4 ++-- net/bluetooth/hci_request.c | 17 ----------------- net/bluetooth/hci_request.h | 5 ----- net/bluetooth/hci_sync.c | 10 ++++++++++ net/bluetooth/mgmt.c | 8 ++++---- 7 files changed, 17 insertions(+), 29 deletions(-) commit ec2904c259c56fbe50aacd838da9553a6eea6683 Author: Brian Gix Date: Thu Jul 21 16:22:23 2022 -0700 Bluetooth: Remove dead code from hci_request.c The discov_update work queue is no longer used as a result of the hci_sync rework. The __hci_req_hci_power_on() function is no longer referenced in the code as a result of the hci_sync rework. Signed-off-by: Brian Gix Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/hci_core.h | 1 - net/bluetooth/hci_request.c | 287 --------------------------------------- net/bluetooth/hci_request.h | 2 - 3 files changed, 290 deletions(-) commit 38f230f1f9102965684c2bd028848e93ff7d19ab Author: shaomin Deng Date: Wed Jul 20 10:10:33 2022 -0400 Bluetooth: btrtl: Fix typo in comment Delete the repeated word "that" in comments. Signed-off-by: shaomin Deng Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btrtl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6943f3e3ffe537d2c4683c5c13a04e80798b9496 Author: Mario Limonciello Date: Fri Jul 22 12:47:54 2022 -0500 PCI/ACPI: Update link to PCI firmware specification The previous link to the PCI firmware specification in the comments for drivers/pci/pci-acpi.c no longer works. Update the comment to a current link to this specification. Link: https://lore.kernel.org/r/20220722174754.27921-1-mario.limonciello@amd.com Signed-off-by: Mario Limonciello Signed-off-by: Bjorn Helgaas drivers/pci/pci-acpi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b3ca7aff3cbb074a466c90e1463b9b59e97ea94e Author: Rafael J. Wysocki Date: Thu Jul 14 21:11:26 2022 +0200 intel: thermal: PCH: Drop ACPI_FADT_LOW_POWER_S0 check If ACPI_FADT_LOW_POWER_S0 is not set, this doesn't mean that low-power S0 idle is not usable. It merely means that using S3 on the given system is more beneficial from the energy saving perspective than using low-power S0 idle, as long as S3 is supported. Suspend-to-idle is still a valid suspend mode if ACPI_FADT_LOW_POWER_S0 is not set and the pm_suspend_via_firmware() check in pch_wpt_suspend() is sufficient to distinguish suspend-to-idle from S3, so drop the confusing ACPI_FADT_LOW_POWER_S0 check. Signed-off-by: Rafael J. Wysocki Acked-by: Zhang Rui drivers/thermal/intel/intel_pch_thermal.c | 8 -------- 1 file changed, 8 deletions(-) commit 4e6217e3af8adee269403effe210c1df51ac69dd Author: Bharat Kumar Gogada Date: Sat Jun 18 10:50:22 2022 +0530 MAINTAINERS: Add Xilinx Versal CPM Root Port maintainers Add Bharat Kumar Gogada and Michal Simek as maintainers for driver and documentation of Xilinx Versal CPM Root Port device. Link: https://lore.kernel.org/r/20220618052022.10388-1-bharat.kumar.gogada@xilinx.com Signed-off-by: Bharat Kumar Gogada Signed-off-by: Bjorn Helgaas Acked-by: Michal Simek MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 51f1ffc00d95e3e6bb53af456d2716d2a07f2d99 Author: Bharat Kumar Gogada Date: Tue Jul 5 16:26:46 2022 +0530 PCI: xilinx-cpm: Add support for Versal CPM5 Root Port The Xilinx Versal Premium series has CPM5 block which supports Root Port functioning at Gen5 speed. Xilinx Versal CPM5 has a few changes from the existing CPM block: - CPM5 has dedicated register space for control and status registers. - CPM5 legacy interrupt handling needs additional register bit to enable and handle legacy interrupts. Add support for the new CPM5 features. [bhelgaas: compare variant->version with CPM5 explicitly] Link: https://lore.kernel.org/r/20220705105646.16980-3-bharat.kumar.gogada@xilinx.com Signed-off-by: Bharat Kumar Gogada Signed-off-by: Bjorn Helgaas drivers/pci/controller/pcie-xilinx-cpm.c | 60 ++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) commit b54f2401a17b829a402904d759b288e9bdc81df8 Author: Krzysztof Kozlowski Date: Fri Jul 22 21:09:10 2022 +0200 spi: dt-bindings: spi-controller: correct example indentation Example DTS mixed two with four-space indentation. Preferred is four spaces, for readability. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220722190910.76865-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-controller.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 49f40703ca91c8428dd35e7331ae6c098e61b100 Author: Bharat Kumar Gogada Date: Tue Jul 5 16:26:45 2022 +0530 dt-bindings: PCI: xilinx-cpm: Add Versal CPM5 Root Port Xilinx Versal Premium series has CPM5 block which supports Root Port functionality at Gen5 speed. Add support for YAML schemas documentation for Versal CPM5 Root Port driver. Link: https://lore.kernel.org/r/20220705105646.16980-2-bharat.kumar.gogada@xilinx.com Signed-off-by: Bharat Kumar Gogada Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring .../devicetree/bindings/pci/xilinx-versal-cpm.yaml | 38 +++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) commit 7b445e220db9a2c58be5d09bbbd322abf1b1452a Author: Luiz Augusto von Dentz Date: Thu Jul 21 15:56:28 2022 -0700 Bluetooth: MGMT: Fix holding hci_conn reference while command is queued This removes the use of hci_conn_hold from Get Conn Info and Get Clock Info since the callback can just do a lookup by address using the cmd data and only then set cmd->user_data to pass to the complete callback. Signed-off-by: Luiz Augusto von Dentz net/bluetooth/mgmt.c | 51 ++++++++++++--------------------------------------- 1 file changed, 12 insertions(+), 39 deletions(-) commit 478af190cb6c501efaa8de2b9c9418ece2e4d0bd Author: Christoph Hellwig Date: Fri Jul 22 10:59:17 2022 -0700 iomap: remove iomap_writepage Unused now. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Chaitanya Kulkarni Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/iomap/buffered-io.c | 15 --------------- include/linux/iomap.h | 3 --- 2 files changed, 18 deletions(-) commit 7b86e8a5ba86744611cd3199a3122bef63b97ae5 Author: Christoph Hellwig Date: Fri Jul 22 10:59:16 2022 -0700 zonefs: remove ->writepage ->writepage is only used for single page writeback from memory reclaim, and not called at all for cgroup writeback. Follow the lead of XFS and remove ->writepage and rely entirely on ->writepages. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Acked-by: Damien Le Moal Reviewed-by: Chaitanya Kulkarni Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/zonefs/super.c | 8 -------- 1 file changed, 8 deletions(-) commit d3d71901b1eaa7f3e1fa7489507d5fd2b8eb5ede Author: Christoph Hellwig Date: Fri Jul 22 10:59:16 2022 -0700 gfs2: remove ->writepage ->writepage is only used for single page writeback from memory reclaim, and not called at all for cgroup writeback. Follow the lead of XFS and remove ->writepage and rely entirely on ->writepages. Signed-off-by: Christoph Hellwig Tested-by: Andreas Gruenbacher Reviewed-by: Andreas Gruenbacher Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/gfs2/aops.c | 26 -------------------------- 1 file changed, 26 deletions(-) commit b2b0a5e978552e348f85ad9c7568b630a5ede659 Author: Christoph Hellwig Date: Fri Jul 22 10:59:15 2022 -0700 gfs2: stop using generic_writepages in gfs2_ail1_start_one Use filemap_fdatawrite_wbc instead of generic_writepages in gfs2_ail1_start_one so that the functin can also cope with address_space operations that only implement ->writepages and to properly account for cgroup writeback. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Gruenbacher Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/gfs2/log.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4869b6e84a23076eca813d5739d6717976aeae66 Author: Slark Xiao Date: Fri Jul 22 10:58:17 2022 -0700 xfs: Fix typo 'the the' in comment Replace 'the the' with 'the' in the comment. Signed-off-by: Slark Xiao Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29d286d0ce10c43ec9e2fa2902ed4eff29d15cd2 Author: Xin Gao Date: Thu Jul 21 19:47:13 2022 -0700 xfs: Fix comment typo The double `the' is duplicated in line 552, remove one. Signed-off-by: Xin Gao Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_dquot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40e589ba133cd8194ce4857ca5f1dac73628f466 Author: Avinash Dayanand Date: Tue Jun 21 14:39:33 2022 -0400 iavf: Check for duplicate TC flower filter before parsing Record of all the TC flower filters are kept for local book keeping, so take advantage of that and check for duplicate filter even before sending a request to the PF driver. Signed-off-by: Avinash Dayanand Signed-off-by: Jun Zhang Tested-by: Bharathi Sreenivas Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf_main.c | 55 +++++++++++++++++------------ 1 file changed, 33 insertions(+), 22 deletions(-) commit f664f9c6b4a1bb9a10af812df0fbbf6aac28fcc6 Author: Jie2x Zhou Date: Tue Jul 19 16:24:30 2022 +0800 bpf/selftests: Fix couldn't retrieve pinned program in xdp veth test Before change: selftests: bpf: test_xdp_veth.sh Couldn't retrieve pinned program '/sys/fs/bpf/test_xdp_veth/progs/redirect_map_0': No such file or directory selftests: xdp_veth [SKIP] ok 20 selftests: bpf: test_xdp_veth.sh # SKIP After change: PING 10.1.1.33 (10.1.1.33) 56(84) bytes of data. 64 bytes from 10.1.1.33: icmp_seq=1 ttl=64 time=0.320 ms --- 10.1.1.33 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.320/0.320/0.320/0.000 ms selftests: xdp_veth [PASS] For the test case, the following can be found: ls /sys/fs/bpf/test_xdp_veth/progs/redirect_map_0 ls: cannot access '/sys/fs/bpf/test_xdp_veth/progs/redirect_map_0': No such file or directory ls /sys/fs/bpf/test_xdp_veth/progs/ xdp_redirect_map_0 xdp_redirect_map_1 xdp_redirect_map_2 Reported-by: kernel test robot Signed-off-by: Jie2x Zhou Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220719082430.9916-1-jie2x.zhou@intel.com tools/testing/selftests/bpf/test_xdp_veth.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2313e69c84c024a85d017a60ae925085de47530a Author: Przemyslaw Patynowski Date: Wed Jun 8 13:52:48 2022 +0200 i40e: Refactor tc mqprio checks Refactor bitwise checks for whether TC MQPRIO is enabled into one single method for improved readability. Signed-off-by: Przemyslaw Patynowski Signed-off-by: Jan Sokolowski Tested-by: Bharathi Sreenivas Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e.h | 14 ++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 20 ++++++++++---------- 3 files changed, 25 insertions(+), 11 deletions(-) commit ac720e3e0e072092667b6d62a25611c2427fdb13 Author: Florian Fainelli Date: Mon Jul 18 21:06:10 2022 -0700 i2c: brcmstb: Use dev_name() for adapter name This make it easier to disambiguate the different i2c controllers present in a system, and then correlating with /proc/interrupts allows to know which instance is interrupt driven and which one is not. Signed-off-by: Florian Fainelli Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-brcmstb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e0ca796a151bd4de76efd71aade2b4805a95c93d Author: Phil Edworthy Date: Fri Jul 8 11:03:50 2022 +0100 i2c: Add Renesas RZ/V2M controller Yet another i2c controller from Renesas that is found on the RZ/V2M (r9a09g011) SoC. It can support only 100kHz and 400KHz operation. Signed-off-by: Phil Edworthy Reviewed-by: Biju Das Reviewed-by: Andy Shevchenko Reviewed-by: Philipp Zabel [wsa: removed superfluous class type and renamed a function] Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-rzv2m.c | 532 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 543 insertions(+) commit ba7a4d15e2c40f8fa37b38e4379e70019227dba0 Author: Phil Edworthy Date: Fri Jul 8 11:03:49 2022 +0100 dt-bindings: i2c: Document RZ/V2M I2C controller Document Renesas RZ/V2M (r9a09g011) I2C controller bindings. Signed-off-by: Phil Edworthy Reviewed-by: Biju Das Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang .../devicetree/bindings/i2c/renesas,rzv2m.yaml | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit e423414375866a399ebbe55ed044acb39846e8bf Author: Kumar Kartikeya Dwivedi Date: Fri Jul 22 13:36:05 2022 +0200 bpf: Fix build error in case of !CONFIG_DEBUG_INFO_BTF BTF_ID_FLAGS macro needs to be able to take 0 or 1 args, so make it a variable argument. BTF_SET8_END is incorrect, it should just be empty. Reported-by: kernel test robot Fixes: ab21d6063c01 ("bpf: Introduce 8-byte BTF set") Signed-off-by: Kumar Kartikeya Dwivedi Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20220722113605.6513-1-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/btf_ids.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 426752b25377487807455bb2f55c09b01bb6aaf0 Author: David Gow Date: Fri Jul 15 14:40:52 2022 +0800 kcsan: test: Add a .kunitconfig to run KCSAN tests Add a .kunitconfig file, which provides a default, working config for running the KCSAN tests. Note that it needs to run on an SMP machine, so to run under kunit_tool, the --qemu_args option should be used (on a supported architecture, like x86_64). For example: ./tools/testing/kunit/kunit.py run --arch=x86_64 --qemu_args='-smp 8' --kunitconfig=kernel/kcsan Signed-off-by: David Gow Reviewed-by: Marco Elver Acked-by: Brendan Higgins Tested-by: Daniel Latypov Signed-off-by: Shuah Khan kernel/kcsan/.kunitconfig | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 6d8c5afc9ab14595707ff25d971dde45728eba3e Author: Ming Lei Date: Fri Jul 22 18:38:17 2022 +0800 ublk_drv: make sure that correct flags(features) returned to userspace Userspace may support more features or new added flags, but the driver side can be old, so make sure correct flags(features) returned to userpsace, then userspace can work as expected. Also mark the 2nd flags as reversed, just use the 1st one. When we run out of flags, the reserved one can be handled at that time. Reviewed-by: Christoph Hellwig Reviewed-by: ZiyangZhang Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20220722103817.631258-3-ming.lei@redhat.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 17 ++++++++++++++--- include/uapi/linux/ublk_cmd.h | 7 ++++--- 2 files changed, 18 insertions(+), 6 deletions(-) commit fa9482e0b23d9abe7034becff59daeaba09146ff Author: Christoph Hellwig Date: Fri Jul 22 18:38:16 2022 +0800 ublk_drv: fix error handling of ublk_add_dev __ublk_destroy_dev() is called for handling error in ublk_add_dev(), but either tagset isn't allocated or mutex isn't initialized. So fix the issue by letting replacing ublk_add_dev with a ublk_add_tag_set function that is much more limited in scope and instead unwind every single step directly in ublk_ctrl_add_dev. To allow for this refactor the device freeing so that there is a helper for freeing the device number instead of coupling that with freeing the mutex and the memory. Note that this now copies the dev_info to userspace before adding the character device. This not only simplifies the erro handling in ublk_ctrl_add_dev, but also means that the character device can only be seen by userspace if the device addition succeeded. Based on a patch from Ming Lei. Signed-off-by: Christoph Hellwig Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20220722103817.631258-2-ming.lei@redhat.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 100 +++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 52 deletions(-) commit 72311809031217714e635b24f8478e6ecb0d93d9 Author: Tianyu Lan Date: Thu Jul 21 23:38:46 2022 -0400 swiotlb: clean up some coding style and minor issues - Fix the used field of struct io_tlb_area wasn't initialized - Set area number to be 0 if input area number parameter is 0 - Use array_size() to calculate io_tlb_area array size - Make parameters of swiotlb_do_find_slots() more reasonable Fixes: 26ffb91fa5e0 ("swiotlb: split up the global swiotlb lock") Signed-off-by: Tianyu Lan Reviewed-by: Michael Kelley Signed-off-by: Christoph Hellwig Documentation/admin-guide/kernel-parameters.txt | 3 ++- kernel/dma/swiotlb.c | 26 ++++++++++++++----------- 2 files changed, 17 insertions(+), 12 deletions(-) commit e086c37f876fd1f551e2b4f9be97d4a1923cd219 Author: Takashi Iwai Date: Fri Jul 22 16:39:48 2022 +0200 ALSA: usb-audio: Add quirk for Behringer UMC202HD Just like other Behringer models, UMC202HD (USB ID 1397:0507) requires the quirk for the stable streaming, too. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215934 Cc: Link: https://lore.kernel.org/r/20220722143948.29804-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/quirks.c | 2 ++ 1 file changed, 2 insertions(+) commit a45e52bf1eca9bf8a7d075ce12b1e306497ce393 Author: Lukas Bulwahn Date: Wed Jul 20 21:02:08 2022 +0200 dma-mapping: update comment after dmabounce removal Commit e3217540c271 ("ARM/dma-mapping: remove dmabounce") removes the config DMABOUNCE. A comment to the function __dma_page_cpu_to_dev() refers to this removed config DMABOUNCE. Remove the obsolete explanation, but keep the recommendation not to use __dma_page_cpu_to_dev() and use dma_sync_* functions instead. Signed-off-by: Lukas Bulwahn Acked-by: Arnd Bergmann Signed-off-by: Christoph Hellwig arch/arm/mm/dma-mapping.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c9337ad4390cdff8877e64824c2a2827d815743d Author: John Garry Date: Tue Jul 19 17:51:04 2022 +0800 scsi: sd: Add a comment about limiting max_sectors to shost optimal limit Add a comment about limiting the default the SCSI disk request_queue max_sectors initial value to that of the SCSI host optimal sectors limit. Suggested-by: Damien Le Moal Signed-off-by: John Garry Reviewed-by: Damien Le Moal Reviewed-by: Martin K. Petersen Signed-off-by: Christoph Hellwig drivers/scsi/sd.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8937e28eac0cbe0ff76e15f142e4b2e5adf3f462 Author: Xin Gao Date: Fri Jul 22 10:18:33 2022 +0800 RDMA: Fix comment typo The double `get' is duplicated, remove one. Link: https://lore.kernel.org/r/20220722021833.15669-1-gaoxin@cdjrlc.com Signed-off-by: Xin Gao Signed-off-by: Jason Gunthorpe include/rdma/ib_verbs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca325edb5fedf900044e3a704a1719f66fb3618c Author: Slark Xiao Date: Thu Jul 21 16:52:32 2022 +0800 IB: Fix repeated words 'the the' comments Replace 'the the' with 'the' in the comments. Signed-off-by: Slark Xiao Signed-off-by: Jason Gunthorpe drivers/infiniband/core/roce_gid_mgmt.c | 2 +- drivers/infiniband/hw/qib/qib.h | 2 +- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit d3e71a2eae1f43fd318922694b843d34b4920b07 Author: Horatiu Vultur Date: Tue Jul 19 22:11:58 2022 +0200 ARM: dts: lan966x: Enable network driver on pcb8291 The pcb8291 has 2 ports that are connected to the internal ports of the switch. Enable them in DT. Signed-off-by: Horatiu Vultur [claudiu.beznea: moved status ="okay" at the end for port0 and port1] Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220719201158.1696168-4-horatiu.vultur@microchip.com arch/arm/boot/dts/lan966x-pcb8291.dts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit f066b8f7d961b0f3ec08678a27f2f1a2f0148380 Author: Justin Stitt Date: Thu Jul 21 14:03:31 2022 -0700 drivers: iommu: fix clang -wformat warning When building with Clang we encounter the following warning: | drivers/iommu/msm_iommu.c:603:6: error: format specifies type 'unsigned | short' but the argument has type 'int' [-Werror,-Wformat] sid); `sid` is an int, use the proper format specifier `%x`. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Reported-by: Nathan Chancellor Suggested-by: Nathan Chancellor Signed-off-by: Justin Stitt Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20220721210331.4012015-1-justinstitt@google.com Signed-off-by: Joerg Roedel drivers/iommu/msm_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4ebd11f32a12986972a360be4d7136bb3a3855b Merge: a111daf0c53a a91eb6803c1c Author: Joerg Roedel Date: Fri Jul 22 16:33:13 2022 +0200 Merge tag 'arm-smmu-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu Arm SMMU updates for 5.20 - Add even more Qualcomm device-tree compatible strings - Support dumping of IMP DEF Qualcomm registers on TLB sync timeout - Fix reference count leak on device tree node in Qualcomm driver commit cc2a171372c68ee64916eb65a962b3aba9ea56ad Author: Gao Xiang Date: Sun Jun 19 23:09:40 2022 +0800 erofs: get rid of the leftover PAGE_SIZE in dir.c Convert the last hardcoded PAGE_SIZEs of uncompressed cases. Reviewed-by: Jeffle Xu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220619150940.121005-1-hsiangkao@linux.alibaba.com fs/erofs/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit de8a801ab65ebb6135a72d95384d2bccea30318e Author: Gao Xiang Date: Wed Jul 20 16:22:29 2022 +0800 erofs: get rid of erofs_prepare_dio() helper Fold in erofs_prepare_dio() in order to simplify the code. Reviewed-by: Jeffle Xu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220720082229.12172-1-hsiangkao@linux.alibaba.com fs/erofs/data.c | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) commit 267f2492c8f71dac44399988b510f9bf6b074a51 Author: Gao Xiang Date: Fri Jul 15 23:42:03 2022 +0800 erofs: introduce multi-reference pclusters (fully-referenced) Let's introduce multi-reference pclusters at runtime. In details, if one pcluster is requested by multiple extents at almost the same time (even belong to different files), the longest extent will be decompressed as representative and the other extents are actually copied from the longest one in one round. After this patch, fully-referenced extents can be correctly handled and the full decoding check needs to be bypassed for partial-referenced extents. Acked-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220715154203.48093-17-hsiangkao@linux.alibaba.com fs/erofs/compress.h | 2 +- fs/erofs/decompressor.c | 2 +- fs/erofs/zdata.c | 142 ++++++++++++++++++++++++++++++------------------ fs/erofs/zdata.h | 3 + 4 files changed, 93 insertions(+), 56 deletions(-) commit 20afcc462579c0bd79a59ab2b87b82ffa833d118 Author: Hilton Chain Date: Thu Jul 21 22:34:23 2022 +0800 HID: apple: Add "GANSS" to the non-Apple list While using the name "SONiX USB DEVICE" for wired mode, my GANSS keyboard uses "GANSS" for bluetooth mode as well, so adding this to the list. Signed-off-by: Hilton Chain Signed-off-by: Jiri Kosina drivers/hid/hid-apple.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1117d182c5d72abd7eb8b7d5e7b8c3373181c3ab Author: Artem Borisov Date: Tue Jul 19 17:53:24 2022 +0300 HID: alps: Declare U1_UNICORN_LEGACY support U1_UNICORN_LEGACY id was added to the driver, but was not declared in the device id table, making it impossible to use. Fixes: 640e403 ("HID: alps: Add AUI1657 device ID") Signed-off-by: Artem Borisov Signed-off-by: Jiri Kosina drivers/hid/hid-alps.c | 2 ++ 1 file changed, 2 insertions(+) commit bccd70a73db2061fc849928ad20a424afbaf3a45 Author: Lukas Bulwahn Date: Fri Jul 22 12:31:29 2022 +0200 MAINTAINERS: rectify entry for ARM/NUVOTON NPCM ARCHITECTURE Commit 08e950449c62 ("dt-binding: clk: npcm845: Add binding for Nuvoton NPCM8XX Clock") obviously adds nuvoton,npcm845-clk.h, but the file entry in MAINTAINERS, added with commit 3670d2ec13ee ("arm64: npcm: Add support for Nuvoton NPCM8XX BMC SoC") then refers to nuvoton,npcm8xx-clock.h. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Repair this file reference in ARM/NUVOTON NPCM ARCHITECTURE. Fixes: 3670d2ec13ee ("arm64: npcm: Add support for Nuvoton NPCM8XX BMC SoC") Signed-off-by: Lukas Bulwahn Signed-off-by: Arnd Bergmann MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f05e014b96c8846cdc39acdf10bbdbafb9c78a0 Author: Slark Xiao Date: Fri Jul 22 18:31:58 2022 +0800 uapi: asm-generic: fcntl: Fix typo 'the the' in comment Replace 'the the' with 'the' in the comment. Signed-off-by: Slark Xiao Signed-off-by: Arnd Bergmann tools/include/uapi/asm-generic/fcntl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e744351bcb9c4cee81300de5a6097100d835386 Author: Amadeusz Sławiński Date: Fri Jul 22 13:19:59 2022 +0200 ASoC: Intel: avs: Use lookup table to create modules As reported by Nathan, when building avs driver using clang with: CONFIG_COMPILE_TEST=y CONFIG_FORTIFY_SOURCE=y CONFIG_KASAN=y CONFIG_PCI=y CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_SOC=y CONFIG_SND_SOC_INTEL_AVS=y there are reports of too big stack use, like: sound/soc/intel/avs/path.c:815:18: error: stack frame size (2176) exceeds limit (2048) in 'avs_path_create' [-Werror,-Wframe-larger-than] struct avs_path *avs_path_create(struct avs_dev *adev, u32 dma_id, ^ 1 error generated. This is apparently caused by inlining many calls to guid_equal which inlines fortified memcpy, using 2 size_t variables. Instead of hardcoding many calls to guid_equal, use lookup table with one call, this improves stack usage. Link: https://lore.kernel.org/alsa-devel/YtlzY9aYdbS4Y3+l@dev-arch.thelio-3990X/T/ Link: https://github.com/ClangBuiltLinux/linux/issues/1642 Signed-off-by: Amadeusz Sławiński Reported-by: Nathan Chancellor Build-tested-by: Nathan Chancellor Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220722111959.2588597-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/path.c | 54 +++++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 25 deletions(-) commit b340128432a2b8849cc34f9653d7c43c83102bbd Author: Cristian Ciocaltea Date: Fri Jul 22 12:27:00 2022 +0300 ASoC: amd: vangogh: Use non-legacy DAI naming for cs35l41 Unlike most CODEC drivers, the CS35L41 driver did not have the non_legacy_dai_naming set, meaning the corresponding DAI has been traditionally registered using the legacy naming: spi-VLV1776:0x The recent migration to the new legacy DAI naming style has implicitly corrected that behavior and DAI gets now registered via the non-legacy naming, i.e. cs35l41-pcm. The problem is the acp5x platform driver is now broken as it continues to refer to the above mentioned codec using the legacy DAI naming in function acp5x_cs35l41_hw_params() and, therefore, the related setup is not being executed anymore. Let's fix that by replacing the obsolete DAI name with the correct one. Fixes: 129f055a2144 ("ASoC: core: Switch core to new DAI naming flag") Signed-off-by: Cristian Ciocaltea Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20220722092700.8269-1-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown sound/soc/amd/vangogh/acp5x-mach.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a4b976552f122ea851f556769874022cf097741e Author: Charles Keepax Date: Fri Jul 22 10:48:51 2022 +0100 firmware: cs_dsp: Add memory chunk helpers Add helpers that can be layered on top of a buffer read from or to be written to the DSP to faciliate accessing datastructures within the DSP memory. These functions handle adding the padding bytes for the DSP, converting to big endian, and packing arbitrary length data. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220722094851.92521-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown drivers/firmware/cirrus/cs_dsp.c | 104 +++++++++++++++++++++++++++++++++ include/linux/firmware/cirrus/cs_dsp.h | 73 +++++++++++++++++++++++ 2 files changed, 177 insertions(+) commit dea997733575c5793ca77e166bbbf89097987eb4 Author: Charles Keepax Date: Fri Jul 22 10:48:50 2022 +0100 firmware: cs_dsp: Add pre_stop callback The code already has a post_stop callback, add a matching pre_stop callback to the client_ops that is called before execution is stopped. This callback provides a convenient place for the client code to communicate with the DSP before it is stopped. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220722094851.92521-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown drivers/firmware/cirrus/cs_dsp.c | 3 +++ include/linux/firmware/cirrus/cs_dsp.h | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) commit fa28981b35128132aeb69a0a2ea2ff1c49bea6d9 Author: Johannes Berg Date: Fri Jul 22 11:15:20 2022 +0200 wifi: mac80211: fix link data leak During the code reshuffling, I accidentally set this to NULL before using it, fix that to fix the link data leak. Fixes: d3e2439b0f33 ("wifi: mac80211: fix link manipulation") Signed-off-by: Johannes Berg net/mac80211/iface.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit a94c90d32193ceac2aa5fc36f3833deeeb85bf8d Author: Johannes Berg Date: Fri Jul 22 11:01:18 2022 +0200 wifi: mac80211: mlme: fix disassoc with MLO In MLO we shouldn't call ieee80211_bss_info_change_notify(), call that only (for backward compatibility) without MLO, and otherwise ieee80211_vif_cfg_change_notify(). Similarly, ieee80211_reset_erp_info() only applies to the current link, and in MLO we assume the driver doesn't really need that. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 9f781533bb028edb3e8e10e79fb87e85a4dc6987 Author: Gregory Greenman Date: Tue Jul 12 12:22:50 2022 +0300 wifi: mac80211: add macros to loop over active links Add a preliminary version which will be updated later to loop over vif's and sta's active links. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg include/net/mac80211.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 45b12570a4bb3ed6fc364a4b1514911a3a4df177 Author: Johannes Berg Date: Fri Jul 22 00:07:29 2022 +0200 wifi: mac80211: remove erroneous sband/link validation In sta_apply_parameters(), we really no longer need to check that the link or sband exists, in fact, that's harmful if link 0 doesn't exist, since then this will fail. Just remove this check, it was added for validation of the sband where used, but it's not used here, it's now only used in sta_link_apply_parameters() which has an own lookup and check. Signed-off-by: Johannes Berg net/mac80211/cfg.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 4ca04ed36478e21b037fc379a7e6f52d0e6d8d52 Author: Johannes Berg Date: Thu Jul 21 23:35:21 2022 +0200 wifi: mac80211: mlme: transmit assoc frame with address translation To transmit the association frame to the right station and with address translation, use the correct addresses there and set up the AP address in the configuration earlier so it's applied during the transmit of auth/assoc frames. Fixes: 81151ce462e5 ("wifi: mac80211: support MLO authentication/association with one link") Signed-off-by: Johannes Berg net/mac80211/mlme.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 1773af9d6a3f1f2f67e111196fa8fb9106a7c20d Author: Johannes Berg Date: Thu Jul 21 19:54:20 2022 +0200 wifi: mac80211: verify link addresses are different When adding multiple links, verify that they all have different addresses. Signed-off-by: Johannes Berg net/mac80211/iface.c | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) commit 56057da4569bd716771cf4cfd031ce9876ef2516 Author: Johannes Berg Date: Thu Jul 21 13:08:13 2022 +0200 wifi: mac80211: rx: track link in RX data We'll need the link e.g. for decrypt, and shouldn't be looking it up all the time later, so track it in the RX data. Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 1 + net/mac80211/rx.c | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) commit 963d0e8d08d97f9133b9fd00354ebc1a2467484b Author: Johannes Berg Date: Thu Jul 21 10:56:48 2022 +0200 wifi: mac80211: optionally implement MLO multicast TX For drivers using software encryption for multicast TX, such as mac80211_hwsim, mac80211 needs to duplicate the multicast frames on each link, if MLO is enabled. Do this, but don't just make it dependent on the key but provide a separate flag for drivers to opt out of this. This is not very efficient, I expect that drivers will do it in firmware/hardware or at least with DMA engine assistence, so this is mostly for hwsim. To make this work, also implement the SNS11 sequence number space that an AP MLD shall have, and modify the API to the __ieee80211_subif_start_xmit() function to always require the link ID bits to be set. Signed-off-by: Johannes Berg include/net/mac80211.h | 10 +++++ net/mac80211/debugfs.c | 3 +- net/mac80211/ieee80211_i.h | 1 + net/mac80211/tdls.c | 3 +- net/mac80211/tx.c | 91 +++++++++++++++++++++++++++++++++++++++++----- 5 files changed, 97 insertions(+), 11 deletions(-) commit e1e68b14c5f85f2ad43d06a1b2f0d0fcc8dbdd62 Author: Johannes Berg Date: Mon Jul 18 21:36:08 2022 +0200 wifi: mac80211: expand ieee80211_mgmt_tx() for MLO There are a couple of new things that should be possible with MLO: * selecting the link to transmit to a station by link ID, which a previous patch added to the nl80211 API * selecting the link by frequency, similarly * allowing transmittion to an MLD without specifying any channel or link ID, with MLD addresses Enable these use cases. Also fix the address comparison in client mode to use the AP (MLD) address. Signed-off-by: Johannes Berg include/net/mac80211.h | 4 +++- net/mac80211/agg-tx.c | 4 ++-- net/mac80211/ieee80211_i.h | 8 ++++---- net/mac80211/offchannel.c | 47 ++++++++++++++++++++++++++++++++-------------- net/mac80211/rx.c | 2 +- net/mac80211/tx.c | 11 ++++++++--- 6 files changed, 51 insertions(+), 25 deletions(-) commit 95f498bb49f7030c1f40236107e5241e50f79ade Author: Johannes Berg Date: Mon Jul 18 12:13:46 2022 +0200 wifi: nl80211: add MLO link ID to the NL80211_CMD_FRAME TX API Allow optionally specifying the link ID to transmit on, which can be done instead of the link frequency, on an MLD addressed frame. Both can also be omitted in which case the frame must be MLD addressed and link selection (and address translation) will be done on lower layers. Signed-off-by: Johannes Berg include/net/cfg80211.h | 4 ++++ include/uapi/linux/nl80211.h | 4 ++++ net/wireless/nl80211.c | 12 ++++++++++++ 3 files changed, 20 insertions(+) commit 2ec833a5aafc49142a9b2988a3225ebfa47ccd27 Author: Johannes Berg Date: Mon Jul 18 10:42:19 2022 +0200 wifi: mac80211: report link ID to cfg80211 on mgmt RX For frames received on an MLD, report the link ID to userspace. Signed-off-by: Johannes Berg net/mac80211/rx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6074c9e5747158ab1e6aebedb87f64be77401fd8 Author: Johannes Berg Date: Mon Jul 18 10:40:44 2022 +0200 wifi: cfg80211: report link ID in NL80211_CMD_FRAME If given by the underlying driver, report the link ID for MLO in NL80211_CMD_FRAME. Signed-off-by: Johannes Berg include/net/cfg80211.h | 5 +++++ net/wireless/nl80211.c | 2 ++ 2 files changed, 7 insertions(+) commit f9202638df34474f862109731203e71d8e71f85e Author: Avraham Stern Date: Wed Jan 26 11:15:31 2022 +0200 wifi: mac80211: add hardware timestamps for RX and TX When the low level driver reports hardware timestamps for frame TX status or frame RX, pass the timestamps to cfg80211. Signed-off-by: Avraham Stern Signed-off-by: Johannes Berg include/net/mac80211.h | 28 +++++++++++++++++++++++++++- net/mac80211/rx.c | 30 ++++++++++++++++++++++-------- net/mac80211/status.c | 38 ++++++++++++++++++++++++++++---------- 3 files changed, 77 insertions(+), 19 deletions(-) commit 1ff715ffa0ec1b5af9093c43185e686f575f15cc Author: Avraham Stern Date: Thu Jan 27 13:56:29 2022 +0200 wifi: cfg80211: add hardware timestamps to frame RX info Add hardware timestamps to management frame RX info. This shall be used by drivers that support hardware timestamping for Timing measurement and Fine timing measurement action frames RX. Signed-off-by: Avraham Stern Signed-off-by: Johannes Berg include/net/cfg80211.h | 4 ++++ net/wireless/nl80211.c | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit 00b3d8401019e6abf89ea577cb1de060ea65e3fd Author: Avraham Stern Date: Sun Jan 30 18:17:51 2022 +0200 wifi: cfg80211/nl80211: move rx management data into a struct The functions for reporting rx management take many arguments. Collect all the arguments into a struct, which also make it easier to add more arguments if needed. Signed-off-by: Avraham Stern Signed-off-by: Johannes Berg include/net/cfg80211.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++---- net/wireless/mlme.c | 21 +++++++++--------- net/wireless/nl80211.c | 19 ++++++++-------- net/wireless/nl80211.h | 5 ++--- net/wireless/trace.h | 8 +++---- 5 files changed, 81 insertions(+), 32 deletions(-) commit ea7d50c925cec96b22655c4dc8672fbd59355bed Author: Avraham Stern Date: Wed Jan 26 19:13:47 2022 +0200 wifi: cfg80211: add a function for reporting TX status with hardware timestamps Add a function for reporting TX status with hardware timestamps. This function shall be used for reporting the TX status of Timing measurement and Fine timing measurement action frames by devices that support reporting hardware timestamps. Signed-off-by: Avraham Stern Signed-off-by: Johannes Berg include/net/cfg80211.h | 47 +++++++++++++++++++++++++++++++++++++++++++++-- net/wireless/nl80211.c | 42 ++++++++++++++++++++++++++++-------------- 2 files changed, 73 insertions(+), 16 deletions(-) commit 80b0ed70a271d375feb2286696ca8af147a035cf Author: Avraham Stern Date: Wed Jan 26 16:06:35 2022 +0200 wifi: nl80211: add RX and TX timestamp attributes Add attributes for reporting hardware timestamps for management frames RX and TX. These attributes will be used for reporting hardware timestamps for Timing measurement and Fine Timing Measurement action frames, which will allow userspace applications to measure the path delay between devices and sync clocks. For TX, these attributes are used for reporting the frame RX time and the ack TX time. For TX, they are used for reporting the frame TX time and the ack RX time. Signed-off-by: Avraham Stern Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 0903f899418ee0235e4ad756f5502162f29b49b9 Author: Avraham Stern Date: Thu Jan 27 14:39:46 2022 +0200 wifi: ieee80211: add helper functions for detecting TM/FTM frames Add helper functions for detection timing measurement and fine timing measurement frames. Signed-off-by: Avraham Stern Signed-off-by: Johannes Berg include/linux/ieee80211.h | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit c204d9df02020e2ed762d159112a4b15f6580e28 Author: Johannes Berg Date: Wed Jul 20 22:35:44 2022 +0200 wifi: mac80211_hwsim: handle links for wmediumd/virtio For wmediumd/virtio, handle both the RX channel for links, as well as the link addresses when links are added/removed. Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 40 ++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) commit 177577dbd2235a3a65f34a6cd618fe961a4dcaba Author: Johannes Berg Date: Tue Jul 19 12:08:29 2022 +0200 wifi: mac80211: sta_info: fix link_sta insertion When inserting a link STA, make sure it doesn't exist first and add lockdep assertions that we cannot modify the hash table without holding the sta_mtx, so this check is really correct. Also return without hashing if the driver failed, and warn if the hashing fails, which shouldn't happen due to the check described above. Fixes: cb71f1d136a6 ("wifi: mac80211: add sta link addition/removal") Fixes: ba6ddab94fc6 ("wifi: mac80211: maintain link-sta hash table") Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit b18d87f5d1025b55351378f953f644f07b1040b0 Author: Johannes Berg Date: Tue Jul 19 12:06:17 2022 +0200 wifi: mac80211: mlme: fix link_sta setup We need to copy the address to both the private and public portion of the link_sta (the private one is needed for the hash table). Fix this. Fixes: bbe90107e1d9 ("wifi: mac80211: mlme: refactor link station setup") Signed-off-by: Johannes Berg net/mac80211/mlme.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 9dd1953846c7cd58100a5c6bd90db54e2c60668a Author: Johannes Berg Date: Tue Jul 19 10:26:50 2022 +0200 wifi: nl80211/mac80211: clarify link ID in control port TX Clarify the link ID behaviour in control port TX, we need it to select the link to transmit on for both MLD and non-MLD receivers, but select the link address as the SA only if the receiver is not an MLD. Fixes: 67207bab9341 ("wifi: cfg80211/mac80211: Support control port TX from specific link") Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 6 ++++++ net/mac80211/tx.c | 43 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 2 deletions(-) commit dd820ed6336ad37c870ef2f11e34dcf1a8ff2aa1 Author: Johannes Berg Date: Tue Jul 19 09:37:59 2022 +0200 wifi: mac80211: return error from control port TX for drops If the frame is going to be dropped anyway because ieee80211_lookup_ra_sta() returned an error (and even though it's a bit racy, it will likely continue to do so), return the error out instead of just silently dropping the frame. Signed-off-by: Johannes Berg net/mac80211/tx.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 8876c67e6296b44c283cd748d4888788af3f7942 Author: Johannes Berg Date: Tue Jul 19 08:44:25 2022 +0200 wifi: nl80211: require MLD address on link STA add/modify We always need the MLD address and link ID to add or modify the link STA, so require it in the API. Fixes: 577e5b8c3924 ("wifi: cfg80211: add API to add/modify/remove a link station") Signed-off-by: Johannes Berg net/wireless/nl80211.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 956b96133763dcfdf1b78de0910631f610df2d7b Author: Johannes Berg Date: Mon Jul 18 23:01:19 2022 +0200 wifi: mac80211: more station handling sanity checks Add more sanity checks to the API handling, we shouldn't be able to create a station without links, nor should we be able to add a link to a station that wasn't created as an MLD with links in the first place. Signed-off-by: Johannes Berg net/mac80211/cfg.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 0ad49045f28474b3cbc1f27ec7a4238970734764 Author: Johannes Berg Date: Mon Jul 18 22:54:27 2022 +0200 wifi: mac80211: fix link sta hash table handling There are two issues here: we unhash the link stations only directly before freeing the station they belong to, and we also don't unhash all the links correctly in all cases. Fix these issues. Fixes: ba6ddab94fc6 ("wifi: mac80211: maintain link-sta hash table") Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 9aebce6c97bfd7dafd364be2e5b3af7a78af2662 Author: Johannes Berg Date: Mon Jul 18 22:23:53 2022 +0200 wifi: mac80211: validate link address doesn't change When modifying a link station, validate that the link address doesn't change, except the first time the link is created. Fixes: b95eb7f0eee4 ("wifi: cfg80211/mac80211: separate link params from station params") Signed-off-by: Johannes Berg net/mac80211/cfg.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 6d8e0f84f89f99c87608569e374d52cf248978ee Author: Johannes Berg Date: Mon Jul 18 16:04:05 2022 +0200 wifi: mac80211: mlme: set sta.mlo to mlo state At this point, we've already changed link_id to be zero for a non-MLO connection, so use the 'mlo' variable rather than link ID to determine the MLO status of the station. Fixes: bd363ee53302 ("wifi: mac80211: mlme: set sta.mlo correctly") Fixes: 81151ce462e5 ("wifi: mac80211: support MLO authentication/association with one link") Signed-off-by: Johannes Berg net/mac80211/mlme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0f13f3c3222a0463013f73b9d4b31ac4ebdc884a Author: Johannes Berg Date: Mon Jul 18 16:58:18 2022 +0200 wifi: mac80211: fast-xmit: handle non-MLO clients If there's a non-MLO client, the A2 must be set to the BSSID of the link since no translation will happen in lower layers and it's needed that way for encryption. Signed-off-by: Johannes Berg net/mac80211/tx.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit e4c9050a0dee71fc24e5d93a1003f18a3c6f6f88 Author: Johannes Berg Date: Mon Jul 18 16:45:50 2022 +0200 wifi: mac80211_hwsim: fix address translation for MLO There are two issues here: we need to do the translation even in case mac80211 selected a link, and we should only translate the A3 if it's the BSSID. Fix both. Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 54 ++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 20 deletions(-) commit 1f6389440cebfbca40cc513da69c54b5c24381b1 Author: Johannes Berg Date: Mon Jul 18 16:40:36 2022 +0200 wifi: mac80211: fix RX MLD address translation We should only translate addr3 here if it's the BSSID. Fixes: 42fb9148c078 ("wifi: mac80211: do link->MLD address translation on RX") Signed-off-by: Johannes Berg net/mac80211/rx.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 206c8c0680b15d2630900ca27eb971c5d25557e8 Author: Johannes Berg Date: Mon Jul 18 09:14:30 2022 +0200 wifi: mac80211: fix NULL pointer deref with non-MLD STA If we have a non-MLD STA on an AP MLD, we crash while adding the station. Fix that, in this case we need to use the STA's address also on the link data structure. Fixes: f36fe0a2df03 ("wifi: mac80211: fix up link station creation/insertion") Signed-off-by: Johannes Berg net/mac80211/cfg.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 553a282cb25eb62fdda1f3425d48b12372366e03 Author: Johannes Berg Date: Sun Jul 17 18:16:51 2022 +0200 wifi: mac80211: mlme: fix override calculation In my previous changes here, I neglected to take the old conn_flags into account that might still be present from the authentication, and thus ieee80211_setup_assoc_link() can misbehave, as well as the override calculation being wrong. Fix that by ORing in the old flags. Fixes: 1845c1d4a455 ("wifi: mac80211: mlme: refactor assoc link setup") Signed-off-by: Johannes Berg net/mac80211/mlme.c | 2 ++ 1 file changed, 2 insertions(+) commit 8a9be422f5ff34ec7abec289c6fe862d9e7864d2 Author: Johannes Berg Date: Fri Jul 15 15:37:23 2022 +0200 wifi: mac80211: tx: use AP address in some places for MLO In a few places we need to use the AP (MLD) address, not the deflink BSSID, the link address translation will happen later. To make that work properly for fast-xmit, set up the ap_addr in the vif.cfg earlier. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 6 ++++-- net/mac80211/tx.c | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) commit 1785ab769824b800d7dea83aecc88c90377a6a5d Author: Arnd Bergmann Date: Mon Jul 18 22:58:47 2022 +0200 ARM: cns3xxx: add CONFIG_UNUSED_BOARD_FILES dependency Krzysztof Halasa has kept the cns3xxx platform working for a long time but has moved away from working on it. The OpenWRT port was dropped in 2020, and support for the Gateworks Laguna platform never made it into the mainline kernel, which only supports the reference design. Further, the ARM11MPCore has an unresolved issue with instruction cache coherency, and removing support for the remaining platforms using this core would be the easiest solution. Mark the entire platform as unused now, to be removed in early 2023 if no users show up. Cc: Krzysztof Halasa Link: https://lore.kernel.org/lkml/20210616152326.GG22278@shell.armlinux.org.uk/ Signed-off-by: Arnd Bergmann arch/arm/configs/cns3420vb_defconfig | 1 + arch/arm/mach-cns3xxx/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 6460e993be65d23fbdbf0a79039f4535ae6b1109 Author: Arnd Bergmann Date: Tue Jul 19 14:59:06 2022 +0200 ARM: iop32x: mark as unused The iop32x platform has recently been converted to be part of the multiplatform configuration, and it should be possible to keep it alive for longer by making it boot from devicetree like we did for the related ixp4xx platform. However, it appears that no users remain at this point, so just mark the entire platform depending on CONFIG_UNUSED_BOARD_FILES, with the intention of removing it in early 2023. If any users remain, please speak up now. Cc: Lennert Buytenhek Acked-by: Dan Williams Signed-off-by: Arnd Bergmann arch/arm/configs/iop32x_defconfig | 1 + arch/arm/mach-iop32x/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit d75595e0962acf5e06cf6a04638bc8d31ed4b3b1 Author: Arnd Bergmann Date: Mon Jul 18 22:13:16 2022 +0200 ARM: s3c: mark most board files as unused The s3c24xx platform is already scheduled for removal in early 2023, with s3c64xx meeting the same fate a year later. Most of the s3c64xx board files appear to be unused, as the better maintained ones already got converted to DT. The main exception is the Wolfson Cragganmore board, which remains in use as the reference design for Wolfson/Cirrus devices. As the other boards get removed, this one stays around along with the DT based machines. The s3c6400_defconfig file now disables the unused boards, while the s3c24xx defconfig files all turn on CONFIG_UNUSED_BOARD_FILES to remain usable. Cc: Krzysztof Kozlowski Cc: Alim Akhtar Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Arnd Bergmann arch/arm/configs/mini2440_defconfig | 1 + arch/arm/configs/s3c2410_defconfig | 1 + arch/arm/configs/s3c6400_defconfig | 9 --------- arch/arm/configs/tct_hammer_defconfig | 1 + arch/arm/mach-s3c/Kconfig.s3c24xx | 2 +- arch/arm/mach-s3c/Kconfig.s3c64xx | 20 ++++++++++---------- 6 files changed, 14 insertions(+), 20 deletions(-) commit 4a69c8b7fed8d229db6f1b5a5de9898b4ca4d822 Author: Arnd Bergmann Date: Mon Jul 18 21:39:23 2022 +0200 ARM: omap1: add Kconfig dependencies for unused boards Legacy board files with no known users are planned to get removed in early 2023, and this covers the majority of the omap1 boards as well. According to Tony, the actual users are all on OSK, Nokia770, and AMS-Delta. Additionally, the sx1 and palmte boards are supported by qemu, which is convenient for testing, so all five stay around past the initial board removal. As omap1 is now part of the multiplatform build and uses the common-clk framework, it has become easier to convert these to use devicetree based booting in the future. Cc: Janusz Krzysztofik Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Acked-by: Aaro Koskinen Signed-off-by: Arnd Bergmann arch/arm/configs/omap1_defconfig | 9 --------- arch/arm/mach-omap1/Kconfig | 10 ++++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) commit 336291304692faf1449c4fe9087bec73bcf188ec Author: Arnd Bergmann Date: Mon Jul 18 21:26:45 2022 +0200 ARM: sa1100: mark most boards as unused Most Arm board files are unused and will be removed in early 2023 if no remaining users show up. For the sa1100 platform, the machines that are still in use are: - Russell's Assabet development board - Linus' H3600 iPaq PocketPC - Collie as the only qemu-supported board, to allow testing by others All remaining sa1100 boards are marked to depend on CONFIG_UNUSED_BOARD_FILES to give potential users a last chance to speak up. Cc: Kristoffer Ericson Cc: Russell King Acked-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/configs/badge4_defconfig | 1 + arch/arm/configs/cerfcube_defconfig | 1 + arch/arm/configs/hackkit_defconfig | 1 + arch/arm/configs/jornada720_defconfig | 1 + arch/arm/configs/lart_defconfig | 1 + arch/arm/configs/pleb_defconfig | 1 + arch/arm/configs/shannon_defconfig | 1 + arch/arm/configs/simpad_defconfig | 1 + arch/arm/mach-sa1100/Kconfig | 11 +++++++++++ 9 files changed, 19 insertions(+) commit 9aa938ddce81c045f627468b395714768945a90f Author: Alexander Gordeev Date: Thu Jul 21 15:59:36 2022 +0200 s390/docs: fix warnings for vfio_ap driver doc Fix multiple warnings produced by make htmldocs Fixes: cb269e0aba7c ("s390/vfio-ap: update docs to include dynamic config support") Signed-off-by: Alexander Gordeev Documentation/s390/vfio-ap.rst | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit d384690c6a2c8e6d5d09d4333f0c4b987d3c7049 Author: Alexander Gordeev Date: Thu Jul 21 15:29:05 2022 +0200 s390/docs: fix warnings for vfio_ap driver lock usage doc Fix multiple warnings produced by make htmldocs Fixes: e32d3827f3d5 ("s390/Docs: new doc describing lock usage by the vfio_ap device driver") Signed-off-by: Alexander Gordeev Documentation/s390/index.rst | 1 + Documentation/s390/vfio-ap-locking.rst | 68 +++++++++++++++++++--------------- 2 files changed, 40 insertions(+), 29 deletions(-) commit 949d6b405e6160ae44baea39192d67b39cb7eeac Author: Jakub Kicinski Date: Wed Jul 20 16:57:58 2022 -0700 net: add missing includes and forward declarations under net/ This patch adds missing includes to headers under include/net. All these problems are currently masked by the existing users including the missing dependency before the broken header. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller include/linux/lapb.h | 5 +++++ include/net/af_vsock.h | 1 + include/net/amt.h | 3 +++ include/net/ax88796.h | 2 ++ include/net/bond_options.h | 8 ++++++++ include/net/codel_qdisc.h | 1 + include/net/datalink.h | 7 +++++++ include/net/dcbevent.h | 2 ++ include/net/dcbnl.h | 2 ++ include/net/dn_dev.h | 1 + include/net/dn_fib.h | 2 ++ include/net/dn_neigh.h | 2 ++ include/net/dn_nsp.h | 6 ++++++ include/net/dn_route.h | 3 +++ include/net/erspan.h | 3 +++ include/net/esp.h | 1 + include/net/ethoc.h | 3 +++ include/net/firewire.h | 2 ++ include/net/fq.h | 4 ++++ include/net/garp.h | 2 ++ include/net/gtp.h | 4 ++++ include/net/gue.h | 3 +++ include/net/hwbm.h | 2 ++ include/net/ila.h | 2 ++ include/net/inet6_connection_sock.h | 2 ++ include/net/inet_common.h | 6 ++++++ include/net/inet_frag.h | 3 +++ include/net/ip6_route.h | 20 ++++++++++---------- include/net/ipcomp.h | 2 ++ include/net/ipconfig.h | 2 ++ include/net/llc_c_ac.h | 7 +++++++ include/net/llc_c_st.h | 4 ++++ include/net/llc_s_ac.h | 4 ++++ include/net/llc_s_ev.h | 1 + include/net/mpls_iptunnel.h | 3 +++ include/net/mrp.h | 4 ++++ include/net/ncsi.h | 2 ++ include/net/netevent.h | 1 + include/net/netns/can.h | 1 + include/net/netns/core.h | 2 ++ include/net/netns/generic.h | 1 + include/net/netns/ipv4.h | 1 + include/net/netns/mctp.h | 1 + include/net/netns/mpls.h | 2 ++ include/net/netns/nexthop.h | 1 + include/net/netns/sctp.h | 3 +++ include/net/netns/unix.h | 2 ++ include/net/netrom.h | 1 + include/net/p8022.h | 5 +++++ include/net/phonet/pep.h | 3 +++ include/net/phonet/phonet.h | 4 ++++ include/net/phonet/pn_dev.h | 5 +++++ include/net/pptp.h | 3 +++ include/net/psnap.h | 5 +++++ include/net/regulatory.h | 3 +++ include/net/rose.h | 1 + include/net/secure_seq.h | 2 ++ include/net/smc.h | 7 +++++++ include/net/stp.h | 2 ++ include/net/transp_v6.h | 2 ++ include/net/tun_proto.h | 3 ++- include/net/udplite.h | 1 + include/net/xdp_priv.h | 1 + 63 files changed, 183 insertions(+), 11 deletions(-) commit 735dbc69ab719f5e3c84f7c669b5b3ad05f684bb Merge: 16576a034c4b 84e7fc2591f7 Author: David S. Miller Date: Fri Jul 22 12:50:07 2022 +0100 Merge branch 'sfc-E100-VF-respresenters' Edward Cree says: ==================== sfc: VF representors for EF100 This series adds representor netdevices for EF100 VFs, as a step towards supporting TC offload and vDPA usecases in future patches. In this first series is basic netdevice creation and packet TX; the following series will add the RX path. v3: dropped massive mcdi_pcol.h patch which was applied separately. v2: converted comments on struct efx_nic members added in patch #4 to kernel-doc (Jakub). While at it, also gave struct efx_rep its own kdoc since several members had comments on them. ==================== Signed-off-by: David S. Miller commit 84e7fc2591f72987b43da91b3fdb01a196204379 Author: Edward Cree Date: Wed Jul 20 19:33:49 2022 +0100 sfc: attach/detach EF100 representors along with their owning PF Since representors piggy-back on the PF's queues for TX, they can only accept new TXes while the PF is up. Thus, any operation which detaches the PF must first detach all its VFreps. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef100_netdev.c | 3 +++ drivers/net/ethernet/sfc/ef100_rep.c | 11 ++++++++-- drivers/net/ethernet/sfc/efx.h | 9 ++++++++- drivers/net/ethernet/sfc/efx_common.c | 36 +++++++++++++++++++++++++++++++++ drivers/net/ethernet/sfc/efx_common.h | 3 +++ 5 files changed, 59 insertions(+), 3 deletions(-) commit f72c38fad234759fe943cb2e40bf3d0f7de1d4d9 Author: Edward Cree Date: Wed Jul 20 19:33:48 2022 +0100 sfc: hook up ef100 representor TX Implement .ndo_start_xmit() by calling into the parent PF's TX path. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef100_netdev.c | 11 ++++++++++- drivers/net/ethernet/sfc/ef100_netdev.h | 5 +++++ drivers/net/ethernet/sfc/ef100_rep.c | 23 +++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) commit 02443ab8c9314134c9cd58946121726e4cd9a5c1 Author: Edward Cree Date: Wed Jul 20 19:33:47 2022 +0100 sfc: support passing a representor to the EF100 TX path A non-null efv in __ef100_enqueue_skb() indicates that the packet is from that representor, should be transmitted with a suitable option descriptor (to instruct the switch to deliver it to the representee), and should not be accounted to the parent PF's stats or BQL. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef100_rep.h | 8 ++++ drivers/net/ethernet/sfc/ef100_tx.c | 84 +++++++++++++++++++++++++++++++++-- drivers/net/ethernet/sfc/ef100_tx.h | 3 ++ drivers/net/ethernet/sfc/net_driver.h | 1 + drivers/net/ethernet/sfc/tx.c | 6 ++- drivers/net/ethernet/sfc/tx_common.c | 35 ++++++++++----- drivers/net/ethernet/sfc/tx_common.h | 3 +- 7 files changed, 123 insertions(+), 17 deletions(-) commit da56552d04c54b68788fb3700b5150814e1de3d1 Author: Edward Cree Date: Wed Jul 20 19:29:34 2022 +0100 sfc: determine representee m-port for EF100 representors An MAE port, or m-port, is a port (source/destination for traffic) on the Match-Action Engine (the internal switch on EF100). Representors will use their representee's m-port for two purposes: as a destination override on TX from the representor, and as a source match in 'default rules' to steer representee traffic (when not matched by e.g. a TC flower rule) to representor RX via the parent PF's receive queue. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/Makefile | 2 +- drivers/net/ethernet/sfc/ef100_rep.c | 27 ++++++++++++++++++++++ drivers/net/ethernet/sfc/ef100_rep.h | 2 ++ drivers/net/ethernet/sfc/mae.c | 44 ++++++++++++++++++++++++++++++++++++ drivers/net/ethernet/sfc/mae.h | 22 ++++++++++++++++++ 5 files changed, 96 insertions(+), 1 deletion(-) commit e1479556f808b1702a0cb83e823784ccf67c305d Author: Edward Cree Date: Wed Jul 20 19:29:33 2022 +0100 sfc: phys port/switch identification for ef100 reps Requires storing VF index in struct efx_rep. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef100_rep.c | 39 ++++++++++++++++++++++++++++++++++-- drivers/net/ethernet/sfc/ef100_rep.h | 2 ++ 2 files changed, 39 insertions(+), 2 deletions(-) commit 5687eb3466a90a72d13f2aab20b4b801289dbda9 Author: Edward Cree Date: Wed Jul 20 19:29:30 2022 +0100 sfc: add basic ethtool ops to ef100 reps Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef100_rep.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 08135eecd07fbf48e819bdf3ec2a7717e76346ee Author: Edward Cree Date: Wed Jul 20 19:29:28 2022 +0100 sfc: add skeleton ef100 VF representors No net_device_ops yet, just a placeholder netdev created per VF. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/Makefile | 2 +- drivers/net/ethernet/sfc/ef100_netdev.c | 2 +- drivers/net/ethernet/sfc/ef100_rep.c | 126 ++++++++++++++++++++++++++++++++ drivers/net/ethernet/sfc/ef100_rep.h | 37 ++++++++++ drivers/net/ethernet/sfc/ef100_sriov.c | 32 ++++++-- drivers/net/ethernet/sfc/ef100_sriov.h | 2 +- drivers/net/ethernet/sfc/efx_common.c | 2 + drivers/net/ethernet/sfc/net_driver.h | 4 + 8 files changed, 196 insertions(+), 11 deletions(-) commit 95287e1b4e5c656ad3abfbf27f0249792251dd9e Author: Edward Cree Date: Wed Jul 20 19:29:26 2022 +0100 sfc: detect ef100 MAE admin privilege/capability at probe time One PCIe function per network port (more precisely, per m-port group) is responsible for configuring the Match-Action Engine which performs switching and packet modification in the slice to support flower/OVS offload. The GRP_MAE bit in the privilege mask indicates whether a given function has this capability. At probe time, call MCDIs to read the calling function's privilege mask, and store the GRP_MAE bit in a new ef100_nic_data member. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef100_nic.c | 7 ++++++ drivers/net/ethernet/sfc/ef100_nic.h | 1 + drivers/net/ethernet/sfc/mcdi.c | 46 ++++++++++++++++++++++++++++++++++++ drivers/net/ethernet/sfc/mcdi.h | 1 + 4 files changed, 55 insertions(+) commit 8ca353da9c10461c91565de51c1bf375c49a820f Author: Edward Cree Date: Wed Jul 20 19:29:24 2022 +0100 sfc: update EF100 register descriptions Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef100_regs.h | 83 +++++++++++++++++++++++++---------- 1 file changed, 60 insertions(+), 23 deletions(-) commit 16576a034c4ba2e3179f48554d4f1bd5c05382cd Author: Alan Brady Date: Wed Jul 20 11:13:10 2022 -0700 ping: support ipv6 ping socket flow labels Ping sockets don't appear to make any attempt to preserve flow labels created and set by userspace using IPV6_FLOWINFO_SEND. Instead they are clobbered by autolabels (if enabled) or zero. Grab the flowlabel out of the msghdr similar to how rawv6_sendmsg does it and move the memset up so it doesn't get zeroed after. Signed-off-by: Alan Brady Tested-by: Gurucharan Signed-off-by: Tony Nguyen Signed-off-by: David S. Miller net/ipv6/ping.c | 6 ++- tools/testing/selftests/net/ipv6_flowlabel.c | 75 +++++++++++++++++++++------ tools/testing/selftests/net/ipv6_flowlabel.sh | 16 ++++++ 3 files changed, 81 insertions(+), 16 deletions(-) commit c497885e3044ad92a849cc4433c769f0b66374ab Author: Juhee Kang Date: Thu Jul 21 19:26:48 2022 +0900 net: marvell: prestera: use netif_is_any_bridge_port instead of open code The open code which is netif_is_bridge_port() || netif_is_ovs_port() is defined as a new helper function on netdev.h like netif_is_any_bridge_port that can check both IFF flags in 1 go. So use netif_is_any_bridge_port() function instead of open code. This patch doesn't change logic. Signed-off-by: Juhee Kang Signed-off-by: David S. Miller drivers/net/ethernet/marvell/prestera/prestera_router.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 59ad24714b7bb0c46c69cffc55478cc3295465d3 Author: Juhee Kang Date: Thu Jul 21 19:26:47 2022 +0900 mlxsw: use netif_is_any_bridge_port() instead of open code The open code which is netif_is_bridge_port() || netif_is_ovs_port() is defined as a new helper function on netdev.h like netif_is_any_bridge_port that can check both IFF flags in 1 go. So use netif_is_any_bridge_port() function instead of open code. This patch doesn't change logic. Signed-off-by: Juhee Kang Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 90023c6ede7583ca2e059a98ce3421225d367002 Merge: 65fb8e2ef353 409a8652e909 Author: Mark Brown Date: Fri Jul 22 12:30:59 2022 +0100 ASoC: fsl: Fix sparse warning Merge series from Shengjiu Wang : Fix sparse warnings in various fsl drivers. commit bdd50bf19b68749cce62300a9c296dffbac0d41d Author: Arnd Bergmann Date: Mon Jul 18 20:37:09 2022 +0200 ARM: footbridge: mark cats board for removal There are three remaining footbridge boards, as the CO285 and the HP personal server got removed already over the years. Russell still uses his ebsa285, while both Linus and Marc have a NetWinder that they use for testing. Nobody so far replied that they are using cats, so it goes on the long list of machines to be removed in early 2023 if it stays like this. Cc: Russell King Cc: Linus Walleij Cc: Marc Zyngier Signed-off-by: Arnd Bergmann arch/arm/configs/footbridge_defconfig | 1 - arch/arm/mach-footbridge/Kconfig | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit 60e3eabca49c25bae8896eb094c70b46aa0d2a0f Author: Arnd Bergmann Date: Mon Jul 18 20:15:01 2022 +0200 ARM: mmp: mark all board files for removal The mmp platform supports both ATAGS based board files and DT booting, but it appears that nobody has been interested in board files for a long time. Mark all of them for removal in early 2023 with a dependency on CONFIG_UNUSED_BOARD_FILES, leaving only the DT support for the future, unless someone pops up who uses them. Cc: Lubomir Rintel Cc: Haojian Zhuang Signed-off-by: Arnd Bergmann arch/arm/configs/mmp2_defconfig | 5 ++--- arch/arm/mach-mmp/Kconfig | 9 +++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) commit 6eea15887f38b0b49beb05aa0d75e854b593e967 Author: Arnd Bergmann Date: Mon Jul 18 18:09:30 2022 +0200 ARM: ep93xx: mark most board files as unused Most of the remaining ARM board files in the kernel have no known users, and we plan to remove those in early 2023. For ep93xx, Alexander Sverdlin still has access to the edb93xx family of reference boards, while Nikita Shubin has a ts7250 and is working on a device tree conversion for those. Hartley Sweeten has a MACH_VISION_EP9307 that is still in use. This is a total of nine machine definitions that we will keep around, but these are all similar machines and are defined in only two board files. The other six board files now have a dependency on CONFIG_UNUSED_BOARD_FILES to indicate that they are likely going away. Cc: Nikita Shubin Acked-by: Alexander Sverdlin Cc: Hartley Sweeten Cc: Lukasz Majewski Signed-off-by: Arnd Bergmann arch/arm/configs/ep93xx_defconfig | 8 -------- arch/arm/mach-ep93xx/Kconfig | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) commit 3c1ca64f52032316429bc23c6330e3f384b2d4bb Author: Arnd Bergmann Date: Mon Jul 18 18:06:20 2022 +0200 ARM: davinci: mark all ATAGS board files as unused From an earlier discussion, it appears that the davinci da8xx machines that are still functional have already been converted to DT, while the remaining board files are only kept because nobody has stepped up to remove them. Mark all these boards as 'depends on UNUSED_BOARD_FILES' with the plan to remove them in early 2023 after the next longterm supported kernel is out. Cc: Sekhar Nori Cc: Bartosz Golaszewski Signed-off-by: Arnd Bergmann arch/arm/configs/davinci_all_defconfig | 11 ----------- arch/arm/configs/multi_v5_defconfig | 9 --------- arch/arm/mach-davinci/Kconfig | 8 ++++++++ 3 files changed, 8 insertions(+), 20 deletions(-) commit 0c00a537bc399382a7039fd972fdd0d6a5d706e3 Author: Arnd Bergmann Date: Mon Jul 18 17:54:15 2022 +0200 ARM: orion: add ATAGS dependencies Most of the remaining arm board files in the kernel are unused and will be removed in early 2023 if no users step up. So far I got no user replies about the orion5x and mv78xx0 machines, but these are still supported in the default kernel of the Debian 'armel' (armv5 softfloat) distro, and there is an active project on github that tries to keep some of these machines working, and Mauri Sandberg is working on a DT conversion for the D-Link DNS-323. It appears the Debian-on-Buffalo project has not got the Terastation WXL working in a few years, and the other mv78xx0 machines are just the reference designs, so I assume none of these have remaining users. For the Orion5x family, the same is probably true for its reference implementations (RD88Fxxxxx, DB88F281) and the machines with less than 64MB of memory (WNR854T, WRT350N v2). The remaining nine machines are now scheduled to be kept for at least 2023, hopefully to be replaced with DT based versions. The mv78xx0_defconfig file needs to enable CONFIG_UNUSED_BOARD_FILES to still build, while the other affected defconfig files lose the specific boards. Cc: Andrew Lunn Cc: Sebastian Hesselbarth Cc: Gregory Clement Cc: Mauri Sandberg Link: https://github.com/1000001101000/Debian_on_Buffalo Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v5_defconfig | 8 -------- arch/arm/configs/mv78xx0_defconfig | 1 + arch/arm/configs/mvebu_v5_defconfig | 8 -------- arch/arm/configs/orion5x_defconfig | 13 ------------- arch/arm/mach-mv78xx0/Kconfig | 2 +- arch/arm/mach-orion5x/Kconfig | 17 +++++++++++++++++ 6 files changed, 19 insertions(+), 30 deletions(-) commit b5aaaa666a8519a63863c41ce0470ddc8e16b4cc Author: Arnd Bergmann Date: Mon Jul 18 17:36:08 2022 +0200 ARM: pxa: add Kconfig dependencies for ATAGS based boards Most of the traditional board files are no longer used by anyone and will be removed next year, while the DT based machine support remains. Adding a CONFIG_ATAGS dependency around all the board files means that they now actaully get disabled when ATAGS support is left out, and the individual boards that have no known users are marked as depending on CONFIG_UNUSED_BOARD_FILES, with the plan to remove them in early 2023 unless someone else shows interest. Laurence de Bruxelles intends to work on converting the Spitz/Akita/Borzoi family of Sharp Zaurus SL machines to DT, to make that easier those remain for the moment. In addition, the "Gumstix" machine is the one that is supported in qemu with 256MB of RAM, which makes it particularly nice for testing, I'm leaving it in hoping that someone can take care of converting it to DT as well. Finally, Marc Zyngier is still able to test the Zeus and Viper machines, so these could be saved as well if anyone wants to conver them to DT. This seems less likely, so I'm marking them as unused for the time being. For the defconfig files, both the pxa3xx_defconfig and pxa_defconfig now only enable the boards that are not marked as unused, while all the other ones explicitly enable CONFIG_UNUSED_BOARD_FILES to still allow building the kernels. Cc: Robert Jarzmik Cc: Daniel Mack Cc: Laurence de Bruxelles Acked-by: Marc Zyngier Signed-off-by: Arnd Bergmann arch/arm/configs/cm_x300_defconfig | 1 + arch/arm/configs/colibri_pxa270_defconfig | 1 + arch/arm/configs/colibri_pxa300_defconfig | 1 + arch/arm/configs/corgi_defconfig | 1 + arch/arm/configs/eseries_pxa_defconfig | 1 + arch/arm/configs/ezx_defconfig | 1 + arch/arm/configs/h5000_defconfig | 1 + arch/arm/configs/lpd270_defconfig | 1 + arch/arm/configs/lubbock_defconfig | 1 + arch/arm/configs/magician_defconfig | 1 + arch/arm/configs/mainstone_defconfig | 1 + arch/arm/configs/palmz72_defconfig | 1 + arch/arm/configs/pcm027_defconfig | 1 + arch/arm/configs/pxa255-idp_defconfig | 1 + arch/arm/configs/pxa3xx_defconfig | 7 +-- arch/arm/configs/pxa_defconfig | 77 +++++-------------------------- arch/arm/configs/trizeps4_defconfig | 1 + arch/arm/configs/viper_defconfig | 1 + arch/arm/configs/xcep_defconfig | 1 + arch/arm/configs/zeus_defconfig | 1 + arch/arm/mach-pxa/Kconfig | 53 +++++++++++++++++++++ 21 files changed, 83 insertions(+), 72 deletions(-) commit acb926d618f252a8fec2424662fa201d07e66338 Author: Arnd Bergmann Date: Mon Jul 18 14:30:21 2022 +0200 ARM: add CONFIG_UNUSED_BOARD_FILES Based on the recent mailing list discussion, most board file support has no remaining users and can be scheduled for removal early next year. If a board is still found to have users, it will remain for this round but users are encouraged to migrate to devicetree based booting where possible. The timing is meant to ensure the next longterm supported kernel still contains all the board files, giving another year of support for potential users that did not speak up and would otherwise be stuck on the v5.15.y longterm kernel from 2021. Link: https://lore.kernel.org/all/CAK8P3a0Z9vGEQbVRBo84bSyPFM-LF+hs5w8ZA51g2Z+NsdtDQA@mail.gmail.com/ Link: https://docs.google.com/spreadsheets/d/1PL4dUUSieeXHzZhAn_Rnix32OTiCfN33sCQejpvI6ng/edit#gid=0 Signed-off-by: Arnd Bergmann arch/arm/Kconfig | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 96a4ce30c27eb50bffa26a8ff2807cca74c707ac Author: Arnd Bergmann Date: Tue Jul 5 14:10:34 2022 +0200 ARM: add ATAGS dependencies to non-DT platforms There are a total of eight platforms that only suppor ATAGS based boot with board files but no devicetree booting. For dove, the DT support is part of the mvebu platform, which shares driver but no code in arch/arm. Most of these will never get converted to DT, and the majority of the board files appear to be entirely unused already. There are still known users on a few machines, and there may be interest in converting some omap1, ep93xx or footbridge machines over in the future. For the moment, just add a Kconfig dependency to hide these platforms completely when CONFIG_ATAGS is disabled, and reorder the priority of the options: Rather than offering to turn ATAGS off for platforms that have DT support, make it a top-level setting that determines which platforms are visible. The s3c24xx platform supports one machine with DT support, but it cannot be built without also including ATAGS support, and the entire platform is scheduled for removal, so leaving the entire platform behind a dependency seems good enough. All defconfig files should keep working, as the option remains default enabled. Signed-off-by: Arnd Bergmann arch/arm/Kconfig | 5 ++++- arch/arm/mach-cns3xxx/Kconfig | 1 + arch/arm/mach-dove/Kconfig | 1 + arch/arm/mach-ep93xx/Kconfig | 1 + arch/arm/mach-iop32x/Kconfig | 1 + arch/arm/mach-mv78xx0/Kconfig | 1 + arch/arm/mach-omap1/Kconfig | 1 + arch/arm/mach-s3c/Kconfig.s3c24xx | 2 +- 8 files changed, 11 insertions(+), 2 deletions(-) commit 77f349b7700f86c51895e36b19dbc5e7323a7dfb Author: Arnd Bergmann Date: Thu Jul 21 12:26:52 2022 +0200 ARM: defconfig: kill remnants of CONFIG_LEDS CONFIG_LEDS was replaced by CONFIG_NEW_LEDS over ten years ago with commit fa8bbb13ab49 ("ARM: use new LEDS CPU trigger stub to replace old one"), but some defconfig files still reference it. Replace it and its sub-options with the corresponding new versions. Some of these machines may not actually have a new-style LED driver, and I did not check them individually as most of the machines are going away soon anyway. Signed-off-by: Arnd Bergmann arch/arm/configs/assabet_defconfig | 6 ++++-- arch/arm/configs/cerfcube_defconfig | 6 ++++-- arch/arm/configs/footbridge_defconfig | 6 ++++-- arch/arm/configs/hackkit_defconfig | 6 ++++-- arch/arm/configs/lart_defconfig | 6 ++++-- arch/arm/configs/lubbock_defconfig | 6 ++++-- arch/arm/configs/mainstone_defconfig | 6 ++++-- arch/arm/configs/neponset_defconfig | 6 ++++-- arch/arm/configs/netwinder_defconfig | 6 ++++-- arch/arm/configs/omap1_defconfig | 1 - arch/arm/configs/pxa255-idp_defconfig | 6 ++++-- arch/arm/configs/simpad_defconfig | 3 ++- 12 files changed, 42 insertions(+), 22 deletions(-) commit 5746240f219b0967bb24f79b72c12fe82a5bd6df Author: Arnd Bergmann Date: Thu Jul 21 12:03:39 2022 +0200 ARM: defconfig: remove broken CONFIG_THUMB disables Since commit 1515b186c235 ("ARM: make configuration of userspace Thumb support an expert option"), CONFIG_THUMB cannot be disabled unless one turns on CONFIG_EXPERT first. This is probably for the better, so remove the statements that turn it off. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann arch/arm/configs/eseries_pxa_defconfig | 1 - arch/arm/configs/iop32x_defconfig | 1 - arch/arm/configs/ixp4xx_defconfig | 1 - arch/arm/configs/lpd270_defconfig | 1 - arch/arm/configs/lubbock_defconfig | 1 - arch/arm/configs/mainstone_defconfig | 1 - arch/arm/configs/omap1_defconfig | 1 - arch/arm/configs/pxa255-idp_defconfig | 1 - 8 files changed, 8 deletions(-) commit ddd366bf01de51576d34be6a8652a3fec248f427 Author: Arnd Bergmann Date: Wed Jul 20 15:55:28 2022 +0200 ARM: defconfig: address renamed CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO is now implicitly selected if one picks one of the explicit options that could be DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT, DEBUG_INFO_DWARF4, DEBUG_INFO_DWARF5. This was actually not what I had in mind when I suggested making it a 'choice' statement, but it's too late to change again now, and the Kconfig logic is more sensible in the new form. Change any defconfig file that had CONFIG_DEBUG_INFO enabled but did not pick DWARF4 or DWARF5 explicitly to now pick the toolchain default. Fixes: f9b3cd245784 ("Kconfig.debug: make DEBUG_INFO selectable from a choice") Acked-by: Sudeep Holla Acked-by: Gregory CLEMENT Signed-off-by: Arnd Bergmann arch/arm/configs/aspeed_g4_defconfig | 1 - arch/arm/configs/aspeed_g5_defconfig | 1 - arch/arm/configs/axm55xx_defconfig | 2 +- arch/arm/configs/badge4_defconfig | 2 +- arch/arm/configs/bcm2835_defconfig | 2 +- arch/arm/configs/colibri_pxa270_defconfig | 2 +- arch/arm/configs/colibri_pxa300_defconfig | 2 +- arch/arm/configs/dove_defconfig | 2 +- arch/arm/configs/exynos_defconfig | 2 +- arch/arm/configs/keystone_defconfig | 2 +- arch/arm/configs/lpc18xx_defconfig | 2 +- arch/arm/configs/lpc32xx_defconfig | 2 +- arch/arm/configs/lpd270_defconfig | 2 +- arch/arm/configs/lubbock_defconfig | 2 +- arch/arm/configs/mainstone_defconfig | 2 +- arch/arm/configs/mini2440_defconfig | 2 +- arch/arm/configs/mmp2_defconfig | 2 +- arch/arm/configs/moxart_defconfig | 2 +- arch/arm/configs/mps2_defconfig | 2 +- arch/arm/configs/multi_v5_defconfig | 2 +- arch/arm/configs/mv78xx0_defconfig | 2 +- arch/arm/configs/mvebu_v5_defconfig | 2 +- arch/arm/configs/mvebu_v7_defconfig | 2 +- arch/arm/configs/mxs_defconfig | 2 +- arch/arm/configs/nhk8815_defconfig | 2 +- arch/arm/configs/omap1_defconfig | 2 +- arch/arm/configs/omap2plus_defconfig | 1 - arch/arm/configs/orion5x_defconfig | 2 +- arch/arm/configs/pxa168_defconfig | 2 +- arch/arm/configs/pxa255-idp_defconfig | 2 +- arch/arm/configs/pxa910_defconfig | 2 +- arch/arm/configs/pxa_defconfig | 2 +- arch/arm/configs/qcom_defconfig | 2 +- arch/arm/configs/s3c2410_defconfig | 2 +- arch/arm/configs/s3c6400_defconfig | 2 +- arch/arm/configs/s5pv210_defconfig | 2 +- arch/arm/configs/socfpga_defconfig | 2 +- arch/arm/configs/spear13xx_defconfig | 2 +- arch/arm/configs/spear3xx_defconfig | 2 +- arch/arm/configs/spear6xx_defconfig | 2 +- arch/arm/configs/stm32_defconfig | 2 +- arch/arm/configs/tegra_defconfig | 2 +- arch/arm/configs/vexpress_defconfig | 2 +- arch/arm64/configs/defconfig | 2 +- 44 files changed, 41 insertions(+), 44 deletions(-) commit 186d24bff277c33b23d3ea6133d2d12ae769ec3c Author: Arnd Bergmann Date: Wed Jul 20 15:49:05 2022 +0200 ARM: defconfig: remove stale CONFIG_ZBOOT_ROM entries The default is always 0x0 after commit 39c3e304567a ("ARM: 8984/1: Kconfig: set default ZBOOT_ROM_TEXT/BSS value to 0x0"), so any defconfig file that has these two lines can now drop them to reduce the diff against the 'make savedefconfig' version. Reviewed-by: Krzysztof Kozlowski Acked-by: Sudeep Holla Acked-by: Gregory CLEMENT Signed-off-by: Arnd Bergmann arch/arm/configs/am200epdkit_defconfig | 2 -- arch/arm/configs/assabet_defconfig | 2 -- arch/arm/configs/axm55xx_defconfig | 2 -- arch/arm/configs/badge4_defconfig | 2 -- arch/arm/configs/cerfcube_defconfig | 2 -- arch/arm/configs/clps711x_defconfig | 2 -- arch/arm/configs/cm_x300_defconfig | 2 -- arch/arm/configs/cns3420vb_defconfig | 2 -- arch/arm/configs/collie_defconfig | 2 -- arch/arm/configs/corgi_defconfig | 2 -- arch/arm/configs/davinci_all_defconfig | 2 -- arch/arm/configs/dove_defconfig | 2 -- arch/arm/configs/ep93xx_defconfig | 2 -- arch/arm/configs/eseries_pxa_defconfig | 2 -- arch/arm/configs/exynos_defconfig | 2 -- arch/arm/configs/ezx_defconfig | 2 -- arch/arm/configs/footbridge_defconfig | 2 -- arch/arm/configs/h3600_defconfig | 2 -- arch/arm/configs/h5000_defconfig | 2 -- arch/arm/configs/hackkit_defconfig | 2 -- arch/arm/configs/imx_v4_v5_defconfig | 2 -- arch/arm/configs/iop32x_defconfig | 2 -- arch/arm/configs/jornada720_defconfig | 2 -- arch/arm/configs/lart_defconfig | 2 -- arch/arm/configs/lpc18xx_defconfig | 2 -- arch/arm/configs/lpc32xx_defconfig | 2 -- arch/arm/configs/lpd270_defconfig | 2 -- arch/arm/configs/lubbock_defconfig | 2 -- arch/arm/configs/magician_defconfig | 2 -- arch/arm/configs/mainstone_defconfig | 2 -- arch/arm/configs/mmp2_defconfig | 2 -- arch/arm/configs/mps2_defconfig | 2 -- arch/arm/configs/multi_v4t_defconfig | 2 -- arch/arm/configs/mv78xx0_defconfig | 2 -- arch/arm/configs/mvebu_v5_defconfig | 2 -- arch/arm/configs/netwinder_defconfig | 2 -- arch/arm/configs/omap1_defconfig | 2 -- arch/arm/configs/orion5x_defconfig | 2 -- arch/arm/configs/palmz72_defconfig | 2 -- arch/arm/configs/pcm027_defconfig | 2 -- arch/arm/configs/pleb_defconfig | 2 -- arch/arm/configs/pxa168_defconfig | 2 -- arch/arm/configs/pxa255-idp_defconfig | 2 -- arch/arm/configs/pxa3xx_defconfig | 2 -- arch/arm/configs/pxa910_defconfig | 2 -- arch/arm/configs/pxa_defconfig | 2 -- arch/arm/configs/rpc_defconfig | 2 -- arch/arm/configs/s3c2410_defconfig | 2 -- arch/arm/configs/shannon_defconfig | 2 -- arch/arm/configs/simpad_defconfig | 2 -- arch/arm/configs/socfpga_defconfig | 2 -- arch/arm/configs/spitz_defconfig | 2 -- arch/arm/configs/stm32_defconfig | 2 -- arch/arm/configs/tct_hammer_defconfig | 2 -- arch/arm/configs/vexpress_defconfig | 2 -- arch/arm/configs/viper_defconfig | 2 -- arch/arm/configs/xcep_defconfig | 2 -- arch/arm/configs/zeus_defconfig | 2 -- 58 files changed, 116 deletions(-) commit f0993936ff4589c55affed172ed20fb2b480683e Author: Arnd Bergmann Date: Wed Jul 20 15:45:59 2022 +0200 ARM: defconfig: remove irda remnants A couple of ARM defconfig files (and one for sh) still refer to the IRDA options that were removed in linux-4.14. Remove the entries as well now. Signed-off-by: Arnd Bergmann arch/arm/configs/assabet_defconfig | 3 --- arch/arm/configs/badge4_defconfig | 5 ----- arch/arm/configs/clps711x_defconfig | 2 -- arch/arm/configs/colibri_pxa270_defconfig | 7 ------- arch/arm/configs/corgi_defconfig | 5 ----- arch/arm/configs/eseries_pxa_defconfig | 7 ------- arch/arm/configs/footbridge_defconfig | 9 --------- arch/arm/configs/h3600_defconfig | 4 ---- arch/arm/configs/jornada720_defconfig | 4 ---- arch/arm/configs/lart_defconfig | 7 ------- arch/arm/configs/magician_defconfig | 9 --------- arch/arm/configs/pxa_defconfig | 10 ---------- arch/arm/configs/simpad_defconfig | 6 ------ arch/arm/configs/spitz_defconfig | 5 ----- arch/arm/configs/trizeps4_defconfig | 8 -------- arch/sh/configs/ecovec24_defconfig | 2 -- 16 files changed, 93 deletions(-) commit 2002f3968714e5426fa97399b24fac3db66a7f06 Author: Arnd Bergmann Date: Wed Jul 20 14:47:57 2022 +0200 ARM: refresh defconfig files A lot of Kconfig options have changed over the years, and we tend to not do a blind 'make defconfig' to refresh the files, to ensure we catch options that should not have gone away. I used some a bit of scripting to only rework the bits where an option moved around in any of the defconfig files, without also dropping any of the other lines, to make it clearer which options we no longer have. Reviewed-by: Krzysztof Kozlowski Acked-by: Nicolas Ferre Acked-by: Neil Armstrong Acked-by: Sudeep Holla Acked-by: Gregory CLEMENT Signed-off-by: Arnd Bergmann arch/arm/configs/am200epdkit_defconfig | 26 +++--- arch/arm/configs/aspeed_g4_defconfig | 16 ++-- arch/arm/configs/aspeed_g5_defconfig | 16 ++-- arch/arm/configs/assabet_defconfig | 8 +- arch/arm/configs/at91_dt_defconfig | 10 +-- arch/arm/configs/axm55xx_defconfig | 22 +++--- arch/arm/configs/badge4_defconfig | 8 +- arch/arm/configs/bcm2835_defconfig | 36 ++++----- arch/arm/configs/cerfcube_defconfig | 16 ++-- arch/arm/configs/clps711x_defconfig | 2 +- arch/arm/configs/cm_x300_defconfig | 26 +++--- arch/arm/configs/cns3420vb_defconfig | 18 ++--- arch/arm/configs/colibri_pxa270_defconfig | 32 ++++---- arch/arm/configs/colibri_pxa300_defconfig | 10 +-- arch/arm/configs/collie_defconfig | 20 ++--- arch/arm/configs/corgi_defconfig | 44 +++++------ arch/arm/configs/davinci_all_defconfig | 26 +++--- arch/arm/configs/dove_defconfig | 28 +++---- arch/arm/configs/ep93xx_defconfig | 16 ++-- arch/arm/configs/eseries_pxa_defconfig | 26 +++--- arch/arm/configs/exynos_defconfig | 20 ++--- arch/arm/configs/ezx_defconfig | 72 ++++++++--------- arch/arm/configs/footbridge_defconfig | 14 ++-- arch/arm/configs/h3600_defconfig | 10 +-- arch/arm/configs/h5000_defconfig | 18 ++--- arch/arm/configs/hackkit_defconfig | 4 +- arch/arm/configs/hisi_defconfig | 24 +++--- arch/arm/configs/imx_v4_v5_defconfig | 8 +- arch/arm/configs/imx_v6_v7_defconfig | 8 +- arch/arm/configs/integrator_defconfig | 2 +- arch/arm/configs/iop32x_defconfig | 20 ++--- arch/arm/configs/jornada720_defconfig | 10 +-- arch/arm/configs/keystone_defconfig | 62 +++++++-------- arch/arm/configs/lart_defconfig | 6 +- arch/arm/configs/lpc18xx_defconfig | 12 +-- arch/arm/configs/lpc32xx_defconfig | 8 +- arch/arm/configs/lpd270_defconfig | 6 +- arch/arm/configs/lubbock_defconfig | 10 +-- arch/arm/configs/magician_defconfig | 30 +++---- arch/arm/configs/mainstone_defconfig | 4 +- arch/arm/configs/milbeaut_m10v_defconfig | 6 +- arch/arm/configs/mini2440_defconfig | 6 +- arch/arm/configs/mmp2_defconfig | 28 +++---- arch/arm/configs/moxart_defconfig | 18 ++--- arch/arm/configs/mps2_defconfig | 14 ++-- arch/arm/configs/multi_v4t_defconfig | 4 +- arch/arm/configs/multi_v5_defconfig | 12 +-- arch/arm/configs/multi_v7_defconfig | 62 +++++++-------- arch/arm/configs/mv78xx0_defconfig | 32 ++++---- arch/arm/configs/mvebu_v5_defconfig | 28 +++---- arch/arm/configs/mvebu_v7_defconfig | 2 +- arch/arm/configs/mxs_defconfig | 4 +- arch/arm/configs/neponset_defconfig | 24 +++--- arch/arm/configs/netwinder_defconfig | 10 +-- arch/arm/configs/nhk8815_defconfig | 6 +- arch/arm/configs/omap1_defconfig | 74 +++++++++--------- arch/arm/configs/omap2plus_defconfig | 16 ++-- arch/arm/configs/orion5x_defconfig | 32 ++++---- arch/arm/configs/oxnas_v6_defconfig | 14 ++-- arch/arm/configs/palmz72_defconfig | 14 ++-- arch/arm/configs/pcm027_defconfig | 22 +++--- arch/arm/configs/pleb_defconfig | 6 +- arch/arm/configs/pxa168_defconfig | 18 ++--- arch/arm/configs/pxa255-idp_defconfig | 10 +-- arch/arm/configs/pxa3xx_defconfig | 18 ++--- arch/arm/configs/pxa910_defconfig | 22 +++--- arch/arm/configs/pxa_defconfig | 126 +++++++++++++++--------------- arch/arm/configs/qcom_defconfig | 60 +++++++------- arch/arm/configs/realview_defconfig | 8 +- arch/arm/configs/rpc_defconfig | 18 ++--- arch/arm/configs/s3c2410_defconfig | 8 +- arch/arm/configs/s3c6400_defconfig | 2 +- arch/arm/configs/s5pv210_defconfig | 4 +- arch/arm/configs/sama5_defconfig | 8 +- arch/arm/configs/sama7_defconfig | 8 +- arch/arm/configs/shannon_defconfig | 8 +- arch/arm/configs/simpad_defconfig | 18 ++--- arch/arm/configs/socfpga_defconfig | 4 +- arch/arm/configs/spear13xx_defconfig | 16 ++-- arch/arm/configs/spear3xx_defconfig | 10 +-- arch/arm/configs/spear6xx_defconfig | 8 +- arch/arm/configs/spitz_defconfig | 44 +++++------ arch/arm/configs/stm32_defconfig | 14 ++-- arch/arm/configs/sunxi_defconfig | 2 +- arch/arm/configs/tct_hammer_defconfig | 12 +-- arch/arm/configs/tegra_defconfig | 18 ++--- arch/arm/configs/trizeps4_defconfig | 58 +++++++------- arch/arm/configs/u8500_defconfig | 2 +- arch/arm/configs/versatile_defconfig | 4 +- arch/arm/configs/vexpress_defconfig | 4 +- arch/arm/configs/vf610m4_defconfig | 2 +- arch/arm/configs/viper_defconfig | 28 +++---- arch/arm/configs/vt8500_v6_v7_defconfig | 2 +- arch/arm/configs/xcep_defconfig | 30 +++---- arch/arm/configs/zeus_defconfig | 26 +++--- 95 files changed, 904 insertions(+), 904 deletions(-) commit 8d56c48354fca4e7980e6014d2021ebccd2ce581 Author: Horatiu Vultur Date: Tue Jul 19 22:11:57 2022 +0200 ARM: dts: lan966x: Disable can0 on pcb8291 On pcb8291, can0 and the network driver share some of the GPIOs so only 1 device can be active. Therefore disable can0 as we want to enable the network driver. Signed-off-by: Horatiu Vultur Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220719201158.1696168-3-horatiu.vultur@microchip.com arch/arm/boot/dts/lan966x-pcb8291.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85e4739f88296321924f20aa5ab36c1e04f3da6a Author: Horatiu Vultur Date: Tue Jul 19 22:11:56 2022 +0200 ARM: dts: lan966x: Add gpio-restart The pcb8291 can be rebooted by toggling the GPIO 56. Therefore enable this in DT. Signed-off-by: Horatiu Vultur Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220719201158.1696168-2-horatiu.vultur@microchip.com arch/arm/boot/dts/lan966x-pcb8291.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 9d2bb9a74b2877f100637d6ab5685bcd33c69d44 Author: Ignat Korchagin Date: Sun Jul 17 14:37:46 2022 +0100 crypto: testmgr - some more fixes to RSA test vectors Two more fixes: * some test vectors in commit 79e6e2f3f3ff ("crypto: testmgr - populate RSA CRT parameters in RSA test vectors") had misplaced commas, which break the test and trigger KASAN warnings at least on x86-64 * pkcs1pad test vector did not have its CRT parameters Fixes: 79e6e2f3f3ff ("crypto: testmgr - populate RSA CRT parameters in RSA test vectors") Reported-by: Eric Biggers Signed-off-by: Ignat Korchagin Signed-off-by: Herbert Xu crypto/testmgr.h | 102 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 63 insertions(+), 39 deletions(-) commit 647c952eac5d27569365e9407c96db3c6915e08f Author: shaom Deng Date: Sun Jul 17 00:56:33 2022 +0800 cyrpto: powerpc/aes - delete the rebundant word "block" in comments there is rebundant word "block" in comments, so remove it Signed-off-by: shaom Deng Signed-off-by: Herbert Xu arch/powerpc/crypto/aes-spe-glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85796a9b7583a0b00ee9e69b932daafb41515a76 Author: Jason Wang Date: Fri Jul 15 13:40:50 2022 +0800 hwrng: via - Fix comment typo The double `close' is duplicated in line 148, remove one. Signed-off-by: Jason Wang Signed-off-by: Herbert Xu drivers/char/hw_random/via-rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 824b94a88320eaa5e3e059b494e457ed25987a63 Author: Jason Wang Date: Fri Jul 15 12:50:07 2022 +0800 crypto: twofish - Fix comment typo The double `that' is duplicated in line 301, remove one. Signed-off-by: Jason Wang Signed-off-by: Herbert Xu crypto/twofish_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cbdecd02fd29eb69a376ffdac47aff441c4d19f Author: Randy Dunlap Date: Thu Jul 14 18:59:14 2022 -0700 crypto: rmd160 - fix Kconfig "its" grammar Use the possessive "its" instead of the contraction "it's" where appropriate. Signed-off-by: Randy Dunlap Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Herbert Xu crypto/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 693b8755e1b1dd3c0bc22920a8bf2bd495688909 Author: Uwe Kleine-König Date: Thu Jul 14 23:28:20 2022 +0200 crypto: keembay-ocs-ecc - Drop if with an always false condition The remove callback is only called after probe completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so ecc_dev is never NULL. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu drivers/crypto/keembay/keembay-ocs-ecc.c | 2 -- 1 file changed, 2 deletions(-) commit 1b466b8cbfd8321408bb0792b241a2b9222aed62 Author: Bagas Sanjaya Date: Wed Jul 13 15:56:28 2022 +0700 Documentation: qat: rewrite description The sysfs description contains redundancy on returned and allowed values list, due to the described sysfs is read-write. Rewrite. Acked-by: Giovanni Cabiddu Cc: Adam Guerin Cc: Tomasz Kowallik Cc: Giovanni Cabiddu Cc: Wojciech Ziemba Cc: Fiona Trahe Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Bagas Sanjaya Signed-off-by: Herbert Xu Documentation/ABI/testing/sysfs-driver-qat | 38 ++++++++++-------------------- 1 file changed, 13 insertions(+), 25 deletions(-) commit 19cdbdb7cda0cb4948dfaab613d8b4f63c88a53e Author: Bagas Sanjaya Date: Wed Jul 13 15:56:27 2022 +0700 Documentation: qat: Use code block for qat sysfs example kernel test robot and Stephen Rothwell reported htmldocs warning: Documentation/ABI/testing/sysfs-driver-qat:24: WARNING: Unexpected indentation. The warning isn't caused by Date: field pointed by the warning, but rather by sysfs example that isn't in literal code block. Add the code block marker. Link: https://lore.kernel.org/linux-next/20220711204932.333379b4@canb.auug.org.au/ Link: https://lore.kernel.org/linux-doc/202207090803.TEGI95qw-lkp@intel.com/ Reported-by: kernel test robot Reported-by: Stephen Rothwell Fixes: d4cfb144f60551 ("crypto: qat - expose device config through sysfs for 4xxx") Acked-by: Giovanni Cabiddu Cc: Wojciech Ziemba Cc: Adam Guerin Cc: Fiona Trahe Cc: Herbert Xu Cc: Vladis Dronov Cc: Tomasz Kowallik Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Bagas Sanjaya Acked-by: Vladis Dronov Signed-off-by: Herbert Xu Documentation/ABI/testing/sysfs-driver-qat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3fcbf1c77d089fcf0331fd8f3cbbe6c436a3edbd Author: Sudeep Holla Date: Wed Jul 20 13:55:40 2022 +0100 arch_topology: Fix cache attributes detection in the CPU hotplug path init_cpu_topology() is called only once at the boot and all the cache attributes are detected early for all the possible CPUs. However when the CPUs are hotplugged out, the cacheinfo gets removed. While the attributes are added back when the CPUs are hotplugged back in as part of CPU hotplug state machine, it ends up called quite late after the update_siblings_masks() are called in the secondary_start_kernel() resulting in wrong llc_sibling_masks. Move the call to detect_cache_attributes() inside update_siblings_masks() to ensure the cacheinfo is updated before the LLC sibling masks are updated. This will fix the incorrect LLC sibling masks generated when the CPUs are hotplugged out and hotplugged back in again. Reported-by: Ionela Voinescu Tested-by: Geert Uytterhoeven Tested-by: Ionela Voinescu Reviewed-by: Conor Dooley Reviewed-by: Ionela Voinescu Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20220720-arch_topo_fixes-v3-3-43d696288e84@arm.com Signed-off-by: Greg Kroah-Hartman drivers/base/arch_topology.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 0c80f9e165f8f9cca743d7b6cbdb54362da297e0 Author: Sudeep Holla Date: Wed Jul 20 13:55:39 2022 +0100 ACPI: PPTT: Leave the table mapped for the runtime usage Currently, everytime an information needs to be fetched from the PPTT, the table is mapped via acpi_get_table() and unmapped after the use via acpi_put_table() which is fine. However we do this at runtime especially when the CPU is hotplugged out and plugged in back since we re-populate the cache topology and other information. However, with the support to fetch LLC information from the PPTT in the cpuhotplug path which is executed in the atomic context, it is preferred to avoid mapping and unmapping of the PPTT for every single use as the acpi_get_table() might sleep waiting for a mutex. In order to avoid the same, the table is needs to just mapped once on the boot CPU and is never unmapped allowing it to be used at runtime with out the hassle of mapping and unmapping the table. Reported-by: Guenter Roeck Cc: Rafael J. Wysocki Signed-off-by: Sudeep Holla -- Hi Rafael, Sorry to bother you again on this PPTT changes. Guenter reported an issue with lockdep enabled in -next that include my cacheinfo/arch_topology changes to utilise LLC from PPTT in the CPU hotplug path. Please ack the change once you are happy so that I can get it merged with other fixes via Greg's tree. Regards, Sudeep Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20220720-arch_topo_fixes-v3-2-43d696288e84@arm.com Signed-off-by: Greg Kroah-Hartman drivers/acpi/pptt.c | 102 ++++++++++++++++++++++++---------------------------- 1 file changed, 47 insertions(+), 55 deletions(-) commit 11969d698f8cda31bd176ec346833ef97ea7c67e Author: Sudeep Holla Date: Wed Jul 20 13:55:38 2022 +0100 cacheinfo: Use atomic allocation for percpu cache attributes On couple of architectures like RISC-V and ARM64, we need to detect cache attribues quite early during the boot when the secondary CPUs start. So we will call detect_cache_attributes in the atomic context and since use of normal allocation can sleep, we will end up getting "sleeping in the atomic context" bug splat. In order avoid that, move the allocation to use atomic version in preparation to move the actual detection of cache attributes in the CPU hotplug path which is atomic. Cc: Ionela Voinescu Tested-by: Conor Dooley Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20220720-arch_topo_fixes-v3-1-43d696288e84@arm.com Signed-off-by: Greg Kroah-Hartman drivers/base/cacheinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a852fbed2605a0b0b09164f28f305eab3036875 Merge: fe5fc9873af0 180c6cb6b9b7 Author: Greg Kroah-Hartman Date: Fri Jul 22 10:01:53 2022 +0200 Merge tag 'iio-for-5.20b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: 2nd set of IIO new device support, cleanup etc for 5.20 Given the slight delay in the likely start of the merge cycle lets get a few more things in for IIO. A few late breaking fixes also included. Bulk in number of patches is mechanical conversion to new PM macros. New device support * npcm - Add support for NPCM8XX with different resolution and voltage references from previously supported parts. Tree wide * pm_ptr()/pm_sleep_ptr()/DEFINE_[SIMPLE/RUNTIME]_DEV_PM_OPS() conversions - Convert all the low hanging fruit to the new macros. The remaining cases will need more careful consideration. Tidy-up, fixes and minor features. * Documentation - Fix duplicate ABI definitions and a missing blank line to squash all remaining docs build issues in IIO. * core - Make iio_format_avail_range() handle non IIO_VAL_INT cases. * core/trigger - Move the setup of trigger->owner to allocation rather than registration. There doesn't seem to be any advantage in doing this late and a few bugs have occurred because of mis-balanced module reference counting. - coding style fix-ups. * tests - Allow kunit tests to be built as a module. * ad7949 - Fix a reversed error message. * cio-dac - Use structures for register map to improve readability. * cros_ec - Register fifo callback only after the sensor is registered. Closes a theoretical race. * hmc5843 - Duplicate word fix. * isl29028 - Fix mixed devm_ and non devm_ for iio_device_register(). * max1027 - Fix missing unlocks in error paths. * rm3100 - Let core code handle setting INDIO_BUFFER_TRIGGERED. * sca3000 - Fix ordering and buffer size issue. * sx_common - Don't use the IIO device to get device properties when the parent struct device is readily available. - Allow the IIO core to connect up the firmware node. * stx104 - Use structures for register map to improve readability. * vf610-adc - Add compatible entries for imx6ul and imx6sx with fallback to fsl,vf610-adc. * tag 'iio-for-5.20b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (65 commits) dt-bindings: iio: adc: Add compatible for MT8188 iio: light: isl29028: Fix the warning in isl29028_remove() iio: accel: sca3300: Extend the trigger buffer from 16 to 32 bytes iio: fix iio_format_avail_range() printing for none IIO_VAL_INT iio: adc: max1027: unlock on error path in max1027_read_single_value() iio: proximity: sx9324: add empty line in front of bullet list iio: magnetometer: hmc5843: Remove duplicate 'the' iio: magn: yas530: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: magnetometer: ak8974: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: light: veml6030: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: light: vcnl4035: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: light: vcnl4000: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: light: tsl2591: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() iio: light: tsl2583: Use DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr() iio: light: isl29028: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() iio: light: gp2ap002: Switch to DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr() iio: adc: imx8qxp: Switch to DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr() iio: light: us5182: Switch from CONFIG_PM guards to pm_ptr() etc iio: temperature: ltc2983: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() iio: proximity: cros_ec_mkbp: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() ... commit 84f2a3c182d545261c36f94510134f5e9fb918f5 Author: shaomin Deng Date: Thu Jul 21 11:55:17 2022 -0400 ALSA: asihpi: Fix typo in comments Delete the repeated word "in" in comments. Signed-off-by: shaomin Deng Link: https://lore.kernel.org/r/20220721155517.2438-1-dengshaomin@cdjrlc.com Signed-off-by: Takashi Iwai sound/pci/asihpi/hpi6205.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48d8bd769fb7e2272beb92a75518d4d6f98b4ccc Author: shaomin Deng Date: Thu Jul 21 11:05:28 2022 -0400 ALSA: emu10k1: Fix typo in comments Remove the rebundant word "in" in comments. Signed-off-by: shaomin Deng Link: https://lore.kernel.org/r/20220721150528.22099-1-dengshaomin@cdjrlc.com Signed-off-by: Takashi Iwai sound/pci/emu10k1/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0a2d10aad65afb1558d7b8ad5770dff75493d45 Author: William Breathitt Gray Date: Thu Jul 21 11:25:08 2022 -0400 MAINTAINERS: Update Intel 8255 GPIO driver file list The drivers/gpio/gpio-i8255.h header file is also maintained. Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit a4850b5590d01bf3fb19fda3fc5d433f7382a974 Merge: 8031d87aa995 f5ecfee94493 Author: Paolo Bonzini Date: Fri Jul 22 03:14:32 2022 -0400 Merge tag 'kvm-s390-next-5.20-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390x: Fixes and features for 5.20 * First part of deferred teardown * CPU Topology * interpretive execution for PCI instructions * PV attestation * Minor fixes commit ae4ccaed3a063652ec5b81efec2ad57a4ee506e5 Author: Rob Herring Date: Wed Jul 6 15:19:33 2022 -0600 dt-bindings: mfd: stm32-timers: Move fixed string node names under 'properties' Fixed string node names should be under 'properties' rather than 'patternProperties'. Additionally, without beginning and end of line anchors, any prefix or suffix is allowed on the specified node name. Move the stm32 timers 'counter' and 'timer' nodes to the 'properties' section. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Reviewed-by: Fabrice Gasnier Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220706211934.567432-1-robh@kernel.org .../devicetree/bindings/mfd/st,stm32-lptimer.yaml | 28 +++++++++++----------- .../devicetree/bindings/mfd/st,stm32-timers.yaml | 20 ++++++++-------- 2 files changed, 24 insertions(+), 24 deletions(-) commit 417c1c1963549e9a48b83ada59d90258e38c6594 Merge: cb6b81b21bd9 17cd10a44a89 Author: Dave Airlie Date: Fri Jul 22 15:51:26 2022 +1000 Merge tag 'drm-intel-gt-next-2022-07-13' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Driver uAPI changes: - All related to the Small BAR support: (and all by Matt Auld) * add probed_cpu_visible_size * expose the avail memory region tracking * apply ALLOC_GPU only by default * add NEEDS_CPU_ACCESS hint * tweak error capture on recoverable contexts Driver highlights: - Add Small BAR support (Matt) - Add MeteorLake support (RK) - Add support for LMEM PCIe resizable BAR (Akeem) Driver important fixes: - ttm related fixes (Matt Auld) - Fix a performance regression related to waitboost (Chris) - Fix GT resets (Chris) Driver others: - Adding GuC SLPC selftest (Vinay) - Fix ADL-N GuC load (Daniele) - Add platform workaround (Gustavo, Matt Roper) - DG2 and ATS-M device ID updates (Matt Roper) - Add VM_BIND doc rfc with uAPI documentation (Niranjana) - Fix user-after-free in vma destruction (Thomas) - Async flush of GuC log regions (Alan) - Fixes in selftests (Chris, Dan, Andrzej) - Convert to drm_dbg (Umesh) - Disable OA sseu config param for newer hardware (Umesh) - Multi-cast register steering changes (Matt Roper) - Add lmem_bar_size modparam (Priyanka) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Ys85pcMYLkqF/HtB@intel.com commit ac7ac432a67eb5410be32a3bef0fb393058af537 Merge: 5cb62b7598f2 e3fa4735f04d Author: Alexei Starovoitov Date: Thu Jul 21 20:59:43 2022 -0700 Merge branch 'New nf_conntrack kfuncs for insertion, changing timeout, status' Kumar Kartikeya Dwivedi says: ==================== Introduce the following new kfuncs: - bpf_{xdp,skb}_ct_alloc - bpf_ct_insert_entry - bpf_ct_{set,change}_timeout - bpf_ct_{set,change}_status The setting of timeout and status on allocated or inserted/looked up CT is same as the ctnetlink interface, hence code is refactored and shared with the kfuncs. It is ensured allocated CT cannot be passed to kfuncs that expected inserted CT, and vice versa. Please see individual patches for details. Changelog: ---------- v6 -> v7: v6: https://lore.kernel.org/bpf/20220719132430.19993-1-memxor@gmail.com * Use .long to encode flags (Alexei) * Fix description of KF_RET_NULL in documentation (Toke) v5 -> v6: v5: https://lore.kernel.org/bpf/20220623192637.3866852-1-memxor@gmail.com * Introduce kfunc flags, rework verifier to work with them * Add documentation for kfuncs * Add comment explaining TRUSTED_ARGS kfunc flag (Alexei) * Fix missing offset check for trusted arguments (Alexei) * Change nf_conntrack test minimum delta value to 8 v4 -> v5: v4: https://lore.kernel.org/bpf/cover.1653600577.git.lorenzo@kernel.org * Drop read-only PTR_TO_BTF_ID approach, use struct nf_conn___init (Alexei) * Drop acquire release pair code that is no longer required (Alexei) * Disable writes into nf_conn, use dedicated helpers (Florian, Alexei) * Refactor and share ctnetlink code for setting timeout and status * Do strict type matching on finding __ref suffix on argument to prevent passing nf_conn___init as nf_conn (offset = 0, match on walk) * Remove bpf_ct_opts parameter from bpf_ct_insert_entry * Update selftests for new additions, add more negative tests v3 -> v4: v3: https://lore.kernel.org/bpf/cover.1652870182.git.lorenzo@kernel.org * split bpf_xdp_ct_add in bpf_xdp_ct_alloc/bpf_skb_ct_alloc and bpf_ct_insert_entry * add verifier code to properly populate/configure ct entry * improve selftests v2 -> v3: v2: https://lore.kernel.org/bpf/cover.1652372970.git.lorenzo@kernel.org * add bpf_xdp_ct_add and bpf_ct_refresh_timeout kfunc helpers * remove conntrack dependency from selftests * add support for forcing kfunc args to be referenced and related selftests v1 -> v2: v1: https://lore.kernel.org/bpf/1327f8f5696ff2bc60400e8f3b79047914ccc837.1651595019.git.lorenzo@kernel.org * add bpf_ct_refresh_timeout kfunc selftest Kumar Kartikeya Dwivedi (10): bpf: Introduce 8-byte BTF set tools/resolve_btfids: Add support for 8-byte BTF sets bpf: Switch to new kfunc flags infrastructure bpf: Add support for forcing kfunc args to be trusted bpf: Add documentation for kfuncs net: netfilter: Deduplicate code in bpf_{xdp,skb}_ct_lookup net: netfilter: Add kfuncs to set and change CT timeout selftests/bpf: Add verifier tests for trusted kfunc args selftests/bpf: Add negative tests for new nf_conntrack kfuncs selftests/bpf: Fix test_verifier failed test in unprivileged mode ==================== Signed-off-by: Alexei Starovoitov commit e3fa4735f04dcebd49c78544eb6c363efdd6385f Author: Kumar Kartikeya Dwivedi Date: Thu Jul 21 15:42:45 2022 +0200 selftests/bpf: Fix test_verifier failed test in unprivileged mode Loading the BTF won't be permitted without privileges, hence only test for privileged mode by setting the prog type. This makes the test_verifier show 0 failures when unprivileged BPF is enabled. Fixes: 41188e9e9def ("selftest/bpf: Test for use-after-free bug fix in inline_bpf_loop") Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20220721134245.2450-14-memxor@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/verifier/bpf_loop_inline.c | 1 + 1 file changed, 1 insertion(+) commit c6f420ac9d251f694d030ed4ea43262f3f3ef39e Author: Kumar Kartikeya Dwivedi Date: Thu Jul 21 15:42:44 2022 +0200 selftests/bpf: Add negative tests for new nf_conntrack kfuncs Test cases we care about and ensure improper usage is caught and rejected by the verifier. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20220721134245.2450-13-memxor@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/bpf_nf.c | 56 ++++++++- .../testing/selftests/bpf/progs/test_bpf_nf_fail.c | 134 +++++++++++++++++++++ 2 files changed, 189 insertions(+), 1 deletion(-) commit 6eb7fba007a728e8701be11e93e9da40c95ffad3 Author: Lorenzo Bianconi Date: Thu Jul 21 15:42:43 2022 +0200 selftests/bpf: Add tests for new nf_conntrack kfuncs Introduce selftests for the following kfunc helpers: - bpf_xdp_ct_alloc - bpf_skb_ct_alloc - bpf_ct_insert_entry - bpf_ct_set_timeout - bpf_ct_change_timeout - bpf_ct_set_status - bpf_ct_change_status Signed-off-by: Lorenzo Bianconi Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20220721134245.2450-12-memxor@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/bpf_nf.c | 8 +++ tools/testing/selftests/bpf/progs/test_bpf_nf.c | 85 +++++++++++++++++++++---- 2 files changed, 81 insertions(+), 12 deletions(-) commit 8dd5e75683f713c155880c30ea545f2360c9bf46 Author: Kumar Kartikeya Dwivedi Date: Thu Jul 21 15:42:42 2022 +0200 selftests/bpf: Add verifier tests for trusted kfunc args Make sure verifier rejects the bad cases and ensure the good case keeps working. The selftests make use of the bpf_kfunc_call_test_ref kfunc added in the previous patch only for verification. Acked-by: Yonghong Song Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20220721134245.2450-11-memxor@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/verifier/calls.c | 53 ++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit ef69aa3a986ef94f01ce8b5b619f550db54432fe Author: Lorenzo Bianconi Date: Thu Jul 21 15:42:41 2022 +0200 net: netfilter: Add kfuncs to set and change CT status Introduce bpf_ct_set_status and bpf_ct_change_status kfunc helpers in order to set nf_conn field of allocated entry or update nf_conn status field of existing inserted entry. Use nf_ct_change_status_common to share the permitted status field changes between netlink and BPF side by refactoring ctnetlink_change_status. It is required to introduce two kfuncs taking nf_conn___init and nf_conn instead of sharing one because KF_TRUSTED_ARGS flag causes strict type checking. This would disallow passing nf_conn___init to kfunc taking nf_conn, and vice versa. We cannot remove the KF_TRUSTED_ARGS flag as we only want to accept refcounted pointers and not e.g. ct->master. Hence, bpf_ct_set_* kfuncs are meant to be used on allocated CT, and bpf_ct_change_* kfuncs are meant to be used on inserted or looked up CT entry. Signed-off-by: Lorenzo Bianconi Co-developed-by: Kumar Kartikeya Dwivedi Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20220721134245.2450-10-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/net/netfilter/nf_conntrack_core.h | 2 ++ net/netfilter/nf_conntrack_bpf.c | 32 +++++++++++++++++++++++++ net/netfilter/nf_conntrack_core.c | 40 +++++++++++++++++++++++++++++++ net/netfilter/nf_conntrack_netlink.c | 39 ++---------------------------- 4 files changed, 76 insertions(+), 37 deletions(-) commit 0b3892364431684e883682b85d008979e08d4ce6 Author: Kumar Kartikeya Dwivedi Date: Thu Jul 21 15:42:40 2022 +0200 net: netfilter: Add kfuncs to set and change CT timeout Introduce bpf_ct_set_timeout and bpf_ct_change_timeout kfunc helpers in order to change nf_conn timeout. This is same as ctnetlink_change_timeout, hence code is shared between both by extracting it out to __nf_ct_change_timeout. It is also updated to return an error when it sees IPS_FIXED_TIMEOUT_BIT bit in ct->status, as that check was missing. It is required to introduce two kfuncs taking nf_conn___init and nf_conn instead of sharing one because KF_TRUSTED_ARGS flag causes strict type checking. This would disallow passing nf_conn___init to kfunc taking nf_conn, and vice versa. We cannot remove the KF_TRUSTED_ARGS flag as we only want to accept refcounted pointers and not e.g. ct->master. Apart from this, bpf_ct_set_timeout is only called for newly allocated CT so it doesn't need to inspect the status field just yet. Sharing the helpers even if it was possible would make timeout setting helper sensitive to order of setting status and timeout after allocation. Hence, bpf_ct_set_* kfuncs are meant to be used on allocated CT, and bpf_ct_change_* kfuncs are meant to be used on inserted or looked up CT entry. Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20220721134245.2450-9-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/net/netfilter/nf_conntrack_core.h | 2 ++ net/netfilter/nf_conntrack_bpf.c | 38 ++++++++++++++++++++++++++++--- net/netfilter/nf_conntrack_core.c | 22 ++++++++++++++++++ net/netfilter/nf_conntrack_netlink.c | 9 +------- 4 files changed, 60 insertions(+), 11 deletions(-) commit d7e79c97c00ca82dace0e3b645d4b3b02fa273c2 Author: Lorenzo Bianconi Date: Thu Jul 21 15:42:39 2022 +0200 net: netfilter: Add kfuncs to allocate and insert CT Introduce bpf_xdp_ct_alloc, bpf_skb_ct_alloc and bpf_ct_insert_entry kfuncs in order to insert a new entry from XDP and TC programs. Introduce bpf_nf_ct_tuple_parse utility routine to consolidate common code. We extract out a helper __nf_ct_set_timeout, used by the ctnetlink and nf_conntrack_bpf code, extract it out to nf_conntrack_core, so that nf_conntrack_bpf doesn't need a dependency on CONFIG_NF_CT_NETLINK. Later this helper will be reused as a helper to set timeout of allocated but not yet inserted CT entry. The allocation functions return struct nf_conn___init instead of nf_conn, to distinguish allocated CT from an already inserted or looked up CT. This is later used to enforce restrictions on what kfuncs allocated CT can be used with. Signed-off-by: Lorenzo Bianconi Co-developed-by: Kumar Kartikeya Dwivedi Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20220721134245.2450-8-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/net/netfilter/nf_conntrack_core.h | 15 +++ net/netfilter/nf_conntrack_bpf.c | 208 +++++++++++++++++++++++++++--- net/netfilter/nf_conntrack_netlink.c | 8 +- 3 files changed, 204 insertions(+), 27 deletions(-) commit aed8ee7feb44b6537af1e0b4f03365d42928be38 Author: Kumar Kartikeya Dwivedi Date: Thu Jul 21 15:42:38 2022 +0200 net: netfilter: Deduplicate code in bpf_{xdp,skb}_ct_lookup Move common checks inside the common function, and maintain the only difference the two being how to obtain the struct net * from ctx. No functional change intended. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20220721134245.2450-7-memxor@gmail.com Signed-off-by: Alexei Starovoitov net/netfilter/nf_conntrack_bpf.c | 52 ++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 34 deletions(-) commit 63e564ebd1fd91c7194266a2169ab5be984f08bc Author: Kumar Kartikeya Dwivedi Date: Thu Jul 21 15:42:37 2022 +0200 bpf: Add documentation for kfuncs As the usage of kfuncs grows, we are starting to form consensus on the kinds of attributes and annotations that kfuncs can have. To better help developers make sense of the various options available at their disposal to present an unstable API to the BPF users, document the various kfunc flags and annotations, their expected usage, and explain the process of defining and registering a kfunc set. Cc: KP Singh Cc: Jonathan Corbet Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20220721134245.2450-6-memxor@gmail.com Signed-off-by: Alexei Starovoitov Documentation/bpf/index.rst | 1 + Documentation/bpf/kfuncs.rst | 170 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 171 insertions(+) commit 56e948ffc098a780fefb6c1784a3a2c7b81100a1 Author: Kumar Kartikeya Dwivedi Date: Thu Jul 21 15:42:36 2022 +0200 bpf: Add support for forcing kfunc args to be trusted Teach the verifier to detect a new KF_TRUSTED_ARGS kfunc flag, which means each pointer argument must be trusted, which we define as a pointer that is referenced (has non-zero ref_obj_id) and also needs to have its offset unchanged, similar to how release functions expect their argument. This allows a kfunc to receive pointer arguments unchanged from the result of the acquire kfunc. This is required to ensure that kfunc that operate on some object only work on acquired pointers and not normal PTR_TO_BTF_ID with same type which can be obtained by pointer walking. The restrictions applied to release arguments also apply to trusted arguments. This implies that strict type matching (not deducing type by recursively following members at offset) and OBJ_RELEASE offset checks (ensuring they are zero) are used for trusted pointer arguments. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20220721134245.2450-5-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/btf.h | 32 ++++++++++++++++++++++++++++++++ kernel/bpf/btf.c | 17 ++++++++++++++--- net/bpf/test_run.c | 5 +++++ 3 files changed, 51 insertions(+), 3 deletions(-) commit a4703e3184320d6e15e2bc81d2ccf1c8c883f9d1 Author: Kumar Kartikeya Dwivedi Date: Thu Jul 21 15:42:35 2022 +0200 bpf: Switch to new kfunc flags infrastructure Instead of populating multiple sets to indicate some attribute and then researching the same BTF ID in them, prepare a single unified BTF set which indicates whether a kfunc is allowed to be called, and also its attributes if any at the same time. Now, only one call is needed to perform the lookup for both kfunc availability and its attributes. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20220721134245.2450-4-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 3 +- include/linux/btf.h | 33 ++----- kernel/bpf/btf.c | 106 ++++++++++----------- kernel/bpf/verifier.c | 14 ++- net/bpf/test_run.c | 70 +++++--------- net/ipv4/bpf_tcp_ca.c | 18 ++-- net/ipv4/tcp_bbr.c | 24 ++--- net/ipv4/tcp_cubic.c | 20 ++-- net/ipv4/tcp_dctcp.c | 20 ++-- net/netfilter/nf_conntrack_bpf.c | 49 +++------- .../selftests/bpf/bpf_testmod/bpf_testmod.c | 10 +- 11 files changed, 145 insertions(+), 222 deletions(-) commit ef2c6f370a637e6f84c813f31fe0ebb4ced2ed69 Author: Kumar Kartikeya Dwivedi Date: Thu Jul 21 15:42:34 2022 +0200 tools/resolve_btfids: Add support for 8-byte BTF sets A flag is a 4-byte symbol that may follow a BTF ID in a set8. This is used in the kernel to tag kfuncs in BTF sets with certain flags. Add support to adjust the sorting code so that it passes size as 8 bytes for 8-byte BTF sets. Cc: Jiri Olsa Signed-off-by: Kumar Kartikeya Dwivedi Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20220721134245.2450-3-memxor@gmail.com Signed-off-by: Alexei Starovoitov tools/bpf/resolve_btfids/main.c | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) commit ab21d6063c01180a8e9b22a37b847e5819525d9f Author: Kumar Kartikeya Dwivedi Date: Thu Jul 21 15:42:33 2022 +0200 bpf: Introduce 8-byte BTF set Introduce support for defining flags for kfuncs using a new set of macros, BTF_SET8_START/BTF_SET8_END, which define a set which contains 8 byte elements (each of which consists of a pair of BTF ID and flags), using a new BTF_ID_FLAGS macro. This will be used to tag kfuncs registered for a certain program type as acquire, release, sleepable, ret_null, etc. without having to create more and more sets which was proving to be an unscalable solution. Now, when looking up whether a kfunc is allowed for a certain program, we can also obtain its kfunc flags in the same call and avoid further lookups. The resolve_btfids change is split into a separate patch. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20220721134245.2450-2-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/btf_ids.h | 68 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 4 deletions(-) commit cb6b81b21bd9cf09d72b7fe711be1b55001eb166 Merge: 3cfb5bc94fab 6f2c8d5f1659 Author: Dave Airlie Date: Fri Jul 22 13:43:46 2022 +1000 Merge tag 'drm-misc-next-fixes-2022-07-21' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Short summary of fixes pull: * amdgpu: Fix for drm buddy memory corruption * nouveau: PM fixes; DP fixes Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/Ytj65+PdAJs4jIEO@linux-uq9g commit 3cfb5bc94fab39c456dccee75553f7f6c52ee7f7 Merge: 891ce1c9623f 676ad8e99703 Author: Dave Airlie Date: Fri Jul 22 13:18:13 2022 +1000 Merge tag 'du-next-20220707' of git://linuxtv.org/pinchartl/media into drm-next Miscellaneous R-Car DU fixes and enhancements Signed-off-by: Dave Airlie From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/YtIEWkE0nk/8nhUc@pendragon.ideasonboard.com commit b66eb3a6e427b059101c6c92ac2ddd899014634c Author: Jaehee Park Date: Wed Jul 20 14:36:32 2022 -0400 net: ipv6: avoid accepting values greater than 2 for accept_untracked_na The accept_untracked_na sysctl changed from a boolean to an integer when a new knob '2' was added. This patch provides a safeguard to avoid accepting values that are not defined in the sysctl. When setting a value greater than 2, the user will get an 'invalid argument' warning. Fixes: aaa5f515b16b ("net: ipv6: new accept_untracked_na option to accept na only if in-network") Signed-off-by: Jaehee Park Suggested-by: Nicolas Dichtel Suggested-by: Roopa Prabhu Reviewed-by: Nicolas Dichtel Link: https://lore.kernel.org/r/20220720183632.376138-1-jhpark1013@gmail.com Signed-off-by: Jakub Kicinski net/ipv6/addrconf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 842463f253abde9a0de19a4b9e83a6c28ac9364b Author: Jakub Kicinski Date: Wed Jul 20 13:37:01 2022 -0700 selftests: tls: add a test for timeo vs lock Add a test for recv timeout. Place it in the tls_err group, so it only runs for TLS 1.2 and 1.3 but not for every AEAD out there. Link: https://lore.kernel.org/r/20220720203701.2179034-2-kuba@kernel.org Signed-off-by: Jakub Kicinski tools/testing/selftests/net/tls.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit dde06aaa89b76275407b78108b57f94838287dab Author: Jakub Kicinski Date: Wed Jul 20 13:37:00 2022 -0700 tls: rx: release the sock lock on locking timeout Eric reports we should release the socket lock if the entire "grab reader lock" operation has failed. The callers assume they don't have to release it or otherwise unwind. Reported-by: Eric Dumazet Reported-by: syzbot+16e72110feb2b653ef27@syzkaller.appspotmail.com Fixes: 4cbc325ed6b4 ("tls: rx: allow only one reader at a time") Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20220720203701.2179034-1-kuba@kernel.org Signed-off-by: Jakub Kicinski net/tls/tls_sw.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit b945804d993072e24138741ab67e28f6b09b2502 Merge: 32d00f62db4e 9950f1121133 Author: Jakub Kicinski Date: Thu Jul 21 18:45:34 2022 -0700 Merge tag 'linux-can-next-for-5.20-20220721' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== can-next 2022-07-21 The patch is by Vincent Mailhol and fixes a use on an uninitialized variable in the pch_can driver (introduced in last pull request to net-next). * tag 'linux-can-next-for-5.20-20220721' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: can: pch_can: pch_can_error(): initialize errc before using it ==================== Link: https://lore.kernel.org/r/20220721163042.3448384-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 34bc7b454dc31f75a0be7ee8ab378135523d7c51 Merge: d38c8fe48354 1dcaa3b46226 Author: Paul E. McKenney Date: Thu Jul 21 17:46:18 2022 -0700 Merge branch 'ctxt.2022.07.05a' into HEAD ctxt.2022.07.05a: Linux-kernel memory model development branch. commit d38c8fe48354af9c7120291938574e1ebb221d52 Merge: 89f7f29140da a03ae49c4785 0578e14c945b 28787e04fb67 e72ee5e1a866 7bf336fb8dac Author: Paul E. McKenney Date: Thu Jul 21 17:43:16 2022 -0700 Merge branches 'doc.2022.06.21a', 'fixes.2022.07.19a', 'nocb.2022.07.19a', 'poll.2022.07.21a', 'rcu-tasks.2022.06.21a' and 'torture.2022.06.21a' into HEAD doc.2022.06.21a: Documentation updates. fixes.2022.07.19a: Miscellaneous fixes. nocb.2022.07.19a: Callback-offload updates. poll.2022.07.21a: Polled grace-period updates. rcu-tasks.2022.06.21a: Tasks RCU updates. torture.2022.06.21a: Torture-test updates. commit 28787e04fb67963673cbe6f77fb27137eba42718 Author: Zqiang Date: Wed May 18 19:43:10 2022 +0800 rcu: Add irqs-disabled indicator to expedited RCU CPU stall warnings If a CPU has interrupts disabled continuously starting before the beginning of a given expedited RCU grace period, that CPU will not execute that grace period's IPI handler. This will in turn mean that the ->cpu_no_qs.b.exp field in that CPU's rcu_data structure will continue to contain the boolean value false. Knowing whether or not a CPU has had interrupts disabled can be helpful when debugging an expedited RCU CPU stall warning, so this commit adds a "D" indicator expedited RCU CPU stall warnings that signifies that the corresponding CPU has had interrupts disabled throughout. This capability was tested as follows: runqemu kvm slirp nographic qemuparams="-m 4096 -smp 4" bootparams= "isolcpus=2,3 nohz_full=2,3 rcu_nocbs=2,3 rcutree.dump_tree=1 rcutorture.stall_cpu_holdoff=30 rcutorture.stall_cpu=40 rcutorture.stall_cpu_irqsoff=1 rcutorture.stall_cpu_block=0 rcutorture.stall_no_softlockup=1" -d The rcu_torture_stall() function ran on CPU 1, which displays the "D" as expected given the rcutorture.stall_cpu_irqsoff=1 module parameter: ............ rcu: INFO: rcu_preempt detected expedited stalls on CPUs/tasks: { 1-...D } 26467 jiffies s: 13317 root: 0x1/. rcu: blocking rcu_node structures (internal RCU debug): l=1:0-1:0x2/. Task dump for CPU 1: task:rcu_torture_sta state:R running task stack: 0 pid: 76 ppid: 2 flags:0x00004008 Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney kernel/rcu/tree_exp.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 82e445697d6a14d6b7462c13c613ebdd96468818 Author: Paul E. McKenney Date: Mon May 9 09:49:05 2022 -0700 rcu: Diagnose extended sync_rcu_do_polled_gp() loops This commit dumps out state when the sync_rcu_do_polled_gp() function loops more than expected. This is a debugging aid. Signed-off-by: Paul E. McKenney kernel/rcu/tree_exp.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ef4f9d9b9230fcf4fca9801f03c31d99ed06a716 Author: Zqiang Date: Fri Apr 22 21:15:18 2022 +0800 rcu: Put panic_on_rcu_stall() after expedited RCU CPU stall warnings When a normal RCU CPU stall warning is encountered with the panic_on_rcu_stall sysfs variable is set, the system panics only after the stall warning is printed. But when an expedited RCU CPU stall warning is encountered with the panic_on_rcu_stall sysfs variable is set, the system panics first, thus never printing the stall warning. This commit therefore brings the expedited stall warning into line with the normal stall warning by printing first and panicking afterwards. Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney kernel/rcu/tree_exp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11d62f0f43a35d7c62aabc06a99cd4691a47ccb4 Author: Paul E. McKenney Date: Tue Feb 1 07:01:20 2022 -0800 rcutorture: Test polled expedited grace-period primitives This commit adds tests of start_poll_synchronize_rcu_expedited() and poll_state_synchronize_rcu_expedited(). Link: https://lore.kernel.org/all/20220121142454.1994916-1-bfoster@redhat.com/ Link: https://docs.google.com/document/d/1RNKWW9jQyfjxw2E8dsXVTdvZYh0HnYeSHDKog9jhdN8/edit?usp=sharing Cc: Brian Foster Cc: Dave Chinner Cc: Al Viro Cc: Ian Kent Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 87 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 74 insertions(+), 13 deletions(-) commit d96c52fe4907c68adc5e61a0bef7aec0933223d5 Author: Paul E. McKenney Date: Fri Apr 15 10:55:42 2022 -0700 rcu: Add polled expedited grace-period primitives This commit adds expedited grace-period functionality to RCU's polled grace-period API, adding start_poll_synchronize_rcu_expedited() and cond_synchronize_rcu_expedited(), which are similar to the existing start_poll_synchronize_rcu() and cond_synchronize_rcu() functions, respectively. Note that although start_poll_synchronize_rcu_expedited() can be invoked very early, the resulting expedited grace periods are not guaranteed to start until after workqueues are fully initialized. On the other hand, both synchronize_rcu() and synchronize_rcu_expedited() can also be invoked very early, and the resulting grace periods will be taken into account as they occur. [ paulmck: Apply feedback from Neeraj Upadhyay. ] Link: https://lore.kernel.org/all/20220121142454.1994916-1-bfoster@redhat.com/ Link: https://docs.google.com/document/d/1RNKWW9jQyfjxw2E8dsXVTdvZYh0HnYeSHDKog9jhdN8/edit?usp=sharing Cc: Brian Foster Cc: Dave Chinner Cc: Al Viro Cc: Ian Kent Signed-off-by: Paul E. McKenney include/linux/rcutiny.h | 10 ++++++ include/linux/rcutree.h | 2 ++ kernel/rcu/tree.c | 17 +++++++--- kernel/rcu/tree.h | 7 ++++ kernel/rcu/tree_exp.h | 85 +++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 116 insertions(+), 5 deletions(-) commit e4333cb20f047d96485a9416a93ae4b2ec3b27dd Author: Paul E. McKenney Date: Thu Apr 14 09:09:11 2022 -0700 rcutorture: Verify that polled GP API sees synchronous grace periods This commit causes rcu_torture_writer() to use WARN_ON_ONCE() to check that the cookie returned by the current RCU flavor's ->get_gp_state() function (get_state_synchronize_rcu() for vanilla RCU) causes that flavor's ->poll_gp_state function (poll_state_synchronize_rcu() for vanilla RCU) to unconditionally return true. Note that a pair calls to synchronous grace-period-wait functions are used. This is necessary to account for partially overlapping normal and expedited grace periods aligning in just the wrong way with polled API invocations, which can cause those polled API invocations to ignore one or the other of those partially overlapping grace periods. It is unlikely that this sort of ignored grace period will be a problem in production, but rcutorture can make it happen quite within a few tens of seconds. This commit is in preparation for polled expedited grace periods. [ paulmck: Apply feedback from Frederic Weisbecker. ] Link: https://lore.kernel.org/all/20220121142454.1994916-1-bfoster@redhat.com/ Link: https://docs.google.com/document/d/1RNKWW9jQyfjxw2E8dsXVTdvZYh0HnYeSHDKog9jhdN8/edit?usp=sharing Cc: Brian Foster Cc: Dave Chinner Cc: Al Viro Cc: Ian Kent Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7f4535366f8f77b3ddbc79d4ba82df966c5c2aab Author: Paul E. McKenney Date: Thu Apr 14 11:49:58 2022 -0700 rcu: Make Tiny RCU grace periods visible to polled APIs This commit makes the Tiny RCU implementation of synchronize_rcu() increment the rcu_ctrlblk.gp_seq counter, thus making both synchronize_rcu() and synchronize_rcu_expedited() visible to get_state_synchronize_rcu() and friends. Link: https://lore.kernel.org/all/20220121142454.1994916-1-bfoster@redhat.com/ Link: https://docs.google.com/document/d/1RNKWW9jQyfjxw2E8dsXVTdvZYh0HnYeSHDKog9jhdN8/edit?usp=sharing Cc: Brian Foster Cc: Dave Chinner Cc: Al Viro Cc: Ian Kent Signed-off-by: Paul E. McKenney kernel/rcu/tiny.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit dd04140531b5d38b77ad9ff7b18117654be5bf5c Author: Paul E. McKenney Date: Thu Apr 14 06:56:35 2022 -0700 rcu: Make polled grace-period API account for expedited grace periods Currently, this code could splat: oldstate = get_state_synchronize_rcu(); synchronize_rcu_expedited(); WARN_ON_ONCE(!poll_state_synchronize_rcu(oldstate)); This situation is counter-intuitive and user-unfriendly. After all, there really was a perfectly valid full grace period right after the call to get_state_synchronize_rcu(), so why shouldn't poll_state_synchronize_rcu() know about it? This commit therefore makes the polled grace-period API aware of expedited grace periods in addition to the normal grace periods that it is already aware of. With this change, the above code is guaranteed not to splat. Please note that the above code can still splat due to counter wrap on the one hand and situations involving partially overlapping normal/expedited grace periods on the other. On 64-bit systems, the second is of course much more likely than the first. It is possible to modify this approach to prevent overlapping grace periods from causing splats, but only at the expense of greatly increasing the probability of counter wrap, as in within milliseconds on 32-bit systems and within minutes on 64-bit systems. This commit is in preparation for polled expedited grace periods. Link: https://lore.kernel.org/all/20220121142454.1994916-1-bfoster@redhat.com/ Link: https://docs.google.com/document/d/1RNKWW9jQyfjxw2E8dsXVTdvZYh0HnYeSHDKog9jhdN8/edit?usp=sharing Cc: Brian Foster Cc: Dave Chinner Cc: Al Viro Cc: Ian Kent Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 9 +++++---- kernel/rcu/tree.h | 1 + kernel/rcu/tree_exp.h | 16 ++++++++++++++-- 3 files changed, 20 insertions(+), 6 deletions(-) commit bf95b2bc3e42f11f4d7a5e8a98376c2b4a2aa82f Author: Paul E. McKenney Date: Wed Apr 13 17:46:15 2022 -0700 rcu: Switch polled grace-period APIs to ->gp_seq_polled This commit switches the existing polled grace-period APIs to use a new ->gp_seq_polled counter in the rcu_state structure. An additional ->gp_seq_polled_snap counter in that same structure allows the normal grace period kthread to interact properly with the !SMP !PREEMPT fastpath through synchronize_rcu(). The first of the two to note the end of a given grace period will make knowledge of this transition available to the polled API. This commit is in preparation for polled expedited grace periods. [ paulmck: Fix use of rcu_state.gp_seq_polled to start normal grace period. ] Link: https://lore.kernel.org/all/20220121142454.1994916-1-bfoster@redhat.com/ Link: https://docs.google.com/document/d/1RNKWW9jQyfjxw2E8dsXVTdvZYh0HnYeSHDKog9jhdN8/edit?usp=sharing Cc: Brian Foster Cc: Dave Chinner Cc: Al Viro Cc: Ian Kent Co-developed-by: Boqun Feng Signed-off-by: Boqun Feng Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- kernel/rcu/tree.h | 2 ++ 2 files changed, 96 insertions(+), 4 deletions(-) commit f4361718f7654f31fee6bf323147e7062d825599 Merge: 3f1901110a89 9c2ea4a36364 Author: Palmer Dabbelt Date: Thu Jul 21 17:19:43 2022 -0700 riscv: Add macro for multiple nop instructions Some cases need multiple nop instructions and arm64 already has a nice helper for not needing to write all of them out but instead use a helper to add n nops. So add a similar thing to riscv and convert the T-Head PMA alternative to use it. * 'riscv-nops' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux.git: riscv: convert the t-head pbmt errata to use the __nops macro riscv: introduce nops and __nops macros for NOP sequences commit 779dd20cfb56c510f89877cca45529fa9f8bc450 Author: Ben Widawsky Date: Tue Jun 8 10:28:34 2021 -0700 cxl/region: Add region creation support CXL 2.0 allows for dynamic provisioning of new memory regions (system physical address resources like "System RAM" and "Persistent Memory"). Whereas DDR and PMEM resources are conveyed statically at boot, CXL allows for assembling and instantiating new regions from the available capacity of CXL memory expanders in the system. Sysfs with an "echo $region_name > $create_region_attribute" interface is chosen as the mechanism to initiate the provisioning process. This was chosen over ioctl() and netlink() to keep the configuration interface entirely in a pseudo-fs interface, and it was chosen over configfs since, aside from this one creation event, the interface is read-mostly. I.e. configfs supports cases where an object is designed to be provisioned each boot, like an iSCSI storage target, and CXL region creation is mostly for PMEM regions which are created usually once per-lifetime of a server instance. This is an improvement over nvdimm that pre-created "seed" devices that tended to confuse users looking to determine which devices are active and which are idle. Recall that the major change that CXL brings over previous persistent memory architectures is the ability to dynamically define new regions. Compare that to drivers like 'nfit' where the region configuration is statically defined by platform firmware. Regions are created as a child of a root decoder that encompasses an address space with constraints. When created through sysfs, the root decoder is explicit. When created from an LSA's region structure a root decoder will possibly need to be inferred by the driver. Upon region creation through sysfs, a vacant region is created with a unique name. Regions have a number of attributes that must be configured before the region can be bound to the driver where HDM decoder program is completed. An example of creating a new region: - Allocate a new region name: region=$(cat /sys/bus/cxl/devices/decoder0.0/create_pmem_region) - Create a new region by name: while region=$(cat /sys/bus/cxl/devices/decoder0.0/create_pmem_region) ! echo $region > /sys/bus/cxl/devices/decoder0.0/create_pmem_region do true; done - Region now exists in sysfs: stat -t /sys/bus/cxl/devices/decoder0.0/$region - Delete the region, and name: echo $region > /sys/bus/cxl/devices/decoder0.0/delete_region Signed-off-by: Ben Widawsky Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784333909.1758207.794374602146306032.stgit@dwillia2-xfh.jf.intel.com [djbw: simplify locking, reword changelog] Signed-off-by: Dan Williams Documentation/ABI/testing/sysfs-bus-cxl | 25 +++ Documentation/driver-api/cxl/memory-devices.rst | 11 ++ drivers/cxl/Kconfig | 5 + drivers/cxl/core/Makefile | 1 + drivers/cxl/core/core.h | 10 ++ drivers/cxl/core/port.c | 39 +++++ drivers/cxl/core/region.c | 201 ++++++++++++++++++++++++ drivers/cxl/cxl.h | 18 +++ tools/testing/cxl/Kbuild | 1 + 9 files changed, 311 insertions(+) commit 14b80582c43e4f550acfd93c2b2cadbe36ea0874 Author: Dan Williams Date: Fri May 20 13:41:24 2022 -0700 resource: Introduce alloc_free_mem_region() The core of devm_request_free_mem_region() is a helper that searches for free space in iomem_resource and performs __request_region_locked() on the result of that search. The policy choices of the implementation conform to what CONFIG_DEVICE_PRIVATE users want which is memory that is immediately marked busy, and a preference to search for the first-fit free range in descending order from the top of the physical address space. CXL has a need for a similar allocator, but with the following tweaks: 1/ Search for free space in ascending order 2/ Search for free space relative to a given CXL window 3/ 'insert' rather than 'request' the new resource given downstream drivers from the CXL Region driver (like the pmem or dax drivers) are responsible for request_mem_region() when they activate the memory range. Rework __request_free_mem_region() into get_free_mem_region() which takes a set of GFR_* (Get Free Region) flags to control the allocation policy (ascending vs descending), and "busy" policy (insert_resource() vs request_region()). As part of the consolidation of the legacy GFR_REQUEST_REGION case with the new default of just inserting a new resource into the free space some minor cleanups like not checking for NULL before calling devres_free() (which does its own check) is included. Suggested-by: Jason Gunthorpe Link: https://lore.kernel.org/linux-cxl/20220420143406.GY2120790@nvidia.com/ Cc: Matthew Wilcox Cc: Christoph Hellwig Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784333333.1758207.13703329337805274043.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams include/linux/ioport.h | 2 + kernel/resource.c | 178 +++++++++++++++++++++++++++++++++++++++---------- mm/Kconfig | 5 ++ 3 files changed, 150 insertions(+), 35 deletions(-) commit 7f8faf96a2fb562833db73595640329ca8da7b1d Author: Dan Williams Date: Tue Jun 7 10:35:39 2022 -0700 cxl/mem: Enumerate port targets before adding endpoints The port scanning algorithm in devm_cxl_enumerate_ports() walks up the topology and adds cxl_port objects starting from the root down to the endpoint. When those ports are initially created they know all their dports, but they do not know the downstream cxl_port instance that represents the next descendant in the topology. Rework create_endpoint() into devm_cxl_add_endpoint() that enumerates the downstream cxl_port topology into each port's 'struct cxl_ep' record for each endpoint it that the port is an ancestor. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220624041950.559155-7-dan.j.williams@intel.com Signed-off-by: Dan Williams drivers/cxl/core/port.c | 41 +++++++++++++++++++++++++++++++++++++++++ drivers/cxl/cxl.h | 5 +++++ drivers/cxl/mem.c | 30 +----------------------------- 3 files changed, 47 insertions(+), 29 deletions(-) commit 538831f1beb818c93e5879bf19de37d89ec88ed6 Author: Ben Widawsky Date: Sun Apr 10 15:26:13 2022 -0700 cxl/hdm: Add sysfs attributes for interleave ways + granularity The region provisioning flow involves selecting interleave ways + granularity settings for a region, and then programming the decoder topology to meet those constraints, if possible. For example, root decoders set the minimum interleave ways + granularity for any hosted regions. Given decoder programming is not atomic and collisions can occur between multiple requesting regions userspace will be responsible for conflict resolution and it needs these attributes to make those decisions. Signed-off-by: Ben Widawsky Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784332235.1758207.7185062713652694607.stgit@dwillia2-xfh.jf.intel.com [djbw: reword changelog, make read-only, add sysfs ABI documentaion] Signed-off-by: Dan Williams Documentation/ABI/testing/sysfs-bus-cxl | 27 +++++++++++++++++++++++++++ drivers/cxl/core/port.c | 23 +++++++++++++++++++++++ 2 files changed, 50 insertions(+) commit 391785859e7e6521f622ad8c965c9792767023bc Author: Dan Williams Date: Fri May 27 20:51:19 2022 -0700 cxl/port: Move dport tracking to an xarray Reduce the complexity and the overhead of walking the topology to determine endpoint connectivity to root decoder interleave configurations. Note that cxl_detach_ep(), after it determines that the last @ep has departed and decides to delete the port, now needs to walk the dport array with the device_lock() held to remove entries. Previously list_splice_init() could be used atomically delete all dport entries at once and then perform entry tear down outside the lock. There is no list_splice_init() equivalent for the xarray. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784331647.1758207.6345820282285119339.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/hdm.c | 6 ++-- drivers/cxl/core/port.c | 85 +++++++++++++++++++++---------------------------- drivers/cxl/cxl.h | 12 ++++--- 3 files changed, 47 insertions(+), 56 deletions(-) commit 256d0e9ee4f2f14d30b93fd593cef3108b0527ca Author: Dan Williams Date: Fri May 27 10:58:26 2022 -0700 cxl/port: Move 'cxl_ep' references to an xarray per port In preparation for region provisioning that needs to walk the topology by endpoints, use an xarray to record endpoint interest in a given port. In addition to being more space and time efficient it also reduces the complexity of the implementation by moving locking internal to the xarray implementation. It also allows for a single cxl_ep reference to be recorded in multiple xarrays. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220624041950.559155-2-dan.j.williams@intel.com Signed-off-by: Dan Williams drivers/cxl/core/port.c | 60 ++++++++++++++++++++++++------------------------- drivers/cxl/cxl.h | 4 +--- 2 files changed, 30 insertions(+), 34 deletions(-) commit 1b58b4cac6fc6fab55f34f74087594125fc60b84 Author: Dan Williams Date: Fri May 27 10:57:01 2022 -0700 cxl/port: Record parent dport when adding ports At the time that cxl_port instances are being created, cache the dport from the parent port that points to this new child port. This will be useful for region provisioning when walking the tree to calculate decoder targets, and saves rewalking the dport list after the fact to build this information. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220624041950.559155-1-dan.j.williams@intel.com Signed-off-by: Dan Williams drivers/cxl/acpi.c | 3 +-- drivers/cxl/core/port.c | 27 +++++++++++++++------------ drivers/cxl/cxl.h | 7 +++++-- drivers/cxl/mem.c | 10 ++++++---- 4 files changed, 27 insertions(+), 20 deletions(-) commit de516b40116e98c60ee475e92108453686098c85 Author: Dan Williams Date: Fri May 27 00:56:59 2022 -0700 cxl/port: Record dport in endpoint references Recall that the primary role of the cxl_mem driver is to probe if the given endpoint is connected to a CXL port topology. In that process it walks its device ancestry to its PCI root port. If that root port is also a CXL root port then the probe process adds cxl_port object instances at switch in the path between to the root and the endpoint. As those cxl_port instances are added, or if a previous enumeration attempt already created the port, a 'struct cxl_ep' instance is registered with that port to track the endpoints interested in that port. At the time the cxl_ep is registered the downstream egress path from the port to the endpoint is known. Take the opportunity to record that information as it will be needed for dynamic programming of decoder targets during region provisioning. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784329944.1758207.15203961796832072116.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/port.c | 52 +++++++++++++++++++++++++++++++++---------------- drivers/cxl/cxl.h | 2 ++ 2 files changed, 37 insertions(+), 17 deletions(-) commit cf880423b6a0599499c1f83542cab0b75daa29ba Author: Dan Williams Date: Mon May 23 18:02:30 2022 -0700 cxl/hdm: Add support for allocating DPA to an endpoint decoder The region provisioning flow will roughly follow a sequence of: 1/ Allocate DPA to a set of decoders 2/ Allocate HPA to a region 3/ Associate decoders with a region and validate that the DPA allocations and topologies match the parameters of the region. For now, this change (step 1) arranges for DPA capacity to be allocated and deleted from non-committed decoders based on the decoder's mode / partition selection. Capacity is allocated from the lowest DPA in the partition and any 'pmem' allocation blocks out all remaining ram capacity in its 'skip' setting. DPA allocations are enforced in decoder instance order. I.e. decoder N + 1 always starts at a higher DPA than instance N, and deleting allocations must proceed from the highest-instance allocated decoder to the lowest. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784329399.1758207.16732038126938632700.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams Documentation/ABI/testing/sysfs-bus-cxl | 37 ++++++- drivers/cxl/core/core.h | 7 ++ drivers/cxl/core/hdm.c | 180 ++++++++++++++++++++++++++++++++ drivers/cxl/core/port.c | 73 ++++++++++++- 4 files changed, 295 insertions(+), 2 deletions(-) commit 0c33b3935265cd5aafa18904363bab0c545adeee Author: Dan Williams Date: Tue May 24 12:04:58 2022 -0700 cxl/hdm: Track next decoder to allocate The CXL specification enforces that endpoint decoders are committed in hw instance id order. In preparation for adding dynamic DPA allocation, record the hw instance id in endpoint decoders, and enforce allocations to occur in hw instance id order. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784328827.1758207.9627538529944559954.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/hdm.c | 15 +++++++++++++++ drivers/cxl/core/port.c | 1 + drivers/cxl/cxl.h | 2 ++ 3 files changed, 18 insertions(+) commit 2c8669033f16f5d791e10a5bdd42e39c7380da57 Author: Dan Williams Date: Mon May 23 12:15:35 2022 -0700 cxl/hdm: Add 'mode' attribute to decoder objects Recall that the Device Physical Address (DPA) space of a CXL Memory Expander is potentially partitioned into a volatile and persistent portion. A decoder maps a Host Physical Address (HPA) range to a DPA range and that translation depends on the value of all previous (lower instance number) decoders before the current one. In preparation for allowing dynamic provisioning of regions, decoders need an ABI to indicate which DPA partition a decoder targets. This ABI needs to be prepared for the possibility that some other agent committed and locked a decoder that spans the partition boundary. Add 'decoderX.Y/mode' to endpoint decoders that indicates which partition 'ram' / 'pmem' the decoder targets, or 'mixed' if the decoder currently spans the partition boundary. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165603881967.551046.6007594190951596439.stgit@dwillia2-xfh Signed-off-by: Dan Williams Documentation/ABI/testing/sysfs-bus-cxl | 16 ++++++++++++++++ drivers/cxl/core/hdm.c | 10 ++++++++++ drivers/cxl/core/port.c | 20 ++++++++++++++++++++ drivers/cxl/cxl.h | 9 +++++++++ 4 files changed, 55 insertions(+) commit 9c57cde0dcbd0f76f649d152b83a2b9316277b22 Author: Dan Williams Date: Thu Jul 21 17:19:12 2022 -0700 cxl/hdm: Enumerate allocated DPA In preparation for provisioning CXL regions, add accounting for the DPA space consumed by existing regions / decoders. Recall, a CXL region is a memory range comprised from one or more endpoint devices contributing a mapping of their DPA into HPA space through a decoder. Record the DPA ranges covered by committed decoders at initial probe of endpoint ports relative to a per-device resource tree of the DPA type (pmem or volatile-ram). The cxl_dpa_rwsem semaphore is introduced to globally synchronize DPA state across all endpoints and their decoders at once. The vast majority of DPA operations are reads as region creation is expected to be as rare as disk partitioning and volume creation. The device_lock() for this synchronization is specifically avoided for concern of entangling with sysfs attribute removal. Co-developed-by: Ben Widawsky Signed-off-by: Ben Widawsky Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784327682.1758207.7914919426043855876.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/hdm.c | 145 +++++++++++++++++++++++++++++++++++++++++++++---- drivers/cxl/cxl.h | 2 + drivers/cxl/cxlmem.h | 13 +++++ 3 files changed, 149 insertions(+), 11 deletions(-) commit 9c2ea4a36364bfb5cf068c6fbea5c40292b119a5 Author: Heiko Stuebner Date: Tue Jun 7 16:30:59 2022 +0200 riscv: convert the t-head pbmt errata to use the __nops macro Instead of manually inserting the list of nops, use the recently introduced __nops(n) macro to make everything more readable. Signed-off-by: Heiko Stuebner Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/errata_list.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit c295bc34ab58e917e2f2f789dd82b66fd2e2e299 Author: Heiko Stuebner Date: Tue Jun 7 16:30:58 2022 +0200 riscv: introduce nops and __nops macros for NOP sequences NOP sequences tend to get used for padding out alternative sections This change adds macros for generating these sequences as both inline asm blocks, but also as strings suitable for embedding in other asm blocks directly. It essentially mimics similar functionality from arm64 introduced by Wil Deacon in commit f99a250cb6a3 ("arm64: barriers: introduce nops and __nops macros for NOP sequences"). Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20220607143059.1054074-2-heiko@sntech.de Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/asm.h | 15 +++++++++++++++ arch/riscv/include/asm/barrier.h | 2 ++ 2 files changed, 17 insertions(+) commit 1f7435c8f6558a94f75b408a74140bdcbd0f6dd1 Author: Luiz Augusto von Dentz Date: Tue Jun 21 11:58:34 2022 -0700 Bluetooth: mgmt: Fix using hci_conn_abort This fixes using hci_conn_abort instead of using hci_conn_abort_sync. Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/hci_sync.h | 2 ++ net/bluetooth/hci_sync.c | 3 +-- net/bluetooth/mgmt.c | 38 +++++++++++++++++++++++++++++++++++--- 3 files changed, 38 insertions(+), 5 deletions(-) commit a86ddbffa6ed05bc2465a545a96627b6e776c019 Author: Luiz Augusto von Dentz Date: Wed May 4 16:49:17 2022 -0700 Bluetooth: Use bt_status to convert from errno If a command cannot be sent or there is a internal error an errno maybe set instead of a command status. Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca2045e059c3aa1b06c9aed448672bc86dfdce11 Author: Luiz Augusto von Dentz Date: Fri Apr 8 15:07:44 2022 -0700 Bluetooth: Add bt_status This adds bt_status which can be used to convert Unix errno to Bluetooth status. Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/bluetooth.h | 1 + net/bluetooth/lib.c | 71 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) commit 1bbf4023cf663b85a2a37ebb2d3eb07fb856ca9a Author: Luiz Augusto von Dentz Date: Fri Apr 1 16:12:27 2022 -0700 Bluetooth: hci_sync: Split hci_dev_open_sync This splits hci_dev_open_sync so each stage is handle by its own function so it is easier to identify each stage. Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_sync.c | 225 ++++++++++++++++++++++++++--------------------- 1 file changed, 126 insertions(+), 99 deletions(-) commit 7cf5c2978f23fdbb2dd7b4e8b07e362ae2d8211c Author: Manish Mandlik Date: Wed Jul 20 16:21:14 2022 -0700 Bluetooth: hci_sync: Refactor remove Adv Monitor Make use of hci_cmd_sync_queue for removing an advertisement monitor. Signed-off-by: Manish Mandlik Reviewed-by: Miao-chen Chou Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/hci_core.h | 6 +-- net/bluetooth/hci_core.c | 81 ++++++++++++--------------------- net/bluetooth/mgmt.c | 62 ++++++++++--------------- net/bluetooth/msft.c | 98 ++++++++-------------------------------- net/bluetooth/msft.h | 6 +-- 5 files changed, 75 insertions(+), 178 deletions(-) commit b747a83690c8f53bc7a3f75899415c699b2c51aa Author: Manish Mandlik Date: Wed Jul 20 16:21:13 2022 -0700 Bluetooth: hci_sync: Refactor add Adv Monitor Make use of hci_cmd_sync_queue for adding an advertisement monitor. Signed-off-by: Manish Mandlik Reviewed-by: Miao-chen Chou Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/hci_core.h | 5 +- net/bluetooth/hci_core.c | 46 +++++------ net/bluetooth/mgmt.c | 52 ++++-------- net/bluetooth/msft.c | 171 +++++++++------------------------------ 4 files changed, 78 insertions(+), 196 deletions(-) commit 63b1a7dd38bfd4630e5f59a20a2b7b1f3d04f486 Author: Zijun Hu Date: Thu Jul 21 14:04:33 2022 +0800 Bluetooth: hci_sync: Remove HCI_QUIRK_BROKEN_ERR_DATA_REPORTING Core driver addtionally checks LMP feature bit "Erroneous Data Reporting" instead of quirk HCI_QUIRK_BROKEN_ERR_DATA_REPORTING to decide if HCI commands HCI_Read|Write_Default_Erroneous_Data_Reporting are broken, so remove this unnecessary quirk. Signed-off-by: Zijun Hu Tested-by: Zijun Hu Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/hci.h | 11 ----------- net/bluetooth/hci_sync.c | 3 --- 2 files changed, 14 deletions(-) commit e168f690087735ad12604ee6ee2db1b93e323072 Author: Zijun Hu Date: Thu Jul 21 14:04:32 2022 +0800 Bluetooth: btusb: Remove HCI_QUIRK_BROKEN_ERR_DATA_REPORTING for fake CSR Core driver addtionally checks LMP feature bit "Erroneous Data Reporting" instead of quirk HCI_QUIRK_BROKEN_ERR_DATA_REPORTING to decide if HCI commands HCI_Read|Write_Default_Erroneous_Data_Reporting are broken, so remove this unnecessary quirk for fake CSR controllers. Signed-off-by: Zijun Hu Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 1 - 1 file changed, 1 deletion(-) commit 1172c59f451f524a14bac5e7b047781883dfe441 Author: Zijun Hu Date: Thu Jul 21 14:04:31 2022 +0800 Bluetooth: btusb: Remove HCI_QUIRK_BROKEN_ERR_DATA_REPORTING for QCA Core driver addtionally checks LMP feature bit "Erroneous Data Reporting" instead of quirk HCI_QUIRK_BROKEN_ERR_DATA_REPORTING to decide if HCI commands HCI_Read|Write_Default_Erroneous_Data_Reporting are broken, so remove this unnecessary quirk for QCA controllers. The reason why these two HCI commands are broken for QCA controllers is that feature "Erroneous Data Reporting" is not enabled by their firmware as shown by below log: @ RAW Open: hcitool (privileged) version 2.22 < HCI Command: Read Local Supported Commands (0x04|0x0002) plen 0 > HCI Event: Command Complete (0x0e) plen 68 Read Local Supported Commands (0x04|0x0002) ncmd 1 Status: Success (0x00) Commands: 288 entries ...... Read Default Erroneous Data Reporting (Octet 18 - Bit 2) Write Default Erroneous Data Reporting (Octet 18 - Bit 3) ...... < HCI Command: Read Default Erroneous Data Reporting (0x03|0x005a) plen 0 > HCI Event: Command Complete (0x0e) plen 4 Read Default Erroneous Data Reporting (0x03|0x005a) ncmd 1 Status: Unknown HCI Command (0x01) < HCI Command: Read Local Supported Features (0x04|0x0003) plen 0 > HCI Event: Command Complete (0x0e) plen 12 Read Local Supported Features (0x04|0x0003) ncmd 1 Status: Success (0x00) Features: 0xff 0xfe 0x0f 0xfe 0xd8 0x3f 0x5b 0x87 3 slot packets ...... Signed-off-by: Zijun Hu Tested-by: Zijun Hu Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 1 - 1 file changed, 1 deletion(-) commit 766ae2422b4312a73510ebee9266bc23b466fbbb Author: Zijun Hu Date: Thu Jul 21 14:04:30 2022 +0800 Bluetooth: hci_sync: Check LMP feature bit instead of quirk BT core driver should addtionally check LMP feature bit "Erroneous Data Reporting" instead of quirk HCI_QUIRK_BROKEN_ERR_DATA_REPORTING set by BT device driver to decide if HCI commands HCI_Read|Write_Default_Erroneous_Data_Reporting are broken. BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 2, Part C | page 587 This feature indicates whether the device is able to support the Packet_Status_Flag and the HCI commands HCI_Write_Default_- Erroneous_Data_Reporting and HCI_Read_Default_Erroneous_- Data_Reporting. the quirk was introduced by 'commit cde1a8a99287 ("Bluetooth: btusb: Fix and detect most of the Chinese Bluetooth controllers")' to mark HCI commands HCI_Read|Write_Default_Erroneous_Data_Reporting broken by BT device driver, but the reason why these two HCI commands are broken is that feature "Erroneous Data Reporting" is not enabled by firmware, this scenario is illustrated by below log of QCA controllers with USB I/F: @ RAW Open: hcitool (privileged) version 2.22 < HCI Command: Read Local Supported Commands (0x04|0x0002) plen 0 > HCI Event: Command Complete (0x0e) plen 68 Read Local Supported Commands (0x04|0x0002) ncmd 1 Status: Success (0x00) Commands: 288 entries ...... Read Default Erroneous Data Reporting (Octet 18 - Bit 2) Write Default Erroneous Data Reporting (Octet 18 - Bit 3) ...... < HCI Command: Read Default Erroneous Data Reporting (0x03|0x005a) plen 0 > HCI Event: Command Complete (0x0e) plen 4 Read Default Erroneous Data Reporting (0x03|0x005a) ncmd 1 Status: Unknown HCI Command (0x01) < HCI Command: Read Local Supported Features (0x04|0x0003) plen 0 > HCI Event: Command Complete (0x0e) plen 12 Read Local Supported Features (0x04|0x0003) ncmd 1 Status: Success (0x00) Features: 0xff 0xfe 0x0f 0xfe 0xd8 0x3f 0x5b 0x87 3 slot packets ...... Signed-off-by: Zijun Hu Tested-by: Zijun Hu Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/hci.h | 1 + net/bluetooth/hci_sync.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 0feb8af0275d196a29e321bedc15319673923cb6 Author: Zijun Hu Date: Wed Jul 13 14:53:14 2022 +0800 Bluetooth: hci_sync: Correct hci_set_event_mask_page_2_sync() event mask Event HCI_Truncated_Page_Complete should belong to central and HCI_Peripheral_Page_Response_Timeout should belong to peripheral, but hci_set_event_mask_page_2_sync() take these two events for wrong roles, so correct it by this change. Signed-off-by: Zijun Hu Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 57117d7234dadfba2a83615b2a9369f6f2f9914f Author: He Wang Date: Sat Jun 25 17:03:57 2022 +0800 Bluetooth: btusb: Add a new VID/PID 0489/e0e2 for MT7922 Add VID/PID 0489:e0e2 for MediaTek MT7922 Bluetooth chip. Found and tested with Asus UM5302TA. From /sys/kernel/debug/usb/devices: T: Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0489 ProdID=e0e2 Rev= 1.00 S: Manufacturer=MediaTek Inc. S: Product=Wireless_Device S: SerialNumber=000000000 C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA A: FirstIf#= 0 IfCount= 3 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 I:* If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none) E: Ad=8a(I) Atr=03(Int.) MxPS= 64 Ivl=125us E: Ad=0a(O) Atr=03(Int.) MxPS= 64 Ivl=125us I: If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none) E: Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us E: Ad=0a(O) Atr=03(Int.) MxPS= 512 Ivl=125us Signed-off-by: He Wang Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 3 +++ 1 file changed, 3 insertions(+) commit e11523e97f474f8c7acc76fa912209900e2d3c69 Author: Yuri D'Elia Date: Wed Jul 13 17:29:13 2022 +0200 Bluetooth: btusb: Set HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN for MTK This sets HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN for MTK controllers since SCO appear to not work when using HCI_OP_ENHANCED_SETUP_SYNC_CONN. Link: https://bugzilla.kernel.org/show_bug.cgi?id=215576 Signed-off-by: Yuri D'Elia Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 1 + 1 file changed, 1 insertion(+) commit 46459cb6d4e63066e227a496ae8af35ba8c0b23b Author: Hakan Jansson Date: Thu Jun 30 14:53:45 2022 +0200 Bluetooth: hci_bcm: Increase host baudrate for CYW55572 in autobaud mode Add device specific data for max baudrate in autobaud mode. This allows the host to use a baudrate higher than "init speed" when loading FW in autobaud mode. The device specific max baudrate in autobaud mode for CYW55572 is set to 921600 bps. Devices without device specific max baudrate in autobaud mode will use init speed as before. If no device specific init speed has been specified, it will default to the bcm_proto default 115200 bps. The increased baud rate improves FW load time. The exact load time will depend on the specific system and FW being used. As a rough indication, the FW load time dropped from ~9s @ 115.2kbps to ~1.7s @ 921.6kbps in one test. Signed-off-by: Hakan Jansson Reviewed-by: Linus Walleij Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/hci_bcm.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 9baee415460e602686500d825a86436daa27ac8a Author: Hakan Jansson Date: Thu Jun 30 14:45:23 2022 +0200 Bluetooth: hci_bcm: Prevent early baudrate setting in autobaud mode Always prevent trying to set device baudrate before calling setup() when using autobaud mode. This was previously happening for devices which had device specific data with member no_early_set_baudrate set to 0. Signed-off-by: Hakan Jansson Reviewed-by: Linus Walleij Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/hci_bcm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit f8cad62002a7699fd05a23b558b980b5a77defe0 Author: Hakan Jansson Date: Thu Jun 30 14:45:22 2022 +0200 Bluetooth: hci_bcm: Add DT compatible for CYW55572 CYW55572 is a Wi-Fi + Bluetooth combo device from Infineon. Signed-off-by: Hakan Jansson Reviewed-by: Linus Walleij Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/hci_bcm.c | 1 + 1 file changed, 1 insertion(+) commit c8ce64900db470a7b7b8f2e5c87d0756a91b1d27 Author: Hakan Jansson Date: Thu Jun 30 14:45:21 2022 +0200 dt-bindings: net: broadcom-bluetooth: Add conditional constraints Add conditional constraint to make property "reset-gpios" available only for compatible devices acually having the reset pin. Make property "brcm,requires-autobaud-mode" depend on property "shutdown-gpios" as the shutdown pin is required to enter autobaud mode. I looked at all compatible devices and compiled the matrix below before formulating the conditional constraint. This was a pure paper exercise and no verification testing has been performed. d e v h i o c s s e t h - - u w w v t r a a v d d e k k b d o s e e a i w e u u t o n t p p - - - - - - s s g g g g u u p p p p t p p i i i i x l p p o o o o c p l l s s s s o o y y --------------------------------------- brcm,bcm20702a1 X X X X X X X X brcm,bcm4329-bt X X X X X X X X brcm,bcm4330-bt X X X X X X X X brcm,bcm4334-bt X - X X X X X X brcm,bcm43438-bt X - X X X X X X brcm,bcm4345c5 X - X X X X X X brcm,bcm43540-bt X - X X X X X X brcm,bcm4335a0 X - X X X X X X brcm,bcm4349-bt X - X X X X X X infineon,cyw55572-bt X - X X X X X X Signed-off-by: Hakan Jansson Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Luiz Augusto von Dentz .../devicetree/bindings/net/broadcom-bluetooth.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit cba6164f7c5e36ebdb0a1c02347a5ab054469276 Author: Hakan Jansson Date: Thu Jun 30 14:45:20 2022 +0200 dt-bindings: net: broadcom-bluetooth: Add CYW55572 DT binding CYW55572 is a Wi-Fi + Bluetooth combo device from Infineon. Extend the binding with its DT compatible. Signed-off-by: Hakan Jansson Acked-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Luiz Augusto von Dentz Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml | 1 + 1 file changed, 1 insertion(+) commit 6f43f6169a8229bb6ddbf483d3be760d48c4cdd1 Author: Dan Carpenter Date: Wed Jul 20 14:23:49 2022 +0300 Bluetooth: clean up error pointer checking The bt_skb_sendmsg() function can't return NULL so there is no need to check for that. Several of these checks were removed previously but this one was missed. Signed-off-by: Dan Carpenter Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/bluetooth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ad353dfc8ee3230a5e123c21da50f1b64cc4b39 Author: Hilda Wu Date: Thu Jul 14 19:25:23 2022 +0800 Bluetooth: btusb: Add Realtek RTL8852C support ID 0x13D3:0x3586 Add the support ID(0x13D3, 0x3586) to usb_device_id table for Realtek RTL8852C. The device info from /sys/kernel/debug/usb/devices as below. T: Bus=03 Lev=01 Prnt=01 Port=02 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=13d3 ProdID=3586 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: Hilda Wu Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 2 ++ 1 file changed, 2 insertions(+) commit 8f0054dd29373cd877db87751c143610561d549d Author: Hilda Wu Date: Thu Jul 14 19:25:22 2022 +0800 Bluetooth: btusb: Add Realtek RTL8852C support ID 0x13D3:0x3587 Add the support ID(0x13D3, 0x3587) to usb_device_id table for Realtek RTL8852C. The device info from /sys/kernel/debug/usb/devices as below. T: Bus=03 Lev=01 Prnt=01 Port=02 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=13d3 ProdID=3587 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: Hilda Wu Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 2 ++ 1 file changed, 2 insertions(+) commit 5b75ee37ebb73f58468d4cca172434324af203f1 Author: Hilda Wu Date: Thu Jul 14 19:25:21 2022 +0800 Bluetooth: btusb: Add Realtek RTL8852C support ID 0x0CB8:0xC558 Add the support ID(0x0CB8, 0xC558) to usb_device_id table for Realtek RTL8852C. The device info from /sys/kernel/debug/usb/devices as below. T: Bus=03 Lev=01 Prnt=01 Port=02 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=0cb8 ProdID=c558 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: Hilda Wu Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 2 ++ 1 file changed, 2 insertions(+) commit 893fa8bc9952a36fb682ee12f0a994b5817a36d2 Author: Hilda Wu Date: Thu Jul 14 19:25:20 2022 +0800 Bluetooth: btusb: Add Realtek RTL8852C support ID 0x04C5:0x1675 Add the support ID(0x04c5, 0x1675) to usb_device_id table for Realtek RTL8852C. The device info from /sys/kernel/debug/usb/devices as below. T: Bus=03 Lev=01 Prnt=01 Port=02 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=04c5 ProdID=1675 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: Hilda Wu Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 2 ++ 1 file changed, 2 insertions(+) commit c379c96cc221767af9688a5d4758a78eea30883a Author: Hilda Wu Date: Thu Jul 14 19:25:19 2022 +0800 Bluetooth: btusb: Add Realtek RTL8852C support ID 0x04CA:0x4007 Add the support ID(0x04CA, 0x4007) to usb_device_id table for Realtek RTL8852C. The device info from /sys/kernel/debug/usb/devices as below. T: Bus=03 Lev=01 Prnt=01 Port=02 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=04ca ProdID=4007 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: Hilda Wu Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 4 ++++ 1 file changed, 4 insertions(+) commit bee5395ced44c5a312348557eb2dfb0c2a7bfaa2 Author: Ying Hsu Date: Mon Jul 4 18:33:24 2022 +0800 Bluetooth: Add default wakeup callback for HCI UART driver Bluetooth HCI devices indicate if they are able to wakeup in the wakeup callback since 'commit 4539ca67fe8e ("Bluetooth: Rename driver .prevent_wake to .wakeup")'. This patch adds a default wakeup callback for Bluetooth HCI UAR devices. It assumes Bluetooth HCI UART devices are wakeable for backward compatibility. For those who need a customized behavior, one can override it before calling hci_uart_register_device(). Fixes: 4539ca67fe8e ("Bluetooth: Rename driver .prevent_wake to .wakeup") Signed-off-by: Ying Hsu Reviewed-by: Alain Michaud Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/hci_serdev.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6828b58307a92d6b626d4d1421ab7db6db125ba5 Author: Luiz Augusto von Dentz Date: Wed Jul 13 17:17:55 2022 -0700 Bluetooth: hci_sync: Don't remove connected devices from accept list These devices are likely going to be reprogrammed when disconnected so this avoid a whole bunch of commands attempt to remove and the add back to the list. Signed-off-by: Luiz Augusto von Dentz Tested-by: Zhengping Jiang net/bluetooth/hci_sync.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0900b1c62f43e495d04ca4bebdf80b34f3c12432 Author: Luiz Augusto von Dentz Date: Wed Jul 13 17:12:14 2022 -0700 Bluetooth: hci_sync: Fix not updating privacy_mode When programming a new entry into the resolving list it shall default to network mode since the params may contain the mode programmed when the device was last added to the resolving list. Link: https://bugzilla.kernel.org/show_bug.cgi?id=209745 Fixes: 853b70b506a20 ("Bluetooth: hci_sync: Set Privacy Mode when updating the resolving list") Signed-off-by: Luiz Augusto von Dentz Tested-by: Zhengping Jiang net/bluetooth/hci_sync.c | 3 +++ 1 file changed, 3 insertions(+) commit 9f30de9e0343da05ac621b5817e9b1ce303c6310 Author: Tamas Koczka Date: Thu Jul 14 10:48:14 2022 +0000 Bluetooth: Collect kcov coverage from hci_rx_work Annotate hci_rx_work() with kcov_remote_start() and kcov_remote_stop() calls, so remote KCOV coverage is collected while processing the rx_q queue which is the main incoming Bluetooth packet queue. Coverage is associated with the thread which created the packet skb. The collected extra coverage helps kernel fuzzing efforts in finding vulnerabilities. This change only has effect if the kernel is compiled with CONFIG_KCOV, otherwise kcov_ functions don't do anything. Signed-off-by: Tamas Koczka Tested-by: Aleksandr Nogikh Reviewed-by: Dmitry Vyukov Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_core.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 68253f3cd715e819bc4bff2b0e6b21234e259d56 Author: Zhengping Jiang Date: Mon Jul 11 17:05:30 2022 -0700 Bluetooth: hci_sync: Fix resuming scan after suspend resume After resuming, remove setting scanning_paused to false, because it is checked and set to false in hci_resume_scan_sync. Also move setting the value to false before updating passive scan, because the value is used when resuming passive scan. Fixes: 3b42055388c30 (Bluetooth: hci_sync: Fix attempting to suspend with unfiltered passive scan) Signed-off-by: Zhengping Jiang Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_sync.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit df332800a914e9fd97b83aa63832979227fd8a8d Author: Sean Wang Date: Mon Jun 27 07:27:36 2022 +0800 Bluetooth: btmtksdio: Add in-band wakeup support Commit ce64b3e94919 ("Bluetooth: mt7921s: Support wake on bluetooth") adds the wake on bluethooth via a dedicated GPIO. Extend the wake-on-bluetooth to use the SDIO DAT1 pin (in-band wakeup), when supported by the SDIO host driver. Co-developed-by: Yake Yang Signed-off-by: Yake Yang Signed-off-by: Sean Wang Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btmtksdio.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit d7b2fdfb53ea09382941c0a4950dc9b00d51d1c7 Author: Zhengping Jiang Date: Mon Jun 13 14:43:27 2022 -0700 Bluetooth: mgmt: Fix refresh cached connection info Set the connection data before calling get_conn_info_sync, so it can be verified the connection is still connected, before refreshing cached values. Fixes: 47db6b42991e6 ("Bluetooth: hci_sync: Convert MGMT_OP_GET_CONN_INFO") Signed-off-by: Zhengping Jiang Signed-off-by: Luiz Augusto von Dentz net/bluetooth/mgmt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 34a718bc86f908de8ef79affaff6a3de7b95759c Author: Luiz Augusto von Dentz Date: Wed Jun 8 15:00:01 2022 -0700 Bluetooth: HCI: Fix not always setting Scan Response/Advertising Data The scan response and advertising data needs to be tracked on a per instance (adv_info) since when these instaces are removed so are their data, to fix that new flags are introduced which is used to mark when the data changes and then checked to confirm when the data needs to be synced with the controller. Tested-by: Tedd Ho-Jeong An Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/hci_core.h | 11 +++++++ net/bluetooth/hci_core.c | 42 ++++++++++++------------- net/bluetooth/hci_sync.c | 66 +++++++++++++++++++++++++++------------- 3 files changed, 76 insertions(+), 43 deletions(-) commit dd7b8cdde098cf9f7c8de409b5b7bbb98f97be80 Author: Luiz Augusto von Dentz Date: Tue May 24 13:02:45 2022 -0700 Bluetooth: eir: Fix using strlen with hdev->{dev_name,short_name} Both dev_name and short_name are not guaranteed to be NULL terminated so this instead use strnlen and then attempt to determine if the resulting string needs to be truncated or not. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216018 Signed-off-by: Luiz Augusto von Dentz net/bluetooth/eir.c | 41 ++++++++++++++++++++++++++--------------- net/bluetooth/mgmt.c | 4 ++-- 2 files changed, 28 insertions(+), 17 deletions(-) commit a5133fe87ed827ce94084eecb7830a6d451ef55c Author: Xiaohui Zhang Date: Tue Jun 7 23:30:20 2022 +0800 Bluetooth: use memset avoid memory leaks Similar to the handling of l2cap_ecred_connect in commit d3715b2333e9 ("Bluetooth: use memset avoid memory leaks"), we thought a patch might be needed here as well. Use memset to initialize structs to prevent memory leaks in l2cap_le_connect Signed-off-by: Xiaohui Zhang Signed-off-by: Marcel Holtmann net/bluetooth/l2cap_core.c | 1 + 1 file changed, 1 insertion(+) commit 9111786492f13501baf576b772c96bf0e4d5bbcb Author: Dan Carpenter Date: Wed Jun 8 16:46:13 2022 +0300 Bluetooth: fix an error code in hci_register_dev() Preserve the error code from hci_register_suspend_notifier(). Don't return success. Fixes: d6bb2a91f95b ("Bluetooth: Unregister suspend with userchannel") Signed-off-by: Dan Carpenter Signed-off-by: Marcel Holtmann net/bluetooth/hci_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4f17c2b6694d0c4098f33b07ee3a696976940aa5 Author: Ahmad Fatoum Date: Tue May 24 07:56:41 2022 +0200 Bluetooth: hci_bcm: Add BCM4349B1 variant The BCM4349B1, aka CYW/BCM89359, is a WiFi+BT chip and its Bluetooth portion can be controlled over serial. Two subversions are added for the chip, because ROM firmware reports 002.002.013 (at least for the chips I have here), while depending on patchram firmware revision, either 002.002.013 or 002.002.014 is reported. Signed-off-by: Ahmad Fatoum Reviewed-by: Linus Walleij Signed-off-by: Marcel Holtmann drivers/bluetooth/btbcm.c | 2 ++ drivers/bluetooth/hci_bcm.c | 1 + 2 files changed, 3 insertions(+) commit 88b65887aa1b76cd8649a97824fb9904c1d79254 Author: Ahmad Fatoum Date: Tue May 24 07:56:40 2022 +0200 dt-bindings: bluetooth: broadcom: Add BCM4349B1 DT binding The BCM4349B1, aka CYW/BCM89359, is a WiFi+BT chip and its Bluetooth portion can be controlled over serial. Extend the binding with its DT compatible. Acked-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Ahmad Fatoum Signed-off-by: Marcel Holtmann Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml | 1 + 1 file changed, 1 insertion(+) commit 359ee4f834f5b4f8096f7edc0c20ef37d1fca861 Author: Abhishek Pandit-Subedi Date: Thu Jun 2 09:46:50 2022 -0700 Bluetooth: Unregister suspend with userchannel When HCI_USERCHANNEL is used, unregister the suspend notifier when binding and register when releasing. The userchannel socket should be left alone after open is completed. Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann include/net/bluetooth/hci_core.h | 2 ++ net/bluetooth/hci_core.c | 33 +++++++++++++++++++++++++-------- net/bluetooth/hci_sock.c | 3 +++ 3 files changed, 30 insertions(+), 8 deletions(-) commit 0acef50ba3b5ee95bd1598ef3e4c19f065d04eed Author: Abhishek Pandit-Subedi Date: Thu Jun 2 09:46:49 2022 -0700 Bluetooth: Fix index added after unregister When a userchannel socket is released, we should check whether the hdev is already unregistered before sending out an IndexAdded. Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann net/bluetooth/hci_sock.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 877afadad2dce8aae1f2aad8ce47e072d4f6165e Author: Schspa Shi Date: Fri Jun 3 16:19:14 2022 +0800 Bluetooth: When HCI work queue is drained, only queue chained work The HCI command, event, and data packet processing workqueue is drained to avoid deadlock in commit 76727c02c1e1 ("Bluetooth: Call drain_workqueue() before resetting state"). There is another delayed work, which will queue command to this drained workqueue. Which results in the following error report: Bluetooth: hci2: command 0x040f tx timeout WARNING: CPU: 1 PID: 18374 at kernel/workqueue.c:1438 __queue_work+0xdad/0x1140 Workqueue: events hci_cmd_timeout RIP: 0010:__queue_work+0xdad/0x1140 RSP: 0000:ffffc90002cffc60 EFLAGS: 00010093 RAX: 0000000000000000 RBX: ffff8880b9d3ec00 RCX: 0000000000000000 RDX: ffff888024ba0000 RSI: ffffffff814e048d RDI: ffff8880b9d3ec08 RBP: 0000000000000008 R08: 0000000000000000 R09: 00000000b9d39700 R10: ffffffff814f73c6 R11: 0000000000000000 R12: ffff88807cce4c60 R13: 0000000000000000 R14: ffff8880796d8800 R15: ffff8880796d8800 FS: 0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000c0174b4000 CR3: 000000007cae9000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? queue_work_on+0xcb/0x110 ? lockdep_hardirqs_off+0x90/0xd0 queue_work_on+0xee/0x110 process_one_work+0x996/0x1610 ? pwq_dec_nr_in_flight+0x2a0/0x2a0 ? rwlock_bug.part.0+0x90/0x90 ? _raw_spin_lock_irq+0x41/0x50 worker_thread+0x665/0x1080 ? process_one_work+0x1610/0x1610 kthread+0x2e9/0x3a0 ? kthread_complete_and_exit+0x40/0x40 ret_from_fork+0x1f/0x30 To fix this, we can add a new HCI_DRAIN_WQ flag, and don't queue the timeout workqueue while command workqueue is draining. Fixes: 76727c02c1e1 ("Bluetooth: Call drain_workqueue() before resetting state") Reported-by: syzbot+63bed493aebbf6872647@syzkaller.appspotmail.com Signed-off-by: Schspa Shi Signed-off-by: Marcel Holtmann include/net/bluetooth/hci.h | 1 + net/bluetooth/hci_core.c | 10 +++++++++- net/bluetooth/hci_event.c | 5 +++-- 3 files changed, 13 insertions(+), 3 deletions(-) commit ab2d2a982ff721f4b029282d9a40602ea46a745e Author: Jiasheng Jiang Date: Fri Jun 3 09:24:36 2022 +0800 Bluetooth: hci_intel: Add check for platform_driver_register As platform_driver_register() could fail, it should be better to deal with the return value in order to maintain the code consisitency. Fixes: 1ab1f239bf17 ("Bluetooth: hci_intel: Add support for platform driver") Signed-off-by: Jiasheng Jiang Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_intel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 629f66aaca81ad713fb05f1d12acc827510601b3 Author: Alain Michaud Date: Thu Jun 2 15:30:03 2022 +0000 Bluetooth: clear the temporary linkkey in hci_conn_cleanup If a hardware error occurs and the connections are flushed without a disconnection_complete event being signaled, the temporary linkkeys are not flushed. This change ensures that any outstanding flushable linkkeys are flushed when the connection are flushed from the hash table. Additionally, this also makes use of test_and_clear_bit to avoid multiple attempts to delete the link key that's already been flushed. Signed-off-by: Alain Michaud Signed-off-by: Marcel Holtmann net/bluetooth/hci_conn.c | 3 +++ net/bluetooth/hci_event.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit af35e28f0fea877832fa27802bc862b2a912f32a Author: Hakan Jansson Date: Mon May 30 17:02:18 2022 +0200 Bluetooth: hci_bcm: Add support for FW loading in autobaud mode Use the presence of a DT property, "brcm,requires-autobaud-mode", to enable startup in autobaud mode. If the property is present, the device is started in autobaud mode by asserting RTS (BT_UART_CTS_N) prior to powering on the device. Also prevent the use of unsupported commands for devices started in autobaud mode. Only a limited subset of HCI commands are supported in autobaud mode. Some devices (e.g. CYW5557x) require autobaud mode to enable FW loading. Autobaud mode can also be required on some boards where the controller device is using a non-standard baud rate in normal mode when first powered on. Signed-off-by: Hakan Jansson Signed-off-by: Marcel Holtmann drivers/bluetooth/btbcm.c | 31 +++++++++++++++++++++++-------- drivers/bluetooth/btbcm.h | 8 ++++---- drivers/bluetooth/hci_bcm.c | 16 +++++++++++++--- 3 files changed, 40 insertions(+), 15 deletions(-) commit 0b4de2523f281b0492de3427da82495bfca6f263 Author: Hakan Jansson Date: Mon May 30 17:02:17 2022 +0200 dt-bindings: net: broadcom-bluetooth: Add property for autobaud mode Add property, "brcm,requires-autobaud-mode", to enable autobaud mode selection. Some devices (e.g. CYW5557x) require autobaud mode to enable FW loading. Autobaud mode can also be required on some boards where the controller device is using a non-standard baud rate when first powered on. Signed-off-by: Hakan Jansson Reviewed-by: Krzysztof Kozlowski Signed-off-by: Marcel Holtmann Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit bde63e9effd3a6ba384707c62abe46c32d22f665 Author: Sai Teja Aluvala Date: Fri May 27 15:45:43 2022 +0530 Bluetooth: hci_qca: Return wakeup for qca_wakeup This fixes the return value of qca_wakeup(), since .wakeup work inversely with original .prevent_wake. Fixes: 4539ca67fe8ed (Bluetooth: Rename driver .prevent_wake to .wakeup) Signed-off-by: Sai Teja Aluvala Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_qca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c69ecb0ea4c96b8b191cbaa0b420222a37867655 Author: Aaron Ma Date: Thu Jun 2 17:28:22 2022 +0800 Bluetooth: btusb: Add support of IMC Networks PID 0x3568 It is 13d3:3568 for MediaTek MT7922 USB Bluetooth chip. T: Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3568 Rev=01.00 S: Manufacturer=MediaTek Inc. S: Product=Wireless_Device S: SerialNumber=... C: #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=125us E: Ad=82(I) 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=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none) E: Ad=0a(O) Atr=03(Int.) MxPS= 64 Ivl=125us E: Ad=8a(I) Atr=03(Int.) MxPS= 64 Ivl=125us Signed-off-by: Aaron Ma Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 3 +++ 1 file changed, 3 insertions(+) commit 32d00f62db4e982edbee137109407636f71f79b6 Author: Paolo Abeni Date: Thu Jul 21 15:55:14 2022 +0200 net: ipa: fix build After commit 2c7b9b936bdc ("net: ipa: move configuration data files into a subdirectory"), build of the ipa driver fails with the following error: drivers/net/ipa/data/ipa_data-v3.1.c:9:10: fatal error: gsi.h: No such file or directory After the mentioned commit, all the file included by the configuration are in the parent directory. Fix the issue updating the include path. Fixes: 2c7b9b936bdc ("net: ipa: move configuration data files into a subdirectory") Signed-off-by: Paolo Abeni Link: https://lore.kernel.org/r/7105112c38cfe0642a2d9e1779bf784a7aa63d16.1658411666.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski drivers/net/ipa/data/ipa_data-v3.1.c | 8 ++++---- drivers/net/ipa/data/ipa_data-v3.5.1.c | 8 ++++---- drivers/net/ipa/data/ipa_data-v4.11.c | 8 ++++---- drivers/net/ipa/data/ipa_data-v4.2.c | 8 ++++---- drivers/net/ipa/data/ipa_data-v4.5.c | 8 ++++---- drivers/net/ipa/data/ipa_data-v4.9.c | 8 ++++---- 6 files changed, 24 insertions(+), 24 deletions(-) commit 3f1901110a89b0e2e13adb2ac8d1a7102879ea98 Author: Xianting Tian Date: Mon Jun 6 16:23:08 2022 +0800 RISC-V: Add fast call path of crash_kexec() Currently, almost all archs (x86, arm64, mips...) support fast call of crash_kexec() when "regs && kexec_should_crash()" is true. But RISC-V not, it can only enter crash system via panic(). However panic() doesn't pass the regs of the real accident scene to crash_kexec(), it caused we can't get accurate backtrace via gdb, $ riscv64-linux-gnu-gdb vmlinux vmcore Reading symbols from vmlinux... [New LWP 95] #0 console_unlock () at kernel/printk/printk.c:2557 2557 if (do_cond_resched) (gdb) bt #0 console_unlock () at kernel/printk/printk.c:2557 #1 0x0000000000000000 in ?? () With the patch we can get the accurate backtrace, $ riscv64-linux-gnu-gdb vmlinux vmcore Reading symbols from vmlinux... [New LWP 95] #0 0xffffffe00063a4e0 in test_thread (data=) at drivers/test_crash.c:81 81 *(int *)p = 0xdead; (gdb) (gdb) bt #0 0xffffffe00064d5c0 in test_thread (data=) at drivers/test_crash.c:81 #1 0x0000000000000000 in ?? () Test code to produce NULL address dereference in test_crash.c, void *p = NULL; *(int *)p = 0xdead; Reviewed-by: Guo Ren Tested-by: Xianting Tian Signed-off-by: Xianting Tian Link: https://lore.kernel.org/r/20220606082308.2883458-1-xianting.tian@linux.alibaba.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/traps.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2139619bcad7ac44cc8f6f749089120594056613 Author: Celeste Liu Date: Tue May 31 15:56:52 2022 +0800 riscv: mmap with PROT_WRITE but no PROT_READ is invalid As mentioned in Table 4.5 in RISC-V spec Volume 2 Section 4.3, write but not read is "Reserved for future use.". For now, they are not valid. In the current code, -wx is marked as invalid, but -w- is not marked as invalid. This patch refines that judgment. Reported-by: xctan Co-developed-by: dram Signed-off-by: dram Co-developed-by: Ruizhe Pan Signed-off-by: Ruizhe Pan Signed-off-by: Celeste Liu Link: https://lore.kernel.org/r/PH7PR14MB559464DBDD310E755F5B21E8CEDC9@PH7PR14MB5594.namprd14.prod.outlook.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/sys_riscv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5cb62b7598f2413f54650d5124d7863e23f82a44 Author: Alejandro Colomar Date: Thu Jul 21 13:08:22 2022 +0200 bpf, docs: Use SPDX license identifier in bpf_doc.py The Linux man-pages project now uses SPDX tags, instead of the full license text. Signed-off-by: Alejandro Colomar Signed-off-by: Daniel Borkmann Link: https://www.kernel.org/doc/man-pages/licenses.html Link: https://spdx.org/licenses/Linux-man-pages-copyleft.html Link: https://lore.kernel.org/bpf/20220721110821.8240-1-alx.manpages@gmail.com scripts/bpf_doc.py | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) commit 65fb8e2ef3531a6e950060fca6e551c923fb0f0e Author: Liang He Date: Thu Jul 21 22:43:08 2022 +0800 ASoC: audio-graph-card: Add of_node_put() in fail path In asoc_simple_parse_dai(), we should call of_node_put() for the reference returned by of_graph_get_port_parent() in fail path. Fixes: ae30a694da4c ("ASoC: simple-card-utils: add asoc_simple_card_parse_dai()") Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220721144308.1301587-1-windhl@126.com Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4fb35936a374758d5065b0a015c565436685c378 Author: Syed Saba Kareem Date: Thu Jul 21 11:40:02 2022 +0530 ASoC: amd: enable RPL Platform acp drivers build RPL Platform drivers can be built by selecting necessary kernel config option. The patch enables build support of the same. Signed-off-by: Syed Saba Kareem Reviewed-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20220721061035.91139-5-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown sound/soc/amd/Kconfig | 10 ++++++++++ sound/soc/amd/Makefile | 1 + sound/soc/amd/rpl/Makefile | 5 +++++ 3 files changed, 16 insertions(+) commit bc1100f29d1d0bfcd36ba3690a945235ffe149c8 Author: Syed Saba Kareem Date: Thu Jul 21 11:40:01 2022 +0530 ASoC: amd: add RPL Platform pci driver pm-ops Add RPL Platform ACP PCI driver pm ops. Signed-off-by: Syed Saba Kareem Reviewed-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20220721061035.91139-4-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown sound/soc/amd/rpl/rpl-pci-acp6x.c | 40 +++++++++++++++++++++++++++++++++++++++ sound/soc/amd/rpl/rpl_acp6x.h | 15 +++++++++++++++ 2 files changed, 55 insertions(+) commit 10599205417ee3b1d29093c85bc210c9040a6bd4 Author: Syed Saba Kareem Date: Thu Jul 21 11:40:00 2022 +0530 ASoC: amd: add RPL Platform init/de-init functions Add RPL Platform ACP init/de-init functions. Signed-off-by: Syed Saba Kareem Reviewed-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20220721061035.91139-3-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown sound/soc/amd/rpl/rpl-pci-acp6x.c | 92 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) commit 003b9a96f27635e534452b174733c5f1ceec0b56 Author: Syed Saba Kareem Date: Thu Jul 21 11:39:59 2022 +0530 ASoC: amd: add ACP PCI driver for RPL platform ACP is a PCI audio device. This patch adds PCI driver to bind to this device and get PCI resources. Signed-off-by: Syed Saba Kareem Reviewed-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20220721061035.91139-2-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown sound/soc/amd/rpl/rpl-pci-acp6x.c | 95 +++++++++++++++++++++++++++++++++++++++ sound/soc/amd/rpl/rpl_acp6x.h | 21 +++++++++ 2 files changed, 116 insertions(+) commit d6a2cc9a80c2fdc10f7fde3f5f57c72e99f3bd5e Author: Syed Saba Kareem Date: Thu Jul 21 11:39:58 2022 +0530 ASoC: amd: add RPL Platform acp header file Add ACP register header file for RPL platform. Signed-off-by: Syed Saba Kareem Reviewed-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20220721061035.91139-1-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown sound/soc/amd/rpl/rpl_acp6x_chip_offset_byte.h | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit c49f5e74a11e3909c424cada0f5d52345084933f Author: Venkata Prasad Potturu Date: Thu Jul 21 11:50:37 2022 +0530 ASoC: amd: acp: Add error handling cases Add error handling in acp pci driver probe function. Signed-off-by: Venkata Prasad Potturu Reviewed-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20220721062043.3016985-5-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown sound/soc/amd/acp/acp-pci.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit 96b008a1c2e9f455d982e9cfb7117a3a0fc8f550 Author: Venkata Prasad Potturu Date: Thu Jul 21 11:50:36 2022 +0530 ASoC: amd: acp: Modify const resource struct variable to generic Change platform specific constant resource structure variable to generic name. Signed-off-by: Venkata Prasad Potturu Reviewed-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20220721062043.3016985-4-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown sound/soc/amd/acp/acp-pci.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 339ed900b3079b6ea21df55f368b1ccba17cd5e6 Author: Xu Kuohai Date: Thu Jul 21 08:13:19 2022 -0400 bpf, arm64: Fix compile error in dummy_tramp() dummy_tramp() uses "lr" to refer to the x30 register, but some assembler does not recognize "lr" and reports a build failure: /tmp/cc52xO0c.s: Assembler messages: /tmp/cc52xO0c.s:8: Error: operand 1 should be an integer register -- `mov lr,x9' /tmp/cc52xO0c.s:7: Error: undefined symbol lr used as an immediate value make[2]: *** [scripts/Makefile.build:250: arch/arm64/net/bpf_jit_comp.o] Error 1 make[1]: *** [scripts/Makefile.build:525: arch/arm64/net] Error 2 So replace "lr" with "x30" to fix it. Fixes: b2ad54e1533e ("bpf, arm64: Implement bpf_arch_text_poke() for arm64") Reported-by: Jon Hunter Signed-off-by: Xu Kuohai Signed-off-by: Daniel Borkmann Tested-by: Jon Hunter Reviewed-by: Jean-Philippe Brucker Link: https://lore.kernel.org/bpf/20220721121319.2999259-1-xukuohai@huaweicloud.com arch/arm64/net/bpf_jit_comp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d6abb2282404c0877a6fcf620d34fd74ba17df3b Author: Thierry Reding Date: Fri Jun 17 13:44:20 2022 +0200 dt-bindings: rtc: Add EM Microelectronic EM3027 bindings Document the bindings for the EM Microelectronic EM3027 RTC. Signed-off-by: Thierry Reding Reviewed-by: Rob Herring Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220617114420.1398259-2-thierry.reding@gmail.com Documentation/devicetree/bindings/rtc/trivial-rtc.yaml | 2 ++ 1 file changed, 2 insertions(+) commit e3899832bb7b3c1504998768cc2f753786c19e0a Author: Thierry Reding Date: Fri Jun 17 13:44:19 2022 +0200 dt-bindings: rtc: ds1307: Convert to json-schema Convert the DS1307 (and compatible) RTC bindings from the free-form text format to json-schema. Signed-off-by: Thierry Reding Reviewed-by: Rob Herring Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220617114420.1398259-1-thierry.reding@gmail.com .../devicetree/bindings/rtc/rtc-ds1307.txt | 52 ----------- .../devicetree/bindings/rtc/rtc-ds1307.yaml | 102 +++++++++++++++++++++ 2 files changed, 102 insertions(+), 52 deletions(-) commit d6b98c8d242aee40e7b8919dd07b593b0739e38d Author: Karol Kolacinski Date: Fri Jun 24 17:22:03 2022 +0200 ice: add write functionality for GNSS TTY Add the possibility to write raw bytes to the GNSS module through the first TTY device. This allows user to configure the module. Create a second read-only TTY device. Signed-off-by: Karol Kolacinski Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen .../device_drivers/ethernet/intel/ice.rst | 9 + drivers/net/ethernet/intel/ice/ice.h | 4 +- drivers/net/ethernet/intel/ice/ice_gnss.c | 242 ++++++++++++++++++--- drivers/net/ethernet/intel/ice/ice_gnss.h | 30 ++- 4 files changed, 254 insertions(+), 31 deletions(-) commit 6e0e846ee2ab01bc44254e6a0a6a6a0db1cba16d Merge: 5588d6280270 7ca433dc6ded Author: Jakub Kicinski Date: Thu Jul 21 13:03:39 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net No conflicts. Signed-off-by: Jakub Kicinski commit 4f46cc1b88b338692c581a77940649dd6974e04c Author: Kuldeep Singh Date: Mon Apr 18 02:34:36 2022 +0530 dt-bindings: dma: Convert Qualcomm BAM DMA binding to json format Convert Qualcomm BAM DMA controller binding to DT schema format using json schema. Signed-off-by: Kuldeep Singh [robh: add back SoC mapping to compatible strings] Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220417210436.6203-7-singh.kuldeep87k@gmail.com .../devicetree/bindings/dma/qcom,bam-dma.yaml | 100 +++++++++++++++++++++ .../devicetree/bindings/dma/qcom_bam_dma.txt | 52 ----------- 2 files changed, 100 insertions(+), 52 deletions(-) commit c7c7ce585370c927fe1d7daeb758dedcfddc573c Author: Marek Vasut Date: Thu Jul 21 05:03:27 2022 +0200 dt-bindings: vendor-prefixes: add Densitron Densitron is a manufacturer of LCD panels. https://www.densitron.com Signed-off-by: Marek Vasut Cc: Guido Günther Cc: Jagan Teki Cc: Laurent Pinchart Cc: Linus Walleij Cc: Rob Herring Cc: Sam Ravnborg Cc: Thierry Reding Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220721030327.210950-1-marex@denx.de Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit e94eb459d3e4604927ab4e08f81649fcea418318 Author: Ming Lei Date: Thu Jul 21 23:31:17 2022 +0800 ublk_drv: fix lockdep warning ub->mutex is used to protecting reading and writing ub->mm, then the following lockdep warning is triggered. Fix it by using one dedicated spin lock for protecting ub->mm. [1] lockdep warning [ 25.046186] ====================================================== [ 25.048886] WARNING: possible circular locking dependency detected [ 25.051610] 5.19.0-rc4_for-v5.20+ #149 Not tainted [ 25.053665] ------------------------------------------------------ [ 25.056334] ublk/989 is trying to acquire lock: [ 25.058296] ffff975d0329a918 (&disk->open_mutex){+.+.}-{3:3}, at: bd_register_pending_holders+0x2a/0x110 [ 25.063678] [ 25.063678] but task is already holding lock: [ 25.066246] ffff975d1df59708 (&ub->mutex){+.+.}-{3:3}, at: ublk_ctrl_uring_cmd+0x2df/0x730 [ 25.069423] [ 25.069423] which lock already depends on the new lock. [ 25.069423] [ 25.072603] [ 25.072603] the existing dependency chain (in reverse order) is: [ 25.074908] [ 25.074908] -> #3 (&ub->mutex){+.+.}-{3:3}: [ 25.076386] __mutex_lock+0x93/0x870 [ 25.077470] ublk_ch_mmap+0x3a/0x140 [ 25.078494] mmap_region+0x375/0x5a0 [ 25.079386] do_mmap+0x33a/0x530 [ 25.080168] vm_mmap_pgoff+0xb9/0x150 [ 25.080979] ksys_mmap_pgoff+0x184/0x1f0 [ 25.081838] do_syscall_64+0x37/0x80 [ 25.082653] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 25.083730] [ 25.083730] -> #2 (&mm->mmap_lock#2){++++}-{3:3}: [ 25.084707] __might_fault+0x55/0x80 [ 25.085344] _copy_from_user+0x1e/0xa0 [ 25.086020] get_sg_io_hdr+0x26/0xb0 [ 25.086651] scsi_ioctl+0x42f/0x960 [ 25.087267] sr_block_ioctl+0xe8/0x100 [ 25.087734] blkdev_ioctl+0x134/0x2b0 [ 25.088196] __x64_sys_ioctl+0x8a/0xc0 [ 25.088677] do_syscall_64+0x37/0x80 [ 25.089044] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 25.089548] [ 25.089548] -> #1 (&cd->lock){+.+.}-{3:3}: [ 25.090072] __mutex_lock+0x93/0x870 [ 25.090452] sr_block_open+0x64/0xe0 [ 25.090837] blkdev_get_whole+0x26/0x90 [ 25.091445] blkdev_get_by_dev.part.0+0x1ce/0x2f0 [ 25.092203] blkdev_open+0x52/0x90 [ 25.092617] do_dentry_open+0x1ca/0x360 [ 25.093499] path_openat+0x78d/0xcb0 [ 25.094136] do_filp_open+0xa1/0x130 [ 25.094759] do_sys_openat2+0x76/0x130 [ 25.095454] __x64_sys_openat+0x5c/0x70 [ 25.096078] do_syscall_64+0x37/0x80 [ 25.096637] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 25.097304] [ 25.097304] -> #0 (&disk->open_mutex){+.+.}-{3:3}: [ 25.098229] __lock_acquire+0x12e2/0x1f90 [ 25.098789] lock_acquire+0xbf/0x2c0 [ 25.099256] __mutex_lock+0x93/0x870 [ 25.099706] bd_register_pending_holders+0x2a/0x110 [ 25.100246] device_add_disk+0x209/0x370 [ 25.100712] ublk_ctrl_uring_cmd+0x405/0x730 [ 25.101205] io_issue_sqe+0xfe/0x2ac0 [ 25.101665] io_submit_sqes+0x352/0x1820 [ 25.102131] __do_sys_io_uring_enter+0x848/0xdc0 [ 25.102646] do_syscall_64+0x37/0x80 [ 25.103087] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 25.103640] [ 25.103640] other info that might help us debug this: [ 25.103640] [ 25.104549] Chain exists of: [ 25.104549] &disk->open_mutex --> &mm->mmap_lock#2 --> &ub->mutex [ 25.104549] [ 25.105611] Possible unsafe locking scenario: [ 25.105611] [ 25.106258] CPU0 CPU1 [ 25.106677] ---- ---- [ 25.107100] lock(&ub->mutex); [ 25.107446] lock(&mm->mmap_lock#2); [ 25.108045] lock(&ub->mutex); [ 25.108802] lock(&disk->open_mutex); [ 25.109265] [ 25.109265] *** DEADLOCK *** [ 25.109265] [ 25.110117] 2 locks held by ublk/989: [ 25.110490] #0: ffff975d07bbf8a8 (&ctx->uring_lock){+.+.}-{3:3}, at: __do_sys_io_uring_enter+0x83e/0xdc0 [ 25.111249] #1: ffff975d1df59708 (&ub->mutex){+.+.}-{3:3}, at: ublk_ctrl_uring_cmd+0x2df/0x730 [ 25.111943] [ 25.111943] stack backtrace: [ 25.112557] CPU: 2 PID: 989 Comm: ublk Not tainted 5.19.0-rc4_for-v5.20+ #149 [ 25.113137] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-1.fc33 04/01/2014 [ 25.113792] Call Trace: [ 25.114130] [ 25.114417] dump_stack_lvl+0x71/0xa0 [ 25.114771] check_noncircular+0xdf/0x100 [ 25.115137] ? register_lock_class+0x38/0x470 [ 25.115524] __lock_acquire+0x12e2/0x1f90 [ 25.115887] ? find_held_lock+0x2b/0x80 [ 25.116244] lock_acquire+0xbf/0x2c0 [ 25.116590] ? bd_register_pending_holders+0x2a/0x110 [ 25.117009] __mutex_lock+0x93/0x870 [ 25.117362] ? bd_register_pending_holders+0x2a/0x110 [ 25.117780] ? bd_register_pending_holders+0x2a/0x110 [ 25.118201] ? kobject_add+0x71/0x90 [ 25.118546] ? bd_register_pending_holders+0x2a/0x110 [ 25.118958] bd_register_pending_holders+0x2a/0x110 [ 25.119373] device_add_disk+0x209/0x370 [ 25.119732] ublk_ctrl_uring_cmd+0x405/0x730 [ 25.120109] ? rcu_read_lock_sched_held+0x3c/0x70 [ 25.120514] io_issue_sqe+0xfe/0x2ac0 [ 25.120863] io_submit_sqes+0x352/0x1820 [ 25.121228] ? rcu_read_lock_sched_held+0x3c/0x70 [ 25.121626] ? __do_sys_io_uring_enter+0x83e/0xdc0 [ 25.122028] ? find_held_lock+0x2b/0x80 [ 25.122390] ? __do_sys_io_uring_enter+0x848/0xdc0 [ 25.122791] __do_sys_io_uring_enter+0x848/0xdc0 [ 25.123190] ? syscall_enter_from_user_mode+0x20/0x70 [ 25.123606] ? syscall_enter_from_user_mode+0x20/0x70 [ 25.124024] do_syscall_64+0x37/0x80 [ 25.124383] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 25.124829] RIP: 0033:0x7f120a762af6 [ 25.125223] Code: 45 c1 41 89 c2 41 b9 08 00 00 00 41 83 ca 10 f6 87 d0 00 00 00 01 8b bf cc 00 00 00 44 0f 44 d0 45 31 c0c [ 25.126576] RSP: 002b:00007ffdcb3c5518 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa [ 25.127153] RAX: ffffffffffffffda RBX: 00000000013aef50 RCX: 00007f120a762af6 [ 25.127748] RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000004 [ 25.128351] RBP: 000000000000000b R08: 0000000000000000 R09: 0000000000000008 [ 25.128956] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffdcb3c74a6 [ 25.129524] R13: 00000000013aef50 R14: 0000000000000000 R15: 00000000000003df [ 25.130121] Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20220721153117.591394-1-ming.lei@redhat.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 12e5bde18d7f6ca4ee5fbd7c6f060d0674bf3237 Author: Slark Xiao Date: Thu Jul 21 09:17:46 2022 +0800 dt-bindings: Fix typo in comment Fix typo in the comment Signed-off-by: Slark Xiao Reviewed-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220721011746.19663-1-slark_xiao@163.com Documentation/devicetree/bindings/arm/msm/qcom,saw2.txt | 2 +- Documentation/devicetree/bindings/clock/ti/davinci/pll.txt | 2 +- Documentation/devicetree/bindings/fpga/fpga-region.txt | 2 +- Documentation/devicetree/bindings/gpio/gpio-pisosr.txt | 2 +- Documentation/devicetree/bindings/net/qcom-emac.txt | 2 +- .../devicetree/bindings/phy/amlogic,meson-axg-mipi-pcie-analog.yaml | 2 +- Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml | 2 +- Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml | 2 +- Documentation/devicetree/bindings/pinctrl/aspeed,ast2600-pinctrl.yaml | 2 +- Documentation/devicetree/bindings/power/amlogic,meson-ee-pwrc.yaml | 2 +- Documentation/devicetree/bindings/powerpc/fsl/cpus.txt | 2 +- Documentation/devicetree/bindings/powerpc/opal/power-mgt.txt | 2 +- Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt | 2 +- Documentation/devicetree/bindings/sound/tlv320adcx140.yaml | 4 ++-- Documentation/devicetree/bindings/thermal/brcm,avs-ro-thermal.yaml | 2 +- .../devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt | 2 +- Documentation/devicetree/bindings/thermal/rcar-thermal.yaml | 2 +- 17 files changed, 18 insertions(+), 18 deletions(-) commit 9fe9b252c7c022df8e503435e778f15c04dfa3bf Author: Namhyung Kim Date: Wed Jul 20 21:36:39 2022 -0700 perf lock: Fix a copy-n-paste bug It should be lock_text_end instead of _start. Fixes: 0d2997f750d1de39 ("perf lock: Look up callchain for the contended locks") Signed-off-by: Namhyung Kim Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220721043644.153718-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60ecf84d728adfeed49c6d0ef10acde100b1e1a6 Merge: 41d0914d861e 353f7988dd84 Author: Arnaldo Carvalho de Melo Date: Thu Jul 21 15:50:55 2022 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core Synch with upstream, to pick up recent developments. Signed-off-by: Arnaldo Carvalho de Melo commit fcf9b695a554dd8b74863ea59b639515f95b10ee Author: Karol Kolacinski Date: Fri Jun 24 17:22:02 2022 +0200 ice: add i2c write command Add the possibility to write to connected i2c devices using the AQ command. FW may reject the write if the device is not on allowlist. Signed-off-by: Karol Kolacinski Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 7 ++-- drivers/net/ethernet/intel/ice/ice_common.c | 47 ++++++++++++++++++++++++- drivers/net/ethernet/intel/ice/ice_common.h | 4 +++ 3 files changed, 54 insertions(+), 4 deletions(-) commit 930c6074d7dd579f3d4e8b04548dd8cb0341de1d Author: Jianmin Lv Date: Thu Jul 14 20:42:16 2022 +0800 PCI: loongson: Work around LS7A incorrect Interrupt Pin registers Several devices integrated into LS7A report 1 (which means they use INTA) in their Interrupt Pin registers, but they actually use a different interrupt. Add a quirk to override the incorrect Interrupt Pin values. This is only needed by ACPI-based systems. For DT-based systems, pci_assign_irq() ignores the Interrupt Pin register except to learn that the device uses INTx and the host bridge .map_irq() function (loongson_map_irq()) learns the IRQ mapping via DT and of_irq_parse_pci(). [bhelgaas: drop PCIE_PORT_x, OHCI, GPU since they are function 0 and don't need the quirk, squash in updates from https://lore.kernel.org/r/CAAhV-H40_o+9KS1t67O98GusM38pDaiB4bssxd3KQZpAByfnLg@mail.gmail.com] Link: https://lore.kernel.org/r/20220714124216.1489304-8-chenhuacai@loongson.cn Signed-off-by: Jianmin Lv Signed-off-by: Huacai Chen Signed-off-by: Bjorn Helgaas drivers/pci/controller/pci-loongson.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit fce43d8f75109dddcfa3870efca0b62750b929d7 Author: Vincent Knecht Date: Tue Jul 12 12:08:28 2022 +0200 dt-bindings: leds: is31fl319x: Document variants specificities Add si-en compatibles for all chip variants and add conditionals depending on compatibles to document variants specs: - possible reg addresses - whether audio-gain-db is supported or not - maximum number of leds - led-max-microamp values Reviewed-by: Rob Herring Signed-off-by: Vincent Knecht Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220712100841.1538395-3-vincent.knecht@mailoo.org .../devicetree/bindings/leds/issi,is31fl319x.yaml | 84 +++++++++++++++++++++- 1 file changed, 82 insertions(+), 2 deletions(-) commit dbc801b472c1ed5096d87f44a3e4acc180a44499 Author: Vincent Knecht Date: Tue Jul 12 12:08:27 2022 +0200 dt-bindings: leds: Convert is31fl319x to dtschema Convert leds-is31fl319x.txt to dtschema. Set license to the one recommended by DT project and set myself as maintainer. Reviewed-by: Rob Herring Signed-off-by: Vincent Knecht Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220712100841.1538395-2-vincent.knecht@mailoo.org .../devicetree/bindings/leds/issi,is31fl319x.yaml | 113 +++++++++++++++++++++ .../devicetree/bindings/leds/leds-is31fl319x.txt | 61 ----------- 2 files changed, 113 insertions(+), 61 deletions(-) commit 3ed4b599ccede7f943d5d993ff50bfd8e8f8bd5f Author: Marijn Suijten Date: Tue Jul 19 23:18:47 2022 +0200 dt-bindings: leds: qcom-lpg: Add compatible for PM660L LPG block Document the availability of an LPG configuration for the PM660L PMIC in the Qualcomm Light Pulse Generator driver. Signed-off-by: Marijn Suijten Acked-by: Rob Herring Reviewed-by: Bhupesh Sharma Reviewed-by: Bjorn Andersson Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220719211848.1653920-1-marijn.suijten@somainline.org Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml | 1 + 1 file changed, 1 insertion(+) commit e43232c0045e6a1a267468caddafb709cc1bbfd2 Author: Krzysztof Kozlowski Date: Thu Jul 21 18:06:11 2022 +0200 dt-bindings: leds: skyworks,aat1290: convert to dtschema Convert the Skyworks Solutions, Inc. AAT1290 Current Regulator bindings to DT Schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Acked-by: Jacek Anaszewski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220721160611.250274-1-krzysztof.kozlowski@linaro.org .../devicetree/bindings/leds/leds-aat1290.txt | 77 ------------------ .../devicetree/bindings/leds/skyworks,aat1290.yaml | 95 ++++++++++++++++++++++ 2 files changed, 95 insertions(+), 77 deletions(-) commit 5b967e8eca4d6e6a150aa1d9591a22324887b3f9 Author: Krzysztof Kozlowski Date: Tue Jun 7 09:52:47 2022 +0200 dt-bindings: leds: fix indentation in examples The examples were mixing 4-space with 2- and 3-space indentations, so correct them to use 4-space one. No functional change. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220607075247.58048-2-krzysztof.kozlowski@linaro.org .../devicetree/bindings/leds/leds-lp50xx.yaml | 110 +++++----- .../devicetree/bindings/leds/leds-lp55xx.yaml | 222 ++++++++++----------- .../bindings/leds/leds-pwm-multicolor.yaml | 36 ++-- 3 files changed, 184 insertions(+), 184 deletions(-) commit 3eb229f203c2bc42efbfbafba7f83c8deeca80c9 Author: Krzysztof Kozlowski Date: Tue Jun 7 09:52:46 2022 +0200 dt-bindings: leds: lp50xx: correct reg/unit addresses in example The multi-led node defined address/size cells, so it is intended to have children with unit addresses. The second multi-led's reg property defined three LED indexes within one reg item, which is not correct - these are three separate items. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220607075247.58048-1-krzysztof.kozlowski@linaro.org .../devicetree/bindings/leds/leds-lp50xx.yaml | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 828b5f017d9d5d0491cd2e71d48f4f2139078e2c Author: Christoph Hellwig Date: Thu Jul 21 08:34:32 2022 +0200 block: remove __blk_get_queue __blk_get_queue is only called by blk_get_queue, so merge the two. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20220721063432.1714609-1-hch@lst.de Signed-off-by: Jens Axboe block/blk-core.c | 10 ++++------ block/blk.h | 5 ----- 2 files changed, 4 insertions(+), 11 deletions(-) commit c5db2cfc6274692d821d33b59acb6ff615e350c1 Author: Christoph Hellwig Date: Wed Jul 20 15:05:41 2022 +0200 block: call blk_mq_exit_queue from disk_release for never added disks To undo the all initialization from blk_mq_init_allocated_queue in case of a probe failure where add_disk is never called we have to call blk_mq_exit_queue from put_disk. This relies on the fact that drivers always call blk_mq_free_tag_set after calling put_disk in the probe error path if they have a gendisk at all. We should be doing this in general, but can't do it for the normal teardown case (yet) as the tagset can be gone by the time the disk is released once it was added. I hope to sort this out properly eventually but for now this isolated hack will do it. Fixes: 6f8191fdf41d ("block: simplify disk shutdown") Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20220720130541.1323531-2-hch@lst.de Signed-off-by: Jens Axboe block/genhd.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 0a3e5cc7bbfcd571a2e53779ef7d7aa3c57d5432 Author: Christoph Hellwig Date: Wed Jul 20 15:05:40 2022 +0200 blk-mq: fix error handling in __blk_mq_alloc_disk To fully clean up the queue if the disk allocation fails we need to call blk_mq_destroy_queue and not just blk_put_queue. Fixes: 6f8191fdf41d ("block: simplify disk shutdown") Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20220720130541.1323531-1-hch@lst.de Signed-off-by: Jens Axboe block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d9e6dfdf3b207701471f364121c67eefb000682 Author: Christoph Hellwig Date: Thu Jul 21 15:09:16 2022 +0200 ublk: defer disk allocation Defer allocating the gendisk and request_queue until UBLK_CMD_START_DEV is called. This avoids funky life times where a disk is allocated and then can be added and removed multiple times, which has never been supported by the block layer. Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20220721130916.1869719-9-hch@lst.de Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 127 ++++++++++++++++++++--------------------------- 1 file changed, 53 insertions(+), 74 deletions(-) commit c50061f0f1a90df72aaa87eb17c459fa77952ad1 Author: Christoph Hellwig Date: Thu Jul 21 15:09:15 2022 +0200 ublk: rewrite ublk_ctrl_get_queue_affinity to not rely on hctx->cpumask Looking at the hctxs and cpumap is not safe without at very last a RCU reference. It also requires the queue to be set up before starting the device, which leads to rather awkward life time rules. Instead rewrite ublk_ctrl_get_queue_affinity to just build the cpumask directly from the mq_map in the tag set, similar to hctx->cpumask is built. Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20220721130916.1869719-8-hch@lst.de Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 55 +++++++++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 31 deletions(-) commit cfee7e4de2870017a4cbfdcf2d17329cc025b742 Author: Christoph Hellwig Date: Thu Jul 21 15:09:14 2022 +0200 ublk: fold __ublk_create_dev into ublk_ctrl_add_dev Fold __ublk_create_dev into its only caller to avoid the packing and unpacking of the return value into an ERR_PTR. Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Reviewed-by: ZiyangZhang Link: https://lore.kernel.org/r/20220721130916.1869719-7-hch@lst.de Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) commit 34d8f2bea52928626aefd6f7e0ba7e69f67c8e62 Author: Christoph Hellwig Date: Thu Jul 21 15:09:13 2022 +0200 ublk: cleanup ublk_ctrl_uring_cmd Move all per-command work into the per-command ublk_ctrl_* helpers instead of being split over those, ublk_ctrl_cmd_validate, and the main ublk_ctrl_uring_cmd handler. To facilitate that, the old ublk_ctrl_stop_dev function that just contained two function calls is folded into both callers. Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Reviewed-by: ZiyangZhang Link: https://lore.kernel.org/r/20220721130916.1869719-6-hch@lst.de Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 234 +++++++++++++++++++++++------------------------ 1 file changed, 116 insertions(+), 118 deletions(-) commit fa362045564ea7641e7d48295b54f4eb4df689ea Author: Christoph Hellwig Date: Thu Jul 21 15:09:12 2022 +0200 ublk: simplify ublk_ch_open and ublk_ch_release fops->open and fops->release are always paired. Use simple atomic bit ops ot indicate if the device is opened instead of a count that can only be 0 and 1 and a useless cmpxchg loop in ublk_ch_release. Also don't bother clearing file->private_data is the file is about to be freed anyway. Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20220721130916.1869719-5-hch@lst.de Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 49d686cceed2e3148ba2bd2dec7e09b86eba0337 Author: Christoph Hellwig Date: Thu Jul 21 15:09:11 2022 +0200 ublk: remove the empty open and release block device operations No need to define empty versions, they can just be left out. Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20220721130916.1869719-4-hch@lst.de Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 11 ----------- 1 file changed, 11 deletions(-) commit 5f8bcc837a9640ba4bf5e7b1d7f9b254ea029f47 Author: Christoph Hellwig Date: Thu Jul 21 15:09:10 2022 +0200 ublk: remove UBLK_IO_F_PREFLUSH REQ_PREFLUSH is turned into REQ_OP_FLUSH by the flush state machine and thus never seen by a blk-mq based driver. Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20220721130916.1869719-3-hch@lst.de Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 3 --- include/uapi/linux/ublk_cmd.h | 1 - 2 files changed, 4 deletions(-) commit c229686b26ee5b371bdd7e637f2d18f191861c3e Author: Christoph Hellwig Date: Thu Jul 21 15:09:09 2022 +0200 ublk: add a MAINTAINERS entry Make get_maintainers.pl work for ublk. Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20220721130916.1869719-2-hch@lst.de Signed-off-by: Jens Axboe MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 9950f11211331180269867aef848c7cf56861742 Author: Vincent Mailhol Date: Fri Jul 22 01:00:32 2022 +0900 can: pch_can: pch_can_error(): initialize errc before using it After commit 3a5c7e4611dd, the variable errc is accessed before being initialized, c.f. below W=2 warning: | In function 'pch_can_error', | inlined from 'pch_can_poll' at drivers/net/can/pch_can.c:739:4: | drivers/net/can/pch_can.c:501:29: warning: 'errc' may be used uninitialized [-Wmaybe-uninitialized] | 501 | cf->data[6] = errc & PCH_TEC; | | ^ | drivers/net/can/pch_can.c: In function 'pch_can_poll': | drivers/net/can/pch_can.c:484:13: note: 'errc' was declared here | 484 | u32 errc, lec; | | ^~~~ Moving errc initialization up solves this issue. Fixes: 3a5c7e4611dd ("can: pch_can: do not report txerr and rxerr during bus-off") Reported-by: Nathan Chancellor Signed-off-by: Vincent Mailhol Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/all/20220721160032.9348-1-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/pch_can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00e8c11c137b2e4b2bf54dc9881cf32e3441ddb4 Author: Takeshi Saito Date: Wed Jul 20 09:29:01 2022 +0200 mmc: renesas_sdhi: newer SoCs don't need manual tap correction The newest Gen3 SoCs and Gen4 SoCs do not need manual tap correction with HS400 anymore. So, instead of checking the SDHI version, add a quirk flag and set manual tap correction only for affected SoCs. Signed-off-by: Takeshi Saito [wsa: rebased, renamed the quirk variable, removed stale comment] Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20220720072901.1266-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi.h | 1 + drivers/mmc/host/renesas_sdhi_core.c | 5 ++--- drivers/mmc/host/renesas_sdhi_internal_dmac.c | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) commit 7ee480795e41db314f2c445c65ed854a5d6e8e32 Author: Liang He Date: Tue Jul 19 17:52:16 2022 +0800 mmc: cavium-thunderx: Add of_node_put() when breaking out of loop In thunder_mmc_probe(), we should call of_node_put() when breaking out of for_each_child_of_node() which has increased and decreased the refcount during each iteration. Fixes: 166bac38c3c5 ("mmc: cavium: Add MMC PCI driver for ThunderX SOCs") Signed-off-by: Liang He Acked-by: Robert Richter Link: https://lore.kernel.org/r/20220719095216.1241601-2-windhl@126.com Signed-off-by: Ulf Hansson drivers/mmc/host/cavium-thunderx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 19bbb49acf8d7a03cb83e05624363741a4c3ec6f Author: Liang He Date: Tue Jul 19 17:52:15 2022 +0800 mmc: cavium-octeon: Add of_node_put() when breaking out of loop In octeon_mmc_probe(), we should call of_node_put() when breaking out of for_each_child_of_node() which has increased and decreased the refcount during each iteration. Fixes: 01d95843335c ("mmc: cavium: Add MMC support for Octeon SOCs.") Signed-off-by: Liang He Acked-by: Robert Richter Link: https://lore.kernel.org/r/20220719095216.1241601-1-windhl@126.com Signed-off-by: Ulf Hansson drivers/mmc/host/cavium-octeon.c | 1 + 1 file changed, 1 insertion(+) commit 883c1d6fa4368a63cae2d6ae2d9c91141c60e233 Author: Liang He Date: Tue Jul 19 17:10:51 2022 +0800 mmc: core: quirks: Add of_node_put() when breaking out of loop In mmc_fixup_of_compatible_match(), we should call of_node_put() when breaking out of for_each_child_of_node() which will increase and decrease the refcount during one iteration. Fixes: b360b1102670 ("mmc: core: allow to match the device tree to apply quirks") Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220719091051.1210806-1-windhl@126.com Signed-off-by: Ulf Hansson drivers/mmc/core/quirks.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3bf65915cefa879e3693a824d8801a08e4778619 Author: Dan Williams Date: Sat May 21 16:24:14 2022 -0700 cxl/core: Define a 'struct cxl_endpoint_decoder' Previously the target routing specifics of switch decoders and platform CXL window resource tracking of root decoders were factored out of 'struct cxl_decoder'. While switch decoders translate from SPA to downstream ports, endpoint decoders translate from SPA to DPA. This patch, 3 of 3, adds a 'struct cxl_endpoint_decoder' that tracks an endpoint-specific Device Physical Address (DPA) resource. For now this just defines ->dpa_res, a follow-on patch will handle requesting DPA resource ranges from a device-DPA resource tree. Co-developed-by: Ben Widawsky Signed-off-by: Ben Widawsky Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784327088.1758207.15502834501671201192.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/hdm.c | 9 ++++++--- drivers/cxl/core/port.c | 31 +++++++++++++++++++++---------- drivers/cxl/cxl.h | 15 ++++++++++++++- tools/testing/cxl/test/cxl.c | 10 +++++++--- 4 files changed, 48 insertions(+), 17 deletions(-) commit 0f157c7fa1a0e1a55b602d8b269344392e9033ad Author: Dan Williams Date: Tue Jul 12 18:38:26 2022 -0700 cxl/core: Define a 'struct cxl_root_decoder' Previously the target routing specifics of switch decoders were factored out of 'struct cxl_decoder' into 'struct cxl_switch_decoder'. This patch, 2 of 3, adds a 'struct cxl_root_decoder' as a superset of a switch decoder that also track the associated CXL window platform resource. Note that the reason the resource for a given root decoder needs to be looked up after the fact (i.e. after cxl_parse_cfmws() and add_cxl_resource()) is because add_cxl_resource() may have merged CXL windows in order to keep them at the top of the resource tree / decode hierarchy. Co-developed-by: Ben Widawsky Signed-off-by: Ben Widawsky Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784326541.1758207.9915663937394448341.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/acpi.c | 40 ++++++++++++++++++++++++++++++++++++---- drivers/cxl/core/port.c | 34 +++++++++++++++++++++++++++------- drivers/cxl/cxl.h | 15 +++++++++++++-- 3 files changed, 76 insertions(+), 13 deletions(-) commit 974854ab0728532600c72e41a44d6ce1cf8f20a4 Author: Dan Williams Date: Tue Jul 12 18:37:54 2022 -0700 cxl/acpi: Track CXL resources in iomem_resource Recall that CXL capable address ranges, on ACPI platforms, are published in the CEDT.CFMWS (CXL Early Discovery Table: CXL Fixed Memory Window Structures). These windows represent both the actively mapped capacity and the potential address space that can be dynamically assigned to a new CXL decode configuration (region / interleave-set). CXL endpoints like DDR DIMMs can be mapped at any physical address including 0 and legacy ranges. There is an expectation and requirement that the /proc/iomem interface and the iomem_resource tree in the kernel reflect the full set of platform address ranges. I.e. that every address range that platform firmware and bus drivers enumerate be reflected as an iomem_resource entry. The hard requirement to do this for CXL arises from the fact that facilities like CONFIG_DEVICE_PRIVATE expect to be able to treat empty iomem_resource ranges as free for software to use as proxy address space. Without CXL publishing its potential address ranges in iomem_resource, the CONFIG_DEVICE_PRIVATE mechanism may inadvertently steal capacity reserved for runtime provisioning of new CXL regions. So, iomem_resource needs to know about both active and potential CXL resource ranges. The active CXL resources might already be reflected in iomem_resource as "System RAM". insert_resource_expand_to_fit() handles re-parenting "System RAM" underneath a CXL window. The "_expand_to_fit()" behavior handles cases where a CXL window is not a strict superset of an existing entry in the iomem_resource tree. The "_expand_to_fit()" behavior is acceptable from the perspective of resource allocation. The expansion happens because a conflicting resource range is already populated, which means the resource boundary expansion does not result in any additional free CXL address space being made available. CXL address space allocation is always bounded by the orginal unexpanded address range. However, the potential for expansion does mean that something like walk_iomem_res_desc(IORES_DESC_CXL...) can only return fuzzy answers on corner case platforms that cause the resource tree to expand a CXL window resource over a range that is not decoded by CXL. This would be an odd platform configuration, but if it becomes a problem in practice the CXL subsytem could just publish an API that returns definitive answers. Cc: Andrew Morton Cc: David Hildenbrand Cc: Jason Gunthorpe Cc: Tony Luck Cc: Christoph Hellwig Reviewed-by: Jonathan Cameron Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/165784325943.1758207.5310344844375305118.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/acpi.c | 144 +++++++++++++++++++++++++++++++++++++++++++++++-- include/linux/ioport.h | 1 + kernel/resource.c | 7 +++ 3 files changed, 149 insertions(+), 3 deletions(-) commit e636479e2f1b611892783405a302221e4f069e4f Author: Dan Williams Date: Wed May 18 17:52:23 2022 -0700 cxl/core: Define a 'struct cxl_switch_decoder' Currently 'struct cxl_decoder' contains the superset of attributes needed for all decoder types. Before more type-specific attributes are added to the common definition, reorganize 'struct cxl_decoder' into type specific objects. This patch, the first of three, factors out a cxl_switch_decoder type. See the new kdoc for what a 'struct cxl_switch_decoder' represents in a CXL topology. Co-developed-by: Ben Widawsky Signed-off-by: Ben Widawsky Reviewed-by: Jonathan Cameron Reported-by: kernel test robot Link: https://lore.kernel.org/r/165784325340.1758207.5064717153608954960.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/acpi.c | 4 +- drivers/cxl/core/hdm.c | 33 +++++--- drivers/cxl/core/port.c | 192 +++++++++++++++++++++++++++++-------------- drivers/cxl/cxl.h | 30 +++++-- tools/testing/cxl/test/cxl.c | 23 ++++-- 5 files changed, 191 insertions(+), 91 deletions(-) commit 9946e39fe8d0a5da9eb947d8e40a7ef204ba016e Author: Chuanhong Guo Date: Tue Jul 12 10:00:58 2022 +0800 ACPI: resource: skip IRQ override on AMD Zen platforms IRQ override isn't needed on modern AMD Zen systems. There's an active low keyboard IRQ on AMD Ryzen 6000 and it will stay this way on newer platforms. This IRQ override breaks keyboards for almost all Ryzen 6000 laptops currently on the market. Skip this IRQ override for all AMD Zen platforms because this IRQ override is supposed to be a workaround for buggy ACPI DSDT and we can't have a long list of all future AMD CPUs/Laptops in the kernel code. If a device with buggy ACPI DSDT shows up, a separated list containing just them should be created. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216118 Suggested-by: Mario Limonciello Signed-off-by: Chuanhong Guo Acked-by: Mario Limonciello Tested-by: XiaoYan Li Signed-off-by: Rafael J. Wysocki drivers/acpi/resource.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 9066e151c37950af92c3be6a7270daa8e8063db9 Author: Qifu Zhang Date: Tue Jul 19 19:50:13 2022 +0800 Documentation: ACPI: EINJ: Fix obsolete example Since commit 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()"), the EINJ debugfs interface no longer accepts negative values as input. Attempt to do so will result in EINVAL. Fixes: 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()") Signed-off-by: Qifu Zhang Reviewed-by: Tony Luck Signed-off-by: Rafael J. Wysocki Documentation/firmware-guide/acpi/apei/einj.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2bfab9c0edac5f6031e8956477cd39f7162b208d Author: Gao Xiang Date: Fri Jul 15 23:42:02 2022 +0800 erofs: record the longest decompressed size in this round Currently, `pcl->length' records the longest decompressed length as long as the pcluster itself isn't reclaimed. However, such number is unneeded for the general cases since it doesn't indicate the exact decompressed size in this round. Instead, let's record the decompressed size for this round instead, thus `pcl->nr_pages' can be completely dropped and pageofs_out is also designed to be kept in sync with `pcl->length'. Acked-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220715154203.48093-16-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 78 ++++++++++++++++++++------------------------------------ fs/erofs/zdata.h | 11 +++----- 2 files changed, 31 insertions(+), 58 deletions(-) commit 3fe96ee0f96d0b2117b0ef438e28c26655b370f8 Author: Gao Xiang Date: Fri Jul 15 23:42:01 2022 +0800 erofs: introduce z_erofs_do_decompressed_bvec() Both out_bvecs and in_bvecs share the common logic for decompressed buffers. So let's make a helper for this. Acked-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220715154203.48093-15-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 49 ++++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 27 deletions(-) commit fe3e5914e6dc8db743fa587748ce1d9ecd4a5dba Author: Gao Xiang Date: Fri Jul 15 23:42:00 2022 +0800 erofs: try to leave (de)compressed_pages on stack if possible For the most cases, small pclusters can be decompressed with page arrays on stack. Try to leave both (de)compressed_pages on stack if possible as before. Acked-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220715154203.48093-14-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) commit 4f05687fd7036473605a161ca47a2cf9fd3cbfc5 Author: Gao Xiang Date: Fri Jul 15 23:41:59 2022 +0800 erofs: introduce struct z_erofs_decompress_backend Let's introduce struct z_erofs_decompress_backend in order to pass on the decompression backend context between helper functions more easier and avoid too many arguments. Acked-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220715154203.48093-13-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 140 +++++++++++++++++++++++++++++-------------------------- fs/erofs/zdata.h | 3 +- 2 files changed, 76 insertions(+), 67 deletions(-) commit e73681877d4c3a8e28c8416300c36b10d4d6e9c1 Author: Gao Xiang Date: Fri Jul 15 23:41:58 2022 +0800 erofs: get rid of `z_pagemap_global' In order to introduce multi-reference pclusters for compressed data deduplication, let's get rid of the global page array for now since it needs to be re-designed then at least. Acked-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220715154203.48093-12-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 28 ++++------------------------ fs/erofs/zdata.h | 1 - 2 files changed, 4 insertions(+), 25 deletions(-) commit db166fc2020d300006a3aca15e539c09c948b62e Author: Gao Xiang Date: Fri Jul 15 23:41:57 2022 +0800 erofs: clean up `enum z_erofs_collectmode' `enum z_erofs_collectmode' is really ambiguous, but I'm not quite sure if there are better naming, basically it's used to judge whether inplace I/O can be used due to the current status of pclusters in the chain. Rename it as `enum z_erofs_pclustermode' instead. Acked-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220715154203.48093-11-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 63 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 32 deletions(-) commit 5b220b204c5fcd3d5c41f53b16d0e708f879c8c7 Author: Gao Xiang Date: Fri Jul 15 23:41:56 2022 +0800 erofs: get rid of `enum z_erofs_page_type' Remove it since pagevec[] is no longer used. Acked-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220715154203.48093-10-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) commit 671485516e1c303c82211b6d5017d5a270f8c215 Author: Gao Xiang Date: Fri Jul 15 23:41:55 2022 +0800 erofs: rework online page handling Since all decompressed offsets have been integrated to bvecs[], this patch avoids all sub-indexes so that page->private only includes a part count and an eio flag, thus in the future folio->private can have the same meaning. In addition, PG_error will not be used anymore after this patch and we're heading to use page->private (later folio->private) and page->mapping (later folio->mapping) only. Acked-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220715154203.48093-9-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 57 +++++++++++++++++++---------------------------- fs/erofs/zdata.h | 68 ++++++++++++++++---------------------------------------- 2 files changed, 42 insertions(+), 83 deletions(-) commit ed722fbccadb7445ac7decd8d0960c94c1a79ee4 Author: Gao Xiang Date: Fri Jul 15 23:41:54 2022 +0800 erofs: switch compressed_pages[] to bufvec Convert compressed_pages[] to bufvec in order to avoid using page->private to keep onlinepage_index (decompressed offset) for inplace I/O pages. In the future, we only rely on folio->private to keep a countdown to unlock folios and set folio_uptodate. Acked-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220715154203.48093-8-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 113 +++++++++++++++++++++++++++---------------------------- fs/erofs/zdata.h | 4 +- 2 files changed, 57 insertions(+), 60 deletions(-) commit 67139e36d970418a7881636820658766ef395455 Author: Gao Xiang Date: Fri Jul 15 23:41:53 2022 +0800 erofs: introduce `z_erofs_parse_in_bvecs' `z_erofs_decompress_pcluster()' is too long therefore it'd be better to introduce another helper to parse compressed pages (or laterly, compressed bvecs.) BTW, since `compressed_bvecs' is too long as a part of the function name, `in_bvecs' is used here instead. Acked-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220715154203.48093-7-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 132 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 80 insertions(+), 52 deletions(-) commit 387bab8716e20fc59223687c741b91f7ac0863ff Author: Gao Xiang Date: Fri Jul 15 23:41:52 2022 +0800 erofs: drop the old pagevec approach Remove the old pagevec approach but keep z_erofs_page_type for now. It will be reworked in the following commits as well. Also rename Z_EROFS_NR_INLINE_PAGEVECS as Z_EROFS_INLINE_BVECS with the new value 2 since it's actually enough to bootstrap. Acked-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220715154203.48093-6-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 21 +++++--- fs/erofs/zdata.h | 9 ++-- fs/erofs/zpvec.h | 159 ------------------------------------------------------- 3 files changed, 18 insertions(+), 171 deletions(-) commit 06a304cd9cc095d9c6537621ebde5169de7f8270 Author: Gao Xiang Date: Fri Jul 15 23:41:51 2022 +0800 erofs: introduce bufvec to store decompressed buffers For each pcluster, the total compressed buffers are determined in advance, yet the number of decompressed buffers actually vary. Too many decompressed pages can be recorded if one pcluster is highly compressed or its pcluster size is large. That takes extra memory footprints compared to uncompressed filesystems, especially a lot of I/O in flight on low-ended devices. Therefore, similar to inplace I/O, pagevec was introduced to reuse page cache to store these pointers in the time-sharing way since these pages are actually unused before decompressing. In order to make it more flexable, a cleaner bufvec is used to replace the old pagevec stuffs so that - Decompressed offsets can be stored inline, thus it can be used for the upcoming feature like compressed data deduplication. It's calculated by `page_offset(page) - map->m_la'; - Towards supporting large folios for compressed inodes since our final goal is to completely avoid page->private but use folio->private only for all page cache pages. Acked-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220715154203.48093-5-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 177 ++++++++++++++++++++++++++++++++++++++++--------------- fs/erofs/zdata.h | 26 ++++++-- 2 files changed, 153 insertions(+), 50 deletions(-) commit 42fec235f122cb1ae3bf20d91f14e9df0005848c Author: Gao Xiang Date: Fri Jul 15 23:41:50 2022 +0800 erofs: introduce `z_erofs_parse_out_bvecs()' `z_erofs_decompress_pcluster()' is too long therefore it'd be better to introduce another helper to parse decompressed pages (or laterly, decompressed bvecs.) BTW, since `decompressed_bvecs' is too long as a part of the function name, `out_bvecs' is used instead. Reviewed-by: Yue Hu Acked-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220715154203.48093-4-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 81 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 38 deletions(-) commit 0d823b424f1b74831f05fedb6700b5c69f5ecf6a Author: Gao Xiang Date: Fri Jul 15 23:41:49 2022 +0800 erofs: clean up z_erofs_collector_begin() Rearrange the code and get rid of all gotos. Reviewed-by: Yue Hu Acked-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220715154203.48093-3-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit 83a386c0a53d5f7387c08676e1733c27db77ec8a Author: Gao Xiang Date: Fri Jul 15 23:41:48 2022 +0800 erofs: get rid of unneeded `inode', `map' and `sb' Since commit 5c6dcc57e2e5 ("erofs: get rid of `struct z_erofs_collector'"), these arguments can be dropped as well. No logic changes. Reviewed-by: Yue Hu Acked-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20220715154203.48093-2-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 42 +++++++++++++++++++----------------------- 1 file changed, 19 insertions(+), 23 deletions(-) commit 1603f89935ec86d40a7667e1250392626976ccc2 Author: Bob Pearson Date: Thu Jul 14 15:46:20 2022 -0500 RDMA/rxe: Fix mw bind to allow any consumer key portion The current implementation of rxe_check_bind_mw() in rxe_mw.c is incorrect since it requires the new key portion provided by the mw consumer to be different than the previous key portion. This is not required by the IBA. Remove the test. Link: https://lore.kernel.org/linux-rdma/fb4614e7-4cac-0dc7-3ef7-766dfd10e8f2@gmail.com/ Fixes: 32a577b4c3a9 ("Add support for bind MW work requests") Link: https://lore.kernel.org/r/20220714204619.13396-1-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_mw.c | 7 ------- 1 file changed, 7 deletions(-) commit 0eabb1396656f215a5333a9444158b17b0fd3247 Author: Alexandru Gagniuc Date: Wed Jul 20 22:22:55 2022 -0500 hwmon: (tps23861) fix byte order in current and voltage registers Trying to use this driver on a big-endian machine results in garbage values for voltage and current. The tps23861 registers are little- endian, and regmap_read_bulk() does not do byte order conversion. Thus on BE machines, the most significant bytes got modified, and were trimmed by the VOLTAGE_CURRENT_MASK. To resolve this use uint16_t values, and convert them to host byte order using le16_to_cpu(). This results in correct readings on MIPS. Signed-off-by: Alexandru Gagniuc Link: https://lore.kernel.org/r/20220721032255.2850647-1-mr.nuke.me@gmail.com [groeck: Use __le16 instead of uint16_t] Signed-off-by: Guenter Roeck drivers/hwmon/tps23861.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 3b1ea71faccba3abbf71f9a2510c212e1783b6e1 Author: Paul Fertser Date: Thu Jul 14 17:23:44 2022 +0300 hwmon: (aspeed-pwm-tacho) increase fan tach period (again) The old value allows measuring fan speeds down to about 970 RPM and gives timeout for anything less than that. It is problematic because it can also be used as an indicator for fan failure or absence. Despite having read the relevant section of "ASPEED AST2500/AST2520 A2 Datasheet – V1.7" multiple times I wasn't able to figure out what exactly "fan tach period" and "fan tach falling point of period" mean (both are set by the driver from the constant this patch is amending). Experimentation with a Tioga Pass OCP board (AST2500 BMC) showed that value of 0x0108 gives time outs for speeds below 1500 RPM and the value offered by the patch is good for at least 750 RPM (the fans can't spin any slower so the lower bound is unknown). Measuring with the fans spinning takes about 30 ms, sometimes down to 18 ms, so about the same as with the previous value. This constant was last changed with commit 762b1e888013 ("hwmon: (aspeed-pwm-tacho) increase fan tach period") Signed-off-by: Paul Fertser Link: https://lore.kernel.org/r/20220714142344.27071-1-fercerpav@gmail.com Signed-off-by: Guenter Roeck drivers/hwmon/aspeed-pwm-tacho.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09e893092e005a191c1103c00d04806b5fd2e886 Author: Aleksa Savic Date: Sun Jul 17 19:14:12 2022 +0200 hwmon: (aquacomputer_d5next) Add D5 Next fan control support Define pump and fan speed register offsets in D5 Next control report, as well as its size, to expose PWM fan control. Originally-from: Jack Doan Signed-off-by: Aleksa Savic Link: https://lore.kernel.org/r/20220717171412.11142-1-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck drivers/hwmon/aquacomputer_d5next.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1e5b9e048cda4d284827d22546a4cb0904689c5d Author: Deming Wang Date: Thu Jun 9 22:08:38 2022 -0400 virtiofs: delete unused parameter for virtio_fs_cleanup_vqs fs parameter not used. So, it needs to be deleted. Signed-off-by: Deming Wang Reviewed-by: Stefan Hajnoczi Reviewed-by: Vivek Goyal Signed-off-by: Miklos Szeredi fs/fuse/virtio_fs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 9ccf47b26b73ecf5b7278a4cb8d487d8ebb4c095 Author: Dave Marchevsky Date: Mon Jul 11 10:48:08 2022 -0700 fuse: Add module param for CAP_SYS_ADMIN access bypassing allow_other Since commit 73f03c2b4b52 ("fuse: Restrict allow_other to the superblock's namespace or a descendant"), access to allow_other FUSE filesystems has been limited to users in the mounting user namespace or descendants. This prevents a process that is privileged in its userns - but not its parent namespaces - from mounting a FUSE fs w/ allow_other that is accessible to processes in parent namespaces. While this restriction makes sense overall it breaks a legitimate usecase: I have a tracing daemon which needs to peek into process' open files in order to symbolicate - similar to 'perf'. The daemon is a privileged process in the root userns, but is unable to peek into FUSE filesystems mounted by processes in child namespaces. This patch adds a module param, allow_sys_admin_access, to act as an escape hatch for this descendant userns logic and for the allow_other mount option in general. Setting allow_sys_admin_access allows processes with CAP_SYS_ADMIN in the initial userns to access FUSE filesystems irrespective of the mounting userns or whether allow_other was set. A sysadmin setting this param must trust FUSEs on the host to not DoS processes as described in 73f03c2b4b52. Signed-off-by: Dave Marchevsky Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Miklos Szeredi Documentation/filesystems/fuse.rst | 29 ++++++++++++++++++++++++----- fs/fuse/dir.c | 9 +++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) commit c64797809a64c73497082aa05e401a062ec1af34 Author: Xie Yongji Date: Mon Jul 18 16:50:12 2022 +0800 fuse: Remove the control interface for virtio-fs The commit 15c8e72e88e0 ("fuse: allow skipping control interface and forced unmount") tries to remove the control interface for virtio-fs since it does not support aborting requests which are being processed. But it doesn't work now. This patch fixes it by skipping creating the control interface if fuse_conn->no_control is set. Fixes: 15c8e72e88e0 ("fuse: allow skipping control interface and forced unmount") Signed-off-by: Xie Yongji Signed-off-by: Miklos Szeredi fs/fuse/control.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 02c0cab8e7345b06f1c0838df444e2902e4138d3 Author: Miklos Szeredi Date: Thu Jul 21 16:06:18 2022 +0200 fuse: ioctl: translate ENOSYS Overlayfs may fail to complete updates when a filesystem lacks fileattr/xattr syscall support and responds with an ENOSYS error code, resulting in an unexpected "Function not implemented" error. This bug may occur with FUSE filesystems, such as davfs2. Steps to reproduce: # install davfs2, e.g., apk add davfs2 mkdir /test mkdir /test/lower /test/upper /test/work /test/mnt yes '' | mount -t davfs -o ro http://some-web-dav-server/path \ /test/lower mount -t overlay -o upperdir=/test/upper,lowerdir=/test/lower \ -o workdir=/test/work overlay /test/mnt # when "some-file" exists in the lowerdir, this fails with "Function # not implemented", with dmesg showing "overlayfs: failed to retrieve # lower fileattr (/some-file, err=-38)" touch /test/mnt/some-file The underlying cause of this regresion is actually in FUSE, which fails to translate the ENOSYS error code returned by userspace filesystem (which means that the ioctl operation is not supported) to ENOTTY. Reported-by: Christian Kohlschütter Fixes: 72db82115d2b ("ovl: copy up sync/noatime fileattr flags") Fixes: 59efec7b9039 ("fuse: implement ioctl support") Cc: Signed-off-by: Miklos Szeredi fs/fuse/ioctl.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 47912eaa061a6a81e4aa790591a1874c650733c0 Author: Miklos Szeredi Date: Thu Jul 21 16:06:18 2022 +0200 fuse: limit nsec Limit nanoseconds to 0..999999999. Fixes: d8a5ba45457e ("[PATCH] FUSE - core") Cc: Signed-off-by: Miklos Szeredi fs/fuse/inode.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 47e301491c4f52ca744c7660cf57492b902261f6 Author: Jeffle Xu Date: Sat Apr 2 18:32:50 2022 +0800 fuse: avoid unnecessary spinlock bump Move dmap free worker kicker inside the critical region, so that extra spinlock lock/unlock could be avoided. Suggested-by: Liu Jiang Signed-off-by: Jeffle Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Vivek Goyal Signed-off-by: Miklos Szeredi fs/fuse/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2fdbb8dd01556e1501132b5ad3826e8f71e24a8b Author: Miklos Szeredi Date: Fri Apr 22 15:48:53 2022 +0200 fuse: fix deadlock between atomic O_TRUNC and page invalidation fuse_finish_open() will be called with FUSE_NOWRITE set in case of atomic O_TRUNC open(), so commit 76224355db75 ("fuse: truncate pagecache on atomic_o_trunc") replaced invalidate_inode_pages2() by truncate_pagecache() in such a case to avoid the A-A deadlock. However, we found another A-B-B-A deadlock related to the case above, which will cause the xfstests generic/464 testcase hung in our virtio-fs test environment. For example, consider two processes concurrently open one same file, one with O_TRUNC and another without O_TRUNC. The deadlock case is described below, if open(O_TRUNC) is already set_nowrite(acquired A), and is trying to lock a page (acquiring B), open() could have held the page lock (acquired B), and waiting on the page writeback (acquiring A). This would lead to deadlocks. open(O_TRUNC) ---------------------------------------------------------------- fuse_open_common inode_lock [C acquire] fuse_set_nowrite [A acquire] fuse_finish_open truncate_pagecache lock_page [B acquire] truncate_inode_page unlock_page [B release] fuse_release_nowrite [A release] inode_unlock [C release] ---------------------------------------------------------------- open() ---------------------------------------------------------------- fuse_open_common fuse_finish_open invalidate_inode_pages2 lock_page [B acquire] fuse_launder_page fuse_wait_on_page_writeback [A acquire & release] unlock_page [B release] ---------------------------------------------------------------- Besides this case, all calls of invalidate_inode_pages2() and invalidate_inode_pages2_range() in fuse code also can deadlock with open(O_TRUNC). Fix by moving the truncate_pagecache() call outside the nowrite protected region. The nowrite protection is only for delayed writeback (writeback_cache) case, where inode lock does not protect against truncation racing with writes on the server. Write syscalls racing with page cache truncation still get the inode lock protection. This patch also changes the order of filemap_invalidate_lock() vs. fuse_set_nowrite() in fuse_open_common(). This new order matches the order found in fuse_file_fallocate() and fuse_do_setattr(). Reported-by: Jiachen Zhang Tested-by: Jiachen Zhang Fixes: e4648309b85a ("fuse: truncate pending writes on O_TRUNC") Cc: Signed-off-by: Miklos Szeredi fs/fuse/dir.c | 7 ++++++- fs/fuse/file.c | 30 +++++++++++++++++------------- 2 files changed, 23 insertions(+), 14 deletions(-) commit 035ff33cf4db101250fb980a3941bf078f37a544 Author: Miklos Szeredi Date: Wed Apr 20 16:05:41 2022 +0200 fuse: write inode in fuse_release() A race between write(2) and close(2) allows pages to be dirtied after fuse_flush -> write_inode_now(). If these pages are not flushed from fuse_release(), then there might not be a writable open file later. So any remaining dirty pages must be written back before the file is released. This is a partial revert of the blamed commit. Reported-by: syzbot+6e1efbd8efaaa6860e91@syzkaller.appspotmail.com Fixes: 36ea23374d1f ("fuse: write inode in fuse_vma_close() instead of fuse_release()") Cc: # v5.16 Signed-off-by: Miklos Szeredi fs/fuse/file.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f66d59180bae2f0e8979962c3df4d445b3ac50d0 Author: XueBing Chen Date: Mon Jul 11 22:05:33 2022 +0800 dmaengine: xilinx: use strscpy to replace strlcpy The strlcpy should not be used because it doesn't limit the source length. Preferred is strscpy. Signed-off-by: XueBing Chen Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/39aa840f.e31.181ed9461c2.Coremail.chenxuebing@jari.cn Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_dpdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3c8d33e0d62175c31ca7ab7ab01b18f0b6318d3 Author: Antonio Borneo Date: Tue Jul 19 14:28:31 2022 +0200 scripts/gdb: fix 'lx-dmesg' on 32 bits arch The type atomic_long_t can have size 4 or 8 bytes, depending on CONFIG_64BIT; it's only content, the field 'counter', is either an int or a s64 value. Current code incorrectly uses the fixed size utils.read_u64() to read the field 'counter' inside atomic_long_t. On 32 bits architectures reading the last element 'tail_id' of the struct prb_desc_ring: struct prb_desc_ring { ... atomic_long_t tail_id; }; causes the utils.read_u64() to access outside the boundary of the struct and the gdb command 'lx-dmesg' exits with error: Python Exception : index out of range Error occurred in Python: index out of range Query the really used atomic_long_t counter type size. Link: https://lore.kernel.org/r/20220617143758.137307-1-antonio.borneo@foss.st.com Fixes: e60768311af8 ("scripts/gdb: update for lockless printk ringbuffer") Signed-off-by: Antonio Borneo [pmladek@suse.com: Query the really used atomic_long_t counter type size] Tested-by: Antonio Borneo Reviewed-by: John Ogness Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20220719122831.19890-1-pmladek@suse.com scripts/gdb/linux/dmesg.py | 9 +++------ scripts/gdb/linux/utils.py | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 8 deletions(-) commit e4866a0da4884c216c864c39737849649ef759a4 Merge: 96c1bbda5e23 01579b88a03a Author: Arnd Bergmann Date: Thu Jul 21 15:02:03 2022 +0200 Merge tag 'qcom-arm64-defconfig-for-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig Qualcomm ARM64 defconfig more updates for v5.20 This enables a few of the core drivers needed to boot the 8cx Gen 3 platform and demotes the Qualcomm USB PHY drivers to modules, as they don't need to be builtin. * tag 'qcom-arm64-defconfig-for-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: Demote Qualcomm USB PHYs to modules arm64: defconfig: Enable Qualcomm SC8280XP providers Link: https://lore.kernel.org/r/20220720230140.2113129-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit aef9d4a34a51f0a50b4cc04c635955b37972fc90 Author: Stanislav Fomichev Date: Wed Jul 20 09:47:29 2022 -0700 bpf: Check attach_func_proto more carefully in check_helper_call Syzkaller found a problem similar to d1a6edecc1fd ("bpf: Check attach_func_proto more carefully in check_return_code") where attach_func_proto might be NULL: RIP: 0010:check_helper_call+0x3dcb/0x8d50 kernel/bpf/verifier.c:7330 do_check kernel/bpf/verifier.c:12302 [inline] do_check_common+0x6e1e/0xb980 kernel/bpf/verifier.c:14610 do_check_main kernel/bpf/verifier.c:14673 [inline] bpf_check+0x661e/0xc520 kernel/bpf/verifier.c:15243 bpf_prog_load+0x11ae/0x1f80 kernel/bpf/syscall.c:2620 With the following reproducer: bpf$BPF_PROG_RAW_TRACEPOINT_LOAD(0x5, &(0x7f0000000780)={0xf, 0x4, &(0x7f0000000040)=@framed={{}, [@call={0x85, 0x0, 0x0, 0xbb}]}, &(0x7f0000000000)='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, '\x00', 0x0, 0x2b, 0xffffffffffffffff, 0x8, 0x0, 0x0, 0x10, 0x0}, 0x80) Let's do the same here, only check attach_func_proto for the prog types where we are certain that attach_func_proto is defined. Fixes: 69fd337a975c ("bpf: per-cgroup lsm flavor") Reported-by: syzbot+0f8d989b1fba1addc5e0@syzkaller.appspotmail.com Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20220720164729.147544-1-sdf@google.com kernel/bpf/verifier.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 99978d2fd90b9a43d187dae7b0f3266ccd980c5c Merge: f740949d41a7 c23b7d496789 Author: Arnd Bergmann Date: Thu Jul 21 15:00:18 2022 +0200 Merge tag 'qcom-drivers-for-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers More Qualcomm driver changes for v5.20 This adds support for booting secondary cores, SPM, SMD-RPM and RPM power-domain support for the MSM8909 platform. It drops an unnecessary print in icc-bwmon, corrects SA8540P entries in socinfo and a Kconfig build dependency for QCOM_RPMPD. Lastly it continues to clean up up the Devicetree bindings for the Qualcomm drivers. * tag 'qcom-drivers-for-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: dt-bindings: soc: qcom: qcom,smd-rpm: add power-controller dt-bindings: soc: qcom: aoss: document qcom,sm8450-aoss-qmp dt-bindings: soc: qcom,rpmh-rsc: simplify qcom,tcs-config ARM: mach-qcom: Add support for MSM8909 dt-bindings: arm: cpus: Document "qcom,msm8909-smp" enable-method soc: qcom: spm: Add CPU data for MSM8909 dt-bindings: soc: qcom: spm: Add MSM8909 CPU compatible soc: qcom: rpmpd: Add compatible for MSM8909 dt-bindings: power: qcom-rpmpd: Add MSM8909 power domains soc: qcom: smd-rpm: Add compatible for MSM8909 dt-bindings: soc: qcom: smd-rpm: Add MSM8909 soc: qcom: icc-bwmon: Remove unnecessary print function dev_err() soc: qcom: socinfo: Fix the id of SA8540P SoC soc: qcom: Make QCOM_RPMPD depend on PM Link: https://lore.kernel.org/r/20220720230648.2113609-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit 755d0ebc03f872c33b108534f23d82d2778c2793 Merge: 7e0b0cc16ba1 3b5a7ca7d252 Author: Arnd Bergmann Date: Thu Jul 21 14:59:23 2022 +0200 Merge tag 'at91-soc-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/soc AT91 SoC for 5.20 It contains updates for integration with OP-TEE by having a dummy outer_cache.write_sec function to avoid triggering exception when Linux tries to update secure registers. * tag 'at91-soc-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: at91: setup outer cache .write_sec() callback if needed ARM: at91: add sam_linux_is_optee_available() function Link: https://lore.kernel.org/r/20220721085852.1740924-1-claudiu.beznea@microchip.com Signed-off-by: Arnd Bergmann commit e0c7ea83f006ce8c3264ef8b6508a891d886ad4f Author: Shengjiu Wang Date: Thu Jul 7 11:00:29 2022 +0800 dmaengine: imx-sdma: Add FIFO stride support for multi FIFO script The peripheral may have several FIFOs, but some case just select some FIFOs from them for data transfer, which means FIFO0 and FIFO2 may be selected. So add FIFO address stride support, 0 means all FIFOs are continuous, 1 means 1 word stride between FIFOs. All stride between FIFOs should be same. Another option words_per_fifo means how many audio channel data copied to one FIFO one time, 1 means one channel per FIFO, 2 means 2 channels per FIFO. If 'n_fifos_src = 4' and 'words_per_fifo = 2', it means the first two words(channels) fetch from FIFO0 and then jump to FIFO1 for next two words, and so on after the last FIFO3 fetched, roll back to FIFO0. Signed-off-by: Joy Zou Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1657162829-9273-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Vinod Koul drivers/dma/imx-sdma.c | 27 +++++++++++++++++++++++++-- include/linux/dma/imx-dma.h | 13 +++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) commit 2c947cd63bfb90456d3daecaf8c3d0f6b8661739 Merge: 3d2b5fddd067 be497abe19bf Author: Arnd Bergmann Date: Thu Jul 21 14:56:56 2022 +0200 Merge tag 'qcom-arm64-for-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt More Qualcomm ARM64 DTS updates for v5.20 Related to SDM845, the Xiaomi Mi Mix2s is introduced, the DB845c on SDM845 gains support for the second GPI DMA controller and has the GENI I2C and SPI instances wired up to their respective GPI DMA controller. QCS404 USB controller and PHY assignment is corrected and IPQ8074 gains APCS definition to handle outgoing IPC interrupts. Lastly a range of Devicetree validation issues are addressed. * tag 'qcom-arm64-for-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (53 commits) arm64: dts: qcom: Add support for Xiaomi Mi Mix2s dt-bindings: arm: qcom: Add Xiaomi Mi Mix2s bindings dt-bindings: arm: qcom: Document lg,judyln and lg,judyp devices dt-bindings: arm: qcom: add missing SM6350 board compatibles dt-bindings: arm: qcom: add missing SM6125 board compatibles dt-bindings: arm: qcom: add missing SDM845 board compatibles dt-bindings: arm: qcom: add missing SDM636 board compatibles dt-bindings: arm: qcom: add missing SDM630 board compatibles dt-bindings: arm: qcom: add missing QCS404 board compatibles dt-bindings: arm: qcom: add missing MSM8992 board compatibles dt-bindings: arm: qcom: add missing MSM8998 board compatibles dt-bindings: vendor-prefixes: add Shift GmbH dt-bindings: arm: qcom: add missing SM8350 board compatibles dt-bindings: arm: qcom: add missing SM8250 board compatibles dt-bindings: arm: qcom: add missing SM8150 board compatibles dt-bindings: arm: qcom: add missing MSM8994 board compatibles dt-bindings: arm: qcom: add missing MSM8916 board compatibles dt-bindings: arm: qcom: fix MSM8994 boards compatibles dt-bindings: arm: qcom: fix MSM8916 MTP compatibles dt-bindings: arm: qcom: fix Longcheer L8150 compatibles ... Link: https://lore.kernel.org/r/20220720231643.2114565-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit 3d2b5fddd067080c8930bd51f72cf3a21a310c4c Merge: d44108d84411 aa7fd3bb6017 Author: Arnd Bergmann Date: Thu Jul 21 14:55:25 2022 +0200 Merge tag 'qcom-dts-for-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt More Qualcomm DTS updates for v5.20 This adds an additional GSBI, hwclock, smem and tsens nodes for IPQ8064, in addition to fixing up and improving the existing descriptions of the platform. USB interrupts are reordered to please the Devicetree binding. The Light Pulse Generator is defined for PM8941 and LEDs are defined for the FairPhone2, Nexus 5 and Sony Xperia devices. * tag 'qcom-dts-for-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: qcom: add rpmcc missing clocks for apq/ipq8064 and msm8660 ARM: dts: qcom: msm8974: Disable remoteprocs by default ARM: dts: qcom: ipq8064: add missing smem compatible ARM: dts: qcom: ipq8064: add missing hwlock ARM: dts: qcom: ipq8064: add speedbin efuse nvmem node ARM: dts: qcom: ipq8064: fix and add some missing gsbi node ARM: dts: qcom: ipq8064: reduce pci IO size to 64K ARM: dts: qcom: ipq8064: disable usb phy by default ARM: dts: qcom: ipq8064: add missing snps,dwmac compatible for gmac ARM: dts: qcom: ipq8064: add specific dtsi with smb208 rpm regulators ARM: dts: qcom: ipq8064: add gsbi6 missing definition ARM: dts: qcom: ipq8064: add multiple missing pin definition ARM: dts: qcom: msm8974-hammerhead: Add notification LED ARM: dts: qcom: msm8974-FP2: Add notification LED ARM: dts: qcom: msm8974-sony: Enable LPG ARM: dts: qcom: Add LPG node to pm8941 ARM: dts: qcom: sdx65: reorder USB interrupts ARM: dts: qcom: apq8064: create tsens device node Link: https://lore.kernel.org/r/20220720231111.2114025-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit d44108d84411c1b8011953fcc1bfffb734b3c752 Merge: 390ffde2b97c 12f158808510 Author: Arnd Bergmann Date: Thu Jul 21 14:54:02 2022 +0200 Merge tag 'dt-bindings-aspeed-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into arm/dt Devicetree bindings for Aspeed boards 1. Document the compatibles of existing Aspeed-based boards. 2. Add jabil,rbp-bmc compatible. * tag 'dt-bindings-aspeed-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: dt-bindings: arm: aspeed: add Aspeed Evaluation boards dt-bindings: arm: aspeed: document board compatibles dt-bindings: arm: aspeed: document board compatibles Link: https://lore.kernel.org/r/20220721072415.11424-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit d0b55afa47694f6f61b40f578ede7bde1648fe48 Author: Fenghua Yu Date: Wed Jul 6 17:20:52 2022 -0700 dmaengine: idxd: Correct IAX operation code names Some IAX operation code nomenclatures are misleading or don't match with others: 1. Operation code 0x4c is Zero Compress 32. IAX_OPCODE_DECOMP_32 is a misleading name. Change it to IAX_OPCODE_ZERO_COMP_32. 2. Operation code 0x4d is Zero Compress 16. IAX_OPCODE_DECOMP_16 is a misleading name. Change it to IAX_OPCODE_ZERO_COMP_16. 3. IAX_OPCDE_FIND_UNIQUE is corrected to match with other nomenclatures. Co-developed-by: Li Zhang Signed-off-by: Li Zhang Signed-off-by: Fenghua Yu Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20220707002052.1546361-1-fenghua.yu@intel.com Signed-off-by: Vinod Koul include/uapi/linux/idxd.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit afde6727a9b66ff96e20d74ac392f3efdae1ceaf Author: Venkata Prasad Potturu Date: Thu Jul 21 11:50:34 2022 +0530 ASoC: amd: acp: Drop superfluous mmap callback Remove mmap callback as ASoC AMD drivers just call the standard mmap handler. Signed-off-by: Venkata Prasad Potturu Reviewed-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20220721062043.3016985-2-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown sound/soc/amd/acp/acp-platform.c | 8 -------- 1 file changed, 8 deletions(-) commit 93f53881473cbf6a364be36ccbb99568e04ffe59 Author: Venkata Prasad Potturu Date: Thu Jul 21 11:50:33 2022 +0530 ASoC: amd: acp: Modify local variables name to generic Change local variables name to be generic in irq handler. Signed-off-by: Venkata Prasad Potturu Reviewed-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20220721062043.3016985-1-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown sound/soc/amd/acp/acp-platform.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 673f58f62ca6fc98979d1cf3fe89c3ff33f29b2e Author: Christophe JAILLET Date: Thu Jul 21 11:02:22 2022 +0200 ASoC: qcom: q6dsp: Fix an off-by-one in q6adm_alloc_copp() find_first_zero_bit() returns MAX_COPPS_PER_PORT at max here. So 'idx' should be tested with ">=" or the test can't match. Fixes: 7b20b2be51e1 ("ASoC: qdsp6: q6adm: Add q6adm driver") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/0fca3271649736053eb9649d87e1ca01b056be40.1658394124.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown sound/soc/qcom/qdsp6/q6adm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 409a8652e909e323c715f3088e6c3133e37c8881 Author: Shengjiu Wang Date: Thu Jul 21 18:29:53 2022 +0800 ASoC: imx-card: use snd_pcm_format_t type for asrc_format Fix sparse warning: sound/soc/fsl/imx-card.c:653:59: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/imx-card.c:653:59: sparse: expected unsigned int [usertype] asrc_format sound/soc/fsl/imx-card.c:653:59: sparse: got restricted snd_pcm_format_t [usertype] sound/soc/fsl/imx-card.c:655:59: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/imx-card.c:655:59: sparse: expected unsigned int [usertype] asrc_format sound/soc/fsl/imx-card.c:655:59: sparse: got restricted snd_pcm_format_t [usertype] Fixes: aa736700f42f ("ASoC: imx-card: Add imx-card machine driver") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1658399393-28777-6-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/imx-card.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit de27216cf2d645c2fd14e513707bdcd54e5b1de4 Author: Shengjiu Wang Date: Thu Jul 21 18:29:52 2022 +0800 ASoC: fsl_easrc: use snd_pcm_format_t type for sample_format Fix sparse warning: sound/soc/fsl/fsl_easrc.c:562:33: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:563:34: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:565:38: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:566:39: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:608:33: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:609:34: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:615:40: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:616:41: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:1465:51: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl_easrc.c:1465:51: sparse: expected unsigned int sample_format sound/soc/fsl/fsl_easrc.c:1465:51: sparse: got restricted snd_pcm_format_t [usertype] format sound/soc/fsl/fsl_easrc.c:1467:52: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl_easrc.c:1467:52: sparse: expected unsigned int sample_format sound/soc/fsl/fsl_easrc.c:1467:52: sparse: got restricted snd_pcm_format_t [usertype] asrc_format sound/soc/fsl/fsl_easrc.c:1470:52: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl_easrc.c:1470:52: sparse: expected unsigned int sample_format sound/soc/fsl/fsl_easrc.c:1470:52: sparse: got restricted snd_pcm_format_t [usertype] format sound/soc/fsl/fsl_easrc.c:1472:51: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl_easrc.c:1472:51: sparse: expected unsigned int sample_format sound/soc/fsl/fsl_easrc.c:1472:51: sparse: got restricted snd_pcm_format_t [usertype] asrc_format sound/soc/fsl/fsl_easrc.c:1484:41: sparse: warning: incorrect type in argument 2 (different base types) sound/soc/fsl/fsl_easrc.c:1484:41: sparse: expected restricted snd_pcm_format_t [usertype] *in_raw_format sound/soc/fsl/fsl_easrc.c:1484:41: sparse: got unsigned int * sound/soc/fsl/fsl_easrc.c:1485:41: sparse: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl_easrc.c:1485:41: sparse: expected restricted snd_pcm_format_t [usertype] *out_raw_format sound/soc/fsl/fsl_easrc.c:1485:41: sparse: got unsigned int * sound/soc/fsl/fsl_easrc.c:1937:60: sparse: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl_easrc.c:1937:60: sparse: expected unsigned int [usertype] *out_value sound/soc/fsl/fsl_easrc.c:1937:60: sparse: got restricted snd_pcm_format_t * sound/soc/fsl/fsl_easrc.c:1943:49: sparse: warning: restricted snd_pcm_format_t degrades to integer Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1658399393-28777-5-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_easrc.c | 9 ++++++--- sound/soc/fsl/fsl_easrc.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) commit 6c7b077dad62178c33f9a3ae17f90d6b0bf6e2e5 Author: Shengjiu Wang Date: Thu Jul 21 18:29:51 2022 +0800 ASoC: fsl-asoc-card: force cast the asrc_format type Fix sparse warning: sound/soc/fsl/fsl-asoc-card.c:833:45: sparse: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl-asoc-card.c:833:45: sparse: expected unsigned int [usertype] *out_value sound/soc/fsl/fsl-asoc-card.c:833:45: sparse: got restricted snd_pcm_format_t * Fixes: 859e364302c5 ("ASoC: fsl-asoc-card: Support new property fsl, asrc-format") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1658399393-28777-4-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl-asoc-card.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c49932726de24405d45516b3f8ad2735714fdf05 Author: Shengjiu Wang Date: Thu Jul 21 18:29:50 2022 +0800 ASoC: fsl_asrc: force cast the asrc_format type Fix sparse warning: sound/soc/fsl/fsl_asrc.c:1177:60: sparse: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl_asrc.c:1177:60: sparse: expected unsigned int [usertype] *out_value sound/soc/fsl/fsl_asrc.c:1177:60: sparse: got restricted snd_pcm_format_t * sound/soc/fsl/fsl_asrc.c:1200:47: sparse: warning: restricted snd_pcm_format_t degrades to integer Fixes: 4520af41fd21 ("ASoC: fsl_asrc: Support new property fsl,asrc-format") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1658399393-28777-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_asrc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b17079d37fe1570019d7defd9e341d5c18aba8f5 Author: Shengjiu Wang Date: Thu Jul 21 18:29:49 2022 +0800 ASoC: fsl_sai: Don't use plain integer as NULL pointer Fix sparse warning: sound/soc/fsl/fsl_sai.c:64:39: sparse: warning: Using plain integer as NULL pointer Fixes: b4ee8a913e61 ("ASoc: fsl_sai: Add pinctrl operation for PDM and DSD") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1658399393-28777-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3266ee185b59e5aab3e0f982e5b7f95d31555a7 Author: Fabio Estevam Date: Wed Jul 6 08:13:27 2022 -0300 dmaengine: imx-dma: Cast of_device_get_match_data() with (uintptr_t) Change the of_device_get_match_data() cast to (uintptr_t) to silence the following clang warning: drivers/dma/imx-dma.c:1048:20: warning: cast to smaller integer type 'enum imx_dma_type' from 'const void *' [-Wvoid-pointer-to-enum-cast] Reported-by: kernel test robot Fixes: 0ab785c894e6 ("dmaengine: imx-dma: Remove unused .id_table") Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20220706111327.940764-1-festevam@gmail.com Signed-off-by: Vinod Koul drivers/dma/imx-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 820f5ce999d2f99961e88c16d65cd26764df0590 Author: Ben Dooks Date: Fri Jul 8 18:01:53 2022 +0100 dmaengine: dw-axi-dmac: ignore interrupt if no descriptor If the channel has no descriptor and the interrupt is raised then the kernel will OOPS. Check the result of vchan_next_desc() in the handler axi_chan_block_xfer_complete() to avoid the error happening. Signed-off-by: Ben Dooks Link: https://lore.kernel.org/r/20220708170153.269991-4-ben.dooks@sifive.com Signed-off-by: Vinod Koul drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 86cb0defe0e275453bc39e856bb523eb425a6537 Author: Ben Dooks Date: Fri Jul 8 18:01:52 2022 +0100 dmaengine: dw-axi-dmac: do not print NULL LLI during error During debugging we have seen an issue where axi_chan_dump_lli() is passed a NULL LLI pointer which ends up causing an OOPS due to trying to get fields from it. Simply print NULL LLI and exit to avoid this. Signed-off-by: Ben Dooks Link: https://lore.kernel.org/r/20220708170153.269991-3-ben.dooks@sifive.com Signed-off-by: Vinod Koul drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 5 +++++ 1 file changed, 5 insertions(+) commit 14229b8153a3ca51d97a22a18c68deeae64afce0 Author: Dan Carpenter Date: Tue Jul 19 12:53:01 2022 +0300 libbpf: Fix str_has_sfx()'s return value The return from strcmp() is inverted so it wrongly returns true instead of false and vice versa. Fixes: a1c9d61b19cb ("libbpf: Improve library identification for uprobe binary path resolution") Signed-off-by: Dan Carpenter Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Cc: Alan Maguire Link: https://lore.kernel.org/bpf/YtZ+/dAA195d99ak@kili tools/lib/bpf/libbpf_internal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c6018fc6e7b6fcc4ac5430870c2e8b4ca556621a Author: Dan Carpenter Date: Tue Jul 19 12:49:34 2022 +0300 libbpf: Fix sign expansion bug in btf_dump_get_enum_value() The code here is supposed to take a signed int and store it in a signed long long. Unfortunately, the way that the type promotion works with this conditional statement is that it takes a signed int, type promotes it to a __u32, and then stores that as a signed long long. The result is never negative. This is from static analysis, but I made a little test program just to test it before I sent the patch: #include int main(void) { unsigned long long src = -1ULL; signed long long dst1, dst2; int is_signed = 1; dst1 = is_signed ? *(int *)&src : *(unsigned int *)0; dst2 = is_signed ? (signed long long)*(int *)&src : *(unsigned int *)0; printf("%lld\n", dst1); printf("%lld\n", dst2); return 0; } Fixes: d90ec262b35b ("libbpf: Add enum64 support for btf_dump") Signed-off-by: Dan Carpenter Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/YtZ+LpgPADm7BeEd@kili tools/lib/bpf/btf_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94b179052f95c294d83e9c9c34f7833cf3cd4305 Author: Jason Gerecke Date: Fri Jul 15 16:05:19 2022 -0700 HID: wacom: Force pen out of prox if no events have been received in a while Prox-out events may not be reliably sent by some AES firmware. This can cause problems for users, particularly due to arbitration logic disabling touch input while the pen is in prox. This commit adds a timer which is reset every time a new prox event is received. When the timer expires we check to see if the pen is still in prox and force it out if necessary. This is patterend off of the same solution used by 'hid-letsketch' driver which has a similar problem. Link: https://github.com/linuxwacom/input-wacom/issues/310 Signed-off-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom.h | 3 +++ drivers/hid/wacom_sys.c | 2 ++ drivers/hid/wacom_wac.c | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) commit ab5f3404b7762b88403fbddbdda6b1b464bd6cbc Author: Guenter Roeck Date: Tue Jul 12 15:17:05 2022 -0700 HID: nintendo: Add missing array termination joycon_dpad_inputs_jc[] is unterminated. This may result in odd warnings such as input: input_set_capability: invalid code 3077588140 for type 1 or in kernel crashes in nintendo_hid_probe(). Terminate the array to fix the problem. Fixes: 2af16c1f846bd ("HID: nintendo: add nintendo switch controller driver") Cc: Daniel J. Ogorchock Signed-off-by: Guenter Roeck Reviewed-by: Dmitry Torokhov Cc: stable@vger.kernel.org Signed-off-by: Jiri Kosina drivers/hid/hid-nintendo.c | 1 + 1 file changed, 1 insertion(+) commit 12ffcd757860ed541f0dbb86bbd0ddac642e2e43 Author: Jason Wang Date: Fri Jul 15 13:43:12 2022 +0800 HID: lg-g15: Fix comment typo The double `with' is duplicated in line 769, remove one. Signed-off-by: Jason Wang Reviewed-by: Hans de Goede Signed-off-by: Jiri Kosina drivers/hid/hid-lg-g15.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93ce5e0231d79189be4d9e5f9295807b18941419 Author: Basavaraj Natikar Date: Tue Jul 12 23:48:36 2022 +0530 HID: amd_sfh: Implement SFH1.1 functionality Newer AMD SOCs use SFH1.1 memory access with new PCI-id. Hence add new sfh1_1 sub directory to implement SFH1.1 functionality by defining new PCI id, interface functions, descriptor functions and handlers which invokes sfh1.1. Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina drivers/hid/amd-sfh-hid/Makefile | 3 + drivers/hid/amd-sfh-hid/amd_sfh_common.h | 3 + drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 12 + drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_desc.c | 300 +++++++++++++++++++ drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c | 324 +++++++++++++++++++++ drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.h | 26 ++ drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c | 73 +++++ drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.h | 154 ++++++++++ 8 files changed, 895 insertions(+) commit 014730c40b793fd638b534356cb82c064b2955f5 Author: Basavaraj Natikar Date: Tue Jul 12 23:48:35 2022 +0530 HID: amd_sfh: Move interrupt handling to common interface Interrupt handling can be used in multiple files to support all AMD SOCs. Hence move interrupt handling to common interface. Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina drivers/hid/amd-sfh-hid/amd_sfh_client.c | 6 ++---- drivers/hid/amd-sfh-hid/amd_sfh_common.h | 4 ++++ drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 8 ++++---- 3 files changed, 10 insertions(+), 8 deletions(-) commit e7f535eaf08f1ea7d8f4ad7c2de2de25d927fd38 Author: Basavaraj Natikar Date: Tue Jul 12 23:48:34 2022 +0530 HID: amd_sfh: Move amd_sfh_work to common interface amd_sfh_work can be used in multiple files to support all AMD SOCs. Hence move amd_sfh_work to common interface. Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina drivers/hid/amd-sfh-hid/amd_sfh_client.c | 4 ++-- drivers/hid/amd-sfh-hid/amd_sfh_common.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit 87cb795291bb048d7f547db2f6b769bdb8e9be3b Author: Basavaraj Natikar Date: Tue Jul 12 23:48:33 2022 +0530 HID: amd_sfh: Move global functions to static Move global functions declared from header files and make them as static functions wherever applicable. Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina drivers/hid/amd-sfh-hid/amd_sfh_client.c | 4 ++-- drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 6 +++--- drivers/hid/amd-sfh-hid/amd_sfh_pcie.h | 7 ------- 3 files changed, 5 insertions(+), 12 deletions(-) commit 722658f86a23e5aa46f321e370503f557b20b0c8 Author: Basavaraj Natikar Date: Tue Jul 12 23:48:32 2022 +0530 HID: amd_sfh: Add remove operation in amd_mp2_ops Add remove operation as part of amd_mp2_ops structure to support all AMD SOCs and use wherever applicable. Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina drivers/hid/amd-sfh-hid/amd_sfh_common.h | 1 + drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 9acadc7256b16333f8e3e1b120471a9cb545a7e8 Author: Basavaraj Natikar Date: Tue Jul 12 23:48:31 2022 +0530 HID: amd_sfh: Add PM operations in amd_mp2_ops Add PM operations as part of amd_mp2_ops structure to support all AMD SOCs and use wherever applicable. Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina drivers/hid/amd-sfh-hid/amd_sfh_client.c | 54 ++++++++++++++++++++++++++++++++ drivers/hid/amd-sfh-hid/amd_sfh_common.h | 2 ++ drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 41 ++---------------------- 3 files changed, 58 insertions(+), 39 deletions(-) commit 786aa1b961d1b25f9480ae147e84e146f46fdca2 Author: Basavaraj Natikar Date: Tue Jul 12 23:48:30 2022 +0530 HID: amd_sfh: Add descriptor operations in amd_mp2_ops Add dynamic descriptor operations as part of amd_mp2_ops structure to support all AMD SOCs and use wherever applicable. Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina drivers/hid/amd-sfh-hid/amd_sfh_client.c | 33 +++++++++++++--------- drivers/hid/amd-sfh-hid/amd_sfh_common.h | 7 ++++- drivers/hid/amd-sfh-hid/amd_sfh_hid.h | 2 -- drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 4 +-- drivers/hid/amd-sfh-hid/amd_sfh_pcie.h | 1 + .../amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.c | 17 ++++++++--- .../amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.h | 3 -- 7 files changed, 42 insertions(+), 25 deletions(-) commit c092e274e0fcaae44a9e80a1cc6243b66976ae68 Author: Basavaraj Natikar Date: Tue Jul 12 23:48:29 2022 +0530 HID: amd_sfh: Move request_list variable to client data request_list variable can be used in multiple files to support all AMD SOCs. Hence move request_list variable to client data. Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina drivers/hid/amd-sfh-hid/amd_sfh_client.c | 12 +++++++----- drivers/hid/amd-sfh-hid/amd_sfh_hid.h | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) commit 8c68db65727e1d1e9c75c3e98d08e18afec86f1f Author: Basavaraj Natikar Date: Tue Jul 12 23:48:28 2022 +0530 HID: amd_sfh: Move request_list struct to header file request_list structure can be used in multiple files to support all AMD SOCs. Hence move request_list structure to header file. Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina drivers/hid/amd-sfh-hid/amd_sfh_client.c | 10 ---------- drivers/hid/amd-sfh-hid/amd_sfh_hid.h | 9 +++++++++ 2 files changed, 9 insertions(+), 10 deletions(-) commit 6947f312e5055f64cbcf227fb8c0ab9648473794 Author: Basavaraj Natikar Date: Tue Jul 12 23:48:27 2022 +0530 HID: amd_sfh: Move common macros and structures Introduce common macros and structures to support multiple generations of AMD SOCs, move them to amd_sfh_common.h. Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina drivers/hid/amd-sfh-hid/amd_sfh_common.h | 59 ++++++++++++++++++++++++++++++++ drivers/hid/amd-sfh-hid/amd_sfh_pcie.h | 42 +---------------------- 2 files changed, 60 insertions(+), 41 deletions(-) commit 06aa2a43c307cf4096f422dcb575e5d2913e528f Author: Basavaraj Natikar Date: Tue Jul 12 23:48:26 2022 +0530 HID: amd_sfh: Add NULL check for hid device On removal of hid device during SFH set report may cause NULL pointer exception. Hence add NULL check for hid device before accessing. Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)") Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina drivers/hid/amd-sfh-hid/amd_sfh_hid.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 4df4b0fe960c9cbad55d52dbe1b5ced51a2b4fd4 Author: Lukas Bulwahn Date: Fri Jul 1 13:27:20 2022 +0200 HID: core: remove unneeded assignment in hid_process_report() Commit bebcc522fbee ("HID: core: for input reports, process the usages by priority list") split the iteration into two distinct loops in hid_process_report(). After this change, the variable field is only used while iterating in the second loop and the assignment of values to this variable in the first loop is simply not needed. Remove the unneeded assignment during retrieval. No functional change and no change in the resulting object code. This was discovered as a dead store with clang-analyzer. Signed-off-by: Lukas Bulwahn Reviewed-by: Tom Rix Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5588d628027092e66195097bdf6835ddf64418b3 Author: Łukasz Spintzyk Date: Wed Jul 20 08:05:18 2022 +0200 net/cdc_ncm: Increase NTB max RX/TX values to 64kb DisplayLink ethernet devices require NTB buffers larger then 32kb in order to run with highest performance. This patch is changing upper limit of the rx and tx buffers. Those buffers are initialized with CDC_NCM_NTB_DEF_SIZE_RX and CDC_NCM_NTB_DEF_SIZE_TX which is 16kb so by default no device is affected by increased limit. Rx and tx buffer is increased under two conditions: - Device need to advertise that it supports higher buffer size in dwNtbMaxInMaxSize and dwNtbMaxOutMaxSize. - cdc_ncm/rx_max and cdc_ncm/tx_max driver parameters must be adjusted with udev rule or ethtool. Summary of testing and performance results: Tests were performed on following devices: - DisplayLink DL-3xxx family device - DisplayLink DL-6xxx family device - ASUS USB-C2500 2.5G USB3 ethernet adapter - Plugable USB3 1G USB3 ethernet adapter - EDIMAX EU-4307 USB-C ethernet adapter - Dell DBQBCBC064 USB-C ethernet adapter Performance measurements were done with: - iperf3 between two linux boxes - http://openspeedtest.com/ instance running on local test machine Insights from tests results: - All except one from third party usb adapters were not affected by increased buffer size to their advertised dwNtbOutMaxSize and dwNtbInMaxSize. Devices were generally reaching 912-940Mbps both download and upload. Only EDIMAX adapter experienced decreased download size from 929Mbps to 827Mbps with iper3, with openspeedtest decrease was from 968Mbps to 886Mbps. - DisplayLink DL-3xxx family devices experienced performance increase with iperf3 download from 300Mbps to 870Mbps and upload from 782Mbps to 844Mbps. With openspeedtest download increased from 556Mbps to 873Mbps and upload from 727Mbps to 973Mbps - DiplayLink DL-6xxx family devices are not affected by increased buffer size. Signed-off-by: Łukasz Spintzyk Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20220720060518.541-2-lukasz.spintzyk@synaptics.com Signed-off-by: Paolo Abeni include/linux/usb/cdc_ncm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 266c0190aee3e92a00e90d88e7b15c846055acb0 Author: Dominik Czerwik Date: Wed Jul 20 08:05:17 2022 +0200 net/cdc_ncm: Enable ZLP for DisplayLink ethernet devices This improves performance and stability of DL-3xxx/DL-5xxx/DL-6xxx device series. Specifically prevents device from temporary network dropouts when playing video from the web and network traffic going through is high. Signed-off-by: Dominik Czerwik Signed-off-by: Łukasz Spintzyk Link: https://lore.kernel.org/r/20220720060518.541-1-lukasz.spintzyk@synaptics.com Signed-off-by: Paolo Abeni drivers/net/usb/cdc_ncm.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 92443a9ff1208cdcd932273e141d1ec6bdfb3c0c Author: Jiang Jian Date: Tue Jun 21 20:27:51 2022 +0800 ID: intel-ish-hid: hid-client: drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: drivers/hid/intel-ish-hid/ishtp-hid-client.c line: 331 * @device: Pointer to the the ishtp client device for which this message changed to * @device: Pointer to the ishtp client device for which this message Signed-off-by: Jiang Jian Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp-hid-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62ac2473553a00229e67bdf3cb023b62cf7f5a9a Author: Harshit Mogalapalli Date: Mon Jun 20 09:28:24 2022 -0700 HID: mcp2221: prevent a buffer overflow in mcp_smbus_write() Smatch Warning: drivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy() '&mcp->txbuf[5]' too small (59 vs 255) drivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy() 'buf' too small (34 vs 255) The 'len' variable can take a value between 0-255 as it can come from data->block[0] and it is user data. So add an bound check to prevent a buffer overflow in memcpy(). Fixes: 67a95c21463d ("HID: mcp2221: add usb to i2c-smbus host bridge") Signed-off-by: Harshit Mogalapalli Signed-off-by: Jiri Kosina drivers/hid/hid-mcp2221.c | 3 +++ 1 file changed, 3 insertions(+) commit 5fadbd992996e9dda7ebcb62f5352866057bd619 Author: Yang Xu Date: Thu Jul 14 14:11:28 2022 +0800 ceph: rely on vfs for setgid stripping Now that we finished moving setgid stripping for regular files in setgid directories into the vfs, individual filesystem don't need to manually strip the setgid bit anymore. Drop the now unneeded code from ceph. Link: https://lore.kernel.org/r/1657779088-2242-4-git-send-email-xuyang2018.jy@fujitsu.com Reviewed-by: Xiubo Li Reviewed-by: Christian Brauner (Microsoft) Reviewed-and-Tested-by: Jeff Layton Signed-off-by: Yang Xu Signed-off-by: Christian Brauner (Microsoft) fs/ceph/file.c | 4 ---- 1 file changed, 4 deletions(-) commit 1639a49ccdce58ea248841ed9b23babcce6dbb0b Author: Yang Xu Date: Thu Jul 14 14:11:27 2022 +0800 fs: move S_ISGID stripping into the vfs_*() helpers Move setgid handling out of individual filesystems and into the VFS itself to stop the proliferation of setgid inheritance bugs. Creating files that have both the S_IXGRP and S_ISGID bit raised in directories that themselves have the S_ISGID bit set requires additional privileges to avoid security issues. When a filesystem creates a new inode it needs to take care that the caller is either in the group of the newly created inode or they have CAP_FSETID in their current user namespace and are privileged over the parent directory of the new inode. If any of these two conditions is true then the S_ISGID bit can be raised for an S_IXGRP file and if not it needs to be stripped. However, there are several key issues with the current implementation: * S_ISGID stripping logic is entangled with umask stripping. If a filesystem doesn't support or enable POSIX ACLs then umask stripping is done directly in the vfs before calling into the filesystem. If the filesystem does support POSIX ACLs then unmask stripping may be done in the filesystem itself when calling posix_acl_create(). Since umask stripping has an effect on S_ISGID inheritance, e.g., by stripping the S_IXGRP bit from the file to be created and all relevant filesystems have to call posix_acl_create() before inode_init_owner() where we currently take care of S_ISGID handling S_ISGID handling is order dependent. IOW, whether or not you get a setgid bit depends on POSIX ACLs and umask and in what order they are called. Note that technically filesystems are free to impose their own ordering between posix_acl_create() and inode_init_owner() meaning that there's additional ordering issues that influence S_SIGID inheritance. * Filesystems that don't rely on inode_init_owner() don't get S_ISGID stripping logic. While that may be intentional (e.g. network filesystems might just defer setgid stripping to a server) it is often just a security issue. This is not just ugly it's unsustainably messy especially since we do still have bugs in this area years after the initial round of setgid bugfixes. So the current state is quite messy and while we won't be able to make it completely clean as posix_acl_create() is still a filesystem specific call we can improve the S_SIGD stripping situation quite a bit by hoisting it out of inode_init_owner() and into the vfs creation operations. This means we alleviate the burden for filesystems to handle S_ISGID stripping correctly and can standardize the ordering between S_ISGID and umask stripping in the vfs. We add a new helper vfs_prepare_mode() so S_ISGID handling is now done in the VFS before umask handling. This has S_ISGID handling is unaffected unaffected by whether umask stripping is done by the VFS itself (if no POSIX ACLs are supported or enabled) or in the filesystem in posix_acl_create() (if POSIX ACLs are supported). The vfs_prepare_mode() helper is called directly in vfs_*() helpers that create new filesystem objects. We need to move them into there to make sure that filesystems like overlayfs hat have callchains like: sys_mknod() -> do_mknodat(mode) -> .mknod = ovl_mknod(mode) -> ovl_create(mode) -> vfs_mknod(mode) get S_ISGID stripping done when calling into lower filesystems via vfs_*() creation helpers. Moving vfs_prepare_mode() into e.g. vfs_mknod() takes care of that. This is in any case semantically cleaner because S_ISGID stripping is VFS security requirement. Security hooks so far have seen the mode with the umask applied but without S_ISGID handling done. The relevant hooks are called outside of vfs_*() creation helpers so by calling vfs_prepare_mode() from vfs_*() helpers the security hooks would now see the mode without umask stripping applied. For now we fix this by passing the mode with umask settings applied to not risk any regressions for LSM hooks. IOW, nothing changes for LSM hooks. It is worth pointing out that security hooks never saw the mode that is seen by the filesystem when actually creating the file. They have always been completely misplaced for that to work. The following filesystems use inode_init_owner() and thus relied on S_ISGID stripping: spufs, 9p, bfs, btrfs, ext2, ext4, f2fs, hfsplus, hugetlbfs, jfs, minix, nilfs2, ntfs3, ocfs2, omfs, overlayfs, ramfs, reiserfs, sysv, ubifs, udf, ufs, xfs, zonefs, bpf, tmpfs. All of the above filesystems end up calling inode_init_owner() when new filesystem objects are created through the ->mkdir(), ->mknod(), ->create(), ->tmpfile(), ->rename() inode operations. Since directories always inherit the S_ISGID bit with the exception of xfs when irix_sgid_inherit mode is turned on S_ISGID stripping doesn't apply. The ->symlink() and ->link() inode operations trivially inherit the mode from the target and the ->rename() inode operation inherits the mode from the source inode. All other creation inode operations will get S_ISGID handling via vfs_prepare_mode() when called from their relevant vfs_*() helpers. In addition to this there are filesystems which allow the creation of filesystem objects through ioctl()s or - in the case of spufs - circumventing the vfs in other ways. If filesystem objects are created through ioctl()s the vfs doesn't know about it and can't apply regular permission checking including S_ISGID logic. Therfore, a filesystem relying on S_ISGID stripping in inode_init_owner() in their ioctl() callpath will be affected by moving this logic into the vfs. We audited those filesystems: * btrfs allows the creation of filesystem objects through various ioctls(). Snapshot creation literally takes a snapshot and so the mode is fully preserved and S_ISGID stripping doesn't apply. Creating a new subvolum relies on inode_init_owner() in btrfs_new_subvol_inode() but only creates directories and doesn't raise S_ISGID. * ocfs2 has a peculiar implementation of reflinks. In contrast to e.g. xfs and btrfs FICLONE/FICLONERANGE ioctl() that is only concerned with the actual extents ocfs2 uses a separate ioctl() that also creates the target file. Iow, ocfs2 circumvents the vfs entirely here and did indeed rely on inode_init_owner() to strip the S_ISGID bit. This is the only place where a filesystem needs to call mode_strip_sgid() directly but this is self-inflicted pain. * spufs doesn't go through the vfs at all and doesn't use ioctl()s either. Instead it has a dedicated system call spufs_create() which allows the creation of filesystem objects. But spufs only creates directories and doesn't allo S_SIGID bits, i.e. it specifically only allows 0777 bits. * bpf uses vfs_mkobj() but also doesn't allow S_ISGID bits to be created. The patch will have an effect on ext2 when the EXT2_MOUNT_GRPID mount option is used, on ext4 when the EXT4_MOUNT_GRPID mount option is used, and on xfs when the XFS_FEAT_GRPID mount option is used. When any of these filesystems are mounted with their respective GRPID option then newly created files inherit the parent directories group unconditionally. In these cases non of the filesystems call inode_init_owner() and thus did never strip the S_ISGID bit for newly created files. Moving this logic into the VFS means that they now get the S_ISGID bit stripped. This is a user visible change. If this leads to regressions we will either need to figure out a better way or we need to revert. However, given the various setgid bugs that we found just in the last two years this is a regression risk we should take. Associated with this change is a new set of fstests to enforce the semantics for all new filesystems. Link: https://lore.kernel.org/ceph-devel/20220427092201.wvsdjbnc7b4dttaw@wittgenstein [1] Link: e014f37db1a2 ("xfs: use setattr_copy to set vfs inode attributes") [2] Link: 01ea173e103e ("xfs: fix up non-directory creation in SGID directories") [3] Link: fd84bfdddd16 ("ceph: fix up non-directory creation in SGID directories") [4] Link: https://lore.kernel.org/r/1657779088-2242-3-git-send-email-xuyang2018.jy@fujitsu.com Suggested-by: Dave Chinner Suggested-by: Christian Brauner (Microsoft) Reviewed-by: Darrick J. Wong Reviewed-and-Tested-by: Jeff Layton Signed-off-by: Yang Xu [: rewrote commit message] Signed-off-by: Christian Brauner (Microsoft) fs/inode.c | 2 -- fs/namei.c | 82 +++++++++++++++++++++++++++++++++++++++++++++++--------- fs/ocfs2/namei.c | 1 + 3 files changed, 70 insertions(+), 15 deletions(-) commit afef1e1a0223623d063a6df51dbc342c9517b948 Author: Tzung-Bi Shih Date: Wed Jul 20 04:47:54 2022 +0000 platform/chrome: cros_kunit_util: add default value for `msg->result` Add default value for `msg->result` so that it won't be garbage bytes when the mock list is empty. Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220720044754.4026295-3-tzungbi@kernel.org drivers/platform/chrome/cros_kunit_util.c | 6 +++++- drivers/platform/chrome/cros_kunit_util.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) commit f92dd1475b0644b4779eed6f937a1eebfb80d53d Author: Tzung-Bi Shih Date: Wed Jul 20 04:47:53 2022 +0000 platform/chrome: merge Kunit utils and test cases Merge CROS_KUNIT and CROS_EC_PROTO_KUNIT_TEST so that when they're built as modules cros_kunit_util doesn't need to export the symbols. Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220720044754.4026295-2-tzungbi@kernel.org drivers/platform/chrome/Kconfig | 10 ++-------- drivers/platform/chrome/Makefile | 5 +++-- drivers/platform/chrome/cros_kunit_util.c | 14 -------------- 3 files changed, 5 insertions(+), 24 deletions(-) commit a1a5482a2c6e38a3ebed32e571625c56a8cc41a6 Author: Peter Zijlstra Date: Fri Jun 17 16:52:06 2022 +0200 x86/extable: Fix ex_handler_msr() print condition On Fri, Jun 17, 2022 at 02:08:52PM +0300, Stephane Eranian wrote: > Some changes to the way invalid MSR accesses are reported by the > kernel is causing some problems with messages printed on the > console. > > We have seen several cases of ex_handler_msr() printing invalid MSR > accesses once but the callstack multiple times causing confusion on > the console. > The problem here is that another earlier commit (5.13): > > a358f40600b3 ("once: implement DO_ONCE_LITE for non-fast-path "do once" functionality") > > Modifies all the pr_*_once() calls to always return true claiming > that no caller is ever checking the return value of the functions. > > This is why we are seeing the callstack printed without the > associated printk() msg. Extract the ONCE_IF(cond) part into __ONCE_LTE_IF() and use that to implement DO_ONCE_LITE_IF() and fix the extable code. Fixes: a358f40600b3 ("once: implement DO_ONCE_LITE for non-fast-path "do once" functionality") Reported-by: Stephane Eranian Signed-off-by: Peter Zijlstra (Intel) Tested-by: Stephane Eranian Link: https://lkml.kernel.org/r/YqyVFsbviKjVGGZ9@worktop.programming.kicks-ass.net arch/x86/mm/extable.c | 16 +++++++++------- include/linux/once_lite.h | 20 ++++++++++++++++---- 2 files changed, 25 insertions(+), 11 deletions(-) commit 09d09531a51a24635bc3331f56d92ee7092f5516 Author: Peter Zijlstra Date: Wed Jul 20 12:04:21 2022 +0200 x86,nospec: Simplify {JMP,CALL}_NOSPEC Have {JMP,CALL}_NOSPEC generate the same code GCC does for indirect calls and rely on the objtool retpoline patching infrastructure. There's no reason these should be alternatives while the vast bulk of compiler generated retpolines are not. Signed-off-by: Peter Zijlstra (Intel) arch/x86/include/asm/nospec-branch.h | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 91caa5ae242465c3ab9fd473e50170faa7e944f4 Author: Cruz Zhao Date: Tue Jun 28 15:57:23 2022 +0800 sched/core: Fix the bug that task won't enqueue into core tree when update cookie In function sched_core_update_cookie(), a task will enqueue into the core tree only when it enqueued before, that is, if an uncookied task is cookied, it will not enqueue into the core tree until it enqueue again, which will result in unnecessary force idle. Here follows the scenario: CPU x and CPU y are a pair of SMT siblings. 1. Start task a running on CPU x without sleeping, and task b and task c running on CPU y without sleeping. 2. We create a cookie and share it to task a and task b, and then we create another cookie and share it to task c. 3. Simpling core_forceidle_sum of task a and b from /proc/PID/sched And we will find out that core_forceidle_sum of task a takes 30% time of the sampling period, which shouldn't happen as task a and b have the same cookie. Then we migrate task a to CPU x', migrate task b and c to CPU y', where CPU x' and CPU y' are a pair of SMT siblings, and sampling again, we will found out that core_forceidle_sum of task a and b are almost zero. To solve this problem, we enqueue the task into the core tree if it's on rq. Fixes: 6e33cad0af49("sched: Trivial core scheduling cookie management") Signed-off-by: Cruz Zhao Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1656403045-100840-2-git-send-email-CruzZhao@linux.alibaba.com kernel/sched/core_sched.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 5c66d1b9b30f737fcef85a0b75bfe0590e16b62a Author: Nicolas Saenz Julienne Date: Tue Jun 28 11:22:59 2022 +0200 nohz/full, sched/rt: Fix missed tick-reenabling bug in dequeue_task_rt() dequeue_task_rt() only decrements 'rt_rq->rt_nr_running' after having called sched_update_tick_dependency() preventing it from re-enabling the tick on systems that no longer have pending SCHED_RT tasks but have multiple runnable SCHED_OTHER tasks: dequeue_task_rt() dequeue_rt_entity() dequeue_rt_stack() dequeue_top_rt_rq() sub_nr_running() // decrements rq->nr_running sched_update_tick_dependency() sched_can_stop_tick() // checks rq->rt.rt_nr_running, ... __dequeue_rt_entity() dec_rt_tasks() // decrements rq->rt.rt_nr_running ... Every other scheduler class performs the operation in the opposite order, and sched_update_tick_dependency() expects the values to be updated as such. So avoid the misbehaviour by inverting the order in which the above operations are performed in the RT scheduler. Fixes: 76d92ac305f2 ("sched: Migrate sched to use new tick dependency mask model") Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Phil Auld Link: https://lore.kernel.org/r/20220628092259.330171-1-nsaenzju@redhat.com kernel/sched/rt.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 12f158808510b7810bda1fadd3e88ddc9e768db4 Author: Krzysztof Kozlowski Date: Sun May 29 12:49:24 2022 +0200 dt-bindings: arm: aspeed: add Aspeed Evaluation boards Document the new compatibles used on Aspeed Evaluation boards. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220529104928.79636-3-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/arm/aspeed/aspeed.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 5abb71b47cf338f650fcccda4b13e07faa157742 Author: Zhang Jiaming Date: Fri Jul 1 16:00:19 2022 +0800 RDMA/rxe: Fix spelling mistake in error print There is a spelling mistake (writeable) in function rxe_check_bind_mw. Fix it. Signed-off-by: Zhang Jiaming Reviewed-by: Bob Pearson Signed-off-by: Leon Romanovsky drivers/infiniband/sw/rxe/rxe_mw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf2200e8491b4b5558e70febd17ea83caddb6090 Merge: 4ab6e359f8df 2c7b9b936bdc Author: Jakub Kicinski Date: Wed Jul 20 21:05:44 2022 -0700 Merge branch 'net-ipa-move-configuration-data-files' Alex Elder says: ==================== net: ipa: move configuration data files This series moves the "ipa_data-vX.Y.c" files into a subdirectory. The first patch adds a Makefile variable containing the list of supported IPA versions, and uses it to simplify the way these files are specified. ==================== Link: https://lore.kernel.org/r/20220719150827.295248-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 2c7b9b936bdc6ff0a7a5f6aed8e55d27ca14807d Author: Alex Elder Date: Tue Jul 19 10:08:27 2022 -0500 net: ipa: move configuration data files into a subdirectory Reduce the clutter in the main IPA source directory by creating a new "data" subdirectory, and locating all of the configuration data files in there. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/Makefile | 2 +- drivers/net/ipa/{ => data}/ipa_data-v3.1.c | 0 drivers/net/ipa/{ => data}/ipa_data-v3.5.1.c | 0 drivers/net/ipa/{ => data}/ipa_data-v4.11.c | 0 drivers/net/ipa/{ => data}/ipa_data-v4.2.c | 0 drivers/net/ipa/{ => data}/ipa_data-v4.5.c | 0 drivers/net/ipa/{ => data}/ipa_data-v4.9.c | 0 7 files changed, 1 insertion(+), 1 deletion(-) commit ec2ea5e06c67f85c6541a74b661722a176be086f Author: Alex Elder Date: Tue Jul 19 10:08:26 2022 -0500 net: ipa: list supported IPA versions in the Makefile Create a variable in the Makefile listing the IPA versions supported by the driver. Use that to create the list of configuration data object files used (rather than listing them all individually). Add a SPDX license comment. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 4ab6e359f8dfac153c798369ff5938da2f43a0e1 Merge: d79e4164d0d5 616c4a83b6ea Author: Jakub Kicinski Date: Wed Jul 20 21:05:07 2022 -0700 Merge branch 'net-ipa-small-transaction-updates' Alex Elder says: ==================== net: ipa: small transaction updates Version 2 of this series corrects a misspelling of "outstanding" pointed out by the netdev test bots. (For some reason I don't see that when I run "checkpatch".) I found and fixed a second instance of that word being misspelled as well. This series includes three changes to the transaction code. The first adds a new transaction list that represents a distinct state that has not been maintained. The second moves a field in the transaction information structure, and reorders its initialization a bit. The third skips a function call when it is known not to be necessary. The last two are very small "leftover" patches. ==================== Link: https://lore.kernel.org/r/20220719181020.372697-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 616c4a83b6eaf2e517849d90203ac1c3f6f61b57 Author: Alex Elder Date: Tue Jul 19 13:10:20 2022 -0500 net: ipa: fix an outdated comment Since commit 8797972afff3d ("net: ipa: remove command info pool"), we don't allocate "command info" entries for command channel transactions. Fix a comment that seems to suggest we still do. (Even before that commit, the comment was out of place.) Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/gsi_trans.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c91c86d1bb61bd59d3b9a0b8003fe272fc9e774 Author: Alex Elder Date: Tue Jul 19 13:10:19 2022 -0500 net: ipa: report when the driver has been removed When the IPA driver has completed its initialization and setup stages, it emits a brief message to the log. Add a small message that reports when it has been removed. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/ipa_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 4d8996cbeeabba028714d0e0bd5957b5515cae43 Author: Alex Elder Date: Tue Jul 19 13:10:18 2022 -0500 net: ipa: skip some cleanup for unused transactions In gsi_trans_free(), there's no point in ipa_gsi_trans_release() if a transaction is unused. No used TREs means no IPA layer resources to clean up. So only call ipa_gsi_trans_release() if at least one TRE was used. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/gsi_trans.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4920065888fa27edf1cb3f2d03c6d1c245e493bf Author: Alex Elder Date: Tue Jul 19 13:10:17 2022 -0500 net: ipa: rearrange transaction initialization The transaction map is really associated with the transaction pool; move its definition earlier in the gsi_trans_info structure. Rearrange initialization in gsi_channel_trans_init() so it sets the tre_avail value first, then initializes the transaction pool, and finally allocating the transaction map. Update comments. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/gsi.h | 3 ++- drivers/net/ipa/gsi_trans.c | 60 +++++++++++++++++++++++---------------------- 2 files changed, 33 insertions(+), 30 deletions(-) commit b63f507c06e6835aaefe89faee220aefedad0a1d Author: Alex Elder Date: Tue Jul 19 13:10:16 2022 -0500 net: ipa: add a transaction committed list We currently put a transaction on the pending list when it has been committed. But until the channel's doorbell rings, these transactions aren't actually "owned" by the hardware yet. Add a new "committed" state (and list), to represent transactions that have been committed but not yet sent to hardware. Define "pending" to mean committed transactions that have been sent to hardware but have not yet completed. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/gsi.c | 5 ++++- drivers/net/ipa/gsi.h | 5 +++-- drivers/net/ipa/gsi_trans.c | 26 ++++++++++++++++++++++---- 3 files changed, 29 insertions(+), 7 deletions(-) commit d79e4164d0d51f5a39ee7208823335a5fee902e0 Author: Alex Elder Date: Tue Jul 19 14:16:39 2022 -0500 net: ipa: add an endpoint device attribute group Create a new attribute group meant to provide a single place that defines endpoint IDs that might be needed by user space. Not all defined endpoints are presented, and only those that are defined will be made visible. The new attributes use "extended" device attributes to hold endpoint IDs, which is a little more compact and efficient. Reimplement the existing modem endpoint ID attribute files using common code. Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20220719191639.373249-1-elder@linaro.org Signed-off-by: Jakub Kicinski .../ABI/testing/sysfs-devices-platform-soc-ipa | 62 +++++++++++++++---- drivers/net/ipa/ipa_main.c | 1 + drivers/net/ipa/ipa_sysfs.c | 69 ++++++++++++++++------ drivers/net/ipa/ipa_sysfs.h | 1 + 4 files changed, 102 insertions(+), 31 deletions(-) commit f12b86c0d60689aa3973bab1fcea0ead9d77e23b Author: Kuniyuki Iwashima Date: Tue Jul 19 17:57:50 2022 -0700 selftests: net: af_unix: Fix a build error of unix_connect.c. This patch fixes a build error reported in the link. [0] unix_connect.c: In function ‘unix_connect_test’: unix_connect.c:115:55: error: expected identifier before ‘(’ token #define offsetof(type, member) ((size_t)&((type *)0)->(member)) ^ unix_connect.c:128:12: note: in expansion of macro ‘offsetof’ addrlen = offsetof(struct sockaddr_un, sun_path) + variant->len; ^~~~~~~~ We can fix this by removing () around member, but checkpatch will complain about it, and the root cause of the build failure is that I followed the warning and fixed this in the v2 -> v3 change of the blamed commit. [1] CHECK: Macro argument 'member' may be better as '(member)' to avoid precedence issues #33: FILE: tools/testing/selftests/net/af_unix/unix_connect.c:115: +#define offsetof(type, member) ((size_t)&((type *)0)->member) To avoid this warning, let's use offsetof() defined in stddef.h instead. [0]: https://lore.kernel.org/linux-mm/202207182205.FrkMeDZT-lkp@intel.com/ [1]: https://lore.kernel.org/netdev/20220702154818.66761-1-kuniyu@amazon.com/ Fixes: e95ab1d85289 ("selftests: net: af_unix: Test connect() with different netns.") Reported-by: kernel test robot Suggested-by: Jakub Kicinski Signed-off-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20220720005750.16600-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski tools/testing/selftests/net/af_unix/unix_connect.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 09765fcd3c71c47bf160d325bf4cce5c5bb39292 Author: Jian Shen Date: Tue Jul 19 22:24:24 2022 +0800 net: amd8111e: remove repeated dev->features assignement It's repeated with line 1793-1795, and there isn't any other handling for it. So remove it. Signed-off-by: Jian Shen Link: https://lore.kernel.org/r/20220719142424.4528-1-shenjian15@huawei.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/amd/amd8111e.c | 3 --- 1 file changed, 3 deletions(-) commit 602ae008ab14165aa263103c38c54d2f89a85ead Merge: 47f058ce9807 aa8c7cdbae58 Author: Jakub Kicinski Date: Wed Jul 20 18:05:51 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next The following patchset contains Netfilter/IPVS updates for net-next: 1) Simplify nf_ct_get_tuple(), from Jackie Liu. 2) Add format to request_module() call, from Bill Wendling. 3) Add /proc/net/stats/nf_flowtable to monitor in-flight pending hardware offload objects to be processed, from Vlad Buslov. 4) Missing rcu annotation and accessors in the netfilter tree, from Florian Westphal. 5) Merge h323 conntrack helper nat hooks into single object, also from Florian. 6) A batch of update to fix sparse warnings treewide, from Florian Westphal. 7) Move nft_cmp_fast_mask() where it used, from Florian. 8) Missing const in nf_nat_initialized(), from James Yonan. 9) Use bitmap API for Maglev IPVS scheduler, from Christophe Jaillet. 10) Use refcount_inc instead of _inc_not_zero in flowtable, from Florian Westphal. 11) Remove pr_debug in xt_TPROXY, from Nathan Cancellor. * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next: netfilter: xt_TPROXY: remove pr_debug invocations netfilter: flowtable: prefer refcount_inc netfilter: ipvs: Use the bitmap API to allocate bitmaps netfilter: nf_nat: in nf_nat_initialized(), use const struct nf_conn * netfilter: nf_tables: move nft_cmp_fast_mask to where its used netfilter: nf_tables: use correct integer types netfilter: nf_tables: add and use BE register load-store helpers netfilter: nf_tables: use the correct get/put helpers netfilter: x_tables: use correct integer types netfilter: nfnetlink: add missing __be16 cast netfilter: nft_set_bitmap: Fix spelling mistake netfilter: h323: merge nat hook pointers into one netfilter: nf_conntrack: use rcu accessors where needed netfilter: nf_conntrack: add missing __rcu annotations netfilter: nf_flow_table: count pending offload workqueue tasks net/sched: act_ct: set 'net' pointer when creating new nf_flow_table netfilter: conntrack: use correct format characters netfilter: conntrack: use fallthrough to cleanup ==================== Link: https://lore.kernel.org/r/20220720230754.209053-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 47f058ce9807f662c86ac1a25694999efa2e6a52 Merge: 5fb859f79f4f 22df2e93622f Author: Jakub Kicinski Date: Wed Jul 20 17:54:46 2022 -0700 Merge tag 'mlx5-updates-2022-07-17' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2022-07-17 1) Add resiliency for lost completions for PTP TX port timestamp 2) Report Header-data split state via ethtool 3) Decouple HTB code from main regular TX code * tag 'mlx5-updates-2022-07-17' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: CT: Remove warning of ignore_flow_level support for non PF net/mlx5e: Add resiliency for PTP TX port timestamp net/mlx5: Expose ts_cqe_metadata_size2wqe_counter net/mlx5e: HTB, move htb functions to a new file net/mlx5e: HTB, change functions name to follow convention net/mlx5e: HTB, remove priv from htb function calls net/mlx5e: HTB, hide and dynamically allocate mlx5e_htb structure net/mlx5e: HTB, move stats and max_sqs to priv net/mlx5e: HTB, move section comment to the right place net/mlx5e: HTB, move ids to selq_params struct net/mlx5e: HTB, reduce visibility of htb functions net/mlx5e: Fix mqprio_rl handling on devlink reload net/mlx5e: Report header-data split state through ethtool ==================== Link: https://lore.kernel.org/r/20220719203529.51151-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit ef3ac3ae147c6ab370875727791e9b3eaf176cea Author: Abhinav Kumar Date: Fri Jul 15 12:14:28 2022 -0700 drm/msm/dpu: populate wb or intf before reset_intf_cfg dpu_encoder_helper_phys_cleanup() was not populating neither wb or intf to the intf_cfg before calling the reset_intf_cfg(). This causes the reset of the active bits of wb/intf to be skipped which is incorrect. Fix this by populating the relevant wb or intf indices correctly. Fixes: ae4d721ce100 ("drm/msm/dpu: add an API to reset the encoder related hw blocks") Signed-off-by: Abhinav Kumar Reviewed-by: Jessica Zhang Tested-by: Jessica Zhang # Trogdor (SC8170) Patchwork: https://patchwork.freedesktop.org/patch/494298/ Link: https://lore.kernel.org/r/1657912468-17254-1-git-send-email-quic_abhinavk@quicinc.com drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c78c2d0903183a41beb90c56a923e30f90fa91b9 Author: Darrick J. Wong Date: Tue Jul 19 09:14:55 2022 -0700 xfs: don't leak memory when attr fork loading fails I observed the following evidence of a memory leak while running xfs/399 from the xfs fsck test suite (edited for brevity): XFS (sde): Metadata corruption detected at xfs_attr_shortform_verify_struct.part.0+0x7b/0xb0 [xfs], inode 0x1172 attr fork XFS: Assertion failed: ip->i_af.if_u1.if_data == NULL, file: fs/xfs/libxfs/xfs_inode_fork.c, line: 315 ------------[ cut here ]------------ WARNING: CPU: 2 PID: 91635 at fs/xfs/xfs_message.c:104 assfail+0x46/0x4a [xfs] CPU: 2 PID: 91635 Comm: xfs_scrub Tainted: G W 5.19.0-rc7-xfsx #rc7 6e6475eb29fd9dda3181f81b7ca7ff961d277a40 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014 RIP: 0010:assfail+0x46/0x4a [xfs] Call Trace: xfs_ifork_zap_attr+0x7c/0xb0 xfs_iformat_attr_fork+0x86/0x110 xfs_inode_from_disk+0x41d/0x480 xfs_iget+0x389/0xd70 xfs_bulkstat_one_int+0x5b/0x540 xfs_bulkstat_iwalk+0x1e/0x30 xfs_iwalk_ag_recs+0xd1/0x160 xfs_iwalk_run_callbacks+0xb9/0x180 xfs_iwalk_ag+0x1d8/0x2e0 xfs_iwalk+0x141/0x220 xfs_bulkstat+0x105/0x180 xfs_ioc_bulkstat.constprop.0.isra.0+0xc5/0x130 xfs_file_ioctl+0xa5f/0xef0 __x64_sys_ioctl+0x82/0xa0 do_syscall_64+0x2b/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 This newly-added assertion checks that there aren't any incore data structures hanging off the incore fork when we're trying to reset its contents. From the call trace, it is evident that iget was trying to construct an incore inode from the ondisk inode, but the attr fork verifier failed and we were trying to undo all the memory allocations that we had done earlier. The three assertions in xfs_ifork_zap_attr check that the caller has already called xfs_idestroy_fork, which clearly has not been done here. As the zap function then zeroes the pointers, we've effectively leaked the memory. The shortest change would have been to insert an extra call to xfs_idestroy_fork, but it makes more sense to bundle the _idestroy_fork call into _zap_attr, since all other callsites call _idestroy_fork immediately prior to calling _zap_attr. IOWs, it eliminates one way to fail. Note: This change only applies cleanly to 2ed5b09b3e8f, since we just reworked the attr fork lifetime. However, I think this memory leak has existed since 0f45a1b20cd8, since the chain xfs_iformat_attr_fork -> xfs_iformat_local -> xfs_init_local_fork will allocate ifp->if_u1.if_data, but if xfs_ifork_verify_local_attr fails, xfs_iformat_attr_fork will free i_afp without freeing any of the stuff hanging off i_afp. The solution for older kernels I think is to add the missing call to xfs_idestroy_fork just prior to calling kmem_cache_free. Found by fuzzing a.sfattr.hdr.totsize = lastbit in xfs/399. Fixes: 2ed5b09b3e8f ("xfs: make inode attribute forks a permanent part of struct xfs_inode") Probably-Fixes: 0f45a1b20cd8 ("xfs: improve local fork verification") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_attr_leaf.c | 1 - fs/xfs/libxfs/xfs_inode_fork.c | 5 +---- fs/xfs/xfs_attr_inactive.c | 1 - fs/xfs/xfs_icache.c | 1 - 4 files changed, 1 insertion(+), 7 deletions(-) commit 1a53d3d426411326c22e591f0dfa8958db56485a Author: sunliming Date: Mon Jul 18 18:59:03 2022 -0700 xfs: fix for variable set but not used warning Fix below kernel warning: fs/xfs/scrub/repair.c:539:19: warning: variable 'agno' set but not used [-Wunused-but-set-variable] Reported-by: kernel test robot Signed-off-by: sunliming Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/scrub/repair.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 231f91ab504ecebcb88e942341b3d7dd91de45f1 Author: Dave Chinner Date: Mon Jul 18 18:20:37 2022 -0700 xfs: xfs_buf cache destroy isn't RCU safe Darrick and Sachin Sant reported that xfs/435 and xfs/436 would report an non-empty xfs_buf slab on module remove. This isn't easily to reproduce, but is clearly a side effect of converting the buffer caceh to RUC freeing and lockless lookups. Sachin bisected and Darrick hit it when testing the patchset directly. Turns out that the xfs_buf slab is not destroyed when all the other XFS slab caches are destroyed. Instead, it's got it's own little wrapper function that gets called separately, and so it doesn't have an rcu_barrier() call in it that is needed to drain all the rcu callbacks before the slab is destroyed. Fix it by removing the xfs_buf_init/terminate wrappers that just allocate and destroy the xfs_buf slab, and move them to the same place that all the other slab caches are set up and destroyed. Reported-and-tested-by: Sachin Sant Fixes: 298f34224506 ("xfs: lockless buffer lookup") Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_buf.c | 25 +------------------------ fs/xfs/xfs_buf.h | 6 ++---- fs/xfs/xfs_super.c | 22 +++++++++++++--------- 3 files changed, 16 insertions(+), 37 deletions(-) commit 3f52e016af600982989b5dee958d313c52483c92 Author: Dan Carpenter Date: Mon Jul 18 10:13:48 2022 -0700 xfs: delete unnecessary NULL checks These NULL check are no long needed after commit 2ed5b09b3e8f ("xfs: make inode attribute forks a permanent part of struct xfs_inode"). Signed-off-by: Dan Carpenter Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_inode_fork.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fdbae121b4369fe49eb5f8efbd23604ab4c50116 Author: Xiaole He Date: Mon Jul 18 10:13:47 2022 -0700 xfs: fix comment for start time value of inode with bigtime enabled The 'ctime', 'mtime', and 'atime' for inode is the type of 'xfs_timestamp_t', which is a 64-bit type: /* fs/xfs/libxfs/xfs_format.h begin */ typedef __be64 xfs_timestamp_t; /* fs/xfs/libxfs/xfs_format.h end */ When the 'bigtime' feature is disabled, this 64-bit type is splitted into two parts of 32-bit, one part is encoded for seconds since 1970-01-01 00:00:00 UTC, the other part is encoded for nanoseconds above the seconds, this two parts are the type of 'xfs_legacy_timestamp' and the min and max time value of this type are defined as macros 'XFS_LEGACY_TIME_MIN' and 'XFS_LEGACY_TIME_MAX': /* fs/xfs/libxfs/xfs_format.h begin */ struct xfs_legacy_timestamp { __be32 t_sec; /* timestamp seconds */ __be32 t_nsec; /* timestamp nanoseconds */ }; #define XFS_LEGACY_TIME_MIN ((int64_t)S32_MIN) #define XFS_LEGACY_TIME_MAX ((int64_t)S32_MAX) /* fs/xfs/libxfs/xfs_format.h end */ /* include/linux/limits.h begin */ #define U32_MAX ((u32)~0U) #define S32_MAX ((s32)(U32_MAX >> 1)) #define S32_MIN ((s32)(-S32_MAX - 1)) /* include/linux/limits.h end */ 'XFS_LEGACY_TIME_MIN' is the min time value of the 'xfs_legacy_timestamp', that is -(2^31) seconds relative to the 1970-01-01 00:00:00 UTC, it can be converted to human-friendly time value by 'date' command: /* command begin */ [root@~]# date --utc -d '@0' +'%Y-%m-%d %H:%M:%S' 1970-01-01 00:00:00 [root@~]# date --utc -d "@`echo '-(2^31)'|bc`" +'%Y-%m-%d %H:%M:%S' 1901-12-13 20:45:52 [root@~]# /* command end */ When 'bigtime' feature is enabled, this 64-bit type becomes a 64-bit nanoseconds counter, with the start time value is the min time value of 'xfs_legacy_timestamp'(start time means the value of 64-bit nanoseconds counter is 0). We have already caculated the min time value of 'xfs_legacy_timestamp', that is 1901-12-13 20:45:52 UTC, but the comment for the start time value of inode with 'bigtime' feature enabled writes the value is 1901-12-31 20:45:52 UTC: /* fs/xfs/libxfs/xfs_format.h begin */ /* * XFS Timestamps * ============== * When the bigtime feature is enabled, ondisk inode timestamps become an * unsigned 64-bit nanoseconds counter. This means that the bigtime inode * timestamp epoch is the start of the classic timestamp range, which is * Dec 31 20:45:52 UTC 1901. ... ... */ /* fs/xfs/libxfs/xfs_format.h end */ That is a typo, and this patch corrects the typo, from 'Dec 31' to 'Dec 13'. Suggested-by: Darrick J. Wong Signed-off-by: Xiaole He Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc6d2e305b41140e787fc6c21feab878baed0aa4 Merge: cd57272c4e68 1bcca73ee596 Author: Mark Brown Date: Thu Jul 21 00:11:35 2022 +0100 ASoC: mediatek: Add support for MT8186 SoC Merge series from Jiaxin Yu : This series of patches adds support for Mediatek AFE of MT8186 Soc. commit 5a491c9714d00ce81df18c3832c8602e1b137f5b Author: Jonathan Corbet Date: Wed Jul 20 15:23:13 2022 -0600 docs: Remove spurious tag from admin-guide/mm/overcommit-accounting.rst This tag is not used anywhere and clutters the file; just remove it. Signed-off-by: Jonathan Corbet Documentation/vm/overcommit-accounting.rst | 2 -- 1 file changed, 2 deletions(-) commit aa8c7cdbae58b695ed79a0129b6b8c887b25969f Author: Justin Stitt Date: Tue Jul 12 13:49:00 2022 -0700 netfilter: xt_TPROXY: remove pr_debug invocations pr_debug calls are no longer needed in this file. Pablo suggested "a patch to remove these pr_debug calls". This patch has some other beneficial collateral as it also silences multiple Clang -Wformat warnings that were present in the pr_debug calls. diff from v1 -> v2: * converted if statement one-liner style * x == NULL is now !x Suggested-by: Pablo Neira Ayuso Reviewed-by: Nathan Chancellor Signed-off-by: Justin Stitt Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_TPROXY.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) commit f02e7dc4cff80ee882dbc6e207e054f841e4c2e1 Author: Florian Westphal Date: Thu Jul 7 21:30:56 2022 +0200 netfilter: flowtable: prefer refcount_inc With refcount_inc_not_zero, we'd also need a smp_rmb or similar, followed by a test of the CONFIRMED bit. However, the ct pointer is taken from skb->_nfct, its refcount must not be 0 (else, we'd already have a use-after-free bug). Use refcount_inc() instead to clarify the ct refcount is expected to be at least 1. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_flow_table_core.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 5787db7c905323cb303a7c39d15fb2067e948adf Author: Christophe JAILLET Date: Mon Jul 4 21:24:46 2022 +0200 netfilter: ipvs: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Acked-by: Julian Anastasov Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_mh.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 554694ba120b87e39cf732ed632e6a0c52fafb7c Author: Fabio M. De Francesco Date: Wed Jul 20 18:19:32 2022 +0200 module: Replace kmap() with kmap_local_page() kmap() is being deprecated in favor of kmap_local_page(). Two main problems with kmap(): (1) It comes with an overhead as mapping space is restricted and protected by a global lock for synchronization and (2) it also requires global TLB invalidation when the kmap’s pool wraps and it might block when the mapping space is fully utilized until a slot becomes available. With kmap_local_page() the mappings are per thread, CPU local, can take page faults, and can be called from any context (including interrupts). Tasks can be preempted and, when scheduled to run again, the kernel virtual addresses are restored and still valid. kmap_local_page() is faster than kmap() in kernels with HIGHMEM enabled. Since the use of kmap_local_page() in module_gzip_decompress() and in module_xz_decompress() is safe (i.e., it does not break the strict rules of use), it should be preferred over kmap(). Therefore, replace kmap() with kmap_local_page(). Tested on a QEMU/KVM x86_32 VM with 4GB RAM, booting kernels with HIGHMEM64GB enabled. Modules compressed with XZ or GZIP decompress properly. Cc: Matthew Wilcox Suggested-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Signed-off-by: Luis Chamberlain kernel/module/decompress.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cbf4adfd4d19c39bc929359a04a466166f7b7d1e Author: Sotir Danailov Date: Fri Jul 15 23:13:07 2022 +0200 Documentation: process: Update email client instructions for Thunderbird The instructions don't match with the current Thunderbird interface. Clarification on using external extensions. New information on how to avoid writing HTML emails. Tell user to restart Thunderbird after modifications. Tested-by: Randy Dunlap Acked-by: Randy Dunlap Signed-off-by: Sotir Danailov Link: https://lore.kernel.org/r/20220715211307.9358-1-sndanailov@gmail.com Signed-off-by: Jonathan Corbet Documentation/process/email-clients.rst | 69 ++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 22 deletions(-) commit 40b1aa5973e48e1055161990dc9079fd3bea5dad Author: Jason A. Donenfeld Date: Wed Jul 20 14:31:31 2022 +0200 docs: ABI: correct QEMU fw_cfg spec path A few weeks ago, QEMU switched docs/specs/fw_cfg.txt to be docs/specs/fw_cfg.rst, so update the reference in the kernel docs to reflect this. Also add a link to the online documentation to make it easier to find. Cc: Simon Sapin Cc: Gabriel Somlo Signed-off-by: Jason A. Donenfeld Link: https://lore.kernel.org/r/20220720123131.341755-1-Jason@zx2c4.com Signed-off-by: Jonathan Corbet Documentation/ABI/testing/sysfs-firmware-qemu_fw_cfg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cd57272c4e686d4ad2d2e775a40a3eac9f96ec7c Author: Aidan MacDonald Date: Fri Jul 8 17:02:35 2022 +0100 ASoC: jz4740-i2s: Remove unused 'mem' resource This isn't used and doesn't need to be in the private data struct. Signed-off-by: Aidan MacDonald Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220708160244.21933-3-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown sound/soc/jz4740/jz4740-i2s.c | 1 - 1 file changed, 1 deletion(-) commit f4d92d9757e6b0adf24d227e414dac867555c9e2 Author: Amadeusz Sławiński Date: Wed Jul 20 14:51:15 2022 +0200 ASoC: Makefile: Fix simultaneous build of KUNIT tests Using obj-$() := instead of obj-$() += leads to the latter assignment overwriting earlier value. Fix this by using incremental assignment to add additional objects to build. Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220720125115.1785426-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown sound/soc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 79eb2711c919e6db10ed2b8fb22ab605121e80ea Author: Lukas Bulwahn Date: Wed Jul 20 14:04:43 2022 +0200 apparmor: correct config reference to intended one Commit 5bfcbd22ee4e ("apparmor: Enable tuning of policy paranoid load for embedded systems") introduces the config SECURITY_APPARMOR_PARANOID_LOAD, but then refers in the code to SECURITY_PARANOID_LOAD; note the missing APPARMOR in the middle. Correct this to the introduced and intended config option. Fixes: 5bfcbd22ee4e ("apparmor: Enable tuning of policy paranoid load for embedded systems") Signed-off-by: Lukas Bulwahn Signed-off-by: John Johansen security/apparmor/lsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d945cbcd4b16a29d6470a80dfb19738f9a4319f Author: Rodrigo Siqueira Date: Wed Jul 20 15:31:42 2022 -0400 drm/amd/display: Create a file dedicated to planes [Why] The amdgpu_dm file contains most of the code that works as an interface between DRM API and DC. As a result, this file becomes very large since it comprises multiple abstractions such as plane manipulation. [How] This commit extracts the plane code to its specific file named amdgpu_dm_plane. This change does not change anything inside the functions; the only exception is converting some static functions to a global function. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Acked-by: Alan Liu Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/Makefile | 7 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2220 ++++---------------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 1645 +++++++++++++++ .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.h | 73 + 4 files changed, 2103 insertions(+), 1842 deletions(-) commit 25f7cde8bad9fe5943851d3d602e9fddb7977961 Author: Wayne Lin Date: Wed Jul 20 15:11:56 2022 -0400 drm/amd/display: Add tags for indicating mst progress status [Why & How] In order to leverage igt tool to maintain mst feature, expose new debugfs entry "mst_progress_status". In our dm flow, record down the result of each phase of mst and user can examine the mst result by checking whether each phase get completed successfully. Tested-by: Daniel Wheeler Reviewed-by: Hersen Wu Acked-by: Alan Liu Signed-off-by: Wayne Lin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 20 ++++++++++ .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 46 +++++++++++++++++++++- .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 18 ++++++++- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 13 ++++++ 4 files changed, 94 insertions(+), 3 deletions(-) commit 8b076fa7c5befd1d3e1d892ae466f5334e4c6c99 Author: Wayne Lin Date: Tue Aug 17 18:58:31 2021 +0800 drm/amd/display: Add is_mst_connector debugfs entry [Why & How] Add "is_mst_connector" debugfs entry to help distinguish whether a connector is in a mst topology or not. Access it with the following command: cat /sys/kernel/debug/dri/0/DP-X/is_mst_connector Result: - "root" stands for the root connector of the topology - "branch" stands for branch device of the topology - "end" stands for leaf node connector of the topology - "no" stands for the connector is not a device of a mst topology Tested-by: Daniel Wheeler Reviewed-by: Hersen Wu Acked-by: Alan Liu Signed-off-by: Wayne Lin Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit c8a58ce18ca36b62749e326411176554462a5e2c Author: Wayne Lin Date: Tue Aug 17 18:14:42 2021 +0800 drm/amd/display: fix trigger_hotplug to support mst case [Why & How] Correct few problems below to have debugfs trigger_hotplug entry supports mst case * Adjust the place for acquiring the hpd_lock. We'll also access dc_link when simulate unplug * When detect the connector is a mst root, call reset_cur_dp_mst_topology() to simulate unplug * Don't support hotplug caused by CSN message since we can't change mst topology info directly. We can't simulate that * Clean up redundant code Tested-by: Daniel Wheeler Reviewed-by: Hersen Wu Acked-by: Alan Liu Signed-off-by: Wayne Lin Signed-off-by: Alex Deucher .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit aec4706b0e70e0cab2d0650b63cf2ddc1b154352 Author: Wayne Lin Date: Wed Jun 22 10:59:01 2022 +0800 drm/amd/display: Expose function reset_cur_dp_mst_topology [Why & How] Need to leverage this function out of dc_link.c. Change it to public. Tested-by: Daniel Wheeler Reviewed-by: Hersen Wu Acked-by: Alan Liu Signed-off-by: Wayne Lin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- drivers/gpu/drm/amd/display/dc/dc_link.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 044b5cb9e8bfe4f006546fd98148e95489a6e803 Author: Alvin Lee Date: Tue Jul 27 18:32:45 2021 -0400 drm/amd/display: Update in dml Update DML to configure drr_display in vba struct. Tested-by: Daniel Wheeler Reviewed-by: Dmytro Laktyushkin Acked-by: Alan Liu Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h | 1 + drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 1 + 2 files changed, 2 insertions(+) commit 0bf95a1ebd48866ad1438454061782d4d47765f7 Author: Jun Lei Date: Wed Sep 25 09:45:49 2019 -0400 drm/amd/display: Remove unused variable Remove an unused variable "remove_disconnect_edp" which was a workaround bit. Tested-by: Daniel Wheeler Acked-by: Alan Liu Signed-off-by: Jun Lei Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 - 1 file changed, 1 deletion(-) commit 8a9899c95d1cd709d441960ca325c6c8184978bb Author: Wayne Lin Date: Wed Mar 10 23:40:01 2021 +0800 drm/amd/display: Support vertical interrupt 0 for all dcn ASIC [Why] When CONFIG_DRM_AMD_SECURE_DISPLAY is enabled, it will try to register vertical interrupt 0 for specific task. Currently, only dcn10 have defined relevant info for vertical interrupt 0. If we enable CONFIG_DRM_AMD_SECURE_DISPLAY for other dcn ASIC, will get DC_IRQ_SOURCE_INVALID while calling dc_interrupt_to_irq_source() and cause pointer errors. [How] Add support of vertical interrupt 0 for all dcn ASIC. Tested-by: Daniel Wheeler Acked-by: Alan Liu Signed-off-by: Wayne Lin Signed-off-by: Alex Deucher .../drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c | 14 +++++++------- .../amd/display/dc/irq/dcn303/irq_service_dcn303.c | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+), 7 deletions(-) commit 615dc75fa6a7fc6cf029b01cdfc9d4b78919e71c Author: Kenneth Feng Date: Tue Jul 19 21:15:29 2022 +0800 drm/amd/pm: enable gfx ulv and gpo on smu_v13_0_7 enable gfx ulv and gpo on smu_v13_0_7 Signed-off-by: Kenneth Feng Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 4 ++++ 1 file changed, 4 insertions(+) commit fb3e8ed0438347c63650850c011c99deb59d7e62 Author: Maíra Canal Date: Thu Jul 14 13:44:57 2022 -0300 drm/amd/display: Change get_pipe_idx function scope Turn previously global function into a static function as it is not used outside the file. Reviewed-by: André Almeida Signed-off-by: Maíra Canal Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 2 +- drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 40835624efcde7f984cb859035b95b5a526d1a9f Author: Maíra Canal Date: Thu Jul 14 13:44:56 2022 -0300 drm/amdgpu: Write masked value to control register On the dce_v6_0 and dce_v8_0 hpd tear down callback, the tmp variable should be written into the control register instead of 0. Reviewed-by: André Almeida Signed-off-by: Maíra Canal Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit dc2b9c70ebca8e5661d33a15ed2b99d4510e90be Author: Gavin Wan Date: Mon Jul 18 15:30:51 2022 -0400 drm/amdgpu: fix scratch register access method in SRIOV The scratch register should be accessed through MMIO instead of RLCG in SRIOV, since it being used in RLCG register access function. Fixes: d54762cc3e6a ("drm/amdgpu: nuke dynamic gfx scratch reg allocation") Reviewed-by: Christian König Signed-off-by: Gavin Wan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 86bd6706c404ea703c11071d8b600d46bb98873c Author: Alex Sierra Date: Tue May 17 12:19:06 2022 -0500 drm/amdgpu: remove acc_size from reserve/unreserve mem TTM used to track the "acc_size" of all BOs internally. We needed to keep track of it in our memory reservation to avoid TTM running out of memory in its own accounting. However, that "acc_size" accounting has since been removed from TTM. Therefore we don't really need to track it any more. Signed-off-by: Alex Sierra Reviewed-by: Philip Yang Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 60 +++++++----------------- 1 file changed, 17 insertions(+), 43 deletions(-) commit 5df79aeb6e0890d6f5fd6e12c7ad238a1617b210 Author: Luben Tuikov Date: Wed Jul 20 15:04:18 2022 -0400 drm/amdgpu: Protect the amdgpu_bo_list list with a mutex v2 Protect the struct amdgpu_bo_list with a mutex. This is used during command submission in order to avoid buffer object corruption as recorded in the link below. v2 (chk): Keep the mutex looked for the whole CS to avoid using the list from multiple CS threads at the same time. Suggested-by: Christian König Cc: Alex Deucher Cc: Andrey Grodzovsky Cc: Vitaly Prosyak Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2048 Signed-off-by: Luben Tuikov Signed-off-by: Christian König Tested-by: Luben Tuikov Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 16 +++++++++++++--- 3 files changed, 19 insertions(+), 4 deletions(-) commit b87ee706b83eea9020772706aa47a9bf497f0366 Merge: a6229b53194f ca0e30b19dbe Author: Mark Brown Date: Wed Jul 20 20:42:30 2022 +0100 ASoC: dt-bindings: atmel-classd: Convert to Merge series from Ryan.Wanner@microchip.com : This patch series converts atmel-classd and atmel-pdmic device tree bindings to json-schema. commit 2f25a1fb4ec516c5ad67afd754334b491b9f09a5 Author: sunliming Date: Tue Jul 19 09:56:22 2022 +0800 drm/msm/dsi: fix the inconsistent indenting Fix the inconsistent indenting in function msm_dsi_dphy_timing_calc_v3(). Fix the following smatch warnings: drivers/gpu/drm/msm/dsi/phy/dsi_phy.c:350 msm_dsi_dphy_timing_calc_v3() warn: inconsistent indenting Fixes: f1fa7ff44056 ("drm/msm/dsi: implement auto PHY timing calculator for 10nm PHY") Reported-by: kernel test robot Signed-off-by: sunliming Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/494662/ Link: https://lore.kernel.org/r/20220719015622.646718-1-sunliming@kylinos.cn Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit deffa2d75db7e7a9a1fe3dad4f99310bff7b6449 Author: Kuogee Hsieh Date: Wed Jul 6 12:32:08 2022 -0700 drm/msm/dp: make eDP panel as the first connected connector Some userspace presumes that the first connected connector is the main display, where it's supposed to display e.g. the login screen. For laptops, this should be the main panel. This patch call drm_helper_move_panel_connectors_to_head() after drm_bridge_connector_init() to make sure eDP stay at head of connected connector list. This fixes unexpected corruption happen at eDP panel if eDP is not placed at head of connected connector list. Changes in v2: -- move drm_helper_move_panel_connectors_to_head() to dpu_kms_drm_obj_init() Changes in v4: -- move drm_helper_move_panel_connectors_to_head() to msm_drm_init() Signed-off-by: Kuogee Hsieh Reviewed-by: Abhinav Kumar Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Fixes: ef7837ff091c ("drm/msm/dp: Add DP controllers for sc7280") Patchwork: https://patchwork.freedesktop.org/patch/492581/ Link: https://lore.kernel.org/r/1657135928-31195-1-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/msm_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit a6229b53194fda971213f7f0be00f3d6c70a79c2 Author: Rob Herring Date: Tue Jul 19 15:51:34 2022 -0600 ASoC: dt-bindings: sgtl5000: Add missing type to 'micbias-voltage-m-volts' 'micbias-voltage-m-volts' is missing a type definition. '-m-volts' is not a standard unit (should be '-microvolt'). As the property is already in use, add a type reference. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220719215134.1877363-1-robh@kernel.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/sgtl5000.yaml | 1 + 1 file changed, 1 insertion(+) commit 9cb61fda8c71baaff423fe5be2e609100860fa78 Author: Stanislav Fomichev Date: Wed Jul 20 08:52:20 2022 -0700 bpf: Fix bpf_trampoline_{,un}link_cgroup_shim ifdef guards They were updated in kernel/bpf/trampoline.c to fix another build issue. We should to do the same for include/linux/bpf.h header. Fixes: 3908fcddc65d ("bpf: fix lsm_cgroup build errors on esoteric configs") Reported-by: Stephen Rothwell Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20220720155220.4087433-1-sdf@google.com include/linux/bpf.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit ebfa0043c96c7c7f645d0f96159bca988c873b6d Author: Angela Czubak Date: Wed Jul 20 11:15:28 2022 -0700 Input: deactivate MT slots when inhibiting or suspending devices When inhibiting or suspending a device we are sending release events for all currently held keys and buttons, however we retain active MT slot state, which causes issues with gesture recognition when we resume or uninhibit. Let's fix it by introducing, in addition to input_dev_release_keys(), nput_mt_release_slots() that will deactivate all currently active slots. Signed-off-by: Angela Czubak Link: https://lore.kernel.org/r/20220718151715.1052842-3-acz@semihalf.com Signed-off-by: Dmitry Torokhov drivers/input/input-core-private.h | 16 +++++++++++++ drivers/input/input-mt.c | 48 ++++++++++++++++++++++++++++++++++---- drivers/input/input.c | 30 ++++++++++++++++-------- 3 files changed, 80 insertions(+), 14 deletions(-) commit 59b7a5af8e8c22b20fc68eca48d7cfdc92501c1e Author: Dmitry Torokhov Date: Wed Jul 20 11:10:47 2022 -0700 Input: properly queue synthetic events We should not be passing synthetic events (such as autorepeat events) out of order with the events coming from the hardware device, but rather add them to pending events and flush them all at once. This also fixes an issue with timestamps for key release events carrying stale data from the previous autorepeat event. Reviewed-by: Angela Czubak Link: https://lore.kernel.org/r/YszNfq4b6MkeoCJC@google.com Signed-off-by: Dmitry Torokhov drivers/input/input.c | 125 +++++++++++++++++++++++++------------------------- 1 file changed, 63 insertions(+), 62 deletions(-) commit 41d0914d861e82b4eeec16dd0f6109c311cf4c7e Author: Arnaldo Carvalho de Melo Date: Wed Jul 20 14:59:22 2022 -0300 perf python: Ignore unused command line arguments when building with clang Noticed after switching to python3 by default on some older fedora releases: 35 38.20 fedora:27 : FAIL clang version 5.0.2 (tags/RELEASE_502/final) clang-5.0: error: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1' [-Werror,-Wunused-command-line-argument] clang-5.0: error: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1' [-Werror,-Wunused-command-line-argument] error: command 'clang' failed with exit status 1 Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/perl/Perf-Trace-Util/Build | 4 ++++ tools/perf/util/setup.py | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) commit be497abe19bf08fba549dd236624e7bb90597323 Author: Molly Sophia Date: Tue Jul 12 22:51:40 2022 +0800 arm64: dts: qcom: Add support for Xiaomi Mi Mix2s Add support for Xiaomi Mi Mix2s (polaris) handsets. Currently working features: - UFS - Touchscreen - USB 2 - Bluetooth - Wi-Fi - GPU - Venus - Display (need jdi-fhd-nt35596s panel driver, which I have sent a patch but it haven't been into upstream yet) Signed-off-by: Molly Sophia Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220712145139.9473-2-mollysophia379@gmail.com arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts | 762 +++++++++++++++++++++ 2 files changed, 763 insertions(+) commit 5aca0822aabf4fc9c33131f0d419289fefdc70ac Author: Molly Sophia Date: Tue Jul 12 22:51:38 2022 +0800 dt-bindings: arm: qcom: Add Xiaomi Mi Mix2s bindings Add documentation for "xiaomi,polaris" device. Signed-off-by: Molly Sophia Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220712145139.9473-1-mollysophia379@gmail.com Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) commit 23089eb6294dba58b625e7f0ec52d374d894031d Merge: ee912312db5a 650b014facca Author: Mark Brown Date: Wed Jul 20 19:06:27 2022 +0100 spi: npcm-fiu: add Arbel NPCM8XX support Merge series from Tomer Maimon : This patch set adds Arbel NPCM8XX Flash Interface Unit (FIU) support to FIU NPCM driver and modify direct read dummy configuration. NPCM8XX FIU supports four controllers. The NPCM FIU driver tested on NPCM845 evaluation board. commit 1ef5a4d1d03cfcdb6ea24bece9e9c63ce97764fe Author: Stefan Hansson Date: Sun Jun 26 12:45:36 2022 -0400 dt-bindings: arm: qcom: Document lg,judyln and lg,judyp devices Add binding documentation for the LG G7 and LG V35 smartphones which are based on Snapdragon 845 (sdm845). Signed-off-by: Stefan Hansson Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220626164536.16011-1-newbie13xd@gmail.com Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 8cfc5b60751bcf9b4c6bbab3f6a72d59e0156a89 Author: Jason Gunthorpe Date: Tue Jul 19 21:02:49 2022 -0300 vfio: Replace the iommu notifier with a device list Instead of bouncing the function call to the driver op through a blocking notifier just have the iommu layer call it directly. Register each device that is being attached to the iommu with the lower driver which then threads them on a linked list and calls the appropriate driver op at the right time. Currently the only use is if dma_unmap() is defined. Also, fully lock all the debugging tests on the pinning path that a dma_unmap is registered. Reviewed-by: Christoph Hellwig Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/2-v4-681e038e30fd+78-vfio_unmap_notif_jgg@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/vfio.c | 41 ++++------------ drivers/vfio/vfio.h | 12 ++--- drivers/vfio/vfio_iommu_type1.c | 103 +++++++++++++++++++++++++--------------- include/linux/vfio.h | 2 +- 4 files changed, 81 insertions(+), 77 deletions(-) commit ce4b4657ff18925c315855aa290e93c5fa652d96 Author: Jason Gunthorpe Date: Tue Jul 19 21:02:48 2022 -0300 vfio: Replace the DMA unmapping notifier with a callback Instead of having drivers register the notifier with explicit code just have them provide a dma_unmap callback op in their driver ops and rely on the core code to wire it up. Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Reviewed-by: Kevin Tian Reviewed-by: Tony Krowiak Reviewed-by: Eric Farman Reviewed-by: Zhenyu Wang Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/1-v4-681e038e30fd+78-vfio_unmap_notif_jgg@nvidia.com Signed-off-by: Alex Williamson drivers/gpu/drm/i915/gvt/gvt.h | 1 - drivers/gpu/drm/i915/gvt/kvmgt.c | 75 +++++--------------- drivers/s390/cio/vfio_ccw_ops.c | 39 +++------- drivers/s390/cio/vfio_ccw_private.h | 2 - drivers/s390/crypto/vfio_ap_ops.c | 53 +++----------- drivers/s390/crypto/vfio_ap_private.h | 3 - drivers/vfio/vfio.c | 129 ++++++++++++---------------------- drivers/vfio/vfio.h | 3 + include/linux/vfio.h | 21 ++---- 9 files changed, 86 insertions(+), 240 deletions(-) commit 31b3483aaa180b88f90861d5113c342442f3646f Author: Krzysztof Kozlowski Date: Sat May 21 18:45:47 2022 +0200 dt-bindings: arm: qcom: add missing SM6350 board compatibles Document board compatibles already present in Linux kernel. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220521164550.91115-9-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit d3ddba6a25dc16f2679717cec773118fc8baf5fa Author: Krzysztof Kozlowski Date: Sat May 21 18:45:46 2022 +0200 dt-bindings: arm: qcom: add missing SM6125 board compatibles Document board compatibles already present in Linux kernel. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220521164550.91115-8-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 33fae534d7b1420ea958955834cfa464c58e4305 Author: Krzysztof Kozlowski Date: Sat May 21 18:45:45 2022 +0200 dt-bindings: arm: qcom: add missing SDM845 board compatibles Document board compatibles already present in Linux kernel. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220521164550.91115-7-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/arm/qcom.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit ce23114d25dc68e3100057af31f6c4bfde138430 Author: Krzysztof Kozlowski Date: Sat May 21 18:45:44 2022 +0200 dt-bindings: arm: qcom: add missing SDM636 board compatibles Document board compatibles already present in Linux kernel. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220521164550.91115-6-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 0d45153fb9bb221480c27f637e56886bb387cb58 Author: Krzysztof Kozlowski Date: Sat May 21 18:45:43 2022 +0200 dt-bindings: arm: qcom: add missing SDM630 board compatibles Document board compatibles already present in Linux kernel. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220521164550.91115-5-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/arm/qcom.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) commit 09b75a927ffd453a4bc25d88d4c4dca3b12eaf99 Author: Krzysztof Kozlowski Date: Sat May 21 18:45:42 2022 +0200 dt-bindings: arm: qcom: add missing QCS404 board compatibles Document board compatibles already present in Linux kernel. In itself this resulted in a dt_binding_check in qcom-cpufrq-nvmem.yaml, which was reported by Rob, solved in below change by Krzysztof and acked by Viresh. The fix is squashed into this to avoid bisect problems. Link: https://lore.kernel.org/r/20220627143340.477120-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220521164550.91115-4-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/arm/qcom.yaml | 8 ++++++++ Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit ee912312db5a5e877120b9f519a034fc34315c9b Author: Krzysztof Kozlowski Date: Wed Jul 20 18:38:41 2022 +0200 spi: dt-bindings: qcom,spi-geni-qcom: allow three interconnects Recent Qualcomm Geni SPI nodes, e.g. on SM8450, come also with three interconnects. This fixes dtbs_check warnings like: sm8450-qrd.dtb: spi@a98000: interconnects: [[46, 1, 0, 46, 4, 0], [47, 2, 0, 48, 12, 0], [49, 1, 0, 50, 1, 0]] is too long sm8450-qrd.dtb: spi@a98000: interconnect-names: ['qup-core', 'qup-config', 'qup-memory'] is too long Fixes: 5bdcae1fe1c5 ("spi: dt-bindings: qcom,spi-geni-qcom: convert to dtschema") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220720163841.7283-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/qcom,spi-geni-qcom.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1bcca73ee596e46e84782514621062c0ddf9d24f Author: Jiaxin Yu Date: Tue Jul 19 00:22:04 2022 +0800 ASoC: mediatek: mt8186: add mt8186-mt6366-rt1019-rt5682s document Add document for mt8186 board with mt6366, rt1019 and rt5682s. Signed-off-by: Jiaxin Yu Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220718162204.26238-9-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown .../sound/mt8186-mt6366-rt1019-rt5682s.yaml | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit 8a8da1e6af18f51b719a142fde92e5db56a129a0 Author: Jiaxin Yu Date: Tue Jul 19 00:22:02 2022 +0800 ASoC: mediatek: mt8186: add mt8186-mt6366-da7219-max98357 document Add document for mt8186 board with mt6366, da7219 and max98357. Signed-off-by: Jiaxin Yu Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220718162204.26238-7-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown .../sound/mt8186-mt6366-da7219-max98357.yaml | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit 344afef6b980be569f4e9325778ca6869fed82cd Author: Jiaxin Yu Date: Tue Jul 19 00:22:00 2022 +0800 ASoC: mediatek: mt8186: add audio afe document Add mt8186 audio afe document. Signed-off-by: Jiaxin Yu Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220718162204.26238-5-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown .../devicetree/bindings/sound/mt8186-afe-pcm.yaml | 175 +++++++++++++++++++++ 1 file changed, 175 insertions(+) commit 8f57d8b149b1e46b4ffa707634fe76532ec89e83 Author: Jiaxin Yu Date: Tue Jul 19 00:21:57 2022 +0800 ASoC: mediatek: mt6358: add new compatible for using mt6366 Add new compatible string "mediatek,mt6366-sound" for using mt6366. Signed-off-by: Jiaxin Yu Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220718162204.26238-2-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/mt6358.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0da16e370dd7a17b33b6fa2769ad9536389a0e12 Author: Jiaxin Yu Date: Tue Jul 19 00:22:03 2022 +0800 ASoC: mediatek: mt8186: add machine driver with mt6366, rt1019 and rt5682s Add support for mt8186 board with mt6366, rt1019 and rt5682s. Signed-off-by: Jiaxin Yu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220718162204.26238-8-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/Kconfig | 16 + sound/soc/mediatek/mt8186/Makefile | 1 + .../mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c | 978 +++++++++++++++++++++ 3 files changed, 995 insertions(+) commit 3c6e24b65b53ce22c30492b9f239853b01d2d5b2 Author: Jiaxin Yu Date: Tue Jul 19 00:22:01 2022 +0800 ASoC: mediatek: mt8186: add machine driver with mt6366, da7219 and max98357 Add support for mt8186 board with mt6366, da7219 and max98357. Signed-off-by: Jiaxin Yu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220718162204.26238-6-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/Kconfig | 16 + sound/soc/mediatek/mt8186/Makefile | 1 + .../mt8186/mt8186-mt6366-da7219-max98357.c | 1002 ++++++++++++++++++++ 3 files changed, 1019 insertions(+) commit a809ded89d1d982ac05d8a3c6c943b49ff1b94fa Author: Jiaxin Yu Date: Tue Jul 19 00:21:59 2022 +0800 ASoC: mediatek: mt8186: add mt8186-mt6366 common driver Add mt8186-mt6366 common driver for mt8186 series machine. Signed-off-by: Jiaxin Yu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220718162204.26238-4-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/Makefile | 1 + sound/soc/mediatek/mt8186/mt8186-mt6366-common.c | 57 ++++++++++++++++++++++++ sound/soc/mediatek/mt8186/mt8186-mt6366-common.h | 17 +++++++ 3 files changed, 75 insertions(+) commit 097e874ad3fc69601e2b142ff3b638893c355b41 Author: Jiaxin Yu Date: Tue Jul 19 00:21:58 2022 +0800 ASoC: mediatek: mt8186: add platform driver Add mt8186 platform and affiliated driver. Signed-off-by: Jiaxin Yu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220718162204.26238-3-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/Kconfig | 12 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/mt8186/Makefile | 19 + sound/soc/mediatek/mt8186/mt8186-afe-clk.c | 3 +- sound/soc/mediatek/mt8186/mt8186-afe-clk.h | 2 +- sound/soc/mediatek/mt8186/mt8186-afe-common.h | 195 ++ sound/soc/mediatek/mt8186/mt8186-afe-control.c | 255 ++ sound/soc/mediatek/mt8186/mt8186-afe-pcm.c | 3000 ++++++++++++++++++++++++ 8 files changed, 3485 insertions(+), 2 deletions(-) commit f077c77699553ba57444178c5c2ebafdffc8ad95 Author: Arnaldo Carvalho de Melo Date: Wed Jul 20 13:21:45 2022 -0300 perf build: Avoid defining _FORTIFY_SOURCE multiple times One in perf's CFLAGS and the other in the distro python binding scripts. So if use the usual technique of first -D_FORTIFY_SOURCE then -D it. Noticed with: opensuse tumbleweed: gcc version 12.1.1 20220629 [revision 7811663964aa7e31c3939b859bbfa2e16919639f] (SUSE Linux) Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87abe344cd280802f431998fabfd35d2d340ca90 Author: Thomas Richter Date: Wed Jul 20 14:34:19 2022 +0200 perf test: Fix test case 83 ('perf stat CSV output linter') on s390 Perf test case 83: perf stat CSV output linter might fail on s390. The reason for this is the output of the command ./perf stat -x, -A -a --no-merge true which depends on a .config file setting. When CONFIG_SCHED_TOPOLOGY is set, the output of above perf command is CPU0,1.50,msec,cpu-clock,1502781,100.00,1.052,CPUs utilized When CONFIG_SCHED_TOPOLOGY is *NOT* set the output of above perf command is 0.95,msec,cpu-clock,949800,100.00,1.060,CPUs utilized Fix the test case to accept both output formats. Output before: # perf test 83 83: perf stat CSV output linter : FAILED! # Output after: # ./perf test 83 83: perf stat CSV output linter : Ok # Fixes: ec906102e5b7d339 ("perf test: Fix "perf stat CSV output linter" test on s390") Signed-off-by: Thomas Richter Acked-by: Ian Rogers Acked-by: Sumanth Korikkar Cc: Heiko Carstens Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20220720123419.220953-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/stat+csv_output.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f740949d41a7ff85aa23ce62c29d095066e5e6d4 Author: Arnd Bergmann Date: Wed Jul 20 17:58:18 2022 +0200 soc: a64fx-diag: disable modular build The NMI infrastructure cannot currently be used in loadable modules: ERROR: modpost: "free_nmi" [drivers/soc/fujitsu/a64fx-diag.ko] undefined! ERROR: modpost: "request_nmi" [drivers/soc/fujitsu/a64fx-diag.ko] undefined! ERROR: modpost: "enable_nmi" [drivers/soc/fujitsu/a64fx-diag.ko] undefined! Disable this for now to make allmodconfig build again. We may revisit this and export those symbols instead in the future. Reported-by: Sudip Mukherjee Signed-off-by: Arnd Bergmann drivers/soc/fujitsu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 650b014facca5238e25399f28da1e59747bddb99 Author: Tomer Maimon Date: Mon Jul 18 11:11:46 2022 +0300 spi: npcm-fiu: Add NPCM8XX support Adding FIU NPCM8XX support to NPCM FIU driver. NPCM8XX FIU supports four controllers. As part of adding NPCM8XX support: - Add NPCM8XX specific compatible string. - Using an internal burst configuration register instead of a GCR register. - Support FIU1 controller. Signed-off-by: Tomer Maimon Link: https://lore.kernel.org/r/20220718081146.256070-4-tmaimon77@gmail.com Signed-off-by: Mark Brown drivers/spi/spi-npcm-fiu.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit d50fef8ae939c2b50431fe6a11457e7ff85aea55 Author: Tomer Maimon Date: Mon Jul 18 11:11:45 2022 +0300 dt-binding: spi: Add npcm845 compatible to npcm-fiu document Add a compatible string and description for Nuvoton BMC NPCM845 FIU. Signed-off-by: Tomer Maimon Link: https://lore.kernel.org/r/20220718081146.256070-3-tmaimon77@gmail.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.txt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 7c3193f7890a03fc1b5b979f3f8dc8750ef47b13 Author: Tomer Maimon Date: Mon Jul 18 11:11:44 2022 +0300 spi: npcm-fiu: Modify direct read dummy configuration Modify NPCM BMC FIU direct read dummy configuration that according spi-mem direct read function. Signed-off-by: Tomer Maimon Link: https://lore.kernel.org/r/20220718081146.256070-2-tmaimon77@gmail.com Signed-off-by: Mark Brown drivers/spi/spi-npcm-fiu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 949506dc608f9820e0cee51b106c35fd3503bbb2 Author: William Breathitt Gray Date: Wed Jul 20 09:46:02 2022 -0400 gpio: gpio-mm: Implement and utilize register structures Reduce magic numbers and improve code readability by implementing and utilizing named register data structures. The GPIO-MM device features an Intel 8255 compatible GPIO interface, so the i8255 GPIO module is selected and utilized as well. Tested-by: Fred Eckert Reviewed-by: Linus Walleij Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski drivers/gpio/Kconfig | 1 + drivers/gpio/gpio-gpio-mm.c | 202 +++++++++----------------------------------- 2 files changed, 40 insertions(+), 163 deletions(-) commit 3ce632fdd13abd23686c29e81a924d47365b2eca Author: William Breathitt Gray Date: Wed Jul 20 09:46:01 2022 -0400 gpio: 104-idi-48: Implement and utilize register structures Reduce magic numbers and improve code readability by implementing and utilizing named register data structures. The 104-IDI-48 device features an Intel 8255 compatible GPIO interface, so the i8255 GPIO module is selected and utilized as well. Reviewed-by: Linus Walleij Cc: John Hentges Cc: Jay Dolan Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski drivers/gpio/Kconfig | 1 + drivers/gpio/gpio-104-idi-48.c | 143 +++++++++++++++++------------------------ 2 files changed, 61 insertions(+), 83 deletions(-) commit 71b7b3972590908fd724f4622cd908ad02464ad8 Author: William Breathitt Gray Date: Wed Jul 20 09:46:00 2022 -0400 gpio: 104-dio-48e: Implement and utilize register structures Reduce magic numbers and improve code readability by implementing and utilizing named register data structures. The 104-DIO-48E device features an Intel 8255 compatible GPIO interface, so the i8255 GPIO module is selected and utilized as well. Reviewed-by: Linus Walleij Cc: John Hentges Cc: Jay Dolan Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski drivers/gpio/Kconfig | 1 + drivers/gpio/gpio-104-dio-48e.c | 249 ++++++++++++---------------------------- 2 files changed, 75 insertions(+), 175 deletions(-) commit fb38af4a3a79c354771f335c671b144348d6d6fa Author: William Breathitt Gray Date: Wed Jul 20 09:45:59 2022 -0400 gpio: i8255: Introduce the Intel 8255 interface library module Exposes consumer library functions providing support for interfaces compatible with the venerable Intel 8255 Programmable Peripheral Interface (PPI). The Intel 8255 PPI first appeared in the early 1970s, initially for the Intel 8080 and later appearing in the original IBM-PC. The popularity of the original Intel 8255 chip led to many subsequent variants and clones of the interface in various chips and integrated circuits. Although still popular, interfaces compatible with the Intel 8255 PPI are nowdays typically found embedded in larger VLSI processing chips and FPGA components rather than as discrete ICs. A CONFIG_GPIO_I8255 Kconfig option is introduced by this patch. Modules wanting access to these i8255 library functions should select this Kconfig option, and import the I8255 symbol namespace. Tested-by: Fred Eckert Reviewed-by: Linus Walleij Cc: John Hentges Cc: Jay Dolan Cc: Andy Shevchenko Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski MAINTAINERS | 6 + drivers/gpio/Kconfig | 12 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-i8255.c | 287 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/gpio/gpio-i8255.h | 46 ++++++++ 5 files changed, 352 insertions(+) commit cc442e4db9cb851f18cd3ea0c933e016b29fafc3 Author: William Breathitt Gray Date: Wed Jul 20 09:45:58 2022 -0400 gpio: 104-idio-16: Implement and utilize register structures Reduce magic numbers and improve code readability by implementing and utilizing named register data structures. Tested-by: Fred Eckert Reviewed-by: Linus Walleij Cc: John Hentges Cc: Jay Dolan Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-104-idio-16.c | 60 ++++++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 18 deletions(-) commit 2c05a0f29f41cbb1e31e94a53e7dacf0622706bb Author: William Breathitt Gray Date: Wed Jul 20 09:45:57 2022 -0400 gpio: ws16c48: Implement and utilize register structures Reduce magic numbers and improve code readability by implementing and utilizing named register data structures. Reviewed-by: Linus Walleij Cc: Paul Demetrotion Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-ws16c48.c | 120 +++++++++++++++++++++++++++++++------------- 1 file changed, 84 insertions(+), 36 deletions(-) commit d906fa730827456711ce29c1f2994a0ccaff49dc Author: Mario Limonciello Date: Tue Jul 19 14:52:54 2022 -0500 hwmon: (k10temp): Add support for new family 17h and 19h models Add the support for CCD offsets used on family 17h models A0h-AFh, and family 19h models 60h-7Fh. [ bp: Merge into a single patch. ] Signed-off-by: Mario Limonciello Signed-off-by: Borislav Petkov Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20220719195256.1516-1-mario.limonciello@amd.com drivers/hwmon/k10temp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit f8faf3496633b302a6591fda599540a0b53a35bb Author: Mario Limonciello Date: Tue Jul 19 14:52:51 2022 -0500 x86/amd_nb: Add AMD PCI IDs for SMN communication Add support for SMN communication on family 17h model A0h and family 19h models 60h-70h. [ bp: Merge into a single patch. ] Signed-off-by: Mario Limonciello Signed-off-by: Borislav Petkov Reviewed-by: Yazen Ghannam Acked-by: Bjorn Helgaas # pci_ids.h Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20220719195256.1516-1-mario.limonciello@amd.com arch/x86/kernel/amd_nb.c | 13 +++++++++++++ include/linux/pci_ids.h | 3 +++ 2 files changed, 16 insertions(+) commit ebbc9570169147740aa39aee1d61b4cc5a631644 Author: Alexander Gordeev Date: Tue Jul 19 07:16:36 2022 +0200 s390/crash: support multi-segment iterators Make it possible to handle not only single-, but also multi- segment iterators in copy_oldmem_iter() callback. Change the semantics of called functions to match the iterator model - instead of an error code the exact number of bytes copied is returned. The swap page used to copy data to user space is adopted for kernel space too. That does not bring any performance impact. Suggested-by: Matthew Wilcox Fixes: cc02e6e21aa5 ("s390/crash: add missing iterator advance in copy_oldmem_page()") Acked-by: Heiko Carstens Tested-by: Alexander Egorenkov Link: https://lore.kernel.org/r/5af6da3a0bffe48a90b0b7139ecf6a818b2d18e8.1658206891.git.agordeev@linux.ibm.com Signed-off-by: Alexander Gordeev arch/s390/include/asm/os_info.h | 17 +++++- arch/s390/include/asm/sclp.h | 4 +- arch/s390/kernel/crash_dump.c | 128 +++++++--------------------------------- drivers/s390/char/zcore.c | 58 ++++++++---------- 4 files changed, 63 insertions(+), 144 deletions(-) commit 6d2e5a4a13da2e91a46a37cd00d23dba8613ad7b Author: Alexander Gordeev Date: Tue Jul 19 07:16:35 2022 +0200 s390/crash: use static swap buffer for copy_to_user_real() Currently a temporary page-size buffer is allocated for copying oldmem to user space. That limits copy_to_user_real() operation only to stages when virtual memory is available and still makes it possible to fail while the system is being dumped. Instead of reallocating single page on each copy_oldmem_page() iteration use a statically allocated buffer. This also paves the way for a further memcpy_real() rework where no swap buffer is needed altogether. Acked-by: Heiko Carstens Tested-by: Alexander Egorenkov Link: https://lore.kernel.org/r/334ed359680c4d45dd32feb104909f610312ef0f.1658206891.git.agordeev@linux.ibm.com Signed-off-by: Alexander Gordeev arch/s390/kernel/crash_dump.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit d6da67378198e4caa37404f87851659553b936b9 Author: Alexander Gordeev Date: Tue Jul 19 07:16:34 2022 +0200 s390/crash: move copy_to_user_real() to crash_dump.c Function copy_to_user_real() does not really belong to maccess.c. It is only used for copying oldmem to user space, so let's move it to the friends. Acked-by: Heiko Carstens Tested-by: Alexander Egorenkov Link: https://lore.kernel.org/r/e8de968d40202d87caa09aef12e9c67ec23a1c1a.1658206891.git.agordeev@linux.ibm.com Signed-off-by: Alexander Gordeev arch/s390/include/asm/uaccess.h | 1 - arch/s390/kernel/crash_dump.c | 26 ++++++++++++++++++++++++++ arch/s390/mm/maccess.c | 26 -------------------------- 3 files changed, 26 insertions(+), 27 deletions(-) commit 9ffed254d938c9e99eb7761c7f739294c84e0367 Author: Alexander Gordeev Date: Tue Jul 19 07:16:33 2022 +0200 s390/zcore: fix race when reading from hardware system area Memory buffer used for reading out data from hardware system area is not protected against concurrent access. Reported-by: Matthew Wilcox Fixes: 411ed3225733 ("[S390] zfcpdump support.") Acked-by: Heiko Carstens Tested-by: Alexander Egorenkov Link: https://lore.kernel.org/r/e68137f0f9a0d2558f37becc20af18e2939934f6.1658206891.git.agordeev@linux.ibm.com Signed-off-by: Alexander Gordeev drivers/s390/char/zcore.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit f6749da17a34eb08c9665f072ce7c812ff68aad2 Author: Alexander Gordeev Date: Fri Jul 15 12:59:33 2022 +0200 s390/crash: fix incorrect number of bytes to copy to user space The number of bytes in a chunk is correctly calculated, but instead the total number of bytes is passed to copy_to_user_real() function. Reported-by: Matthew Wilcox Fixes: df9694c7975f ("s390/dump: streamline oldmem copy functions") Signed-off-by: Alexander Gordeev arch/s390/kernel/crash_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86caa4b678956bc19567256dd8422f3978620897 Author: Alexander Gordeev Date: Fri Jul 15 12:02:33 2022 +0200 s390/crash: remove redundant panic() on save area allocation failure Make save_area_alloc() return classic NULL on allocation failure. The only caller smp_save_dump_cpus() does check the return value already and panics if NULL is returned. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/kernel/crash_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7190d84966b34de3892cd4eb8698a2229ceb8d82 Author: Alexander Gordeev Date: Fri Jul 15 06:43:32 2022 +0200 s390/mm: remove unused tprot() function Since commit 461e0da7ddbb ("s390: remove broken hibernate / power management support") there are no users of tprot() left. Remove the function itself as well. Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/mmu.h | 14 -------------- 1 file changed, 14 deletions(-) commit 02cb8d73c0d663cd7b38668963a92c743814d391 Author: Krzysztof Kozlowski Date: Sat May 21 18:45:41 2022 +0200 dt-bindings: arm: qcom: add missing MSM8992 board compatibles Document board compatibles already present in Linux kernel. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220521164550.91115-3-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/arm/qcom.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 8eb1b188caf70f3d15ed924a53dc0d74818524e8 Author: Krzysztof Kozlowski Date: Sat May 21 18:45:40 2022 +0200 dt-bindings: arm: qcom: add missing MSM8998 board compatibles Document board compatibles already present in Linux kernel. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220521164550.91115-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/arm/qcom.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 82a547bb3ceeb2b948da161a7ac8cf45987d36ec Author: Krzysztof Kozlowski Date: Sat May 21 18:45:39 2022 +0200 dt-bindings: vendor-prefixes: add Shift GmbH Add prefix for SHIFT GmbH, phone manufacturer (https://www.shiftphones.com/en/). Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220521164550.91115-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit baa36665348b9f8df2a4670afcbec86d3260a75e Author: Krzysztof Kozlowski Date: Fri May 20 14:32:52 2022 +0200 dt-bindings: arm: qcom: add missing SM8350 board compatibles Document several board compatibles already present in Linux kernel. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220520123252.365762-9-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/arm/qcom.yaml | 3 +++ 1 file changed, 3 insertions(+) commit c810f39aea90e29831585f190290bfd0ba63469f Author: Krzysztof Kozlowski Date: Fri May 20 14:32:51 2022 +0200 dt-bindings: arm: qcom: add missing SM8250 board compatibles Document several board compatibles already present in Linux kernel. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220520123252.365762-8-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/arm/qcom.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 1ce0ff93d711f756bf906e110c45adf16f078ffe Author: Krzysztof Kozlowski Date: Fri May 20 14:32:50 2022 +0200 dt-bindings: arm: qcom: add missing SM8150 board compatibles Document several board compatibles already present in Linux kernel. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220520123252.365762-7-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/arm/qcom.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 940780880200c5b1dc48b0bd4f455c4fa50749af Author: Krzysztof Kozlowski Date: Fri May 20 14:32:49 2022 +0200 dt-bindings: arm: qcom: add missing MSM8994 board compatibles Document several board compatibles already present in Linux kernel. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220520123252.365762-6-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/arm/qcom.yaml | 3 +++ 1 file changed, 3 insertions(+) commit fc4f8f6748e39a05a392f5cf60d772c00bcff913 Author: Krzysztof Kozlowski Date: Fri May 20 14:32:48 2022 +0200 dt-bindings: arm: qcom: add missing MSM8916 board compatibles Document several board compatibles already present in Linux kernel. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Stephan Gerhold Link: https://lore.kernel.org/r/20220520123252.365762-5-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit c704bd373f58a84193eebe40bd271d6b73c138b0 Author: Krzysztof Kozlowski Date: Fri May 20 14:32:47 2022 +0200 dt-bindings: arm: qcom: fix MSM8994 boards compatibles The compatibles for APQ8094/MSM8994 boards are different than specified in bindings. None of them use fallback to other SoC variant. Fixes: 9ad3c08f6f1b ("dt-bindings: arm: qcom: Document sony boards for apq8094") Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220520123252.365762-4-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/arm/qcom.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit bb35fe1efbae4114bd288fae0f56070f563adcfc Author: Krzysztof Kozlowski Date: Fri May 20 14:32:46 2022 +0200 dt-bindings: arm: qcom: fix MSM8916 MTP compatibles The order of compatibles for MSM8916 MTP board is different: msm8916-mtp.dtb: /: compatible: 'oneOf' conditional failed, one must be fixed: ['qcom,msm8916-mtp', 'qcom,msm8916-mtp/1', 'qcom,msm8916'] is too long Fixes: 9d3ef77fe568 ("dt-bindings: arm: Convert QCom board/soc bindings to json-schema") Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220520123252.365762-3-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/arm/qcom.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25d203d0751ca191301bc578ba5d59fa401f1fbf Author: Krzysztof Kozlowski Date: Fri May 20 14:32:45 2022 +0200 dt-bindings: arm: qcom: fix Longcheer L8150 compatibles The MSM8916 Longcheer L8150 uses a fallback in compatible: msm8916-longcheer-l8150.dtb: /: compatible: 'oneOf' conditional failed, one must be fixed: ['longcheer,l8150', 'qcom,msm8916-v1-qrd/9-v1', 'qcom,msm8916'] is too long Fixes: b72160fa886d ("dt-bindings: qcom: Document bindings for new MSM8916 devices") Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Stephan Gerhold Link: https://lore.kernel.org/r/20220520123252.365762-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/arm/qcom.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 944de5182f0269e72ffe0a8880c8dbeb30f473d8 Author: Krzysztof Kozlowski Date: Fri May 20 14:32:44 2022 +0200 dt-bindings: arm: qcom: fix Alcatel OneTouch Idol 3 compatibles The MSM8916 Alcatel OneTouch Idol 3 does not use MTP fallbacks in compatibles: msm8916-alcatel-idol347.dtb: /: compatible: 'oneOf' conditional failed, one must be fixed: ['alcatel,idol347', 'qcom,msm8916'] is too short Reported-by: Rob Herring Fixes: e9dd2f7204ed ("dt-bindings: arm: qcom: Document alcatel,idol347 board") Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Stephan Gerhold Link: https://lore.kernel.org/r/20220520123252.365762-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/arm/qcom.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c23b7d4967892430674f03f97d5fbd2f37a6732a Author: Krzysztof Kozlowski Date: Wed May 4 15:19:12 2022 +0200 dt-bindings: soc: qcom: qcom,smd-rpm: add power-controller Document power-controller child of Qualcomm RPM over SMD to fix dtbs_check warnings like: msm8916-huawei-g7.dtb: rpm-requests: 'power-controller' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220504131923.214367-3-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml | 3 +++ 1 file changed, 3 insertions(+) commit fbbb1cd09f29462fd21f772a89628e0d65ebe1c5 Author: Krzysztof Kozlowski Date: Wed May 4 15:19:11 2022 +0200 dt-bindings: soc: qcom: aoss: document qcom,sm8450-aoss-qmp Add compatible for qcom,sm8450-aoss-qmp with qcom,aoss-qmp as a fallback. This fixes dtbs_check warnings like: sm8450-hdk.dtb: power-controller@c300000: compatible:0: 'qcom,sm8450-aoss-qmp' is not one of ['qcom,sc7180-aoss-qmp', 'qcom,sc7280-aoss-qmp', 'qcom,sc8180x-aoss-qmp', 'qcom,sdm845-aoss-qmp', 'qcom,sm6350-aoss-qmp', 'qcom,sm8150-aoss-qmp', 'qcom,sm8250-aoss-qmp', 'qcom,sm8350-aoss-qmp'] Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220504131923.214367-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml | 1 + 1 file changed, 1 insertion(+) commit 52b23f12432ff0106e254115b63840ea1f79d657 Author: Krzysztof Kozlowski Date: Tue Apr 26 13:07:57 2022 +0200 dt-bindings: soc: qcom,rpmh-rsc: simplify qcom,tcs-config The schema for "qcom,tcs-config" property can be a little bit simpler, without the need of defining each item. Also move the description of each part of "qcom,tcs-config" tupple to the tupple items description. Suggested-by: Rob Herring Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220426110757.80603-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson .../bindings/soc/qcom/qcom,rpmh-rsc.yaml | 33 ++++++++-------------- 1 file changed, 11 insertions(+), 22 deletions(-) commit 1191b6256e50a07e7d8ce36eb970708e42a4be1a Author: Mark Rutland Date: Wed Jul 13 15:09:49 2022 +0100 arm64: fix KASAN_INLINE Since commit: a004393f45d9a55e ("arm64: idreg-override: use early FDT mapping in ID map") Kernels built with KASAN_INLINE=y die early in boot before producing any console output. This is because the accesses made to the FDT (e.g. in generic string processing functions) are instrumented with KASAN, and with KASAN_INLINE=y any access to an address in TTBR0 results in a bogus shadow VA, resulting in a data abort. This patch fixes this by reverting commits: 7559d9f97581654f ("arm64: setup: drop early FDT pointer helpers") bd0c3fa21878b6d0 ("arm64: idreg-override: use early FDT mapping in ID map") ... and using the TTBR1 fixmap mapping of the FDT. Note that due to a later commit: b65e411d6cc2f12a ("arm64: Save state of HCR_EL2.E2H before switch to EL1") ... which altered the prototype of init_feature_override() (and invocation from head.S), commit bd0c3fa21878b6d0 does not revert cleanly, and I've fixed that up manually. Fixes: a004393f45d9 ("arm64: idreg-override: use early FDT mapping in ID map") Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Marc Zyngier Cc: Will Deacon Acked-by: Catalin Marinas Signed-off-by: Mark Rutland Link: https://lore.kernel.org/r/20220713140949.45440-1-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/setup.h | 3 +++ arch/arm64/kernel/head.S | 5 +++-- arch/arm64/kernel/idreg-override.c | 17 +++++++++++------ arch/arm64/kernel/setup.c | 15 +++++++++++++++ 4 files changed, 32 insertions(+), 8 deletions(-) commit 0fa72ed05ebf15323047219e56bb7effbd2d506a Merge: 2b0d7ab1646c e8bba72b396c Author: Marc Zyngier Date: Wed Jul 20 15:26:05 2022 +0100 Merge branch irq/loongarch into irq/irqchip-next * irq/loongarch: : . : Merge the long awaited IRQ support for the LoongArch architecture. : : From the cover letter: : : "Currently, LoongArch based processors (e.g. Loongson-3A5000) : can only work together with LS7A chipsets. The irq chips in : LoongArch computers include CPUINTC (CPU Core Interrupt : Controller), LIOINTC (Legacy I/O Interrupt Controller), : EIOINTC (Extended I/O Interrupt Controller), PCH-PIC (Main : Interrupt Controller in LS7A chipset), PCH-LPC (LPC Interrupt : Controller in LS7A chipset) and PCH-MSI (MSI Interrupt Controller)." : : Note that this comes with non-official, arch private ACPICA : definitions until the official ACPICA update is realeased. : . irqchip / ACPI: Introduce ACPI_IRQ_MODEL_LPIC for LoongArch irqchip: Add LoongArch CPU interrupt controller support irqchip: Add Loongson Extended I/O interrupt controller support irqchip/loongson-liointc: Add ACPI init support irqchip/loongson-pch-msi: Add ACPI init support irqchip/loongson-pch-pic: Add ACPI init support irqchip: Add Loongson PCH LPC controller support LoongArch: Prepare to support multiple pch-pic and pch-msi irqdomain LoongArch: Use ACPI_GENERIC_GSI for gsi handling genirq/generic_chip: Export irq_unmap_generic_chip ACPI: irq: Allow acpi_gsi_to_irq() to have an arch-specific fallback APCI: irq: Add support for multiple GSI domains LoongArch: Provisionally add ACPICA data structures Signed-off-by: Marc Zyngier commit c904cda04482d5ab545e5a82cee6084078ef9543 Author: Paran Lee Date: Sun Jul 10 20:26:14 2022 +0900 genirq: Use for_each_action_of_desc in actions_show() Refactor action_show() to use for_each_action_of_desc instead of a similar open-coded loop. Signed-off-by: Paran Lee [maz: reword commit message] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220710112614.19410-1-p4ranlee@gmail.com kernel/irq/irqdesc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c91cd88f58bca622591af14f7cbb939a7422827 Author: Jason Wang Date: Sat Jul 16 12:40:40 2022 +0800 perf cs-etm: Fix duplicated 'the' in comment The double `the' is duplicated in the comment, remove one. Signed-off-by: Jason Wang Cc: Alexander Shishkin Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20220716044040.43123-1-wangborong@cdjrlc.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c69d33ebfae2501393368e88baa438572aa56144 Author: Jason Wang Date: Sat Jul 16 12:39:57 2022 +0800 perf probe: Fix duplicated 'the' in comment The double `the' is duplicated in the comment, remove one. Signed-off-by: Jason Wang Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yang Jihong Cc: Zechuan Chen Link: http://lore.kernel.org/lkml/20220716043957.42829-1-wangborong@cdjrlc.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63a4354ae75c1a708f13fe2cb4600347f8ebe9c3 Author: Arnaldo Carvalho de Melo Date: Tue Jul 19 09:23:24 2022 -0300 perf scripting perl: Ignore some warnings to keep building with perl headers On gcc 12 we started seeing this: In file included from /usr/lib/perl5/5.36.0/x86_64-linux-thread-multi/CORE/perl.h:2999, from util/scripting-engines/trace-event-perl.c:35: /usr/lib/perl5/5.36.0/x86_64-linux-thread-multi/CORE/inline.h: In function 'Perl_is_utf8_valid_partial_char_flags': /usr/lib/perl5/5.36.0/x86_64-linux-thread-multi/CORE/handy.h:125:23: error: cast from function call of type 'STRLEN' {aka 'long unsigned int'} to non-matching type '_Bool' [-Werror=bad-function-cast] 125 | #define cBOOL(cbool) ((bool) (cbool)) | ^ /usr/lib/perl5/5.36.0/x86_64-linux-thread-multi/CORE/inline.h:2363:12: note: in expansion of macro 'cBOOL' 2363 | return cBOOL(is_utf8_char_helper_(s0, e, flags)); | ^~~~~ In file included from /usr/lib/perl5/5.36.0/x86_64-linux-thread-multi/CORE/perl.h:7242: /usr/lib/perl5/5.36.0/x86_64-linux-thread-multi/CORE/inline.h: In function 'Perl_cop_file_avn': /usr/lib/perl5/5.36.0/x86_64-linux-thread-multi/CORE/inline.h:3489:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 3489 | const char *file = CopFILE(cop); | ^~~~~ In file included from /usr/lib/perl5/5.36.0/x86_64-linux-thread-multi/CORE/perl.h:7243: /usr/lib/perl5/5.36.0/x86_64-linux-thread-multi/CORE/sv_inline.h: In function 'Perl_newSV_type': /usr/lib/perl5/5.36.0/x86_64-linux-thread-multi/CORE/sv_inline.h:376:5: error: enumeration value 'SVt_LAST' not handled in switch [-Werror=switch-enum] 376 | switch (type) { | ^~~~~~ So disable those warnings to keep building with perl devel headers. Noticed, among other distros, on opensuse tumbleweed: gcc version 12.1.1 20220629 [revision 7811663964aa7e31c3939b859bbfa2e16919639f] (SUSE Linux) Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/perl/Perf-Trace-Util/Build | 2 +- tools/perf/util/scripting-engines/Build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ee87a0841aa538ab7ad49cf5679ac5ea2682c909 Author: Ian Rogers Date: Tue Jun 14 18:42:06 2022 -0700 perf python: Avoid deprecation warning on distutils Fix the following DeprecationWarning: tools/perf/util/setup.py:31: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives Note: the setuptools module may need installing, for example: $ sudo apt install python-setuptools Reviewer comments: James said: Tested it with python 2.7 and 3.8 by running "make install-python_ext PYTHON=..." Committer notes: Tested with: $ make -k BUILD_BPF_SKEL=1 PYTHON=python3 O=/tmp/build/perf -C tools/perf install-bin ; perf test python $ make -k BUILD_BPF_SKEL=1 O=/tmp/build/perf -C tools/perf install-bin ; perf test python Reviewed-by: James Clark Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220615014206.26651-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 557cc18ee7dc80b1de0c9f60de65ade92d2a134f Author: Ian Rogers Date: Thu Jul 7 13:38:36 2022 -0700 perf gtk: Only support --gtk if compiled in If HAVE_GTK2_SUPPORT isn't defined then --gtk can't succeed, don't support it as a command line option in this case. v2. Is a rebase. Patch appears to have been missed in: https://lore.kernel.org/lkml/Ygu40djM1MqAfkcF@kernel.org/ Signed-off-by: Ian Rogers Cc: Stephane Eranian Cc: xaizek Link: https://lore.kernel.org/r/20220707203836.345918-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-annotate.c | 8 ++++++++ tools/perf/builtin-report.c | 6 ++++++ 2 files changed, 14 insertions(+) commit 2f1d6b41e2f57621bea63025d846d4d6720837c8 Author: Adrian Hunter Date: Mon Jul 11 12:32:18 2022 +0300 perf intel-pt: Add documentation for tracing guest machine user space Now it is possible to decode a host Intel PT trace including guest machine user space, add documentation for the steps needed to do it. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-36-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-intel-pt.txt | 181 ++++++++++++++++++++++++++++- 1 file changed, 177 insertions(+), 4 deletions(-) commit 98759cca8440ac157963352d3fe8cf93c0062df6 Author: Adrian Hunter Date: Mon Jul 11 12:32:17 2022 +0300 perf intel-pt: Use guest pid/tid etc in guest samples When decoding with guest sideband information, for VMX non-root (NR) i.e. guest events, replace the host (hypervisor) pid/tid with guest values, and provide also the new machine_pid and vcpu values. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-35-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 61cd9135d09bd2e1d87bef7d8af37f00ce043312 Author: Adrian Hunter Date: Mon Jul 11 12:32:16 2022 +0300 perf intel-pt: Add machine_pid and vcpu to auxtrace_error When decoding with guest sideband information, for VMX non-root (NR) i.e. guest errors, replace the host (hypervisor) pid/tid with guest values, and provide also the new machine_pid and vcpu values. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-34-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit 71658de4dda8e0e1cffca03e859cd96485105e42 Author: Adrian Hunter Date: Mon Jul 11 12:32:15 2022 +0300 perf intel-pt: Determine guest thread from guest sideband Prior to decoding, determine what guest thread, if any, is running. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-33-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 69 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 2 deletions(-) commit 7d1f65b5046f859df39bbdc66582120315134935 Author: Adrian Hunter Date: Mon Jul 11 12:32:14 2022 +0300 perf intel-pt: Disable sync switch with guest sideband The sync_switch facility attempts to better synchronize context switches with the Intel PT trace, however it is not designed for guest machine context switches, so disable it when guest sideband is detected. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-32-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 0bb82cf518779721993053888d61d9f6f2f97de7 Author: Adrian Hunter Date: Mon Jul 11 12:32:13 2022 +0300 perf intel-pt: Track guest context switches Use guest context switch events to keep track of which guest thread is running on a particular guest machine and VCPU. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-31-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 12374a16223aff68ba85727da0fa4297e6b9ee97 Author: Adrian Hunter Date: Mon Jul 11 12:32:12 2022 +0300 perf intel-pt: Add some more logging to intel_pt_walk_next_insn() To aid debugging, add some more logging to intel_pt_walk_next_insn(). Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-30-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit 7c0b20d13f329f916b742ea3edaf6a685efa5c72 Author: Adrian Hunter Date: Mon Jul 11 12:32:11 2022 +0300 perf intel-pt: Remove guest_machine_pid Remove guest_machine_pid because it is not needed. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-29-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f9de2f0fd35f23564c9ab5e8c5873e9087042b64 Author: Adrian Hunter Date: Mon Jul 11 12:32:10 2022 +0300 perf tools: Add perf_event__is_guest() Add a helper function to determine if an event is a guest event. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-28-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit f42bbbf2e9a50cacc6981f7f8514b33d56d054ba Author: Adrian Hunter Date: Mon Jul 11 12:32:09 2022 +0300 perf tools: Handle injected guest kernel mmap event If a kernel mmap event was recorded inside a guest and injected into a host perf.data file, then it will match a host mmap_name not a guest mmap_name, see machine__set_mmap_name(). So try matching a host mmap_name in that case. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-27-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/machine.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit eef8e06eeba83f919f3e06bbaed548038ba3b2fa Author: Adrian Hunter Date: Mon Jul 11 12:32:08 2022 +0300 perf machine: Use realloc_array_as_needed() in machine__set_current_tid() Prepare machine__set_current_tid() for use with guest machines that do not currently have a machine->env->nr_cpus_avail value by making use of realloc_array_as_needed(). Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-26-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/machine.c | 26 +++++++------------------- tools/perf/util/machine.h | 1 + 2 files changed, 8 insertions(+), 19 deletions(-) commit 97406a7e4fa6e5cad3be80cd2188d8fb50a6ec75 Author: Adrian Hunter Date: Mon Jul 11 12:32:07 2022 +0300 perf inject: Add support for injecting guest sideband events Inject events from a perf.data file recorded in a virtual machine into a perf.data file recorded on the host at the same time. Only side band events (e.g. mmap, comm, fork, exit etc) and build IDs are injected. Additionally, the guest kcore_dir is copied as kcore_dir__ appended to the machine PID. This is non-trivial because: o It is not possible to process 2 sessions simultaneously so instead events are first written to a temporary file. o To avoid conflict, guest sample IDs are replaced with new unused sample IDs. o Guest event's CPU is changed to be the host CPU because it is more useful for reporting and analysis. o Sample ID is mapped to machine PID which is recorded with VCPU in the id index. This is important to allow guest events to be related to the guest machine and VCPU. o Timestamps must be converted. o Events are inserted to obey finished-round ordering. The anticipated use-case is: - start recording sideband events in a guest machine - start recording an AUX area trace on the host which can trace also the guest (e.g. Intel PT) - run test case on the guest - stop recording on the host - stop recording on the guest - copy the guest perf.data file to the host - inject the guest perf.data file sideband events into the host perf.data file using perf inject - the resulting perf.data file can now be used Subsequent patches provide Intel PT support for this. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-25-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-inject.txt | 17 + tools/perf/builtin-inject.c | 1043 +++++++++++++++++++++++++++++- 2 files changed, 1059 insertions(+), 1 deletion(-) commit 10d34700223b14ed94a6399cf026142956f87965 Author: Adrian Hunter Date: Mon Jul 11 12:32:06 2022 +0300 perf tools: Add reallocarray_as_needed() Add helper reallocarray_as_needed() to reallocate an array to a larger size and initialize the extra entries to an arbitrary value. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-24-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/util.c | 33 +++++++++++++++++++++++++++++++++ tools/perf/util/util.h | 15 +++++++++++++++ 2 files changed, 48 insertions(+) commit a5367ecb5353fbf28bfd3979fc4f61ddebec80b1 Author: Adrian Hunter Date: Mon Jul 11 12:32:05 2022 +0300 perf tools: Automatically use guest kcore_dir if present When registering a guest machine using machine_pid from the id index, check perf.data for a matching kcore_dir subdirectory and set the kallsyms file name accordingly. If set, use it to find the machine's kernel symbols and object code (from kcore). Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-23-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/data.c | 19 +++++++++++++++++++ tools/perf/util/data.h | 1 + tools/perf/util/machine.h | 1 + tools/perf/util/session.c | 2 ++ tools/perf/util/symbol.c | 6 ++++-- 5 files changed, 27 insertions(+), 2 deletions(-) commit 65691e9ff0c90109dd7d9d495d9528ad4c1b82d4 Author: Adrian Hunter Date: Mon Jul 11 12:32:04 2022 +0300 perf tools: Make has_kcore_dir() work also for guest kcore_dir Copies of /proc/kallsyms, /proc/modules and an extract of /proc/kcore can be stored in the perf.data output directory under the subdirectory named kcore_dir. Guest machines will have their files also under subdirectories beginning kcore_dir__ followed by the machine pid. Make has_kcore_dir() return true also if there is a guest machine kcore_dir. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-22-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/data.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 386e0d83d351a4461525b06b845ffcd58235381e Author: Adrian Hunter Date: Mon Jul 11 12:32:03 2022 +0300 perf tools: Remove also guest kcore_dir with host kcore_dir Copies of /proc/kallsyms, /proc/modules and an extract of /proc/kcore can be stored in the perf.data output directory under the subdirectory named kcore_dir. Guest machines will have their files also under subdirectories beginning kcore_dir__ followed by the machine pid. Remove these also when removing kcore_dir. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-21-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/util.c | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) commit 13a133b2550e062bb2710e9dd3d9a6b794e91053 Author: Adrian Hunter Date: Mon Jul 11 12:32:02 2022 +0300 perf script python: intel-pt-events: Add machine_pid and vcpu Add machine_pid and vcpu to the intel-pt-events.py script. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-20-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/intel-pt-events.py | 32 +++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) commit 6de306b7a5304e873fd6fc014121bd8f19ec418f Author: Adrian Hunter Date: Mon Jul 11 12:32:01 2022 +0300 perf script python: Add machine_pid and vcpu Add machine_pid and vcpu to python sample events and context switch events. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-19-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/scripting-engines/trace-event-python.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 7151c1d17820c0cfcda0c890f55a868cb4336afc Author: Adrian Hunter Date: Mon Jul 11 12:32:00 2022 +0300 perf auxtrace: Add machine_pid and vcpu to auxtrace_error Add machine_pid and vcpu to struct perf_record_auxtrace_error. The existing fmt member is used to identify the new format. The new members make it possible to easily differentiate errors from guest machines. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-18-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/perf/include/perf/event.h | 2 ++ tools/perf/util/auxtrace.c | 30 +++++++++++++++++----- tools/perf/util/auxtrace.h | 4 +++ .../util/scripting-engines/trace-event-python.c | 4 ++- tools/perf/util/session.c | 4 +++ 5 files changed, 37 insertions(+), 7 deletions(-) commit 2273e46b98377f563628d694a1ad49b5d11afb43 Author: Adrian Hunter Date: Mon Jul 11 12:31:59 2022 +0300 perf dlfilter: Add machine_pid and vcpu Add machine_pid and vcpu to struct perf_dlfilter_sample. The 'size' can be used to determine if the values are present, however machine_pid is zero if unused in any case. vcpu should be ignored if machine_pid is zero. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-17-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-dlfilter.txt | 22 ++++++++++++++++++++++ tools/perf/include/perf/perf_dlfilter.h | 8 ++++++++ tools/perf/util/dlfilter.c | 2 ++ 3 files changed, 32 insertions(+) commit e28fb159f1163e76811b9b9024564c33027d9a44 Author: Adrian Hunter Date: Mon Jul 11 12:31:58 2022 +0300 perf script: Add machine_pid and vcpu Add fields machine_pid and vcpu. These are displayed only if machine_pid is non-zero. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-16-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 7 ++++++- tools/perf/builtin-script.c | 11 +++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) commit 635049099582e45be4720722919912ca113c823c Author: Adrian Hunter Date: Mon Jul 11 12:31:57 2022 +0300 perf session: Use sample->machine_pid to find guest machine If machine_pid is set, use it to find the guest machine. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-15-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/session.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3461b65da7d48c57080d40e6b545f1360f0b195b Author: Adrian Hunter Date: Mon Jul 11 12:31:56 2022 +0300 perf tools: Add machine_pid and vcpu to perf_sample When parsing a sample with a sample ID, copy machine_pid and vcpu from perf_sample_id to perf_sample. Note, machine_pid will be zero when unused, so only a non-zero value represents a guest machine. vcpu should be ignored if machine_pid is zero. Note also, machine_pid is used with events that have come from injecting a guest perf.data file, however guest events recorded on the host (i.e. using perf kvm) have the (QEMU) hypervisor process pid to identify them - refer machines__find_for_cpumode(). Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-14-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.h | 2 ++ tools/perf/util/evlist.c | 14 +++++++++++++- tools/perf/util/evsel.c | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) commit 797efbc523b37de29dc533a8561d34b97deb42e4 Author: Adrian Hunter Date: Mon Jul 11 12:31:55 2022 +0300 perf tools: Add guest_cpu to hypervisor threads It is possible to know which guest machine was running at a point in time based on the PID of the currently running host thread. That is, perf identifies guest machines by the PID of the hypervisor. To determine the guest CPU, put it on the hypervisor (QEMU) thread for that VCPU. This is done when processing the id_index which provides the necessary information. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-13-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/session.c | 18 ++++++++++++++++++ tools/perf/util/thread.c | 1 + tools/perf/util/thread.h | 1 + 3 files changed, 20 insertions(+) commit ff7a78c210ed90bed915df55cc56876d4151c5ac Author: Adrian Hunter Date: Mon Jul 11 12:31:54 2022 +0300 perf session: Create guest machines from id_index Now that id_index has machine_pid, use it to create guest machines. Create the guest machines with an idle thread because guest events for "swapper" will be possible. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-12-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/session.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit b47bb18661eaed30790d70b7563a5220b3c59594 Author: Adrian Hunter Date: Mon Jul 11 12:31:53 2022 +0300 perf tools: Add machine_pid and vcpu to id_index When injecting events from a guest perf.data file, the events will have separate sample ID numbers. These ID numbers can then be used to determine which machine an event belongs to. To facilitate that, add machine_pid and vcpu to id_index records. For backward compatibility, these are added at the end of the record, and the length of the record is used to determine if they are present or not. Note, this is needed because the events from a guest perf.data file contain the pid/tid of the process running at that time inside the VM not the pid/tid of the (QEMU) hypervisor thread. So a way is needed to relate guest events back to the guest machine and VCPU, and using sample ID numbers for that is relatively simple and convenient. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-11-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/perf/include/internal/evsel.h | 4 +++ tools/lib/perf/include/perf/event.h | 5 ++++ tools/perf/util/session.c | 40 ++++++++++++++++++++++---- tools/perf/util/synthetic-events.c | 51 +++++++++++++++++++++++++-------- tools/perf/util/synthetic-events.h | 1 + 5 files changed, 84 insertions(+), 17 deletions(-) commit c1fd5b7d8aed8104d5189c3d55545d67f9149bb6 Author: Adrian Hunter Date: Mon Jul 11 12:31:52 2022 +0300 perf buildid-cache: Do not require purge files to also be in the file system realname() returns NULL if the file is not in the file system, but we can still remove it from the build ID cache in that case, so continue and attempt the purge with the name provided. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-10-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/build-id.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 15fe03621d9df90c23de7a2099b692e2da344cde Author: Adrian Hunter Date: Mon Jul 11 12:31:51 2022 +0300 perf buildid-cache: Add guestmount'd files to the build ID cache When the guestmount option is used, a guest machine's file system mount point is recorded in machine->root_dir. perf already iterates guest machines when adding files to the build ID cache, but does not take machine->root_dir into account. Use machine->root_dir to find files for guest build IDs, and add them to the build ID cache using the "proper" name i.e. relative to the guest root directory not the host root directory. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/build-id.c | 67 +++++++++++++++++++++++++++++++++++----------- tools/perf/util/build-id.h | 16 ++++++++--- 2 files changed, 63 insertions(+), 20 deletions(-) commit 57190e38b00d25abba9631b8db53740fce4baced Author: Adrian Hunter Date: Mon Jul 11 12:31:50 2022 +0300 perf script: Add --dump-unsorted-raw-trace option When reviewing the results of perf inject, it is useful to be able to see the events in the order they appear in the file. So add --dump-unsorted-raw-trace option to do an unsorted dump. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 3 +++ tools/perf/builtin-script.c | 8 ++++++++ 2 files changed, 11 insertions(+) commit 1ee94463e9ac4721cfef27ffcd6f97ab026e3aac Author: Adrian Hunter Date: Mon Jul 11 12:31:49 2022 +0300 perf tools: Add perf_event__synthesize_id_sample() Add perf_event__synthesize_id_sample() to enable the synthesis of ID samples. This is needed by perf inject. When injecting events from a guest perf.data file, there is a possibility that the sample ID numbers conflict. In that case, perf_event__synthesize_id_sample() can be used to re-write the ID sample. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/synthetic-events.c | 47 ++++++++++++++++++++++++++++++++++++++ tools/perf/util/synthetic-events.h | 1 + 2 files changed, 48 insertions(+) commit 0a64de04c94ad4285120bed0dfb382ea98d6d499 Author: Adrian Hunter Date: Mon Jul 11 12:31:48 2022 +0300 perf tools: Factor out evsel__id_hdr_size() Factor out evsel__id_hdr_size() so it can be reused. This is needed by perf inject. When injecting events from a guest perf.data file, there is a possibility that the sample ID numbers conflict. To re-write an ID sample, the old one needs to be removed first, which means determining how big it is with evsel__id_hdr_size() and then subtracting that from the event size. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evlist.c | 28 +--------------------------- tools/perf/util/evsel.c | 26 ++++++++++++++++++++++++++ tools/perf/util/evsel.h | 2 ++ 3 files changed, 29 insertions(+), 27 deletions(-) commit eddc6e3f6684597924f368cb564d7432b2f7d23e Author: Adrian Hunter Date: Mon Jul 11 12:31:47 2022 +0300 perf tools: Export perf_event__process_finished_round() Export perf_event__process_finished_round() so it can be used elsewhere. This is needed in perf inject to obey finished-round ordering. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/session.c | 12 ++++-------- tools/perf/util/session.h | 4 ++++ 2 files changed, 8 insertions(+), 8 deletions(-) commit f8bcf1e223ad08a4f0d45369a749c58c9bcd5f3c Author: Adrian Hunter Date: Mon Jul 11 12:31:46 2022 +0300 perf ordered_events: Add ordered_events__last_flush_time() Allow callers to get the ordered_events last flush timestamp. This is needed in perf inject to obey finished-round ordering when injecting additional events (e.g. from a guest perf.data file) with timestamps. Any additional events that have timestamps before the last flush time must be injected before the corresponding FINISHED_ROUND event. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/ordered-events.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 163dac34d7a22b4fd980e4d00459a07090f8b9af Author: Adrian Hunter Date: Mon Jul 11 12:31:45 2022 +0300 perf tools: Export dsos__for_each_with_build_id() Export dsos__for_each_with_build_id() so it can be used elsewhere. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/build-id.c | 6 ------ tools/perf/util/dso.h | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) commit 4c7da3741804fc5631d94f4df24382ce6e88f02c Author: Rob Herring Date: Tue Jul 19 15:50:09 2022 -0600 regulator: Add missing type for 'regulator-microvolt-offset' 'regulator-microvolt-offset' is missing a type definition. The type should be 'uint32'. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220719215010.1875363-1-robh@kernel.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/regulator/regulator.yaml | 1 + 1 file changed, 1 insertion(+) commit ca0e30b19dbe5f23cf0abe047259a9e9495624c6 Author: Ryan Wanner Date: Fri Jul 15 09:29:22 2022 -0700 ASoC: dt-bindings: atmel-classd: PDMIC convert to json-schema Convert Atmel PDMIC devicetree binding to json-schema. Change file naming to match json-schema naming. Signed-off-by: Ryan Wanner Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220715162922.660859-3-Ryan.Wanner@microchip.com Signed-off-by: Mark Brown .../bindings/sound/atmel,sama5d2-pdmic.yaml | 98 ++++++++++++++++++++++ .../devicetree/bindings/sound/atmel-pdmic.txt | 55 ------------ 2 files changed, 98 insertions(+), 55 deletions(-) commit a3b19e0c9cdd0ece48f34f68f922764f26435f73 Author: Ryan Wanner Date: Fri Jul 15 09:29:21 2022 -0700 ASoC: dt-bindings: atmel-classd: Convert to json-schema Convert atmel CLASSD devicetree binding to json-schema. Change file name to match json-scheme naming. Signed-off-by: Ryan Wanner Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220715162922.660859-2-Ryan.Wanner@microchip.com Signed-off-by: Mark Brown .../bindings/sound/atmel,sama5d2-classd.yaml | 100 +++++++++++++++++++++ .../devicetree/bindings/sound/atmel-classd.txt | 55 ------------ 2 files changed, 100 insertions(+), 55 deletions(-) commit 14a6e2eb7df5c7897c15b109cba29ab0c4a791b6 Author: Jinke Han Date: Wed Jul 20 17:36:16 2022 +0800 block: don't allow the same type rq_qos add more than once In our test of iocost, we encountered some list add/del corruptions of inner_walk list in ioc_timer_fn. The reason can be described as follows: cpu 0 cpu 1 ioc_qos_write ioc_qos_write ioc = q_to_ioc(queue); if (!ioc) { ioc = kzalloc(); ioc = q_to_ioc(queue); if (!ioc) { ioc = kzalloc(); ... rq_qos_add(q, rqos); } ... rq_qos_add(q, rqos); ... } When the io.cost.qos file is written by two cpus concurrently, rq_qos may be added to one disk twice. In that case, there will be two iocs enabled and running on one disk. They own different iocgs on their active list. In the ioc_timer_fn function, because of the iocgs from two iocs have the same root iocg, the root iocg's walk_list may be overwritten by each other and this leads to list add/del corruptions in building or destroying the inner_walk list. And so far, the blk-rq-qos framework works in case that one instance for one type rq_qos per queue by default. This patch make this explicit and also fix the crash above. Signed-off-by: Jinke Han Reviewed-by: Muchun Song Acked-by: Tejun Heo Cc: Link: https://lore.kernel.org/r/20220720093616.70584-1-hanjinke.666@bytedance.com Signed-off-by: Jens Axboe block/blk-iocost.c | 20 +++++++++++++------- block/blk-iolatency.c | 18 +++++++++++------- block/blk-rq-qos.h | 11 ++++++++++- block/blk-wbt.c | 12 +++++++++++- 4 files changed, 45 insertions(+), 16 deletions(-) commit 4008d54e29531813e800580f8309133b9b14a921 Author: Kajol Jain Date: Mon Jul 11 09:19:27 2022 +0530 powerpc/kvm: Remove comment related to moving PMU code to perf subsystem Commit aabcaf6ae2a0 ("KVM: PPC: Book3S HV P9: Move host OS save/restore functions to built-in") added a comment in switch_pmu_to_guest function, indicating possibility of moving PMU handling code to perf subsystem. But perf subsystem code compilation depends upon the enablement of CONFIG_PERF_EVENTS whereas, kvm code don't have any dependency on this config. Patch remove this comment as switch_pmu_to_guest functionality is needed even if perf subsystem is disabled. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220711034927.213192-2-kjain@linux.ibm.com arch/powerpc/kvm/book3s_hv_p9_perf.c | 6 ------ 1 file changed, 6 deletions(-) commit db5360840f09eded71009a981084ab10a93a08d8 Author: Kajol Jain Date: Mon Jul 11 09:19:26 2022 +0530 powerpc/kvm: Move pmu code in kvm folder to separate file for power9 and later platforms File book3s_hv_p9_entry.c in powerpc/kvm folder consists of functions like freeze_pmu, switch_pmu_to_guest and switch_pmu_to_host which are specific to Performance Monitoring Unit(PMU) for power9 and later platforms. For better maintenance, moving pmu related code from book3s_hv_p9_entry.c to a new file called book3s_hv_p9_perf.c, without any logic change. Also make corresponding changes in the Makefile to include book3s_hv_p9_perf.c during compilation. Signed-off-by: Kajol Jain Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220711034927.213192-1-kjain@linux.ibm.com arch/powerpc/kvm/Makefile | 1 + arch/powerpc/kvm/book3s_hv_p9_entry.c | 221 --------------------------------- arch/powerpc/kvm/book3s_hv_p9_perf.c | 225 ++++++++++++++++++++++++++++++++++ 3 files changed, 226 insertions(+), 221 deletions(-) commit b8c7ee79b1a37442a910b8a313045fb9aa639911 Author: Murilo Opsfelder Araujo Date: Mon Jul 11 19:36:17 2022 -0300 KVM: PPC: Book3s HV: Remove unused function kvmppc_bad_interrupt The commit fae5c9f3664b ("KVM: PPC: Book3S HV: remove ISA v3.0 and v3.1 support from P7/8 path") removed the last reference to the function. Fixes: fae5c9f3664b ("KVM: PPC: Book3S HV: remove ISA v3.0 and v3.1 support from P7/8 path") Signed-off-by: Murilo Opsfelder Araujo Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220711223617.63625-3-muriloo@linux.ibm.com arch/powerpc/include/asm/kvm_book3s.h | 1 - arch/powerpc/kvm/book3s_hv_builtin.c | 18 ------------------ 2 files changed, 19 deletions(-) commit 4c9da83011c455c0791b1f5e4e84d454d4f4ae3c Author: Murilo Opsfelder Araujo Date: Mon Jul 11 19:36:16 2022 -0300 KVM: PPC: Book3S HV: Remove kvmhv_p9_[set,restore]_lpcr declarations The commit b1b1697ae0cc ("KVM: PPC: Book3S HV: Remove support for running HPT guest on RPT host without mixed mode support") removed the last references to these functions. Fixes: b1b1697ae0cc ("KVM: PPC: Book3S HV: Remove support for running HPT guest on RPT host without mixed mode support") Signed-off-by: Murilo Opsfelder Araujo Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220711223617.63625-2-muriloo@linux.ibm.com arch/powerpc/include/asm/kvm_book3s.h | 2 -- 1 file changed, 2 deletions(-) commit fd97e4ad6d3b0c9fce3bca8ea8e6969d9ce7423b Author: Ning Qiang Date: Wed Jul 13 23:37:34 2022 +0800 macintosh/adb: fix oob read in do_adb_query() function In do_adb_query() function of drivers/macintosh/adb.c, req->data is copied form userland. The parameter "req->data[2]" is missing check, the array size of adb_handler[] is 16, so adb_handler[req->data[2]].original_address and adb_handler[req->data[2]].handler_id will lead to oob read. Cc: stable Signed-off-by: Ning Qiang Reviewed-by: Kees Cook Reviewed-by: Greg Kroah-Hartman Acked-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220713153734.2248-1-sohu0106@126.com drivers/macintosh/adb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69472ffa6575e3a1c1e3324dd06395af0f63eb71 Author: Scott Cheloha Date: Wed Jul 13 15:23:35 2022 -0500 watchdog/pseries-wdt: initial support for H_WATCHDOG-based watchdog timers PAPR v2.12 defines a new hypercall, H_WATCHDOG. The hypercall permits guest control of one or more virtual watchdog timers. The timers have millisecond granularity. The guest is terminated when a timer expires. This patch adds a watchdog driver for these timers, "pseries-wdt". pseries_wdt_probe() currently assumes the existence of only one platform device and always assigns it watchdogNumber 1. If we ever expose more than one timer to userspace we will need to devise a way to assign a distinct watchdogNumber to each platform device at device registration time. Signed-off-by: Scott Cheloha Acked-by: Guenter Roeck Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220713202335.1217647-5-cheloha@linux.ibm.com Documentation/watchdog/watchdog-parameters.rst | 12 ++ drivers/watchdog/Kconfig | 8 + drivers/watchdog/Makefile | 1 + drivers/watchdog/pseries-wdt.c | 239 +++++++++++++++++++++++++ 4 files changed, 260 insertions(+) commit 578030bfe117060bf86c81aaa7b3faead4589810 Author: Scott Cheloha Date: Wed Jul 13 15:23:34 2022 -0500 powerpc/pseries: register pseries-wdt device with platform bus PAPR v2.12 defines a new hypercall, H_WATCHDOG. The hypercall permits guest control of one or more virtual watchdog timers. These timers do not conform to PowerPC device conventions. They are not affixed to any extant bus, nor do they have full representation in the device tree. As a workaround we represent them as platform devices. This patch registers a single platform device, "pseries-wdt", with the platform bus if the FW_FEATURE_WATCHDOG flag is set. A driver for this device, "pseries-wdt", will be introduced in a subsequent patch. Signed-off-by: Scott Cheloha Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220713202335.1217647-4-cheloha@linux.ibm.com arch/powerpc/platforms/pseries/setup.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 1621563ec62ff143c7b817dd5eab0884cdfaf89d Author: Scott Cheloha Date: Wed Jul 13 15:23:33 2022 -0500 powerpc/pseries: add FW_FEATURE_WATCHDOG flag PAPR v2.12 specifies a new optional function set, "hcall-watchdog", for the /rtas/ibm,hypertas-functions property. The presence of this function set indicates support for the H_WATCHDOG hypercall. Check for this function set and, if present, set the new FW_FEATURE_WATCHDOG flag. Signed-off-by: Scott Cheloha Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220713202335.1217647-3-cheloha@linux.ibm.com arch/powerpc/include/asm/firmware.h | 3 ++- arch/powerpc/platforms/pseries/firmware.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit c6b2bd262b33aa2451f52aec2190131d1762945a Author: Scott Cheloha Date: Wed Jul 13 15:23:32 2022 -0500 powerpc/pseries: hvcall.h: add H_WATCHDOG opcode, H_NOOP return code PAPR v2.12 defines a new hypercall, H_WATCHDOG. The hypercall permits guest control of one or more virtual watchdog timers. Add the opcode for the H_WATCHDOG hypercall to hvcall.h. While here, add a definition for H_NOOP, a possible return code for H_WATCHDOG. Signed-off-by: Scott Cheloha Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220713202335.1217647-2-cheloha@linux.ibm.com arch/powerpc/include/asm/hvcall.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3041808b522031dccfbd898e520109569f039860 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Wed Jun 15 00:26:35 2022 +0900 mm/slab_common: move generic bulk alloc/free functions to SLOB Now that only SLOB use __kmem_cache_{alloc,free}_bulk(), move them to SLOB. No functional change intended. Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka mm/slab.h | 9 --------- mm/slab_common.c | 27 --------------------------- mm/slob.c | 25 +++++++++++++++++++++---- 3 files changed, 21 insertions(+), 40 deletions(-) commit 2055e67bb6a8fbb6aabdb9536443688ef52456c4 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Wed Jun 15 00:26:34 2022 +0900 mm/sl[au]b: use own bulk free function when bulk alloc failed There is no benefit to call generic bulk free function when kmem_cache_alloc_bulk() failed. Use own kmem_cache_free_bulk() instead of generic function. Note that if kmem_cache_alloc_bulk() fails to allocate first object in SLUB, size is zero. So allow passing size == 0 to kmem_cache_free_bulk() like SLAB's. Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka mm/slab.c | 2 +- mm/slub.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit e8bba72b396cef7c919c73710f3c5884521adb4e Author: Jianmin Lv Date: Wed Jul 20 18:51:32 2022 +0800 irqchip / ACPI: Introduce ACPI_IRQ_MODEL_LPIC for LoongArch For LoongArch, ACPI_IRQ_MODEL_LPIC is introduced, and then the callback acpi_get_gsi_domain_id and acpi_gsi_to_irq_fallback are implemented. The acpi_get_gsi_domain_id callback returns related fwnode handle of irqdomain for different GSI range. The acpi_gsi_to_irq_fallback will create new mapping for gsi when the mapping of it is not found. Signed-off-by: Jianmin Lv Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1658314292-35346-14-git-send-email-lvjianmin@loongson.cn drivers/acpi/bus.c | 3 +++ drivers/irqchip/irq-loongarch-cpu.c | 37 +++++++++++++++++++++++++++++++++++++ include/linux/acpi.h | 1 + 3 files changed, 41 insertions(+) commit b2d3e3354e2a0d0e912308618ea33d0337f405c3 Author: Huacai Chen Date: Wed Jul 20 18:51:31 2022 +0800 irqchip: Add LoongArch CPU interrupt controller support LoongArch CPUINTC stands for CSR.ECFG/CSR.ESTAT and related interrupt controller that described in Section 7.4 of "LoongArch Reference Manual, Vol 1". For more information please refer Documentation/loongarch/irq- chip-model.rst. LoongArch CPUINTC has 13 interrupt sources: SWI0~1, HWI0~7, IPI, TI (Timer) and PCOV (PMC). IRQ mappings of HWI0~7 are configurable (can be created from DT/ACPI), but IPI, TI (Timer) and PCOV (PMC) are hardcoded bits, so we expose the fwnode_handle to map them, and get mapped irq by irq_create_mapping when using them. Co-developed-by: Jianmin Lv Signed-off-by: Jianmin Lv Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1658314292-35346-13-git-send-email-lvjianmin@loongson.cn arch/loongarch/include/asm/irq.h | 7 +-- arch/loongarch/kernel/irq.c | 16 +++++- arch/loongarch/kernel/time.c | 14 ++++- drivers/irqchip/Kconfig | 10 ++++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-loongarch-cpu.c | 111 ++++++++++++++++++++++++++++++++++++ 6 files changed, 149 insertions(+), 10 deletions(-) commit dd281e1a1a937ee2f13bd0db5be78e5f5b811ca7 Author: Huacai Chen Date: Wed Jul 20 18:51:30 2022 +0800 irqchip: Add Loongson Extended I/O interrupt controller support EIOINTC stands for "Extended I/O Interrupts" that described in Section 11.2 of "Loongson 3A5000 Processor Reference Manual". For more information please refer Documentation/loongarch/irq-chip-model.rst. Loongson-3A5000 has 4 cores per NUMA node, and each NUMA node has an EIOINTC; while Loongson-3C5000 has 16 cores per NUMA node, and each NUMA node has 4 EIOINTCs. In other words, 16 cores of one NUMA node in Loongson-3C5000 are organized in 4 groups, each group connects to an EIOINTC. We call the "group" here as an EIOINTC node, so each EIOINTC node always includes 4 cores (both in Loongson-3A5000 and Loongson- 3C5000). Co-developed-by: Jianmin Lv Signed-off-by: Jianmin Lv Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1658314292-35346-12-git-send-email-lvjianmin@loongson.cn arch/loongarch/include/asm/irq.h | 11 +- drivers/irqchip/Kconfig | 10 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-loongson-eiointc.c | 395 +++++++++++++++++++++++++++++++++ include/linux/cpuhotplug.h | 1 + 5 files changed, 408 insertions(+), 10 deletions(-) commit 0858ed035a85c3ae79553200d2d818797cf849f5 Author: Huacai Chen Date: Wed Jul 20 18:51:29 2022 +0800 irqchip/loongson-liointc: Add ACPI init support LIOINTC stands for "Legacy I/O Interrupts" that described in Section 11.1 of "Loongson 3A5000 Processor Reference Manual". For more information please refer Documentation/loongarch/irq-chip-model.rst. Co-developed-by: Jianmin Lv Signed-off-by: Jianmin Lv Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1658314292-35346-11-git-send-email-lvjianmin@loongson.cn arch/loongarch/include/asm/irq.h | 4 +- arch/loongarch/kernel/irq.c | 1 - arch/mips/include/asm/mach-loongson64/irq.h | 1 + drivers/irqchip/irq-loongson-liointc.c | 203 ++++++++++++++++++---------- 4 files changed, 131 insertions(+), 78 deletions(-) commit 023087324000ae704cf3cfd0abf1fc30c6e0e8d5 Author: Huacai Chen Date: Wed Jul 20 18:51:28 2022 +0800 irqchip/loongson-pch-msi: Add ACPI init support PCH-PIC/PCH-MSI stands for "Interrupt Controller" that described in Section 5 of "Loongson 7A1000 Bridge User Manual". For more information please refer Documentation/loongarch/irq-chip-model.rst. Co-developed-by: Jianmin Lv Signed-off-by: Jianmin Lv Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1658314292-35346-10-git-send-email-lvjianmin@loongson.cn arch/loongarch/include/asm/irq.h | 12 +++- arch/loongarch/kernel/irq.c | 1 - drivers/irqchip/Kconfig | 2 +- drivers/irqchip/irq-loongson-pch-msi.c | 127 ++++++++++++++++++++++----------- 4 files changed, 96 insertions(+), 46 deletions(-) commit bcdd75c596c89d7925a3438fde2578ca23a62b06 Author: Huacai Chen Date: Wed Jul 20 18:51:27 2022 +0800 irqchip/loongson-pch-pic: Add ACPI init support PCH-PIC/PCH-MSI stands for "Interrupt Controller" that described in Section 5 of "Loongson 7A1000 Bridge User Manual". For more information please refer Documentation/loongarch/irq-chip-model.rst. Co-developed-by: Jianmin Lv Signed-off-by: Jianmin Lv Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1658314292-35346-9-git-send-email-lvjianmin@loongson.cn arch/loongarch/include/asm/irq.h | 5 +- arch/loongarch/kernel/irq.c | 1 - arch/mips/include/asm/mach-loongson64/irq.h | 2 +- drivers/irqchip/Kconfig | 2 +- drivers/irqchip/irq-loongson-pch-pic.c | 177 +++++++++++++++++++++++----- 5 files changed, 151 insertions(+), 36 deletions(-) commit ee73f14ee9eb7e1a04051b303b56130c4dd6e048 Author: Huacai Chen Date: Wed Jul 20 18:51:26 2022 +0800 irqchip: Add Loongson PCH LPC controller support PCH-LPC stands for "LPC Interrupts" that described in Section 24.3 of "Loongson 7A1000 Bridge User Manual". For more information please refer Documentation/loongarch/irq-chip-model.rst. Co-developed-by: Jianmin Lv Signed-off-by: Jianmin Lv Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1658314292-35346-8-git-send-email-lvjianmin@loongson.cn arch/loongarch/include/asm/irq.h | 4 +- arch/loongarch/kernel/irq.c | 1 - drivers/irqchip/Kconfig | 8 ++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-loongson-pch-lpc.c | 205 +++++++++++++++++++++++++++++++++ 5 files changed, 216 insertions(+), 3 deletions(-) commit 2dfded47da329a0dd619144a6bb43aefc13a77ba Author: Jianmin Lv Date: Wed Jul 20 18:51:25 2022 +0800 LoongArch: Prepare to support multiple pch-pic and pch-msi irqdomain For systems with two chipsets, there are two related pch-pic and pch-msi irqdomains, each of which has the same node id as its parent irqdomain. So we use a structure to mantain the relation of node and it's parent irqdomain as pch irqdomin, the 'pci_segment' field is only used to match the pci segment of a pci device when setting msi irqdomain for the device. struct acpi_vector_group { int node; int pci_segment; struct irq_domain *parent; }; The field 'pci_segment' and 'node' are initialized from MCFG, and the parent irqdomain driver will set field 'parent' by matching same 'node'. Signed-off-by: Jianmin Lv Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1658314292-35346-7-git-send-email-lvjianmin@loongson.cn arch/loongarch/include/asm/irq.h | 8 ++++++++ arch/loongarch/kernel/irq.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) commit cd057667585411fbecc0c140727177d7d707c63a Author: Jianmin Lv Date: Wed Jul 20 18:51:24 2022 +0800 LoongArch: Use ACPI_GENERIC_GSI for gsi handling For LoongArch, generic gsi code(driver/acpi/irq.c) can be reused after following patchs: APCI: irq: Add support for multiple GSI domains ACPI: irq: Allow acpi_gsi_to_irq() to have an arch-specific fallback So, config ACPI_GENERIC_GSI for LoongArch with removing the gsi code in arch directory. Signed-off-by: Jianmin Lv Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1658314292-35346-6-git-send-email-lvjianmin@loongson.cn arch/loongarch/Kconfig | 1 + arch/loongarch/kernel/acpi.c | 65 -------------------------------------------- 2 files changed, 1 insertion(+), 65 deletions(-) commit d319a299f4066685a787cfb89ad36fd78bb830ed Author: Jianmin Lv Date: Wed Jul 20 18:51:23 2022 +0800 genirq/generic_chip: Export irq_unmap_generic_chip Some irq controllers have to re-implement a private version for irq_generic_chip_ops, because they have a different xlate to translate hwirq. Export irq_unmap_generic_chip to allow reusing in drivers. Signed-off-by: Jianmin Lv Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1658314292-35346-5-git-send-email-lvjianmin@loongson.cn include/linux/irq.h | 1 + kernel/irq/generic-chip.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 744b9a0c3c8334d705dea6af3645ea30d597c360 Author: Marc Zyngier Date: Wed Jul 20 18:51:22 2022 +0800 ACPI: irq: Allow acpi_gsi_to_irq() to have an arch-specific fallback It appears that the generic version of acpi_gsi_to_irq() doesn't fallback to establishing a mapping if there is no pre-existing one while the x86 version does. While arm64 seems unaffected by it, LoongArch is relying on the x86 behaviour. In an effort to prevent new architectures from reinventing the proverbial wheel, provide an optional callback that the arch code can set to restore the x86 behaviour. Hopefully we can eventually get rid of this in the future once the expected behaviour has been clarified. Reported-by: Jianmin Lv Signed-off-by: Marc Zyngier Signed-off-by: Jianmin Lv Tested-by: Hanjun Guo Reviewed-by: Hanjun Guo Link: https://lore.kernel.org/r/1658314292-35346-4-git-send-email-lvjianmin@loongson.cn drivers/acpi/irq.c | 18 ++++++++++++++++-- include/linux/acpi.h | 1 + 2 files changed, 17 insertions(+), 2 deletions(-) commit 7327b16f5f56741960e11ae4d7ef0ffdff5fd252 Author: Marc Zyngier Date: Wed Jul 20 18:51:21 2022 +0800 APCI: irq: Add support for multiple GSI domains In an unfortunate departure from the ACPI spec, the LoongArch architecture split its GSI space across multiple interrupt controllers. In order to be able to reuse the core code and prevent architectures from reinventing an already square wheel, offer the arch code the ability to register a dispatcher function that will return the domain fwnode for a given GSI. The ARM GIC drivers are updated to support this (with a single domain, as intended). Signed-off-by: Marc Zyngier Cc: Hanjun Guo Cc: Lorenzo Pieralisi Signed-off-by: Jianmin Lv Tested-by: Hanjun Guo Reviewed-by: Hanjun Guo Link: https://lore.kernel.org/r/1658314292-35346-3-git-send-email-lvjianmin@loongson.cn drivers/acpi/irq.c | 40 +++++++++++++++++++++++++--------------- drivers/irqchip/irq-gic-v3.c | 18 ++++++++++++------ drivers/irqchip/irq-gic.c | 18 ++++++++++++------ include/linux/acpi.h | 2 +- 4 files changed, 50 insertions(+), 28 deletions(-) commit af6a1cfa6859dab4a843ea07f1c2f04938f1715b Author: Marc Zyngier Date: Wed Jul 20 18:51:20 2022 +0800 LoongArch: Provisionally add ACPICA data structures The LoongArch architecture is using ACPI, but the spec containing the required updates still is in an unreleased state. Instead of preventing the inclusion of the IRQ support into the kernel, add the missing bits to the arch-specific parts of the ACPICA support. Once the ACPICA bits are updated to the version that supports LoongArch, these bits can eventually be removed. Signed-off-by: Marc Zyngier Signed-off-by: Jianmin Lv Link: https://lore.kernel.org/r/1658314292-35346-2-git-send-email-lvjianmin@loongson.cn arch/loongarch/include/asm/acpi.h | 142 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) commit a6a468f50d6a1fa20bcd023f286713d243f5025d Author: Mark Brown Date: Thu Jul 7 11:36:32 2022 +0100 arm64/hwcap: Support FEAT_EBF16 The v9.2 feature FEAT_EBF16 provides support for an extended BFloat16 mode. Allow userspace to discover system support for this feature by adding a hwcap for it. Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20220707103632.12745-4-broonie@kernel.org Signed-off-by: Will Deacon Documentation/arm64/elf_hwcaps.rst | 4 ++++ arch/arm64/include/asm/hwcap.h | 1 + arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/kernel/cpufeature.c | 1 + arch/arm64/kernel/cpuinfo.c | 1 + 5 files changed, 8 insertions(+) commit 60c868eff2bc59656ff449258d30da23adae544a Author: Mark Brown Date: Thu Jul 7 11:36:31 2022 +0100 arm64/cpufeature: Store elf_hwcaps as a bitmap rather than unsigned long When we added support for AT_HWCAP2 we took advantage of the fact that we have limited hwcaps to the low 32 bits and stored it along with AT_HWCAP in a single unsigned integer. Thanks to the ever expanding capabilities of the architecture we have now allocated all 64 of the bits in an unsigned long so in preparation for adding more hwcaps convert elf_hwcap to be a bitmap instead, with 64 bits allocated to each AT_HWCAP. There should be no functional change from this patch. Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20220707103632.12745-3-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 2 +- arch/arm64/include/asm/hwcap.h | 2 +- arch/arm64/kernel/cpufeature.c | 12 +++++------- 3 files changed, 7 insertions(+), 9 deletions(-) commit d3e4a9d30804a78387bfcb383371209417e05c9a Author: Mark Brown Date: Thu Jul 7 11:36:30 2022 +0100 arm64/hwcap: Document allocation of upper bits of AT_HWCAP The top two bits of AT_HWCAP are reserved for use by glibc and the rest of the top 32 bits are being kept unallocated for potential use by glibc. Document this in the header. Signed-off-by: Mark Brown Acked-by: Catalin Marinas Acked-by: Szabolcs Nagy Link: https://lore.kernel.org/r/20220707103632.12745-2-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/uapi/asm/hwcap.h | 3 +++ 1 file changed, 3 insertions(+) commit 5fb859f79f4f49d9df16bac2b3a84a6fa3aaccf1 Author: Alex Elder Date: Tue Jul 19 09:18:55 2022 -0500 net: ipa: initialize ring indexes to 0 When a GSI channel is initially allocated, and after it has been reset, the hardware assumes its ring index is 0. And although we do initialize channels this way, the comments in the IPA code don't really explain this. For event rings, it doesn't matter what value we use initially, so using 0 is just fine. Add some information about the assumptions made by hardware above the definition of the gsi_ring structure in "gsi.h". Zero the index field for all rings (channel and event) when the ring is allocated. As a result, that function initializes all fields in the structure. Stop zeroing the index the top of gsi_channel_program(). Initially we'll use the index value set when the channel ring was allocated. And we'll explicitly zero the index value in gsi_channel_reset() before programming the hardware, adding a comment explaining why it's required. For event rings, use the index initialized by gsi_ring_alloc() rather than 0 when ringing the doorbell in gsi_evt_ring_program(). (It'll still be zero, but we won't assume that to be the case.) Use a local variable in gsi_evt_ring_program() that represents the address of the event ring's ring structure. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/gsi.c | 18 ++++++++++-------- drivers/net/ipa/gsi.h | 5 +++-- 2 files changed, 13 insertions(+), 10 deletions(-) commit d0637c505f8a1d8c4088642f1f3e9e3b22da14f6 Author: Barry Song Date: Wed Jul 20 21:37:37 2022 +1200 arm64: enable THP_SWAP for arm64 THP_SWAP has been proven to improve the swap throughput significantly on x86_64 according to commit bd4c82c22c367e ("mm, THP, swap: delay splitting THP after swapped out"). As long as arm64 uses 4K page size, it is quite similar with x86_64 by having 2MB PMD THP. THP_SWAP is architecture-independent, thus, enabling it on arm64 will benefit arm64 as well. A corner case is that MTE has an assumption that only base pages can be swapped. We won't enable THP_SWAP for ARM64 hardware with MTE support until MTE is reworked to coexist with THP_SWAP. A micro-benchmark is written to measure thp swapout throughput as below, unsigned long long tv_to_ms(struct timeval tv) { return tv.tv_sec * 1000 + tv.tv_usec / 1000; } main() { struct timeval tv_b, tv_e;; #define SIZE 400*1024*1024 volatile void *p = mmap(NULL, SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (!p) { perror("fail to get memory"); exit(-1); } madvise(p, SIZE, MADV_HUGEPAGE); memset(p, 0x11, SIZE); /* write to get mem */ gettimeofday(&tv_b, NULL); madvise(p, SIZE, MADV_PAGEOUT); gettimeofday(&tv_e, NULL); printf("swp out bandwidth: %ld bytes/ms\n", SIZE/(tv_to_ms(tv_e) - tv_to_ms(tv_b))); } Testing is done on rk3568 64bit Quad Core Cortex-A55 platform - ROCK 3A. thp swp throughput w/o patch: 2734bytes/ms (mean of 10 tests) thp swp throughput w/ patch: 3331bytes/ms (mean of 10 tests) Cc: "Huang, Ying" Cc: Minchan Kim Cc: Johannes Weiner Cc: Hugh Dickins Cc: Andrea Arcangeli Cc: Steven Price Cc: Yang Shi Reviewed-by: Anshuman Khandual Signed-off-by: Barry Song Link: https://lore.kernel.org/r/20220720093737.133375-1-21cnbao@gmail.com Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 + arch/arm64/include/asm/pgtable.h | 6 ++++++ include/linux/huge_mm.h | 12 ++++++++++++ mm/swap_slots.c | 2 +- 4 files changed, 20 insertions(+), 1 deletion(-) commit 52323ef75414d60b17f683076833eb55a6bffa2b Author: Oleksandr Mazur Date: Tue Jul 19 13:57:16 2022 +0300 net: marvell: prestera: add phylink support For SFP port prestera driver will use kernel phylink infrastucture to configure port mode based on the module that has beed inserted Co-developed-by: Yevhen Orlov Signed-off-by: Yevhen Orlov Co-developed-by: Taras Chornyi Signed-off-by: Taras Chornyi Signed-off-by: Oleksandr Mazur Signed-off-by: David S. Miller drivers/net/ethernet/marvell/prestera/Kconfig | 1 + drivers/net/ethernet/marvell/prestera/prestera.h | 10 + .../ethernet/marvell/prestera/prestera_ethtool.c | 28 +- .../ethernet/marvell/prestera/prestera_ethtool.h | 3 - .../net/ethernet/marvell/prestera/prestera_main.c | 354 ++++++++++++++++++--- 5 files changed, 334 insertions(+), 62 deletions(-) commit ffcdd1197da61fd86528e41ea7d5cdb043761087 Author: Andrey Turkin Date: Tue Jul 19 04:29:55 2022 +0000 vmxnet3: Implement ethtool's get_channels command Some tools (e.g. libxdp) use that information. Signed-off-by: Andrey Turkin Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_ethtool.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 50ad649dd760e4ead0711c2e2e8996815149c663 Merge: c2fe9ec3975d 1dbd8748a147 Author: David S. Miller Date: Wed Jul 20 10:17:05 2022 +0100 Merge tag 'linux-can-next-for-5.20-20220720' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== this is a pull request of 29 patches for net-next/master. The first 6 patches target the slcan driver. Dan Carpenter contributes a hardening patch, followed by 5 cleanup patches. Biju Das contributes 5 patches to prepare the sja1000 driver to support the Renesas RZ/N1 SJA1000 CAN controller. Dario Binacchi's patch for the slcan driver fixes a sleep with held spin lock. Another patch by Dario Binacchi fixes a wrong comment in the c_can driver. Pavel Pisa updates the CTU CAN FD IP core registers. Stephane Grosjean contributes 3 patches to the peak_usb driver for cleanups and support of a new MCU. The last 12 patches are by Vincent Mailhol, they fix and improve the txerr and rxerr reporting in all CAN drivers. ==================== Signed-off-by: David S. Miller commit f5ecfee94493475783074e86ded10a0499d779fc Author: Pierre Morel Date: Thu Jul 14 21:43:34 2022 +0200 KVM: s390: resetting the Topology-Change-Report During a subsystem reset the Topology-Change-Report is cleared. Let's give userland the possibility to clear the MTCR in the case of a subsystem reset. To migrate the MTCR, we give userland the possibility to query the MTCR state. We indicate KVM support for the CPU topology facility with a new KVM capability: KVM_CAP_S390_CPU_TOPOLOGY. Signed-off-by: Pierre Morel Reviewed-by: Janis Schoetterl-Glausch Reviewed-by: Janosch Frank Message-Id: <20220714194334.127812-1-pmorel@linux.ibm.com> Link: https://lore.kernel.org/all/20220714194334.127812-1-pmorel@linux.ibm.com/ [frankja@linux.ibm.com: Simple conflict resolution in Documentation/virt/kvm/api.rst] Signed-off-by: Janosch Frank Documentation/virt/kvm/api.rst | 25 ++++++++++++++++++++ arch/s390/include/uapi/asm/kvm.h | 1 + arch/s390/kvm/kvm-s390.c | 51 ++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/kvm.h | 1 + 4 files changed, 78 insertions(+) commit 24fe0195bc19306b2769b43b3e22bd35bd6fb061 Author: Pierre Morel Date: Thu Jul 14 12:18:23 2022 +0200 KVM: s390: guest support for topology function We report a topology change to the guest for any CPU hotplug. The reporting to the guest is done using the Multiprocessor Topology-Change-Report (MTCR) bit of the utility entry in the guest's SCA which will be cleared during the interpretation of PTF. On every vCPU creation we set the MCTR bit to let the guest know the next time it uses the PTF with command 2 instruction that the topology changed and that it should use the STSI(15.1.x) instruction to get the topology details. STSI(15.1.x) gives information on the CPU configuration topology. Let's accept the interception of STSI with the function code 15 and let the userland part of the hypervisor handle it when userland supports the CPU Topology facility. Signed-off-by: Pierre Morel Reviewed-by: Nico Boehr Reviewed-by: Janis Schoetterl-Glausch Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20220714101824.101601-2-pmorel@linux.ibm.com Message-Id: <20220714101824.101601-2-pmorel@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/include/asm/kvm_host.h | 18 +++++++++++++++--- arch/s390/kvm/kvm-s390.c | 31 +++++++++++++++++++++++++++++++ arch/s390/kvm/priv.c | 20 ++++++++++++++++---- arch/s390/kvm/vsie.c | 8 ++++++++ 4 files changed, 70 insertions(+), 7 deletions(-) commit 0130337ec45bffd26ba3e782850da3b68f1eef9d Author: Pierre Morel Date: Wed May 4 14:29:08 2022 +0200 KVM: s390: Cleanup ipte lock access and SIIF facility checks We can check if SIIF is enabled by testing the sclp_info struct instead of testing the sie control block eca variable as that facility is always enabled if available. Also let's cleanup all the ipte related struct member accesses which currently happen by referencing the KVM struct via the VCPU struct. Making the KVM struct the parameter to the ipte_* functions removes one level of indirection which makes the code more readable. Signed-off-by: Pierre Morel Reviewed-by: Janosch Frank Reviewed-by: David Hildenbrand Reviewed-by: Nico Boehr Link: https://lore.kernel.org/all/20220711084148.25017-2-pmorel@linux.ibm.com/ Signed-off-by: Janosch Frank arch/s390/kvm/gaccess.c | 96 ++++++++++++++++++++++++------------------------- arch/s390/kvm/gaccess.h | 6 ++-- arch/s390/kvm/priv.c | 6 ++-- 3 files changed, 54 insertions(+), 54 deletions(-) commit c4ada3ca99b20df0dd6323b7a670e6d12fa9e6f9 Author: Ben Dooks Date: Tue Jul 19 09:52:00 2022 +0100 reset: reset-simple should depends on HAS_IOMEM The reset-simple driver does not build on all architecuters as it requires devm_ioremap_resource() which is only built when CONFIG_HAS_IOMEM is enabled in the kenrel. Fix the following error by depending on CONFIG_HAS_IOMEM: drivers/reset/reset-simple.o: in function `reset_simple_probe': reset-simple.c:(.text+0x3aa): undefined reference to `devm_ioremap_resource' Fixes: 18d1909be345 ("reset: allow building of reset simple driver if expert config selected") Reported-by: kernel test robot Signed-off-by: Ben Dooks Signed-off-by: Philipp Zabel Link: https://lore.kernel.org/r/20220719085200.203688-1-ben.dooks@sifive.com drivers/reset/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 3b5a7ca7d252b96e9623b262414713828b2bd68f Author: Clément Léger Date: Mon Jun 6 16:57:01 2022 +0200 ARM: at91: setup outer cache .write_sec() callback if needed When running under OP-TEE, the L2 cache is configured by OP-TEE and the sam platform code does not allow any modification yet. Setup a dummy .write_sec() callback to avoid triggering exceptions when Linux tries to modify the L2 cache configuration. Signed-off-by: Clément Léger [claudiu.beznea: keep .init_early populated only for SAMA5D2, remove sam_secure_init() from sama5d2_init() as it is also called in sama5_secure_cache_init()] Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220606145701.185552-3-clement.leger@bootlin.com arch/arm/mach-at91/sama5.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit c71572aa544ca64cbd2ff2052c79bc7e3573baed Author: Clément Léger Date: Mon Jun 6 16:57:00 2022 +0200 ARM: at91: add sam_linux_is_optee_available() function Add sam_linux_is_optee_available() which allows to know if OP-TEE is available for Linux. This function is used by code which needs to know if we running with OP-TEE available or not. Signed-off-by: Clément Léger [claudiu.beznea: edit commit title and message, renamed sam_linux_is_in_normal_world() into sam_linux_is_optee_available()] Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220606145701.185552-2-clement.leger@bootlin.com arch/arm/mach-at91/sam_secure.c | 6 ++++++ arch/arm/mach-at91/sam_secure.h | 1 + 2 files changed, 7 insertions(+) commit 596f2d311cabcf6d1e3c95b72ae3a049c346ed86 Author: Rob Herring Date: Tue Jul 19 15:51:25 2022 -0600 dt-bindings: mfd: st,stm32-timers: Correct 'resets' property name The correct property name for the reset binding is 'resets', not 'reset'. Fix the name. Signed-off-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220719215125.1877138-1-robh@kernel.org Documentation/devicetree/bindings/mfd/st,stm32-timers.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06c8580aa23ddc9b1c37b9c7c5e2cc504e460207 Author: Rebecca Mckeever Date: Wed Jul 13 22:17:17 2022 -0500 memblock tests: change build options to run-time options Change verbose and movable node build options to run-time options. Movable node usage: $ ./main -m Or: $ ./main --movable-node Verbose usage: $ ./main -v Or: $ ./main --verbose Signed-off-by: Rebecca Mckeever Reviewed-by: David Hildenbrand Signed-off-by: Mike Rapoport Link: https://lore.kernel.org/r/20220714031717.12258-1-remckee0@gmail.com tools/testing/memblock/Makefile | 5 -- tools/testing/memblock/linux/memory_hotplug.h | 8 +-- tools/testing/memblock/main.c | 2 + tools/testing/memblock/scripts/Makefile.include | 10 --- tools/testing/memblock/tests/common.c | 87 +++++++++++++++++++++---- tools/testing/memblock/tests/common.h | 10 +-- 6 files changed, 80 insertions(+), 42 deletions(-) commit 1dbd8748a147c971747c8460e0cd1828cf2745d7 Merge: d79ee9a66a82 3f9c26210cf8 Author: Marc Kleine-Budde Date: Wed Jul 20 09:28:32 2022 +0200 Merge branch 'can-error-set-of-fixes-and-improvement-on-txerr-and-rxerr-reporting' Vincent Mailhol says: ==================== can: error: set of fixes and improvement on txerr and rxerr reporting This series is a collection of patches targeting the CAN error counter. The series is split in three blocks (with small relation to each other). Several drivers uses the data[6] and data[7] fields (both of type u8) of the CAN error frame to report those values. However, the maximum size an u8 can hold is 255 and the error counter can exceed this value if bus-off status occurs. As such, the first nine patches of this series make sure that no drivers try to report txerr or rxerr through the CAN error frame when bus-off status is reached. can_frame::data[5..7] are defined as being "controller specific". Controller specific behaviors are not something desirable (portability issue...) The tenth patch of this series specifies how can_frame::data[5..7] should be use and remove any "controller specific" freedom. The eleventh patch adds a flag to notify though can_frame::can_id that data[6..7] were populated (in order to be consistent with other fields). Finally, the twelfth and last patch add three macro values to specify the different error counter threshold with so far was hard-coded as magic numbers in the drivers. N.B.: * patches 1 to 10 are for net (stable). * patches 11 and 12 are for net-next (but depends on patches 1 to 10). ** Changelog ** v1 -> v2: https://lore.kernel.org/all/20220712153157.83847-1-mailhol.vincent@wanadoo.fr * Fix typo in patch #10: data[7] of CAN error frames is for the RX error counter, not the TX one (this is litteraly a one byte change). ==================== As discussed take the whole series via can-next -> net-next. Link: https://lore.kernel.org/all/20220719143550.3681-1-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde commit ed221835a7ae8d0c5d9967d70518d0f230b8e9c5 Author: Eric Biggers Date: Tue Jul 19 03:04:15 2022 +0000 crypto: lib - add module license to libsha1 libsha1 can be a module, so it needs a MODULE_LICENSE. Fixes: ec8f7f4821d5 ("crypto: lib - make the sha1 library optional") Reported-by: Randy Dunlap Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu lib/crypto/sha1.c | 3 +++ 1 file changed, 3 insertions(+) commit 3f9c26210cf80ea8cb5dd901aba5feb77200b085 Author: Vincent Mailhol Date: Tue Jul 19 23:35:50 2022 +0900 can: error: add definitions for the different CAN error thresholds Currently, drivers are using magic numbers to derive the CAN error states from the error counter. Add three macro declarations to remediate this. For reference, the error-active, error-passive and bus-off are defined in ISO 11898, section 12.1.4.2 "Error counting". Although ISO 11898 does not define error-warning state, this extra value is also commonly used and is thus also added. Link: https://lore.kernel.org/all/20220719143550.3681-13-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde include/uapi/linux/can/error.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 3e5c291c7942d0909a48bc5ec1b9bba136465166 Author: Vincent Mailhol Date: Tue Jul 19 23:35:49 2022 +0900 can: add CAN_ERR_CNT flag to notify availability of error counter Add a dedicated flag in uapi/linux/can/error.h to notify the userland that fields data[6] and data[7] of the CAN error frame were respectively populated with the tx and rx error counters. For all driver tree-wide, set up this flags whenever needed. Link: https://lore.kernel.org/all/20220719143550.3681-12-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde drivers/net/can/c_can/c_can_main.c | 6 +++--- drivers/net/can/cc770/cc770.c | 1 + drivers/net/can/ctucanfd/ctucanfd_base.c | 5 +++-- drivers/net/can/grcan.c | 1 + drivers/net/can/ifi_canfd/ifi_canfd.c | 4 ++-- drivers/net/can/janz-ican3.c | 4 ++-- drivers/net/can/kvaser_pciefd.c | 2 +- drivers/net/can/m_can/m_can.c | 4 ++-- drivers/net/can/pch_can.c | 1 + drivers/net/can/peak_canfd/peak_canfd.c | 6 +++--- drivers/net/can/rcar/rcar_can.c | 1 + drivers/net/can/rcar/rcar_canfd.c | 4 ++-- drivers/net/can/sja1000/sja1000.c | 1 + drivers/net/can/slcan/slcan-core.c | 1 + drivers/net/can/spi/hi311x.c | 1 + drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 1 + drivers/net/can/sun4i_can.c | 1 + drivers/net/can/ti_hecc.c | 1 + drivers/net/can/usb/esd_usb.c | 3 ++- drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 2 ++ drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 1 + drivers/net/can/usb/peak_usb/pcan_usb.c | 1 + drivers/net/can/usb/usb_8dev.c | 1 + drivers/net/can/xilinx_can.c | 1 + include/uapi/linux/can/error.h | 2 ++ 25 files changed, 38 insertions(+), 18 deletions(-) commit e70a3263a7eed768d5f947b8f2aff8d2a79c9d97 Author: Vincent Mailhol Date: Tue Jul 19 23:35:48 2022 +0900 can: error: specify the values of data[5..7] of CAN error frames Currently, data[5..7] of struct can_frame, when used as a CAN error frame, are defined as being "controller specific". Device specific behaviours are problematic because it prevents someone from writing code which is portable between devices. As a matter of fact, data[5] is never used, data[6] is always used to report TX error counter and data[7] is always used to report RX error counter. can-utils also relies on this. This patch updates the comment in the uapi header to specify that data[5] is reserved (and thus should not be used) and that data[6..7] are used for error counters. Fixes: 0d66548a10cb ("[CAN]: Add PF_CAN core module") Link: https://lore.kernel.org/all/20220719143550.3681-11-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde include/uapi/linux/can/error.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit aebe8a2433cd090ccdc222861f44bddb75eb01de Author: Vincent Mailhol Date: Tue Jul 19 23:35:47 2022 +0900 can: usb_8dev: do not report txerr and rxerr during bus-off During bus off, the error count is greater than 255 and can not fit in a u8. Fixes: 0024d8ad1639 ("can: usb_8dev: Add support for USB2CAN interface from 8 devices") Link: https://lore.kernel.org/all/20220719143550.3681-10-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/usb_8dev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a57732084e06791d37ea1ea447cca46220737abd Author: Vincent Mailhol Date: Tue Jul 19 23:35:46 2022 +0900 can: kvaser_usb_leaf: do not report txerr and rxerr during bus-off During bus off, the error count is greater than 255 and can not fit in a u8. Fixes: 7259124eac7d1 ("can: kvaser_usb: Split driver into kvaser_usb_core.c and kvaser_usb_leaf.c") Link: https://lore.kernel.org/all/20220719143550.3681-9-mailhol.vincent@wanadoo.fr CC: Jimmy Assarsson Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 936e90595376e64b6247c72d3ea8b8b164b7ac96 Author: Vincent Mailhol Date: Tue Jul 19 23:35:45 2022 +0900 can: kvaser_usb_hydra: do not report txerr and rxerr during bus-off During bus off, the error count is greater than 255 and can not fit in a u8. Fixes: aec5fb2268b7 ("can: kvaser_usb: Add support for Kvaser USB hydra family") Link: https://lore.kernel.org/all/20220719143550.3681-8-mailhol.vincent@wanadoo.fr CC: Jimmy Assarsson Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 0ac15a8f661b941519379831d09bfb12271b23ee Author: Vincent Mailhol Date: Tue Jul 19 23:35:44 2022 +0900 can: sun4i_can: do not report txerr and rxerr during bus-off During bus off, the error count is greater than 255 and can not fit in a u8. Fixes: 0738eff14d81 ("can: Allwinner A10/A20 CAN Controller support - Kernel module") Link: https://lore.kernel.org/all/20220719143550.3681-7-mailhol.vincent@wanadoo.fr CC: Chen-Yu Tsai Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde drivers/net/can/sun4i_can.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit a22bd630cfff496b270211745536e50e98eb3a45 Author: Vincent Mailhol Date: Tue Jul 19 23:35:43 2022 +0900 can: hi311x: do not report txerr and rxerr during bus-off During bus off, the error count is greater than 255 and can not fit in a u8. Fixes: 57e83fb9b746 ("can: hi311x: Add Holt HI-311x CAN driver") Link: https://lore.kernel.org/all/20220719143550.3681-6-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde drivers/net/can/spi/hi311x.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ce0e7aeb676b40e765ec5b88d690fa9fa252c373 Author: Vincent Mailhol Date: Tue Jul 19 23:35:42 2022 +0900 can: slcan: do not report txerr and rxerr during bus-off During bus off, the error count is greater than 255 and can not fit in a u8. alloc_can_err_skb() already sets cf to NULL if the allocation fails [1], so the redundant cf = NULL assignment gets removed. [1] https://elixir.bootlin.com/linux/latest/source/drivers/net/can/dev/skb.c#L187 Fixes: 0a9cdcf098a4 ("can: slcan: extend the protocol with CAN state info") Link: https://lore.kernel.org/all/20220719143550.3681-5-mailhol.vincent@wanadoo.fr CC: Dario Binacchi Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 164d7cb2d5a30f1b3a5ab4fab1a27731fb1494a8 Author: Vincent Mailhol Date: Tue Jul 19 23:35:41 2022 +0900 can: sja1000: do not report txerr and rxerr during bus-off During bus off, the error count is greater than 255 and can not fit in a u8. Fixes: 215db1856e83 ("can: sja1000: Consolidate and unify state change handling") Link: https://lore.kernel.org/all/20220719143550.3681-4-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde drivers/net/can/sja1000/sja1000.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a37b7245e831a641df360ca41db6a71c023d3746 Author: Vincent Mailhol Date: Tue Jul 19 23:35:40 2022 +0900 can: rcar_can: do not report txerr and rxerr during bus-off During bus off, the error count is greater than 255 and can not fit in a u8. Fixes: fd1159318e55 ("can: add Renesas R-Car CAN driver") Link: https://lore.kernel.org/all/20220719143550.3681-3-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde drivers/net/can/rcar/rcar_can.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3a5c7e4611ddcf0ef37a3a17296b964d986161a6 Author: Vincent Mailhol Date: Tue Jul 19 23:35:39 2022 +0900 can: pch_can: do not report txerr and rxerr during bus-off During bus off, the error count is greater than 255 and can not fit in a u8. Fixes: 0c78ab76a05c ("pch_can: Add setting TEC/REC statistics processing") Link: https://lore.kernel.org/all/20220719143550.3681-2-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde drivers/net/can/pch_can.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 819c620507229332e2a038b1d742ee1eee5946ad Author: Michael Walle Date: Thu Jul 7 15:24:59 2022 +0200 ARM: dts: lan966x: add clock gating register The clock controller supports an optional clock gating register. This is necessary to expose the USB device clock, for example. Add it. Signed-off-by: Michael Walle Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220707132500.1708020-1-michael@walle.cc arch/arm/boot/dts/lan966x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8916c9054f940acbd735e33067e8a7e5a06f8834 Merge: b49816611eac 171549f829df Author: Palmer Dabbelt Date: Tue Jul 19 21:14:56 2022 -0700 RISC-V: Support for 64bit hartid on RV64 platforms The hartid can be a 64bit value on RV64 platforms. This series updates the code so that 64bit hartid can be supported on RV64 platforms. * 'riscv-64bit_hartid' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux.git: riscv/efi_stub: Add 64bit boot-hartid support on RV64 riscv: cpu: Add 64bit hartid support on RV64 riscv: smp: Add 64bit hartid support on RV64 riscv: spinwait: Fix hartid variable type riscv: cpu_ops_sbi: Add 64bit hartid support on RV64 commit 7e76e4bc00999846c17604dc25486fffa542078d Author: Tzung-Bi Shih Date: Mon Jul 18 10:50:47 2022 +0000 platform/chrome: cros_kbd_led_backlight: fix build warning drivers/platform/chrome/cros_kbd_led_backlight.c got a new build warning when using the randconfig in [1]: >>> warning: unused variable 'keyboard_led_drvdata_ec_pwm' The warning happens when CONFIG_CROS_EC is set but CONFIG_OF is not set. Reproduce: - mkdir build_dir - wget [1] -O build_dir/.config - COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 \ O=build_dir ARCH=s390 SHELL=/bin/bash drivers/platform/chrome/ Fix the warning by using __maybe_unused. Also use IS_ENABLED() because CROS_EC is a tristate. [1]: https://download.01.org/0day-ci/archive/20220717/202207170538.MR39dw8m-lkp@intel.com/config Fixes: 40f58143745e ("platform/chrome: cros_kbd_led_backlight: support EC PWM backend") Reported-by: kernel test robot Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220718105047.2356542-1-tzungbi@kernel.org drivers/platform/chrome/cros_kbd_led_backlight.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 9399b2cb20702fde2a5f9c6aec9cd70d21d40a00 Author: Tzung-Bi Shih Date: Wed Jun 22 04:10:40 2022 +0000 platform/chrome: cros_ec_proto: add Kunit test for cros_ec_cmd() cros_ec_cmd() is a wrapper of cros_ec_cmd_xfer_status(). Add Kunit test for cros_ec_cmd(). Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220622041040.202737-8-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto_test.c | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 33f0fdba6066b504ee0b5f1480b1f93b06050df6 Author: Tzung-Bi Shih Date: Wed Jun 22 04:10:39 2022 +0000 platform/chrome: cros_ec_proto: add Kunit tests for get_sensor_count cros_ec_get_sensor_count() gets number of MEMS sensors. Add Kunit tests for cros_ec_get_sensor_count(). Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220622041040.202737-7-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto_test.c | 153 +++++++++++++++++++++++++++ drivers/platform/chrome/cros_kunit_util.c | 22 ++++ drivers/platform/chrome/cros_kunit_util.h | 7 ++ 3 files changed, 182 insertions(+) commit 00238864435f97dc578cc8b2de7ecc95a1fca0b9 Author: Tzung-Bi Shih Date: Wed Jun 22 04:10:38 2022 +0000 platform/chrome: cros_ec_proto: add Kunit tests for check_features cros_ec_check_features() gets EC features if it hasn't had cache, and checks whether the given EC_FEATURE_* is supported or not. Add Kunit tests for cros_ec_check_features(). Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220622041040.202737-6-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto_test.c | 77 ++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) commit 7cb1eb82642becd668665689c6eac2a639a81e1b Author: Tzung-Bi Shih Date: Wed Jun 22 04:10:37 2022 +0000 platform/chrome: cros_ec_proto: add Kunit tests for get_host_event cros_ec_get_host_event() performs some sanity checks, parses `ec_dev->event_data.data.host_event`, and returns bitmap of EC_HOST_EVENT_*. Add Kunit tests for cros_ec_get_host_event(). Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220622041040.202737-5-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto_test.c | 59 ++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 2b7ed927953f30eaae0e622c670dcddce3bd3aa4 Author: Tzung-Bi Shih Date: Wed Jun 22 04:10:36 2022 +0000 platform/chrome: cros_ec_proto: add Kunit tests for get_next_event cros_ec_get_next_event() gets events from EC. It consists of 3 versions of event retrieval: 1. No MKBP event. 2. MKBP event version 0. 3. MKBP event version >0. Add Kunit tests for cros_ec_get_next_event(). Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220622041040.202737-4-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto_test.c | 266 +++++++++++++++++++++++++++ 1 file changed, 266 insertions(+) commit 1242688fc2f080530b6414ef5f1ae63fb548a6b0 Author: Tzung-Bi Shih Date: Wed Jun 22 04:10:35 2022 +0000 platform/chrome: cros_ec_proto: add Kunit test for cros_ec_map_error() cros_ec_cmd_xfer_status() is the only exported function that calls static function cros_ec_map_error(). Add Kunit test for cros_ec_map_error() through calling cros_ec_cmd_xfer_status(). Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220622041040.202737-3-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto_test.c | 49 ++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 74bed42fd5fa4d3ac9883b27b0d761564f3b9bf9 Author: Tzung-Bi Shih Date: Wed Jun 22 04:10:34 2022 +0000 platform/chrome: cros_ec_proto: add Kunit tests for cmd_xfer_status cros_ec_cmd_xfer_status() calls cros_ec_cmd_xfer() and cros_ec_map_error(). Given that there are already test cases for cros_ec_cmd_xfer(), only add basic Kunit tests for cros_ec_cmd_xfer_status(). Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220622041040.202737-2-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto_test.c | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 3e1c715ea179201372384fad738680d524600985 Author: Tzung-Bi Shih Date: Mon Jul 18 05:09:14 2022 +0000 platform/chrome: cros_ec_proto: return -EPROTO if empty payload cros_ec_wait_until_complete() sends EC_CMD_GET_COMMS_STATUS which expects to receive sizeof(struct ec_response_get_comms_status) from cros_ec_xfer_command(). Return -EPROTO if cros_ec_xfer_command() returns 0. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220718050914.2267370-11-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 5 +++++ 1 file changed, 5 insertions(+) commit 82c9b7ed8c5c5cb4ba2650c240fcd31cbdcfa0b5 Author: Tzung-Bi Shih Date: Mon Jul 18 05:09:13 2022 +0000 platform/chrome: cros_ec_proto: add Kunit test for empty payload cros_ec_wait_until_complete() sends EC_CMD_GET_COMMS_STATUS which expects to receive sizeof(struct ec_response_get_comms_status) from cros_ec_xfer_command(). Add Kunit test and expect to receive an error code when cros_ec_xfer_command() returns 0. Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220718050914.2267370-10-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto_test.c | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 7f95d2b68b9a4f6624438f2d7dbad01c157b92a6 Author: Tzung-Bi Shih Date: Mon Jul 18 05:09:12 2022 +0000 platform/chrome: cros_ec_proto: return -EAGAIN when retries timed out While EC_COMMS_STATUS_PROCESSING flag is still on after it tries EC_COMMAND_RETRIES times for sending EC_CMD_GET_COMMS_STATUS, cros_ec_wait_until_complete() doesn't return an error code. Return -EAGAIN in the case instead. Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220718050914.2267370-9-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 3 +++ 1 file changed, 3 insertions(+) commit 00eb36d528729692d418e53c832971a798f85ceb Author: Tzung-Bi Shih Date: Mon Jul 18 05:09:11 2022 +0000 platform/chrome: cros_ec_proto: change Kunit expectation when timed out While EC_COMMS_STATUS_PROCESSING flag is still on after it tries EC_COMMAND_RETRIES times for sending EC_CMD_GET_COMMS_STATUS, cros_ec_wait_until_complete() doesn't return an error code. Change the expectation to an error code. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220718050914.2267370-8-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto_test.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0aad9aff6a6450f7ea5e980add1b33d40e5bed52 Author: Tzung-Bi Shih Date: Mon Jul 18 05:09:10 2022 +0000 platform/chrome: cros_ec_proto: separate cros_ec_wait_until_complete() EC returns EC_RES_IN_PROGRESS if the host command needs more time to complete. Whenever receives the return code, cros_ec_send_command() sends EC_CMD_GET_COMMS_STATUS to query the command status. Separate cros_ec_wait_until_complete() from cros_ec_send_command(). It sends EC_CMD_GET_COMMS_STATUS and waits until the previous command was completed, or encountered error, or timed out. Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220718050914.2267370-7-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 74 ++++++++++++++++----------------- 1 file changed, 35 insertions(+), 39 deletions(-) commit 810be30d27bdfe7923084a5550dfddeed28ac08b Author: Tzung-Bi Shih Date: Mon Jul 18 05:09:09 2022 +0000 platform/chrome: cros_ec_proto: separate cros_ec_xfer_command() cros_ec_send_command() has extra logic to handle EC_RES_IN_PROGRESS. Separate the command transfer part into cros_ec_xfer_command() so that other functions can re-use it. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220718050914.2267370-6-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit da95f691311f1f364a482ac11db82dad42bc9742 Author: Tzung-Bi Shih Date: Mon Jul 18 05:09:08 2022 +0000 platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_send_command() cros_ec_cmd_xfer() is the only exported function that calls static function cros_ec_send_command(). Add Kunit tests for cros_ec_send_command() through calling cros_ec_cmd_xfer(). Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220718050914.2267370-5-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto_test.c | 265 +++++++++++++++++++++++++++ drivers/platform/chrome/cros_kunit_util.c | 20 ++ drivers/platform/chrome/cros_kunit_util.h | 4 + 3 files changed, 289 insertions(+) commit 82f4def2d8224b45d7348daa943e5fc9d9c7163b Author: Tzung-Bi Shih Date: Mon Jul 18 05:09:07 2022 +0000 platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_cmd_xfer() cros_ec_cmd_xfer() transfers the given command and data if any. It performs some sanity checks and calls cros_ec_send_command(). Add Kunit tests for cros_ec_cmd_xfer(). Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220718050914.2267370-4-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto_test.c | 149 +++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) commit d311664b90579c77c66bda18eb93affd4049b255 Author: Tzung-Bi Shih Date: Mon Jul 18 05:09:06 2022 +0000 platform/chrome: cros_ec_proto: add "cros_ec_" prefix to send_command() To be neat, add "cros_ec_" prefix to static function send_command(). Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220718050914.2267370-3-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit c2fe9ec3975d8d7f4fcd329e63e3f670612a7585 Merge: ca0cab119288 6ac0db3f2bf6 Author: Jakub Kicinski Date: Tue Jul 19 17:45:04 2022 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 1GbE Intel Wired LAN Driver Updates 2022-07-18 This series contains updates to igc driver only. Kurt Kanzenbach adds support for Qbv schedules where one queue stays open in consecutive entries. Sasha removes an unused define and field. * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: igc: Remove forced_speed_duplex value igc: Remove MSI-X PBA Clear register igc: Lift TAPRIO schedule restriction ==================== Link: https://lore.kernel.org/r/20220718180109.4114540-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit ca0cab11928870701535fbc3e49a4b196f722743 Author: Davide Caratti Date: Mon Jul 18 10:55:12 2022 +0200 net/sched: remove qdisc_root_lock() helper the last caller has been removed with commit 96f5e66e8a79 ("mac80211: fix aggregation for hardware with ampdu queues"), so it's safe to remove this function. Signed-off-by: Davide Caratti Link: https://lore.kernel.org/r/703d549e3088367651d92a059743f1be848d74b7.1658133689.git.dcaratti@redhat.com Signed-off-by: Jakub Kicinski include/net/sch_generic.h | 19 ------------------- 1 file changed, 19 deletions(-) commit 171549f829dfebf1f44ffa76d3191bdc032d4cdb Author: Sunil V L Date: Fri May 27 10:47:43 2022 +0530 riscv/efi_stub: Add 64bit boot-hartid support on RV64 The boot-hartid can be a 64bit value on RV64 platforms but the "boot-hartid" in DT is assumed to be 32bit only. Detect the size of the "boot-hartid" in DT and use 32bit or 64bit read appropriately. Signed-off-by: Sunil V L Link: https://lore.kernel.org/r/20220527051743.2829940-6-sunilvl@ventanamicro.com Signed-off-by: Palmer Dabbelt drivers/firmware/efi/libstub/riscv-stub.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit ad635e723e17379b192a5ba9c182e3eedfc24d16 Author: Sunil V L Date: Fri May 27 10:47:42 2022 +0530 riscv: cpu: Add 64bit hartid support on RV64 The hartid can be a 64bit value on RV64 platforms. Add support for 64bit hartid in riscv_of_processor_hartid() and update its callers. Signed-off-by: Sunil V L Reviewed-by: Atish Patra Link: https://lore.kernel.org/r/20220527051743.2829940-5-sunilvl@ventanamicro.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/processor.h | 4 ++-- arch/riscv/kernel/cpu.c | 26 +++++++++++++++----------- arch/riscv/kernel/cpufeature.c | 6 ++++-- arch/riscv/kernel/smpboot.c | 9 +++++---- drivers/clocksource/timer-riscv.c | 15 ++++++++------- drivers/irqchip/irq-riscv-intc.c | 7 ++++--- drivers/irqchip/irq-sifive-plic.c | 7 ++++--- 7 files changed, 42 insertions(+), 32 deletions(-) commit 62750eae410cf20b7d040395064bac547cfdf540 Author: Sunil V L Date: Fri May 27 10:47:41 2022 +0530 riscv: smp: Add 64bit hartid support on RV64 The hartid can be a 64bit value on RV64 platforms. Modify the hartid parameter in riscv_hartid_to_cpuid() as unsigned long so that it can hold 64bit value on RV64 platforms. Signed-off-by: Sunil V L Reviewed-by: Heinrich Schuchardt Reviewed-by: Atish Patra Link: https://lore.kernel.org/r/20220527051743.2829940-4-sunilvl@ventanamicro.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/smp.h | 4 ++-- arch/riscv/kernel/smp.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit c029e487e7c00e5594a4ae946952605db34e359b Author: Sunil V L Date: Fri May 27 10:47:40 2022 +0530 riscv: spinwait: Fix hartid variable type The hartid variable is of type int but compared with ULONG_MAX(INVALID_HARTID). This issue is fixed by changing the hartid variable type to unsigned long. Fixes: c78f94f35cf6 ("RISC-V: Use __cpu_up_stack/task_pointer only for spinwait method") Signed-off-by: Sunil V L Reviewed-by: Atish Patra Link: https://lore.kernel.org/r/20220527051743.2829940-3-sunilvl@ventanamicro.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/cpu_ops_spinwait.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 869d40bdfca05e67ac6979535c485ab2c8fccc63 Author: Sunil V L Date: Fri May 27 10:47:39 2022 +0530 riscv: cpu_ops_sbi: Add 64bit hartid support on RV64 The hartid can be a 64bit value on RV64 platforms. Modify the hartid variable type to unsigned long so that it can hold 64bit value on RV64 platforms. Signed-off-by: Sunil V L Reviewed-by: Heinrich Schuchardt Reviewed-by: Atish Patra Link: https://lore.kernel.org/r/20220527051743.2829940-2-sunilvl@ventanamicro.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/cpu_ops_sbi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6b625b2bb8ffc6e903a7891008bf423858bbffe6 Author: Dan Williams Date: Sun Jul 10 09:56:05 2022 -0700 Documentation/cxl: Use a double line break between entries Make it easier to read delineations between the "Description" line break, new paragraph line breaks, and new entries. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165784324750.1758207.10379257962719807754.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams Documentation/ABI/testing/sysfs-bus-cxl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit c97006046c791f82cb5ba3219ef4a511ec5f3932 Author: Ira Weiny Date: Tue Jul 19 13:52:49 2022 -0700 cxl/port: Read CDAT table The per-device CDAT data provides performance data that is relevant for mapping which CXL devices can participate in which CXL ranges by QTG (QoS Throttling Group) (per ECN: CXL 2.0 CEDT CFMWS & QTG_DSM) [1]. The QTG association specified in the ECN is advisory. Until the cxl_acpi driver grows support for invoking the QTG _DSM method the CDAT data is only of interest to userspace that may need it for debug purposes. Search the DOE mailboxes available, query CDAT data, cache the data and make it available via a sysfs binary attribute per endpoint at: /sys/bus/cxl/devices/endpointX/CDAT ...similar to other ACPI-structured table data in /sys/firmware/ACPI/tables. The CDAT is relative to 'struct cxl_port' objects since switches in addition to endpoints can host a CDAT instance. Switch CDAT support is not implemented. This does not support table updates at runtime. It will always provide whatever was there when first cached. It is also the case that table updates are not expected outside of explicit DPA address map affecting commands like Set Partition with the immediate flag set. Given that the driver does not support Set Partition with the immediate flag set there is no current need for update support. Link: https://www.computeexpresslink.org/spec-landing [1] Signed-off-by: Jonathan Cameron Co-developed-by: Jonathan Cameron Signed-off-by: Ira Weiny [djbw: drop in-kernel parsing infra for now, and other minor fixups] Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220719205249.566684-7-ira.weiny@intel.com Signed-off-by: Dan Williams Documentation/ABI/testing/sysfs-bus-cxl | 10 ++ drivers/cxl/core/pci.c | 173 ++++++++++++++++++++++++++++++++ drivers/cxl/cxl.h | 7 ++ drivers/cxl/cxlpci.h | 1 + drivers/cxl/port.c | 53 ++++++++++ 5 files changed, 244 insertions(+) commit 9d6794feeb90903b10c34bddd9c74c992447ce83 Author: Ira Weiny Date: Tue Jul 19 13:52:48 2022 -0700 driver-core: Introduce BIN_ATTR_ADMIN_{RO,RW} Many binary attributes need to limit access to CAP_SYS_ADMIN only; ie many binary attributes specify is_visible with 0400 or 0600. Make setting the permissions of such attributes more explicit by defining BIN_ATTR_ADMIN_{RO,RW}. Cc: Bjorn Helgaas Suggested-by: Dan Williams Suggested-by: Krzysztof Wilczyński Reviewed-by: Jonathan Cameron Reviewed-by: Greg Kroah-Hartman Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20220719205249.566684-6-ira.weiny@intel.com Signed-off-by: Dan Williams include/linux/sysfs.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 3eddcc938581968d126e7345e9ec84c75290e7a4 Author: Ira Weiny Date: Tue Jul 19 13:52:47 2022 -0700 cxl/pci: Create PCI DOE mailbox's for memory devices DOE mailbox objects will be needed for various mailbox communications with each memory device. Iterate each DOE mailbox capability and create PCI DOE mailbox objects as found. It is not anticipated that this is the final resting place for the iteration of the DOE devices. The support of switch ports will drive this code into the PCIe side. In this imagined architecture the CXL port driver would then query into the PCI device for the DOE mailbox array. For now creating the mailboxes in the CXL port is good enough for the endpoints. Later PCIe ports will need to support this to support switch ports more generically. Cc: Dan Williams Cc: Davidlohr Bueso Cc: Lukas Wunner Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20220719205249.566684-5-ira.weiny@intel.com Signed-off-by: Dan Williams drivers/cxl/Kconfig | 1 + drivers/cxl/cxlmem.h | 3 +++ drivers/cxl/pci.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) commit 9d24322e887b6a3d3f9f9c3e76937a646102c8c1 Author: Jonathan Cameron Date: Tue Jul 19 13:52:46 2022 -0700 PCI/DOE: Add DOE mailbox support functions Introduced in a PCIe r6.0, sec 6.30, DOE provides a config space based mailbox with standard protocol discovery. Each mailbox is accessed through a DOE Extended Capability. Each DOE mailbox must support the DOE discovery protocol in addition to any number of additional protocols. Define core PCIe functionality to manage a single PCIe DOE mailbox at a defined config space offset. Functionality includes iterating, creating, query of supported protocol, and task submission. Destruction of the mailboxes is device managed. Cc: "Li, Ming" Cc: Bjorn Helgaas Cc: Matthew Wilcox Acked-by: Bjorn Helgaas Signed-off-by: Jonathan Cameron Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20220719205249.566684-4-ira.weiny@intel.com Signed-off-by: Dan Williams .clang-format | 1 + drivers/pci/Kconfig | 3 + drivers/pci/Makefile | 1 + drivers/pci/doe.c | 536 ++++++++++++++++++++++++++++++++++++++++++ include/linux/pci-doe.h | 77 ++++++ include/uapi/linux/pci_regs.h | 29 ++- 6 files changed, 646 insertions(+), 1 deletion(-) commit b559afd53afed0e04035907e4ec457f28eb4cc40 Author: Ira Weiny Date: Tue Jul 19 13:52:45 2022 -0700 PCI: Replace magic constant for PCI Sig Vendor ID Replace the magic value in pci_bus_crs_vendor_id() with PCI_VENDOR_ID_PCI_SIG. Reviewed-by: Dan Williams Reviewed-by: Davidlohr Bueso Suggested-by: Bjorn Helgaas Acked-by: Bjorn Helgaas Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20220719205249.566684-3-ira.weiny@intel.com Signed-off-by: Dan Williams drivers/pci/probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6b8a0a5e7f688e092d1c639d438ccd0b323213c Author: Jonathan Cameron Date: Tue Jul 19 13:52:44 2022 -0700 PCI: Add vendor ID for the PCI SIG This ID is used in DOE headers to identify protocols that are defined within the PCI Express Base Specification, PCIe r6.0, sec 6.30.1.1 table 6-32. Acked-by: Bjorn Helgaas Reviewed-by: Davidlohr Bueso Reviewed-by: Dan Williams Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220719205249.566684-2-ira.weiny@intel.com Signed-off-by: Dan Williams include/linux/pci_ids.h | 1 + 1 file changed, 1 insertion(+) commit 360d9526761270f2497893946bb48de468a229cc Author: Bhupesh Sharma Date: Wed Jul 20 02:20:58 2022 +0530 arm64: dts: qcom: qrb5165-rb5: Fix 'dtbs_check' error for led nodes make dtbs_check currently reports the following errors with qrb5165-rb5 led nodes: arch/arm64/boot/dts/qcom/qrb5165-rb5.dtb: leds: 'bt', 'user4', 'wlan' do not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Fix the same. Also while at it, fix a blank line issue in the led node. Cc: Bjorn Andersson Cc: Dmitry Baryshkov Signed-off-by: Bhupesh Sharma Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220719205058.1004942-3-bhupesh.sharma@linaro.org arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 1282fa32d71633bce5330a592db6e53cf73d2c28 Author: Bhupesh Sharma Date: Wed Jul 20 02:20:57 2022 +0530 arm64: dts: qcom: qrb5165-rb5: Fix 'dtbs_check' error for lpg nodes make dtbs_check currently reports the following warnings with qrb5165-rb5 lpg nodes: arch/arm64/boot/dts/qcom/qrb5165-rb5.dts: Warning (reg_format): /soc@0/spmi@c440000/pmic@5/lpg/led@1:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) arch/arm64/boot/dts/qcom/qrb5165-rb5.dts: Warning (avoid_default_addr_size): /soc@0/spmi@c440000/pmic@5/lpg/led@1: Relying on default #address-cells value Fix the same. Cc: Bjorn Andersson Cc: Dmitry Baryshkov Signed-off-by: Bhupesh Sharma Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220719205058.1004942-2-bhupesh.sharma@linaro.org arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 3 +++ 1 file changed, 3 insertions(+) commit e76f4a6107ebe4af5405bb1b94d0e717a40fd306 Author: Geert Uytterhoeven Date: Fri Jul 15 16:03:15 2022 +0200 of: overlay: Simplify of_overlay_fdt_apply() tail It does not hurt to fill in the changeset id while the mutex is still held. After doing so, the function tails for the success and failure cases become identical, so they can be unified. Signed-off-by: Geert Uytterhoeven Reviewed-by: Frank Rowand Tested-by: Frank Rowand Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/6a3357a8f7f29704350e3ffae768ee8a462b54d3.1657893306.git.geert+renesas@glider.be drivers/of/overlay.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit e385b0ba6a137f34953e746d70d543660c2de1a0 Author: Geert Uytterhoeven Date: Fri Jul 15 16:03:14 2022 +0200 of: overlay: Move devicetree_corrupt() check up There is no point in doing several preparatory steps in of_overlay_fdt_apply(), only to see of_overlay_apply() return early because of a corrupt device tree. Move the check for a corrupt device tree from of_overlay_apply() to of_overlay_fdt_apply(), to check for this as early as possible. Signed-off-by: Geert Uytterhoeven Reviewed-by: Frank Rowand Tested-by: Frank Rowand Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/c91ce7112eb5167ea46a43d8a980e76b920010ba.1657893306.git.geert+renesas@glider.be drivers/of/overlay.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 390ffde2b97c8d50f87bf450208b3a4ed70cc2db Author: Krzysztof Kozlowski Date: Thu Jun 23 09:24:28 2022 +0200 ARM: dts: aspeed: centriq2400: drop the board The board is unmaintained and unused, according to Joel, so simply let's remove it. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/all/CACPK8XfxXi8kQr+vxta8rD6SBgxLf_oBjAH0UkPBacQta552YQ@mail.gmail.com/ Link: https://lore.kernel.org/r/20220623072428.33697-1-krzysztof.kozlowski@linaro.org' Signed-off-by: Arnd Bergmann arch/arm/boot/dts/Makefile | 1 - .../boot/dts/aspeed-bmc-arm-centriq2400-rep.dts | 225 --------------------- 2 files changed, 226 deletions(-) commit 7f9eee196ec83fe57ad9a53f413d4246d2748e9a Merge: 1f17708b47a9 eb315a7d1396 Author: Jakub Kicinski Date: Tue Jul 19 14:13:33 2022 -0700 Merge branch 'io_uring-zerocopy-send' of git://git.kernel.org/pub/scm/linux/kernel/git/kuba/linux Pavel Begunkov says: ==================== io_uring zerocopy send The patchset implements io_uring zerocopy send. It works with both registered and normal buffers, mixing is allowed but not recommended. Apart from usual request completions, just as with MSG_ZEROCOPY, io_uring separately notifies the userspace when buffers are freed and can be reused (see API design below), which is delivered into io_uring's Completion Queue. Those "buffer-free" notifications are not necessarily per request, but the userspace has control over it and should explicitly attaching a number of requests to a single notification. The series also adds some internal optimisations when used with registered buffers like removing page referencing. From the kernel networking perspective there are two main changes. The first one is passing ubuf_info into the network layer from io_uring (inside of an in kernel struct msghdr). This allows extra optimisations, e.g. ubuf_info caching on the io_uring side, but also helps to avoid cross-referencing and synchronisation problems. The second part is an optional optimisation removing page referencing for requests with registered buffers. Benchmarking UDP with an optimised version of the selftest (see [1]), which sends a bunch of requests, waits for completions and repeats. "+ flush" column posts one additional "buffer-free" notification per request, and just "zc" doesn't post buffer notifications at all. NIC (requests / second): IO size | non-zc | zc | zc + flush 4000 | 495134 | 606420 (+22%) | 558971 (+12%) 1500 | 551808 | 577116 (+4.5%) | 565803 (+2.5%) 1000 | 584677 | 592088 (+1.2%) | 560885 (-4%) 600 | 596292 | 598550 (+0.4%) | 555366 (-6.7%) dummy (requests / second): IO size | non-zc | zc | zc + flush 8000 | 1299916 | 2396600 (+84%) | 2224219 (+71%) 4000 | 1869230 | 2344146 (+25%) | 2170069 (+16%) 1200 | 2071617 | 2361960 (+14%) | 2203052 (+6%) 600 | 2106794 | 2381527 (+13%) | 2195295 (+4%) Previously it also brought a massive performance speedup compared to the msg_zerocopy tool (see [3]), which is probably not super interesting. There is also an additional bunch of refcounting optimisations that was omitted from the series for simplicity and as they don't change the picture drastically, they will be sent as follow up, as well as flushing optimisations closing the performance gap b/w two last columns. For TCP on localhost (with hacks enabling localhost zerocopy) and including additional overhead for receive: IO size | non-zc | zc 1200 | 4174 | 4148 4096 | 7597 | 11228 Using a real NIC 1200 bytes, zc is worse than non-zc ~5-10%, maybe the omitted optimisations will somewhat help, should look better for 4000, but couldn't test properly because of setup problems. Links: liburing (benchmark + tests): [1] https://github.com/isilence/liburing/tree/zc_v4 kernel repo: [2] https://github.com/isilence/linux/tree/zc_v4 RFC v1: [3] https://lore.kernel.org/io-uring/cover.1638282789.git.asml.silence@gmail.com/ RFC v2: https://lore.kernel.org/io-uring/cover.1640029579.git.asml.silence@gmail.com/ Net patches based: git@github.com:isilence/linux.git zc_v4-net-base or https://github.com/isilence/linux/tree/zc_v4-net-base API design overview: The series introduces an io_uring concept of notifactors. From the userspace perspective it's an entity to which it can bind one or more requests and then requesting to flush it. Flushing a notifier makes it impossible to attach new requests to it, and instructs the notifier to post a completion once all requests attached to it are completed and the kernel doesn't need the buffers anymore. Notifications are stored in notification slots, which should be registered as an array in io_uring. Each slot stores only one notifier at any particular moment. Flushing removes it from the slot and the slot automatically replaces it with a new notifier. All operations with notifiers are done by specifying an index of a slot it's currently in. When registering a notification the userspace specifies a u64 tag for each slot, which will be copied in notification completion entries as cqe::user_data. cqe::res is 0 and cqe::flags is equal to wrap around u32 sequence number counting notifiers of a slot. ==================== Link: https://lore.kernel.org/r/cover.1657643355.git.asml.silence@gmail.com Signed-off-by: Jakub Kicinski commit eb315a7d1396b1139fc7daea55f2d3191e8e7092 Author: Pavel Begunkov Date: Tue Jul 12 21:52:35 2022 +0100 tcp: support externally provided ubufs Teach tcp how to use external ubuf_info provided in msghdr and also prepare it for managed frags by sprinkling skb_zcopy_downgrade_managed() when it could mix managed and not managed frags. Signed-off-by: Pavel Begunkov Signed-off-by: Jakub Kicinski net/ipv4/tcp.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit 1fd3ae8c906c0f521238d436566323af3f0282e8 Author: Pavel Begunkov Date: Tue Jul 12 21:52:34 2022 +0100 ipv6/udp: support externally provided ubufs Teach ipv6/udp how to use external ubuf_info provided in msghdr and also prepare it for managed frags by sprinkling skb_zcopy_downgrade_managed() when it could mix managed and not managed frags. Signed-off-by: Pavel Begunkov Signed-off-by: Jakub Kicinski net/ipv6/ip6_output.c | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) commit c445f31b3cfaa008e110bf548c3a1f0198d332d4 Author: Pavel Begunkov Date: Tue Jul 12 21:52:33 2022 +0100 ipv4/udp: support externally provided ubufs Teach ipv4/udp how to use external ubuf_info provided in msghdr and also prepare it for managed frags by sprinkling skb_zcopy_downgrade_managed() when it could mix managed and not managed frags. Signed-off-by: Pavel Begunkov Signed-off-by: Jakub Kicinski net/ipv4/ip_output.c | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) commit 84ce071e38a6e25ea3ea91188e5482ac1f17b3af Author: Pavel Begunkov Date: Tue Jul 12 21:52:32 2022 +0100 net: introduce __skb_fill_page_desc_noacc Managed pages contain pinned userspace pages and controlled by upper layers, there is no need in tracking skb->pfmemalloc for them. Introduce a helper for filling frags but ignoring page tracking, it'll be needed later. Signed-off-by: Pavel Begunkov Signed-off-by: Jakub Kicinski include/linux/skbuff.h | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit 753f1ca4e1e50248a1b760c9774d6d6b354562cc Author: Pavel Begunkov Date: Tue Jul 12 21:52:31 2022 +0100 net: introduce managed frags infrastructure Some users like io_uring can do page pinning more efficiently, so we want a way to delegate referencing to other subsystems. For that add a new flag called SKBFL_MANAGED_FRAG_REFS. When set, skb doesn't hold page references and upper layers are responsivle to managing page lifetime. It's allowed to convert skbs from managed to normal by calling skb_zcopy_downgrade_managed(). The function will take all needed page references and clear the flag. It's needed, for instance, to avoid mixing managed modes. Signed-off-by: Pavel Begunkov Signed-off-by: Jakub Kicinski include/linux/skbuff.h | 25 +++++++++++++++++++++++-- net/core/skbuff.c | 29 +++++++++++++++++++++++++++-- 2 files changed, 50 insertions(+), 4 deletions(-) commit ebe73a284f4de8c5d401adeccd9b8fe3183b6e95 Author: David Ahern Date: Tue Jul 12 21:52:30 2022 +0100 net: Allow custom iter handler in msghdr Add support for custom iov_iter handling to msghdr. The idea is that in-kernel subsystems want control over how an SG is split. Signed-off-by: David Ahern [pavel: move callback into msghdr] Signed-off-by: Pavel Begunkov Signed-off-by: Jakub Kicinski include/linux/skbuff.h | 7 ++++--- include/linux/socket.h | 4 ++++ net/core/datagram.c | 14 ++++++++++---- net/core/skbuff.c | 2 +- 4 files changed, 19 insertions(+), 8 deletions(-) commit 7c701d92b2b5e5175dbfec875816474b802b0c45 Author: Pavel Begunkov Date: Tue Jul 12 21:52:29 2022 +0100 skbuff: carry external ubuf_info in msghdr Make possible for network in-kernel callers like io_uring to pass in a custom ubuf_info by setting it in a new field of struct msghdr. Signed-off-by: Pavel Begunkov Signed-off-by: Jakub Kicinski include/linux/socket.h | 1 + net/compat.c | 1 + net/socket.c | 2 ++ 3 files changed, 4 insertions(+) commit 1f17708b47a99ca5bcad594a6f8d14cb016edfd2 Author: Edward Cree Date: Fri Jul 15 13:33:23 2022 +0100 sfc: update MCDI protocol headers Link: https://lore.kernel.org/r/cover.1657878101.git.ecree.xilinx@gmail.com Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/mcdi_pcol.h | 8182 +++++++++++++++++++++++++++++++++- 1 file changed, 7960 insertions(+), 222 deletions(-) commit 22df2e93622fdb1672c2ba8ff1d2fc90980b3358 Author: Roi Dayan Date: Tue Jul 12 16:16:54 2022 +0300 net/mlx5: CT: Remove warning of ignore_flow_level support for non PF ignore_flow_level isn't supported for SFs, and so it causes post_act and ct to warn about it per SF. Apply the warning only for PF. Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 58a518948f60153e8f6cb8361d2712aa3a1af94a Author: Aya Levin Date: Mon Jul 4 19:34:26 2022 +0300 net/mlx5e: Add resiliency for PTP TX port timestamp PTP TX port timestamp relies on receiving 2 CQEs for each outgoing packet (WQE). The regular CQE has a less accurate timestamp than the wire CQE. On link change, the wire CQE may get lost. Let the driver detect and restore the relation between the CQEs, and re-sync after timeout. Add resiliency for this as follows: add id (producer counter) into the WQE's metadata. This id will be received in the wire CQE (in wqe_counter field). On handling the wire CQE, if there is no match, replay the PTP application with the time-stamp from the regular CQE and restore the sync between the CQEs and their SKBs. This patch adds 2 ptp counters: 1) ptp_cq0_resync_event: number of times a mismatch was detected between the regular CQE and the wire CQE. 2) ptp_cq0_resync_cqe: total amount of missing wire CQEs. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c | 37 ++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/en/ptp.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 10 ++++++ 5 files changed, 50 insertions(+), 2 deletions(-) commit 2e5e4185ff89ea0fc44c9dead8dccf306a3b3bbb Author: Aya Levin Date: Mon Jul 4 19:34:08 2022 +0300 net/mlx5: Expose ts_cqe_metadata_size2wqe_counter Add capability field which indicates the mask for wqe_counter which connects between loopback CQE and the original WQE. With this connection the driver can identify lost of the loopback CQE and reply PTP synchronization with timestamp given in the original CQE. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed include/linux/mlx5/mlx5_ifc.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 462b0059993696eaf863c23c2a12658e4fe0ccbf Author: Moshe Tal Date: Mon May 2 11:31:26 2022 +0300 net/mlx5e: HTB, move htb functions to a new file Move htb related functions and data to a separated file for better encapsulation. Signed-off-by: Moshe Tal Reviewed-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 3 +- drivers/net/ethernet/mellanox/mlx5/core/en/htb.c | 722 ++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en/htb.h | 46 ++ drivers/net/ethernet/mellanox/mlx5/core/en/qos.c | 785 ++-------------------- drivers/net/ethernet/mellanox/mlx5/core/en/qos.h | 20 +- drivers/net/ethernet/mellanox/mlx5/core/en/selq.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 + 7 files changed, 832 insertions(+), 746 deletions(-) commit 3685eed56f812b9bcc92c4208c66485fe5dcd27f Author: Moshe Tal Date: Tue Apr 12 15:05:50 2022 +0300 net/mlx5e: HTB, change functions name to follow convention Following the change of the functions to be object like, change also the names. Signed-off-by: Moshe Tal Reviewed-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/qos.c | 64 +++++++++++------------ drivers/net/ethernet/mellanox/mlx5/core/en/qos.h | 4 +- drivers/net/ethernet/mellanox/mlx5/core/en/selq.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- 4 files changed, 36 insertions(+), 36 deletions(-) commit 28df4a0117e2f54fb3d9307a8c725efd19e8a653 Author: Moshe Tal Date: Tue Apr 5 04:34:00 2022 +0300 net/mlx5e: HTB, remove priv from htb function calls As a step to make htb self-contained replace the passing of priv as a parameter to htb function calls with members in the htb struct. Full decoupling the htb from priv will require more work, so for now leave the priv as one of the members in the htb struct, to be replaced by channels in a future commit. Signed-off-by: Moshe Tal Reviewed-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/qos.c | 302 ++++++++++++---------- drivers/net/ethernet/mellanox/mlx5/core/en/qos.h | 5 +- drivers/net/ethernet/mellanox/mlx5/core/en/selq.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 13 +- 4 files changed, 172 insertions(+), 150 deletions(-) commit aaffda6b36686a368d6569df3f92acfc7fc0fcd8 Author: Saeed Mahameed Date: Tue Feb 9 15:43:56 2021 -0800 net/mlx5e: HTB, hide and dynamically allocate mlx5e_htb structure Move structure mlx5e_htb from the main driver include file "en.h" to be hidden in qos.c where the qos functionality is implemented, forward declare it for the rest of the driver and allocate it dynamically upon user demand only. Signed-off-by: Saeed Mahameed Signed-off-by: Moshe Tal Reviewed-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy drivers/net/ethernet/mellanox/mlx5/core/en.h | 8 +-- drivers/net/ethernet/mellanox/mlx5/core/en/qos.c | 87 +++++++++++++++++------ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7 +- 3 files changed, 70 insertions(+), 32 deletions(-) commit db83f24d89e614d224eb346e0cfdcc209993dea3 Author: Moshe Tal Date: Wed Mar 16 11:40:09 2022 +0200 net/mlx5e: HTB, move stats and max_sqs to priv Preparation for dynamic allocation of the HTB struct. The statistics should be preserved even when the struct is de-allocated. Signed-off-by: Moshe Tal Reviewed-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en/qos.c | 16 ++++++++-------- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 +++--- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 12 ++++++------ 4 files changed, 19 insertions(+), 19 deletions(-) commit 66d95936488ca1716ef55f8837616e4ff7b7de99 Author: Moshe Tal Date: Thu Mar 31 19:20:32 2022 +0300 net/mlx5e: HTB, move section comment to the right place mlx5e_get_qos_sq is a part of the SQ lifecycle, so need be under the title. Signed-off-by: Moshe Tal Reviewed-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/qos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4f8d1d3adc8d126c600fff55ff81855d50d5df3e Author: Moshe Tal Date: Tue Feb 9 14:47:05 2021 -0800 net/mlx5e: HTB, move ids to selq_params struct HTB id fields are needed for selecting queue. Moving them to the selq_params struct will simplify synchronization between control flow and mlx5e_select_queues and will keep the IDs in the hot cacheline of mlx5e_selq_params. Replace mlx5e_selq_prepare() with separate functions that change subsets of parameters, while keeping the rest. This also will be useful to hide mlx5e_htb structure from the rest of the driver in a later patch in this series. Signed-off-by: Saeed Mahameed Signed-off-by: Moshe Tal Reviewed-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 - drivers/net/ethernet/mellanox/mlx5/core/en/qos.c | 23 ++++------- drivers/net/ethernet/mellanox/mlx5/core/en/selq.c | 48 ++++++++++++++++++---- drivers/net/ethernet/mellanox/mlx5/core/en/selq.h | 4 +- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 4 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 15 ++++--- 6 files changed, 62 insertions(+), 34 deletions(-) commit efe317997ec9501d1b37802f8ffef1692caa0f68 Author: Saeed Mahameed Date: Tue Feb 9 14:31:15 2021 -0800 net/mlx5e: HTB, reduce visibility of htb functions No need to expose all htb tc functions to the main driver file, expose only the master htb tc function mlx5e_htb_setup_tc() which selects the internal "now static" function to call. Signed-off-by: Saeed Mahameed Signed-off-by: Moshe Tal Reviewed-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy drivers/net/ethernet/mellanox/mlx5/core/en/qos.c | 84 ++++++++++++++++++----- drivers/net/ethernet/mellanox/mlx5/core/en/qos.h | 16 +---- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 44 +----------- 3 files changed, 70 insertions(+), 74 deletions(-) commit 0bb7228f7096d760252eb6948e2858376d628062 Author: Moshe Tal Date: Wed May 4 16:00:28 2022 +0300 net/mlx5e: Fix mqprio_rl handling on devlink reload Keep mqprio_rl data to params and restore the configuration in case of devlink reload. Change the location of mqprio_rl resources cleanup so it will be done also in reload flow. Also, remove the rl pointer from the params, since this is dynamic object and saved to priv. Signed-off-by: Moshe Tal Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 144 ++++++++++++++++------ 2 files changed, 106 insertions(+), 41 deletions(-) commit 07071e47da440f020a24a90b4d136d567066c15f Author: Gal Pressman Date: Wed Feb 2 11:28:17 2022 +0200 net/mlx5e: Report header-data split state through ethtool HW-GRO (SHAMPO) packet merger scheme implies header-data split in the driver, report it through the ethtool interface. Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 12 ++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) commit d79ee9a66a82e4b88a26d7928f78ecdca180c483 Merge: 9e7c9b8eb719 4f232482467a Author: Marc Kleine-Budde Date: Tue Jul 19 21:42:14 2022 +0200 Merge branch 'can-peak_usb-cleanups-and-updates' Stephane Grosjean contributes a peak-usb cleanup and update series. Signed-off-by: Marc Kleine-Budde commit 4f232482467a354a74e08633faa1ed93fe00ee5e Author: Stephane Grosjean Date: Tue Jul 19 14:06:32 2022 +0200 can: peak_usb: include support for a new MCU The CANFD-USB PCAN-USB FD interface undergoes an internal component change that requires a slight modification of its drivers, which leads them to dynamically use endpoint numbers provided by the interface itself. In addition to a change in the calls to the USB functions exported by the kernel, the detection of the USB interface dedicated to CAN must also be modified, as some PEAK-System devices support other interfaces than CAN. Link: https://lore.kernel.org/all/20220719120632.26774-3-s.grosjean@peak-system.com Signed-off-by: Stephane Grosjean [mkl: add missing cpu_to_le16() conversion] [mkl: fix networking block comment style] Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 68 +++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 10 deletions(-) commit a0cf2fe6cf2eff9fa74181e8cf2116d35ba47a09 Author: Stephane Grosjean Date: Tue Jul 19 14:06:31 2022 +0200 can: peak_usb: correction of an initially misnamed field name The data structure returned from the USB device contains a number flashed by the user and not the serial number of the device. Link: https://lore.kernel.org/all/20220719120632.26774-2-s.grosjean@peak-system.com Signed-off-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 2 +- drivers/net/can/usb/peak_usb/pcan_usb_pro.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 92505df464ff16a0cfb7ae27533f0978dca0bce5 Author: Stephane Grosjean Date: Tue Jul 19 14:06:30 2022 +0200 can: peak_usb: pcan_dump_mem(): mark input prompt and data pointer as const Mark the input prompt and data pointer as const. Link: https://lore.kernel.org/all/20220719120632.26774-1-s.grosjean@peak-system.com Signed-off-by: Stephane Grosjean [mkl: mark data pointer as const, too; update commit message] Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/peak_usb/pcan_usb_core.c | 2 +- drivers/net/can/usb/peak_usb/pcan_usb_core.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 68566a7cf56bf3148797c218ed45a9de078ef47c Author: Adrian Hunter Date: Mon Jul 11 12:31:44 2022 +0300 perf tools: Fix dso_id inode generation comparison Synthesized MMAP events have zero ino_generation, so do not compare them to DSOs with a real ino_generation otherwise we end up with a DSO without a build id. Fixes: 0e3149f86b99ddab ("perf dso: Move dso_id from 'struct map' to 'struct dso'") Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: kvm@vger.kernel.org Cc: Namhyung Kim Link: https://lore.kernel.org/r/20220711093218.10967-2-adrian.hunter@intel.com [ Added clarification to the comment from Ian + more detailed explanation from Adrian ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dsos.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 9e7c9b8eb719835638ee74d93dccc2173581324c Author: Pavel Pisa Date: Mon Jul 18 12:26:21 2022 +0200 can: ctucanfd: Update CTU CAN FD IP core registers to match version 3.x. The update is compatible/pure extension of 2.x IP core version - new option for 2, 4, or 8 Tx buffers option during synthesis. The 2.x version has fixed 4 Tx buffers. 3.x version default is 4 as well - new REG_TX_COMMAND_TXT_BUFFER_COUNT provides synthesis choice. When read as 0 assume 2.x core with fixed 4 Tx buffers. - new REG_ERR_CAPT_TS_BITS field to provide most significant active/implemented timestamp bit. For 2.x read as zero, assume value 63 is such case for 64 bit counter. - new REG_MODE_RXBAM bit which controls automatic advance to next word after Rx FIFO register read. Bit is set to 1 by default after the core reset (REG_MODE_RST) and value 1 has to be preserved for the normal ctucanfd Linux driver operation. Even preceding driver version resets core and then modifies only known/required MODE register bits so backward and forward compatibility is ensured. See complete datasheet for time-triggered and other updated capabilities http://canbus.pages.fel.cvut.cz/ctucanfd_ip_core/doc/Datasheet.pdf The fields related to ongoing Ondrej Ille's work on fault tolerant version with parity protected buffers and FIFOs are not included for now. Their inclusion will be considered when design is settled and tested. Link: https://lore.kernel.org/all/14a98ed1829121f0f3bde784f1aa533bc3cc7fe0.1658139843.git.pisa@cmp.felk.cvut.cz Signed-off-by: Pavel Pisa Signed-off-by: Marc Kleine-Budde drivers/net/can/ctucanfd/ctucanfd_kregs.h | 32 +++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) commit 4940eb51fc49c6e89eb7ac4216f1983eec1d1c6f Author: Dario Binacchi Date: Sat Jul 16 19:01:12 2022 +0200 can: c_can: remove wrong comment The comment referred to a status (warning) other than the one that was being managed (active error). Link: https://lore.kernel.org/all/20220716170112.2020291-1-dario.binacchi@amarulasolutions.com Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde drivers/net/can/c_can/c_can_main.c | 1 - 1 file changed, 1 deletion(-) commit c6887023268e8c92c7409613065db7ba50b25f18 Author: Dario Binacchi Date: Fri Jul 15 09:29:51 2022 +0200 can: slcan: do not sleep with a spin lock held We can't call close_candev() with a spin lock held, so release the lock before calling it. After calling close_candev(), we can update the fields of the private `struct can_priv' without having to acquire the lock. Fixes: c4e54b063f42f ("can: slcan: use CAN network device driver API") Link: https://lore.kernel.org/linux-kernel/Ysrf1Yc5DaRGN1WE@xsang-OptiPlex-9020/ Link: https://lore.kernel.org/all/20220715072951.859586-1-dario.binacchi@amarulasolutions.com Reported-by: kernel test robot Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 3f2adf00f52b5f2e9e9f23bb5c77608fc9ee297c Author: Paolo Bonzini Date: Tue Jul 19 13:47:14 2022 -0400 x86/cpu: Use MSR_IA32_MISC_ENABLE constants Instead of the magic numbers 1<<11 and 1<<12 use the constants from msr-index.h. This makes it obvious where those bits of MSR_IA32_MISC_ENABLE are consumed (and in fact that Linux consumes them at all) to simple minds that grep for MSR_IA32_MISC_ENABLE_.*_UNAVAIL. Signed-off-by: Paolo Bonzini Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20220719174714.2410374-1-pbonzini@redhat.com arch/x86/kernel/cpu/intel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cc944c89c53eee81b266aed2cb1f445488e54e6a Merge: 8575f3141abe 6d5fe10796bb Author: Marc Kleine-Budde Date: Tue Jul 19 20:48:29 2022 +0200 Merge branch 'can-add-support-for-rz-n1-sja1000-can-controller' Biju Das says: ==================== Add support for RZ/N1 SJA1000 CAN controller This patch series aims to add support for RZ/N1 SJA1000 CAN controller. The SJA1000 CAN controller on RZ/N1 SoC has some differences compared to others like it has no clock divider register (CDR) support and it has no HW loopback (HW doesn't see tx messages on rx), so introduced a new compatible 'renesas,rzn1-sja1000' to handle these differences. v3->v4: * Updated bindings as per coding style used in example-schema. * Entire entry in properties compatible declared as enum. Also Descriptions do not bring any information,so removed it from compatible description. * Used decimal values in nxp,tx-output-mode enums. * Fixed indentaions in binding examples. * Removed clock-names from bindings, as it is single clock. * Optimized the code as per Vincent's suggestion. * Updated clock handling as per bindings. v2->v3: * Added reg-io-width is a required property for technologic,sja1000 & renesas,rzn1-sja1000 * Removed enum type from nxp,tx-output-config and updated the description for combination of TX0 and TX1. * Updated the example for technologic,sja1000 v1->v2: * Moved $ref: can-controller.yaml# to top along with if conditional to avoid multiple mapping issues with the if conditional in the subsequent patch. * Added an example for RZ/N1D SJA1000 usage. * Updated commit description for patch#2,#3 and #6 * Removed the quirk macro SJA1000_NO_HW_LOOPBACK_QUIRK * Added prefix SJA1000_QUIRK_* for quirk macro. * Replaced of_device_get_match_data->device_get_match_data. * Added error handling on clk error path * Started using "devm_clk_get_optional_enabled" for clk get,prepare and enable. Ref: [1] https://lore.kernel.org/linux-renesas-soc/20220701162320.102165-1-biju.das.jz@bp.renesas.com/T/#t ==================== Link: https://lore.kernel.org/all/20220710115248.190280-1-biju.das.jz@bp.renesas.com [mkl: applying patches 1...5 only, as 6 depends devm_clk_get_optional_enabled(), which is not in net-next/master, yet] Signed-off-by: Marc Kleine-Budde commit 6d5fe10796bb3d336eac4962e71a3cbb6ff728f9 Author: Biju Das Date: Sun Jul 10 12:52:47 2022 +0100 can: sja1000: Change the return type as void for SoC specific init Change the return type as void for SoC specific init function as it always return 0. Link: https://lore.kernel.org/all/20220710115248.190280-6-biju.das.jz@bp.renesas.com Signed-off-by: Biju Das Signed-off-by: Marc Kleine-Budde drivers/net/can/sja1000/sja1000_platform.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 63ab1b63695e65fe8cce32afc5319f121f0320f1 Author: Biju Das Date: Sun Jul 10 12:52:46 2022 +0100 can: sja1000: Use device_get_match_data to get device data This patch replaces of_match_device->device_get_match_data to get pointer to device data. Link: https://lore.kernel.org/all/20220710115248.190280-5-biju.das.jz@bp.renesas.com Signed-off-by: Biju Das Signed-off-by: Marc Kleine-Budde drivers/net/can/sja1000/sja1000_platform.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 2d99bfbf3386962692dcccd73931cb0db07a1a43 Author: Biju Das Date: Sun Jul 10 12:52:45 2022 +0100 can: sja1000: Add Quirk for RZ/N1 SJA1000 CAN controller As per Chapter 6.5.16 of the RZ/N1 Peripheral Manual, The SJA1000 CAN controller does not support Clock Divider Register compared to the reference Philips SJA1000 device. This patch adds a device quirk to handle this difference. Link: https://lore.kernel.org/all/20220710115248.190280-4-biju.das.jz@bp.renesas.com Signed-off-by: Biju Das Signed-off-by: Marc Kleine-Budde drivers/net/can/sja1000/sja1000.c | 8 +++++--- drivers/net/can/sja1000/sja1000.h | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) commit 4591c760b79759849b563605132e6afdd0149717 Author: Biju Das Date: Sun Jul 10 12:52:44 2022 +0100 dt-bindings: can: nxp,sja1000: Document RZ/N1{D,S} support Add CAN binding documentation for Renesas RZ/N1 SoC. The SJA1000 CAN controller on RZ/N1 SoC has some differences compared to others like it has no clock divider register (CDR) support and it has no HW loopback (HW doesn't see tx messages on rx), so introduced a new compatible 'renesas,rzn1-sja1000' to handle these differences. Link: https://lore.kernel.org/all/20220710115248.190280-3-biju.das.jz@bp.renesas.com Signed-off-by: Biju Das Reviewed-by: Krzysztof Kozlowski Signed-off-by: Marc Kleine-Budde .../devicetree/bindings/net/can/nxp,sja1000.yaml | 39 +++++++++++++++++++--- 1 file changed, 35 insertions(+), 4 deletions(-) commit f6b8061db9af1d3660160392e1d6591c2b03596d Author: Biju Das Date: Sun Jul 10 12:52:43 2022 +0100 dt-bindings: can: sja1000: Convert to json-schema Convert the NXP SJA1000 CAN Controller Device Tree binding documentation to json-schema. Update the example to match reality. Link: https://lore.kernel.org/all/20220710115248.190280-2-biju.das.jz@bp.renesas.com Signed-off-by: Biju Das Reviewed-by: Krzysztof Kozlowski Signed-off-by: Marc Kleine-Budde .../devicetree/bindings/net/can/nxp,sja1000.yaml | 101 +++++++++++++++++++++ .../devicetree/bindings/net/can/sja1000.txt | 58 ------------ 2 files changed, 101 insertions(+), 58 deletions(-) commit 0578e14c945b1739e15c0e993280151fa5b99ca2 Author: Zqiang Date: Sat Jun 11 19:00:44 2022 +0800 rcu/nocb: Avoid polling when my_rdp->nocb_head_rdp list is empty Currently, if the 'rcu_nocb_poll' kernel boot parameter is enabled, all rcuog kthreads enter polling mode. However, if all of a given group of rcuo kthreads correspond to CPUs that have been de-offloaded, the corresponding rcuog kthread will nonetheless still wake up periodically, unnecessarily consuming power and perturbing workloads. Fortunately, this situation is easily detected by the fact that the rcuog kthread's CPU's rcu_data structure's ->nocb_head_rdp list is empty. This commit saves power and avoids unnecessarily perturbing workloads by putting an rcuog kthread to sleep during any time period when all of its rcuo kthreads' CPUs are de-offloaded. Co-developed-by: Frederic Weisbecker Signed-off-by: Frederic Weisbecker Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay kernel/rcu/tree_nocb.h | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit 8f489b4da5278fc6e5fc8f0029ae7fb51c060215 Author: Uladzislau Rezki (Sony) Date: Wed May 11 10:57:03 2022 +0200 rcu/nocb: Add option to opt rcuo kthreads out of RT priority This commit introduces a RCU_NOCB_CPU_CB_BOOST Kconfig option that prevents rcuo kthreads from running at real-time priority, even in kernels built with RCU_BOOST. This capability is important to devices needing low-latency (as in a few milliseconds) response from expedited RCU grace periods, but which are not running a classic real-time workload. On such devices, permitting the rcuo kthreads to run at real-time priority results in unacceptable latencies imposed on the application tasks, which run as SCHED_OTHER. See for example the following trace output: <...>-60 [006] d..1 2979.028717: rcu_batch_start: rcu_preempt CBs=34619 bl=270 If that rcuop kthread were permitted to run at real-time SCHED_FIFO priority, it would monopolize its CPU for hundreds of milliseconds while invoking those 34619 RCU callback functions, which would cause an unacceptably long latency spike for many application stacks on Android platforms. However, some existing real-time workloads require that callback invocation run at SCHED_FIFO priority, for example, those running on systems with heavy SCHED_OTHER background loads. (It is the real-time system's administrator's responsibility to make sure that important real-time tasks run at a higher priority than do RCU's kthreads.) Therefore, this new RCU_NOCB_CPU_CB_BOOST Kconfig option defaults to "y" on kernels built with PREEMPT_RT and defaults to "n" otherwise. The effect is to preserve current behavior for real-time systems, but for other systems to allow expedited RCU grace periods to run with real-time priority while continuing to invoke RCU callbacks as SCHED_OTHER. As you would expect, this RCU_NOCB_CPU_CB_BOOST Kconfig option has no effect except on CPUs with offloaded RCU callbacks. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney Acked-by: Joel Fernandes (Google) Reviewed-by: Neeraj Upadhyay kernel/rcu/Kconfig | 16 ++++++++++++++++ kernel/rcu/tree.c | 6 +++++- kernel/rcu/tree_nocb.h | 3 ++- 3 files changed, 23 insertions(+), 2 deletions(-) commit 5103850654fdc651f0a7076ac753b958f018bb85 Author: Zqiang Date: Fri Apr 29 20:42:22 2022 +0800 rcu: Add nocb_cb_kthread check to rcu_is_callbacks_kthread() Callbacks are invoked in RCU kthreads when calbacks are offloaded (rcu_nocbs boot parameter) or when RCU's softirq handler has been offloaded to rcuc kthreads (use_softirq==0). The current code allows for the rcu_nocbs case but not the use_softirq case. This commit adds support for the use_softirq case. Reported-by: kernel test robot Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay kernel/rcu/tree.c | 4 ++-- kernel/rcu/tree.h | 2 +- kernel/rcu/tree_plugin.h | 33 +++++++++++++++++++-------------- 3 files changed, 22 insertions(+), 17 deletions(-) commit b37a667c62421b34e96b05613457b9fb0ed66ea1 Author: Joel Fernandes Date: Fri Apr 22 17:52:47 2022 +0000 rcu/nocb: Add an option to offload all CPUs on boot Systems built with CONFIG_RCU_NOCB_CPU=y but booted without either the rcu_nocbs= or rcu_nohz_full= kernel-boot parameters will not have callback offloading on any of the CPUs, nor can any of the CPUs be switched to enable callback offloading at runtime. Although this is intentional, it would be nice to have a way to offload all the CPUs without having to make random bootloaders specify either the rcu_nocbs= or the rcu_nohz_full= kernel-boot parameters. This commit therefore provides a new CONFIG_RCU_NOCB_CPU_DEFAULT_ALL Kconfig option that switches the default so as to offload callback processing on all of the CPUs. This default can still be overridden using the rcu_nocbs= and rcu_nohz_full= kernel-boot parameters. Reviewed-by: Kalesh Singh Reviewed-by: Uladzislau Rezki (In v4.1, fixed issues with CONFIG maze reported by kernel test robot). Reported-by: kernel test robot Signed-off-by: Joel Fernandes Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay Documentation/admin-guide/kernel-parameters.txt | 6 ++++++ kernel/rcu/Kconfig | 13 +++++++++++++ kernel/rcu/tree_nocb.h | 15 ++++++++++++++- 3 files changed, 33 insertions(+), 1 deletion(-) commit 3a5761dc025da47960755ac64d9fbf1c32e8cd80 Author: Zqiang Date: Tue Apr 19 14:23:20 2022 +0200 rcu/nocb: Fix NOCB kthreads spawn failure with rcu_nocb_rdp_deoffload() direct call If the rcuog/o[p] kthreads spawn failed, the offloaded rdp needs to be explicitly deoffloaded, otherwise the target rdp is still considered offloaded even though nothing actually handles the callbacks. Signed-off-by: Zqiang Cc: Neeraj Upadhyay Cc: Boqun Feng Cc: Uladzislau Rezki Cc: Joel Fernandes Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay kernel/rcu/tree_nocb.h | 80 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 64 insertions(+), 16 deletions(-) commit 24a57affd242566fef2935f04f062350b8275187 Author: Zqiang Date: Tue Apr 19 14:23:19 2022 +0200 rcu/nocb: Invert rcu_state.barrier_mutex VS hotplug lock locking order In case of failure to spawn either rcuog or rcuo[p] kthreads for a given rdp, rcu_nocb_rdp_deoffload() needs to be called with the hotplug lock and the barrier_mutex held. However cpus write lock is already held while calling rcutree_prepare_cpu(). It's not possible to call rcu_nocb_rdp_deoffload() from there with just locking the barrier_mutex or this would result in a locking inversion against rcu_nocb_cpu_deoffload() which holds both locks in the reverse order. Simply solve this with inverting the locking order inside rcu_nocb_cpu_[de]offload(). This will be a pre-requisite to toggle NOCB states toward cpusets anyway. Signed-off-by: Zqiang Cc: Neeraj Upadhyay Cc: Boqun Feng Cc: Uladzislau Rezki Cc: Joel Fernandes Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay kernel/rcu/tree_nocb.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1598f4a4762be0ea6a1bcd229c2c9ff1ebb212bb Author: Frederic Weisbecker Date: Tue Apr 19 14:23:18 2022 +0200 rcu/nocb: Add/del rdp to iterate from rcuog itself NOCB rdp's are part of a group whose list is iterated by the corresponding rdp leader. This list is RCU traversed because an rdp can be either added or deleted concurrently. Upon addition, a new iteration to the list after a synchronization point (a pair of LOCK/UNLOCK ->nocb_gp_lock) is forced to make sure: 1) we didn't miss a new element added in the middle of an iteration 2) we didn't ignore a whole subset of the list due to an element being quickly deleted and then re-added. 3) we prevent from probably other surprises... Although this layout is expected to be safe, it doesn't help anybody to sleep well. Simplify instead the nocb state toggling with moving the list modification from the nocb (de-)offloading workqueue to the rcuog kthreads instead. Whenever the rdp leader is expected to (re-)set the SEGCBLIST_KTHREAD_GP flag of a target rdp, the latter is queued so that the leader handles the flag flip along with adding or deleting the target rdp to the list to iterate. This way the list modification and iteration happen from the same kthread and those operations can't race altogether. As a bonus, the flags for each rdp don't need to be checked locklessly before each iteration, which is one less opportunity to produce nightmares. Signed-off-by: Frederic Weisbecker Cc: Neeraj Upadhyay Cc: Boqun Feng Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Zqiang Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay kernel/rcu/tree.h | 1 + kernel/rcu/tree_nocb.h | 138 +++++++++++++++++++++++++------------------------ 2 files changed, 71 insertions(+), 68 deletions(-) commit a03ae49c4785c1bc7b940e38bbdf2e63d79d1470 Author: Neeraj Upadhyay Date: Thu Jun 9 12:43:40 2022 +0530 rcu/tree: Add comment to describe GP-done condition in fqs loop Add a comment to explain why !rcu_preempt_blocked_readers_cgp() condition is required on root rnp node, for GP completion check in rcu_gp_fqs_loop(). Reviewed-by: Joel Fernandes (Google) Signed-off-by: Neeraj Upadhyay Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 9bdb5b3a8d8ad1c92db309219859fe1c87c95351 Author: Paul E. McKenney Date: Wed Jun 8 09:34:10 2022 -0700 rcu: Initialize first_gp_fqs at declaration in rcu_gp_fqs() This commit saves a line of code by initializing the rcu_gp_fqs() function's first_gp_fqs local variable in its declaration. Reported-by: Frederic Weisbecker Reported-by: Neeraj Upadhyay Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 82d26c36cc68e781400eb4e541f943008208f2d6 Author: Joel Fernandes (Google) Date: Thu Jun 2 10:06:43 2022 +0200 rcu/kvfree: Remove useless monitor_todo flag monitor_todo is not needed as the work struct already tracks if work is pending. Just use that to know if work is pending using schedule_delayed_work() helper. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay kernel/rcu/tree.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit e2bb1288a381e9239aaf606ae8c1e20ea71c20bd Author: Zqiang Date: Thu May 26 09:55:12 2022 +0800 rcu: Cleanup RCU urgency state for offline CPU When a CPU is slow to provide a quiescent state for a given grace period, RCU takes steps to encourage that CPU to get with the quiescent-state program in a more timely fashion. These steps include these flags in the rcu_data structure: 1. ->rcu_urgent_qs, which causes the scheduling-clock interrupt to request an otherwise pointless context switch from the scheduler. 2. ->rcu_need_heavy_qs, which causes both cond_resched() and RCU's context-switch hook to do an immediate momentary quiscent state. 3. ->rcu_need_heavy_qs, which causes the scheduler-clock tick to be enabled even on nohz_full CPUs with only one runnable task. These flags are of course cleared once the corresponding CPU has passed through a quiescent state. Unless that quiescent state is the CPU going offline, which means that when the CPU comes back online, it will needlessly consume additional CPU time and incur additional latency, which constitutes a minor but very real performance bug. This commit therefore adds the call to rcu_disable_urgency_upon_qs() that clears these flags to the CPU-hotplug offlining code path. Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay kernel/rcu/tree.c | 1 + 1 file changed, 1 insertion(+) commit 800d6acf40e5ce676b53a1259fb4e93e56279367 Author: Johannes Berg Date: Fri May 27 17:07:45 2022 +0200 rcu: tiny: Record kvfree_call_rcu() call stack for KASAN When running KASAN with Tiny RCU (e.g. under ARCH=um, where a working KASAN patch is now available), we don't get any information on the original kfree_rcu() (or similar) caller when a problem is reported, as Tiny RCU doesn't record this. Add the recording, which required pulling kvfree_call_rcu() out of line for the KASAN case since the recording function (kasan_record_aux_stack_noalloc) is neither exported, nor can we include kasan.h into rcutiny.h. without KASAN, the patch has no size impact (ARCH=um kernel): text data bss dec hex filename 6151515 4423154 33148520 43723189 29b29b5 linux 6151515 4423154 33148520 43723189 29b29b5 linux + patch with KASAN, the impact on my build was minimal: text data bss dec hex filename 13915539 7388050 33282304 54585893 340ea25 linux 13911266 7392114 33282304 54585684 340e954 linux + patch -4273 +4064 +-0 -209 Acked-by: Dmitry Vyukov Signed-off-by: Johannes Berg Signed-off-by: Paul E. McKenney include/linux/rcutiny.h | 11 ++++++++++- kernel/rcu/tiny.c | 14 ++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) commit 9c9b26b0df270d4f9246e483a44686fca951a29c Author: Chen Zhongjin Date: Tue May 10 17:46:39 2022 +0800 locking/csd_lock: Change csdlock_debug from early_param to __setup The csdlock_debug kernel-boot parameter is parsed by the early_param() function csdlock_debug(). If set, csdlock_debug() invokes static_branch_enable() to enable csd_lock_wait feature, which triggers a panic on arm64 for kernels built with CONFIG_SPARSEMEM=y and CONFIG_SPARSEMEM_VMEMMAP=n. With CONFIG_SPARSEMEM_VMEMMAP=n, __nr_to_section is called in static_key_enable() and returns NULL, resulting in a NULL dereference because mem_section is initialized only later in sparse_init(). This is also a problem for powerpc because early_param() functions are invoked earlier than jump_label_init(), also resulting in static_key_enable() failures. These failures cause the warning "static key 'xxx' used before call to jump_label_init()". Thus, early_param is too early for csd_lock_wait to run static_branch_enable(), so changes it to __setup to fix these. Fixes: 8d0968cc6b8f ("locking/csd_lock: Add boot parameter for controlling CSD lock debugging") Cc: stable@vger.kernel.org Reported-by: Chen jingwen Signed-off-by: Chen Zhongjin Signed-off-by: Paul E. McKenney kernel/smp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b3ade95b8ee507d650d9e163abfdf645a9f3886d Author: Paul E. McKenney Date: Tue May 17 18:03:36 2022 -0700 rcu: Forbid RCU_STRICT_GRACE_PERIOD in TINY_RCU kernels The RCU_STRICT_GRACE_PERIOD Kconfig option does nothing in kernels built with CONFIG_TINY_RCU=y, so this commit adjusts the dependencies to disallow this combination. Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay kernel/rcu/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70a82c3c55c8665d3996dcb9968adcf24d52bbc4 Author: Zqiang Date: Fri May 13 08:42:55 2022 +0800 rcu: Immediately boost preempted readers for strict grace periods The intent of the CONFIG_RCU_STRICT_GRACE_PERIOD Konfig option is to cause normal grace periods to complete quickly in order to better catch errors resulting from improperly leaking pointers from RCU read-side critical sections. However, kernels built with this option enabled still wait for some hundreds of milliseconds before boosting RCU readers that have been preempted within their current critical section. The value of this delay is set by the CONFIG_RCU_BOOST_DELAY Kconfig option, which defaults to 500 milliseconds. This commit therefore causes kernels build with strict grace periods to ignore CONFIG_RCU_BOOST_DELAY. This causes rcu_initiate_boost() to start boosting immediately after all CPUs on a given leaf rcu_node structure have passed through their quiescent states. Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay kernel/rcu/tree_plugin.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 52c1d81ee2911ef592048582c6d07975b7399726 Author: Zqiang Date: Thu May 5 23:52:36 2022 +0800 rcu: Add rnp->cbovldmask check in rcutree_migrate_callbacks() Currently, the rcu_node structure's ->cbovlmask field is set in call_rcu() when a given CPU is suffering from callback overload. But if that CPU goes offline, the outgoing CPU's callbacks is migrated to the running CPU, which is likely to overload the running CPU. However, that CPU's bit in its leaf rcu_node structure's ->cbovlmask field remains zero. Initially, this is OK because the outgoing CPU's bit remains set. However, that bit will be cleared at the next end of a grace period, at which time it is quite possible that the running CPU will still be overloaded. If the running CPU invokes call_rcu(), then overload will be checked for and the bit will be set. Except that there is no guarantee that the running CPU will invoke call_rcu(), in which case the next grace period will fail to take the running CPU's overload condition into account. Plus, because the bit is not set, the end of the grace period won't check for overload on this CPU. This commit therefore adds a call to check_cb_ovld_locked() in rcutree_migrate_callbacks() to set the running CPU's ->cbovlmask bit appropriately. Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay kernel/rcu/tree.c | 1 + 1 file changed, 1 insertion(+) commit 48f8070f5dd8e13148ae4647780a452d53c457a2 Author: Patrick Wang Date: Tue Apr 26 18:45:02 2022 +0800 rcu: Avoid tracing a few functions executed in stop machine Stop-machine recently started calling additional functions while waiting: ---------------------------------------------------------------- Former stop machine wait loop: do { cpu_relax(); => macro ... } while (curstate != STOPMACHINE_EXIT); ----------------------------------------------------------------- Current stop machine wait loop: do { stop_machine_yield(cpumask); => function (notraced) ... touch_nmi_watchdog(); => function (notraced, inside calls also notraced) ... rcu_momentary_dyntick_idle(); => function (notraced, inside calls traced) } while (curstate != MULTI_STOP_EXIT); ------------------------------------------------------------------ These functions (and the functions that they call) must be marked notrace to prevent them from being updated while they are executing. The consequences of failing to mark these functions can be severe: rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: rcu: 1-...!: (0 ticks this GP) idle=14f/1/0x4000000000000000 softirq=3397/3397 fqs=0 rcu: 3-...!: (0 ticks this GP) idle=ee9/1/0x4000000000000000 softirq=5168/5168 fqs=0 (detected by 0, t=8137 jiffies, g=5889, q=2 ncpus=4) Task dump for CPU 1: task:migration/1 state:R running task stack: 0 pid: 19 ppid: 2 flags:0x00000000 Stopper: multi_cpu_stop+0x0/0x18c <- stop_machine_cpuslocked+0x128/0x174 Call Trace: Task dump for CPU 3: task:migration/3 state:R running task stack: 0 pid: 29 ppid: 2 flags:0x00000000 Stopper: multi_cpu_stop+0x0/0x18c <- stop_machine_cpuslocked+0x128/0x174 Call Trace: rcu: rcu_preempt kthread timer wakeup didn't happen for 8136 jiffies! g5889 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 rcu: Possible timer handling issue on cpu=2 timer-softirq=594 rcu: rcu_preempt kthread starved for 8137 jiffies! g5889 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=2 rcu: Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior. rcu: RCU grace-period kthread stack dump: task:rcu_preempt state:I stack: 0 pid: 14 ppid: 2 flags:0x00000000 Call Trace: schedule+0x56/0xc2 schedule_timeout+0x82/0x184 rcu_gp_fqs_loop+0x19a/0x318 rcu_gp_kthread+0x11a/0x140 kthread+0xee/0x118 ret_from_exception+0x0/0x14 rcu: Stack dump where RCU GP kthread last ran: Task dump for CPU 2: task:migration/2 state:R running task stack: 0 pid: 24 ppid: 2 flags:0x00000000 Stopper: multi_cpu_stop+0x0/0x18c <- stop_machine_cpuslocked+0x128/0x174 Call Trace: This commit therefore marks these functions notrace: rcu_preempt_deferred_qs() rcu_preempt_need_deferred_qs() rcu_preempt_deferred_qs_irqrestore() [ paulmck: Apply feedback from Neeraj Upadhyay. ] Signed-off-by: Patrick Wang Acked-by: Steven Rostedt (Google) Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay kernel/rcu/tree_plugin.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fb77dccfc701b6ebcc232574c828bc69146cf90a Author: Paul E. McKenney Date: Tue Apr 12 15:08:14 2022 -0700 rcu: Decrease FQS scan wait time in case of callback overloading The force-quiesce-state loop function rcu_gp_fqs_loop() checks for callback overloading and does an immediate initial scan for idle CPUs if so. However, subsequent rescans will be carried out at as leisurely a rate as they always are, as specified by the rcutree.jiffies_till_next_fqs module parameter. It might be tempting to just continue immediately rescanning, but this turns the RCU grace-period kthread into a CPU hog. It might also be tempting to reduce the time between rescans to a single jiffy, but this can be problematic on larger systems. This commit therefore divides the normal time between rescans by three, rounding up. Thus a small system running at HZ=1000 that is suffering from callback overload will wait only one jiffy instead of the normal three between rescans. [ paulmck: Apply Neeraj Upadhyay feedback. ] Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay kernel/rcu/tree.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 8575f3141abe66aa829ed97e1a7b7f2cfefc5149 Merge: 0159a9305d40 18de712a5802 Author: Marc Kleine-Budde Date: Tue Jul 19 20:30:28 2022 +0200 Merge branch 'can-slcan-checkpatch-cleanups' Marc Kleine-Budde says: ==================== can: slcan: checkpatch cleanups This is a patch series consisting of various checkpatch cleanups for the slcan driver. ==================== Link: https://lore.kernel.org/all/20220704125954.1587880-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 18de712a58021a3eda96f832eae58e66d5254c60 Author: Marc Kleine-Budde Date: Sun Jul 3 11:26:58 2022 +0200 can: slcan: clean up if/else Remove braces after if() for single statement blocks, also remove else after return() in if() block. Link: https://lore.kernel.org/all/20220704125954.1587880-6-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 69a6539632dd9389e9c3b4e209308b74d5d46de5 Author: Marc Kleine-Budde Date: Sun Jul 3 11:24:26 2022 +0200 can: slcan: convert comparison to NULL into !val All comparison to NULL could be written "!val", convert them to make checkpatch happy. Link: https://lore.kernel.org/all/20220704125954.1587880-5-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit f07d9e3c849b9c320e89037e0835da04b0f583e4 Author: Marc Kleine-Budde Date: Sun Jul 3 11:23:18 2022 +0200 can: slcan: fix whitespace issues Add and remove whitespace to make checkpatch happy. Link: https://lore.kernel.org/all/20220704125954.1587880-4-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ded5fa885b2d967dfc3e5b0dd85fcdf068cbe166 Author: Marc Kleine-Budde Date: Sun Jul 3 11:21:13 2022 +0200 can: slcan: slcan_init() convert printk(LEVEL ...) to pr_level() Convert the last printk(LEVEL ...) to pr_level(). Link: https://lore.kernel.org/all/20220704125954.1587880-3-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71f3a4cc740ad214d04172832461d7e5fdfe71da Author: Marc Kleine-Budde Date: Sun Jul 3 11:19:23 2022 +0200 can: slcan: convert comments to network style comments Convert all comments to network subsystem style comments. Link: https://lore.kernel.org/all/20220704125954.1587880-2-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 55 +++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 31 deletions(-) commit 0159a9305d401fd21a1cda5e7baaf62122c46a5b Author: Dan Carpenter Date: Wed Jul 6 10:59:48 2022 +0300 can: slcan: use scnprintf() as a hardening measure The snprintf() function returns the number of bytes which *would* have been copied if there were no space. So, since this code does not check the return value, there if the buffer was not large enough then there would be a buffer overflow two lines later when it does: actual = sl->tty->ops->write(sl->tty, sl->xbuff, n); Use scnprintf() instead because that returns the number of bytes which were actually copied. Fixes: 52f9ac85b876 ("can: slcan: allow to send commands to the adapter") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/all/YsVA9KoY/ZSvNGYk@kili Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19198abf3d81b66aaee453c063e66b8df9d69251 Author: Joey Gouly Date: Fri Jul 8 15:00:56 2022 +0100 arm64/mm: use GENMASK_ULL for TTBR_BADDR_MASK_52 The comment says this should be GENMASK_ULL(47, 12), so do that! GENMASK_ULL() is available in assembly since: 95b980d62d52 ("linux/bits.h: make BIT(), GENMASK(), and friends available in assembly") Signed-off-by: Joey Gouly Link: https://lore.kernel.org/all/20171221164851.edxq536yobjuagwe@armageddon.cambridge.arm.com/ Cc: Catalin Marinas Cc: Will Deacon Cc: Kristina Martsenko Reviewed-by: Kristina Martsenko Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20220708140056.10123-1-joey.gouly@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable-hwdef.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 44b3834b2eed595af07021b1c64e6f9bc396398b Author: James Morse Date: Thu Jul 14 17:15:23 2022 +0100 arm64: errata: Remove AES hwcap for COMPAT tasks Cortex-A57 and Cortex-A72 have an erratum where an interrupt that occurs between a pair of AES instructions in aarch32 mode may corrupt the ELR. The task will subsequently produce the wrong AES result. The AES instructions are part of the cryptographic extensions, which are optional. User-space software will detect the support for these instructions from the hwcaps. If the platform doesn't support these instructions a software implementation should be used. Remove the hwcap bits on affected parts to indicate user-space should not use the AES instructions. Acked-by: Ard Biesheuvel Signed-off-by: James Morse Link: https://lore.kernel.org/r/20220714161523.279570-3-james.morse@arm.com Signed-off-by: Will Deacon Documentation/arm64/silicon-errata.rst | 4 ++++ arch/arm64/Kconfig | 16 ++++++++++++++++ arch/arm64/kernel/cpu_errata.c | 16 ++++++++++++++++ arch/arm64/kernel/cpufeature.c | 14 +++++++++++++- arch/arm64/tools/cpucaps | 1 + 5 files changed, 50 insertions(+), 1 deletion(-) commit 16824dffcf616b829e4aca3a06f45c0ad743a99c Merge: 09f852894553 321add801bcd Author: Mark Brown Date: Tue Jul 19 19:16:21 2022 +0100 ASoC: SOF: Intel: updates and cleanups Merge series from Pierre-Louis Bossart : Set of updates for IPC3, IPC4, MTL support and cleanups for the topology filename override which was broken for HDaudio platforms. commit 9e26cac5f82b2cce43d98ffd8382ebd858fae7e8 Author: Gavin Shan Date: Mon Jul 18 14:42:32 2022 +0800 arm64: numa: Don't check node against MAX_NUMNODES When the NUMA nodes are sorted by checking ACPI SRAT (GICC AFFINITY) sub-table, it's impossible for acpi_map_pxm_to_node() to return any value, which is greater than or equal to MAX_NUMNODES. Lets drop the unnecessary check in acpi_numa_gicc_affinity_init(). No functional change intended. Signed-off-by: Gavin Shan Link: https://lore.kernel.org/r/20220718064232.3464373-1-gshan@redhat.com Signed-off-by: Will Deacon arch/arm64/kernel/acpi_numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c6ab0ca9a662d4ca9742d97156bac0d3067d72d Author: Mark Bloch Date: Sun Jul 3 13:54:07 2022 -0700 RDMA/mlx5: Expose steering anchor to userspace Expose a steering anchor per priority to allow users to re-inject packets back into default NIC pipeline for additional processing. MLX5_IB_METHOD_STEERING_ANCHOR_CREATE returns a flow table ID which a user can use to re-inject packets at a specific priority. A FTE (flow table entry) can be created and the flow table ID used as a destination. When a packet is taken into a RDMA-controlled steering domain (like software steering) there may be a need to insert the packet back into the default NIC pipeline. This exposes a flow table ID to the user that can be used as a destination in a flow table entry. With this new method priorities that are exposed to users via MLX5_IB_METHOD_FLOW_MATCHER_CREATE can be reached from a non-zero UID. As user-created flow tables (via RDMA DEVX) are created with a non-zero UID thus it's impossible to point to a NIC core flow table (core driver flow tables are created with UID value of zero) from userspace. Create flow tables that are exposed to users with the shared UID, this allows users to point to default NIC flow tables. Steering loops are prevented at FW level as FW enforces that no flow table at level X can point to a table at level lower than X. Link: https://lore.kernel.org/all/20220703205407.110890-6-saeed@kernel.org/ Signed-off-by: Mark Bloch Reviewed-by: Yishai Hadas Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/fs.c | 138 +++++++++++++++++++++++++++++-- drivers/infiniband/hw/mlx5/mlx5_ib.h | 6 ++ include/uapi/rdma/mlx5_user_ioctl_cmds.h | 17 ++++ 3 files changed, 156 insertions(+), 5 deletions(-) commit e74d2e4dfd0dd05e10c2e4b6d75ddb17e753b78a Author: Mark Bloch Date: Sun Jul 3 13:54:06 2022 -0700 RDMA/mlx5: Refactor get flow table function _get_flow_table() requires the entire matcher being passed while all it needs is the priority and namespace type. Pass the priority and namespace type directly instead. Link: https://lore.kernel.org/all/20220703205407.110890-5-saeed@kernel.org/ Signed-off-by: Mark Bloch Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/fs.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 92f2b8bafa3d6e89c750e9d301a8b7ab76aaa8b6 Author: Anshuman Khandual Date: Thu Jul 14 11:43:02 2022 +0530 drivers/perf: arm_spe: Fix consistency of SYS_PMSCR_EL1.CX The arm_spe_pmu driver will enable SYS_PMSCR_EL1.CX in order to add CONTEXT packets into the traces, if the owner of the perf event runs with required capabilities i.e CAP_PERFMON or CAP_SYS_ADMIN via perfmon_capable() helper. The value of this bit is computed in the arm_spe_event_to_pmscr() function but the check for capabilities happens in the pmu event init callback i.e arm_spe_pmu_event_init(). This suggests that the value of the CX bit should remain consistent for the duration of the perf session. However, the function arm_spe_event_to_pmscr() may be called later during the event start callback i.e arm_spe_pmu_start() when the "current" process is not the owner of the perf session, hence the CX bit setting is currently not consistent. One way to fix this, is by caching the required value of the CX bit during the initialization of the PMU event, so that it remains consistent for the duration of the session. It uses currently unused 'event->hw.flags' element to cache perfmon_capable() value, which can be referred during event start callback to compute SYS_PMSCR_EL1.CX. This ensures consistent availability of context packets in the trace as per event owner capabilities. Drop BIT(SYS_PMSCR_EL1_CX_SHIFT) check in arm_spe_pmu_event_init(), because now CX bit cannot be set in arm_spe_event_to_pmscr() with perfmon_capable() disabled. Cc: Will Deacon Cc: Mark Rutland Cc: Alexey Budankov Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Fixes: d5d9696b0380 ("drivers/perf: Add support for ARMv8.2 Statistical Profiling Extension") Reported-by: German Gomez Signed-off-by: Anshuman Khandual Reviewed-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20220714061302.2715102-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon drivers/perf/arm_spe_pmu.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit b77ffb30cfc5f58e957571d8541c6a7e3da19221 Author: Dan Carpenter Date: Tue Jul 19 12:51:28 2022 +0300 libbpf: fix an snprintf() overflow check The snprintf() function returns the number of bytes it *would* have copied if there were enough space. So it can return > the sizeof(gen->attach_target). Fixes: 67234743736a ("libbpf: Generate loader program out of BPF ELF file.") Signed-off-by: Dan Carpenter Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/r/YtZ+oAySqIhFl6/J@kili Signed-off-by: Alexei Starovoitov tools/lib/bpf/gen_loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 218320fec29430438016f88dd4fbebfa1b95ad8d Author: Christian Kohlschütter Date: Tue Jul 19 16:02:00 2022 +0200 regulator: core: Fix off-on-delay-us for always-on/boot-on regulators Regulators marked with "regulator-always-on" or "regulator-boot-on" as well as an "off-on-delay-us", may run into cycling issues that are hard to detect. This is caused by the "last_off" state not being initialized in this case. Fix the "last_off" initialization by setting it to the current kernel time upon initialization, regardless of always_on/boot_on state. Signed-off-by: Christian Kohlschütter Link: https://lore.kernel.org/r/FAFD5B39-E9C4-47C7-ACF1-2A04CD59758D@kohlschutter.com Signed-off-by: Mark Brown drivers/regulator/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c5d22f4cfe8dfb93f1db0a1e7e2e7ebc41395d98 Author: Dan Carpenter Date: Tue Jul 19 12:50:32 2022 +0300 selftests/bpf: fix a test for snprintf() overflow The snprintf() function returns the number of bytes which *would* have been copied if there were space. In other words, it can be > sizeof(pin_path). Fixes: c0fa1b6c3efc ("bpf: btf: Add BTF tests") Signed-off-by: Dan Carpenter Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/r/YtZ+aD/tZMkgOUw+@kili Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/btf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09f852894553ac72e25a6b6012a1f5ff34be5be5 Merge: 2d86cef353b8 99bad468846f Author: Mark Brown Date: Tue Jul 19 18:43:27 2022 +0100 ASoC: SOF: mediatek: fix boot sequences Merge series from Pierre-Louis Bossart : Changes to DSP_RESET_SW need extra care. commit 491f10d08fdae10a177edf6af4f43b83b293114b Author: Liang He Date: Fri Jul 15 21:03:30 2022 +0800 perf: RISC-V: Add of_node_put() when breaking out of for_each_of_cpu_node() In pmu_sbi_setup_irqs(), we should call of_node_put() for the 'cpu' when breaking out of for_each_of_cput_node() as its refcount will be automatically increased and decreased during the iteration. Fixes: 4905ec2fb7e6 ("RISC-V: Add sscofpmf extension support") Signed-off-by: Liang He Reviewed-by: Atish Patra Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20220715130330.443363-1-windhl@126.com Signed-off-by: Will Deacon drivers/perf/riscv_pmu_sbi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 43038d8418a386ffe8d8c8a7766cd90e9a7d6e86 Merge: 68691bad98ee b0bb369ee451 Author: Leon Romanovsky Date: Tue Jul 19 20:40:28 2022 +0300 Merge branch 'mlx5-next' into wip/leon-for-next Mark Bloch Says: ================ Expose steering anchor Expose a steering anchor per priority to allow users to re-inject packets back into default NIC pipeline for additional processing. MLX5_IB_METHOD_STEERING_ANCHOR_CREATE returns a flow table ID which a user can use to re-inject packets at a specific priority. A FTE (flow table entry) can be created and the flow table ID used as a destination. When a packet is taken into a RDMA-controlled steering domain (like software steering) there may be a need to insert the packet back into the default NIC pipeline. This exposes a flow table ID to the user that can be used as a destination in a flow table entry. With this new method priorities that are exposed to users via MLX5_IB_METHOD_FLOW_MATCHER_CREATE can be reached from a non-zero UID. As user-created flow tables (via RDMA DEVX) are created with a non-zero UID thus it's impossible to point to a NIC core flow table (core driver flow tables are created with UID value of zero) from userspace. Create flow tables that are exposed to users with the shared UID, this allows users to point to default NIC flow tables. Steering loops are prevented at FW level as FW enforces that no flow table at level X can point to a table at level lower than X. ================ Link: https://lore.kernel.org/all/20220703205407.110890-1-saeed@kernel.org Signed-off-by: Leon Romanovsky commit 979855d3026401ed6eecfd1935d19fd7b74df479 Author: Donald Hunter Date: Mon Jul 18 13:58:47 2022 +0100 bpf, docs: document BPF_MAP_TYPE_HASH and variants Add documentation for BPF_MAP_TYPE_HASH including kernel version introduced, usage and examples. Document BPF_MAP_TYPE_PERCPU_HASH, BPF_MAP_TYPE_LRU_HASH and BPF_MAP_TYPE_LRU_PERCPU_HASH variations. Note that this file is included in the BPF documentation by the glob in Documentation/bpf/maps.rst v3: Fix typos reported by Stanislav Fomichev and Yonghong Song. Add note about iteration and deletion as requested by Yonghong Song. v2: Describe memory allocation semantics as suggested by Stanislav Fomichev. Fix u64 typo reported by Stanislav Fomichev. Cut down usage examples to only show usage in context. Updated patch description to follow style recommendation, reported by Bagas Sanjaya. Signed-off-by: Donald Hunter Reviewed-by: Stanislav Fomichev Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20220718125847.1390-1-donald.hunter@gmail.com Signed-off-by: Alexei Starovoitov Documentation/bpf/map_hash.rst | 185 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) commit a91eb6803c1c715738682fece095145cbd68fe0b Author: Liang He Date: Tue Jul 19 20:49:55 2022 +0800 iommu/arm-smmu: qcom_iommu: Add of_node_put() when breaking out of loop In qcom_iommu_has_secure_context(), we should call of_node_put() for the reference 'child' when breaking out of for_each_child_of_node() which will automatically increase and decrease the refcount. Fixes: d051f28c8807 ("iommu/qcom: Initialize secure page table") Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220719124955.1242171-1-windhl@126.com Signed-off-by: Will Deacon drivers/iommu/arm/arm-smmu/qcom_iommu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 15a232408a8a525b6bb8f759419c38aa1bee50e8 Author: Bjorn Helgaas Date: Tue Jul 19 12:28:05 2022 -0500 PCI: fu740: Remove unnecessary include files fu740 uses no syscon or regman interfaces, so it doesn't need to include mfs/syscon.h. It uses no regulator interfaces, so it doesn't need to include regulator/consumer.h either. Remove both unnecessary includes. Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pcie-fu740.c | 2 -- 1 file changed, 2 deletions(-) commit ef660de424cf06eab262a055b18cdf704aaf5fb1 Author: Konrad Dybcio Date: Sat Jul 16 21:32:23 2022 +0200 iommu/arm-smmu-qcom: Add SM6375 SMMU compatible Add a compatible for SM6375 to the qcom impl match list. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20220716193223.455859-2-konrad.dybcio@somainline.org Signed-off-by: Will Deacon drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 + 1 file changed, 1 insertion(+) commit 743302d4ad6cf51f6abffed4f12d2d0c24e3288a Author: Konrad Dybcio Date: Sat Jul 16 21:32:22 2022 +0200 dt-bindings: arm-smmu: Add compatible for Qualcomm SM6375 Add a compatible for Qualcomm SM6375's broken-as-usual MMU500 impl. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20220716193223.455859-1-konrad.dybcio@somainline.org Signed-off-by: Will Deacon Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 1 + 1 file changed, 1 insertion(+) commit 9f01129382774d98ec21526f13da26a0630ee3d8 Author: Chang S. Bae Date: Mon Jul 18 11:56:11 2022 -0700 intel_idle: Add a new flag to initialize the AMX state The non-initialized AMX state can be the cause of C-state demotion from C6 to C1E. This low-power idle state may improve power savings and thus result in a higher available turbo frequency budget. This behavior is implementation-specific. Initialize the state for the C6 entrance of Sapphire Rapids as needed. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Dave Hansen Signed-off-by: Chang S. Bae Signed-off-by: Borislav Petkov Acked-by: Rafael J. Wysocki Tested-by: Zhang Rui Link: https://lkml.kernel.org/r/20220614164116.5196-1-chang.seok.bae@intel.com drivers/idle/intel_idle.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit e134601961fef4516df9413b270fb96ef6d034bc Author: Andrii Nakryiko Date: Fri Jul 15 16:09:52 2022 -0700 selftests/bpf: test eager BPF ringbuf size adjustment logic Add test validating that libbpf adjusts (and reflects adjusted) ringbuf size early, before bpf_object is loaded. Also make sure we can't successfully resize ringbuf map after bpf_object is loaded. Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20220715230952.2219271-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/ringbuf_multi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 597fbc4682969361dd141aaa58b8cc73a80da85d Author: Andrii Nakryiko Date: Fri Jul 15 16:09:51 2022 -0700 libbpf: make RINGBUF map size adjustments more eagerly Make libbpf adjust RINGBUF map size (rounding it up to closest power-of-2 of page_size) more eagerly: during open phase when initializing the map and on explicit calls to bpf_map__set_max_entries(). Such approach allows user to check actual size of BPF ringbuf even before it's created in the kernel, but also it prevents various edge case scenarios where BPF ringbuf size can get out of sync with what it would be in kernel. One of them (reported in [0]) is during an attempt to pin/reuse BPF ringbuf. Move adjust_ringbuf_sz() helper closer to its first actual use. The implementation of the helper is unchanged. Also make detection of whether bpf_object is already loaded more robust by checking obj->loaded explicitly, given that map->fd can be < 0 even if bpf_object is already loaded due to ability to disable map creation with bpf_map__set_autocreate(map, false). [0] Closes: https://github.com/libbpf/libbpf/pull/530 Fixes: 0087a681fa8c ("libbpf: Automatically fix up BPF_MAP_TYPE_RINGBUF size, if necessary") Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20220715230952.2219271-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 77 +++++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 35 deletions(-) commit bdb2bc7599298ebb677e40fc92b1fa9e69e05098 Author: Joanne Koong Date: Fri Jul 15 12:38:00 2022 -0700 bpf: fix bpf_skb_pull_data documentation Fix documentation for bpf_skb_pull_data() helper for when len == 0. Fixes: fa15601ab31e ("bpf: add documentation for eBPF helpers (33-41)") Signed-off-by: Joanne Koong Acked-by: Quentin Monnet Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20220715193800.3940070-1-joannelkoong@gmail.com Signed-off-by: Alexei Starovoitov include/uapi/linux/bpf.h | 3 ++- tools/include/uapi/linux/bpf.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit a1ac9fd6c6504aa1838930bbfae6217ab6b95945 Author: Andrii Nakryiko Date: Fri Jul 15 11:57:36 2022 -0700 libbpf: fallback to tracefs mount point if debugfs is not mounted Teach libbpf to fallback to tracefs mount point (/sys/kernel/tracing) if debugfs (/sys/kernel/debug/tracing) isn't mounted. Acked-by: Yonghong Song Suggested-by: Connor O'Brien Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220715185736.898848-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 61 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 21 deletions(-) commit fd1894224407c484f652ad456e1ce423e89bb3eb Author: Zhengchao Shao Date: Fri Jul 15 19:55:59 2022 +0800 bpf: Don't redirect packets with invalid pkt_len Syzbot found an issue [1]: fq_codel_drop() try to drop a flow whitout any skbs, that is, the flow->head is null. The root cause, as the [2] says, is because that bpf_prog_test_run_skb() run a bpf prog which redirects empty skbs. So we should determine whether the length of the packet modified by bpf prog or others like bpf_prog_test is valid before forwarding it directly. LINK: [1] https://syzkaller.appspot.com/bug?id=0b84da80c2917757915afa89f7738a9d16ec96c5 LINK: [2] https://www.spinics.net/lists/netdev/msg777503.html Reported-by: syzbot+7a12909485b94426aceb@syzkaller.appspotmail.com Signed-off-by: Zhengchao Shao Reviewed-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20220715115559.139691-1-shaozhengchao@huawei.com Signed-off-by: Alexei Starovoitov include/linux/skbuff.h | 8 ++++++++ net/bpf/test_run.c | 3 +++ net/core/dev.c | 1 + 3 files changed, 12 insertions(+) commit f17b168734c0fe47343a7502d012266a051f9942 Author: Chang S. Bae Date: Wed Jun 8 09:47:47 2022 -0700 x86/fpu: Add a helper to prepare AMX state for low-power CPU idle When a CPU enters an idle state, a non-initialized AMX register state may be the cause of preventing a deeper low-power state. Other extended register states whether initialized or not do not impact the CPU idle state. The new helper can ensure the AMX state is initialized before the CPU is idle, and it will be used by the intel idle driver. Check the AMX_TILE feature bit before using XGETBV1 as a chain of dependencies was established via cpuid_deps[]: AMX->XFD->XGETBV1. Signed-off-by: Chang S. Bae Signed-off-by: Dave Hansen Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20220608164748.11864-2-chang.seok.bae@intel.com arch/x86/include/asm/fpu/api.h | 2 ++ arch/x86/include/asm/special_insns.h | 9 +++++++++ arch/x86/kernel/fpu/core.c | 14 ++++++++++++++ 3 files changed, 25 insertions(+) commit 92f619735b7c4269fc6349a7ec13f09ffb558f77 Merge: e5e23424e51e 243164612005 Author: Alexei Starovoitov Date: Tue Jul 19 09:45:35 2022 -0700 Merge branch 'BPF array map fixes and improvements' Andrii Nakryiko says: ==================== Fix 32-bit overflow in value pointer calculations in BPF array map. And then raise obsolete limit on array map value size. Add selftest making sure this is working as intended. v1->v2: - fix broken patch #1 (no mask_index use in helper, as stated in commit message; and add missing semicolon). ==================== Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 24316461200502aa5feddaa72dcbb8059503a528 Author: Andrii Nakryiko Date: Thu Jul 14 22:31:46 2022 -0700 selftests/bpf: validate .bss section bigger than 8MB is possible now Add a simple big 16MB array and validate access to the very last byte of it to make sure that kernel supports > KMALLOC_MAX_SIZE value_size for BPF array maps (which are backing .bss in this case). Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220715053146.1291891-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/skeleton.c | 2 ++ tools/testing/selftests/bpf/progs/test_skeleton.c | 4 ++++ 2 files changed, 6 insertions(+) commit 63b8ce77b15ebf69c4b0ef4b87451e2626aa3c43 Author: Andrii Nakryiko Date: Thu Jul 14 22:31:45 2022 -0700 bpf: remove obsolete KMALLOC_MAX_SIZE restriction on array map value size Syscall-side map_lookup_elem() and map_update_elem() used to use kmalloc() to allocate temporary buffers of value_size, so KMALLOC_MAX_SIZE limit on value_size made sense to prevent creation of array map that won't be accessible through syscall interface. But this limitation since has been lifted by relying on kvmalloc() in syscall handling code. So remove KMALLOC_MAX_SIZE, which among other things means that it's possible to have BPF global variable sections (.bss, .data, .rodata) bigger than 8MB now. Keep the sanity check to prevent trivial overflows like round_up(map->value_size, 8) and restrict value size to <= INT_MAX (2GB). Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220715053146.1291891-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov kernel/bpf/arraymap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d937bc3449fa868cbeaf5c87576f9929b765c1e0 Author: Andrii Nakryiko Date: Thu Jul 14 22:31:44 2022 -0700 bpf: make uniform use of array->elem_size everywhere in arraymap.c BPF_MAP_TYPE_ARRAY is rounding value_size to closest multiple of 8 and stores that as array->elem_size for various memory allocations and accesses. But the code tends to re-calculate round_up(map->value_size, 8) in multiple places instead of using array->elem_size. Cleaning this up and making sure we always use array->size to avoid duplication of this (admittedly simple) logic for consistency. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220715053146.1291891-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov kernel/bpf/arraymap.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 87ac0d600943994444e24382a87aa19acc4cd3d4 Author: Andrii Nakryiko Date: Thu Jul 14 22:31:43 2022 -0700 bpf: fix potential 32-bit overflow when accessing ARRAY map element If BPF array map is bigger than 4GB, element pointer calculation can overflow because both index and elem_size are u32. Fix this everywhere by forcing 64-bit multiplication. Extract this formula into separate small helper and use it consistently in various places. Speculative-preventing formula utilizing index_mask trick is left as is, but explicit u64 casts are added in both places. Fixes: c85d69135a91 ("bpf: move memory size checks to bpf_map_charge_init()") Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220715053146.1291891-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov kernel/bpf/arraymap.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit e5e23424e51edbd8b3fabae382aeec0bb8926cf1 Author: Indu Bhagat Date: Thu Jul 14 15:33:10 2022 -0700 docs/bpf: Update documentation for BTF_KIND_FUNC The vlen bits in the BTF type of kind BTF_KIND_FUNC are used to convey the linkage information for functions. The Linux kernel only supports linkage values of BTF_FUNC_STATIC and BTF_FUNC_GLOBAL at this time. Signed-off-by: Indu Bhagat Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20220714223310.1140097-1-indu.bhagat@oracle.com Signed-off-by: Alexei Starovoitov Documentation/bpf/btf.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3908fcddc65d04e069b03be49b33fae90e424631 Author: Stanislav Fomichev Date: Thu Jul 14 11:54:04 2022 -0700 bpf: fix lsm_cgroup build errors on esoteric configs This particular ones is about having the following: CONFIG_BPF_LSM=y # CONFIG_CGROUP_BPF is not set Also, add __maybe_unused to the args for the !CONFIG_NET cases. Reported-by: kernel test robot Signed-off-by: Stanislav Fomichev Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20220714185404.3647772-1-sdf@google.com Signed-off-by: Alexei Starovoitov kernel/bpf/bpf_lsm.c | 8 ++++++-- kernel/bpf/trampoline.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) commit ab850abbcf4d52ecc0e17224bcbcf749f327d6d0 Merge: 9ff5efdeb089 d814ed62d3d2 Author: Alexei Starovoitov Date: Tue Jul 19 09:33:18 2022 -0700 Merge branch 'Add SEC("ksyscall") support' Andrii Nakryiko says: ==================== Add SEC("ksyscall")/SEC("kretsyscall") sections and corresponding bpf_program__attach_ksyscall() API that simplifies tracing kernel syscalls through kprobe mechanism. Kprobing syscalls isn't trivial due to varying syscall handler names in the kernel and various ways syscall argument are passed, depending on kernel architecture and configuration. SEC("ksyscall") allows user to not care about such details and just get access to syscall input arguments, while libbpf takes care of necessary feature detection logic. There are still more quirks that are not straightforward to hide completely (see comments about mmap(), clone() and compat syscalls), so in such more advanced scenarios user might need to fall back to plain SEC("kprobe") approach, but for absolute majority of users SEC("ksyscall") is a big improvement. As part of this patch set libbpf adds two more virtual __kconfig externs, in addition to existing LINUX_KERNEL_VERSION: LINUX_HAS_BPF_COOKIE and LINUX_HAS_SYSCALL_WRAPPER, which let's libbpf-provided BPF-side code minimize external dependencies and assumptions and let's user-space part of libbpf to perform all the feature detection logic. This benefits USDT support code, which now doesn't depend on BPF CO-RE for its functionality. v1->v2: - normalize extern variable-related warn and debug message formats (Alan); rfc->v1: - drop dependency on kallsyms and speed up SYSCALL_WRAPPER detection (Alexei); - drop dependency on /proc/config.gz in bpf_tracing.h (Yaniv); - add doc comment and ephasize mmap(), clone() and compat quirks that are not supported (Ilya); - use mechanism similar to LINUX_KERNEL_VERSION to also improve USDT code. ==================== Reviewed-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov commit d814ed62d3d24eb5c5f904b897e0414c1ccb5740 Author: Andrii Nakryiko Date: Thu Jul 14 00:07:55 2022 -0700 selftests/bpf: use BPF_KSYSCALL and SEC("ksyscall") in selftests Convert few selftest that used plain SEC("kprobe") with arch-specific syscall wrapper prefix to ksyscall/kretsyscall and corresponding BPF_KSYSCALL macro. test_probe_user.c is especially benefiting from this simplification. Tested-by: Alan Maguire Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220714070755.3235561-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov .../selftests/bpf/progs/bpf_syscall_macro.c | 6 ++--- .../selftests/bpf/progs/test_attach_probe.c | 15 ++++++------ .../testing/selftests/bpf/progs/test_probe_user.c | 27 +++++----------------- 3 files changed, 16 insertions(+), 32 deletions(-) commit 708ac5bea0ce51fa1d70a44a1f817c8b02787c1e Author: Andrii Nakryiko Date: Thu Jul 14 00:07:54 2022 -0700 libbpf: add ksyscall/kretsyscall sections support for syscall kprobes Add SEC("ksyscall")/SEC("ksyscall/") and corresponding kretsyscall variants (for return kprobes) to allow users to kprobe syscall functions in kernel. These special sections allow to ignore complexities and differences between kernel versions and host architectures when it comes to syscall wrapper and corresponding ___sys_ vs __se_sys_ differences, depending on whether host kernel has CONFIG_ARCH_HAS_SYSCALL_WRAPPER (though libbpf itself doesn't rely on /proc/config.gz for detecting this, see BPF_KSYSCALL patch for how it's done internally). Combined with the use of BPF_KSYSCALL() macro, this allows to just specify intended syscall name and expected input arguments and leave dealing with all the variations to libbpf. In addition to SEC("ksyscall+") and SEC("kretsyscall+") add bpf_program__attach_ksyscall() API which allows to specify syscall name at runtime and provide associated BPF cookie value. At the moment SEC("ksyscall") and bpf_program__attach_ksyscall() do not handle all the calling convention quirks for mmap(), clone() and compat syscalls. It also only attaches to "native" syscall interfaces. If host system supports compat syscalls or defines 32-bit syscalls in 64-bit kernel, such syscall interfaces won't be attached to by libbpf. These limitations may or may not change in the future. Therefore it is recommended to use SEC("kprobe") for these syscalls or if working with compat and 32-bit interfaces is required. Tested-by: Alan Maguire Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220714070755.3235561-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 117 ++++++++++++++++++++++++++++++++++++---- tools/lib/bpf/libbpf.h | 46 ++++++++++++++++ tools/lib/bpf/libbpf.map | 1 + tools/lib/bpf/libbpf_internal.h | 2 + 4 files changed, 157 insertions(+), 9 deletions(-) commit 6f5d467d55f0d8fc2143179dd4869d408ae3bd25 Author: Andrii Nakryiko Date: Thu Jul 14 00:07:53 2022 -0700 libbpf: improve BPF_KPROBE_SYSCALL macro and rename it to BPF_KSYSCALL Improve BPF_KPROBE_SYSCALL (and rename it to shorter BPF_KSYSCALL to match libbpf's SEC("ksyscall") section name, added in next patch) to use __kconfig variable to determine how to properly fetch syscall arguments. Instead of relying on hard-coded knowledge of whether kernel's architecture uses syscall wrapper or not (which only reflects the latest kernel versions, but is not necessarily true for older kernels and won't necessarily hold for later kernel versions on some particular host architecture), determine this at runtime by attempting to create perf_event (with fallback to kprobe event creation through tracefs on legacy kernels, just like kprobe attachment code is doing) for kernel function that would correspond to bpf() syscall on a system that has CONFIG_ARCH_HAS_SYSCALL_WRAPPER set (e.g., for x86-64 it would try '__x64_sys_bpf'). If host kernel uses syscall wrapper, syscall kernel function's first argument is a pointer to struct pt_regs that then contains syscall arguments. In such case we need to use bpf_probe_read_kernel() to fetch actual arguments (which we do through BPF_CORE_READ() macro) from inner pt_regs. But if the kernel doesn't use syscall wrapper approach, input arguments can be read from struct pt_regs directly with no probe reading. All this feature detection is done without requiring /proc/config.gz existence and parsing, and BPF-side helper code uses newly added LINUX_HAS_SYSCALL_WRAPPER virtual __kconfig extern to keep in sync with user-side feature detection of libbpf. BPF_KSYSCALL() macro can be used both with SEC("kprobe") programs that define syscall function explicitly (e.g., SEC("kprobe/__x64_sys_bpf")) and SEC("ksyscall") program added in the next patch (which are the same kprobe program with added benefit of libbpf determining correct kernel function name automatically). Kretprobe and kretsyscall (added in next patch) programs don't need BPF_KSYSCALL as they don't provide access to input arguments. Normal BPF_KRETPROBE is completely sufficient and is recommended. Tested-by: Alan Maguire Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220714070755.3235561-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/bpf_tracing.h | 51 +++++++++++++++++++++++++++++++++------------ tools/lib/bpf/libbpf.c | 2 ++ 2 files changed, 40 insertions(+), 13 deletions(-) commit ce6dc74a0a4a22047fdaf893047483b303b64898 Author: Andrii Nakryiko Date: Thu Jul 14 00:07:52 2022 -0700 selftests/bpf: add test of __weak unknown virtual __kconfig extern Exercise libbpf's logic for unknown __weak virtual __kconfig externs. USDT selftests are already excercising non-weak known virtual extern already (LINUX_HAS_BPF_COOKIE), so no need to add explicit tests for it. Tested-by: Alan Maguire Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220714070755.3235561-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/core_extern.c | 17 +++++++---------- tools/testing/selftests/bpf/progs/test_core_extern.c | 3 +++ 2 files changed, 10 insertions(+), 10 deletions(-) commit 55d00c37ebc396539b10ab73203bfd5e189c3660 Author: Andrii Nakryiko Date: Thu Jul 14 00:07:51 2022 -0700 libbpf: generalize virtual __kconfig externs and use it for USDT Libbpf supports single virtual __kconfig extern currently: LINUX_KERNEL_VERSION. LINUX_KERNEL_VERSION isn't coming from /proc/kconfig.gz and is intead customly filled out by libbpf. This patch generalizes this approach to support more such virtual __kconfig externs. One such extern added in this patch is LINUX_HAS_BPF_COOKIE which is used for BPF-side USDT supporting code in usdt.bpf.h instead of using CO-RE-based enum detection approach for detecting bpf_get_attach_cookie() BPF helper. This allows to remove otherwise not needed CO-RE dependency and keeps user-space and BPF-side parts of libbpf's USDT support strictly in sync in terms of their feature detection. We'll use similar approach for syscall wrapper detection for BPF_KSYSCALL() BPF-side macro in follow up patch. Generally, currently libbpf reserves CONFIG_ prefix for Kconfig values and LINUX_ for virtual libbpf-backed externs. In the future we might extend the set of prefixes that are supported. This can be done without any breaking changes, as currently any __kconfig extern with unrecognized name is rejected. For LINUX_xxx externs we support the normal "weak rule": if libbpf doesn't recognize given LINUX_xxx extern but such extern is marked as __weak, it is not rejected and defaults to zero. This follows CONFIG_xxx handling logic and will allow BPF applications to opportunistically use newer libbpf virtual externs without breaking on older libbpf versions unnecessarily. Tested-by: Alan Maguire Reviewed-by: Alan Maguire Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220714070755.3235561-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 95 ++++++++++++++++++++++++++++++++---------------- tools/lib/bpf/usdt.bpf.h | 16 +------- 2 files changed, 66 insertions(+), 45 deletions(-) commit 8f1d56f64f8d6b80dea2d1978d10071132a695c5 Author: Nadav Amit Date: Sun Jul 10 16:28:37 2022 -0700 x86/mm/tlb: Ignore f->new_tlb_gen when zero Commit aa44284960d5 ("x86/mm/tlb: Avoid reading mm_tlb_gen when possible") introduced an optimization to skip superfluous TLB flushes based on the generation provided in flush_tlb_info. However, arch_tlbbatch_flush() does not provide any generation in flush_tlb_info and populates the flush_tlb_info generation with 0. This 0 is causes the flush_tlb_info to be interpreted as a superfluous, old flush. As a result, try_to_unmap_one() would not perform any TLB flushes. Fix it by checking whether f->new_tlb_gen is nonzero. Zero value is anyhow is an invalid generation value. To avoid future confusion, introduce TLB_GENERATION_INVALID constant and use it properly. Add warnings to ensure no partial flushes are done with TLB_GENERATION_INVALID or when f->mm is NULL, since this does not make any sense. In addition, add the missing unlikely(). [ dhansen: change VM_BUG_ON() -> VM_WARN_ON(), clarify changelog ] Fixes: aa44284960d5 ("x86/mm/tlb: Avoid reading mm_tlb_gen when possible") Reported-by: Hugh Dickins Signed-off-by: Nadav Amit Signed-off-by: Dave Hansen Tested-by: Hugh Dickins Link: https://lkml.kernel.org/r/20220710232837.3618-1-namit@vmware.com arch/x86/include/asm/tlbflush.h | 1 + arch/x86/mm/tlb.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) commit 74003fc4ae7619ac5a7bec8748a14f3a8655f3ea Author: Steven Rostedt (Google) Date: Tue Jul 5 18:45:04 2022 -0400 scsi: qla2xxx: tracing: Use the new __vstring() helper Instead of open coding a __dynamic_array() with a fixed length (which defeats the purpose of the dynamic array in the first place). Use the new __vstring() helper that will use a va_list and only write enough of the string into the ring buffer that is needed. Link: https://lkml.kernel.org/r/20220705224750.896553364@goodmis.org Cc: Bart Van Assche Cc: Ingo Molnar Cc: Andrew Morton Cc: Martin K. Petersen Signed-off-by: Steven Rostedt (Google) include/trace/events/qla.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5409b8053511f9a32ee08c3d16827632a5b17e3f Author: Steven Rostedt (Google) Date: Tue Jul 5 18:45:03 2022 -0400 scsi: iscsi: tracing: Use the new __vstring() helper Instead of open coding a __dynamic_array() with a fixed length (which defeats the purpose of the dynamic array in the first place). Use the new __vstring() helper that will use a va_list and only write enough of the string into the ring buffer that is needed. Link: https://lkml.kernel.org/r/20220705224750.715763972@goodmis.org Cc: Fred Herard Cc: Ingo Molnar Cc: Andrew Morton Cc: Martin K. Petersen Signed-off-by: Steven Rostedt (Google) include/trace/events/iscsi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 84149fc768bc82922ef72e56c0eef9512417980c Author: Steven Rostedt (Google) Date: Tue Jul 5 18:45:02 2022 -0400 usb: musb: tracing: Use the new __vstring() helper Instead of open coding a __dynamic_array() with a fixed length (which defeats the purpose of the dynamic array in the first place). Use the new __vstring() helper that will use a va_list and only write enough of the string into the ring buffer that is needed. Link: https://lkml.kernel.org/r/20220705224750.532345354@goodmis.org Cc: Bin Liu Cc: Ingo Molnar Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Steven Rostedt (Google) drivers/usb/musb/musb_trace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5fcd0d8ae23a3d26f21bc191c32283a5ba0bdaf9 Author: Steffen Eiden Date: Wed Jul 13 14:56:44 2022 +0200 s390/uvdevice: autoload module based on CPU facility Make sure the uvdevice driver will be automatically loaded when facility 158 is available. Signed-off-by: Steffen Eiden Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20220713125644.16121-4-seiden@linux.ibm.com Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/cpufeature.h | 1 + arch/s390/kernel/cpufeature.c | 1 + drivers/s390/char/uvdevice.c | 5 ++--- 3 files changed, 4 insertions(+), 3 deletions(-) commit e2f39c9f547c88efd208f67a9ecacc1d78bf30a4 Author: Heiko Carstens Date: Wed Jul 13 14:56:43 2022 +0200 s390/cpufeature: allow for facility bits Allow for facility bits to be used in cpu features. Signed-off-by: Heiko Carstens Reviewed-by: Claudio Imbrenda Reviewed-by: Steffen Eiden Link: https://lore.kernel.org/r/20220713125644.16121-3-seiden@linux.ibm.com Signed-off-by: Alexander Gordeev arch/s390/kernel/cpufeature.c | 3 +++ 1 file changed, 3 insertions(+) commit 0a5f9b382c6131381f9f2ed64ae6fdd994328d0d Author: Heiko Carstens Date: Wed Jul 13 14:56:42 2022 +0200 s390/cpufeature: rework to allow more than only hwcap bits Rework cpufeature implementation to allow for various cpu feature indications, which is not only limited to hwcap bits. This is achieved by adding a sequential list of cpu feature numbers, where each of them is mapped to an entry which indicates what this number is about. Each entry contains a type member, which indicates what feature name space to look into (e.g. hwcap, or cpu facility). If wanted this allows also to automatically load modules only in e.g. z/VM configurations. Signed-off-by: Heiko Carstens Signed-off-by: Steffen Eiden Reviewed-by: Claudio Imbrenda Reviewed-by: Hendrik Brueckner Link: https://lore.kernel.org/r/20220713125644.16121-2-seiden@linux.ibm.com Signed-off-by: Alexander Gordeev arch/s390/crypto/aes_s390.c | 2 +- arch/s390/crypto/chacha-glue.c | 2 +- arch/s390/crypto/crc32-vx.c | 2 +- arch/s390/crypto/des_s390.c | 2 +- arch/s390/crypto/ghash_s390.c | 2 +- arch/s390/crypto/prng.c | 2 +- arch/s390/crypto/sha1_s390.c | 2 +- arch/s390/crypto/sha256_s390.c | 2 +- arch/s390/crypto/sha3_256_s390.c | 2 +- arch/s390/crypto/sha3_512_s390.c | 2 +- arch/s390/crypto/sha512_s390.c | 2 +- arch/s390/include/asm/cpufeature.h | 22 +++++++------------- arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/cpufeature.c | 42 ++++++++++++++++++++++++++++++++++++++ arch/s390/kernel/processor.c | 10 --------- drivers/char/hw_random/s390-trng.c | 2 +- drivers/s390/crypto/pkey_api.c | 2 +- 17 files changed, 63 insertions(+), 39 deletions(-) commit 693714b900cea5417d7b3a48891b961d40fb5c55 Author: Tony Krowiak Date: Mon Feb 14 19:25:40 2022 -0500 MAINTAINERS: pick up all vfio_ap docs for VFIO AP maintainers A new document, Documentation/s390/vfio-ap-locking.rst was added. Make sure the new document is picked up for the VFIO AP maintainers by using a wildcard: Documentation/s390/vfio-ap*. Signed-off-by: Tony Krowiak Signed-off-by: Alexander Gordeev MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e32d3827f3d5b2844d041066b89843599c3e82b9 Author: Tony Krowiak Date: Fri Feb 4 13:16:45 2022 -0500 s390/Docs: new doc describing lock usage by the vfio_ap device driver Introduces a new document describing the locks used by the vfio_ap device driver and how to use them so as to avoid lockdep reports and deadlock situations. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Signed-off-by: Alexander Gordeev Documentation/s390/vfio-ap-locking.rst | 105 +++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) commit cb269e0aba7c3faef65a3b5d3a5be8b053f191a0 Author: Tony Krowiak Date: Mon Aug 17 15:19:44 2020 -0400 s390/vfio-ap: update docs to include dynamic config support Update the documentation in vfio-ap.rst to include information about the AP dynamic configuration support (e.g., hot plug of adapters, domains and control domains via the matrix mediated device's sysfs assignment attributes). This patch also makes a few minor tweaks to make corrections and clarifications. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Signed-off-by: Alexander Gordeev Documentation/s390/vfio-ap.rst | 492 +++++++++++++++++++++++++++++------------ 1 file changed, 346 insertions(+), 146 deletions(-) commit eeb386aeb5b7c8d2dae6a3ba49255d8a97803182 Author: Tony Krowiak Date: Mon Apr 4 09:40:10 2022 -0400 s390/vfio-ap: handle config changed and scan complete notification This patch implements two new AP driver callbacks: void (*on_config_changed)(struct ap_config_info *new_config_info, struct ap_config_info *old_config_info); void (*on_scan_complete)(struct ap_config_info *new_config_info, struct ap_config_info *old_config_info); The on_config_changed callback is invoked at the start of the AP bus scan function when it determines that the host AP configuration information has changed since the previous scan. The vfio_ap device driver registers a callback function for this callback that performs the following operations: 1. Unplugs the adapters, domains and control domains removed from the host's AP configuration from the guests to which they are assigned in a single operation. 2. Stores bitmaps identifying the adapters, domains and control domains added to the host's AP configuration with the structure representing the mediated device. When the vfio_ap device driver's probe callback is subsequently invoked, the probe function will recognize that the queue is being probed due to a change in the host's AP configuration and the plugging of the queue into the guest will be bypassed. The on_scan_complete callback is invoked after the ap bus scan is completed if the host AP configuration data has changed. The vfio_ap device driver registers a callback function for this callback that hot plugs each queue and control domain added to the AP configuration for each guest using them in a single hot plug operation. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Signed-off-by: Alexander Gordeev drivers/s390/crypto/vfio_ap_drv.c | 2 + drivers/s390/crypto/vfio_ap_ops.c | 341 +++++++++++++++++++++++++++++++++- drivers/s390/crypto/vfio_ap_private.h | 12 ++ 3 files changed, 350 insertions(+), 5 deletions(-) commit f7f795c54d7117d06d002e06f9fca5baec3f293d Author: Tony Krowiak Date: Tue Sep 10 11:17:45 2019 -0400 s390/vfio-ap: sysfs attribute to display the guest's matrix The matrix of adapters and domains configured in a guest's APCB may differ from the matrix of adapters and domains assigned to the matrix mdev, so this patch introduces a sysfs attribute to display the matrix of adapters and domains that are or will be assigned to the APCB of a guest that is or will be using the matrix mdev. For a matrix mdev denoted by $uuid, the guest matrix can be displayed as follows: cat /sys/devices/vfio_ap/matrix/$uuid/guest_matrix Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Signed-off-by: Alexander Gordeev drivers/s390/crypto/vfio_ap_ops.c | 48 ++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 13 deletions(-) commit 3f85d1df26a9d9b0d1a5237c580e085c41d6bf50 Author: Tony Krowiak Date: Thu Sep 30 11:43:38 2021 -0400 s390/vfio-ap: implement in-use callback for vfio_ap driver Let's implement the callback to indicate when an APQN is in use by the vfio_ap device driver. The callback is invoked whenever a change to the apmask or aqmask would result in one or more queue devices being removed from the driver. The vfio_ap device driver will indicate a resource is in use if the APQN of any of the queue devices to be removed are assigned to any of the matrix mdevs under the driver's control. There is potential for a deadlock condition between the matrix_dev->guests_lock used to lock the guest during assignment of adapters and domains and the ap_perms_mutex locked by the AP bus when changes are made to the sysfs apmask/aqmask attributes. The AP Perms lock controls access to the objects that store the adapter numbers (ap_perms) and domain numbers (aq_perms) for the sysfs /sys/bus/ap/apmask and /sys/bus/ap/aqmask attributes. These attributes identify which queues are reserved for the zcrypt default device drivers. Before allowing a bit to be removed from either mask, the AP bus must check with the vfio_ap device driver to verify that none of the queues are assigned to any of its mediated devices. The apmask/aqmask attributes can be written or read at any time from userspace, so care must be taken to prevent a deadlock with asynchronous operations that might be taking place in the vfio_ap device driver. For example, consider the following: 1. A system administrator assigns an adapter to a mediated device under the control of the vfio_ap device driver. The driver will need to first take the matrix_dev->guests_lock to potentially hot plug the adapter into the KVM guest. 2. At the same time, a system administrator sets a bit in the sysfs /sys/bus/ap/ap_mask attribute. To complete the operation, the AP bus must: a. Take the ap_perms_mutex lock to update the object storing the values for the /sys/bus/ap/ap_mask attribute. b. Call the vfio_ap device driver's in-use callback to verify that the queues now being reserved for the default zcrypt drivers are not assigned to a mediated device owned by the vfio_ap device driver. To do the verification, the in-use callback function takes the matrix_dev->guests_lock, but has to wait because it is already held by the operation in 1 above. 3. The vfio_ap device driver calls an AP bus function to verify that the new queues resulting from the assignment of the adapter in step 1 are not reserved for the default zcrypt device driver. This AP bus function tries to take the ap_perms_mutex lock but gets stuck waiting for the waiting for the lock due to step 2a above. Consequently, we have the following deadlock situation: matrix_dev->guests_lock locked (1) ap_perms_mutex lock locked (2a) Waiting for matrix_dev->gusts_lock (2b) which is currently held (1) Waiting for ap_perms_mutex lock (3) which is currently held (2a) To prevent this deadlock scenario, the function called in step 3 will no longer take the ap_perms_mutex lock and require the caller to take the lock. The lock will be the first taken by the adapter/domain assignment functions in the vfio_ap device driver to maintain the proper locking order. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Signed-off-by: Alexander Gordeev drivers/s390/crypto/ap_bus.c | 31 ++++++++++++++------ drivers/s390/crypto/vfio_ap_drv.c | 1 + drivers/s390/crypto/vfio_ap_ops.c | 54 +++++++++++++++++++++++++++++++++++ drivers/s390/crypto/vfio_ap_private.h | 2 ++ 4 files changed, 80 insertions(+), 8 deletions(-) commit 70aeefe574cbf86528528832c615cae2701f2cf3 Author: Tony Krowiak Date: Wed Aug 25 15:00:25 2021 -0400 s390/vfio-ap: reset queues after adapter/domain unassignment When an adapter or domain is unassigned from an mdev attached to a KVM guest, one or more of the guest's queues may get dynamically removed. Since the removed queues could get re-assigned to another mdev, they need to be reset. So, when an adapter or domain is unassigned from the mdev, the queues that are removed from the guest's AP configuration (APCB) will be reset. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Signed-off-by: Alexander Gordeev drivers/s390/crypto/vfio_ap_ops.c | 152 +++++++++++++++++++++++++--------- drivers/s390/crypto/vfio_ap_private.h | 2 + 2 files changed, 114 insertions(+), 40 deletions(-) commit 09d31ff78793ff007ec3b0a26000fcf29ad4928b Author: Tony Krowiak Date: Tue Feb 1 10:52:29 2022 -0500 s390/vfio-ap: hot plug/unplug of AP devices when probed/removed When an AP queue device is probed or removed, if the mediated device is attached to a KVM guest, the mediated device's adapter, domain and control domain bitmaps must be filtered to update the guest's APCB and if any changes are detected, the guest's APCB must then be hot plugged into the guest to reflect those changes to the guest. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Signed-off-by: Alexander Gordeev drivers/s390/crypto/vfio_ap_ops.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 51dc562af09dfb1a0d3cc806f64f0d72704647b5 Author: Tony Krowiak Date: Mon Jan 31 18:35:47 2022 -0500 s390/vfio-ap: allow hot plug/unplug of AP devices when assigned/unassigned Let's hot plug an adapter, domain or control domain into the guest when it is assigned to a matrix mdev that is attached to a KVM guest. Likewise, let's hot unplug an adapter, domain or control domain from the guest when it is unassigned from a matrix_mdev that is attached to a KVM guest. Whenever an assignment or unassignment of an adapter, domain or control domain is performed, the APQNs and control domains assigned to the matrix mdev will be filtered and assigned to the AP control block (APCB) that supplies the AP configuration to the guest so that no adapter, domain or control domain that is not in the host's AP configuration nor any APQN that does not reference a queue device bound to the vfio_ap device driver is assigned. After updating the APCB, if the mdev is in use by a KVM guest, it is hot plugged into the guest to dynamically provide access to the adapters, domains and control domains provided via the newly refreshed APCB. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Signed-off-by: Alexander Gordeev drivers/s390/crypto/vfio_ap_ops.c | 112 +++++++++++++++++++------------------- 1 file changed, 57 insertions(+), 55 deletions(-) commit 2c1ee8983aa377fef4f725162f4f3aa5f9575d4a Author: Tony Krowiak Date: Thu Mar 17 12:19:04 2022 -0400 s390/vfio-ap: prepare for dynamic update of guest's APCB on queue probe/remove The callback functions for probing and removing a queue device must take and release the locks required to perform a dynamic update of a guest's APCB in the proper order. The proper order for taking the locks is: matrix_dev->guests_lock => kvm->lock => matrix_dev->mdevs_lock The proper order for releasing the locks is: matrix_dev->mdevs_lock => kvm->lock => matrix_dev->guests_lock A new helper function is introduced to be used by the probe callback to acquire the required locks. Since the probe callback only has access to a queue device when it is called, the helper function will find the ap_matrix_mdev object to which the queue device's APQN is assigned and return it so the KVM guest to which the mdev is attached can be dynamically updated. Note that in order to find the ap_matrix_mdev (matrix_mdev) object, it is necessary to search the matrix_dev->mdev_list. This presents a locking order dilemma because the matrix_dev->mdevs_lock can't be taken to protect against changes to the list while searching for the matrix_mdev to which a queue device's APQN is assigned. This is due to the fact that the proper locking order requires that the matrix_dev->mdevs_lock be taken after both the matrix_mdev->kvm->lock and the matrix_dev->mdevs_lock. Consequently, the matrix_dev->guests_lock will be used to protect against removal of a matrix_mdev object from the list while a queue device is being probed. This necessitates changes to the mdev probe/remove callback functions to take the matrix_dev->guests_lock prior to removing a matrix_mdev object from the list. A new macro is also introduced to acquire the locks required to dynamically update the guest's APCB in the proper order when a queue device is removed. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Signed-off-by: Alexander Gordeev drivers/s390/crypto/vfio_ap_ops.c | 124 ++++++++++++++++++++++++++------------ 1 file changed, 85 insertions(+), 39 deletions(-) commit 8ee13ad99337b0b6920e732d87c692d577335f15 Author: Tony Krowiak Date: Wed Mar 16 22:21:38 2022 -0400 s390/vfio-ap: prepare for dynamic update of guest's APCB on assign/unassign The functions backing the matrix mdev's sysfs attribute interfaces to assign/unassign adapters, domains and control domains must take and release the locks required to perform a dynamic update of a guest's APCB in the proper order. The proper order for taking the locks is: matrix_dev->guests_lock => kvm->lock => matrix_dev->mdevs_lock The proper order for releasing the locks is: matrix_dev->mdevs_lock => kvm->lock => matrix_dev->guests_lock Two new macros are introduced for this purpose: One to take the locks and the other to release the locks. These macros will be used by the assignment/unassignment functions to prepare for dynamic update of the KVM guest's APCB. Signed-off-by: Tony Krowiak Signed-off-by: Alexander Gordeev drivers/s390/crypto/vfio_ap_ops.c | 71 ++++++++++++++++++++++++++++++++------- 1 file changed, 59 insertions(+), 12 deletions(-) commit b84eb8e05057f6f329e28f2563668340ea14184b Author: Tony Krowiak Date: Wed Mar 16 17:46:38 2022 -0400 s390/vfio-ap: use proper locking order when setting/clearing KVM pointer The group notifier that handles the VFIO_GROUP_NOTIFY_SET_KVM event must use the required locks in proper locking order to dynamically update the guest's APCB. The proper locking order is: 1. matrix_dev->guests_lock: required to use the KVM pointer to update a KVM guest's APCB. 2. matrix_mdev->kvm->lock: required to update a KVM guest's APCB. 3. matrix_dev->mdevs_lock: required to store or access the data stored in a struct ap_matrix_mdev instance. Two macros are introduced to acquire and release the locks in the proper order. These macros are now used by the group notifier functions. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Signed-off-by: Alexander Gordeev drivers/s390/crypto/vfio_ap_ops.c | 58 ++++++++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 10 deletions(-) commit 21195eb038bcb4c21daef761e8b18f3cc9f22020 Author: Tony Krowiak Date: Thu Sep 23 22:21:58 2021 -0400 s390/vfio-ap: introduce new mutex to control access to the KVM pointer The vfio_ap device driver registers for notification when the pointer to the KVM object for a guest is set. Recall that the KVM lock (kvm->lock) mutex must be taken outside of the matrix_dev->lock mutex to prevent the reporting by lockdep of a circular locking dependency (a.k.a., a lockdep splat): * see commit 0cc00c8d4050 ("Fix circular lockdep when setting/clearing crypto masks") * see commit 86956e70761b ("replace open coded locks for VFIO_GROUP_NOTIFY_SET_KVM notification") With the introduction of support for hot plugging/unplugging AP devices passed through to a KVM guest, a new guests_lock mutex is introduced to ensure the proper locking order is maintained: struct ap_matrix_dev { ... struct mutex guests_lock; ... } The matrix_dev->guests_lock controls access to the matrix_mdev instances that hold the state for AP devices that have been passed through to a KVM guest. This lock must be held to control access to the KVM pointer (matrix_mdev->kvm) while the vfio_ap device driver is using it to plug/unplug AP devices passed through to the KVM guest. Keep in mind, the proper locking order must be maintained whenever dynamically updating a KVM guest's APCB to plug/unplug adapters, domains and control domains: 1. matrix_dev->guests_lock: required to use the KVM pointer - stored in a struct ap_matrix_mdev instance - to update a KVM guest's APCB 2. matrix_mdev->kvm->lock: required to update a guest's APCB 3. matrix_dev->mdevs_lock: required to access data stored in a struct ap_matrix_mdev instance. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Signed-off-by: Alexander Gordeev drivers/s390/crypto/vfio_ap_drv.c | 1 + drivers/s390/crypto/vfio_ap_private.h | 6 ++++++ 2 files changed, 7 insertions(+) commit d0786556caa1a9b63a7bee321546c6cac1e84e96 Author: Tony Krowiak Date: Wed Mar 16 12:23:12 2022 -0400 s390/vfio-ap: rename matrix_dev->lock mutex to matrix_dev->mdevs_lock The matrix_dev->lock mutex is being renamed to matrix_dev->mdevs_lock to better reflect its purpose, which is to control access to the state of the mediated devices under the control of the vfio_ap device driver. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Signed-off-by: Alexander Gordeev drivers/s390/crypto/vfio_ap_drv.c | 2 +- drivers/s390/crypto/vfio_ap_ops.c | 76 ++++++++++++++++++----------------- drivers/s390/crypto/vfio_ap_private.h | 4 +- 3 files changed, 42 insertions(+), 40 deletions(-) commit e2126a73746ec6d5f519edf5bf33d76347a51ee9 Author: Tony Krowiak Date: Mon Dec 14 21:14:54 2020 -0500 s390/vfio-ap: allow assignment of unavailable AP queues to mdev device The current implementation does not allow assignment of an AP adapter or domain to an mdev device if each APQN resulting from the assignment does not reference an AP queue device that is bound to the vfio_ap device driver. This patch allows assignment of AP resources to the matrix mdev as long as the APQNs resulting from the assignment: 1. Are not reserved by the AP BUS for use by the zcrypt device drivers. 2. Are not assigned to another matrix mdev. The rationale behind this is that the AP architecture does not preclude assignment of APQNs to an AP configuration profile that are not available to the system. Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Signed-off-by: Alexander Gordeev drivers/s390/crypto/vfio_ap_ops.c | 224 +++++++++----------------------------- 1 file changed, 53 insertions(+), 171 deletions(-) commit 48cae940c31d2407d860d87c41d5f9871c0521db Author: Tony Krowiak Date: Wed Aug 11 16:23:05 2021 -0400 s390/vfio-ap: refresh guest's APCB by filtering AP resources assigned to mdev Refresh the guest's APCB by filtering the APQNs and control domain numbers assigned to the matrix mdev. Filtering of APQNs: ----------------- APQNs that do not reference an AP queue device bound to the vfio_ap device driver must be filtered from the APQNs assigned to the matrix mdev before they can be assigned to the guest's APCB. Given that the APQNs are configured in the guest's APCB as a matrix of APIDs (adapters) and APQIs (domains), it is not possible to filter an individual APQN. For example, suppose the matrix of APQNs is structured as follows: APIDs 3 4 5 0 (3,0) (4,0) (5,0) APQIs 1 (3,1) (4,1) (5,1) 2 (3,2) (4,2) (5,2) Now suppose APQN (4,1) does not reference a queue device bound to the vfio_ap device driver. If we filter APID 4, the APQNs (4,0), (4,1) and (4,2) will be removed. Similarly, if we filter domain 1, APQNs (3,1), (4,1) and (5,1) will be removed. To resolve this dilemma, the choice was made to filter the APID - in this case 4 - from the guest's APCB. The reason for this design decision is because the APID references an AP adapter which is a real hardware device that can be physically installed, removed, enabled or disabled; whereas, a domain is a partition within the adapter. It therefore better reflects reality to remove the APID from the guest's APCB. Filtering of control domains: ---------------------------- Any control domains that are not assigned to the host's AP configuration will be filtered from those assigned to the matrix mdev before assigning them to the guest's APCB. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Signed-off-by: Alexander Gordeev drivers/s390/crypto/vfio_ap_ops.c | 101 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 98 insertions(+), 3 deletions(-) commit 49b0109fb399b78a424d76485194202f290bdece Author: Tony Krowiak Date: Wed Dec 11 15:35:54 2019 -0500 s390/vfio-ap: introduce shadow APCB The APCB is a field within the CRYCB that provides the AP configuration to a KVM guest. Let's introduce a shadow copy of the KVM guest's APCB and maintain it for the lifespan of the guest. The shadow APCB serves the following purposes: 1. The shadow APCB can be maintained even when the mediated device is not currently in use by a KVM guest. Since the mediated device's AP configuration is filtered to ensure that no AP queues are passed through to the KVM guest that are not bound to the vfio_ap device driver or available to the host, the mediated device's AP configuration may differ from the guest's. Having a shadow of a guest's APCB allows us to provide a sysfs interface to view the guest's APCB even if the mediated device is not currently passed through to a KVM guest. This can aid in problem determination when the guest is unexpectedly missing AP resources. 2. If filtering was done in-place for the real APCB, the guest could pick up a transient state. Doing the filtering on a shadow and transferring the AP configuration to the real APCB after the guest is started or when AP resources are assigned to or unassigned from the mediated device, or when the host configuration changes, the guest's AP configuration will never be in a transient state. Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Signed-off-by: Alexander Gordeev drivers/s390/crypto/vfio_ap_ops.c | 10 ++++++---- drivers/s390/crypto/vfio_ap_private.h | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) commit 11cb2419fafe67f5ab965e2958475bce43c1529a Author: Tony Krowiak Date: Mon Feb 1 11:18:09 2021 -0500 s390/vfio-ap: manage link between queue struct and matrix mdev Let's create links between each queue device bound to the vfio_ap device driver and the matrix mdev to which the queue's APQN is assigned. The idea is to facilitate efficient retrieval of the objects representing the queue devices and matrix mdevs as well as to verify that a queue assigned to a matrix mdev is bound to the driver. The links will be created as follows: * When the queue device is probed, if its APQN is assigned to a matrix mdev, the structures representing the queue device and the matrix mdev will be linked. * When an adapter or domain is assigned to a matrix mdev, for each new APQN assigned that references a queue device bound to the vfio_ap device driver, the structures representing the queue device and the matrix mdev will be linked. The links will be removed as follows: * When the queue device is removed, if its APQN is assigned to a matrix mdev, the link from the structure representing the matrix mdev to the structure representing the queue will be removed. Since the storage allocated for the vfio_ap_queue will be freed, there is no need to remove the link to the matrix_mdev to which the queue's APQN is assigned. * When an adapter or domain is unassigned from a matrix mdev, for each APQN unassigned that references a queue device bound to the vfio_ap device driver, the structures representing the queue device and the matrix mdev will be unlinked. * When an mdev is removed, the link from any queues assigned to the mdev to the mdev will be removed. Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Signed-off-by: Alexander Gordeev drivers/s390/crypto/vfio_ap_ops.c | 191 +++++++++++++++++++++++++++------- drivers/s390/crypto/vfio_ap_private.h | 14 +++ 2 files changed, 168 insertions(+), 37 deletions(-) commit 260f3ea141382386e97611e7c2029bc013088ab1 Author: Tony Krowiak Date: Wed Oct 14 15:34:49 2020 -0400 s390/vfio-ap: move probe and remove callbacks to vfio_ap_ops.c Let's move the probe and remove callbacks into the vfio_ap_ops.c file to keep all code related to managing queues in a single file. This way, all functions related to queue management can be removed from the vfio_ap_private.h header file defining the public interfaces for the vfio_ap device driver. Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Signed-off-by: Alexander Gordeev drivers/s390/crypto/vfio_ap_drv.c | 118 +--------------------------------- drivers/s390/crypto/vfio_ap_ops.c | 99 +++++++++++++++++++++++++++- drivers/s390/crypto/vfio_ap_private.h | 5 +- 3 files changed, 102 insertions(+), 120 deletions(-) commit 034921cdea1c4c491735c8eb344634c7b899d930 Author: Tony Krowiak Date: Thu Jan 28 15:53:07 2021 -0500 s390/vfio-ap: use new AP bus interface to search for queue devices This patch refactors the vfio_ap device driver to use the AP bus's ap_get_qdev() function to retrieve the vfio_ap_queue struct containing information about a queue that is bound to the vfio_ap device driver. The bus's ap_get_qdev() function retrieves the queue device from a hashtable keyed by APQN. This is much more efficient than looping over the list of devices attached to the AP bus by several orders of magnitude. Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Reviewed-by: Jason J. Herne Signed-off-by: Alexander Gordeev drivers/s390/crypto/vfio_ap_ops.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 2d86cef353b8f3d20b16f8c5615742fd6938c801 Author: Mark Brown Date: Mon Jul 18 15:04:05 2022 +0100 ASoC: nau8821: Don't unconditionally free interrupt The remove() operation unconditionally frees the interrupt for the device but we may not actually have an interrupt so there might be nothing to free. Since the interrupt is requested after all other resources we don't need the explicit free anyway, unwinding is guaranteed to be safe, so just delete the remove() function and let devm take care of things. Reported-by: Zheyu Ma Signed-off-by: Mark Brown Tested-by: Zheyu Ma Link: https://lore.kernel.org/r/20220718140405.57233-1-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/nau8821.c | 10 ---------- 1 file changed, 10 deletions(-) commit 393a40b50fe976a121b15752d2dd6151c7a92126 Author: Mario Limonciello Date: Mon Jul 18 16:34:02 2022 -0500 ASoC: amd: yc: Decrease level of error message On a number of platforms that contain acp3x controller a new ERR level message is showing up: `acp6x pci device not found` This is because ACP3x and ACP6x share same PCI ID but can be identified by PCI revision. As this is expected behavior for a system with ACP3x decrease message to debug. Fixes: b1630fcbfde6c ("ASoC: amd: yc: add new YC platform varaint support") Cc: Vijendar Mukunda Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20220718213402.19497-1-mario.limonciello@amd.com Signed-off-by: Mark Brown sound/soc/amd/yc/pci-acp6x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0cf470c08319d9aa13e8fb3a26e44b5687bca56e Author: Wallace Lin Date: Tue Jul 19 16:40:47 2022 +0800 ASoC: nau8821: add new widget to control system clock Add new widget to control system clock for power saving. Signed-off-by: Wallace Lin Signed-off-by: Wallace Lin Link: https://lore.kernel.org/r/20220719084047.11572-1-savagecin@gmail.com Signed-off-by: Mark Brown sound/soc/codecs/nau8821.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 11e9318ff7486f375cf246c172c3206a731a2254 Author: Wang Jiada Date: Mon Jul 18 20:04:04 2022 +0900 ASoC: rsnd: ssiu: add missing .quit callback for gen2 commit 83b220cf8eb2a ("ASoC: rsnd: implement BUSIF related code in ssiu.c") moved BUSIF related code in ssiu.c which added .quit callback in ssiu.c to disable error irq when ssiu quits. But .quit callback was added only for gen1 and is missing for gen2, this causes error irq is left enabled after ssiu quits on gen2. This commit adds missing .quit callback for gen2 Signed-off-by: Wang Jiada Cc: Dean Jenkins Cc: Eugeniu Rosca Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20220718110404.1529085-1-jiwang_wang@mentor.com Signed-off-by: Mark Brown sound/soc/sh/rcar/ssiu.c | 1 + 1 file changed, 1 insertion(+) commit ef50cd57a73a8bbfad403e5e2edb3309611f58ad Author: Xu Qiang Date: Tue Jul 19 06:36:41 2022 +0000 irqdomain: Use hwirq_max instead of revmap_size for NOMAP domains NOMAP irq domains use the revmap_size field to indicate the maximum hwirq number the domain accepts. This is a bit confusing as revmap_size is usually used to indicate the size of the revmap array, which a NOMAP domain doesn't have. Instead, use the hwirq_max field which has the correct semantics, and keep revmap_size to 0 for a NOMAP domain. Signed-off-by: Xu Qiang [maz: commit message] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220719063641.56541-3-xuqiang36@huawei.com kernel/irq/irqdomain.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6f194c99f466147148cc08452718b46664112548 Author: Xu Qiang Date: Tue Jul 19 06:36:40 2022 +0000 irqdomain: Report irq number for NOMAP domains When using a NOMAP domain, __irq_resolve_mapping() doesn't store the Linux IRQ number at the address optionally provided by the caller. While this isn't a huge deal (the returned value is guaranteed to the hwirq that was passed as a parameter), let's honour the letter of the API by writing the expected value. Fixes: d22558dd0a6c (“irqdomain: Introduce irq_resolve_mapping()”) Signed-off-by: Xu Qiang [maz: commit message] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220719063641.56541-2-xuqiang36@huawei.com kernel/irq/irqdomain.c | 2 ++ 1 file changed, 2 insertions(+) commit c3f0e5fd2d33d80c5a5a8b5e5d2bab2841709cc8 Author: Nico Boehr Date: Mon Jul 18 15:04:34 2022 +0200 KVM: s390: pv: don't present the ecall interrupt twice When the SIGP interpretation facility is present and a VCPU sends an ecall to another VCPU in enabled wait, the sending VCPU receives a 56 intercept (partial execution), so KVM can wake up the receiving CPU. Note that the SIGP interpretation facility will take care of the interrupt delivery and KVM's only job is to wake the receiving VCPU. For PV, the sending VCPU will receive a 108 intercept (pv notify) and should continue like in the non-PV case, i.e. wake the receiving VCPU. For PV and non-PV guests the interrupt delivery will occur through the SIGP interpretation facility on SIE entry when SIE finds the X bit in the status field set. However, in handle_pv_notification(), there was no special handling for SIGP, which leads to interrupt injection being requested by KVM for the next SIE entry. This results in the interrupt being delivered twice: once by the SIGP interpretation facility and once by KVM through the IICTL. Add the necessary special handling in handle_pv_notification(), similar to handle_partial_execution(), which simply wakes the receiving VCPU and leave interrupt delivery to the SIGP interpretation facility. In contrast to external calls, emergency calls are not interpreted but also cause a 108 intercept, which is why we still need to call handle_instruction() for SIGP orders other than ecall. Since kvm_s390_handle_sigp_pei() is now called for all SIGP orders which cause a 108 intercept - even if they are actually handled by handle_instruction() - move the tracepoint in kvm_s390_handle_sigp_pei() to avoid possibly confusing trace messages. Signed-off-by: Nico Boehr Cc: # 5.7 Fixes: da24a0cc58ed ("KVM: s390: protvirt: Instruction emulation") Reviewed-by: Claudio Imbrenda Reviewed-by: Janosch Frank Reviewed-by: Christian Borntraeger Link: https://lore.kernel.org/r/20220718130434.73302-1-nrb@linux.ibm.com Message-Id: <20220718130434.73302-1-nrb@linux.ibm.com> Signed-off-by: Claudio Imbrenda arch/s390/kvm/intercept.c | 15 +++++++++++++++ arch/s390/kvm/sigp.c | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) commit 2d0f3f13a959b075f63cd67d0cccb600c58ddc72 Merge: 7cb7b8fe6339 45472f1e5348 Author: Arnd Bergmann Date: Tue Jul 19 15:42:00 2022 +0200 Merge branch 'nuvoton/newsoc' into arm/newsoc Merge the new SoC support from Tomer Maimon: "This patchset adds initial support for the Nuvoton Arbel NPCM8XX Board Management controller (BMC) SoC family. The Nuvoton Arbel NPCM8XX SoC is a fourth-generation BMC. The NPCM8XX computing subsystem comprises a quadcore ARM Cortex A35 ARM-V8 architecture. This patchset adds minimal architecture and drivers such as: Clocksource, Clock, Reset, and WD. Some of the Arbel NPCM8XX peripherals are based on Poleg NPCM7XX. This patchset was tested on the Arbel NPCM8XX evaluation board." I'm leaving out the clk controller driver, which is still under review. * nuvoton/newsoc: arm64: defconfig: Add Nuvoton NPCM family support arm64: dts: nuvoton: Add initial NPCM845 EVB device tree arm64: dts: nuvoton: Add initial NPCM8XX device tree arm64: npcm: Add support for Nuvoton NPCM8XX BMC SoC dt-bindings: arm: npcm: Add nuvoton,npcm845 GCR compatible string dt-bindings: arm: npcm: Add nuvoton,npcm845 compatible string dt-bindings: arm: npcm: Add maintainer reset: npcm: Add NPCM8XX support dt-bindings: reset: npcm: Add support for NPCM8XX reset: npcm: using syscon instead of device data ARM: dts: nuvoton: add reset syscon property dt-bindings: reset: npcm: add GCR syscon property dt-binding: clk: npcm845: Add binding for Nuvoton NPCM8XX Clock dt-bindings: watchdog: npcm: Add npcm845 compatible string dt-bindings: timer: npcm: Add npcm845 compatible string commit 45472f1e5348c7b755b4912f2f529ec81cea044b Author: Tomer Maimon Date: Sun Jul 17 12:16:09 2022 +0300 arm64: defconfig: Add Nuvoton NPCM family support Enable basic drivers for NPCM8XX booting up support: Architecture, Clock, and WD. Signed-off-by: Tomer Maimon Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit f21d8e7165e9e447e6a742c18d55dc80b6e7281c Author: Tomer Maimon Date: Sun Jul 17 12:16:08 2022 +0300 arm64: dts: nuvoton: Add initial NPCM845 EVB device tree Add initial Nuvoton NPCM845 evaluation board device tree. Signed-off-by: Tomer Maimon Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/nuvoton/Makefile | 2 ++ .../arm64/boot/dts/nuvoton/nuvoton-npcm845-evb.dts | 30 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) commit 6cc82f07fc340570811c18d7241b54c91aa4ac19 Author: Tomer Maimon Date: Sun Jul 17 12:16:07 2022 +0300 arm64: dts: nuvoton: Add initial NPCM8XX device tree This adds initial device tree support for the Nuvoton NPCM845 Board Management controller (BMC) SoC family. The NPCM845 based quad-core Cortex-A35 ARMv8 architecture and have various peripheral IPs. Signed-off-by: Tomer Maimon Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/Makefile | 1 + .../boot/dts/nuvoton/nuvoton-common-npcm8xx.dtsi | 170 +++++++++++++++++++++ arch/arm64/boot/dts/nuvoton/nuvoton-npcm845.dtsi | 76 +++++++++ 3 files changed, 247 insertions(+) commit 3670d2ec13eeb63d9570caf6b51dd1150af65ea8 Author: Tomer Maimon Date: Sun Jul 17 12:16:06 2022 +0300 arm64: npcm: Add support for Nuvoton NPCM8XX BMC SoC This adds support for the Nuvoton NPCM8XX Board Management controller (BMC) SoC family. The NPCM8XX based quad-core Cortex-A35 ARMv8 architecture. Signed-off-by: Tomer Maimon Signed-off-by: Arnd Bergmann MAINTAINERS | 2 ++ arch/arm64/Kconfig.platforms | 11 +++++++++++ 2 files changed, 13 insertions(+) commit 6524d8ebbc271d91c363da2e853bfbadf4bb5239 Author: Tomer Maimon Date: Sun Jul 17 12:16:05 2022 +0300 dt-bindings: arm: npcm: Add nuvoton,npcm845 GCR compatible string Add a compatible string for Nuvoton BMC NPCM845 global control registers. Signed-off-by: Tomer Maimon Acked-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann Documentation/devicetree/bindings/arm/npcm/nuvoton,gcr.yaml | 1 + 1 file changed, 1 insertion(+) commit 730585a061e361c63c2718ca2815289c8d3f2816 Author: Tomer Maimon Date: Sun Jul 17 12:16:04 2022 +0300 dt-bindings: arm: npcm: Add nuvoton,npcm845 compatible string Add a compatible string for Nuvoton BMC NPCM845 SoC and a board specific device tree for the NPCM845 (Arbel) evaluation board. Signed-off-by: Tomer Maimon Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann Documentation/devicetree/bindings/arm/npcm/npcm.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit e8dd9f77c0e5327ea09822d4d52c43cd8d4ce55e Author: Tomer Maimon Date: Sun Jul 17 12:16:03 2022 +0300 dt-bindings: arm: npcm: Add maintainer Add Tomer Maimon to the maintainers list. Signed-off-by: Tomer Maimon Acked-by: Rob Herring Signed-off-by: Arnd Bergmann Documentation/devicetree/bindings/arm/npcm/npcm.yaml | 1 + Documentation/devicetree/bindings/arm/npcm/nuvoton,gcr.yaml | 1 + 2 files changed, 2 insertions(+) commit fc5d2a2f4aa537c67691cef38f3202577cc4fe8a Author: Tomer Maimon Date: Sun Jul 17 12:16:02 2022 +0300 reset: npcm: Add NPCM8XX support Updated the NPCM reset driver to add support for Nuvoton BMC NPCM8XX SoC. As part of adding NPCM8XX support: - Add NPCM8XX specific compatible string. - Add NPCM8XX USB reset. - Add data to handle architecture-specific reset parameters. - Some of the Reset Id and number of resets are different from NPCM7XX. Signed-off-by: Tomer Maimon Acked-by: Philipp Zabel Signed-off-by: Arnd Bergmann drivers/reset/reset-npcm.c | 211 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 173 insertions(+), 38 deletions(-) commit 85331f56cb72b2808469edc02369eab26a55a210 Author: Tomer Maimon Date: Sun Jul 17 12:16:01 2022 +0300 dt-bindings: reset: npcm: Add support for NPCM8XX Add binding document and device tree binding constants for Nuvoton BMC NPCM8XX reset controller. Signed-off-by: Tomer Maimon Acked-by: Krzysztof Kozlowski Acked-by: Philipp Zabel Signed-off-by: Arnd Bergmann Documentation/devicetree/bindings/reset/nuvoton,npcm750-reset.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3183444aee63a5c564dd75abec9adf693698d36a Author: Tomer Maimon Date: Sun Jul 17 12:16:00 2022 +0300 reset: npcm: using syscon instead of device data Using syscon device tree property instead of device data to handle the NPCM general control registers. In case the syscon not found the code still search for nuvoton,npcm750-gcr to support DTS backward compatibility. Signed-off-by: Tomer Maimon Signed-off-by: Arnd Bergmann drivers/reset/reset-npcm.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 8f73a173430b6e5f2968c73f61bbcca4701f9a42 Author: Tomer Maimon Date: Sun Jul 17 12:15:59 2022 +0300 ARM: dts: nuvoton: add reset syscon property Add nuvoton,sysgcr syscon property to the reset node to handle the general control registers. Signed-off-by: Tomer Maimon Signed-off-by: Arnd Bergmann arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 1 + 1 file changed, 1 insertion(+) commit 40b88f32ccf6bb0c27b26bfd0e38c6866a632b49 Author: Tomer Maimon Date: Sun Jul 17 12:15:58 2022 +0300 dt-bindings: reset: npcm: add GCR syscon property Describe syscon property that handles general control registers (GCR) in Nuvoton BMC NPCM reset driver. Signed-off-by: Tomer Maimon Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann Documentation/devicetree/bindings/reset/nuvoton,npcm750-reset.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 08e950449c6253322ddfbf643f566fd504cfc5c1 Author: Tomer Maimon Date: Sun Jul 17 12:15:56 2022 +0300 dt-binding: clk: npcm845: Add binding for Nuvoton NPCM8XX Clock Add binding for the Arbel BMC NPCM8XX Clock controller. Signed-off-by: Tomer Maimon Reviewed-by: Krzysztof Kozlowski Acked-by: Stephen Boyd Signed-off-by: Arnd Bergmann .../bindings/clock/nuvoton,npcm845-clk.yaml | 49 ++++++++++++++++++++++ include/dt-bindings/clock/nuvoton,npcm845-clk.h | 49 ++++++++++++++++++++++ 2 files changed, 98 insertions(+) commit 5e1f5ea3da986de4b8136051492898bedd98890d Author: Tomer Maimon Date: Sun Jul 17 12:15:55 2022 +0300 dt-bindings: watchdog: npcm: Add npcm845 compatible string Add a compatible string for Nuvoton BMC NPCM845 watchdog. Signed-off-by: Tomer Maimon Acked-by: Krzysztof Kozlowski Acked-by: Guenter Roeck Signed-off-by: Arnd Bergmann Documentation/devicetree/bindings/watchdog/nuvoton,npcm-wdt.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6762d688a1a51fae72b88bf3660b41392f267882 Author: Tomer Maimon Date: Sun Jul 17 12:15:54 2022 +0300 dt-bindings: timer: npcm: Add npcm845 compatible string Add a compatible string for Nuvoton BMC NPCM845 timer. Signed-off-by: Tomer Maimon Acked-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann Documentation/devicetree/bindings/timer/nuvoton,npcm7xx-timer.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 26c350fe7ae013dda37b6a7771e5a67062bfe7c8 Merge: 7dbb1b0b467e 8225663e0cd4 Author: Arnd Bergmann Date: Tue Jul 19 15:34:25 2022 +0200 Merge tag 'mvebu-dt64-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/dt mvebu dt64 for 5.20 (part 1) Add support for Marvell 98DX2530 (and variants) * tag 'mvebu-dt64-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: arm64: marvell: enable the 98DX2530 pinctrl driver arm64: dts: marvell: Add Armada 98DX2530 SoC and RD-AC5X board dt-bindings: marvell: Document the AC5/AC5X compatibles Link: https://lore.kernel.org/r/87cze1qlg3.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit 769e2695be4132fe0be4c964c9d8ea97c74d9a6a Author: Arun Ramadoss Date: Mon Jul 18 11:48:03 2022 +0530 net: dsa: microchip: fix the missing ksz8_r_mib_cnt During the refactoring for the ksz8_dev_ops from ksz8795.c to ksz_common.c, the ksz8_r_mib_cnt has been missed. So this patch adds the missing one. Fixes: 6ec23aaaac43 ("net: dsa: microchip: move ksz_dev_ops to ksz_common.c") Signed-off-by: Arun Ramadoss Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20220718061803.4939-1-arun.ramadoss@microchip.com Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz_common.c | 1 + 1 file changed, 1 insertion(+) commit 8225663e0cd47a049267b9ef627d0b10f6bfc056 Author: Chris Packham Date: Tue Jul 5 22:09:21 2022 +0300 arm64: marvell: enable the 98DX2530 pinctrl driver This commit makes sure the drivers for the 98DX2530 pin controller is enabled. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: Vadym Kochan Signed-off-by: Gregory CLEMENT arch/arm64/Kconfig.platforms | 2 ++ 1 file changed, 2 insertions(+) commit ac6800e279a22b28f4fc21439843025a0d5bf03e Author: Yang Xu Date: Thu Jul 14 14:11:26 2022 +0800 fs: Add missing umask strip in vfs_tmpfile All creation paths except for O_TMPFILE handle umask in the vfs directly if the filesystem doesn't support or enable POSIX ACLs. If the filesystem does then umask handling is deferred until posix_acl_create(). Because, O_TMPFILE misses umask handling in the vfs it will not honor umask settings. Fix this by adding the missing umask handling. Link: https://lore.kernel.org/r/1657779088-2242-2-git-send-email-xuyang2018.jy@fujitsu.com Fixes: 60545d0d4610 ("[O_TMPFILE] it's still short a few helpers, but infrastructure should be OK now...") Cc: # 4.19+ Reported-by: Christian Brauner (Microsoft) Reviewed-by: Darrick J. Wong Reviewed-and-Tested-by: Jeff Layton Acked-by: Christian Brauner (Microsoft) Signed-off-by: Yang Xu Signed-off-by: Christian Brauner (Microsoft) fs/namei.c | 2 ++ 1 file changed, 2 insertions(+) commit 2b3416ceff5e6bd4922f6d1c61fb68113dd82302 Author: Yang Xu Date: Thu Jul 14 14:11:25 2022 +0800 fs: add mode_strip_sgid() helper Add a dedicated helper to handle the setgid bit when creating a new file in a setgid directory. This is a preparatory patch for moving setgid stripping into the vfs. The patch contains no functional changes. Currently the setgid stripping logic is open-coded directly in inode_init_owner() and the individual filesystems are responsible for handling setgid inheritance. Since this has proven to be brittle as evidenced by old issues we uncovered over the last months (see [1] to [3] below) we will try to move this logic into the vfs. Link: e014f37db1a2 ("xfs: use setattr_copy to set vfs inode attributes") [1] Link: 01ea173e103e ("xfs: fix up non-directory creation in SGID directories") [2] Link: fd84bfdddd16 ("ceph: fix up non-directory creation in SGID directories") [3] Link: https://lore.kernel.org/r/1657779088-2242-1-git-send-email-xuyang2018.jy@fujitsu.com Reviewed-by: Darrick J. Wong Reviewed-by: Christian Brauner (Microsoft) Reviewed-and-Tested-by: Jeff Layton Signed-off-by: Yang Xu Signed-off-by: Christian Brauner (Microsoft) fs/inode.c | 36 ++++++++++++++++++++++++++++++++---- include/linux/fs.h | 2 ++ 2 files changed, 34 insertions(+), 4 deletions(-) commit b795fadfc46bc497257435d4d9e57f487f521fd1 Author: Chris Packham Date: Tue Jul 5 22:09:20 2022 +0300 arm64: dts: marvell: Add Armada 98DX2530 SoC and RD-AC5X board The 98DX2530 SoC is the Control and Management CPU integrated into the Marvell 98DX25xx and 98DX35xx series of switch chip (internally referred to as AlleyCat5 and AlleyCat5X). These files have been taken from the Marvell SDK and lightly cleaned up with the License and copyright retained. gregory.clement: use specific cpu type: cortex-a55 instead of armv8 in cpu nodes, armv8 being reserved for the arm virtual models that are not meant to implement a particular CPU type. Signed-off-by: Chris Packham Signed-off-by: Vadym Kochan Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/Makefile | 1 + arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi | 291 ++++++++++++++++++++++++ arch/arm64/boot/dts/marvell/ac5-98dx35xx-rd.dts | 101 ++++++++ arch/arm64/boot/dts/marvell/ac5-98dx35xx.dtsi | 17 ++ 4 files changed, 410 insertions(+) commit 7dbb1b0b467e94e432f5096e6da0de2702c73eec Merge: 2c071ce53d56 40624346b7ae Author: Arnd Bergmann Date: Tue Jul 19 15:10:05 2022 +0200 Merge tag 'mvebu-dt-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/dt mvebu dt for 5.20 (part 1) Enable LED to link/activity on turris-omnia (Armada 385 based) * tag 'mvebu-dt-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: ARM: dts: turris-omnia: enable LED controller node ARM: dts: turris-omnia: configure LED[0] pin function to link/activity Link: https://lore.kernel.org/r/87lespqn28.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit 7e0b0cc16ba1ee0d3076bd5f06dee6fe88479092 Merge: c5560db571d4 fdaa37258319 Author: Arnd Bergmann Date: Tue Jul 19 15:06:05 2022 +0200 Merge tag 'mvebu-arm-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/soc mvebu arm for 5.20 (part 1) Update PCIe fixup for old Marvell SoCs: dove, orion5 and mv78xx0. * tag 'mvebu-arm-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: ARM: Marvell: Update PCIe fixup Link: https://lore.kernel.org/r/87ilntqn0v.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit 180c6cb6b9b79c55b79e8414f4c0208f2463af7d Author: Hui.Liu Date: Tue Jul 19 09:46:57 2022 +0800 dt-bindings: iio: adc: Add compatible for MT8188 Add dt-binding documentation of auxadc for MediaTek MT8188 SoC platform. Signed-off-by: Hui.Liu Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220719014657.28714-2-hui.liu@mediatek.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml | 1 + 1 file changed, 1 insertion(+) commit af77c56aa35325daa2bc2bed5c2ebf169be61b86 Author: Tetsuo Handa Date: Tue Jul 19 14:49:39 2022 +0900 tty: vt: initialize unicode screen buffer syzbot reports kernel infoleak at vcs_read() [1], for buffer can be read immediately after resize operation. Initialize buffer using kzalloc(). ---------- #include #include #include #include int main(int argc, char *argv[]) { struct fb_var_screeninfo var = { }; const int fb_fd = open("/dev/fb0", 3); ioctl(fb_fd, FBIOGET_VSCREENINFO, &var); var.yres = 0x21; ioctl(fb_fd, FBIOPUT_VSCREENINFO, &var); return read(open("/dev/vcsu", O_RDONLY), &var, sizeof(var)) == -1; } ---------- Link: https://syzkaller.appspot.com/bug?extid=31a641689d43387f05d3 [1] Cc: stable Reported-by: syzbot Reviewed-by: Jiri Slaby Signed-off-by: Tetsuo Handa Link: https://lore.kernel.org/r/4ef053cf-e796-fb5e-58b7-3ae58242a4ad@I-love.SAKURA.ne.jp Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe5fc9873af0956280905461607841d63fbe6f0e Merge: e0e1824bf69e 08680588d340 Author: Greg Kroah-Hartman Date: Tue Jul 19 14:16:34 2022 +0200 Merge tag 'phy-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into char-misc-next Vinod writes: phy-for-5.20 - New support: - Samsung FSD ufs phy - Mediatek MT8365 dsi and tphy support - Amlogic G12A Analog D-PHY driver - Mediatek MT8188 tphy support - Mediatek PCIe phy driver - Cadence J721e DPHY support - Qualcomm IPQ8074 PCIe Gen3 PHY support - Nvidia Tegra PCIe PIPE2UPHY support - Updates: - Split of Qualcomm combo qmp phy driver to ufs, usb, pcie phy drivers and associated cleanup of these drivers * tag 'phy-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (115 commits) dt-bindings: phy: mediatek: tphy: add compatible for mt8188 phy: rockchip-inno-usb2: Ignore OTG IRQs in host mode phy: qcom-qmp-usb: statify qmp_phy_vreg_l phy: stm32: fix error return in stm32_usbphyc_phy_init phy: phy-mtk-dp: change mtk_dp_phy_driver to static phy: freescale: Add i.MX8qm Mixel LVDS PHY support dt-bindings: phy: Add Freescale i.MX8qm Mixel LVDS PHY binding dt-bindings: vendor-prefixes: Add prefix for Mixel, Inc. phy: cadence-torrent: Remove unused `regmap` field from state struct phy: cadence: Sierra: Remove unused `regmap` field from state struct phy: samsung-ufs: ufs: change phy on/off control phy: samsung-ufs: convert phy clk usage to clk_bulk API phy: qcom-qmp-usb: define QPHY_V2_PCS_PLL_LOCK_CHK_DLY_TIME register phy: qcom-qmp-usb: replace FLL layout writes for msm8996 phy: qcom-qmp: pcs-pcie-v4: add missing registers phy: qcom-qmp: pcs-v3: add missing registers phy: qcom-qmp: qserdes-com-v5: add missing registers phy: qcom-qmp: qserdes-com-v4: add missing registers phy: qcom-qmp: qserdes-com-v3: add missing registers phy: qcom-qmp: qserdes-com: add missing registers ... commit 7746f735f55205176a447e737fe15a5ba7a4d2d4 Author: Claudio Imbrenda Date: Tue Jun 28 15:56:13 2022 +0200 KVM: s390: pv: destroy the configuration before its memory Move the Destroy Secure Configuration UVC before the loop to destroy the memory. If the protected VM has memory, it will be cleaned up and made accessible by the Destroy Secure Configuration UVC. The struct page for the relevant pages will still have the protected bit set, so the loop is still needed to clean that up. Switching the order of those two operations does not change the outcome, but it is significantly faster. Signed-off-by: Claudio Imbrenda Reviewed-by: Nico Boehr Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20220628135619.32410-13-imbrenda@linux.ibm.com Message-Id: <20220628135619.32410-13-imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/kvm/pv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit da15fbc646f377ebfe992c13053b93783fea0db2 Author: Claudio Imbrenda Date: Tue Jun 28 15:56:12 2022 +0200 KVM: s390: pv: refactoring of kvm_s390_pv_deinit_vm Refactor kvm_s390_pv_deinit_vm to improve readability and simplify the improvements that are coming in subsequent patches. No functional change intended. Signed-off-by: Claudio Imbrenda Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20220628135619.32410-12-imbrenda@linux.ibm.com Message-Id: <20220628135619.32410-12-imbrenda@linux.ibm.com> [frankja@linux.ibm.com: Dropped commit message line regarding review] Signed-off-by: Janosch Frank arch/s390/kvm/pv.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 9bf811dae443794594615625577277852edc181b Author: Claudio Imbrenda Date: Tue Jun 28 15:56:11 2022 +0200 s390/mm: KVM: pv: when tearing down, try to destroy protected pages When ptep_get_and_clear_full is called for a mm teardown, we will now attempt to destroy the secure pages. This will be faster than export. In case it was not a teardown, or if for some reason the destroy page UVC failed, we try with an export page, like before. Signed-off-by: Claudio Imbrenda Acked-by: Janosch Frank Reviewed-by: Nico Boehr Link: https://lore.kernel.org/r/20220628135619.32410-11-imbrenda@linux.ibm.com Message-Id: <20220628135619.32410-11-imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/include/asm/pgtable.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit ca2fd0609b5ddd15fe57c917a41508a7a9fc17e1 Author: Claudio Imbrenda Date: Tue Jun 28 15:56:10 2022 +0200 KVM: s390: pv: add mmu_notifier Add an mmu_notifier for protected VMs. The callback function is triggered when the mm is torn down, and will attempt to convert all protected vCPUs to non-protected. This allows the mm teardown to use the destroy page UVC instead of export. Also make KVM select CONFIG_MMU_NOTIFIER, needed to use mmu_notifiers. Signed-off-by: Claudio Imbrenda Acked-by: Janosch Frank Reviewed-by: Nico Boehr Link: https://lore.kernel.org/r/20220628135619.32410-10-imbrenda@linux.ibm.com Message-Id: <20220628135619.32410-10-imbrenda@linux.ibm.com> [frankja@linux.ibm.com: Conflict resolution for mmu_notifier.h include and struct kvm_s390_pv] Signed-off-by: Janosch Frank arch/s390/include/asm/kvm_host.h | 2 ++ arch/s390/kvm/Kconfig | 1 + arch/s390/kvm/kvm-s390.c | 10 ++++++++++ arch/s390/kvm/pv.c | 26 ++++++++++++++++++++++++++ 4 files changed, 39 insertions(+) commit 32f02a211b0a192553075803b0b819027f96bb43 Author: Greg Kroah-Hartman Date: Tue Jul 19 13:57:48 2022 +0200 Revert "platform/chrome: Add Type-C mux set command definitions" This reverts commit 28a6ed8e39f77f6ac613ec9b7461aa75e85fa79a. The chrome platform driver changes need to come in through the platform tree due to some api changes that showed up there that cause build errors in linux-next Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20220719160821.5e68e30b@oak.ozlabs.ibm.com Cc: Prashant Malani Signed-off-by: Greg Kroah-Hartman include/linux/platform_data/cros_ec_commands.h | 18 ------------------ 1 file changed, 18 deletions(-) commit 3d3e9b0db608608c049d286418f0c62c592ad280 Author: Greg Kroah-Hartman Date: Tue Jul 19 13:57:29 2022 +0200 Revert "platform/chrome: cros_typec_switch: Add switch driver" This reverts commit e54369058f3da181fcc4c893f224a0c5a8a526b6. The chrome platform driver changes need to come in through the platform tree due to some api changes that showed up there that cause build errors in linux-next Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20220719160821.5e68e30b@oak.ozlabs.ibm.com Cc: Prashant Malani Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 - drivers/platform/chrome/Kconfig | 11 -- drivers/platform/chrome/Makefile | 1 - drivers/platform/chrome/cros_typec_switch.c | 170 ---------------------------- 4 files changed, 183 deletions(-) commit 1583afd4b0ef45ebdddb36f9dd390d96915a7f4f Author: Greg Kroah-Hartman Date: Tue Jul 19 13:57:25 2022 +0200 Revert "platform/chrome: cros_typec_switch: Add ACPI Kconfig dep" This reverts commit 88a15fbb47db483d06b12b1ae69f114b96361a96. The chrome platform driver changes need to come in through the platform tree due to some api changes that showed up there that cause build errors in linux-next Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20220719160821.5e68e30b@oak.ozlabs.ibm.com Cc: Prashant Malani Signed-off-by: Greg Kroah-Hartman drivers/platform/chrome/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 182da120f21277e36f4de6d510290b112438bb2d Author: Greg Kroah-Hartman Date: Tue Jul 19 13:57:00 2022 +0200 Revert "platform/chrome: cros_typec_switch: Set EC retimer" This reverts commit 34f375f0fdf67f8804142fa37a28e73426d4c1df. The chrome platform driver changes need to come in through the platform tree due to some api changes that showed up there that cause build errors in linux-next Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20220719160821.5e68e30b@oak.ozlabs.ibm.com Cc: Prashant Malani Signed-off-by: Greg Kroah-Hartman drivers/platform/chrome/cros_typec_switch.c | 56 +---------------------------- 1 file changed, 1 insertion(+), 55 deletions(-) commit e5b25ca94c294545a677905a1fb2c940eee84c67 Author: Greg Kroah-Hartman Date: Tue Jul 19 13:56:53 2022 +0200 Revert "platform/chrome: cros_typec_switch: Add event check" This reverts commit bb53ad958012f5a8d88b3b7159c22b3b877601bb. The chrome platform driver changes need to come in through the platform tree due to some api changes that showed up there that cause build errors in linux-next Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20220719160821.5e68e30b@oak.ozlabs.ibm.com Cc: Prashant Malani Signed-off-by: Greg Kroah-Hartman drivers/platform/chrome/cros_typec_switch.c | 72 +---------------------------- 1 file changed, 2 insertions(+), 70 deletions(-) commit 3838896d374929638bdb143dc33aee21931ef903 Author: Greg Kroah-Hartman Date: Tue Jul 19 13:56:46 2022 +0200 Revert "platform/chrome: cros_typec_switch: Register mode switches" This reverts commit f5434e30011e011b24852959365b7cbc61dd8c85. The chrome platform driver changes need to come in through the platform tree due to some api changes that showed up there that cause build errors in linux-next Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20220719160821.5e68e30b@oak.ozlabs.ibm.com Cc: Prashant Malani Signed-off-by: Greg Kroah-Hartman drivers/platform/chrome/cros_typec_switch.c | 40 ----------------------------- 1 file changed, 40 deletions(-) commit 9169d2fd1f5778295ec4934acd99dc7b35a83fd5 Author: Greg Kroah-Hartman Date: Tue Jul 19 13:56:40 2022 +0200 Revert "platform/chrome: cros_ec_typec: Cleanup switch handle return paths" This reverts commit 66fe238a9bcc158f75ddecf976d1ce7efe20f713. The chrome platform driver changes need to come in through the platform tree due to some api changes that showed up there that cause build errors in linux-next Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20220719160821.5e68e30b@oak.ozlabs.ibm.com Cc: Prashant Malani Signed-off-by: Greg Kroah-Hartman drivers/platform/chrome/cros_ec_typec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 829b4c4183c2201d2c3981d55bdaeec201ec4098 Author: Greg Kroah-Hartman Date: Tue Jul 19 13:56:32 2022 +0200 Revert "platform/chrome: cros_ec_typec: Get retimer handle" This reverts commit c76d09da77d69d7f737540985912ad2bca654713. The chrome platform driver changes need to come in through the platform tree due to some api changes that showed up there that cause build errors in linux-next Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20220719160821.5e68e30b@oak.ozlabs.ibm.com Cc: Prashant Malani Signed-off-by: Greg Kroah-Hartman drivers/platform/chrome/cros_ec_typec.c | 44 +++------------------------------ 1 file changed, 3 insertions(+), 41 deletions(-) commit 2b0d7ab1646c371268ff0435b6330ba4b45a97f0 Merge: d4a930a08c26 8cfc90ecd33e Author: Marc Zyngier Date: Tue Jul 19 12:18:38 2022 +0100 Merge branch irq/renesas-irqc into irq/irqchip-next * irq/renesas-irqc: : . : New Renesas RZ/G2L IRQC driver from Lad Prabhakar, equipped with : its companion GPIO driver. : . dt-bindings: interrupt-controller: renesas,rzg2l-irqc: Document RZ/V2L SoC gpio: thunderx: Don't directly include asm-generic/msi.h pinctrl: renesas: pinctrl-rzg2l: Add IRQ domain to handle GPIO interrupt dt-bindings: pinctrl: renesas,rzg2l-pinctrl: Document the properties to handle GPIO IRQ gpio: gpiolib: Allow free() callback to be overridden irqchip: Add RZ/G2L IA55 Interrupt Controller driver dt-bindings: interrupt-controller: Add Renesas RZ/G2L Interrupt Controller gpio: Remove dynamic allocation from populate_parent_alloc_arg() Signed-off-by: Marc Zyngier commit eac931254d99c5aeb12ace02366dd338c4371164 Author: John Johansen Date: Mon Nov 22 23:28:32 2021 -0800 apparmor: move ptrace mediation to more logical task.{h,c} AppArmor split out task oriented controls to their own logical file a while ago. Ptrace mediation is better grouped with task than ipc, so move it. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 1 + security/apparmor/include/ipc.h | 18 ------- security/apparmor/include/task.h | 18 +++++++ security/apparmor/ipc.c | 110 ------------------------------------- security/apparmor/task.c | 114 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 133 insertions(+), 128 deletions(-) commit 295171705c9ac98f4626609033f6bab0c2e37ed0 Author: Jason Wang Date: Fri Jul 15 13:12:58 2022 +0800 irqchip/gic-v3: Fix comment typo The double `the' is duplicated in line 1786, remove one. Signed-off-by: Jason Wang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220715051258.28889-1-wangborong@cdjrlc.com drivers/irqchip/irq-gic-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8cfc90ecd33e73f4a30207b316bc6886e3c3a166 Author: Lad Prabhakar Date: Mon Jul 18 20:37:45 2022 +0100 dt-bindings: interrupt-controller: renesas,rzg2l-irqc: Document RZ/V2L SoC Document RZ/V2L (R9A07G054) IRQC bindings. The RZ/V2L IRQC block is identical to one found on the RZ/G2L SoC. No driver changes are required as generic compatible string "renesas,rzg2l-irqc" will be used as a fallback. While at it, update the comment "# RZ/G2L" to "# RZ/G2{L,LC}" for "renesas,r9a07g044-irqc" compatible string as both RZ/G2L and RZ/G2LC SoC's use the common SoC DTSI and have the same IRQC block. Signed-off-by: Lad Prabhakar Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220718193745.7472-1-prabhakar.mahadev-lad.rj@bp.renesas.com .../devicetree/bindings/interrupt-controller/renesas,rzg2l-irqc.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 41e4f15f02af67fbcd6fec243ef52627f51760b4 Author: Sungbo Eo Date: Fri Jul 23 23:12:32 2021 +0900 mtd: spi-nor: esmt: Use correct name of f25l32qa The flash ID of F25L32QA is 0x8c4016, whereas that of F25L32QA(2S) is 0x8c4116. F25L32QA(2S) is the newer version of F25L32QA and its BPn bits are non-volatile, unlike its older version. Signed-off-by: Sungbo Eo Signed-off-by: Tudor Ambarus Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20210723141232.15659-1-mans0n@gorani.run Datasheet: https://www.esmt.com.tw/upload/pdf/ESMT/datasheets/F25L32QA.pdf Datasheet: https://www.esmt.com.tw/upload/pdf/ESMT/datasheets/F25L32QA_1(2S).pdf drivers/mtd/spi-nor/esmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f567e7fada03d4c9c5f646a439ad2356371c4147 Author: John Johansen Date: Fri Mar 25 05:20:02 2022 -0700 apparmor: extend policydb permission set by making use of the xbits The policydb permission set has left the xbits unused. Make them available for mediation. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 1 + security/apparmor/include/file.h | 3 +++ security/apparmor/lib.c | 25 +++++++++++++++++++++---- security/apparmor/mount.c | 1 - 4 files changed, 25 insertions(+), 5 deletions(-) commit 0a2de5bb021609813d97ceac1cc8bdb0d1e792ba Author: Lee Jones Date: Thu Jul 14 12:25:32 2022 +0100 dt-bindings: mfd: syscon: Update Lee Jones' email address Going forward, I'll be using my kernel.org for upstream work. Cc: Arnd Bergmann Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: devicetree@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Lee Jones Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220714112533.539910-8-lee@kernel.org Documentation/devicetree/bindings/mfd/syscon.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1ed5da197652318341fd36333d45e8e6d5c3359 Author: John Johansen Date: Sat Mar 26 01:46:18 2022 -0700 apparmor: allow label to carry debug flags Allow labels to have debug flags that can be used to trigger debug output only from profiles/labels that are marked. This can help reduce debug output by allowing debug to be target to a specific confinement condition. Signed-off-by: John Johansen security/apparmor/include/label.h | 2 ++ security/apparmor/include/path.h | 4 ++-- security/apparmor/include/policy.h | 4 ++++ security/apparmor/include/policy_unpack.h | 2 ++ security/apparmor/label.c | 12 ++++++------ security/apparmor/policy_unpack.c | 4 ++++ 6 files changed, 20 insertions(+), 8 deletions(-) commit 47996d3dd3b4a9c37b0ac7980cfcf747eebab2cb Author: Lee Jones Date: Thu Jul 14 12:25:27 2022 +0100 MAINTAINERS: Use Lee Jones' kernel.org address for Syscon submissions Going forward, I'll be using my kernel.org for upstream work. Cc: Arnd Bergmann Signed-off-by: Lee Jones Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220714112533.539910-3-lee@kernel.org MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e821c4368afc02d526c4ffba1d7e8081d09cbca Author: Lee Jones Date: Thu Jul 14 12:25:26 2022 +0100 MAINTAINERS: Use Lee Jones' kernel.org address for MFD submissions Going forward, I'll be using my kernel.org for upstream work. Signed-off-by: Lee Jones Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220714112533.539910-2-lee@kernel.org MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f33bae37c96fbcafae40550e51261d17e4b39cef Author: Samuel Holland Date: Sat Jul 2 13:40:43 2022 -0500 mfd: sun6i-prcm: Update Kconfig description This driver is used by a specific range of SoCs between when the PRCM hardware was introduced (A31) and when the PRCM CCU driver was added (A83T). It is unlikely to be extended to additional hardware. Update the description to include the full list of applicable SoCs. Signed-off-by: Samuel Holland Reviewed-by: Jernej Skrabec Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220702184044.51144-1-samuel@sholland.org drivers/mfd/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0ff590a3366e72b75d37b8a51da7d92f6a04de29 Author: Andy Shevchenko Date: Wed Jun 29 01:17:47 2022 +0300 mfd: intel_soc_pmic_bxtwc: Fix spelling in the comment There are a few of spelling issues in the comment, fix them. While at it, fix indentation in the MODULE_AUTHOR() parameter and update copyright years. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220628221747.33956-11-andriy.shevchenko@linux.intel.com drivers/mfd/intel_soc_pmic_bxtwc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7c06d478500b173521fed595504fba9a51c77945 Author: Andy Shevchenko Date: Wed Jun 29 01:17:46 2022 +0300 mfd: intel_soc_pmic_bxtwc: Drop unneeded casting The casting from size_t to ssize_t is not needed in addr_store(), drop it. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220628221747.33956-10-andriy.shevchenko@linux.intel.com drivers/mfd/intel_soc_pmic_bxtwc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86da8be35c00e01b8b277896d8e81fb33bf22d06 Author: Andy Shevchenko Date: Wed Jun 29 01:17:45 2022 +0300 mfd: intel_soc_pmic_bxtwc: Use sysfs_emit() instead of sprintf() sysfs_emit() is preferred over sprintf() when formatting the value to be returned to user space in show() functions, because it knows about sysfs buffer specifics and has sanity checks. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220628221747.33956-9-andriy.shevchenko@linux.intel.com drivers/mfd/intel_soc_pmic_bxtwc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f801556a8443f38b10f87fe8dc847dacff3f1a0a Author: Andy Shevchenko Date: Wed Jun 29 01:17:44 2022 +0300 mfd: intel_soc_pmic_bxtwc: Use bits.h macros for all masks Currently we are using BIT(), but GENMASK(). Make use of the latter one as well (far less error-prone, far more concise). Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220628221747.33956-8-andriy.shevchenko@linux.intel.com drivers/mfd/intel_soc_pmic_bxtwc.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit cd58c84034234a51bdb852a862f9037b68622d45 Author: Andy Shevchenko Date: Wed Jun 29 01:17:43 2022 +0300 mfd: intel_soc_pmic_bxtwc: Drop redundant ACPI_PTR() The driver depends on ACPI (via MFD_INTEL_PMC_BXT), 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 Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220628221747.33956-7-andriy.shevchenko@linux.intel.com drivers/mfd/intel_soc_pmic_bxtwc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05879b125afd274020faf2bb8c57e9304073ac31 Author: Andy Shevchenko Date: Wed Jun 29 01:17:42 2022 +0300 mfd: intel_soc_pmic_bxtwc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Letting the compiler remove these functions when the kernel is built without CONFIG_PM_SLEEP support is simpler and less error prone than the use of #ifdef based kernel configuration guards. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220628221747.33956-6-andriy.shevchenko@linux.intel.com drivers/mfd/intel_soc_pmic_bxtwc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit ba3ea04a2557ff21e57400c90453592060f718a6 Author: Andy Shevchenko Date: Wed Jun 29 01:17:41 2022 +0300 mfd: intel_soc_pmic_bxtwc: Extend use of temporary variable for struct device Extend use of temporary variable for struct device to make code neater. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220628221747.33956-5-andriy.shevchenko@linux.intel.com drivers/mfd/intel_soc_pmic_bxtwc.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit d30e2c30a43de950cfd3690f24342a39034221c4 Author: Andy Shevchenko Date: Wed Jun 29 01:17:40 2022 +0300 mfd: intel_soc_pmic_bxtwc: Use dev_err_probe() Simplify the mux error path a bit by using dev_err_probe(). Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220628221747.33956-4-andriy.shevchenko@linux.intel.com drivers/mfd/intel_soc_pmic_bxtwc.c | 86 ++++++++++++-------------------------- 1 file changed, 26 insertions(+), 60 deletions(-) commit 2790a70c886bbb7e539f8f416438bd35346e364c Author: Andy Shevchenko Date: Wed Jun 29 01:17:39 2022 +0300 mfd: intel_soc_pmic_bxtwc: Convert to use platform_get/set_drvdata() We have the specific helpers for platform device to set and get its driver data. Convert driver to use them instead of open coded variants. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220628221747.33956-3-andriy.shevchenko@linux.intel.com drivers/mfd/intel_soc_pmic_bxtwc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 929a4d289de9d6bf74b4c7d093ccc4823c9f56e9 Author: Andy Shevchenko Date: Wed Jun 29 01:17:38 2022 +0300 mfd: intel_soc_pmic_bxtwc: Create sysfs attributes using core driver's facility Driver core takes care of sysfs attributes. Use this facility instead of doing it explicitly in ->probe() and ->remove(). Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220628221747.33956-2-andriy.shevchenko@linux.intel.com drivers/mfd/intel_soc_pmic_bxtwc.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) commit 5189952238c965cbf76309f2c29b84ff2ec70b75 Author: Andy Shevchenko Date: Wed Jun 29 01:17:37 2022 +0300 mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() kstrtox() along with regmap API can return different error codes based on circumstances. Don't shadow them when returning to the caller. While at it, remove rather confusing message from addr_store(). Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220628221747.33956-1-andriy.shevchenko@linux.intel.com drivers/mfd/intel_soc_pmic_bxtwc.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 37e8ba74d152f359e849072671ffc421b4085dbe Author: Andy Shevchenko Date: Wed Jun 29 01:30:47 2022 +0300 mfd: intel-lpss: Add Intel Meteor Lake-P PCI IDs Add Intel Meteor Lake-P LPSS PCI IDs. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220628223047.34301-1-andriy.shevchenko@linux.intel.com drivers/mfd/intel-lpss-pci.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit d9cd0bc604705eb01497c3e483f8820a9677c682 Author: AngeloGioacchino Del Regno Date: Mon Jun 27 14:39:54 2022 +0200 mfd: mt6397: Add basic support for MT6331+MT6332 PMIC Add support for the MT6331 PMIC with MT6332 Companion PMIC, found in MT6795 Helio X10 smartphone platforms. This combo has support for multiple devices but, for a start, only the following have been implemented: - Regulators (two instances, one in MT6331, one in MT6332) - RTC (MT6331) - Keys (MT6331) - Interrupts (MT6331 also dispatches MT6332's interrupts) There's more to be implemented, especially for MT6332, which will come at a later stage. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220627123954.64299-1-angelogioacchino.delregno@collabora.com drivers/mfd/mt6397-core.c | 47 +++ drivers/mfd/mt6397-irq.c | 9 +- include/linux/mfd/mt6331/core.h | 40 +++ include/linux/mfd/mt6331/registers.h | 584 +++++++++++++++++++++++++++++++ include/linux/mfd/mt6332/core.h | 65 ++++ include/linux/mfd/mt6332/registers.h | 642 +++++++++++++++++++++++++++++++++++ include/linux/mfd/mt6397/core.h | 2 + 7 files changed, 1388 insertions(+), 1 deletion(-) commit 371a9fcac47539ee7b3e5180c85eb6931177d7ab Author: Samuel Holland Date: Thu Jun 16 01:09:13 2022 -0500 mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells These PMICs all contain a compatible GPIO controller. Signed-off-by: Samuel Holland Reviewed-by: Chen-Yu Tsai Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220616060915.48325-3-samuel@sholland.org drivers/mfd/axp20x.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 79f821b5a3bf46d2d5ee2dc0e2b2428b1062a040 Author: Zhang Jiaming Date: Thu Jun 23 15:33:33 2022 +0800 mfd: ipaq-micro: Fix spelling mistake of "receive{d}" Change 'receieved' to 'received' and 'recieve' to 'receive'. Signed-off-by: Zhang Jiaming Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220623073333.5675-1-jiaming@nfschina.com include/linux/mfd/ipaq-micro.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 15ff0bbc3dc1fe71e8e329ac59b35a05adb4d007 Author: Jiang Jian Date: Tue Jun 21 18:38:39 2022 +0800 mfd: db8500-prcmu: Drop duplicated word "the" in the comments There is an unexpected word "the" in the comments that needs to be dropped. Line 801: * This function sets the the operating point of the ARM. ------- Signed-off-by: Jiang Jian Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220621103839.96847-1-jiangjian@cdjrlc.com drivers/mfd/db8500-prcmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b2c55b5403fc09a7917dc33f1652ee6451143de Author: Liu Ying Date: Sat Jun 11 22:14:20 2022 +0800 dt-bindings: mfd: Add i.MX8qm/qxp Control and Status Registers module binding This patch adds bindings for i.MX8qm/qxp Control and Status Registers module. Signed-off-by: Liu Ying Reviewed-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220611141421.718743-14-victor.liu@nxp.com .../devicetree/bindings/mfd/fsl,imx8qxp-csr.yaml | 192 +++++++++++++++++++++ 1 file changed, 192 insertions(+) commit 1074c4252fe37f5a0104e3528a0e57bd32794fff Author: Andy Shevchenko Date: Thu Jun 16 20:10:09 2022 +0300 mfd: intel_soc_pmic_chtwc: Switch from __maybe_unused to pm_sleep_ptr() etc Letting the compiler remove these functions when the kernel is built without CONFIG_PM_SLEEP support is simpler and less heavier for builds than the use of __maybe_unused attributes. Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220616171009.43524-2-andriy.shevchenko@linux.intel.com drivers/mfd/intel_soc_pmic_chtwc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 352de78076d005c7bca1e910774977b2f9a33e42 Author: Andy Shevchenko Date: Thu Jun 16 20:10:08 2022 +0300 mfd: intel_soc_pmic_chtwc: Use dev_err_probe() Simplify the mux error path a bit by using dev_err_probe(). Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220616171009.43524-1-andriy.shevchenko@linux.intel.com drivers/mfd/intel_soc_pmic_chtwc.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit c55333064d6ea9a26c7e8cfbe2ba1fa77c3a8e48 Author: Uwe Kleine-König Date: Sun Jun 19 10:26:55 2022 +0200 mfd: tc6393xb: Make disable callback return void All implementations return 0, so simplify accordingly. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Reported-by: kernel test robot Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220619082655.53728-1-u.kleine-koenig@pengutronix.de arch/arm/mach-pxa/eseries.c | 3 +-- arch/arm/mach-pxa/tosa.c | 4 +--- drivers/mfd/tc6393xb.c | 5 ++--- include/linux/mfd/tc6393xb.h | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) commit 99a7ec2f362261be1ccca702da099f39127a3388 Author: Andy Shevchenko Date: Fri Jun 17 21:23:38 2022 +0300 mfd: dln2: Automatically detect and fill endpoint pointers The usb_find_common_endpoints() finds and fills the endpoints in accordance with their types. Use it to automatically detect and fill endpoint pointers. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220617182338.32402-1-andriy.shevchenko@linux.intel.com drivers/mfd/dln2.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 7e47943c3357222b9a970002a11f49b47152661a Author: AngeloGioacchino Del Regno Date: Fri Jun 17 13:07:27 2022 +0200 dt-bindings: mfd: mt6397: Add compatibles for MT6331 RTC and keys The MT6331 PMIC provides many sub modules: regulators, audio codec, LED controller, keys, RTC and some GPIOs. It is always paired with a MT6332 Companion PMIC, which provides thermistors, WLEDs (display LED backlight), secondary AP cluster regulators, modem clocks, battery charger and fuel gauge. Add the necessary compatibles to start implementing the basics. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Reviewed-by: Matthias Brugger Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220617110728.90132-2-angelogioacchino.delregno@collabora.com Documentation/devicetree/bindings/mfd/mt6397.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 76659e203f370a0c9c5d886003fb9958a101c4be Author: Satya Priya Date: Wed Jun 22 10:40:38 2022 +0530 dt-bindings: mfd: qcom-pm8xxx: Update the maintainers section Update the maintainers section with latest mail ID. Signed-off-by: Satya Priya Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/1655874639-11273-2-git-send-email-quic_c_skakit@quicinc.com Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 915696927cd6e7838d25dab8fbd2ae05d4acce84 Author: Lee Jones Date: Tue Jun 21 09:14:02 2022 +0100 mfd: pm8008: Remove driver data structure pm8008_data Maintaining a local driver data structure that is never shared outside of the core device is an unnecessary complexity. Half of the attributes were not used outside of a single function, one of which was not used at all. The remaining 2 are generic and can be passed around as required. Signed-off-by: Lee Jones drivers/mfd/qcom-pm8008.c | 53 ++++++++++++++++++----------------------------- 1 file changed, 20 insertions(+), 33 deletions(-) commit 4a346a03a63cb45f7766d9d6559cf3fee783e926 Author: Uwe Kleine-König Date: Tue Jun 14 17:21:48 2022 +0200 mfd: twl: Remove platform data support There is no in-tree machine that provides a struct twl4030_platform_data since commit e92fc4f04a34 ("ARM: OMAP2+: Drop legacy board file for LDP"). So assume dev_get_platdata() returns NULL in twl_probe() and simplify accordingly. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220614152148.252820-1-u.kleine-koenig@pengutronix.de drivers/mfd/twl-core.c | 323 +----------------------------------------------- include/linux/mfd/twl.h | 55 --------- 2 files changed, 5 insertions(+), 373 deletions(-) commit 4907f6991ecbbbd0c18dcabaf87c6dc2537c3a9d Author: Saravanan Sekar Date: Wed Jun 15 16:53:53 2022 +0200 dt-bindings: mfd: Add mp2733 compatible Add new compatible for mp2733 mfd driver. Signed-off-by: Saravanan Sekar Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220615145357.2370044-3-sravanhome@gmail.com Documentation/devicetree/bindings/mfd/mps,mp2629.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7eeed203604f86fc53d4eb847a1c1c31525b8d6b Author: Krzysztof Kozlowski Date: Tue Jun 7 15:34:43 2022 +0200 dt-bindings: mfd: qcom,tcsr: Add qcom,tcsr-mdm9615 Document the (already used) TCSR on MDM9615. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220607133443.182468-2-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 1 + 1 file changed, 1 insertion(+) commit 7677ed11e9fa895b0d9b807b671082355b0de716 Author: Krzysztof Kozlowski Date: Tue Jun 7 15:34:42 2022 +0200 dt-bindings: mfd: qcom,tcsr: Convert to dtschema Convert the Qualcomm Top Control and Status Register to DT Schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220607133443.182468-1-krzysztof.kozlowski@linaro.org .../devicetree/bindings/mfd/qcom,tcsr.txt | 24 ----------- .../devicetree/bindings/mfd/qcom,tcsr.yaml | 49 ++++++++++++++++++++++ 2 files changed, 49 insertions(+), 24 deletions(-) commit 66ee379d743c69c726b61d078119a34d5be96a35 Author: Tinghan Shen Date: Wed Jun 1 19:22:01 2022 +0800 mfd: cros_ec: Add SCP Core-1 as a new CrOS EC MCU MT8195 System Companion Processors(SCP) is a dual-core RISC-V MCU. Add a new CrOS feature ID to represent the SCP's 2nd core. The 1st core is referred to as 'core 0', and the 2nd core is referred to as 'core 1'. Signed-off-by: Tinghan Shen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220601112201.15510-16-tinghan.shen@mediatek.com drivers/mfd/cros_ec_dev.c | 5 +++++ include/linux/platform_data/cros_ec_commands.h | 2 ++ include/linux/platform_data/cros_ec_proto.h | 1 + 3 files changed, 8 insertions(+) commit 738654be3cf7af4a0a131bd92142db045f0660dc Author: Fabien Parent Date: Tue May 31 14:49:57 2022 +0200 mfd: mt6358-irq: Add MT6357 PMIC support Add MT6357 PMIC IRQ support. Signed-off-by: Fabien Parent Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220531124959.202787-6-fparent@baylibre.com drivers/mfd/mt6358-irq.c | 24 ++++++++++++++++++++++++ include/linux/mfd/mt6397/core.h | 1 + 2 files changed, 25 insertions(+) commit de58cee8c6b803dda3304eace346919fe880a40a Author: Fabien Parent Date: Tue May 31 14:49:56 2022 +0200 mfd: mt6397-core: Add MT6357 PMIC support Adds support for PMIC keys, Regulator, and RTC for the MT6357 PMIC. Signed-off-by: Fabien Parent Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220531124959.202787-5-fparent@baylibre.com drivers/mfd/mt6397-core.c | 44 + include/linux/mfd/mt6357/core.h | 119 +++ include/linux/mfd/mt6357/registers.h | 1574 ++++++++++++++++++++++++++++++++++ 3 files changed, 1737 insertions(+) commit 52298ec34cc8498f06fdbf5d4c7b3d764496f64a Author: AngeloGioacchino Del Regno Date: Fri May 20 14:40:36 2022 +0200 dt-bindings: mfd: Add compatible for MT6331 PMIC Add a compatible for the MT6331 PMIC MFD device. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220520124039.228314-5-angelogioacchino.delregno@collabora.com Documentation/devicetree/bindings/mfd/mt6397.txt | 1 + 1 file changed, 1 insertion(+) commit 9875ab53c8aeb63ebf21bdc7195b57ac87ea30ed Author: Uwe Kleine-König Date: Thu May 19 18:28:37 2022 +0200 dt-bindings: mfd: stm32-timers: Document how to specify interrupts The timer units in the stm32mp1 CPUs have interrupts, depending on the timer flavour either one "global" or four dedicated ones. Document how to formalize these in a device tree. Signed-off-by: Uwe Kleine-König Reviewed-by: Rob Herring Reviewed-by: Fabrice Gasnier Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220519162838.695404-1-u.kleine-koenig@pengutronix.de .../devicetree/bindings/mfd/st,stm32-timers.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 1520669c8255bd637c6b248b2be910e2688d38dd Author: Miaoqian Lin Date: Wed Jun 1 08:32:22 2022 +0400 mfd: max77620: Fix refcount leak in max77620_initialise_fps of_get_child_by_name() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: 327156c59360 ("mfd: max77620: Add core driver for MAX77620/MAX20024") Signed-off-by: Miaoqian Lin Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220601043222.64441-1-linmq006@gmail.com drivers/mfd/max77620.c | 2 ++ 1 file changed, 2 insertions(+) commit 34b1a65ec1b5a8a292c9836cf36f511f2bb2f9eb Author: Lukas Bulwahn Date: Wed Jun 1 09:35:11 2022 +0200 MAINTAINERS: Fix file entry for MAX77693 DT Commit b38213c6118b ("dt-bindings: mfd: maxim,max77693: Convert to dtschema") converts max77693.txt to maxim,max77693.yaml and adjusts the file entry in MAINTAINERS accordingly. Unfortunately, the merge commit afb67df31a8c ("Merge branches [...] into ibs-for-mfd-merged") resolves some conflict in MAINTAINERS in such a way that the file entry for the converted text file max77693.txt, removed in the commit above, is added back into MAINTAINERS. Remove the file entry to this converted text file in MAXIM PMIC AND MUIC DRIVERS FOR EXYNOS BASED BOARDS. Signed-off-by: Lukas Bulwahn Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220601073511.15721-1-lukas.bulwahn@gmail.com MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 7ff7d5ffb7259f78f87cd0db59d8656799aee8c3 Author: Andy Shevchenko Date: Tue May 31 23:24:04 2022 +0300 syscon: Use %pa to format the variable of resource_size_t type Instead of explicit casting, use %pa specifier to format the variable of resource_size_t type. Signed-off-by: Andy Shevchenko Acked-by: Arnd Bergmann Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220531202404.70282-1-andriy.shevchenko@linux.intel.com drivers/mfd/syscon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6e1f1b1c93ceec1d9bfa9213775abc19161de5f1 Author: Uwe Kleine-König Date: Mon May 30 21:24:29 2022 +0200 mfd: tc6387xb: Drop disable callback that is never called The driver never calls the disable callback, so drop the member from the platform struct and all callbacks from the actual platform datas. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220530192430.2108217-4-u.kleine-koenig@pengutronix.de arch/arm/mach-pxa/eseries.c | 1 - include/linux/mfd/tc6387xb.h | 1 - 2 files changed, 2 deletions(-) commit 128ac294e1b437cb8a7f2ff8ede1cde9082bddbe Author: Uwe Kleine-König Date: Mon May 30 21:24:28 2022 +0200 mfd: t7l66xb: Drop platform disable callback None of the in-tree instantiations of struct t7l66xb_platform_data provides a disable callback. So better don't dereference this function pointer unconditionally. As there is no user, drop it completely instead of calling it conditional. This is a preparation for making platform remove callbacks return void. Fixes: 1f192015ca5b ("mfd: driver for the T7L66XB TMIO SoC") Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220530192430.2108217-3-u.kleine-koenig@pengutronix.de drivers/mfd/t7l66xb.c | 6 +----- include/linux/mfd/t7l66xb.h | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) commit 2598f6ec5471f127092dfbb161fcb2db1e6d7807 Author: Uwe Kleine-König Date: Mon May 30 21:24:27 2022 +0200 mfd: asic3: Make asic3_gpio_remove() return void Up to now asic3_gpio_remove() returns zero unconditionally. This makes it easier to see in the caller that there is no error to handle. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220530192430.2108217-2-u.kleine-koenig@pengutronix.de drivers/mfd/asic3.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 2cc285008af3183c7d492f5e07b4fab849065e31 Author: Andy Shevchenko Date: Mon May 30 15:00:15 2022 +0300 MAINTAINERS: Update Intel PMIC (MFD part) to Supported The actual status of the code is Supported. Reported-by: Dave Hansen Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220530120015.70543-1-andriy.shevchenko@linux.intel.com MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e26292d11903405501a735f6ac2596cc20e39ae Author: Rahul T R Date: Mon May 30 15:40:29 2022 +0530 dt-bindings: mfd: ti,j721e-system-controller: Add clock property Add a pattern property for clock-controller, also update the example with a clock-controller node Signed-off-by: Rahul T R Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220530101031.11357-2-r-ravikumar@ti.com .../devicetree/bindings/mfd/ti,j721e-system-controller.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 361104b05684caa3491b41cd6734474ecf4b80c2 Author: Conor Dooley Date: Mon Jun 6 21:13:43 2022 +0100 dt-bindings: mfd: Convert da9063 to yaml Convert the dt binding for the da9063/da9063l to yaml. Signed-off-by: Conor Dooley Reviewed-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220606201343.514391-4-mail@conchuod.ie Documentation/devicetree/bindings/mfd/da9063.txt | 114 ------------------ .../devicetree/bindings/mfd/dlg,da9063.yaml | 132 +++++++++++++++++++++ .../devicetree/bindings/trivial-devices.yaml | 2 - MAINTAINERS | 1 + 4 files changed, 133 insertions(+), 116 deletions(-) commit 62fa5c9800a0b9aecf9ce0743f12a16057c9400d Author: Luca Ceresoli Date: Fri Jun 3 17:57:25 2022 +0200 mfd: max77714: Update Luca Ceresoli's e-mail address My Bootlin address is preferred from now on. Signed-off-by: Luca Ceresoli Signed-off-by: Luca Ceresoli Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220603155727.1232061-4-luca@lucaceresoli.net drivers/mfd/max77714.c | 4 ++-- include/linux/mfd/max77714.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit c1cd6c305ecdfe1f352fc24eaa7793674505fd84 Merge: 0c9b9c2ac0df a6c80bec3c93 9e95c67efa8a Author: Lee Jones Date: Tue Jul 19 10:53:48 2022 +0100 Merge branches 'ib-mfd-acpi-for-rafael-5.20', 'ib-mfd-edac-i2c-leds-pinctrl-platform-watchdog-5.20' and 'ib-mfd-soc-bcm-5.20' into ibs-for-mfd-merged commit 2504db207146543736e877241f3b3de005cbe056 Author: John Johansen Date: Sat Mar 26 01:58:15 2022 -0700 apparmor: fix overlapping attachment computation When finding the profile via patterned attachments, the longest left match is being set to the static compile time value and not using the runtime computed value. Fix this by setting the candidate value to the greater of the precomputed value or runtime computed value. Fixes: 21f606610502 ("apparmor: improve overlapping domain attachment resolution") Signed-off-by: John Johansen security/apparmor/domain.c | 2 +- security/apparmor/include/policy.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f2ac0a8f8a0366fdb77a46d07f32be406aa9fcb4 Author: Maíra Canal Date: Thu Jul 14 18:53:34 2022 -0300 backlight: lp855x: Switch to atomic PWM API Remove legacy PWM interface (pwm_config, pwm_enable, pwm_disable) and replace it for the atomic PWM API. Signed-off-by: Maíra Canal Reviewed-by: Uwe Kleine-König Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220714215334.78226-1-mairacanal@riseup.net drivers/video/backlight/lp855x_bl.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 2654f59b53bf32b9bc272c364737804cd0a91770 Author: Lee Jones Date: Thu Jul 14 12:25:31 2022 +0100 dt-bindings: backlight: Update Lee Jones' email address Going forward, I'll be using my kernel.org for upstream work. Signed-off-by: Lee Jones Signed-off-by: Lee Jones Acked-by: Pavel Machek Acked-by: Daniel Thompson Link: https://lore.kernel.org/r/20220714112533.539910-7-lee@kernel.org Documentation/devicetree/bindings/leds/backlight/common.yaml | 2 +- Documentation/devicetree/bindings/leds/backlight/gpio-backlight.yaml | 2 +- Documentation/devicetree/bindings/leds/backlight/led-backlight.yaml | 2 +- Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml | 2 +- Documentation/devicetree/bindings/leds/backlight/pwm-backlight.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 3bbb7b2e9bbcd22e539e23034da753898fe3b4dc Author: John Johansen Date: Sat Mar 26 01:52:06 2022 -0700 apparmor: fix setting unconfined mode on a loaded profile When loading a profile that is set to unconfined mode, that label flag is not set when it should be. Ensure it is set so that when used in a label the unconfined check will be applied correctly. Fixes: 038165070aa5 ("apparmor: allow setting any profile into the unconfined state") Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit f378973698657404f059687025e1e35f229b124c Author: Yang Li Date: Mon Jul 18 14:30:22 2022 +0800 apparmor: Fix some kernel-doc comments Remove warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'. security/apparmor/policy_ns.c:65: warning: Function parameter or member 'curr' not described in 'aa_ns_name' security/apparmor/policy_ns.c:65: warning: Function parameter or member 'view' not described in 'aa_ns_name' security/apparmor/policy_ns.c:65: warning: Function parameter or member 'subns' not described in 'aa_ns_name' security/apparmor/policy_ns.c:65: warning: expecting prototype for aa_na_name(). Prototype was for aa_ns_name() instead security/apparmor/policy_ns.c:214: warning: Function parameter or member 'view' not described in '__aa_lookupn_ns' security/apparmor/policy_ns.c:214: warning: Excess function parameter 'base' description in '__aa_lookupn_ns' security/apparmor/policy_ns.c:297: warning: expecting prototype for aa_create_ns(). Prototype was for __aa_find_or_create_ns() instead Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: John Johansen security/apparmor/policy_ns.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a3f215ef088f1fc3e751dc9a5fa4c1a22f16212b Author: Souptick Joarder (HPE) Date: Tue Jul 19 07:42:18 2022 +0530 apparmor: Mark alloc_unconfined() as static Kernel test robot throws below warning -> security/apparmor/policy_ns.c:83:20: warning: no previous prototype for function 'alloc_unconfined' [-Wmissing-prototypes] Mark it as static. Reported-by: kernel test robot Signed-off-by: Souptick Joarder (HPE) Signed-off-by: John Johansen security/apparmor/policy_ns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4371c56397340134c1827ab70dbf817dbb1b99b Author: Thomas Bogendoerfer Date: Fri Jul 15 16:19:59 2022 +0200 gpio: remove VR41XX related gpio driver Commit d3164e2f3b0a ("MIPS: Remove VR41xx support") removed support for MIPS VR41xx platform, so remove exclusive drivers for this platform, too. Signed-off-by: Thomas Bogendoerfer Acked-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski drivers/gpio/Kconfig | 6 - drivers/gpio/Makefile | 1 - drivers/gpio/gpio-vr41xx.c | 541 --------------------------------------------- 3 files changed, 548 deletions(-) commit 90c517f435a9e469cceb7b1985ba92011c2e26aa Author: Mika Westerberg Date: Fri May 6 13:51:58 2022 +0300 mtd: spi-nor: micron-st: Skip FSR reading if SPI controller does not support it The Intel SPI controller does not support low level operations, like reading the flag status register (FSR). It only exposes a set of high level operations for software to use. For this reason check the return value of micron_st_nor_read_fsr() and if the operation was not supported, use the status register value only. This allows the chip to work even when attached to Intel SPI controller (there are such systems out there). Signed-off-by: Mika Westerberg Signed-off-by: Tudor Ambarus Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20220506105158.43613-1-mika.westerberg@linux.intel.com drivers/mtd/spi-nor/micron-st.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 0568e6122574dcc1aded2979cd0245038efe22b6 Author: John Garry Date: Thu Jul 14 19:15:29 2022 +0800 ata: libata-scsi: cap ata_device->max_sectors according to shost->max_sectors ATA devices (struct ata_device) have a max_sectors field which is configured internally in libata. This is then used to (re)configure the associated sdev request queue max_sectors value from how it is earlier set in __scsi_init_queue(). In __scsi_init_queue() the max_sectors value is set according to shost limits, which includes host DMA mapping limits. Cap the ata_device max_sectors according to shost->max_sectors to respect this shost limit. Signed-off-by: John Garry Acked-by: Damien Le Moal Acked-by: Martin K. Petersen Signed-off-by: Christoph Hellwig drivers/ata/libata-scsi.c | 1 + 1 file changed, 1 insertion(+) commit 4cbfca5f7750520ff993a0d6eb79cc4a6f6cee97 Author: John Garry Date: Thu Jul 14 19:15:28 2022 +0800 scsi: scsi_transport_sas: cap shost opt_sectors according to DMA optimal limit Streaming DMA mappings may be considerably slower when mappings go through an IOMMU and the total mapping length is somewhat long. This is because the IOMMU IOVA code allocates and free an IOVA for each mapping, which may affect performance. For performance reasons set the request queue max_sectors from dma_opt_mapping_size(), which knows this mapping limit. Signed-off-by: John Garry Reviewed-by: Damien Le Moal Signed-off-by: Christoph Hellwig drivers/scsi/scsi_transport_sas.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 608128d391fa5c95d515d2c198f40239016e1fcd Author: John Garry Date: Thu Jul 14 19:15:27 2022 +0800 scsi: sd: allow max_sectors be capped at DMA optimal size limit Streaming DMA mappings may be considerably slower when mappings go through an IOMMU and the total mapping length is somewhat long. This is because the IOMMU IOVA code allocates and free an IOVA for each mapping, which may affect performance. New member Scsi_Host.opt_sectors is added, which is the optimal host max_sectors, and use this value to cap the request queue max_sectors when set. It could be considered to have request queues io_opt value initially set at Scsi_Host.opt_sectors in __scsi_init_queue(), but that is not really the purpose of io_opt. Finally, even though Scsi_Host.opt_sectors value should never be greater than the request queue max_hw_sectors value, continue to limit to this value for safety. Signed-off-by: John Garry Reviewed-by: Damien Le Moal Acked-by: Martin K. Petersen Signed-off-by: Christoph Hellwig drivers/scsi/sd.c | 2 ++ include/scsi/scsi_host.h | 1 + 2 files changed, 3 insertions(+) commit 06674fc7c003b9d0aa1d37fef7ab2c24802cc6ad Author: Zheyu Ma Date: Sun Jul 17 08:42:41 2022 +0800 iio: light: isl29028: Fix the warning in isl29028_remove() The driver use the non-managed form of the register function in isl29028_remove(). To keep the release order as mirroring the ordering in probe, the driver should use non-managed form in probe, too. The following log reveals it: [ 32.374955] isl29028 0-0010: remove [ 32.376861] general protection fault, probably for non-canonical address 0xdffffc0000000006: 0000 [#1] PREEMPT SMP KASAN PTI [ 32.377676] KASAN: null-ptr-deref in range [0x0000000000000030-0x0000000000000037] [ 32.379432] RIP: 0010:kernfs_find_and_get_ns+0x28/0xe0 [ 32.385461] Call Trace: [ 32.385807] sysfs_unmerge_group+0x59/0x110 [ 32.386110] dpm_sysfs_remove+0x58/0xc0 [ 32.386391] device_del+0x296/0xe50 [ 32.386959] cdev_device_del+0x1d/0xd0 [ 32.387231] devm_iio_device_unreg+0x27/0xb0 [ 32.387542] devres_release_group+0x319/0x3d0 [ 32.388162] i2c_device_remove+0x93/0x1f0 Fixes: 2db5054ac28d ("staging: iio: isl29028: add runtime power management support") Signed-off-by: Zheyu Ma Link: https://lore.kernel.org/r/20220717004241.2281028-1-zheyuma97@gmail.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/light/isl29028.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3cfb0e1d395a4323f325baaff58b8fe4a8ff9ecd Author: LI Qingwu Date: Fri Jul 1 02:30:30 2022 +0000 iio: accel: sca3300: Extend the trigger buffer from 16 to 32 bytes After added inclination angle channels, the trigger buffer size is insufficient. Extend the buffer size from 16 to 32 bytes, and change the trigger buffer from the struct to a u8 array to adapt the sensor with/without inclination angles output. New trigger buffer data: - SCA3300: 3 accel channels, temp, and timestamp. - SCL3300: 3 accel channels, temp, 3 incli channels, and timestamp. Readjustment the scan index to make it consistent with the buffer data. Signed-off-by: LI Qingwu Link: https://lore.kernel.org/r/20220701023030.2527019-2-Qing-wu.Li@leica-geosystems.com.cn Signed-off-by: Jonathan Cameron drivers/iio/accel/sca3300.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit 5e1f91850365de55ca74945866c002fda8f00331 Author: Fawzi Khaber Date: Mon Jul 18 15:07:06 2022 +0200 iio: fix iio_format_avail_range() printing for none IIO_VAL_INT iio_format_avail_range() should print range as follow [min, step, max], so the function was previously calling iio_format_list() with length = 3, length variable refers to the array size of values not the number of elements. In case of non IIO_VAL_INT values each element has integer part and decimal part. With length = 3 this would cause premature end of loop and result in printing only one element. Signed-off-by: Fawzi Khaber Signed-off-by: Jean-Baptiste Maneyrol Fixes: eda20ba1e25e ("iio: core: Consolidate iio_format_avail_{list,range}()") Link: https://lore.kernel.org/r/20220718130706.32571-1-jmaneyrol@invensense.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/industrialio-core.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 68691bad98eeb29342c3c4ac4abc90f9edef79bb Author: Xiao Yang Date: Fri Jul 8 03:55:50 2022 +0000 RDMA/rxe: Remove unused qp parameter The qp parameter in free_rd_atomic_resource() has become unused so remove it directly. Fixes: 15ae1375ea91 ("RDMA/rxe: Fix qp reference counting for atomic ops") Link: https://lore.kernel.org/all/20220708035547.6592-1-yangx.jy@fujitsu.com/ Signed-off-by: Xiao Yang Signed-off-by: Leon Romanovsky drivers/infiniband/sw/rxe/rxe_loc.h | 2 +- drivers/infiniband/sw/rxe/rxe_qp.c | 6 +++--- drivers/infiniband/sw/rxe/rxe_resp.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 06ee60eb507f00fb3643876ec05318c63332dc88 Author: Dan Carpenter Date: Thu Jul 7 17:54:45 2022 +0300 iio: adc: max1027: unlock on error path in max1027_read_single_value() If max1027_wait_eoc() fails then call iio_device_release_direct_mode() before returning. Fixes: a0e831653ef9 ("iio: adc: max1027: Introduce an end of conversion helper") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YsbztVuAXnau2cIZ@kili Signed-off-by: Jonathan Cameron drivers/iio/adc/max1027.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d042656a2170ce1b0d1a72d81a99bc93f0170358 Author: Nuno Sá Date: Wed Jul 13 15:14:21 2022 +0200 dt-bindings: gpio: add pull-disable flag This extends the flags that can be used in GPIO specifiers to indicate that no bias is intended in the pin. Signed-off-by: Nuno Sá Reviewed-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Bartosz Golaszewski include/dt-bindings/gpio/gpio.h | 3 +++ 1 file changed, 3 insertions(+) commit 6fd03f0248281b690e168a5a5c22cb3c98b96326 Author: Nuno Sá Date: Wed Jul 13 15:14:20 2022 +0200 gpiolib: acpi: support bias pull disable On top of looking at PULL_UP and PULL_DOWN flags, also look at PULL_DISABLE and set the appropriate GPIO flag. The GPIO core will then pass down this to controllers that support it. Signed-off-by: Nuno Sá Acked-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-acpi.c | 3 +++ 1 file changed, 3 insertions(+) commit 31bea23119cda87088c6bd4085a1e442c6c5974c Author: Nuno Sá Date: Wed Jul 13 15:14:19 2022 +0200 gpiolib: of: support bias pull disable On top of looking at PULL_UP and PULL_DOWN flags, also look at PULL_DISABLE and set the appropriate GPIO flag. The GPIO core will then pass down this to controllers that support it. Signed-off-by: Nuno Sá Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 7 +++++++ include/linux/of_gpio.h | 1 + 2 files changed, 8 insertions(+) commit c269df8c5ad316eac47a9078e7a2339e1956637a Author: Nuno Sá Date: Wed Jul 13 15:14:18 2022 +0200 gpiolib: add support for bias pull disable This change prepares the gpio core to look at firmware flags and set 'FLAG_BIAS_DISABLE' if necessary. It works in similar way to 'GPIO_PULL_DOWN' and 'GPIO_PULL_UP'. Signed-off-by: Nuno Sá Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib.c | 8 ++++++-- include/linux/gpio/machine.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) commit 28ba057456412794198ba6c953aa2042147c2de5 Author: Andy Shevchenko Date: Tue Jul 19 01:02:52 2022 +0300 gpio: 74xx-mmio: use bits.h macros for all masks Make use of the GENMASK() (far less error-prone, far more concise). Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-74xx-mmio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d3054ba1db6270e14245efa28dbd1cf10207d4f2 Author: Andy Shevchenko Date: Tue Jul 19 01:02:51 2022 +0300 gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in() It's logically better to check the IN in ->direction_input() and _OUT in ->direction_output(). While at it, replace ternary with plain if-conditional for the sake of consistency with mmio_74xx_dir_out(). Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-74xx-mmio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 10fcd2f180bcbfb3392fcc98670baff81c61bcf2 Author: Andy Shevchenko Date: Tue Jul 19 01:02:50 2022 +0300 gpio: 74xx-mmio: Make use of device properties Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Add mod_devicetable.h include. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-74xx-mmio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b3be1e57f2631e7383d4bb837ca78ff41ecc55c9 Author: Jason Wang Date: Fri Jul 15 13:40:07 2022 +0800 IB/qib: Fix comment typo The double `are' is duplicated in line 156, remove one. Link: https://lore.kernel.org/r/20220715054007.5320-1-wangborong@cdjrlc.com Signed-off-by: Jason Wang Signed-off-by: Leon Romanovsky drivers/infiniband/hw/qib/qib_file_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 272ddba004731503cb6c30f2336dd501eaf25955 Author: Kent Gibson Date: Thu Jul 14 10:03:19 2022 +0800 gpiolib: cdev: compile out HTE unless CONFIG_HTE selected The majority of builds do not include HTE, so compile out hte functionality unless CONFIG_HTE is selected. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-cdev.c | 98 +++++++++++++++++++++++++++++---------------- 1 file changed, 63 insertions(+), 35 deletions(-) commit b1a92e94560def63b71057d770e9db2f798ab58c Author: Kent Gibson Date: Thu Jul 14 10:03:18 2022 +0800 gpiolib: cdev: consolidate edge detector configuration flags Combine the polarity_change flag, struct line eflags, and hte enable flag into a single flag variable. The combination of these flags describes the configuration state of the edge detector, so formalize and clarify that by combining them into a single variable, edflags, in struct line. The edflags is a subset of the GPIO_V2_LINE_FLAGsb relevant to the edge detector, and is also a superset of the eflags it replaces. The eflags name is still used to describe the subset of edflags corresponding to the rising/falling edge flags where edflags is masked down to that subset. This consolidation reduces the number of variables being passed, simplifies state comparisons, and provides a more extensible foundation should additional edge sources be integrated in the future. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-cdev.c | 126 +++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 66 deletions(-) commit 242202329f0d851f64901111217ca4d52795a4b6 Author: Kent Gibson Date: Thu Jul 14 10:03:17 2022 +0800 gpiolib: cdev: simplify line event identification Reorganise line event identification code to reduce code duplication, and replace if-else initializers with a helper function to improve readability. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij drivers/gpio/gpiolib-cdev.c | 44 +++++++++++++++----------------------------- 1 file changed, 15 insertions(+), 29 deletions(-) commit cfa53463ac62d30e4f30ec6e171b9228689d5a83 Author: Kent Gibson Date: Thu Jul 14 10:03:16 2022 +0800 gpiolib: cdev: replace if-else chains with switches Improve readability by replacing if-else chains with switch statements. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-cdev.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit 2487a812236cdeecd0729cfc673fa352db44da5d Author: Kent Gibson Date: Thu Jul 14 10:03:15 2022 +0800 gpiolib: cdev: simplify parameter in call to hte_edge_setup Improve readability by using the GPIO_V2_LINE_FLAG_EDGE_BOTH instead of combining the rising and falling edge flags. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Acked-by: Dipen Patel Tested-by: Dipen Patel Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-cdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 160d6e402900672d4b0689a7c939be487460a1fe Author: Kent Gibson Date: Thu Jul 14 10:03:14 2022 +0800 gpiolib: cdev: simplify linereq_free The edge detector is only ever started after the line desc has been determined, so move edge_detector_stop() inside the line desc check, and merge the two checked regions into one. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Acked-by: Dipen Patel Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-cdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3e2d53b2734bea05dba4f8fa94332ad6dd343712 Author: Aakash Sen Sharma Date: Mon Jul 11 19:47:53 2022 +0530 gpio: 104-idi-48: unsigned to unsigned int cleanup Remove checkpatch warnings. No functional changes. Signed-off-by: Aakash Sen Sharma Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-104-idi-48.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit b06d7b458a6eace1cebd0c1e4a235407824125e8 Author: Geert Uytterhoeven Date: Mon Jul 11 10:36:35 2022 +0200 gpio: GPIO_SAMA5D2_PIOBU should depend on ARCH_AT91 The SAMA5D2 PIOBU is only present on some AT91/Microchip SoCs. Hence add a dependency on ARCH_AT91, to prevent asking the user about this driver when configuring a kernel without AT91/Microchip SoC support. Signed-off-by: Geert Uytterhoeven Acked-by: Nicolas Ferre Signed-off-by: Bartosz Golaszewski drivers/gpio/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5d07a692f9562f9c06e62cce369e9dd108173a0f Author: Liang He Date: Mon Jul 11 20:52:38 2022 +0800 gpio: gpiolib-of: Fix refcount bugs in of_mm_gpiochip_add_data() We should use of_node_get() when a new reference of device_node is created. It is noted that the old reference stored in 'mm_gc->gc.of_node' should also be decreased. This patch is based on the fact that there is a call site in function 'qe_add_gpiochips()' of src file 'drivers\soc\fsl\qe\gpio.c'. In this function, of_mm_gpiochip_add_data() is contained in an iteration of for_each_compatible_node() which will automatically increase and decrease the refcount. So we need additional of_node_get() for the reference escape in of_mm_gpiochip_add_data(). Fixes: a19e3da5bc5f ("of/gpio: Kill of_gpio_chip and add members directly to gpio_chip") Signed-off-by: Liang He Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6b7e8c796de0a0f1089c818097b9cd65817a2834 Author: Aparna M Date: Fri Jul 8 21:28:19 2022 +0530 dt-bindings: gpio: Convert TI TPIC2810 GPIO Controller bindings to YAML Convert gpio-tpic2810 bindings to yaml format and remove outdated bindings in .txt format. Signed-off-by: Aparna M Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Vignesh Raghavendra Signed-off-by: Bartosz Golaszewski .../devicetree/bindings/gpio/gpio-tpic2810.txt | 16 ------- .../devicetree/bindings/gpio/gpio-tpic2810.yaml | 51 ++++++++++++++++++++++ 2 files changed, 51 insertions(+), 16 deletions(-) commit 13e024b66ca1f72b383f141b43cfa4e1140cedd1 Author: Shinyzenith Date: Mon Jul 11 10:59:35 2022 +0530 gpio: lp3943: unsigned to unsigned int cleanup Getting rid of checkpatch findings. No functional changes. Signed-off-by: Shinyzenith Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-lp3943.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 90ce2f01e7c23bcec3f9145377c7ae2f8f525eb8 Merge: 597a8a888d34 b65bb2c14891 Author: Bartosz Golaszewski Date: Tue Jul 19 09:57:25 2022 +0200 Merge tag 'intel-gpio-v5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into TEST_MERGE intel-gpio for v5.20-1 * Clean up the GPIO driver of Intel EG20 PCH The following is an automated git shortlog grouped by driver: pch: - Change PCI device macros - Use dev_err_probe() commit 597a8a888d349c3804e92ef087646bd9a89fe53d Author: Andy Shevchenko Date: Wed Jun 29 14:30:58 2022 +0300 gpiolib: of: Use device_match_of_node() helper Instead of open coding, use device_match_of_node() helper. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6169d76c56b30e57fcb080206edd5324d9cea296 Author: Andy Shevchenko Date: Tue Jun 28 22:39:05 2022 +0300 gpio: adp5588: sort header inclusion alphabetically Sort header inclusion alphabetically. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-adp5588.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 669f5618feb8b4847f3a64d541cfae22e999a91a Author: Andy Shevchenko Date: Tue Jun 28 22:39:04 2022 +0300 gpio: adp5588: Do not use defined value for driver name and compatible It's wrong to use defined string literal for three semantically different cases, i.e.: 1) compatible string, which is part of ABI and has to have specific format; 2) I2C ID, which is user space visible and also ABI; 3) driver name, that can be changed. Drop the define and use appropriate string literals in place. While at it, drop comma at terminator entry of OF ID table. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-adp5588.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 4a40ccccb660d9e62fe9f4a157be8d3c3a5ca013 Author: Andy Shevchenko Date: Tue Jun 28 22:39:03 2022 +0300 gpio: adp5588: Switch from of headers to mod_devicetable.h There is nothing directly using of specific interfaces in this driver, so lets not include the headers. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-adp5588.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit cc165ba48aaf7d792e99d0c7e4b12e9625bc73e3 Author: Jianqun Xu Date: Thu Jun 23 18:08:01 2022 +0200 gpio: rockchip: add support for rk3588 Add V2.1 rockchip gpio controller type, which is part of the RK3588 SoC. Signed-off-by: Jianqun Xu Reviewed-by: Linus Walleij Signed-off-by: Sebastian Reichel Reviewed-by: Heiko Stuebner drivers/gpio/gpio-rockchip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 036e9cf35689b9f6a0d1bb8d34ec7ddf44714942 Author: Sebastian Reichel Date: Thu Jun 23 18:08:00 2022 +0200 dt-bindings: gpio: rockchip: add gpio-ranges Allow usage of gpio-ranges with the rockchip gpio controller. The driver already had support for this since it has been added to the mainline kernel in the first place. Acked-by: Rob Herring Signed-off-by: Sebastian Reichel Reviewed-by: Heiko Stuebner Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 8773bacefcd7a5c742437974771976a9e79288f7 Author: Andy Shevchenko Date: Tue Jun 28 22:59:13 2022 +0300 gpio: adnp: Make use of device properties Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-adnp.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit a2a15e1263ab1c17f798eab1290180ffa4011223 Author: Andy Shevchenko Date: Tue Jun 28 22:59:12 2022 +0300 gpio: adnp: use simple i2c probe function The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-adnp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d274f02eb98be8ec1d13bb9d16493eb1711a3d37 Author: Lucas Stach Date: Wed Jun 29 19:04:20 2022 +0200 gpio: pca9570: add pca9571 support The PCA9571 very similar to the PCA9570, it only differs in the number of GPIOs. Signed-off-by: Lucas Stach Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-pca9570.c | 2 ++ 1 file changed, 2 insertions(+) commit 91e9111bdd088993948f8c215a8a01acc67a7a86 Author: Lucas Stach Date: Wed Jun 29 19:04:19 2022 +0200 gpio: pca9570: Add DT bindings for NXP PCA9571 This patch adds device tree bindings for the NXP PCA9571, a 8-bit I2C GPIO expander. Signed-off-by: Lucas Stach Acked-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml | 1 + 1 file changed, 1 insertion(+) commit 3d57fa2a228c973032e94aceeef92a3e9704b9ea Author: Uwe Kleine-König Date: Wed Jun 15 14:47:18 2022 +0200 gpio: xgs-iproc: Drop if with an always false condition The remove callback is only called after probe completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so chip is never NULL. Also note that returning an error code from a remove callback doesn't result in the device staying bound. It's still removed and devm callbacks are called. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-xgs-iproc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 1923433cd660fda6315b8eb1bb8372cf7e85acf7 Author: Uwe Kleine-König Date: Tue Jun 21 08:35:24 2022 +0200 gpio: brcmstb: Make .remove() obviously always return 0 priv cannot be NULL because brcmstb_gpio_probe() calls platform_set_drvdata() with a non-NULL argument, so the check for !priv can be dropped. Also remove the variable ret that is only used to hide a bit that in the end zero is returned. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-brcmstb.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 7e55b33d3f18fde5c7a57b6c52d80499485c737f Author: Uwe Kleine-König Date: Tue Jun 14 21:48:02 2022 +0200 gpio: ucb1400: Remove platform setup and teardown support There is no user of these callbacks. The motivation for this change is to stop returning an error code from the remove callback. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-ucb1400.c | 20 -------------------- drivers/mfd/ucb1400_core.c | 6 ++---- include/linux/ucb1400.h | 2 -- 3 files changed, 2 insertions(+), 26 deletions(-) commit 421e3c16c32ad37b7124ae663d61e50546a57f68 Author: Uwe Kleine-König Date: Tue Jun 14 17:23:39 2022 +0200 gpio: twl4030: Don't return an error after WARN in .remove Returning a non-zero value in a platform driver's remove callback only results in an error message ("remove callback returned a non-zero value. This will be ignored.", see platform_remove()), and then the device is removed anyhow. As there was just a WARN_ON triggered, return 0 to drop the follow up warning. The latter output is hardly relevant after the big WARN splat. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-twl4030.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 2a1192ff0835cb4b0ccd6f6e85c93aa0dc6f66b7 Author: Uwe Kleine-König Date: Tue Jun 14 17:23:38 2022 +0200 gpio: twl4030: Drop platform teardown callback There is no machine providing a teardown callback, so drop the unused code. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-twl4030.c | 11 ----------- include/linux/mfd/twl.h | 2 -- 2 files changed, 13 deletions(-) commit 31212be403585d118ec6c97c3abbf36e88439b30 Author: Geert Uytterhoeven Date: Fri Jun 10 12:08:22 2022 +0200 dt-bindings: gpio: renesas,rcar-gpio: R-Car V3U is R-Car Gen4 Despite the name, R-Car V3U is the first member of the R-Car Gen4 family. Hence move its compatible value to the R-Car Gen4 section. Signed-off-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski Reviewed-by: Wolfram Sang Signed-off-by: Bartosz Golaszewski Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0651a730924b172476f67c7c6e01e898f84cd8f3 Author: Devarsh Thakkar Date: Mon Jun 13 11:13:10 2022 +0530 gpio: davinci: Add support for system suspend/resume PM Add support for system suspend/resume PM hooks, save the register context of all the required gpio registers on suspend and restore context on the resume. Signed-off-by: Devarsh Thakkar Signed-off-by: Aswath Govindraju Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-davinci.c | 83 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit df08a6fc0d5d7dd579dd0902893a433765d9f4c5 Author: Chris Packham Date: Thu May 26 13:29:46 2022 +1200 dt-bindings: gpio: gpio-mvebu: document offset and marvell,pwm-offset The offset and marvell,pwm-offset properties weren't in the old binding. Add them based on the existing usage in the driver and board DTS when the marvell,armada-8k-gpio compatible is used. Signed-off-by: Chris Packham Reviewed-by: Krzysztof Kozlowski Acked-by: Uwe Kleine-König Acked-by: Thierry Reding Signed-off-by: Bartosz Golaszewski Documentation/devicetree/bindings/gpio/gpio-mvebu.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) commit 988c8c0cd04de81c7cde5b0a55cabf0c67136340 Author: Chris Packham Date: Thu May 26 13:29:45 2022 +1200 dt-bindings: gpio: gpio-mvebu: deprecate armadaxp-gpio Commit 5f79c651e81e ("arm: mvebu: use global interrupts for GPIOs on Armada XP") the marvell,armadaxp-gpio compatible obsolete. The driver code still exists to handle the armadaxp behaviour but all the in-tree boards use the marvell,armada-370-gpio. Document the marvell,armadaxp-gpio compatible as deprecated. Signed-off-by: Chris Packham Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski .../devicetree/bindings/gpio/gpio-mvebu.yaml | 24 ++++++++-------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit 1282157a6cf48993d90347fdc5bcb93e00b58f2b Author: Chris Packham Date: Thu May 26 13:29:44 2022 +1200 dt-bindings: gpio: gpio-mvebu: convert txt binding to DT schema format Convert the existing device tree binding to DT schema format. The old binding listed the interrupt-controller and related properties as required but there are sufficiently many existing usages without it that the YAML binding does not make the interrupt properties required. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski .../arm/marvell/ap80x-system-controller.txt | 2 +- .../arm/marvell/cp110-system-controller.txt | 2 +- .../devicetree/bindings/gpio/gpio-mvebu.txt | 93 ------------- .../devicetree/bindings/gpio/gpio-mvebu.yaml | 146 +++++++++++++++++++++ MAINTAINERS | 2 +- 5 files changed, 149 insertions(+), 96 deletions(-) commit 2b038e786f8338a3bc22d791000753e0ec113e00 Author: Andy Shevchenko Date: Wed Jun 22 20:28:42 2022 +0300 gpiolib: devres: Get rid of unused devm_gpio_free() The last user, which in fact was a dead code, has gone a year ago, previous one 3 years ago. On top of that we want to drop away the legacy GPIO APIs in the kernel, so take a chance to get rid of unused devm_gpio_free() and accompanying stuff. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski Documentation/driver-api/driver-model/devres.rst | 1 - drivers/gpio/gpiolib-devres.c | 32 ------------------------ include/linux/gpio.h | 6 ----- 3 files changed, 39 deletions(-) commit 3c6aca3333629f98e2ce1fa83000b619dd6f6b2d Author: Maksym Glubokiy Date: Thu Jul 14 11:35:41 2022 +0300 net: prestera: acl: add support for 'police' action on egress Propagate ingress/egress direction for 'police' action down to hardware. Co-developed-by: Volodymyr Mytnyk Signed-off-by: Volodymyr Mytnyk Signed-off-by: Maksym Glubokiy Link: https://lore.kernel.org/r/20220714083541.1973919-1-maksym.glubokiy@plvision.eu Signed-off-by: Paolo Abeni drivers/net/ethernet/marvell/prestera/prestera_flower.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92714596cdbe2ec1da739b674716633076916336 Author: Pratyush Yadav Date: Mon Jul 18 20:42:43 2022 +0530 MAINTAINERS: Use my kernel.org email Use the kernel.org email I have for reviewing patches. Signed-off-by: Pratyush Yadav Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20220718151243.1149442-1-p.yadav@ti.com MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3466ea2cd6b66e4647a9af2381c0d0cd3d579354 Author: Liang He Date: Mon Jul 18 21:36:32 2022 +0800 OPP: Don't drop opp->np reference while it is still in use The struct dev_pm_opp contains a reference of the DT node, opp->np, throughout its lifetime. We should increase the refcount for the same from _opp_add_static_v2(), and drop it while removing the OPP finally. Signed-off-by: Liang He [ Viresh: Updated subject / commit log, create _of_clear_opp() and drop reference from it] Signed-off-by: Viresh Kumar drivers/opp/core.c | 2 +- drivers/opp/of.c | 12 +++++++++--- drivers/opp/opp.h | 6 ++---- 3 files changed, 12 insertions(+), 8 deletions(-) commit aa2a1df3a2c85f855af7d54466ac10bd48645d63 Author: Jianglei Nie Date: Mon Jul 11 15:07:18 2022 +0800 RDMA/hfi1: fix potential memory leak in setup_base_ctxt() setup_base_ctxt() allocates a memory chunk for uctxt->groups with hfi1_alloc_ctxt_rcv_groups(). When init_user_ctxt() fails, uctxt->groups is not released, which will lead to a memory leak. We should release the uctxt->groups with hfi1_free_ctxt_rcv_groups() when init_user_ctxt() fails. Fixes: e87473bc1b6c ("IB/hfi1: Only set fd pointer when base context is completely initialized") Link: https://lore.kernel.org/r/20220711070718.2318320-1-niejianglei2021@163.com Signed-off-by: Jianglei Nie Acked-by: Dennis Dalessandro Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hfi1/file_ops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ce736cf71b5ab8ad9b741dc7a4a07e41c27d1421 Author: Liang He Date: Mon Jul 18 21:36:31 2022 +0800 OPP: Don't drop opp_table->np reference while it is still in use The OPP table contains a reference of the DT node, opp_table->np, throughout its lifetime. We shouldn't drop the refcount for the same from _of_init_opp_table(), but do that while removing the OPP table finally. Signed-off-by: Liang He [ Viresh: Updated subject / commit log and drop reference from _of_clear_opp_table() ] Signed-off-by: Viresh Kumar drivers/opp/of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 746ff2bfcec78cfd522b2a490e7207c3fe836634 Author: Bjorn Andersson Date: Sat Jul 16 20:44:03 2022 -0700 arm64: dts: qcom: sdm845-db845c: Specify a i2c bus clocks The kernel log contains complaints about i2c11 and i2c14 lacking clock-frequency, specify a reasonable value to suppress this warning. Signed-off-by: Bjorn Andersson Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20220717034403.2135027-4-bjorn.andersson@linaro.org arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 ++ 1 file changed, 2 insertions(+) commit 79cfb1124af9b55e082d9d3efbefa4d3fc8b3cdc Author: Bjorn Andersson Date: Sat Jul 16 20:44:02 2022 -0700 arm64: dts: qcom: sdm845-db845c: Enable gpi_dma1 Enable gpi_dma1 so that i2c14 is able to find its DMA controller. Signed-off-by: Bjorn Andersson Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20220717034403.2135027-3-bjorn.andersson@linaro.org arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 0f064ae7cf703b0527de3a0608ef88548fdb5d9d Author: Bjorn Andersson Date: Sat Jul 16 20:44:01 2022 -0700 arm64: dts: qcom: sdm845: Fill in GENI DMA references The I2C and SPI might be configured in GPI DMA mode, fill in the properties needed for this. Signed-off-by: Bjorn Andersson Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20220717034403.2135027-2-bjorn.andersson@linaro.org arch/arm64/boot/dts/qcom/sdm845.dtsi | 90 ++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) commit bb7d1283e6280acdfe0faf10e8b6ebd1f5970fed Author: John Garry Date: Thu Jul 14 19:15:26 2022 +0800 scsi: core: cap shost max_sectors according to DMA limits only once The shost->max_sectors is repeatedly capped according to the host DMA mapping limit for each sdev in __scsi_init_queue(). This is unnecessary, so set only once when adding the host. Signed-off-by: John Garry Reviewed-by: Damien Le Moal Acked-by: Martin K. Petersen Signed-off-by: Christoph Hellwig drivers/scsi/hosts.c | 5 +++++ drivers/scsi/scsi_lib.c | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) commit 6d9870b7e5def2450e21316515b9efc0529204dd Author: John Garry Date: Thu Jul 14 19:15:25 2022 +0800 dma-iommu: add iommu_dma_opt_mapping_size() Add the IOMMU callback for DMA mapping API dma_opt_mapping_size(), which allows the drivers to know the optimal mapping limit and thus limit the requested IOVA lengths. This value is based on the IOVA rcache range limit, as IOVAs allocated above this limit must always be newly allocated, which may be quite slow. Signed-off-by: John Garry Reviewed-by: Damien Le Moal Acked-by: Robin Murphy Acked-by: Martin K. Petersen Signed-off-by: Christoph Hellwig drivers/iommu/dma-iommu.c | 6 ++++++ drivers/iommu/iova.c | 5 +++++ include/linux/iova.h | 2 ++ 3 files changed, 13 insertions(+) commit a229cc14f3395311b899e5e582b71efa8dd01df0 Author: John Garry Date: Thu Jul 14 19:15:24 2022 +0800 dma-mapping: add dma_opt_mapping_size() Streaming DMA mapping involving an IOMMU may be much slower for larger total mapping size. This is because every IOMMU DMA mapping requires an IOVA to be allocated and freed. IOVA sizes above a certain limit are not cached, which can have a big impact on DMA mapping performance. Provide an API for device drivers to know this "optimal" limit, such that they may try to produce mapping which don't exceed it. Signed-off-by: John Garry Reviewed-by: Damien Le Moal Acked-by: Martin K. Petersen Signed-off-by: Christoph Hellwig Documentation/core-api/dma-api.rst | 14 ++++++++++++++ include/linux/dma-map-ops.h | 1 + include/linux/dma-mapping.h | 5 +++++ kernel/dma/mapping.c | 12 ++++++++++++ 4 files changed, 32 insertions(+) commit e22c88799f2629088504e1357384f2ec3798da46 Merge: 6ee49d629dd6 ca415ea1f03a Author: Jakub Kicinski Date: Mon Jul 18 20:39:53 2022 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2022-07-15 This series contains updates to ice driver only. Ani updates feature restriction for devices that don't support external time stamping. Zhuo Chen removes unnecessary call to pci_aer_clear_nonfatal_status(). * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: Remove pci_aer_clear_nonfatal_status() call ice: Add EXTTS feature to the feature bitmap ==================== Link: https://lore.kernel.org/r/20220715214642.2968799-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 6ee49d629dd6146506649527e4ad46d1501fdcd2 Author: Ben Dooks Date: Fri Jul 15 18:30:09 2022 +0100 net: macb: fixup sparse warnings on __be16 ports The port fields in the ethool flow structures are defined to be __be16 types, so sparse is showing issues where these are being passed to htons(). Fix these warnings by passing them to be16_to_cpu() instead. These are being used in netdev_dbg() so should only effect anyone doing debug. Fixes the following sparse warnings: drivers/net/ethernet/cadence/macb_main.c:3366:9: warning: cast from restricted __be16 drivers/net/ethernet/cadence/macb_main.c:3366:9: warning: cast from restricted __be16 drivers/net/ethernet/cadence/macb_main.c:3366:9: warning: cast from restricted __be16 drivers/net/ethernet/cadence/macb_main.c:3419:25: warning: cast from restricted __be16 drivers/net/ethernet/cadence/macb_main.c:3419:25: warning: cast from restricted __be16 drivers/net/ethernet/cadence/macb_main.c:3419:25: warning: cast from restricted __be16 drivers/net/ethernet/cadence/macb_main.c:3419:25: warning: cast from restricted __be16 Signed-off-by: Ben Dooks Link: https://lore.kernel.org/r/20220715173009.526126-1-ben.dooks@sifive.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/cadence/macb_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 71c47aa98c519ebe76f723e550bab5dab0706bfd Author: Maksym Glubokiy Date: Fri Jul 15 13:38:06 2022 +0300 net: prestera: acl: fix code formatting Make the code look better. Signed-off-by: Maksym Glubokiy Link: https://lore.kernel.org/r/20220715103806.7108-1-maksym.glubokiy@plvision.eu Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/prestera/prestera_flower.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bdeed8b0958cbe126fcc4a4945308907f44cc8a9 Author: Andrey Turkin Date: Sun Jul 17 02:20:50 2022 +0000 vmxnet3: Record queue number to incoming packets Make generic XDP processing attribute packets to their actual queues instead of queue #0. This improves AF_XDP performance considerably since softirq threads no longer fight over single AF_XDP socket spinlock. Signed-off-by: Andrey Turkin Link: https://lore.kernel.org/r/20220717022050.822766-2-andrey.turkin@gmail.com Signed-off-by: Jakub Kicinski drivers/net/vmxnet3/vmxnet3_drv.c | 1 + 1 file changed, 1 insertion(+) commit 3e7380bb870bfdbe4f6cd2020b3768f0f9a3ada2 Merge: 6e693a104207 f655dacb59ac Author: Jakub Kicinski Date: Mon Jul 18 20:10:52 2022 -0700 Merge branch 'devlink-prepare-mlxsw-and-netdevsim-for-locked-reload' Jiri Pirko says: ==================== devlink: prepare mlxsw and netdevsim for locked reload This is preparation patchset to be able to eventually make a switch and make reload cmd to take devlink->lock as the other commands do. This patchset is preparing 2 major users of devlink API - mlxsw and netdevsim. The sets of functions are similar, therefore taking care of both here. ==================== Link: https://lore.kernel.org/r/20220716110241.3390528-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit f655dacb59ac987a56b82d2e73d85de411eb02aa Author: Jiri Pirko Date: Sat Jul 16 13:02:41 2022 +0200 net: devlink: remove unused locked functions Remove locked versions of functions that are no longer used by anyone. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski include/net/devlink.h | 20 ------ net/core/devlink.c | 168 -------------------------------------------------- 2 files changed, 188 deletions(-) commit 012ec02ae4410207f796a9b280a60b80b6cc790a Author: Jiri Pirko Date: Sat Jul 16 13:02:40 2022 +0200 netdevsim: convert driver to use unlocked devlink API during init/fini Prepare for devlink reload being called with devlink->lock held and convert the netdevsim driver to use unlocked devlink API during init and fini flows. Take devl_lock() in reload_down() and reload_up() ops in the meantime before reload cmd is converted to take the lock itself. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski drivers/net/netdevsim/bus.c | 19 ------ drivers/net/netdevsim/dev.c | 134 ++++++++++++++++++-------------------- drivers/net/netdevsim/fib.c | 62 +++++++++--------- drivers/net/netdevsim/netdevsim.h | 3 - include/net/devlink.h | 1 + net/core/devlink.c | 6 ++ 6 files changed, 102 insertions(+), 123 deletions(-) commit eb0e9fa2c6355e744d3ea7d07d34d89a4735320e Author: Jiri Pirko Date: Sat Jul 16 13:02:39 2022 +0200 net: devlink: add unlocked variants of devlink_region_create/destroy() functions Add unlocked variants of devlink_region_create/destroy() functions to be used in drivers called-in with devlink->lock held. Signed-off-by: Jiri Pirko Reviewed-by: Moshe Shemesh Signed-off-by: Jakub Kicinski include/net/devlink.h | 5 +++ net/core/devlink.c | 89 +++++++++++++++++++++++++++++++++++---------------- 2 files changed, 66 insertions(+), 28 deletions(-) commit 72a4c8c94efa5ce2b46c3f921b8830d7704121fc Author: Jiri Pirko Date: Sat Jul 16 13:02:38 2022 +0200 mlxsw: convert driver to use unlocked devlink API during init/fini Prepare for devlink reload being called with devlink->lock held and convert the mlxsw driver to use unlocked devlink API during init and fini flows. Take devl_lock() in reload_down() and reload_up() ops in the meantime before reload cmd is converted to take the lock itself. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/core.c | 53 +++++++---- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 103 ++++++++++----------- .../net/ethernet/mellanox/mlxsw/spectrum1_kvdl.c | 82 ++++++++-------- .../net/ethernet/mellanox/mlxsw/spectrum_buffers.c | 14 +-- drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.c | 62 ++++++------- .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 88 +++++++++--------- .../net/ethernet/mellanox/mlxsw/spectrum_policer.c | 32 +++---- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 22 ++--- .../net/ethernet/mellanox/mlxsw/spectrum_span.c | 6 +- .../net/ethernet/mellanox/mlxsw/spectrum_trap.c | 27 +++--- 10 files changed, 248 insertions(+), 241 deletions(-) commit 70a2ff89369d17c55efacb789171c3bd05c21817 Author: Jiri Pirko Date: Sat Jul 16 13:02:37 2022 +0200 net: devlink: add unlocked variants of devlink_dpipe*() functions Add unlocked variants of devlink_dpipe*() functions to be used in drivers called-in with devlink->lock held. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski include/net/devlink.h | 12 ++++ net/core/devlink.c | 181 +++++++++++++++++++++++++++++++++++++------------- 2 files changed, 147 insertions(+), 46 deletions(-) commit 755cfa69c4ece770c5a15dd51a9da2a7aafafa7c Author: Jiri Pirko Date: Sat Jul 16 13:02:36 2022 +0200 net: devlink: add unlocked variants of devlink_sb*() functions Add unlocked variants of devlink_sb*() functions to be used in drivers called-in with devlink->lock held. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski include/net/devlink.h | 5 +++++ net/core/devlink.c | 54 ++++++++++++++++++++++++++++++++++----------------- 2 files changed, 41 insertions(+), 18 deletions(-) commit c223d6a4bf6d2a88f2418316393f9170f81c54f0 Author: Jiri Pirko Date: Sat Jul 16 13:02:35 2022 +0200 net: devlink: add unlocked variants of devlink_resource*() functions Add unlocked variants of devlink_resource*() functions to be used in drivers called-in with devlink->lock held. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski include/net/devlink.h | 17 ++++ net/core/devlink.c | 217 ++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 173 insertions(+), 61 deletions(-) commit 852e85a704c2e11c050bdea286bc438aba4f4a22 Author: Jiri Pirko Date: Sat Jul 16 13:02:34 2022 +0200 net: devlink: add unlocked variants of devling_trap*() functions Add unlocked variants of devl_trap*() functions to be used in drivers called-in with devlink->lock held. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski include/net/devlink.h | 20 ++++++ net/core/devlink.c | 180 +++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 168 insertions(+), 32 deletions(-) commit e26fde2f5befad0951fe6345403616bf51e901be Author: Moshe Shemesh Date: Sat Jul 16 13:02:33 2022 +0200 net: devlink: avoid false DEADLOCK warning reported by lockdep Add a lock_class_key per devlink instance to avoid DEADLOCK warning by lockdep, while locking more than one devlink instance in driver code, for example in opening VFs flow. Kernel log: [ 101.433802] ============================================ [ 101.433803] WARNING: possible recursive locking detected [ 101.433810] 5.19.0-rc1+ #35 Not tainted [ 101.433812] -------------------------------------------- [ 101.433813] bash/892 is trying to acquire lock: [ 101.433815] ffff888127bfc2f8 (&devlink->lock){+.+.}-{3:3}, at: probe_one+0x3c/0x690 [mlx5_core] [ 101.433909] but task is already holding lock: [ 101.433910] ffff888118f4c2f8 (&devlink->lock){+.+.}-{3:3}, at: mlx5_core_sriov_configure+0x62/0x280 [mlx5_core] [ 101.433989] other info that might help us debug this: [ 101.433990] Possible unsafe locking scenario: [ 101.433991] CPU0 [ 101.433991] ---- [ 101.433992] lock(&devlink->lock); [ 101.433993] lock(&devlink->lock); [ 101.433995] *** DEADLOCK *** [ 101.433996] May be due to missing lock nesting notation [ 101.433996] 6 locks held by bash/892: [ 101.433998] #0: ffff88810eb50448 (sb_writers#3){.+.+}-{0:0}, at: ksys_write+0xf3/0x1d0 [ 101.434009] #1: ffff888114777c88 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x20d/0x520 [ 101.434017] #2: ffff888102b58660 (kn->active#231){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x230/0x520 [ 101.434023] #3: ffff888102d70198 (&dev->mutex){....}-{3:3}, at: sriov_numvfs_store+0x132/0x310 [ 101.434031] #4: ffff888118f4c2f8 (&devlink->lock){+.+.}-{3:3}, at: mlx5_core_sriov_configure+0x62/0x280 [mlx5_core] [ 101.434108] #5: ffff88812adce198 (&dev->mutex){....}-{3:3}, at: __device_attach+0x76/0x430 [ 101.434116] stack backtrace: [ 101.434118] CPU: 5 PID: 892 Comm: bash Not tainted 5.19.0-rc1+ #35 [ 101.434120] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 101.434130] Call Trace: [ 101.434133] [ 101.434135] dump_stack_lvl+0x57/0x7d [ 101.434145] __lock_acquire.cold+0x1df/0x3e7 [ 101.434151] ? register_lock_class+0x1880/0x1880 [ 101.434157] lock_acquire+0x1c1/0x550 [ 101.434160] ? probe_one+0x3c/0x690 [mlx5_core] [ 101.434229] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 101.434232] ? __xa_alloc+0x1ed/0x2d0 [ 101.434236] ? ksys_write+0xf3/0x1d0 [ 101.434239] __mutex_lock+0x12c/0x14b0 [ 101.434243] ? probe_one+0x3c/0x690 [mlx5_core] [ 101.434312] ? probe_one+0x3c/0x690 [mlx5_core] [ 101.434380] ? devlink_alloc_ns+0x11b/0x910 [ 101.434385] ? mutex_lock_io_nested+0x1320/0x1320 [ 101.434388] ? lockdep_init_map_type+0x21a/0x7d0 [ 101.434391] ? lockdep_init_map_type+0x21a/0x7d0 [ 101.434393] ? __init_swait_queue_head+0x70/0xd0 [ 101.434397] probe_one+0x3c/0x690 [mlx5_core] [ 101.434467] pci_device_probe+0x1b4/0x480 [ 101.434471] really_probe+0x1e0/0xaa0 [ 101.434474] __driver_probe_device+0x219/0x480 [ 101.434478] driver_probe_device+0x49/0x130 [ 101.434481] __device_attach_driver+0x1b8/0x280 [ 101.434484] ? driver_allows_async_probing+0x140/0x140 [ 101.434487] bus_for_each_drv+0x123/0x1a0 [ 101.434489] ? bus_for_each_dev+0x1a0/0x1a0 [ 101.434491] ? lockdep_hardirqs_on_prepare+0x286/0x400 [ 101.434494] ? trace_hardirqs_on+0x2d/0x100 [ 101.434498] __device_attach+0x1a3/0x430 [ 101.434501] ? device_driver_attach+0x1e0/0x1e0 [ 101.434503] ? pci_bridge_d3_possible+0x1e0/0x1e0 [ 101.434506] ? pci_create_resource_files+0xeb/0x190 [ 101.434511] pci_bus_add_device+0x6c/0xa0 [ 101.434514] pci_iov_add_virtfn+0x9e4/0xe00 [ 101.434517] ? trace_hardirqs_on+0x2d/0x100 [ 101.434521] sriov_enable+0x64a/0xca0 [ 101.434524] ? pcibios_sriov_disable+0x10/0x10 [ 101.434528] mlx5_core_sriov_configure+0xab/0x280 [mlx5_core] [ 101.434602] sriov_numvfs_store+0x20a/0x310 [ 101.434605] ? sriov_totalvfs_show+0xc0/0xc0 [ 101.434608] ? sysfs_file_ops+0x170/0x170 [ 101.434611] ? sysfs_file_ops+0x117/0x170 [ 101.434614] ? sysfs_file_ops+0x170/0x170 [ 101.434616] kernfs_fop_write_iter+0x348/0x520 [ 101.434619] new_sync_write+0x2e5/0x520 [ 101.434621] ? new_sync_read+0x520/0x520 [ 101.434624] ? lock_acquire+0x1c1/0x550 [ 101.434626] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 101.434630] vfs_write+0x5cb/0x8d0 [ 101.434633] ksys_write+0xf3/0x1d0 [ 101.434635] ? __x64_sys_read+0xb0/0xb0 [ 101.434638] ? lockdep_hardirqs_on_prepare+0x286/0x400 [ 101.434640] ? syscall_enter_from_user_mode+0x1d/0x50 [ 101.434643] do_syscall_64+0x3d/0x90 [ 101.434647] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 101.434650] RIP: 0033:0x7f5ff536b2f7 [ 101.434658] Code: 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 24 [ 101.434661] RSP: 002b:00007ffd9ea85d58 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 101.434664] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f5ff536b2f7 [ 101.434666] RDX: 0000000000000002 RSI: 000055c4c279e230 RDI: 0000000000000001 [ 101.434668] RBP: 000055c4c279e230 R08: 000000000000000a R09: 0000000000000001 [ 101.434669] R10: 000055c4c283cbf0 R11: 0000000000000246 R12: 0000000000000002 [ 101.434670] R13: 00007f5ff543d500 R14: 0000000000000002 R15: 00007f5ff543d700 [ 101.434673] Signed-off-by: Moshe Shemesh Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 4 ++++ 1 file changed, 4 insertions(+) commit 71b25693b22ebb9391b27f011d3f4bf9762e24f9 Author: Justin Stitt Date: Mon Jul 18 11:04:21 2022 -0700 scsi: target: iscsi: Fix clang -Wformat warnings When building with Clang we encounter these warnings: | drivers/target/iscsi/iscsi_target_login.c:719:24: error: format | specifies type 'unsigned short' but the argument has type 'int' | [-Werror,-Wformat] " from node: %s\n", atomic_read(&sess->nconn), - | drivers/target/iscsi/iscsi_target_login.c:767:12: error: format | specifies type 'unsigned short' but the argument has type 'int' | [-Werror,-Wformat] " %s\n", atomic_read(&sess->nconn), - | drivers/target/iscsi/iscsi_target.c:4365:12: error: format specifies | type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat] | " %s\n", atomic_read(&sess->nconn) For all warnings, the format specifier is '%hu' which describes an unsigned short. The resulting type of atomic_read is an int. The proposed fix is to listen to Clang and swap the format specifier. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Link: https://lore.kernel.org/r/20220718180421.49697-1-justinstitt@google.com Reviewed-by: Nick Desaulniers Reviewed-by: Chaitanya Kulkarni Signed-off-by: Justin Stitt Signed-off-by: Martin K. Petersen drivers/target/iscsi/iscsi_target.c | 2 +- drivers/target/iscsi/iscsi_target_login.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit ca452621b82916a81ea0f10f9f0158815f3365d0 Author: Daniil Lunev Date: Fri Jul 15 21:03:53 2022 +1000 scsi: ufs: core: Read device property for ref clock UFS storage devices require bRefClkFreq attribute to be set to operate correctly at high speed mode. The necessary value is determined by what the SoC / board supports. The standard doesn't specify a method to query the value, so the information needs to be fed in separately. DT information feeds into setting up the clock framework, so platforms using DT can get the UFS reference clock frequency from the clock framework. A special node "ref_clk" from the clock array for the UFS controller node is used as the source for the information. On the platforms that do not use DT (e.g. Intel), the alternative mechanism to feed the intended reference clock frequency is necessary. Specifying the necessary information in DSD of the UFS controller ACPI node is an alternative mechanism proposed in this patch. Those can be accessed via firmware property facility in the kernel and in many ways simillar to querying properties defined in DT. This patch introduces a small helper function to query a predetermined ACPI supplied property of the UFS controller, and uses it to attempt retrieving reference clock value, unless that was already done by the clock infrastructure. Link: https://lore.kernel.org/r/20220715210230.1.I365d113d275117dee8fd055ce4fc7e6aebd0bce9@changeid Reviewed-by: Adrian Hunter Signed-off-by: Daniil Lunev Signed-off-by: Martin K. Petersen Documentation/scsi/ufs.rst | 15 +++++++++++++++ drivers/ufs/core/ufshcd.c | 16 ++++++++++++++++ 2 files changed, 31 insertions(+) commit 1e82e4627a795aa33af0309c8f526df09abad188 Author: Xiang Chen Date: Fri Jul 15 02:23:22 2022 +0800 scsi: libsas: Resume SAS host for phy reset or enable via sysfs Currently if a phy reset or enable phy is issued via sysfs when controller is suspended, those operations will be ignored as SAS_HA_REGISTERED is cleared. If RPM is enabled then we may aggressively suspend automatically. In this case it may be difficult to enable or reset a phy via sysfs, so resume the host in these scenarios. Link: https://lore.kernel.org/r/1657823002-139010-6-git-send-email-john.garry@huawei.com Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_init.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7e15334f5d256367fb4c77f4ee0003e1e3d9bf9d Author: Xingui Yang Date: Fri Jul 15 02:23:21 2022 +0800 scsi: hisi_sas: Modify v3 HW SATA completion error processing If the I/O completion response frame returned by the target device has been written to the host memory and the err bit in the status field of the received fis is 1, ts->stat should set to SAS_PROTO_RESPONSE, and this will let EH analyze and further determine cause of failure. Link: https://lore.kernel.org/r/1657823002-139010-5-git-send-email-john.garry@huawei.com Signed-off-by: Xingui Yang Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit f0902095a773aa0c312c7e021406f2ef8b00db39 Author: Xiang Chen Date: Fri Jul 15 02:23:20 2022 +0800 scsi: hisi_sas: Relocate DMA unmap of SMP task Currently SMP tasks are DMA unmapped only when cq of SMP I/O is returned normally. If the cq of SMP I/O is returned with exception actually SMP TAS is never unmapped. Relocate DMA unmap of SMP task to fix the issue. Link: https://lore.kernel.org/r/1657823002-139010-4-git-send-email-john.garry@huawei.com Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 6 +++++- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 2 -- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 -- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 -- 4 files changed, 5 insertions(+), 7 deletions(-) commit bc22f9c06c25d3f450ad6ca93952e6a5c4a2fb8c Author: Xiang Chen Date: Fri Jul 15 02:23:19 2022 +0800 scsi: hisi_sas: Remove unnecessary variable to hold DMA map elements Use slot->n_elem to store the return value of dma_map_sg() for SSP and SMP IOs, and remove unnecessary variable n_elem_req. Link: https://lore.kernel.org/r/1657823002-139010-3-git-send-email-john.garry@huawei.com Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 43 +++++++++++++++-------------------- 1 file changed, 18 insertions(+), 25 deletions(-) commit eed9f513bf7fe4fc6541f2d3f5c11eda7a7393c6 Author: John Garry Date: Fri Jul 15 02:23:18 2022 +0800 scsi: hisi_sas: Call hisi_sas_slave_configure() from slave_configure_v3_hw() There is duplicated code between slave_configure_v3_hw() and hisi_sas_slave_configure(), so call common function hisi_sas_slave_configure() from slave_configure_v3_hw(). Link: https://lore.kernel.org/r/1657823002-139010-2-git-send-email-john.garry@huawei.com Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 502f4c18704da6842337a4d8f10da47b47939b87 Author: Dan Carpenter Date: Mon Jul 18 14:20:54 2022 +0300 scsi: mpi3mr: Delete a stray tab This code is indented one more tab than it should be. Link: https://lore.kernel.org/r/YtVCFshEJNC7ELid@kili Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen drivers/scsi/mpi3mr/mpi3mr_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a8a0147cb523ff8c21e57195dae1833b35dafaf Author: Dan Carpenter Date: Mon Jul 18 14:20:50 2022 +0300 scsi: mpi3mr: Unlock on error path There is some clean up necessary before returning. Smatch complains: drivers/scsi/mpi3mr/mpi3mr_fw.c:4786 mpi3mr_soft_reset_handler() warn: inconsistent returns '&mrioc->reset_mutex'. Locked on : 4730 Unlocked on: 4786 Link: https://lore.kernel.org/r/YtVCEsxMU8buuMjP@kili Fixes: f10af057325c ("scsi: mpi3mr: Resource Based Metering") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen drivers/scsi/mpi3mr/mpi3mr_fw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cf1ce8b715240e3e4a86162788958444e9208472 Author: Sreekanth Reddy Date: Sat Jul 9 01:20:20 2022 +0530 scsi: mpi3mr: Reduce VD queue depth on detecting throttling Reduce the VD queue depth on detecting the throttling condition. [mkp: incorporate fix for pointer cast issue reported by the test robot and Guenter Roeck] Link: https://lore.kernel.org/r/20220708195020.8323-3-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen drivers/scsi/mpi3mr/mpi3mr.h | 10 ++++ drivers/scsi/mpi3mr/mpi3mr_fw.c | 4 ++ drivers/scsi/mpi3mr/mpi3mr_os.c | 122 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 136 insertions(+) commit f10af057325c251c0dfcba7f3e3b607634d0bb25 Author: Sreekanth Reddy Date: Sat Jul 9 01:20:19 2022 +0530 scsi: mpi3mr: Resource Based Metering Update driver to track cumulative pending large data size at the controller level and at the throttle group level. When one of the values meet or exceed the controller's firmware-determined high threshold value, then the driver will divert future selective I/O to the firmware. Once both controller level and at the throttle group level cumulative pending large data size reach controller's firmware determined low threshold value, then the driver will stop diverting I/Os to the firmware. Link: https://lore.kernel.org/r/20220708195020.8323-2-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen drivers/scsi/mpi3mr/mpi3mr.h | 61 ++++++++++++++- drivers/scsi/mpi3mr/mpi3mr_fw.c | 62 +++++++++++++++ drivers/scsi/mpi3mr/mpi3mr_os.c | 167 ++++++++++++++++++++++++++++++++++++++-- 3 files changed, 280 insertions(+), 10 deletions(-) commit 2e07a521e1e424787af3bfc59615de4220856c35 Author: Pavel Begunkov Date: Tue Jul 12 21:52:28 2022 +0100 skbuff: add SKBFL_DONT_ORPHAN flag We don't want to list every single ubuf_info callback in skb_orphan_frags(), add a flag controlling the behaviour. Signed-off-by: Pavel Begunkov Signed-off-by: Jakub Kicinski include/linux/skbuff.h | 8 +++++--- net/core/skbuff.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) commit 1b4b2b09d4fb451029b112f17d34792e0277aeb2 Author: Pavel Begunkov Date: Tue Jul 12 21:52:27 2022 +0100 skbuff: don't mix ubuf_info from different sources We should not append MSG_ZEROCOPY requests to skbuff with non MSG_ZEROCOPY ubuf_info, they might be not compatible. Signed-off-by: Pavel Begunkov Signed-off-by: Jakub Kicinski net/core/skbuff.c | 4 ++++ 1 file changed, 4 insertions(+) commit 773ba4fe9104a64a54d1c00f0fb6ffb95def2b03 Author: Pavel Begunkov Date: Tue Jul 12 21:52:26 2022 +0100 ipv6: avoid partial copy for zc Even when zerocopy transmission is requested and possible, __ip_append_data() will still copy a small chunk of data just because it allocated some extra linear space (e.g. 128 bytes). It wastes CPU cycles on copy and iter manipulations and also misalignes potentially aligned data. Avoid such copies. And as a bonus we can allocate smaller skb. Signed-off-by: Pavel Begunkov Signed-off-by: Jakub Kicinski net/ipv6/ip6_output.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 8eb77cc73977d88787b37c92831b1c242e035396 Author: Pavel Begunkov Date: Tue Jul 12 21:52:25 2022 +0100 ipv4: avoid partial copy for zc Even when zerocopy transmission is requested and possible, __ip_append_data() will still copy a small chunk of data just because it allocated some extra linear space (e.g. 148 bytes). It wastes CPU cycles on copy and iter manipulations and also misalignes potentially aligned data. Avoid such copies. And as a bonus we can allocate smaller skb. Signed-off-by: Pavel Begunkov Signed-off-by: Jakub Kicinski net/ipv4/ip_output.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5e1e12d2992006a4e950ebf2e2a1f0ebaabd969f Author: Dmitry Baryshkov Date: Mon Jun 20 11:05:05 2022 +0300 clk: qcom: gcc-msm8994: use parent_hws for gpll0/4 Use parent_hws for two remaining clocks in gcc-msm8994 that used parent_names. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220620080505.1573948-1-dmitry.baryshkov@linaro.org drivers/clk/qcom/gcc-msm8994.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 3455607fd7be10b449f5135c00dc306b85dc0d21 Author: Tony Battersby Date: Mon Jul 11 10:51:32 2022 -0400 scsi: sg: Allow waiting for commands to complete on removed device When a SCSI device is removed while in active use, currently sg will immediately return -ENODEV on any attempt to wait for active commands that were sent before the removal. This is problematic for commands that use SG_FLAG_DIRECT_IO since the data buffer may still be in use by the kernel when userspace frees or reuses it after getting ENODEV, leading to corrupted userspace memory (in the case of READ-type commands) or corrupted data being sent to the device (in the case of WRITE-type commands). This has been seen in practice when logging out of a iscsi_tcp session, where the iSCSI driver may still be processing commands after the device has been marked for removal. Change the policy to allow userspace to wait for active sg commands even when the device is being removed. Return -ENODEV only when there are no more responses to read. Link: https://lore.kernel.org/r/5ebea46f-fe83-2d0b-233d-d0dcb362dd0a@cybernetics.com Cc: Acked-by: Douglas Gilbert Signed-off-by: Tony Battersby Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 53 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 20 deletions(-) commit 6c20cc4885c5c11065a83c82dd8ce2074fe5c774 Author: Nilesh Javali Date: Tue Jul 12 22:20:45 2022 -0700 scsi: qla2xxx: Update version to 10.02.07.800-k Link: https://lore.kernel.org/r/20220713052045.10683-11-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1ccad27716ecad1fd58c35e579bedb81fa5e1ad5 Author: Bikash Hazarika Date: Tue Jul 12 22:20:44 2022 -0700 scsi: qla2xxx: Update manufacturer details Update manufacturer details to indicate Marvell Semiconductors. Link: https://lore.kernel.org/r/20220713052045.10683-10-njavali@marvell.com Cc: stable@vger.kernel.org Reviewed-by: Himanshu Madhani Signed-off-by: Bikash Hazarika Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 2 +- drivers/scsi/qla2xxx/qla_gs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 166d74b876b7d8eb2e41b0587db93d23cef85221 Author: Nilesh Javali Date: Tue Jul 12 22:20:43 2022 -0700 scsi: qla2xxx: Fix sparse warning for dport_data Use le16_to_cpu to fix sparse warning reported for dport_data. sparse warnings: (new ones prefixed by >>) >> drivers/scsi/qla2xxx/qla_bsg.c:2485:34: sparse: sparse: incorrect >> type in assignment (different base types) @@ expected unsigned >> short [usertype] mbx1 @@ got restricted __le16 @@ drivers/scsi/qla2xxx/qla_bsg.c:2485:34: sparse: expected unsigned short [usertype] mbx1 drivers/scsi/qla2xxx/qla_bsg.c:2485:34: sparse: got restricted __le16 >> drivers/scsi/qla2xxx/qla_bsg.c:2486:34: sparse: sparse: >> incorrect type in assignment (different base types) @@ >> expected unsigned short [usertype] mbx2 @@ got restricted __le16 @@ drivers/scsi/qla2xxx/qla_bsg.c:2486:34: sparse: expected unsigned short [usertype] mbx2 drivers/scsi/qla2xxx/qla_bsg.c:2486:34: sparse: got restricted __le16 Link: https://lore.kernel.org/r/20220713052045.10683-9-njavali@marvell.com Fixes: 476da8faa336 ("scsi: qla2xxx: Add a new v2 dport diagnostic feature") Cc: stable@vger.kernel.org Reported-by: kernel test robot Reviewed-by: Himanshu Madhani Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_bsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 47ccb113cead905bdc236571bf8ac6fed90321b3 Author: Arun Easi Date: Tue Jul 12 22:20:42 2022 -0700 scsi: qla2xxx: Fix discovery issues in FC-AL topology A direct attach tape device, when gets swapped with another, was not discovered. Fix this by looking at loop map and reinitialize link if there are devices present. Link: https://lore.kernel.org/linux-scsi/baef87c3-5dad-3b47-44c1-6914bfc90108@cybernetics.com/ Link: https://lore.kernel.org/r/20220713052045.10683-8-njavali@marvell.com Cc: stable@vger.kernel.org Reported-by: Tony Battersby Tested-by: Tony Battersby Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_gbl.h | 3 ++- drivers/scsi/qla2xxx/qla_init.c | 29 +++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_mbx.c | 5 ++++- 3 files changed, 35 insertions(+), 2 deletions(-) commit 63fa7f2644b4b48e1913af33092c044bf48e9321 Author: Quinn Tran Date: Tue Jul 12 22:20:41 2022 -0700 scsi: qla2xxx: Fix imbalance vha->vref_count vref_count took an extra decrement in the task management path. Add an extra ref count to compensate the imbalance. Link: https://lore.kernel.org/r/20220713052045.10683-7-njavali@marvell.com Cc: stable@vger.kernel.org Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 4 ++++ 1 file changed, 4 insertions(+) commit c019cd656e717349ff22d0c41d6fbfc773f48c52 Author: Quinn Tran Date: Tue Jul 12 22:20:40 2022 -0700 scsi: qla2xxx: edif: Fix dropped IKE message This patch fixes IKE message being dropped due to error in processing Purex IOCB and Continuation IOCBs. Link: https://lore.kernel.org/r/20220713052045.10683-6-njavali@marvell.com Fixes: fac2807946c1 ("scsi: qla2xxx: edif: Add extraction of auth_els from the wire") Cc: stable@vger.kernel.org Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_isr.c | 54 +++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 30 deletions(-) commit b1f707146923335849fb70237eec27d4d1ae7d62 Author: Arun Easi Date: Tue Jul 12 22:20:39 2022 -0700 scsi: qla2xxx: Fix response queue handler reading stale packets On some platforms, the current logic of relying on finding new packet solely based on signature pattern can lead to driver reading stale packets. Though this is a bug in those platforms, reduce such exposures by limiting reading packets until the IN pointer. Two module parameters are introduced: ql2xrspq_follow_inptr: When set, on newer adapters that has queue pointer shadowing, look for response packets only until response queue in pointer. When reset, response packets are read based on a signature pattern logic (old way). ql2xrspq_follow_inptr_legacy: Like ql2xrspq_follow_inptr, but for those adapters where there is no queue pointer shadowing. Link: https://lore.kernel.org/r/20220713052045.10683-5-njavali@marvell.com 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 drivers/scsi/qla2xxx/qla_gbl.h | 2 ++ drivers/scsi/qla2xxx/qla_isr.c | 24 +++++++++++++++++++++++- drivers/scsi/qla2xxx/qla_os.c | 10 ++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) commit 6c96a3c7d49593ef15805f5e497601c87695abc9 Author: Bikash Hazarika Date: Tue Jul 12 22:20:38 2022 -0700 scsi: qla2xxx: Zero undefined mailbox IN registers While requesting a new mailbox command, driver does not write any data to unused registers. Initialize the unused register value to zero while requesting a new mailbox command to prevent stale entry access by firmware. Link: https://lore.kernel.org/r/20220713052045.10683-4-njavali@marvell.com Cc: stable@vger.kernel.org Reviewed-by: Himanshu Madhani Signed-off-by: Bikash Hazarika Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_mbx.c | 2 ++ 1 file changed, 2 insertions(+) commit cf3b4fb655796674e605268bd4bfb47a47c8bce6 Author: Bikash Hazarika Date: Tue Jul 12 22:20:37 2022 -0700 scsi: qla2xxx: Fix incorrect display of max frame size Replace display field with the correct field. Link: https://lore.kernel.org/r/20220713052045.10683-3-njavali@marvell.com Fixes: 8777e4314d39 ("scsi: qla2xxx: Migrate NVME N2N handling into state machine") Cc: stable@vger.kernel.org Reviewed-by: Himanshu Madhani Signed-off-by: Bikash Hazarika Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 1 + drivers/scsi/qla2xxx/qla_gs.c | 9 +++------ drivers/scsi/qla2xxx/qla_init.c | 2 ++ drivers/scsi/qla2xxx/qla_isr.c | 4 +--- 4 files changed, 7 insertions(+), 9 deletions(-) commit 5bc7b01c513a4a9b4cfe306e8d1720cfcfd3b8a3 Author: Nilesh Javali Date: Tue Jul 12 22:20:36 2022 -0700 scsi: Revert "scsi: qla2xxx: Fix disk failure to rediscover" This fixes the regression of NVMe discovery failure during driver load time. This reverts commit 6a45c8e137d4e2c72eecf1ac7cf64f2fdfcead99. Link: https://lore.kernel.org/r/20220713052045.10683-2-njavali@marvell.com Cc: stable@vger.kernel.org Reviewed-by: Himanshu Madhani Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 5 ++--- drivers/scsi/qla2xxx/qla_nvme.c | 5 ----- 2 files changed, 2 insertions(+), 8 deletions(-) commit aa7fd3bb6017b343585e97a909f9b7d2fe174018 Author: Christian Marangi Date: Thu Jul 7 00:53:19 2022 +0200 ARM: dts: qcom: add rpmcc missing clocks for apq/ipq8064 and msm8660 Add missing rpmcc pxo and cxo clock for apq8064, ipq8064 and msm8660 dtsi. Signed-off-by: Christian Marangi Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220706225321.26215-3-ansuelsmth@gmail.com arch/arm/boot/dts/qcom-apq8064.dtsi | 2 ++ arch/arm/boot/dts/qcom-ipq8064.dtsi | 2 ++ arch/arm/boot/dts/qcom-msm8660.dtsi | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) commit 129d9cd9c25041f8b8681fd6e8584fa47c385f3b Author: Christian Marangi Date: Thu Jul 7 00:53:20 2022 +0200 clk: qcom: clk-rpm: convert to parent_data API Convert clk-rpm driver to parent_data API. We keep the old pxo/cxo_board parent naming to keep compatibility with old DT and we use the new pxo/cxo for new implementation where these clock are defined in DTS. Signed-off-by: Christian Marangi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220706225321.26215-4-ansuelsmth@gmail.com drivers/clk/qcom/clk-rpm.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 4970f3139d42d183f0d81319d6ce58d3634e7c87 Author: Christian Marangi Date: Thu Jul 7 00:53:18 2022 +0200 dt-bindings: clock: fix wrong clock documentation for qcom,rpmcc qcom,rpmcc describe 2 different kind of device. Currently we have definition for rpm-smd based device but we lack Documentation for simple rpm based device. Add the missing clk for ipq806x, apq8060, msm8660 and apq8064 and provide additional example to describe these new simple rpm based devices. Signed-off-by: Christian Marangi Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220706225321.26215-2-ansuelsmth@gmail.com .../devicetree/bindings/clock/qcom,rpmcc.yaml | 85 +++++++++++++++++++++- 1 file changed, 83 insertions(+), 2 deletions(-) commit 8ed85d1e515ff5f302a929308c7ccc06bec68632 Author: Kuogee Hsieh Date: Mon Jul 11 09:23:23 2022 -0700 arm64: dts: qcom: sc7280: delete vdda-1p2 and vdda-0p9 from both dp and edp Both vdda-1p2-supply and vdda-0p9-supply regulators are controlled by dp combo phy. Therefore remove them from dp controller. Signed-off-by: Kuogee Hsieh Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1657556603-15024-1-git-send-email-quic_khsieh@quicinc.com arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 2 -- arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi | 3 --- 2 files changed, 5 deletions(-) commit 01579b88a03a90af73b584fed70d171c73c2c540 Author: Bjorn Andersson Date: Mon Jul 11 20:18:21 2022 -0700 arm64: defconfig: Demote Qualcomm USB PHYs to modules The Qualcomm USB PHYs are not critical for reaching the ramdisk to load modules, so they can be demoted to be built as such instead of builtin. Signed-off-by: Bjorn Andersson Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20220712031821.4134712-1-bjorn.andersson@linaro.org arch/arm64/configs/defconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 873b98538491feb0b0548ea1a8ee054fcfe0d435 Author: Bryan O'Donoghue Date: Tue Jul 12 13:59:22 2022 +0100 clk: qcom: gcc-msm8939: Add missing USB HS system clock frequencies The shipped qcom driver defines: static struct clk_freq_tbl ftbl_gcc_usb_hs_system_clk[] = { F( 57140000, gpll0_out_main, 14, 0, 0), F( 80000000, gpll0_out_main, 10, 0, 0), F( 100000000, gpll0_out_main, 8, 0, 0), F_END }; In the upstream code we omit 57.14 MHz and 100 MHz. Signed-off-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220712125922.3461675-7-bryan.odonoghue@linaro.org drivers/clk/qcom/gcc-msm8939.c | 2 ++ 1 file changed, 2 insertions(+) commit 2573f7d8629afc1d2c5f841b8a2b2359396a5e77 Author: Bryan O'Donoghue Date: Tue Jul 12 13:59:21 2022 +0100 clk: qcom: gcc-msm8939: Add missing MDSS MDP clock frequencies Again the msm8936/msm8939 supports a wider range of operating frequencies to the antecedent msm8916 from which the msm8939.c driver is derived. static struct clk_freq_tbl ftbl_gcc_mdss_mdp_clk[] = { F( 50000000, gpll0_out_aux, 16, 0, 0), F( 80000000, gpll0_out_aux, 10, 0, 0), F( 100000000, gpll0_out_aux, 8, 0, 0), F( 145500000, gpll0_out_aux, 5.5, 0, 0), F( 153600000, gpll1_out_main, 4, 0, 0), F( 160000000, gpll0_out_aux, 5, 0, 0), F( 177780000, gpll0_out_aux, 4.5, 0, 0), F( 200000000, gpll0_out_aux, 4, 0, 0), F( 266670000, gpll0_out_aux, 3, 0, 0), F( 307200000, gpll1_out_main, 2, 0, 0), F( 366670000, gpll3_out_aux, 3, 0, 0), F_END }; We are missing 145.5 MHz and 153.6 MHz. Signed-off-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220712125922.3461675-6-bryan.odonoghue@linaro.org drivers/clk/qcom/gcc-msm8939.c | 2 ++ 1 file changed, 2 insertions(+) commit 2c37d70c82e826e44163ab2c83f8b7b81e7db35a Author: Bryan O'Donoghue Date: Tue Jul 12 13:59:20 2022 +0100 clk: qcom: gcc-msm8939: Add missing CAMSS CPP clock frequencies Reviewing the qcom msm8936.c clock frequency tables we see static struct clk_freq_tbl ftbl_gcc_camss_cpp_clk[] = { F( 160000000, gpll0_out_main, 5, 0, 0), F( 200000000, gpll0_out_main, 4, 0, 0), F( 228570000, gpll0_out_main, 3.5, 0, 0), F( 266670000, gpll0_out_main, 3, 0, 0), F( 320000000, gpll0_out_main, 2.5, 0, 0), F( 465000000, gpll2_out_main, 2, 0, 0), F_END }; which is a super-set of the msm8916 original definitions. Add in the missing frequency definitions now. Signed-off-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220712125922.3461675-5-bryan.odonoghue@linaro.org drivers/clk/qcom/gcc-msm8939.c | 3 +++ 1 file changed, 3 insertions(+) commit 680b86da10a23268b24d65b567830824075eb151 Author: Bryan O'Donoghue Date: Tue Jul 12 13:59:19 2022 +0100 clk: qcom: gcc-msm8939: Fix venus0_vcodec0_clk frequency definitions The Venus clock frequencies are a copy/paste error from msm8916. Looking at the original clock-gcc-8936.c ftbl_gcc_venus0_vcodec0_clk defines we have: - 133 MHz - 200 MHz - 266 MHz These values are born out by the relevant qualcomm documentation for the msm8936/msm8939 Venus core performance levels. Signed-off-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220712125922.3461675-4-bryan.odonoghue@linaro.org drivers/clk/qcom/gcc-msm8939.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 159b2f59d65b4d34e225ef8d96ed290a13610d9c Author: Bryan O'Donoghue Date: Tue Jul 12 13:59:18 2022 +0100 clk: qcom: gcc-msm8939: Add missing CAMSS CCI bus clock Standard CCI bus clock clocks are 19.2 MHz and 37.5 MHz. We already define the 19.2 MHz but are missing the 37.5 MHz. See qcom kernel drivers/clk/qcom/clock-gcc-8936.c::ftbl_gcc_camss_cci_clk[] Signed-off-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220712125922.3461675-3-bryan.odonoghue@linaro.org drivers/clk/qcom/gcc-msm8939.c | 1 + 1 file changed, 1 insertion(+) commit 2bc308ebc453ba22f3f120f777b9ac48f973ee80 Author: Bryan O'Donoghue Date: Tue Jul 12 13:59:17 2022 +0100 clk: qcom: gcc-msm8939: Fix weird field spacing in ftbl_gcc_camss_cci_clk Adding a new item to this frequency table I see the existing indentation is incorrect. Fixes: 1664014e4679 ("clk: qcom: gcc-msm8939: Add MSM8939 Generic Clock Controller") Signed-off-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220712125922.3461675-2-bryan.odonoghue@linaro.org drivers/clk/qcom/gcc-msm8939.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 757991c0778f5c9621955358a9fbf88999131ae1 Author: Steev Klimaszewski Date: Mon Jul 18 18:01:08 2022 -0500 arm64: dts: sdm850: Remove unnecessary turbo-mode qcom-cpufreq-hw finds turbo-mode in the LUT hardware tables and slaps the flag on the last element, so there's no reason to add it in the dts, so remove it. Signed-off-by: Steev Klimaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220718230109.8193-1-steev@kali.org arch/arm64/boot/dts/qcom/sdm850.dtsi | 1 - 1 file changed, 1 deletion(-) commit 2bc7d3e08ec76f5ea88c552ae72ed8ea9bbdcc01 Author: Stephan Gerhold Date: Tue Jul 5 16:35:23 2022 +0200 ARM: mach-qcom: Add support for MSM8909 Add a Kconfig entry for MSM8909 and the "qcom,msm8909-smp" CPU enable-method. The ARM Cortex-A7 cores are booted just like on MSM8226. Signed-off-by: Stephan Gerhold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705143523.3390944-9-stephan.gerhold@kernkonzept.com arch/arm/mach-qcom/Kconfig | 4 ++++ arch/arm/mach-qcom/platsmp.c | 1 + 2 files changed, 5 insertions(+) commit df71736be882fbe5317014348791123984b352f9 Author: Stephan Gerhold Date: Tue Jul 5 16:35:22 2022 +0200 dt-bindings: arm: cpus: Document "qcom,msm8909-smp" enable-method MSM8909 is a fairly old 32-bit SoC without PSCI support, so the additional CPU cores need to be initialized with a custom enable-method. Fortunately it works just like on MSM8226 and MSM8916 so just add an additional compatible as alias to the DT schema. Signed-off-by: Stephan Gerhold Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705143523.3390944-8-stephan.gerhold@kernkonzept.com Documentation/devicetree/bindings/arm/cpus.yaml | 1 + 1 file changed, 1 insertion(+) commit fddb663de9ebcece42ad1add175fbe0d6b2ae7e8 Author: Stephan Gerhold Date: Tue Jul 5 16:35:21 2022 +0200 soc: qcom: spm: Add CPU data for MSM8909 Given the lack of public documentation for the SPM, the configuration data is taken without modification from Qualcomm's msm-3.10 release [1]. It is pretty much identical to the one for MSM8916, except that 0x3B is missing in the sequence for standalone power collapse for some reason. [1]: https://git.codelinaro.org/clo/la/kernel/msm-3.10/-/blob/LA.BR.1.2.3-00910-8x09.0/arch/arm/boot/dts/qcom/msm8909-pm8909-pm.dtsi Signed-off-by: Stephan Gerhold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705143523.3390944-7-stephan.gerhold@kernkonzept.com drivers/soc/qcom/spm.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 6447cd8dcec514b89b310209c1316ce37e35c7b6 Author: Stephan Gerhold Date: Tue Jul 5 16:35:20 2022 +0200 dt-bindings: soc: qcom: spm: Add MSM8909 CPU compatible Document the "qcom,msm8909-saw2-v3.0-cpu" compatible for the CPU Subsystem Power Manager (SPM) on the MSM8909 SoC. This is necessary for CPU idle since this is a fairly old 32-bit SoC without support for PSCI. Signed-off-by: Stephan Gerhold Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705143523.3390944-6-stephan.gerhold@kernkonzept.com Documentation/devicetree/bindings/soc/qcom/qcom,spm.yaml | 1 + 1 file changed, 1 insertion(+) commit 488f1d96c35421c8cc09887b7cdf7504c757283b Author: Stephan Gerhold Date: Tue Jul 5 16:35:19 2022 +0200 soc: qcom: rpmpd: Add compatible for MSM8909 MSM8909 has the same power domains as MSM8916, so just define another compatible for the existing definition. Signed-off-by: Stephan Gerhold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705143523.3390944-5-stephan.gerhold@kernkonzept.com drivers/soc/qcom/rpmpd.c | 1 + 1 file changed, 1 insertion(+) commit c61c6c6507920598bd09db0dd4859a649e3f5ab0 Author: Stephan Gerhold Date: Tue Jul 5 16:35:18 2022 +0200 dt-bindings: power: qcom-rpmpd: Add MSM8909 power domains MSM8909 has the same power domains as MSM8916 so just define them as aliases for the existing definitions. Signed-off-by: Stephan Gerhold Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705143523.3390944-4-stephan.gerhold@kernkonzept.com Documentation/devicetree/bindings/power/qcom,rpmpd.yaml | 1 + include/dt-bindings/power/qcom-rpmpd.h | 7 +++++++ 2 files changed, 8 insertions(+) commit 73579f2a99a63c24339d93e39c6fbf0d76e1c770 Author: Stephan Gerhold Date: Tue Jul 5 16:35:17 2022 +0200 soc: qcom: smd-rpm: Add compatible for MSM8909 Add the new "qcom,rpm-msm8909" compatible to the driver so the interface to the Resource Power Manager (RPM) is initialized correctly on MSM8909. Signed-off-by: Stephan Gerhold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705143523.3390944-3-stephan.gerhold@kernkonzept.com drivers/soc/qcom/smd-rpm.c | 1 + 1 file changed, 1 insertion(+) commit 709d473dd5e1f9bad0745437f0eb48a4e259b57f Author: Stephan Gerhold Date: Tue Jul 5 16:35:16 2022 +0200 dt-bindings: soc: qcom: smd-rpm: Add MSM8909 Document the "qcom,rpm-msm8909" compatible to describe the interface to the Resource Power Manager (RPM) on the MSM8909 SoC. Signed-off-by: Stephan Gerhold Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705143523.3390944-2-stephan.gerhold@kernkonzept.com Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml | 1 + 1 file changed, 1 insertion(+) commit 5969d3290fb5daaa40446c8610b1fbbb78ff42dd Author: Steev Klimaszewski Date: Mon Jul 18 17:57:14 2022 -0500 arm64: dts: qcom: sc8280xp: add missing 300MHz When booting a Thinkpad x13s, we see the message [ 0.997647] cpu cpu0: failed to update OPP for freq=300000 So, lets add in 300MHz to make it happy Signed-off-by: Steev Klimaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220718225714.8074-1-steev@kali.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 41fff779d7948147f2440c4bb134cdf8b45b22d7 Author: Bjorn Andersson Date: Wed Jul 13 14:28:18 2022 -0700 clk: qcom: gdsc: Bump parent usage count when GDSC is found enabled When a GDSC is found to be enabled at boot the pm_runtime state will be unbalanced as the GDSC is later turned off. Fix this by increasing the usage counter on the power-domain, in line with how we handled the regulator state. Fixes: 1b771839de05 ("clk: qcom: gdsc: enable optional power domain support") Signed-off-by: Bjorn Andersson Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20220713212818.130277-1-bjorn.andersson@linaro.org drivers/clk/qcom/gdsc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit b1ec8b53c9ae5fae33d60e9638d39ca5346b941b Author: Abel Vesa Date: Wed Jul 13 17:32:00 2022 +0300 clk: qcom: Drop mmcx gdsc supply for dispcc and videocc Both dispcc and videocc use mmcx power domain now. Lets drop the supply mmcx from every gdsc. Cc: Dmitry Baryshkov Fixes: 266e5cf39a0f ("arm64: dts: qcom: sm8250: remove mmcx regulator") Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220713143200.3686765-1-abel.vesa@linaro.org drivers/clk/qcom/dispcc-sm8250.c | 1 - drivers/clk/qcom/videocc-sm8250.c | 4 ---- 2 files changed, 5 deletions(-) commit 947bb0d16576bdac27f3355f268f51acfe29bfa7 Author: Yang Li Date: Thu Jul 14 15:55:32 2022 +0800 soc: qcom: icc-bwmon: Remove unnecessary print function dev_err() Eliminate the follow coccicheck warning: ./drivers/soc/qcom/icc-bwmon.c:349:2-9: line 349 is redundant because platform_get_irq() already prints an error Fixes: b9c2ae6cac40 ("soc: qcom: icc-bwmon: Add bandwidth monitoring driver") Signed-off-by: Yang Li Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220714075532.104665-1-yang.lee@linux.alibaba.com drivers/soc/qcom/icc-bwmon.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f04f2870e549a4211685fba0a445d455e0f6ea13 Merge: f2906aa86338 c196175acdd3 Author: Stephen Boyd Date: Mon Jul 18 14:14:02 2022 -0700 Merge tag 'clk-imx-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux into clk-imx Pull i.MX clk driver updates from Abel Vesa: - Correct adc1, nic_media and edma1's parents for i.MX93 - Fix rdiv, mfd values, the return rate in recalc_rate and add more frequencies in the table for fracn-gppll * tag 'clk-imx-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux: clk: imx: clk-fracn-gppll: Add more freq config for video pll clk: imx: clk-fracn-gppll: correct rdiv clk: imx: clk-fracn-gppll: Return rate in rate table properly in ->recalc_rate() clk: imx: clk-fracn-gppll: fix mfd value clk: imx93: Correct the edma1's parent clock clk: imx93: correct nic_media parent clk: imx93: use adc_root as the parent clock of adc1 commit 432b09665b5ad0c1faaefe3e0ad92c0b6a6ecc2f Merge: f2906aa86338 4167ac8a657e Author: Stephen Boyd Date: Mon Jul 18 14:10:25 2022 -0700 Merge tag 'sunxi-clk-for-5.20-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner Pull Allwinner clk driver updates from Jernej Skrabec: - deduplicate Allwinner ccu_clks arrays - Allwinner H6 GPU DFS support - adjust Allwinner Kconfig * tag 'sunxi-clk-for-5.20-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: sun50i: h6: Modify GPU clock configuration to support DFS clk: sunxi: Do not select the PRCM MFD clk: sunxi: Limit legacy clocks to 32-bit ARM clk: sunxi-ng: Deduplicate ccu_clks arrays commit aa84506ea644d0952a75136dee7386cc54b234b0 Author: Wolfram Sang Date: Wed Jul 13 12:06:03 2022 +0200 clocksource/drivers/sh_cmt: Add R-Car Gen4 support Add support for the R-Car Gen4 CMT types 0/1 which are the same as in the previous two generations. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20220713100603.3391-4-wsa+renesas@sang-engineering.com Signed-off-by: Daniel Lezcano drivers/clocksource/sh_cmt.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit bd0ed737d5fda2ec55f915ed2c4f586363f71129 Author: Wolfram Sang Date: Wed Jul 13 12:06:02 2022 +0200 dt-bindings: timer: renesas,cmt: R-Car V3U is R-Car Gen4 Despite the name, R-Car V3U is the first member of the R-Car Gen4 family. Hence move its compatible value to the R-Car Gen4 section. Signed-off-by: Wolfram Sang Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220713100603.3391-3-wsa+renesas@sang-engineering.com Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/timer/renesas,cmt.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 525b296185b4b0abab0d35a7143fc5a99c385230 Author: Wolfram Sang Date: Wed Jul 13 12:06:01 2022 +0200 dt-bindings: timer: renesas,cmt: Add r8a779f0 and generic Gen4 CMT support Signed-off-by: Wolfram Sang Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220713100603.3391-2-wsa+renesas@sang-engineering.com Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/timer/renesas,cmt.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 4528c18605654bea022d294c9ba2e93600d05a94 Author: Ruijing Dong Date: Thu Jul 14 17:13:37 2022 -0400 drm/amdgpu: add comment to HW_IP_VCN_ENC type From VCN4, AMDGPU_HW_IP_VCN_ENC is re-used to support both encoding and decoding jobs. Link: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/245/commits Reviewed-by: Christian König Reviewed-by: Leo Liu Signed-off-by: Ruijing Dong Signed-off-by: Alex Deucher include/uapi/drm/amdgpu_drm.h | 4 ++++ 1 file changed, 4 insertions(+) commit a53bc32182d7a2a934ca994239396fba21161c8e Author: Kenneth Feng Date: Sat Jul 16 12:41:41 2022 +0800 drm/amd/pm: enable mode1 reset for smu_v13_0_7 enable mode1 reset for smu_v13_0_7 since it's missing. Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 1 + 2 files changed, 2 insertions(+) commit 5877b7ddbc2502a7ddbc07970cf5c15972c22de4 Author: Hawking Zhang Date: Tue Aug 31 13:32:40 2021 +0800 drm/amdgpu: correct the PSP_BL_CMD enum To match with the enum defined in trusted os Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Reviewed-by: John Clements Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c913f38032e873758d1b13fce720a0c2cbbfcb7 Author: Guchun Chen Date: Thu Jul 14 16:37:29 2022 +0800 drm/amdgpu: drop runpm from amdgpu_device structure It's redundant, as now switching to rpm_mode to indicate runtime power management mode. Suggested-by: Lijo Lazar Signed-off-by: Guchun Chen Reviewed-by: Lijo Lazar Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 23 ++++++++++------------- 3 files changed, 15 insertions(+), 19 deletions(-) commit 75a9ad8c1b7960794c16182fd90852918ecdc0a6 Author: Guchun Chen Date: Thu Jul 14 16:01:03 2022 +0800 drm/amdgpu: drop runtime pm disablement quirk on several sienna cichlid cards This quirk is not needed any more as it's fixed by bypassing SMU FW reloading in runtime resume. Signed-off-by: Guchun Chen Reviewed-by: Lijo Lazar Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 13 ------------- 1 file changed, 13 deletions(-) commit f746556aa9724d740c44861db0ac005ae50e1332 Author: Guchun Chen Date: Thu Jul 14 15:55:37 2022 +0800 drm/amdgpu: skip SMU FW reloading in runpm BACO case SMU is always alive, so it's fine to skip SMU FW reloading when runpm resumed from BACO, this can avoid some race issues when resuming SMU. Suggested-by: Evan Quan Signed-off-by: Guchun Chen Reviewed-by: Lijo Lazar Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 50fe04d46aab77cf8fc3d48fbc38d872d181a849 Author: Guchun Chen Date: Thu Jul 14 15:32:51 2022 +0800 drm/amdgpu: introduce runtime pm mode It can benefit code consistency in future. Suggested-by: Lijo Lazar Signed-off-by: Guchun Chen Reviewed-by: Lijo Lazar Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +++++- drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) commit 2d04559e0660cf503d4e46cfbd7421d0b6156aa1 Author: Dan Carpenter Date: Wed Jul 13 14:33:37 2022 +0300 drm/amd/display: Remove unnecessary NULL check in commit_planes_for_stream() Smatch complains that: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3369 commit_planes_for_stream() warn: variable dereferenced before check 'stream' (see line 3114) The 'stream' pointer cannot be NULL and the check can be removed. Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 133dc89c640f965c2736e70d8dec0699d763850d Author: André Almeida Date: Thu Jul 14 10:49:50 2022 -0300 drm/amdgpu: Clarify asics naming in Kconfig options Clarify which architecture those asics acronyms refers to. Signed-off-by: André Almeida Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 606ee059f85a9aabb0242cbc72852572a3c40432 Author: Colin Ian King Date: Thu Jul 14 11:34:27 2022 +0100 drm/amd/display: Fix spelling mistake "supporing" -> "supporting" There is a spelling mistake in a dml_print message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3876a8b5e241081b2a519f848a65c00d8e6cd124 Author: Guenter Roeck Date: Tue Jul 12 15:42:47 2022 -0700 drm/amd/display: Enable building new display engine with KCOV enabled The new display engine uses floating point math, which is not supported by KCOV. Commit 9d1d02ff3678 ("drm/amd/display: Don't build DCN1 when kcov is enabled") tried to work around the problem by disabling CONFIG_DRM_AMD_DC_DCN if KCOV_INSTRUMENT_ALL and KCOV_ENABLE_COMPARISONS are enabled. The result is that KCOV can not be enabled on systems which require this display engine. A much simpler and less invasive solution is to disable KCOV selectively when compiling the display enagine while keeping it enabled for the rest of the kernel. Fixes: 9d1d02ff3678 ("drm/amd/display: Don't build DCN1 when kcov is enabled") Cc: Arnd Bergmann Cc: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Guenter Roeck Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/Kconfig | 2 +- drivers/gpu/drm/amd/display/dc/Makefile | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 958afce98c2c86732483458c03540d3c6ef45254 Author: Alex Deucher Date: Wed Jul 6 11:10:15 2022 -0400 drm/amdgpu: restore original stable pstate on ctx fini Save the original stable pstate on ctx init and restore it on ctx fini so that we restore a manually selected stable pstate on ctx exit. v2: fix init order (Alex) v3: don't add new variable to ctx struct (Evan) Fixes: c65b364c52ba ("drm/amdgpu/ctx: only reset stable pstate if the user changed it (v2)") Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 60 ++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 27 deletions(-) commit 88a15fbb47db483d06b12b1ae69f114b96361a96 Author: Prashant Malani Date: Mon Jul 18 18:55:51 2022 +0000 platform/chrome: cros_typec_switch: Add ACPI Kconfig dep Add the ACPI Kconfig dependency that was missed during the initial driver submission. Fixes the following compiler errors: drivers/platform/chrome/cros_typec_switch.c:93:9: error: call to undeclared function 'acpi_evaluate_integer'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] ret = acpi_evaluate_integer(adev->handle, "_ADR", NULL, &index); drivers/platform/chrome/cros_typec_switch.c:93:35: error: incomplete definition of type 'struct acpi_device' ret = acpi_evaluate_integer(adev->handle, "_ADR", NULL, &index); Fixes: e54369058f3d ("platform/chrome: cros_typec_switch: Add switch driver") Reported-by: Reported-by: kernel test robot Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20220718185551.1025288-1-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/platform/chrome/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98a90f1f0fdd112b85b16ef6ceee69f319ab9311 Author: Alex Deucher Date: Mon Jul 11 22:04:56 2022 -0400 drm/amdgpu: use the same HDP flush registers for all nbio 2.3.x Align RDNA2.x with other asics. One HDP bit per SDMA instance, aligned with firmware. This is effectively a revert of commit 369b7d04baf3 ("drm/amdgpu/nbio2.3: don't use GPU_HDP_FLUSH bit 12"). On further discussions with the relevant hardware teams, re-align the bits for SDMA. Fixes: 369b7d04baf3 ("drm/amdgpu/nbio2.3: don't use GPU_HDP_FLUSH bit 12") Reviewed-by: Kent Russell Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 +---- drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c | 21 --------------------- drivers/gpu/drm/amd/amdgpu/nbio_v2_3.h | 1 - 3 files changed, 1 insertion(+), 26 deletions(-) commit 912db6a58738e8be502838eb6a88f207ba356cd7 Author: Alex Deucher Date: Mon Jul 11 21:59:06 2022 -0400 drm/amdgpu: use the same HDP flush registers for all nbio 7.4.x Align aldebaran with all other asics. One HDP bit per SDMA instance, aligned with firmware. This is effectively a revert of commit a0f9f8546668 ("drm/amdgpu/nbio7.4: don't use GPU_HDP_FLUSH bit 12"). On further discussions with the relevant hardware teams, re-align the bits for SDMA. Fixes: a0f9f8546668 ("drm/amdgpu/nbio7.4: don't use GPU_HDP_FLUSH bit 12") Reviewed-by: Kent Russell Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 +---- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 21 --------------------- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.h | 1 - 3 files changed, 1 insertion(+), 26 deletions(-) commit dc14036fb3240a1bc2677cf8de33fbcb3af77826 Merge: c76d09da77d6 ff6992735ade Author: Greg Kroah-Hartman Date: Mon Jul 18 22:41:42 2022 +0200 Merge 5.19-rc7 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 4c33e5179ff1a09cdfba38fa4fd260ae6735d3bb Author: Vijendar Mukunda Date: Thu Jun 30 07:57:14 2022 +0530 drm/amdgpu: create I2S platform devices for Jadeite platform Jadeite platform uses I2S MICSP instance. Create platform devices for DMA controller and I2S controller for Jadeite platform. Signed-off-by: Vijendar Mukunda Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 293 ++++++++++++++++++++------------ 1 file changed, 184 insertions(+), 109 deletions(-) commit 49062ee374f7a47443dac7e255bd419861de5b43 Author: Vijendar Mukunda Date: Thu Jun 30 07:56:50 2022 +0530 drm/amdgpu: add dmi check for jadeite platform DMI check is required to distinguish Jadeite platform from Stoney base variant. Add DMI check logic for Jadeite platform. Signed-off-by: Vijendar Mukunda Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 748262eb400e809aa13e3485f4983c3db3d0ebb3 Author: lin cao Date: Wed Jul 13 18:20:58 2022 +0800 drm/amdgpu: Call trace info was found in dmesg when loading amdgpu In the case of SRIOV, the register smnMp1_PMI_3_FIFO will get an invalid value which will cause the "shift out of bound". In Ubuntu22.04, this issue will be checked an related call trace will be reported in dmesg. Signed-off-by: lin cao Reviewed-by: Jingwen Chen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 604d3a3f0dca0ef0ab0322f5e7af8c70c5ddb6d4 Author: Vijendar Mukunda Date: Wed Jul 6 15:13:55 2022 +0530 drm/amdgpu: fix for coding style issues Fixed below checkpatch warnings and errors drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:131: CHECK: Comparison to NULL could be written "apd" drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:150: CHECK: Comparison to NULL could be written "apd" drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:196: CHECK: Prefer kernel type 'u64' over 'uint64_t' drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:224: CHECK: Please don't use multiple blank lines drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:226: CHECK: Comparison to NULL could be written "!adev->acp.acp_genpd" drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:233: CHECK: Please don't use multiple blank lines drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:239: CHECK: Alignment should match open parenthesis drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:241: CHECK: Comparison to NULL could be written "!adev->acp.acp_cell" drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:247: CHECK: Comparison to NULL could be written "!adev->acp.acp_res" drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:253: CHECK: Comparison to NULL could be written "!i2s_pdata" drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:350: CHECK: Alignment should match open parenthesis drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:550: ERROR: that open brace { should be on the previous line Signed-off-by: Vijendar Mukunda Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 35 +++++++++++---------------------- 1 file changed, 12 insertions(+), 23 deletions(-) commit e4b1edf48fa37cf4f5ca403e384731fe28d13691 Author: YiPeng Chai Date: Mon Jul 4 17:18:14 2022 +0800 drm/amdgpu: add umc ras functions for umc v8_10_0 1. Support query umc ras error counter. 2. Support ras umc ue error address remapping. Signed-off-by: YiPeng Chai Reviewed-by: Alexander Deucher Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 10 + drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 27 ++- drivers/gpu/drm/amd/amdgpu/umc_v8_10.c | 357 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/umc_v8_10.h | 70 +++++++ 5 files changed, 464 insertions(+), 2 deletions(-) commit 75510fac07cdde23c9217c8299b6cd64c689fb2b Author: YiPeng Chai Date: Mon Jul 4 17:16:38 2022 +0800 drm/amdgpu: add umc v8_10_0 ip headers Add umc v8_10_0 register offset and shift masks header files Signed-off-by: YiPeng Chai Reviewed-by: Alexander Deucher Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher .../amd/include/asic_reg/umc/umc_8_10_0_offset.h | 33 ++++++++ .../amd/include/asic_reg/umc/umc_8_10_0_sh_mask.h | 94 ++++++++++++++++++++++ 2 files changed, 127 insertions(+) commit f6a3f66063ca39e7ee5fcee59e889c5ec4de9dc0 Author: Andrey Grodzovsky Date: Wed Jul 13 12:57:50 2022 -0400 drm/amdgpu: Get rid of amdgpu_job->external_hw_fence This is a follow-up cleanup to [1]. See bellow refcount balancing for calling amdgpu_job_submit_direct after this cleanup as far as I calculated. amdgpu_fence_emit dma_fence_init 1 dma_fence_get(fence) 2 rcu_assign_pointer(*ptr, dma_fence_get(fence) 3 ---> amdgpu_job_submit_direct completes before fence signaled amdgpu_sa_bo_free (*sa_bo)->fence = dma_fence_get(fence) 4 amdgpu_job_free dma_fence_put 3 amdgpu_vcn_enc_get_destroy_msg *fence = dma_fence_get(f) 4 dma_fence_put(f); 3 amdgpu_vcn_enc_ring_test_ib dma_fence_put(fence) 2 amdgpu_fence_process dma_fence_put 1 amdgpu_sa_bo_remove_locked dma_fence_put 0 ---> amdgpu_job_submit_direct completes after fence signaled amdgpu_fence_process dma_fence_put 2 amdgpu_job_free dma_fence_put 1 amdgpu_vcn_enc_get_destroy_msg *fence = dma_fence_get(f) 2 dma_fence_put(f); 1 amdgpu_vcn_enc_ring_test_ib dma_fence_put(fence) 0 [1] - https://patchwork.kernel.org/project/dri-devel/cover/20220624180955.485440-1-andrey.grodzovsky@amd.com/ Signed-off-by: Andrey Grodzovsky Suggested-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 27 +++++---------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 1 - 3 files changed, 6 insertions(+), 25 deletions(-) commit 0b15205c7325dc20b7da0068307670d222d66949 Author: Sonny Jiang Date: Tue Jul 12 16:33:10 2022 -0400 drm/amdgpu: limiting AV1 to first instance on VCN4 decode AV1 is only supported on first instance. Signed-off-by: Sonny Jiang Reviewed-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 131 ++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) commit 08333b911f01862e71e51b7065fb4baca3cd2e67 Author: keliu Date: Fri May 27 07:38:32 2022 +0000 remoteproc: Directly use ida_alloc()/free() Use ida_alloc()/ida_free() instead of deprecated ida_simple_get()/ida_simple_remove() . Signed-off-by: keliu Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220527073832.2474641-1-liuke94@huawei.com drivers/remoteproc/remoteproc_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cab8300b5621a54aa25306ff800c27fa5a4632d7 Author: Mukesh Ojha Date: Tue Apr 19 16:55:54 2022 +0530 remoteproc: Use unbounded workqueue for recovery work There could be a scenario when there is too much load on a core (n number of tasks which is affined) or in a case when multiple rproc subsystem is going for recovery, they queue their recovery work to one core so even though subsystem are independent their recovery will be delayed if one of the subsystem recovery work is taking more time in completing. If we make this queue unbounded, the recovery work could be picked on any cpu. This patch is trying to address this. Signed-off-by: Mukesh Ojha Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1650367554-15510-1-git-send-email-quic_mojha@quicinc.com drivers/remoteproc/remoteproc_core.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 60349fd52ecbb8b14545ff25aba2f2e230c4d618 Author: Minghao Chi Date: Mon Apr 11 01:36:56 2022 +0000 remoteproc: using pm_runtime_resume_and_get instead of pm_runtime_get_sync Using pm_runtime_resume_and_get is more appropriate for simplifing code Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220411013656.2517150-1-chi.minghao@zte.com.cn drivers/remoteproc/keystone_remoteproc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3f52d118f992d569d96da010497a39cd021af011 Author: Abel Vesa Date: Wed Jul 13 18:28:35 2022 +0300 remoteproc: qcom_q6v5_pas: Deal silently with optional px and cx regulators Use _get_optional as some platforms might not provide the px and cx regulators. This avoids printing the following for each unavailable regulator: [ 4.350229] qcom_q6v5_pas 5c00000.remoteproc: supply cx not found, using dummy regulator [ 4.374224] qcom_q6v5_pas 5c00000.remoteproc: supply px not found, using dummy regulator Signed-off-by: Abel Vesa Acked-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220713152835.3848875-1-abel.vesa@linaro.org drivers/remoteproc/qcom_q6v5_pas.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit fd75c2d01a50d877b375786abbeb179564ea8ffc Author: Siddharth Gupta Date: Tue Jul 5 17:38:20 2022 +0530 remoteproc: sysmon: Send sysmon state only for running rprocs When a new remoteproc boots up, send the sysmon state notification of only running remoteprocs. Sending state of remoteprocs booting up in parallel can cause a race between SSR clients of the remoteproc that is booting up and the sysmon notification for the same remoteproc, resulting in an inconsistency between which state the remoteproc that is booting up in parallel. For example - if remoteproc A and B crash one after the other, after remoteproc A boots up, if the remoteproc A tries to get the state of remoteproc B before the sysmon subdevice for B is invoked but after the ssr subdevice of B has been invoked, clients on remoteproc A might get confused when the sysmon notification indicates a different state. Signed-off-by: Siddharth Gupta Signed-off-by: Sibi Sankar Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1657022900-2049-8-git-send-email-quic_sibis@quicinc.com drivers/remoteproc/qcom_sysmon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 47c04e00eff86a81cd357c3feed04c86089bcb85 Author: Sibi Sankar Date: Tue Jul 5 17:38:19 2022 +0530 remoteproc: sysmon: Wait for SSCTL service to come up The SSCTL service comes up after a finite time when the remote Q6 comes out of reset. Any graceful shutdowns requested during this period will be a NOP and abrupt tearing down of the glink channel might lead to pending transactions on the remote Q6 side and will ultimately lead to a fatal error. Fix this by waiting for the SSCTL service when a graceful shutdown is requested. Fixes: 1fb82ee806d1 ("remoteproc: qcom: Introduce sysmon") Reviewed-by: Matthias Kaehlcke Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1657022900-2049-7-git-send-email-quic_sibis@quicinc.com drivers/remoteproc/qcom_sysmon.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0ad7e3ed20425ffff37801c7d94f2bab74a242d5 Author: Siddharth Gupta Date: Tue Jul 5 17:38:18 2022 +0530 remoteproc: qcom: q6v5: Set q6 state to offline on receiving wdog irq Due to firmware bugs on the Q6 the hardware watchdog irq can be triggered multiple times. As the remoteproc framework schedules work items for the recovery process, if the other threads do not get a chance to run before recovery is completed the proceeding threads will see the state of the remoteproc as running and kill the remoteproc while it is running. This can result in various SMMU and NOC errors. This change sets the state of the remoteproc to offline whenever a watchdog irq is received. Signed-off-by: Siddharth Gupta Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1657022900-2049-6-git-send-email-quic_sibis@quicinc.com drivers/remoteproc/qcom_q6v5.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7b6ece968fca4ec9e42d34caff7e06dc84c45717 Author: Siddharth Gupta Date: Tue Jul 5 17:38:17 2022 +0530 remoteproc: qcom: pas: Check if coredump is enabled Client drivers need to check if coredump is enabled for the rproc before continuing with coredump generation. This change adds a check in the PAS driver. Fixes: 8ed8485c4f05 ("remoteproc: qcom: Add capability to collect minidumps") Signed-off-by: Siddharth Gupta Signed-off-by: Sibi Sankar Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1657022900-2049-5-git-send-email-quic_sibis@quicinc.com drivers/remoteproc/qcom_q6v5_pas.c | 3 +++ 1 file changed, 3 insertions(+) commit dc86c129b4fb5c387b0678cfb6081ef29809cc41 Author: Siddharth Gupta Date: Tue Jul 5 17:38:16 2022 +0530 remoteproc: qcom: pas: Mark devices as wakeup capable device_wakeup_enable() on its own is not capable of setting device as wakeup capable, it needs to be used in conjunction with device_set_wakeup_capable(). The device_init_wakeup() calls both these functions on the device passed. Fixes: a781e5aa5911 ("remoteproc: core: Prevent system suspend during remoteproc recovery") Signed-off-by: Siddharth Gupta Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1657022900-2049-4-git-send-email-quic_sibis@quicinc.com drivers/remoteproc/qcom_q6v5_pas.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5ddf5969e9272b01932366202a711dd5f51b4aea Author: Siddharth Gupta Date: Tue Jul 5 17:38:15 2022 +0530 remoteproc: qcom: pas: Mark va as io memory The pas driver remaps the entire carveout region using the dev_ioremap_wc() call, which is then used in the adsp_da_to_va() calls made by the rproc framework. This change marks the va returned by this call as an iomem va. Signed-off-by: Siddharth Gupta Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1657022900-2049-3-git-send-email-quic_sibis@quicinc.com drivers/remoteproc/qcom_q6v5_pas.c | 3 +++ 1 file changed, 3 insertions(+) commit 86590c308bffa035fb7fd5dbb13e424523223e0e Author: Sibi Sankar Date: Tue Jul 5 17:38:14 2022 +0530 remoteproc: qcom: pas: Add decrypt shutdown support for modem The initial shutdown request to modem on SM8450 SoCs would start the decryption process and will keep returning errors until the modem shutdown is complete. Fix this by retrying shutdowns in fixed intervals. Err Logs on modem shutdown: qcom_q6v5_pas 4080000.remoteproc: failed to shutdown: -22 remoteproc remoteproc3: can't stop rproc: -22 Fixes: 5cef9b48458d ("remoteproc: qcom: pas: Add SM8450 remoteproc support") Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1657022900-2049-2-git-send-email-quic_sibis@quicinc.com drivers/remoteproc/qcom_q6v5_pas.c | 43 +++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) commit 4c6e20077b222310c972aac56b3b3b7e9d36e7a0 Author: Dmitry Baryshkov Date: Mon Jul 4 19:22:02 2022 +0300 remoteproc: qcom: q6v5-mss: add powerdomains to MSM8996 config MSM8996 follows the rest of MSS devices and requires a vote on MX and CX power domains. Add corresponding entry to the device data. Fixes: 4760a896be88 ("remoteproc: q6v5-mss: Vote for rpmh power domains") Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220704162202.819051-1-dmitry.baryshkov@linaro.org drivers/remoteproc/qcom_q6v5_mss.c | 5 +++++ 1 file changed, 5 insertions(+) commit c2ca7a2e4bc1ebc8dd28040161215df0e753ab15 Author: Sibi Sankar Date: Tue May 24 18:15:35 2022 +0530 remoteproc: qcom_q6v5: Introduce panic handler for MSS Make the MSS q6v5 remoteproc drivers implement the panic handler that will invoke a stop to prepare the remoteprocs for post mortem debugging. Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1653396335-6295-3-git-send-email-quic_sibis@quicinc.com drivers/remoteproc/qcom_q6v5_mss.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2aa9f1aaa0670ad3b15a0dfb50a8606694f21e25 Author: Sibi Sankar Date: Tue May 24 18:15:34 2022 +0530 remoteproc: qcom_q6v5_mss: Update MBA log info Update MBA text logs location/size in IMEM to aid tools extract them after ramdump collection. The size of the MBA text logs is pre-determined and limited to 4K. Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1653396335-6295-2-git-send-email-quic_sibis@quicinc.com drivers/remoteproc/qcom_q6v5_mss.c | 3 +++ 1 file changed, 3 insertions(+) commit d0c11db55d9bded61e17846ccf9b47c75717deb3 Author: Krzysztof Kozlowski Date: Thu May 19 09:33:49 2022 +0200 remoteproc: qcom: correct kerneldoc Correct kerneldoc warnings like: drivers/remoteproc/qcom_common.c:68: warning: expecting prototype for struct minidump_subsystem_toc. Prototype was for struct minidump_subsystem instead Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220519073349.7270-1-krzysztof.kozlowski@linaro.org drivers/remoteproc/qcom_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fc156629b23a21181e473e60341e3a78af25a1d4 Author: Sibi Sankar Date: Wed May 11 11:27:05 2022 +0530 remoteproc: qcom_q6v5_mss: map/unmap metadata region before/after use The application processor accessing the dynamically assigned metadata region after assigning it to the remote Q6 would lead to an XPU violation. Fix this by un-mapping the metadata region post firmware header copy. The metadata region is freed only after the modem Q6 is done with fw header authentication. Signed-off-by: Sibi Sankar Acked-by: Arnd Bergmann Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1652248625-990-1-git-send-email-quic_sibis@quicinc.com drivers/remoteproc/qcom_q6v5_mss.c | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) commit 8672e79d98bc702084f65ef6d118333bd73f09a2 Author: ran jianping Date: Thu Apr 28 06:45:45 2022 +0000 remoteproc: qcom: using pm_runtime_resume_and_get to simplify the code Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and pm_runtime_put_noidle. This change is just to simplify the code, no actual functional changes. Reported-by: Zeal Robot Signed-off-by: ran jianping Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220428064545.3850057-1-ran.jianping@zte.com.cn drivers/remoteproc/qcom_q6v5_adsp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2aa0d4c881986b4d0eef35c2651cdc9f3c96d365 Author: Krzysztof Kozlowski Date: Tue Jul 12 17:46:02 2022 +0200 dt-bindings: bus: qcom,ssc-block-bus: rework arrays and drop redundant minItems There is no need to specify "minItems" if it equals to "maxItems". On the other hand number of items in an array can be specified via describing items, which might bring some additional information. This simplifies a bit the binding. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220712154602.26994-1-krzysztof.kozlowski@linaro.org .../bindings/bus/qcom,ssc-block-bus.yaml | 25 ++++++++++------------ 1 file changed, 11 insertions(+), 14 deletions(-) commit a6bd98c45d1aeec59493617b02a86de39d384535 Author: Blake Jones Date: Wed Jun 29 14:36:32 2022 -0700 perf buildid-list: Add a "-m" option to show kernel and modules build-ids This new option displays all of the information needed to do external BuildID-based symbolization of kernel stack traces, such as those collected by bpf_get_stackid(). For each kernel module plus the main kernel, it displays the BuildID, the start and end virtual addresses of that module's text range (rounded out to page boundaries), and the pathname of the module. When run as a non-privileged user, the actual addresses of the modules' text ranges are not available, so the tools displays "0, " for kernel modules and "0, 0xffffffffffffffff" for the kernel itself. Sample output: root# perf buildid-list -m cf6df852fd4da122d616153353cc8f560fd12fe0 ffffffffa5400000 ffffffffa6001e27 [kernel.kallsyms] 1aa7209aa2acb067d66ed6cf7676d65066384d61 ffffffffc0087000 ffffffffc008b000 /lib/modules/5.15.15-1rodete2-amd64/kernel/crypto/sha512_generic.ko 3857815b5bf0183697b68f8fe0ea06121644041e ffffffffc008c000 ffffffffc0098000 /lib/modules/5.15.15-1rodete2-amd64/kernel/arch/x86/crypto/sha512-ssse3.ko 4081fde0bca2bc097cb3e9d1efcb836047d485f1 ffffffffc0099000 ffffffffc009f000 /lib/modules/5.15.15-1rodete2-amd64/kernel/drivers/acpi/button.ko 1ef81ba4890552ea6b0314f9635fc43fc8cef568 ffffffffc00a4000 ffffffffc00aa000 /lib/modules/5.15.15-1rodete2-amd64/kernel/crypto/cryptd.ko cc5c985506cb240d7d082b55ed260cbb851f983e ffffffffc00af000 ffffffffc00b6000 /lib/modules/5.15.15-1rodete2-amd64/kernel/drivers/i2c/busses/i2c-piix4.ko [...] Committer notes: u64 formatter should be PRIx64 for printing as hex numbers, fix this: 28 5.28 debian:experimental-x-mips : FAIL gcc version 11.2.0 (Debian 11.2.0-18) builtin-buildid-list.c: In function 'buildid__map_cb': builtin-buildid-list.c:32:24: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'u64' {aka 'long long unsigned int'} [-Werror=format=] 32 | printf("%s %16lx %16lx", bid_buf, map->start, map->end); | ~~~~^ ~~~~~~~~~~ | | | | long unsigned int u64 {aka long long unsigned int} | %16llx builtin-buildid-list.c:32:30: error: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'u64' {aka 'long long unsigned int'} [-Werror=format=] 32 | printf("%s %16lx %16lx", bid_buf, map->start, map->end); | ~~~~^ ~~~~~~~~ | | | | long unsigned int u64 {aka long long unsigned int} | %16llx cc1: all warnings being treated as errors Signed-off-by: Blake Jones Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220629213632.3899212-1-blakejones@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-buildid-list.txt | 4 +++ tools/perf/builtin-buildid-list.c | 39 +++++++++++++++++++++++++- tools/perf/util/machine.c | 15 ++++++++++ tools/perf/util/machine.h | 5 ++++ 4 files changed, 62 insertions(+), 1 deletion(-) commit 8ba69fd2426669de04b79a2e09045f956b9947d1 Merge: d39afb73fd52 0e704f6c42dc Author: Stephen Boyd Date: Mon Jul 18 12:16:47 2022 -0700 Merge tag 'renesas-clk-for-v5.20-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas Pull Renesas clk driver updates from Geert Uytterhoeven: - Add support for the Renesas RZ/Five SoC - Fix initconst confusion on Renesas R-Car Gen4 * tag 'renesas-clk-for-v5.20-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: rcar-gen4: Fix initconst confusion for cpg_pll_config clk: renesas: r9a07g043: Add support for RZ/Five SoC dt-bindings: clock: r9a07g043-cpg: Add Renesas RZ/Five CPG Clock and Reset Definitions commit 1ff5d97f070c31b0bac438034c64baa3f840f4da Author: Prashant Malani Date: Tue Jul 12 21:03:18 2022 +0000 platform/chrome: cros_ec_typec: Register port altmodes Instead of using manually managed altmode structs, register the port's altmodes with the Type-C framework. This facilitates matching them to partner altmodes later. Cc: Heikki Krogerus Signed-off-by: Prashant Malani Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20220712210318.2671292-2-pmalani@chromium.org drivers/platform/chrome/cros_ec_typec.c | 51 ++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 11 deletions(-) commit a47bc5a0c4c04958b6a0eb9136c6f553baf37284 Author: Prashant Malani Date: Tue Jul 12 21:03:17 2022 +0000 platform/chrome: cros_ec_typec: Rename port altmode array Rename "p_altmode" to "port_altmode" which is a less ambiguous name for the port_altmode struct array. Signed-off-by: Prashant Malani Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20220712210318.2671292-1-pmalani@chromium.org drivers/platform/chrome/cros_ec_typec.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit bf14fad19ffbb3d37a1bb1324f966973e7d4a7b6 Author: Ming Lei Date: Tue Jul 19 00:08:51 2022 +0800 mmc: fix disk/queue leak in case of adding disk failure In case of adding disk failure, the disk needs to be released, otherwise disk/queue is leaked. Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20220718160851.312972-1-ming.lei@redhat.com Signed-off-by: Jens Axboe drivers/mmc/core/block.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fe3333f6953848f1c24e91a1cf70eed026dc3a86 Author: Dan Carpenter Date: Mon Jul 18 14:14:09 2022 +0300 ublk_drv: fix an IS_ERR() vs NULL check The blk_mq_alloc_disk_for_queue() doesn't return error pointers, it returns NULL on error. Fixes: cebbe577cb17 ("ublk_drv: fix request queue leak") Signed-off-by: Dan Carpenter Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/YtVAgedTsQVK1oTM@kili Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d276a22314c2bad9136c5e0b09eb3c8a560e1161 Author: Christoph Hellwig Date: Mon Jul 18 08:30:13 2022 +0200 ublk: remove UBLK_IO_F_INTEGRITY The ublk protocol has no mechanism to actually transfer the integrity metadata, so don't define this flag, which requires that an integrity payload is attached to a bio. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220718063013.335531-1-hch@lst.de Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 3 --- include/uapi/linux/ublk_cmd.h | 1 - 2 files changed, 4 deletions(-) commit 6b1439d203a3c3d7adcf31ba70734eb95f8fa02d Author: Yang Li Date: Mon Jul 18 09:54:31 2022 +0800 ublk_drv: remove unneeded semicolon Eliminate the following coccicheck warnings: ./drivers/block/ublk_drv.c:1467:2-3: Unneeded semicolon ./drivers/block/ublk_drv.c:1528:2-3: Unneeded semicolon Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20220718015431.40185-1-yang.lee@linux.alibaba.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f50e5d670c622349277a46996a70386cc3661b10 Author: Yang Yingliang Date: Mon Jul 18 12:24:08 2022 +0800 ublk_drv: fix missing error return code in ublk_add_dev() If blk_mq_init_queue() fails, it should return error code in ublk_add_dev() Fixes: cebbe577cb17 ("ublk_drv: fix request queue leak") Signed-off-by: Yang Yingliang Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20220718042408.3132835-1-yangyingliang@huawei.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b2111a01dc3c3ace57a44e1f2940866f7bbbce2f Merge: ff6992735ade 53f853d55e31 Author: Rafael J. Wysocki Date: Mon Jul 18 20:33:26 2022 +0200 Merge tag 'devfreq-next-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux Pull devfreq updates for v5.20 from Chanwoo Choi: "1. Add new Mediatek CCI (Cache Coherent Interconnect) devfreq driver - Add new MediaTek Cache Coherent Interconnect (CCI) devfreq drviver which supports the dynamic voltage and clock scaling. This driver uses the passive devfreq governor to get target frequencies and adjust voltages because it depends on MediaTek CPU frequency driver. In MT8183 and MT8186, the MediaTek CCI is supplied by the same regulators with the little core CPUs. 2. Update devfreq drivers - Convert the Samsung Exynos SoC Bus bindings to DT schema of exynos-bus.c. - Remove kernel-doc warnings by adding the description for unused fucntion parameters on devfreq core. - Use NULL to pass a null pointer rather than zero according to function propotype on imx-bus.c. - Print error message instead of error interger value on tegra30-devfreq.c." * tag 'devfreq-next-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: PM / devfreq: tegra30: Add error message for devm_devfreq_add_device() PM / devfreq: imx-bus: use NULL to pass a null pointer rather than zero PM / devfreq: shut up kernel-doc warnings dt-bindings: interconnect: samsung,exynos-bus: convert to dtschema PM / devfreq: mediatek: Introduce MediaTek CCI devfreq driver dt-bindings: interconnect: Add MediaTek CCI dt-bindings commit 6e28f057e3450ac471eeb6c6d9cf35d9372d29b2 Merge: 5a5adb1528e5 a2f6a7ac60e2 Author: Rafael J. Wysocki Date: Mon Jul 18 20:03:52 2022 +0200 Merge back earlier cpufreq material for 5.20. commit 7aa68dcce0ab8f1211953799eaee282b301ee719 Author: Akira Yokosawa Date: Sun Jul 3 13:27:47 2022 +0900 iio: proximity: sx9324: add empty line in front of bullet list "make htmldocs" emits a warning of: Documentation/ABI/testing/sysfs-bus-iio-sx9324:2: WARNING: Unexpected indentation. This is due to a missing empty line in front of the bullet list. Fix it. Note: The line count of 2 in the warning is not exact in this case. Signed-off-by: Akira Yokosawa Fixes: 4c18a890dff8 ("iio:proximity:sx9324: Add SX9324 support") Link: https://lore.kernel.org/r/202207021703.lEW6FLT1-lkp@intel.com/ Reported-by: kernel test robot Cc: Gwendal Grignou Cc: Stephen Boyd Cc: Jonathan Cameron Reviewed-by: Bagas Sanjaya Link: https://lore.kernel.org/r/abcaa4f5-7a9b-56b5-c11a-a88fef9d1e0a@gmail.com Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio-sx9324 | 1 + 1 file changed, 1 insertion(+) commit a63d28819ffc6f424137170f19d833a80eddbe47 Author: Jiang Jian Date: Wed Jun 22 11:59:25 2022 +0800 iio: magnetometer: hmc5843: Remove duplicate 'the' Fix an obvious typing error, found by spellcheck(1). Signed-off-by: Jiang Jian Link: https://lore.kernel.org/r/20220622035925.5008-1-jiangjian@cdjrlc.com Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/hmc5843_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5933cf48779064c417fa3a2f75bbef51ea4b137 Author: Jonathan Cameron Date: Tue Jun 21 21:27:19 2022 +0100 iio: magn: yas530: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros Using these new macros allows the compiler to remove the unused dev_pm_ops structure and related functions if !CONFIG_PM without the need to mark the functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Linus Walleij Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-37-jic23@kernel.org drivers/iio/magnetometer/yamaha-yas530.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 74f4595ab7f8ff18919c25290e98108671887095 Author: Jonathan Cameron Date: Tue Jun 21 21:27:18 2022 +0100 iio: magnetometer: ak8974: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros Using these new macros allows the compiler to remove the unused dev_pm_ops structure and related functions if !CONFIG_PM without the need to mark the functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Linus Walleij Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-36-jic23@kernel.org drivers/iio/magnetometer/ak8974.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 1539e05b0ba59cb491ecb4c7237d77741d3b44c0 Author: Jonathan Cameron Date: Tue Jun 21 21:27:17 2022 +0100 iio: light: veml6030: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros Using these new macros allows the compiler to remove the unused dev_pm_ops structure and related functions if !CONFIG_PM without the need to mark the functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Rishi Gupta Reviewed-by: Rishi Gupta Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-35-jic23@kernel.org drivers/iio/light/veml6030.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit b904854e14bb1301190370fbc5ca032212330003 Author: Jonathan Cameron Date: Tue Jun 21 21:27:16 2022 +0100 iio: light: vcnl4035: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros Using these new macros allows the compiler to remove the unused dev_pm_ops structure and related functions if !CONFIG_PM without the need to mark the functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Parthiban Nallathambi Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-34-jic23@kernel.org drivers/iio/light/vcnl4035.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit cd4d10b134c2194c50dc7f58c1f9c502f7f76656 Author: Jonathan Cameron Date: Tue Jun 21 21:27:15 2022 +0100 iio: light: vcnl4000: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros Using these new macros allows the compiler to remove the unused dev_pm_ops structure and related functions if !CONFIG_PM without the need to mark the functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Mathieu Othacehe Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-33-jic23@kernel.org drivers/iio/light/vcnl4000.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 5672f3982ac98c8a8b8f1c5d4e2b3cd03342ea9d Author: Jonathan Cameron Date: Tue Jun 21 21:27:14 2022 +0100 iio: light: tsl2591: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() Using these new macros allows removal of unused pm_ops structure and functions if !CONFIG_PM without the need to mark the functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Joe Sandom Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-32-jic23@kernel.org drivers/iio/light/tsl2591.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit f541541a37e4887f89b5b5473d41cf88671eb1a4 Author: Jonathan Cameron Date: Tue Jun 21 21:27:13 2022 +0100 iio: light: tsl2583: Use DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr() Using these new macros allows removal of unused pm_ops structure and functions if !CONFIG_PM without the need to mark the function __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Brian Masney Reviewed-by: Brian Masney Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-31-jic23@kernel.org drivers/iio/light/tsl2583.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 9ec91dd4e9444ead21cc07a9b7a99a9e96a47801 Author: Jonathan Cameron Date: Tue Jun 21 21:27:12 2022 +0100 iio: light: isl29028: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() Using these new macros allows removal of unused pm_ops structure and functions if !CONFIG_PM without the need to mark the functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Brian Masney Reviewed-by: Brian Masney Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-30-jic23@kernel.org drivers/iio/light/isl29028.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 7b79cda9e297023ad605efaf9a0ae0cf7e27e70d Author: Jonathan Cameron Date: Tue Jun 21 21:27:11 2022 +0100 iio: light: gp2ap002: Switch to DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr() Switching to these newer macros allows use of pm_ptr() to remove the unused functions and structure if !CONFIG_PM without the need to mark anything __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Linus Walleij Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-29-jic23@kernel.org drivers/iio/light/gp2ap002.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 2583f5e828155c2dcacda64c1f42e86d8a4c2d5b Author: Jonathan Cameron Date: Tue Jun 21 21:27:10 2022 +0100 iio: adc: imx8qxp: Switch to DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr() Switching to these newer macros allows the compiler to remove the unused functions and struct dev_pm_ops if !CONFIG_PM without the need to mark anything __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Cai Huoqing Reviewed-by: Haibo Chen Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-28-jic23@kernel.org drivers/iio/adc/imx8qxp-adc.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit a79163d19ef7b385f48876898c28a58f35a1df35 Author: Jonathan Cameron Date: Tue Jun 21 21:27:09 2022 +0100 iio: light: us5182: Switch from CONFIG_PM guards to pm_ptr() etc Letting the compiler remove these functions when the kernel is built without CONFIG_PM support is simpler and less error prone than the use of #ifdef based config guards. Removing instances of this approach from IIO also stops them being copied into new drivers. Very likely it would be safe to use DEFINE_RUNTIME_DEV_PM_OPS() here, but that would be a functional change. Signed-off-by: Jonathan Cameron Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-27-jic23@kernel.org drivers/iio/light/us5182d.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit fb4e8e2dadc91ea6478045910192e46bc880c32c Author: Jonathan Cameron Date: Tue Jun 21 21:27:08 2022 +0100 iio: temperature: ltc2983: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Nuno Sá Reviewed-by: Nuno Sá Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-26-jic23@kernel.org drivers/iio/temperature/ltc2983.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit dc69c61019dcbcc4d8e489db6420812ddc0ceb35 Author: Jonathan Cameron Date: Tue Jun 21 21:27:07 2022 +0100 iio: proximity: cros_ec_mkbp: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Enric Balletbo i Serra Cc: Gwendal Grignou Cc: Stephen Boyd Reviewed-by: Gwendal Grignou Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-25-jic23@kernel.org drivers/iio/proximity/cros_ec_mkbp_proximity.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dc0258e33ddb9aef05d212cdbc1a76aa03a5badd Author: Jonathan Cameron Date: Tue Jun 21 21:27:06 2022 +0100 iio: light: cm3605: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-24-jic23@kernel.org drivers/iio/light/cm3605.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 7eff2dcec69c04f60144e2c13f07b21cb66a638d Author: Jonathan Cameron Date: Tue Jun 21 21:27:05 2022 +0100 iio: light: bh1750: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Tomasz Duszynski Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-23-jic23@kernel.org drivers/iio/light/bh1750.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c422aa418a7ddd3bde04b2c0ad573c34aae53d35 Author: Jonathan Cameron Date: Tue Jun 21 21:27:04 2022 +0100 iio: light: as73211: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Christian Eggers Reviewed-by: Christian Eggers Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-22-jic23@kernel.org drivers/iio/light/as73211.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit f3231f912bf478ced5628f808f8b6e0a1e1bd917 Author: Jonathan Cameron Date: Tue Jun 21 21:27:03 2022 +0100 iio: light: al3320a: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: David Heidelberg Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-21-jic23@kernel.org drivers/iio/light/al3320a.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit dc064f21ea80af2c372e2150f416de07f6461ac2 Author: Jonathan Cameron Date: Tue Jun 21 21:27:02 2022 +0100 iio: light: al3010: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: David Heidelberg Reviewed-by: David Heidelberg Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-20-jic23@kernel.org drivers/iio/light/al3010.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b220558c0f2c0ee8d3fa915d3a1a32677e183a4b Author: Jonathan Cameron Date: Tue Jun 21 21:27:01 2022 +0100 iio: health: afe4404: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-19-jic23@kernel.org drivers/iio/health/afe4404.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 3d691c6a9f165fe9b9123a00d10c30227ed59237 Author: Jonathan Cameron Date: Tue Jun 21 21:27:00 2022 +0100 iio: health: afe4403: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-18-jic23@kernel.org drivers/iio/health/afe4403.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit fa55750642d0f4efc2c679ce4c41edf3a5389c9f Author: Jonathan Cameron Date: Tue Jun 21 21:26:59 2022 +0100 iio: gyro: itg3200: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-17-jic23@kernel.org drivers/iio/gyro/itg3200_core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit bf19b23591afa929f51b861a6c470a9a436df620 Author: Jonathan Cameron Date: Tue Jun 21 21:26:58 2022 +0100 iio: dac: mcp4725: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Philippe Reynes Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-16-jic23@kernel.org drivers/iio/dac/mcp4725.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c9ccad99113d99a0c187f909caa326062db5de55 Author: Jonathan Cameron Date: Tue Jun 21 21:26:57 2022 +0100 iio: dac: max5821: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Philippe Reynes Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-15-jic23@kernel.org drivers/iio/dac/max5821.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 7b9d3e85d71f3fdf601a802886465358b3793bae Author: Jonathan Cameron Date: Tue Jun 21 21:26:56 2022 +0100 iio: dac: max517: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Marcus Folkesson Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-14-jic23@kernel.org drivers/iio/dac/max517.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 83a2aa2646e60ea9c7cfd33c81d0491151603690 Author: Jonathan Cameron Date: Tue Jun 21 21:26:55 2022 +0100 iio: dac: ltc1660: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Marcus Folkesson Reviewed-by: Marcus Folkesson Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-13-jic23@kernel.org drivers/iio/dac/ltc1660.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 46b7116712b2dbf91bc8e3c77e368fb8d7181ba6 Author: Jonathan Cameron Date: Tue Jun 21 21:26:54 2022 +0100 iio: dac: ds4424: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Ismail H. Kose Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-12-jic23@kernel.org drivers/iio/dac/ds4424.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 479e575aee77d32707989a53d8b17ccd5862f1e9 Author: Jonathan Cameron Date: Tue Jun 21 21:26:53 2022 +0100 iio: chemical: scd4x: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Roan van Dijk Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-11-jic23@kernel.org drivers/iio/chemical/scd4x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3b4a1bd83908b05b8ddf5c0d73c11cd53d23a7b0 Author: Jonathan Cameron Date: Tue Jun 21 21:26:52 2022 +0100 iio: adc: xilinx-ams: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Michal Simek Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-10-jic23@kernel.org drivers/iio/adc/xilinx-ams.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0fda2c652d41012bf4e104f19c2cb6d113f1318b Author: Jonathan Cameron Date: Tue Jun 21 21:26:51 2022 +0100 iio: adc: ti-am335x: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Miquel Raynal Reviewed-by: Miquel Raynal Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-9-jic23@kernel.org drivers/iio/adc/ti_am335x_adc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0b1e58e9ed3c2c007250ece18e1c9f92f1d04c1a Author: Jonathan Cameron Date: Tue Jun 21 21:26:50 2022 +0100 iio: adc: stmpe-adc: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. This one is a little unusual as no suspend callback, but the cleanup is still worthwhile (and eventual aim is to get rid of old macro). Signed-off-by: Jonathan Cameron Cc: Philippe Schenker Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-8-jic23@kernel.org drivers/iio/adc/stmpe-adc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7ff1d28cc5f4693c10e5a76d37db04c0cddc3835 Author: Jonathan Cameron Date: Tue Jun 21 21:26:49 2022 +0100 iio: adc: mt6577_auxadc: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Zhiyong Tao Cc: Hui Liu Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-7-jic23@kernel.org drivers/iio/adc/mt6577_auxadc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 507379983b105d045e798fbdfe871e824fb6c370 Author: Jonathan Cameron Date: Tue Jun 21 21:26:48 2022 +0100 iio: adc: meson_saradc: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Martin Blumenstingl Acked-by: Martin Blumenstingl Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-6-jic23@kernel.org drivers/iio/adc/meson_saradc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit cdb77810590595c5341b5e8b15e4ce28f1eadced Author: Jonathan Cameron Date: Tue Jun 21 21:26:47 2022 +0100 iio: adc: imx7d_adc: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() In this case we only gain the ability to have the compiler drop the struct dev_pm_ops because the callbacks are called from paths other than suspend and resume. In general the purpose of this new macro is to allow automated removal of the callbacks as well, but that doesn't apply here. Signed-off-by: Jonathan Cameron Cc: Haibo Chen Reviewed-by: Haibo Chen Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-5-jic23@kernel.org drivers/iio/adc/imx7d_adc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 45dc8c59e1432f464d08643a2d5dba73804453b4 Author: Jonathan Cameron Date: Tue Jun 21 21:26:46 2022 +0100 iio: adc: at91-sam5d2: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Eugen Hristev Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-4-jic23@kernel.org drivers/iio/adc/at91-sama5d2_adc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 078d37b73f0557ba7b4447037499eb2e03700aff Author: Jonathan Cameron Date: Tue Jun 21 21:26:45 2022 +0100 iio: adc: ad799x: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-3-jic23@kernel.org drivers/iio/adc/ad799x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 93a73f6a2604e208b758b2bd8f622fb0b0c9098c Author: Jonathan Cameron Date: Tue Jun 21 21:26:44 2022 +0100 iio: accel: bma220: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20220621202719.13644-2-jic23@kernel.org drivers/iio/accel/bma220_spi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 81e2445132e74a2590337c62b17aa63046958547 Author: Jonathan Cameron Date: Sun Jun 26 16:38:28 2022 +0100 iio: adc: ti-ads124s08: Drop unused parameter to ads124s_read() The channel number is never used in this call, so don't pass it in. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220626153828.589664-1-jic23@kernel.org drivers/iio/adc/ti-ads124s08.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 41a7d6718b45f216da8bc4e13f812b382f6d21da Author: Jonathan Cameron Date: Sun Jun 26 17:55:10 2022 +0100 iio: ABI: stm32-timer-trigger: Fuse unusual ABI into main doc. We can't duplicate the description of sampling_frequency. This device has some unusual requirements which we solved by giving a sampling_frequency of 0 special meaning. As such add a note about this unusual usage to the main documentation. Whilst I don't particularly like this resolution, it is the best I could come up with given earlier discussion on this topic. Link: https://lore.kernel.org/linux-iio/20210315101217.00002c50@Huawei.com/ Signed-off-by: Jonathan Cameron Cc: Fabrice Gasnier Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20220626165511.602202-4-jic23@kernel.org Documentation/ABI/testing/sysfs-bus-iio | 3 +++ Documentation/ABI/testing/sysfs-bus-iio-timer-stm32 | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-) commit c089f6fc4a55527047ae40cb72e841822a47425a Author: Jonathan Cameron Date: Sun Jun 26 17:55:09 2022 +0100 iio: ABI: max31865: Drop in_filter_notch_centre_frequency as in main docs. As this is the last element in the file, also delete the file. Signed-off-by: Jonathan Cameron Cc: Navin Sankar Velliangiri Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20220626165511.602202-3-jic23@kernel.org Documentation/ABI/testing/sysfs-bus-iio-temperature-max31865 | 8 -------- 1 file changed, 8 deletions(-) commit 6c6a6ee93999528c989438482e2d5cdcdd6bb688 Author: Jonathan Cameron Date: Sun Jun 26 17:55:08 2022 +0100 iio: ABI: temperature: Unify documentation for thermocouple fault detection. Kernel documentation for a given ABI element should not be duplicated in multiple files, so pull them into one higher level documentation file. Signed-off-by: Jonathan Cameron Cc: Navin Sankar Velliangiri Cc: Paresh Chaudhary Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20220626165511.602202-2-jic23@kernel.org .../ABI/testing/sysfs-bus-iio-temperature-max31856 | 31 ---------------------- .../ABI/testing/sysfs-bus-iio-temperature-max31865 | 12 --------- .../ABI/testing/sysfs-bus-iio-thermocouple | 18 +++++++++++++ 3 files changed, 18 insertions(+), 43 deletions(-) commit 295cc4268bb946a84f7681a9f032ade09a4087f8 Author: Joe Simmons-Talbott Date: Sun Jul 17 22:03:48 2022 -0400 iio: Be consistent with allocation result tests. Make both allocation result tests use the same format if (!ptr) Signed-off-by: Joe Simmons-Talbott Link: https://lore.kernel.org/r/20220718020348.32047-1-joetalbott@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/industrialio-trigger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef7ceceeb1fbffff75999ae10f8b7cb4b256a236 Author: Joe Simmons-Talbott Date: Sun Jul 17 11:34:38 2022 -0400 iio: Use parens with sizeof Prefer 'sizeof(var)' over 'sizeof var' as reported by checkpatch.pl. Signed-off-by: Joe Simmons-Talbott Link: https://lore.kernel.org/r/20220717153438.10800-1-joetalbott@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/industrialio-trigger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3ccb25240012ea0e975e24a199bb1ee9643be743 Author: Tomer Maimon Date: Wed Jul 13 16:26:40 2022 +0300 iio: adc: npcm: Add NPCM8XX support Adding ADC NPCM8XX support to NPCM ADC driver. ADC NPCM8XX uses a different resolution and voltage reference. As part of adding NPCM8XX support: - Add NPCM8XX specific compatible string. - Add data to handle architecture-specific ADC parameters. Signed-off-by: Tomer Maimon Link: https://lore.kernel.org/r/20220713132640.215916-3-tmaimon77@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/adc/npcm_adc.c | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) commit f0b4913ad0e3ce551c2bf6e14f9dddde1cd98176 Author: Tomer Maimon Date: Wed Jul 13 16:26:39 2022 +0300 dt-bindings: iio: adc: npcm: Add npcm845 compatible string Add a compatible string for Nuvoton BMC NPCM845 ADC. Signed-off-by: Tomer Maimon Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220713132640.215916-2-tmaimon77@gmail.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/nuvoton,npcm750-adc.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0b4ae3f6d1210c11f9baf159009c7227eacf90f2 Author: Gwendal Grignou Date: Mon Jul 11 07:47:16 2022 -0700 iio: cros: Register FIFO callback after sensor is registered Instead of registering callback to process sensor events right at initialization time, wait for the sensor to be register in the iio subsystem. Events can come at probe time (in case the kernel rebooted abruptly without switching the sensor off for instance), and be sent to IIO core before the sensor is fully registered. Fixes: aa984f1ba4a4 ("iio: cros_ec: Register to cros_ec_sensorhub when EC supports FIFO") Reported-by: Douglas Anderson Signed-off-by: Gwendal Grignou Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20220711144716.642617-1-gwendal@chromium.org Signed-off-by: Jonathan Cameron drivers/iio/accel/cros_ec_accel_legacy.c | 4 +- .../iio/common/cros_ec_sensors/cros_ec_lid_angle.c | 4 +- .../iio/common/cros_ec_sensors/cros_ec_sensors.c | 6 +-- .../common/cros_ec_sensors/cros_ec_sensors_core.c | 58 ++++++++++++++++------ drivers/iio/light/cros_ec_light_prox.c | 6 +-- drivers/iio/pressure/cros_ec_baro.c | 6 +-- include/linux/iio/common/cros_ec_sensors_core.h | 7 ++- 7 files changed, 60 insertions(+), 31 deletions(-) commit 42c2b553da64e050c3bd6264f0ffe12f634808a8 Author: Tinghan Shen Date: Fri Jul 15 13:18:21 2022 +0800 remoteproc: mediatek: Support MT8188 SCP MT8188 SCP has two RISC-V cores and similar to MT8195 with some differences. The MT8188 SCP doesn't have the l1tcm and fix the DSP EMI issue on MT8195. Signed-off-by: Tinghan Shen Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220715051821.30707-3-tinghan.shen@mediatek.com Signed-off-by: Mathieu Poirier drivers/remoteproc/mtk_scp.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 165572448dd64197ac1a81a77f55fe01f6b537d9 Author: Tinghan Shen Date: Fri Jul 15 13:18:20 2022 +0800 dt-bindings: remoteproc: mediatek: Add binding for mt8188 scp Add the compatible for mt8188 SCP to the binding. Signed-off-by: Tinghan Shen Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220715051821.30707-2-tinghan.shen@mediatek.com Signed-off-by: Mathieu Poirier Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 6ac0db3f2bf64a02f239421d7c44f9b45b077eee Author: Sasha Neftin Date: Mon Jul 18 12:50:15 2022 +0300 igc: Remove forced_speed_duplex value u8 forced_speed_duplex from value from igc_mac_info struct is not used. This patch comes to tidy up the driver code. Signed-off-by: Sasha Neftin Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igc/igc_hw.h | 2 -- 1 file changed, 2 deletions(-) commit fb24f341c7b977ca4d5993034ea9c5de9763446a Author: Sasha Neftin Date: Tue Jul 5 07:19:10 2022 +0300 igc: Remove MSI-X PBA Clear register MSI-X PBA Clear register is not used. This patch comes to tidy up the driver code. Signed-off-by: Sasha Neftin Tested-by: Naama Meir Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igc/igc_regs.h | 3 --- 1 file changed, 3 deletions(-) commit a5fd39464a4081ce11c801d7e20c4551ba7cb983 Author: Kurt Kanzenbach Date: Mon Jun 6 11:27:47 2022 +0200 igc: Lift TAPRIO schedule restriction Add support for Qbv schedules where one queue stays open in consecutive entries. Currently that's not supported. Example schedule: |tc qdisc replace dev ${INTERFACE} handle 100 parent root taprio num_tc 3 \ | map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \ | queues 1@0 1@1 2@2 \ | base-time ${BASETIME} \ | sched-entry S 0x01 300000 \ # Stream High/Low | sched-entry S 0x06 500000 \ # Management and Best Effort | sched-entry S 0x04 200000 \ # Best Effort | flags 0x02 Signed-off-by: Kurt Kanzenbach Reviewed-by: Vinicius Costa Gomes Tested-by: Naama Meir Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igc/igc_main.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit db4abb4a32ec979ea5deea4d0095fa22ec99a623 Author: Kuniyuki Iwashima Date: Sat Jul 16 21:35:32 2022 -0700 fs/lock: Rearrange ops in flock syscall. The previous patch added flock_translate_cmd() in flock syscall. The test and the other one for LOCK_MAND do not depend on struct fd and are cheaper, so we can put them at the top and defer fdget() after that. Also, we can remove the unlock variable and use type instead. While at it, we fix this checkpatch error. CHECK: spaces preferred around that '|' (ctx:VxV) #45: FILE: fs/locks.c:2099: + if (type != F_UNLCK && !(f.file->f_mode & (FMODE_READ|FMODE_WRITE))) ^ Finally, we can move the can_sleep part just before we use it. Signed-off-by: Kuniyuki Iwashima Signed-off-by: Jeff Layton fs/locks.c | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) commit 4149be7bda7e1b922896599dd9cee7a3ed8cf38b Author: Kuniyuki Iwashima Date: Sat Jul 16 21:35:31 2022 -0700 fs/lock: Don't allocate file_lock in flock_make_lock(). Two functions, flock syscall and locks_remove_flock(), call flock_make_lock(). It allocates struct file_lock from slab cache if its argument fl is NULL. When we call flock syscall, we pass NULL to allocate memory for struct file_lock. However, we always free it at the end by locks_free_lock(). We need not allocate it and instead should use a local variable as locks_remove_flock() does. Also, the validation for flock_translate_cmd() is not necessary for locks_remove_flock(). So we move the part to flock syscall and make flock_make_lock() return nothing. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Chuck Lever Signed-off-by: Jeff Layton fs/locks.c | 46 +++++++++++++++------------------------------- 1 file changed, 15 insertions(+), 31 deletions(-) commit 0698461ad2984892a47582a58eb235488d3aac7f Merge: 0d2997f750d1 ff6992735ade Author: Arnaldo Carvalho de Melo Date: Mon Jul 18 10:36:11 2022 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To update the perf/core codebase. Fix conflict by moving arch__post_evsel_config(evsel, attr) to the end of evsel__config(), after what was added in: 49c692b7dfc9b6c0 ("perf offcpu: Accept allowed sample types only") Signed-off-by: Arnaldo Carvalho de Melo commit 1978c48495171165453a7c90d1345c1d8d776d02 Author: Uwe Kleine-König Date: Sun Jun 12 23:34:00 2022 +0200 powerpc/52xx: Mark gpt driver as not removable Returning an error code (here -EBUSY) from a remove callback doesn't prevent the driver from being unloaded. The only effect is that an error message is emitted and the driver is removed anyhow. So instead drop the remove function (which is equivalent to returning zero) and set the suppress_bind_attrs property to make it impossible to unload the driver via sysfs. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220612213400.159257-1-u.kleine-koenig@pengutronix.de arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 840ba17f74f376bf4542a9a818e019cd60a8517f Author: AngeloGioacchino Del Regno Date: Fri Jul 15 12:30:29 2022 +0200 dt-bindings: pinctrl: mt8195: Use drive-strength-microamp in examples The property mediatek,drive-strength-adv was deprecated: change the example for i2c0-pins to use drive-strength-microamp. Fixes: b6d9af2c6b69 ("dt-bindings: pinctrl: mt8195: Add and use drive-strength-microamp") Signed-off-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220715103029.204500-1-angelogioacchino.delregno@collabora.com Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b9ba6135d7f18b82f3d8bebb55ded725ba88e0e Author: Jason A. Donenfeld Date: Wed Jul 13 01:12:21 2022 +0200 um: seed rng using host OS rng UML generally does not provide access to special CPU instructions like RDRAND, and execution tends to be rather deterministic, with no real hardware interrupts, making good randomness really very hard, if not all together impossible. Not only is this a security eyebrow raiser, but it's also quite annoying when trying to do various pieces of UML-based automation that takes a long time to boot, if ever. Fix this by trivially calling getrandom() in the host and using that seed as "bootloader randomness", which initializes the rng immediately at UML boot. The old behavior can be restored the same way as on any other arch, by way of CONFIG_TRUST_BOOTLOADER_RANDOMNESS=n or random.trust_bootloader=0. So seen from that perspective, this just makes UML act like other archs, which is positive in its own right. Additionally, wire up arch_get_random_{int,long}() in the same way, so that reseeds can also make use of the host RNG, controllable by CONFIG_TRUST_CPU_RANDOMNESS and random.trust_cpu, per usual. Cc: stable@vger.kernel.org Acked-by: Johannes Berg Acked-By: Anton Ivanov Signed-off-by: Jason A. Donenfeld arch/um/include/asm/archrandom.h | 30 ++++++++++++++++++++++++++++++ arch/um/include/shared/os.h | 7 +++++++ arch/um/kernel/um_arch.c | 8 ++++++++ arch/um/os-Linux/util.c | 6 ++++++ 4 files changed, 51 insertions(+) commit b7a68f67ff4911e8a842d03f6f97fa91a8d483f5 Author: Uros Bizjak Date: Thu Jul 14 20:28:22 2022 +0200 random: use try_cmpxchg in _credit_init_bits Use `!try_cmpxchg(ptr, &orig, new)` instead of `cmpxchg(ptr, orig, new) != orig` in _credit_init_bits. This has two benefits: - The x86 cmpxchg instruction returns success in the ZF flag, so this change saves a compare after cmpxchg, as well as a related move instruction in front of cmpxchg. - try_cmpxchg implicitly assigns the *ptr value to &orig when cmpxchg fails, enabling further code simplifications. This patch has no functional change. Signed-off-by: Uros Bizjak Signed-off-by: Jason A. Donenfeld drivers/char/random.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b8ac29b40183a6038919768b5d189c9bd91ce9b4 Author: Jason A. Donenfeld Date: Sun Jul 17 23:53:34 2022 +0200 timekeeping: contribute wall clock to rng on time change The rng's random_init() function contributes the real time to the rng at boot time, so that events can at least start in relation to something particular in the real world. But this clock might not yet be set that point in boot, so nothing is contributed. In addition, the relation between minor clock changes from, say, NTP, and the cycle counter is potentially useful entropic data. This commit addresses this by mixing in a time stamp on calls to settimeofday and adjtimex. No entropy is credited in doing so, so it doesn't make initialization faster, but it is still useful input to have. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Reviewed-by: Thomas Gleixner Reviewed-by: Eric Biggers Signed-off-by: Jason A. Donenfeld kernel/time/timekeeping.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 049f9ae93d033be6758ad865a9b89650f9f075ec Author: Jason A. Donenfeld Date: Sat Jul 9 12:43:06 2022 +0200 x86/rdrand: Remove "nordrand" flag in favor of "random.trust_cpu" The decision of whether or not to trust RDRAND is controlled by the "random.trust_cpu" boot time parameter or the CONFIG_RANDOM_TRUST_CPU compile time default. The "nordrand" flag was added during the early days of RDRAND, when there were worries that merely using its values could compromise the RNG. However, these days, RDRAND values are not used directly but always go through the RNG's hash function, making "nordrand" no longer useful. Rather, the correct switch is "random.trust_cpu", which not only handles the relevant trust issue directly, but also is general to multiple CPU types, not just x86. However, x86 RDRAND does have a history of being occasionally problematic. Prior, when the kernel would notice something strange, it'd warn in dmesg and suggest enabling "nordrand". We can improve on that by making the test a little bit better and then taking the step of automatically disabling RDRAND if we detect it's problematic. Also disable RDSEED if the RDRAND test fails. Cc: x86@kernel.org Cc: Theodore Ts'o Suggested-by: H. Peter Anvin Suggested-by: Borislav Petkov Acked-by: Borislav Petkov Signed-off-by: Jason A. Donenfeld Documentation/admin-guide/kernel-parameters.txt | 5 --- arch/x86/kernel/cpu/amd.c | 2 +- arch/x86/kernel/cpu/rdrand.c | 57 +++++++++---------------- 3 files changed, 22 insertions(+), 42 deletions(-) commit 9592eef7c16ec5fb9f36c4d9abe8eeffc2e1d2f3 Author: Jason A. Donenfeld Date: Tue Jul 5 20:48:41 2022 +0200 random: remove CONFIG_ARCH_RANDOM When RDRAND was introduced, there was much discussion on whether it should be trusted and how the kernel should handle that. Initially, two mechanisms cropped up, CONFIG_ARCH_RANDOM, a compile time switch, and "nordrand", a boot-time switch. Later the thinking evolved. With a properly designed RNG, using RDRAND values alone won't harm anything, even if the outputs are malicious. Rather, the issue is whether those values are being *trusted* to be good or not. And so a new set of options were introduced as the real ones that people use -- CONFIG_RANDOM_TRUST_CPU and "random.trust_cpu". With these options, RDRAND is used, but it's not always credited. So in the worst case, it does nothing, and in the best case, maybe it helps. Along the way, CONFIG_ARCH_RANDOM's meaning got sort of pulled into the center and became something certain platforms force-select. The old options don't really help with much, and it's a bit odd to have special handling for these instructions when the kernel can deal fine with the existence or untrusted existence or broken existence or non-existence of that CPU capability. Simplify the situation by removing CONFIG_ARCH_RANDOM and using the ordinary asm-generic fallback pattern instead, keeping the two options that are actually used. For now it leaves "nordrand" for now, as the removal of that will take a different route. Acked-by: Michael Ellerman Acked-by: Catalin Marinas Acked-by: Borislav Petkov Acked-by: Heiko Carstens Acked-by: Greg Kroah-Hartman Signed-off-by: Jason A. Donenfeld arch/arm/include/asm/archrandom.h | 2 ++ arch/arm64/Kconfig | 8 ------- arch/arm64/include/asm/archrandom.h | 10 --------- arch/arm64/kernel/cpufeature.c | 2 -- arch/powerpc/Kconfig | 3 --- arch/powerpc/include/asm/archrandom.h | 3 --- arch/powerpc/include/asm/machdep.h | 2 -- arch/powerpc/platforms/microwatt/Kconfig | 1 - arch/powerpc/platforms/powernv/Kconfig | 1 - arch/powerpc/platforms/pseries/Kconfig | 1 - arch/s390/Kconfig | 15 ------------- arch/s390/configs/zfcpdump_defconfig | 1 - arch/s390/crypto/Makefile | 2 +- arch/s390/include/asm/archrandom.h | 3 --- arch/s390/kernel/setup.c | 2 -- arch/x86/Kconfig | 9 -------- arch/x86/include/asm/archrandom.h | 14 ++++-------- arch/x86/kernel/cpu/rdrand.c | 2 -- drivers/char/Kconfig | 1 - drivers/char/hw_random/s390-trng.c | 9 -------- include/asm-generic/Kbuild | 1 + include/asm-generic/archrandom.h | 25 ++++++++++++++++++++++ include/linux/random.h | 9 +------- .../testing/selftests/wireguard/qemu/kernel.config | 1 - 24 files changed, 34 insertions(+), 93 deletions(-) commit a3fd35be0eda760610a63e179ad860189b890f0b Author: Claudiu Beznea Date: Mon Jul 18 10:10:52 2022 +0300 spi: atmel: remove #ifdef CONFIG_{PM, SLEEP} Remove #ifdef CONFIG_PM, #ifdef CONFIG_PM_SLEEP and use SYSTEM_SLEEP_PM_OPS() and RUNTIME_PM_OPS() macros instead which allows getting also rid of __maybe_unused in the code. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220718071052.1707858-1-claudiu.beznea@microchip.com Signed-off-by: Mark Brown drivers/spi/spi-atmel.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 0ee0ab0bdab4f9e6754cc6a294e90c46b53f565b Author: Johnson Wang Date: Fri Jul 15 20:01:12 2022 +0800 spi: dt-bindings: Add compatible for MediaTek MT8188 This commit adds dt-binding documentation of spi bus for MediaTek MT8188 SoC platform. Signed-off-by: Johnson Wang Link: https://lore.kernel.org/r/20220715120114.4243-1-johnson.wang@mediatek.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml | 1 + 1 file changed, 1 insertion(+) commit 82cef0af296d3de95c8c7005f640449d45bcef62 Author: Allen-KH Cheng Date: Fri Jul 15 19:54:43 2022 +0800 spi: dt-bindings: mediatek,spi-mtk-nor: Update bindings for nor flash The spi-mtk-nor controller of mt8173, mt8186 and mt8192 have their DT data. They don't use mt8173 as fallback. Using the fallback of mt8186 to enables the controllers to support mt8188. Not all of spi-mtk-nor controller need interrupt property, so we don't mark interrupt as required. Signed-off-by: Allen-KH Cheng Link: https://lore.kernel.org/r/20220715115443.4154-1-allen-kh.cheng@mediatek.com Signed-off-by: Mark Brown .../devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 739f872e48d47c97fa17a86a7b3356771b75240c Author: Christian Marangi Date: Fri Jul 15 22:10:32 2022 +0200 regmap: permit to set reg_update_bits with bulk implementation A regmap may still require to set a custom reg_update_bits instead of relying to the regmap_bus_read/write general function. Permit to set it in the map if provided by the regmap config. Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20220715201032.19507-1-ansuelsmth@gmail.com Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 2 ++ 1 file changed, 2 insertions(+) commit 0caf1120c58395108344d5df4e09359b67e95094 Author: Chunxu Li Date: Fri Jul 15 16:59:03 2022 +0800 ASoC: mediatek: mt8195: extract SOF common code The functions related to SOF can be reused in different machine drivers, such as mt8195 or mt8186, so extract the common code to avoid duplication. Set mtk_soc_card_data which include machine private data and SOF private data as card drvdata, then the difference between machine private can be ignored such as mt8195_mt6359_priv or mt8186_mt6366_priv, at the same time the SOF related code can be reused in different machine drivers. Signed-off-by: Chunxu Li Link: https://lore.kernel.org/r/20220715085903.7796-1-chunxu.li@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/common/Makefile | 2 +- sound/soc/mediatek/common/mtk-dsp-sof-common.c | 196 +++++++++++++++++++++ sound/soc/mediatek/common/mtk-dsp-sof-common.h | 36 ++++ sound/soc/mediatek/common/mtk-soc-card.h | 17 ++ sound/soc/mediatek/mt8195/mt8195-mt6359.c | 233 ++++++------------------- 5 files changed, 301 insertions(+), 183 deletions(-) commit f1cee996f1858ba07dce9e377559ea33f318af0f Author: Jilin Yuan Date: Sun Jul 10 12:34:05 2022 +0800 wifi: wl1251: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220710043405.38304-1-yuanjilin@cdjrlc.com drivers/net/wireless/ti/wl1251/acx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a46c7d8d6f8998faff72a4f81e5b9dd523ccfbc Author: Jilin Yuan Date: Sun Jul 10 12:30:07 2022 +0800 wifi: rsi: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220710043007.33288-1-yuanjilin@cdjrlc.com drivers/net/wireless/rsi/rsi_91x_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c817cb7e6746d2aac8b89c6c4ebcfe915a8b23f Author: Jilin Yuan Date: Sun Jul 10 12:25:46 2022 +0800 wifi: rtl8192se: fix repeated words in comments Delete the redundant word 'not'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220710042546.28504-1-yuanjilin@cdjrlc.com drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a7fb1c67ef4242100a1a875c19bef2cb846b5ce Author: Jilin Yuan Date: Sun Jul 10 12:20:40 2022 +0800 wifi: rtlwifi: fix repeated words in comments Delete the redundant words 'in' and 'scan'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220710042040.22456-1-yuanjilin@cdjrlc.com drivers/net/wireless/realtek/rtlwifi/core.c | 2 +- drivers/net/wireless/realtek/rtlwifi/regd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a319b7f0794c34a080aded25d219d8d2410c117e Author: Jilin Yuan Date: Sun Jul 10 12:14:42 2022 +0800 wifi: rt2x00: fix repeated words in comments Delete the redundant words 'is' and 'with'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220710041442.16177-1-yuanjilin@cdjrlc.com drivers/net/wireless/ralink/rt2x00/rt2x00.h | 2 +- drivers/net/wireless/ralink/rt2x00/rt2x00mac.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit fb01be6d68360fe698041b1c44266e2d6c941a4c Author: Jilin Yuan Date: Sun Jul 10 12:10:05 2022 +0800 wifi: qtnfmac: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220710041005.10950-1-yuanjilin@cdjrlc.com drivers/net/wireless/quantenna/qtnfmac/qlink.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f29c21516268f1cc8ad260d7efd520caaa52eb83 Author: Jilin Yuan Date: Sat Jul 9 21:53:16 2022 +0800 wifi: iwlegacy: fix repeated words in comments Delete the redundant words 'to' and 'if'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220709135316.41425-1-yuanjilin@cdjrlc.com drivers/net/wireless/intel/iwlegacy/4965-mac.c | 2 +- drivers/net/wireless/intel/iwlegacy/common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ac15a010b66429d2cc4ffa71b25f3b3e04675f9e Author: Jilin Yuan Date: Sat Jul 9 21:47:01 2022 +0800 wifi: ipw2x00: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220709134701.36081-1-yuanjilin@cdjrlc.com drivers/net/wireless/intel/ipw2x00/ipw2200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 505d6105b6fd6dd18cf9a2c49384c94da0a3b22a Author: Jilin Yuan Date: Sat Jul 9 21:42:07 2022 +0800 wifi: brcmsmac: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220709134207.30856-1-yuanjilin@cdjrlc.com drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29069fb49837c6e1b2e1ecf48cc9b8925c2e5fbf Author: Jilin Yuan Date: Sat Jul 9 21:36:18 2022 +0800 wifi: brcmfmac: fix repeated words in comments Delete the redundant words 'this' and 'and'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220709133618.25958-1-yuanjilin@cdjrlc.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e2dfb8a5c605eb989e35132ef96cbbff03ed3ca3 Author: Jilin Yuan Date: Sat Jul 9 21:31:19 2022 +0800 wifi: b43: fix repeated words in comments Delete the redundant word 'early'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220709133119.21076-1-yuanjilin@cdjrlc.com drivers/net/wireless/broadcom/b43/phy_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15978ea38d79d6c376be672117dfcf646a24d1fe Author: Jilin Yuan Date: Sat Jul 9 21:26:37 2022 +0800 wifi: atmel: fix repeated words in comments Delete the redundant word 'long'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220709132637.16717-1-yuanjilin@cdjrlc.com drivers/net/wireless/atmel/atmel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3598cb6e18626d28d20c8de4ee8217fdd4153d63 Author: Tetsuo Handa Date: Sun Jul 17 21:21:52 2022 +0900 wifi: mac80211: do not abuse fq.lock in ieee80211_do_stop() lockdep complains use of uninitialized spinlock at ieee80211_do_stop() [1], for commit f856373e2f31ffd3 ("wifi: mac80211: do not wake queues on a vif that is being stopped") guards clear_bit() using fq.lock even before fq_init() from ieee80211_txq_setup_flows() initializes this spinlock. According to discussion [2], Toke was not happy with expanding usage of fq.lock. Since __ieee80211_wake_txqs() is called under RCU read lock, we can instead use synchronize_rcu() for flushing ieee80211_wake_txqs(). Link: https://syzkaller.appspot.com/bug?extid=eceab52db7c4b961e9d6 [1] Link: https://lkml.kernel.org/r/874k0zowh2.fsf@toke.dk [2] Reported-by: syzbot Signed-off-by: Tetsuo Handa Fixes: f856373e2f31ffd3 ("wifi: mac80211: do not wake queues on a vif that is being stopped") Tested-by: syzbot Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/9cc9b81d-75a3-3925-b612-9d0ad3cab82b@I-love.SAKURA.ne.jp net/mac80211/iface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bcfd9d7f6840b06d5988c7141127795cf405805e Author: Rustam Subkhankulov Date: Thu Jul 14 16:48:31 2022 +0300 wifi: p54: add missing parentheses in p54_flush() The assignment of the value to the variable total in the loop condition must be enclosed in additional parentheses, since otherwise, in accordance with the precedence of the operators, the conjunction will be performed first, and only then the assignment. Due to this error, a warning later in the function after the loop may not occur in the situation when it should. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Rustam Subkhankulov Fixes: 0d4171e2153b ("p54: implement flush callback") Acked-by: Christian Lamparter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220714134831.106004-1-subkhankulov@ispras.ru drivers/net/wireless/intersil/p54/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68204a696505fe97150d498f32e38c2a926c540f Author: Justin Stitt Date: Mon Jul 11 14:29:32 2022 -0700 wifi: mt7601u: fix clang -Wformat warning When building with Clang we encounter this warning: | drivers/net/wireless/mediatek/mt7601u/debugfs.c:92:6: error: format | specifies type 'unsigned char' but the argument has type 'int' | [-Werror,-Wformat] dev->ee->reg.start + dev->ee->reg.num - 1); The format specifier used is `%hhu` which describes a u8. Both `dev->ee->reg.start` and `.num` are u8 as well. However, the expression as a whole is promoted to an int as you cannot get smaller-than-int from addition. Therefore, to fix the warning, use the promoted-to-type's format specifier -- in this case `%d`. example: ``` uint8_t a = 4, b = 7; int size = sizeof(a + b - 1); printf("%d\n", size); // output: 4 ``` See more: (https://wiki.sei.cmu.edu/confluence/display/c/INT02-C.+Understand+integer+conversion+rules) "Integer types smaller than int are promoted when an operation is performed on them. If all values of the original type can be represented as an int, the value of the smaller type is converted to an int; otherwise, it is converted to an unsigned int." Signed-off-by: Justin Stitt Acked-by: Jakub Kicinski Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220711212932.1501592-1-justinstitt@google.com drivers/net/wireless/mediatek/mt7601u/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07db88f11e63d78c5062447faf942745ce8959ff Author: Justin Stitt Date: Fri Jul 8 17:15:27 2022 -0700 wifi: mt7601u: eeprom: fix clang -Wformat warning When building with Clang we encounter the following warning: | drivers/net/wireless/mediatek/mt7601u/eeprom.c:193:5: error: format | specifies type 'char' but the argument has type 'int' [-Werror,-Wformat] | chan_bounds[idx].start + chan_bounds[idx].num - 1); Variadic functions (printf-like) undergo default argument promotion. Documentation/core-api/printk-formats.rst specifically recommends using the promoted-to-type's format flag. Moreover, C11 6.3.1.1 states: (https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf) `If an int can represent all values of the original type ..., the value is converted to an int; otherwise, it is converted to an unsigned int. These are called the integer promotions.` With this information in hand, we really should stop using `%hh[dxu]` or `%h[dxu]` as they usually prompt Clang -Wformat warnings as well as go against documented standard recommendations. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Justin Stitt Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220709001527.618593-1-justinstitt@google.com drivers/net/wireless/mediatek/mt7601u/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c574060060afa6ee18d99020634fe77b5c52c3d Author: Christophe JAILLET Date: Mon Jul 4 15:02:55 2022 +0200 wifi: p54: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Acked-by: Christian Lamparter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/2755b8b7d85a2db0663d39ea6df823f94f3401b3.1656939750.git.christophe.jaillet@wanadoo.fr drivers/net/wireless/intersil/p54/fwio.c | 6 ++---- drivers/net/wireless/intersil/p54/main.c | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) commit 83781f0162d080fec7dcb911afd1bc2f5ad04471 Author: Christophe JAILLET Date: Sun Jun 12 23:12:20 2022 +0200 wifi: p54: Fix an error handling path in p54spi_probe() If an error occurs after a successful call to p54spi_request_firmware(), it must be undone by a corresponding release_firmware() as already done in the error handling path of p54spi_request_firmware() and in the .remove() function. Add the missing call in the error handling path and remove it from p54spi_request_firmware() now that it is the responsibility of the caller to release the firmware Fixes: cd8d3d321285 ("p54spi: p54spi driver") Signed-off-by: Christophe JAILLET Acked-by: Christian Lamparter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/297d2547ff2ee627731662abceeab9dbdaf23231.1655068321.git.christophe.jaillet@wanadoo.fr drivers/net/wireless/intersil/p54/p54spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 03905ac2852c577c9d863ed92fa6cc8ffabb2c7b Author: lizhijian@fujitsu.com Date: Fri Jul 15 03:46:36 2022 +0000 RDMA/rxe: Remove unused mask parameter This parameter had been deprecated since below commit: 1a7085b34291 ("RDMA/rxe: Skip adjusting remote addr for write in retry operation") Link: https://lore.kernel.org/r/20220715035340.1900168-1-lizhijian@fujitsu.com Signed-off-by: Li Zhijian Reviewed-by: Bob Pearson Signed-off-by: Leon Romanovsky drivers/infiniband/sw/rxe/rxe_req.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 64f89dfaa4f155e3797191286aac6e60f404725f Author: Hitomi Hasegawa Date: Fri May 20 16:41:19 2022 +0900 soc: fujitsu: Add A64FX diagnostic interrupt driver Register the NMI/IRQ corresponding to the A64FX's device definition dedicated to diagnostic interrupts, so that when this interrupt is sent using the BMC, it causes a panic. This can be used to obtain a kernel dump. Signed-off-by: Hitomi Hasegawa Link: https://lore.kernel.org/r/20220520074119.3574753-2-hasegawa-hitomi@fujitsu.com' Signed-off-by: Arnd Bergmann MAINTAINERS | 5 ++ drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/fujitsu/Kconfig | 16 ++++ drivers/soc/fujitsu/Makefile | 3 + drivers/soc/fujitsu/a64fx-diag.c | 154 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 180 insertions(+) commit 548c56dd2e55005496160497b8f04595123bbd84 Author: Xiao Yang Date: Tue Jul 5 22:52:12 2022 +0800 RDMA/rxe: Rename rxe_atomic_reply to atomic_reply It's better to use the unified naming format. Link: https://lore.kernel.org/r/20220705145212.12014-2-yangx.jy@fujitsu.com Signed-off-by: Xiao Yang Signed-off-by: Leon Romanovsky drivers/infiniband/sw/rxe/rxe_resp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 882736fb3b55a48908134d41aceeea8b0ef3385b Author: Xiao Yang Date: Tue Jul 5 22:52:11 2022 +0800 RDMA/rxe: Add common rxe_prepare_res() It's redundant to prepare resources for Read and Atomic requests by different functions. Replace them by a common rxe_prepare_res() with different parameters. In addition, the common rxe_prepare_res() can also be used by new Flush and Atomic Write requests in the future. Link: https://lore.kernel.org/r/20220705145212.12014-1-yangx.jy@fujitsu.com Signed-off-by: Xiao Yang Reviewed-by: Bob Pearson Signed-off-by: Leon Romanovsky drivers/infiniband/sw/rxe/rxe_resp.c | 71 ++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 39 deletions(-) commit 30b5057339002f7b8a3651559582ef6ef30980b5 Merge: bd363ee53302 454b768f9ba6 Author: Kalle Valo Date: Mon Jul 18 14:31:59 2022 +0300 Merge tag 'mt76-for-kvalo-2022-07-11' of https://github.com/nbd168/wireless mt76 patches for 5.20 - preparation for new chipset support - fixes - VHT/HE related improvements - ACPI SAR support [kvalo@kernel.org: fix mac80211 API changes in start_ap() and stop_ap()] commit 886201c70a1cab34ef96f867c2b2dd6379ffa7b9 Author: Kamal Dasu Date: Thu Jul 14 13:41:32 2022 -0400 mmc: sdhci-brcmstb: use clk_get_rate(base_clk) in PM resume Use clk_get_rate for base_clk on resume before setting new rate. This change ensures that the clock api returns current rate and sets the clock to the desired rate and honors CLK_GET_NO_CACHE attribute used by clock api. Fixes: 97904a59855c (mmc: sdhci-brcmstb: Add ability to increase max clock rate for 72116b0) Signed-off-by: Kamal Dasu Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20220714174132.18541-1-kdasu.kdev@gmail.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-brcmstb.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 37da51efe6eaa0560f46803c8c436a48a2084da7 Author: Zhu Yanjun Date: Tue Jul 5 18:54:14 2022 -0400 RDMA/rxe: Fix BUG: KASAN: null-ptr-deref in rxe_qp_do_cleanup The function rxe_create_qp calls rxe_qp_from_init. If some error occurs, the error handler of function rxe_qp_from_init will set both scq and rcq to NULL. Then rxe_create_qp calls rxe_put to handle qp. In the end, rxe_qp_do_cleanup is called by rxe_put. rxe_qp_do_cleanup directly accesses scq and rcq before checking them. This will cause null-ptr-deref error. The call graph is as below: rxe_create_qp { ... rxe_qp_from_init { ... err1: ... qp->rcq = NULL; <---rcq is set to NULL qp->scq = NULL; <---scq is set to NULL ... } qp_init: rxe_put{ ... rxe_qp_do_cleanup { ... atomic_dec(&qp->scq->num_wq); <--- scq is accessed ... atomic_dec(&qp->rcq->num_wq); <--- rcq is accessed } } Fixes: 4703b4f0d94a ("RDMA/rxe: Enforce IBA C11-17") Link: https://lore.kernel.org/r/20220705225414.315478-1-yanjun.zhu@linux.dev Signed-off-by: Zhu Yanjun Reviewed-by: Bob Pearson Reviewed-by: Md Haris Iqbal Signed-off-by: Leon Romanovsky drivers/infiniband/sw/rxe/rxe_qp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 99ce0f754c39b0a9ef60879f1bebf725c26e0a9f Author: Konrad Dybcio Date: Thu Jul 14 14:34:03 2022 +0200 dt-bindings: mmc: sdhci-msm: Document the SM8450 compatible Document the compatible for SDHCI on SM8450. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220714123406.1919836-2-konrad.dybcio@somainline.org Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 1 + 1 file changed, 1 insertion(+) commit b05cd716e3bd6e303054058007722819c47c1179 Author: Krzysztof Kozlowski Date: Thu Jul 14 11:10:42 2022 +0200 mmc: sdhci-msm: drop redundant of_device_id entries This reverts three commits: 1. Revert "mmc: sdhci-msm: Add compatible string check for sdx65" This reverts commit 953706844f0f2fd4dc6984cc010fe6cf51c041f2. 2. Revert "mmc: sdhci-msm: Add compatible string check for sm8150" This reverts commit 5acd6adb65802cc6f9986be3750179a820580d37. 3. Revert "mmc: sdhci-msm: Add SoC specific compatibles" This reverts commit 466614a9765c6fb67e1464d0a3f1261db903834b. The oldest commit 466614a9765c ("mmc: sdhci-msm: Add SoC specific compatibles") did not specify what benefits such multiple compatibles bring, therefore assume there is none. On the other hand such approach brings a lot of churn to driver maintenance by expecting commit for every new compatible, even though it is already covered by the fallback. There is really no sense in duplicating of_device_id for each variant, which is already covered by generic compatible fallback qcom,sdhci-msm-v4 or qcom,sdhci-msm-v5. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20220714091042.22287-4-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) commit 9b538b0e3a95e5b7a52e9eaf3ae51686608bf333 Author: Krzysztof Kozlowski Date: Thu Jul 14 11:10:40 2022 +0200 dt-bindings: mmc: sdhci-msm: add MSM8998 Add a MSM8998-specific SDCC compatible, because using only a generic qcom,sdhci-msm-v4 fallback is deprecated. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20220714091042.22287-2-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 1 + 1 file changed, 1 insertion(+) commit 3056fc6c32e613b760422b94c7617ac9a24a4721 Author: Cheng Xu Date: Thu Jul 14 09:30:47 2022 +0800 RDMA/siw: Fix duplicated reported IW_CM_EVENT_CONNECT_REPLY event If siw_recv_mpa_rr returns -EAGAIN, it means that the MPA reply hasn't been received completely, and should not report IW_CM_EVENT_CONNECT_REPLY in this case. This may trigger a call trace in iw_cm. A simple way to trigger this: server: ib_send_lat client: ib_send_lat -R The call trace looks like this: kernel BUG at drivers/infiniband/core/iwcm.c:894! invalid opcode: 0000 [#1] PREEMPT SMP NOPTI <...> Workqueue: iw_cm_wq cm_work_handler [iw_cm] Call Trace: cm_work_handler+0x1dd/0x370 [iw_cm] process_one_work+0x1e2/0x3b0 worker_thread+0x49/0x2e0 ? rescuer_thread+0x370/0x370 kthread+0xe5/0x110 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x1f/0x30 Fixes: 6c52fdc244b5 ("rdma/siw: connection management") Link: https://lore.kernel.org/r/dae34b5fd5c2ea2bd9744812c1d2653a34a94c67.1657706960.git.chengyou@linux.alibaba.com Signed-off-by: Cheng Xu Signed-off-by: Leon Romanovsky drivers/infiniband/sw/siw/siw_cm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d180e0a1be6cea2b7436fadbd1c96aecdf3c46c7 Author: Alexander Atanasov Date: Mon Jul 11 18:18:22 2022 +0000 Drivers: hv: Create debugfs file with hyper-v balloon usage information Allow the guest to know how much it is ballooned by the host. It is useful when debugging out of memory conditions. When host gets back memory from the guest it is accounted as used memory in the guest but the guest have no way to know how much it is actually ballooned. Expose current state, flags and max possible memory to the guest. While at it - fix a 10+ years old typo. Signed-off-by: Alexander Atanasov Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20220711181825.52318-1-alexander.atanasov@virtuozzo.com Signed-off-by: Wei Liu drivers/hv/hv_balloon.c | 135 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 129 insertions(+), 6 deletions(-) commit 7cb7b8fe63393d773687dd501941933bd3bd2773 Merge: 03c765b0e3b4 f6639994a6dd Author: Arnd Bergmann Date: Mon Jul 18 13:15:26 2022 +0200 Merge branch 'sunplus/newsoc' into arm/newsoc Merge "Sunplus SP7021 SoC support" from Qin Jian, applied as patches: "Sunplus SP7021 is an ARM Cortex A7 (4 cores) based SoC. It integrates many peripherals (ex: UART, I2C, SPI, SDIO, eMMC, USB, SD card and etc.) into a single chip. It is designed for industrial control. SP7021 consists of two chips (dies) in a package. One is called C-chip (computing chip). It is a 4-core ARM Cortex A7 CPU. It adopts high-level process (22 nm) for high performance computing. The other is called P- chip (peripheral chip). It has many peripherals and an ARM A926 added especially for real-time control. P-chip is made for customers. It adopts low-level process (ex: 0.11 um) to reduce cost. Refer to (for documentations): https://sunplus-tibbo.atlassian.net/wiki/spaces/doc/overview Refer to (applications): https://tibbo.com/store/plus1.html Refer to (applications): http://www.sinovoip.com.cn/ecp_view.asp?id=586" I left out the clock controller driver, which is still not fully reviewed. There have been 20 revisions of the platform code, and everything else looks good enough, so I hope it's we can simplify the process by separating it out again. Link: https://lore.kernel.org/linux-arm-kernel/0c10fa4ccf3da5d92784b9bbd4177d1d2f1d62a0.1656396767.git.qinjian@cqplus1.com/ * sunplus/newsoc: ARM: dts: Add Sunplus SP7021-Demo-V3 board device tree ARM: sp7021_defconfig: Add Sunplus SP7021 defconfig ARM: sunplus: Add initial support for Sunplus SP7021 SoC irqchip: Add Sunplus SP7021 interrupt controller driver dt-bindings: interrupt-controller: Add bindings for SP7021 interrupt controller dt-bindings: clock: Add bindings for SP7021 clock driver reset: Add Sunplus SP7021 reset driver dt-bindings: reset: Add bindings for SP7021 reset driver dt-bindings: arm: sunplus: Add bindings for Sunplus SP7021 SoC boards commit 2de949abd6a539fac4b2c89a560e4ae505b6fb52 Author: Haoyue Xu Date: Thu Jul 14 21:43:53 2022 +0800 RDMA/hns: Recover 1bit-ECC error of RAM on chip Since ECC memory maintains a memory system immune to single-bit errors, add support for correcting the 1bit-ECC error, which prevents a 1bit-ECC error become an uncorrected type error. When a 1bit-ECC error happens in the internal ram of the ROCE engine, such as the QPC table, as a 1bit-ECC error caused by reading, the ROCE engine only corrects those 1bit ECC errors by writing. Link: https://lore.kernel.org/r/20220714134353.16700-6-liangwenpeng@huawei.com Signed-off-by: Haoyue Xu Signed-off-by: Wenpeng Liang Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hns/hns_roce_device.h | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 182 +++++++++++++++++++++++++++- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 12 ++ 3 files changed, 193 insertions(+), 2 deletions(-) commit 75e4e716f7089558fda4ddc660fa8dbdec4eb1d3 Author: Haoyue Xu Date: Thu Jul 14 21:43:52 2022 +0800 RDMA/hns: Refactor the abnormal interrupt handler function Use a single function to handle the same kind of abnormal interrupts. Link: https://lore.kernel.org/r/20220714134353.16700-5-liangwenpeng@huawei.com Signed-off-by: Haoyue Xu Signed-off-by: Wenpeng Liang Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 35 ++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 12 deletions(-) commit ecb4db5c3590aa956b4b2c352081a5b632d1f9f9 Author: Haoyue Xu Date: Thu Jul 14 21:43:51 2022 +0800 RDMA/hns: Fix incorrect clearing of interrupt status register The driver will clear all the interrupts in the same area when the driver handles the interrupt of type AEQ overflow. It should only set the interrupt status bit of type AEQ overflow. Fixes: a5073d6054f7 ("RDMA/hns: Add eq support of hip08") Link: https://lore.kernel.org/r/20220714134353.16700-4-liangwenpeng@huawei.com Signed-off-by: Haoyue Xu Signed-off-by: Wenpeng Liang Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d95e0a0c6c9602ff6bb90c1c20987b204493d8e1 Author: Haoyue Xu Date: Thu Jul 14 21:43:50 2022 +0800 RDMA/hns: Fix the wrong type of return value of the interrupt handler The type of return value of the interrupt handler should be irqreturn_t. Link: https://lore.kernel.org/r/20220714134353.16700-3-liangwenpeng@huawei.com Signed-off-by: Haoyue Xu Signed-off-by: Wenpeng Liang Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit f5c25465b4f7d3badcaa5bf4a6f82f5763865b19 Author: Haoyue Xu Date: Thu Jul 14 21:43:49 2022 +0800 RDMA/hns: Remove unused abnormal interrupt of type RAS The HNS NIC driver receives and handles the abnormal interrupt of the RAS type generated by ROCEE, and the HNS RDMA driver does not need to handle this type of interrupt. Therefore, delete unused codes in the HNS RDMA driver. Link: https://lore.kernel.org/r/20220714134353.16700-2-liangwenpeng@huawei.com Signed-off-by: Haoyue Xu Signed-off-by: Wenpeng Liang Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 10 ---------- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 1 - 2 files changed, 11 deletions(-) commit b3236a64ddd125a455ef5b5316c1b9051b732974 Author: Jianglei Nie Date: Thu Jul 14 14:15:05 2022 +0800 RDMA/qedr: Fix potential memory leak in __qedr_alloc_mr() __qedr_alloc_mr() allocates a memory chunk for "mr->info.pbl_table" with init_mr_info(). When rdma_alloc_tid() and rdma_register_tid() fail, "mr" is released while "mr->info.pbl_table" is not released, which will lead to a memory leak. We should release the "mr->info.pbl_table" with qedr_free_pbl() when error occurs to fix the memory leak. Fixes: e0290cce6ac0 ("qedr: Add support for memory registeration verbs") Link: https://lore.kernel.org/r/20220714061505.2342759-1-niejianglei2021@163.com Signed-off-by: Jianglei Nie Acked-by: Michal Kalderon  Signed-off-by: Leon Romanovsky drivers/infiniband/hw/qedr/verbs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit d6c1b95d3df237d24394594b363809c01fc48330 Author: Chris Packham Date: Tue Jul 5 22:09:19 2022 +0300 dt-bindings: marvell: Document the AC5/AC5X compatibles Describe the compatible properties for the Marvell Alleycat5/5X switches with integrated CPUs. Alleycat5: * 98DX2538: 24x1G + 2x10G + 2x10G Stack * 98DX2535: 24x1G + 4x1G Stack * 98DX2532: 8x1G + 2x10G + 2x1G Stack * 98DX2531: 8x1G + 4x1G Stack * 98DX2528: 24x1G + 2x10G + 2x10G Stack * 98DX2525: 24x1G + 4x1G Stack * 98DX2522: 8x1G + 2x10G + 2x1G Stack * 98DX2521: 8x1G + 4x1G Stack * 98DX2518: 24x1G + 2x10G + 2x10G Stack * 98DX2515: 24x1G + 4x1G Stack * 98DX2512: 8x1G + 2x10G + 2x1G Stack * 98DX2511: 8x1G + 4x1G Stack Alleycat5X: * 98DX3500: 24x1G + 6x25G * 98DX3501: 16x1G + 6x10G * 98DX3510: 48x1G + 6x25G * 98DX3520: 24x2.5G + 6x25G * 98DX3530: 48x2.5G + 6x25G * 98DX3540: 12x5G/6x10G + 6x25G * 98DX3550: 24x5G/12x10G + 6x25G Signed-off-by: Chris Packham Signed-off-by: Vadym Kochan Reviewed-by: Krzysztof Kozlowski Signed-off-by: Gregory CLEMENT .../bindings/arm/marvell/marvell,ac5.yaml | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 40624346b7ae0c2b1209fc9993ea30699e512c50 Author: Marek Behún Date: Mon Jul 4 13:36:22 2022 +0200 ARM: dts: turris-omnia: enable LED controller node The LED controller node is disabled because the leds-turris-omnia driver does not support setting the LED blinking to be controlled by the MCU. The patches for that have now been sent [1], so let's enable the node. [1] https://lore.kernel.org/linux-leds/20220704105955.15474-1-kabel@kernel.org/T/ Signed-off-by: Marek Behún Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-turris-omnia.dts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 94a29bffdd59498382131fd428fed221f5c96def Author: Marek Behún Date: Mon Jul 4 13:36:21 2022 +0200 ARM: dts: turris-omnia: configure LED[0] pin function to link/activity The marvell PHY driver changes the LED[0] pin function to "On - 1000 Mbps Link, Off - Else". Turris Omnia expects that the function is "On - Link, Blink - Activity, Off - No link". Use the `marvell,reg-init` DT property to change the function. In the future, once netdev trigger will support HW offloading, we will be able to have this configured via the combination of PHY driver and leds-turris-omnia driver. Signed-off-by: Marek Behún Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-turris-omnia.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e39c600049d0822284da2cef3bd7ced40dc3524f Author: Ehab Ababneh Date: Mon Jul 11 10:54:38 2022 -0400 RDMA/hfi1: Depend on !UML Both hfi1 and UML depend on x86_64, this can trigger build errors. This driver must depends on !UML because it accesses x86_64 features that are not supported by UML. Link: https://lore.kernel.org/r/165755127879.2996325.5668395672492732376.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Ehab Ababneh Signed-off-by: Dennis Dalessandro Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hfi1/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fdaa3725831972284ef2779ddba00491d9dbbfca Author: Pali Rohár Date: Tue Nov 2 18:12:58 2021 +0100 ARM: Marvell: Update PCIe fixup - The code relies on rc_pci_fixup being called, which only happens when CONFIG_PCI_QUIRKS is enabled, so add that to Kconfig. Omitting this causes a booting failure with a non-obvious cause. - Update rc_pci_fixup to set the class properly, copying the more modern style from other places - Correct the rc_pci_fixup comment This patch just re-applies commit 1dc831bf53fd ("ARM: Kirkwood: Update PCI-E fixup") for all other Marvell ARM platforms which have same buggy PCIe controller and do not use pci-mvebu.c controller driver yet. Long-term goal for these Marvell ARM platforms should be conversion to pci-mvebu.c controller driver and removal of these fixups in arch code. Signed-off-by: Pali Rohár Cc: Jason Gunthorpe Cc: stable@vger.kernel.org Signed-off-by: Gregory CLEMENT arch/arm/mach-dove/Kconfig | 1 + arch/arm/mach-dove/pcie.c | 11 ++++++++--- arch/arm/mach-mv78xx0/pcie.c | 11 ++++++++--- arch/arm/mach-orion5x/Kconfig | 1 + arch/arm/mach-orion5x/pci.c | 12 +++++++++--- 5 files changed, 27 insertions(+), 9 deletions(-) commit 6e693a104207fbf5a22795c987e8964c0a1ffe2d Author: Sieng-Piaw Liew Date: Fri Jul 15 15:50:43 2022 +0800 atl1c: use netif_napi_add_tx() for Tx NAPI Use netif_napi_add_tx() for NAPI in Tx direction instead of the regular netif_napi_add() function. Signed-off-by: Sieng-Piaw Liew Signed-off-by: David S. Miller drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit da53af8cb9329797dfd12f9034adafc4a1e01620 Author: Arun Ramadoss Date: Fri Jul 15 11:03:34 2022 +0530 net: dsa: microchip: fix Clang -Wunused-const-variable warning on 'ksz_dt_ids' This patch removes the of_match_ptr() pointer when dereferencing the ksz_dt_ids which produce the unused variable warning. Reported-by: kernel test robot Suggested-by: Arnd Bergmann Signed-off-by: Arun Ramadoss Reviewed-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd18d5f132bfcdb67a82b477ea9ddc6df6e6ce73 Merge: 3898f52cd4f9 fd31f3996af2 Author: David S. Miller Date: Mon Jul 18 11:24:11 2022 +0100 Merge branch 'tls-rx-avoid-skb_cow_data' Jakub Kicinski says: ==================== tls: rx: avoid skb_cow_data() TLS calls skb_cow_data() on the skb it received from strparser whenever it needs to hold onto the skb with the decrypted data. (The alternative being decrypting directly to a user space buffer in whic case the input skb doesn't get modified or used after.) TLS needs the decrypted skb: - almost always with TLS 1.3 (unless the new NoPad is enabled); - when user space buffer is too small to fit the record; - when BPF sockmap is enabled. Most of the time the skb we get out of strparser is a clone of a 64kB data unit coalsced by GRO. To make things worse skb_cow_data() tries to output a linear skb and allocates it with GFP_ATOMIC. This occasionally fails even under moderate memory pressure. This patch set rejigs the TLS Rx so that we don't expect decryption in place. The decryption handlers return an skb which may or may not be the skb from strparser. For TLS 1.3 this results in a 20-30% performance improvement without NoPad enabled. v2: rebase after 3d8c51b25a23 ("net/tls: Check for errors in tls_device_init") ==================== Signed-off-by: David S. Miller commit fd31f3996af2627106e22a9f8072764fede51161 Author: Jakub Kicinski Date: Thu Jul 14 22:22:35 2022 -0700 tls: rx: decrypt into a fresh skb We currently CoW Rx skbs whenever we can't decrypt to a user space buffer. The skbs can be enormous (64kB) and CoW does a linear alloc which has a strong chance of failing under memory pressure. Or even without, skb_cow_data() assumes GFP_ATOMIC. Allocate a new frag'd skb and decrypt into it. We finally take advantage of the decrypted skb getting returned via darg. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/tls/tls.h | 3 ++ net/tls/tls_sw.c | 106 ++++++++++++++++++++++++++++++++++++------------------- 2 files changed, 72 insertions(+), 37 deletions(-) commit cbbdee9918a2662914f411aa999f2f80bf044a30 Author: Jakub Kicinski Date: Thu Jul 14 22:22:34 2022 -0700 tls: rx: async: don't put async zc on the list The "zero-copy" path in SW TLS will engage either for no skbs or for all but last. If the recvmsg parameters are right and the socket can do ZC we'll ZC until the iterator can't fit a full record at which point we'll decrypt one more record and copy over the necessary bits to fill up the request. The only reason we hold onto the ZC skbs which went thru the async path until the end of recvmsg() is to count bytes. We need an accurate count of zc'ed bytes so that we can calculate how much of the non-zc'd data to copy. To allow freeing input skbs on the ZC path count only how much of the list we'll need to consume. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/tls/tls_sw.c | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) commit c618db2afe7c31d13ca8cf05b60f17165fbdc282 Author: Jakub Kicinski Date: Thu Jul 14 22:22:33 2022 -0700 tls: rx: async: hold onto the input skb Async crypto currently benefits from the fact that we decrypt in place. When we allow input and output to be different skbs we will have to hang onto the input while we move to the next record. Clone the inputs and keep them on a list. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller include/net/tls.h | 1 + net/tls/Makefile | 2 +- net/tls/tls.h | 3 +++ net/tls/tls_strp.c | 17 +++++++++++++++++ net/tls/tls_sw.c | 26 +++++++++++++++++--------- 5 files changed, 39 insertions(+), 10 deletions(-) commit 6ececdc5136900bc99ef04c60c9daeab86dbeb85 Author: Jakub Kicinski Date: Thu Jul 14 22:22:32 2022 -0700 tls: rx: async: adjust record geometry immediately Async crypto TLS Rx currently waits for crypto to be done in order to strip the TLS header and tailer. Simplify the code by moving the pointers immediately, since only TLS 1.2 is supported here there is no message padding. This simplifies the decryption into a new skb in the next patch as we don't have to worry about input vs output skb in the decrypt_done() handler any more. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/tls/tls_sw.c | 49 ++++++++++--------------------------------------- 1 file changed, 10 insertions(+), 39 deletions(-) commit 6bd116c8c6544476e6daeb48187a3ce334d28db6 Author: Jakub Kicinski Date: Thu Jul 14 22:22:31 2022 -0700 tls: rx: return the decrypted skb via darg Instead of using ctx->recv_pkt after decryption read the skb from darg.skb. This moves the decision of what the "output skb" is to the decrypt handlers. For now after decrypt handler returns successfully ctx->recv_pkt is simply moved to darg.skb, but it will change soon. Note that tls_decrypt_sg() cannot clear the ctx->recv_pkt because it gets called to re-encrypt (i.e. by the device offload). So we need an awkward temporary if() in tls_rx_one_record(). Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/tls/tls_sw.c | 49 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 10 deletions(-) commit 541cc48be3b141e8529fef05ad6cedbca83f9e80 Author: Jakub Kicinski Date: Thu Jul 14 22:22:30 2022 -0700 tls: rx: read the input skb from ctx->recv_pkt Callers always pass ctx->recv_pkt into decrypt_skb_update(), and it propagates it to its callees. This may give someone the false impression that those functions can accept any valid skb containing a TLS record. That's not the case, the record sequence number is read from the context, and they can only take the next record coming out of the strp. Let the functions get the skb from the context instead of passing it in. This will also make it cleaner to return a different skb than ctx->recv_pkt as the decrypted one later on. Since we're touching the definition of decrypt_skb_update() use this as an opportunity to rename it. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/tls/tls.h | 14 ++++++++------ net/tls/tls_device.c | 25 ++++++++++++++++--------- net/tls/tls_sw.c | 37 ++++++++++++++++++------------------- 3 files changed, 42 insertions(+), 34 deletions(-) commit 8a958732818bc27f7da4d41ecf2c5c99d9aa8b0e Author: Jakub Kicinski Date: Thu Jul 14 22:22:29 2022 -0700 tls: rx: factor out device darg update I already forgot to transform darg from input to output semantics once on the NIC inline crypto fastpath. To avoid this happening again create a device equivalent of decrypt_internal(). A function responsible for decryption and transforming darg. While at it rename decrypt_internal() to a hopefully slightly more meaningful name. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/tls/tls_sw.c | 60 ++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 19 deletions(-) commit 53d57999fe02785040bc53e2f12efc881f13ae17 Author: Jakub Kicinski Date: Thu Jul 14 22:22:28 2022 -0700 tls: rx: remove the message decrypted tracking We no longer allow a decrypted skb to remain linked to ctx->recv_pkt. Anything on the list is decrypted, anything on ctx->recv_pkt needs to be decrypted. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller include/net/strparser.h | 1 - net/tls/tls_sw.c | 10 ---------- 2 files changed, 11 deletions(-) commit abb47dc95dc6e551ca79f51d296e77878fafa4d8 Author: Jakub Kicinski Date: Thu Jul 14 22:22:27 2022 -0700 tls: rx: don't keep decrypted skbs on ctx->recv_pkt Detach the skb from ctx->recv_pkt after decryption is done, even if we can't consume it. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/tls/tls_sw.c | 49 ++++++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 21 deletions(-) commit 008141de8557479289936e21e7ed6bad50d09443 Author: Jakub Kicinski Date: Thu Jul 14 22:22:26 2022 -0700 tls: rx: don't try to keep the skbs always on the list I thought that having the skb either always on the ctx->rx_list or ctx->recv_pkt will simplify the handling, as we would not have to remember to flip it from one to the other on exit paths. This became a little harder to justify with the fix for BPF sockmaps. Subsequent changes will make the situation even worse. Queue the skbs only when really needed. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/tls/tls_sw.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 4cbc325ed6b4dce4910be06d9d6940a8b919c59b Author: Jakub Kicinski Date: Thu Jul 14 22:22:25 2022 -0700 tls: rx: allow only one reader at a time recvmsg() in TLS gets data from the skb list (rx_list) or fresh skbs we read from TCP via strparser. The former holds skbs which were already decrypted for peek or decrypted and partially consumed. tls_wait_data() only notices appearance of fresh skbs coming out of TCP (or psock). It is possible, if there is a concurrent call to peek() and recv() that the peek() will move the data from input to rx_list without recv() noticing. recv() will then read data out of order or never wake up. This is not a practical use case/concern, but it makes the self tests less reliable. This patch solves the problem by allowing only one reader in. Because having multiple processes calling read()/peek() is not normal avoid adding a lock and try to fast-path the single reader case. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller include/net/tls.h | 3 +++ net/tls/tls_sw.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 57 insertions(+), 7 deletions(-) commit 82319639cd6fe436be0bb6e9277ded13d14261c0 Author: Christophe JAILLET Date: Mon Jul 11 21:21:39 2022 +0200 RDMA/irdma: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Link: https://lore.kernel.org/r/1f671b1af5881723ee265a0a12809c92950e58aa.1657567269.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Acked-by: Shiraz Saleem Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/hw.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 3898f52cd4f92a007d71a52edf70aafc7c8ae193 Merge: 2acd1022549e ddefb2d20553 Author: David S. Miller Date: Mon Jul 18 11:19:17 2022 +0100 Merge branch 'net-smc-virt-contig-buffers' Wen Gu says: ==================== net/smc: Introduce virtually contiguous buffers for SMC-R On long-running enterprise production servers, high-order contiguous memory pages are usually very rare and in most cases we can only get fragmented pages. When replacing TCP with SMC-R in such production scenarios, attempting to allocate high-order physically contiguous sndbufs and RMBs may result in frequent memory compaction, which will cause unexpected hung issue and further stability risks. So this patch set is aimed to allow SMC-R link group to use virtually contiguous sndbufs and RMBs to avoid potential issues mentioned above. Whether to use physically or virtually contiguous buffers can be set by sysctl smcr_buf_type. Note that using virtually contiguous buffers will bring an acceptable performance regression, which can be mainly divided into two parts: 1) regression in data path, which is brought by additional address translation of sndbuf by RNIC in Tx. But in general, translating address through MTT is fast. According to qperf test, this part regression is basically less than 10% in latency and bandwidth. (see patch 5/6 for details) 2) regression in buffer initialization and destruction path, which is brought by additional MR operations of sndbufs. But thanks to link group buffer reuse mechanism, the impact of this kind of regression decreases as times of buffer reuse increases. Patch set overview: - Patch 1/6 and 2/6 mainly about simplifying and optimizing DMA sync operation, which will reduce overhead on the data path, especially when using virtually contiguous buffers; - Patch 3/6 and 4/6 introduce a sysctl smcr_buf_type to set the type of buffers in new created link group; - Patch 5/6 allows SMC-R to use virtually contiguous sndbufs and RMBs, including buffer creation, destruction, MR operation and access; - patch 6/6 extends netlink attribute for buffer type of SMC-R link group; v1->v2: - Patch 5/6 fixes build issue on 32bit; - Patch 3/6 adds description of new sysctl in smc-sysctl.rst; ==================== Signed-off-by: David S. Miller commit ddefb2d205539418f3c3851a3e06fac9624f257d Author: Wen Gu Date: Thu Jul 14 17:44:05 2022 +0800 net/smc: Extend SMC-R link group netlink attribute Extend SMC-R link group netlink attribute SMC_GEN_LGR_SMCR. Introduce SMC_NLA_LGR_R_BUF_TYPE to show the buffer type of SMC-R link group. Signed-off-by: Wen Gu Signed-off-by: David S. Miller include/uapi/linux/smc.h | 1 + net/smc/smc_core.c | 2 ++ 2 files changed, 3 insertions(+) commit b8d199451c99b3796b840c350eb74b830c5c869b Author: Wen Gu Date: Thu Jul 14 17:44:04 2022 +0800 net/smc: Allow virtually contiguous sndbufs or RMBs for SMC-R On long-running enterprise production servers, high-order contiguous memory pages are usually very rare and in most cases we can only get fragmented pages. When replacing TCP with SMC-R in such production scenarios, attempting to allocate high-order physically contiguous sndbufs and RMBs may result in frequent memory compaction, which will cause unexpected hung issue and further stability risks. So this patch is aimed to allow SMC-R link group to use virtually contiguous sndbufs and RMBs to avoid potential issues mentioned above. Whether to use physically or virtually contiguous buffers can be set by sysctl smcr_buf_type. Note that using virtually contiguous buffers will bring an acceptable performance regression, which can be mainly divided into two parts: 1) regression in data path, which is brought by additional address translation of sndbuf by RNIC in Tx. But in general, translating address through MTT is fast. Taking 256KB sndbuf and RMB as an example, the comparisons in qperf latency and bandwidth test with physically and virtually contiguous buffers are as follows: - client: smc_run taskset -c qperf -oo msg_size:1:64K:*2\ -t 5 -vu tcp_{bw|lat} - server: smc_run taskset -c qperf [latency] msgsize tcp smcr smcr-use-virt-buf 1 11.17 us 7.56 us 7.51 us (-0.67%) 2 10.65 us 7.74 us 7.56 us (-2.31%) 4 11.11 us 7.52 us 7.59 us ( 0.84%) 8 10.83 us 7.55 us 7.51 us (-0.48%) 16 11.21 us 7.46 us 7.51 us ( 0.71%) 32 10.65 us 7.53 us 7.58 us ( 0.61%) 64 10.95 us 7.74 us 7.80 us ( 0.76%) 128 11.14 us 7.83 us 7.87 us ( 0.47%) 256 10.97 us 7.94 us 7.92 us (-0.28%) 512 11.23 us 7.94 us 8.20 us ( 3.25%) 1024 11.60 us 8.12 us 8.20 us ( 0.96%) 2048 14.04 us 8.30 us 8.51 us ( 2.49%) 4096 16.88 us 9.13 us 9.07 us (-0.64%) 8192 22.50 us 10.56 us 11.22 us ( 6.26%) 16384 28.99 us 12.88 us 13.83 us ( 7.37%) 32768 40.13 us 16.76 us 16.95 us ( 1.16%) 65536 68.70 us 24.68 us 24.85 us ( 0.68%) [bandwidth] msgsize tcp smcr smcr-use-virt-buf 1 1.65 MB/s 1.59 MB/s 1.53 MB/s (-3.88%) 2 3.32 MB/s 3.17 MB/s 3.08 MB/s (-2.67%) 4 6.66 MB/s 6.33 MB/s 6.09 MB/s (-3.85%) 8 13.67 MB/s 13.45 MB/s 11.97 MB/s (-10.99%) 16 25.36 MB/s 27.15 MB/s 24.16 MB/s (-11.01%) 32 48.22 MB/s 54.24 MB/s 49.41 MB/s (-8.89%) 64 106.79 MB/s 107.32 MB/s 99.05 MB/s (-7.71%) 128 210.21 MB/s 202.46 MB/s 201.02 MB/s (-0.71%) 256 400.81 MB/s 416.81 MB/s 393.52 MB/s (-5.59%) 512 746.49 MB/s 834.12 MB/s 809.99 MB/s (-2.89%) 1024 1292.33 MB/s 1641.96 MB/s 1571.82 MB/s (-4.27%) 2048 2007.64 MB/s 2760.44 MB/s 2717.68 MB/s (-1.55%) 4096 2665.17 MB/s 4157.44 MB/s 4070.76 MB/s (-2.09%) 8192 3159.72 MB/s 4361.57 MB/s 4270.65 MB/s (-2.08%) 16384 4186.70 MB/s 4574.13 MB/s 4501.17 MB/s (-1.60%) 32768 4093.21 MB/s 4487.42 MB/s 4322.43 MB/s (-3.68%) 65536 4057.14 MB/s 4735.61 MB/s 4555.17 MB/s (-3.81%) 2) regression in buffer initialization and destruction path, which is brought by additional MR operations of sndbufs. But thanks to link group buffer reuse mechanism, the impact of this kind of regression decreases as times of buffer reuse increases. Taking 256KB sndbuf and RMB as an example, latency of some key SMC-R buffer-related function obtained by bpftrace are as follows: Function Phys-bufs Virt-bufs smcr_new_buf_create() 67154 ns 79164 ns smc_ib_buf_map_sg() 525 ns 928 ns smc_ib_get_memory_region() 162294 ns 161191 ns smc_wr_reg_send() 9957 ns 9635 ns smc_ib_put_memory_region() 203548 ns 198374 ns smc_ib_buf_unmap_sg() 508 ns 1158 ns ------------ Test environment notes: 1. Above tests run on 2 VMs within the same Host. 2. The NIC is ConnectX-4Lx, using SRIOV and passing through 2 VFs to the each VM respectively. 3. VMs' vCPUs are binded to different physical CPUs, and the binded physical CPUs are isolated by `isolcpus=xxx` cmdline. 4. NICs' queue number are set to 1. Signed-off-by: Wen Gu Signed-off-by: David S. Miller net/smc/af_smc.c | 66 +++++++++++++++-- net/smc/smc_clc.c | 8 +- net/smc/smc_clc.h | 2 +- net/smc/smc_core.c | 213 +++++++++++++++++++++++++++++++++++++---------------- net/smc/smc_core.h | 10 ++- net/smc/smc_ib.c | 15 ++-- net/smc/smc_llc.c | 33 +++++---- net/smc/smc_rx.c | 90 ++++++++++++++++++---- net/smc/smc_tx.c | 9 ++- 9 files changed, 328 insertions(+), 118 deletions(-) commit b984f370ed5182d180f92dbf14bdf847ff6ccc04 Author: Wen Gu Date: Thu Jul 14 17:44:03 2022 +0800 net/smc: Use sysctl-specified types of buffers in new link group This patch introduces a new SMC-R specific element buf_type in struct smc_link_group, for recording the value of sysctl smcr_buf_type when link group is created. New created link group will create and reuse buffers of the type specified by buf_type. Signed-off-by: Wen Gu Signed-off-by: David S. Miller net/smc/smc_core.c | 1 + net/smc/smc_core.h | 1 + 2 files changed, 2 insertions(+) commit 4bc5008e4387106215b50ae1a4ac2467455725ca Author: Wen Gu Date: Thu Jul 14 17:44:02 2022 +0800 net/smc: Introduce a sysctl for setting SMC-R buffer type This patch introduces the sysctl smcr_buf_type for setting the type of SMC-R sndbufs and RMBs. Valid values includes: - SMCR_PHYS_CONT_BUFS, which means use physically contiguous buffers for better performance and is the default value. - SMCR_VIRT_CONT_BUFS, which means use virtually contiguous buffers in case of physically contiguous memory is scarce. - SMCR_MIXED_BUFS, which means first try to use physically contiguous buffers. If not available, then use virtually contiguous buffers. Signed-off-by: Wen Gu Signed-off-by: David S. Miller Documentation/networking/smc-sysctl.rst | 13 +++++++++++++ include/net/netns/smc.h | 1 + net/smc/smc_core.h | 6 ++++++ net/smc/smc_sysctl.c | 11 +++++++++++ 4 files changed, 31 insertions(+) commit 0ef69e788411cba2af017db731a9fc62d255e9ac Author: Guangguan Wang Date: Thu Jul 14 17:44:01 2022 +0800 net/smc: optimize for smc_sndbuf_sync_sg_for_device and smc_rmb_sync_sg_for_cpu Some CPU, such as Xeon, can guarantee DMA cache coherency. So it is no need to use dma sync APIs to flush cache on such CPUs. In order to avoid calling dma sync APIs on the IO path, use the dma_need_sync to check whether smc_buf_desc needs dma sync when creating smc_buf_desc. Signed-off-by: Guangguan Wang Signed-off-by: David S. Miller net/smc/smc_core.c | 8 ++++++++ net/smc/smc_core.h | 1 + net/smc/smc_ib.c | 29 +++++++++++++++++++++++++++++ net/smc/smc_ib.h | 2 ++ 4 files changed, 40 insertions(+) commit 6d52e2de6415b7a035b3e8dc4ccffd0da25bbfb9 Author: Guangguan Wang Date: Thu Jul 14 17:44:00 2022 +0800 net/smc: remove redundant dma sync ops smc_ib_sync_sg_for_cpu/device are the ops used for dma memory cache consistency. Smc sndbufs are dma buffers, where CPU writes data to it and PCIE device reads data from it. So for sndbufs, smc_ib_sync_sg_for_device is needed and smc_ib_sync_sg_for_cpu is redundant as PCIE device will not write the buffers. Smc rmbs are dma buffers, where PCIE device write data to it and CPU read data from it. So for rmbs, smc_ib_sync_sg_for_cpu is needed and smc_ib_sync_sg_for_device is redundant as CPU will not write the buffers. Signed-off-by: Guangguan Wang Signed-off-by: David S. Miller net/smc/af_smc.c | 2 -- net/smc/smc_core.c | 22 ---------------------- net/smc/smc_core.h | 2 -- net/smc/smc_rx.c | 2 -- net/smc/smc_tx.c | 1 - 5 files changed, 29 deletions(-) commit ec65e0e9acf758585249e43a51abf082ba1af582 Author: Jilin Yuan Date: Sat Jul 9 20:43:56 2022 +0800 wifi: wcn36xx: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220709124356.52543-1-yuanjilin@cdjrlc.com drivers/net/wireless/ath/wcn36xx/hal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa6f2be484d764b0221e5732da1a088b1f1cdcd5 Author: Jilin Yuan Date: Sat Jul 9 21:21:37 2022 +0800 wifi: wil6210: fix repeated words in comments Delete the redundant word 'for'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220709132137.12442-1-yuanjilin@cdjrlc.com drivers/net/wireless/ath/wil6210/txrx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88e67a4f0bf88711359ee5498baf0a6e4ea8e414 Author: Jilin Yuan Date: Sat Jul 9 20:40:36 2022 +0800 wifi: ath: fix repeated words in comments Delete the redundant word 'have'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220709124036.49674-1-yuanjilin@cdjrlc.com drivers/net/wireless/ath/hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6456741f6427265396d3b7a0e83bf9319334b696 Author: Jilin Yuan Date: Sat Jul 9 20:32:08 2022 +0800 wifi: ath6kl: fix repeated words in comments Delete the redundant words 'the' and 'of'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220709123208.41736-1-yuanjilin@cdjrlc.com drivers/net/wireless/ath/ath6kl/hif.h | 2 +- drivers/net/wireless/ath/ath6kl/sdio.c | 2 +- drivers/net/wireless/ath/ath6kl/wmi.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 7a4836560a6198d245d5732e26f94898b12eb760 Author: Dan Carpenter Date: Fri Jul 15 13:35:18 2022 +0300 wifi: wil6210: debugfs: fix info leak in wil_write_file_wmi() The simple_write_to_buffer() function will succeed if even a single byte is initialized. However, we need to initialize the whole buffer to prevent information leaks. Just use memdup_user(). Fixes: ff974e408334 ("wil6210: debugfs interface to send raw WMI command") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/Ysg14NdKAZF/hcNG@kili drivers/net/wireless/ath/wil6210/debugfs.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit eaedf62f7aaa4e2efd69c0fbd32ee774456ce361 Author: Jilin Yuan Date: Fri Jul 15 13:35:18 2022 +0300 wifi: ath5k: fix repeated words in comments Delete the redundant word 'don't' and 'but'. Signed-off-by: Jilin Yuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220708154929.19199-1-yuanjilin@cdjrlc.com drivers/net/wireless/ath/ath5k/base.c | 2 +- drivers/net/wireless/ath/ath5k/mac80211-ops.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit fcc36be423a46f6dc2dcaa9f46aa47526f3e7d82 Author: Kalle Valo Date: Fri Jul 15 13:35:16 2022 +0300 wifi: ath11k: mac: fix long line Recent mac80211 API changes introduced a long line warning in ath11k: drivers/net/wireless/ath/ath11k/mac.c:1404: line length of 92 exceeds 90 columns Compile tested only. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220708170052.28615-1-kvalo@kernel.org drivers/net/wireless/ath/ath11k/mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4a2d4e2df5a58c5a1feb6a46ba276c373ae0f17d Author: Linus Walleij Date: Mon Jul 18 11:58:09 2022 +0200 Revert "pinctrl: qcom: spmi-gpio: make the irqchip immutable" This reverts commit 7542766e78fc374d81d8c2db214c4b4308645277. It was noted during follow-up that the approach is incorrect. Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 5d11f8392b54e9918bd985bd204d45436a3efdf3 Author: Fabio Estevam Date: Tue Jul 12 08:51:54 2022 -0300 pinctrl: imx93: Add MODULE_DEVICE_TABLE() Pass MODULE_DEVICE_TABLE() so that module autoloading can work. This also aligns with the other i.MX8 pinctrl drivers. Signed-off-by: Fabio Estevam Reviewed-by: Jacky Bai Link: https://lore.kernel.org/r/20220712115154.2348971-1-festevam@denx.de Signed-off-by: Linus Walleij drivers/pinctrl/freescale/pinctrl-imx93.c | 1 + 1 file changed, 1 insertion(+) commit 0569af4811549fe368a53414f37ab53fecbbaf23 Author: Samuel Holland Date: Tue Jul 12 21:52:33 2022 -0500 pinctrl: sunxi: Add driver for Allwinner D1 This SoC contains a pinctrl with a new register layout. Use the variant parameter to set the right register offsets. This pinctrl also increases the number of functions per pin from 8 to 16, taking advantage of all 4 bits in the mux config field (so far, only functions 0-8 and 14-15 are used). This increases the maximum possible number of functions. Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Signed-off-by: Samuel Holland Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20220713025233.27248-7-samuel@sholland.org Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/Kconfig | 5 + drivers/pinctrl/sunxi/Makefile | 1 + drivers/pinctrl/sunxi/pinctrl-sun20i-d1.c | 840 ++++++++++++++++++++++++++++++ drivers/pinctrl/sunxi/pinctrl-sunxi.c | 16 +- drivers/pinctrl/sunxi/pinctrl-sunxi.h | 6 + 5 files changed, 863 insertions(+), 5 deletions(-) commit 622b681ef9d9e7d636108cda4e45a2a7695ebe92 Author: Samuel Holland Date: Tue Jul 12 21:52:32 2022 -0500 pinctrl: sunxi: Make some layout parameters dynamic Starting with the D1/D1s/T113 SoC, Allwinner changed the layout of the pinctrl registers. This new layout widens the drive level field, which affects the pull register offset and the overall bank size. In order to support multiple register layouts, some of the layout parameters need to be set based on the pinctrl variant. This requires passing the pinctrl struct pointer to the register/offset calculation functions. Reviewed-by: Jernej Skrabec Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20220713025233.27248-6-samuel@sholland.org Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sunxi.c | 44 +++++++++++++++++++++-------------- drivers/pinctrl/sunxi/pinctrl-sunxi.h | 3 +++ 2 files changed, 29 insertions(+), 18 deletions(-) commit 0bb95ae2672f9e00f471598a515bf4e9c2005046 Author: Samuel Holland Date: Tue Jul 12 21:52:31 2022 -0500 pinctrl: sunxi: Refactor register/offset calculation Starting with the D1/D1s/T113 SoC, Allwinner changed the layout of the pinctrl registers. This new layout widens the drive level field, which affects the pull register offset and the overall bank size. As a first step to support this, combine the register and offset calculation functions, and refactor the math to depend on one constant for field widths instead of three. This minimizes the code size impact of making some of the factors dynamic. While rewriting these functions, move them to the implementation file, since that is the only file where they are used. And make the comment more generic, without mentioning specific offsets/sizes. The callers are updated to expect a shifted mask, and to use consistent terminology (reg/shift/mask/val). Reviewed-by: Heiko Stuebner Reviewed-by: Jernej Skrabec Tested-by: Heiko Stuebner Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20220713025233.27248-5-samuel@sholland.org Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sunxi.c | 119 ++++++++++++++++++++++++---------- drivers/pinctrl/sunxi/pinctrl-sunxi.h | 93 ++------------------------ 2 files changed, 89 insertions(+), 123 deletions(-) commit 88df36f2e6aa171a674715f8079d3b6ee4165ac3 Author: Samuel Holland Date: Tue Jul 12 21:52:30 2022 -0500 pinctrl: sunxi: Support the 2.5V I/O bias mode H616 and newer SoCs feature a 2.5V I/O bias mode in addition to the 1.8V and 3.3V modes. This mode is entered by selecting the 3.3V level and disabling the "withstand function". H616 supports this capability on its main PIO only. A100 supports this capability on both its PIO and R-PIO. Reviewed-by: Jernej Skrabec Tested-by: Heiko Stuebner Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20220713025233.27248-4-samuel@sholland.org Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun50i-a100.c | 2 +- drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c | 2 +- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 10 ++++++++++ drivers/pinctrl/sunxi/pinctrl-sunxi.h | 7 +++++++ 5 files changed, 20 insertions(+), 2 deletions(-) commit fc153c8f283bf5925615195fc9d4056414d7b168 Author: Samuel Holland Date: Tue Jul 12 21:52:29 2022 -0500 pinctrl: sunxi: Add I/O bias setting for H6 R-PIO H6 requires I/O bias configuration on both of its PIO devices. Previously it was only done for the main PIO. The setting for Port L is at bit 0, so the bank calculation needs to account for the pin base. Otherwise the wrong bit is used. Fixes: cc62383fcebe ("pinctrl: sunxi: Support I/O bias voltage setting on H6") Reviewed-by: Jernej Skrabec Tested-by: Heiko Stuebner Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20220713025233.27248-3-samuel@sholland.org Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun50i-h6-r.c | 1 + drivers/pinctrl/sunxi/pinctrl-sunxi.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) commit 329d32a9879a955c380bd70a0906a5140785b233 Author: Samuel Holland Date: Tue Jul 12 21:52:28 2022 -0500 dt-bindings: pinctrl: Add compatible for Allwinner D1 D1 contains a pin controller similar to previous SoCs, but with some register layout changes. It includes 6 interrupt-capable pin banks. Acked-by: Krzysztof Kozlowski Tested-by: Heiko Stuebner Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20220713025233.27248-2-samuel@sholland.org Signed-off-by: Linus Walleij .../bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 6cd81a86ff11ae2cc4c3569293e2ddceadcbdc77 Author: Robert Marko Date: Mon Jul 11 22:34:05 2022 +0200 pinctrl: qcom-pmic-gpio: add support for PMP8074 PMP8074 has 12 GPIO-s with holes on GPIO1 and GPIO12. Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20220711203408.2949888-4-robimarko@gmail.com Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 2 ++ 1 file changed, 2 insertions(+) commit ed16b6d7748307058fe9c32c5e7abad4627ac591 Author: Robert Marko Date: Mon Jul 11 22:34:04 2022 +0200 dt-bindings: pinctrl: qcom,pmic-gpio: add PMP8074 Document the compatible for PMP8074 which has 12 GPIO-s with holes at GPIO1 and GPIO12. Signed-off-by: Robert Marko Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220711203408.2949888-3-robimarko@gmail.com Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml | 3 +++ 1 file changed, 3 insertions(+) commit eebe11b5bbec0cc34cb27176f537098ec205f8bc Author: Dominik Kobinski Date: Thu Nov 25 22:53:10 2021 +0100 pinctrl: qcom: spmi-gpio: Add pm8226 compatibility Add support for pm8226 SPMI GPIOs. The PMIC features 8 GPIOs, with no holes inbetween. Reviewed-by: Bjorn Andersson Suggested-by: Ivaylo Ivanov Signed-off-by: Dominik Kobinski Link: https://lore.kernel.org/r/20211125215310.62371-1-dominikkobinski314@gmail.com Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 + 1 file changed, 1 insertion(+) commit 03da7f9873196a4489b71470fd0ff21529cb7537 Author: Andy Shevchenko Date: Wed Jun 29 14:58:40 2022 +0300 pinctrl: core: Use device_match_of_node() helper Instead of open coding, use device_match_of_node() helper. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220629115840.16241-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4c04e7a17cf4925f280e55049704d76ea6b90e2 Author: AngeloGioacchino Del Regno Date: Thu Jun 30 13:04:53 2022 +0200 dt-bindings: pinctrl: mt8195: Add gpio-line-names property Add the 'gpio-line-names' property to mt8195-pinctrl, as this will be used in devicetrees to describe pin names. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220630110453.186526-1-angelogioacchino.delregno@collabora.com Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 1b3ab63e56f0c30193b6787b083be4f4071b7fc6 Author: AngeloGioacchino Del Regno Date: Thu Jun 30 15:15:43 2022 +0200 dt-bindings: pinctrl: mt8195: Add and use drive-strength-microamp As was already done for MT8192 in commit b52e695324bb ("dt-bindings: pinctrl: mt8192: Add drive-strength-microamp"), replace the custom mediatek,drive-strength-adv property with the standardized pinconf 'drive-strength-microamp' one. Similarly to the mt8192 counterpart, there's no user of property 'mediatek,drive-strength-adv', hence removing it is safe. Fixes: 69c3d58dc187 ("dt-bindings: pinctrl: mt8195: Add mediatek,drive-strength-adv property") Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220630131543.225554-1-angelogioacchino.delregno@collabora.com Signed-off-by: Linus Walleij .../bindings/pinctrl/pinctrl-mt8195.yaml | 27 ++-------------------- 1 file changed, 2 insertions(+), 25 deletions(-) commit 11bd0ffd165fce7aff1a2ed15c04c088239f3d42 Author: AngeloGioacchino Del Regno Date: Thu Jun 30 14:23:34 2022 +0200 dt-bindings: pinctrl: mt8195: Fix name for mediatek,rsel-resistance-in-si-unit When this property was introduced, it contained underscores, but the actual code wants dashes. Change it from mediatek,rsel_resistance_in_si_unit to mediatek,rsel-resistance-in-si-unit. Fixes: 91e7edceda96 ("dt-bindings: pinctrl: mt8195: change pull up/down description") Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220630122334.216903-1-angelogioacchino.delregno@collabora.com Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 04156e7dd7ae0fad84f45bea698f9f59eb69817d Author: Claudiu Beznea Date: Mon Jul 4 13:12:53 2022 +0300 pinctrl: at91: remove #ifdef CONFIG_PM Remove #ifdef CONFIG_PM and use pm_ptr() macro instead. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220704101253.808519-2-claudiu.beznea@microchip.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-at91.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit cc701e18a921e7ae79b215187001acd5a5ba7765 Author: Claudiu Beznea Date: Mon Jul 4 13:12:52 2022 +0300 pinctrl: at91-pio4: remove #ifdef CONFIG_PM_SLEEP Remove #ifdef CONFIG_PM_SLEEP and use pm_sleep_ptr() macro instead. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220704101253.808519-1-claudiu.beznea@microchip.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-at91-pio4.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 46195de38abf196e5799bd02b3ae88faf084d161 Author: Jack Wang Date: Tue Jul 12 12:31:13 2022 +0200 RDMA/rtrs-srv: Do not use mempool for page allocation The mempool is for guaranteed memory allocation during extreme VM load (see the header of mempool.c of the kernel). But rtrs-srv allocates pages only when creating new session. There is no need to use the mempool. With the removal of mempool, rtrs-server no longer need to reserve huge mount of memory, this will avoid error like this: https://lore.kernel.org/lkml/20220620020727.GA3669@xsang-OptiPlex-9020/ Link: https://lore.kernel.org/r/20220712103113.617754-6-haris.iqbal@ionos.com Reported-by: kernel test robot Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Md Haris Iqbal Acked-by: Guoqing Jiang Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-srv.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) commit c14adff285ad1bb8eefc5d8fc202ceb1f7e3a2f1 Author: Md Haris Iqbal Date: Tue Jul 12 12:31:12 2022 +0200 RDMA/rtrs-clt: Replace list_next_or_null_rr_rcu with an inline function removes list_next_or_null_rr_rcu macro to fix below warnings. That macro is used only twice. CHECK:MACRO_ARG_REUSE: Macro argument reuse 'head' - possible side-effects? CHECK:MACRO_ARG_REUSE: Macro argument reuse 'ptr' - possible side-effects? CHECK:MACRO_ARG_REUSE: Macro argument reuse 'memb' - possible side-effects? Replaces that macro with an inline function. Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Cc: jinpu.wang@ionos.com Link: https://lore.kernel.org/r/20220712103113.617754-5-haris.iqbal@ionos.com Signed-off-by: Md Haris Iqbal Suggested-by: Jason Gunthorpe Signed-off-by: Jack Wang Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-clt.c | 35 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 19 deletions(-) commit f4e1357184a5759f97fa69adadf5206ad9e3edd2 Author: Santosh Kumar Pradhan Date: Tue Jul 12 12:31:11 2022 +0200 RDMA/rtrs-srv: Use per-cpu variables for rdma stats Convert server stat counters from atomic to per-cpu variables. Link: https://lore.kernel.org/r/20220712103113.617754-4-haris.iqbal@ionos.com Signed-off-by: Santosh Kumar Pradhan Signed-off-by: Jack Wang Signed-off-by: Md Haris Iqbal Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-srv-stats.c | 32 +++++++++++++++++++++------- drivers/infiniband/ulp/rtrs/rtrs-srv-sysfs.c | 2 ++ drivers/infiniband/ulp/rtrs/rtrs-srv.c | 9 +++++++- drivers/infiniband/ulp/rtrs/rtrs-srv.h | 15 +++++++------ 4 files changed, 42 insertions(+), 16 deletions(-) commit 861703b4c76e645949b7a42bbcc48cf775fd45d4 Author: Santosh Kumar Pradhan Date: Tue Jul 12 12:31:10 2022 +0200 RDMA/rtrs-clt: Use this_cpu_ API for stats Use this_cpu_x() for increasing/adding a percpu counter through a percpu pointer without the need to disable/enable preemption. Link: https://lore.kernel.org/r/20220712103113.617754-3-haris.iqbal@ionos.com Suggested-by: Christoph Lameter Signed-off-by: Santosh Kumar Pradhan Signed-off-by: Jack Wang Signed-off-by: Md Haris Iqbal Acked-by: Guoqing Jiang Reviewed-by: Christoph Lameter Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-clt-stats.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit ed6e53820ee4f68ed927de17e5675ff2a07a47e2 Author: Jack Wang Date: Tue Jul 12 12:31:09 2022 +0200 RDMA/rtrs-srv: Fix modinfo output for stringify stringify works with define, not enum. Fixes: 91fddedd439c ("RDMA/rtrs: private headers with rtrs protocol structs and helpers") Cc: jinpu.wang@ionos.com Link: https://lore.kernel.org/r/20220712103113.617754-2-haris.iqbal@ionos.com Signed-off-by: Jack Wang Signed-off-by: Md Haris Iqbal Reviewed-by: Aleksei Marov Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-pri.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit aeea6cc067525103301fb7a6ba5c861b631f2086 Author: Andrey Strachuk Date: Mon Jul 11 18:12:51 2022 +0300 RDMA: remove useless condition in siw_create_cq() Comparison of 'cq' with NULL is useless since 'cq' is a result of container_of and cannot be NULL in any reasonable scenario. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 303ae1cdfdf7 ("rdma/siw: application interface") Link: https://lore.kernel.org/r/20220711151251.17089-1-strochuk@ispras.ru Signed-off-by: Andrey Strachuk Acked-by: Bernard Metzler Signed-off-by: Leon Romanovsky drivers/infiniband/sw/siw/siw_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc4114736f5a4d642ed9d2a2062b3701e0ffc991 Author: Christophe JAILLET Date: Fri Jul 8 18:47:37 2022 +0200 RDMA/rtrs-clt: Use bitmap_empty() Use bitmap_empty() instead of hand-writing them. Link: https://lore.kernel.org/r/b71ccfaf4a47dee8e1ad373604c861479d499b6b.1657298747.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Acked-by: Jack Wang Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-clt.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit e471eedd94d95a183ed57f5875ec1a476f1442a4 Author: Christophe JAILLET Date: Fri Jul 8 18:47:27 2022 +0200 RDMA/rtrs-clt: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Link: https://lore.kernel.org/r/ca9c5c8301d76d60de34640568b3db0d4401d050.1657298747.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Acked-by: Jack Wang Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-clt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit b577ea54ac0e7823d04151cb7c3a2ae24fae76a3 Author: Christophe JAILLET Date: Fri Jul 8 19:20:39 2022 +0200 RDMA/qib: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Link: https://lore.kernel.org/r/f7a8588447679e80a438b6188b0603c1a11ad877.1657300671.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Reviewed-by: Dennis Dalessandro Signed-off-by: Leon Romanovsky drivers/infiniband/hw/qib/qib_init.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3a844596ed71b7c12ac602f6f6b7b0f17e4d6a90 Author: Mustafa Ismail Date: Tue Jul 5 18:08:15 2022 -0500 RDMA/irdma: Fix setting of QP context err_rq_idx_valid field Setting err_rq_idx_valid field in QP context when the AE source of the AEQE is not associated with an RQ causes the firmware flush to fail. Set err_rq_idx_valid field in QP context only if it is associated with an RQ. Additionally, cleanup the redundant setting of this field in irdma_process_aeq. Fixes: 44d9e52977a1 ("RDMA/irdma: Implement device initialization definitions") Link: https://lore.kernel.org/r/20220705230815.265-8-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/hw.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 82ab2b52654c43ba24a3f6603fec40874cc5a7e5 Author: Mustafa Ismail Date: Tue Jul 5 18:08:14 2022 -0500 RDMA/irdma: Fix VLAN connection with wildcard address When an application listens on a wildcard address, and there are VLAN and non-VLAN IP addresses, iWARP connection establishemnt can fail if the listen node VLAN ID does not match. Fix this by checking the vlan_id only if not a wildcard listen node. Fixes: 146b9756f14c ("RDMA/irdma: Add connection manager") Link: https://lore.kernel.org/r/20220705230815.265-7-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/cm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 8ecef7890b3aea78c8bbb501a4b5b8134367b821 Author: Mustafa Ismail Date: Tue Jul 5 18:08:13 2022 -0500 RDMA/irdma: Fix a window for use-after-free During a destroy CQ an interrupt may cause processing of a CQE after CQ resources are freed by irdma_cq_free_rsrc(). Fix this by moving the call to irdma_cq_free_rsrc() after the irdma_sc_cleanup_ceqes(), which is called under the cq_lock. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Link: https://lore.kernel.org/r/20220705230815.265-6-shiraz.saleem@intel.com Signed-off-by: Bartosz Sobczak Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8c7c0758101b393017614352b6f07be6b8e6396 Author: Nayan Kumar Date: Tue Jul 5 18:08:12 2022 -0500 RDMA/irdma: Make resource distribution algorithm more QP oriented Adapt the resource distribution algorithm in irdma_cfg_fpm_val to be more QP oriented. If the configuration is too big for the available memory, trim the MR and PBLE's first before trimming the QPs. This also avoids having to double QPs requested as input to algorithm for GEN1 devices. Link: https://lore.kernel.org/r/20220705230815.265-5-shiraz.saleem@intel.com Signed-off-by: Nayan Kumar Signed-off-by: Shiraz Saleem Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/ctrl.c | 8 +++++--- drivers/infiniband/hw/irdma/hw.c | 5 +---- 2 files changed, 6 insertions(+), 7 deletions(-) commit 36a26d123919997c113ac0182f926b21ccc85855 Author: Mustafa Ismail Date: Tue Jul 5 18:08:11 2022 -0500 RDMA/irdma: Make CQP invalid state error non-critical The invalid state error returned by the Control Queue-Pair (CQP) is not a critical error. Add it to the irdma_noncrit_err_list and drop reporting it as device error message. Link: https://lore.kernel.org/r/20220705230815.265-4-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/utils.c | 1 + 1 file changed, 1 insertion(+) commit 26bf0190329891a034b69b72f98ca4c4aad3f66b Author: Mustafa Ismail Date: Tue Jul 5 18:08:10 2022 -0500 RDMA/irdma: Add AE source to error log To assist with debugging add the Asynchronous Event (AE) source when logging the abnormal AE error log message. Link: https://lore.kernel.org/r/20220705230815.265-3-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 137d264c6f63f5b57200b8becb00d7cc58163c05 Author: Mustafa Ismail Date: Tue Jul 5 18:08:09 2022 -0500 RDMA/irdma: Add 2 level PBLE support for FMR Level 2 Physical Buffer List Entry (PBLE) is currently not supported for Fast MRs which limits memory registrations to 256K pages. Adapt irdma_set_page and irdma_alloc_mr to allow for 2 level PBLEs. Link: https://lore.kernel.org/r/20220705230815.265-2-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/main.h | 2 +- drivers/infiniband/hw/irdma/verbs.c | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) commit 33fe1cb20cf44af9c12048b2bfdebae0408cd4aa Author: Viresh Kumar Date: Mon Jul 18 07:32:14 2022 +0530 cpufreq: tegra194: Staticize struct tegra_cpufreq_soc instances Fix sparse warnings by marking these structures static. Fixes: 273bc890a2a8 ("cpufreq: tegra194: Add support for Tegra234") Reported-by: kernel test robot Reviewed-by: Sumit Gupta Signed-off-by: Viresh Kumar drivers/cpufreq/tegra194-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 075fbf0ab8ddd04365918edbf5d906295105f3a0 Author: Helge Deller Date: Fri Jul 15 10:24:27 2022 +0200 video: fbdev: omapfb: Unexport omap*_update_window_async() There is no need to EXPORT the functions hwa742_update_window_async() and omapfb_update_window_async() since they are not used anywhere inside or outside the kernel tree. Signed-off-by: Helge Deller drivers/video/fbdev/omap/hwa742.c | 3 +-- drivers/video/fbdev/omap/omapfb.h | 9 --------- drivers/video/fbdev/omap/omapfb_main.c | 3 +-- 3 files changed, 2 insertions(+), 13 deletions(-) commit ffcc5b265799f213612984aa27d3711dbc4704b6 Author: Geert Uytterhoeven Date: Mon Jul 11 17:50:34 2022 +0200 video: fbdev: atari: Remove backward bug-compatibility As of v2.1.0, falcon_decode_var() contains a quirk to fix a rounding error, as explained by Günther Kelleter on Fri, 30 Aug 1996: This diff removes the now obsolete Falcon video option "pwrsave", and fixes a rounding error that is triggered by the resolution switching X server (those who use the pixel clock value 39722 in their /etc/fb.modes should change it to 39721). However, this causes the modified video mode returned by falcon_decode_var() to not match the video mode returned by falcon_encode_var(). Fix this by dropping the quirk. Unfortunately /etc/fb.modes in fbset was never updated, so the "640x480-60" mode still contains the wrong pixclock. Hence this change may introduce a regression. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller drivers/video/fbdev/atafb.c | 4 ---- 1 file changed, 4 deletions(-) commit 435347edfe900fc29850014898d843cdabb306da Author: Geert Uytterhoeven Date: Mon Jul 11 17:50:33 2022 +0200 video: fbdev: atari: Remove unused definitions and variables Several definitions and variables are unused. Some variables are set but further unused. Remove them. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller drivers/video/fbdev/atafb.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 39101f1314ba38fca8b2ab8ed42622529d18342e Author: Geert Uytterhoeven Date: Mon Jul 11 17:50:32 2022 +0200 video: fbdev: atari: Fix VGA modes The pixclock values in the vga and vga70 modes are wrong, as they should use the 25.175 MHz clock instead of the 32 MHz clock. Swap the left and right margins to match f25.{right,left} (struct pixel_clock declares them in a different order), and update the hsync lengths to match what the driver programs by default. Correct the (wrong) floating-point vrefresh value for the vga mode. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller drivers/video/fbdev/atafb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f0b38ea59ad262c0c6f65b48283c778bff9829b4 Author: Geert Uytterhoeven Date: Mon Jul 11 17:50:31 2022 +0200 video: fbdev: atari: Fix TT High video mode vertical refresh The vertical refresh rate for the TT High video mode (1280x960) is wrong. Fortunately this field is not really used. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller drivers/video/fbdev/atafb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ee5e2280343472de16a9048d6b9049c66d572e3 Author: Geert Uytterhoeven Date: Mon Jul 11 17:50:30 2022 +0200 video: fbdev: atari: Remove unneeded casts to void * Arbitrary pointers can be passed to functions accepting "void *" without casting. Remove the casts, as they make it impossible to validate types. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller drivers/video/fbdev/atafb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4a13bcd8ccd5cc063969620e68f068a83cccc55a Author: Geert Uytterhoeven Date: Mon Jul 11 17:50:29 2022 +0200 video: fbdev: atari: Remove unneeded casts from void * There is no need to cast fb_info.par to "struct atafb_par *", as the former has type "void *". Remove the casts, as they make it impossible to validate types. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller drivers/video/fbdev/atafb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 35fa155e836833fdd5744c5237aca7e2c2c31e03 Author: Geert Uytterhoeven Date: Mon Jul 11 17:50:28 2022 +0200 video: fbdev: atari: Fix ext_setcolreg() The red, green, and blue color values are 16-bit, while the external graphics hardware registers are 8-bit. Add the missing conversion from 16-bit to 8-bit. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller drivers/video/fbdev/atafb.c | 4 ++++ 1 file changed, 4 insertions(+) commit c7ef5e285c842bdca1121512967400443e565456 Author: Geert Uytterhoeven Date: Mon Jul 11 17:50:27 2022 +0200 video: fbdev: atari: Fix inverse handling Currently, the "inverse" option does not do anything, as it just sets a flag, which is further unused. Fix this by calling fb_invert_cmaps() instead, like other drivers do. As this only affects the console colormap, this does not affect X. Update the documentation to match the actual behavior. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller Documentation/m68k/kernel-options.rst | 4 ++-- drivers/video/fbdev/atafb.c | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) commit 211f88e83f5095a91cab78b98b443c5c6c10e837 Author: Geert Uytterhoeven Date: Mon Jul 11 17:50:26 2022 +0200 video: fbdev: atari: Remove bogus FB_VMODE_YWRAP flags Vertical wrap is not supported (fb_fix_screeninfo.ywrapstep = 0), hence there is no point in setting the FB_VMODE_YWRAP flag in video modes. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller drivers/video/fbdev/atafb.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit f3bd0c2b637e3c4f733ff5ac5175cbcef96c2671 Author: Geert Uytterhoeven Date: Mon Jul 11 17:50:25 2022 +0200 video: fbdev: atari: Simplify atafb_pan_display() The fb_pan_display() function in the core already takes care of validating the panning parameters before calling the driver's .fb_pan_display() callback, and of updating the panning state afterwards, so there is no need to repeat that in the driver. Remove the duplicate code. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller drivers/video/fbdev/atafb.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) commit 6a7d270e901965b0f8643db885cdc2e6e93b8621 Author: Geert Uytterhoeven Date: Mon Jul 11 17:41:11 2022 +0200 video: fbdev: Make *fb_setup() and *fb_init() static The various *fb_setup() and *fb_init() functions are only used locally, so they should be static. Most of them do not need forward declarations, so remove these where appropriate. Signed-off-by: Geert Uytterhoeven Signed-off-by: Helge Deller drivers/video/fbdev/68328fb.c | 7 ++----- drivers/video/fbdev/atafb.c | 2 +- drivers/video/fbdev/dnfb.c | 2 +- drivers/video/fbdev/fm2fb.c | 4 ++-- drivers/video/fbdev/hpfb.c | 4 ++-- drivers/video/fbdev/q40fb.c | 2 +- drivers/video/fbdev/skeletonfb.c | 6 ++---- drivers/video/fbdev/valkyriefb.c | 10 +++------- 8 files changed, 14 insertions(+), 23 deletions(-) commit f45566fb1a1dbaa1a984ca0a41e57ce35fc3aa38 Author: Geert Uytterhoeven Date: Mon Jul 11 17:39:30 2022 +0200 video: fbdev: cirrusfb: Make cirrusfb_zorro_unregister() static cirrusfb_zorro_unregister() is only used locally, hence make it static. Signed-off-by: Geert Uytterhoeven Signed-off-by: Helge Deller drivers/video/fbdev/cirrusfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf64b99c377b1c577fad2c58d06d76ec5039d276 Author: Geert Uytterhoeven Date: Mon Jul 11 17:37:52 2022 +0200 video: fbdev: sa1100fb: Remove unused sa1100fb_setup() sa1100fb_setup() has been unused since the beginning of Linux git history. Signed-off-by: Geert Uytterhoeven Signed-off-by: Helge Deller drivers/video/fbdev/sa1100fb.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) commit 2194f9576097543e26fa690abaa7166754fccabe Author: Geert Uytterhoeven Date: Mon Jul 11 17:35:48 2022 +0200 video: fbdev: amiga: Simplify amifb_pan_display() The fb_pan_display() function in the core already takes care of validating most panning parameters before calling the driver's .fb_pan_display() callback, and of updating the panning state afterwards, so there is no need to repeat that in the driver. Remove the duplicate code. Signed-off-by: Geert Uytterhoeven Signed-off-by: Helge Deller drivers/video/fbdev/amifb.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 942a8186eb4451700dadd1d60a2e43ce67605991 Author: Christoph Hellwig Date: Tue Jul 12 08:43:07 2022 +0200 swiotlb: move struct io_tlb_slot to swiotlb.c No need to expose this structure definition in the header. Signed-off-by: Christoph Hellwig include/linux/swiotlb.h | 6 +----- kernel/dma/swiotlb.c | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-) commit 57e6840cf79a4af84f44af3f8cfeacd8a14a6c6f Author: Chao Gao Date: Fri Jul 15 18:45:35 2022 +0800 swiotlb: ensure a segment doesn't cross the area boundary Free slots tracking assumes that slots in a segment can be allocated to fulfill a request. This implies that slots in a segment should belong to the same area. Although the possibility of a violation is low, it is better to explicitly enforce segments won't span multiple areas by adjusting the number of slabs when configuring areas. Signed-off-by: Chao Gao Signed-off-by: Christoph Hellwig kernel/dma/swiotlb.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 44335487bab05e06902f9184179857aae764bfe6 Author: Chao Gao Date: Fri Jul 15 18:45:34 2022 +0800 swiotlb: consolidate rounding up default_nslabs default_nslabs are rounded up in two cases with exactly same comments. Add a simple wrapper to reduce duplicate code/comments. It is preparatory to adding more logics into the round-up. No functional change intended. Signed-off-by: Chao Gao Signed-off-by: Christoph Hellwig kernel/dma/swiotlb.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit 91561d4ecb755f056f8ff04f9dcaec210140e55c Author: Chao Gao Date: Fri Jul 15 18:45:33 2022 +0800 swiotlb: remove unused fields in io_tlb_mem Commit 20347fca71a3 ("swiotlb: split up the global swiotlb lock") splits io_tlb_mem into multiple areas. Each area has its own lock and index. The global ones are not used so remove them. Signed-off-by: Chao Gao Signed-off-by: Christoph Hellwig include/linux/swiotlb.h | 5 ----- kernel/dma/swiotlb.c | 2 -- 2 files changed, 7 deletions(-) commit 4a97739474c402e0a14cf6a432f1920262f6811c Author: Dan Carpenter Date: Fri Jul 15 11:19:50 2022 +0300 swiotlb: fix use after free on error handling path Don't dereference "mem" after it has been freed. Flip the two kfree()s around to address this bug. Fixes: 26ffb91fa5e0 ("swiotlb: split up the global swiotlb lock") Signed-off-by: Dan Carpenter Signed-off-by: Christoph Hellwig kernel/dma/swiotlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 172a672af95c022071b9dacdf8a647c193d0edbd Author: Konrad Dybcio Date: Sat Jul 16 21:32:55 2022 +0200 dt-bindings: cpufreq: cpufreq-qcom-hw: Add SM6375 compatible Add compatible for EPSS CPUFREQ-HW on SM6375. Signed-off-by: Konrad Dybcio Signed-off-by: Viresh Kumar Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml | 1 + 1 file changed, 1 insertion(+) commit a0c999b8a7b9c7ac4ba11b0dff37f9536a728be6 Author: Bryan O'Donoghue Date: Fri Jul 8 13:11:56 2022 +0100 dt-bindings: opp: Add msm8939 to the compatible list msm8939 will uses this driver instead of the generic dt-cpufreq. Add to the compatible list. Acked-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue Signed-off-by: Viresh Kumar Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml | 1 + 1 file changed, 1 insertion(+) commit 228f901ccec83b05e4657897aeb460beb294d2e5 Author: Bryan O'Donoghue Date: Fri Jul 8 13:11:55 2022 +0100 dt-bindings: opp: Add missing compat devices A number of devices listed in drivers/cpufreq/qcom-cpufreq-nvmem.c appear to be missing from the compatible list. Acked-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bryan O'Donoghue Signed-off-by: Viresh Kumar Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 3b4916a6e422394aa129fe9b204f4d489ae484a6 Author: Bryan O'Donoghue Date: Fri Jul 8 13:11:54 2022 +0100 dt-bindings: opp: opp-v2-kryo-cpu: Fix example binding checks Adding missing compat entries to the cpufreq node Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml shows up a dt_binding_check in this file. opp-v2-kryo-cpu.example.dtb: /: cpus:cpu@0: 'power-domains' is a required property opp-v2-kryo-cpu.example.dtb: /: cpus:cpu@0: 'power-domain-names' is a required property opp-v2-kryo-cpu.example.dtb: /: opp-table-0:opp-307200000: 'required-opps' is a required property Fixes: ec24d1d55469 ("dt-bindings: opp: Convert qcom-nvmem-cpufreq to DT schema") Signed-off-by: Bryan O'Donoghue Signed-off-by: Viresh Kumar .../devicetree/bindings/opp/opp-v2-kryo-cpu.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 68315f1a5f1333d8aa67bb7061b5a9da1134f474 Author: Pierre Gondois Date: Mon Jul 4 13:27:39 2022 +0200 cpufreq: Change order of online() CB and policy->cpus modification From a state where all policy->related_cpus are offline, putting one of the policy's CPU back online re-activates the policy by: 1. Calling cpufreq_driver->online() 2. Setting the CPU in policy->cpus qcom_cpufreq_hw_cpu_online() makes use of policy->cpus. Thus 1. and 2. should be inverted to avoid having a policy->cpus empty. The qcom-cpufreq-hw is the only driver affected by this. Signed-off-by: Pierre Gondois Signed-off-by: Viresh Kumar drivers/cpufreq/cpufreq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 999d7c47a0f737157608b9b0d2d37bdd1afec58c Author: Athira Rajeev Date: Fri May 20 14:16:30 2022 +0530 docs: ABI: sysfs-bus-event_source-devices: Document sysfs caps entry for PMU Details is added about "caps" attribute group in the ABI documentation. This is used to expose some of the PMU attributes in "caps" directory under : /sys/bus/event_source/devices//. The dev/caps will contain information about features that platform specific PMU supports. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220520084630.15181-2-atrajeev@linux.vnet.ibm.com .../ABI/testing/sysfs-bus-event_source-devices-caps | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 6320e693d98c7430653866b7ca6679338134cb79 Author: Athira Rajeev Date: Fri May 20 14:16:29 2022 +0530 powerpc/perf: Add support for caps under sysfs in powerpc Add caps support under "/sys/bus/event_source/devices//" for powerpc. This directory can be used to expose some of the specific features that powerpc PMU supports to the user. Example: pmu_name. The name of PMU registered will depend on platform, say power9 or power10 or it could be Generic Compat PMU. Currently the only way to know which is the registered PMU is from the dmesg logs. But clearing the dmesg will make it difficult to know exact PMU backend used. And even extracting from dmesg will be complicated, as we need to parse the dmesg logs and add filters for pmu name. Whereas by exposing it via caps will make it easy as we just need to directly read it from the sysfs. Add a caps directory to /sys/bus/event_source/devices/cpu/ for power8, power9, power10 and generic compat PMU in respective PMU driver code. Update the pmu_name file under caps folder in core-book3s using "attr_update". The information exposed currently: - pmu_name : Underlying PMU name from the driver Example result with power9 pmu: # ls /sys/bus/event_source/devices/cpu/caps pmu_name # cat /sys/bus/event_source/devices/cpu/caps/pmu_name POWER9 Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220520084630.15181-1-atrajeev@linux.vnet.ibm.com arch/powerpc/perf/core-book3s.c | 31 +++++++++++++++++++++++++++++++ arch/powerpc/perf/generic-compat-pmu.c | 10 ++++++++++ arch/powerpc/perf/power10-pmu.c | 10 ++++++++++ arch/powerpc/perf/power8-pmu.c | 10 ++++++++++ arch/powerpc/perf/power9-pmu.c | 10 ++++++++++ 5 files changed, 71 insertions(+) commit 78988b273d592ce74c8aecdd5d748906c38a9e9d Author: Joel Stanley Date: Fri Jun 10 14:10:06 2022 +0930 powerpc/perf: Give generic PMU a nice name When booting on a machine that uses the compat pmu driver we see this: [ 0.071192] GENERIC_COMPAT performance monitor hardware support registered Which is a bit shouty. Give it a nicer name. Signed-off-by: Joel Stanley Reviewed-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610044006.2095806-1-joel@jms.id.au arch/powerpc/perf/generic-compat-pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 233eb8d6894ed3349e9971a51dd8a9b5586e2598 Author: Jiangshan Yi Date: Fri Jul 15 14:00:35 2022 +0800 fs/ocfs2: Fix spelling typo in comment Fix spelling typo in comment. Link: https://lkml.kernel.org/r/20220715060035.632903-1-13667453960@163.com Signed-off-by: Jiangshan Yi Reported-by: k2ci Acked-by: Joseph Qi Signed-off-by: Andrew Morton fs/ocfs2/quota_global.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1298f83b546921506afa4050a833f21433ed4b88 Author: Souptick Joarder (HPE) Date: Sun Jun 26 07:51:14 2022 +0530 ia64: old_rr4 added under CONFIG_HUGETLB_PAGE kernel test robot throws below warning -> arch/ia64/include/asm/mmu_context.h: In function 'reload_context': arch/ia64/include/asm/mmu_context.h:127:48: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable] 127 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4; Add it under CONFIG_HUGETLB_PAGE Link: https://lkml.kernel.org/r/20220626022114.4020-1-jrdr.linux@gmail.com Signed-off-by: Souptick Joarder (HPE) Reported-by: kernel test robot Signed-off-by: Andrew Morton arch/ia64/include/asm/mmu_context.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3adb2d87238dea5e05bab747238bb47306b9cb56 Author: Alexey Dobriyan Date: Tue Jul 12 17:51:45 2022 +0300 proc: fix test for "vsyscall=xonly" boot option Booting with vsyscall=xonly results in the following vsyscall VMA: ffffffffff600000-ffffffffff601000 --xp ... [vsyscall] Test does read from fixed vsyscall address to determine if kernel supports vsyscall page but it doesn't work because, well, vsyscall page is execute only. Fix test by trying to execute from the first byte of the page which contains gettimeofday() stub. This should work because vsyscall entry points have stable addresses by design. Alexey, avoiding parsing .config, /proc/config.gz and /proc/cmdline at all costs. Link: https://lkml.kernel.org/r/Ys2KgeiEMboU8Ytu@localhost.localdomain Signed-off-by: Alexey Dobriyan Cc: Shuah Khan Cc: Signed-off-by: Andrew Morton tools/testing/selftests/proc/proc-pid-vm.c | 75 +++++++++++++++++++++++++++--- 1 file changed, 68 insertions(+), 7 deletions(-) commit d919a1e79bac890421537cf02ae773007bf55e6b Author: Zhihao Cheng Date: Wed Jul 13 21:00:29 2022 +0800 proc: fix a dentry lock race between release_task and lookup Commit 7bc3e6e55acf06 ("proc: Use a list of inodes to flush from proc") moved proc_flush_task() behind __exit_signal(). Then, process systemd can take long period high cpu usage during releasing task in following concurrent processes: systemd ps kernel_waitid stat(/proc/tgid) do_wait filename_lookup wait_consider_task lookup_fast release_task __exit_signal __unhash_process detach_pid __change_pid // remove task->pid_links d_revalidate -> pid_revalidate // 0 d_invalidate(/proc/tgid) shrink_dcache_parent(/proc/tgid) d_walk(/proc/tgid) spin_lock_nested(/proc/tgid/fd) // iterating opened fd proc_flush_pid | d_invalidate (/proc/tgid/fd) | shrink_dcache_parent(/proc/tgid/fd) | shrink_dentry_list(subdirs) ↓ shrink_lock_dentry(/proc/tgid/fd) --> race on dentry lock Function d_invalidate() will remove dentry from hash firstly, but why does proc_flush_pid() process dentry '/proc/tgid/fd' before dentry '/proc/tgid'? That's because proc_pid_make_inode() adds proc inode in reverse order by invoking hlist_add_head_rcu(). But proc should not add any inodes under '/proc/tgid' except '/proc/tgid/task/pid', fix it by adding inode into 'pid->inodes' only if the inode is /proc/tgid or /proc/tgid/task/pid. Performance regression: Create 200 tasks, each task open one file for 50,000 times. Kill all tasks when opened files exceed 10,000,000 (cat /proc/sys/fs/file-nr). Before fix: $ time killall -wq aa real 4m40.946s # During this period, we can see 'ps' and 'systemd' taking high cpu usage. After fix: $ time killall -wq aa real 1m20.732s # During this period, we can see 'systemd' taking high cpu usage. Link: https://lkml.kernel.org/r/20220713130029.4133533-1-chengzhihao1@huawei.com Fixes: 7bc3e6e55acf06 ("proc: Use a list of inodes to flush from proc") Link: https://bugzilla.kernel.org/show_bug.cgi?id=216054 Signed-off-by: Zhihao Cheng Signed-off-by: Zhang Yi Suggested-by: Brian Foster Reviewed-by: Brian Foster Cc: Al Viro Cc: Alexey Dobriyan Cc: Eric Biederman Cc: Matthew Wilcox Cc: Baoquan He Cc: Kalesh Singh Cc: Yu Kuai Signed-off-by: Andrew Morton fs/proc/base.c | 46 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 8 deletions(-) commit 7ffe4e90a061a2f612b3b8c29b583ec3b707781f Author: Ian Kent Date: Fri Jul 8 09:43:23 2022 +0800 autofs: remove unused ino field inode Remove the unused inode field of the autofs dentry info structure. Link: https://lkml.kernel.org/r/165724460393.30914.6511330213821246793.stgit@donald.themaw.net Signed-off-by: Ian Kent Cc: Al Viro Cc: David Howells Cc: Miklos Szeredi Signed-off-by: Andrew Morton fs/autofs/autofs_i.h | 2 -- 1 file changed, 2 deletions(-) commit ba97a0a3a31a2451607ebf601c0b7c4b1322ce9a Author: Ian Kent Date: Fri Jul 8 09:43:18 2022 +0800 autofs: add comment about autofs_mountpoint_changed() The function autofs_mountpoint_changed() is unusual, add a comment about two cases for which it is needed. Link: https://lkml.kernel.org/r/165724459804.30914.10974834416046555127.stgit@donald.themaw.net Signed-off-by: Ian Kent Cc: Al Viro Cc: David Howells Cc: Miklos Szeredi Signed-off-by: Andrew Morton fs/autofs/root.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit a4a87303874c1a7d49cc18a8fe33676b0002ffbf Author: Ian Kent Date: Fri Jul 8 09:43:12 2022 +0800 autofs: use dentry info count instead of simple_empty() The dentry info. field count is used to check if a dentry is in use during expire. But, to be used for this the count field must account for the presence of child dentries in a directory dentry. Therefore it can also be used to check for an empty directory dentry which can be done without having to to take an additional lock or account for the presence of a readdir cursor dentry as is done by simple_empty(). Link: https://lkml.kernel.org/r/165724459238.30914.1504611159945950108.stgit@donald.themaw.net Signed-off-by: Ian Kent Cc: Al Viro Cc: David Howells Cc: Miklos Szeredi Signed-off-by: Andrew Morton fs/autofs/autofs_i.h | 5 +++++ fs/autofs/expire.c | 2 +- fs/autofs/root.c | 18 ++++++++---------- 3 files changed, 14 insertions(+), 11 deletions(-) commit 9ccbac76e71de411b9c4beea9d91ba98f3fad690 Author: Ian Kent Date: Fri Jul 8 09:43:06 2022 +0800 autofs: make dentry info count consistent If an autofs dentry is a mount root directory there's no ->mkdir() call to set its count to one. To make the dentry info count consistent for all autofs dentries set count to one when the dentry info struct is allocated. Link: https://lkml.kernel.org/r/165724458671.30914.2902424437132835325.stgit@donald.themaw.net Signed-off-by: Ian Kent Cc: Al Viro Cc: David Howells Cc: Miklos Szeredi Signed-off-by: Andrew Morton fs/autofs/inode.c | 1 + fs/autofs/root.c | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) commit f71381fcdc3ab615f55278d435a9f35542dc9e63 Author: Ian Kent Date: Fri Jul 8 09:43:01 2022 +0800 autofs: use inode permission method for write access Patch series "autofs: misc patches". This series contains several patches that resulted mostly from comments made by Al Viro (quite a long time ago now). This patch (of 5): Eliminate some code duplication from mkdir/rmdir/symlink/unlink methods by using the inode operation .permission(). Link: https://lkml.kernel.org/r/165724445154.30914.10970894936827635879.stgit@donald.themaw.net Link: https://lkml.kernel.org/r/165724458096.30914.13499431569758625806.stgit@donald.themaw.net Signed-off-by: Ian Kent Cc: Al Viro Cc: David Howells Cc: Miklos Szeredi Signed-off-by: Andrew Morton fs/autofs/root.c | 63 ++++++++++++++++++++------------------------------------ 1 file changed, 22 insertions(+), 41 deletions(-) commit 55656016daa7155d95471627c1b1438d488f011b Author: Mark-PK Tsai Date: Fri Jul 8 21:19:47 2022 +0800 lib: devres: use numa aware allocation Allocate device resource from local node memory when the numa locality of the device is specified. Link: https://lkml.kernel.org/r/20220708131952.14500-1-mark-pk.tsai@mediatek.com Signed-off-by: Mark-PK Tsai Cc: Matthias Brugger Cc: YJ Chiang Cc: Hans de Goede Cc: Thomas Zimmermann Cc: Zhen Lei Cc: Jacob Keller Signed-off-by: Andrew Morton lib/devres.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit bd27acaac24e4b252ee28dddcabaee80456d0faf Author: Tetsuo Handa Date: Wed Jun 22 14:46:31 2022 +0900 lib/smp_processor_id: fix imbalanced instrumentation_end() call Currently instrumentation_end() won't be called if printk_ratelimit() returned false. Link: https://lkml.kernel.org/r/a636d8e0-ad32-5888-acac-671f7f553bb3@I-love.SAKURA.ne.jp Fixes: 126f21f0e8d46e2c ("lib/smp_processor_id: Move it into noinstr section") Signed-off-by: Tetsuo Handa Cc: Thomas Gleixner Cc: Alexandre Chartre Cc: Peter Zijlstra Signed-off-by: Andrew Morton lib/smp_processor_id.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 953257a9252a9b3c58ca68fc5bf26fc65e5b1cb8 Author: Sander Vanheule Date: Sat Jul 2 18:08:28 2022 +0200 cpumask: update cpumask_next_wrap() signature The extern specifier is not needed for this declaration, so drop it. The function also depends only on the input parameters, and has no side effects, so it can be marked __pure like other functions in cpumask.h. Link: https://lkml.kernel.org/r/72ab755695b74bb5fbaa756ae4c0edd708d172f1.1656777646.git.sander@svanheule.net Signed-off-by: Sander Vanheule Reviewed-by: Andy Shevchenko Cc: Borislav Petkov Cc: Dave Hansen Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Marco Elver Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Valentin Schneider Cc: Yury Norov Signed-off-by: Andrew Morton include/linux/cpumask.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c41e8866c28c4d1a88a085fc3c3d6ba403510804 Author: Sander Vanheule Date: Sat Jul 2 18:08:26 2022 +0200 lib/test: introduce cpumask KUnit test suite Add a basic suite of tests for cpumask, providing some tests for empty and completely filled cpumasks. Link: https://lkml.kernel.org/r/c96980ec35c3bd23f17c3374bf42c22971545e85.1656777646.git.sander@svanheule.net Signed-off-by: Sander Vanheule Reviewed-by: Andy Shevchenko Suggested-by: Yury Norov Cc: Borislav Petkov Cc: Dave Hansen Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Marco Elver Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Valentin Schneider Signed-off-by: Andrew Morton lib/Kconfig.debug | 9 ++++ lib/Makefile | 1 + lib/test_cpumask.c | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 148 insertions(+) commit b81dce77cedcea6f00292f02d4b1ebbfc2c5988d Author: Sander Vanheule Date: Sat Jul 2 18:08:25 2022 +0200 cpumask: Fix invalid uniprocessor mask assumption On uniprocessor builds, any CPU mask is assumed to contain exactly one CPU (cpu0). This assumption ignores the existence of empty masks, resulting in incorrect behaviour. cpumask_first_zero(), cpumask_next_zero(), and for_each_cpu_not() don't provide behaviour matching the assumption that a UP mask is always "1", and instead provide behaviour matching the empty mask. Drop the incorrectly optimised code and use the generic implementations in all cases. Link: https://lkml.kernel.org/r/86bf3f005abba2d92120ddd0809235cab4f759a6.1656777646.git.sander@svanheule.net Signed-off-by: Sander Vanheule Suggested-by: Yury Norov Cc: Andy Shevchenko Cc: Borislav Petkov Cc: Dave Hansen Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Marco Elver Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Valentin Schneider Signed-off-by: Andrew Morton include/linux/cpumask.h | 99 ++++++++++--------------------------------------- lib/Makefile | 3 +- lib/cpumask.c | 2 + 3 files changed, 22 insertions(+), 82 deletions(-) commit 4f09903078eeb9138cddce8db06100b82f8620e8 Author: Sander Vanheule Date: Sat Jul 2 18:08:27 2022 +0200 cpumask: add UP optimised for_each_*_cpu versions On uniprocessor builds, the following loops will always run over a mask that contains one enabled CPU (cpu0): - for_each_possible_cpu - for_each_online_cpu - for_each_present_cpu Provide uniprocessor-specific macros for these loops, that always run exactly once. Link: https://lkml.kernel.org/r/3a92869b902a075b97be5d1452c9c6badbbff0df.1656777646.git.sander@svanheule.net Signed-off-by: Sander Vanheule Acked-by: Yury Norov Cc: Andy Shevchenko Cc: Borislav Petkov Cc: Dave Hansen Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Marco Elver Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Valentin Schneider Signed-off-by: Andrew Morton include/linux/cpumask.h | 7 +++++++ 1 file changed, 7 insertions(+) commit adbcaef84088713bae9af5690cf566ce4fadfa22 Author: Sander Vanheule Date: Sat Jul 2 18:08:24 2022 +0200 x86/cacheinfo: move shared cache map definitions Patch series "cpumask: Fix invalid uniprocessor assumptions", v4. On uniprocessor builds, it is currently assumed that any cpumask will contain the single CPU: cpu0. This assumption is used to provide optimised implementations. The current assumption also appears to be wrong, by ignoring the fact that users can provide empty cpumasks. This can result in bugs as explained in [1] - for_each_cpu() will run one iteration of the loop even when passed an empty cpumask. This series introduces some basic tests, and updates the optimisations for uniprocessor builds. The x86 patch was written after the kernel test robot [2] ran into a failed build. I have tried to list the files potentially affected by the changes to cpumask.h, in an attempt to find any other cases that fail on !SMP. I've gone through some of the files manually, and ran a few cross builds, but nothing else popped up. I (build) checked about half of the potientally affected files, but I do not have the resources to do them all. I hope we can fix other issues if/when they pop up later. [1] https://lore.kernel.org/all/20220530082552.46113-1-sander@svanheule.net/ [2] https://lore.kernel.org/all/202206060858.wA0FOzRy-lkp@intel.com/ This patch (of 5): The maps to keep track of shared caches between CPUs on SMP systems are declared in asm/smp.h, among them specifically cpu_llc_shared_map. These maps are externally defined in cpu/smpboot.c. The latter is only compiled on CONFIG_SMP=y, which means the declared extern symbols from asm/smp.h do not have a corresponding definition on uniprocessor builds. The inline cpu_llc_shared_mask() function from asm/smp.h refers to the map declaration mentioned above. This function is referenced in cacheinfo.c inside for_each_cpu() loop macros, to provide cpumask for the loop. On uniprocessor builds, the symbol for the cpu_llc_shared_map does not exist. However, the current implementation of for_each_cpu() also (wrongly) ignores the provided mask. By sheer luck, the compiler thus optimises out this unused reference to cpu_llc_shared_map, and the linker therefore does not require the cpu_llc_shared_mask to actually exist on uniprocessor builds. Only on SMP bulids does smpboot.o exist to provide the required symbols. To no longer rely on compiler optimisations for successful uniprocessor builds, move the definitions of cpu_llc_shared_map and cpu_l2c_shared_map from smpboot.c to cacheinfo.c. Link: https://lkml.kernel.org/r/cover.1656777646.git.sander@svanheule.net Link: https://lkml.kernel.org/r/e8167ddb570f56744a3dc12c2149a660a324d969.1656777646.git.sander@svanheule.net Signed-off-by: Sander Vanheule Cc: Andy Shevchenko Cc: Marco Elver Cc: Greg Kroah-Hartman Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Valentin Schneider Cc: Yury Norov Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Signed-off-by: Andrew Morton arch/x86/kernel/cpu/cacheinfo.c | 6 ++++++ arch/x86/kernel/smpboot.c | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) commit 8b5db6679807fd0ab1154375ea6e5aa6b11c4350 Author: Nikolay Borisov Date: Fri Jul 1 14:35:13 2022 +0300 scripts/bloat-o-meter: add -p argument When doing cross platform development on a machine sometimes it might be useful to invoke bloat-o-meter for files which haven't been build with the native toolchain. In cases when the host nm doesn't support the target one then a toolchain-specific nm could be used. Add this ability by adding the -p allowing invocations as: ./scripts/bloat-o-meter -p riscv64-unknown-linux-gnu- file1.o file2.o Link: https://lkml.kernel.org/r/20220701113513.1938008-2-nborisov@suse.com Signed-off-by: Nikolay Borisov Signed-off-by: Andrew Morton scripts/bloat-o-meter | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit b62eb2731e17e83c32e1a6089b4463da1a75e66e Author: Nikolay Borisov Date: Fri Jul 1 14:35:12 2022 +0300 scripts/bloat-o-meter: switch argument parsing to using argparse This will facilitate further extension to the arguments the script takes. As an added benefit it also produces saner usage output, where mutual exclusivity of the c|d|t parameters is clearly visible: ./scripts/bloat-o-meter -h usage: bloat-o-meter [-h] [-c | -d | -t] file1 file2 Simple script used to compare the symbol sizes of 2 object files positional arguments: file1 First file to compare file2 Second file to compare optional arguments: -h, --help show this help message and exit -c categorize output based on symbol type -d Show delta of Data Section -t Show delta of text Section Link: https://lkml.kernel.org/r/20220701113513.1938008-1-nborisov@suse.com Signed-off-by: Nikolay Borisov Signed-off-by: Andrew Morton scripts/bloat-o-meter | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) commit a16ceb13961068f7209e34d7984f8e42d2c06159 Author: Benjamin Segall Date: Wed Jun 15 14:24:23 2022 -0700 epoll: autoremove wakers even more aggressively If a process is killed or otherwise exits while having active network connections and many threads waiting on epoll_wait, the threads will all be woken immediately, but not removed from ep->wq. Then when network traffic scans ep->wq in wake_up, every wakeup attempt will fail, and will not remove the entries from the list. This means that the cost of the wakeup attempt is far higher than usual, does not decrease, and this also competes with the dying threads trying to actually make progress and remove themselves from the wq. Handle this by removing visited epoll wq entries unconditionally, rather than only when the wakeup succeeds - the structure of ep_poll means that the only potential loss is the timed_out->eavail heuristic, which now can race and result in a redundant ep_send_events attempt. (But only when incoming data and a timeout actually race, not on every timeout) Shakeel added: : We are seeing this issue in production with real workloads and it has : caused hard lockups. Particularly network heavy workloads with a lot : of threads in epoll_wait() can easily trigger this issue if they get : killed (oom-killed in our case). Link: https://lkml.kernel.org/r/xm26fsjotqda.fsf@google.com Signed-off-by: Ben Segall Tested-by: Shakeel Butt Cc: Alexander Viro Cc: Linus Torvalds Cc: Shakeel Butt Cc: Eric Dumazet Cc: Roman Penyaev Cc: Jason Baron Cc: Khazhismel Kumykov Cc: Heiher Cc: Signed-off-by: Andrew Morton fs/eventpoll.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 2c795fb03f138e9602e1f1ee31b8bfc00a96c7e5 Author: Yu Zhe Date: Tue Jun 28 10:12:51 2022 +0800 ipc/mqueue: remove unnecessary (void*) conversion Remove unnecessary void* type casting. Link: https://lkml.kernel.org/r/20220628021251.17197-1-yuzhe@nfschina.com Signed-off-by: Yu Zhe Signed-off-by: Andrew Morton ipc/mqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46d36b1be18b745fc9f6be2087633ba2f9895ffe Author: Tao Liu Date: Mon Jun 27 15:44:41 2022 +0800 kdump: round up the total memory size to 128M for crashkernel reservation The total memory size we get in kernel is usually slightly less than the actual memory size because BIOS/firmware will reserve some memory region. So it won't export all memory as usable. E.g, on my x86_64 kvm guest with 1G memory, the total_mem value shows: UEFI boot with ovmf: 0x3faef000 Legacy boot kvm guest: 0x3ff7ec00 When specifying crashkernel=1G-2G:128M, if we have a 1G memory machine, we get total size 1023M from firmware. Then it will not fall into 1G-2G, thus no memory reserved. User will never know this, it is hard to let user know the exact total value in kernel. One way is to use dmi/smbios to get physical memory size, but it's not reliable as well. According to Prarit hardware vendors sometimes screw this up. Thus round up total size to 128M to work around this problem. This patch is a resend of [1] and rebased onto v5.19-rc2, and the original credit goes to Dave Young. [1]: http://lists.infradead.org/pipermail/kexec/2018-April/020568.html Link: https://lkml.kernel.org/r/20220627074440.187222-1-ltao@redhat.com Signed-off-by: Tao Liu Acked-by: Baoquan He Cc: Dave Young Signed-off-by: Andrew Morton kernel/crash_core.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 376b0c266143a1dda162db6d5bc9b3a7f0ae97c9 Author: Alexey Dobriyan Date: Wed Jun 15 14:22:06 2022 +0300 proc: delete unused includes Those aren't necessary after seq files won. Link: https://lkml.kernel.org/r/YqnA3mS7KBt8Z4If@localhost.localdomain Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton fs/proc/array.c | 1 - fs/proc/inode.c | 2 -- fs/proc/kmsg.c | 1 - fs/proc/nommu.c | 1 - fs/proc/proc_net.c | 3 --- fs/proc/proc_tty.c | 2 -- fs/proc/root.c | 3 --- fs/proc/vmcore.c | 1 - 8 files changed, 14 deletions(-) commit 5fd8fea935a1091083506d0b982fcc5d35062f06 Author: Stephen Brennan Date: Mon May 16 17:05:08 2022 -0700 vmcoreinfo: include kallsyms symbols The internal kallsyms tables contain information which could be quite useful to a debugging tool in the absence of other debuginfo. If kallsyms is enabled, then a debugging tool could parse it and use it as a fallback symbol table. Combined with BTF data, live & post-mortem debuggers can support basic operations without needing a large DWARF debuginfo file available. As many as five symbols are necessary to properly parse kallsyms names and addresses. Add these to the vmcoreinfo note. CONFIG_KALLSYMS_ABSOLUTE_PERCPU does impact the computation of symbol addresses. However, a debugger can infer this configuration value by comparing the address of _stext in the vmcoreinfo with the address computed via kallsyms. So there's no need to include information about this config value in the vmcoreinfo note. To verify that we're still well below the maximum of 4096 bytes, I created a script[1] to compute a rough upper bound on the possible size of vmcoreinfo. On v5.18-rc7, the script reports 3106 bytes, and with this patch, the maximum become 3370 bytes. [1]: https://github.com/brenns10/kernel_stuff/blob/master/vmcoreinfosize/ Link: https://lkml.kernel.org/r/20220517000508.777145-3-stephen.s.brennan@oracle.com Signed-off-by: Stephen Brennan Acked-by: Baoquan He Cc: Bixuan Cui Cc: Dave Young Cc: David Vernet Cc: "Eric W. Biederman" Cc: Jiri Olsa Cc: Kees Cook Cc: Nick Desaulniers Cc: Sami Tolvanen Cc: Stephen Boyd Cc: Vivek Goyal Signed-off-by: Andrew Morton kernel/crash_core.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 71f8c15565d0f3d2f5b3339845e05cf4f03725cd Author: Stephen Brennan Date: Mon May 16 17:05:07 2022 -0700 kallsyms: move declarations to internal header Patch series "Expose kallsyms data in vmcoreinfo note". The kernel can be configured to contain a lot of introspection or debugging information built-in, such as ORC for unwinding stack traces, BTF for type information, and of course kallsyms. Debuggers could use this information to navigate a core dump or live system, but they need to be able to find it. This patch series adds the necessary symbols into vmcoreinfo, which would allow a debugger to find and interpret the kallsyms table. Using the kallsyms data, the debugger can then lookup any symbol, allowing it to find ORC, BTF, or any other useful data. This would allow a live kernel, or core dump, to be debugged without any DWARF debuginfo. This is useful for many cases: the debuginfo may not have been generated, or you may not want to deploy the large files everywhere you need them. I've demonstrated a proof of concept for this at LSF/MM+BPF during a lighting talk. Using a work-in-progress branch of the drgn debugger, and an extended set of BTF generated by a patched version of dwarves, I've been able to open a core dump without any DWARF info and do basic tasks such as enumerating slab caches, block devices, tasks, and doing backtraces. I hope this series can be a first step toward a new possibility of "DWARFless debugging". Related discussion around the BTF side of this: https://lore.kernel.org/bpf/586a6288-704a-f7a7-b256-e18a675927df@oracle.com/T/#u Some work-in-progress branches using this feature: https://github.com/brenns10/dwarves/tree/remove_percpu_restriction_1 https://github.com/brenns10/drgn/tree/kallsyms_plus_btf This patch (of 2): To include kallsyms data in the vmcoreinfo note, we must make the symbol declarations visible outside of kallsyms.c. Move these to a new internal header file. Link: https://lkml.kernel.org/r/20220517000508.777145-1-stephen.s.brennan@oracle.com Link: https://lkml.kernel.org/r/20220517000508.777145-2-stephen.s.brennan@oracle.com Signed-off-by: Stephen Brennan Acked-by: Baoquan He Cc: Nick Desaulniers Cc: Dave Young Cc: Kees Cook Cc: Jiri Olsa Cc: Stephen Boyd Cc: Bixuan Cui Cc: David Vernet Cc: Vivek Goyal Cc: Sami Tolvanen Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton kernel/kallsyms.c | 23 +---------------------- kernel/kallsyms_internal.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 22 deletions(-) commit 4a70ce5f93aaeb0aa81f29c4a3c70f39d8f21087 Author: Colin Ian King Date: Mon Jul 4 22:53:25 2022 +0100 lib/ts_bm.c: remove redundant store to variable consumed after addition There is no need to store the result of the addition back to variable consumed after the addition. The store is redundant, replace += with just + Cleans up clang scan build warning: lib/ts_bm.c:83:11: warning: Although the value stored to 'consumed' is used in the enclosing expression, the value is never actually read from 'consumed' [deadcode.DeadStores] Link: https://lkml.kernel.org/r/20220704215325.600993-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King Signed-off-by: Andrew Morton lib/ts_bm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d529ea80b8a03401195506f45c052c4937545d5 Author: wuchi Date: Wed Jun 29 11:02:41 2022 +0800 lib/scatterlist: use matched parameter type when calling __sg_free_table() commit 4635873c561a ("scsi: lib/sg_pool.c: improve APIs for allocating sg pool") changeed @(bool)skip_first_chunk of __sg_free_table() to @(unsigned int)nents_first_chunk, so use unsigend int type instead of bool type (false -> 0) when calling the function in sg_free_append_table() and sg_free_table(). Link: https://lkml.kernel.org/r/20220629030241.84559-1-wuchi.zero@gmail.com Signed-off-by: wuchi Reviewed-by: Ming Lei Cc: Maor Gottlieb Cc: Christoph Hellwig Signed-off-by: Andrew Morton lib/scatterlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d8867f3e0833963dd4af64bed2fb47ed5cf55d8 Author: Tiezhu Yang Date: Mon Jun 27 11:02:45 2022 +0800 lib: make LZ4_decompress_safe_forceExtDict() static LZ4_decompress_safe_forceExtDict() is only used in lib/lz4/lz4_decompress.c, make it static to fix the build warning about "no previous prototype" [1]. [1] https://lore.kernel.org/lkml/202206260948.akgsho1q-lkp@intel.com/ Link: https://lkml.kernel.org/r/1656298965-8698-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Tiezhu Yang Reported-by: kernel test robot Signed-off-by: Andrew Morton lib/lz4/lz4_decompress.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cda83bb8a61e6d7ce231dc1c2b78a9b79b1f1411 Author: wuchi Date: Sat Jun 25 21:53:24 2022 +0800 lib/radix-tree: remove unused argument of insert_entries insert_entries() doesn't use the 'bool replace' argument, and the function is only used locally, remove the argument. The historical context of the unused argument is as follow: 2: commit <3a08cd52c37c79> (radix tree: Remove multiorder support) Remove the code related to macro CONFIG_RADIX_TREE_MULTIORDER to convert to the xArray. Without the macro, there is no need to retain the argument. 1: commit <175542f575723e> (radix-tree: add radix_tree_join) Add insert_entries(..., bool replace) function, depending on the macro CONFIG_RADIX_TREE_MULTIORDER definition, the implementation is different. Notice that the implementation without the macro doesn't use the argument. [Matthew Wilcox: add historical context for argument] Link: https://lkml.kernel.org/r/20220625135324.72574-1-wuchi.zero@gmail.com Signed-off-by: wuchi Cc: Matthew Wilcox Signed-off-by: Andrew Morton lib/radix-tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 045ed31e23aea840648c290dbde04797064960db Author: Dan Carpenter Date: Fri Jun 24 08:30:04 2022 +0300 kfifo: fix kfifo_to_user() return type The kfifo_to_user() macro is supposed to return zero for success or negative error codes. Unfortunately, there is a signedness bug so it returns unsigned int. This only affects callers which try to save the result in ssize_t and as far as I can see the only place which does that is line6_hwdep_read(). TL;DR: s/_uint/_int/. Link: https://lkml.kernel.org/r/YrVL3OJVLlNhIMFs@kili Fixes: 144ecf310eb5 ("kfifo: fix kfifo_alloc() to return a signed int value") Signed-off-by: Dan Carpenter Cc: Stefani Seibold Cc: Randy Dunlap Signed-off-by: Andrew Morton include/linux/kfifo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43c249ea0b1e10baac4a1264a25d69723ce5d2c2 Author: Uros Bizjak Date: Fri Jun 24 16:14:12 2022 +0200 compiler-gcc.h: remove ancient workaround for gcc PR 58670 The workaround for 'asm goto' miscompilation introduces a compiler barrier quirk that inhibits many useful compiler optimizations. For example, __try_cmpxchg_user compiles to: 11375: 41 8b 4d 00 mov 0x0(%r13),%ecx 11379: 41 8b 02 mov (%r10),%eax 1137c: f0 0f b1 0a lock cmpxchg %ecx,(%rdx) 11380: 0f 94 c2 sete %dl 11383: 84 d2 test %dl,%dl 11385: 75 c4 jne 1134b <...> 11387: 41 89 02 mov %eax,(%r10) where the barrier inhibits flags propagation from asm when compiled with gcc-12. When the mentioned quirk is removed, the following code is generated: 11553: 41 8b 4d 00 mov 0x0(%r13),%ecx 11557: 41 8b 02 mov (%r10),%eax 1155a: f0 0f b1 0a lock cmpxchg %ecx,(%rdx) 1155e: 74 c9 je 11529 <...> 11560: 41 89 02 mov %eax,(%r10) The refered compiler bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 was fixed for gcc-4.8.2. Current minimum required version of GCC is version 5.1 which has the above 'asm goto' miscompilation fixed, so remove the workaround. Link: https://lkml.kernel.org/r/20220624141412.72274-1-ubizjak@gmail.com Signed-off-by: Uros Bizjak Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Thomas Gleixner Signed-off-by: Andrew Morton include/linux/compiler-gcc.h | 11 ----------- 1 file changed, 11 deletions(-) commit 86e5908ec293bf6505a59d02542da006226bcaa7 Author: wuchi Date: Mon Jun 20 18:02:44 2022 +0800 lib/error-inject: traverse list with mutex Traversing list without mutex in get_injectable_error_type will race with the following code: list_del_init(&ent->list) kfree(ent) in module_unload_ei_list. So fix that. Link: https://lkml.kernel.org/r/20220620100244.82896-1-wuchi.zero@gmail.com Signed-off-by: wuchi Cc: Masami Hiramatsu (Google) Cc: Martin KaFai Lau Cc: Song Liu Cc: Yonghong Song Cc: John Fastabend Cc: KP Singh Signed-off-by: Andrew Morton lib/error-inject.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit f9987921cb541b1187a648141a9048547ea89ffb Author: Vlastimil Babka Date: Mon Jun 20 17:02:49 2022 +0200 lib/stackdepot: replace CONFIG_STACK_HASH_ORDER with automatic sizing As Linus explained [1], setting the stackdepot hash table size as a config option is suboptimal, especially as stackdepot becomes a dependency of less "expert" subsystems than initially (e.g. DRM, networking, SLUB_DEBUG): : (a) it introduces a new compile-time question that isn't sane to ask : a regular user, but is now exposed to regular users. : (b) this by default uses 1MB of memory for a feature that didn't in : the past, so now if you have small machines you need to make sure you : make a special kernel config for them. Ideally we would employ rhashtable for fully automatic resizing, which should be feasible for many of the new users, but problematic for the original users with restricted context that call __stack_depot_save() with can_alloc == false, i.e. KASAN. However we can easily remove the config option and scale the hash table automatically with system memory. The STACK_HASH_MASK constant becomes stack_hash_mask variable and is used only in one mask operation, so the overhead should be negligible to none. For early allocation we can employ the existing alloc_large_system_hash() function and perform similar scaling for the late allocation. The existing limits of the config option (between 4k and 1M buckets) are preserved, and scaling factor is set to one bucket per 16kB memory so on 64bit the max 1M buckets (8MB memory) is achieved with 16GB system, while a 1GB system will use 512kB. Because KASAN is reported to need the maximum number of buckets even with smaller amounts of memory [2], set it as such when kasan_enabled(). If needed, the automatic scaling could be complemented with a boot-time kernel parameter, but it feels pointless to add it without a specific use case. [1] https://lore.kernel.org/all/CAHk-=wjC5nS+fnf6EzRD9yQRJApAhxx7gRB87ZV+pAWo9oVrTg@mail.gmail.com/ [2] https://lore.kernel.org/all/CACT4Y+Y4GZfXOru2z5tFPzFdaSUd+GFc6KVL=bsa0+1m197cQQ@mail.gmail.com/ Link: https://lkml.kernel.org/r/20220620150249.16814-1-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reported-by: Linus Torvalds Acked-by: Dmitry Vyukov Cc: Marco Elver Cc: Alexander Potapenko Cc: Andrey Konovalov Signed-off-by: Andrew Morton lib/Kconfig | 9 --------- lib/stackdepot.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 49 insertions(+), 19 deletions(-) commit 62df90b53e6f332bb69b73621998826c49a17323 Author: wuchi Date: Sun Jun 19 15:46:41 2022 +0800 net, lib/once: remove {net_}get_random_once_wait macro DO_ONCE(func, ...) will call func with spinlock which acquired by spin_lock_irqsave in __do_once_start. But the get_random_once_wait will sleep in get_random_bytes_wait -> wait_for_random_bytes. Fortunately, there is no place to use {net_}get_random_once_wait, so we could remove them simply. Link: https://lkml.kernel.org/r/20220619074641.40916-1-wuchi.zero@gmail.com Signed-off-by: wuchi Acked-by: Jakub Kicinski Cc: David S. Miller Cc: Eric Dumazet Cc: Paolo Abeni Signed-off-by: Andrew Morton include/linux/net.h | 2 -- include/linux/once.h | 2 -- 2 files changed, 4 deletions(-) commit 5a66fce95b72e6359527415b33a7ae13f0d6b7eb Author: wuchi Date: Sat Jun 18 16:25:21 2022 +0800 lib/lru_cache: fix error free handing in lc_create When kmem_cache_alloc in function lc_create returns null, we will free the memory already allocated. The loop of kmem_cache_free is wrong, especially: i = 0 ==> do wrong loop i > 0 ==> do not free element[0] Link: https://lkml.kernel.org/r/20220618082521.7082-1-wuchi.zero@gmail.com Signed-off-by: wuchi Cc: Philipp Reisner Cc: Lars Ellenberg Cc: Christoph Bhmwalder Signed-off-by: Andrew Morton lib/lru_cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5a704629f2c1ba33bbb444cb18e6957e97c76e8f Author: Dan Moulding Date: Sun Jul 17 17:31:37 2022 -0700 init: add "hostname" kernel parameter The gethostname system call returns the hostname for the current machine. However, the kernel has no mechanism to initially set the current machine's name in such a way as to guarantee that the first userspace process to call gethostname will receive a meaningful result. It relies on some unspecified userspace process to first call sethostname before gethostname can produce a meaningful name. Traditionally the machine's hostname is set from userspace by the init system. The init system, in turn, often relies on a configuration file (say, /etc/hostname) to provide the value that it will supply in the call to sethostname. Consequently, the file system containing /etc/hostname usually must be available before the hostname will be set. There may, however, be earlier userspace processes that could call gethostname before the file system containing /etc/hostname is mounted. Such a process will get some other, likely meaningless, name from gethostname (such as "(none)", "localhost", or "darkstar"). A real-world example where this can happen, and lead to undesirable results, is with mdadm. When assembling arrays, mdadm distinguishes between "local" arrays and "foreign" arrays. A local array is one that properly belongs to the current machine, and a foreign array is one that is (possibly temporarily) attached to the current machine, but properly belongs to some other machine. To determine if an array is local or foreign, mdadm may compare the "homehost" recorded on the array with the current hostname. If mdadm is run before the root file system is mounted, perhaps because the root file system itself resides on an md-raid array, then /etc/hostname isn't yet available and the init system will not yet have called sethostname, causing mdadm to incorrectly conclude that all of the local arrays are foreign. Solving this problem *could* be delegated to the init system. It could be left up to the init system (including any init system that starts within an initramfs, if one is in use) to ensure that sethostname is called before any other userspace process could possibly call gethostname. However, it may not always be obvious which processes could call gethostname (for example, udev itself might not call gethostname, but it could via udev rules invoke processes that do). Additionally, the init system has to ensure that the hostname configuration value is stored in some place where it will be readily accessible during early boot. Unfortunately, every init system will attempt to (or has already attempted to) solve this problem in a different, possibly incorrect, way. This makes getting consistently working configurations harder for users. I believe it is better for the kernel to provide the means by which the hostname may be set early, rather than making this a problem for the init system to solve. The option to set the hostname during early startup, via a kernel parameter, provides a simple, reliable way to solve this problem. It also could make system configuration easier for some embedded systems. [dmoulding@me.com: v2] Link: https://lkml.kernel.org/r/20220506060310.7495-2-dmoulding@me.com Link: https://lkml.kernel.org/r/20220505180651.22849-2-dmoulding@me.com Signed-off-by: Dan Moulding Cc: Thomas Gleixner Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/admin-guide/kernel-parameters.txt | 13 +++++++++++++ init/version.c | 17 +++++++++++++++++ 2 files changed, 30 insertions(+) commit 13c1c74af7643f27273cb31a412811b8cd971b78 Author: Kefeng Wang Date: Wed Jun 8 15:25:34 2022 +0800 zram: fix unused 'zram_wb_devops' warning drivers/block/zram/zram_drv.c:55:45: warning: 'zram_wb_devops' defined but not used [-Wunused-const-variable=] Fix the above warning if CONFIG_ZRAM_WRITEBACK not enabled. Link: https://lkml.kernel.org/r/20220608072534.68850-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Cc: Minchan Kim Cc: Nitin Gupta Cc: Jens Axboe Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 0d8bc0b10aeab543bdccb86180f58db1f79f7cee Author: Xiu Jianfeng Date: Wed Jul 13 20:53:14 2022 +0800 writeback: cleanup bdi_sched_wait() bdi_sched_wait() is no longer used since commit 839a8e8660b6 ("writeback: replace custom worker pool implementation with unbound workqueue"), so remove it. Link: https://lkml.kernel.org/r/20220713125314.171345-1-xiujianfeng@huawei.com Signed-off-by: Xiu Jianfeng Reviewed-by: Jan Kara Reviewed-by: Johannes Thumshirn Acked-by: Jens Axboe Signed-off-by: Andrew Morton include/linux/backing-dev.h | 6 ------ 1 file changed, 6 deletions(-) commit cdb5c9e53f2e7166409dbf7248364f592d11bd1c Author: Miaohe Lin Date: Sat Jul 9 17:25:27 2022 +0800 mm/mmap: fix obsolete comment of find_extend_vma mmget_still_valid() has already been removed via commit 4d45e75a9955 ("mm: remove the now-unnecessary mmget_still_valid() hack"). Update the corresponding comment. Link: https://lkml.kernel.org/r/20220709092527.47778-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton mm/mmap.c | 1 - 1 file changed, 1 deletion(-) commit 8f0b747d7dde47e9f6ff64d176ad5fcf0a23d524 Author: Miaohe Lin Date: Sat Jul 9 17:24:40 2022 +0800 mm/page_vma_mapped.c: use helper function huge_pte_lock Use helper function huge_pte_lock() to lock the huge pte to simplify the code a bit. No functional change intended. Link: https://lkml.kernel.org/r/20220709092440.43018-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton mm/page_vma_mapped.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 04ec006171badc73f749dc1cd9d66e05f8575a81 Author: Uros Bizjak Date: Fri Jul 8 16:07:36 2022 +0200 mm/page_alloc: use try_cmpxchg in set_pfnblock_flags_mask Use try_cmpxchg instead of cmpxchg in set_pfnblock_flags_mask. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). The main loop improves from: 1c5d: 48 89 c2 mov %rax,%rdx 1c60: 48 89 c1 mov %rax,%rcx 1c63: 48 21 fa and %rdi,%rdx 1c66: 4c 09 c2 or %r8,%rdx 1c69: f0 48 0f b1 16 lock cmpxchg %rdx,(%rsi) 1c6e: 48 39 c1 cmp %rax,%rcx 1c71: 75 ea jne 1c5d <...> to: 1c60: 48 89 ca mov %rcx,%rdx 1c63: 48 21 c2 and %rax,%rdx 1c66: 4c 09 c2 or %r8,%rdx 1c69: f0 48 0f b1 16 lock cmpxchg %rdx,(%rsi) 1c6e: 75 f0 jne 1c60 <...> Link: https://lkml.kernel.org/r/20220708140736.8737-1-ubizjak@gmail.com Signed-off-by: Uros Bizjak Cc: Andrew Morton Signed-off-by: Andrew Morton mm/page_alloc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit dcadcf1c30619ead2f3280bfb7f74de8304be2bb Author: Gang Li Date: Wed Jul 6 11:46:54 2022 +0800 mm, hugetlb: skip irrelevant nodes in show_free_areas() show_free_areas() allows to filter out node specific data which is irrelevant to the allocation request. But hugetlb_show_meminfo() still shows hugetlb on all nodes, which is redundant and unnecessary. Use show_mem_node_skip() to skip irrelevant nodes. And replace hugetlb_show_meminfo() with hugetlb_show_meminfo_node(nid). before-and-after sample output of OOM: before: ``` [ 214.362453] Node 1 active_anon:148kB inactive_anon:4050920kB active_file:112kB inactive_file:100kB [ 214.375429] Node 1 Normal free:45100kB boost:0kB min:45576kB low:56968kB high:68360kB reserved_hig [ 214.388334] lowmem_reserve[]: 0 0 0 0 0 [ 214.390251] Node 1 Normal: 423*4kB (UE) 320*8kB (UME) 187*16kB (UE) 117*32kB (UE) 57*64kB (UME) 20 [ 214.397626] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB [ 214.401518] Node 1 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB ``` after: ``` [ 145.069705] Node 1 active_anon:128kB inactive_anon:4049412kB active_file:56kB inactive_file:84kB u [ 145.110319] Node 1 Normal free:45424kB boost:0kB min:45576kB low:56968kB high:68360kB reserved_hig [ 145.152315] lowmem_reserve[]: 0 0 0 0 0 [ 145.155244] Node 1 Normal: 470*4kB (UME) 373*8kB (UME) 247*16kB (UME) 168*32kB (UE) 86*64kB (UME) [ 145.164119] Node 1 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB ``` Link: https://lkml.kernel.org/r/20220706034655.1834-1-ligang.bdlg@bytedance.com Signed-off-by: Gang Li Reviewed-by: Mike Kravetz Cc: Muchun Song Signed-off-by: Andrew Morton include/linux/hugetlb.h | 4 ++-- mm/hugetlb.c | 18 ++++++++---------- mm/page_alloc.c | 8 ++++++-- 3 files changed, 16 insertions(+), 14 deletions(-) commit a317ebccaa3609917a2c021af870cf3fa607ab0c Author: Patrick Wang Date: Tue Jul 5 19:31:58 2022 +0800 mm: percpu: use kmemleak_ignore_phys() instead of kmemleak_free() Kmemleak recently added a rbtree to store the objects allocted with physical address. Those objects can't be freed with kmemleak_free(). According to the comments, percpu allocations are tracked by kmemleak separately. Kmemleak_free() was used to avoid the unnecessary tracking. If kmemleak_free() fails, those objects would be scanned by kmemleak, which is unnecessary but shouldn't lead to other effects. Use kmemleak_ignore_phys() instead of kmemleak_free() for those objects. Link: https://lkml.kernel.org/r/20220705113158.127600-1-patrick.wang.shcn@gmail.com Fixes: 0c24e061196c ("mm: kmemleak: add rbtree and store physical address for objects allocated with PA") Signed-off-by: Patrick Wang Cc: Dennis Zhou Cc: Tejun Heo Cc: Christoph Lameter Cc: Catalin Marinas Signed-off-by: Andrew Morton mm/percpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 48725bbc0c3828bb9e36b632c6bf0326ed292ffb Author: Xiu Jianfeng Date: Mon Jul 4 19:41:12 2022 +0800 mm/mprotect: remove the redundant initialization for error The variable error will be assigned correctly before it is used, the initialization is redundant, so remove it. Link: https://lkml.kernel.org/r/20220704114112.163112-1-xiujianfeng@huawei.com Signed-off-by: Xiu Jianfeng Signed-off-by: Andrew Morton mm/mprotect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e75858b904b44510b7f4a0f8f1c08dfc0bf9009b Author: Miaohe Lin Date: Mon Jul 4 21:22:01 2022 +0800 mm/huge_memory: use helper macro IS_ERR_OR_NULL in split_huge_pages_pid Use helper macro IS_ERR_OR_NULL to check the validity of page to simplify the code. Minor readability improvement. Link: https://lkml.kernel.org/r/20220704132201.14611-17-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Muchun Song Cc: Matthew Wilcox Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/huge_memory.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit cea3332808f92c0120fb0b157c56d48639e0c713 Author: Miaohe Lin Date: Mon Jul 4 21:22:00 2022 +0800 mm/huge_memory: comment the subtly logic in __split_huge_pmd It's dangerous and wrong to call page_folio(pmd_page(*pmd)) when pmd isn't present. But the caller guarantees pmd is present when folio is set. So we should be safe here. Add comment to make it clear. Link: https://lkml.kernel.org/r/20220704132201.14611-16-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Matthew Wilcox Cc: Muchun Song Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/huge_memory.c | 4 ++++ 1 file changed, 4 insertions(+) commit d764afedfb04e4eaf04b175c5ac54ffa4a423070 Author: Miaohe Lin Date: Mon Jul 4 21:21:59 2022 +0800 mm/huge_memory: correct comment of prep_transhuge_page We use page->mapping and page->index, instead of page->indexlru in second tail page as list_head. Correct it. Link: https://lkml.kernel.org/r/20220704132201.14611-15-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Muchun Song Cc: Matthew Wilcox Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/huge_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 121c1781aeb00475d163246d9ae7d8746e377040 Author: Miaohe Lin Date: Mon Jul 4 21:21:58 2022 +0800 mm/huge_memory: fix comment of page_deferred_list The current comment is confusing because if global or memcg deferred list in the second tail page is occupied by compound_head, why we still use page[2].deferred_list here? I think it wants to say that Global or memcg deferred list in the first tail page is occupied by compound_mapcount and compound_pincount so we use the second tail page's deferred_list instead. Link: https://lkml.kernel.org/r/20220704132201.14611-14-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Muchun Song Cc: Matthew Wilcox Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton include/linux/huge_mm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a17206dac7b262e7abed5a05e34a6bd6bd0a9b06 Author: Miaohe Lin Date: Mon Jul 4 21:21:57 2022 +0800 mm/huge_memory: minor cleanup for split_huge_pages_all There is nothing to do if a zone doesn't have any pages managed by the buddy allocator. So we should check managed_zone instead. Also if a thp is found, there's no need to traverse the subpages again. Link: https://lkml.kernel.org/r/20220704132201.14611-13-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Matthew Wilcox Cc: Muchun Song Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/huge_memory.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 0b175468a02d9ae8b97919b4de62ab4da578b520 Author: Miaohe Lin Date: Mon Jul 4 21:21:56 2022 +0800 mm/huge_memory: try to free subpage in swapcache when possible Subpages in swapcache won't be freed even if it is the last user of the page until next time reclaim. It shouldn't hurt indeed, but we could try to free these pages to save more memory for system. Link: https://lkml.kernel.org/r/20220704132201.14611-12-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Matthew Wilcox Cc: Muchun Song Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/huge_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ce4fee4401206cf5a2c476ec0ee6c90191dfade Author: Miaohe Lin Date: Mon Jul 4 21:21:55 2022 +0800 mm/huge_memory: check pmd_present first in is_huge_zero_pmd When pmd is non-present, pmd_pfn returns an insane value. So we should check pmd_present first to avoid acquiring such insane value and also avoid touching possible cold huge_zero_pfn cache line when pmd isn't present. Link: https://lkml.kernel.org/r/20220704132201.14611-11-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Muchun Song Cc: Matthew Wilcox Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton include/linux/huge_mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 749290799e72f05f7311ec8e85a47664dd7be37e Author: Miaohe Lin Date: Mon Jul 4 21:21:54 2022 +0800 mm/huge_memory: fix comment in zap_huge_pud The comment about deposited pgtable is borrowed from zap_huge_pmd but there's no deposited pgtable stuff for huge pud in zap_huge_pud. Remove it to avoid confusion. Link: https://lkml.kernel.org/r/20220704132201.14611-10-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Matthew Wilcox Cc: Muchun Song Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/huge_memory.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 37139bb02c35bedb0c82bd21e7d1e695f5485465 Author: Miaohe Lin Date: Mon Jul 4 21:21:53 2022 +0800 mm/huge_memory: use helper macro __ATTR_RW Use helper macro __ATTR_RW to define use_zero_page_attr, defrag_attr and enabled_attr to make code more clear. Minor readability improvement. Link: https://lkml.kernel.org/r/20220704132201.14611-9-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Muchun Song Cc: Matthew Wilcox Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/huge_memory.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 74ba2b38ba990c563393e5cb540cad2939f49d95 Author: Miaohe Lin Date: Mon Jul 4 21:21:52 2022 +0800 mm/huge_memory: use helper function vma_lookup in split_huge_pages_pid Use helper function vma_lookup to lookup the needed vma to simplify the code. Minor readability improvement. Link: https://lkml.kernel.org/r/20220704132201.14611-8-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Muchun Song Cc: Matthew Wilcox Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/huge_memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4fba8f2a306038da617cd29503a1841b7b44ee23 Author: Miaohe Lin Date: Mon Jul 4 21:21:51 2022 +0800 mm/huge_memory: rename mmun_start to haddr in remove_migration_pmd mmun_start indicates mmu_notifier start address but there's no mmu_notifier stuff in remove_migration_pmd. This will make it hard to get the meaning of mmun_start. Rename it to haddr to avoid confusing readers and also imporve readability. Link: https://lkml.kernel.org/r/20220704132201.14611-7-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Muchun Song Cc: Matthew Wilcox Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/huge_memory.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a69e4717c62508ad5335e9bd56b1b6984a6b2b98 Author: Miaohe Lin Date: Mon Jul 4 21:21:50 2022 +0800 mm/huge_memory: use helper touch_pmd in huge_pmd_set_accessed Use helper touch_pmd to set pmd accessed to simplify the code and improve the readability. No functional change intended. Link: https://lkml.kernel.org/r/20220704132201.14611-6-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Muchun Song Cc: Matthew Wilcox Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/huge_memory.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) commit 5fe653e9000da9ce06e3696508c44b45315b9887 Author: Miaohe Lin Date: Mon Jul 4 21:21:49 2022 +0800 mm/huge_memory: use helper touch_pud in huge_pud_set_accessed Use helper touch_pud to set pud accessed to simplify the code and improve the readability. No functional change intended. Link: https://lkml.kernel.org/r/20220704132201.14611-5-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Muchun Song Cc: Matthew Wilcox Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/huge_memory.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit d965e3907540e829df27a22738536d3b9d989820 Author: Miaohe Lin Date: Mon Jul 4 21:21:48 2022 +0800 mm/huge_memory: fix comment of __pud_trans_huge_lock __pud_trans_huge_lock returns page table lock pointer if a given pud maps a thp instead of 'true' since introduced. Fix corresponding comments. Link: https://lkml.kernel.org/r/20220704132201.14611-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Acked-by: Muchun Song Cc: Matthew Wilcox Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/huge_memory.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4286f14748c13de42c1c4ab77a92fdfb37e6e5ef Author: Miaohe Lin Date: Mon Jul 4 21:21:47 2022 +0800 mm/huge_memory: access vm_page_prot with READ_ONCE in remove_migration_pmd vma->vm_page_prot is read lockless from the rmap_walk, it may be updated concurrently. Using READ_ONCE to prevent the risk of reading intermediate values. Link: https://lkml.kernel.org/r/20220704132201.14611-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Matthew Wilcox Cc: Muchun Song Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/huge_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c38f1812d5bc118e29cb898e7104387a6cc0b76 Author: Miaohe Lin Date: Mon Jul 4 21:21:46 2022 +0800 mm/huge_memory: use flush_pmd_tlb_range in move_huge_pmd Patch series "A few cleanup patches for huge_memory", v3. This series contains a few cleaup patches to remove duplicated codes, add/use helper functions, fix some obsolete comments and so on. More details can be found in the respective changelogs. This patch (of 16): Arches with special requirements for evicting THP backing TLB entries can implement flush_pmd_tlb_range. Otherwise also, it can help optimize TLB flush in THP regime. Using flush_pmd_tlb_range to take advantage of this in move_huge_pmd. Link: https://lkml.kernel.org/r/20220704132201.14611-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20220704132201.14611-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Muchun Song Reviewed-by: Zach O'Keefe Cc: Yang Shi Cc: Matthew Wilcox Signed-off-by: Andrew Morton mm/huge_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 391145380f4b432403d8bdaf53ad7109104cb0df Author: Mike Rapoport Date: Tue Jul 5 18:47:08 2022 +0300 ARM: head.S: rename PMD_ORDER to PMD_ENTRY_ORDER PMD_ORDER denotes order of magnitude for a PMD entry, i.e PMD entry size is 2 ^ PMD_ORDER. Rename PMD_ORDER to PMD_ENTRY_ORDER to allow a generic definition of PMD_ORDER as order of a PMD allocation: (PMD_SHIFT - PAGE_SHIFT). Link: https://lkml.kernel.org/r/20220705154708.181258-16-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Russell King (Oracle) Signed-off-by: Andrew Morton arch/arm/kernel/head.S | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 64c5ed22d6080f8ad07ed782087582a5f023f788 Author: Mike Rapoport Date: Sun Jul 3 17:12:03 2022 +0300 xtensa: drop definition of PGD_ORDER This is the order of the page table allocation, not the order of a PGD. Since its always hardwired to 0, simply drop it. Link: https://lkml.kernel.org/r/20220703141203.147893-15-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Helge Deller Acked-by: Max Filippov Cc: Arnd Bergmann Cc: Dinh Nguyen Cc: Guo Ren Cc: Huacai Chen Cc: James Bottomley Cc: "Matthew Wilcox (Oracle)" Cc: Thomas Bogendoerfer Cc: Xuerui Wang Signed-off-by: Andrew Morton arch/xtensa/include/asm/pgalloc.h | 2 +- arch/xtensa/include/asm/pgtable.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 4501a7a03994f3d8bcf830cc42888868e88c8191 Author: Mike Rapoport Date: Sun Jul 3 17:12:02 2022 +0300 parisc: rename PGD_ORDER to PGD_TABLE_ORDER This is the order of the page table allocation, not the order of a PGD. Link: https://lkml.kernel.org/r/20220703141203.147893-14-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Arnd Bergmann Cc: Dinh Nguyen Cc: Guo Ren Cc: Helge Deller Cc: Huacai Chen Cc: James Bottomley Cc: "Matthew Wilcox (Oracle)" Cc: Max Filippov Cc: Thomas Bogendoerfer Cc: Xuerui Wang Signed-off-by: Andrew Morton arch/parisc/include/asm/pgalloc.h | 6 +++--- arch/parisc/include/asm/pgtable.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) commit 418d5dadaf9de9d230bfd3cdcb6263fc6de1a165 Author: Mike Rapoport Date: Sun Jul 3 17:12:01 2022 +0300 loongarch: drop definition of PGD_ORDER This is the order of the page table allocation, not the order of a PGD. Since its always hardwired to 0, simply drop it. [rppt@linux.ibm.com: drop extra BLANK() line in arch/loongarch/kernel/asm-offsets.c] Link: https://lkml.kernel.org/r/20220705154708.181258-13-rppt@kernel.org Link: https://lkml.kernel.org/r/20220703141203.147893-13-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Huacai Chen Cc: Arnd Bergmann Cc: Dinh Nguyen Cc: Guo Ren Cc: Helge Deller Cc: James Bottomley Cc: "Matthew Wilcox (Oracle)" Cc: Max Filippov Cc: Thomas Bogendoerfer Cc: Xuerui Wang Signed-off-by: Andrew Morton arch/loongarch/include/asm/pgtable.h | 6 ++---- arch/loongarch/kernel/asm-offsets.c | 2 -- arch/loongarch/mm/pgtable.c | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) commit f05ecc68690fcfc8724b3a3830e9157754273e27 Author: Mike Rapoport Date: Sun Jul 3 17:12:00 2022 +0300 loongarch: drop definition of PUD_ORDER This is the order of the page table allocation, not the order of a PUD. Since its always hardwired to 0, simply drop it. Link: https://lkml.kernel.org/r/20220703141203.147893-12-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Arnd Bergmann Cc: Dinh Nguyen Cc: Guo Ren Cc: Helge Deller Cc: Huacai Chen Cc: James Bottomley Cc: "Matthew Wilcox (Oracle)" Cc: Max Filippov Cc: Thomas Bogendoerfer Cc: Xuerui Wang Signed-off-by: Andrew Morton arch/loongarch/include/asm/pgalloc.h | 2 +- arch/loongarch/include/asm/pgtable.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) commit b7c0f2d454afbeaa9e6fcf5d62be2bd7708c73b0 Author: Mike Rapoport Date: Sun Jul 3 17:11:59 2022 +0300 loongarch: drop definition of PMD_ORDER This is the order of the page table allocation, not the order of a PMD. Since its always hardwired to 0, simply drop it. Link: https://lkml.kernel.org/r/20220703141203.147893-11-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Arnd Bergmann Cc: Dinh Nguyen Cc: Guo Ren Cc: Helge Deller Cc: Huacai Chen Cc: James Bottomley Cc: "Matthew Wilcox (Oracle)" Cc: Max Filippov Cc: Thomas Bogendoerfer Cc: Xuerui Wang Signed-off-by: Andrew Morton arch/loongarch/include/asm/pgalloc.h | 4 ++-- arch/loongarch/include/asm/pgtable.h | 7 +++---- arch/loongarch/kernel/asm-offsets.c | 3 --- 3 files changed, 5 insertions(+), 9 deletions(-) commit 1721b412fc3391646e9cba35e74987516f6d0fce Author: Mike Rapoport Date: Sun Jul 3 17:11:58 2022 +0300 loongarch: drop definition of PTE_ORDER This is the order of the page table allocation, not the order of a PTE. Since its always hardwired to 0, simply drop it. Link: https://lkml.kernel.org/r/20220703141203.147893-10-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Arnd Bergmann Cc: Dinh Nguyen Cc: Guo Ren Cc: Helge Deller Cc: Huacai Chen Cc: James Bottomley Cc: "Matthew Wilcox (Oracle)" Cc: Max Filippov Cc: Thomas Bogendoerfer Cc: Xuerui Wang Signed-off-by: Andrew Morton arch/loongarch/include/asm/pgtable.h | 9 ++++----- arch/loongarch/kernel/asm-offsets.c | 1 - arch/loongarch/mm/tlbex.S | 6 +++--- 3 files changed, 7 insertions(+), 9 deletions(-) commit a6714e720b5e8438ca7f779342ad91b39094f548 Author: Mike Rapoport Date: Sun Jul 3 17:11:57 2022 +0300 nios2: drop definition of PGD_ORDER This is the order of the page table allocation, not the order of a PGD. Since its always hardwired to 0, simply drop it. Link: https://lkml.kernel.org/r/20220703141203.147893-9-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Dinh Nguyen Cc: Arnd Bergmann Cc: Guo Ren Cc: Helge Deller Cc: Huacai Chen Cc: James Bottomley Cc: "Matthew Wilcox (Oracle)" Cc: Max Filippov Cc: Thomas Bogendoerfer Cc: Xuerui Wang Signed-off-by: Andrew Morton arch/nios2/include/asm/pgtable.h | 4 +--- arch/nios2/mm/init.c | 3 +-- arch/nios2/mm/pgtable.c | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) commit bf0dc119c51ffdcfa6db0786ea877eec85985b7e Author: Mike Rapoport Date: Sun Jul 3 17:11:56 2022 +0300 nios2: drop definition of PTE_ORDER This is the order of the page table allocation, not the order of a PTE. Since its always hardwired to 0, simply drop it. Link: https://lkml.kernel.org/r/20220703141203.147893-8-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Dinh Nguyen Cc: Arnd Bergmann Cc: Guo Ren Cc: Helge Deller Cc: Huacai Chen Cc: James Bottomley Cc: "Matthew Wilcox (Oracle)" Cc: Max Filippov Cc: Thomas Bogendoerfer Cc: Xuerui Wang Signed-off-by: Andrew Morton arch/nios2/include/asm/pgtable.h | 3 +-- arch/nios2/mm/init.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit bb5af4f67a567e723ac83956167efb57687b0793 Author: Mike Rapoport Date: Sun Jul 3 17:11:55 2022 +0300 mips: rename PGD_ORDER to PGD_TABLE_ORDER This is the order of the page table allocation, not the order of a PGD. While at it remove unused defintion of _PGD_ORDER in asm-offsets. Link: https://lkml.kernel.org/r/20220703141203.147893-7-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Arnd Bergmann Cc: Dinh Nguyen Cc: Guo Ren Cc: Helge Deller Cc: Huacai Chen Cc: James Bottomley Cc: "Matthew Wilcox (Oracle)" Cc: Max Filippov Cc: Thomas Bogendoerfer Cc: Xuerui Wang Signed-off-by: Andrew Morton arch/mips/include/asm/pgalloc.h | 2 +- arch/mips/include/asm/pgtable-32.h | 6 +++--- arch/mips/include/asm/pgtable-64.h | 16 ++++++++-------- arch/mips/kernel/asm-offsets.c | 1 - arch/mips/kvm/mmu.c | 2 +- arch/mips/mm/pgtable.c | 2 +- arch/mips/mm/tlbex.c | 12 ++++++------ 7 files changed, 20 insertions(+), 21 deletions(-) commit 6963c72d9046eab0f023e1d91960550e764ad7b9 Author: Mike Rapoport Date: Sun Jul 3 17:11:54 2022 +0300 mips: drop definitions of PTE_ORDER This is the order of the page table allocation, not the order of a PTE. Since its always hardwired to 0, simply drop it. Link: https://lkml.kernel.org/r/20220703141203.147893-6-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Arnd Bergmann Cc: Dinh Nguyen Cc: Guo Ren Cc: Helge Deller Cc: Huacai Chen Cc: James Bottomley Cc: "Matthew Wilcox (Oracle)" Cc: Max Filippov Cc: Thomas Bogendoerfer Cc: Xuerui Wang Signed-off-by: Andrew Morton arch/mips/include/asm/pgtable-32.h | 9 ++++----- arch/mips/include/asm/pgtable-64.h | 15 +++++---------- arch/mips/kernel/asm-offsets.c | 1 - arch/mips/mm/tlbex.c | 2 +- 4 files changed, 10 insertions(+), 17 deletions(-) commit 8e20a4decd43ddfa98c146673c3981b2260bc176 Author: Mike Rapoport Date: Sun Jul 3 17:11:53 2022 +0300 mips: rename PUD_ORDER to PUD_TABLE_ORDER This is the order of the page table allocation, not the order of a PUD. Link: https://lkml.kernel.org/r/20220703141203.147893-5-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Arnd Bergmann Cc: Dinh Nguyen Cc: Guo Ren Cc: Helge Deller Cc: Huacai Chen Cc: James Bottomley Cc: "Matthew Wilcox (Oracle)" Cc: Max Filippov Cc: Thomas Bogendoerfer Cc: Xuerui Wang Signed-off-by: Andrew Morton arch/mips/include/asm/pgalloc.h | 2 +- arch/mips/include/asm/pgtable-32.h | 2 +- arch/mips/include/asm/pgtable-64.h | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) commit c94b14bd1cff085df21125a3591378c5081f143a Author: Matthew Wilcox (Oracle) Date: Sun Jul 3 17:11:52 2022 +0300 mips: rename PMD_ORDER to PMD_TABLE_ORDER This is the order of the page table allocation, not the order of a PMD. While at it remove unused defintion of _PMD_ORDER in asm-offsets. Link: https://lkml.kernel.org/r/20220703141203.147893-4-rppt@kernel.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Mike Rapoport Cc: Arnd Bergmann Cc: Dinh Nguyen Cc: Guo Ren Cc: Helge Deller Cc: Huacai Chen Cc: James Bottomley Cc: Max Filippov Cc: Thomas Bogendoerfer Cc: Xuerui Wang Signed-off-by: Andrew Morton arch/mips/include/asm/pgalloc.h | 4 ++-- arch/mips/include/asm/pgtable-32.h | 2 +- arch/mips/include/asm/pgtable-64.h | 18 +++++++++--------- arch/mips/kernel/asm-offsets.c | 3 --- 4 files changed, 12 insertions(+), 15 deletions(-) commit f7536442353d1b6bb0c7c8ad1ec549d9fa215106 Author: Mike Rapoport Date: Sun Jul 3 17:11:51 2022 +0300 csky: drop definition of PGD_ORDER This is the order of the page table allocation, not the order of a PGD. Since its always hardwired to 0, simply drop it. Link: https://lkml.kernel.org/r/20220703141203.147893-3-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Arnd Bergmann Cc: Dinh Nguyen Cc: Guo Ren Cc: Helge Deller Cc: Huacai Chen Cc: James Bottomley Cc: "Matthew Wilcox (Oracle)" Cc: Max Filippov Cc: Thomas Bogendoerfer Cc: Xuerui Wang Signed-off-by: Andrew Morton arch/csky/include/asm/pgalloc.h | 2 +- arch/csky/include/asm/pgtable.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit a008a3004340887370aea38b5cd441b1db110041 Author: Mike Rapoport Date: Sun Jul 3 17:11:50 2022 +0300 csky: drop definition of PTE_ORDER Patch series "arch: make PxD_ORDER generically available", v2. The question what does PxD_ORDER define raises from time to time and there is still a conflict between MIPS and DAX definitions. Some time ago Matthew Wilcox suggested to use PMD_TABLE_ORDER to define the order of page table allocation: [1] https://lore.kernel.org/linux-arch/YPCJftSTUBEnq2lI@casper.infradead.org/ The parisc patch made it in, but mips didn't. Now mips defines from asm/include/pgtable.h were copied to loongarch which made it worse. Let's deal with it once and for all and rename PxD_ORDER defines to PxD_TABLE_ORDER or just drop them when the only possible order of page table is 0. This patch (of 15): This is the order of the page table allocation, not the order of a PTE. Since its always hardwired to 0, simply drop it. Link: https://lkml.kernel.org/r/20220705154708.181258-1-rppt@kernel.org Link: https://lkml.kernel.org/r/20220703141203.147893-1-rppt@kernel.org Link: https://lkml.kernel.org/r/20220703141203.147893-2-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Arnd Bergmann Cc: Dinh Nguyen Cc: Guo Ren Cc: Helge Deller Cc: Huacai Chen Cc: James Bottomley Cc: Matthew Wilcox Cc: Max Filippov Cc: Thomas Bogendoerfer Cc: Xuerui Wang Signed-off-by: Andrew Morton arch/csky/include/asm/pgtable.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3d923c5f1e21ad491acd4c0d62bf2481ce94016c Author: Anshuman Khandual Date: Mon Jul 11 12:36:00 2022 +0530 mm/mmap: drop ARCH_HAS_VM_GET_PAGE_PROT Now all the platforms enable ARCH_HAS_GET_PAGE_PROT. They define and export own vm_get_page_prot() whether custom or standard DECLARE_VM_GET_PAGE_PROT. Hence there is no need for default generic fallback for vm_get_page_prot(). Just drop this fallback and also ARCH_HAS_GET_PAGE_PROT mechanism. Link: https://lkml.kernel.org/r/20220711070600.2378316-27-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Reviewed-by: Geert Uytterhoeven Reviewed-by: Christoph Hellwig Reviewed-by: Christophe Leroy Acked-by: Geert Uytterhoeven Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/alpha/Kconfig | 1 - arch/arc/Kconfig | 1 - arch/arm/Kconfig | 1 - arch/arm64/Kconfig | 1 - arch/csky/Kconfig | 1 - arch/hexagon/Kconfig | 1 - arch/ia64/Kconfig | 1 - arch/loongarch/Kconfig | 1 - arch/m68k/Kconfig | 1 - arch/microblaze/Kconfig | 1 - arch/mips/Kconfig | 1 - arch/nios2/Kconfig | 1 - arch/openrisc/Kconfig | 1 - arch/parisc/Kconfig | 1 - arch/powerpc/Kconfig | 1 - arch/riscv/Kconfig | 1 - arch/s390/Kconfig | 1 - arch/sh/Kconfig | 1 - arch/sparc/Kconfig | 1 - arch/um/Kconfig | 1 - arch/x86/Kconfig | 1 - arch/xtensa/Kconfig | 1 - include/linux/mm.h | 3 --- mm/Kconfig | 3 --- mm/mmap.c | 22 ---------------------- 25 files changed, 50 deletions(-) commit 34516fd83fa122e54a261b74e419c16aad5317f0 Author: Anshuman Khandual Date: Mon Jul 11 12:35:59 2022 +0530 sh/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-26-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Cc: Yoshinori Sato Cc: Rich Felker Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Signed-off-by: Andrew Morton arch/sh/Kconfig | 1 + arch/sh/include/asm/pgtable.h | 17 ----------------- arch/sh/mm/mmap.c | 20 ++++++++++++++++++++ 3 files changed, 21 insertions(+), 17 deletions(-) commit 91a8da021c4d767704086386b08bf276f926ebfd Author: Anshuman Khandual Date: Mon Jul 11 12:35:58 2022 +0530 um/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-25-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Cc: Jeff Dike Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/um/Kconfig | 1 + arch/um/include/asm/pgtable.h | 17 ----------------- arch/um/kernel/mem.c | 20 ++++++++++++++++++++ arch/x86/um/mem_32.c | 2 +- 4 files changed, 22 insertions(+), 18 deletions(-) commit ca26f936f51b8c9219ede32b1a1f76c4924897aa Author: Anshuman Khandual Date: Mon Jul 11 12:35:57 2022 +0530 arm/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-24-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Cc: Russell King Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/arm/Kconfig | 1 + arch/arm/include/asm/pgtable.h | 17 ----------------- arch/arm/lib/uaccess_with_memcpy.c | 2 +- arch/arm/mm/mmu.c | 20 ++++++++++++++++++++ 4 files changed, 22 insertions(+), 18 deletions(-) commit 5d260625b1f2affc00c596a2c8d6314865060b11 Author: Anshuman Khandual Date: Mon Jul 11 12:35:56 2022 +0530 arc/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-23-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Cc: Vineet Gupta Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/arc/Kconfig | 1 + arch/arc/include/asm/pgtable-bits-arcv2.h | 18 ------------------ arch/arc/mm/mmap.c | 20 ++++++++++++++++++++ 3 files changed, 21 insertions(+), 18 deletions(-) commit 6d0b92254510cd7e12358028e85f99f0453006fa Author: Anshuman Khandual Date: Mon Jul 11 12:35:55 2022 +0530 m68k/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-22-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/m68k/Kconfig | 1 + arch/m68k/include/asm/mcf_pgtable.h | 59 -------------------------------- arch/m68k/include/asm/motorola_pgtable.h | 29 ---------------- arch/m68k/include/asm/sun3_pgtable.h | 23 ------------- arch/m68k/mm/mcfmmu.c | 55 +++++++++++++++++++++++++++++ arch/m68k/mm/motorola.c | 29 ++++++++++++++++ arch/m68k/mm/sun3mmu.c | 20 +++++++++++ 7 files changed, 105 insertions(+), 111 deletions(-) commit 499c1dd92ea1087b98924ebe88cbf48ac0198775 Author: Anshuman Khandual Date: Mon Jul 11 12:35:54 2022 +0530 mips/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-21-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/mips/Kconfig | 1 + arch/mips/include/asm/pgtable.h | 22 ---------------------- arch/mips/mm/cache.c | 3 +++ 3 files changed, 4 insertions(+), 22 deletions(-) commit c619b82c55b730191e19f13e119603c702e11f0f Author: Anshuman Khandual Date: Mon Jul 11 12:35:53 2022 +0530 ia64/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-20-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/ia64/Kconfig | 1 + arch/ia64/include/asm/pgtable.h | 18 ------------------ arch/ia64/mm/init.c | 28 +++++++++++++++++++++++++++- 3 files changed, 28 insertions(+), 19 deletions(-) commit fd5d210fa66beeae6ee296eb06d55c1c6faea912 Author: Anshuman Khandual Date: Mon Jul 11 12:35:52 2022 +0530 s390/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-19-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/s390/Kconfig | 1 + arch/s390/include/asm/pgtable.h | 17 ----------------- arch/s390/mm/mmap.c | 20 ++++++++++++++++++++ 3 files changed, 21 insertions(+), 17 deletions(-) commit 0d70836013f2da08fa190e99a1d50ebf28a09ef5 Author: Anshuman Khandual Date: Mon Jul 11 12:35:51 2022 +0530 csky/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-18-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Guo Ren Cc: Geert Uytterhoeven Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/csky/Kconfig | 1 + arch/csky/include/asm/pgtable.h | 18 ------------------ arch/csky/mm/init.c | 20 ++++++++++++++++++++ 3 files changed, 21 insertions(+), 18 deletions(-) commit 4147b5e2d5691078c9f8eaa3644ef11f5351a9db Author: Anshuman Khandual Date: Mon Jul 11 12:35:50 2022 +0530 riscv/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-17-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Paul Mackerras Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/riscv/Kconfig | 1 + arch/riscv/include/asm/pgtable.h | 20 -------------------- arch/riscv/mm/init.c | 20 ++++++++++++++++++++ 3 files changed, 21 insertions(+), 20 deletions(-) commit 53e2fdee5f0efdf5bd099a29bfaae0b0ec90e70e Author: Anshuman Khandual Date: Mon Jul 11 12:35:49 2022 +0530 nios2/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-16-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Dinh Nguyen Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/nios2/Kconfig | 1 + arch/nios2/include/asm/pgtable.h | 16 ---------------- arch/nios2/mm/init.c | 20 ++++++++++++++++++++ 3 files changed, 21 insertions(+), 16 deletions(-) commit 4975f604feb63c7b6b6ec56cb6013026d6aaa9f8 Author: Anshuman Khandual Date: Mon Jul 11 12:35:48 2022 +0530 alpha/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-15-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Cc: Richard Henderson Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/alpha/Kconfig | 1 + arch/alpha/include/asm/pgtable.h | 17 ----------------- arch/alpha/mm/init.c | 22 ++++++++++++++++++++++ 3 files changed, 23 insertions(+), 17 deletions(-) commit 252358f1a118d8e9b0dd4f2f67bb3cd2b742e854 Author: Anshuman Khandual Date: Mon Jul 11 12:35:47 2022 +0530 parisc/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-14-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Cc: "James E.J. Bottomley" Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/parisc/Kconfig | 1 + arch/parisc/include/asm/pgtable.h | 18 ------------------ arch/parisc/mm/init.c | 20 ++++++++++++++++++++ 3 files changed, 21 insertions(+), 18 deletions(-) commit b2022dcf45540b1f08ce2ef761d9e9110d22e929 Author: Anshuman Khandual Date: Mon Jul 11 12:35:46 2022 +0530 hexagon/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-13-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Brian Cain Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/hexagon/Kconfig | 1 + arch/hexagon/include/asm/pgtable.h | 27 ------------------------ arch/hexagon/mm/init.c | 42 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 27 deletions(-) commit 2de9eae10d11906a989d0e9241854dc8d2729d9e Author: Anshuman Khandual Date: Mon Jul 11 12:35:45 2022 +0530 xtensa/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-12-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Cc: Chris Zankel Cc: Guo Ren Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/xtensa/Kconfig | 1 + arch/xtensa/include/asm/pgtable.h | 18 ------------------ arch/xtensa/mm/init.c | 22 ++++++++++++++++++++++ 3 files changed, 23 insertions(+), 18 deletions(-) commit e4e4b99b80aae3aeb6827cf0b7e3ca31b1cd892e Author: Anshuman Khandual Date: Mon Jul 11 12:35:44 2022 +0530 openrisc/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-11-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Stafford Horne Cc: Jonas Bonn Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/openrisc/Kconfig | 1 + arch/openrisc/include/asm/pgtable.h | 18 ------------------ arch/openrisc/mm/init.c | 20 ++++++++++++++++++++ 3 files changed, 21 insertions(+), 18 deletions(-) commit f6d1e19c20a44cd4d2bb5451cb472648707d9b97 Author: Anshuman Khandual Date: Mon Jul 11 12:35:43 2022 +0530 loongarch/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-10-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Cc: Huacai Chen Cc: WANG Xuerui Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/loongarch/Kconfig | 1 + arch/loongarch/include/asm/pgtable-bits.h | 19 ------------- arch/loongarch/mm/cache.c | 46 +++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 19 deletions(-) commit fa3f9f4a912c22aadf0510bf7f4bd113da442a10 Author: Anshuman Khandual Date: Mon Jul 11 12:35:42 2022 +0530 microblaze/mm: enable ARCH_HAS_VM_GET_PAGE_PROT This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Link: https://lkml.kernel.org/r/20220711070600.2378316-9-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Cc: Michal Simek Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/microblaze/Kconfig | 1 + arch/microblaze/include/asm/pgtable.h | 17 ----------------- arch/microblaze/mm/init.c | 20 ++++++++++++++++++++ 3 files changed, 21 insertions(+), 17 deletions(-) commit 09095f74130dfb2110ef2bcdd9ad0d42addaa1d5 Author: Anshuman Khandual Date: Mon Jul 11 12:35:41 2022 +0530 mm/mmap: build protect protection_map[] with ARCH_HAS_VM_GET_PAGE_PROT Now that protection_map[] has been moved inside those platforms that enable ARCH_HAS_VM_GET_PAGE_PROT. Hence generic protection_map[] array now can be protected with CONFIG_ARCH_HAS_VM_GET_PAGE_PROT intead of __P000. Link: https://lkml.kernel.org/r/20220711070600.2378316-8-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Reviewed-by: Christophe Leroy Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton include/linux/mm.h | 2 +- mm/mmap.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) commit 4867fbbdd6b362400d154417e08ce76b14200ba1 Author: Anshuman Khandual Date: Mon Jul 11 12:35:40 2022 +0530 x86/mm: move protection_map[] inside the platform This moves protection_map[] inside the platform and makes it a static. This also defines a helper function add_encrypt_protection_map() that can update the protection_map[] array with pgprot_encrypted(). Link: https://lkml.kernel.org/r/20220711070600.2378316-7-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Reviewed-by: Christoph Hellwig Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/x86/include/asm/mem_encrypt.h | 2 ++ arch/x86/include/asm/pgtable_types.h | 19 ------------------- arch/x86/mm/mem_encrypt_amd.c | 6 ++---- arch/x86/mm/pgprot.c | 28 ++++++++++++++++++++++++++++ 4 files changed, 32 insertions(+), 23 deletions(-) commit 42251045cc741adae5ffc645c8b9ee906c14d013 Author: Anshuman Khandual Date: Mon Jul 11 12:35:39 2022 +0530 arm64/mm: move protection_map[] inside the platform This moves protection_map[] inside the platform and makes it a static. Link: https://lkml.kernel.org/r/20220711070600.2378316-6-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Reviewed-by: Catalin Marinas Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Brian Cain Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/arm64/include/asm/pgtable-prot.h | 18 ------------------ arch/arm64/mm/mmap.c | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 18 deletions(-) commit 25740d31ee5b6e99ab674eaa3ecbbe3f8a6d3b8c Author: Anshuman Khandual Date: Mon Jul 11 12:35:38 2022 +0530 sparc/mm: move protection_map[] inside the platform This moves protection_map[] inside the platform and while here, also enable ARCH_HAS_VM_GET_PAGE_PROT on 32 bit platforms via DECLARE_VM_GET_PAGE_PROT. Link: https://lkml.kernel.org/r/20220711070600.2378316-5-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Reviewed-by: Sam Ravnborg Cc: "David S. Miller" Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/sparc/Kconfig | 2 +- arch/sparc/include/asm/pgtable_32.h | 19 ------------------- arch/sparc/include/asm/pgtable_64.h | 19 ------------------- arch/sparc/mm/init_32.c | 20 ++++++++++++++++++++ arch/sparc/mm/init_64.c | 3 +++ 5 files changed, 24 insertions(+), 39 deletions(-) commit 6eac1eaf2105dd8a2daf3b47634c24fc956bc77a Author: Anshuman Khandual Date: Mon Jul 11 12:35:37 2022 +0530 powerpc/mm: move protection_map[] inside the platform This moves protection_map[] inside the platform and while here, also enable ARCH_HAS_VM_GET_PAGE_PROT on 32 bit and nohash 64 (aka book3e/64) platforms via DECLARE_VM_GET_PAGE_PROT. Link: https://lkml.kernel.org/r/20220711070600.2378316-4-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Reviewed-by: Christophe Leroy Cc: Michael Ellerman Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/powerpc/Kconfig | 2 +- arch/powerpc/include/asm/pgtable.h | 20 +------------------- arch/powerpc/mm/pgtable.c | 24 ++++++++++++++++++++++++ 3 files changed, 26 insertions(+), 20 deletions(-) commit 43957b5d11037a651d162f65c682ec3c76777fc8 Author: Anshuman Khandual Date: Mon Jul 11 12:35:36 2022 +0530 mm/mmap: define DECLARE_VM_GET_PAGE_PROT This just converts the generic vm_get_page_prot() implementation into a new macro i.e DECLARE_VM_GET_PAGE_PROT which later can be used across platforms when enabling them with ARCH_HAS_VM_GET_PAGE_PROT. This does not create any functional change. Link: https://lkml.kernel.org/r/20220711070600.2378316-3-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Reviewed-by: Christophe Leroy Suggested-by: Christoph Hellwig Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton include/linux/pgtable.h | 28 ++++++++++++++++++++++++++++ mm/mmap.c | 26 +------------------------- 2 files changed, 29 insertions(+), 25 deletions(-) commit 840532711d7299d7e937952482ec899d4622c452 Author: Anshuman Khandual Date: Mon Jul 11 12:35:35 2022 +0530 mm/mmap: build protect protection_map[] with __P000 Patch series "mm/mmap: Drop __SXXX/__PXXX macros from across platforms", v7. __SXXX/__PXXX macros are unnecessary abstraction layer in creating the generic protection_map[] array which is used for vm_get_page_prot(). This abstraction layer can be avoided, if the platforms just define the array protection_map[] for all possible vm_flags access permission combinations and also export vm_get_page_prot() implementation. This series drops __SXXX/__PXXX macros from across platforms in the tree. First it build protects generic protection_map[] array with '#ifdef __P000' and moves it inside platforms which enable ARCH_HAS_VM_GET_PAGE_PROT. Later this build protects same array with '#ifdef ARCH_HAS_VM_GET_PAGE_PROT' and moves inside remaining platforms while enabling ARCH_HAS_VM_GET_PAGE_PROT. This adds a new macro DECLARE_VM_GET_PAGE_PROT defining the current generic vm_get_page_prot(), in order for it to be reused on platforms that do not require custom implementation. Finally, ARCH_HAS_VM_GET_PAGE_PROT can just be dropped, as all platforms now define and export vm_get_page_prot(), via looking up a private and static protection_map[] array. protection_map[] data type has been changed as 'static const' on all platforms that do not change it during boot. This patch (of 26): Build protect generic protection_map[] array with __P000, so that it can be moved inside all the platforms one after the other. Otherwise there will be build failures during this process. CONFIG_ARCH_HAS_VM_GET_PAGE_PROT cannot be used for this purpose as only certain platforms enable this config now. Link: https://lkml.kernel.org/r/20220711070600.2378316-1-anshuman.khandual@arm.com Link: https://lkml.kernel.org/r/20220711070600.2378316-2-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Reviewed-by: Christoph Hellwig Reviewed-by: Christophe Leroy Suggested-by: Christophe Leroy Cc: Arnd Bergmann Cc: Brian Cain Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Chris Zankel Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Huacai Chen Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: Jonas Bonn Cc: Michael Ellerman Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sam Ravnborg Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton include/linux/mm.h | 2 ++ mm/mmap.c | 2 ++ 2 files changed, 4 insertions(+) commit 9330723c26ca22c95065d2e41741cfeef00e4fd7 Author: Linus Walleij Date: Thu Jun 30 10:41:24 2022 +0200 mm: nommu: pass a pointer to virt_to_page() Functions that work on a pointer to virtual memory such as virt_to_pfn() and users of that function such as virt_to_page() are supposed to pass a pointer to virtual memory, ideally a (void *) or other pointer. However since many architectures implement virt_to_pfn() as a macro, this function becomes polymorphic and accepts both a (unsigned long) and a (void *). If we instead implement a proper virt_to_pfn(void *addr) function the following happens (occurred on arch/arm): mm/nommu.c: In function 'free_page_series': mm/nommu.c:501:50: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion] struct page *page = virt_to_page(from); Fix this with an explicit cast. Link: https://lkml.kernel.org/r/20220630084124.691207-6-linus.walleij@linaro.org Signed-off-by: Linus Walleij Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Jason Gunthorpe Cc: Marco Elver Signed-off-by: Andrew Morton mm/nommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 396a400bc1d3c3e8e4ab836f834d2da7c070d395 Author: Linus Walleij Date: Thu Jun 30 10:41:23 2022 +0200 mm: gup: pass a pointer to virt_to_page() Functions that work on a pointer to virtual memory such as virt_to_pfn() and users of that function such as virt_to_page() are supposed to pass a pointer to virtual memory, ideally a (void *) or other pointer. However since many architectures implement virt_to_pfn() as a macro, this function becomes polymorphic and accepts both a (unsigned long) and a (void *). If we instead implement a proper virt_to_pfn(void *addr) function the following happens (occurred on arch/arm): mm/gup.c: In function '__get_user_pages_locked': mm/gup.c:1599:49: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion] pages[i] = virt_to_page(start); Fix this with an explicit cast. Link: https://lkml.kernel.org/r/20220630084124.691207-5-linus.walleij@linaro.org Signed-off-by: Linus Walleij Reviewed-by: Jason Gunthorpe Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton mm/gup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e7ee421ac1f8d7fe350d2dee87e31919e9cba84 Author: Linus Walleij Date: Thu Jun 30 10:41:22 2022 +0200 mm: kfence: pass a pointer to virt_to_page() Functions that work on a pointer to virtual memory such as virt_to_pfn() and users of that function such as virt_to_page() are supposed to pass a pointer to virtual memory, ideally a (void *) or other pointer. However since many architectures implement virt_to_pfn() as a macro, this function becomes polymorphic and accepts both a (unsigned long) and a (void *). If we instead implement a proper virt_to_pfn(void *addr) function the following happens (occurred on arch/arm): mm/kfence/core.c:558:30: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion] In one case we can refer to __kfence_pool directly (and that is a proper (char *) pointer) and in the other call site we use an explicit cast. Link: https://lkml.kernel.org/r/20220630084124.691207-4-linus.walleij@linaro.org Signed-off-by: Linus Walleij Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Jason Gunthorpe Signed-off-by: Andrew Morton mm/kfence/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 259ecb34e2cd73811e250fc9c8d1f07df7bb2d14 Author: Linus Walleij Date: Thu Jun 30 10:41:21 2022 +0200 mm/highmem: pass a pointer to virt_to_page() Functions that work on a pointer to virtual memory such as virt_to_pfn() and users of that function such as virt_to_page() are supposed to pass a pointer to virtual memory, ideally a (void *) or other pointer. However since many architectures implement virt_to_pfn() as a macro, this function becomes polymorphic and accepts both a (unsigned long) and a (void *). If we instead implement a proper virt_to_pfn(void *addr) function the following happens (occurred on arch/arm): mm/highmem.c:153:29: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion] We already have a proper void * pointer in the scope of this function named "vaddr" so pass that instead. Link: https://lkml.kernel.org/r/20220630084124.691207-3-linus.walleij@linaro.org Signed-off-by: Linus Walleij Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Jason Gunthorpe Cc: Marco Elver Signed-off-by: Andrew Morton mm/highmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3c56f8f2064ae1b73e099d23a82ae1642e435a1 Author: Linus Walleij Date: Thu Jun 30 10:41:20 2022 +0200 lib/test_free_pages.c: pass a pointer to virt_to_page() In a recent change to the Arm architecture with the end goal of removing highmem we need to convert virt_to_phys() and virt_to_pfn() to static inline functions. This will make them strongly typed. However since virt_to_* is always implemented as macros they have become polymorphic and accept both (void *) and e.g. unsigned long as arguments. Other functions such as virt_to_page() simply wrap virt_to_pfn() and get affected indirectly. To be able to proceed, patch mm to use (void *) as argument to affected functions in all instances. This patch (of 5): A pointer into virtual memory is represented by a (void *) not an u32, so the compiler warns: lib/test_free_pages.c:20:50: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion] Fix this with an explicit cast. Link: https://lkml.kernel.org/r/20220630084124.691207-1-linus.walleij@linaro.org Link: https://lkml.kernel.org/r/20220630084124.691207-2-linus.walleij@linaro.org Signed-off-by: Linus Walleij Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Jason Gunthorpe Cc: Marco Elver Signed-off-by: Andrew Morton lib/test_free_pages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c94bef9c91288cc51e861a7acaa52ebb48c0121 Author: Xiang Yang Date: Sat Jun 25 14:18:44 2022 +0800 mm/memcontrol.c: replace cgroup_memory_nokmem with mem_cgroup_kmem_disabled() mem_cgroup_kmem_disabled() checks whether the kmem accounting is off. Therefore, replace cgroup_memory_nokmem with mem_cgroup_kmem_disabled(), which is the same work in percpu.c and slab_common.c. Link: https://lkml.kernel.org/r/20220625061844.226764-1-xiangyang3@huawei.com Signed-off-by: Xiang Yang Reviewed-by: Muchun Song Acked-by: Roman Gushchin Acked-by: Souptick Joarder (HPE) Cc: Johannes Weiner Cc: Michal Hocko Cc: Shakeel Butt Signed-off-by: Andrew Morton mm/memcontrol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 01b44456a7aa7c3b24fa9db7d1714b208b8ef3d8 Author: Mel Gorman Date: Fri Jun 24 13:54:23 2022 +0100 mm/page_alloc: replace local_lock with normal spinlock struct per_cpu_pages is no longer strictly local as PCP lists can be drained remotely using a lock for protection. While the use of local_lock works, it goes against the intent of local_lock which is for "pure CPU local concurrency control mechanisms and not suited for inter-CPU concurrency control" (Documentation/locking/locktypes.rst) local_lock protects against migration between when the percpu pointer is accessed and the pcp->lock acquired. The lock acquisition is a preemption point so in the worst case, a task could migrate to another NUMA node and accidentally allocate remote memory. The main requirement is to pin the task to a CPU that is suitable for PREEMPT_RT and !PREEMPT_RT. Replace local_lock with helpers that pin a task to a CPU, lookup the per-cpu structure and acquire the embedded lock. It's similar to local_lock without breaking the intent behind the API. It is not a complete API as only the parts needed for PCP-alloc are implemented but in theory, the generic helpers could be promoted to a general API if there was demand for an embedded lock within a per-cpu struct with a guarantee that the per-cpu structure locked matches the running CPU and cannot use get_cpu_var due to RT concerns. PCP requires these semantics to avoid accidentally allocating remote memory. [mgorman@techsingularity.net: use pcp_spin_trylock_irqsave instead of pcpu_spin_trylock_irqsave] Link: https://lkml.kernel.org/r/20220627084645.GA27531@techsingularity.net Link: https://lkml.kernel.org/r/20220624125423.6126-8-mgorman@techsingularity.net Signed-off-by: Mel Gorman Tested-by: Yu Zhao Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Acked-by: Vlastimil Babka Tested-by: Yu Zhao Cc: Hugh Dickins Cc: Marcelo Tosatti Cc: Marek Szyprowski Cc: Michal Hocko Cc: Minchan Kim Signed-off-by: Andrew Morton mm/page_alloc.c | 140 ++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 95 insertions(+), 45 deletions(-) commit 443c2accd1b6679a1320167f8f56eed6536b806e Author: Nicolas Saenz Julienne Date: Fri Jun 24 13:54:22 2022 +0100 mm/page_alloc: remotely drain per-cpu lists Some setups, notably NOHZ_FULL CPUs, are too busy to handle the per-cpu drain work queued by __drain_all_pages(). So introduce a new mechanism to remotely drain the per-cpu lists. It is made possible by remotely locking 'struct per_cpu_pages' new per-cpu spinlocks. A benefit of this new scheme is that drain operations are now migration safe. There was no observed performance degradation vs. the previous scheme. Both netperf and hackbench were run in parallel to triggering the __drain_all_pages(NULL, true) code path around ~100 times per second. The new scheme performs a bit better (~5%), although the important point here is there are no performance regressions vs. the previous mechanism. Per-cpu lists draining happens only in slow paths. Minchan Kim tested an earlier version and reported; My workload is not NOHZ CPUs but run apps under heavy memory pressure so they goes to direct reclaim and be stuck on drain_all_pages until work on workqueue run. unit: nanosecond max(dur) avg(dur) count(dur) 166713013 487511.77786438033 1283 From traces, system encountered the drain_all_pages 1283 times and worst case was 166ms and avg was 487us. The other problem was alloc_contig_range in CMA. The PCP draining takes several hundred millisecond sometimes though there is no memory pressure or a few of pages to be migrated out but CPU were fully booked. Your patch perfectly removed those wasted time. Link: https://lkml.kernel.org/r/20220624125423.6126-7-mgorman@techsingularity.net Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Mel Gorman Tested-by: Yu Zhao Acked-by: Vlastimil Babka Cc: Hugh Dickins Cc: Marcelo Tosatti Cc: Marek Szyprowski Cc: Michal Hocko Cc: Minchan Kim Signed-off-by: Andrew Morton mm/page_alloc.c | 58 ++++----------------------------------------------------- 1 file changed, 4 insertions(+), 54 deletions(-) commit 4b23a68f953628eb4e4b7fe1294ebf93d4b8ceee Author: Mel Gorman Date: Fri Jun 24 13:54:21 2022 +0100 mm/page_alloc: protect PCP lists with a spinlock Currently the PCP lists are protected by using local_lock_irqsave to prevent migration and IRQ reentrancy but this is inconvenient. Remote draining of the lists is impossible and a workqueue is required and every task allocation/free must disable then enable interrupts which is expensive. As preparation for dealing with both of those problems, protect the lists with a spinlock. The IRQ-unsafe version of the lock is used because IRQs are already disabled by local_lock_irqsave. spin_trylock is used in combination with local_lock_irqsave() but later will be replaced with a spin_trylock_irqsave when the local_lock is removed. The per_cpu_pages still fits within the same number of cache lines after this patch relative to before the series. struct per_cpu_pages { spinlock_t lock; /* 0 4 */ int count; /* 4 4 */ int high; /* 8 4 */ int batch; /* 12 4 */ short int free_factor; /* 16 2 */ short int expire; /* 18 2 */ /* XXX 4 bytes hole, try to pack */ struct list_head lists[13]; /* 24 208 */ /* size: 256, cachelines: 4, members: 7 */ /* sum members: 228, holes: 1, sum holes: 4 */ /* padding: 24 */ } __attribute__((__aligned__(64))); There is overhead in the fast path due to acquiring the spinlock even though the spinlock is per-cpu and uncontended in the common case. Page Fault Test (PFT) running on a 1-socket reported the following results on a 1 socket machine. 5.19.0-rc3 5.19.0-rc3 vanilla mm-pcpspinirq-v5r16 Hmean faults/sec-1 869275.7381 ( 0.00%) 874597.5167 * 0.61%* Hmean faults/sec-3 2370266.6681 ( 0.00%) 2379802.0362 * 0.40%* Hmean faults/sec-5 2701099.7019 ( 0.00%) 2664889.7003 * -1.34%* Hmean faults/sec-7 3517170.9157 ( 0.00%) 3491122.8242 * -0.74%* Hmean faults/sec-8 3965729.6187 ( 0.00%) 3939727.0243 * -0.66%* There is a small hit in the number of faults per second but given that the results are more stable, it's borderline noise. [akpm@linux-foundation.org: add missing local_unlock_irqrestore() on contention path] Link: https://lkml.kernel.org/r/20220624125423.6126-6-mgorman@techsingularity.net Signed-off-by: Mel Gorman Tested-by: Yu Zhao Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Acked-by: Vlastimil Babka Cc: Hugh Dickins Cc: Marcelo Tosatti Cc: Marek Szyprowski Cc: Michal Hocko Cc: Minchan Kim Signed-off-by: Andrew Morton include/linux/mmzone.h | 1 + mm/page_alloc.c | 119 ++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 99 insertions(+), 21 deletions(-) commit e2a66c21b774a4e8d0079089fafdc30a31414d40 Author: Mel Gorman Date: Fri Jun 24 13:54:20 2022 +0100 mm/page_alloc: remove mistaken page == NULL check in rmqueue If a page allocation fails, the ZONE_BOOSTER_WATERMARK should be tested, cleared and kswapd woken whether the allocation attempt was via the PCP or directly via the buddy list. Remove the page == NULL so the ZONE_BOOSTED_WATERMARK bit is checked unconditionally. As it is unlikely that ZONE_BOOSTED_WATERMARK is set, mark the branch accordingly. Link: https://lkml.kernel.org/r/20220624125423.6126-5-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Tested-by: Yu Zhao Cc: Hugh Dickins Cc: Marcelo Tosatti Cc: Marek Szyprowski Cc: Michal Hocko Cc: Minchan Kim Cc: Nicolas Saenz Julienne Signed-off-by: Andrew Morton mm/page_alloc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 589d9973c1d2c3344a94a57441071340b0c71097 Author: Mel Gorman Date: Fri Jun 24 13:54:19 2022 +0100 mm/page_alloc: split out buddy removal code from rmqueue into separate helper This is a preparation page to allow the buddy removal code to be reused in a later patch. No functional change. Link: https://lkml.kernel.org/r/20220624125423.6126-4-mgorman@techsingularity.net Signed-off-by: Mel Gorman Tested-by: Minchan Kim Acked-by: Minchan Kim Reviewed-by: Nicolas Saenz Julienne Acked-by: Vlastimil Babka Tested-by: Yu Zhao Cc: Hugh Dickins Cc: Marcelo Tosatti Cc: Marek Szyprowski Cc: Michal Hocko Signed-off-by: Andrew Morton mm/page_alloc.c | 81 +++++++++++++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 34 deletions(-) commit 5d0a661d808fc8ddc26940b1a12b82ae356f3ae2 Author: Mel Gorman Date: Fri Jun 24 13:54:18 2022 +0100 mm/page_alloc: use only one PCP list for THP-sized allocations The per_cpu_pages is cache-aligned on a standard x86-64 distribution configuration but a later patch will add a new field which would push the structure into the next cache line. Use only one list to store THP-sized pages on the per-cpu list. This assumes that the vast majority of THP-sized allocations are GFP_MOVABLE but even if it was another type, it would not contribute to serious fragmentation that potentially causes a later THP allocation failure. Align per_cpu_pages on the cacheline boundary to ensure there is no false cache sharing. After this patch, the structure sizing is; struct per_cpu_pages { int count; /* 0 4 */ int high; /* 4 4 */ int batch; /* 8 4 */ short int free_factor; /* 12 2 */ short int expire; /* 14 2 */ struct list_head lists[13]; /* 16 208 */ /* size: 256, cachelines: 4, members: 6 */ /* padding: 32 */ } __attribute__((__aligned__(64))); Link: https://lkml.kernel.org/r/20220624125423.6126-3-mgorman@techsingularity.net Signed-off-by: Mel Gorman Tested-by: Minchan Kim Acked-by: Minchan Kim Acked-by: Vlastimil Babka Tested-by: Yu Zhao Cc: Hugh Dickins Cc: Marcelo Tosatti Cc: Marek Szyprowski Cc: Michal Hocko Cc: Nicolas Saenz Julienne Signed-off-by: Andrew Morton include/linux/mmzone.h | 11 +++++++---- mm/page_alloc.c | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) commit bf75f200569dd05ac2112797f44548beb6b4be26 Author: Mel Gorman Date: Fri Jun 24 13:54:17 2022 +0100 mm/page_alloc: add page->buddy_list and page->pcp_list Patch series "Drain remote per-cpu directly", v5. Some setups, notably NOHZ_FULL CPUs, may be running realtime or latency-sensitive applications that cannot tolerate interference due to per-cpu drain work queued by __drain_all_pages(). Introduce a new mechanism to remotely drain the per-cpu lists. It is made possible by remotely locking 'struct per_cpu_pages' new per-cpu spinlocks. This has two advantages, the time to drain is more predictable and other unrelated tasks are not interrupted. This series has the same intent as Nicolas' series "mm/page_alloc: Remote per-cpu lists drain support" -- avoid interference of a high priority task due to a workqueue item draining per-cpu page lists. While many workloads can tolerate a brief interruption, it may cause a real-time task running on a NOHZ_FULL CPU to miss a deadline and at minimum, the draining is non-deterministic. Currently an IRQ-safe local_lock protects the page allocator per-cpu lists. The local_lock on its own prevents migration and the IRQ disabling protects from corruption due to an interrupt arriving while a page allocation is in progress. This series adjusts the locking. A spinlock is added to struct per_cpu_pages to protect the list contents while local_lock_irq is ultimately replaced by just the spinlock in the final patch. This allows a remote CPU to safely. Follow-on work should allow the spin_lock_irqsave to be converted to spin_lock to avoid IRQs being disabled/enabled in most cases. The follow-on patch will be one kernel release later as it is relatively high risk and it'll make bisections more clear if there are any problems. Patch 1 is a cosmetic patch to clarify when page->lru is storing buddy pages and when it is storing per-cpu pages. Patch 2 shrinks per_cpu_pages to make room for a spin lock. Strictly speaking this is not necessary but it avoids per_cpu_pages consuming another cache line. Patch 3 is a preparation patch to avoid code duplication. Patch 4 is a minor correction. Patch 5 uses a spin_lock to protect the per_cpu_pages contents while still relying on local_lock to prevent migration, stabilise the pcp lookup and prevent IRQ reentrancy. Patch 6 remote drains per-cpu pages directly instead of using a workqueue. Patch 7 uses a normal spinlock instead of local_lock for remote draining This patch (of 7): The page allocator uses page->lru for storing pages on either buddy or PCP lists. Create page->buddy_list and page->pcp_list as a union with page->lru. This is simply to clarify what type of list a page is on in the page allocator. No functional change intended. [minchan@kernel.org: fix page lru fields in macros] Link: https://lkml.kernel.org/r/20220624125423.6126-2-mgorman@techsingularity.net Signed-off-by: Mel Gorman Tested-by: Minchan Kim Acked-by: Minchan Kim Reviewed-by: Nicolas Saenz Julienne Acked-by: Vlastimil Babka Tested-by: Yu Zhao Cc: Marcelo Tosatti Cc: Michal Hocko Cc: Hugh Dickins Cc: Marek Szyprowski Signed-off-by: Andrew Morton include/linux/mm_types.h | 5 +++++ mm/page_alloc.c | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) commit bcd51a3c679d179cf526414f859c57d081fd37e7 Author: Mike Kravetz Date: Tue Jun 21 16:56:20 2022 -0700 hugetlb: lazy page table copies in fork() Lazy page table copying at fork time was introduced with commit d992895ba2b2 ("[PATCH] Lazy page table copies in fork()"). At the time, hugetlb was very new and did not support page faulting. As a result, it was excluded. When full page fault support was added for hugetlb, the exclusion was not removed. Simply remove the check that prevents lazy copying of hugetlb page tables at fork. Of course, like other mappings this only applies to shared mappings. Lazy page table copying at fork will be less advantageous for hugetlb mappings because: - There are fewer page table entries with hugetlb - hugetlb pmds can be shared instead of copied In any case, completely eliminating the copy at fork time should speed things up. Link: https://lkml.kernel.org/r/20220621235620.291305-5-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Acked-by: Muchun Song Acked-by: David Hildenbrand Cc: "Aneesh Kumar K.V" Cc: Anshuman Khandual Cc: Baolin Wang Cc: Catalin Marinas Cc: Christian Borntraeger Cc: James Houghton Cc: kernel test robot Cc: Michal Hocko Cc: Mina Almasry Cc: Naoya Horiguchi Cc: Paul Walmsley Cc: Peter Xu Cc: Rolf Eike Beer Cc: Will Deacon Signed-off-by: Andrew Morton mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ddb4d91b82f4b64458fe35bc8e395c7c082ea2b Author: Mike Kravetz Date: Tue Jun 21 16:56:19 2022 -0700 hugetlb: do not update address in huge_pmd_unshare As an optimization for loops sequentially processing hugetlb address ranges, huge_pmd_unshare would update a passed address if it unshared a pmd. Updating a loop control variable outside the loop like this is generally a bad idea. These loops are now using hugetlb_mask_last_page to optimize scanning when non-present ptes are discovered. The same can be done when huge_pmd_unshare returns 1 indicating a pmd was unshared. Remove address update from huge_pmd_unshare. Change the passed argument type and update all callers. In loops sequentially processing addresses use hugetlb_mask_last_page to update address if pmd is unshared. [sfr@canb.auug.org.au: fix an unused variable warning/error] Link: https://lkml.kernel.org/r/20220622171117.70850960@canb.auug.org.au Link: https://lkml.kernel.org/r/20220621235620.291305-4-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Signed-off-by: Stephen Rothwell Acked-by: Muchun Song Reviewed-by: Baolin Wang Cc: "Aneesh Kumar K.V" Cc: Anshuman Khandual Cc: Catalin Marinas Cc: Christian Borntraeger Cc: David Hildenbrand Cc: James Houghton Cc: kernel test robot Cc: Michal Hocko Cc: Mina Almasry Cc: Naoya Horiguchi Cc: Paul Walmsley Cc: Peter Xu Cc: Rolf Eike Beer Cc: Will Deacon Cc: Stephen Rothwell Signed-off-by: Andrew Morton include/linux/hugetlb.h | 4 ++-- mm/hugetlb.c | 44 +++++++++++++++++--------------------------- mm/rmap.c | 4 ++-- 3 files changed, 21 insertions(+), 31 deletions(-) commit 1bcdb769f9e0ad7a17891772e6b5414a2945714f Author: Baolin Wang Date: Tue Jun 21 16:56:18 2022 -0700 arm64/hugetlb: implement arm64 specific hugetlb_mask_last_page The HugeTLB address ranges are linearly scanned during fork, unmap and remap operations, and the linear scan can skip to the end of range mapped by the page table page if hitting a non-present entry, which can help to speed linear scanning of the HugeTLB address ranges. So hugetlb_mask_last_page() is introduced to help to update the address in the loop of HugeTLB linear scanning with getting the last huge page mapped by the associated page table page[1], when a non-present entry is encountered. Considering ARM64 specific cont-pte/pmd size HugeTLB, this patch implemented an ARM64 specific hugetlb_mask_last_page() to help this case. [1] https://lore.kernel.org/linux-mm/20220527225849.284839-1-mike.kravetz@oracle.com/ [baolin.wang@linux.alibaba.com: fix build] Link: https://lkml.kernel.org/r/a14e7b39-6a8a-4609-b4a1-84ac574f5c96@linux.alibaba.com Link: https://lkml.kernel.org/r/20220621235620.291305-3-mike.kravetz@oracle.com Signed-off-by: Baolin Wang Signed-off-by: Mike Kravetz Acked-by: Muchun Song Cc: "Aneesh Kumar K.V" Cc: Anshuman Khandual Cc: Catalin Marinas Cc: Christian Borntraeger Cc: David Hildenbrand Cc: James Houghton Cc: kernel test robot Cc: Michal Hocko Cc: Mina Almasry Cc: Naoya Horiguchi Cc: Paul Walmsley Cc: Peter Xu Cc: Rolf Eike Beer Cc: Will Deacon Signed-off-by: Andrew Morton arch/arm64/mm/hugetlbpage.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit e95a9851787bbb3cd4deb40fe8bab03f731852d1 Author: Mike Kravetz Date: Tue Jun 21 16:56:17 2022 -0700 hugetlb: skip to end of PT page mapping when pte not present Patch series "hugetlb: speed up linear address scanning", v2. At unmap, fork and remap time hugetlb address ranges are linearly scanned. We can optimize these scans if the ranges are sparsely populated. Also, enable page table "Lazy copy" for hugetlb at fork. NOTE: Architectures not defining CONFIG_ARCH_WANT_GENERAL_HUGETLB need to add an arch specific version hugetlb_mask_last_page() to take advantage of sparse address scanning improvements. Baolin Wang added the routine for arm64. Other architectures which could be optimized are: ia64, mips, parisc, powerpc, s390, sh and sparc. This patch (of 4): HugeTLB address ranges are linearly scanned during fork, unmap and remap operations. If a non-present entry is encountered, the code currently continues to the next huge page aligned address. However, a non-present entry implies that the page table page for that entry is not present. Therefore, the linear scan can skip to the end of range mapped by the page table page. This can speed operations on large sparsely populated hugetlb mappings. Create a new routine hugetlb_mask_last_page() that will return an address mask. When the mask is ORed with an address, the result will be the address of the last huge page mapped by the associated page table page. Use this mask to update addresses in routines which linearly scan hugetlb address ranges when a non-present pte is encountered. hugetlb_mask_last_page is related to the implementation of huge_pte_offset as hugetlb_mask_last_page is called when huge_pte_offset returns NULL. This patch only provides a complete hugetlb_mask_last_page implementation when CONFIG_ARCH_WANT_GENERAL_HUGETLB is defined. Architectures which provide their own versions of huge_pte_offset can also provide their own version of hugetlb_mask_last_page. Link: https://lkml.kernel.org/r/20220621235620.291305-1-mike.kravetz@oracle.com Link: https://lkml.kernel.org/r/20220621235620.291305-2-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Tested-by: Baolin Wang Reviewed-by: Baolin Wang Acked-by: Muchun Song Reported-by: kernel test robot Cc: Michal Hocko Cc: Peter Xu Cc: Naoya Horiguchi Cc: James Houghton Cc: Mina Almasry Cc: "Aneesh Kumar K.V" Cc: Anshuman Khandual Cc: Paul Walmsley Cc: Christian Borntraeger Cc: Catalin Marinas Cc: Will Deacon Cc: Rolf Eike Beer Cc: David Hildenbrand Signed-off-by: Andrew Morton include/linux/hugetlb.h | 1 + mm/hugetlb.c | 56 ++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 52 insertions(+), 5 deletions(-) commit 3de0de758029a0beb1d47facd3d390d2804a3e94 Author: Kuan-Ying Lee Date: Wed Jun 15 14:22:18 2022 +0800 kasan: separate double free case from invalid free Currently, KASAN describes all invalid-free/double-free bugs as "double-free or invalid-free". This is ambiguous. KASAN should report "double-free" when a double-free is a more likely cause (the address points to the start of an object) and report "invalid-free" otherwise [1]. [1] https://bugzilla.kernel.org/show_bug.cgi?id=212193 Link: https://lkml.kernel.org/r/20220615062219.22618-1-Kuan-Ying.Lee@mediatek.com Signed-off-by: Kuan-Ying Lee Reviewed-by: Dmitry Vyukov Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Vincenzo Frascino Cc: Matthias Brugger Cc: Chinwen Chang Cc: Yee Lee Cc: Andrew Yang Signed-off-by: Andrew Morton mm/kasan/common.c | 8 ++++---- mm/kasan/kasan.h | 3 ++- mm/kasan/report.c | 12 ++++++++---- 3 files changed, 14 insertions(+), 9 deletions(-) commit cb55b83862647da3fbe4135de1723fa78e2357a3 Author: Yang Shi Date: Thu Jun 16 10:48:40 2022 -0700 doc: proc: fix the description to THPeligible The THPeligible bit shows 1 if and only if the VMA is eligible for allocating THP and the THP is also PMD mappable. Some misaligned file VMAs may be eligible for allocating THP but the THP can't be mapped by PMD. Make this more explicitly to avoid ambiguity. Link: https://lkml.kernel.org/r/20220616174840.1202070-8-shy828301@gmail.com Signed-off-by: Yang Shi Reviewed-by: Zach O'Keefe Cc: Kirill A. Shutemov Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Vlastimil Babka Signed-off-by: Andrew Morton Documentation/filesystems/proc.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1064026bab9f011bdea1251d44d66bbbcee04f6e Author: Yang Shi Date: Thu Jun 16 10:48:39 2022 -0700 mm: khugepaged: reorg some khugepaged helpers The khugepaged_{enabled|always|req_madv} are not khugepaged only anymore, move them to huge_mm.h and rename to hugepage_flags_xxx, and remove khugepaged_req_madv due to no users. Also move khugepaged_defrag to khugepaged.c since its only caller is in that file, it doesn't have to be in a header file. Link: https://lkml.kernel.org/r/20220616174840.1202070-7-shy828301@gmail.com Signed-off-by: Yang Shi Reviewed-by: Zach O'Keefe Cc: Kirill A. Shutemov Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Vlastimil Babka Signed-off-by: Andrew Morton include/linux/huge_mm.h | 8 ++++++++ include/linux/khugepaged.h | 14 -------------- mm/huge_memory.c | 4 ++-- mm/khugepaged.c | 18 +++++++++++------- 4 files changed, 21 insertions(+), 23 deletions(-) commit 7da4e2cb8b1ff8221759bfc7512d651ee69516dc Author: Yang Shi Date: Thu Jun 16 10:48:38 2022 -0700 mm: thp: kill __transhuge_page_enabled() The page fault path checks THP eligibility with __transhuge_page_enabled() which does the similar thing as hugepage_vma_check(), so use hugepage_vma_check() instead. However page fault allows DAX and !anon_vma cases, so added a new flag, in_pf, to hugepage_vma_check() to make page fault work correctly. The in_pf flag is also used to skip shmem and file THP for page fault since shmem handles THP in its own shmem_fault() and file THP allocation on fault is not supported yet. Also remove hugepage_vma_enabled() since hugepage_vma_check() is the only caller now, it is not necessary to have a helper function. Link: https://lkml.kernel.org/r/20220616174840.1202070-6-shy828301@gmail.com Signed-off-by: Yang Shi Reviewed-by: Zach O'Keefe Cc: Kirill A. Shutemov Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Vlastimil Babka Signed-off-by: Andrew Morton fs/proc/task_mmu.c | 2 +- include/linux/huge_mm.h | 57 ++----------------------------------------------- mm/huge_memory.c | 51 +++++++++++++++++++++++++++++++++---------- mm/khugepaged.c | 8 +++---- mm/memory.c | 7 ++++-- 5 files changed, 52 insertions(+), 73 deletions(-) commit 9fec51689ff60d9766b38051a0b1692f93d95364 Author: Yang Shi Date: Thu Jun 16 10:48:37 2022 -0700 mm: thp: kill transparent_hugepage_active() The transparent_hugepage_active() was introduced to show THP eligibility bit in smaps in proc, smaps is the only user. But it actually does the similar check as hugepage_vma_check() which is used by khugepaged. We definitely don't have to maintain two similar checks, so kill transparent_hugepage_active(). This patch also fixed the wrong behavior for VM_NO_KHUGEPAGED vmas. Also move hugepage_vma_check() to huge_memory.c and huge_mm.h since it is not only for khugepaged anymore. [akpm@linux-foundation.org: check vma->vm_mm, per Zach] [akpm@linux-foundation.org: add comment to vdso check] Link: https://lkml.kernel.org/r/20220616174840.1202070-5-shy828301@gmail.com Signed-off-by: Yang Shi Reviewed-by: Zach O'Keefe Cc: Kirill A. Shutemov Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Vlastimil Babka Signed-off-by: Andrew Morton fs/proc/task_mmu.c | 2 +- include/linux/huge_mm.h | 16 ++++++++------ include/linux/khugepaged.h | 2 -- mm/huge_memory.c | 53 ++++++++++++++++++++++++++++++++++++++-------- mm/khugepaged.c | 48 ++++------------------------------------- 5 files changed, 59 insertions(+), 62 deletions(-) commit f707fa493784b515ced01d4e261afe16fc784b5d Author: Yang Shi Date: Thu Jun 16 10:48:36 2022 -0700 mm: khugepaged: better comments for anon vma check in hugepage_vma_revalidate The hugepage_vma_revalidate() needs to check if the vma is still anonymous vma or not since the address may be unmapped then remapped to file before khugepaged reaquired the mmap_lock. The old comment is not quite helpful, elaborate this with better comment. Link: https://lkml.kernel.org/r/20220616174840.1202070-4-shy828301@gmail.com Signed-off-by: Yang Shi Reviewed-by: Zach O'Keefe Cc: Kirill A. Shutemov Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Vlastimil Babka Signed-off-by: Andrew Morton mm/khugepaged.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 4fa6893faeaaea4fe4440512d2a708527ef47051 Author: Yang Shi Date: Thu Jun 16 10:48:35 2022 -0700 mm: thp: consolidate vma size check to transhuge_vma_suitable There are couple of places that check whether the vma size is ok for THP or whether address fits, they are open coded and duplicate, use transhuge_vma_suitable() to do the job by passing in (vma->end - HPAGE_PMD_SIZE). Move vma size check into hugepage_vma_check(). This will make khugepaged_enter() is as same as khugepaged_enter_vma(). There is just one caller for khugepaged_enter(), replace it to khugepaged_enter_vma() and remove khugepaged_enter(). Link: https://lkml.kernel.org/r/20220616174840.1202070-3-shy828301@gmail.com Signed-off-by: Yang Shi Reviewed-by: Zach O'Keefe Cc: Kirill A. Shutemov Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Vlastimil Babka Signed-off-by: Andrew Morton include/linux/huge_mm.h | 11 +++++++++++ include/linux/khugepaged.h | 14 -------------- mm/huge_memory.c | 2 +- mm/khugepaged.c | 19 ++++++------------- 4 files changed, 18 insertions(+), 28 deletions(-) commit 66137fb34a4b5e519d4e4679ae5aca9989688a94 Author: Yang Shi Date: Thu Jun 16 10:48:34 2022 -0700 mm: khugepaged: check THP flag in hugepage_vma_check() Patch series "Cleanup transhuge_xxx helpers", v5. This series is the follow-up of the discussion about cleaning up transhuge_xxx helpers at https://lore.kernel.org/linux-mm/627a71f8-e879-69a5-ceb3-fc8d29d2f7f1@suse.cz/. THP has a bunch of helpers that do VMA sanity check for different paths, they do the similar checks for the most callsites and have a lot duplicate codes. And it is confusing what helpers should be used at what conditions. This series reorganized and cleaned up the code so that we could consolidate all the checks into hugepage_vma_check(). The transhuge_vma_enabled(), transparent_hugepage_active() and __transparent_hugepage_enabled() are killed by this series. This patch (of 7): Currently the THP flag check in hugepage_vma_check() will fallthrough if the flag is NEVER and VM_HUGEPAGE is set. This is not a problem for now since all the callers have the flag checked before or can't be invoked if the flag is NEVER. However, the following patch will call hugepage_vma_check() in more places, for example, page fault, so this flag must be checked in hugepge_vma_check(). Link: https://lkml.kernel.org/r/20220616174840.1202070-1-shy828301@gmail.com Link: https://lkml.kernel.org/r/20220616174840.1202070-2-shy828301@gmail.com Signed-off-by: Yang Shi Reviewed-by: Zach O'Keefe Reviewed-by: Miaohe Lin Cc: Vlastimil Babka Cc: Kirill A. Shutemov Cc: Matthew Wilcox Cc: Miaohe Lin Signed-off-by: Andrew Morton mm/khugepaged.c | 3 +++ 1 file changed, 3 insertions(+) commit 13f9e267fdbba30820ce3999338b7d8fe7d6bf77 Author: Shiyang Ruan Date: Fri Jun 3 13:37:38 2022 +0800 xfs: add dax dedupe support Introduce xfs_mmaplock_two_inodes_and_break_dax_layout() for dax files who are going to be deduped. After that, call compare range function only when files are both DAX or not. Link: https://lkml.kernel.org/r/20220603053738.1218681-15-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Cc: Al Viro Cc: Dan Williams Cc: Dan Williams Cc: Dave Chinner Cc: Goldwyn Rodrigues Cc: Goldwyn Rodrigues Cc: Jane Chu Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Naoya Horiguchi Cc: Ritesh Harjani Signed-off-by: Andrew Morton fs/xfs/xfs_file.c | 2 +- fs/xfs/xfs_inode.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++--- fs/xfs/xfs_inode.h | 1 + fs/xfs/xfs_reflink.c | 4 +-- 4 files changed, 69 insertions(+), 7 deletions(-) commit ea6c49b784f0998297fb206af81c28dfaf8bb343 Author: Shiyang Ruan Date: Fri Jun 3 13:37:37 2022 +0800 xfs: support CoW in fsdax mode In fsdax mode, WRITE and ZERO on a shared extent need CoW performed. After that, new allocated extents needs to be remapped to the file. So, add a CoW identification in ->iomap_begin(), and implement ->iomap_end() to do the remapping work. [akpm@linux-foundation.org: make xfs_dax_fault() static] Link: https://lkml.kernel.org/r/20220603053738.1218681-14-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong Cc: Al Viro Cc: Christoph Hellwig Cc: Dan Williams Cc: Dan Williams Cc: Dave Chinner Cc: Goldwyn Rodrigues Cc: Goldwyn Rodrigues Cc: Jane Chu Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Naoya Horiguchi Cc: Ritesh Harjani Signed-off-by: Andrew Morton fs/xfs/xfs_file.c | 33 ++++++++++++++++++++++++++++----- fs/xfs/xfs_iomap.c | 30 +++++++++++++++++++++++++++++- fs/xfs/xfs_iomap.h | 1 + 3 files changed, 58 insertions(+), 6 deletions(-) commit 6f7db3894ae23eb5d40af4efb404aa0c072a68d2 Author: Shiyang Ruan Date: Fri Jun 3 13:37:36 2022 +0800 fsdax: dedup file range to use a compare function With dax we cannot deal with readpage() etc. So, we create a dax comparison function which is similar with vfs_dedupe_file_range_compare(). And introduce dax_remap_file_range_prep() for filesystem use. Link: https://lkml.kernel.org/r/20220603053738.1218681-13-ruansy.fnst@fujitsu.com Signed-off-by: Goldwyn Rodrigues Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Cc: Al Viro Cc: Dan Williams Cc: Dan Williams Cc: Dave Chinner Cc: Goldwyn Rodrigues Cc: Jane Chu Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Naoya Horiguchi Cc: Ritesh Harjani Signed-off-by: Andrew Morton fs/dax.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/remap_range.c | 31 ++++++++++++++++---- fs/xfs/xfs_reflink.c | 8 +++-- include/linux/dax.h | 8 +++++ include/linux/fs.h | 12 +++++--- 5 files changed, 130 insertions(+), 11 deletions(-) commit 8dbfc76da30472cfa07218a27eaaa538f0a49551 Author: Shiyang Ruan Date: Fri Jun 3 13:37:35 2022 +0800 fsdax: add dax_iomap_cow_copy() for dax zero Punch hole on a reflinked file needs dax_iomap_cow_copy() too. Otherwise, data in not aligned area will be not correct. So, add the CoW operation for not aligned case in dax_memzero(). Link: https://lkml.kernel.org/r/20220603053738.1218681-12-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Ritesh Harjani Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Cc: Al Viro Cc: Dan Williams Cc: Dan Williams Cc: Dave Chinner Cc: Goldwyn Rodrigues Cc: Goldwyn Rodrigues Cc: Jane Chu Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Naoya Horiguchi Signed-off-by: Andrew Morton fs/dax.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit e5d6df73302c8d1e7ab2d3555f0faafd0d4b0027 Author: Shiyang Ruan Date: Fri Jun 3 13:37:34 2022 +0800 fsdax: replace mmap entry in case of CoW Replace the existing entry to the newly allocated one in case of CoW. Also, we mark the entry as PAGECACHE_TAG_TOWRITE so writeback marks this entry as writeprotected. This helps us snapshots so new write pagefaults after snapshots trigger a CoW. Link: https://lkml.kernel.org/r/20220603053738.1218681-11-ruansy.fnst@fujitsu.com Signed-off-by: Goldwyn Rodrigues Signed-off-by: Shiyang Ruan Reviewed-by: Christoph Hellwig Reviewed-by: Ritesh Harjani Reviewed-by: Darrick J. Wong Cc: Al Viro Cc: Dan Williams Cc: Dan Williams Cc: Dave Chinner Cc: Goldwyn Rodrigues Cc: Jane Chu Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Naoya Horiguchi Signed-off-by: Andrew Morton fs/dax.c | 77 +++++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 42 insertions(+), 35 deletions(-) commit ff17b8df224b98e282ec39a9949a3672fa3dbe93 Author: Shiyang Ruan Date: Fri Jun 3 13:37:33 2022 +0800 fsdax: introduce dax_iomap_cow_copy() In the case where the iomap is a write operation and iomap is not equal to srcmap after iomap_begin, we consider it is a CoW operation. In this case, the destination (iomap->addr) points to a newly allocated extent. It is needed to copy the data from srcmap to the extent. In theory, it is better to copy the head and tail ranges which is outside of the non-aligned area instead of copying the whole aligned range. But in dax page fault, it will always be an aligned range. So copy the whole range in this case. Link: https://lkml.kernel.org/r/20220603053738.1218681-10-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Cc: Al Viro Cc: Dan Williams Cc: Dan Williams Cc: Dave Chinner Cc: Goldwyn Rodrigues Cc: Goldwyn Rodrigues Cc: Jane Chu Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Naoya Horiguchi Cc: Ritesh Harjani Signed-off-by: Andrew Morton fs/dax.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 83 insertions(+), 5 deletions(-) commit e28cd3e50f3041186ba7fe74a9c7443cd8afc2da Author: Shiyang Ruan Date: Fri Jun 3 13:37:32 2022 +0800 fsdax: output address in dax_iomap_pfn() and rename it Add address output in dax_iomap_pfn() in order to perform a memcpy() in CoW case. Since this function both output address and pfn, rename it to dax_iomap_direct_access(). [ruansy.fnst@fujitsu.com: initialize `rc', per Dan] Link: https://lore.kernel.org/linux-fsdevel/Yp8FUZnO64Qvyx5G@kili/ Link: https://lkml.kernel.org/r/20220607143837.161174-1-ruansy.fnst@fujitsu.com Link: https://lkml.kernel.org/r/20220603053738.1218681-9-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Christoph Hellwig Reviewed-by: Ritesh Harjani Reviewed-by: Dan Williams Reviewed-by: Darrick J. Wong Cc: Al Viro Cc: Dan Williams Cc: Dave Chinner Cc: Goldwyn Rodrigues Cc: Goldwyn Rodrigues Cc: Jane Chu Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Naoya Horiguchi Signed-off-by: Andrew Morton fs/dax.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 6061b69b9a550a2ab84e805d0d2315ba6215f112 Author: Shiyang Ruan Date: Fri Jun 3 13:37:31 2022 +0800 fsdax: set a CoW flag when associate reflink mappings Introduce a PAGE_MAPPING_DAX_COW flag to support association with CoW file mappings. In this case, since the dax-rmap has already took the responsibility to look up for shared files by given dax page, the page->mapping is no longer to used for rmap but for marking that this dax page is shared. And to make sure disassociation works fine, we use page->index as refcount, and clear page->mapping to the initial state when page->index is decreased to 0. With the help of this new flag, it is able to distinguish normal case and CoW case, and keep the warning in normal case. Link: https://lkml.kernel.org/r/20220603053738.1218681-8-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Cc: Al Viro Cc: Dan Williams Cc: Dan Williams Cc: Dave Chinner Cc: Goldwyn Rodrigues Cc: Goldwyn Rodrigues Cc: Jane Chu Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Naoya Horiguchi Cc: Ritesh Harjani Signed-off-by: Andrew Morton fs/dax.c | 50 +++++++++++++++++++++++++++++++++++++--------- include/linux/page-flags.h | 6 ++++++ 2 files changed, 47 insertions(+), 9 deletions(-) commit 6f643c57d57c56d4677bc05f1fca2ef3f249797c Author: Shiyang Ruan Date: Fri Jun 3 13:37:30 2022 +0800 xfs: implement ->notify_failure() for XFS Introduce xfs_notify_failure.c to handle failure related works, such as implement ->notify_failure(), register/unregister dax holder in xfs, and so on. If the rmap feature of XFS enabled, we can query it to find files and metadata which are associated with the corrupt data. For now all we do is kill processes with that file mapped into their address spaces, but future patches could actually do something about corrupt metadata. After that, the memory failure needs to notify the processes who are using those files. Link: https://lkml.kernel.org/r/20220603053738.1218681-7-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Cc: Al Viro Cc: Dan Williams Cc: Dan Williams Cc: Dave Chinner Cc: Goldwyn Rodrigues Cc: Goldwyn Rodrigues Cc: Jane Chu Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Naoya Horiguchi Cc: Ritesh Harjani Signed-off-by: Andrew Morton fs/xfs/Makefile | 5 + fs/xfs/xfs_buf.c | 11 ++- fs/xfs/xfs_fsops.c | 3 + fs/xfs/xfs_mount.h | 1 + fs/xfs/xfs_notify_failure.c | 220 ++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_super.h | 1 + 6 files changed, 238 insertions(+), 3 deletions(-) commit c36e2024957120566efd99395b5c8cc95b5175c1 Author: Shiyang Ruan Date: Fri Jun 3 13:37:29 2022 +0800 mm: introduce mf_dax_kill_procs() for fsdax case This new function is a variant of mf_generic_kill_procs that accepts a file, offset pair instead of a struct to support multiple files sharing a DAX mapping. It is intended to be called by the file systems as part of the memory_failure handler after the file system performed a reverse mapping from the storage address to the file and file offset. Link: https://lkml.kernel.org/r/20220603053738.1218681-6-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Dan Williams Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Miaohe Lin Cc: Al Viro Cc: Dan Williams Cc: Dave Chinner Cc: Goldwyn Rodrigues Cc: Goldwyn Rodrigues Cc: Jane Chu Cc: Matthew Wilcox Cc: Naoya Horiguchi Cc: Ritesh Harjani Signed-off-by: Andrew Morton include/linux/mm.h | 2 ++ mm/memory-failure.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 88 insertions(+), 10 deletions(-) commit 2f437effc689ef913fbe5e31110580b4e7cf04be Author: Shiyang Ruan Date: Fri Jun 3 13:37:28 2022 +0800 fsdax: introduce dax_lock_mapping_entry() The current dax_lock_page() locks dax entry by obtaining mapping and index in page. To support 1-to-N RMAP in NVDIMM, we need a new function to lock a specific dax entry corresponding to this file's mapping,index. And output the page corresponding to the specific dax entry for caller use. Link: https://lkml.kernel.org/r/20220603053738.1218681-5-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Cc: Al Viro Cc: Dan Williams Cc: Dan Williams Cc: Dave Chinner Cc: Goldwyn Rodrigues Cc: Goldwyn Rodrigues Cc: Jane Chu Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Naoya Horiguchi Cc: Ritesh Harjani Signed-off-by: Andrew Morton fs/dax.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/dax.h | 15 +++++++++++++ 2 files changed, 78 insertions(+) commit 33a8f7f2b3a3437d016d1b4047a4fd37eb6951b3 Author: Shiyang Ruan Date: Fri Jun 3 13:37:27 2022 +0800 pagemap,pmem: introduce ->memory_failure() When memory-failure occurs, we call this function which is implemented by each kind of devices. For the fsdax case, pmem device driver implements it. Pmem device driver will find out the filesystem in which the corrupted page located in. With dax_holder notify support, we are able to notify the memory failure from pmem driver to upper layers. If there is something not support in the notify routine, memory_failure will fall back to the generic hanlder. Link: https://lkml.kernel.org/r/20220603053738.1218681-4-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Christoph Hellwig Reviewed-by: Dan Williams Reviewed-by: Darrick J. Wong Reviewed-by: Naoya Horiguchi Cc: Al Viro Cc: Dan Williams Cc: Dave Chinner Cc: Goldwyn Rodrigues Cc: Goldwyn Rodrigues Cc: Jane Chu Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Ritesh Harjani Signed-off-by: Andrew Morton drivers/nvdimm/pmem.c | 17 +++++++++++++++++ include/linux/memremap.h | 12 ++++++++++++ mm/memory-failure.c | 14 ++++++++++++++ 3 files changed, 43 insertions(+) commit 00cc790e00369387f6ab80c5724550c2c6340334 Author: Shiyang Ruan Date: Fri Jun 3 13:37:26 2022 +0800 mm: factor helpers for memory_failure_dev_pagemap memory_failure_dev_pagemap code is a bit complex before introduce RMAP feature for fsdax. So it is needed to factor some helper functions to simplify these code. [akpm@linux-foundation.org: fix CONFIG_HUGETLB_PAGE=n build] [zhengbin13@huawei.com: fix redefinition of mf_generic_kill_procs] Link: https://lkml.kernel.org/r/20220628112143.1170473-1-zhengbin13@huawei.com Link: https://lkml.kernel.org/r/20220603053738.1218681-3-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Signed-off-by: Zheng Bin Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dan Williams Reviewed-by: Miaohe Lin Cc: Al Viro Cc: Dan Williams Cc: Dave Chinner Cc: Goldwyn Rodrigues Cc: Goldwyn Rodrigues Cc: Jane Chu Cc: Matthew Wilcox Cc: Naoya Horiguchi Cc: Ritesh Harjani Signed-off-by: Andrew Morton mm/memory-failure.c | 171 +++++++++++++++++++++++++++++----------------------- 1 file changed, 95 insertions(+), 76 deletions(-) commit 8012b866085523758780850087102421dbcce522 Author: Shiyang Ruan Date: Fri Jun 3 13:37:25 2022 +0800 dax: introduce holder for dax_device Patch series "v14 fsdax-rmap + v11 fsdax-reflink", v2. The patchset fsdax-rmap is aimed to support shared pages tracking for fsdax. It moves owner tracking from dax_assocaite_entry() to pmem device driver, by introducing an interface ->memory_failure() for struct pagemap. This interface is called by memory_failure() in mm, and implemented by pmem device. Then call holder operations to find the filesystem which the corrupted data located in, and call filesystem handler to track files or metadata associated with this page. Finally we are able to try to fix the corrupted data in filesystem and do other necessary processing, such as killing processes who are using the files affected. The call trace is like this: memory_failure() |* fsdax case |------------ |pgmap->ops->memory_failure() => pmem_pgmap_memory_failure() | dax_holder_notify_failure() => | dax_device->holder_ops->notify_failure() => | - xfs_dax_notify_failure() | |* xfs_dax_notify_failure() | |-------------------------- | | xfs_rmap_query_range() | | xfs_dax_failure_fn() | | * corrupted on metadata | | try to recover data, call xfs_force_shutdown() | | * corrupted on file data | | try to recover data, call mf_dax_kill_procs() |* normal case |------------- |mf_generic_kill_procs() The patchset fsdax-reflink attempts to add CoW support for fsdax, and takes XFS, which has both reflink and fsdax features, as an example. One of the key mechanisms needed to be implemented in fsdax is CoW. Copy the data from srcmap before we actually write data to the destination iomap. And we just copy range in which data won't be changed. Another mechanism is range comparison. In page cache case, readpage() is used to load data on disk to page cache in order to be able to compare data. In fsdax case, readpage() does not work. So, we need another compare data with direct access support. With the two mechanisms implemented in fsdax, we are able to make reflink and fsdax work together in XFS. This patch (of 14): To easily track filesystem from a pmem device, we introduce a holder for dax_device structure, and also its operation. This holder is used to remember who is using this dax_device: - When it is the backend of a filesystem, the holder will be the instance of this filesystem. - When this pmem device is one of the targets in a mapped device, the holder will be this mapped device. In this case, the mapped device has its own dax_device and it will follow the first rule. So that we can finally track to the filesystem we needed. The holder and holder_ops will be set when filesystem is being mounted, or an target device is being activated. Link: https://lkml.kernel.org/r/20220603053738.1218681-1-ruansy.fnst@fujitsu.com Link: https://lkml.kernel.org/r/20220603053738.1218681-2-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Christoph Hellwig Reviewed-by: Dan Williams Reviewed-by: Darrick J. Wong Cc: Dave Chinner Cc: Jane Chu Cc: Goldwyn Rodrigues Cc: Al Viro Cc: Matthew Wilcox Cc: Naoya Horiguchi Cc: Miaohe Lin Cc: Dan Williams Cc: Goldwyn Rodrigues Cc: Ritesh Harjani Signed-off-by: Andrew Morton drivers/dax/super.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++- drivers/md/dm.c | 2 +- fs/erofs/super.c | 10 ++++---- fs/ext2/super.c | 7 +++--- fs/ext4/super.c | 9 +++---- fs/xfs/xfs_buf.c | 5 ++-- include/linux/dax.h | 33 +++++++++++++++++++------- 7 files changed, 110 insertions(+), 23 deletions(-) commit 96c0657383fefdee04d4053bcc266bfa620d073d Author: Alex Sierra Date: Fri Jul 15 10:05:21 2022 -0500 tools: add selftests to hmm for COW in device memory The objective is to test device migration mechanism in pages marked as COW, for private and coherent device type. In case of writing to COW private page(s), a page fault will migrate pages back to system memory first. Then, these pages will be duplicated. In case of COW device coherent type, pages are duplicated directly from device memory. Link: https://lkml.kernel.org/r/20220715150521.18165-15-alex.sierra@amd.com Signed-off-by: Alex Sierra Acked-by: Felix Kuehling Cc: Alistair Popple Cc: Christoph Hellwig Cc: David Hildenbrand Cc: Jason Gunthorpe Cc: Jerome Glisse Cc: Matthew Wilcox Cc: Ralph Campbell Signed-off-by: Andrew Morton tools/testing/selftests/vm/hmm-tests.c | 80 ++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit 9e09b705fdb8f3892ec1efc2382f64adabc14c50 Author: Alex Sierra Date: Fri Jul 15 10:05:20 2022 -0500 tools: add hmm gup tests for device coherent type The intention is to test hmm device coherent type under different get user pages paths. Also, test gup with FOLL_LONGTERM flag set in device coherent pages. These pages should get migrated back to system memory. Link: https://lkml.kernel.org/r/20220715150521.18165-14-alex.sierra@amd.com Signed-off-by: Alex Sierra Reviewed-by: Alistair Popple Cc: Christoph Hellwig Cc: David Hildenbrand Cc: Felix Kuehling Cc: Jason Gunthorpe Cc: Jerome Glisse Cc: Matthew Wilcox Cc: Ralph Campbell Signed-off-by: Andrew Morton tools/testing/selftests/vm/hmm-tests.c | 110 +++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) commit e6474b1aeb2a0bb01c925f79cafa829b4b5e05c2 Author: Alex Sierra Date: Fri Jul 15 10:05:19 2022 -0500 tools: update test_hmm script to support SP config Add two more parameters to set spm_addr_dev0 & spm_addr_dev1 addresses. These two parameters configure the start SP addresses for each device in test_hmm driver. Consequently, this configures zone device type as coherent. Link: https://lkml.kernel.org/r/20220715150521.18165-13-alex.sierra@amd.com Signed-off-by: Alex Sierra Signed-off-by: Christoph Hellwig Acked-by: Felix Kuehling Reviewed-by: Alistair Popple Cc: David Hildenbrand Cc: Jason Gunthorpe Cc: Jerome Glisse Cc: Matthew Wilcox Cc: Ralph Campbell Signed-off-by: Andrew Morton tools/testing/selftests/vm/test_hmm.sh | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit f70dab3c015153ad4837f305e6d65cfaff573dac Author: Alex Sierra Date: Fri Jul 15 10:05:18 2022 -0500 tools: update hmm-test to support device coherent type Test cases such as migrate_fault and migrate_multiple, were modified to explicit migrate from device to sys memory without the need of page faults, when using device coherent type. Snapshot test case updated to read memory device type first and based on that, get the proper returned results migrate_ping_pong test case added to test explicit migration from device to sys memory for both private and coherent zone types. Helpers to migrate from device to sys memory and vicerversa were also added. Link: https://lkml.kernel.org/r/20220715150521.18165-12-alex.sierra@amd.com Signed-off-by: Alex Sierra Signed-off-by: Christoph Hellwig Acked-by: Felix Kuehling Reviewed-by: Alistair Popple Cc: David Hildenbrand Cc: Jason Gunthorpe Cc: Jerome Glisse Cc: Matthew Wilcox Cc: Ralph Campbell Signed-off-by: Andrew Morton tools/testing/selftests/vm/hmm-tests.c | 121 +++++++++++++++++++++++++++------ 1 file changed, 100 insertions(+), 21 deletions(-) commit 4c2e0f764eb4444272cfd2fa4afeb84c453a1a34 Author: Alex Sierra Date: Fri Jul 15 10:05:17 2022 -0500 lib: add support for device coherent type in test_hmm Device Coherent type uses device memory that is coherently accesible by the CPU. This could be shown as SP (special purpose) memory range at the BIOS-e820 memory enumeration. If no SP memory is supported in system, this could be faked by setting CONFIG_EFI_FAKE_MEMMAP. Currently, test_hmm only supports two different SP ranges of at least 256MB size. This could be specified in the kernel parameter variable efi_fake_mem. Ex. Two SP ranges of 1GB starting at 0x100000000 & 0x140000000 physical address. Ex. efi_fake_mem=1G@0x100000000:0x40000,1G@0x140000000:0x40000 Private and coherent device mirror instances can be created in the same probed. This is done by passing the module parameters spm_addr_dev0 & spm_addr_dev1. In this case, it will create four instances of device_mirror. The first two correspond to private device type, the last two to coherent type. Then, they can be easily accessed from user space through /dev/hmm_mirror. Usually num_device 0 and 1 are for private, and 2 and 3 for coherent types. If no module parameters are passed, two instances of private type device_mirror will be created only. Link: https://lkml.kernel.org/r/20220715150521.18165-11-alex.sierra@amd.com Signed-off-by: Alex Sierra Acked-by: Felix Kuehling Reviewed-by: Alistair Poppple Cc: Christoph Hellwig Cc: David Hildenbrand Cc: Jason Gunthorpe Cc: Jerome Glisse Cc: Matthew Wilcox Cc: Ralph Campbell Signed-off-by: Andrew Morton lib/test_hmm.c | 253 +++++++++++++++++++++++++++++++++++++++------------- lib/test_hmm_uapi.h | 4 + 2 files changed, 196 insertions(+), 61 deletions(-) commit 25b80162d550408058b2d8fff2e63807bceda64c Author: Alex Sierra Date: Fri Jul 15 10:05:16 2022 -0500 lib: test_hmm add module param for zone device type In order to configure device coherent in test_hmm, two module parameters should be passed, which correspond to the SP start address of each device (2) spm_addr_dev0 & spm_addr_dev1. If no parameters are passed, private device type is configured. Link: https://lkml.kernel.org/r/20220715150521.18165-10-alex.sierra@amd.com Signed-off-by: Alex Sierra Signed-off-by: Christoph Hellwig Acked-by: Felix Kuehling Reviewed-by: Alistair Poppple Cc: David Hildenbrand Cc: Jason Gunthorpe Cc: Jerome Glisse Cc: Matthew Wilcox Cc: Ralph Campbell Signed-off-by: Andrew Morton lib/test_hmm.c | 73 ++++++++++++++++++++++++++++++++++++++--------------- lib/test_hmm_uapi.h | 1 + 2 files changed, 53 insertions(+), 21 deletions(-) commit 188f48268d04f3851cf30151af9025f1f661cc6f Author: Alex Sierra Date: Fri Jul 15 10:05:15 2022 -0500 lib: test_hmm add ioctl to get zone device type Add new ioctl cmd to query zone device type. This will be used once the test_hmm adds zone device coherent type. Link: https://lkml.kernel.org/r/20220715150521.18165-9-alex.sierra@amd.com Signed-off-by: Alex Sierra Signed-off-by: Christoph Hellwig Acked-by: Felix Kuehling Reviewed-by: Alistair Poppple Cc: David Hildenbrand Cc: Jason Gunthorpe Cc: Jerome Glisse Cc: Matthew Wilcox Cc: Ralph Campbell Signed-off-by: Andrew Morton lib/test_hmm.c | 11 +++++++++-- lib/test_hmm_uapi.h | 14 ++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) commit c83dee9b639469b6563a281f39deb99311f16bc4 Author: Alex Sierra Date: Fri Jul 15 10:05:14 2022 -0500 drm/amdkfd: add SPM support for SVM When CPU is connected throug XGMI, it has coherent access to VRAM resource. In this case that resource is taken from a table in the device gmc aperture base. This resource is used along with the device type, which could be DEVICE_PRIVATE or DEVICE_COHERENT to create the device page map region. Also, MIGRATE_VMA_SELECT_DEVICE_COHERENT flag is selected for coherent type case during migration to device. Link: https://lkml.kernel.org/r/20220715150521.18165-8-alex.sierra@amd.com Signed-off-by: Alex Sierra Signed-off-by: Christoph Hellwig Reviewed-by: Felix Kuehling Cc: Alistair Popple Cc: David Hildenbrand Cc: Jason Gunthorpe Cc: Jerome Glisse Cc: Matthew Wilcox Cc: Ralph Campbell Signed-off-by: Andrew Morton drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 34 ++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 13 deletions(-) commit b05a79d4377f6dcc30683008ffd1c531ea965393 Author: Alistair Popple Date: Fri Jul 15 10:05:13 2022 -0500 mm/gup: migrate device coherent pages when pinning instead of failing Currently any attempts to pin a device coherent page will fail. This is because device coherent pages need to be managed by a device driver, and pinning them would prevent a driver from migrating them off the device. However this is no reason to fail pinning of these pages. These are coherent and accessible from the CPU so can be migrated just like pinning ZONE_MOVABLE pages. So instead of failing all attempts to pin them first try migrating them out of ZONE_DEVICE. [hch@lst.de: rebased to the split device memory checks, moved migrate_device_page to migrate_device.c] Link: https://lkml.kernel.org/r/20220715150521.18165-7-alex.sierra@amd.com Signed-off-by: Alistair Popple Signed-off-by: Christoph Hellwig Acked-by: Felix Kuehling Cc: David Hildenbrand Cc: Jason Gunthorpe Cc: Jerome Glisse Cc: Matthew Wilcox Cc: Ralph Campbell Signed-off-by: Andrew Morton mm/gup.c | 50 +++++++++++++++++++++++++++++++++++++++++++------- mm/internal.h | 1 + mm/migrate_device.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+), 7 deletions(-) commit dd19e6d8ffaa1289d75d7833de97faf1b6b2c8e4 Author: Alex Sierra Date: Fri Jul 15 10:05:12 2022 -0500 mm: add device coherent vma selection for memory migration This case is used to migrate pages from device memory, back to system memory. Device coherent type memory is cache coherent from device and CPU point of view. Link: https://lkml.kernel.org/r/20220715150521.18165-6-alex.sierra@amd.com Signed-off-by: Alex Sierra Signed-off-by: Christoph Hellwig Acked-by: Felix Kuehling Reviewed-by: Alistair Poppple Reviewed-by: David Hildenbrand Cc: Jason Gunthorpe Cc: Jerome Glisse Cc: Matthew Wilcox Cc: Ralph Campbell Signed-off-by: Andrew Morton include/linux/migrate.h | 1 + mm/migrate_device.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) commit 3218f8712d6bba1812efd5e0d66c1e15134f2a91 Author: Alex Sierra Date: Fri Jul 15 10:05:11 2022 -0500 mm: handling Non-LRU pages returned by vm_normal_pages With DEVICE_COHERENT, we'll soon have vm_normal_pages() return device-managed anonymous pages that are not LRU pages. Although they behave like normal pages for purposes of mapping in CPU page, and for COW. They do not support LRU lists, NUMA migration or THP. Callers to follow_page() currently don't expect ZONE_DEVICE pages, however, with DEVICE_COHERENT we might now return ZONE_DEVICE. Check for ZONE_DEVICE pages in applicable users of follow_page() as well. Link: https://lkml.kernel.org/r/20220715150521.18165-5-alex.sierra@amd.com Signed-off-by: Alex Sierra Acked-by: Felix Kuehling [v2] Reviewed-by: Alistair Popple [v6] Cc: Christoph Hellwig Cc: David Hildenbrand Cc: Jason Gunthorpe Cc: Jerome Glisse Cc: Matthew Wilcox Cc: Ralph Campbell Signed-off-by: Andrew Morton fs/proc/task_mmu.c | 2 +- mm/huge_memory.c | 2 +- mm/khugepaged.c | 9 ++++++--- mm/ksm.c | 6 +++--- mm/madvise.c | 4 ++-- mm/memory.c | 10 +++++++++- mm/mempolicy.c | 2 +- mm/migrate.c | 4 ++-- mm/mlock.c | 2 +- mm/mprotect.c | 2 +- 10 files changed, 27 insertions(+), 16 deletions(-) commit f25cbb7a95a24ff9a2a3bebd308e303942ae6b2c Author: Alex Sierra Date: Fri Jul 15 10:05:10 2022 -0500 mm: add zone device coherent type memory support Device memory that is cache coherent from device and CPU point of view. This is used on platforms that have an advanced system bus (like CAPI or CXL). Any page of a process can be migrated to such memory. However, no one should be allowed to pin such memory so that it can always be evicted. [hch@lst.de: rebased ontop of the refcount changes, remove is_dev_private_or_coherent_page] Link: https://lkml.kernel.org/r/20220715150521.18165-4-alex.sierra@amd.com Signed-off-by: Alex Sierra Signed-off-by: Christoph Hellwig Acked-by: Felix Kuehling Reviewed-by: Alistair Popple Acked-by: David Hildenbrand Cc: Jason Gunthorpe Cc: Jerome Glisse Cc: Matthew Wilcox Cc: Ralph Campbell Signed-off-by: Andrew Morton include/linux/memremap.h | 19 +++++++++++++++++++ include/linux/mm.h | 5 ++++- mm/memcontrol.c | 7 ++++--- mm/memory-failure.c | 8 ++++++-- mm/memremap.c | 10 ++++++++++ mm/migrate_device.c | 16 +++++++--------- mm/rmap.c | 5 +++-- 7 files changed, 53 insertions(+), 17 deletions(-) commit 5bb88dc571b1cbf0284100a317fb21ab7d03e40c Author: Alex Sierra Date: Fri Jul 15 10:05:09 2022 -0500 mm: move page zone helpers from mm.h to mmzone.h It makes more sense to have these helpers in zone specific header file, rather than the generic mm.h Link: https://lkml.kernel.org/r/20220715150521.18165-3-alex.sierra@amd.com Signed-off-by: Alex Sierra Cc: Alistair Popple Cc: Christoph Hellwig Cc: David Hildenbrand Cc: Felix Kuehling Cc: Jason Gunthorpe Cc: Jerome Glisse Cc: Matthew Wilcox Cc: Ralph Campbell Signed-off-by: Andrew Morton include/linux/memremap.h | 2 +- include/linux/mm.h | 78 ---------------------------------------------- include/linux/mmzone.h | 80 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+), 79 deletions(-) commit 6077c943beee407168f72ece745b0aeaef6b896f Author: Alex Sierra Date: Fri Jul 15 10:05:08 2022 -0500 mm: rename is_pinnable_page() to is_longterm_pinnable_page() Patch series "Add MEMORY_DEVICE_COHERENT for coherent device memory mapping", v9. This patch series introduces MEMORY_DEVICE_COHERENT, a type of memory owned by a device that can be mapped into CPU page tables like MEMORY_DEVICE_GENERIC and can also be migrated like MEMORY_DEVICE_PRIVATE. This patch series is mostly self-contained except for a few places where it needs to update other subsystems to handle the new memory type. System stability and performance are not affected according to our ongoing testing, including xfstests. How it works: The system BIOS advertises the GPU device memory (aka VRAM) as SPM (special purpose memory) in the UEFI system address map. The amdgpu driver registers the memory with devmap as MEMORY_DEVICE_COHERENT using devm_memremap_pages. The initial user for this hardware page migration capability is the Frontier supercomputer project. This functionality is not AMD-specific. We expect other GPU vendors to find this functionality useful, and possibly other hardware types in the future. Our test nodes in the lab are similar to the Frontier configuration, with .5 TB of system memory plus 256 GB of device memory split across 4 GPUs, all in a single coherent address space. Page migration is expected to improve application efficiency significantly. We will report empirical results as they become available. Coherent device type pages at gup are now migrated back to system memory if they are being pinned long-term (FOLL_LONGTERM). The reason is, that long-term pinning would interfere with the device memory manager owning the device-coherent pages (e.g. evictions in TTM). These series incorporate Alistair Popple patches to do this migration from pin_user_pages() calls. hmm_gup_test has been added to hmm-test to test different get user pages calls. This series includes handling of device-managed anonymous pages returned by vm_normal_pages. Although they behave like normal pages for purposes of mapping in CPU page tables and for COW, they do not support LRU lists, NUMA migration or THP. We also introduced a FOLL_LRU flag that adds the same behaviour to follow_page and related APIs, to allow callers to specify that they expect to put pages on an LRU list. This patch (of 14): is_pinnable_page() and folio_is_pinnable() are renamed to is_longterm_pinnable_page() and folio_is_longterm_pinnable() respectively. These functions are used in the FOLL_LONGTERM flag context. Link: https://lkml.kernel.org/r/20220715150521.18165-1-alex.sierra@amd.com Link: https://lkml.kernel.org/r/20220715150521.18165-2-alex.sierra@amd.com Signed-off-by: Alex Sierra Reviewed-by: David Hildenbrand Cc: Jason Gunthorpe Cc: Felix Kuehling Cc: Ralph Campbell Cc: Christoph Hellwig Cc: Jerome Glisse Cc: Alistair Popple Cc: Matthew Wilcox Signed-off-by: Andrew Morton include/linux/mm.h | 8 ++++---- mm/gup.c | 4 ++-- mm/gup_test.c | 2 +- mm/hugetlb.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) commit 30f6f8614a1d1f8ccae6642eaad629997aa33b3b Author: Kalpana Shetty Date: Tue May 31 15:55:56 2022 +0530 selftests/vm: add protection_keys tests to run_vmtests Add "protected_keys" tests to "run_vmtests.sh" would help run all VM related tests from a single shell script. [kalpana.shetty@amd.com: Shuah Khan's review comments incorporated, added -x executable check] Link: https://lkml.kernel.org/r/20220617202931.357-1-kalpana.shetty@amd.com Link: https://lkml.kernel.org/r/20220610090704.296-1-kalpana.shetty@amd.com Link: https://lkml.kernel.org/r/20220531102556.388-1-kalpana.shetty@amd.com Signed-off-by: Kalpana Shetty Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/vm/run_vmtests.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) commit ec1658f0f90c5b855ad590930bf057514581521d Author: SeongJae Park Date: Thu Jul 14 17:04:58 2022 +0000 mm/damon/lru_sort: fix potential memory leak in damon_lru_sort_init() damon_lru_sort_init() returns an error when damon_select_ops() fails without freeing 'ctx' which allocated before. This commit fixes the potential memory leak by freeing 'ctx' under the situation. Link: https://lkml.kernel.org/r/20220714170458.49727-1-sj@kernel.org Fixes: 40e983cca927 ("mm/damon: introduce DAMON-based LRU-lists Sorting") Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/lru_sort.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit af3e16101cee95efaa72095fe06c15ec0b8eb195 Author: Jason A. Donenfeld Date: Sun Jul 17 10:53:46 2022 +0200 um: include sys/types.h for size_t Usually size_t comes from sys/types.h, not stddef.h. This code likely worked only because something else in its usage chain was pulling in sys/types.h. stddef.h is still required for NULL, however, so note this. Cc: Johannes Berg Signed-off-by: Jason A. Donenfeld Signed-off-by: Richard Weinberger arch/um/include/shared/user.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8970d5c9f4a95db6efa9158814b953bfa0bf1f5b Author: Guenter Roeck Date: Thu Jul 14 11:46:00 2022 -0700 um: Replace to_phys() and to_virt() with less generic function names to_virt() and to_phys() are very generic and may be defined by drivers. As it turns out, commit 9409c9b6709e ("pmem: refactor pmem_clear_poison()") did exactly that. This results in build errors such as the following when trying to build um:allmodconfig. drivers/nvdimm/pmem.c: In function ‘pmem_dax_zero_page_range’: ./arch/um/include/asm/page.h:105:20: error: too few arguments to function ‘to_phys’ 105 | #define __pa(virt) to_phys((void *) (unsigned long) (virt)) | ^~~~~~~ Use less generic function names for the um specific to_phys() and to_virt() functions to fix the problem and to avoid similar problems in the future. Fixes: 9409c9b6709e ("pmem: refactor pmem_clear_poison()") Cc: Dan Williams Cc: Christoph Hellwig Signed-off-by: Guenter Roeck Acked-By: Anton Ivanov Acked-by: Dan Williams Signed-off-by: Richard Weinberger arch/um/include/asm/page.h | 4 ++-- arch/um/include/shared/mem.h | 4 ++-- arch/um/os-Linux/skas/process.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) commit 637285e7f8d6da70a70c64e7895cb0672357a1f7 Author: Peter Zijlstra Date: Thu Jul 14 12:20:19 2022 +0200 um: Add missing apply_returns() Implement apply_returns() stub for UM, just like all the other patching routines. Fixes: 15e67227c49a ("x86: Undo return-thunk damage") Reported-by: Randy Dunlap Signed-off-by: Richard Weinberger arch/um/kernel/um_arch.c | 4 ++++ 1 file changed, 4 insertions(+) commit dda520d07b95072a0b63f6c52a8eb566d08ea897 Author: Jason A. Donenfeld Date: Wed Jul 13 13:56:17 2022 +0200 um: add "noreboot" command line option for PANIC_TIMEOUT=-1 setups QEMU has a -no-reboot option, which halts instead of reboots when the guest asks to reboot. This is invaluable when used with CONFIG_PANIC_TIMEOUT=-1 (and panic_on_warn), because it allows panics and warnings to be caught immediately in CI. Implement this in UML too, by way of a basic setup param. Signed-off-by: Jason A. Donenfeld Signed-off-by: Richard Weinberger arch/um/os-Linux/skas/process.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 7ac73fbb54d99486755910eaeccb070735908907 Author: Jason A. Donenfeld Date: Wed Jul 13 12:54:06 2022 +0200 um: include linux/stddef.h for __always_inline When compiling against musl, their shipped doesn't have __always_inline. So instead explicitly include the kernel uapi header, , which does. This prevents the following build error: In file included from arch/x86/um/shared/sysdep/stub.h:11, from arch/um/kernel/skas/clone.c:14: arch/x86/um/shared/sysdep/stub_64.h:111:23: error: expected ‘;’ before ‘void’ 111 | static __always_inline void *get_stub_page(void) | ^~~~~ | ; make[4]: *** [scripts/Makefile.build:249: arch/um/kernel/skas/clone.o] Error 1 Signed-off-by: Jason A. Donenfeld Signed-off-by: Richard Weinberger arch/x86/um/shared/sysdep/stub_64.h | 1 + 1 file changed, 1 insertion(+) commit 5b301409e8bc5d7fad2ee138be44c5c529dd0874 Author: Patricia Alfonso Date: Fri Jul 1 17:16:20 2022 +0800 UML: add support for KASAN under x86_64 Make KASAN run on User Mode Linux on x86_64. The UML-specific KASAN initializer uses mmap to map the ~16TB of shadow memory to the location defined by KASAN_SHADOW_OFFSET. kasan_init() utilizes constructors to initialize KASAN before main(). The location of the KASAN shadow memory, starting at KASAN_SHADOW_OFFSET, can be configured using the KASAN_SHADOW_OFFSET option. The default location of this offset is 0x100000000000, which keeps it out-of-the-way even on UML setups with more "physical" memory. For low-memory setups, 0x7fff8000 can be used instead, which fits in an immediate and is therefore faster, as suggested by Dmitry Vyukov. There is usually enough free space at this location; however, it is a config option so that it can be easily changed if needed. Note that, unlike KASAN on other architectures, vmalloc allocations still use the shadow memory allocated upfront, rather than allocating and free-ing it per-vmalloc allocation. If another architecture chooses to go down the same path, we should replace the checks for CONFIG_UML with something more generic, such as: - A CONFIG_KASAN_NO_SHADOW_ALLOC option, which architectures could set - or, a way of having architecture-specific versions of these vmalloc and module shadow memory allocation options. Also note that, while UML supports both KASAN in inline mode (CONFIG_KASAN_INLINE) and static linking (CONFIG_STATIC_LINK), it does not support both at the same time. Signed-off-by: Patricia Alfonso Co-developed-by: Vincent Whitchurch Signed-off-by: Vincent Whitchurch Signed-off-by: David Gow Reviewed-by: Johannes Berg Reviewed-by: Dmitry Vyukov Reviewed-by: Andrey Konovalov Signed-off-by: Richard Weinberger arch/um/Kconfig | 15 +++++++++++++++ arch/um/include/asm/common.lds.S | 2 ++ arch/um/include/asm/kasan.h | 37 +++++++++++++++++++++++++++++++++++++ arch/um/kernel/dyn.lds.S | 6 +++++- arch/um/kernel/mem.c | 19 +++++++++++++++++++ arch/um/kernel/stacktrace.c | 2 +- arch/um/os-Linux/mem.c | 22 ++++++++++++++++++++++ arch/um/os-Linux/user_syms.c | 4 ++-- arch/x86/um/Makefile | 3 ++- arch/x86/um/vdso/Makefile | 3 +++ mm/kasan/shadow.c | 29 +++++++++++++++++++++++++++-- 11 files changed, 135 insertions(+), 7 deletions(-) commit 335e52c28cf9954d65b819cb68912fd32de3c844 Author: David Gow Date: Fri Jul 1 17:16:19 2022 +0800 mm: Add PAGE_ALIGN_DOWN macro This is just the same as PAGE_ALIGN(), but rounds the address down, not up. Suggested-by: Dmitry Vyukov Signed-off-by: David Gow Acked-by: Andrew Morton Signed-off-by: Richard Weinberger include/linux/mm.h | 3 +++ 1 file changed, 3 insertions(+) commit 9e70cbd11b03889c92462cf52edb2bd023c798fa Author: Christopher Obbard Date: Thu Jun 23 09:58:42 2022 +0100 um: random: Don't initialise hwrng struct with zero Initialising the hwrng struct with zeros causes a compile-time sparse warning: $ ARCH=um make -j10 W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ... CHECK arch/um/drivers/random.c arch/um/drivers/random.c:31:31: sparse: warning: Using plain integer as NULL pointer Fix the warning by not initialising the hwrng struct with zeros as it is initialised anyway during module init. Fixes: 72d3e093afae ("um: random: Register random as hwrng-core device") Reported-by: kernel test robot Signed-off-by: Christopher Obbard Signed-off-by: Richard Weinberger arch/um/drivers/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53078ceb8d0e530ab360896511005628e69ae896 Author: Tobias Klauser Date: Tue Jun 21 12:21:18 2022 +0200 um: remove unused mm_copy_segments It was already removed by commit c17c02040bf0 ("arch: remove unused *_segments() macros/functions") but seems to have been accidentally reintroduced by commit 0500871f21b2 ("Construct init thread stack in the linker script rather than by union"). Remove it for good. Signed-off-by: Tobias Klauser Signed-off-by: Richard Weinberger arch/um/include/asm/processor-generic.h | 5 ----- 1 file changed, 5 deletions(-) commit 6e12adcc61961dbc9bcf773dc8ff325fdba5852b Author: Haowen Bai Date: Wed Jun 1 15:46:05 2022 +0800 um: remove unused variable The variable dead is initialized but never used otherwise. Signed-off-by: Haowen Bai Signed-off-by: Richard Weinberger arch/um/os-Linux/umid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c6496e0a4a90d8149203c16323cff3fa46e422e7 Author: Benjamin Beichler Date: Tue May 31 11:17:39 2022 +0000 um: Remove straying parenthesis Commit e3a33af812c6 ("um: fix and optimize xor select template for CONFIG64 and timetravel mode") caused a build regression when CONFIG_XOR_BLOCKS and CONFIG_UML_TIME_TRAVEL_SUPPORT are selected. Fix it by removing the straying parenthesis. Cc: stable@vger.kernel.org Fixes: e3a33af812c6 ("um: fix and optimize xor select template for CONFIG64 and timetravel mode") Signed-off-by: Benjamin Beichler [rw: Added commit message] Signed-off-by: Richard Weinberger arch/um/include/asm/xor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e062356e50fa82b7009dbc67d8db1b2b9dcad2cf Author: Johannes Berg Date: Fri May 27 09:22:16 2022 +0200 um: x86: print RIP with symbol This is not only nicer to read by default, but also lets decode_stacktrace.sh work on it, rather than removing it. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/x86/um/sysrq_64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 99ac1e2371a562c953af1c276ef7dc373ee263a6 Author: David Gow Date: Thu May 26 11:54:02 2022 -0700 arch: um: Fix build for statically linked UML w/ constructors If CONFIG_CONSTUCTORS is enabled on a statically linked (CONFIG_STATIC_LINK=y) build of UML, the build fails due to the .eh_frame section being both used and discarded: ERROR:root:`.eh_frame' referenced in section `.text' of /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginT.o: defined in discarded section `.eh_frame' of /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginT.o `.eh_frame' referenced in section `.text' of /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginT.o: defined in discarded section `.eh_frame' of /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginT.o Instead, keep the .eh_frame section, as we do in dyn.lds.S for dynamically linked UML. This can be reproduced with: ./tools/testing/kunit/kunit.py run --kconfig_add CONFIG_STATIC_LINK=y --kconfig_add CONFIG_GCOV_KERNEL=y --kconfig_add CONFIG_DEBUG_FS=y Signed-off-by: David Gow Signed-off-by: Richard Weinberger arch/um/kernel/uml.lds.S | 1 + 1 file changed, 1 insertion(+) commit 40d3408d2c71c023caab8f37538fb58366431ead Author: Juerg Haefliger Date: Wed May 25 15:42:11 2022 +0200 x86/um: Kconfig: Fix indentation The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules. Signed-off-by: Juerg Haefliger Signed-off-by: Richard Weinberger arch/x86/um/Kconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e7d523f8b6a865dc9e9ba5e94477554456e8d004 Author: Juerg Haefliger Date: Wed May 25 14:50:01 2022 +0200 um/drivers: Kconfig: Fix indentation The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules. Signed-off-by: Juerg Haefliger Signed-off-by: Richard Weinberger arch/um/drivers/Kconfig | 54 ++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit dec87e2079a29808373e94181e4f7ed49c5bd161 Author: Juerg Haefliger Date: Wed May 25 14:50:00 2022 +0200 um: Kconfig: Fix indentation The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules. Signed-off-by: Juerg Haefliger Signed-off-by: Richard Weinberger arch/um/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0bb369ee451323968b31392a86398f15a2ba183 Author: Mark Bloch Date: Sun Jul 3 13:54:05 2022 -0700 net/mlx5: fs, allow flow table creation with a UID Add UID field to flow table attributes to allow creating flow tables with a non default (zero) uid. Signed-off-by: Mark Bloch Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 16 ++++++++++------ drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 +- .../net/ethernet/mellanox/mlx5/core/steering/dr_cmd.c | 1 + .../net/ethernet/mellanox/mlx5/core/steering/dr_table.c | 8 +++++--- .../net/ethernet/mellanox/mlx5/core/steering/dr_types.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c | 7 ++++--- .../net/ethernet/mellanox/mlx5/core/steering/mlx5dr.h | 3 ++- include/linux/mlx5/fs.h | 1 + 9 files changed, 26 insertions(+), 15 deletions(-) commit 6c27c56cdc69608211617eea217e1a6cecccc675 Author: Mark Bloch Date: Sun Jul 3 13:54:04 2022 -0700 net/mlx5: fs, expose flow table ID to users Expose the flow table ID to users. This will be used by downstream patches to allow creating steering rules that point to a flow table ID. Signed-off-by: Mark Bloch Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 6 ++++++ include/linux/mlx5/fs.h | 1 + 2 files changed, 7 insertions(+) commit f484da847a01936e1d087a80cc96e8254492527c Author: Mark Bloch Date: Sun Jul 3 13:54:03 2022 -0700 net/mlx5: Expose the ability to point to any UID from shared UID Expose shared_object_to_user_object_allowed, this capability means an object created with shared UID can point to any UID. Signed-off-by: Mark Bloch Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed include/linux/mlx5/mlx5_ifc.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2157f5caaed59128d70a1dd72f5ec809cad54407 Author: Jakub Kicinski Date: Tue Jul 5 16:02:08 2022 -0700 ipoib: switch to netif_napi_add_weight() We want to remove the weight argument from the basic netif_napi_add() API and just default to 64. Switch ipoib to the new API for explicitly specifying the weight. Link: https://lore.kernel.org/r/20220705230208.924408-4-kuba@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/ipoib/ipoib_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9217a222fbca0b2e9d1237b147c6b0bfe9ce969f Author: Jakub Kicinski Date: Tue Jul 5 16:02:07 2022 -0700 IB/hfi1: switch to netif_napi_add_weight() Since we'll remove the last argument from netif_napi_add() soon switch this RDMA driver to netif_napi_add_weight() for now to avoid cross-tree patches. Link: https://lore.kernel.org/r/20220705230208.924408-3-kuba@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hfi1/netdev_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b81b7073ae69b5452403422e28e34762d322bc2 Author: Jakub Kicinski Date: Tue Jul 5 16:02:06 2022 -0700 IB/hfi1: switch to netif_napi_add_tx() Switch to the new API not requiring the NAPI_POLL_WEIGHT argument. Link: https://lore.kernel.org/r/20220705230208.924408-2-kuba@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hfi1/ipoib_tx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ac53e0f53239951976002a50b56993c3e30e132f Author: Christophe JAILLET Date: Sun Jul 3 09:42:48 2022 +0200 RDMA/qib: Use the bitmap API when applicable Using the bitmap API is less verbose than hand writing them. It also improves the semantic. While at it, initialize the bitmaps. It can't hurt. Link: https://lore.kernel.org/r/33d8992586d382bec8b8efd83e4729fb7feaf89e.1656834106.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Leon Romanovsky drivers/infiniband/hw/qib/qib_iba7322.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit 7a4a04f4e90d746928501a6d551de87d02c28323 Author: Maximilian Luz Date: Sun Jul 17 14:07:35 2022 +0200 platform/surface: tabletsw: Fix __le32 integer access The sources.count field is a __le32 inside a packed struct. So use the proper functions to access it. Reported-by: kernel test robot Fixes: 9f794056db5b ("platform/surface: Add KIP/POS tablet-mode switch driver") Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220717120735.2052160-1-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/surface/surface_aggregator_tabletsw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 92cfc71ee2ddfb499ed53e21b28bdf8739bc70bc Author: Rafał Miłecki Date: Sun Jul 17 14:42:48 2022 +0200 leds: leds-bcm63138: get rid of LED_OFF The whole "enum led_brightness" is marked as obsolete. Replace it with a (non-)zero check. Reported-by: Pavel Machek Signed-off-by: Rafał Miłecki Signed-off-by: Pavel Machek drivers/leds/blink/leds-bcm63138.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bcc607cdbb1f931111196699426f0cb83bfb296a Author: Rafał Miłecki Date: Sun Jul 17 14:42:47 2022 +0200 leds: add help info about BCM63138 module name It's what we do for all other LEDs drivers. Reported-by: Pavel Machek Signed-off-by: Rafał Miłecki Signed-off-by: Pavel Machek drivers/leds/blink/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 13b64a0c19059b38150c79d65d350ae44034c5df Author: Rafał Miłecki Date: Sun Jul 17 14:42:46 2022 +0200 dt-bindings: leds: leds-bcm63138: unify full stops in descriptions Description of "reg" doesn't have full stop at the end. It makes sense as it's a one-sentence only. Use the same style for "active-low". Reported-by: Pavel Machek Signed-off-by: Rafał Miłecki Signed-off-by: Pavel Machek Documentation/devicetree/bindings/leds/leds-bcm63138.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 466ab2ea239bb85b9fd2613e3e3eb5f6c2811602 Author: Florian Fainelli Date: Fri Jul 15 14:37:47 2022 -0700 MIPS: BMIPS: Utilize cfe_die() for invalid DTB If we were not specified a correct DTB, we will not be able to print anything useful with panic() which requires a working console of some sort. Utilize cfe_die() to callback into the CFE default UART and print some useful diagnostics. Signed-off-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer arch/mips/Kconfig | 1 + arch/mips/bmips/setup.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) commit c059ee9d77f866dbe74bd75a42eb46443a31a08b Author: Florian Fainelli Date: Fri Jul 15 14:37:46 2022 -0700 MIPS: CFE: Add cfe_die() Add a cfe_die() implementation which is useful when the kernel does an early panic and no console is registered. This allows us to print useful diagnostics such as an invalid DTB having been configured/selected. Since the BMIPS_GENERIC kernel can be built with support for multiple processors, we need to do a runtime determination of the type of CPU that we are executing on to perform the appropriate XKS01 disabling. Since cfe_init() + cfe_die() could be conceivably called at very early stages of the kernel boot, before cpu_probe(), we do not rely on the structure(s) populated by cpu_probe(). Signed-off-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer arch/mips/fw/cfe/cfe_api.c | 68 +++++++++++++++++++++++++++++++++- arch/mips/include/asm/fw/cfe/cfe_api.h | 2 + 2 files changed, 69 insertions(+), 1 deletion(-) commit 38a3b05ac078c918827bc838b0be186b68795344 Author: Krzysztof Kozlowski Date: Fri Jun 24 13:13:25 2022 +0200 dt-bindings: leds: lp50xx: fix LED children names The lp50xx LEDs expects to have single-color LED children with unit addresses. This is required by the driver and provided by existing DTSes. Fix the binding to match actual usage. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring [This depends on previous schema-fixing patch, so I deleted Fixes; we don't want to deal with this in stable] Signed-off-by: Pavel Machek Documentation/devicetree/bindings/leds/leds-lp50xx.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit de40c8496ead3e25d1e989999eed0c3ecee8fc96 Author: Krzysztof Kozlowski Date: Fri Jun 24 13:21:06 2022 +0200 dt-bindings: leds: class-multicolor: reference class directly in multi-led node The leds/common.yaml is referenced directly in each LED node, which leads to people doing the same with leds/leds-class-multicolor.yaml. This is not correct because leds-class-multicolor.yaml defined multi-led property and its children. Some schemas implemented this incorrect. Rework this to match same behavior common.yaml, so expect the multi-led node to reference the leds-class-multicolor.yaml. Fixing allows to add unevaluatedProperties:false. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Pavel Machek .../bindings/leds/cznic,turris-omnia-leds.yaml | 2 ++ .../bindings/leds/leds-class-multicolor.yaml | 32 +++++++++++----------- .../devicetree/bindings/leds/leds-lp50xx.yaml | 2 ++ .../bindings/leds/leds-pwm-multicolor.yaml | 5 ++-- .../devicetree/bindings/leds/leds-qcom-lpg.yaml | 2 ++ 5 files changed, 24 insertions(+), 19 deletions(-) commit a0ba692072d89075d0a75c7ad9df31f2c1ee9a1c Author: Rafał Miłecki Date: Mon Dec 27 15:59:05 2021 +0100 leds: bcm63138: add support for BCM63138 controller It's a new controller first introduced in BCM63138 SoC. Later it was also used in BCM4908, some BCM68xx and some BCM63xxx SoCs. Signed-off-by: Rafał Miłecki Reviewed-by: Florian Fainelli Signed-off-by: Pavel Machek drivers/leds/blink/Kconfig | 12 ++ drivers/leds/blink/Makefile | 1 + drivers/leds/blink/leds-bcm63138.c | 308 +++++++++++++++++++++++++++++++++++++ 3 files changed, 321 insertions(+) commit 13344f8ce8a0d98aa7f5d69ce3b47393c73a343b Author: Rafał Miłecki Date: Mon Dec 27 15:59:04 2021 +0100 dt-bindings: leds: add Broadcom's BCM63138 controller Broadcom used 2 LEDs hardware blocks for their BCM63xx SoCs: 1. Older one (BCM6318, BCM6328, BCM6362, BCM63268, BCM6838) 2. Newer one (BCM6848, BCM6858, BCM63138, BCM63148, BCM63381, BCM68360) The newer one was also later also used on BCM4908 SoC. Old block is already documented in the leds-bcm6328.yaml. This binding documents the new one which uses different registers & programming. It's first used in BCM63138 thus the binding name. Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: Pavel Machek .../devicetree/bindings/leds/leds-bcm63138.yaml | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) commit 8bd1dbf8d580c425605fb8936309a4e9745a7a95 Author: Paul Elder Date: Tue Jun 14 20:10:33 2022 +0100 media: rkisp1: debug: Add dump file in debugfs for MI main path registers Add a register dump file in debugfs for some of the buffer-related registers for the main path in MI (for the base address, the size, and the offset). Also dump the corresponding shadow registers. Signed-off-by: Paul Elder Reviewed-by: Dafna Hirschfeld Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-debug.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 7d4f126fde895bd510ce7d2691322dee40d2e90d Author: Laurent Pinchart Date: Tue Jun 14 20:11:18 2022 +0100 media: rkisp1: Make the internal CSI-2 receiver optional Not all ISP versions integrate a MIPI CSI-2 receiver. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-dev.c | 50 +++++++++++++++------- 1 file changed, 34 insertions(+), 16 deletions(-) commit f1b8f17156d2dd96451af5514d5357925214dbc3 Author: Laurent Pinchart Date: Tue Jun 14 20:11:17 2022 +0100 media: rkisp1: Add infrastructure to support ISP features Different ISP versions implement different sets of features. The driver already takes the version into account in several places, but this approach won't scale well for features that are found in different versions. Introduce a new mechanism using a features bitmask in the rkisp1_info structure to indicate which features the ISP support. The first feature bit tells if the ISP has an internal CSI-2 receiver, which is not available in all ISP versions. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-common.h | 15 +++++++++++++++ drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 2 ++ 2 files changed, 17 insertions(+) commit f42f4558a949ac5d266ebdd6e30e3b432e19f60f Author: Paul Elder Date: Tue Jun 14 20:11:16 2022 +0100 media: rkisp1: Support the ISP parallel input The ISP has a parallel input, exposed through port 1 in the device tree node. While the driver supports configuring the ISP for the parallel and BT.656 input modes, the DT parsing code, the subdev bound handler and the ISP stream start handler only support the CSI input. Extend them to support the parallel input. Signed-off-by: Paul Elder Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-common.h | 2 + .../media/platform/rockchip/rkisp1/rkisp1-dev.c | 68 +++++++++++++++++++--- .../media/platform/rockchip/rkisp1/rkisp1-isp.c | 18 +++++- 3 files changed, 77 insertions(+), 11 deletions(-) commit 6a0eaa25bf36b8a2501a03b683b004c8ec04e037 Author: Paul Elder Date: Tue Jun 14 20:11:15 2022 +0100 media: dt-bindings: media: rkisp1: Add port for parallel interface The rkisp1 can take an input on the parallel interface. Add a port for it, and update the required field. At least one port is required, and both may be specified. Signed-off-by: Paul Elder Reviewed-by: Rob Herring Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/rockchip-isp1.yaml | 23 ++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit 2452171eb49b5fef14a310326ef20a1a6de0e4ad Author: Paul Elder Date: Tue Jun 14 20:11:14 2022 +0100 media: rkisp1: Use fwnode_graph_for_each_endpoint When registering the notifier, replace the manual while loop with fwnode_graph_for_each_endpoint. This simplifies error handling. Signed-off-by: Paul Elder Reviewed-by: Dafna Hirschfeld Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-dev.c | 44 ++++++++++------------ 1 file changed, 20 insertions(+), 24 deletions(-) commit 98bfd0cd5dc4bb8b51be45b8b59735f5bbf5a632 Author: Laurent Pinchart Date: Tue Jun 14 20:11:13 2022 +0100 media: rkisp1: csi: Plumb the CSI RX subdev Connect the CSI receiver subdevice between the sensors and the ISP. This includes: - Calling the subdevice via the v4l2 subdev API - Moving the async notifier for the sensor from the ISP to the CSI receiver - In the ISP, create a media link to the CSI receiver, and remove the media link creation to the sensor - In the CSI receiver, create a media link to the sensor Signed-off-by: Paul Elder Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-csi.c | 34 ++++++++++- .../media/platform/rockchip/rkisp1/rkisp1-csi.h | 6 +- .../media/platform/rockchip/rkisp1/rkisp1-dev.c | 70 ++++++++++++---------- .../media/platform/rockchip/rkisp1/rkisp1-isp.c | 21 +------ 4 files changed, 75 insertions(+), 56 deletions(-) commit b298f059b92cfcc46f559471f8de691ef723ee4f Author: Paul Elder Date: Tue Jun 14 20:11:12 2022 +0100 media: rkisp1: csi: Implement a V4L2 subdev for the CSI receiver The CSI receiver is a component separate from the ISP or the resizers. It is actually optional, not all device model include a CSI receiver. On some SoCs CSI-2 support can be provided through an external CSI-2 receiver, connected to the ISP's parallel input. To support those use cases, create a V4L2 subdev to model the CSI receiver. It will allow the driver to handle both internal and external CSI receivers the same way. The next commit will plumb the CSI subdev to the rest of the driver, replacing direct function calls. Signed-off-by: Paul Elder Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-common.h | 19 ++ .../media/platform/rockchip/rkisp1/rkisp1-csi.c | 306 ++++++++++++++++++++- .../media/platform/rockchip/rkisp1/rkisp1-csi.h | 3 + .../media/platform/rockchip/rkisp1/rkisp1-dev.c | 5 + 4 files changed, 329 insertions(+), 4 deletions(-) commit 8b52ec2d1896223d620c27688024168194d7482b Author: Laurent Pinchart Date: Tue Jun 14 20:11:11 2022 +0100 media: rkisp1: isp: Disallow multiple active sources The ISP supports multiple source subdevs, but can only capture from a single one at a time. The source is selected through link setup. The driver finds the active source in its .s_stream() handler using the media_entity_remote_pad() function. This fails to reject invalid configurations with multiple active sources. Fix it by using the media_pad_remote_pad_unique() helper instead, and inline rkisp1_isp_get_source() in rkisp1_isp_s_stream() as the function is small and has a single caller. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-isp.c | 30 ++++++++++------------ 1 file changed, 13 insertions(+), 17 deletions(-) commit 222c04550e2f6a145927ba2178e95777fe66d4d3 Author: Laurent Pinchart Date: Tue Jun 14 20:11:08 2022 +0100 media: rkisp1: isp: Rename rkisp1_get_remote_source() Rename the rkisp1_get_remote_source() function to rkisp1_isp_get_source() to use a consistent rkisp1_isp_* prefix for all ISP functions, and drop the "remote" as the source can't be local. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 76302581d77e077ffec930a165a9f5c38e97a2eb Author: Laurent Pinchart Date: Tue Jun 14 20:11:07 2022 +0100 media: rkisp1: isp: Constify various local variables A set of local variables point to structure that are not meant to be modified. Constify them. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e3ab7e2052c7acca54836f9fe41ffd6b9db85226 Author: Laurent Pinchart Date: Tue Jun 14 20:11:06 2022 +0100 media: rkisp1: isp: Fix whitespace issues Add missing blank lines after variable declaration blocks, and fix indentation issues. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit c16f97acd28d35e8386012c57151b4ae07225bc7 Author: Laurent Pinchart Date: Tue Jun 14 20:11:05 2022 +0100 media: rkisp1: isp: Initialize some variables at declaration time Initialize the src_fmt and sink_fmt variable when declaring them in rkisp1_config_isp(). Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Reviewed-by: Paul Elder Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ce5dd024309af88dac32ca443eec4339c4a80bfe Author: Laurent Pinchart Date: Tue Jun 14 20:11:04 2022 +0100 media: rkisp1: isp: Merge ISP_ACQ_PROP configuration in single variable The rkisp1_config_isp() function stores the value of the input selection and polarity configuration in two different local variables, OR'ed together when writing the register. Merge them into a single acq_prop variable. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Reviewed-by: Paul Elder Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b6ee2a5a36af87953b603ed7a5d10f4e6c76080f Author: Laurent Pinchart Date: Tue Jun 14 20:11:03 2022 +0100 media: rkisp1: isp: Move input configuration to rkisp1_config_isp() The ISP_ACQ_PROP register is set twice, once in rkisp1_config_isp() for most of its fields, and once in rkisp1_config_dvp() (called from rkisp1_config_path()) to configure the input selection field. Move the latter to rkisp1_config_isp() to write the register once only, and drop the now empty rkisp1_config_dvp() function. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-isp.c | 66 ++++++++-------------- 1 file changed, 24 insertions(+), 42 deletions(-) commit bba100df1730f6378b3a7ec821097960041bbd65 Author: Laurent Pinchart Date: Tue Jun 14 20:11:02 2022 +0100 media: rkisp1: isp: Pass rkisp1_isp pointer to internal ISP functions Replace the rkisp1_device pointer argument to the internal functions of the ISP implementation with a rkisp1_isp object. This makes the code flow more logical, as the functions operate on the ISP object. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-isp.c | 60 ++++++++++++---------- 1 file changed, 34 insertions(+), 26 deletions(-) commit fd130bc6fecc2a771cfb5ed19cd74e6bc7759d8a Author: Laurent Pinchart Date: Tue Jun 14 20:11:01 2022 +0100 media: rkisp1: isp: Add rkisp1_device backpointer to rkisp1_isp The rkisp1_isp structure documentation mentions a backpointer field to rkisp1_device, but the field is missing. Add it, and use it to replace more complicated constructs using container_of() on the v4l2_device. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-common.h | 1 + drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) commit 8c1aa1970a741c18959e8e452c39453b37c78bf9 Author: Laurent Pinchart Date: Tue Jun 14 20:11:00 2022 +0100 media: rkisp1: isp: Add container_of wrapper to cast subdev to rkisp1_isp Replace manual container_of() calls with a static inline wrapper to increase readability. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 745ba74ad6f151ad5401ca42d953c283e3b27b3b Author: Laurent Pinchart Date: Tue Jun 14 20:10:59 2022 +0100 media: rkisp1: isp: Rename rkisp1_device.active_sensor to source The active_sensor field of the rkisp1_device structure points to the ASD data for the active source. The source may however not be a sensor, so the naming is a bit confusing. Furthermore, the driver doesn't need to access the full ASD from the active_sensor field, only the subdev pointer is needed, when stopping streaming. Rename the field to source, and turn it into a v4l2_subdev pointer. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-common.h | 4 ++-- .../media/platform/rockchip/rkisp1/rkisp1-isp.c | 27 ++++++++++------------ 2 files changed, 14 insertions(+), 17 deletions(-) commit 055972a0f55fa51128557d869f7027fb26d6c16d Author: Laurent Pinchart Date: Tue Jun 14 20:10:58 2022 +0100 media: rkisp1: isp: Pass mbus type and flags to rkisp1_config_cif() To prepare for the removal of the active_sensor field from the rkisp1_device structure, pass the media bus type of flag to the rkisp1_config_cif() function instead of accessing them through active_sensor. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-isp.c | 44 +++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) commit c4a1d392acfeaa30995ded1098b69c3f414a85fc Author: Laurent Pinchart Date: Tue Jun 14 20:10:57 2022 +0100 media: rkisp1: isp: Don't initialize ret to 0 in rkisp1_isp_s_stream() The ret variable doesn't need to be initialized in rkisp1_isp_s_stream(). Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3061c659ff101bf45c2ad9403b4f059646f26a9d Author: Laurent Pinchart Date: Tue Jun 14 20:10:56 2022 +0100 media: rkisp1: csi: Constify argument to rkisp1_csi_start() The sensor argument to rkisp1_csi_start() isn't meant to be modified by the function. Make it const. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c | 4 ++-- drivers/media/platform/rockchip/rkisp1/rkisp1-csi.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit c5045943cdd268c1c95236795a5d1b774c13ba0f Author: Laurent Pinchart Date: Tue Jun 14 20:10:55 2022 +0100 media: rkisp1: csi: Pass sensor pointer to rkisp1_csi_config() To prepare for the removal of the active_sensor field from the rkisp1_device structure, pass the sensor pointer to the rkisp1_csi_config() function instead of accessing it through active_sensor. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a81138af1d0ac851834e5c582ae52bcc5490ab62 Author: Laurent Pinchart Date: Tue Jun 14 20:10:54 2022 +0100 media: rkisp1: csi: Move start delay to rkisp1_csi_start() The delay in rkisp1_isp_start() is related to the CSI-2 receiver and the camera sensor. Move it where it belongs, to rkisp1_csi_start(). Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c | 7 +++++++ drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) commit 0c0b9f9c8e844327e893bf64495311feaab19ff4 Author: Laurent Pinchart Date: Tue Jun 14 20:10:53 2022 +0100 media: rkisp1: csi: Rename CSI functions with a common rkisp1_csi prefix The CSI-related functions are not named consistently. Fix it by using a common rkisp1_csi prefix. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-common.h | 2 +- drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c | 20 ++++++++++---------- drivers/media/platform/rockchip/rkisp1/rkisp1-csi.h | 6 +++--- drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 4 ++-- drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 6 +++--- 5 files changed, 19 insertions(+), 19 deletions(-) commit 039a73427bfaf320984ef08f31f6faf236c09aa5 Author: Laurent Pinchart Date: Tue Jun 14 20:10:52 2022 +0100 media: rkisp1: csi: Handle CSI-2 RX configuration fully in rkisp1-csi.c The ISP layer now calls multiple functions of the CSI-2 RX layer to configure, start and stop it, with the steps for the last two operations. Move those calls to rkisp1_mipi_csi2_start() and rkisp1_mipi_csi2_stop() to simplify the ISP code and the API exposed by the CSI-2 receiver component. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-csi.c | 59 +++++++++++++--------- .../media/platform/rockchip/rkisp1/rkisp1-csi.h | 4 -- .../media/platform/rockchip/rkisp1/rkisp1-isp.c | 10 +--- 3 files changed, 35 insertions(+), 38 deletions(-) commit 4fd1e6a9abb3b6bb923df17da2afb710746f3963 Author: Laurent Pinchart Date: Tue Jun 14 20:10:51 2022 +0100 media: rkisp1: isp: Start CSI-2 receiver before ISP Make sure the ISP is ready to receive data before starting the CSI-2 receiver by starting it first. Similarly, stop the CSI-2 receiver before the ISP when stopping streaming. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 8082e2f4994d2ce1ac0ac8d6182e10f3835207c4 Author: Paul Elder Date: Tue Jun 14 20:10:50 2022 +0100 media: rkisp1: Split CSI handling to separate file Not all ISP instances include a MIPI CSI-2 receiver. To prepare for making it optional, move code related to the CSI-2 receiver to a separate file. Signed-off-by: Paul Elder Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/Makefile | 1 + .../media/platform/rockchip/rkisp1/rkisp1-common.h | 17 +- .../media/platform/rockchip/rkisp1/rkisp1-csi.c | 193 +++++++++++++++++++++ .../media/platform/rockchip/rkisp1/rkisp1-csi.h | 29 ++++ .../media/platform/rockchip/rkisp1/rkisp1-dev.c | 32 ++-- .../media/platform/rockchip/rkisp1/rkisp1-isp.c | 153 ++-------------- 6 files changed, 258 insertions(+), 167 deletions(-) commit b0b8ab684d7dfbfe33e0c92fb71ebf2912f2f091 Author: Laurent Pinchart Date: Tue Jun 14 20:10:49 2022 +0100 media: rkisp1: Fix sensor source pad retrieval at bound time When a sensor is bound, its source pad is retrieved in the .bound() operation with a call to media_entity_get_fwnode_pad(). The function should be called with the source endpoint fwnode of the sensor, but is instead called with the sensor's device fwnode. Fix this, which involves storing a reference to the source endpoint fwnode in the rkisp1_sensor_async structure, and thus implementing the subdev notifier .destroy() operation to release the reference. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-common.h | 2 ++ .../media/platform/rockchip/rkisp1/rkisp1-dev.c | 28 ++++++++++++++++++---- 2 files changed, 26 insertions(+), 4 deletions(-) commit 124b89f85e306a5bcaf5d285a3c574daa5bb1d50 Author: Laurent Pinchart Date: Tue Jun 14 20:10:47 2022 +0100 media: rkisp1: Rename rkisp1_subdev_notifier() to rkisp1_subdev_notifier_register() The function name isn't very clear, rename it to rkisp1_subdev_notifier_register(). Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cf7a8e248028009c314996b0a285bf8a35949736 Author: Laurent Pinchart Date: Tue Jun 14 20:10:46 2022 +0100 media: rkisp1: Create internal links at probe time There's no need to wait until all async subdevs are bound before creating internal links. Create them at probe time. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-dev.c | 105 ++++++++++----------- 1 file changed, 49 insertions(+), 56 deletions(-) commit bc374e170217b8d81fbb2edb2f28c1aa5312a21b Author: Laurent Pinchart Date: Tue Jun 14 20:10:45 2022 +0100 media: rkisp1: Create link from sensor to ISP at notifier bound time Links from sensors to the ISP can be created as sensors are bound. Move the link creation from rkisp1_create_links() to the bound notifier, and clean up the rkisp1_create_links() function while at it. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-common.h | 2 + .../media/platform/rockchip/rkisp1/rkisp1-dev.c | 87 ++++++++++------------ 2 files changed, 40 insertions(+), 49 deletions(-) commit af2dababb4d6e893fce440d6620e1231979eae4f Author: Laurent Pinchart Date: Tue Jun 14 20:10:44 2022 +0100 media: rkisp1: Reject sensors without pixel rate control at bound time The rkisp1 driver requires the sensor to implement the pixel rate control. Trying to operate without it will cause an error when starting streaming. Catch the issue earlier, at bound time. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 6 ++++++ drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) commit deaf1120ab96666f797a9e6ff1ef60392c3df239 Author: Laurent Pinchart Date: Tue Jun 14 20:10:43 2022 +0100 media: rkisp1: Move sensor .s_stream() call to ISP Move the calls to the active sensor's .s_stream() operation to the ISP subdev's .s_stream(). This groups all handling of the active sensor in one place, preparing for a rework of that code. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c | 12 +----------- drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) commit 9b60b675194cf59215dc83d52522513da23e84f2 Author: Pavel Machek Date: Sun Jul 17 12:59:48 2022 +0200 leds: clevo-mail: Mark as broken pending interface fix Setting blink rate using brightness is unusual and should be fixed. Signed-off-by: Pavel Machek drivers/leds/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3dd7ed589f2eda3904ab4b9fc49bbbc6d450d7f3 Author: Emil Renner Berthing Date: Tue Jul 5 23:01:42 2022 +0200 leds: pwm-multicolor: Support active-low LEDs Add support for LEDs wired up to light when the PWM output is low, just like the regular PWM LEDs. Signed-off-by: Emil Renner Berthing Reviewed-by: Geert Uytterhoeven Signed-off-by: Pavel Machek drivers/leds/rgb/leds-pwm-multicolor.c | 5 +++++ 1 file changed, 5 insertions(+) commit fc890f00d0d5a5dfac23d119645f44b92f299abf Author: Laurent Pinchart Date: Tue Jun 14 20:10:42 2022 +0100 media: rkisp1: cap: Print debug message on failed link validation When a link validation failure occurs, print a debug message to help diagnosing the cause. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 83543c6e54b9dd18950533fff730e68c19cc053a Author: Emil Renner Berthing Date: Tue Jul 5 23:01:41 2022 +0200 dt-bindings: leds: pwm-multicolor: Add active-low property Add the active-low property to LEDs that are part of a multicolor LED just like the regular PWM LEDs have. Signed-off-by: Emil Renner Berthing Reviewed-by: Geert Uytterhoeven Signed-off-by: Pavel Machek Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 0f3c2ab2a6dab0ab367fbbeb107ac7dce08fff0a Author: Paul Elder Date: Tue Jun 14 20:10:41 2022 +0100 media: rkisp1: Make rkisp1_isp_mbus_info common The upcoming CSI receiver split from the ISP to a separate source file will need to be able to access the list of formats supported by the driver. Move it out of the ISP's header and into the common header, and add helper functions for accessing it so that the format list doesn't need to be stored in the header. Signed-off-by: Paul Elder Reviewed-by: Dafna Hirschfeld Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-common.c | 143 +++++++++++++++++ .../media/platform/rockchip/rkisp1/rkisp1-common.h | 23 ++- .../media/platform/rockchip/rkisp1/rkisp1-isp.c | 170 +++------------------ .../platform/rockchip/rkisp1/rkisp1-resizer.c | 14 +- .../media/platform/rockchip/rkisp1/rkisp1-stats.c | 2 +- 5 files changed, 184 insertions(+), 168 deletions(-) commit 399e7aa82105ea46d8998fa535b047541c48030f Author: Emil Renner Berthing Date: Tue Jul 5 23:01:40 2022 +0200 leds: pwm-multicolor: Don't show -EPROBE_DEFER as errors When requesting a PWM it might return -EPROBE_DEFER if it hasn't probed yet. This is not an error, so just propagate the -EPROBE_DEFER without logging anything. There is already dev_err_probe for exactly this situation. Fixes: 9fa2762110dd ("leds: Add PWM multicolor driver") Signed-off-by: Emil Renner Berthing Reviewed-by: Geert Uytterhoeven Signed-off-by: Pavel Machek drivers/leds/rgb/leds-pwm-multicolor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1195b18c6486709aff23286f1fc295900f3f08c7 Author: Laurent Pinchart Date: Tue Jun 14 20:10:40 2022 +0100 media: rkisp1: Access ISP version from info pointer The ISP version is stored in the media_device hw_revision field and access from there in the driver. Now that we store a pointer to the match data in the rkisp1_device structure, access the ISP version from there to make the code clearer and avoid depending on the media_device. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Reviewed-by: Paul Elder Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 4 ++-- drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 2 +- drivers/media/platform/rockchip/rkisp1/rkisp1-stats.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 9125aee770fcdc29c26f33e865df29ebb1ff6484 Author: Paul Elder Date: Tue Jun 14 20:10:39 2022 +0100 media: rkisp1: Save info pointer in rkisp1_device To make it possible to use the rkisp1_info after probe time (for instance to make code conditional on the ISP version), save it in the main rkisp1_device structure. To achieve this, also move the info structure into the common header, and document it. While at it, drop a NULL check in rkisp1_probe() for the match data as it can't happen. Signed-off-by: Paul Elder Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-common.h | 22 ++++++++++++++++++++++ .../media/platform/rockchip/rkisp1/rkisp1-dev.c | 15 +++------------ 2 files changed, 25 insertions(+), 12 deletions(-) commit cdce5b957d5ea5b10251de4d47e2e3d4ff474c58 Author: Laurent Pinchart Date: Tue Jun 14 20:10:38 2022 +0100 media: rkisp1: Rename rkisp1_match_data to rkisp1_info The rkisp1_match_data structure contains device model-specific information. It it referenced from OF match data, but that's an implementation detail. Rename it to rkisp1_info to reflect its main purpose. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Reviewed-by: Paul Elder Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-dev.c | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) commit ae98a4a989935bb8e1431565e2eb86d7a19c2309 Merge: aeb7942b64cc 4274d42716d8 Author: Marc Zyngier Date: Sun Jul 17 11:55:58 2022 +0100 Merge branch kvm-arm64/sysreg-cleanup-5.20 into kvmarm-master/next * kvm-arm64/sysreg-cleanup-5.20: : . : Long overdue cleanup of the sysreg userspace access, : with extra scrubbing on the vgic side of things. : From the cover letter: : : "Schspa Shi recently reported[1] that some of the vgic code interacting : with userspace was reading uninitialised stack memory, and although : that read wasn't used any further, it prompted me to revisit this part : of the code. : : Needless to say, this area of the kernel is pretty crufty, and shows a : bunch of issues in other parts of the KVM/arm64 infrastructure. This : series tries to remedy a bunch of them: : : - Sanitise the way we deal with sysregs from userspace: at the moment, : each and every .set_user/.get_user callback has to implement its own : userspace accesses (directly or indirectly). It'd be much better if : that was centralised so that we can reason about it. : : - Enforce that all AArch64 sysregs are 64bit. Always. This was sort of : implied by the code, but it took some effort to convince myself that : this was actually the case. : : - Move the vgic-v3 sysreg userspace accessors to the userspace : callbacks instead of hijacking the vcpu trap callback. This allows : us to reuse the sysreg infrastructure. : : - Consolidate userspace accesses for both GICv2, GICv3 and common code : as much as possible. : : - Cleanup a bunch of not-very-useful helpers, tidy up some of the code : as we touch it. : : [1] https://lore.kernel.org/r/m2h740zz1i.fsf@gmail.com" : . KVM: arm64: Get rid or outdated comments KVM: arm64: Descope kvm_arm_sys_reg_{get,set}_reg() KVM: arm64: Get rid of find_reg_by_id() KVM: arm64: vgic: Tidy-up calls to vgic_{get,set}_common_attr() KVM: arm64: vgic: Consolidate userspace access for base address setting KVM: arm64: vgic-v2: Add helper for legacy dist/cpuif base address setting KVM: arm64: vgic: Use {get,put}_user() instead of copy_{from.to}_user KVM: arm64: vgic-v2: Consolidate userspace access for MMIO registers KVM: arm64: vgic-v3: Consolidate userspace access for MMIO registers KVM: arm64: vgic-v3: Use u32 to manage the line level from userspace KVM: arm64: vgic-v3: Convert userspace accessors over to FIELD_GET/FIELD_PREP KVM: arm64: vgic-v3: Make the userspace accessors use sysreg API KVM: arm64: vgic-v3: Push user access into vgic_v3_cpu_sysregs_uaccess() KVM: arm64: vgic-v3: Simplify vgic_v3_has_cpu_sysregs_attr() KVM: arm64: Get rid of reg_from/to_user() KVM: arm64: Consolidate sysreg userspace accesses KVM: arm64: Rely on index_to_param() for size checks on userspace access KVM: arm64: Introduce generic get_user/set_user helpers for system registers KVM: arm64: Reorder handling of invariant sysregs from userspace KVM: arm64: Add get_reg_by_id() as a sys_reg_desc retrieving helper Signed-off-by: Marc Zyngier commit 4274d42716d87d5301fdf67eb799e7db08fe73de Author: Marc Zyngier Date: Mon Jul 4 18:11:04 2022 +0100 KVM: arm64: Get rid or outdated comments Once apon a time, the 32bit KVM/arm port was the reference, while the arm64 version was the new kid on the block, without a clear future... This was a long time ago. "The times, they are a-changing." Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 5 ----- 1 file changed, 5 deletions(-) commit c5332898dc35bbed7d3aa02b491e3388315ee481 Author: Marc Zyngier Date: Mon Jul 4 18:25:41 2022 +0100 KVM: arm64: Descope kvm_arm_sys_reg_{get,set}_reg() Having kvm_arm_sys_reg_get_reg and co in kvm_host.h gives the impression that these functions are free to be called from anywhere. Not quite. They really are tied to out internal sysreg handling, and they would be better off in the sys_regs.h header, which is private. kvm_host.h could also get a bit of a diet, so let's just do that. Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 2 -- arch/arm64/kvm/sys_regs.h | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) commit f6dddbb25572218d2e8ab93bfdad20cddeb99b5a Author: Marc Zyngier Date: Mon Jul 4 10:03:33 2022 +0100 KVM: arm64: Get rid of find_reg_by_id() This helper doesn't have a user anymore, let's get rid of it. Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 11 ----------- arch/arm64/kvm/sys_regs.h | 5 ----- 2 files changed, 16 deletions(-) commit 619064afa9b6f0088b86a1fed20c049cfe94cdf7 Author: Marc Zyngier Date: Thu Jul 14 08:10:09 2022 +0100 KVM: arm64: vgic: Tidy-up calls to vgic_{get,set}_common_attr() The userspace accessors have an early call to vgic_{get,set}_common_attr() that makes the code hard to follow. Move it to the default: clause of the decoding switch statement, which results in a nice cleanup. This requires us to move the handling of the pending table into the common handling, even if it is strictly a GICv3 feature (it has the benefit of keeping the whole control group handling in the same function). Also cleanup vgic_v3_{get,set}_attr() while we're at it, deduplicating the calls to vgic_v3_attr_regs_access(). Suggested-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/kvm/vgic/vgic-kvm-device.c | 78 ++++++++++++----------------------- 1 file changed, 26 insertions(+), 52 deletions(-) commit 4b85080f4e378f617f88964dec94fd282bcf2af4 Author: Marc Zyngier Date: Tue Jul 5 14:39:24 2022 +0100 KVM: arm64: vgic: Consolidate userspace access for base address setting Align kvm_vgic_addr() with the rest of the code by moving the userspace accesses into it. kvm_vgic_addr() is also made static. Signed-off-by: Marc Zyngier arch/arm64/kvm/vgic/vgic-kvm-device.c | 75 +++++++++++++++-------------------- include/kvm/arm_vgic.h | 1 - 2 files changed, 31 insertions(+), 45 deletions(-) commit 9f968c9266aa30b0e81be0c6a560e45b93bed3dc Author: Marc Zyngier Date: Tue Jul 5 14:34:33 2022 +0100 KVM: arm64: vgic-v2: Add helper for legacy dist/cpuif base address setting We carry a legacy interface to set the base addresses for GICv2. As this is currently plumbed into the same handling code as the modern interface, it limits the evolution we can make there. Add a helper dedicated to this handling, with a view of maybe removing this in the future. Signed-off-by: Marc Zyngier arch/arm64/kvm/arm.c | 11 ++--------- arch/arm64/kvm/vgic/vgic-kvm-device.c | 32 ++++++++++++++++++++++++++++++++ include/kvm/arm_vgic.h | 1 + 3 files changed, 35 insertions(+), 9 deletions(-) commit d7df6f282db67677c06456fd29d47eda0ba060b9 Author: Marc Zyngier Date: Tue Jul 5 11:27:37 2022 +0100 KVM: arm64: vgic: Use {get,put}_user() instead of copy_{from.to}_user Tidy-up vgic_get_common_attr() and vgic_set_common_attr() to use {get,put}_user() instead of the more complex (and less type-safe) copy_{from,to}_user(). Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/kvm/vgic/vgic-kvm-device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7e9f723c2a90e41407d5889700169be4797a2009 Author: Marc Zyngier Date: Tue Jul 5 10:26:07 2022 +0100 KVM: arm64: vgic-v2: Consolidate userspace access for MMIO registers Align the GICv2 MMIO accesses from userspace with the way the GICv3 code is now structured. Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/kvm/vgic/vgic-kvm-device.c | 39 +++++++++++++++-------------------- 1 file changed, 17 insertions(+), 22 deletions(-) commit e1246f3f2df7aec025fd587ac3d7912007d1144d Author: Marc Zyngier Date: Tue Jul 5 10:26:07 2022 +0100 KVM: arm64: vgic-v3: Consolidate userspace access for MMIO registers For userspace accesses to GICv3 MMIO registers (and related data), vgic_v3_{get,set}_attr are littered with {get,put}_user() calls, making it hard to audit and reason about. Consolidate all userspace accesses in vgic_v3_attr_regs_access(), making the code far simpler to audit. Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/kvm/vgic/vgic-kvm-device.c | 103 ++++++++++++---------------------- 1 file changed, 37 insertions(+), 66 deletions(-) commit 38cf0bb7625a58625efeef9ec944671464ff7430 Author: Marc Zyngier Date: Tue Jul 5 10:16:44 2022 +0100 KVM: arm64: vgic-v3: Use u32 to manage the line level from userspace Despite the userspace ABI clearly defining the bits dealt with by KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO as a __u32, the kernel uses a u64. Use a u32 to match the userspace ABI, which will subsequently lead to some simplifications. Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/kvm/vgic/vgic-kvm-device.c | 6 +++++- arch/arm64/kvm/vgic/vgic-mmio-v3.c | 2 +- arch/arm64/kvm/vgic/vgic-mmio.c | 6 +++--- arch/arm64/kvm/vgic/vgic-mmio.h | 4 ++-- arch/arm64/kvm/vgic/vgic.h | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) commit 71c3c7753c722b8b10566dcdf1ff0a2eaf33a9c1 Author: Marc Zyngier Date: Tue Jul 5 08:11:54 2022 +0100 KVM: arm64: vgic-v3: Convert userspace accessors over to FIELD_GET/FIELD_PREP The GICv3 userspace accessors are all about dealing with conversion between fields from architectural registers and internal representations. However, and owing to the age of this code, the accessors use a combination of shift/mask that is hard to read. It is nonetheless easy to make it better by using the FIELD_{GET,PREP} macros that solely rely on a mask. This results in somewhat nicer looking code, and is probably easier to maintain. Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/kvm/vgic-sys-reg-v3.c | 60 ++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 33 deletions(-) commit cbcf14dd23bcf228eb6061991acf3721506b97ae Author: Marc Zyngier Date: Mon Jul 4 09:57:38 2022 +0100 KVM: arm64: vgic-v3: Make the userspace accessors use sysreg API The vgic-v3 sysreg accessors have been ignored as the rest of the sysreg internal API was evolving, and are stuck with the .access method (which is normally reserved to the guest's own access) for the userspace accesses (which should use the .set/.get_user() methods). Catch up with the program and repaint all the accessors so that they fit into the normal userspace model, and plug the result into the helpers that have been introduced earlier. Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/kvm/vgic-sys-reg-v3.c | 454 ++++++++++++++++++++++----------------- 1 file changed, 257 insertions(+), 197 deletions(-) commit db25081e147c3cc496b8cd8c9d67f992546df6d5 Author: Marc Zyngier Date: Mon Jul 4 08:07:44 2022 +0100 KVM: arm64: vgic-v3: Push user access into vgic_v3_cpu_sysregs_uaccess() In order to start making the vgic sysreg access from userspace similar to all the other sysregs, push the userspace memory access one level down into vgic_v3_cpu_sysregs_uaccess(). The next step will be to rely on the sysreg infrastructure to perform this task. Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/kvm/vgic-sys-reg-v3.c | 22 +++++++++++++++------- arch/arm64/kvm/vgic/vgic-kvm-device.c | 33 +++++++-------------------------- arch/arm64/kvm/vgic/vgic.h | 4 ++-- 3 files changed, 24 insertions(+), 35 deletions(-) commit b61fc0857a3ad4cdee44128ad13685033e237367 Author: Marc Zyngier Date: Sun Jul 3 14:57:29 2022 +0100 KVM: arm64: vgic-v3: Simplify vgic_v3_has_cpu_sysregs_attr() Finding out whether a sysreg exists has little to do with that register being accessed, so drop the is_write parameter. Also, the reg pointer is completely unused, and we're better off just passing the attr pointer to the function. This result in a small cleanup of the calling site, with a new helper converting the vGIC view of a sysreg into the canonical one (this is purely cosmetic, as the encoding is the same). Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/kvm/vgic-sys-reg-v3.c | 14 ++++++++++---- arch/arm64/kvm/vgic/vgic-mmio-v3.c | 8 ++------ arch/arm64/kvm/vgic/vgic.h | 3 +-- 3 files changed, 13 insertions(+), 12 deletions(-) commit 5a420ed9646a934e983358aeba1bf3cd993d1cc5 Author: Marc Zyngier Date: Mon Jul 4 17:55:43 2022 +0100 KVM: arm64: Get rid of reg_from/to_user() These helpers are only used by the invariant stuff now, and while they pretend to support non-64bit registers, this only serves as a way to scare the casual reviewer... Replace these helpers with our good friends get/put_user(), and don't look back. Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) commit 978ceeb3e40a59973ff1d1c3d23484f71f141819 Author: Marc Zyngier Date: Mon Jul 4 17:27:00 2022 +0100 KVM: arm64: Consolidate sysreg userspace accesses Until now, the .set_user and .get_user callbacks have to implement (directly or not) the userspace memory accesses. Although this gives us maximem flexibility, this is also a maintenance burden, making it hard to audit, and I'd feel much better if it was all located in a single place. So let's do just that, simplifying most of the function signatures in the process (the callbacks are now only concerned with the data itself, and not with userspace). Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 160 +++++++++++++++++----------------------------- arch/arm64/kvm/sys_regs.h | 4 +- 2 files changed, 61 insertions(+), 103 deletions(-) commit e48407ff9796529a1e5048b9e4d6ea8a0334468e Author: Marc Zyngier Date: Mon Jul 4 17:01:50 2022 +0100 KVM: arm64: Rely on index_to_param() for size checks on userspace access index_to_param() already checks that we use 64bit accesses for all registers accessed from userspace. However, we have extra checks in other places (such as index_to_params), which is pretty confusing. Get rid off these redundant checks. Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 6 ------ 1 file changed, 6 deletions(-) commit ba23aec9f4f27c00ac7a504aae60cae8a4087a19 Author: Marc Zyngier Date: Sun Jul 3 16:06:51 2022 +0100 KVM: arm64: Introduce generic get_user/set_user helpers for system registers The userspace access to the system registers is done using helpers that hardcode the table that is looked up. extract some generic helpers from this, moving the handling of hidden sysregs into the core code. Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 60 ++++++++++++++++++++++++++++++----------------- arch/arm64/kvm/sys_regs.h | 6 +++++ 2 files changed, 44 insertions(+), 22 deletions(-) commit 1deeffb559663dc44e4b8a61fe7e271fe3b4b836 Author: Marc Zyngier Date: Sun Jul 3 15:11:50 2022 +0100 KVM: arm64: Reorder handling of invariant sysregs from userspace In order to allow some further refactor of the sysreg helpers, move the handling of invariant sysreg to occur before we handle all the other ones. Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit da8d120fbafe1d3217d25ac45493538b37cff87c Author: Marc Zyngier Date: Sun Jul 3 14:08:46 2022 +0100 KVM: arm64: Add get_reg_by_id() as a sys_reg_desc retrieving helper find_reg_by_id() requires a sys_reg_param as input, which most users provide as a on-stack variable, but don't make any use of the result. Provide a helper that doesn't have this requirement and simplify the callers (all but one). Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 28 +++++++++++++++++----------- arch/arm64/kvm/sys_regs.h | 4 ++++ arch/arm64/kvm/vgic-sys-reg-v3.c | 8 ++------ 3 files changed, 23 insertions(+), 17 deletions(-) commit aeb7942b64ccab88140542a92a6ac3ac5726e053 Merge: dc94f89ae68f ed6313a93fd1 Author: Marc Zyngier Date: Sun Jul 17 11:45:22 2022 +0100 Merge branch kvm-arm64/misc-5.20 into kvmarm-master/next * kvm-arm64/misc-5.20: : . : Misc fixes for 5.20: : : - Tidy up the hyp/nvhe Makefile : : - Fix functions pointlessly returning a void value : : - Fix vgic_init selftest to handle the GICv3-on-v3 case : : - Fix hypervisor symbolisation when CONFIG_RANDOMIZE_BASE=y : . KVM: arm64: Fix hypervisor address symbolization KVM: arm64: selftests: Add support for GICv2 on v3 KVM: arm64: Don't return from void function KVM: arm64: nvhe: Add intermediates to 'targets' instead of extra-y KVM: arm64: nvhe: Rename confusing obj-y Signed-off-by: Marc Zyngier commit ed6313a93fd11d2015ad17046f3c418bf6a8dab1 Author: Kalesh Singh Date: Fri Jul 15 16:58:24 2022 -0700 KVM: arm64: Fix hypervisor address symbolization With CONFIG_RANDOMIZE_BASE=y vmlinux addresses will resolve incorrectly from kallsyms. Fix this by adding the KASLR offset before printing the symbols. Fixes: 6ccf9cb557bd ("KVM: arm64: Symbolize the nVHE HYP addresses") Reported-by: Fuad Tabba Signed-off-by: Kalesh Singh Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220715235824.2549012-1-kaleshsingh@google.com arch/arm64/kvm/handle_exit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 196179c545725ba7ce399dc7cdd4a5a25ef6a616 Author: Laurent Pinchart Date: Tue Jun 14 20:10:37 2022 +0100 media: rkisp1: Read the ID register at probe time instead of streamon There's no need to read the ID register every time streaming is started. Do it once, at probe time. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Reviewed-by: Paul Elder Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 10 ++++++++++ drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 4 ---- 2 files changed, 10 insertions(+), 4 deletions(-) commit 13c9810281f8b24af9b7712cd84a1fce61843e93 Author: Laurent Pinchart Date: Tue Jun 14 20:10:36 2022 +0100 media: rkisp1: Disable runtime PM in probe error path If the v4l2_device_register() call fails, runtime PM is left enabled. Fix it. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Reviewed-by: Paul Elder Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2f348f76d476b1f213e0a80971d928e750b5bf9d Author: Laurent Pinchart Date: Tue Jun 14 20:10:34 2022 +0100 media: rkisp1: Enable compilation on ARCH_MXC The ISP used by the Rockchip RK3399 is also found in the NXP i.MX8MP. Enable compilation of the driver for the MXC architecture in addition to ARCH_ROCKCHIP. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Reviewed-by: Paul Elder Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03b282861ca737b7e2dfb9a1e4a2a4a7e3594688 Author: Laurent Pinchart Date: Tue Jun 14 20:11:10 2022 +0100 media: mc-entity: Add a new helper function to get a remote pad for a pad The newly added media_entity_remote_source_pad_unique() helper function handles use cases where the entity has a link enabled uniqueness constraint covering all pads. There are use cases where the constraint covers a specific pad only. Add a new media_pad_remote_pad_unique() function to handle this. It operates as media_entity_remote_source_pad_unique(), but on a given pad instead of on the entity. Signed-off-by: Laurent Pinchart Acked-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/driver-api/media/mc-core.rst | 5 +++-- drivers/media/mc/mc-entity.c | 31 ++++++++++++++++++++++++++++++ include/media/media-entity.h | 18 +++++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) commit 5680fe45d66bbef32a902c04889a523fa4fc33ba Author: Laurent Pinchart Date: Tue Jun 14 20:11:09 2022 +0100 media: mc-entity: Add a new helper function to get a remote pad The media_entity_remote_pad_first() helper function returns the first remote pad it finds connected to a given pad. Beside being possibly non-deterministic (as it stops at the first enabled link), the fact that it returns the first match makes it unsuitable for drivers that need to guarantee that a single link is enabled, for instance when an entity can process data from one of multiple sources at a time. For those use cases, add a new helper function, media_entity_remote_pad_unique(), that operates on an entity and returns a remote pad, with a guarantee that only one link is enabled. To ease its use in drivers, also add an inline wrapper that locates source pads specifically. A wrapper that locates sink pads can easily be added when needed. Signed-off-by: Laurent Pinchart Acked-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/driver-api/media/mc-core.rst | 3 +- drivers/media/mc/mc-entity.c | 39 +++++++++++++++++++++++++ include/media/media-entity.h | 46 ++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 1 deletion(-) commit b2e44430b6348f68f56e78e932e6312f12128778 Author: Laurent Pinchart Date: Sat Jun 25 18:02:24 2022 +0100 media: mc-entity: Rename media_entity_remote_pad() to media_pad_remote_pad_first() The media_entity_remote_pad() is misnamed, as it operates on a pad and not an entity. Rename it to media_pad_remote_pad_first() to clarify its behaviour. Signed-off-by: Laurent Pinchart Reviewed-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/driver-api/media/mc-core.rst | 3 +-- drivers/media/i2c/adv748x/adv748x.h | 2 +- drivers/media/i2c/tvp5150.c | 2 +- drivers/media/mc/mc-entity.c | 4 ++-- drivers/media/pci/intel/ipu3/ipu3-cio2-main.c | 2 +- drivers/media/platform/qcom/camss/camss-csid.c | 6 +++--- drivers/media/platform/qcom/camss/camss-csiphy.c | 2 +- drivers/media/platform/qcom/camss/camss-ispif.c | 4 ++-- drivers/media/platform/qcom/camss/camss-vfe.c | 2 +- drivers/media/platform/qcom/camss/camss-video.c | 6 +++--- drivers/media/platform/qcom/camss/camss.c | 2 +- drivers/media/platform/renesas/rcar-vin/rcar-core.c | 2 +- drivers/media/platform/renesas/rcar-vin/rcar-csi2.c | 2 +- drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 2 +- drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c | 2 +- drivers/media/platform/renesas/vsp1/vsp1_entity.c | 4 ++-- drivers/media/platform/renesas/vsp1/vsp1_video.c | 2 +- drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 2 +- drivers/media/platform/samsung/exynos4-is/common.c | 2 +- drivers/media/platform/samsung/exynos4-is/fimc-capture.c | 6 +++--- drivers/media/platform/samsung/exynos4-is/fimc-isp-video.c | 2 +- drivers/media/platform/samsung/exynos4-is/fimc-lite.c | 2 +- drivers/media/platform/samsung/exynos4-is/media-dev.c | 2 +- drivers/media/platform/samsung/s3c-camif/camif-capture.c | 2 +- drivers/media/platform/st/stm32/stm32-dcmi.c | 6 +++--- drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c | 4 ++-- drivers/media/platform/ti/cal/cal-camerarx.c | 2 +- drivers/media/platform/ti/cal/cal-video.c | 2 +- drivers/media/platform/ti/omap3isp/isp.c | 6 +++--- drivers/media/platform/ti/omap3isp/ispccdc.c | 2 +- drivers/media/platform/ti/omap3isp/ispccp2.c | 2 +- drivers/media/platform/ti/omap3isp/ispcsi2.c | 2 +- drivers/media/platform/ti/omap3isp/ispvideo.c | 4 ++-- drivers/media/platform/video-mux.c | 2 +- drivers/media/platform/xilinx/xilinx-csi2rxss.c | 2 +- drivers/media/platform/xilinx/xilinx-dma.c | 4 ++-- drivers/media/test-drivers/vimc/vimc-streamer.c | 2 +- drivers/staging/media/imx/imx-media-dev-common.c | 2 +- drivers/staging/media/imx/imx-media-utils.c | 2 +- drivers/staging/media/imx/imx7-media-csi.c | 2 +- drivers/staging/media/omap4iss/iss.c | 6 +++--- drivers/staging/media/omap4iss/iss_csi2.c | 2 +- drivers/staging/media/omap4iss/iss_video.c | 2 +- drivers/staging/media/tegra-video/vi.c | 4 ++-- include/media/media-entity.h | 4 ++-- 45 files changed, 65 insertions(+), 66 deletions(-) commit 57cb848f004820a88279f91ca108af33554cd38e Author: Laurent Pinchart Date: Tue Jun 14 20:10:48 2022 +0100 media: v4l2-async: Add notifier operation to destroy asd instances Drivers typically extend the v4l2_async_subdev structure by embedding it in a driver-specific structure, to store per-subdev custom data. The v4l2_async_subdev instances are freed by the v4l2-async framework, which makes this mechanism cumbersome to use safely when custom data needs special treatment to be destroyed (such as freeing additional memory, or releasing references to kernel objects). To ease this, add a .destroy() operation to the v4l2_async_notifier_operations structure. The operation is called right before the v4l2_async_subdev is freed, giving drivers a chance to destroy data if needed. Signed-off-by: Laurent Pinchart Reviewed-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/driver-api/media/v4l2-subdev.rst | 6 ++++++ drivers/media/v4l2-core/v4l2-async.c | 10 ++++++++++ include/media/v4l2-async.h | 2 ++ 3 files changed, 18 insertions(+) commit c4d987de9ca0ea1e3905b5b192c4aeede6481205 Author: Ezequiel Garcia Date: Mon Jul 11 22:11:39 2022 +0100 media: rkvdec: Use vb2_find_buffer Use the newly introduced vb2_find_buffer API to get a vb2_buffer given a buffer timestamp. Signed-off-by: Ezequiel Garcia Acked-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/rkvdec/rkvdec-h264.c | 41 ++++++++++-------------------- drivers/staging/media/rkvdec/rkvdec-vp9.c | 10 ++++---- 2 files changed, 19 insertions(+), 32 deletions(-) commit d642f7c842fc863ac213865be4bf109a53d82d60 Author: Ezequiel Garcia Date: Mon Jul 11 22:11:38 2022 +0100 media: hantro: Use vb2_find_buffer Use the newly introduced vb2_find_buffer API to get a vb2_buffer given a buffer timestamp. Signed-off-by: Ezequiel Garcia Acked-by: Tomasz Figa Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro_drv.c | 6 ++---- drivers/staging/media/hantro/hantro_g2_vp9_dec.c | 10 +++++----- 2 files changed, 7 insertions(+), 9 deletions(-) commit 5b25e5432b8eea63bc862c3feed7771cf20c7d99 Author: Ezequiel Garcia Date: Mon Jul 11 22:11:37 2022 +0100 media: vicodec: Use vb2_find_buffer Use the newly introduced vb2_find_buffer API to get a vb2_buffer given a buffer timestamp. Signed-off-by: Ezequiel Garcia Acked-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/test-drivers/vicodec/vicodec-core.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 6c6d3eaefe4055872c48bdd567bdec36bdd74ad5 Author: Ezequiel Garcia Date: Mon Jul 11 22:11:36 2022 +0100 media: tegra-vde: Use vb2_find_buffer Use the newly introduced vb2_find_buffer API to get a vb2_buffer given a buffer timestamp. Cc: Dmitry Osipenko Signed-off-by: Ezequiel Garcia Acked-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/nvidia/tegra-vde/h264.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 25e3bc6236e741fe873084e6bb33797698456336 Author: Ezequiel Garcia Date: Mon Jul 11 22:11:35 2022 +0100 media: mediatek: vcodec: Use vb2_find_buffer Use the newly introduced vb2_find_buffer API to get a vb2_buffer given a buffer timestamp. Cc: Tiffany Lin Cc: Andrew-CT Chen Cc: Yunfei Dong Signed-off-by: Ezequiel Garcia Acked-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/platform/mediatek/vcodec/vdec/vdec_h264_req_common.c | 7 +++---- drivers/media/platform/mediatek/vcodec/vdec/vdec_vp8_req_if.c | 7 +++---- drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c | 8 ++++---- 3 files changed, 10 insertions(+), 12 deletions(-) commit 9d042e457ef8e3f883f0cba8a1eed633906deb78 Author: Ezequiel Garcia Date: Mon Jul 11 22:11:34 2022 +0100 media: videobuf2: Introduce vb2_find_buffer() All users of vb2_find_timestamp() combine it with vb2_get_buffer() to retrieve a videobuf2 buffer, given a u64 timestamp. Introduce an API for this use-case. Users will be converted to the new API as follow-up commits. Signed-off-by: Ezequiel Garcia Acked-by: Tomasz Figa Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/videobuf2/videobuf2-v4l2.c | 12 ++++++++++++ include/media/videobuf2-v4l2.h | 10 ++++++++++ 2 files changed, 22 insertions(+) commit f0b4a9c46c118d07ac4728323599e282c313799a Author: Jernej Skrabec Date: Mon Jun 20 18:55:17 2022 +0100 media: cedrus: h265: Implement support for tiles Tiles are last remaining unimplemented functionality for HEVC. Implement it. [hverkuil: fix checkpatch warning, split long line in two] Signed-off-by: Jernej Skrabec Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/sunxi/cedrus/cedrus.c | 10 +++ drivers/staging/media/sunxi/cedrus/cedrus.h | 4 + drivers/staging/media/sunxi/cedrus/cedrus_dec.c | 4 + drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 109 +++++++++++++++++++++-- 4 files changed, 121 insertions(+), 6 deletions(-) commit c6618d2789044855cc3e155ae4ee544b3a8a4ef2 Author: Jernej Skrabec Date: Mon Jun 20 18:55:16 2022 +0100 media: cedrus: Add helper for determining number of elements Now that controls can be dynamic arrays, we need to know how many elements are in such array. Add a helper for that. Signed-off-by: Jernej Skrabec Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/sunxi/cedrus/cedrus.c | 11 +++++++++++ drivers/staging/media/sunxi/cedrus/cedrus.h | 1 + 2 files changed, 12 insertions(+) commit 0ede8c820ae0bdf7036127934521c6ea8376fc5f Author: Jernej Skrabec Date: Mon Jun 20 18:55:15 2022 +0100 media: cedrus: h265: Add a couple of error checks Now that we have infrastructure for reporting errors, let's add two checks, which will make sure slice can be actually decoded. Signed-off-by: Jernej Skrabec Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4af46bcc49152fc8a68a6bc5b5a2ca8a3c6db439 Author: Jernej Skrabec Date: Mon Jun 20 18:55:14 2022 +0100 media: cedrus: Add error handling for failed setup During decoding setup stage for complex codecs like HEVC driver can detect inconsistent values in controls or some other task, like allocating memory, can fail. Currently setup stage has no way of signalling error. Change return type of setup callback to int and if returned value is not zero, skip decoding and finish job immediately with error flag. While currently there is only one place when setup can fail, it's expected that there will be more such cases in the future, when HEVC decoding is improved. Signed-off-by: Jernej Skrabec Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/sunxi/cedrus/cedrus.h | 2 +- drivers/staging/media/sunxi/cedrus/cedrus_dec.c | 23 +++++++++++++++++------ drivers/staging/media/sunxi/cedrus/cedrus_h264.c | 5 +++-- drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 8 ++++---- drivers/staging/media/sunxi/cedrus/cedrus_mpeg2.c | 4 +++- drivers/staging/media/sunxi/cedrus/cedrus_vp8.c | 5 +++-- 6 files changed, 31 insertions(+), 16 deletions(-) commit 1f258653e16c24489c4e468564e45348c8b7674b Author: Jernej Skrabec Date: Mon Jun 20 18:55:13 2022 +0100 media: cedrus: Improve error messages for controls Currently error messages when control creation fails are very sparse. Granted, user should never observe them. However, developer working on codecs can. In such cases additional information like which control creation failed and error number are very useful. Expand error messages with additional info. Signed-off-by: Jernej Skrabec Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/sunxi/cedrus/cedrus.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f1a413902aa71044b6ec41265e5e28ebaf29a9ce Author: Jernej Skrabec Date: Mon Jun 20 18:55:12 2022 +0100 media: cedrus: h265: Fix logic for not low delay flag Now that we know real purpose of "not low delay" flag, logic for applying this flag should be fixed too. According to vendor and reference implementation, low delay is signaled when POC of current frame is lower than POC of at least one reference of a slice. Implement mentioned logic and invert it to conform to flag meaning. Also don't apply flag for I frames. They don't have any reference. This fixes decoding of 3 reference bitstreams. Fixes: 86caab29da78 ("media: cedrus: Add HEVC/H.265 decoding support") Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 27 +++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 104a70e1d0bcef28db13c4192b8729086089651c Author: Jernej Skrabec Date: Mon Jun 20 18:55:11 2022 +0100 media: cedrus: h265: Fix flag name Bit 21 in register 0x24 (slice header info 1) actually represents negated version of low delay flag. This can be seen in vendor Cedar library source code. While this flag is not part of the standard, it can be found in reference HEVC implementation. Fix macro name and change it to flag. Fixes: 86caab29da78 ("media: cedrus: Add HEVC/H.265 decoding support") Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 4 +++- drivers/staging/media/sunxi/cedrus/cedrus_regs.h | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) commit e4b8d13f19b988a17de0226f3f8a7d03e72eac37 Author: Jernej Skrabec Date: Wed Jul 6 19:29:01 2022 +0100 media: hantro: sunxi: Enable 10-bit decoding Now that infrastructure for 10-bit decoding exists, enable it for Allwinner H6. Tested-by: Benjamin Gaignard Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/sunxi_vpu_hw.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 4e8c54fd22ec7b82a9227f027bc78c98f1018e58 Author: Jernej Skrabec Date: Wed Jul 6 19:29:00 2022 +0100 media: hantro: Store VP9 bit depth in context Now that we have proper infrastructure for postprocessing 10-bit formats, store VP9 bit depth in context. Reviewed-by: Ezequiel Garcia Tested-by: Benjamin Gaignard Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro_drv.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 62d1c353b60a205130050e8b5d562708d6f7f8d3 Author: Jernej Skrabec Date: Wed Jul 6 19:28:59 2022 +0100 media: hantro: postproc: Properly calculate chroma offset Currently chroma offset calculation assumes only 1 byte per luma, with no consideration for stride. Take necessary information from destination pixel format which makes calculation completely universal. Reviewed-by: Ezequiel Garcia Tested-by: Benjamin Gaignard Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro_postproc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4dc1fc7197a3a65c59f37f7c0a842e1ce522cb6c Author: Jernej Skrabec Date: Wed Jul 6 19:28:58 2022 +0100 media: hantro: postproc: Fix legacy regs configuration Some postproc legacy registers were set in VP9 code. Move them to postproc and fix their value. Reviewed-by: Ezequiel Garcia Tested-by: Benjamin Gaignard Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro_g2_vp9_dec.c | 8 -------- drivers/staging/media/hantro/hantro_postproc.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 8 deletions(-) commit b273deab2bac4edc5db6314e7b5f9a16a7e73440 Author: Jernej Skrabec Date: Wed Jul 6 19:28:57 2022 +0100 media: hantro: postproc: Fix buffer size calculation When allocating aux buffers for postprocessing, it's assumed that base buffer size is the same as that of output. Coincidentally, that's true most of the time, but not always. 10-bit source also needs aux buffer size which is appropriate for 10-bit native format, even if the output format is 8-bit. Similarly, mv sizes and other extra buffer size also depends on source width/height, not destination. Reviewed-by: Ezequiel Garcia Tested-by: Benjamin Gaignard Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro_postproc.c | 24 +++++++++++++++++------- drivers/staging/media/hantro/hantro_v4l2.c | 2 +- drivers/staging/media/hantro/hantro_v4l2.h | 2 ++ 3 files changed, 20 insertions(+), 8 deletions(-) commit 8d03c2ab881b3d891380629f4be83cb2a9f66964 Author: Jernej Skrabec Date: Wed Jul 6 19:28:56 2022 +0100 media: hantro: Support format filtering by depth In preparation for supporting 10-bit formats, add mechanism which will filter formats based on pixel depth. Hantro G2 supports only one decoding format natively and that is based on bit depth of current video frame. Additionally, it makes no sense to upconvert bitness, so filter those out too. Reviewed-by: Ezequiel Garcia Tested-by: Benjamin Gaignard Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro.h | 4 +++ drivers/staging/media/hantro/hantro_v4l2.c | 48 ++++++++++++++++++++++++++++-- drivers/staging/media/hantro/hantro_v4l2.h | 1 + 3 files changed, 50 insertions(+), 3 deletions(-) commit 3c8e19d3d3f9a20cde987fa73fd83b13dcc8604f Author: Ezequiel Garcia Date: Wed Jul 6 19:28:55 2022 +0100 media: Add P010 tiled format Add P010 tiled format [rebased, updated pixel format name and added description] Tested-by: Benjamin Gaignard Signed-off-by: Ezequiel Garcia Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../userspace-api/media/v4l/pixfmt-yuv-planar.rst | 18 +++++++++++++++--- drivers/media/v4l2-core/v4l2-common.c | 1 + drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/videodev2.h | 1 + 4 files changed, 18 insertions(+), 3 deletions(-) commit 67bce62ac1959d8b7d731fc201694942f50a01b7 Author: Randy Dunlap Date: Thu Jul 14 18:59:48 2022 -0700 leds: clevo-mail: fix Kconfig "its" grammar Use the possessive "its" instead of the contraction "it's" where appropriate. Signed-off-by: Randy Dunlap Cc: Pavel Machek Cc: Lee Jones Cc: linux-leds@vger.kernel.org Signed-off-by: Pavel Machek drivers/leds/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7113ac825371c17c15e2d0be79d850e5e16d3328 Author: Xuezhi Zhang Date: Tue Jun 7 20:06:49 2022 +0800 rpmsg: convert sysfs snprintf to sysfs_emit Fix the following coccicheck warning: drivers/rpmsg/qcom_glink_native.c:1677:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Xuezhi Zhang Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607120649.78436-1-zhangxuezhi1@coolpad.com drivers/rpmsg/qcom_glink_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65382585f067d4256ba087934f30f85c9b6984de Author: Miaoqian Lin Date: Wed May 11 16:07:37 2022 +0400 rpmsg: qcom_smd: Fix refcount leak in qcom_smd_parse_edge of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend") Signed-off-by: Miaoqian Lin Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220511120737.57374-1-linmq006@gmail.com drivers/rpmsg/qcom_smd.c | 1 + 1 file changed, 1 insertion(+) commit 101042f4c0eb2daa331b4f7ce32c6d547114830a Author: Krzysztof Kozlowski Date: Thu May 19 09:33:30 2022 +0200 rpmsg: qcom: correct kerneldoc Correct kerneldoc warnings like: drivers/rpmsg/qcom_glink_ssr.c:45: warning: expecting prototype for G(). Prototype was for GLINK_SSR_DO_CLEANUP() instead Also fix meaning of 'flag' argument. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220519073330.7187-3-krzysztof.kozlowski@linaro.org drivers/rpmsg/qcom_glink_ssr.c | 2 +- drivers/rpmsg/qcom_smd.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 6c3ebc96ffefbc48297d7c2fd266e9cb78e6941e Author: Krzysztof Kozlowski Date: Thu May 19 09:33:29 2022 +0200 rpmsg: qcom: glink: remove unused name The qcom_glink.name is read from DTS but never used further, never referenced, so drop it. This also fixes kerneldoc warning: drivers/rpmsg/qcom_glink_native.c:125: warning: Function parameter or member 'name' not described in 'qcom_glink' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220519073330.7187-2-krzysztof.kozlowski@linaro.org drivers/rpmsg/qcom_glink_native.c | 6 ------ 1 file changed, 6 deletions(-) commit 766279a8f85df32345dbda03b102ca1ee3d5ddea Author: Krzysztof Kozlowski Date: Thu May 19 09:33:28 2022 +0200 rpmsg: qcom: glink: replace strncpy() with strscpy_pad() The use of strncpy() is considered deprecated for NUL-terminated strings[1]. Replace strncpy() with strscpy_pad(), to keep existing pad-behavior of strncpy, similarly to commit 08de420a8014 ("rpmsg: glink: Replace strncpy() with strscpy_pad()"). This fixes W=1 warning: In function ‘qcom_glink_rx_close’, inlined from ‘qcom_glink_work’ at ../drivers/rpmsg/qcom_glink_native.c:1638:4: drivers/rpmsg/qcom_glink_native.c:1549:17: warning: ‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation] 1549 | strncpy(chinfo.name, channel->name, sizeof(chinfo.name)); [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220519073330.7187-1-krzysztof.kozlowski@linaro.org drivers/rpmsg/qcom_glink_native.c | 2 +- drivers/rpmsg/qcom_smd.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 8d8be8dd7c1f5d50f84ecc7a6a41962da48c6164 Author: Stephan Gerhold Date: Tue Jul 12 14:44:18 2022 +0200 ARM: dts: qcom: msm8974: Disable remoteprocs by default The remoteproc configuration in qcom-msm8974.dtsi is incomplete because it lacks the regulator supplies that should be added in the board DT files. Some of the msm8974 boards are currently missing the regulator supplies and should have the remoteprocs disabled to avoid making use of the incomplete configuration. This also fixes dtbs_check warnings after moving "qcom,msm8974-mss-pil" to DT schema, which rightfully complains that the -supply properties are missing for some boards: qcom-apq8074-dragonboard.dtb: remoteproc@fc880000: 'pll-supply' is a required property From schema: remoteproc/qcom,msm8916-mss-pil.yaml remoteproc@fc880000: 'mss-supply' is a required property From schema: remoteproc/qcom,msm8916-mss-pil.yaml remoteproc@fc880000: 'oneOf' conditional failed, one must be fixed: 'power-domains' is a required property 'power-domain-names' is a required property, or 'cx-supply' is a required property 'mx-supply' is a required property Cc: Luca Weiss Cc: Konrad Dybcio Fixes: f300826d27be ("ARM: dts: qcom-msm8974: Sort and clean up nodes") Signed-off-by: Stephan Gerhold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220712124421.3129206-4-stephan.gerhold@kernkonzept.com arch/arm/boot/dts/qcom-msm8974.dtsi | 4 ++++ arch/arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dts | 2 ++ arch/arm/boot/dts/qcom-msm8974pro-samsung-klte.dts | 2 ++ 3 files changed, 8 insertions(+) commit 4fefb5434c4b735daf913abaef12431405368031 Author: Christian Marangi Date: Thu Jul 7 12:20:40 2022 +0200 ARM: dts: qcom: ipq8064: add missing smem compatible Add missing smem compatible and hwlocks phandle for ipq8064 dtsi smem node. Signed-off-by: Christian Marangi Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220707102040.1859-3-ansuelsmth@gmail.com arch/arm/boot/dts/qcom-ipq8064.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit fbe4be367b2169602f6a5949a20d2917b25714d4 Author: Christian Marangi Date: Thu Jul 7 12:20:39 2022 +0200 ARM: dts: qcom: ipq8064: add missing hwlock Add missing hwlock for ipq8064 dtsi provided by qcom,sfpb-mutex. Signed-off-by: Christian Marangi Acked-by: Krzysztof Kozlowski [bjorn: Moved the node inside /soc] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220707102040.1859-2-ansuelsmth@gmail.com arch/arm/boot/dts/qcom-ipq8064.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit cdab30b44518513003607ecfc8a22de3dbbb78ed Author: Christian Marangi Date: Thu Jul 7 12:20:38 2022 +0200 hwspinlock: qcom: Add support for mmio usage to sfpb-mutex Allow sfpb-mutex to use mmio in addition to syscon. Signed-off-by: Christian Marangi Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220707102040.1859-1-ansuelsmth@gmail.com drivers/hwspinlock/qcom_hwspinlock.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) commit 7f5aecdd4ffcc018f73171bc0e028cd4e3361acd Author: Christian Marangi Date: Thu Jul 7 03:09:43 2022 +0200 ARM: dts: qcom: ipq8064: add speedbin efuse nvmem node Add speedbin efuse nvmem cell needed for the opp table for the CPU freqs. Signed-off-by: Christian Marangi Tested-by: Jonathan McDowell Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220707010943.20857-10-ansuelsmth@gmail.com arch/arm/boot/dts/qcom-ipq8064.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 6c421a9c08286389bb331fe783e2625c9efcc187 Author: Christian Marangi Date: Thu Jul 7 03:09:41 2022 +0200 ARM: dts: qcom: ipq8064: fix and add some missing gsbi node Add some tag for gsbi to make them usable for ipq8064 SoC. Add missing gsbi7 i2c node and gsbi1 node. Signed-off-by: Christian Marangi Tested-by: Jonathan McDowell Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220707010943.20857-8-ansuelsmth@gmail.com arch/arm/boot/dts/qcom-ipq8064.dtsi | 54 ++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) commit 8fafb7e5c041814876266259e5e439f93571dcef Author: Christian Marangi Date: Thu Jul 7 03:09:40 2022 +0200 ARM: dts: qcom: ipq8064: reduce pci IO size to 64K The current value for pci IO is problematic for ath10k wifi card commonly connected to ipq8064 SoC. The current value is probably a typo and is actually uncommon to find 1MB IO space even on a x86 arch. Also with recent changes to the pci driver, pci1 and pci2 now fails to function as any connected device fails any reg read/write. Reduce this to 64K as it should be more than enough and 3 * 64K of total IO space doesn't exceed the IO_SPACE_LIMIT hardcoded for the ARM arch. Signed-off-by: Christian Marangi Tested-by: Jonathan McDowell Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220707010943.20857-7-ansuelsmth@gmail.com arch/arm/boot/dts/qcom-ipq8064.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d63d3124c0a5cdbe8b91d81b922fe56b2462e1b9 Author: Christian Marangi Date: Thu Jul 7 03:09:39 2022 +0200 ARM: dts: qcom: ipq8064: disable usb phy by default Disable usb phy by default. When the usb phy were pushed, half of them were flagged as disabled by mistake. Correctly disable all usb phy and enable them only if a device actually use them. Signed-off-by: Christian Marangi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220707010943.20857-6-ansuelsmth@gmail.com arch/arm/boot/dts/qcom-ipq8064.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 0ce34e0c13e99c239cce6099f64b0e95697f36b1 Author: Christian Marangi Date: Thu Jul 7 03:09:38 2022 +0200 ARM: dts: qcom: ipq8064: add missing snps,dwmac compatible for gmac Add missing snps,dwmac compatible for gmac ipq8064 dtsi. Signed-off-by: Christian Marangi Tested-by: Jonathan McDowell Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220707010943.20857-5-ansuelsmth@gmail.com arch/arm/boot/dts/qcom-ipq8064.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5c47a46d5e942ea6b041c8b7727b201817c1ff76 Author: Christian Marangi Date: Thu Jul 7 03:09:37 2022 +0200 ARM: dts: qcom: ipq8064: add specific dtsi with smb208 rpm regulators Add specific ipq8064 dtsi with smb208 rpm regulators. Qcom advise to use this configuration but it's not mandatory and OEM can decide to implement their own regulators. smb208 regulators are used to scale CPU voltage, L2 cache voltage and Ubi32 cores. There regulators are controlled by rpm and to correctly works gsbi4-i2c require to be NEVER disabled or rpm will reject any regulator change request. Signed-off-by: Christian Marangi Tested-by: Jonathan McDowell Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220707010943.20857-4-ansuelsmth@gmail.com arch/arm/boot/dts/qcom-ipq8064-smb208.dtsi | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit d883a12a547b6d42e795ff3b5ac87cfd013b5423 Author: Christian Marangi Date: Thu Jul 7 03:09:36 2022 +0200 ARM: dts: qcom: ipq8064: add gsbi6 missing definition Add gsbi6 missing definition for ipq8064. Signed-off-by: Christian Marangi Tested-by: Jonathan McDowell Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220707010943.20857-3-ansuelsmth@gmail.com arch/arm/boot/dts/qcom-ipq8064.dtsi | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 4af1defb305798d1a064a5ea0d0c9b30e5eee185 Author: Christian Marangi Date: Thu Jul 7 03:09:35 2022 +0200 ARM: dts: qcom: ipq8064: add multiple missing pin definition Add missing definition for mdio0 pins used for gpio-bitbang driver,i2c4 pins and rgmii2 pins for ipq8064. Drop i2c4_pins node from ipq8064-ap148 dts as it's now moved to ipq8064 dtsi. Drop mdio0_pins node from ipq8064-rb3011 dts as it's now moved to ipq8064 dtsi. Signed-off-by: Christian Marangi Tested-by: Jonathan McDowell Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220707010943.20857-2-ansuelsmth@gmail.com arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 6 ------ arch/arm/boot/dts/qcom-ipq8064-rb3011.dts | 9 --------- arch/arm/boot/dts/qcom-ipq8064.dtsi | 32 +++++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 15 deletions(-) commit 1ea9098a81133d54b3d40d7ffd197f77881e5ecc Author: André Almeida Date: Thu May 5 18:43:37 2022 +0200 ARM: dts: qcom: msm8974-hammerhead: Add notification LED Nexus 5 has a RGB LED connected to the TRILED and hence channels 7, 6 and 5 of the LPG. Add a node describing this. Signed-off-by: Luca Weiss Signed-off-by: André Almeida Reported-by: kernel test robot Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220505164336.13210-1-luca@z3ntu.xyz .../dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit a037fcabdbdd8615e17add98c2638df529ff2e3c Author: Luca Weiss Date: Thu May 5 18:30:29 2022 +0200 ARM: dts: qcom: msm8974-FP2: Add notification LED FP2 has a RGB LED connected to the TRILED and hence channels 7, 6 and 5 of the LPG. Add a node describing this. Signed-off-by: Luca Weiss Reported-by: kernel test robot Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220505163029.6541-1-luca@z3ntu.xyz .../arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dts | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 27f5947894c596fcfd6da20c061c582e7191e9e1 Author: Bjorn Andersson Date: Wed Jul 13 14:23:09 2022 -0700 ARM: dts: qcom: msm8974-sony: Enable LPG Both Castor and Honami has RGB LEDs driven by the PM8941 LPG, define these. Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20220713212309.130230-3-bjorn.andersson@linaro.org .../boot/dts/qcom-msm8974-sony-xperia-rhine.dtsi | 30 ++++++++++++++++++++++ .../qcom-msm8974pro-sony-xperia-shinano-castor.dts | 30 ++++++++++++++++++++++ 2 files changed, 60 insertions(+) commit 5edd7d3e15a46c8549440a0b596c69be7e2c49fc Author: Bjorn Andersson Date: Wed Jul 13 14:23:08 2022 -0700 ARM: dts: qcom: Add LPG node to pm8941 The PM8941 contains 8 LPG channels, as well as TRILED and LUT blocks. Add a node for these. Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20220713212309.130230-2-bjorn.andersson@linaro.org arch/arm/boot/dts/qcom-pm8941.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b5eb8cde863cdf455436c7ba3fb7362c49e1e64e Author: Ren Zhijie Date: Thu Jul 14 20:11:44 2022 +0800 clk: qcom: fix build error initializer element is not constant CONFIG_CC_VERSION_TEXT="x86_64-linux-gnu-gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0" make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed, like this: drivers/clk/qcom/gpucc-sm8350.c:111:2: error: initializer element is not constant gpu_cc_parent, ^~~~~~~~~~~~~ drivers/clk/qcom/gpucc-sm8350.c:111:2: note: (near initialization for ‘gpu_cc_parent_data_0[0]’) drivers/clk/qcom/gpucc-sm8350.c:126:2: error: initializer element is not constant gpu_cc_parent, ^~~~~~~~~~~~~ drivers/clk/qcom/gpucc-sm8350.c:126:2: note: (near initialization for ‘gpu_cc_parent_data_1[0]’) make[3]: *** [drivers/clk/qcom/gpucc-sm8350.o] Error 1 It seems that nested constant initializer is not supported in GCC 7.4.0. For portability resons, we should fix it. Reported-by: Hulk Robot Fixes: 160758b05ab1 ("clk: qcom: add support for SM8350 GPUCC") Signed-off-by: Ren Zhijie Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220714121144.71062-1-renzhijie2@huawei.com drivers/clk/qcom/gpucc-sm8350.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 079926b5a22ac92c4ac1e15e6cfb20a431802cb5 Author: Johan Hovold Date: Fri Jul 15 09:02:48 2022 +0200 ARM: dts: qcom: sdx65: reorder USB interrupts Three SoCs did not follow the interrupt order specified by the USB controller binding. While keeping the non-SuperSpeed interrupts together seems natural, reorder the interrupts to match the binding. Acked-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold [bjorn: Split out from arm64 patch] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220715070248.19078-5-johan+linaro@kernel.org arch/arm/boot/dts/qcom-sdx65.dtsi | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 5b7e3499e3fb7874f9de3de1e7326e029e07c93c Author: Johan Hovold Date: Fri Jul 15 09:02:48 2022 +0200 arm64: dts: qcom: reorder USB interrupts Three SoCs did not follow the interrupt order specified by the USB controller binding. While keeping the non-SuperSpeed interrupts together seems natural, reorder the interrupts to match the binding. Acked-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold [bjorn: Omitted sdx65 part from this patch] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220715070248.19078-5-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sm8250.dtsi | 20 ++++++++++++-------- arch/arm64/boot/dts/qcom/sm8350.dtsi | 20 ++++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) commit 2a8d28b8af7906259efe1c3c39de0b660f9eb35b Author: Johan Hovold Date: Fri Jul 15 09:02:47 2022 +0200 arm64: dts: qcom: sc7280: reorder USB interrupts Only one of the USB controllers supports SuperSpeed and have an SS PHY wakeup interrupt. Reorder the interrupts so that they match the updated binding which specifically has the optional interrupt last. Acked-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220715070248.19078-4-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc7280.dtsi | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 0bd6b33c51e916e1e6cae113a48ec3c8d897d3ac Author: Johan Hovold Date: Fri Jul 15 09:02:46 2022 +0200 arm64: dts: qcom: sc8280xp: fix USB interrupts The two single-port SC8280XP USB controllers do not have an hs_phy_irq interrupt. Instead they have a pwr_event interrupt which is distinct from the former and not yet supported by the driver. Fix the USB node interrupt names so that they match the devicetree binding. Also fix the pwr_event interrupt of the second controller which should be 811 as noticed by Andrew Halaney. Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform") Reviewed-by: Andrew Halaney Acked-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220715070248.19078-3-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 68af5d7c6d6dae12be6bb4fb52aabe8e1b7a2fe0 Author: Johan Hovold Date: Fri Jul 15 09:02:45 2022 +0200 arm64: dts: qcom: sc8280xp: fix USB clock order and naming Fix the USB controller clock order and naming so that they match the devicetree binding. Note that the driver currently simply enables all clocks in the order that they are specified in the devicetree. Reordering the clocks as per the binding means that the only explicit ordering constraint found in the vendor driver, that cfg_noc should be enabled before the core_clk, is now honoured. Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform") Signed-off-by: Johan Hovold Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220715070248.19078-2-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit c9d8468158adca6dffd2ff5b1befd35f75568b10 Author: Liang He Date: Tue Jun 21 23:17:20 2022 +0800 power: supply: olpc_battery: Hold the reference returned by of_find_compatible_node In olpc_battery_probe(), we should hold the reference returned by of_find_compatible_node() and use it to call of_node_put() for refcount balance. Signed-off-by: Liang He Signed-off-by: Sebastian Reichel drivers/power/supply/olpc_battery.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 38d45444e257f7e3f6fbd242ba42371563984093 Author: Zheng Bin Date: Thu May 12 17:38:44 2022 +0800 power: supply: ab8500: add missing destroy_workqueue in ab8500_charger_bind ab8500_charger_bind misses destroy_workqueue in error path, this patch fixes that. Signed-off-by: Zheng Bin Acked-by: Linus Walleij Signed-off-by: Sebastian Reichel drivers/power/supply/ab8500_charger.c | 1 + 1 file changed, 1 insertion(+) commit a1124c84d467223c71bcf9f2710993bb6927ea5c Author: Tetsuo Handa Date: Thu Jun 9 13:58:04 2022 +0900 power: supply: ab8500: Remove flush_scheduled_work() call. It seems to me that ab8500 driver is using dedicated workqueues and is not calling schedule{,_delayed}_work{,_on}(). Then, there will be no work to flush using flush_scheduled_work(). Signed-off-by: Tetsuo Handa Reviewed-by: Linus Walleij Signed-off-by: Sebastian Reichel drivers/power/supply/ab8500_btemp.c | 1 - drivers/power/supply/ab8500_chargalg.c | 1 - drivers/power/supply/ab8500_charger.c | 2 -- drivers/power/supply/ab8500_fg.c | 1 - 4 files changed, 5 deletions(-) commit 13a4223df8a95735a6c1bafa859656ae4e78ff98 Author: Jiang Jian Date: Thu Jun 23 01:14:10 2022 +0800 power: supply: ab8500_fg: drop duplicated 'is' in comment Fix word duplication typo 'is is' -> 'is'. Signed-off-by: Jiang Jian [update commit message] Signed-off-by: Sebastian Reichel drivers/power/supply/ab8500_fg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c50a08d9dd323a6a2e212f78059116edad8cc4e Author: Linus Walleij Date: Thu Jun 23 16:25:45 2022 +0200 power: supply: ab8500: Drop external charger leftovers Some leftover code for external chargers only used with unreleased ASIC revisions and the header file for the unsupported PM2301 was left behind in an earlier cleanup, fix it by deleting the remnants. Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel drivers/power/supply/ab8500-chargalg.h | 4 - drivers/power/supply/ab8500_chargalg.c | 23 +- drivers/power/supply/ab8500_charger.c | 45 +-- drivers/power/supply/pm2301_charger.h | 492 --------------------------------- 4 files changed, 2 insertions(+), 562 deletions(-) commit e8b60d9c0a852ec563e2227a5610092c3f4b85b0 Author: Linus Walleij Date: Thu Jun 23 16:31:57 2022 +0200 power: supply: ab8500: Add MAINTAINERS entry I am maintaining these drivers so add patterns to MAINTAINERS for them. Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+) commit 491f1f483f4284fb2db0e09a5de4664683a25a88 Author: Krzysztof Kozlowski Date: Wed Jun 29 14:38:04 2022 +0200 dt-bindings: power: reset: qcom,pshold: convert to dtschema Convert the Qualcomm Power Supply Hold Reset bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel .../bindings/power/reset/msm-poweroff.txt | 17 ----------- .../bindings/power/reset/qcom,pshold.yaml | 35 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 17 deletions(-) commit 966f6551173ac46183db6621451702a7e4a3d4b5 Author: Schspa Shi Date: Tue Jul 5 11:32:44 2022 +0800 power: supply: Fix typo in power_supply_check_supplies It seems to be a typo, there is no actual BUG, but it's better to fix it to avoid any possible BUG after we change the type of supplied_from. Signed-off-by: Schspa Shi Signed-off-by: Sebastian Reichel drivers/power/supply/power_supply_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c5560db571d491569931244cdc2391664be04dc8 Merge: b1f8b0cfe397 9e0c41d4a72f Author: Arnd Bergmann Date: Sat Jul 16 21:50:18 2022 +0200 Merge tag 'arm-soc/for-5.20/soc-part2' of https://github.com/Broadcom/stblinux into arm/soc This pull request contains Broadcom ARM-based SoCs Kconfig updates for 5.20, second part, please pull the following: - Rafal spells out what the BCA acronym means - Florian removes the forced thermal subsystem selection done by ARCH_BCM_NSP * tag 'arm-soc/for-5.20/soc-part2' of https://github.com/Broadcom/stblinux: ARM: bcmbca: Include full family name in Kconfig ARM: bcm: NSP: Removed forced thermal selection Link: https://lore.kernel.org/r/20220715221642.297536-4-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 2c071ce53d566a5b3b4e541334e7b32551a8dd62 Merge: 5995e9232fc3 746ef3ac89ca Author: Arnd Bergmann Date: Sat Jul 16 21:47:56 2022 +0200 Merge tag 'arm-soc/for-5.20/devicetree-arm64-part2' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM64-based SoCs Device Tree changes for 5.20, second part, please pull the following: - Rafal adds basic support for the BCM4912-based router Asus GT-AX6000, he also has ARCH_BCM4908 select ARCH_BCMBCA such that in the next cycle we can remove ARCH_BCM4908 and continue to have make oldconfig work. Finally he spells out what BCA means to make it clearer * tag 'arm-soc/for-5.20/devicetree-arm64-part2' of https://github.com/Broadcom/stblinux: arm64: bcmbca: Include full family name in Kconfig arm64: make ARCH_BCM4908 select ARCH_BCMBCA arm64: dts: Add base DTS file for bcmbca device Asus GT-AX6000 Link: https://lore.kernel.org/r/20220715221642.297536-3-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 5995e9232fc38decb77fc8b421ce47aeec8e19ee Merge: 92c336e7ae2e 76cf72fe5ab6 Author: Arnd Bergmann Date: Sat Jul 16 21:44:38 2022 +0200 Merge tag 'arm-soc/for-5.20/devicetree-part2' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM SoCs Device Tree changes for 5.20, second part: - Rafal defines the binding of BCM4912 based router Asus GT-AX6000 * tag 'arm-soc/for-5.20/devicetree-part2' of https://github.com/Broadcom/stblinux: dt-bindings: arm: Add Asus GT-AX6000 based on BCM4912 Link: https://lore.kernel.org/r/20220715221642.297536-2-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 0565d238b9b4abb7b904248d9064bea80ac706fe Author: Liam Beguin Date: Sat Jul 9 21:31:09 2022 -0400 iio: test: rework Kconfig to support modules Rework the IIO test Kconfig to support building KUnit tests as modules. This lets users execute tests at runtime in addition to the usual tools/testing/kunit/kunit.py script. Signed-off-by: Liam Beguin Link: https://lore.kernel.org/r/20220710013109.3349104-6-liambeguin@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/test/Kconfig | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit cf9a4b58b56e007d12063f1beaee555fa0d15561 Author: Liam Beguin Date: Sat Jul 9 21:31:08 2022 -0400 iio: afe: rescale: export symbols used during testing In preparation for module support, export symbols use during testing. Signed-off-by: Liam Beguin Link: https://lore.kernel.org/r/20220710013109.3349104-5-liambeguin@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/afe/iio-rescale.c | 2 ++ drivers/iio/test/iio-test-rescale.c | 1 + 2 files changed, 3 insertions(+) commit 1c796caff0dba1774f31899170ea18b32768af1f Author: Liam Beguin Date: Sat Jul 9 21:31:07 2022 -0400 iio: test: format: follow CONFIG_ naming convention The KUnit documentation indicates that all KUnit Kconfig entries must match CONFIG__KUNIT_TEST: where is the name of the test suite. Rename the IIO_TEST_FORMAT configuration accordingly. Signed-off-by: Liam Beguin Link: https://lore.kernel.org/r/20220710013109.3349104-4-liambeguin@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/test/Kconfig | 2 +- drivers/iio/test/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 520f94b6aab1740e88248c218542529a3fac06e8 Author: Liam Beguin Date: Sat Jul 9 21:31:06 2022 -0400 iio: test: format: add MODULE_* information In preparation for module support, add missing MODULE_* information. Signed-off-by: Liam Beguin Link: https://lore.kernel.org/r/20220710013109.3349104-3-liambeguin@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/test/iio-test-format.c | 4 ++++ 1 file changed, 4 insertions(+) commit 53a2a90d5271ed4718a70f8e13faaaf9f9ba9eb6 Author: Liam Beguin Date: Sat Jul 9 21:31:05 2022 -0400 iio: test: rescale: add MODULE_* information In preparation for module support, add missing MODULE_* information. Signed-off-by: Liam Beguin Link: https://lore.kernel.org/r/20220710013109.3349104-2-liambeguin@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/test/iio-test-rescale.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6edac2daa954e9da32f36a6c927a2d2bd956308b Author: Thorsten Scherer Date: Fri Jul 8 22:17:20 2022 +0200 iio: adc: ad7949: Fix error message Signed-off-by: Thorsten Scherer Reviewed-by: Liam Beguin Link: https://lore.kernel.org/r/20220708201720.16523-1-t.scherer@eckelmann.de Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7949.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e1d965cebe82e59e6a4c0cf115e5dbd7a9a0d9e5 Author: William Breathitt Gray Date: Thu Jul 7 13:21:25 2022 -0400 iio: dac: cio-dac: Cleanup indexing for DAC writes Simplify DAC write code by defining base member as u16 __iomem *; DAC registers are 16-bit so this allows us to index each DAC channel directly in a loop rather than calculating the offsets by multipling by 2 each time. Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/d9dab6696af7eabb2d46f5cbc7871329f499c1c9.1657213745.git.william.gray@linaro.org Signed-off-by: Jonathan Cameron drivers/iio/dac/cio-dac.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6cfd14c54b1f42f29097244c1b6208f8268d7d5b Author: William Breathitt Gray Date: Thu Jul 7 13:21:24 2022 -0400 iio: adc: stx104: Implement and utilize register structures Reduce magic numbers and improve code readability by implementing and utilizing named register data structures. Tested-by: Fred Eckert Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/8cb91d5b53e57b066120e42ea07000d6c7ef5543.1657213745.git.william.gray@linaro.org Signed-off-by: Jonathan Cameron drivers/iio/adc/stx104.c | 74 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 24 deletions(-) commit 98a30ae0b37cfa5f5b07db532c69d787780d6664 Author: Marcus Folkesson Date: Sat Jul 2 10:50:05 2022 +0200 iio: magnetometer: rm3100: do not explicity set INDIO_BUFFER_TRIGGERED mode The core sets INDIO_BUFFER_TRIGGERED as part of devm_iio_triggered_buffer_setup(). Signed-off-by: Marcus Folkesson Link: https://lore.kernel.org/r/20220702085005.31666-1-marcus.folkesson@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/rm3100-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1e252c5d2d8e54d60ba9e43b2ec9473f3a1c5b7 Author: Andy Shevchenko Date: Wed Jun 15 14:47:46 2022 +0300 iio: proximity: sx_common: Allow IIO core to take care of firmware node IIO core correctly will take care of firmware node if it's not set in the driver. Drop ACPI and OF specifics from the driver and allow IIO core to handle this. Signed-off-by: Andy Shevchenko Reviewed-by: Gwendal Grignou Link: https://lore.kernel.org/r/20220615114746.2767-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/proximity/sx_common.c | 3 --- 1 file changed, 3 deletions(-) commit 7008f35c4a7b25ea2e22bcaa14f21ae7aef49f2a Author: Andy Shevchenko Date: Wed Jun 15 14:47:45 2022 +0300 iio: proximity: sx_common: Don't use IIO device for properties It's not correct to use artificial device created by IIO core to retrieve device properties. Even ->get_default_reg() callback takes a simple struct device pointer which suggests it wants to operate on the real device. Correct this by replacing pointer to IIO device by a real device pointer in the caller of ->get_default_reg(). Signed-off-by: Andy Shevchenko Reviewed-by: Gwendal Grignou Link: https://lore.kernel.org/r/20220615114746.2767-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/proximity/sx_common.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit bc72d938c149197688ae3b3ecaa25d4aee8653cb Author: Dmitry Rokosov Date: Wed Jun 1 17:48:32 2022 +0000 iio: trigger: move trig->owner init to trigger allocate() stage To provide a new IIO trigger to the IIO core, usually driver executes the following pipeline: allocate()/register()/get(). Before, IIO core assigned trig->owner as a pointer to the module which registered this trigger at the register() stage. But actually the trigger object is owned by the module earlier, on the allocate() stage, when trigger object is successfully allocated for the driver. This patch moves trig->owner initialization from register() stage of trigger initialization pipeline to allocate() stage to eliminate all misunderstandings and time gaps between trigger object creation and owner acquiring. Signed-off-by: Dmitry Rokosov Link: https://lore.kernel.org/r/20220601174837.20292-1-ddrokosov@sberdevices.ru Signed-off-by: Jonathan Cameron drivers/iio/industrialio-trigger.c | 46 +++++++++++++++++++++----------------- include/linux/iio/iio.h | 9 +++++--- include/linux/iio/trigger.h | 21 +++++++++-------- 3 files changed, 41 insertions(+), 35 deletions(-) commit 1583984623cfd6dc025cf5b891f7cfaf36819213 Author: Johan Hovold Date: Fri Jul 15 18:53:44 2022 +0200 arm64: dts: qcom: sc8280xp: fix usb_1 ssphy irq Fix the usb_1 SS PHY interrupt, which was mistakingly replaced with one of the usb_2 PHY interrupts. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220715165344.28822-1-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39aa5646adae386719100e9e555a40e9db7bc4a2 Author: Manivannan Sadhasivam Date: Wed Jul 13 20:04:29 2022 +0530 arm64: dts: qcom: sc8280xp: Fix PMU interrupt PPI interrupt should be 7 for the PMU. Cc: Johan Hovold Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform") Reported-by: Steve Capper Signed-off-by: Manivannan Sadhasivam Reviewed-by: Andrew Halaney Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220713143429.22624-1-manivannan.sadhasivam@linaro.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1189a9cf144a745e4b98ff4f6cf5f79ab0b56cfb Author: Parikshit Pareek Date: Mon Jul 11 23:11:33 2022 +0530 arm64: dts: qcom: sc8280xp: fix the smmu interrupt values There has been wrong values introduced for context interrupt for smu node apps_smmu. Fix those ones with due correction. Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform") Signed-off-by: Parikshit Pareek Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220711174133.28882-1-quic_ppareek@quicinc.com arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58577966a42fc0b660b5e2c7c9e5a2241363ea83 Author: Sumit Garg Date: Mon Jul 11 14:00:38 2022 +0530 arm64: dts: qcom: qcs404: Fix incorrect USB2 PHYs assignment Currently the DT for QCS404 SoC has setup for 2 USB2 PHYs with one each assigned to USB3 controller and USB2 controller. This assignment is incorrect which only works by luck: as when each USB HCI comes up it configures the *other* controllers PHY which is enough to make them happy. If, for any reason, we were to disable one of the controllers then both would stop working. This was a difficult inconsistency to be caught which was found while trying to enable USB support in u-boot. So with all the required drivers ported to u-boot, I couldn't get the same USB storage device enumerated in u-boot which was being enumerated fine by the kernel. The root cause of the problem came out to be that I wasn't enabling USB2 PHY: "usb2_phy_prim" in u-boot. Then I realised that via simply disabling the same USB2 PHY currently assigned to USB2 host controller in the kernel disabled enumeration for USB3 host controller as well. So fix this inconsistency by correctly assigning USB2 PHYs. Fixes: 9375e7d719b3 ("arm64: dts: qcom: qcs404: Add USB devices and PHYs") Signed-off-by: Sumit Garg Reviewed-by: Daniel Thompson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220711083038.1518529-1-sumit.garg@linaro.org arch/arm64/boot/dts/qcom/qcs404.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f32894b8d8b4300693f1c3549cad544799ffeb3b Author: Dmitry Baryshkov Date: Sun Jul 10 11:41:30 2022 +0300 arm64: dts: qcom: sc7280: drop unused clocks from eDP node The eDP node includes two clocks which are used by the eDP PHY rather than eDP controller itself. Drop these clocks to remove extra difference between eDP and DP controllers. Suggested-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220710084133.30976-7-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sc7280.dtsi | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 97e5c82d4e170b815fe31fb91d6639be0f1b11aa Author: Dmitry Baryshkov Date: Sun Jul 10 11:41:29 2022 +0300 arm64: dts: qcom: sc7280: drop address/size-cells from eDP node Drop #address/#size-cells from eDP device node. For eDP the panels are not described directly under the controller node. They are either present under aux-bus child node, or they are declared separately (e.g. in a /soc node). Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220710084133.30976-6-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sc7280.dtsi | 3 --- 1 file changed, 3 deletions(-) commit 0f1e23651a0ab71c82ab098ecbfc9ee7a4d74ced Author: Dmitry Baryshkov Date: Sun Jul 10 11:41:28 2022 +0300 arm64: dts: qcom: sc7280: drop #clock-cells from displayport-controller Drop #clock-cells from DP device node. It is a leftover from the times before splitting the deviice into controller and PHY devices. Now the clocks are provided by the PHY, while the controller doesn't provide any clocks. Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220710084133.30976-5-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 3c14a456ee3e94d58682f6c7c77f8e71cbbcd8d8 Author: Dmitry Baryshkov Date: Sun Jul 10 11:41:27 2022 +0300 arm64: dts: qcom: sc7280: split register block for DP controller Follow the schema for the DP controller and declare 5 register regions instead of using a single region for all the registers. Note, this extends the dts by adding p1 region to the DP node (to be used for DP MST). Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220710084133.30976-4-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sc7280.dtsi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit ae0f7e1d97cb047ab5aeb03c8987671a2da93030 Author: Dmitry Baryshkov Date: Sun Jul 10 11:41:26 2022 +0300 arm64: dts: qcom: sc7180: drop #clock-cells from displayport-controller Drop #clock-cells from DP device node. It is a leftover from the times before splitting the device into controller and PHY devices. Now the clocks are provided by the PHY, while the controller doesn't provide any clocks. Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220710084133.30976-3-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sc7180.dtsi | 1 - 1 file changed, 1 deletion(-) commit b7b17c6bf3d18d12f198a5ab6ae2f093545de643 Author: Dmitry Baryshkov Date: Sun Jul 10 11:41:25 2022 +0300 arm64: dts: qcom: sc7180: split register block for DP controller Follow the schema for the DP controller and declare 5 register regions instead of using a single region for all the registers. Note, this extends the dts by adding p1 region to the DP node (to be used for DP MST). Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220710084133.30976-2-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sc7180.dtsi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 49ac5e0c3078012480749102dd3f405770a0e281 Author: Srinivasa Rao Mandadapu Date: Thu Jul 7 18:06:21 2022 +0530 arm64: dts: qcom: sc7280: Move wcd specific pin conf to common file Move wcd specific pin conf to common file to support various herbronie variant boards and to avoid duplicate nodes in dts files. Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1657197381-1271-1-git-send-email-quic_srivasam@quicinc.com .../dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi | 64 ++++++++++++++++++++++ arch/arm64/boot/dts/qcom/sc7280-herobrine-crd.dts | 61 --------------------- 2 files changed, 64 insertions(+), 61 deletions(-) commit 2aa54fa87cca1fa43870a9caf4fcce00eb087fa5 Author: Marijn Suijten Date: Sat May 7 17:36:27 2022 +0200 arm64: dts: qcom: msm8998: Make regulator voltages multiple of step-size These voltages are not a multiple of the given step-size 8000 (with base voltage 1664000) in pm8998_pldo, resulting in PLDO regulators l18 and l22 failing to validate and in turn not probing the rpm-pm8998-regulator driver: l18: unsupportable voltage constraints 2856000-2848000uV qcom_rpm_smd_regulator rpm-glink:rpm-requests:pm8998-regulators: l18: devm_regulator_register() failed, ret=-22 Round the voltages down for the sake of erring on the safe side, leaving a comment in place to document this discrepancy wrt downstream sources. Fixes: 390883af89d2 ("arm64: dts: qcom: msm8998: Introduce support for Sony Yoshino platform") Reported-by: Konrad Dybcio Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220507153627.1478268-1-marijn.suijten@somainline.org .../arm64/boot/dts/qcom/msm8998-sony-xperia-yoshino-poplar.dts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 7a9016dbc8760c4f8a610e5cb0ae0f815b0cca81 Author: Marijn Suijten Date: Sun May 8 00:46:45 2022 +0200 arm64: dts: qcom: sm6350: Replace literal rpmhpd indices with constants It seems the SM6350_CX definition was temporarily replaced with its literal value 0 in 1797e1c9a95c ("arm64: dts: qcom: sm6350: Add SDHCI1/2 nodes") to prevent a dependency on the qcom-rpmpd.h header patch being available prior to this DT patch being applied, similar to c23f1b77358c ("arm64: dts: qcom: sm6125: Avoid using missing SM6125_VDDCX"). However, unlike the revert of that in the sm6125 tree the next merge window around in a90b8adfa2dd ("Revert "arm64: dts: qcom: sm6125: Avoid using missing SM6125_VDDCX""), this has not yet happened for sm6350: replace them back now that the definitions are definitely available. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220507224645.2238421-1-marijn.suijten@somainline.org arch/arm64/boot/dts/qcom/sm6350.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b97e6ffa7c75ab30e1994997d44220fbe2799906 Author: Robert Marko Date: Fri Jul 8 15:38:46 2022 +0200 arm64: dts: qcom: ipq8074: add interrupt-parent to DTSI Add interrupt-parent to the SoC DTSI to avoid duplicating it in each board DTS file. Remove interrupt-parent from existing board DTS files. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220708133846.599735-2-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq8074-hk01.dts | 1 - arch/arm64/boot/dts/qcom/ipq8074-hk10.dtsi | 2 -- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 1 + 3 files changed, 1 insertion(+), 3 deletions(-) commit f32660459d12ad4ce54d0f0c226b3e1f34949a3a Author: Robert Marko Date: Fri Jul 8 15:38:45 2022 +0200 arm64: dts: qcom: ipq8074: add #size/address-cells to DTSI Add #size-cells and #address-cells to the SoC DTSI to avoid duplicating the same properties in board DTS files. Remove the mentioned properties from current board DTS files. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220708133846.599735-1-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq8074-hk01.dts | 2 -- arch/arm64/boot/dts/qcom/ipq8074-hk10.dtsi | 3 --- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 3 +++ 3 files changed, 3 insertions(+), 5 deletions(-) commit ce5cf986cdab1973df0042ac5b743d5df008c338 Author: Dmitry Baryshkov Date: Fri Jul 8 12:16:56 2022 +0300 arm64: dts: qcom: sm8250: rename DPU device node Rename DPU device node to display-controller@ae01000 to follow the DPU schema. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220708091656.2769390-3-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37e3558b79392ab864fe887b4593c5f737e063a5 Author: Dmitry Baryshkov Date: Fri Jul 8 12:16:55 2022 +0300 arm64: dts: qcom: sc7180: rename DPU device node Rename DPU device node to display-controller@ae01000 to follow the DPU schema. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220708091656.2769390-2-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d52eb6cc827d0f166c728a7577609de75b6b8b1 Author: Dmitry Baryshkov Date: Fri Jul 8 12:16:54 2022 +0300 arm64: dts: qcom: sdm845: rename DPU device node Rename DPU device node to display-controller@ae01000 to follow the DPU schema. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220708091656.2769390-1-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50ed9fffec3aed88bc1ffed277d291f81153bd5d Author: Robert Marko Date: Thu Jul 7 19:37:33 2022 +0200 arm64: dts: qcom: ipq8074: add APCS node APCS now has support for providing the APSS clocks as the child device for IPQ8074. So, add the required DT node for it as it will later be used as the CPU clocksource. Signed-off-by: Robert Marko Reviewed-by: Dmitry Baryshkov [bjorn: Sorted node based on address] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220707173733.404947-4-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq8074.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5bed21af0005cc7d8bb05d2c4a63afbcede23382 Author: Parikshit Pareek Date: Mon Jul 11 14:09:57 2022 +0530 soc: qcom: socinfo: Fix the id of SA8540P SoC Change the id of SA8540P to its correct value, i.e., 461. Also, map the id 460 to its correct values, i.e. SA8295P. Fixes: 76ee15ae1b13 ("soc: qcom: socinfo: Add some more PMICs and SoCs") Signed-off-by: Parikshit Pareek Reviewed-by: Eric Chanudet Tested-by: Eric Chanudet Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220711083957.12091-1-quic_ppareek@quicinc.com drivers/soc/qcom/socinfo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a6232f2aa99ce470799992e99e0012945bb5308f Author: Konrad Dybcio Date: Thu Jul 7 23:21:58 2022 +0200 soc: qcom: Make QCOM_RPMPD depend on PM QCOM_RPMPD requires PM_GENERIC_DOMAINS/_OF, which in turns requires CONFIG_PM. I forgot about the latter in my earlier patch (it's still in -next as of the time of committing, hence no Fixes: tag). Fix it. Reported-by: kernel test robot Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220707212158.32684-1-konrad.dybcio@somainline.org drivers/soc/qcom/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 17b5a7f65c7db1997252b8313dd03f15fbe1f54f Author: Alexander Stein Date: Mon Jun 13 14:35:29 2022 +0200 dt-bindings: iio: adc: Add imx6ul & imx6sx compatibles Both are already using the vf610 compatible. Signed-off-by: Alexander Stein Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220613123529.466528-1-alexander.stein@ew.tq-group.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit bbd5c96850d9de535a83a3a3842dec2169cb31d1 Author: Ziyang Xuan Date: Thu Jun 16 09:32:53 2022 +0800 scripts/coccinelle/free: add NULL test before dev_{put, hold} functions Since commit b37a46683739 ("netdevice: add the case if dev is NULL"), NULL check before dev_{put, hold} functions is not needed. Signed-off-by: Ziyang Xuan Signed-off-by: Julia Lawall scripts/coccinelle/free/ifnulldev_put.cocci | 54 +++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 8e54fe1b0f03a89925925ed98acd2219e0c956d4 Author: Steven Rostedt (Google) Date: Mon Jul 11 16:42:43 2022 -0400 coccinelle: Remove script that checks replacing 0/1 with false/true in functions returning bool There is nothing wrong with current code that returns 0 or 1 for a function returning bool. It is perfectly acceptable by the C standard. To avoid churn of unwanted patches that are constantly sent to maintainers who do not care about this change, remove the script that flags it as an issue. This issue is not worth the burden on maintainers to accept useless patches. Link: https://lore.kernel.org/all/20220705073822.7276-1-jiapeng.chong@linux.alibaba.com/ Link: https://lore.kernel.org/all/20220429075201.68581-1-jiapeng.chong@linux.alibaba.com/ Link: https://lore.kernel.org/all/1649236467-29390-1-git-send-email-baihaowen@meizu.com/ Link: https://lore.kernel.org/all/20220317014740.3138-1-jiapeng.chong@linux.alibaba.com/ Link: https://lore.kernel.org/all/190b5c2f2f2fb9cc775fce8daed72bf893be48a4.1642065293.git.davidcomponentone@gmail.com/ Link: https://lore.kernel.org/all/20211214113845.439392-1-deng.changcheng@zte.com.cn/ Link: https://lore.kernel.org/all/20210824065735.60660-1-deng.changcheng@zte.com.cn/ Link: https://lore.kernel.org/all/20210824064305.60081-1-deng.changcheng@zte.com.cn/ Link: https://lore.kernel.org/all/20210824062359.59474-1-deng.changcheng@zte.com.cn/ Cc: Rasmus Villemoes Cc: Julia Lawall Cc: Michal Marek Cc: Peter Zijlstra Signed-off-by: Steven Rostedt (Google) Signed-off-by: Julia Lawall Acked-by: Rasmus Villemoes Acked-by: Paul Gortmaker scripts/coccinelle/misc/boolreturn.cocci | 59 -------------------------------- 1 file changed, 59 deletions(-) commit 868941b14441282ba08761b770fc6cad69d5bdb7 Author: Jason A. Donenfeld Date: Wed Jun 29 15:07:00 2022 +0200 fs: remove no_llseek Now that all callers of ->llseek are going through vfs_llseek(), we don't gain anything by keeping no_llseek around. Nothing actually calls it and setting ->llseek to no_lseek is completely equivalent to leaving it NULL. Longer term (== by the end of merge window) we want to remove all such intializations. To simplify the merge window this commit does *not* touch initializers - it only defines no_llseek as NULL (and simplifies the tests on file opening). At -rc1 we'll need do a mechanical removal of no_llseek - git grep -l -w no_llseek | grep -v porting.rst | while read i; do sed -i '/\/d' $i done would do it. Signed-off-by: Jason A. Donenfeld Signed-off-by: Al Viro Documentation/filesystems/porting.rst | 8 ++++++++ drivers/gpu/drm/drm_file.c | 3 +-- fs/file_table.c | 2 +- fs/open.c | 2 -- fs/read_write.c | 6 ------ include/linux/fs.h | 2 +- kernel/bpf/bpf_iter.c | 3 +-- 7 files changed, 12 insertions(+), 14 deletions(-) commit 97ef77c52b789ec1411d360ed99dca1efe4b2c81 Author: Jason A. Donenfeld Date: Wed Jun 29 15:06:58 2022 +0200 fs: check FMODE_LSEEK to control internal pipe splicing The original direct splicing mechanism from Jens required the input to be a regular file because it was avoiding the special socket case. It also recognized blkdevs as being close enough to a regular file. But it forgot about chardevs, which behave the same way and work fine here. This is an okayish heuristic, but it doesn't totally work. For example, a few chardevs should be spliceable here. And a few regular files shouldn't. This patch fixes this by instead checking whether FMODE_LSEEK is set, which represents decently enough what we need rewinding for when splicing to internal pipes. Fixes: b92ce5589374 ("[PATCH] splice: add direct fd <-> fd splicing support") Cc: Jens Axboe Signed-off-by: Jason A. Donenfeld Signed-off-by: Al Viro fs/splice.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 54ef7a47f67de9e87022a5310d1e8332af3e2696 Author: Jason A. Donenfeld Date: Wed Jun 29 15:07:02 2022 +0200 vfio: do not set FMODE_LSEEK flag This file does not support llseek, so don't set the flag advertising it. Acked-by: Alex Williamson Signed-off-by: Jason A. Donenfeld Signed-off-by: Al Viro drivers/vfio/vfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9eb2d427c1c428e4f4e29f1e635b9a83236c015 Author: Jason A. Donenfeld Date: Wed Jun 29 15:07:01 2022 +0200 dma-buf: remove useless FMODE_LSEEK flag This is already set by anon_inode_getfile(), since dma_buf_fops has non-NULL ->llseek, so we don't need to set it here too. Acked-by: Daniel Vetter Acked-by: Sumit Semwal Signed-off-by: Jason A. Donenfeld Signed-off-by: Al Viro drivers/dma-buf/dma-buf.c | 1 - 1 file changed, 1 deletion(-) commit 4e3299eaddffd9d7d5b8bae28ad700bb775f02d0 Author: Jason A. Donenfeld Date: Wed Jun 29 15:06:59 2022 +0200 fs: do not compare against ->llseek Now vfs_llseek() can simply check for FMODE_LSEEK; if it's set, we know that ->llseek() won't be NULL and if it's not we should just fail with -ESPIPE. A couple of other places where we used to check for special values of ->llseek() (somewhat inconsistently) switched to checking FMODE_LSEEK. Signed-off-by: Jason A. Donenfeld Signed-off-by: Al Viro fs/coredump.c | 4 ++-- fs/overlayfs/copy_up.c | 3 +-- fs/read_write.c | 11 +++-------- 3 files changed, 6 insertions(+), 12 deletions(-) commit e7478158e1378325907edfdd960eca98a1be405b Author: Jason A. Donenfeld Date: Wed Jun 29 15:06:57 2022 +0200 fs: clear or set FMODE_LSEEK based on llseek function Pipe-like behaviour on llseek(2) (i.e. unconditionally failing with -ESPIPE) can be expresses in 3 ways: 1) ->llseek set to NULL in file_operations 2) ->llseek set to no_llseek in file_operations 3) FMODE_LSEEK *not* set in ->f_mode. Enforce (3) in cases (1) and (2); that will allow to simplify the checks and eventually get rid of no_llseek boilerplate. Signed-off-by: Jason A. Donenfeld Signed-off-by: Al Viro fs/file_table.c | 2 ++ fs/open.c | 4 ++++ 2 files changed, 6 insertions(+) commit 1f438d2318f4b8012b3153130cf6b0259c76c8d6 Author: Vadim Pasternak Date: Wed Jul 13 12:11:36 2022 +0300 i2c: mlxcpld: Add callback to notify probing completion Add notification to inform caller that driver probing has been completed. It allows to user, invoked platform device registration for "i2c-mlxcpld" driver, to be notified that bus adapter is available, and thus some devices could be connected to this bus. Signed-off-by: Vadim Pasternak Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mlxcpld.c | 4 ++++ 1 file changed, 4 insertions(+) commit f2450f8a2c1ec3e88d6674f747b913aa5f21fa59 Author: Ming Lei Date: Sat Jul 16 17:53:44 2022 +0800 ublk_drv: fix build warning with -Wmaybe-uninitialized and one sparse warning After applying -Wmaybe-uninitialized manually, two build warnings are triggered: drivers/block/ublk_drv.c:940:11: warning: ‘io’ may be used uninitialized [-Wmaybe-uninitialized] 940 | io->flags &= ~UBLK_IO_FLAG_ACTIVE; drivers/block/ublk_drv.c: In function ‘ublk_ctrl_uring_cmd’: drivers/block/ublk_drv.c:1531:9: warning: ‘ret’ may be used uninitialized [-Wmaybe-uninitialized] Fix the 1st one by removing 'io->flags &= ~UBLK_IO_FLAG_ACTIVE;' which isn't needed since the function always return successfully after setting this flag. Fix the 2nd one by always initializing 'ret'. Also fix another sparse warning of 'sparse: sparse: incorrect type in return expression' by changing return type of ublk_setup_iod(). Reported-by: kernel test robot Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20220716095344.222674-1-ming.lei@redhat.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9ae551ded5ba55f96a83cd0811f7ef8c2f329d0c Author: Andy Shevchenko Date: Fri Jul 8 15:09:58 2022 +0300 i2c: scmi: Replace open coded device_get_match_data() Replace open coded device_get_match_data() in acpi_smbus_cmi_add(). Signed-off-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-scmi.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit d4d2f170dd3313f55ec83ef60b4508ffcbc59695 Author: Alain Volmat Date: Thu Jul 7 09:44:02 2022 +0200 i2c: stm32: add support for the STM32MP13 soc Add a new compatible for the stm32mp13. Fast Mode Plus control register address differ from the one for STM32MP15. Signed-off-by: Alain Volmat Reviewed-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-stm32f7.c | 7 +++++++ 1 file changed, 7 insertions(+) commit c80cb510104ca9ebf5619b7ed5cc500ceaa46749 Author: Alain Volmat Date: Thu Jul 7 09:44:01 2022 +0200 dt-bindings: i2c: st,stm32-i2c: add entry for stm32mp13 Add the new compatible for the stm32mp13. Signed-off-by: Alain Volmat Acked-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 51ff93923e21ed2862e83f208706e3ca31d6f409 Author: Michael Walle Date: Wed Jul 6 17:15:53 2022 +0200 pinctrl: ocelot: Make irq_chip immutable Since recently, the kernel is nagging about mutable irq_chips: [ 2.593426] gpio gpiochip0: (ocelot-gpio): not an immutable chip, please consider fixing it! Make it const, flag it as IRQCHIP_IMMUTABLE, add the new helper functions and call the appropriate gpiolib functions. Signed-off-by: Michael Walle Acked-by: Linus Walleij Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220706151553.1580790-2-michael@walle.cc drivers/pinctrl/pinctrl-ocelot.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 1fef11a2f4660a48ed1a655d55226d930cb8ba13 Author: Michael Grzeschik Date: Thu Jun 16 20:54:54 2022 +0100 media: uvcvideo: Remove unneeded goto The goto statement in uvc_v4l2_try_format can simply be replaced by an direct return. There is no further user of the label, so remove it. Signed-off-by: Michael Grzeschik Reviewed-by: Paul Elder Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_v4l2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit eff1e24c8e674ba531d204505d9697c543a78772 Author: Ricardo Ribalda Date: Tue Jun 7 14:44:04 2022 +0100 media: uvcvideo: Limit power line control for Acer EasyCamera The device does not implement the power line control correctly. Add a corresponding control mapping override. Bus 001 Device 003: ID 5986:1172 Acer, Inc EasyCamera Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x5986 Acer, Inc idProduct 0x1172 bcdDevice 56.04 iManufacturer 3 Bison iProduct 1 EasyCamera iSerial 2 bNumConfigurations 1 Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_driver.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 95f03d97347851fad9dc0a664a3fb65ad2116372 Author: Ricardo Ribalda Date: Tue Jun 7 14:44:03 2022 +0100 media: uvcvideo: Limit power line control for Quanta cameras Two more cameras do not implement the power line control correctly. Add a corresponding control mapping override. Bus 001 Device 003: ID 0408:4034 Quanta Computer, Inc. ACER HD User Facing Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.01 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x0408 Quanta Computer, Inc. idProduct 0x4034 bcdDevice 0.01 iManufacturer 1 Quanta iProduct 2 ACER HD User Facing iSerial 3 01.00.00 bNumConfigurations 1 Bus 001 Device 003: ID 0408:4030 Quanta Computer, Inc. HD User Facing Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.01 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x0408 Quanta Computer, Inc. idProduct 0x4030 bcdDevice 0.02 iManufacturer 1 Quanta iProduct 2 HD User Facing iSerial 3 01.00.00 bNumConfigurations 1 Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_driver.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 332a2235c4198037701a6f7cdfc9aff09c791776 Author: Ricardo Ribalda Date: Tue Jun 7 14:44:02 2022 +0100 media: uvcvideo: Limit power line control for Chicony Easycamera Another Chicony camera device does not implement the power line control correctly. Add a corresponding control mapping override. Bus 001 Device 003: ID 04f2:b5eb Chicony Electronics Co., Ltd EasyCamera Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x04f2 Chicony Electronics Co., Ltd idProduct 0xb5eb bcdDevice 90.45 iManufacturer 3 Chicony Electronics Co.,Ltd. iProduct 1 EasyCamera iSerial 2 0001 bNumConfigurations 1 Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_driver.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9f22f959516f9dd34446ccd7e34e4144ec79eeb5 Author: Ricardo Ribalda Date: Tue Jun 7 14:44:01 2022 +0100 media: uvcvideo: Limit power line control for Chicony Easycamera Two different Easycamera devices do not implement the power line control correctly. Add a corresponding control mapping override. Bus 001 Device 003: ID 04f2:b6ba Chicony Electronics Co., Ltd EasyCamera Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x04f2 Chicony Electronics Co., Ltd idProduct 0xb6ba bcdDevice 10.70 iManufacturer 3 Chicony Electronics Co.,Ltd. iProduct 1 EasyCamera iSerial 2 0001 bNumConfigurations 1 Bus 001 Device 003: ID 04f2:b746 Chicony Electronics Co., Ltd EasyCamera Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x04f2 Chicony Electronics Co., Ltd idProduct 0xb746 bcdDevice 97.57 iManufacturer 3 Chicony Electronics Co.,Ltd. iProduct 1 EasyCamera iSerial 2 0001 bNumConfigurations 1 Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_driver.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 382075604a688b926aa90de7c857d58c53cd4854 Author: Ricardo Ribalda Date: Tue Jun 7 14:44:00 2022 +0100 media: uvcvideo: Limit power line control for Quanta UVC Webcam The device does not implement the power line control correctly. Add a corresponding control mapping override. Bus 001 Device 003: ID 0408:3090 Quanta Computer, Inc. USB2.0 HD UVC WebCam Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x0408 Quanta Computer, Inc. idProduct 0x3090 bcdDevice 0.04 iManufacturer 3 Quanta iProduct 1 USB2.0 HD UVC WebCam iSerial 2 0x0001 bNumConfigurations 1 Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_driver.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 86f7ef77315687df144042762325c53d9a3a28c9 Author: Ricardo Ribalda Date: Tue Jun 7 14:43:59 2022 +0100 media: uvcvideo: Add support for per-device control mapping overrides Some devices do not implement all their controls in a way that complies with the UVC specification. This is for instance the case for several devices that do not support the disabled mode for the power line frequency control. Add a mechanism to allow per-device control mapping overrides to avoid errors when accessing non-compliant controls. Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_ctrl.c | 27 +++++++++++++++++++++++++-- drivers/media/usb/uvc/uvcvideo.h | 1 + 2 files changed, 26 insertions(+), 2 deletions(-) commit 710871163510cd78948a095e929e28c1434b4506 Author: Ricardo Ribalda Date: Tue Jun 7 14:43:58 2022 +0100 media: uvcvideo: Add missing value for power_line_frequency UVC 1.5 class defines 4 values for this control on: 4.2.2.3.6 Power Line Frequency Control Add the missing value when the UVC version is 1.5. Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_ctrl.c | 56 ++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 11 deletions(-) commit ebd6bae3b7e435f20cda058b91430e31e61f6564 Author: Laurent Pinchart Date: Wed Jun 8 18:38:52 2022 +0100 media: uvcvideo: Replace broken URL The link to the web page that explains continued fractions is broken. Replace it with a link to the corresponding Wikipedia page. Reported-by: Kieran Bingham Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 699b9a86a3f03ad9366b716be26e56d690faca84 Author: Laurent Pinchart Date: Wed Jun 8 18:38:52 2022 +0100 media: uvcvideo: Fix comment blocks style The uvcvideo driver historically uses the /* Comment * style */ for multi-line block comments, which is frowned upon. Patches for the driver are required to use the more standard /* * Comment * style */ style. This result in inconsistencies. Fix it by converting all remaining instances of the old style. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_ctrl.c | 33 ++++++++----- drivers/media/usb/uvc/uvc_driver.c | 54 ++++++++++++++------- drivers/media/usb/uvc/uvc_isight.c | 13 ++++-- drivers/media/usb/uvc/uvc_queue.c | 6 ++- drivers/media/usb/uvc/uvc_status.c | 6 +-- drivers/media/usb/uvc/uvc_v4l2.c | 15 ++++-- drivers/media/usb/uvc/uvc_video.c | 96 +++++++++++++++++++++++++------------- drivers/media/usb/uvc/uvcvideo.h | 15 +++--- 8 files changed, 156 insertions(+), 82 deletions(-) commit edbb6e251ebd0015b1c4600ced00e9d83a0f8dc4 Author: Laurent Pinchart Date: Sun Apr 11 20:10:22 2021 +0100 media: dt-bindings: media: nxp,imx-mipi-csi2: i.MX8MP support The CSIS CSI-2 receiver in the i.MX8MP seems to be identical to the version present in the i.MX8MM. Add a device-specific compatible string, with a fallback to the i.MX8MM compatible. Signed-off-by: Laurent Pinchart Acked-by: Krzysztof Kozlowski Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/nxp,imx-mipi-csi2.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit d200de90de2a00169254a874569e9ab225141e2e Author: Laurent Pinchart Date: Tue Feb 22 09:50:25 2022 +0000 media: imx: imx-mipi-csis: Implement the .get_frame_desc() operation The CSIS is connected to its sink through an SoC-specific gasket that needs to be configured. Depending on the platform, the gasket configuration requires knowing the CSI-2 DT. To provide the needed information, implement the .get_frame_desc() operation. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/nxp/imx-mipi-csis.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit a1c046d3228b6a89963f9ef55d38770ad612954d Author: Laurent Pinchart Date: Wed Apr 7 23:54:07 2021 +0100 media: imx: imx-mipi-csis: Add version register Register at offset 0x00 isn't documented, but the NXP BSP imx8-mipi-csi2-sam driver defines it as a version register. Tests on i.MX7D and i.MX8MP have confirmed this, with values matching the version of the IP core specified in the respective reference manuals. This commit doesn't make use of the version register at runtime as the compatible strings are enough to identify the IP core version. Nonetheless, capturing the information in register definitions that don't affect the code negatively is useful for future development. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/nxp/imx-mipi-csis.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0edd95f25e31d51cceb17945e2ad801eb481b1a1 Author: Laurent Pinchart Date: Mon Mar 21 07:58:14 2022 +0000 media: imx: imx-mipi-csis: Set the subdev fwnode for endpoint matching Endpoint matching is preferred over device matching with the async notifier framework. Set the fwnode in the v4l2_subdev for the CSIS to the endpoint connected to the next device. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/nxp/imx-mipi-csis.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 8da572c52a9be6d006bae290339c629fc6501910 Author: Eric Biggers Date: Thu Jun 9 17:06:16 2022 -0700 fs-verity: mention btrfs support btrfs supports fs-verity since Linux v5.15. Document this. Signed-off-by: Eric Biggers Acked-by: David Sterba Link: https://lore.kernel.org/r/20220610000616.18225-1-ebiggers@kernel.org Documentation/filesystems/fsverity.rst | 53 +++++++++++++++++++--------------- fs/verity/Kconfig | 10 +++---- 2 files changed, 35 insertions(+), 28 deletions(-) commit ceefa81e6e69b020997205e5c30a42d43aa5ae63 Author: Thomas Bogendoerfer Date: Fri Jul 15 16:03:22 2022 +0200 serial: remove VR41XX serial driver Commit d3164e2f3b0a ("MIPS: Remove VR41xx support") removed support for MIPS VR41xx platform, so remove exclusive drivers for this platform, too. Signed-off-by: Thomas Bogendoerfer Link: https://lore.kernel.org/r/20220715140322.135825-1-tsbogend@alpha.franken.de Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/Kconfig | 17 - drivers/tty/serial/Makefile | 1 - drivers/tty/serial/vr41xx_siu.c | 932 --------------------------------------- include/uapi/linux/serial_core.h | 4 - 4 files changed, 954 deletions(-) commit e0e1824bf69e9a342eb4854cf10ce2ba4c840e36 Merge: 6598a382bd34 3a06ed80265f Author: Greg Kroah-Hartman Date: Sat Jul 16 07:24:37 2022 +0200 Merge tag 'extcon-next-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update extcon next for v5.20 Detailed description for this pull request: 1. Add new connector type of both EXTCON_DISP_CVBS and EXTCON_DISP_EDP - Add both EXTCON_DISP_CVBS for Composite Video Broadcast Signal[1] and EXTCON_DISP_EDP for Embedded Display Port[2]. [1] https://en.wikipedia.org/wiki/Composite_video [2] https://en.wikipedia.org/wiki/DisplayPort#eDP 2. Fix the minor issues of extcon provider driver - Drop unused remove function on extcon-fsa9480.c - Remove extraneous space before a debug message on extcon-palmas.c - Remove duplicate word in the comment - Drop useless mask_invert flag on irqchip on extcon-sm5502.c - Drop useless mask_invert flag on irqchip on extcon-rt8973a.c * tag 'extcon-next-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: extcon: Add EXTCON_DISP_CVBS and EXTCON_DISP_EDP extcon: rt8973a: Drop useless mask_invert flag on irqchip extcon: sm5502: Drop useless mask_invert flag on irqchip extcon: Drop unexpected word "the" in the comments extcon: Remove extraneous space before a debug message extcon: fsa9480: Drop no-op remove function commit 6598a382bd34cce713d2dbe2aadd9496e7a7b643 Merge: a8755e9bdd6a 009c963eefa0 Author: Greg Kroah-Hartman Date: Sat Jul 16 07:22:21 2022 +0200 Merge tag 'icc-5.20-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next Georgi writes: interconnect changes for 5.20 Here are the interconnect changes for the 5.20-rc1 merge window consisting of two new drivers, misc driver improvements and new device managed API. Core change: - Add device managed bulk API Driver changes: - New driver for NXP i.MX8MP platforms - New driver for Qualcomm SM6350 platforms - Multiple bucket support for Qualcomm RPM-based drivers. Signed-off-by: Georgi Djakov * tag 'icc-5.20-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: PM / devfreq: imx: Register i.MX8MP interconnect device interconnect: imx: Add platform driver for imx8mp interconnect: imx: configure NoC mode/prioriry/ext_control interconnect: imx: introduce imx_icc_provider interconnect: imx: set src node interconnect: imx: fix max_node_id interconnect: qcom: icc-rpm: Set bandwidth and clock for bucket values interconnect: qcom: icc-rpm: Support multiple buckets interconnect: qcom: icc-rpm: Change to use qcom_icc_xlate_extended() interconnect: qcom: Move qcom_icc_xlate_extended() to a common file dt-bindings: interconnect: Update property for icc-rpm path tag interconnect: icc-rpm: Set destination bandwidth as well as source bandwidth interconnect: qcom: msm8939: Use icc_sync_state interconnect: add device managed bulk API dt-bindings: interconnect: add fsl,imx8mp.h dt-bindings: interconnect: imx8m: Add bindings for imx8mp noc interconnect: qcom: Add SM6350 driver support dt-bindings: interconnect: Add Qualcomm SM6350 NoC support dt-bindings: interconnect: qcom: Split out rpmh-common bindings interconnect: qcom: icc-rpmh: Support child NoC device probe commit 2acd1022549e210edc4cfc9fc65b07b88751f0d9 Merge: 459f326e995c 0ea7b0a454ca Author: Jakub Kicinski Date: Fri Jul 15 18:55:54 2022 -0700 Merge branch 'net-ipv4-ipv6-new-option-to-accept-garp-untracked-na-only-if-in-network' Jaehee Park says: ==================== net: ipv4/ipv6: new option to accept garp/untracked na only if in-network The first patch adds an option to learn a neighbor from garp only if the source ip is in the same subnet as an address configured on the interface that received the garp message. The option has been added to arp_accept in ipv4. The same feature has been added to ndisc (patch 2). For ipv6, the subnet filtering knob is an extension of the accept_untracked_na option introduced in these patches: https://lore.kernel.org/all/642672cb-8b11-c78f-8975-f287ece9e89e@gmail.com/t/ https://lore.kernel.org/netdev/20220530101414.65439-1-aajith@arista.com/T/ The third patch contains selftests for testing the different options for accepting arp and neighbor advertisements. ==================== Link: https://lore.kernel.org/r/cover.1657755188.git.jhpark1013@gmail.com Signed-off-by: Jakub Kicinski commit 0ea7b0a454ca1839acddc37c4cf802f0e0d5fb5f Author: Jaehee Park Date: Wed Jul 13 16:40:49 2022 -0700 selftests: net: arp_ndisc_untracked_subnets: test for arp_accept and accept_untracked_na ipv4 arp_accept has a new option '2' to create new neighbor entries only if the src ip is in the same subnet as an address configured on the interface that received the garp message. This selftest tests all options in arp_accept. ipv6 has a sysctl endpoint, accept_untracked_na, that defines the behavior for accepting untracked neighbor advertisements. A new option similar to that of arp_accept for learning only from the same subnet is added to accept_untracked_na. This selftest tests this new feature. Signed-off-by: Jaehee Park Suggested-by: Roopa Prabhu Signed-off-by: Jakub Kicinski tools/testing/selftests/net/Makefile | 1 + .../selftests/net/arp_ndisc_untracked_subnets.sh | 308 +++++++++++++++++++++ 2 files changed, 309 insertions(+) commit aaa5f515b16b6b3e137779ffb4c9558bb58c1e75 Author: Jaehee Park Date: Wed Jul 13 16:40:48 2022 -0700 net: ipv6: new accept_untracked_na option to accept na only if in-network This patch adds a third knob, '2', which extends the accept_untracked_na option to learn a neighbor only if the src ip is in the same subnet as an address configured on the interface that received the neighbor advertisement. This is similar to the arp_accept configuration for ipv4. Signed-off-by: Jaehee Park Suggested-by: Roopa Prabhu Signed-off-by: Jakub Kicinski Documentation/networking/ip-sysctl.rst | 51 ++++++++++++++++++++-------------- net/ipv6/addrconf.c | 2 +- net/ipv6/ndisc.c | 29 +++++++++++++++---- 3 files changed, 55 insertions(+), 27 deletions(-) commit e68c5dcf0aacc48a23cedcb3ce81b8c60837f48c Author: Jaehee Park Date: Wed Jul 13 16:40:47 2022 -0700 net: ipv4: new arp_accept option to accept garp only if in-network In many deployments, we want the option to not learn a neighbor from garp if the src ip is not in the same subnet as an address configured on the interface that received the garp message. net.ipv4.arp_accept sysctl is currently used to control creation of a neigh from a received garp packet. This patch adds a new option '2' to net.ipv4.arp_accept which extends option '1' by including the subnet check. Signed-off-by: Jaehee Park Suggested-by: Roopa Prabhu Signed-off-by: Jakub Kicinski Documentation/networking/ip-sysctl.rst | 9 ++++++--- include/linux/inetdevice.h | 2 +- net/ipv4/arp.c | 24 ++++++++++++++++++++++-- 3 files changed, 29 insertions(+), 6 deletions(-) commit 278150b2151ee77ab66204ae2e53a3f94cb4b015 Author: Claudiu Beznea Date: Thu Jun 9 12:40:41 2022 +0300 clocksource/drivers/timer-microchip-pit64b: Fix compilation warnings Fix the following compilation warnings: timer-microchip-pit64b.c:68: warning: cannot understand function prototype: 'struct mchp_pit64b_clkevt ' timer-microchip-pit64b.c:82: warning: cannot understand function prototype: 'struct mchp_pit64b_clksrc ' timer-microchip-pit64b.c:283: warning: Function parameter or member 'timer' not described in 'mchp_pit64b_init_mode' timer-microchip-pit64b.c:283: warning: Function parameter or member 'max_rate' not described in 'mchp_pit64b_init_mode' Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220609094041.1796372-4-claudiu.beznea@microchip.com Signed-off-by: Daniel Lezcano drivers/clocksource/timer-microchip-pit64b.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b02180e899c9e04ba6efda7bdf36d9ad028c9f4f Author: Claudiu Beznea Date: Thu Jun 9 12:40:40 2022 +0300 clocksource/drivers/timer-microchip-pit64b: Use mchp_pit64b_{suspend, resume} Use mchp_pit64b_suspend() and mchp_pit64b_resume() to disable or enable timers clocks on init and remove specific clk_prepare_{disable, enable} calls. This is ok also for clockevent timer as proper clock enable, disable is done on .set_state_oneshot, .set_state_periodic, .set_state_shutdown calls. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220609094041.1796372-3-claudiu.beznea@microchip.com Signed-off-by: Daniel Lezcano drivers/clocksource/timer-microchip-pit64b.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) commit 2c9c4c9e543de46a8031d5300e3036a3a89bad28 Author: Claudiu Beznea Date: Thu Jun 9 12:40:39 2022 +0300 clocksource/drivers/timer-microchip-pit64b: Remove suspend/resume ops for ce Remove suspend and resume ops for clockevent and add set_state_oneshot() instead. Along with this mchp_pit64b_{suspend, resume}() were called on proper function to disable/enable clocks. This will allow disabling clocks for clockevent in case it is not selected as active clockevent. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220609094041.1796372-2-claudiu.beznea@microchip.com Signed-off-by: Daniel Lezcano drivers/clocksource/timer-microchip-pit64b.c | 30 +++++++++++++++------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 5b2ca9bc3f1bb1a65e8a2c636047ea51aaa924b1 Author: Wolfram Sang Date: Tue Jul 5 21:55:20 2022 +0200 thermal/drivers/rcar_gen3_thermal: Add r8a779f0 support Add support for R-Car S4. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20220705195520.2581-1-wsa+renesas@sang-engineering.com Signed-off-by: Daniel Lezcano drivers/thermal/rcar_gen3_thermal.c | 4 ++++ 1 file changed, 4 insertions(+) commit 327e93cf9a59b0d04eb3a31a7fdbf0f11cf13ecb Author: AngeloGioacchino Del Regno Date: Mon Jun 13 15:38:19 2022 +0200 clocksource/drivers/timer-mediatek: Implement CPUXGPT timers Some MediaTek platforms with a buggy TrustZone ATF firmware will not initialize the AArch64 System Timer correctly: in these cases, the System Timer address is correctly programmed, as well as the CNTFRQ_EL0 register (reading 13MHz, as it should be), but the assigned hardware timers are never started before (or after) booting Linux. In this condition, any call to function get_cycles() will be returning zero, as CNTVCT_EL0 will always read zero. One common critical symptom of that is trying to use the udelay() function (calling __delay()), which executes the following loop: start = get_cycles(); while ((get_cycles() - start) < cycles) cpu_relax(); which, when CNTVCT_EL0 always reads zero, translates to: while((0 - 0) < 0) ==> while(0 < 0) ... generating an infinite loop, even though zero is never less than zero, but always equal to it (this has to be researched, but it's out of the scope of this commit). To fix this issue on the affected MediaTek platforms, the solution is to simply start the timers that are designed to be System Timer(s). These timers, downstream, are called "CPUXGPT" and there is one timer per CPU core; luckily, it is not necessary to set a start bit on each CPUX General Purpose Timer, but it's conveniently enough to: - Set the clock divider (input = 26MHz, divider = 2, output = 13MHz); - Set the ENABLE bit on a global register (starts all CPUX timers). The only small hurdle with this setup is that it's all done through the MCUSYS wrapper, where it is needed, for each read or write, to select a register address (by writing it to an index register) and then to perform any R/W on a "CON" register. For example, writing "0x1" to the CPUXGPT register offset 0x4: - Write 0x4 to mcusys INDEX register - Write 0x1 to mcusys CON register Reading from CPUXGPT register offset 0x4: - Write 0x4 to mcusys INDEX register - Read mcusys CON register. Finally, starting this timer makes platforms affected by this issue to work correctly. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20220613133819.35318-3-angelogioacchino.delregno@collabora.com Signed-off-by: Daniel Lezcano drivers/clocksource/timer-mediatek.c | 114 +++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) commit 13b917a585c214c49cfb757fa4d5d6203e00159c Author: AngeloGioacchino Del Regno Date: Mon Jun 13 15:38:18 2022 +0200 dt-bindings: timer: mediatek: Add CPUX System Timer and MT6795 compatible Document the "CPUXGPT" CPU General Purpose Timer, used as ARM/ARM64 System Timer on MediaTek platforms and add the MT6795 compatible for it. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20220613133819.35318-2-angelogioacchino.delregno@collabora.com Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 07385a6055a8649593052703b1bfd6aef49db02a Author: Kartik Date: Mon Jul 4 13:43:39 2022 +0530 clocksource/drivers/timer-tegra186: Add support for Tegra234 SoC The timer IP block present on Tegra234 SoC supports watchdog timer functionality that can be used to recover from system hangs. The watchdog timer uses a timer in the background for countdown. Signed-off-by: Kartik Acked-by: Thierry Reding Link: https://lore.kernel.org/r/1656922422-25823-4-git-send-email-kkartik@nvidia.com Signed-off-by: Daniel Lezcano drivers/clocksource/timer-tegra186.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 42cee19a9f839f2d60f1cd237d6905d8649127aa Author: Thierry Reding Date: Mon Jul 4 13:43:38 2022 +0530 clocksource: Add Tegra186 timers support Currently this only supports a single watchdog, which uses a timer in the background for countdown. Eventually the timers could be used for various time-keeping tasks, but by default the architected timer will already provide that functionality. Signed-off-by: Thierry Reding Signed-off-by: Kartik Acked-by: Thierry Reding Link: https://lore.kernel.org/r/1656922422-25823-3-git-send-email-kkartik@nvidia.com Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 8 + drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-tegra186.c | 508 +++++++++++++++++++++++++++++++++++ 3 files changed, 517 insertions(+) commit 6f6f3e313f39f91ed5ffd59bfaf29748ced9d24c Author: Randy Dunlap Date: Thu Jul 14 18:58:52 2022 -0700 clocksource/drivers/arm_global_timer: Fix Kconfig "its" grammar Use the possessive "its" instead of the contraction "it's" where appropriate. Signed-off-by: Randy Dunlap Cc: Patrice Chotard Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220715015852.12523-1-rdunlap@infradead.org Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa7aeee169480e98cf41d83c01290a37e569be6d Author: Tyler Hicks Date: Sun Jul 10 09:14:02 2022 -0500 net/9p: Initialize the iounit field during fid creation Ensure that the fid's iounit field is set to zero when a new fid is created. Certain 9P operations, such as OPEN and CREATE, allow the server to reply with an iounit size which the client code assigns to the p9_fid struct shortly after the fid is created by p9_fid_create(). On the other hand, an XATTRWALK operation doesn't allow for the server to specify an iounit value. The iounit field of the newly allocated p9_fid struct remained uninitialized in that case. Depending on allocation patterns, the iounit value could have been something reasonable that was carried over from previously freed fids or, in the worst case, could have been arbitrary values from non-fid related usages of the memory location. The bug was detected in the Windows Subsystem for Linux 2 (WSL2) kernel after the uninitialized iounit field resulted in the typical sequence of two getxattr(2) syscalls, one to get the size of an xattr and another after allocating a sufficiently sized buffer to fit the xattr value, to hit an unexpected ERANGE error in the second call to getxattr(2). An uninitialized iounit field would sometimes force rsize to be smaller than the xattr value size in p9_client_read_once() and the 9P server in WSL refused to chunk up the READ on the attr_fid and, instead, returned ERANGE to the client. The virtfs server in QEMU seems happy to chunk up the READ and this problem goes undetected there. Link: https://lkml.kernel.org/r/20220710141402.803295-1-tyhicks@linux.microsoft.com Fixes: ebf46264a004 ("fs/9p: Add support user. xattr") Cc: stable@vger.kernel.org Signed-off-by: Tyler Hicks Reviewed-by: Christian Schoenebeck Signed-off-by: Dominique Martinet net/9p/client.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 76cf72fe5ab6b5fdbab911a800b386bc84204ead Author: Rafał Miłecki Date: Wed Jul 13 22:03:50 2022 +0200 dt-bindings: arm: Add Asus GT-AX6000 based on BCM4912 It's a home router, the first BCM4912 SoC based public device. Signed-off-by: Rafał Miłecki Acked-by: William Zhang Link: https://lore.kernel.org/r/20220713200351.28526-1-zajec5@gmail.com Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 1 + 1 file changed, 1 insertion(+) commit 3534e5a5ed2997ca1b00f44a0378a075bd05e8a3 Author: Luo Meng Date: Thu Jul 14 19:28:25 2022 +0800 dm thin: fix use-after-free crash in dm_sm_register_threshold_callback Fault inject on pool metadata device reports: BUG: KASAN: use-after-free in dm_pool_register_metadata_threshold+0x40/0x80 Read of size 8 at addr ffff8881b9d50068 by task dmsetup/950 CPU: 7 PID: 950 Comm: dmsetup Tainted: G W 5.19.0-rc6 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc33 04/01/2014 Call Trace: dump_stack_lvl+0x34/0x44 print_address_description.constprop.0.cold+0xeb/0x3f4 kasan_report.cold+0xe6/0x147 dm_pool_register_metadata_threshold+0x40/0x80 pool_ctr+0xa0a/0x1150 dm_table_add_target+0x2c8/0x640 table_load+0x1fd/0x430 ctl_ioctl+0x2c4/0x5a0 dm_ctl_ioctl+0xa/0x10 __x64_sys_ioctl+0xb3/0xd0 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 This can be easily reproduced using: echo offline > /sys/block/sda/device/state dd if=/dev/zero of=/dev/mapper/thin bs=4k count=10 dmsetup load pool --table "0 20971520 thin-pool /dev/sda /dev/sdb 128 0 0" If a metadata commit fails, the transaction will be aborted and the metadata space maps will be destroyed. If a DM table reload then happens for this failed thin-pool, a use-after-free will occur in dm_sm_register_threshold_callback (called from dm_pool_register_metadata_threshold). Fix this by in dm_pool_register_metadata_threshold() by returning the -EINVAL error if the thin-pool is in fail mode. Also fail pool_ctr() with a new error message: "Error registering metadata threshold". Fixes: ac8c3f3df65e4 ("dm thin: generate event when metadata threshold passed") Cc: stable@vger.kernel.org Reported-by: Hulk Robot Signed-off-by: Luo Meng Signed-off-by: Mike Snitzer drivers/md/dm-thin-metadata.c | 7 +++++-- drivers/md/dm-thin.c | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) commit 9e0c41d4a72ffc42cc82cb58adac8f351694c811 Author: Rafał Miłecki Date: Wed Jul 13 18:20:31 2022 +0200 ARM: bcmbca: Include full family name in Kconfig Spell out the BCA acronym to explain where these chips are coming from. Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20220713162031.15392-1-zajec5@gmail.com Signed-off-by: Florian Fainelli arch/arm/mach-bcm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 746ef3ac89cadfac2c444b1704962b32fb309d4a Author: Rafał Miłecki Date: Wed Jul 13 16:53:40 2022 +0200 arm64: bcmbca: Include full family name in Kconfig Spell out the BCA acronym to explain where these chips are coming from. Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20220713145340.10599-1-zajec5@gmail.com Signed-off-by: Florian Fainelli arch/arm64/Kconfig.platforms | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32d3da7d2f44f9d7ca92c36439e9673cdb786068 Author: Rafał Miłecki Date: Thu Jul 14 06:58:58 2022 +0200 arm64: make ARCH_BCM4908 select ARCH_BCMBCA BCA is a big set / family of devices sharing multiple hardware blocks. It covers BCM4908, BCM63xx, BCM68xx devices and more. Most of drivers that depend on ARCH_BCM4908 should actually depend on ARCH_BCMBCA. To make such transition easier, cleaner and breakage-free add a proper "select". Later on - if we decide to keep ARCH_BCM4908 - it may be moved under ARCH_BCMBCA menu. Keeping it may be helpful for limited compiling of DTS files and "default" Kconfig entires. Or we may just decide to drop it. Signed-off-by: Rafał Miłecki Acked-by: William Zhang Acked-by: Kursad Oney Link: https://lore.kernel.org/r/20220714045858.7786-1-zajec5@gmail.com Signed-off-by: Florian Fainelli arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) commit 0ba4c9dede106c3e7ad2bb7e23eaa1393adc43a0 Author: Steven Rostedt (Google) Date: Tue Jul 5 18:45:00 2022 -0400 xhci: tracing: Use the new __vstring() helper Instead of open coding a __dynamic_array() with a fixed length (which defeats the purpose of the dynamic array in the first place). Use the new __vstring() helper that will use a va_list and only write enough of the string into the ring buffer that is needed. Link: https://lkml.kernel.org/r/20220705224750.172301548@goodmis.org Cc: Mathias Nyman Cc: Ingo Molnar Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Steven Rostedt (Google) drivers/usb/host/xhci-trace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1b756b372fbf6ae5bcbbb4a5b7aa271483902fa5 Author: Steven Rostedt (Google) Date: Tue Jul 5 18:44:59 2022 -0400 usb: chipidea: tracing: Use the new __vstring() helper Instead of open coding a __dynamic_array() with a fixed length (which defeats the purpose of the dynamic array in the first place). Use the new __vstring() helper that will use a va_list and only write enough of the string into the ring buffer that is needed. Link: https://lkml.kernel.org/r/20220705224749.991587733@goodmis.org Cc: Peter Chen Cc: Ingo Molnar Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Steven Rostedt (Google) drivers/usb/chipidea/trace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c7c37bb87590886e08d24dec53089f74b89f5fbb Author: Steven Rostedt (Google) Date: Tue Jul 5 18:44:58 2022 -0400 tracing/iwlwifi: Use the new __vstring() helper Instead of open coding a __dynamic_array() with a fixed length (which defeats the purpose of the dynamic array in the first place). Use the new __vstring() helper that will use a va_list and only write enough of the string into the ring buffer that is needed. Link: https://lkml.kernel.org/r/20220705224749.806599472@goodmis.org Cc: Gregory Greenman Cc: Ingo Molnar Cc: Andrew Morton Cc: Kalle Valo Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Acked-by: Kalle Valo Signed-off-by: Steven Rostedt (Google) drivers/net/wireless/intel/iwlwifi/iwl-devtrace-msg.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit b6d18ab34220565177d1f2efb84ff40abb195457 Author: Steven Rostedt (Google) Date: Tue Jul 5 18:44:57 2022 -0400 tracing/brcm: Use the new __vstring() helper Instead of open coding a __dynamic_array() with a fixed length (which defeats the purpose of the dynamic array in the first place). Use the new __vstring() helper that will use a va_list and only write enough of the string into the ring buffer that is needed. Link: https://lkml.kernel.org/r/20220705224749.622796175@goodmis.org Cc: Arend van Spriel Cc: Ingo Molnar Cc: Andrew Morton Cc: Franky Lin Cc: Hante Meuleman Cc: Kalle Valo Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: SHA-cyfmac-dev-list@infineon.com Cc: netdev@vger.kernel.org Acked-by: Kalle Valo Signed-off-by: Steven Rostedt (Google) .../net/wireless/broadcom/brcm80211/brcmfmac/tracepoint.h | 12 ++++-------- .../broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac_msg.h | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) commit c01406f8972154be6236d89f7f7f056ee289b9cf Author: Steven Rostedt (Google) Date: Tue Jul 5 18:44:56 2022 -0400 tracing/ath: Use the new __vstring() helper Instead of open coding a __dynamic_array() with a fixed length (which defeats the purpose of the dynamic array in the first place). Use the new __vstring() helper that will use a va_list and only write enough of the string into the ring buffer that is needed. Link: https://lkml.kernel.org/r/20220705224749.430339634@goodmis.org Cc: Kalle Valo Cc: Ingo Molnar Cc: Andrew Morton Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Cc: ath11k@lists.infradead.org Acked-by: Kalle Valo Signed-off-by: Steven Rostedt (Google) drivers/net/wireless/ath/ath10k/trace.h | 14 ++++---------- drivers/net/wireless/ath/ath11k/trace.h | 7 ++----- drivers/net/wireless/ath/ath6kl/trace.h | 14 ++++---------- drivers/net/wireless/ath/trace.h | 7 ++----- drivers/net/wireless/ath/wil6210/trace.h | 7 ++----- 5 files changed, 14 insertions(+), 35 deletions(-) commit 8d7f5df0fb4eaaef85c6b80caeafd5bd544159a5 Author: Steven Rostedt (Google) Date: Tue Jul 5 18:44:55 2022 -0400 tracing/IB/hfi1: Use the new __vstring() helper Instead of open coding a __dynamic_array() with a fixed length (which defeats the purpose of the dynamic array in the first place). Use the new __vstring() helper that will use a va_list and only write enough of the string into the ring buffer that is needed. Link: https://lkml.kernel.org/r/20220705224749.239494531@goodmis.org Cc: Dennis Dalessandro Cc: Ingo Molnar Cc: Andrew Morton Cc: Jason Gunthorpe Cc: Leon Romanovsky Cc: linux-rdma@vger.kernel.org Signed-off-by: Steven Rostedt (Google) drivers/infiniband/hw/hfi1/trace_dbg.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 0563231f93c6d1f582b168a47753b345c1e20d81 Author: Steven Rostedt (Google) Date: Tue Jul 5 18:44:54 2022 -0400 tracing/events: Add __vstring() and __assign_vstr() helper macros There's several places that open code the following logic: TP_STRUCT__entry(__dynamic_array(char, msg, MSG_MAX)), TP_fast_assign(vsnprintf(__get_str(msg), MSG_MAX, vaf->fmt, *vaf->va);) To load a string created by variable array va_list. The main issue with this approach is that "MSG_MAX" usage in the __dynamic_array() portion. That actually just reserves the MSG_MAX in the event, and even wastes space because there's dynamic meta data also saved in the event to denote the offset and size of the dynamic array. It would have been better to just use a static __array() field. Instead, create __vstring() and __assign_vstr() that work like __string and __assign_str() but instead of taking a destination string to copy, take a format string and a va_list pointer and fill in the values. It uses the helper: #define __trace_event_vstr_len(fmt, va) \ ({ \ va_list __ap; \ int __ret; \ \ va_copy(__ap, *(va)); \ __ret = vsnprintf(NULL, 0, fmt, __ap) + 1; \ va_end(__ap); \ \ min(__ret, TRACE_EVENT_STR_MAX); \ }) To figure out the length to store the string. It may be slightly slower as it needs to run the vsnprintf() twice, but it now saves space on the ring buffer. Link: https://lkml.kernel.org/r/20220705224749.053570613@goodmis.org Cc: Dennis Dalessandro Cc: Ingo Molnar Cc: Andrew Morton Cc: Jason Gunthorpe Cc: Leon Romanovsky Cc: Kalle Valo Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Gregory Greenman Cc: Peter Chen Cc: Greg Kroah-Hartman Cc: Mathias Nyman Cc: Chunfeng Yun Cc: Bin Liu Cc: Marek Lindner Cc: Simon Wunderlich Cc: Antonio Quartulli Cc: Sven Eckelmann Cc: Johannes Berg Cc: Jim Cromie Signed-off-by: Steven Rostedt (Google) include/linux/trace_events.h | 18 ++++++++++++++++++ include/trace/stages/stage1_struct_define.h | 3 +++ include/trace/stages/stage2_data_offsets.h | 3 +++ include/trace/stages/stage4_event_fields.h | 3 +++ include/trace/stages/stage5_get_offsets.h | 4 ++++ include/trace/stages/stage6_event_callback.h | 7 +++++++ 6 files changed, 38 insertions(+) commit 839fbdee4c080eb95567cbcf6366072a56d3a3cc Author: Johan Hovold Date: Wed Jun 29 16:09:51 2022 +0200 dt-bindings: PCI: qcom: Fix reset conditional Fix the reset conditional which always evaluated to true due to a misspelled property name ("compatibles" in plural). Fixes: 6700a9b00f0a ("dt-bindings: PCI: qcom: Do not require resets on msm8996 platforms") Link: https://lore.kernel.org/r/20220629141000.18111-2-johan+linaro@kernel.org Signed-off-by: Johan Hovold Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Dmitry Baryshkov Acked-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b05eab58420d14ac579c487b2f381bc916fee46 Author: Baruch Siach Date: Mon Jun 13 09:02:38 2022 +0300 dt-bindings: PCI: qcom: Fix description typo Fix "based" typo in description. Link: https://lore.kernel.org/r/e08b53be6cdf8d94a5a002d5b74c8a884b2ff3c6.1655100158.git.baruch@tkos.co.il Signed-off-by: Baruch Siach Signed-off-by: Bjorn Helgaas Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0cf7c2efe8ac76bb6b90abc64bcf8df124509d7d Author: Selvam Sathappan Periakaruppan Date: Tue Jun 21 11:54:54 2022 +0300 PCI: qcom: Add IPQ60xx support IPQ60xx series of SoCs have one port of PCIe gen 3. Add support for that platform. The code is based on downstream[1] Codeaurora kernel v5.4 (branch win.linuxopenwrt.2.0). Split out the DBI registers access part from .init into .post_init. DBI registers are only accessible after phy_power_on(). [1] https://source.codeaurora.org/quic/qsdk/oss/kernel/linux-ipq-5.4/ Link: https://lore.kernel.org/r/f7f848653c99abbf9a0f877949a44e52329543ae.1655799816.git.baruch@tkos.co.il Tested-by: Robert Marko Signed-off-by: Selvam Sathappan Periakaruppan Signed-off-by: Baruch Siach Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Johan Hovold Acked-by: Stanimir Varbanov drivers/pci/controller/dwc/pcie-designware.h | 1 + drivers/pci/controller/dwc/pcie-qcom.c | 130 +++++++++++++++++++++++++++ 2 files changed, 131 insertions(+) commit 9a765805f62aa590fd4281740b4ef75425c0b12b Author: Baruch Siach Date: Tue Jun 21 11:54:53 2022 +0300 PCI: qcom: Define slot capabilities using PCI_EXP_SLTCAP_* The PCIE_CAP_LINK1_VAL macro actually defines slot capabilities. Use PCI_EXP_SLTCAP_* macros to spell its value, and rename it to better describe its meaning. Link: https://lore.kernel.org/r/3025d5e1d8da64798db6958f9780c4763fbcac47.1655799816.git.baruch@tkos.co.il Signed-off-by: Baruch Siach Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Acked-by: Stanimir Varbanov drivers/pci/controller/dwc/pcie-qcom.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 996ab868d6302534c22d52075c71b97e4d70f519 Author: Baruch Siach Date: Tue Jun 21 11:54:52 2022 +0300 PCI: dwc: Move GEN3_RELATED DBI definitions to common header These are common dwc macros that will be used for other platforms. Link: https://lore.kernel.org/r/1c2d5a7a139be81fa15f356b2380163dbdebdc09.1655799816.git.baruch@tkos.co.il Signed-off-by: Baruch Siach Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring drivers/pci/controller/dwc/pcie-designware.h | 6 ++++++ drivers/pci/controller/dwc/pcie-tegra194.c | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) commit 7eb5768c26934cf1ca53ffc112f75c67be254211 Author: Dmitry Baryshkov Date: Wed Jun 8 13:52:38 2022 +0300 PCI: qcom: Drop manual pipe_clk_src handling Manual reparenting of pipe_clk_src is being replaced with the parking of the clock with clk_disable()/clk_enable() in the PHY driver. Drop redundant code switching of the pipe clock between the PHY clock source and the safe bi_tcxo. Link: https://lore.kernel.org/r/20220608105238.2973600-6-dmitry.baryshkov@linaro.org Tested-by: Johan Hovold Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Helgaas Reviewed-by: Bjorn Andersson Reviewed-by: Johan Hovold Reviewed-by: Stephen Boyd Acked-by: Stanimir Varbanov drivers/pci/controller/dwc/pcie-qcom.c | 39 +--------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) commit 7c4d37c269ac8bf834b47718386d02ae94d54633 Author: Christian Brauner Date: Wed Jul 13 11:47:44 2022 +0200 Revert "ovl: turn of SB_POSIXACL with idmapped layers temporarily" This reverts commit 4a47c6385bb4e0786826e75bd4555aba32953653. Now that we have a proper fix for POSIX ACLs with overlayfs on top of idmapped layers revert the temporary fix. Signed-off-by: Christian Brauner (Microsoft) Documentation/filesystems/overlayfs.rst | 4 ---- fs/overlayfs/super.c | 25 +------------------------ 2 files changed, 1 insertion(+), 28 deletions(-) commit 1aa5fef575a839a6d01bfacd7e912dfffd0a4345 Author: Christian Brauner Date: Wed Jul 6 18:09:12 2022 +0200 ovl: handle idmappings in ovl_get_acl() During permission checking overlayfs will call ovl_permission() -> generic_permission() -> acl_permission_check() -> check_acl() -> get_acl() -> inode->i_op->get_acl() == ovl_get_acl() -> get_acl() /* on the underlying filesystem */ -> inode->i_op->get_acl() == /*lower filesystem callback */ -> posix_acl_permission() passing through the get_acl() request to the underlying filesystem. Before returning these values to the VFS we need to take the idmapping of the relevant layer into account and translate any ACL_{GROUP,USER} values according to the idmapped mount. We cannot alter the ACLs returned from the relevant layer directly as that would alter the cached values filesystem wide for the lower filesystem. Instead we can clone the ACLs and then apply the relevant idmapping of the layer. This is obviously only relevant when idmapped layers are used. Link: https://lore.kernel.org/r/20220708090134.385160-4-brauner@kernel.org Cc: Seth Forshee Cc: Amir Goldstein Cc: Vivek Goyal Cc: Christoph Hellwig Cc: Aleksa Sarai Cc: Miklos Szeredi Cc: linux-unionfs@vger.kernel.org Reviewed-by: Seth Forshee Signed-off-by: Christian Brauner (Microsoft) fs/overlayfs/inode.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 79 insertions(+), 8 deletions(-) commit 8043bffd01833a8544f2466fb3804310d6e73d09 Author: Christian Brauner Date: Wed Jul 6 17:13:23 2022 +0200 acl: make posix_acl_clone() available to overlayfs The ovl_get_acl() function needs to alter the POSIX ACLs retrieved from the lower filesystem. Instead of hand-rolling a overlayfs specific posix_acl_clone() variant allow export it. It's not special and it's not deeply internal anyway. Link: https://lore.kernel.org/r/20220708090134.385160-3-brauner@kernel.org Cc: Seth Forshee Cc: Amir Goldstein Cc: Vivek Goyal Cc: Christoph Hellwig Cc: Aleksa Sarai Cc: Miklos Szeredi Cc: linux-unionfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Reviewed-by: Seth Forshee Signed-off-by: Christian Brauner (Microsoft) fs/posix_acl.c | 3 ++- include/linux/posix_acl.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit e933c15f7621074ef6d5c137fe212996fb5038a8 Author: Christian Brauner Date: Sat Jul 9 12:23:20 2022 +0200 acl: port to vfs{g,u}id_t Port the few remaining pieces to vfs{g,u}id_t and associated type safe helpers. Signed-off-by: Christian Brauner (Microsoft) fs/posix_acl.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 0c5fd887d2bb47aa37aa9fb1eb1d1d2abac62972 Author: Christian Brauner Date: Wed Jul 6 18:30:59 2022 +0200 acl: move idmapped mount fixup into vfs_{g,s}etxattr() This cycle we added support for mounting overlayfs on top of idmapped mounts. Recently I've started looking into potential corner cases when trying to add additional tests and I noticed that reporting for POSIX ACLs is currently wrong when using idmapped layers with overlayfs mounted on top of it. I'm going to give a rather detailed explanation to both the origin of the problem and the solution. Let's assume the user creates the following directory layout and they have a rootfs /var/lib/lxc/c1/rootfs. The files in this rootfs are owned as you would expect files on your host system to be owned. For example, ~/.bashrc for your regular user would be owned by 1000:1000 and /root/.bashrc would be owned by 0:0. IOW, this is just regular boring filesystem tree on an ext4 or xfs filesystem. The user chooses to set POSIX ACLs using the setfacl binary granting the user with uid 4 read, write, and execute permissions for their .bashrc file: setfacl -m u:4:rwx /var/lib/lxc/c2/rootfs/home/ubuntu/.bashrc Now they to expose the whole rootfs to a container using an idmapped mount. So they first create: mkdir -pv /vol/contpool/{ctrover,merge,lowermap,overmap} mkdir -pv /vol/contpool/ctrover/{over,work} chown 10000000:10000000 /vol/contpool/ctrover/{over,work} The user now creates an idmapped mount for the rootfs: mount-idmapped/mount-idmapped --map-mount=b:0:10000000:65536 \ /var/lib/lxc/c2/rootfs \ /vol/contpool/lowermap This for example makes it so that /var/lib/lxc/c2/rootfs/home/ubuntu/.bashrc which is owned by uid and gid 1000 as being owned by uid and gid 10001000 at /vol/contpool/lowermap/home/ubuntu/.bashrc. Assume the user wants to expose these idmapped mounts through an overlayfs mount to a container. mount -t overlay overlay \ -o lowerdir=/vol/contpool/lowermap, \ upperdir=/vol/contpool/overmap/over, \ workdir=/vol/contpool/overmap/work \ /vol/contpool/merge The user can do this in two ways: (1) Mount overlayfs in the initial user namespace and expose it to the container. (2) Mount overlayfs on top of the idmapped mounts inside of the container's user namespace. Let's assume the user chooses the (1) option and mounts overlayfs on the host and then changes into a container which uses the idmapping 0:10000000:65536 which is the same used for the two idmapped mounts. Now the user tries to retrieve the POSIX ACLs using the getfacl command getfacl -n /vol/contpool/lowermap/home/ubuntu/.bashrc and to their surprise they see: # file: vol/contpool/merge/home/ubuntu/.bashrc # owner: 1000 # group: 1000 user::rw- user:4294967295:rwx group::r-- mask::rwx other::r-- indicating the the uid wasn't correctly translated according to the idmapped mount. The problem is how we currently translate POSIX ACLs. Let's inspect the callchain in this example: idmapped mount /vol/contpool/merge: 0:10000000:65536 caller's idmapping: 0:10000000:65536 overlayfs idmapping (ofs->creator_cred): 0:0:4k /* initial idmapping */ sys_getxattr() -> path_getxattr() -> getxattr() -> do_getxattr() |> vfs_getxattr() | -> __vfs_getxattr() | -> handler->get == ovl_posix_acl_xattr_get() | -> ovl_xattr_get() | -> vfs_getxattr() | -> __vfs_getxattr() | -> handler->get() /* lower filesystem callback */ |> posix_acl_fix_xattr_to_user() { 4 = make_kuid(&init_user_ns, 4); 4 = mapped_kuid_fs(&init_user_ns /* no idmapped mount */, 4); /* FAILURE */ -1 = from_kuid(0:10000000:65536 /* caller's idmapping */, 4); } If the user chooses to use option (2) and mounts overlayfs on top of idmapped mounts inside the container things don't look that much better: idmapped mount /vol/contpool/merge: 0:10000000:65536 caller's idmapping: 0:10000000:65536 overlayfs idmapping (ofs->creator_cred): 0:10000000:65536 sys_getxattr() -> path_getxattr() -> getxattr() -> do_getxattr() |> vfs_getxattr() | -> __vfs_getxattr() | -> handler->get == ovl_posix_acl_xattr_get() | -> ovl_xattr_get() | -> vfs_getxattr() | -> __vfs_getxattr() | -> handler->get() /* lower filesystem callback */ |> posix_acl_fix_xattr_to_user() { 4 = make_kuid(&init_user_ns, 4); 4 = mapped_kuid_fs(&init_user_ns, 4); /* FAILURE */ -1 = from_kuid(0:10000000:65536 /* caller's idmapping */, 4); } As is easily seen the problem arises because the idmapping of the lower mount isn't taken into account as all of this happens in do_gexattr(). But do_getxattr() is always called on an overlayfs mount and inode and thus cannot possible take the idmapping of the lower layers into account. This problem is similar for fscaps but there the translation happens as part of vfs_getxattr() already. Let's walk through an fscaps overlayfs callchain: setcap 'cap_net_raw+ep' /var/lib/lxc/c2/rootfs/home/ubuntu/.bashrc The expected outcome here is that we'll receive the cap_net_raw capability as we are able to map the uid associated with the fscap to 0 within our container. IOW, we want to see 0 as the result of the idmapping translations. If the user chooses option (1) we get the following callchain for fscaps: idmapped mount /vol/contpool/merge: 0:10000000:65536 caller's idmapping: 0:10000000:65536 overlayfs idmapping (ofs->creator_cred): 0:0:4k /* initial idmapping */ sys_getxattr() -> path_getxattr() -> getxattr() -> do_getxattr() -> vfs_getxattr() -> xattr_getsecurity() -> security_inode_getsecurity() ________________________________ -> cap_inode_getsecurity() | | { V | 10000000 = make_kuid(0:0:4k /* overlayfs idmapping */, 10000000); | 10000000 = mapped_kuid_fs(0:0:4k /* no idmapped mount */, 10000000); | /* Expected result is 0 and thus that we own the fscap. */ | 0 = from_kuid(0:10000000:65536 /* caller's idmapping */, 10000000); | } | -> vfs_getxattr_alloc() | -> handler->get == ovl_other_xattr_get() | -> vfs_getxattr() | -> xattr_getsecurity() | -> security_inode_getsecurity() | -> cap_inode_getsecurity() | { | 0 = make_kuid(0:0:4k /* lower s_user_ns */, 0); | 10000000 = mapped_kuid_fs(0:10000000:65536 /* idmapped mount */, 0); | 10000000 = from_kuid(0:0:4k /* overlayfs idmapping */, 10000000); | |____________________________________________________________________| } -> vfs_getxattr_alloc() -> handler->get == /* lower filesystem callback */ And if the user chooses option (2) we get: idmapped mount /vol/contpool/merge: 0:10000000:65536 caller's idmapping: 0:10000000:65536 overlayfs idmapping (ofs->creator_cred): 0:10000000:65536 sys_getxattr() -> path_getxattr() -> getxattr() -> do_getxattr() -> vfs_getxattr() -> xattr_getsecurity() -> security_inode_getsecurity() _______________________________ -> cap_inode_getsecurity() | | { V | 10000000 = make_kuid(0:10000000:65536 /* overlayfs idmapping */, 0); | 10000000 = mapped_kuid_fs(0:0:4k /* no idmapped mount */, 10000000); | /* Expected result is 0 and thus that we own the fscap. */ | 0 = from_kuid(0:10000000:65536 /* caller's idmapping */, 10000000); | } | -> vfs_getxattr_alloc() | -> handler->get == ovl_other_xattr_get() | |-> vfs_getxattr() | -> xattr_getsecurity() | -> security_inode_getsecurity() | -> cap_inode_getsecurity() | { | 0 = make_kuid(0:0:4k /* lower s_user_ns */, 0); | 10000000 = mapped_kuid_fs(0:10000000:65536 /* idmapped mount */, 0); | 0 = from_kuid(0:10000000:65536 /* overlayfs idmapping */, 10000000); | |____________________________________________________________________| } -> vfs_getxattr_alloc() -> handler->get == /* lower filesystem callback */ We can see how the translation happens correctly in those cases as the conversion happens within the vfs_getxattr() helper. For POSIX ACLs we need to do something similar. However, in contrast to fscaps we cannot apply the fix directly to the kernel internal posix acl data structure as this would alter the cached values and would also require a rework of how we currently deal with POSIX ACLs in general which almost never take the filesystem idmapping into account (the noteable exception being FUSE but even there the implementation is special) and instead retrieve the raw values based on the initial idmapping. The correct values are then generated right before returning to userspace. The fix for this is to move taking the mount's idmapping into account directly in vfs_getxattr() instead of having it be part of posix_acl_fix_xattr_to_user(). To this end we split out two small and unexported helpers posix_acl_getxattr_idmapped_mnt() and posix_acl_setxattr_idmapped_mnt(). The former to be called in vfs_getxattr() and the latter to be called in vfs_setxattr(). Let's go back to the original example. Assume the user chose option (1) and mounted overlayfs on top of idmapped mounts on the host: idmapped mount /vol/contpool/merge: 0:10000000:65536 caller's idmapping: 0:10000000:65536 overlayfs idmapping (ofs->creator_cred): 0:0:4k /* initial idmapping */ sys_getxattr() -> path_getxattr() -> getxattr() -> do_getxattr() |> vfs_getxattr() | |> __vfs_getxattr() | | -> handler->get == ovl_posix_acl_xattr_get() | | -> ovl_xattr_get() | | -> vfs_getxattr() | | |> __vfs_getxattr() | | | -> handler->get() /* lower filesystem callback */ | | |> posix_acl_getxattr_idmapped_mnt() | | { | | 4 = make_kuid(&init_user_ns, 4); | | 10000004 = mapped_kuid_fs(0:10000000:65536 /* lower idmapped mount */, 4); | | 10000004 = from_kuid(&init_user_ns, 10000004); | | |_______________________ | | } | | | | | |> posix_acl_getxattr_idmapped_mnt() | | { | | V | 10000004 = make_kuid(&init_user_ns, 10000004); | 10000004 = mapped_kuid_fs(&init_user_ns /* no idmapped mount */, 10000004); | 10000004 = from_kuid(&init_user_ns, 10000004); | } |_________________________________________________ | | | | |> posix_acl_fix_xattr_to_user() | { V 10000004 = make_kuid(0:0:4k /* init_user_ns */, 10000004); /* SUCCESS */ 4 = from_kuid(0:10000000:65536 /* caller's idmapping */, 10000004); } And similarly if the user chooses option (1) and mounted overayfs on top of idmapped mounts inside the container: idmapped mount /vol/contpool/merge: 0:10000000:65536 caller's idmapping: 0:10000000:65536 overlayfs idmapping (ofs->creator_cred): 0:10000000:65536 sys_getxattr() -> path_getxattr() -> getxattr() -> do_getxattr() |> vfs_getxattr() | |> __vfs_getxattr() | | -> handler->get == ovl_posix_acl_xattr_get() | | -> ovl_xattr_get() | | -> vfs_getxattr() | | |> __vfs_getxattr() | | | -> handler->get() /* lower filesystem callback */ | | |> posix_acl_getxattr_idmapped_mnt() | | { | | 4 = make_kuid(&init_user_ns, 4); | | 10000004 = mapped_kuid_fs(0:10000000:65536 /* lower idmapped mount */, 4); | | 10000004 = from_kuid(&init_user_ns, 10000004); | | |_______________________ | | } | | | | | |> posix_acl_getxattr_idmapped_mnt() | | { V | 10000004 = make_kuid(&init_user_ns, 10000004); | 10000004 = mapped_kuid_fs(&init_user_ns /* no idmapped mount */, 10000004); | 10000004 = from_kuid(0(&init_user_ns, 10000004); | |_________________________________________________ | } | | | |> posix_acl_fix_xattr_to_user() | { V 10000004 = make_kuid(0:0:4k /* init_user_ns */, 10000004); /* SUCCESS */ 4 = from_kuid(0:10000000:65536 /* caller's idmappings */, 10000004); } The last remaining problem we need to fix here is ovl_get_acl(). During ovl_permission() overlayfs will call: ovl_permission() -> generic_permission() -> acl_permission_check() -> check_acl() -> get_acl() -> inode->i_op->get_acl() == ovl_get_acl() > get_acl() /* on the underlying filesystem) ->inode->i_op->get_acl() == /*lower filesystem callback */ -> posix_acl_permission() passing through the get_acl request to the underlying filesystem. This will retrieve the acls stored in the lower filesystem without taking the idmapping of the underlying mount into account as this would mean altering the cached values for the lower filesystem. So we block using ACLs for now until we decided on a nice way to fix this. Note this limitation both in the documentation and in the code. The most straightforward solution would be to have ovl_get_acl() simply duplicate the ACLs, update the values according to the idmapped mount and return it to acl_permission_check() so it can be used in posix_acl_permission() forgetting them afterwards. This is a bit heavy handed but fairly straightforward otherwise. Link: https://github.com/brauner/mount-idmapped/issues/9 Link: https://lore.kernel.org/r/20220708090134.385160-2-brauner@kernel.org Cc: Seth Forshee Cc: Amir Goldstein Cc: Vivek Goyal Cc: Christoph Hellwig Cc: Aleksa Sarai Cc: Miklos Szeredi Cc: linux-unionfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Reviewed-by: Seth Forshee Signed-off-by: Christian Brauner (Microsoft) fs/ksmbd/vfs.c | 2 +- fs/ksmbd/vfs.h | 2 +- fs/overlayfs/overlayfs.h | 3 +- fs/posix_acl.c | 147 +++++++++++++++++++++++++++++----------- fs/xattr.c | 25 +++++-- include/linux/posix_acl_xattr.h | 34 ++++++---- include/linux/xattr.h | 2 +- 7 files changed, 151 insertions(+), 64 deletions(-) commit c9fa2b07fa99e648b5042a32dbfa39ba68a190db Author: Christian Brauner Date: Sun Jun 26 20:45:07 2022 +0200 mnt_idmapping: add vfs[g,u]id_into_k[g,u]id() Add two tiny helpers to conver a vfsuid into a kuid. Signed-off-by: Christian Brauner (Microsoft) include/linux/mnt_idmapping.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 45598fd4e2897306ed5006e6a80b0460c3079bbd Merge: 77940f0d96cd 4a47c6385bb4 Author: Christian Brauner Date: Wed Jul 13 11:43:17 2022 +0200 Merge tag 'ovl-fixes-5.19-rc7' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs into fs.idmapped.overlay.acl Bring in Miklos' tree which contains the temporary fix for POSIX ACLs with overlayfs on top of idmapped layers. We will add a proper fix on top of it and then revert the temporary fix. Cc: Seth Forshee Cc: Miklos Szeredi Signed-off-by: Christian Brauner (Microsoft) commit 9ff5efdeb0897547cffc275e88d2a55462d9b08e Author: Jon Doron Date: Fri Jul 15 21:11:22 2022 +0300 libbpf: perfbuf: Add API to get the ring buffer Add support for writing a custom event reader, by exposing the ring buffer. With the new API perf_buffer__buffer() you will get access to the raw mmaped()'ed per-cpu underlying memory of the ring buffer. This region contains both the perf buffer data and header (struct perf_event_mmap_page), which manages the ring buffer state (head/tail positions, when accessing the head/tail position it's important to take into consideration SMP). With this type of low level access one can implement different types of consumers here are few simple examples where this API helps with: 1. perf_event_read_simple is allocating using malloc, perhaps you want to handle the wrap-around in some other way. 2. Since perf buf is per-cpu then the order of the events is not guarnteed, for example: Given 3 events where each event has a timestamp t0 < t1 < t2, and the events are spread on more than 1 CPU, then we can end up with the following state in the ring buf: CPU[0] => [t0, t2] CPU[1] => [t1] When you consume the events from CPU[0], you could know there is a t1 missing, (assuming there are no drops, and your event data contains a sequential index). So now one can simply do the following, for CPU[0], you can store the address of t0 and t2 in an array (without moving the tail, so there data is not perished) then move on the CPU[1] and set the address of t1 in the same array. So you end up with something like: void **arr[] = [&t0, &t1, &t2], now you can consume it orderely and move the tails as you process in order. 3. Assuming there are multiple CPUs and we want to start draining the messages from them, then we can "pick" with which one to start with according to the remaining free space in the ring buffer. Signed-off-by: Jon Doron Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220715181122.149224-1-arilou@gmail.com tools/lib/bpf/libbpf.c | 16 ++++++++++++++++ tools/lib/bpf/libbpf.h | 16 ++++++++++++++++ tools/lib/bpf/libbpf.map | 1 + 3 files changed, 33 insertions(+) commit 321add801bcd186c6b5477c0857521e127dbf016 Author: Pierre-Louis Bossart Date: Fri Jul 15 09:52:16 2022 -0500 ASoC: SOF: Intel: hda-stream: test DMA buffer first in hw_params We should be consistent and always test that the DMA buffer is allocated before continuing with the hw_params setup. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220715145216.277003-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-stream.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit bdcf7926fab202d37bfc8e17f1c8ed5d2e611404 Author: Pierre-Louis Bossart Date: Fri Jul 15 09:52:15 2022 -0500 ASoC: SOF: probes: rename assign/free callbacks as startup/shutdown assign/free are not well aligned to usual conventions and specifically not to the compressed ops that make use of the probe callbacks. Use the more common startup/shutdown. No functional change beyond renaming. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220715145216.277003-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-probes.c | 16 ++++++++-------- sound/soc/sof/sof-client-probes.c | 8 ++++---- sound/soc/sof/sof-client-probes.h | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) commit 054d1fd1380a88e64fadee38771e311184db544a Author: Pierre-Louis Bossart Date: Fri Jul 15 09:52:14 2022 -0500 ASoC: SOF: Intel: hda: only fixup topology name if not set already We do all kinds of renaming tricks that get in the way of kernel parameter and DMI quirk overrides at a higher level. Tested on UpExtreme board with options snd-sof-pci tplg_filename=sof-hda-generic.tplg Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220715145216.277003-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda.c | 70 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 22 deletions(-) commit ef05eb575ed98f32d380a6ac8ecdc865b0f4e146 Author: Pierre-Louis Bossart Date: Fri Jul 15 09:52:13 2022 -0500 ASoC: SOF: Intel: hda: don't set fw_filename The fw_filename is now set at a higher level and can be overridden by kernel parameters or DMI quirks. Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220715145216.277003-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda.c | 1 - 1 file changed, 1 deletion(-) commit 27b196c19c5a10abf1bf5a379c1a6154a1686ec4 Author: Peter Ujfalusi Date: Fri Jul 15 09:52:12 2022 -0500 ASoC: SOF: Intel: atom: don't keep a temporary string in fixup_tplg_name fixup_tplg_name() doesn't need to keep the string, allocated for filename - it's temporary. Inspired by similar change for hda: commit b9088535e102 ("ASoC: SOF: Intel: HDA: don't keep a temporary variable") Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220715145216.277003-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/atom.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b9cb044f35fd5d6fdff92a0be23b020372525fef Author: Peter Ujfalusi Date: Fri Jul 15 09:52:11 2022 -0500 ASoC: SOF: ipc3-loader: Print out the non matching ext_man magic number Print out the found extended manifest magic number in case it is not matching with the expected one (0x6e614d58) in debug level. It is fairly unlikely that the firmware does not have ext_man section and the found value in place of the magic number can help rootcausing boot related issues. Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220715145216.277003-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc3-loader.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit dc6137a56a7227da6e0d4cff6dfb952173403e71 Author: Rander Wang Date: Fri Jul 15 09:52:10 2022 -0500 ASoC: SOF: ipc4-topology: set domain bit based on dp domain type Currently the domain bit in ipc msg for module initialization is set to lp (low power) mode for pipeline. This is not correct since it is for module domain type: ll domain or dp domain which are for scheduler in fw. If the domain bit is set to 1 fw will process the module in dp domain or deal it with ll domain. So set domain bit based on dp domain setting. Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220715145216.277003-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 6 ++++-- sound/soc/sof/ipc4-topology.h | 13 ++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) commit b85f4fc40d56f69ee8e2ca99f202fb287bd767c9 Author: Rander Wang Date: Fri Jul 15 09:52:09 2022 -0500 ASoC: SOF: add ipc4 SRC module support SRC module only needs two parameters : base module config and sink rate. This patch adds prepare and setup for SRC widgets. Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220715145216.277003-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 114 +++++++++++++++++++++++++++++++++++++++++- sound/soc/sof/ipc4-topology.h | 14 ++++++ 2 files changed, 127 insertions(+), 1 deletion(-) commit bdb803c8280ba4fd8b8c1cf9cb69f3555853f397 Author: Rander Wang Date: Fri Jul 15 09:52:08 2022 -0500 ASoC: SOF: ipc4-pcm: set pcm rate to dai setting Dsp converts pcm rate to the one defined by dai. When SRC is used, the pcm runtime rate is different with dai rate and we need to fix it up for BE components. Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220715145216.277003-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-pcm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 711d0427c7134c5ba65b8f408888a0335e23ed23 Author: Bard Liao Date: Fri Jul 15 09:52:07 2022 -0500 ASoC: SOF: ipc4-topology: move ida allocate/free to widget_setup/free The existing code allocate/release instance_id in widget ipc_prepare/ ipc_unprepare callbacks and creating widget with the instance_id in tplg widget_setup callback. In the case of multiple widgets connecting to one widget, the ipc_unprepare will be invoked for all the widgets in the path including the widget which is still in use. As a result, the instance_id is released in the ipc_unprepare callback, but the widget is still in use and the instance_id will be reused by a new widget when we start the PCM again. Moving the ida work from ipc_prepare/ipc_unprepare to widget_setup/free can avoid such problem. Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220715145216.277003-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit 740e5d8713e08607c280e1569374401461f3ed5b Author: Yong Zhi Date: Fri Jul 15 09:52:06 2022 -0500 ASoC: SOF: Intel: MTL: remove redundant snd_sof_dsp_read() call Drop redundant CPA bit check after polling the same condition. Fixes: 064520e8aeaa ("ASoC: SOF: Intel: Add support for MeteorLake (MTL)") Reviewed-by: Chao Song Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220715145216.277003-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/mtl.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 020e3618cc81abf11fe6bffaac27861ff94707ce Author: Bart Van Assche Date: Fri Jul 15 11:47:35 2022 -0700 blktrace: Fix the blk_fill_rwbs() kernel-doc header Reflect recent changes in the blk_fill_rwbs() kernel-doc header. Reported-by: Stephen Rothwell Cc: Christoph Hellwig Cc: Steven Rostedt Cc: Li Zefan Cc: Chaitanya Kulkarni Cc: Stephen Rothwell Fixes: 919dbca8670d ("blktrace: Use the new blk_opf_t type") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220715184735.2326034-3-bvanassche@acm.org Signed-off-by: Jens Axboe kernel/trace/blktrace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f54541403b2f51d98aa65472ddb021b1ef7d1eed Author: Bart Van Assche Date: Fri Jul 15 11:47:34 2022 -0700 fs/buffer: Fix the ll_rw_block() kernel-doc header Bring the ll_rw_block() kernel-doc header again in sync with the function prototype. Reported-by: Stephen Rothwell Cc: Alexander Viro Cc: Jan Kara Cc: Stephen Rothwell Fixes: 1420c4a549bf ("fs/buffer: Combine two submit_bh() and ll_rw_block() arguments") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220715184735.2326034-2-bvanassche@acm.org Signed-off-by: Jens Axboe fs/buffer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c3fc63479e372747ffa99b4602f962d2862a13b3 Merge: dfb15e49400e ba4c6a1a8f1b Author: Mark Brown Date: Fri Jul 15 20:07:01 2022 +0100 ASoC: SOF: Intel: add support for SoundWire-based HP Omen16 Merge series from Pierre-Louis Bossart : This device exposes a headset codec on link0 and an amplifier on link3. This is a very unusual pin-muxing, usually the microphones are pin-muxed with link2/link3. This resulted in a problematic error handling leading to a kernel oops, and invalidated a hard-coded assumption. Full support for this device requires a DMI quirk shared separately ("soundwire: dmi-quirks: add remapping for HP Omen 16-k0005TX"). commit 8eab0a09a211735c2ffd0e481f7155e53c311dd9 Merge: a2a5580fcbf8 3848636b4a88 Author: Andrii Nakryiko Date: Fri Jul 15 12:01:30 2022 -0700 Merge branch 'Use lightweigt version of bpftool' Pu Lehui says: ==================== Currently, samples/bpf, tools/runqslower and bpf/iterators use bpftool for vmlinux.h, skeleton, and static linking only. We can use lightweight bootstrap version of bpftool to handle these, and it will be faster. v2: - make libbpf and bootstrap bpftool independent. and make it simple. v1: https://lore.kernel.org/bpf/20220712030813.865410-1-pulehui@huawei.com ==================== Signed-off-by: Andrii Nakryiko commit 3848636b4a88f0706f9ce48d532163244abadd43 Author: Pu Lehui Date: Thu Jul 14 10:46:12 2022 +0800 bpf: iterators: Build and use lightweight bootstrap version of bpftool kernel/bpf/preload/iterators use bpftool for vmlinux.h, skeleton, and static linking only. So we can use lightweight bootstrap version of bpftool to handle these, and it will be faster. Suggested-by: Andrii Nakryiko Signed-off-by: Pu Lehui Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220714024612.944071-4-pulehui@huawei.com kernel/bpf/preload/iterators/Makefile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 3a2a58c4479a6acd4421db41e1e1ffd804763a5a Author: Pu Lehui Date: Thu Jul 14 10:46:11 2022 +0800 tools: runqslower: Build and use lightweight bootstrap version of bpftool tools/runqslower use bpftool for vmlinux.h, skeleton, and static linking only. So we can use lightweight bootstrap version of bpftool to handle these, and it will be faster. Suggested-by: Andrii Nakryiko Signed-off-by: Pu Lehui Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220714024612.944071-3-pulehui@huawei.com tools/bpf/runqslower/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 2e4966288c1651c22202df80142ed84dbef817b5 Author: Pu Lehui Date: Thu Jul 14 10:46:10 2022 +0800 samples: bpf: Fix cross-compiling error by using bootstrap bpftool Currently, when cross compiling bpf samples, the host side cannot use arch-specific bpftool to generate vmlinux.h or skeleton. Since samples/bpf use bpftool for vmlinux.h, skeleton, and static linking only, we can use lightweight bootstrap version of bpftool to handle these, and it's always host-native. Suggested-by: Andrii Nakryiko Signed-off-by: Pu Lehui Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220714024612.944071-2-pulehui@huawei.com samples/bpf/Makefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit dfb15e49400e8264662a8ae2117f41c9f417e173 Merge: 1c69bbc3c108 bdd15ec4888a Author: Mark Brown Date: Fri Jul 15 19:56:10 2022 +0100 ASoC: Intel: Mark BE DAIs as nonatomic for hsw and Merge series from Cezary Rojewski : Address the warning: "Codec: dpcm_be_connect: FE is nonatomic but BE is not, forcing BE as nonatomic" by marking BE DAI as nonatomic. Aligns with what is already done for FE DAIs. This patchset iterates the change over all HSW and BDW related machine board drivers. commit 53f07e9b010b966017e32be1ca1bbcbcc4cee73d Author: Takashi Iwai Date: Fri Jul 15 20:29:03 2022 +0200 Revert "ALSA: hda: Fix page fault in snd_hda_codec_shutdown()" This reverts commit 980b3a8790b402e959a6d773b38b771019682be1. The commit didn't consider the fact that ASoC hdac-hda driver initializes the HD-audio stuff without calling snd_hda_codec_device_init(). Hence this caused a regression leading to Oops. Revert the commit to restore the behavior. Fixes: 980b3a8790b4 ("ALSA: hda: Fix page fault in snd_hda_codec_shutdown()") Link: https://lore.kernel.org/r/3c40df55-3aee-1e08-493b-7b30cd84dc00@linux.intel.com Link: https://lore.kernel.org/r/20220715182903.19594-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/pci/hda/hda_codec.c | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) commit d59d2277febbad93e42137a50673dd1c16199813 Author: Takashi Iwai Date: Fri Jul 15 20:24:27 2022 +0200 Revert "ALSA: hda: cs35l41: Allow compilation test on non-ACPI configurations" Since the recent change in CS35L41 codec requires the reference of acpi_dev handle, the current Kconfig may lead to a build breakage. Revert the Kconfig change and re-introduce the hard dependency on CONFIG_ACPI again as a temporary workaround. Fixes: eef375960210 ("ALSA: hda: cs35l41: Support reading subsystem id from ACPI") Link: https://lore.kernel.org/r/20220715182427.18891-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/pci/hda/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 64b634830c919979de4b18163e15d30df66e64a8 Author: Micah Morton Date: Thu Jun 16 17:09:55 2022 +0000 LSM: SafeSetID: add setgroups() testing to selftest Selftest already has support for testing UID and GID transitions. Signed-off-by: Micah Morton tools/testing/selftests/safesetid/safesetid-test.c | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit 3e3374d382ff250502fbc4407001ac793d5c4e7f Author: Micah Morton Date: Wed Jun 8 22:27:27 2022 +0000 LSM: SafeSetID: Add setgroups() security policy handling The SafeSetID LSM has functionality for restricting setuid()/setgid() syscalls based on its configured security policies. This patch adds the analogous functionality for the setgroups() syscall. Security policy for the setgroups() syscall follows the same policies that are installed on the system for setgid() syscalls. Signed-off-by: Micah Morton security/safesetid/lsm.c | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) commit fcfe0ac2fcfae7d5fcad3d0375cb8ff38caf8aba Author: Micah Morton Date: Wed Jun 8 20:57:11 2022 +0000 security: Add LSM hook to setgroups() syscall Give the LSM framework the ability to filter setgroups() syscalls. There are already analagous hooks for the set*uid() and set*gid() syscalls. The SafeSetID LSM will use this new hook to ensure setgroups() calls are allowed by the installed security policy. Tested by putting print statement in security_task_fix_setgroups() hook and confirming that it gets hit when userspace does a setgroups() syscall. Acked-by: Casey Schaufler Reviewed-by: Serge Hallyn Signed-off-by: Micah Morton include/linux/lsm_hook_defs.h | 1 + include/linux/lsm_hooks.h | 7 +++++++ include/linux/security.h | 7 +++++++ kernel/groups.c | 13 +++++++++++++ security/security.c | 5 +++++ 5 files changed, 33 insertions(+) commit 03c440a26cba6cfa540d65924e9db86fcea362b2 Author: Hans de Goede Date: Thu Jul 14 21:16:11 2022 +0200 ACPI: video: Use native backlight on Dell Inspiron N4010 The Dell Inspiron N4010 does not have ACPI backlight control, so acpi_video_get_backlight_type()'s heuristics return vendor as the type to use. But the vendor interface is broken, where as the native (intel_backlight) works well, add a quirk to use native. Link: https://lore.kernel.org/regressions/CALF=6jEe5G8+r1Wo0vvz4GjNQQhdkLT5p8uCHn6ZXhg4nsOWow@mail.gmail.com/ Reported-and-tested-by: Ben Greening Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/video_detect.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1a2dcab517cbf8f58ebf1e12aea253f5df9cff80 Author: Rafael J. Wysocki Date: Wed Jul 13 20:51:13 2022 +0200 ACPI: PM: s2idle: Use LPS0 idle if ACPI_FADT_LOW_POWER_S0 is unset If the PNP0D80 device is present and its _DSM appears to be valid, there is no reason to avoid using it even if ACPI_FADT_LOW_POWER_S0 is unset in the FADT, because suspend-to-idle may be the only way to suspend the system if S3 is not supported by the platform, so do not return early from lps0_device_attach() in that case. However, still check ACPI_FADT_LOW_POWER_S0 when deciding whether or not suspend-to-idle should be the default system suspend method. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mario Limonciello drivers/acpi/x86/s2idle.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 403dbe3a5383d1e1bbcbe03d9fa6df0216e26102 Author: Rafael J. Wysocki Date: Wed Jul 13 19:33:22 2022 +0200 Revert "ACPI / PM: LPIT: Register sysfs attributes based on FADT" Revert commit 1cdda9486f51 ("ACPI / PM: LPIT: Register sysfs attributes based on FADT"), because what it did was more confusing than it would be to allow the sysfs attributes in question to be created regardless of whether or not the relevant flag was set in the FADT. If ACPI_FADT_LOW_POWER_S0 is not set, it need not mean that LPIT is invalid and low-power S0 idle is not usable. It merely means that using S3 on the given system is more beneficial from the energy saving perspective than using low-power S0 idle. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mario Limonciello drivers/acpi/acpi_lpit.c | 6 ------ 1 file changed, 6 deletions(-) commit 03508eea538557b4f61bf1df2e842d252cb9a6e6 Author: Marc Ferland Date: Tue Jul 12 15:35:04 2022 -0400 hwmon: (mcp3021) improve driver support for newer hwmon interface This driver is currently broken, it does not show the in0_input sysfs file and also returns the following message on startup: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info(). This patch converts the driver and also cleans up the 'read' function. Signed-off-by: Marc Ferland Link: https://lore.kernel.org/r/20220712193504.1374656-1-ferlandm@amotus.ca Signed-off-by: Guenter Roeck drivers/hwmon/mcp3021.c | 99 ++++++++++++++++++++++++------------------------- 1 file changed, 49 insertions(+), 50 deletions(-) commit ca415ea1f03abf34fc8e4cc5fc30a00189b4e776 Author: Zhuo Chen Date: Wed Jun 29 18:03:34 2022 +0800 ice: Remove pci_aer_clear_nonfatal_status() call After commit 62b36c3ea664 ("PCI/AER: Remove pci_cleanup_aer_uncorrect_error_status() calls"), calls to pci_cleanup_aer_uncorrect_error_status() have already been removed. But in commit 5995b6d0c6fc ("ice: Implement pci_error_handler ops") pci_cleanup_aer_uncorrect_error_status was used again, so remove it in this patch. Signed-off-by: Zhuo Chen Cc: Muchun Song Cc: Sen Wang Cc: Wenliang Wang Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_main.c | 6 ------ 1 file changed, 6 deletions(-) commit 896a55aa52328ec146394c69d1ece5f6baa1aa11 Author: Anirudh Venkataramanan Date: Tue Jun 28 12:36:57 2022 +0200 ice: Add EXTTS feature to the feature bitmap External time stamp sources are supported only on certain devices. Enforce the right support matrix by adding the ICE_F_PTP_EXTTS bit to the feature bitmap set. Co-developed-by: Maciej Machnikowski Signed-off-by: Maciej Machnikowski Signed-off-by: Anirudh Venkataramanan Signed-off-by: Anatolii Gerasymenko Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice.h | 1 + drivers/net/ethernet/intel/ice/ice_lib.c | 1 + drivers/net/ethernet/intel/ice/ice_ptp.c | 18 +++++++++++++----- 3 files changed, 15 insertions(+), 5 deletions(-) commit 43b2aef3735e0ddb4fc4e6401cd5dc1bf205dead Author: Steven Rostedt (Google) Date: Tue Jul 5 18:37:41 2022 -0400 neighbor: tracing: Have neigh_create event use __string() The dev field of the neigh_create event uses __dynamic_array() with a fixed size, which defeats the purpose of __dynamic_array(). Looking at the logic, as it already uses __assign_str(), just use the same logic in __string to create the size needed. It appears that because "dev" can be NULL, it needs the check. But __string() can have the same checks as __assign_str() so use them there too. Link: https://lkml.kernel.org/r/20220705183741.35387e3f@rorschach.local.home Cc: David Ahern Cc: David S. Miller Cc: netdev@vger.kernel.org Acked-by: Jakub Kicinski Reviewed-by: David Ahern Signed-off-by: Steven Rostedt (Google) include/trace/events/neigh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fca8300f68fe3fbb2fcda862f0f114011715b3bc Author: Steven Rostedt (Google) Date: Mon Jul 4 09:14:36 2022 -0400 tracing/ipv4/ipv6: Use static array for name field in fib*_lookup_table event The fib_lookup_table and fib6_lookup_table events declare name as a dynamic_array, but also give it a fixed size, which defeats the purpose of the dynamic array, especially since the dynamic array also includes meta data in the event to specify its size. Since the size of the name is at most 16 bytes (defined by IFNAMSIZ), it is not worth spending the effort to determine the size of the string. Just use a fixed size array and copy into it. This will save 4 bytes that are used for the meta data that saves the size and position of a dynamic array, and even slightly speed up the event processing. Link: https://lkml.kernel.org/r/20220704091436.3705edbf@rorschach.local.home Cc: David S. Miller Cc: netdev@vger.kernel.org Acked-by: Jakub Kicinski Reviewed-by: David Ahern Signed-off-by: Steven Rostedt (Google) include/trace/events/fib.h | 6 +++--- include/trace/events/fib6.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) commit a1732d6898ced0523cb4073c7f02d236edf312b1 Author: Micah Morton Date: Wed Jun 15 22:17:40 2022 +0000 LSM: SafeSetID: add GID testing to selftest GID security policies were added back in v5.10, update the selftest to reflect this. Signed-off-by: Micah Morton tools/testing/selftests/safesetid/safesetid-test.c | 131 +++++++++++++++++++++ 1 file changed, 131 insertions(+) commit b2927170d4fbdf30545eb482133425477625a665 Author: Micah Morton Date: Wed Jun 15 22:14:14 2022 +0000 LSM: SafeSetID: selftest cleanup and prepare for GIDs Add some notes on how to run the test, update the policy file paths to reflect recent upstream changes, prepare test for adding GID testing. Signed-off-by: Micah Morton tools/testing/selftests/safesetid/Makefile | 2 +- tools/testing/selftests/safesetid/safesetid-test.c | 93 ++++++++++++---------- 2 files changed, 51 insertions(+), 44 deletions(-) commit 92c005a1176288c98a0dc49f37376da35bbea071 Author: Micah Morton Date: Wed Jun 15 21:19:06 2022 +0000 LSM: SafeSetID: fix userns bug in selftest Not sure how this bug got in here but its been there since the original merge. I think I tested the code on a system that wouldn't let me clone() with CLONE_NEWUSER flag set so had to comment out these test_userns invocations. Trying to map UID 0 inside the userns to UID 0 outside will never work, even with CAP_SETUID. The code is supposed to test whether we can map UID 0 in the userns to the UID of the parent process (the one with CAP_SETUID that is writing the /proc/[pid]/uid_map file). Signed-off-by: Micah Morton tools/testing/selftests/safesetid/safesetid-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3f6c43d008c5ab103e00361671c456d45012547 Author: Todd Brandt Date: Thu Jul 7 15:54:51 2022 -0700 pm-graph v5.9 bootgraph: - fix parsing of /proc/version to be much more flexible - check kernel version to disallow ftrace on anything older than 4.10 sleepgraph: - include fix to bugzilla 212761 in case it regresses - fix for -proc bug: https://github.com/intel/pm-graph/pull/20 - add -debugtiming arg to get timestamps on prints - allow use of the netfix tool hosted in the github repo - read s0ix data from pmc_core for better debug - include more system data in the output log - Do a better job testing input files useability - flag more error data from dmesg in the timeline - pre-parse the trace log to fix any ordering issues - add new parser to process dmesg only timelines - remove superflous sleep(5) in multitest mode config/custom-timeline-functions.cfg: - change some names to keep up to date README: - new version, small wording changes Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki tools/power/pm-graph/README | 6 +- tools/power/pm-graph/bootgraph.py | 20 +- .../pm-graph/config/custom-timeline-functions.cfg | 2 +- tools/power/pm-graph/sleepgraph.py | 518 ++++++++++++++------- 4 files changed, 360 insertions(+), 186 deletions(-) commit 1c69bbc3c10821c9b3dbbfd35284addc2850371f Merge: e1d1ffeda697 c1ad138822a1 Author: Mark Brown Date: Fri Jul 15 18:21:09 2022 +0100 Read _SUB from ACPI to be able to identify firmware Merge series from Stefan Binding : CS35L41 has a DSP which is able to run firmware, as well as a tuning file. Different systems may want to use different firmwares and tuning files, and some firmwares/tunings may not be compatible with other systems. To allow a system to select the correct fimware/tuning, we can read an _SUB from the ACPI. This _SUB can then be used to uniquely identify the system in the firmware/tuning file name. Add a helper function which reads the _SUB, so this can be used by other parts in the future. Add support inside the CS35L41 ASoC driver to read this _SUB, and save it appropriately. commit a2f6a7ac60e234810a386aaa6aad106927c39c4f Author: Viresh Kumar Date: Thu Jul 7 15:28:31 2022 +0530 cpufreq: Warn users while freeing active policy With the new design in place, the show() and store() callbacks check if the policy is active or not before proceeding any further to avoid potential races. And in order to guarantee that cpufreq_policy_free() must be called after clearing the policy->cpus mask, i.e. by marking the policy inactive. In order to avoid introducing a bug around this later, print a warning message if we end up freeing an active policy. Also update cpufreq_online() a bit to make sure we clear the cpus mask for each error case before calling cpufreq_policy_free(). Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit f3ac888fc5fbdeeec1e084327de06a2765542d56 Author: Lukasz Luba Date: Thu Jul 7 08:15:55 2022 +0100 cpufreq: scmi: Support the power scale in micro-Watts in SCMI v3.1 The SCMI v3.1 adds support for power values in micro-Watts. They are not always in milli-Watts anymore (ignoring the bogo-Watts). Thus, the power must be converted conditionally before sending to Energy Model. Add the logic which handles the needed checks and conversions. Acked-by: Sudeep Holla Signed-off-by: Lukasz Luba Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/scmi-cpufreq.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 5e0fd2026cdd474a85b3135c312912321e60f47a Author: Lukasz Luba Date: Thu Jul 7 08:15:54 2022 +0100 firmware: arm_scmi: Get detailed power scale from perf In SCMI v3.1 the power scale can be in micro-Watts. The upper layers, e.g. cpufreq and EM should handle received power values properly (upscale when needed). Thus, provide an interface which allows to check what is the scale for power values. The old interface allowed to distinguish between bogo-Watts and milli-Watts only (which was good for older SCMI spec). Acked-by: Sudeep Holla Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki drivers/firmware/arm_scmi/perf.c | 18 +++++++++++------- include/linux/scmi_protocol.h | 8 +++++++- 2 files changed, 18 insertions(+), 8 deletions(-) commit c5d39fae8992cfca6d57e09dadf7aaaf7e64224f Author: Lukasz Luba Date: Thu Jul 7 08:15:53 2022 +0100 Documentation: EM: Switch to micro-Watts scale The EM now uses the micro-Watts scale for the power values. Update related documentation to reflect that fact. Fix also a problematic sentence in the doc "to:" which triggers test scripts complaining about wrong email address. Reviewed-by: Daniel Lezcano Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki Documentation/power/energy-model.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit ae6ccaa650380d243cf43d31c864c5ced2fd4612 Author: Lukasz Luba Date: Thu Jul 7 08:15:52 2022 +0100 PM: EM: convert power field to micro-Watts precision and align drivers The milli-Watts precision causes rounding errors while calculating efficiency cost for each OPP. This is especially visible in the 'simple' Energy Model (EM), where the power for each OPP is provided from OPP framework. This can cause some OPPs to be marked inefficient, while using micro-Watts precision that might not happen. Update all EM users which access 'power' field and assume the value is in milli-Watts. Solve also an issue with potential overflow in calculation of energy estimation on 32bit machine. It's needed now since the power value (thus the 'cost' as well) are higher. Example calculation which shows the rounding error and impact: power = 'dyn-power-coeff' * volt_mV * volt_mV * freq_MHz power_a_uW = (100 * 600mW * 600mW * 500MHz) / 10^6 = 18000 power_a_mW = (100 * 600mW * 600mW * 500MHz) / 10^9 = 18 power_b_uW = (100 * 605mW * 605mW * 600MHz) / 10^6 = 21961 power_b_mW = (100 * 605mW * 605mW * 600MHz) / 10^9 = 21 max_freq = 2000MHz cost_a_mW = 18 * 2000MHz/500MHz = 72 cost_a_uW = 18000 * 2000MHz/500MHz = 72000 cost_b_mW = 21 * 2000MHz/600MHz = 70 // <- artificially better cost_b_uW = 21961 * 2000MHz/600MHz = 73203 The 'cost_b_mW' (which is based on old milli-Watts) is misleadingly better that the 'cost_b_uW' (this patch uses micro-Watts) and such would have impact on the 'inefficient OPPs' information in the Cpufreq framework. This patch set removes the rounding issue. Signed-off-by: Lukasz Luba Acked-by: Daniel Lezcano Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/mediatek-cpufreq-hw.c | 7 +++-- drivers/cpufreq/scmi-cpufreq.c | 6 ++++ drivers/opp/of.c | 15 +++++----- drivers/powercap/dtpm_cpu.c | 5 ++-- drivers/thermal/cpufreq_cooling.c | 13 +++++++-- drivers/thermal/devfreq_cooling.c | 19 +++++++++--- include/linux/energy_model.h | 54 ++++++++++++++++++++++++----------- kernel/power/energy_model.c | 24 ++++++++++------ 8 files changed, 100 insertions(+), 43 deletions(-) commit a2a5580fcbf808e7c2310e4959b62f9d2157fdb6 Author: Ben Dooks Date: Thu Jul 14 11:03:22 2022 +0100 bpf: Fix check against plain integer v 'NULL' When checking with sparse, btf_show_type_value() is causing a warning about checking integer vs NULL when the macro is passed a pointer, due to the 'value != 0' check. Stop sparse complaining about any type-casting by adding a cast to the typeof(value). This fixes the following sparse warnings: kernel/bpf/btf.c:2579:17: warning: Using plain integer as NULL pointer kernel/bpf/btf.c:2581:17: warning: Using plain integer as NULL pointer kernel/bpf/btf.c:3407:17: warning: Using plain integer as NULL pointer kernel/bpf/btf.c:3758:9: warning: Using plain integer as NULL pointer Signed-off-by: Ben Dooks Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220714100322.260467-1-ben.dooks@sifive.com kernel/bpf/btf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ca24fef0f2c857b0533f21f9a8a756f9e73d60fb Author: Benjamin Gaignard Date: Fri Jul 8 17:21:56 2022 +0100 media: uapi: move HEVC stateless controls out of staging HEVC uAPI is used by 2 mainline drivers (Hantro, Cedrus) and at least 2 out-of-tree drivers (rkvdec, RPi). The uAPI has been reviewed so it is time to make it 'public' by un-staging it. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Acked-by: Nicolas Dufresne Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/v4l/ext-ctrls-codec-stateless.rst | 902 ++++++++++++++++++++ .../userspace-api/media/v4l/ext-ctrls-codec.rst | 906 --------------------- .../userspace-api/media/v4l/pixfmt-compressed.rst | 2 +- .../userspace-api/media/v4l/vidioc-g-ext-ctrls.rst | 20 + include/media/hevc-ctrls.h | 474 ----------- include/media/v4l2-ctrls.h | 6 - include/uapi/linux/v4l2-controls.h | 459 +++++++++++ include/uapi/linux/videodev2.h | 5 + 8 files changed, 1387 insertions(+), 1387 deletions(-) commit e7060d9a78c278f41d196d06df8879230038e508 Author: Benjamin Gaignard Date: Fri Jul 8 17:21:55 2022 +0100 media: uapi: Change data_bit_offset definition 'F.7.3.6.1 General slice segment header syntax' section of HEVC specification describes that a slice header always end aligned on byte boundary, therefore we only need to provide the data offset in bytes. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Acked-by: Nicolas Dufresne Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../userspace-api/media/v4l/ext-ctrls-codec.rst | 4 ++-- drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 19 ++++++++++++++++++- drivers/staging/media/sunxi/cedrus/cedrus_video.c | 1 - include/media/hevc-ctrls.h | 4 ++-- 4 files changed, 22 insertions(+), 6 deletions(-) commit 13789e30704908a6bf743d338f663b0468e204c7 Author: Benjamin Gaignard Date: Fri Jul 8 17:21:54 2022 +0100 media: uapi: HEVC: fix padding in v4l2 control structures Fix padding where needed to remove holes Signed-off-by: Benjamin Gaignard Acked-by: Nicolas Dufresne Tested-by: Jernej Skrabec Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../userspace-api/media/v4l/ext-ctrls-codec.rst | 6 +++--- drivers/media/v4l2-core/v4l2-ctrls-core.c | 15 --------------- include/media/hevc-ctrls.h | 22 ++++++++++++++-------- 3 files changed, 17 insertions(+), 26 deletions(-) commit 3360755ef89ab2a46c58b07c38c6b97bcdc31d85 Author: Benjamin Gaignard Date: Fri Jul 8 17:21:53 2022 +0100 media: hantro: Stop using Hantro dedicated control The number of bits to skip in the slice header can be computed in the driver by using sps, pps and decode_params information. This makes it possible to remove Hantro dedicated control. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Acked-by: Nicolas Dufresne Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro_drv.c | 36 ---------------------- drivers/staging/media/hantro/hantro_g2_hevc_dec.c | 37 ++++++++++++++++++++++- include/media/hevc-ctrls.h | 13 -------- 3 files changed, 36 insertions(+), 50 deletions(-) commit 0a64f5f97ae957ebddc9bffb1101cdacf3ebf9ff Author: Benjamin Gaignard Date: Fri Jul 8 17:21:52 2022 +0100 media: controls: Log HEVC stateless control in .std_log Simply print the type of the control. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Acked-by: Nicolas Dufresne Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls-core.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 16e2d220cdc64a1518878172dc7b50d4f60e5aac Author: Benjamin Gaignard Date: Fri Jul 8 17:21:51 2022 +0100 media: uapi: Move the HEVC stateless control type out of staging Move the HEVC stateless controls types out of staging, and re-number them. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Acked-by: Nicolas Dufresne Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/userspace-api/media/videodev2.h.rst.exceptions | 5 +++++ include/media/hevc-ctrls.h | 7 ------- include/uapi/linux/videodev2.h | 6 ++++++ 3 files changed, 11 insertions(+), 7 deletions(-) commit 01dcfd53335cfb5c66a6c023ac0f789a5b87ace5 Author: Benjamin Gaignard Date: Fri Jul 8 17:21:49 2022 +0100 media: uapi: Move parsed HEVC pixel format out of staging Move HEVC pixel format since we are ready to stabilize the uAPI Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Acked-by: Nicolas Dufresne Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/userspace-api/media/v4l/pixfmt-compressed.rst | 5 ----- include/media/hevc-ctrls.h | 3 --- include/uapi/linux/videodev2.h | 1 + 3 files changed, 1 insertion(+), 8 deletions(-) commit 311027bd13eb676d6025eb2414ff867dd09500e9 Author: Benjamin Gaignard Date: Fri Jul 8 18:21:50 2022 +0200 media: uapi: Add V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS control The number of 'entry point offset' can be very variable. Instead of using a large static array define a v4l2 dynamic array of U32 (V4L2_CTRL_TYPE_U32). The number of entry point offsets is reported by the elems field and in struct v4l2_ctrl_hevc_slice_params.num_entry_point_offsets field. Signed-off-by: Benjamin Gaignard Acked-by: Nicolas Dufresne Tested-by: Jernej Skrabec Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../userspace-api/media/v4l/ext-ctrls-codec.rst | 16 ++++++++++++++++ drivers/media/v4l2-core/v4l2-ctrls-defs.c | 5 +++++ include/media/hevc-ctrls.h | 5 ++++- 3 files changed, 25 insertions(+), 1 deletion(-) commit 0828c4a39be57768b8788e8cbd0d84683ea757e5 Author: Michal Suchanek Date: Thu Jul 14 21:40:27 2022 +0800 kexec, KEYS, s390: Make use of built-in and secondary keyring for signature verification commit e23a8020ce4e ("s390/kexec_file: Signature verification prototype") adds support for KEXEC_SIG verification with keys from platform keyring but the built-in keys and secondary keyring are not used. Add support for the built-in keys and secondary keyring as x86 does. Fixes: e23a8020ce4e ("s390/kexec_file: Signature verification prototype") Cc: stable@vger.kernel.org Cc: Philipp Rudo Cc: kexec@lists.infradead.org Cc: keyrings@vger.kernel.org Cc: linux-security-module@vger.kernel.org Signed-off-by: Michal Suchanek Reviewed-by: "Lee, Chun-Yi" Acked-by: Baoquan He Signed-off-by: Coiby Xu Acked-by: Heiko Carstens Signed-off-by: Mimi Zohar arch/s390/kernel/machine_kexec_file.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 0d519cadf75184a24313568e7f489a7fc9b1be3b Author: Coiby Xu Date: Thu Jul 14 21:40:26 2022 +0800 arm64: kexec_file: use more system keyrings to verify kernel image signature Currently, when loading a kernel image via the kexec_file_load() system call, arm64 can only use the .builtin_trusted_keys keyring to verify a signature whereas x86 can use three more keyrings i.e. .secondary_trusted_keys, .machine and .platform keyrings. For example, one resulting problem is kexec'ing a kernel image would be rejected with the error "Lockdown: kexec: kexec of unsigned images is restricted; see man kernel_lockdown.7". This patch set enables arm64 to make use of the same keyrings as x86 to verify the signature kexec'ed kernel image. Fixes: 732b7b93d849 ("arm64: kexec_file: add kernel signature verification support") Cc: stable@vger.kernel.org # 105e10e2cf1c: kexec_file: drop weak attribute from functions Cc: stable@vger.kernel.org # 34d5960af253: kexec: clean up arch_kexec_kernel_verify_sig Cc: stable@vger.kernel.org # 83b7bb2d49ae: kexec, KEYS: make the code in bzImage64_verify_sig generic Acked-by: Baoquan He Cc: kexec@lists.infradead.org Cc: keyrings@vger.kernel.org Cc: linux-security-module@vger.kernel.org Co-developed-by: Michal Suchanek Signed-off-by: Michal Suchanek Acked-by: Will Deacon Signed-off-by: Coiby Xu Signed-off-by: Mimi Zohar arch/arm64/kernel/kexec_image.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit c903dae8941deb55043ee46ded29e84e97cd84bb Author: Coiby Xu Date: Thu Jul 14 21:40:25 2022 +0800 kexec, KEYS: make the code in bzImage64_verify_sig generic commit 278311e417be ("kexec, KEYS: Make use of platform keyring for signature verify") adds platform keyring support on x86 kexec but not arm64. The code in bzImage64_verify_sig uses the keys on the .builtin_trusted_keys, .machine, if configured and enabled, .secondary_trusted_keys, also if configured, and .platform keyrings to verify the signed kernel image as PE file. Cc: kexec@lists.infradead.org Cc: keyrings@vger.kernel.org Cc: linux-security-module@vger.kernel.org Reviewed-by: Michal Suchanek Signed-off-by: Coiby Xu Signed-off-by: Mimi Zohar arch/x86/kernel/kexec-bzimage64.c | 20 +------------------- include/linux/kexec.h | 7 +++++++ kernel/kexec_file.c | 17 +++++++++++++++++ 3 files changed, 25 insertions(+), 19 deletions(-) commit 689a71493bd2f31c024f8c0395f85a1fd4b2138e Author: Coiby Xu Date: Thu Jul 14 21:40:24 2022 +0800 kexec: clean up arch_kexec_kernel_verify_sig Before commit 105e10e2cf1c ("kexec_file: drop weak attribute from functions"), there was already no arch-specific implementation of arch_kexec_kernel_verify_sig. With weak attribute dropped by that commit, arch_kexec_kernel_verify_sig is completely useless. So clean it up. Note later patches are dependent on this patch so it should be backported to the stable tree as well. Cc: stable@vger.kernel.org Suggested-by: Eric W. Biederman Reviewed-by: Michal Suchanek Acked-by: Baoquan He Signed-off-by: Coiby Xu [zohar@linux.ibm.com: reworded patch description "Note"] Link: https://lore.kernel.org/linux-integrity/20220714134027.394370-1-coxu@redhat.com/ Signed-off-by: Mimi Zohar include/linux/kexec.h | 5 ----- kernel/kexec_file.c | 33 +++++++++++++-------------------- 2 files changed, 13 insertions(+), 25 deletions(-) commit 0738eceb6201691534df07e0928d0a6168a35787 Author: Naveen N. Rao Date: Fri Jul 1 13:04:05 2022 +0530 kexec: drop weak attribute from functions Drop __weak attribute from functions in kexec_core.c: - machine_kexec_post_load() - arch_kexec_protect_crashkres() - arch_kexec_unprotect_crashkres() - crash_free_reserved_phys_range() Link: https://lkml.kernel.org/r/c0f6219e03cb399d166d518ab505095218a902dd.1656659357.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Naveen N. Rao Suggested-by: Eric Biederman Signed-off-by: Andrew Morton Signed-off-by: Mimi Zohar arch/arm64/include/asm/kexec.h | 16 ++++++++++++++-- arch/powerpc/include/asm/kexec.h | 5 +++++ arch/s390/include/asm/kexec.h | 11 +++++++++++ arch/x86/include/asm/kexec.h | 6 ++++++ include/linux/kexec.h | 32 ++++++++++++++++++++++++++++---- kernel/kexec_core.c | 27 --------------------------- 6 files changed, 64 insertions(+), 33 deletions(-) commit 65d9a9a60fd71be964effb2e94747a6acb6e7015 Author: Naveen N. Rao Date: Fri Jul 1 13:04:04 2022 +0530 kexec_file: drop weak attribute from functions As requested (http://lkml.kernel.org/r/87ee0q7b92.fsf@email.froward.int.ebiederm.org), this series converts weak functions in kexec to use the #ifdef approach. Quoting the 3e35142ef99fe ("kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]") changelog: : Since commit d1bcae833b32f1 ("ELF: Don't generate unused section symbols") : [1], binutils (v2.36+) started dropping section symbols that it thought : were unused. This isn't an issue in general, but with kexec_file.c, gcc : is placing kexec_arch_apply_relocations[_add] into a separate : .text.unlikely section and the section symbol ".text.unlikely" is being : dropped. Due to this, recordmcount is unable to find a non-weak symbol in : .text.unlikely to generate a relocation record against. This patch (of 2); Drop __weak attribute from functions in kexec_file.c: - arch_kexec_kernel_image_probe() - arch_kimage_file_post_load_cleanup() - arch_kexec_kernel_image_load() - arch_kexec_locate_mem_hole() - arch_kexec_kernel_verify_sig() arch_kexec_kernel_image_load() calls into kexec_image_load_default(), so drop the static attribute for the latter. arch_kexec_kernel_verify_sig() is not overridden by any architecture, so drop the __weak attribute. Link: https://lkml.kernel.org/r/cover.1656659357.git.naveen.n.rao@linux.vnet.ibm.com Link: https://lkml.kernel.org/r/2cd7ca1fe4d6bb6ca38e3283c717878388ed6788.1656659357.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Naveen N. Rao Suggested-by: Eric Biederman Signed-off-by: Andrew Morton Signed-off-by: Mimi Zohar arch/arm64/include/asm/kexec.h | 4 +++- arch/powerpc/include/asm/kexec.h | 9 ++++++++ arch/s390/include/asm/kexec.h | 3 +++ arch/x86/include/asm/kexec.h | 6 ++++++ include/linux/kexec.h | 44 ++++++++++++++++++++++++++++++++++------ kernel/kexec_file.c | 35 ++------------------------------ 6 files changed, 61 insertions(+), 40 deletions(-) commit ba4c6a1a8f1b3a178a67fd3ceffa876971a5789f Author: Pierre-Louis Bossart Date: Fri Jul 15 09:41:44 2022 -0500 ASoC: SOF: Intel: enable dmic handling with 2 or fewer SoundWire links When PCH-attached DMICs are used on a SoundWire-based platform, all known devices pin-mux SoundWire link2 and link3 with DMIC, and only use link0 and link1 for SoundWire. The HP Omen16 is the first exception to the rule, with SoundWire using link0 and link3. Rather than using a fixed mask, let's count the number of SoundWire links used. BugLink: https://github.com/thesofproject/sof/issues/5966 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220715144144.274770-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f7bbdf5bcc6ec66efa010aed77eaf5a90faf6ba5 Author: Pierre-Louis Bossart Date: Fri Jul 15 09:41:43 2022 -0500 ASoC: Intel: sof_sdw: add quirk for HP Omen 16-k0005TX The JD2 jack detection was selected based on similar settings from other platforms based on RT711-SDCA. BugLink: https://github.com/thesofproject/sof/issues/5955 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220715144144.274770-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 8d38cc2997c55a877dac2672a92f221fe59e4c9e Author: Pierre-Louis Bossart Date: Fri Jul 15 09:41:42 2022 -0500 ASoC: Intel: soc-acpi: add table for HP Omen 16-k0005TX This device has an RT711-SDCA headset codec on link0 and an RT1316 amplifier on link3. BugLink: https://github.com/thesofproject/sof/issues/5955 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220715144144.274770-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/common/soc-acpi-intel-adl-match.c | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 8116483407076b81af0efb14f6d69aefaecbf3d8 Author: Pierre-Louis Bossart Date: Fri Jul 15 09:41:41 2022 -0500 ASoC: Intel: sof_sdw: avoid oops in error handling While tinkering with ACPI work-arounds for the HP Omen 16 support, we identified a corner case where the headset codec device properties are not set in the codec .init when -EPROBE_DEFER is returned, but released unconditionally in the .exit(). This leads to a kernel oops [ 4.186891] sof_sdw sof_sdw: snd_soc_register_card failed -517 [ 4.186896] BUG: kernel NULL pointer dereference, address: 00000000000003f0 [ 4.186914] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 4.186926] RIP: 0010:dev_fwnode+0x5/0x20 [ 4.186974] device_remove_software_node+0x10/0x80 [ 4.186982] sof_sdw_rt711_exit+0x19/0x30 [snd_soc_sof_sdw] [ 4.186990] mc_dailink_exit_loop+0x94/0xc0 [snd_soc_sof_sdw] [ 4.186996] ? rt711_rtd_init+0x170/0x170 [snd_soc_sof_sdw] A similar error case can occur if the addition of the device property fails. We need to test if the property was successfully added before removing it. BugLink: https://github.com/thesofproject/linux/issues/3727 Fixes: 768ad6d80db2d ("ASoC: Intel: sof_sdw: handle errors on card registration") Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220715144144.274770-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw_rt711.c | 3 +++ sound/soc/intel/boards/sof_sdw_rt711_sdca.c | 3 +++ 2 files changed, 6 insertions(+) commit 7ee951acd31a88f941fd6535fbdee3a1567f1d63 Author: Phil Auld Date: Fri Jul 15 09:49:24 2022 -0400 drivers/base: fix userspace break from using bin_attributes for cpumap and cpulist Using bin_attributes with a 0 size causes fstat and friends to return that 0 size. This breaks userspace code that retrieves the size before reading the file. Rather than reverting 75bd50fa841 ("drivers/base/node.c: use bin_attribute to break the size limitation of cpumap ABI") let's put in a size value at compile time. For cpulist the maximum size is on the order of NR_CPUS * (ceil(log10(NR_CPUS)) + 1)/2 which for 8192 is 20480 (8192 * 5)/2. In order to get near that you'd need a system with every other CPU on one node. For example: (0,2,4,8, ... ). To simplify the math and support larger NR_CPUS in the future we are using (NR_CPUS * 7)/2. We also set it to a min of PAGE_SIZE to retain the older behavior for smaller NR_CPUS. The cpumap file the size works out to be NR_CPUS/4 + NR_CPUS/32 - 1 (or NR_CPUS * 9/32 - 1) including the ","s. Add a set of macros for these values to cpumask.h so they can be used in multiple places. Apply these to the handful of such files in drivers/base/topology.c as well as node.c. As an example, on an 80 cpu 4-node system (NR_CPUS == 8192): before: -r--r--r--. 1 root root 0 Jul 12 14:08 system/node/node0/cpulist -r--r--r--. 1 root root 0 Jul 11 17:25 system/node/node0/cpumap after: -r--r--r--. 1 root root 28672 Jul 13 11:32 system/node/node0/cpulist -r--r--r--. 1 root root 4096 Jul 13 11:31 system/node/node0/cpumap CONFIG_NR_CPUS = 16384 -r--r--r--. 1 root root 57344 Jul 13 14:03 system/node/node0/cpulist -r--r--r--. 1 root root 4607 Jul 13 14:02 system/node/node0/cpumap The actual number of cpus doesn't matter for the reported size since they are based on NR_CPUS. Fixes: 75bd50fa841d ("drivers/base/node.c: use bin_attribute to break the size limitation of cpumap ABI") Fixes: bb9ec13d156e ("topology: use bin_attribute to break the size limitation of cpumap ABI") Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Yury Norov Cc: stable@vger.kernel.org Acked-by: Yury Norov (for include/linux/cpumask.h) Signed-off-by: Phil Auld Link: https://lore.kernel.org/r/20220715134924.3466194-1-pauld@redhat.com Signed-off-by: Greg Kroah-Hartman drivers/base/node.c | 4 ++-- drivers/base/topology.c | 32 ++++++++++++++++---------------- include/linux/cpumask.h | 18 ++++++++++++++++++ 3 files changed, 36 insertions(+), 18 deletions(-) commit a8755e9bdd6a416331e286cc25cddbd93b2c064a Author: Dinh Nguyen Date: Fri Jul 15 10:03:49 2022 -0500 firmware: stratix10-svc: fix kernel-doc warning include/linux/firmware/intel/stratix10-svc-client.h:55: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Flag bit for COMMAND_RECONFIG Fixes: 4a4709d470e6 ("firmware: stratix10-svc: add new FCS commands") Signed-off-by: Dinh Nguyen Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20220715150349.2413994-1-dinguyen@kernel.org Signed-off-by: Greg Kroah-Hartman include/linux/firmware/intel/stratix10-svc-client.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 869ba3c8bba7aa1f0d33bf1979c8b81c2bfe2c93 Author: Benjamin Gaignard Date: Fri Jul 8 17:21:48 2022 +0100 media: uapi: HEVC: Define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS as a dynamic array Make explicit that V4L2_CID_STATELESS_HEVC_SLICE_PARAMS control is a dynamic array control type. Some drivers may be able to receive multiple slices in one control to improve decoding performance. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst | 2 ++ drivers/media/v4l2-core/v4l2-ctrls-defs.c | 1 + drivers/staging/media/sunxi/cedrus/cedrus.c | 2 ++ include/media/hevc-ctrls.h | 3 +++ 4 files changed, 8 insertions(+) commit 625e9ab479a79366fb770f5762f5ded1a1351891 Author: Benjamin Gaignard Date: Fri Jul 8 17:21:47 2022 +0100 media: uapi: HEVC: Add documentation to uAPI structure Add kernel-doc documentation for all the HEVC structures. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Acked-by: Nicolas Dufresne Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../userspace-api/media/v4l/ext-ctrls-codec.rst | 168 +++++++++------- include/media/hevc-ctrls.h | 221 ++++++++++++++++++++- 2 files changed, 313 insertions(+), 76 deletions(-) commit 3a2ba42cbd0b669ce3837ba400905f93dd06c79f Author: Alexander Lobakin Date: Fri Jul 15 17:15:36 2022 +0200 x86/olpc: fix 'logical not is only applied to the left hand side' The bitops compile-time optimization series revealed one more problem in olpc-xo1-sci.c:send_ebook_state(), resulted in GCC warnings: arch/x86/platform/olpc/olpc-xo1-sci.c: In function 'send_ebook_state': arch/x86/platform/olpc/olpc-xo1-sci.c:83:63: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] 83 | if (!!test_bit(SW_TABLET_MODE, ebook_switch_idev->sw) == state) | ^~ arch/x86/platform/olpc/olpc-xo1-sci.c:83:13: note: add parentheses around left hand side expression to silence this warning Despite this code working as intended, this redundant double negation of boolean value, together with comparing to `char` with no explicit conversion to bool, makes compilers think the author made some unintentional logical mistakes here. Make it the other way around and negate the char instead to silence the warnings. Fixes: d2aa37411b8e ("x86/olpc/xo1/sci: Produce wakeup events for buttons and switches") Cc: stable@vger.kernel.org # 3.5+ Reported-by: Guenter Roeck Reported-by: kernel test robot Reviewed-and-tested-by: Guenter Roeck Signed-off-by: Alexander Lobakin Signed-off-by: Yury Norov arch/x86/platform/olpc/olpc-xo1-sci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24aab5985fdec281c013368077323b5f4e5de2c3 Author: Benjamin Gaignard Date: Fri Jul 8 17:21:46 2022 +0100 media: uapi: HEVC: Add SEI pic struct flags The possible values for the field_pic field in the v4l2_hevc_dpb_entry structure are defined in the table D.2 in HEVC specification section D.3.3. Add flags and documentation for each of them. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Acked-by: Nicolas Dufresne Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../userspace-api/media/v4l/ext-ctrls-codec.rst | 54 ++++++++++++++++++++++ include/media/hevc-ctrls.h | 14 ++++++ 2 files changed, 68 insertions(+) commit c4a179c7167ee16aad1267f9c99bc1ecff475585 Author: Benjamin Gaignard Date: Fri Jul 8 17:21:45 2022 +0100 media: uapi: HEVC: Change pic_order_cnt definition in v4l2_hevc_dpb_entry The HEVC specification describes the following: "PicOrderCntVal is derived as follows: PicOrderCntVal = PicOrderCntMsb + slice_pic_order_cnt_lsb The value of PicOrderCntVal shall be in the range of −2^31 to 2^31 − 1, inclusive." To match with these definitions change __u16 pic_order_cnt[2] into __s32 pic_order_cnt_val. Change v4l2_ctrl_hevc_slice_params->slice_pic_order_cnt to __s32 too. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Acked-by: Nicolas Dufresne Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst | 2 +- drivers/staging/media/hantro/hantro_g2_hevc_dec.c | 7 +++---- drivers/staging/media/hantro/hantro_hevc.c | 2 +- drivers/staging/media/hantro/hantro_hw.h | 4 ++-- drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 4 ++-- include/media/hevc-ctrls.h | 4 ++-- 6 files changed, 11 insertions(+), 12 deletions(-) commit b92de2f91821ce3874d67751cc062dda007c0366 Author: Benjamin Gaignard Date: Fri Jul 8 17:21:44 2022 +0100 media: uapi: HEVC: Rename HEVC stateless controls with STATELESS prefix Change HEVC stateless controls names to V4L2_CID_STATELESS_HEVC instead of V4L2_CID_MPEG_VIDEO_HEVC be coherent with v4l2 naming convention. Signed-off-by: Benjamin Gaignard Reviewed-by: Nicolas Dufresne Reviewed-by: Ezequiel Garcia Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../userspace-api/media/v4l/ext-ctrls-codec.rst | 26 +++++++++--------- drivers/media/v4l2-core/v4l2-ctrls-defs.c | 32 +++++++++++----------- drivers/staging/media/hantro/hantro_drv.c | 26 +++++++++--------- drivers/staging/media/hantro/hantro_hevc.c | 8 +++--- drivers/staging/media/sunxi/cedrus/cedrus.c | 24 ++++++++-------- drivers/staging/media/sunxi/cedrus/cedrus_dec.c | 10 +++---- include/media/hevc-ctrls.h | 26 +++++++++--------- 7 files changed, 76 insertions(+), 76 deletions(-) commit 9763fe6c5229d80d22e21603aa36bc39269d0edd Author: Benjamin Gaignard Date: Fri Jul 8 17:21:43 2022 +0100 media: uapi: HEVC: Add missing fields in HEVC controls Complete the HEVC controls with missing fields from H.265 specifications. Even if these fields aren't used by the current mainlined drivers they will be required for (at least) the rkvdec driver. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Acked-by: Nicolas Dufresne Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../userspace-api/media/v4l/ext-ctrls-codec.rst | 32 ++++++++++++++++++++++ include/media/hevc-ctrls.h | 8 +++++- 2 files changed, 39 insertions(+), 1 deletion(-) commit e17d02695f43bab8e7ae9e70be5b3d970ded3ff6 Author: Hans Verkuil Date: Fri Jul 8 17:21:42 2022 +0100 media: vivid: add dynamic array test control Add a dynamic array test control to help test support for this feature. Acked-by: Nicolas Dufresne Tested-by: Benjamin Gaignard Tested-by: Jernej Skrabec Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/test-drivers/vivid/vivid-ctrls.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit fb582cba44928f78e56047d11a08dad570e97ae8 Author: Hans Verkuil Date: Fri Jul 8 17:21:41 2022 +0100 media: v4l2-ctrls: add support for dynamically allocated arrays. Implement support for dynamically allocated arrays. Most of the changes concern keeping track of the number of elements of the array and the number of elements allocated for the array and reallocating memory if needed. Acked-by: Benjamin Gaignard Acked-by: Nicolas Dufresne Tested-by: Benjamin Gaignard Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls-api.c | 103 +++++++++++---- drivers/media/v4l2-core/v4l2-ctrls-core.c | 182 ++++++++++++++++++++++----- drivers/media/v4l2-core/v4l2-ctrls-priv.h | 3 +- drivers/media/v4l2-core/v4l2-ctrls-request.c | 13 +- include/media/v4l2-ctrls.h | 42 +++++-- 5 files changed, 272 insertions(+), 71 deletions(-) commit 64fe675e999c2c7d753ecaaa1349693c59ce6c11 Author: Hans Verkuil Date: Fri Jul 8 17:21:40 2022 +0100 media: videodev2.h: add V4L2_CTRL_FLAG_DYNAMIC_ARRAY Add a new flag that indicates that this control is a dynamically sized array. Also document this flag. Currently dynamically sized arrays are limited to one dimensional arrays, but that might change in the future if there is a need for it. The initial use-case of dynamic arrays are stateless codecs. A frame can be divided in many slices, so you want to provide an array containing slice information for each slice. Typically the number of slices is small, but the standard allow for hundreds or thousands of slices. Dynamic arrays are a good solution since sizing the array for the worst case would waste substantial amounts of memory. Acked-by: Nicolas Dufresne Tested-by: Benjamin Gaignard Tested-by: Jernej Skrabec Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst | 8 ++++++++ Documentation/userspace-api/media/videodev2.h.rst.exceptions | 1 + include/uapi/linux/videodev2.h | 1 + 3 files changed, 10 insertions(+) commit 009c963eefa058384052d32d5b06fbc738195bdb Merge: 33f033dc30d9 e3305daad62c Author: Georgi Djakov Date: Fri Jul 15 17:56:31 2022 +0300 Merge branch 'icc-rpm' into icc-next This patch set is to support bucket in icc-rpm driver, so it implements the similar mechanism in the icc-rpmh driver. It uses interconnect path tag to indicate the bandwidth voting is for which buckets, and there have three kinds of buckets: AWC, WAKE and SLEEP, finally the wake and sleep bucket values are used to set the corresponding clock (active and sleep clocks). So far, we keep the AWC bucket but doesn't really use it. Link: https://lore.kernel.org/r/20220712015929.2789881-1-leo.yan@linaro.org Signed-off-by: Georgi Djakov commit 33f033dc30d92a00b2b0f0f67a8ad46fde269bf3 Merge: 2be9e8470709 9760660e866d Author: Georgi Djakov Date: Fri Jul 15 17:55:48 2022 +0300 Merge branch 'icc-imx8mp' into icc-next This patchset is to support i.MX8MP NoC settings, i.MX8MP NoC initial value after power up is invalid, need set a valid value after related power domain up. This patchset also includes two patch[1,2] during my development to enable the ICC feature for i.MX8MP. I not include ddrc DVFS in this patchset, ths patchset is only to support NoC value mode/priority/ext_control being set to a valid value that suggested by i.MX Chip Design Team. The value is same as NXP downstream one inside Arm Trusted Firmware: https://source.codeaurora.org/external/imx/imx-atf/tree/plat/imx/imx8m/i/gpc.c?h=lf_v2.4#n97 Link: https://lore.kernel.org/r/20220703091132.1412063-1-peng.fan@oss.nxp.com Signed-off-by: Georgi Djakov commit 9760660e866d643817c3bf21e6dc20837a1052c4 Author: Peng Fan Date: Sun Jul 3 17:11:31 2022 +0800 PM / devfreq: imx: Register i.MX8MP interconnect device Same to i.MX8MM/N/Q, register i.MX8MP interconnect device to make i.MX8MP Interconnect driver work. Signed-off-by: Peng Fan Acked-by: Chanwoo Choi Link: https://lore.kernel.org/r/20220703091132.1412063-10-peng.fan@oss.nxp.com Signed-off-by: Georgi Djakov drivers/devfreq/imx-bus.c | 1 + 1 file changed, 1 insertion(+) commit c14ec5c93dc8f6e05abee962243bda9dc104567b Author: Peng Fan Date: Sun Jul 3 17:11:30 2022 +0800 interconnect: imx: Add platform driver for imx8mp Add a platform driver for the i.MX8MP SoC describing bus topology, based on internal documentation. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20220703091132.1412063-9-peng.fan@oss.nxp.com Signed-off-by: Georgi Djakov drivers/interconnect/imx/Kconfig | 4 + drivers/interconnect/imx/Makefile | 2 + drivers/interconnect/imx/imx8mp.c | 259 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 265 insertions(+) commit 7980d85a9443029c39a9d131c13732258e44a8de Author: Peng Fan Date: Sun Jul 3 17:11:29 2022 +0800 interconnect: imx: configure NoC mode/prioriry/ext_control Introduce imx_icc_noc_setting structure to describe a master port setting Pass imx_icc_noc_setting as a parameter from specific driver Set priority level, mode, ext control in imx_icc_node_set Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20220703091132.1412063-8-peng.fan@oss.nxp.com Signed-off-by: Georgi Djakov drivers/interconnect/imx/imx.c | 50 +++++++++++++++++++++++++++++++++++---- drivers/interconnect/imx/imx.h | 43 ++++++++++++++++++++++++++++++++- drivers/interconnect/imx/imx8mm.c | 2 +- drivers/interconnect/imx/imx8mn.c | 2 +- drivers/interconnect/imx/imx8mq.c | 2 +- 5 files changed, 90 insertions(+), 9 deletions(-) commit 12db59e8e0a2472307f47586f7767054a46d95f5 Author: Peng Fan Date: Sun Jul 3 17:11:28 2022 +0800 interconnect: imx: introduce imx_icc_provider Introduce imx_icc_provider as a wrapper of icc_provider to add i.MX specific information. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20220703091132.1412063-7-peng.fan@oss.nxp.com Signed-off-by: Georgi Djakov drivers/interconnect/imx/imx.c | 24 ++++++++++++++---------- drivers/interconnect/imx/imx.h | 6 ++++++ 2 files changed, 20 insertions(+), 10 deletions(-) commit 6eeaf28c798541e97da0ab7c42b537836de082e0 Author: Peng Fan Date: Sun Jul 3 17:11:27 2022 +0800 interconnect: imx: set src node When set QoS for a icc path, only set dst icc node is not enough, also need to set src icc node. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20220703091132.1412063-6-peng.fan@oss.nxp.com Signed-off-by: Georgi Djakov drivers/interconnect/imx/imx.c | 6 ++++++ 1 file changed, 6 insertions(+) commit bd734481e172b4827af09c9ab06c51d2ab7201e6 Author: Peng Fan Date: Sun Jul 3 17:11:26 2022 +0800 interconnect: imx: fix max_node_id max_node_id not equal to the ARRAY_SIZE of node array, need increase 1, otherwise xlate will fail for the last entry. And rename max_node_id to num_nodes to reflect the reality. Fixes: f0d8048525d7d ("interconnect: Add imx core driver") Reviewed-by: Laurent Pinchart Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20220703091132.1412063-5-peng.fan@oss.nxp.com Signed-off-by: Georgi Djakov drivers/interconnect/imx/imx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b228cf38f0b72d797fab60386da7ee935e033aac Author: Vikash Garodia Date: Wed Jul 13 12:59:36 2022 +0100 media: venus: set ubwc configuration on specific video hardware UBWC configuration parameters would vary across video hardware generations. At the same time, driver is expected to configure these parameters, without relying on video firmware to use the default configurations. Setting the configuration parameters for sc7280. Signed-off-by: Vikash Garodia Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/core.c | 5 +++++ drivers/media/platform/qcom/venus/core.h | 2 ++ drivers/media/platform/qcom/venus/hfi_cmds.c | 9 +++++++++ drivers/media/platform/qcom/venus/hfi_cmds.h | 1 + drivers/media/platform/qcom/venus/hfi_helper.h | 20 ++++++++++++++++++++ drivers/media/platform/qcom/venus/hfi_venus.c | 26 ++++++++++++++++++++++++++ 6 files changed, 63 insertions(+) commit b4d1d5c65de9ac85b0d6cb11c80caad0178b303e Author: Hans Verkuil Date: Tue Jul 12 11:47:15 2022 +0100 media: venus: venus_helper_get_bufreq(): req is never NULL Fix a smatch error: drivers/media/platform/qcom/venus/helpers.c: drivers/media/platform/qcom/venus/helpers.c:678 venus_helper_get_bufreq() error: we previously assumed 'req' could be null (see line 674) After checking how venus_helper_get_bufreq() is called it is clear that req is never NULL, so just drop the checks. Signed-off-by: Hans Verkuil Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/helpers.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 109670df7dfed3fa0cb33e0868a889f4f512b698 Author: Tommaso Merciai Date: Wed Jul 13 16:05:06 2022 +0100 media: ov5693: add ov5693_of_match, dts support Add ov5693_of_match. Device tree support Signed-off-by: Tommaso Merciai Reviewed-by: Jacopo Mondi Reviewed-by: Daniel Scally Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5693.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6b9ab6ab7d7d74ee03528d8cb4593a140e2fe3c8 Author: Tommaso Merciai Date: Wed Jul 13 16:05:05 2022 +0100 media: dt-bindings: ov5693: document YAML binding Add documentation of device tree in YAML schema for the OV5693 CMOS image sensor from Omnivision Signed-off-by: Tommaso Merciai Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/ovti,ov5693.yaml | 124 +++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 125 insertions(+) commit 88b0c212e358444b0e0710163c0f8d75a6296561 Author: Tommaso Merciai Date: Wed Jul 13 16:05:04 2022 +0100 media: ov5693: add support for acpi clock-frequency prop Add support for ACPI-based platforms that specify the clock frequency by using the "clock-frequency" property instead of specifying a clock provider reference Signed-off-by: Tommaso Merciai Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5693.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 8a47d09eda479912c3518e99636b5de8665f33c0 Author: Tommaso Merciai Date: Wed Jul 13 16:05:03 2022 +0100 media: ov5693: rename clk into xvclk Rename clk pdata pointer into xvclk (system clock input). Same for clk_rate into xvclk_rate. This is more explicit Signed-off-by: Tommaso Merciai Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5693.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 6ae8701f53a5e5f3d53624316256cd436ff41bbd Author: Tommaso Merciai Date: Wed Jul 13 16:05:02 2022 +0100 media: ov5693: add dvdd into ov5693_supply_names array Add missing "dvdd" (Digital circuit power) entry into ov5693_supply_names array Signed-off-by: Tommaso Merciai Reviewed-by: Jacopo Mondi Reviewed-by: Daniel Scally Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5693.c | 1 + 1 file changed, 1 insertion(+) commit cfdb1954435e1dc343f49961ab58a8e20657cd93 Author: Tommaso Merciai Date: Wed Jul 13 16:05:01 2022 +0100 media: ov5693: count num_supplies using array_size Instead of hardcode OV5693_NUM_SUPPLIES in a define is better use ARRAY_SIZE function to count the number of supplies from ov5693_supply_names array Signed-off-by: Tommaso Merciai Reviewed-by: Jacopo Mondi Reviewed-by: Daniel Scally Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5693.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 549e622b22ad35d79b5a9ea361854c119584a5fa Author: Daniel Scally Date: Thu Jul 7 23:47:33 2022 +0100 media: entity: Use dedicated data link iterator Where iteration over links for an entity is clearly assuming that all of those links are data links, use the new iterator to guarantee that assumption is met. Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Scally Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/mc/mc-entity.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e7255c00b10e5e570dd8eb24f59e964eeec38d3b Author: Cezary Rojewski Date: Wed Jul 6 14:02:26 2022 +0200 ALSA: hda: Skip event processing for unregistered codecs When codec is unbound but not yet removed, in the eyes of snd_hdac_bus_process_unsol_events() it is still a valid target to delegate work to. Such behaviour may lead to use-after-free errors. Address by verifying if codec is actually registered. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220706120230.427296-6-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai include/sound/hda_codec.h | 1 - include/sound/hdaudio.h | 1 + sound/hda/hdac_bus.c | 2 +- sound/pci/hda/hda_codec.c | 10 +++++----- sound/soc/codecs/hda.c | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) commit 1ed3d6446b966143e67a106132eea169b3fc5e1c Author: Daniel Scally Date: Thu Jul 7 23:47:32 2022 +0100 media: entity: Add iterator for entity data links Iterating over the links for an entity is a somewhat common need through the media subsystem, but generally the assumption is that they will all be data links. To meet that assumption add a new macro that iterates through an entity's links and skips non-data links. Signed-off-by: Daniel Scally Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/mc/mc-entity.c | 16 ++++++++++++++++ include/media/media-entity.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) commit 622f21994506e1dac7b8e4e362c8951426e032c5 Author: Stefan Binding Date: Thu Jun 30 01:23:35 2022 +0100 ALSA: hda: cs35l41: Add module parameter to control firmware load By default, the driver will automatically load DSP firmware for the amps, if available. Adding this option allows the autoload to be optional, which allows for different configurations. Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20220630002335.366545-15-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 47ceabd99a28399f8971f4ca0a37ebc0a21dd2a8 Author: Stefan Binding Date: Thu Jun 30 01:23:34 2022 +0100 ALSA: hda: cs35l41: Support Firmware switching and reloading This is required to support CS35L41 calibration. By default, speaker protection firmware will be loaded, if available. However, different firmware is required to run the calibration sequence, so it is necessary to add support to be able to unload, switch and reload firmware. This patch adds 2 ALSA Controls for each amp: "DSP1 Firmware Load" "DSP1 Firmware Type" "DSP1 Firmware Load" can be used to unload and load the firmware. "DSP1 Firmware Type" can be used to switch the target firmware to be loaded by "DSP1 Firmware Load" Since loading firmware can add new ALSA controls, it is necessary to ensure the firmware loading is run asynchronously from the ALSA control itself to prevent deadlocks. Note: When switching between firmwares, an ALSA control is only added if it has not previously existed. If it had existed previously, it will be re-enabled instead. Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20220630002335.366545-14-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 182 +++++++++++++++++++++++++++++++++++++++++--- sound/pci/hda/cs35l41_hda.h | 6 ++ 2 files changed, 178 insertions(+), 10 deletions(-) commit 4fa58b1d7ec714581bfb1d12370746d29518cd3a Author: Stefan Binding Date: Thu Jun 30 01:23:33 2022 +0100 ALSA: hda: cs35l41: Add defaulted values into dsp bypass config sequence The config sequences for running with and without firmware and DSP are different. The original behavior assumed that we would only run without DSP only in the case where firmware load failed. This meant the non-firmware sequence was written with the assumtion that various registers would be set to their default value. However, to support the ability to unload the firmware, the non-firmware register sequence must be updated to update all required registers, including values that would be defaulted, in case the firmware sequence, which could have already run, has changed their value. Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20220630002335.366545-13-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 3193ceeae48ad778a059d66f6ab4299fc498f9d4 Author: Marek Vasut Date: Sun Jun 19 01:31:58 2022 +0100 media: mt9p031: Implement crop bounds get selection Implement V4L2_SEL_TGT_CROP_BOUNDS query in get_selection subdev op for this sensor. This is required e.g. to bind it to STM32MP15x DCMI. Signed-off-by: Marek Vasut Cc: Stefan Riedmueller Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/mt9p031.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 291e7c220b82b28d4c128dfb2abaa51d29969dd5 Author: Stefan Binding Date: Thu Jun 30 01:23:32 2022 +0100 ALSA: hda: hda_cs_dsp_ctl: Add fw id strings This will be used to define the firmware names. Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20220630002335.366545-12-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/hda_cs_dsp_ctl.c | 8 ++++++++ sound/pci/hda/hda_cs_dsp_ctl.h | 2 ++ 2 files changed, 10 insertions(+) commit 3e34e2ae29591f0fd84dca905d296da1e127160c Author: Stefan Binding Date: Thu Jun 30 01:23:31 2022 +0100 ALSA: hda: cs35l41: Read Speaker Calibration data from UEFI variables Speaker Calibration data, specific to an individual speaker is stored inside UEFI variables during calibration, and can be used by the DSP. Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20220630002335.366545-11-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 101 ++++++++++++++++++++++++++++++++++++++++++++ sound/pci/hda/cs35l41_hda.h | 15 +++++++ 2 files changed, 116 insertions(+) commit f076057f0107c3ef890bfad8d6658387504e7f11 Author: Tomi Valkeinen Date: Fri Jul 1 14:15:59 2022 +0100 media: stm32: dcmi: Fix subdev op call with uninitialized state stm32-dcmi calls its source subdev with v4l2_subdev_call() using a v4l2_subdev_state constructed on stack. This means that init_cfg is never called for that state, and a source subdev that depends on the init_cfg call may break. A new macro has been added for this particular purpose, which properly initializes the state, so let's use v4l2_subdev_call_state_try() here. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Reviewed-by: Hans Verkuil Tested-by: Marek Vasut Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/st/stm32/stm32-dcmi.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 1873ebd30cc818eefd151e40a4bd05fd8f83b85a Author: Stefan Binding Date: Thu Jun 30 01:23:30 2022 +0100 ALSA: hda: cs35l41: Support Hibernation during Suspend CS35L41 supports hibernation during suspend when using DSP firmware. When the driver suspends it will hibernate the part, if firmware is running, and resume will wake from hibernation. CS35L41 driver will suspend/resume when requested by hda driver. Note that suspend/resume and hibernation is only supported when firmware is running. Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20220630002335.366545-10-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 109 ++++++++++++++++++++++++++++++++++++++-- sound/pci/hda/cs35l41_hda.h | 2 + sound/pci/hda/cs35l41_hda_i2c.c | 1 + sound/pci/hda/cs35l41_hda_spi.c | 1 + sound/pci/hda/hda_component.h | 2 + sound/pci/hda/patch_realtek.c | 25 ++++++++- 6 files changed, 136 insertions(+), 4 deletions(-) commit 982c0487185bd466059ff618f398a8d074ddb654 Author: Tomi Valkeinen Date: Fri Jul 1 14:15:58 2022 +0100 media: subdev: Add v4l2_subdev_call_state_try() macro Add a helper macro for the situations where a non-MC driver needs to call a state-operation (operation which takes a subdev state as a parameter) in try-context in another subdev. The macro allocates a new subdev state for the called subdev and frees the state afterwards. An example use case is a media platform driver testing if a v4l2_subdev_format would be accepted by a source subdev. This should not be used in MC drivers. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Reviewed-by: Hans Verkuil Tested-by: Marek Vasut Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-subdev.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit dbae22e2008ee6a3acf2b7d989800eff80f0aa1f Author: Hans Verkuil Date: Fri Jul 8 19:47:04 2022 +0100 media: ar0521: fix Kconfig: VIDEO_V4L2 -> VIDEO_DEV VIDEO_V4L2 no longer exists, instead use VIDEO_DEV. Without this change this driver cannot be selected. Signed-off-by: Hans Verkuil Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 817819b27e25b7ebcbe4807fa3232040444fc26e Author: Laurent Pinchart Date: Sat Jun 18 19:54:19 2022 +0100 media: Replace dependency on VIDEO_V4L2_SUBDEV_API with select The VIDEO_V4L2_SUBDEV_API Kconfig symbol is mostly selected automatically, with a a handful of drivers still using it as a dependency. Fix them to use selection, and drop the symbol title text to not expose it for manual selection. Signed-off-by: Laurent Pinchart Reviewed-by: Ezequiel Garcia Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 4 +++- drivers/media/platform/atmel/Kconfig | 4 +++- drivers/media/v4l2-core/Kconfig | 6 ++++-- 3 files changed, 10 insertions(+), 4 deletions(-) commit 7a9795b31049b7e233d050a82b00094155a695c7 Author: Yang Yingliang Date: Wed Jun 22 05:42:43 2022 +0100 media: ov7251: add missing disable functions on error in ov7251_set_power_on() Add the missing gpiod_set_value_cansleep() and clk_disable_unprepare() before return from ov7251_set_power_on() in the error handling case. Fixes: 9e1d3012cc10 ("media: i2c: Remove .s_power() from ov7251") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov7251.c | 2 ++ 1 file changed, 2 insertions(+) commit 94d7fd9692b54ccc453ba3a2c482dda3110bc778 Author: Sakari Ailus Date: Wed Jul 13 16:18:08 2022 +0100 media: sunxi: Depend on GENERIC_PHY_MIPI_DPHY The sun6i-mipi-csi2 and sun6i-a83t-mipi-csi2 drivers depend on the generic MIPI D-PHY support. Select it. This fixes a linking problem when either of these drivers is enabled and GENERIC_PHY_MIPI_DPHY is disabled. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig | 1 + drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/Kconfig | 1 + 2 files changed, 2 insertions(+) commit 29a249d72d31cde3cd24d43354b40019efdb48b1 Merge: ffb2759df7ef 7fb72b7bf167 Author: Takashi Iwai Date: Fri Jul 15 16:11:58 2022 +0200 Merge tag 'asoc-v5.20' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v5.20 This is a big release thus far and there will probably be more changes to come, it's a combination of a larger than usual crop of new drivers and some subsysetm wide cleanups from Charles rather than anything structural. The SOF and Intel DSP code both also continue to be very actively developed. - Restructing of the set_fmt() callbacks to be specified in terms of the device rather than with semantics depending on if the device is supposed to be a CODEC or SoC, making things clearer in situations like CODEC to CODEC links. - Clean up of the way we flag which DAI naming scheme we use to reflect the progress that's been made modernising things. - Merge of more of the Intel AVS driver stack, including some board integrations. - New version 4 mechanism for communication with SOF DSPs. - Suppoort for dynamically selecting the PLL to use at runtime on i.MX platforms. - Improvements for CODEC to CODEC support in the generic cards. - Support for AMD Jadeite and various machines, Intel MetorLake DSPs, Mediatek MT8186 DSPs and MT6366, nVidia Tegra MDDRC, OPE and PEQ, NXP TFA9890, Qualcomm SDM845, WCD9335 and WAS883x, and Texas Instruments TAS2780. commit 48e93b0c261065b5a6dffe85668d6d710ff818af Author: Laurent Pinchart Date: Thu Mar 17 12:37:12 2022 +0000 media: v4l2: Sanitize colorspace values in the framework Extend the format sanitization code in the framework to handle invalid values for the colorspace-related fields. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ioctl.c | 71 +++++++++++++++++++++++++++++------- 1 file changed, 58 insertions(+), 13 deletions(-) commit 718d2153ad0de0c7c0b6891eaa7f9918d68b6d5e Author: Laurent Pinchart Date: Thu Mar 17 12:37:12 2022 +0000 media: v4l2: Make colorspace validity checks more future-proof The helper functions that test validity of colorspace-related fields use the last value of the corresponding enums. This isn't very future-proof, as there's a high chance someone adding a new value may forget to update the helpers. Add new "LAST" entries to the enumerations to improve this, and keep them private to the kernel. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-common.h | 6 +++--- include/uapi/linux/videodev2.h | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) commit b0afed239a5baf72cacc3023e852c7a5125c2a8f Author: Laurent Pinchart Date: Mon Mar 7 17:01:38 2022 +0000 media: vivid: Add support for the new YUVA and YUVX formats Extend vivid to support the newly added YUVA and YUVX pixel formats through the TPG. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/test-drivers/vivid/vivid-vid-common.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 5a3757801e58a966baff7722079bf0ebc87ba4db Author: Laurent Pinchart Date: Mon Mar 7 16:33:44 2022 +0000 media: v4l2-tpg: Add support for the new YUVA and YUVX formats Extend the TPG to support generating the newly added YUVA and YUVX pixel formats. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 00f6842ef41d90cc335ae4dbb00d71f4f642c712 Author: Laurent Pinchart Date: Mon Mar 7 16:32:00 2022 +0000 media: v4l: Add packed YUV 4:4:4 YUVA and YUVX pixel formats The new YUVA and YUVX are permutations of the existing AYUV and XYUV formats. They are use by the NXP i.MX8 ISI hardware. Signed-off-by: Laurent Pinchart Reviewed-by: Nicolas Dufresne Reviewed-by: Jacopo Mondi Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../userspace-api/media/v4l/pixfmt-packed-yuv.rst | 20 ++++++++++++++++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 2 ++ include/uapi/linux/videodev2.h | 2 ++ 3 files changed, 24 insertions(+) commit a6221d42cc5f2fefdb307891056e4b27e9a5d567 Author: Chen-Yu Tsai Date: Fri Jul 8 11:44:51 2022 +0100 media: mediatek: vcodec: Make encoder capability fields fit requirements This partially reverts commit fd9f8050e355d7fd1e126cd207b06c96cde7f783, and changes things so that the capability string fields of the encoder conform to their requirements. The driver name field should contain the actual driver name, not some otherwise unused string macro from the driver. To make this clear, copy the name from the driver's name field. The card name for the video encoder previously held a static platform name that was fixed to match MT8173. This obviously doesn't make sense for newer chips. Since commit fd9f8050e355 ("media: mediatek: vcodec: Change encoder v4l2 capability value"), this field was changed to hold the driver's name, or "mtk-vcodec-dec". This doesn't make much sense either, since this still doesn't reflect what chip this is. Instead, fill in the card name with "MTxxxx video encoder" with the proper chip number. Since commit f2d8b6917f3b ("media: v4l: ioctl: Set bus_info in v4l_querycap()"), the V4L2 core provides a default value for the bus_info field for platform and PCI devices. This value will match the default value for media devices added by commit cef699749f37 ("media: mc: Set bus_info in media_device_init()"). These defaults are stable and device-specific. Drop the custom capability bus_info from the mtk-vcodec encoder driver, and use the defaults. As this patch removes the last usage of MTK_VCODEC_DRV_NAME, remove the macro as well. Fixes: fd9f8050e355 ("media: mediatek: vcodec: Change encoder v4l2 capability value") Signed-off-by: Chen-Yu Tsai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h | 1 - drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 620a14e6724bb944fa9aeda447686177a26dcdc1 Author: Chen-Yu Tsai Date: Fri Jul 8 11:44:50 2022 +0100 media: mediatek: vcodec: Make decoder capability fields fit requirements This partially reverts commit a8a7a278c56ad3b4ddd4db9a960e0537d032b0b3, and changes things so that the capability string fields of the decoder conform to their requirements. This recent change caused ChromeOS's decoder to no longer function. This is due to ChromeOS using the driver name field to match the video device with its accompanying media device. After the change, they no longer matched. The driver name field should contain the actual driver name, not some otherwise unused string macro from the driver. To make this clear, copy the name from the driver's name field. The card name for the video decoder previously held a static platform name that was fixed to match MT8173. This obviously doesn't make sense for newer chips. Since commit a8a7a278c56a ("media: mediatek: vcodec: Change decoder v4l2 capability value"), this field was changed to hold the driver's name, or "mtk-vcodec-dec". This doesn't make much sense either, since this still doesn't reflect what chip this is. Instead, fill in the card name with "MTxxxx video decoder" with the proper chip number. Since commit f2d8b6917f3b ("media: v4l: ioctl: Set bus_info in v4l_querycap()"), the V4L2 core provides a default value for the bus_info field for platform and PCI devices. This value will match the default value for media devices added by commit cef699749f37 ("media: mc: Set bus_info in media_device_init()"). These defaults are stable and device-specific. Drop the custom capability bus_info from the mtk-vcodec decoder driver, and use the defaults. This also fixes the long standing issue where the media device used for the stateless decoder didn't have its bus_info set, and would never match its accompanying video device. Fixes: a8a7a278c56a ("media: mediatek: vcodec: Change decoder v4l2 capability value") Signed-off-by: Chen-Yu Tsai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b464763cc3489af406437a7650de8575a0973235 Author: Marko Mäkelä Date: Fri Jul 8 09:44:59 2022 +0100 media: lirc: ensure lirc device receives repeats Pressing a button on a remote control unit will typically lead to messages being sent several times per second until the button is released. Some remote control units indicate long key presses by sending special "repeat" messages, for which the protocol driver calls rc_repeat(). Other units repeat the same message over and over, which will be handled by calling rc_keydown(). The function rc_keydown() never set the LIRC "repeat" flag to distinguish repeated messages that were sent due to a long keypress, and messages sent due to repeated short keypresses. While a user-space program may implement special logic to distinguish long keypresses, it is much simpler to be able to rely on the flag. Commit de142c32410649e64d44928505ffad2176a96a9e ("media: lirc: implement reading scancode") would never set the LIRC_SCANCODE_FLAG_REPEAT flag. Commit b66218fddfd29f315a103db811152ab0c95fb054 ("media: lirc: ensure lirc device receives nec repeats") fixed it up for rc_repeat() but not rc_keydown(). Signed-off-by: Marko Mäkelä Co-developed-by: Sean Young Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6ab13540b7453b06015c1abf2fba7a403d87a0ab Author: Oliver Neukum Date: Wed Jul 6 08:44:59 2022 +0100 media: ati-remote: remove private err() macro Drivers should use dev_err() Signed-off-by: Oliver Neukum Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ati_remote.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 2a98e887e0e3cc788f323c52f9e352ad8a01c689 Author: Yang Yingliang Date: Tue Jun 28 07:54:53 2022 +0100 media: igorplugusb: use correct size pass to igorplugusb_probe() After 'buf_in' change to pointer, the sizeof() is not correct buffer size, it should be MAX_PACKET. Fixes: b3f820b905c9 ("media: igorplugusb: respect DMA coherency") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/igorplugusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 39146d11411cddda8a7bcabc2c7deb0ddea865a4 Author: Yunke Cao Date: Wed Jun 29 03:06:30 2022 +0100 media: vimc: documentation for lens Add documentation for vimc-lens. Add a lens into the vimc topology graph. Signed-off-by: Yunke Cao Signed-off-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab Documentation/admin-guide/media/vimc.dot | 4 ++++ Documentation/admin-guide/media/vimc.rst | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) commit ee8dadd7704810f4319d0b469c59e6812ef0115f Author: Daniel Oakley Date: Thu Jun 16 11:07:47 2022 +0100 media: vimc: use data link entities enum to index the ent_config array Future additions to the ent_config[] could break the association between the index of the struct vimc_ent_config entries in the ent_config[] array, and the index defined by the enum proposed in the previous patch. Using designated initializers solves this by linking the 2 together clearly in code and prevents the array not reflecting the enum. There is no functional change intended. Suggested-by: Kieran Bingham Signed-off-by: Daniel Oakley Signed-off-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/test-drivers/vimc/vimc-core.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit f2e761fdace257dd0411958efedb0e7af043c4f8 Author: Daniel Oakley Date: Thu Jun 16 11:07:46 2022 +0100 media: vimc: enumerate data link entities for clarity The data_links array was hard to read and understand. By implementing enumerated vimc data link entities, clarity has been improved when defining data_links. This therefore should help new programmers to understand the codebase better. There is no functional change intended. Suggested-by: Kieran Bingham Signed-off-by: Daniel Oakley Signed-off-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/test-drivers/vimc/vimc-core.c | 36 ++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 8 deletions(-) commit ec917d77c57c0b3499442d2148bc4ca3598a5e8a Author: Daniel Oakley Date: Thu Jun 16 11:07:45 2022 +0100 media: vimc: expand the names of vimc entity types When introducing the lens controller, it became apparent that the vimc entity type names were hard to understand, e.g. vimc_len_type refers to the lens. The names of the vimc entity types have been expanded to make the code easier to understand. There is no functional change intended. Suggested-by: Kieran Bingham Signed-off-by: Daniel Oakley Signed-off-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/test-drivers/vimc/vimc-capture.c | 270 ++++++++--------- drivers/media/test-drivers/vimc/vimc-common.h | 10 +- drivers/media/test-drivers/vimc/vimc-core.c | 22 +- drivers/media/test-drivers/vimc/vimc-debayer.c | 393 +++++++++++++------------ drivers/media/test-drivers/vimc/vimc-lens.c | 82 +++--- drivers/media/test-drivers/vimc/vimc-scaler.c | 216 +++++++------- drivers/media/test-drivers/vimc/vimc-sensor.c | 307 +++++++++---------- 7 files changed, 652 insertions(+), 648 deletions(-) commit 6f2c8d5f16594a13295d153245e0bb8166db7ac9 Author: Arunpravin Paneer Selvam Date: Thu Jul 14 03:12:14 2022 -0700 drm/amdgpu: Fix for drm buddy memory corruption User reported gpu page fault when running graphics applications and in some cases garbaged graphics are observed as soon as X starts. This patch fixes all the issues. Fixed the typecast issue for fpfn and lpfn variables, thus preventing the overflow problem which resolves the memory corruption. Signed-off-by: Arunpravin Paneer Selvam Reported-by: Mike Lothian Tested-by: Mike Lothian Link: https://patchwork.freedesktop.org/patch/msgid/20220714101214.7620-1-Arunpravin.PaneerSelvam@amd.com Reviewed-by: Christian König Signed-off-by: Christian König drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 16 ++++++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) commit d534b9520a128d20d81d6dcf95441e806bdeb20f Author: Yunke Cao Date: Tue Jun 28 01:53:52 2022 +0100 media: vimc: add ancillary lens Add lens to vimc driver and link them with sensors using ancillary links. Provides an example of ancillary link usage.The lens supports FOCUS_ABSOLUTE control. Test example: With default vimc topology > media-ctl -p Media controller API version 5.18.0 ... - entity 28: Lens A (0 pad, 0 link) type V4L2 subdev subtype Lens flags 0 device node name /dev/v4l-subdev6 - entity 29: Lens B (0 pad, 0 link) type V4L2 subdev subtype Lens flags 0 device node name /dev/v4l-subdev7 > v4l2-ctl -d /dev/v4l-subdev7 -C focus_absolute focus_absolute: 0 Reviewed-by: Kieran Bingham Signed-off-by: Yunke Cao Signed-off-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/test-drivers/vimc/Makefile | 2 +- drivers/media/test-drivers/vimc/vimc-common.h | 1 + drivers/media/test-drivers/vimc/vimc-core.c | 86 +++++++++++++++++----- drivers/media/test-drivers/vimc/vimc-lens.c | 102 ++++++++++++++++++++++++++ 4 files changed, 170 insertions(+), 21 deletions(-) commit 46347e3ec61660562d4a4a933713e2c2b74598e2 Author: Sakari Ailus Date: Tue Jul 5 18:40:54 2022 +0100 media: v4l: async: Also match secondary fwnode endpoints For camera sensor devices the firmware information of which comes from non-DT (or some ACPI variants), the kernel makes the information visible to the drivers in a form similar to DT. This takes place through device's secondary fwnodes, in which case also the secondary fwnode needs to be heterogenously (endpoint vs. device) matched. Fixes: 1f391df44607 ("media: v4l2-async: Use endpoints in __v4l2_async_nf_add_fwnode_remote()") Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit f0dd891dd5a1d6dc6c9d486333aac4f433f17d17 Author: Yury Norov Date: Fri Jul 1 05:54:30 2022 -0700 lib/cpumask: move some one-line wrappers to header file After moving gfp flags to a separate header, it's possible to move some cpumask allocators into headers, and avoid creating real functions. Signed-off-by: Yury Norov include/linux/cpumask.h | 34 +++++++++++++++++++++++++++++++--- lib/cpumask.c | 28 ---------------------------- 2 files changed, 31 insertions(+), 31 deletions(-) commit 7343f2b0db4961d9f386e685e651c663dc763d0c Author: Yury Norov Date: Wed Jul 6 08:52:24 2022 -0700 headers/deps: mm: align MANITAINERS and Docs with new gfp.h structure After moving gfp types out of gfp.h, we have to align MAINTAINERS and Docs, to avoid warnings like this: >> include/linux/gfp.h:1: warning: 'Page mobility and placement hints' not found >> include/linux/gfp.h:1: warning: 'Watermark modifiers' not found >> include/linux/gfp.h:1: warning: 'Reclaim modifiers' not found >> include/linux/gfp.h:1: warning: 'Useful GFP flag combinations' not found Signed-off-by: Yury Norov Documentation/core-api/mm-api.rst | 8 ++++---- MAINTAINERS | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) commit cb5a065b4ea9c062a18143c8a14e831179687f54 Author: Ingo Molnar Date: Thu Apr 14 18:42:28 2022 +0200 headers/deps: mm: Split out of This is a much smaller header. Signed-off-by: Ingo Molnar Signed-off-by: Yury Norov include/linux/gfp.h | 345 +-------------------------------------------- include/linux/gfp_types.h | 348 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 350 insertions(+), 343 deletions(-) commit db96b0c5f9db22d908ab5f7cd75904adba4b28ca Author: Ingo Molnar Date: Thu Jun 10 10:56:49 2021 +0200 headers/deps: mm: Optimize header dependencies There's a couple of superfluous inclusions here - remove them before doing bigger changes. Signed-off-by: Ingo Molnar Signed-off-by: Yury Norov include/linux/gfp.h | 3 --- 1 file changed, 3 deletions(-) commit 9b2e70860ef2f0d74b6d9e57929d57b14481b9c9 Author: Yury Norov Date: Fri Jul 1 05:54:28 2022 -0700 lib/cpumask: move trivial wrappers around find_bit to the header To avoid circular dependencies, cpumask keeps simple (almost) one-line wrappers around find_bit() in a c-file. Commit 47d8c15615c0a2 ("include: move find.h from asm_generic to linux") moved find.h header out of asm_generic include path, and it helped to fix many circular dependencies, including some in cpumask.h. This patch moves those one-liners to header files. Signed-off-by: Yury Norov include/linux/cpumask.h | 57 ++++++++++++++++++++++++++++++++++++++++++++++--- lib/cpumask.c | 55 ----------------------------------------------- 2 files changed, 54 insertions(+), 58 deletions(-) commit 8b6b795d9bfc031a8953c40fac8d3cf67e1a4d3d Author: Yury Norov Date: Fri Jul 1 05:54:27 2022 -0700 lib/cpumask: change return types to unsigned where appropriate Switch return types to unsigned int where return values cannot be negative. Signed-off-by: Yury Norov include/linux/cpumask.h | 14 +++++++------- lib/cpumask.c | 18 +++++++++--------- 2 files changed, 16 insertions(+), 16 deletions(-) commit cb32c285cc10e428589194e30233d673e7c23c72 Author: Yury Norov Date: Fri Jul 1 05:54:26 2022 -0700 cpumask: change return types to bool where appropriate Some cpumask functions have integer return types where return values are naturally booleans. Signed-off-by: Yury Norov include/linux/cpumask.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 4dea97f8636d0514befc9fc5cf342b351b7d0e20 Author: Yury Norov Date: Fri Jul 1 05:54:25 2022 -0700 lib/bitmap: change type of bitmap_weight to unsigned long bitmap_weight() doesn't return negative values, so change it's type to unsigned long. It may help compiler to generate better code and catch bugs. Signed-off-by: Yury Norov drivers/dma/ti/k3-udma.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 2 +- drivers/gpu/drm/i915/display/intel_display_power.c | 2 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +- drivers/iommu/intel/iommu.c | 2 +- drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +- drivers/net/wireless/ath/ath9k/htc_drv_debug.c | 2 +- drivers/net/wireless/ath/carl9170/debug.c | 2 +- include/linux/bitmap.h | 5 +++-- lib/bitmap.c | 5 ++--- tools/include/linux/bitmap.h | 4 ++-- tools/lib/bitmap.c | 4 ++-- 12 files changed, 19 insertions(+), 19 deletions(-) commit bdd15ec4888a375848030cbf7d9fc16c7f430f48 Author: Cezary Rojewski Date: Fri Jun 24 15:43:17 2022 +0200 ASoC: Intel: bdw_rt5677: Mark BE DAI as nonatomic Address the warning: "Codec: dpcm_be_connect: FE is nonatomic but BE is not, forcing BE as nonatomic" by marking BE DAI as nonatomic. Aligns with what is already done for FE ones. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220624134317.3656128-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bdw-rt5677.c | 1 + 1 file changed, 1 insertion(+) commit 5c4ef9529b12865c2402784a7506c880178effda Author: Cezary Rojewski Date: Fri Jun 24 15:43:16 2022 +0200 ASoC: Intel: bdw_rt5650: Mark BE DAI as nonatomic Address the warning: "Codec: dpcm_be_connect: FE is nonatomic but BE is not, forcing BE as nonatomic" by marking BE DAI as nonatomic. Aligns with what is already done for FE ones. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220624134317.3656128-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bdw-rt5650.c | 1 + 1 file changed, 1 insertion(+) commit 6d7e011808504e0aabbbf3b66d4c14982394abae Author: Cezary Rojewski Date: Fri Jun 24 15:43:15 2022 +0200 ASoC: Intel: bdw_rt286: Mark BE DAI as nonatomic Address the warning: "Codec: dpcm_be_connect: FE is nonatomic but BE is not, forcing BE as nonatomic" by marking BE DAI as nonatomic. Aligns with what is already done for FE DAIs. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220624134317.3656128-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bdw_rt286.c | 1 + 1 file changed, 1 insertion(+) commit 58ef0d3d5716000c153acc5401109fd90afbdf09 Author: Cezary Rojewski Date: Fri Jun 24 15:43:14 2022 +0200 ASoC: Intel: hsw_rt5640: Mark BE DAI as nonatomic Address the warning: "Codec: dpcm_be_connect: FE is nonatomic but BE is not, forcing BE as nonatomic" by marking BE DAI as nonatomic. Aligns with what is already done for FE DAIs. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220624134317.3656128-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/hsw_rt5640.c | 1 + 1 file changed, 1 insertion(+) commit bd363ee5330250b93cb1e0e16c1c54682fcbe595 Author: Johannes Berg Date: Fri Jul 15 15:11:50 2022 +0200 wifi: mac80211: mlme: set sta.mlo correctly Due to some changes and rebasing between different patches this fell through the cracks; we need to set sta.mlo if the connection is using MLO. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 2 ++ 1 file changed, 2 insertions(+) commit 8f5d9e68c90dd6b01afdfda6d9926c6ea4931c00 Author: Johannes Berg Date: Fri Jul 15 15:04:41 2022 +0200 wifi: mac80211: remove stray printk Unfortunately, a printk snuck into a previous patch, remove it. Fixes: 81151ce462e5 ("wifi: mac80211: support MLO authentication/association with one link") Signed-off-by: Johannes Berg net/wireless/mlme.c | 1 - 1 file changed, 1 deletion(-) commit c76d09da77d69d7f737540985912ad2bca654713 Author: Prashant Malani Date: Mon Jul 11 07:23:03 2022 +0000 platform/chrome: cros_ec_typec: Get retimer handle Where available, obtain the handle to retimer switch specified via firmware, and update the mux configuration callsites to add retimer support for supported modes. Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20220711072333.2064341-10-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/platform/chrome/cros_ec_typec.c | 44 ++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) commit 66fe238a9bcc158f75ddecf976d1ce7efe20f713 Author: Prashant Malani Date: Mon Jul 11 07:23:02 2022 +0000 platform/chrome: cros_ec_typec: Cleanup switch handle return paths Some of the return paths for the cros_typec_get_switch_handles() aren't necessary. Clean up the return paths to only undo the handle get's which succeeded. Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20220711072333.2064341-9-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/platform/chrome/cros_ec_typec.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f5434e30011e011b24852959365b7cbc61dd8c85 Author: Prashant Malani Date: Mon Jul 11 07:23:01 2022 +0000 platform/chrome: cros_typec_switch: Register mode switches Register mode switch devices for Type C connectors, when they are specified by firmware. These control Type C configuration for any USB Type-C mode switches (sometimes known as "muxes") which are controlled by the Chrome EC. Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20220711072333.2064341-8-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/platform/chrome/cros_typec_switch.c | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit bb53ad958012f5a8d88b3b7159c22b3b877601bb Author: Prashant Malani Date: Mon Jul 11 07:23:00 2022 +0000 platform/chrome: cros_typec_switch: Add event check The Chrome EC updates Type-C status events when mux set requests from the Application Processor (AP) are completed. Add a check to the flow of configuring muxes to look for this status done bit, so that the driver is aware that the mux set completed successfully or not. Reported-by: kernel test robot Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20220711072333.2064341-7-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/platform/chrome/cros_typec_switch.c | 72 ++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 2 deletions(-) commit 34f375f0fdf67f8804142fa37a28e73426d4c1df Author: Prashant Malani Date: Mon Jul 11 07:22:59 2022 +0000 platform/chrome: cros_typec_switch: Set EC retimer Invoke Chrome EC host commands to set EC-controlled retimer switches to the state the Type-C framework instructs. Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20220711072333.2064341-6-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/platform/chrome/cros_typec_switch.c | 56 ++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) commit e54369058f3da181fcc4c893f224a0c5a8a526b6 Author: Prashant Malani Date: Mon Jul 11 07:22:58 2022 +0000 platform/chrome: cros_typec_switch: Add switch driver Introduce a driver to configure USB Type-C mode switches and retimers which are controlled by the Chrome OS EC (Embedded Controller). This allows Type-C port drivers, as well as alternate mode drivers to configure their relevant mode switches and retimers according to the Type-C state they want to achieve. ACPI devices with ID GOOG001A will bind to this driver. Currently, we only register a retimer switch with a stub set function. Subsequent patches will implement the host command set functionality, and introduce mode switches. Reported-by: kernel test robot Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20220711072333.2064341-5-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 + drivers/platform/chrome/Kconfig | 11 ++ drivers/platform/chrome/Makefile | 1 + drivers/platform/chrome/cros_typec_switch.c | 170 ++++++++++++++++++++++++++++ 4 files changed, 183 insertions(+) commit 28a6ed8e39f77f6ac613ec9b7461aa75e85fa79a Author: Prashant Malani Date: Mon Jul 11 07:22:57 2022 +0000 platform/chrome: Add Type-C mux set command definitions Copy EC header definitions for the USB Type-C Mux control command from the EC code base. Also pull in "TBT_UFP_REPLY" definitions, since that is the prior entry in the enum. These headers are already present in the EC code base. [1] [1] https://chromium.googlesource.com/chromiumos/platform/ec/+/b80f85a94a423273c1638ef7b662c56931a138dd/include/ec_commands.h Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20220711072333.2064341-4-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman include/linux/platform_data/cros_ec_commands.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 8a2b456665d1e797123669581524cbb095fb003b Author: Florian Fainelli Date: Thu Jul 14 15:25:12 2022 -0700 MIPS: Fixed __debug_virt_addr_valid() It is permissible for kernel code to call virt_to_phys() against virtual addresses that are in KSEG0 or KSEG1 and we need to be dealing with both types. Rewrite the test condition to ensure that the kernel virtual addresses are above PAGE_OFFSET which they must be, and below KSEG2 where the non-linear mapping starts. For EVA, there is not much that we can do given the linear address range that is offered, so just return any virtual address as being valid. Finally, when HIGHMEM is not enabled, all virtual addresses are assumed to be valid as well. Fixes: dfad83cb7193 ("MIPS: Add support for CONFIG_DEBUG_VIRTUAL") Signed-off-by: Florian Fainelli Reviewed-by: Serge Semin Signed-off-by: Thomas Bogendoerfer arch/mips/mm/physaddr.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit c022e87162219d67d687df22c977d1c2fc95fb42 Author: Florian Fainelli Date: Thu Jul 14 14:13:01 2022 -0700 MIPS: BCM47XX: Add support for Netgear WNR3500L v2 Add support for the Netgear WNR3500L v2 router based on the BCM47186 chipset and supporting 802.11n Wi-Fi. Signed-off-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer arch/mips/bcm47xx/board.c | 2 ++ arch/mips/bcm47xx/buttons.c | 10 ++++++++++ arch/mips/bcm47xx/leds.c | 11 +++++++++++ arch/mips/bcm47xx/workarounds.c | 1 + arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 + 5 files changed, 25 insertions(+) commit 08680588d340eaad2d5028d6f24a055a118d4e7e Author: Chunfeng Yun Date: Fri Jul 8 14:58:34 2022 +0800 dt-bindings: phy: mediatek: tphy: add compatible for mt8188 Add compatible for mt8188 Signed-off-by: Chunfeng Yun Acked-by: Rob Herring Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20220708065834.25424-1-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/phy/mediatek,tphy.yaml | 1 + 1 file changed, 1 insertion(+) commit fd7d47484125c7d04578de9294faa7fec6e5df0a Author: Samuel Holland Date: Fri Jul 8 01:14:34 2022 -0500 phy: rockchip-inno-usb2: Ignore OTG IRQs in host mode When the OTG port is fixed to host mode, the driver does not request its IRQs, nor does it enable those IRQs in hardware. Similarly, the driver should ignore the OTG port IRQs when handling the shared interrupt. Otherwise, it would update the extcon based on an ID pin which may be in an undefined state, or try to queue a uninitialized work item. Fixes: 6a98df08ccd5 ("phy: rockchip-inno-usb2: Fix muxed interrupt support") Reported-by: Frank Wunderlich Signed-off-by: Samuel Holland Tested-by: Peter Geis Tested-by: Frank Wunderlich Link: https://lore.kernel.org/r/20220708061434.38115-1-samuel@sholland.org Signed-off-by: Vinod Koul drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 38b6dbcc94fa9b1dfcf33672058eb58421340a18 Author: Vinod Koul Date: Fri Jul 8 10:50:59 2022 +0530 phy: qcom-qmp-usb: statify qmp_phy_vreg_l qmp_phy_vreg_l should be marked static, this resolves warning: drivers/phy/qualcomm/phy-qcom-qmp-combo.c:616:27: warning: symbol 'qmp_phy_vreg_l' was not declared. Should it be static? Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20220708052059.3049443-1-vkoul@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66efb665cd5ad69b27dca8571bf89fc6b9c628a4 Author: Liang He Date: Fri Jul 15 19:10:27 2022 +0800 regulator: of: Fix refcount leak bug in of_get_regulation_constraints() We should call the of_node_put() for the reference returned by of_get_child_by_name() which has increased the refcount. Fixes: 40e20d68bb3f ("regulator: of: Add support for parsing regulator_state for suspend state") Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220715111027.391032-1-windhl@126.com Signed-off-by: Mark Brown drivers/regulator/of_regulator.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e1d1ffeda697dedf0859f963bc4180b5bb7bf150 Author: Claudiu Beznea Date: Fri Jul 15 12:09:39 2022 +0300 ASoC: atmel_ssc_dai: remove #ifdef CONFIG_PM Remove #ifdef CONFIG_PM and use pm_ptr() instead. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220715090939.1679963-1-claudiu.beznea@microchip.com Signed-off-by: Mark Brown sound/soc/atmel/atmel_ssc_dai.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit c1ad138822a1be95a7a7b122521c2415583a0c26 Author: Stefan Binding Date: Thu Jul 7 16:10:37 2022 +0100 ASoC: cs35l41: Read System Name from ACPI _SUB to identify firmware When loading firmware, wm_adsp uses a number of parameters to determine the path of the firmware and tuning files to load. One of these parameters is system_name. Add support in cs35l41 to read this system name from the ACPI _SUB ID in order to uniquely identify the firmware and tuning mapped to a particular system. Signed-off-by: Stefan Binding Link: https://lore.kernel.org/r/20220707151037.3901050-3-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cs35l41.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 93064e15c8a3a8394319a11b8037666e4b7d653d Author: Stefan Binding Date: Thu Jul 7 16:10:36 2022 +0100 ACPI: utils: Add api to read _SUB from ACPI Add a wrapper function to read the _SUB string from ACPI. Signed-off-by: Stefan Binding Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20220707151037.3901050-2-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown drivers/acpi/utils.c | 38 ++++++++++++++++++++++++++++++++++++++ include/linux/acpi.h | 6 ++++++ 2 files changed, 44 insertions(+) commit 32b378a9179ae4db61cfc5d502717214e6cd1e1c Author: Fabrice Gasnier Date: Wed Jul 13 15:39:53 2022 +0200 phy: stm32: fix error return in stm32_usbphyc_phy_init Error code is overridden, in case the PLL doesn't lock. So, the USB initialization can continue. This leads to a platform freeze. This can be avoided by returning proper error code to avoid USB probe freezing the platform. It also displays proper errors in log. Fixes: 5b1af71280ab ("phy: stm32: rework PLL Lock detection") Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20220713133953.595134-1-fabrice.gasnier@foss.st.com Signed-off-by: Vinod Koul drivers/phy/st/phy-stm32-usbphyc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4ac7573e1f9333073fa8d303acc941c9b7ab7f61 Author: Hangyu Hua Date: Wed Jul 13 09:55:11 2022 +0900 net: 9p: fix refcount leak in p9_read_work() error handling p9_req_put need to be called when m->rreq->rc.sdata is NULL to avoid temporary refcount leak. Link: https://lkml.kernel.org/r/20220712104438.30800-1-hbh25y@gmail.com Fixes: 728356dedeff ("9p: Add refcount to p9_req_t") Signed-off-by: Hangyu Hua [Dominique: commit wording adjustments, p9_req_put argument fixes for rebase] Signed-off-by: Dominique Martinet net/9p/trans_fd.c | 1 + 1 file changed, 1 insertion(+) commit 67dd8e445ee0aa5e8bf1d9d866c914ed11626bbd Author: Dominique Martinet Date: Tue Jul 12 15:09:35 2022 +0900 9p: roll p9_tag_remove into p9_req_put mempool prep commit removed the awkward kref usage which didn't allow passing client pointer easily with the ref, so we no longer need a separate function to remove the tag from idr. This has the side benefit that it should be more robust in detecting leaks: umount will now properly catch unfreed requests as they still will be in the idr until the last ref is dropped Link: https://lkml.kernel.org/r/20220712060801.2487140-1-asmadeus@codewreck.org Signed-off-by: Dominique Martinet Reviewed-by: Christian Schoenebeck net/9p/client.c | 101 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 51 insertions(+), 50 deletions(-) commit 1dcef3d2f345810472cc7385384014a412a4682c Author: Joerg Roedel Date: Fri Jul 15 13:03:34 2022 +0200 MAINTAINERS: Add Robin Murphy as IOMMU SUBSYTEM reviewer Robin has been acting as a reviewer of the IOMMU Subsystem for a long time. He is also defacto maintaining the IOMMU DMA-API Layer, so make both roles official by adding Robin to the MAINTAINERS file. Signed-off-by: Joerg Roedel Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20220715110334.6969-1-joro@8bytes.org MAINTAINERS | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 459f326e995ce6f02f3dc79ca5bc4e2abe33d156 Author: Sunil Goutham Date: Thu Jul 14 11:05:55 2022 +0530 octeontx2-af: Set NIX link credits based on max LMAC When number of LMACs active on a CGX/RPM are 3, then current NIX link credit config based on per lmac fifo length which inturn is calculated as 'lmac_fifo_len = total_fifo_len / 3', is incorrect. In HW one of the LMAC gets half of the FIFO and rest gets 1/4th. Signed-off-by: Nithin Dabilpuram Signed-off-by: Sunil Goutham Signed-off-by: Geetha Sowjanya Signed-off-by: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 27 +++++++++++++++++ .../ethernet/marvell/octeontx2/af/lmac_common.h | 1 + drivers/net/ethernet/marvell/octeontx2/af/rpm.c | 30 +++++++++++++++++++ drivers/net/ethernet/marvell/octeontx2/af/rpm.h | 1 + drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 2 +- .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 16 ++++++++++ .../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 34 +++++++++++++++++----- 7 files changed, 102 insertions(+), 9 deletions(-) commit da92e03c7fbf4dc6e1a4a030433c8c30946e6aa0 Author: Ratheesh Kannoth Date: Thu Jul 14 09:58:43 2022 +0530 octeontx2-af: Fixes static warnings Fixes smatch static tool warning reported by smatch tool. rvu_npc_hash.c:1232 rvu_npc_exact_del_table_entry_by_id() error: uninitialized symbol 'drop_mcam_idx'. rvu_npc_hash.c:1312 rvu_npc_exact_add_table_entry() error: uninitialized symbol 'drop_mcam_idx'. rvu_npc_hash.c:1391 rvu_npc_exact_update_table_entry() error: uninitialized symbol 'hash_index'. rvu_npc_hash.c:1428 rvu_npc_exact_promisc_disable() error: uninitialized symbol 'drop_mcam_idx'. rvu_npc_hash.c:1473 rvu_npc_exact_promisc_enable() error: uninitialized symbol 'drop_mcam_idx'. otx2_dmac_flt.c:191 otx2_dmacflt_update() error: 'rsp' dereferencing possible ERR_PTR() otx2_dmac_flt.c:60 otx2_dmacflt_add_pfmac() error: 'rsp' dereferencing possible ERR_PTR() Signed-off-by: Ratheesh Kannoth Signed-off-by: David S. Miller .../ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 49 +++++++++++++++++----- .../ethernet/marvell/octeontx2/nic/otx2_dmac_flt.c | 21 ++++++++-- 2 files changed, 55 insertions(+), 15 deletions(-) commit 4bbaf764e1e1786eb937fdb62172f656f512e116 Author: Christian Marangi Date: Wed Jul 13 22:53:50 2022 +0200 net: dsa: qca8k: move driver to qca dir Move qca8k driver to qca dir in preparation for code split and introduction of ipq4019 switch based on qca8k. Signed-off-by: Christian Marangi Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/Kconfig | 8 -------- drivers/net/dsa/Makefile | 1 - drivers/net/dsa/qca/Kconfig | 8 ++++++++ drivers/net/dsa/qca/Makefile | 1 + drivers/net/dsa/{ => qca}/qca8k.c | 0 drivers/net/dsa/{ => qca}/qca8k.h | 0 6 files changed, 9 insertions(+), 9 deletions(-) commit 88b3822cdf2f9d1c5f569cd89a9e51a1ab223214 Author: Peilin Ye Date: Wed Jul 13 13:40:51 2022 -0700 net/sched: sch_cbq: Delete unused delay_timer delay_timer has been unused since commit c3498d34dd36 ("cbq: remove TCA_CBQ_OVL_STRATEGY support"). Delete it. Signed-off-by: Peilin Ye Signed-off-by: David S. Miller net/sched/sch_cbq.c | 79 ----------------------------------------------------- 1 file changed, 79 deletions(-) commit 6a4f7fcd750497cb2fa870f799e8b23270bec6e3 Author: Marc Zyngier Date: Thu Jul 14 16:41:08 2022 +0100 KVM: arm64: selftests: Add support for GICv2 on v3 The current vgic_init test wrongly assumes that the host cannot multiple versions of the GIC architecture, while v2 emulation on v3 has almost always been supported (it was supported before the standalone v3 emulation). Tweak the test to support multiple GIC incarnations. Signed-off-by: Marc Zyngier Fixes: 3f4db37e203b ("KVM: arm64: selftests: Make vgic_init gic version agnostic") Reviewed-by: Ricardo Koller Link: https://lore.kernel.org/r/20220714154108.3531213-1-maz@kernel.org tools/testing/selftests/kvm/aarch64/vgic_init.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 81151ce462e533551f3284bfdb8e0f461c9220e6 Author: Johannes Berg Date: Wed Jun 1 21:17:34 2022 +0200 wifi: mac80211: support MLO authentication/association with one link It might seem a bit pointless to do a multi-link operation connection with just a single link, but this is already a big change, so for now, limit MLO connections to a single link. Extending that to multiple links will require * work on parsing the multi-link element with STA profile properly, including element fragmentation; * checking the per-link status in the multi-link element * implementing logic to have active/inactive links to let drivers decide which links should be active; * implementing multicast RX deduplication; * and likely more. For now this is still useful since it lets us do multi-link connections for the purposes of testing APIs and the higher layers such as wpa_supplicant. Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 32 +- net/mac80211/mlme.c | 1072 ++++++++++++++++++++++++++++++++++---------- net/mac80211/tx.c | 2 +- net/wireless/mlme.c | 3 + 4 files changed, 869 insertions(+), 240 deletions(-) commit 425f4b5fce7cdaaddbc9a9be9e6d1915679d63f9 Author: Johannes Berg Date: Thu Jun 30 13:48:22 2022 +0200 wifi: mac80211: add API to parse multi-link element Add the necessary API to parse the multi-link element in the future. For now, link only to the element when found so we can use it in the client-side code later. Later, we'll need to fill this in to deal with element fragmentation, parse the STA profile, etc. Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 5 +++++ net/mac80211/util.c | 5 +++++ 2 files changed, 10 insertions(+) commit af4f2aa35a4429f75e87c876e05fba84920a152e Author: Johannes Berg Date: Thu Jul 14 21:58:00 2022 +0200 wifi: mac80211_hwsim: fix TX link selection Now that we have a pointer to the TX STA even when it's not authenticated/... yet, fix the TX link selection in hwsim to select only among the valid links for the STA, requiring a STA pointer here. Also implement a simple round-robin between links to make life more interesting. While at it, also consider A3 when translating to link addresses. Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 47 ++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 14 deletions(-) commit 2ab60f49eb4d87998be602ca09c0e88b0808142b Author: Andrei Otcheretianski Date: Tue Jun 14 17:17:20 2022 +0300 wifi: mac80211_hwsim: use MLO link ID for TX Use the link ID provided in TX frame metadata to select the correct channel. For now, always select the link with the lowest link ID and do some address translation. Signed-off-by: Andrei Otcheretianski Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 53 +++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) commit aea9a6088ae46e77527716496ab259ddfa320148 Author: Andrei Otcheretianski Date: Wed Jun 22 16:11:43 2022 +0300 wifi: mac80211_hwsim: do rc update per link Make mac80211_hwsim_sta_rc_update() iterate over all the STA links. This is somewhat temporary, we really should add the link to the API, but then hwsim still calls it internally and would need this. Signed-off-by: Andrei Otcheretianski Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 63 +++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 21 deletions(-) commit 42fb9148c078004d07b4c39bd7b1086b6165780c Author: Johannes Berg Date: Thu Jul 14 23:47:32 2022 +0200 wifi: mac80211: do link->MLD address translation on RX In some cases, e.g. with Qualcomm devices and management frames, or in hwsim, frames may be reported from the driver with link addresses, but for decryption and matching needs we really want to have them with MLD addresses. Support the translation on RX. Signed-off-by: Johannes Berg net/mac80211/rx.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 3e0278b717b077f9ccf0280580ce6c5eb9c4dbac Author: Andrei Otcheretianski Date: Wed Jul 13 12:05:27 2022 +0300 wifi: mac80211: select link when transmitting to non-MLO stations When an MLO AP is transmitting to a non-MLO station, addr2 should be set to a link address. This should be done before the frame is encrypted as otherwise aad verification would fail. In case of software encryption this can't be left for the device to handle, and should be done by mac80211 when building the frame hdr. Signed-off-by: Andrei Otcheretianski Signed-off-by: Johannes Berg include/net/mac80211.h | 2 ++ net/mac80211/cfg.c | 4 ++++ net/mac80211/tx.c | 19 +++++++++++++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) commit f36fe0a2df03209f4d681fa954f20bfa4eefec45 Author: Johannes Berg Date: Thu Jul 14 23:40:47 2022 +0200 wifi: mac80211: fix up link station creation/insertion When we create a station with a non-default link, then we should have a link address, and we definitely need to insert it into the link hash table on insertion. Split the API into with and without link creation and if it has a link, insert the link into the link hash table on sta_info_insert(). Fixes: ba6ddab94fc6 ("wifi: mac80211: maintain link-sta hash table") Signed-off-by: Johannes Berg net/mac80211/cfg.c | 10 ++++++++-- net/mac80211/ibss.c | 4 ++-- net/mac80211/mesh_plink.c | 2 +- net/mac80211/mlme.c | 2 +- net/mac80211/ocb.c | 2 +- net/mac80211/sta_info.c | 49 +++++++++++++++++++++++++++++++++++------------ net/mac80211/sta_info.h | 7 ++++++- 7 files changed, 56 insertions(+), 20 deletions(-) commit d46ffecf82dea931c11a188e2cd618e0bfe083b1 Author: Johannes Berg Date: Thu Jul 14 22:23:02 2022 +0200 wifi: mac80211_hwsim: implement sta_state for MLO In MLO, we need to transmit to another MLD and select the link to it, which requires knowing the station. But in TX, mac80211 will not give us a station that's not added to the driver, which in the older add/remove API is only done later. Implement the new API in MLO so we know about the STA at all times and get a pointer during TX as well. Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 175ad2ec89feb8c01f87be64882af67481b1b1f5 Author: Johannes Berg Date: Wed Jul 13 18:08:03 2022 +0200 wifi: mac80211: limit A-MSDU subframes for client too In AP/mesh where the stations are added by userspace, we limit the number of A-MSDU subframes according to the extended capabilities. Refactor the code and extend that also to client-side. Fixes: 506bcfa8abeb ("mac80211: limit the A-MSDU Tx based on peer's capabilities") Signed-off-by: Johannes Berg net/mac80211/cfg.c | 29 ++--------------------------- net/mac80211/mlme.c | 3 +++ net/mac80211/sta_info.c | 23 +++++++++++++++++++++++ net/mac80211/sta_info.h | 4 ++++ 4 files changed, 32 insertions(+), 27 deletions(-) commit 5d3a341c0dd21f14eb97cea3754621d8aa1637de Author: Johannes Berg Date: Tue Jul 12 22:18:24 2022 +0200 wifi: mac80211: mlme: refactor ieee80211_set_associated() Split out much of the code in ieee80211_set_associated() into a new ieee80211_link_set_associated() which can be called per link later for MLO. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 67 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 26 deletions(-) commit 7464f665158e09f3f29116d8d0676824c1f1eeda Author: Johannes Berg Date: Tue Jul 12 18:32:49 2022 +0200 wifi: cfg80211: add cfg80211_get_iftype_ext_capa() Add a helper function cfg80211_get_iftype_ext_capa() to look up interface type-specific (extended) capabilities. Signed-off-by: Johannes Berg include/net/cfg80211.h | 8 ++++++++ net/wireless/util.c | 14 ++++++++++++++ 2 files changed, 22 insertions(+) commit 74e1309acedc1f091722f33e752aeb87d4ed4c33 Author: Johannes Berg Date: Tue Jul 12 17:21:22 2022 +0200 wifi: mac80211: mlme: look up beacon elems only if needed If NEED_DTIM_BEFORE_ASSOC isn't set, then we don't need to enter an RCU critical section and look up the beacon elements. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit 1845c1d4a455e000dbf66dc4126c98837ac3e528 Author: Johannes Berg Date: Tue Jul 12 15:21:23 2022 +0200 wifi: mac80211: mlme: refactor assoc link setup Factor out the code to set up the assoc link into a new function ieee80211_setup_assoc_link(). While at it, also modify the 'override' handling to just take into account whether or not the conn_flags were changed, which is what we need to setup again the channel later. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 286 ++++++++++++++++++++++++++++------------------------ 1 file changed, 156 insertions(+), 130 deletions(-) commit a857c21eaf398875dce41814761353e807054636 Author: Johannes Berg Date: Tue Jul 12 15:13:23 2022 +0200 wifi: mac80211: mlme: remove address arg to ieee80211_mark_sta_auth() There's no need to pass the address, we can look at the auth_data inside the function rather than outside. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6911458dc4283a790194d54d6e854a6ed63e42e8 Author: Johannes Berg Date: Tue Jul 12 14:59:22 2022 +0200 wifi: mac80211: mlme: refactor assoc success handling Refactor the per-link setup out of ieee80211_assoc_success() into a new function ieee80211_assoc_config_link(). It looks useless for now to parse the elements again inside ieee80211_assoc_config_link(), but that will be done with the link ID in the future. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 865 ++++++++++++++++++++++++++-------------------------- 1 file changed, 440 insertions(+), 425 deletions(-) commit 7781f0d81c7a7e6dc37aa2902a634b7dc08be54d Author: Johannes Berg Date: Tue Jul 12 14:48:55 2022 +0200 wifi: mac80211: mlme: refactor ieee80211_prep_channel() a bit Refactor ieee80211_prep_channel() to make the link argument optional and add a conn_flags pointer argument instead, so that we can later use this for links that don't exist yet to build the right information for MLO. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 81 +++++++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 37 deletions(-) commit 978420c2105ca903f8eb563106ea0f676a170ab6 Author: Johannes Berg Date: Tue Jul 12 14:38:02 2022 +0200 wifi: mac80211: mlme: refactor assoc req element building For MLO, we will need to build these elements per link, so factor out the code that does this, returning the capability, to simplify building the multi-link element in the future. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 276 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 161 insertions(+), 115 deletions(-) commit 39d805998c590429f6665f72e7b54a36c3035fa0 Author: Johannes Berg Date: Tue Jul 12 13:46:19 2022 +0200 wifi: mac80211: mlme: switch some things back to deflink With MLO, when we'll disconnect from an AP MLD, we'll just destroy all the links. Therefore, the only thing we (may) need to reset is the deflink data, so switch back to that and adjust the comments accordingly. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 71 +++++++++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 32 deletions(-) commit 4a21a8ae7964278f6ed8168a4391eaa88c4ab452 Author: Johannes Berg Date: Tue Jul 12 11:33:57 2022 +0200 wifi: mac80211: mlme: change flags in ieee80211_determine_chantype() For MLO we'll need to read flags not directly from the link as it may not even exist yet if we're just setting up flags for a secondary link before sending the association request, so pass the incoming conn_flags separately. Also, while at it, pass the sdata/link separately as for non-tracking now the link may be NULL. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 61513162aa2d6c17c37d25de2d0e5020cd9b37ec Author: Johannes Berg Date: Tue Jul 12 11:13:56 2022 +0200 wifi: mac80211: mlme: shift some code around We'll need ieee80211_prep_channel() in other code for MLO later, so move the code up - unchanged for now - to avoid forward declarations in the future. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 3634 ++++++++++++++++++++++++++------------------------- 1 file changed, 1825 insertions(+), 1809 deletions(-) commit bbe90107e1d9e1bb5fac0e36c63d4c1649a9a77d Author: Johannes Berg Date: Tue Jul 12 11:06:33 2022 +0200 wifi: mac80211: mlme: refactor link station setup Refactor the code here since we need to have it also for each link station after association in MLO later. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 119 ++++++++++++++++++++++++++++------------------------ 1 file changed, 65 insertions(+), 54 deletions(-) commit 39eac2de0098c3ac3e9c35cfdc924543f1f67acc Author: Johannes Berg Date: Tue Jul 12 10:49:23 2022 +0200 wifi: mac80211: move IEEE80211_SDATA_OPERATING_GMODE to link The flag here is currently per interface, but the way we set and clear it means it should be per link, so change it. Signed-off-by: Johannes Berg net/mac80211/ibss.c | 6 ++---- net/mac80211/ieee80211_i.h | 6 ++++-- net/mac80211/mlme.c | 7 ++----- net/mac80211/ocb.c | 2 +- net/mac80211/tx.c | 2 +- net/mac80211/util.c | 8 ++++---- 6 files changed, 14 insertions(+), 17 deletions(-) commit de03f8ac5c5225a675c754c1b2b69771b77dfa84 Author: Johannes Berg Date: Mon Jul 11 15:13:20 2022 +0200 wifi: mac80211: make ieee80211_check_rate_mask() link-aware Change ieee80211_check_rate_mask() to use a link rather than the sdata and deflink/bss_conf. Signed-off-by: Johannes Berg net/mac80211/cfg.c | 2 +- net/mac80211/mlme.c | 2 +- net/mac80211/rate.c | 9 +++++---- net/mac80211/rate.h | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) commit 8ec9a96b83bd69a8735f2a532105a62eb2e05309 Author: Johannes Berg Date: Tue Jul 12 13:38:07 2022 +0200 wifi: mac80211: add multi-link element to AUTH frames When sending an authentication frame from an MLD, include the multi-link element with the MLD address and use the link address for transmission. Signed-off-by: Johannes Berg net/mac80211/util.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 64f4b93afaf18f471724268bbb2d43262a9e0334 Author: Johannes Berg Date: Tue Jul 12 13:40:02 2022 +0200 wifi: mac80211: mlme: clean up supported channels element code Clean up the code building the supported channels element a little bit by using a local variable instead of the long line. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b048c98447fde83de9f9a2b0974aa1ffd931d012 Author: Johannes Berg Date: Tue Jul 12 13:36:37 2022 +0200 wifi: mac80211: release channel context on link stop When a link is stopped for removal, release the channel context it may have. Signed-off-by: Johannes Berg net/mac80211/iface.c | 2 ++ 1 file changed, 2 insertions(+) commit 19343659c82e8a8d2208773446f3f83fe0c43de0 Author: Johannes Berg Date: Tue Jul 12 13:35:54 2022 +0200 wifi: mac80211: prohibit DEAUTH_NEED_MGD_TX_PREP in MLO For now, prohibit DEAUTH_NEED_MGD_TX_PREP since we can't really transmit this on a specific link yet as we don't know which links are active. Signed-off-by: Johannes Berg net/mac80211/main.c | 3 +++ 1 file changed, 3 insertions(+) commit ff5c4dc4cd78ae88e52f0eaa757c0d8fd222ccfd Author: Johannes Berg Date: Tue Jul 12 17:33:13 2022 +0200 wifi: nl80211: fix some attribute policy entries The new NL80211_CMD_ADD_LINK_STA and NL80211_CMD_MODIFY_LINK_STA commands have strict policy validation, so fix the policy so it can be validated correctly. Signed-off-by: Johannes Berg net/wireless/nl80211.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit df35f3164ec1150249bcf559e7837edde2a0c66a Author: Johannes Berg Date: Mon Jul 11 14:18:18 2022 +0200 wifi: nl80211: reject fragmented and non-inheritance elements The underlying mac80211 code cannot deal with fragmented elements for purposes of sorting the elements into the association frame, so reject those inside the link. We might want to reject them inside the assoc frame, but they're used today for FILS, so cannot do that. The non-inheritance element inside the links similarly cannot be handled by mac80211, and outside the links it makes no sense. Reject both since using them could lead to an incorrect implementation. Signed-off-by: Johannes Berg net/wireless/nl80211.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 34d76a14f8f75df1b37557247a973b9093c74a24 Author: Johannes Berg Date: Mon Jul 11 11:53:20 2022 +0200 wifi: nl80211: reject link specific elements on assoc link When we associate, we'll include all the elements for the link we're sending the association request on in the frame and the specific ones for other links in the multi-link element container. Prohibit adding link-specific elements for the association link. Fixes: d648c23024bd ("wifi: nl80211: support MLO in auth/assoc") Signed-off-by: Johannes Berg net/wireless/nl80211.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e3d331c9b6205d21ace0f5285d21a5ba553c1068 Author: Johannes Berg Date: Wed Jul 13 10:24:23 2022 +0200 wifi: cfg80211: set country_elem to NULL The link loop will always have a valid link so that it's always set, but static checkers don't always see that, so set it to NULL explicitly. Fixes: efbabc116500 ("cfg80211: Indicate MLO connection info in connect and roam callbacks") Signed-off-by: Johannes Berg net/wireless/sme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7840bd468a99edac26492afa828b8fcbbbb2384e Author: Gregory Greenman Date: Mon Jul 4 00:38:22 2022 +0300 wifi: mac80211: remove link_id parameter from link_info_changed() Since struct ieee80211_bss_conf already contains link_id, passing link_id is not necessary. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 3 ++- include/net/mac80211.h | 1 - net/mac80211/driver-ops.h | 4 ++-- net/mac80211/main.c | 5 ++--- net/mac80211/trace.h | 6 +++--- 5 files changed, 9 insertions(+), 10 deletions(-) commit 727eff4dd198d79f9e81d3aafbab741a8374b5d0 Author: Gregory Greenman Date: Sun Jul 3 18:04:15 2022 +0300 wifi: mac80211: replace link_id with link_conf in switch/(un)assign_vif_chanctx() Since mac80211 already has a protected pointer to link_conf, pass it to the driver to avoid additional RCU locking. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath10k/mac.c | 4 ++-- drivers/net/wireless/ath/ath11k/mac.c | 4 ++-- drivers/net/wireless/ath/ath9k/main.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 ++-- drivers/net/wireless/mac80211_hwsim.c | 4 ++-- drivers/net/wireless/silabs/wfx/sta.c | 4 ++-- drivers/net/wireless/silabs/wfx/sta.h | 4 ++-- drivers/net/wireless/ti/wlcore/main.c | 4 ++-- include/net/mac80211.h | 8 +++---- net/mac80211/chan.c | 9 ++++---- net/mac80211/driver-ops.h | 26 ++++++++++++++++------- net/mac80211/trace.h | 16 +++++++------- net/mac80211/util.c | 2 +- 13 files changed, 51 insertions(+), 42 deletions(-) commit fa2ca639c4e6f8d9bf11687a7e5e348c4c15b8c0 Author: Johannes Berg Date: Mon Jul 11 10:08:11 2022 +0200 wifi: nl80211: advertise MLO support At least while we don't have any more specific interface combinations support, add a simple flag for MLO support, we can keep this later based on something other than the wiphy flag. Signed-off-by: Johannes Berg net/wireless/nl80211.c | 3 +++ 1 file changed, 3 insertions(+) commit 0cbf348a9a790d5dfbfa1b5b463f09507e7594fc Author: Andrei Otcheretianski Date: Wed Jun 22 16:15:56 2022 +0300 wifi: mac80211: Support multi link in ieee80211_recalc_min_chandef() Recalculate min channel context for the given or all interface links, depending on the caller. For a station state change, we need to recalculate all of them since we don't know which link (or multiple) it might be on. Signed-off-by: Andrei Otcheretianski Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 3 ++- net/mac80211/sta_info.c | 6 +++--- net/mac80211/util.c | 40 +++++++++++++++++++++++++++++++++------- net/mac80211/vht.c | 2 +- 4 files changed, 39 insertions(+), 12 deletions(-) commit e10b680118774cf43e02f9e1fc84989636d1b5e5 Author: Andrei Otcheretianski Date: Tue Jun 14 10:16:26 2022 +0300 wifi: mac80211: don't check carrier in chanctx code We check here that we don't enable TX (netif_carrier_ok()) before we actually start using some channel context, but to our knowledge this check has never triggered, and with MLO it's just wrong since links can be added and removed much more dynamically than before. Simply remove the checks, there's no really good way to do anything that would replace them. Signed-off-by: Andrei Otcheretianski Signed-off-by: Johannes Berg net/mac80211/chan.c | 4 ---- 1 file changed, 4 deletions(-) commit 69c3f2d30c357613f9059809bc95170301056aee Author: Ilan Peer Date: Sun Jun 12 16:49:45 2022 +0300 wifi: nl80211: allow link ID in set_wiphy with frequency This simplifies hostapd implementation, since it didn't switch to NL80211_CMD_SET_CHANNEL. Signed-off-by: Ilan Peer Signed-off-by: Johannes Berg net/wireless/nl80211.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0d5891e347a4924a6e6fd8e2799e3d3c762983eb Author: Andrei Otcheretianski Date: Thu Jun 30 16:43:44 2022 +0300 wifi: mac80211: Allow EAPOL tx from specific link Allow link source address on TX. Signed-off-by: Andrei Otcheretianski Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 3 +++ net/mac80211/rx.c | 4 ++-- net/mac80211/tx.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) commit d06faef148837e39c320ed0b20a325165c6ba8d4 Author: Andrei Otcheretianski Date: Thu Jun 30 15:37:37 2022 +0300 wifi: mac80211: Allow EAPOL frames from link addresses Allow transmitting EAPOL frames not only from the interface address (which is the MLD address) but also any link addresses, in order to support non-MLO stations on AP interfaces. Signed-off-by: Andrei Otcheretianski Signed-off-by: Johannes Berg net/mac80211/rx.c | 60 +++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit 67207bab9341418698ae1029b28a44b58c39257e Author: Andrei Otcheretianski Date: Thu Jun 30 15:27:59 2022 +0300 wifi: cfg80211/mac80211: Support control port TX from specific link In case of authentication with a legacy station, link addressed EAPOL frames should be sent. Support it. Signed-off-by: Andrei Otcheretianski Signed-off-by: Johannes Berg include/net/cfg80211.h | 2 +- net/mac80211/ieee80211_i.h | 2 +- net/mac80211/tx.c | 20 ++++++++++++++++++-- net/wireless/nl80211.c | 5 ++++- net/wireless/rdev-ops.h | 7 ++++--- net/wireless/trace.h | 11 +++++++---- 6 files changed, 35 insertions(+), 12 deletions(-) commit d2bc52498b6bafb7c2d80347b9f8fea9e3c7fc66 Author: Andrei Otcheretianski Date: Sun Jun 26 10:35:48 2022 +0300 wifi: nl80211: Support MLD parameters in nl80211_set_station() Set the MLD parameters in NL80211_CMD_SET_STATION handling to be able to change an MLD station. Signed-off-by: Andrei Otcheretianski Signed-off-by: Johannes Berg net/wireless/nl80211.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 45aaf17c0c3471efa3100dadfc65e3d459821443 Author: Johannes Berg Date: Thu Jul 7 18:19:27 2022 +0200 wifi: nl80211: check MLO support in authenticate We should check that MLO connections are supported before attempting to authenticate with MLO parameters, check that. Fixes: d648c23024bd ("wifi: nl80211: support MLO in auth/assoc") Signed-off-by: Johannes Berg net/wireless/nl80211.c | 2 ++ 1 file changed, 2 insertions(+) commit e434254946c64bb27d7b202c0eeac03e49c166aa Author: Johannes Berg Date: Thu Jul 7 15:28:14 2022 +0200 wifi: mac80211: add a helper to fragment an element The way this works is that you add all the element data, keeping a pointer to the length field of the element. Then call this helper function, which will fragment the element if there was more than 255 bytes in the element, memmove()ing the data back if needed. Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 1 + net/mac80211/util.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit 8a263dcb585f5d4193e33e22ae245e90dd0b0786 Author: Johannes Berg Date: Thu Jul 7 15:11:54 2022 +0200 wifi: mac80211: skip rate statistics for MLD STAs For now, skip rate statistics here to avoid warnings in the called code, we'll need to adjust this to have all the statistics for link stations. Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9b6bf4d6120adfe8c631830dbe1c7c6c64e07ce5 Author: Johannes Berg Date: Thu Jul 7 15:03:51 2022 +0200 wifi: nl80211: set BSS to NULL if IS_ERR() If the BSS lookup returned an error, set it to NULL so we don't try to free it. Fixes: d648c23024bd ("wifi: nl80211: support MLO in auth/assoc") Signed-off-by: Johannes Berg net/wireless/nl80211.c | 1 + 1 file changed, 1 insertion(+) commit 4e9c3af398207d95957ae6c25290891574f2d7e8 Author: Johannes Berg Date: Mon Jul 4 15:02:33 2022 +0200 wifi: nl80211: add EML/MLD capabilities to per-iftype capabilities We have the per-interface type capabilities, currently for extended capabilities, add the EML/MLD capabilities there to have this advertised by the driver. Signed-off-by: Johannes Berg include/net/cfg80211.h | 4 ++++ include/uapi/linux/nl80211.h | 12 ++++++++++-- net/wireless/nl80211.c | 9 +++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) commit efbfe5165e5dd353343af47199e0ee0dba139aed Author: Johannes Berg Date: Wed Jul 6 15:31:55 2022 +0200 wifi: nl80211: better validate link ID for stations If we add a station on an MLD, we need a link ID to see where it lives (by default). Validate the link ID against the valid_links. Signed-off-by: Johannes Berg net/wireless/nl80211.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit d3e2439b0f339de319d27118f6de365753081179 Author: Johannes Berg Date: Wed Jul 6 14:03:07 2022 +0200 wifi: mac80211: fix link manipulation When we add non-deflink pointers, we need to remove the link[0] pointer to deflink in case link[0] is not valid afterwards. Also, we need to add that back when there are no more valid links. Reorg the code to fix that. Signed-off-by: Johannes Berg net/mac80211/iface.c | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) commit 939c4c7e823b161701637720016999ef1f4ae4db Author: Johannes Berg Date: Wed Jul 6 10:09:57 2022 +0200 wifi: mac80211: tighten locking check When we remove a link that doesn't have a channel context, we don't really need the local->mtx locking. Tighten the check here. Signed-off-by: Johannes Berg net/mac80211/chan.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit cdf0a0a80c841cfede6926d417a8756ea4c52d26 Author: Johannes Berg Date: Wed Jul 6 09:57:42 2022 +0200 wifi: cfg80211: clean up links appropriately This was missing earlier, we need to remove links when interfaces are being destroyed, and we also need to stop (AP) operations when a link is being destroyed. Address these issues to remove many warnings that will otherwise appear in mac80211. Signed-off-by: Johannes Berg net/wireless/core.c | 3 ++- net/wireless/core.h | 5 +++++ net/wireless/nl80211.c | 11 ++--------- net/wireless/util.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 10 deletions(-) commit a95fe067825526b10c8a165df2d77db1ddce42fa Author: Johannes Berg Date: Fri Jul 1 16:22:29 2022 +0200 wifi: mac80211: consider EHT element size in assoc request We need to consider the (maximum) size of the EHT element we'll add for the association request, otherwise we may run out of space. Fixes: 820acc810fb6 ("mac80211: Add EHT capabilities to association/probe request") Signed-off-by: Johannes Berg net/mac80211/mlme.c | 3 +++ 1 file changed, 3 insertions(+) commit df9a9c44e91ba4305249a7e61284b15d54f70b19 Author: Johannes Berg Date: Fri Jul 1 16:14:33 2022 +0200 wifi: mac80211: mlme: simplify adding ht/vht/he/eht elements The functions currently take a link and check data from it, but this needs to change for MLO. Simplify the prototypes by passing only the needed arguments. Remove the regulatory checks, the warnings shouldn't trigger, and haven't as far as I know. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 79 +++++++++++++++++++++-------------------------------- 1 file changed, 31 insertions(+), 48 deletions(-) commit 3c68cb81bf611f6c80ccb164556808d7e04cca89 Author: Johannes Berg Date: Fri Jul 1 15:38:57 2022 +0200 wifi: mac80211: refactor adding custom elements Rework the sorting of custom elements into the association request by moving the elements before HT/VHT/HE to each their own function. While at it, fix the placement of the ones that should be between VHT and HE. This doesn't fix the placement of elements that should be between HE and EHT yet, a similar change might be needed in the future. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 212 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 125 insertions(+), 87 deletions(-) commit c1690b66ba7016a5c25dc1fb77133cbf64622fcc Author: Johannes Berg Date: Fri Jul 1 14:08:25 2022 +0200 wifi: mac80211: refactor adding rates to assoc request There's some awkward code that really only exists because we want to optimize the allocation size, but that's not really all that necessary. Refactor the code that adds rates to the association request frame to have a separate function, removing the goto. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 141 +++++++++++++++++++++++++++------------------------- 1 file changed, 74 insertions(+), 67 deletions(-) commit 3dc05935ead81ffafa6d937552cfae1f1463b4a8 Author: Johannes Berg Date: Fri Jul 1 14:01:59 2022 +0200 wifi: mac80211: use only channel width in ieee80211_parse_bitrates() For MLO, we may not have a full chandef here later, so change the API to pass only the width. Signed-off-by: Johannes Berg net/mac80211/cfg.c | 4 ++-- net/mac80211/ieee80211_i.h | 12 +++++++++--- net/mac80211/mlme.c | 3 ++- net/mac80211/util.c | 6 +++--- 4 files changed, 16 insertions(+), 9 deletions(-) commit 19654a61bfd66539087119fbceed46e48f084d89 Author: Johannes Berg Date: Fri Jul 1 14:01:29 2022 +0200 wifi: cfg80211: add ieee80211_chanwidth_rate_flags() To simplify things when we don't have a full chandef, add ieee80211_chanwidth_rate_flags(). Signed-off-by: Johannes Berg include/net/cfg80211.h | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit c57d2e6a6554df407ef63cc9b65290de2344d51e Author: Johannes Berg Date: Fri Jul 1 13:40:19 2022 +0200 wifi: mac80211: remove redundant condition Here, ext_capa is checked and can only be non-NULL if assoc_data->ie_len was set before, so the check here is redundant. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 483456590adee7b97b201c6c5880095be14e1fd9 Author: Johannes Berg Date: Thu Jun 30 14:20:54 2022 +0200 wifi: mac80211: don't set link address for station We need to handle the link addresses for station differently, they will be determined by the association code, stored, and then applied when the links are actually created on success, cfg80211 will fill in the right addresses per the data we're sending back to it. Signed-off-by: Johannes Berg net/mac80211/iface.c | 3 --- 1 file changed, 3 deletions(-) commit 38c6aa29d4558c55a1d2b4010cc588716e212f89 Author: Johannes Berg Date: Wed Jun 29 13:29:05 2022 +0200 wifi: mac80211: fix multi-BSSID element parsing When parsing a frame containing a multi-BSSID element, we need to know both the transmitted and non-transmitted BSSID so we can parse it correctly. Unfortunately, in quite a number of cases, we got this wrong and were passing the wrong BSSID or useless information: * the mgmt->bssid from a frame is only the transmitted BSSID if the frame is a beacon * passing just one of the parameters as non-NULL isn't useful and ignored In those case where we need to parse for a specific BSS we always have a BSS structure pointer, representing the BSS we need, whether transmitted or not. Thus, pass that pointer to the parsing function instead of the two BSSIDs. Also fix two bugs: * we need to re-parse all the elements for the other BSS when iterating the non-transmitted BSSes in scan * we need to parse for the correct BSS when setting up the channel data in client code Fixes: 78ac51f81532 ("mac80211: support multi-bssid") Signed-off-by: Johannes Berg net/mac80211/agg-rx.c | 2 +- net/mac80211/ibss.c | 5 ++--- net/mac80211/ieee80211_i.h | 22 ++++++++-------------- net/mac80211/mesh.c | 8 +++----- net/mac80211/mesh_hwmp.c | 2 +- net/mac80211/mesh_plink.c | 3 +-- net/mac80211/mlme.c | 17 +++++++---------- net/mac80211/scan.c | 12 ++++++++---- net/mac80211/tdls.c | 4 ++-- net/mac80211/util.c | 13 +++++-------- 10 files changed, 38 insertions(+), 50 deletions(-) commit ab3a830d96644522eec0cd379cec46d854548b11 Author: Johannes Berg Date: Wed Jun 29 12:01:41 2022 +0200 wifi: mac80211: move tdls_chan_switch_prohibited to link data This value should be per link, since a TDLS connection is only established on a given link. Signed-off-by: Johannes Berg net/mac80211/cfg.c | 2 +- net/mac80211/ieee80211_i.h | 3 ++- net/mac80211/mlme.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) commit 635495e9c43da6280ec05e10a5fc6b9b62cbafe3 Author: Johannes Berg Date: Wed Jun 29 11:52:49 2022 +0200 wifi: mac80211: don't re-parse elems in ieee80211_assoc_success() We're already passing the elems pointer, and have parsed them from the same frame with exactly the same parameters, so don't need to do that again. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit b327c84c328ed2be4dbad4f5ed7c17476fe1b3bf Author: Gregory Greenman Date: Wed Jun 29 12:22:24 2022 +0300 wifi: mac80211: replace link_id with link_conf in start/stop_ap() When calling start/stop_ap(), mac80211 already has a protected link_conf pointer. Pass it to the driver, so it shouldn't handle RCU protection. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 16 ++++++++-------- drivers/net/wireless/realtek/rtw88/mac80211.c | 3 ++- drivers/net/wireless/realtek/rtw89/mac80211.c | 5 +++-- drivers/net/wireless/silabs/wfx/sta.c | 4 ++-- drivers/net/wireless/silabs/wfx/sta.h | 4 ++-- include/net/mac80211.h | 4 ++-- net/mac80211/cfg.c | 4 ++-- net/mac80211/driver-ops.h | 18 ++++++++++++------ net/mac80211/trace.h | 23 +++++++++-------------- net/mac80211/util.c | 3 ++- 10 files changed, 44 insertions(+), 40 deletions(-) commit fd17bf041b40e3dac705c4313854becbe07b7557 Author: Johannes Berg Date: Tue Jun 28 17:49:12 2022 +0200 wifi: mac80211: refactor elements parsing with parameter struct Refactor the element parsing into a version that has a parameter struct so we can add more parameters more easily in the future. Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 50 +++++++++++++++++++++++++++++++++++---- net/mac80211/util.c | 58 +++++++++++++++++++++++----------------------- 2 files changed, 74 insertions(+), 34 deletions(-) commit 5cd212cb6415aa604ada17d5150847fd65d27337 Author: Johannes Berg Date: Tue Jun 28 17:17:05 2022 +0200 wifi: cfg80211: extend cfg80211_rx_assoc_resp() for MLO Extend the cfg80211_rx_assoc_resp() to cover multiple BSSes, the AP MLD address and local link addresses for MLO. Signed-off-by: Johannes Berg include/net/cfg80211.h | 9 ++++++- net/mac80211/mlme.c | 2 +- net/wireless/mlme.c | 64 +++++++++++++++++++++++++++++++++----------------- net/wireless/trace.h | 16 ++++++------- 4 files changed, 59 insertions(+), 32 deletions(-) commit cd47c0f57ae6607cfa3d161e341cbdd283bc444f Author: Johannes Berg Date: Tue Jun 28 16:25:37 2022 +0200 wifi: cfg80211: put cfg80211_rx_assoc_resp() arguments into a struct For MLO we'll need a lot more arguments, including all the BSS pointers and link addresses, so move the data to a struct to be able to extend it more easily later. Signed-off-by: Johannes Berg include/net/cfg80211.h | 24 +++++++++++++++++------- net/mac80211/mlme.c | 17 ++++++++++++----- net/wireless/mlme.c | 32 +++++++++++++++----------------- net/wireless/nl80211.c | 12 ++++++------ net/wireless/nl80211.h | 4 +--- 5 files changed, 51 insertions(+), 38 deletions(-) commit e69dac88a155bd626170bb0bb43f83fb564392f7 Author: Johannes Berg Date: Tue Jun 28 11:25:38 2022 +0200 wifi: cfg80211: adjust assoc comeback for MLO We only report the BSSID to userspace, so change the argument from BSS struct pointer to AP address, which we'll use to carry either the BSSID or AP MLD address. Signed-off-by: Johannes Berg include/net/cfg80211.h | 4 ++-- net/mac80211/mlme.c | 2 +- net/wireless/nl80211.c | 6 +++--- net/wireless/trace.h | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) commit afa2d65938fec74baf6307fd906b4f86e4a411ab Author: Johannes Berg Date: Mon Jun 27 22:23:42 2022 +0200 wifi: mac80211: mlme: unify assoc data event sending There are a few cases where we send an event to cfg80211 manually, but ieee80211_destroy_assoc_data() also handles the case of abandoning; some cases don't need an event and success is handled yet differently. Unify this by providing a single status argument to the ieee80211_destroy_assoc_data() function and then handling all the different cases of events (or no events) there. This will help simplify the code when MLO support is added. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 51 ++++++++++++++++++++------------------------------- 1 file changed, 20 insertions(+), 31 deletions(-) commit f662d2f4e22e5d5a9215e9c881875a4769494ef6 Author: Johannes Berg Date: Mon Jun 27 22:09:50 2022 +0200 wifi: cfg80211: prepare association failure APIs for MLO For MLO, we need the ability to report back multiple BSS structures to release, as well as the AP MLD address (if attempting to make an MLO connection). Unify cfg80211_assoc_timeout() and cfg80211_abandon_assoc() into a new cfg80211_assoc_failure() that gets a structure parameter with the necessary data. Signed-off-by: Johannes Berg include/net/cfg80211.h | 29 +++++++++++++++++------------ net/mac80211/mlme.c | 28 +++++++++++++++++++++++----- net/wireless/mlme.c | 36 +++++++++++++++++++----------------- net/wireless/trace.h | 19 ++++++++++++++++--- 4 files changed, 75 insertions(+), 37 deletions(-) commit 8f6e0dfc2245d8ca1a3335a06a1219c56df04bb8 Author: Johannes Berg Date: Mon Jun 27 16:19:18 2022 +0200 wifi: cfg80211: remove BSS pointer from cfg80211_disassoc_request The race described by the comment in mac80211 hasn't existed since the locking rework to use the same lock and for MLO we need to pass the AP MLD address, so just pass the BSSID or AP MLD address instead of the BSS struct pointer, and adjust all the code accordingly. Signed-off-by: Johannes Berg include/net/cfg80211.h | 6 +++--- net/mac80211/mlme.c | 14 +++++--------- net/wireless/core.h | 2 +- net/wireless/mlme.c | 8 +++----- net/wireless/trace.h | 5 +---- 5 files changed, 13 insertions(+), 22 deletions(-) commit 98b0b467466c6afe8f2863158383444fbbc5f322 Author: Johannes Berg Date: Mon Jun 27 14:17:28 2022 +0200 wifi: mac80211: mlme: use correct link_sta For station capabilities, e.g. TWT, we need to use the correct link station instead of deflink. Switch the code to do that. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 50 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 17 deletions(-) commit d3853f700ce621f7f90f3a119a1b706f829fc55f Author: Johannes Berg Date: Mon Jun 27 14:15:09 2022 +0200 wifi: mac80211: mlme: remove sta argument from ieee80211_config_bw The argument is unused except for NULL checking, but we already do that anyway, so it's not needed. Remove the argument. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 1dd0f31c23aa15d201576ae0b2a478cad8d7458f Author: Johannes Berg Date: Mon Jun 27 14:10:18 2022 +0200 wifi: mac80211: mlme: use ieee80211_get_link_sband() This requires a few more changes. While at it, also add a warning to ieee80211_get_sband() to avoid it being used when there are multiple links. Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 2 ++ net/mac80211/mlme.c | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) commit 6359598df67fe7d4d335298f50a23cb55dd1547b Author: Johannes Berg Date: Mon Jun 27 13:13:04 2022 +0200 wifi: mac80211: split IEEE80211_STA_DISABLE_WMM to link data If we decide to stop tracking QoS/WMM parameters, then this should be a per-link decision. Move the flag to the link instead. Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 2 +- net/mac80211/mlme.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) commit 5bd5666d8ad88366789b344647529841f6dadd7f Author: Johannes Berg Date: Fri Jun 24 16:18:56 2022 +0200 wifi: mac80211: mlme: first adjustments for MLO Do the first adjustments in the client-side code to pass the link pointer (instead of sdata) to most places etc. This is just preparation, so the real MLO patches become smaller. Note that this isn't complete, notably there are still quite a few references to sta->deflink and sta->sta.deflink. Signed-off-by: Johannes Berg net/mac80211/chan.c | 2 +- net/mac80211/ieee80211_i.h | 4 +- net/mac80211/mlme.c | 765 ++++++++++++++++++++++++--------------------- 3 files changed, 408 insertions(+), 363 deletions(-) commit 42ed6748afa45fb3f540a5fd83595eee050c48fe Author: Johannes Berg Date: Fri Jun 24 16:28:33 2022 +0200 wifi: mac80211: mlme: do IEEE80211_STA_RESET_SIGNAL_AVE per link Remove the IEEE80211_STA_RESET_SIGNAL_AVE flag and use a bool instead, but invert the polarity (now calling it tracking_signal_avg) so we don't have to initialize it, and put that into the link instead. Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 2 +- net/mac80211/mlme.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) commit b65567b03c9502e67bed6707cb53a4c730c2bee2 Author: Johannes Berg Date: Fri Jun 24 16:08:39 2022 +0200 wifi: mac80211: mlme: track AP (MLD) address separately To prepare a bit more for MLO in the client code, track the AP's address (for now only the BSSID, but will track the AP MLD's address later) separately from the per-link BSSID. Signed-off-by: Johannes Berg include/net/mac80211.h | 3 +++ net/mac80211/mlme.c | 30 ++++++++++++++++-------------- 2 files changed, 19 insertions(+), 14 deletions(-) commit 7ebe994fbd2da8160ebc178c883ad92dc5e57dcf Author: Johannes Berg Date: Fri Jun 24 15:54:38 2022 +0200 wifi: mac80211: remove unused bssid variable This variable is only written to, remove it. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 2 -- 1 file changed, 2 deletions(-) commit b3e2130bf5f6c66831707cd51a8b13007137ac37 Author: Johannes Berg Date: Fri Jun 24 15:40:11 2022 +0200 wifi: mac80211: change QoS settings API to take link into account Take the link into account in the QoS settings (EDCA parameters) APIs. Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath10k/mac.c | 3 +- drivers/net/wireless/ath/ath11k/mac.c | 3 +- drivers/net/wireless/ath/ath5k/mac80211-ops.c | 3 +- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 3 +- drivers/net/wireless/ath/ath9k/main.c | 3 +- drivers/net/wireless/ath/carl9170/main.c | 3 +- drivers/net/wireless/broadcom/b43/main.c | 3 +- drivers/net/wireless/broadcom/b43legacy/main.c | 3 +- .../broadcom/brcm80211/brcmsmac/mac80211_if.c | 3 +- drivers/net/wireless/intel/iwlegacy/common.c | 3 +- drivers/net/wireless/intel/iwlegacy/common.h | 3 +- drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c | 5 +- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 3 +- drivers/net/wireless/intersil/p54/main.c | 3 +- drivers/net/wireless/mac80211_hwsim.c | 8 ++-- drivers/net/wireless/marvell/mwl8k.c | 5 +- drivers/net/wireless/mediatek/mt76/mt7603/main.c | 3 +- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 3 +- drivers/net/wireless/mediatek/mt76/mt76x02.h | 3 +- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 3 +- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 3 +- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 3 +- drivers/net/wireless/mediatek/mt7601u/mt7601u.h | 3 +- drivers/net/wireless/mediatek/mt7601u/tx.c | 3 +- drivers/net/wireless/ralink/rt2x00/rt2400pci.c | 5 +- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 5 +- drivers/net/wireless/ralink/rt2x00/rt2800lib.h | 3 +- drivers/net/wireless/ralink/rt2x00/rt2x00.h | 3 +- drivers/net/wireless/ralink/rt2x00/rt2x00mac.c | 3 +- drivers/net/wireless/ralink/rt2x00/rt61pci.c | 5 +- drivers/net/wireless/ralink/rt2x00/rt73usb.c | 5 +- drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c | 3 +- drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 3 +- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 3 +- drivers/net/wireless/realtek/rtlwifi/core.c | 3 +- drivers/net/wireless/realtek/rtw88/mac80211.c | 3 +- drivers/net/wireless/realtek/rtw89/mac80211.c | 3 +- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 3 +- drivers/net/wireless/silabs/wfx/sta.c | 3 +- drivers/net/wireless/silabs/wfx/sta.h | 3 +- drivers/net/wireless/st/cw1200/sta.c | 3 +- drivers/net/wireless/st/cw1200/sta.h | 3 +- drivers/net/wireless/ti/wl1251/main.c | 3 +- drivers/net/wireless/ti/wlcore/main.c | 3 +- include/net/mac80211.h | 3 +- net/mac80211/cfg.c | 7 +-- net/mac80211/driver-ops.c | 8 ++-- net/mac80211/driver-ops.h | 2 +- net/mac80211/ibss.c | 2 +- net/mac80211/ieee80211_i.h | 5 +- net/mac80211/iface.c | 2 +- net/mac80211/mlme.c | 55 ++++++++++++---------- net/mac80211/tdls.c | 2 +- net/mac80211/trace.h | 9 ++-- net/mac80211/util.c | 18 +++---- 55 files changed, 158 insertions(+), 104 deletions(-) commit 8c7c6b581987dda035c73661cf83973a02a055d8 Author: Johannes Berg Date: Fri Jun 24 15:14:26 2022 +0200 wifi: mac80211: expect powersave handling in driver for MLO In MLO, expect the driver fully handles powersave handling, including tracking whether or not a beacon was received, the DTIM period, etc. Signed-off-by: Johannes Berg net/mac80211/main.c | 3 ++- net/mac80211/mlme.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) commit a3b8008dc1421a6f1d0d92cfc1352d729f6756c1 Author: Johannes Berg Date: Fri Jun 24 15:02:16 2022 +0200 wifi: mac80211: move ps setting to vif config This really shouldn't be in a per-link config, we don't want to let anyone control it that way (if anything, link powersave could be forced through APIs to activate/deactivate a link), and we don't support powersave in software with devices that can do MLO. Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath10k/mac.c | 2 +- drivers/net/wireless/ath/ath11k/mac.c | 2 +- drivers/net/wireless/ath/wcn36xx/main.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/power.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 2 +- drivers/net/wireless/silabs/wfx/sta.c | 6 +++--- drivers/net/wireless/ti/wlcore/main.c | 4 ++-- include/net/mac80211.h | 6 +++--- net/mac80211/main.c | 1 + net/mac80211/mlme.c | 7 +++---- net/mac80211/trace.h | 4 ++-- 13 files changed, 22 insertions(+), 22 deletions(-) commit 3fbddae46e5fc3f1630c7cf561d88e4ad21c7105 Author: Johannes Berg Date: Fri Jun 24 14:42:12 2022 +0200 wifi: mac80211: provide link ID in link_conf It might be useful to drivers to be able to pass only the link_conf pointer, rather than both the pointer and the link_id; add the link_id to the link_conf to facility that. Signed-off-by: Johannes Berg include/net/mac80211.h | 2 ++ net/mac80211/iface.c | 1 + 2 files changed, 3 insertions(+) commit b2e8434f1829bb500f79b1adb80ffed2316811cf Author: Johannes Berg Date: Fri Jun 24 10:57:41 2022 +0200 wifi: mac80211: set up/tear down client vif links properly In station/client mode, the link data needs a bit more initialization and destruction than just zero-init and kfree() respectively, implement that. This required some shuffling of the link data handling in general, as we should set it up in setup and do the teardown in teardown, otherwise we're asymmetric in case of interface type changes. Also stop using kfree_rcu(), we cannot guarantee that nothing is scheduling things that live within the link (e.g. the u.mgd.request_smps_work) until we're sure it cannot be referenced anymore, therefore synchronize instead. This isn't very efficient, but we can always optimize it later. Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 2 + net/mac80211/iface.c | 346 +++++++++++++++++++++++++++------------------ net/mac80211/mlme.c | 35 +++-- 3 files changed, 232 insertions(+), 151 deletions(-) commit 94ddc3b5aa21c261be277eab8bc80f7520038a34 Author: Johannes Berg Date: Fri Jun 24 11:15:52 2022 +0200 wifi: mac80211: move ieee80211_request_smps_mgd_work This function can be static. Signed-off-by: Johannes Berg net/mac80211/ht.c | 12 ------------ net/mac80211/ieee80211_i.h | 1 - net/mac80211/mlme.c | 12 ++++++++++++ 3 files changed, 12 insertions(+), 13 deletions(-) commit 284b38b6902a7154e3675482418a7b6df47808fe Author: Johannes Berg Date: Mon Jun 27 12:49:03 2022 +0200 wifi: nl80211: acquire wdev mutex for dump_survey At least the quantenna driver calls wdev_chandef() here which now requires the lock, so acquire it. Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs") Signed-off-by: Johannes Berg net/wireless/nl80211.c | 2 ++ 1 file changed, 2 insertions(+) commit e2722d278ee3dbc589e4fdf1e7970f4d2b62c7dc Author: Johannes Berg Date: Thu Jun 23 22:21:28 2022 +0200 wifi: mac80211: fix key lookup With the split into keys[]/deflink.gtk[] arrays, WEP keys are still installed into the keys[] array, but we didn't look them up there. This meant they weren't deleted correctly. Fix this by looking up the key there even if it's not pairwise so we can be sure we don't have it. Fixes: bfd8403adddd ("wifi: mac80211: reorg some iface data structs for MLD") Signed-off-by: Johannes Berg net/mac80211/cfg.c | 4 ++++ 1 file changed, 4 insertions(+) commit ba323e29859458fb180e8a99b4382d0cbf72d47f Author: Johannes Berg Date: Thu Jun 23 12:04:55 2022 +0200 wifi: mac80211: separate out connection downgrade flags Separate out the connection downgrade flags from the ifmgd->flags and put them into the link information instead. While at it, make them a separate sparse type so we don't get confused about where they belong and have static checking on correct handling. Signed-off-by: Johannes Berg net/mac80211/ibss.c | 13 +- net/mac80211/ieee80211_i.h | 38 +++--- net/mac80211/mesh.c | 12 +- net/mac80211/mlme.c | 314 +++++++++++++++++++++++---------------------- net/mac80211/spectmgmt.c | 16 +-- net/mac80211/tdls.c | 3 +- net/mac80211/util.c | 34 ++--- 7 files changed, 221 insertions(+), 209 deletions(-) commit 062e8e02dfd43c94b0d601c071e8a5c50bed830e Author: Ilan Peer Date: Wed Jun 1 17:43:34 2022 +0300 wifi: mac80211: Align with Draft P802.11be_D2.0 Align the mac80211 implementation with P802.11be_D2.0. Signed-off-by: Ilan Peer Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 6 +++--- include/linux/ieee80211.h | 23 +++++++++++++++-------- 2 files changed, 18 insertions(+), 11 deletions(-) commit 1e0b3b0b6cb5e04bcb25fbe4164180d64e3ace07 Author: Ilan Peer Date: Wed Apr 27 18:02:10 2022 +0300 wifi: mac80211: Align with Draft P802.11be_D1.5 Align the mac80211 implementation with P802.11be_D1.5. Signed-off-by: Ilan Peer Signed-off-by: Johannes Berg include/linux/ieee80211.h | 52 ++++++++++++++++++--------- net/mac80211/ieee80211_i.h | 4 +++ net/mac80211/mlme.c | 32 +++++++++++++++++ net/mac80211/util.c | 87 +++++++++++++++++++++++++++++----------------- 4 files changed, 128 insertions(+), 47 deletions(-) commit 28977e790b5d0e6d37db6e659cfbcde9d24ae718 Author: Johannes Berg Date: Thu Jun 23 09:48:00 2022 +0200 wifi: mac80211: skip powersave recalc if driver SUPPORTS_DYNAMIC_PS There are a few places that check ps_sdata and/or the dynamic PS timeout, but they're erroneous in case SUPPORTS_DYNAMIC_PS is set by the driver. Skip the entire recalculation in this case so we cannot get into those paths elsewhere, and so we simplify this for the purpose of implementing MLO. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c5c48a11dd86c7f9d86b8c4cc8eaed350ffd1ea7 Author: Johannes Berg Date: Wed Jun 22 14:30:20 2022 +0200 wifi: mac80211: debug: omit link if non-MLO connection If we don't really have multiple links, omit the link ID from link debug prints, otherwise we change the format for all of the existing drivers (most of which might never support MLO), and also have extra noise in the logs. Signed-off-by: Johannes Berg net/mac80211/debug.h | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) commit b8375cf15834721c4534c118c5a201b92c1c385b Author: Andrei Otcheretianski Date: Wed Jun 22 15:02:37 2022 +0300 wifi: mac80211_hwsim: Ack link addressed frames Do address matching with link addresses as well. Signed-off-by: Andrei Otcheretianski Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 1d4c0f0405ee8cf8ecbf743d640133af58e56e21 Author: Johannes Berg Date: Wed Jun 22 11:02:00 2022 +0200 wifi: cfg80211: drop BSS elements from assoc trace for now For multi-link operation, this cannot work as the req->bss pointer will be NULL, and we'll need to do more work on this to really add tracing for the MLO case here. Drop the BSS elements for now as they're not the most useful thing, and it's hard to size things correctly for the MLO case (without adding a lot of code that's also executed when tracing isn't enabled.) Reported-by: Dan Carpenter Signed-off-by: Johannes Berg net/wireless/rdev-ops.h | 11 +---------- net/wireless/trace.h | 13 ++----------- 2 files changed, 3 insertions(+), 21 deletions(-) commit 23cc6d8c37cdbe3b2b74a922f3311ecb2a5aea6c Author: Johannes Berg Date: Wed Jun 22 10:17:23 2022 +0200 wifi: cfg80211: make cfg80211_auth_request::key_idx signed We might assign -1 to it in some cases when key is NULL, which means the key_idx isn't used but can lead to a warning from static checkers such as smatch. Make the struct member signed simply to avoid that, we only need a range of -1..3 anyway. Signed-off-by: Johannes Berg include/net/cfg80211.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c0d6701261dbfa29902ca64c7b57b1cc5f0c2533 Author: Shaul Triebitz Date: Tue Jun 21 12:18:31 2022 +0300 wifi: nl80211: enable setting the link address at new station Since for an MLD station the default link is added together with the add station command, allow also setting the link MAC address. Otherwise, it is needed to use the modify link API only for setting the link MAC address. Signed-off-by: Shaul Triebitz Signed-off-by: Johannes Berg net/wireless/nl80211.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit d8675a63518c6148827838058feb7f18403faed1 Author: Johannes Berg Date: Fri Jun 17 22:36:37 2022 +0200 wifi: mac80211: RCU-ify link/link_conf pointers Since links can be added and removed dynamically, we need to somehow protect the sdata->link[] and vif->link_conf[] array pointers from disappearing when accessing them without locks. RCU-ify the pointers to achieve this, which requires quite a bit of rework. Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 14 ++- include/net/mac80211.h | 6 +- net/mac80211/cfg.c | 169 ++++++++++++++++++++++------------ net/mac80211/chan.c | 123 +++++++++++++------------ net/mac80211/debugfs_netdev.c | 2 +- net/mac80211/driver-ops.h | 10 +- net/mac80211/ht.c | 24 ++++- net/mac80211/ibss.c | 8 +- net/mac80211/ieee80211_i.h | 21 +++-- net/mac80211/iface.c | 36 ++++---- net/mac80211/main.c | 9 +- net/mac80211/mesh.c | 7 +- net/mac80211/mlme.c | 30 +++--- net/mac80211/ocb.c | 4 +- net/mac80211/offchannel.c | 15 ++- net/mac80211/rx.c | 8 +- net/mac80211/sta_info.c | 3 +- net/mac80211/tdls.c | 3 +- net/mac80211/trace.h | 19 ++-- net/mac80211/tx.c | 88 +++++++++--------- net/mac80211/util.c | 34 ++++--- net/mac80211/vht.c | 62 +++++++++---- 22 files changed, 420 insertions(+), 275 deletions(-) commit 3d1cc7cdf2e848181398837fe158bf0850d29ee6 Author: Johannes Berg Date: Mon Jun 20 15:29:28 2022 +0200 wifi: nl80211: hold wdev mutex for station APIs Since this will need to refer - at least in part - to the link stations of an MLD, hold the wdev mutex for driver convenience. Signed-off-by: Johannes Berg net/wireless/nl80211.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 4e2f3d67e3afef751e1ad81c6b156f2aafa25dcf Author: Johannes Berg Date: Mon Jun 20 15:28:50 2022 +0200 wifi: nl80211: hold wdev mutex for channel switch APIs Since we deal with links in an MLD here, hold the wdev mutex now. Signed-off-by: Johannes Berg net/wireless/nl80211.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 858fd1880ba5fffaacc9bac5c3cd9b0952819208 Author: Johannes Berg Date: Mon Jun 20 15:25:56 2022 +0200 wifi: nl80211: hold wdev mutex in add/mod/del link station Since we deal with links, and that requires looking at wdev links, we should hold the wdev mutex for driver convenience. Signed-off-by: Johannes Berg net/wireless/nl80211.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 21476ad16d3ca3687a474556c67d4789ef85a5df Author: Shaul Triebitz Date: Tue Jun 14 17:27:03 2022 +0300 wifi: mac80211: implement callbacks for _link_station Implement callbacks for cfg80211 add_link_station, mod_link_station, and del_link_station API. Signed-off-by: Shaul Triebitz Signed-off-by: Johannes Berg net/mac80211/cfg.c | 108 ++++++++++++++++++++++++++++++++++++++++++++++++ net/mac80211/sta_info.c | 7 ++++ net/mac80211/sta_info.h | 1 + 3 files changed, 116 insertions(+) commit b95eb7f0eee479478eb1a7c0a42a80167708c1df Author: Shaul Triebitz Date: Tue Jun 14 13:49:16 2022 +0300 wifi: cfg80211/mac80211: separate link params from station params Put the link_station_parameters structure in the station_parameters structure (and remove the station_parameters fields already existing in link_station_parameters). Now, for an MLD station, the default link is added together with the station. Signed-off-by: Shaul Triebitz Signed-off-by: Johannes Berg drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 20 ++-- drivers/net/wireless/microchip/wilc1000/hif.c | 20 ++-- include/net/cfg80211.h | 28 +---- net/mac80211/cfg.c | 143 ++++++++++++++++--------- net/wireless/nl80211.c | 97 +++++++++-------- net/wireless/trace.h | 24 +++-- 6 files changed, 180 insertions(+), 152 deletions(-) commit 577e5b8c3924539c7a09e3e00477534f39e61829 Author: Shaul Triebitz Date: Wed Jun 8 12:01:12 2022 +0300 wifi: cfg80211: add API to add/modify/remove a link station Add an API for adding/modifying/removing a link of a station. Signed-off-by: Shaul Triebitz Signed-off-by: Johannes Berg include/net/cfg80211.h | 64 +++++++++++++++++ include/uapi/linux/nl80211.h | 8 +++ net/wireless/nl80211.c | 168 ++++++++++++++++++++++++++++++++++++++++--- net/wireless/rdev-ops.h | 48 +++++++++++++ net/wireless/trace.h | 97 +++++++++++++++++++++++++ 5 files changed, 377 insertions(+), 8 deletions(-) commit f91cb507e671ad4d9f00327b01a4bbe21c41fd4a Author: Shaul Triebitz Date: Sun Jun 19 15:08:02 2022 +0300 wifi: mac80211: add an ieee80211_get_link_sband Similar to ieee80211_get_sband but get the sband of the link_conf. Signed-off-by: Shaul Triebitz Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 0866f8e3efd097cbb56176b40bf58961814eed6b Author: Andrei Otcheretianski Date: Sun Jun 19 14:38:03 2022 +0300 wifi: mac80211: Remove AP SMPS leftovers AP SMPS was removed and not needed anymore. Remove the leftovers. Signed-off-by: Andrei Otcheretianski Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 1 - net/mac80211/sta_info.c | 30 ------------------------------ net/mac80211/sta_info.h | 4 ---- net/mac80211/status.c | 3 --- 4 files changed, 38 deletions(-) commit 6df2810ac9a9b11523bda4f2fd4442598787013d Author: Andrei Otcheretianski Date: Tue Jun 14 17:21:23 2022 +0300 wifi: cfg80211: Allow MLO TX with link source address Management frames are transmitted from link address and not device address. Allow that. Signed-off-by: Andrei Otcheretianski Signed-off-by: Johannes Berg net/wireless/mlme.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 54283409cd162fc60480df514924ed4cb313735e Author: Andrei Otcheretianski Date: Tue Jun 14 17:20:04 2022 +0300 wifi: mac80211: Consider MLO links in offchannel logic Check all the MLO links to decide whether offchannel TX is needed. Signed-off-by: Andrei Otcheretianski Signed-off-by: Johannes Berg net/mac80211/offchannel.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 892b3bceb0b5340fe8b3480e0ff507a9dfd75b27 Author: Johannes Berg Date: Tue Jun 14 13:08:42 2022 +0200 wifi: mac80211: rx: accept link-addressed frames When checking whether or not to accept a frame in RX, take into account the configured link addresses. Also look up the link station correctly. Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 2 ++ net/mac80211/rx.c | 69 ++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 63 insertions(+), 8 deletions(-) commit 6858ad75c228e8c47840afeda0f752b50f2e840c Author: Johannes Berg Date: Fri Jun 17 15:16:36 2022 +0200 wifi: mac80211: consistently use sdata_dereference() Instead of open-coding it, use sdata_dereference(). Signed-off-by: Johannes Berg net/mac80211/ibss.c | 12 ++++-------- net/mac80211/mesh.c | 9 +++------ 2 files changed, 7 insertions(+), 14 deletions(-) commit 912fa56b27631ba4d9b6c59a9f6d7c53ae2795b2 Author: Andrei Otcheretianski Date: Tue Jun 14 13:41:30 2022 +0300 wifi: mac80211_hwsim: Support link channel matching on rx Accept frames from all the links' channels. Signed-off-by: Andrei Otcheretianski Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 0bd509325508aad1bf01967d618ada7d8da14d4d Author: Aditya Kumar Singh Date: Fri Jul 1 19:06:11 2022 +0530 wifi: mac80211: fix mesh airtime link metric estimating ieee80211s_update_metric function uses sta_set_rate_info_tx function to get struct rate_info data from ieee80211_tx_rate struct, present in ieee80211_sta->deflink.tx_stats. However, drivers can skip tx rate calculation by setting rate idx as -1. Such drivers provides rate_info directly and hence ieee80211s metric is updated incorrectly since ieee80211_tx_rate has inconsistent data. Add fix to use rate_info directly if present instead of sta_set_rate_info_tx for updating ieee80211s metric. Signed-off-by: Aditya Kumar Singh Link: https://lore.kernel.org/r/20220701133611.544-1-quic_adisi@quicinc.com Signed-off-by: Johannes Berg net/mac80211/mesh_hwmp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit bf326cf53a38e3cebbbb929216718fa9c925e869 Author: Lian Chen Date: Thu Jul 14 17:16:36 2022 +0800 wifi: mac80211: make 4addr null frames using min_rate for WDS WDS needs 4addr packets to trigger AP for wlan0.sta creation. However, the 4addr null frame is sent at a high rate so that sometimes the AP can't receive it. Switch to using min rate. Signed-off-by: Lian Chen Link: https://lore.kernel.org/r/20220714091636.59107-1-lian.chen@mediatek.com Signed-off-by: Johannes Berg net/mac80211/mlme.c | 1 + 1 file changed, 1 insertion(+) commit 59e8ef18f6a1b7712bfb6889fcd808b7b5951600 Author: XueBing Chen Date: Mon Jul 11 22:27:58 2022 +0800 wifi: cfg80211: use strscpy to replace strlcpy The strlcpy should not be used because it doesn't limit the source length. Preferred is strscpy. Signed-off-by: XueBing Chen Link: https://lore.kernel.org/r/2d2fcbf7.e33.181eda8e70e.Coremail.chenxuebing@jari.cn Signed-off-by: Johannes Berg net/wireless/ethtool.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 51d3cfaf992ff52c2e922dc935a78f415038a2da Author: Felix Fietkau Date: Wed Jul 13 10:34:44 2022 +0200 wifi: mac80211: exclude multicast packets from AQL pending airtime In AP mode, multicast traffic is handled very differently from normal traffic, especially if at least one client is in powersave mode. This means that multicast packets can be buffered a lot longer than normal unicast packets, and can eat up the AQL budget very quickly because of the low data rate. Along with the recent change to maintain a global PHY AQL limit, this can lead to significant latency spikes for unicast traffic. Since queueing multicast to hardware is currently not constrained by AQL limits anyway, let's just exclude it from the AQL pending airtime calculation entirely. Fixes: 8e4bac067105 ("wifi: mac80211: add a per-PHY AQL limit to improve fairness") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20220713083444.86129-1-nbd@nbd.name Signed-off-by: Johannes Berg net/mac80211/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc5250cdb43d444061412df7fae72d2b4acbdf97 Author: Johannes Berg Date: Wed Jul 13 21:16:45 2022 +0200 wifi: mac80211_hwsim: use 32-bit skb cookie We won't really have enough skbs to need a 64-bit cookie, and on 32-bit platforms storing the 64-bit cookie into the void *rate_driver_data doesn't work anyway. Switch back to using just a 32-bit cookie and uintptr_t for the type to avoid compiler warnings about all this. Fixes: 4ee186fa7e40 ("wifi: mac80211_hwsim: fix race condition in pending packet") Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 9dd9495d560a39a3f6f43e77dc8cec3666efd7f7 Author: Johannes Berg Date: Wed Jul 13 21:16:37 2022 +0200 wifi: rsi: remove unused variable Remove a variable here that was now set but never used. Fixes: f276e20b182d ("wifi: mac80211: move interface config to new struct") Signed-off-by: Johannes Berg drivers/net/wireless/rsi/rsi_91x_hal.c | 2 -- 1 file changed, 2 deletions(-) commit 30315e71b42603307989d813a620781ff8238f3c Author: Suravee Suthikulpanit Date: Wed Jul 13 17:56:51 2022 -0500 iommu/amd: Do not support IOMMUv2 APIs when SNP is enabled The IOMMUv2 APIs (for supporting shared virtual memory with PASID) configures the domain with IOMMU v2 page table, and sets DTE[Mode]=0. This configuration cannot be supported on SNP-enabled system. Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220713225651.20758-10-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/init.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ec8f7f4821d5e70d71601519bc2325b311324a96 Author: Eric Biggers Date: Sat Jul 9 14:18:49 2022 -0700 crypto: lib - make the sha1 library optional Since the Linux RNG no longer uses sha1_transform(), the SHA-1 library is no longer needed unconditionally. Make it possible to build the Linux kernel without the SHA-1 library by putting it behind a kconfig option, and selecting this new option from the kconfig options that gate the remaining users: CRYPTO_SHA1 for crypto/sha1_generic.c, BPF for kernel/bpf/core.c, and IPV6 for net/ipv6/addrconf.c. Unfortunately, since BPF is selected by NET, for now this can only make a difference for kernels built without networking support. Signed-off-by: Eric Biggers Reviewed-by: Jason A. Donenfeld Acked-by: Jakub Kicinski Acked-by: Alexei Starovoitov Signed-off-by: Herbert Xu crypto/Kconfig | 1 + init/Kconfig | 1 + lib/crypto/Kconfig | 3 +++ lib/crypto/Makefile | 3 ++- net/ipv6/Kconfig | 1 + 5 files changed, 8 insertions(+), 1 deletion(-) commit 463f74089ff9148e3e46af454a6977d40b98cd10 Author: Eric Biggers Date: Sat Jul 9 14:18:48 2022 -0700 crypto: lib - move lib/sha1.c into lib/crypto/ SHA-1 is a crypto algorithm (or at least was intended to be -- it's not considered secure anymore), so move it out of the top-level library directory and into lib/crypto/. Signed-off-by: Eric Biggers Reviewed-by: Jason A. Donenfeld Signed-off-by: Herbert Xu lib/Makefile | 2 +- lib/crypto/Makefile | 2 ++ lib/{ => crypto}/sha1.c | 0 3 files changed, 3 insertions(+), 1 deletion(-) commit 5a44749f65b2342d43dea82024e4febdac33c78d Author: Vladis Dronov Date: Fri Jul 8 14:33:13 2022 +0200 crypto: fips - make proc files report fips module name and version FIPS 140-3 introduced a requirement for the FIPS module to return information about itself, specifically a name and a version. These values must match the values reported on FIPS certificates. This patch adds two files to read a name and a version from: /proc/sys/crypto/fips_name /proc/sys/crypto/fips_version v2: removed redundant parentheses in config entries. v3: move FIPS_MODULE_* defines to fips.c where they are used. v4: return utsrelease.h inclusion Signed-off-by: Simo Sorce Signed-off-by: Vladis Dronov Signed-off-by: Herbert Xu crypto/Kconfig | 21 +++++++++++++++++++++ crypto/fips.c | 35 ++++++++++++++++++++++++++++++----- 2 files changed, 51 insertions(+), 5 deletions(-) commit 1353e576ae3b7b9703b74f6f2276b6dd450f4a2e Author: Colin Ian King Date: Thu Jul 7 09:05:46 2022 +0100 crypto: x86/blowfish - remove redundant assignment to variable nytes Variable nbytes is being assigned a value that is never read, it is being re-assigned in the next statement in the while-loop. The assignment is redundant and can be removed. Cleans up clang scan-build warnings, e.g.: arch/x86/crypto/blowfish_glue.c:147:10: warning: Although the value stored to 'nbytes' is used in the enclosing expression, the value is never actually read from 'nbytes' Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu arch/x86/crypto/blowfish_glue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b77e34f5b10de529255c9468203d0644a7af3b81 Author: Andrew Davis Date: Wed Jul 6 14:11:44 2022 -0500 crypto: sa2ul - Check engine status before enabling There is a engine status register that can be used to check if the different HW crypto engines are enabled. Check that first and then only try to enable the engines if they are not already on. This has a couple benefits. First we don't need to use match_data for this. Second, this driver can now work on HS devices where the engine control registers are read-only and writing causes a firewall exception. Signed-off-by: Andrew Davis Signed-off-by: Herbert Xu drivers/crypto/sa2ul.c | 15 +++++++-------- drivers/crypto/sa2ul.h | 1 + 2 files changed, 8 insertions(+), 8 deletions(-) commit a65c9a2a0b43118ee6f00eeeb73aefdcbd89728f Author: Andrew Davis Date: Wed Jul 6 14:11:43 2022 -0500 crypto: sa2ul - Set the supported_algos bits individually Setting these individually gives a better picture of supported functions at a glance. Plus if the list changes an unwanted one will not accidentally get set with GENMASK. Signed-off-by: Andrew Davis Signed-off-by: Herbert Xu drivers/crypto/sa2ul.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 6c14a9650b8729882995f5fcd6c62336b40aeb26 Author: Claudiu Beznea Date: Wed Jul 6 12:17:27 2022 +0300 crypto: atmel-tdes - initialize tdes_dd while declaring Initialize sha_dd with platform_get_drvdata() when declaring it. Signed-off-by: Claudiu Beznea Signed-off-by: Herbert Xu drivers/crypto/atmel-tdes.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c6a16f4bbf5518603b51df23f23e46223244dcb0 Author: Claudiu Beznea Date: Wed Jul 6 11:58:44 2022 +0300 crypto: atmel-sha - initialize sha_dd while declaring Initialize sha_dd with platform_get_drvdata() when declaring it. Signed-off-by: Claudiu Beznea Signed-off-by: Herbert Xu drivers/crypto/atmel-sha.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2e26efb384d8a38ac62dc7022cff448cf54b80ee Author: Jakub Kicinski Date: Tue Jul 5 15:58:57 2022 -0700 crypto: caam/qi2 - switch to netif_napi_add_tx_weight() caam has its own special NAPI weights. It's also a crypto device so presumably it can't be used for packet Rx. Switch to the (new) correct API. Signed-off-by: Jakub Kicinski Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg_qi2.c | 5 +++-- drivers/crypto/caam/qi.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) commit 1d5390a33a4b54b2129316656792d55755a03d06 Author: Uwe Kleine-König Date: Tue Jul 5 22:51:44 2022 +0200 crypto: s5p-sss - Drop if with an always false condition The remove callback is only called after probe completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so pdata is never NULL. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Acked-by: Vladimir Zapolskiy Reviewed-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu drivers/crypto/s5p-sss.c | 3 --- 1 file changed, 3 deletions(-) commit 35b22c19daa1bbe77dce2f7f776c0cf2acff1f00 Author: Uwe Kleine-König Date: Tue Jul 5 22:51:43 2022 +0200 crypto: omap-sham - Drop if with an always false condition The remove callback is only called after probe completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so dd is never NULL. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8ce715e711659322a6e05cad154aa1355bb2e14f Author: Uwe Kleine-König Date: Tue Jul 5 22:51:42 2022 +0200 crypto: omap-des - Drop if with an always false condition The remove callback is only called after probe completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so dd is never NULL. This is a preparation for making platform remove callbacks return void. While touching this driver remove an assignment without effect. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu drivers/crypto/omap-des.c | 4 ---- 1 file changed, 4 deletions(-) commit da1e716864aeeaeef0a32a7cdddfb8c6ebd8c1f9 Author: Uwe Kleine-König Date: Tue Jul 5 22:51:41 2022 +0200 crypto: omap-aes - Drop if with an always false condition The remove callback is only called after probe completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so dd is never NULL. This is a preparation for making platform remove callbacks return void. While touching this driver remove a stray empty line. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu drivers/crypto/omap-aes.c | 4 ---- 1 file changed, 4 deletions(-) commit 515f4fc66bf176b91d24d89deddc18e0be12543f Author: Uwe Kleine-König Date: Tue Jul 5 22:51:40 2022 +0200 crypto: atmel-tdes - Drop if with an always false condition The remove callback is only called after probe completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so tdes_dd is never NULL. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea Signed-off-by: Herbert Xu drivers/crypto/atmel-tdes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 25edb4cddb0f3deb260b52106b73c3d0f4968489 Author: Uwe Kleine-König Date: Tue Jul 5 22:51:39 2022 +0200 crypto: atmel-sha - Drop if with an always false condition The remove callback is only called after probe completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so sha_dd is never NULL. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea Signed-off-by: Herbert Xu drivers/crypto/atmel-sha.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4fdcabb86ab17621b54695e5bb52ceddef434e82 Author: Uwe Kleine-König Date: Tue Jul 5 22:51:38 2022 +0200 crypto: atmel-aes - Drop if with an always false condition The remove callback is only called after probe completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so aes_dd is never NULL. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu drivers/crypto/atmel-aes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 30fb034361ff1b9bfc569b2d8d66b544ea3eb18f Author: Yuan Can Date: Mon Jul 4 13:01:45 2022 +0000 crypto: ccree - Add missing clk_disable_unprepare() in cc_pm_resume() Add clk_disable_unprepare() on error path in cc_pm_resume(). Reported-by: Hulk Robot Signed-off-by: Yuan Can Signed-off-by: Herbert Xu drivers/crypto/ccree/cc_pm.c | 2 ++ 1 file changed, 2 insertions(+) commit 01ce31de7043e17b0d7d47f5e038f067db618113 Author: Taehee Yoo Date: Mon Jul 4 09:42:49 2022 +0000 crypto: testmgr - add ARIA testmgr tests It contains ARIA ecb(aria), cbc(aria), cfb(aria), ctr(aria), and gcm(aria). ecb testvector is from RFC standard. cbc, cfb, and ctr testvectors are from KISA[1], who developed ARIA algorithm. gcm(aria) is from openssl test vector. [1] https://seed.kisa.or.kr/kisa/kcmvp/EgovVerification.do (Korean) Signed-off-by: Taehee Yoo Signed-off-by: Herbert Xu crypto/tcrypt.c | 38 +- crypto/testmgr.c | 31 + crypto/testmgr.h | 2860 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 2928 insertions(+), 1 deletion(-) commit 8388f7df936bae004026bd718466127f27bbc398 Author: Suravee Suthikulpanit Date: Wed Jul 13 17:56:50 2022 -0500 iommu/amd: Do not support IOMMU_DOMAIN_IDENTITY after SNP is enabled Once SNP is enabled (by executing SNP_INIT command), IOMMU can no longer support the passthrough domain (i.e. IOMMU_DOMAIN_IDENTITY). The SNP_INIT command is called early in the boot process, and would fail if the kernel is configure to default to passthrough mode. After the system is already booted, users can try to change IOMMU domain type of a particular IOMMU group. In this case, the IOMMU driver needs to check the SNP-enable status and return failure when requesting to change domain type to identity. Therefore, return failure when trying to allocate identity domain. Reviewed-by: Robin Murphy Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220713225651.20758-9-suravee.suthikulpanit@amd.com [ joro: Removed WARN_ON_ONCE() ] Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b9f0043e1ea68c8d2c0f75800a7ac70ab7774a5f Author: Suravee Suthikulpanit Date: Wed Jul 13 17:56:49 2022 -0500 iommu/amd: Set translation valid bit only when IO page tables are in use On AMD system with SNP enabled, IOMMU hardware checks the host translation valid (TV) and guest translation valid (GV) bits in the device table entry (DTE) before accessing the corresponded page tables. However, current IOMMU driver sets the TV bit for all devices regardless of whether the host page table is in use. This results in ILLEGAL_DEV_TABLE_ENTRY event for devices, which do not the host page table root pointer set up. Thefore, when SNP is enabled, only set TV bit when DMA remapping is not used, which is when domain ID in the AMD IOMMU device table entry (DTE) is zero. Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220713225651.20758-8-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/init.c | 3 ++- drivers/iommu/amd/iommu.c | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) commit fb2accadaa9427a374fa9f482ea24ca731f675ba Author: Brijesh Singh Date: Wed Jul 13 17:56:48 2022 -0500 iommu/amd: Introduce function to check and enable SNP To support SNP, IOMMU needs to be enabled, and prohibits IOMMU configurations where DTE[Mode]=0, which means it cannot be supported with IOMMU passthrough domain (a.k.a IOMMU_DOMAIN_IDENTITY), and when AMD IOMMU driver is configured to not use the IOMMU host (v1) page table. Otherwise, RMP table initialization could cause the system to crash. The request to enable SNP support in IOMMU must be done before PCI initialization state of the IOMMU driver because enabling SNP affects how IOMMU driver sets up IOMMU data structures (i.e. DTE). Unlike other IOMMU features, SNP feature does not have an enable bit in the IOMMU control register. Instead, the IOMMU driver introduces an amd_iommu_snp_en variable to track enabling state of SNP. Introduce amd_iommu_snp_enable() for other drivers to request enabling the SNP support in IOMMU, which checks all prerequisites and determines if the feature can be safely enabled. Please see the IOMMU spec section 2.12 for further details. Reviewed-by: Robin Murphy Co-developed-by: Suravee Suthikulpanit Signed-off-by: Suravee Suthikulpanit Signed-off-by: Brijesh Singh Link: https://lore.kernel.org/r/20220713225651.20758-7-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu.h | 2 ++ drivers/iommu/amd/init.c | 42 ++++++++++++++++++++++++++++++++++++++++++ include/linux/amd-iommu.h | 4 ++++ 3 files changed, 48 insertions(+) commit 02c6f31d0e010a7eef849ca6457e5801de2b42d1 Author: Suravee Suthikulpanit Date: Wed Jul 13 17:56:47 2022 -0500 iommu/amd: Globally detect SNP support Modify existing SNP feature check to use the helper function check_feature_on_all_iommus() to ensure consistency among all IOMMUs. Also report IOMMU SNP support information for each IOMMU. Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220713225651.20758-6-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/init.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ae180ba42662afe2ed7620bdb863c7c6b61f6f2d Author: Suravee Suthikulpanit Date: Wed Jul 13 17:56:46 2022 -0500 iommu/amd: Process all IVHDs before enabling IOMMU features The ACPI IVRS table can contain multiple IVHD blocks. Each block contains information used to initialize each IOMMU instance. Currently, init_iommu_all sequentially process IVHD block and initialize IOMMU instance one-by-one. However, certain features require all IOMMUs to be configured in the same way system-wide. In case certain IVHD blocks contain inconsistent information (most likely FW bugs), the driver needs to go through and try to revert settings on IOMMUs that have already been configured. A solution is to split IOMMU initialization into 3 phases: Phase1 : Processes information of the IVRS table for all IOMMU instances. This allow all IVHDs to be processed prior to enabling features. Phase2 : Early feature support check on all IOMMUs (using information in IVHD blocks. Phase3 : Iterates through all IOMMU instances and enabling features. Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220713225651.20758-5-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/init.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 9dd299d8c6cd9cd50fe49c067a82f091df87565f Author: Suravee Suthikulpanit Date: Wed Jul 13 17:56:45 2022 -0500 iommu/amd: Introduce global variable for storing common EFR and EFR2 Some IOMMU features require that all IOMMUs must support the feature, which is determined by checking the support bit in the Extended Feature Register 1 and 2 (EFR/EFR2) on all IOMMUs. This check is done by the function check_feature_on_all_iommus(), which iterates through all IOMMUs everytime it is called. Instead, introduce a global variable to store common EFR/EFR2 among all IOMMUs. In case of inconsistent EFR/EFR2 masks are detected on an IOMMU, a FW_BUG warning is reported. Suggested-by: Joerg Roedel Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220713225651.20758-4-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu.h | 3 +++ drivers/iommu/amd/init.c | 45 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 40 insertions(+), 8 deletions(-) commit 1e98a35da49ee7d5b0d101518da51a109a02f238 Author: Suravee Suthikulpanit Date: Wed Jul 13 17:56:44 2022 -0500 iommu/amd: Introduce Support for Extended Feature 2 Register AMD IOMMU spec introduces additional extended feature register in the IVRS IVHD offset 80h (for IVHD type 11h and 40h) and MMIO offset 1A0h. Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220713225651.20758-3-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 4 ++++ drivers/iommu/amd/init.c | 24 ++++++++++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) commit 60b51e3e333b9986721d77a465c41577c226eb3b Author: Suravee Suthikulpanit Date: Wed Jul 13 17:56:43 2022 -0500 iommu/amd: Change macro for IOMMU control register bit shift to decimal value There is no functional change. Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220713225651.20758-2-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 42 ++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit e4e712bbbd6d73263d964d6cb390b373738b62ab Author: Taehee Yoo Date: Mon Jul 4 09:42:48 2022 +0000 crypto: aria - Implement ARIA symmetric cipher algorithm ARIA(RFC 5794) is a symmetric block cipher algorithm. This algorithm is being used widely in South Korea as a standard cipher algorithm. This code is written based on the ARIA implementation of OpenSSL. The OpenSSL code is based on the distributed source code[1] by KISA. ARIA has three key sizes and corresponding rounds. ARIA128: 12 rounds. ARIA192: 14 rounds. ARIA245: 16 rounds. [1] https://seed.kisa.or.kr/kisa/Board/19/detailView.do (Korean) Signed-off-by: Taehee Yoo Signed-off-by: Herbert Xu crypto/Kconfig | 15 ++ crypto/Makefile | 1 + crypto/aria.c | 288 +++++++++++++++++++++++++++++++ include/crypto/aria.h | 461 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 765 insertions(+) commit 7fee5d6f41b4a3ceadf0f8ca48cc78c754d3515b Author: Sam Protsenko Date: Thu Jul 14 19:55:50 2022 +0300 iommu/exynos: Enable default VM instance on SysMMU v7 In order to enable SysMMU v7 with VM register layout, at least the default VM instance (n=0) must be enabled, in addition to enabling the SysMMU itself. To do so, add corresponding write to MMU_CTRL_VM[0] register, before writing to MMU_CTRL register. Signed-off-by: Sam Protsenko Acked-by: Marek Szyprowski Link: https://lore.kernel.org/r/20220714165550.8884-7-semen.protsenko@linaro.org Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 0892c4986b6c9eae90ba56e7541bd020576abf69 Author: Sam Protsenko Date: Thu Jul 14 19:55:49 2022 +0300 iommu/exynos: Add SysMMU v7 register set SysMMU v7 might have different register layouts (VM capable or non-VM capable). Virtual Machine registers (if present) implement multiple translation domains. If VM registers are not present, the driver shouldn't try to access those. Check which layout is implemented in current SysMMU module (by reading the capability registers) and prepare the corresponding variant structure for further usage. Signed-off-by: Sam Protsenko Acked-by: Marek Szyprowski Link: https://lore.kernel.org/r/20220714165550.8884-6-semen.protsenko@linaro.org Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 50 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) commit 2125afbed8418b212c336509ddd5458aac01744d Author: Sam Protsenko Date: Thu Jul 14 19:55:48 2022 +0300 iommu/exynos: Abstract non-common registers on different variants At the moment the driver supports SysMMU v1..v5 versions. SysMMU v5 has different register layout than SysMMU v1..v3. Instead of checking the version each time before reading/writing the registers, let's create corresponding register structure for each SysMMU version and set the needed structure on init, checking the SysMMU version one single time. This way is faster and more elegant. No behavior changes from the user's point of view, it's only a refactoring patch. Signed-off-by: Sam Protsenko Acked-by: Marek Szyprowski Link: https://lore.kernel.org/r/20220714165550.8884-5-semen.protsenko@linaro.org Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 100 ++++++++++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 40 deletions(-) commit 5f26ad58be8c0ca4dc8b13788a35e71b42cb3b4e Author: Sam Protsenko Date: Thu Jul 14 19:55:47 2022 +0300 iommu/exynos: Set correct dma mask for SysMMU v5+ SysMMU v5+ supports 36 bit physical address space. Set corresponding DMA mask to avoid falling back to SWTLBIO usage in dma_map_single() because of failed dma_capable() check. The original code for this fix was suggested by Marek. Signed-off-by: Sam Protsenko Co-developed-by: Marek Szyprowski Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220714165550.8884-4-semen.protsenko@linaro.org Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit fce398d2d02c0a9a2bedf7c7201b123e153e8963 Author: Sam Protsenko Date: Thu Jul 14 19:55:46 2022 +0300 iommu/exynos: Handle failed IOMMU device registration properly If iommu_device_register() fails in exynos_sysmmu_probe(), the previous calls have to be cleaned up. In this case, the iommu_device_sysfs_add() should be cleaned up, by calling its remove counterpart call. Fixes: d2c302b6e8b1 ("iommu/exynos: Make use of iommu_device_register interface") Signed-off-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski Acked-by: Marek Szyprowski Link: https://lore.kernel.org/r/20220714165550.8884-3-semen.protsenko@linaro.org Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit bc0d9af21f463b1705b35ea3f8a7266ac333fc14 Author: Sam Protsenko Date: Thu Jul 14 19:55:45 2022 +0300 iommu/exynos: Reuse SysMMU constants for page size and order Using SZ_4K in context of SysMMU driver is better than using PAGE_SIZE, as PAGE_SIZE might have different value on different platforms. Though it would be even better to use more specific constants, already existing in SysMMU driver. Make the code more strict by using SPAGE_ORDER and SPAGE_SIZE constants. It also makes sense, as __sysmmu_tlb_invalidate_entry() also uses SPAGE_* constants for further calculations with num_inv param, so it's logical that num_inv should be previously calculated using also SPAGE_* values. Signed-off-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski Acked-by: Marek Szyprowski Link: https://lore.kernel.org/r/20220714165550.8884-2-semen.protsenko@linaro.org Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3168010d2ab445a65338aec9714dbad845a9469f Author: Nícolas F. R. A. Prado Date: Tue Jul 12 17:44:27 2022 -0400 iommu/mediatek: Log with dev_err_probe when failing to parse dts mtk_iommu_mm_dts_parse() can fail with EPROBE_DEFER if not all larbs have probed yet, so use dev_err_probe() to avoid logging as an error in that case. Also drop the return value from the message since it's already printed by dev_err_probe(), and add the missing newline at the end. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220712214427.544860-1-nfraprado@collabora.com Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25357900f4e67094dd09b7dcb8a5f47c3f5a159d Author: Lu Baolu Date: Tue Jul 12 08:09:08 2022 +0800 iommu/vt-d: Make DMAR_UNITS_SUPPORTED default 1024 If the available hardware exceeds DMAR_UNITS_SUPPORTED (previously set to MAX_IO_APICS, or 128), it causes these messages: "DMAR: Failed to allocate seq_id", "DMAR: Parse DMAR table failure.", and "x2apic: IRQ remapping doesn't support X2APIC mode x2apic disabled"; and the system fails to boot properly. To support up to 64 sockets with 10 DMAR units each (640), make the value of DMAR_UNITS_SUPPORTED default 1024. Signed-off-by: Steve Wahl Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Steve Wahl Link: https://lore.kernel.org/linux-iommu/20220615183650.32075-1-steve.wahl@hpe.com/ Link: https://lore.kernel.org/r/20220702015610.2849494-7-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel include/linux/dmar.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit bdb46d175872af56d3bffe361f21be2b87784039 Author: Lu Baolu Date: Tue Jul 12 08:09:07 2022 +0800 iommu/vt-d: Remove global g_iommus array The g_iommus and g_num_of_iommus is not used anywhere. Remove them to avoid dead code. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Steve Wahl Link: https://lore.kernel.org/r/20220702015610.2849494-6-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 44 -------------------------------------------- 1 file changed, 44 deletions(-) commit 97a79de99a4083056184bd4790723fe64c3fba66 Author: Lu Baolu Date: Tue Jul 12 08:09:06 2022 +0800 iommu/vt-d: Remove unnecessary check in intel_iommu_add() The Intel IOMMU hot-add process starts from dmar_device_hotplug(). It uses the global dmar_global_lock to synchronize all the hot-add and hot-remove paths. In the hot-add path, the new IOMMU data structures are allocated firstly by dmar_parse_one_drhd() and then initialized by dmar_hp_add_drhd(). All the IOMMU units are allocated and initialized in the same synchronized path. There is no case where any IOMMU unit is created and then initialized for multiple times. This removes the unnecessary check in intel_iommu_add() which is the last reference place of the global IOMMU array. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Steve Wahl Link: https://lore.kernel.org/r/20220702015610.2849494-5-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 3 --- 1 file changed, 3 deletions(-) commit ba949f4cd4c39c587e9b722ac7eb7f7e8a42dace Author: Lu Baolu Date: Tue Jul 12 08:09:05 2022 +0800 iommu/vt-d: Refactor iommu information of each domain When a DMA domain is attached to a device, it needs to allocate a domain ID from its IOMMU. Currently, the domain ID information is stored in two static arrays embedded in the domain structure. This can lead to memory waste when the driver is running on a small platform. This optimizes these static arrays by replacing them with an xarray and consuming memory on demand. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Steve Wahl Link: https://lore.kernel.org/r/20220702015610.2849494-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 123 +++++++++++++++++++++++++------------------- drivers/iommu/intel/iommu.h | 29 +++++++---- drivers/iommu/intel/pasid.c | 2 +- drivers/iommu/intel/svm.c | 2 +- 4 files changed, 93 insertions(+), 63 deletions(-) commit 913432f217c843a69ff9d11a6474a7982033087b Author: Lu Baolu Date: Tue Jul 12 08:09:04 2022 +0800 iommu/vt-d: Use IDA interface to manage iommu sequence id Switch dmar unit sequence id allocation and release from bitmap to IDA interface. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Steve Wahl Link: https://lore.kernel.org/r/20220702015610.2849494-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/dmar.c | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) commit c3f27c834ae56c315a1fc47d71b027e2c400f4de Author: Lu Baolu Date: Tue Jul 12 08:09:03 2022 +0800 iommu/vt-d: Remove unused domain_get_iommu() It is not used anywhere. Remove it to avoid dead code. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Steve Wahl Link: https://lore.kernel.org/r/20220702015610.2849494-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 18 ------------------ drivers/iommu/intel/iommu.h | 1 - 2 files changed, 19 deletions(-) commit 5eaafdf0c05577f9b6cf8c64dee7d39ccdafa63a Author: Lu Baolu Date: Tue Jul 12 08:09:02 2022 +0800 iommu/vt-d: Convert global spinlock into per domain lock Using a global device_domain_lock spinlock to protect per-domain device tracking lists is an inefficient way, especially considering this lock is also needed in the hot paths. This optimizes the locking mechanism by converting the global lock to per domain lock. On the other hand, as the device tracking lists are never accessed in any interrupt context, there is no need to disable interrupts while spinning. Replace irqsave variant with spinlock calls. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20220706025524.2904370-12-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 42 +++++++++++++++++++++--------------------- drivers/iommu/intel/iommu.h | 1 + 2 files changed, 22 insertions(+), 21 deletions(-) commit 969aaefbaaf2b444852c1980ac0cbbb66463fdae Author: Lu Baolu Date: Tue Jul 12 08:09:01 2022 +0800 iommu/vt-d: Use device_domain_lock accurately The device_domain_lock is used to protect the device tracking list of a domain. Remove unnecessary spin_lock/unlock()'s and move the necessary ones around the list access. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20220706025524.2904370-11-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 57 +++++++++++++++------------------------------ 1 file changed, 19 insertions(+), 38 deletions(-) commit db75c9573b08e28109cf7b4ceb62b5f11154742e Author: Lu Baolu Date: Tue Jul 12 08:09:00 2022 +0800 iommu/vt-d: Fold __dmar_remove_one_dev_info() into its caller Fold __dmar_remove_one_dev_info() into dmar_remove_one_dev_info() which is its only caller. Make the spin lock critical range only cover the device list change code and remove some unnecessary checks. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20220706025524.2904370-10-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) commit 79d82ce4027f30c4d40fdf377888203f76b7ddcc Author: Lu Baolu Date: Tue Jul 12 08:08:59 2022 +0800 iommu/vt-d: Check device list of domain in domain free path When the IOMMU domain is about to be freed, it should not be set on any device. Instead of silently dealing with some bug cases, it's better to trigger a warning to report and fix any potential bugs at the first time. Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20220706025524.2904370-9-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 8430fd3f3287013cb3f04b465c0686c41c86a8c8 Author: Lu Baolu Date: Tue Jul 12 08:08:58 2022 +0800 iommu/vt-d: Acquiring lock in pasid manipulation helpers The iommu->lock is used to protect the per-IOMMU pasid directory table and pasid table. Move the spinlock acquisition/release into the helpers to make the code self-contained. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20220706025524.2904370-8-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 2 - drivers/iommu/intel/pasid.c | 103 +++++++++++++++++++++++--------------------- drivers/iommu/intel/svm.c | 3 -- 3 files changed, 55 insertions(+), 53 deletions(-) commit 2c3262f9e881ae403b6d92a7e4824531cdb63829 Author: Lu Baolu Date: Tue Jul 12 08:08:57 2022 +0800 iommu/vt-d: Acquiring lock in domain ID allocation helpers The iommu->lock is used to protect the per-IOMMU domain ID resource. Moving the lock into the ID alloc/free helpers makes the code more compact. At the same time, the device_domain_lock is irrelevant to the domain ID resource, remove its assertion as well. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20220706025524.2904370-7-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit ffd5869d935303b3e8dedf0d6fbe202ace66c653 Author: Lu Baolu Date: Tue Jul 12 08:08:56 2022 +0800 iommu/vt-d: Replace spin_lock_irqsave() with spin_lock() The iommu->lock is used to protect changes in root/context/pasid tables and domain ID allocation. There's no use case to change these resources in any interrupt context. Therefore, it is unnecessary to disable the interrupts when the spinlock is held. The same thing happens on the device_domain_lock side, which protects the device domain attachment information. This replaces spin_lock/unlock_irqsave/irqrestore() calls with the normal spin_lock/unlock(). Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20220706025524.2904370-6-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/debugfs.c | 6 ++-- drivers/iommu/intel/iommu.c | 66 ++++++++++++++++++------------------------- drivers/iommu/intel/svm.c | 6 ++-- 3 files changed, 32 insertions(+), 46 deletions(-) commit 2e1c8dafb8c2c459baa5aef5b338c15edd9b9b5b Author: Lu Baolu Date: Tue Jul 12 08:08:55 2022 +0800 iommu/vt-d: Unnecessary spinlock for root table alloc and free The IOMMU root table is allocated and freed in the IOMMU initialization code in static boot or hot-remove paths. There's no need for a spinlock. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20220706025524.2904370-5-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 8ac0b64b9735ae896d200dd952c22999742b4414 Author: Lu Baolu Date: Tue Jul 12 08:08:54 2022 +0800 iommu/vt-d: Use pci_get_domain_bus_and_slot() in pgtable_walk() Use pci_get_domain_bus_and_slot() instead of searching the global list to retrieve the pci device pointer. This also removes the global device_domain_list as there isn't any consumer anymore. Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20220706025524.2904370-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 34 ++++++---------------------------- drivers/iommu/intel/iommu.h | 1 - 2 files changed, 6 insertions(+), 29 deletions(-) commit 98f7b0db4976690e47701b702ae314375101e327 Author: Lu Baolu Date: Tue Jul 12 08:08:53 2022 +0800 iommu/vt-d: Remove clearing translation data in disable_dmar_iommu() The disable_dmar_iommu() is called when IOMMU initialization fails or the IOMMU is hot-removed from the system. In both cases, there is no need to clear the IOMMU translation data structures for devices. On the initialization path, the device probing only happens after the IOMMU is initialized successfully, hence there're no translation data structures. On the hot-remove path, there is no real use case where the IOMMU is hot-removed, but the devices that it manages are still alive in the system. The translation data structures were torn down during device release, hence there's no need to repeat it in IOMMU hot-remove path either. This removes the unnecessary code and only leaves a check. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20220706025524.2904370-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 21 +++++++-------------- drivers/iommu/intel/pasid.h | 1 + 2 files changed, 8 insertions(+), 14 deletions(-) commit 983ebe57b3af05288aa41ee721f01430424bbf31 Author: Lu Baolu Date: Tue Jul 12 08:08:52 2022 +0800 iommu/vt-d: debugfs: Remove device_domain_lock usage The domain_translation_struct debugfs node is used to dump the DMAR page tables for the PCI devices. It potentially races with setting domains to devices. The existing code uses the global spinlock device_domain_lock to avoid the races. This removes the use of device_domain_lock outside of iommu.c by replacing it with the group mutex lock. Using the group mutex lock is cleaner and more compatible to following cleanups. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20220706025524.2904370-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/debugfs.c | 43 +++++++++++++++++++++++++++++++------------ drivers/iommu/intel/iommu.c | 2 +- drivers/iommu/intel/iommu.h | 1 - 3 files changed, 32 insertions(+), 14 deletions(-) commit 9f18abab6063ded860097dbbd7c8b3cef198e4dd Author: Lu Baolu Date: Tue Jul 12 08:08:51 2022 +0800 iommu/vt-d: Remove unused iovad from dmar_domain Not used anywhere. Cleanup it to avoid dead code. Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20220527053424.3111186-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.h | 1 - 1 file changed, 1 deletion(-) commit 2585a2790e7fdb3dadfe309c9220bbc03704f84f Author: Lu Baolu Date: Tue Jul 12 08:08:50 2022 +0800 iommu/vt-d: Move include/linux/intel-iommu.h under iommu This header file is private to the Intel IOMMU driver. Move it to the driver folder. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Steve Wahl Link: https://lore.kernel.org/r/20220514014322.2927339-8-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel MAINTAINERS | 1 - drivers/iommu/intel/cap_audit.c | 2 +- drivers/iommu/intel/debugfs.c | 2 +- drivers/iommu/intel/dmar.c | 2 +- drivers/iommu/intel/iommu.c | 2 +- include/linux/intel-iommu.h => drivers/iommu/intel/iommu.h | 0 drivers/iommu/intel/irq_remapping.c | 2 +- drivers/iommu/intel/pasid.c | 2 +- drivers/iommu/intel/perf.c | 2 +- drivers/iommu/intel/svm.c | 2 +- drivers/iommu/intel/trace.h | 3 ++- 11 files changed, 10 insertions(+), 10 deletions(-) commit 853788b9a66ff089053df3b4ed7d166e61def449 Author: Lu Baolu Date: Tue Jul 12 08:08:49 2022 +0800 x86/boot/tboot: Move tboot_force_iommu() to Intel IOMMU tboot_force_iommu() is only called by the Intel IOMMU driver. Move the helper into that driver. No functional change intended. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Steve Wahl Link: https://lore.kernel.org/r/20220514014322.2927339-7-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel arch/x86/kernel/tboot.c | 15 --------------- drivers/iommu/intel/iommu.c | 14 ++++++++++++++ include/linux/tboot.h | 2 -- 3 files changed, 14 insertions(+), 17 deletions(-) commit bfd39a73879e80313bb634927f185ace60bb229b Author: Lu Baolu Date: Tue Jul 12 08:08:48 2022 +0800 KVM: x86: Remove unnecessary include intel-iommu.h is not needed in kvm/x86 anymore. Remove its include. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Steve Wahl Link: https://lore.kernel.org/r/20220514014322.2927339-6-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel arch/x86/kvm/x86.c | 1 - 1 file changed, 1 deletion(-) commit 3890f749c590a5a33f0034362be3304b69ae6d65 Author: Lu Baolu Date: Tue Jul 12 08:08:47 2022 +0800 drm/i915: Remove unnecessary include intel-iommu.h is not needed in drm/i915 anymore. Remove its include. Signed-off-by: Lu Baolu Reviewed-by: Steve Wahl Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Acked-by: Jani Nikula Link: https://lore.kernel.org/r/20220514014322.2927339-5-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/gpu/drm/i915/display/intel_display.c | 1 - drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 1 - 2 files changed, 2 deletions(-) commit f9903555dd05a4096d8fef4eb823c0b94f710982 Author: Lu Baolu Date: Tue Jul 12 08:08:46 2022 +0800 iommu/vt-d: Remove unnecessary exported symbol The exported symbol intel_iommu_gfx_mapped is not used anywhere in the tree. Remove it to avoid dead code. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Steve Wahl Link: https://lore.kernel.org/r/20220514014322.2927339-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 6 ------ include/linux/intel-iommu.h | 1 - 2 files changed, 7 deletions(-) commit f19e038c25079edcba4796328d99ff00f2b47b68 Author: Lu Baolu Date: Tue Jul 12 08:08:45 2022 +0800 agp/intel: Use per device iommu check The IOMMU subsystem has already provided an interface to query whether the IOMMU hardware is enabled for a specific device. This changes the check from Intel specific intel_iommu_gfx_mapped (globally exported by the Intel IOMMU driver) to probing the presence of IOMMU on a specific device using the generic device_iommu_mapped(). This follows commit cca084692394a ("drm/i915: Use per device iommu check") which converted drm/i915 driver to use device_iommu_mapped(). Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Steve Wahl Link: https://lore.kernel.org/r/20220514014322.2927339-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/char/agp/intel-gtt.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 933ab6d30153f937ffa9471ce64207e6d9acf56e Author: Lu Baolu Date: Tue Jul 12 08:08:44 2022 +0800 iommu/vt-d: Move trace/events/intel_iommu.h under iommu This header file is private to the Intel IOMMU driver. Move it to the driver folder. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Steve Wahl Link: https://lore.kernel.org/r/20220514014322.2927339-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/dmar.c | 2 +- drivers/iommu/intel/svm.c | 2 +- drivers/iommu/intel/trace.c | 2 +- include/trace/events/intel_iommu.h => drivers/iommu/intel/trace.h | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) commit 469b7b8ac552041d038d0451a5e1343a8d6080c0 Author: Christoph Hellwig Date: Fri Jul 8 10:06:16 2022 +0200 iommu/arm-smmu-v3: cleanup arm_smmu_dev_{enable,disable}_feature Fold the arm_smmu_dev_has_feature arm_smmu_dev_feature_enabled into the main methods. Signed-off-by: Christoph Hellwig Acked-by: Will Deacon Link: https://lore.kernel.org/r/20220708080616.238833-5-hch@lst.de Signed-off-by: Joerg Roedel drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 55 ++++++++--------------------- 1 file changed, 14 insertions(+), 41 deletions(-) commit ae3ff39a51a0f5843960487962e110339f321b0f Author: Christoph Hellwig Date: Fri Jul 8 10:06:15 2022 +0200 iommu: remove the put_resv_regions method All drivers that implement get_resv_regions just use generic_put_resv_regions to implement the put side. Remove the indirections and document the allocations constraints. Signed-off-by: Christoph Hellwig Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/20220708080616.238833-4-hch@lst.de Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu.c | 1 - drivers/iommu/apple-dart.c | 1 - drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 1 - drivers/iommu/arm/arm-smmu/arm-smmu.c | 1 - drivers/iommu/intel/iommu.c | 1 - drivers/iommu/iommu.c | 21 ++++----------------- drivers/iommu/mtk_iommu.c | 1 - drivers/iommu/virtio-iommu.c | 5 ++--- include/linux/iommu.h | 4 ---- 9 files changed, 6 insertions(+), 30 deletions(-) commit a871765d5588531e1972902d1ae077b8be306c94 Author: Christoph Hellwig Date: Fri Jul 8 10:06:14 2022 +0200 iommu: remove iommu_dev_feature_enabled Remove the unused iommu_dev_feature_enabled function. Signed-off-by: Christoph Hellwig Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/20220708080616.238833-3-hch@lst.de Signed-off-by: Joerg Roedel drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 1 - drivers/iommu/iommu.c | 13 ------------- include/linux/iommu.h | 9 --------- 3 files changed, 23 deletions(-) commit 309c56e84602d894e7ca424b0b13837117568fca Author: Christoph Hellwig Date: Fri Jul 8 10:06:13 2022 +0200 iommu: remove the unused dev_has_feat method This method is never actually called. Signed-off-by: Christoph Hellwig Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/20220708080616.238833-2-hch@lst.de Signed-off-by: Joerg Roedel drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 1 - include/linux/iommu.h | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) commit 7e62edd7a33accf02cb7abdc1bbe381d975b9b5a Author: Tina Zhang Date: Mon Jun 6 00:11:52 2022 +0800 iommu/virtio: Add map/unmap_pages() callbacks implementation Map/unmap_pags() allows map and unmap multiple pages of the same size in one call, which can improve performance by reducing the numbers of vmexits. With map/unmap_pages() implemented, the prior map/unmap() callbacks are deprecated. Signed-off-by: Tina Zhang Reviewed-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20220605161152.3171-1-tina.zhang@intel.com Signed-off-by: Joerg Roedel drivers/iommu/virtio-iommu.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit ffb2759df7efbc00187bfd9d1072434a13a54139 Author: Zheyu Ma Date: Fri Jul 15 09:05:15 2022 +0800 ALSA: bcd2000: Fix a UAF bug on the error path of probing When the driver fails in snd_card_register() at probe time, it will free the 'bcd2k->midi_out_urb' before killing it, which may cause a UAF bug. The following log can reveal it: [ 50.727020] BUG: KASAN: use-after-free in bcd2000_input_complete+0x1f1/0x2e0 [snd_bcd2000] [ 50.727623] Read of size 8 at addr ffff88810fab0e88 by task swapper/4/0 [ 50.729530] Call Trace: [ 50.732899] bcd2000_input_complete+0x1f1/0x2e0 [snd_bcd2000] Fix this by adding usb_kill_urb() before usb_free_urb(). Fixes: b47a22290d58 ("ALSA: MIDI driver for Behringer BCD2000 USB device") Signed-off-by: Zheyu Ma Cc: Link: https://lore.kernel.org/r/20220715010515.2087925-1-zheyuma97@gmail.com Signed-off-by: Takashi Iwai sound/usb/bcd2000/bcd2000.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9c7c48d6a1e2eb5192ad5294c1c4dbd42a88e88b Author: Alexei Starovoitov Date: Thu Jul 14 14:16:37 2022 -0700 bpf: Fix subprog names in stack traces. The commit 7337224fc150 ("bpf: Improve the info.func_info and info.func_info_rec_size behavior") accidently made bpf_prog_ksym_set_name() conservative for bpf subprograms. Fixed it so instead of "bpf_prog_tag_F" the stack traces print "bpf_prog_tag_full_subprog_name". Fixes: 7337224fc150 ("bpf: Improve the info.func_info and info.func_info_rec_size behavior") Reported-by: Tejun Heo Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220714211637.17150-1-alexei.starovoitov@gmail.com kernel/bpf/verifier.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 891ce1c9623f36194587d02774ac3d8c30c3ca72 Merge: 60693e3a3890 7d09c7606346 Author: Dave Airlie Date: Fri Jul 15 15:35:24 2022 +1000 Merge tag 'drm-misc-next-fixes-2022-07-14' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Short summary of fixes: - dma-buf: revert change to fence handling - mgag200: fix PCI register initialization Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YtAjgcWC1zkNOGWa@linux-uq9g commit 7fb27a56b9ebd8a77d9dd188e8a42bff99bc3443 Author: Jiri Olsa Date: Thu Jul 14 10:23:16 2022 +0200 selftests/bpf: Do not attach kprobe_multi bench to bpf_dispatcher_xdp_func Alexei reported crash by running test_progs -j on system with 32 cpus. It turned out the kprobe_multi bench test that attaches all ftrace-able functions will race with bpf_dispatcher_update, that calls bpf_arch_text_poke on bpf_dispatcher_xdp_func, which is ftrace-able function. Ftrace is not aware of this update so this will cause ftrace_bug with: WARNING: CPU: 6 PID: 1985 at arch/x86/kernel/ftrace.c:94 ftrace_verify_code+0x27/0x50 ... ftrace_replace_code+0xa3/0x170 ftrace_modify_all_code+0xbd/0x150 ftrace_startup_enable+0x3f/0x50 ftrace_startup+0x98/0xf0 register_ftrace_function+0x20/0x60 register_fprobe_ips+0xbb/0xd0 bpf_kprobe_multi_link_attach+0x179/0x430 __sys_bpf+0x18a1/0x2440 ... ------------[ ftrace bug ]------------ ftrace failed to modify [] bpf_dispatcher_xdp_func+0x0/0x10 actual: ffffffe9:7b:ffffff9c:77:1e Setting ftrace call site to call ftrace function It looks like we need some way to hide some functions from ftrace, but meanwhile we workaround this by skipping bpf_dispatcher_xdp_func from kprobe_multi bench test. Reported-by: Alexei Starovoitov Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220714082316.479181-1-jolsa@kernel.org tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c | 2 ++ 1 file changed, 2 insertions(+) commit 2306137b13f63f0450769ae331bb6c1b73467b0a Merge: c524193f1cfb 3f4a70268d54 Author: Greg Kroah-Hartman Date: Fri Jul 15 07:31:59 2022 +0200 Merge tag 'soundwire-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-next Vinod writes: "soundwire updates for 5.20-rc1 - Core: solve the driver bind/unbind problem and remove ops pointer - intel: runtime pm updates - qcom: audio clock gating updates and device status checks" * tag 'soundwire-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: qcom: Enable software clock gating requirement flag soundwire: qcom: Check device status before reading devid soundwire: qcom: Add flag for software clock gating check soundwire: qcom: Add support for controlling audio CGCR from HLOS soundwire: intel: use pm_runtime_resume() on component probe soundwire: peripheral: remove useless ops pointer soundwire: revisit driver bind/unbind and callbacks soundwire: bus_type: fix remove and shutdown support commit c8fda7d28100698cd02aaa849f952c8b59b7bea1 Merge: 6e6fbb72e48b 1a5504867437 Author: Jakub Kicinski Date: Thu Jul 14 22:11:37 2022 -0700 Merge tag 'mlx5-updates-2022-07-13' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2022-07-13 1) Support 802.1ad for bridge offloads Vlad Buslov Says: ================= Current mlx5 bridge VLAN offload implementation only supports 802.1Q VLAN Ethernet protocol. That protocol type is assumed by default and SWITCHDEV_ATTR_ID_BRIDGE_VLAN_PROTOCOL notification is ignored. In order to support dynamically setting VLAN protocol handle SWITCHDEV_ATTR_ID_BRIDGE_VLAN_PROTOCOL notification by flushing FDB and re-creating VLAN modify header actions with a new protocol. Implement support for 802.1ad protocol by saving the current VLAN protocol to per-bridge variable and re-create the necessary flow groups according to its current value (either use cvlan or svlan flow fields). ================== 2) debugfs to count ongoing FW commands 3) debugfs to query eswitch vport firmware diagnostic counters 4) Add missing meter configuration in flow action 5) Some misc cleanup * tag 'mlx5-updates-2022-07-13' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5e: Remove the duplicating check for striding RQ when enabling LRO net/mlx5e: Move the LRO-XSK check to mlx5e_fix_features net/mlx5e: Extend flower police validation net/mlx5e: configure meter in flow action net/mlx5e: Removed useless code in function net/mlx5: Bridge, implement QinQ support net/mlx5: Bridge, implement infrastructure for VLAN protocol change net/mlx5: Bridge, extract VLAN push/pop actions creation net/mlx5: Bridge, rename filter fg to vlan_filter net/mlx5: Bridge, refactor groups sizes and indices net/mlx5: debugfs, Add num of in-use FW command interface slots net/mlx5: Expose vnic diagnostic counters for eswitch managed vports net/mlx5: Use software VHCA id when it's supported net/mlx5: Introduce ifc bits for using software vhca id net/mlx5: Use the bitmap API to allocate bitmaps ==================== Link: https://lore.kernel.org/r/20220713225859.401241-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 60693e3a38903e39e4fac0a9849b698fc36228bd Merge: 0180290abb5c b7be3ae75916 Author: Dave Airlie Date: Fri Jul 15 15:07:24 2022 +1000 Merge tag 'amd-drm-next-5.20-2022-07-14' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-5.20-2022-07-14: amdgpu: - DCN3.2 updates - DC SubVP support - DP MST fixes - Audio fixes - DC code cleanup - SMU13 updates - Adjust GART size on newer APUs for S/G display - Soft reset for GFX 11 - Soft reset for SDMA 6 - Add gfxoff status query for vangogh - Improve BO domain pinning - Fix timestamps for cursor only commits - MES fixes - DCN 3.1.4 support - Misc fixes - Misc code cleanup amdkfd: - Simplify GPUVM validation - Unified memory for CWSR save/restore area - fix possible list corruption on queue failure radeon: - Fix bogus power of two warning UAPI: - Unified memory for CWSR save/restore area for KFD Proposed userspace: https://lists.freedesktop.org/archives/amd-gfx/2022-June/080952.html Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20220714214716.8203-1-alexander.deucher@amd.com commit 6e6fbb72e48ba3da229ff2158cf0d26aa50a218a Merge: 816cd1688331 a44c4511ffb2 Author: Jakub Kicinski Date: Thu Jul 14 21:58:49 2022 -0700 Merge branch 'net-devlink-couple-of-trivial-fixes' Jiri Pirko says: ==================== net: devlink: couple of trivial fixes Just a couple of trivial fixes I found on the way. ==================== Link: https://lore.kernel.org/r/20220713141853.2992014-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit a44c4511ffb2c7387fce6061d20febf75f5399bb Author: Jiri Pirko Date: Wed Jul 13 16:18:53 2022 +0200 net: devlink: fix return statement in devlink_port_new_notify() Return directly without intermediate value store at the end of devlink_port_new_notify() function. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: Jakub Kicinski net/core/devlink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ced92571af24b66c2b5b32a489c144b0b45c93a3 Author: Jiri Pirko Date: Wed Jul 13 16:18:52 2022 +0200 net: devlink: fix a typo in function name devlink_port_new_notifiy() Fix the typo in a name of devlink_port_new_notifiy() function. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: Jakub Kicinski net/core/devlink.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9a7923668bc779dd601d94704b4dd895a2ef6a77 Author: Jiri Pirko Date: Wed Jul 13 16:18:51 2022 +0200 net: devlink: make devlink_dpipe_headers_register() return void The return value is not used, so change the return value type to void. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 6 ++---- include/net/devlink.h | 2 +- net/core/devlink.c | 5 ++--- 3 files changed, 5 insertions(+), 8 deletions(-) commit 53f853d55e312a639eaa910154248ce06eb754ac Author: Dmitry Osipenko Date: Thu Jun 30 10:57:51 2022 +0300 PM / devfreq: tegra30: Add error message for devm_devfreq_add_device() It's difficult to notice that driver failed to probe by looking at KMSG when devm_devfreq_add_device() fails. Add explicit error message for this case. Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi drivers/devfreq/tegra30-devfreq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2472934e36b51bbdf0a7cdd5e351910d9002c6ac Author: Colin Ian King Date: Thu Jun 23 19:00:54 2022 +0100 PM / devfreq: imx-bus: use NULL to pass a null pointer rather than zero The 3rd argument to the function of_get_property is a pointer and it is being passed using 0. Use NULL instead. Cleans up sparse warning: warning: Using plain integer as NULL pointer Signed-off-by: Colin Ian King Signed-off-by: Chanwoo Choi drivers/devfreq/imx-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9deb748683851737c5e4df623c3283c185cd8f0 Author: Mauro Carvalho Chehab Date: Tue Jun 28 10:46:12 2022 +0100 PM / devfreq: shut up kernel-doc warnings There are 4 warnings there: drivers/devfreq/devfreq.c:707: warning: Function parameter or member 'val' not described in 'qos_min_notifier_call' drivers/devfreq/devfreq.c:707: warning: Function parameter or member 'ptr' not described in 'qos_min_notifier_call' drivers/devfreq/devfreq.c:717: warning: Function parameter or member 'val' not described in 'qos_max_notifier_call' drivers/devfreq/devfreq.c:717: warning: Function parameter or member 'ptr' not described in 'qos_max_notifier_call' It turns that neither val nor ptr are actually used on those function, so document as such. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Chanwoo Choi drivers/devfreq/devfreq.c | 4 ++++ 1 file changed, 4 insertions(+) commit e7fd2e6b9772e19f4da2a7c0c7c813758aee7a88 Author: Krzysztof Kozlowski Date: Sun Jun 26 14:52:38 2022 +0200 dt-bindings: interconnect: samsung,exynos-bus: convert to dtschema Convert the Samsung Exynos SoC Bus and Interconnect bindings to DT schema. Vast parts of descritpion and example were copied, so keep license as GPL-2.0-only. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi .../devicetree/bindings/devfreq/exynos-bus.txt | 488 --------------------- .../bindings/interconnect/samsung,exynos-bus.yaml | 290 ++++++++++++ MAINTAINERS | 2 +- 3 files changed, 291 insertions(+), 489 deletions(-) commit 86d231b1db1be0666c2fc607f5025d63d7afc5f3 Author: Johnson Wang Date: Tue Jun 7 22:05:56 2022 +0800 PM / devfreq: mediatek: Introduce MediaTek CCI devfreq driver We introduce a devfreq driver for the MediaTek Cache Coherent Interconnect (CCI) used by some MediaTek SoCs. In this driver, we use the passive devfreq driver to get target frequencies and adjust voltages accordingly. In MT8183 and MT8186, the MediaTek CCI is supplied by the same regulators with the little core CPUs. Signed-off-by: Jia-Wei Chang Signed-off-by: Johnson Wang Acked-by: Chanwoo Choi Tested-by: Kevin Hilman Signed-off-by: Chanwoo Choi drivers/devfreq/Kconfig | 10 + drivers/devfreq/Makefile | 1 + drivers/devfreq/mtk-cci-devfreq.c | 440 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 451 insertions(+) commit 3be51a3b1980347da7d51f66b1e8e8c538961f17 Author: Johnson Wang Date: Tue Jun 7 22:05:55 2022 +0800 dt-bindings: interconnect: Add MediaTek CCI dt-bindings Add devicetree binding of MediaTek CCI on MT8183 and MT8186. Signed-off-by: Jia-Wei Chang Signed-off-by: Johnson Wang Reviewed-by: Krzysztof Kozlowski Acked-by: Chanwoo Choi Reviewed-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Acked-by: Georgi Djakov Tested-by: Kevin Hilman Signed-off-by: Chanwoo Choi .../bindings/interconnect/mediatek,cci.yaml | 141 +++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 142 insertions(+) commit 3a06ed80265fa62eecaf519d92f1633e4f9510c7 Author: Michael Wu Date: Fri Jul 8 17:57:14 2022 +0800 extcon: Add EXTCON_DISP_CVBS and EXTCON_DISP_EDP Add EXTCON_DISP_CVBS for Composite Video Broadcast Signal. Add EXTCON_DISP_EDP for Embedded Display Port [1] https://en.wikipedia.org/wiki/Composite_video [2] https://en.wikipedia.org/wiki/DisplayPort#eDP Signed-off-by: Michael Wu Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 10 ++++++++++ include/linux/extcon.h | 2 ++ 2 files changed, 12 insertions(+) commit 6d7151343520c9578a5bc087f01e63524f79c81a Author: Aidan MacDonald Date: Mon Jun 20 21:06:32 2022 +0100 extcon: rt8973a: Drop useless mask_invert flag on irqchip There's no need to set the flag explicitly to false, since that is the default value from zero initialization. Signed-off-by: Aidan MacDonald Signed-off-by: Chanwoo Choi drivers/extcon/extcon-rt8973a.c | 1 - 1 file changed, 1 deletion(-) commit d4f46c0e52d6ef309ba74830916fcb02b119ce0e Author: Aidan MacDonald Date: Mon Jun 20 21:06:31 2022 +0100 extcon: sm5502: Drop useless mask_invert flag on irqchip There's no need to set the flag explicitly to false, since that is the default value from zero initialization. Signed-off-by: Aidan MacDonald Signed-off-by: Chanwoo Choi drivers/extcon/extcon-sm5502.c | 2 -- 1 file changed, 2 deletions(-) commit 97e1bb93e7211f5468d0ebc9007331b58a074461 Author: Jiang Jian Date: Tue Jun 21 19:50:03 2022 +0800 extcon: Drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: ./drivers/extcon/extcon.c line: 250 /* Find the the index of extcon cable in edev->supported_cable */ changed to /* Find the index of extcon cable in edev->supported_cable */ Signed-off-by: Jiang Jian Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2fb67280fd83f0f40ef4ae73aa1b9fbec075c13b Author: Colin Ian King Date: Sun Jun 19 09:42:48 2022 +0100 extcon: Remove extraneous space before a debug message There is an extreneous space before a dev_dbg message, remove it. Signed-off-by: Colin Ian King Signed-off-by: Chanwoo Choi drivers/extcon/extcon-palmas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 387162479d8ba9a11cdb6277cd5df3b3ba6da1f3 Author: Uwe Kleine-König Date: Thu May 26 15:07:54 2022 +0200 extcon: fsa9480: Drop no-op remove function A remove callback that just returns 0 is equivalent to no callback at all as can be seen in i2c_device_remove(). So simplify accordingly. Signed-off-by: Uwe Kleine-König Signed-off-by: Chanwoo Choi drivers/extcon/extcon-fsa9480.c | 6 ------ 1 file changed, 6 deletions(-) commit 6f1dae1d84b6d08541d8e12edd1c8677ab279dea Author: Aaron Tomlin Date: Thu Jul 14 16:39:33 2022 +0100 module: Show the last unloaded module's taint flag(s) For diagnostic purposes, this patch, in addition to keeping a record/or track of the last known unloaded module, we now will include the module's taint flag(s) too e.g: " [last unloaded: fpga_mgr_mod(OE)]" Signed-off-by: Aaron Tomlin Signed-off-by: Luis Chamberlain kernel/module/main.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit dbf0ae65bce48bf4c2b6d114cac10193ef050294 Author: Aaron Tomlin Date: Thu Jul 14 16:39:32 2022 +0100 module: Use strscpy() for last_unloaded_module The use of strlcpy() is considered deprecated [1]. In this particular context, there is no need to remain with strlcpy(). Therefore we transition to strscpy(). [1]: https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy Signed-off-by: Aaron Tomlin Signed-off-by: Luis Chamberlain kernel/module/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17dd25c29cda98c370f8d5a4ae3daee33fac1669 Author: Aaron Tomlin Date: Thu Jul 14 16:39:31 2022 +0100 module: Modify module_flags() to accept show_state argument No functional change. With this patch a given module's state information (i.e. 'mod->state') can be omitted from the specified buffer. Please note that this is in preparation to include the last unloaded module's taint flag(s), if available. Signed-off-by: Aaron Tomlin Signed-off-by: Luis Chamberlain kernel/module/internal.h | 2 +- kernel/module/main.c | 11 +++++++---- kernel/module/procfs.c | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) commit 816cd1688331e0ffa1927889c15e7ed56650a183 Merge: b126047f43f1 db886979683a Author: Jakub Kicinski Date: Thu Jul 14 14:19:42 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net include/net/sock.h 310731e2f161 ("net: Fix data-races around sysctl_mem.") e70f3c701276 ("Revert "net: set SK_MEM_QUANTUM to 4096"") https://lore.kernel.org/all/20220711120211.7c8b7cba@canb.auug.org.au/ net/ipv4/fib_semantics.c 747c14307214 ("ip: fix dflt addr selection for connected nexthop") d62607c3fe45 ("net: rename reference+tracking helpers") net/tls/tls.h include/net/tls.h 3d8c51b25a23 ("net/tls: Check for errors in tls_device_init") 587903142308 ("tls: create an internal header") Signed-off-by: Jakub Kicinski commit e2863a78593d638d3924a6f67900c4820034f349 Author: Yury Norov Date: Fri Jul 1 05:54:24 2022 -0700 lib/bitmap: change return types to bool where appropriate Some bitmap functions return boolean results in int variables. Fix it by changing return types to bool. Signed-off-by: Yury Norov include/linux/bitmap.h | 8 ++++---- lib/bitmap.c | 4 ++-- tools/include/linux/bitmap.h | 8 ++++---- tools/lib/bitmap.c | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) commit 0b4736a424a1358d613057a24ff97813305513e2 Author: Yury Norov Date: Fri Jul 1 05:54:23 2022 -0700 arm: align find_bit declarations with generic kernel ARM has their own implementation for find_bit functions, and function declarations are different with those in generic headers. Fix it. Signed-off-by: Yury Norov arch/arm/include/asm/bitops.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 0ed048137fd982a78892a51721d9e7f6b281edbd Author: Conor Dooley Date: Tue Jul 5 22:52:14 2022 +0100 riscv: dts: canaan: build all devicetress if SOC_CANAAN Testing & checking the Canaan devicetrees is inconvenient as only the devicetree corresponding to SOC_CANAAN_K210_DTB_BUILTIN will be built. Change the Makefile so that all devicetrees are built by default if SOC_CANAAN but only the one specified by SOC_CANAAN_K210_DTB_BUILTIN gets built as an object. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220705215213.1802496-14-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/boot/dts/canaan/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 6990ea211c7922134697bdc5416637da3a310301 Author: Conor Dooley Date: Tue Jul 5 22:52:13 2022 +0100 riscv: dts: canaan: add specific compatible for kd233's LCD Add the recently introduced compatible for the LCD on the Canaan KD233. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220705215213.1802496-13-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/boot/dts/canaan/canaan_kd233.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e19f975a39f002846e144ab35a6cf15ef81fa6d8 Author: Conor Dooley Date: Tue Jul 5 22:52:12 2022 +0100 riscv: dts: canaan: fix bus {ranges,reg} warnings The k210 devicetrees warn about missing/empty reg and/or ranges properties: arch/riscv/boot/dts/canaan/k210.dtsi:408.22-460.5: Warning (unit_address_vs_reg): /soc/bus@52000000: node has a unit name, but no reg or ranges property arch/riscv/boot/dts/canaan/k210.dtsi:352.22-406.5: Warning (simple_bus_reg): /soc/bus@50400000: missing or empty reg/ranges property Add a ranges properties that naively caps the buses after the allocation of their last devices. Tested-by: Niklas Cassel Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220705215213.1802496-12-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/boot/dts/canaan/k210.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 719a85a2c57fd7cce65f4a746ebf83d222e0c05f Author: Conor Dooley Date: Tue Jul 5 22:52:11 2022 +0100 riscv: dts: canaan: remove spi-max-frequency from controllers spi-max-frequency is a device, not a controller property and should be removed. Link: https://lore.kernel.org/lkml/20220526014141.2872567-1-robh@kernel.org/ Tested-by: Niklas Cassel Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220705215213.1802496-11-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/boot/dts/canaan/k210.dtsi | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 9bd61feb7025c94564be39af90f4083ce2e13472 Author: Conor Dooley Date: Tue Jul 5 22:52:10 2022 +0100 riscv: dts: canaan: use custom compatible for k210 i2s The devicetrees using the Canaan k210 all have a sound-dai-cells value of 1, whereas the standard binding example for the DesignWare i2s and other use cases suggest 0. Use a k210 specific compatible which supports this difference. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220705215213.1802496-10-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/boot/dts/canaan/k210.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3bd204cbb7c4323337ca6c7ac4eb2ea85022eee0 Author: Conor Dooley Date: Tue Jul 5 22:52:09 2022 +0100 riscv: dts: canaan: fix kd233 display spi frequency The binding for the ili9341 specifies a const spi-max-frequency of 10 MHz but the kd233 devicetree entry has it listed at 15 Mhz. Align the devicetree with the value in the binding. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220705215213.1802496-9-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/boot/dts/canaan/canaan_kd233.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f4c5824d53ee27aa387477ae2e61f1b756afb7a Author: Conor Dooley Date: Tue Jul 5 22:52:08 2022 +0100 riscv: dts: canaan: fix mmc node names The newly-converted-to-dt-schema binding expects the mmc node name to be '^mmc(@.*)?$' so align the devicetree with the schema. Tested-by: Niklas Cassel Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220705215213.1802496-8-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/boot/dts/canaan/canaan_kd233.dts | 2 +- arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts | 2 +- arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts | 2 +- arch/riscv/boot/dts/canaan/sipeed_maix_go.dts | 2 +- arch/riscv/boot/dts/canaan/sipeed_maixduino.dts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 3f64510e3d8058ae13395c7f93f0ffaf3b5e568e Author: Conor Dooley Date: Tue Jul 5 22:52:07 2022 +0100 riscv: dts: canaan: fix the k210's timer nodes The timers on the k210 have non standard interrupt configurations, which leads to dtbs_check warnings: k210_generic.dtb: timer@502d0000: interrupts: [[14], [15]] is too long From schema: Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml Split the timer nodes in two, so that the second timer in the IP block can actually be accessed & in the process solve the dtbs_check warning. Reviewed-by: Serge Semin Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220705215213.1802496-7-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/boot/dts/canaan/k210.dtsi | 46 +++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 8 deletions(-) commit 465c12749b363e0259a3f50d84ec34261d9ba00e Author: Conor Dooley Date: Tue Jul 5 22:52:06 2022 +0100 riscv: dts: canaan: fix the k210's memory node The k210 U-Boot port has been using the clocks defined in the devicetree to bring up the board's SRAM, but this violates the dt-schema. As such, move the clocks to a dedicated node with the same compatible string. The regs property does not fit in either node, so is replaced by comments. Tested-by: Niklas Cassel Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220705215213.1802496-6-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/boot/dts/canaan/k210.dtsi | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 727b05e46cffd74adca96ca13e57352339875586 Author: Conor Dooley Date: Tue Jul 5 22:52:05 2022 +0100 dt-bindings: memory-controllers: add canaan k210 sram controller The k210 U-Boot port has been using the clocks defined in the devicetree to bring up the board's SRAM, but this violates the dt-schema. As such, move the clocks to a dedicated node with the same compatible string & document it. Signed-off-by: Conor Dooley Reviewed-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220705215213.1802496-5-mail@conchuod.ie Signed-off-by: Palmer Dabbelt .../memory-controllers/canaan,k210-sram.yaml | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 5ec88543063c758f49fc5e89a70386f649b65102 Author: Conor Dooley Date: Tue Jul 5 22:52:03 2022 +0100 dt-bindings: display: ili9341: document canaan kd233's lcd The Canaan KD233 development board has a built in LCD. Add a specific compatible for it. Reviewed-by: Rob Herring Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220705215213.1802496-3-mail@conchuod.ie Signed-off-by: Palmer Dabbelt Documentation/devicetree/bindings/display/panel/ilitek,ili9341.yaml | 1 + 1 file changed, 1 insertion(+) commit f5bbc93937aca00fa2de458b7ffa2d9beb59649e Author: Conor Dooley Date: Tue Jul 5 22:52:02 2022 +0100 dt-bindings: display: convert ilitek,ili9341.txt to dt-schema A dt-schema binding for the Ilitek ili9341 was created as panel/ilitek,ili9341.yaml but the txt binding was ignored in the process. Move the remaining items in the txt binding to the yaml one & delete it. The example in the txt binding has a spi-max-frequency which disagrees with the yaml replacement (and its own documentation) so change that to conform with the binding. There are no users in tree of the Adafruit yx240qv29 to check against. Link: https://cdn-learn.adafruit.com/assets/assets/000/046/879/original/SPEC-YX240QV29-T_Rev.A__1_.pdf Reviewed-by: Rob Herring Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220705215213.1802496-2-mail@conchuod.ie Signed-off-by: Palmer Dabbelt .../devicetree/bindings/display/ilitek,ili9341.txt | 27 ------------ .../bindings/display/panel/ilitek,ili9341.yaml | 48 +++++++++++++++------- 2 files changed, 34 insertions(+), 41 deletions(-) commit b49816611eaceb66a00c8b18e6d7bcee63eba86b Author: Conor Dooley Date: Mon Jun 6 21:13:44 2022 +0100 riscv: dts: sifive: "fix" pmic watchdog node name After converting the pmic watchdog binding to yaml, dtbs_check complains that the node name doesn't match the binding. "Fix" it. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Conor Dooley Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20220606201343.514391-5-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eabfbd92a67827a3d899a9dda4d840e75ff11309 Merge: a8914b6cb8dd d9d193dea866 Author: Palmer Dabbelt Date: Thu Jul 14 14:40:10 2022 -0700 Merge branch 'riscv-cpu_map_topo' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux.git into for-next RISC-V: Add cpu-map topology information nodes It was reported to me that the Hive Unmatched incorrectly reports its topology to hwloc, but the StarFive VisionFive did in [0] & a subsequent off-list email from Brice (the hwloc maintainer). This turned out not to be entirely true, the /downstream/ version of the VisionFive does work correctly but not upstream, as the downstream devicetree has a cpu-map node that was added recently. This series adds a cpu-map node to all upstream devicetrees, which I have tested on mpfs & fu540. The first patch is lifted directly from the downstream StarFive devicetree. 0: https://github.com/open-mpi/hwloc/issues/536 Link: https://lore.kernel.org/linux-riscv/20220705190435.1790466-1-mail@conchuod.ie/ [Palmer: except the Microchip DT, that went in via the previous PR.] * 'riscv-cpu_map_topo' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux.git: riscv: dts: canaan: Add k210 topology information riscv: dts: sifive: Add fu740 topology information riscv: dts: sifive: Add fu540 topology information riscv: dts: starfive: Add JH7100 CPU topology commit a8914b6cb8dd0e8ba215e6047f8ed0c88ba4ea7b Merge: 44c1e84a38a0 88d319c6abae Author: Palmer Dabbelt Date: Thu Jul 14 14:37:33 2022 -0700 Merge tag 'dt-for-palmer-v5.20-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git into for-next Microchip RISC-V devicetrees for 5.20 A pair of changes for mpfs.dtsi: - A pair of patches from Suresh & I, removing the bogus max frequency properties from the controller nodes for {q,}spi. This is a device only property with no meaning for a controller and should never have been there. - RISC-V has no sensible defaults for cpu topology, so I added a this information to the dt for MPFS as a cpu-map. This is an optional property and therefore is not a fix. * tag 'dt-for-palmer-v5.20-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git: riscv: dts: microchip: Add mpfs' topology information riscv: dts: microchip: remove spi-max-frequency property riscv: dts: microchip: remove spi-max-frequency property commit d9d193dea8666bbf69fc21c5bdcdabaa34a466e3 Author: Conor Dooley Date: Tue Jul 5 20:04:36 2022 +0100 riscv: dts: canaan: Add k210 topology information The k210 has no cpu-map node, so tools like hwloc cannot correctly parse the topology. Add the node using the existing node labels. Reported-by: Brice Goglin Link: https://github.com/open-mpi/hwloc/issues/536 Signed-off-by: Conor Dooley Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20220705190435.1790466-6-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/boot/dts/canaan/k210.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit bf6cd1c01c959a31002dfa6784c0d8caffed4cf1 Author: Conor Dooley Date: Tue Jul 5 20:04:34 2022 +0100 riscv: dts: sifive: Add fu740 topology information The fu740 has no cpu-map node, so tools like hwloc cannot correctly parse the topology. Add the node using the existing node labels. Reported-by: Brice Goglin Link: https://github.com/open-mpi/hwloc/issues/536 Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220705190435.1790466-4-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/boot/dts/sifive/fu740-c000.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit af8f260abc608c06e4466a282b53f1e2dc09f042 Author: Conor Dooley Date: Tue Jul 5 20:04:33 2022 +0100 riscv: dts: sifive: Add fu540 topology information The fu540 has no cpu-map node, so tools like hwloc cannot correctly parse the topology. Add the node using the existing node labels. Reported-by: Brice Goglin Link: https://github.com/open-mpi/hwloc/issues/536 Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220705190435.1790466-3-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit ef09fa67dc7dc7d839d8f9bee43ecacc83401de5 Author: Jonas Hahnfeld Date: Tue Jul 5 20:04:32 2022 +0100 riscv: dts: starfive: Add JH7100 CPU topology Add cpu-map binding to inform the kernel about the hardware topology of the CPU cores. Before this change, lstopo would report 1 core with 2 threads: Machine (7231MB total) Package L#0 NUMANode L#0 (P#0 7231MB) L2 L#0 (2048KB) + Core L#0 L1d L#0 (32KB) + L1i L#0 (32KB) + PU L#0 (P#0) L1d L#1 (32KB) + L1i L#1 (32KB) + PU L#1 (P#1) After this change, it correctly identifies two cores: Machine (7231MB total) Package L#0 NUMANode L#0 (P#0 7231MB) L2 L#0 (2048KB) L1d L#0 (32KB) + L1i L#0 (32KB) + Core L#0 + PU L#0 (P#0) L1d L#1 (32KB) + L1i L#1 (32KB) + Core L#1 + PU L#1 (P#1) Signed-off-by: Jonas Hahnfeld Co-developed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220705190435.1790466-2-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/boot/dts/starfive/jh7100.dtsi | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit bb6279d8ed25824df9427a367a3f42c7a389346a Merge: f8a291b7e35d 0582591cc454 Author: Jonathan Corbet Date: Thu Jul 14 15:12:12 2022 -0600 Merge branch 'submitting-drivers-removal' into docs-next Lukas Bulwahn says: Here is an attempt to delete submitting-drivers with some improvements and clean-up in other documentation places to convince ourselves that nothing valuable is lost when deleting this checklist. Patch 1, 2 and 3 is just basic clean-up before adding a new reference (see Patch 4). Patch 4 adds the one reference from submitting-drivers, not already mentioned elsewhere in the repository. Patch 5 updates a confusing statement in devices.rst from earlier .txt/.tex distinction times to the new state now with Sphinx & .rst. Patch 6 finally deletes the outdated document, with a cross-check what is covered elsewhere and few open questions (see below). Patch 7 and 8 have been reworked with the native-speaking doc maintainers; they cause no new warnings and are ready to pick, Patch 9 to 11 are weak attempts to adjust the translation, but they need to be taken further by others due to my lack of knowledge on the other languages. They would currently also cause new warnings in the doc-build right now. They should not be picked if there is no one to continue to adjust the text and fix the warnings on broken references. Additionally, this branch includes a translation fix from Alex Shi. commit 0582591cc454e48b027d23c84bc768198d6a82e4 Author: Alex Shi Date: Thu Jul 14 13:40:13 2022 +0800 doc/zh_CN: remove submitting-driver reference from docs The doc is removed, so related reference should be removed too. Signed-off-by: Alex Shi Cc: Yanteng Si Cc: Hu Haowen Link: https://lore.kernel.org/r/20220714054013.214031-1-alexs@kernel.org Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/process/8.Conclusion.rst | 1 - Documentation/translations/zh_CN/process/submitting-patches.rst | 4 +--- Documentation/translations/zh_TW/process/8.Conclusion.rst | 1 - Documentation/translations/zh_TW/process/submitting-patches.rst | 4 +--- 4 files changed, 2 insertions(+), 8 deletions(-) commit 374e4e6f7c77bf742e5383e787cc302d655e6016 Author: Lukas Bulwahn Date: Mon Jul 4 14:25:37 2022 +0200 docs: zh_TW: align to submitting-drivers removal Adjust the Taiwanese translation to the removal of submitting-drivers in the English kernel documentation. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-12-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet .../translations/zh_TW/process/5.Posting.rst | 3 +- Documentation/translations/zh_TW/process/howto.rst | 1 - Documentation/translations/zh_TW/process/index.rst | 1 - .../zh_TW/process/submitting-drivers.rst | 164 --------------------- 4 files changed, 1 insertion(+), 168 deletions(-) commit 9d4e2eed3f72268ba87af22cf87c9c3bccb8c3c4 Author: Lukas Bulwahn Date: Mon Jul 4 14:25:36 2022 +0200 docs: zh_CN: align to submitting-drivers removal Adjust the Chinese translation to the removal of submitting-drivers in the English kernel documentation. Signed-off-by: Lukas Bulwahn Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20220704122537.3407-11-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet .../translations/zh_CN/kernel-hacking/hacking.rst | 3 +- .../translations/zh_CN/process/5.Posting.rst | 3 +- Documentation/translations/zh_CN/process/howto.rst | 1 - Documentation/translations/zh_CN/process/index.rst | 1 - .../zh_CN/process/submitting-drivers.rst | 160 --------------------- 5 files changed, 2 insertions(+), 166 deletions(-) commit 481bb592d300493a920319e03c0396098119eddf Author: Lukas Bulwahn Date: Mon Jul 4 14:25:35 2022 +0200 docs: ko_KR: howto: remove reference to removed submitting-drivers The document submitting-drivers.rst was deleted. This removes the corresponding reference in the Korean translation of the howto. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-10-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet Documentation/translations/ko_KR/howto.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa3b2a7ffae17b708e926e2cd148c08a3d189fe1 Author: Lukas Bulwahn Date: Mon Jul 4 14:25:34 2022 +0200 docs: ja_JP: howto: remove reference to removed submitting-drivers The document submitting-drivers.rst was deleted. This removes the corresponding reference in the Japanese translation of the howto, with some assistance from Akira Yokasawa. Link: https://lore.kernel.org/linux-doc/a2be48e5-e559-17d7-5ae7-d1205a737ea4@gmail.com/ Signed-off-by: Lukas Bulwahn Reviewed-by: Akira Yokosawa Link: https://lore.kernel.org/r/20220704122537.3407-9-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet Documentation/translations/ja_JP/howto.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 26f200c9e56fefbcd7d302db1019b955ea20bc98 Author: Lukas Bulwahn Date: Mon Jul 4 14:25:33 2022 +0200 docs: it_IT: align to submitting-drivers removal Adjust the Italian translation to the removal of submitting-drivers in the English kernel documentation, with some assistance from Frederico Vaga. Link: https://lore.kernel.org/linux-doc/20220628091647.xf5cygybqemwprgb@numero86.vaga.pv.it/ Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-8-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet .../translations/it_IT/kernel-hacking/hacking.rst | 3 +-- Documentation/translations/it_IT/process/5.Posting.rst | 5 ++--- .../translations/it_IT/process/8.Conclusion.rst | 5 ++--- Documentation/translations/it_IT/process/howto.rst | 3 +-- Documentation/translations/it_IT/process/index.rst | 1 - .../translations/it_IT/process/submitting-drivers.rst | 16 ---------------- .../translations/it_IT/process/submitting-patches.rst | 6 ++---- 7 files changed, 8 insertions(+), 31 deletions(-) commit 9db370de278087321840ea904d877803a78fba71 Author: Lukas Bulwahn Date: Mon Jul 4 14:25:32 2022 +0200 docs: process: remove outdated submitting-drivers.rst Commit 31b24bee3357 ("docs: add a warning to submitting-drivers.rst") in October 2016 already warns "This (...) should maybe just be deleted, but I'm not quite ready to do that yet". Maybe, six years ago, we were not ready but let us remove old content for the better now and structure and maintain less content in the kernel documentation with a better result. Drop this already outdated document and adjust all textual references. Here is an argument why deleting the content will not remove any useful information to the existing kernel documentation, individually broken down for each section. Section "Allocating Device Numbers" refers to https://www.lanana.org/, and then refers to Documentation/admin-guide/devices.rst. However, the devices.rst clearly states: "The version of this document at lanana.org is no longer maintained." Everything needed for submitting drivers is already stated in devices.rst and the reference to https://www.lanana.org/ is outdated, and should be just deleted. Section "Who To Submit Drivers To" is all about Linux 2.0 - 2.6, before the new release version scheme; the mentioned developers are still around, but actually not the first developers to contact anymore. Section "What Criteria Determine Acceptance" has a few bullet points: Licensing and Copyright is well-covered in process/kernel-license.rst. Interfaces, Code, Portability, Clarity state some obvious things about ensuring kernel code quality. Control suggests to add a MAINTAINERS entry, which is already mentioned in 6.Followthrough.rst: "... added yourself to the MAINTAINERS file..." PM support states a bit about implementing and testing power management of a driver, it remains an open question where to place that in the process documents. Driver developers interested in power management will find the corresponding part on power management in the kernel documentation anyway. In section "What Criteria Do Not Determine Acceptance", the points Vendor and Author states something basic consequence of the kernel being an open-source community software development. Probably no need to mention it nowadays. Section "Resources" lists resources that are also mentioned elsewhere more central. - Linux kernel tree and mailing list is mentioned in many places. - https://lwn.net/Kernel/LDD3/ is mentioned in Documentation/process/kernel-docs.rst. - https://lwn.net/ is mentioned in: - Documentation/process/8.Conclusion.rst - Documentation/process/kernel-docs.rst - https://kernelnewbies.org/ is mentioned in: - Documentation/process/8.Conclusion.rst - Documentation/process/kernel-docs.rst - http://www.linux-usb.org/ is mentioned in Documentation/driver-api/usb/usb.rst - https://landley.net/kdocs/ols/2002/ols2002-pages-545-555.pdf is mentioned in Documentation/process/kernel-docs.rst - https://kernelnewbies.org/KernelJanitors is mentioned in Documentation/process/howto.rst - https://git-scm.com/ is mentioned in - Documentation/process/2.Process.rst - Documentation/process/7.AdvancedTopics.rst - Documentation/process/howto.rst Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-7-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet Documentation/hwmon/submitting-patches.rst | 1 - Documentation/kernel-hacking/hacking.rst | 3 +- Documentation/process/5.Posting.rst | 3 +- Documentation/process/8.Conclusion.rst | 16 +-- Documentation/process/howto.rst | 4 +- Documentation/process/index.rst | 1 - Documentation/process/submitting-drivers.rst | 194 --------------------------- Documentation/process/submitting-patches.rst | 5 +- 8 files changed, 13 insertions(+), 214 deletions(-) commit 3cb5e516869e2f53b8fc5732f9db140fe539d53d Author: Lukas Bulwahn Date: Mon Jul 4 14:25:31 2022 +0200 docs: admin: devices: drop confusing outdated statement on Latex The statement that the Latex version of Linux Device List is unmaintained, must go back to some historic time where there were actually two separate document sources, one in a txt format and another in a tex format (maybe even just on lanana.org). Nowadays, html and tex are generated from the ReST document file and the statement might be confused, believing the actual generated LaTeX document from the maintained ReST document could be an unmaintained one. Remove this statement on the LaTeX version and only keep pointing out that the version on lanana.org is no longer maintained. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-6-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet Documentation/admin-guide/devices.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 6c568f6a42ab77e5a299ea152efc89f38d88f334 Author: Lukas Bulwahn Date: Mon Jul 4 14:25:30 2022 +0200 docs: kernel-docs: add a reference mentioned in submitting-drivers.rst One section in submitting-drivers.rst was just a collection of references to other external documentation. All except the one added in this commit is already mentioned in kernel-docs or other places in the kernel documentation. Add Arjan van de Ven's article on How to NOT write kernel driver to this index of further kernel documentation. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-5-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet Documentation/process/kernel-docs.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit f46b4b168cdb3b16ae8c7792c28d0b921db1932b Author: Lukas Bulwahn Date: Mon Jul 4 14:25:29 2022 +0200 docs: kernel-docs: reflect that it is community-maintained Remove and rephrase statements that only make sense if a single author exclusively would maintain this document, but we would really want to consider this being a page maintained by the kernel community, as it is placed in the kernel repository, and let us hope that more contributors suggest some more documents. Further, do some minor word-smithing. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-4-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet Documentation/process/kernel-docs.rst | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 615041d42a1a03a024d0013390961d105bf2e05e Author: Lukas Bulwahn Date: Mon Jul 4 14:25:28 2022 +0200 docs: kernel-docs: shorten the lengthy doc title The original title comes from copying the content from a web page that covered various mixed computer-science material. Within the kernel documentation and its current structure, the title can be shortened. Other titles considered, but not selected were: - Index of More Kernel Documentation - Further Kernel Documentation - References to Further Kernel Documentation Shorten the title. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-3-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet Documentation/process/kernel-docs.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a4c174ca8d8f747b7c5e82f64a2c5ddca67cd1ac Author: Lukas Bulwahn Date: Mon Jul 4 14:25:27 2022 +0200 docs: kernel-docs: order reference from newest to oldest The documents on each section of this document are ordered by its published date, from the newest to the oldest. In the kernel-docs.rst, the references on each section of this document are intended to be ordered by its published date, from the newest to the oldest. The Linux Kernel Module Programming Guide was published in 2021; so, it is placed at the top as the most recent publication after the rolling-version "Linux Kernel Mailing List Glossary" reference. Fixes: 630c8fa02f9a ("Documentation: Update details of The Linux Kernel Module Programming Guide") Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-2-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet Documentation/process/kernel-docs.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit f3f575c4bef95384e68de552c7b29938fd0d9201 Author: Rafał Miłecki Date: Wed Jul 13 22:03:51 2022 +0200 arm64: dts: Add base DTS file for bcmbca device Asus GT-AX6000 It's a home router with 1 GiB of RAM, 6 Ethernet ports, 2 USB ports. Signed-off-by: Rafał Miłecki Acked-by: William Zhang Link: https://lore.kernel.org/r/20220713200351.28526-2-zajec5@gmail.com Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 4 +++- .../dts/broadcom/bcmbca/bcm4912-asus-gt-ax6000.dts | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) commit 96a233e600df351bcb06e3c20efe048855552926 Author: Ben Dooks Date: Thu Jul 14 11:51:01 2022 +0100 bpf: Add endian modifiers to fix endian warnings A couple of the syscalls which load values (bpf_skb_load_helper_16() and bpf_skb_load_helper_32()) are using u16/u32 types which are triggering warnings as they are then converted from big-endian to CPU-endian. Fix these by making the types __be instead. Fixes the following sparse warnings: net/core/filter.c:246:32: warning: cast to restricted __be16 net/core/filter.c:246:32: warning: cast to restricted __be16 net/core/filter.c:246:32: warning: cast to restricted __be16 net/core/filter.c:246:32: warning: cast to restricted __be16 net/core/filter.c:273:32: warning: cast to restricted __be32 net/core/filter.c:273:32: warning: cast to restricted __be32 net/core/filter.c:273:32: warning: cast to restricted __be32 net/core/filter.c:273:32: warning: cast to restricted __be32 net/core/filter.c:273:32: warning: cast to restricted __be32 net/core/filter.c:273:32: warning: cast to restricted __be32 Signed-off-by: Ben Dooks Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220714105101.297304-1-ben.dooks@sifive.com net/core/filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5c8b3f11565e64366d53295e8004edaa1fcf1ec9 Author: Vadim Pasternak Date: Mon Jul 11 11:45:59 2022 +0300 Documentation/ABI: Add new attributes for mlxreg-io sysfs interfaces Add documentation for the new attributes: - "asic2_health" - health of 2-nd ASIC for system equipped with two ASICs. - "asic_reset" and "asic2_reset" - ASICs reset control. - "comm_chnl_ready" - communication channel indication to remote end (BMC). - "config3" - indication of system minor BOM changes. Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20220711084559.62447-10-vadimp@nvidia.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Documentation/ABI/stable/sysfs-driver-mlxreg-io | 39 +++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 5002615a37b1e23a4b51c386ee22c8f90a70b4dd Author: Yafang Shao Date: Wed Jul 13 16:09:36 2022 +0000 bpf: Warn on non-preallocated case for BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE is also tracing type, which may cause unexpected memory allocation if we set BPF_F_NO_PREALLOC. Let's also warn on it similar as we do in case of BPF_PROG_TYPE_RAW_TRACEPOINT. Signed-off-by: Yafang Shao Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220713160936.57488-1-laoar.shao@gmail.com kernel/bpf/verifier.c | 1 + 1 file changed, 1 insertion(+) commit d34213ebfea31229411583716a9ebe3610bf2d29 Author: Andy Shevchenko Date: Tue Jun 7 19:49:37 2022 +0300 nvdimm/namespace: drop nested variable in create_namespace_pmem() Kernel build bot reported: namespace_devs.c:1991:10: warning: Local variable 'uuid' shadows outer variable [shadowVariable] Refactor create_namespace_pmem() by dropping a nested version of the same variable. Fixes: d1c6e08e7503 ("libnvdimm/labels: Add uuid helpers") Reported-by: kernel test robot Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220607164937.33967-1-andriy.shevchenko@linux.intel.com Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 2 -- 1 file changed, 2 deletions(-) commit ca2e1a627035002cd33d9667431e80bad90c25fa Author: Maciej Fijalkowski Date: Thu Jul 7 15:08:42 2022 +0200 xsk: Mark napi_id on sendmsg() When application runs in busy poll mode and does not receive a single packet but only sends them, it is currently impossible to get into napi_busy_loop() as napi_id is only marked on Rx side in xsk_rcv_check(). In there, napi_id is being taken from xdp_rxq_info carried by xdp_buff. From Tx perspective, we do not have access to it. What we have handy is the xsk pool. Xsk pool works on a pool of internal xdp_buff wrappers called xdp_buff_xsk. AF_XDP ZC enabled drivers call xp_set_rxq_info() so each of xdp_buff_xsk has a valid pointer to xdp_rxq_info of underlying queue. Therefore, on Tx side, napi_id can be pulled from xs->pool->heads[0].xdp.rxq->napi_id. Hide this pointer chase under helper function, xsk_pool_get_napi_id(). Do this only for sockets working in ZC mode as otherwise rxq pointers would not be initialized. Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20220707130842.49408-1-maciej.fijalkowski@intel.com include/net/xdp_sock_drv.h | 14 ++++++++++++++ net/xdp/xsk.c | 5 ++++- 2 files changed, 18 insertions(+), 1 deletion(-) commit a917dd94b832c8f4ad458d0ca2bd1007466c5643 Author: Guillaume Tucker Date: Wed Jul 13 08:35:01 2022 +0200 selftests/landlock: drop deprecated headers dependency The khdr make target has been removed, so drop it from the landlock Makefile dependencies as well as related include paths that are standard for headers in the kernel tree. Signed-off-by: Guillaume Tucker Reported-by: Anders Roxell Signed-off-by: Shuah Khan tools/testing/selftests/landlock/Makefile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit c96cfaf8fc02d4bb70727dfa7ce7841a3cff9be2 Author: Lyude Paul Date: Thu Jul 14 13:42:34 2022 -0400 drm/nouveau: Don't pm_runtime_put_sync(), only pm_runtime_put_autosuspend() While trying to fix another issue, it occurred to me that I don't actually think there is any situation where we want pm_runtime_put() in nouveau to be synchronous. In fact, this kind of just seems like it would cause issues where we may unexpectedly block a thread we don't expect to be blocked. So, let's only use pm_runtime_put_autosuspend(). Changes since v1: * Use pm_runtime_put_autosuspend(), not pm_runtime_put() Signed-off-by: Lyude Paul Reviewed-by: David Airlie Fixes: 3a6536c51d5d ("drm/nouveau: Intercept ACPI_VIDEO_NOTIFY_PROBE") Cc: Hans de Goede Cc: # v4.10+ Link: https://patchwork.freedesktop.org/patch/msgid/20220714174234.949259-3-lyude@redhat.com drivers/gpu/drm/nouveau/nouveau_display.c | 2 +- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 53c26181950ddc3c8ace3c0939c89e9c4d8deeb9 Author: Lyude Paul Date: Thu Jul 14 13:42:33 2022 -0400 drm/nouveau/acpi: Don't print error when we get -EINPROGRESS from pm_runtime Since this isn't actually a failure. Signed-off-by: Lyude Paul Reviewed-by: David Airlie Fixes: 79e765ad665d ("drm/nouveau/drm/nouveau: Prevent handling ACPI HPD events too early") Cc: # v4.19+ Link: https://patchwork.freedesktop.org/patch/msgid/20220714174234.949259-2-lyude@redhat.com drivers/gpu/drm/nouveau/nouveau_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce7d101750ff8450af16d6e1f6ccba10d44ae9f3 Author: Wolfram Sang Date: Wed Jul 13 22:46:21 2022 +0200 selftests: timers: clocksource-switch: adapt to kselftest framework So we have proper counters at the end of a test. We also print the kselftest header at the end of the test, so we don't mix with the output of the child process. There is only this one test anyhow. Signed-off-by: Wolfram Sang Acked-by: John Stultz Signed-off-by: Shuah Khan tools/testing/selftests/timers/clocksource-switch.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 248ae6f49a257bcbc57513ebc58e5ed7fa47e7fe Author: Wolfram Sang Date: Thu Jul 14 20:57:21 2022 +0200 selftests: timers: clocksource-switch: add 'runtime' command line parameter So the user can decide how long the test should run. Signed-off-by: Wolfram Sang Acked-by: John Stultz Signed-off-by: Shuah Khan tools/testing/selftests/timers/clocksource-switch.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 19b6823a6e9177ca95068440d622005e4aab5543 Author: Wolfram Sang Date: Wed Jul 13 22:46:19 2022 +0200 selftests: timers: clocksource-switch: add command line switch to skip sanity check The sanity check takes a while. If you do repeated checks when debugging, this is time consuming. Add a parameter to skip it. Signed-off-by: Wolfram Sang Acked-by: John Stultz Signed-off-by: Shuah Khan .../testing/selftests/timers/clocksource-switch.c | 40 +++++++++++++++------- 1 file changed, 28 insertions(+), 12 deletions(-) commit 5be1fd963f7989090b16e3c471d0910502fb9bf8 Author: Wolfram Sang Date: Wed Jul 13 22:46:18 2022 +0200 selftests: timers: clocksource-switch: sort includes It is easier to check if you need to add an include if the existing ones are sorted. Signed-off-by: Wolfram Sang Acked-by: John Stultz Signed-off-by: Shuah Khan tools/testing/selftests/timers/clocksource-switch.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4d8f52ac5fa9eede7b7aa2f2d67c841d9eeb655f Author: Wolfram Sang Date: Wed Jul 13 22:46:17 2022 +0200 selftests: timers: clocksource-switch: fix passing errors from child The return value from system() is a waitpid-style integer. Do not return it directly because with the implicit masking in exit() it will always return 0. Access it with appropriate macros to really pass on errors. Fixes: 7290ce1423c3 ("selftests/timers: Add clocksource-switch test from timetest suite") Signed-off-by: Wolfram Sang Acked-by: John Stultz Signed-off-by: Shuah Khan tools/testing/selftests/timers/clocksource-switch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 04fd937eb652fd9b908f885a373960ebad5cd72b Author: Wolfram Sang Date: Wed Jul 13 22:46:16 2022 +0200 selftests: timers: inconsistency-check: adapt to kselftest framework So we have proper counters at the end of a test, e.g.: # Totals: pass:11 fail:0 xfail:0 xpass:0 skip:1 error:0 Signed-off-by: Wolfram Sang Acked-by: John Stultz Signed-off-by: Shuah Khan .../testing/selftests/timers/inconsistency-check.c | 32 ++++++++++++---------- 1 file changed, 18 insertions(+), 14 deletions(-) commit 2d87048acb53e876a634a3f5cb15718b22a109ad Author: Wolfram Sang Date: Wed Jul 13 22:46:15 2022 +0200 selftests: timers: nanosleep: adapt to kselftest framework So we have proper counters at the end of a test, e.g.: # Totals: pass:4 fail:0 xfail:0 xpass:0 skip:8 error:0 Signed-off-by: Wolfram Sang Acked-by: John Stultz Signed-off-by: Shuah Khan tools/testing/selftests/timers/nanosleep.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit a8d74fe7fed55fe53066dca66708273f3dd9bb2f Author: Wolfram Sang Date: Wed Jul 13 22:46:14 2022 +0200 selftests: timers: fix declarations of main() Mixing up argc/argv went unnoticed because they were not used. Still, this is worth fixing. Signed-off-by: Wolfram Sang Acked-by: John Stultz Signed-off-by: Shuah Khan tools/testing/selftests/timers/adjtick.c | 2 +- tools/testing/selftests/timers/change_skew.c | 2 +- tools/testing/selftests/timers/raw_skew.c | 2 +- tools/testing/selftests/timers/skew_consistency.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 9a162977d20436be5678a8e21a8e58eb4616d86a Author: Wolfram Sang Date: Wed Jul 13 22:46:13 2022 +0200 selftests: timers: valid-adjtimex: build fix for newer toolchains Toolchains with an include file 'sys/timex.h' based on 3.18 will have a 'clock_adjtime' definition added, so it can't be static in the code: valid-adjtimex.c:43:12: error: static declaration of ‘clock_adjtime’ follows non-static declaration Fixes: e03a58c320e1 ("kselftests: timers: Add adjtimex SETOFFSET validity tests") Signed-off-by: Wolfram Sang Acked-by: John Stultz Signed-off-by: Shuah Khan tools/testing/selftests/timers/valid-adjtimex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76707cb3db886c777fdf5683110f472ca35048d4 Author: Florian Fainelli Date: Mon Jul 11 15:29:19 2022 -0700 ARM: bcm: NSP: Removed forced thermal selection Both THERMAL and THERMAL_OF are user-selectable and we should not force the selection of those Kconfig entries. Link: https://lore.kernel.org/r/20220711222919.4048833-1-f.fainelli@gmail.com Signed-off-by: Florian Fainelli arch/arm/mach-bcm/Kconfig | 2 -- 1 file changed, 2 deletions(-) commit 91dd6ef8971085c8ea67af68dc45153917a004c4 Author: Vadim Pasternak Date: Mon Jul 11 11:45:58 2022 +0300 Documentation/ABI: mlxreg-io: Fix contact info Fix e-mail in contact fields. Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20220711084559.62447-9-vadimp@nvidia.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Documentation/ABI/stable/sysfs-driver-mlxreg-io | 42 ++++++++++++------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit 7964f8fc52b1b1c646615423fb4e1b6d8d685822 Author: Vadim Pasternak Date: Mon Jul 11 11:45:57 2022 +0300 platform/mellanox: mlxreg-io: Add locking for io operations Add lock to protect user read/write access to the registers. Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20220711084559.62447-8-vadimp@nvidia.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/mellanox/mlxreg-io.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 095a2c1891512630d8674579b3b023f427d5330e Author: Vadim Pasternak Date: Mon Jul 11 11:45:56 2022 +0300 platform/x86: mlx-platform: Add COME board revision register Extend COME CPLD with board configuration register for getting board revision. The value of this register is pushed by hardware through GPIO pins. The purpose of it is to expose some minor BOM changes. Signed-off-by: Vadim Pasternak Reviewed-by: Oleksandr Shamray Link: https://lore.kernel.org/r/20220711084559.62447-7-vadimp@nvidia.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/mlx-platform.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 2deb92864348fe7f313ed4efba12c89ebd03ef41 Author: Vadim Pasternak Date: Mon Jul 11 11:45:55 2022 +0300 platform/x86: mlx-platform: Add support for new system XH3000 Add support for new system type XH3000, which is a water cooling Ethernet switch blade equipped with 32x200G Ethernet ports. The system is recognized by "DMI_BOARD_NAME" and "DMI_PRODUCT_SKU" matches, when these fields are set to "VMOD0005" and "HI139" respectively. Signed-off-by: Vadim Pasternak Reviewed-by: Felix Radensky Link: https://lore.kernel.org/r/20220711084559.62447-6-vadimp@nvidia.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/mlx-platform.c | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 6995e711b69ce8741191bd8649d8f13748b24141 Author: Vadim Pasternak Date: Mon Jul 11 11:45:54 2022 +0300 platform/x86: mlx-platform: Introduce support for COMe NVSwitch management module for Vulcan chassis The Vulcan is chassis containing Nvidia's Hopper dGPU (GH100), NVswitch (LS10) based HGX baseboard and COMe NVSwitch management module. The system is built for artificial intelligence and accelerated analytics applications. Vulcan is offered as an HGX product to cloud service providers and OEMs, who intend to build fully interconnected GPU systems for large scale deployments. Driver is extended to support new COMe NVSwitch management module. Signed-off-by: Vadim Pasternak Reviewed-by: Oleksandr Shamray Link: https://lore.kernel.org/r/20220711084559.62447-5-vadimp@nvidia.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/mlx-platform.c | 269 ++++++++++++++++++++++++++++++++++++ 1 file changed, 269 insertions(+) commit 08fdb6f3acaef252e79f2d2630752f9182a82c8c Author: Vadim Pasternak Date: Mon Jul 11 11:45:53 2022 +0300 platform/x86: mlx-platform: Add support for systems equipped with two ASICs Motivation is to support new systems equipped with two ASICs. Extend driver with: - The second ASIC health event. - Per ASIC reset control, triggering reset of ASIC internal resources and restarting ASIC initialization flow. Signed-off-by: Vadim Pasternak Reviewed-by: Oleksandr Shamray Link: https://lore.kernel.org/r/20220711084559.62447-4-vadimp@nvidia.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/mlx-platform.c | 52 ++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) commit 7bf8a14dedaf9ae4fd670ecd403db0dbe15bb3ac Author: Vadim Pasternak Date: Mon Jul 11 11:45:52 2022 +0300 platform/x86: mlx-platform: Add cosmetic changes for alignment Align the first argument with open parenthesis for platform_device_register_resndata() calls. Signed-off-by: Vadim Pasternak Reviewed-by: Oleksandr Shamray Link: https://lore.kernel.org/r/20220711084559.62447-3-vadimp@nvidia.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/mlx-platform.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit e05d6b658fcd98bd3a09220cb5701e40269a0e57 Author: Vadim Pasternak Date: Mon Jul 11 11:45:51 2022 +0300 platform/x86: mlx-platform: Make activation of some drivers conditional Current assumption in driver that any system is capable of LED, hotplug or watchdog support. It could be not true for some new coming systems. Add validation for LED, hotplug, watchdog configuration and skip activation of relevant drivers if not configured. Signed-off-by: Vadim Pasternak Reviewed-by: Oleksandr Shamray Link: https://lore.kernel.org/r/20220711084559.62447-2-vadimp@nvidia.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/mlx-platform.c | 62 +++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 27 deletions(-) commit ca0367ca5d9216644b41f86348d6661f8d9e32d8 Author: Lyude Paul Date: Thu May 26 16:43:13 2022 -0400 drm/nouveau/kms: Fix failure path for creating DP connectors It looks like that when we moved nouveau over to using drm_dp_aux_init() and registering it's aux bus during late connector registration, we totally forgot to fix the failure codepath in nouveau_connector_create() - as it still seems to assume that drm_dp_aux_init() can fail (it can't). So, let's fix that and also add a missing check to ensure that we've properly allocated nv_connector->aux.name while we're at it. Signed-off-by: Lyude Paul Reviewed-by: David Airlie Fixes: fd43ad9d47e7 ("drm/nouveau/kms/nv50-: Move AUX adapter reg to connector late register/early unregister") Cc: # v5.14+ Link: https://patchwork.freedesktop.org/patch/msgid/20220526204313.656473-1-lyude@redhat.com drivers/gpu/drm/nouveau/nouveau_connector.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 2410e3301fcc40f6ebda234928c66a22f4257d9f Author: Huacai Chen Date: Thu Jul 14 20:42:13 2022 +0800 PCI: loongson: Don't access non-existent devices On LS2K/LS7A, config reads to some non-existent devices don't return 0xffffffff (they are hidden devices for debug, and accessing the config space may cause machine hang). This is a hardware flaw but we can only avoid it by software now. Link: https://lore.kernel.org/r/20220714124216.1489304-5-chenhuacai@loongson.cn Signed-off-by: Huacai Chen Signed-off-by: Bjorn Helgaas drivers/pci/controller/pci-loongson.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) commit cd89edda4002b7fb3c0a6765c3a60a60d5b1dc16 Author: Huacai Chen Date: Thu Jul 14 20:42:12 2022 +0800 PCI: loongson: Add ACPI init support Loongson PCH (LS7A chipset) will be used by both MIPS-based and LoongArch- based Loongson processors. MIPS-based Loongson uses FDT, while LoongArch- based Loongson uses ACPI. Add ACPI init support for the driver in pci-loongson.c because it is currently FDT-only. LoongArch is a new RISC ISA, mainline support will come soon, and documentations are here (in translation): https://github.com/loongson/LoongArch-Documentation Link: https://lore.kernel.org/r/20220714124216.1489304-4-chenhuacai@loongson.cn Signed-off-by: Huacai Chen Signed-off-by: Bjorn Helgaas drivers/acpi/pci_mcfg.c | 10 ++++ drivers/pci/controller/Kconfig | 2 +- drivers/pci/controller/pci-loongson.c | 94 ++++++++++++++++++++++++++++------- include/linux/pci-ecam.h | 1 + 4 files changed, 87 insertions(+), 20 deletions(-) commit b644c95598adfe2b968e97daee3a890dd2fda84d Author: PaddyKP_Yao Date: Mon Jul 11 19:51:25 2022 +0800 platform/x86: asus-wmi: Add mic-mute LED classdev support In some new ASUS devices, hotkey Fn+F13 is used for mic mute. If mic-mute LED is present by checking WMI ASUS_WMI_DEVID_MICMUTE_LED, we will add a mic-mute LED classdev, asus::micmute, in the asus-wmi driver to control it. The binding of mic-mute LED controls will be swithched with LED trigger. Signed-off-by: PaddyKP_Yao Link: https://lore.kernel.org/r/20220711115125.2072508-1-PaddyKP_Yao@asus.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/Kconfig | 2 ++ drivers/platform/x86/asus-wmi.c | 25 +++++++++++++++++++++++++ include/linux/platform_data/x86/asus-wmi.h | 1 + 3 files changed, 28 insertions(+) commit 2ee73ef60db4d79b9f9b8cd501e8188b5179449f Author: Mikulas Patocka Date: Mon Jul 11 16:31:52 2022 -0400 dm writecache: count number of blocks discarded, not number of discard bios Change dm-writecache, so that it counts the number of blocks discarded instead of the number of discard bios. Make it consistent with the read and write statistics counters that were changed to count the number of blocks instead of bios. Fixes: e3a35d03407c ("dm writecache: add event counters") Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Documentation/admin-guide/device-mapper/writecache.rst | 2 +- drivers/md/dm-writecache.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b2676e1482af89714af6988ce5d31a84692e2530 Author: Mikulas Patocka Date: Mon Jul 11 16:31:26 2022 -0400 dm writecache: count number of blocks written, not number of write bios Change dm-writecache, so that it counts the number of blocks written instead of the number of write bios. Bios can be split and requeued using the dm_accept_partial_bio function, so counting bios caused inaccurate results. Fixes: e3a35d03407c ("dm writecache: add event counters") Reported-by: Yu Kuai Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Documentation/admin-guide/device-mapper/writecache.rst | 10 +++++----- drivers/md/dm-writecache.c | 12 +++++++++--- 2 files changed, 14 insertions(+), 8 deletions(-) commit 2c6e755b49d273243431f5f1184654e71221fc78 Author: Mikulas Patocka Date: Mon Jul 11 16:30:52 2022 -0400 dm writecache: count number of blocks read, not number of read bios Change dm-writecache, so that it counts the number of blocks read instead of the number of read bios. Bios can be split and requeued using the dm_accept_partial_bio function, so counting bios caused inaccurate results. Fixes: e3a35d03407c ("dm writecache: add event counters") Reported-by: Yu Kuai Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Documentation/admin-guide/device-mapper/writecache.rst | 4 ++-- drivers/md/dm-writecache.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) commit 9bc0c92e4b82adb017026dbb2aa816b1ac2bef31 Author: Mikulas Patocka Date: Mon Jul 11 16:30:27 2022 -0400 dm writecache: return void from functions The functions writecache_map_remap_origin and writecache_bio_copy_ssd only return a single value, thus they can be made to return void. This helps simplify the following IO accounting changes. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-writecache.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 949d49ec306dfca51d63d89bc316211a2a008cfc Author: Mikulas Patocka Date: Wed Jul 13 07:05:51 2022 -0400 dm kcopyd: use __GFP_HIGHMEM when allocating pages dm-kcopyd doesn't access the allocated pages directly, it only passes them to dm-io which adds them to a bio list - thus, we can allocate the pages from high memory. This will reduce pressure on the low memory when there are a large number of kcopyd jobs in progress. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-kcopyd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca7dc242e358e46d963b32f9d9dd829785a9e957 Author: Mikulas Patocka Date: Wed Jul 13 07:09:04 2022 -0400 dm writecache: set a default MAX_WRITEBACK_JOBS dm-writecache has the capability to limit the number of writeback jobs in progress. However, this feature was off by default. As such there were some out-of-memory crashes observed when lowering the low watermark while the cache is full. This commit enables writeback limit by default. It is set to 256MiB or 1/16 of total system memory, whichever is smaller. Cc: stable@vger.kernel.org Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-writecache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aeb47cb10aa4c2f794aa85e9fd3c9ff028455369 Author: Lukas Bulwahn Date: Wed Jul 13 06:09:16 2022 +0200 MAINTAINERS: repair file entry in MICROSOFT SURFACE AGGREGATOR TABLET-MODE SWITCH Commit 9f794056db5b ("platform/surface: Add KIP/POS tablet-mode switch driver") adds the section MICROSOFT SURFACE AGGREGATOR TABLET-MODE SWITCH with a file entry, but the file that is added with this commit is actually named slightly differently. file entry name: drivers/platform/surface/surface_aggregator_tablet_switch.c added file name: drivers/platform/surface/surface_aggregator_tabletsw.c Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Repair this file entry to the actual file name added with the commit above. Fixes: 9f794056db5b ("platform/surface: Add KIP/POS tablet-mode switch driver") Signed-off-by: Lukas Bulwahn Reviewed-by: Andy Shevchenko Reviewed-by: Maximilian Luz Link: https://lore.kernel.org/r/20220713040916.1767-1-lukas.bulwahn@gmail.com Signed-off-by: Hans de Goede MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0e52a5cc6a589a918745e4667aaaaa564f73934 Author: Hans de Goede Date: Wed Jul 13 23:11:01 2022 +0200 ACPI: video: Fix acpi_video_handles_brightness_key_presses() Commit 3a0cf7ab8df3 ("ACPI: video: Change how we determine if brightness key-presses are handled") made acpi_video_handles_brightness_key_presses() report false when none of the ACPI Video Devices support backlight control. But it turns out that at least on a Dell Inspiron N4010 there is no ACPI backlight control, yet brightness hotkeys are still reported through the ACPI Video Bus; and since acpi_video_handles_brightness_key_presses() now returns false, brightness keypresses are now reported twice. To fix this rename the has_backlight flag to may_report_brightness_keys and also set it the first time a brightness key press event is received. Depending on the delivery of the other ACPI (WMI) event vs the ACPI Video Bus event this means that the first brightness key press might still get reported twice, but all further keypresses will be filtered as before. Note that this relies on other drivers reporting brightness key events calling acpi_video_handles_brightness_key_presses() when delivering the events (rather then once during driver probe). This is already required and documented in include/acpi/video.h: /* * Note: The value returned by acpi_video_handles_brightness_key_presses() * may change over time and should not be cached. */ Fixes: 3a0cf7ab8df3 ("ACPI: video: Change how we determine if brightness key-presses are handled") Link: https://lore.kernel.org/regressions/CALF=6jEe5G8+r1Wo0vvz4GjNQQhdkLT5p8uCHn6ZXhg4nsOWow@mail.gmail.com/ Reported-and-tested-by: Ben Greening Signed-off-by: Hans de Goede Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20220713211101.85547-2-hdegoede@redhat.com drivers/acpi/acpi_video.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 2a04b8d846dca196342862caecadd2a78460d8dc Author: Steven Rostedt (Google) Date: Tue Jul 12 18:58:20 2022 -0400 tracing: devlink: Use static array for string in devlink_trap_report event The trace event devlink_trap_report uses the __dynamic_array() macro to determine the size of the input_dev_name field. This is because it needs to test the dev field for NULL, and will use "NULL" if it is. But it also has the size of the dynamic array as a fixed IFNAMSIZ bytes. This defeats the purpose of the dynamic array, as this will reserve that amount of bytes on the ring buffer, and to make matters worse, it will even save that size in the event as the event expects it to be dynamic (for which it is not). Since IFNAMSIZ is just 16 bytes, just make it a static array and this will remove the meta data from the event that records the size. Link: https://lkml.kernel.org/r/20220712185820.002d9fb5@gandalf.local.home Cc: Leon Romanovsky Cc: Jiri Pirko Cc: "David S. Miller" Cc: Eric Dumazet Cc: Paolo Abeni Cc: netdev@vger.kernel.org Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Acked-by: Jakub Kicinski Signed-off-by: Steven Rostedt (Google) include/trace/events/devlink.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 37101d3c719386040ded735a5ec06974f1d94d1f Author: Hsin-Yi Wang Date: Wed Jul 6 01:16:49 2022 +0800 PM: domains: Ensure genpd_debugfs_dir exists before remove Both genpd_debug_add() and genpd_debug_remove() may be called indirectly by other drivers while genpd_debugfs_dir is not yet set. For example, drivers can call pm_genpd_init() in probe or pm_genpd_init() in probe fail/cleanup path: pm_genpd_init() --> genpd_debug_add() pm_genpd_remove() --> genpd_remove() --> genpd_debug_remove() At this time, genpd_debug_init() may not yet be called. genpd_debug_add() checks that if genpd_debugfs_dir is NULL, it will return directly. Make sure this is also checked in pm_genpd_remove(), otherwise components under debugfs root which has the same name as other components under pm_genpd may be accidentally removed, since NULL represents debugfs root. Fixes: 718072ceb211 ("PM: domains: create debugfs nodes when adding power domains") Signed-off-by: Hsin-Yi Wang Reviewed-by: Greg Kroah-Hartman Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 3 +++ 1 file changed, 3 insertions(+) commit f0341e67b3782603737f7788e71bd3530012a4f4 Author: Werner Sembach Date: Thu Jul 7 20:09:53 2022 +0200 ACPI: video: Shortening quirk list by identifying Clevo by board_name only Taking a recent change in the i8042 quirklist to this one: Clevo board_names are somewhat unique, and if not: The generic Board_-/Sys_Vendor string "Notebook" doesn't help much anyway. So identifying the devices just by the board_name helps keeping the list significantly shorter and might even hit more devices requiring the fix. Signed-off-by: Werner Sembach Fixes: c844d22fe0c0 ("ACPI: video: Force backlight native for Clevo NL5xRU and NL5xNU") Cc: All applicable Reviewed-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/video_detect.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) commit c752089f7cf5b5800c6ace4cdd1a8351ee78a598 Author: Werner Sembach Date: Thu Jul 7 20:09:52 2022 +0200 ACPI: video: Force backlight native for some TongFang devices The TongFang PF5PU1G, PF4NU1F, PF5NU1G, and PF5LUXG/TUXEDO BA15 Gen10, Pulse 14/15 Gen1, and Pulse 15 Gen2 have the same problem as the Clevo NL5xRU and NL5xNU/TUXEDO Aura 15 Gen1 and Gen2: They have a working native and video interface. However the default detection mechanism first registers the video interface before unregistering it again and switching to the native interface during boot. This results in a dangling SBIOS request for backlight change for some reason, causing the backlight to switch to ~2% once per boot on the first power cord connect or disconnect event. Setting the native interface explicitly circumvents this buggy behaviour by avoiding the unregistering process. Signed-off-by: Werner Sembach Cc: All applicable Reviewed-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/video_detect.c | 51 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) commit 44c1e84a38a031758cf762c1902c2ae0b166c0d4 Author: Palmer Dabbelt Date: Sat May 21 12:33:57 2022 -0700 RISC-V: Add CONFIG_{NON,}PORTABLE The RISC-V port has collected a handful of options that are fundamentally non-portable. To prevent users from shooting themselves in the foot, hide them all behind a config entry that explicitly calls out that non-portable binaries may be produced. Signed-off-by: Palmer Dabbelt Reviewed-by: Arnd Bergmann Signed-off-by: Palmer Dabbelt Reviewed-by: Atish Patra Reviewed-by: Damien Le Moal Reviewed-by: Guo Ren Link: https://lore.kernel.org/r/20220521193356.26562-1-palmer@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 28 ++++++++++++++++++++++++-- arch/riscv/configs/32-bit.config | 2 ++ arch/riscv/configs/nommu_k210_defconfig | 1 + arch/riscv/configs/nommu_k210_sdcard_defconfig | 1 + arch/riscv/configs/nommu_virt_defconfig | 1 + arch/riscv/configs/rv32_defconfig | 1 + 6 files changed, 32 insertions(+), 2 deletions(-) commit 91de5eb17c100b3ab9192c36d99761e9da8536da Author: Lee Jones Date: Thu Jul 14 12:25:33 2022 +0100 regulator: pwm: Update Lee Jones' email address Going forward, I'll be using my kernel.org for upstream work. Signed-off-by: Lee Jones Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220714112533.539910-9-lee@kernel.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/regulator/pwm-regulator.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be6bd82351e8019eae1e289537529ff59b41b955 Author: Axel Lin Date: Thu Jul 14 18:12:12 2022 +0800 regulator: max597x: Don't return uninitialized variable in .probe Remove the code checking and returning uninitialized variable. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20220714101212.502824-1-axel.lin@ingics.com Signed-off-by: Mark Brown drivers/regulator/max597x-regulator.c | 3 --- 1 file changed, 3 deletions(-) commit e46b5970496705127f9ae494c66e0242773097e8 Author: Bart Van Assche Date: Thu Jul 14 11:07:29 2022 -0700 fs/zonefs: Use the enum req_op type for tracing request operations Improve static type checking by using the enum req_op type for request operations. Reviewed-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Cc: Naohiro Aota Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-64-bvanassche@acm.org Signed-off-by: Jens Axboe fs/zonefs/trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d03025aef8676e826b69f8e3ec9bb59a5ad0c31d Author: Bart Van Assche Date: Thu Jul 14 11:07:28 2022 -0700 fs/xfs: Use the enum req_op and blk_opf_t types Improve static type checking by using the enum req_op type for variables that represent a request operation and the new blk_opf_t type for the combination of a request operation with request flags. Reviewed-by: Darrick J. Wong Cc: Christoph Hellwig Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-63-bvanassche@acm.org Signed-off-by: Jens Axboe fs/xfs/xfs_bio_io.c | 2 +- fs/xfs/xfs_buf.c | 4 ++-- fs/xfs/xfs_linux.h | 2 +- fs/xfs/xfs_log_recover.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 568e34ed7339e357f73c8e1ae5cc4f4595805357 Author: Bart Van Assche Date: Thu Jul 14 11:07:27 2022 -0700 PM: Use the enum req_op and blk_opf_t types Improve static type checking by using the enum req_op type for variables that represent a request operation and the new blk_opf_t type for variables that represent request flags. Combine the first two hib_submit_io() arguments into a single argument. Acked-by: Rafael J. Wysocki Cc: Christoph Hellwig Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-62-bvanassche@acm.org Signed-off-by: Jens Axboe kernel/power/swap.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit 61ba06c7069bfe1d2b66ab474ce0d6b4f5419d64 Author: Bart Van Assche Date: Thu Jul 14 11:07:26 2022 -0700 fs/ocfs2: Use the enum req_op and blk_opf_t types Improve static type checking by using the enum req_op type for variables that represent a request operation and the new blk_opf_t type for variables that represent request flags. Combine the last two o2hb_setup_one_bio() arguments into a single argument. Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-61-bvanassche@acm.org Signed-off-by: Jens Axboe fs/ocfs2/cluster/heartbeat.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit ce6b5315883448fbecfaca43b95d3bf2ed1d008c Author: Bart Van Assche Date: Thu Jul 14 11:07:25 2022 -0700 fs/ntfs3: Use enum req_op where appropriate Improve static type checking by using enum req_op instead of u32 for block layer request operations. Cc: Konstantin Komarov Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-60-bvanassche@acm.org Signed-off-by: Jens Axboe fs/ntfs3/fsntfs.c | 2 +- fs/ntfs3/ntfs_fs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ed4512590bd5839f8ea9eef1626b0f4db626b1d1 Author: Bart Van Assche Date: Thu Jul 14 11:07:24 2022 -0700 fs/nilfs2: Use the enum req_op and blk_opf_t types Improve static type checking by using the enum req_op type for variables that represent a request operation and the new blk_opf_t type for variables that represent request flags. Combine the 'mode' and 'mode_flags' arguments of nilfs_btnode_submit_block into a single argument 'opf'. Reviewed-by: Ryusuke Konishi Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-59-bvanassche@acm.org Signed-off-by: Jens Axboe fs/nilfs2/btnode.c | 8 ++++---- fs/nilfs2/btnode.h | 4 ++-- fs/nilfs2/btree.c | 6 +++--- fs/nilfs2/gcinode.c | 5 ++--- fs/nilfs2/mdt.c | 19 ++++++++++--------- include/trace/events/nilfs2.h | 4 ++-- 6 files changed, 23 insertions(+), 23 deletions(-) commit 5d12ce77e1e677590de13468fe1a497388de3a9e Author: Bart Van Assche Date: Thu Jul 14 11:07:23 2022 -0700 fs/nfs: Use enum req_op where appropriate Improve static type checking by using enum req_op for request operations. Rename an 'rw' argument into 'op' since that name is typically used for request operations. This patch does not change any functionality. Note: REQ_OP_READ = READ = 0 and REQ_OP_WRITE = WRITE = 1. Cc: Trond Myklebust Cc: Anna Schumaker Cc: Christoph Hellwig Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-58-bvanassche@acm.org Signed-off-by: Jens Axboe fs/nfs/blocklayout/blocklayout.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 6669797b0dd41ced457760b6e1014fdda8ce19ce Author: Bart Van Assche Date: Thu Jul 14 11:07:22 2022 -0700 fs/jbd2: Fix the documentation of the jbd2_write_superblock() callers Commit 2a222ca992c3 ("fs: have submit_bh users pass in op and flags separately") renamed the jbd2_write_superblock() 'write_op' argument into 'write_flags'. Propagate this change to the jbd2_write_superblock() callers. Additionally, change the type of 'write_flags' into blk_opf_t. Cc: Mike Christie Cc: Theodore Ts'o Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-57-bvanassche@acm.org Signed-off-by: Jens Axboe fs/jbd2/journal.c | 15 ++++++++------- include/linux/jbd2.h | 2 +- include/trace/events/jbd2.h | 12 ++++++------ 3 files changed, 15 insertions(+), 14 deletions(-) commit dbd4eb8148f694ae300fe9682b505acf53053f6e Author: Bart Van Assche Date: Thu Jul 14 11:07:21 2022 -0700 fs/iomap: Use the new blk_opf_t type Improve static type checking by using the enum req_op type for variables that represent a request operation and the new blk_opf_t type for the combination of a request operation and request flags. Cc: Al Viro Cc: Christoph Hellwig Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-56-bvanassche@acm.org Signed-off-by: Jens Axboe fs/iomap/direct-io.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c85f99929ea66c357199b6a3fe958745e1190f5a Author: Bart Van Assche Date: Thu Jul 14 11:07:20 2022 -0700 fs/hfsplus: Use the enum req_op and blk_opf_t types Improve static type checking by using the enum req_op type for variables that represent a request operation and the new blk_opf_t type for variables that represent request flags. Combine the last two hfsplus_submit_bio() arguments into a single argument. Cc: Christoph Hellwig Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-55-bvanassche@acm.org Signed-off-by: Jens Axboe fs/hfsplus/hfsplus_fs.h | 2 +- fs/hfsplus/part_tbl.c | 5 ++--- fs/hfsplus/super.c | 4 ++-- fs/hfsplus/wrapper.c | 12 ++++++------ 4 files changed, 11 insertions(+), 12 deletions(-) commit 67688c08b7e5e9f8f945b22fb460a31ed3feb880 Author: Bart Van Assche Date: Thu Jul 14 11:07:19 2022 -0700 fs/gfs2: Use the enum req_op and blk_opf_t types Improve static type checking by using the enum req_op type for variables that represent a request operation and the new blk_opf_t type for variables that represent request flags. Combine the first two gfs2_submit_bhs() arguments into a single argument. Reviewed-by: Andreas Gruenbacher Cc: Bob Peterson Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-54-bvanassche@acm.org Signed-off-by: Jens Axboe fs/gfs2/log.c | 4 ++-- fs/gfs2/log.h | 2 +- fs/gfs2/lops.c | 4 ++-- fs/gfs2/lops.h | 2 +- fs/gfs2/meta_io.c | 9 ++++----- 5 files changed, 10 insertions(+), 11 deletions(-) commit 7649c873c16a384d447f7dbf9b153e333159f914 Author: Bart Van Assche Date: Thu Jul 14 11:07:18 2022 -0700 fs/f2fs: Use the enum req_op and blk_opf_t types Improve static type checking by using the enum req_op type for variables that represent a request operation and the new blk_opf_t type for variables that represent request flags. Cc: Jaegeuk Kim Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-53-bvanassche@acm.org Signed-off-by: Jens Axboe fs/f2fs/data.c | 11 ++++++----- fs/f2fs/f2fs.h | 6 +++--- fs/f2fs/node.c | 2 +- fs/f2fs/segment.c | 2 +- include/trace/events/f2fs.h | 22 +++++++++++----------- 5 files changed, 22 insertions(+), 21 deletions(-) commit 67c0f556302cfcdb5b5fb7933afa08cb1de75b36 Author: Bart Van Assche Date: Thu Jul 14 11:07:17 2022 -0700 fs/ext4: Use the new blk_opf_t type Improve static type checking by using the new blk_opf_t type for variables that represent request flags. Cc: Theodore Ts'o Cc: Baokun Li Cc: Ye Bin Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-52-bvanassche@acm.org Signed-off-by: Jens Axboe fs/ext4/ext4.h | 8 ++++---- fs/ext4/fast_commit.c | 2 +- fs/ext4/super.c | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) commit bf9486d6dd2351f6cfff9a8df87657a1248a918d Author: Bart Van Assche Date: Thu Jul 14 11:07:16 2022 -0700 fs/btrfs: Use the enum req_op and blk_opf_t types Improve static type checking by using the enum req_op type for variables that represent a request operation and the new blk_opf_t type for variables that represent request flags. Acked-by: David Sterba Cc: Josef Bacik Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-51-bvanassche@acm.org Signed-off-by: Jens Axboe fs/btrfs/check-integrity.c | 4 ++-- fs/btrfs/compression.c | 6 +++--- fs/btrfs/compression.h | 2 +- fs/btrfs/extent_io.c | 18 +++++++++--------- fs/btrfs/inode.c | 4 ++-- fs/btrfs/raid56.c | 4 ++-- 6 files changed, 19 insertions(+), 19 deletions(-) commit f84c94afcf823c6c78438c56c9414763beec50d9 Author: Bart Van Assche Date: Thu Jul 14 11:07:15 2022 -0700 fs/mpage: Use the new blk_opf_t type Improve static type checking by using the new blk_opf_t type for the combination of a block layer request with block layer request flags. Cc: Al Viro Cc: Christoph Hellwig Cc: Matthew Wilcox Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-50-bvanassche@acm.org Signed-off-by: Jens Axboe fs/mpage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c6293eacfc16fe3d85f468fc7ed91eb18f5861d3 Author: Bart Van Assche Date: Thu Jul 14 11:07:14 2022 -0700 fs/direct-io: Reduce the size of struct dio Reduce the size of struct dio by combining the 'op' and 'op_flags' into the new 'opf' member. Use the new blk_opf_t type to improve static type checking. This patch does not change any functionality. Reviewed-by: Jan Kara Cc: Al Viro Cc: Christoph Hellwig Cc: Darrick J. Wong Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-49-bvanassche@acm.org Signed-off-by: Jens Axboe fs/direct-io.c | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) commit 1420c4a549bf28ffddbed827d61fb3d4d2132ddb Author: Bart Van Assche Date: Thu Jul 14 11:07:13 2022 -0700 fs/buffer: Combine two submit_bh() and ll_rw_block() arguments Both submit_bh() and ll_rw_block() accept a request operation type and request flags as their first two arguments. Micro-optimize these two functions by combining these first two arguments into a single argument. This patch does not change the behavior of any of the modified code. Cc: Alexander Viro Cc: Jan Kara Acked-by: Song Liu (for the md changes) Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-48-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/md/md-bitmap.c | 4 ++-- fs/buffer.c | 53 +++++++++++++++++++++++---------------------- fs/ext4/fast_commit.c | 2 +- fs/ext4/mmp.c | 2 +- fs/ext4/super.c | 6 ++--- fs/gfs2/bmap.c | 5 ++--- fs/gfs2/dir.c | 5 ++--- fs/gfs2/meta_io.c | 9 ++++---- fs/gfs2/quota.c | 2 +- fs/isofs/compress.c | 2 +- fs/jbd2/commit.c | 8 +++---- fs/jbd2/journal.c | 4 ++-- fs/jbd2/recovery.c | 4 ++-- fs/nilfs2/btnode.c | 2 +- fs/nilfs2/gcinode.c | 2 +- fs/nilfs2/mdt.c | 2 +- fs/ntfs/aops.c | 6 ++--- fs/ntfs/compress.c | 2 +- fs/ntfs/file.c | 2 +- fs/ntfs/logfile.c | 2 +- fs/ntfs/mft.c | 4 ++-- fs/ntfs3/file.c | 2 +- fs/ntfs3/inode.c | 2 +- fs/ocfs2/aops.c | 2 +- fs/ocfs2/buffer_head_io.c | 8 +++---- fs/ocfs2/super.c | 2 +- fs/reiserfs/inode.c | 4 ++-- fs/reiserfs/journal.c | 12 +++++----- fs/reiserfs/stree.c | 4 ++-- fs/reiserfs/super.c | 2 +- fs/udf/dir.c | 2 +- fs/udf/directory.c | 2 +- fs/udf/inode.c | 2 +- fs/ufs/balloc.c | 2 +- include/linux/buffer_head.h | 4 ++-- 35 files changed, 88 insertions(+), 90 deletions(-) commit 3ae7286943ae6f6bfecfe0a3da9d1a4c64f5531f Author: Bart Van Assche Date: Thu Jul 14 11:07:12 2022 -0700 fs/buffer: Use the new blk_opf_t type Improve static type checking by using the new blk_opf_t type for block layer request flags. Change WRITE into REQ_OP_WRITE. This patch does not change any functionality since REQ_OP_WRITE == WRITE == 1. Reviewed-by: Jan Kara Cc: Al Viro Cc: Christoph Hellwig Cc: Matthew Wilcox Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-47-bvanassche@acm.org Signed-off-by: Jens Axboe fs/buffer.c | 21 +++++++++++---------- include/linux/buffer_head.h | 9 +++++---- 2 files changed, 16 insertions(+), 14 deletions(-) commit f8e6e4bd9fd8c452565f3eaeb358e3cc08d880f4 Author: Bart Van Assche Date: Thu Jul 14 11:07:11 2022 -0700 mm: Use the new blk_opf_t type Improve static type checking by using the new blk_opf_t type for block layer request flags. Cc: Andrew Morton Cc: Christoph Hellwig Cc: Jan Kara Cc: Stefan Roesch Cc: NeilBrown Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-46-bvanassche@acm.org Signed-off-by: Jens Axboe include/linux/writeback.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 79fe9d7d9f6479d3fe85d39813ec452844fac99a Author: Bart Van Assche Date: Thu Jul 14 11:07:10 2022 -0700 scsi/target: Use the new blk_opf_t type Improve static type checking by using the new blk_opf_t type for variables that represent a request operation combined with request flags. Cc: Mike Christie Cc: Bodo Stroesser Cc: Mingzhe Zou Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-45-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/target/target_core_iblock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d8009f39d0adb5b0415190f71841a88f14d9790 Author: Bart Van Assche Date: Thu Jul 14 11:07:09 2022 -0700 scsi/ufs: Rename a 'dir' argument into 'op' Improve consistency of the kernel code by renaming a request operation argument from 'dir' into 'op'. Reviewed-by: Avri Altman Cc: Martin K. Petersen Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-44-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/ufs/core/ufshpb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c15cbe9a84b05462195102bcead0213eb068c595 Author: Bart Van Assche Date: Thu Jul 14 11:07:08 2022 -0700 scsi/device_handlers: Use the new blk_opf_t type Improve static type checking by using the new blk_opf_t type for variables that represent request flags. Cc: Hannes Reinecke Cc: Martin Wilck Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-43-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/scsi/device_handler/scsi_dh_alua.c | 4 ++-- drivers/scsi/device_handler/scsi_dh_emc.c | 2 +- drivers/scsi/device_handler/scsi_dh_hp_sw.c | 4 ++-- drivers/scsi/device_handler/scsi_dh_rdac.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit 2599cac57a9af4e7ce628e2ef41e92797cba4ae2 Author: Bart Van Assche Date: Thu Jul 14 11:07:07 2022 -0700 scsi/core: Use the new blk_opf_t type Use the new blk_opf_t type for arguments and variables that represent request flags. Use the !! operator in scsi_noretry_cmd() to convert the blk_opf_t type into a boolean. This patch does not change any functionality. Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: John Garry Cc: Mike Christie Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-42-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/scsi/scsi_lib.c | 6 +++--- include/scsi/scsi_device.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 88b32c3cdf5fff7ed5bdaec7493428185cc65b6e Author: Bart Van Assche Date: Thu Jul 14 11:07:06 2022 -0700 scsi/core: Change the return type of scsi_noretry_cmd() into bool This patch prepares for introducing the new blk_opf_t type in the SCSI core. Since the value returned by scsi_noretry_cmd() is only used in boolean expressions, this patch does not change any functionality. Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: John Garry Cc: Mike Christie Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-41-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/scsi/scsi_error.c | 16 ++++++++-------- drivers/scsi/scsi_priv.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) commit ea957547e819a21bd49895c6162f78d542867d39 Author: Bart Van Assche Date: Thu Jul 14 11:07:05 2022 -0700 scsi/core: Improve static type checking Improve static type checking by using the new blk_opf_t type for the combination of a request operation and its flags. Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: John Garry Cc: Mike Christie Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-40-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/scsi/scsi_lib.c | 6 +++--- include/scsi/scsi_cmnd.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit a288000f9fe381a21693832275491b9c802921c4 Author: Bart Van Assche Date: Thu Jul 14 11:07:04 2022 -0700 nvme/target: Use the new blk_opf_t type Improve static type checking by using the new blk_opf_t type for variables that represent a request operation combined with request flags. Rename those variables from 'op' into 'opf'. Cc: Sagi Grimberg Cc: Christoph Hellwig Cc: Chaitanya Kulkarni Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-39-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/nvme/target/io-cmd-bdev.c | 17 +++++++++-------- drivers/nvme/target/zns.c | 6 +++--- 2 files changed, 12 insertions(+), 11 deletions(-) commit f9ed86dc1dc87662145d0327845fde1c6f3db6cd Author: Bart Van Assche Date: Thu Jul 14 11:07:03 2022 -0700 nvme/host: Use the enum req_op and blk_opf_t types Improve static type checking by using the enum req_op type for variables that represent a request operation and the new blk_opf_t type for variables that represent request flags. Reviewed-by: Sagi Grimberg Cc: Christoph Hellwig Cc: Keith Busch Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-38-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/nvme/host/ioctl.c | 4 ++-- drivers/nvme/host/nvme.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit a9010741ce7c9533fa825cc49f0739d4d8ebda48 Author: Bart Van Assche Date: Thu Jul 14 11:07:02 2022 -0700 md/raid5: Use the enum req_op and blk_opf_t types Improve static type checking by using the enum req_op type for variables that represent a request operation and the new blk_opf_t type for variables that represent request flags. Acked-by: Song Liu Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-37-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/md/raid5.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cb1802ff82e1ebbbafd860e5a73c26607d72dcd9 Author: Bart Van Assche Date: Thu Jul 14 11:07:01 2022 -0700 md/raid10: Use the new blk_opf_t type Improve static type checking by using the new blk_opf_t type for variables that represent a request flags. Acked-by: Song Liu Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-36-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/md/raid10.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3c5e514db58fdca10ff5e08a5d2e8a4b077300e4 Author: Bart Van Assche Date: Thu Jul 14 11:07:00 2022 -0700 md/raid1: Use the new blk_opf_t type Improve static type checking by using the new blk_opf_t type for variables that represent request flags. Acked-by: Song Liu Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-35-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/md/raid1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 552eee3b53f661b76e354ab2ba71e2a625cb9722 Author: Bart Van Assche Date: Thu Jul 14 11:06:59 2022 -0700 md/bcache: Combine two prio_io() arguments Improve uniformity in the kernel of handling of request operation and flags by passing these as a single argument. Cc: Coly Li Cc: Mingzhe Zou Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-34-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 9a4fd6a22c64cd7e5555d252ef6c5f2c6dce8ec2 Author: Bart Van Assche Date: Thu Jul 14 11:06:58 2022 -0700 md/bcache: Combine two uuid_io() arguments Improve uniformity in the kernel of handling of request operation and flags by passing these as a single argument. Cc: Coly Li Cc: Mingzhe Zou Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-33-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 4ce4c73f662bdb0ae5bfb058bc7ec6f6829ca078 Author: Bart Van Assche Date: Thu Jul 14 11:06:57 2022 -0700 md/core: Combine two sync_page_io() arguments Improve uniformity in the kernel of handling of request operation and flags by passing these as a single argument. Cc: Song Liu Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-32-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/md/dm-raid.c | 2 +- drivers/md/md-bitmap.c | 2 +- drivers/md/md.c | 10 +++++----- drivers/md/md.h | 3 +-- drivers/md/raid1.c | 8 ++++---- drivers/md/raid10.c | 10 +++++----- drivers/md/raid5-cache.c | 12 ++++++------ drivers/md/raid5-ppl.c | 12 ++++++------ 8 files changed, 29 insertions(+), 30 deletions(-) commit 13a1f650b6ec935834977461b87585f6387257b4 Author: Bart Van Assche Date: Thu Jul 14 11:06:56 2022 -0700 dm/dm-zoned: Use the enum req_op type Improve static type checking by using the enum req_op type for arguments that represent a request operation. Reviewed-by: Damien Le Moal Cc: Alasdair Kergon Cc: Mike Snitzer Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-31-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/md/dm-zoned-metadata.c | 5 +++-- drivers/md/dm-zoned.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit 8a5a7ce8774ce9d2fb52df6ecb0d234cf76811d1 Author: Bart Van Assche Date: Thu Jul 14 11:06:55 2022 -0700 dm/zone: Use the enum req_op type Use the enum req_op type for request operations instead of unsigned int. This patch fixes a sparse warning that has been introduced by making enum req_op __bitwise. Reviewed-by: Damien Le Moal Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-30-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/md/dm-zone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b9901395702c34c3ef0fe63573fcf69192244ea Author: Bart Van Assche Date: Thu Jul 14 11:06:54 2022 -0700 dm-snap: Combine request operation type and flags Pass the request operation and its flags as a single argument to improve kernel code uniformity. Cc: Alasdair Kergon Cc: Mike Snitzer Cc: Mikulas Patocka Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-29-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/md/dm-snap-persistent.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit c1389b33332ee09e8981a21a8abb812d93ca253f Author: Bart Van Assche Date: Thu Jul 14 11:06:53 2022 -0700 dm mirror log: Use the new blk_opf_t type Improve static type checking by using the new blk_opf_t type for a function argument that represents a request operation type. Cc: Alasdair Kergon Cc: Mike Snitzer Cc: Mikulas Patocka Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-28-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/md/dm-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9154a4cb8dc6a1bca4158174fedecf98de7580d Author: Bart Van Assche Date: Thu Jul 14 11:06:52 2022 -0700 dm/dm-integrity: Combine request operation and flags Combine the request operation type and request flags into a single argument. Improve static type checking by using the enum req_op type for variables that represent a request operation and the new blk_opf_t type for variables that represent request flags. Cc: Alasdair Kergon Cc: Mike Snitzer Cc: Eric Biggers Cc: Mikulas Patocka Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-27-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/md/dm-integrity.c | 63 +++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 29 deletions(-) commit eff17e5161feda42c64b1402e86724649927bcde Author: Bart Van Assche Date: Thu Jul 14 11:06:51 2022 -0700 dm/dm-flakey: Use the new blk_opf_t type Use the new blk_opf_t type for structure members that represent request flags. Cc: Alasdair Kergon Cc: Mike Snitzer Cc: Josef Bacik Cc: Mikulas Patocka Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-26-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/md/dm-flakey.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 67a7b9a5b54fa3a1b9e4ab5b9808198680cba082 Author: Bart Van Assche Date: Thu Jul 14 11:06:50 2022 -0700 dm/ebs: Change 'int rw' into 'enum req_op op' Improve static type checking by using type 'enum req_op' instead of 'int'. Make the role of the 'rw' arguments more clear by renaming these into 'op' (operation). This patch does not change any functionality since REQ_OP_READ = READ = 0 and REQ_OP_WRITE = WRITE = 1. Cc: Alasdair Kergon Cc: Mike Snitzer Cc: Heinz Mauelshagen Cc: Mikulas Patocka Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-25-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/md/dm-ebs-target.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit a3282b432f64e9b88632bd380c90157673dce75b Author: Bart Van Assche Date: Thu Jul 14 11:06:49 2022 -0700 dm/core: Combine request operation type and flags Improve kernel code uniformity by combining the request operation type and flags into a single variable. Change 'int rw' into 'enum req_op op' because the name 'op' is what is used in the block layer to hold a request type. Use the blk_opf_t and enum req_op types where appropriate to improve static type checking. Cc: Alasdair Kergon Cc: Mike Snitzer Cc: Mikulas Patocka Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-24-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/md/dm-bufio.c | 19 ++++++++++--------- drivers/md/dm-io.c | 36 +++++++++++++++++------------------- drivers/md/dm.c | 10 +++++----- 3 files changed, 32 insertions(+), 33 deletions(-) commit 71f7113d20ae1083e66ce3301f387362184cdd96 Author: Bart Van Assche Date: Thu Jul 14 11:06:48 2022 -0700 dm/core: Rename kcopyd_job.rw into kcopyd.op The member name 'rw' suggests that this member either has the value 'READ' or 'WRITE' and no other values. Since that member also can have the value REQ_OP_WRITE_ZEROES, rename 'rw' into 'op'. This patch does not change any functionality since REQ_OP_READ = READ = 0 and REQ_OP_WRITE = WRITE = 1. Cc: Alasdair Kergon Cc: Mike Snitzer Cc: Mikulas Patocka Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-23-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/md/dm-kcopyd.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 581075e4f6475bb97c73ecccf68636a9453a31fd Author: Bart Van Assche Date: Thu Jul 14 11:06:47 2022 -0700 dm/core: Reduce the size of struct dm_io_request Combine the bi_op and bi_op_flags into the bi_opf member. Use the new blk_opf_t type to improve static type checking. This patch does not change any functionality. Cc: Alasdair Kergon Cc: Mike Snitzer Cc: Mikulas Patocka Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-22-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/md/dm-bufio.c | 9 +++------ drivers/md/dm-integrity.c | 15 +++++---------- drivers/md/dm-io.c | 10 ++++++---- drivers/md/dm-kcopyd.c | 3 +-- drivers/md/dm-log.c | 6 ++---- drivers/md/dm-raid1.c | 12 +++++------- drivers/md/dm-snap-persistent.c | 3 +-- drivers/md/dm-writecache.c | 12 ++++-------- include/linux/dm-io.h | 4 ++-- 9 files changed, 29 insertions(+), 45 deletions(-) commit 7ee1de6e2712efabe8e6cab8db5238ed13643dc1 Author: Bart Van Assche Date: Thu Jul 14 11:06:46 2022 -0700 um: Use enum req_op where appropriate Improve static type checking by using type enum req_op instead of int where appropriate. Cc: Richard Weinberger Cc: Anton Ivanov Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-21-bvanassche@acm.org Signed-off-by: Jens Axboe arch/um/drivers/ubd_kern.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ba229aa8f2494bb76aa3f0c80e8a6c0023c829d7 Author: Bart Van Assche Date: Thu Jul 14 11:06:45 2022 -0700 nvdimm-btt: Use the enum req_op type Improve static type checking by using the enum req_op type where appropriate. Cc: Dan Williams Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-20-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/nvdimm/btt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc0421ea44b82d2108bcf79e020498c5ff0000af Author: Bart Van Assche Date: Thu Jul 14 11:06:44 2022 -0700 block/zram: Use enum req_op where appropriate Improve static type checking by using the enum req_op type where appropriate. Cc: Minchan Kim Cc: Nitin Gupta Cc: Sergey Senozhatsky Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-19-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/block/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c5412e268340e0d98eade4571658bacb4652176 Author: Bart Van Assche Date: Thu Jul 14 11:06:43 2022 -0700 xen-blkback: Use the enum req_op and blk_opf_t types Improve static type checking by using the enum req_op type for request operations and the new blk_opf_t type for request flags. Acked-by: Roger Pau Monné Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-18-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/block/xen-blkback/blkback.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 03df83ac9eb77f749bfd84c7d448cb2b90c1196c Author: Bart Van Assche Date: Thu Jul 14 11:06:42 2022 -0700 block/rnbd: Use blk_opf_t where appropriate Improve static type checking by using the new blk_opf_t type to represent the combination of a request and request flags. Acked-by: Jack Wang Cc: Md. Haris Iqbal Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-17-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/block/rnbd/rnbd-proto.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 23f8ae7148cc32287364741e32b20f37730114aa Author: Bart Van Assche Date: Thu Jul 14 11:06:41 2022 -0700 block/floppy: Fix a sparse warning Since the type of request.cmd_flags has been changed from u32 into blk_opf_t, use the __force keyword when casting to an integer type to prevent that sparse warns about this cast. Cc: Denis Efremov Cc: Willy Tarreau Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-16-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/block/floppy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86563de87447ad9458fda9d1862c5ba333c8ab2e Author: Bart Van Assche Date: Thu Jul 14 11:06:40 2022 -0700 block/drbd: Combine two drbd_submit_peer_request() arguments Combine the drbd_submit_peer_request() 'op' and 'op_flags' arguments into a single argument. This patch does not change any functionality. Reviewed-by: Christoph Böhmwalder Cc: Lars Ellenberg Cc: Philipp Reisner Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-15-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/block/drbd/drbd_int.h | 3 +-- drivers/block/drbd/drbd_receiver.c | 15 +++++++-------- drivers/block/drbd/drbd_worker.c | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) commit 9945172a7120790fb8832cfec9557773f69e9d74 Author: Bart Van Assche Date: Thu Jul 14 11:06:39 2022 -0700 block/drbd: Use the enum req_op and blk_opf_t types Improve static type checking by using the enum req_op type for variables that represent a request operation and the new blk_opf_t type for variables that represent request flags. Reviewed-by: Christoph Böhmwalder Cc: Lars Ellenberg Cc: Philipp Reisner Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-14-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/block/drbd/drbd_actlog.c | 9 +++++---- drivers/block/drbd/drbd_bitmap.c | 2 +- drivers/block/drbd/drbd_int.h | 6 +++--- drivers/block/drbd/drbd_receiver.c | 11 ++++++----- 4 files changed, 15 insertions(+), 13 deletions(-) commit ba91fd01aad28b2290a00518c4cd6eb728b4f06f Author: Bart Van Assche Date: Thu Jul 14 11:06:38 2022 -0700 block/brd: Use the enum req_op type Improve static type checking by using the enum req_op type for a function argument that represents a request operation. Cc: Christoph Hellwig Cc: Ming Lei Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-13-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/block/brd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 919dbca8670d0f7828dfbb2f9b434ac22dca8d2e Author: Bart Van Assche Date: Thu Jul 14 11:06:37 2022 -0700 blktrace: Use the new blk_opf_t type Improve static type checking by using the new blk_opf_t type for a function argument that represents a combination of a request operation and request flags. Rename that argument from 'op' into 'opf' to make its role more clear. Cc: Christoph Hellwig Cc: Steven Rostedt Cc: Li Zefan Cc: Chaitanya Kulkarni Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-12-bvanassche@acm.org Signed-off-by: Jens Axboe include/linux/blktrace_api.h | 3 ++- kernel/trace/blktrace.c | 51 ++++++++++++++++++++++---------------------- 2 files changed, 27 insertions(+), 27 deletions(-) commit 22c80aac882f712897b88b7ea8f5a74ea19019df Author: Bart Van Assche Date: Thu Jul 14 11:06:36 2022 -0700 blktrace: Trace remapped requests correctly Trace the remapped operation and its flags instead of only the data direction of remapped operations. This issue was detected by analyzing the warnings reported by sparse related to the new blk_opf_t type. Reviewed-by: Jun'ichi Nomura Cc: Mike Snitzer Cc: Mike Christie Cc: Li Zefan Cc: Chaitanya Kulkarni Fixes: 1b9a9ab78b0a ("blktrace: use op accessors") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-11-bvanassche@acm.org Signed-off-by: Jens Axboe kernel/trace/blktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d625fecd8af84ac669075caf1941ff0d1995de56 Author: Bart Van Assche Date: Thu Jul 14 11:06:35 2022 -0700 block/kyber: Use the new blk_opf_t type Use the new blk_opf_t type for arguments that represent a bitwise combination of a request operation and request flags. Rename those arguments from 'op' into 'opf'. This patch does not change any functionality. Cc: Omar Sandoval Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-10-bvanassche@acm.org Signed-off-by: Jens Axboe block/kyber-iosched.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f8359efe4742a39b4ece554ab9d7e5f03c4fff83 Author: Bart Van Assche Date: Thu Jul 14 11:06:34 2022 -0700 block/mq-deadline: Use the new blk_opf_t type Use the new blk_opf_t type for an argument that represents a bitwise combination of a request operation and request flags. Rename that argument from 'op' into 'opf'. This patch does not change any functionality. Cc: Damien Le Moal Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-9-bvanassche@acm.org Signed-off-by: Jens Axboe block/mq-deadline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dc469ba2e790cb0a335e2650b701639752ff65cd Author: Bart Van Assche Date: Thu Jul 14 11:06:33 2022 -0700 block/bfq: Use the new blk_opf_t type Use the new blk_opf_t type for arguments and variables that represent request flags or a bitwise combination of a request operation and request flags. Rename those variables from 'op' into 'opf'. This patch does not change any functionality. Cc: Jan Kara Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-8-bvanassche@acm.org Signed-off-by: Jens Axboe block/bfq-cgroup.c | 26 +++++++++++++------------- block/bfq-iosched.c | 16 ++++++++-------- block/bfq-iosched.h | 8 ++++---- 3 files changed, 25 insertions(+), 25 deletions(-) commit 16458cf3bd15e5624205df6e8a76b9a5363555f3 Author: Bart Van Assche Date: Thu Jul 14 11:06:32 2022 -0700 block: Use the new blk_opf_t type Use the new blk_opf_t type for arguments and variables that represent request flags or a bitwise combination of a request operation and request flags. Rename the function arguments and also a structure member that hold a request operation and flags from 'rw' into 'opf'. This patch does not change any functionality. Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Damien Le Moal Cc: Johannes Thumshirn Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-7-bvanassche@acm.org Signed-off-by: Jens Axboe block/bio.c | 10 +++++----- block/blk-cgroup-rwstat.h | 8 ++++---- block/blk-core.c | 2 +- block/blk-flush.c | 6 +++--- block/blk-merge.c | 6 +++--- block/blk-mq-debugfs.c | 4 ++-- block/blk-mq.c | 15 ++++++++------- block/blk-mq.h | 6 +++--- block/blk-wbt.c | 16 ++++++++-------- block/elevator.h | 2 +- block/fops.c | 12 ++++++------ include/linux/bio.h | 10 +++++----- include/linux/blk-mq.h | 6 +++--- include/linux/blkdev.h | 2 +- 14 files changed, 53 insertions(+), 52 deletions(-) commit 342a72a334073f163da924b69c3d3fb4685eb33a Author: Bart Van Assche Date: Thu Jul 14 11:06:31 2022 -0700 block: Introduce the type blk_opf_t Introduce the type blk_opf_t for the request operation and flags (REQ_OP_* and REQ_*). This type will be used to improve documentation of the block layer code and also to allow sparse to verify whether request flags are used correctly. Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Damien Le Moal Cc: Johannes Thumshirn Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-6-bvanassche@acm.org Signed-off-by: Jens Axboe include/linux/blk_types.h | 97 +++++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 46 deletions(-) commit 2d9b02be73ba8efba406b399a722b4e33614dd0e Author: Bart Van Assche Date: Thu Jul 14 11:06:30 2022 -0700 block: Change the type of req_op() and bio_op() into enum req_op Improve static type checking by changing the type of the value returned by req_op() and bio_op() from unsigned int into enum req_op. Insert 'default: break;' in switch statements on the enum req_op type to prevent that the compiler warns about these switch statements. Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Damien Le Moal Cc: Johannes Thumshirn Cc: Tim Waugh Cc: Alasdair Kergon Cc: Mike Snitzer Cc: Mikulas Patocka Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-5-bvanassche@acm.org Signed-off-by: Jens Axboe block/blk-merge.c | 2 ++ drivers/block/paride/pd.c | 2 ++ drivers/md/dm.c | 2 ++ include/linux/blk-mq.h | 6 ++++-- include/linux/blk_types.h | 6 ++++-- 5 files changed, 14 insertions(+), 4 deletions(-) commit 86947df3a9236481276e8baadde50a403b02b4d4 Author: Bart Van Assche Date: Thu Jul 14 11:06:29 2022 -0700 block: Change the type of the last .rw_page() argument All .rw_page() callers pass an enum req_op value as last argument. Make this explicit by changing the type of the last argument into enum req_op. See also commit 3f289dcb4b26 ("block: make bdev_ops->rw_page() take a REQ_OP instead of bool"). Cc: Tejun Heo Cc: Minchan Kim Cc: Dan Williams Cc: Hannes Reinecke Cc: Damien Le Moal Cc: Johannes Thumshirn Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-4-bvanassche@acm.org Signed-off-by: Jens Axboe drivers/block/brd.c | 2 +- drivers/block/zram/zram_drv.c | 2 +- drivers/nvdimm/btt.c | 2 +- drivers/nvdimm/pmem.c | 2 +- include/linux/blkdev.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 77e7ffd7ad3952909be6a9c599b7d164c8866fec Author: Bart Van Assche Date: Thu Jul 14 11:06:28 2022 -0700 block: Use enum req_op where appropriate Change the type of the arguments that are used to pass a REQ_OP_* value from int or unsigned int into enum req_op to improve static type checking. Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Damien Le Moal Cc: Johannes Thumshirn Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-3-bvanassche@acm.org Signed-off-by: Jens Axboe block/blk-core.c | 6 +++--- block/blk-mq-debugfs.c | 2 +- block/blk-throttle.c | 7 ++++--- block/blk-wbt.c | 2 +- block/blk.h | 2 +- include/linux/blk_types.h | 2 +- include/linux/blkdev.h | 6 +++--- 7 files changed, 14 insertions(+), 13 deletions(-) commit ff07a02e9e8e6489db841e0c48a5c78e7e78d572 Author: Bart Van Assche Date: Thu Jul 14 11:06:27 2022 -0700 treewide: Rename enum req_opf into enum req_op The type name enum req_opf is misleading since it suggests that values of this type include both an operation type and flags. Since values of this type represent an operation only, change the type name into enum req_op. Convert the enum req_op documentation into kernel-doc format. Move a few definitions such that the enum req_op documentation occurs just above the enum req_op definition. The name "req_opf" was introduced by commit ef295ecf090d ("block: better op and flags encoding"). Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Damien Le Moal Cc: Johannes Thumshirn Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-2-bvanassche@acm.org Signed-off-by: Jens Axboe block/blk-zoned.c | 7 +++---- drivers/block/null_blk/main.c | 9 ++++----- drivers/block/null_blk/null_blk.h | 12 +++++------- drivers/block/null_blk/trace.h | 2 +- drivers/block/null_blk/zoned.c | 4 ++-- drivers/md/dm-integrity.c | 2 +- drivers/nvme/target/zns.c | 4 ++-- drivers/scsi/sd_zbc.c | 2 +- drivers/ufs/core/ufshpb.c | 5 ++--- fs/zonefs/super.c | 5 ++--- fs/zonefs/trace.h | 2 +- include/linux/blk_types.h | 16 ++++++++-------- include/linux/blkdev.h | 2 +- 13 files changed, 33 insertions(+), 39 deletions(-) commit 9009f55bc44e4cb6f94e8e3315e85ad5ed69a519 Author: Conor Dooley Date: Fri Jun 17 19:24:25 2022 +0100 riscv: config: enable SOC_STARFIVE in defconfig SOC_STARFIVE is the odd one out among the (compatible) SOC_FOO options as it is not enabled in the default defconfig. Add it to make catching dt regressions etc easier. Signed-off-by: Conor Dooley Acked-by: Emil Renner Berthing Link: https://lore.kernel.org/r/20220617182424.324276-1-mail@conchuod.ie Signed-off-by: Palmer Dabbelt arch/riscv/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit dee449aafd48213e6ba4db74526d30b097fc93cd Author: Huacai Chen Date: Thu Jul 14 20:42:11 2022 +0800 PCI: loongson: Use generic 8/16/32-bit config ops on LS2K/LS7A LS2K/LS7A support 8/16/32-bits PCI config access operations via CFG1, so we can disable CFG0 for them and safely use pci_generic_config_read()/ pci_generic_config_write() instead of pci_generic_config_read32()/pci_ generic_config_write32(). Link: https://lore.kernel.org/r/20220714124216.1489304-3-chenhuacai@loongson.cn Signed-off-by: Huacai Chen Signed-off-by: Bjorn Helgaas Acked-by: Bjorn Helgaas drivers/pci/controller/pci-loongson.c | 65 +++++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 19 deletions(-) commit 40a6cc141b4b9580de140bcb3e893445708acc5d Author: Huacai Chen Date: Thu Jul 14 20:42:10 2022 +0800 PCI/ACPI: Guard ARM64-specific mcfg_quirks Guard ARM64-specific quirks with CONFIG_ARM64 to avoid build errors, since mcfg_quirks will be shared by more than one architectures. Link: https://lore.kernel.org/r/20220714124216.1489304-2-chenhuacai@loongson.cn Signed-off-by: Huacai Chen Signed-off-by: Bjorn Helgaas drivers/acpi/pci_mcfg.c | 3 +++ 1 file changed, 3 insertions(+) commit c524193f1cfb9ac5f2c56effa4a01bf8bdcfaa35 Author: William Breathitt Gray Date: Thu Jul 14 12:07:15 2022 -0400 MAINTAINERS: Update 104-QUAD-8 driver maintainers list Syed Nayyar Waris is no longer available for 104-QUAD-8 driver maintenance. William Breathitt Gray will continue as the 104-QUAD-8 driver maintainer. Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/53ecbe49e48dd142fc19f6436fdbe5b8573c5f9c.1657813472.git.william.gray@linaro.org Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit daae1ee572d1f99daddef26afe6c6fc7aeea741d Author: William Breathitt Gray Date: Thu Jul 14 12:07:14 2022 -0400 counter: 104-quad-8: Implement and utilize register structures Reduce magic numbers and improve code readability by implementing and utilizing named register data structures. Link: https://lore.kernel.org/r/20220707171709.36010-1-william.gray@linaro.org/ Cc: Syed Nayyar Waris Tested-by: Fred Eckert Reviewed-by: Jonathan Cameron Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/285fdc7c03892251f50bdbf2c28c19998243a6a3.1657813472.git.william.gray@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/counter/104-quad-8.c | 166 ++++++++++++++++++++++++------------------- 1 file changed, 93 insertions(+), 73 deletions(-) commit b6e9cded90d46b1066a1ca260d8b5ecf67787aba Author: William Breathitt Gray Date: Thu Jul 14 12:07:13 2022 -0400 counter: 104-quad-8: Utilize iomap interface This driver doesn't need to access I/O ports directly via inb()/outb() and friends. This patch abstracts such access by calling ioport_map() to enable the use of more typical ioread8()/iowrite8() I/O memory accessor calls. Link: https://lore.kernel.org/r/861c003318dce3d2bef4061711643bb04f5ec14f.1652201921.git.william.gray@linaro.org Cc: Syed Nayyar Waris Suggested-by: David Laight Reviewed-by: Linus Walleij Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/e971b897cacfac4cb2eca478f5533d2875f5cadd.1657813472.git.william.gray@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/counter/104-quad-8.c | 169 +++++++++++++++++++++++-------------------- 1 file changed, 89 insertions(+), 80 deletions(-) commit dd4a6bf374744a8bd5ae8d6096efe5c351f2607a Author: William Breathitt Gray Date: Thu Jul 14 12:07:12 2022 -0400 MAINTAINERS: Update info for William Breathitt Gray A new job position bestowed a new email address and Counter subsystem git tree for me. Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/694c2da1a01d1a3065239bf2c060018cb3308c34.1657813472.git.william.gray@linaro.org Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit affac98a604ccf19c2a116a33a13ac8e6a781130 Author: Dmitry Baryshkov Date: Thu Jun 23 15:03:19 2022 -0500 PCI: qcom: Remove unnecessary pipe_clk handling PCIe PHY drivers (both QMP and PCIe2) already do clk_prepare_enable() / clk_prepare_disable() pipe_clk. Remove extra calls to enable/disable this clock from the PCIe driver, so that the PHY driver can manage the clock on its own. [bhelgaas: rebase on Robert Marko's DBI cleanup: https://lore.kernel.org/r/20220623155004.688090-2-robimarko@gmail.com] Link: https://lore.kernel.org/r/20220608105238.2973600-5-dmitry.baryshkov@linaro.org Tested-by: Johan Hovold Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Helgaas Reviewed-by: Bjorn Andersson Reviewed-by: Manivannan Sadhasivam Reviewed-by: Johan Hovold Reviewed-by: Stephen Boyd Acked-by: Stanimir Varbanov drivers/pci/controller/dwc/pcie-qcom.c | 37 +++------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) commit 95ff0363f3f6ae70c21a0f2b0603e54438e5988b Author: Darrick J. Wong Date: Thu Jul 14 09:22:53 2022 -0700 xfs: fix use-after-free in xattr node block inactivation The kernel build robot reported a UAF error while running xfs/433 (edited somewhat for brevity): BUG: KASAN: use-after-free in xfs_attr3_node_inactive (fs/xfs/xfs_attr_inactive.c:214) xfs Read of size 4 at addr ffff88820ac2bd44 by task kworker/0:2/139 CPU: 0 PID: 139 Comm: kworker/0:2 Tainted: G S 5.19.0-rc2-00004-g7cf2b0f9611b #1 Hardware name: Hewlett-Packard p6-1451cx/2ADA, BIOS 8.15 02/05/2013 Workqueue: xfs-inodegc/sdb4 xfs_inodegc_worker [xfs] Call Trace: dump_stack_lvl (lib/dump_stack.c:107 (discriminator 1)) print_address_description+0x1f/0x200 print_report.cold (mm/kasan/report.c:430) kasan_report (mm/kasan/report.c:162 mm/kasan/report.c:493) xfs_attr3_node_inactive (fs/xfs/xfs_attr_inactive.c:214) xfs xfs_attr3_root_inactive (fs/xfs/xfs_attr_inactive.c:296) xfs xfs_attr_inactive (fs/xfs/xfs_attr_inactive.c:371) xfs xfs_inactive (fs/xfs/xfs_inode.c:1781) xfs xfs_inodegc_worker (fs/xfs/xfs_icache.c:1837 fs/xfs/xfs_icache.c:1860) xfs process_one_work worker_thread kthread ret_from_fork Allocated by task 139: kasan_save_stack (mm/kasan/common.c:39) __kasan_slab_alloc (mm/kasan/common.c:45 mm/kasan/common.c:436 mm/kasan/common.c:469) kmem_cache_alloc (mm/slab.h:750 mm/slub.c:3214 mm/slub.c:3222 mm/slub.c:3229 mm/slub.c:3239) _xfs_buf_alloc (include/linux/instrumented.h:86 include/linux/atomic/atomic-instrumented.h:41 fs/xfs/xfs_buf.c:232) xfs xfs_buf_get_map (fs/xfs/xfs_buf.c:660) xfs xfs_buf_read_map (fs/xfs/xfs_buf.c:777) xfs xfs_trans_read_buf_map (fs/xfs/xfs_trans_buf.c:289) xfs xfs_da_read_buf (fs/xfs/libxfs/xfs_da_btree.c:2652) xfs xfs_da3_node_read (fs/xfs/libxfs/xfs_da_btree.c:392) xfs xfs_attr3_root_inactive (fs/xfs/xfs_attr_inactive.c:272) xfs xfs_attr_inactive (fs/xfs/xfs_attr_inactive.c:371) xfs xfs_inactive (fs/xfs/xfs_inode.c:1781) xfs xfs_inodegc_worker (fs/xfs/xfs_icache.c:1837 fs/xfs/xfs_icache.c:1860) xfs process_one_work worker_thread kthread ret_from_fork Freed by task 139: kasan_save_stack (mm/kasan/common.c:39) kasan_set_track (mm/kasan/common.c:45) kasan_set_free_info (mm/kasan/generic.c:372) __kasan_slab_free (mm/kasan/common.c:368 mm/kasan/common.c:328 mm/kasan/common.c:374) kmem_cache_free (mm/slub.c:1753 mm/slub.c:3507 mm/slub.c:3524) xfs_buf_rele (fs/xfs/xfs_buf.c:1040) xfs xfs_attr3_node_inactive (fs/xfs/xfs_attr_inactive.c:210) xfs xfs_attr3_root_inactive (fs/xfs/xfs_attr_inactive.c:296) xfs xfs_attr_inactive (fs/xfs/xfs_attr_inactive.c:371) xfs xfs_inactive (fs/xfs/xfs_inode.c:1781) xfs xfs_inodegc_worker (fs/xfs/xfs_icache.c:1837 fs/xfs/xfs_icache.c:1860) xfs process_one_work worker_thread kthread ret_from_fork I reproduced this for my own satisfaction, and got the same report, along with an extra morsel: The buggy address belongs to the object at ffff88802103a800 which belongs to the cache xfs_buf of size 432 The buggy address is located 396 bytes inside of 432-byte region [ffff88802103a800, ffff88802103a9b0) I tracked this code down to: error = xfs_trans_get_buf(*trans, mp->m_ddev_targp, child_blkno, XFS_FSB_TO_BB(mp, mp->m_attr_geo->fsbcount), 0, &child_bp); if (error) return error; error = bp->b_error; That doesn't look right -- I think this should be dereferencing child_bp, not bp. Looking through the codebase history, I think this was added by commit 2911edb653b9 ("xfs: remove the mappedbno argument to xfs_da_get_buf"), which replaced a call to xfs_da_get_buf with the current call to xfs_trans_get_buf. Not sure why we trans_brelse'd @bp earlier in the function, but I'm guessing it's to avoid pinning too many buffers in memory while we inactivate the bottom of the attr tree. Hence we now have to get the buffer back. I /think/ this was supposed to check child_bp->b_error and fail the rest of the invalidation if child_bp had experienced any kind of IO or corruption error. I bet the xfs_da3_node_read earlier in the loop will catch most cases of incoming on-disk corruption which makes this check mostly moot unless someone corrupts the buffer and the AIL pushes it out to disk while the buffer's unlocked. In the first case we'll never get to the bad check, and in the second case the AIL will shut down the log, at which point there's no reason to check b_error. Remove the check, and null out @bp to avoid this problem in the future. Cc: hch@lst.de Reported-by: kernel test robot Fixes: 2911edb653b9 ("xfs: remove the mappedbno argument to xfs_da_get_buf") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig fs/xfs/xfs_attr_inactive.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 6d200bdc017a420b23f70d15090e32ac87428dd5 Merge: 35c5a09f5346 c01147d92989 Author: Darrick J. Wong Date: Thu Jul 14 09:46:37 2022 -0700 Merge tag 'make-attr-fork-permanent-5.20_2022-07-14' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-5.20-mergeB xfs: make attr forks permanent This series fixes a use-after-free bug that syzbot uncovered. The UAF itself is a result of a race condition between getxattr and removexattr because callers to getxattr do not necessarily take any sort of locks before calling into the filesystem. Although the race condition itself can be fixed through clever use of a memory barrier, further consideration of the use cases of extended attributes shows that most files always have at least one attribute, so we might as well make them permanent. v2: Minor tweaks suggested by Dave, and convert some more macros to helper functions. Signed-off-by: Darrick J. Wong * tag 'make-attr-fork-permanent-5.20_2022-07-14' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: replace inode fork size macros with functions xfs: replace XFS_IFORK_Q with a proper predicate function xfs: use XFS_IFORK_Q to determine the presence of an xattr fork xfs: make inode attribute forks a permanent part of struct xfs_inode xfs: convert XFS_IFORK_PTR to a static inline helper commit 94681e289bf5d10c9db9db143d1a22d8717205c5 Author: David Gow Date: Wed Jul 13 07:25:27 2022 +0800 kunit: executor: Fix a memory leak on failure in kunit_filter_tests It's possible that memory allocation for 'filtered' will fail, but for the copy of the suite to succeed. In this case, the copy could be leaked. Properly free 'copy' in the error case for the allocation of 'filtered' failing. Note that there may also have been a similar issue in kunit_filter_subsuites, before it was removed in "kunit: flatten kunit_suite*** to kunit_suite** in .kunit_test_suites". This was reported by clang-analyzer via the kernel test robot, here: https://lore.kernel.org/all/c8073b8e-7b9e-0830-4177-87c12f16349c@intel.com/ And by smatch via Dan Carpenter and the kernel test robot: https://lore.kernel.org/all/202207101328.ASjx88yj-lkp@intel.com/ Fixes: a02353f49162 ("kunit: bail out of test filtering logic quicker if OOM") Reported-by: kernel test robot Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Daniel Latypov Reviewed-by: Brendan Higgins Signed-off-by: David Gow Signed-off-by: Shuah Khan lib/kunit/executor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f84a9e9658337e5a8407819971c79fd97bb7d408 Author: Daniel Latypov Date: Mon Jul 11 16:27:13 2022 +0000 clk: explicitly disable CONFIG_UML_PCI_OVER_VIRTIO in .kunitconfig CONFIG_UML_PCI_OVER_VIRTIO=y is needed to enable CONFIG_PCI=y on UML. However, this causes test failures when running the clk tests, i.e. $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/clk A snippet of the particular error is: > ok 1 - clk_gate_test_parent_rate > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 45 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0 This is triggered by this cast in the test: 143 ctx->fake_mem = (void __force __iomem *)&ctx->fake_reg; this seems to work except when logic iomem is enabled, i.e. CONFIG_INDIRECT_IOMEM=y. As a short-term fix, explicitly disable CONFIG_UML_PCI_OVER_VIRTIO in drivers/clk/.kunitconfig so we can enable it for everyone else by default in kunit.py. The long-term fix probably requires something more complicated, like #ifdef CONFIG_INDIRECT_IOMEM logic_iomem_add_region(...); #endif Signed-off-by: Daniel Latypov Reported-by: Maxime Ripard Tested-by: Maxime Ripard Acked-by: Stephen Boyd Reviewed-by: David Gow Acked-by: Brendan Higgins Signed-off-by: Shuah Khan drivers/clk/.kunitconfig | 1 + 1 file changed, 1 insertion(+) commit 900d156bac2bc474cf7c7bee4efbc6c83ec5ae58 Author: Christoph Hellwig Date: Wed Jul 13 07:53:17 2022 +0200 block: remove bdevname Replace the remaining calls of bdevname with snprintf using the %pg format specifier. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220713055317.1888500-10-hch@lst.de Signed-off-by: Jens Axboe block/genhd.c | 23 ----------------------- drivers/md/md.c | 2 +- drivers/md/raid1.c | 2 +- drivers/md/raid10.c | 2 +- fs/ext4/mmp.c | 3 ++- fs/jbd2/journal.c | 6 ++++-- include/linux/blkdev.h | 1 - kernel/trace/blktrace.c | 4 ++-- 8 files changed, 11 insertions(+), 32 deletions(-) commit c5b045b9838972cc4c4985a32fa5d35ecf2ab15a Author: Christoph Hellwig Date: Wed Jul 13 07:53:16 2022 +0200 ext4: only initialize mmp_bdevname once mmp_bdevname is currently both initialized nested inside the kthread_run call in ext4_multi_mount_protect and in the kmmpd thread started by it. Lift the initiaization out of the kthread_run call in ext4_multi_mount_protect, move the BUILD_BUG_ON next to it and remove the duplicate assignment inside of kmmpd. Signed-off-by: Christoph Hellwig Acked-by: Theodore Ts'o Reviewed-by: Jan Kara Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220713055317.1888500-9-hch@lst.de Signed-off-by: Jens Axboe fs/ext4/mmp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4664954c9421ce326bb5c84f175902b03f17237e Author: Christoph Hellwig Date: Wed Jul 13 07:53:15 2022 +0200 ocfs2/cluster: remove the hr_dev_name field from struct o2hb_region Just print the block device name directly using the %pg format specifier. Signed-off-by: Christoph Hellwig Reviewed-by: Joel Becker Reviewed-by: Jan Kara Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220713055317.1888500-8-hch@lst.de Signed-off-by: Jens Axboe fs/ocfs2/cluster/heartbeat.c | 64 +++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 34 deletions(-) commit 6e880cf59932a14bca128fc8e8faae0554932942 Author: Christoph Hellwig Date: Wed Jul 13 07:53:14 2022 +0200 rnbd-srv: remove the name field from struct rnbd_dev Just print the block device name directly using the %pg format specifier. Signed-off-by: Christoph Hellwig Acked-by: Jack Wang Reviewed-by: Jan Kara Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220713055317.1888500-7-hch@lst.de Signed-off-by: Jens Axboe drivers/block/rnbd/rnbd-srv-dev.c | 1 - drivers/block/rnbd/rnbd-srv-dev.h | 1 - drivers/block/rnbd/rnbd-srv-sysfs.c | 5 ++--- drivers/block/rnbd/rnbd-srv.c | 9 ++++----- drivers/block/rnbd/rnbd-srv.h | 3 +-- 5 files changed, 7 insertions(+), 12 deletions(-) commit beecf70ee84363e92f3bf783b74da5f26e765d8d Author: Christoph Hellwig Date: Wed Jul 13 07:53:13 2022 +0200 pktcdvd: stop using bdevname in pkt_new_dev Just use the %pg format specifier instead. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220713055317.1888500-6-hch@lst.de Signed-off-by: Jens Axboe drivers/block/pktcdvd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit fa070a3b50a17506a230e72bd48dba89e7bb5fea Author: Christoph Hellwig Date: Wed Jul 13 07:53:12 2022 +0200 pktcdvd: stop using bdevname in pkt_seq_show Just use the %pg format specifier instead. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220713055317.1888500-5-hch@lst.de Signed-off-by: Jens Axboe drivers/block/pktcdvd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1b70ccecaed4c3c50239e8409156fb447f965554 Author: Christoph Hellwig Date: Wed Jul 13 07:53:11 2022 +0200 drbd: stop using bdevname in drbd_report_io_error Just use the %pg format specifier instead. Signed-off-by: Christoph Hellwig Reviewed-by: Christoph Böhmwalder Reviewed-by: Jan Kara Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220713055317.1888500-4-hch@lst.de Signed-off-by: Jens Axboe drivers/block/drbd/drbd_req.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 02ff3dd20f512cf811ae8028c44fdb212b5f2bf7 Author: Christoph Hellwig Date: Wed Jul 13 07:53:10 2022 +0200 block: stop using bdevname in __blkdev_issue_discard Just use the %pg format specifier instead. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220713055317.1888500-3-hch@lst.de Signed-off-by: Jens Axboe block/blk-lib.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 5bf83e9a14ddae994d783dee96b91bf46f04839c Author: Christoph Hellwig Date: Wed Jul 13 07:53:09 2022 +0200 block: stop using bdevname in bdev_write_inode Just use the %pg format specifier instead. Also reformat the printk statement to be more readable. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220713055317.1888500-2-hch@lst.de Signed-off-by: Jens Axboe block/bdev.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit b1f8b0cfe397a0b2c6e66b08ad8e4a218f7adffc Merge: 4ea087841733 b4aed01de486 Author: Arnd Bergmann Date: Thu Jul 14 18:27:22 2022 +0200 Merge tag 'davinci-boards-delete-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio into arm/soc Delete the two DaVinci board families DM644x and DM646x. The reason why I'm pushing for this is that I have floated patches to update the board files to use GPIO descriptors, iterated and fixed bugs in the patches reported by reviewers and build robots, and then the patches have not been merged. See: v6: https://lore.kernel.org/linux-arm-kernel/20201103000158.325147-1-linus.walleij@linaro.org/ https://lore.kernel.org/linux-arm-kernel/20210715191141.430307-3-linus.walleij@linaro.org/ v7: https://lore.kernel.org/linux-arm-kernel/20220507124536.171930-1-linus.walleij@linaro.org/ https://lore.kernel.org/linux-arm-kernel/20220507124536.171930-2-linus.walleij@linaro.org/ I assume this is not getting merged because of lack of interest in the platform, and such things happen. To save myself and others from spending work hours on maintaining and modernizing a platform that is not used, delete the board files. * tag 'davinci-boards-delete-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: ARM: davinci: Delete DM646x board files ARM: davinci: Delete DM644x board files Signed-off-by: Arnd Bergmann commit 8031d87aa9953ddeb047a5356ebd0b240c30f233 Author: Sean Christopherson Date: Tue Jul 12 11:46:53 2022 -0700 KVM: x86: Check target, not vCPU's x2APIC ID, when applying hotplug hack When applying the hotplug hack to match x2APIC IDs for vCPUs in xAPIC mode, check the target APID ID for being unaddressable in xAPIC mode instead of checking the vCPU's x2APIC ID, and in that case proceed as if apic_x2apic_mode(vcpu) were true. Functionally, it does not matter whether you compare kvm_x2apic_id(apic) or mda with 0xff, since the two values are then checked for equality. But in isolation, checking the x2APIC ID takes an unnecessary dependency on the x2APIC ID being read-only (which isn't strictly true on AMD CPUs, and is difficult to document as well); it also requires KVM to fallthrough and check the xAPIC ID as well to deal with a writable xAPIC ID, whereas the xAPIC ID _can't_ match a target ID greater than 0xff. Opportunistically reword the comment to call out the various subtleties, and to fix a typo reported by Zhang Jiaming. No functional change intended. Cc: Zhang Jiaming Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 35c5a09f5346e690df7ff2c9075853e340ee10b3 Merge: 4613b17cc478 298f34224506 Author: Darrick J. Wong Date: Thu Jul 14 09:22:14 2022 -0700 Merge tag 'xfs-buf-lockless-lookup-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs into xfs-5.20-mergeB xfs: lockless buffer cache lookups Current work to merge the XFS inode life cycle with the VFS inode life cycle is finding some interesting issues. If we have a path that hits buffer trylocks fairly hard (e.g. a non-blocking background inode freeing function), we end up hitting massive contention on the buffer cache hash locks: - 92.71% 0.05% [kernel] [k] xfs_inodegc_worker - 92.67% xfs_inodegc_worker - 92.13% xfs_inode_unlink - 91.52% xfs_inactive_ifree - 85.63% xfs_read_agi - 85.61% xfs_trans_read_buf_map - 85.59% xfs_buf_read_map - xfs_buf_get_map - 85.55% xfs_buf_find - 72.87% _raw_spin_lock - do_raw_spin_lock 71.86% __pv_queued_spin_lock_slowpath - 8.74% xfs_buf_rele - 7.88% _raw_spin_lock - 7.88% do_raw_spin_lock 7.63% __pv_queued_spin_lock_slowpath - 1.70% xfs_buf_trylock - 1.68% down_trylock - 1.41% _raw_spin_lock_irqsave - 1.39% do_raw_spin_lock __pv_queued_spin_lock_slowpath - 0.76% _raw_spin_unlock 0.75% do_raw_spin_unlock This is basically hammering the pag->pag_buf_lock from lots of CPUs doing trylocks at the same time. Most of the buffer trylock operations ultimately fail after we've done the lookup, so we're really hammering the buf hash lock whilst making no progress. We can also see significant spinlock traffic on the same lock just under normal operation when lots of tasks are accessing metadata from the same AG, so let's avoid all this by creating a lookup fast path which leverages the rhashtable's ability to do RCU protected lookups. Signed-off-by: Dave Chinner Signed-off-by: Darrick J. Wong * tag 'xfs-buf-lockless-lookup-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: xfs: lockless buffer lookup xfs: remove a superflous hash lookup when inserting new buffers xfs: reduce the number of atomic when locking a buffer after lookup xfs: merge xfs_buf_find() and xfs_buf_get_map() xfs: break up xfs_buf_find() into individual pieces xfs: rework xfs_buf_incore() API commit 4613b17cc4789d6061041f9bd424180251fb6228 Merge: 0f38063d7a38 784eb7d8dd41 Author: Darrick J. Wong Date: Thu Jul 14 09:21:42 2022 -0700 Merge tag 'xfs-iunlink-item-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs into xfs-5.20-mergeB xfs: introduce in-memory inode unlink log items To facilitate future improvements in inode logging and improving inode cluster buffer locking order consistency, we need a new mechanism for defering inode cluster buffer modifications during unlinked list modifications. The unlinked inode list buffer locking is complex. The unlinked list is unordered - we add to the tail, remove from where-ever the inode is in the list. Hence we might need to lock two inode buffers here (previous inode in list and the one being removed). While we can order the locking of these buffers correctly within the confines of the unlinked list, there may be other inodes that need buffer locking in the same transaction. e.g. O_TMPFILE being linked into a directory also modifies the directory inode. Hence we need a mechanism for defering unlinked inode list updates until a point where we know that all modifications have been made and all that remains is to lock and modify the cluster buffers. We can do this by first observing that we serialise unlinked list modifications by holding the AGI buffer lock. IOWs, the AGI is going to be locked until the transaction commits any time we modify the unlinked list. Hence it doesn't matter when in the unlink transactions that we actually load, lock and modify the inode cluster buffer. We add an in-memory unlinked inode log item to defer the inode cluster buffer update to transaction commit time where it can be ordered with all the other inode cluster operations that need to be done. Essentially all we need to do is record the inodes that need to have their unlinked list pointer updated in a new log item that we attached to the transaction. This log item exists purely for the purpose of delaying the update of the unlinked list pointer until the inode cluster buffer can be locked in the correct order around the other inode cluster buffers. It plays no part in the actual commit, and there's no change to anything that is written to the log. i.e. the inode cluster buffers still have to be fully logged here (not just ordered) as log recovery depedends on this to replay mods to the unlinked inode list. Hence if we add a "precommit" hook into xfs_trans_commit() to run a "precommit" operation on these iunlink log items, we can delay the locking, modification and logging of the inode cluster buffer until after all other modifications have been made. The precommit hook reuires us to sort the items that are going to be run so that we can lock precommit items in the correct order as we perform the modifications they describe. To make this unlinked inode list processing simpler and easier to implement as a log item, we need to change the way we track the unlinked list in memory. Starting from the observation that an inode on the unlinked list is pinned in memory by the VFS, we can use the xfs_inode itself to track the unlinked list. To do this efficiently, we want the unlinked list to be a double linked list. The problem here is that we need a list per AGI unlinked list, and there are 64 of these per AGI. The approach taken in this patchset is to shadow the AGI unlinked list heads in the perag, and link inodes by agino, hence requiring only 8 extra bytes per inode to track this state. We can then use the agino pointers for lockless inode cache lookups to retreive the inode. The aginos in the inode are modified only under the AGI lock, just like the cluster buffer pointers, so we don't need any extra locking here. The i_next_unlinked field tracks the on-disk value of the unlinked list, and the i_prev_unlinked is a purely in-memory pointer that enables us to efficiently remove inodes from the middle of the list. This results in moving a lot of the unlink modification work into the precommit operations on the unlink log item. Tracking all the unlinked inodes in the inodes themselves also gets rid of the unlinked list reference hash table that is used to track this back pointer relationship. This greatly simplifies the the unlinked list modification code, and removes memory allocations in this hot path to track back pointers. This, overall, slightly reduces the CPU overhead of the unlink path. The result of this log item means that we move all the actual manipulation of objects to be logged out of the iunlink path and into the iunlink item. This allows for future optimisation of this mechanism without needing changes to high level unlink path, as well as making the unlink lock ordering predictable and synchronised with other operations that may require inode cluster locking. Signed-off-by: Dave Chinner Signed-off-by: Darrick J. Wong * tag 'xfs-iunlink-item-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: xfs: add in-memory iunlink log item xfs: add log item precommit operation xfs: combine iunlink inode update functions xfs: clean up xfs_iunlink_update_inode() xfs: double link the unlinked inode list xfs: introduce xfs_iunlink_lookup xfs: refactor xlog_recover_process_iunlinks() xfs: track the iunlink list pointer in the xfs_inode xfs: factor the xfs_iunlink functions xfs: flush inode gc workqueue before clearing agi bucket commit fbccc4f5c2b190ef2cedf27baa4303ed9b1a1755 Merge: ba28401bb93e 99482726452b Author: Paolo Bonzini Date: Thu Jul 14 10:04:12 2022 -0400 Merge commit 'kvm-vmx-nested-tsc-fix' into kvm-next-5.20 Merge bugfix needed in both 5.19 (because it's bad) and 5.20 (because it is a prerequisite to test new features). commit ba28401bb93e5c779d5762c4eb0eb665493e5dd4 Author: Sean Christopherson Date: Thu Jul 14 15:37:07 2022 +0000 KVM: x86: Restrict get_mt_mask() to a u8, use KVM_X86_OP_OPTIONAL_RET0 Restrict get_mt_mask() to a u8 and reintroduce using a RET0 static_call for the SVM implementation. EPT stores the memtype information in the lower 8 bits (bits 6:3 to be precise), and even returns a shifted u8 without an explicit cast to a larger type; there's no need to return a full u64. Note, RET0 doesn't play nice with a u64 return on 32-bit kernels, see commit bf07be36cd88 ("KVM: x86: do not use KVM_X86_OP_OPTIONAL_RET0 for get_mt_mask"). Signed-off-by: Sean Christopherson Message-Id: <20220714153707.3239119-1-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm-x86-ops.h | 2 +- arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/svm/svm.c | 6 ------ arch/x86/kvm/vmx/vmx.c | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-) commit 7fb72b7bf167a8047204d30e0e8affe6023363d9 Merge: ef30911d3c39 1e347f861da8 Author: Mark Brown Date: Thu Jul 14 16:42:29 2022 +0100 ASoC: Merge up revert of v5.19 version of the rockchip BCLK management Needed for further development. commit 92c336e7ae2eb9e20c91738b0af9fdbeccb9d9e8 Merge: 3476ccbd0ae6 eab6bb0994b8 Author: Arnd Bergmann Date: Thu Jul 14 17:40:50 2022 +0200 Merge tag 'arm-soc/for-5.20/devicetree-arm64' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM64-based SocS Device Tree updates for 5.20, please pull the following: - William adds the ARCH_BCMBCA Kconfig entry to follow the ARM 32-bit counter part and adds basic support for these DSL/PON SoCs: 63158, 4912, 63146, 6856, 6813 - Anand adds basic support for the 6858 SoC - Krzysztof fixes a missing space between a property name and its value in a number of DTS files * tag 'arm-soc/for-5.20/devicetree-arm64' of https://github.com/Broadcom/stblinux: arm64: dts: Add DTS files for bcmbca SoC BCM6813 arm64: dts: Add DTS files for bcmbca SoC BCM6856 arm64: dts: Add DTS files for bcmbca SoC BCM63146 arm64: dts: broadcom: adjust whitespace around '=' ARM64: dts: Add DTS files for bcmbca SoC BCM6858 arm64: dts: Add DTS files for bcmbca SoC BCM4912 arm64: dts: Add DTS files for bcmbca SoC BCM63158 arm64: bcmbca: add arch bcmbca machine entry Link: https://lore.kernel.org/r/20220711164451.3542127-5-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 3476ccbd0ae6325ef9a31e1a8c17073ef708e185 Merge: e0a592505566 daf7c850caab Author: Arnd Bergmann Date: Thu Jul 14 17:40:13 2022 +0200 Merge tag 'arm-soc/for-5.20/devicetree' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM-based SoCs Device Tree updates for 5.20, please pull the following: - Stefan drops the unnecessary "#address-cells" and "#size-cells" properties from the DPI node of BCM283x - Anand documents and adds support for the 63178 and 6858 SoCs - William migrates the 63138 platform over to ARCH_BCMBCA and ensures that it is documented within the BCMBCA Device Tree binding documents. He updates the 47622 DTS to remove unnecessary PSCI properties, fix the GIC nodes and some minor cosmetic changes. He finally adds support for the 63158, 4912, 6846, 6855, 6756, 63146, 6856, 63148, 6813, 6318 SoCs. - Peter, Nicolas and Stefan adds the necessary Device Tree nodes to the BCM2711 (Raspberry Pi 4) DTS to enable the use of the V3D GPU on these platforms. - Christian adds support for the BCM53015 based Cisco Meraki MR26 Wi-Fi access point. - Krzysztof updates the Broadcom platforms DTS to add a missing whitespace between the property name and its value. * tag 'arm-soc/for-5.20/devicetree' of https://github.com/Broadcom/stblinux: (35 commits) ARM: dts: Add BCM63138 generic board dts ARM: dts: update dts files for bcmbca SoC BCM63138 ARM: dts: Move BCM963138DVT board dts to ARCH_BCMBCA dt-bindings: arm: add BCM63138 SoC ARM: dts: bcm2711: Use proper compatible in PM/Watchdog node ARM: dts: bcm2835/bcm2711: Introduce reg-names in watchdog node dt-bindings: soc: bcm: bcm2835-pm: Add support for bcm2711 dt-bindings: soc: bcm: bcm2835-pm: Introduce reg-names dt-bindings: soc: bcm: bcm2835-pm: Convert bindings to DT schema ARM: dts: BCM5301X: Add DT for Meraki MR26 dt-bindings: ARM: add bindings for the Meraki MR26 dt-bindings: arm64: Add BCM6813 SoC ARM: dts: Add DTS files for bcmbca SoC BCM63148 dt-bindings: arm: Add BCM63148 SoC dt-bindings: arm64: Add BCM6856 SoC dt-bindings: arm64: Add BCM63146 SoC ARM: dts: broadcom: correct gpio-keys properties ARM: dts: broadcom: align gpio-key node names with dtschema ARM: dts: Add DTS files for bcmbca SoC BCM6756 dt-bindings: arm: Add BCM6756 SoC ... Link: https://lore.kernel.org/r/20220711164451.3542127-4-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 277ad7d58611b455662f2e3f7bd24ce5bfeb2fdc Author: Sean Christopherson Date: Tue Jul 12 02:06:45 2022 +0200 KVM: x86: Add dedicated helper to get CPUID entry with significant index Add a second CPUID helper, kvm_find_cpuid_entry_index(), to handle KVM queries for CPUID leaves whose index _may_ be significant, and drop the index param from the existing kvm_find_cpuid_entry(). Add a WARN in the inner helper, cpuid_entry2_find(), to detect attempts to retrieve a CPUID entry whose index is significant without explicitly providing an index. Using an explicit magic number and letting callers omit the index avoids confusion by eliminating the myriad cases where KVM specifies '0' as a dummy value. Suggested-by: Paolo Bonzini Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 80 +++++++++++++++++++++++++++++++++----------- arch/x86/kvm/cpuid.h | 16 +++++---- arch/x86/kvm/hyperv.c | 8 ++--- arch/x86/kvm/svm/svm.c | 2 +- arch/x86/kvm/vmx/pmu_intel.c | 4 +-- arch/x86/kvm/vmx/sgx.c | 8 ++--- arch/x86/kvm/vmx/vmx.c | 6 ++-- arch/x86/kvm/x86.c | 2 +- 8 files changed, 84 insertions(+), 42 deletions(-) commit bdc2d7ad10724de31463a0cdbd88b0ad7353a6de Author: Maxim Levitsky Date: Thu Jul 14 15:44:53 2022 +0300 KVM: SVM: fix task switch emulation on INTn instruction. Recently KVM's SVM code switched to re-injecting software interrupt events, if something prevented their delivery. Task switch due to task gate in the IDT, however is an exception to this rule, because in this case, INTn instruction causes a task switch intercept and its emulation completes the INTn emulation as well. Add a missing case to task_switch_interception for that. This fixes 32 bit kvm unit test taskswitch2. Fixes: 7e5b5ef8dca322 ("KVM: SVM: Re-inject INTn instead of retrying the insn on "failure"") Signed-off-by: Maxim Levitsky Reviewed-by: Maciej S. Szmigiero Message-Id: <20220714124453.188655-1-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/svm.c | 1 + 1 file changed, 1 insertion(+) commit dfd4eb444e5cef4387605d1eef1866ceea0544ce Author: Sean Christopherson Date: Tue Jul 12 02:07:24 2022 +0000 KVM: x86/mmu: Fix typo and tweak comment for split_desc_cache capacity Remove a spurious closing paranthesis and tweak the comment about the cache capacity for PTE descriptors (rmaps) eager page splitting to tone down the assertion slightly, and to call out that topup requires dropping mmu_lock, which is the real motivation for avoiding topup (as opposed to memory usage). Cc: David Matlack Signed-off-by: Sean Christopherson Message-Id: <20220712020724.1262121-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 39944ab99c2f9cc54272b9b871e3e759ebaa960b Author: Sean Christopherson Date: Tue Jul 12 02:07:23 2022 +0000 KVM: x86/mmu: Expand quadrant comment for PG_LEVEL_4K shadow pages Tweak the comment above the computation of the quadrant for PG_LEVEL_4K shadow pages to explicitly call out how and why KVM uses role.quadrant to consume gPTE bits. Opportunistically wrap an unnecessarily long line. No functional change intended. Link: https://lore.kernel.org/all/YqvWvBv27fYzOFdE@google.com Reviewed-by: David Matlack Signed-off-by: Sean Christopherson Message-Id: <20220712020724.1262121-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 79e48cec6cba4eee0bd3a13f31320e33a1729931 Author: Sean Christopherson Date: Tue Jul 12 02:07:22 2022 +0000 KVM: x86/mmu: Add optimized helper to retrieve an SPTE's index Add spte_index() to dedup all the code that calculates a SPTE's index into its parent's page table and/or spt array. Opportunistically tweak the calculation to avoid pointer arithmetic, which is subtle (subtract in 8-byte chunks) and less performant (requires the compiler to generate the subtraction). Suggested-by: David Matlack Reviewed-by: David Matlack Signed-off-by: Sean Christopherson Message-Id: <20220712020724.1262121-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 22 ++++++++++------------ arch/x86/kvm/mmu/paging_tmpl.h | 4 ++-- arch/x86/kvm/mmu/spte.h | 6 ++++++ 3 files changed, 18 insertions(+), 14 deletions(-) commit e0a592505566c82d60a2010d0976b8ae0a831fcc Merge: 8c1e9736c5bd abf61f7e66c1 Author: Arnd Bergmann Date: Thu Jul 14 17:02:04 2022 +0200 Merge tag 'qcom-arm64-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm ARM64 DTS updates for v5.20 This introduces initial support for Lenovo ThinkPad X13s, Qualcomm 8cx Gen 3 Compute Reference Device, SA8295P Automotive Development Platform, Xiaomi Mi 5s Plus, five new SC7180 Chrome OS boards, Inforce IFC6560, LG G7 ThinQ and LG V35 ThinQ. With IPQ8074 gaining GDSC support, this was expressed in the gcc node and defined for the USB nodes. The SDHCI reset line was defined to get the storage devices into a known state. For MSM8996 interconnect providers, the second DSI interface, resets for SDHCI are introduced. Support for the Xiaomi Mi 5s Plus is introduced and the Dragonboard 820c gains definitions for its LEDs. The MSM8998 platform changes consists of a various cleanup patches, the FxTec Pro1 is split out from using the MTP dts and Sony Xperia devices on the "Yoshino" platform gains ToF sensor. On SC7180 five new Trogdor based boards are added and the description of keyboard and detachables is improved. On the SC7280-based Herobrine board DisplayPort is enabled, SPI flash clock rate is changed, WiFi is enabled and the modem firmware path is updated. The Villager boards gains touchscreen, and keyboard backlight. This introduces initial support for the SC8280XP (aka 8cx Gen 3) and related automotive platforms are introduced, with support for the Qualcomm reference board, the Lenovo Thinkpad X13s and the SA8295P Automotive Development Platform. In addition to a wide range of smaller fixes on the SDM630 and SDM660 platforms, support for the secondary high speed USB controller is introduced and the Sony Xperia "Nile" platform gains support for the RGB status LED. Support for the Inforce IFC6560 board is introduced. On SDM845 the bandwidth monitor for the CPU subsystem is introduced, to scale LLCC clock rate based on profiling. CPU and cluster idle states are switched to OSI hierarchical states. DB845c and SHIFT 6mq gains LED support and new support for the LG G7 ThinQ and LG V35 ThinQ boards are added. DLL/DDR configuration for SDHCI nodes are defined for SM6125. On SM8250 the GPU per-process page tables is enabled and for RB5 the Light Pulse Generator-based LEDs are added. The display clock controller is introduced for SM8350. On SM8450 this introduces the camera clock controller and the UART typically used for Bluetooth. The interconnect path for the crypto engine is added to the SCM node, to ensure this is adequately clocked. The assigned-clock-rate for the display processor is dropped from several platforms, now that the driver derrives the min and max from the clock. In addition to this a wide range of fixes for stylistic issues and issues discovered through Devicetree binding validation across many platforms and boards are introduced. * tag 'qcom-arm64-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (193 commits) arm64: dts: qcom: sc8280xp: fix DP PHY node unit addresses arm64: dts: qcom: sc8280xp: fix usb_0 HS PHY ref clock arm64: dts: qcom: sc7280: fix PCIe clock reference docs: arm: index.rst: add google/chromebook-boot-flow arm64: dts: qcom: msm8996: clean up PCIe PHY node arm64: dts: qcom: msm8996: use non-empty ranges for PCIe PHYs arm64: dts: qcom: sm8450: drop UFS PHY clock-cells arm64: dts: qcom: sm8250: drop UFS PHY clock-cells arm64: dts: qcom: sc8280xp: drop UFS PHY clock-cells arm64: dts: qcom: sm8450: drop USB PHY clock index arm64: dts: qcom: sm8350: drop USB PHY clock index arm64: dts: qcom: msm8998: drop USB PHY clock index arm64: dts: qcom: ipq8074: drop USB PHY clock index arm64: dts: qcom: ipq6018: drop USB PHY clock index arm64: dts: qcom: sm8250: add missing PCIe PHY clock-cells arm64: dts: qcom: sc7280: drop PCIe PHY clock index Revert "arm64: dts: qcom: Fix 'reg-names' for sdhci nodes" arm64: dts: qcom: sc7180-idp: add vdds supply to the DSI PHY arm64: dts: qcom: sc7280: use constants for gpucc clocks and power-domains arm64: dts: qcom: msm8996: add missing DSI clock assignments ... Link: https://lore.kernel.org/r/20220713203939.1431054-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit 33f32e5072b6cc84d1b130a3ad485849bcec907a Author: Nathan Chancellor Date: Wed Jul 13 10:35:03 2022 -0700 bpf, arm64: Mark dummy_tramp as global When building with clang + CONFIG_CFI_CLANG=y, the following error occurs at link time: ld.lld: error: undefined symbol: dummy_tramp dummy_tramp is declared globally in C but its definition in inline assembly does not use .global, which prevents clang from properly resolving the references to it when creating the CFI jump tables. Mark dummy_tramp as global so that the reference can be properly resolved. Fixes: b2ad54e1533e ("bpf, arm64: Implement bpf_arch_text_poke() for arm64") Suggested-by: Sami Tolvanen Signed-off-by: Nathan Chancellor Signed-off-by: Daniel Borkmann Reviewed-by: Stanislav Fomichev Link: https://github.com/ClangBuiltLinux/linux/issues/1661 Link: https://lore.kernel.org/bpf/20220713173503.3889486-1-nathan@kernel.org arch/arm64/net/bpf_jit_comp.c | 1 + 1 file changed, 1 insertion(+) commit 7935e899b35c93faa26e1d272a51b3d9cb39f23f Author: Ang Tien Sung Date: Mon Jul 11 17:31:40 2022 -0500 firmware: stratix10-svc: To support a command ATF Get Version We are to support a new SMC Command of hexadecimal 0x200 that returns the ATF Firmware major and minor version. Signed-off-by: Ang Tien Sung Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20220711223140.2307945-6-dinguyen@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/firmware/stratix10-svc.c | 10 ++++++++++ include/linux/firmware/intel/stratix10-smc.h | 18 ++++++++++++++++++ include/linux/firmware/intel/stratix10-svc-client.h | 5 +++++ 3 files changed, 33 insertions(+) commit 1b4394c5d731593063f53df9d72467335c3b0367 Author: Kah Jing Lee Date: Mon Jul 11 17:31:39 2022 -0500 firmware: stratix10-svc: extend svc to support RSU feature Extend Intel Stratix10 service layer driver to support new RSU DCMF status reporting. The status of each DCMF is reported. The currently used DCMF is used as reference, while the other three are compared against it to determine if they are corrupted. DCMF = Decision Configuration Management Firmware RSU = Remote System Update Signed-off-by: Radu Bacrau Signed-off-by: Ang Tien Sung Signed-off-by: Kah Jing Lee Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20220711223140.2307945-5-dinguyen@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/firmware/stratix10-svc.c | 20 ++++++++++++-------- include/linux/firmware/intel/stratix10-smc.h | 21 +++++++++++++++++++++ include/linux/firmware/intel/stratix10-svc-client.h | 4 ++++ 3 files changed, 37 insertions(+), 8 deletions(-) commit 4a6c8c565db1d07c6edf05e015159ed9d11d184e Author: Kah Jing Lee Date: Mon Jul 11 17:31:38 2022 -0500 firmware: stratix10-rsu: extend RSU driver to get DCMF status Extend RSU driver to get DCMF status. The status of each DCMF is reported. The currently used DCMF is used as reference, while the other three are compared against it to determine if they are corrupted. DCMF = Decision Configuration Management Firmware. RSU = Remote System Update Signed-off-by: Radu Bacrau Signed-off-by: Kah Jing Lee Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20220711223140.2307945-4-dinguyen@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/firmware/stratix10-rsu.c | 129 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 124 insertions(+), 5 deletions(-) commit 4a4709d470e624e65a879b5c430dee5e27e9ac83 Author: Ang Tien Sung Date: Mon Jul 11 17:31:37 2022 -0500 firmware: stratix10-svc: add new FCS commands Extending the fpga svc driver to support 6 new FPGA Crypto Service(FCS) commands. We are adding FCS SDOS data encryption and decryption, random number generator, image validation request, reading the data provision and certificate validation. Signed-off-by: Ang Tien Sung Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20220711223140.2307945-3-dinguyen@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/firmware/stratix10-svc.c | 105 +++++++++++++++++-- include/linux/firmware/intel/stratix10-smc.h | 111 +++++++++++++++++++++ .../linux/firmware/intel/stratix10-svc-client.h | 41 +++++++- 3 files changed, 245 insertions(+), 12 deletions(-) commit 79b936254aa0eb4e3bc73fecaacf049145613c0a Author: Ang Tien Sung Date: Mon Jul 11 17:31:36 2022 -0500 firmware: stratix10-svc: add FCS polling command Introduce a new SMC command INTEL_SIP_SMC_FUNCID_SERVICE_COMPLETED that polls if a previous asynchronous command was completed. This SMC command is used by the new FPGA Crypto Service (FCS). A basic example is that the FCS sends an AES data encryption call to the secure device manager(SDM) and waits for the completion of the operation by continuously polling the results with the new command. Signed-off-by: Ang Tien Sung Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20220711223140.2307945-2-dinguyen@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/firmware/stratix10-svc.c | 42 +++++++++++++++++++--- include/linux/firmware/intel/stratix10-smc.h | 25 +++++++++++++ .../linux/firmware/intel/stratix10-svc-client.h | 5 +++ 3 files changed, 67 insertions(+), 5 deletions(-) commit e6281c26674e037798bf674f26a7593a324cdf39 Author: Ang Tien Sung Date: Mon Jul 11 17:31:35 2022 -0500 firmware: stratix10-svc: Add support for FCS Extend Intel service layer driver to support FPGA Crypto service(FCS) features on Intel Soc platforms. Adding an additional channel and FCS platform driver ("intel_fcs") as part of the probe method. FCS driver uses the driver to send crypto operations' commands to the secure device manager(SDM) on Intel Soc platforms Stratix10 and Agilex. Signed-off-by: Ang Tien Sung Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20220711223140.2307945-1-dinguyen@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/firmware/stratix10-svc.c | 30 ++++++++++++++++++---- .../linux/firmware/intel/stratix10-svc-client.h | 1 + 2 files changed, 26 insertions(+), 5 deletions(-) commit 6c93c6f3bad468ce4b8c843227d60fbeb02fd741 Author: Sebastian Ene Date: Mon Jul 11 08:17:20 2022 +0000 misc: Add a mechanism to detect stalls on guest vCPUs This driver creates per-cpu hrtimers which are required to do the periodic 'pet' operation. On a conventional watchdog-core driver, the userspace is responsible for delivering the 'pet' events by writing to the particular /dev/watchdogN node. In this case we require a strong thread affinity to be able to account for lost time on a per vCPU. This part of the driver is the 'frontend' which is reponsible for delivering the periodic 'pet' events, configuring the virtual peripheral and listening for cpu hotplug events. The other part of the driver is an emulated MMIO device which is part of the KVM virtual machine monitor and this part accounts for lost time by looking at the /proc/{}/task/{}/stat entries. Reviewed-by: Guenter Roeck Reviewed-by: Will Deacon Signed-off-by: Sebastian Ene Link: https://lore.kernel.org/r/20220711081720.2870509-3-sebastianene@google.com Signed-off-by: Greg Kroah-Hartman drivers/misc/Kconfig | 13 +++ drivers/misc/Makefile | 1 + drivers/misc/vcpu_stall_detector.c | 223 +++++++++++++++++++++++++++++++++++++ 3 files changed, 237 insertions(+) commit 952ae488b9492b40ea18b5de101afce69b965336 Author: Sebastian Ene Date: Mon Jul 11 08:17:19 2022 +0000 dt-bindings: vcpu_stall_detector: Add qemu,vcpu-stall-detector compatible The VCPU stall detection mechanism allows to configure the expiration duration and the internal counter clock frequency measured in Hz. Add these properties in the schema. While this is a memory mapped virtual device, it is expected to be loaded when the DT contains the compatible: "qemu,vcpu-stall-detector" node. In a protected VM we trust the generated DT nodes and we don't rely on the host to present the hardware peripherals. Reviewed-by: Rob Herring Signed-off-by: Sebastian Ene Link: https://lore.kernel.org/r/20220711081720.2870509-2-sebastianene@google.com Signed-off-by: Greg Kroah-Hartman .../bindings/misc/qemu,vcpu-stall-detector.yaml | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 3a15b45b5454da862376b5d69a4967f5c6fa1368 Author: Christophe JAILLET Date: Mon Jul 11 21:14:48 2022 +0200 cxl: Fix a memory leak in an error handling path A bitmap_zalloc() must be balanced by a corresponding bitmap_free() in the error handling path of afu_allocate_irqs(). Acked-by: Andrew Donnellan Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/ce5869418f5838187946eb6b11a52715a93ece3d.1657566849.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman drivers/misc/cxl/irq.c | 1 + 1 file changed, 1 insertion(+) commit 4b00b176b3a3bcd4679487c23d333be02e533d93 Author: Christophe JAILLET Date: Mon Jul 11 21:14:38 2022 +0200 cxl: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Acked-by: Andrew Donnellan Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/59010cc7c62443030c69cb1ce0b2b62c5d47e064.1657566849.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman drivers/misc/cxl/context.c | 2 +- drivers/misc/cxl/guest.c | 2 +- drivers/misc/cxl/irq.c | 3 +-- drivers/misc/cxl/of.c | 5 ++--- 4 files changed, 5 insertions(+), 7 deletions(-) commit d618072d86fcc391b77ca0a1909b5f0bb8423f6e Author: Justin Stitt Date: Fri Jul 8 13:35:49 2022 -0700 mei: me: fix clang -Wformat warning When building with Clang we encounter the following warning: | drivers/misc/mei/hw-me.c:564:44: error: format specifies type 'unsigned | short' but the argument has type 'int' [-Werror,-Wformat] | dev_dbg(dev->dev, "empty slots = %hu.\n", empty_slots); The format specifier used is `%hu` which specifies an unsigned short, however, empty_slots is an int -- hence the warning. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Tested-by: Nick Desaulniers Reviewed-by: Nick Desaulniers Signed-off-by: Justin Stitt Link: https://lore.kernel.org/r/20220708203549.3834790-1-justinstitt@google.com Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/hw-me.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71d46f1ff2212ced4852c7e77c5176382a1bdcec Author: Dan Carpenter Date: Fri Jul 8 16:46:38 2022 +0300 eeprom: idt_89hpesx: uninitialized data in idt_dbgfs_csr_write() The simple_write_to_buffer() function will return positive/success if it is able to write a single byte anywhere within the buffer. However that potentially leaves a lot of the buffer uninitialized. In this code it's better to return 0 if the offset is non-zero. This code is not written to support partial writes. And then return -EFAULT if the buffer is not completely initialized. Fixes: cfad6425382e ("eeprom: Add IDT 89HPESx EEPROM/CSR driver") Reviewed-by: Serge Semin Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Ysg1Pu/nzSMe3r1q@kili Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/idt_89hpesx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4a4e8f7f625b48c79ec9f3b5c219a09a6c71fd83 Author: Florian Fainelli Date: Tue Jul 12 11:54:19 2022 -0700 MAINTAINERS: Change mentions of mpm to olivia Following this mercurial changeset: https://www.mercurial-scm.org/repo/hg-stable/rev/d4ba4d51f85f update the MAINTAINERS entry to replace the now obsolete identity. Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20220712185419.45487-1-f.fainelli@gmail.com Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9f9c909095610b1fc11f0784cfa591c756f1cdc0 Author: Lee Jones Date: Thu Jul 14 12:25:30 2022 +0100 docs: ABI: sysfs-devices-soc: Update Lee Jones' email address Going forward, I'll be using my kernel.org for upstream work. Cc: Greg Kroah-Hartman Cc: Mauro Carvalho Chehab Signed-off-by: Lee Jones Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220714112533.539910-6-lee@kernel.org Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-devices-soc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 80dd7ae16bea69a055d14b81e43317207de70f83 Author: Lee Jones Date: Thu Jul 14 12:25:29 2022 +0100 docs: ABI: sysfs-class-pwm: Update Lee Jones' email address Going forward, I'll be using my kernel.org for upstream work. Cc: Greg Kroah-Hartman Cc: Mauro Carvalho Chehab Signed-off-by: Lee Jones Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220714112533.539910-5-lee@kernel.org Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-class-pwm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5095ca634f8b134cc202a5f5e4985d2b81f0ef0a Author: Lino Sanfilippo Date: Sun Jul 10 18:44:42 2022 +0200 serial: 8250: lpc18xx: Remove redundant sanity check for RS485 flags Before the drivers rs485_config() function is called the serial core already ensures that only one of both options RTS on send or RTS after send is set. So remove the concerning sanity check in the driver function to avoid redundancy. Reviewed-by: Ilpo Järvinen Signed-off-by: Lino Sanfilippo Link: https://lore.kernel.org/r/20220710164442.2958979-9-LinoSanfilippo@gmx.de Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_lpc18xx.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c64e17584ba78552b51a27374b54686259826360 Author: Lino Sanfilippo Date: Sun Jul 10 18:44:41 2022 +0200 serial: 8250_dwlib: remove redundant sanity check for RS485 flags Before the drivers rs485_config() function is called the serial core already ensures that only one of both options RTS on send or RTS after send is set. So remove the concerning sanity check in the driver function to avoid redundancy. Reviewed-by: Ilpo Järvinen Signed-off-by: Lino Sanfilippo Link: https://lore.kernel.org/r/20220710164442.2958979-8-LinoSanfilippo@gmx.de Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dwlib.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 885dcb08c93d75b784468e65fd4f1f82d5313061 Author: Lino Sanfilippo Date: Sun Jul 10 18:44:40 2022 +0200 dt_bindings: rs485: Correct delay values Currently the documentation claims that a maximum of 1000 msecs is allowed for RTS delays. However nothing actually checks the values read from device tree/ACPI and so it is possible to set much higher values. There is already a maximum of 100 ms enforced for RTS delays that are set via the UART TIOCSRS485 ioctl. To be consistent with that use the same limit for DT/ACPI values. Although this change is visible to userspace the risk of breaking anything when reducing the max delays from 1000 to 100 ms should be very low, since 100 ms is already a very high maximum for delays that are usually rather in the usecs range. Acked-by: Rob Herring Signed-off-by: Lino Sanfilippo Link: https://lore.kernel.org/r/20220710164442.2958979-7-LinoSanfilippo@gmx.de Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/rs485.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4dfd10351e49a767f145fb0f6bf7f408f54ab94b Author: Lino Sanfilippo Date: Sun Jul 10 18:44:39 2022 +0200 serial: core: sanitize RS485 delays read from device tree Currently the RTS delays set via device tree are not clamped to a maximum value although the device tree bindings documentation for RS485 claims that only a maximum of 1000 msecs is allowed. So clamp the values to avoid arbitrary high delay settings. However clamp the values to 100 instead of 1000 msecs to be consistent which the maximum that is allowed when setting the delays from userspace via the UART ioctl TIOCSRS485. Signed-off-by: Lino Sanfilippo Link: https://lore.kernel.org/r/20220710164442.2958979-6-LinoSanfilippo@gmx.de Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 2 ++ 1 file changed, 2 insertions(+) commit d8fcd9cfbde5acd42a407d8b48fa80ad9d513bde Author: Lino Sanfilippo Date: Sun Jul 10 18:44:38 2022 +0200 serial: core: move sanitizing of RS485 delays into own function Move the sanitizing of RS485 delays out of uart_sanitize_serial_rs485() into the new function uart_sanitize_serial_rs485_delays(). Reviewed-by: Ilpo Järvinen Signed-off-by: Lino Sanfilippo Link: https://lore.kernel.org/r/20220710164442.2958979-5-LinoSanfilippo@gmx.de Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 46 +++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 20 deletions(-) commit 44b27aec9d9680875a1a250bc8bcefc234a37c9f Author: Lino Sanfilippo Date: Sun Jul 10 18:44:37 2022 +0200 serial: core, 8250: set RS485 termination GPIO in serial core In serial8250_em485_config() the termination GPIO is set with the uart_port spinlock held. This is an issue if setting the GPIO line can sleep (e.g. since the concerning GPIO expander is connected via SPI or I2C). Fix this by setting the termination line outside of the uart_port spinlock in the serial core and using gpiod_set_value_cansleep() which instead of gpiod_set_value() allows it to sleep. Beside fixing the termination GPIO line setting for the 8250 driver this change also makes setting the termination GPIO generic for all UART drivers. Signed-off-by: Lino Sanfilippo Link: https://lore.kernel.org/r/20220710164442.2958979-4-LinoSanfilippo@gmx.de Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 3 --- drivers/tty/serial/serial_core.c | 12 ++++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) commit 184842622c97da2f88f365a981af05432baa5385 Author: Lino Sanfilippo Date: Sun Jul 10 18:44:36 2022 +0200 serial: ar933x: Remove superfluous code in ar933x_config_rs485() In ar933x_config_rs485() the check for the RTS GPIO is not needed since in case the GPIO is not available at driver init ar933x_no_rs485 is assigned to port->rs485_supported and this function is never called. So remove the check. Also in uart_set_rs485_config() the serial core already assigns the passed serial_rs485 struct to the uart port. So remove the assignment in the drivers rs485_config() function to avoid redundancy. Signed-off-by: Lino Sanfilippo Link: https://lore.kernel.org/r/20220710164442.2958979-3-LinoSanfilippo@gmx.de Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/ar933x_uart.c | 9 --------- 1 file changed, 9 deletions(-) commit 996fd3cf9c0f37d17867ccc26f8b746169463fcd Author: Lino Sanfilippo Date: Sun Jul 10 18:44:35 2022 +0200 serial: ar933x: Fix check for RS485 support RS485 is not possible without an RTS GPIO regardless of whether RS485 is enabled at boot time or not. So correct the concerning check in the probe() function. Fixes: e849145e1fdd ("serial: ar933x: Fill in rs485_supported") Signed-off-by: Lino Sanfilippo Link: https://lore.kernel.org/r/20220710164442.2958979-2-LinoSanfilippo@gmx.de Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/ar933x_uart.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 3182efd036c1b955403d131258234896cbd9fbeb Author: Doug Berger Date: Wed Jul 13 20:13:15 2022 -0700 serial: 8250_bcm7271: Save/restore RTS in suspend/resume Commit 9cabe26e65a8 ("serial: 8250_bcm7271: UART errors after resuming from S2") prevented an early enabling of RTS during resume, but it did not actively restore the RTS state after resume. Fixes: 9cabe26e65a8 ("serial: 8250_bcm7271: UART errors after resuming from S2") Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20220714031316.404918-1-f.fainelli@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_bcm7271.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 4f4e670342b14f302e17c93bd22fc943bbaaf1de Author: VAMSHI GAJJELA Date: Wed Jul 13 18:47:22 2022 +0530 serial: 8250_dw: Avoid pslverr on reading empty receiver fifo With PSLVERR_RESP_EN parameter set to 1, the device generates an error response when an attempt to read an empty RBR with FIFO enabled. This happens when LCR writes are ignored when UART is busy. dw8250_check_lcr() in retries to update LCR, invokes dw8250_force_idle() to clear and reset FIFO and eventually reads UART_RX causing the error. Avoid this by not reading RBR/UART_RX when no data is available. Reviewed-by: Andy Shevchenko Signed-off-by: VAMSHI GAJJELA Link: https://lore.kernel.org/r/20220713131722.2316829-1-vamshigajjela@google.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 1d46c08d246e2e0a2d81985727392a5a8348d06a Author: Marek Szyprowski Date: Tue Jul 12 16:07:45 2022 +0200 tty: serial: samsung_tty: fix s3c24xx_serial_set_mctrl() S3C2410_UCON is a 32bit register, so it must be read with rd_regl() instead of rd_reg(), otherwise the upper bits will be zeroed. Fix this. Fixes: 72a43046b61a ("tty: serial: samsung_tty: loopback mode support") Tested-by: Chanho Park Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanho Park Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20220712140745.30362-1-m.szyprowski@samsung.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/samsung_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 806a449725cbd679a7f52c394d3c87b451d66bd5 Author: Geert Uytterhoeven Date: Mon Jul 11 10:42:52 2022 +0200 serial: 8250: SERIAL_8250_ASPEED_VUART should depend on ARCH_ASPEED The Aspeed Virtual UART is only present on Aspeed BMC platforms. Hence add a dependency on ARCH_ASPEED, to prevent asking the user about this driver when configuring a kernel without Aspeed BMC support. Reviewed-by: Jeremy Kerr Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/259138c372d433005b4871789ef9ee8d15320307.1657528861.git.geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ef5a03a26c87a760bc3d86b5af7b773e82f8b1b7 Author: Cameron Williams Date: Mon Jul 11 16:35:10 2022 +0100 tty: 8250: Add support for Brainboxes PX cards. Add support for some of the Brainboxes PCIe (PX) range of serial cards, including the PX-101, PX-235/PX-246, PX-203/PX-257, PX-260/PX-701, PX-310, PX-313, PX-320/PX-324/PX-376/PX-387, PX-335/PX-346, PX-368, PX-420, PX-803 and PX-846. Signed-off-by: Cameron Williams Cc: stable Link: https://lore.kernel.org/r/AM5PR0202MB2564669252BDC59BF55A6E87C4879@AM5PR0202MB2564.eurprd02.prod.outlook.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pci.c | 109 +++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) commit f31a8702cd36f7908bdc3fa1ed7f95b56c10ed35 Author: Prashant Malani Date: Mon Jul 11 07:22:56 2022 +0000 usb: typec: Add retimer handle to port Similar to mux and orientation switch, add a handle for registered retimer to the port, so that it has handles to the various switches connected to it. Signed-off-by: Prashant Malani Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20220711072333.2064341-3-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/class.c | 9 +++++++++ drivers/usb/typec/class.h | 1 + 2 files changed, 10 insertions(+) commit ddaf8d96f93bccb3f2b1f4f156c098b272440004 Author: Prashant Malani Date: Mon Jul 11 07:22:55 2022 +0000 usb: typec: Add support for retimers Introduce a retimer device class and associated functions that register and use retimer "switch" devices. These operate in a manner similar to the "mode-switch" and help configure retimers that exist between the Type-C connector and host controller(s). Type C ports can be linked to retimers using firmware node device references (again, in a manner similar to "mode-switch"). There are no new sysfs files being created; there is the new retimer class directory, but there are no class-specific files being created there. Signed-off-by: Prashant Malani Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20220711072333.2064341-2-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/Makefile | 2 +- drivers/usb/typec/class.c | 9 +- drivers/usb/typec/class.h | 1 + drivers/usb/typec/retimer.c | 168 ++++++++++++++++++++++++++++++++++++++ drivers/usb/typec/retimer.h | 15 ++++ include/linux/usb/typec_retimer.h | 45 ++++++++++ 6 files changed, 238 insertions(+), 2 deletions(-) commit 69bb3520db7cecbccc9e497fc568fa5465c9d43f Author: Johan Hovold Date: Wed Jul 13 15:13:36 2022 +0200 usb: dwc3: qcom: fix missing optional irq warnings Not all platforms have all of the four currently supported wakeup interrupts so use the optional irq helpers when looking up interrupts to avoid printing error messages when an optional interrupt is not found: dwc3-qcom a6f8800.usb: error -ENXIO: IRQ hs_phy_irq not found Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver") Reviewed-by: Andrew Halaney Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220713131340.29401-4-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/dwc3-qcom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dd566faebe9f27659f2ec0135219f399bc6a2ec9 Author: Johan Hovold Date: Wed Jul 13 15:13:35 2022 +0200 dt-bindings: usb: qcom,dwc3: refine interrupt requirements Not all platforms have all of the four wakeup interrupts currently described by the bindings. Specifically, MSM8953/6/8 and SDM660 do not use the DP/DM interrupts, while the SS PHY interrupt is optional on SDM660 and SC7280. Note that no devicetree in mainline specify any wakeup interrupts for - qcom,ipq4019-dwc3 - qcom,ipq6018-dwc3 - qcom,ipq8064-dwc3 - qcom,ipq8074-dwc3 - qcom,msm8994-dwc3 - qcom,qcs404-dwc3 but let's keep the schema warnings about that for now. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220713131340.29401-3-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/usb/qcom,dwc3.yaml | 60 ++++++++++++++++++++-- 1 file changed, 55 insertions(+), 5 deletions(-) commit a5c7592366af3db61171007d103876c457cd5796 Author: Johan Hovold Date: Wed Jul 13 15:13:34 2022 +0200 dt-bindings: usb: qcom,dwc3: add SC8280XP binding Add SC8280XP to the DT schema. Note that the SC8280XP controllers use the common set of five clocks and an additional set of four interconnect clocks whose purpose is not entirely clear at this point. The set of wakeup interrupts is also different for SC8280XP. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220713131340.29401-2-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/usb/qcom,dwc3.yaml | 102 ++++++++++++++++++--- 1 file changed, 88 insertions(+), 14 deletions(-) commit fe6d8a9c8e6456f8e7ba6b4ee528460beaf65a71 Author: Xin Ji Date: Thu Jul 14 16:13:50 2022 +0800 usb: typec: anx7411: Add Analogix PD ANX7411 support Add driver for analogix ANX7411 USB Type-C DRP port controller. Acked-by: Heikki Krogerus Signed-off-by: Xin Ji Link: https://lore.kernel.org/r/20220714081350.36447-2-xji@analogixsemi.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/Kconfig | 11 + drivers/usb/typec/Makefile | 1 + drivers/usb/typec/anx7411.c | 1596 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1608 insertions(+) commit 4af37191134dfce0f3525ad863e70586a48e6ab2 Author: Xin Ji Date: Thu Jul 14 16:13:49 2022 +0800 dt-bindings: usb: Add analogix anx7411 PD binding Add analogix PD chip anx7411 device binding Reviewed-by: Rob Herring Acked-by: Krzysztof Kozlowski Signed-off-by: Xin Ji Link: https://lore.kernel.org/r/20220714081350.36447-1-xji@analogixsemi.com Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/usb/analogix,anx7411.yaml | 81 ++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit 07903626d98853e605fe63e5ce149f1b7314bbea Author: Rohith Kollalsi Date: Thu Jul 14 10:26:25 2022 +0530 usb: dwc3: core: Do not perform GCTL_CORE_SOFTRESET during bootup According to the programming guide, it is recommended to perform a GCTL_CORE_SOFTRESET only when switching the mode from device to host or host to device. However, it is found that during bootup when __dwc3_set_mode() is called for the first time, GCTL_CORESOFTRESET is done with suspendable bit(BIT 17) of DWC3_GUSB3PIPECTL set. This some times leads to issues like controller going into bad state and controller registers reading value zero. Until GCTL_CORESOFTRESET is done and run/stop bit is set core initialization is not complete. Setting suspendable bit of DWC3_GUSB3PIPECTL and then performing GCTL_CORESOFTRESET is therefore not recommended. Avoid this by only performing the reset if current_dr_role is set, that is, when doing subsequent role switching. Fixes: f88359e1588b ("usb: dwc3: core: Do core softreset when switch mode") Signed-off-by: Rohith Kollalsi Link: https://lore.kernel.org/r/20220714045625.20377-1-quic_rkollals@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 220fafb4ed04187e9c17be4152da5a7f2ffbdd8c Author: Liang He Date: Wed Jul 13 20:05:28 2022 +0800 usb: aspeed-vhub: Fix refcount leak bug in ast_vhub_init_desc() We should call of_node_put() for the reference returned by of_get_child_by_name() which has increased the refcount. Fixes: 30d2617fd7ed ("usb: gadget: aspeed: allow to set usb strings in device tree") Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220713120528.368168-1-windhl@126.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/aspeed-vhub/hub.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit efa2bebf2a9fde638644d6fb0fb776345ac6fcc1 Author: Jiangshan Yi Date: Wed Jul 13 15:02:05 2022 +0800 usb: ldusb: replace ternary operator with max_t() Fix the following coccicheck warning: drivers/usb/misc/ldusb.c:719: WARNING opportunity for max(). drivers/usb/misc/ldusb.c:721: WARNING opportunity for max(). max_t() macro is defined in include/linux/minmax.h. It avoids multiple evaluations of the arguments when non-constant and performs strict type-checking. Signed-off-by: Jiangshan Yi Link: https://lore.kernel.org/r/20220713070205.3047256-1-13667453960@163.com Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/ldusb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5e76ee96be8f7bbf9416a5edddc8c064e7e7c6ac Author: Wesley Cheng Date: Mon Jul 11 18:44:03 2022 -0700 usb: dwc3: ep0: Properly handle setup_packet_pending scenario in data stage During a 3 stage SETUP transfer, if the host sends another SETUP token before completing the status phase, it signifies that the host has aborted the current control transfer. Currently, if a setup_packet_pending is received, there are no subsequent calls to dwc3_ep0_out_start() to fetch the new SETUP packet. This leads to a stall on EP0, as host does not expect another STATUS phase as it has aborted the current transfer. Fix this issue by explicitly stalling and restarting EP0, as well as resetting the trb_enqueue indexes. (without this, there is a chance the SETUP TRB is set up on trb_endqueue == 1) Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/20220712014403.2977-1-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/ep0.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 2d937c64e8bf3d9b11b1d62d37fbe97b3cd5dc8d Author: Matthias Kaehlcke Date: Mon Jul 11 09:25:05 2022 -0700 usb: misc: onboard_hub: Fix 'missing prototype' warning When building with 'W=1' the compiler complains about missing prototypes for onboard_hub_create/destroy_pdevs(). Include the header with the prototypes to fix this. Reported-by: kernel test robot Reviewed-by: Douglas Anderson Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20220711092431.1.I4016c759fd7fe2b32dd482994a20661f36e2cae3@changeid Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/onboard_usb_hub_pdevs.c | 1 + 1 file changed, 1 insertion(+) commit aae7948d564c614c26eb896eb8be57879146240c Author: Nícolas F. R. A. Prado Date: Fri Jul 8 15:26:05 2022 -0400 Revert "dt-bindings: usb: mtk-xhci: Make all clocks required" This reverts commit ebc4969ae125e65fdb563f66f4bfa7aec95f7eb4. That commit was supposed to make the binding better reflect the MediaTek XHCI hardware block by requiring all clocks to be present. But doing that also causes too much noise in the devicetrees, since it requires updating old MediaTek DTs to add clock handles for the fixed clocks, and going forward every new clock added to the binding would require even more updates. The commit also didn't update the example to match the changes, causing additional warnings. Instead let's keep the clocks optional so that old devicetrees can keep omitting the fixed clocks, and we'll just add the clocks as required on new DTs. Fixes: ebc4969ae125 ("dt-bindings: usb: mtk-xhci: Make all clocks required") Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Chunfeng Yun Acked-by: Rob Herring Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220708192605.43351-1-nfraprado@collabora.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 421c8d9a20da92deed2dac227e7ebdee7eb3e88f Author: Maxim Devaev Date: Mon Jul 11 13:29:57 2022 +0300 usb: gadget: f_mass_storage: forced_eject attribute It allows to reset prevent_medium_removal flag and "eject" the image. This can be useful to free the drive from a hunging host or if the host continues to use the drive even after unmounting (Linux does this). It's also a bit like using an unfolded paperclip on an optical drive. Previously, the undocumented method of sending SIGUSR1 to a special "file-storage" kernel thread could be used for these purposes, but when using multiple storages there was no way to distinguish one from the other, so we had to send a signal to everyone. Reviewed-by: Alan Stern Signed-off-by: Maxim Devaev Link: https://lore.kernel.org/r/20220711102956.19642-1-mdevaev@gmail.com Signed-off-by: Greg Kroah-Hartman .../ABI/testing/configfs-usb-gadget-mass-storage | 6 ++++++ Documentation/usb/gadget-testing.rst | 6 ++++++ Documentation/usb/mass-storage.rst | 9 ++++++++ drivers/usb/gadget/function/f_mass_storage.c | 25 ++++++++++++++++++++++ drivers/usb/gadget/function/storage_common.c | 15 +++++++++++++ drivers/usb/gadget/function/storage_common.h | 2 ++ 6 files changed, 63 insertions(+) commit 8097cf2fb3b2205257f1c76f4808e3398d66b6d9 Author: Randy Dunlap Date: Fri Jul 8 18:36:01 2022 -0700 usb: gadget: udc: amd5536 depends on HAS_DMA USB_AMD5536UDC should depend on HAS_DMA since it selects USB_SNP_CORE, which depends on HAS_DMA and since 'select' does not follow any dependency chains. Fixes this kconfig warning: WARNING: unmet direct dependencies detected for USB_SNP_CORE Depends on [n]: USB_SUPPORT [=y] && USB_GADGET [=y] && (USB_AMD5536UDC [=y] || USB_SNP_UDC_PLAT [=n]) && HAS_DMA [=n] Selected by [y]: - USB_AMD5536UDC [=y] && USB_SUPPORT [=y] && USB_GADGET [=y] && USB_PCI [=y] Fixes: 97b3ffa233b9 ("usb: gadget: udc: amd5536: split core and PCI layer") Cc: Raviteja Garimella Cc: Felipe Balbi Cc: linux-usb@vger.kernel.org Cc: Greg Kroah-Hartman Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20220709013601.7536-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8af028c2b22bc04f5ab59cd39fa97ccf14aa8f25 Author: Philipp Hortmann Date: Wed Jul 13 07:02:14 2022 +0200 staging: vt6655: Convert macro vt6655_mac_word_reg_bits_off to function Convert macro vt6655_mac_word_reg_bits_off to function. checkpatch.pl does not accept multiline macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/04fb37871c4d383c27287934a0dddb3aa7974b08.1657657918.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 8 ++++++++ drivers/staging/vt6655/mac.h | 9 ++------- 2 files changed, 10 insertions(+), 7 deletions(-) commit 64a5c7bf563b3825b2c46d8a8c69a1c6c4029d2d Author: Philipp Hortmann Date: Wed Jul 13 07:02:03 2022 +0200 staging: vt6655: Convert macro vt6655_mac_reg_bits_off to function Convert macro vt6655_mac_reg_bits_off to function. checkpatch.pl does not accept multiline macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/422950c8e1349fba2f97b0b95ba13f361cde05d9.1657657918.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 8 ++++++++ drivers/staging/vt6655/mac.h | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) commit 77072b0f4b5559a7e649b49aebdc71b1b083bf98 Author: Philipp Hortmann Date: Wed Jul 13 07:01:37 2022 +0200 staging: vt6655: Convert macro vt6655_mac_word_reg_bits_on to function Convert macro vt6655_mac_word_reg_bits_on to function. checkpatch.pl does not accept multiline macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/255c7f5a5e98a399aa4e299e7cf567016bd86d60.1657657918.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 8 ++++++++ drivers/staging/vt6655/mac.h | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) commit 1b225449151fd01fa83ca144996509e2f936a8a2 Author: Philipp Hortmann Date: Wed Jul 13 07:01:26 2022 +0200 staging: vt6655: Convert macro vt6655_mac_reg_bits_on to function Convert macro vt6655_mac_reg_bits_on to function. checkpatch.pl does not accept multiline macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/6b23869ec13b35359b135f005a81f3ed50e5801e.1657657918.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 8 ++++++++ drivers/staging/vt6655/mac.h | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) commit 28d4e692874cf3f730c5c28fc8a130b2faa6fbcb Author: Philipp Hortmann Date: Wed Jul 13 07:00:57 2022 +0200 staging: vt6655: Rename MACvWordRegBitsOff Fix name of a macro that uses CamelCase which is not accepted by checkpatch.pl Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b8d4b72ddfdefb6b8a73fb95f6851e0f365118ba.1657657918.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.c | 12 ++++++------ drivers/staging/vt6655/mac.h | 2 +- drivers/staging/vt6655/rf.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) commit 5327d71d19556dda35343fc9dcb93d860ca92ebe Author: Philipp Hortmann Date: Wed Jul 13 07:01:10 2022 +0200 staging: vt6655: Rename MACvRegBitsOff Fix name of a macro that uses CamelCase which is not accepted by checkpatch.pl Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/e6bea6707f20a53d0631dd1f477ce72d36cd6f3e.1657657918.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.c | 2 +- drivers/staging/vt6655/device_main.c | 24 ++++++++++++------------ drivers/staging/vt6655/mac.c | 10 +++++----- drivers/staging/vt6655/mac.h | 2 +- drivers/staging/vt6655/power.c | 6 +++--- 5 files changed, 22 insertions(+), 22 deletions(-) commit ee67fe63b415caf0a367652399eae2e51bfe2e1a Author: Philipp Hortmann Date: Wed Jul 13 07:00:25 2022 +0200 staging: vt6655: Rename MACvWordRegBitsOn Fix name of a macro that uses CamelCase which is not accepted by checkpatch.pl Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b3873e1103d642a804d42c945dc0c73d94b0c1cf.1657657918.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.c | 4 ++-- drivers/staging/vt6655/device_main.c | 4 ++-- drivers/staging/vt6655/mac.h | 4 ++-- drivers/staging/vt6655/rf.c | 14 +++++++------- 4 files changed, 13 insertions(+), 13 deletions(-) commit 67ec557644db7643a4dd14c3068f01f5c729d62b Author: Philipp Hortmann Date: Wed Jul 13 07:00:40 2022 +0200 staging: vt6655: Rename MACvRegBitsOn Fix name of a macro that uses CamelCase which is not accepted by checkpatch.pl Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/7fb9627441ff97897d132c62d59676355b6d14ea.1657657918.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/baseband.c | 8 ++++---- drivers/staging/vt6655/card.c | 14 ++++++-------- drivers/staging/vt6655/channel.c | 2 +- drivers/staging/vt6655/device_main.c | 9 ++++----- drivers/staging/vt6655/mac.h | 2 +- drivers/staging/vt6655/power.c | 15 +++++++-------- drivers/staging/vt6655/rxtx.c | 2 +- 7 files changed, 24 insertions(+), 28 deletions(-) commit ee9aded6d39a3d78eb832a5eef0bf31286332e03 Author: Philipp Hortmann Date: Wed Jul 13 07:00:12 2022 +0200 staging: vt6655: Rename wData to reg_value in two macros Fix name of a variable in two macros that use CamelCase which is not accepted by checkpatch.pl Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/8f2e9451a24e380c997fcf7c87249f7ed9b66787.1657657918.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d57561d9609e0946ee2bcf9cafcce665095d0f91 Author: Philipp Hortmann Date: Wed Jul 13 06:59:58 2022 +0200 staging: vt6655: Rename byData to reg_value in two macros Fix name of a variable in two macros that use CamelCase which is not accepted by checkpatch.pl Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/159014866cce40913d360a0692fb3c426d4cb840.1657657918.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5bd643b197ffbd039951a9475d8f887ec3f2beb6 Author: Philipp Hortmann Date: Wed Jul 13 06:59:38 2022 +0200 staging: vt6655: Rename wBits to bit_mask in two macros Fix name of a variable in two macros that use CamelCase which is not accepted by checkpatch.pl Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/8929407dc7355df515b7f9fdd195b45ff44f6b98.1657657918.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 10ff399bf600d371929f0dc20148986aac03b872 Author: Philipp Hortmann Date: Wed Jul 13 06:59:18 2022 +0200 staging: vt6655: Rename byBits to bit_mask in two macros Fix name of a variable in two macros that use CamelCase which is not accepted by checkpatch.pl Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/5ac7e8860ecb23232cf5befea024872e7db76d59.1657657918.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 186c46008c9d563facd247e2d97d00a044a5870e Author: Philipp Hortmann Date: Wed Jul 13 06:58:56 2022 +0200 staging: vt6655: Rename byRegOfs to reg_offset in four macros Fix name of a variable in four macros that use CamelCase which is not accepted by checkpatch.pl Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/82f65d22ac8cd75b2c7790c13be3d0068968925b.1657657918.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 724933e37a90cfbaafc8d9e52d15fafc311cc6f2 Author: Martin Kaiser Date: Wed Jul 13 09:55:52 2022 +0200 staging: r8188eu: fall back to random mac address Call eth_random_addr to generate a random mac address if we cannot load the mac address from the efuses. Do not use a constant mac address as fallback. This may create conflicts if we have several r8188eu devices on the network. Suggested-by: Joe Perches Tested-by: Philipp Hortmann # Edimax N150 Reviewed-by: Pavel Skripkin Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220713075552.140927-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/usb_halinit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c1da5a7befa82c01e06c8ec2059bdc9ed422033b Author: Martin Kaiser Date: Wed Jul 13 09:58:04 2022 +0200 staging: r888eu: use dynamic allocation for efuse buffer Use kmalloc to allocate the efuse buffer in ReadAdapterInfo8188EU and free it on exit. This is better than using a 512 byte array on the stack. It's ok to drop the __aligned(4) qualifier. kmalloc aligns to ARCH_KMALLOC_MINALIGN, this is at least 8 bytes. Suggested-by: Dan Carpenter Suggested-by: Larry Finger Acked-by: Larry Finger Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220713075804.140986-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/usb_halinit.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4cdb845db3217091737159908fcba1f643d818a1 Author: Binyi Han Date: Wed Jul 13 01:00:23 2022 -0700 staging: qlge: Avoid multiplication while keep the same logic Avoid the more expensive multiplication while keep the same logic. Signed-off-by: Binyi Han Link: https://lore.kernel.org/r/31fe21bf4a9e8f13cf27bd50073e9d5d197654ea.1657697683.git.dantengknight@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/qlge/qlge_main.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit f39b6c58d8550ddcbd9907fd0818990d0be384c4 Author: Binyi Han Date: Wed Jul 13 00:59:25 2022 -0700 staging: qlge: Fix indentation issue under long for loop Fix indentation issue to adhere to Linux kernel coding style, issue found by checkpatch. And change the long for loop into 3 lines. Signed-off-by: Binyi Han Link: https://lore.kernel.org/r/4e18dabcce7f589386a33ceed59096aa049779f0.1657697683.git.dantengknight@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/qlge/qlge_main.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit cebbe577cb17ed9b04b50d9e6802a8bacffbadca Author: Ming Lei Date: Thu Jul 14 18:32:01 2022 +0800 ublk_drv: fix request queue leak Call blk_cleanup_queue() in release code path for fixing request queue leak. Also for-5.20/block has cleaned up blk_cleanup_queue(), which is basically merged to del_gendisk() if blk_mq_alloc_disk() is used for allocating disk and queue. However, ublk may not add disk in case of starting device failure, then del_gendisk() won't be called when removing ublk device, so blk_mq_exit_queue will not be callsed, and it can be bit hard to deal with this kind of merge conflict. Turns out ublk's queue/disk use model is very similar with scsi, so switch to scsi's model by allocating disk and queue independently, then it can be quite easy to handle v5.20 merge conflict by replacing blk_cleanup_queue with blk_mq_destroy_queue. Reported-by: Jens Axboe Fixes: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20220714103201.131648-1-ming.lei@redhat.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 0edb3696c1713c42f52acbd8355b545e58f782b1 Author: Ming Lei Date: Wed Jul 13 22:07:11 2022 +0800 ublk_drv: support to complete io command via task_work_add Use task_work_add if it is available, since task_work_add can bring up better performance, especially batching signaling ->ubq_daemon can be done. It is observed that task_work_add() can boost iops by +4% on random 4k io test. Also except for completing io command, all other code paths are same with completing io command via io_uring_cmd_complete_in_task. Meantime add one flag of UBLK_F_URING_CMD_COMP_IN_TASK for comparing the mode easily. Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20220713140711.97356-3-ming.lei@redhat.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 75 ++++++++++++++++++++++++++++++++++++++----- include/uapi/linux/ublk_cmd.h | 6 ++++ 2 files changed, 73 insertions(+), 8 deletions(-) commit 71f28f3136aff5890cd56de78abc673f8393cad9 Author: Ming Lei Date: Wed Jul 13 22:07:10 2022 +0800 ublk_drv: add io_uring based userspace block driver This is the driver part of userspace block driver(ublk driver), the other part is userspace daemon part(ublksrv)[1]. The two parts communicate by io_uring's IORING_OP_URING_CMD with one shared cmd buffer for storing io command, and the buffer is read only for ublksrv, each io command is indexed by io request tag directly, and is written by ublk driver. For example, when one READ io request is submitted to ublk block driver, ublk driver stores the io command into cmd buffer first, then completes one IORING_OP_URING_CMD for notifying ublksrv, and the URING_CMD is issued to ublk driver beforehand by ublksrv for getting notification of any new io request, and each URING_CMD is associated with one io request by tag. After ublksrv gets the io command, it translates and handles the ublk io request, such as, for the ublk-loop target, ublksrv translates the request into same request on another file or disk, like the kernel loop block driver. In ublksrv's implementation, the io is still handled by io_uring, and share same ring with IORING_OP_URING_CMD command. When the target io request is done, the same IORING_OP_URING_CMD is issued to ublk driver for both committing io request result and getting future notification of new io request. Another thing done by ublk driver is to copy data between kernel io request and ublksrv's io buffer: 1) before ubsrv handles WRITE request, copy the request's data into ublksrv's userspace io buffer, so that ublksrv can handle the write request 2) after ubsrv handles READ request, copy ublksrv's userspace io buffer into this READ request, then ublk driver can complete the READ request Zero copy may be switched if mm is ready to support it. ublk driver doesn't handle any logic of the specific user space driver, so it is small/simple enough. [1] ublksrv https://github.com/ming1/ubdsrv Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20220713140711.97356-2-ming.lei@redhat.com Signed-off-by: Jens Axboe drivers/block/Kconfig | 9 + drivers/block/Makefile | 2 + drivers/block/ublk_drv.c | 1530 +++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/ublk_cmd.h | 156 +++++ 4 files changed, 1697 insertions(+) commit 7d09c7606346db9a48b62b4e02454a6b8f323043 Author: Thomas Zimmermann Date: Fri Jul 8 09:21:14 2022 +0200 drm/mgag200: Don't read-back PCI option register before writing Remove the read operation from mgag200_init_pci_options(). It was incorrectly added while refactoring the code. Reading the PCI option register clears the register's new value and subsequently leads to re-writing the old value. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Fixes: ce19021fd99a ("drm/mgag200: Move PCI-option setup into model-specific code") Cc: Thomas Zimmermann Cc: Jocelyn Falempe Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20220708072114.13960-1-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_drv.c | 6 ------ 1 file changed, 6 deletions(-) commit 2a3c8f8a4494343f5942b780b3f6295307a07b6e Merge: bc2c6a5ee71b 568f6869e680 Author: Greg Kroah-Hartman Date: Thu Jul 14 15:04:49 2022 +0200 Merge tag 'iio-for-5.20a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: IIO new device support, features and minor fixes for 5.20 Several on-running cleanup efforts dominate this time, plus the DMA safety alignment issue identified due to improved understanding of the restrictions as a result of Catalin Marinas' efforts in that area. One immutable branch in here due to MFD and SPMI elements needed for the qcom-rradc driver. Device support * bmi088 - Add support for bmi085 (accelerometer part of IMU) - Add support for bmi090l (accelerometer part of IMU) * mcp4922 - Add support for single channel device MCP4921 * rzg2l-adc - Add compatible and minor tweaks to support RZ/G2UL ADC * sca3300 - Add support for scl3300 including refactoring driver to support multiple device types and cleanup noticed whilst working on driver. * spmi-rradc - New driver for Qualcomm SPMI Round Robin ADC including necessary additional utility functions in SPMI core and related MFD driver. * ti-dac55781 - Add compatible for DAC121C081 which is very similar to existing parts. Features * core - Warn on iio_trigger_get() on an unregistered IIO trigger. * bma400 - Triggered buffer support - Activity and step counting - Misc driver improvements such as devm and header ordering * cm32181 - Add PM support. * cros_ec - Sensor location support * sx9324 - Add precharge resistor setting - Add internal compensation resistor setting - Add CS idle/sleep mode. * sx9360 - Add precharge resistor setting * vl53l0x - Handle reset GPIO, regulator and relax handling of irq type. Cleanup and minor fixes: Treewide changes - Cleanup of error handling in remove functions in many drivers. - Update dt-binding maintainers for a number of ADI bindings. - Several sets of conversion of drivers from device tree specific to generic device properties. Includes fixing up various related header and Kconfig issues. - Drop include of of.h from iio.h and fix up drivers that need to include it directly. - More moves of clusters of drivers into appropriate IIO_XXX namespaces. - Tree wide fix of a long running bug around DMA safety requirements. IIO was using __cacheline_aligned to pad iio_priv() structures. This worked for a long time by coincidence, but correct alignment is ARCH_KMALLOC_MINALIGN. As there is activity around this area, introduce an IIO local IIO_DMA_MINALIGN to allow for changing it in one place rather than every driver in future. Note, there have been no reports of this bug in the wild, and it may not happen on any platforms supported by upstream, so no rush to backport these fixes. Other cleanup * core - Switch to ida_alloc()/free() - Drop unused iio_get_time_res() - Octal permissions and DEVICE_ATTR_* macros. - Cleanup bared unsigned usage. * MAINTAINERS - Add include/dt-bindings/iio/ to the main IIO entry. * ad5380 - Comment syntax fix. * ad74413r - Call to for_each_set_bit_from(), with from value as 0 replaced. * ad7768-1 - Drop explicit setting of INDIO_BUFFER_TRIGGERED as now done by the core. * adxl345 - Fix wrong address in dt-binding example. * adxl367 - Drop extra update of FIFO watermark. * at91-sama5d2 - Limit requested watermark to the hwfifo size. * bmg160, bme680 - Typos * cio-dac - Switch to iomap rather than direct use of ioports * kxsd9 - Replace CONFIG_PM guards with new PM macros that let the compiler cleanly remove the unused code and structures when !CONFIG_PM * lsm6dsx - Use new pm_sleep_ptr() and EXPORT_SIMPLE_DEV_PM_OPS(). Then move to Namespace. * meson_saradc - general cleanup. - Avoid attaching resources to iio_dev->dev - Use same struct device for all error messages - Convert to dev_err_probe() and use local struct device *dev to reduce code complexity. - Use devm_clk_get_optional() instead of hand rolling. - Use regmap_read_poll_timeout() instead of hand rolling. * mma7660 - Drop ACPI_PTR() use that is unhelpful. * mpu3050 - Stop exporting symbols not used outside of module - Switch to new DEFINE_RUNTIME_DEV_PM_OPS() macro and move to Namespace. * ping - Typo fix * qcom-spmi-rradc - Typo fix * sc27xx - Convert to generic struct u32_fract * srf08 - Drop a redundant check on !val * st_lsm6dsx - Limit the requested watermark to the hwfifo size. * stm32-adc - Use generic_handle_domain_irq() instead of opencoding. - Fix handling of ADC disable. * stm32-dac - Use str_enabled_disable() instead of open coding. * stx104 - Switch to iomap rather than direct use of ioports * tsc2046 - Drop explicit setting of INDIO_BUFFER_TRIGGERED as now done by the core. * tsl2563 - Replace flush_scheduled_work() with cancel_delayed_work_sync() - Replace cancel_delayed_work() with cancel_delayed_work_sync() * vl53l0x - Make the VDD regulator optional by allowing a dummy regulator. * tag 'iio-for-5.20a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (244 commits) iio: adc: xilinx-xadc: Drop duplicate NULL check in xadc_parse_dt() iio: adc: xilinx-xadc: Make use of device properties iio: light: cm32181: Add PM support iio: adc: ad778-1: do not explicity set INDIO_BUFFER_TRIGGERED mode iio: adc: ti-tsc2046: do not explicity set INDIO_BUFFER_TRIGGERED mode iio: adc: stm32-adc: disable adc before calibration iio: adc: stm32-adc: make safe adc disable iio: dac: ad5380: align '*' each line and drop unneeded blank line iio: adc: qcom-spmi-rradc: Fix spelling mistake "coherrency" -> "coherency" iio: Don't use bare "unsigned" dt-bindings: iio: dac: mcp4922: expand for mcp4921 support iio: dac: mcp4922: add support to mcp4921 iio: chemical: sps30: Move symbol exports into IIO_SPS30 namespace iio: pressure: bmp280: Move symbol exports to IIO_BMP280 namespace iio: imu: bmi160: Move exported symbols to IIO_BMI160 namespace iio: adc: stm32-adc: Use generic_handle_domain_irq() proximity: vl53l0x: Make VDD regulator actually optional MAINTAINERS: add include/dt-bindings/iio to IIO SUBSYSTEM AND DRIVERS dt-bindings: iio/accel: Fix adi,adxl345/6 example I2C address iio: gyro: bmg160: Fix typo in comment ... commit 4fa05a67b558d2cb3acd2bb299b91220d405ca5e Author: Christian König Date: Mon Jul 11 16:48:01 2022 +0200 dma-buf: revert "return only unsignaled fences in dma_fence_unwrap_for_each v3" This reverts commit 8f61973718485f3e89bc4f408f929048b7b47c83. It turned out that this is not correct. Especially the sync_file info IOCTL needs to see even signaled fences to correctly report back their status to userspace. Instead add the filter in the merge function again where it makes sense. Signed-off-by: Christian König Tested-by: Karolina Drobnik Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20220712102849.1562-1-christian.koenig@amd.com drivers/dma-buf/dma-fence-unwrap.c | 3 ++- include/linux/dma-fence-unwrap.h | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) commit ecff027298de72c6b0c7144baa7a76c7b2a24451 Author: Sergiu Moga Date: Wed Jul 13 16:29:10 2022 +0300 spi: dt-bindings: atmel,at91rm9200-spi: convert to json-schema Convert SPI DT binding for Atmel/Microchip SoCs to json-schema. Signed-off-by: Sergiu Moga Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220713132908.175026-1-sergiu.moga@microchip.com Signed-off-by: Mark Brown .../bindings/spi/atmel,at91rm9200-spi.yaml | 75 ++++++++++++++++++++++ .../devicetree/bindings/spi/spi_atmel.txt | 36 ----------- 2 files changed, 75 insertions(+), 36 deletions(-) commit ef30911d3c39fd57884c348c29b9cbff88def155 Author: Kuninori Morimoto Date: Thu Jul 14 06:28:15 2022 +0000 ASoC: rsnd: care default case on rsnd_ssiu_busif_err_irq_ctrl() Before, ssiu.c didn't care SSI5-8, thus, commit b1384d4c95088d0 ("ASoC: rsnd: care default case on rsnd_ssiu_busif_err_status_clear()") cares it for status clear. But we should care it for error irq handling, too. This patch cares it. Reported-by: Nguyen Bao Nguyen Reported-by: Nishiyama Kunihiko Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/871quocio1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/sh/rcar/ssiu.c | 2 ++ 1 file changed, 2 insertions(+) commit fa9b878ff86f4adccddf62492a5894fbdb04f97d Author: Dan Carpenter Date: Fri Jul 8 16:48:36 2022 +0300 ASoC: SOF: ipc-msg-injector: fix copy in sof_msg_inject_ipc4_dfs_write() There are two bugs that have to do with when we copy the payload: size = simple_write_to_buffer(ipc4_msg->data_ptr, priv->max_msg_size, ppos, buffer, count); The value of "*ppos" was supposed to be zero but it is sizeof(ipc4_msg->header_u64) so it will copy the data into the middle of the "ipc4_msg->data_ptr" buffer instead of to the start. The second problem is "buffer" should be "buffer + sizeof(ipc4_msg->header_u64)". This function is used for fuzz testing so the data is normally random and this bug likely does not affect anyone very much. In this context, it's simpler and more appropriate to use copy_from_user() instead of simple_write_to_buffer() so I have re-written the function. Fixes: 066c67624d8c ("ASoC: SOF: ipc-msg-injector: Add support for IPC4 messages") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Ysg1tB2FKLnRMsel@kili Signed-off-by: Mark Brown sound/soc/sof/sof-client-ipc-msg-injector.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit b126047f43f11f61f1dd64802979765d71795dae Merge: 9b633670087e 06673c2102b3 Author: Paolo Abeni Date: Thu Jul 14 12:20:21 2022 +0200 Merge branch 'xen-netfront-xsa-403-follow-on' Jan Beulich says: ==================== xen-netfront: XSA-403 follow-on While investigating the XSA, I did notice a few more things. The two patches aren't really dependent on one another. 1: remove leftover call to xennet_tx_buf_gc() 2: re-order error checks in xennet_get_responses() ==================== Link: https://lore.kernel.org/r/7fca0e44-43b5-8448-3653-249d117dc084@suse.com Signed-off-by: Paolo Abeni commit 06673c2102b3f0959302d65e07485ba3f2b94127 Author: Jan Beulich Date: Wed Jul 13 11:19:55 2022 +0200 xen-netfront: re-order error checks in xennet_get_responses() Check the retrieved grant reference first; there's no point trying to have xennet_move_rx_slot() move invalid data (and further defer recognition of the issue, likely making diagnosis yet more difficult). Signed-off-by: Jan Beulich Signed-off-by: Paolo Abeni drivers/net/xen-netfront.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit ad39bafda7369b241179da074005a08edcd77f27 Author: Jan Beulich Date: Wed Jul 13 11:19:33 2022 +0200 xen-netfront: remove leftover call to xennet_tx_buf_gc() In talk_to_netback(), called earlier from xennet_connect(), queues and shared rings were just re-initialized, so all this function call could result in is setting ->broken (again) right away in case any unconsumed responses were found. Signed-off-by: Jan Beulich Signed-off-by: Paolo Abeni drivers/net/xen-netfront.c | 4 ---- 1 file changed, 4 deletions(-) commit 9888725d8a640d67abe6139e84ff41bafe89b11e Author: Jiangshan Yi Date: Thu Jul 14 14:33:18 2022 +0800 fs/ext2: replace ternary operator with min_t() Fix the following coccicheck warning: fs/ext2/super.c:1494: WARNING opportunity for min(). fs/ext2/super.c:1533: WARNING opportunity for min(). min_t() macro is defined in include/linux/minmax.h. It avoids multiple evaluations of the arguments when non-constant and performs strict type-checking. Link: https://lore.kernel.org/r/20220714063318.1777139-1-13667453960@163.com Signed-off-by: Jiangshan Yi Signed-off-by: Jan Kara fs/ext2/super.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d3164e2f3b0ac003c401d419cda2da0571724352 Author: Thomas Bogendoerfer Date: Tue Jul 5 18:46:25 2022 +0200 MIPS: Remove VR41xx support No (active) developer owns this hardware, so let's remove Linux support. Signed-off-by: Thomas Bogendoerfer arch/mips/Kbuild.platforms | 1 - arch/mips/Kconfig | 23 - arch/mips/Makefile | 1 - arch/mips/configs/capcella_defconfig | 91 ---- arch/mips/configs/e55_defconfig | 37 -- arch/mips/configs/mpc30x_defconfig | 53 --- arch/mips/configs/tb0219_defconfig | 76 ---- arch/mips/configs/tb0226_defconfig | 71 ---- arch/mips/configs/tb0287_defconfig | 84 ---- arch/mips/configs/workpad_defconfig | 67 --- arch/mips/include/asm/cpu-type.h | 11 - arch/mips/include/asm/cpu.h | 3 +- arch/mips/include/asm/mach-vr41xx/irq.h | 9 - arch/mips/include/asm/mipsregs.h | 14 - arch/mips/include/asm/pgtable-32.h | 5 - arch/mips/include/asm/pgtable-64.h | 5 - arch/mips/include/asm/vermagic.h | 2 - arch/mips/include/asm/vr41xx/capcella.h | 30 -- arch/mips/include/asm/vr41xx/giu.h | 41 -- arch/mips/include/asm/vr41xx/irq.h | 97 ----- arch/mips/include/asm/vr41xx/mpc30x.h | 24 -- arch/mips/include/asm/vr41xx/pci.h | 77 ---- arch/mips/include/asm/vr41xx/siu.h | 45 -- arch/mips/include/asm/vr41xx/tb0219.h | 29 -- arch/mips/include/asm/vr41xx/tb0226.h | 30 -- arch/mips/include/asm/vr41xx/tb0287.h | 30 -- arch/mips/include/asm/vr41xx/vr41xx.h | 148 ------- arch/mips/kernel/cpu-probe.c | 40 -- arch/mips/lib/dump_tlb.c | 8 - arch/mips/mm/c-r4k.c | 44 -- arch/mips/mm/tlbex.c | 35 -- arch/mips/pci/Makefile | 6 - arch/mips/pci/fixup-capcella.c | 37 -- arch/mips/pci/fixup-mpc30x.c | 36 -- arch/mips/pci/fixup-tb0219.c | 38 -- arch/mips/pci/fixup-tb0226.c | 73 ---- arch/mips/pci/fixup-tb0287.c | 52 --- arch/mips/pci/ops-vr41xx.c | 113 ----- arch/mips/pci/pci-vr41xx.c | 309 -------------- arch/mips/pci/pci-vr41xx.h | 141 ------- arch/mips/vr41xx/Kconfig | 104 ----- arch/mips/vr41xx/Makefile | 5 - arch/mips/vr41xx/Platform | 29 -- arch/mips/vr41xx/casio-e55/Makefile | 6 - arch/mips/vr41xx/casio-e55/setup.c | 27 -- arch/mips/vr41xx/common/Makefile | 6 - arch/mips/vr41xx/common/bcu.c | 210 ---------- arch/mips/vr41xx/common/cmu.c | 242 ----------- arch/mips/vr41xx/common/giu.c | 110 ----- arch/mips/vr41xx/common/icu.c | 714 -------------------------------- arch/mips/vr41xx/common/init.c | 60 --- arch/mips/vr41xx/common/irq.c | 106 ----- arch/mips/vr41xx/common/pmu.c | 123 ------ arch/mips/vr41xx/common/rtc.c | 105 ----- arch/mips/vr41xx/common/siu.c | 142 ------- arch/mips/vr41xx/common/type.c | 11 - arch/mips/vr41xx/ibm-workpad/Makefile | 6 - arch/mips/vr41xx/ibm-workpad/setup.c | 27 -- 58 files changed, 1 insertion(+), 4068 deletions(-) commit 62fb295ce7dd9df3e04b48a943f8cafaf1f32980 Author: Krzysztof Kozlowski Date: Fri Jun 24 19:07:40 2022 +0200 MIPS: dts: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Acked-by: Arınç ÜNAL Signed-off-by: Thomas Bogendoerfer arch/mips/boot/dts/ingenic/ci20.dts | 2 +- arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts | 2 +- arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts | 2 +- arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 5ee46bfbb65fd971b734c3972ea9cc123fc869d1 Author: Krzysztof Kozlowski Date: Fri Jun 24 19:07:39 2022 +0200 MIPS: dts: correct gpio-keys names and properties gpio-keys children do not use unit addresses. Signed-off-by: Krzysztof Kozlowski Acked-by: Arınç ÜNAL Signed-off-by: Thomas Bogendoerfer arch/mips/boot/dts/img/pistachio_marduk.dts | 4 +-- arch/mips/boot/dts/ingenic/gcw0.dts | 31 ++++++++++------------ arch/mips/boot/dts/ingenic/rs90.dts | 18 ++++++------- arch/mips/boot/dts/pic32/pic32mzda_sk.dts | 9 +++---- arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts | 6 ++--- arch/mips/boot/dts/qca/ar9331_dpt_module.dts | 4 +-- arch/mips/boot/dts/qca/ar9331_dragino_ms14.dts | 6 ++--- arch/mips/boot/dts/qca/ar9331_omega.dts | 4 +-- .../dts/qca/ar9331_openembed_som9331_board.dts | 4 +-- arch/mips/boot/dts/qca/ar9331_tl_mr3020.dts | 8 +++--- 10 files changed, 37 insertions(+), 57 deletions(-) commit a6c80bec3c9357506e2bfdae82623ef34f8cab40 Author: Henning Schild Date: Mon Jun 6 19:41:38 2022 +0300 leds: simatic-ipc-leds-gpio: Add GPIO version of Siemens driver On Apollo Lake the pinctrl drivers will now come up without ACPI. Use that instead of open coding it. Create a new driver for that which can later be filled with more GPIO based models, and which has different dependencies. Signed-off-by: Henning Schild Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/leds/simple/Kconfig | 7 +- drivers/leds/simple/Makefile | 1 + drivers/leds/simple/simatic-ipc-leds-gpio.c | 105 ++++++++++++++++++++++++++++ drivers/leds/simple/simatic-ipc-leds.c | 80 ++------------------- drivers/platform/x86/simatic-ipc.c | 5 +- 5 files changed, 117 insertions(+), 81 deletions(-) commit 446f0cf9e08b483d7dc6f61eee0ee846b22f6386 Author: Henning Schild Date: Mon Jun 6 19:41:37 2022 +0300 platform/x86: simatic-ipc: drop custom P2SB bar code The two drivers that used to use this have been switched over to the common P2SB accessor, so this code is not needed any longer. Signed-off-by: Henning Schild Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede Signed-off-by: Lee Jones drivers/platform/x86/simatic-ipc.c | 38 ---------------------- include/linux/platform_data/x86/simatic-ipc-base.h | 2 -- 2 files changed, 40 deletions(-) commit 759273c3c429ffbd8f24655fd0480cd408a1804c Author: Henning Schild Date: Mon Jun 6 19:41:36 2022 +0300 leds: simatic-ipc-leds: Convert to use P2SB accessor Since we have a common P2SB accessor in tree we may use it instead of open coded variants. Replace custom code by p2sb_bar() call. Signed-off-by: Henning Schild Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/leds/simple/Kconfig | 1 + drivers/leds/simple/simatic-ipc-leds.c | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) commit e38da7d30f56ec6f9fae505a80561d4357cc7024 Author: Henning Schild Date: Mon Jun 6 19:41:35 2022 +0300 watchdog: simatic-ipc-wdt: convert to use P2SB accessor Since we have a common P2SB accessor in tree we may use it instead of open coded variants. Replace custom code by p2sb_bar() call. Signed-off-by: Henning Schild Acked-by: Guenter Roeck Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/watchdog/Kconfig | 1 + drivers/watchdog/simatic-ipc-wdt.c | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) commit 7b2db7049bb9e55efb7e0c8a7169d5a021b50284 Author: Andy Shevchenko Date: Mon Jun 6 19:41:34 2022 +0300 EDAC, pnd2: convert to use common P2SB accessor Since we have a common P2SB accessor in tree we may use it instead of open coded variants. Replace custom code by p2sb_bar() call. Signed-off-by: Andy Shevchenko Tested-by: Henning Schild Reviewed-by: Tony Luck Signed-off-by: Lee Jones drivers/edac/Kconfig | 1 + drivers/edac/pnd2_edac.c | 55 ++++++++++++++---------------------------------- 2 files changed, 17 insertions(+), 39 deletions(-) commit 6adc32f58b9356ced575f9d820e8e3f1f629f830 Author: Andy Shevchenko Date: Mon Jun 6 19:41:33 2022 +0300 EDAC, pnd2: Use proper I/O accessors and address space annotation The driver uses rather voodoo kind of castings and I/O accessors. Replace it with proper __iomem annotation and readl()/readq() calls. Signed-off-by: Andy Shevchenko Tested-by: Henning Schild Reviewed-by: Tony Luck Signed-off-by: Lee Jones drivers/edac/pnd2_edac.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5c7b9167ddf89d2d845e09bfcdc9f677340b6a5c Author: Andy Shevchenko Date: Mon Jun 6 19:41:32 2022 +0300 i2c: i801: convert to use common P2SB accessor Since we have a common P2SB accessor in tree we may use it instead of open coded variants. Replace custom code by p2sb_bar() call. Signed-off-by: Andy Shevchenko Tested-by: Henning Schild Acked-by: Hans de Goede Acked-by: Linus Walleij Reviewed-by: Jean Delvare Acked-by: Wolfram Sang Signed-off-by: Lee Jones drivers/i2c/busses/Kconfig | 1 + drivers/i2c/busses/i2c-i801.c | 39 +++++++++------------------------------ drivers/platform/x86/intel/p2sb.c | 6 ++++++ 3 files changed, 16 insertions(+), 30 deletions(-) commit 7064d7d88b83b6394ee833e805fd041c615acb13 Author: Tan Jui Nee Date: Mon Jun 6 19:41:31 2022 +0300 mfd: lpc_ich: Add support for pinctrl in non-ACPI system Add support for non-ACPI systems, such as system that uses Advanced Boot Loader (ABL) whereby a platform device has to be created in order to bind with pin control and GPIO. At the moment, Intel Apollo Lake In-Vehicle Infotainment (IVI) system requires a driver to hide and unhide P2SB to lookup P2SB BAR and pass the PCI BAR address to GPIO. Signed-off-by: Tan Jui Nee Co-developed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko Tested-by: Henning Schild Acked-by: Hans de Goede Acked-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/lpc_ich.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) commit 559793198f9280cdd56c438f5258e315ed8a6cbc Author: Andy Shevchenko Date: Mon Jun 6 19:41:30 2022 +0300 mfd: lpc_ich: Switch to generic p2sb_bar() Instead of open coding p2sb_bar() functionality we are going to use generic library. There is one more user en route. This is more than just a clean-up. It also fixes a potential issue seen when SPI BAR is 64-bit. The current code works if and only if the PCI BAR of the hidden device is inside 4G address space. In case when firmware decides to go above 4G, we will get a wrong address. Signed-off-by: Andy Shevchenko Tested-by: Henning Schild Acked-by: Hans de Goede Acked-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/Kconfig | 1 + drivers/mfd/lpc_ich.c | 27 ++++++++------------------- 2 files changed, 9 insertions(+), 19 deletions(-) commit 6e3b29dbc119fa86bc25f822e8c6166552086531 Author: Andy Shevchenko Date: Mon Jun 6 19:41:29 2022 +0300 mfd: lpc_ich: Factor out lpc_ich_enable_spi_write() Factor out duplicate code to lpc_ich_enable_spi_write() helper function. Signed-off-by: Andy Shevchenko Tested-by: Henning Schild Acked-by: Hans de Goede Acked-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/lpc_ich.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit e1a534f5d074db45ae5cbac41d8912b98e96a006 Author: Huacai Chen Date: Thu Jul 14 16:41:34 2022 +0800 MIPS: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK When CONFIG_CPUMASK_OFFSTACK and CONFIG_DEBUG_PER_CPU_MAPS is selected, cpu_max_bits_warn() generates a runtime warning similar as below while we show /proc/cpuinfo. Fix this by using nr_cpu_ids (the runtime limit) instead of NR_CPUS to iterate CPUs. [ 3.052463] ------------[ cut here ]------------ [ 3.059679] WARNING: CPU: 3 PID: 1 at include/linux/cpumask.h:108 show_cpuinfo+0x5e8/0x5f0 [ 3.070072] Modules linked in: efivarfs autofs4 [ 3.076257] CPU: 0 PID: 1 Comm: systemd Not tainted 5.19-rc5+ #1052 [ 3.084034] Hardware name: Loongson Loongson-3A4000-7A1000-1w-V0.1-CRB/Loongson-LS3A4000-7A1000-1w-EVB-V1.21, BIOS Loongson-UDK2018-V2.0.04082-beta7 04/27 [ 3.099465] Stack : 9000000100157b08 9000000000f18530 9000000000cf846c 9000000100154000 [ 3.109127] 9000000100157a50 0000000000000000 9000000100157a58 9000000000ef7430 [ 3.118774] 90000001001578e8 0000000000000040 0000000000000020 ffffffffffffffff [ 3.128412] 0000000000aaaaaa 1ab25f00eec96a37 900000010021de80 900000000101c890 [ 3.138056] 0000000000000000 0000000000000000 0000000000000000 0000000000aaaaaa [ 3.147711] ffff8000339dc220 0000000000000001 0000000006ab4000 0000000000000000 [ 3.157364] 900000000101c998 0000000000000004 9000000000ef7430 0000000000000000 [ 3.167012] 0000000000000009 000000000000006c 0000000000000000 0000000000000000 [ 3.176641] 9000000000d3de08 9000000001639390 90000000002086d8 00007ffff0080286 [ 3.186260] 00000000000000b0 0000000000000004 0000000000000000 0000000000071c1c [ 3.195868] ... [ 3.199917] Call Trace: [ 3.203941] [<98000000002086d8>] show_stack+0x38/0x14c [ 3.210666] [<9800000000cf846c>] dump_stack_lvl+0x60/0x88 [ 3.217625] [<980000000023d268>] __warn+0xd0/0x100 [ 3.223958] [<9800000000cf3c90>] warn_slowpath_fmt+0x7c/0xcc [ 3.231150] [<9800000000210220>] show_cpuinfo+0x5e8/0x5f0 [ 3.238080] [<98000000004f578c>] seq_read_iter+0x354/0x4b4 [ 3.245098] [<98000000004c2e90>] new_sync_read+0x17c/0x1c4 [ 3.252114] [<98000000004c5174>] vfs_read+0x138/0x1d0 [ 3.258694] [<98000000004c55f8>] ksys_read+0x70/0x100 [ 3.265265] [<9800000000cfde9c>] do_syscall+0x7c/0x94 [ 3.271820] [<9800000000202fe4>] handle_syscall+0xc4/0x160 [ 3.281824] ---[ end trace 8b484262b4b8c24c ]--- Cc: stable@vger.kernel.org Signed-off-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer arch/mips/kernel/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c551bd81d198bf1dcd4398d5454acdc0309dbe77 Author: Andy Shevchenko Date: Mon Jun 6 19:41:28 2022 +0300 pinctrl: intel: Check against matching data instead of ACPI companion In some cases we may get a platform device that has ACPI companion which is different to the pin control described in the ACPI tables. This is primarily happens when device is instantiated by board file. In order to allow this device being enumerated, refactor intel_pinctrl_get_soc_data() to check the matching data instead of ACPI companion. Reported-by: Henning Schild Signed-off-by: Andy Shevchenko Tested-by: Henning Schild Acked-by: Hans de Goede Acked-by: Mika Westerberg Acked-by: Linus Walleij Signed-off-by: Lee Jones drivers/pinctrl/intel/pinctrl-intel.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 9745fb07474f4501eff62130a78a42a8b8c18b05 Author: Jonathan Yong Date: Mon Jun 6 19:41:27 2022 +0300 platform/x86/intel: Add Primary to Sideband (P2SB) bridge support SoC features such as GPIO are accessed via a reserved MMIO area, we don't know its address but can obtain it from the BAR of the P2SB device, that device is normally hidden so we have to temporarily unhide it, read address and hide it back. There are already a few users and at least one more is coming which require an access to Primary to Sideband (P2SB) bridge in order to get IO or MMIO BAR hidden by BIOS. Create a library to access P2SB for x86 devices in a unified way. Background information ====================== Note, the term "bridge" is used in the documentation and it has nothing to do with a PCI (host) bridge as per the PCI specifications. The P2SB is an interesting device by its nature and hardware design. First of all, it has several devices in the hardware behind it. These devices may or may not be represented as ACPI devices by a firmware. It also has a hardwired (to 0s) the least significant bits of the base address register which is represented by the only 64-bit BAR0. It means that OS mustn't reallocate the BAR. On top of that in some cases P2SB is represented by function 0 on PCI slot (in terms of B:D.F) and according to the PCI specification any other function can't be seen until function 0 is present and visible. In the PCI configuration space of P2SB device the full 32-bit register is allocated for the only purpose of hiding the entire P2SB device. As per [3]: 3.1.39 P2SB Control (P2SBC)—Offset E0h Hide Device (HIDE): When this bit is set, the P2SB will return 1s on any PCI Configuration Read on IOSF-P. All other transactions including PCI Configuration Writes on IOSF-P are unaffected by this. This does not affect reads performed on the IOSF-SB interface. This doesn't prevent MMIO accesses, although preventing the OS from assigning these addresses. The firmware on the affected platforms marks the region as unusable (by cutting it off from the PCI host bridge resources) as depicted in the Apollo Lake example below: PCI host bridge to bus 0000:00 pci_bus 0000:00: root bus resource [io 0x0070-0x0077] pci_bus 0000:00: root bus resource [io 0x0000-0x006f window] pci_bus 0000:00: root bus resource [io 0x0078-0x0cf7 window] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window] pci_bus 0000:00: root bus resource [mem 0x7c000001-0x7fffffff window] pci_bus 0000:00: root bus resource [mem 0x7b800001-0x7bffffff window] pci_bus 0000:00: root bus resource [mem 0x80000000-0xcfffffff window] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff window] pci_bus 0000:00: root bus resource [bus 00-ff] The P2SB 16MB BAR is located at 0xd0000000-0xd0ffffff memory window. The generic solution ==================== The generic solution for all cases when we need to access to the information behind P2SB device is a library code where users ask for necessary resources by demand and hence those users take care of not being run on the systems where this access is not required. The library provides the p2sb_bar() API to retrieve the MMIO of the BAR0 of the device from P2SB device slot. P2SB unconditional unhiding awareness ===================================== Technically it's possible to unhide the P2SB device and devices on the same PCI slot and access them at any time as needed. But there are several potential issues with that: - the systems were never tested against such configuration and hence nobody knows what kind of bugs it may bring, especially when we talk about SPI NOR case which contains Intel FirmWare Image (IFWI) code (including BIOS) and already known to be problematic in the past for end users - the PCI by its nature is a hotpluggable bus and in case somebody attaches a driver to the functions of a P2SB slot device(s) the end user experience and system behaviour can be unpredictable - the kernel code would need some ugly hacks (or code looking as an ugly hack) under arch/x86/pci in order to enable these devices on only selected platforms (which may include CPU ID table followed by a potentially growing number of DMI strings The future improvements ======================= The future improvements with this code may go in order to gain some kind of cache, if it's possible at all, to prevent unhiding and hiding many times to take static information that may be saved once per boot. Links ===== [1]: https://lab.whitequark.org/notes/2017-11-08/accessing-intel-ich-pch-gpios/ [2]: https://cdrdv2.intel.com/v1/dl/getContent/332690?wapkw=332690 [3]: https://cdrdv2.intel.com/v1/dl/getContent/332691?wapkw=332691 [4]: https://medium.com/@jacksonchen_43335/bios-gpio-p2sb-70e9b829b403 Signed-off-by: Jonathan Yong Co-developed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko Tested-by: Henning Schild Acked-by: Hans de Goede Acked-by: Linus Walleij Signed-off-by: Lee Jones drivers/platform/x86/intel/Kconfig | 12 ++++ drivers/platform/x86/intel/Makefile | 2 + drivers/platform/x86/intel/p2sb.c | 127 +++++++++++++++++++++++++++++++++ include/linux/platform_data/x86/p2sb.h | 28 ++++++++ 4 files changed, 169 insertions(+) commit 63f4b99f0089a9719aa4441015fe30ff4b6f10e5 Author: Stefan Binding Date: Thu Jun 30 01:23:29 2022 +0100 ALSA: hda: cs35l41: Support Speaker ID for laptops Some Laptops use a number of gpios to define which vendor is used for a particular laptop. Different coefficient files are used for different vendors. Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20220630002335.366545-9-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 174 +++++++++++++++++++++++++++++++++++++++++--- sound/pci/hda/cs35l41_hda.h | 1 + 2 files changed, 166 insertions(+), 9 deletions(-) commit bb6eb621f522d1f76ee4593966d2863401892407 Author: Stefan Binding Date: Thu Jun 30 01:23:28 2022 +0100 ALSA: hda: cs35l41: Support multiple load paths for firmware To be able to support different firmwares and tuning for different models, the driver needs to be able to load a different firmware and coefficient file based on its Subsystem ID. The driver attempts to load the firmware in the following order: /lib/firmware/cirrus/cs35l41-dsp1---dev<#>.wmfw /lib/firmware/cirrus/cs35l41-dsp1--.wmfw /lib/firmware/cirrus/cs35l41-dsp1-.wmfw Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20220630002335.366545-8-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 52 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 6 deletions(-) commit eef375960210fdc1ec2786bddc91ff100444ffb8 Author: Stefan Binding Date: Thu Jun 30 01:23:27 2022 +0100 ALSA: hda: cs35l41: Support reading subsystem id from ACPI On some laptop models, the ACPI contains the unique Subsystem ID, and this value should be preferred over the value from the HDA driver. Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20220630002335.366545-7-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit e99f3c7e3250dd895d2da506d0d910d641136d2c Author: Stefan Binding Date: Thu Jun 30 01:23:26 2022 +0100 ALSA: hda: cs35l41: Save Subsystem ID inside CS35L41 Driver The Subsystem ID is read from the HDA driver, and will be used by the CS35L41 driver to be able to uniquely identify the laptop, which is required to be able to define firmware to be used by specific models. Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20220630002335.366545-6-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 3 +++ sound/pci/hda/cs35l41_hda.h | 1 + 2 files changed, 4 insertions(+) commit 2e81e1fffd53ba108481f2f14388b628884efe61 Author: Vitaly Rodionov Date: Thu Jun 30 01:23:25 2022 +0100 ALSA: hda: cs35l41: Add initial DSP support and firmware loading This patch adds support for the CS35L41 DSP. The DSP allows for extra features, such as running speaker protection algorithms and hibernations. To utilize these features, the driver must load firmware into the DSP, as well as various tuning files which allow for customization for specific models. [ Slightly simplified Kconfig changes by tiwai ] Signed-off-by: Vitaly Rodionov Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20220630002335.366545-5-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai include/sound/cs35l41.h | 4 + sound/pci/hda/Kconfig | 2 + sound/pci/hda/cs35l41_hda.c | 251 +++++++++++++++++++++++++++++++++++++++++++- sound/pci/hda/cs35l41_hda.h | 13 +++ 4 files changed, 269 insertions(+), 1 deletion(-) commit 22d5cbd273a2ca90ba026ec82f0b9c3e984b0c1c Author: Stefan Binding Date: Thu Jun 30 01:23:24 2022 +0100 ALSA: hda: cs35l41: Save codec object inside component struct This is required for ALSA control support. Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20220630002335.366545-4-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 1 + sound/pci/hda/cs35l41_hda.h | 1 + sound/pci/hda/hda_component.h | 1 + sound/pci/hda/patch_realtek.c | 1 + 4 files changed, 4 insertions(+) commit e414b05e724f5fbae6e86d074d7668287a603b24 Author: Stefan Binding Date: Thu Jun 30 01:23:23 2022 +0100 ALSA: hda: hda_cs_dsp_ctl: Add apis to write the controls directly DSP controls are exposed as ALSA controls, however, some of these controls are required to be accessed by the driver. Add apis which allow read/write of these controls. The write api will also notify the ALSA control on value change. Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20220630002335.366545-3-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/hda_cs_dsp_ctl.c | 39 +++++++++++++++++++++++++++++++++++++++ sound/pci/hda/hda_cs_dsp_ctl.h | 4 ++++ 2 files changed, 43 insertions(+) commit 3233b978af23f11b4ad4f7f11a9a64bd05702b1f Author: Stefan Binding Date: Thu Jun 30 01:23:22 2022 +0100 ALSA: hda: hda_cs_dsp_ctl: Add Library to support CS_DSP ALSA controls The cs35l41 part contains a DSP which is able to run firmware. The cs_dsp library can be used to control the DSP. These controls can be exposed to userspace using ALSA controls. This library adds apis to be able to interface between cs_dsp and hda drivers and expose the relevant controls as ALSA controls. [ Note: the dependency of CONFIG_SND_HDA_CS_DSP_CONTROLS Kconfig is corrected. Also, this Kconfig isn't enabled now but will be actually enabled in a later patch -- tiwai ] Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20220630002335.366545-2-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai MAINTAINERS | 1 + sound/pci/hda/Kconfig | 4 + sound/pci/hda/Makefile | 2 + sound/pci/hda/hda_cs_dsp_ctl.c | 193 +++++++++++++++++++++++++++++++++++++++++ sound/pci/hda/hda_cs_dsp_ctl.h | 33 +++++++ 5 files changed, 233 insertions(+) commit 89422df9548002adfffb73799cebe4909cfc8902 Author: Uros Bizjak Date: Wed Jul 13 17:19:46 2022 +0200 ALSA: usb-audio: Use atomic_try_cmpxchg in ep_state_update Use atomic_try_cmpxchg instead of atomic_cmpxchg (*ptr, old, new) == old in ep_state_update. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). No functional change intended. Signed-off-by: Uros Bizjak Link: https://lore.kernel.org/r/20220713151946.4743-1-ubizjak@gmail.com Signed-off-by: Takashi Iwai sound/usb/endpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f83d9396d1f63048c423efa00e4e244da10a35fd Merge: 5ee8c8f930ba 0180290abb5c Author: Thomas Zimmermann Date: Thu Jul 14 09:57:37 2022 +0200 Merge drm/drm-next into drm-misc-next-fixes Backmerging from drm/drm-next for the final fixes that will go into v5.20. Signed-off-by: Thomas Zimmermann commit 0847d167d0f9bdc8f61e5e5d32831fa8fdcd150f Author: Max Filippov Date: Wed Jul 13 21:20:58 2022 -0700 xtensa: enable ARCH_HAS_GCOV_PROFILE_ALL Select ARCH_HAS_GCOV_PROFILE_ALL and set GCOV_PROFILE = n inside arch/xtensa/boot/lib. Signed-off-by: Max Filippov Documentation/features/debug/gcov-profile-all/arch-support.txt | 2 +- arch/xtensa/Kconfig | 1 + arch/xtensa/boot/lib/Makefile | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit c49731a04e7c14b2ccd146a7fddf92e78ccae143 Author: Max Filippov Date: Wed Jul 13 20:14:25 2022 -0700 xtensa: enable KCOV support Select ARCH_HAS_KCOV and set KCOV_INSTRUMENT = n inside arch/xtensa/boot/lib. Signed-off-by: Max Filippov Documentation/features/debug/kcov/arch-support.txt | 2 +- arch/xtensa/Kconfig | 1 + arch/xtensa/boot/lib/Makefile | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 628ccfc8f5f79dd548319408fcc53949fe97b258 Author: Yang Yingliang Date: Thu Jul 7 10:32:29 2022 +0800 xtensa: iss: fix handling error cases in iss_net_configure() The 'pdev' and 'netdev' need to be released in error cases of iss_net_configure(). Change the return type of iss_net_configure() to void, because it's not used. Fixes: 7282bee78798 ("[PATCH] xtensa: Architecture support for Tensilica Xtensa Part 8") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Max Filippov arch/xtensa/platforms/iss/network.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit 8864fb8359682912ee99235db7db916733a1fd7b Author: Max Filippov Date: Thu Jul 7 00:23:16 2022 -0700 xtensa: iss/network: provide release() callback Provide release() callback for the platform device embedded into struct iss_net_private and registered in the iss_net_configure so that platform_device_unregister could be called for it. Signed-off-by: Max Filippov arch/xtensa/platforms/iss/network.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0391334907937f841f23e77d0e1c0a2eb26c15d5 Author: Max Filippov Date: Wed Jul 6 22:57:35 2022 -0700 xtensa: iss/network: drop 'devices' list There are two per-device lists in the ISS network driver: command line parameters list and iss_net_private object list. The latter is only used for duplicate checking in the function iss_net_setup where the former should have been used. Drop iss_net_private object list and associated code and use command line parameters list in the iss_net_setup instead. Signed-off-by: Max Filippov arch/xtensa/platforms/iss/network.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) commit 94bf6aad5dbed1c93618035ec31b37927538c276 Author: Linkui Xiao Date: Thu Jul 14 09:56:47 2022 +0800 selftests/bpf: Return true/false (not 1/0) from bool functions Return boolean values ("true" or "false") instead of 1 or 0 from bool functions. This fixes the following warnings from coccicheck: tools/testing/selftests/bpf/progs/test_xdp_noinline.c:407:9-10: WARNING: return of 0/1 in function 'decap_v4' with return type bool tools/testing/selftests/bpf/progs/test_xdp_noinline.c:389:9-10: WARNING: return of 0/1 in function 'decap_v6' with return type bool tools/testing/selftests/bpf/progs/test_xdp_noinline.c:290:9-10: WARNING: return of 0/1 in function 'encap_v6' with return type bool tools/testing/selftests/bpf/progs/test_xdp_noinline.c:264:9-10: WARNING: return of 0/1 in function 'parse_tcp' with return type bool tools/testing/selftests/bpf/progs/test_xdp_noinline.c:242:9-10: WARNING: return of 0/1 in function 'parse_udp' with return type bool Generated by: scripts/coccinelle/misc/boolreturn.cocci Suggested-by: Stanislav Fomichev Signed-off-by: Linkui Xiao Signed-off-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20220714015647.25074-1-xiaolinkui@kylinos.cn .../selftests/bpf/progs/test_xdp_noinline.c | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) commit bf3f00378524adae16628cbadbd11ba7211863bb Author: Anquan Wu Date: Tue Jul 12 11:15:40 2022 +0800 libbpf: Fix the name of a reused map BPF map name is limited to BPF_OBJ_NAME_LEN. A map name is defined as being longer than BPF_OBJ_NAME_LEN, it will be truncated to BPF_OBJ_NAME_LEN when a userspace program calls libbpf to create the map. A pinned map also generates a path in the /sys. If the previous program wanted to reuse the map, it can not get bpf_map by name, because the name of the map is only partially the same as the name which get from pinned path. The syscall information below show that map name "process_pinned_map" is truncated to "process_pinned_". bpf(BPF_OBJ_GET, {pathname="/sys/fs/bpf/process_pinned_map", bpf_fd=0, file_flags=0}, 144) = -1 ENOENT (No such file or directory) bpf(BPF_MAP_CREATE, {map_type=BPF_MAP_TYPE_HASH, key_size=4, value_size=4,max_entries=1024, map_flags=0, inner_map_fd=0, map_name="process_pinned_",map_ifindex=0, btf_fd=3, btf_key_type_id=6, btf_value_type_id=10,btf_vmlinux_value_type_id=0}, 72) = 4 This patch check that if the name of pinned map are the same as the actual name for the first (BPF_OBJ_NAME_LEN - 1), bpf map still uses the name which is included in bpf object. Fixes: 26736eb9a483 ("tools: libbpf: allow map reuse") Signed-off-by: Anquan Wu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/OSZP286MB1725CEA1C95C5CB8E7CCC53FB8869@OSZP286MB1725.JPNP286.PROD.OUTLOOK.COM tools/lib/bpf/libbpf.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit b1fc28b338860b6c06a7a5881005a1ca9b108ba2 Author: Linkui Xiao Date: Tue Jul 12 15:23:02 2022 +0800 samples: bpf: Replace sizeof(arr)/sizeof(arr[0]) with ARRAY_SIZE The ARRAY_SIZE macro is more compact and more formal in linux source. Signed-off-by: Linkui Xiao Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20220712072302.13761-1-xiaolinkui@kylinos.cn samples/bpf/fds_example.c | 3 ++- samples/bpf/sock_example.c | 3 ++- samples/bpf/test_cgrp2_attach.c | 3 ++- samples/bpf/test_lru_dist.c | 2 +- samples/bpf/test_map_in_map_user.c | 4 +++- samples/bpf/tracex5_user.c | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) commit f54f85dfd757301791be8ce6fccc6f6604d82b40 Author: Don Brace Date: Fri Jul 8 13:48:06 2022 -0500 scsi: smartpqi: Update version to 2.1.18-045 Link: https://lore.kernel.org/r/165730608687.177165.11815510982277242966.stgit@brunhilda Reviewed-by: Gerry Morong Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e4b73b3fa2b98187c9cbb1364d6849ca4b7d6c25 Author: Don Brace Date: Fri Jul 8 13:48:01 2022 -0500 scsi: smartpqi: Update copyright to current year Update copyright to current year. Link: https://lore.kernel.org/r/165730608177.177165.13184715486635363193.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 drivers/scsi/smartpqi/Kconfig | 2 +- drivers/scsi/smartpqi/smartpqi.h | 2 +- drivers/scsi/smartpqi/smartpqi_init.c | 2 +- drivers/scsi/smartpqi/smartpqi_sas_transport.c | 2 +- drivers/scsi/smartpqi/smartpqi_sis.c | 2 +- drivers/scsi/smartpqi/smartpqi_sis.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 6d567dfee0b7b4c66fb1f62d59a2e62e2709b453 Author: Kevin Barnett Date: Fri Jul 8 13:47:56 2022 -0500 scsi: smartpqi: Add ctrl ready timeout module parameter Allow user to override the default driver timeout for controller ready. There are some rare configurations which require the driver to wait longer than the normal 3 minutes for the controller to complete its bootup sequence and be ready to accept commands from the driver. The module parameter is: ctrl_ready_timeout= { 0 | 30-1800 } and specifies the timeout in seconds for the driver to wait for controller ready. The valid range is 0 or 30-1800. The default value is 0, which causes the driver to use a timeout of 180 seconds (3 minutes). Link: https://lore.kernel.org/r/165730607666.177165.9221211345284471213.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Mike McGowen Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 28 ++++++++++++++++++++++++++++ drivers/scsi/smartpqi/smartpqi_sis.c | 4 +++- drivers/scsi/smartpqi/smartpqi_sis.h | 2 ++ 3 files changed, 33 insertions(+), 1 deletion(-) commit 2d80f4054f7f901b8ad97358a9069616ac8524c7 Author: Kevin Barnett Date: Fri Jul 8 13:47:51 2022 -0500 scsi: smartpqi: Update deleting a LUN via sysfs Change removing a LUN using sysfs from an internal driver function pqi_remove_all_scsi_devices() to using the .slave_destroy entry in the scsi_host_template. A LUN can be deleted via sysfs using this syntax: echo 1 > /sys/block/sdX/device/delete Link: https://lore.kernel.org/r/165730607154.177165.9723066932202995774.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Mike McGowen Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 48 ++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 18 deletions(-) commit cf15c3e734e8d25de7b4d9170f5a69ace633a583 Author: Mike McGowen Date: Fri Jul 8 13:47:46 2022 -0500 scsi: smartpqi: Add module param to disable managed ints Allow SMP affinity to be changeable by disabling managed interrupts. On distributions where the driver is enabled for multi-queue support the driver utilizes kernel managed interrupts, which automatically distributes interrupts to all available CPUs and assigns SMP affinity. On most distributions, the affinity can not be changed by the user. This change will allow managed interrupts to be disabled by the user via a module parameter while still allowing multi-queue support to function properly. Use the module parameter disable_managed_interrupts=1 Link: https://lore.kernel.org/r/165730606638.177165.12846020942931640329.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Mike McGowen Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 2 +- drivers/scsi/smartpqi/smartpqi_init.c | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) commit 6ce3cfb365ebb2b93ee547318c6a108e62c740a1 Author: Kevin Barnett Date: Fri Jul 8 13:47:41 2022 -0500 scsi: smartpqi: Fix RAID map race condition Correct a rare stale RAID map access when performing AIO during a RAID configuration change. A race condition in the driver could cause it to access a stale RAID map when a logical volume is reconfigured. Modify the driver logic to invalidate a RAID map very early when a RAID configuration change is detected and only switch to a new RAID map after the driver detects that the RAID map has changed. Link: https://lore.kernel.org/r/165730606128.177165.7671413443814750829.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Mike McGowen Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 110 ++++++++++++++++++++++------------ 1 file changed, 71 insertions(+), 39 deletions(-) commit 69695aeaa6621bc49cdd7a8e5a8d1042461e496e Author: Mahesh Rajashekhara Date: Fri Jul 8 13:47:36 2022 -0500 scsi: smartpqi: Fix DMA direction for RAID requests Correct a SOP READ and WRITE DMA flags for some requests. This update corrects DMA direction issues with SCSI commands removed from the controller's internal lookup table. Currently, SCSI READ BLOCK LIMITS (0x5) was removed from the controller lookup table and exposed a DMA direction flag issue. SCSI READ BLOCK LIMITS was recently removed from our controller lookup table so the controller uses the respective IU flag field to set the DMA data direction. Since the DMA direction is incorrect the FW never completes the request causing a hang. Some SCSI commands which use SCSI READ BLOCK LIMITS * sg_map * mt -f /dev/stX status After updating controller firmware, users may notice their tape units failing. This patch resolves the issue. Also, the AIO path DMA direction is correct. The DMA direction flag is a day-one bug with no reported BZ. Fixes: 6c223761eb54 ("smartpqi: initial commit of Microsemi smartpqi driver") Link: https://lore.kernel.org/r/165730605618.177165.9054223644512926624.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Mike McGowen Reviewed-by: Kevin Barnett Signed-off-by: Mahesh Rajashekhara Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 85b41834b0f43b3e5c079ea9ea9288b2568b8c60 Author: Kevin Barnett Date: Fri Jul 8 13:47:31 2022 -0500 scsi: smartpqi: Stop logging spurious PQI reset failures Change method used to detect controller firmware crash during PQI reset. PQI reset can fail with error -6 if firmware takes > 100ms to complete reset. Method used by driver to detect controller firmware crash during PQI was incorrect in some cases. Link: https://lore.kernel.org/r/165730605108.177165.1132931838384767071.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Mike McGowen Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2a9c2ba2bc47d2df8791a1e32788c76cafa5584c Author: Mike McGowen Date: Fri Jul 8 13:47:26 2022 -0500 scsi: smartpqi: Add PCI IDs for Lenovo controllers Add PCI IDs for Lenovo controllers (values in hex): VID / DID / SVID / SDID ---- ---- ---- ---- Lenovo 4350-8i HBA 9005 / 028f / 1d49 / 0220 Lenovo 4350-16i HBA 9005 / 028f / 1d49 / 0221 Lenovo 5350-8i RAID 9005 / 028f / 1d49 / 0520 Lenovo 5350-8i Internal RAID 9005 / 028f / 1d49 / 0522 Lenovo 9350-8i RAID 9005 / 028f / 1d49 / 0620 Lenovo 9350-8i Internal RAID 9005 / 028f / 1d49 / 0621 Lenovo 9350-16i RAID 9005 / 028f / 1d49 / 0622 Lenovo 9350-16i Internal RAID 9005 / 028f / 1d49 / 0623 Link: https://lore.kernel.org/r/165730604598.177165.9910276232981721083.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Mike McGowen Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 44e68c4af5d2ce622527e0be28207956394891e2 Author: Mike McGowen Date: Fri Jul 8 13:47:20 2022 -0500 scsi: smartpqi: Add PCI ID for Adaptec SmartHBA 2100-8i Add the PCI ID for (values in hex): VID / DID / SVID / SDID ---- ---- ---- ---- Adaptec SmartHBA 2100-8i-o 9005 / 0285 / 9005 / 0659 Link: https://lore.kernel.org/r/165730604089.177165.17257514581321583667.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Mike McGowen Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 4 ++++ 1 file changed, 4 insertions(+) commit 331f7e998b20c406e8d3689b1c0d77c6325a5d4b Author: Sagar Biradar Date: Fri Jul 8 13:47:15 2022 -0500 scsi: smartpqi: Fix PCI control linkdown system hang Fail all outstanding requests after a PCI linkdown. Block access to device SCSI attributes during the following conditions: "Cable pull" is called PQI_CTRL_SURPRISE_REMOVAL. "PCIe Link Down" is called PQI_CTRL_GRACEFUL_REMOVAL. Block access to device SCSI attributes during and in rare instances when the controller goes offline. Either outstanding requests or the access of SCSI attributes post linkdown can lead to a hang. Post linkdown, driver does not fail the outstanding requests leading to long wait time before all the IOs eventually fail. Also access of the SCSI attributes by host applications can lead to a system hang. Link: https://lore.kernel.org/r/165730603578.177165.4699352086827187263.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Mike McGowen Reviewed-by: Kevin Barnett Signed-off-by: Sagar Biradar Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 7 +++++ drivers/scsi/smartpqi/smartpqi_init.c | 48 ++++++++++++++++++++++++++++++++--- drivers/scsi/smartpqi/smartpqi_sis.c | 2 +- 3 files changed, 52 insertions(+), 5 deletions(-) commit 904f2bfda65e051906e79030b7cbfa2f5db3e5f4 Author: Kumar Meiyappan Date: Fri Jul 8 13:47:10 2022 -0500 scsi: smartpqi: Add driver support for multi-LUN devices Add driver support for up to 256 LUNs per device. Update AIO path to pass the appropriate LUN number for base-code to target the correct LUN. Update RAID IO path to pass the appropriate LUN number for FW to target the correct LUN. Pass the correct LUN number while doing a LUN reset. Count the outstanding commands based on LUN number. While removing a Multi-LUN device, wait for all outstanding commands to complete for all LUNs. Add Feature bit support. Link: https://lore.kernel.org/r/165730603067.177165.14016422176841798336.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Mike McGowen Reviewed-by: Kevin Barnett Signed-off-by: Kumar Meiyappan Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 15 ++++-- drivers/scsi/smartpqi/smartpqi_init.c | 92 +++++++++++++++++++++++------------ 2 files changed, 72 insertions(+), 35 deletions(-) commit 297bdc540f0e391568788f8ece3020653748a26f Author: Mike McGowen Date: Fri Jul 8 13:47:05 2022 -0500 scsi: smartpqi: Close write read holes Insert a minimum 1 millisecond delay after writing to a register before reading from it. SIS and PQI registers that can be both written to and read from can return stale data if read from too soon after having been written to. There is no read/write ordering or hazard detection on the inbound path to the MSGU from the PCIe bus, therefore reads could pass writes. Link: https://lore.kernel.org/r/165730602555.177165.11181012469428348394.stgit@brunhilda Reviewed-by: Scott Teel Signed-off-by: Mike McGowen Co-developed-by: Kevin Barnett Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_sis.c | 3 +++ 1 file changed, 3 insertions(+) commit dab5378485f601174a297a069d040ffb92918bf5 Author: Murthy Bhat Date: Fri Jul 8 13:47:00 2022 -0500 scsi: smartpqi: Add PCI IDs for ramaxel controllers Add the following controllers (values in hex): VID / DID / SVID / SDID ---- / ---- / ---- / ---- Ramaxel FBGF-RAD PM8204 9005 / 028F / 1CC4 / 0101 Ramaxel FBGF-RAD PM8222 9005 / 028F / 1CC4 / 0201 Link: https://lore.kernel.org/r/165730602045.177165.3720208650043407285.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Mike McGowen Reviewed-by: Kevin Barnett Signed-off-by: Murthy Bhat Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1d393227fc76cf0887077d6752af0bb2288e5802 Author: Gilbert Wu Date: Fri Jul 8 13:46:55 2022 -0500 scsi: smartpqi: Add controller fw version to console log Print controller firmware version to OS message log during driver initialization or after OFA. Link: https://lore.kernel.org/r/165730601536.177165.17698744242908911822.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Mike McGowen Reviewed-by: Kevin Barnett Signed-off-by: Gilbert Wu Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 3 +++ 1 file changed, 3 insertions(+) commit 4e7d26029ee7558badad4188ddb3a79566da69c0 Author: Mike McGowen Date: Fri Jul 8 13:46:50 2022 -0500 scsi: smartpqi: Shorten drive visibility after removal Check the response code returned from the LUN reset task management function and if it indicates the LUN is not valid, do not retry. Reduce rescan worker delay to 5 seconds for the event handler only. The removal of a drive from the OS could have been delayed up to 30 seconds after being physically pulled. The driver was retrying a LUN reset 3 times even though the return code indiciated the LUN was no longer valid. There was a 10 second delay between each retry. Additionally, the rescan worker was scheduled to run 10 seconds after the driver received the event. Link: https://lore.kernel.org/r/165730601025.177165.9416869335174437006.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Mike McGowen Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 1 + drivers/scsi/smartpqi/smartpqi_init.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit aec95e3a8dedb626739efd3d7d6cb7110cab31b0 Author: Karan Tilak Kumar Date: Thu Jul 7 13:51:55 2022 -0700 scsi: fnic: Refactor code in fnic probe to initialize SCSI layer Refactor code from fnic probe into a different function so that scsi layer initialization code is grouped together. Also, add log messages for better debugging. Link: https://lore.kernel.org/r/20220707205155.692688-1-kartilak@cisco.com Co-developed-by: Gian Carlo Boffa Signed-off-by: Gian Carlo Boffa Co-developed-by: Arulprabhu Ponnusamy Signed-off-by: Arulprabhu Ponnusamy Signed-off-by: Karan Tilak Kumar Signed-off-by: Martin K. Petersen drivers/scsi/fnic/fnic_main.c | 45 ++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) commit f712e24c0b2e638481b439ee2f1f33d6938a6cb9 Author: Michael Schmitz Date: Wed Jul 13 19:49:13 2022 +1200 scsi: gvp11.c: Fix DMA mask calculation error DMA masks given in the Zorro ID table don't contain the 2 byte alignment quirk seen in the GVP11_XFER_MASK macro from gvp11.h so no need to account for that. DMA masks passed to dma_set_mask_and_coherent() must be 64 bit, add the missing cast in the TO_DMA_MASK macro used to convert driver DMA masks to DMA API masks. Link: https://lore.kernel.org/r/6d1d88ee-1cf6-c735-1e6d-bafd2096e322@gmail.com Link: https://lore.kernel.org/r/20220713074913.7873-1-schmitzmic@gmail.com Fixes: 158da6bcae7a ("scsi: gvp11: Convert m68k WD33C93 drivers to DMA API") CC: linux-scsi@vger.kernel.org Signed-off-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/gvp11.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9b633670087ea7a683d2b47e18c2803657486ef1 Author: Hariprasad Kelam Date: Tue Jul 12 21:48:15 2022 +0530 octeontx2-af: Limit link bringup time at firmware Set the maximum time firmware should poll for a link. If not set firmware could block CPU for a long time resulting in mailbox failures. If link doesn't come up within 1second, firmware will anyway notify the status as and when LINK comes up Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Geetha Sowjanya Link: https://lore.kernel.org/r/20220712161815.12621-1-gakula@marvell.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 14 +++++++++++--- drivers/net/ethernet/marvell/octeontx2/af/cgx.h | 2 +- drivers/net/ethernet/marvell/octeontx2/af/cgx_fw_if.h | 2 ++ drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) commit c641ffdb5904df0dc249ef3f2d753e2a684779c6 Author: Keoseong Park Date: Fri Jul 8 14:20:06 2022 +0900 scsi: ufs: core: Remove UIC_HIBERN8_ENTER_RETRIES Commit 4db7a2360597 ("scsi: ufs: Fix concurrency of error handler and other error recovery paths") removed all callers of UIC_HIBERN8_ENTER_RETRIES. Hence also remove the macro itself. Link: https://lore.kernel.org/r/20220708052006epcms2p2d1129dbf95fd77f46906200ccb0a9ccd@epcms2p2 Reviewed-by: Avri Altman Signed-off-by: Keoseong Park Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 3 --- 1 file changed, 3 deletions(-) commit 3d73b200f9893d8f5ba5d105e8b69c8d16744fa2 Author: Chanho Park Date: Wed Jul 6 11:02:55 2022 +0900 scsi: ufs: ufs-exynos: Change ufs phy control sequence Since commit 1599069a62c6 ("phy: core: Warn when phy_power_on is called before phy_init"), the following warning has been reported: phy_power_on was called before phy_init To address this, we need to remove phy_power_on from exynos_ufs_phy_init() and move it after phy_init. phy_power_off and phy_exit are also necessary in exynos_ufs_remove(). Link: https://lore.kernel.org/r/20220706020255.151177-4-chanho61.park@samsung.com Reviewed-by: Krzysztof Kozlowski Signed-off-by: Chanho Park Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-exynos.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 298f342245066309189d8637ca7339d56840c3e1 Author: Dave Chinner Date: Thu Jul 14 12:05:07 2022 +1000 xfs: lockless buffer lookup Now that we have a standalone fast path for buffer lookup, we can easily convert it to use rcu lookups. When we continually hammer the buffer cache with trylock lookups, we end up with a huge amount of lock contention on the per-ag buffer hash locks: - 92.71% 0.05% [kernel] [k] xfs_inodegc_worker - 92.67% xfs_inodegc_worker - 92.13% xfs_inode_unlink - 91.52% xfs_inactive_ifree - 85.63% xfs_read_agi - 85.61% xfs_trans_read_buf_map - 85.59% xfs_buf_read_map - xfs_buf_get_map - 85.55% xfs_buf_find - 72.87% _raw_spin_lock - do_raw_spin_lock 71.86% __pv_queued_spin_lock_slowpath - 8.74% xfs_buf_rele - 7.88% _raw_spin_lock - 7.88% do_raw_spin_lock 7.63% __pv_queued_spin_lock_slowpath - 1.70% xfs_buf_trylock - 1.68% down_trylock - 1.41% _raw_spin_lock_irqsave - 1.39% do_raw_spin_lock __pv_queued_spin_lock_slowpath - 0.76% _raw_spin_unlock 0.75% do_raw_spin_unlock This is basically hammering the pag->pag_buf_lock from lots of CPUs doing trylocks at the same time. Most of the buffer trylock operations ultimately fail after we've done the lookup, so we're really hammering the buf hash lock whilst making no progress. We can also see significant spinlock traffic on the same lock just under normal operation when lots of tasks are accessing metadata from the same AG, so let's avoid all this by converting the lookup fast path to leverages the rhashtable's ability to do rcu protected lookups. We avoid races with the buffer release path by using atomic_inc_not_zero() on the buffer hold count. Any buffer that is in the LRU will have a non-zero count, thereby allowing the lockless fast path to be taken in most cache hit situations. If the buffer hold count is zero, then it is likely going through the release path so in that case we fall back to the existing lookup miss slow path. The slow path will then do an atomic lookup and insert under the buffer hash lock and hence serialise correctly against buffer release freeing the buffer. The use of rcu protected lookups means that buffer handles now need to be freed by RCU callbacks (same as inodes). We still free the buffer pages before the RCU callback - we won't be trying to access them at all on a buffer that has zero references - but we need the buffer handle itself to be present for the entire rcu protected read side to detect a zero hold count correctly. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/xfs_buf.c | 22 +++++++++++++++------- fs/xfs/xfs_buf.h | 1 + 2 files changed, 16 insertions(+), 7 deletions(-) commit 32dd4f9c506b1bf147c24cf05423cd893bc06e38 Author: Dave Chinner Date: Thu Jul 14 12:04:43 2022 +1000 xfs: remove a superflous hash lookup when inserting new buffers Currently on the slow path insert we repeat the initial hash table lookup before we attempt the insert, resulting in a two traversals of the hash table to ensure the insert is valid. The rhashtable API provides a method for an atomic lookup and insert operation, so we can avoid one of the hash table traversals by using this method. Adapted from a large patch containing this optimisation by Christoph Hellwig. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/xfs_buf.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit d8d9bbb0ee6c79191b704d88c8ae712b89e0d2bb Author: Dave Chinner Date: Thu Jul 14 12:04:38 2022 +1000 xfs: reduce the number of atomic when locking a buffer after lookup Avoid an extra atomic operation in the non-trylock case by only doing a trylock if the XBF_TRYLOCK flag is set. This follows the pattern in the IO path with NOWAIT semantics where the "trylock-fail-lock" path showed 5-10% reduced throughput compared to just using single lock call when not under NOWAIT conditions. So make that same change here, too. See commit 942491c9e6d6 ("xfs: fix AIM7 regression") for details. Signed-off-by: Dave Chinner [hch: split from a larger patch] Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/xfs_buf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 348000804a0f4dea74219a927e081d6e7dee792f Author: Dave Chinner Date: Thu Jul 14 12:04:31 2022 +1000 xfs: merge xfs_buf_find() and xfs_buf_get_map() Now that we factored xfs_buf_find(), we can start separating into distinct fast and slow paths from xfs_buf_get_map(). We start by moving the lookup map and perag setup to _get_map(), and then move all the specifics of the fast path lookup into xfs_buf_lookup() and call it directly from _get_map(). We the move all the slow path code to xfs_buf_find_insert(), which is now also called directly from _get_map(). As such, xfs_buf_find() now goes away. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/xfs_buf.c | 202 +++++++++++++++++++++++++------------------------------ 1 file changed, 93 insertions(+), 109 deletions(-) commit de67dc575434dca8d60b1e181ed5dd296392ffce Author: Dave Chinner Date: Thu Jul 14 12:02:46 2022 +1000 xfs: break up xfs_buf_find() into individual pieces xfs_buf_find() is made up of three main parts: lookup, insert and locking. The interactions with xfs_buf_get_map() require it to be called twice - once for a pure lookup, and again on lookup failure so the insert path can be run. We want to simplify this down a lot, so split it into a fast path lookup, a slow path insert and a "lock the found buffer" helper. This will then let us integrate these operations more effectively into xfs_buf_get_map() in future patches. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/xfs_buf.c | 158 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 104 insertions(+), 54 deletions(-) commit 5dc0f7491f9af356a3c78d56fe55890ebf37a1ac Author: Michael Walle Date: Tue Jul 12 19:00:10 2022 +0200 NFC: nxp-nci: add error reporting The PN7160 supports error notifications. Add the appropriate callbacks. Signed-off-by: Michael Walle Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220712170011.2990629-1-michael@walle.cc Signed-off-by: Jakub Kicinski drivers/nfc/nxp-nci/core.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 784eb7d8dd4163b82a19b914f76b2834a58a3e4c Author: Dave Chinner Date: Thu Jul 14 11:47:42 2022 +1000 xfs: add in-memory iunlink log item Now that we have a clean operation to update the di_next_unlinked field of inode cluster buffers, we can easily defer this operation to transaction commit time so we can order the inode cluster buffer locking consistently. To do this, we introduce a new in-memory log item to track the unlinked list item modification that we are going to make. This follows the same observations as the in-memory double linked list used to track unlinked inodes in that the inodes on the list are pinned in memory and cannot go away, and hence we can simply reference them for the duration of the transaction without needing to take active references or pin them or look them up. This allows us to pass the xfs_inode to the transaction commit code along with the modification to be made, and then order the logged modifications via the ->iop_sort and ->iop_precommit operations for the new log item type. As this is an in-memory log item, it doesn't have formatting, CIL or AIL operational hooks - it exists purely to run the inode unlink modifications and is then removed from the transaction item list and freed once the precommit operation has run. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/Makefile | 1 + fs/xfs/xfs_inode.c | 64 +---------------- fs/xfs/xfs_iunlink_item.c | 180 ++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_iunlink_item.h | 27 +++++++ fs/xfs/xfs_super.c | 10 +++ 5 files changed, 219 insertions(+), 63 deletions(-) commit fad743d7cd8bd92d03c09e71f29eace860f50415 Author: Dave Chinner Date: Thu Jul 14 11:47:26 2022 +1000 xfs: add log item precommit operation For inodes that are dirty, we have an attached cluster buffer that we want to use to track the dirty inode through the AIL. Unfortunately, locking the cluster buffer and adding it to the transaction when the inode is first logged in a transaction leads to buffer lock ordering inversions. The specific problem is ordering against the AGI buffer. When modifying unlinked lists, the buffer lock order is AGI -> inode cluster buffer as the AGI buffer lock serialises all access to the unlinked lists. Unfortunately, functionality like xfs_droplink() logs the inode before calling xfs_iunlink(), as do various directory manipulation functions. The inode can be logged way down in the stack as far as the bmapi routines and hence, without a major rewrite of lots of APIs there's no way we can avoid the inode being logged by something until after the AGI has been logged. As we are going to be using ordered buffers for inode AIL tracking, there isn't a need to actually lock that buffer against modification as all the modifications are captured by logging the inode item itself. Hence we don't actually need to join the cluster buffer into the transaction until just before it is committed. This means we do not perturb any of the existing buffer lock orders in transactions, and the inode cluster buffer is always locked last in a transaction that doesn't otherwise touch inode cluster buffers. We do this by introducing a precommit log item method. This commit just introduces the mechanism; the inode item implementation is in followup commits. The precommit items need to be sorted into consistent order as we may be locking multiple items here. Hence if we have two dirty inodes in cluster buffers A and B, and some other transaction has two separate dirty inodes in the same cluster buffers, locking them in different orders opens us up to ABBA deadlocks. Hence we sort the items on the transaction based on the presence of a sort log item method. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_icache.c | 1 + fs/xfs/xfs_trans.c | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_trans.h | 6 ++-- 3 files changed, 96 insertions(+), 2 deletions(-) commit 062efdb0803adac3fad039d681789c5e01818bef Author: Dave Chinner Date: Thu Jul 14 11:46:59 2022 +1000 xfs: combine iunlink inode update functions Combine the logging of the inode unlink list update into the calling function that looks up the buffer we end up logging. These do not need to be separate functions as they are both short, simple operations and there's only a single call path through them. This new function will end up being the core of the iunlink log item processing... Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/xfs_inode.c | 52 ++++++++++++++++------------------------------------ 1 file changed, 16 insertions(+), 36 deletions(-) commit 5301f87013145a874cda4ae008b6fcc2b810a721 Author: Dave Chinner Date: Thu Jul 14 11:46:46 2022 +1000 xfs: clean up xfs_iunlink_update_inode() We no longer need to have this function return the previous next agino value from the on-disk inode as we have it in the in-core inode now. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/xfs_inode.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 2fd26cc07e9f8050e29bf314cbf1bcb64dbe088c Author: Dave Chinner Date: Thu Jul 14 11:46:43 2022 +1000 xfs: double link the unlinked inode list Now we have forwards traversal via the incore inode in place, we now need to add back pointers to the incore inode to entirely replace the back reference cache. We use the same lookup semantics and constraints as for the forwards pointer lookups during unlinks, and so we can look up any inode in the unlinked list directly and update the list pointers, forwards or backwards, at any time. The only wrinkle in converting the unlinked list manipulations to use in-core previous pointers is that log recovery doesn't have the incore inode state built up so it can't just read in an inode and release it to finish off the unlink. Hence we need to modify the traversal in recovery to read one inode ahead before we release the inode at the head of the list. This populates the next->prev relationship sufficient to be able to replay the unlinked list and hence greatly simplify the runtime code. This recovery algorithm also requires that we actually remove inodes from the unlinked list one at a time as background inode inactivation will result in unlinked list removal racing with the building of the in-memory unlinked list state. We could serialise this by holding the AGI buffer lock when constructing the in memory state, but all that does is lockstep background processing with list building. It is much simpler to flush the inodegc immediately after releasing the inode so that it is unlinked immediately and there is no races present at all. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_ag.c | 8 -- fs/xfs/libxfs/xfs_ag.h | 6 - fs/xfs/xfs_icache.c | 2 + fs/xfs/xfs_inode.c | 344 ++++++++--------------------------------------- fs/xfs/xfs_inode.h | 4 +- fs/xfs/xfs_log_recover.c | 36 ++++- 6 files changed, 90 insertions(+), 310 deletions(-) commit a83d5a8b1d946264e24299d6697bb03fe5198668 Author: Dave Chinner Date: Thu Jul 14 11:43:09 2022 +1000 xfs: introduce xfs_iunlink_lookup When an inode is on an unlinked list during normal operation, it is guaranteed to be pinned in memory as it is either referenced by the current unlink operation or it has a open file descriptor that references it and has it pinned in memory. Hence to look up an inode on the unlinked list, we can do a direct inode cache lookup and always expect the lookup to succeed. Add a function to do this lookup based on the agino that we use to link the chain of unlinked inodes together so we can begin the conversion the unlinked list manipulations to use in-memory inodes rather than inode cluster buffers and remove the backref cache. Use this lookup function to replace the on-disk inode buffer walk when removing inodes from the unlinked list with an in-core inode unlinked list walk. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/xfs_inode.c | 161 ++++++++++++++++++++++------------------------------- fs/xfs/xfs_trace.h | 1 - 2 files changed, 66 insertions(+), 96 deletions(-) commit 04755d2e5821b3afbaadd09fe5df58d04de36484 Author: Dave Chinner Date: Thu Jul 14 11:42:39 2022 +1000 xfs: refactor xlog_recover_process_iunlinks() For upcoming changes to the way inode unlinked list processing is done, the structure of recovery needs to change slightly. We also really need to untangle the messy error handling in list recovery so that actions like emptying the bucket on inode lookup failure are associated with the bucket list walk failing, not failing to look up the inode. Refactor the recovery code now to keep the re-organisation seperate to the algorithm changes. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/xfs_log_recover.c | 137 ++++++++++++++++++++++++----------------------- 1 file changed, 71 insertions(+), 66 deletions(-) commit 4fcc94d653270fcc7800dbaf3b11f78cb462b293 Author: Dave Chinner Date: Thu Jul 14 11:38:54 2022 +1000 xfs: track the iunlink list pointer in the xfs_inode Having direct access to the i_next_unlinked pointer in unlinked inodes greatly simplifies the processing of inodes on the unlinked list. We no longer need to look up the inode buffer just to find next inode in the list if the xfs_inode is in memory. These improvements will be realised over upcoming patches as other dependencies on the inode buffer for unlinked list processing are removed. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_inode_buf.c | 3 ++- fs/xfs/xfs_inode.c | 5 ++++- fs/xfs/xfs_inode.h | 3 +++ fs/xfs/xfs_log_recover.c | 17 +---------------- 4 files changed, 10 insertions(+), 18 deletions(-) commit a4454cd69c66bf3e3bbda352b049732f836fc6b2 Author: Dave Chinner Date: Thu Jul 14 11:36:40 2022 +1000 xfs: factor the xfs_iunlink functions Prep work that separates the locking that protects the unlinked list from the actual operations being performed. This also helps document the fact they are performing list insert and remove operations. No functional code change. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/xfs_inode.c | 108 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 42 deletions(-) commit 04a98a036cf8b810dda172a9dcfcbd783bf63655 Author: Zhang Yi Date: Thu Jul 14 11:36:36 2022 +1000 xfs: flush inode gc workqueue before clearing agi bucket In the procedure of recover AGI unlinked lists, if something bad happenes on one of the unlinked inode in the bucket list, we would call xlog_recover_clear_agi_bucket() to clear the whole unlinked bucket list, not the unlinked inodes after the bad one. If we have already added some inodes to the gc workqueue before the bad inode in the list, we could get below error when freeing those inodes, and finaly fail to complete the log recover procedure. XFS (ram0): Internal error xfs_iunlink_remove at line 2456 of file fs/xfs/xfs_inode.c. Caller xfs_ifree+0xb0/0x360 [xfs] The problem is xlog_recover_clear_agi_bucket() clear the bucket list, so the gc worker fail to check the agino in xfs_verify_agino(). Fix this by flush workqueue before clearing the bucket. Fixes: ab23a7768739 ("xfs: per-cpu deferred inode inactivation queues") Signed-off-by: Zhang Yi Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner fs/xfs/xfs_log_recover.c | 1 + 1 file changed, 1 insertion(+) commit b184b35d06b2a3de65ff2ef4303f83535572266c Author: Sean Christopherson Date: Tue Jul 12 01:58:38 2022 +0000 KVM: VMX: Update PT MSR intercepts during filter change iff PT in host+guest Update the Processor Trace (PT) MSR intercepts during a filter change if and only if PT may be exposed to the guest, i.e. only if KVM is operating in the so called "host+guest" mode where PT can be used simultaneously by both the host and guest. If PT is in system mode, the host is the sole owner of PT and the MSRs should never be passed through to the guest. Luckily the missed check only results in unnecessary work, as select RTIT MSRs are passed through only when RTIT tracing is enabled "in" the guest, and tracing can't be enabled in the guest when KVM is in system mode (writes to guest.MSR_IA32_RTIT_CTL are disallowed). Cc: Xiaoyao Li Signed-off-by: Sean Christopherson Reviewed-by: Xiaoyao Li Link: https://lore.kernel.org/r/20220712015838.1253995-1-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/vmx/vmx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3d5f8d03786fee6aa7a4c59446c5356775aeb4d9 Author: Sean Christopherson Date: Tue Jun 14 20:07:07 2022 +0000 KVM: selftests: Drop unused SVM_CPUID_FUNC macro Drop SVM_CPUID_FUNC to reduce the probability of tests open coding CPUID checks instead of using kvm_cpu_has() or this_cpu_has(). Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-43-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/svm.h | 2 -- 1 file changed, 2 deletions(-) commit 12a985aeb40691a27befb0ae99707d0322b4bd8e Author: Sean Christopherson Date: Tue Jun 14 20:07:06 2022 +0000 KVM: selftests: Use the common cpuid() helper in cpu_vendor_string_is() Use cpuid() to get CPUID.0x0 in cpu_vendor_string_is(), thus eliminating the last open coded usage of CPUID (ignoring debug_regs.c, which emits CPUID from the guest to trigger a VM-Exit and doesn't actually care about the results of CPUID). Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-42-seanjc@google.com tools/testing/selftests/kvm/lib/x86_64/processor.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 090cd45b21cd0d26297315d4bd9b83d9dcad10e1 Author: Sean Christopherson Date: Tue Jun 14 20:07:05 2022 +0000 KVM: selftests: Clean up requirements for XFD-aware XSAVE features Provide informative error messages for the various checks related to requesting access to XSAVE features that are buried behind XSAVE Feature Disabling (XFD). Opportunistically rename the helper to have "require" in the name so that it's somewhat obvious that the helper may skip the test. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-41-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 5 ++++- tools/testing/selftests/kvm/lib/x86_64/processor.c | 8 +++++--- tools/testing/selftests/kvm/x86_64/amx_test.c | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) commit d4c94ee8121cce64f2882f3bdcc346dc3d01bcdd Author: Sean Christopherson Date: Tue Jun 14 20:07:04 2022 +0000 KVM: selftests: Skip AMX test if ARCH_REQ_XCOMP_GUEST_PERM isn't supported Skip the AMX test instead of silently returning if the host kernel doesn't support ARCH_REQ_XCOMP_GUEST_PERM. KVM didn't support XFD until v5.17, so it's extremely unlikely allowing the test to run on a pre-v5.15 kernel is the right thing to do. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-40-seanjc@google.com tools/testing/selftests/kvm/lib/x86_64/processor.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 7fbb653e01fdd45b377674a9e77da473d49afd38 Author: Sean Christopherson Date: Tue Jun 14 20:07:03 2022 +0000 KVM: selftests: Check KVM's supported CPUID, not host CPUID, for XFD Use kvm_cpu_has() to check for XFD supported in vm_xsave_req_perm(), simply checking host CPUID doesn't guarantee KVM supports AMX/XFD. Opportunistically hoist the check above the bit check; if XFD isn't supported, it's far better to get a "not supported at all" message, as opposed to a "feature X isn't supported" message". Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-39-seanjc@google.com .../testing/selftests/kvm/include/x86_64/processor.h | 1 + tools/testing/selftests/kvm/lib/x86_64/processor.c | 19 ++----------------- 2 files changed, 3 insertions(+), 17 deletions(-) commit d04019274d13301b413c28b85f1b1775a9d63062 Author: Sean Christopherson Date: Tue Jun 14 20:07:02 2022 +0000 KVM: selftests: Inline "get max CPUID leaf" helpers Make the "get max CPUID leaf" helpers static inline, there's no reason to bury the one liners in processor.c. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-38-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 11 +++++++++-- tools/testing/selftests/kvm/lib/x86_64/processor.c | 10 ---------- 2 files changed, 9 insertions(+), 12 deletions(-) commit 28e09d321035149b881ceb3253d0a6729b91d506 Author: Sean Christopherson Date: Tue Jun 14 20:07:01 2022 +0000 KVM: selftests: Rename kvm_get_supported_cpuid_index() to __..._entry() Rename kvm_get_supported_cpuid_index() to __kvm_get_supported_cpuid_entry() to better show its relationship to kvm_get_supported_cpuid_entry(), and because the helper returns a CPUID entry, not the index of an entry. No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-37-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 446ab76a0f7addb196c154636eb04c478ccecdcf Author: Sean Christopherson Date: Tue Jun 14 20:07:00 2022 +0000 KVM: selftests: Drop unnecessary use of kvm_get_supported_cpuid_index() Use kvm_get_supported_cpuid_entry() instead of kvm_get_supported_cpuid_index() when passing in '0' for the index, which just so happens to be the case in all remaining users of kvm_get_supported_cpuid_index() except kvm_get_supported_cpuid_entry(). Keep the helper as there may be users in the future, and it's not doing any harm. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-36-seanjc@google.com tools/testing/selftests/kvm/x86_64/amx_test.c | 2 +- tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c | 4 ++-- tools/testing/selftests/kvm/x86_64/vmx_pmu_caps_test.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 05c2b6e5facc4f04e4df0cfedbcc8943318ed983 Author: Sean Christopherson Date: Tue Jun 14 20:06:59 2022 +0000 KVM: selftests: Use this_cpu_has() to detect SVM support in L1 Replace an evil open coded instance of querying CPUID from L1 with this_cpu_has(X86_FEATURE_SVM). No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-35-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/svm_util.h | 13 ------------- tools/testing/selftests/kvm/x86_64/smm_test.c | 4 ++-- tools/testing/selftests/kvm/x86_64/state_test.c | 2 +- 3 files changed, 3 insertions(+), 16 deletions(-) commit 2b424a76d02cf6f8d94eeb253b1c0e4327b1718a Author: Sean Christopherson Date: Tue Jun 14 20:06:58 2022 +0000 KVM: selftests: Use this_cpu_has() in CR4/CPUID sync test Use this_cpu_has() to query OSXSAVE from the L1 guest in the CR4=>CPUID sync test. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-34-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 3 --- tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c | 14 ++------------ 2 files changed, 2 insertions(+), 15 deletions(-) commit 48ce3ed052e8336a17c64ca1787648d9e17c54d9 Author: Sean Christopherson Date: Tue Jun 14 20:06:57 2022 +0000 KVM: selftests: Add this_cpu_has() to query X86_FEATURE_* via cpuid() Add this_cpu_has() to query an X86_FEATURE_* via cpuid(), i.e. to query a feature from L1 (or L2) guest code. Arbitrarily select the AMX test to be the first user. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-33-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 12 +++++++++++- tools/testing/selftests/kvm/x86_64/amx_test.c | 9 ++------- 2 files changed, 13 insertions(+), 8 deletions(-) commit 8fe09d6a91be94be6910d843bb21d60b1fc99cd2 Author: Sean Christopherson Date: Tue Jun 14 20:06:56 2022 +0000 KVM: selftests: Set input function/index in raw CPUID helper(s) Set the function/index for CPUID in the helper instead of relying on the caller to do so. In addition to reducing the risk of consuming an uninitialized ECX, having the function/index embedded in the call makes it easier to understand what is being checked. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-32-seanjc@google.com .../testing/selftests/kvm/include/x86_64/processor.h | 16 +++++++++++++--- tools/testing/selftests/kvm/lib/x86_64/processor.c | 13 ++++--------- tools/testing/selftests/kvm/x86_64/amx_test.c | 19 ++++--------------- tools/testing/selftests/kvm/x86_64/cpuid_test.c | 11 +++++------ 4 files changed, 26 insertions(+), 33 deletions(-) commit 813e38cd6d7b4247314427a901015867e0534356 Author: Sean Christopherson Date: Tue Jun 14 20:06:55 2022 +0000 KVM: selftests: Make get_supported_cpuid() returns "const" Tag the returned CPUID pointers from kvm_get_supported_cpuid(), kvm_get_supported_hv_cpuid(), and vcpu_get_supported_hv_cpuid() "const" to prevent reintroducing the broken pattern of modifying the static "cpuid" variable used by kvm_get_supported_cpuid() to cache the results of KVM_GET_SUPPORTED_CPUID. Update downstream consumers as needed. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-31-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 24 +++++++++---------- tools/testing/selftests/kvm/lib/x86_64/processor.c | 27 +++++++--------------- tools/testing/selftests/kvm/x86_64/cpuid_test.c | 12 ++++------ tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | 10 ++++---- .../selftests/kvm/x86_64/pmu_event_filter_test.c | 10 ++++---- .../selftests/kvm/x86_64/vmx_pmu_caps_test.c | 2 +- 6 files changed, 36 insertions(+), 49 deletions(-) commit 7ed5a54e8282edfb464ccce4d3cf3a6f1d79b14a Author: Sean Christopherson Date: Tue Jun 14 20:06:54 2022 +0000 KVM: selftests: Use vcpu_clear_cpuid_feature() to clear x2APIC Add X86_FEATURE_X2APIC and use vcpu_clear_cpuid_feature() to clear x2APIC support in the xAPIC state test. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-30-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 1 + tools/testing/selftests/kvm/x86_64/xapic_state_test.c | 10 +--------- 2 files changed, 2 insertions(+), 9 deletions(-) commit 4ee315231e3d7f85ab672fe231421614cad8f68d Author: Sean Christopherson Date: Tue Jun 14 20:06:53 2022 +0000 KVM: selftests: Use vcpu_{set,clear}_cpuid_feature() in nVMX state test Use vcpu_{set,clear}_cpuid_feature() to toggle nested VMX support in the vCPU CPUID module in the nVMX state test. Drop CPUID_VMX as there are no longer any users. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-29-seanjc@google.com .../testing/selftests/kvm/include/x86_64/processor.h | 1 - .../selftests/kvm/x86_64/vmx_set_nested_state_test.c | 20 ++------------------ 2 files changed, 2 insertions(+), 19 deletions(-) commit 49f6876a2e1e7e8a4dc3f2b27f720502d62e4804 Author: Sean Christopherson Date: Tue Jun 14 20:06:52 2022 +0000 KVM: selftests: Use vcpu_get_cpuid_entry() in CPUID test Use vcpu_get_cpuid_entry() instead of an open coded equivalent in the CPUID test. No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-28-seanjc@google.com tools/testing/selftests/kvm/x86_64/cpuid_test.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4dcd130c9b3d64464b5c44aba071203095f77e63 Author: Sean Christopherson Date: Tue Jun 14 20:06:51 2022 +0000 KVM: selftests: Use vCPU's CPUID directly in Hyper-V test Use the vCPU's persistent CPUID array directly when manipulating the set of exposed Hyper-V CPUID features. Drop set_cpuid() to route all future modification through the vCPU helpers; the Hyper-V features test was the last user. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-27-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 9 -- tools/testing/selftests/kvm/lib/x86_64/processor.c | 18 --- .../testing/selftests/kvm/x86_64/hyperv_features.c | 126 +++++++++++---------- 3 files changed, 64 insertions(+), 89 deletions(-) commit 3a5d36b32bd26d88d8dfe8f1eff702e138ea18cd Author: Sean Christopherson Date: Tue Jun 14 20:06:50 2022 +0000 KVM: selftests: Use vcpu_get_cpuid_entry() in PV features test (sort of) Add a new helper, vcpu_clear_cpuid_entry(), to do a RMW operation on the vCPU's CPUID model to clear a given CPUID entry, and use it to clear KVM's paravirt feature instead of operating on kvm_get_supported_cpuid()'s static "cpuid" variable. This also eliminates a user of the soon-be-defunct set_cpuid() helper. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-26-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 1 + tools/testing/selftests/kvm/lib/x86_64/processor.c | 11 +++++++++++ tools/testing/selftests/kvm/x86_64/kvm_pv_test.c | 12 +----------- 3 files changed, 13 insertions(+), 11 deletions(-) commit b78843be77968b1e5a071c7ed7fd8f3094e8f0a2 Author: Sean Christopherson Date: Fri Jul 8 14:42:49 2022 -0700 KVM: selftests: Use vcpu_clear_cpuid_feature() in monitor_mwait_test Use vcpu_clear_cpuid_feature() to the MONITOR/MWAIT CPUID feature bit in the MONITOR/MWAIT quirk test. Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/x86_64/monitor_mwait_test.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 1940af0b8179ae2c2bd287fbd3edaab59df5fb55 Author: Sean Christopherson Date: Tue Jun 14 20:06:49 2022 +0000 KVM: selftests: Add and use helper to set vCPU's CPUID maxphyaddr Add a helper to set a vCPU's guest.MAXPHYADDR, and use it in the test that verifies the emulator returns an error on an unknown instruction when KVM emulates in response to an EPT violation with a GPA that is legal in hardware but illegal with respect to the guest's MAXPHYADDR. Add a helper even though there's only a single user at this time. Before its removal, mmu_role_test also stuffed guest.MAXPHYADDR, and the helper provides a small amount of clarity. More importantly, this eliminates a set_cpuid() user and an instance of modifying kvm_get_supported_cpuid()'s static "cpuid". Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-25-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 2 ++ tools/testing/selftests/kvm/lib/x86_64/processor.c | 8 ++++++++ tools/testing/selftests/kvm/x86_64/emulator_error_test.c | 10 +--------- 3 files changed, 11 insertions(+), 9 deletions(-) commit 7af7161d87383f84caec1e8aaf6366c31ce845ec Author: Sean Christopherson Date: Tue Jun 14 20:06:48 2022 +0000 KVM: selftests: Use vm->pa_bits to generate reserved PA bits Use vm->pa_bits to generate the mask of physical address bits that are reserved in page table entries. vm->pa_bits is set when the VM is created, i.e. it's guaranteed to be valid when populating page tables. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-24-seanjc@google.com tools/testing/selftests/kvm/lib/x86_64/processor.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit c41880b5f040120fc27eb2305a0ab3f179c89f9a Author: Sean Christopherson Date: Tue Jun 14 20:06:47 2022 +0000 KVM: selftests: Add helpers to get and modify a vCPU's CPUID entries Add helpers to get a specific CPUID entry for a given vCPU, and to toggle a specific CPUID-based feature for a vCPU. The helpers will reduce the amount of boilerplate code needed to tweak a vCPU's CPUID model, improve code clarity, and most importantly move tests away from modifying the static "cpuid" returned by kvm_get_supported_cpuid(). Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-23-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 30 ++++++++++++++++++++++ tools/testing/selftests/kvm/lib/x86_64/processor.c | 18 +++++++++++++ 2 files changed, 48 insertions(+) commit 662162fed26137651cc69971555c3f5a984345d7 Author: Sean Christopherson Date: Tue Jun 14 20:06:46 2022 +0000 KVM: selftests: Use get_cpuid_entry() in kvm_get_supported_cpuid_index() Use get_cpuid_entry() in kvm_get_supported_cpuid_index() to replace functionally identical code. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-22-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 14 +++++----- tools/testing/selftests/kvm/lib/x86_64/processor.c | 32 ---------------------- 2 files changed, 7 insertions(+), 39 deletions(-) commit 8b02674103e6f09f9f9397bfb7bfd60a9323c9c2 Author: Sean Christopherson Date: Tue Jun 14 20:06:45 2022 +0000 KVM: selftests: Rename and tweak get_cpuid() to get_cpuid_entry() Rename get_cpuid() to get_cpuid_entry() to better reflect its behavior. Leave set_cpuid() as is to avoid unnecessary churn, that helper will soon be removed entirely. Oppurtunistically tweak the implementation to avoid using a temporary variable in anticipation of taggin the input @cpuid with "const". No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-21-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 4 ++-- tools/testing/selftests/kvm/lib/x86_64/processor.c | 11 +++++------ tools/testing/selftests/kvm/x86_64/cpuid_test.c | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) commit d838b313aadcf89d9b352ced1cd849d313971864 Author: Sean Christopherson Date: Tue Jun 14 20:06:44 2022 +0000 KVM: selftests: Don't use a static local in vcpu_get_supported_hv_cpuid() Don't use a static variable for the Hyper-V supported CPUID array, the helper unconditionally reallocates the array on every invocation (and all callers free the array immediately after use). The array is intentionally recreated and refilled because the set of supported CPUID features is dependent on vCPU state, e.g. whether or not eVMCS has been enabled. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-20-seanjc@google.com tools/testing/selftests/kvm/lib/x86_64/processor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7fbc6038acbaa4c0c0b374aac635038881143e84 Author: Sean Christopherson Date: Tue Jun 14 20:06:43 2022 +0000 KVM: selftests: Cache CPUID in struct kvm_vcpu Cache a vCPU's CPUID information in "struct kvm_vcpu" to allow fixing the mess where tests, often unknowingly, modify the global/static "cpuid" allocated by kvm_get_supported_cpuid(). Add vcpu_init_cpuid() to handle stuffing an entirely different CPUID model, e.g. during vCPU creation or when switching to the Hyper-V enabled CPUID model. Automatically refresh the cache on vcpu_set_cpuid() so that any adjustments made by KVM are always reflected in the cache. Drop vcpu_get_cpuid() entirely to force tests to use the cache, and to allow adding e.g. vcpu_get_cpuid_entry() in the future without creating a conflicting set of APIs where vcpu_get_cpuid() does KVM_GET_CPUID2, but vcpu_get_cpuid_entry() does not. Opportunistically convert the VMX nested state test and KVM PV test to manipulating the vCPU's CPUID (because it's easy), but use vcpu_init_cpuid() for the Hyper-V features test and "emulator error" test to effectively retain their current behavior as they're less trivial to convert. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-19-seanjc@google.com .../testing/selftests/kvm/include/kvm_util_base.h | 5 +++ .../selftests/kvm/include/x86_64/processor.h | 25 +++++++++---- tools/testing/selftests/kvm/lib/kvm_util.c | 7 ++++ tools/testing/selftests/kvm/lib/x86_64/processor.c | 42 +++++++++++----------- tools/testing/selftests/kvm/x86_64/cpuid_test.c | 18 +++++----- .../selftests/kvm/x86_64/emulator_error_test.c | 2 +- .../testing/selftests/kvm/x86_64/hyperv_features.c | 2 +- tools/testing/selftests/kvm/x86_64/kvm_pv_test.c | 6 ++-- .../selftests/kvm/x86_64/monitor_mwait_test.c | 2 +- .../kvm/x86_64/vmx_set_nested_state_test.c | 6 ++-- .../selftests/kvm/x86_64/xapic_state_test.c | 4 +-- 11 files changed, 69 insertions(+), 50 deletions(-) commit fc66963d7b01e00ef0482bd7adbc8918343f81d9 Author: Sean Christopherson Date: Tue Jun 14 20:06:42 2022 +0000 KVM: selftests: Split out kvm_cpuid2_size() from allocate_kvm_cpuid2() Split out the computation of the effective size of a kvm_cpuid2 struct from allocate_kvm_cpuid2(), and modify both to take an arbitrary number of entries. Future commits will add caching of a vCPU's CPUID model, and will (a) be able to precisely size the entries array, and (b) will need to know the effective size of the struct in order to copy to/from the cache. Expose the helpers so that the Hyper-V Features test can use them in the (somewhat distant) future. The Hyper-V test very, very subtly relies on propagating CPUID info across vCPU instances, and will need to make a copy of the previous vCPU's CPUID information when it switches to using the per-vCPU cache. Alternatively, KVM could provide helpers to duplicate and/or copy a kvm_cpuid2 instance, but each is literally a single line of code if the helpers are exposed, and it's not like the size of kvm_cpuid2 is secret knowledge. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-18-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 23 +++++++++++ tools/testing/selftests/kvm/lib/x86_64/processor.c | 48 ++++------------------ 2 files changed, 30 insertions(+), 41 deletions(-) commit 71bcb951c68b422ca65f55dc7ae7be01735ae48e Author: Sean Christopherson Date: Tue Jun 14 20:06:41 2022 +0000 KVM: selftests: Verify that kvm_cpuid2.entries layout is unchanged by KVM In the CPUID test, verify that KVM doesn't modify the kvm_cpuid2.entries layout, i.e. that the order of entries and their flags is identical between what the test provides via KVM_SET_CPUID2 and what KVM returns via KVM_GET_CPUID2. Asserting that the layouts match simplifies the test as there's no need to iterate over both arrays. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-17-seanjc@google.com tools/testing/selftests/kvm/x86_64/cpuid_test.c | 49 +++++++++++-------------- 1 file changed, 21 insertions(+), 28 deletions(-) commit 3c67f8208451a864478b9bf049782159fc925e11 Author: Sean Christopherson Date: Tue Jun 14 20:06:40 2022 +0000 KVM: selftests: Use kvm_cpu_has() for nSVM soft INT injection test Use kvm_cpu_has() to query for NRIPS support instead of open coding equivalent functionality using kvm_get_supported_cpuid_entry(). Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-16-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 3 --- tools/testing/selftests/kvm/x86_64/svm_nested_soft_inject_test.c | 7 ++----- 2 files changed, 2 insertions(+), 8 deletions(-) commit 601c067f381532105d01db9257b69eb9cfa8945e Author: Sean Christopherson Date: Tue Jun 14 20:06:39 2022 +0000 KVM: selftests: Use kvm_cpu_has() for KVM's PV steal time Use kvm_cpu_has() in the stea-ltime test instead of open coding equivalent functionality using kvm_get_supported_cpuid_entry(). Opportunistically define all of KVM's paravirt CPUID-based features. No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-15-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 22 ++++++++++++++++++++++ tools/testing/selftests/kvm/steal_time.c | 4 +--- 2 files changed, 23 insertions(+), 3 deletions(-) commit b046f4ee9cb60da285e1d45a1fe8dc6bb5fc446e Author: Sean Christopherson Date: Tue Jun 14 20:06:38 2022 +0000 KVM: selftests: Remove the obsolete/dead MMU role test Remove the MMU role test, which was made obsolete by KVM commit feb627e8d6f6 ("KVM: x86: Forbid KVM_SET_CPUID{,2} after KVM_RUN"). The ongoing costs of keeping the test updated far outweigh any benefits, e.g. the test _might_ be useful as an example or for documentation purposes, but otherwise the test is dead weight. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-14-seanjc@google.com tools/testing/selftests/kvm/.gitignore | 1 - tools/testing/selftests/kvm/Makefile | 1 - .../selftests/kvm/include/x86_64/processor.h | 3 - tools/testing/selftests/kvm/x86_64/mmu_role_test.c | 137 --------------------- 4 files changed, 142 deletions(-) commit 045520e4755bbdf2f2983309c8eab6176a97a13d Author: Sean Christopherson Date: Tue Jun 14 20:06:37 2022 +0000 KVM: selftests: Use kvm_cpu_has() for XSAVE in cr4_cpuid_sync_test Use kvm_cpu_has() in the CR4/CPUID sync test instead of open coding equivalent functionality using kvm_get_supported_cpuid_entry(). No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-13-seanjc@google.com tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8fea056eeb0c4840593bf2ed1e4cab5030d0b5b5 Author: Sean Christopherson Date: Tue Jun 14 20:06:36 2022 +0000 KVM: selftests: Use kvm_cpu_has() in AMX test Use kvm_cpu_has() in the AMX test instead of open coding equivalent functionality using kvm_get_supported_cpuid_entry() and kvm_get_supported_cpuid_index(). No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-12-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 3 +++ tools/testing/selftests/kvm/x86_64/amx_test.c | 17 ++++++----------- 2 files changed, 9 insertions(+), 11 deletions(-) commit 2697646bd343e3e04004f49a3673975729ef9f01 Author: Sean Christopherson Date: Tue Jun 14 20:06:35 2022 +0000 KVM: selftests: Check for _both_ XTILE data and cfg in AMX test Check for _both_ XTILE data and cfg support in the AMX test instead of checking for _either_ feature. Practically speaking, no sane CPU or vCPU will support one but not the other, but the effective "or" behavior is subtle and technically incorrect. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-11-seanjc@google.com tools/testing/selftests/kvm/x86_64/amx_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fdd1e2788c41e9b420a3744e022b5ff85b7e5fc0 Author: Sean Christopherson Date: Tue Jun 14 20:06:34 2022 +0000 KVM: selftests: Use kvm_cpu_has() for XSAVES in XSS MSR test Use kvm_cpu_has() in the XSS MSR test instead of open coding equivalent functionality using kvm_get_supported_cpuid_index(). No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-10-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 1 + tools/testing/selftests/kvm/x86_64/xss_msr_test.c | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) commit 50445ea2337a5f8df2242f795f45b6cf8c959c77 Author: Sean Christopherson Date: Tue Jun 14 20:06:33 2022 +0000 KVM: selftests: Drop redundant vcpu_set_cpuid() from PMU selftest Drop a redundant vcpu_set_cpuid() from the PMU test. The vCPU's CPUID is set to KVM's supported CPUID by vm_create_with_one_vcpu(), which was also true back when the helper was named vm_create_default(). Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-9-seanjc@google.com tools/testing/selftests/kvm/x86_64/vmx_pmu_caps_test.c | 3 --- 1 file changed, 3 deletions(-) commit ea129d22541ecd2bf4c8769d33f48e3105eca5f9 Author: Sean Christopherson Date: Tue Jun 14 20:06:32 2022 +0000 KVM: selftests: Use kvm_cpu_has() to query PDCM in PMU selftest Use kvm_cpu_has() in the PMU test to query PDCM support instead of open coding equivalent functionality using kvm_get_supported_cpuid_index(). No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-8-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 1 + tools/testing/selftests/kvm/x86_64/vmx_pmu_caps_test.c | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) commit 1ecbb337fa107c6a08800d34ba4f3296ad01103e Author: Sean Christopherson Date: Tue Jun 14 20:06:31 2022 +0000 KVM: selftests: Use kvm_cpu_has() for nested VMX checks Use kvm_cpu_has() to check for nested VMX support, and drop the helpers now that their functionality is trivial to implement. No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-7-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/vmx.h | 2 -- tools/testing/selftests/kvm/lib/x86_64/perf_test_util.c | 2 +- tools/testing/selftests/kvm/lib/x86_64/vmx.c | 12 ------------ tools/testing/selftests/kvm/x86_64/evmcs_test.c | 2 +- tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | 4 ++-- tools/testing/selftests/kvm/x86_64/smm_test.c | 2 +- tools/testing/selftests/kvm/x86_64/state_test.c | 2 +- tools/testing/selftests/kvm/x86_64/triple_fault_event_test.c | 2 +- tools/testing/selftests/kvm/x86_64/vmx_apic_access_test.c | 2 +- .../selftests/kvm/x86_64/vmx_close_while_nested_test.c | 2 +- tools/testing/selftests/kvm/x86_64/vmx_dirty_log_test.c | 2 +- .../selftests/kvm/x86_64/vmx_invalid_nested_guest_state.c | 2 +- .../selftests/kvm/x86_64/vmx_nested_tsc_scaling_test.c | 2 +- .../testing/selftests/kvm/x86_64/vmx_preemption_timer_test.c | 2 +- .../testing/selftests/kvm/x86_64/vmx_set_nested_state_test.c | 2 +- tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c | 2 +- 16 files changed, 15 insertions(+), 29 deletions(-) commit f21940a3bb5c6a6cd075f589d9405efc5718690c Author: Sean Christopherson Date: Tue Jun 14 20:06:30 2022 +0000 KVM: selftests: Use kvm_cpu_has() for nested SVM checks Use kvm_cpu_has() to check for nested SVM support, and drop the helpers now that their functionality is trivial to implement. No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-6-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/svm_util.h | 2 -- tools/testing/selftests/kvm/lib/x86_64/svm.c | 13 ------------- tools/testing/selftests/kvm/x86_64/hyperv_svm_test.c | 2 +- tools/testing/selftests/kvm/x86_64/smm_test.c | 2 +- tools/testing/selftests/kvm/x86_64/state_test.c | 2 +- tools/testing/selftests/kvm/x86_64/svm_int_ctl_test.c | 2 +- .../selftests/kvm/x86_64/svm_nested_soft_inject_test.c | 2 +- tools/testing/selftests/kvm/x86_64/svm_vmcall_test.c | 2 +- 8 files changed, 6 insertions(+), 21 deletions(-) commit c5c5b827f129734602b796eceb4342b17858dc01 Author: Sean Christopherson Date: Tue Jun 14 20:06:29 2022 +0000 KVM: selftests: Use kvm_cpu_has() in the SEV migration test Use kvm_cpu_has() in the SEV migration test instead of open coding equivalent functionality using kvm_get_supported_cpuid_entry(). No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-5-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 2 ++ tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c | 13 ++----------- 2 files changed, 4 insertions(+), 11 deletions(-) commit 61d76b8a6943cd12b89029f9b04a75ce97f01d96 Author: Sean Christopherson Date: Tue Jun 14 20:06:28 2022 +0000 KVM: selftests: Add framework to query KVM CPUID bits Add X86_FEATURE_* magic in the style of KVM-Unit-Tests' implementation, where the CPUID function, index, output register, and output bit position are embedded in the macro value. Add kvm_cpu_has() to query KVM's supported CPUID and use it set_sregs_test, which is the most prolific user of manual feature querying. Opportunstically rename calc_cr4_feature_bits() to calc_supported_cr4_feature_bits() to better capture how the CR4 bits are chosen. Link: https://lore.kernel.org/all/20210422005626.564163-1-ricarkol@google.com Suggested-by: Paolo Bonzini Suggested-by: Jim Mattson Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-4-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 106 ++++++++++++++++++--- tools/testing/selftests/kvm/lib/x86_64/processor.c | 22 +++++ .../testing/selftests/kvm/x86_64/set_sregs_test.c | 28 +++--- 3 files changed, 128 insertions(+), 28 deletions(-) commit 683edfd42bc222daf17388afb0c752e38712fa05 Author: Sean Christopherson Date: Tue Jun 14 20:06:27 2022 +0000 KVM: sefltests: Use CPUID_* instead of X86_FEATURE_* for one-off usage Rename X86_FEATURE_* macros to CPUID_* in various tests to free up the X86_FEATURE_* names for KVM-Unit-Tests style CPUID automagic where the function, leaf, register, and bit for the feature is embedded in its macro value. No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-3-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 4 ++++ tools/testing/selftests/kvm/x86_64/amx_test.c | 9 +++------ tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c | 7 ++----- tools/testing/selftests/kvm/x86_64/monitor_mwait_test.c | 4 ++-- tools/testing/selftests/kvm/x86_64/svm_nested_soft_inject_test.c | 3 +-- 5 files changed, 12 insertions(+), 15 deletions(-) commit 4c16fa3ee945183a2f4718a45035e1835c19205b Author: Sean Christopherson Date: Tue Jun 14 20:06:26 2022 +0000 KVM: selftests: Set KVM's supported CPUID as vCPU's CPUID during recreate On x86-64, set KVM's supported CPUID as the vCPU's CPUID when recreating a VM+vCPU to deduplicate code for state save/restore tests, and to provide symmetry of sorts with respect to vm_create_with_one_vcpu(). The extra KVM_SET_CPUID2 call is wasteful for Hyper-V, but ultimately is nothing more than an expensive nop, and overriding the vCPU's CPUID with the Hyper-V CPUID information is the only known scenario where a state save/restore test wouldn't need/want the default CPUID. Opportunistically use __weak for the default vm_compute_max_gfn(), it's provided by tools' compiler.h. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220614200707.3315957-2-seanjc@google.com tools/testing/selftests/kvm/include/kvm_util_base.h | 9 +++++++++ tools/testing/selftests/kvm/lib/kvm_util.c | 10 ++++++++-- tools/testing/selftests/kvm/lib/x86_64/processor.c | 9 +++++++++ tools/testing/selftests/kvm/x86_64/amx_test.c | 1 - tools/testing/selftests/kvm/x86_64/smm_test.c | 1 - tools/testing/selftests/kvm/x86_64/state_test.c | 1 - tools/testing/selftests/kvm/x86_64/vmx_preemption_timer_test.c | 2 -- 7 files changed, 26 insertions(+), 7 deletions(-) commit 594a1c271c159c9c5f0ff2d92ebfda469e94e48d Author: Colton Lewis Date: Wed Jun 15 19:31:16 2022 +0000 KVM: selftests: Fix filename reporting in guest asserts Fix filename reporting in guest asserts by ensuring the GUEST_ASSERT macro records __FILE__ and substituting REPORT_GUEST_ASSERT for many repetitive calls to TEST_FAIL. Previously filename was reported by using __FILE__ directly in the selftest, wrongly assuming it would always be the same as where the assertion failed. Signed-off-by: Colton Lewis Reported-by: Ricardo Koller Fixes: 4e18bccc2e5544f0be28fc1c4e6be47a469d6c60 Link: https://lore.kernel.org/r/20220615193116.806312-5-coltonlewis@google.com [sean: convert more TEST_FAIL => REPORT_GUEST_ASSERT instances] Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/aarch64/arch_timer.c | 11 +++++---- .../selftests/kvm/aarch64/debug-exceptions.c | 4 +--- tools/testing/selftests/kvm/aarch64/hypercalls.c | 7 +++--- tools/testing/selftests/kvm/aarch64/psci_test.c | 3 +-- tools/testing/selftests/kvm/aarch64/vgic_irq.c | 4 +--- tools/testing/selftests/kvm/include/ucall_common.h | 11 ++++----- tools/testing/selftests/kvm/memslot_perf_test.c | 4 +--- tools/testing/selftests/kvm/s390x/tprot.c | 26 ++++++++++------------ .../testing/selftests/kvm/set_memory_region_test.c | 3 +-- tools/testing/selftests/kvm/steal_time.c | 3 +-- .../selftests/kvm/system_counter_offset_test.c | 3 +-- tools/testing/selftests/kvm/x86_64/amx_test.c | 3 +-- tools/testing/selftests/kvm/x86_64/cpuid_test.c | 3 +-- .../selftests/kvm/x86_64/cr4_cpuid_sync_test.c | 2 +- .../selftests/kvm/x86_64/emulator_error_test.c | 3 +-- tools/testing/selftests/kvm/x86_64/evmcs_test.c | 3 +-- .../selftests/kvm/x86_64/fix_hypercall_test.c | 2 +- tools/testing/selftests/kvm/x86_64/hyperv_clock.c | 3 +-- .../testing/selftests/kvm/x86_64/hyperv_features.c | 8 ++----- .../testing/selftests/kvm/x86_64/hyperv_svm_test.c | 3 +-- .../testing/selftests/kvm/x86_64/kvm_clock_test.c | 3 +-- tools/testing/selftests/kvm/x86_64/kvm_pv_test.c | 4 +--- .../selftests/kvm/x86_64/monitor_mwait_test.c | 4 +--- .../testing/selftests/kvm/x86_64/set_boot_cpu_id.c | 4 +--- tools/testing/selftests/kvm/x86_64/state_test.c | 3 +-- .../selftests/kvm/x86_64/svm_int_ctl_test.c | 2 +- .../kvm/x86_64/svm_nested_soft_inject_test.c | 3 +-- .../testing/selftests/kvm/x86_64/svm_vmcall_test.c | 2 +- .../selftests/kvm/x86_64/triple_fault_event_test.c | 2 +- tools/testing/selftests/kvm/x86_64/tsc_msrs_test.c | 4 +--- .../selftests/kvm/x86_64/userspace_io_test.c | 4 +--- .../selftests/kvm/x86_64/userspace_msr_exit_test.c | 5 ++--- .../selftests/kvm/x86_64/vmx_apic_access_test.c | 3 +-- .../kvm/x86_64/vmx_close_while_nested_test.c | 2 +- .../selftests/kvm/x86_64/vmx_dirty_log_test.c | 3 +-- .../kvm/x86_64/vmx_invalid_nested_guest_state.c | 2 +- .../kvm/x86_64/vmx_nested_tsc_scaling_test.c | 2 +- .../kvm/x86_64/vmx_preemption_timer_test.c | 3 +-- .../selftests/kvm/x86_64/vmx_tsc_adjust_test.c | 2 +- .../testing/selftests/kvm/x86_64/xen_shinfo_test.c | 2 +- .../testing/selftests/kvm/x86_64/xen_vmcall_test.c | 2 +- 41 files changed, 68 insertions(+), 102 deletions(-) commit ddcb57afd5815191f02aec12f18b4d1bbad5fb9d Author: Colton Lewis Date: Wed Jun 15 19:31:15 2022 +0000 KVM: selftests: Write REPORT_GUEST_ASSERT macros to pair with GUEST_ASSERT Write REPORT_GUEST_ASSERT macros to pair with GUEST_ASSERT to abstract and make consistent all guest assertion reporting. Every report includes an explanatory string, a filename, and a line number. Signed-off-by: Colton Lewis Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20220615193116.806312-4-coltonlewis@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/include/ucall_common.h | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit fc573fa4f38aa0cecace00d00cc60109ae947834 Author: Colton Lewis Date: Wed Jun 15 19:31:14 2022 +0000 KVM: selftests: Increase UCALL_MAX_ARGS to 7 Increase UCALL_MAX_ARGS to 7 to allow GUEST_ASSERT_4 to pass 3 builtin ucall arguments specified in guest_assert_builtin_args plus 4 user-specified arguments. Signed-off-by: Colton Lewis Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20220615193116.806312-3-coltonlewis@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/include/ucall_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8fb2638a568d8ef635bbef4f61eb6587d2ebd8da Author: Colton Lewis Date: Wed Jun 15 19:31:13 2022 +0000 KVM: selftests: enumerate GUEST_ASSERT arguments Enumerate GUEST_ASSERT arguments to avoid magic indices to ucall.args. Signed-off-by: Colton Lewis Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20220615193116.806312-2-coltonlewis@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/include/ucall_common.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0bc273266112937cd6560f7d447b6aa9cfd9134a Author: Sean Christopherson Date: Mon Jul 11 23:27:50 2022 +0000 KVM: x86: WARN only once if KVM leaves a dangling userspace I/O request Change a WARN_ON() to separate WARN_ON_ONCE() if KVM has an outstanding PIO or MMIO request without an associated callback, i.e. if KVM queued a userspace I/O exit but didn't actually exit to userspace before moving on to something else. Warning on every KVM_RUN risks spamming the kernel if KVM gets into a bad state. Opportunistically split the WARNs so that it's easier to triage failures when a WARN fires. Deliberately do not use KVM_BUG_ON(), i.e. don't kill the VM. While the WARN is all but guaranteed to fire if and only if there's a KVM bug, a dangling I/O request does not present a danger to KVM (that flag is truly truly consumed only in a single emulator path), and any such bug is unlikely to be fatal to the VM (KVM essentially failed to do something it shouldn't have tried to do in the first place). In other words, note the bug, but let the VM keep running. Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Link: https://lore.kernel.org/r/20220711232750.1092012-4-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/x86.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2626206963ace9e8bf92b6eea5ff78dd674c555c Author: Sean Christopherson Date: Mon Jul 11 23:27:49 2022 +0000 KVM: x86: Set error code to segment selector on LLDT/LTR non-canonical #GP When injecting a #GP on LLDT/LTR due to a non-canonical LDT/TSS base, set the error code to the selector. Intel SDM's says nothing about the #GP, but AMD's APM explicitly states that both LLDT and LTR set the error code to the selector, not zero. Note, a non-canonical memory operand on LLDT/LTR does generate a #GP(0), but the KVM code in question is specific to the base from the descriptor. Fixes: e37a75a13cda ("KVM: x86: Emulator ignores LDTR/TR extended base on LLDT/LTR") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Link: https://lore.kernel.org/r/20220711232750.1092012-3-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/emulate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ec6e4d863258d4bfb36d48d5e3ef68140234d688 Author: Sean Christopherson Date: Mon Jul 11 23:27:48 2022 +0000 KVM: x86: Mark TSS busy during LTR emulation _after_ all fault checks Wait to mark the TSS as busy during LTR emulation until after all fault checks for the LTR have passed. Specifically, don't mark the TSS busy if the new TSS base is non-canonical. Opportunistically drop the one-off !seg_desc.PRESENT check for TR as the only reason for the early check was to avoid marking a !PRESENT TSS as busy, i.e. the common !PRESENT is now done before setting the busy bit. Fixes: e37a75a13cda ("KVM: x86: Emulator ignores LDTR/TR extended base on LLDT/LTR") Reported-by: syzbot+760a73552f47a8cd0fd9@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Cc: Tetsuo Handa Cc: Hou Wenlong Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Link: https://lore.kernel.org/r/20220711232750.1092012-2-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/emulate.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 43bb9e000ea4c62154c01844771fea25b8b83520 Author: Sean Christopherson Date: Mon Jul 11 22:57:53 2022 +0000 KVM: x86: Tweak name of MONITOR/MWAIT #UD quirk to make it #UD specific Add a "UD" clause to KVM_X86_QUIRK_MWAIT_NEVER_FAULTS to make it clear that the quirk only controls the #UD behavior of MONITOR/MWAIT. KVM doesn't currently enforce fault checks when MONITOR/MWAIT are supported, but that could change in the future. SVM also has a virtualization hole in that it checks all faults before intercepts, and so "never faults" is already a lie when running on SVM. Fixes: bfbcc81bb82c ("KVM: x86: Add a quirk for KVM's "MONITOR/MWAIT are NOPs!" behavior") Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220711225753.1073989-4-seanjc@google.com Documentation/virt/kvm/api.rst | 2 +- arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/include/uapi/asm/kvm.h | 2 +- arch/x86/kvm/x86.c | 2 +- tools/testing/selftests/kvm/x86_64/monitor_mwait_test.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 14fd95bf145ddb8201406b89c83faf24e7e3d52f Author: Vitaly Kuznetsov Date: Thu Jul 14 01:11:15 2022 +0000 KVM: selftests: Use "a" and "d" to set EAX/EDX for wrmsr_safe() Do not use GCC's "A" constraint to load EAX:EDX in wrmsr_safe(). Per GCC's documenation on x86-specific constraints, "A" will not actually load a 64-bit value into EAX:EDX on x86-64. The a and d registers. This class is used for instructions that return double word results in the ax:dx register pair. Single word values will be allocated either in ax or dx. For example on i386 the following implements rdtsc: unsigned long long rdtsc (void) { unsigned long long tick; __asm__ __volatile__("rdtsc":"=A"(tick)); return tick; } This is not correct on x86-64 as it would allocate tick in either ax or dx. You have to use the following variant instead: unsigned long long rdtsc (void) { unsigned int tickl, tickh; __asm__ __volatile__("rdtsc":"=a"(tickl),"=d"(tickh)); return ((unsigned long long)tickh << 32)|tickl; } Because a u64 fits in a single 64-bit register, using "A" for selftests, which are 64-bit only, results in GCC loading the value into either RAX or RDX instead of splitting it across EAX:EDX. E.g.: kvm_exit: reason MSR_WRITE rip 0x402919 info 0 0 kvm_msr: msr_write 40000118 = 0x60000000001 (#GP) ... With "A": 48 8b 43 08 mov 0x8(%rbx),%rax 49 b9 ba da ca ba 0a movabs $0xabacadaba,%r9 00 00 00 4c 8d 15 07 00 00 00 lea 0x7(%rip),%r10 # 402f44 4c 8d 1d 06 00 00 00 lea 0x6(%rip),%r11 # 402f4a 0f 30 wrmsr With "a"/"d": 48 8b 53 08 mov 0x8(%rbx),%rdx 89 d0 mov %edx,%eax 48 c1 ea 20 shr $0x20,%rdx 49 b9 ba da ca ba 0a movabs $0xabacadaba,%r9 00 00 00 4c 8d 15 07 00 00 00 lea 0x7(%rip),%r10 # 402fc3 4c 8d 1d 06 00 00 00 lea 0x6(%rip),%r11 # 402fc9 0f 30 wrmsr Fixes: 3b23054cd3f5 ("KVM: selftests: Add x86-64 support for exception fixup") Signed-off-by: Vitaly Kuznetsov Link: https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html#Machine-Constraints [sean: use "& -1u", provide GCC blurb and link to documentation] Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220714011115.3135828-1-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7be3ae759160aa3355ebeb0583f67fb9bda4dae Author: Alex Deucher Date: Tue Jul 12 09:53:02 2022 -0400 drm/amd/display: remove duplicate dcn314 includes Several headers were included twice. Fix that. Reported-by: kernel test robot Reviewed-by: Harry Wentland Reviewed-by: André Almeida Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c | 1 - drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c | 1 - drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 1 - 3 files changed, 3 deletions(-) commit e850f6b13a85b451411bb74a526bc08706129e8c Author: Roman Li Date: Tue Jun 28 18:41:37 2022 -0400 drm/amd/display: Enable DCN314 in DM Add support for DCN 3.1.4 in Display Manager Signed-off-by: Roman Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 +++++++++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 1 + 2 files changed, 12 insertions(+) commit cc35e75273fcf4fb4f12f9d8fd979be7aa808041 Author: Roman Li Date: Tue Jun 28 18:38:13 2022 -0400 drm/amd/display: Add DMUB support for DCN314 Initialize DMUB for DCN 3.1.4. Use same funcs as DCN31. Signed-off-by: Roman Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c | 1 + 1 file changed, 1 insertion(+) commit ee7b62e127c8cc6db24f83e5e116357649f6e41f Author: Roman Li Date: Tue Jun 28 18:30:47 2022 -0400 drm/amd/display: Enable DCN314 in DC Add support for DCN 3.1.4 in Display Core Signed-off-by: Roman Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/Makefile | 1 + .../amd/display/dc/bios/command_table_helper2.c | 1 + drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile | 9 + drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 22 ++- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 + drivers/gpu/drm/amd/display/dc/core/dc_link.c | 1 + drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 8 + .../gpu/drm/amd/display/dc/dce/dce_clock_source.h | 5 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c | 17 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.h | 219 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.c | 16 +- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.h | 35 ++++ .../amd/display/dc/dcn31/dcn31_dio_link_encoder.h | 28 +++ .../gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 3 + drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 1 + drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 1 + drivers/gpu/drm/amd/display/dc/irq/Makefile | 10 + 17 files changed, 366 insertions(+), 15 deletions(-) commit 5439c41a80c00e993d18d1cd4407a6a82b35d963 Author: Roman Li Date: Tue Jun 28 18:21:32 2022 -0400 drm/amd/display: Add DCN314 version identifiers DCN 3.1.4 version and family ids Signed-off-by: Roman Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 1 + drivers/gpu/drm/amd/display/include/dal_asic_id.h | 1 + drivers/gpu/drm/amd/display/include/dal_types.h | 1 + 3 files changed, 3 insertions(+) commit 41529d79ce1655bd7463c01d9813d0abb6fb08a4 Author: Roman Li Date: Tue Jun 28 15:30:27 2022 -0400 drm/amd/display: Add DCN314 DML calculation support Display mode library for DCN 3.1.4 v2: squash in checkpatch fix (Alex) Signed-off-by: Roman Li Signed-off-by: Alex Deucher .../display/dc/dml/dcn314/display_mode_vba_314.c | 7420 ++++++++++++++++++++ .../display/dc/dml/dcn314/display_mode_vba_314.h | 44 + .../dc/dml/dcn314/display_rq_dlg_calc_314.c | 1733 +++++ .../dc/dml/dcn314/display_rq_dlg_calc_314.h | 70 + 4 files changed, 9267 insertions(+) commit 3cffeffe051a961417bc26f2053bced4cff83119 Author: Roman Li Date: Tue Jun 28 15:25:40 2022 -0400 drm/amd/display: Add DCN314 DC resources Display Core support for DCN 3.1.4 v2:(squash)fix non-x86 in dc/dcn314/Makefile Properly handle PPC as well. (Alex) v3: minor cleanup (Alex) v4: fix comment (Alex) Signed-off-by: Roman Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/Makefile | 43 + .../gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c | 265 +++ .../gpu/drm/amd/display/dc/dcn314/dcn314_dccg.h | 158 ++ .../display/dc/dcn314/dcn314_dio_stream_encoder.c | 448 ++++ .../display/dc/dcn314/dcn314_dio_stream_encoder.h | 311 +++ .../gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c | 341 +++ .../gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.h | 40 + .../gpu/drm/amd/display/dc/dcn314/dcn314_init.c | 158 ++ .../gpu/drm/amd/display/dc/dcn314/dcn314_init.h | 34 + .../gpu/drm/amd/display/dc/dcn314/dcn314_optc.c | 240 ++ .../gpu/drm/amd/display/dc/dcn314/dcn314_optc.h | 255 +++ .../drm/amd/display/dc/dcn314/dcn314_resource.c | 2357 ++++++++++++++++++++ .../drm/amd/display/dc/dcn314/dcn314_resource.h | 43 + 13 files changed, 4693 insertions(+) commit d5c6909e74606870bb59b962200cf75eb25d6d0b Author: Roman Li Date: Tue Jun 28 15:20:16 2022 -0400 drm/amd/display: Add DCN314 clock manager Clock and SMU interfaces for DCN 3.1.4 Signed-off-by: Roman Li Signed-off-by: Alex Deucher .../amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c | 751 +++++++++++++++++++++ .../amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.h | 57 ++ .../drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c | 391 +++++++++++ .../drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.h | 79 +++ 4 files changed, 1278 insertions(+) commit 806b52287a96bf5812a6be008d24add3f18952cc Author: Roman Li Date: Tue Jun 28 15:14:40 2022 -0400 drm/amd/display: Add DCN314 IRQ services IRQ services to support DCN 3.1.4 interrupts. v2: make to_dal_irq_source_dcn314 static (Alex) Signed-off-by: Roman Li Signed-off-by: Alex Deucher .../amd/display/dc/irq/dcn314/irq_service_dcn314.c | 434 +++++++++++++++++++++ .../amd/display/dc/irq/dcn314/irq_service_dcn314.h | 35 ++ 2 files changed, 469 insertions(+) commit 8955ff11f56e1596e9f80ff6fa8c48e53047654c Author: Roman Li Date: Tue Jun 28 15:06:23 2022 -0400 drm/amdgpu: Add reg headers for DCN314 Register headers for the following IPs: - DCN 3.1.4 - DPCS 3.1.4 v2:(squash) clean up (Alex) Signed-off-by: Roman Li Signed-off-by: Alex Deucher .../amd/include/asic_reg/dcn/dcn_3_1_4_offset.h | 15245 +++++ .../amd/include/asic_reg/dcn/dcn_3_1_4_sh_mask.h | 61832 +++++++++++++++++++ .../amd/include/asic_reg/dpcs/dpcs_3_1_4_offset.h | 7215 +++ .../amd/include/asic_reg/dpcs/dpcs_3_1_4_sh_mask.h | 55194 +++++++++++++++++ 4 files changed, 139486 insertions(+) commit cc79950bf0904f58e651747c17987270f1931c29 Author: Michel Dänzer Date: Mon Jul 11 16:51:31 2022 +0200 drm/amd/display: Ensure valid event timestamp for cursor-only commits Requires enabling the vblank machinery for them. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2030 Acked-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 42 +++++++++++++++++++++-- 1 file changed, 39 insertions(+), 3 deletions(-) commit f5ba14043621f4afdf3ad5f92ee2d8dbebbe4340 Author: Leo Li Date: Tue Jul 12 12:30:29 2022 -0400 drm/amdgpu: Check BO's requested pinning domains against its preferred_domains When pinning a buffer, we should check to see if there are any additional restrictions imposed by bo->preferred_domains. This will prevent the BO from being moved to an invalid domain when pinning. For example, this can happen if the user requests to create a BO in GTT domain for display scanout. amdgpu_dm will allow pinning to either VRAM or GTT domains, since DCN can scanout from either or. However, in amdgpu_bo_pin_restricted(), pinning to VRAM is preferred if there is adequate carveout. This can lead to pinning to VRAM despite the user requesting GTT placement for the BO. v2: Allow the kernel to override the domain, which can happen when exporting a BO to a V4L camera (for example). Signed-off-by: Leo Li Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++++ 1 file changed, 4 insertions(+) commit 524d8e14258a3c31bcaf915db5762e41249eb924 Author: John Johansen Date: Tue Oct 6 14:43:16 2020 -0700 apparmor: disable showing the mode as part of a secid to secctx Displaying the mode as part of the seectx takes up unnecessary memory, makes it so we can't use refcounted secctx so we need to alloc/free on every conversion from secid to secctx and introduces a space that could be potentially mishandled by tooling. Eg. In an audit record we get subj_type=firefix (enforce) Having the mode reported is not necessary, and might even be confusing eg. when writing an audit rule to match the above record field you would use -F subj_type=firefox ie. the mode is not included. AppArmor provides ways to find the mode without reporting as part of the secctx. So disable this by default before its use is wide spread and we can't. For now we add a sysctl to control the behavior as we can't guarantee no one is using this. Acked-by: Andrea Righi Signed-off-by: John Johansen security/apparmor/include/secid.h | 3 +++ security/apparmor/lsm.c | 8 ++++++++ security/apparmor/secid.c | 15 +++++++++------ 3 files changed, 20 insertions(+), 6 deletions(-) commit df4390934da48e0462d1e77fba3e15f080e2c2a0 Author: Matthew Wilcox Date: Mon Jun 6 21:23:22 2022 +0100 apparmor: Convert secid mapping to XArrays instead of IDR XArrays are a better match than IDR for how AppArmor is mapping secids. Specifically AppArmor is trying to keep the allocation dense. XArrays also have the advantage of avoiding the complexity IDRs preallocation. In addition this avoids/fixes a lockdep issue raised in the LKML thread "Linux 5.18-rc4" where there is a report of an interaction between apparmor and IPC, this warning may have been spurious as the reported issue is in a per-cpu local lock taken by the IDR. With the one side in the IPC id allocation and the other in AppArmor's secid allocation. Description by John Johansen Message-Id: <226cee6a-6ca1-b603-db08-8500cd8f77b7@gnuweeb.org> Signed-off-by: Matthew Wilcox Signed-off-by: John Johansen security/apparmor/include/secid.h | 2 -- security/apparmor/lsm.c | 2 -- security/apparmor/secid.c | 41 +++++++++++++-------------------------- 3 files changed, 13 insertions(+), 32 deletions(-) commit 95c0581f9bfdfbe97126ba1c7f5650a9dd064dda Author: John Johansen Date: Tue May 24 02:38:12 2022 -0700 apparmor: add a kernel label to use on kernel objects Separate kernel objects from unconfined. This is done so we can distinguish between the two in debugging, auditing and in preparation for being able to replace unconfined, which is not appropriate for the kernel. The kernel label will continue to behave similar to unconfined. Acked-by: Jon Tourville Signed-off-by: John Johansen security/apparmor/include/policy_ns.h | 1 + security/apparmor/lsm.c | 5 +---- security/apparmor/net.c | 3 ++- security/apparmor/policy_ns.c | 41 ++++++++++++++++++++++++++++------- 4 files changed, 37 insertions(+), 13 deletions(-) commit 1a55048674379f9b093e0a6dbef586d28b55f9ae Author: Maxim Mikityanskiy Date: Tue Apr 12 21:59:53 2022 +0300 net/mlx5e: Remove the duplicating check for striding RQ when enabling LRO LRO requires striding RQ and checks that it's enabled at two places: mlx5e_fix_features and set_feature_lro. This commit keeps only one check at mlx5e_fix_features and removes the duplicating one in set_feature_lro. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 ------ 1 file changed, 6 deletions(-) commit 1c31cb9221990773f4d76ec81fde1df38296500c Author: Maxim Mikityanskiy Date: Tue Apr 12 21:52:04 2022 +0300 net/mlx5e: Move the LRO-XSK check to mlx5e_fix_features LRO is mutually exclusive with XSK. When LRO is enabled, it checks whether XSK is active. This commit moves this check to a more correct place at mlx5e_fix_features. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit f7434ba0abfc28da40723f05645d19c87353764a Author: Vlad Buslov Date: Tue Jul 5 11:39:10 2022 +0200 net/mlx5e: Extend flower police validation Recent net commit 4d1e07d83ccc ("net/mlx5e: Fix matchall police parameters validation") removed notexceed action id validation from mlx5e_police_validate() and left it up to callers. However, since tc_act_can_offload_police() only exists in net-next its validation is extended in this dedicated followup patch. Signed-off-by: Vlad Buslov Reviewed-by: Jianbo Liu Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/police.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9153da4635fefb444e86c72ced93a7d0148faa1a Author: Jianbo Liu Date: Wed Jul 6 11:10:45 2022 +0000 net/mlx5e: configure meter in flow action After police action is parsed, set meter data in flow action, so they can be used when adding FTE. Signed-off-by: Jianbo Liu Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit bbf0b4234bdca3ad06264e2edc07c862a6bee036 Author: Rustam Subkhankulov Date: Mon Jul 11 12:33:03 2022 +0300 net/mlx5e: Removed useless code in function Comparison of eth_ft->ft with NULL is useless, because get_flow_table() returns either pointer 'eth_ft' such that eth_ft->ft != NULL, or an erroneous value that is handled on return, causing mlx5e_ethtool_flow_replace() to terminate before checking whether eth_ft->ft equals NULL. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Rustam Subkhankulov Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 9c0ca9baaa048125e28b022d2145edef20e38b19 Author: Vlad Buslov Date: Fri Jun 3 16:32:03 2022 +0300 net/mlx5: Bridge, implement QinQ support Implement support for new 802.1ad VLAN protocol type. Create new flow groups that handle svlan tags. Create FDB flows with svlan tag match when bridge VLAN is set to QinQ. Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/esw/bridge.c | 117 +++++++++++++++++++-- .../net/ethernet/mellanox/mlx5/core/esw/bridge.h | 2 + 2 files changed, 111 insertions(+), 8 deletions(-) commit c5fcac93a3c2f6ec2e39c48b5d7736a6e093faa1 Author: Vlad Buslov Date: Fri Jun 3 22:35:41 2022 +0300 net/mlx5: Bridge, implement infrastructure for VLAN protocol change Current implementation only supports 802.1Q VLAN Ethernet protocol. That protocol type is assumed by default and SWITCHDEV_ATTR_ID_BRIDGE_VLAN_PROTOCOL notification is ignored. To prepare for supporting 802.1ad protocol in following patches implement the necessary infrastructure to allow the user to dynamically change the VLAN protocol: - Handle SWITCHDEV_ATTR_ID_BRIDGE_VLAN_PROTOCOL notification by flushing FDB and re-creating VLAN modify header actions with new protocol. In this patch the only allowed dynamic VLAN protocol value is ETH_P_8021Q. - Save current VLAN protocol in per-bridge instance variable. Use the dynamic variable instead of hardcoded values in mlx5 bridge code. Create VLAN flow groups and flows based on current mlx5_esw_bridge->vlan_proto value instead of assuming 802.1Q ethertype. - Extract common flow group creation code into dedicated functions in order to be reused for creating QinQ groups in following patches. Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/en/rep/bridge.c | 6 + .../net/ethernet/mellanox/mlx5/core/esw/bridge.c | 194 ++++++++++++++++----- .../net/ethernet/mellanox/mlx5/core/esw/bridge.h | 2 + 3 files changed, 160 insertions(+), 42 deletions(-) commit 5a9db8d47a4948e59a53ac084afe97b94fd70808 Author: Vlad Buslov Date: Fri Jun 3 22:32:23 2022 +0300 net/mlx5: Bridge, extract VLAN push/pop actions creation Following patches in series need to re-create VLAN actions when user changes VLAN protocol. Extract the code that creates VLAN push/pop actions into dedicated function in order to be reused in next patch. Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/esw/bridge.c | 52 +++++++++++++++------- 1 file changed, 36 insertions(+), 16 deletions(-) commit d4893978f9f171f417c346cbeb33121f997c51d7 Author: Vlad Buslov Date: Fri Jun 3 18:23:22 2022 +0300 net/mlx5: Bridge, rename filter fg to vlan_filter Following patches in series introduce new qinq filtering group. To improve readability rename the existing group in function, variable and definition names to include "vlan" in order to make it easy to distinguish from upcoming qinq group. Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/esw/bridge.c | 38 +++++++++++----------- .../net/ethernet/mellanox/mlx5/core/esw/bridge.h | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) commit 55d3654c165869926567f2acb15aa6813a88c6dc Author: Vlad Buslov Date: Thu May 26 19:42:04 2022 +0300 net/mlx5: Bridge, refactor groups sizes and indices Following patches in the series introduce additional flow groups for QinQ support. With increased number of groups it becomes cumbersome to calculate groups sizes as fractions of the table size. Instead, manually define sizes of specific group types and ensure that totals are still correct by static assertions. Having specific table size is important for firmware resource management. This commit doesn't change functionality. Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/esw/bridge.c | 41 +++++++++++++++------- 1 file changed, 29 insertions(+), 12 deletions(-) commit e723f8662de7dd1750c876ee94da4900ab0d0277 Author: Tariq Toukan Date: Wed Jun 8 07:52:31 2022 +0300 net/mlx5: debugfs, Add num of in-use FW command interface slots Expose the number of busy / in-use slots in the FW command interface via a read-only debugfs entry. This improves observability and helps in the performance bottleneck analysis. Signed-off-by: Tariq Toukan Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 606e6a72e29dff9e3341c4cc9b554420e4793f40 Author: Michael Guralnik Date: Thu May 19 12:22:55 2022 +0300 net/mlx5: Expose vnic diagnostic counters for eswitch managed vports Expose on vport group managers debug counters for their managed vports. Counters are exposed through debugfs, the directory will be present only for functions that are eswitch managers and only counters that are supported on their specific HW/FW will be exposed. Example: $ ls /sys/kernel/debug/mlx5/0000:08:00.0/esw/ pf sf_8 vf_0 vf_1 $ ls -l /sys/kernel/debug/mlx5/0000:08:00.0/esw/vf_0/vnic_diag/ cq_overrun quota_exceeded_command total_q_under_processor_handle invalid_command send_queue_priority_update_flow List of all counter added: total_q_under_processor_handle - number of queues in error state due to an async error or errored command. send_queue_priority_update_flow - number of QP/SQ priority/SL update events. cq_overrun - number of times CQ entered an error state due to an overflow. async_eq_overrun -number of time an EQ mapped to async events was overrun. comp_eq_overrun - number of time an EQ mapped to completion events was overrun. quota_exceeded_command - number of commands issued and failed due to quota exceeded. invalid_command - number of commands issued and failed dues to any reason other than quota exceeded. Signed-off-by: Michael Guralnik Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../net/ethernet/mellanox/mlx5/core/esw/debugfs.c | 182 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 6 + drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 5 + .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 3 + 5 files changed, 197 insertions(+), 1 deletion(-) commit dc402ccc0d7b55922a79505df3000da7deb77a2b Author: Yishai Hadas Date: Thu Jun 2 12:47:34 2022 +0300 net/mlx5: Use software VHCA id when it's supported Use software VHCA id when it's supported by the firmware. A unique id is allocated upon mlx5_mdev_init() and freed upon mlx5_mdev_uninit(), as such it stays the same during the full life cycle of the device including upon health recovery if occurred. The conjunction of sw_vhca_id with sw_owner_id will be a global unique id per function which uses mlx5_core. The sw_vhca_id is set upon init_hca command and is used to specify the VHCA that the NIC vport is affiliated with. This functionality is needed upon migration of VM which is MPV based. (i.e. multi port device). Signed-off-by: Yishai Hadas Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fw.c | 4 ++ drivers/net/ethernet/mellanox/mlx5/core/main.c | 49 +++++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/vport.c | 14 +++++-- include/linux/mlx5/driver.h | 1 + 4 files changed, 65 insertions(+), 3 deletions(-) commit 0372c546eca575445331c0ad8902210b70be6d61 Author: Yishai Hadas Date: Thu Jun 2 12:41:00 2022 +0300 net/mlx5: Introduce ifc bits for using software vhca id Introduce ifc related stuff to enable using software vhca id functionality. Signed-off-by: Yishai Hadas Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed include/linux/mlx5/mlx5_ifc.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit 32ea2776a81b8bf1902b7be08754e98c47fbd10f Author: Christophe JAILLET Date: Sun Jul 10 14:36:22 2022 +0200 net/mlx5: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/lib/dm.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 9d2f00fb0a0ce0d1127e54cac5217b6517ab0d54 Author: James Yonan Date: Wed Jun 29 13:22:10 2022 -0600 netfilter: nf_nat: in nf_nat_initialized(), use const struct nf_conn * nf_nat_initialized() doesn't modify passed struct nf_conn, so declare as const. This is helpful for code readability and makes it possible to call nf_nat_initialized() with a const struct nf_conn *. Signed-off-by: James Yonan Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_nat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51fd2eb52c0ca8275a906eed81878ef50ae94eb0 Author: Trond Myklebust Date: Wed Jul 13 17:46:52 2022 -0400 NFSv4: Fix races in the legacy idmapper upcall nfs_idmap_instantiate() will cause the process that is waiting in request_key_with_auxdata() to wake up and exit. If there is a second process waiting for the idmap->idmap_mutex, then it may wake up and start a new call to request_key_with_auxdata(). If the call to idmap_pipe_downcall() from the first process has not yet finished calling nfs_idmap_complete_pipe_upcall_locked(), then we may end up triggering the WARN_ON_ONCE() in nfs_idmap_prepare_pipe_upcall(). The fix is to ensure that we clear idmap->idmap_upcall_data before calling nfs_idmap_instantiate(). Fixes: e9ab41b620e4 ("NFSv4: Clean up the legacy idmapper upcall") Signed-off-by: Trond Myklebust fs/nfs/nfs4idmap.c | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) commit 8ab4cdcf03d0b060fbf73f76460f199bbd759ff7 Author: Joanne Koong Date: Tue Jul 12 14:06:03 2022 -0700 bpf: Tidy up verifier check_func_arg() This patch does two things: 1. For matching against the arg type, the match should be against the base type of the arg type, since the arg type can have different bpf_type_flags set on it. 2. Uses switch casing to improve readability + efficiency. Signed-off-by: Joanne Koong Acked-by: Hao Luo Link: https://lore.kernel.org/r/20220712210603.123791-1-joannelkoong@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 66 +++++++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 28 deletions(-) commit 5142c3926f8fd358a62810cf09adcb128904694b Author: Dmitry Baryshkov Date: Sat May 21 18:14:37 2022 +0300 ARM: dts: qcom: apq8064: create tsens device node Create separate device node for thermal sensors on apq8064 platform. Move related properties to the newly created device tree node. This harmonizes apq8064 and ipq8064 device trees and allows gcc device to be probed earlier by removing dependency on QFPROM nodes. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521151437.1489111-5-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064.dtsi | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 4cf02f2e0d4dff38dcfe43a168801306aed714dd Author: Bjorn Andersson Date: Thu Jul 7 09:10:13 2022 -0700 arm64: defconfig: Enable Qualcomm SC8280XP providers The Qualcomm SC8280XP need the global clock controller, interconnect provider and TLMM pinctrl in order to boot. Enable these as builtin, as they are needed in order to provide e.g. UART. Signed-off-by: Bjorn Andersson Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20220707161014.3178798-1-bjorn.andersson@linaro.org arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 769fe42092a68dc34c1897673e781489428a108d Author: Bjorn Andersson Date: Thu Jul 7 09:08:58 2022 -0700 arm64: dts: qcom: sc8280xp: Add lost ranges for timer The timer node needs ranges specified to map the 1-cell children to the 2-cell address range used in /soc. This addition never made it into the patch that was posted and merged, so add it now. Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform") Signed-off-by: Bjorn Andersson Reviewed-by: Johan Hovold Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20220707160858.3178771-1-bjorn.andersson@linaro.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 1 + 1 file changed, 1 insertion(+) commit 8c1e9736c5bdb280ab45eba58254f048b750481e Merge: 6cd345e5835d 864cfdeb7673 Author: Arnd Bergmann Date: Wed Jul 13 22:20:28 2022 +0200 Merge tag 'qcom-dts-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm DTS updates for v5.20 This adds USB, NAND, QPIC BAM, CPUfreq, remoteprocs, SMEM, SCM, watchdog, interconnect providers to the SDX65 5G modem platform and enables relevant devices for the MTP. The BAM DMUX interface used to exchange Ethernet/IP data with the modem is described on the MSM8974 platform. It fixes up the PXO supply clock to L2CC on IPQ6084, as the platform is transitioned away from global clock lookup. SDX55 has it's debug UART interrupt level corrected. Lastly it contains a wide variety of fixes for DeviceTree validation issues across most of the platforms. * tag 'qcom-dts-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (48 commits) ARM: dts: qcom: msm8974: rename GPU's OPP table node ARM: dts: qcom: apq8064: disable DSI and DSI PHY by default ARM: dts: qcom: apq8064: rename DSI PHY iface clock ARM: dts: qcom: extend scm compatible to match dt-schema ARM: dts: qcom: Fix sdhci node names - use 'mmc@' ARM: dts: qcom: apq8064: drop phy-names from HDMI device node ARM: dts: qcom: apq8064-ifc6410: drop hdmi-mux-supply ARM: dts: qcom: pm8841: add required thermal-sensor-cells ARM: dts: qcom: msm8974: add required ranges to OCMEM ARM: dts: qcom: sdx55: add dedicated IMEM and syscon compatibles ARM: dts: qcom: msm8974: add dedicated IMEM compatible ARM: dts: qcom: apq8064-asus-nexus7: add dedicated IMEM compatible ARM: dts: qcom: use generic sram as name for imem and ocmem nodes ARM: dts: qcom: ipq8064: add function to LED nodes ARM: dts: qcom: ipq8064-rb3011: add color to LED node ARM: dts: qcom: ipq4018-ap120c-ac: add function and color to LED nodes ARM: dts: qcom: apq8060-ifc6410: add color to LED node ARM: dts: qcom: apq8060-dragonboard: add function and color to LED nodes ARM: dts: qcom: sdx55: Fix the IRQ trigger type for UART ARM: dts: qcom-msm8974: fix irq type on blsp2_uart1 ... Link: https://lore.kernel.org/r/20220713032024.1372427-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit 6cd345e5835d54f24c67f532a7de940b4151fc98 Merge: 8f8a7775b66e be1628526586 Author: Arnd Bergmann Date: Wed Jul 13 22:18:43 2022 +0200 Merge tag 'at91-dt-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt AT91 DT for v5.20 #2 It contains only the enablement of USB device port. * tag 'at91-dt-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: kswitch-d10: enable the USB device port Link: https://lore.kernel.org/r/20220713070602.1652118-1-claudiu.beznea@microchip.com Signed-off-by: Arnd Bergmann commit 4ea0878417332e7ea9012c15785d7a9e78ff27da Merge: c67af87178f2 9fc792e596f1 Author: Arnd Bergmann Date: Wed Jul 13 22:10:38 2022 +0200 Merge tag 'imx-soc-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/soc i.MX SoC update for 5.20: - Update the mx25_read_cpu_rev() function to support silicon revision 1.2 for i.MX25 SoC. - A minor indentation fix in Kconfig file. * tag 'imx-soc-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx25: support silicon revision 1.2 ARM: imx: Kconfig: Fix indentation Link: https://lore.kernel.org/r/20220709082951.15123-2-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit c67af87178f20455ff1ef5b50b3a8734ae16d2ca Merge: aa68ce3bcb0a c510c81c0e59 Author: Arnd Bergmann Date: Wed Jul 13 22:09:18 2022 +0200 Merge tag 'arm-soc/for-5.20/maintainers' of https://github.com/Broadcom/stblinux into arm/soc This pull request contains Broadcom ARM-SoC MAINTAINERS file updates for 5.20, please pull the following: - William and Anand updates the MAINTAINERS files with new BCA SoCs entries for a variety of PON/DSL SoCs: 63178, 63158, 4912, 6858, 6878, 6846, 6855, 6756, 63146, 6856, 63148, 6813. 63138 is now listed as a supported BCA platform and joins the families just added. * tag 'arm-soc/for-5.20/maintainers' of https://github.com/Broadcom/stblinux: MAINTAINERS: Move BCM63138 to bcmbca arch entry MAINTAINERS: Add BCM6813 to bcmbca arch entry MAINTAINERS: Add BCM63148 to bcmbca arch entry MAINTAINERS: Add BCM6856 to bcmbca arch entry MAINTAINERS: Add BCM63146 to bcmbca arch entry MAINTAINERS: Add BCM6756 to bcmbca arch entry MAINTAINERS: Add BCM6855 to bcmbca arch entry MAINTAINERS: Add BCM6846 to bcmbca arch entry MAINTAINERS: Add BCM6878 to bcmbca arch entry MAINTAINERS: Add BCM6858 to bcmbca arch entry MAINTAINERS: Add BCM4912 to bcmbca arch entry MAINTAINERS: Add BCM63158 to bcmbca arch entry MAINTAINERS: Add BCM63178 to bcmbca arch entry Link: https://lore.kernel.org/r/20220711164451.3542127-7-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit f8a291b7e35dcb3ea65c13f60cad7fb250b6b850 Author: Wu XiangCheng Date: Thu Jul 7 22:30:36 2022 +0800 docs/zh_CN: Add a new translation of reporting-regressions.rst Last English version used: commit d2b40ba2cce2 ("docs: *-regressions.rst: explain how quickly issues should be handled") Signed-off-by: Wu XiangCheng Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/YsbuDGIpUjOzfAAh@bobwxc.mipc Signed-off-by: Jonathan Corbet .../translations/zh_CN/admin-guide/index.rst | 2 +- .../zh_CN/admin-guide/reporting-regressions.rst | 370 +++++++++++++++++++++ 2 files changed, 371 insertions(+), 1 deletion(-) commit aa68ce3bcb0ac9a5dce980199db82979cbb8a5c3 Merge: 11055c32c71f fa0ef5a086a0 Author: Arnd Bergmann Date: Wed Jul 13 22:07:12 2022 +0200 Merge tag 'arm-soc/for-5.20/soc' of https://github.com/Broadcom/stblinux into arm/soc This pull request contains Broadcom SoC drivers changes for 5.20, please pull the following: - Miaoqian fixes a device_node reference count leak in the Kona SMC initialization code - William moves the 63138 support code to use CONFIG_ARCH_BCMBCA which is how all of those similar SoCs from the BCA division are supported moving forward. This includes machine code and UART low-level debug code. * tag 'arm-soc/for-5.20/soc' of https://github.com/Broadcom/stblinux: ARM: debug: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA arm: bcmbca: Add BCMBCA sub platforms arm: bcmbca: Move BCM63138 ARCH_BCM_63XX to ARCH_BCMBCA ARM: bcm: Fix refcount leak in bcm_kona_smc_init Link: https://lore.kernel.org/r/20220711164451.3542127-8-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit ab3e69fc4d693bb1cc6b3d5afcfabd88a17da9d4 Author: Michael Kelley Date: Mon Jul 11 10:48:24 2022 -0700 Documentation: hyperv: Add overview of clocks and timers Add documentation topic for clocks and timers when running as a guest on Hyper-V. Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/1657561704-12631-4-git-send-email-mikelley@microsoft.com Signed-off-by: Jonathan Corbet Documentation/virt/hyperv/clocks.rst | 73 ++++++++++++++++++++++++++++++++++++ Documentation/virt/hyperv/index.rst | 1 + 2 files changed, 74 insertions(+) commit ac1129e79e90a1dae495fdb2f4659bd1be90abb1 Author: Michael Kelley Date: Mon Jul 11 10:48:23 2022 -0700 Documentation: hyperv: Add overview of VMbus Add documentation topic for using VMbus when running as a guest on Hyper-V. Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/1657561704-12631-3-git-send-email-mikelley@microsoft.com Signed-off-by: Jonathan Corbet Documentation/virt/hyperv/index.rst | 1 + Documentation/virt/hyperv/vmbus.rst | 303 ++++++++++++++++++++++++++++++++++++ 2 files changed, 304 insertions(+) commit ec7c56812fa56b6726150877f0a1025fc78b44a4 Author: Michael Kelley Date: Mon Jul 11 10:48:22 2022 -0700 Documentation: hyperv: Add overview of Hyper-V enlightenments Add an initial documentation topic for Linux enlightenments to run as a guest on Microsoft's Hyper-V hypervisor, linked under the "virt" documentation area. Update the virt doc index.rst and the MAINTAINERS file. Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/1657561704-12631-2-git-send-email-mikelley@microsoft.com Signed-off-by: Jonathan Corbet Documentation/virt/hyperv/index.rst | 10 ++ Documentation/virt/hyperv/overview.rst | 207 +++++++++++++++++++++++++++++++++ Documentation/virt/index.rst | 1 + MAINTAINERS | 1 + 4 files changed, 219 insertions(+) commit e6bd91a7a45e750b471a24496a7c1a612c0ce899 Author: Yixuan Cao Date: Sat Jul 9 01:23:51 2022 +0800 Documentation/translations/zh_CN/mm/page_owner.rst: adjust some words I noticed that there are some Chinese words that can be more accurate. So I fix them as follows. 首先,英文原文中的"release" 在这个语境下 是物理页面“释放”的意思,而不是“发布”。 其次,标准表的第一列和第二列, 表达的是“长短键”的意思,第一列是“短键”, 而第二列是“长键”。这样翻译或会更清晰一些。 Signed-off-by: Yixuan Cao Acked-by: Yanteng Si Link: https://lore.kernel.org/r/20220708172351.20928-1-caoyixuan2019@email.szu.edu.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/vm/page_owner.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c528be5ed203ece2bcb5680f015d18da76174653 Author: Binbin Zhou Date: Sun Jul 10 21:36:04 2022 +0800 docs/zh_CN: core-api: Add watch_queue Chinese translation Translate core-api/watch_queue.rst into Chinese. Last English version used: commit f5461124d59b ("Documentation: move watch_queue to core-api"). Signed-off-by: Binbin Zhou Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/20220710133604.31382-1-zhoubinbin@loongson.cn Signed-off-by: Jonathan Corbet .../translations/zh_CN/core-api/index.rst | 1 + .../translations/zh_CN/core-api/watch_queue.rst | 313 +++++++++++++++++++++ 2 files changed, 314 insertions(+) commit 12fe434314c8572c8043c6eee6799d2ccac99f26 Author: Dov Murik Date: Tue Jul 12 10:44:55 2022 +0000 Documentation: siphash: Fix typo in the name of offsetofend macro The siphash documentation misspelled "offsetendof" instead of "offsetofend". Fixes: 2c956a60778cbb ("siphash: add cryptographically secure PRF") Signed-off-by: Dov Murik Acked-by: Jason A. Donenfeld Link: https://lore.kernel.org/r/20220712104455.1408150-1-dovmurik@linux.ibm.com Signed-off-by: Jonathan Corbet Documentation/security/siphash.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5a0cdb852b311585b0aff657703da92c874ef8b Author: Lukas Bulwahn Date: Wed Jul 13 06:35:16 2022 +0200 MAINTAINERS: mark linux-doc-tw-discuss mailing list moderated After sending a patch to linux-doc-tw-discuss@lists.sourceforge.net, I got the typical response for a moderated list: Your mail to 'linux-doc-tw-discuss' with the subject .... Is being held until the list moderator can review it for approval. The reason it is being held: Post by non-member to a members-only list Mark this mailing list moderated in MAINTAINERS. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220713043516.19290-1-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36d9018d557c1f8f9cf79b5453da30181be07450 Author: Robert Marko Date: Thu Jun 23 17:50:04 2022 +0200 PCI: qcom: Power on PHY before DBI register accesses IPQ8074 requires the PHY to be powered on before accessing DBI registers. It's not clear whether other variants have the same dependency, but there seems to be no reason for them to be different, so move all the DBI accesses from .init() to .post_init() so they are all after phy_power_on(). [bhelgaas: commit log] Link: https://lore.kernel.org/r/20220623155004.688090-2-robimarko@gmail.com Signed-off-by: Robert Marko Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pcie-qcom.c | 168 +++++++++++++++++++-------------- 1 file changed, 95 insertions(+), 73 deletions(-) commit a0e43bb9973b06ce5c666f0901e104e2037c1b34 Author: Robert Marko Date: Thu Jun 23 17:50:03 2022 +0200 PCI: qcom: Power on PHY before IPQ8074 DBI register accesses Currently the Gen2 port in IPQ8074 will cause the system to hang as it accesses DBI registers in qcom_pcie_init_2_3_3(), and those are only accesible after phy_power_on(). Move the DBI read/writes to a new qcom_pcie_post_init_2_3_3(), which is executed after phy_power_on(). Link: https://lore.kernel.org/r/20220623155004.688090-1-robimarko@gmail.com Fixes: a0fd361db8e5 ("PCI: dwc: Move "dbi", "dbi2", and "addr_space" resource setup into common code") Signed-off-by: Robert Marko Signed-off-by: Bjorn Helgaas Reviewed-by: Dmitry Baryshkov Cc: stable@vger.kernel.org # v5.11+ drivers/pci/controller/dwc/pcie-qcom.c | 48 ++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 20 deletions(-) commit 38f897ae3d44900f627cad708a15db498ce2ca31 Author: Christian Marangi Date: Sat Jul 9 00:27:43 2022 +0200 PCI: qcom: Set up rev 2.1.0 PARF_PHY before enabling clocks We currently enable clocks BEFORE we write to PARF_PHY_CTRL reg to enable clocks and resets. This causes the driver to never set to a ready state with the error 'Phy link never came up'. This is caused by the PHY clock getting enabled before setting the required bits in the PARF regs. A workaround for this was set but with this new discovery we can drop the workaround and use a proper solution to the problem by just enabling the clock only AFTER the PARF_PHY_CTRL bit is set. This correctly sets up the PCIe link and makes it usable even when a bootloader leaves the PCIe link in an undefined state. Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver") Link: https://lore.kernel.org/r/20220708222743.27019-1-ansuelsmth@gmail.com Signed-off-by: Christian Marangi Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pcie-qcom.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 5e6ae050955b566484f3cc6a66e3925eae87a0ed Author: Mohamed Khalfella Date: Mon May 9 18:14:41 2022 +0000 PCI/AER: Iterate over error counters instead of error strings Previously we iterated over AER stat *names*, e.g., aer_correctable_error_string[32], but the actual stat *counters* may not be that large, e.g., pdev->aer_stats->dev_cor_errs[16], which means that we printed junk in the sysfs stats files. Iterate over the stat counter arrays instead of the names to avoid this junk. Also, added a build time check to make sure all counters have entries in strings array. Fixes: 0678e3109a3c ("PCI/AER: Simplify __aer_print_error()") Link: https://lore.kernel.org/r/20220509181441.31884-1-mkhalfella@purestorage.com Reported-by: Meeta Saggi Signed-off-by: Mohamed Khalfella Signed-off-by: Bjorn Helgaas Reviewed-by: Meeta Saggi Reviewed-by: Eric Badger Cc: stable@vger.kernel.org drivers/pci/pcie/aer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit f26e58bf6f547031f91a1b0e39b9308d48a4ba8c Author: Stefan Roese Date: Tue Jan 25 08:18:20 2022 +0100 PCI/AER: Enable error reporting when AER is native If we have native control of AER, set the following error reporting enable bits: - Correctable Error Reporting Enable - Non-Fatal Error Reporting Enable - Fatal Error Reporting Enable - Unsupported Request Reporting Enable Note that these bits are all in the Device Control register and are not AER-specific. This affects all devices with an AER capability, including hot-added devices. Please note that this change is quite invasive, as error reporting now will be enabled for all available PCIe Endpoints, which was previously not the case. When "pci=noaer" is selected, error reporting stays disabled of course. [bhelgaas: commit log, note error reporting is not AER-specific] Link: https://lore.kernel.org/r/20220125071820.2247260-4-sr@denx.de Signed-off-by: Stefan Roese Signed-off-by: Bjorn Helgaas Reviewed-by: Pali Rohár Cc: Bharat Kumar Gogada Cc: Michal Simek Cc: Yao Hongbo Cc: Naveen Naidu drivers/pci/pcie/aer.c | 3 +++ 1 file changed, 3 insertions(+) commit 8795e182b02dc87e343c79e73af6b8b7f9c5e635 Author: Stefan Roese Date: Tue Jan 25 08:18:19 2022 +0100 PCI/portdrv: Don't disable AER reporting in get_port_device_capability() AER reporting is currently disabled in the DevCtl registers of all non Root Port PCIe devices on systems using pcie_ports_native || host->native_aer, disabling AER completely in such systems. This is because 2bd50dd800b5 ("PCI: PCIe: Disable PCIe port services during port initialization"), added a call to pci_disable_pcie_error_reporting() *after* the AER setup was completed for the PCIe device tree. Here a longer analysis about the current status of AER enabling / disabling upon bootup provided by Bjorn: pcie_portdrv_probe pcie_port_device_register get_port_device_capability pci_disable_pcie_error_reporting clear CERE NFERE FERE URRE # <-- disable for RP USP DSP pcie_device_init device_register # new AER service device aer_probe aer_enable_rootport # RP only set_downstream_devices_error_reporting set_device_error_reporting # self (RP) if (RP || USP || DSP) pci_enable_pcie_error_reporting set CERE NFERE FERE URRE # <-- enable for RP pci_walk_bus set_device_error_reporting if (RP || USP || DSP) pci_enable_pcie_error_reporting set CERE NFERE FERE URRE # <-- enable for USP DSP In a typical Root Port -> Endpoint hierarchy, the above: - Disables Error Reporting for the Root Port, - Enables Error Reporting for the Root Port, - Does NOT enable Error Reporting for the Endpoint because it is not a Root Port or Switch Port. In a deeper Root Port -> Upstream Switch Port -> Downstream Switch Port -> Endpoint hierarchy: - Disables Error Reporting for the Root Port, - Enables Error Reporting for the Root Port, - Enables Error Reporting for both Switch Ports, - Does NOT enable Error Reporting for the Endpoint because it is not a Root Port or Switch Port, - Disables Error Reporting for the Switch Ports when pcie_portdrv_probe() claims them. AER does not re-enable it because these are not Root Ports. Remove this call to pci_disable_pcie_error_reporting() from get_port_device_capability(), leaving the already enabled AER configuration intact. With this change, AER is enabled in the Root Port and the PCIe switch upstream and downstream ports. Only the PCIe Endpoints don't have AER enabled yet. A follow-up patch will take care of this Endpoint enabling. Fixes: 2bd50dd800b5 ("PCI: PCIe: Disable PCIe port services during port initialization") Link: https://lore.kernel.org/r/20220125071820.2247260-3-sr@denx.de Signed-off-by: Stefan Roese Signed-off-by: Bjorn Helgaas Reviewed-by: Pali Rohár Cc: Rafael J. Wysocki Cc: Bharat Kumar Gogada Cc: Michal Simek Cc: Yao Hongbo Cc: Naveen Naidu drivers/pci/pcie/portdrv_core.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 8ed2f5a6f385b5fff313208b90ea83f7121bd909 Author: Hengqi Chen Date: Tue Jul 12 10:57:45 2022 +0800 libbpf: Error out when binary_path is NULL for uprobe and USDT binary_path is a required non-null parameter for bpf_program__attach_usdt and bpf_program__attach_uprobe_opts. Check it against NULL to prevent coredump on strchr. Signed-off-by: Hengqi Chen Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220712025745.2703995-1-hengqi.chen@gmail.com tools/lib/bpf/libbpf.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit ce838f7dc7957afb2846c3bc537db56e4c513390 Author: Nícolas F. R. A. Prado Date: Tue Jul 12 17:45:54 2022 -0400 platform/chrome: cros_ec_typec: Use dev_err_probe on port register fail The typec_register_port() can fail with EPROBE_DEFER if the endpoint node hasn't probed yet. In order to avoid spamming the log with errors in that case, log using dev_err_probe(). Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: Guenter Roeck Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220712214554.545035-1-nfraprado@collabora.com Signed-off-by: Prashant Malani drivers/platform/chrome/cros_ec_typec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17cd10a44a8962860ff4ba351b2a290e752dbbde Author: Priyanka Dandamudi Date: Wed Jul 13 18:32:09 2022 +0530 drm/i915: Add lmem_bar_size modparam For testing purposes, support forcing the lmem_bar_size through a new modparam. In CI we only have a limited number of configurations for DG2, but we still need to be reasonably sure we get a usable device (also verifying we report the correct values for things like probed_cpu_visible_size etc) with all the potential lmem_bar sizes that we might expect see in the wild. v2: Update commit message and a minor modification.(Matt) v3: Optimised lmem bar size code and modified code to resize bar maximum upto lmem_size instead of maximum supported size.(Nirmoy) v4: Optimised lmem bar size code.(Nirmoy) Signed-off-by: Priyanka Dandamudi Cc: Matthew Auld Cc: Nirmoy Das Reviewed-by: Nirmoy Das Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220713130209.2573233-3-priyanka.dandamudi@intel.com drivers/gpu/drm/i915/gt/intel_region_lmem.c | 34 ++++++++++++++++++++++++----- drivers/gpu/drm/i915/i915_params.c | 2 ++ drivers/gpu/drm/i915/i915_params.h | 1 + 3 files changed, 32 insertions(+), 5 deletions(-) commit a91d1a17cd341548fd9535e33c331a2756acdfae Author: Akeem G Abodunrin Date: Wed Jul 13 18:32:08 2022 +0530 drm/i915: Add support for LMEM PCIe resizable bar Add support for the local memory PICe resizable bar, so that local memory can be resized to the maximum size supported by the device, and mapped correctly to the PCIe memory bar. It is usual that GPU devices expose only 256MB BARs primarily to be compatible with 32-bit systems. So, those devices cannot claim larger memory BAR windows size due to the system BIOS limitation. With this change, it would be possible to reprogram the windows of the bridge directly above the requesting device on the same BAR type. v2:Moved code to gt/intel_region_lmem.c and used only single underscore for function names.(Jani) v3: Optimised code. Signed-off-by: Akeem G Abodunrin Signed-off-by: Michał Winiarski Cc: Stuart Summers Cc: Michael J Ruhl Cc: Prathap Kumar Valsan Cc: Jani Nikula Signed-off-by: Priyanka Dandamudi Reviewed-by: Matthew Auld Reviewed-by: Nirmoy Das Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220713130209.2573233-2-priyanka.dandamudi@intel.com drivers/gpu/drm/i915/gt/intel_region_lmem.c | 75 +++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit a5e4a53818ad585416a214b894fdf568443d5293 Author: Matt Roper Date: Tue Jul 12 15:05:13 2022 -0700 drm/i915: Correct ss -> steering calculation for pre-Xe_HP platforms Accidental use of a "SLICE" macro where a "SUBSLICE" macro was intended causes the group ID for steering to be calculated incorrectly on pre-Xe_HP platforms. Fixes: 9a92732f040a ("drm/i915/gt: Add general DSS steering iterator to intel_gt_mcr") Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20220712220513.3451794-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 568f6869e680c7492c5e38df9094af86fe9d6364 Author: Andy Shevchenko Date: Tue May 31 17:11:18 2022 +0300 iio: adc: xilinx-xadc: Drop duplicate NULL check in xadc_parse_dt() The fwnode_for_each_child_node() is NULL-aware, no need to check its parameters outside. Drop duplicate NULL check in xadc_parse_dt(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220531141118.64540-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/adc/xilinx-xadc-core.c | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) commit 59b2947ed4c32da50e7390fce6e200669900f503 Author: Andy Shevchenko Date: Tue May 31 17:11:17 2022 +0300 iio: adc: xilinx-xadc: Make use of device properties Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Add mod_devicetable.h include. Signed-off-by: Andy Shevchenko Acked-by: Michal Simek Link: https://lore.kernel.org/r/20220531141118.64540-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/adc/xilinx-xadc-core.c | 39 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 23 deletions(-) commit b0b0b77ea611e3088e9523e60860f4f41b62b235 Author: Alexander Lobakin Date: Tue Jul 12 17:38:36 2022 +0200 iommu/vt-d: avoid invalid memory access via node_online(NUMA_NO_NODE) KASAN reports: [ 4.668325][ T0] BUG: KASAN: wild-memory-access in dmar_parse_one_rhsa (arch/x86/include/asm/bitops.h:214 arch/x86/include/asm/bitops.h:226 include/asm-generic/bitops/instrumented-non-atomic.h:142 include/linux/nodemask.h:415 drivers/iommu/intel/dmar.c:497) [ 4.676149][ T0] Read of size 8 at addr 1fffffff85115558 by task swapper/0/0 [ 4.683454][ T0] [ 4.685638][ T0] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.19.0-rc3-00004-g0e862838f290 #1 [ 4.694331][ T0] Hardware name: Supermicro SYS-5018D-FN4T/X10SDV-8C-TLN4F, BIOS 1.1 03/02/2016 [ 4.703196][ T0] Call Trace: [ 4.706334][ T0] [ 4.709133][ T0] ? dmar_parse_one_rhsa (arch/x86/include/asm/bitops.h:214 arch/x86/include/asm/bitops.h:226 include/asm-generic/bitops/instrumented-non-atomic.h:142 include/linux/nodemask.h:415 drivers/iommu/intel/dmar.c:497) after converting the type of the first argument (@nr, bit number) of arch_test_bit() from `long` to `unsigned long`[0]. Under certain conditions (for example, when ACPI NUMA is disabled via command line), pxm_to_node() can return %NUMA_NO_NODE (-1). It is valid 'magic' number of NUMA node, but not valid bit number to use in bitops. node_online() eventually descends to test_bit() without checking for the input, assuming it's on caller side (which might be good for perf-critical tasks). There, -1 becomes %ULONG_MAX which leads to an insane array index when calculating bit position in memory. For now, add an explicit check for @node being not %NUMA_NO_NODE before calling test_bit(). The actual logics didn't change here at all. [0] https://github.com/norov/linux/commit/0e862838f290147ea9c16db852d8d494b552d38d Fixes: ee34b32d8c29 ("dmar: support for parsing Remapping Hardware Static Affinity structure") Cc: stable@vger.kernel.org # 2.6.33+ Reported-by: kernel test robot Signed-off-by: Alexander Lobakin Reviewed-by: Andy Shevchenko Reviewed-by: Lu Baolu Signed-off-by: Yury Norov drivers/iommu/intel/dmar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09cf6054c859d408cc60024808bfda931bf8ca0e Merge: a8d5df69e2ec 2a1be12c4d77 Author: Mark Brown Date: Wed Jul 13 16:52:55 2022 +0100 ASoC/SoundWire: Intel: add sdw BE dai trigger Merge series from Bard Liao : For SOF IPC4, we need to set pipeline state in BE DAI trigger. commit 9992b19d756ab8f0889fcaf3e71ff93852e74694 Author: Urs Schroffenegger Date: Sun Jul 10 22:26:39 2022 +0200 hwmon: (asus-ec-sensors) add definitions for ROG ZENITH II EXTREME Add definitions for ROG ZENITH II EXTREME and some unknown yet temperature sensors in the second EC bank. Details are available at [1, 2]. [1] https://github.com/zeule/asus-ec-sensors/pull/26 [2] https://github.com/zeule/asus-ec-sensors/issues/16 Signed-off-by: Urs Schroffenegger Signed-off-by: Eugene Shalygin Link: https://lore.kernel.org/r/20220710202639.1812058-2-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck Documentation/hwmon/asus_ec_sensors.rst | 1 + drivers/hwmon/asus-ec-sensors.c | 47 +++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) commit 654c97351baf5e2f00e417291cc9e9caf1d07f4b Author: Aleksa Savic Date: Thu Jul 7 13:50:50 2022 +0200 hwmon: (aquacomputer_d5next) Move device-specific data into struct aqc_data As preparation for adding support for more devices in upcoming patches, move device-specific data, such as number of fans, temperature sensors, register offsets etc. to struct aqc_data. This is made possible by the fact that the supported Aquacomputer devices share the same layouts of sensor substructures. This allows aqc_raw_event() and others to stay general and not be cluttered with similar loops for each device. Signed-off-by: Jack Doan Signed-off-by: Aleksa Savic Link: https://lore.kernel.org/r/20220707115050.90021-1-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck drivers/hwmon/aquacomputer_d5next.c | 244 ++++++++++++++---------------------- 1 file changed, 92 insertions(+), 152 deletions(-) commit 1c4e4f4a0e8d9ebe8be1c838fec4fb7053a989d9 Author: Eugene Shalygin Date: Sun Jul 10 10:55:38 2022 +0200 hwmon: (asus-ec-sensors) add missing sensors for X570-I GAMING VRM and chipset temperature for ROG STRIX X570-I GAMING were missing according to a user contribution to the LHM project [1]. [1] https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/pull/767 Signed-off-by: Eugene Shalygin Link: https://lore.kernel.org/r/20220710085539.1682869-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck drivers/hwmon/asus-ec-sensors.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5918036cfa8ded7aa8094db70295011ce2275447 Author: Linus Walleij Date: Tue Jul 12 23:46:24 2022 +0200 hwmon: (drivetemp) Add module alias Adding a MODULE_ALIAS() to drivetemp will make the driver easier for modprobe to autoprobe. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20220712214624.1845158-1-linus.walleij@linaro.org Fixes: 5b46903d8bf3 ("hwmon: Driver for disk and solid state drives with temperature sensors") Signed-off-by: Guenter Roeck drivers/hwmon/drivetemp.c | 1 + 1 file changed, 1 insertion(+) commit 8e1187fe7a7fbac4df1a95abe0fffa3a41d345aa Author: Christophe JAILLET Date: Sat Jul 2 08:05:54 2022 +0200 hwmon: (asus_wmi_sensors) Save a few bytes of memory The first 'for' loop of asus_wmi_configure_sensor_setup() only computes the number and type of sensors that exist in the system. Here, the 'temp_sensor' structure is only used to store the data collected by asus_wmi_sensor_info(). There is no point in using a devm_ variant for this allocation. This wastes some memory for no good reason. Use the stack instead. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/e23cea6c489fabb109a61e8a33d146a6b74c0529.1656741926.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck drivers/hwmon/asus_wmi_sensors.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 5993b9887ac3b80fba78e1a488ac748d6e4429c1 Author: Guenter Roeck Date: Wed Jun 29 08:26:20 2022 -0700 hwmon: (lm90) Use worker for alarm notifications Reporting alarms using hwmon_notify_event() may result in a callback from the thermal subsystem. This means that such notifications must not hold the update lock to avoid a deadlock. To avoid this situation, use a worker to handle notifications. Reported-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Fixes: f6d0775119fb ("hwmon: (lm90) Rework alarm/status handling") Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 8f9eb10ff71d8e3beeee3f8d19050223600faf85 Author: Michael Carns Date: Tue Jun 28 00:54:36 2022 +0200 hwmon: (asus-ec-sensors) add support for Maximus XI Hero Add definitions for ROG MAXIMUS XI HERO and ROG MAXIMUS XI HERO (WI-FI) boards. Signed-off-by: Michael Carns Signed-off-by: Eugene Shalygin Link: https://lore.kernel.org/r/20220627225437.87462-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck Documentation/hwmon/asus_ec_sensors.rst | 2 ++ drivers/hwmon/asus-ec-sensors.c | 36 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit c10d52d6eda346e2c714d0d534ac8078d684511e Author: Armin Wolf Date: Sun Feb 20 20:08:51 2022 +0100 hwmon: (dell-smm) Improve assembly code The new assembly code works on both 32 bit and 64 bit cpus and allows for more compiler optimisations. Since clang runs out of registers on 32 bit x86 when using CC_OUT, we need to execute "setc" ourself. Also modify the debug message so we can still see the result (eax) when the carry flag was set. Tested with 32 bit and 64 bit kernels on a Dell Inspiron 3505. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20220220190851.17965-1-W_Armin@gmx.de [groeck: Rebased to v5.19-rc3] Signed-off-by: Guenter Roeck drivers/hwmon/dell-smm-hwmon.c | 78 ++++++++++-------------------------------- 1 file changed, 18 insertions(+), 60 deletions(-) commit 4a235369dae5aa366c007fa46f670375cd845374 Author: Mårten Lindahl Date: Tue Jun 14 11:51:44 2022 +0200 hwmon: (pmbus/ltc2978) Set voltage resolution The LTC2977 regulator does not set the regulator_desc .n_voltages value which is needed in order to let the regulator core list the regulator voltage range. This patch defines a regulator_desc with a voltage range, and uses it for defining voltage resolution for regulators LTC2972/LTC2974/LTC2975/ LTC2977/LTC2978/LTC2979/LTC2980/LTM2987 based on that they all have a 16 bit ADC with the same stepwise 122.07uV resolution. It also scales the resolution to a 1mV resolution which is easier to handle. Signed-off-by: Mårten Lindahl Link: https://lore.kernel.org/r/20220614095144.3472305-1-marten.lindahl@axis.com Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/ltc2978.c | 44 +++++++++++++++++++++++++++++++++++++++---- drivers/hwmon/pmbus/pmbus.h | 8 ++++++-- 2 files changed, 46 insertions(+), 6 deletions(-) commit 2a20db9bfc42b71fa311ace70265ba16f5a3ab80 Author: Mårten Lindahl Date: Tue Jun 14 11:38:55 2022 +0200 hwmon: (pmbus) Add list_voltage to pmbus ops When checking if a regulator supports a voltage range, the regulator needs to have a list_voltage callback set to the regulator_ops or else -EINVAL will be returned. This support does not exist for the pmbus regulators, so this patch adds pmbus_regulator_list_voltage to the pmbus_regulator_ops. Signed-off-by: Mårten Lindahl Link: https://lore.kernel.org/r/20220614093856.3470672-3-marten.lindahl@axis.com Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/pmbus_core.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 07fb76273db89d9340fa1fea2997d73fa3768ab9 Author: Mårten Lindahl Date: Tue Jun 14 11:38:54 2022 +0200 hwmon: (pmbus) Introduce and use cached vout margins When setting a new voltage the voltage boundaries are read every time to check that the new voltage is within the proper range. Checking these voltage boundaries consists of reading one of PMBUS_MFR_VOUT_MIN/ PMBUS_VOUT_MARGIN_LOW registers and then PMBUS_MFR_VOUT_MAX/ PMBUS_VOUT_MARGIN_HIGH together with writing the PMBUS_CLEAR_FAULTS register. Since these boundaries are never being changed, it can be cached and thus saving unnecessary smbus transmissions. Signed-off-by: Mårten Lindahl Link: https://lore.kernel.org/r/20220614093856.3470672-2-marten.lindahl@axis.com Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/pmbus_core.c | 78 +++++++++++++++++++++++++++++++--------- 1 file changed, 61 insertions(+), 17 deletions(-) commit b674bcb13f418e0580878c21afbe14c4bdfa3138 Author: Liang He Date: Thu Jun 16 19:40:24 2022 +0800 hwmon: (gsc-hwmon) Add missing of_node_put() In gsc_hwmon_get_devtree_pdata(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() in fail path or when it is not used anymore. Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220616114024.3985770-1-windhl@126.com Signed-off-by: Guenter Roeck drivers/hwmon/gsc-hwmon.c | 3 +++ 1 file changed, 3 insertions(+) commit 489dd8f05a3e97a28bc240be29b78bf8aba77969 Author: Armin Wolf Date: Mon Jun 13 01:22:08 2022 +0200 hwmon: (dell-smm) Add Dell G5 5590 to DMI table According to Bug 215983 at bugzilla.kernel.org, the Dell G5 5590 supports the SMM interface and can thus be loaded with ignore_dmi being set. Add the model the DMI table to allow for automatic loadig on this model. Compile-tested only. Signed-off-by: Armin Wolf Acked-by: Pali Rohár Link: https://lore.kernel.org/r/20220612232208.27901-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck drivers/hwmon/dell-smm-hwmon.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 385e5f57053ff293282fea84c1c27186d53f66e1 Author: Armin Wolf Date: Sun Jun 12 06:18:06 2022 +0200 hwmon: (dell-smm) Add Dell XPS 13 7390 to fan control whitelist A user reported that the program dell-bios-fan-control worked on his Dell XPS 13 7390 to switch off automatic fan control. Since it uses the same mechanism as the dell_smm_hwmon module, add this model to the fan control whitelist. Compile-tested only. Signed-off-by: Armin Wolf Acked-by: Pali Rohár Link: https://lore.kernel.org/r/20220612041806.11367-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck drivers/hwmon/dell-smm-hwmon.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 452d5e2976941c24c4fe9e6d782bfbac3cabd54f Author: Andy Shevchenko Date: Fri Jun 10 13:33:24 2022 +0300 hwmon: (nct6775) Drop duplicate NULL check in ->init() and ->exit() Since platform_device_unregister() is NULL-aware, we don't need to duplicate this check. Remove it and fold the rest of the code. Signed-off-by: Andy Shevchenko Reviewed-by: Zev Weiss Link: https://lore.kernel.org/r/20220610103324.87483-1-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck drivers/hwmon/nct6775-platform.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 0356d778aa1e14d80db40a9dae02192d6b47a5ac Author: Ren Zhijie Date: Thu Jun 9 20:04:48 2022 +0800 hwmon: (pmbus) fix build error unused-function If CONFIG_PMBUS is y and CONFIG_DEBUG_FS is not set. make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-, will be failed, like this: drivers/hwmon/pmbus/pmbus_core.c:593:13: error: ‘pmbus_check_block_register’ defined but not used [-Werror=unused-function] static bool pmbus_check_block_register(struct i2c_client *client, int page, ^~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[3]: *** [drivers/hwmon/pmbus/pmbus_core.o] Error 1 make[2]: *** [drivers/hwmon/pmbus] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [drivers/hwmon] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [drivers] Error 2 To fix building warning, use __maybe_unused to attach this func. Reported-by: Hulk Robot Fixes: c3ffc3a1ff83("hwmon: (pmbus) add a function to check the presence of a block register") Signed-off-by: Ren Zhijie Link: https://lore.kernel.org/r/20220609120448.139907-1-renzhijie2@huawei.com [groeck: Fixed continuation line alignment] Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/pmbus_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 00dc6452bee557c7d34a6064472817f6f6b3f185 Author: Slawomir Stepien Date: Tue Jun 7 08:35:04 2022 +0200 hwmon: (lm90) Read the channel's temperature offset from device-tree Try to read the channel's temperature offset from device-tree. Having offset in device-tree node is not mandatory. The offset can only be set for remote channels. Signed-off-by: Slawomir Stepien Link: https://lore.kernel.org/r/20220607063504.1287855-3-sst@poczta.fm Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 07845f559d325ce7b227b478dd33b8c524a065ad Author: Slawomir Stepien Date: Tue Jun 7 08:35:03 2022 +0200 hwmon: (lm90) Add support for 2nd remote channel's offset register The ADT7481 have LM90_HAVE_TEMP3 and LM90_HAVE_OFFSET flags, but the support of second remote channel's offset is missing. Add that implementation. Signed-off-by: Slawomir Stepien Link: https://lore.kernel.org/r/20220607063504.1287855-2-sst@poczta.fm Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 58 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 49 insertions(+), 9 deletions(-) commit 9b00a5f50934b74c61982dcd30b2c21e07d0d317 Author: Ziyang Xuan Date: Mon Jun 6 21:14:01 2022 +0800 hwmon: (occ) Delete unnecessary NULL check kvfree(NULL) is safe. NULL check before kvfree() is not needed. Delete them to simplify the code. Generated by coccinelle script: scripts/coccinelle/free/ifnullfree.cocci Signed-off-by: Ziyang Xuan Reviewed-by: Eddie James Link: https://lore.kernel.org/r/20220606131401.4053036-1-william.xuanziyang@huawei.com Signed-off-by: Guenter Roeck drivers/hwmon/occ/p9_sbe.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f9938eeb97fc786148809be6ca752c0c6baebf49 Author: Slawomir Stepien Date: Wed May 25 09:36:56 2022 +0200 hwmon: (lm90) Read the channel's label from device-tree Try to read the channel's label from device-tree. Having label in device-tree node is not mandatory. Signed-off-by: Slawomir Stepien Link: https://lore.kernel.org/r/20220525073657.573327-7-sst@poczta.fm Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit 27f0438972fc045a575d4f95458415e62c1d24e5 Author: Slawomir Stepien Date: Wed May 25 09:36:55 2022 +0200 hwmon: (lm90) Define maximum number of channels that are supported Use this define in all the places where literal '3' was used in this context. Signed-off-by: Slawomir Stepien Link: https://lore.kernel.org/r/20220525073657.573327-6-sst@poczta.fm Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit b9e7dfdedbc5309eb516fb11cef4a67543f20fc2 Author: Slawomir Stepien Date: Wed May 25 09:36:53 2022 +0200 hwmon: (lm90) Add compatible entry for adt7481 This will allow binding the driver with the device from the device tree. Signed-off-by: Slawomir Stepien Link: https://lore.kernel.org/r/20220525073657.573327-4-sst@poczta.fm Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 4 ++++ 1 file changed, 4 insertions(+) commit f07691219cff2521e6eace2cb6d3e3d3c589b376 Author: Slawomir Stepien Date: Wed May 25 09:36:52 2022 +0200 dt-bindings: hwmon: Allow specifying channels for lm90 Add binding description for temperature channels. Currently, support for label and temperature-offset-millicelsius is implemented. Signed-off-by: Slawomir Stepien Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220525073657.573327-3-sst@poczta.fm Signed-off-by: Guenter Roeck .../devicetree/bindings/hwmon/national,lm90.yaml | 129 +++++++++++++++++++++ 1 file changed, 129 insertions(+) commit d8d5879a444297f819c70fbffd7b6a2790eea571 Author: Slawomir Stepien Date: Wed May 25 09:36:51 2022 +0200 dt-bindings: hwmon: Add compatible string for ADT7481 in lm90 This will allow binding the driver with the device from the device tree. This device can work in extended temperature measurement mode, so add it also to the list of devices that support 'ti,extended-range-enable'. Signed-off-by: Slawomir Stepien Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220525073657.573327-2-sst@poczta.fm Signed-off-by: Guenter Roeck Documentation/devicetree/bindings/hwmon/national,lm90.yaml | 2 ++ 1 file changed, 2 insertions(+) commit b97adb596399581df42a5f94e14235359f150373 Author: Uwe Kleine-König Date: Fri May 27 17:34:45 2022 +0200 hwmon: Allow to compile ASB100 and FSCHMD on !X86 The two drivers compile just fine on ARCH=arm. Allow to select these drivers if COMPILE_TEST is enabled. Signed-off-by: Uwe Kleine-König Reviewed-by: Jean Delvare Link: https://lore.kernel.org/r/20220527153445.1871086-1-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck drivers/hwmon/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6fd584230a85aefb22f291884af790664c2eddae Author: Adam Wujek Date: Wed Jun 1 01:33:17 2022 +0000 hwmon: (pmbus) add MFR_* registers to debugfs Add registers to debugfs: PMBUS_MFR_ID PMBUS_MFR_MODEL PMBUS_MFR_REVISION PMBUS_MFR_LOCATION PMBUS_MFR_DATE PMBUS_MFR_SERIAL To reduce the number of debugfs entries, only values from page 0 are reported. It is assumed that values of these registers are the same for all pages. Please note that the PMBUS standard allows added registers to be page-specific. Signed-off-by: Adam Wujek Link: https://lore.kernel.org/r/20220601013232.801133-2-dev_public@wujek.eu Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/pmbus_core.c | 99 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 2 deletions(-) commit 8a85007c8386ed8378ed3ee9f53e995e3c45fa1c Author: Adam Wujek Date: Wed Jun 1 01:33:03 2022 +0000 hwmon: (pmbus) add a function to check the presence of a block register Other functions (like pmbus_check_byte_register) cannot be used to check the presence of a block register, because it will generate error when PEC is used. Signed-off-by: Adam Wujek Link: https://lore.kernel.org/r/20220601013232.801133-1-dev_public@wujek.eu Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/pmbus_core.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit bae26b801f98bc902ab4a43c96947f3a0ce4f3a0 Author: Shady Nawara Date: Fri Jun 3 14:27:58 2022 +0200 hwmon: (asus-ec-sensors) add support for Strix Z690-a D4 adds T_Sensor and VRM Temp sensors for the Asus Strix z690-a D4 motherboard Signed-off-by: Shady Nawara Signed-off-by: Eugene Shalygin Link: https://lore.kernel.org/r/20220603122758.1561064-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck Documentation/hwmon/asus_ec_sensors.rst | 1 + drivers/hwmon/asus-ec-sensors.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) commit fd2d53c367ae9983c2100ac733a834e0c79d7537 Author: Armin Wolf Date: Sun Jun 5 00:02:00 2022 +0200 hwmon: (sch56xx-common) Add DMI override table Some devices like the Fujitsu Celsius W380 do contain a working sch56xx hardware monitoring device, but do not contain the necessary DMI onboard device. Do not check for the presence of an suitable onboard device on these machines. The list of affected machines was created using data collected by the Linux Hardware Project. Tested on a Fujitsu Esprimo P720, but sadly not on a affected machine. Fixes: 393935baa45e (hwmon: (sch56xx-common) Add automatic module loading on supported devices) Signed-off-by: Armin Wolf Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20220604220200.2567-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck drivers/hwmon/sch56xx-common.c | 44 ++++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 10 deletions(-) commit 39397ba8a7ec46b2b2553886056acabae1ef7a40 Author: Christophe JAILLET Date: Fri Jun 3 22:51:46 2022 +0200 hwmon: (lm75) Replace kernel.h with the necessary inclusions When kernel.h is used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved. Replace kernel.h inclusion with the list of what is really being used. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/4e07ed43274ad912d4efcfc04f673f25e8f89fdc.1654289489.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck drivers/hwmon/lm75.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 739743ec78c9d70954845609093dc0ffb22f3ab8 Author: Aleksander Mazur Date: Sun Jun 5 01:21:14 2022 +0200 hwmon: (f71882fg) Add support for F71858AD (0x0903) Treat F71858AD like F71858FG. Tested on Igel D220. Signed-off-by: Aleksander Mazur Link: https://lore.kernel.org/r/20220605012114.3d85a75a@mocarz Signed-off-by: Guenter Roeck drivers/hwmon/f71882fg.c | 2 ++ 1 file changed, 2 insertions(+) commit e10d9e4ca1d9d7b28907c3850828ae214c3adf67 Author: Guenter Roeck Date: Wed May 18 00:35:34 2022 -0700 hwmon: (pmbus) Add support for Analog Devices LT7182S Add support for Analog Devices LT7182S Dual Channel 6A, 20V PolyPhase Step-Down Silent Switcher with Digital Power System Management. Signed-off-by: Guenter Roeck Documentation/hwmon/index.rst | 1 + Documentation/hwmon/lt7182s.rst | 92 +++++++++++++++++++ drivers/hwmon/pmbus/Kconfig | 9 ++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/lt7182s.c | 195 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 298 insertions(+) commit 5e9caf86b835a4d4fe6b9ddfe4b75a2d68a0be45 Author: Guenter Roeck Date: Wed May 18 11:44:01 2022 -0700 dt-bindings: trivial-devices: Add lt7182s Add Analog Devices LT7182S Dual Channel Step-Down Switcher. Acked-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 4036a48e20e84930645f20bb817a04dc70286695 Author: Guenter Roeck Date: Wed Mar 13 14:36:28 2019 -0700 hwmon: (pmbus) Add IEEE 754 half precision support to PMBus core Add support for the IEEE 754 half precision data format as specified in PMBus v1.3.1. Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/pmbus.h | 2 +- drivers/hwmon/pmbus/pmbus_core.c | 142 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 139 insertions(+), 5 deletions(-) commit ca99633ae40937adfe9acf3d01e5c74fbd940927 Author: Guenter Roeck Date: Sun Jan 16 08:55:49 2022 -0800 hwmon: (lm90) Support temp_samples attribute Several of the chips supported by this driver support configuring the number of samples (or the fault queue depth) necessary before a fault or alarm is reported. This is done either with a bit in the configuration register or with a separate "consecutive alert" register. Support this functionality with the temp_samples attribute. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 105 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 91 insertions(+), 14 deletions(-) commit 018b82877046c2644acd43d5a03c0d3aded5caf2 Author: Guenter Roeck Date: Thu Dec 16 20:05:32 2021 -0800 hwmon: (lm90) Add table with supported Analog/ONSEMI devices Add table with device names and known register values for supported devices from Analog / ON Semiconductor. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 9a1986637021f4578937d18f4bc0fa2062b992b5 Author: Guenter Roeck Date: Thu Jan 6 19:52:36 2022 -0800 hwmon: (lm90) Add support and detection of Philips/NXP NE1618 NE1618 is similar to NE1617 but supports manufacturer and chip ID registers as well as 11 bit external temperature resolution. Signed-off-by: Guenter Roeck Documentation/hwmon/lm90.rst | 10 +++++++++- drivers/hwmon/Kconfig | 2 +- drivers/hwmon/lm90.c | 44 ++++++++++++++++++++++++++++++++------------ 3 files changed, 42 insertions(+), 14 deletions(-) commit f63f6cce28cd90f7caa68b4a3690896523d142a4 Author: Guenter Roeck Date: Thu Jan 6 15:07:48 2022 -0800 hwmon: (lm90) Add explicit support for ADM1020 ADM1020 is compatible with ADM1021 but has a separate chip revision and a limited I2C address range. Signed-off-by: Guenter Roeck Documentation/hwmon/lm90.rst | 10 +++++++++- drivers/hwmon/Kconfig | 4 ++-- drivers/hwmon/lm90.c | 10 +++++++++- 3 files changed, 20 insertions(+), 4 deletions(-) commit b1526b38e363bd87840c0e2c22a16e6fd42fea56 Author: Guenter Roeck Date: Tue Dec 28 07:59:26 2021 -0800 hwmon: (lm90) Only disable alerts if not already disabled It was observed that the alert handler may be called from the i2c core even after alerts have already been disabled. Only disable alerts if they have not already been disabled. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 41e6d7215d79f98758def6ef60161fd891bbac0d Author: Guenter Roeck Date: Wed Dec 15 19:58:01 2021 -0800 hwmon: (lm90) Add support for ADT7421 ADT7421 is similar to ADT7461A but supports configurable Beta Compensation. Packet Error Checking (PEC) is supported but undocumented. A devicetree node is not added for the added chip since it is quite unlikely that such an old chip will ever be used in a devicetree based system. It can be added later if needed. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit d8521f82dfb67442777a3f7ec2fdc1237384195e Author: Guenter Roeck Date: Mon Dec 13 11:26:54 2021 -0800 hwmon: (lm90) Add support for ON Semiconductor NCT218 NCT218 is compatible to NCT72 and NCT214. It also supports PEC (packet error checking). Similar to NCT72 and NCT214, PEC support is undocumented. Unlike NCT214 and NCT72, NCT218 does not support the undocumented secondary chip and manufacturer ID registers at 0x3e and 0x3f and returns 0x00 when reading those registers. The value for the chip revision register is not documented but was observed to be 0xca. Use that information to improve chip detection accuracy. Signed-off-by: Guenter Roeck Documentation/hwmon/lm90.rst | 10 ++++++++++ drivers/hwmon/Kconfig | 2 +- drivers/hwmon/lm90.c | 31 +++++++++++++++++++++++++++++-- 3 files changed, 40 insertions(+), 3 deletions(-) commit 2c6cb6c557858672cafb6a5dc89a1df993420831 Author: Guenter Roeck Date: Thu Dec 2 21:58:25 2021 -0800 hwmon: (lm90) Add support for ON Semiconductor NCT214 and NCT72 NCT214 and NCT72 are compatible to ADT7461/ADT7461A but have full PEC (packet error checking) support. PEC support is undocumented. Both chips support the undocumented secondary chip and manufacturer ID registers at 0x3e and 0x3f, and return 0x61 as chip ID. Use this information to improve the accuracy of chip detection code. Signed-off-by: Guenter Roeck Documentation/hwmon/lm90.rst | 20 ++++++++++++++++++++ drivers/hwmon/Kconfig | 3 ++- drivers/hwmon/lm90.c | 35 ++++++++++++++++++++++++++++++++++- 3 files changed, 56 insertions(+), 2 deletions(-) commit af4540b112c48ac523f964f5014b48291490ac18 Author: Guenter Roeck Date: Thu Jan 6 12:12:31 2022 -0800 hwmon: (lm90) Add explicit support for NCT210 Unlike ADM1023 and compatible chips, NCT210 does not support a temperature offset register. A real chip was found to have a chip revision of 0x3f. Use it to detect NCT210 explicitly. Signed-off-by: Guenter Roeck Documentation/hwmon/lm90.rst | 14 ++++++++++++++ drivers/hwmon/Kconfig | 2 +- drivers/hwmon/lm90.c | 18 ++++++++++++++++-- 3 files changed, 31 insertions(+), 3 deletions(-) commit df18fccd99e3d1b59d44fc04e7e48ccbef283c0e Author: Guenter Roeck Date: Mon Dec 27 12:10:36 2021 -0800 hwmon: (lm90) Combine lm86 and lm90 configuration LM86 and LM90 support exactly the same features, so there is no need to keep their configuration options separate. Combine to reduce data size. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 37d1dc8d48cf266ffcb83b223d2dd0667a73e830 Author: Guenter Roeck Date: Mon Nov 22 13:00:34 2021 -0800 hwmon: (lm90) Add remaining chips supported by adm1021 driver All chips supported by the ADM1021 driver are also supported by the LM90 driver. Make that support official. After this change, the adm1021 driver is only needed if the lm90 driver is disabled. Also, the adm1021 driver misdetects a variety of chips as MAX1617A, which is unwanted if any of those chips is in the system. For this reason. make the adm1021 driver dependent on !SENSORS_LM90 to show that it is not needed if the lm90 driver is enabled, and to avoid misdetection if a chip supported by the lm90 driver is in the system. Devicetree nodes are not added for the added chips since it is quite unlikely that such old chips will ever be used in a devicetree based system. They can be added later if needed. Signed-off-by: Guenter Roeck Documentation/hwmon/lm90.rst | 34 +++++++++++++++++++++++++++++++++- drivers/hwmon/Kconfig | 1 + drivers/hwmon/lm90.c | 26 ++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) commit 0c6bffd4a625319d83f40a40090a5335a5bd8a8d Author: Guenter Roeck Date: Fri Nov 19 16:21:37 2021 -0800 hwmon: (lm90) Add support for ADM1021, ADM1021A, and ADM1023 Both chips are quite similar to other chips of this series, so add support for them to the lm90 driver. Also mention ON Semiconductor NCT210, which is pin and register compatible to ADM1021A. None of the chips support the secondary manufacturer and chip ID registers at 0x3e and 0x3f, but return 0 when reading from those registers. Use that information to improve the accuracy of chip detection code. Devicetree nodes are not added for the added chips since it is quite unlikely that such old chips will ever be used in a devicetree based system. They can be added later if needed. Signed-off-by: Guenter Roeck Documentation/hwmon/lm90.rst | 23 +++++++++++++++++++++- drivers/hwmon/Kconfig | 4 ++-- drivers/hwmon/lm90.c | 47 +++++++++++++++++++++++++++++++++++++++----- 3 files changed, 66 insertions(+), 8 deletions(-) commit c09472fcf9e08b650453906ec9ab70662fe57fea Author: Guenter Roeck Date: Fri Nov 19 13:55:47 2021 -0800 hwmon: (lm90) Support MAX1617 and LM84 MAX1617 and LM84 are stripped-down versions of LM90, so they can easily be supported by the LM90 driver. The most difficult part is chip detection, since those old chips do not support manufacturer ID or chip ID registers. The "alarms" attribute is enabled for both chips to match the functionality of the adm1021 driver. Chip detection was improved and is less prone to misdetection than the chip detection in the adm1021 driver. Devicetree nodes are not added for the added chips since it is quite unlikely that such old chips will ever be used in a devicetree based system. They can be added later if needed. Signed-off-by: Guenter Roeck Documentation/hwmon/lm90.rst | 45 +++++++- drivers/hwmon/Kconfig | 9 +- drivers/hwmon/lm90.c | 264 +++++++++++++++++++++++++++++++++++++------ 3 files changed, 275 insertions(+), 43 deletions(-) commit 6be4b1a430824852f7c67f510f4ab88eada2d838 Author: Guenter Roeck Date: Sat Nov 20 08:12:17 2021 -0800 hwmon: (lm90) Introduce 16-bit register write function Introduce 16-bit register write function to simplify the code in some places. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit c9933a4439b57f404d7809445e6e43c8f1bbf7e4 Author: Guenter Roeck Date: Fri Nov 19 14:24:18 2021 -0800 hwmon: (lm90) Let lm90_read16() handle 8-bit read operations Simplify the code a bit by handling single-register read operations in lm90_read16(). All we need to do is to skip the low-byte read operation if the register address is 0. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 47 +++++++++++++++++------------------------------ 1 file changed, 17 insertions(+), 30 deletions(-) commit 3c1ecccbbc1389773c32fc56910cf23512fccfcd Author: Guenter Roeck Date: Mon Nov 15 18:10:11 2021 -0800 hwmon: (lm90) Add support for MAX6642 MAX6642 is a reduced version of LM90 with no low limits and no conversion rate register. Its alert functionality is broken, similar to many other chips supported by the lm90 driver. After this change, the stand-alone max6642 driver is only needed if the lm90 driver is disabled. Make it dependent on SENSORS_LM90=n to show that it is not needed if the lm90 driver is enabled. A devicetree node is not added for this chip since it is quite unlikely that such an old chip will ever be used in a devicetree based system. It can be added later if needed. Signed-off-by: Guenter Roeck Documentation/hwmon/lm90.rst | 16 +++++++++ drivers/hwmon/Kconfig | 5 +-- drivers/hwmon/lm90.c | 78 ++++++++++++++++++++++++++++++++++++-------- 3 files changed, 83 insertions(+), 16 deletions(-) commit ca6bfa3b7325518a4b41c81c89a970976771f2ea Author: Guenter Roeck Date: Mon Nov 15 18:14:35 2021 -0800 hwmon: (lm90) Add flag to indicate conversion rate support A flag indicating support for setting the conversion rate doesn't cost much and will enable us to add support for MAX6642 to the lm90 driver. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 66 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 27 deletions(-) commit 2cb8d9d831306757b1de393f1c5b8a98b715bf15 Author: Guenter Roeck Date: Mon Nov 15 17:48:13 2021 -0800 hwmon: (lm90) Add flag to indicate support for minimum temperature limits A flag indicating support for minimum temperature limits doesn't cost much and will enable us to add support for MAX6642 to the lm90 driver. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 54 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 23 deletions(-) commit 399a8a0046cfc878203b0a1c990f81c8153757f3 Author: Guenter Roeck Date: Fri Nov 12 22:03:31 2021 -0800 hwmon: (lm90) Add support for MAX6690 MAX6690 is all but identical to MAX6654. Revision 1 of its datasheet lists the same chip ID as MAX6654, and a chip labeled MAX6654 was found to have the chip ID listed as MAX6690 chip ID in Revision 2 of its datasheet. A devicetree node is not added for this chip since it is quite unlikely that such an old chip will ever be used in a devicetree based system. It can be added later if needed. Signed-off-by: Guenter Roeck Documentation/hwmon/lm90.rst | 2 +- drivers/hwmon/lm90.c | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) commit 9888775be8c07e134c1c5b281ee0a4e01773aed1 Author: Guenter Roeck Date: Fri Dec 10 19:35:20 2021 -0800 hwmon: (lm90) Strengthen chip detection for ADM1032, ADT7461(A), and NCT1008 ADT7461A and NCT1008 support the undocumented manufacturer and chip ID registers at 0x3e and 0x3f, and return 0x61 as chip ID. ADM1032 and ADT7461 do not support those registers but return 0 when reading them. Use this information to improve the accuracy of the chip detection code. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit a9f3d3a80a405249e18f9bf85271e4cee5c4160f Author: Guenter Roeck Date: Sat Nov 6 09:59:26 2021 -0700 hwmon: (lm90) Add support for ADT7481, ADT7482, and ADT7483 ADT7481, ADT7482, and ADT7483 are similar to ADT7461, but support two external temperature sensors, similar to MAX6695/6696. They support an extended temperature range similar to ADT7461. Registers for the second external channel can be accessed directly or by using the same method as used by MAX6695/6696. For simplicity, the access method implemented for MAX6695/6696 is used. The chips support PEC (packet error checking). Set the PEC feature flag and let the user decide if it should be enabled or not (it is by default disabled). Even though it is only documented for ADT7483, all three chips support a secondary manufacturer ID register at 0x3e and a chip ID register at 0x3f. Use the contents of those registers register for improved chip detection accuracy. Add the same check to the ADT7461A detection code since this chip also supports the same (undocumented) registers. Devicetree nodes are not added for the added chips since it is quite unlikely that such old chips will ever be used in a devicetree based system. They can be added later if needed. Reviewed-by: Slawomir Stepien Signed-off-by: Guenter Roeck Documentation/hwmon/lm90.rst | 38 ++++++++++++++ drivers/hwmon/Kconfig | 3 +- drivers/hwmon/lm90.c | 119 ++++++++++++++++++++++++++++++++----------- 3 files changed, 129 insertions(+), 31 deletions(-) commit 904a6fe689e28abff09c6b039a3dacec5a586c91 Author: Guenter Roeck Date: Fri Nov 5 21:58:51 2021 -0700 hwmon: (lm90) Add explicit support for MAX6648/MAX6692 Unlike MAX6646/MAX6647/MAX6649, MAX6648 and MAX6692 only support a temperature range of 0..127 degrees C. Separate support for the two sets of chips to be able to support maximum temperature ranges correctly for all chips. Introduce new feature flag to indicate temperature support up to 255 degrees C. Since the chips are almost identical except for the supported temperature range, automatic chip detection is limited. Effectively this means that MAX6648 may be mis-detected as MAX6649 when auto-detected, but there is nothing we can do about that. Devicetree nodes are not added for the added chips since it is quite unlikely that such old chips will ever be used in a devicetree based system. They can be added later if needed. Signed-off-by: Guenter Roeck Documentation/hwmon/lm90.rst | 12 ++++++++++-- drivers/hwmon/lm90.c | 41 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 47 insertions(+), 6 deletions(-) commit e9684fdbdc525950eb006cfad195aaaf46cf5310 Author: Guenter Roeck Date: Wed Nov 17 11:57:57 2021 -0800 hwmon: (lm90) Add flag to indicate 'alarms' attribute support We don't want to support the obsolete 'alarms' attribute for new chips supported by this driver. Add flag to indicate 'alarms' attribute support and use it for existing chips. This flag will not be set for additional chips supported by this driver in the future. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 57 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 19 deletions(-) commit 0707dda69d85a3c6f5155e5c33e92b49f389e552 Author: Guenter Roeck Date: Thu Dec 2 16:19:27 2021 -0800 hwmon: (lm90) Fix/Add detection of G781-1 When support for G781 was added, chips with ID 0x01 were found at I2C addresses 0x4c and 0x4d. The G781 datasheet (version 1.3 from October 2003) says that the device ID for G781-1 is 0x03, not 0x01. Also, the datasheet states that the chip at I2C address is G781 and the chip at I2C address 0x4d is G781-1. A G781-1 at I2C address 0x4d was now found to have a chip ID of 0x03 as suggested by the datasheet. Accept both 0x01 and 0x03 chip IDs at both addresses to ensure that all variants of G781 are detected properly. While at it, improve chip detection accuracy by reading two additional registers and ensuring that only expected bits are set in those registers. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) commit d277fbd53d9d0cd6fc35a8d9003b2e2176fb4948 Author: Guenter Roeck Date: Mon Dec 20 17:02:36 2021 -0800 hwmon: (lm90) Add support for additional chip revision of NCT1008 The NCT1008 datasheet, Revision 3, states that its chip revision is 0x57. This matches the ADT7461A chip revision, and NCT1008 is therefore detected as ADT7461A. In revision 6 of the datasheet, the chip revision register is no longer documented. Multiple samples of NCT1008 were found to report a chip revision of 0x54. As it turns out, one of the patches submitted to add NCT1008 support to the lm90 driver already included a check for chip revision 0x54. Unfortunately, that patch never made it into the kernel. Remedy the situation and explicitly detect chips with revision 0x54 as NCT1008. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c7cebce984a24cb2f6d5acfd404bd4629a2ca5fa Author: Guenter Roeck Date: Tue Nov 9 20:38:22 2021 -0800 hwmon: (lm90) Rework detect function The detect function is getting larger and larger and difficult to understand or review. Split it into per-manufacturer detect functions to improve readability. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 379 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 236 insertions(+), 143 deletions(-) commit b977ed27c4dbbb65eb6c00a3bd89e5907d4c2042 Author: Guenter Roeck Date: Mon Nov 22 08:13:58 2021 -0800 hwmon: (lm90) Use single flag to indicate extended temperature support Since temperature conversion functions are now unified, there is no need to keep "the chip supports a configurable extended temperature range" and "the chip has extended temperature range enabled" flags separate. Use a single flag instead to reflect both. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit a8ddcc5750a94527ceead3de59f1f6ebc3e58115 Author: Guenter Roeck Date: Tue Nov 2 22:38:59 2021 -0700 hwmon: (lm90) Support multiple temperature resolutions While most LM90 compatible chips support a temperature sensor resolution of 11 bit, this is not the case for all chips. ADT7461 only supports a resolution of 10 bit, and TMP451/TMP461 support a resolution of 12 bit. Add support for various temperature sensor resolutions. To do this, model all temperature sensors as 16 bit sensors, and use unified temperature conversion functions which take the sensor resolution as parameter. While enhancing functionality, this has the positive side effect of reducing code size by about 5%. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 452 ++++++++++++++++++--------------------------------- 1 file changed, 155 insertions(+), 297 deletions(-) commit 8f19501d87e0e79a50b60ead7e114ed5a8eea34e Author: Guenter Roeck Date: Fri Nov 5 16:04:52 2021 -0700 hwmon: (lm90) Only re-read registers if volatile When reading 16-bit volatile registers, the code uses a trick to determine if a temperature is consistent: It reads the high part of the register twice. If the values are the same, the code assumes that the reading is consistent. If the value differs, the code re-reads the second register as well and assumes that it now has correct values. This is only necessary for volatile registers. Add a parameter to lm90_read16() to indicate if the register is volatile to avoid the extra overhead for non-volatile registers. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) commit b2644494a4c7145a05af01bee1df8549a71efc20 Author: Guenter Roeck Date: Sat Dec 4 07:53:00 2021 -0800 hwmon: (lm90) Add support for unsigned and signed temperatures ADT7461 and TMP451 temperature sensors support extended temperature ranges. If standard temperature range is selected, the temperature range is unsigned and limited to 0 .. 127 degrees C. For TMP461, the standard temperature range is -128000 ... 127000 degrees C. Distinguish between the two chips by introducing a feature flag indicating if the standard temperature range is signed or unsigned. Use the same flag for MAX6646/ MAX6647 as well since those chips also support unsigned temperatures. Note that while the datasheet for ADT7461 suggests that the default temperature range is unsigned, tests with a real chip suggest that this is not the case: If the temperature offset is set to a value << 0, the temperature register does report negative values. Tests with real chips show that MAX6680/MAX6681 and SA56004 report temperatures of 128 degrees C and higher as negative temperatures. Add respective comments to the code. Also use clamp_val() and DIV_ROUND_CLOSEST where appropriate in calculations. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 70 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 28 deletions(-) commit d70fa73d84337e7197336e137e221d93792844f7 Author: Guenter Roeck Date: Fri Dec 10 21:18:27 2021 -0800 hwmon: (lm90) Enable full PEC support for ADT7461A Experiments show that ADT7461A and NCT1008 support PEC, even though it is not documented. Enable support for it in the driver. Since ADT7461 only supports partial PEC, this means that the configuration for ADT7461A needs to be separated from ADT7461. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 425f5b5d15c2dfed7193ad2517a082bc99964722 Author: Guenter Roeck Date: Mon Nov 8 17:45:05 2021 -0800 hwmon: (lm90) Add partial PEC support for ADT7461 Revision 0 of the ADT7461 datasheet suggests that the chip supports PEC (packet error checking). This information is gone in later versions of the datasheet. Experiments show that PEC support on ADT7461 is similar to PEC support in ADM1032, ie it is only supported for read operations. Add support for it to the driver. Signed-off-by: Guenter Roeck Documentation/hwmon/lm90.rst | 1 + drivers/hwmon/lm90.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 3b0982ff93aab8751f2c5df456a68abed11f84da Author: Guenter Roeck Date: Sun Oct 31 09:34:33 2021 -0700 hwmon: (lm90) Improve PEC support PEC (packet error checking) support for ADM1032 is currently only enabled if the chip was auto-detected, but not if a chip is instantiated explicitly. Always enable PEC support by introducing a chip feature flag indicating partial PEC support. Also, for consistency, disable PEC support by default to match existing functionality if the chip was not auto- detected. At the same time, introduce generic support for PEC with a separate feature flag. This will be used when support for chips with full PEC functionality is added. Signed-off-by: Guenter Roeck Documentation/hwmon/lm90.rst | 6 ++--- drivers/hwmon/lm90.c | 56 +++++++++++++++++++++++--------------------- 2 files changed, 32 insertions(+), 30 deletions(-) commit f68480cc32750eecf44dd657322040d41a6a557c Author: Guenter Roeck Date: Sun Oct 31 02:01:41 2021 -0700 hwmon: (lm90) Stop using R_/W_ register prefix The register write address either matches the read address, or it is the read address plus 6. Simplify the code and resolve the write address programmatically instead of having two defines for each register. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 234 +++++++++++++++++++++++++-------------------------- 1 file changed, 117 insertions(+), 117 deletions(-) commit ca7b9b14a022b2d255133b7bce7536ac45441f5e Author: Guenter Roeck Date: Mon Nov 29 12:17:41 2021 -0800 hwmon: (lm90) Move status register bit shifts to compile time Handling bit shifts necessary to extract status bits during compile time reduces code and data size by almost 5% when building for x86_64. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit ddf2a6093c56546e17c7038ac6275ef779682de9 Author: Guenter Roeck Date: Sat Oct 30 09:11:20 2021 -0700 hwmon: (lm90) Use BIT macro Use BIT macro instead of shift operation to improve readability. No functional change. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 55 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) commit ff8f0a652d2fbc3e552a32ad738928f7c23751e4 Author: Guenter Roeck Date: Sat Oct 30 09:05:45 2021 -0700 hwmon: (lm90) Reorder chip enumeration to be in alphabetical order Reorder chip enumeration in alphabetical order to make it easier to see which chips are supported, and to clarify where to add support new chip types. No functional change. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 479f21d41d30c25cc9060828dd8819f655227931 Author: Guenter Roeck Date: Sat Oct 30 09:02:56 2021 -0700 hwmon: (lm90) Reorder include files in alphabetical order Reorder include files in alphabetical order to reduce the chance of duplicates and to make it clear where new include files should be added. Drop the unnecessary include of linux/sysfs.h. Include linux/device.h instead because that is what is actually used. No functional change. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f6d0775119fb905fb02eafa98d575cf8ee792d46 Author: Guenter Roeck Date: Sun Jan 9 14:19:01 2022 -0800 hwmon: (lm90) Rework alarm/status handling Many chips supported by this driver clear status registers after it is read and update it in the next measurement cycle. Normally this falls under the radar because all registers are only read once per measurement cycle. However, there is an exception: Status registers are always read during interrupt and laert handling. This can result in invalid status reports if userspace reads an alarm attribute immediately afterwards. Rework alarm/status handling by keeping a shadow register with 'current' alarms, and by ensuring that the register is either only updated once per measurement cycle or not cleared. A second problem is related to alert handling: Alert handling is disabled for chips with broken alert after an alert was reported, but only re-enabled if attributes are read by the user. This means that alert conditions may appear and disappear unnoticed. Remedy the situation by introducing a worker to periodically read the status register(s) while alert handling is disabled, and re-enable alerts after the alert condition clears. Yet another problem is that sysfs and udev events are currently only reported to userspace if an alarm is raised, but not if an alarm condition clears. Use the new worker to detect that situation and also generate sysfs and udev events in that case. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 314 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 199 insertions(+), 115 deletions(-) commit eaf87c006f03266d4203f0a62e8c8a1cde417152 Author: Guenter Roeck Date: Tue Jan 11 03:01:56 2022 -0800 hwmon: (lm90) Generate sysfs and udev events for all alarms So far the driver only generated sysfs and udev events for minimum and maximum alarms. Also generate events for critical and emergency alarms. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit f30ce040a704f30f7ac6d3ec4c3f5390ccaabfe0 Author: Guenter Roeck Date: Fri May 20 11:47:21 2022 -0700 hwmon: (pmbus) Move pec attribute to I2C device Enabling and disabling PEC for PMBus devices is currently only supported with a debugfs attribute, which requires debugfs to be enabled and is thus less than perfect. Take the lm90 driver as example and add a 'pec' attribute to the I2C device if both the I2C adapter and the PMBus device support it. Remove the now obsolete 'pec' attribute from debugfs. Cc: Andrew Jeffery Signed-off-by: Guenter Roeck Documentation/ABI/testing/sysfs-class-hwmon | 9 +++ Documentation/hwmon/pmbus-core.rst | 9 +++ drivers/hwmon/pmbus/pmbus_core.c | 89 ++++++++++++++++------------- 3 files changed, 68 insertions(+), 39 deletions(-) commit a0d10c437c1c9859d24a16b90abf85120603b4ff Author: Alex Deucher Date: Tue Jul 12 11:11:22 2022 -0400 drm/amd/display: attempt to fix the logic in commit_planes_for_stream() The indentation is screwed up. I'm not sure quite how the logic should flow. Someone more familiar with this code should verify this. Reviewed-by: Hawking Zhang Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 45 +++++++++++++++++--------------- 1 file changed, 24 insertions(+), 21 deletions(-) commit 43195162fbf54b2cc35efe295d2ed072d2bd4048 Author: André Almeida Date: Mon Jul 11 16:34:58 2022 -0300 drm/amd/pm: Implement get GFXOFF status for vangogh Implement function to get current GFXOFF status for vangogh. Signed-off-by: André Almeida Acked-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 3fb0fdd7758d3b850db82899f532dc71f6909c02 Author: Melissa Wen Date: Tue Jul 12 10:32:39 2022 -0100 drm/amd/display: correct check of coverage blend mode Check the value of per_pixel_alpha to decide whether the Coverage pixel blend mode is applicable or not. Fixes: 76818cdd11a2 ("drm/amd/display: add Coverage blend mode for overlay plane") Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e866f1fe528bc0158cdcd589053753032bdb52c Author: Yefim Barashkin Date: Mon Jul 11 14:35:11 2022 -0800 drm/amd/pm: Prevent divide by zero divide error: 0000 [#1] SMP PTI CPU: 3 PID: 78925 Comm: tee Not tainted 5.15.50-1-lts #1 Hardware name: MSI MS-7A59/Z270 SLI PLUS (MS-7A59), BIOS 1.90 01/30/2018 RIP: 0010:smu_v11_0_set_fan_speed_rpm+0x11/0x110 [amdgpu] Speed is user-configurable through a file. I accidentally set it to zero, and the driver crashed. Reviewed-by: Evan Quan Reviewed-by: André Almeida Signed-off-by: Yefim Barashkin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 2 ++ 1 file changed, 2 insertions(+) commit cb50813998b5aed924323b1b46471e8c60b26692 Author: Mario Kleiner Date: Mon Jul 11 19:39:28 2022 +0200 drm/amd/display: Only use depth 36 bpp linebuffers on DCN display engines. Various DCE versions had trouble with 36 bpp lb depth, requiring fixes, last time in commit 353ca0fa5630 ("drm/amd/display: Fix 10bit 4K display on CIK GPUs") for DCE-8. So far >= DCE-11.2 was considered ok, but now I found out that on DCE-11.2 it causes dithering when there shouldn't be any, so identity pixel passthrough with identity gamma LUTs doesn't work when it should. This breaks various important neuroscience applications, as reported to me by scientific users of Polaris cards under Ubuntu 22.04 with Linux 5.15, and confirmed by testing it myself on DCE-11.2. Lets only use depth 36 for DCN engines, where my testing showed that it is both necessary for high color precision output, e.g., RGBA16 fb's, and not harmful, as far as more than one year in real-world use showed. DCE engines seem to work fine for high precision output at 30 bpp, so this ("famous last words") depth 30 should hopefully fix all known problems without introducing new ones. Successfully retested on DCE-11.2 Polaris and DCN-1.0 Raven Ridge on top of Linux 5.19.0-rc2 + drm-next. Fixes: 353ca0fa5630 ("drm/amd/display: Fix 10bit 4K display on CIK GPUs") Signed-off-by: Mario Kleiner Tested-by: Mario Kleiner Cc: stable@vger.kernel.org # 5.14.0 Cc: Alex Deucher Cc: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 84900aeecefb281964c0ba23111be4809477124e Author: Alex Deucher Date: Fri Jul 8 11:45:57 2022 -0400 drm/amd/display: make some dc_dmub_srv functions static Not used outside of dc_dmub_srv.c. Reported-by: kernel test robot Reviewed-by: André Almeida Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a94608f0f7de9b1135ffea3546afe68eafef57f Author: Alex Deucher Date: Tue Jul 12 09:22:23 2022 -0400 drm/amdgpu: fix file permissions on some files Drop execute. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2085 Reviewed-by: Guchun Chen Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/asic_reg/clk/clk_11_0_1_offset.h | 0 drivers/gpu/drm/amd/include/asic_reg/clk/clk_11_0_1_sh_mask.h | 0 drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_2_0_3_offset.h | 0 drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_2_0_3_sh_mask.h | 0 drivers/gpu/drm/amd/include/asic_reg/dpcs/dpcs_2_0_3_offset.h | 0 drivers/gpu/drm/amd/include/asic_reg/dpcs/dpcs_2_0_3_sh_mask.h | 0 6 files changed, 0 insertions(+), 0 deletions(-) commit c5cfd54e93f89c9cd5cf0f61408bf3e11c7e6684 Author: Kent Russell Date: Tue Jul 12 08:09:06 2022 -0400 drm/amdgpu: Fix acronym typo in glossary The initialism of RunList Controller is RLC, not RCL Signed-off-by: Kent Russell Reviewed-by: Christian König Signed-off-by: Alex Deucher Documentation/gpu/amdgpu/amdgpu-glossary.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff613f7ba7105b17dbf251ca298d1de9124a9875 Author: Aric Cyr Date: Tue Jul 5 00:23:49 2022 -0400 drm/amd/display: 3.2.194 This version brings along following fixes: - Fixes for MST, MPO, PSRSU, DP 2.0, Freesync and others - Add register offsets of NBI and DCN. - Improvement of ALPM - Removing assert statement for Linux DM - Re-implementing ARGB16161616 pixel format Acked-by: Solomon Chiu Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 652284d6db17f3c7810495fda059efdd84b61fde Author: Samson Tam Date: Tue Jun 28 16:20:00 2022 -0400 drm/amd/display: Fix lag when moving windowed MPO across display using ODM 2:1 combine [Why] With single display odm 2:1 policy, when moving windowed MPO across the display, we experience a momentary lag when we move between the centre of the display and the right half of the display. This is caused by the MPO pipe being reallocated when it crosses this boundary [How] Handle two cases: 1. if the head pipe has a MPO pipe already allocated in the old context, then use that pipe if it is available in the current context 2. if the head pipe is on the left side, check the right side to see if it has a MPO pipe already allocated. If so, don't use that pipe if it is selected as the idle pipe in the current context Add new function pointer called .acquire_idle_pipe_for_head_pipe that will pass in the head pipe and handle case 1 Add find_idle_secondary_pipe_check_mpo() to handle case 2 if we don't hit case 1. In dc_add_plane_to_context(), start with head pipe and check case 1 and 2 in call acquire_free_pipe_for_head(). If we are on the right side of the display, check case 1 again by passing in right side pipe as the new head in call acquire_free_pipe_for_head(). Reviewed-by: Dmytro Laktyushkin Reviewed-by: Ariel Bernstein Acked-by: Solomon Chiu Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 32 +++++++++++++++++++++-- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 27 +++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) commit 2a93292fb7860b51550d1222c151de1a9fdc15da Author: Aurabindo Pillai Date: Mon Apr 4 13:38:57 2022 -0400 drm/amd/display: Add NBIO reg offsets to DC [Why&How] Add a field to store the NBIO IP offset for use with runtime offset calculation Reviewed-by: Rodrigo Siqueira Acked-by: Solomon Chiu Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + drivers/gpu/drm/amd/display/dc/core/dc.c | 2 ++ drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ drivers/gpu/drm/amd/display/dc/dc_types.h | 1 + 4 files changed, 6 insertions(+) commit e5028e9fd3bc7c6b916568e5218f5fca5f0d0a75 Author: Harry Wentland Date: Tue Feb 1 15:37:37 2022 -0500 drm/amd/display: Add DCN reg offsets to DC [Why&How] Add a field to store the DCN IP offset for use with runtime offset calculation This offset is indexed using reg*_BASE_IDX for the corresponding group of registers. For example, address of DIG_BE_CNTL instance 0 is calculated like: dcn_reg_offsets[regDIG0_DIG_BE_CNTL_BASE_IDX] + regDIG0_DIG_BE_CNTL. {dcn,nbio}_reg_offsets are used only for the ASICs for which runtime initializaion of offsets are enabled through the modified SR* macros that contain an additional REG_STRUCT element in the macro definition. DCN3.5+ will fail dc_create() if {dcn,nbio}_reg_offsets are null. They are applicable starting with DCN32/321 and are not used for ASICs upstreamed before them. ASICs before DCN32/321 will not contain any computation that involves {dcn,nbio}_reg_offsets. For them, the address/offset computation is done during compile time. This is evident from the BASE_INNER definition for compile time vs run time initialization: Compile time init: #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg Run time init: #define BASE_INNER(seg) ctx->dcn_reg_offsets[seg] BASE_INNER macro is local to each dcnxx_resource.c and hence different ASICs can have either runtime or compile time initialization of offsets. The computation of offset is done for registers all at once during driver load and hence it does not introduce any performance overhead during normal operation. Reviewed-by: Rodrigo Siqueira Acked-by: Solomon Chiu Signed-off-by: Harry Wentland Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++ drivers/gpu/drm/amd/display/dc/dc.h | 10 ++++++++++ drivers/gpu/drm/amd/display/dc/dc_types.h | 2 +- 4 files changed, 16 insertions(+), 1 deletion(-) commit 76611a84f235126f3258fbe4a25d85ab326ad6bd Author: Charlene Liu Date: Wed Jun 29 10:27:21 2022 -0400 drm/amd/display: add system info table log [why] insert log for debug use. v2: squash in fix (Alex) Reviewed-by: Nicholas Kazlauskas Acked-by: Solomon Chiu Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 15c735e7990fdabb466a3341b6b2dfefd987127e Author: Wayne Lin Date: Tue May 31 17:46:24 2022 +0800 drm/amd/display: Grab dc_lock before detecting link [Why & How] There is chance we change dc state while calling dc_link_detect(). As the result of that, grab the dm.dc_lock before detecting link. Reviewed-by: Hersen Wu Acked-by: Solomon Chiu Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 85 ++++++++++++++-------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 11 ++- 2 files changed, 63 insertions(+), 33 deletions(-) commit 3d4de925356177dad0fb5869d1ea537cfa033009 Author: Ethan Wellenreiter Date: Mon Jun 27 14:56:51 2022 -0400 drm/amd/display: Re-implementing ARGB16161616 pixel format as 22 [Why] ABGR16161616 colour format was added to dcn10/20/30, and set any ARGB16161616 to the same value as it (26). As such, the HDR10 Green Point y value was too far off of the EDID stated value for DisplayPort. [How] Added back the pixel format as 22 for ARGB16161616 for dcn10/20/30. Reviewed-by: Reza Amini Acked-by: Solomon Chiu Signed-off-by: Ethan Wellenreiter Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 3 +++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c | 3 +++ drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c | 2 ++ 5 files changed, 12 insertions(+) commit 78486da8ceb2d5d833a69fd695bb9f5a941b73f6 Author: Aric Cyr Date: Mon Jun 27 02:03:50 2022 -0400 drm/amd/display: 3.2.193 Acked-by: Solomon Chiu Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f969d28cdbf99c28eb08ef0a0017713d6909347 Author: Jun Lei Date: Fri Jun 24 16:28:50 2022 -0400 drm/amd/display: update DML1 logic for unbounded req handling [why] Unbounded request logic in resource/DML has some issues where unbounded request is being enabled incorrectly. SW today enables unbounded request unconditionally in hardware, on the assumption that HW can always support it in single pipe scenarios. This worked until now because the same assumption is made in DML. A new DML update is needed to fix a bug, where there are single pipe scenarios where unbounded cannot be enabled, and this change in DML needs to be ported in, and dcn32 resource logic fixed. [how] First, dcn32_resource should program unbounded req in HW according to unbounded req enablement output from DML, as opposed to DML input Second, port in DML1 update which disables unbounded req in some scenarios to fix an issue with poor stutter performance Reviewed-by: Nevenko Stupar Reviewed-by: Dmytro Laktyushkin Acked-by: Solomon Chiu Signed-off-by: Jun Lei Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 9 +++++++++ drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h | 9 +++++++++ 2 files changed, 18 insertions(+) commit af019bef6d6fda044c8db232c97d6be2fb64c741 Author: Jack Xiao Date: Mon Jul 11 15:24:48 2022 +0800 drm/amdgpu/gfx11: add aggregated doorbell support Port aggregated doorbell support to gfx11. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 82 +++++++++++++++++++++++++++++----- 1 file changed, 71 insertions(+), 11 deletions(-) commit 86ef6eae0820aa5393983c38c1c5ff9510ca9118 Author: Jack Xiao Date: Mon Jul 11 15:25:03 2022 +0800 drm/amdgpu/sdma6: add aggregated doorbell support Port aggregated doorbell support to sdma6. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 80 ++++++++++++++++++++++++---------- 1 file changed, 57 insertions(+), 23 deletions(-) commit 2d7a1f71837c0922645143cc270b5a4834595544 Author: Le Ma Date: Fri Oct 30 11:26:23 2020 +0800 drm/amdgpu/mes: ring aggregatged doorbell when mes queue is unmapped Ring aggregated doorbel to make unmapped queue scheduled in mes firmware. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 7 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 3 ++ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 82 ++++++++++++++++++++++++++++----- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 79 ++++++++++++++++++++++--------- 4 files changed, 137 insertions(+), 34 deletions(-) commit b7320117b3d36fd6fe542bdac5f7af0a83bea23a Author: Jack Xiao Date: Tue Jul 6 15:39:54 2021 +0800 drm/amdgpu/mes11: initialize aggregated doorbell Allocate and enable aggregated doorbell. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 58 +++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) commit 0fe6906203d02d050e86b3398219df7bd9e8fe47 Author: Le Ma Date: Fri Oct 30 11:24:07 2020 +0800 drm/amdgpu/mes: init aggregated doorbell Allocate and enable aggregated doorbell. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 16 ++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 2 +- drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 58 ++++++++++++++++++++++++++++++++- 3 files changed, 70 insertions(+), 6 deletions(-) commit f1549c09c520877be211d483d3c6f4e7f77d2588 Author: Likun Gao Date: Fri Jul 8 11:14:05 2022 +0800 drm/amdgpu: support reset flag set for gpu reset Move reset_context out of gpu recover function to make it configurable for different reset purpose. For the reset way of call gpu_recovery sysfs, force to use full reset method. Otherwise, try soft reset by default if the related ASIC supportted, if soft reset failed, will use full reset. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 20 +++++++------------- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 10 +++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 12 ++++++++++-- drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 12 ++++++++++-- drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 12 ++++++++++-- drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 12 ++++++++++-- 9 files changed, 74 insertions(+), 27 deletions(-) commit 58e969b60db0f5ca9abf0a8df28086efd601f38c Author: Likun Gao Date: Tue Jun 14 17:36:00 2022 +0800 drm/amdgpu: support SDMA soft recovery for sdma v6 Support SDMA soft reset for SDMA v6. V3: use ib test to check soft reset. V4: squash in unused variable fix (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 51 ++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 14 deletions(-) commit c0ff84cb58faff9fdb8d955c6e1e07fd75d88c16 Author: Likun Gao Date: Tue May 31 10:30:14 2022 +0800 drm/amdgpu: enable soft reset for gfx 11 Enable soft reset for gfx 11. V2: enable both gfx v11.0.0 and gfx v11.0.2. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit a84e43b81e45b3da19e51e1e9426ba9e4d0fd1bc Author: Likun Gao Date: Tue Jun 14 17:36:57 2022 +0800 drm/amdgpu: support gfx soft reset for gfx v11 Support GFX soft reset for gfx v11. V3: use ib test check soft reset. V4: squash in unused variable fix (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 181 ++++++++++++++++++++++++--------- 1 file changed, 132 insertions(+), 49 deletions(-) commit 236124d1167bcc539432b4f6fc19ce1fa015e2ad Author: Chris Park Date: Thu Jun 23 18:21:59 2022 -0400 drm/amd/display: Reduce SCDC Status Flags Definition [Why] Status flags definition is reduced to read less bytes in SCDC transaction for status update. [How] Reduce definition of reserved bytes from 3 to 1 for status update. Reviewed-by: Charlene Liu Acked-by: Solomon Chiu Signed-off-by: Chris Park Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit c4e85551198ea894ac29da1a81becfde65c11f78 Author: Prike Liang Date: Mon Jul 11 16:03:08 2022 +0800 drm/amdkfd: correct the MEC atomic support firmware checking for GC 10.3.7 On the GC 10.3.7 platform the initial MEC release version #3 can support atomic operation,so need correct and set its MEC atomic support version to #3. Signed-off-by: Prike Liang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device.c | 2 ++ 1 file changed, 2 insertions(+) commit 017860c909b03fa687d29a1ca46390ba9a007b2a Author: Wenjing Liu Date: Mon Jun 13 11:45:31 2022 -0400 drm/amd/display: make enable link independent from verified link caps [why] Ideally link capability should be independent from the link configuration that we decide to use in enable link. Otherwise if link capability is changed after validation has completed, we could end up enabling a link configuration with invalid configuration. This would lead to over link bandwidth subscription or in the extreme case causes us to enable HPO link to a DIO stream. [how] Add a new struct in pipe ctx called link config. This structure will contain link configuration to enable a link. It will be populated during map pool resources after we validate link bandwidth. Remove the reference of verified link cap during enable link process and use link config in pipe ctx instead. Reviewed-by: George Shen Acked-by: Solomon Chiu Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 2 + drivers/gpu/drm/amd/display/dc/core/dc_link.c | 27 +++++--------- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 45 ++++++++--------------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 10 ++--- drivers/gpu/drm/amd/display/dc/inc/core_status.h | 1 + drivers/gpu/drm/amd/display/dc/inc/core_types.h | 10 +++++ drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 2 +- 7 files changed, 44 insertions(+), 53 deletions(-) commit 57b9f3384c64e37bbdad7f127625ac3733d11e5c Author: Fangzhi Zuo Date: Wed Jul 6 15:52:46 2022 -0400 drm/amd/display: Ignore First MST Sideband Message Return Error [why] First MST sideband message returns AUX_RET_ERROR_HPD_DISCON on certain intel platform. Aux transaction considered failure if HPD unexpected pulled low. The actual aux transaction success in such case, hence do not return error. [how] Not returning error when AUX_RET_ERROR_HPD_DISCON detected on the first sideband message. v2: squash in additional DMI entries v3: squash in static fix Signed-off-by: Fangzhi Zuo Acked-by: Solomon Chiu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 39 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 8 +++++ .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 17 ++++++++++ 3 files changed, 64 insertions(+) commit 9306b2b2dfce6931241ef804783692cee526599c Author: Matthew Auld Date: Tue Jul 12 18:40:50 2022 +0100 drm/i915/ttm: fix 32b build Since segment_pages is no longer a compile time constant, it looks the DIV_ROUND_UP(node->size, segment_pages) breaks the 32b build. Simplest is just to use the ULL variant, but really we should need not need more than u32 for the page alignment (also we are limited by that due to the sg->length type), so also make it all u32. Reported-by: Ville Syrjälä Fixes: bc99f1209f19 ("drm/i915/ttm: fix sg_table construction") Signed-off-by: Matthew Auld Cc: Nirmoy Das Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20220712174050.592550-1-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_region.c | 2 ++ drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +- drivers/gpu/drm/i915/i915_scatterlist.c | 16 ++++++++-------- drivers/gpu/drm/i915/i915_scatterlist.h | 4 ++-- drivers/gpu/drm/i915/intel_region_ttm.c | 2 +- drivers/gpu/drm/i915/intel_region_ttm.h | 2 +- 6 files changed, 15 insertions(+), 13 deletions(-) commit be48d86f77f0cbceecadf10fda6330d82a0a77b7 Author: Claudio Imbrenda Date: Tue Jun 28 15:56:09 2022 +0200 KVM: s390: pv: Add kvm_s390_cpus_from_pv to kvm-s390.h and add documentation Future changes make it necessary to call this function from pv.c. While we are at it, let's properly document kvm_s390_cpus_from_pv() and kvm_s390_cpus_to_pv(). Signed-off-by: Claudio Imbrenda Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20220628135619.32410-9-imbrenda@linux.ibm.com Message-Id: <20220628135619.32410-9-imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/kvm/kvm-s390.c | 36 ++++++++++++++++++++++++++++++------ arch/s390/kvm/kvm-s390.h | 1 + 2 files changed, 31 insertions(+), 6 deletions(-) commit e40df9efd68a621734fe03efc68b8f3e8da47cf8 Author: Claudio Imbrenda Date: Tue Jun 28 15:56:08 2022 +0200 KVM: s390: pv: clear the state without memset Do not use memset to clean the whole struct kvm_s390_pv; instead, explicitly clear the fields that need to be cleared. Upcoming patches will introduce new fields in the struct kvm_s390_pv that will not need to be cleared. Signed-off-by: Claudio Imbrenda Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20220628135619.32410-8-imbrenda@linux.ibm.com Message-Id: <20220628135619.32410-8-imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/kvm/pv.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 72b1daff2671cef2c8cccc6c4e52f8d5ce4ebe58 Author: Claudio Imbrenda Date: Tue Jun 28 15:56:07 2022 +0200 KVM: s390: pv: add export before import Due to upcoming changes, it will be possible to temporarily have multiple protected VMs in the same address space, although only one will be actually active. In that scenario, it is necessary to perform an export of every page that is to be imported, since the hardware does not allow a page belonging to a protected guest to be imported into a different protected guest. This also applies to pages that are shared, and thus accessible by the host. Signed-off-by: Claudio Imbrenda Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20220628135619.32410-7-imbrenda@linux.ibm.com Message-Id: <20220628135619.32410-7-imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/kernel/uv.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 07fbdf7f934795a9e1728fcb3bdce6e0d8039e0c Author: Claudio Imbrenda Date: Tue Jun 28 15:56:06 2022 +0200 KVM: s390: pv: usage counter instead of flag Use the new protected_count field as a counter instead of the old is_protected flag. This will be used in upcoming patches. Increment the counter when a secure configuration is created, and decrement it when it is destroyed. Previously the flag was set when the set secure parameters UVC was performed. Signed-off-by: Claudio Imbrenda Acked-by: Janosch Frank Link: https://lore.kernel.org/r/20220628135619.32410-6-imbrenda@linux.ibm.com Message-Id: <20220628135619.32410-6-imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/include/asm/mmu.h | 2 +- arch/s390/include/asm/mmu_context.h | 2 +- arch/s390/include/asm/pgtable.h | 2 +- arch/s390/kvm/pv.c | 12 +++++++----- 4 files changed, 10 insertions(+), 8 deletions(-) commit 6f73517d0a99ba8ec972bf053456f1c2932598c0 Author: Claudio Imbrenda Date: Tue Jun 28 15:56:05 2022 +0200 KVM: s390: pv: refactor s390_reset_acc Refactor s390_reset_acc so that it can be reused in upcoming patches. We don't want to hold all the locks used in a walk_page_range for too long, and the destroy page UVC does take some time to complete. Therefore we quickly gather the pages to destroy, and then destroy them without holding all the locks. The new refactored function optionally allows to return early without completing if a fatal signal is pending (and return and appropriate error code). Two wrappers are provided to call the new function. Signed-off-by: Claudio Imbrenda Reviewed-by: Janosch Frank Reviewed-by: Nico Boehr Link: https://lore.kernel.org/r/20220628135619.32410-5-imbrenda@linux.ibm.com Message-Id: <20220628135619.32410-5-imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/include/asm/gmap.h | 37 ++++++++++++++++- arch/s390/kvm/pv.c | 12 +++++- arch/s390/mm/gmap.c | 99 +++++++++++++++++++++++++++++++------------- 3 files changed, 116 insertions(+), 32 deletions(-) commit b108f7f0a29b24a94e0c4f9af20f84afaa6ef245 Author: Claudio Imbrenda Date: Tue Jun 28 15:56:04 2022 +0200 KVM: s390: pv: handle secure storage exceptions for normal guests With upcoming patches, normal guests might touch secure pages. This patch extends the existing exception handler to convert the pages to non secure also when the exception is triggered by a normal guest. This can happen for example when a secure guest reboots; the first stage of a secure guest is non secure, and in general a secure guest can reboot into non-secure mode. If the secure memory of the previous boot has not been cleared up completely yet (which will be allowed to happen in an upcoming patch), a non-secure guest might touch secure memory, which will need to be handled properly. This means that gmap faults must be handled and not cause termination of the process. The handling is the same as userspace accesses, it's enough to translate the gmap address to a user address and then let the normal user fault code handle it. Signed-off-by: Claudio Imbrenda Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20220628135619.32410-4-imbrenda@linux.ibm.com Message-Id: <20220628135619.32410-4-imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/mm/fault.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit a52c25848e3143fbced80e6835de4034cc461fec Author: Claudio Imbrenda Date: Tue Jun 28 15:56:03 2022 +0200 KVM: s390: pv: handle secure storage violations for protected guests A secure storage violation is triggered when a protected guest tries to access secure memory that has been mapped erroneously, or that belongs to a different protected guest or to the ultravisor. With upcoming patches, protected guests will be able to trigger secure storage violations in normal operation. This happens for example if a protected guest is rebooted with deferred destroy enabled and the new guest is also protected. When the new protected guest touches pages that have not yet been destroyed, and thus are accounted to the previous protected guest, a secure storage violation is raised. This patch adds handling of secure storage violations for protected guests. This exception is handled by first trying to destroy the page, because it is expected to belong to a defunct protected guest where a destroy should be possible. Note that a secure page can only be destroyed if its protected VM does not have any CPUs, which only happens when the protected VM is being terminated. If that fails, a normal export of the page is attempted. This means that pages that trigger the exception will be made non-secure (in one way or another) before attempting to use them again for a different secure guest. Signed-off-by: Claudio Imbrenda Acked-by: Janosch Frank Link: https://lore.kernel.org/r/20220628135619.32410-3-imbrenda@linux.ibm.com Message-Id: <20220628135619.32410-3-imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/include/asm/uv.h | 1 + arch/s390/kernel/uv.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++ arch/s390/mm/fault.c | 10 +++++++++ 3 files changed, 66 insertions(+) commit faa2f72cb3569256480c5540d242c84e99965160 Author: Claudio Imbrenda Date: Tue Jun 28 15:56:02 2022 +0200 KVM: s390: pv: leak the topmost page table when destroy fails Each secure guest must have a unique ASCE (address space control element); we must avoid that new guests use the same page for their ASCE, to avoid errors. Since the ASCE mostly consists of the address of the topmost page table (plus some flags), we must not return that memory to the pool unless the ASCE is no longer in use. Only a successful Destroy Secure Configuration UVC will make the ASCE reusable again. If the Destroy Configuration UVC fails, the ASCE cannot be reused for a secure guest (either for the ASCE or for other memory areas). To avoid a collision, it must not be used again. This is a permanent error and the page becomes in practice unusable, so we set it aside and leak it. On failure we already leak other memory that belongs to the ultravisor (i.e. the variable and base storage for a guest) and not leaking the topmost page table was an oversight. This error (and thus the leakage) should not happen unless the hardware is broken or KVM has some unknown serious bug. Signed-off-by: Claudio Imbrenda Fixes: 29b40f105ec8d55 ("KVM: s390: protvirt: Add initial vm and cpu lifecycle handling") Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20220628135619.32410-2-imbrenda@linux.ibm.com Message-Id: <20220628135619.32410-2-imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/include/asm/gmap.h | 2 ++ arch/s390/kvm/pv.c | 9 +++-- arch/s390/mm/gmap.c | 86 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+), 3 deletions(-) commit 53415957c4593ec781f931b0c9841340c26de20d Merge: 1ed34d367bad dc4e6d9fbf9a Author: Mark Brown Date: Wed Jul 13 15:41:17 2022 +0100 Add support for Intel Thunder Bay SPI controller Merge series from nandhini.srikandan@intel.com : This patch enables support for DW SPI on Intel Thunder Bay. This patch set also enables master mode for latest Designware SPI versions. The driver is tested on Keem Bay and Thunder Bay evaluation board. commit 1ed34d367bad6329d656c9b6808b16cec3bfe040 Merge: 7e9984d183bb cdeaf3a99a02 Author: Mark Brown Date: Wed Jul 13 15:19:13 2022 +0100 spi: microchip-core: fix and cleanups Merge series from Yang Yingliang : Patch #1 fix a UAF in mchp_corespi_remove(). Patch #2 and #3 some cleanups to simpify code. commit c808a6ec7166105818e698be9ead396233eb91b8 Author: Xiu Jianfeng Date: Mon Jun 6 18:10:42 2022 +0800 evm: Use IS_ENABLED to initialize .enabled Use IS_ENABLED(CONFIG_XXX) instead of #ifdef/#endif statements to initialize .enabled, minor simplicity improvement. Signed-off-by: Xiu Jianfeng Reviewed-by: Ahmad Fatoum Signed-off-by: Mimi Zohar security/integrity/evm/evm_main.c | 52 +++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 29 deletions(-) commit 6a605eb1d71ea8cec50bdf7151c772c599a5fb70 Author: Sebin Sebastian Date: Wed Jul 13 13:08:58 2022 +0530 octeontx2-af: returning uninitialized variable Fix coverity error 'use of uninitialized variable'. err is uninitialized and is returned which can lead to unintended results. err has been replaced with -einval. Coverity issue: 1518921 (uninitialized scalar variable) Signed-off-by: Sebin Sebastian Signed-off-by: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d86a153aca7ee754613313bdbdc8c3ae366108ea Author: Jiapeng Chong Date: Wed Jul 13 10:07:59 2022 +0800 octeontx2-af: Remove duplicate include The include is in line 14 and 23. Remove the duplicate. Fix following checkincludes warning: ./drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c: linux/bitfield.h is included more than once. ./drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c: rvu_npc_hash.h is included more than once. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 2 -- 1 file changed, 2 deletions(-) commit bc5c8260f4114951de3b4ec629650a722ca58a2b Author: Zhengchao Shao Date: Wed Jul 13 09:54:38 2022 +0800 net/sched: remove return value of unregister_tcf_proto_ops Return value of unregister_tcf_proto_ops is unused, remove it. Signed-off-by: Zhengchao Shao Signed-off-by: David S. Miller include/net/pkt_cls.h | 2 +- net/sched/cls_api.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 736002fb6a09861c2663596011371884a8b7c0dd Merge: cfc6c2fcb686 58b6259d820d Author: David S. Miller Date: Wed Jul 13 14:28:52 2022 +0100 Merge tag 'wireless-next-2022-07-13' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Johannes Berg says: ==================== A fairly large set of updates for next, highlights: ath10k * ethernet frame format support rtw89 * TDLS support cfg80211/mac80211 * airtime fairness fixes * EHT support continued, especially in AP mode * initial (and still major) rework for multi-link operation (MLO) from 802.11be/wifi 7 As usual, also many small updates/cleanups/fixes/etc. ==================== Signed-off-by: David S. Miller commit 2a1be12c4d77d4f7b122568383382e006a60381b Author: Bard Liao Date: Fri Jul 8 14:13:12 2022 +0800 ASoC: SOF: Intel: add trigger callback into sdw_callback For IPC4, we need to set pipeline state in BE DAI trigger. Signed-off-by: Bard Liao Reviewed-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220708061312.25878-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dai.c | 14 +++++++++++--- sound/soc/sof/intel/hda.c | 2 +- sound/soc/sof/intel/hda.h | 1 + 3 files changed, 13 insertions(+), 4 deletions(-) commit 6d1c1a73e1126572de0a8b063fe62fe43786ed59 Author: Bard Liao Date: Fri Jul 8 14:13:11 2022 +0800 soundwire: Intel: add trigger callback When a pipeline is split into FE and BE parts, the BE pipeline may need to be triggered separately in the BE trigger op. So add the trigger callback in the link_res ops that will be invoked during BE DAI trigger. Signed-off-by: Bard Liao Reviewed-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Acked-by: Vinod Koul Link: https://lore.kernel.org/r/20220708061312.25878-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown drivers/soundwire/intel.c | 9 +++++++++ include/linux/soundwire/sdw_intel.h | 1 + 2 files changed, 10 insertions(+) commit c0da6efc74b47a4dd3e722dfb9e664a253bc597a Author: Christian Borntraeger Date: Mon Jul 11 13:51:08 2022 +0200 KVM: s390: Add facility 197 to the allow list z16 also provides facility 197 (The processor-activity-instrumentation extension 1). Let's add it to KVM. Signed-off-by: Christian Borntraeger Link: https://lore.kernel.org/r/20220711115108.6494-1-borntraeger@linux.ibm.com Acked-by: Thomas Huth Reviewed-by: Claudio Imbrenda arch/s390/tools/gen_facilities.c | 1 + 1 file changed, 1 insertion(+) commit cfc6c2fcb686afdaea5bbca6f3dbb27815a23878 Merge: d7c31cbde4bc d523f2eb1dad Author: David S. Miller Date: Wed Jul 13 14:18:39 2022 +0100 Merge branch 'phy-mxl-gpy-version-fix-and-improvements' Michael Walle says: ==================== net: phy: mxl-gpy: version fix and improvements Fix the version reporting which was introduced earlier. The version will not change during runtime, so cache it and save a PHY read on every auto negotiation. Also print the version in a human readable form. ==================== Signed-off-by: David S. Miller commit d523f2eb1dadb74d365365eb3bd921ad8b6b2abb Author: Michael Walle Date: Tue Jul 12 15:15:54 2022 +0200 net: phy: mxl-gpy: print firmware in human readable form Now having a major and a minor number, also print the firmware in human readable form "major.minor". Still keep the 4-digit hexadecimal representation because that form is used in the firmware changelog documents. Also, drop the "release" string assuming that most common case, but make it clearer that the user is running a test version. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mxl-gpy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1e9aa7baf0965443350c8751f328bc671550d718 Author: Michael Walle Date: Tue Jul 12 15:15:53 2022 +0200 net: phy: mxl-gpy: rename the FW type field name Align the firmware field name with the reference manual where it is called "major". Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mxl-gpy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1db8587078502d0bc7a74338867a318deb8753ec Author: Michael Walle Date: Tue Jul 12 15:15:52 2022 +0200 net: phy: mxl-gpy: cache PHY firmware version Cache the firmware version during probe. There is no need to read the firmware version on every autonegotiation. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mxl-gpy.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) commit fc3dd0367e610ae20ebbce6c38c7b86c3a2cc07f Author: Michael Walle Date: Tue Jul 12 15:15:51 2022 +0200 net: phy: mxl-gpy: fix version reporting The commit 09ce6b20103b ("net: phy: mxl-gpy: add temperature sensor") will overwrite the return value and the reported version will be wrong. Fix it. Fixes: 09ce6b20103b ("net: phy: mxl-gpy: add temperature sensor") Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mxl-gpy.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit d7c31cbde4bc6756d1a11747d2b99bc627001c86 Author: David Lamparter Date: Tue Jul 12 14:10:02 2022 +0200 net: ip6mr: add RTM_GETROUTE netlink op The IPv6 multicast routing code previously implemented only the dump variant of RTM_GETROUTE. Implement single MFC item retrieval by copying and adapting the respective IPv4 code. Tested against FRRouting's IPv6 PIM stack. Signed-off-by: David Lamparter Reviewed-by: Nikolay Aleksandrov Reviewed-by: David Ahern Cc: Jakub Kicinski Signed-off-by: David S. Miller net/ipv6/ip6mr.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 1 deletion(-) commit 00cf1fb3805f6eac2b751e0c2f03161a80347d67 Merge: 3e35d198cee6 277cbb6bc4bd Author: David S. Miller Date: Wed Jul 13 13:49:44 2022 +0100 Merge branch 'devlink-cosmetic-fixes' Jiri Pirko says: ==================== net: devlink: devl_* cosmetic fixes Hi. This patches just fixes some small cosmetic issues of devl_* related functions which I found on the way. =================== Signed-off-by: David S. Miller commit 277cbb6bc4bd398133eb5327c5256482a2289fe1 Author: Jiri Pirko Date: Tue Jul 12 12:24:24 2022 +0200 net: devlink: move unlocked function prototypes alongside the locked ones Maintain the same order as it is in devlink.c for function prototypes. The most of the locked variants would very likely soon be removed and the unlocked version would be the only one. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: David S. Miller include/net/devlink.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 7715023aa51f2a2d14d1ae785f2cb3cd72819d6f Author: Jiri Pirko Date: Tue Jul 12 12:24:23 2022 +0200 net: devlink: use helpers to work with devlink->lock mutex As far as the lock helpers exist as the drivers need to work with the devlink->lock mutex, use the helpers internally in devlink.c in order to be consistent. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: David S. Miller net/core/devlink.c | 230 ++++++++++++++++++++++++++--------------------------- 1 file changed, 115 insertions(+), 115 deletions(-) commit 1abfb265f0accc8635254cf1da03154ac7a5fb1b Author: Jiri Pirko Date: Tue Jul 12 12:24:22 2022 +0200 net: devlink: fix unlocked vs locked functions descriptions To be unified with the rest of the code, the unlocked version (devl_*) of function should have the same description in documentation as the locked one. Add the missing documentation. Also, add "Context" annotation for the locked versions where it is missing. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: David S. Miller net/core/devlink.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 7e9984d183bb1e99e766c5c2b950ff21f7f7b6c0 Author: Yang Yingliang Date: Wed Jul 13 17:40:23 2022 +0800 spi: tegra20-slink: fix UAF in tegra_slink_remove() After calling spi_unregister_master(), the refcount of master will be decrease to 0, and it will be freed in spi_controller_release(), the device data also will be freed, so it will lead a UAF when using 'tspi'. To fix this, get the master before unregister and put it when finish using it. Fixes: 26c863418221 ("spi: tegra20-slink: Don't use resource-managed spi_register helper") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220713094024.1508869-1-yangyingliang@huawei.com Signed-off-by: Mark Brown drivers/spi/spi-tegra20-slink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 43cc5a0afe4184a7fafe1eba32b5a11bb69c9ce0 Author: Yang Yingliang Date: Tue Jul 12 21:55:04 2022 +0800 spi: Fix simplification of devm_spi_register_controller This reverts commit 59ebbe40fb51 ("spi: simplify devm_spi_register_controller"). If devm_add_action() fails in devm_add_action_or_reset(), devm_spi_unregister() will be called, it decreases the refcount of 'ctlr->dev' to 0, then it will cause uaf in the drivers that calling spi_put_controller() in error path. Fixes: 59ebbe40fb51 ("spi: simplify devm_spi_register_controller") Signed-off-by: Yang Yingliang Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20220712135504.1055688-1-yangyingliang@huawei.com Signed-off-by: Mark Brown drivers/spi/spi.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit cdeaf3a99a02b6f8566bcaacc9c3501c6cceda74 Author: Yang Yingliang Date: Wed Jul 13 10:56:57 2022 +0800 spi: microchip-core: switch to use dev_err_probe() Switch to use dev_err_probe() to simpify error path. Signed-off-by: Yang Yingliang Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20220713025657.3524506-4-yangyingliang@huawei.com Signed-off-by: Mark Brown drivers/spi/spi-microchip-core.c | 42 ++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 25 deletions(-) commit 5d56d8974d1e5fa5d7d0761037377e03f6edcc66 Author: Yang Yingliang Date: Wed Jul 13 10:56:56 2022 +0800 spi: microchip-core: switch to use devm_spi_alloc_master() Switch to use devm_spi_alloc_master() to simpify error path. Signed-off-by: Yang Yingliang Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20220713025657.3524506-3-yangyingliang@huawei.com Signed-off-by: Mark Brown drivers/spi/spi-microchip-core.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit e82c6d62a1f2347cde69c169fcf37e4d26f89b98 Author: Yang Yingliang Date: Wed Jul 13 10:56:55 2022 +0800 spi: microchip-core: fix UAF in mchp_corespi_remove() When using devm_spi_register_master(), the unregister function will be called in devres_release_all() which is called after ->remove(), so remove spi_unregister_master() andspi_master_put(). Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers") Signed-off-by: Yang Yingliang Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20220713025657.3524506-2-yangyingliang@huawei.com Signed-off-by: Mark Brown drivers/spi/spi-microchip-core.c | 2 -- 1 file changed, 2 deletions(-) commit a8d5df69e2ec702d979f7d04ed519caf8691a032 Author: Liang He Date: Wed Jul 13 18:20:13 2022 +0800 ASoC: mt6359: Fix refcount leak bug In mt6359_parse_dt() and mt6359_accdet_parse_dt(), we should call of_node_put() for the reference returned by of_get_child_by_name() which has increased the refcount. Fixes: 683530285316 ("ASoC: mt6359: fix failed to parse DT properties") Fixes: eef07b9e0925 ("ASoC: mediatek: mt6359: add MT6359 accdet jack driver") Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220713102013.367336-1-windhl@126.com Signed-off-by: Mark Brown sound/soc/codecs/mt6359-accdet.c | 1 + sound/soc/codecs/mt6359.c | 1 + 2 files changed, 2 insertions(+) commit 1795c16a436057f95fef5b622d808885dd772d0e Author: Randy Dunlap Date: Tue Jul 12 11:33:48 2022 -0700 ASoC: amd: fix Jadeite kconfig warning and build errors Since SND_SOC_ES8316 has a hard dependency on I2C and since 'select' does not follow any dependency chains, SND_SOC_AMD_ST_ES8336_MACH also needs to have a hard dependency on I2C. Fixes a kconfig warning and subsequent build errors: WARNING: unmet direct dependencies detected for SND_SOC_ES8316 Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && I2C [=n] Selected by [y]: - SND_SOC_AMD_ST_ES8336_MACH [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_AMD_ACP [=y] && ACPI [=y] && (I2C [=n] || COMPILE_TEST [=y]) sound/soc/codecs/es8316.c:866:1: warning: data definition has no type or storage class 866 | module_i2c_driver(es8316_i2c_driver); sound/soc/codecs/es8316.c:866:1: error: type defaults to ‘int’ in declaration of ‘module_i2c_driver’ [-Werror=implicit-int] sound/soc/codecs/es8316.c:866:1: warning: parameter names (without types) in function declaration sound/soc/codecs/es8316.c:857:26: warning: ‘es8316_i2c_driver’ defined but not used [-Wunused-variable] 857 | static struct i2c_driver es8316_i2c_driver = { Fixes: f94fa8405801 ("ASoC: amd: enable machine driver build for Jadeite platform") Signed-off-by: Randy Dunlap Cc: Vijendar Mukunda Cc: Mark Brown Cc: alsa-devel@alsa-project.org Cc: Jaroslav Kysela Cc: Takashi Iwai Link: https://lore.kernel.org/r/20220712183348.31046-1-rdunlap@infradead.org Signed-off-by: Mark Brown sound/soc/amd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eda26893dabfc6da7a1e1ff5f8628ed9faab3ab9 Author: Liang He Date: Wed Jul 13 15:12:00 2022 +0800 ASoc: audio-graph-card2: Fix refcount leak bug in __graph_get_type() We should call of_node_put() for the reference before its replacement as it returned by of_get_parent() which has increased the refcount. Besides, we should also call of_node_put() before return. Fixes: c8c74939f791 ("ASoC: audio-graph-card2: add Multi CPU/Codec support") Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220713071200.366729-1-windhl@126.com Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card2.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) commit 73acfba792b06156b7c805162fcd89fdb71646f9 Author: Dan Carpenter Date: Tue Jul 12 17:42:12 2022 +0300 ASoC: amd: Fix error pointer dereference The "gpio_pa" pointer is an error pointer, there is no need to try put it. Calling gpiod_put() on it will lead to an error pointer dereference. Fixes: 02527c3f2300 ("ASoC: amd: add Machine driver for Jadeite platform") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Ys2IRPHWGIwuVs21@kili Signed-off-by: Mark Brown sound/soc/amd/acp-es8336.c | 1 - 1 file changed, 1 deletion(-) commit 3e35d198cee665efcf7b9ee01f443c263be73296 Author: Hariprasad Kelam Date: Tue Jul 12 12:12:50 2022 +0530 octeontx2-af: Skip CGX/RPM probe incase of zero lmac count In few error cases MAC(CGX/RPM) block is having 0 lmacs. AF driver uses MAC block with lmac pair to get firmware data etc. These commands will fail as there is no LMAC associated with MAC block. This patch skips the probe of these MAC blocks such that AF driver uses correct MAC block and LMAC pair for firmware communication and define new LMAC_AF_ERROR types for command timeout etc. This patch also enables channel back pressure for all LMACs. Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Geetha sowjanya Signed-off-by: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 13 ++++++++++--- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 2 ++ drivers/net/ethernet/marvell/octeontx2/af/rpm.c | 3 +++ drivers/net/ethernet/marvell/octeontx2/af/rpm.h | 1 + drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) commit dc4e6d9fbf9a39f7df71e8c262282aa1915452d8 Author: Nandhini Srikandan Date: Wed Jul 13 12:22:23 2022 +0800 spi: dw: Add support for Intel Thunder Bay SPI controller Add support for Intel Thunder Bay SPI controller, which uses DesignWare DWC_ssi core and also add common init function for both Keem Bay and Thunder Bay. Signed-off-by: Nandhini Srikandan Acked-by: Serge Semin Link: https://lore.kernel.org/r/20220713042223.1458-5-nandhini.srikandan@intel.com Signed-off-by: Mark Brown drivers/spi/spi-dw-mmio.c | 8 ++++---- drivers/spi/spi-dw.h | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) commit 51e41dc2f2bc7e7c8d5b8202a23eae3ee6056131 Author: Nandhini Srikandan Date: Wed Jul 13 12:22:22 2022 +0800 spi: dw: Add support for master mode selection for DWC SSI controller Add support to select the controller mode as master mode by setting Bit 31 of CTRLR0 register. This feature is supported for controller versions above v1.02. Signed-off-by: Nandhini Srikandan Acked-by: Serge Semin Link: https://lore.kernel.org/r/20220713042223.1458-4-nandhini.srikandan@intel.com Signed-off-by: Mark Brown drivers/spi/spi-dw-core.c | 5 +++-- drivers/spi/spi-dw.h | 8 +------- 2 files changed, 4 insertions(+), 9 deletions(-) commit 0d085723c637fd6929b8926a2963de1c2307cfa1 Author: Nandhini Srikandan Date: Wed Jul 13 12:22:21 2022 +0800 spi: Add bindings for Intel Thunder Bay SOC Add documentation for SPI controller in Intel Thunder Bay SoC. Signed-off-by: Nandhini Srikandan Acked-by: Rob Herring Reviewed-by: Serge Semin Link: https://lore.kernel.org/r/20220713042223.1458-3-nandhini.srikandan@intel.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 5d76b7509cb223e94ff73a672273e58f1957ac68 Author: Nandhini Srikandan Date: Wed Jul 13 12:22:20 2022 +0800 spi: dw: Fix IP-core versions macro Add the missing underscore in IP version macro to avoid compilation issue. The macro is used for IP version comparison in the current patchset. Fixes: 2cc8d9227bbb ("spi: dw: Introduce Synopsys IP-core versions interface") Signed-off-by: Nandhini Srikandan Acked-by: Serge Semin Link: https://lore.kernel.org/r/20220713042223.1458-2-nandhini.srikandan@intel.com Signed-off-by: Mark Brown drivers/spi/spi-dw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 281dee6707a869e0f40cac81b6b65c703192aa9d Author: Takashi Iwai Date: Wed Jul 13 12:47:59 2022 +0200 ALSA: core: Fix missing return value comments for kernel docs Each kernel doc comment expects the definition of the return value in a proper format. This patch adds or fixes the missing entries for the remaining ALSA core API functions. Link: https://lore.kernel.org/r/20220713104759.4365-8-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/device.c | 2 ++ sound/core/info.c | 2 ++ sound/core/init.c | 10 ++++++++++ sound/core/isadma.c | 3 ++- sound/core/vmaster.c | 3 ++- 5 files changed, 18 insertions(+), 2 deletions(-) commit 6eba99d4ce2487f2050b8787029cabfcfb748ee4 Author: Takashi Iwai Date: Wed Jul 13 12:47:58 2022 +0200 ALSA: memalloc: Fix missing return value comments for kernel docs Each kernel doc comment expects the definition of the return value in a proper format. This patch adds or fixes the missing entries for memory allocation helpers. Link: https://lore.kernel.org/r/20220713104759.4365-7-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/memalloc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit e8406ebc37d2efb7e473e469152f977235a742e1 Author: Takashi Iwai Date: Wed Jul 13 12:47:57 2022 +0200 ALSA: control: Fix missing return value comments for kernel docs Each kernel doc comment expects the definition of the return value in proper format. This patch adds or fixes the missing entries for control API. Link: https://lore.kernel.org/r/20220713104759.4365-6-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/control.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit b05d834ef8f8fbd90b1bacca909c1eeec02e3625 Author: Takashi Iwai Date: Wed Jul 13 12:47:56 2022 +0200 ALSA: compress: Fix kernel doc warnings Each kernel doc comment expects the definition of the return value and the summary for each struct / enum in a proper format. This patch adds or fixes the missing entries for compress-offload API. Link: https://lore.kernel.org/r/20220713104759.4365-5-tiwai@suse.de Signed-off-by: Takashi Iwai include/uapi/sound/compress_offload.h | 2 +- include/uapi/sound/compress_params.h | 6 +++--- sound/core/compress_offload.c | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) commit 5c121d6362d60198d9e37429f87e87d5477e3555 Author: Takashi Iwai Date: Wed Jul 13 12:47:55 2022 +0200 ALSA: dmaengine: Fix missing return value comments for kernel docs Each kernel doc comment expects the definition of the return value in a proper format. This patch adds or fixes the missing entries for PCM dmaengine API. Link: https://lore.kernel.org/r/20220713104759.4365-4-tiwai@suse.de Signed-off-by: Takashi Iwai include/sound/dmaengine_pcm.h | 2 ++ sound/core/pcm_dmaengine.c | 30 ++++++++++++++++++++---------- 2 files changed, 22 insertions(+), 10 deletions(-) commit 4e2b70673f2b93ab8e037a2b89c15f146c1ae9b0 Author: Takashi Iwai Date: Wed Jul 13 12:47:54 2022 +0200 ALSA: pcm: Fix missing return value comments for kernel docs Each kernel doc comment expects the definition of the return value in a proper format. This patch adds or fixes the missing entries for PCM API. Link: https://lore.kernel.org/r/20220713104759.4365-3-tiwai@suse.de Signed-off-by: Takashi Iwai include/sound/pcm.h | 50 +++++++++++++++++++++++++++++++++++++++++++++++-- sound/core/pcm.c | 4 ++++ sound/core/pcm_memory.c | 4 ++++ sound/core/pcm_native.c | 6 ++++++ 4 files changed, 62 insertions(+), 2 deletions(-) commit 539311aa61a144088779f1354492bbf9ae1ac458 Author: Takashi Iwai Date: Wed Jul 13 12:47:53 2022 +0200 ALSA: compress: Enable kernel doc markers for some functions The exported functions snd_compress_new() and snd_compr_stop_error() had already kernel-doc-style comments but they were not processed as they weren't marked properly. Let's enable them. This patch also fixes the missing argument id for snd_compress_new comments, too. Reported-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/3cd6b93b36b32ad6ae160931aaa00b20688e241a.1656759989.git.mchehab@kernel.org Link: https://lore.kernel.org/r/20220713104759.4365-2-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/compress_offload.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 20347fca71a387a3751f7bb270062616ddc5317a Author: Tianyu Lan Date: Fri Jul 8 12:15:44 2022 -0400 swiotlb: split up the global swiotlb lock Traditionally swiotlb was not performance critical because it was only used for slow devices. But in some setups, like TDX/SEV confidential guests, all IO has to go through swiotlb. Currently swiotlb only has a single lock. Under high IO load with multiple CPUs this can lead to significat lock contention on the swiotlb lock. This patch splits the swiotlb bounce buffer pool into individual areas which have their own lock. Each CPU tries to allocate in its own area first. Only if that fails does it search other areas. On freeing the allocation is freed into the area where the memory was originally allocated from. Area number can be set via swiotlb kernel parameter and is default to be possible cpu number. If possible cpu number is not power of 2, area number will be round up to the next power of 2. This idea from Andi Kleen patch(https://github.com/intel/tdx/commit/ 4529b5784c141782c72ec9bd9a92df2b68cb7d45). Based-on-idea-by: Andi Kleen Signed-off-by: Tianyu Lan Signed-off-by: Christoph Hellwig Documentation/admin-guide/kernel-parameters.txt | 4 +- include/linux/swiotlb.h | 5 + kernel/dma/swiotlb.c | 229 +++++++++++++++++++----- 3 files changed, 197 insertions(+), 41 deletions(-) commit f2b03dffa62e496df97b2b0d68fba2324c8d13c7 Author: Pierre Gondois Date: Mon Jul 4 13:27:38 2022 +0200 cpufreq: qcom-hw: Remove deprecated irq_set_affinity_hint() call commit 65c7cdedeb30 ("genirq: Provide new interfaces for affinity hints") deprecates irq_set_affinity_hint(). Use the new irq_set_affinity_and_hint() instead. Signed-off-by: Pierre Gondois Signed-off-by: Viresh Kumar drivers/cpufreq/qcom-cpufreq-hw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f7fca54a18990ab465a6d530aadb90769ded1707 Author: Pierre Gondois Date: Mon Jul 4 13:27:37 2022 +0200 cpufreq: qcom-hw: Disable LMH irq when disabling policy If LMH (Limits Management Hardware) is available, when a policy is disabled by unplugging the last online CPU of policy->cpus, the LMH irq is left enabled. When the policy is re-enabled with any of the CPU in policy->cpus being plugged in, qcom_cpufreq_ready() re-enables the irq. This triggers the following warning: [ 379.160106] Unbalanced enable for IRQ 154 [ 379.160120] WARNING: CPU: 7 PID: 48 at kernel/irq/manage.c:774 __enable_irq+0x84/0xc0 Thus disable the irq. Signed-off-by: Pierre Gondois Signed-off-by: Viresh Kumar drivers/cpufreq/qcom-cpufreq-hw.c | 1 + 1 file changed, 1 insertion(+) commit cdcf8eb3e7d0557405414459c6ead0385a5c6cc7 Author: Pierre Gondois Date: Mon Jul 4 13:27:36 2022 +0200 cpufreq: qcom-hw: Reset cancel_throttle when policy is re-enabled If LMH (Limits Management Hardware) is available, when a policy is disabled by unplugging the last online CPU of policy->cpus, qcom_cpufreq_hw_cpu_offline() sets cancel_throttle=true. cancel_throttle is not reset when the policy is re-enabled with any of the CPU in policy->cpus being plugged in. So reset it. This patch also adds an early exit check. Signed-off-by: Pierre Gondois Signed-off-by: Viresh Kumar drivers/cpufreq/qcom-cpufreq-hw.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9de0d75bb379c06e6d22e4b39552069fd9c869aa Author: Yicong Yang Date: Fri Jun 10 15:53:09 2022 +0800 cpufreq: qcom-cpufreq-hw: use HZ_PER_KHZ macro in units.h HZ macros has been centralized in units.h since [1]. Use it to avoid duplicated definition. [1] commit e2c77032fcbe ("units: add the HZ macros") Signed-off-by: Yicong Yang Signed-off-by: Viresh Kumar drivers/cpufreq/qcom-cpufreq-hw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 72d67d6b3447303a441a8cedc34f7224b75f64b5 Author: Yang Yingliang Date: Tue May 17 21:34:50 2022 +0800 cpufreq: mediatek: fix error return code in mtk_cpu_dvfs_info_init() If regulator_get_voltage() fails, it should return the error code in mtk_cpu_dvfs_info_init(). Fixes: 0daa47325bae ("cpufreq: mediatek: Link CCI device to CPU") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Signed-off-by: Viresh Kumar drivers/cpufreq/mediatek-cpufreq.c | 1 + 1 file changed, 1 insertion(+) commit 4fb56d8508ed1aa078ef1076c8df3c147f4d8421 Merge: dd517237c319 551871bfc82c Author: David S. Miller Date: Wed Jul 13 12:16:56 2022 +0100 Merge branch 'prestera-port-range-filters' Maksym Glubokiy says: ==================== net: prestera: add support for port range filters This adds support for port-range rules: $ tc qdisc add ... clsact $ tc filter add ... flower ... src_port - ... ==================== Signed-off-by: David S. Miller Co-developed-by: Volodymyr Mytnyk Signed-off-by: Volodymyr Mytnyk Signed-off-by: Maksym Glubokiy commit 551871bfc82c81a59f712313431f072e6d884acc Author: Maksym Glubokiy Date: Mon Jul 11 18:09:08 2022 +0300 net: prestera: add support for port range filters This adds support for port-range rules: $ tc qdisc add ... clsact $ tc filter add ... flower ... src_port - ... Co-developed-by: Volodymyr Mytnyk Signed-off-by: Volodymyr Mytnyk Signed-off-by: Maksym Glubokiy Signed-off-by: David S. Miller .../ethernet/marvell/prestera/prestera_flower.c | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 83d85bb069152b790caad905fa53e6d50cd3734d Author: Maksym Glubokiy Date: Mon Jul 11 18:09:07 2022 +0300 net: extract port range fields from fl_flow_key So it can be used for port range filter offloading. Co-developed-by: Volodymyr Mytnyk Signed-off-by: Volodymyr Mytnyk Signed-off-by: Maksym Glubokiy Signed-off-by: David S. Miller include/net/flow_dissector.h | 16 ++++++++++++++++ include/net/flow_offload.h | 6 ++++++ net/core/flow_offload.c | 7 +++++++ net/sched/cls_flower.c | 8 +------- 4 files changed, 30 insertions(+), 7 deletions(-) commit dd517237c3197428336ec12637831e8473865874 Merge: b09ab9c92e50 deef0d6afe84 Author: David S. Miller Date: Wed Jul 13 12:14:05 2022 +0100 Merge branch 'prestera-mdb-offload' Oleksandr Mazur says: ==================== net: marvell: prestera: add MDB offloading support This patch series adds support for the MDB handling for the marvell Prestera Driver. It's used to propagate IGMP groups registered within the Kernel to the underlying HW (offload registered groups). Features: - define (and implement) main internal MDB-related objects; - define (and implement) main HW APIs for MDB handling; - add MDB handling support for both regular ports as well as Bond interfaces; - Mirrored behavior of Bridge driver upon multicast router appearance (all traffic flooded when there's no mcast router; mcast router receives all mcast traffic, and only group-specific registered mcast traffic is being received by ports who've explicitly joined any group when there's a registered mcast router); - Reworked prestera driver bridge flags (especially multicast) setting - thus making it possible to react over mcast disabled messages properly by offloading this state to the underlying HW (disabling multicast flooding); Limitations: - Not full (partial) IGMPv3 support (due to limited switchdev notification capabilities: MDB events are being propagated only with a single MAC entry, while IGMPv3 has Group-Specific requests and responses); - It's possible that multiple IP groups would receive traffic from other groups, as MDB events are being propagated with a single MAC entry, which makes it possible to map a few IPs over same MAC; Co-developed-by: Yevhen Orlov Signed-off-by: Yevhen Orlov Signed-off-by: Oleksandr Mazur PATCH V5: - fix checkpatch errors (4/4). - remove function forward declarations, and move function implementations to match the removed forward declarations (4/4). - rebased changes on top of latest master. PATCH V4: - fix clang warning - var uninitialized when used. PATCH V3: - add missing function implementations to 2/4 (HW API implementation), only definitions were added int V1, V2, and implementation waas missed by mistake. Reported-by: kernel test robot - fix compiletime warning (unused variable) PATCH V2: - include all the patches of patch series (V1's been sent to closed net-next, also had not all patches included); ==================== Signed-off-by: David S. Miller commit deef0d6afe84eb16a30adfa5356ddcc5db204f13 Author: Oleksandr Mazur Date: Mon Jul 11 14:28:22 2022 +0300 net: marvell: prestera: implement software MDB entries allocation Define bridge MDB entry (software entry): - entry that get's created upon receiving MDB management events (create/delete), that inherently defines a software entry, which can be enabled (offloaded to the HW) or disabled (removed from HW). This separation is done to achieve a better highlevel management of HW resources - software MDB entry could exist, while it's not necessarily should be configured on the HW. For example: by default, the Linux behavior would not replicate multicast traffic to multicast group members if there's no active multicast router and thus - no actual multicast traffic can be received/sent. So, until multicast router appears on the system no HW configuration should be applied, although SW MDB entries should be tracked. Another example would be altering state of 'multicast enabled' on the bridge: MC_DISABLED should invoke disabling / clearing multicast groups of specified bridge on the HW, yet upon receiving 'multicast enabled' event, driver should reconfigure any existing software MDB groups on the HW. Keeping track of software MDB entries in such way makes it possible to properly react on such events. Define bridge MDB port entry (software entry): - entry that helps keeping track (on software - driver - level) of which bridge mebemer interface joined any give MDB group; Co-developed-by: Yevhen Orlov Signed-off-by: Yevhen Orlov Signed-off-by: Oleksandr Mazur Signed-off-by: David S. Miller drivers/net/ethernet/marvell/prestera/prestera.h | 2 + .../net/ethernet/marvell/prestera/prestera_main.c | 8 + .../ethernet/marvell/prestera/prestera_switchdev.c | 627 ++++++++++++++++++++- 3 files changed, 635 insertions(+), 2 deletions(-) commit 7950b214a1e44ae1d116b3d1d51f2061ea2012a8 Author: Oleksandr Mazur Date: Mon Jul 11 14:28:21 2022 +0300 net: marvell: prestera: define and implement MDB / flood domain API for entries creation and deletion Define and implement prestera API calls for managing MDB and flood domain (ports) entries (create / delete / find calls). Co-developed-by: Yevhen Orlov Signed-off-by: Yevhen Orlov Signed-off-by: Oleksandr Mazur Signed-off-by: David S. Miller drivers/net/ethernet/marvell/prestera/prestera.h | 19 +++ .../net/ethernet/marvell/prestera/prestera_main.c | 144 +++++++++++++++++++++ 2 files changed, 163 insertions(+) commit fec7c9c73fd389136fe7dd58371c0ff88b0a9704 Author: Oleksandr Mazur Date: Mon Jul 11 14:28:20 2022 +0300 net: marvell: prestera: define MDB/flood domain entries and HW API to offload them to the HW Define MDB entry that can be offloaded: - FDB entry, that defines an multicast group to which traffic can be replicated to; Define flood domain: - Arrangement of ports (list), that have joined multicast group, which would receive and replicate to multicast traffic of specified group; Define flood domain port: - single flood domain list entry, that is associated with any given bridge port interface (could be LAG interface or physical port-member). Applicable to both Q and D bridges; Co-developed-by: Yevhen Orlov Signed-off-by: Yevhen Orlov Signed-off-by: Oleksandr Mazur Signed-off-by: David S. Miller drivers/net/ethernet/marvell/prestera/prestera.h | 22 +++ .../net/ethernet/marvell/prestera/prestera_hw.c | 202 +++++++++++++++++++++ .../net/ethernet/marvell/prestera/prestera_hw.h | 11 ++ .../net/ethernet/marvell/prestera/prestera_main.c | 24 +++ 4 files changed, 259 insertions(+) commit 116f5af7c3ab661fe98511a856c8fd739757d039 Author: Oleksandr Mazur Date: Mon Jul 11 14:28:19 2022 +0300 net: marvell: prestera: rework bridge flags setting Separate flags to make it possible to alter them separately; Move bridge flags setting logic from HW API level to prestera_main where it belongs; Move bridge flags parsing (and setting using prestera API) to prestera_switchdev.c - module responsible for bridge operations handling; Signed-off-by: Oleksandr Mazur Signed-off-by: David S. Miller drivers/net/ethernet/marvell/prestera/prestera.h | 4 ++ .../net/ethernet/marvell/prestera/prestera_hw.c | 54 +-------------- .../net/ethernet/marvell/prestera/prestera_hw.h | 4 +- .../net/ethernet/marvell/prestera/prestera_main.c | 15 ++++ .../ethernet/marvell/prestera/prestera_switchdev.c | 79 ++++++++++++---------- 5 files changed, 67 insertions(+), 89 deletions(-) commit b3fa3e6dccc465969721b8bd2824213bd235efeb Author: Christian Loehle Date: Fri Jul 1 12:43:09 2022 +0000 mmc: block: Add single read for 4k sector cards Cards with 4k native sector size may only be read 4k-aligned, accommodate for this in the single read recovery and use it. Fixes: 81196976ed946 (mmc: block: Add blk-mq support) Signed-off-by: Christian Loehle Acked-by: Adrian Hunter Reviewed-by: Avri Altman Link: https://lore.kernel.org/r/cf4f316274c5474586d0d99b17db4a4c@hyperstone.com Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit b09ab9c92e5077a00602dbff606ea518f379303c Author: Matthias May Date: Mon Jul 11 11:17:22 2022 +0200 ip6_tunnel: allow to inherit from VLAN encapsulated IP The current code allows to inherit the TTL (hop_limit) from the payload when skb->protocol is ETH_P_IP or ETH_P_IPV6. However when the payload is VLAN encapsulated (e.g because the tunnel is of type GRETAP), then this inheriting does not work, because the visible skb->protocol is of type ETH_P_8021Q or ETH_P_8021AD. Instead of skb->protocol, use skb_protocol(). Signed-off-by: Matthias May Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 3f8a8447fd0b0069236a417607b2e6cba30911ac Author: Matthias May Date: Mon Jul 11 11:17:21 2022 +0200 ip6_gre: use actual protocol to select xmit When the payload is a VLAN encapsulated IPv6/IPv6 frame, we can skip the 802.1q/802.1ad ethertypes and jump to the actual protocol. This way we treat IPv4/IPv6 frames as IP instead of as "other". Signed-off-by: Matthias May Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 41337f52b967b09a7a2cb34ecfce6dd71e5ab4f6 Author: Matthias May Date: Mon Jul 11 11:17:20 2022 +0200 ip6_gre: set DSCP for non-IP The current code always forces a dscp of 0 for all non-IP frames. However when setting a specific TOS with the command ip link add name tep0 type ip6gretap local fdd1:ced0:5d88:3fce::1 remote fdd1:ced0:5d88:3fce::2 tos 0xa0 one would expect all GRE encapsulated frames to have a TOS of 0xA0. and not only when the payload is IPv4/IPv6. Signed-off-by: Matthias May Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) commit 7ae29fd1be431763041f52b8bca017b76cb7b06d Author: Matthias May Date: Mon Jul 11 11:17:19 2022 +0200 ip_tunnel: allow to inherit from VLAN encapsulated IP The current code allows to inherit the TOS, TTL, DF from the payload when skb->protocol is ETH_P_IP or ETH_P_IPV6. However when the payload is VLAN encapsulated (e.g because the tunnel is of type GRETAP), then this inheriting does not work, because the visible skb->protocol is of type ETH_P_8021Q or ETH_P_8021AD. Instead of skb->protocol, use skb_protocol(). Signed-off-by: Matthias May Signed-off-by: David S. Miller net/ipv4/ip_tunnel.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 3a44fb9f61d4315806d46dd3d107be15f6860052 Merge: c095449ea981 51189eb9ddc8 Author: Ulf Hansson Date: Wed Jul 13 12:47:13 2022 +0200 mmc: Merge branch fixes into next Merge the mmc fixes for v5.19rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v5.20. Signed-off-by: Ulf Hansson commit c095449ea9812bafba71735fdc79e7b2ca0f4701 Author: Seunghui Lee Date: Wed Jul 13 12:36:35 2022 +0900 mmc: mxcmmc: Use mmc_card_sdio macro Use mmc_card_sdio macro to simplify code. Signed-off-by: Seunghui Lee Link: https://lore.kernel.org/r/20220713033635.28432-3-sh043.lee@samsung.com Signed-off-by: Ulf Hansson drivers/mmc/host/mxcmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3beb0ab5bffba625007ea5c9e5e0ee5eef05c1ea Author: Seunghui Lee Date: Wed Jul 13 12:36:34 2022 +0900 mmc: core: Use mmc_card_* macro and add a new for the sd_combo type Add mmc_card_sd_combo() macro for sd combo type card and use the mmc_card_* macro to simplify code instead of comparing card->type. Signed-off-by: Seunghui Lee Link: https://lore.kernel.org/r/20220713033635.28432-2-sh043.lee@samsung.com Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 4 ++-- drivers/mmc/core/bus.c | 4 ++-- drivers/mmc/core/sd.c | 2 +- drivers/mmc/core/sdio.c | 16 ++++++++-------- include/linux/mmc/card.h | 1 + 5 files changed, 14 insertions(+), 13 deletions(-) commit 54c16b522e00583ba1151501286b0cf4c91e08c3 Author: Krzysztof Kozlowski Date: Tue Jul 12 16:42:42 2022 +0200 dt-bindings: mmc: sdhci-msm: constrain reg-names per variants The entries in arrays must have fixed order, so the bindings and Linux driver expecting various combinations of 'reg' addresses was never actually conforming to guidelines. The 'core' reg entry is valid only for SDCC v4 and lower, so disallow it in SDCC v5. SDCC v4 supports CQE and ICE, so allow them, even though the qcom,sdhci-msm-v4 compatible is used also for earlier SoCs with SDCC v2 or v3, so it is not entirely accurate. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20220712144245.17417-3-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/sdhci-msm.yaml | 61 ++++++++++++++-------- 1 file changed, 38 insertions(+), 23 deletions(-) commit 331ad8247b46eeaf3b5c66e5ef5986630fe0f043 Author: Krzysztof Kozlowski Date: Tue Jul 12 16:42:41 2022 +0200 dt-bindings: mmc: sdhci-msm: fix reg-names entries Bindings before conversion to DT schema expected reg-names without "_mem" suffix. This was used by older DTS files and by the MSM SDHCI driver. Reported-by: Douglas Anderson Fixes: edfbf8c307ff ("dt-bindings: mmc: sdhci-msm: Fix issues in yaml bindings") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20220712144245.17417-2-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/sdhci-msm.yaml | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) commit 401e4963bf45c800e3e9ea0d3a0289d738005fd4 Author: John Keeping Date: Fri Jul 8 17:27:02 2022 +0100 sched/core: Always flush pending blk_plug With CONFIG_PREEMPT_RT, it is possible to hit a deadlock between two normal priority tasks (SCHED_OTHER, nice level zero): INFO: task kworker/u8:0:8 blocked for more than 491 seconds. Not tainted 5.15.49-rt46 #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/u8:0 state:D stack: 0 pid: 8 ppid: 2 flags:0x00000000 Workqueue: writeback wb_workfn (flush-7:0) [] (__schedule) from [] (schedule+0xdc/0x134) [] (schedule) from [] (rt_mutex_slowlock_block.constprop.0+0xb8/0x174) [] (rt_mutex_slowlock_block.constprop.0) from [] +(rt_mutex_slowlock.constprop.0+0xac/0x174) [] (rt_mutex_slowlock.constprop.0) from [] (fat_write_inode+0x34/0x54) [] (fat_write_inode) from [] (__writeback_single_inode+0x354/0x3ec) [] (__writeback_single_inode) from [] (writeback_sb_inodes+0x250/0x45c) [] (writeback_sb_inodes) from [] (__writeback_inodes_wb+0x7c/0xb8) [] (__writeback_inodes_wb) from [] (wb_writeback+0x2c8/0x2e4) [] (wb_writeback) from [] (wb_workfn+0x1a4/0x3e4) [] (wb_workfn) from [] (process_one_work+0x1fc/0x32c) [] (process_one_work) from [] (worker_thread+0x22c/0x2d8) [] (worker_thread) from [] (kthread+0x16c/0x178) [] (kthread) from [] (ret_from_fork+0x14/0x38) Exception stack(0xc10e3fb0 to 0xc10e3ff8) 3fa0: 00000000 00000000 00000000 00000000 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 INFO: task tar:2083 blocked for more than 491 seconds. Not tainted 5.15.49-rt46 #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:tar state:D stack: 0 pid: 2083 ppid: 2082 flags:0x00000000 [] (__schedule) from [] (schedule+0xdc/0x134) [] (schedule) from [] (io_schedule+0x14/0x24) [] (io_schedule) from [] (bit_wait_io+0xc/0x30) [] (bit_wait_io) from [] (__wait_on_bit_lock+0x54/0xa8) [] (__wait_on_bit_lock) from [] (out_of_line_wait_on_bit_lock+0x84/0xb0) [] (out_of_line_wait_on_bit_lock) from [] (fat_mirror_bhs+0xa0/0x144) [] (fat_mirror_bhs) from [] (fat_alloc_clusters+0x138/0x2a4) [] (fat_alloc_clusters) from [] (fat_alloc_new_dir+0x34/0x250) [] (fat_alloc_new_dir) from [] (vfat_mkdir+0x58/0x148) [] (vfat_mkdir) from [] (vfs_mkdir+0x68/0x98) [] (vfs_mkdir) from [] (do_mkdirat+0xb0/0xec) [] (do_mkdirat) from [] (ret_fast_syscall+0x0/0x1c) Exception stack(0xc2e1bfa8 to 0xc2e1bff0) bfa0: 01ee42f0 01ee4208 01ee42f0 000041ed 00000000 00004000 bfc0: 01ee42f0 01ee4208 00000000 00000027 01ee4302 00000004 000dcb00 01ee4190 bfe0: 000dc368 bed11924 0006d4b0 b6ebddfc Here the kworker is waiting on msdos_sb_info::s_lock which is held by tar which is in turn waiting for a buffer which is locked waiting to be flushed, but this operation is plugged in the kworker. The lock is a normal struct mutex, so tsk_is_pi_blocked() will always return false on !RT and thus the behaviour changes for RT. It seems that the intent here is to skip blk_flush_plug() in the case where a non-preemptible lock (such as a spinlock) has been converted to a rtmutex on RT, which is the case covered by the SM_RTLOCK_WAIT schedule flag. But sched_submit_work() is only called from schedule() which is never called in this scenario, so the check can simply be deleted. Looking at the history of the -rt patchset, in fact this change was present from v5.9.1-rt20 until being dropped in v5.13-rt1 as it was part of a larger patch [1] most of which was replaced by commit b4bfa3fcfe3b ("sched/core: Rework the __schedule() preempt argument"). As described in [1]: The schedule process must distinguish between blocking on a regular sleeping lock (rwsem and mutex) and a RT-only sleeping lock (spinlock and rwlock): - rwsem and mutex must flush block requests (blk_schedule_flush_plug()) even if blocked on a lock. This can not deadlock because this also happens for non-RT. There should be a warning if the scheduling point is within a RCU read section. - spinlock and rwlock must not flush block requests. This will deadlock if the callback attempts to acquire a lock which is already acquired. Similarly to being preempted, there should be no warning if the scheduling point is within a RCU read section. and with the tsk_is_pi_blocked() in the scheduler path, we hit the first issue. [1] https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/tree/patches/0022-locking-rtmutex-Use-custom-scheduling-function-for-s.patch?h=linux-5.10.y-rt-patches Signed-off-by: John Keeping Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (Google) Link: https://lkml.kernel.org/r/20220708162702.1758865-1-john@metanate.com include/linux/sched/rt.h | 8 -------- kernel/sched/core.c | 8 ++++++-- 2 files changed, 6 insertions(+), 10 deletions(-) commit c82a69629c53eda5233f13fc11c3c01585ef48a2 Author: Vincent Guittot Date: Fri Jul 8 17:44:01 2022 +0200 sched/fair: fix case with reduced capacity CPU The capacity of the CPU available for CFS tasks can be reduced because of other activities running on the latter. In such case, it's worth trying to move CFS tasks on a CPU with more available capacity. The rework of the load balance has filtered the case when the CPU is classified to be fully busy but its capacity is reduced. Check if CPU's capacity is reduced while gathering load balance statistic and classify it group_misfit_task instead of group_fully_busy so we can try to move the load on another CPU. Reported-by: David Chen Reported-by: Zhang Qiao Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Tested-by: David Chen Tested-by: Zhang Qiao Link: https://lkml.kernel.org/r/20220708154401.21411-1-vincent.guittot@linaro.org kernel/sched/fair.c | 54 +++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 12 deletions(-) commit 096e772b1cdcc201ea10a5bd83f280f665444704 Author: Philipp Zabel Date: Wed Jul 13 10:40:10 2022 +0200 Revert "reset: microchip-sparx5: allow building as a module" This reverts commit b6b9585876da018bdde2d5f15d206a689c0d70f3. This breaks MDIO on kswitch-d10, presumably because the global switch reset is not released early enough anymore. Reported-by: Michael Walle Cc: Clément Léger Signed-off-by: Philipp Zabel Tested-by: Michael Walle Link: https://lore.kernel.org/r/20220713084010.168720-1-p.zabel@pengutronix.de drivers/reset/Kconfig | 2 +- drivers/reset/reset-microchip-sparx5.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) commit e3ac5e8736c16306b9589f210a473aceb62347cb Author: Rob Herring Date: Wed Jun 29 15:00:23 2022 -0600 Revert "drivers/video/backlight/platform_lcd.c: add support for device tree based probe" This reverts commit 52e842432f36d5b15227d0ee0d2aa3d2bc3cc0b2. The DT support never would have worked because there's no platform_data providing ops. There's not any documented binding for it either. Signed-off-by: Rob Herring Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220629210024.815761-1-robh@kernel.org drivers/video/backlight/platform_lcd.c | 10 ---------- 1 file changed, 10 deletions(-) commit 5efab5cdf06b932ba7a53264b60f7d5c6ec87edf Author: Bagas Sanjaya Date: Tue Jul 12 16:29:54 2022 +0700 Documentation: kvm: extend KVM_S390_ZPCI_OP subheading underline Stephen Rothwell reported the htmldocs warning: Documentation/virt/kvm/api.rst:5959: WARNING: Title underline too short. 4.137 KVM_S390_ZPCI_OP -------------------- The warning is due to subheading underline on KVM_S390_ZPCI_OP section is short of 2 dashes. Extend the underline to fix the warning. Link: https://lore.kernel.org/linux-next/20220711205557.183c3b14@canb.auug.org.au/ Fixes: a0c4d1109d6cc5 ("KVM: s390: add KVM_S390_ZPCI_OP to manage guest zPCI devices") Reported-by: Stephen Rothwell Cc: Paolo Bonzini Cc: Jonathan Corbet Cc: Pierre Morel Cc: Thomas Huth Cc: Matthew Rosato Cc: Christian Borntraeger Cc: Janosch Frank Cc: kvm@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20220712092954.142027-4-bagasdotme@gmail.com Signed-off-by: Christian Borntraeger Documentation/virt/kvm/api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6131fd198099d9cfde4cbcd6d60a07aa634a358c Author: Christian Borntraeger Date: Tue Jul 12 11:31:40 2022 +0200 KVM: s390/pci: fix include duplicates remove the duplicate includes. While at it sort the includes. Reported-by: kernel test robot Fixes: 73f91b004321 ("KVM: s390: pci: enable host forwarding of Adapter Event Notifications") Signed-off-by: Christian Borntraeger arch/s390/kvm/pci.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9ec7e8d5fae34b3da52b4b0a7a47877bc6aa8416 Author: Jiang Jian Date: Wed Jun 22 18:42:17 2022 +0800 USB: serial: fix repeated word "the" in comments There is a repeated word "the" in two comments that should be replaced or removed. Signed-off-by: Jiang Jian [ johan: replace one "the" with "that", merge the two cleanups, amend commit message ] Signed-off-by: Johan Hovold drivers/usb/serial/cypress_m8.c | 2 +- drivers/usb/serial/mos7720.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f41e16ac606216c7ad01c21e01a1004ca5650a8f Author: Zhang Jiaming Date: Wed Jun 29 14:41:53 2022 +0800 USB: serial: io_edgeport: fix spelling mistakes Change 'paramater' to 'parameter'. Change 'timedout' to 'timeout'. Signed-off-by: Zhang Jiaming Signed-off-by: Johan Hovold drivers/usb/serial/io_edgeport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 33c1f401939c66858157c0665dc07ad9596cd1bd Author: Andy Shevchenko Date: Tue Jul 12 18:35:19 2022 +0300 ALSA: hda: cs35l41: Consolidate selections under SND_HDA_SCODEC_CS35L41 Selections can be propagated via selections, while dependencies are not. Hence, consolidate selections under the SND_HDA_SCODEC_CS35L41 option. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220712153519.35692-4-andriy.shevchenko@linux.intel.com Signed-off-by: Takashi Iwai sound/pci/hda/Kconfig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 931c940fc5d96e5ef7a2188abfb14e7c3ab1290e Author: Andy Shevchenko Date: Tue Jul 12 18:35:18 2022 +0300 ALSA: hda: cs35l41: Drop wrong use of ACPI_PTR() ACPI_PTR() is more harmful than helpful. For example, in this case if CONFIG_ACPI=n, the ID table left unused which is not what we want. Instead of adding ifdeffery or attribute here and there, drop ACPI_PTR(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220712153519.35692-3-andriy.shevchenko@linux.intel.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda_i2c.c | 8 +++----- sound/pci/hda/cs35l41_hda_spi.c | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) commit d60b05b4c7802b45c4f2ac003827384618a17bb4 Author: Andy Shevchenko Date: Tue Jul 12 18:35:17 2022 +0300 ALSA: hda: cs35l41: Allow compilation test on non-ACPI configurations ACPI is needed only for functioning of this codec on some platforms, there is no compilation dependency, so make it optional Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220712153519.35692-2-andriy.shevchenko@linux.intel.com Signed-off-by: Takashi Iwai sound/pci/hda/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 20bcf721068f6418607283cdb0c16cf0b606cfc1 Author: Andy Shevchenko Date: Tue Jul 12 18:35:16 2022 +0300 ALSA: hda: cs35l41: Don't dereference fwnode handle Use acpi_fwnode_handle() instead of dereferencing an fwnode handle directly, which is a better coding practice. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220712153519.35692-1-andriy.shevchenko@linux.intel.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0180290abb5ce5c870f84a00ffeda5802f641dce Merge: 1ebdc90eb71a 89ed996b888f Author: Dave Airlie Date: Wed Jul 13 14:26:24 2022 +1000 Merge tag 'topic/nouveau-misc-2022-07-13-1' of git://anongit.freedesktop.org/drm/drm into drm-next drm/nouveau next misc This is a set of misc nouveau patches skeggsb left queued up, just flushing some of them out. Signed-off-by: Dave Airlie From: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/CAPM=9txSS9Pdagpi=3JJeFOGy6ALWC31WZdQxLBkfGeL3O+T1A@mail.gmail.com commit 1ebdc90eb71aad6463e83771fe05a1eac49164da Merge: d9e019bb396f 48b927770f8a Author: Dave Airlie Date: Wed Jul 13 14:17:01 2022 +1000 Merge tag 'exynos-drm-next-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Two cleanups - Remove Joonyoung Shim from MAINTAINERS and relevant yaml files. He left from Samsung so his email address isn't valid anymore. Fixup - Fix resume function issue of exynos decon driver by calling clk_disable_unprepare() properly if clk_prepare_enable() failed. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/20220712061008.199961-1-inki.dae@samsung.com commit 89ed996b888faaf11c69bb4cbc19f21475c9050e Author: Ben Skeggs Date: Wed Jun 1 20:46:06 2022 +1000 drm/nouveau/kms/nv50-: remove unused functions Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/dispnv50/disp.c | 16 ---------------- drivers/gpu/drm/nouveau/dispnv50/wndw.c | 12 ------------ drivers/gpu/drm/nouveau/dispnv50/wndw.h | 2 -- 3 files changed, 30 deletions(-) commit ea0b20d3bd96f9ce2a1e9d886175411c05dcb179 Author: Ben Skeggs Date: Wed Jun 1 20:46:05 2022 +1000 drm/nouveau/flcn: remove unused functions Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie .../gpu/drm/nouveau/include/nvkm/engine/falcon.h | 10 --------- drivers/gpu/drm/nouveau/nvkm/falcon/base.c | 10 --------- drivers/gpu/drm/nouveau/nvkm/falcon/v1.c | 25 ---------------------- 3 files changed, 45 deletions(-) commit 7ba01b504c16ae64a8faa5f5ee9a809d424cdf0e Author: Ben Skeggs Date: Wed Jun 1 20:46:05 2022 +1000 drm/nouveau: remove double WFI when destroying channels This is particularly irritating when the channel has hung. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nouveau_abi16.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 40184ece92ebc5adfdba84554bffb60ef0e37029 Author: Ben Skeggs Date: Wed Jun 1 20:46:04 2022 +1000 drm/nouveau/ce/gv100-: move method buffer to ce ctx Didn't really know what this buffer was when initially implemented, but these days we do, so move it somewhere more appropriate. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nouveau_abi16.c | 26 ++++++++++++ drivers/gpu/drm/nouveau/nouveau_abi16.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/ce/gv100.c | 24 +++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/ce/priv.h | 2 + drivers/gpu/drm/nouveau/nvkm/engine/ce/tu102.c | 1 + .../gpu/drm/nouveau/nvkm/engine/fifo/changk104.h | 2 - .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 11 +++-- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c | 47 +++++++++++----------- 8 files changed, 85 insertions(+), 29 deletions(-) commit 097d56cdcd77639bce7e205adaa22b6f5e7d93a6 Author: Ben Skeggs Date: Wed Jun 1 20:46:04 2022 +1000 drm/nouveau/fifo: remove rd32/wr32 accessors from channels No need for these, we always map USERD to the client. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 1 - drivers/gpu/drm/nouveau/nouveau_chan.c | 4 ++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 35 ---------------------- 3 files changed, 3 insertions(+), 37 deletions(-) commit 66ff4e4ed471fdfa9ae4c49a0abcf5d5043ca65e Author: Ben Skeggs Date: Wed Jun 1 20:46:03 2022 +1000 drm/nouveau/fifo: rip out cevent, never used Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 29 ---------------------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 1 - 4 files changed, 33 deletions(-) commit 0196cc65f91710e30d45cea78d75fd616d705002 Author: Ben Skeggs Date: Wed Jun 1 20:46:03 2022 +1000 drm/nouveau/device: remove pwrsrc notify in favour of a direct call to clk Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 3 --- drivers/gpu/drm/nouveau/include/nvkm/subdev/clk.h | 3 +-- .../gpu/drm/nouveau/include/nvkm/subdev/fault.h | 1 + drivers/gpu/drm/nouveau/nvkm/core/ioctl.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/acpi.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 25 ---------------------- drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c | 20 +++++------------ 7 files changed, 11 insertions(+), 48 deletions(-) commit 6d7291843ec5008a9ff1c011d342679fa9bfe4b9 Author: Ben Skeggs Date: Wed Jun 1 20:46:02 2022 +1000 drm/nouveau/nvkm: remove unused header Left-over from secboot->acr transition. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie .../gpu/drm/nouveau/include/nvkm/subdev/secboot.h | 66 ---------------------- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 1 - 2 files changed, 67 deletions(-) commit 4ddf8d7dedb881c6638850f1b74ff1f9967c89b7 Author: Ben Skeggs Date: Wed Jun 1 20:46:02 2022 +1000 drm/nouveau/nvkm: zero out engine pointer for subdev-provided classes Doesn't fix any known issue, but noticed fifo being initialised in logs in response to mmu allocation. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nvkm/engine/device/user.c | 1 + 1 file changed, 1 insertion(+) commit 61c1f340bc809a1ca1e3c8794207a91cde1a7c78 Author: Ben Skeggs Date: Wed Jun 1 20:46:02 2022 +1000 drm/nouveau/nvkm: use list_add_tail() when building object tree Fixes resume from hibernate failing on (at least) TU102, where cursor channel init failed due to being performed before the core channel. Not solid idea why suspend-to-ram worked, but, presumably HW being in an entirely clean state has something to do with it. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nvkm/core/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4feba47aad55aca90d9a2b104c0345ca6f93712 Author: Ben Skeggs Date: Wed Jun 1 20:46:01 2022 +1000 drm/nouveau/nvkm: rip out event uapi Userspace never ended up using this to be clever about dealing with channel death, and it won't be, not like this anyway. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nouveau_drv.h | 1 - drivers/gpu/drm/nouveau/nouveau_nvif.c | 31 +---- drivers/gpu/drm/nouveau/nouveau_usif.c | 231 +-------------------------------- 3 files changed, 2 insertions(+), 261 deletions(-) commit 911dd554a129081f056417a30054f24ef6818e3d Author: Ben Skeggs Date: Wed Jun 1 20:46:00 2022 +1000 drm/nouveau/nvif: add wrapper for open-coded nvif_object_constructed() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/include/nvif/object.h | 6 ++++++ drivers/gpu/drm/nouveau/nvif/object.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit b6afeb87ad294689a9687cda28dd7a7006740fc0 Author: Justin Stitt Date: Mon Jul 11 16:24:04 2022 -0700 qlogic: qed: fix clang -Wformat warnings When building with Clang we encounter these warnings: | drivers/net/ethernet/qlogic/qed/qed_dev.c:416:30: error: format | specifies type 'char' but the argument has type 'u32' (aka 'unsigned | int') [-Werror,-Wformat] i); - | drivers/net/ethernet/qlogic/qed/qed_dev.c:630:13: error: format | specifies type 'char' but the argument has type 'int' [-Werror,-Wformat] | p_llh_info->num_ppfid - 1); For the first warning, `i` is a u32 which is much wider than the format specifier `%hhd` describes. This results in a loss of bits after 2^7. The second warning involves implicit integer promotion as the resulting type of addition cannot be smaller than an int. example: `` uint8_t a = 4, b = 7; int size = sizeof(a + b - 1); printf("%d\n", size); // output: 4 ``` See more: (https://wiki.sei.cmu.edu/confluence/display/c/INT02-C.+Understand+integer+conversion+rules) "Integer types smaller than int are promoted when an operation is performed on them. If all values of the original type can be represented as an int, the value of the smaller type is converted to an int; otherwise, it is converted to an unsigned int." Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Justin Stitt Link: https://lore.kernel.org/r/20220711232404.2189257-1-justinstitt@google.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/qlogic/qed/qed_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1aea9d87334dea9123b057d3200bb54cff35c09a Author: Lorenzo Bianconi Date: Mon Jul 11 16:07:51 2022 -0700 igb: add xdp frags support to ndo_xdp_xmit Add the capability to map non-linear xdp frames in XDP_TX and ndo_xdp_xmit callback. Signed-off-by: Lorenzo Bianconi Tested-by: Chandan Kumar Rout (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20220711230751.3124415-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/igb/igb_main.c | 121 +++++++++++++++++++----------- 1 file changed, 78 insertions(+), 43 deletions(-) commit c9ef2a486aa90557cdb6696942d7313810186819 Merge: 512b2dc48e8b 914f6a59b10f Author: Jakub Kicinski Date: Tue Jul 12 18:37:22 2022 -0700 Merge branch 'mptcp-support-changes-to-initial-subflow-priority' Mat Martineau says: ==================== mptcp: Support changes to initial subflow priority This series updates the in-kernel MPTCP path manager to allow changes to subflow priority for the first subflow created for each MPTCP connection (the one created with the MP_CAPABLE handshake). Patches 1 and 2 do some refactoring to simplify the new functionality. Patch 3 introduces the new feature to change the initial subflow priority and send the MP_PRIO header on that subflow. Patch 4 cleans up code related to tracking endpoint ids on the initial subflow. Patch 5 adds a selftest to confirm that subflow priorities are updated as expected. ==================== Link: https://lore.kernel.org/r/20220711191633.80826-1-mathew.j.martineau@linux.intel.com Signed-off-by: Jakub Kicinski commit 914f6a59b10f41a8baf62d625087e6586d4762af Author: Paolo Abeni Date: Mon Jul 11 12:16:33 2022 -0700 selftests: mptcp: add MPC backup tests Add a couple of test-cases covering the newly introduced features - priority update for the MPC subflow. Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/mptcp_join.sh | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 3ad14f54bd7448384458e69f0183843f683ecce8 Author: Paolo Abeni Date: Mon Jul 11 12:16:32 2022 -0700 mptcp: more accurate MPC endpoint tracking Currently the id accounting for the ID 0 subflow is not correct: at creation time we mark (correctly) as unavailable the endpoint id corresponding the MPC subflow source address, while at subflow removal time set as available the id 0. With this change we track explicitly the endpoint id corresponding to the MPC subflow so that we can mark it as available at removal time. Additionally this allow deleting the initial subflow via the NL PM specifying the corresponding endpoint id. Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski net/mptcp/pm_netlink.c | 21 ++++++++++++++------- net/mptcp/protocol.h | 1 + 2 files changed, 15 insertions(+), 7 deletions(-) commit c157bbe776b799fba885577e193e94068cefe9c7 Author: Paolo Abeni Date: Mon Jul 11 12:16:31 2022 -0700 mptcp: allow the in kernel PM to set MPC subflow priority Any local endpoints configured on the address matching the MPC subflow are currently ignored. Specifically, setting a backup flag on them has no effect on the first subflow, as the MPC handshake can't carry such info. This change refactors the MPC endpoint id accounting to additionally fetch the priority info from the relevant endpoint and eventually trigger the MP_PRIO handshake as needed. As a result, the MPC subflow now switches to backup priority after that the MPTCP socket is fully established, according to the local endpoint configuration. Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski net/mptcp/pm_netlink.c | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) commit bedee0b561138346967cf1443f2afd1b48b3148f Author: Paolo Abeni Date: Mon Jul 11 12:16:30 2022 -0700 mptcp: address lookup improvements When looking-up a socket address in the endpoint list, we must prefer port-based matches over address only match. Ensure that port-based endpoints are listed first, using head insertion for them. Additionally be sure that only port-based endpoints carry a non zero port number. Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski net/mptcp/pm_netlink.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit f5360e9b314caed58970e811ae80a4c351e2ce8a Author: Paolo Abeni Date: Mon Jul 11 12:16:29 2022 -0700 mptcp: introduce and use mptcp_pm_send_ack() The in-kernel PM has a bit of duplicate code related to ack generation. Create a new helper factoring out the PM-specific needs and use it in a couple of places. As a bonus, mptcp_subflow_send_ack() is not used anymore outside its own compilation unit and can become static. Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski net/mptcp/pm_netlink.c | 56 ++++++++++++++++++++++++++++++-------------------- net/mptcp/protocol.c | 2 +- net/mptcp/protocol.h | 1 - 3 files changed, 35 insertions(+), 24 deletions(-) commit 512b2dc48e8b01ffb6ef68c0c7ba69b5d91cab46 Author: XueBing Chen Date: Mon Jul 11 21:55:37 2022 +0800 net: ip_tunnel: use strscpy to replace strlcpy The strlcpy should not be used because it doesn't limit the source length. Preferred is strscpy. Signed-off-by: XueBing Chen Link: https://lore.kernel.org/r/2a08f6c1.e30.181ed8b49ad.Coremail.chenxuebing@jari.cn Signed-off-by: Jakub Kicinski net/ipv4/ip_tunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 536a6c8e05f95e3d1118c40ae8b3022ee2d05d52 Author: Yonglong Li Date: Mon Jul 11 17:47:18 2022 +0800 tcp: make retransmitted SKB fit into the send window current code of __tcp_retransmit_skb only check TCP_SKB_CB(skb)->seq in send window, and TCP_SKB_CB(skb)->seq_end maybe out of send window. If receiver has shrunk his window, and skb is out of new window, it should retransmit a smaller portion of the payload. test packetdrill script: 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) +0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 +0 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress) +0 > S 0:0(0) win 65535 +.05 < S. 0:0(0) ack 1 win 6000 +0 > . 1:1(0) ack 1 +0 write(3, ..., 10000) = 10000 +0 > . 1:2001(2000) ack 1 win 65535 +0 > . 2001:4001(2000) ack 1 win 65535 +0 > . 4001:6001(2000) ack 1 win 65535 +.05 < . 1:1(0) ack 4001 win 1001 and tcpdump show: 192.168.226.67.55 > 192.0.2.1.8080: Flags [.], seq 1:2001, ack 1, win 65535, length 2000 192.168.226.67.55 > 192.0.2.1.8080: Flags [.], seq 2001:4001, ack 1, win 65535, length 2000 192.168.226.67.55 > 192.0.2.1.8080: Flags [P.], seq 4001:5001, ack 1, win 65535, length 1000 192.168.226.67.55 > 192.0.2.1.8080: Flags [.], seq 5001:6001, ack 1, win 65535, length 1000 192.0.2.1.8080 > 192.168.226.67.55: Flags [.], ack 4001, win 1001, length 0 192.168.226.67.55 > 192.0.2.1.8080: Flags [.], seq 5001:6001, ack 1, win 65535, length 1000 192.168.226.67.55 > 192.0.2.1.8080: Flags [P.], seq 4001:5001, ack 1, win 65535, length 1000 when cient retract window to 1001, send window is [4001,5002], but TLP send 5001-6001 packet which is out of send window. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yonglong Li Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/1657532838-20200-1-git-send-email-liyonglong@chinatelecom.cn Signed-off-by: Jakub Kicinski net/ipv4/tcp_output.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit eca250b16690d43dce3941311af110c8391150e9 Author: Diana Wang Date: Mon Jul 11 11:30:48 2022 +0200 nfp: support TX VLAN ctag insert in NFDK Add support for TX VLAN ctag insert which may be configured via ethtool. e.g. # ethtool -K $DEV tx-vlan-offload on The NIC supplies VLAN insert information as packet metadata. The fields of this VLAN metadata including vlan_proto and vlan tag. Configuration control bit NFP_NET_CFG_CTRL_TXVLAN_V2 is to signal availability of ctag-insert features of the firmware. NFDK is used to communicate via PCIE to NFP-3800 based NICs while NFD3 is used for other NICs supported by the NFP driver. This features is currently implemented only for NFD3 and this patch adds support for it with NFDK. Signed-off-by: Diana Wang Reviewed-by: Louis Peens Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20220711093048.1911698-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/netronome/nfp/nfdk/dp.c | 63 +++++++++++----------- drivers/net/ethernet/netronome/nfp/nfdk/rings.c | 1 + .../net/ethernet/netronome/nfp/nfp_net_common.c | 2 +- 3 files changed, 35 insertions(+), 31 deletions(-) commit 69053101e096c01a4c8e3d2497e3cd5716e43cec Author: Shivaprasad G Bhat Date: Tue Jul 12 10:23:44 2022 -0500 ndtest: Cleanup all of blk namespace specific code With the nd_namespace_blk and nd_blk_region infrastructures being removed, the ndtest still has some references to the old code. So the compilation fails as below, ../tools/testing/nvdimm/test/ndtest.c:204:25: error: ‘ND_DEVICE_NAMESPACE_BLK’ undeclared here (not in a function); did you mean ‘ND_DEVICE_NAMESPACE_IO’? 204 | .type = ND_DEVICE_NAMESPACE_BLK, | ^~~~~~~~~~~~~~~~~~~~~~~ | ND_DEVICE_NAMESPACE_IO ../tools/testing/nvdimm/test/ndtest.c: In function ‘ndtest_create_region’: ../tools/testing/nvdimm/test/ndtest.c:630:17: error: ‘ndbr_desc’ undeclared (first use in this function); did you mean ‘ndr_desc’? 630 | ndbr_desc.enable = ndtest_blk_region_enable; | ^~~~~~~~~ | ndr_desc ../tools/testing/nvdimm/test/ndtest.c:630:17: note: each undeclared identifier is reported only once for each function it appears in ../tools/testing/nvdimm/test/ndtest.c:630:36: error: ‘ndtest_blk_region_enable’ undeclared (first use in this function) 630 | ndbr_desc.enable = ndtest_blk_region_enable; | ^~~~~~~~~~~~~~~~~~~~~~~~ ../tools/testing/nvdimm/test/ndtest.c:631:35: error: ‘ndtest_blk_do_io’ undeclared (first use in this function); did you mean ‘ndtest_blk_mmio’? 631 | ndbr_desc.do_io = ndtest_blk_do_io; | ^~~~~~~~~~~~~~~~ | ndtest_blk_mmio The current patch removes the specific code to cleanup all obsolete references. Signed-off-by: Shivaprasad G Bhat Link: https://lore.kernel.org/r/165763940218.3501174.7103619358744815702.stgit@ltc-boston123.aus.stglabs.ibm.com Signed-off-by: Dan Williams tools/testing/nvdimm/test/ndtest.c | 77 -------------------------------------- 1 file changed, 77 deletions(-) commit d9e019bb396fc9448b104a6f4cdb7acf8af02854 Merge: e23a5e14aa27 cb77085b1f0a Author: Dave Airlie Date: Wed Jul 13 10:55:52 2022 +1000 Merge tag 'drm-msm-next-2022-07-10' of https://gitlab.freedesktop.org/drm/msm into drm-next Next for v5.20 GPU: - a619 support - Fix for unclocked GMU register access - Devcore dump enhancements Core: - client utilization via fdinfo support - fix fence rollover issue - gem: Lockdep false-positive warning fix - gem: Switch to pfn mappings DPU: - constification of HW catalog - support for using encoder as CRC source - WB support on sc7180 - WB resolution fixes DP: - dropped custom bulk clock implementation - made dp_bridge_mode_valid() return MODE_CLOCK_HIGH where applicable - fix link retraining on resolution change MDP5: - MSM8953 perf data HDMI: - YAML'ification of schema - dropped obsolete GPIO support - misc cleanups Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGtuqswBGPw-kCYzJvckK2RR1XTeUEgaXwVG_mvpbv3gPA@mail.gmail.com commit e23a5e14aa278858c2e3d81ec34e83aa9a4177c5 Merge: 5e4cb0afe21e 32346491ddf2 Author: Dave Airlie Date: Wed Jul 13 10:54:56 2022 +1000 Backmerge tag 'v5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next Backmerge in rc6 so I can merge msm next easier. Linux 5.19-rc6 Signed-off-by: Dave Airlie commit 149d17140bcedc906082c4f874dec98b1ffc5a90 Author: Jane Chu Date: Thu Jun 30 12:28:02 2022 -0600 pmem: fix a name collision Kernel test robot detected name collision when compiled on 'um' architecture. Rename "to_phys()" to "pmem_to_phys()". >> drivers/nvdimm/pmem.c:48:20: error: conflicting types for 'to_phys'; have 'phys_addr_t(struct pmem_device *, phys_addr_t)' {aka 'long long unsigned int(struct pmem_device *, long long unsigned int)'} 48 | static phys_addr_t to_phys(struct pmem_device *pmem, phys_addr_t offset) | ^~~~~~~ In file included from arch/um/include/asm/page.h:98, from arch/um/include/asm/thread_info.h:15, from include/linux/thread_info.h:60, from include/asm-generic/preempt.h:5, from ./arch/um/include/generated/asm/preempt.h:1, arch/um/include/shared/mem.h:12:29: note: previous definition of 'to_phys' with type 'long unsigned int(void *)' 12 | static inline unsigned long to_phys(void *virt) | ^~~~~~~ vim +48 drivers/nvdimm/pmem.c 47 > 48 static phys_addr_t to_phys(struct pmem_device *pmem, phys_addr_t offset) 49 { 50 return pmem->phys_addr + offset; 51 } 52 Fixes: 9409c9b6709e (pmem: refactor pmem_clear_poison()) Reported-by: kernel test robot Signed-off-by: Jane Chu Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220630182802.3250449-1-jane.chu@oracle.com Signed-off-by: Dan Williams drivers/nvdimm/pmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ace2bee839e08df324cb320763258dfd72e6120e Author: Yafang Shao Date: Sat Jul 9 15:44:56 2022 +0000 bpf: Make non-preallocated allocation low priority GFP_ATOMIC doesn't cooperate well with memcg pressure so far, especially if we allocate too much GFP_ATOMIC memory. For example, when we set the memcg limit to limit a non-preallocated bpf memory, the GFP_ATOMIC can easily break the memcg limit by force charge. So it is very dangerous to use GFP_ATOMIC in non-preallocated case. One way to make it safe is to remove __GFP_HIGH from GFP_ATOMIC, IOW, use (__GFP_ATOMIC | __GFP_KSWAPD_RECLAIM) instead, then it will be limited if we allocate too much memory. There's a plan to completely remove __GFP_ATOMIC in the mm side[1], so let's use GFP_NOWAIT instead. We introduced BPF_F_NO_PREALLOC is because full map pre-allocation is too memory expensive for some cases. That means removing __GFP_HIGH doesn't break the rule of BPF_F_NO_PREALLOC, but has the same goal with it-avoiding issues caused by too much memory. So let's remove it. This fix can also apply to other run-time allocations, for example, the allocation in lpm trie, local storage and devmap. So let fix it consistently over the bpf code It also fixes a typo in the comment. [1]. https://lore.kernel.org/linux-mm/163712397076.13692.4727608274002939094@noble.neil.brown.name/ Cc: Roman Gushchin Cc: Shakeel Butt Cc: NeilBrown Signed-off-by: Yafang Shao Reviewed-by: Shakeel Butt Link: https://lore.kernel.org/r/20220709154457.57379-2-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/devmap.c | 2 +- kernel/bpf/hashtab.c | 6 +++--- kernel/bpf/local_storage.c | 2 +- kernel/bpf/lpm_trie.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit ef2a95db89003e8304e429dc48556fecb8c7140b Author: Justin Stitt Date: Mon Jul 11 17:01:52 2022 -0700 nfp: fix clang -Wformat warnings When building with Clang we encounter these warnings: | drivers/net/ethernet/netronome/nfp/nfp_app.c:233:99: error: format | specifies type 'unsigned char' but the argument has underlying type | 'unsigned int' [-Werror,-Wformat] nfp_err(pf->cpp, "unknown FW app ID | 0x%02hhx, driver too old or support for FW not built in\n", id); - | drivers/net/ethernet/netronome/nfp/nfp_main.c:396:11: error: format | specifies type 'unsigned char' but the argument has type 'int' | [-Werror,-Wformat] serial, interface >> 8, interface & 0xff); Correct format specifier for `id` is `%x` since the default type for the `nfp_app_id` enum is `unsigned int`. The second warning is also solved by using the `%x` format specifier as the expressions involving `interface` are implicity promoted to integers (%x is used to maintain hexadecimal representation). Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Justin Stitt Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20220712000152.2292031-1-justinstitt@google.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/netronome/nfp/nfp_app.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1d5f82d9dd477d5c66e0214a68c3e4f308eadd6d Author: Song Liu Date: Tue Jul 5 17:26:12 2022 -0700 bpf, x86: fix freeing of not-finalized bpf_prog_pack syzbot reported a few issues with bpf_prog_pack [1], [2]. This only happens with multiple subprogs. In jit_subprogs(), we first call bpf_int_jit_compile() on each sub program. And then, we call it on each sub program again. jit_data is not freed in the first call of bpf_int_jit_compile(). Similarly we don't call bpf_jit_binary_pack_finalize() in the first call of bpf_int_jit_compile(). If bpf_int_jit_compile() failed for one sub program, we will call bpf_jit_binary_pack_finalize() for this sub program. However, we don't have a chance to call it for other sub programs. Then we will hit "goto out_free" in jit_subprogs(), and call bpf_jit_free on some subprograms that haven't got bpf_jit_binary_pack_finalize() yet. At this point, bpf_jit_binary_pack_free() is called and the whole 2MB page is freed erroneously. Fix this with a custom bpf_jit_free() for x86_64, which calls bpf_jit_binary_pack_finalize() if necessary. Also, with custom bpf_jit_free(), bpf_prog_aux->use_bpf_prog_pack is not needed any more, remove it. Fixes: 1022a5498f6f ("bpf, x86_64: Use bpf_jit_binary_pack_alloc") [1] https://syzkaller.appspot.com/bug?extid=2f649ec6d2eea1495a8f [2] https://syzkaller.appspot.com/bug?extid=87f65c75f4a72db05445 Reported-by: syzbot+2f649ec6d2eea1495a8f@syzkaller.appspotmail.com Reported-by: syzbot+87f65c75f4a72db05445@syzkaller.appspotmail.com Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20220706002612.4013790-1-song@kernel.org Signed-off-by: Alexei Starovoitov arch/x86/net/bpf_jit_comp.c | 25 +++++++++++++++++++++++++ include/linux/bpf.h | 1 - include/linux/filter.h | 8 ++++++++ kernel/bpf/core.c | 29 ++++++++++++----------------- 4 files changed, 45 insertions(+), 18 deletions(-) commit d7d27304a91e1b89025b8b691c08e1e5fde98deb Merge: 5022e221c98a 4ce223e5ef70 Author: Jakub Kicinski Date: Tue Jul 12 17:27:20 2022 -0700 Merge branch 'dt-bindings-net-convert-sff-sfp-to-dtschema' Ioana Ciornei says: ==================== dt-bindings: net: convert sff,sfp to dtschema This patch set converts the sff,sfp to dtschema. The first patch does a somewhat mechanical conversion without changing anything else beside the format in which the dt binding is presented. In the second patch we rename some dt nodes to be generic. The last two patches change the GPIO related properties so that they uses the -gpios preferred suffix. This way, all the DTBs are passing the validation against the sff,sfp.yaml binding. ==================== Link: https://lore.kernel.org/r/20220707091437.446458-1-ioana.ciornei@nxp.com Signed-off-by: Jakub Kicinski commit 4ce223e5ef70844505aee9780a9153b8d7866158 Author: Ioana Ciornei Date: Thu Jul 7 12:14:37 2022 +0300 arch: arm64: dts: marvell: rename the sfp GPIO properties Rename the GPIO related sfp properties to include the preffered -gpios suffix. Also, with this change the dtb_check will no longer complain when trying to verify the DTS against the sff,sfp.yaml binding. Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski .../boot/dts/marvell/armada-3720-turris-mox.dts | 10 ++++----- arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts | 16 +++++++-------- .../boot/dts/marvell/armada-7040-mochabin.dts | 16 +++++++-------- .../dts/marvell/armada-8040-clearfog-gt-8k.dts | 4 ++-- arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi | 24 +++++++++++----------- .../boot/dts/marvell/armada-8040-puzzle-m801.dts | 16 +++++++-------- arch/arm64/boot/dts/marvell/cn9130-crb.dtsi | 6 +++--- arch/arm64/boot/dts/marvell/cn9130-db.dtsi | 8 ++++---- arch/arm64/boot/dts/marvell/cn9131-db.dtsi | 8 ++++---- arch/arm64/boot/dts/marvell/cn9132-db.dtsi | 8 ++++---- 10 files changed, 58 insertions(+), 58 deletions(-) commit dfa2854cbf92831ef492bd848eb4c2b0834c332c Author: Ioana Ciornei Date: Thu Jul 7 12:14:36 2022 +0300 arch: arm64: dts: lx2160a-clearfog-itx: rename the sfp GPIO properties Rename the 'mod-def0-gpio' property to 'mod-def0-gpios' so that we use the preferred -gpios suffix. Also, with this change the dtb_check will not complain when trying to verify the DTS against the sff,sfp.yaml binding. Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7ff7c9922859838afa8cff55d6046f698016f19a Author: Ioana Ciornei Date: Thu Jul 7 12:14:35 2022 +0300 dt-bindings: net: sff,sfp: rename example dt nodes to be more generic Rename the dt nodes shown in the sff,sfp.yaml examples so that they are generic and not really tied to a specific platform. Signed-off-by: Ioana Ciornei Acked-by: Rob Herring Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/sff,sfp.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 70991f1e68589b2d26b0e0857da3629f4a658a4d Author: Ioana Ciornei Date: Thu Jul 7 12:14:34 2022 +0300 dt-bindings: net: convert sff,sfp to dtschema Convert the sff,sfp.txt bindings to the DT schema format. Also add the new path to the list of maintained files. Signed-off-by: Ioana Ciornei Reviewed-by: Rob Herring Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/sff,sfp.txt | 85 ------------ Documentation/devicetree/bindings/net/sff,sfp.yaml | 142 +++++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 143 insertions(+), 85 deletions(-) commit 4201d9ab3e42d9e2a20320b751a931e6239c0df2 Author: Roman Gushchin Date: Mon Jul 11 09:28:27 2022 -0700 bpf: reparent bpf maps on memcg offlining The memory consumed by a bpf map is always accounted to the memory cgroup of the process which created the map. The map can outlive the memory cgroup if it's used by processes in other cgroups or is pinned on bpffs. In this case the map pins the original cgroup in the dying state. For other types of objects (slab objects, non-slab kernel allocations, percpu objects and recently LRU pages) there is a reparenting process implemented: on cgroup offlining charged objects are getting reassigned to the parent cgroup. Because all charges and statistics are fully recursive it's a fairly cheap operation. For efficiency and consistency with other types of objects, let's do the same for bpf maps. Fortunately thanks to the objcg API, the required changes are minimal. Please, note that individual allocations (slabs, percpu and large kmallocs) already have the reparenting mechanism. This commit adds it to the saved map->memcg pointer by replacing it to map->objcg. Because dying cgroups are not visible for a user and all charges are recursive, this commit doesn't bring any behavior changes for a user. v2: added a missing const qualifier Signed-off-by: Roman Gushchin Reviewed-by: Shakeel Butt Link: https://lore.kernel.org/r/20220711162827.184743-1-roman.gushchin@linux.dev Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 2 +- kernel/bpf/syscall.c | 36 ++++++++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 9 deletions(-) commit b624ae35418ce9424f639f8ffa2568e7674c262b Author: Sean Christopherson Date: Mon Jul 11 22:57:52 2022 +0000 KVM: selftests: Provide valid inputs for MONITOR/MWAIT regs Provide valid inputs for RAX, RCX, and RDX when testing whether or not KVM injects a #UD on MONITOR/MWAIT. SVM has a virtualization hole and checks for _all_ faults before checking for intercepts, e.g. MONITOR with an unsupported RCX will #GP before KVM gets a chance to intercept and emulate. Fixes: 2325d4dd7321 ("KVM: selftests: Add MONITOR/MWAIT quirk test") Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220711225753.1073989-3-seanjc@google.com tools/testing/selftests/kvm/x86_64/monitor_mwait_test.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 874190fd4ee894bbbcc0d4df4c55ebf93af9c011 Author: Sean Christopherson Date: Mon Jul 11 22:57:51 2022 +0000 KVM: selftests: Test MONITOR and MWAIT, not just MONITOR for quirk Fix a copy+paste error in monitor_mwait_test by switching one of the two "monitor" instructions to an "mwait". The intent of the test is very much to verify the quirk handles both MONITOR and MWAIT. Fixes: 2325d4dd7321 ("KVM: selftests: Add MONITOR/MWAIT quirk test") Reported-by: Yuan Yao Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220711225753.1073989-2-seanjc@google.com tools/testing/selftests/kvm/x86_64/monitor_mwait_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79f772b9e8004c542cc88aaf680189c3f6e9a0f2 Author: Sean Christopherson Date: Tue Jun 14 22:56:15 2022 +0000 KVM: x86: Query vcpu->vcpu_idx directly and drop its accessor, again Read vcpu->vcpu_idx directly instead of bouncing through the one-line wrapper, kvm_vcpu_get_idx(), and drop the wrapper. The wrapper is a remnant of the original implementation and serves no purpose; remove it (again) before it gains more users. kvm_vcpu_get_idx() was removed in the not-too-distant past by commit 4eeef2424153 ("KVM: x86: Query vcpu->vcpu_idx directly and drop its accessor"), but was unintentionally re-introduced by commit a54d806688fe ("KVM: Keep memslots in tree-based structures instead of array-based ones"), likely due to a rebase goof. The wrapper then managed to gain users in KVM's Xen code. No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Link: https://lore.kernel.org/r/20220614225615.3843835-1-seanjc@google.com arch/x86/kvm/xen.c | 10 +++++----- include/linux/kvm_host.h | 5 ----- 2 files changed, 5 insertions(+), 10 deletions(-) commit 6e1d2a3f25d518cc3d9703115c6fbec704a6c5bb Author: Hou Wenlong Date: Fri Jul 1 17:24:13 2022 +0800 KVM: x86/mmu: Replace UNMAPPED_GVA with INVALID_GPA for gva_to_gpa() The result of gva_to_gpa() is physical address not virtual address, it is odd that UNMAPPED_GVA macro is used as the result for physical address. Replace UNMAPPED_GVA with INVALID_GPA and drop UNMAPPED_GVA macro. No functional change intended. Signed-off-by: Hou Wenlong Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/6104978956449467d3c68f1ad7f2c2f6d771d0ee.1656667239.git.houwenlong.hwl@antgroup.com Signed-off-by: Sean Christopherson arch/x86/include/asm/kvm_host.h | 1 - arch/x86/kvm/mmu/paging_tmpl.h | 6 +++--- arch/x86/kvm/vmx/sgx.c | 2 +- arch/x86/kvm/x86.c | 18 +++++++++--------- 4 files changed, 13 insertions(+), 14 deletions(-) commit d673532dafe09c0168d0515afb49d48e268b95eb Merge: f16214c102f0 a9d2fae89fa8 Author: Alexei Starovoitov Date: Tue Jul 12 15:27:19 2022 -0700 Merge branch 'bpf: add a ksym BPF iterator' Alan Maguire says: ==================== a ksym BPF iterator would be useful as it would allow more flexible interactions with kernel symbols than are currently supported; it could for example create more efficient map representations for lookup, speed up symbol resolution etc. The idea was initially discussed here [1]. Changes since v5 [2]: - no need to add kallsym_iter to bpf_iter.h as it has existed in kernels for a long time so will by in vmlinux.h for older kernels too, unlike struct bpf_iter__ksym (Yonghong, patch 2) Changes since v4 [3]: - add BPF_ITER_RESCHED to improve responsiveness (Hao, patch 1) - remove pr_warn to be consistent with other iterators (Andrii, patch 1) - add definitions to bpf_iter.h to ensure iter tests build on older kernels (Andrii, patch 2) Changes since v3 [4]: - use late_initcall() to register iter; means we are both consistent with other iters and can encapsulate all iter-specific code in kallsyms.c in CONFIG_BPF_SYSCALL (Alexei, Yonghong, patch 1). Changes since v2 [5]: - set iter->show_value on initialization based on current creds and use it in selftest to determine if we show values (Yonghong, patches 1/2) - inline iter registration into kallsyms_init (Yonghong, patch 1) Changes since RFC [6]: - change name of iterator (and associated structures/fields) to "ksym" (Andrii, patches 1, 2) - remove dependency on CONFIG_PROC_FS; it was used for other BPF iterators, and I assumed it was needed because of seq ops but I don't think it is required on digging futher (Andrii, patch 1) [1] https://lore.kernel.org/all/YjRPZj6Z8vuLeEZo@krava/ [2] https://lore.kernel.org/bpf/1657490998-31468-1-git-send-email-alan.maguire@oracle.com/ [3] https://lore.kernel.org/bpf/1657113391-5624-1-git-send-email-alan.maguire@oracle.com/ [4] https://lore.kernel.org/bpf/1656942916-13491-1-git-send-email-alan.maguire@oracle.com [5] https://lore.kernel.org/bpf/1656667620-18718-1-git-send-email-alan.maguire@oracle.com/ [6] https://lore.kernel.org/all/1656089118-577-1-git-send-email-alan.maguire@oracle.com/ ==================== Signed-off-by: Alexei Starovoitov commit a9d2fae89fa8eb638203d8a4da435c647c12dfa3 Author: Alan Maguire Date: Tue Jul 12 13:31:45 2022 +0100 selftests/bpf: add a ksym iter subtest add subtest verifying BPF ksym iter behaviour. The BPF ksym iter program shows an example of dumping a format different to /proc/kallsyms. It adds KIND and MAX_SIZE fields which represent the kind of symbol (core kernel, module, ftrace, bpf, or kprobe) and the maximum size the symbol can be. The latter is calculated from the difference between current symbol value and the next symbol value. The key benefit for this iterator will likely be supporting in-kernel data-gathering rather than dumping symbol details to userspace and parsing the results. Signed-off-by: Alan Maguire Acked-by: Yonghong Song Link: https://lore.kernel.org/r/1657629105-7812-3-git-send-email-alan.maguire@oracle.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 16 +++++ tools/testing/selftests/bpf/progs/bpf_iter.h | 7 +++ tools/testing/selftests/bpf/progs/bpf_iter_ksym.c | 74 +++++++++++++++++++++++ 3 files changed, 97 insertions(+) commit 647cafa22349026a8435030e9157074ab7fe5710 Author: Alan Maguire Date: Tue Jul 12 13:31:44 2022 +0100 bpf: add a ksym BPF iterator add a "ksym" iterator which provides access to a "struct kallsym_iter" for each symbol. Intent is to support more flexible symbol parsing as discussed in [1]. [1] https://lore.kernel.org/all/YjRPZj6Z8vuLeEZo@krava/ Suggested-by: Alexei Starovoitov Signed-off-by: Alan Maguire Acked-by: Yonghong Song Link: https://lore.kernel.org/r/1657629105-7812-2-git-send-email-alan.maguire@oracle.com Signed-off-by: Alexei Starovoitov kernel/kallsyms.c | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) commit ab3edc679c552a466e4bf0b11af3666008bd65a2 Author: Andrzej Hajda Date: Fri Jun 24 13:35:28 2022 +0200 drm/i915/selftests: fix subtraction overflow bug On some machines hole_end can be small enough to cause subtraction overflow. On the other side (addr + 2 * min_alignment) can overflow in case of mock tests. This patch should handle both cases. Fixes: e1c5f754067b59 ("drm/i915: Avoid overflow in computing pot_hole loop termination") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3674 Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20220624113528.2159210-1-andrzej.hajda@intel.com Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96388f57d2aad9836b2c589181fa1dbaba4066b4 Author: Uros Bizjak Date: Tue Jul 12 17:44:55 2022 +0200 blk-cgroup: Use atomic{,64}_try_cmpxchg Use atomic_try_cmpxchg instead of atomic_cmpxchg (*ptr, old, new) == old in blkcg_unuse_delay, blkcg_set_delay and blkcg_clear_delay and atomic64_try_cmpxchg in blkcg_scale_delay. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). Also, atomic_try_cmpxchg implicitly assigns old *ptr value to "old" when cmpxchg fails, enabling further code simplifications. No functional change intended. Signed-off-by: Uros Bizjak Cc: Jens Axboe Link: https://lore.kernel.org/r/20220712154455.66868-1-ubizjak@gmail.com Signed-off-by: Jens Axboe block/blk-cgroup.c | 2 +- block/blk-cgroup.h | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) commit aee8960c2eae12636040dbf0f04e135273b1612d Author: Uros Bizjak Date: Tue Jul 12 17:19:47 2022 +0200 blk-iolatency: Use atomic{,64}_try_cmpxchg Use atomic_try_cmpxchg instead of atomic_cmpxchg (*ptr, old, new) == old in check_scale_change and atomic64_try_cmpxchg in blkcg_iolatency_done_bio. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). No functional change intended. Signed-off-by: Uros Bizjak Cc: Jens Axboe Link: https://lore.kernel.org/r/20220712151947.6783-1-ubizjak@gmail.com Signed-off-by: Jens Axboe block/blk-iolatency.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit c877bed82e1017c102c137d432933ccbba92c119 Author: Chris Wilson Date: Fri Jul 8 16:20:13 2022 +0200 drm/i915/gt: Only kick the signal worker if there's been an update One impact of commit 047a1b877ed4 ("dma-buf & drm/amdgpu: remove dma_resv workaround") is that it stores many, many more fences. Whereas adding an exclusive fence used to remove the shared fence list, that list is now preserved and the write fences included into the list. Not just a single write fence, but now a write/read fence per context. That causes us to have to track more fences than before (albeit half of those are redundant), and we trigger more interrupts for multi-engine workloads. As part of reducing the impact from handling more signaling, we observe we only need to kick the signal worker after adding a fence iff we have good cause to believe that there is work to be done in processing the fence i.e. we either need to enable the interrupt or the request is already complete but we don't know if we saw the interrupt and so need to check signaling. References: 047a1b877ed4 ("dma-buf & drm/amdgpu: remove dma_resv workaround") Signed-off-by: Chris Wilson Signed-off-by: Karolina Drobnik Reviewed-by: Andi Shyti Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/d7b953c7a4ba747c8196a164e2f8c5aef468d048.1657289332.git.karolina.drobnik@intel.com drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1ea7fe77c0db843d8e5f96ff8535dfc941e88694 Author: Chris Wilson Date: Fri Jul 8 16:20:12 2022 +0200 drm/i915: Bump GT idling delay to 2 jiffies In monitoring a transcode pipeline that is latency sensitive (it waits between submitting frames, and each frame requires work on rcs/vcs/vecs engines), it is found that it took longer than a single jiffy for it to sustain its workload. Allowing an extra jiffy headroom for the userspace prevents us from prematurely parking and having to exit powersaving immediately. Link: https://gitlab.freedesktop.org/drm/intel/-/issues/6284 Signed-off-by: Chris Wilson Signed-off-by: Karolina Drobnik Reviewed-by: Rodrigo Vivi Reviewed-by: Andi Shyti Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/e37911ec087a9ce50630d6faf61fa2c0d5f96d44.1657289332.git.karolina.drobnik@intel.com drivers/gpu/drm/i915/i915_active.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 394e2b57a989113de494c52d4683444bcb02d4e1 Author: Chris Wilson Date: Fri Jul 8 16:20:11 2022 +0200 drm/i915/gem: Look for waitboosting across the whole object prior to individual waits We employ a "waitboost" heuristic to detect when userspace is stalled waiting for results from earlier execution. Under latency sensitive work mixed between the gpu/cpu, the GPU is typically under-utilised and so RPS sees that low utilisation as a reason to downclock the frequency, causing longer stalls and lower throughput. The user left waiting for the results is not impressed. On applying commit 047a1b877ed4 ("dma-buf & drm/amdgpu: remove dma_resv workaround") it was observed that deinterlacing h264 on Haswell performance dropped by 2-5x. The reason being that the natural workload was not intense enough to trigger RPS (using HW evaluation intervals) to upclock, and so it was depending on waitboosting for the throughput. Commit 047a1b877ed4 ("dma-buf & drm/amdgpu: remove dma_resv workaround") changes the composition of dma-resv from keeping a single write fence + multiple read fences, to a single array of multiple write and read fences (a maximum of one pair of write/read fences per context). The iteration order was also changed implicitly from all-read fences then the single write fence, to a mix of write fences followed by read fences. It is that ordering change that belied the fragility of waitboosting. Currently, a waitboost is inspected at the point of waiting on an outstanding fence. If the GPU is backlogged such that we haven't yet stated the request we need to wait on, we force the GPU to upclock until the completion of that request. By changing the order in which we waited upon requests, we ended up waiting on those requests in sequence and as such we saw that each request was already started and so not a suitable candidate for waitboosting. Instead of asking whether to boost each fence in turn, we can look at whether boosting is required for the dma-resv ensemble prior to waiting on any fence, making the heuristic more robust to the order in which fences are stored in the dma-resv. Reported-by: Thomas Voegtle Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6284 Fixes: 047a1b877ed4 ("dma-buf & drm/amdgpu: remove dma_resv workaround") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Signed-off-by: Karolina Drobnik Tested-by: Thomas Voegtle Reviewed-by: Andi Shyti Acked-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/07e05518d9f6620d20cc1101ec1849203fe973f9.1657289332.git.karolina.drobnik@intel.com drivers/gpu/drm/i915/gem/i915_gem_wait.c | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 33da97894758737895e90c909f16786052680ef4 Author: Chris Wilson Date: Tue Jul 12 16:21:33 2022 +0100 drm/i915/gt: Serialize TLB invalidates with GT resets Avoid trying to invalidate the TLB in the middle of performing an engine reset, as this may result in the reset timing out. Currently, the TLB invalidate is only serialised by its own mutex, forgoing the uncore lock, but we can take the uncore->lock as well to serialise the mmio access, thereby serialising with the GDRST. Tested on a NUC5i7RYB, BIOS RYBDWi35.86A.0380.2019.0517.1530 with i915 selftest/hangcheck. Cc: stable@vger.kernel.org # v4.4 and upper Fixes: 7938d61591d3 ("drm/i915: Flush TLBs before releasing backing store") Reported-by: Mauro Carvalho Chehab Tested-by: Mauro Carvalho Chehab Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Andi Shyti Acked-by: Thomas Hellström Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1e59a7c45dd919a530256b9ac721ac6ea86c0677.1657639152.git.mchehab@kernel.org drivers/gpu/drm/i915/gt/intel_gt.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 336561a914fc0c6f1218228718f633b31b7af1c3 Author: Chris Wilson Date: Tue Jul 12 16:21:32 2022 +0100 drm/i915/gt: Serialize GRDOM access between multiple engine resets Don't allow two engines to be reset in parallel, as they would both try to select a reset bit (and send requests to common registers) and wait on that register, at the same time. Serialize control of the reset requests/acks using the uncore->lock, which will also ensure that no other GT state changes at the same time as the actual reset. Cc: stable@vger.kernel.org # v4.4 and upper Reported-by: Mika Kuoppala Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Reviewed-by: Andi Shyti Reviewed-by: Andrzej Hajda Acked-by: Thomas Hellström Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/e0a2d894e77aed7c2e36b0d1abdc7dbac3011729.1657639152.git.mchehab@kernel.org drivers/gpu/drm/i915/gt/intel_reset.c | 37 ++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) commit fb991f1942334b0cbf6aa6a88faa586ba22d3550 Author: Zheng Yejian Date: Thu Jun 30 09:31:52 2022 +0800 tracing/histograms: Simplify create_hist_fields() When I look into implements of create_hist_fields(), I think there can be following two simplifications: 1. If something wrong happened in parse_var_defs(), free_var_defs() would have been called in it, so no need goto free again after calling it; 2. After calling create_key_fields(), regardless of the value of 'ret', it then always runs into 'out: ', so the judge of 'ret' is redundant. Link: https://lkml.kernel.org/r/20220630013152.164871-1-zhengyejian1@huawei.com Signed-off-by: Zheng Yejian Reviewed-by: Tom Rix Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events_hist.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 94c255ac676fa922df3498608ead42b0a0c85122 Author: Xiang wangx Date: Mon Jun 6 10:30:07 2022 +0800 tracing/user_events: Fix syntax errors in comments Delete the redundant word 'have'. Link: https://lkml.kernel.org/r/20220606023007.23377-1-wangxiang@cdjrlc.com Signed-off-by: Xiang wangx Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96c1bbda5e23a83eed97aa97bd8ce902e237a723 Merge: e2782fa76435 76f11e77f919 Author: Arnd Bergmann Date: Tue Jul 12 23:10:28 2022 +0200 Merge tag 'qcom-arm64-defconfig-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig Qualcomm ARM64 defconfig updates for v5.20 This enables the drivers for the Light Pulse Generator and Bandwidth Monitor hardware, found in a wide variety of Qualcomm PMICs and SoCs. It enables interconnect providers for MSM8996, QCS404 and SC7180 and it enables the USB PHYs for the QCS404 platform. * tag 'qcom-arm64-defconfig-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: enable Qualcomm Bandwidth Monitor arm64: defconfig: Enable qcom interconnect drivers arm64: defconfig: Enable qcom ss & hs usb phy arm64: defconfig: enable Qualcomm LPG leds driver Link: https://lore.kernel.org/r/20220712031812.1275182-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit e2782fa7643590a1af00fc252f36274ccc75bae7 Merge: 14376871658a d0ceb08048d3 Author: Arnd Bergmann Date: Tue Jul 12 23:09:06 2022 +0200 Merge tag 'arm-soc/for-5.20/defconfig-arm64' of https://github.com/Broadcom/stblinux into arm/defconfig This pull request contains Broadcom ARM64-based SoCs defconfig changes for 5.10, please pull the following: - Nicolas enables CONFIG_DRM_V3D in order for the Raspberry Pi 4 systems to load the proper GPU module driver - William enables the newly introduced CONFIG_ARCH_BCMBCA 64-bit ARM counterpart to support the newly added BCA SocS * tag 'arm-soc/for-5.20/defconfig-arm64' of https://github.com/Broadcom/stblinux: arm64: defconfig: Enable DRM_V3D arm64: defconfig: enable bcmbca soc support Link: https://lore.kernel.org/r/20220711164451.3542127-3-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 14376871658a2bb6110f55c8b2a4206a087f3e13 Merge: 01b66d2b33cc a65ee523a9e4 Author: Arnd Bergmann Date: Tue Jul 12 23:07:46 2022 +0200 Merge tag 'arm-soc/for-5.20/defconfig' of https://github.com/Broadcom/stblinux into arm/defconfig This pull request contains ARM SoCs defconfig changes for 5.20, please pull the following: - Peter enables CONFIG_DRM_V3D in order for the Raspberry Pi 4 systems to load the proper GPU module driver - William updates the multi_v7_defconfig to replace the enabling of CONFIG_ARCH_BCM_63XX with CONFIG_ARCH_BCMBCA which is how this platform is now supported * tag 'arm-soc/for-5.20/defconfig' of https://github.com/Broadcom/stblinux: ARM: multi_v7_defconfig: Update configs for BCM63138 ARM: configs: Enable DRM_V3D Link: https://lore.kernel.org/r/20220711164451.3542127-2-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 5eb1c7def66349a5c3a80b7d450d0ed1f56141eb Author: Sibi Sankar Date: Tue Jul 5 17:02:01 2022 +0530 dt-bindings: remoteproc: qcom: Convert SC7180 MSS bindings to YAML Add a separate YAML binding to act as a superset of the PAS and non-PAS compatible for SC7180 MSS PIL. This also serves as a way to increase readability. Signed-off-by: Sibi Sankar Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1657020721-24939-3-git-send-email-quic_sibis@quicinc.com .../devicetree/bindings/remoteproc/qcom,q6v5.txt | 20 +- .../bindings/remoteproc/qcom,sc7180-mss-pil.yaml | 245 +++++++++++++++++++++ 2 files changed, 247 insertions(+), 18 deletions(-) commit 01b66d2b33cc3ac176ac38694b800c859c488480 Merge: 8c1541b161a6 afff3d3aef14 Author: Arnd Bergmann Date: Tue Jul 12 23:06:31 2022 +0200 Merge tag 'imx-defconfig-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/defconfig i.MX defconfig update for 5.20: - Enable i.MX93 clock and pinctrl driver in arm64 defconfig. - Enable gpio-fan driver in arm64 defconfig, as it's needed by phyBOARD-Polis-i.MX8M Mini board. * tag 'imx-defconfig-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: defconfig: Enable gpio-fan support arm64: defconfig: enable i.MX93 clk & pinctrl Link: https://lore.kernel.org/r/20220709082951.15123-6-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 3abe6d654288553de0bf41da1491cfeee83777b7 Author: Sibi Sankar Date: Tue Jul 5 17:02:00 2022 +0530 dt-bindings: remoteproc: qcom: Convert SC7280 MSS bindings to YAML Add a separate YAML binding to act as a superset of the PAS and non-PAS compatible for SC7280 MSS PIL. This also serves as a way to increase readability. Signed-off-by: Sibi Sankar Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1657020721-24939-2-git-send-email-quic_sibis@quicinc.com .../devicetree/bindings/remoteproc/qcom,q6v5.txt | 31 +-- .../bindings/remoteproc/qcom,sc7280-mss-pil.yaml | 266 +++++++++++++++++++++ 2 files changed, 268 insertions(+), 29 deletions(-) commit 8c1541b161a6926648abe44df0da6d9acc55745d Merge: 2b4b612638b8 28b4dcc8f010 Author: Arnd Bergmann Date: Tue Jul 12 23:05:29 2022 +0200 Merge tag 'tegra-for-5.20-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/defconfig arm64: tegra: Default configuration updates for v5.20-rc1 Updates the arm64 default configuration to enable the OPE driver as a module. * tag 'tegra-for-5.20-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: defconfig: Build Tegra OPE module Link: https://lore.kernel.org/r/20220708185608.676474-8-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 2b4b612638b8e87719f82ab7a9cda8925375eef6 Merge: 89a24d7d85bd 900bd8cb8527 Author: Arnd Bergmann Date: Tue Jul 12 23:04:25 2022 +0200 Merge tag 'sunxi-config64-for-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/defconfig - enable Allwinner analogue audio codecs * tag 'sunxi-config64-for-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: defconfig: Enable Allwinner built in CODECs Link: https://lore.kernel.org/r/YsheC0hgyJB9kPsS@kista.localdomain Signed-off-by: Arnd Bergmann commit 3c37074f0d581b6c73f066b2ffab0c3d4826d623 Merge: 9bc697091a47 b9c2ae6cac40 Author: Arnd Bergmann Date: Tue Jul 12 23:01:24 2022 +0200 Merge tag 'qcom-drivers-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers Qualcomm driver updates for v5.20 This introduces a new driver that requests interconnect bandwidth based on throughput measurements of the bwmon hardware blocks found associated with, among other things, the CPU subsystem on many Qualcomm platforms. It introduces support for the SCM wrapper driver to vote for interconnect bandwidth for operations that needs bandwidth to the crypto engine. This ensures both performance and guards against issues caused by lacking votes for this path. The socinfo driver gains knowledge about the SC7180P SoC. It contains a range of fixes for spelling mistakes, refcount leaks in various drivers and removes some redundant code from the apr remove path. The SCM DT bindings are updated to declare support for QCS404, SM6125 and SDX65. The command db driver has a strncpy() converted to strscpy_pad() and then back again with proper documentation to why this was the right API. * tag 'qcom-drivers-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: soc: qcom: icc-bwmon: Add bandwidth monitoring driver dt-bindings: interconnect: qcom,msm8998-cpu-bwmon: add BWMON device soc/qcom: Make QCOM_RPMPD select PM_GENERIC_DOMAINS/_OF soc: qcom: aoss: Fix refcount leak in qmp_cooling_devices_register soc: qcom: llcc: Fix syntax errors in comments soc: qcom: ocmem: Fix refcount leak in of_get_ocmem dt-bindings: soc: qcom,wcnss: remove unneeded ref for names firmware: qcom_scm: Add bw voting support to the SCM interface dt-bindings: firmware: qcom-scm: Add interconnects property soc: qcom: cmd-db: replace strscpy_pad() with strncpy() dt-bindings: firmware: scm: Add compatible for SDX65 dt-bindings: arm: qcom: switch maintainer to Bjorn soc: qcom: rpmhpd: fix typos in comment soc: qcom: correct kerneldoc soc: qcom: cmd-db: replace strncpy() with strscpy_pad() firmware: qcom_scm-legacy: correct kerneldoc dt-bindings: firmware: document Qualcomm QCS404 and SM6125 SCM soc: qcom: apr: Drop redundant check in .remove() firmware: qcom_scm: drop unexpected word "the" soc: qcom: socinfo: Add an ID for sc7180P Link: https://lore.kernel.org/r/20220712021830.1271398-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit 9bc697091a475901526c43d195cb04944cfd1e6f Merge: 03e316033c45 ef4ef28acb42 Author: Arnd Bergmann Date: Tue Jul 12 22:59:08 2022 +0200 Merge tag 'arm-soc/for-5.20/drivers' of https://github.com/Broadcom/stblinux into arm/drivers This pull request contains Broadcom SoC drivers updatse for 5.20, please pull the following: - Julia fixes a typo in the Broadcom STB legacy power management code - Liang fixes a device_node reference count leak in the Broadcom STB BIU driver code error path(s) - Nicolas and Stefan provide updates to the BCM2835 power management driver allowing its use on BCM2711 (Raspberry Pi 4) and to enable the use of the V3D GPU driver on such platforms. This is a merge of an immutable branch from Lee Jones' MFD tree - William removes the use of CONFIG_ARCH_BCM_63XX which is removed and replaces the dependencies with CONFIG_ARCH_BCMBCA which is how all of the DSL/PON SoCs from Broadcom are now supported in the upstream kernel. * tag 'arm-soc/for-5.20/drivers' of https://github.com/Broadcom/stblinux: tty: serial: bcm63xx: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA spi: bcm63xx-hsspi: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA clk: bcm: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA hwrng: bcm2835: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA phy: brcm-sata: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA i2c: brcmstb: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA ata: ahci_brcm: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA soc: bcm: bcm2835-power: Bypass power_on/off() calls soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB soc: bcm: bcm2835-power: Resolve ASB register macros soc: bcm: bcm2835-power: Refactor ASB control mfd: bcm2835-pm: Add support for BCM2711 mfd: bcm2835-pm: Use 'reg-names' to get resources soc: bcm: brcmstb: biuctrl: Add missing of_node_put() soc: bcm: brcmstb: pm: pm-arm: fix typo in comment Link: https://lore.kernel.org/r/20220711164451.3542127-6-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 03e316033c45c463e875d1e72fac797e8bf612c6 Merge: 62fcbc5c5d10 63f981530751 Author: Arnd Bergmann Date: Tue Jul 12 22:56:11 2022 +0200 Merge tag 'imx-drivers-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/drivers i.MX drivers change for 5.20: - Update imx8m-blk-ctrl driver to print the name of the power domain, so that the error message becomes more useful. - Update the error messages in gpcv2 driver by printing the reason why a regulator fails to be enabled or disabled. - A series from Michael Walle to convert the guts driver from a platform driver to an core_initcall for getting rid of all those global static variables. - A couple of follow-up fixes on guts driver series. * tag 'imx-drivers-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: fsl: guts: check return value after calling of_iomap() in fsl_guts_get_soc_uid() soc: fsl: guts: fix return value check in fsl_guts_init() soc: imx: imx8m-blk-ctrl: Make error prints useful soc: fsl: guts: add serial_number support soc: fsl: guts: drop platform driver soc: fsl: guts: use of_root instead of own reference soc: fsl: guts: allocate soc_dev_attr on the heap soc: fsl: guts: embed fsl_guts_get_svr() in probe() soc: fsl: guts: remove module_exit() and fsl_guts_remove() soc: fsl: guts: machine variable might be unset soc: imx: gpcv2: print errno for regulator errors Link: https://lore.kernel.org/r/20220709082951.15123-1-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 62fcbc5c5d10e7dafb5266a98c26ed2ddc5a78a7 Merge: f10c00ae8628 f16afe238a7f Author: Arnd Bergmann Date: Tue Jul 12 22:55:05 2022 +0200 Merge tag 'ti-driver-soc-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into arm/drivers TI Driver updates for v5.20 * pruss: Enable support for AM62, bindings cleanups * wkup_m3_ipc: cosmetic cleanup * tag 'ti-driver-soc-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: soc: ti: pruss: Enable support for PRUSS-M subsystem on K3 AM62x SoCs dt-bindings: soc: ti: pruss: Update bindings for K3 AM62x SoCs dt-bindings: soc: ti: pruss: Re-arrange "compatible" in alphabetic order soc: ti: wkup_m3_ipc: Remove unneeded semicolon Link: https://lore.kernel.org/r/20220708232655.reqjdbib52ejdja4@unadvised Signed-off-by: Arnd Bergmann commit f10c00ae862805adff40d8bfa107c692e6d3e257 Merge: 933edcde4383 5060237b0ee1 Author: Arnd Bergmann Date: Tue Jul 12 22:53:08 2022 +0200 Merge tag 'tegra-for-5.20-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers memory: tegra: Changes for v5.20-rc1 Add memory client definitions for the Multi-Gigabit Ethernet (MGBE) controllers found on Tegra234. * tag 'tegra-for-5.20-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: memory: tegra: Add MGBE memory clients for Tegra234 dt-bindings: arm: tegra: Add NVIDIA Tegra234 CBB 2.0 binding dt-bindings: arm: tegra: Add NVIDIA Tegra194 AXI2APB binding dt-bindings: arm: tegra: Add NVIDIA Tegra194 CBB 1.0 binding dt-bindings: memory: Add Tegra234 MGBE memory clients dt-bindings: Add Tegra234 MGBE clocks and resets dt-bindings: power: Add Tegra234 MGBE power domains dt-bindings: Add headers for Tegra234 GPCDMA Link: https://lore.kernel.org/r/20220708185608.676474-5-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 933edcde4383ca4b3a4bcd07a7855b09ca10e59d Merge: ff6c226953b1 afcdb8e55c91 Author: Arnd Bergmann Date: Tue Jul 12 22:52:21 2022 +0200 Merge tag 'tegra-for-5.20-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers firmware: tegra: Changes for v5.20-rc1 Contains a fix that avoids unaligned accesses to IPC memory, which in turn helps in suppressing speculative reads from out-of-bounds memory. Another patch performs some minor cleanup around debugfs API usage. * tag 'tegra-for-5.20-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: Fix error check return value of debugfs_create_file() firmware: tegra: bpmp: Do only aligned access to IPC memory area Link: https://lore.kernel.org/r/20220708185608.676474-3-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 50e8ca0b675add8eb0e95938448a4a0f9fb0b6dd Author: Eric Huang Date: Mon Jul 11 14:10:55 2022 -0400 drm/amdkfd: bump KFD version for unified ctx save/restore memory To expose unified memory for ctx save/resotre area feature availablity to libhsakmt. Proposed userspace: https://patchwork.freedesktop.org/series/106218/ Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher include/uapi/linux/kfd_ioctl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 80fb575678b488b920cd9100939b60d480101907 Author: Samson Tam Date: Mon Apr 11 15:38:48 2022 -0400 drm/amd/display: fix unnecessary pipe split playing NV12 1080p MPO video [Why] When playing NV12 1080p MPO video, it is pipe splitting so we see two pipes in fullscreen and four pipes in windowed mode. Pipe split is happening because we are setting MaximumMPCCombine = 1 [How] Algorithm for MaximumMPCCombine has extra conditions we do not need. Use DCN31 algorithm instead Signed-off-by: Samson Tam Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 31 +++------------------- 1 file changed, 3 insertions(+), 28 deletions(-) commit 59a1e9ed1b406b1ae7cbbc612ce00d459987d028 Author: Ilya Bakoulin Date: Thu Jun 9 18:45:04 2022 -0400 drm/amd/display: Fix black screen when disabling Freesync in OSD [Why] Black screen encountered when disabling Freesync through OSD on some displays. [How] Set the should_disable flag when new top pipe has no plane state to ensure that pipes get cleaned up. Reviewed-by: Chris Park Acked-by: Solomon Chiu Signed-off-by: Ilya Bakoulin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e2facd575fdf13b718f6c833ed546467a3e6e3ba Author: Robin Chen Date: Tue Jun 21 00:18:55 2022 +0800 drm/amd/display: Disable PSRSU when DSC enabled on the specific sink [Why] Some specific sink is not able to support PSRSU when DSC is turned on. For this case, fall-back to use PSR1. Reviewed-by: Anthony Koo Acked-by: Solomon Chiu Signed-off-by: Robin Chen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../drm/amd/display/modules/power/power_helpers.c | 33 +++++++++++----------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 922e7ee31defe461d8638f1277f0c8215c0707e6 Author: Wayne Lin Date: Wed Jun 22 19:36:49 2022 +0800 drm/amd/display: Clear edid when unplug mst connector [Why] When unplug one sst monitor from a mst hub and plug in the same port with another sst monitor, we don't read the corresponding edid. That's because we detect there is already an edid stored in aconnector->edid which is a stale one. [How] Clean up aconnector->edid when unplug mst connector. Reviewed-by: Hersen Wu Acked-by: Solomon Chiu Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 ++ 1 file changed, 2 insertions(+) commit 9dfc3ee1b0f22d9415c9b7c316447d47d4a702d1 Author: Samson Tam Date: Fri Jun 17 23:00:30 2022 -0400 drm/amd/display: Fix windowed MPO video with ODM combine for DCN32 [Why] In single display configuration, windowed MPO does not work with ODM combine. [How] For ODM + MPO window on one half of ODM, only 3 pipes should be allocated and scaling parameters adjusted to handle this case. Otherwise, we use 4 pipes. Move copy_surface_update_to_plane() before dc_add_plane_to_context() so that it gets the updated rect information when setting up the pipes. Add dc_check_boundary_crossing_for_windowed_mpo_with_odm() to force a full update when we cross a boundary requiring us to reconfigure the number of pipes between 3 and 4 pipes. Set config.enable_windowed_mpo_odm to true when we have the debug.enable_single_display_2to1_odm_policy set to true. Don't fail validating ODM with windowed MPO if config.enable_windowed_mpo_odm is true. Reviewed-by: Aric Cyr Acked-by: Solomon Chiu Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 94 ++++++++++++++++++ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 115 ++++++++++++++++++---- 2 files changed, 188 insertions(+), 21 deletions(-) commit 149f6d1a6035a7aa6595ac6eeb9c8f566b2103cd Author: Saaem Rizvi Date: Mon Jun 20 10:25:19 2022 -0400 drm/amd/display: Removing assert statements for Linux [WHY] Assert statements causing several bugs on Linux DM [HOW] Removing assert statement for Linux DM (ASSERT(result == VBIOSSMC_Result_OK)). Also adding logging statements for setting dcfclk. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=216092 Fixes: c1b972a18d05 ("drm/amd/display: Insert pulling smu busy status before sending another request") Reviewed-by: Gabe Teeger Acked-by: Solomon Chiu Signed-off-by: Saaem Rizvi Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c | 8 ++++++-- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/dcn301_smu.c | 7 ++++++- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c | 8 ++++++-- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_smu.c | 8 ++++++-- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.c | 8 ++++++-- 5 files changed, 30 insertions(+), 9 deletions(-) commit 90bb21cb692ead906738d314f3dcdc432aaee015 Author: Muhammad Ansari Date: Mon Jun 20 17:49:35 2022 -0400 drm/amd/display: Helper function for ALPM initialization [WHY] Needed a helper function for ALPM DPCD initialization [HOW] Refactoring to put ALPM initialization in a helper function Reviewed-by: Anthony Koo Acked-by: Solomon Chiu Signed-off-by: Muhammad Ansari Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 27 +++++++++++++++++---------- drivers/gpu/drm/amd/display/dc/dc_link.h | 2 ++ 2 files changed, 19 insertions(+), 10 deletions(-) commit 8a076bbcc1278c6256c57915bc193890a6432c6d Author: Wesley Chalmers Date: Mon Jun 20 17:19:11 2022 -0400 drm/amd/display: Check for DP2.0 when checking ODM combine [WHY] Certain DP 2.0 modes may fail validation if DP 2.0 is not considered for ODM combine. Reviewed-by: Wenjing Liu Acked-by: Solomon Chiu Signed-off-by: Wesley Chalmers Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c | 1 + 1 file changed, 1 insertion(+) commit 14eb72ff580de169212bfc5222499febd312a252 Author: Alvin Lee Date: Tue Jun 21 11:03:40 2022 -0400 drm/amd/display: Exit SubVP if MPO in use [Description] Exit SubVP if MPO is in use since SubVP + MPO together is not supported. - Don't add SubVP at validation time if we see MPO is in use Issues fixed in the SubVP / MPO transition: 1. Enable phantom pipes in post unlock function to prevent underflow when an active pipe is being transitioned to be a phantom pipe (VTG updates take place right away). Also must wait for VUPDATE of the main pipe to complete first 2. Don't wait for MPCC idle when transitioning a phantom pipe to an actual pipe. MPCC_STATUS is never asserted due to OTG being off for phantom pipes 3. When transitioning an active pipe to phantom, program DET right away (same as disabling the pipe) or the DET update will only take when the phantom pipe is enabled which can cause DET allocation errors. 4. For K1/K2 programming of phantom pipes, use same settings as the main pipe. Also don't program K1 / K2 = 0xF ever since the field is only 1 / 2 bits wide. Reviewed-by: Jun Lei Acked-by: Solomon Chiu Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 27 +++++--- drivers/gpu/drm/amd/display/dc/dc.h | 2 + .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 72 ++++++++++++++++++++-- 4 files changed, 92 insertions(+), 13 deletions(-) commit 939f9dd040fe1063d884f8f0f89b037093fe2341 Author: Uros Bizjak Date: Tue Jul 12 17:27:41 2022 +0200 block: Use try_cmpxchg in update_io_ticks Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in update_io_ticks. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). No functional change intended. Signed-off-by: Uros Bizjak Cc: Jens Axboe Link: https://lore.kernel.org/r/20220712152741.7324-1-ubizjak@gmail.com Signed-off-by: Jens Axboe block/blk-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4b1e27db49c8b985b116aa99481b4c6a4342ed4 Author: Uros Bizjak Date: Tue Jul 12 17:05:47 2022 +0200 block/rq_qos: Use atomic_try_cmpxchg in atomic_inc_below Use atomic_try_cmpxchg instead of atomic_cmpxchg (*ptr, old, new) == old in atomic_inc_below. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). Also, atomic_try_cmpxchg implicitly assigns old *ptr value to "old" when cmpxchg fails, enabling further code simplifications. No functional change intended. Signed-off-by: Uros Bizjak Cc: Jens Axboe Link: https://lore.kernel.org/r/20220712150547.5786-1-ubizjak@gmail.com Signed-off-by: Jens Axboe block/blk-rq-qos.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 636774860a6240dcb148f9a08d333a697f3c74f3 Author: Jack Xiao Date: Fri Jul 8 16:01:36 2022 +0800 drm/amdgpu/mes: set correct mes ring ready flag Set corresponding ready flag for mes ring when enable or disable mes ring. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 3 +++ drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 3 +++ 2 files changed, 6 insertions(+) commit ac9257f0f50871b7459dac48a5c11bc7b2094245 Author: xinhui pan Date: Fri Jul 8 09:22:44 2022 +0800 drm/amdgpu: Remove one duplicated ef removal That has been done in BO release notify. Signed-off-by: xinhui pan Acked-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 6 ------ 1 file changed, 6 deletions(-) commit 73b4fc92f97d775da26d86d2732497be6c610ec6 Author: Christophe Leroy Date: Tue Jul 12 07:52:33 2022 +0200 module: Move module's Kconfig items in kernel/module/ In init/Kconfig, the part dedicated to modules is quite large. Move it into a dedicated Kconfig in kernel/module/ MODULES_TREE_LOOKUP was outside of the 'if MODULES', but as it is only used when MODULES are set, move it in with everything else to avoid confusion. MODULE_SIG_FORMAT is left in init/Kconfig because this configuration item is not used in kernel/modules/ but in kernel/ and can be selected independently from CONFIG_MODULES. It is for instance selected from security/integrity/ima/Kconfig. Signed-off-by: Christophe Leroy Signed-off-by: Luis Chamberlain init/Kconfig | 293 +------------------------------------------------- kernel/module/Kconfig | 293 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 294 insertions(+), 292 deletions(-) commit 156b9d76e8822f2956c15029acf2d4b171502f3a Author: Vitaly Kuznetsov Date: Tue Jul 12 15:50:09 2022 +0200 KVM: nVMX: Always enable TSC scaling for L2 when it was enabled for L1 Windows 10/11 guests with Hyper-V role (WSL2) enabled are observed to hang upon boot or shortly after when a non-default TSC frequency was set for L1. The issue is observed on a host where TSC scaling is supported. The problem appears to be that Windows doesn't use TSC scaling for its guests, even when the feature is advertised, and KVM filters SECONDARY_EXEC_TSC_SCALING out when creating L2 controls from L1's VMCS. This leads to L2 running with the default frequency (matching host's) while L1 is running with an altered one. Keep SECONDARY_EXEC_TSC_SCALING in secondary exec controls for L2 when it was set for L1. TSC_MULTIPLIER is already correctly computed and written by prepare_vmcs02(). Signed-off-by: Vitaly Kuznetsov Fixes: d041b5ea93352b ("KVM: nVMX: Enable nested TSC scaling") Cc: stable@vger.kernel.org Reviewed-by: Maxim Levitsky Link: https://lore.kernel.org/r/20220712135009.952805-1-vkuznets@redhat.com Signed-off-by: Sean Christopherson arch/x86/kvm/vmx/nested.c | 1 - 1 file changed, 1 deletion(-) commit 06d9fb48a80ca6e5a682889096e767ac125aa1b4 Author: Jiang Jian Date: Wed Jun 22 23:55:43 2022 +0800 thermal: intel: x86_pkg_temp_thermal: Drop duplicate 'is' from comment There is an unexpected word 'is' in a comments that need to be dropped file: ./drivers/thermal/intel/x86_pkg_temp_thermal.c line: 108 * tj-max is is interesting because threshold is set relative to this changed to: * tj-max is interesting because threshold is set relative to this Signed-off-by: Jiang Jian [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki drivers/thermal/intel/x86_pkg_temp_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e90651e52100ffb55828c0a6e4f1480eaa7b508 Merge: 4457fbd66bdb 15d8370cf6d5 Author: Mark Brown Date: Tue Jul 12 19:21:45 2022 +0100 ASoC: SOF: Intel: hda: Correct Firmware State Register use Merge series from Peter Ujfalusi : The FSR (Firmware State Register) holds the ROM state information, it does not contain error information. The FSR itself is a bit more complicated as well as the state depends on the module currently in use. The error code from ROM or the status code from the firmware is located at the next register. Fix the handling of the FSR in order to provide usable and human readable (in most cases) report on the status and error. commit 4457fbd66bdb93c739ce2404a97c510eaf65e244 Merge: 501935dae855 75b5b7a1ccf6 Author: Mark Brown Date: Tue Jul 12 19:21:43 2022 +0100 Extend ipc stream parameters sent to DSP Merge series from Daniel Baluta Daniel Baluta : From: Daniel Baluta We need a way to send extra parameters to DSP firmware. In order to do this, we introduce ext_data array at the end of ipc_stream_params. With this new addition we can send compress parameters. This requires SOF ABI bump. commit 501935dae855a469d7529500c450c550acc6e633 Merge: 274a3e6f9868 1549a69b89b7 Author: Mark Brown Date: Tue Jul 12 19:21:42 2022 +0100 ASoC: SOF: Intel: Do not process IPC reply before firmware boot Merge series from Peter Ujfalusi : By mistake a developer managed to create a 'corrupted' IPC4 firmware image which loaded fine to the DSP and after boot it sent an IPC reply before we would have received the FW_READY message. It turned out that the image was an IPC3 firmware and the IPC reply was the IPC3 FW_READY notification message which got understood as an IPC4 reply message due to the difference between the two IPC mechanism. This caused a NULL pointer dereference since the reply memory will be allocated after the FW_READY message. To make sure this will not bite again, skip any spurious reply messages before the FW_READY. commit 274a3e6f98682ccad508a108312cfb5fb7c7553a Merge: d5bd47f3ca12 fbabebfb26a8 Author: Mark Brown Date: Tue Jul 12 19:21:41 2022 +0100 ASoC: SOF: Intel: hda-dai: No need to decouple host/link DMA twice Merge series from Peter Ujfalusi : There is no need to decouple a decoupled stream twice. Keep the decoupling in hda_link_stream_assign() only as it is going to be executed in all cases. Drop the outdated comment from hda_link_dma_hw_params() as well since the code has changed around it. commit ba13d4575da5e656a3cbc18583e0da5c5d865417 Author: Bjorn Helgaas Date: Fri Jun 24 16:27:19 2022 -0500 PCI/ASPM: Unexport pcie_aspm_support_enabled() pcie_aspm_support_enabled() is used only by the acpi/pci_root.c driver, which cannot be built as a module, so it does not need to be exported. Unexport it. Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki drivers/pci/pcie/aspm.c | 1 - 1 file changed, 1 deletion(-) commit c01147d929899f02a0a8b15e406d12784768ca72 Author: Darrick J. Wong Date: Sat Jul 9 10:56:07 2022 -0700 xfs: replace inode fork size macros with functions Replace the shouty macros here with typechecked helper functions. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_attr_leaf.c | 2 +- fs/xfs/libxfs/xfs_bmap.c | 6 +++--- fs/xfs/libxfs/xfs_bmap_btree.c | 2 +- fs/xfs/libxfs/xfs_dir2.c | 2 +- fs/xfs/libxfs/xfs_dir2_block.c | 4 ++-- fs/xfs/libxfs/xfs_dir2_sf.c | 6 +++--- fs/xfs/libxfs/xfs_inode_fork.c | 10 +++++----- fs/xfs/libxfs/xfs_inode_fork.h | 15 +-------------- fs/xfs/scrub/symlink.c | 4 ++-- fs/xfs/xfs_bmap_util.c | 4 ++-- fs/xfs/xfs_inode.h | 35 +++++++++++++++++++++++++++++++++++ fs/xfs/xfs_inode_item.c | 4 ++-- fs/xfs/xfs_itable.c | 2 +- fs/xfs/xfs_symlink.c | 2 +- fs/xfs/xfs_trace.h | 2 +- 15 files changed, 61 insertions(+), 39 deletions(-) commit 932b42c66cb5d0ca9800b128415b4ad6b1952b3e Author: Darrick J. Wong Date: Sat Jul 9 10:56:06 2022 -0700 xfs: replace XFS_IFORK_Q with a proper predicate function Replace this shouty macro with a real C function that has a more descriptive name. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_attr.c | 4 ++-- fs/xfs/libxfs/xfs_attr.h | 2 +- fs/xfs/libxfs/xfs_bmap.c | 4 ++-- fs/xfs/libxfs/xfs_inode_fork.c | 2 +- fs/xfs/libxfs/xfs_inode_fork.h | 5 ++--- fs/xfs/scrub/btree.c | 2 +- fs/xfs/xfs_attr_inactive.c | 4 ++-- fs/xfs/xfs_bmap_util.c | 10 +++++----- fs/xfs/xfs_inode.c | 10 +++++----- fs/xfs/xfs_inode.h | 7 ++++++- fs/xfs/xfs_inode_item.c | 4 ++-- fs/xfs/xfs_iomap.c | 2 +- fs/xfs/xfs_iops.c | 2 +- 13 files changed, 31 insertions(+), 27 deletions(-) commit d17e37c41b7ed38459957a5d2968ba61516fd5c2 Author: Liang He Date: Sat Jul 2 09:44:49 2022 +0800 of: device: Fix missing of_node_put() in of_dma_set_restricted_buffer We should use of_node_put() for the reference 'node' returned by of_parse_phandle() which will increase the refcount. Fixes: fec9b625095f ("of: Add plumbing for restricted DMA pool") Co-authored-by: Miaoqian Lin Signed-off-by: Liang He Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220702014449.263772-1-windhl@126.com drivers/of/device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d5bd47f3ca124058a8e87eae4508afeda2132611 Author: Peter Ujfalusi Date: Tue Jul 12 16:01:03 2022 +0300 ASoC: SOF: ipc3-topology: Prevent double freeing of ipc_control_data via load_bytes We have sanity checks for byte controls and if any of the fail the locally allocated scontrol->ipc_control_data is freed up, but not set to NULL. On a rollback path of the error the higher level code will also try to free the scontrol->ipc_control_data which will eventually going to lead to memory corruption as double freeing memory is not a good thing. Fixes: b5cee8feb1d4 ("ASoC: SOF: topology: Make control parsing IPC agnostic") Reported-by: Seppo Ingalsuo Signed-off-by: Peter Ujfalusi Reviewed-by: Seppo Ingalsuo Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220712130103.31514-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc3-topology.c | 1 + 1 file changed, 1 insertion(+) commit 9b93eda355089b36482f7a2f134bdd24be70f907 Author: Peter Ujfalusi Date: Tue Jul 12 16:10:22 2022 +0300 ASoC: SOF: sof-client-probes: Only load the driver if IPC3 is used The current implementation of probes only supports IPC3 and should not be loaded for other IPC implementation. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220712131022.1124-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/sof-client-probes.c | 4 ++++ 1 file changed, 4 insertions(+) commit b7580e669ca0d624b122455058aa6fe62c0fef44 Author: Matt Roper Date: Fri Jul 8 14:58:03 2022 -0700 drm/i915/dg2: Add Wa_15010599737 This workaround may need to be extended to other platforms soon, but for now it's marked as DG2-specific. Signed-off-by: Matt Roper Reviewed-by: Arun R Murthy Link: https://patchwork.freedesktop.org/patch/msgid/20220708215804.2889246-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 3 +++ drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++ 2 files changed, 6 insertions(+) commit 8353813c88ef2186abf96715b5f29b191c9a7732 Author: Frank Li Date: Tue May 24 10:21:59 2022 -0500 PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities Some PCI Endpoint controllers integrate an eDMA (embedded DMA). eDMA can bypass the outbound memory address translation unit to access all RC memory space. Add eDMA support for pci-epf-test. Depending on HW availability, the EPF test can use either eDMA or general system DMA controllers to perform DMA. The test tries to use eDMA first and falls back to general system DMA controllers if there's no eDMA Separate dma_chan to dma_chan_tx and dma_chan_rx. Search for an eDMA channel first, then search for a memory-to-memory DMA channel. If general memory to memory channels are used, dma_chan_rx = dma_chan_tx. Add dma_addr_t dma_remote in pci_epf_test_data_transfer() because eDMA uses remote RC physical address directly. Add enum dma_transfer_direction dir in pci_epf_test_data_transfer() because eDMA chooses the correct RX/TX channel by dir. The overall steps are: 1. Execute dma_request_channel() and filter function to find correct eDMA RX and TX Channel. If a channel does not exist, fallback to try to allocate general memory to memory DMA channel. 2. Execute dmaengine_slave_config() to configure remote side physical address. 3. Execute dmaengine_prep_slave_single() to create transfer descriptor. 4. Execute tx_submit(). 5. Execute dma_async_issue_pending() [bhelgaas: squash in fix from Dan Carpenter : https://lore.kernel.org/r/Ys2GSTnZhuLzzQG5@kili, also previously posted by Peng Wu : https://lore.kernel.org/all/CANXvt5rK98-cEMgpzopY9POOK8a5=VDib8uKPLgJakOG=hRfwQ@mail.gmail.com/] Link: https://lore.kernel.org/r/20220524152159.2370739-9-Frank.Li@nxp.com Signed-off-by: Frank Li Signed-off-by: Bjorn Helgaas Acked-by: Manivannan Sadhasivam Acked-by: Kishon Vijay Abraham I Acked-By: Vinod Koul drivers/pci/endpoint/functions/pci-epf-test.c | 116 +++++++++++++++++++++++--- 1 file changed, 106 insertions(+), 10 deletions(-) commit 67e1b7700cb9cb5ca0cbdb2137533568b427e541 Merge: 98418a08a20d 57724db17a94 Author: Mark Brown Date: Tue Jul 12 16:10:05 2022 +0100 ASoC: SOF: Intel: hda: Use cold/purge boot after firmware crash Merge series from Peter Ujfalusi : In case of a firmware crash we force the DSP to be powered down and rebooted. To make sure that the next boot is going to be clean, force the boot process to skip the IMR booting and re-download the firmware. commit 08d0cc5f34265d1a1e3031f319f594bd1970976c Author: Kai-Heng Feng Date: Mon Jul 11 18:07:01 2022 -0500 PCI/ASPM: Remove pcie_aspm_pm_state_change() pcie_aspm_pm_state_change() was introduced at the inception of PCIe ASPM code, but it can cause some issues. For instance, when ASPM config is changed via sysfs, those changes won't persist across power state change because pcie_aspm_pm_state_change() overwrites them. Also, if the driver restores L1SS [1] after system resume, the restored state will also be overwritten by pcie_aspm_pm_state_change(). Remove pcie_aspm_pm_state_change(). If there's any hardware that really needs it to function, a quirk can be used instead. [1] https://lore.kernel.org/linux-pci/20220201123536.12962-1-vidyas@nvidia.com/ Link: https://lore.kernel.org/r/20220509073639.2048236-1-kai.heng.feng@canonical.com [bhelgaas: remove additional pcie_aspm_pm_state_change() call in pci_set_low_power_state(), added by 10aa5377fc8a ("PCI/PM: Split pci_raw_set_power_state()") and moved by 7957d201456f ("PCI/PM: Relocate pci_set_low_power_state()")] Signed-off-by: Kai-Heng Feng Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 6 ------ drivers/pci/pci.h | 2 -- drivers/pci/pcie/aspm.c | 19 ------------------- 3 files changed, 27 deletions(-) commit 1e5fb38442ebaabb65057c2e58355ee36c2a178f Author: Viresh Kumar Date: Tue Jul 5 09:41:56 2022 +0530 OPP: Remove dev{m}_pm_opp_of_add_table_noclk() Remove the now unused variants and the now unnecessary "getclk" parameter from few routines. Signed-off-by: Viresh Kumar drivers/opp/of.c | 48 ++++++++---------------------------------------- include/linux/pm_opp.h | 12 ------------ 2 files changed, 8 insertions(+), 52 deletions(-) commit 1b195626850d90663d17299bd378db30f23307e4 Author: Viresh Kumar Date: Mon Jul 4 21:10:08 2022 +0530 PM / devfreq: tegra30: Register config_clks helper There is a corner case with Tegra30, where we want to skip clk configuration that happens via dev_pm_opp_set_opp(), but still want the OPP core to read the "opp-hz" property so we can find the right OPP via freq finding helpers. The OPP core provides support for the platforms to provide config_clks helpers now, lets use that instead of devm_pm_opp_of_add_table_noclk() to achieve the same result, as the OPP core won't parse the DT's "opp-hz" property anymore if the clock isn't provided. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/devfreq/tegra30-devfreq.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit 2f71ae1a9e75a675dfc9da03f5e191e858d1126f Author: Viresh Kumar Date: Mon Jul 4 21:07:28 2022 +0530 OPP: Allow config_clks helper for single clk case There is a corner case with Tegra30, where we want to skip clk configuration via dev_pm_opp_set_opp(), but still want the OPP core to read the "opp-hz" property so we can find the right OPP via freq finding helpers. This is the easiest of the ways to make it work, without any special hacks in the OPP core. Allow config_clks to be passed for single clk case. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/opp/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8174a3a613af1a911ab19da812824f7180b261f9 Author: Viresh Kumar Date: Fri Jun 10 12:37:25 2022 +0530 OPP: Provide a simple implementation to configure multiple clocks This provides a simple implementation to configure multiple clocks for a device. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/opp/core.c | 34 ++++++++++++++++++++++++++++++++++ include/linux/pm_opp.h | 10 ++++++++++ 2 files changed, 44 insertions(+) commit f123ea74511dfab70598cd584a11ad596454a689 Author: Viresh Kumar Date: Fri Jun 10 10:27:51 2022 +0530 OPP: Assert clk_count == 1 for single clk helpers Many helpers can be safely called only for devices that have a single clk associated with them. Assert the same for those routines. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/opp/core.c | 45 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 6 deletions(-) commit e10a46443f767cc6be201a10c767745f0afc04ac Author: Viresh Kumar Date: Fri Jun 10 09:40:30 2022 +0530 OPP: Add key specific assert() method to key finding helpers The helpers for the clock key, at least, would need to assert that the helpers are called only for single clock case. Prepare for that by adding an argument to the key finding helpers. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/opp/core.c | 52 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 19 deletions(-) commit 274c3e83e7d9bf4361fd30648f5c9414c806135c Author: Viresh Kumar Date: Tue Jul 5 11:50:47 2022 +0530 OPP: Compare bandwidths for all paths in _opp_compare_key() Replicate the same behavior as "rates" here and compare all values instead of relying on the first entry alone. Signed-off-by: Viresh Kumar drivers/opp/core.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 2083da24eb56ce622332946800a67a7449d85fe5 Author: Viresh Kumar Date: Fri Jun 10 12:02:04 2022 +0530 OPP: Allow multiple clocks for a device This patch adds support to allow multiple clocks for a device. The design is pretty much similar to how this is done for regulators, and platforms can supply their own version of the config_clks() callback if they have multiple clocks for their device. The core manages the calls via opp_table->config_clks() eventually. We have kept both "clk" and "clks" fields in the OPP table structure and the reason is provided as a comment in _opp_set_clknames(). The same isn't done for "rates" though and we use rates[0] at most of the places now. Co-developed-by: Krzysztof Kozlowski Signed-off-by: Krzysztof Kozlowski Tested-by: Jon Hunter Tested-by: Dmitry Osipenko Tested-by: Manivannan Sadhasivam Signed-off-by: Viresh Kumar drivers/opp/core.c | 213 +++++++++++++++++++++++++++++++++++-------------- drivers/opp/debugfs.c | 27 ++++++- drivers/opp/of.c | 66 +++++++++++---- drivers/opp/opp.h | 16 ++-- include/linux/pm_opp.h | 7 +- 5 files changed, 246 insertions(+), 83 deletions(-) commit 30fd8cdf53a02b54b199043fcf1857db76e8badc Author: Alexander Lobakin Date: Mon Jul 11 20:09:30 2022 +0200 lib/test_bitmap: test the tail after bitmap_to_arr64() Currently, test_bitmap_arr64() only tests bitmap_to_arr64()'s sanity by comparing the result of double-conversion (bm -> arr64 -> bm2) with the input bitmap. However, this may be not enough when one side hides bugs of the second one (e.g. tail clearing, which is being performed by both). Expand the tests and check the tail of the actual arr64 used as a temporary buffer for double-converting. Signed-off-by: Alexander Lobakin Reviewed-by: Andy Shevchenko Signed-off-by: Yury Norov lib/test_bitmap.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 428bc098635680a664779f26f24fe9197d186172 Author: Alexander Lobakin Date: Mon Jul 11 20:09:29 2022 +0200 lib/bitmap: fix off-by-one in bitmap_to_arr64() GENMASK*() family takes the first and the last bits of the mask *including* them. So, with the current code bitmap_to_arr64() doesn't clear the tail properly: nbits % exp mask must be 1 GENMASK(1, 0) 0x3 0x1 ... 63 GENMASK(63, 0) 0xffffffffffffffff 0x7fffffffffffffff This was found by making the function always available instead of 32-bit BE systems only (for reusing in some new functionality). Turn the number of bits into the last bit set by subtracting 1. @nbits is already checked to be positive beforehand. Fixes: 0a97953fd221 ("lib: add bitmap_{from,to}_arr64") Signed-off-by: Alexander Lobakin Reviewed-by: Andy Shevchenko Signed-off-by: Yury Norov lib/bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 940261a195080cf1cdcd56948d363fe363b69da1 Author: Anna Schumaker Date: Fri Jun 17 16:23:36 2022 -0400 NFS: Allow setting rsize / wsize to a multiple of PAGE_SIZE Previously, we required this to value to be a power of 2 for UDP related reasons. This patch keeps the power of 2 rule for UDP but allows more flexibility for TCP and RDMA. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/client.c | 13 +++++++------ fs/nfs/flexfilelayout/flexfilelayoutdev.c | 6 ++++-- fs/nfs/internal.h | 18 ++++++++++++++++++ fs/nfs/nfs4client.c | 4 ++-- 4 files changed, 31 insertions(+), 10 deletions(-) commit f1bafa7375c01ff71fb7cb97c06caadfcfe815f3 Author: Dan Aloni Date: Mon Jul 4 15:56:57 2022 +0300 sunrpc: fix expiry of auth creds Before this commit, with a large enough LRU of expired items (100), the loop skipped all the expired items and was entirely ineffectual in trimming the LRU list. Fixes: 95cd623250ad ('SUNRPC: Clean up the AUTH cache code') Signed-off-by: Dan Aloni Signed-off-by: Trond Myklebust net/sunrpc/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b4e87a1d68f5ae440c42c15c238fd964fd381d0 Author: Ian Kent Date: Sat Jul 2 08:23:47 2022 +0800 nfs: fix port value parsing The valid values of nfs options port and mountport are 0 to USHRT_MAX. The fs parser will return a fail for port values that are negative and the sloppy option handling then returns success. But the sloppy option handling is meant to return success for invalid options not valid options with invalid values. Restricting the sloppy option override to handle failure returns for invalid options only is sufficient to resolve this problem. Changes: v2: utilize the return value from fs_parse() to resolve this problem instead of changing the parameter definitions. Suggested-by: Trond Myklebust Signed-off-by: Ian Kent Signed-off-by: Trond Myklebust fs/nfs/fs_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75b5b7a1ccf606281c4afe365a57ccca486641a2 Author: Daniel Baluta Date: Tue Jul 12 17:15:31 2022 +0300 uapi: sof: abi: Bump SOF ABI for ext_data_length Add new field to sof_ipc_stream_params in order to extend stream params struct with extended data to store compress parameters. Older kernel will still work this as they ext_data_length will always be zero. Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220712141531.14599-5-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown include/uapi/sound/sof/abi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 246b135fcdba57a4e77a702580391ae1942c1e3b Author: Daniel Baluta Date: Tue Jul 12 17:15:30 2022 +0300 ASoC: SOF: compress: Prevent current kernel running with older FW After introducing extended parameters we need to forbid older firmware versions to run with the current and future kernel versions. Although in theory the communication protocol will still work the semantics at application level are undefined. So, prevent this by disallowing older firmwares to run with newer kernels. Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220712141531.14599-4-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown sound/soc/sof/compress.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 3f70c360d484466da7420f395d4675ca02436e32 Author: Daniel Baluta Date: Tue Jul 12 17:15:29 2022 +0300 ASoC: SOF: Copy compress parameters into extended data Allocate memory at the end of sof_ipc_stream_params to store snd_compr_params in order to be sent them to SOF firmware. This will help firmware correctly configure codecs parameters. Notice, that we use 2 bytes from the reserved pool in order to store the extended data length. This is compatible with older FWs where there was no extended data. Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220712141531.14599-3-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown include/sound/sof/stream.h | 6 ++++-- sound/soc/sof/compress.c | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) commit d5770daef62d2e4d33015089bab392ef867fd35a Author: Daniel Baluta Date: Tue Jul 12 17:15:28 2022 +0300 ASoC: SOF: compress: Dynamically allocate pcm params struct We need to extend sof_ipc_pcm_parmas with additional data in order to send compress_params to SOF FW. The extensions will be done at runtime so we need to dynamically allocate pcm object of type struct sof_ipc_pcm_params. Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220712141531.14599-2-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown sound/soc/sof/compress.c | 53 ++++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 24 deletions(-) commit c77c738c37d0fa8380a671613630298d71099180 Author: Fabio M. De Francesco Date: Tue Jun 28 20:24:26 2022 +0200 nfs: Replace kmap() with kmap_local_page() The use of kmap() is being deprecated in favor of kmap_local_page(). With kmap_local_page(), the mapping is per thread, CPU local and not globally visible. Furthermore, the mapping can be acquired from any context (including interrupts). Therefore, use kmap_local_page() in nfs_do_filldir() because this mapping is per thread, CPU local, and not globally visible. Suggested-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Signed-off-by: Trond Myklebust fs/nfs/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 064109db53ecc5d88621d02f36da9f33ca0d64bd Author: ChenXiaoSong Date: Thu Jun 23 09:58:58 2022 +0800 NFS: remove redundant code in nfs_file_write() filemap_fdatawait_range() will always return 0, after patch 6c984083ec24 ("NFS: Use of mapping_set_error() results in spurious errors"), it will not save the wb err in struct address_space->flags: result = filemap_fdatawait_range(file->f_mapping, ...) = 0 filemap_check_errors(mapping) = 0 test_bit(..., &mapping->flags) // flags is 0 Signed-off-by: ChenXiaoSong Signed-off-by: Trond Myklebust fs/nfs/file.c | 2 -- 1 file changed, 2 deletions(-) commit f931d8374cad3dc09d0f6e3f76689fdb3f104c1a Author: Christoph Hellwig Date: Wed Jun 22 15:58:22 2022 +0200 nfs/blocklayout: refactor block device opening Deduplicate the helpers to open a device node by passing a name prefix argument and using the same helper for both kinds of paths. Signed-off-by: Christoph Hellwig Signed-off-by: Trond Myklebust fs/nfs/blocklayout/dev.c | 42 +++++++++++------------------------------- 1 file changed, 11 insertions(+), 31 deletions(-) commit 88c775bbebc9c5b080d3cbbdef73a31eaead9e5b Author: Alex Deucher Date: Mon May 9 11:40:09 2022 -0400 drm/amdgpu/gmc10: adjust gart size for parts that support S/G display For GMC 10 parts which support scatter/gather display (display from system memory), we should allocate a larger gart size to better handler larger displays. This mirrors what we already do for GMC 9 parts. v2: fix typo (Alex) Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 737dad0b5d609f464cae73292de646d3d016ec73 Author: Jack Xiao Date: Wed Sep 9 18:32:36 2020 +0800 drm/amdgpu/mes: fix bo va unmap issue in mes Need reserve buffers before unmap mes ctx bo va. v2: fix removal of dma_resv_excl_fence() (Alex) v3: fix dma_resv_usage (Alex) Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 61 +++++++++++++++++++++++++++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 2 ++ 2 files changed, 60 insertions(+), 3 deletions(-) commit 7ccafd4b2b9f34e6d8185f796f151c47424e273e Author: Trond Myklebust Date: Tue Jul 12 09:22:40 2022 -0400 NFSv4.1: Handle NFS4ERR_DELAY replies to OP_SEQUENCE correctly Don't assume that the NFS4ERR_DELAY means that the server is processing this slot id. Fixes: 3453d5708b33 ("NFSv4.1: Avoid false retries when RPC calls are interrupted") Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 1 - 1 file changed, 1 deletion(-) commit f07a5d2427fc113dc50c5c818eba8929bc27b8ca Author: Trond Myklebust Date: Tue Jul 12 09:16:04 2022 -0400 NFSv4.1: Don't decrease the value of seq_nr_highest_sent When we're trying to figure out what the server may or may not have seen in terms of request numbers, do not assume that requests with a larger number were missed, just because we saw a reply to a request with a smaller number. Fixes: 3453d5708b33 ("NFSv4.1: Avoid false retries when RPC calls are interrupted") Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fbabebfb26a8130c10fd91cca687bac87944580d Author: Peter Ujfalusi Date: Tue Jul 12 16:16:20 2022 +0300 ASoC: SOF: Intel: hda-dai: Do snd_hdac_ext_stream_decouple() only once Call snd_hdac_ext_stream_decouple_locked() unconditionally in hda_link_stream_assign(), the snd_hdac_ext_stream_decouple_locked() have internal checks to avoid re-configuring. There is no need to call snd_hdac_ext_stream_decouple() via hda_link_dma_params() as the stream must have been set to decoupled when it got assigned (even if it used local condition to call snd_hdac_ext_stream_decouple_locked()). Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220712131620.13365-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dai.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 402355e6cdbebf15f2c40cd9469b924c97b94b32 Author: Peter Ujfalusi Date: Tue Jul 12 16:16:19 2022 +0300 ASoC: SOF: Intel: hda-dai: Drop misleading comment regarding dma_data The comment in hda_link_dma_hw_params() is no longer valid as the dma_data is set to NULL at system suspend as well. Instead of rewording the comment to state the obvious: try to take the hext_stream from the dma_data and if it is not set then assign a new one and store it as dma_data. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220712131620.13365-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dai.c | 1 - 1 file changed, 1 deletion(-) commit 5022e221c98a609e0e5b0a73852c7e3d32f1c545 Author: Zhengchao Shao Date: Mon Jul 11 15:35:49 2022 +0800 net: change the type of ip_route_input_rcu to static The type of ip_route_input_rcu should be static. Signed-off-by: Zhengchao Shao Link: https://lore.kernel.org/r/20220711073549.8947-1-shaozhengchao@huawei.com Signed-off-by: Paolo Abeni include/net/route.h | 4 ---- net/ipv4/route.c | 34 +++++++++++++++++----------------- 2 files changed, 17 insertions(+), 21 deletions(-) commit ff6c226953b1bd57c6f4d4e7a37f586426b80e0d Merge: 611f6810aac8 4d3ddc9bce4b Author: Arnd Bergmann Date: Tue Jul 12 15:01:30 2022 +0200 Merge tag 'v5.19-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/drivers pmic wrapper: - code style improvements devapc: - add support for MT8186 Smart Voltage Scaling (SVS) - add support for MT8183 and MT8192 MMSYS: - Add more display paths for MT8365 Mutex: - Add common interface for MOD and SOF table - Add support for MDP on MT8183 - Move binding to soc folder - Add support to use CMDQ to enable the mutex, needed by MDP3 Power domains: - Add support for MT6795 * tag 'v5.19-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (29 commits) soc: mediatek: mutex: Simplify with devm_platform_get_and_ioremap_resource() soc: mediatek: pm-domains: Add support for Helio X10 MT6795 dt-bindings: power: Add MediaTek Helio X10 MT6795 power domains soc: mediatek: SVS: Use DEFINE_SIMPLE_DEV_PM_OPS for svs_pm_ops soc: mediatek: mtk-pm-domains: Allow probing vreg supply on two MFGs soc: mediatek: fix missing clk_disable_unprepare() on err in svs_resume() soc: mediatek: mutex: Use DDP_COMPONENT_DITHER0 mod index for MT8365 soc: mediatek: mutex: add functions that operate registers by CMDQ dt-bindings: soc: mediatek: add gce-client-reg for MUTEX dt-bindings: soc: mediatek: move out common module from display folder soc: mediatek: mutex: add 8183 MUTEX MOD settings for MDP soc: mediatek: mutex: add common interface for modules setting soc: mediatek: pm-domains: Add support always on flag soc: mediatek: mt8365-mmsys: add DPI/HDMI display path soc: mediatek: mutex: add MT8365 support soc: mediatek: SVS: add mt8192 SVS GPU driver dt-bindings: soc: mediatek: add mt8192 svs dt-bindings soc: mediatek: SVS: add debug commands soc: mediatek: SVS: add monitor mode soc: mediatek: SVS: introduce MTK SVS engine ... Link: https://lore.kernel.org/r/b733bd82-6d99-23ef-0541-98e98eb8d3bc@gmail.com Signed-off-by: Arnd Bergmann commit 611f6810aac8e9b5b3eb48c0eed47e2f791af224 Merge: 77abf47213c6 db1bfbd60e32 Author: Arnd Bergmann Date: Tue Jul 12 15:00:27 2022 +0200 Merge tag 'sunxi-drivers-for-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/drivers - build mbus driver only for ARM/ARM64 * tag 'sunxi-drivers-for-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: soc: sunxi: mbus: Only build the driver on ARM/ARM64 Link: https://lore.kernel.org/r/YshfPux1c2x9S7Fi@kista.localdomain Signed-off-by: Arnd Bergmann commit 15d8370cf6d5b3316ad58954086433301363be67 Author: Peter Ujfalusi Date: Tue Jul 12 15:57:32 2022 +0300 ASoC: SOF: Intel: hda: Correct the ROM/FW state reporting code The FSR (Firmware State Register) can be found at offset 0 in the SRAM and it is holding information about the state of the ROM/FW. In case of a boot failure it can be used to get the state where the boot process got stuck, it does not itself contains error codes as such. The error code (or the firmware state information) is stored in the next soft register at offset 0x4. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220712125734.30512-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda.c | 147 +++++++++++++++++++++++++++++++++++++++------- sound/soc/sof/intel/hda.h | 63 ++++++++++++++++++++ 2 files changed, 190 insertions(+), 20 deletions(-) commit 0d2997f750d1de394231bc22768dab94a5b5db2f Author: Namhyung Kim Date: Wed Jun 15 09:32:22 2022 -0700 perf lock: Look up callchain for the contended locks The lock contention tracepoints don't provide lock names. All we can do is to get stack traces and show the caller instead. To minimize the overhead it's limited to up to 8 stack traces and display the first non-lock function symbol name as a caller. $ perf lock report -F acquired,contended,avg_wait,wait_total Name acquired contended avg wait total wait update_blocked_a... 40 40 3.61 us 144.45 us kernfs_fop_open+... 5 5 3.64 us 18.18 us _nohz_idle_balance 3 3 2.65 us 7.95 us tick_do_update_j... 1 1 6.04 us 6.04 us ep_scan_ready_list 1 1 3.93 us 3.93 us ... Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220615163222.1275500-8-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 160 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 156 insertions(+), 4 deletions(-) commit 7cb2a53f7f413734734bac214c4855e9863b9853 Author: Namhyung Kim Date: Wed Jun 15 09:32:21 2022 -0700 perf record: Allow to specify max stack depth of fp callchain Currently it has no interface to specify the max stack depth for perf record. Extend the command line parameter to accept a number after 'fp' to specify the depth like '--call-graph fp,32'. Signed-off-by: Namhyung Kim Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220615163222.1275500-7-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 5 +++++ tools/perf/util/callchain.c | 18 ++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) commit 3ae03f2650b8d87242906f6c160732bc9d991ca1 Author: Namhyung Kim Date: Wed Jun 15 09:32:20 2022 -0700 perf lock: Handle lock contention tracepoints When the lock contention events are used, there's no tracking of acquire and release. So the state machine is simplified to use UNINITIALIZED -> CONTENDED -> ACQUIRED only. Note that CONTENDED state is re-entrant since mutex locks can hit two or more consecutive contention_begin events for optimistic spinning and sleep. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220615163222.1275500-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) commit 166a9764a38e37089088eb21f31cfcb6d5a0dde2 Author: Namhyung Kim Date: Wed Jun 15 09:32:19 2022 -0700 perf lock: Add lock contention tracepoints record support When LOCKDEP and LOCK_STAT events are not available, it falls back to record the new lock contention tracepoints. Signed-off-by: Namhyung Kim Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220615163222.1275500-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 76 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 69 insertions(+), 7 deletions(-) commit 9565c9186d17ac55f5dc8a556bece847e49dee35 Author: Namhyung Kim Date: Wed Jun 15 09:32:18 2022 -0700 perf lock: Skip print_bad_events() if nothing bad The debug output is meaningful when there are bad lock sequences. Skip it unless there's one or -v option is given. Signed-off-by: Namhyung Kim Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220615163222.1275500-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 309e133dfe2651eedd572b62af2215b94532b712 Author: Namhyung Kim Date: Wed Jun 15 09:32:17 2022 -0700 perf lock: Allow to use different kernel symbols Add --vmlinux and --kallsyms options to support data file from different kernels. Signed-off-by: Namhyung Kim Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220615163222.1275500-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-lock.txt | 7 +++++++ tools/perf/builtin-lock.c | 4 ++++ 2 files changed, 11 insertions(+) commit ab0101768f639801b726f8be50e2ff7366ade056 Author: Namhyung Kim Date: Wed Jun 15 09:32:16 2022 -0700 perf lock: Print wait times with unit Currently it only prints the time in nsec but it's a bit hard to read and takes longer in the screen. We can change it to use different units and keep the number small to save the space. Before: $ perf lock report Name acquired contended avg wait (ns) total wait (ns) max wait (ns) min wait (ns) jiffies_lock 433 32 2778 88908 13570 692 &lruvec->lru_lock 747 5 11254 56272 18317 1412 slock-AF_INET6 7 1 23543 23543 23543 23543 &newf->file_lock 706 15 1025 15388 2279 618 slock-AF_INET6 8 1 10379 10379 10379 10379 &rq->__lock 2143 5 2037 10185 3462 939 After: Name acquired contended avg wait total wait max wait min wait jiffies_lock 433 32 2.78 us 88.91 us 13.57 us 692 ns &lruvec->lru_lock 747 5 11.25 us 56.27 us 18.32 us 1.41 us slock-AF_INET6 7 1 23.54 us 23.54 us 23.54 us 23.54 us &newf->file_lock 706 15 1.02 us 15.39 us 2.28 us 618 ns slock-AF_INET6 8 1 10.38 us 10.38 us 10.38 us 10.38 us &rq->__lock 2143 5 2.04 us 10.19 us 3.46 us 939 ns Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220615163222.1275500-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 48 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 8 deletions(-) commit f3ec5d11554778c24ac8915e847223ed71d104fc Author: Ming Lei Date: Mon Jul 11 17:08:08 2022 +0800 blk-mq: don't create hctx debugfs dir until q->debugfs_dir is created blk_mq_debugfs_register_hctx() can be called by blk_mq_update_nr_hw_queues when gendisk isn't added yet, such as nvme tcp. Fixes the warning of 'debugfs: Directory 'hctx0' with parent '/' already present!' which can be observed reliably when running blktests nvme/005. Fixes: 6cfc0081b046 ("blk-mq: no need to check return value of debugfs_create functions") Reported-by: Yi Zhang Signed-off-by: Ming Lei Tested-by: Yi Zhang Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220711090808.259682-1-ming.lei@redhat.com Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 3 +++ 1 file changed, 3 insertions(+) commit 98418a08a20d3a72e14d88ccb3a48d0bf961ab6a Author: Ranjani Sridharan Date: Tue Jul 12 15:39:02 2022 +0300 ASoC: SOF: topology: remove unused variable 'ret' is never used. Remove it and return 0 instead. Signed-off-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20220712123902.14696-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/topology.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4ccf0949cd364811217a0e61754ff7e52cb4f0e4 Author: Pierre-Louis Bossart Date: Fri Jul 8 15:06:41 2022 -0500 ASoC: soc-pcm: demote warnings on non-atomic BE connection When an FE, typically non-atomic, is connected to an atomic BE, we force the BE as non-atomic. There's no reason to throw a warning, this is a perfectly fine configuration and a conversion that's required by-design. This removes the unconditional warnings such as [ 12.054213] iDisp1: dpcm_be_connect: FE is nonatomic but BE is not, forcing BE as nonatomic [ 12.074693] iDisp2: dpcm_be_connect: FE is nonatomic but BE is not, forcing BE as nonatomic [ 12.096612] iDisp3: dpcm_be_connect: FE is nonatomic but BE is not, forcing BE as nonatomic [ 12.118637] iDisp4: dpcm_be_connect: FE is nonatomic but BE is not, forcing BE as nonatomic [ 12.140660] dmic01: dpcm_be_connect: FE is nonatomic but BE is not, forcing BE as nonatomic [ 12.147521] dmic16k: dpcm_be_connect: FE is nonatomic but BE is not, forcing BE as nonatomic and demotes them to dev_dbg(), as suggested in review comments. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220708200641.26923-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/soc-pcm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 57724db17a946476f11c1b1be9750bc0cf877adc Author: Peter Ujfalusi Date: Tue Jul 12 15:09:35 2022 +0300 ASoC: SOF: Intel: hda: Introduce skip_imr_boot flag Use a dedicated flag instead of directly checking the sdev->system_suspend_target to decide if we need to skip IMR boot due to too deep sleep state where the memory used for IMR booting will not retain its content. The skip_imr_boot flag will be set true during suspend if the target state is deeper than S3 and reset back to false on successful boot to re-enable IMR booting in shallower sleep states. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220712120936.28072-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dsp.c | 7 +++++++ sound/soc/sof/intel/hda-loader.c | 10 ++++++---- sound/soc/sof/intel/hda.h | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) commit 1549a69b89b7e5b1b830da897529344766728a4b Author: Peter Ujfalusi Date: Tue Jul 12 15:23:57 2022 +0300 ASoC: SOF: Intel: mtl: Do not process IPC reply before firmware boot It is not yet clear, but it is possible to create a firmware so broken that it will send a reply message before a FW_READY message (it is not yet clear if FW_READY will arrive later). Since the reply_data is allocated only after the FW_READY message, this will lead to a NULL pointer dereference if not filtered out. Reported-by: Kai Vehmanen Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220712122357.31282-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/mtl.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 499cc881b09c8283ab5e75b0d6d21cb427722161 Author: Peter Ujfalusi Date: Tue Jul 12 15:23:56 2022 +0300 ASoC: SOF: Intel: hda-ipc: Do not process IPC reply before firmware boot It is not yet clear, but it is possible to create a firmware so broken that it will send a reply message before a FW_READY message (it is not yet clear if FW_READY will arrive later). Since the reply_data is allocated only after the FW_READY message, this will lead to a NULL pointer dereference if not filtered out. The issue was reported with IPC4 firmware but the same condition is present for IPC3. Reported-by: Kai Vehmanen Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220712122357.31282-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-ipc.c | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) commit acacd9eefd0def5a83244d88e5483b5f38ee7287 Author: Peter Ujfalusi Date: Tue Jul 12 15:23:55 2022 +0300 ASoC: SOF: Intel: cnl: Do not process IPC reply before firmware boot It is not yet clear, but it is possible to create a firmware so broken that it will send a reply message before a FW_READY message (it is not yet clear if FW_READY will arrive later). Since the reply_data is allocated only after the FW_READY message, this will lead to a NULL pointer dereference if not filtered out. The issue was reported with IPC4 firmware but the same condition is present for IPC3. Reported-by: Kai Vehmanen Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220712122357.31282-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/cnl.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) commit b55878c90ab92a244b7b044a9e64aef5b75783e7 Author: German Gomez Date: Tue Jul 5 16:05:11 2022 +0100 perf test: Add test for branch stack sampling Add a self test for branch stack sampling, to check that we get the expected branch types, and filters behave as expected. Suggested-by: Anshuman Khandual Signed-off-by: German Gomez Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Rutland Link: https://lore.kernel.org/r/20220705150511.473919-2-german.gomez@arm.com Tested-by: Jiri Olsa Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/test_brstack.sh | 114 +++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) commit 29d97deed6424d8dfac6797910d6920fb8aad33c Author: Ian Rogers Date: Thu Jul 7 08:34:49 2022 -0700 perf test: Make all metrics test more tolerant Metric names are truncated so don't try to match all of one. Allow AMX metrics to skip as floating point ones do. Metrics for optane memory can also skip rather than fail. Add a system wide check for uncore metrics. Restructure code to avoid extensive nesting. Some impetus for this in: https://lore.kernel.org/lkml/d32376b5-5538-ff00-6620-e74ad4b4abf2@huawei.com/ Suggested-by: John Garry Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20220707153449.202409-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/stat_all_metrics.sh | 47 ++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 16 deletions(-) commit c7a774d78111d55f409d9ee0a5db2c4eb39d6657 Author: Ian Rogers Date: Thu Jul 7 08:34:48 2022 -0700 perf test: Add debug line to diagnose broken metrics Printing out the metric name and architecture makes finding the source of a failure easier. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20220707153449.202409-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/pmu-events.c | 1 + 1 file changed, 1 insertion(+) commit 4ec43b8797b817344cab8359e7734563a6bf3afc Author: Johnson Wang Date: Fri Jul 8 19:47:47 2022 +0800 dt-bindings: mmc: Add compatible for MediaTek MT8188 This commit adds dt-binding documentation of mmc for MediaTek MT8188 SoC platform. Signed-off-by: Johnson Wang Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220708114747.13878-1-johnson.wang@mediatek.com Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 95a4cf7172bc356f072df4eea4d8d307bdb38d86 Author: Robert Marko Date: Mon Jul 4 16:35:53 2022 +0200 dt-bindings: mmc: sdhci-msm: document resets Commit "mmc: sdhci-msm: Reset GCC_SDCC_BCR register for SDHC" added support for utilizing a hardware reset and parsing it from DT, however the bindings were not updated along with it. So, document the usage of "resets" property with the limit of only one item. Signed-off-by: Robert Marko Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220704143554.1180927-1-robimarko@gmail.com Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 5987e6ded29d52e42fc7b06aa575c60a25eee38e Author: Eugen Hristev Date: Thu Jun 30 12:09:26 2022 +0300 mmc: sdhci-of-at91: fix set_uhs_signaling rewriting of MC1R In set_uhs_signaling, the DDR bit is being set by fully writing the MC1R register. This can lead to accidental erase of certain bits in this register. Avoid this by doing a read-modify-write operation. Fixes: d0918764c17b ("mmc: sdhci-of-at91: fix MMC_DDR_52 timing selection") Signed-off-by: Eugen Hristev Tested-by: Karl Olsen Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20220630090926.15061-1-eugen.hristev@microchip.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-at91.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit e427266460826bea21b70f9b2bb29decfb2c2620 Author: ChanWoo Lee Date: Wed Jul 6 09:48:40 2022 +0900 mmc: core: Replace with already defined values for readability SD_ROCR_S18A is already defined and is used to check the rocr value, so let's replace with already defined values for readability. Signed-off-by: ChanWoo Lee Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20220706004840.24812-1-cw9316.lee@samsung.com Signed-off-by: Ulf Hansson drivers/mmc/core/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3daa7e6e2ae578778c72de785699942dbfeace4 Author: Krzysztof Kozlowski Date: Sun Jun 26 14:03:42 2022 +0200 dt-bindings: mmc: samsung,s3c6410-sdhci: convert to dtschema Convert the Samsung SoC SDHCI Controller bindings to DT schema. The original bindings were quite old and incomplete, so add during conversion typical (already used) properties like reg, clocks, interrupts. The bindings were not precising the clocks, although the upstream DTS and Linux driver were expecting bus clocks in certain patterns in any order. Document the status quo even though it is not a proper approach for bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220626120342.38851-6-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson .../bindings/mmc/samsung,s3c6410-sdhci.yaml | 81 ++++++++++++++++++++++ .../devicetree/bindings/mmc/samsung-sdhci.txt | 32 --------- 2 files changed, 81 insertions(+), 32 deletions(-) commit 042f1a6f434ad1fb49fca59d76b5203ce432c36c Author: Michael Straube Date: Mon Jul 11 19:44:17 2022 +0200 staging: r8188eu: remove HW_VAR_MLME_SITESURVEY from SetHwReg8188EU() Remove the HW_VAR_MLME_SITESURVEY case from SetHwReg8188EU() and move the functionality to two new functions in rtw_mlme_ext.c. This is part of the ongoing effort to get rid of SetHwReg8188EU(). Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20220711174417.10721-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 70 +++++++++++++++++++++++--- drivers/staging/r8188eu/core/rtw_p2p.c | 9 ++-- drivers/staging/r8188eu/hal/usb_halinit.c | 53 ------------------- drivers/staging/r8188eu/include/hal_intf.h | 1 - drivers/staging/r8188eu/include/rtw_mlme_ext.h | 3 ++ 5 files changed, 70 insertions(+), 66 deletions(-) commit 2e586f8a5b0ed4a525014a692923ac96f6647816 Author: Wolfram Sang Date: Sat Jun 25 15:17:22 2022 +0200 mmc: tmio: avoid glitches when resetting If we reset because of an error, we need to preserve values for the clock frequency. Otherwise, glitches may be seen on the bus. To achieve that, we introduce a 'preserve' parameter to the reset function and the IP core specific reset callbacks to handle everything accordingly. Reported-by: Yoshihiro Shimoda Signed-off-by: Wolfram Sang Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20220625131722.1397-1-wsa@kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 29 ++++++++++++++--------------- drivers/mmc/host/tmio_mmc.c | 2 +- drivers/mmc/host/tmio_mmc.h | 6 +++++- drivers/mmc/host/tmio_mmc_core.c | 28 ++++++++++++++++++++++------ 4 files changed, 42 insertions(+), 23 deletions(-) commit aabf199c4eff56e8b36a4c2807c041d93b20c1e1 Author: Christophe JAILLET Date: Sat Jun 25 14:56:05 2022 +0200 memstick/ms_block: Use the bitmap API when applicable Use bitmap_equal() instead of hand writing it. It improves semantic and avoids some explicit computation to convert a number of bits to a number of bytes. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/b216df8798f765ab14bce65739c220643320f376.1656155715.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson drivers/memstick/core/ms_block.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 54eb7a55be6779c4d0c25eaf5056498a28595049 Author: Christophe JAILLET Date: Sat Jun 25 14:55:56 2022 +0200 memstick/ms_block: Fix a memory leak 'erased_blocks_bitmap' is never freed. As it is allocated at the same time as 'used_blocks_bitmap', it is likely that it should be freed also at the same time. Add the corresponding bitmap_free() in msb_data_clear(). Fixes: 0ab30494bc4f ("memstick: add support for legacy memorysticks") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/b3b78926569445962ea5c3b6e9102418a9effb88.1656155715.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson drivers/memstick/core/ms_block.c | 1 + 1 file changed, 1 insertion(+) commit 2e531bc3e0d86362fcd8a577b3278d9ef3cc2ba0 Author: Christophe JAILLET Date: Sat Jun 25 14:55:25 2022 +0200 memstick/ms_block: Fix some incorrect memory allocation Some functions of the bitmap API take advantage of the fact that a bitmap is an array of long. So, to make sure this assertion is correct, allocate bitmaps with bitmap_zalloc() instead of kzalloc()+hand-computed number of bytes. While at it, also use bitmap_free() instead of kfree() to keep the semantic. Fixes: 0ab30494bc4f ("memstick: add support for legacy memorysticks") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/dbf633c48c24ae6d95f852557e8d8b3bbdef65fe.1656155715.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson drivers/memstick/core/ms_block.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 088604048b24846d1e79da4c2a73a6f3ad43edb4 Author: Lad Prabhakar Date: Fri Jun 24 19:14:38 2022 +0100 mmc: renesas_sdhi: Fix typo's Fix typo's, * difference -> different * alignment -> aligned While at it updated the comment to make it clear that Renesas SDHI DMAC needs buffers to be 128-byte aligned. Reported-by: Pavel Machek Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/20220624181438.4355-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_internal_dmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0dac1e498f8130fdacfdd5289e3a7ac87ec1b9ad Author: Lad Prabhakar Date: Fri Jun 24 19:14:37 2022 +0100 mmc: renesas_sdhi: Get the reset handle early in the probe In case of devm_reset_control_get_optional_exclusive() failure we returned directly instead of jumping to the error path to roll back initialization. This patch moves devm_reset_control_get_optional_exclusive() early in the probe so that we have the reset handle prior to initialization of the hardware. Fixes: b4d86f37eacb7 ("mmc: renesas_sdhi: do hard reset if possible") Reported-by: Pavel Machek Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/20220624181438.4355-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 39c86b5c59a414cf2a94dbd6956a9a8e70188673 Author: Liang He Date: Tue Jun 21 14:52:59 2022 +0800 mmc: sdhci-of-esdhc: Fixup use of of_find_compatible_node() Callers of of_find_compatible_node() should drop the reference count accordingly, so let's do that. Signed-off-by: Liang He Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20220621065259.4079817-1-windhl@126.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-esdhc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1c5fd97373115b932afa72fbc5425560e0d1148f Author: Ren Zhijie Date: Sun Jun 19 18:47:12 2022 +0800 mmc: sdhci-pci-gli: Fix build error unused-function If CONFIG_PM is not set. make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed, like this: drivers/mmc/host/sdhci-pci-gli.c:834:13: error: ‘gl9763e_set_low_power_negotiation’ defined but not used [-Werror=unused-function] static void gl9763e_set_low_power_negotiation(struct sdhci_pci_slot *slot, bool enable) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[3]: *** [drivers/mmc/host/sdhci-pci-gli.o] Error 1 To fix building warning, wrap all related code with CONFIG_PM. Reported-by: Hulk Robot Signed-off-by: Ren Zhijie Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20220619104712.125364-1-renzhijie2@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-gli.c | 50 ++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) commit 6f34a4ee738b6965a08ba11a03666e7b524aec19 Author: Alexander Stein Date: Tue Jun 14 13:39:05 2022 +0200 mmc: core: Do not evaluate HS400 capabilities if bus has no MMC capability If 'no-mmc' is set but 'no-mmc-hs400' is not, this warning is raised. Specifying 'no-mmc' should be enough though. Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20220614113905.1458715-1-alexander.stein@ew.tq-group.com Signed-off-by: Ulf Hansson drivers/mmc/core/host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9e5b33934cec24b8c024add5c5d65d2f93ade05 Author: Jason Lai Date: Mon Jun 13 17:29:07 2022 +0800 mmc: host: Improve I/O read/write performance for GL9763E Due to flaws in hardware design, GL9763E takes long time to exit from L1 state. The I/O performance will suffer severe impact if it often enter and exit L1 state during I/O requests. To improve I/O read/write performance and take battery life into account, let's turn on GL9763E L1 negotiation before entering runtime suspend and turn off GL9763E L1 negotiation while executing runtime resume. That is to say, GL9763E will not enter L1 state when executing I/O requests and enter L1 state when PCIe bus idle. Signed-off-by: Renius Chen Signed-off-by: Jason Lai Link: https://lore.kernel.org/r/20220613092907.2502-1-jason.lai@genesyslogic.com.tw [Ulf: Improved the commit message a bit] Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-gli.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit f6c3397dc67f8141f1a7931e891732351a27d3e1 Author: Uwe Kleine-König Date: Fri Jun 10 23:12:57 2022 +0200 mmc: sdhci-st: Obviously always return success in remove callback sdhci_pltfm_unregister() returns 0 unconditionally and returning an error in a platform remove callback isn't very sensible. (The only effect of the latter is that the device core emits a generic warning and then removes the device anyhow.) So return 0 unconditionally to make it obvious there is no error forwarded to the upper layers. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20220610211257.102071-5-u.kleine-koenig@pengutronix.de Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-st.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 869f98756e55dbf4ec30e104f6ea1432e8f0bc19 Author: Uwe Kleine-König Date: Fri Jun 10 23:12:56 2022 +0200 mmc: sdhci-of-arasan: Obviously always return success in remove callback sdhci_pltfm_unregister() returns 0 unconditionally and returning an error in a platform remove callback isn't very sensible. (The only effect of the latter is that the device core emits a generic warning and then removes the device anyhow.) So return 0 unconditionally to make it obvious there is no error forwarded to the upper layers. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20220610211257.102071-4-u.kleine-koenig@pengutronix.de Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-arasan.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 397605c2d02abdcaba00e830fee0ee70a88b9456 Author: Uwe Kleine-König Date: Fri Jun 10 23:12:55 2022 +0200 mmc: dw_mmc: rockchip: Obviously always return success in remove callback dw_mci_pltfm_remove() returns 0 unconditionally and returning an error in a platform remove callback isn't very sensible. (The only effect of the latter is that the device core emits a generic warning and then removes the device anyhow.) So return 0 unconditionally to make it obvious there is no error forwarded to the upper layers. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220610211257.102071-3-u.kleine-koenig@pengutronix.de Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc-rockchip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 50699358222d004ad2b465c18b03d418b9b7fa90 Author: Uwe Kleine-König Date: Fri Jun 10 23:12:54 2022 +0200 mmc: dw_mmc: hi3789cv200: Obviously always return success in remove callback dw_mci_pltfm_remove() returns 0 unconditionally and returning an error in a platform remove callback isn't very sensible. (The only effect of the latter is that the device core emits a generic warning and then removes the device anyhow.) So return 0 unconditionally to make it obvious there is no error forwarded to the upper layers. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220610211257.102071-2-u.kleine-koenig@pengutronix.de Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc-hi3798cv200.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 68eab5176c71fe03ff37723a1c5cf20c26b06a99 Author: Uwe Kleine-König Date: Fri Jun 10 23:12:53 2022 +0200 mmc: dw_mmc: exynos: Obviously always return success in remove callback dw_mci_pltfm_remove() returns 0 unconditionally and returning an error in a platform remove callback isn't very sensible. (The only effect of the latter is that the device core emits a generic warning and then removes the device anyhow.) So return 0 unconditionally to make it obvious there is no error forwarded to the upper layers. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220610211257.102071-1-u.kleine-koenig@pengutronix.de Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc-exynos.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c3c0ed75ffbff5c70667030b5139bbb75b0a30f5 Author: Nathan Chancellor Date: Wed Jun 8 08:27:57 2022 -0700 mmc: sdhci-brcmstb: Initialize base_clk to NULL in sdhci_brcmstb_probe() Clang warns a few times along the lines of: drivers/mmc/host/sdhci-brcmstb.c:302:6: warning: variable 'base_clk' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (res) ^~~ drivers/mmc/host/sdhci-brcmstb.c:376:24: note: uninitialized use occurs here clk_disable_unprepare(base_clk); ^~~~~~~~ base_clk is used in the error path before it is initialized. Initialize it to NULL, as clk_disable_unprepare() calls clk_disable() and clk_unprepare(), which both handle NULL pointers gracefully. Link: https://github.com/ClangBuiltLinux/linux/issues/1650 Reported-by: kernel test robot Signed-off-by: Nathan Chancellor Acked-by: Florian Fainelli Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20220608152757.82529-1-nathan@kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-brcmstb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f78bc9f2caa4e37fafa623faa8f5c683b4c4b35e Author: Xiang wangx Date: Wed Jun 8 21:08:47 2022 +0800 mmc: mmci: Fix typo in comment Delete the redundant word 'is'. Signed-off-by: Xiang wangx Link: https://lore.kernel.org/r/20220608130847.46359-1-wangxiang@cdjrlc.com Signed-off-by: Ulf Hansson drivers/mmc/host/mmci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f6fe934a628b0ce0ba138697064fbc8802c21b1 Author: Wolfram Sang Date: Wed Jun 8 14:23:44 2022 +0200 dt-bindings: mmc: renesas,sdhi: Add R-Car Gen4 clock requirements The patch enabling generic Gen4 support forgot to add the clock requirements which are the same as for Gen3. Update the binding. Reported-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20220608122344.3431-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml | 1 + 1 file changed, 1 insertion(+) commit cae45c2d4fb3a9084954f14bf991500c49c970c9 Author: Wolfram Sang Date: Wed Jun 8 11:48:31 2022 +0200 dt-bindings: mmc: renesas,sdhi: R-Car V3U is R-Car Gen4 Despite the name, R-Car V3U is the first member of the R-Car Gen4 family. Hence move its compatible value to the R-Car Gen4 section. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20220608094831.8242-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba1de43768aa27865169af00ee0c2a4a165690b6 Author: Wei Yongjun Date: Wed Jun 8 09:01:52 2022 +0000 mmc: debugfs: Fix file release memory leak When using single_open() for opening, single_release() should be used instead of seq_release(), otherwise there is a memory leak. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20220608090152.179395-1-weiyongjun1@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/core/debugfs.c | 1 + 1 file changed, 1 insertion(+) commit 3576c0b2709c8204a18371d5f8b44a724234ffe7 Author: Wolfram Sang Date: Sat Jun 4 01:38:10 2022 +0200 dt-bindings: mmc: renesas,sdhi: Document R-Car S4-8 and generic Gen4 support Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20220603233810.21972-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 7b651cc6de2470e112b3e792ba2e7775e1127c04 Author: Wolfram Sang Date: Sat Jun 4 01:33:00 2022 +0200 mmc: renesas_sdhi: add R-Car Gen4 fallback compatibility string For now, Gen4 is treated the same as Gen3. But we still want a seperate fallback just in case. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20220603233300.21789-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_internal_dmac.c | 1 + 1 file changed, 1 insertion(+) commit ffe18c0f7ced226ac07a4079ed504312418bfb6c Author: Conor Dooley Date: Mon Jun 6 21:13:41 2022 +0100 dt-bindings: mmc: convert mmc-spi-slot to yaml Convert the mmc-spi-slot text based binding doc to yaml, with the side effect of cleaning up some of the riscv dtbs_check warnings. Reviewed-by: Rob Herring Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220606201343.514391-2-mail@conchuod.ie Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/mmc-spi-slot.txt | 29 -------- .../devicetree/bindings/mmc/mmc-spi-slot.yaml | 77 ++++++++++++++++++++++ 2 files changed, 77 insertions(+), 29 deletions(-) commit ca812a4e8f7c438edb817b618fb38ceffdd9c04c Author: Krzysztof Kozlowski Date: Sun Jun 5 18:37:10 2022 +0200 dt-bindings: mmc: samsung,exynos-dw-mshc: document Exynos5420 SMU Document the compatible for Samsung Exynos5420 SoC Synopsys Designware MSHC with SMU, already used in DTS and driver. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220605163710.144210-5-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml | 1 + 1 file changed, 1 insertion(+) commit 354c6d33ddfbda5b29063ffff54a965301e2e459 Author: Krzysztof Kozlowski Date: Sun Jun 5 18:37:09 2022 +0200 dt-bindings: mmc: samsung,exynos-dw-mshc: convert to dtschema Convert the Samsung Exynos SoC specific extensions to the Synopsys Designware Mobile Storage Host Controller to DT schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220605163710.144210-4-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/exynos-dw-mshc.txt | 94 ------------ .../bindings/mmc/samsung,exynos-dw-mshc.yaml | 159 +++++++++++++++++++++ 2 files changed, 159 insertions(+), 94 deletions(-) commit e5f7a3c64c0151da7080bebbe2940f00c3a4162e Author: Shaik Sajida Bhanu Date: Fri May 27 23:23:56 2022 +0530 mmc: cqhci: Capture eMMC and SD card errors Add changes to capture eMMC and SD card errors. This is useful for debug and testing. Signed-off-by: Liangliang Lu Signed-off-by: Sayali Lokhande Signed-off-by: Bao D. Nguyen Signed-off-by: Ram Prakash Gupta Signed-off-by: Shaik Sajida Bhanu Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/1653674036-21829-6-git-send-email-quic_c_sbhanu@quicinc.com Signed-off-by: Ulf Hansson drivers/mmc/host/cqhci-core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit fadf344e6d69a94efa17619120132516f56b582c Author: Shaik Sajida Bhanu Date: Fri May 27 23:23:55 2022 +0530 mmc: debugfs: Add debug fs error state entry for mmc driver Add debug fs entry error state to query eMMC and SD card errors statistics. If any errors occurred in eMMC and SD card driver level then err_state value will be set to 1. Signed-off-by: Liangliang Lu Signed-off-by: Sayali Lokhande Signed-off-by: Bao D. Nguyen Signed-off-by: Shaik Sajida Bhanu Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/1653674036-21829-5-git-send-email-quic_c_sbhanu@quicinc.com Signed-off-by: Ulf Hansson drivers/mmc/core/debugfs.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 7ae20fa3552a619694c2894b09e19332fe0d007f Author: Shaik Sajida Bhanu Date: Fri May 27 23:23:54 2022 +0530 mmc: debugfs: Add debug fs entry for mmc driver Add debug fs entry to query eMMC and SD card errors statistics Signed-off-by: Liangliang Lu Signed-off-by: Sayali Lokhande Signed-off-by: Bao D. Nguyen Signed-off-by: Shaik Sajida Bhanu Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/1653674036-21829-4-git-send-email-quic_c_sbhanu@quicinc.com Signed-off-by: Ulf Hansson drivers/mmc/core/debugfs.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit efe8f5c9b5e118070f424205078ababc46fd130a Author: Shaik Sajida Bhanu Date: Fri May 27 23:23:53 2022 +0530 mmc: sdhci: Capture eMMC and SD card errors Add changes to capture eMMC and SD card errors. This is useful for debug and testing. Signed-off-by: Liangliang Lu Signed-off-by: Sayali Lokhande Signed-off-by: Bao D. Nguyen Signed-off-by: Shaik Sajida Bhanu Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/1653674036-21829-3-git-send-email-quic_c_sbhanu@quicinc.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 59 ++++++++++++++++++++++++++++++++++++------------ drivers/mmc/host/sdhci.h | 3 +++ include/linux/mmc/mmc.h | 6 +++++ 3 files changed, 53 insertions(+), 15 deletions(-) commit 91f059c95c6a5dbc0907a5f871e7915a5e93c1f9 Author: Shaik Sajida Bhanu Date: Fri May 27 23:23:52 2022 +0530 mmc: core: Capture eMMC and SD card errors Add changes to capture eMMC and SD card errors. This is useful for debug and testing. Signed-off-by: Liangliang Lu Signed-off-by: Sayali Lokhande Signed-off-by: Bao D. Nguyen Signed-off-by: Ram Prakash Gupta Signed-off-by: Shaik Sajida Bhanu Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/1653674036-21829-2-git-send-email-quic_c_sbhanu@quicinc.com Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 10 +++++++++- include/linux/mmc/host.h | 26 ++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) commit f0c88b04f3c229b1d4e2defeeb7e399d171a38e6 Author: Fabien Parent Date: Mon May 30 14:38:56 2022 +0200 mmc: mtk-sd: fix typo Fix a typo: Fianl -> Final. Signed-off-by: Fabien Parent Reviewed-by: Miles Chen Link: https://lore.kernel.org/r/20220530123857.692076-1-fparent@baylibre.com Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7dc65e3c0ef4b746a583b7c58f99873fddf5ccfa Author: Fabio Estevam Date: Wed May 25 22:00:22 2022 -0300 mmc: mxcmmc: Silence a clang warning Change the of_device_get_match_data() cast to (uintptr_t) to silence the following clang warning: drivers/mmc/host/mxcmmc.c:1028:18: warning: cast to smaller integer type 'enum mxcmci_type' from 'const void *' [-Wvoid-pointer-to-enum-cast] Reported-by: kernel test robot Fixes: 8223e885e74b ("mmc: mxc: Convert the driver to DT-only") Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20220526010022.1163483-1-festevam@gmail.com Signed-off-by: Ulf Hansson drivers/mmc/host/mxcmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5899a3e2f783a27b268e38d37f9b24c71bddf45 Author: Miaoqian Lin Date: Mon May 23 18:42:54 2022 +0400 mmc: sdhci-of-esdhc: Fix refcount leak in esdhc_signal_voltage_switch of_find_matching_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. of_node_put() checks null pointer. Fixes: ea35645a3c66 ("mmc: sdhci-of-esdhc: add support for signal voltage switch") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220523144255.10310-1-linmq006@gmail.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-esdhc.c | 1 + 1 file changed, 1 insertion(+) commit 97904a59855c7ac7c613085bc6bdc550d48524ff Author: Kamal Dasu Date: Fri May 20 14:31:08 2022 -0400 mmc: sdhci-brcmstb: Add ability to increase max clock rate for 72116b0 The 72116B0 has improved SDIO controllers that allow the max clock rate to be increased from a max of 100MHz to a max of 150MHz. The driver will need to get the clock and increase it's default rate and override the caps register, that still indicates a max of 100MHz. The new clock will be named "sdio_freq" in the DT node's "clock-names" list. The driver will use a DT property, "clock-frequency", to enable this functionality and will get the actual rate in MHz from the property to allow various speeds to be requested. Signed-off-by: Al Cooper Signed-off-by: Kamal Dasu Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20220520183108.47358-3-kdasu.kdev@gmail.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-brcmstb.c | 69 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) commit 2f8690ef64128bcbda24f0c426dff59835df7fbf Author: Kamal Dasu Date: Fri May 20 14:31:07 2022 -0400 dt-bindings: mmc: Add Broadcom optional sdio_freq clock The 72116B0 has improved SDIO controllers that allow the max clock rate to be increased from a max of 100MHz to a max of 150MHz. Optional "sdio_freq" clock is used to drive the bus clock if present optional property "clock-frequency" specifies a base clock frequency in Hz that overrides the base clock frequency in the CAPS registers. Signed-off-by: Kamal Dasu Reviewed-by: Krzysztof Kozlowski Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20220520183108.47358-2-kdasu.kdev@gmail.com Signed-off-by: Ulf Hansson .../bindings/mmc/brcm,sdhci-brcmstb.yaml | 32 ++++++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) commit 8574adf5222d786b747022c6edcbcdddf409a139 Author: Bhupesh Sharma Date: Sun May 15 03:31:16 2022 +0530 dt-bindings: mmc: sdhci-msm: Fix issues in yaml bindings Rob pointed some remaining issues in the sdhci-msm yaml bindings (via [1]). Fix the same by first using the 'mmc-controller.yaml' as 'ref' and thereafter also fix the issues reported by 'make dtbs_check' check. [1]. https://lore.kernel.org/linux-arm-msm/YnLmNCwNfoqZln12@robh.at.kernel.org/ Fixes: a45537723f4b ("dt-bindings: mmc: sdhci-msm: Convert bindings to yaml") Cc: Bjorn Andersson Cc: Rob Herring Cc: Ulf Hansson Signed-off-by: Bhupesh Sharma Link: https://lore.kernel.org/r/20220514220116.1008254-1-bhupesh.sharma@linaro.org Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/sdhci-msm.yaml | 52 ++++++++++++++++++---- 1 file changed, 44 insertions(+), 8 deletions(-) commit c6f361cba51c536e7a6af31973c6a4e5d7e4e2e4 Author: Yifeng Zhao Date: Wed May 4 23:32:41 2022 +0200 mmc: sdhci-of-dwcmshc: add support for rk3588 Add support for RK3588's DWCMSHC controller, which is used for providing the rootfs on the RK3588 evaluation board. Signed-off-by: Yifeng Zhao [port from vendor BSP] Acked-by: Adrian Hunter Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20220504213251.264819-12-sebastian.reichel@collabora.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-dwcmshc.c | 121 ++++++++++++++++++++++++++++++------ 1 file changed, 103 insertions(+), 18 deletions(-) commit 86e1a8e1f9b555af342c53ae06284eeeab9a4263 Author: Sebastian Reichel Date: Wed May 4 23:32:40 2022 +0200 mmc: sdhci-of-dwcmshc: rename rk3568 to rk35xx Prepare driver for rk3588 support by renaming the internal data structures. Acked-by: Adrian Hunter Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20220504213251.264819-11-sebastian.reichel@collabora.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-dwcmshc.c | 46 ++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit 70f832206fe72e9998b46363e8e59e89b0b757bc Author: Yifeng Zhao Date: Wed May 4 23:32:39 2022 +0200 mmc: sdhci-of-dwcmshc: add reset call back for rockchip Socs The reset function build in the SDHCI will not reset the logic circuit related to the tuning function, which may cause data reading errors. Resetting the complete SDHCI controller through the reset controller fixes the issue. Signed-off-by: Yifeng Zhao [rebase, use optional variant of reset getter] Acked-by: Adrian Hunter Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20220504213251.264819-10-sebastian.reichel@collabora.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-dwcmshc.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit 6c3c267e5fbc637c8fc4b1d075e3c43e328550a6 Author: Nick Desaulniers Date: Mon Jul 11 11:10:58 2022 -0700 Documentation/process: Add embargoed HW contact for LLVM Should the need for toolchain mitigations ever be necessary, add a group for toolchain ambassadors. Add Nick Desaulniers as LLVM's ambassador for the embargoed hardware issues process. Signed-off-by: Nick Desaulniers Link: https://lore.kernel.org/r/20220711181101.1559558-1-ndesaulniers@google.com Signed-off-by: Greg Kroah-Hartman Documentation/process/embargoed-hardware-issues.rst | 3 +++ 1 file changed, 3 insertions(+) commit e35cd6881dd56d5ad7711d23faab668268e17555 Author: Andy Shevchenko Date: Mon Jul 11 12:52:16 2022 +0300 ALSA: hda: cs35l41: Improve dev_err_probe() messaging Drop duplicate print of returned value in the messages and use pattern return dev_err_probe(...) where it's possible. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220711095219.36915-1-andriy.shevchenko@linux.intel.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 642999365da3b7cd5552ec758d6e1bb6f2f465d8 Author: Andy Shevchenko Date: Mon Jul 11 13:01:29 2022 +0300 ALSA: hda: cs35l41: Fix comments wrt serial-multi-instantiate reference The comments are inconsistent and point to the wrong driver name. The initially named i2c-multi-instantiate it was renamed to the serial-multi-instantiate exactly due to support of the platforms with multiple CS35L41 codecs. Fix comments accordingly. While at it, drop file names from the files. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220711100129.37326-1-andriy.shevchenko@linux.intel.com Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 4 ++-- sound/pci/hda/cs35l41_hda_i2c.c | 7 ++++--- sound/pci/hda/cs35l41_hda_spi.c | 7 ++++--- 3 files changed, 10 insertions(+), 8 deletions(-) commit bc2c6a5ee71bc8aee58d8a87ad95feddb4e2d6c2 Merge: 3af0b1d34a07 a919b823abba Author: Greg Kroah-Hartman Date: Tue Jul 12 10:53:21 2022 +0200 Merge tag 'misc-habanalabs-next-2022-07-12' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux into char-misc-next Oded writes: This tag contains habanalabs driver changes for v5.20: - Add Gaudi2 ASIC support. All the features required for Gaudi2 are included in this tag (except the networking aspect). - Add more events to the eventfd support in the driver. With the new code, we expose three events that the user can register to get notification about them. - re-factor soft reset code and replace its name to compute reset to better reflect the actual reset done in new ASICs - Change the way Gaudi2 triggers an MSI-X interrupt due to h/w bug. - Improve the code of the debugfs node that scrubs the device's memory. - Add mechanism for better compatibility with older f/w versions - Cleanup kernel log prints by moving some prints to debug and removing others. - Many small bug fixes and minor changes. * tag 'misc-habanalabs-next-2022-07-12' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux: (88 commits) habanalabs: move h/w dirty message to debug habanalabs: rename soft reset to compute reset habanalabs: add status of reset after device release habanalabs: fix update of is_in_soft_reset habanalabs: expose only valid debugfs nodes habanalabs/gaudi2: map virtual MSI-X doorbell memory for user habanalabs/gaudi2: modify decoder to use virtual MSI-X doorbell habanalabs/gaudi2: modify CS completion CQ to use virtual MSI-X doorbell habanalabs/gaudi2: replace defines for reserved sob/mob with enums habanalabs/gaudi2: configure virtual MSI-X doorbell interface habanalabs: add a value field to hl_fw_send_pci_access_msg() habanalabs: fixes to the poll-timeout macros habanalabs/gaudi2: use DIV_ROUND_UP_SECTOR_T instead of roundup habanalabs: initialize variable explicitly habanalabs: Use the bitmap API to allocate bitmaps habanalabs/gaudi2: remove unused defines habanalabs: make sure variable is set before used habanalabs: don't declare tmp twice in same function habanalabs: do not set max power on a secured device habanalabs/gaudi2: SM mask can only be 8-bit ... commit b508128bb0d1e243beb56cca5d819bcbb5c269b1 Author: Geert Uytterhoeven Date: Tue Jun 7 09:12:53 2022 +0200 m68k: defconfig: Update defconfigs for v5.19-rc1 - Move CONFIG_USERFAULTFD=y (moved in commit 430529b5c6317493 ("mm/uffd: move USERFAULTFD configs into mm/")), - Move CONFIG_SLAB=y (moved in commit 7b42f1041c98f5d7 ("mm: Kconfig: move swap and slab config options to the MM section")), - Replace CONFIG_ZPOOL=m by CONFIG_ZRAM=m (cfr. commit b3fbd58fcbb10725 ("mm: Kconfig: simplify zswap configuration")), - Replace CONFIG_CRYPTO_SM[34]=m by CONFIG_CRYPTO_SM[34]_GENERIC=m (cfr. commit d2825fa9365d0101 ("crypto: sm3,sm4 - move into crypto directory")), - Drop CONFIG_BITFIELD_KUNIT=m, CONFIG_BITS_TEST=m, CONFIG_CMDLINE_KUNIT_TEST=m, and CONFIG_RESOURCE_KUNIT_TEST=m (auto-modular since commit dcbb2ee24601fabb ("lib/Kconfig.debug: change KUnit tests to default to KUNIT_ALL_TESTS")). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/96e3b5c2b7f253449229993c8783478e6b7a9c5c.1654584908.git.geert@linux-m68k.org arch/m68k/configs/amiga_defconfig | 14 +++++--------- arch/m68k/configs/apollo_defconfig | 14 +++++--------- arch/m68k/configs/atari_defconfig | 14 +++++--------- arch/m68k/configs/bvme6000_defconfig | 14 +++++--------- arch/m68k/configs/hp300_defconfig | 14 +++++--------- arch/m68k/configs/mac_defconfig | 14 +++++--------- arch/m68k/configs/multi_defconfig | 14 +++++--------- arch/m68k/configs/mvme147_defconfig | 14 +++++--------- arch/m68k/configs/mvme16x_defconfig | 14 +++++--------- arch/m68k/configs/q40_defconfig | 14 +++++--------- arch/m68k/configs/sun3_defconfig | 14 +++++--------- arch/m68k/configs/sun3x_defconfig | 14 +++++--------- 12 files changed, 60 insertions(+), 108 deletions(-) commit c07a16404c8f82a10bec12fd1b3a4064ca30f142 Author: Geert Uytterhoeven Date: Wed Jul 6 15:48:50 2022 +0200 m68k: Add common forward declaration for show_registers() There are several forward declarations for show_registers() in C source files. Replace these by a single common forward declaration in , and include where needed. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Vivier Link: https://lore.kernel.org/r/d5b6a7f9af3e82f0ccb67edac09d9ee45d457932.1657114791.git.geert@linux-m68k.org arch/m68k/include/asm/processor.h | 1 + arch/m68k/kernel/traps.c | 1 + arch/m68k/mac/macints.c | 3 +-- arch/m68k/virt/ints.c | 3 +-- 4 files changed, 4 insertions(+), 4 deletions(-) commit c36dd297b6c09fff56b629a231cf2aa0af333c2d Author: Geert Uytterhoeven Date: Wed Jul 6 15:48:46 2022 +0200 m68k: mac: Remove forward declaration for mac_nmi_handler() Move mac_nmi_handler() before its caller, so its forward declaration can be dropped. While at it, make the function static, and absorb the variable in_nmi, which is only used inside the function. Signed-off-by: Geert Uytterhoeven Reviewed-by: Finn Thain Link: https://lore.kernel.org/r/fa48394ecba7c29a2da354d13c1017b37237f25b.1657114783.git.geert@linux-m68k.org arch/m68k/mac/macints.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit bfc54866856ffe2cb82886337afdece7703f2415 Merge: 2afe46474ba3 f0680ef0f949 Author: Paolo Abeni Date: Tue Jul 12 10:26:28 2022 +0200 Merge branch 'mlx5-devlink-mutex-removal-part-1' Moshe Shemesh Says: =================== 1) Fix devlink lock in mlx5 devlink eswitch callbacks Following the commit 14e426bf1a4d "devlink: hold the instance lock during eswitch_mode callbacks" which takes devlink instance lock for all devlink eswitch callbacks and adds a temporary workaround, this patchset removes the workaround, replaces devlink API functions by devl_ API where called from mlx5 driver eswitch callbacks flows and adds devlink instance lock in other driver's path that leads to these functions. While moving to devl_ API the patchset removes part of the devlink API functions which mlx5 was the last one to use and so not used by any driver now. The patchset also remove DEVLINK_NL_FLAG_NO_LOCK flag from the callbacks of port_new/port which are called only from mlx5 driver and the already locked by the patchset as parallel paths to the eswitch callbacks using devl_ API functions. This patchset will be followed by another patchset that will remove DEVLINK_NL_FLAG_NO_LOCK flag from devlink reload and devlink health callbacks. Thus we will have all devlink callbacks locked and it will pave the way to remove devlink mutex. =================== Link: https://lore.kernel.org/r/20220711081408.69452-1-saeed@kernel.org Signed-off-by: Paolo Abeni commit f0680ef0f9497f88b513dea1ae54664f0806ecfb Author: Moshe Shemesh Date: Mon Jul 11 01:14:08 2022 -0700 devlink: Hold the instance lock in port_new / port_del callbacks Let the core take the devlink instance lock around port_new and port_del callbacks and remove the now redundant locking in the only driver that currently use them. Signed-off-by: Moshe Shemesh Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.c | 4 ---- net/core/devlink.c | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) commit 973598d46ede27bb3b2a54ff45135196aeb9efb0 Author: Moshe Shemesh Date: Mon Jul 11 01:14:07 2022 -0700 net/mlx5: Remove devl_unlock from mlx5_devlink_eswitch_mode_set The callback mlx5_devlink_eswitch_mode_set() had unlocked devlink as a temporary workaround once devlink instance lock was added to devlink eswitch callbacks. Now that all flows triggered by this function that took devlink lock are using devl_ API and all parallel paths are locked we can remove this workaround. Signed-off-by: Moshe Shemesh Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: Paolo Abeni .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 7b19119f4c7dc9412b556ea12fae6b32574e2810 Author: Moshe Shemesh Date: Mon Jul 11 01:14:06 2022 -0700 net/mlx5: Use devl_ API in mlx5e_devlink_port_register As part of the flows invoked by mlx5_devlink_eswitch_mode_set() get to mlx5_rescan_drivers_locked() which can call mlx5e_probe()/mlx5e_remove and register/unregister mlx5e driver ports accordingly. This can lead to deadlock once mlx5_devlink_eswitch_mode_set() will use devlink lock. Use devl_port_register/unregister() instead of devlink_port_register/unregister() and add devlink instance locks in the driver paths to this function to have it locked while calling devl_ API function. If remove or probe were called by module init or module cleanup flows, need to lock devlink just before calling devl_port_register(), otherwise it is called by attach/detach or register/unregister flow and we can have the flow locked. Added flag to distinguish between these cases. This will be used by the downstream patch to invoke mlx5_devlink_eswitch_mode_set() with devlink locked. Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlx5/core/dev.c | 29 ++++++++++++++++++++-- .../net/ethernet/mellanox/mlx5/core/en/devlink.c | 16 ++++++++++-- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 ++ include/linux/mlx5/driver.h | 4 +++ 4 files changed, 47 insertions(+), 4 deletions(-) commit df539fc62b069ed2b2395d8d1c77f7758c5001a6 Author: Moshe Shemesh Date: Mon Jul 11 01:14:05 2022 -0700 devlink: Remove unused functions devlink_rate_leaf_create/destroy The previous patch removed the last usage of the functions devlink_rate_leaf_create() and devlink_rate_nodes_destroy(). Thus, remove these function from devlink API. Signed-off-by: Moshe Shemesh Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: Paolo Abeni include/net/devlink.h | 2 -- net/core/devlink.c | 42 +++++++----------------------------------- 2 files changed, 7 insertions(+), 37 deletions(-) commit da212bd29d7fdc326f0be47d15183d62e9c7c172 Author: Moshe Shemesh Date: Mon Jul 11 01:14:04 2022 -0700 net/mlx5: Use devl_ API in mlx5_esw_devlink_sf_port_register The function mlx5_esw_devlink_sf_port_register() calls devlink_port_register() and devlink_rate_leaf_create(). Use devl_ API to call devl_port_register() and devl_rate_leaf_create() accordingly and add devlink instance lock in driver paths to this function. Similarly, use devl_ API to call devl_port_unregister() and devl_rate_leaf_destroy() in mlx5_esw_devlink_sf_port_unregister() and ensure locking devlink instance lock on all the paths to this function too. This will be used by the downstream patch to invoke mlx5_devlink_eswitch_mode_set() with devlink lock held. Note this patch is taking devlink lock on mlx5_devlink_sf_port_new/del() which are devlink callbacks for port_new/del(). We will take these locks off once these callbacks will be locked by devlink too. Signed-off-by: Moshe Shemesh Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c | 10 +++++----- drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.c | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) commit f1bc646c9a06f09aad5d8bacb87103b5573ee45e Author: Moshe Shemesh Date: Mon Jul 11 01:14:03 2022 -0700 net/mlx5: Use devl_ API in mlx5_esw_offloads_devlink_port_register The function mlx5_esw_offloads_devlink_port_register() calls devlink_port_register() and devlink_rate_leaf_create(). Use devl_ API to call devl_port_register() and devl_rate_leaf_create() accordingly and add devlink instance lock in driver paths to this function. Similarly, use devl_ API to call devl_port_unregister() and devl_rate_leaf_destroy() in mlx5_esw_offloads_devlink_port_unregister() and ensure locking devlink instance lock on the paths to this function too. This will be used by the downstream patch to invoke mlx5_devlink_eswitch_mode_set() with devlink lock held. Signed-off-by: Moshe Shemesh Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c | 10 +++++----- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 4 ++++ drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 10 ++++++++++ 3 files changed, 19 insertions(+), 5 deletions(-) commit 868232f5cd382c37a5005deb7be0620c6f7bc08d Author: Moshe Shemesh Date: Mon Jul 11 01:14:02 2022 -0700 devlink: Remove unused function devlink_rate_nodes_destroy The previous patch removed the last usage of the function devlink_rate_nodes_destroy(). Thus, remove this function from devlink API. Signed-off-by: Moshe Shemesh Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: Paolo Abeni include/net/devlink.h | 1 - net/core/devlink.c | 18 ------------------ 2 files changed, 19 deletions(-) commit 03f9c47d0f7983bc73854ee34be6814b580ac7fc Author: Moshe Shemesh Date: Mon Jul 11 01:14:01 2022 -0700 net/mlx5: Use devl_ API for rate nodes destroy Use devl_rate_nodes_destroy() instead of devlink_rate_nodes_destroy(). Add devlink instance lock in the driver paths to this function to have it locked while calling devl_ API function. This will be used by the downstream patch to invoke mlx5_devlink_eswitch_mode_set() with devlink lock held. Signed-off-by: Moshe Shemesh Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 14 ++++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) commit 367dfa1212050b9418b890a2f74a3550e31b571d Author: Moshe Shemesh Date: Mon Jul 11 01:14:00 2022 -0700 net/mlx5: Remove devl_unlock from mlx5_eswtich_mode_callback_enter The function mlx5_eswtich_mode_callback_enter() was added as a temporary workaround once devlink instance lock was added to devlink eswitch callbacks. However, code review and testing show that all the callbacks part to eswitch_mode_set don't take devlink instance lock in any flow and so unlocking devlink instance lock while entering these functions is not needed. Remove devl_lock from mlx5_eswtich_mode_callback_enter() and devl_unlock from mlx5_eswtich_mode_callback_exit(). Also remove the functions mlx5_eswtich_mode_callback_enter()/exit() as they are not needed any more. The callback eswitch_mode_set will be treated separately in the following patches. Signed-off-by: Moshe Shemesh Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: Paolo Abeni .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 43 ++++++---------------- 1 file changed, 11 insertions(+), 32 deletions(-) commit be16285265868aa371378132fe37df2bc14ceb78 Author: Michael Walle Date: Thu Jul 7 15:25:00 2022 +0200 ARM: dts: kswitch-d10: enable the USB device port Now that there is driver support for the USB device, enable it. Signed-off-by: Michael Walle Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220707132500.1708020-2-michael@walle.cc arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 3af0b1d34a07f89651b4a37295da34a3dd3f2e79 Author: keliu Date: Mon Jul 11 23:50:08 2022 -0700 drivers: mcb: directly use ida_alloc()/free() Use ida_alloc()/ida_free() instead of deprecated ida_simple_get()/ida_simple_remove() . Signed-off-by: keliu Signed-off-by: Johannes Thumshirn Link: https://lore.kernel.org/r/480676bee970da16bf1fa8565277240014395ba3.1657607743.git.johannes.thumshirn@wdc.com Signed-off-by: Greg Kroah-Hartman drivers/mcb/mcb-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e3305daad62c90068e755cdae36a86ac4f02af22 Author: Leo Yan Date: Tue Jul 12 09:59:29 2022 +0800 interconnect: qcom: icc-rpm: Set bandwidth and clock for bucket values This commit uses buckets for support bandwidth and clock rates. It introduces a new function qcom_icc_bus_aggregate() to calculate the aggregate average and peak bandwidths for every bucket, and also it calculates the maximum value of aggregated average bandwidth across all buckets. The maximum aggregated average is used to calculate the final bandwidth requests. And we can set the clock rate per bucket, we use SLEEP bucket as default bucket if a platform doesn't enable the interconnect path tags in DT binding; otherwise, we use WAKE bucket to set active clock and use SLEEP bucket for other clocks. So far we don't use AMC bucket. Signed-off-by: Leo Yan Link: https://lore.kernel.org/r/20220712015929.2789881-6-leo.yan@linaro.org Signed-off-by: Georgi Djakov drivers/interconnect/qcom/icc-rpm.c | 75 ++++++++++++++++++++++++++++++------- 1 file changed, 61 insertions(+), 14 deletions(-) commit dcbce7b0a79cc5bc16759079090e1a3aa8dfea34 Author: Leo Yan Date: Tue Jul 12 09:59:28 2022 +0800 interconnect: qcom: icc-rpm: Support multiple buckets The current interconnect rpm driver uses a single aggregate bandwidth to calculate the clock rates for both active and sleep clocks; therefore, it has no chance to separate bandwidth requests for these two kinds of clocks. This patch studies the implementation from interconnect rpmh driver to support multiple buckets. The rpmh driver provides three buckets for AMC, WAKE, and SLEEP; this driver only needs to use WAKE and SLEEP buckets, but we keep the same way with rpmh driver, this can allow us to reuse the DT binding and avoid to define duplicated data structures. This patch introduces two callbacks: qcom_icc_pre_bw_aggregate() is used to clean up bucket values before aggregate bandwidth requests, and qcom_icc_bw_aggregate() is to aggregate bandwidth for buckets. Signed-off-by: Leo Yan Link: https://lore.kernel.org/r/20220712015929.2789881-5-leo.yan@linaro.org Signed-off-by: Georgi Djakov drivers/interconnect/qcom/icc-rpm.c | 51 ++++++++++++++++++++++++++++++++++++- drivers/interconnect/qcom/icc-rpm.h | 6 +++++ 2 files changed, 56 insertions(+), 1 deletion(-) commit ad510e4ed2a3b6f195c2aed6fe21a311440b489b Author: Leo Yan Date: Tue Jul 12 09:59:27 2022 +0800 interconnect: qcom: icc-rpm: Change to use qcom_icc_xlate_extended() This commit changes to use callback qcom_icc_xlate_extended(). This is a preparation for population path tags from the interconnect DT binding, it doesn't introduce functionality change for the existed DT binding without path tags. Signed-off-by: Leo Yan Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220712015929.2789881-4-leo.yan@linaro.org Signed-off-by: Georgi Djakov drivers/interconnect/qcom/icc-rpm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5e4cb0afe21e4e744ed808de1169a62ab35a57f5 Merge: 8daecf611258 d86c1568910e Author: Dave Airlie Date: Tue Jul 12 16:54:19 2022 +1000 Merge tag 'mediatek-drm-next-5.20' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-next Mediatek DRM Next for Linux 5.20 1. Add Mediatek Soc DRM (vdosys0) support for mt8195 2. Cooperate with DSI RX devices to modify dsi funcs and delay mipi high to cooperate with panel sequence 3. Add mt8186 dsi compatible and convert dsi_dtbinding to .yaml 4. Add MediaTek SoC DRM (vdosys1) support for mt8195 5. Add MT8195 dp_intf driver Signed-off-by: Dave Airlie [airlied: fix drm_edid.h include] From: Chun-Kuang Hu Link: https://patchwork.freedesktop.org/patch/msgid/20220709142021.24260-1-chunkuang.hu@kernel.org commit cb4805b5a5e44063d2b194d97e705888eaf59005 Author: Leo Yan Date: Tue Jul 12 09:59:26 2022 +0800 interconnect: qcom: Move qcom_icc_xlate_extended() to a common file since there have conflict between two headers icc-rpmh.h and icc-rpm.h, the function qcom_icc_xlate_extended() is declared in icc-rpmh.h thus it cannot be used by icc-rpm driver. Move the function to a new common file icc-common.c so that allow it to be called by multiple drivers. Signed-off-by: Leo Yan Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220712015929.2789881-3-leo.yan@linaro.org Signed-off-by: Georgi Djakov drivers/interconnect/qcom/Makefile | 3 +++ drivers/interconnect/qcom/icc-common.c | 34 ++++++++++++++++++++++++++++++++++ drivers/interconnect/qcom/icc-common.h | 13 +++++++++++++ drivers/interconnect/qcom/icc-rpmh.c | 26 +------------------------- drivers/interconnect/qcom/icc-rpmh.h | 1 - drivers/interconnect/qcom/sm8450.c | 1 + 6 files changed, 52 insertions(+), 26 deletions(-) commit 2c510f5bee760a83b1ce0790dcccb8301dd41ce8 Author: Leo Yan Date: Tue Jul 12 09:59:25 2022 +0800 dt-bindings: interconnect: Update property for icc-rpm path tag To support path tag in icc-rpm driver, the "#interconnect-cells" property is updated as enumerate values: 1 or 2. Setting to 1 means it is compatible with old DT binding that interconnect path only contains node id; if set to 2 for "#interconnect-cells" property, then the second specifier is used as a tag (e.g. vote for which buckets). Signed-off-by: Leo Yan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220712015929.2789881-2-leo.yan@linaro.org Signed-off-by: Georgi Djakov Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8daecf611258d252b3107132d0143752b2e186fc Merge: b45b4f880fb6 135f4c551d51 Author: Dave Airlie Date: Tue Jul 12 15:50:41 2022 +1000 Merge tag 'drm/tegra/for-5.20-rc1' of https://gitlab.freedesktop.org/drm/tegra into drm-next drm/tegra: Changes for v5.20-rc1 The bulk of these changes adds support for context isolation for the various supported host1x engines, as well as support for the hardware found on the new Tegra234 SoC generation. There's also a couple of fixes and cleanups. To round things off, the device tree bindings are converted to the new json-schema format that allows DTBs to be validated. Signed-off-by: Dave Airlie From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20220708181136.673789-1-thierry.reding@gmail.com commit c51ba246cb172c9e947dc6fb8868a1eaf0b2a913 Author: Robin Murphy Date: Tue Jul 12 08:46:45 2022 +0200 swiotlb: fail map correctly with failed io_tlb_default_mem In the failure case of trying to use a buffer which we'd previously failed to allocate, the "!mem" condition is no longer sufficient since io_tlb_default_mem became static and assigned by default. Update the condition to work as intended per the rest of that conversion. Fixes: 463e862ac63e ("swiotlb: Convert io_default_tlb_mem to static allocation") Signed-off-by: Robin Murphy Signed-off-by: Christoph Hellwig kernel/dma/swiotlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a919b823abba8cb84bb99e007ea8a01ed9f5410a Author: Oded Gabbay Date: Sun Jul 10 14:14:04 2022 +0300 habanalabs: move h/w dirty message to debug H/W being dirty during initialization is completely expected in case f/w tools are used before loading the driver. As it is not an error, and as it doesn't give any meaningful information to the user, no point of printing it. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 3 +-- drivers/misc/habanalabs/gaudi2/gaudi2.c | 2 +- drivers/misc/habanalabs/goya/goya.c | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) commit 0b0ae024402954d3547ac187cac5e3c6884571f4 Author: Oded Gabbay Date: Thu Jul 7 12:00:24 2022 +0300 habanalabs: rename soft reset to compute reset Doing compute reset can be the traditional inference soft reset that is supported only in Goya. Or it can be the new reset upon device release, which is supported in Gaudi2 and above. Therefore, wherever suitable, use the terminology of compute reset instead of soft reset. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 28 +++++++++++------------ drivers/misc/habanalabs/common/firmware_if.c | 4 ++-- drivers/misc/habanalabs/common/habanalabs.h | 16 ++++++------- drivers/misc/habanalabs/common/habanalabs_ioctl.c | 2 +- drivers/misc/habanalabs/common/irq.c | 2 +- drivers/misc/habanalabs/common/sysfs.c | 2 +- drivers/misc/habanalabs/gaudi2/gaudi2.c | 4 ++-- drivers/misc/habanalabs/goya/goya.c | 2 +- 8 files changed, 30 insertions(+), 30 deletions(-) commit e3b20f3ee452e3ce1077822b2558846eb4fe571f Author: Oded Gabbay Date: Thu Jul 7 11:42:15 2022 +0300 habanalabs: add status of reset after device release The user might want to know the device is in reset after device release, which is not an erroneous event as a regular reset. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 17 +++++++++++------ drivers/misc/habanalabs/common/habanalabs_drv.c | 6 +++++- include/uapi/misc/habanalabs.h | 5 ++++- 3 files changed, 20 insertions(+), 8 deletions(-) commit bd4a338886a8cc5809f45d569df395acb846ce8e Author: Oded Gabbay Date: Thu Jul 7 11:39:19 2022 +0300 habanalabs: fix update of is_in_soft_reset reset_info.is_in_soft_reset should be updated both before in_reset and inside the spin lock of the reset info structure. The reasons are: - When we are inside soft reset, it implies we are in reset. Therefore, if someone checks if we are in soft reset, he can deduce we are in reset, while the opposite is not correct and might be misleading. - Both these flags are changed together so they must be changed inside the reset info spinlock. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 08f0aa9548fd624f7ad5ae1135423706b5e9fa6a Author: Ofir Bitton Date: Thu Jun 30 09:54:59 2022 +0300 habanalabs: expose only valid debugfs nodes In case security is enabled on the device, some debugfs nodes will fail. Hence, we do not expose them. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay .../ABI/testing/debugfs-driver-habanalabs | 24 ++++-- drivers/misc/habanalabs/common/debugfs.c | 94 ++++++++++++---------- 2 files changed, 66 insertions(+), 52 deletions(-) commit 168fc71857efad3e122d7b26889824844b1e7146 Author: Tomer Tayar Date: Thu Jun 30 22:05:51 2022 +0300 habanalabs/gaudi2: map virtual MSI-X doorbell memory for user Upon the initialization of a user context, map the host memory page of the virtual MSI-X doorbell in the device MMU. A reserved VA is used for this purpose, so user can use it directly without any allocation/map operation. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 43 +++++++++++++++++++++++-- drivers/misc/habanalabs/include/gaudi2/gaudi2.h | 3 ++ 2 files changed, 44 insertions(+), 2 deletions(-) commit 3f043b3192454e430ece973a75c5b9fd9a344dd8 Author: Tomer Tayar Date: Thu Jun 30 11:22:54 2022 +0300 habanalabs/gaudi2: modify decoder to use virtual MSI-X doorbell Modify the decoder wrapper blocks to generate interrupts using the virtual MSI-X doorbell. As a decoder wrapper block cannot write directly to HBW upon completion, it writes instead to SOB which is monitored by a master monitor. When resolved, this monitor will be the one to actually write to the virtual MSI-X doorbell. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 148 +++++++++++++++++++-- drivers/misc/habanalabs/gaudi2/gaudi2P.h | 15 +++ drivers/misc/habanalabs/gaudi2/gaudi2_masks.h | 3 + .../include/gaudi2/asic_reg/gaudi2_regs.h | 6 + 4 files changed, 161 insertions(+), 11 deletions(-) commit bfbf5a0a711f111564de5d8f6bab7063ba4af2d8 Author: Tomer Tayar Date: Thu Jun 30 18:40:59 2022 +0300 habanalabs/gaudi2: modify CS completion CQ to use virtual MSI-X doorbell Modify the CQ which is used for CS completion, to use the virtual MSI-X doorbell. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 25ad86383968698b95264cb54c8d662381e20312 Author: Tomer Tayar Date: Wed Jun 29 19:20:38 2022 +0300 habanalabs/gaudi2: replace defines for reserved sob/mob with enums Following patches are going to add more reserved sync objects and monitors. To make the counting of these reserved resources simpler, replace the existing RESERVED_* defines with enumerations. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 48 +++++++++++++----------- drivers/misc/habanalabs/gaudi2/gaudi2P.h | 26 +++++++++---- drivers/misc/habanalabs/gaudi2/gaudi2_security.c | 4 +- 3 files changed, 46 insertions(+), 32 deletions(-) commit 1cf596c6b9ac07a94fa8489866511e76f9c7644b Author: Tomer Tayar Date: Wed Jun 29 16:37:55 2022 +0300 habanalabs/gaudi2: configure virtual MSI-X doorbell interface Due to a watchdog timer in the LBW path, writes to the MSI-X doorbell can return sporadic error responses. To work-around this issue, a virtual MSI-X doorbell on the HBW path is configured, using the MSI-X AXI slave interface in the PCIe controller. Upon an access to a configured HBW host address, the controller will generate MSI-X interrupt instead of treating the access as regular host memory access. This patch allocates the dedicate host memory page, and communicate the address to F/W, so it will configure the relevant address match registers in the controller, and will use this address to generate MSI-X interrupts for F/W events. Following patches will handle other initiators in the device, to move them to use the virtual MSI-X doorbell. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 23 ++++++++++++++++++++--- drivers/misc/habanalabs/gaudi2/gaudi2P.h | 5 +++++ drivers/misc/habanalabs/gaudi2/gaudi2_masks.h | 3 +++ 3 files changed, 28 insertions(+), 3 deletions(-) commit af2e650b36a9a0c0e127dde20c394cbbf318e729 Author: Tomer Tayar Date: Wed Jul 6 10:20:54 2022 +0300 habanalabs: add a value field to hl_fw_send_pci_access_msg() For gaudi2 we need to send a value to F/W as part of the PCI_ACCESS packet. As a preparation, modify hl_fw_send_pci_access_msg() to have a 'value' field. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 5 ++--- drivers/misc/habanalabs/common/firmware_if.c | 6 +++--- drivers/misc/habanalabs/common/habanalabs.h | 2 +- drivers/misc/habanalabs/gaudi/gaudi.c | 6 +++--- drivers/misc/habanalabs/gaudi2/gaudi2.c | 6 +++--- drivers/misc/habanalabs/goya/goya.c | 4 ++-- 6 files changed, 14 insertions(+), 15 deletions(-) commit 20cd88a775381e3ea4c2e88447a79f8715db1af7 Author: Ohad Sharabi Date: Mon Jul 4 08:33:57 2022 +0300 habanalabs: fixes to the poll-timeout macros - use conventional internal macro variables (double underscore prefix) - adjust address casting - on register poll using ELBI use ELBI read rather than BAR read on error condition - remove unused macro Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/habanalabs.h | 119 +++++++++++++++++++++------- 1 file changed, 90 insertions(+), 29 deletions(-) commit 3fc252670bd53f139d24c3aaafa566d54b631ca7 Author: Ohad Sharabi Date: Thu Jul 7 16:03:14 2022 +0300 habanalabs/gaudi2: use DIV_ROUND_UP_SECTOR_T instead of roundup roundup will create an error in 32-bit architectures as we use 64-bit variables. Reported-by: kernel test robot Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit b596ad6f11950ac7e424fc32acb96f5a7eeb4d7d Author: Oded Gabbay Date: Tue Jul 5 11:04:56 2022 +0300 habanalabs: initialize variable explicitly Fix warning of "warning: ‘old_base’ may be used uninitialized in this function" Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d24b4d17df714c4a75255d5f18b1ec9007d13b5 Author: Christophe JAILLET Date: Sun Jul 3 22:36:30 2022 +0200 habanalabs: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/asid.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ead36b198147711ec2f8fe83b66ec8e30de732db Author: Oded Gabbay Date: Mon Jul 4 12:05:30 2022 +0300 habanalabs/gaudi2: remove unused defines There were some defines that are unused in the current upstreamed code. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 7 ------- drivers/misc/habanalabs/gaudi2/gaudi2.c | 4 ---- drivers/misc/habanalabs/gaudi2/gaudi2_coresight.c | 2 -- 3 files changed, 13 deletions(-) commit cf008f5acb9047891f7fa7c234bd838120fe1b50 Author: Oded Gabbay Date: Mon Jul 4 11:53:57 2022 +0300 habanalabs: make sure variable is set before used timestamp could be unset in both _hl_interrupt_wait_ioctl() and _hl_interrupt_wait_ioctl_user_addr() so it is better to explicitly initialize it to 0 when declaring it. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/command_submission.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2d9ec872c5db258ba8998b6b4c17866fca95ada Author: Oded Gabbay Date: Mon Jul 4 11:51:55 2022 +0300 habanalabs: don't declare tmp twice in same function tmp is declared in the scope of the function cs_do_release() and inside a block inside that function. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/command_submission.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cc81c0f3b03e2830665975419893d3a0445fca85 Author: Ofir Bitton Date: Thu Jun 30 14:37:03 2022 +0300 habanalabs: do not set max power on a secured device Max power API is not supported in secured devices. Hence, we should skip setting it during boot. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e475acabb9d99fb80828964bbeeb4e283942173c Author: Oded Gabbay Date: Thu Jun 30 11:53:33 2022 +0300 habanalabs/gaudi2: SM mask can only be 8-bit Otherwise, due to how we calculate it, we might fail in FIELD_PREP checks. Reported-by: kernel test robot Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c979cb5d8bf955e0303b951f066a9a525fda015f Author: Oded Gabbay Date: Thu Jun 30 11:07:59 2022 +0300 habanalabs/gaudi2: remove unused variable glbl_sts_clr_val was set but never used Reported-by: kernel test robot Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 18913d68701918d784809e4b9462f51a7270e840 Author: Oded Gabbay Date: Thu Jun 30 09:30:49 2022 +0300 habanalabs: allow detection of unsupported f/w packets If we send a packet to the f/w, and that packet is unsupported, we want to be able to identify this situation and possibly ignore this. Therefore, if the f/w returned an error, we need to propagate it to the callers in the result value, if those callers were interested in it. In addition, no point of printing the error code here because each caller prints its own error with a specific message. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/firmware_if.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit ea9770e653eecb40422e905b29d3e6b155b5ee3e Author: Sagiv Ozeri Date: Tue Jun 28 13:25:48 2022 +0300 habanalabs: save f/w preboot minor version We need this property for backward compatibility against the f/w. Signed-off-by: Sagiv Ozeri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/firmware_if.c | 49 +++++++++++++++++++++++----- drivers/misc/habanalabs/common/habanalabs.h | 4 ++- 2 files changed, 44 insertions(+), 9 deletions(-) commit d6a66d59609fc45afc91149e13dddafb8faff0d6 Author: Ofir Bitton Date: Tue Jun 28 18:34:58 2022 +0300 habanalabs: add support for common decoder interrupts User application should be able to get notification for any decoder completion. Hence, we introduce a new interface in which a user can wait for all current decoder pending interrupts. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/command_submission.c | 5 +++++ drivers/misc/habanalabs/common/habanalabs.h | 3 +++ drivers/misc/habanalabs/common/irq.c | 9 +++------ drivers/misc/habanalabs/gaudi2/gaudi2.c | 4 ++++ include/uapi/misc/habanalabs.h | 4 ++++ 5 files changed, 19 insertions(+), 6 deletions(-) commit 1a6609cdd496b1d2183189674962035903025976 Author: Ofir Bitton Date: Tue Jun 28 21:05:28 2022 +0300 habanalabs: naming refactor of user interrupt flow Current naming convention can be misleading. Hence renaming some variables and defines in order to be more explicit. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/command_submission.c | 6 +++--- drivers/misc/habanalabs/common/habanalabs.h | 8 ++++---- drivers/misc/habanalabs/common/irq.c | 12 ++++++------ drivers/misc/habanalabs/gaudi2/gaudi2.c | 6 +++--- include/uapi/misc/habanalabs.h | 7 +++++-- 5 files changed, 21 insertions(+), 18 deletions(-) commit 2b9e583d0aadcf6578e2595c07d3b1e898013d17 Author: Ohad Sharabi Date: Tue Jun 28 12:09:21 2022 +0300 habanalabs: wait for preboot ready after hard reset Currently we are not waiting for preboot ready after hard reset. This leads to a race in which COMMs protocol begins but will get no response from the f/w. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/firmware_if.c | 65 ++++++++++++++++++---------- drivers/misc/habanalabs/common/habanalabs.h | 27 ++++++++++-- drivers/misc/habanalabs/gaudi/gaudi.c | 19 +++++--- drivers/misc/habanalabs/gaudi2/gaudi2.c | 19 +++++--- drivers/misc/habanalabs/goya/goya.c | 19 +++++--- 5 files changed, 107 insertions(+), 42 deletions(-) commit a85e389a845825a1ed3d26dd95fe24d5ad71531d Author: Ofir Bitton Date: Tue Jun 28 08:34:28 2022 +0300 habanalabs/gaudi2: reset device upon critical ECC event Correctable ECC events are not fatal, but as they accumulate, the f/w can decide that a hard-rest is required. This indication is propagated to the host using the existing ECC event interface. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 25 ++++++++++++++--------- drivers/misc/habanalabs/include/common/cpucp_if.h | 2 +- 2 files changed, 16 insertions(+), 11 deletions(-) commit 6b4e8a12b2b9a5385b89d25ac450deddb8ed9a62 Author: Oded Gabbay Date: Mon Jun 27 22:32:07 2022 +0300 habanalabs: enable gaudi2 code in driver Enable the Gaudi2 ASIC code in the pci probe callback of the driver so the driver will handle Gaudi2 ASICs. Add the PCI ID to the PCI table and add the ASIC enum value to all relevant places. Fixup the device parameters initialization for Gaudi2. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 8 ++++ drivers/misc/habanalabs/common/habanalabs_drv.c | 56 +++++++++++++++++++++---- drivers/misc/habanalabs/common/sysfs.c | 6 +++ 3 files changed, 63 insertions(+), 7 deletions(-) commit 8aa1e1e605535a0ba7fb80aeeaf94f875a9474c3 Author: Moti Haimovski Date: Mon Jun 27 17:21:39 2022 +0300 habanalabs: add gaudi2 MMU support Gaudi2 has new MMU units. A PMMU for device->host accesses, and HMMU for HBM accesses. The page tables of both MMUs are located in the host's memory (referred to in the code as host-resident pgt). Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/debugfs.c | 77 +++- drivers/misc/habanalabs/common/habanalabs.h | 99 ++++- drivers/misc/habanalabs/common/habanalabs_ioctl.c | 2 +- drivers/misc/habanalabs/common/memory.c | 21 +- drivers/misc/habanalabs/common/mmu/Makefile | 3 +- drivers/misc/habanalabs/common/mmu/mmu.c | 496 +++++++++++++++++++++- drivers/misc/habanalabs/common/mmu/mmu_v2_hr.c | 399 +++++++++++++++++ 7 files changed, 1064 insertions(+), 33 deletions(-) commit f73c63764572c0cdf778b15e2764d5d631be1667 Author: Oded Gabbay Date: Mon Jun 27 15:05:28 2022 +0300 habanalabs: add gaudi2 wait-for-CS support In Gaudi2 we moved to a different wait for command submission completion model. Instead of receiving interrupt only on external queues, we use the device's sync manager to notify us when the entire command submission finishes. This enables us to remove the categorization of queues to external and internal, and treat each queue equally, without the need to parse and patch any command buffer. This change also requires refactoring to the IRQ handling of CS completions. Signed-off-by: Oded Gabbay .../misc/habanalabs/common/command_submission.c | 118 +++++++++++++-------- drivers/misc/habanalabs/common/debugfs.c | 21 ++-- drivers/misc/habanalabs/common/device.c | 48 ++++++--- drivers/misc/habanalabs/common/habanalabs.h | 6 ++ drivers/misc/habanalabs/common/hw_queue.c | 10 ++ drivers/misc/habanalabs/common/irq.c | 94 ++++++++++++---- drivers/misc/habanalabs/common/security.c | 2 +- 7 files changed, 210 insertions(+), 89 deletions(-) commit de88aa67af94af9e413dfbd794394c2176e649ce Author: Benjamin Dotan Date: Sun Jun 26 21:35:07 2022 +0300 habanalabs/gaudi2: add gaudi2 profiler module Add the Gaudi2 code to initialize the ASIC's profiler. The profile receives its initialization values from the user, same as in Gaudi2, but the code to initialize is in the driver because the configuration space of the device is not directly exposed to the user. Signed-off-by: Benjamin Dotan Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/Makefile | 1 + drivers/misc/habanalabs/gaudi2/gaudi2.c | 8 +- drivers/misc/habanalabs/gaudi2/gaudi2_coresight.c | 2722 ++++++++++++++++++++ .../misc/habanalabs/gaudi2/gaudi2_coresight_regs.h | 1063 ++++++++ 4 files changed, 3792 insertions(+), 2 deletions(-) commit 4567214686124987d54c270bdff1a1810ccf71c3 Author: Ofir Bitton Date: Sun Jun 26 21:30:25 2022 +0300 habanalabs/gaudi2: add gaudi2 security module Use the generic security module to block all registers in the ASIC and then open only those that are needed to be accessed by the user. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/Makefile | 2 +- drivers/misc/habanalabs/gaudi2/gaudi2.c | 16 +- drivers/misc/habanalabs/gaudi2/gaudi2P.h | 2 + drivers/misc/habanalabs/gaudi2/gaudi2_security.c | 3849 ++++++++++++++++++++++ 4 files changed, 3867 insertions(+), 2 deletions(-) commit e392d1bd0437d7ac3c945ccdb5362b775c207d67 Author: Ofir Bitton Date: Sun Jun 26 21:24:50 2022 +0300 habanalabs: add generic security module As the ASICs become more complex and have many more registers, we need a better way to configure the security properties. As a reminder, we have two dedicated mechanisms for security: Range Registers and Protection bits. Those mechanisms protect sensitive memory and configuration areas inside the device. The generic module handles the low-level part of the configuration, because the configuration mechanism is identical in all ASICs. The difference is the address ranges and register names. Any ASIC that use this block should first block all the register blocks in the ASIC. Then, it should open only the registers that need to be accessed by the user (This is opposed to Goya and Gaudi, where we blocked only what should not be accesses by the user). The module contains several functions, to unblock single register, multiple registers, entire blocks, ranges, ranges with mask. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/Makefile | 4 +- drivers/misc/habanalabs/common/habanalabs.h | 69 ++++ drivers/misc/habanalabs/common/security.c | 600 ++++++++++++++++++++++++++++ 3 files changed, 671 insertions(+), 2 deletions(-) commit c47082c22db17115ae3312474e0c552bbbe37b52 Author: Oded Gabbay Date: Tue Jun 28 10:53:17 2022 +0300 habanalabs: remove obsolete device variables used for testing There are a couple of device variables that are used for testing purposes and they are set to fixed values. Remove the variables that are not relevant anymore and document the remaining variables. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 3 +- drivers/misc/habanalabs/common/habanalabs.h | 25 +++-- drivers/misc/habanalabs/common/habanalabs_drv.c | 14 +-- drivers/misc/habanalabs/common/pci/pci.c | 24 ----- drivers/misc/habanalabs/gaudi/gaudi.c | 131 +----------------------- 5 files changed, 24 insertions(+), 173 deletions(-) commit be7813eaa6317abebcc123f70efaf7bebea4fcdc Author: Oded Gabbay Date: Fri Jun 24 16:58:23 2022 +0300 habanalabs: initialize new asic properties New asic properties were added for Gaudi2. We want to initialize and use them, when relevant, also for Goya and Gaudi. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/habanalabs_ioctl.c | 21 ++++++++++++++------- drivers/misc/habanalabs/gaudi/gaudi.c | 18 ++++++++++++------ drivers/misc/habanalabs/goya/goya.c | 3 ++- 3 files changed, 28 insertions(+), 14 deletions(-) commit 9e17258c78aef93225920970f5a93876097c859f Author: Oded Gabbay Date: Fri Jun 24 16:47:13 2022 +0300 habanalabs: add unsupported functions There are a number of new ASIC-specific functions that were added for Gaudi2. To make the common code work, we need to define empty implementations of those functions for Goya and Gaudi. Some functions will return error if called with Goya/Gaudi. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 21 +++++++++++++++++++++ drivers/misc/habanalabs/goya/goya.c | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) commit d7bb1ac89b2f5e230ec87659dabd2600897e49ef Author: Oded Gabbay Date: Sun Jun 26 18:20:03 2022 +0300 habanalabs: add gaudi2 asic-specific code Add the ASIC-specific code for Gaudi2. Supply (almost) all of the function callbacks that the driver's common code need to initialize, finalize and submit workloads to the Gaudi2 ASIC. It also contains the code to initialize the F/W of the Gaudi2 ASIC and to receive events from the F/W. It contains new debugfs entry to dump razwi events. razwi is a case where the device's engines create a transaction that reaches an invalid destination. Signed-off-by: Oded Gabbay .../ABI/testing/debugfs-driver-habanalabs | 11 +- drivers/misc/habanalabs/Makefile | 3 + drivers/misc/habanalabs/common/Makefile | 3 +- .../misc/habanalabs/common/command_submission.c | 5 +- drivers/misc/habanalabs/common/context.c | 3 + drivers/misc/habanalabs/common/debugfs.c | 22 + drivers/misc/habanalabs/common/decoder.c | 133 + drivers/misc/habanalabs/common/device.c | 10 + drivers/misc/habanalabs/common/firmware_if.c | 26 + drivers/misc/habanalabs/common/habanalabs.h | 247 +- drivers/misc/habanalabs/common/habanalabs_drv.c | 1 - drivers/misc/habanalabs/common/habanalabs_ioctl.c | 2 +- drivers/misc/habanalabs/common/irq.c | 45 +- drivers/misc/habanalabs/common/memory.c | 4 +- drivers/misc/habanalabs/common/pci/pci.c | 14 +- drivers/misc/habanalabs/gaudi/gaudi.c | 2 +- drivers/misc/habanalabs/gaudi2/Makefile | 3 + drivers/misc/habanalabs/gaudi2/gaudi2.c | 9757 ++++++++++++++++++++ drivers/misc/habanalabs/gaudi2/gaudi2P.h | 534 ++ drivers/misc/habanalabs/gaudi2/gaudi2_masks.h | 135 + drivers/misc/habanalabs/goya/goya.c | 2 +- drivers/misc/habanalabs/include/common/cpucp_if.h | 294 +- .../misc/habanalabs/include/common/hl_boot_if.h | 7 + 23 files changed, 11165 insertions(+), 98 deletions(-) commit 97c6d22fa4bd54cccff39e862893327eef1bbfa8 Author: Oded Gabbay Date: Fri Jun 24 13:38:57 2022 +0300 uapi: habanalabs: add gaudi2 defines Add the new defines for GAUDI2 uapi interface. It includes the following: 1. Enums of engines and PLLs. 2. New information in the info IOCTL that is retrieved by the driver. 3. Update comments regarding the CB/CS/wait for CS ioctls. 4. New fields in the debug IOCTL for configuring the profiler for Gaudi2. There is no new IOCTL. Some of the changes are also relevant for Greco (which will be upstreamed later this year). When ever it says "Greco and onwards", it means it is also for Gaudi2. Signed-off-by: Oded Gabbay include/uapi/misc/habanalabs.h | 455 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 435 insertions(+), 20 deletions(-) commit 01d9ccf8657b54960862fb9db4bab5f73c766b47 Author: Oded Gabbay Date: Fri Jun 24 18:56:42 2022 +0300 habanalabs/gaudi2: add asic registers header files Add the relevant GAUDI2 ASIC registers header files. These files are generated automatically from a tool maintained by the VLSI engineers. There are more files which are not upstreamed because only very few defines from those files are used in the driver. For those files, I copied the relevant defines into gaudi2_regs.h and gaudi2_masks.h, to reduce the size of this patch. Signed-off-by: Oded Gabbay .../include/gaudi2/arc/gaudi2_arc_common_packets.h | 213 + .../gaudi2/asic_reg/arc_farm_arc0_acp_eng_regs.h | 567 + .../gaudi2/asic_reg/arc_farm_arc0_aux_masks.h | 819 + .../gaudi2/asic_reg/arc_farm_arc0_aux_regs.h | 591 + .../asic_reg/arc_farm_arc0_dup_eng_axuser_regs.h | 61 + .../gaudi2/asic_reg/arc_farm_arc0_dup_eng_regs.h | 575 + .../asic_reg/arc_farm_kdma_ctx_axuser_masks.h | 135 + .../asic_reg/arc_farm_kdma_ctx_axuser_regs.h | 61 + .../gaudi2/asic_reg/arc_farm_kdma_ctx_masks.h | 221 + .../gaudi2/asic_reg/arc_farm_kdma_ctx_regs.h | 95 + .../gaudi2/asic_reg/arc_farm_kdma_kdma_cgm_regs.h | 29 + .../include/gaudi2/asic_reg/arc_farm_kdma_masks.h | 415 + .../include/gaudi2/asic_reg/arc_farm_kdma_regs.h | 157 + .../include/gaudi2/asic_reg/cpu_if_regs.h | 777 + .../gaudi2/asic_reg/dcore0_dec0_cmd_masks.h | 229 + .../include/gaudi2/asic_reg/dcore0_dec0_cmd_regs.h | 85 + .../asic_reg/dcore0_edma0_core_ctx_axuser_regs.h | 61 + .../gaudi2/asic_reg/dcore0_edma0_core_ctx_regs.h | 95 + .../gaudi2/asic_reg/dcore0_edma0_core_masks.h | 415 + .../gaudi2/asic_reg/dcore0_edma0_core_regs.h | 157 + .../gaudi2/asic_reg/dcore0_edma0_qm_arc_aux_regs.h | 591 + .../dcore0_edma0_qm_axuser_nonsecured_regs.h | 61 + .../gaudi2/asic_reg/dcore0_edma0_qm_cgm_regs.h | 29 + .../gaudi2/asic_reg/dcore0_edma0_qm_masks.h | 1165 + .../include/gaudi2/asic_reg/dcore0_edma0_qm_regs.h | 1057 + .../asic_reg/dcore0_edma1_core_ctx_axuser_regs.h | 61 + .../dcore0_edma1_qm_axuser_nonsecured_regs.h | 61 + .../gaudi2/asic_reg/dcore0_hmmu0_mmu_masks.h | 294 + .../gaudi2/asic_reg/dcore0_hmmu0_mmu_regs.h | 237 + .../gaudi2/asic_reg/dcore0_hmmu0_stlb_masks.h | 348 + .../gaudi2/asic_reg/dcore0_hmmu0_stlb_regs.h | 141 + .../include/gaudi2/asic_reg/dcore0_mme_acc_regs.h | 73 + ...dcore0_mme_ctrl_lo_arch_agu_cout0_master_regs.h | 33 + .../dcore0_mme_ctrl_lo_arch_agu_cout0_slave_regs.h | 33 + ...dcore0_mme_ctrl_lo_arch_agu_cout1_master_regs.h | 33 + .../dcore0_mme_ctrl_lo_arch_agu_cout1_slave_regs.h | 33 + .../dcore0_mme_ctrl_lo_arch_agu_in0_master_regs.h | 33 + .../dcore0_mme_ctrl_lo_arch_agu_in0_slave_regs.h | 33 + .../dcore0_mme_ctrl_lo_arch_agu_in1_master_regs.h | 33 + .../dcore0_mme_ctrl_lo_arch_agu_in1_slave_regs.h | 33 + .../dcore0_mme_ctrl_lo_arch_agu_in2_master_regs.h | 33 + .../dcore0_mme_ctrl_lo_arch_agu_in2_slave_regs.h | 33 + .../dcore0_mme_ctrl_lo_arch_agu_in3_master_regs.h | 33 + .../dcore0_mme_ctrl_lo_arch_agu_in3_slave_regs.h | 33 + .../dcore0_mme_ctrl_lo_arch_agu_in4_master_regs.h | 33 + .../dcore0_mme_ctrl_lo_arch_agu_in4_slave_regs.h | 33 + .../dcore0_mme_ctrl_lo_arch_base_addr_regs.h | 39 + .../dcore0_mme_ctrl_lo_arch_non_tensor_end_regs.h | 73 + ...dcore0_mme_ctrl_lo_arch_non_tensor_start_regs.h | 35 + .../dcore0_mme_ctrl_lo_arch_tensor_a_regs.h | 67 + .../dcore0_mme_ctrl_lo_arch_tensor_b_regs.h | 67 + .../dcore0_mme_ctrl_lo_arch_tensor_cout_regs.h | 67 + .../gaudi2/asic_reg/dcore0_mme_ctrl_lo_masks.h | 468 + .../asic_reg/dcore0_mme_ctrl_lo_mme_axuser_regs.h | 61 + .../gaudi2/asic_reg/dcore0_mme_ctrl_lo_regs.h | 163 + .../asic_reg/dcore0_mme_qm_arc_acp_eng_regs.h | 567 + .../gaudi2/asic_reg/dcore0_mme_qm_arc_aux_regs.h | 591 + .../dcore0_mme_qm_arc_dup_eng_axuser_regs.h | 61 + .../asic_reg/dcore0_mme_qm_arc_dup_eng_regs.h | 575 + .../dcore0_mme_qm_axuser_nonsecured_regs.h | 61 + .../asic_reg/dcore0_mme_qm_axuser_secured_regs.h | 61 + .../gaudi2/asic_reg/dcore0_mme_qm_cgm_regs.h | 29 + .../include/gaudi2/asic_reg/dcore0_mme_qm_regs.h | 1057 + .../gaudi2/asic_reg/dcore0_mme_sbte0_masks.h | 107 + .../dcore0_mme_sbte0_mstr_if_axuser_regs.h | 61 + .../asic_reg/dcore0_mme_wb0_mstr_if_axuser_regs.h | 61 + .../gaudi2/asic_reg/dcore0_rtr0_ctrl_regs.h | 291 + .../dcore0_rtr0_mstr_if_rr_prvt_hbw_regs.h | 213 + .../dcore0_rtr0_mstr_if_rr_prvt_lbw_regs.h | 189 + .../dcore0_rtr0_mstr_if_rr_shrd_hbw_regs.h | 213 + .../dcore0_rtr0_mstr_if_rr_shrd_lbw_regs.h | 189 + .../gaudi2/asic_reg/dcore0_sync_mngr_glbl_masks.h | 135 + .../gaudi2/asic_reg/dcore0_sync_mngr_glbl_regs.h | 1203 + .../dcore0_sync_mngr_mstr_if_axuser_masks.h | 135 + .../dcore0_sync_mngr_mstr_if_axuser_regs.h | 61 + .../gaudi2/asic_reg/dcore0_sync_mngr_objs_masks.h | 87 + .../gaudi2/asic_reg/dcore0_sync_mngr_objs_regs.h | 43543 ++++++++++++++++++ .../gaudi2/asic_reg/dcore0_tpc0_cfg_axuser_regs.h | 61 + .../gaudi2/asic_reg/dcore0_tpc0_cfg_kernel_regs.h | 129 + .../dcore0_tpc0_cfg_kernel_tensor_0_regs.h | 63 + .../gaudi2/asic_reg/dcore0_tpc0_cfg_masks.h | 509 + .../gaudi2/asic_reg/dcore0_tpc0_cfg_qm_regs.h | 129 + .../asic_reg/dcore0_tpc0_cfg_qm_sync_object_regs.h | 27 + .../asic_reg/dcore0_tpc0_cfg_qm_tensor_0_regs.h | 63 + .../include/gaudi2/asic_reg/dcore0_tpc0_cfg_regs.h | 229 + .../gaudi2/asic_reg/dcore0_tpc0_cfg_special_regs.h | 185 + .../asic_reg/dcore0_tpc0_eml_busmon_0_regs.h | 163 + .../gaudi2/asic_reg/dcore0_tpc0_eml_etf_regs.h | 113 + .../gaudi2/asic_reg/dcore0_tpc0_eml_funnel_regs.h | 75 + .../gaudi2/asic_reg/dcore0_tpc0_eml_spmu_regs.h | 151 + .../gaudi2/asic_reg/dcore0_tpc0_eml_stm_regs.h | 131 + .../gaudi2/asic_reg/dcore0_tpc0_qm_arc_aux_regs.h | 591 + .../dcore0_tpc0_qm_axuser_nonsecured_regs.h | 61 + .../gaudi2/asic_reg/dcore0_tpc0_qm_cgm_regs.h | 29 + .../include/gaudi2/asic_reg/dcore0_tpc0_qm_regs.h | 1057 + .../dcore0_vdec0_brdg_ctrl_axuser_dec_regs.h | 61 + ...dcore0_vdec0_brdg_ctrl_axuser_msix_abnrm_regs.h | 61 + .../dcore0_vdec0_brdg_ctrl_axuser_msix_l2c_regs.h | 61 + .../dcore0_vdec0_brdg_ctrl_axuser_msix_nrm_regs.h | 61 + .../dcore0_vdec0_brdg_ctrl_axuser_msix_vcd_regs.h | 61 + .../gaudi2/asic_reg/dcore0_vdec0_brdg_ctrl_masks.h | 581 + .../gaudi2/asic_reg/dcore0_vdec0_brdg_ctrl_regs.h | 245 + .../asic_reg/dcore0_vdec0_ctrl_special_regs.h | 185 + .../gaudi2/asic_reg/dcore1_mme_ctrl_lo_regs.h | 163 + .../gaudi2/asic_reg/dcore3_mme_ctrl_lo_regs.h | 163 + .../gaudi2/asic_reg/gaudi2_blocks_linux_driver.h | 45067 +++++++++++++++++++ .../include/gaudi2/asic_reg/gaudi2_regs.h | 544 + .../include/gaudi2/asic_reg/nic0_qm0_cgm_regs.h | 29 + .../include/gaudi2/asic_reg/nic0_qm0_regs.h | 1057 + .../gaudi2/asic_reg/nic0_qm_arc_aux0_regs.h | 591 + .../include/gaudi2/asic_reg/nic0_qpc0_regs.h | 905 + .../nic0_umr0_0_completion_queue_ci_1_regs.h | 27 + .../asic_reg/nic0_umr0_0_unsecure_doorbell0_regs.h | 31 + .../include/gaudi2/asic_reg/pcie_aux_regs.h | 293 + .../include/gaudi2/asic_reg/pcie_dbi_regs.h | 422 + .../include/gaudi2/asic_reg/pcie_dec0_cmd_masks.h | 229 + .../include/gaudi2/asic_reg/pcie_dec0_cmd_regs.h | 85 + .../pcie_vdec0_brdg_ctrl_axuser_dec_regs.h | 61 + .../pcie_vdec0_brdg_ctrl_axuser_msix_abnrm_regs.h | 61 + .../pcie_vdec0_brdg_ctrl_axuser_msix_l2c_regs.h | 61 + .../pcie_vdec0_brdg_ctrl_axuser_msix_nrm_regs.h | 61 + .../pcie_vdec0_brdg_ctrl_axuser_msix_vcd_regs.h | 61 + .../gaudi2/asic_reg/pcie_vdec0_brdg_ctrl_masks.h | 580 + .../gaudi2/asic_reg/pcie_vdec0_brdg_ctrl_regs.h | 245 + .../gaudi2/asic_reg/pcie_vdec0_ctrl_special_regs.h | 185 + .../include/gaudi2/asic_reg/pcie_wrap_regs.h | 601 + .../gaudi2/asic_reg/pdma0_core_ctx_axuser_regs.h | 61 + .../include/gaudi2/asic_reg/pdma0_core_ctx_regs.h | 95 + .../include/gaudi2/asic_reg/pdma0_core_masks.h | 415 + .../include/gaudi2/asic_reg/pdma0_core_regs.h | 157 + .../gaudi2/asic_reg/pdma0_core_special_masks.h | 135 + .../gaudi2/asic_reg/pdma0_qm_arc_aux_regs.h | 591 + .../asic_reg/pdma0_qm_axuser_nonsecured_regs.h | 61 + .../gaudi2/asic_reg/pdma0_qm_axuser_secured_regs.h | 61 + .../include/gaudi2/asic_reg/pdma0_qm_cgm_regs.h | 29 + .../include/gaudi2/asic_reg/pdma0_qm_masks.h | 1165 + .../include/gaudi2/asic_reg/pdma0_qm_regs.h | 1057 + .../gaudi2/asic_reg/pdma1_core_ctx_axuser_regs.h | 61 + .../asic_reg/pdma1_qm_axuser_nonsecured_regs.h | 61 + .../include/gaudi2/asic_reg/pmmu_hbw_stlb_masks.h | 334 + .../include/gaudi2/asic_reg/pmmu_hbw_stlb_regs.h | 141 + .../include/gaudi2/asic_reg/pmmu_pif_regs.h | 135 + .../include/gaudi2/asic_reg/psoc_etr_masks.h | 311 + .../include/gaudi2/asic_reg/psoc_etr_regs.h | 115 + .../gaudi2/asic_reg/psoc_global_conf_masks.h | 1406 + .../gaudi2/asic_reg/psoc_global_conf_regs.h | 1337 + .../gaudi2/asic_reg/psoc_reset_conf_masks.h | 2321 + .../include/gaudi2/asic_reg/psoc_reset_conf_regs.h | 989 + .../include/gaudi2/asic_reg/psoc_timestamp_regs.h | 57 + .../include/gaudi2/asic_reg/rot0_desc_regs.h | 155 + .../include/gaudi2/asic_reg/rot0_masks.h | 313 + .../include/gaudi2/asic_reg/rot0_qm_arc_aux_regs.h | 591 + .../asic_reg/rot0_qm_axuser_nonsecured_regs.h | 61 + .../include/gaudi2/asic_reg/rot0_qm_cgm_regs.h | 29 + .../include/gaudi2/asic_reg/rot0_qm_regs.h | 1057 + .../habanalabs/include/gaudi2/asic_reg/rot0_regs.h | 111 + .../include/gaudi2/asic_reg/xbar_edge_0_regs.h | 199 + .../include/gaudi2/asic_reg/xbar_mid_0_regs.h | 199 + drivers/misc/habanalabs/include/gaudi2/gaudi2.h | 120 + .../include/gaudi2/gaudi2_async_events.h | 963 + .../include/gaudi2/gaudi2_async_ids_map_extended.h | 2668 ++ .../include/gaudi2/gaudi2_async_virt_events.h | 57 + .../habanalabs/include/gaudi2/gaudi2_coresight.h | 984 + .../misc/habanalabs/include/gaudi2/gaudi2_fw_if.h | 99 + .../habanalabs/include/gaudi2/gaudi2_packets.h | 197 + .../habanalabs/include/gaudi2/gaudi2_reg_map.h | 59 + .../habanalabs/include/hw_ip/mmu/mmu_general.h | 14 +- .../misc/habanalabs/include/hw_ip/mmu/mmu_v2_0.h | 51 + 168 files changed, 136492 insertions(+), 2 deletions(-) commit ccf991e4f2205e98cfbb6e8f2d7b477bd378328f Author: Ofir Bitton Date: Mon Jun 27 16:59:02 2022 +0300 habanalabs: remove redundant argument in access_dev_mem APIs Region structure is derived from region type, hence no need to pass it as an argument. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/debugfs.c | 3 +-- drivers/misc/habanalabs/common/device.c | 5 ++--- drivers/misc/habanalabs/common/habanalabs.h | 8 ++++---- 3 files changed, 7 insertions(+), 9 deletions(-) commit 9c7fde71a7744a1934436397b1cb63460faf5c4c Author: Oded Gabbay Date: Mon Jun 27 11:30:43 2022 +0300 habanalabs: use %pa to print pci bar size PCI bar size is resource_size_t so we should use %pa to make it work correctly on all architectures. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 25 +++++++++++-------------- drivers/misc/habanalabs/goya/goya.c | 25 +++++++++++-------------- 2 files changed, 22 insertions(+), 28 deletions(-) commit 0407c155f1a237f8f42b996d1a71088d462c494b Author: Dafna Hirschfeld Date: Sun Jun 26 16:18:40 2022 +0300 habanalabs/gaudi: replace hl_poll_timeout with while loop in gaudi_scrub_device_mem, replace call to hl_poll_timeout with a while loop to avoid using dummy variables. Reported-by: kernel test robot Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit fce854e9bc244da700f71a90f5c2c4b7e7002f8f Author: Ohad Sharabi Date: Sat Jun 25 23:36:13 2022 +0300 habanalabs: communicate supported page sizes to user Because in future ASICs the driver will allow the user to set the page size we need to make sure this data is propagated in all APIs. In addition, since this is already an ASIC property we no longer need ASIC function for it. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/habanalabs.h | 5 +++-- drivers/misc/habanalabs/common/habanalabs_ioctl.c | 2 +- drivers/misc/habanalabs/common/memory.c | 4 ++-- drivers/misc/habanalabs/gaudi/gaudi.c | 7 ------- drivers/misc/habanalabs/goya/goya.c | 7 ------- 5 files changed, 6 insertions(+), 19 deletions(-) commit a74cf4a8f61bcb82a4c9b7c8d29f29f003b826ae Author: Tomer Tayar Date: Fri Jun 24 13:05:23 2022 +0300 habanalabs: remove dead code from free_device_memory() free_device_memory() ends with if and else, each has a return statement, followed by another return statement that can never be reached. Restructure the function and remove this dead code. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/memory.c | 50 +++++++++++++++------------------ 1 file changed, 22 insertions(+), 28 deletions(-) commit be882e534f02dd200e222f9cf312e6a39cf1f7c8 Author: Oded Gabbay Date: Fri Jun 24 19:11:38 2022 +0300 habanalabs/gaudi: enable error interrupt on ARB WDT We want to receive an error interrupt in case the watchdog timer expires on arbitration event in the queues. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/include/gaudi/gaudi_masks.h | 1 + 1 file changed, 1 insertion(+) commit b2711ab2b0b0b316e7d16033acf80f846c56df6d Author: Ohad Sharabi Date: Wed Jun 22 15:38:56 2022 +0300 habanalabs: page size can only be a power of 2 We dropped support for page sizes that are not power of 2. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/habanalabs.h | 3 --- drivers/misc/habanalabs/common/memory.c | 4 ++-- drivers/misc/habanalabs/gaudi/gaudi.c | 1 - drivers/misc/habanalabs/goya/goya.c | 1 - 4 files changed, 2 insertions(+), 7 deletions(-) commit 1ef0c327e1caa1d573b8e949bc72bf8571cf26ee Author: Ohad Sharabi Date: Sun Jun 12 15:00:29 2022 +0300 habanalabs: refactor dma asic-specific functions This is a pre-requisite patch for adding tracepoints to the DMA memory operations (allocation/free) in the driver. The main purpose is to be able to cross data with the map operations and determine whether memory violation occurred, for example free DMA allocation before unmapping it from device memory. To achieve this the DMA alloc/free code flows were refactored so that a single DMA tracepoint will catch many flows. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/command_buffer.c | 12 ++-- drivers/misc/habanalabs/common/device.c | 75 +++++++++++++++++++++ drivers/misc/habanalabs/common/firmware_if.c | 39 +++++------ drivers/misc/habanalabs/common/habanalabs.h | 9 +++ drivers/misc/habanalabs/common/hw_queue.c | 34 +++------- drivers/misc/habanalabs/common/irq.c | 16 ++--- drivers/misc/habanalabs/gaudi/gaudi.c | 89 +++++++++---------------- drivers/misc/habanalabs/goya/goya.c | 40 ++++------- 8 files changed, 162 insertions(+), 152 deletions(-) commit c37d50e84e60279f7799122b856d89d57ca9e6d8 Author: Oded Gabbay Date: Fri Jun 24 16:49:26 2022 +0300 habanalabs/gaudi: remove unused enum Also beautify code by preferring single line wherever possible. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) commit e3f49437a2e0221a387ecd192d742ae1434e1e3a Author: Oded Gabbay Date: Fri Jun 24 16:45:02 2022 +0300 habanalabs/gaudi: mask constant value before cast This fixes a sparse warning of "cast truncates bits from constant value" Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c74400f61edf5ac4e5e33349153018666f7469aa Author: Oded Gabbay Date: Fri Jun 24 16:05:59 2022 +0300 habanalabs/gaudi: use correct type in assignment packets are defined as LE so we need to convert before assigning values to them. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94f27905bdc3e7104959c48f04bd908078161abb Author: Oded Gabbay Date: Fri Jun 24 16:04:30 2022 +0300 habanalabs/gaudi: fix function name in comment function name in comment didn't match actual function name. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi_security.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5125aa3368892dd9dd8bca3d64e88b11bc3490a4 Author: Oded Gabbay Date: Fri Jun 24 13:36:10 2022 +0300 habanalabs/goya: move dma direction enum to uapi file The values in this enum are not used by h/w but are a contract between userspace and the kernel driver so they must be defined in the uapi file. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya.c | 28 +++++++++++----------- .../misc/habanalabs/include/goya/goya_packets.h | 12 ---------- include/uapi/misc/habanalabs.h | 27 +++++++++++++++++++++ 3 files changed, 41 insertions(+), 26 deletions(-) commit 7659c30d1991098cd11e3d0fc8b9c6941ffe1440 Author: Dafna Hirschfeld Date: Thu May 12 16:16:25 2022 +0300 habanalabs: set default value for memory_scrub Set a default value for memory scrubbing Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 3 +++ 1 file changed, 3 insertions(+) commit 605e1ef3d58c348d34e8716b05194814681a432b Author: Dafna Hirschfeld Date: Thu May 12 15:20:55 2022 +0300 habanalabs: move call to scrub_device_mem after ctx_fini In future ASICs, it would be possible to have a non-idle device when context is released. We thus need to postpone the scrubbing. Postpone it to hpriv release if reset is not executed or to device late init if reset is executed. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/context.c | 3 --- drivers/misc/habanalabs/common/device.c | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) commit 70852c95ac0e6234eaa87e267054dcbc0712f240 Author: Dafna Hirschfeld Date: Thu Jun 23 07:47:48 2022 +0300 habanalabs/gaudi: use memory_scrub_val from debugfs In the callback scrub_device_mem, use 'memory_scrub_val' from debugfs for the scrubbing value. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Documentation/ABI/testing/debugfs-driver-habanalabs | 3 ++- drivers/misc/habanalabs/gaudi/gaudi.c | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 8c834a1442ad4e06f2be2574eee4a6985ad297aa Author: Dafna Hirschfeld Date: Thu Jun 23 07:28:17 2022 +0300 habanalabs: don't send addr and size to scrub_device_mem cb We use scrub_device_mem only to scrub the entire SRAM and entire DRAM. Therefore there is no need to send addr and size args to the callback. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/context.c | 2 +- drivers/misc/habanalabs/common/habanalabs.h | 4 +- drivers/misc/habanalabs/gaudi/gaudi.c | 64 ++++++++++++++--------------- drivers/misc/habanalabs/goya/goya.c | 2 +- drivers/misc/habanalabs/goya/goyaP.h | 2 +- 5 files changed, 36 insertions(+), 38 deletions(-) commit c1048d14c009e2c5c777956f8481296f8526a864 Author: Dafna Hirschfeld Date: Tue May 10 16:36:02 2022 +0300 habanalabs: don't do memory scrubbing when unmapping There is no need to do memory scrub when unmapping anymore as it is an overhead as long as we have a single user at any given time. Remove that code and change return value of free_phys_pg_pack to void Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/memory.c | 36 ++++++--------------------------- 1 file changed, 6 insertions(+), 30 deletions(-) commit 856fe7b0aa510d2342b01405e7d21c95c7a906fc Author: Ofir Bitton Date: Wed Jun 22 15:10:08 2022 +0300 habanalabs: print if firmware is secured during load For easier debug, it is desirable to have a simple way to know whether the device is secured or not, hence we dump this indication during boot. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/firmware_if.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 17ab47d2d6d4b79734e3f2092b316fa5792eff97 Author: Yuri Nudelman Date: Wed Jun 22 12:52:34 2022 +0300 habanalabs/gaudi: fix a race condition causing DMAR error There is a rare race condition in CB completion mechanism, that can occur under a very high pressure of command submissions. The preconditions for this to happen are: 1. There should be enough command submissions for the pre-allocated patched CB pool to run out of commands. At this stage we start allocating new patched CBs as they arrive. 2. CB size has to be exactly (128*n + 104)B for some n, i.e. 24B below a cache line end. The flow: 1. Two command buffers being completed on different streams, at the same time. Denote those CB1 and CB2. 2. Each command buffer is injected with two messages, 16B each - one for a HBW update of the completion queue, another to raise interrupt. 3. Assume CB1 updated the completion queue and raise the interrupt. 4. Assume CB2 updated the completion queue but did not raise the interrupt yet. 5. The host receives the interrupt. It goes over the completion queue and sees two completions - CB1 and CB2. Release them both. 6. CB2 performs the last command. The problem is that the last command is split between 2 cache lines. So to read the last 8B of the last command, it has to access the host again. Problem is - CB2 is already released. This causes a DMAR error. The solution to this problem is simply to make sure the last two commands in the CB are always in the same cache line, using NOP padding. Signed-off-by: Yuri Nudelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/habanalabs.h | 1 + drivers/misc/habanalabs/common/hw_queue.c | 1 + drivers/misc/habanalabs/gaudi/gaudi.c | 46 +++++++++++++++++++++-------- drivers/misc/habanalabs/goya/goya.c | 4 +-- drivers/misc/habanalabs/goya/goyaP.h | 4 +-- 5 files changed, 40 insertions(+), 16 deletions(-) commit 0c584e192f5af0a05cab42dd431ea6c028f04194 Author: Koby Elbaz Date: Wed Jun 22 10:42:42 2022 +0300 habanalabs/gaudi: fix warning: var might be used uninitialized kernel test robot: "warning: variable 'index' is used uninitialized whenever 'if' condition is false" Reported-by: kernel test robot Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 792588a8c221359954f459b1fd22c32e1ef3085b Author: Dafna Hirschfeld Date: Thu Jun 2 11:55:00 2022 +0300 habanalabs: move memory_scrub_val to hdev struct move the field memory_scrub_val from struct hl_dbg_device_entry to struct hl_device. This is because we want to use this field also if debugfs is off. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/debugfs.c | 4 ++-- drivers/misc/habanalabs/common/habanalabs.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 0d9894343745f3ef3fc386bd5074e800bdc2fb54 Author: Oded Gabbay Date: Sun Jun 19 12:41:19 2022 +0300 habanalabs: fix comment style function name should not be preceded with @ Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/memory_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb1155a9f09791f95f58134bf9b0d348cafa73b1 Author: Oded Gabbay Date: Sun Jun 19 12:40:19 2022 +0300 habanalabs: use kvcalloc when possible kvcalloc is same as kvmalloc_array with GFP_ZERO. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/mmu/mmu_v1.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b63539a6faee0bfe7c3efb838fc7dd78d34a2ae6 Author: Oded Gabbay Date: Sun Jun 19 12:37:01 2022 +0300 habanalabs: print pointer with correct modifier Use %p instead of %llx for printing pointers. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/command_submission.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit abe85a9c11a9b982199db4d66f71c482069ed1cf Author: Oded Gabbay Date: Sun Jun 19 12:35:06 2022 +0300 habanalabs: check fence pointer before use fence pointer can be NULL in this path, as shown by an earlier check. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/command_submission.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e41c6418565d01df9b5d2005cabc0c2f71033c69 Author: ran shalit Date: Wed Jun 15 21:24:38 2022 +0300 habanalabs: add critical indication in sram ecc Multiple SRAM SERR events are treated as critical events, and host should be notified about it. Thus, adding is_critical indication as part of SRAM ECC failure packet. Signed-off-by: ran shalit Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/include/common/cpucp_if.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 67a54d5de2c348562b745c5029daa9e5207514c9 Author: Tal Cohen Date: Thu Jun 9 18:08:31 2022 +0300 habanalabs/gaudi: notify user process on device unavailable When a device error occurs, user process would like to get some indication on the error by reading some device HW info. If the device is unavailable, user process can't perform any HW device reading. Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 5 ++++- include/uapi/misc/habanalabs.h | 12 +++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) commit 4cd213807bc070d4e896524de00660a642930960 Author: Oded Gabbay Date: Sat Jun 18 21:27:07 2022 +0300 habanalabs: remove unused get_dma_desc_list_size This asic callback function is not called anymore from the common code. The asic-specific function itself is called but from within the asic-specific code. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/habanalabs.h | 3 --- drivers/misc/habanalabs/gaudi/gaudi.c | 1 - drivers/misc/habanalabs/goya/goya.c | 1 - 3 files changed, 5 deletions(-) commit a18997770159b9b48a5c20630223e4f9d3e2bdb5 Author: Yuri Nudelman Date: Tue Jun 14 15:14:20 2022 +0300 habanalabs: fix NULL dereference on cs timeout Device descriptor is accessed before an assignment Signed-off-by: Yuri Nudelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/command_submission.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 01622098aeb05a5efbb727199bbc2a4653393255 Author: Ofir Bitton Date: Wed Jun 15 16:11:31 2022 +0300 habanalabs/gaudi: fix shift out of bounds When validating NIC queues, queue offset calculation must be performed only for NIC queues. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit d64a29af120ece3a81cd46a8880fbe4111f9be27 Author: farah kassabri Date: Mon Jun 13 16:22:20 2022 +0300 habanalabs: add validity check for cq counter offset Driver performs no validity check for the user cq counter offset used in both wait_for_interrupt and register_for_timestamp APIs. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/command_submission.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 70d25e96b69eca96ded689dff8ea3e0decdf9cf7 Author: Koby Elbaz Date: Sun Jun 12 22:16:25 2022 +0300 habanalabs/gaudi: fix incorrect MME offset calculation Once FW raised an event following a MME2 QMAN error, the driver should have gone to the corresponding status registers, trying to gather more info on the error, yet it was accidentally accessing MME1 QMAN address space. Generally, we have x4 MMEs, while 0 & 2 are marked MASTER, and 1 & 3 are marked SLAVE. The former can be addressed, yet addressing the latter is considered an access violation, and will result in a hung system, which is what unintentionally happened above. Note that this cannot happen in a secured system, since these registers are protected with range registers. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit ada103b6776019b5d9a3b27b7ec478966db56768 Author: Dani Liberman Date: Thu Jun 2 16:15:03 2022 +0300 habanalabs: avoid unnecessary error print When sending a packet to FW right after it made reset, we will get packet timeout. Since it is expected behavior, we don't need to print an error in such case. Hence, when driver is in hard reset it will avoid from printing error messages about packet timeout. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/firmware_if.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit fa9deaca2f9123b1749ea81bbeb12778645af580 Author: Tal Cohen Date: Thu May 19 18:00:55 2022 +0300 habanalabs: send an event notification when CS timeout occurs The Driver needs to inform the User process whenever one of its CS is timed out. The Driver shall recognize the CS timeout and shall send an eventfd notification, towards user space, whenever a timeout is expired on a CS. Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay .../misc/habanalabs/common/command_submission.c | 26 ++++++++++++++-------- include/uapi/misc/habanalabs.h | 2 ++ 2 files changed, 19 insertions(+), 9 deletions(-) commit 969202e5cb62531ed73beb318c7139f1364356cb Author: Tal Cohen Date: Wed Jun 8 17:34:54 2022 +0300 habanalabs/gaudi: send device reset notification Device reset event, indicates that the device shall be reset - after a short delay. In such case, the driver sends a notification towards the User process. This allows the User process to be able to take several debug actions for system diagnostic purposes. Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit be572e67dafbf8004d46a2c9d97338c107efb60e Author: Tal Cohen Date: Wed Jun 8 16:02:09 2022 +0300 habanalabs/gaudi: invoke device reset from one code block In order to prepare the driver code for device reset event notification, change the event handler function flow to call device reset from one code block. In addition, the commit fixes an issue that reset was performed w/o checking the 'hard_reset_on_fw_event' state and w/o setting the HL_DRV_RESET_DELAY flag. Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 647469148360dc873405acc6fcf63772e9e401f4 Author: Tal Cohen Date: Thu May 12 11:59:41 2022 +0300 habanalabs: expose undefined opcode status via info ioctl The info ioctl retrieves information on the last undefined opcode occurred. Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/habanalabs_ioctl.c | 25 +++++++++++++++++++ include/uapi/misc/habanalabs.h | 30 +++++++++++++++++++++++ 2 files changed, 55 insertions(+) commit a7d6c35bcd6b5389eb680daff5839339bd8206e0 Author: Tal Cohen Date: Wed May 11 18:02:39 2022 +0300 habanalabs/gaudi: collect undefined opcode error info when an undefined opcode error occurres, the driver collects the relevant information from the Qman and stores it inside the hdev data structure. An event fd indication is sent towards the user space. Note: another commit shall be followed which will add support to read the error info by an ioctl. Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 13 +-- drivers/misc/habanalabs/common/habanalabs.h | 40 ++++++++- drivers/misc/habanalabs/common/habanalabs_drv.c | 1 + drivers/misc/habanalabs/gaudi/gaudi.c | 108 +++++++++++++++++++----- include/uapi/misc/habanalabs.h | 8 +- 5 files changed, 138 insertions(+), 32 deletions(-) commit 41021f728a91035997f1ad3d6d4e983711f3c483 Author: Tomer Tayar Date: Sun May 22 09:43:54 2022 +0300 habanalabs: fix race between hl_get_compute_ctx() and hl_ctx_put() hl_get_compute_ctx() is used to get the pointer to the compute context from the hpriv object. The function is called in code paths that are not necessarily initiated by user, so it is possible that a context release process will happen in parallel. This can lead to a race condition in which hl_get_compute_ctx() retrieves the context pointer, and just before it increments the context refcount, the context object is released and a freed memory is accessed. To avoid this race, add a mutex to protect the context pointer in hpriv. With this lock, hl_get_compute_ctx() will be able to detect if the context has been released or is about to be released. struct hl_ctx_mgr has a mutex for contexts IDR with a similar "ctx_lock" name, so rename it to just "lock" to avoid a confusion with the new lock. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/context.c | 58 ++++++++++++++++--------- drivers/misc/habanalabs/common/device.c | 1 + drivers/misc/habanalabs/common/habanalabs.h | 11 +++-- drivers/misc/habanalabs/common/habanalabs_drv.c | 2 + 4 files changed, 47 insertions(+), 25 deletions(-) commit 2bc61bc4f3eadc967f8540ef48f2085198b24db8 Author: Yuri Nudelman Date: Tue May 24 16:29:03 2022 +0300 habanalabs: keep a record of completed CS outcomes Often, the user is not interested in the completion timestamp of all command submissions. A common situation is, for example, when the user submits a burst of, possibly, several thousands of commands, then request the completion timestamp of only couple of specific key commands from all the burst. The problem is that currently, the outcome of the early commands may be lost, due to a large amount of later commands, that the user does not really care about. This patch creates a separate store with the outcomes of commands the user has mark explicitly as interested in. This store does not mix the marked commands with the unmarked ones, hence the data there will survive for much longer. Signed-off-by: Yuri Nudelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay .../misc/habanalabs/common/command_submission.c | 113 +++++++++++++++++++-- drivers/misc/habanalabs/common/context.c | 9 +- drivers/misc/habanalabs/common/habanalabs.h | 37 +++++++ 3 files changed, 147 insertions(+), 12 deletions(-) commit 8742a75a1c3f4c93efedfa5004d18c87e467ca3b Author: Oded Gabbay Date: Sun Jun 5 12:56:36 2022 +0300 habanalabs/gaudi: fix comment to reflect current code Due to code changes in the past few years, the original comment of how parser->user_cb_size is checked was not correct anymore. Fix it to reflect current code and add more explanation as the code is more complex now. Reported-by: Dan Carpenter Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit d0c92afc0ef826932937a27a973d7d024e98be18 Author: Tal Cohen Date: Wed Jun 1 11:32:35 2022 +0300 habanalabs: change the write flag name of error info structs positive flags naming will make more clear code while adding more 'error info' structures Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/command_submission.c | 4 ++-- drivers/misc/habanalabs/common/habanalabs.h | 12 ++++++------ drivers/misc/habanalabs/common/habanalabs_drv.c | 4 ++-- drivers/misc/habanalabs/gaudi/gaudi.c | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) commit 939ed076ea67ab075221805bc638a6532fb59d9f Author: Tal Cohen Date: Wed Jun 1 23:14:16 2022 +0300 habanalabs/gaudi: move tpc assert raise into internal func raising the tpc assert event in an internal function will make the code cleaner as we are going to be adding more events Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit 2acd21cd00ce635adfec5a8725a0c342812bffb4 Author: Dan Rapaport Date: Mon May 30 14:11:45 2022 +0300 habanalabs: align ioctl uapi structures to 64-bit The compiler is padding the members of the struct to be aligned to 64-bit. The content of the padded bytes is and not zeroed explicitly, hence might copy undefined data. We add a padding member to the struct to get a zeroed 64-bit align struct. Signed-off-by: Dan Rapaport Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay include/uapi/misc/habanalabs.h | 1 + 1 file changed, 1 insertion(+) commit 78d503087be190eab36290644ccec050135e7c70 Author: Dafna Hirschfeld Date: Thu May 19 10:54:30 2022 +0300 habanalabs: add terminating NULL to attrs arrays Arrays of struct attribute are expected to be NULL terminated. This is required by API methods such as device_add_groups. This fixes a crash when loading the driver for Goya device. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/sysfs.c | 2 ++ drivers/misc/habanalabs/gaudi/gaudi.c | 1 + drivers/misc/habanalabs/goya/goya_hwmgr.c | 2 ++ 3 files changed, 5 insertions(+) commit 18b67315388cb528479050839c69d245164f6183 Author: Jiapeng Chong Date: Thu Jun 2 11:58:27 2022 +0800 habanalabs: Fix kernel-doc Fix the following W=1 kernel warnings: drivers/misc/habanalabs/common/mmu/mmu_v1.c:425: warning: expecting prototype for hl_mmu_fini(). Prototype was for hl_mmu_v1_fini() instead. drivers/misc/habanalabs/common/mmu/mmu_v1.c:449: warning: expecting prototype for hl_mmu_ctx_init(). Prototype was for hl_mmu_v1_ctx_init() instead. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/mmu/mmu_v1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 858e6d4085b1c036e1c4ba5c6e2aedd0c0591464 Author: Jiapeng Chong Date: Thu Jun 2 11:58:26 2022 +0800 habanalabs: Fix kernel-doc Fix the following W=1 kernel warnings: drivers/misc/habanalabs/common/pci/pci.c:454: warning: expecting prototype for hl_fw_fini(). Prototype was for hl_pci_fini() instead. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a43a9f67774adbd575d10ec88824016fbe034777 Author: Dan Carpenter Date: Wed May 25 15:25:06 2022 +0300 habanalabs: fix double unlock on error in map_device_va() If hl_mmu_prefetch_cache_range() fails then this code calls mutex_unlock(&ctx->mmu_lock) when it's no longer holding the mutex. Fixes: 9e495e24003e ("habanalabs: do MMU prefetch as deferred work") Signed-off-by: Dan Carpenter Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/memory.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 48b927770f8ad3f8cf4a024a552abf272af9f592 Author: Jian Zhang Date: Tue Jul 12 13:56:11 2022 +0900 drm/exynos/exynos7_drm_decon: free resources when clk_set_parent() failed. In exynos7_decon_resume, When it fails, we must use clk_disable_unprepare() to free resource that have been used. Fixes: 6f83d20838c09 ("drm/exynos: use DRM_DEV_ERROR to print out error message") Reported-by: Hulk Robot Signed-off-by: Jian Zhang Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos7_drm_decon.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit f4284724c2163efc941604990f4e2326f5c1093d Author: Krzysztof Kozlowski Date: Fri Jul 1 09:31:23 2022 +0900 dt-bindings: remove Joonyoung Shim from maintainers Emails to Joonyoung Shim bounce ("550 5.1.1 Recipient address rejected: User unknown"), so remove him from maintainers of DT bindings (display, phy). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Inki Dae .../devicetree/bindings/display/samsung/samsung,exynos-hdmi-ddc.yaml | 1 - .../devicetree/bindings/display/samsung/samsung,exynos-hdmi.yaml | 1 - .../devicetree/bindings/display/samsung/samsung,exynos-mixer.yaml | 1 - .../devicetree/bindings/display/samsung/samsung,exynos5433-decon.yaml | 1 - .../devicetree/bindings/display/samsung/samsung,exynos5433-mic.yaml | 1 - .../devicetree/bindings/display/samsung/samsung,exynos7-decon.yaml | 1 - Documentation/devicetree/bindings/display/samsung/samsung,fimd.yaml | 1 - Documentation/devicetree/bindings/phy/samsung,exynos-hdmi-phy.yaml | 1 - 8 files changed, 8 deletions(-) commit 0cd8a73122b273672cec7efdfb617ddca3423a2e Author: Krzysztof Kozlowski Date: Thu Jun 30 13:12:17 2022 +0900 drm/exynos: MAINTAINERS: move Joonyoung Shim to credits Emails to Joonyoung Shim bounce ("550 5.1.1 Recipient address rejected: User unknown"), so move him to credits file. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Inki Dae CREDITS | 4 ++++ MAINTAINERS | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) commit f16214c102f0f64b2f3546e989498525bd7b7708 Author: Matthieu Baerts Date: Mon Jul 11 10:12:00 2022 +0200 bpf: Fix 'dubious one-bit signed bitfield' warnings Our CI[1] reported these warnings when using Sparse: $ touch net/mptcp/bpf.c $ make C=1 net/mptcp/bpf.o net/mptcp/bpf.c: note: in included file: include/linux/bpf_verifier.h:348:26: error: dubious one-bit signed bitfield include/linux/bpf_verifier.h:349:29: error: dubious one-bit signed bitfield Set them as 'unsigned' to avoid warnings. [1] https://github.com/multipath-tcp/mptcp_net-next/actions/runs/2643588487 Fixes: 1ade23711971 ("bpf: Inline calls to bpf_loop when callback is known") Signed-off-by: Matthieu Baerts Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220711081200.2081262-1-matthieu.baerts@tessares.net include/linux/bpf_verifier.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 49705c4ab324654a7038fc843255140730477e04 Author: Jesper Dangaard Brouer Date: Mon Jul 11 16:04:22 2022 +0200 samples/bpf: Fix xdp_redirect_map egress devmap prog LLVM compiler optimized out the memcpy in xdp_redirect_map_egress, which caused the Ethernet source MAC-addr to always be zero when enabling the devmap egress prog via cmdline --load-egress. Issue observed with LLVM version 14.0.0 - Shipped with Fedora 36 on target: x86_64-redhat-linux-gnu. In verbose mode print the source MAC-addr in case xdp_devmap_attached mode is used. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/165754826292.575614.5636444052787717159.stgit@firesoul samples/bpf/xdp_redirect_map.bpf.c | 6 ++++-- samples/bpf/xdp_redirect_map_user.c | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) commit b45b4f880fb660c4bd4794a2ca3950c4570e12c6 Merge: 6db5e0c8692e 3915f8bddefd Author: Dave Airlie Date: Tue Jul 12 13:27:47 2022 +1000 Merge tag 'drm-misc-next-2022-07-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for $kernel-version: UAPI Changes: Cross-subsystem Changes: Core Changes: * crtc: Remove unnessary include statements from drm_crtc.h, plus fallout in drivers * edid: More use of struct drm_edid; implement HF-EEODB extension Driver Changes: * bridge: * anx7625: Implement HDP timeout via callback; Cleanups * fsl-ldb: Drop DE flip; Modesetting fixes * imx: Depend on ARCH_MXC * sil8620: Fix off-by-one * ti-sn65dsi86: Convert to atomic modesetting * ingenic: Fix display at maximum resolution * panel: * simple: Add support for HannStar HSD101PWW2, plus DT bindings; Add support for ETML0700Y5DHA, plus DT bindings * rockchip: Fixes * vc4: Cleanups * vmwgfx: Cleanups Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YsaHq1pvE699NtOM@linux-uq9g commit 6db5e0c8692e590734a7ec7455365d9cbaa15ef1 Merge: 344feb7ccf76 3d9c653cf635 Author: Dave Airlie Date: Tue Jul 12 12:54:42 2022 +1000 Merge tag 'drm-intel-next-2022-07-06' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Suspend fixes for Display (Jose) - Properly block D3Cold for now (Anshuman) - Eliminate PIPECONF RMWs from .color_commit()(Ville) - Display info clean-up (Ville) - Fix error code (Dan) - Fix possible refcount leak on DP MST (Hangyu) - Other general display clean-ups (Jani, Tom) - Add bios debug logs (Jani) - PCH type clean-up (Ville) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YsZNJUVh0iHOtORz@intel.com commit 2afe46474ba3fd3ae6e016bab57efd73f4b96175 Author: Justin Stitt Date: Fri Jul 8 16:26:53 2022 -0700 amd-xgbe: fix clang -Wformat warnings When building with Clang we encounter the following warning: | drivers/net/ethernet/amd/xgbe/xgbe-dcb.c:234:42: error: format specifies | type 'unsigned char' but the argument has type '__u16' (aka 'unsigned | short') [-Werror,-Wformat] pfc->pfc_cap, pfc->pfc_en, pfc->mbc, | pfc->delay); pfc->pfc_cap , pfc->pfc_cn, pfc->mbc are all of type `u8` while pfc->delay is of type `u16`. The correct format specifiers `%hh[u|x]` were used for the first three but not for pfc->delay, which is causing the warning above. Variadic functions (printf-like) undergo default argument promotion. Documentation/core-api/printk-formats.rst specifically recommends using the promoted-to-type's format flag. In this case `%d` (or `%x` to maintain hex representation) should be used since both u8's and u16's are fully representable by an int. Moreover, C11 6.3.1.1 states: (https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf) `If an int can represent all values of the original type ..., the value is converted to an int; otherwise, it is converted to an unsigned int. These are called the integer promotions.` Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Justin Stitt Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Link: https://lore.kernel.org/r/20220708232653.556488-1-justinstitt@google.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/amd/xgbe/xgbe-dcb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e433ac1a381bb1fa5e7ccbe3d226780e5b10bed Author: Christophe JAILLET Date: Sat Jul 9 17:05:45 2022 +0200 atm: he: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/7f795bd6d5b2a00f581175b7069b229c2e5a4192.1657379127.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/atm/he.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 2b8bf3d6c99318eae669e3098c490ba6b508fd37 Author: Christophe JAILLET Date: Sat Jul 9 16:37:53 2022 +0200 net/fq_impl: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/c7bf099af07eb497b02d195906ee8c11fea3b3bd.1657377335.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski include/net/fq_impl.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e7bde1c581e41e396ab14275793f193ffbd5b2b1 Author: Christophe JAILLET Date: Sat Jul 9 16:24:45 2022 +0200 net: dsa: hellcreek: Use the bitmap API to allocate bitmaps Use devm_bitmap_zalloc() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Acked-by: Kurt Kanzenbach Link: https://lore.kernel.org/r/8306e2ae69a5d8553691f5d10a86a4390daf594b.1657376651.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/dsa/hirschmann/hellcreek.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 1c151feddaf555e3af7a5cafb5481926f4f0489e Merge: 10c8fd2f7a40 1d55f2031385 Author: Jakub Kicinski Date: Mon Jul 11 19:48:36 2022 -0700 Merge branch 'tls-rx-follow-ups-to-nopad' Jakub Kicinski says: ==================== tls: rx: follow-ups to NoPad A few fixes for issues spotted by Maxim. ==================== Link: https://lore.kernel.org/r/20220709025255.323864-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 1d55f20313853b09cd111b04bb264ca22e1d6046 Author: Jakub Kicinski Date: Fri Jul 8 19:52:55 2022 -0700 selftests: tls: add test for NoPad getsockopt Make sure setsockopt / getsockopt behave as expected. Signed-off-by: Jakub Kicinski tools/testing/selftests/net/tls.c | 51 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 57128e98c33d79285adc523e670fe02d11b7e5da Author: Jakub Kicinski Date: Fri Jul 8 19:52:54 2022 -0700 tls: rx: fix the NoPad getsockopt Maxim reports do_tls_getsockopt_no_pad() will always return an error. Indeed looks like refactoring gone wrong - remove err and use value. Reported-by: Maxim Mikityanskiy Fixes: 88527790c079 ("tls: rx: add sockopt for enabling optimistic decrypt with TLS 1.3") Signed-off-by: Jakub Kicinski net/tls/tls_main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit bb56cea9abd85c22175b31d8f7c44d6c615fe526 Author: Jakub Kicinski Date: Fri Jul 8 19:52:53 2022 -0700 tls: rx: add counter for NoPad violations As discussed with Maxim add a counter for true NoPad violations. This should help deployments catch unexpected padded records vs just control records which always need re-encryption. https: //lore.kernel.org/all/b111828e6ac34baad9f4e783127eba8344ac252d.camel@nvidia.com/ Signed-off-by: Jakub Kicinski Documentation/networking/tls.rst | 4 ++++ include/uapi/linux/snmp.h | 1 + net/tls/tls_proc.c | 1 + net/tls/tls_sw.c | 2 ++ 4 files changed, 8 insertions(+) commit 1090c1ea2208702a2fe0e3f71d262e3097d939f6 Author: Jakub Kicinski Date: Fri Jul 8 19:52:52 2022 -0700 tls: fix spelling of MIB MIN -> MIB Fixes: 88527790c079 ("tls: rx: add sockopt for enabling optimistic decrypt with TLS 1.3") Signed-off-by: Jakub Kicinski include/uapi/linux/snmp.h | 2 +- net/tls/tls_proc.c | 2 +- net/tls/tls_sw.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit b5f37a0b6f667f5c72340ca9dcd7703f261cb981 Author: jianchunfu Date: Wed Jun 15 15:33:48 2022 +0800 rtla/utils: Use calloc and check the potential memory allocation failure Replace malloc with calloc and add memory allocating check of mon_cpus before used. Link: https://lkml.kernel.org/r/20220615073348.6891-1-jianchunfu@cmss.chinamobile.com Fixes: 7d0dc9576dc3 ("rtla/timerlat: Add --dma-latency option") Signed-off-by: jianchunfu Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/src/utils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 344feb7ccf764756937cfd74fa4ac5caba069c99 Merge: c6a3d73592ae c5da61cf5bab Author: Dave Airlie Date: Tue Jul 12 11:07:30 2022 +1000 Merge tag 'amd-drm-next-5.20-2022-07-05' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-5.20-2022-07-05: amdgpu: - Various spelling and grammer fixes - Various eDP fixes - Various DMCUB fixes - VCN fixes - GMC 11 fixes - RAS fixes - TMZ support for GC 10.3.7 - GPUVM TLB flush fixes - SMU 13.0.x updates - DCN 3.2 Support - DCN 3.2.1 Support - MES updates - GFX11 modifiers support - USB-C fixes - MMHUB 3.0.1 support - SDMA 6.0 doorbell fixes - Initial devcoredump support - Enable high priority gfx queue on asics which support it - Enable GPU reset for SMU 13.0.4 - OLED display fixes - MPO fixes - DC frame size fixes - ASPM support for PCIE 7.4/7.6 - GPU reset support for SMU 13.0.0 - GFX11 updates - VCN JPEG fix - BACO support for SMU 13.0.7 - VCN instance handling fix - GFX8 GPUVM TLB flush fix - GPU reset rework - VCN 4.0.2 support - GTT size fixes - DP link training fixes - LSDMA 6.0.1 support - Various backlight fixes - Color encoding fixes - Backlight config cleanup - VCN 4.x unified queue cleanup amdkfd: - MMU notifier fixes - Updates for GC 10.3.6 and 10.3.7 - P2P DMA support using dma-buf - Add available memory IOCTL - SDMA 6.0.1 fix - MES fixes - HMM profiler support radeon: - License fix - Backlight config cleanup UAPI: - Add available memory IOCTL to amdkfd Proposed userspace: https://www.mail-archive.com/amd-gfx@lists.freedesktop.org/msg75743.html - HMM profiler support for amdkfd Proposed userspace: https://lists.freedesktop.org/archives/amd-gfx/2022-June/080805.html Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20220705212633.6037-1-alexander.deucher@amd.com commit 67bd292cd281be2216cd269c161be31cd3ccf196 Author: Guillaume Tucker Date: Fri Jul 8 17:23:30 2022 +0100 Makefile: add headers_install to kselftest targets Add headers_install as a dependency to kselftest targets so that they can be run directly from the top of the tree. The kselftest Makefile used to try to call headers_install "backwards" but failed due to the relative path not being consistent. Now we can either run this directly: $ make O=build kselftest-all or this: $ make O=build headers_install $ make O=build -C tools/testing/selftest all The same commands work as well when building directly in the source tree (no O=) or any arbitrary path (relative or absolute). Signed-off-by: Guillaume Tucker Tested-by: Anders Roxell Signed-off-by: Shuah Khan Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 49de12ba06efcba76332054379830f9d04541492 Author: Guillaume Tucker Date: Fri Jul 8 17:23:29 2022 +0100 selftests: drop KSFT_KHDR_INSTALL make target Drop the KSFT_KHDR_INSTALL make target now that all use-cases have been removed from the other kselftest Makefiles. Signed-off-by: Guillaume Tucker Tested-by: Anders Roxell Signed-off-by: Shuah Khan tools/testing/selftests/Makefile | 1 - tools/testing/selftests/lib.mk | 38 -------------------------------------- 2 files changed, 39 deletions(-) commit f2745dc0ba3dadd8fa2b2c33f48253d78e133a12 Author: Guillaume Tucker Date: Fri Jul 8 17:23:28 2022 +0100 selftests: stop using KSFT_KHDR_INSTALL Stop using the KSFT_KHDR_INSTALL flag as installing the kernel headers from the kselftest Makefile is causing some issues. Instead, rely on the headers to be installed directly by the top-level Makefile "headers_install" make target prior to building kselftest. Signed-off-by: Guillaume Tucker Tested-by: Anders Roxell Signed-off-by: Shuah Khan tools/testing/selftests/arm64/mte/Makefile | 1 - tools/testing/selftests/arm64/signal/Makefile | 1 - tools/testing/selftests/arm64/signal/test_signals.h | 4 +--- tools/testing/selftests/drivers/s390x/uvdevice/Makefile | 1 - tools/testing/selftests/futex/functional/Makefile | 1 - tools/testing/selftests/kvm/Makefile | 1 - tools/testing/selftests/landlock/Makefile | 1 - tools/testing/selftests/net/Makefile | 1 - tools/testing/selftests/net/mptcp/Makefile | 1 - tools/testing/selftests/tc-testing/Makefile | 1 - tools/testing/selftests/vm/Makefile | 1 - 11 files changed, 1 insertion(+), 13 deletions(-) commit 3bb267a36185b64949ea9c8bbfe93eb01986f6cb Author: Guillaume Tucker Date: Fri Jul 8 17:23:27 2022 +0100 selftests: drop khdr make target Drop the "khdr" make target as it fails when the build directory is a sub-directory of the source tree. Rely on the "headers_install" target to have been run first instead. For example, here's a typical error this patch is addressing: $ make O=build -j32 kselftest-gen_tar make[1]: Entering directory '/home/kernelci/linux/build' make --no-builtin-rules INSTALL_HDR_PATH=/home/kernelci/linux/build/usr \ ARCH=x86 -C ../../.. headers_install make[3]: Entering directory '/home/kernelci/linux' Makefile:1022: ../scripts/Makefile.extrawarn: No such file or directory The source directory is determined in the top-level Makefile as ".." relatively to the "build" directory, but then the kselftest Makefile switches to "-C ../../.." so "../scripts" then points one level higher than the source tree e.g. "linux/../scripts" - which fails obviously. There is no other use-case in the kernel tree where a sub-directory Makefile tries to call a top-level make target, and it appears this isn't really a valid thing to do. Signed-off-by: Guillaume Tucker Tested-by: Anders Roxell Signed-off-by: Shuah Khan tools/testing/selftests/Makefile | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) commit 4f23bd5d09af41b04d30dcba85ea1303b3669b9f Author: Bjorn Helgaas Date: Tue Jun 7 18:29:46 2022 -0500 PCI/doc: Convert examples to generic power management PCI-specific power management (pci_driver.suspend and pci_driver.resume) is deprecated. Convert sample code to the generic power management framework. Link: https://lore.kernel.org/r/20220607232946.355987-1-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Signed-off-by: Bjorn Helgaas Documentation/PCI/pci-iov-howto.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 291cd54e5b05790b429826f5a49fe8b8c3e39ebd Author: David Gow Date: Sat Jul 9 11:20:01 2022 +0800 mmc: sdhci-of-aspeed: test: Use kunit_test_suite() macro The kunit_test_suite() macro is no-longer incompatible with module_add, so its use can be reinstated. Since this fixes parsing with builtins and kunit_tool, also enable the test by default when KUNIT_ALL_TESTS is enabled. The test can now be run via kunit_tool with: ./tools/testing/kunit/kunit.py run --arch=x86_64 \ --kconfig_add CONFIG_OF=y --kconfig_add CONFIG_OF_ADDRESS=y \ --kconfig_add CONFIG_MMC=y --kconfig_add CONFIG_MMC_SDHCI=y \ --kconfig_add CONFIG_MMC_SDHCI_PLTFM=y \ --kconfig_add CONFIG_MMC_SDHCI_OF_ASPEED=y \ 'sdhci-of-aspeed' (It may be worth adding a .kunitconfig at some point, as there are enough dependencies to make that command scarily long.) Acked-by: Daniel Latypov Acked-by: Ulf Hansson Acked-by: Brendan Higgins Signed-off-by: David Gow Signed-off-by: Shuah Khan drivers/mmc/host/Kconfig | 5 +++-- drivers/mmc/host/sdhci-of-aspeed-test.c | 8 +------- drivers/mmc/host/sdhci-of-aspeed.c | 34 +-------------------------------- 3 files changed, 5 insertions(+), 42 deletions(-) commit fe5be808fa6c8df5cf939ec622514f970573bc88 Author: David Gow Date: Sat Jul 9 11:20:00 2022 +0800 nitro_enclaves: test: Use kunit_test_suite() macro The kunit_test_suite() macro previously conflicted with module_init, making it unsuitable for use in the nitro_enclaves test. Now that it's fixed, we can use it instead of a custom call into internal KUnit functions to run the test. As a side-effect, this means that the test results are properly included with other suites when built-in. To celebrate, enable the test by default when KUNIT_ALL_TESTS is set (and NITRO_ENCLAVES enabled). The nitro_enclave tests can now be run via kunit_tool with: ./tools/testing/kunit/kunit.py run --arch=x86_64 \ --kconfig_add CONFIG_PCI=y --kconfig_add CONFIG_SMP=y \ --kconfig_add CONFIG_HOTPLUG_CPU=y \ --kconfig_add CONFIG_VIRT_DRIVERS=y \ --kconfig_add CONFIG_NITRO_ENCLAVES=y \ 'ne_misc_dev_test' (This is a pretty long command, so it may be worth adding a .kunitconfig file at some point, instead.) Reviewed-by: Andra Paraschiv Acked-by: Brendan Higgins Signed-off-by: David Gow Signed-off-by: Shuah Khan drivers/virt/nitro_enclaves/Kconfig | 5 +++-- drivers/virt/nitro_enclaves/ne_misc_dev.c | 27 -------------------------- drivers/virt/nitro_enclaves/ne_misc_dev_test.c | 5 +---- 3 files changed, 4 insertions(+), 33 deletions(-) commit 635dcd16844b08adcc1aa7a934893e47260619e4 Author: David Gow Date: Sat Jul 9 11:19:59 2022 +0800 thunderbolt: test: Use kunit_test_suite() macro The new implementation of kunit_test_suite() for modules no longer conflicts with module_init, so can now be used by the thunderbolt tests. Also update the Kconfig entry to enable the test when KUNIT_ALL_TESTS is enabled. This means that kunit_tool can now successfully run and parse the test results with, for example: ./tools/testing/kunit/kunit.py run --arch=x86_64 \ --kconfig_add CONFIG_PCI=y --kconfig_add CONFIG_USB4=y \ 'thunderbolt' Acked-by: Mika Westerberg Acked-by: Daniel Latypov Acked-by: Brendan Higgins Signed-off-by: David Gow Signed-off-by: Shuah Khan drivers/thunderbolt/Kconfig | 6 ++++-- drivers/thunderbolt/domain.c | 3 --- drivers/thunderbolt/tb.h | 8 -------- drivers/thunderbolt/test.c | 12 +----------- 4 files changed, 5 insertions(+), 24 deletions(-) commit e5857d396f35e59e6fe96cf1178b0357cc3a1ea4 Author: Daniel Latypov Date: Sat Jul 9 11:19:58 2022 +0800 kunit: flatten kunit_suite*** to kunit_suite** in .kunit_test_suites We currently store kunit suites in the .kunit_test_suites ELF section as a `struct kunit_suite***` (modulo some `const`s). For every test file, we store a struct kunit_suite** NULL-terminated array. This adds quite a bit of complexity to the test filtering code in the executor. Instead, let's just make the .kunit_test_suites section contain a single giant array of struct kunit_suite pointers, which can then be directly manipulated. This array is not NULL-terminated, and so none of the test filtering code needs to NULL-terminate anything. Tested-by: Maíra Canal Reviewed-by: Brendan Higgins Signed-off-by: Daniel Latypov Co-developed-by: David Gow Signed-off-by: David Gow Signed-off-by: Shuah Khan include/kunit/test.h | 13 ++--- include/linux/module.h | 2 +- lib/kunit/executor.c | 115 +++++++++--------------------------- lib/kunit/executor_test.c | 144 +++++++++++++--------------------------------- lib/kunit/test.c | 18 ++---- 5 files changed, 82 insertions(+), 210 deletions(-) commit 3d6e44623841c8b82c2157f2f749019803fb238a Author: Jeremy Kerr Date: Sat Jul 9 11:19:57 2022 +0800 kunit: unify module and builtin suite definitions Currently, KUnit runs built-in tests and tests loaded from modules differently. For built-in tests, the kunit_test_suite{,s}() macro adds a list of suites in the .kunit_test_suites linker section. However, for kernel modules, a module_init() function is used to run the test suites. This causes problems if tests are included in a module which already defines module_init/exit_module functions, as they'll conflict with the kunit-provided ones. This change removes the kunit-defined module inits, and instead parses the kunit tests from their own section in the module. After module init, we call __kunit_test_suites_init() on the contents of that section, which prepares and runs the suite. This essentially unifies the module- and non-module kunit init formats. Tested-by: Maíra Canal Reviewed-by: Brendan Higgins Signed-off-by: Jeremy Kerr Signed-off-by: Daniel Latypov Signed-off-by: David Gow Signed-off-by: Shuah Khan include/kunit/test.h | 49 ++++++----------------------------------------- include/linux/module.h | 5 +++++ kernel/module/main.c | 6 ++++++ lib/kunit/test.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 68 insertions(+), 44 deletions(-) commit 9465a98458fe2a05015bc90d7587fb891cd0c0cc Author: Andy Shevchenko Date: Sat Jul 9 00:45:39 2022 +0300 of: unittest: make unittest_gpio_remove() consistent with unittest_gpio_probe() On the ->remove() stage the callback uses physical device node instead of one from GPIO chip and the variable name which is different to one used in unittest_gpio_probe(). Make these consistent with unittest_gpio_probe(). Signed-off-by: Andy Shevchenko Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220708214539.7254-2-andriy.shevchenko@linux.intel.com drivers/of/unittest.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 652081b3c64e03ae3229dd33923d295f9f3115db Author: Andy Shevchenko Date: Sat Jul 9 00:45:38 2022 +0300 of: unittest: Switch to use fwnode instead of of_node The OF node in the GPIO library is deprecated and soon will be removed. GPIO library now accepts fwnode as a firmware node, so switch the module to use it instead. Signed-off-by: Andy Shevchenko Reviewed-by: Bartosz Golaszewski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220708214539.7254-1-andriy.shevchenko@linux.intel.com drivers/of/unittest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8370b400f5abad168bcc541fa2574e7bd6b3bf2c Author: David Gow Date: Fri Jul 8 12:48:47 2022 +0800 selftest: Taint kernel when test module loaded Make any kselftest test module (using the kselftest_module framework) taint the kernel with TAINT_TEST on module load. Also mark the module as a test module using MODULE_INFO(test, "Y") so that other tools can tell this is a test module. We can't rely solely on this, though, as these test modules are also often built-in. Finally, update the kselftest documentation to mention that the kernel should be tainted, and how to do so manually (as below). Note that several selftests use kernel modules which are not based on the kselftest_module framework, and so will not automatically taint the kernel. This can be done in two ways: - Moving the module to the tools/testing directory. All modules under this directory will taint the kernel. - Adding the 'test' module property with: MODULE_INFO(test, "Y") Similarly, selftests which do not load modules into the kernel generally should not taint the kernel (or possibly should only do so on failure), as it's assumed that testing from user-space should be safe. Regardless, they can write to /proc/sys/kernel/tainted if required. Reviewed-by: Luis Chamberlain Acked-by: Brendan Higgins Signed-off-by: David Gow Signed-off-by: Shuah Khan Documentation/dev-tools/kselftest.rst | 9 +++++++++ tools/testing/selftests/kselftest_module.h | 4 ++++ 2 files changed, 13 insertions(+) commit 74829ddf5977567d77440150d72d4c0c5c427446 Author: David Gow Date: Fri Jul 8 12:48:45 2022 +0800 module: panic: Taint the kernel when selftest modules load Taint the kernel with TAINT_TEST whenever a test module loads, by adding a new "TEST" module property, and setting it for all modules in the tools/testing directory. This property can also be set manually, for tests which live outside the tools/testing directory with: MODULE_INFO(test, "Y"); Reviewed-by: Luis Chamberlain Reviewed-by: Aaron Tomlin Acked-by: Brendan Higgins Signed-off-by: David Gow Signed-off-by: Shuah Khan kernel/module/main.c | 7 +++++++ scripts/mod/modpost.c | 3 +++ 2 files changed, 10 insertions(+) commit 77ce8ba3f069c10197bc354662eab09faa5693e2 Author: Daniel Latypov Date: Wed May 18 10:01:22 2022 -0700 Documentation: kunit: fix example run_kunit func to allow spaces in args Without the quoting, the example will mess up invocations like $ run_kunit "Something with spaces" Note: this example isn't valid, but if ever a usecase arises where a flag argument might have spaces in it, it'll break. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan Documentation/dev-tools/kunit/running_tips.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39636805cab2d46aa645f389f3fca8040afd4c4f Author: Jeff LaBundy Date: Sat Jul 9 21:47:13 2022 -0500 dt-bindings: input: iqs7222: Use central 'linux,code' definition Channel events adopt the newly centralized 'linux,code' property; slider events should too. Fixes: 8ac14d2c2d81 ("dt-bindings: input: Centralize 'linux,code' definition") Signed-off-by: Jeff LaBundy Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220710024713.17275-1-jeff@labundy.com Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 388fe2b8a3a0f597b2680e8f1ef5324e1db76ed2 Merge: 2551b6e89936 f1eea11523e4 Author: Mark Brown Date: Mon Jul 11 22:13:49 2022 +0100 ASoC: Intel: avs: Updates and cleanups Merge series from Cezary Rojewski : Series consists of loosely connected patches and does not concentrate on one specific subject. First, as generic HDAudio codec driver is now part of ASoC, avs-driver core is updated to register missing ext_bus operations. This completes driver's core implementation. The next change adds the last missing piece for port descriptions coming from topology in formatted string format e.g.: ssp%d have full effect. To do that, the port value needs to be provided to respective copier configuration. Third change relaxes core transition timings so that scenarios where modules are interfering with each other while being on separate cores are not occasionally causing trouble. All other changes are addressing warnings, cleaning things up a little and protecting driver from invalid firmware behavior - while not expected in release binaries, does not hurt to add them. commit 912cbf13a5445ca4a89d35b638795058dab61cce Author: Rob Herring Date: Wed Jun 29 12:50:30 2022 -0600 dt-bindings: mtd/partitions: Convert arm-firmware-suite to DT schema Convert the arm,arm-firmware-suite partition binding to DT schema format. Simple conversion as there's only a compatible property. Reviewed-by: Linus Walleij Signed-off-by: Rob Herring Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20220629185031.23826-1-robh@kernel.org .../mtd/partitions/arm,arm-firmware-suite.txt | 17 ------------- .../mtd/partitions/arm,arm-firmware-suite.yaml | 28 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 17 deletions(-) commit 8c18fece15f64df1d8101fd32efe304bf10032d5 Author: Cixi Geng Date: Thu May 5 18:14:32 2022 +0800 clk: sprd: Add dt-bindings include file for UMS512 This file defines all UMS512 clock indexes, it should be included in the device tree in which there's device using the clocks. Signed-off-by: Cixi Geng Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220505101433.1575096-4-gengcixi@gmail.com Signed-off-by: Stephen Boyd include/dt-bindings/clock/sprd,ums512-clk.h | 397 ++++++++++++++++++++++++++++ 1 file changed, 397 insertions(+) commit 6a3a6c7ae0ef235faebf66bac56384dbd5f944dc Author: Cixi Geng Date: Thu May 5 18:14:30 2022 +0800 dt-bindings: clk: sprd: Add bindings for ums512 clock controller Add a new bindings to describe ums512 clock compatible string. Signed-off-by: Chunyan Zhang Signed-off-by: Cixi Geng Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220505101433.1575096-2-gengcixi@gmail.com Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/sprd,ums512-clk.yaml | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit 9ffb98f144ebdc9345f3b34fac35c4ff12ae4e50 Author: Stefan Roese Date: Tue Jan 25 08:18:18 2022 +0100 PCI/AER: Configure ECRC for every device Move pcie_set_ecrc_checking() to pci_aer_init() to make sure that pcie_set_ecrc_checking() is called for each PCIe device, including hot-added devices. Link: https://lore.kernel.org/r/20220125071820.2247260-2-sr@denx.de Signed-off-by: Stefan Roese Signed-off-by: Bjorn Helgaas Reviewed-by: Pali Rohár Cc: Bharat Kumar Gogada Cc: Michal Simek Cc: Yao Hongbo Cc: Naveen Naidu drivers/pci/pcie/aer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b060edfd8cdd52bc8648392500bf152a8dd6d4c5 Author: Dan Williams Date: Thu Jun 23 14:58:45 2022 -0700 cxl/pmem: Delete unused nvdimm attribute While there is a need to go from a LIBNVDIMM 'struct nvdimm' to a CXL 'struct cxl_nvdimm', there is no use case to go the other direction. Likely this is a leftover from an early version of the referenced commit before it implemented devm for releasing the created nvdimm. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220624041950.559155-19-dan.j.williams@intel.com Signed-off-by: Dan Williams drivers/cxl/cxl.h | 1 - 1 file changed, 1 deletion(-) commit 6e44e0dc5806b614f1a683fc8d91f677f18bf2f4 Author: Chanho Park Date: Thu Jul 7 17:27:53 2022 +0900 dt-bindings: arm: cpus: add cortex-a78ae compatible Cortex A78AE's MPIDR has been added since commit 83bea32ac7ed ("arm64: Add part number for Arm Cortex-A78AE") We also need to add the compatible. Signed-off-by: Chanho Park Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220707082753.28862-1-chanho61.park@samsung.com Documentation/devicetree/bindings/arm/cpus.yaml | 1 + 1 file changed, 1 insertion(+) commit efc9909fdce00a827a37609628223cd45bf95d0b Author: Xu Kuohai Date: Mon Jul 11 11:08:23 2022 -0400 bpf, arm64: Add bpf trampoline for arm64 This is arm64 version of commit fec56f5890d9 ("bpf: Introduce BPF trampoline"). A bpf trampoline converts native calling convention to bpf calling convention and is used to implement various bpf features, such as fentry, fexit, fmod_ret and struct_ops. This patch does essentially the same thing that bpf trampoline does on x86. Tested on Raspberry Pi 4B and qemu: #18 /1 bpf_tcp_ca/dctcp:OK #18 /2 bpf_tcp_ca/cubic:OK #18 /3 bpf_tcp_ca/invalid_license:OK #18 /4 bpf_tcp_ca/dctcp_fallback:OK #18 /5 bpf_tcp_ca/rel_setsockopt:OK #18 bpf_tcp_ca:OK #51 /1 dummy_st_ops/dummy_st_ops_attach:OK #51 /2 dummy_st_ops/dummy_init_ret_value:OK #51 /3 dummy_st_ops/dummy_init_ptr_arg:OK #51 /4 dummy_st_ops/dummy_multiple_args:OK #51 dummy_st_ops:OK #57 /1 fexit_bpf2bpf/target_no_callees:OK #57 /2 fexit_bpf2bpf/target_yes_callees:OK #57 /3 fexit_bpf2bpf/func_replace:OK #57 /4 fexit_bpf2bpf/func_replace_verify:OK #57 /5 fexit_bpf2bpf/func_sockmap_update:OK #57 /6 fexit_bpf2bpf/func_replace_return_code:OK #57 /7 fexit_bpf2bpf/func_map_prog_compatibility:OK #57 /8 fexit_bpf2bpf/func_replace_multi:OK #57 /9 fexit_bpf2bpf/fmod_ret_freplace:OK #57 fexit_bpf2bpf:OK #237 xdp_bpf2bpf:OK Signed-off-by: Xu Kuohai Signed-off-by: Daniel Borkmann Reviewed-by: Jean-Philippe Brucker Acked-by: Song Liu Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20220711150823.2128542-5-xukuohai@huawei.com arch/arm64/net/bpf_jit_comp.c | 385 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 382 insertions(+), 3 deletions(-) commit b2ad54e1533e91449cb2a371e034942bd7882b58 Author: Xu Kuohai Date: Mon Jul 11 11:08:22 2022 -0400 bpf, arm64: Implement bpf_arch_text_poke() for arm64 Implement bpf_arch_text_poke() for arm64, so bpf prog or bpf trampoline can be patched with it. When the target address is NULL, the original instruction is patched to a NOP. When the target address and the source address are within the branch range, the original instruction is patched to a bl instruction to the target address directly. To support attaching bpf trampoline to both regular kernel function and bpf prog, we follow the ftrace patchsite way for bpf prog. That is, two instructions are inserted at the beginning of bpf prog, the first one saves the return address to x9, and the second is a nop which will be patched to a bl instruction when a bpf trampoline is attached. However, when a bpf trampoline is attached to bpf prog, the distance between target address and source address may exceed 128MB, the maximum branch range, because bpf trampoline and bpf prog are allocated separately with vmalloc. So long jump should be handled. When a bpf prog is constructed, a plt pointing to empty trampoline dummy_tramp is placed at the end: bpf_prog: mov x9, lr nop // patchsite ... ret plt: ldr x10, target br x10 target: .quad dummy_tramp // plt target This is also the state when no trampoline is attached. When a short-jump bpf trampoline is attached, the patchsite is patched to a bl instruction to the trampoline directly: bpf_prog: mov x9, lr bl // patchsite ... ret plt: ldr x10, target br x10 target: .quad dummy_tramp // plt target When a long-jump bpf trampoline is attached, the plt target is filled with the trampoline address and the patchsite is patched to a bl instruction to the plt: bpf_prog: mov x9, lr bl plt // patchsite ... ret plt: ldr x10, target br x10 target: .quad dummy_tramp is used to prevent another CPU from jumping to an unknown location during the patching process, making the patching process easier. The patching process is as follows: 1. when neither the old address or the new address is a long jump, the patchsite is replaced with a bl to the new address, or nop if the new address is NULL; 2. when the old address is not long jump but the new one is, the branch target address is written to plt first, then the patchsite is replaced with a bl instruction to the plt; 3. when the old address is long jump but the new one is not, the address of dummy_tramp is written to plt first, then the patchsite is replaced with a bl to the new address, or a nop if the new address is NULL; 4. when both the old address and the new address are long jump, the new address is written to plt and the patchsite is not changed. Signed-off-by: Xu Kuohai Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Reviewed-by: KP Singh Reviewed-by: Jean-Philippe Brucker Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20220711150823.2128542-4-xukuohai@huawei.com arch/arm64/net/bpf_jit.h | 7 + arch/arm64/net/bpf_jit_comp.c | 329 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 322 insertions(+), 14 deletions(-) commit c76654e22da1e0cb830bd0eb5832072fb76df358 Author: Helge Deller Date: Mon Jun 27 21:05:51 2022 +0200 MAINTAINERS: Update file list for module maintainers The scripts/module.lds.S and scripts/modules-check.sh files should be maintained by the "MODULE SUPPORT" maintainers. Signed-off-by: Helge Deller Signed-off-by: Luis Chamberlain MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit a8dd214ff58cd835aa61b7c800b161b98032e71d Author: Rob Herring Date: Wed Jul 6 15:20:34 2022 -0600 dt-bindings: arm: nvidia,tegra20-pmc: Move fixed string property names under 'properties' Fixed string property names should be under 'properties' rather than 'patternProperties'. Additionally, without beginning and end of line anchors, any prefix or suffix is allowed on the specified property names. As all the nvidia,tegra20-pmc powergates child node properties are fixed strings, change 'patternProperties' to 'properties'. Signed-off-by: Rob Herring Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20220706212034.568861-1-robh@kernel.org Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1e8a24ed2cab1c907bb47ca5f8dee684896456e Author: Xu Kuohai Date: Mon Jul 11 11:08:21 2022 -0400 arm64: Add LDR (literal) instruction Add LDR (literal) instruction to load data from address relative to PC. This instruction will be used to implement long jump from bpf prog to bpf trampoline in the follow-up patch. The instruction encoding: 3 2 2 2 0 0 0 7 6 4 5 0 +-----+-------+---+-----+-------------------------------------+--------+ | 0 x | 0 1 1 | 0 | 0 0 | imm19 | Rt | +-----+-------+---+-----+-------------------------------------+--------+ for 32-bit, variant x == 0; for 64-bit, x == 1. branch_imm_common() is used to check the distance between pc and target address, since it's reused by this patch and LDR (literal) is not a branch instruction, rename it to label_imm_common(). Signed-off-by: Xu Kuohai Signed-off-by: Daniel Borkmann Reviewed-by: Jean-Philippe Brucker Acked-by: Will Deacon Link: https://lore.kernel.org/bpf/20220711150823.2128542-3-xukuohai@huawei.com arch/arm64/include/asm/insn.h | 3 +++ arch/arm64/lib/insn.c | 30 ++++++++++++++++++++++++++---- 2 files changed, 29 insertions(+), 4 deletions(-) commit 535a57a7ffc04932ad83c1a5649b09ba6c93ce83 Author: Xu Kuohai Date: Mon Jul 11 11:08:20 2022 -0400 bpf: Remove is_valid_bpf_tramp_flags() Before generating bpf trampoline, x86 calls is_valid_bpf_tramp_flags() to check the input flags. This check is architecture independent. So, to be consistent with x86, arm64 should also do this check before generating bpf trampoline. However, the BPF_TRAMP_F_XXX flags are not used by user code and the flags argument is almost constant at compile time, so this run time check is a bit redundant. Remove is_valid_bpf_tramp_flags() and add some comments to the usage of BPF_TRAMP_F_XXX flags, as suggested by Alexei. Signed-off-by: Xu Kuohai Signed-off-by: Daniel Borkmann Reviewed-by: Jean-Philippe Brucker Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20220711150823.2128542-2-xukuohai@huawei.com arch/x86/net/bpf_jit_comp.c | 20 -------------------- kernel/bpf/bpf_struct_ops.c | 3 +++ kernel/bpf/trampoline.c | 3 +++ 3 files changed, 6 insertions(+), 20 deletions(-) commit bf28462e20b56c1d7c8dbf82367cd43ffbc8a1f1 Author: Saurabh Sengar Date: Sat May 21 07:23:39 2022 -0700 drm/hyperv : Removing the restruction of VRAM allocation with PCI bar size There were two different approaches getting used in this driver to allocate vram: 1. VRAM allocation from PCI region for Gen1 2. VRAM alloaction from MMIO region for Gen2 First approach limilts the vram to PCI BAR size, which is 64 MB in most legacy systems. This limits the maximum resolution to be restricted to 64 MB size, and with recent conclusion on fbdev issue its concluded to have similar allocation strategy for both Gen1 and Gen2. This patch unifies the Gen1 and Gen2 vram allocation strategy. Signed-off-by: Saurabh Sengar Reviewed-by: Deepak Rawat Link: https://lore.kernel.org/r/1653143019-20032-1-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 74 ++------------------------------- 1 file changed, 3 insertions(+), 71 deletions(-) commit 5182fecc4be8e4ae2e3a3d744b5562a3e74bf2b4 Author: Samuel Holland Date: Thu Jul 7 19:49:31 2022 -0500 PCI: hv: Take a const cpumask in hv_compose_msi_req_get_cpu() The cpumask that is passed to this function ultimately comes from irq_data_get_effective_affinity_mask(), which was recently changed to return a const cpumask pointer. The first level of functions handling the affinity mask were updated, but not this helper function. Fixes: 4d0b8298818b ("genirq: Return a const cpumask from irq_data_get_affinity_mask") Reported-by: kernel test robot Signed-off-by: Samuel Holland Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20220708004931.1672-1-samuel@sholland.org Signed-off-by: Wei Liu drivers/pci/controller/pci-hyperv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e724422a7e9dfc8229ba90ee95aaafb902a788b Merge: 4682f2136835 4d45bc82df66 Author: Greg Kroah-Hartman Date: Mon Jul 11 20:54:28 2022 +0200 Merge tag 'coresight-next-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next Suzuki writes: CoreSight self-hosted tracing changes for v5.20. - Fixes LOCKDEP warnings on module unload with configfs - Conversion of DT bindings to DT schema - Branch broadcast support for perf cs_etm - Etm4x driver fixes for build failures with Clang and unrolled loops Signed-off-by: Suzuki K Poulose * tag 'coresight-next-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux: coresight: etm4x: avoid build failure with unrolled loops Documentation: coresight: Expand branch broadcast documentation Documentation: coresight: Link config options to existing documentation Documentation: coresight: Turn numbered subsections into real subsections coresight: Add config flag to enable branch broadcast Documentation: coresight: Escape coresight bindings file wildcard dt-bindings: arm: Convert CoreSight CPU debug to DT schema dt-bindings: arm: Convert CoreSight bindings to DT schema dt-bindings: arm: Rename Coresight filenames to match compatible coresight: syscfg: Update load and unload operations coresight: configfs: Fix unload of configurations on module exit coresight: Clear the connection field properly commit 52be93558a9b32f5294750c1394d81e31fe11d6d Author: Shradha Gupta Date: Sun Jul 10 21:11:47 2022 -0700 Drivers: hv: vm_bus: Handle vmbus rescind calls after vmbus is suspended Add a flag to indicate that the vmbus is suspended so we should ignore any offer message. Add a new work_queue for rescind msg, so we could drain it along with other offer work_queues upon suspension. It was observed that in some hibernation related scenario testing, after vmbus_bus_suspend() we get rescind offer message for the vmbus. This would lead to processing of a rescind message for a channel that has already been suspended. Signed-off-by: Shradha Gupta Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20220711041147.GA5569@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net Signed-off-by: Wei Liu drivers/hv/connection.c | 11 +++++++++++ drivers/hv/hyperv_vmbus.h | 7 +++++++ drivers/hv/vmbus_drv.c | 27 +++++++++++++++++++-------- 3 files changed, 37 insertions(+), 8 deletions(-) commit 10c8fd2f7a40d691062649307a2aba00dac5dbe6 Author: Sieng-Piaw Liew Date: Fri Jul 8 16:03:03 2022 +0800 bcm63xx: fix Tx cleanup when NAPI poll budget is zero NAPI poll() function may be passed a budget value of zero, i.e. during netpoll, which isn't NAPI context. Therefore, napi_consume_skb() must be given budget value instead of !force to truly discern netpoll-like scenarios. Fixes: c63c615e22eb ("bcm63xx_enet: switch to napi_build_skb() to reuse skbuff_heads") Signed-off-by: Sieng-Piaw Liew Link: https://lore.kernel.org/r/20220708080303.298-1-liew.s.piaw@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bcm63xx_enet.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b205c1b4236b3db80fb9988aef991bae40828fb3 Merge: edb2c3476db9 bb67a66689e2 Author: Jakub Kicinski Date: Mon Jul 11 10:52:18 2022 -0700 Merge branch 'octeontx2-exact-match-table' Ratheesh Kannoth says: ==================== octeontx2: Exact Match Table. Exact match table and Field hash support for CN10KB silicon ==================== Link: https://lore.kernel.org/r/20220708044151.2972645-1-rkannoth@marvell.com Signed-off-by: Jakub Kicinski commit bb67a66689e210265e9e3970bfdac26fd6578c5d Author: Ratheesh Kannoth Date: Fri Jul 8 10:11:51 2022 +0530 octeontx2-af: Enable Exact match flag in kex profile Enabled EXACT match flag in Kex default profile. Since there is no space in key, NPC_PARSE_NIBBLE_ERRCODE is removed Signed-off-by: Ratheesh Kannoth Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/npc_profile.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fa5e0ccb8f3afa73552c4cbb6d97301ac5fbb0cb Author: Ratheesh Kannoth Date: Fri Jul 8 10:11:50 2022 +0530 octeontx2-pf: Add support for exact match table. NPC exact match table can support more entries than RPM dmac filters. This requires field size of DMAC filter count and index to be increased. Signed-off-by: Ratheesh Kannoth Signed-off-by: Jakub Kicinski .../ethernet/marvell/octeontx2/nic/otx2_common.h | 10 ++--- .../ethernet/marvell/octeontx2/nic/otx2_dmac_flt.c | 44 ++++++++++++++++------ .../ethernet/marvell/octeontx2/nic/otx2_flows.c | 40 ++++++++++++++------ .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +- 4 files changed, 67 insertions(+), 29 deletions(-) commit d6c9784baf594539ce01e8ecf007fa41194cf3e0 Author: Ratheesh Kannoth Date: Fri Jul 8 10:11:49 2022 +0530 octeontx2-af: Invoke exact match functions if supported If exact match table is supported, call functions to add/del/update entries in exact match table instead of RPM dmac filters Signed-off-by: Ratheesh Kannoth Signed-off-by: Jakub Kicinski .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 34 ++++++++++++++++++++++ .../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 7 +++++ 2 files changed, 41 insertions(+) commit 2dba9459d2c9ed63decd38626673d8eea7116a3d Author: Ratheesh Kannoth Date: Fri Jul 8 10:11:48 2022 +0530 octeontx2-af: Wrapper functions for MAC addr add/del/update/reset These functions are wrappers for mac add/addr/del/update in exact match table. These will be invoked from mbox handler routines if exact matct table is supported and enabled. Signed-off-by: Ratheesh Kannoth Signed-off-by: Jakub Kicinski .../ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 359 ++++++++++++++++++++- .../ethernet/marvell/octeontx2/af/rvu_npc_hash.h | 23 +- 2 files changed, 370 insertions(+), 12 deletions(-) commit 292822e961cc68d0bfbf5d4fbe7f43147ee11849 Author: Ratheesh Kannoth Date: Fri Jul 8 10:11:47 2022 +0530 octeontx2: Modify mbox request and response structures Exact match table modification requires wider fields as it has more number of slots to fill in. Modifying an entry in exact match table may cause hash collision and may be required to delete entry from 4-way 2K table and add to fully associative 32 entry CAM table. Signed-off-by: Ratheesh Kannoth Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 27 +++++++++++++++++----- .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 4 ++-- .../ethernet/marvell/octeontx2/nic/otx2_dmac_flt.c | 2 +- 3 files changed, 24 insertions(+), 9 deletions(-) commit 87e4ea29b030019055dfb52a7e496f4849e9bb44 Author: Ratheesh Kannoth Date: Fri Jul 8 10:11:46 2022 +0530 octeontx2-af: Debugsfs support for exact match. There debugfs files created. 1. General information on exact match table 2. Exact match table entries. 3. NPC mcam drop on hit count stats. Signed-off-by: Ratheesh Kannoth Signed-off-by: Jakub Kicinski .../ethernet/marvell/octeontx2/af/rvu_debugfs.c | 179 +++++++++++++++++++++ 1 file changed, 179 insertions(+) commit 3571fe07a090d51757b6170d7d6105f2b1c5e481 Author: Ratheesh Kannoth Date: Fri Jul 8 10:11:45 2022 +0530 octeontx2-af: Drop rules for NPC MCAM NPC exact match table installs drop on hit rules in NPC mcam for each channel. This rule has broadcast and multicast bits cleared. Exact match bit cleared and channel bits set. If exact match table hit bit is 0, corresponding NPC mcam drop rule will be hit for the packet and will be dropped. Signed-off-by: Ratheesh Kannoth Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 6 + drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 2 + .../net/ethernet/marvell/octeontx2/af/rvu_npc.c | 37 ++- .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 105 ++++++- .../ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 315 ++++++++++++++++++++- .../ethernet/marvell/octeontx2/af/rvu_npc_hash.h | 22 ++ 6 files changed, 481 insertions(+), 6 deletions(-) commit bab9eed564ed7de3949f09c97d9774407116a355 Author: Ratheesh Kannoth Date: Fri Jul 8 10:11:44 2022 +0530 octeontx2-af: FLR handler for exact match table. FLR handler should remove/free all exact match table resources corresponding to each interface. Signed-off-by: Ratheesh Kannoth Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 3 +++ .../ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 27 ++++++++++++++++++++++ .../ethernet/marvell/octeontx2/af/rvu_npc_hash.h | 1 + 3 files changed, 31 insertions(+) commit ef83e186855df9ebf131dfa74c1e5c198ccdf02a Author: Ratheesh Kannoth Date: Fri Jul 8 10:11:43 2022 +0530 octeontx2-af: devlink configuration support CN10KB silicon supports Exact match feature. This feature can be disabled through devlink configuration. Devlink command fails if DMAC filter rules are already present. Once disabled, legacy RPM based DMAC filters will be configured. Signed-off-by: Ratheesh Kannoth Signed-off-by: Jakub Kicinski .../ethernet/marvell/octeontx2/af/rvu_devlink.c | 71 +++++++++++++++++++++- .../ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 29 +++++++++ .../ethernet/marvell/octeontx2/af/rvu_npc_hash.h | 3 + 3 files changed, 101 insertions(+), 2 deletions(-) commit 812103edf670247655f8840e7994fc8bd0000af8 Author: Ratheesh Kannoth Date: Fri Jul 8 10:11:42 2022 +0530 octeontx2-af: Exact match scan from kex profile CN10KB silicon supports exact match table. Scanning KEX profile should check for exact match feature is enabled and then set profile masks properly. These kex profile masks are required to configure NPC MCAM drop rules. If there is a miss in exact match table, these drop rules will drop those packets. Signed-off-by: Ratheesh Kannoth Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/npc.h | 1 + .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 37 ++++++++++++++++++++-- 2 files changed, 35 insertions(+), 3 deletions(-) commit b747923afff8c605c658f12fc059ae8041cb0ed4 Author: Ratheesh Kannoth Date: Fri Jul 8 10:11:41 2022 +0530 octeontx2-af: Exact match support CN10KB silicon has support for exact match table. This table can be used to match maimum 64 bit value of KPU parsed output. Hit/non hit in exact match table can be used as a KEX key to NPC mcam. This patch makes use of Exact match table to increase number of DMAC filters supported. NPC mcam is no more need for each of these DMAC entries as will be populated in Exact match table. This patch implements following 1. Initialization of exact match table only for CN10KB. 2. Add/del/update interface function for exact match table. Signed-off-by: Ratheesh Kannoth Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/npc.h | 16 + drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2 + drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 9 +- .../ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 938 +++++++++++++++++++++ .../ethernet/marvell/octeontx2/af/rvu_npc_hash.h | 56 ++ .../net/ethernet/marvell/octeontx2/af/rvu_reg.h | 9 + 6 files changed, 1029 insertions(+), 1 deletion(-) commit 56d9f5fd22462410bf509d11b026b269031321ac Author: Ratheesh Kannoth Date: Fri Jul 8 10:11:40 2022 +0530 octeontx2-af: Use hashed field in MCAM key CN10KB variant of CN10K series of silicons supports a new feature where in a large protocol field (eg 128bit IPv6 DIP) can be condensed into a small hashed 32bit data. This saves a lot of space in MCAM key and allows user to add more protocol fields into the filter. A max of two such protocol data can be hashed. This patch adds support for hashing IPv6 SIP and/or DIP. Signed-off-by: Suman Ghosh Signed-off-by: Ratheesh Kannoth Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/Makefile | 2 +- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 14 + drivers/net/ethernet/marvell/octeontx2/af/npc.h | 8 + drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 5 + drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 13 + .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 1 + .../net/ethernet/marvell/octeontx2/af/rvu_npc.c | 14 +- .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 21 +- .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.h | 17 ++ .../ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 338 +++++++++++++++++++++ .../ethernet/marvell/octeontx2/af/rvu_npc_hash.h | 132 ++++++++ .../net/ethernet/marvell/octeontx2/af/rvu_reg.h | 6 + 12 files changed, 554 insertions(+), 17 deletions(-) commit 2b9401e90d369b5fbb8a62e9034ad97297594475 Author: Yang Yingliang Date: Mon Jul 4 20:03:37 2022 +0800 module: Use vzalloc() instead of vmalloc()/memset(0) Use vzalloc() instead of vmalloc() and memset(0) to simpify the code. Signed-off-by: Yang Yingliang Reviewed-by: Aaron Tomlin Signed-off-by: Luis Chamberlain kernel/module/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 87c482bdfa79f378297d92af49cdf265be199df5 Author: Helge Deller Date: Fri Jul 8 11:44:54 2022 +0200 modules: Ensure natural alignment for .altinstructions and __bug_table sections In the kernel image vmlinux.lds.S linker scripts the .altinstructions and __bug_table sections are 4- or 8-byte aligned because they hold 32- and/or 64-bit values. Most architectures use altinstructions and BUG() or WARN() in modules as well, but in the module linker script (module.lds.S) those sections are currently missing. As consequence the linker will store their content byte-aligned by default, which then can lead to unnecessary unaligned memory accesses by the CPU when those tables are processed at runtime. Usually unaligned memory accesses are unnoticed, because either the hardware (as on x86 CPUs) or in-kernel exception handlers (e.g. on parisc or sparc) emulate and fix them up at runtime. Nevertheless, such unaligned accesses introduce a performance penalty and can even crash the kernel if there is a bug in the unalignment exception handlers (which happened once to me on the parisc architecture and which is why I noticed that issue at all). This patch fixes a non-critical issue and might be backported at any time. It's trivial and shouldn't introduce any regression because it simply tells the linker to use a different (8-byte alignment) for those sections by default. Signed-off-by: Helge Deller Link: https://lore.kernel.org/all/Yr8%2Fgr8e8I7tVX4d@p100/ Signed-off-by: Luis Chamberlain scripts/module.lds.S | 2 ++ 1 file changed, 2 insertions(+) commit 07ade45a765bb7d7571f1a89ab8edfa4ce5e7268 Author: Christophe Leroy Date: Mon Jun 13 08:02:02 2022 +0200 module: Increase readability of module_kallsyms_lookup_name() module_kallsyms_lookup_name() has several exit conditions but can't return immediately due to preempt_disable(). Refactor module_kallsyms_lookup_name() to allow returning from anywhere, and reduce depth. Signed-off-by: Christophe Leroy Signed-off-by: Luis Chamberlain kernel/module/kallsyms.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) commit ecc726f1458e7aa50e120ff334f0a3be5cccd94c Author: Christophe Leroy Date: Mon Jun 13 08:02:01 2022 +0200 module: Fix ERRORs reported by checkpatch.pl Checkpatch reports following errors: ERROR: do not use assignment in if condition + if ((colon = strnchr(name, MODULE_NAME_LEN, ':')) != NULL) { ERROR: do not use assignment in if condition + if ((mod = find_module_all(name, colon - name, false)) != NULL) ERROR: do not use assignment in if condition + if ((ret = find_kallsyms_symbol_value(mod, name)) != 0) ERROR: do not initialise globals to 0 +int modules_disabled = 0; Fix them. The following one has to remain, because the condition has to be evaluated multiple times by the macro wait_event_interruptible_timeout(). ERROR: do not use assignment in if condition + if (wait_event_interruptible_timeout(module_wq, Signed-off-by: Christophe Leroy Signed-off-by: Luis Chamberlain kernel/module/kallsyms.c | 9 ++++++--- kernel/module/main.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) commit ae39e9ed964f8e450d0de410b5a757e19581dfc5 Author: Saravana Kannan Date: Fri Jun 3 18:01:00 2022 -0700 module: Add support for default value for module async_probe Add a module.async_probe kernel command line option that allows enabling async probing for all modules. When this command line option is used, there might still be some modules for which we want to explicitly force synchronous probing, so extend .async_probe to take an optional bool input so that async probing can be disabled for a specific module. Signed-off-by: Saravana Kannan Reviewed-by: Aaron Tomlin Signed-off-by: Luis Chamberlain Documentation/admin-guide/kernel-parameters.txt | 17 +++++++++++++++-- kernel/module/main.c | 11 ++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) commit 9974d37ea75f01b47d16072b5dad305bd8d23fcc Author: Liu Jian Date: Tue Jun 28 20:36:16 2022 +0800 skmsg: Fix invalid last sg check in sk_msg_recvmsg() In sk_psock_skb_ingress_enqueue function, if the linear area + nr_frags + frag_list of the SKB has NR_MSG_FRAG_IDS blocks in total, skb_to_sgvec will return NR_MSG_FRAG_IDS, then msg->sg.end will be set to NR_MSG_FRAG_IDS, and in addition, (NR_MSG_FRAG_IDS - 1) is set to the last SG of msg. Recv the msg in sk_msg_recvmsg, when i is (NR_MSG_FRAG_IDS - 1), the sk_msg_iter_var_next(i) will change i to 0 (not NR_MSG_FRAG_IDS), the judgment condition "msg_rx->sg.start==msg_rx->sg.end" and "i != msg_rx->sg.end" can not work. As a result, the processed msg cannot be deleted from ingress_msg list. But the length of all the sge of the msg has changed to 0. Then the next recvmsg syscall will process the msg repeatedly, because the length of sge is 0, the -EFAULT error is always returned. Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: Liu Jian Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20220628123616.186950-1-liujian56@huawei.com net/core/skmsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2551b6e89936f98406bce9c1d50110e3ff443f81 Author: Seven Lee Date: Mon Jun 27 11:29:59 2022 +0800 ASoC: nau8821: Add headset button detection This patch adds the function of headphone button detection, Button detection will be enabled if the device tree has a key_enable property. Signed-off-by: Seven Lee Link: https://lore.kernel.org/r/20220627032959.3442064-1-wtli@nuvoton.com Signed-off-by: Mark Brown .../devicetree/bindings/sound/nau8821.txt | 2 +- sound/soc/codecs/nau8821.c | 35 ++++++++++++++++++++++ sound/soc/codecs/nau8821.h | 1 + 3 files changed, 37 insertions(+), 1 deletion(-) commit ef4ef28acb42ec77829e842c6f30a33526daf520 Author: William Zhang Date: Wed Jul 6 23:57:59 2022 -0700 tty: serial: bcm63xx: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA Prepare for the BCM63138 ARCH_BCM_63XX migration to ARCH_BCMBCA. Make SERIAL_BCM63XX depending on ARCH_BCMBCA. Signed-off-by: William Zhang Acked-by: Florian Fainelli Signed-off-by: Florian Fainelli drivers/tty/serial/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 16f3c221646b39d9ad0a0cef05f14133bdf70165 Author: William Zhang Date: Wed Jul 6 23:57:58 2022 -0700 spi: bcm63xx-hsspi: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA Prepare for the BCM63138 ARCH_BCM_63XX migration to ARCH_BCMBCA. Make SPI_BCM63XX_HSSPI depending on ARCH_BCMBCA. Signed-off-by: William Zhang Acked-by: Florian Fainelli Acked-by: Mark Brown Signed-off-by: Florian Fainelli drivers/spi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e26c518d300b356078f229e50e3f192005befca Merge: 61b23b6b7b03 b9f098aa7ae2 Author: Mark Brown Date: Mon Jul 11 17:00:54 2022 +0100 ASoC: codecs: Series of fixes for realtek codecs used on RVPs Merge series from Amadeusz Sławiński : Our tests platforms do use realtek codecs, while implementing avs driver and machine boards for it, we identified some problems with those codec drivers. This series aims to fix those issues. commit 8f8a7775b66e61a4be218313bf5111a7622169fe Merge: a59591987726 2c1e62992981 Author: Arnd Bergmann Date: Mon Jul 11 17:48:10 2022 +0200 Merge tag 'sunxi-dt-for-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt - added H616 EMAC compatible - make pinctrl interrupts optionals in DT binding - initial H616 DTSI - added OrangePi Zero 2 board - added X96 Mate TV box - add VCC PI supply in pinctrl DT binding * tag 'sunxi-dt-for-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: h616: Add X96 Mate TV box support arm64: dts: allwinner: h616: Add OrangePi Zero 2 board support dt-bindings: arm: sunxi: Add two H616 board compatible strings dt-bindings: pinctrl: sunxi: allow vcc-pi-supply arm64: dts: allwinner: Add Allwinner H616 .dtsi file dt-bindings: pinctrl: sunxi: Make interrupts optional dt-bindings: arm: sunxi: Add H616 EMAC0 compatible Link: https://lore.kernel.org/r/YsnF9cm/qniIOklj@kista.localdomain Signed-off-by: Arnd Bergmann commit a59591987726c1ac3e9d1c1c62537cf30b25eec8 Merge: dbd68eb5baa6 418d1d840e42 Author: Arnd Bergmann Date: Mon Jul 11 17:47:12 2022 +0200 Merge tag 'imx-dt64-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX arm64 device tree update for 5.20: - Add device tree support for i.MX93 SoC. - New board device tree: TQMa8MPQL, DH electronics i.MX8M Plus DHCOM and PDK2, i.MX93 11x11 EVK, phyBOARD-Polis-i.MX8MM. - A series from Abel Vesa and Viorel Suman to fix i.MX8QXP device tree to comply with DT schema. - Disable job ring 0 device for i.MX8MM to avoid caam_jr probe error, due to that JR0 reservation is done in both upstream (v2.7) and downstream (NXP lf_v2.4) TF-A. - A series from Krzysztof Kozlowski to align gpio-key and LED node names with dtschema. - Add SNVS LPGPR device for i.MX8MM so that some preserving registers becomes available as NVMEM. - Add NoC device support for i.MX8MP SoC. - A couple of changes from Sean Anderson to add SFP node for TA devices for LayerScape SoCs. - A series from Shengjiu Wang to enable bt-sco sound card support for NXP i.MX8M EVK boards. - Other small and random board updates. * tag 'imx-dt64-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (33 commits) arm64: dts: freescale: add initial device tree for TQMa8MPQL with i.MX8MP arm64: dts: freescale: imx8qxp: Fix the keys node name arm64: dts: freescale: imx8: Fix the system-controller node name arm64: dts: freescale: imx8qxp: Fix the ocotp node name arm64: dts: freescale: imx8qxp: Add fallback compatible for clock controller arm64: dts: freescale: imx8: Fix power controller name arm64: dts: freescale: imx8qxp: Remove unnecessary clock related entries arm64: dts: imx8mp: add NoC node arm64: dts: Add SFP node for TA 3.0 devices arm64: dts: layerscape: Add SFP node for TA 2.1 devices arm64: dts: freescale: Add phyBOARD-Polis-i.MX8MM support arm64: dts: imx8m{m,p}-verdin: use IT temperatures arm64: dts: imx8mn-evk: add bt-sco sound card support arm64: dts: imx8mq-evk: add bt-sco sound card support arm64: dts: imx8mm-evk: add bt-sco sound card support arm64: freescale/imx8mp-evk.dts: reorder nodes alphabetically arm64: dts: imx8mq: Pass a label to the AIPS nodes arm64: dts: imx8m: Pass a label to the soc node arm64: dts: imx8mm-venice-gw7902: fix UART1 CTS arm64: dts: imx8mp: Add support for DH electronics i.MX8M Plus DHCOM and PDK2 ... Link: https://lore.kernel.org/r/20220709082951.15123-5-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit dbd68eb5baa661122d6920f2f489b7fab4edeaef Merge: 8128bfe3d7dc 04069a86bf96 Author: Arnd Bergmann Date: Mon Jul 11 17:43:54 2022 +0200 Merge tag 'imx-dt-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX device tree change for 5.20: - A series from Alexander Stein to fix some i.MX6UL dt_binding_check warnings. - Replace deprecated 'enable-sdio-wakeup' property with 'wakeup-source' for a couple of boards. - A set of imx7-colibri device tree updates from Marcel Ziswiler to improve devices Display, Touch, Ethernet and SD/MMC, and also adds Toradex Iris carrier board. - A few improvements on imx6qdl-colibri board, correct SGTL5000 MCLK handling, simplify handling of inverted PWM backlight. - A series from Max Krummenacher (and Oleksandr Suvorov) to improve the existing i.MX6 Apalis carrier board device trees and adds a new device tree for the Ixora V1.2 carrier board. - Add USB dual-role switching using extcon for imx7-colibri board. - Add SFP node for TA 2.1 devices for LayerScape SoCs. - Other small and random updates on various boards. * tag 'imx-dt-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (61 commits) ARM: dts: layerscape: Add SFP node for TA 2.1 devices ARM: dts: imx6qdl-prti6q.dtsi: Add applicable properties to usdhc3 ARM: dts: imx6q-bosch-acc: Replace 'enable-sdio-wakeup' ARM: dts: imx7d-smegw01: Replace 'enable-sdio-wakeup' ARM: dts: imx6q-apalis: Cleanup ARM: dts: imx6q-apalis: backlight pwm: Adapt brightness steps ARM: dts: imx6q-apalis: backlight pwm: Simplify inverted backlight ARM: dts: imx6q-apalis: Add support for Toradex Ixora V1.2 carrier boards ARM: dts: imx6q-apalis: Clean-up sd card support ARM: dts: imx6q-apalis: Add adv7280 video input ARM: dts: imx6q-apalis: Add ov5640 mipi csi camera ARM: dts: imx6q-apalis: Disable stmpe touchscreen ARM: dts: imx6q-apalis: Disable HDMI ARM: dts: imx6q-apalis: Add LVDS panel support ARM: dts: imx6q-apalis: move gpio-keys to SoM dtsi ARM: dts: imx6q-apalis: Move Atmel MXT touch ctrl to SoM dtsi ARM: dts: imx6q-apalis: Move pinmux groups to SoM dtsi ARM: dts: imx6q-apalis: Move parallel rgb interface to SoM dtsi ARM: dts: imx6q-apalis: Command pmic to standby for poweroff ARM: dts: imx6q-apalis: Add gpio-line-names ... Link: https://lore.kernel.org/r/20220709082951.15123-4-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 8128bfe3d7dc84c5896b77338babcd2197977776 Merge: bfcfa1bdc45e c03d7ab1a636 Author: Arnd Bergmann Date: Mon Jul 11 17:41:19 2022 +0200 Merge tag 'imx-bindings-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX DT bindings update for 5.20: - Compatibles for new boards: i.MX7 based Toradex Colibri, DH electronics i.MX8M Plus DHCOM and PDK2, TQMa8MPxL, Carrier for Toradex i.MX6 Apalis, i.MX93 EVK, PHYTEC i.MX8MM based board. - A series from Abel Vesa (and Viorel Suman) to split fsl,scu.txt bindings into multiple subsystem bindings in yaml format. - Fix 'line too long' warning caused by Toradex Colibri boards. * tag 'imx-bindings-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: arm: add TQMa8MPxL board dt-bindings: firmware: Add fsl,scu yaml file dt-bindings: watchdog: Add fsl,scu-wdt yaml file dt-bindings: thermal: Add fsl,scu-thermal yaml file dt-bindings: rtc: Add fsl,scu-rtc yaml file dt-bindings: power: Add fsl,scu-pd yaml file dt-bindings: nvmem: Add fsl,scu-ocotp yaml file dt-bindings: input: Add fsl,scu-key yaml file dt-bindings: pinctrl: imx: Add fsl,scu-iomux yaml file dt-bindings: clk: imx: Add fsl,scu-clk yaml file bindings: arm: fsl: Add PHYTEC i.MX8MM devicetree bindings dt-bindings: arm: fsl: Add carrier for toradex,apalis-imx6q dt-bindings: arm: fsl: Decrease the line length dt-bindings: arm: Add DH electronics i.MX8M Plus DHCOM and PDK2 dt-bindings: arm: fsl: add toradex,colibri-imx7s/d/d-emmc-iris/-v2 dt-bindings: arm: fsl: add imx93 11x11 evk board dt-bindings: arm: fsl: correct 1g vs. 1gb in toradex,colibri-imx6ull-* Link: https://lore.kernel.org/r/20220709082951.15123-3-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit bfcfa1bdc45ed615923d8c3cee5100617d876da1 Merge: 7310e458ac5e 3ea73bf02225 Author: Arnd Bergmann Date: Mon Jul 11 17:40:25 2022 +0200 Merge tag 'ti-keystone-dt-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into arm/dt Keystone2 device tree updates for v5.20 * Whitespace cleanups. * tag 'ti-keystone-dt-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: ARM: dts: keystone: Adjust whitespace around '=' Link: https://lore.kernel.org/r/20220708232709.rrpzbrpv7jbipyym@eldest Signed-off-by: Arnd Bergmann commit 7310e458ac5e4c1ab37de71b93056ea052c81e97 Merge: c784744b0405 8af893654c02 Author: Arnd Bergmann Date: Mon Jul 11 17:39:27 2022 +0200 Merge tag 'ti-k3-dt-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into arm/dt TI K3 device tree updates for v5.20 * AM62: fixups, sa2ul enabled, ramoops for sk * others: whitespace and gpio-key cleanup. * tag 'ti-k3-dt-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: arm64: dts: ti: k3-am62-main: Enable crypto accelerator arm64: dts: ti: k3-am625-sk: Enable ramoops arm64: dts: ti: k3-am642-sk: Add pinmux corresponding to main_uart0 arm64: dts: ti: Align gpio-key node names with dtschema arm64: dts: ti: Adjust whitespace around '=' Link: https://lore.kernel.org/r/20220708232701.vpk45lwogpasaaay@enchilada Signed-off-by: Arnd Bergmann commit c784744b04054cbda48ab239144c00c466465b2d Merge: ed1646fe0232 b415bb7c976f Author: Arnd Bergmann Date: Mon Jul 11 17:38:40 2022 +0200 Merge tag 'tegra-for-5.20-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt arm64: tegra: Device tree changes for v5.20-rc1 This adds and enables various hardware on Tegra234 (host1x, VIC, GPCDMA) as well as the Control BackBone related device tree nodes on Tegra194 and Tegra234. Native timers are enabled on Tegra186, Tegra194 and Tegra234, which allow keeping track of SoC-wide timestamps as well as hardware watchdog functionality. The audio subsystem is enhanced with the Output Processing Engine (OPE) on Tegra210 and later. Finally there are a handful of minor cleanups and fixes. * tag 'tegra-for-5.20-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Fix SDMMC1 CD on P2888 arm64: tegra: Update compatible for Tegra234 GPCDMA arm64: tegra: Add Host1x and VIC on Tegra234 arm64: tegra: Add Host1x context stream IDs on Tegra186+ arm64: tegra: Enable native timers on Tegra234 arm64: tegra: Enable native timers on Tegra194 arm64: tegra: Enable native timers on Tegra186 arm64: tegra: Add node for CBB 2.0 on Tegra234 arm64: tegra: Add node for CBB 1.0 on Tegra194 arm64: tegra: Align gpio-keys node names with dtschema arm64: tegra: Mark BPMP channels as no-memory-wc arm64: tegra: Add Tegra234 GPCDMA device tree node arm64: tegra: Adjust whitespace around '=' arm64: tegra: Enable OPE on various platforms arm64: tegra: Add OPE device on Tegra210 and later Link: https://lore.kernel.org/r/20220708185608.676474-7-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit ed1646fe0232e77f58d797fd4c2f3e7976b6e6ee Merge: a41bf1aabd46 799270e9b8be Author: Arnd Bergmann Date: Mon Jul 11 17:37:46 2022 +0200 Merge tag 'tegra-for-5.20-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt ARM: tegra: Device tree changes for v5.20-rc1 Two minor fixes to help reduce the noise from the DT validation tooling. * tag 'tegra-for-5.20-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: Align gpio-keys node names with dtschema ARM: tegra: Adjust whitespace around '=' Link: https://lore.kernel.org/r/20220708185608.676474-6-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit a41bf1aabd468d2d844573d88ddf7ad65224aa03 Merge: 859dd6d3e60b 015a166368d7 Author: Arnd Bergmann Date: Mon Jul 11 17:36:17 2022 +0200 Merge tag 'tegra-for-5.20-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt dt-bindings: Changes for v5.20-rc1 These changes add clock, reset, memory client and power domain definitions for various devices found on Tegra234 along with a few device tree bindings for new hardware. * tag 'tegra-for-5.20-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: tegra-ccplex-cluster: Remove status from required properties dt-bindings: Add headers for Host1x and VIC on Tegra234 dt-bindings: timer: Add Tegra186 & Tegra234 Timer dt-bindings: arm: tegra: Add NVIDIA Tegra234 CBB 2.0 binding dt-bindings: arm: tegra: Add NVIDIA Tegra194 AXI2APB binding dt-bindings: arm: tegra: Add NVIDIA Tegra194 CBB 1.0 binding dt-bindings: memory: Add Tegra234 MGBE memory clients dt-bindings: Add Tegra234 MGBE clocks and resets dt-bindings: power: Add Tegra234 MGBE power domains dt-bindings: Add headers for Tegra234 GPCDMA Link: https://lore.kernel.org/r/20220708185608.676474-4-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit bc99f1209f19fefa3ee11e77464ccfae541f4291 Author: Matthew Auld Date: Mon Jul 11 09:58:59 2022 +0100 drm/i915/ttm: fix sg_table construction If we encounter some monster sized local-memory page that exceeds the maximum sg length (UINT32_MAX), ensure that don't end up with some misaligned address in the entry that follows, leading to fireworks later. Also ensure we have some coverage of this in the selftests. v2(Chris): - Use round_down consistently to avoid udiv errors v3(Nirmoy): - Also update the max_segment in the selftest Fixes: f701b16d4cc5 ("drm/i915/ttm: add i915_sg_from_buddy_resource") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6379 Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Nirmoy Das Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20220711085859.24198-1-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 11 +++++++++-- drivers/gpu/drm/i915/i915_scatterlist.c | 19 +++++++++++++++---- drivers/gpu/drm/i915/i915_scatterlist.h | 6 ++++-- drivers/gpu/drm/i915/intel_region_ttm.c | 10 +++++++--- drivers/gpu/drm/i915/intel_region_ttm.h | 3 ++- .../gpu/drm/i915/selftests/intel_memory_region.c | 21 +++++++++++++++++++-- drivers/gpu/drm/i915/selftests/mock_region.c | 3 ++- 7 files changed, 58 insertions(+), 15 deletions(-) commit 859dd6d3e60b3b76c55070b6f326ccff3d9d8187 Merge: 5a75c2951af7 aab941b8c3cf Author: Arnd Bergmann Date: Mon Jul 11 17:32:01 2022 +0200 Merge tag 'sunxi-dt-for-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt - whitespace fixes - replaced RTC indexes with constants - gpio-key nodes aligned with dtschema - fixed LED node for Orange Pi Win - added OPP table for R40 CPU and thermal points - updated I2C controller compatibles - added compatibles for MBUS, D1 DE2 clocks, D1 USB - enable internal HMIC bias on Pinephone * tag 'sunxi-dt-for-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: pinephone: Enable internal HMIC bias dt-bindings: arm: sunxi: Add several MBUS compatibles dt-bindings: arm: sunxi: Default to the full MBUS binding dt-bindings: usb: generic-ohci: Add Allwinner D1 compatible dt-bindings: usb: generic-ehci: Add Allwinner D1 compatible dt-bindings: usb: sunxi-musb: Add Allwinner D1 compatible arm64: dts: allwinner: a100: Update I2C controller fallback dt-bindings: i2c: mv64xxx: Add variants with offload support ARM: dts: sun8i-r40: Add thermal trip points/cooling maps ARM: dts: sun8i-r40: add opp table for cpu ARM: dts: sun8i-r40: Add "cpu-supply" node for sun8i-r40 based board arm64: dts: allwinner: a64: orangepi-win: Fix LED node name dt-bindings: clock: Add compatible for D1 DE2 clocks ARM: dts: allwinner: align gpio-key node names with dtschema arm64: dts: allwinner: align gpio-key node names with dtschema arm64: dts: allwinner: Use constants for RTC clock indexes ARM: dts: sunxi: Use constants for RTC clock indexes ARM: dts: sun5i: adjust whitespace around '=' Link: https://lore.kernel.org/r/Ysh8qRH0Q5Xv9Qhf@kista.localdomain Signed-off-by: Arnd Bergmann commit 61b23b6b7b03d49e40c599e807bd40fd4170b62b Merge: 3585da93a276 e8a33a940785 Author: Mark Brown Date: Mon Jul 11 16:18:15 2022 +0100 ADD legacy audio driver support for rembrandt Merge series from V sujith kumar Reddy : Add Generic driver to support multiple platform, ADD HS control instance for Rembrandt platform. Add nau8825,max98560 and rt5682s,rt1019 combination support for legacy platform. commit 3585da93a2762f32a718361721359eb8bec100f9 Merge: fd1c769d3387 dc4fc0ae94cf Author: Mark Brown Date: Mon Jul 11 16:18:13 2022 +0100 ASoC: SOF: ipc4-topology: fix error and memory handling Merge series from Pierre-Louis Bossart : Two patches to improve error and memory handling. When IPC4 is used, some of the flows were incorrect. commit fd1c769d33872d6c7ec474c199f6a910d3555927 Author: Pierre-Louis Bossart Date: Fri Jul 8 15:07:19 2022 -0500 ASoC: SOF: remove warning on ABI checks We should only have an error when enforcing strict mapping between kernel and firmware versions. In all other cases, there is no reason to throw a warning. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220708200719.26961-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc3-topology.c | 13 ++++--------- sound/soc/sof/ipc3.c | 11 ++++------- 2 files changed, 8 insertions(+), 16 deletions(-) commit 375f53566cf04324825b7a0f545aeb4405963bd0 Author: Claudiu Beznea Date: Mon Jul 11 14:22:12 2022 +0300 ASoC: atmel: mchp-pdmc: remove space in front of mchp_pdmc_dt_init() Remove extra space in front of mchp_pdmc_dt_init(). Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220711112212.888895-1-claudiu.beznea@microchip.com Signed-off-by: Mark Brown sound/soc/atmel/mchp-pdmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39c5c44fc451c083908e77c3b2762fae2bf8acca Merge: eaa27e7fe43f 26b9f2fa7b1c Author: Mark Brown Date: Mon Jul 11 15:51:01 2022 +0100 ASoC: Merge up fixes Needed for the Rockchip driver. commit 6b77205374fdeae4c9a585a7ca754673ef52f75b Author: Florian Westphal Date: Thu Jun 23 15:05:14 2022 +0200 netfilter: nf_tables: move nft_cmp_fast_mask to where its used ... and cast result to u32 so sparse won't complain anymore. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables_core.h | 10 ---------- net/netfilter/nft_cmp.c | 12 ++++++++++++ 2 files changed, 12 insertions(+), 10 deletions(-) commit ffb3d9a30cc67a59865f50ae22e2496a5d0025eb Author: Florian Westphal Date: Thu Jun 23 15:05:13 2022 +0200 netfilter: nf_tables: use correct integer types Sparse tool complains about mixing of different endianess types, so use the correct ones. Add type casts where needed. objdiff shows no changes except in nft_tunnel (type is changed). Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_cmp.c | 6 +++--- net/netfilter/nft_ct.c | 4 ++-- net/netfilter/nft_exthdr.c | 10 +++++----- net/netfilter/nft_tunnel.c | 3 ++- 4 files changed, 12 insertions(+), 11 deletions(-) commit 7278b3c1e4ebf6f9c4cda07600f19824857c81fe Author: Florian Westphal Date: Thu Jun 23 15:05:12 2022 +0200 netfilter: nf_tables: add and use BE register load-store helpers Same as the existing ones, no conversions. This is just for sparse sake only so that we no longer mix be16/u16 and be32/u32 types. Alternative is to add __force __beX in various places, but this seems nicer. objdiff shows no changes. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 15 +++++++++++++++ net/bridge/netfilter/nft_meta_bridge.c | 2 +- net/netfilter/nft_tproxy.c | 6 +++--- 3 files changed, 19 insertions(+), 4 deletions(-) commit d86473bf2ff39c05d4a6701c8aec66a16af0d410 Author: Florian Westphal Date: Thu Jun 23 15:05:11 2022 +0200 netfilter: nf_tables: use the correct get/put helpers Switch to be16/32 and u16/32 respectively. No code changes here, the functions do the same thing, this is just for sparse checkers' sake. objdiff shows no changes. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_byteorder.c | 3 ++- net/netfilter/nft_osf.c | 2 +- net/netfilter/nft_socket.c | 8 ++++---- net/netfilter/nft_xfrm.c | 8 ++++---- 4 files changed, 11 insertions(+), 10 deletions(-) commit 168141f7e0b4294f0bb45c10c710e85b812af891 Author: Florian Westphal Date: Thu Jun 23 15:05:10 2022 +0200 netfilter: x_tables: use correct integer types Sparse complains because __be32 and u32 are mixed without conversions. Use the correct types, no code changes. Furthermore, xt_DSCP generates a bit truncation warning: "cast truncates bits from constant value (ffffff03 becomes 3)" The truncation is fine (and wanted). Add a private definition and use that instead. objdiff shows no changes. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_DSCP.c | 8 ++++---- net/netfilter/xt_TCPMSS.c | 4 ++-- net/netfilter/xt_connlimit.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) commit ec6f2ff0a3985907b0c224e482d790615be5772d Author: Florian Westphal Date: Thu Jun 23 15:05:09 2022 +0200 netfilter: nfnetlink: add missing __be16 cast Sparse flags this as suspicious, because this compares integer with a be16 with no conversion. Its a compat check for old userspace that sends host byte order, so force a be16 cast here. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f72547473fcd8c61c84f857dc821fe785f302210 Author: Zhang Jiaming Date: Thu Jun 23 16:01:41 2022 +0800 netfilter: nft_set_bitmap: Fix spelling mistake Change 'succesful' to 'successful'. Change 'transation' to 'transaction'. Signed-off-by: Zhang Jiaming Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_bitmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d3f2d0a292c24fc624afb2b4f47f838e83775721 Author: Florian Westphal Date: Wed Jun 22 11:00:47 2022 +0200 netfilter: h323: merge nat hook pointers into one sparse complains about incorrect rcu usage. Code uses the correct rcu access primitives, but the function pointers lack rcu annotations. Collapse all of them into a single structure, then annotate the pointer. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/nf_conntrack_h323.h | 109 ++++++------ net/ipv4/netfilter/nf_nat_h323.c | 42 ++--- net/netfilter/nf_conntrack_h323_main.c | 260 +++++++++++----------------- 3 files changed, 169 insertions(+), 242 deletions(-) commit e14575fa752956b88a7faedc32b096700cbf9445 Author: Florian Westphal Date: Wed Jun 22 11:00:46 2022 +0200 netfilter: nf_conntrack: use rcu accessors where needed Sparse complains about direct access to the 'helper' and timeout members. Both have __rcu annotation, so use the accessors. xt_CT is fine, accesses occur before the structure is visible to other cpus. Switch to rcu accessors there as well to reduce noise. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_broadcast.c | 6 +++++- net/netfilter/nf_conntrack_helper.c | 2 +- net/netfilter/nf_conntrack_netlink.c | 9 +++++++-- net/netfilter/nf_conntrack_sip.c | 7 ++++++- net/netfilter/nf_conntrack_timeout.c | 16 +++++++++++++--- net/netfilter/nfnetlink_cthelper.c | 10 +++++++--- net/netfilter/xt_CT.c | 23 ++++++++++++++++++----- 7 files changed, 57 insertions(+), 16 deletions(-) commit 6976890e8998afd8abbbd9fe27ed71387b24f57f Author: Florian Westphal Date: Wed Jun 22 11:00:45 2022 +0200 netfilter: nf_conntrack: add missing __rcu annotations Access to the hook pointers use correct helpers but the pointers lack the needed __rcu annotation. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/nf_conntrack_sip.h | 2 +- include/net/netfilter/nf_conntrack_timeout.h | 2 +- net/netfilter/nf_conntrack_pptp.c | 2 +- net/netfilter/nf_conntrack_sip.c | 2 +- net/netfilter/nf_conntrack_timeout.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit b038177636f83bbf87c2b238706474145dd2cd04 Author: Vlad Buslov Date: Wed Jun 15 12:43:55 2022 +0200 netfilter: nf_flow_table: count pending offload workqueue tasks To improve hardware offload debuggability count pending 'add', 'del' and 'stats' flow_table offload workqueue tasks. Counters are incremented before scheduling new task and decremented when workqueue handler finishes executing. These counters allow user to diagnose congestion on hardware offload workqueues that can happen when either CPU is starved and workqueue jobs are executed at lower rate than new ones are added or when hardware/driver can't keep up with the rate. Implement the described counters as percpu counters inside new struct netns_ft which is stored inside struct net. Expose them via new procfs file '/proc/net/stats/nf_flowtable' that is similar to existing 'nf_conntrack' file. Signed-off-by: Vlad Buslov Signed-off-by: Oz Shlomo Signed-off-by: Pablo Neira Ayuso include/net/net_namespace.h | 6 +++ include/net/netfilter/nf_flow_table.h | 21 +++++++++ include/net/netns/flow_table.h | 14 ++++++ net/netfilter/Kconfig | 9 ++++ net/netfilter/Makefile | 1 + net/netfilter/nf_flow_table_core.c | 62 ++++++++++++++++++++++++++- net/netfilter/nf_flow_table_offload.c | 17 ++++++-- net/netfilter/nf_flow_table_procfs.c | 80 +++++++++++++++++++++++++++++++++++ 8 files changed, 206 insertions(+), 4 deletions(-) commit fc54d9065f90dd25063883f404e6ff9a76913e73 Author: Vlad Buslov Date: Wed Jun 15 12:43:54 2022 +0200 net/sched: act_ct: set 'net' pointer when creating new nf_flow_table Following patches in series use the pointer to access flow table offload debug variables. Signed-off-by: Vlad Buslov Signed-off-by: Oz Shlomo Signed-off-by: Pablo Neira Ayuso net/sched/act_ct.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b8acd43148c067376f76faed9be138aa0e25414c Author: Bill Wendling Date: Thu Jun 9 22:16:31 2022 +0000 netfilter: conntrack: use correct format characters When compiling with -Wformat, clang emits the following warnings: net/netfilter/nf_conntrack_helper.c:168:18: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] request_module(mod_name); ^~~~~~~~ Use a string literal for the format string. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Bill Wendling Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6be791561212684c7fef6c864aa542b4d3e9db36 Author: Jackie Liu Date: Wed May 25 10:32:15 2022 +0800 netfilter: conntrack: use fallthrough to cleanup These cases all use the same function. we can simplify the code through fallthrough. $ size net/netfilter/nf_conntrack_core.o text data bss dec hex filename before 81601 81430 768 163799 27fd7 net/netfilter/nf_conntrack_core.o after 80361 81430 768 162559 27aff net/netfilter/nf_conntrack_core.o Arch: aarch64 Gcc : gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) Reported-by: k2ci Signed-off-by: Jackie Liu Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit b9f098aa7ae2a022dee06a8ca363e3e0e077f05a Author: Amadeusz Sławiński Date: Thu Jul 7 14:57:01 2022 +0200 ASoC: codecs: rt274: Set component to NULL on remove Make sure that component is set to proper value, otherwise we may dereference freed component in interrupt. Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220707125701.3518263-6-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/rt274.c | 1 + 1 file changed, 1 insertion(+) commit af3b33b9707d453a12e0cf5ac35d7b97b3524ace Author: Amadeusz Sławiński Date: Thu Jul 7 14:57:00 2022 +0200 ASoC: codecs: rt298: Set component to NULL on remove Make sure that component is set to proper value, otherwise we may dereference freed component in interrupt. Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220707125701.3518263-5-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/rt298.c | 1 + 1 file changed, 1 insertion(+) commit c1d7ebda11aae4659b665af61d7277dd351659b9 Author: Amadeusz Sławiński Date: Thu Jul 7 14:56:59 2022 +0200 ASoC: codecs: rt286: Set component to NULL on remove Make sure that component is set to proper value, otherwise we may dereference freed component in interrupt. Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220707125701.3518263-4-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/rt286.c | 1 + 1 file changed, 1 insertion(+) commit c0c5a242bba878b4d34f7c9612fd6cd6c404d414 Author: Amadeusz Sławiński Date: Thu Jul 7 14:56:58 2022 +0200 ASoC: codecs: rt298: Fix jack detection On our RVP platforms using rt298 with combojack we've seen issues with controls being in incorrect state after suspend/resume cycle. This is caused by codec driver not setting pins to correct state and causing codec suspend method to not be called. Which on resume caused codec registers to be in undefined state. Fix this by setting pins correctly in jack detect function. Above problem is caused by the fact that when jack == NULL code doesn't reach rt298_jack_detect() function which sets pins. Alternatively problem could be fixed by just moving rt298_jack_detect, but as rt298 codec is similar to rt286, align the code by setting pins explicitly. Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220707125701.3518263-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/rt298.c | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) commit 9b6803ec1fe0f10942b9297d2d60ec46f2999323 Author: Amadeusz Sławiński Date: Thu Jul 7 14:56:57 2022 +0200 ASoC: codecs: rt298: Fix NULL jack in interrupt Set rt298->jack to passed value in mic_detect, otherwise when jack is set to NULL on next interrupt call, we may use freed pointer. Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220707125701.3518263-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/rt298.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit af19f1936d63f8aefeca61a5410f8908e0f11f56 Author: Philipp Zabel Date: Mon Jul 11 15:06:24 2022 +0200 reset: a10sr: allow building under COMPILE_TEST This driver can be built under COMPILE_TEST. Allow it. Signed-off-by: Philipp Zabel Link: https://lore.kernel.org/r/20220711130624.1217599-1-p.zabel@pengutronix.de drivers/reset/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edb2c3476db9898a63fb5d0011ecaa43ebf46c9b Author: Jilin Yuan Date: Fri Jul 8 23:03:54 2022 +0800 fddi/skfp: fix repeated words in comments Delete the redundant word 'test'. Signed-off-by: Jilin Yuan Signed-off-by: David S. Miller drivers/net/fddi/skfp/fplustm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1377a5b2d4bb99f4383de5459a33abaacb101432 Author: Jilin Yuan Date: Fri Jul 8 22:53:04 2022 +0800 ethernet/via: fix repeated words in comments Delete the redundant word 'driver'. Signed-off-by: Jilin Yuan Signed-off-by: David S. Miller drivers/net/ethernet/via/via-velocity.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18d1909be3451e1a2e322e9035f03d0a18f7bee8 Author: Ben Dooks Date: Fri Jul 8 17:56:56 2022 +0100 reset: allow building of reset simple driver if expert config selected If CONFIG_EXPERT is selected, allow selection of CONFIG_RESET_SIMPLE if needed by the user. Signed-off-by: Ben Dooks Signed-off-by: Philipp Zabel Link: https://lore.kernel.org/r/20220708165656.269507-1-ben.dooks@sifive.com drivers/reset/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e22aa14866684f77b4f6b6cae98539e520ddb731 Author: sewookseo Date: Thu Jul 7 10:01:39 2022 +0000 net: Find dst with sk's xfrm policy not ctl_sk If we set XFRM security policy by calling setsockopt with option IPV6_XFRM_POLICY, the policy will be stored in 'sock_policy' in 'sock' struct. However tcp_v6_send_response doesn't look up dst_entry with the actual socket but looks up with tcp control socket. This may cause a problem that a RST packet is sent without ESP encryption & peer's TCP socket can't receive it. This patch will make the function look up dest_entry with actual socket, if the socket has XFRM policy(sock_policy), so that the TCP response packet via this function can be encrypted, & aligned on the encrypted TCP socket. Tested: We encountered this problem when a TCP socket which is encrypted in ESP transport mode encryption, receives challenge ACK at SYN_SENT state. After receiving challenge ACK, TCP needs to send RST to establish the socket at next SYN try. But the RST was not encrypted & peer TCP socket still remains on ESTABLISHED state. So we verified this with test step as below. [Test step] 1. Making a TCP state mismatch between client(IDLE) & server(ESTABLISHED). 2. Client tries a new connection on the same TCP ports(src & dst). 3. Server will return challenge ACK instead of SYN,ACK. 4. Client will send RST to server to clear the SOCKET. 5. Client will retransmit SYN to server on the same TCP ports. [Expected result] The TCP connection should be established. Cc: Maciej Żenczykowski Cc: Eric Dumazet Cc: Steffen Klassert Cc: Sehee Lee Signed-off-by: Sewook Seo Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller include/net/xfrm.h | 2 ++ net/ipv4/ip_output.c | 2 +- net/ipv4/tcp_ipv4.c | 2 ++ net/ipv6/tcp_ipv6.c | 5 ++++- 4 files changed, 9 insertions(+), 2 deletions(-) commit 9a3bfa01aa1c5b5478edaf7c76ea0b3a94f9c13e Author: Rasmus Villemoes Date: Tue Jun 15 23:49:51 2021 +0800 lib/test_printf.c: split write-beyond-buffer check in two Before each invocation of vsnprintf(), do_test() memsets the entire allocated buffer to a sentinel value. That buffer includes leading and trailing padding which is never included in the buffer area handed to vsnprintf (spaces merely for clarity): pad test_buffer pad **** **************** **** Then vsnprintf() is invoked with a bufsize argument <= BUF_SIZE. Suppose bufsize=10, then we'd have e.g. |pad | test_buffer |pad | **** pizza0 **** ****** **** A B C D E where vsnprintf() was given the area from B to D. It is obviously a bug for vsnprintf to touch anything between A and B or between D and E. The former is checked for as one would expect. But for the latter, we are actually a little stricter in that we check the area between C and E. Split that check in two, providing a clearer error message in case it was a genuine buffer overrun and not merely a write within the provided buffer, but after the end of the generated string. So far, no part of the vsnprintf() implementation has had any use for using the whole buffer as scratch space, but it's not unreasonable to allow that, as long as the result is properly nul-terminated and the return value is the right one. However, it is somewhat unusual, and most % won't need this, so keep the [C,D] check, but make it easy for a later patch to make that part opt-out for certain tests. Signed-off-by: Rasmus Villemoes Tested-by: Jia He Signed-off-by: Jia He Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210615154952.2744-4-justin.he@arm.com lib/test_printf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5a75c2951af71cf04eff2fcce8bfe7684a5ba293 Merge: 1a110d77a9b9 9c61051561b0 Author: Arnd Bergmann Date: Mon Jul 11 14:02:54 2022 +0200 Merge tag 'v5.19-next-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt Some fixes to follow DT spec. MT6795: - Big update of supported devices: cpu-map, L2 cache, PMU, watchdog, MediaTek timer, Arm CCI, pincontroller MT7622: - Change WPS button to active low MT8173: - Add infracfg property to the IOMMU node (also for mt2712e) - Add optional AXI clock to NOR Flash node MT8183: - add Medaitek CCI support - add support for Smart Voltag Scaling (SVS) - add GCE support to mutex - Add panel default rotation to some chromebooks - Add power supply to power domain so that SRAM for the GPU has power MT8186: - compatible added, DTS not yet ready. MT8192: - Add support for Acer Chromebook 514 MT8195: - Add efuse node - Enable USB wakeup support - Add support for Acer Chromebook Spin 513 * tag 'v5.19-next-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (66 commits) arm64: dts: mt8183: Add panel rotation arm64: dts: mt7622: fix BPI-R64 WPS button arm64: dts: mt8173: Fix nor_flash node arm64: dts: mediatek: cherry: Add I2C-HID touchscreen on I2C4 arm64: dts: mediatek: cherry: Enable support for the SPI NOR flash arm64: dts: mediatek: cherry: Enable MT6360 sub-pmic on I2C7 arm64: dts: mediatek: cherry: Enable T-PHYs and USB XHCI controllers arm64: dts: mediatek: cherry: Enable I2C and SPI controllers arm64: dts: mediatek: cherry: Document gpios and add default pin config arm64: dts: mediatek: cherry: Add support for internal eMMC storage arm64: dts: mediatek: cherry: Assign interrupt line to MT6359 PMIC arm64: dts: mediatek: cherry: Add platform regulators layout and config arm64: dts: mediatek: Introduce MT8195 Cherry platform's Tomato dt-bindings: arm: mediatek: Add MT8195 Cherry Tomato Chromebooks arm64: dts: mediatek: asurada: Add SPI NOR flash memory arm64: dts: mediatek: asurada: Enable SCP arm64: dts: mediatek: asurada: Enable MMC arm64: dts: mediatek: asurada: Add SPMI regulators arm64: dts: mediatek: asurada: Add MT6359 PMIC arm64: dts: mediatek: asurada: Enable PCIe and add WiFi ... Link: https://lore.kernel.org/r/b0d5b584-2693-73b3-79f6-3e2292f006ea@gmail.com Signed-off-by: Arnd Bergmann commit 1a110d77a9b9f8ae023634845dd8fd9c1c2efe21 Merge: b83c42935c91 4da8b5e9f24a Author: Arnd Bergmann Date: Mon Jul 11 14:02:14 2022 +0200 Merge tag 'v5.19-next-dts32' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt Airoha EN7523: - Add clock and PCIe support Several style fixes to comply with DT spec. * tag 'v5.19-next-dts32' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: ARM: dts: mediatek: align gpio-key node names with dtschema ARM: dts: mediatek: adjust whitespace around '=' ARM: dts: Add PCIe support for Airoha EN7523 ARM: dts: add clock support for Airoha EN7523 Link: https://lore.kernel.org/r/63536da6-fbe4-2d96-ab91-ae756cd580c4@gmail.com Signed-off-by: Arnd Bergmann commit 454b768f9ba653d65968c1ef29d2d4aa477147ea Author: Kai-Heng Feng Date: Tue Jul 5 22:23:04 2022 +0800 mt76: mt7921: Let PCI core handle power state and use pm_sleep_ptr() PCI power state and wakeup are already handled by PCI core, so it's not necessary to handle them in the driver. Also switch to use pm_sleep_ptr() to remove #ifdef guard. Signed-off-by: Kai-Heng Feng Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/pci.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) commit 3bd53ea02d77917c2314ec7be9e2d05be22f87d3 Author: Liang He Date: Mon Jul 4 16:34:21 2022 +0800 mediatek: mt76: eeprom: fix missing of_node_put() in mt76_find_power_limits_node() We should use of_node_put() for the reference 'np' returned by of_get_child_by_name() which will increase the refcount. Fixes: 22b980badc0f ("mt76: add functions for parsing rate power limits from DT") Signed-off-by: Liang He Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/eeprom.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0a14c1d0113f121151edf34333cdf212dd209190 Author: Liang He Date: Mon Jul 4 16:34:20 2022 +0800 mediatek: mt76: mac80211: Fix missing of_node_put() in mt76_led_init() We should use of_node_put() for the reference 'np' returned by of_get_child_by_name() which will increase the refcount. Fixes: 17f1de56df05 ("mt76: add common code shared between multiple chipsets") Signed-off-by: Liang He Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 1 + 1 file changed, 1 insertion(+) commit 8950a62f19c9fe009a451aeea08ab740354549be Author: Lorenzo Bianconi Date: Mon Jul 4 09:02:23 2022 +0200 mt76: get rid of mt76_wcid_hw routine mt76_wcid_hw() is no longer used. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76.h | 10 ---------- 1 file changed, 10 deletions(-) commit a062f00173913ec244053a7fac35544e917bd6f9 Author: Lorenzo Bianconi Date: Mon Jul 4 09:02:22 2022 +0200 mt76: convert MT_TX_HW_QUEUE_EXT_PHY to MT_TX_HW_QUEUE_PHY Report phy_indx in tx_info->hw_queue. This is a preliminary patch to add newer chipset support Co-developed-by: Bo Jiao Signed-off-by: Bo Jiao Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76.h | 10 ++++------ drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 8 ++++---- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 6 ++---- drivers/net/wireless/mediatek/mt76/mt7615/pci_mac.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c | 6 +++--- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 9 +++------ drivers/net/wireless/mediatek/mt76/testmode.c | 5 +---- drivers/net/wireless/mediatek/mt76/tx.c | 9 ++------- 9 files changed, 23 insertions(+), 36 deletions(-) commit a1a99d7bddad6b8a5ae12d253b3c6a44bd7c7e7b Author: Lorenzo Bianconi Date: Mon Jul 4 09:02:21 2022 +0200 mt76: add phy_idx to mt76_wcid Introduce phy_idx to mt76_wcid structure instead of ext_phy. This is a preliminary patch to add newer chipset support. Co-developed-by: Bo Jiao Signed-off-by: Bo Jiao Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 12 ++++++------ drivers/net/wireless/mediatek/mt76/mt76.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 6 +++--- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) commit dc44c45c8cd062292c45626b5c941397a0ff5ead Author: Lorenzo Bianconi Date: Mon Jul 4 09:02:20 2022 +0200 mt76: introduce phys array in mt76_dev structure Introduce phys array in mt76_dev structure to reference mt76_phy supported by the chipset. This is a preliminary patch to introduce newer chipset support. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/dma.c | 13 +++++-- drivers/net/wireless/mediatek/mt76/mac80211.c | 9 +++-- drivers/net/wireless/mediatek/mt76/mt76.h | 43 ++++++++++++++-------- drivers/net/wireless/mediatek/mt76/mt7615/init.c | 4 +- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 36 ++++++++++-------- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 26 ++++++------- drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 2 +- .../net/wireless/mediatek/mt76/mt7615/pci_mac.c | 14 ++++--- .../net/wireless/mediatek/mt76/mt76_connac_mac.c | 8 ++-- drivers/net/wireless/mediatek/mt76/mt7915/init.c | 4 +- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 20 +++++----- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 16 ++++---- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 2 +- drivers/net/wireless/mediatek/mt76/tx.c | 42 ++++++++++++++------- 14 files changed, 142 insertions(+), 97 deletions(-) commit 128c9b7d6235b960e367944cad352790f76862eb Author: Lorenzo Bianconi Date: Mon Jul 4 09:02:19 2022 +0200 mt76: add phy_idx in mt76_rx_status Introduce phy_idx mt76_rx_status instead of ext_idx. This is a preliminary patch to add newer chipset support Co-developed-by: Bo Jiao Signed-off-by: Bo Jiao Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 6 +++--- drivers/net/wireless/mediatek/mt76/mt76.h | 11 ++++++----- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) commit fc8f841bacfc092d0ca0f3022dc9bdf8e570797b Author: Lorenzo Bianconi Date: Thu Jun 30 15:56:13 2022 +0200 mt76: introduce MT_RXQ_BAND2 and MT_RXQ_BAND2_WA in mt76_rxq_id Rename MT_RXQ_EXT in MT_RXQ_BAND1. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76.h | 6 ++- drivers/net/wireless/mediatek/mt76/mt7915/dma.c | 47 +++++++++++++--------- drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 8 ++-- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/regs.h | 8 ++-- .../net/wireless/mediatek/mt76/mt7915/testmode.c | 2 +- 6 files changed, 42 insertions(+), 31 deletions(-) commit b146f238d1200f975b5f6d833ef70dab4f4474d4 Author: Lorenzo Bianconi Date: Thu Jun 30 14:55:18 2022 +0200 mt76: add len parameter to __mt76_mcu_msg_alloc signature Introduce len to __mt76_mcu_msg_alloc signature in order to add the capability to specify two different value for allocation and copy length. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mcu.c | 10 ++++++---- drivers/net/wireless/mediatek/mt76/mt76.h | 4 ++-- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 11 +++++------ 3 files changed, 13 insertions(+), 12 deletions(-) commit 7e6ffd5d5da93ee3936402058e12826669849611 Author: MeiChia Chiu Date: Tue Jun 28 13:55:28 2022 +0800 mt76: mt7915 add ht mpdu density set ht mpdu density to 4 usec. Reviewed-by: Ryder Lee Signed-off-by: MeiChia Chiu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/init.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5163150a47af58e32940e5b223b97928ecae2b89 Author: Sean Wang Date: Mon Jun 27 07:27:06 2022 +0800 mt76: mt7921: reduce the mutex lock scope during reset Reduce the mutex lock scope for reset to get rid of possible task hung e.g wpa_supplicant and to allow the user-space process to keep running during we need more retries to complete the reset. Reviewed-by: AngeloGioacchino Del Regno Suggested-by: YN Chen Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit af1c9bb282861386dfa73e8f2d9bdb0dde5db481 Author: Sean Wang Date: Mon Jun 27 07:27:05 2022 +0800 mt76: mt7921: reduce log severity levels for informative messages Use dev_dbg instead for the diagnostic messages. Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9dfb28e9bcd48235b685979e176ed4366a96d95a Author: Lorenzo Bianconi Date: Fri Jun 24 12:08:29 2022 +0200 mt76: connac: move tx initialization/cleanup in mt76_connac module Move mt76_connac_init_tx_queues and mt76_connac_tx_cleanup routines in mt76_connac module. This is a preliminary patch to add mt7990 chipset support. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/dma.c | 9 +++------ drivers/net/wireless/mediatek/mt76/mt76_connac.h | 8 ++++++++ .../net/wireless/mediatek/mt76/mt76_connac_mac.c | 16 ++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/dma.c | 22 +++------------------- drivers/net/wireless/mediatek/mt76/mt7921/dma.c | 21 ++++----------------- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 6 ------ 7 files changed, 35 insertions(+), 49 deletions(-) commit 81f302fdef1a721ce94c8db0f18ec7686fbc09c8 Author: Lorenzo Bianconi Date: Fri Jun 24 12:06:29 2022 +0200 mt76: mt7921: make mt7921_pci_driver static mt7921_pci_driver struct is only referenced in mt7921/pci.c so make it static. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 1 - drivers/net/wireless/mediatek/mt76/mt7921/pci.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 4aa8e0a475e7630aa5862f7e7eda9f020e836294 Author: Sean Wang Date: Wed Jun 22 05:17:39 2022 +0800 mt76: mt7921: enable HW beacon filter in the initialization stage The current driver has worked with HW beacon filter and connection monitor all the way, here we move the enablement into the initialization stage like other HW features being done to get rid of others are confused why these configurations would be changed at runtime. We still leave a way to turn off these offload features in debugfs knobs but that is just for debugging purposes. Tested-by: Deren Wu Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/init.c | 1 + drivers/net/wireless/mediatek/mt76/mt7921/main.c | 16 +++++++++++++++- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 5 ----- 3 files changed, 16 insertions(+), 6 deletions(-) commit abdb2b524b32292b78cb3aa41e9e64659e8a3a2f Author: Sean Wang Date: Wed Jun 22 05:17:38 2022 +0800 mt76: mt7921: enable HW beacon filter not depending on PM flag The hardware beacon filter works whether or not the PM flag is set, so we drop redundant dependency checks on PM flags. Additionally, the patch implicitly allow the MT7921[E, S, U] to have a consistent configuration of the hardware beacon filter. Tested-by: Deren Wu Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bceb8b8ded9b2470c10a13e5446f2d5a8e178964 Author: Felix Fietkau Date: Sun Jul 3 20:59:05 2022 +0200 mt76: remove q->qid It is no longer used Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76.h | 3 --- drivers/net/wireless/mediatek/mt76/sdio.c | 2 -- drivers/net/wireless/mediatek/mt76/usb.c | 1 - 3 files changed, 6 deletions(-) commit 1d5af0acac6eee9cb2b6688ed5e7084494d8707b Author: Felix Fietkau Date: Sat Jul 2 15:56:23 2022 +0200 mt76: do not use skb_set_queue_mapping for internal purposes Previously the code used skb_set_queue_mapping for management or non-bufferable powersave frames that need to be sent to a different hardware queue. This can confuse AQL, which expects the value to remain the same until the tx status report. The only place that currently uses the altered skb queue mapping is the txwi write function. Change the code to pass the hardware queue id as a function parameter instead. Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 5 +++-- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 3 ++- drivers/net/wireless/mediatek/mt76/mt7615/pci_mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76_connac.h | 2 +- drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 8 +++++--- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 3 ++- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/pci_mac.c | 2 +- drivers/net/wireless/mediatek/mt76/tx.c | 1 - 14 files changed, 24 insertions(+), 20 deletions(-) commit d08295f5be8e63e64f9e664572f1b582ede7958b Author: Felix Fietkau Date: Sun Jul 3 17:52:24 2022 +0200 mt76: pass original queue id from __mt76_tx_queue_skb to the driver MT7615 and newer map multiple software tx queues to the hardware id Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/dma.c | 6 +++--- drivers/net/wireless/mediatek/mt76/mt76.h | 4 ++-- drivers/net/wireless/mediatek/mt76/mt7603/beacon.c | 6 +++--- drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | 3 ++- drivers/net/wireless/mediatek/mt76/sdio.c | 6 +++--- drivers/net/wireless/mediatek/mt76/testmode.c | 4 ++-- drivers/net/wireless/mediatek/mt76/tx.c | 2 +- drivers/net/wireless/mediatek/mt76/usb.c | 6 +++--- 8 files changed, 19 insertions(+), 18 deletions(-) commit aac86cebb4a09e3fa2c07589f79f7d0e07e8c9a4 Author: Felix Fietkau Date: Fri Jun 24 20:57:47 2022 +0200 mt76: mt7615: fix throughput regression on DFS channels For some reason, mt7615 reacts badly to repeatedly enabling/disabling the radar detector without also switching the channel. This results in very bad throughput on DFS channels, because hw->conf.radar_enabled can get toggled a few times after CAC ends. Fix this by always leaving the DFS detector enabled on DFS channels and instead suppress unwanted detection events. Fixes: 2c86f6752046 ("mt76: mt7615: fix/rewrite the dfs state handling logic") Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 7 ++++--- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 21 --------------------- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 3 +++ drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 1 - 4 files changed, 7 insertions(+), 25 deletions(-) commit 3c1032e1221723777d59c116e805be5e3fcb319d Author: Felix Fietkau Date: Thu Jun 23 14:21:18 2022 +0200 mt76: allow receiving frames with invalid CCMP PN via monitor interfaces This can be useful for debugging Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 8916e4e513a85ff6315d1e7fef999916b35023d7 Author: Felix Fietkau Date: Thu Jun 23 11:39:58 2022 +0200 mt76: mt76x02: improve reliability of the beacon hang check Increment the counter only when writing beacons to the hardware in order to avoid triggering restarts if beacons are disabled. Additionally, avoid resetting the MAC if stopping it failed Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c | 6 +++++- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 11 ++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) commit df6b739fd7d15371357c32d4b1190e681434a096 Author: Felix Fietkau Date: Wed Jun 22 14:11:06 2022 +0200 mt76: mt7615: add sta_rec with EXTRA_INFO_NEW for the first time only Set EXTRA_INFO_NEW for the first time only to prevent adding the same starec entry, otherwise the entry might be removed in fw. Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 9 ++++++++- drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) commit 18fced2017d8b8a21a484640f5880bd7ec0d62ec Author: MeiChia Chiu Date: Wed Jun 22 17:46:55 2022 +0800 mt76: mt7915: update the maximum size of beacon offload Since an in-band discovery frame is offloaded by MCU, here we enlarge the command size to accommodate the additional content. Reviewed-by: Ryder Lee Signed-off-by: Money Wang Signed-off-by: MeiChia Chiu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 11 ++++++++--- drivers/net/wireless/mediatek/mt76/mt7915/mcu.h | 6 ++++++ 2 files changed, 14 insertions(+), 3 deletions(-) commit 1858e4fc89b2301e9a9e056a331cbd0902e516b5 Author: MeiChia Chiu Date: Wed Jun 22 16:30:34 2022 +0800 mt76: do not check the ccmp pn for ONLY_MONITOR frame if the received frame enables RX_FLAG_ONLY_MONITOR, driver doesn't need to check the ccmp pn of this frame. Reviewed-by: Ryder Lee Signed-off-by: MeiChia Chiu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 3 +++ 1 file changed, 3 insertions(+) commit 8e3e7567b8c1216c743a69a32e468f7c86b8643f Author: Shayne Chen Date: Wed Jun 22 09:24:49 2022 +0800 mt76: mt7915: add sta_rec with EXTRA_INFO_NEW for the first time only Set EXTRA_INFO_NEW for the first time only to prevent adding the same starec entry, otherwise the entry might be removed in fw. Reviewed-by: Ryder Lee Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 754f9ae80e4fc3a42cfb7e2c680fdf7710ff8273 Author: Peter Chiu Date: Wed Jun 22 09:24:48 2022 +0800 mt76: mt7915: update mpdu density in 6g capability Set mpdu density to 2 usec in 6g capability to meet hardware capability and also enhance throughput. Signed-off-by: Peter Chiu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8dae26a3bddf8bcd81f6f13de8c9ea085e64cdea Author: Lorenzo Bianconi Date: Wed Jun 22 00:51:24 2022 +0200 mt76: mt7915: do not copy ieee80211_ops pointer in mt7915_mmio_probe We do not modify ieee80211_ops pointers so we do not need to copy them. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 6e744cfeee02c2d8676eb55d5b3720808812f41f Author: Shayne Chen Date: Mon Jun 20 14:17:17 2022 +0800 mt76: mt7915: fix incorrect testmode ipg on band 1 caused by wmm_idx Fix the issue that the measured inter packet gap didn't fit its setting value. Fixes: c2d3b1926f30 ("mt76: mt7915: add support for ipg in testmode") Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/testmode.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c3f2ed588867e14560b86e9db6bf5ac29f03dc5a Author: Felix Fietkau Date: Tue Jun 21 20:34:44 2022 +0200 mt76: mt7915: disable UL MU-MIMO for mt7915 After initially establishing a connection, it can produce multi-second latency spikes and tx hangs when pushing traffic. It should work better for MT7916 and MT7986, so leave it enabled there Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/init.c | 7 ++++--- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) commit d2f5c8ed9fc436b53a59fdb8bdeb5f19f3a1b12c Author: Lorenzo Bianconi Date: Mon Jun 20 14:59:18 2022 +0200 mt76: move mt76_connac2_mcu_fill_message in mt76_connac module Move mt76_connac2_mcu_fill_message routine in shared module in order to reuse it for mt7921 and mt7915e drivers. This is a preliminary patch to add mt7990 driver support. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.h | 3 - .../net/wireless/mediatek/mt76/mt76_connac2_mac.h | 13 ++++ .../net/wireless/mediatek/mt76/mt76_connac_mcu.c | 77 ++++++++++++++++++++++ .../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 5 ++ drivers/net/wireless/mediatek/mt76/mt7915/mac.h | 12 ---- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 61 ++--------------- drivers/net/wireless/mediatek/mt76/mt7915/mcu.h | 3 - drivers/net/wireless/mediatek/mt76/mt7921/mac.h | 13 ---- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 77 ---------------------- drivers/net/wireless/mediatek/mt76/mt7921/mcu.h | 3 - drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 2 - .../net/wireless/mediatek/mt76/mt7921/pci_mcu.c | 9 ++- .../net/wireless/mediatek/mt76/mt7921/sdio_mcu.c | 9 ++- drivers/net/wireless/mediatek/mt76/mt7921/usb.c | 9 ++- 14 files changed, 125 insertions(+), 171 deletions(-) commit fc6ee71a2a8f2d183724e3f97762e93c5102425c Author: Lorenzo Bianconi Date: Mon Jun 20 14:59:17 2022 +0200 mt76: move mcu_txd/mcu_rxd structures in shared code This is a preliminary patch to add mt7990 chipset support. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 85 ++++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 29 +++++--- drivers/net/wireless/mediatek/mt76/mt7915/mcu.h | 42 +---------- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 4 +- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 33 +++++---- drivers/net/wireless/mediatek/mt76/mt7921/mcu.h | 85 ---------------------- .../net/wireless/mediatek/mt76/mt7921/pci_mcu.c | 2 +- .../net/wireless/mediatek/mt76/mt7921/sdio_mcu.c | 3 +- drivers/net/wireless/mediatek/mt76/mt7921/usb.c | 3 +- 10 files changed, 131 insertions(+), 157 deletions(-) commit a8021cb9c1ef26536a766a0c3ecdd1f702516cb0 Author: Lorenzo Bianconi Date: Mon Jun 20 14:37:34 2022 +0200 mt76: mt7915: rely on mt76_connac_tx_free As for mt7921 and mt7615 drivers, rely on mt76_connac_tx_free data structure in mt7915e driver. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac.h | 3 +-- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 11 ++++++----- drivers/net/wireless/mediatek/mt76/mt7915/mac.h | 8 -------- 3 files changed, 7 insertions(+), 15 deletions(-) commit 2b25b8555d631c6d21d7d29f4f3d85a118f1e52d Author: Lorenzo Bianconi Date: Sun Jun 19 22:42:41 2022 +0200 mt76: connac: move mt7615_txp_skb_unmap in common code Move mt7615_txp_skb_unmap in shared code and reuse it in mt7915e and mt7921e driver. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 56 +------------------- drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 2 - drivers/net/wireless/mediatek/mt76/mt76_connac.h | 2 + .../net/wireless/mediatek/mt76/mt76_connac_mac.c | 60 ++++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 14 +---- .../net/wireless/mediatek/mt76/mt7921/pci_mac.c | 33 +----------- 6 files changed, 65 insertions(+), 102 deletions(-) commit 5e610f8e3115ca92a59d3721642185e15df1a065 Author: Lorenzo Bianconi Date: Sun Jun 19 22:42:40 2022 +0200 mt76: connac: move mt76_connac_write_hw_txp in shared code Now we can move mt76_connac_write_hw_txp routine in mt76-connac module and reuse it in mt7921e and mt7615e driver. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mac.h | 6 ---- .../net/wireless/mediatek/mt76/mt7615/pci_mac.c | 40 +--------------------- drivers/net/wireless/mediatek/mt76/mt76_connac.h | 8 +++++ .../net/wireless/mediatek/mt76/mt76_connac_mac.c | 39 +++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7921/mac.h | 5 --- .../net/wireless/mediatek/mt76/mt7921/pci_mac.c | 33 +----------------- 6 files changed, 49 insertions(+), 82 deletions(-) commit 0a178a6084d6b6a1cb782d01ae8f65d9f6ddc37c Author: Lorenzo Bianconi Date: Sun Jun 19 22:42:39 2022 +0200 mt76: connac: move mt76_connac_tx_complete_skb in shared code Since now txp structures are in common code we can reuse mt76_connac_tx_complete_skb routine in mt7921e, mt7915e and mt7615e drivers. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mac.h | 2 -- drivers/net/wireless/mediatek/mt76/mt7615/mmio.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 1 - .../net/wireless/mediatek/mt76/mt7615/pci_mac.c | 31 ---------------------- drivers/net/wireless/mediatek/mt76/mt76_connac.h | 17 ++++++++++++ .../net/wireless/mediatek/mt76/mt76_connac_mac.c | 31 ++++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 21 --------------- drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 1 - drivers/net/wireless/mediatek/mt76/mt7921/mac.h | 2 -- drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 1 - drivers/net/wireless/mediatek/mt76/mt7921/pci.c | 2 +- .../net/wireless/mediatek/mt76/mt7921/pci_mac.c | 23 ---------------- 13 files changed, 51 insertions(+), 85 deletions(-) commit 4b3be9d8408ba1d6b38c5c477d59df0e5ad7e576 Author: Lorenzo Bianconi Date: Sun Jun 19 22:42:38 2022 +0200 mt76: connac: move mt76_connac_tx_free in shared code Move mt76_connac_tx_free structure in mt76_connac module since it is shared by mt7615 and mt7921 drivers. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 7 ++++--- drivers/net/wireless/mediatek/mt76/mt7615/mac.h | 8 -------- drivers/net/wireless/mediatek/mt76/mt76_connac.h | 7 +++++++ drivers/net/wireless/mediatek/mt76/mt7921/mac.h | 8 -------- drivers/net/wireless/mediatek/mt76/mt7921/pci_mac.c | 7 ++++--- 5 files changed, 15 insertions(+), 22 deletions(-) commit 4cb4da17fe2f3cc4e9ac9e0f1c6ac752b899571f Author: Lorenzo Bianconi Date: Sun Jun 19 22:42:37 2022 +0200 mt76: move mt7615_txp_ptr in mt76_connac module Since mt7615_txp_ptr is shared between mt7615 and mt7921 move it in mt76_connac module. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 6 +++--- drivers/net/wireless/mediatek/mt76/mt7615/mac.h | 22 ---------------------- drivers/net/wireless/mediatek/mt76/mt7615/mmio.c | 2 +- .../net/wireless/mediatek/mt76/mt7615/pci_mac.c | 8 ++++---- drivers/net/wireless/mediatek/mt76/mt76_connac.h | 22 ++++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7921/mac.h | 21 --------------------- drivers/net/wireless/mediatek/mt76/mt7921/pci.c | 3 +-- .../net/wireless/mediatek/mt76/mt7921/pci_mac.c | 16 ++++++++-------- 8 files changed, 39 insertions(+), 61 deletions(-) commit 5c0bed88c19d05b87aa4ca6ce6a2a93df4533a5e Author: Lorenzo Bianconi Date: Sun Jun 19 22:42:36 2022 +0200 mt76: connac: move mt76_connac_fw_txp in common module Since mt76_connac_fw_txp struct is shared between mt7615e, mt7915e and mt7921e, move it in mt76_connac module. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 4 +-- drivers/net/wireless/mediatek/mt76/mt7615/mac.h | 33 +------------------- .../net/wireless/mediatek/mt76/mt7615/pci_mac.c | 7 +++-- drivers/net/wireless/mediatek/mt76/mt76_connac.h | 35 ++++++++++++++++++++++ .../net/wireless/mediatek/mt76/mt76_connac2_mac.h | 13 ++++---- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 14 ++++----- drivers/net/wireless/mediatek/mt76/mt7915/mac.h | 32 -------------------- drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/mac.h | 32 -------------------- .../net/wireless/mediatek/mt76/mt7921/pci_mac.c | 4 +-- 10 files changed, 59 insertions(+), 117 deletions(-) commit 6d6796db0bd93b09f424e76fd6dd21115378bb2d Author: Lorenzo Bianconi Date: Sun Jun 19 15:05:51 2022 +0200 mt76: mt7915: get rid of unnecessary new line in mt7915_mac_write_txwi Remove unnecessary new line in mt7915_mac_write_txwi routine. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 1 - 1 file changed, 1 deletion(-) commit 31f3248a75932b111bc90c66b1f6c7d89eedca8e Author: Deren Wu Date: Sat Jun 18 18:56:44 2022 +0800 mt76: mt7921: enlarge maximum VHT MPDU length to 11454 Enlarge maximum MPDU length to 11454 that both mt7921/mt7922 can support. After this fixing, we can get better performance. Fixes: 5c14a5f944b9 ("mt76: mt7921: introduce mt7921e support") Tested-by: Ming Yen Hsieh Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5a50e6bd1972c481f82befa846dce0b9866f025 Author: Deren Wu Date: Thu Jun 16 23:57:43 2022 +0800 mt76: mt7921: fix aggregation subframes setting to HE max mt7921/mt7922 support HE max aggregation subframes 256 for both tx/rx. Get better throughput then before. Fixes: 94bb18b03d43 ("mt76: mt7921: fix max aggregation subframes setting") Tested-by: Ming Yen Hsieh Reviewed-by: Sean Wang Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 364718c94ac2ea4e51958ac0aa15c9092c785a3a Author: Deren Wu Date: Tue Jun 14 15:50:24 2022 +0800 mt76: mt7921s: fix possible sdio deadlock in command fail Move sdio_release_host() to final resource handing Fixes: b12deb5e86fa ("mt76: mt7921s: fix mt7921s_mcu_[fw|drv]_pmctrl") Reported-by: YN Chen Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f4a92547fb9818ff272e1e2f0c79cd6b0bc99ce8 Author: Lorenzo Bianconi Date: Mon Jun 13 14:07:08 2022 +0200 mt76: mt7921: do not update pm states in case of error Do not update pm stats if mt7921e_mcu_fw_pmctrl routine returns an error. Fixes: 36873246f78a2 ("mt76: mt7921: add awake and doze time accounting") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 79717c4eeeae9dec894794fbe8af72f08f03ebdd Author: Lorenzo Bianconi Date: Mon Jun 13 14:03:28 2022 +0200 mt76: mt7615: do not update pm stats in case of error Do not update pm stats if mt7615_mcu_fw_pmctrl returns an error. Fixes: abe912ae3cd42 ("mt76: mt7663: add awake and doze time accounting") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit cfd6110998e33b8695ed8931f39b44d337aa2d50 Author: Lorenzo Bianconi Date: Mon Jun 13 14:00:44 2022 +0200 mt76: mt7921s: remove unnecessary goto in mt7921s_mcu_drv_pmctrl Get rid of unnecessary goto in mt7921s_mcu_drv_pmctrl routine. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit d832f5e73815c3043ede569fd3af07c33764e49e Author: Lorenzo Bianconi Date: Wed Jun 8 19:30:31 2022 +0200 mt76: connac: move mt76_connac2_mac_fill_rx_rate in connac module Rely on mt76_connac2_mac_fill_rx_rate routine in mt7921 driver. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac.h | 4 + .../net/wireless/mediatek/mt76/mt76_connac_mac.c | 105 ++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 106 +-------------------- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 82 ++-------------- 4 files changed, 117 insertions(+), 180 deletions(-) commit 0880d40871d1d0155c157a68add961d8dbcca2a3 Author: Lorenzo Bianconi Date: Wed Jun 8 19:30:30 2022 +0200 mt76: connac: move mt76_connac2_reverse_frag0_hdr_trans in mt76-connac module mt76_connac2_reverse_frag0_hdr_trans routine is shared between mt7921 and mt7915e drivers. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac.h | 2 + .../net/wireless/mediatek/mt76/mt76_connac2_mac.h | 86 +++++++++++++++++++ .../net/wireless/mediatek/mt76/mt76_connac_mac.c | 76 +++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 97 +++------------------- drivers/net/wireless/mediatek/mt76/mt7915/mac.h | 87 ------------------- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 95 +++------------------ drivers/net/wireless/mediatek/mt76/mt7921/mac.h | 84 ------------------- 7 files changed, 189 insertions(+), 338 deletions(-) commit f71662de66a63e2776f14e452f1feb601f14e655 Author: Lorenzo Bianconi Date: Wed Jun 8 19:30:29 2022 +0200 mt76: connac: move HE radiotap parsing in connac module HE radiotap parsing code is shared between connac2 devices. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac.h | 3 + .../net/wireless/mediatek/mt76/mt76_connac2_mac.h | 56 ++++++ .../net/wireless/mediatek/mt76/mt76_connac_mac.c | 187 +++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 180 +------------------- drivers/net/wireless/mediatek/mt76/mt7915/mac.h | 52 ------ drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 187 +-------------------- drivers/net/wireless/mediatek/mt76/mt7921/mac.h | 52 ------ 7 files changed, 251 insertions(+), 466 deletions(-) commit 9d958b60ebc2434f2b7eae83d77849e22d1059eb Author: Deren Wu Date: Wed Jun 8 20:53:26 2022 +0800 mt76: mt7921: fix command timeout in AP stop period Due to AP stop improperly, mt7921 driver would face random command timeout by chip fw problem. Migrate AP start/stop process to .start_ap/.stop_ap and congiure BSS network settings in both hooks. The new flow is shown below. * AP start .start_ap() configure BSS network resource set BSS to connected state .bss_info_changed() enable fw beacon offload * AP stop .bss_info_changed() disable fw beacon offload (skip this command) .stop_ap() set BSS to disconnected state (beacon offload disabled automatically) destroy BSS network resource Fixes: 116c69603b01 ("mt76: mt7921: Add AP mode support") Signed-off-by: Sean Wang Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt76_connac_mcu.c | 2 + drivers/net/wireless/mediatek/mt76/mt7921/main.c | 49 ++++++++++++++++++---- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 5 +-- drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 2 + 4 files changed, 45 insertions(+), 13 deletions(-) commit c149d3a9058616ff942a6e44b6e968e18a84dd5a Author: Deren Wu Date: Wed Jun 8 20:53:25 2022 +0800 mt76: mt7921: not support beacon offload disable command Beacon disable flow would be handled in bss stop handler automatically. Force return -EOPNOTSUPP in disable case. Fixes: 116c69603b01 ("mt76: mt7921: Add AP mode support") Reviewed-by: Sean Wang Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b932425b63143ccadbad2d74e499e3c5d6c0c0dc Author: Lorenzo Bianconi Date: Tue Jun 7 11:28:41 2022 +0200 mt76: connac: move mt76_connac2_mac_add_txs_skb in connac module Move mt76_connac2_mac_add_txs_skb in mt76-connac module since it is shared between connac2 devices (mt7921 and mt7915) Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac.h | 3 + .../net/wireless/mediatek/mt76/mt76_connac_mac.c | 122 ++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 126 +-------------------- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 122 +------------------- 4 files changed, 130 insertions(+), 243 deletions(-) commit 182071cdd594bc79f42899c85afa995c370ef82d Author: Lorenzo Bianconi Date: Tue Jun 7 11:28:40 2022 +0200 mt76: connac: move connac2_mac_write_txwi in mt76_connac module mac_write_txwi code is shared between connac2 devices (mt7915 and mt7921). Move it in connac module. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac.h | 6 + .../net/wireless/mediatek/mt76/mt76_connac_mac.c | 284 +++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 251 +----------------- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 1 - drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 212 +-------------- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 4 +- drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 5 - .../net/wireless/mediatek/mt76/mt7921/pci_mac.c | 4 +- 10 files changed, 299 insertions(+), 472 deletions(-) commit 90211957a640e6933b236e06728578d252f7374f Author: Lorenzo Bianconi Date: Tue Jun 7 11:28:39 2022 +0200 mt76: connac: move mac connac2 defs in mt76_connac2_mac.h This is a preliminary patch to share connac2 mac txwi code. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt76_connac2_mac.h | 167 +++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mac.h | 142 +----------------- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 14 -- drivers/net/wireless/mediatek/mt76/mt7921/mac.h | 123 +-------------- drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 10 -- 5 files changed, 171 insertions(+), 285 deletions(-) commit d502e30020b85857ead0f9d392d24dba8c0f44cb Author: Lorenzo Bianconi Date: Tue Jun 7 11:28:38 2022 +0200 mt76: mt7915: rely on mt76_dev in mt7915_mac_write_txwi signature This is a preliminary patch to share txwi configuration code. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 23 +++++++++++----------- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 2 +- 3 files changed, 14 insertions(+), 15 deletions(-) commit e00b3e407efeed81dc30a72e4041ff57bf7068d5 Author: Lorenzo Bianconi Date: Tue Jun 7 11:28:37 2022 +0200 mt76: mt7921: rely on mt76_dev in mt7921_mac_write_txwi signature This is a preliminary patch to share txwi configuration code. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 23 +++++++++++----------- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 2 +- .../net/wireless/mediatek/mt76/mt7921/pci_mac.c | 2 +- 4 files changed, 14 insertions(+), 15 deletions(-) commit d9fcfc1424aa175665d02c44abc1528aba06d362 Author: Deren Wu Date: Tue Jun 7 13:00:46 2022 +0800 mt76: enable the VHT extended NSS BW feature According IEEE Std 802.11-2020, its definition is: Indicates whether the STA is capable of interpreting the Extended NSS BW Support subfield of the VHT Capabilities Information field. Some APs, such as Xiaomi AX6000, would check this one for BW settings. mt76 driver can get max BW capability only if the this field is confgured properly. Reviewed-by: Ryder Lee Signed-off-by: Ming Yen Hsieh Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 2 ++ drivers/net/wireless/mediatek/mt76/mt7615/init.c | 1 + drivers/net/wireless/mediatek/mt76/mt7915/init.c | 1 + drivers/net/wireless/mediatek/mt76/mt7921/init.c | 1 + 4 files changed, 5 insertions(+) commit 049c94f8e914bcd098b33498cd7214674c410877 Author: Lorenzo Bianconi Date: Fri Jun 3 11:36:46 2022 +0200 mt76: mt7663: rely on mt76_connac2_fw_trailer Remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit 28fec923d2400b266a1495e6d8e29cb8cc643145 Author: Lorenzo Bianconi Date: Fri Jun 3 11:36:45 2022 +0200 mt76: connac: move mt76_connac2_load_patch in connac module Move mt76_connac2_load_patch utility routine in mt76_connac module since it is shared between mt7921 and mt7915. This is a preliminary patch to support mt7902e driver. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt76_connac_mcu.c | 113 ++++++++++++++++++ .../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 8 ++ drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 86 +------------- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 126 +-------------------- 4 files changed, 123 insertions(+), 210 deletions(-) commit b9ec27102ac0c67f003c007e961ce811572c0cfa Author: Lorenzo Bianconi Date: Fri Jun 3 11:36:44 2022 +0200 mt76: connac: move mt76_connac2_load_ram in connac module Move mt76_connac2_load_ram utility routine in mt76_connac module since it is shared between mt7921 and mt7915. This is a preliminary patch to support mt7902e driver. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt76_connac_mcu.c | 111 ++++++++++++++++++++ .../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 2 + drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 112 +-------------------- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 89 +--------------- 4 files changed, 116 insertions(+), 198 deletions(-) commit c132fc7d83bb9f459ef10d7fe082bc301f63cd3b Author: Lorenzo Bianconi Date: Fri Jun 3 11:36:43 2022 +0200 mt76: mt7921: move fw toggle in mt7921_load_firmware Move drv_own/fw_own toggle in mt7921_load_firmware. This change allow to reuse connac code to load patch for mt7921 driver. Signed-off-by: Lorenzo Bianconi Tested-by: Deren Wu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 3d8c636c3e9ef7969c4dc971a82139ba6407e707 Author: Lorenzo Bianconi Date: Fri Jun 3 11:36:42 2022 +0200 mt76: connac: move shared fw structures in connac module Move mt76_connac2 fw structures in connac module since they are shared between mt7921 and mt7915 drivers. This is a preliminary patch to add mt7902e support. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 56 ++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 85 +++------------------- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 81 +++------------------ 3 files changed, 79 insertions(+), 143 deletions(-) commit 56054087bb17f98d62419acc3d0e5afc9544a4fb Author: Lorenzo Bianconi Date: Fri Jun 3 10:21:37 2022 +0200 mt76: mt7921: get rid of mt7921_mcu_exit Run skb_queue_purge when needed. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 6 ------ drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 1 - drivers/net/wireless/mediatek/mt76/mt7921/pci.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/sdio.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/usb.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/usb_mac.c | 4 ++-- 6 files changed, 5 insertions(+), 12 deletions(-) commit 9ed107e0e98b7e5ee6cb0b738e83e003e543f653 Author: Lorenzo Bianconi Date: Fri Jun 3 09:35:00 2022 +0200 mt76: mt7921: add missing bh-disable around rx napi schedule napi_schedule() can call __raise_softirq_irqoff(), which can perform softirq handling, so it must not be called in a pure process context with BH enabled. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 2 ++ 1 file changed, 2 insertions(+) commit e55c27ed9ccf37118b80178ec32dfed583171363 Author: Felix Fietkau Date: Thu Jun 2 21:44:21 2022 +0200 mt76: mt7615: add missing bh-disable around rx napi schedule napi_schedule() can call __raise_softirq_irqoff(), which can perform softirq handling, so it must not be called in a pure process context with BH enabled. Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 2 ++ 1 file changed, 2 insertions(+) commit c0182aa985708d2882eec6f902c61da6b42ae4f0 Author: Felix Fietkau Date: Thu Jun 2 21:43:04 2022 +0200 mt76: mt7915: add missing bh-disable around tx napi enable/schedule napi_schedule() can call __raise_softirq_irqoff(), which can perform softirq handling, so it must not be called in a pure process context with BH enabled. Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 2 ++ 1 file changed, 2 insertions(+) commit 12fba11c7ebd54389aa990b0bb3c4eb48ec88aba Author: Peter Chiu Date: Thu May 12 12:38:59 2022 +0800 dt-bindings: net: wireless: mt76: add clock description for MT7986. Add clocks and clock-names for MT7986. Reviewed-by: Ryder Lee Signed-off-by: Peter Chiu Acked-by: Rob Herring Signed-off-by: Felix Fietkau .../devicetree/bindings/net/wireless/mediatek,mt76.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit a55a0c701c129f8e448f0ec1eb811dba728ace64 Author: YN Chen Date: Sat May 28 09:28:54 2022 +0800 mt76: mt7921s: fix firmware download random fail To avoid racing problems in chip, mt7921s should reacquire drv-own after firmware semaphore is released. Fixes: 78b217580c509 ("mt76: mt7921s: fix bus hang with wrong privilege") Signed-off-by: YN Chen Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 45b6f9cb8ffcb65d9a5c5164046016afedac62fc Author: YN Chen Date: Sat May 28 09:28:53 2022 +0800 mt76: mt7921: add PATCH_FINISH_REQ cmd response handling add new case to fetch the return value of PATCH_FINISH_REQ Signed-off-by: YN Chen Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ef55564e2b173d459a4aaae962c84f05aeaf8e36 Author: Ryder Lee Date: Thu May 26 17:08:55 2022 +0800 mt76: add DBDC rxq handlings into mac_reset_work Enable/disable rx napi for DBDC. Signed-off-by: Bo Jiao Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/pci_mac.c | 14 +++++++------- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 18 +++++++----------- 2 files changed, 14 insertions(+), 18 deletions(-) commit 3685727c4dcdfefa682828000b16ea468d045056 Author: Ryder Lee Date: Thu May 26 17:08:54 2022 +0800 mt76: mt7915: add more ethtool stats Add channel time and MAC ready stats. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 52 ++++++++++++++++++---- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 14 ++++++ drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 7 +++ drivers/net/wireless/mediatek/mt76/mt7915/regs.h | 16 +++---- 4 files changed, 73 insertions(+), 16 deletions(-) commit 63db9d4012af63b4cc8175ceb8eae8bcf6a8e8f3 Author: Deren Wu Date: Fri May 20 17:03:39 2022 +0800 mt76: mt7921: introduce ACPI SAR config in tx power Add new function mt7921_set_tx_sar_pwr() to update SAR power from .set_sar_specs and ACPI setting. Both settings would be merged into mt76_freq_range_power for final tx power value. Reviewed-by: Sean Wang Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/init.c | 3 +-- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 31 +++++++++++++++------- drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 2 ++ 3 files changed, 25 insertions(+), 11 deletions(-) commit f965333e491e36adb0fa91e389fba8685b704fb6 Author: Deren Wu Date: Fri May 20 17:03:38 2022 +0800 mt76: mt7921: introduce ACPI SAR support In ACPI SAR enabled device, mt7921 should read power limit in ACPI config. The limit value would be applied to regular tx power settings in mt76. Two major functionalities added: 1. Get SAR power table through ACPI. 2. Read power in Dynamic/Geo SAR table for tx power limit. Table note MTDS: Dynamic SAR table MTGS: Geo SAR table MTCL: Country List table (for 6GHz support) Reviewed-by: Sean Wang Co-developed-by: Quan Zhou Signed-off-by: Quan Zhou Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/Makefile | 1 + .../net/wireless/mediatek/mt76/mt7921/acpi_sar.c | 279 +++++++++++++++++++++ .../net/wireless/mediatek/mt76/mt7921/acpi_sar.h | 93 +++++++ drivers/net/wireless/mediatek/mt76/mt7921/init.c | 2 + drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 20 ++ 5 files changed, 395 insertions(+) commit 162d5c14ba482934334428b3be972571f0c007b0 Author: Deren Wu Date: Fri May 20 17:03:37 2022 +0800 mt76: add 6 GHz band support in mt76_sar_freq_ranges Add new frequencies support in mt76_sar_freq_ranges[] * 5945 - 6165 * 6165 - 6405 * 6405 - 6525 * 6525 - 6705 * 6705 - 6865 * 6865 - 7125 Reviewed-by: Sean Wang Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f572dc969a59a80baa22bf2f7c9af0064402652f Author: Dan Carpenter Date: Thu May 19 16:57:22 2022 +0300 mt76: mt7915: fix endian bug in mt7915_rf_regval_set() This code is supposed to set a u32 value, but casting will not work on big endian systems. Fixes: 0a17329ae9c1 ("mt76: mt7915: add debugfs knob for RF registers read/write") Signed-off-by: Dan Carpenter Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cffd93411575afd987788e2ec3cb8eaff70f0215 Author: Lorenzo Bianconi Date: Tue May 17 18:37:07 2022 +0200 mt76: mt76x02u: fix possible memory leak in __mt76x02u_mcu_send_msg Free the skb if mt76u_bulk_msg fails in __mt76x02u_mcu_send_msg routine. Fixes: 4c89ff2c74e39 ("mt76: split __mt76u_mcu_send_msg and mt76u_mcu_send_msg routines") Co-developed-by: Gergo Koteles Signed-off-by: Gergo Koteles Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63907290faa916ffab1c8455141c79ca8e3a79bb Author: Lorenzo Bianconi Date: Tue May 17 18:05:59 2022 +0200 mt76: mt7915: fix endianness in mt7915_rf_regval_get Fix the following sparse warning in mt7915_rf_regval_get routine: drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:979:16: warning: cast to restricted __le32 Fixes: 0a17329ae9c1f ("mt76: mt7915: add debugfs knob for RF registers read/write") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58b6259d820d63c2adf1c7541b54cce5a2ae6073 Author: Johannes Berg Date: Mon Jul 11 13:14:24 2022 +0200 wifi: mac80211_hwsim: add back erroneously removed cast The robots report that we're now casting to a differently sized integer, which is correct, and the previous patch had erroneously removed it. Reported-by: kernel test robot Fixes: 4ee186fa7e40 ("wifi: mac80211_hwsim: fix race condition in pending packet") Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdb0cc9379f1b4fa5ea3e0492bacf8008f3f4e5a Author: Andy Shevchenko Date: Sat Jul 9 03:07:09 2022 +0300 spi: remove duplicate parameters check in acpi_spi_add_resource() The acpi_spi_add_resource() is never called with ctrl == NULL and index == -1. The only caller already performs the check. Hence remove the duplication from the acpi_spi_add_resource(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220709000709.35622-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi.c | 3 --- 1 file changed, 3 deletions(-) commit b6747f4fba399a73a87fac80ac1d0c952a44b222 Author: Andy Shevchenko Date: Sat Jul 9 03:07:08 2022 +0300 spi: propagate error code to the caller of acpi_spi_device_alloc() Since acpi_spi_device_alloc() has been designed to return an error pointer we may now properly propagate error codes to the caller of it. It helps debugging a lot. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220709000709.35622-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c22ec4ac27bcc5a54dd406da168f403327a5b55 Author: Andy Shevchenko Date: Sun Jul 10 00:29:56 2022 +0300 spi: Return deferred probe error when controller isn't yet available If the controller is not available, it might be in the future and we would like to re-probe the peripheral again. For that purpose return deferred probe. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215993 Fixes: 87e59b36e5e2 ("spi: Support selection of the index of the ACPI Spi Resource before alloc") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220709212956.25530-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 044750573903595765fa52ba9e1aadc397d591df Author: Robert Marko Date: Mon Jul 4 23:23:56 2022 +0200 regulator: qcom,spmi-regulator: add PMP8074 PMIC Document the PMP8074 PMIC compatible. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220704212402.1715182-6-robimarko@gmail.com Signed-off-by: Mark Brown .../bindings/regulator/qcom,spmi-regulator.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 0b3bbd7646b03920e81efa376dee08f5b288c05e Author: Robert Marko Date: Mon Jul 4 23:23:53 2022 +0200 regulator: qcom,spmi-regulator: Convert to dtschema Convert the bindings of Qualcomm SPMI regulators to DT schema. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220704212402.1715182-3-robimarko@gmail.com Signed-off-by: Mark Brown .../bindings/regulator/qcom,spmi-regulator.txt | 347 --------------------- .../bindings/regulator/qcom,spmi-regulator.yaml | 307 ++++++++++++++++++ 2 files changed, 307 insertions(+), 347 deletions(-) commit 34ceb6a6ef87cda7629fd4ebe0074d9b5c7613d9 Author: Robert Marko Date: Mon Jul 4 23:23:57 2022 +0200 regulator: qcom_spmi: add support for PMP8074 regulators PMP8074 is a companion PMIC for the Qualcomm IPQ8074 WiSoC-s. It features 5 HF-SMPS and 13 LDO regulators. HF-SMPS regulators are Buck HFS430 regulators. L1, L2 and L3 are HT_N1200_ST subtype LDO regulators. L4 is HT_N300_ST subtype LDO regulator. L5 and L6 are HT_P600 subtype LDO regulators. L7, L11, L12 and L13 are HT_P150 subtype LDO regulators. L10 is HT_P50 subtype LDO regulator. This commit adds support for all of the buck regulators and LDO-s except for L10 as I dont have documentation on its output voltage range. S3 is the CPU cluster voltage supply, S4 supplies the UBI32 NPU cores and L11 is the SDIO/eMMC I/O voltage regulator required for high speeds. Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20220704212402.1715182-7-robimarko@gmail.com Signed-off-by: Mark Brown drivers/regulator/qcom_spmi-regulator.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 3d04ae8e3e916bc298b674613565d5b26cf1054a Author: Robert Marko Date: Mon Jul 4 23:23:55 2022 +0200 regulator: qcom_spmi: add support for HT_P600 HT_P600 is a LDO PMOS regulator based on LV P600 using HFS430 layout found in PMP8074 and PMS405 PMIC-s. Both PMP8074 and PMS405 define the programmable range as 1.704 to 1.896V but the actual MAX output voltage depends on the exact LDO in each of the PMIC-s. Their usual voltage that they are used is 1.8V. It has a max current of 600mA, voltage step of 8mV. Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20220704212402.1715182-5-robimarko@gmail.com Signed-off-by: Mark Brown drivers/regulator/qcom_spmi-regulator.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 00f6ebbd0177a4cb15b353bbd4eaee6372fdbbc2 Author: Robert Marko Date: Mon Jul 4 23:23:54 2022 +0200 regulator: qcom_spmi: add support for HT_P150 HT_P150 is a LDO PMOS regulator based on LV P150 using HFS430 layout found in PMP8074 and PMS405 PMIC-s. Both PMP8074 and PMS405 define the programmable range as 1.616V to 3.304V but the actual MAX output voltage depends on the exact LDO in each of the PMIC-s. It has a max current of 150mA, voltage step of 8mV. Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20220704212402.1715182-4-robimarko@gmail.com Signed-off-by: Mark Brown drivers/regulator/qcom_spmi-regulator.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3fec90048d3757fa4cedb598ff93d1cae23860e4 Author: Jiapeng Chong Date: Mon Jul 11 11:40:11 2022 +0800 regulator: max597x: Remove unused including The patch makes sense but these are not compile warnings. They come from scripts/checkversion.pl, which can be called by 'make versioncheck', so I suppose that something in your build system is running 'make versioncheck'. Eliminate the follow versioncheck warning: ./drivers/regulator/max597x-regulator.c: 21 linux/version.h not needed. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20220711034011.46096-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown drivers/regulator/max597x-regulator.c | 1 - 1 file changed, 1 deletion(-) commit eaa27e7fe43f16fe587c3e93fd5c25ce86be3c43 Author: Shengjiu Wang Date: Mon Jul 11 10:39:50 2022 +0800 ASoC: fsl_utils: Drop usage of __clk_get_name() Avoid build errors when CONFIG_COMMON_CLK is not set/enabled. ERROR: modpost: "__clk_get_name" [sound/soc/fsl/snd-soc-fsl-utils.ko] undefined! Fixes: 7bad8125549c ("ASoC: fsl_utils: Add function to handle PLL clock source") Reported-by: kernel test robot Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1657507190-14546-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19bb587f3ffcb9c166bac2debdc3b08fb362c0b7 Author: Zhongjun Tan Date: Fri Jul 8 10:46:51 2022 +0800 ASoC: mediatek: mt8186: Remove condition with no effect Remove condition with no effect Signed-off-by: Zhongjun Tan Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220708024651.42999-1-hbut_tan@163.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-dai-adda.c | 2 -- 1 file changed, 2 deletions(-) commit 99bad468846f7a255dcfc95454401c83ae02e89b Author: YC Hung Date: Fri Jul 8 15:39:04 2022 -0500 ASoC: SOF: mediatek: fix mt8195 StatvectorSel wrong setting Fix StatVectorSel wrong setting. Fixes: b7f6503830 ("ASoC: SOF: mediatek: Add fw loader and mt8195 dsp ops to load firmware") Signed-off-by: Pierre-Louis Bossart Signed-off-by: YC Hung Reviewed-by: Li-Yu Yu Reviewed-by: Ranjani Sridharan Reviewed-by: KuanHsun Cheng Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220708203904.29214-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/mediatek/mt8195/mt8195-loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13a45b9484e58317c95046e5478c0b1d67df8816 Author: YC Hung Date: Fri Jul 8 15:39:03 2022 -0500 ASoC: SOF: mediatek: Revise mt8195 boot flow 1. Revise hifixdsp shutdown flow to pull runstall high then reset high. 2. Add 1 us delay between D/BRESET high and low for 10 DSP cycles(26M) based on IP vendor's suggestion. Signed-off-by: YC Hung Signed-off-by: Pierre-Louis Bossart Reviewed-by: Li-Yu Yu Reviewed-by: Ranjani Sridharan Reviewed-by: KuanHsun Cheng Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220708203904.29214-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/mediatek/mt8195/mt8195-loader.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 4682f21368352ce087e3a2f73e1e6d776c38f685 Merge: f5fd903b311f ee794221a6f6 Author: Greg Kroah-Hartman Date: Mon Jul 11 12:30:24 2022 +0200 Merge tag 'fpga-late-for-5.20-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-next Xu writes: Here is the second set of FPGA changes for 5.20-rc1 FPGA Manager core: - Ivan's change to support image offset and data size setting for reprograming. A parse_header() callback is introduced for drivers to specify these info. - Colin's immediate spelling fix for Ivan's patch. Microchip: - Ivan's change to add Microchip MPF FPGA manager driver. And MAINTAINERS entry added for the driver. All patches have been reviewed on the mailing list, and have been in the last linux-next releases (as part of our for-next branch). Signed-off-by: Xu Yilun * tag 'fpga-late-for-5.20-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga: fpga: fpga-mgr: Fix spelling mistake "bitsream" -> "bitstream" MAINTAINERS: add Microchip PolarFire FPGA drivers entry dt-bindings: fpga: add binding doc for microchip-spi fpga mgr fpga: microchip-spi: add Microchip MPF FPGA manager docs: fpga: mgr: document parse_header() callback fpga: fpga-mgr: support bitstream offset in image buffer commit f5fd903b311fc4fa5511259fcf414d866a016c7c Merge: 14facbc1871a 2ebb36ea41a7 Author: Greg Kroah-Hartman Date: Mon Jul 11 12:28:46 2022 +0200 Merge tag 'mhi-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next Manivannan writes: MHI Host -------- Support for new modems: - Quectel EM120 FCCL based on SDX24. This product MHI configuration is same as EM120R-GL modem. - Foxconn Cinterion MV31-W. This product is same as the existing MV31-W modem but sold as a separate product as it uses a different firmware baseline. - Foxconn T99W175 based on SDX55. Core changes: - Moved the IRQ allocation to MHI controller registration phase. Since the MHI endpoint may be powered up/down several times during runtime, it makes sense to move the IRQ allocation to registration phase and just enable/disable IRQs during endpoint power up/down. MHI endpoint ------------ Core changes: - Added error check for dev_set_name() * tag 'mhi-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: ep: Check dev_set_name() return value bus: mhi: host: pci_generic: Add another Foxconn T99W175 bus: mhi: host: Move IRQ allocation to controller registration phase bus: mhi: host: pci_generic: Add Cinterion MV31-W with new baseline bus: mhi: host: pci_generic: Add support for Quectel EM120 FCCL modem commit 1b6abe95b522b313569469498c8c648a5ee535ba Author: Steffen Eiden Date: Wed May 18 13:59:08 2022 +0000 s390: Add attestation query information We have information about the supported attestation header version and plaintext attestation flag bits. Let's expose it via the sysfs files. Signed-off-by: Steffen Eiden Reviewed-by: Claudio Imbrenda Reviewed-by: Janosch Frank Link: https://lore.kernel.org/lkml/20220601100245.3189993-1-seiden@linux.ibm.com/ Signed-off-by: Janosch Frank arch/s390/boot/uv.c | 2 ++ arch/s390/include/asm/uv.h | 7 ++++++- arch/s390/kernel/uv.c | 20 ++++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) commit b9df116cb7656c7e7f869cf9d05b54b3fb3f944b Author: Jiang Jian Date: Wed Jun 22 22:07:20 2022 +0800 KVM: s390: drop unexpected word 'and' in the comments there is an unexpected word 'and' in the comments that need to be dropped file: arch/s390/kvm/interrupt.c line: 705 * Subsystem damage are the only two and and are indicated by changed to: * Subsystem damage are the only two and are indicated by Signed-off-by: Jiang Jian Link: https://lore.kernel.org/lkml/20220622140720.7617-1-jiangjian@cdjrlc.com/ Signed-off-by: Janosch Frank arch/s390/kvm/interrupt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d41b5e0176a610152072d2ce7a83879fb07ea2fa Merge: 4b88b1a518b3 4ac34b94a534 Author: Christian Borntraeger Date: Mon Jul 11 11:28:57 2022 +0200 Merge tag 'kvm-s390-pci-5.20' into kernelorgnext KVM: s390/pci: enable zPCI for interpretive execution Add the necessary code in s390 base, pci and KVM to enable interpretion of PCI pasthru. commit d50f5a109cf4ed50c5b575c1bb5fc3bd17b23308 Author: Dan Carpenter Date: Fri Jul 8 12:41:04 2022 +0300 drm/i915/selftests: fix a couple IS_ERR() vs NULL tests The shmem_pin_map() function doesn't return error pointers, it returns NULL. Fixes: be1cb55a07bf ("drm/i915/gt: Keep a no-frills swappable copy of the default context state") Signed-off-by: Dan Carpenter Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220708094104.GL2316@kadam drivers/gpu/drm/i915/gt/selftest_lrc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ef6e5d61eb7a0a30f776a829274573094185d03d Author: Michael Walle Date: Wed Jul 6 17:15:52 2022 +0200 genirq: Allow irq_set_chip_handler_name_locked() to take a const irq_chip Similar to commit 393e1280f765 ("genirq: Allow irq_chip registration functions to take a const irq_chip"), allow the irq_set_chip_handler_name_locked() function to take a const irq_chip argument. Signed-off-by: Michael Walle Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220706151553.1580790-1-michael@walle.cc include/linux/irqdesc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c1e72763aee97be954ef26ca040d150b361b286c Author: Andre Przywara Date: Fri Jul 8 11:52:32 2022 +0100 dt-bindings: pinctrl: sunxi: allow vcc-pi-supply The Allwinner H616 SoC contains a VCC_PI pin, which supplies the voltage for GPIO port I. Extend the range of supply port names to include vcc-pi-supply to cover that. Signed-off-by: Andre Przywara Acked-by: Rob Herring Acked-by: Samuel Holland Link: https://lore.kernel.org/r/20220708105235.3983266-5-andre.przywara@arm.com Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee84131b43f1536f495d7fdf42c5148ebb859654 Author: Andre Przywara Date: Fri Jul 8 11:52:30 2022 +0100 dt-bindings: pinctrl: sunxi: Make interrupts optional The R_PIO pinctrl device on the Allwinner H616 SoC does not have an interrupt (it features only two pins). However the binding requires at least naming one upstream interrupt, plus the #interrupt-cells and interrupt-controller properties. Drop the unconditional requirement for the interrupt properties, and make them dependent on being not this particular pinctrl device. Signed-off-by: Andre Przywara Reviewed-by: Rob Herring Acked-by: Samuel Holland Link: https://lore.kernel.org/r/20220708105235.3983266-3-andre.przywara@arm.com Signed-off-by: Linus Walleij .../bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 9044576357b16d9ebbe10cc567277507d1165a54 Author: Florian Fainelli Date: Thu Jul 7 13:37:42 2022 -0700 MIPS: Make phys_to_virt utilize __va() The implementation is exactly the same, so avoid open-coding it in two different locations. Signed-off-by: Florian Fainelli Reviewed-by: Serge Semin Signed-off-by: Thomas Bogendoerfer arch/mips/include/asm/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8baa65126e19af5ee9f3c07e7bb53da41c39e4b1 Author: Florian Fainelli Date: Thu Jul 7 13:27:58 2022 -0700 MIPS: vdso: Utilize __pa() for gic_pfn The GIC user offset is mapped into every process' virtual address and is therefore part of the hot-path of arch_setup_additional_pages(). Utilize __pa() such that we are more optimal even when CONFIG_DEBUG_VIRTUAL is enabled, and while at it utilize PFN_DOWN() instead of open-coding the right shift by PAGE_SHIFT. Reported-by: Greg Ungerer Suggested-by: Serge Semin Fixes: dfad83cb7193 ("MIPS: Add support for CONFIG_DEBUG_VIRTUAL") Signed-off-by: Florian Fainelli Acked-by: Greg Ungerer Tested-by: Greg Ungerer Signed-off-by: Thomas Bogendoerfer arch/mips/kernel/vdso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5eb8b536f91f52d4f3688bcae86bf85ba693a00 Author: Christophe JAILLET Date: Tue Jul 5 22:56:51 2022 +0200 MIPS: mm: Use the bitmap API to allocate bitmaps Use bitmap_zalloc() instead of hand-writing them. It is less verbose and it improves the semantic. While at it, turn a bitmap_clear() into an equivalent bitmap_zero(). It is also less verbose. Signed-off-by: Christophe JAILLET Signed-off-by: Thomas Bogendoerfer arch/mips/mm/context.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8512670d3547d19a7e013e0b1e2e1916d8ee4000 Author: Christophe JAILLET Date: Mon Jul 4 20:56:52 2022 +0200 MIPS: math-emu: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Signed-off-by: Thomas Bogendoerfer arch/mips/math-emu/dsemul.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 4528a0cf793d6f174b58920459fe2854378146a9 Author: Stephan Gerhold Date: Tue Jun 28 16:55:02 2022 +0200 pinctrl: qcom: Add pinctrl driver for MSM8909 Make it possible to control pins using the TLMM block in the MSM8909 SoC by adding the necessary definitions for GPIOs, groups and functions. The driver is originally taken from the msm-4.9 release [1] from Qualcomm, but cleaned up significantly with several fixes and clarifications. [1]: https://git.codelinaro.org/clo/la/kernel/msm-4.9/-/blob/LF.UM.8.7-22500-8x09.0/drivers/pinctrl/qcom/pinctrl-msm8909.c Signed-off-by: Stephan Gerhold Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220628145502.4158234-3-stephan.gerhold@kernkonzept.com Signed-off-by: Linus Walleij drivers/pinctrl/qcom/Kconfig | 8 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-msm8909.c | 956 +++++++++++++++++++++++++++++++++ 3 files changed, 965 insertions(+) commit c249ec7ba1b1f225c2c59974e71fff059f265643 Author: Stephan Gerhold Date: Tue Jun 28 16:55:01 2022 +0200 dt-bindings: pinctrl: Add DT schema for qcom,msm8909-tlmm Document the "qcom,msm8909-tlmm" compatible for the TLMM/pin control block in the MSM8909 SoC, together with the allowed GPIOs and functions. Signed-off-by: Stephan Gerhold Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220628145502.4158234-2-stephan.gerhold@kernkonzept.com Signed-off-by: Linus Walleij .../bindings/pinctrl/qcom,msm8909-tlmm.yaml | 152 +++++++++++++++++++++ 1 file changed, 152 insertions(+) commit e2961cd685fe548f0ffd6c7bd3ae6a491301b1e4 Author: Jianlong Huang Date: Mon Jun 27 10:53:33 2022 +0200 pinctrl: starfive: Serialize adding groups and functions The pinctrl dt_node_to_map method may be called in parallel which leads us to call pinconf_generic_add_group and pinconf_generic_add_function in parallel. This is not supported though and leads to errors, so add a mutex to serialize these calls. Signed-off-by: Jianlong Huang Signed-off-by: Emil Renner Berthing Link: https://lore.kernel.org/r/20220627085333.1774396-1-emil.renner.berthing@canonical.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-starfive.c | 5 +++++ 1 file changed, 5 insertions(+) commit 4d45bc82df667ad9e9cb8361830e54fc1264e993 Author: Nick Desaulniers Date: Fri Jul 8 16:15:20 2022 -0700 coresight: etm4x: avoid build failure with unrolled loops When the following configs are enabled: * CORESIGHT * CORESIGHT_SOURCE_ETM4X * UBSAN * UBSAN_TRAP Clang fails assemble the kernel with the error: :1:7: error: expected constant expression in '.inst' directive .inst (0xd5200000|((((2) << 19) | ((1) << 16) | (((((((((((0x160 + (i * 4))))) >> 2))) >> 7) & 0x7)) << 12) | ((((((((((0x160 + (i * 4))))) >> 2))) & 0xf)) << 8) | (((((((((((0x160 + (i * 4))))) >> 2))) >> 4) & 0x7)) << 5)))|(.L__reg_num_x8)) ^ drivers/hwtracing/coresight/coresight-etm4x-core.c:702:4: note: while in macro instantiation etm4x_relaxed_read32(csa, TRCCNTVRn(i)); ^ drivers/hwtracing/coresight/coresight-etm4x.h:403:4: note: expanded from macro 'etm4x_relaxed_read32' read_etm4x_sysreg_offset((offset), false))) ^ drivers/hwtracing/coresight/coresight-etm4x.h:383:12: note: expanded from macro 'read_etm4x_sysreg_offset' __val = read_etm4x_sysreg_const_offset((offset)); \ ^ drivers/hwtracing/coresight/coresight-etm4x.h:149:2: note: expanded from macro 'read_etm4x_sysreg_const_offset' READ_ETM4x_REG(ETM4x_OFFSET_TO_REG(offset)) ^ drivers/hwtracing/coresight/coresight-etm4x.h:144:2: note: expanded from macro 'READ_ETM4x_REG' read_sysreg_s(ETM4x_REG_NUM_TO_SYSREG((reg))) ^ arch/arm64/include/asm/sysreg.h:1108:15: note: expanded from macro 'read_sysreg_s' asm volatile(__mrs_s("%0", r) : "=r" (__val)); \ ^ arch/arm64/include/asm/sysreg.h:1074:2: note: expanded from macro '__mrs_s' " mrs_s " v ", " __stringify(r) "\n" \ ^ Consider the definitions of TRCSSCSRn and TRCCNTVRn: drivers/hwtracing/coresight/coresight-etm4x.h:56 #define TRCCNTVRn(n) (0x160 + (n * 4)) drivers/hwtracing/coresight/coresight-etm4x.h:81 #define TRCSSCSRn(n) (0x2A0 + (n * 4)) Where the macro parameter is expanded to i; a loop induction variable from etm4_disable_hw. When any compiler can determine that loops may be unrolled, then the __builtin_constant_p check in read_etm4x_sysreg_offset() defined in drivers/hwtracing/coresight/coresight-etm4x.h may evaluate to true. This can lead to the expression `(0x160 + (i * 4))` being passed to read_etm4x_sysreg_const_offset. Via the trace above, this is passed through READ_ETM4x_REG, read_sysreg_s, and finally to __mrs_s where it is string-ified and used directly in inline asm. Regardless of which compiler or compiler options determine whether a loop can or can't be unrolled, which determines whether __builtin_constant_p evaluates to true when passed an expression using a loop induction variable, it is NEVER safe to allow the preprocessor to construct inline asm like: asm volatile (".inst (0x160 + (i * 4))" : "=r"(__val)); ^ expected constant expression Instead of read_etm4x_sysreg_offset() using __builtin_constant_p(), use __is_constexpr from include/linux/const.h instead to ensure only expressions that are valid integer constant expressions get passed through to read_sysreg_s(). This is not a bug in clang; it's a potentially unsafe use of the macro arguments in read_etm4x_sysreg_offset dependent on __builtin_constant_p. Link: https://github.com/ClangBuiltLinux/linux/issues/1310 Reported-by: Arnd Bergmann Reported-by: Tao Zhang Signed-off-by: Nick Desaulniers Acked-by: Arnd Bergmann Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20220708231520.3958391-1-ndesaulniers@google.com drivers/hwtracing/coresight/coresight-etm4x.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4ee186fa7e40ae06ebbfbad77e249e3746e14114 Author: Jeongik Cha Date: Mon Jul 4 17:43:54 2022 +0900 wifi: mac80211_hwsim: fix race condition in pending packet A pending packet uses a cookie as an unique key, but it can be duplicated because it didn't use atomic operators. And also, a pending packet can be null in hwsim_tx_info_frame_received_nl due to race condition with mac80211_hwsim_stop. For this, * Use an atomic type and operator for a cookie * Add a lock around the loop for pending packets Signed-off-by: Jeongik Cha Link: https://lore.kernel.org/r/20220704084354.3556326-1-jeongik@google.com Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 37babce9127f3145366a8f36334f24afa9a5d196 Author: Christophe JAILLET Date: Mon Jul 4 21:16:09 2022 +0200 wifi: mac80211: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/dfb438a6a199ee4c95081fa01bd758fd30e50931.1656962156.git.christophe.jaillet@wanadoo.fr Signed-off-by: Johannes Berg net/mac80211/mesh_plink.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 68608f9991bdb69472b2217758018896185dd2e2 Author: MeiChia Chiu Date: Fri Jul 8 17:58:23 2022 +0800 wifi: mac80211: fix center freq calculation in ieee80211_chandef_downgrade When mac80211 downgrades working bandwidth, the center_freq and center_freq1 need to be recalculated. There is a typo in the case of downgrading bandwidth from 320MHz to 160MHz which would cause a wrong frequency value. Reviewed-by: Money Wang Signed-off-by: MeiChia Chiu Link: https://lore.kernel.org/r/20220708095823.12959-1-MeiChia.Chiu@mediatek.com Signed-off-by: Johannes Berg net/mac80211/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c512307de4097aaaab3f4741c7a98fe88afa469 Author: Veerendranath Jakkam Date: Fri Jul 8 17:56:07 2022 +0530 wifi: nl80211: fix sending link ID info of associated BSS commit dd374f84baec ("wifi: nl80211: expose link ID for associated BSSes") used a top-level attribute to send link ID of the associated BSS in the nested attribute NL80211_ATTR_BSS. But since NL80211_ATTR_BSS is a nested attribute of the attributes defined in enum nl80211_bss, define a new attribute in enum nl80211_bss and use it for sending the link ID of the BSS. Fixes: dd374f84baec ("wifi: nl80211: expose link ID for associated BSSes") Signed-off-by: Veerendranath Jakkam Reviewed-by: Jeff Johnson Link: https://lore.kernel.org/r/20220708122607.1836958-1-quic_vjakkam@quicinc.com Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 2 ++ net/wireless/nl80211.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit c528d7a2750a27174a30dffe42600f16c15bdb87 Author: Veerendranath Jakkam Date: Fri Jul 8 22:25:44 2022 +0530 wifi: cfg80211: fix a comment in cfg80211_mlme_mgmt_tx() A comment in cfg80211_mlme_mgmt_tx() is describing this API used only for transmitting action frames. Fix the comment since cfg80211_mlme_mgmt_tx() can be used to transmit any management frame. Signed-off-by: Veerendranath Jakkam Link: https://lore.kernel.org/r/20220708165545.2072999-1-quic_vjakkam@quicinc.com Signed-off-by: Johannes Berg net/wireless/mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff3821bc355275ada757dd2be8654dd0aae9c2f9 Author: Veerendranath Jakkam Date: Mon Jul 11 11:04:43 2022 +0530 wifi: nl80211: Fix reading NL80211_ATTR_MLO_LINK_ID in nl80211_pre_doit nl80211_pre_doit() using nla_get_u16() to read u8 attribute NL80211_ATTR_MLO_LINK_ID. Fix this by using nla_get_u8() to read NL80211_ATTR_MLO_LINK_ID attribute. Signed-off-by: Veerendranath Jakkam Link: https://lore.kernel.org/r/1657517683-5724-1-git-send-email-quic_vjakkam@quicinc.com Signed-off-by: Johannes Berg net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7dc487d27f7fef32a79eacb4159636b0ea425a5b Author: Marc Zyngier Date: Mon Jul 11 08:55:21 2022 +0100 gpio: thunderx: Don't directly include asm-generic/msi.h On architectures that require it, asm-generic/msi.h is already dragged in by the higher level include files, and is commonly refered to as 'asm/msi.h'. It is also architecture specific, and breaks compilation in a pretty bad way now that linux/gpio/driver.h includes asm/msi.h (which drags a conflicting but nonetheless correct version of msi_alloc_info_t on x86). Reported-by: Stephen Rothwell Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220711154252.4b88a601@canb.auug.org.au Link: https://lore.kernel.org/r/20220711081257.132901-1-maz@kernel.org Fixes: 91a29af413de ("gpio: Remove dynamic allocation from populate_parent_alloc_arg()") Cc: Bartosz Golaszewski Cc: Linus Walleij drivers/gpio/gpio-thunderx.c | 2 -- 1 file changed, 2 deletions(-) commit d4090520cde1f96ad66956ce1b24aa91e5210fa5 Author: Martin Kaiser Date: Sat Jul 9 19:10:00 2022 +0200 staging: r8188eu: the bcnhead parameter is always 0 The only caller of efuse_read_phymap_from_txpktbuf sets bcnhead to 0. Remove this function parameter and simplify the function body. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220709171000.180481-15-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit c337bf6256316be5d74a27f6449363e10fda49a3 Author: Martin Kaiser Date: Sat Jul 9 19:09:59 2022 +0200 staging: r8188eu: efuse_utilized is never read The efuse_utilized variable in function efuse_phymap_to_logical is written to but never read. Remove it. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220709171000.180481-14-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 9 --------- 1 file changed, 9 deletions(-) commit e2bd5dc33f037d627ecd3d688cd388131199ee7c Author: Martin Kaiser Date: Sat Jul 9 19:09:58 2022 +0200 staging: r8188eu: _offset is always 0 in efuse_phymap_to_logical The _offset parameter of iol_read_efuse is always 0. Remove the parameter and use 0 in the function body. We can now replace the bytewise copy from efuseTbl to pbuf with memcpy. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220709171000.180481-13-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit cda94a6b44f4eccd8581328f6e012db808f52905 Author: Martin Kaiser Date: Sat Jul 9 19:09:57 2022 +0200 staging: r8188eu: offset is always 0 in iol_read_efuse The offset parameter of iol_read_efuse is always 0. Remove the parameter and use 0 in the function body. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220709171000.180481-12-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit db9895b86b730c759749d7a6911cd966dd5b9aba Author: Martin Kaiser Date: Sat Jul 9 19:09:56 2022 +0200 staging: r8188eu: offset is always 0 in rtl8188e_ReadEFuse The offset parameter of rtl8188e_ReadEFuse is always 0. Remove the parameter and use 0 in the function body. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220709171000.180481-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 6 +++--- drivers/staging/r8188eu/hal/usb_halinit.c | 2 +- drivers/staging/r8188eu/include/hal_intf.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 36442aa73ba715da998d3a42a4a4d5f594cb6f0d Author: Martin Kaiser Date: Sat Jul 9 19:09:55 2022 +0200 staging: r8188eu: txpktbuf_bndy is always 0 The only caller of iol_read_efuse sets the txpktbuf_bndy parameter to 0. Remove the parameter from iol_read_efuse and use 0 in the function body. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220709171000.180481-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e1ebb0d6a163a318de9b9d6eb0a7f6343bb7255b Author: Martin Kaiser Date: Sat Jul 9 19:09:54 2022 +0200 staging: r8188eu: merge ReadEFuseByIC into rtl8188e_ReadEFuse The rtl8188e_ReadEFuse function is just a wrapper to call ReadEFuseByIC. Copy ReadEFuseByIC into rtl8188e_ReadEFuse and remove ReadEFuseByIC. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220709171000.180481-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 3c1178680b37b5a5269f4db6e4e4b4981e202ff9 Author: Martin Kaiser Date: Sat Jul 9 19:09:53 2022 +0200 staging: r8188eu: use memcpy for fallback mac address Use memcpy to store the fallback mac address in eeprom->mac_addr. Do not copy byte by byte. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220709171000.180481-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/usb_halinit.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0fcae03da0d80af6138c911a127b3d9ab5dc7fe8 Author: Martin Kaiser Date: Sat Jul 9 19:09:52 2022 +0200 staging: r8188eu: always initialise efuse buffer with 0xff If BOOT_FROM_EEPROM is set, efuse_buf is not initialised before it is passed to functions that read from it. The buffer will be filled with 0x00 in this case like all local variables. However, the parsing functions expect the buffer to be filled with 0xFF if reading eeprom/efuse data failed. Fill the buffer with 0xFF before we try to read the data. Please note that this problem existed before we started using a local buffer. Adapter->eeprompriv->efuse_eeprom_data was allocated as a part of struct adapter by a vzalloc call in rtw_usb_if1_init. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220709171000.180481-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/usb_halinit.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 698bd81fe887ff66b9f4fb95b07da25fb1f06e3d Author: Martin Kaiser Date: Sat Jul 9 19:09:51 2022 +0200 staging: r8188eu: use a local buffer for efuse data The efuse_eeprom_data array in struct eeprom_priv is used only by ReadAdapterInfo8188EU. We can remove efuse_eeprom_data and use a local buffer instead. Use EFUSE_MAP_LEN_88E as buffer size. Its value is the same as HWSET_MAX_SIZE_512. The functions that access the buffer use EFUSE_MAP_LEN_88E for its size. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220709171000.180481-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/usb_halinit.c | 23 ++++++++++++----------- drivers/staging/r8188eu/include/rtw_eeprom.h | 3 --- 2 files changed, 12 insertions(+), 14 deletions(-) commit 14dbcfc4c9368d3a45db0d2d94f6b23708c72bf5 Author: Martin Kaiser Date: Sat Jul 9 19:09:50 2022 +0200 staging: r8188eu: merge EFUSE_ShadowMapUpdate with its caller Merge the EFUSE_ShadowMapUpdate function into ReadAdapterInfo8188EU, which is the only caller. Merging the two functions makes it clearer that eeprom->efuse_eeprom_data is in fact a temporary buffer that stores info read from efuses. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220709171000.180481-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_efuse.c | 30 ----------------------------- drivers/staging/r8188eu/hal/usb_halinit.c | 11 +++++++++-- drivers/staging/r8188eu/include/rtw_efuse.h | 2 -- 3 files changed, 9 insertions(+), 34 deletions(-) commit 1c4d6546c3a4ee20e2f5ba525e35e779614954c8 Author: Martin Kaiser Date: Sat Jul 9 19:09:49 2022 +0200 staging: r8188eu: remove eeprom function prototypes Remove prototypes for non-existing eeprom functions. It seems that r8188eu has efuses but no eeprom. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220709171000.180481-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/rtw_eeprom.h | 6 ------ 1 file changed, 6 deletions(-) commit af4e6efda54da8520e6c7b73f34798fa3e5c088d Author: Martin Kaiser Date: Sat Jul 9 19:09:48 2022 +0200 staging: r8188eu: remove EepromOrEfuse from struct eeprom_priv The EepromOrEfuse flag in struct eeprom_priv is used only in the ReadAdapterInfo8188EU function. We can remove EepromOrEfuse from struct eeprom_priv. As the meaning of EepromOrEfuse isn't obvious, there is a macro is_boot_from_eeprom that's used for checking the value. We don't need the macro, writing the check as !(eeValue & BOOT_FROM_EEPROM) makes it clear what is checked. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220709171000.180481-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/usb_halinit.c | 3 +-- drivers/staging/r8188eu/include/hal_intf.h | 2 -- drivers/staging/r8188eu/include/rtw_eeprom.h | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) commit ba68103d0f7af3e80286c74f7406b7b9a5334d3b Author: Martin Kaiser Date: Sat Jul 9 19:09:47 2022 +0200 staging: r8188eu: remove unused eeprom defines Remove some eeprom-related defines which are not used by the r8188eu driver. This driver uses BOOT_FROM_EEPROM and EEPROM_EN instead of the defines that this patch removes. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220709171000.180481-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/rtl8188e_spec.h | 6 ------ 1 file changed, 6 deletions(-) commit 3782d959986f75cdedca317323b00910b9069d89 Author: Michael Straube Date: Sat Jul 9 11:44:58 2022 +0200 staging: r8188eu: remove HW_VAR_DM_FUNC_CLR from SetHwReg8188EU() Remove the HW_VAR_DM_FUNC_CLR case from SetHwReg8188EU() and move its functionality to a static function. This is part of the ongoing effort to get rid of SetHwReg8188EU(). Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20220709094458.9578-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 12 ++++++++++-- drivers/staging/r8188eu/hal/usb_halinit.c | 5 ----- drivers/staging/r8188eu/include/hal_intf.h | 1 - 3 files changed, 10 insertions(+), 8 deletions(-) commit 8ad697c3d7f89439fa203023a7d071f08f98157b Author: Michael Straube Date: Sat Jul 9 11:44:57 2022 +0200 staging: r8188eu: remove HW_VAR_DM_FUNC_RESET from SetHwReg8188EU() Remove the HW_VAR_DM_FUNC_RESET case from SetHwReg8188EU() and move its functionality to a static function. This is part of the ongoing effort to get rid of SetHwReg8188EU(). Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20220709094458.9578-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 11 ++++++++++- drivers/staging/r8188eu/hal/usb_halinit.c | 4 ---- drivers/staging/r8188eu/include/hal_intf.h | 1 - 3 files changed, 10 insertions(+), 6 deletions(-) commit f18ab26f7714b26db3f044891b0872847e1c30da Author: Michael Straube Date: Sat Jul 9 11:44:56 2022 +0200 staging: r8188eu: remove HW_VAR_DM_FLAG from SetHwReg8188EU() Remove the HW_VAR_DM_FLAG case from SetHwReg8188EU() and move its functionality to a static function. This is part of the ongoing effort to get rid of SetHwReg8188EU(). Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20220709094458.9578-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/usb_halinit.c | 3 --- drivers/staging/r8188eu/include/hal_intf.h | 1 - drivers/staging/r8188eu/os_dep/ioctl_linux.c | 10 +++++++++- 3 files changed, 9 insertions(+), 5 deletions(-) commit 7644e877bab56223505ed3361d7cb287c0f34152 Author: Michael Straube Date: Sat Jul 9 11:44:55 2022 +0200 staging: r8188eu: remove HW_VAR_DM_FUNC_OP from SetHwReg8188EU() Remove the HW_VAR_DM_FUNC_OP case from SetHwReg8188EU() and move the functionality to the functions that call SetHwReg8188EU() with HW_VAR_DM_FUNC_OP. This is part of the ongoing effort to get rid of SetHwReg8188EU(). Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20220709094458.9578-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_wlan_util.c | 10 ++++++---- drivers/staging/r8188eu/hal/usb_halinit.c | 6 ------ drivers/staging/r8188eu/include/hal_intf.h | 1 - 3 files changed, 6 insertions(+), 11 deletions(-) commit ae9411408cf0263d08f8fe819380bb8ac90031af Author: Michael Straube Date: Sat Jul 9 11:44:54 2022 +0200 staging: r8188eu: remove HW_VAR_BASIC_RATE from SetHwReg8188EU() Remove the HW_VAR_BASIC_RATE case from SetHwReg8188EU() and move the functionality to a separate function. This is part of the ongoing effort to get rid of SetHwReg8188EU(). Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20220709094458.9578-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/r8188eu/core/rtw_wlan_util.c | 41 +++++++++++++++++++++++++- drivers/staging/r8188eu/hal/usb_halinit.c | 37 ----------------------- drivers/staging/r8188eu/include/hal_intf.h | 1 - drivers/staging/r8188eu/include/rtw_mlme_ext.h | 1 + 5 files changed, 42 insertions(+), 40 deletions(-) commit 6a0c054930d554ad8f8044ef1fc856d9da391c81 Author: Duoming Zhou Date: Sun Jul 10 18:30:02 2022 +0800 staging: rtl8192u: Fix sleep in atomic context bug in dm_fsync_timer_callback There are sleep in atomic context bugs when dm_fsync_timer_callback is executing. The root cause is that the memory allocation functions with GFP_KERNEL or GFP_NOIO parameters are called in dm_fsync_timer_callback which is a timer handler. The call paths that could trigger bugs are shown below: (interrupt context) dm_fsync_timer_callback write_nic_byte kzalloc(sizeof(data), GFP_KERNEL); //may sleep usb_control_msg kmalloc(.., GFP_NOIO); //may sleep write_nic_dword kzalloc(sizeof(data), GFP_KERNEL); //may sleep usb_control_msg kmalloc(.., GFP_NOIO); //may sleep This patch uses delayed work to replace timer and moves the operations that may sleep into the delayed work in order to mitigate bugs. Fixes: 8fc8598e61f6 ("Staging: Added Realtek rtl8192u driver to staging") Signed-off-by: Duoming Zhou Link: https://lore.kernel.org/r/20220710103002.63283-1-duoming@zju.edu.cn Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_dm.c | 38 +++++++++++++++++------------------- drivers/staging/rtl8192u/r8192U_dm.h | 2 +- 3 files changed, 20 insertions(+), 22 deletions(-) commit 68b8e9713c8ec90af93c16e1de51cca18cefdb56 Author: Jason A. Donenfeld Date: Sun Jul 10 19:29:21 2022 +0200 x86/setup: Use rng seeds from setup_data Currently, the only way x86 can get an early boot RNG seed is via EFI, which is generally always used now for physical machines, but is very rarely used in VMs, especially VMs that are optimized for starting "instantaneously", such as Firecracker's MicroVM. For tiny fast booting VMs, EFI is not something you generally need or want. Rather, the image loader or firmware should be able to pass a single random seed, exactly as device tree platforms do with the "rng-seed" property. Additionally, this is something that bootloaders can append, with their own seed file management, which is something every other major OS ecosystem has that Linux does not (yet). Add SETUP_RNG_SEED, similar to the other eight setup_data entries that are parsed at boot. It also takes care to zero out the seed immediately after using, in order to retain forward secrecy. This all takes about 7 trivial lines of code. Then, on kexec_file_load(), a new fresh seed is generated and passed to the next kernel, just as is done on device tree architectures when using kexec. And, importantly, I've tested that QEMU is able to properly pass SETUP_RNG_SEED as well, making this work for every step of the way. This code too is pretty straight forward. Together these measures ensure that VMs and nested kexec()'d kernels always receive a proper boot time RNG seed at the earliest possible stage from their parents: - Host [already has strongly initialized RNG] - QEMU [passes fresh seed in SETUP_RNG_SEED field] - Linux [uses parent's seed and gathers entropy of its own] - kexec [passes this in SETUP_RNG_SEED field] - Linux [uses parent's seed and gathers entropy of its own] - kexec [passes this in SETUP_RNG_SEED field] - Linux [uses parent's seed and gathers entropy of its own] - kexec [passes this in SETUP_RNG_SEED field] - ... I've verified in several scenarios that this works quite well from a host kernel to QEMU and down inwards, mixing and matching loaders, with every layer providing a seed to the next. [ bp: Massage commit message. ] Signed-off-by: Jason A. Donenfeld Signed-off-by: Borislav Petkov Acked-by: H. Peter Anvin (Intel) Link: https://lore.kernel.org/r/20220630113300.1892799-1-Jason@zx2c4.com arch/x86/include/uapi/asm/bootparam.h | 6 +++--- arch/x86/kernel/kexec-bzimage64.c | 38 +++++++++++++++++++++++++++++++---- arch/x86/kernel/setup.c | 10 +++++++++ 3 files changed, 47 insertions(+), 7 deletions(-) commit 5a88c48f4146de2c8c2ed7ddcaa76f898869f3a3 Merge: b69a2afd5afc 32346491ddf2 Author: Borislav Petkov Date: Mon Jul 11 09:58:01 2022 +0200 Merge tag 'v5.19-rc6' into tip:x86/kdump Merge rc6 to pick up dependent changes to the bootparam UAPI header. Signed-off-by: Borislav Petkov commit 4ac34b94a5342544baa72ce09fc5e825a9d35070 Author: Matthew Rosato Date: Mon Jun 6 16:33:25 2022 -0400 MAINTAINERS: additional files related kvm s390 pci passthrough Add entries from the s390 kvm subdirectory related to pci passthrough. Acked-by: Christian Borntraeger Signed-off-by: Matthew Rosato Reviewed-by: Thomas Huth Link: https://lore.kernel.org/r/20220606203325.110625-22-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit db1c875e0539518e3d5fe9876ef50975cf4476bb Author: Matthew Rosato Date: Mon Jun 6 16:33:24 2022 -0400 KVM: s390: add KVM_S390_ZPCI_OP to manage guest zPCI devices The KVM_S390_ZPCI_OP ioctl provides a mechanism for managing hardware-assisted virtualization features for s390x zPCI passthrough. Add the first 2 operations, which can be used to enable/disable the specified device for Adapter Event Notification interpretation. Signed-off-by: Matthew Rosato Acked-by: Pierre Morel Reviewed-by: Thomas Huth Link: https://lore.kernel.org/r/20220606203325.110625-21-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger Documentation/virt/kvm/api.rst | 47 +++++++++++++++++++++++ arch/s390/kvm/kvm-s390.c | 16 ++++++++ arch/s390/kvm/pci.c | 85 ++++++++++++++++++++++++++++++++++++++++++ arch/s390/kvm/pci.h | 2 + include/uapi/linux/kvm.h | 31 +++++++++++++++ 5 files changed, 181 insertions(+) commit ba6090ff8ae01b41288be87ed9f6bed3d8cf5961 Author: Matthew Rosato Date: Mon Jun 6 16:33:23 2022 -0400 vfio-pci/zdev: different maxstbl for interpreted devices When doing load/store interpretation, the maximum store block length is determined by the underlying firmware, not the host kernel API. Reflect that in the associated Query PCI Function Group clp capability and let userspace decide which is appropriate to present to the guest. Reviewed-by: Pierre Morel Signed-off-by: Matthew Rosato Acked-by: Alex Williamson Link: https://lore.kernel.org/r/20220606203325.110625-20-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger drivers/vfio/pci/vfio_pci_zdev.c | 6 ++++-- include/uapi/linux/vfio_zdev.h | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) commit faf3bfcb895037ae2a8b89d1048090c9e1291cae Author: Matthew Rosato Date: Mon Jun 6 16:33:22 2022 -0400 vfio-pci/zdev: add function handle to clp base capability The function handle is a system-wide unique identifier for a zPCI device. With zPCI instruction interpretation, the host will no longer be executing the zPCI instructions on behalf of the guest. As a result, the guest needs to use the real function handle in order for firmware to associate the instruction with the proper PCI function. Let's provide that handle to the guest. Reviewed-by: Christian Borntraeger Reviewed-by: Pierre Morel Signed-off-by: Matthew Rosato Acked-by: Alex Williamson Link: https://lore.kernel.org/r/20220606203325.110625-19-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger drivers/vfio/pci/vfio_pci_zdev.c | 5 +++-- include/uapi/linux/vfio_zdev.h | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) commit 8061d1c31f1a018281bc9877ecce44bfc779e21d Author: Matthew Rosato Date: Mon Jun 6 16:33:21 2022 -0400 vfio-pci/zdev: add open/close device hooks During vfio-pci open_device, pass the KVM associated with the vfio group (if one exists). This is needed in order to pass a special indicator (GISA) to firmware to allow zPCI interpretation facilities to be used for only the specific KVM associated with the vfio-pci device. During vfio-pci close_device, unregister the notifier. Signed-off-by: Matthew Rosato Acked-by: Alex Williamson Reviewed-by: Pierre Morel Link: https://lore.kernel.org/r/20220606203325.110625-18-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger drivers/vfio/pci/vfio_pci_core.c | 10 +++++++++- drivers/vfio/pci/vfio_pci_zdev.c | 24 ++++++++++++++++++++++++ include/linux/vfio_pci_core.h | 10 ++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) commit 09340b2fca007509c3cbc34fdc97961e0abfc589 Author: Matthew Rosato Date: Mon Jun 6 16:33:20 2022 -0400 KVM: s390: pci: add routines to start/stop interpretive execution These routines will be invoked at the time an s390x vfio-pci device is associated with a KVM (or when the association is removed), allowing the zPCI device to enable or disable load/store intepretation mode; this requires the host zPCI device to inform firmware of the unique token (GISA designation) that is associated with the owning KVM. Signed-off-by: Matthew Rosato Acked-by: Pierre Morel Link: https://lore.kernel.org/r/20220606203325.110625-17-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 18 +++++ arch/s390/include/asm/pci.h | 1 + arch/s390/kvm/kvm-s390.c | 15 ++++ arch/s390/kvm/pci.c | 162 +++++++++++++++++++++++++++++++++++++++ arch/s390/kvm/pci.h | 5 ++ arch/s390/pci/pci.c | 4 + 6 files changed, 205 insertions(+) commit 3c5a1b6f0a18520a0edd0600fef6f1a8553b8fdc Author: Matthew Rosato Date: Mon Jun 6 16:33:19 2022 -0400 KVM: s390: pci: provide routines for enabling/disabling interrupt forwarding These routines will be wired into a kvm ioctl in order to respond to requests to enable / disable a device for Adapter Event Notifications / Adapter Interuption Forwarding. Reviewed-by: Christian Borntraeger Acked-by: Niklas Schnelle Signed-off-by: Matthew Rosato Link: https://lore.kernel.org/r/20220606203325.110625-16-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger arch/s390/kvm/pci.c | 247 +++++++++++++++++++++++++++++++++++++++++++++ arch/s390/kvm/pci.h | 1 + arch/s390/pci/pci_insn.c | 1 + include/linux/sched/user.h | 3 +- 4 files changed, 251 insertions(+), 1 deletion(-) commit 3f4bbb4342ec637b14d0e367e487fd38b31d8b48 Author: Matthew Rosato Date: Mon Jun 6 16:33:18 2022 -0400 KVM: s390: mechanism to enable guest zPCI Interpretation The guest must have access to certain facilities in order to allow interpretive execution of zPCI instructions and adapter event notifications. However, there are some cases where a guest might disable interpretation -- provide a mechanism via which we can defer enabling the associated zPCI interpretation facilities until the guest indicates it wishes to use them. Reviewed-by: Christian Borntraeger Reviewed-by: Pierre Morel Signed-off-by: Matthew Rosato Link: https://lore.kernel.org/r/20220606203325.110625-15-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 4 ++++ arch/s390/kvm/kvm-s390.c | 38 ++++++++++++++++++++++++++++++++++++++ arch/s390/kvm/kvm-s390.h | 10 ++++++++++ 3 files changed, 52 insertions(+) commit 73f91b004321f2510fa79e66035dbbf1870fcf56 Author: Matthew Rosato Date: Mon Jun 6 16:33:17 2022 -0400 KVM: s390: pci: enable host forwarding of Adapter Event Notifications In cases where interrupts are not forwarded to the guest via firmware, KVM is responsible for ensuring delivery. When an interrupt presents with the forwarding bit, we must process the forwarding tables until all interrupts are delivered. Reviewed-by: Christian Borntraeger Reviewed-by: Pierre Morel Signed-off-by: Matthew Rosato Link: https://lore.kernel.org/r/20220606203325.110625-14-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 1 + arch/s390/include/asm/tpi.h | 13 +++++++ arch/s390/kvm/interrupt.c | 78 +++++++++++++++++++++++++++++++++++++++- arch/s390/kvm/kvm-s390.c | 3 +- arch/s390/kvm/pci.h | 10 ++++++ 5 files changed, 103 insertions(+), 2 deletions(-) commit 98b1d33dac5fd09060486762c02fd1a78baeb1e0 Author: Matthew Rosato Date: Mon Jun 6 16:33:16 2022 -0400 KVM: s390: pci: do initial setup for AEN interpretation Initial setup for Adapter Event Notification Interpretation for zPCI passthrough devices. Specifically, allocate a structure for forwarding of adapter events and pass the address of this structure to firmware. Reviewed-by: Christian Borntraeger Signed-off-by: Matthew Rosato Link: https://lore.kernel.org/r/20220606203325.110625-13-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger arch/s390/include/asm/pci.h | 4 + arch/s390/include/asm/pci_insn.h | 12 +++ arch/s390/kvm/interrupt.c | 14 ++++ arch/s390/kvm/kvm-s390.c | 11 +++ arch/s390/kvm/pci.c | 160 +++++++++++++++++++++++++++++++++++++++ arch/s390/kvm/pci.h | 49 ++++++++++++ arch/s390/pci/pci.c | 6 ++ 7 files changed, 256 insertions(+) commit 6438e30714abd1bf7408356d3e86127d1fb379c0 Author: Matthew Rosato Date: Mon Jun 6 16:33:15 2022 -0400 KVM: s390: pci: add basic kvm_zdev structure This structure will be used to carry kvm passthrough information related to zPCI devices. Reviewed-by: Niklas Schnelle Reviewed-by: Pierre Morel Reviewed-by: Christian Borntraeger Signed-off-by: Matthew Rosato Link: https://lore.kernel.org/r/20220606203325.110625-12-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger arch/s390/include/asm/pci.h | 3 +++ arch/s390/kvm/Makefile | 1 + arch/s390/kvm/pci.c | 36 ++++++++++++++++++++++++++++++++++++ arch/s390/kvm/pci.h | 21 +++++++++++++++++++++ 4 files changed, 61 insertions(+) commit c435c54639aa5513ab877c8b014dd83d4ce6b40e Author: Matthew Rosato Date: Mon Jun 6 16:33:14 2022 -0400 vfio/pci: introduce CONFIG_VFIO_PCI_ZDEV_KVM The current contents of vfio-pci-zdev are today only useful in a KVM environment; let's tie everything currently under vfio-pci-zdev to this Kconfig statement and require KVM in this case, reducing complexity (e.g. symbol lookups). Signed-off-by: Matthew Rosato Acked-by: Alex Williamson Reviewed-by: Pierre Morel Link: https://lore.kernel.org/r/20220606203325.110625-11-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger drivers/vfio/pci/Kconfig | 11 +++++++++++ drivers/vfio/pci/Makefile | 2 +- include/linux/vfio_pci_core.h | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) commit d10384677630aa18c3ee0e8db915336c9ad9dec0 Author: Matthew Rosato Date: Mon Jun 6 16:33:13 2022 -0400 s390/pci: stash dtsm and maxstbl Store information about what IOAT designation types are supported by underlying hardware as well as the largest store block size allowed. These values will be needed by passthrough. Reviewed-by: Niklas Schnelle Reviewed-by: Pierre Morel Reviewed-by: Christian Borntraeger Signed-off-by: Matthew Rosato Link: https://lore.kernel.org/r/20220606203325.110625-10-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger arch/s390/include/asm/pci.h | 2 ++ arch/s390/include/asm/pci_clp.h | 6 ++++-- arch/s390/pci/pci_clp.c | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) commit c68468ed3416ea88d7b14dabb1fa584c3a90cd85 Author: Matthew Rosato Date: Mon Jun 6 16:33:12 2022 -0400 s390/pci: stash associated GISA designation For passthrough devices, we will need to know the GISA designation of the guest if interpretation facilities are to be used. Setup to stash this in the zdev and set a default of 0 (no GISA designation) for now; a subsequent patch will set a valid GISA designation for passthrough devices. Also, extend mpcific routines to specify this stashed designation as part of the mpcific command. Reviewed-by: Pierre Morel Reviewed-by: Niklas Schnelle Reviewed-by: Christian Borntraeger Signed-off-by: Matthew Rosato Link: https://lore.kernel.org/r/20220606203325.110625-9-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger arch/s390/include/asm/pci.h | 1 + arch/s390/include/asm/pci_clp.h | 3 ++- arch/s390/pci/pci.c | 6 ++++++ arch/s390/pci/pci_clp.c | 5 +++++ arch/s390/pci/pci_irq.c | 5 +++++ 5 files changed, 19 insertions(+), 1 deletion(-) commit 062f002485d4d5f26f9e8fbce831fd28c4b75ca5 Author: Matthew Rosato Date: Mon Jun 6 16:33:11 2022 -0400 s390/pci: externalize the SIC operation controls and routine A subsequent patch will be issuing SIC from KVM -- export the necessary routine and make the operation control definitions available from a header. Because the routine will now be exported, let's rename __zpci_set_irq_ctrl to zpci_set_irq_ctrl and get rid of the zero'd iib wrapper function of the same name. Reviewed-by: Niklas Schnelle Reviewed-by: Claudio Imbrenda Reviewed-by: Pierre Morel Signed-off-by: Matthew Rosato Link: https://lore.kernel.org/r/20220606203325.110625-8-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger arch/s390/include/asm/pci_insn.h | 17 +++++++++-------- arch/s390/pci/pci_insn.c | 3 ++- arch/s390/pci/pci_irq.c | 26 ++++++++++++-------------- 3 files changed, 23 insertions(+), 23 deletions(-) commit 932b646727f9df312980d175e339248cdf7812f0 Author: Matthew Rosato Date: Mon Jun 6 16:33:10 2022 -0400 s390/airq: allow for airq structure that uses an input vector When doing device passthrough where interrupts are being forwarded from host to guest, we wish to use a pinned section of guest memory as the vector (the same memory used by the guest as the vector). To accomplish this, add a new parameter for airq_iv_create which allows passing an existing vector to be used instead of allocating a new one. The caller is responsible for ensuring the vector is pinned in memory as well as for unpinning the memory when the vector is no longer needed. A subsequent patch will use this new parameter for zPCI interpretation. Reviewed-by: Thomas Huth Reviewed-by: Pierre Morel Reviewed-by: Claudio Imbrenda Acked-by: Cornelia Huck Signed-off-by: Matthew Rosato Link: https://lore.kernel.org/r/20220606203325.110625-7-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger arch/s390/include/asm/airq.h | 4 +++- arch/s390/pci/pci_irq.c | 8 ++++---- drivers/s390/cio/airq.c | 10 +++++++--- drivers/s390/virtio/virtio_ccw.c | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) commit d2197485a1883c60d044146b1ee69aac654c55e8 Author: Matthew Rosato Date: Mon Jun 6 16:33:09 2022 -0400 s390/airq: pass more TPI info to airq handlers A subsequent patch will introduce an airq handler that requires additional TPI information beyond directed vs floating, so pass the entire tpi_info structure via the handler. Only pci actually uses this information today, for the other airq handlers this is effectively a no-op. Reviewed-by: Eric Farman Reviewed-by: Claudio Imbrenda Reviewed-by: Pierre Morel Reviewed-by: Thomas Huth Acked-by: Christian Borntraeger Acked-by: Cornelia Huck Signed-off-by: Matthew Rosato Link: https://lore.kernel.org/r/20220606203325.110625-6-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger arch/s390/include/asm/airq.h | 3 ++- arch/s390/kvm/interrupt.c | 4 +++- arch/s390/pci/pci_irq.c | 9 +++++++-- drivers/s390/cio/airq.c | 2 +- drivers/s390/cio/qdio_thinint.c | 6 ++++-- drivers/s390/crypto/ap_bus.c | 9 ++++++--- drivers/s390/virtio/virtio_ccw.c | 4 +++- 7 files changed, 26 insertions(+), 11 deletions(-) commit b05a870c5e4e6a113b7f3fb61b5fa0869e40dd30 Author: Matthew Rosato Date: Mon Jun 6 16:33:08 2022 -0400 s390/sclp: detect the AISI facility Detect the Adapter Interruption Suppression Interpretation facility. Reviewed-by: Eric Farman Reviewed-by: Christian Borntraeger Reviewed-by: Claudio Imbrenda Signed-off-by: Matthew Rosato Link: https://lore.kernel.org/r/20220606203325.110625-5-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger arch/s390/include/asm/sclp.h | 1 + drivers/s390/char/sclp_early.c | 1 + 2 files changed, 2 insertions(+) commit efef0db77c939f105f7dc92a736dd66628406822 Author: Matthew Rosato Date: Mon Jun 6 16:33:07 2022 -0400 s390/sclp: detect the AENI facility Detect the Adapter Event Notification Interpretation facility. Reviewed-by: Eric Farman Reviewed-by: Christian Borntraeger Reviewed-by: Claudio Imbrenda Signed-off-by: Matthew Rosato Link: https://lore.kernel.org/r/20220606203325.110625-4-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger arch/s390/include/asm/sclp.h | 1 + drivers/s390/char/sclp_early.c | 1 + 2 files changed, 2 insertions(+) commit 9db153f4523069a89cab14ab9aa2438976f256fb Author: Matthew Rosato Date: Mon Jun 6 16:33:06 2022 -0400 s390/sclp: detect the AISII facility Detect the Adapter Interruption Source ID Interpretation facility. Reviewed-by: Eric Farman Reviewed-by: Christian Borntraeger Reviewed-by: Claudio Imbrenda Signed-off-by: Matthew Rosato Link: https://lore.kernel.org/r/20220606203325.110625-3-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger arch/s390/include/asm/sclp.h | 1 + drivers/s390/char/sclp_early.c | 1 + 2 files changed, 2 insertions(+) commit e3d27b62110c1ccea4d015f7c5c92f92150668db Author: Matthew Rosato Date: Mon Jun 6 16:33:05 2022 -0400 s390/sclp: detect the zPCI load/store interpretation facility Detect the zPCI Load/Store Interpretation facility. Reviewed-by: Eric Farman Reviewed-by: Christian Borntraeger Reviewed-by: Claudio Imbrenda Signed-off-by: Matthew Rosato Link: https://lore.kernel.org/r/20220606203325.110625-2-mjrosato@linux.ibm.com Signed-off-by: Christian Borntraeger arch/s390/include/asm/sclp.h | 1 + drivers/s390/char/sclp_early.c | 1 + 2 files changed, 2 insertions(+) commit 39c1b1af3ea744c1f353a44146c2eea2ad916c53 Merge: 2a1f94e45569 32346491ddf2 Author: Greg Kroah-Hartman Date: Mon Jul 11 09:25:23 2022 +0200 Merge 5.19-rc6 into staging-next We need the staging driver fix in here as well. Signed-off-by: Greg Kroah-Hartman commit 8b979924b9f9e945a095a2f622b39b9fd9f65acb Author: Masahiro Yamada Date: Mon Jul 11 13:12:47 2022 +0900 x86/build: Remove unused OBJECT_FILES_NON_STANDARD_test_nx.o Commit 3ad38ceb2769 ("x86/mm: Remove CONFIG_DEBUG_NX_TEST") removed arch/x86/kernel/test_nx.c Signed-off-by: Masahiro Yamada Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20220711041247.119357-1-masahiroy@kernel.org arch/x86/kernel/Makefile | 2 -- 1 file changed, 2 deletions(-) commit 1b8667812b3a1304f3db736ac4905d6ad77d721e Author: Nathan Chancellor Date: Fri Jun 17 11:08:46 2022 -0700 x86/Kconfig: Fix CONFIG_CC_HAS_SANE_STACKPROTECTOR when cross compiling with clang Chimera Linux notes that CONFIG_CC_HAS_SANE_STACKPROTECTOR cannot be enabled when cross compiling an x86_64 kernel with clang, even though it does work when natively compiling. When building on aarch64: $ make -sj"$(nproc)" ARCH=x86_64 LLVM=1 defconfig $ grep STACKPROTECTOR .config When building on x86_64: $ make -sj"$(nproc)" ARCH=x86_64 LLVM=1 defconfig $ grep STACKPROTECTOR .config CONFIG_CC_HAS_SANE_STACKPROTECTOR=y CONFIG_HAVE_STACKPROTECTOR=y CONFIG_STACKPROTECTOR=y CONFIG_STACKPROTECTOR_STRONG=y When clang is invoked without a '--target' flag, code is generated for the default target, which is usually the host (it is configurable via cmake). As a result, the has-stack-protector scripts will generate code for the default target but check for x86 specific segment registers, which cannot succeed if the default target is not x86. $(CLANG_FLAGS) contains an explicit '--target' flag so pass that variable along to the has-stack-protector scripts so that the stack protector can be enabled when cross compiling with clang. The 32-bit stack protector cannot currently be enabled with clang, as it does not support '-mstack-protector-guard-symbol', so this results in no functional change for ARCH=i386 when cross compiling. Signed-off-by: Nathan Chancellor Signed-off-by: Dave Hansen Signed-off-by: Borislav Petkov Link: https://github.com/chimera-linux/cports/commit/0fb7e506d5f83fdf2104feb22cdac34934561226 Link: https://github.com/llvm/llvm-project/issues/48553 Link: https://lkml.kernel.org/r/20220617180845.2788442-1-nathan@kernel.org arch/x86/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14facbc1871ae15404666747b5319c08e04b875a Merge: f5c97da8037b 32346491ddf2 Author: Greg Kroah-Hartman Date: Mon Jul 11 08:32:58 2022 +0200 Merge 5.19-rc6 into char-misc-next We need the misc driver fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 45b9fc58ad1c779cfc6567ba34f506a681a71ca0 Author: William Zhang Date: Wed Jul 6 23:57:55 2022 -0700 clk: bcm: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA Prepare for the BCM63138 ARCH_BCM_63XX migration to ARCH_BCMBCA. Make CLK_BCM_63XX depending and setting default on ARCH_BCMBCA. Signed-off-by: William Zhang Acked-by: Florian Fainelli Signed-off-by: Florian Fainelli drivers/clk/bcm/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa6c9ae616b8fd44980c9236f87ce6da076f1ee6 Author: William Zhang Date: Wed Jul 6 23:57:54 2022 -0700 hwrng: bcm2835: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA Prepare for the BCM63138 ARCH_BCM_63XX migration to ARCH_BCMBCA. Make HW_RANDOM_BCM2835 depending on ARCH_BCMBCA. Signed-off-by: William Zhang Acked-by: Florian Fainelli Signed-off-by: Florian Fainelli drivers/char/hw_random/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85656ec193e9ca9c11f7c75dc733c071755b189e Author: Matthew Wilcox (Oracle) Date: Wed Jul 6 17:39:21 2022 -0400 IDR: Note that the IDR API is deprecated Some people read the documentation, perhaps. Signed-off-by: Matthew Wilcox (Oracle) Documentation/core-api/idr.rst | 3 +++ 1 file changed, 3 insertions(+) commit 1dd685c414a7b9fdb3d23aca3aedae84f0b998ae Author: Matthew Wilcox (Oracle) Date: Wed Jul 6 14:51:00 2022 -0400 XArray: Add calls to might_alloc() Catch bogus GFP flags deterministically, instead of occasionally when we actually have to allocate memory. Reported-by: Nikolay Borisov Signed-off-by: Matthew Wilcox (Oracle) include/linux/xarray.h | 15 +++++++++++++++ tools/include/linux/sched/mm.h | 2 ++ 2 files changed, 17 insertions(+) commit 6ca0a6f834ed06b2b4c6d1f7f162f2b0d3e196cf Author: Trond Myklebust Date: Mon Jun 27 16:04:02 2022 -0400 NFS: Fix case insensitive renames For filesystems that are case insensitive and case preserving, we need to be able to rename from one case folded variant of the filename to another. Currently, if we have looked up the target filename before the call to rename, then we may have a hashed dentry with that target name in the dcache, causing the vfs to optimise away the rename. To avoid that, let's drop the target dentry, and leave it to the server to optimise away the rename if that is the correct thing to do. Signed-off-by: Trond Myklebust fs/nfs/dir.c | 4 ++++ 1 file changed, 4 insertions(+) commit 431794e67e238e6fd170499a14fd2abf0a16b5bd Author: Trond Myklebust Date: Wed May 18 17:08:58 2022 -0400 pNFS/files: Handle RDMA connection errors correctly The RPC/RDMA driver will return -EPROTO and -ENODEV as connection errors under certain circumstances. Make sure that we handle them correctly and avoid cycling forever in a LAYOUTGET/LAYOUTRETURN loop. Signed-off-by: Trond Myklebust fs/nfs/filelayout/filelayout.c | 2 ++ 1 file changed, 2 insertions(+) commit 7836d75467e9d214bdf5c693b32721de729a6e38 Author: Trond Myklebust Date: Wed May 18 16:09:06 2022 -0400 pNFS/flexfiles: Report RDMA connection errors to the server The RPC/RDMA driver will return -EPROTO and -ENODEV as connection errors under certain circumstances. Make sure that we handle them and report them to the server. If not, we can end up cycling forever in a LAYOUTGET/LAYOUTRETURN loop. Fixes: a12f996d3413 ("NFSv4/pNFS: Use connections to a DS that are all of the same protocol family") Cc: stable@vger.kernel.org # 5.11.x Signed-off-by: Trond Myklebust fs/nfs/flexfilelayout/flexfilelayout.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9597152d98840c2517230740952df97cfcc07e2f Author: Trond Myklebust Date: Wed May 18 16:37:56 2022 -0400 Revert "pNFS: nfs3_set_ds_client should set NFS_CS_NOPING" This reverts commit c6eb58435b98bd843d3179664a0195ff25adb2c3. If a transport is down, then we want to fail over to other transports if they are listed in the GETDEVICEINFO reply. Fixes: c6eb58435b98 ("pNFS: nfs3_set_ds_client should set NFS_CS_NOPING") Cc: stable@vger.kernel.org # 5.11.x Signed-off-by: Trond Myklebust fs/nfs/nfs3client.c | 1 - 1 file changed, 1 deletion(-) commit 4b8dbdfbc5f650095a8e105998e7a84b4d212495 Author: Trond Myklebust Date: Thu Apr 28 15:46:01 2022 -0400 SUNRPC: Fix an RPC/RDMA performance regression Use the standard gfp mask instead of using GFP_NOWAIT. The latter causes issues when under memory pressure. Signed-off-by: Trond Myklebust net/sunrpc/auth_gss/auth_gss.c | 11 ++++------- net/sunrpc/sched.c | 1 + net/sunrpc/xprtrdma/transport.c | 6 +----- 3 files changed, 6 insertions(+), 12 deletions(-) commit 9e9e44017db33a74177ffe91307b4c922fe2f094 Author: Dan Williams Date: Tue Jun 7 11:21:40 2022 -0700 cxl/hdm: Initialize decoder type for memory expander devices Unless and until accelerator (type-2) drivers start registering for CXL.mem mapping services from the CXL subsystem core, initialize idle HDM decoders to the "expander" type. I.e. the only CXL devices using the CXL core presently are those implementing the CXL 2.0 Type-3 memory expander device class code that the cxl_pci driver claims. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220624041950.559155-6-dan.j.williams@intel.com Signed-off-by: Dan Williams drivers/cxl/core/hdm.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit ee800010835db23c70acc01000f182955cab27a5 Author: Dan Williams Date: Wed Jun 1 12:49:32 2022 -0700 cxl/port: Cache CXL host bridge data Region creation has need for checking host-bridge connectivity when adding endpoints to regions. Record, at port creation time, the host-bridge to provide a useful shortcut from any location in the topology to the most-significant ancestor. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220624041950.559155-4-dan.j.williams@intel.com Signed-off-by: Dan Williams drivers/cxl/core/port.c | 18 +++++++++++++++++- drivers/cxl/cxl.h | 2 ++ 2 files changed, 19 insertions(+), 1 deletion(-) commit fe16ecaa0e629ade1e1cc09781c7cc77e5d2c8bc Author: Hans de Goede Date: Sun Jul 10 19:36:58 2022 +0200 platform/x86: intel_atomisp2_led: Also turn off the always-on camera LED on the Asus T100TAF Like the Asus T100TA the Asus T100TAF has a camera LED which is always on by default and both also use the same GPIO for the LED. Relax the DMI match for the Asus T100TA so that it also matches the T100TAF. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20220710173658.221528-1-hdegoede@redhat.com drivers/platform/x86/intel/atomisp2/led.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 08f8d040a11d539481b9aee7b482430561281a28 Author: Dan Williams Date: Tue May 24 10:48:59 2022 -0700 tools/testing/cxl: Fix decoder default state The 'enabled' state is reserved for committed decoders. By default, cxl_test decoders are uncommitted at init time. Fixes: 7c7d68db0254 ("tools/testing/cxl: Enumerate mock decoders") Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165603888091.551046.6312322707378021172.stgit@dwillia2-xfh Signed-off-by: Dan Williams tools/testing/cxl/test/cxl.c | 1 - 1 file changed, 1 deletion(-) commit e7ad1bf683295024e7a4e09e41015989a004a0f5 Author: Dan Williams Date: Mon May 23 23:26:11 2022 -0700 tools/testing/cxl: Add partition support In support of testing DPA allocation mechanisms in the CXL core, the cxl_test environment needs to support establishing and retrieving the 'pmem partition boundary. Replace the platform_device_add_resources() method for delineating DPA within an endpoint with an emulated DEV_SIZE amount of partitionable capacity. Set DEV_SIZE such that an endpoint has enough capacity to simultaneously participate in 8 distinct regions. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165603887411.551046.13234212587991192347.stgit@dwillia2-xfh Signed-off-by: Dan Williams drivers/cxl/core/mbox.c | 7 +----- drivers/cxl/cxlmem.h | 7 ++++++ tools/testing/cxl/test/cxl.c | 40 +--------------------------------- tools/testing/cxl/test/mem.c | 51 +++++++++++++++++++++++--------------------- 4 files changed, 36 insertions(+), 69 deletions(-) commit 855c90d30575f95c5a1fb72f9294a9f75dae20c2 Author: Dan Williams Date: Tue May 24 08:56:58 2022 -0700 tools/testing/cxl: Expand CFMWS windows For the x2 host-bridge interleave windows, allow for a x8-endpoint-interleave configuration per memory-type with each device contributing the minimum 256MB extent. Similarly, for the x1 host-bridge interleave windows, allow for a x4-endpoint-interleave configuration per memory-type. Bump up the number of decoders per-port to support hosting 8 regions. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165603886721.551046.8682583835505795210.stgit@dwillia2-xfh Signed-off-by: Dan Williams tools/testing/cxl/test/cxl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b2f3b74e1072ab7c03833f265bdb26dafa92e078 Author: Dan Williams Date: Wed Jun 22 18:02:37 2022 -0700 tools/testing/cxl: Move cxl_test resources to the top of memory A recent QEMU upgrade resulted in collisions between QEMU's chosen location for PCI MMIO and cxl_test's fake address location for emulated CXL purposes. This was great for testing resource collisions, but not so great for continuing to test the nominal cases. Move cxl_test to the top-of-memory where it is less likely to collide with other resources. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165603886021.551046.12395967874222763381.stgit@dwillia2-xfh Signed-off-by: Dan Williams tools/testing/cxl/test/cxl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cc2a4878700b2467f36e03f581a0a877ae6a568d Author: Dan Williams Date: Thu May 26 12:15:25 2022 -0700 cxl/mem: Add a debugfs version of 'iomem' for DPA, 'dpamem' Dump the device-physical-address map for a CXL expander in /proc/iomem style format. E.g.: cat /sys/kernel/debug/cxl/mem1/dpamem 00000000-0fffffff : ram 10000000-1fffffff : pmem Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165603885318.551046.8308248564880066726.stgit@dwillia2-xfh Signed-off-by: Dan Williams drivers/cxl/core/hdm.c | 25 +++++++++++++++++++++++++ drivers/cxl/core/port.c | 1 + drivers/cxl/cxlmem.h | 4 ++++ drivers/cxl/mem.c | 23 +++++++++++++++++++++++ 4 files changed, 53 insertions(+) commit 9b99ecf5a316f056d7139fa76198c8a2297846d1 Author: Dan Williams Date: Sun Jul 10 09:57:28 2022 -0700 cxl/debug: Move debugfs init to cxl_core_init() In preparation for a new cxl debugfs file, move 'cxl' directory establishment and teardown to the core and let subsequent init routines reference that setup. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165603884654.551046.4962104601691723080.stgit@dwillia2-xfh Signed-off-by: Dan Williams drivers/cxl/core/core.h | 2 +- drivers/cxl/core/mbox.c | 10 +--------- drivers/cxl/core/port.c | 13 +++++++++++-- 3 files changed, 13 insertions(+), 12 deletions(-) commit e286044bf5b089801c20688c45b66fd6b6a712fa Author: Andy Shevchenko Date: Sun Jul 10 00:16:53 2022 +0300 platform/x86: serial-multi-instantiate: Sort ACPI IDs by HID It's easier to maintain the sorted table. Keep the sorting order in sync with one in drivers/acpi/scan.c. Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20220709211653.18938-6-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede drivers/platform/x86/serial-multi-instantiate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3e13bbc6f5a84f9c15883a97649023522eec481 Author: Andy Shevchenko Date: Sun Jul 10 00:16:52 2022 +0300 platform/x86: serial-multi-instantiate: Get rid of redundant 'else' In the snippets like the following if (...) return / goto / break / continue ...; else ... the 'else' is redundant. Get rid of it. Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20220709211653.18938-5-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede drivers/platform/x86/serial-multi-instantiate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ed7adc2b69c6492ebb2733d8914c6d765ec9770b Author: Andy Shevchenko Date: Sun Jul 10 00:16:51 2022 +0300 platform/x86: serial-multi-instantiate: Use while (i--) pattern to clean up Use more natural while (i--) patter to clean up allocated resources. Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20220709211653.18938-4-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede drivers/platform/x86/serial-multi-instantiate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 14a9aa99aca6c28728de357b7be3c9ef4f2a5bb6 Author: Andy Shevchenko Date: Sun Jul 10 00:16:50 2022 +0300 platform/x86: serial-multi-instantiate: Improve dev_err_probe() messaging Drop duplicate print of returned value in the messages and use pattern return dev_err_probe(...) where it's possible. Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20220709211653.18938-3-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede drivers/platform/x86/serial-multi-instantiate.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 8b50c48d59a9cd007cf0b09e479e4221b2b349ae Author: Andy Shevchenko Date: Sun Jul 10 00:16:49 2022 +0300 platform/x86: serial-multi-instantiate: Drop duplicate check The device_get_match_data() checks for firmware node to be present, there is no need to check for ACPI companion. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220709211653.18938-2-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/serial-multi-instantiate.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 2b5b27826a48eea579bf103161c76d3b435764a8 Author: Andy Shevchenko Date: Sun Jul 10 00:16:48 2022 +0300 platform/x86: serial-multi-instantiate: Improve autodetection Instead of calling specific resource counter, let just probe each of the type and see what it says. Return -ENOENT if no resources found. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220709211653.18938-1-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/serial-multi-instantiate.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 553b53e490642995de8f9862b3de01ae72dda4e3 Author: Hans de Goede Date: Sun Jul 10 16:07:36 2022 +0200 platform/x86/intel/ifs: Mark as BROKEN A recent suggested change to the IFS code has shown that the userspace API needs a bit more work, see: https://lore.kernel.org/platform-driver-x86/20220708151938.986530-1-jithu.joseph@intel.com/ Mark it as BROKEN before 5.19 ships, to give ourselves one more kernel-devel cycle to get the userspace API right. Link: https://lore.kernel.org/platform-driver-x86/20220708151938.986530-1-jithu.joseph@intel.com/ Cc: Jithu Joseph Cc: Ashok Raj Cc: Tony Luck Suggested-by: Greg KH Signed-off-by: Hans de Goede Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20220710140736.6492-1-hdegoede@redhat.com drivers/platform/x86/intel/ifs/Kconfig | 3 +++ 1 file changed, 3 insertions(+) commit 72cd7067839df6139bb46ae932a753d63bdbec06 Author: Misaka19465 Date: Sun Jul 10 19:37:27 2022 +0800 platform/x86: asus-wmi: Add key mappings On laptops like ASUS TUF Gaming A15, which have hotkeys to start Armoury Crate or AURA Sync, these hotkeys are unavailable. This patch add mappings for them. Signed-off-by: Misaka19465 Link: https://lore.kernel.org/r/20220710113727.281634-1-misaka19465@olddoctor.net Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/asus-nb-wmi.c | 2 ++ 1 file changed, 2 insertions(+) commit 650d9a14715f1968a693bb8282a82ca6c3c22541 Author: Hans de Goede Date: Fri Jul 8 15:14:12 2022 +0200 efi: Fix efi_power_off() not being run before acpi_power_off() when necessary Commit 98f30d0ecf79 ("ACPI: power: Switch to sys-off handler API") switched the ACPI sleep code from directly setting the old global pm_power_off handler to using the new register_sys_off_handler() mechanism with a priority of SYS_OFF_PRIO_FIRMWARE. This is a problem when the old global pm_power_off handler would later be overwritten, such as done by the late_initcall(efi_shutdown_init): if (efi_poweroff_required()) pm_power_off = efi_power_off; The old global pm_power_off handler gets run with a priority of SYS_OFF_PRIO_DEFAULT which is lower then SYS_OFF_PRIO_FIRMWARE, causing acpi_power_off() to run first, changing the behavior from before the ACPI sleep code switched to the new register_sys_off_handler(). Switch the registering of efi_power_off over to register_sys_off_handler() with a priority of SYS_OFF_PRIO_FIRMWARE + 1 so that it will run before acpi_power_off() as before. Note since the new sys-off-handler code will try all handlers in priority order, there is no more need for the EFI code to store and call the original pm_power_off handler. Fixes: 98f30d0ecf79 ("ACPI: power: Switch to sys-off handler API") Cc: Dmitry Osipenko Signed-off-by: Hans de Goede Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220708131412.81078-3-hdegoede@redhat.com drivers/firmware/efi/reboot.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit d80b83c911ca9b8d35213bf62e9cf336c78c5d24 Author: Hans de Goede Date: Fri Jul 8 15:14:11 2022 +0200 platform/x86: x86-android-tablets: Fix Lenovo Yoga Tablet 2 830/1050 poweroff again Commit 98f30d0ecf79 ("ACPI: power: Switch to sys-off handler API") switched the ACPI sleep code from directly setting the old global pm_power_off handler to using the new register_sys_off_handler() mechanism with a priority of SYS_OFF_PRIO_FIRMWARE. This is a problem in special cases where the old global pm_power_off handler later gets overwritten, such as the Lenovo Tab2 poweroff bugfix in x86-android-tablets. The old global pm_power_off handler gets run with a priority of SYS_OFF_PRIO_DEFAULT which is lower then SYS_OFF_PRIO_FIRMWARE, causing the troublesome ACPI poweroff (which freezes the system) to run first. Switch the registering of lenovo_yoga_tab2_830_1050_power_off over to register_sys_off_handler() with a priority of SYS_OFF_PRIO_FIRMWARE + 1 so that it will run before acpi_power_off() to fix this. Fixes: 98f30d0ecf79 ("ACPI: power: Switch to sys-off handler API") Cc: Dmitry Osipenko Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20220708131412.81078-2-hdegoede@redhat.com drivers/platform/x86/x86-android-tablets.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit c1bb6372c073e828db0203551c772081f9266140 Author: Pär Eriksson Date: Tue Jul 5 20:44:07 2022 +0200 platform/x86: gigabyte-wmi: add support for B660I AORUS PRO DDR4 Add support for the B660I AORUS PRO DDR4. Signed-off-by: Pär Eriksson Link: https://lore.kernel.org/r/20220705184407.14181-1-parherman@gmail.com Signed-off-by: Hans de Goede drivers/platform/x86/gigabyte-wmi.c | 1 + 1 file changed, 1 insertion(+) commit d4a930a08c2664662e08e9a895c4d10fd30c04d9 Merge: 828f5602978c a1706a1c5062 Author: Marc Zyngier Date: Sun Jul 10 09:51:20 2022 +0100 Merge branch irq/plic-masking into irq/irqchip-next * irq/plic-masking: : . : SiFive PLIC optimisations from Samuel Holland: : : "This series removes the spinlocks and cpumask operations from the PLIC : driver's hot path. As far as I know, using the priority to mask : interrupts is an intended usage and will work on all existing : implementations. [...]" : . irqchip/sifive-plic: Separate the enable and mask operations irqchip/sifive-plic: Make better use of the effective affinity mask PCI: hv: Take a const cpumask in hv_compose_msi_req_get_cpu() genirq: Provide an IRQ affinity mask in non-SMP configs genirq: Return a const cpumask from irq_data_get_affinity_mask genirq: Add and use an irq_data_update_affinity helper genirq: Refactor accessors to use irq_data_get_affinity_mask genirq: Drop redundant irq_init_effective_affinity genirq: GENERIC_IRQ_EFFECTIVE_AFF_MASK depends on SMP genirq: GENERIC_IRQ_IPI depends on SMP irqchip/mips-gic: Only register IPI domain when SMP is enabled Signed-off-by: Marc Zyngier commit a1706a1c5062e0908528170f853601ed53f428c8 Author: Samuel Holland Date: Fri Jul 1 15:24:40 2022 -0500 irqchip/sifive-plic: Separate the enable and mask operations The PLIC has two per-IRQ checks before sending an IRQ to a hart context. First, it checks that the IRQ's priority is nonzero. Then, it checks that the enable bit is set for that combination of IRQ and context. Currently, the PLIC driver sets both the priority value and the enable bit in its (un)mask operations. However, modifying the enable bit is problematic for two reasons: 1) The enable bits are packed, so changes are not atomic and require taking a spinlock. 2) The following requirement from the PLIC spec, which explains the racy (un)mask operations in plic_irq_eoi(): If the completion ID does not match an interrupt source that is currently enabled for the target, the completion is silently ignored. Both of these problems are solved by using the priority value to mask IRQs. Each IRQ has a separate priority register, so writing the priority value is atomic. And since the enable bit remains set while an IRQ is masked, the EOI operation works normally. The enable bits are still used to control the IRQ's affinity. Signed-off-by: Samuel Holland Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220701202440.59059-3-samuel@sholland.org drivers/irqchip/irq-sifive-plic.c | 55 ++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 21 deletions(-) commit de078949218242d57f791b63fac87cdb09cb0424 Author: Samuel Holland Date: Fri Jul 1 15:24:39 2022 -0500 irqchip/sifive-plic: Make better use of the effective affinity mask The PLIC driver already updates the effective affinity mask in its .irq_set_affinity callback. Take advantage of that information to only touch bits (and take spinlocks) for the specific relevant hart contexts. First, make sure the effective affinity mask is set before IRQ startup. Then, since this mask already takes priv->lmask into account, checking that mask later is no longer needed (and handler->present is equivalent to the bit being set in priv->lmask). Finally, when (un)masking or changing affinity, only clear/set the enable bits in the specific old/new context(s). The cpumask operations in plic_irq_unmask() are not needed because they duplicate the code in plic_set_affinity(). Signed-off-by: Samuel Holland Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220701202440.59059-2-samuel@sholland.org drivers/irqchip/Kconfig | 1 + drivers/irqchip/irq-sifive-plic.c | 27 +++++++++------------------ 2 files changed, 10 insertions(+), 18 deletions(-) commit 4f4b8f8f95f2f4055a7725283ba144a16e05f2bb Merge: ee4aae577721 9167fd5d5549 Author: Marc Zyngier Date: Sun Jul 10 09:49:44 2022 +0100 Merge branch irq/affinity-nosmp into irq/plic-masking * irq/affinity-nosmp: : . : non-SMP IRQ affinity fixes courtesy of Samuel Holland: : : "This series solves some inconsistency with how IRQ affinity masks are : handled between SMP and non-SMP configurations. : : In non-SMP configs, an IRQ's true affinity is always cpumask_of(0), so : irq_{,data_}get_affinity_mask now return that, instead of returning an : uninitialized per-IRQ cpumask. This change makes iterating over the : affinity mask do the right thing in both SMP and non-SMP configurations. : : To accomplish that: : - patches 1-3 disable some library code that was broken anyway on !SMP : - patches 4-7 refactor the code so that irq_{,data_}get_affinity_mask : can return a const cpumask, since that is what cpumask_of provides : - patch 8 drops the per-IRQ cpumask and replaces it with cpumask_of(0)" : . PCI: hv: Take a const cpumask in hv_compose_msi_req_get_cpu() genirq: Provide an IRQ affinity mask in non-SMP configs genirq: Return a const cpumask from irq_data_get_affinity_mask genirq: Add and use an irq_data_update_affinity helper genirq: Refactor accessors to use irq_data_get_affinity_mask genirq: Drop redundant irq_init_effective_affinity genirq: GENERIC_IRQ_EFFECTIVE_AFF_MASK depends on SMP genirq: GENERIC_IRQ_IPI depends on SMP irqchip/mips-gic: Only register IPI domain when SMP is enabled Signed-off-by: Marc Zyngier commit 828f5602978c3828c2d8a5f0c81b33e4b270f670 Merge: ee4aae577721 c297493336b7 Author: Marc Zyngier Date: Sun Jul 10 09:48:26 2022 +0100 Merge branch irq/stm32-exti-updates into irq/irqchip-next * irq/stm32-exti-updates: : . : stm32-exti updates courtesy of Antonio Borneo: : : "This series address some code fix for irq-stm32-exti driver and : simplifies the table that remaps the interrupts from exti to gic." : : Also comes with an additional change to irq_chip_request_resources_parent(), : making it possible to omit the callback in hierarchies. : . irqchip/stm32-exti: Simplify irq description table irqchip/stm32-exti: Read event trigger type from event_trg register irqchip/stm32-exti: Tag emr register as undefined for stm32mp15 irqchip/stm32-exti: Prevent illegal read due to unbounded DT value irqchip/stm32-exti: Fix irq_mask/irq_unmask for direct events irqchip/stm32-exti: Fix irq_set_affinity return value genirq: Don't return error on missing optional irq_request_resources() Signed-off-by: Marc Zyngier commit db2e5f21a48edf1d1110d348add54bf22050643b Author: Lad Prabhakar Date: Thu Jul 7 19:23:14 2022 +0100 pinctrl: renesas: pinctrl-rzg2l: Add IRQ domain to handle GPIO interrupt Add IRQ domain to RZ/G2L pinctrl driver to handle GPIO interrupt. GPIO0-GPIO122 pins can be used as IRQ lines but only 32 pins can be used as IRQ lines at a given time. Selection of pins as IRQ lines is handled by IA55 (which is the IRQC block) which sits in between the GPIO and GIC. Signed-off-by: Lad Prabhakar Reviewed-by: Linus Walleij Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220707182314.66610-7-prabhakar.mahadev-lad.rj@bp.renesas.com drivers/pinctrl/renesas/pinctrl-rzg2l.c | 233 ++++++++++++++++++++++++++++++++ 1 file changed, 233 insertions(+) commit 35c37efd12733d8ddbdc11ab9c8dbcee472a487f Author: Lad Prabhakar Date: Thu Jul 7 19:23:13 2022 +0100 dt-bindings: pinctrl: renesas,rzg2l-pinctrl: Document the properties to handle GPIO IRQ Document the required properties to handle GPIO IRQ. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220707182314.66610-6-prabhakar.mahadev-lad.rj@bp.renesas.com .../bindings/pinctrl/renesas,rzg2l-pinctrl.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 08f12b4534c274c67245019021961206e7a3eefa Author: Lad Prabhakar Date: Thu Jul 7 19:23:12 2022 +0100 gpio: gpiolib: Allow free() callback to be overridden Allow free() callback to be overridden from irq_domain_ops for hierarchical chips. This allows drivers to free up resources which are allocated during child_to_parent_hwirq()/populate_parent_alloc_arg() callbacks. On Renesas RZ/G2L platform a bitmap is maintained for TINT slots, a slot is allocated in child_to_parent_hwirq() callback which is freed up in free callback hence this override. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Bartosz Golaszewski Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220707182314.66610-5-prabhakar.mahadev-lad.rj@bp.renesas.com drivers/gpio/gpiolib.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 3fed09559cd8be79568d368ce02bf7f2d56259b6 Author: Lad Prabhakar Date: Thu Jul 7 19:23:11 2022 +0100 irqchip: Add RZ/G2L IA55 Interrupt Controller driver Add a driver for the Renesas RZ/G2L Interrupt Controller. This supports external pins being used as interrupts. It supports one line for NMI, 8 external pins and 32 GPIO pins (out of 123) to be used as IRQ lines. Signed-off-by: Lad Prabhakar Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220707182314.66610-4-prabhakar.mahadev-lad.rj@bp.renesas.com drivers/irqchip/Kconfig | 8 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-renesas-rzg2l.c | 393 ++++++++++++++++++++++++++++++++++++ 3 files changed, 402 insertions(+) commit 96fed779d3d4cb3c221bb70e94de59b8dec0abfc Author: Lad Prabhakar Date: Thu Jul 7 19:23:10 2022 +0100 dt-bindings: interrupt-controller: Add Renesas RZ/G2L Interrupt Controller Add DT bindings for the Renesas RZ/G2L Interrupt Controller. Signed-off-by: Lad Prabhakar Reviewed-by: Rob Herring Reviewed-by: Geert Uytterhoeven Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220707182314.66610-3-prabhakar.mahadev-lad.rj@bp.renesas.com .../interrupt-controller/renesas,rzg2l-irqc.yaml | 133 +++++++++++++++++++++ 1 file changed, 133 insertions(+) commit 91a29af413def677495e447fb9a06957ebc8bed5 Author: Marc Zyngier Date: Thu Jul 7 19:23:09 2022 +0100 gpio: Remove dynamic allocation from populate_parent_alloc_arg() The gpiolib is unique in the way it uses intermediate fwspecs when feeding an interrupt specifier to the parent domain, as it relies on the populate_parent_alloc_arg() callback to perform a dynamic allocation. This is pretty inefficient (we free the structure almost immediately), and the only reason this isn't a stack allocation is that our ThunderX friend uses MSIs rather than a FW-constructed structure. Let's solve it by providing a new type composed of the union of a struct irq_fwspec and a msi_info_t, which satisfies both requirements. This allows us to use a stack allocation, and we can move the handful of users to this new scheme. Also perform some additional cleanup, such as getting rid of the stub versions of the irq_domain_translate_*cell helpers, which are never used when CONFIG_IRQ_DOMAIN_HIERARCHY isn't selected. Tested on a Tegra186. Reviewed-by: Linus Walleij Signed-off-by: Marc Zyngier Cc: Daniel Palmer Cc: Romain Perier Cc: Bartosz Golaszewski Cc: Thierry Reding Cc: Jonathan Hunter Cc: Robert Richter Cc: Nobuhiro Iwamatsu Cc: Andy Gross Cc: Bjorn Andersson Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20220707182314.66610-2-prabhakar.mahadev-lad.rj@bp.renesas.com drivers/gpio/gpio-msc313.c | 15 +++++------- drivers/gpio/gpio-tegra.c | 15 +++++------- drivers/gpio/gpio-tegra186.c | 15 +++++------- drivers/gpio/gpio-thunderx.c | 15 +++++------- drivers/gpio/gpio-visconti.c | 15 +++++------- drivers/gpio/gpiolib.c | 42 ++++++++++++++------------------ drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 15 +++++------- include/linux/gpio/driver.h | 42 +++++++++++++++----------------- 8 files changed, 73 insertions(+), 101 deletions(-) commit 86677a4e71070ffa4ee476ea119cd61d254a7af4 Author: Dan Williams Date: Tue Jun 21 17:23:16 2022 -0700 cxl/Documentation: List attribute permissions Clarify the access permission of CXL sysfs attributes in the documentation to help development of userspace tooling. Reported-by: Alison Schofield Reviewed-by: Alison Schofield Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165603881198.551046.12893348287451903699.stgit@dwillia2-xfh Signed-off-by: Dan Williams Documentation/ABI/testing/sysfs-bus-cxl | 81 +++++++++++++++++---------------- 1 file changed, 41 insertions(+), 40 deletions(-) commit 14e473e1a7a97d1188f7fabd87c452b44f9801af Author: Ben Widawsky Date: Tue Apr 12 22:18:09 2022 -0700 cxl/hdm: Require all decoders to be enumerated In preparation for region provisioning all device decoders need to be enumerated since DPA allocations are calculated by summing the capacities of all decoders in a set. I.e. the programming for decoder[N] depends on the state of decoder[N-1], so skipping over decoders that fail to initialize prevents accurate DPA accounting. Signed-off-by: Ben Widawsky [djbw: reword changelog] Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165603879664.551046.6863805202478861026.stgit@dwillia2-xfh Signed-off-by: Dan Williams drivers/cxl/core/hdm.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit d3b75029f353c64e1e0e45ba5083cf8679d17f0a Author: Dan Williams Date: Sat May 21 15:35:29 2022 -0700 cxl/mem: Convert partition-info to resources To date the per-device-partition DPA range information has only been used for enumeration purposes. In preparation for allocating regions from available DPA capacity, convert those ranges into DPA-type resource trees. With resources and the new add_dpa_res() helper some open coded end address calculations and debug prints can be cleaned. The 'cxlds->pmem_res' and 'cxlds->ram_res' resources are child resources of the total-device DPA space and they in turn will host DPA allocations from cxl_endpoint_decoder instances (tracked by cxled->dpa_res). Cc: Ira Weiny Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165603878921.551046.8127845916514734142.stgit@dwillia2-xfh Signed-off-by: Dan Williams drivers/cxl/core/mbox.c | 78 +++++++++++++++++++++++++------------------- drivers/cxl/core/memdev.c | 4 +-- drivers/cxl/cxlmem.h | 10 +++--- drivers/cxl/pci.c | 2 +- tools/testing/cxl/test/mem.c | 2 +- 5 files changed, 55 insertions(+), 41 deletions(-) commit 419af595b11891d632a31440b9ca5a3cdf93996d Author: Dan Williams Date: Sun May 22 17:04:27 2022 -0700 cxl: Introduce cxl_to_{ways,granularity} Interleave granularity and ways have CXL specification defined encodings. Promote the conversion helpers to a common header, and use them to replace other open-coded instances. Force caller to consider the error case of the conversion similarly to other conversion helpers like kstrto*(). Co-developed-by: Ben Widawsky Signed-off-by: Ben Widawsky Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165603875016.551046.17236943065932132355.stgit@dwillia2-xfh Signed-off-by: Dan Williams drivers/cxl/acpi.c | 34 +++++++++++++++++++--------------- drivers/cxl/core/hdm.c | 35 +++++++++-------------------------- drivers/cxl/cxl.h | 26 ++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 41 deletions(-) commit 885d3bed6de153bfeba40e4d25cc600bef8af1b8 Author: Dan Williams Date: Wed May 18 21:38:29 2022 -0700 cxl/core: Drop is_cxl_decoder() This helper was only used to identify the object type for lockdep purposes. Now that lockdep support is done with explicit lock classes, this helper can be dropped. Reviewed-by: Alison Schofield Reviewed-by: Jonathan Cameron Reviewed-by: Adam Manzanares Link: https://lore.kernel.org/r/165603874340.551046.15491766127759244728.stgit@dwillia2-xfh Signed-off-by: Dan Williams drivers/cxl/core/port.c | 6 ------ drivers/cxl/cxl.h | 1 - 2 files changed, 7 deletions(-) commit e50fe01e1f2a4aba2275edee7d5c77ac87674ddb Author: Dan Williams Date: Wed May 18 18:02:39 2022 -0700 cxl/core: Drop ->platform_res attribute for root decoders Root decoders are responsible for hosting the available host address space for endpoints and regions to claim. The tracking of that available capacity can be done in iomem_resource directly. As a result, root decoders no longer need to host their own resource tree. The current ->platform_res attribute was added prematurely. Otherwise, ->hpa_range fills the role of conveying the current decode range of the decoder. Reviewed-by: Jonathan Cameron Reviewed-by: Adam Manzanares Link: https://lore.kernel.org/r/165603873619.551046.791596854070136223.stgit@dwillia2-xfh Signed-off-by: Dan Williams drivers/cxl/acpi.c | 17 ++++++++++------- drivers/cxl/core/pci.c | 8 +------- drivers/cxl/core/port.c | 28 ++++++---------------------- drivers/cxl/cxl.h | 6 +----- 4 files changed, 18 insertions(+), 41 deletions(-) commit e8b7ea58abbd2335734e67cccbd992e4735366bd Author: Dan Williams Date: Wed May 18 17:55:13 2022 -0700 cxl/core: Rename ->decoder_range ->hpa_range In preparation for growing a ->dpa_range attribute for endpoint decoders, rename the current ->decoder_range to the more descriptive ->hpa_range. Reviewed-by: Alison Schofield Reviewed-by: Jonathan Cameron Reviewed-by: Adam Manzanares Link: https://lore.kernel.org/r/165603872867.551046.2170426227407458814.stgit@dwillia2-xfh Signed-off-by: Dan Williams drivers/cxl/core/hdm.c | 2 +- drivers/cxl/core/port.c | 4 ++-- drivers/cxl/cxl.h | 4 ++-- tools/testing/cxl/test/cxl.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit 04ed37a2baf957620970b4049b0390089da5ec17 Author: Ben Widawsky Date: Thu Apr 28 11:15:40 2022 -0700 cxl/hdm: Use local hdm variable Save a few characters and use the already initialized local variable. Signed-off-by: Ben Widawsky Reviewed-by: Jonathan Cameron Reviewed-by: Alison Schofield Reviewed-by: Adam Manzanares Link: https://lore.kernel.org/r/165603872171.551046.913207574344536475.stgit@dwillia2-xfh Signed-off-by: Dan Williams drivers/cxl/core/hdm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 04131ae29b2d9879ad2357e2b20a5de4dfee89cb Merge: 6011c7e9c0d0 36611d28f513 Author: Linus Walleij Date: Sun Jul 10 01:10:14 2022 +0200 Merge tag 'renesas-pinctrl-for-v5.20-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v5.20 (take two) - Add support for the RZ/V2M and R-Car V4H SoCs, - Miscellaneous fixes and improvements. commit 6011c7e9c0d0105767ac40451d490abe1b768184 Author: Basavaraj Natikar Date: Mon Jun 13 12:11:27 2022 +0530 pinctrl: amd: Remove contact information Remove contact information. Signed-off-by: Basavaraj Natikar Link: https://lore.kernel.org/r/20220613064127.220416-4-Basavaraj.Natikar@amd.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 2 -- 1 file changed, 2 deletions(-) commit b8c824a869f220c6b46df724f85794349bafbf23 Author: Basavaraj Natikar Date: Mon Jun 13 12:11:26 2022 +0530 pinctrl: amd: Don't save/restore interrupt status and wake status bits Saving/restoring interrupt and wake status bits across suspend can cause the suspend to fail if an IRQ is serviced across the suspend cycle. Signed-off-by: Mario Limonciello Signed-off-by: Basavaraj Natikar Fixes: 79d2c8bede2c ("pinctrl/amd: save pin registers over suspend/resume") Link: https://lore.kernel.org/r/20220613064127.220416-3-Basavaraj.Natikar@amd.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 21793d228ca2caefa8b93a0fc8e92815a46b1a43 Author: Basavaraj Natikar Date: Mon Jun 13 12:11:25 2022 +0530 pinctrl: amd: Use devm_platform_get_and_ioremap_resource Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Basavaraj Natikar Link: https://lore.kernel.org/r/20220613064127.220416-2-Basavaraj.Natikar@amd.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 5495d1636b93ad9e5471f74a94487964c99f8b08 Merge: 7542766e78fc 25097de7b236 Author: Linus Walleij Date: Sun Jul 10 01:07:08 2022 +0200 Merge tag 'intel-pinctrl-v5.20-1' of gitolite.kernel.org:pub/scm/linux/kernel/git/pinctrl/intel into devel intel-pinctrl for v5.20-1 * Update MAINTAINERS to set the Intel pin control status to Supported * Switch Intel pin control drivers to use struct pingroup The following is an automated git shortlog grouped by driver: baytrail: - Switch to to embedded struct pingroup cherryview: - Switch to to embedded struct pingroup intel: - Add Intel Meteor Lake pin controller support - Drop no more used members of struct intel_pingroup - Switch to to embedded struct pingroup - Embed struct pingroup into struct intel_pingroup lynxpoint: - Switch to to embedded struct pingroup MAINTAINERS: - Update Intel pin control to Supported Merge branch 'ib-v5.20-amd-pinctrl': - Merge branch 'ib-v5.20-amd-pinctrl' merrifield: - Switch to to embedded struct pingroup commit 7542766e78fc374d81d8c2db214c4b4308645277 Author: Robert Marko Date: Fri Jun 24 21:51:12 2022 +0200 pinctrl: qcom: spmi-gpio: make the irqchip immutable Commit 6c846d026d49 ("gpio: Don't fiddle with irqchips marked as immutable") added a warning to indicate if the gpiolib is altering the internals of irqchips. Following this change the following warning is now observed for the SPMI PMIC pinctrl driver: gpio gpiochip1: (200f000.spmi:pmic@0:gpio@c000): not an immutable chip, please consider fixing it! Fix this by making the irqchip in the SPMI PMIC pinctrl driver immutable. Signed-off-by: Robert Marko Reviewed-by: Manivannan Sadhasivam Tested-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20220624195112.894916-1-robimarko@gmail.com Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit e45d7cb2356e6b59fe64da28324025cc6fcd3fbd Author: Darrick J. Wong Date: Sat Jul 9 10:56:06 2022 -0700 xfs: use XFS_IFORK_Q to determine the presence of an xattr fork Modify xfs_ifork_ptr to return a NULL pointer if the caller asks for the attribute fork but i_forkoff is zero. This eliminates the ambiguity between i_forkoff and i_af.if_present, which should make it easier to understand the lifetime of attr forks. While we're at it, remove the if_present checks around calls to xfs_idestroy_fork and xfs_ifork_zap_attr since they can both handle attr forks that have already been torn down. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_attr.c | 2 -- fs/xfs/libxfs/xfs_attr.h | 2 +- fs/xfs/libxfs/xfs_bmap.c | 1 - fs/xfs/libxfs/xfs_inode_buf.c | 1 - fs/xfs/libxfs/xfs_inode_fork.c | 7 +------ fs/xfs/libxfs/xfs_inode_fork.h | 1 - fs/xfs/xfs_attr_inactive.c | 11 ++++------- fs/xfs/xfs_attr_list.c | 1 - fs/xfs/xfs_icache.c | 8 +++----- fs/xfs/xfs_inode.c | 5 ++--- fs/xfs/xfs_inode.h | 2 +- 11 files changed, 12 insertions(+), 29 deletions(-) commit 2ed5b09b3e8fc274ae8fecd6ab7c5106a364bed1 Author: Darrick J. Wong Date: Sat Jul 9 10:56:06 2022 -0700 xfs: make inode attribute forks a permanent part of struct xfs_inode Syzkaller reported a UAF bug a while back: ================================================================== BUG: KASAN: use-after-free in xfs_ilock_attr_map_shared+0xe3/0xf6 fs/xfs/xfs_inode.c:127 Read of size 4 at addr ffff88802cec919c by task syz-executor262/2958 CPU: 2 PID: 2958 Comm: syz-executor262 Not tainted 5.15.0-0.30.3-20220406_1406 #3 Hardware name: Red Hat KVM, BIOS 1.13.0-2.module+el8.3.0+7860+a7792d29 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x82/0xa9 lib/dump_stack.c:106 print_address_description.constprop.9+0x21/0x2d5 mm/kasan/report.c:256 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold.14+0x7f/0x11b mm/kasan/report.c:459 xfs_ilock_attr_map_shared+0xe3/0xf6 fs/xfs/xfs_inode.c:127 xfs_attr_get+0x378/0x4c2 fs/xfs/libxfs/xfs_attr.c:159 xfs_xattr_get+0xe3/0x150 fs/xfs/xfs_xattr.c:36 __vfs_getxattr+0xdf/0x13d fs/xattr.c:399 cap_inode_need_killpriv+0x41/0x5d security/commoncap.c:300 security_inode_need_killpriv+0x4c/0x97 security/security.c:1408 dentry_needs_remove_privs.part.28+0x21/0x63 fs/inode.c:1912 dentry_needs_remove_privs+0x80/0x9e fs/inode.c:1908 do_truncate+0xc3/0x1e0 fs/open.c:56 handle_truncate fs/namei.c:3084 [inline] do_open fs/namei.c:3432 [inline] path_openat+0x30ab/0x396d fs/namei.c:3561 do_filp_open+0x1c4/0x290 fs/namei.c:3588 do_sys_openat2+0x60d/0x98c fs/open.c:1212 do_sys_open+0xcf/0x13c fs/open.c:1228 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3a/0x7e arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0x0 RIP: 0033:0x7f7ef4bb753d 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 1b 79 2c 00 f7 d8 64 89 01 48 RSP: 002b:00007f7ef52c2ed8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 0000000000404148 RCX: 00007f7ef4bb753d RDX: 00007f7ef4bb753d RSI: 0000000000000000 RDI: 0000000020004fc0 RBP: 0000000000404140 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0030656c69662f2e R13: 00007ffd794db37f R14: 00007ffd794db470 R15: 00007f7ef52c2fc0 Allocated by task 2953: kasan_save_stack+0x19/0x38 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0x68/0x7c mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:3213 [inline] slab_alloc mm/slub.c:3221 [inline] kmem_cache_alloc+0x11b/0x3eb mm/slub.c:3226 kmem_cache_zalloc include/linux/slab.h:711 [inline] xfs_ifork_alloc+0x25/0xa2 fs/xfs/libxfs/xfs_inode_fork.c:287 xfs_bmap_add_attrfork+0x3f2/0x9b1 fs/xfs/libxfs/xfs_bmap.c:1098 xfs_attr_set+0xe38/0x12a7 fs/xfs/libxfs/xfs_attr.c:746 xfs_xattr_set+0xeb/0x1a9 fs/xfs/xfs_xattr.c:59 __vfs_setxattr+0x11b/0x177 fs/xattr.c:180 __vfs_setxattr_noperm+0x128/0x5e0 fs/xattr.c:214 __vfs_setxattr_locked+0x1d4/0x258 fs/xattr.c:275 vfs_setxattr+0x154/0x33d fs/xattr.c:301 setxattr+0x216/0x29f fs/xattr.c:575 __do_sys_fsetxattr fs/xattr.c:632 [inline] __se_sys_fsetxattr fs/xattr.c:621 [inline] __x64_sys_fsetxattr+0x243/0x2fe fs/xattr.c:621 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3a/0x7e arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0x0 Freed by task 2949: kasan_save_stack+0x19/0x38 mm/kasan/common.c:38 kasan_set_track+0x1c/0x21 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:360 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free mm/kasan/common.c:328 [inline] __kasan_slab_free+0xe2/0x10e mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1700 [inline] slab_free_freelist_hook mm/slub.c:1726 [inline] slab_free mm/slub.c:3492 [inline] kmem_cache_free+0xdc/0x3ce mm/slub.c:3508 xfs_attr_fork_remove+0x8d/0x132 fs/xfs/libxfs/xfs_attr_leaf.c:773 xfs_attr_sf_removename+0x5dd/0x6cb fs/xfs/libxfs/xfs_attr_leaf.c:822 xfs_attr_remove_iter+0x68c/0x805 fs/xfs/libxfs/xfs_attr.c:1413 xfs_attr_remove_args+0xb1/0x10d fs/xfs/libxfs/xfs_attr.c:684 xfs_attr_set+0xf1e/0x12a7 fs/xfs/libxfs/xfs_attr.c:802 xfs_xattr_set+0xeb/0x1a9 fs/xfs/xfs_xattr.c:59 __vfs_removexattr+0x106/0x16a fs/xattr.c:468 cap_inode_killpriv+0x24/0x47 security/commoncap.c:324 security_inode_killpriv+0x54/0xa1 security/security.c:1414 setattr_prepare+0x1a6/0x897 fs/attr.c:146 xfs_vn_change_ok+0x111/0x15e fs/xfs/xfs_iops.c:682 xfs_vn_setattr_size+0x5f/0x15a fs/xfs/xfs_iops.c:1065 xfs_vn_setattr+0x125/0x2ad fs/xfs/xfs_iops.c:1093 notify_change+0xae5/0x10a1 fs/attr.c:410 do_truncate+0x134/0x1e0 fs/open.c:64 handle_truncate fs/namei.c:3084 [inline] do_open fs/namei.c:3432 [inline] path_openat+0x30ab/0x396d fs/namei.c:3561 do_filp_open+0x1c4/0x290 fs/namei.c:3588 do_sys_openat2+0x60d/0x98c fs/open.c:1212 do_sys_open+0xcf/0x13c fs/open.c:1228 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3a/0x7e arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0x0 The buggy address belongs to the object at ffff88802cec9188 which belongs to the cache xfs_ifork of size 40 The buggy address is located 20 bytes inside of 40-byte region [ffff88802cec9188, ffff88802cec91b0) The buggy address belongs to the page: page:00000000c3af36a1 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2cec9 flags: 0xfffffc0000200(slab|node=0|zone=1|lastcpupid=0x1fffff) raw: 000fffffc0000200 ffffea00009d2580 0000000600000006 ffff88801a9ffc80 raw: 0000000000000000 0000000080490049 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88802cec9080: fb fb fb fc fc fa fb fb fb fb fc fc fb fb fb fb ffff88802cec9100: fb fc fc fb fb fb fb fb fc fc fb fb fb fb fb fc >ffff88802cec9180: fc fa fb fb fb fb fc fc fa fb fb fb fb fc fc fb ^ ffff88802cec9200: fb fb fb fb fc fc fb fb fb fb fb fc fc fb fb fb ffff88802cec9280: fb fb fc fc fa fb fb fb fb fc fc fa fb fb fb fb ================================================================== The root cause of this bug is the unlocked access to xfs_inode.i_afp from the getxattr code paths while trying to determine which ILOCK mode to use to stabilize the xattr data. Unfortunately, the VFS does not acquire i_rwsem when vfs_getxattr (or listxattr) call into the filesystem, which means that getxattr can race with a removexattr that's tearing down the attr fork and crash: xfs_attr_set: xfs_attr_get: xfs_attr_fork_remove: xfs_ilock_attr_map_shared: xfs_idestroy_fork(ip->i_afp); kmem_cache_free(xfs_ifork_cache, ip->i_afp); if (ip->i_afp && ip->i_afp = NULL; xfs_need_iread_extents(ip->i_afp)) ip->i_forkoff = 0; Regrettably, the VFS is much more lax about i_rwsem and getxattr than is immediately obvious -- not only does it not guarantee that we hold i_rwsem, it actually doesn't guarantee that we *don't* hold it either. The getxattr system call won't acquire the lock before calling XFS, but the file capabilities code calls getxattr with and without i_rwsem held to determine if the "security.capabilities" xattr is set on the file. Fixing the VFS locking requires a treewide investigation into every code path that could touch an xattr and what i_rwsem state it expects or sets up. That could take years or even prove impossible; fortunately, we can fix this UAF problem inside XFS. An earlier version of this patch used smp_wmb in xfs_attr_fork_remove to ensure that i_forkoff is always zeroed before i_afp is set to null and changed the read paths to use smp_rmb before accessing i_forkoff and i_afp, which avoided these UAF problems. However, the patch author was too busy dealing with other problems in the meantime, and by the time he came back to this issue, the situation had changed a bit. On a modern system with selinux, each inode will always have at least one xattr for the selinux label, so it doesn't make much sense to keep incurring the extra pointer dereference. Furthermore, Allison's upcoming parent pointer patchset will also cause nearly every inode in the filesystem to have extended attributes. Therefore, make the inode attribute fork structure part of struct xfs_inode, at a cost of 40 more bytes. This patch adds a clunky if_present field where necessary to maintain the existing logic of xattr fork null pointer testing in the existing codebase. The next patch switches the logic over to XFS_IFORK_Q and it all goes away. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_attr.c | 16 +++++++------- fs/xfs/libxfs/xfs_attr.h | 10 ++++----- fs/xfs/libxfs/xfs_attr_leaf.c | 25 ++++++++++----------- fs/xfs/libxfs/xfs_bmap.c | 4 ++-- fs/xfs/libxfs/xfs_inode_buf.c | 8 +++---- fs/xfs/libxfs/xfs_inode_fork.c | 44 +++++++++++++++++++++++-------------- fs/xfs/libxfs/xfs_inode_fork.h | 6 +++-- fs/xfs/xfs_attr_inactive.c | 9 ++++---- fs/xfs/xfs_attr_list.c | 10 ++++----- fs/xfs/xfs_bmap_util.c | 8 +++---- fs/xfs/xfs_icache.c | 10 +++++---- fs/xfs/xfs_inode.c | 13 ++++++----- fs/xfs/xfs_inode.h | 6 +++-- fs/xfs/xfs_inode_item.c | 50 +++++++++++++++++++++--------------------- fs/xfs/xfs_iomap.c | 4 ++-- fs/xfs/xfs_itable.c | 2 +- 16 files changed, 121 insertions(+), 104 deletions(-) commit 732436ef916b4f338d672ea56accfdb11e8d0732 Author: Darrick J. Wong Date: Sat Jul 9 10:56:05 2022 -0700 xfs: convert XFS_IFORK_PTR to a static inline helper We're about to make this logic do a bit more, so convert the macro to a static inline function for better typechecking and fewer shouty macros. No functional changes here. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_attr_leaf.c | 2 +- fs/xfs/libxfs/xfs_bmap.c | 68 +++++++++++++++++++------------------- fs/xfs/libxfs/xfs_bmap_btree.c | 8 ++--- fs/xfs/libxfs/xfs_btree.c | 4 +-- fs/xfs/libxfs/xfs_dir2_block.c | 2 +- fs/xfs/libxfs/xfs_dir2_sf.c | 2 +- fs/xfs/libxfs/xfs_inode_fork.c | 16 ++++----- fs/xfs/libxfs/xfs_inode_fork.h | 6 ---- fs/xfs/libxfs/xfs_symlink_remote.c | 2 +- fs/xfs/scrub/bmap.c | 14 ++++---- fs/xfs/scrub/dabtree.c | 2 +- fs/xfs/scrub/dir.c | 2 +- fs/xfs/scrub/quota.c | 2 +- fs/xfs/scrub/symlink.c | 2 +- fs/xfs/xfs_bmap_util.c | 4 +-- fs/xfs/xfs_dir2_readdir.c | 2 +- fs/xfs/xfs_icache.c | 2 +- fs/xfs/xfs_inode.c | 6 ++-- fs/xfs/xfs_inode.h | 18 ++++++++++ fs/xfs/xfs_ioctl.c | 2 +- fs/xfs/xfs_iomap.c | 4 +-- fs/xfs/xfs_qm.c | 2 +- fs/xfs/xfs_reflink.c | 6 ++-- 23 files changed, 95 insertions(+), 83 deletions(-) commit e2f76ad7d2859e333609c775fda707f205d93fd8 Author: David Gow Date: Wed Jul 6 18:06:07 2022 +0800 apparmor: test: Remove some casts which are no-longer required With some of the stricter type checking in KUnit's EXPECT macros removed, several casts in policy_unpack_test are no longer required. Remove the unnecessary casts, making the conditions clearer. Reviewed-by: Brendan Higgins Acked-by: John Johansen Signed-off-by: David Gow Signed-off-by: John Johansen security/apparmor/policy_unpack_test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 417ea9fe972d2654a268ad66e89c8fcae67017c3 Author: Xiu Jianfeng Date: Tue Jun 14 17:00:01 2022 +0800 apparmor: Fix memleak in aa_simple_write_to_buffer() When copy_from_user failed, the memory is freed by kvfree. however the management struct and data blob are allocated independently, so only kvfree(data) cause a memleak issue here. Use aa_put_loaddata(data) to fix this issue. Fixes: a6a52579e52b5 ("apparmor: split load data into management struct and data blob") Signed-off-by: Xiu Jianfeng Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11c3627ec6b56c1525013f336f41b79a983b4d46 Author: Xin Xiong Date: Thu Apr 28 11:39:08 2022 +0800 apparmor: fix reference count leak in aa_pivotroot() The aa_pivotroot() function has a reference counting bug in a specific path. When aa_replace_current_label() returns on success, the function forgets to decrement the reference count of “target”, which is increased earlier by build_pivotroot(), causing a reference leak. Fix it by decreasing the refcount of “target” in that path. Fixes: 2ea3ffb7782a ("apparmor: add mount mediation") Co-developed-by: Xiyu Yang Signed-off-by: Xiyu Yang Co-developed-by: Xin Tan Signed-off-by: Xin Tan Signed-off-by: Xin Xiong Signed-off-by: John Johansen security/apparmor/mount.c | 1 + 1 file changed, 1 insertion(+) commit bab1f77fb815374e9d092a72d5a2abc7c943bca3 Author: Yang Li Date: Thu Mar 17 09:03:30 2022 +0800 apparmor: Fix some kernel-doc comments Remove some warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'. security/apparmor/domain.c:137: warning: Function parameter or member 'state' not described in 'label_compound_match' security/apparmor/domain.c:137: warning: Excess function parameter 'start' description in 'label_compound_match' security/apparmor/domain.c:1294: warning: Excess function parameter 'onexec' description in 'aa_change_profile' Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: John Johansen security/apparmor/domain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f9da5b14521cbb57ff45bd8134d3b8320638b1e6 Author: John Johansen Date: Tue Feb 22 02:09:20 2022 -0800 apparmor: Fix undefined reference to `zlib_deflate_workspacesize' IF CONFIG_SECURITY_APPARMOR_EXPORT_BINARY is disabled, there remains some unneed references to zlib, and can result in undefined symbol references if ZLIB_INFLATE or ZLIB_DEFLATE are not defined. Reported-by: kernel test robot Fixes: abfb9c0725f2 ("apparmor: make export of raw binary profile to userspace optional") Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 63 ++++++++++++++++++++------------------- security/apparmor/policy_unpack.c | 8 ++++- 2 files changed, 40 insertions(+), 31 deletions(-) commit 3e2a3a0830a2090e766d0d887d52c67de2a6f323 Author: Tom Rix Date: Sun Feb 13 13:32:28 2022 -0800 apparmor: fix aa_label_asxprint return check Clang static analysis reports this issue label.c:1802:3: warning: 2nd function call argument is an uninitialized value pr_info("%s", str); ^~~~~~~~~~~~~~~~~~ str is set from a successful call to aa_label_asxprint(&str, ...) On failure a negative value is returned, not a -1. So change the check. Fixes: f1bd904175e8 ("apparmor: add the base fns() for domain labels") Signed-off-by: Tom Rix Signed-off-by: John Johansen security/apparmor/label.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 564423bf9c952bcc029b5b03c02e2937cb7a6550 Author: Yang Li Date: Sat Jan 29 10:51:01 2022 +0800 apparmor: Fix some kernel-doc comments Don't use /** for non-kernel-doc comments and change function name aa_mangle_name to mangle_name in kernel-doc comment to Remove some warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'. security/apparmor/apparmorfs.c:1503: warning: Cannot understand * on line 1503 - I thought it was a doc line security/apparmor/apparmorfs.c:1530: warning: Cannot understand * on line 1530 - I thought it was a doc line security/apparmor/apparmorfs.c:1892: warning: Cannot understand * on line 1892 - I thought it was a doc line security/apparmor/apparmorfs.c:108: warning: expecting prototype for aa_mangle_name(). Prototype was for mangle_name() instead Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5ee5d37421601f23f463b062f211b404b0fd6922 Author: Yang Li Date: Sat Jan 29 10:51:00 2022 +0800 apparmor: Fix some kernel-doc comments Add the description of @ns_name, change function name aa_u16_chunck to unpack_u16_chunk and verify_head to verify_header in kernel-doc comment to remove warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'. security/apparmor/policy_unpack.c:224: warning: expecting prototype for aa_u16_chunck(). Prototype was for unpack_u16_chunk() instead security/apparmor/policy_unpack.c:678: warning: Function parameter or member 'ns_name' not described in 'unpack_profile' security/apparmor/policy_unpack.c:950: warning: expecting prototype for verify_head(). Prototype was for verify_header() instead Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e21851b349b8dd0af00fc4d887983a2767eb393c Author: Yang Li Date: Sat Jan 29 10:50:59 2022 +0800 apparmor: Fix match_mnt_path_str() and match_mnt() kernel-doc comment Fix a spelling problem and change @mntpath to @path to remove warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'. security/apparmor/mount.c:321: warning: Function parameter or member 'devname' not described in 'match_mnt_path_str' security/apparmor/mount.c:321: warning: Excess function parameter 'devnme' description in 'match_mnt_path_str' security/apparmor/mount.c:377: warning: Function parameter or member 'path' not described in 'match_mnt' security/apparmor/mount.c:377: warning: Excess function parameter 'mntpath' description in 'match_mnt' Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: John Johansen security/apparmor/mount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c0ea4b919daed7333ebc0d630adc262eb0a0d8c1 Author: Gustavo A. R. Silva Date: Mon Jan 24 19:56:06 2022 -0600 apparmor: Use struct_size() helper in kmalloc() Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows that, in the worst scenario, could lead to heap overflows. Also, address the following sparse warnings: security/apparmor/lib.c:139:23: warning: using sizeof on a flexible structure Link: https://github.com/KSPP/linux/issues/174 Signed-off-by: Gustavo A. R. Silva Signed-off-by: John Johansen security/apparmor/lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec240b5905bbb09a03dccffee03062cf39e38dc2 Author: John Johansen Date: Tue Jan 25 00:37:42 2022 -0800 apparmor: Fix failed mount permission check error message When the mount check fails due to a permission check failure instead of explicitly at one of the subcomponent checks, AppArmor is reporting a failure in the flags match. However this is not true and AppArmor can not attribute the error at this point to any particular component, and should only indicate the mount failed due to missing permissions. Fixes: 2ea3ffb7782a ("apparmor: add mount mediation") Signed-off-by: John Johansen security/apparmor/mount.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 84117994bc103617787147b8538a5c021b2ca79f Author: Minghao Chi Date: Wed Jan 12 08:03:56 2022 +0000 security/apparmor: remove redundant ret variable Return value from nf_register_net_hooks() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: CGEL ZTE Signed-off-by: John Johansen security/apparmor/lsm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 68ff8540cc9e4ab557065b3f635c1ff4c96e1f1c Author: John Johansen Date: Thu Apr 29 01:48:28 2021 -0700 apparmor: fix quiet_denied for file rules Global quieting of denied AppArmor generated file events is not handled correctly. Unfortunately the is checking if quieting of all audit events is set instead of just denied events. Fixes: 67012e8209df ("AppArmor: basic auditing infrastructure.") Signed-off-by: John Johansen security/apparmor/audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba77f39062c15d8fc6dcfbf5759747b4de09bfab Author: Mike Salvatore Date: Wed Jul 8 13:04:43 2020 -0400 apparmor: resolve uninitialized symbol warnings in policy_unpack_test.c Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Mike Salvatore Signed-off-by: John Johansen security/apparmor/policy_unpack_test.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 7b4bd1274d350a5d0f64b990877c572fb35ad173 Author: John Johansen Date: Thu Dec 30 23:07:38 2021 -0800 apparmor: Update MAINTAINERS file with the lastest information Update with the latest website, wiki, and gitlab tree information. Signed-off-by: John Johansen MAINTAINERS | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 482e8050aab4ad10bcd64241f1a9b540463b3274 Author: John Johansen Date: Fri Feb 5 04:56:02 2021 -0800 apparmor: don't create raw_sha1 symlink if sha1 hashing is disabled Currently if sha1 hashing of policy is disabled a sha1 hash symlink to the non-existent file is created. There is now reason to create the symlink in this case so don't do it. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 5bfcbd22ee4e6ad5ae698518fadd0f03ea109537 Author: John Johansen Date: Wed Feb 3 01:35:12 2021 -0800 apparmor: Enable tuning of policy paranoid load for embedded systems AppArmor by default does an extensive check on loaded policy that can take quite some time on limited resource systems. Allow disabling this check for embedded systems where system images are readonly and have checksumming making the need for the embedded policy to be fully checked to be redundant. Note: basic policy checks are still done. Signed-off-by: John Johansen security/apparmor/Kconfig | 11 +++++++++++ security/apparmor/lsm.c | 2 +- security/apparmor/policy_unpack.c | 4 +++- 3 files changed, 15 insertions(+), 2 deletions(-) commit d61c57fde81915c04b41982f66a159ccc014e799 Author: John Johansen Date: Mon Feb 1 03:43:18 2021 -0800 apparmor: make export of raw binary profile to userspace optional Embedded systems have limited space and don't need the introspection or checkpoint restore capability provided by exporting the raw profile binary data so make it so make it a config option. This will reduce run time memory use and also speed up policy loads. Signed-off-by: John Johansen security/apparmor/Kconfig | 78 ++++++++++++++++++++++------------ security/apparmor/apparmorfs.c | 11 ++++- security/apparmor/include/apparmor.h | 1 + security/apparmor/include/apparmorfs.h | 14 ++++++ security/apparmor/lsm.c | 6 +++ security/apparmor/policy.c | 33 ++++++++------ security/apparmor/policy_unpack.c | 20 +++++---- 7 files changed, 111 insertions(+), 52 deletions(-) commit 65cc9c391c3c4096ccc47ecd8b9f58f470b57225 Author: John Johansen Date: Mon Feb 1 02:20:35 2021 -0800 apparmor: Update help description of policy hash for introspection Update help to note this option is not needed for small embedded systems where regular policy introspection is not used. Signed-off-by: John Johansen security/apparmor/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0fc6ab404c521b403a73d0ec2410785ce2cf1fb4 Author: Yang Li Date: Fri Dec 10 13:57:12 2021 +0800 lsm: Fix kernel-doc Fix function name in lsm.c kernel-doc comment to remove some warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'. security/apparmor/lsm.c:819: warning: expecting prototype for apparmor_clone_security(). Prototype was for apparmor_sk_clone_security() instead security/apparmor/lsm.c:923: warning: expecting prototype for apparmor_socket_list(). Prototype was for apparmor_socket_listen() instead security/apparmor/lsm.c:1028: warning: expecting prototype for apparmor_getsockopt(). Prototype was for apparmor_socket_getsockopt() instead security/apparmor/lsm.c:1038: warning: expecting prototype for apparmor_setsockopt(). Prototype was for apparmor_socket_setsockopt() instead ecurity/apparmor/lsm.c:1061: warning: expecting prototype for apparmor_socket_sock_recv_skb(). Prototype was for apparmor_socket_sock_rcv_skb() instead Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: John Johansen security/apparmor/lsm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 240516df88795b9740cdc5b6b1fcc847763d46dd Author: Yang Li Date: Wed Nov 17 15:37:58 2021 +0800 apparmor: Fix kernel-doc Fix function name in security/apparmor/label.c, policy.c, procattr.c kernel-doc comment to remove some warnings found by clang(make W=1 LLVM=1). security/apparmor/label.c:499: warning: expecting prototype for aa_label_next_not_in_set(). Prototype was for __aa_label_next_not_in_set() instead security/apparmor/label.c:2147: warning: expecting prototype for __aa_labelset_udate_subtree(). Prototype was for __aa_labelset_update_subtree() instead security/apparmor/policy.c:434: warning: expecting prototype for aa_lookup_profile(). Prototype was for aa_lookupn_profile() instead security/apparmor/procattr.c:101: warning: expecting prototype for aa_setprocattr_chagnehat(). Prototype was for aa_setprocattr_changehat() instead Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: John Johansen security/apparmor/label.c | 4 ++-- security/apparmor/policy.c | 2 +- security/apparmor/procattr.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 511f7b5b835726e844a5fc7444c18e4b8672edfd Author: John Johansen Date: Tue Dec 14 02:59:28 2021 -0800 apparmor: fix absroot causing audited secids to begin with = AppArmor is prefixing secids that are converted to secctx with the = to indicate the secctx should only be parsed from an absolute root POV. This allows catching errors where secctx are reparsed back into internal labels. Unfortunately because audit is using secid to secctx conversion this means that subject and object labels can result in a very unfortunate == that can break audit parsing. eg. the subj==unconfined term in the below audit message type=USER_LOGIN msg=audit(1639443365.233:160): pid=1633 uid=0 auid=1000 ses=3 subj==unconfined msg='op=login id=1000 exe="/usr/sbin/sshd" hostname=192.168.122.1 addr=192.168.122.1 terminal=/dev/pts/1 res=success' Fix this by switch the prepending of = to a _. This still works as a special character to flag this case without breaking audit. Also move this check behind debug as it should not be needed during normal operqation. Fixes: 26b7899510ae ("apparmor: add support for absolute root view based labels") Reported-by: Casey Schaufler Signed-off-by: John Johansen security/apparmor/include/lib.h | 5 +++++ security/apparmor/label.c | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) commit fe80f1ad593c84bf90299496b3f93ab998ba70ad Author: Dan Williams Date: Fri Jun 3 16:43:48 2022 -0700 cxl/port: Keep port->uport valid for the entire life of a port The upcoming region provisioning implementation has a need to dereference port->uport during the port unregister flow. Specifically, endpoint decoders need to be able to lookup their corresponding memdev via port->uport. The existing ->dead flag was added for cases where the core was committed to tearing down the port, but needed to drop locks before calling device_unregister(). Reuse that flag to indicate to delete_endpoint() that it has no "release action" work to do as unregister_port() will handle it. Reviewed-by: Alison Schofield Reviewed-by: Adam Manzanares Link: https://lore.kernel.org/r/165603871491.551046.6682199179541194356.stgit@dwillia2-xfh Signed-off-by: Dan Williams drivers/cxl/core/port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0076cad30135f95bf9a144269906f9b7a4eb542c Merge: 877d4e3cedd1 24bdfdd2ec34 Author: Jakub Kicinski Date: Sat Jul 9 12:24:15 2022 -0700 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2022-07-09 We've added 94 non-merge commits during the last 19 day(s) which contain a total of 125 files changed, 5141 insertions(+), 6701 deletions(-). The main changes are: 1) Add new way for performing BTF type queries to BPF, from Daniel Müller. 2) Add inlining of calls to bpf_loop() helper when its function callback is statically known, from Eduard Zingerman. 3) Implement BPF TCP CC framework usability improvements, from Jörn-Thorben Hinz. 4) Add LSM flavor for attaching per-cgroup BPF programs to existing LSM hooks, from Stanislav Fomichev. 5) Remove all deprecated libbpf APIs in prep for 1.0 release, from Andrii Nakryiko. 6) Add benchmarks around local_storage to BPF selftests, from Dave Marchevsky. 7) AF_XDP sample removal (given move to libxdp) and various improvements around AF_XDP selftests, from Magnus Karlsson & Maciej Fijalkowski. 8) Add bpftool improvements for memcg probing and bash completion, from Quentin Monnet. 9) Add arm64 JIT support for BPF-2-BPF coupled with tail calls, from Jakub Sitnicki. 10) Sockmap optimizations around throughput of UDP transmissions which have been improved by 61%, from Cong Wang. 11) Rework perf's BPF prologue code to remove deprecated functions, from Jiri Olsa. 12) Fix sockmap teardown path to avoid sleepable sk_psock_stop, from John Fastabend. 13) Fix libbpf's cleanup around legacy kprobe/uprobe on error case, from Chuang Wang. 14) Fix libbpf's bpf_helpers.h to work with gcc for the case of its sec/pragma macro, from James Hilliard. 15) Fix libbpf's pt_regs macros for riscv to use a0 for RC register, from Yixun Lan. 16) Fix bpftool to show the name of type BPF_OBJ_LINK, from Yafang Shao. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (94 commits) selftests/bpf: Fix xdp_synproxy build failure if CONFIG_NF_CONNTRACK=m/n bpf: Correctly propagate errors up from bpf_core_composites_match libbpf: Disable SEC pragma macro on GCC bpf: Check attach_func_proto more carefully in check_return_code selftests/bpf: Add test involving restrict type qualifier bpftool: Add support for KIND_RESTRICT to gen min_core_btf command MAINTAINERS: Add entry for AF_XDP selftests files selftests, xsk: Rename AF_XDP testing app bpf, docs: Remove deprecated xsk libbpf APIs description selftests/bpf: Add benchmark for local_storage RCU Tasks Trace usage libbpf, riscv: Use a0 for RC register libbpf: Remove unnecessary usdt_rel_ip assignments selftests/bpf: Fix few more compiler warnings selftests/bpf: Fix bogus uninitialized variable warning bpftool: Remove zlib feature test from Makefile libbpf: Cleanup the legacy uprobe_event on failed add/attach_event() libbpf: Fix wrong variable used in perf_event_uprobe_open_legacy() libbpf: Cleanup the legacy kprobe_event on failed add/attach_event() selftests/bpf: Add type match test against kernel's task_struct selftests/bpf: Add nested type to type based tests ... ==================== Link: https://lore.kernel.org/r/20220708233145.32365-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 2c1e62992981c4d8fe7bc183877aec2a189bd387 Author: Andre Przywara Date: Fri Jul 8 11:52:35 2022 +0100 arm64: dts: allwinner: h616: Add X96 Mate TV box support The X96 Mate is an Allwinner H616 based TV box, featuring: - Four ARM Cortex-A53 cores, Mali-G31 MP2 GPU - 2GiB/4GiB RAM (fully usable!) - 16/32/64GiB eMMC - 100Mbps Ethernet (via embedded AC200 EPHY, not yet supported) - Unsupported Allwinner WiFi chip - 2 x USB 2.0 host ports - HDMI port - IR receiver - 5V/2A DC power supply via barrel plug Add a basic devicetree for it, with SD card and eMMC working, as well as serial and the essential peripherals, like the AXP PMIC. This DT is somewhat minimal, and should work on many other similar TV boxes with the Allwinner H616 chip. Signed-off-by: Andre Przywara Reviewed-by: Samuel Holland Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220708105235.3983266-8-andre.przywara@arm.com arch/arm64/boot/dts/allwinner/Makefile | 1 + .../boot/dts/allwinner/sun50i-h616-x96-mate.dts | 177 +++++++++++++++++++++ 2 files changed, 178 insertions(+) commit 5a378f9f2b15a2aa3b7485e46c3d300103ea384b Author: Andre Przywara Date: Fri Jul 8 11:52:34 2022 +0100 arm64: dts: allwinner: h616: Add OrangePi Zero 2 board support The OrangePi Zero 2 is a development board with the new H616 SoC. It comes with the following features: - Four ARM Cortex-A53 cores, Mali-G31 MP2 GPU - 512MiB/1GiB DDR3 DRAM - AXP305 PMIC - Raspberry-Pi-1 compatible GPIO header - extra 13 pin expansion header, exposing pins for 2x USB 2.0 ports - 1 USB 2.0 host port - 1 USB 2.0 type C port (power supply + OTG) - MicroSD slot - on-board 2MiB bootable SPI NOR flash - 1Gbps Ethernet port (via RTL8211F PHY) - micro-HDMI port - (yet) unsupported Allwinner WiFi/BT chip Add the devicetree file describing the currently supported features. Signed-off-by: Andre Przywara Acked-by: Samuel Holland Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220708105235.3983266-7-andre.przywara@arm.com arch/arm64/boot/dts/allwinner/Makefile | 1 + .../dts/allwinner/sun50i-h616-orangepi-zero2.dts | 213 +++++++++++++++++++++ 2 files changed, 214 insertions(+) commit 7dd91a17b599afd298c1bd7e45cb5c3ee9df9ae1 Author: Andre Przywara Date: Fri Jul 8 11:52:33 2022 +0100 dt-bindings: arm: sunxi: Add two H616 board compatible strings This adds the two board compatible strings of two boards with the Allwinner H616 SoC. One is a development board from OrangePi, the other some TV box from some formerly unused vendor. Add that vendor to the vendor list on the way. Signed-off-by: Andre Przywara Acked-by: Rob Herring Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220708105235.3983266-6-andre.przywara@arm.com Documentation/devicetree/bindings/arm/sunxi.yaml | 10 ++++++++++ Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 2 files changed, 12 insertions(+) commit 4c3caac59807ef4306ee2623b9379e12dc7dcb02 Author: Andre Przywara Date: Fri Jul 8 11:52:32 2022 +0100 dt-bindings: pinctrl: sunxi: allow vcc-pi-supply The Allwinner H616 SoC contains a VCC_PI pin, which supplies the voltage for GPIO port I. Extend the range of supply port names to include vcc-pi-supply to cover that. Signed-off-by: Andre Przywara Acked-by: Rob Herring Acked-by: Samuel Holland Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220708105235.3983266-5-andre.przywara@arm.com .../devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d17c865118881609ea7e381c7cadbb7979cc596 Author: Andre Przywara Date: Fri Jul 8 11:52:31 2022 +0100 arm64: dts: allwinner: Add Allwinner H616 .dtsi file This (relatively) new SoC is similar to the H6, but drops the (broken) PCIe support and the USB 3.0 controller. It also gets the management controller removed, which in turn removes *some*, but not all of the devices formerly dedicated to the ARISC (CPUS). And while there is still the extra sunxi interrupt controller, the package lacks the corresponding NMI pin, so no interrupts for the PMIC. The reserved memory node is actually handled by Trusted Firmware now, but U-Boot fails to propagate this to a separately loaded DTB, so we keep it in here for now, until U-Boot learns to do this properly. Signed-off-by: Andre Przywara Reviewed-by: Samuel Holland Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220708105235.3983266-4-andre.przywara@arm.com arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 591 +++++++++++++++++++++++++ 1 file changed, 591 insertions(+) commit 4eeca34bd992f503260355b936093c19454030c7 Author: Andre Przywara Date: Fri Jul 8 11:52:30 2022 +0100 dt-bindings: pinctrl: sunxi: Make interrupts optional The R_PIO pinctrl device on the Allwinner H616 SoC does not have an interrupt (it features only two pins). However the binding requires at least naming one upstream interrupt, plus the #interrupt-cells and interrupt-controller properties. Drop the unconditional requirement for the interrupt properties, and make them dependent on being not this particular pinctrl device. Signed-off-by: Andre Przywara Reviewed-by: Rob Herring Acked-by: Samuel Holland Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220708105235.3983266-3-andre.przywara@arm.com .../bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 3a1149e59a942bae46c03cf2f01c6e462e7a7b80 Author: Andre Przywara Date: Fri Jul 8 11:52:29 2022 +0100 dt-bindings: arm: sunxi: Add H616 EMAC0 compatible The Allwinner H616 contains an "EMAC0" Ethernet MAC compatible to the A64 version. Add it to the list of compatible strings. Signed-off-by: Andre Przywara Acked-by: Rob Herring Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220708105235.3983266-2-andre.przywara@arm.com Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml | 1 + 1 file changed, 1 insertion(+) commit 0f38063d7a38015a47ca1488406bf21e0effe80e Author: Andrey Strachuk Date: Sat Jul 9 10:56:02 2022 -0700 xfs: removed useless condition in function xfs_attr_node_get At line 1561, variable "state" is being compared with NULL every loop iteration. ------------------------------------------------------------------- 1561 for (i = 0; state != NULL && i < state->path.active; i++) { 1562 xfs_trans_brelse(args->trans, state->path.blk[i].bp); 1563 state->path.blk[i].bp = NULL; 1564 } ------------------------------------------------------------------- However, it cannot be NULL. ---------------------------------------- 1546 state = xfs_da_state_alloc(args); ---------------------------------------- xfs_da_state_alloc calls kmem_cache_zalloc. kmem_cache_zalloc is called with __GFP_NOFAIL flag and, therefore, it cannot return NULL. -------------------------------------------------------------------------- struct xfs_da_state * xfs_da_state_alloc( struct xfs_da_args *args) { struct xfs_da_state *state; state = kmem_cache_zalloc(xfs_da_state_cache, GFP_NOFS | __GFP_NOFAIL); state->args = args; state->mp = args->dp->i_mount; return state; } -------------------------------------------------------------------------- Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Andrey Strachuk Fixes: 4d0cdd2bb8f0 ("xfs: clean up xfs_attr_node_hasname") Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70b589a37e1aba892c1e5d41957b0042f9eb031b Author: Eric Sandeen Date: Sat Jul 9 10:56:02 2022 -0700 xfs: add selinux labels to whiteout inodes We got a report that "renameat2() with flags=RENAME_WHITEOUT doesn't apply an SELinux label on xfs" as it does on other filesystems (for example, ext4 and tmpfs.) While I'm not quite sure how labels may interact w/ whiteout files, leaving them as unlabeled seems inconsistent at best. Now that xfs_init_security is not static, rename it to xfs_inode_init_security per dchinner's suggestion. Signed-off-by: Eric Sandeen Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_inode.c | 14 +++++++++++++- fs/xfs/xfs_iops.c | 11 +++++------ fs/xfs/xfs_iops.h | 3 +++ 3 files changed, 21 insertions(+), 7 deletions(-) commit fddb564f62aa6fd4c96a0c473526e2f86df95f4b Merge: dd81dc05598c 36029dee382a Author: Darrick J. Wong Date: Sat Jul 9 10:55:44 2022 -0700 Merge tag 'xfs-perag-conv-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs into xfs-5.20-mergeA xfs: per-ag conversions for 5.20 This series drives the perag down into the AGI, AGF and AGFL access routines and unifies the perag structure initialisation with the high level AG header read functions. This largely replaces the xfs_mount/agno pair that is passed to all these functions with a perag, and in most places we already have a perag ready to pass in. There are a few places where perags need to be grabbed before reading the AG header buffers - some of these will need to be driven to higher layers to ensure we can run operations on AGs without getting stuck part way through waiting on a perag reference. The latter section of this patchset moves some of the AG geometry information from the xfs_mount to the xfs_perag, and starts converting code that requires geometry validation to use a perag instead of a mount and having to extract the AGNO from the object location. This also allows us to store the AG size in the perag and then we can stop having to compare the agno against sb_agcount to determine if the AG is the last AG and so has a runt size. This greatly simplifies some of the type validity checking we do and substantially reduces the CPU overhead of type validity checking. It also cuts over 1.2kB out of the binary size. Signed-off-by: Dave Chinner Signed-off-by: Darrick J. Wong * tag 'xfs-perag-conv-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: xfs: make is_log_ag() a first class helper xfs: replace xfs_ag_block_count() with perag accesses xfs: Pre-calculate per-AG agino geometry xfs: Pre-calculate per-AG agbno geometry xfs: pass perag to xfs_alloc_read_agfl xfs: pass perag to xfs_alloc_put_freelist xfs: pass perag to xfs_alloc_get_freelist xfs: pass perag to xfs_read_agf xfs: pass perag to xfs_read_agi xfs: pass perag to xfs_alloc_read_agf() xfs: kill xfs_alloc_pagf_init() xfs: pass perag to xfs_ialloc_read_agi() xfs: kill xfs_ialloc_pagi_init() xfs: make last AG grow/shrink perag centric commit dd81dc05598c3028666d00709ef0810aa459bf8d Merge: 88084a3df167 51a117edff13 Author: Darrick J. Wong Date: Sat Jul 9 10:55:21 2022 -0700 Merge tag 'xfs-cil-scale-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs into xfs-5.20-mergeA xfs: improve CIL scalability This series aims to improve the scalability of XFS transaction commits on large CPU count machines. My 32p machine hits contention limits in xlog_cil_commit() at about 700,000 transaction commits a section. It hits this at 16 thread workloads, and 32 thread workloads go no faster and just burn CPU on the CIL spinlocks. This patchset gets rid of spinlocks and global serialisation points in the xlog_cil_commit() path. It does this by moving to a combination of per-cpu counters, unordered per-cpu lists and post-ordered per-cpu lists. This results in transaction commit rates exceeding 1.4 million commits/s under unlink certain workloads, and while the log lock contention is largely gone there is still significant lock contention in the VFS (dentry cache, inode cache and security layers) at >600,000 transactions/s that still limit scalability. The changes to the CIL accounting and behaviour, combined with the structural changes to xlog_write() in prior patchsets make the per-cpu restructuring possible and sane. This allows us to move to precalculated reservation requirements that allow for reservation stealing to be accounted across multiple CPUs accurately. That is, instead of trying to account for continuation log opheaders on a "growth" basis, we pre-calculate how many iclogs we'll need to write out a maximally sized CIL checkpoint and steal that reserveD that space one commit at a time until the CIL has a full reservation. If we ever run a commit when we are already at the hard limit (because post-throttling) we simply take an extra reservation from each commit that is run when over the limit. Hence we don't need to do space usage math in the fast path and so never need to sum the per-cpu counters in this fast path. Similarly, per-cpu lists have the problem of ordering - we can't remove an item from a per-cpu list if we want to move it forward in the CIL. We solve this problem by using an atomic counter to give every commit a sequence number that is copied into the log items in that transaction. Hence relogging items just overwrites the sequence number in the log item, and does not move it in the per-cpu lists. Once we reaggregate the per-cpu lists back into a single list in the CIL push work, we can run it through list-sort() and reorder it back into a globally ordered list. This costs a bit of CPU time, but now that the CIL can run multiple works and pipelines properly, this is not a limiting factor for performance. It does increase fsync latency when the CIL is full, but workloads issuing large numbers of fsync()s or sync transactions end up with very small CILs and so the latency impact or sorting is not measurable for such workloads. OVerall, this pushes the transaction commit bottleneck out to the lockless reservation grant head updates. These atomic updates don't start to be a limiting fact until > 1.5 million transactions/s are being run, at which point the accounting functions start to show up in profiles as the highest CPU users. Still, this series doubles transaction throughput without increasing CPU usage before we get to that cacheline contention breakdown point... ` Signed-off-by: Dave Chinner Signed-off-by: Darrick J. Wong * tag 'xfs-cil-scale-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: xfs: expanding delayed logging design with background material xfs: xlog_sync() manually adjusts grant head space xfs: avoid cil push lock if possible xfs: move CIL ordering to the logvec chain xfs: convert log vector chain to use list heads xfs: convert CIL to unordered per cpu lists xfs: Add order IDs to log items in CIL xfs: convert CIL busy extents to per-cpu xfs: track CIL ticket reservation in percpu structure xfs: implement percpu cil space used calculation xfs: introduce per-cpu CIL tracking structure xfs: rework per-iclog header CIL reservation xfs: lift init CIL reservation out of xc_cil_lock xfs: use the CIL space used counter for emptiness checks commit 0440741254ed27bd695d994f00358647c92ed832 Author: Amadeusz Sławiński Date: Wed Jul 6 14:02:29 2022 +0200 ALSA: hda: Remove unused macro definition It is not used anywhere in the file, so there is no need to keep it. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220706120230.427296-9-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai sound/hda/ext/hdac_ext_controller.c | 7 ------- 1 file changed, 7 deletions(-) commit 856282f166d7b95004e70859ca87cf33eb7f9a6d Author: Amadeusz Sławiński Date: Wed Jul 6 14:02:28 2022 +0200 ALSA: hda: Reset all SIE bits in INTCTL Old code resets SIE for up to 8 streams using byte accessor, but register is laid out in following way: 31 GIE 30 CIE 29:x Reserved x-1:0 SIE If there is more than 8 streams, some of them may and up with enabled interrupts. To fix this just clear whole INTCTL register when disabling interrupts. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220706120230.427296-8-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai sound/hda/hdac_controller.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 980b3a8790b402e959a6d773b38b771019682be1 Author: Cezary Rojewski Date: Wed Jul 6 14:02:27 2022 +0200 ALSA: hda: Fix page fault in snd_hda_codec_shutdown() If early probe of HDAudio bus driver fails e.g.: due to missing firmware file, snd_hda_codec_shutdown() ends in manipulating uninitialized codec->pcm_list_head causing page fault. Iinitialization of HDAudio codec in ASoC is split in two: - snd_hda_codec_device_init() - snd_hda_codec_device_new() snd_hda_codec_device_init() is called during probe_codecs() by HDAudio bus driver while snd_hda_codec_device_new() is called by codec-component's ->probe(). The second call will not happen until all components required by related sound card are present within the ASoC framework. With firmware failing to load during the PCI's deferred initialization i.e.: probe_work(), no platform components are ever registered. HDAudio codec enumeration is done at that point though, so the codec components became registered to ASoC framework, calling snd_hda_codec_device_init() in the process. Now, during platform reboot snd_hda_codec_shutdown() is called for every codec found on the HDAudio bus causing oops if any of them has not completed both of their initialization steps. Relocating field initialization fixes the issue. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220706120230.427296-7-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai sound/pci/hda/hda_codec.c | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) commit ebe043a3dfcade2756a41a3956365e1bfe4198cf Author: Cezary Rojewski Date: Wed Jul 6 14:02:25 2022 +0200 ALSA: hda: Fix put_device() inconsistency in error path AVS HDAudio bus driver does not tie with codec drivers tighly. Codec device and its respective driver cleanup procedures are split and may not occur one after the other. Device cleanup is performed only on snd_hdac_ext_bus_device_remove() i.e. it's the bus driver's responsibility. If codec component probing fails, put_device() found in snd_hda_codec_device_new() may lead to page fault. Relocate it to snd_hda_codec_new() to address the problem on ASoC side while keeping status quo for snd_hda_intel. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220706120230.427296-5-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai sound/pci/hda/hda_codec.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 9c76958b396a1342f08f205c350447b4bb54b26a Author: Cezary Rojewski Date: Wed Jul 6 14:02:24 2022 +0200 ALSA: hda: Make device usage_count consistent across subsequent probing AVS HDAudio bus driver does not tie with codec drivers tighly and snd_hda_codec_device_new() can be called after codec's module reload. In such case, rpm is forbidden and invoking pm_runtime_forbid() unconditionally causes device's usage_count to become unbalanced. This is later caught by WARN_ON() found in sound/soc/hda.c. Detect such circumstance and bump the usage_count instead. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220706120230.427296-4-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai sound/pci/hda/hda_codec.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 0fcc43e2e159f2f609686a5339093177f019ae26 Author: Cezary Rojewski Date: Wed Jul 6 14:02:23 2022 +0200 ALSA: hda: Fix null-ptr-deref when i915 fails and hdmi is denylisted If snd_hda_hdmi_codec module is denylisted and any event causes i915 enumeration to fail, is_likely_hdmi_codec() ends in null-ptr-deref. As snd_soc_hda is an ASoC-based driver, its initialization is delayed until all the necessary components appear in the system - allowing actual sound card to enumerate. snd_hda_codec_configure() gets called by the avs-driver core during probe_codecs() but the snd_hda_codec_device_new(), necessary to complete codecs initialization, happens only when codec-component of hda sound card is being probed. Denylisting snd_hda_codec_hdmi module causes snd_hda_codec_configure() to reach: codec_bind_generic() -> is_likely_hdmi_codec() which makes use of ->wcaps and at this point the it isn't initialized yet - again, requires completion of snd_hda_codec_device_new(). Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220706120230.427296-3-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai sound/pci/hda/hda_bind.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 877d4e3cedd18cd5a4cef7685b64af72f8322ac1 Author: Linus Walleij Date: Sat Jul 9 01:55:30 2022 +0200 ixp4xx_eth: Set MAC address from device tree If there is a MAC address specified in the device tree, then use it. This is already perfectly legal to specify in accordance with the generic ethernet-controller.yaml schema. Signed-off-by: Linus Walleij Signed-off-by: David S. Miller drivers/net/ethernet/xscale/ixp4xx_eth.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit b3ba206ce84d3d5c963ea670c94d4de1335b6516 Author: Linus Walleij Date: Sat Jul 9 01:55:29 2022 +0200 ixp4xx_eth: Fall back to random MAC address If the firmware does not provide a MAC address to the driver, fall back to generating a random MAC address. Signed-off-by: Linus Walleij Signed-off-by: David S. Miller drivers/net/ethernet/xscale/ixp4xx_eth.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 44ac441a51a77717e7e66d75591be3aa971a7455 Author: Eric Dumazet Date: Fri Jul 8 16:28:58 2022 +0000 af_unix: fix unix_sysctl_register() error path We want to kfree(table) if @table has been kmalloced, ie for non initial network namespace. Fixes: 849d5aa3a1d8 ("af_unix: Do not call kmemdup() for init_net's sysctl table.") Signed-off-by: Eric Dumazet Cc: Kuniyuki Iwashima Cc: Eric W. Biederman Acked-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/unix/sysctl_net_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be587adbf88a064e04eb1e65e5e31a75c2bfc9e2 Merge: 9f7cb73ef64b 65ebc6676d17 Author: David S. Miller Date: Sat Jul 9 12:19:24 2022 +0100 Merge branch 'mptcp-selftest-improvements-and-header-tweak' Mat Martineau says: ==================== mptcp: Self test improvements and a header tweak Patch 1 moves a definition to a header so it can be used in a struct declaration. Patch 2 adjusts a time threshold for a selftest that runs much slower on debug kernels (and even more on slow CI infrastructure), to reduce spurious failures. Patches 3 & 4 improve userspace PM test coverage. Patches 5 & 6 clean up output from a test script and selftest helper tool. ==================== Signed-off-by: David S. Miller commit 65ebc6676d17847dde26dcbe50627a2fe198ca4b Author: Geliang Tang Date: Fri Jul 8 10:14:13 2022 -0700 selftests: mptcp: update pm_nl_ctl usage header The usage header of pm_nl_ctl command doesn't match with the context. So this patch adds the missing userspace PM keywords 'ann', 'rem', 'csf', 'dsf', 'events' and 'listen' in it. Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller tools/testing/selftests/net/mptcp/pm_nl_ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 507719cd7c0f0251fb2b772e73e4c35b7429587b Author: Geliang Tang Date: Fri Jul 8 10:14:12 2022 -0700 selftests: mptcp: avoid Terminated messages in userspace_pm There're some 'Terminated' messages in the output of userspace pm tests script after killing './pm_nl_ctl events' processes: Created network namespaces ns1, ns2 [OK] ./userspace_pm.sh: line 166: 13735 Terminated ip netns exec "$ns2" ./pm_nl_ctl events >> "$client_evts" 2>&1 ./userspace_pm.sh: line 172: 13737 Terminated ip netns exec "$ns1" ./pm_nl_ctl events >> "$server_evts" 2>&1 Established IPv4 MPTCP Connection ns2 => ns1 [OK] ./userspace_pm.sh: line 166: 13753 Terminated ip netns exec "$ns2" ./pm_nl_ctl events >> "$client_evts" 2>&1 ./userspace_pm.sh: line 172: 13755 Terminated ip netns exec "$ns1" ./pm_nl_ctl events >> "$server_evts" 2>&1 Established IPv6 MPTCP Connection ns2 => ns1 [OK] ADD_ADDR 10.0.2.2 (ns2) => ns1, invalid token [OK] This patch adds a helper kill_wait(), in it using 'wait $pid 2>/dev/null' commands after 'kill $pid' to avoid printing out these Terminated messages. Use this helper instead of using 'kill $pid'. Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller tools/testing/selftests/net/mptcp/userspace_pm.sh | 40 +++++++++++++---------- 1 file changed, 23 insertions(+), 17 deletions(-) commit 5e986ec468745e8d4582070d869a10eaae8ba56c Author: Geliang Tang Date: Fri Jul 8 10:14:11 2022 -0700 selftests: mptcp: userspace pm subflow tests This patch adds userspace pm subflow tests support for mptcp_join.sh script. Add userspace pm create subflow and destroy test cases in userspace_tests(). Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller tools/testing/selftests/net/mptcp/mptcp_join.sh | 39 +++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) commit 97040cf9806e1163af29a3e24f2b8c5584aa44dd Author: Geliang Tang Date: Fri Jul 8 10:14:10 2022 -0700 selftests: mptcp: userspace pm address tests This patch adds userspace pm tests support for mptcp_join.sh script. Add userspace pm add_addr and rm_addr test cases in userspace_tests(). Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller tools/testing/selftests/net/mptcp/mptcp_join.sh | 49 ++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) commit d0d9c8f2df60c6d1495201981f4b424628601113 Author: Paolo Abeni Date: Fri Jul 8 10:14:09 2022 -0700 selftests: mptcp: tweak simult_flows for debug kernels The mentioned test measures the transfer run-time to verify that the user-space program is able to use the full aggregate B/W. Even on (virtual) link-speed-bound tests, debug kernel can slow down the transfer enough to cause sporadic test failures. Instead of unconditionally raising the maximum allowed run-time, tweak when the running kernel is a debug one, and use some simple/ rough heuristic to guess such scenarios. Note: this intentionally avoids looking for /boot/config- as the latter file is not always available in our reference CI environments. Signed-off-by: Paolo Abeni Co-developed-by: Mat Martineau Signed-off-by: Mat Martineau Signed-off-by: David S. Miller tools/testing/selftests/net/mptcp/simult_flows.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit f7657ff4a7097eaf5220776456b7d75eb09062cb Author: Geliang Tang Date: Fri Jul 8 10:14:08 2022 -0700 mptcp: move MPTCPOPT_HMAC_LEN to net/mptcp.h Move macro MPTCPOPT_HMAC_LEN definition from net/mptcp/protocol.h to include/net/mptcp.h. Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller include/net/mptcp.h | 3 ++- net/mptcp/protocol.h | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) commit ac2a2303016baed1a60343500e265519cc45e4d2 Merge: 7e74dabc3daf 81e9685dd413 Author: Michael Ellerman Date: Sat Jul 9 19:32:20 2022 +1000 Merge branch 'topic/ppc-kvm' into next Merge KVM related commits we are keeping in a topic branch in case of any conflicts with generic KVM changes. commit 7e74dabc3daf0c217cb5e8e849a8f6c02927950f Merge: 54c15ec3b738 887502826549 Author: Michael Ellerman Date: Sat Jul 9 19:29:34 2022 +1000 Merge branch 'fixes' into next Merge our fixes branch. In particular this brings in commit 986481618023 ("powerpc/book3e: Fix PUD allocation size in map_kernel_page()") which fixes a build failure in next, because commit 2db2008e6363 ("powerpc/64e: Rewrite p4d_populate() as a static inline function") depends on it. commit 2ebb36ea41a7aaabacd03a48292ca91ed0306453 Author: Bo Liu Date: Thu Jul 7 21:59:48 2022 -0400 bus: mhi: ep: Check dev_set_name() return value It's possible that dev_set_name() returns -ENOMEM, catch and handle this. Signed-off-by: Bo Liu Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20220708015948.4091-1-liubo03@inspur.com Signed-off-by: Manivannan Sadhasivam drivers/bus/mhi/ep/main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 8b11ff098af42b1fa57fc817daadd53c8b244a0c Author: Kent Overstreet Date: Sun Jul 3 21:08:18 2022 -0400 9p: Add client parameter to p9_req_put() This is to aid in adding mempools, in the next patch. Link: https://lkml.kernel.org/r/20220704014243.153050-2-kent.overstreet@gmail.com Signed-off-by: Kent Overstreet Cc: Eric Van Hensbergen Cc: Latchesar Ionkov Signed-off-by: Dominique Martinet include/net/9p/client.h | 2 +- net/9p/client.c | 12 ++++++------ net/9p/trans_fd.c | 12 ++++++------ net/9p/trans_rdma.c | 2 +- net/9p/trans_virtio.c | 4 ++-- net/9p/trans_xen.c | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) commit 6cda12864cb0f99810a5809e11e3ee5b102c9a47 Author: Kent Overstreet Date: Sun Jul 3 21:02:49 2022 -0400 9p: Drop kref usage An upcoming patch is going to require passing the client through p9_req_put() -> p9_req_free(), but that's awkward with the kref indirection - so this patch switches to using refcount_t directly. Link: https://lkml.kernel.org/r/20220704014243.153050-1-kent.overstreet@gmail.com Signed-off-by: Kent Overstreet Cc: Eric Van Hensbergen Cc: Latchesar Ionkov Signed-off-by: Dominique Martinet include/net/9p/client.h | 6 +++--- net/9p/client.c | 19 ++++++++----------- 2 files changed, 11 insertions(+), 14 deletions(-) commit 94c8e8664ab6f781b2ba1258c3bb389131f5ebb4 Author: Hans de Goede Date: Fri Jul 8 21:49:45 2022 -0700 Input: i8042 - add dritek quirk for Acer Aspire One AO532 Like on other Acer devices, the wifi, bluetooth and touchpad on/off toggle hotkeys on the Acer AO532 do not send any events when the dritek extensions are not enabled. Add a quirk to enable the dritek extensions on this netbook model. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20220418200949.6009-1-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-x86ia64io.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9f7cb73ef64b17e9bd97a62a2b18282461abde61 Author: Yang Yingliang Date: Thu Jul 7 21:58:01 2022 +0800 bcm63xx_enet: change the driver variables to static bcm63xx_enetsw_driver and bcm63xx_enet_driver are only used in bcm63xx_enet.c now, change them to static. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220707135801.1483941-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bcm63xx_enet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6d1ce9c03880c28a4a48f94d4a2dcb2e57c1b88e Author: Russell King (Oracle) Date: Thu Jul 7 10:20:02 2022 +0100 net: phylink: fix SGMII inband autoneg enable When we are operating in SGMII inband mode, it implies that there is a PHY connected, and the ethtool advertisement for autoneg applies to the PHY, not the SGMII link. When in 1000base-X mode, then this applies to the 802.3z link and needs to be applied to the PCS. Fix this. Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Link: https://lore.kernel.org/r/E1o9Ng2-005Qbe-3H@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/phy/phylink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 40ad0a52ef5d2c3379bb9b6af06c8029ac6c875d Author: Antoine Tenart Date: Thu Jul 7 10:02:45 2022 +0200 Documentation: add a description for net.core.high_order_alloc_disable A description is missing for the net.core.high_order_alloc_disable option in admin-guide/sysctl/net.rst ; add it. The above sysctl option was introduced by commit ce27ec60648d ("net: add high_order_alloc_disable sysctl/static key"). Thanks to Eric for running again the benchmark cited in the above commit, showing this knob is now mostly of historical importance. Signed-off-by: Antoine Tenart Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20220707080245.180525-1-atenart@kernel.org Signed-off-by: Jakub Kicinski Documentation/admin-guide/sysctl/net.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5b47d2364652979dc43df14f7af19346a001b770 Author: Justin Stitt Date: Thu Jul 7 11:20:52 2022 -0700 net: rxrpc: fix clang -Wformat warning When building with Clang we encounter this warning: | net/rxrpc/rxkad.c:434:33: error: format specifies type 'unsigned short' | but the argument has type 'u32' (aka 'unsigned int') [-Werror,-Wformat] | _leave(" = %d [set %hx]", ret, y); y is a u32 but the format specifier is `%hx`. Going from unsigned int to short int results in a loss of data. This is surely not intended behavior. If it is intended, the warning should be suppressed through other means. This patch should get us closer to the goal of enabling the -Wformat flag for Clang builds. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Justin Stitt Reviewed-by: Nathan Chancellor Acked-by: David Howells Link: https://lore.kernel.org/r/20220707182052.769989-1-justinstitt@google.com Signed-off-by: Jakub Kicinski net/rxrpc/rxkad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 418d1d840e42183ac7f4dbaf40eca316b90fdd53 Author: Alexander Stein Date: Wed Jun 22 13:49:48 2022 +0200 arm64: dts: freescale: add initial device tree for TQMa8MPQL with i.MX8MP This adds support for TQMa8MPQL module on MBa8MPxL board. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/Makefile | 1 + .../dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts | 702 +++++++++++++++++++++ .../arm64/boot/dts/freescale/imx8mp-tqma8mpql.dtsi | 284 +++++++++ 3 files changed, 987 insertions(+) commit c03d7ab1a636fdf411a37bcb33ed4acd12e66fac Author: Markus Niebel Date: Wed Jun 22 13:49:47 2022 +0200 dt-bindings: arm: add TQMa8MPxL board TQMa8MPxL is a SOM family using NXP i.MX8MP CPU family MBa8MPxL is an evaluation mainbord for this SOM The SOM needs a mainboard, therefore we provide two compatibles here: "tq,imx8mp-" for the module and "tq,imx8mp--" Signed-off-by: Markus Niebel Signed-off-by: Alexander Stein Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 16bd188eae2dc9294859bec8d0ed7388a176659f Merge: 67d7ebdeb2d5 35560b7f06b8 Author: Jakub Kicinski Date: Fri Jul 8 18:38:48 2022 -0700 Merge branch 'tls-pad-strparser-internal-header-decrypt_ctx-etc' Jakub Kicinski says: ==================== tls: pad strparser, internal header, decrypt_ctx etc. A grab bag of non-functional refactoring to make the series which will let us decrypt into a fresh skb smaller. Patches in this series are not strictly required to get the decryption into a fresh skb going, they are more in the "things which had been annoying me for a while" category. ==================== Link: https://lore.kernel.org/r/20220708010314.1451462-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 35560b7f06b8497e11880c53e845744f41de4820 Author: Jakub Kicinski Date: Thu Jul 7 18:03:14 2022 -0700 tls: rx: make tls_wait_data() return an recvmsg retcode tls_wait_data() sets the return code as an output parameter and always returns ctx->recv_pkt on success. Return the error code directly and let the caller read the skb from the context. Use positive return code to indicate ctx->recv_pkt is ready. While touching the definition of the function rename it. Signed-off-by: Jakub Kicinski net/tls/tls_sw.c | 53 ++++++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 27 deletions(-) commit 5879031423089b2e19b769f30fc618af742264c3 Author: Jakub Kicinski Date: Thu Jul 7 18:03:13 2022 -0700 tls: create an internal header include/net/tls.h is getting a little long, and is probably hard for driver authors to navigate. Split out the internals into a header which will live under net/tls/. While at it move some static inlines with a single user into the source files, add a few tls_ prefixes and fix spelling of 'proccess'. Signed-off-by: Jakub Kicinski include/net/tls.h | 277 +--------------------------------------- net/tls/tls.h | 290 ++++++++++++++++++++++++++++++++++++++++++ net/tls/tls_device.c | 3 +- net/tls/tls_device_fallback.c | 2 + net/tls/tls_main.c | 23 +++- net/tls/tls_proc.c | 2 + net/tls/tls_sw.c | 22 +++- net/tls/tls_toe.c | 2 + 8 files changed, 338 insertions(+), 283 deletions(-) commit 03957d84055e59235c7d57c95a37617bd3aa5646 Author: Jakub Kicinski Date: Thu Jul 7 18:03:12 2022 -0700 tls: rx: coalesce exit paths in tls_decrypt_sg() Jump to the free() call, instead of having to remember to free the memory in multiple places. Signed-off-by: Jakub Kicinski net/tls/tls_sw.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit b89fec54fd614ffa4b7567edfae8b9e56c07ff69 Author: Jakub Kicinski Date: Thu Jul 7 18:03:11 2022 -0700 tls: rx: wrap decrypt params in a struct The max size of iv + aad + tail is 22B. That's smaller than a single sg entry (32B). Don't bother with the memory packing, just create a struct which holds the max size of those members. Signed-off-by: Jakub Kicinski net/tls/tls_sw.c | 60 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit 50a07aa5316181e08fb80914fcf70229a827a2e0 Author: Jakub Kicinski Date: Thu Jul 7 18:03:10 2022 -0700 tls: rx: always allocate max possible aad size for decrypt AAD size is either 5 or 13. Really no point complicating the code for the 8B of difference. This will also let us turn the chunked up buffer into a sane struct. Signed-off-by: Jakub Kicinski include/net/tls.h | 1 + net/tls/tls_sw.c | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) commit 2d91ecace6614cf6254001566292b808d7f70a91 Author: Jakub Kicinski Date: Thu Jul 7 18:03:09 2022 -0700 strparser: pad sk_skb_cb to avoid straddling cachelines sk_skb_cb lives within skb->cb[]. skb->cb[] straddles 2 cache lines, each containing 24B of data. The first cache line does not contain much interesting information for users of strparser, so pad things a little. Previously strp_msg->full_len would live in the first cache line and strp_msg->offset in the second. We need to reorder the 8 byte temp_reg with struct tls_msg to prevent a 4B hole which would push the struct over 48B. Signed-off-by: Jakub Kicinski include/net/strparser.h | 12 ++++++++---- net/strparser/strparser.c | 3 +++ 2 files changed, 11 insertions(+), 4 deletions(-) commit 159e037d2e36d93a7b066228c6543537c25235c8 Author: Vitaly Kuznetsov Date: Fri Jul 8 14:51:47 2022 +0200 KVM: x86: Fully initialize 'struct kvm_lapic_irq' in kvm_pv_kick_cpu_op() 'vector' and 'trig_mode' fields of 'struct kvm_lapic_irq' are left uninitialized in kvm_pv_kick_cpu_op(). While these fields are normally not needed for APIC_DM_REMRD, they're still referenced by __apic_accept_irq() for trace_kvm_apic_accept_irq(). Fully initialize the structure to avoid consuming random stack memory. Fixes: a183b638b61c ("KVM: x86: make apic_accept_irq tracepoint more generic") Reported-by: syzbot+d6caa905917d353f0d07@syzkaller.appspotmail.com Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20220708125147.593975-1-vkuznets@redhat.com Signed-off-by: Sean Christopherson arch/x86/kvm/x86.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 24bdfdd2ec343c94adf38fb5bc699f12e543713b Author: Maxim Mikityanskiy Date: Fri Jul 8 16:03:19 2022 +0300 selftests/bpf: Fix xdp_synproxy build failure if CONFIG_NF_CONNTRACK=m/n When CONFIG_NF_CONNTRACK=m, struct bpf_ct_opts and enum member BPF_F_CURRENT_NETNS are not exposed. This commit allows building the xdp_synproxy selftest in such cases. Note that nf_conntrack must be loaded before running the test if it's compiled as a module. This commit also allows this selftest to be successfully compiled when CONFIG_NF_CONNTRACK is disabled. One unused local variable of type struct bpf_ct_opts is also removed. Fixes: fb5cd0ce70d4 ("selftests/bpf: Add selftests for raw syncookie helpers") Reported-by: Yauheni Kaliuta Signed-off-by: Maxim Mikityanskiy Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220708130319.1016294-1-maximmi@nvidia.com .../selftests/bpf/progs/xdp_synproxy_kern.c | 24 +++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit f83894b24c2a96fcecdff4858755aa79eb756465 Author: Sean Christopherson Date: Fri Jul 8 15:48:10 2022 -0700 KVM: x86: Fix handling of APIC LVT updates when userspace changes MCG_CAP Add a helper to update KVM's in-kernel local APIC in response to MCG_CAP being changed by userspace to fix multiple bugs. First and foremost, KVM needs to check that there's an in-kernel APIC prior to dereferencing vcpu->arch.apic. Beyond that, any "new" LVT entries need to be masked, and the APIC version register needs to be updated as it reports out the number of LVT entries. Fixes: 4b903561ec49 ("KVM: x86: Add Corrected Machine Check Interrupt (CMCI) emulation to lapic.") Reported-by: syzbot+8cdad6430c24f396f158@syzkaller.appspotmail.com Cc: Siddh Raman Pant Cc: Jue Wang Signed-off-by: Sean Christopherson arch/x86/kvm/lapic.c | 19 +++++++++++++++++++ arch/x86/kvm/lapic.h | 1 + arch/x86/kvm/x86.c | 4 ++-- 3 files changed, 22 insertions(+), 2 deletions(-) commit 03d84f96890662681feee129cf92491f49247d28 Author: Sean Christopherson Date: Fri Jul 8 15:38:51 2022 -0700 KVM: x86: Initialize number of APIC LVT entries during APIC creation Initialize the number of LVT entries during APIC creation, else the field will be incorrectly left '0' if userspace never invokes KVM_X86_SETUP_MCE. Add and use a helper to calculate the number of entries even though MCG_CMCI_P is not set by default in vcpu->arch.mcg_cap. Relying on that to always be true is unnecessarily risky, and subtle/confusing as well. Fixes: 4b903561ec49 ("KVM: x86: Add Corrected Machine Check Interrupt (CMCI) emulation to lapic.") Reported-by: Xiaoyao Li Cc: Jue Wang Signed-off-by: Sean Christopherson arch/x86/kvm/lapic.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 448b5a1548d87c246c3d0c3df8480d3c6eb6c11a Author: Gao Xiang Date: Fri Jul 8 18:10:01 2022 +0800 erofs: avoid consecutive detection for Highmem memory Currently, vmap()s are avoided if physical addresses are consecutive for decompressed buffers. I observed that is very common for 4KiB pclusters since the numbers of decompressed pages are almost 2 or 3. However, such detection doesn't work for Highmem pages on 32-bit machines, let's fix it now. Reported-by: Liu Jinbao Fixes: 7fc45dbc938a ("staging: erofs: introduce generic decompression backend") Link: https://lore.kernel.org/r/20220708101001.21242-1-hsiangkao@linux.alibaba.com Signed-off-by: Gao Xiang fs/erofs/decompressor.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 2df7c4bd7c1d2bc5ece5e9ed19dbd386810c2a65 Author: Yuwen Chen Date: Mon Jun 27 06:40:41 2022 +0800 erofs: wake up all waiters after z_erofs_lzma_head ready When the user mounts the erofs second times, the decompression thread may hung. The problem happens due to a sequence of steps like the following: 1) Task A called z_erofs_load_lzma_config which obtain all of the node from the z_erofs_lzma_head. 2) At this time, task B called the z_erofs_lzma_decompress and wanted to get a node. But the z_erofs_lzma_head was empty, the Task B had to sleep. 3) Task A release nodes and push nodes into the z_erofs_lzma_head. But task B was still sleeping. One example report when the hung happens: task:kworker/u3:1 state:D stack:14384 pid: 86 ppid: 2 flags:0x00004000 Workqueue: erofs_unzipd z_erofs_decompressqueue_work Call Trace: __schedule+0x281/0x760 schedule+0x49/0xb0 z_erofs_lzma_decompress+0x4bc/0x580 ? cpu_core_flags+0x10/0x10 z_erofs_decompress_pcluster+0x49b/0xba0 ? __update_load_avg_se+0x2b0/0x330 ? __update_load_avg_se+0x2b0/0x330 ? update_load_avg+0x5f/0x690 ? update_load_avg+0x5f/0x690 ? set_next_entity+0xbd/0x110 ? _raw_spin_unlock+0xd/0x20 z_erofs_decompress_queue.isra.0+0x2e/0x50 z_erofs_decompressqueue_work+0x30/0x60 process_one_work+0x1d3/0x3a0 worker_thread+0x45/0x3a0 ? process_one_work+0x3a0/0x3a0 kthread+0xe2/0x110 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x22/0x30 Signed-off-by: Yuwen Chen Fixes: 622ceaddb764 ("erofs: lzma compression support") Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/20220626224041.4288-1-chenyuwen1@meizu.com Signed-off-by: Gao Xiang fs/erofs/decompressor_lzma.c | 1 + 1 file changed, 1 insertion(+) commit 06cd4e9d5d969d713e6b710f0e5ca0bc8476ae41 Author: Daniel Müller Date: Thu Jul 7 21:19:31 2022 +0000 bpf: Correctly propagate errors up from bpf_core_composites_match This change addresses a comment made earlier [0] about a missing return of an error when __bpf_core_types_match is invoked from bpf_core_composites_match, which could have let to us erroneously ignoring errors. Regarding the typedef name check pointed out in the same context, it is not actually an issue, because callers of the function perform a name check for the root type anyway. To make that more obvious, let's add comments to the function (similar to what we have for bpf_core_types_are_compat, which is called in pretty much the same context). [0]: https://lore.kernel.org/bpf/165708121449.4919.13204634393477172905.git-patchwork-notify@kernel.org/T/#m55141e8f8cfd2e8d97e65328fa04852870d01af6 Suggested-by: Andrii Nakryiko Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220707211931.3415440-1-deso@posteo.net tools/lib/bpf/relo_core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 35ba8850b673050b71b17c1421079031f4fda319 Author: Jack Xiao Date: Thu Jul 7 20:57:34 2022 +0800 drm/amdgpu/mes: fix mes submission in atomic context For some cases (accessing registers, unmap legacy queue), it needs access mes in atomic context. Use spinlock to protect agaist mes ring buffer race condition. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 16 +-------- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 1 + drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 55 ++++++++++++---------------- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 63 +++++++++++++-------------------- 4 files changed, 50 insertions(+), 85 deletions(-) commit 872642edaf4228040473349ae0ee872264fa67f7 Author: Kenneth Feng Date: Fri Jul 8 16:31:22 2022 +0800 drm/amd/pm: drop the thermal_controller_type check drop the thermal_controller_type check since it's not relevant. Signed-off-by: Kenneth Feng Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit c028d66e6ec471fc24f70204768f43594a6a8b4a Author: Kenneth Feng Date: Thu Jul 7 22:16:11 2022 +0800 drm/amd/pm: ac/dc change for smu_v13_0 fixed the issue: gpu runs in dc mode but it is expected to be in ac mode. this causes the lower performance on smu_v13_0 Signed-off-by: Kenneth Feng Acked-by: Alex Deucher Signed-off-by: Alex Deucher .../amd/pm/swsmu/inc/pmfw_if/smu_v13_0_7_ppsmc.h | 9 +++++-- drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 1 + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 28 +++++++++++++++++++++- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 2 ++ 4 files changed, 37 insertions(+), 3 deletions(-) commit 9a23fcf79dc647627b3780284a156cc6e7bbd7c4 Author: Aurabindo Pillai Date: Thu Jul 7 14:28:03 2022 -0400 drm/amd/display: Enable ODM combine default policy [Why&How] Output Data Mapping is a power saving feature that allows us to run at reduced DPP and DISP clocks compared to what could be achieved with a single pipe. Set the default policy for single display use case to use 2 to 1 ODM combine. The options are queried by DC and appropriate register programming sequence is initiated to enable this feature. Fixes: 235c67634230 ("drm/amd/display: add DCN32/321 specific files for Display Core") Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 4 +++- drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 5531786537e4fcd82a221b0bd01ce375942b3854 Author: Aurabindo Pillai Date: Thu Jul 7 13:53:57 2022 -0400 drm/amd/display: Add callback to set dig mode [Why&How] Add a missing callback to set DIG FIFO output pixel mode. This is used when ODM combine is activated. Fixes: 235c67634230 ("drm/amd/display: add DCN32/321 specific files for Display Core") Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn32/dcn32_dio_stream_encoder.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 42d3f278d504de99edca345cd0543081d725943b Author: Krzysztof Kozlowski Date: Tue Jul 5 14:03:56 2022 +0200 dt-bindings: input: gpio-keys: accept also interrupt-extended Each key device node might have interrupts-extended instead of interrupts property: fsl-ls1028a-kontron-sl28-var1.dtb: buttons0: power-button: 'anyOf' conditional failed, one must be fixed: 'interrupts' is a required property 'gpios' is a required property Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220705120356.94876-4-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/gpio-keys.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 005d4674ed3d3d5c1a4c288c2486c8e9949dbb01 Author: Krzysztof Kozlowski Date: Tue Jul 5 14:03:55 2022 +0200 dt-bindings: input: gpio-keys: reference input.yaml and document properties The original text bindings documented "autorepeat" and "label" properties (in the device node, beside the nodes with keys). DTS use also poll-interval. Reference the input.yaml to get these top-level properties. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220705120356.94876-3-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/gpio-keys.yaml | 32 +++++++++++++--------- 1 file changed, 19 insertions(+), 13 deletions(-) commit 5eb5652250e489fdcb31b46cc898e5f848b96d05 Author: Krzysztof Kozlowski Date: Tue Jul 5 14:03:54 2022 +0200 dt-bindings: input: gpio-keys: enforce node names to match all properties The gpio-keys DT schema matches all properties with a wide pattern and applies specific schema to children. This has drawback - all regular properties are also matched and are silently ignored, even if they are not described in schema. Basically this allows any non-object property to be present. Enforce specific naming pattern for children (keys) to narrow the pattern thus do not match other properties. This will require all children to be properly prefixed or suffixed (button, event, switch or key). Removal of "if:" within patternProperties causes drop of one indentation level, but there are no other changes in the affected block. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220705120356.94876-2-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/gpio-keys.yaml | 157 ++++++++++----------- 1 file changed, 77 insertions(+), 80 deletions(-) commit 538c64068bb4f212544325f292cd0abecc081cd0 Author: Rob Herring Date: Wed Jun 8 15:12:07 2022 -0600 dt-bindings: input: Convert adc-keys to DT schema Convert the adc-keys binding to DT schema format. The old binding has 'label' as required, but it should never be required given it's just a human readable description. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220608211207.2058487-6-robh@kernel.org Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/adc-keys.txt | 67 -------------- .../devicetree/bindings/input/adc-keys.yaml | 103 +++++++++++++++++++++ 2 files changed, 103 insertions(+), 67 deletions(-) commit 75448ff73f5ecfdfa867cbd0bd2cecc71f950978 Author: Rob Herring Date: Wed Jun 8 15:12:06 2022 -0600 dt-bindings: input: Centralize 'linux,input-type' definition Multiple bindings use 'linux,input-type', but there is not a central definition and type. Add 'linux,input-type' to input.yaml and update all the users to use it. Signed-off-by: Rob Herring Acked-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220608211207.2058487-5-robh@kernel.org Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/azoteq,iqs7222.yaml | 1 - Documentation/devicetree/bindings/input/gpio-keys.yaml | 7 +------ Documentation/devicetree/bindings/input/input.yaml | 14 ++++++++++++++ Documentation/devicetree/bindings/input/iqs626a.yaml | 4 ---- 4 files changed, 15 insertions(+), 11 deletions(-) commit d853cec7306adcdbca807d458a6dcdded7a620ec Author: Rob Herring Date: Wed Jun 8 15:12:05 2022 -0600 dt-bindings: input: Use common 'linux,keycodes' definition The common input schema, input.yaml, already defines 'linux,keycodes' property. Update the users to use it. Signed-off-by: Rob Herring Acked-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220608211207.2058487-4-robh@kernel.org Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/iqs626a.yaml | 2 +- Documentation/devicetree/bindings/input/iqs62x-keys.yaml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 8ac14d2c2d81f6a78539ce9670d9283b70a23bf8 Author: Rob Herring Date: Wed Jun 8 15:12:04 2022 -0600 dt-bindings: input: Centralize 'linux,code' definition Multiple bindings use 'linux,code', but there is not a central definition and type. Add 'linux,code' to input.yaml and update all the users to use it. Signed-off-by: Rob Herring Acked-by: Samuel Holland Acked-by: Jeff LaBundy Acked-by: Artur Rojek Link: https://lore.kernel.org/r/20220608211207.2058487-3-robh@kernel.org Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/adc-joystick.yaml | 2 +- .../bindings/input/allwinner,sun4i-a10-lradc-keys.yaml | 5 ++--- .../devicetree/bindings/input/azoteq,iqs7222.yaml | 7 ++----- Documentation/devicetree/bindings/input/gpio-keys.yaml | 1 - Documentation/devicetree/bindings/input/input.yaml | 8 ++++++++ Documentation/devicetree/bindings/input/iqs269a.yaml | 15 ++++++--------- Documentation/devicetree/bindings/input/iqs626a.yaml | 5 ++--- Documentation/devicetree/bindings/input/iqs62x-keys.yaml | 5 ++--- .../devicetree/bindings/input/max77650-onkey.yaml | 8 ++++---- 9 files changed, 27 insertions(+), 29 deletions(-) commit 7d321ab297c9ea88f6ceab122e3ccc034b304ca1 Author: Rob Herring Date: Wed Jun 8 15:12:03 2022 -0600 dt-bindings: input: Increase maximum keycode value to 0x2ff The maximum keycode value for Linux is 0x2ff, not 0xff. There's already users and examples with values greater than 0xff, but the schema is not yet applied in those cases. Signed-off-by: Rob Herring Reviewed-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220608211207.2058487-2-robh@kernel.org Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/input.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18410251f66aee7e82234073ce6656ca20a732a9 Author: James Hilliard Date: Wed Jul 6 05:18:38 2022 -0600 libbpf: Disable SEC pragma macro on GCC It seems the gcc preprocessor breaks with pragmas when surrounding __attribute__. Disable these pragmas on GCC due to upstream bugs see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55578 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90400 Fixes errors like: error: expected identifier or '(' before '#pragma' 106 | SEC("cgroup/bind6") | ^~~ error: expected '=', ',', ';', 'asm' or '__attribute__' before '#pragma' 114 | char _license[] SEC("license") = "GPL"; | ^~~ Signed-off-by: James Hilliard Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220706111839.1247911-1-james.hilliard1@gmail.com tools/lib/bpf/bpf_helpers.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit abf61f7e66c15e00f40ca7e10367f4149639bc57 Author: Johan Hovold Date: Fri Jul 8 09:25:56 2022 +0200 arm64: dts: qcom: sc8280xp: fix DP PHY node unit addresses Fix up the DP PHY node which had the wrong unit address. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220708072556.4687-1-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a627b0b162b9495f3646caa6edb0e0f97d8f2de Merge: b9b71f43683a 54ad60ba9d26 Author: Sean Christopherson Date: Fri Jul 8 15:02:41 2022 -0700 Merge branch 'kvm-5.20-msr-eperm' Merge a bug fix and cleanups for {g,s}et_msr_mce() using a base that predates commit 281b52780b57 ("KVM: x86: Add emulation for MSR_IA32_MCx_CTL2 MSRs."), which was written with the intention that it be applied _after_ the bug fix and cleanups. The bug fix in particular needs to be sent to stable trees; give them a stable hash to use. commit 43883cee061f46f47ccfd251a28c879f84832a7c Author: Johan Hovold Date: Fri Jul 8 09:23:58 2022 +0200 arm64: dts: qcom: sc8280xp: fix usb_0 HS PHY ref clock Fix the usb_0 HS PHY reference clock which was mistakingly replaced with the first usb_2 PHY clock. Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform") Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220708072358.4583-1-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31789f35f80c582cf3eb90f7eb8aa48eb96c27c5 Author: Mattijs Korpershoek Date: Fri Jul 8 14:57:43 2022 -0700 Input: mt6779-keypad - implement row/column selection The MediaTek keypad has a total of 6 input rows and 6 input columns. By default, rows/columns 0-2 are enabled. This is controlled by the KP_SEL register: - bits[9:4] control row selection - bits[15:10] control column selection Each bit enables the corresponding row/column number (e.g KP_SEL[4] enables ROW0) Depending on how the keypad is wired, this may result in wrong readings of the keypad state. Program the KP_SEL register to limit the key detection to n_rows, n_cols we retrieve from the device tree. Signed-off-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/20220707075236.126631-3-mkorpershoek@baylibre.com Signed-off-by: Dmitry Torokhov drivers/input/keyboard/mt6779-keypad.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d6ed52583034f9d2e39dead7c18e03380fd4edf2 Author: Mattijs Korpershoek Date: Fri Jul 8 14:57:31 2022 -0700 Input: mt6779-keypad - match hardware matrix organization The MediaTek keypad has a set of bits representing keys, from KEY0 to KEY77, arranged in 5 chunks of 15 bits split into 5 32-bit registers. In our implementation, we simply decided to use register number as row and offset in the register as column when encoding our "matrix". Because of this, we can have a 5x32 matrix which does not match the hardware at all, which is confusing. Change the row/column calculation to match the hardware. Fixes: f28af984e771 ("Input: mt6779-keypad - add MediaTek keypad driver") Co-developed-by: Fabien Parent Signed-off-by: Fabien Parent Signed-off-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/20220707075236.126631-2-mkorpershoek@baylibre.com Signed-off-by: Dmitry Torokhov drivers/input/keyboard/mt6779-keypad.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 54ad60ba9d2673293c72a7c1c4f092622a1f8789 Author: Sean Christopherson Date: Thu May 12 22:27:16 2022 +0000 KVM: x86: Add helpers to identify CTL and STATUS MCi MSRs Add helpers to identify CTL (control) and STATUS MCi MSR types instead of open coding the checks using the offset. Using the offset is perfectly safe, but unintuitive, as understanding what the code does requires knowing that the offset calcuation will not affect the lower three bits. Opportunistically comment the STATUS logic to save readers a trip to Intel's SDM or AMD's APM to understand the "data != 0" check. No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Link: https://lore.kernel.org/r/20220512222716.4112548-4-seanjc@google.com arch/x86/kvm/x86.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit f5223a332f3647a0e3725e9b4a102e9659c84ce4 Author: Sean Christopherson Date: Thu May 12 22:27:15 2022 +0000 KVM: x86: Use explicit case-statements for MCx banks in {g,s}et_msr_mce() Use an explicit case statement to grab the full range of MCx bank MSRs in {g,s}et_msr_mce(), and manually check only the "end" (the number of banks configured by userspace may be less than the max). The "default" trick works, but is a bit odd now, and will be quite odd if/when support for accessing MCx_CTL2 MSRs is added, which has near identical logic. Hoist "offset" to function scope so as to avoid curly braces for the case statement, and because MCx_CTL2 support will need the same variables. Opportunstically clean up the comment about allowing bit 10 to be cleared from bank 4. No functional change intended. Cc: Jue Wang Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Link: https://lore.kernel.org/r/20220512222716.4112548-3-seanjc@google.com arch/x86/kvm/x86.c | 75 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 36 deletions(-) commit 2368048bf5c2ec4b604ac3431564071e89a0bc71 Author: Sean Christopherson Date: Thu May 12 22:27:14 2022 +0000 KVM: x86: Signal #GP, not -EPERM, on bad WRMSR(MCi_CTL/STATUS) Return '1', not '-1', when handling an illegal WRMSR to a MCi_CTL or MCi_STATUS MSR. The behavior of "all zeros' or "all ones" for CTL MSRs is architectural, as is the "only zeros" behavior for STATUS MSRs. I.e. the intent is to inject a #GP, not exit to userspace due to an unhandled emulation case. Returning '-1' gets interpreted as -EPERM up the stack and effecitvely kills the guest. Fixes: 890ca9aefa78 ("KVM: Add MCE support") Fixes: 9ffd986c6e4e ("KVM: X86: #GP when guest attempts to write MCi_STATUS register w/o 0") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Link: https://lore.kernel.org/r/20220512222716.4112548-2-seanjc@google.com arch/x86/kvm/x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f6ef5f4787d44348d5152c8007011da3b72e64d6 Author: William Zhang Date: Wed Jul 6 23:57:57 2022 -0700 phy: brcm-sata: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA Prepare for the BCM63138 ARCH_BCM_63XX migration to ARCH_BCMBCA. Make PHY_BRCM_SATA depending on ARCH_BCMBCA. Signed-off-by: William Zhang Acked-by: Vinod Koul Acked-by: Florian Fainelli Signed-off-by: Florian Fainelli drivers/phy/broadcom/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99d54565e186c93a489e68253b46fe8fb68b6170 Author: William Zhang Date: Wed Jul 6 23:57:56 2022 -0700 i2c: brcmstb: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA Prepare for the BCM63138 ARCH_BCM_63XX migration to ARCH_BCMBCA. Make I2C_BRCMSTB depending on ARCH_BCMBCA. Signed-off-by: William Zhang Acked-by: Wolfram Sang Acked-by: Florian Fainelli Signed-off-by: Florian Fainelli drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4d2c7751b46acf36d10673e2e96ee866afa051f Author: William Zhang Date: Wed Jul 6 23:57:53 2022 -0700 ata: ahci_brcm: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA Prepare for the BCM63138 ARCH_BCM_63XX migration to ARCH_BCMBCA. Make AHCI_BRCM depending on ARCH_BCMBCA. Signed-off-by: William Zhang Acked-by: Damien Le Moal Acked-by: Florian Fainelli Signed-off-by: Florian Fainelli drivers/ata/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa0ef5a086a05306fc5322bbda73459725eda923 Author: William Zhang Date: Wed Jul 6 23:57:52 2022 -0700 ARM: debug: bcmbca: Replace ARCH_BCM_63XX with ARCH_BCMBCA Prepare for the BCM63138 ARCH_BCM_63XX migration to ARCH_BCMBCA. Make DEBUG_BCM63XX_UART depending on ARCH_BCMBCA. Signed-off-by: William Zhang Signed-off-by: Florian Fainelli arch/arm/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a03beff363cbb8810017f759c210eea23d5e3e0 Author: William Zhang Date: Thu Jul 7 00:00:36 2022 -0700 arm: bcmbca: Add BCMBCA sub platforms Create new CORTEXA7, CORTEXA9 and BRAHMAB15 BCMBCA sub platform configs to enable fine-grained selection for each type of ARMv7 SoC. Signed-off-by: William Zhang Signed-off-by: Florian Fainelli arch/arm/mach-bcm/Kconfig | 61 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 18 deletions(-) commit 889390f83d4eab6d409c0a74b7e17d8a081019ae Author: William Zhang Date: Thu Jul 7 00:00:35 2022 -0700 arm: bcmbca: Move BCM63138 ARCH_BCM_63XX to ARCH_BCMBCA Remove ARCH_BCM_63XX Kconfig for BCM63138 and merge its selections to ARCH_BCMBCA. Delete bcm63xx.c as it is no longer needed. Signed-off-by: William Zhang Signed-off-by: Florian Fainelli arch/arm/mach-bcm/Makefile | 11 +++++------ arch/arm/mach-bcm/bcm63xx.c | 27 --------------------------- 2 files changed, 5 insertions(+), 33 deletions(-) commit 330fc08dbdd913ac37a31f8aec1a88f68e39ae39 Author: Johan Hovold Date: Thu Jul 7 08:42:22 2022 +0200 arm64: dts: qcom: sc7280: fix PCIe clock reference The recent commit that dropped the PCIe PHY clock index failed to update the PCIe node reference. Fixes: 531c738fb360 ("arm64: dts: qcom: sc7280: drop PCIe PHY clock index") Reported-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220707064222.15717-1-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a65ee523a9e41d0bf046cf0107e6bbf05d068af2 Author: William Zhang Date: Thu Jul 7 00:00:38 2022 -0700 ARM: multi_v7_defconfig: Update configs for BCM63138 Remove CONFIG_ARCH_BCM_63XX and add BCMBCA sub platform configs. Signed-off-by: William Zhang Signed-off-by: Florian Fainelli arch/arm/configs/multi_v7_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c510c81c0e59f83a7376e5febd2646b9166a7ebc Author: William Zhang Date: Thu Jul 7 00:00:37 2022 -0700 MAINTAINERS: Move BCM63138 to bcmbca arch entry Move BCM63138 related files to BCMBCA ARCH maintainer list entry and delete the BCM63XX ARM ARCHITECTURE entry Signed-off-by: William Zhang Signed-off-by: Florian Fainelli MAINTAINERS | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 1e061d985fee50cfcb91a1d2aedbfd43d2f11aaa Author: Mauro Carvalho Chehab Date: Sat Jul 2 12:07:43 2022 +0100 docs: arm: index.rst: add google/chromebook-boot-flow This document was added without placing it at arm book. Fixes: 59228d3b9060 ("dt-bindings: Document how Chromebooks with depthcharge boot") Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/0ae8251f97c642cfd618f2e32eb1e66339e5dfde.1656759989.git.mchehab@kernel.org Documentation/arm/index.rst | 2 ++ 1 file changed, 2 insertions(+) commit d1a6edecc1fddfb6ef92c8f720631d2c02bf2744 Author: Stanislav Fomichev Date: Fri Jul 8 10:50:00 2022 -0700 bpf: Check attach_func_proto more carefully in check_return_code Syzkaller reports the following crash: RIP: 0010:check_return_code kernel/bpf/verifier.c:10575 [inline] RIP: 0010:do_check kernel/bpf/verifier.c:12346 [inline] RIP: 0010:do_check_common+0xb3d2/0xd250 kernel/bpf/verifier.c:14610 With the following reproducer: bpf$PROG_LOAD_XDP(0x5, &(0x7f00000004c0)={0xd, 0x3, &(0x7f0000000000)=ANY=[@ANYBLOB="1800000000000019000000000000000095"], &(0x7f0000000300)='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, '\x00', 0x0, 0x2b, 0xffffffffffffffff, 0x8, 0x0, 0x0, 0x10, 0x0}, 0x80) Because we don't enforce expected_attach_type for XDP programs, we end up in hitting 'if (prog->expected_attach_type == BPF_LSM_CGROUP' part in check_return_code and follow up with testing `prog->aux->attach_func_proto->type`, but `prog->aux->attach_func_proto` is NULL. Add explicit prog_type check for the "Note, BPF_LSM_CGROUP that attach ..." condition. Also, don't skip return code check for LSM/STRUCT_OPS. The above actually brings an issue with existing selftest which tries to return EPERM from void inet_csk_clone. Fix the test (and move called_socket_clone to make sure it's not incremented in case of an error) and add a new one to explicitly verify this condition. Fixes: 69fd337a975c ("bpf: per-cgroup lsm flavor") Reported-by: syzbot+5cc0730bd4b4d2c5f152@syzkaller.appspotmail.com Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20220708175000.2603078-1-sdf@google.com kernel/bpf/verifier.c | 21 ++++++++++++++++----- tools/testing/selftests/bpf/prog_tests/lsm_cgroup.c | 12 ++++++++++++ tools/testing/selftests/bpf/progs/lsm_cgroup.c | 12 ++++++------ .../selftests/bpf/progs/lsm_cgroup_nonvoid.c | 14 ++++++++++++++ 4 files changed, 48 insertions(+), 11 deletions(-) commit daf7c850caabe0f12b10d2310a8420fc6e8abd8f Author: William Zhang Date: Thu Jul 7 00:00:34 2022 -0700 ARM: dts: Add BCM63138 generic board dts Add generic bcm963138.dts file. Signed-off-by: William Zhang Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm963138.dts | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit a82291fce8aa5852f160ccce493ac52dfbf883a0 Author: William Zhang Date: Thu Jul 7 00:00:33 2022 -0700 ARM: dts: update dts files for bcmbca SoC BCM63138 Update BCM63138 board compatible string based on binding document. Signed-off-by: William Zhang Reviewed-by: Krzysztof Kozlowski Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm63138.dtsi | 4 ++-- arch/arm/boot/dts/bcm963138dvt.dts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit d39f3f4d4f77be45a459596d0dbec61a797831b1 Author: William Zhang Date: Thu Jul 7 00:00:32 2022 -0700 ARM: dts: Move BCM963138DVT board dts to ARCH_BCMBCA Use CONFIG_ARCH_BCMBCA to build all the BCMBCA SoC dts and remove CONFIG_ARCH_BCM_63XX from the makefile Signed-off-by: William Zhang Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4143a351f8e7c229ae0c37c456c91917153428f0 Author: William Zhang Date: Thu Jul 7 00:00:31 2022 -0700 dt-bindings: arm: add BCM63138 SoC Add BCM63138 SoC device tree description to bcmbca binding document. Signed-off-by: William Zhang Acked-by: Krzysztof Kozlowski Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) commit 436d219069628f0f0ed27f606224d4ee02a0ca17 Author: Werner Sembach Date: Fri Jul 8 13:17:38 2022 -0700 Input: i8042 - add additional TUXEDO devices to i8042 quirk tables A lot of modern Clevo barebones have touchpad and/or keyboard issues after suspend fixable with nomux + reset + noloop + nopnp. Luckily, none of them have an external PS/2 port so this can safely be set for all of them. I'm not entirely sure if every device listed really needs all four quirks, but after testing and production use. No negative effects could be observed when setting all four. Signed-off-by: Werner Sembach Reviewed-by: Hans de Goede Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220708161005.1251929-2-wse@tuxedocomputers.com Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-x86ia64io.h | 76 +++++++++++++++++++++++++++++++---- 1 file changed, 68 insertions(+), 8 deletions(-) commit 7d596d9bb2ae4d0a7a59199792c13ea02f0d2c76 Merge: bf02bb4d3b68 16b7ba9c0f53 Author: Mark Brown Date: Fri Jul 8 21:46:29 2022 +0100 ASoC: audio-graph-card2.c: make Codec2Codec settings optional Merge series from Kuninori Morimoto : Audio Graph Card2 has Codec2Codec support, but I noticed - Current Codec2Codec setting value is not correct because it is using of_get_property(). - simple-card-utils has default Codec2Codec settings and it is overwriting Card2 settings - This default settings works for non Codec2Codec case (= DPCM::BE case) too. This patch-set solve these issues. commit bf02bb4d3b68792d24258b4dbb5676a3ae1cfaff Merge: 0ca3d2ba1dfd cd486d374933 Author: Mark Brown Date: Fri Jul 8 21:46:28 2022 +0100 ASoC: Intel: sof_cs42l42: adding support for ADL configuration and BT offload Merge series from Brent Lu : 1. Add BT offload fetch to cs42l42 machine driver 2. Support cs42l42+max98360a on ADL platform commit a63f7778f76e1cf8ed3bcb7a1d9453c9609121ad Merge: c4bcc1b99b8b 88084a3df167 Author: Dmitry Torokhov Date: Fri Jul 8 13:39:28 2022 -0700 Merge tag 'v5.19-rc5' into next Merge with mainline to bring up the latest definition from MFD subsystem needed for Mediatek keypad driver. commit dc4fc0ae94cf87f1017f158b6fa2b7536ef29b4e Author: Libin Yang Date: Fri Jul 8 15:05:16 2022 -0500 ASoC: SOF: ipc4-topology: free memories allocated in sof_ipc4_get_audio_fmt Free the memories allocated in sof_ipc4_get_audio_fmt in error handling and ipc_free() Fixes: 2cabd02b6090 ("ASoC: SOF: ipc4-topology: Add support for parsing AIF_IN/AIF_OUT widgets") Fixes: abfb536bd116 ("ASoC: SOF: ipc4-topology: Add support for parsing DAI_IN/DAI_OUT widgets") Fixes: 4f838ab20812 ("ASoC: SOF: ipc4-topology: Add support for parsing and preparing pga widgets") Fixes: 4d4ba014ac4b ("ASoC: SOF: ipc4-topology: Add support for parsing mixer widgets") Reviewed-by: Péter Ujfalusi Signed-off-by: Libin Yang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220708200516.26853-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 48 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) commit b737fd8cf196bc96e471304007c3cd9b78672069 Author: Libin Yang Date: Fri Jul 8 15:05:15 2022 -0500 ASoC: SOF: ipc4-topology: check dai->private in ipc_free() Set the swidget->private or dai->private to NULL after kfree in the error handling in ipc_setup(). The private needs to be set NULL because if ipc_setup() returns error, ipc_free() will be called later. ipc_free() will judge the private is NULL or not to do the clearing. For dai widget, dai->private is allocated and set in dai widget ipc_setup(). So we need to check dai->private is NULL or not in the ipc_free(). Fixes: 2cabd02b6090 ("ASoC: SOF: ipc4-topology: Add support for parsing AIF_IN/AIF_OUT widgets") Fixes: abfb536bd116 ("ASoC: SOF: ipc4-topology: Add support for parsing DAI_IN/DAI_OUT widgets") Fixes: 4f838ab20812 ("ASoC: SOF: ipc4-topology: Add support for parsing and preparing pga widgets") Fixes: 4d4ba014ac4b ("ASoC: SOF: ipc4-topology: Add support for parsing mixer widgets") Reviewed-by: Péter Ujfalusi Signed-off-by: Libin Yang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220708200516.26853-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 7835303982d11ed700ce6bc530303272bfa8562f Author: Radhakrishna Sripada Date: Thu Jul 7 17:03:35 2022 -0700 drm/i915/mtl: Add MeteorLake PCI IDs Add Meteorlake PCI IDs. Split into M, and P subplatforms. v2: Update PCI id's v3: Move id 7d60 under MTL_M(MattR) Bspec: 55420 Signed-off-by: Radhakrishna Sripada Signed-off-by: Matt Roper Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220708000335.2869311-3-radhakrishna.sripada@intel.com drivers/gpu/drm/i915/i915_drv.h | 4 ++++ drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/intel_device_info.c | 14 ++++++++++++++ drivers/gpu/drm/i915/intel_device_info.h | 4 ++++ include/drm/i915_pciids.h | 13 +++++++++++++ 5 files changed, 36 insertions(+) commit ed56f4b5173efba00e3dcd736c18bce43255cf7a Author: Paul Moore Date: Fri Jul 8 16:20:48 2022 -0400 MAINTAINERS: update the LSM maintainer info After many years of shepherding the LSM layer, and Linux kernel access control in general, James has decided to take a small step away from his technical role and has asked me to assume the day-to-day maintenance tasks for the LSM. This patch makes the necessary updates to the MAINTAINERS file. Thanks for all you patience and stewardship over the years James, I promise to do my best not to screw it all up :) Cc: linux-security-module@vger.kernel.org Acked-by: Casey Schaufler Acked-by: Serge Hallyn Acked-by: James Morris Signed-off-by: Paul Moore MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bcf9b296627c6b832abd388b5364262853430262 Author: Radhakrishna Sripada Date: Thu Jul 7 17:03:34 2022 -0700 drm/i915/mtl: Add MeteorLake platform info MTL has Xe_LPD+ display IP (version = 14), MTL graphics IP (version = 12.70), and Xe_LPM+ media IP (version = 13). Bspec: 55413 Bspec: 55416 Bspec: 55417 Bspec: 55418 Bspec: 55726 Bspec: 45544 Bspec: 65380 v2: rearrange the fields in pci_info(MattR) Cc: Matt Roper Signed-off-by: Radhakrishna Sripada Reviewed-by: Matt Roper [mattrope: Moved IS_METEORLAKE() higher in header] Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220708000335.2869311-2-radhakrishna.sripada@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_pci.c | 25 +++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_device_info.c | 1 + drivers/gpu/drm/i915/intel_device_info.h | 1 + 4 files changed, 28 insertions(+) commit c46a0d5ae4f93800d2d90f3a3290e58a2f4b6bdf Author: Ulf Hansson Date: Wed Jun 8 17:31:20 2022 +0200 PM: runtime: Extend support for wakeirq for force_suspend|resume A driver that makes use of pm_runtime_force_suspend|resume() to support system suspend/resume, currently needs to manage the wakeirq support itself. To avoid the boilerplate code in the driver's system suspend/resume callbacks in particular, let's extend pm_runtime_force_suspend|resume() to deal with the wakeirq. Signed-off-by: Ulf Hansson Reviewed-by: Tony Lindgren Signed-off-by: Rafael J. Wysocki drivers/base/power/runtime.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7c4300eb05fbf5513924b970aaa86774af9b2832 Author: Mario Limonciello Date: Thu Jun 2 11:33:30 2022 -0500 Documentation: PM: Drop pme_interrupt reference `pme_interrupt` was dropped from `struct pci_dev` as part of commit 8370c2dc4c7b ("PCI / PM: Drop pme_interrupt flag from struct pci_dev"), but the Documentation still includes this member. Remove it from the documentation as well and update it to have the missing `pme_poll` member instead. Fixes: 8370c2dc4c7b ("PCI / PM: Drop pme_interrupt flag from struct pci_dev") Signed-off-by: Mario Limonciello Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki Documentation/power/pci.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1eea11523e4394d6670f10a51356e9b7c8567a8 Author: Cezary Rojewski Date: Thu Jul 7 14:41:53 2022 +0200 ASoC: Intel: avs: Update AVS_FW_INIT_TIMEOUT_US declaration To reduce the number of places to update if timeouts would have to change, modify the constant declaration. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220707124153.1858249-13-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8758ae88f0f4ade16e6a1b709eb5ea7271f62320 Author: Cezary Rojewski Date: Thu Jul 7 14:41:52 2022 +0200 ASoC: Intel: avs: Lower UNLOAD_MULTIPLE_MODULES IPC timeout Module unloading operation performs memory unmapping and the weight of the opration does not different from any other standard IPC. There is no dependency on secondary task like in module loading scenario where larger message timeout is recommended. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220707124153.1858249-12-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/messages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b38bd16ca6d8b16c1dc2cc4aa61663193b0b893 Author: Cezary Rojewski Date: Thu Jul 7 14:41:51 2022 +0200 ASoC: Intel: avs: Replace hardcodes with SD_CTL_STREAM_RESET Improve readability of CLDMA reset operation by making use of already defined SD_CTL_STREAM_RESET. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220707124153.1858249-11-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/cldma.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 79c351fb50e7e37eacf93f55f1e7056148d0d814 Author: Cezary Rojewski Date: Thu Jul 7 14:41:50 2022 +0200 ASoC: Intel: avs: Recognize FW_CFG_RESERVED If exposed by firmware, count RESERVED parameter as known one to avoid dumping noise in kernel logs. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220707124153.1858249-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/messages.c | 1 + 1 file changed, 1 insertion(+) commit a5bbbde2b81e41cea7fa1b38911e88da5febc2d5 Author: Amadeusz Sławiński Date: Thu Jul 7 14:41:49 2022 +0200 ASoC: Intel: avs: Use helper function to set up DMA dma_set_mask() and dma_set_coherent_mask() can be performed with one call to dma_set_mask_and_coherent(), which slightly reduces amount of code on our side. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220707124153.1858249-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/core.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 8544eebc78c96f1834a46b26ade3e7ebe785d10c Author: Amadeusz Sławiński Date: Thu Jul 7 14:41:48 2022 +0200 ASoC: Intel: avs: Set max DMA segment size Apparently it is possible for code to allocate large buffers which may cause warnings as reported in [1]. This was fixed for HDA, SOF and skylake in patchset [2], fix it also for avs driver. [1] https://github.com/thesofproject/linux/issues/3430 [2] https://lore.kernel.org/all/20220215132756.31236-1-tiwai@suse.de/ Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220707124153.1858249-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/core.c | 1 + 1 file changed, 1 insertion(+) commit daa36bbcd78bca24db84e273bcafec9a8f81c767 Author: Cezary Rojewski Date: Thu Jul 7 14:41:47 2022 +0200 ASoC: Intel: avs: Block IPC channel on suspend To allow for driver's filesystem interfaces e.g.: debugfs, to be touched even when the device is asleep, mark IPC-channel as blocked when the device is suspended. This causes any invocation of said interfaces that do not toggle PM themselves to gracefully fail with "Operation not permitted" message. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220707124153.1858249-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/core.c | 1 + 1 file changed, 1 insertion(+) commit 00566ad4ce9d394c6ebaacde12eda06eef4e5279 Author: Cezary Rojewski Date: Thu Jul 7 14:41:46 2022 +0200 ASoC: Intel: avs: Shield LARGE_CONFIG_GETs against zero payload_size Some LARGE_CONFIG_GETs are never expected to return payload of size 0. Check for such situation and collapse if met. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220707124153.1858249-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/messages.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 3c1923a119a61534f8ce221766041ddf470c9307 Author: Cezary Rojewski Date: Thu Jul 7 14:41:45 2022 +0200 ASoC: Intel: avs: Copy only as many RX bytes as necessary There is no need to copy number of bytes specified by IPC message caller if DSP firmware returned lower number. In consequence, LARGE_CONFIG_GET handler is simplified. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220707124153.1858249-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/ipc.c | 1 + sound/soc/intel/avs/messages.c | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) commit 8192d24cccfbd93dadefd2b7553ff15e41d0e680 Author: Cezary Rojewski Date: Thu Jul 7 14:41:44 2022 +0200 ASoC: Intel: avs: Relax DSP core transition timings To avoid any false positives when checking CPA after setting SPA, do a short wait. For stall operation, give HW more time to propagate the change before moving on. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220707124153.1858249-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/dsp.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 5f267aa4adad13f764e0b00926c349f8728fce77 Author: Cezary Rojewski Date: Thu Jul 7 14:41:43 2022 +0200 ASoC: Intel: avs: Assign I2S gateway when parsing topology For formatted port - ssp%d - descriptions to have an effect, copier module templates need to be updated with specified port value. This value is later propagated to the firmware when module instances are being instantiated. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220707124153.1858249-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/topology.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit c50cea054e04769471d2f17a57fafd7c5dfe8df8 Author: Cezary Rojewski Date: Thu Jul 7 14:41:42 2022 +0200 ASoC: Intel: avs: Register HDAudio ext-bus operations With ASoC representation of HDAudio codec added, update bus initiazation to complete it. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220707124153.1858249-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 2 +- sound/soc/intel/avs/core.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit e8a33a94078560df73761f6d6147a25bda07605c Author: V sujith kumar Reddy Date: Thu Jul 7 21:41:42 2022 +0530 ASoC: amd: acp: Add legacy audio driver support for Rembrandt platform Add i2s and dmic support for Rembrandt platform, Add machine support for nau8825, max98360 and rt5682s,rt1019 codec in legacy driver for rembrandt platform. Here codec is in a slave mode. Signed-off-by: V sujith kumar Reddy Link: https://lore.kernel.org/r/20220707161142.491034-4-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown sound/soc/amd/acp/Kconfig | 11 + sound/soc/amd/acp/Makefile | 2 + sound/soc/amd/acp/acp-i2s.c | 137 +++++++++++- sound/soc/amd/acp/acp-legacy-mach.c | 32 +++ sound/soc/amd/acp/acp-mach-common.c | 86 +++++++- sound/soc/amd/acp/acp-mach.h | 6 + sound/soc/amd/acp/acp-pci.c | 6 + sound/soc/amd/acp/acp-platform.c | 16 +- sound/soc/amd/acp/acp-rembrandt.c | 401 +++++++++++++++++++++++++++++++++++ sound/soc/amd/acp/amd.h | 62 +++++- sound/soc/amd/acp/chip_offset_byte.h | 28 +++ 11 files changed, 781 insertions(+), 6 deletions(-) commit b24484c18b1089f9dd1ef7901b05a85e315e9f41 Author: V sujith kumar Reddy Date: Thu Jul 7 21:41:41 2022 +0530 ASoC: amd: acp: ACP code generic to support newer platforms ADD Generic code to support to newer platforms, add control threshold, irq control macros ,added structure for register offset differences. Signed-off-by: V sujith kumar Reddy Link: https://lore.kernel.org/r/20220707161142.491034-3-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown sound/soc/amd/acp/acp-i2s.c | 34 +++++++++++++++++++------------- sound/soc/amd/acp/acp-pdm.c | 8 ++++---- sound/soc/amd/acp/acp-platform.c | 16 +++++++++------ sound/soc/amd/acp/acp-renoir.c | 38 +++++++++++++++++++++++++----------- sound/soc/amd/acp/amd.h | 24 +++++++++++++++++------ sound/soc/amd/acp/chip_offset_byte.h | 12 +++++++----- 6 files changed, 86 insertions(+), 46 deletions(-) commit ac2606df8a3fb4450240cf0893ff3934b5882c69 Author: V sujith kumar Reddy Date: Thu Jul 7 21:41:40 2022 +0530 ASoC: amd: acp: Remove rt1019_1 codec conf from machine driver Remove rt1019_1 codec configuration which has i2c-10EC1019:01 and i2c-10EC1019:02 codec components, Now Using default i2c-10EC1019:00 and i2c-10EC1019:01 codec components. Signed-off-by: V sujith kumar Reddy Link: https://lore.kernel.org/r/20220707161142.491034-2-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown sound/soc/amd/acp/acp-mach-common.c | 18 ------------------ 1 file changed, 18 deletions(-) commit c09327d5673e5fb3695e41d2c2f05b907abb8996 Author: Lukas Bulwahn Date: Thu Jul 7 13:54:42 2022 +0200 x86: mm: refer to the intended config STRICT_DEVMEM in a comment Commit a4866aa81251 ("mm: Tighten x86 /dev/mem with zeroing reads") adds a comment to the function devmem_is_allowed() referring to a non-existing config STRICT_IOMEM, whereas the comment very likely intended to refer to the config STRICT_DEVMEM, as the commit adds some behavior for the config STRICT_DEVMEM. Most of the initial analysis was actually done by Dave Hansen in the email thread below (see Link). Refer to the intended and existing config STRICT_DEVMEM. Link: https://lore.kernel.org/r/f9074e8d-9314-9d7d-7bf5-5b5538c8be8d@intel.com/ Suggested-by: Dave Hansen Signed-off-by: Lukas Bulwahn Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220707115442.21107-1-lukas.bulwahn@gmail.com arch/x86/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 231af4709018a8e4f20e511da4b6506346d662d3 Author: Matthias Kaehlcke Date: Mon Jun 27 08:35:26 2022 -0700 dm: verity-loadpin: Use CONFIG_SECURITY_LOADPIN_VERITY for conditional compilation The verity glue for LoadPin is only needed when CONFIG_SECURITY_LOADPIN_VERITY is set, use this option for conditional compilation instead of the combo of CONFIG_DM_VERITY and CONFIG_SECURITY_LOADPIN. Signed-off-by: Matthias Kaehlcke Acked-by: Mike Snitzer Link: https://lore.kernel.org/lkml/20220627083512.v7.3.I5aca2dcc3b06de4bf53696cd21329dce8272b8aa@changeid Signed-off-by: Kees Cook drivers/md/Makefile | 7 +------ include/linux/dm-verity-loadpin.h | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) commit 3f805f8cc23ba35679dd01446929292911c2b469 Author: Matthias Kaehlcke Date: Mon Jun 27 08:35:25 2022 -0700 LoadPin: Enable loading from trusted dm-verity devices Extend LoadPin to allow loading of kernel files from trusted dm-verity [1] devices. This change adds the concept of trusted verity devices to LoadPin. LoadPin maintains a list of root digests of verity devices it considers trusted. Userspace can populate this list through an ioctl on the new LoadPin securityfs entry 'dm-verity'. The ioctl receives a file descriptor of a file with verity digests as parameter. Verity reads the digests from this file after confirming that the file is located on the pinned root. The digest file must contain one digest per line. The list of trusted digests can only be set up once, which is typically done at boot time. When a kernel file is read LoadPin first checks (as usual) whether the file is located on the pinned root, if so the file can be loaded. Otherwise, if the verity extension is enabled, LoadPin determines whether the file is located on a verity backed device and whether the root digest of that device is in the list of trusted digests. The file can be loaded if the verity device has a trusted root digest. Background: As of now LoadPin restricts loading of kernel files to a single pinned filesystem, typically the rootfs. This works for many systems, however it can result in a bloated rootfs (and OTA updates) on platforms where multiple boards with different hardware configurations use the same rootfs image. Especially when 'optional' files are large it may be preferable to download/install them only when they are actually needed by a given board. Chrome OS uses Downloadable Content (DLC) [2] to deploy certain 'packages' at runtime. As an example a DLC package could contain firmware for a peripheral that is not present on all boards. DLCs use dm-verity to verify the integrity of the DLC content. [1] https://www.kernel.org/doc/html/latest/admin-guide/device-mapper/verity.html [2] https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/dlcservice/docs/developer.md Signed-off-by: Matthias Kaehlcke Acked-by: Mike Snitzer Link: https://lore.kernel.org/lkml/20220627083512.v7.2.I01c67af41d2f6525c6d023101671d7339a9bc8b5@changeid Signed-off-by: Kees Cook include/uapi/linux/loadpin.h | 22 ++++++ security/loadpin/Kconfig | 16 +++++ security/loadpin/loadpin.c | 167 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 204 insertions(+), 1 deletion(-) commit b6c1c5745ccc68ac5d57c7ffb51ea25a86d0e97b Author: Matthias Kaehlcke Date: Mon Jun 27 08:35:24 2022 -0700 dm: Add verity helpers for LoadPin LoadPin limits loading of kernel modules, firmware and certain other files to a 'pinned' file system (typically a read-only rootfs). To provide more flexibility LoadPin is being extended to also allow loading these files from trusted dm-verity devices. For that purpose LoadPin can be provided with a list of verity root digests that it should consider as trusted. Add a bunch of helpers to allow LoadPin to check whether a DM device is a trusted verity device. The new functions broadly fall in two categories: those that need access to verity internals (like the root digest), and the 'glue' between LoadPin and verity. The new file dm-verity-loadpin.c contains the glue functions. Signed-off-by: Matthias Kaehlcke Acked-by: Mike Snitzer Link: https://lore.kernel.org/lkml/20220627083512.v7.1.I3e928575a23481121e73286874c4c2bdb403355d@changeid Signed-off-by: Kees Cook drivers/md/Makefile | 6 ++++ drivers/md/dm-verity-loadpin.c | 74 +++++++++++++++++++++++++++++++++++++++ drivers/md/dm-verity-target.c | 33 ++++++++++++++++- drivers/md/dm-verity.h | 4 +++ include/linux/dm-verity-loadpin.h | 27 ++++++++++++++ 5 files changed, 143 insertions(+), 1 deletion(-) commit 7635778bac7e46458392c1261e3916e8e9e86860 Author: David Gow Date: Wed Jun 29 12:06:05 2022 +0800 Documentation: kunit: Cleanup run_wrapper, fix x-ref The "Run Tests on qemu" section of run_wrapper.rst had a few issues left over from the last big documentation refactor[1]: - It referenced a non_uml.rst page, which was integrated into the other pages (including run_wrapper.rst). - It skimmed over the use of --arch= and --cross_compile= in favour of using a custom --qemu_config. Since most users will want to use the former, let's give examples. Remove the reference to the non-existant page, and add a couple of examples to encourage the use of --arch= and --cross_compile=. With this change, there should be no more broken references in the KUnit documentation (i.e., the one mentioned in [2] is gone). [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=46201d47d6c4be594c1d57b7f3251c371626a9c4 [2]: https://lore.kernel.org/linux-doc/cover.1656234456.git.mchehab@kernel.org/ Signed-off-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan Documentation/dev-tools/kunit/run_wrapper.rst | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 7b2379454b9a72fece618319acea8d33497d2299 Author: Mauro Carvalho Chehab Date: Sat Jul 2 12:07:40 2022 +0100 kunit: test.h: fix a kernel-doc markup Fix this kernel-doc warning: Documentation/dev-tools/kunit/api/test:9: ./include/kunit/test.h:323: WARNING: Inline interpreted text or phrase reference start-string without end-string. Functions should use func_name() on kernel-doc markups, as documented at: Documentation/doc-guide/kernel-doc.rst Signed-off-by: Mauro Carvalho Chehab Reviewed-by: David Gow Signed-off-by: Shuah Khan include/kunit/test.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fc3a8636a7b0f7dbd6d0a4e450e765dc17518d4 Author: David Gow Date: Fri Jul 8 16:27:11 2022 +0000 kunit: tool: Enable virtio/PCI by default on UML There are several tests which depend on PCI, and hence need a bunch of extra options to run under UML. This makes it awkward to give configuration instructions (whether in documentation, or as part of a .kunitconfig file), as two separate, incompatible sets of config options are required for UML and "most other architectures". For non-UML architectures, it's possible to add default kconfig options via the qemu_config python files, but there's no equivalent for UML. Add a new tools/testing/kunit/configs/arch_uml.config file containing extra kconfig options to use on UML. Tested-by: José Expósito Reviewed-by: Daniel Latypov Signed-off-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Daniel Latypov Signed-off-by: Shuah Khan tools/testing/kunit/configs/arch_uml.config | 5 +++++ tools/testing/kunit/kunit_kernel.py | 14 ++++++++++---- tools/testing/kunit/kunit_tool_test.py | 12 ++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) commit 53b466219f89782b5c3d96d21f8765d1eadcce4e Author: Daniel Latypov Date: Fri Jul 8 01:36:32 2022 +0000 kunit: tool: make --kunitconfig repeatable, blindly concat It's come up a few times that it would be useful to have --kunitconfig be repeatable [1][2]. This could be done before with a bit of shell-fu, e.g. $ find fs/ -name '.kunitconfig' -exec cat {} + | \ ./tools/testing/kunit/kunit.py run --kunitconfig=/dev/stdin or equivalently: $ cat fs/ext4/.kunitconfig fs/fat/.kunitconfig | \ ./tools/testing/kunit/kunit.py run --kunitconfig=/dev/stdin But this can be fairly clunky to use in practice. And having explicit support in kunit.py opens the door to having more config fragments of interest, e.g. options for PCI on UML [1], UML coverage [2], variants of tests [3]. There's another argument to be made that users can just use multiple --kconfig_add's, but this gets very clunky very fast (e.g. [2]). Note: there's a big caveat here that some kconfig options might be incompatible. We try to give a clearish error message in the simple case where the same option appears multiple times with conflicting values, but more subtle ones (e.g. mutually exclusive options) will be potentially very confusing for the user. I don't know we can do better. Note 2: if you want to combine a --kunitconfig with the default, you either have to do to specify the current build_dir > --kunitconfig=.kunit --kunitconfig=additional.config or > --kunitconfig=tools/testing/kunit/configs/default.config --kunitconifg=additional.config each of which have their downsides (former depends on --build_dir, doesn't work if you don't have a .kunitconfig yet), etc. Example with conflicting values: > $ ./tools/testing/kunit/kunit.py config --kunitconfig=lib/kunit --kunitconfig=/dev/stdin < CONFIG_KUNIT_TEST=n > CONFIG_KUNIT=m > EOF > ... > kunit_kernel.ConfigError: Multiple values specified for 2 options in kunitconfig: > CONFIG_KUNIT=y > vs from /dev/stdin > CONFIG_KUNIT=m > > CONFIG_KUNIT_TEST=y > vs from /dev/stdin > # CONFIG_KUNIT_TEST is not set [1] https://lists.freedesktop.org/archives/dri-devel/2022-June/357616.html [2] https://lore.kernel.org/linux-kselftest/CAFd5g45f3X3xF2vz2BkTHRqOC4uW6GZxtUUMaP5mwwbK8uNVtA@mail.gmail.com/ [3] https://lore.kernel.org/linux-kselftest/CANpmjNOdSy6DuO6CYZ4UxhGxqhjzx4tn0sJMbRqo2xRFv9kX6Q@mail.gmail.com/ Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan tools/testing/kunit/kunit.py | 7 +++-- tools/testing/kunit/kunit_config.py | 11 ++++++- tools/testing/kunit/kunit_kernel.py | 38 +++++++++++++++-------- tools/testing/kunit/kunit_tool_test.py | 56 +++++++++++++++++++++++++++++----- 4 files changed, 89 insertions(+), 23 deletions(-) commit e670f5d672ef3d00b0b8c69eff09a019e6dd4ef9 Author: Ming Qian Date: Fri Jul 8 09:56:50 2022 +0100 media: amphion: only insert the first sequence startcode for vc1l format For format V4L2_PIX_FMT_VC1_ANNEX_L, the amphion vpu requires driver to help insert some custom startcode before sequence and frame. but only the first sequence startcode is needed, the extra startcode will cause decoding error. So after seek, we don't need to insert the sequence startcode. In other words, for V4L2_PIX_FMT_VC1_ANNEX_L, the vpu doesn't support dynamic resolution change. Fixes: 145e936380edb ("media: amphion: implement malone decoder rpc interface") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/amphion/vdec.c | 2 +- drivers/media/platform/amphion/vpu.h | 1 + drivers/media/platform/amphion/vpu_malone.c | 2 ++ drivers/media/platform/amphion/vpu_rpc.h | 7 ++++++- 4 files changed, 10 insertions(+), 2 deletions(-) commit d8f1eb105eab7aab36323c6b488dda479d5bd2da Author: Ming Qian Date: Fri Jul 1 06:50:04 2022 +0100 media: amphion: sync buffer status with firmware during abort 1. prevent to allocate buffer to firmware during abort 2. release buffer when clear the slots Fixes: 6de8d628df6ef ("media: amphion: add v4l2 m2m vpu decoder stateful driver") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/amphion/vdec.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 177d841fa19542eb35aa5ec9579c4abb989c9255 Author: Ezequiel Garcia Date: Wed Jun 29 20:56:23 2022 +0100 media: hantro: Fix RK3399 H.264 format advertising Commit 1f82f2df523cb ("media: hantro: Enable H.264 on Rockchip VDPU2") enabled H.264 on some SoCs with VDPU2 cores. This had the side-effect of exposing H.264 coded format as supported on RK3399. Fix this and clarify how the codec is explicitly disabled on RK3399 on this driver. Fixes: 1f82f2df523cb ("media: hantro: Enable H.264 on Rockchip VDPU2") Signed-off-by: Ezequiel Garcia Tested-by: Nicolas Dufresne Reviewed-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/rockchip_vpu_hw.c | 60 +++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 7 deletions(-) commit 6d9c9fbd35dc38933c3e155121b28c67230d93d8 Author: Akira Yokosawa Date: Wed Jun 29 14:01:17 2022 +0100 media: docs: Remove extraneous \endgroup from P010 table The \endgroup command at the bottom of a table added in commit 5374d8fb75f3 ("media: Add P010 video format") doesn't have a corresponding \begingroup command preceding it. This imbalance causes an build error in "make pdfdocs". Fix the issue by removing it. Signed-off-by: Akira Yokosawa Fixes: 5374d8fb75f3 ("media: Add P010 video format") Cc: Benjamin Gaignard Cc: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst | 3 --- 1 file changed, 3 deletions(-) commit 57020a3e24090ca03bfede1c0b4897eb2f4a5469 Author: Krzysztof Kozlowski Date: Wed Jun 29 13:08:03 2022 +0100 media: dt-bindings: media: samsung,s5pv210-jpeg: convert to dtschema Convert the Samsung SoC JPEG codec bindings to DT schema. The original bindings were quite old and incomplete, so change during conversion: 1. Add typical (already used) properties like iommus and power domains. 2. Document samsung,exynos4212-jpeg compatible (already used in DTS and driver). 3. List clocks per each variant. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../bindings/media/exynos-jpeg-codec.txt | 16 --- .../bindings/media/samsung,s5pv210-jpeg.yaml | 123 +++++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 124 insertions(+), 16 deletions(-) commit afba6e20801ad9a2f863c52c21e609e021269d83 Author: Ming Qian Date: Tue Jun 28 06:21:12 2022 +0100 media: amphion: defer setting last_buffer_dequeued until resolution changes are processed Don't set last_buffer_dequeued during dynamic resolution change, otherwise it may be cleared in handling resolution change, as streamoff may be called in dynamic resolution change. Normally, this does not happen. But we encounter a special testcase, User issue V4L2_DEC_CMD_STOP after enqueue one buffer that only contains codec config header, but not any frame data. So VPU report the parsed resolution, then report the eos event. So driver should notify user to handle resolution change first, after it's handled, set the last_buffer_dequeued. then the user can exit decoding normally. Otherwise the user may be stalled. Fixes: 6de8d628df6ef ("media: amphion: add v4l2 m2m vpu decoder stateful driver") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/amphion/vdec.c | 36 +++++++++++++++++++------------ drivers/media/platform/amphion/vpu_v4l2.c | 2 +- 2 files changed, 23 insertions(+), 15 deletions(-) commit fe3d651627d61210c6905339e5281d3b9db75033 Author: Chen-Yu Tsai Date: Mon Jul 4 09:49:30 2022 +0100 media: mediatek: vcodec: Initialize decoder parameters for each instance The decoder parameters are stored in each instance's context data. This needs to be initialized per-instance, but a previous fix incorrectly changed it to only be initialized for the first opened instance. This resulted in subsequent instances not correctly signaling the requirement for the Requests API. Fix this by calling the initializing function outside of the v4l2_fh_is_singular() conditional block. Fixes: faddaa735c20 ("media: mediatek: vcodec: Initialize decoder parameters after getting dec_capability") Signed-off-by: Chen-Yu Tsai Reviewed-by: Yunfei Dong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cfce5b186537b0339d0872aa209a927e4a04be52 Author: Chen-Yu Tsai Date: Wed Jul 6 09:21:38 2022 +0100 media: mediatek: vcodec: decoder: Embed framesize inside mtk_video_fmt Right now the decoder maintains two separate lists for supported pixel formats and frame sizes. Getting the supported frame sizes for the current set format is a bit convoluted, requiring a search through the separate frame size list. The frame sizes are used to clamp and align requested resolutions. Instead, the frame size structure could be embedded inside the pixel format structure. Getting one also gets the other. And since the the driver already keeps pointers to the current set format, getting the frame sizes becomes straightforward. Do just that. Move v4l2_frmsize_stepwise inside mtk_video_fmt, and get rid of mtk_codec_framesizes. Signed-off-by: Chen-Yu Tsai Tested-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../platform/mediatek/vcodec/mtk_vcodec_dec.c | 36 ++++++---------------- .../mediatek/vcodec/mtk_vcodec_dec_stateful.c | 29 ++++------------- .../mediatek/vcodec/mtk_vcodec_dec_stateless.c | 23 ++++---------- .../platform/mediatek/vcodec/mtk_vcodec_drv.h | 16 +--------- 4 files changed, 22 insertions(+), 82 deletions(-) commit e8d266d533b171387945f8a0bad1944a5609f63b Author: Chen-Yu Tsai Date: Wed Jul 6 09:21:37 2022 +0100 media: mediatek: vcodec: decoder: Drop max_{width,height} from mtk_vcodec_ctx This partially reverts commit b018be06f3c7 ("media: mediatek: vcodec: Read max resolution from dec_capability"). After the previous patches: - media: mediatek: vcodec: decoder: Fix 4K frame size enumeration - media: mediatek: vcodec: decoder: Skip alignment for default resolution - media: mediatek: vcodec: decoder: Fix resolution clamping in TRY_FMT the max_{width,height} fields in |struct mtk_vcodec_ctx| no longer have any real users. Remove them. Fixes: b018be06f3c7 ("media: mediatek: vcodec: Read max resolution from dec_capability") Signed-off-by: Chen-Yu Tsai Tested-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c | 9 --------- drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h | 4 ---- 2 files changed, 13 deletions(-) commit d7abd054201377aa441411ca081bd903fba82ce0 Author: Chen-Yu Tsai Date: Wed Jul 6 09:21:36 2022 +0100 media: mediatek: vcodec: decoder: Fix resolution clamping in TRY_FMT In commit b018be06f3c7 ("media: mediatek: vcodec: Read max resolution from dec_capability"), TRY_FMT clamps the resolution to the maximum that was previously set either by default 1080p or the limit set by a previous S_FMT call. This does not make sense when doing TRY_FMT for the output side, which may have different capabilities. Instead, for the output side, find the maximum resolution based on the pixel format requested. For the capture side, find the maximum resolution based on the currently set output format. The maximum resolution is found from the list of per-format frame sizes, so the patch "media: mediatek: vcodec: dec: Fix 4K frame size enumeration" is needed. Fixes: b018be06f3c7 ("media: mediatek: vcodec: Read max resolution from dec_capability") Signed-off-by: Chen-Yu Tsai Tested-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../platform/mediatek/vcodec/mtk_vcodec_dec.c | 48 ++++++++++++++++------ 1 file changed, 36 insertions(+), 12 deletions(-) commit 3b6a81a31370539f1fd0e9bdd315503aa154285e Author: Chen-Yu Tsai Date: Wed Jul 6 09:21:35 2022 +0100 media: mediatek: vcodec: decoder: Skip alignment for default resolution The default resolution of 64x64 is already aligned, according to the call to v4l_bound_align_image() in mtk_vcodec_dec_set_default_params(). Drop the redundant v4l_bound_align_image() call. This also removes one usage of ctx->max_{width,height}. Signed-off-by: Chen-Yu Tsai Tested-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c | 7 ------- 1 file changed, 7 deletions(-) commit f1748f8f8174a65a885a8e6c0dc11658a6705ac2 Author: Chen-Yu Tsai Date: Wed Jul 6 09:21:34 2022 +0100 media: mediatek: vcodec: decoder: Fix 4K frame size enumeration This partially reverts commit b018be06f3c7 ("media: mediatek: vcodec: Read max resolution from dec_capability"). In this commit, the maximum resolution ended up being a function of both the firmware capability and the current set format. However, frame size enumeration for output (coded) formats should not depend on the format set, but should return supported resolutions for the format requested by userspace. Fix this so that the driver returns the supported resolutions correctly, even if the instance only has default settings, or if the output format is currently set to VP8F, which does not support 4K. This adds an copy of special casing for !VP8 and 4K support. The other existing copy will be removed when .max_{width,height} are removed from |struct mtk_vcodec_ctx| in a subsequent patch. Fixes: b018be06f3c7 ("media: mediatek: vcodec: Read max resolution from dec_capability") Signed-off-by: Chen-Yu Tsai Tested-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c | 2 -- drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.c | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit 106be65a4119b299c676fcedd247e3ca67186f59 Author: Chen-Yu Tsai Date: Wed Jul 6 09:21:33 2022 +0100 media: mediatek: vcodec: decoder: Const-ify stepwise_fhd stepwise_fhd is the reference framesize variable, and should not be altered. Make it constant. Fixes: ("76250b48de79 media: mediatek: vcodec: Getting supported decoder format types") Signed-off-by: Chen-Yu Tsai Tested-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f6e8050f7de88b46422b4e3d234f7beb20284de Author: Laurent Pinchart Date: Tue May 10 03:06:45 2022 +0100 media: staging: media: imx: imx7-media-csi: Drop usage of shared helpers None of the shared helpers are used anymore. Make this official by dropping inclusion of imx-media.h. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 2 -- 1 file changed, 2 deletions(-) commit fc9d988a5acdb68d39e9e76870627d48068bf830 Author: Laurent Pinchart Date: Tue May 10 03:06:45 2022 +0100 media: staging: media: imx: imx7-media-csi: Drop V4L2 events support The only event that the driver allows subscribing to, V4L2_EVENT_IMX_FRAME_INTERVAL_ERROR, is never generated. Drop events support. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 67c4b3f2e344bc61e288ace618a035495973e843 Author: Laurent Pinchart Date: Tue May 10 10:47:34 2022 +0100 media: staging: media: imx: imx7-media-csi: Inline imx7_csi_enum_pixel_formats() Inline the imx7_csi_enum_pixel_formats() function in its only caller. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 84 ++++++++++++------------------ 1 file changed, 34 insertions(+), 50 deletions(-) commit 820552fbfc2b88e85d7288dff5e657420b192948 Author: Laurent Pinchart Date: Tue May 10 10:47:34 2022 +0100 media: staging: media: imx: imx7-media-csi: Drop unneeded pixel format validation The driver won't accept unsupported pixel formats, there's thus no need to validate it in imx7_csi_pad_link_validate(). Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 33 ------------------------------ 1 file changed, 33 deletions(-) commit ba9b219f914b9507cf6a69cfe5b12a762271f55d Author: Laurent Pinchart Date: Tue May 10 10:47:34 2022 +0100 media: staging: media: imx: imx7-media-csi: Add V4L2_PIX_FMT_Y14 support The device supports 14-bit greyscale formats the same way it supports 14-bit Bayer formats. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 5 +++++ 1 file changed, 5 insertions(+) commit a4da0cee0d46c5ee12fda6feec840227232474c7 Author: Laurent Pinchart Date: Tue May 10 10:47:34 2022 +0100 media: staging: media: imx: imx7-media-csi: Fix list of supported formats The list of supported formats comes from helpers shared with the i.MX6 IPUv3 and is incorrect in multiple regards: - 10-, 12- and 14-bit Bayer formats are stored in memory as SBGGR10, SBGGR12 and SBGGR14 respectively (plus components permutations), not SBGGR16. Same thing for greyscale formats. - 16-bit RAW formats are not supported by the hardware. Fix the supported formats table. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 94 +++++++++++++++++------------- 1 file changed, 55 insertions(+), 39 deletions(-) commit a1a60e7ac274dccadad81d8c78f8c8fb419be86d Author: Laurent Pinchart Date: Tue May 10 10:47:34 2022 +0100 media: staging: media: imx: imx7-media-csi: Simplify default format in try_fmt When trying a format on the video node, if the requested pixel format isn't supported, fallback to the default with a simpler logic. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 5c42cd9dfa7d39ded3a2095ac4208b84d14298bd Author: Laurent Pinchart Date: Tue May 10 03:06:45 2022 +0100 media: staging: media: imx: imx7-media-csi: Inline imx7_csi_init_mbus_fmt() Inline the imx7_csi_init_mbus_fmt() function in its only caller. This allows simplifying the code. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 54 +++++++++--------------------- 1 file changed, 15 insertions(+), 39 deletions(-) commit 3ee396ed91c7d4ae7fbc9a391525c2e610014295 Author: Laurent Pinchart Date: Tue May 10 03:06:45 2022 +0100 media: staging: media: imx: imx7-media-csi: Drop unneeded imx7_csi_pixfmt fields The imx7_csi_pixfmt cycles field is never used nor set, the bayer field is never used, and the planar field is never set. Drop them. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) commit 2d35c1ff83c0951e37c7a02fd1a784d35b7ce1df Author: Laurent Pinchart Date: Tue May 10 03:06:45 2022 +0100 media: staging: media: imx: imx7-media-csi: Drop YUV/RGB/BAYER format selectors All the format lookup functions are called with a ANY selector, drop selector support. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 105 ++++++----------------------- 1 file changed, 22 insertions(+), 83 deletions(-) commit 539a9859768dffec27623644268c232895bc7bc0 Author: Laurent Pinchart Date: Tue May 10 03:06:45 2022 +0100 media: staging: media: imx: imx7-media-csi: Simplify default mbus code in try_fmt When trying a format on the subdev sink pad, if the requested media bus code isn't supported, fallback to the default with a simpler logic. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 148709ad22cb5d2745ef075948ba2411645a590f Author: Laurent Pinchart Date: Tue May 10 03:06:45 2022 +0100 media: staging: media: imx: imx7-media-csi: Define macro for default mbus code Define a macro for the default media bus code and use it through the driver to replace a hardcoded value and a dynamic query from the pixel_formats table. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 0eaa3d82d47021f9c634700c74bb2cadc43767bf Author: Laurent Pinchart Date: Tue May 10 03:06:45 2022 +0100 media: staging: media: imx: imx7-media-csi: Make default formats consistent Use the same default image width and height for both the CSI subdev and the video node to achieve a consistent default through the driver. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 1de014dc6bf91155d292c2a03905b9b1ebe1f67d Author: Laurent Pinchart Date: Tue May 10 03:06:45 2022 +0100 media: staging: media: imx: imx7-media-csi: Drop unsupported YUV and RGB formats A large number of formats defined in the pixel_formats array are not supported, as shown by the switch-case check in imx7_csi_pad_link_validate(). Drop them. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 55 ------------------------------ 1 file changed, 55 deletions(-) commit 6ad52b675f1be517cea3b1c45ddf1277860ab702 Author: Laurent Pinchart Date: Tue May 10 03:06:45 2022 +0100 media: staging: media: imx: imx7-media-csi: Drop IPU-only formats The formats specific to the IPUv3 are not supported by the CSI bridge. Drop them, along with the related code. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 98 ++---------------------------- 1 file changed, 6 insertions(+), 92 deletions(-) commit 44737d2ac4e03138527c6acd26db96405cbca1ca Author: Laurent Pinchart Date: Tue May 10 03:06:45 2022 +0100 media: staging: media: imx: imx7-media-csi: Drop IC support from imx7_csi_try_colorimetry() The imx7_csi_try_colorimetry() function supports the unrelated image converter hardware as it originates from shared helpers. Drop that. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) commit a61bfe662591ad22eab136b82725db1f023ecdea Author: Laurent Pinchart Date: Tue May 10 03:06:45 2022 +0100 media: staging: media: imx: imx7-media-csi: Replace ipu_color_space with bool yuv field Replace the enum ipu_color_space cs field in struct imx7_csi_pixfmt with a bool yuv field. This decouples the driver from the unrelated IPUv3 headers. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 71 +++++++++++------------------- 1 file changed, 26 insertions(+), 45 deletions(-) commit e352833d32e693279a83eda6ed752fbea25adf6f Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Import format helpers To prepare for code refactoring, copy the format helpers used by this driver from imx-media-utils.c. Rename structures and functions to avoid name clashes, no functional change intended. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 660 +++++++++++++++++++++++++++-- 1 file changed, 615 insertions(+), 45 deletions(-) commit 35b53d44e1bae0d98c75d0262d98dea3cd6037ce Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Drop error message on alloc failure The kernel memory allocators already complain loudly to the log when allocation fails. There's no need for an additional message. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 56ae4cac6dc4f73ac3fb6210170222a86b76f633 Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Decouple from shared macros Decouple from the IMX7_CSI_VIDEO_DEF_PIX_WIDTH, IMX7_CSI_VIDEO_DEF_PIX_HEIGHT and IMX_MEDIA_EOF_TIMEOUT macros defined in shared helpers by duplicating them in the imx7-media-csi driver, with a rename to avoid name clashes. No functional change intended. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 57327b0824052b474aee0f2088ce2bbb6689fe6e Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Decouple from imx_media_dma_buf Decouple from the imx_media_dma_buf structure defined in shared helpers by duplicating it in the imx7-media-csi driver, along with the two small alloc and free functions. No functional change intended. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 40 +++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 4 deletions(-) commit 0cc432b7412a783d4bf82dedebcca776792519ed Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Store imx7_csi in drv data Replace the subdev pointer stored in platform drv data with the imx7_csi pointer. Drop a now redundant dev_set_drvdata() call. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 084158200fda600409c93b18f729fbb2f7620485 Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Fold imx_media_video_dev into imx7_csi Now that the driver doesn't use any helper that relies on the imx_media_video_dev structure anymore, merge its fields directly in the imx7_csi structure. Update all the users accordingly, and drop the list field that isn't used by the driver. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 121 ++++++++++++++--------------- 1 file changed, 57 insertions(+), 64 deletions(-) commit 1f55211b1b1e207c4fd93c3cbc7a9d856773fcca Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Decouple from imx_media_buffer Decouple from the imx_media_buffer structure defined in shared helpers by duplicating it in the imx7-media-csi driver. No functional change intended. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 41 ++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 14 deletions(-) commit b6ae101900fca6c89e64a8c52b9a0acc30e8099d Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Fold imx_media_dev into imx7_csi Now that the driver doesn't use any helper that relies on the imx_media_dev structure anymore, merge the three fields of the imx_media_dev structure directly in the imx7_csi structure. Update all the users accordingly. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 61 +++++++++++++++--------------- 1 file changed, 30 insertions(+), 31 deletions(-) commit f5c673428b7e9460b71fe4196286c0eb33ea8692 Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Inline pipeline start/stop The imx7_csi_media_pipeline_set_stream() function has separate branches for the start and stop paths, surrounded by mutex lock/unlock. That is very little shared code, inline the locking and corresponding branch in each of the two callers. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 58 ++++++++++++------------------ 1 file changed, 22 insertions(+), 36 deletions(-) commit a3ec6bc1af391b3115c683711d80bc704e8dd16b Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Avoid unnecessary casts Simplify the imx7_csi_media_pipeline_set_stream() function by passing it the imx7_csi pointer, which avoids going from subdev to entity and back to subdev. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 31 ++++++++++-------------------- 1 file changed, 10 insertions(+), 21 deletions(-) commit 9d75fc9917708c1852650fab3ff743a97d5fec3c Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Import imx_media_pipeline_set_stream() To prepare for code refactoring, copy the imx_media_pipeline_set_stream() helper used by this driver from imx-media-utils.c. Rename the function to avoid name clashes, no functional change intended. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 40 ++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) commit 7d3bee233ce17ef55436e191890ae57774053379 Author: Laurent Pinchart Date: Tue May 10 01:37:01 2022 +0100 media: staging: media: imx: imx7-media-csi: Inline imx_media_pipeline_pad() Inline the imx_media_pipeline_pad() helper, dropping all the code unused by the imx7-media-csi driver. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 3777d61b2b40f400888aa7bb27546d7ee5f52b08 Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Don't initialize unused fields The imx_media_dev structure contains three fields that are not used by this driver or any helper code that it calls. Don't initialize them. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 6 ------ 1 file changed, 6 deletions(-) commit 55eb173fe23b57473c6f06d6cc28f99202c50d07 Author: Laurent Pinchart Date: Tue May 10 01:25:26 2022 +0100 media: staging: media: imx: imx7-media-csi: Drop imx_media_add_video_device call There's no need to call imx_media_add_video_device() anymore, as the video devices list it manages is only used by the control inheritance mechanism in the helpers, which this driver doesn't use. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 3 --- 1 file changed, 3 deletions(-) commit 23bcc91082c879ba86a95a437e10bf4b64f65693 Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Embed imx_media_dev in imx7_csi There's no need anymore to allocate the imx_media_dev structure separately from imx7_csi. Embed it. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 47 +++++++++++++----------------- 1 file changed, 20 insertions(+), 27 deletions(-) commit 1ab24f2e24bd1d0d85d6294b2e9412ecced12a59 Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Import imx_media_dev_init() helper To prepare for code refactoring, copy the imx_media_dev_init() helper used by this driver from imx-media-dev-common.c. Rename the function to avoid name clashes, and leave the v4l2_device notify handler out as it only serves to implement control inheritance, which this driver doesn't use. No functional change intended. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 50 +++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) commit be3e378b2d14fcbbcf368f37628520e9f0262bca Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Don't set subdev group id The subdev group id isn't used by any of the remaining helpers used by this driver, don't set it. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 7 ------- 1 file changed, 7 deletions(-) commit 31959b981c231fd1e51c67c5de5d1795315d399a Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Ensure consistent function prefix Rename all the functions and macros imported from imx-media-capture.c with a consistent imx7_csi_video_ prefix. No functional change intended. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 164 ++++++++++++++--------------- 1 file changed, 80 insertions(+), 84 deletions(-) commit 9f10ecffacfda807061bfbbe0bbbd5f7f36d7e6b Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Fold capture_priv into imx7_csi Merge the capture_priv fields in the imx7_csi structure as there's no more need to have two separate structures. Update all the users accordingly. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 271 +++++++++++++---------------- 1 file changed, 117 insertions(+), 154 deletions(-) commit 356345aaed591167aa1855ffe7adb42d5221c397 Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Reorganize imx7_csi structure The struct imx7_csi fields are in a random order, reorganize them logically to prepare for adding new fields. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 36 +++++++++++++++++------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit 42bfdc8249a65388a22a3843205a418bbbcdefdb Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Drop unused controls support Drop the unused control handler from the driver. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit 49b74aa523a9f2e477847c8d2b30eae3f445f3e0 Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Drop legacy video device support Drop all the code related to the unused (by this driver) legacy video device support. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 31 ++++++------------------------ 1 file changed, 6 insertions(+), 25 deletions(-) commit 01ac6b7542872ec8c42e03b8e7dd92537994bc0e Author: Laurent Pinchart Date: Mon May 9 23:32:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Import video device helpers To prepare for code refactoring, copy the video device helper code used by this driver verbatim from imx-media-capture. Rename some functions to avoid name clashes, and leave the legacy ioctls out as they're not used by the imx7-media-csi driver. No functional change included. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 712 ++++++++++++++++++++++++++++- 1 file changed, 702 insertions(+), 10 deletions(-) commit 08b1fedddf1c7db7c7278cc1f985b394fd1a4bf1 Author: Paul Elder Date: Fri May 6 12:36:58 2022 +0100 media: staging: media: imx: imx7-media-csi: Remove imx_media_of_add_csi imx_media_of_add_csi() from imx-media-of.c validates that the fwnode for the CSI bridge is enabled, and adds the fwnode to the async notifier of the imxmd. The former is redundant, as if the CSI bridge driver probes, clearly it is enabled in the DT. The latter is not needed as the imxmd notifier isn't used anymore. The call is thus not needed and can be dropped. This removes the dependency of imx7-media-csi.c on imx-media-of.c. Signed-off-by: Paul Elder Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 4 ---- 1 file changed, 4 deletions(-) commit 8ace5084d102c4bdc83cb4f8caa69754c2426f9d Author: Laurent Pinchart Date: Sun Feb 6 05:13:53 2022 +0000 media: staging: media: imx: imx7-media-csi: Move format init to probe time There's no need to wait until the subdev is registered to initialize the active pad formats. Do so at probe time. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 43 +++++++++++++----------------- 1 file changed, 18 insertions(+), 25 deletions(-) commit 85f8673fa155793199cd1835bee9d68634db9ff7 Author: Laurent Pinchart Date: Sun Feb 6 05:13:53 2022 +0000 media: staging: media: imx: imx7-media-csi: Drop unused frame_interval The frame_interval field of the imx7_csi structure is set but never used. Drop it. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 5 ----- 1 file changed, 5 deletions(-) commit 46332d14eb1b1c0a5a8d57473779386769ae7d15 Author: Laurent Pinchart Date: Sun Feb 6 05:13:53 2022 +0000 media: staging: media: imx: imx7-media-csi: Don't populate vdev lists The imx_media_dev framework maintains a per-pad list of connected video devices, created once all subdevs have been bound. This is used for two purposes, updating V4L2 control inheritance when links change, and relaying subdev events to video nodes. None of these are used by the imx7-media-csi driver as it implements the MC-centric approach. Drop them. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 167 +++-------------------------- 1 file changed, 17 insertions(+), 150 deletions(-) commit f9806bd2b42d99ee321fca9757061c23666b8510 Author: Paul Elder Date: Thu May 5 13:48:33 2022 +0100 media: staging: media: imx: imx7-media-csi: Move misc init out of probe() There is a chunk of miscellaneous initializations related to the CSI subdev and media pads directly in the probe function. Move them into the imx7_csi_media_init() function to clean up the probe function. Signed-off-by: Paul Elder Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 60 ++++++++++++++++-------------- 1 file changed, 33 insertions(+), 27 deletions(-) commit d79d5e00be510f8bae4ded0e853238d3f50cd5db Author: Laurent Pinchart Date: Sun Feb 6 05:13:53 2022 +0000 media: staging: media: imx: imx7-media-csi: Drop the imx_media notifier The V4L2 async notifier embedded in the imx_media_dev structure is triggered when the CSI bridge subdev is registered. We don't need an async notifier for this, as we can call the .complete() handler directly from the CSI bridge subdev .registered() handler. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 66 +++++++++--------------------- 1 file changed, 19 insertions(+), 47 deletions(-) commit 3c05e2dd4f596aaa01fd295ca30983999d6517dd Author: Laurent Pinchart Date: Sun Feb 6 05:13:53 2022 +0000 media: staging: media: imx: imx7-media-csi: Drop duplicate link creation The imx_media_create_csi2_links() creates a media controller link between the CSI-2 receiver and the next entity in the pipeline, which can be either a video mux (handled by the video-mux driver) or the CSI bridge itself. This isn't needed, as the link is already created either by the video-mux driver or by the imx7-media-csi driver itself (in imx7_csi_notify_bound()). Drop imx_media_create_csi2_links(), which allows dropping the CSI bridge subdev grp_id. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 31 ------------------------------ 1 file changed, 31 deletions(-) commit bdf861aba4b842012b5eec57b320727e4dc4761a Author: Laurent Pinchart Date: Sun Feb 6 05:13:53 2022 +0000 media: staging: media: imx: imx7-media-csi: Import notifier helpers To prepare for code refactoring, copy the V4L2 async notifier helper code used by this driver verbatim from imx-media-dev-common.c. Rename some functions to avoid name clashes. No functional change included. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 210 ++++++++++++++++++++++++++++- 1 file changed, 209 insertions(+), 1 deletion(-) commit a314327c9d16b6a36737fc3ac8c2ba7fe65e2138 Author: Laurent Pinchart Date: Sat Feb 5 04:16:36 2022 +0000 media: staging: media: imx: imx7-media-csi: Split imx_media_dev from probe() Prepare for the decoupling of the imx7-media-csi driver from the IPUv3-based drivers by moving the imx_media_dev handling from probe() function to separate functions. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 74 ++++++++++++++++++------------ 1 file changed, 45 insertions(+), 29 deletions(-) commit 34d868e862e7c4aa4b284e8c95ea8e37d475c62c Author: Laurent Pinchart Date: Sat Feb 5 04:16:36 2022 +0000 media: staging: media: imx: imx7-media-csi: Initialize locks early on Group all the direct initialization of imx7_csi fields at the beginning of the imx7_csi_probe() function instead of spreading them around. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit b73560c81f623b16db52cd546aba763c6ee99bd8 Author: Laurent Pinchart Date: Wed May 25 10:16:04 2022 +0100 media: renesas: rcar_drif: Drop of_match_ptr() The device_driver structure's of_match_table field exists unconditionally, so there's no need for of_match_ptr(). This fixes a compiler warning when test-compiling on non-OF platforms: drivers/media/platform/renesas/rcar_drif.c:1470:34: warning: unused variable 'rcar_drif_of_table' [-Wunused-const-variable] static const struct of_device_id rcar_drif_of_table[] = { ^ Reported-by: kernel test robot Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/renesas/rcar_drif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91bbc1b1750c477d13e6f3d3117f6ed161ac02e0 Author: Jiang Jian Date: Thu Jun 23 13:29:48 2022 +0100 media: xilinx: Drop unexpected word 'with' in comments There is an unexpected word 'with' in the comments that need to be dropped. Signed-off-by: Jiang Jian Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/xilinx/xilinx-vip.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 69681cd04164812e4089f3f57e450e9b7c27c1c2 Author: Marek Vasut Date: Sun Jun 19 00:54:43 2022 +0100 media: mt9p031: Move open subdev op init code into init_cfg The .open subdev op is not always called soon enough to initialize the default crop settings. Move all this initialization into .init_cfg op instead. Signed-off-by: Marek Vasut Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/mt9p031.c | 71 ++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 36 deletions(-) commit 92fa766bb4189dc1110ba1fa10a391e27826725d Author: Marek Vasut Date: Sat Jun 18 23:22:55 2022 +0100 media: mt9p031: Add MT9P006 compatible Add compatible for MT9P006 sensor, which is older variant of MT9P031 and compatible with this driver. Signed-off-by: Marek Vasut Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/mt9p031.c | 2 ++ 1 file changed, 2 insertions(+) commit dbeb232726871352fc3e688ff5b02897f8cb0dc7 Author: Soumya Negi Date: Fri Jul 1 05:50:52 2022 -0700 selftests: drivers/dma-buf: Improve message in selftest summary Selftest udmabuf for the dma-buf driver is skipped when the device file (e.g. /dev/udmabuf) for the DMA buffer cannot be opened i.e. no DMA buffer has been allocated. This patch adds clarity to the SKIP message. Signed-off-by: Soumya Negi Signed-off-by: Shuah Khan tools/testing/selftests/drivers/dma-buf/udmabuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ff682226a353d88ffa5db9c2a9b945066776311e Author: Gautam Menghani Date: Thu Jun 30 00:58:22 2022 +0530 selftests/kcmp: Make the test output consistent and clear Make the output format of this test consistent. Currently the output is as follows: +TAP version 13 +1..1 +# selftests: kcmp: kcmp_test +# pid1: 45814 pid2: 45815 FD: 1 FILES: 1 VM: 2 FS: 1 SIGHAND: 2 + IO: 0 SYSVSEM: 0 INV: -1 +# PASS: 0 returned as expected +# PASS: 0 returned as expected +# PASS: 0 returned as expected +# # Planned tests != run tests (0 != 3) +# # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0 +# # Planned tests != run tests (0 != 3) +# # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0 +# # Totals: pass:0 fail:0 xfail:0 xpass:0 skip:0 error:0 +ok 1 selftests: kcmp: kcmp_test With this patch applied the output is as follows: +TAP version 13 +1..1 +# selftests: kcmp: kcmp_test +# TAP version 13 +# 1..3 +# pid1: 46330 pid2: 46331 FD: 1 FILES: 2 VM: 2 FS: 2 SIGHAND: 1 + IO: 0 SYSVSEM: 0 INV: -1 +# PASS: 0 returned as expected +# PASS: 0 returned as expected +# PASS: 0 returned as expected +# # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0 +ok 1 selftests: kcmp: kcmp_test Signed-off-by: Gautam Menghani Signed-off-by: Shuah Khan tools/testing/selftests/kcmp/kcmp_test.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 76283baf715cda8c8521c570d979a718f4f87665 Author: Marek Vasut Date: Sat Jun 18 23:22:54 2022 +0100 media: dt-bindings: mt9p031: Add MT9P006 compatible string Add compatible for MT9P006 sensor, which is older variant of MT9P031 and compatible with this driver. Signed-off-by: Marek Vasut Acked-by: Rob Herring Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/i2c/aptina,mt9p031.yaml | 1 + 1 file changed, 1 insertion(+) commit aab941b8c3cfb020baf2218e9e39706e05bf4877 Author: Samuel Holland Date: Mon Jun 20 22:54:52 2022 -0500 arm64: dts: allwinner: pinephone: Enable internal HMIC bias Revisions 1.0 and 1.1 of the PinePhone mainboard do not have an external resistor connecting HBIAS to MIC2P. Enable the internal resistor to provide the necessary headeset microphone bias. Signed-off-by: Samuel Holland Reviewed-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220621035452.60272-4-samuel@sholland.org arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts | 4 ++++ arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts | 4 ++++ 2 files changed, 8 insertions(+) commit f064f018a8e89e66ef40c3b0fad66a60a49a9f23 Author: Li zeming Date: Mon Jul 4 03:28:07 2022 +0100 media: staging/media/atomisp/pci/atomisp: Fix typo in string Remove the repeated ',' from string Link: https://lore.kernel.org/linux-media/20220704022807.3215-1-zeming@nfschina.com Signed-off-by: Li zeming Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71074d3783230ad99cb351a5cba69ce15febeca1 Author: Colin Ian King Date: Tue Jun 28 16:24:51 2022 +0100 media: atomisp: clean up for-loop, remove redundant assignment to variable i There is a for-loop that initializes variable i but does not use it; the assignment is redundant and can be removed. The proceeding assignment to pointer fw can also be moved into the for-loop to clean up the code. Link: https://lore.kernel.org/linux-media/20220628152451.184416-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/sh_css.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e8f05165b55adc3122debf8d343cd2ade59381e7 Author: Samuel Holland Date: Fri Jul 1 23:24:47 2022 -0500 dt-bindings: arm: sunxi: Add several MBUS compatibles All of the sunxi SoCs since at least the A33 have a similar structure for the MBUS and DRAM controller, but they all have minor differences in MBUS port assignments and DRAM controller behavior. Give each SoC its own compatible. Signed-off-by: Samuel Holland Acked-by: Rob Herring Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220702042447.26734-2-samuel@sholland.org .../bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2ffe47608df318db8c8f49cd52b8a5f9ac7ed6dc Author: Samuel Holland Date: Fri Jul 1 23:24:46 2022 -0500 dt-bindings: arm: sunxi: Default to the full MBUS binding Some older SoCs use a deprecated MBUS binding with some clocks missing. Currently, new SoCs must opt in to the complete binding. This should be the default, so new SoCs do not accidentally use the deprecated version. Signed-off-by: Samuel Holland Acked-by: Rob Herring Reviewed-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220702042447.26734-1-samuel@sholland.org .../bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit faf5b7971af9edb7c6b59b7a8c47980be099472e Author: Karthik Alapati Date: Wed Jun 22 17:39:00 2022 +0100 media: staging: media/atomisp: use max() impl fix a coccinelle warning by replacing opencoded max() implementation with max() WARNING opportunity for max() Link: https://lore.kernel.org/linux-media/YrNFpF2qvTxpZP8e@karthik-strix-linux.karthek.com Signed-off-by: Karthik Alapati Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 871f13fe12d285e97febd673161da82ce46a84b4 Author: Jiang Jian Date: Wed Jun 22 15:34:42 2022 +0100 media: atomisp: Fix typo in comments Remove the repeated word 'and' from comments file: drivers/staging/media/atomisp/pci/hive_isp_css_include/host/debug_public.h line: 28 * The buffer has a remote and and a local store changed to: * The buffer has a remote and a local store Link: https://lore.kernel.org/linux-media/20220622143442.16942-1-jiangjian@cdjrlc.com Signed-off-by: Jiang Jian Signed-off-by: Mauro Carvalho Chehab .../staging/media/atomisp/pci/hive_isp_css_include/host/debug_public.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c122ad91fc94f1643ca56f808f111b6b4c1646c Author: Ard Biesheuvel Date: Mon Jun 20 11:08:19 2022 +0100 media: atomisp_gmin_platform: stop abusing efivar API As the code comment already suggests, using the efivar API in this way is not how it is intended, and so let's switch to the right one, which is simply to call efi.get_variable() directly after checking whether or not the GetVariable() runtime service is supported. Link: https://lore.kernel.org/linux-media/20220620100819.1682995-1-ardb@kernel.org Cc: Sakari Ailus Signed-off-by: Ard Biesheuvel Acked-by: Greg Kroah-Hartman Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp_gmin_platform.c | 27 +++++----------------- 1 file changed, 6 insertions(+), 21 deletions(-) commit 1713dceb5753b1e71a86d0ce467993405cedb0e6 Author: Hans de Goede Date: Sun Jun 12 17:05:56 2022 +0100 media: atomisp: fix -Wdangling-pointer warning ia_css_rmgr_acq_vbuf() uses a local on stack "struct ia_css_rmgr_vbuf_handle v" variable. When this path using this is hit, either the rmgr_pop_handle() call will make *handle point to another vbuf-handle, or because v.count == 0, ia_css_rmgr_refcount_retain_vbuf() will alloc a new vbuf-handle and make *handle point to it. So on leaving the function *handle will never point to the on stack vbuf-handle, but gcc does not know this and emits the following: drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c: In function ‘ia_css_rmgr_acq_vbuf’: drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c:276:33: warning: storing the address of local variable ‘h’ in ‘*handle’ [-Wdangling-pointer=] 276 | *handle = &h; | ~~~~~~~~^~~~ drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c:257:40: note: ‘h’ declared here 257 | struct ia_css_rmgr_vbuf_handle h; | ^ drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c:257:40: note: ‘handle’ declared here Rework the code using a new_handle helper to suppress this false-postive compiler warning. Link: https://lore.kernel.org/linux-media/20220612160556.108264-4-hdegoede@redhat.com Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 42ec2f0714858376db064e87674c491d7f457e5d Author: Hans de Goede Date: Sun Jun 12 17:05:55 2022 +0100 media: atomisp: fix uninitialized stack mem usage in ia_css_rmgr_acq_vbuf() When ia_css_rmgr_acq_vbuf() enters the code path where it uses the local "struct ia_css_rmgr_vbuf_handle v" on the stack it relies on v.count==0 so that ia_css_rmgr_refcount_retain_vbuf allocates a new handle. Explicitly set v.count to 0 rather then it being whatever was on the stack. Link: https://lore.kernel.org/linux-media/20220612160556.108264-3-hdegoede@redhat.com Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3b36a8ce3d0c277fe243fa1be6bd3f606ed130f Author: Hans de Goede Date: Sun Jun 12 17:05:54 2022 +0100 media: atomisp: revert "don't pass a pointer to a local variable" The gcc is warning about returning a pointer to a local variable is a false positive. The type of handle is "struct ia_css_rmgr_vbuf_handle **" and "h.vptr" is left to NULL, so the "if ((*handle)->vptr == 0x0)" check always succeeds when the "*handle = &h;" statement which gcc warns about executes. Leading to this statement being executed: rmgr_pop_handle(pool, handle); If that succeeds, then *handle has been set to point to one of the pre-allocated array of handles, so it no longer points to h. If that fails the following statement will be executed: /* Note that handle will change to an internally maintained one */ ia_css_rmgr_refcount_retain_vbuf(handle); Which allocated a new handle from the array of pre-allocated handles and then makes *handle point to this. So the address of h is actually never returned. The fix for the false-postive compiler warning actually breaks the code, the new: **handle = h; is part of a "if (pool->copy_on_write) { ... }" which means that the handle where *handle points to should be treated read-only, IOW **handle must never be set, instead *handle must be set to point to a new handle (with a copy of the contents of the old handle). The old code correctly did this and the new fixed code gets this wrong. Note there is another patch in this series, which fixes the warning in another way. Link: https://lore.kernel.org/linux-media/20220612160556.108264-2-hdegoede@redhat.com Fixes: fa1451374ebf ("media: atomisp: don't pass a pointer to a local variable") Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 382311238135f2804f62b17a453a66fb551173c6 Author: Haowen Bai Date: Mon May 30 08:58:01 2022 +0100 media: atomisp-mt9m114: Fix pointer dereferenced before checking The info->data is dereferencing before null checking, so move it after checking. Link: https://lore.kernel.org/linux-media/1653897481-25681-1-git-send-email-baihaowen@meizu.com Signed-off-by: Haowen Bai Reviewed-by: Tommaso Merciai Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 09b204eb9de9fdf07d028c41c4331b5cfeb70dd7 Author: Xiaomeng Tong Date: Thu Apr 14 05:14:15 2022 +0100 media: [PATCH] pci: atomisp_cmd: fix three missing checks on list iterator The three bugs are here: __func__, s3a_buf->s3a_data->exp_id); __func__, md_buf->metadata->exp_id); __func__, dis_buf->dis_data->exp_id); The list iterator 's3a_buf/md_buf/dis_buf' will point to a bogus position containing HEAD if the list is empty or no element is found. This case must be checked before any use of the iterator, otherwise it will lead to a invalid memory access. To fix this bug, add an check. Use a new variable '*_iter' as the list iterator, while use the old variable '*_buf' as a dedicated pointer to point to the found element. Link: https://lore.kernel.org/linux-media/20220414041415.3342-1-xiam0nd.tong@gmail.com Cc: stable@vger.kernel.org Fixes: ad85094b293e4 ("Revert "media: staging: atomisp: Remove driver"") Signed-off-by: Xiaomeng Tong Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_cmd.c | 57 ++++++++++++++++--------- 1 file changed, 36 insertions(+), 21 deletions(-) commit ce2203e7d6de90d0d94ca3c98dde4eff3a0accd0 Author: Fabio M. De Francesco Date: Wed Apr 13 23:55:31 2022 +0100 media: staging: media: atomisp: Use kmap_local_page() in hmm_store() The use of kmap() is being deprecated in favor of kmap_local_page() where it is feasible. The same is true for kmap_atomic(). In file pci/hmm/hmm.c, function hmm_store() test if we are in atomic context and, if so, it calls kmap_atomic(), if not, it calls kmap(). First of all, in_atomic() shouldn't be used in drivers. This macro cannot always detect atomic context; in particular, it cannot know about held spinlocks in non-preemptible kernels. Notwithstanding what it is said above, this code doesn't need to care whether or not it is executing in atomic context. It can simply use kmap_local_page() / kunmap_local() that can instead do the mapping / unmapping regardless of the context. With kmap_local_page(), the mapping is per thread, CPU local and not globally visible. Therefore, hmm_store()() is a function where the use of kmap_local_page() in place of both kmap() and kmap_atomic() is correctly suited. Convert the calls of kmap() / kunmap() and kmap_atomic() / kunmap_atomic() to kmap_local_page() / kunmap_local() and drop the unnecessary tests which test if the code is in atomic context. Link: https://lore.kernel.org/linux-media/20220413225531.9425-1-fmdefrancesco@gmail.com Signed-off-by: Fabio M. De Francesco Reviewed-by: Ira Weiny Tested-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/hmm/hmm.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit aab1c42a9d77fb3f243aaab7f9f7ca14a6ffa7d2 Author: Fabio M. De Francesco Date: Wed Apr 13 22:22:10 2022 +0100 media: staging: media: atomisp: Use kmap_local_page() in hmm_set() The use of kmap() is being deprecated in favor of kmap_local_page() where it is feasible. In file pci/hmm/hmm.c, function hmm_set() calls kmap() / kunmap() where kmap_local_page() can instead do the mapping. With kmap_local_page(), the mapping is per thread, CPU local and not globally visible. Therefore, hmm_set()() is a function where the use of kmap_local_page() in place of kmap() is correctly suited. Convert the calls of kmap() / kunmap() to kmap_local_page() / kunmap_local(). Link: https://lore.kernel.org/linux-media/20220413212210.18494-1-fmdefrancesco@gmail.com Signed-off-by: Fabio M. De Francesco Reviewed-by: Ira Weiny Tested-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/hmm/hmm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9a92732f040ae3aeac017d0e80501cad1127a13d Author: Matt Roper Date: Fri Jul 1 16:20:06 2022 -0700 drm/i915/gt: Add general DSS steering iterator to intel_gt_mcr Although all DSS belong to a single pool on Xe_HP platforms (i.e., they're not organized into slices from a topology point of view), we do still need to pass 'group' and 'instance' targets when steering register accesses to a specific instance of a per-DSS multicast register. The rules for how to determine group and instance IDs (which previously used legacy terms "slice" and "subslice") varies by platform. Some platforms determine steering by gslice membership, some platforms by cslice membership, and future platforms may have other rules. Since looping over each DSS and performing steered unicast register accesses is a relatively common pattern, let's add a dedicated iteration macro to handle this (and replace the platform-specific "instdone" loop we were using previously. This will avoid the calling code needing to figure out the details about how to obtain steering IDs for a specific DSS. Most of the places where we use this new loop are in the GPU errorstate code at the moment, but we do have some additional features coming in the future that will also need to loop over each DSS and steer some register accesses accordingly. Signed-off-by: Matt Roper Reviewed-by: Matt Atwood Link: https://patchwork.freedesktop.org/patch/msgid/20220701232006.1016135-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_engine_cs.c | 34 ++++++++------------------ drivers/gpu/drm/i915/gt/intel_engine_types.h | 22 ----------------- drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 25 +++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_gt_mcr.h | 24 ++++++++++++++++++ drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 13 +++++----- drivers/gpu/drm/i915/i915_gpu_error.c | 32 ++++++++---------------- 6 files changed, 75 insertions(+), 75 deletions(-) commit 2ad935a15ffa38c7b4739c4f81665318f103b03d Author: Fabio M. De Francesco Date: Fri Apr 8 23:31:29 2022 +0100 media: staging: media: atomisp: Convert kmap() to kmap_local_page() The use of kmap() is being deprecated in favor of kmap_local_page() where it is feasible. With kmap_local_page(), the mapping is per thread, CPU local and not globally visible. load_and_flush_by_kmap() is a function where the use of kmap_local_page() in place of kmap() is correctly suited. Convert load_and_flush_by_kmap() from kmap() to kmap_local_page(). Link: https://lore.kernel.org/linux-media/20220408223129.3844-1-fmdefrancesco@gmail.com Signed-off-by: Fabio M. De Francesco Tested-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/hmm/hmm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e0a5915f1cca21da8ffc0563aea9fa1df5d16fb4 Author: Sean Christopherson Date: Fri Jul 8 09:21:24 2022 -0700 x86/sgx: Drop 'page_index' from sgx_backing Storing the 'page_index' value in the sgx_backing struct is dead code and no longer needed. Signed-off-by: Sean Christopherson Signed-off-by: Kristen Carlson Accardi Signed-off-by: Dave Hansen Link: https://lkml.kernel.org/r/20220708162124.8442-1-kristen@linux.intel.com arch/x86/kernel/cpu/sgx/encl.c | 1 - arch/x86/kernel/cpu/sgx/encl.h | 1 - 2 files changed, 2 deletions(-) commit 4167ac8a657e4f0860419adf24d4b91a26580488 Author: Roman Stratiienko Date: Tue Jul 5 10:52:26 2022 +0300 clk: sunxi-ng: sun50i: h6: Modify GPU clock configuration to support DFS Using simple bash script it was discovered that not all CCU registers can be safely used for DFS, e.g.: while true do devmem 0x3001030 4 0xb0003e02 devmem 0x3001030 4 0xb0001e02 done Script above changes the GPU_PLL multiplier register value. While the script is running, the user should interact with the user interface. Using this method the following results were obtained: | Register | Name | Bits | Values | Result | | -- | -- | -- | -- | -- | | 0x3001030 | GPU_PLL.MULT | 15..8 | 20-62 | OK | | 0x3001030 | GPU_PLL.INDIV | 1 | 0-1 | OK | | 0x3001030 | GPU_PLL.OUTDIV | 0 | 0-1 | FAIL | | 0x3001670 | GPU_CLK.DIV | 3..0 | ANY | FAIL | DVFS started to work seamlessly once dividers which caused the glitches were set to fixed values. Signed-off-by: Roman Stratiienko Reviewed-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220705075226.359475-1-r.stratiienko@gmail.com drivers/clk/sunxi-ng/ccu-sun50i-h6.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit c59d73d43fce92e79eddc047e1961054f1284384 Author: Alex Deucher Date: Fri Jul 8 01:17:57 2022 -0400 drm/amd/display: fix 32 bit compilation errors in dc_dmub_srv.c There are several things wrong here. First, none of these numbers are FP, so there is no need to cast to double. Next make sure to use proper 64 bit division helpers. Fixes: 85f4bc0c333c ("drm/amd/display: Add SubVP required code") Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/Makefile | 26 ----------- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 67 ++++++++++++++-------------- 2 files changed, 34 insertions(+), 59 deletions(-) commit b415bb7c976f1d595ed752001c0938f702645dab Author: Tamás Szűcs Date: Sun Jun 12 14:59:45 2022 +0000 arm64: tegra: Fix SDMMC1 CD on P2888 Hook SDMMC1 CD up with CVM GPIO02 (SOC_GPIO11) used for card detection on J4 (uSD socket) on the carrier. Fixes: ef633bfc21e9 ("arm64: tegra: Enable card detect for SD card on P2888") Signed-off-by: Tamás Szűcs Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7b93a088600b9d28a2fd74730e07f34c1311740 Author: Akhil R Date: Thu Jul 7 20:27:29 2022 +0530 arm64: tegra: Update compatible for Tegra234 GPCDMA Use the compatible specific to Tegra234 for GPCDMA to support additional features. Signed-off-by: Akhil R Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4bb39ca25b8bead724fb935c4603907b3da75bc8 Author: Mikko Perttunen Date: Mon Jun 27 17:19:58 2022 +0300 arm64: tegra: Add Host1x and VIC on Tegra234 Add device tree nodes for Host1x and VIC on Tegra234. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234.dtsi | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit e30cf1011b9615d0081b64c896bd9c1506068ab5 Author: Mikko Perttunen Date: Mon Jun 27 17:19:50 2022 +0300 arm64: tegra: Add Host1x context stream IDs on Tegra186+ Add Host1x context stream IDs on systems that support Host1x context isolation. Host1x and attached engines can use these stream IDs to allow isolation between memory used by different processes. The specified stream IDs must match those configured by the hypervisor, if one is present. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 11 +++++++++++ arch/arm64/boot/dts/nvidia/tegra194.dtsi | 11 +++++++++++ 2 files changed, 22 insertions(+) commit 28d860ed02c272e2c246c98e66cb013856a1f938 Author: Kartik Date: Mon Jul 4 13:43:42 2022 +0530 arm64: tegra: Enable native timers on Tegra234 The native timers IP block found on NVIDIA Tegra SoCs implements a watchdog timer that can be used to recover from system hangs. Add and enable the device tree node on Tegra234. Signed-off-by: Kartik Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 5aa9083efd67f25861ca55071b94dc906505e0c5 Author: Thierry Reding Date: Mon Jul 4 13:43:41 2022 +0530 arm64: tegra: Enable native timers on Tegra194 The native timers IP block found on NVIDIA Tegra SoCs implements a watchdog timer that can be used to recover from system hangs. Add and enable the device tree node on Tegra194. Signed-off-by: Thierry Reding Signed-off-by: Kartik Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra194.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit c710ac0bfe5281715420bd4f8b309b813497f838 Author: Kartik Date: Mon Jul 4 13:43:40 2022 +0530 arm64: tegra: Enable native timers on Tegra186 Enable the native timers on Tegra186 chips to allow using the watchdog functionality to recover from system hangs. Signed-off-by: Kartik Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 302e154000ecb52402c2acfecbcb80610efdbf52 Author: Sumit Gupta Date: Thu May 12 01:46:49 2022 +0530 arm64: tegra: Add node for CBB 2.0 on Tegra234 Tegra234 uses the Control Backbone (CBB) version 2.0. Add the nodes that enable error handling from the various CBB 2.0 fabrics found on Tegra234. Signed-off-by: Sumit Gupta Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234.dtsi | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit a47e173e5d1cebd0587daf780ee4c185188d43ab Author: Sumit Gupta Date: Thu May 12 01:46:46 2022 +0530 arm64: tegra: Add node for CBB 1.0 on Tegra194 Add device tree nodes to enable error handling on the Control Backbone (CBB). Tegra194 uses CBB version 1.0. Signed-off-by: Sumit Gupta Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra194.dtsi | 62 +++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) commit 012877d0a7c193c48bfbea9d7eb80663f822387d Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:12 2022 -0700 arm64: tegra: Align gpio-keys node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra132-norrin.dts | 4 ++-- arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 6 +++--- arch/arm64/boot/dts/nvidia/tegra186-p3509-0000+p3636-0001.dts | 6 +++--- arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts | 4 ++-- arch/arm64/boot/dts/nvidia/tegra194-p3509-0000.dtsi | 4 ++-- arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 6 +++--- arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi | 2 +- arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 4 ++-- arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 10 +++++----- arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts | 6 +++--- 10 files changed, 26 insertions(+), 26 deletions(-) commit 61192a9d8a6367ae1b8234876941b037910a2459 Author: Mikko Perttunen Date: Wed Jun 22 16:23:00 2022 +0300 arm64: tegra: Mark BPMP channels as no-memory-wc The Tegra SYSRAM contains regions access to which is restricted to certain hardware blocks on the system, and speculative accesses to those will cause issues. Patch 'misc: sram: Only map reserved areas in Tegra SYSRAM' attempted to resolve this by only mapping the regions specified in the device tree on the assumption that there are no such restricted areas within the 64K-aligned area of memory that contains the memory we wish to map. Turns out this assumption is wrong, as there are such areas above the 4K pages described in the device trees. As such, we need to use the bigger hammer that is no-memory-wc, which causes the memory to be mapped as Device memory to which speculative accesses are disallowed. As such, the previous patch in the series, 'firmware: tegra: bpmp: do only aligned access to IPC memory area', is required with this patch to make the BPMP driver only issue aligned memory accesses as those are also required with Device memory. Fixes: fec29bf04994 ("misc: sram: Only map reserved areas in Tegra SYSRAM") Signed-off-by: Mikko Perttunen Reviewed-by: Yousaf Kaukab Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra194.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra234.dtsi | 1 + 3 files changed, 3 insertions(+) commit 60d2016a51618c0677ec4e60239fb261588f505d Author: Akhil R Date: Tue May 17 13:10:48 2022 +0530 arm64: tegra: Add Tegra234 GPCDMA device tree node Add device tree nodes for Tegra234 GPCDMA Signed-off-by: Akhil R Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234.dtsi | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 599b7aebc9fc6af4b0a4ab82ba020859789bd1bf Author: Krzysztof Kozlowski Date: Thu May 26 22:35:17 2022 +0200 arm64: tegra: Adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit afcb41e30ce27aa9c068c866d1391e87d9a46f9c Author: Sameer Pujar Date: Mon Jun 6 20:28:57 2022 +0530 arm64: tegra: Enable OPE on various platforms Enable OPE module usage on various Jetson platforms. This can be plugged into an audio path using ALSA mixer controls. Add audio-graph-port binding to use OPE device with generic audio-graph based sound card. Signed-off-by: Sameer Pujar Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 43 +++++++++++ arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts | 43 +++++++++++ .../arm64/boot/dts/nvidia/tegra194-p3509-0000.dtsi | 43 +++++++++++ arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts | 84 ++++++++++++++++++++++ arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 84 ++++++++++++++++++++++ .../dts/nvidia/tegra234-p3737-0000+p3701-0000.dts | 43 +++++++++++ 6 files changed, 340 insertions(+) commit 4b6a1b7cbdf5fd996fe26c57188366effdb02ffc Author: Sameer Pujar Date: Mon Jun 6 20:28:56 2022 +0530 arm64: tegra: Add OPE device on Tegra210 and later Output Processing Engine (OPE) is a client of AHUB and is present on Tegra210 and later generations of Tegra SoC. Add this device on the relevant SoC DTSI files. Signed-off-by: Sameer Pujar Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 23 ++++++++++++++++++ arch/arm64/boot/dts/nvidia/tegra194.dtsi | 23 ++++++++++++++++++ arch/arm64/boot/dts/nvidia/tegra210.dtsi | 40 ++++++++++++++++++++++++++++++++ arch/arm64/boot/dts/nvidia/tegra234.dtsi | 23 ++++++++++++++++++ 4 files changed, 109 insertions(+) commit bd8e9cf328eaba9e31fa698c8ce6d7f219918d4e Merge: f2906aa86338 015a166368d7 Author: Thierry Reding Date: Fri Jul 8 18:00:01 2022 +0200 Merge branch 'for-5.20/dt-bindings' into for-5.20/arm64/dt commit afcdb8e55c91c6ff0700ab272fd0f74e899ab884 Author: Lv Ruyi Date: Tue Apr 19 01:36:48 2022 +0000 firmware: tegra: Fix error check return value of debugfs_create_file() If an error occurs, debugfs_create_file() will return ERR_PTR(-ERROR), so use IS_ERR() to check it. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi Signed-off-by: Thierry Reding drivers/firmware/tegra/bpmp-debugfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 135f4c551d51065ee2d0677bf5344a89767e9d9b Author: Lv Ruyi Date: Thu Apr 21 08:45:42 2022 +0000 drm/tegra: vic: Use devm_platform_ioremap_resource() Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately. Make the code simpler without functional changes. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/vic.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 5088bbde3ad8d3e2c8a6614d87bea0a3df176e69 Author: Tom Rix Date: Sat Mar 26 19:18:53 2022 +0000 media: staging: atomisp: rework reading the id and revision values Clang static analysis reports this representative issue atomisp-ov2722.c:920:3: warning: 3rd function call argument is an uninitialized value dev_err(&client->dev, "sensor_id_high = 0x%x\n", high); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ high and low are only set when ov2722_read_reg() is successful. Reporting the high value when there is an error is not meaningful. The later read for low is not checked. high and low are or-ed together and checked against a non zero value. Remove the unneeded error reporting for high. Initialize high and low to 0 and use the id check to determine if the reads were successful The later read for revision is not checked. If it fails the old high value will be used and the revision will be misreported. Since the revision is only reported and not checked or stored it is not necessary to return if the read with successful. This makes the ret variable unnecessary so remove it. Link: https://lore.kernel.org/linux-media/20220326191853.2914552-1-trix@redhat.com Signed-off-by: Tom Rix Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 2e1bfb314c99de2f7b9c8280408316ad2f316de9 Author: Christophe JAILLET Date: Mon Jul 4 22:31:51 2022 +0200 gpu: host1x: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. While at it, remove a useless bitmap_zero() call. The bitmap is already zero'ed when allocated. Signed-off-by: Christophe JAILLET Signed-off-by: Thierry Reding drivers/gpu/host1x/channel.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 9799a3bf8a36be69b1a60f64d4134d08110150a9 Author: Hans de Goede Date: Wed Jun 15 21:50:37 2022 +0100 media: atomisp: Add a notes.txt file Add a files documenting what I've learned about the driver while working on various cleanups. Link: https://lore.kernel.org/linux-media/20220615205037.16549-41-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/notes.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit b74196e7980b9777090f65cac9604f435a142636 Author: Hans de Goede Date: Wed Jun 15 21:50:36 2022 +0100 media: atomisp: remove force argument from __destroy_[stream[s]|pipe[s]]() The force argument to the __destroy_pipe[s]() and __destroy_stream[s]() functions is always true. Remove the argument and remove the code necessary to handle the false case. Link: https://lore.kernel.org/linux-media/20220615205037.16549-40-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp_compat_css20.c | 34 +++++++--------------- 1 file changed, 11 insertions(+), 23 deletions(-) commit 1341bc9e99af58e5a0c0597da562658332df4513 Author: Hans de Goede Date: Wed Jun 15 21:50:35 2022 +0100 media: atomisp: use atomisp_destroy_pipes_stream_force() in more places Use atomisp_destroy_pipes_stream_force() in 4 more places, instead of open coding it. Link: https://lore.kernel.org/linux-media/20220615205037.16549-39-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp_compat_css20.c | 24 +++++----------------- 1 file changed, 5 insertions(+), 19 deletions(-) commit 318e125ac9e3aaf3ecf8167dd33514fb83c0eef6 Author: Hans de Goede Date: Wed Jun 15 21:50:34 2022 +0100 media: atomisp: use atomisp_css_update_stream() in more places Use atomisp_css_update_stream() in 2 more places, instead of open coding it. Link: https://lore.kernel.org/linux-media/20220615205037.16549-38-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp_compat_css20.c | 37 ++++------------------ 1 file changed, 6 insertions(+), 31 deletions(-) commit 507e72a2ae5ccbc7751a06ce51d3f0096f7209cc Author: Hans de Goede Date: Wed Jun 15 21:50:33 2022 +0100 media: atomisp: use atomisp_create_pipes_stream() in more places Use atomisp_create_pipes_stream() in 2 more places, instead of open coding it. Link: https://lore.kernel.org/linux-media/20220615205037.16549-37-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp_compat_css20.c | 28 ++++------------------ 1 file changed, 4 insertions(+), 24 deletions(-) commit 8c341d05a66758fd03d95847a67bf4595f560e92 Author: Hans de Goede Date: Wed Jun 15 21:50:32 2022 +0100 media: atomisp: add error logging to atomisp_destroy_pipes_stream_force() __destroy_streams() and __destroy_pipes() may return an error. Log a warning when either of them fails. Link: https://lore.kernel.org/linux-media/20220615205037.16549-36-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 798d2ad739da5343122eff386578f259278f2594 Author: Hans de Goede Date: Wed Jun 15 21:50:31 2022 +0100 media: atomisp: add error checking to atomisp_create_pipes_stream() The functions called by atomisp_create_pipes_stream() can fail, add error checking for them. Link: https://lore.kernel.org/linux-media/20220615205037.16549-35-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_compat.h | 2 +- .../staging/media/atomisp/pci/atomisp_compat_css20.c | 20 +++++++++++++++++--- drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 13 +++++++++++-- 3 files changed, 29 insertions(+), 6 deletions(-) commit 3bde235bf6780e741d602deb570a8bd7e10a685d Author: Hans de Goede Date: Wed Jun 15 21:50:30 2022 +0100 media: atomisp: fix __get_frame_info() error handling On ia_css_pipe_get_info() errors, destroy both the streams as well as the pipes which were created. Link: https://lore.kernel.org/linux-media/20220615205037.16549-34-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3a68900a0ceae03cc48a2728eaa66f50c02189cc Author: Hans de Goede Date: Wed Jun 15 21:50:29 2022 +0100 media: atomisp: remove hmm_page_object hmm_page_object only stores a struct page pointer, so we can just use the hmm_bo.pages page pointer array everywhere. Link: https://lore.kernel.org/linux-media/20220615205037.16549-33-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/hmm/hmm_bo.h | 5 -- drivers/staging/media/atomisp/pci/hmm/hmm.c | 16 ++--- drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 79 +++++----------------- 3 files changed, 26 insertions(+), 74 deletions(-) commit 8c92243d9e68a93dd282fa2151b67b5c0e31e957 Author: Mikko Perttunen Date: Fri Jul 8 18:18:02 2022 +0300 gpu: host1x: Generalize host1x_cdma_push_wide() host1x_cdma_push_wide() had the assumptions that the last parameter word was a NOP opcode, and that NOP opcodes could be used in all situations. Neither are true with the new job opcode sequence, so adjust the function to not have these assumptions, and instead place an early RESTART opcode when necessary to jump back to the beginning of the pushbuffer. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/cdma.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit 5b7239c17ce29b4ffea90a5731d56bd8a3893960 Author: Mikko Perttunen Date: Fri Jul 8 18:18:01 2022 +0300 gpu: host1x: Initialize syncval in channel_submit() During the refactoring of channel_submit(), assignment of syncval was moved but it is also used in channel_submit(). Add this assignment back to channel_submit() as well. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/hw/channel_hw.c | 1 + 1 file changed, 1 insertion(+) commit f9599127dd5205aaedc90895cd012d2f102e8fb3 Author: Hans de Goede Date: Wed Jun 15 21:50:28 2022 +0100 media: atomisp: drop HMM_BO_SHARE type HMM_BO_SHARE is not supported by the hmm_bo code at all, drop it. Link: https://lore.kernel.org/linux-media/20220615205037.16549-32-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/hmm/hmm_bo.h | 1 - drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) commit 975c343f857a3145f24e3630107a43be1ee9e433 Author: Hans de Goede Date: Wed Jun 15 21:50:27 2022 +0100 media: atomisp: drop highmem var/arg from the hmm code highmem is always false, drop it. Link: https://lore.kernel.org/linux-media/20220615205037.16549-31-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/hmm/hmm_bo.h | 6 ++---- drivers/staging/media/atomisp/pci/hmm/hmm.c | 2 +- drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 13 +++---------- 3 files changed, 6 insertions(+), 15 deletions(-) commit 4cc20c9cdd0d8c3479626c35e6db0af1a5dfd681 Author: Hans de Goede Date: Wed Jun 15 21:50:26 2022 +0100 media: atomisp: Simplify hmm_alloc() calls Make hmm_alloc() only take size as a parameter and remove other parameters. since all callers always pass the same flags. Link: https://lore.kernel.org/linux-media/20220615205037.16549-30-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/hmm/hmm.h | 4 +-- drivers/staging/media/atomisp/pci/hmm/hmm.c | 19 ++++++----- .../isp/kernels/sdis/sdis_1.0/ia_css_sdis.host.c | 2 +- .../isp/kernels/sdis/sdis_2/ia_css_sdis2.host.c | 2 +- .../media/atomisp/pci/runtime/frame/src/frame.c | 3 +- .../atomisp/pci/runtime/isp_param/src/isp_param.c | 2 +- .../media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c | 3 +- .../media/atomisp/pci/runtime/spctrl/src/spctrl.c | 2 +- .../staging/media/atomisp/pci/sh_css_firmware.c | 2 +- drivers/staging/media/atomisp/pci/sh_css_params.c | 37 ++++++++-------------- 10 files changed, 33 insertions(+), 43 deletions(-) commit ca437b45ac6d4baac348303920dae0fdee68e937 Author: Umesh Nerlige Ramappa Date: Thu Jul 7 12:30:02 2022 -0700 i915/perf: Disable OA sseu config param for gfx12.50+ The global sseu config is applicable only to gen11 platforms where concurrent media, render and OA use cases may cause some subslices to be turned off and hence lose NOA configuration. Ideally we want to return ENODEV for non-gen11 platforms, however, this has shipped with gfx12, so disable only for gfx12.50+. v2: gfx12 is already shipped with this, disable for gfx12.50+ (Lionel) v3: (Matt) - Update commit message and replace "12.5" with "12.50" - Replace DRM_DEBUG() with driver specific drm_dbg() Signed-off-by: Umesh Nerlige Ramappa Acked-by: Lionel Landwerlin Reviewed-by: Andrzej Hajda Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220707193002.2859653-2-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/i915_perf.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 2fec539112e89255b6a47f566e21d99937fada7b Author: Umesh Nerlige Ramappa Date: Thu Jul 7 12:30:01 2022 -0700 i915/perf: Replace DRM_DEBUG with driver specific drm_dbg call DRM_DEBUG is not the right debug call to use in i915 OA, replace it with driver specific drm_dbg() call (Matt). Signed-off-by: Umesh Nerlige Ramappa Acked-by: Lionel Landwerlin Reviewed-by: Andrzej Hajda Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220707193002.2859653-1-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/i915_perf.c | 151 ++++++++++++++++++++++++++------------- 1 file changed, 100 insertions(+), 51 deletions(-) commit ceff4bdb60c0483f3e500844fb56c468e3077d0a Author: Hans de Goede Date: Wed Jun 15 21:50:25 2022 +0100 media: atomisp: add hmm_create_from_userdata() helper Most hmm_alloc() callers want BO_PRIVATE type memory. Add a hmm_create_from_userdata() helper for other cases so that the hmm_alloc() calls for all the callers who don't want this can be simplied. Link: https://lore.kernel.org/linux-media/20220615205037.16549-29-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/hmm/hmm.h | 1 + drivers/staging/media/atomisp/pci/hmm/hmm.c | 5 +++++ drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) commit a9796c7b47a943cbb7fb2bd54211a93c32bc88bb Author: Hans de Goede Date: Wed Jun 15 21:50:24 2022 +0100 media: atomisp: remove unused hmm address translation functions hmm_isp_vaddr_to_host_vaddr() and hmm_host_vaddr_to_hrt_vaddr() are unused, remove them. Link: https://lore.kernel.org/linux-media/20220615205037.16549-28-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/hmm/hmm.h | 11 ----------- drivers/staging/media/atomisp/pci/hmm/hmm.c | 20 -------------------- 2 files changed, 31 deletions(-) commit 90612317325bb0b39c999e3a6f9da69597c5016f Author: Hans de Goede Date: Wed Jun 15 21:50:23 2022 +0100 media: atomisp: drop unused ATOMISP_MAP_FLAG_* flags Drop the ATOMISP_MAP_FLAG_CACHED flag, it is never set anywhere; also drop the matching "cached" parameter to hmm[_bo]_alloc which value was derived form the never set flag. Drop the ATOMISP_MAP_FLAG_NOFLUSH, it is not used anywhere. Link: https://lore.kernel.org/linux-media/20220615205037.16549-27-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/hmm/hmm_bo.h | 2 +- .../staging/media/atomisp/include/linux/atomisp.h | 3 --- drivers/staging/media/atomisp/pci/hmm/hmm.c | 7 +++-- drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 31 ++++++++++------------ 4 files changed, 18 insertions(+), 25 deletions(-) commit 9f40d3a79dd69b9d7a684db2cad0217a456de372 Author: Hans de Goede Date: Wed Jun 15 21:50:22 2022 +0100 media: atomisp: drop ATOMISP_MAP_FLAG_CLEARED This flag is only used by one hmm_alloc() caller, drop it and make the caller call hmm_set(ptr, 0, size) itself to do the clearing. Link: https://lore.kernel.org/linux-media/20220615205037.16549-26-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/linux/atomisp.h | 1 - drivers/staging/media/atomisp/pci/hmm/hmm.c | 3 --- drivers/staging/media/atomisp/pci/sh_css_params.c | 18 ++++++++++-------- 3 files changed, 10 insertions(+), 12 deletions(-) commit 2c19beb23dd0d15af3407cf4d0d9ea31f1913632 Author: Hans de Goede Date: Wed Jun 15 21:50:21 2022 +0100 media: atomisp: drop unused ATOMISP_ACC_FW_LOAD_* defines Drop the ATOMISP_ACC_FW_LOAD_* defines, these are no longer used anywhere. Link: https://lore.kernel.org/linux-media/20220615205037.16549-25-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/linux/atomisp.h | 12 ------------ 1 file changed, 12 deletions(-) commit 54c15ddd4c821d398a67e3e418f78136e848270e Author: Hans de Goede Date: Wed Jun 15 21:50:20 2022 +0100 media: atomisp: remove atomisp_is_acc_enabled() atomisp_is_acc_enabled() always returns false now, remove it. Link: https://lore.kernel.org/linux-media/20220615205037.16549-24-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_cmd.c | 4 ++-- drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 5 ----- drivers/staging/media/atomisp/pci/atomisp_ioctl.h | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) commit 3af445e66fa8db5bf5a2718f080abbfdf108cc71 Author: Hans de Goede Date: Wed Jun 15 21:50:19 2022 +0100 media: atomisp: remove no longer used atomisp_css_acc_done() function atomisp_css_acc_done() is no longer used anywhere, remove it. Link: https://lore.kernel.org/linux-media/20220615205037.16549-23-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_compat.h | 2 -- drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 5 ----- drivers/staging/media/atomisp/pci/atomisp_subdev.h | 4 ---- 3 files changed, 11 deletions(-) commit b717c5175a84194717928e8f03b21c13865ff60b Author: Hans de Goede Date: Wed Jun 15 21:50:18 2022 +0100 media: atomisp: asc.acc.pipeline is always NULL With the removal of the ACC ioctls and atomisp_acc.c asc.acc.pipeline never gets set, so it is always NULL. Remove asc.acc.pipeline and drop checks for it being NULL / !NULL. Link: https://lore.kernel.org/linux-media/20220615205037.16549-22-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_cmd.c | 3 --- drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 3 +-- drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 6 ------ drivers/staging/media/atomisp/pci/atomisp_subdev.h | 1 - 4 files changed, 1 insertion(+), 12 deletions(-) commit 16d6a345030090379fb5607ea62e97b6515e0ab7 Author: Hans de Goede Date: Wed Jun 15 21:50:17 2022 +0100 media: atomisp: remove unused atomisp_*css_* functions With the removal of the ACC ioctls and atomisp_acc.c a whole bunch of atomisp_*css_* functions is no longer used, remove them. Link: https://lore.kernel.org/linux-media/20220615205037.16549-21-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_compat.h | 25 --- .../media/atomisp/pci/atomisp_compat_css20.c | 217 --------------------- drivers/staging/media/atomisp/pci/atomisp_subdev.h | 1 - 3 files changed, 243 deletions(-) commit 868088a06157d73971329ebfc93e0cad1355cabc Author: Hans de Goede Date: Wed Jun 15 21:50:16 2022 +0100 media: atomisp: remove atomisp_acc.c With the ACC ioctls removed sd->acc.fw is always empty turning the atomisp_acc.c code into no-ops, remove it. Link: https://lore.kernel.org/linux-media/20220615205037.16549-20-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/Makefile | 1 - drivers/staging/media/atomisp/pci/atomisp_acc.c | 231 --------------------- drivers/staging/media/atomisp/pci/atomisp_acc.h | 62 ------ drivers/staging/media/atomisp/pci/atomisp_cmd.c | 26 --- .../media/atomisp/pci/atomisp_compat_css20.c | 8 +- drivers/staging/media/atomisp/pci/atomisp_fops.c | 4 - drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 9 +- drivers/staging/media/atomisp/pci/atomisp_subdev.c | 3 - drivers/staging/media/atomisp/pci/atomisp_subdev.h | 4 - drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 4 - 10 files changed, 5 insertions(+), 347 deletions(-) commit 4bbca788b6eb8176c8a1ccfe3b3ead0feb71ae07 Author: Hans de Goede Date: Wed Jun 15 21:50:15 2022 +0100 media: atomisp: remove private acceleration ioctls These ioctls allow userspace to load custom programs into the ISP, which: a) Seems dangerous b) Cannot be used by opensource userspace since there is no FOSS code to create such programs b) These seem to be unused even by the Android closed source camera code (they don't show up in a strace of the camera app) So removing these seems be a good idea. Another reason to remove these is that atomisp_acc_map() is the only user of the userptr functionality in hmm_alloc(), so it gets in the way of further cleanups / simplification of the hmm code. Link: https://lore.kernel.org/linux-media/20220615205037.16549-19-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab .../staging/media/atomisp/include/linux/atomisp.h | 129 ------- drivers/staging/media/atomisp/pci/atomisp_acc.c | 394 --------------------- drivers/staging/media/atomisp/pci/atomisp_acc.h | 58 --- .../media/atomisp/pci/atomisp_compat_ioctl32.h | 58 --- drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 38 -- 5 files changed, 677 deletions(-) commit 5c9152945648034700ac7d9c7d7051ab53157174 Author: Hans de Goede Date: Wed Jun 15 21:50:14 2022 +0100 media: atomisp: remove bogus comment above hmm_bo_allocated() prototype The comment documenting hmm_bo_allocated() was copied (and not modified) from the comment documenting hmm_bo_alloc(), so there are 2 copies of the hmm_bo_alloc() documentation. Remove the copy of the comment above the hmm_bo_allocated() prototype. Link: https://lore.kernel.org/linux-media/20220615205037.16549-18-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/hmm/hmm_bo.h | 7 ------- 1 file changed, 7 deletions(-) commit b03d581b453d3d14dbb7c7b50ae72f530615f430 Author: Hans de Goede Date: Wed Jun 15 21:50:13 2022 +0100 media: atomisp: removed unused hmm_bo_get_page_info() function hmm_bo_get_page_info() is not used anywhere, remove it. Link: https://lore.kernel.org/linux-media/20220615205037.16549-17-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/hmm/hmm_bo.h | 6 ----- drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 26 ---------------------- 2 files changed, 32 deletions(-) commit 2c9974955f4fcd147fbe98ddc24167b3294eb581 Author: Hans de Goede Date: Wed Jun 15 21:50:12 2022 +0100 media: atomisp: drop hmm_page_type Since the hmm-pool code has been removed this now always gets set to HMM_PAGE_TYPE_GENERAL, so just remove it. Link: https://lore.kernel.org/linux-media/20220615205037.16549-16-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/hmm/hmm_bo.h | 7 ---- drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 42 ++++++++-------------- 2 files changed, 15 insertions(+), 34 deletions(-) commit 4be4504e9d017ff371836b2a80e205a66eda6fef Author: Hans de Goede Date: Wed Jun 15 21:50:11 2022 +0100 media: atomisp: remove unused attribute argument from ia_css_frame_map() ia_css_frame_map() has only one caller which passes a hardcoded 0 for the attribute argument, drop it. Link: https://lore.kernel.org/linux-media/20220615205037.16549-15-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 2 +- drivers/staging/media/atomisp/pci/ia_css_frame_public.h | 1 - drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c | 5 +---- 3 files changed, 2 insertions(+), 6 deletions(-) commit c0039ef3dc1de7255aac5f240af79dd649347c32 Author: Hans de Goede Date: Wed Jun 15 21:50:10 2022 +0100 media: atomisp: remove pool related kernel cmdline options Since we have removed the hmm pools these are completely meaningless now. Link: https://lore.kernel.org/linux-media/20220615205037.16549-14-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/hmm/hmm.h | 2 -- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 17 ----------------- 2 files changed, 19 deletions(-) commit 454da4d2a40f7caf1f7a4d5811e6294d5644f31b Author: Hans de Goede Date: Wed Jun 15 21:50:09 2022 +0100 media: atomisp: remove hmm_mem_stats Without pool support the (optional) debug logging done by these is not really meaningful, drop it all. Link: https://lore.kernel.org/linux-media/20220615205037.16549-13-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/hmm/hmm.h | 8 ----- .../staging/media/atomisp/include/hmm/hmm_common.h | 26 ---------------- drivers/staging/media/atomisp/pci/atomisp_drvfs.c | 7 +---- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 1 - drivers/staging/media/atomisp/pci/hmm/hmm.c | 36 ---------------------- drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 6 ---- 6 files changed, 1 insertion(+), 83 deletions(-) commit c35f36b7c1ee928ded6c20e8991411126f9b5fd5 Author: Hans de Goede Date: Wed Jun 15 21:50:08 2022 +0100 media: atomisp: remove hmm pool code Since we never register any pools, this is all dead code, remove it. Link: https://lore.kernel.org/linux-media/20220615205037.16549-12-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/hmm/hmm.h | 3 +- drivers/staging/media/atomisp/include/hmm/hmm_bo.h | 3 - .../staging/media/atomisp/include/hmm/hmm_pool.h | 116 --------------------- drivers/staging/media/atomisp/pci/hmm/hmm.c | 52 --------- drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 79 ++------------ 5 files changed, 8 insertions(+), 245 deletions(-) commit b50b217fe2bfd8793d504421587bbe83c61c22c3 Author: Hans de Goede Date: Wed Jun 15 21:50:07 2022 +0100 media: atomisp: remove dynamic and reserved pool code There are no callers of this code atm; and looking at the atomisp memory-management code if anything we want to make it simpler and not re-introduce use of these pools, so remove the pool code. Link: https://lore.kernel.org/linux-media/20220615205037.16549-11-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/Makefile | 2 - .../media/atomisp/pci/hmm/hmm_dynamic_pool.c | 234 ------------------- .../media/atomisp/pci/hmm/hmm_reserved_pool.c | 253 --------------------- 3 files changed, 489 deletions(-) commit ad4c63c3ba44c7aaea3e9d1e2539110d6818b3ac Author: Hans de Goede Date: Wed Jun 15 21:50:06 2022 +0100 media: atomisp: remove hmm_pool_[un]register() These are no-ops, so lets remove them. Link: https://lore.kernel.org/linux-media/20220615205037.16549-10-hdegoede@redhat.com Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/hmm/hmm.h | 3 -- drivers/staging/media/atomisp/pci/atomisp_fops.c | 9 ----- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 10 ------ drivers/staging/media/atomisp/pci/hmm/hmm.c | 42 ------------------------ 4 files changed, 64 deletions(-) commit ca1ce57ae76d67457789e236f8d46a5434047752 Author: Hans de Goede Date: Wed Jun 15 21:50:05 2022 +0100 media: atomisp: drop ATOMISP_MAP_FLAG_CONTIGUOUS Drop the ATOMISP_MAP_FLAG_CONTIGUOUS hmm_alloc flag. After the contiguous flag removal done in previous patches in this series it is never set. And hmm_alloc already did a WARN_ON on the flag and otherwise ignored it, proving that contiguous support was already never used. Link: https://lore.kernel.org/linux-media/20220615205037.16549-9-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/linux/atomisp.h | 3 +-- drivers/staging/media/atomisp/pci/hmm/hmm.c | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) commit f94059f86ee5f02354580fe8a3071c4785c1f4f0 Author: Hans de Goede Date: Wed Jun 15 21:50:04 2022 +0100 media: atomisp: drop contiguous flag from struct ia_css_frame Drop the contiguous flag from struct ia_css_frame, it is always false / not used. Link: https://lore.kernel.org/linux-media/20220615205037.16549-8-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/ia_css_frame_public.h | 1 - drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c | 2 -- drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c | 6 +----- drivers/staging/media/atomisp/pci/sh_css.c | 5 ----- 4 files changed, 1 insertion(+), 13 deletions(-) commit 1282033fe046b64be294de71cfa569329c491c2b Author: Hans de Goede Date: Wed Jun 15 21:50:03 2022 +0100 media: atomisp: drop IA_CSS_FRAME_FORMAT_MIPI support from ia_css_frame_init_planes() Nothing ever sets the format to IA_CSS_FRAME_FORMAT_MIPI and frame_init_mipi_plane() is the only code-path which ever sets frame->contiguous to true. Drop A_CSS_FRAME_FORMAT_MIPI support from ia_css_frame_init_planes() as part of the removal of contiguous alloc support from the frame code. Link: https://lore.kernel.org/linux-media/20220615205037.16549-7-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/runtime/frame/src/frame.c | 30 +++------------------- 1 file changed, 3 insertions(+), 27 deletions(-) commit dc65da4fb1e58c90ee1ac4b4f3e399f4d36119ce Author: Hans de Goede Date: Wed Jun 15 21:50:02 2022 +0100 media: atomisp: drop contiguous argument from frame_create() Drop the contiguous argument from frame_create() all callers always passes false. Link: https://lore.kernel.org/linux-media/20220615205037.16549-6-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 1c0d8f813f12fef054df7c8f2863a378993ae51f Author: Hans de Goede Date: Wed Jun 15 21:50:01 2022 +0100 media: atomisp: drop contiguous argument from frame_allocate_with_data() Drop the contiguous argument from frame_allocate_with_data() its only caller always passes false. Link: https://lore.kernel.org/linux-media/20220615205037.16549-5-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 001b48b60bd0ed9162b8cb7ca0743749a43db785 Author: Hans de Goede Date: Wed Jun 15 21:50:00 2022 +0100 media: atomisp: drop contiguous argument from ia_css_frame_allocate_with_buffer_size() Drop the contiguous argument from ia_css_frame_allocate_with_buffer_size() its only caller always passes false. Link: https://lore.kernel.org/linux-media/20220615205037.16549-4-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/runtime/frame/interface/ia_css_frame.h | 7 ++----- drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c | 8 +++----- drivers/staging/media/atomisp/pci/sh_css_mipi.c | 3 +-- 3 files changed, 6 insertions(+), 12 deletions(-) commit cb77085b1f0a86ef9dfba86b5f3ed6c3340c2ea3 Author: Rob Clark Date: Thu Jul 7 14:20:00 2022 -0700 drm/msm/dpu: Fix for non-visible planes Fixes `kms_cursor_crc --run-subtest cursor-offscreen`.. when the cursor moves offscreen the plane becomes non-visible, so we need to skip over it in crtc atomic test and mixer setup. Signed-off-by: Rob Clark Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/492819/ Link: https://lore.kernel.org/r/20220707212003.1710163-1-robdclark@gmail.com drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7c6b6a5bbd8f6818098540dd62bd7e9c375cf3cb Author: Hans de Goede Date: Wed Jun 15 21:49:59 2022 +0100 media: atomisp: remove unused ia_css_frame_allocate_contiguous*() functions ia_css_frame_allocate_contiguous() and ia_css_frame_allocate_contiguous_from_info() are not used anywhere, remove them. Link: https://lore.kernel.org/linux-media/20220615205037.16549-3-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/ia_css_frame_public.h | 38 ------------------- .../media/atomisp/pci/runtime/frame/src/frame.c | 43 ---------------------- 2 files changed, 81 deletions(-) commit f2ce294155807b6e170e09dd7dceeab14faffd2c Author: Hans de Goede Date: Wed Jun 15 21:49:58 2022 +0100 media: atomisp: remove the unused RAW_BUF_STRIDE macro I noticed that the RAW_BUF_STRIDE macro is using the removed SH_CSS_BINARY_ID_POST_ISP define, which should be a problem except that the RAW_BUF_STRIDE macro itself is not used at all, remove it. Link: https://lore.kernel.org/linux-media/20220615205037.16549-2-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/isp/modes/interface/isp_const.h | 6 ------ 1 file changed, 6 deletions(-) commit cd486d37493357369ec1d8f130d93806418def84 Author: Brent Lu Date: Fri Jul 8 19:00:30 2022 +0800 ASoC: Intel: sof_cs42l42: add adl_mx98360a_cs4242 board config This patch adds driver data for adl_mx98360a_cs4242 which supports two max98360a speaker amplifiers on SSP1 and cs42l42 headphone codec on SSP0 running on ADL platform. Signed-off-by: Brent Lu Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220708110030.658468-3-brent.lu@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_cs42l42.c | 11 +++++++++++ sound/soc/intel/common/soc-acpi-intel-adl-match.c | 7 +++++++ 2 files changed, 18 insertions(+) commit 1460b85daa0af45c1cd2c5e20133ce413184e3d6 Author: Brent Lu Date: Fri Jul 8 19:00:29 2022 +0800 ASoC: Intel: sof_cs42l42: support BT offload audio Add the capability to machine driver of creating DAI Link for BT offload. Although BT offload always uses SSP2 port but we reserve the flexibility to assign the port number in macro. Signed-off-by: Brent Lu Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220708110030.658468-2-brent.lu@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_cs42l42.c | 75 ++++++++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 4 deletions(-) commit 852b50aeed153b513c0b36298559114fab0fab80 Author: Krzysztof Hałasa Date: Tue Mar 1 08:41:38 2022 +0000 media: On Semi AR0521 sensor driver The driver has been extensively tested in an i.MX6-based system. AR0521 is a 5.7 mm x 4.3 mm, 5 MPix RGGB MIPI/HiSPi BSI CMOS sensor from On Semiconductor. Signed-off-by: Krzysztof Hałasa Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 7 + drivers/media/i2c/Kconfig | 13 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ar0521.c | 1061 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1082 insertions(+) commit 7ac1a36a9823a573ad23ece58007a74b8089fe16 Author: Robin Murphy Date: Mon Apr 11 20:49:10 2022 +0100 drm/tegra: Include DMA API header where used Even though the IOVA API never actually needed it, iova.h is still carrying an include of dma-mapping.h, now solely for the sake of not breaking tegra-drm. Fix that properly. Signed-off-by: Robin Murphy Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/dc.c | 1 + drivers/gpu/drm/tegra/hub.c | 1 + drivers/gpu/drm/tegra/nvdec.c | 1 + drivers/gpu/drm/tegra/plane.c | 1 + 4 files changed, 4 insertions(+) commit 015a166368d72e3bd22368aa9fc793db953ec9c4 Author: Thierry Reding Date: Tue Jun 28 14:37:22 2022 +0200 dt-bindings: tegra-ccplex-cluster: Remove status from required properties The "status" property is implied to be "okay" if it isn't present, so do not mark it as required. Signed-off-by: Thierry Reding Acked-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding .../devicetree/bindings/arm/tegra/nvidia,tegra-ccplex-cluster.yaml | 1 - 1 file changed, 1 deletion(-) commit c7860cbee9989882d2908682526a5ef617523cfe Author: Dmitry Osipenko Date: Wed Jun 29 01:42:39 2022 +0300 drm/tegra: Fix vmapping of prime buffers The code assumes that Tegra GEM is permanently vmapped, which is not true for the scattered buffers. After converting Tegra video decoder driver to V4L API, we're now getting a BUG_ON from dma-buf core on playing video using libvdpau-tegra on T30+ because tegra_gem_prime_vmap() sets vaddr to NULL. Older pre-V4L video decoder driver wasn't vmapping dma-bufs. Fix it by actually vmapping the exported GEMs. Cc: stable@vger.kernel.org Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/gem.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 035c8a91a11f4785ceff7ac89e009f82c9e01257 Author: Shyam Sundar S K Date: Thu Jun 30 10:33:24 2022 +0530 platform/x86/amd/pmc: Add new platform support PMC driver can be supported on a new upcoming platform. Add this information to the support list. Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20220630050324.3780654-2-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/amd/pmc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 221b8b21c3a7aa6a390be233994564bd864fc5e2 Author: Shyam Sundar S K Date: Thu Jun 30 10:33:23 2022 +0530 platform/x86/amd/pmc: Add new acpi id for PMC controller New version of PMC controller will have a separate ACPI id, add that to the support list. Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20220630050324.3780654-1-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/amd/pmc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 936874b77dd0a86aafc1f03c11cb97ec938c16f1 Author: Gayatri Kammela Date: Wed Jun 29 15:13:34 2022 -0700 platform/x86/intel/vsec: Add PCI error recovery support to Intel PMT Add PCI error recovery support for Intel PMT driver to recover from PCI fatal errors Cc: Srinivas Pandruvada Cc: David E Box Signed-off-by: Gayatri Kammela Link: https://lore.kernel.org/r/20220629221334.434307-5-gayatri.kammela@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/intel/vsec.c | 82 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 2 deletions(-) commit 1313594c5e2615250f1e97b7006b8100bf80085a Author: Krzysztof Hałasa Date: Tue Mar 1 08:38:04 2022 +0000 media: dt-bindings: Add bindings for On Semi AR0521 camera sensor This patch documents DT bindings for the AR0521 camera sensor driver. [Sakari Ailus: Reworked subject and commit message a little] Signed-off-by: Krzysztof Hałasa Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/onnn,ar0521.yaml | 112 +++++++++++++++++++++ 1 file changed, 112 insertions(+) commit 935fbc94413b5565f64b02d0b40afe5d01734f40 Author: Jacopo Mondi Date: Fri May 13 15:14:16 2022 +0100 media: ov5640: Move format mux config in format The image format produced by the sensor is controlled by two registers, whose values computation is open coded in ov5640_set_framefmt(). As we have a list of formats already, move the OV5640_REG_FORMAT_CONTROL00 and OV5640_REG_ISP_FORMAT_MUX_CTRL register values to the static list of formats instead of open coding it. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 233 +++++++++++++++++++++++---------------------- 1 file changed, 117 insertions(+), 116 deletions(-) commit a89f14bbcfa55f536217063c880720b5bbd4dd40 Author: Jacopo Mondi Date: Fri May 13 15:14:15 2022 +0100 media: ov5640: Split DVP and CSI-2 formats The format enumeration list is shared between CSI-2 and DVP modes. This lead to the enumeration of unsupported format variants in both modes. Separate the list of DVP and CSI-2 formats and create helpers to access the correct one. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 126 ++++++++++++++++++++++++++++++++------------- 1 file changed, 90 insertions(+), 36 deletions(-) commit dd81b8ff90cac2c7eaa8247a0209d61e76582017 Author: Jacopo Mondi Date: Fri May 13 15:14:14 2022 +0100 media: ov5640: Adjust format to bpp in s_fmt The ov5640 driver supports different sizes for different mbus_codes. In particular: - 8bpp modes: high resolution sizes (>= 1280x720) - 16bpp modes: all sizes - 24bpp modes: low resolutions sizes (< 1280x720) Adjust the image sizes according to the above constraints. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b5d5288a46876f6767950449aea310f71ac86277 Author: YueHaibing Date: Sat Mar 5 20:32:00 2022 +0800 drm/tegra: vic: Fix build warning when CONFIG_PM=n drivers/gpu/drm/tegra/vic.c:326:12: error: ‘vic_runtime_suspend’ defined but not used [-Werror=unused-function] static int vic_runtime_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/tegra/vic.c:292:12: error: ‘vic_runtime_resume’ defined but not used [-Werror=unused-function] static int vic_runtime_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~ Mark it as __maybe_unused. Signed-off-by: YueHaibing Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/vic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7dcb3a2f1f1871cc6e18e744d125baaedada3944 Author: Jacopo Mondi Date: Fri May 13 15:14:13 2022 +0100 media: ov5640: Restrict sizes to mbus code The ov5640 driver supports different sizes for different mbus_codes. In particular: - 8bpp modes: high resolution sizes (>= 1280x720) - 16bpp modes: all sizes - 24bpp modes: low resolutions sizes (< 1280x720) Restrict the frame sizes enumerations to the above constraints. While at it, make sure the fse->mbus_code parameter is valid, and return -EINVAL if it's not. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 6ac98b41b4fb44656ef0ccccee4fda73751eb7bf Author: Jacopo Mondi Date: Fri May 13 15:14:12 2022 +0100 media: ov5640: Add BGR888 format Add support for BGR888 image format. No existing media bus codes describe exactly the way data is transferred on the CSI-2 bus. This is not a new issue, the CSI-2 YUV422 8-bit format is described by MEDIA_BUS_FMT_UYVY8_1X16 which is an arbitrary convention and not an exact match. Use the MEDIA_BUS_FMT_BGR888_1X24 to follow the same convention, based on the order in which bits are transmitted over the CSI-2 bus when producing images in RGB24 format. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 0a43fcd791f9089be96948d999e500b2980165e8 Author: Jacopo Mondi Date: Fri May 13 15:14:11 2022 +0100 media: ov5640: Add RGB565_1X16 format The driver already supports the 2X8_[LE|BE] variants of RGB565 formats. As for CSI-2 the 2X8 variants do not apply, add RGB565_1X16 variant with little-endian ordering of components as required by the CSI-2 specifications. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 5 +++++ 1 file changed, 5 insertions(+) commit 1066fc1c2afdbe5977eae37314f0c21462e82b9a Author: Jacopo Mondi Date: Fri May 13 15:14:10 2022 +0100 media: ov5640: Register device properties Parse the device properties and register the rotation and orientation V4L2 controls using v4l2_ctrl_new_fwnode_properties(). Remove the open-coded parsing of the rotation property and assume the DTS is correct is providing either <0> or <180> as possible rotations. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit 66ed85eb7b33cf4f4623a1e71499ed433c850851 Author: Jacopo Mondi Date: Fri May 13 15:14:09 2022 +0100 media: ov5640: Implement get_selection Implement the get_selection pad operation for the OV5640 sensor driver. The supported targets report the sensor's native size, the active pixel array size and the analog crop rectangle from which the image is produced. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 90b0f355c5a35becf093cc6579d88fc9b494c606 Author: Jacopo Mondi Date: Fri May 13 15:14:08 2022 +0100 media: ov5640: Implement init_cfg Implement the init_cfg pad operation to initialize the subdev state format to the default one. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) commit 961bed9f6af54fbfd8242b363b299c4de43b9749 Author: Jacopo Mondi Date: Fri May 13 15:14:07 2022 +0100 media: ov5640: Change CSI-2 timings to comply with FPS Now that the frame duration can be controlled by tuning the VBLANK duration in CSI-2 mode, fix all modes definitions to comply with the reported FPS. All modes run at 30 FPS except for full-resolution mode 2592x1944 which runs at 15FPS. Tested on a 2 data lanes setup in UYVY and RGB565 modes in CSI-2 mode. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit f99e689181ea8ede795f2fcd8d658207920469dd Author: Robin Murphy Date: Thu Jul 7 18:30:44 2022 +0100 gpu: host1x: Register context bus unconditionally Conditional registration is a problem for other subsystems which may unwittingly try to interact with host1x_context_device_bus_type in an uninitialised state on non-Tegra platforms. A look under /sys/bus on a typical system already reveals plenty of entries from enabled but otherwise irrelevant configs, so lets keep things simple and register our context bus unconditionally too. Signed-off-by: Robin Murphy Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/context_bus.c | 5 ----- 1 file changed, 5 deletions(-) commit b6ae502297610d5fbfa13158acd92145393f9838 Author: Jacopo Mondi Date: Fri May 13 15:14:06 2022 +0100 media: ov5640: Remove frame rate check from find_mode() The current implementation of ov5640_find_mode() fails if the frame rate programmed with s_frame_interval doesn't match the maximum frame rate for the current mode. This causes issues when moving from one mode with higher FPS to another one which only supports a lower FPS range with tools like media-ctl. It also forces users that do not use s_frame_interval(), but rather configure blankings explicitly, to adjust the programmed FPS range to avoid failures. For this reason, remove the FPS check from ov5640_find_mode() and only perform it at s_frame_interval() time. Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 19f2e3e63d3aa2fa1093bf89b1ab1d7fc2f8007b Author: Hugues Fruchet Date: Fri May 13 15:14:05 2022 +0100 media: ov5640: Adjust vblank with s_frame_interval Adjust the vertical blanking when s_frame_interval is used. s_frame_interval allows to set a fixed frame rate, which gets stored as the sensor's current one. When a new mode is applied, the current frame rate is reset to the mode's default one. In order to correctly report the currently configured vertical blanking for s_frame_interval users, verify that the desired frame rate has not been changed. If that's the case, compute the correct blanking value and reflect it through the corresponding v4l2 control. Signed-off-by: Hugues Fruchet Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 58 +++++++++++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 16 deletions(-) commit 9550669c197510b9f994102280da7fc0ab468d05 Author: Mikko Perttunen Date: Mon Jun 27 17:20:08 2022 +0300 drm/tegra: vic: Add Tegra234 support Add Tegra234 support for VIC. It is backwards compatible with Tegra194. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/drm.c | 1 + drivers/gpu/drm/tegra/vic.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) commit 0ae4ae9158f32fd77e8736da0585d8aff5a3b9d9 Author: Mikko Perttunen Date: Mon Jun 27 17:20:07 2022 +0300 gpu: host1x: Use RESTART_W to skip timed out jobs on Tegra186+ When MLOCK enforcement is enabled, the 0-word write currently done is rejected by the hardware outside of an MLOCK region. As such, on these chips, which also have the newer, more convenient RESTART_W opcode, use that instead to skip over the timed out job. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/cdma.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit a94b8a77bc914db6556e8019cf23d9dda9ab907e Author: Mikko Perttunen Date: Mon Jun 27 17:20:06 2022 +0300 gpu: host1x: Add MLOCK release code on Tegra234 With the full-featured opcode sequence using MLOCKs, we need to also unlock those MLOCKs in the event of a timeout. However, it turns out that on Tegra186/Tegra194, by default, we don't need to do this; furthermore, on Tegra234 it is much simpler to do; so only implement this on Tegra234 for the time being. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/hw/cdma_hw.c | 34 ++++++++++++++++++++++++++++++ drivers/gpu/host1x/hw/hw_host1x08_common.h | 7 ++++++ 2 files changed, 41 insertions(+) commit 1411796f200de86d037578752450a9853359670c Author: Mikko Perttunen Date: Mon Jun 27 17:20:05 2022 +0300 gpu: host1x: Rewrite job opcode sequence For new (Tegra186+) SoCs, use a new ('full-featured') job opcode sequence that is compatible with virtualization. In particular, the Host1x hardware in Tegra234 is more strict regarding the sequence, requiring ACQUIRE_MLOCK-SETCLASS-SETSTREAMID opcodes to occur in that sequence without gaps (except for SETPAYLOAD), so let's do it properly in one go now. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/hw/channel_hw.c | 144 ++++++++++++++++++++++--------------- 1 file changed, 85 insertions(+), 59 deletions(-) commit 9abdd497cd0ac08ed55aea30de1e46d73eef9fc5 Author: Mikko Perttunen Date: Mon Jun 27 17:20:04 2022 +0300 gpu: host1x: Tegra234 device data and headers Add device data and chip headers for Tegra234. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/Makefile | 3 +- drivers/gpu/host1x/dev.c | 42 ++++++ drivers/gpu/host1x/hw/host1x08.c | 33 +++++ drivers/gpu/host1x/hw/host1x08.h | 15 ++ drivers/gpu/host1x/hw/host1x08_hardware.h | 21 +++ drivers/gpu/host1x/hw/hw_host1x08_channel.h | 11 ++ drivers/gpu/host1x/hw/hw_host1x08_common.h | 4 + drivers/gpu/host1x/hw/hw_host1x08_hypervisor.h | 9 ++ drivers/gpu/host1x/hw/hw_host1x08_uclass.h | 181 +++++++++++++++++++++++++ drivers/gpu/host1x/hw/hw_host1x08_vm.h | 36 +++++ 10 files changed, 354 insertions(+), 1 deletion(-) commit 7afd1194a3cdb7ba5aa8d658b2d0655f61457c86 Author: Mikko Perttunen Date: Mon Jun 27 17:20:03 2022 +0300 gpu: host1x: Program interrupt destinations on Tegra234 On Tegra234, each Host1x VM has 8 interrupt lines. Each syncpoint can be configured with which interrupt line should be used for threshold interrupt, allowing for load balancing. For now, to keep backwards compatibility, just set all syncpoints to the first interrupt. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/hw/intr_hw.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit ee8f894f3fb326ac17b243441b8cbbb6fb0d0932 Author: Mikko Perttunen Date: Mon Jun 27 17:20:02 2022 +0300 gpu: host1x: Allow reset to be missing Host1x on Tegra234 does not have a software-controllable reset line. As such, don't bail out if we don't find one in the device tree. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/dev.c | 3 --- 1 file changed, 3 deletions(-) commit 939179fab8ff42165c1e9a487495a3f2f3319e18 Author: Mikko Perttunen Date: Mon Jun 27 17:20:01 2022 +0300 gpu: host1x: Program virtualization tables Program virtualization tables specifying which VMs have access to which Host1x hardware resources. Programming these has become mandatory in Tegra234. For now, since the driver does not operate as a Host1x hypervisor, we basically allow access to everything to everyone. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/dev.c | 21 ++++++++++++++++++--- drivers/gpu/host1x/dev.h | 8 ++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) commit 97dea367d8dab90b520cda589f83c60514013110 Author: Mikko Perttunen Date: Mon Jun 27 17:20:00 2022 +0300 gpu: host1x: Simplify register mapping and add common aperture Refactor 'regs' property loading using devm_platform_ioremap_* and add loading of the 'common' region found on Tegra234. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/dev.c | 46 +++++++++++++++++++--------------------------- drivers/gpu/host1x/dev.h | 3 +++ 2 files changed, 22 insertions(+), 27 deletions(-) commit 3000c4ac02584e877926f598aff501c36202750c Author: Mikko Perttunen Date: Mon Jun 27 17:19:59 2022 +0300 gpu: host1x: Deduplicate hardware headers Host1x class information and opcodes are unchanged or backwards compatible across SoCs so let's not duplicate them for each one but have them in a shared header file. At the same time, add opcode functions for acquire/release_mlock. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/hw/host1x01_hardware.h | 114 +---------------------- drivers/gpu/host1x/hw/host1x02_hardware.h | 113 +--------------------- drivers/gpu/host1x/hw/host1x04_hardware.h | 113 +--------------------- drivers/gpu/host1x/hw/host1x05_hardware.h | 113 +--------------------- drivers/gpu/host1x/hw/host1x06_hardware.h | 128 +------------------------ drivers/gpu/host1x/hw/host1x07_hardware.h | 128 +------------------------ drivers/gpu/host1x/hw/opcodes.h | 150 ++++++++++++++++++++++++++++++ 7 files changed, 156 insertions(+), 703 deletions(-) commit bf0297ac77f3c3187a79a612082ce7ddb64c1e4b Author: Mikko Perttunen Date: Mon Jun 27 17:19:54 2022 +0300 drm/tegra: Implement stream ID related callbacks on engines Implement the get_streamid_offset and can_use_memory_ctx callbacks required for supporting context isolation. Since old firmware on VIC cannot support context isolation without hacks that we don't want to implement, check the firmware binary to see if context isolation should be enabled. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/drm.h | 8 ++++++ drivers/gpu/drm/tegra/nvdec.c | 9 ++++++ drivers/gpu/drm/tegra/vic.c | 67 +++++++++++++++++++++++++++++++++++++------ 3 files changed, 76 insertions(+), 8 deletions(-) commit e09db97889ec647ad373f7a7422c83099c6120c5 Author: Mikko Perttunen Date: Mon Jun 27 17:19:53 2022 +0300 drm/tegra: Support context isolation For engines that support context isolation, allocate a context when opening a channel, and set up stream ID offset and context fields when submitting a job. As of this commit, the stream ID offset and fallback stream ID are not used when context isolation is disabled. However, with upcoming patches that enable a full featured job opcode sequence, these will be necessary. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/drm.h | 3 +++ drivers/gpu/drm/tegra/submit.c | 48 +++++++++++++++++++++++++++++++++++++++++- drivers/gpu/drm/tegra/uapi.c | 43 +++++++++++++++++++++++++++++++++++-- 3 files changed, 91 insertions(+), 3 deletions(-) commit 88c0292f023da4e4753a271430a36a66e6fb974f Author: Mikko Perttunen Date: Mon Jun 27 17:19:52 2022 +0300 drm/tegra: nvdec: Fix TRANSCFG register offset NVDEC's TRANSCFG register is at a different offset than VIC. This becomes a problem now when context isolation is enabled and the reset value of the register is no longer sufficient. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/nvdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e078d8d6c3849019b927edb5beeca38dea00050c Author: Mikko Perttunen Date: Mon Jun 27 17:19:51 2022 +0300 drm/tegra: falcon: Set DMACTX field on DMA transactions The DMACTX field determines which context, as specified in the TRANSCFG register, is used. While during boot it doesn't matter which is used, later on it matters and this value is reused by the firmware. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/falcon.c | 8 ++++++++ drivers/gpu/drm/tegra/falcon.h | 1 + 2 files changed, 9 insertions(+) commit 2486254781eab6f6119fabea78f11386c54460d2 Author: Mikko Perttunen Date: Mon Jun 27 17:19:49 2022 +0300 gpu: host1x: Program context stream ID on submission Add code to do stream ID switching at the beginning of a job. The stream ID is switched to the stream ID specified by the context passed in the job structure. Before switching the stream ID, an OP_DONE wait is done on the channel's engine to ensure that there is no residual ongoing work that might do DMA using the new stream ID. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/hw/channel_hw.c | 52 ++++++++++++++++++++++++++++--- drivers/gpu/host1x/hw/host1x06_hardware.h | 10 ++++++ drivers/gpu/host1x/hw/host1x07_hardware.h | 10 ++++++ include/linux/host1x.h | 8 +++++ 4 files changed, 76 insertions(+), 4 deletions(-) commit 8aa5bcb61612060429223d1fbb7a1c30a579fc1f Author: Mikko Perttunen Date: Mon Jun 27 17:19:48 2022 +0300 gpu: host1x: Add context device management code Add code to register context devices from device tree, allocate them out and manage their refcounts. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/Makefile | 3 + drivers/gpu/host1x/context.c | 160 +++++++++++++++++++++++++++++++++++++++++++ drivers/gpu/host1x/context.h | 38 ++++++++++ drivers/gpu/host1x/dev.c | 12 +++- drivers/gpu/host1x/dev.h | 2 + include/linux/host1x.h | 34 +++++++++ 6 files changed, 248 insertions(+), 1 deletion(-) commit a72d4b182f4e092573035fe6fa9402a14111fd64 Author: Mikko Perttunen Date: Mon Jun 27 17:19:56 2022 +0300 dt-bindings: host1x: Fix bracketing in example The bracketing for the interrupts property in the device tree example is incorrect. Fix it. Signed-off-by: Mikko Perttunen Acked-by: Rob Herring Signed-off-by: Thierry Reding .../devicetree/bindings/display/tegra/nvidia,tegra20-host1x.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5c5a6ff72e193302b21fd4c2afc6bd8cc26f68e2 Author: Mikko Perttunen Date: Mon Jun 27 17:19:55 2022 +0300 dt-bindings: Add bindings for Tegra234 Host1x and VIC Update VIC and Host1x bindings for changes in Tegra234. Namely, - New compatible strings - Sharded syncpoint interrupts - Optional reset. Also, fix the order of descriptions for VM/hypervisor register apertures -- while the reg-names specification was correct, the descriptions for these were switched. Signed-off-by: Mikko Perttunen Reviewed-by: Rob Herring Signed-off-by: Thierry Reding .../display/tegra/nvidia,tegra124-vic.yaml | 1 + .../display/tegra/nvidia,tegra20-host1x.yaml | 106 ++++++++++++++++++--- 2 files changed, 93 insertions(+), 14 deletions(-) commit bce93b827de641d7d2e000c9b9d4d30298aa42b6 Author: Jacopo Mondi Date: Fri May 13 15:14:04 2022 +0100 media: ov5640: Add VBLANK control Add the VBLANK control which allows to select the duration of the frame vertical blankings and allows to control the framerate. The VBLANK control also modifies the exposure time range, which cannot exceed the maximum frame length. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 32979f670090e67874b087159d4e38b426adb3ef Author: Jacopo Mondi Date: Fri May 13 15:14:03 2022 +0100 media: ov5640: Add HBLANK control Add the HBLANK control as read-only. The hblank value is fixed in the mode definition and is updated everytime a new format is applied. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit e4359019cb32c62093634201545ba132495ba058 Author: Jacopo Mondi Date: Fri May 13 15:14:02 2022 +0100 media: ov5640: Remove ov5640_mode_init_data The ov5640_mode_init_data is a fictional sensor more which is used to program the initial sensor settings. It is only used to initialize the sensor and can be replaced it with a throw-away mode which just wraps the register table. Also rename the register table to drop the format from the name to make it clear an actual sensor mode has to be applied after the initial programming. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 67 +++++++--------------------------------------- 1 file changed, 10 insertions(+), 57 deletions(-) commit db15c1957a2df363e9b23bf39fdbf99e43227ec0 Author: Jacopo Mondi Date: Fri May 13 15:14:01 2022 +0100 media: ov5640: Remove duplicated mode settings The register tables for all resolutions smaller than 720p are now identical. Remove the duplicated ones and create a single ov5640_setting_low_res[] register table. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 120 ++++++--------------------------------------- 1 file changed, 15 insertions(+), 105 deletions(-) commit e15197bde40796f99e998bfabb8fa4189df55396 Author: Jacopo Mondi Date: Fri May 13 15:14:00 2022 +0100 media: ov5640: Re-sort per-mode register tables The per-mode register tables are not sorted by size. Fix it. Cosmetic change only. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 2de6bb97f0904b4e3f221b326c0cf2623204316d Author: Jacopo Mondi Date: Fri May 13 15:13:59 2022 +0100 media: ov5640: Provide timings accessor Provide a function to shortcut access to the correct timings definition to avoid repeating the same pattern when accessing the sensor timings. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 5113d5b33113710b9fd98bbc1cb9b14b99219395 Author: Jacopo Mondi Date: Fri May 13 15:13:58 2022 +0100 media: ov5640: Split DVP and CSI-2 timings Separate the timings for the DVP mode from the timings for the CSI-2 mode in the ov5640 modes definition. The CSI-2 timings will deviate from the DVP ones as the clock tree is calculated differently. In CSI-2 mode change the analog crop rectangles as the OV5640 pixel array is composed as: - vertically: 16 dummy columns, 2592 valid ones and 16 dummy columns for a total of 2624 columns - horizontally: 8 optical black lines, 6 dummy ones, 1944 valid and 6 dummies for a total of 1964 lines Adjust the analog crop rectangle in CSI-2 mode to: - Skip the first 16 dummy columns - Skip the first 14 black/dummy lines - Pass the whole valid pixel array size to the ISP for all modes except 1024x768, 720p and 1080p which are obtained by cropping the valid pixel array. Tested in RGB565, UYVY and RGB888 modes in CSI-2 mode. Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 582 ++++++++++++++++++++++++++++++++------------- 1 file changed, 420 insertions(+), 162 deletions(-) commit e74ef55b89682eac816377e5b457246b2de800d8 Author: Jacopo Mondi Date: Fri May 13 15:13:57 2022 +0100 media: ov5640: Fix 720x480 in RGB888 mode Adjust the left crop of 720x480 to enable capture in RGB888 format, which is otherwise broken. The 56 pixels alignment has been copied from the 720x576 mode. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3145efcdb4d0eb3f4045d45c55a3963ed4f735c4 Author: Jacopo Mondi Date: Fri May 13 15:13:56 2022 +0100 media: ov5640: Rework timings programming The current definition of a sensor mode defines timings as follows: - hact, vact: Visible width and height - htot, vtot: Total sizes including blankings This makes difficult to clearly separate the visible sizes from the blankings and to make the vertical blanking programmable. Rework the sensor modes sizes definition to: - Report the analog crop sizes - Report the visible crop size - Report the total pixels per line as HBLANK is fixed - Report the VBLANK value to make it programmable Also modify the ov5640_set_timings() function to program all the windowing registers are remove them from the per-mode register-value tables. Do not change the timing values from the ones reported in the register tables to maintain bisectability. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 445 ++++++++++++++++++++++++++++++--------------- 1 file changed, 300 insertions(+), 145 deletions(-) commit 6c957ed73e5bb908c8d33471671290e93b41ebc1 Author: Jacopo Mondi Date: Fri May 13 15:13:55 2022 +0100 media: ov5640: Rework CSI-2 clock tree Re-work the ov5640_set_mipi_pclk() function to calculate the PLL configuration using the pixel_rate and link_freq values set at s_fmt time. Rework the DVP clock mode settings to calculate the pixel clock internally and remove the assumption on the 16bpp format. Tested in MIPI CSI-2 mode with 1 and 2 data lanes with: - all the sensor supported resolutions in UYVY, RGB565 and MJPEG formats. - resolutions >= 1280x720 in RAW Bayer format. - resolutions < 1280x720 in RGB888 format. [Rework pclk_period and link_freq computation] Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Hugues Fruchet Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 196 ++++++++++++++++++++++----------------------- 1 file changed, 96 insertions(+), 100 deletions(-) commit 3c28588f35d3c0a93f38a347c4727ca4bbe244bd Author: Jacopo Mondi Date: Fri May 13 15:13:54 2022 +0100 media: ov5640: Update pixel_rate and link_freq After having set a new format re-calculate the pixel_rate and link_freq control values and update them when in MIPI mode. Take into account the limitation of the link frequency having to be strictly smaller than 1GHz when computing the desired link_freq, and adjust the resulting pixel_rate acounting for the clock tree configuration. [Adjust link_freq calculation] Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Hugues Fruchet Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 85 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 2 deletions(-) commit 7a3b8d4bda2546ba0a29924dea2175e181dd101c Author: Jacopo Mondi Date: Fri May 13 15:13:53 2022 +0100 media: ov5640: Add LINK_FREQ control Add the V4L2_CID_LINK_FREQ control to the ov5640 driver. Make the control read-only for the moment. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 2d7671f6098b5fb2c16b89955d28de77db07ac1b Author: Jacopo Mondi Date: Fri May 13 15:13:52 2022 +0100 media: ov5640: Associate bpp with formats Associate the bit depth to each format supported by the sensor. The bpp will be used to calculate the line length. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 63 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 15 deletions(-) commit 63a6ef2360bdeffcdd41bcdd86937b6db17b573d Author: Mikko Perttunen Date: Mon Jun 27 17:19:57 2022 +0300 dt-bindings: Add headers for Host1x and VIC on Tegra234 Add clock, memory controller, powergate and reset dt-binding headers for Host1x and VIC on Tegra234. Signed-off-by: Mikko Perttunen Acked-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding include/dt-bindings/clock/tegra234-clock.h | 4 ++++ include/dt-bindings/memory/tegra234-mc.h | 5 +++++ include/dt-bindings/power/tegra234-powergate.h | 1 + include/dt-bindings/reset/tegra234-reset.h | 1 + 4 files changed, 11 insertions(+) commit 8e823f5c8c11f44bf4bbe3972eea08ab7b003ff4 Author: Jacopo Mondi Date: Fri May 13 15:13:51 2022 +0100 media: ov5640: Add ov5640_is_csi2() function Checking if the sensor is used in DVP or MIPI CSI-2 mode is a repeated pattern which is about to be repeated more often. Provide an inline function to shortcut that. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 8409d01707463c8a3f4cbb7e5ca119ab425a9528 Author: Jacopo Mondi Date: Fri May 13 15:13:50 2022 +0100 media: ov5604: Re-arrange modes definition The array of supported modes is close to unreadable. Re-arrange it giving it some room to breath. Cosmetic change only. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 141 ++++++++++++++++++++++++++------------------- 1 file changed, 81 insertions(+), 60 deletions(-) commit 22845bf2dfb1ca7dcffaf25121f9e70521b7ee77 Author: Jacopo Mondi Date: Fri May 13 15:13:49 2022 +0100 media: ov5640: Add pixel rate to modes Add to each mode supported by the sensor the ideal pixel rate, as defined by Table 2.1 in the chip manual. The ideal pixel rate will be used to compute the MIPI CSI-2 clock tree. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Tested-by: Adam Ford #imx8mm-beacon-kit Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) commit 887e6ee3de9f0a14017c73c4bcfe7e5864441ee9 Author: Hugues Fruchet Date: Mon May 16 10:20:48 2022 +0100 media: stm32-dcmi: add support of 1X16 serial pixel formats variant Add support of 1X16 serial pixel formats in order to support CSI-2 camera sensor exposing 1x16 pixel formats only. Signed-off-by: Hugues Fruchet Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/st/stm32/stm32-dcmi.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit d0034926fa2227fd5f6c8f260543cb35851ed0ff Author: Hugues Fruchet Date: Mon May 16 10:19:34 2022 +0100 media: st-mipid02: expose 1X16 serial pixel format Expose RGB & YUV 1X16 serial pixel format variants to comply with CSI-2 camera sensor pixel formats. Signed-off-by: Hugues Fruchet Reviewed-by: Benjamin Mugnier Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/st-mipid02.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 5109fc8de3288077a20d4b63ae48562aeaae2edd Author: Alain Volmat Date: Mon May 16 10:19:33 2022 +0100 media: st-mipid02: add support for YVYU and VYUY formats Those two formats were missing in the list of supported MBUS formats. Signed-off-by: Alain Volmat Reviewed-by: Benjamin Mugnier Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/st-mipid02.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 81bf9e2e6e857cd8bed7062c22af09fb34881340 Author: Hugues Fruchet Date: Mon May 16 10:19:32 2022 +0100 media: st-mipid02: add support of pixel clock polarity Add support of pixel clock polarity. Signed-off-by: Hugues Fruchet Reviewed-by: Benjamin Mugnier Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/st-mipid02.c | 3 +++ 1 file changed, 3 insertions(+) commit fda0f59a3aa41e0b724301747802e6ebeddae42a Author: Sakari Ailus Date: Wed May 18 16:52:36 2022 +0100 media: ov7251: Fix multiple problems in s_stream callback The s_stream callback had several issues: - If pm_runtime_get_sync() fails, the usage_count is not put. - The sensor wasn't suspended if s_stream(subdev, 1) failed. Fix this. Fixes: ("media: i2c: Add pm_runtime support to ov7251") Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov7251.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 576d196c522bd0e17bf9c5ff92ef963c0960a201 Author: Paul Kocialkowski Date: Wed May 25 20:03:00 2022 +0100 media: sunxi: Add support for the A83T MIPI CSI-2 controller The A83T supports MIPI CSI-2 with a composite controller, covering both the protocol logic and the D-PHY implementation. This controller seems to be found on the A83T only and probably was abandoned since. This implementation splits the protocol and D-PHY registers and uses the PHY framework internally. The D-PHY is not registered as a standalone PHY driver since it cannot be used with any other controller. There are a few notable points about the controller: - The initialisation sequence involes writing specific magic init values that do not seem to make any particular sense given the concerned register fields; - Interrupts appear to be hitting regardless of the interrupt mask registers, which can cause a serious flood when transmission errors occur. Only 8-bit and 10-bit Bayer formats are currently supported. While up to 4 internal channels to the CSI controller exist, only one is currently supported by this implementation. This work is based on the first version of the driver submitted by Kévin L'hôpital, which was adapted to mainline from the Allwinner BSP. This version integrates MIPI CSI-2 support as a standalone V4L2 subdev instead of merging it in the sun6i-csi driver. It was tested on a Banana Pi M3 board with an OV8865 sensor in a 4-lane configuration. Signed-off-by: Paul Kocialkowski Acked-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/Kconfig | 1 + drivers/media/platform/sunxi/Makefile | 1 + .../platform/sunxi/sun8i-a83t-mipi-csi2/Kconfig | 12 + .../platform/sunxi/sun8i-a83t-mipi-csi2/Makefile | 4 + .../sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_dphy.c | 72 ++ .../sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_dphy.h | 39 + .../sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c | 815 +++++++++++++++++++++ .../sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.h | 55 ++ .../sun8i_a83t_mipi_csi2_reg.h | 151 ++++ 9 files changed, 1150 insertions(+) commit e4afdad6a8b49243860677463e1b0410d9f623e2 Author: Paul Kocialkowski Date: Wed May 25 20:02:59 2022 +0100 media: dt-bindings: media: Add Allwinner A83T MIPI CSI-2 bindings documentation This introduces YAML bindings documentation for the Allwinner A83T MIPI CSI-2 controller. Signed-off-by: Paul Kocialkowski Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/allwinner,sun8i-a83t-mipi-csi2.yaml | 125 +++++++++++++++++++++ 1 file changed, 125 insertions(+) commit 38b6c01a6b34719b66aa58490fd258974ae2f8e8 Merge: 8bc65d38ee46 d1954e3e1b66 Author: Kalle Valo Date: Fri Jul 8 17:03:42 2022 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.20. Major changes: ath9k * fix use-after-free in ath9k_hif_usb_rx_cb() commit 9ed11999f9bfeef962f290d8eca711027a934ce5 Author: Paul Kocialkowski Date: Wed May 25 20:02:58 2022 +0100 media: MAINTAINERS: Add entry for the Allwinner A31 MIPI CSI-2 bridge driver Add myself as maintainer of the Allwinner A31 MIPI CSI-2 bridge media driver. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit af54b4f4c17f54e8c7c43fb34571bc361cfa4ab4 Author: Paul Kocialkowski Date: Wed May 25 20:02:57 2022 +0100 media: sunxi: Add support for the A31 MIPI CSI-2 controller The A31 MIPI CSI-2 controller is a dedicated MIPI CSI-2 bridge found on Allwinner SoCs such as the A31 and V3/V3s. It is a standalone block, connected to the CSI controller on one side and to the MIPI D-PHY block on the other. It has a dedicated address space, interrupt line and clock. It is represented as a V4L2 subdev to the CSI controller and takes a MIPI CSI-2 sensor as its own subdev, all using the fwnode graph and media controller API. Only 8-bit and 10-bit Bayer formats are currently supported. While up to 4 internal channels to the CSI controller exist, only one is currently supported by this implementation. Signed-off-by: Paul Kocialkowski Acked-by: Maxime Ripard Reported-by: kernel test robot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/Kconfig | 1 + drivers/media/platform/sunxi/Makefile | 1 + .../media/platform/sunxi/sun6i-mipi-csi2/Kconfig | 14 + .../media/platform/sunxi/sun6i-mipi-csi2/Makefile | 4 + .../sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c | 749 +++++++++++++++++++++ .../sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.h | 52 ++ .../sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2_reg.h | 76 +++ 7 files changed, 897 insertions(+) commit 787d694677f0c8d76021c4d5ec2e55c256fd33b8 Author: Paul Kocialkowski Date: Wed May 25 20:02:56 2022 +0100 media: dt-bindings: media: Add Allwinner A31 MIPI CSI-2 bindings documentation This introduces YAML bindings documentation for the Allwinner A31 MIPI CSI-2 controller. Signed-off-by: Paul Kocialkowski Reviewed-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/allwinner,sun6i-a31-mipi-csi2.yaml | 137 +++++++++++++++++++++ 1 file changed, 137 insertions(+) commit 249106dadd207a5666c0b2167d7421052934e028 Author: Paul Kocialkowski Date: Wed May 25 20:02:55 2022 +0100 media: dt-bindings: media: sun6i-a31-csi: Add MIPI CSI-2 input port The A31 CSI controller supports two distinct input interfaces: parallel and an external MIPI CSI-2 bridge. The parallel interface is often connected to a set of hardware pins while the MIPI CSI-2 bridge is an internal FIFO-ish link. As a result, these two inputs are distinguished as two different ports. Note that only one of the two may be present on a controller instance. For example, the V3s has one controller dedicated to MIPI-CSI2 and one dedicated to parallel. Update the binding with an explicit ports node that holds two distinct port nodes: one for parallel input and one for MIPI CSI-2. This is backward-compatible with the single-port approach that was previously taken for representing the parallel interface port, which stays enumerated as fwnode port 0. Note that additional ports may be added in the future, especially to support feeding the CSI controller's output to the ISP. Signed-off-by: Paul Kocialkowski Reviewed-by: Rob Herring Acked-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../bindings/media/allwinner,sun6i-a31-csi.yaml | 58 ++++++++++++++++------ 1 file changed, 44 insertions(+), 14 deletions(-) commit ea1a6270ff4fa4460914cf788b0560271a577615 Author: Mikko Perttunen Date: Mon Jun 27 17:19:47 2022 +0300 dt-bindings: host1x: Add iommu-map property Add schema information for specifying context stream IDs. This uses the standard iommu-map property. Signed-off-by: Mikko Perttunen Reviewed-by: Robin Murphy Acked-by: Rob Herring Signed-off-by: Thierry Reding .../devicetree/bindings/display/tegra/nvidia,tegra20-host1x.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit 6f1ae821a6c4aa9d5b8f437b27ec86fb569219fd Author: Nicolas Frattaroli Date: Sun Jun 12 16:53:45 2022 +0100 media: hantro: Add support for RK356x encoder The RK3566 and RK3568 SoCs come with a small Hantro instance which is solely dedicated to encoding. This patch adds the necessary structs to the Hantro driver to allow the JPEG encoder of it to function. Through some sleuthing through the vendor's MPP source code and after closer inspection of the TRM, it was determined that the hardware likely supports VP8 and H.264 as well. Tested with the following GStreamer command: gst-launch-1.0 videotestsrc ! v4l2jpegenc ! matroskamux ! \ filesink location=foo.mkv Signed-off-by: Nicolas Frattaroli Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro_drv.c | 1 + drivers/staging/media/hantro/hantro_hw.h | 1 + drivers/staging/media/hantro/rockchip_vpu_hw.c | 25 +++++++++++++++++++++++++ 3 files changed, 27 insertions(+) commit 5484ea9229a1decd6662dce2d8ab2920289d69d4 Author: Nicolas Frattaroli Date: Sun Jun 12 16:53:44 2022 +0100 media: dt-binding: media: Add rk3568-vepu binding The RK3568 and RK3566 have a Hantro VPU node solely dedicated to encoding. This patch adds a new binding to describe it, as it does not really fit the rockchip-vpu binding, since there is no decoder. Signed-off-by: Nicolas Frattaroli Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../bindings/media/rockchip,rk3568-vepu.yaml | 69 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 70 insertions(+) commit a621cc4bed97e49f5a8019f5215dec7e208a7c4d Author: Ming Qian Date: Tue Jun 28 06:19:52 2022 +0100 media: amphion: release core lock before reset vpu core In reset vpu core, driver will wait for a response event, but if there are still some events unhandled, they will be handled first, driver may acquire core lock for that. So if we do reset in core lock, it may led to reset timeout. Fixes: 9f599f351e86a ("media: amphion: add vpu core driver") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/amphion/vpu_core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit d1954e3e1b66422a7b8fcc0d75054897262f9514 Author: Jiang Jian Date: Tue Jun 21 16:02:40 2022 +0800 ath9k: remove unexpected words "the" in comments there is unexpected word "the" in comments need to remove Signed-off-by: Jiang Jian Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220621080240.42198-1-jiangjian@cdjrlc.com drivers/net/wireless/ath/ath9k/ar9002_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eca78a9e402f88ad4f0cc4ce0b1e2fcbfc30d61d Author: Sebastian Fricke Date: Mon Jun 27 08:12:23 2022 +0100 media: Fix incorrect P010 chroma order description The chroma order of P010 is `CbCr`, match with the descriptions in `include/uapi/linux/videodev2.h` and the documentation. Fixes: 5374d8fb75f3 ("media: Add P010 video format") Signed-off-by: Sebastian Fricke Reviewed-by: Laurent Pinchart Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d1e59a35ffaffcf9bf9c6cde19b7adedeb52045 Author: Zhang Jiaming Date: Mon Jul 4 11:00:04 2022 +0800 ath11k: Fix typo in comments There is a typo(isn't') in comments. It maybe 'isn't' instead of 'isn't''. Signed-off-by: Zhang Jiaming Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220704030004.16484-1-jiaming@nfschina.com drivers/net/wireless/ath/ath11k/hal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76a48e755fba0f839edcb9d572be6a8aed89e89d Author: Marek Vasut Date: Sun Jun 26 17:46:08 2022 +0100 media: docs: Fix VIVIOC typo Replace VIVIOC_ with VIDIOC_ , trivial typo fix. Signed-off-by: Marek Vasut Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/userspace-api/media/v4l/mmap.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd92b16cbc9834e0350c796f5d71f715f5b1af3c Author: Kartik Date: Mon Jul 4 13:43:37 2022 +0530 dt-bindings: timer: Add Tegra186 & Tegra234 Timer The Tegra186 timer provides ten 29-bit timer counters and one 32-bit timestamp counter. The Tegra234 timer provides sixteen 29-bit timer counters and one 32-bit timestamp counter. Each NV timer selects its timing reference signal from the 1 MHz reference generated by USEC, TSC or either clk_m or OSC. Each TMR can be programmed to generate one-shot, periodic, or watchdog interrupts. Signed-off-by: Kartik Reviewed-by: Rob Herring Signed-off-by: Thierry Reding .../bindings/timer/nvidia,tegra186-timer.yaml | 109 +++++++++++++++++++++ 1 file changed, 109 insertions(+) commit 6811c98ca2c5de6e725110287dbeba2ae7fcf053 Author: Marek Vasut Date: Sun Jun 26 15:47:01 2022 +0100 media: v4l2-ctrls: Fix missing newline in examples Replace supportedn with supported\n , i.e. add the missing backslash. Signed-off-by: Marek Vasut Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/userspace-api/media/v4l/control.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab14c99c035da7156a3b66fa171171295bc4b89a Author: AngeloGioacchino Del Regno Date: Thu Jun 23 14:55:46 2022 +0100 media: platform: mtk-mdp: Fix mdp_ipi_comm structure alignment The mdp_ipi_comm structure defines a command that is either PROCESS (start processing) or DEINIT (destroy instance); we are using this one to send PROCESS or DEINIT commands from Linux to an MDP instance through a VPU write but, while the first wants us to stay 4-bytes aligned, the VPU instead requires an 8-bytes data alignment. Keeping in mind that these commands are executed immediately after sending them (hence not chained with others before the VPU/MDP "actually" start executing), it is fine to simply add a padding of 4 bytes to this structure: this keeps the same performance as before, as we're still stack-allocating it, while avoiding hackery inside of mtk-vpu to ensure alignment bringing a definitely bigger performance impact. Fixes: c8eb2d7e8202 ("[media] media: Add Mediatek MDP Driver") Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Houlong Wei Reviewed-by: Irui Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/mdp/mtk_mdp_ipi.h | 2 ++ 1 file changed, 2 insertions(+) commit b813aa3dc66336d698e10264fa8c088019050a04 Author: Jiang Jian Date: Thu Jun 23 08:42:57 2022 +0100 media: pvrusb2: drop unexpected word 'a' in comments there is an unexpected word 'a' in the comments that need to be dropped file - drivers/media/usb/pvrusb2/pvrusb2-hdw.c line - 5044 But now it's a a chicken and egg problem...) */ changed to: But now it's a chicken and egg problem...) */ Signed-off-by: Jiang Jian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a2a24d9b90823ab13d5ed3c06f3fac31c2533b8 Author: Jiang Jian Date: Thu Jun 23 08:35:04 2022 +0100 media: ti: drop unexpected word 'a' in comments there is an unexpected word 'a' in the comments that need to be dropped file - drivers/media/platform/ti/cal/cal-camerarx.c line - 308 * DRA80xM TRMs have a a slightly simplified sequence. changed to: * DRA80xM TRMs have a slightly simplified sequence. Signed-off-by: Jiang Jian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/ti/cal/cal-camerarx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e535e6c496d84b2fc4d8e4696a01afcb8d549c4 Author: Jiang Jian Date: Wed Jun 22 18:11:37 2022 +0100 media: gspca: drop unexpected word 'is' in the comments there is an unexpected word 'is' in the comments that need to be dropped file - drivers/media/usb/gspca/spca501.c line - 491 * This is is for the 3com HomeConnect Lite which is spca501a based. changed to: * This is for the 3com HomeConnect Lite which is spca501a based. Signed-off-by: Jiang Jian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/spca501.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1601ea9a65133685c4ddaf3d3640d905e9405c8 Author: Jiang Jian Date: Wed Jun 22 15:41:51 2022 +0100 media: cx18: Fix typo in comments Remove the repeated word 'and' from comments Signed-off-by: Jiang Jian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx18/cx18-av-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5c97da8037b18d1256a58459fa96ed68e50fb41 Author: AngeloGioacchino Del Regno Date: Wed Jul 6 11:06:27 2022 +0100 nvmem: mtk-efuse: Simplify with devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. No functional changes. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220706100627.6534-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/nvmem/mtk-efuse.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 38b4c8a4708f9091dc547854e7bb0812e706c48b Author: Allen-KH Cheng Date: Wed Jul 6 11:06:26 2022 +0100 dt-bindings: nvmem: mediatek: efuse: add support for mt8186 Add compatible for mt8186 SoC. Acked-by: Rob Herring Signed-off-by: Allen-KH Cheng Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220706100627.6534-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml | 1 + 1 file changed, 1 insertion(+) commit cf35ec15a1c2ec21446db16672be2b866590c221 Author: Chunfeng Yun Date: Wed Jul 6 11:06:25 2022 +0100 dt-bindings: nvmem: mediatek: efuse: add support mt8183 Add "mediatek,mt8183-efuse" to fix dtbs check warning. Acked-by: Rob Herring Signed-off-by: Chunfeng Yun Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220706100627.6534-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml | 1 + 1 file changed, 1 insertion(+) commit 9c5fc8e1ac24e3cecd217f75149f6b62619f2425 Author: Chunfeng Yun Date: Wed Jul 6 11:06:24 2022 +0100 dt-bindings: nvmem: convert mtk-efuse.txt to YAML schema Convert mtk-efuse.txt to YAML schema mediatek,efuse.yaml Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Chunfeng Yun Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220706100627.6534-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/nvmem/mediatek,efuse.yaml | 87 ++++++++++++++++++++++ .../devicetree/bindings/nvmem/mtk-efuse.txt | 43 ----------- 2 files changed, 87 insertions(+), 43 deletions(-) commit 38f91750d5cfe0d6973ed4886cc6b5ff425aae29 Author: Lukas Bulwahn Date: Wed Jul 6 11:06:23 2022 +0100 MAINTAINERS: rectify file pattern in MICROCHIP OTPC DRIVER Commit 6b291610dd57 ("nvmem: microchip-otpc: add support") adds the Microchip otpc driver and a corresponding MAINTAINERS section, but slips in a slightly wrong file pattern. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Rectify this file pattern in MICROCHIP OTPC DRIVER. Acked-by: Claudiu Beznea Signed-off-by: Lukas Bulwahn Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220706100627.6534-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98830350d3fc824c1ff5c338140fe20f041a5916 Author: Claudiu Beznea Date: Wed Jul 6 11:06:22 2022 +0100 nvmem: microchip-otpc: add support Add support for Microchip OTP controller available on SAMA7G5. The OTPC controls the access to a non-volatile memory. The memory behind OTPC is organized into packets, packets are composed by a fixed length header (4 bytes long) and a variable length payload (payload length is available in the header). When software request the data at an offset in memory the OTPC will return (via header + data registers) the whole packet that has a word at that offset. For the OTP memory layout like below: offset OTP Memory layout . . . ... . . . 0x0E +-----------+ <--- packet X | header X | 0x12 +-----------+ | payload X | 0x16 | | | | 0x1A | | +-----------+ . . . ... . . . if user requests data at address 0x16 the data started at 0x0E will be returned by controller. User will be able to fetch the whole packet starting at 0x0E (or parts of the packet) via proper registers. The same packet will be returned if software request the data at offset 0x0E or 0x12 or 0x1A. The OTP will be populated by Microchip with at least 2 packets first one being boot configuration packet and the 2nd one being temperature calibration packet. The packet order will be preserved b/w different chip revisions but the packet sizes may change. For the above reasons and to keep the same software able to work on all chip variants the read function of the driver is working with a packet id instead of an offset in OTP memory. Signed-off-by: Claudiu Beznea Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220706100627.6534-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 8 ++ drivers/nvmem/Kconfig | 7 + drivers/nvmem/Makefile | 2 + drivers/nvmem/microchip-otpc.c | 288 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 305 insertions(+) commit 4d5e3b06e1fc1428be14cd4ebe3b37c1bb34f95d Author: Claudiu Beznea Date: Wed Jul 6 11:06:21 2022 +0100 dt-bindings: microchip-otpc: document Microchip OTPC Document Microchip OTP controller. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Claudiu Beznea Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220706100627.6534-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman .../bindings/nvmem/microchip,sama7g5-otpc.yaml | 50 ++++++++++++++++++++++ include/dt-bindings/nvmem/microchip,sama7g5-otpc.h | 12 ++++++ 2 files changed, 62 insertions(+) commit b7e241bbff24f9e106bf616408fd58bcedc44bae Author: Carlos Llamas Date: Fri Jul 1 18:20:41 2022 +0000 binder: fix redefinition of seq_file attributes The patchset in [1] exported some definitions to binder_internal.h in order to make the debugfs entries such as 'stats' and 'transaction_log' available in a binderfs instance. However, the DEFINE_SHOW_ATTRIBUTE macro expands into a static function/variable pair, which in turn get redefined each time a source file includes this internal header. This problem was made evident after a report from the kernel test robot where several W=1 build warnings are seen in downstream kernels. See the following example: include/../drivers/android/binder_internal.h:111:23: warning: 'binder_stats_fops' defined but not used [-Wunused-const-variable=] 111 | DEFINE_SHOW_ATTRIBUTE(binder_stats); | ^~~~~~~~~~~~ include/linux/seq_file.h:174:37: note: in definition of macro 'DEFINE_SHOW_ATTRIBUTE' 174 | static const struct file_operations __name ## _fops = { \ | ^~~~~~ This patch fixes the above issues by moving back the definitions into binder.c and instead creates an array of the debugfs entries which is more convenient to share with binderfs and iterate through. [1] https://lore.kernel.org/all/20190903161655.107408-1-hridya@google.com/ Fixes: 0e13e452dafc ("binder: Add stats, state and transactions files") Fixes: 03e2e07e3814 ("binder: Make transaction_log available in binderfs") Reported-by: kernel test robot Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20220701182041.2134313-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 114 ++++++++++++++++++++++++++------------ drivers/android/binder_internal.h | 46 ++++----------- drivers/android/binderfs.c | 47 ++++------------ 3 files changed, 100 insertions(+), 107 deletions(-) commit ffff4913c7e22cc2bd5570df73e0e154bf111215 Author: Justin Stitt Date: Fri Jul 1 16:20:31 2022 -0700 eeprom: idt_89hpesx: fix clang -Wformat warnings see warnings: | drivers/misc/eeprom/idt_89hpesx.c:570:5: error: format specifies type | 'unsigned char' but the argument has type 'u16' (aka 'unsigned short') | [-Werror,-Wformat] memaddr); - | drivers/misc/eeprom/idt_89hpesx.c:579:5: error: format specifies type | 'unsigned char' but the argument has type 'u16' (aka 'unsigned short') | [-Werror,-Wformat] memaddr); - | drivers/misc/eeprom/idt_89hpesx.c:814:4: error: format specifies type | 'unsigned short' but the argument has type 'unsigned int' | [-Werror,-Wformat] CSR_REAL_ADDR(csraddr)); There's an ongoing movement to eventually enable the -Wformat flag for clang. See: https://github.com/ClangBuiltLinux/linux/issues/378 The format specifier for idt_89hpesx.c:570 and 579 was `0x%02hhx`. The part we care about `%hhx` describes a single byte format, wherein the leftmost byte of our u16 type (of which memaddr is) is truncated. example: ``` uint16_t x = 0xbabe; printf("%hhx\n", x); // output is: be // we lost 'ba' ``` There exists a similar issue at idt_89hpesx.c:814 which involves the CSR_REAL_ADDR macro. This macro returns a u16 but due to default argument promotion for variadic functions (printf-like) actually provides an int to the dev_err method. My proposed solution is to expand the width of the format specifier to fully encompass the provided argument (which is promoted to an int, see below). I opted for '%x' as this specifies an unsigned hexadecimal integer which, with a guarantee, can represent all the values of a u16. As per C11 6.3.1.1: (https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf) `If an int can represent all values of the original type ..., the value is converted to an int; otherwise, it is converted to an unsigned int. These are called the integer promotions.` Link: https://github.com/ClangBuiltLinux/linux/issues/378 Reviewed-by: Nathan Chancellor Signed-off-by: Justin Stitt Link: https://lore.kernel.org/r/20220701232031.2639134-1-justinstitt@google.com Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/idt_89hpesx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 89e1ec7732fddd5a109fa098ed2a2516093cc6d7 Author: Julia Lawall Date: Wed Jul 6 11:11:31 2022 +0100 slimbus: messaging: fix typos in comments Spelling mistakes (triple letters) in comments. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220706101131.6934-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/slimbus/messaging.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ad8046594f85b5ddb250619f62b2b10de9b602ec Author: keliu Date: Wed Jul 6 11:11:30 2022 +0100 drivers: slimbus: Directly use ida_alloc()/free() Use ida_alloc()/ida_free() instead of deprecated ida_simple_get()/ida_simple_remove() . Signed-off-by: keliu Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220706101131.6934-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/slimbus/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ff46a601afc5a66a81c3945b83d0a2caeb88e8bc Author: Alexander Shishkin Date: Tue Jul 5 11:26:37 2022 +0300 intel_th: pci: Add Raptor Lake-S CPU support Add support for the Trace Hub in Raptor Lake-S CPU. Reviewed-by: Andy Shevchenko Cc: stable Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20220705082637.59979-7-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit 23e2de5826e2fc4dd43e08bab3a2ea1a5338b063 Author: Alexander Shishkin Date: Tue Jul 5 11:26:36 2022 +0300 intel_th: pci: Add Raptor Lake-S PCH support Add support for the Trace Hub in Raptor Lake-S PCH. Reviewed-by: Andy Shevchenko Cc: stable Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20220705082637.59979-6-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit 802a9a0b1d91274ef10d9fe429b4cc1e8c200aef Author: Alexander Shishkin Date: Tue Jul 5 11:26:35 2022 +0300 intel_th: pci: Add Meteor Lake-P support Add support for the Trace Hub in Meteor Lake-P. Reviewed-by: Andy Shevchenko Cc: stable Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20220705082637.59979-5-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit ac12ad3ccf6d386e64a9d6a890595a2509d24edd Author: Alexander Shishkin Date: Tue Jul 5 11:26:34 2022 +0300 intel_th: msu: Fix vmalloced buffers After commit f5ff79fddf0e ("dma-mapping: remove CONFIG_DMA_REMAP") there's a chance of DMA buffer getting allocated via vmalloc(), which messes up the mmapping code: > RIP: msc_mmap_fault [intel_th_msu] > Call Trace: > > __do_fault > do_fault ... Fix this by accounting for vmalloc possibility. Fixes: ba39bd830605 ("intel_th: msu: Switch over to scatterlist") Reviewed-by: Andy Shevchenko Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20220705082637.59979-4-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/msu.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 82f76a4a720791d889de775b5f7541d601efc8bd Author: Jiasheng Jiang Date: Tue Jul 5 11:26:33 2022 +0300 intel_th: msu-sink: Potential dereference of null pointer The return value of dma_alloc_coherent() needs to be checked. To avoid use of null pointer in sg_set_buf() in case of the failure of alloc. Fixes: f220df66f676 ("intel_th: msu-sink: An example msu buffer "sink"") Reviewed-by: Andy Shevchenko Signed-off-by: Jiasheng Jiang Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20220705082637.59979-3-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/msu-sink.c | 3 +++ 1 file changed, 3 insertions(+) commit 086c28ab7c5699256aced0049aae9c42f1410313 Author: Christophe JAILLET Date: Tue Jul 5 11:26:32 2022 +0300 intel_th: Fix a resource leak in an error handling path If an error occurs after calling 'pci_alloc_irq_vectors()', 'pci_free_irq_vectors()' must be called as already done in the remove function. Fixes: 7b7036d47c35 ("intel_th: pci: Use MSI interrupt signalling") Reviewed-by: Andy Shevchenko Signed-off-by: Christophe JAILLET Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20220705082637.59979-2-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/pci.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit e5535ff173318775f2c52b7f072bb3abf03b5b0f Author: Yang Yingliang Date: Mon Jul 4 20:50:44 2022 +0800 virt: acrn: using for_each_set_bit to simplify the code It's more cleanly to use for_each_set_bit() instead of opencoding it. Signed-off-by: Yang Yingliang Signed-off-by: Fei Li Link: https://lore.kernel.org/r/20220704125044.2192381-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/virt/acrn/ioreq.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 64c591661e4948257aac9b586394a25a7c64ec69 Author: Christophe JAILLET Date: Mon Jul 4 22:23:17 2022 +0200 sgi-xp: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. While at it, remove a useless cast in a bitmap_empty() call. Reviewed-by: Steve Wahl Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/ef49726d60f6a531428609f60a2398b6c3d9a26e.1656966181.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman drivers/misc/sgi-xp/xpnet.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 67d7ebdeb2d5a058dd5079107505fffe7332b27a Author: Sieng-Piaw Liew Date: Thu Jul 7 22:10:56 2022 +0800 net: ag71xx: switch to napi_build_skb() to reuse skbuff_heads napi_build_skb() reuses NAPI skbuff_head cache in order to save some cycles on freeing/allocating skbuff_heads on every new Rx or completed Tx. Use napi_consume_skb() to feed the cache with skbuff_heads of completed Tx, so it's never empty. The budget parameter is added to indicate NAPI context, as a value of zero can be passed in the case of netpoll. Signed-off-by: Sieng-Piaw Liew Signed-off-by: David S. Miller drivers/net/ethernet/atheros/ag71xx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c2dd4059dc31ee6f5b83c8d2064bb1f1f465bcec Author: Eric Dumazet Date: Thu Jul 7 19:18:46 2022 +0000 net: minor optimization in __alloc_skb() TCP allocates 'fast clones' skbs for packets in tx queues. Currently, __alloc_skb() initializes the companion fclone field to SKB_FCLONE_CLONE, and leaves other fields untouched. It makes sense to defer this init much later in skb_clone(), because all fclone fields are copied and hot in cpu caches at that time. This removes one cache line miss in __alloc_skb(), cost seen on an host with 256 cpus all competing on memory accesses. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/core/skbuff.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2c8f7ef4b3c4ac67a876b2a9fe7b6a1128265104 Merge: 2fd26970cf66 7128af87c7f1 Author: Greg Kroah-Hartman Date: Fri Jul 8 15:17:52 2022 +0200 Merge tag 'arch-cache-topo-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into driver-core-next Sudeep writes: cacheinfo and arch_topology updates for v5.20 These are updates to fix some discrepancies we have in the CPU topology parsing from the device tree /cpu-map node and the divergence from the behaviour on a ACPI enabled platform. The expectation is that both DT and ACPI enabled systems must present consistent view of the CPU topology. The current assignment of generated cluster count as the physical package identifier for each CPU is wrong. The device tree bindings for CPU topology supports sockets to infer the socket or physical package identifier for a given CPU. It is now being made use of you address the issue. These updates also assigns the cluster identifier as parsed from the device tree cluster nodes within /cpu-map without support for nesting of the clusters as there are no such reported/known platforms. In order to be on par with ACPI PPTT physical package/socket support, these updates also include support for socket nodes in /cpu-map. The only exception is that the last level cache id information can be inferred from the same ACPI PPTT while we need to parse CPU cache nodes in the device tree. The cacheinfo changes here is to enable the re-use of the cacheinfo to detect the cache attributes for all the CPU quite early even before the scondardaries are booted so that the information can be used to build the schedular domains especially the last level cache(LLC). * tag 'arch-cache-topo-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: (21 commits) ACPI: Remove the unused find_acpi_cpu_cache_topology() arch_topology: Warn that topology for nested clusters is not supported arch_topology: Add support for parsing sockets in /cpu-map arch_topology: Set cluster identifier in each core/thread from /cpu-map arch_topology: Limit span of cpu_clustergroup_mask() arch_topology: Don't set cluster identifier as physical package identifier arch_topology: Avoid parsing through all the CPUs once a outlier CPU is found arch_topology: Check for non-negative value rather than -1 for IDs validity arch_topology: Set thread sibling cpumask only within the cluster arch_topology: Drop LLC identifier stash from the CPU topology arm64: topology: Remove redundant setting of llc_id in CPU topology arch_topology: Use the last level cache information from the cacheinfo arch_topology: Add support to parse and detect cache attributes cacheinfo: Align checks in cache_shared_cpu_map_{setup,remove} for readability cacheinfo: Use cache identifiers to check if the caches are shared if available cacheinfo: Allow early detection and population of cache attributes cacheinfo: Add support to check if last level cache(LLC) is valid or shared cacheinfo: Move cache_leaves_are_shared out of CONFIG_OF cacheinfo: Add helper to access any cache index for a given CPU cacheinfo: Use of_cpu_device_node_get instead cpu_dev->of_node ... commit b9b721d117e9d360ba693e75ba6b9262dfcdf9e2 Author: Sai Prakash Ranjan Date: Fri Jul 8 15:12:30 2022 +0530 iommu/arm-smmu-qcom: Add debug support for TLB sync timeouts TLB sync timeouts can be due to various reasons such as TBU power down or pending TCU/TBU invalidation/sync and so on. Debugging these often require dumping of some implementation defined registers to know the status of TBU/TCU operations and some of these registers are not accessible in non-secure world such as from kernel and requires SMC calls to read them in the secure world. So, add this debug support to dump implementation defined registers for TLB sync timeout issues. Signed-off-by: Sai Prakash Ranjan Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20220708094230.4349-1-quic_saipraka@quicinc.com Signed-off-by: Will Deacon drivers/iommu/Kconfig | 10 ++ drivers/iommu/arm/arm-smmu/Makefile | 1 + drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.c | 142 +++++++++++++++++++++++ drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 32 ++++- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.h | 28 +++++ drivers/iommu/arm/arm-smmu/arm-smmu.c | 6 +- drivers/iommu/arm/arm-smmu/arm-smmu.h | 1 + 7 files changed, 211 insertions(+), 9 deletions(-) commit 7e5b4322cde067e1d0f1bf8f490e93f664a7c843 Author: Daniel Starke Date: Thu Jul 7 13:32:23 2022 +0200 tty: n_gsm: fix missing corner cases in gsmld_poll() gsmld_poll() currently fails to handle the following corner cases correctly: - remote party closed the associated tty Add the missing checks and map those to EPOLLHUP. Reorder the checks to group them by their reaction. Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20220707113223.3685-4-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 59ff0680ecbfec742b1e0381e7cc46b41eb06647 Author: Daniel Starke Date: Thu Jul 7 13:32:22 2022 +0200 tty: n_gsm: fix flow control handling in tx path The current implementation constipates all transmission paths during flow control except for flow control frames. However, these may not be located at the beginning of the transmission queue of the control channel. Ensure that flow control frames in the transmission queue for the control channel are always handled even if constipated by skipping through other messages. Fixes: 0af021678d5d ("tty: n_gsm: fix deadlock and link starvation in outgoing data path") Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20220707113223.3685-3-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18a948c7d90995d127785e308fa7b701df4c499f Author: Daniel Starke Date: Thu Jul 7 13:32:21 2022 +0200 tty: n_gsm: fix DM command n_gsm is based on the 3GPP 07.010 and its newer version is the 3GPP 27.010. See https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1516 The changes from 07.010 to 27.010 are non-functional. Therefore, I refer to the newer 27.010 here. Chapter 5.3.3 defines the DM response. There exists no DM command. However, the current implementation incorrectly sends DM as command in case of unexpected UIH frames in gsm_queue(). Correct this behavior by always sending DM as response. Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20220707113223.3685-2-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f30e10caa80aa1f35508bc17fc302dbbde9a833c Author: Daniel Starke Date: Thu Jul 7 13:32:20 2022 +0200 tty: n_gsm: fix wrong T1 retry count handling n_gsm is based on the 3GPP 07.010 and its newer version is the 3GPP 27.010. See https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1516 The changes from 07.010 to 27.010 are non-functional. Therefore, I refer to the newer 27.010 here. Chapter 5.7.3 states that the valid range for the maximum number of retransmissions (N2) is from 0 to 255 (both including). gsm_dlci_t1() handles this number incorrectly by performing N2 - 1 retransmission attempts. Setting N2 to zero results in more than 255 retransmission attempts. Fix gsm_dlci_t1() to comply with 3GPP 27.010. Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20220707113223.3685-1-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8bec874f84d826288a6cfa6acc683d15c218d78c Author: Ilpo Järvinen Date: Mon Jul 4 12:45:15 2022 +0300 serial: RS485 termination is supported if DT provides one When DT provides rs485-term, set termination flag as supported. Reviewed-by: Lino Sanfilippo Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220704094515.6831-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 2 ++ 1 file changed, 2 insertions(+) commit 0139da50dc53f0ce2804e83566d290c7e626fd17 Author: Ilpo Järvinen Date: Mon Jul 4 12:45:14 2022 +0300 serial: Embed rs485_supported to uart_port Embed rs485_supported to uart_port to allow serial core to tweak it as needed. Reviewed-by: Lino Sanfilippo Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220704094515.6831-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_bcm2835aux.c | 2 +- drivers/tty/serial/8250/8250_dwlib.c | 4 ++-- drivers/tty/serial/8250/8250_exar.c | 2 +- drivers/tty/serial/8250/8250_fintek.c | 4 ++-- drivers/tty/serial/8250/8250_lpc18xx.c | 2 +- drivers/tty/serial/8250/8250_of.c | 2 +- drivers/tty/serial/8250/8250_pci.c | 2 +- drivers/tty/serial/amba-pl011.c | 2 +- drivers/tty/serial/ar933x_uart.c | 4 ++-- drivers/tty/serial/atmel_serial.c | 2 +- drivers/tty/serial/fsl_lpuart.c | 2 +- drivers/tty/serial/imx.c | 4 ++-- drivers/tty/serial/max310x.c | 2 +- drivers/tty/serial/mcf.c | 4 ++-- drivers/tty/serial/omap-serial.c | 2 +- drivers/tty/serial/sc16is7xx.c | 2 +- drivers/tty/serial/serial_core.c | 8 ++++---- drivers/tty/serial/stm32-usart.c | 2 +- include/linux/serial_core.h | 2 +- 19 files changed, 27 insertions(+), 27 deletions(-) commit 60b21490b72f1348c0a1f483ea1245425a583498 Author: Ilpo Järvinen Date: Mon Jul 4 15:51:51 2022 +0300 MIPS: ath79: Remove one of the identical args in early_printk prom_putchar_wait() inputs both mask and val but the callers always set them to the same value. Thus pass only val. Suggested-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220704125151.59231-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman arch/mips/ath79/early_printk.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 9d3aaceb73acadf134596a2f8db9c451c1332d3d Author: Uwe Kleine-König Date: Mon Jul 4 10:51:19 2022 +0200 serial: 8250_fsl: Don't report FE, PE and OE twice Some Freescale 8250 implementations have the problem that a single long break results in one irq per character frame time. The code in fsl8250_handle_irq() that is supposed to handle that uses the BI bit in lsr_saved_flags to detect such a situation and then skip the second received character. However it also stores other error bits and so after a single frame error the character received in the next irq handling is passed to the upper layer with a frame error, too. So after a spike on the data line (which is correctly recognized as a frame error) the following valid character is thrown away, because the driver reports a frame error for that one, too. To weaken this problem restrict saving LSR to only the BI bit. Note however that the handling is still broken: - lsr_saved_flags is updated using orig_lsr which is the LSR content for the first received char, but there might be more in the FIFO, so a character is thrown away that is received later and not necessarily the one following the break. - The doubled break might be the 2nd and 3rd char in the FIFO, so the workaround doesn't catch these, because serial8250_rx_chars() doesn't handle the workaround. - lsr_saved_flags might have set UART_LSR_BI at the entry of fsl8250_handle_irq() which doesn't originate from fsl8250_handle_irq()'s "up->lsr_saved_flags |= orig_lsr & UART_LSR_BI;" but from e.g. from serial8250_tx_empty(). - For a long or a short break this isn't about two characters, but more or only a single one. Fixes: 9deaa53ac7fa ("serial: add irq handler for Freescale 16550 errata.") Acked-by: Ilpo Järvinen Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220704085119.55900-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_fsl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e1514579246ddc36ba0b860fc8bdd03be085aee Author: Hariprasad Kelam Date: Thu Jul 7 22:00:48 2022 +0530 octeontx2-af: Don't reset previous pfc config Current implementation is such that driver first resets the existing PFC config before applying new pfc configuration. This creates a problem like once PF or VFs requests PFC config previous pfc config by other PFVfs is getting reset. This patch fixes the problem by removing unnecessary resetting of PFC config. Also configure Pause quanta value to smaller as current value is too high. Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 15 +++++++++++---- drivers/net/ethernet/marvell/octeontx2/af/rpm.c | 18 +++++++++++------- drivers/net/ethernet/marvell/octeontx2/af/rpm.h | 3 +-- 3 files changed, 23 insertions(+), 13 deletions(-) commit 8affe37c525d800a2628c4ecfaed13b77dc5634a Author: Michael Grzeschik Date: Mon Jul 4 16:18:12 2022 +0200 usb: dwc3: gadget: fix high speed multiplier setting For High-Speed Transfers the prepare_one_trb function is calculating the multiplier setting for the trb based on the length parameter of the trb currently prepared. This assumption is wrong. For trbs with a sg list, the length of the actual request has to be taken instead. Fixes: 40d829fb2ec6 ("usb: dwc3: gadget: Correct ISOC DATA PIDs for short packets") Cc: stable Signed-off-by: Michael Grzeschik Link: https://lore.kernel.org/r/20220704141812.1532306-3-m.grzeschik@pengutronix.de Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/gadget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 23385cec5f354794dadced7f28c31da7ae3eb54c Author: Michael Grzeschik Date: Mon Jul 4 16:18:11 2022 +0200 usb: dwc3: gadget: refactor dwc3_repare_one_trb The function __dwc3_prepare_one_trb has many parameters. Since it is only used in dwc3_prepare_one_trb there is no point in keeping the function. We merge both functions and get rid of the big list of parameters. Fixes: 40d829fb2ec6 ("usb: dwc3: gadget: Correct ISOC DATA PIDs for short packets") Cc: stable Signed-off-by: Michael Grzeschik Link: https://lore.kernel.org/r/20220704141812.1532306-2-m.grzeschik@pengutronix.de Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/gadget.c | 92 +++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 52 deletions(-) commit 5ea5746dfa051eaca6c79a598ff7dc4ec911cada Author: Bryan O'Donoghue Date: Fri Jul 8 12:58:59 2022 +0100 tools: usb: testusb: Add super-plus speed reporting Add the ability to detect and print the USB speed as "super-plus" if/when the kernel reports that speed. Signed-off-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20220708115859.2095714-4-bryan.odonoghue@linaro.org Signed-off-by: Greg Kroah-Hartman tools/usb/testusb.c | 2 ++ 1 file changed, 2 insertions(+) commit 7fbcd99ebc0b9df7f4a9bbcfbf3e71c6bfddf9cc Author: Bryan O'Donoghue Date: Fri Jul 8 12:58:58 2022 +0100 tools: usb: testusb: Add super speed reporting Add the ability to detect and print the USB speed as "super" if/when the kernel reports that speed. Signed-off-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20220708115859.2095714-3-bryan.odonoghue@linaro.org Signed-off-by: Greg Kroah-Hartman tools/usb/testusb.c | 2 ++ 1 file changed, 2 insertions(+) commit b067fc284667ccbcfdb6c990568a3cfd8b73bb8a Author: Bryan O'Donoghue Date: Fri Jul 8 12:58:57 2022 +0100 tools: usb: testusb: Add wireless speed reporting Add the ability to detect and print the USB speed as "wireless" if/when the kernel reports that speed. Signed-off-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20220708115859.2095714-2-bryan.odonoghue@linaro.org Signed-off-by: Greg Kroah-Hartman tools/usb/testusb.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 3a6bf4a08142826698121bef16b244dcf50a6431 Author: Matthias Kaehlcke Date: Thu Jun 30 12:35:30 2022 -0700 usb: core: hub: Create platform devices for onboard hubs in hub_probe() Call onboard_hub_create/destroy_pdevs() from hub_probe/disconnect() to create/destroy platform devices for onboard USB hubs that may be connected to the hub. The onboard hubs must have nodes in the device tree. onboard_hub_create/destroy_pdevs() are NOPs unless CONFIG_USB_ONBOARD_HUB=y/m. Also add a field to struct usb_hub to keep track of the onboard hub platform devices that are owned by the hub. Reviewed-by: Douglas Anderson Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20220630123445.v24.4.Ic9dd36078f9d803de82ca01a6700c58b8e4de27e@changeid Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 9 ++++++++- drivers/usb/core/hub.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) commit 8bc063641cebf9d555e41d135db2b5035b521768 Author: Matthias Kaehlcke Date: Thu Jun 30 12:35:29 2022 -0700 usb: misc: Add onboard_usb_hub driver The main issue this driver addresses is that a USB hub needs to be powered before it can be discovered. For discrete onboard hubs (an example for such a hub is the Realtek RTS5411) this is often solved by supplying the hub with an 'always-on' regulator, which is kind of a hack. Some onboard hubs may require further initialization steps, like changing the state of a GPIO or enabling a clock, which requires even more hacks. This driver creates a platform device representing the hub which performs the necessary initialization. Currently it only supports switching on a single regulator, support for multiple regulators or other actions can be added as needed. Different initialization sequences can be supported based on the compatible string. Besides performing the initialization the driver can be configured to power the hub off during system suspend. This can help to extend battery life on battery powered devices which have no requirements to keep the hub powered during suspend. The driver can also be configured to leave the hub powered when a wakeup capable USB device is connected when suspending, and power it off otherwise. Technically the driver consists of two drivers, the platform driver described above and a very thin USB driver that subclasses the generic driver. The purpose of this driver is to provide the platform driver with the USB devices corresponding to the hub(s) (a hub controller may provide multiple 'logical' hubs, e.g. one to support USB 2.0 and another for USB 3.x). Co-developed-by: Ravi Chandra Sadineni Reviewed-by: Douglas Anderson Signed-off-by: Ravi Chandra Sadineni Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20220630123445.v24.3.I7c9a1f1d6ced41dd8310e8a03da666a32364e790@changeid Signed-off-by: Greg Kroah-Hartman .../ABI/testing/sysfs-bus-platform-onboard-usb-hub | 8 + MAINTAINERS | 7 + drivers/usb/core/Makefile | 4 + drivers/usb/misc/Kconfig | 16 + drivers/usb/misc/Makefile | 1 + drivers/usb/misc/onboard_usb_hub.c | 428 +++++++++++++++++++++ drivers/usb/misc/onboard_usb_hub.h | 17 + drivers/usb/misc/onboard_usb_hub_pdevs.c | 142 +++++++ include/linux/usb/onboard_hub.h | 18 + 9 files changed, 641 insertions(+) commit dee6719e887b8c539f5d4d3d08c4468498182937 Author: Matthias Kaehlcke Date: Thu Jun 30 12:35:28 2022 -0700 dt-bindings: usb: rts5411: Rename property 'companion-hub' to 'peer-hub' In the context of USB the term 'companion-hub' is misleading, change the name of the property to 'peer-hub'. There are no upstream users of the 'companion-hub' property, neither in the device tree, nor on the driver side, so renaming it shouldn't cause any compatibility issues with existing device trees. Changes in v24: - patch added to the series Reviewed-by: Douglas Anderson Acked-by: Rob Herring Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20220630123445.v24.2.Ie2bbbd3f690826404b8f1059d24edcab33ed898f@changeid Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/realtek,rts5411.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 620e8e8ba6210003fa45081b63d90ef4f3a0637f Author: Matthias Kaehlcke Date: Thu Jun 30 12:35:27 2022 -0700 of/platform: Add stubs for of_platform_device_create/destroy() Code for platform_device_create() and of_platform_device_destroy() is only generated if CONFIG_OF_ADDRESS=y. Add stubs to avoid unresolved symbols when CONFIG_OF_ADDRESS is not set. Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Acked-by: Rob Herring Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20220630123445.v24.1.I08fd2e1c775af04f663730e9fb4d00e6bbb38541@changeid Signed-off-by: Greg Kroah-Hartman include/linux/of_platform.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 1742b765982cd6d9d5e76ba040598981d53e0a0f Author: Chunfeng Yun Date: Fri Jul 8 15:19:03 2022 +0800 usb: mtu3: support function remote wakeup Add function wake notification to support function remote wakeup, currently assume the composite device only enable function wake for the first interface. Forward request to function driver when the recipient is an interface, including: GetStatus() request to the first interface in a function returns the information about 'function remote wakeup' and 'function remote wakeup capalbe'; SetFeature request of FUNCTION_SUSPEND to an interface recipient, the controller driver saves the suspend option; Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220708071903.25752-5-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3_gadget.c | 18 ++++++++++++++++++ drivers/usb/mtu3/mtu3_gadget_ep0.c | 8 ++++---- drivers/usb/mtu3/mtu3_hw_regs.h | 16 ++++++++++++++++ 3 files changed, 38 insertions(+), 4 deletions(-) commit 683ff6e485f1d16fe3ad4f5fbd04af11ce917caf Author: Chunfeng Yun Date: Fri Jul 8 15:19:02 2022 +0800 usb: mtu3: check capability of usb3 dual role It is capable of supporting usb3 dual role if there is at least one usb3 port for device and xhci controller, we can check it from the controller's capability, so no need the property "mediatek,usb3-drd" anymore, but I find the property is not decribed in dt-binding. Meanwhile, also take into account if the u3 port is disabled when the u3 phy is shared with pcie. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220708071903.25752-4-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3_plat.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) commit 269f49ff381aade6cfd20deeae86a8af7ae35b5a Author: Chunfeng Yun Date: Fri Jul 8 15:19:01 2022 +0800 usb: mtu3: add feature to disable device's usb3 port We may want to disable device's usb3 port when the combo phy is switched from usb3 mode to pcie mode for some projects. Meanwhile rename member @is_u3_ip to @u3_capable to avoid misleading, due to the member's value may be changed when disable usb3 port, but the controller is still a usb3 IP which also tells us how to manage the fifo. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220708071903.25752-3-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3.h | 4 +++- drivers/usb/mtu3/mtu3_core.c | 32 +++++++++++++++++++------------- drivers/usb/mtu3/mtu3_plat.c | 4 ++-- 3 files changed, 24 insertions(+), 16 deletions(-) commit 3cb7982207260e91cd7ba77120ba2e0613c8dbf2 Author: Chunfeng Yun Date: Fri Jul 8 15:19:00 2022 +0800 usb: mtu3: print endpoint type as string Print endpoint type as string instead of decimal value to make the log more readable. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220708071903.25752-2-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3_debugfs.c | 8 ++++---- drivers/usb/mtu3/mtu3_trace.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 7963d4d710112bc457f99bdb56608211e561190e Author: Xin Ji Date: Wed Jul 6 16:34:31 2022 +0800 usb: typec: tcpci: move tcpci.h to include/linux/usb/ USB PD controllers which consisting of a microcontroller (acting as the TCPM) and a port controller (TCPC) - may require that the driver for the PD controller accesses directly also the on-chip port controller in some cases. Move tcpci.h to include/linux/usb/ is convenience access TCPC registers. Reviewed-by: Heikki Krogerus Signed-off-by: Xin Ji Link: https://lore.kernel.org/r/20220706083433.2415524-1-xji@analogixsemi.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpci.c | 3 +-- drivers/usb/typec/tcpm/tcpci_maxim.c | 3 +-- drivers/usb/typec/tcpm/tcpci_mt6360.c | 3 +-- drivers/usb/typec/tcpm/tcpci_rt1711h.c | 2 +- {drivers/usb/typec/tcpm => include/linux/usb}/tcpci.h | 1 + 5 files changed, 5 insertions(+), 7 deletions(-) commit 04cb742d4d8f30dc2e83b46ac317eec09191c68e Author: Jozef Martiniak Date: Fri Jul 8 09:06:44 2022 +0200 gadgetfs: ep_io - wait until IRQ finishes after usb_ep_queue() if wait_for_completion_interruptible() is interrupted we need to wait until IRQ gets finished. Otherwise complete() from epio_complete() can corrupt stack. Signed-off-by: Jozef Martiniak Link: https://lore.kernel.org/r/20220708070645.6130-1-jomajm@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/legacy/inode.c | 1 + 1 file changed, 1 insertion(+) commit 2e1421d6ce321118dfff370e473ba8d290b2ecbd Author: Chunfeng Yun Date: Thu Jul 7 09:50:41 2022 +0800 dt-bindings: usb: mtk-xhci: add compatible for mt8188 Add compatible for mt8188 Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220707015041.12264-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 1 + 1 file changed, 1 insertion(+) commit 1bd71816643a9e279c2a7b7a02c10de4a07bf9eb Author: Michael Walle Date: Tue Jul 5 15:19:51 2022 +0200 usb: gadget: udc: atmel: convert to platform driver The driver won't probe on a LAN9668 because the pinctrl driver isn't ready yet. Probe deferral is not supported because the init section is already discarded. With fw_devlink enabled, the probe won't even be called. Convert the driver to a proper platform driver. Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20220705131951.1388968-2-michael@walle.cc Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/atmel_usba_udc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e89676f65ef372fda6c392b3f99fcc7175b206e6 Author: Michael Walle Date: Tue Jul 5 15:19:50 2022 +0200 usb: gadget: udc: atmel: check rc of devm_gpiod_get_optional() devm_gpiod_get_optional() might still return an error code, esp. EPROBE_DEFER. Return any errors. Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20220705131951.1388968-1-michael@walle.cc Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/atmel_usba_udc.c | 2 ++ 1 file changed, 2 insertions(+) commit 14a6043379e2132c11b815972c0e2201e68d7467 Author: Steven Rostedt (Google) Date: Sun Jul 3 09:14:49 2022 -0400 USB: gadget: udc: tracing: Do not open code __string() with __dynamic_array() The event classes udc_log_ep and udc_log_req both declare: __dynamic_array(char, name, UDC_TRACE_STR_MAX) Which will reserve UDC_TRACE_STR_MAX bytes on the ring buffer for the event to write in name. It then uses snprintf() to write into that space. Assuming that the string being copied is nul terminated, it is better to just use the __string() helper. That way only the size of the string is saved into the ring buffer and not the max size (yes, the entire UDC_TRACE_STR_MAX is used in the trace event, and anything not used is just junk in the ring buffer). Worse, there's also meta data saved into the event that denotes where the string is stored in the event and also saves its size, which is always going to be UDC_TRACE_STR_MAX. Convert both to use the __string() and __assign_str() helpers that are for this kind of use case. Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20220703091449.317f94b1@rorschach.local.home Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/trace.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2a1f94e45569b1cd9f002e65006f613c2a8360f2 Author: Philipp Hortmann Date: Wed Jul 6 21:19:06 2022 +0200 staging: vt6655: Use loop in vt6655_mac_read_ether_addr Use loop in vt6655_mac_read_ether_addr to avoid multiple similar statements. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/f233c8a007d75a8adcc99a07c582b75bdc1985db.1657134099.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 385b35ab80b00444e94f30891a2468a7f284e4c7 Author: Philipp Hortmann Date: Wed Jul 6 21:19:01 2022 +0200 staging: vt6655: Use loop in vt6655_mac_write_bssid_addr Use loop in vt6655_mac_write_bssid_addr to avoid multiple similar statements. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b3b93ae7ce41562565e9007eb4580b9c47a2881f.1657134099.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 3deb12ea54645a34ef326dc99d2d0c136b78f9c5 Author: Martin Kaiser Date: Thu Jul 7 21:49:14 2022 +0200 staging: r8188eu: pattrib addresses were already set by the caller Do not set pattrib's src, dst, bssid, ra and ta again in sta2sta_data_frame. sta2sta_data_frame is called from validate_recv_data_frame when both to_ds and from_ds are 0. All pattrib address fields have already been set to the correct addresses when sta2sta_data_frame is called. memcpy(pattrib->dst, ieee80211_get_DA(hdr), ETH_ALEN); ieee80211_get_DA returns addr1 if to_ds and from_ds are 0 memcpy(pattrib->src, ieee80211_get_SA(hdr), ETH_ALEN); ieee80211_get_SA returns addr2 if to_ds and from_ds are 0 memcpy(pattrib->ra, hdr->addr1, ETH_ALEN); memcpy(pattrib->ta, hdr->addr2, ETH_ALEN); For pattrib->dst == addr1, pattrib->src == addr2, these assignments match those in sta2sta_data_frame that this patch removes. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220707194914.63794-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 7 ------- 1 file changed, 7 deletions(-) commit 8eaa8197bc2230760c7b53175049ff5595079319 Author: Martin Kaiser Date: Thu Jul 7 21:49:13 2022 +0200 staging: r8188eu: remove sta2sta_data_frame prototype Remove the prototype for sta2sta_data_frame. Make the function static, it is used only inside rtw_recv.c. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220707194914.63794-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 7b5ec68ac1947929cc40e60d3748c1e6b6144682 Author: Philipp Hortmann Date: Mon Jul 4 20:21:08 2022 +0200 staging: vt6655: Convert macro vt6655_mac_read_ether_addr to function Convert macro vt6655_mac_read_ether_addr to static function. checkpatch.pl does not accept multiline macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/2e2524187d9d3a6140fe4a5a35926db14dddfe98.1656835310.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 5df564ca11ce575b7378810faee2fc4c01149f9c Author: Philipp Hortmann Date: Mon Jul 4 20:20:57 2022 +0200 staging: vt6655: Convert macro vt6655_mac_write_bssid_addr to function Convert macro vt6655_mac_write_bssid_addr to static function. checkpatch.pl does not accept multiline macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/caecf7287d92c5d25ba0dfc16a24a6ce4aa67d55.1656835310.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 52fbed10b8eaaab5e90ddf8c7270f532e43b0c00 Author: Philipp Hortmann Date: Mon Jul 4 20:20:52 2022 +0200 staging: vt6655: Move two macros to file where those are used Move two multiline macros to file of only useage to convert them later to static functions. checkpatch.pl does not accept multiline macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b4a04608b3900186d4941b3bfe9463bb79e261e8.1656835310.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 24 ++++++++++++++++++++++++ drivers/staging/vt6655/mac.h | 24 ------------------------ 2 files changed, 24 insertions(+), 24 deletions(-) commit 41c8e56baeca9075f84a6155e7423ffadc28197e Author: Philipp Hortmann Date: Mon Jul 4 20:20:39 2022 +0200 staging: vt6655: Rename MACvReadEtherAddress Fix name of a macro that uses CamelCase which is not accepted by checkpatch.pl Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/3714f7cd3425e0ef0a3df0cc291131cdb85a3796.1656835310.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 2 +- drivers/staging/vt6655/mac.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 06f737ef8f5365dacb0e9f39f41a4fe32e92a79a Author: Philipp Hortmann Date: Mon Jul 4 20:20:35 2022 +0200 staging: vt6655: Rename MACvWriteBSSIDAddress Fix name of a macro that uses CamelCase which is not accepted by checkpatch.pl Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/1190d93181409679f9ae348a95ea269b48b1115c.1656835310.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 2 +- drivers/staging/vt6655/mac.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 20cbfe17a486332e78bab01383cb2814f86d74ee Author: Philipp Hortmann Date: Mon Jul 4 20:20:27 2022 +0200 staging: vt6655: Rename pbyEtherAddr to mac_addr Fix name of a variable in two macros that use CamelCase which is not accepted by checkpatch.pl Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/fcc66446a04c1ecb3c2b66cdd47e932c231b1b9d.1656835310.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 60c85e23bed17b4e5074cb2695837244cecc827a Author: Jakub Kicinski Date: Tue Jul 5 15:58:01 2022 -0700 staging: switch to netif_napi_add_weight() netif_napi_add() will soon default to weight of 64 instead of requiring the user to specify that parameter. Most users already pass or should pass 64. Move the callers in staging to netif_napi_add_weight() which will keep the argument. This way we'll avoid a huge cross-tree conversion when argument is removed. Signed-off-by: Jakub Kicinski Link: https://lore.kernel.org/r/20220705225801.923601-1-kuba@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-rx.c | 4 ++-- drivers/staging/qlge/qlge_main.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 234cf3971b15a140259e31ea4287143f56f2f3b0 Author: Martin Kaiser Date: Mon Jul 4 22:16:54 2022 +0200 staging: r8188eu: use ieee80211 helper to check for nullfunc frame Use the ieee80211_is_nullfunc function from ieee80211.h to check for a nullfunc frame. This is a data frame whose subtype has bit6 set. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220704201654.195574-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c82bf6a83e1b57d7783e39450ab899a31c0fff94 Author: Martin Kaiser Date: Mon Jul 4 22:16:53 2022 +0200 staging: r8188eu: remove a misleading comment Remove a misleading comment in ap2sta_data_frame. We are not checking for QOS frames. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220704201654.195574-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 3 --- 1 file changed, 3 deletions(-) commit 6afc29cb469678a7d8397acb83711beb1c12661e Author: Martin Kaiser Date: Mon Jul 4 22:16:52 2022 +0200 staging: r8188eu: don't set pattrib->ta again The table in ieee80211.h shows that TA is addr2. This value was already set by validate_recv_data_frame, we don't have to set it again in ap2sta_data_frame. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220704201654.195574-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 1 - 1 file changed, 1 deletion(-) commit ff2833e3f8c842b9328306009579aeeea1a0a310 Author: Martin Kaiser Date: Mon Jul 4 22:16:51 2022 +0200 staging: r8188eu: don't set pattrib->ra again Do not set pattrib->ra again in ap2sta_data_frame. This function is called by validate_recv_data_frame when the packet's ToDS==0 and FromDS==1. validate_recv_data_frame has already set pattrib->ra to addr1. This is in line with the table in ieee80211.h. ap2sta_data_frame sets pattrib->ra to pattrib->dst. For ToDS==0, FromDS==1, dst is addr1, i.e. ap2sta_data_frame sets the same value again that was already set by validate_recv_data_frame. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220704201654.195574-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 1 - 1 file changed, 1 deletion(-) commit d6d0a11dd5b52de3286be5fa2298b2d72f09828f Author: Martin Kaiser Date: Mon Jul 4 22:16:50 2022 +0200 staging: r8188eu: don't set pattrib->dst again Do not set pattrib->dst again in ap2sta_data_frame. This function is called by validate_recv_data_frame when the packet's ToDS==0 and FromDS==1. In this case, validate_recv_data_frame has already set pattrib->dst to addr1. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220704201654.195574-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 1 - 1 file changed, 1 deletion(-) commit c45f5c02a00a636311045a5efef58a60501a862b Author: Martin Kaiser Date: Mon Jul 4 22:16:49 2022 +0200 staging: r8188eu: set bssid only once In function ap2sta_data_frame, for WIFI_MP_STATE && _FW_LINKED, the code sets pattrib->bssid twice. Remove the first one of these assignments. Remove an empty comment before the second assignment. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220704201654.195574-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 2 -- 1 file changed, 2 deletions(-) commit a3e20d9046fcb087c621a2914e1d016eb20f5ab3 Author: Rommel Rodriguez Perez Date: Mon Jul 4 18:55:35 2022 -0500 staging: r8188eu: Block comments use * on subsequent lines This patch modifies a comment in order for it to comply with Linux Kernel style guidelines on comments belonging to net/ or drivers/net/ by fixing the missing * at the beginning of each comment line and removing the initial almost-blank initial line from the comment block. checkpatch output: WARNING: Block comments use * on subsequent lines Reviewed-by: Philipp Hortmann Signed-off-by: Rommel Rodriguez Perez Link: https://lore.kernel.org/r/YsN993FTljv5LYT3@debianmain.debian.pc.org Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_ap.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 1681e6f4d773873506798151beae01c22d835e39 Author: Martin Kaiser Date: Mon Jul 4 16:52:21 2022 +0200 staging: r8188eu: mac addr len is unused The MAC_ADDR_LEN define is not used. Remove it. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220704145221.159949-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/rtl8188e_spec.h | 1 - 1 file changed, 1 deletion(-) commit 4023f5f8449b9a23f95615aa2b5f5a0f46123ac3 Author: Martin Kaiser Date: Mon Jul 4 16:52:20 2022 +0200 staging: r8188eu: remove sdio definitions The r8188eu chipset is connected via usb. We don't need the register and bit field definitions for the sdio interface. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220704145221.159949-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/rtl8188e_spec.h | 136 ------------------------ 1 file changed, 136 deletions(-) commit 38fbc32e83d6c09fe2f89cd1007f1a710393a7be Author: Martin Kaiser Date: Mon Jul 4 16:52:19 2022 +0200 staging: r8188eu: read pwr seq length, remove PWR_CMD_END The definitions of the power sequences are in the same file as the function which processes them. We can simply read the number of entries in a power sequence. There's no need for a PWR_CMD_END command to indicate the end of a sequence. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220704145221.159949-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/HalPwrSeqCmd.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) commit 8be317cf61d8f07bde70ccda84fee5e6f502e7fa Author: Martin Kaiser Date: Mon Jul 4 16:52:18 2022 +0200 staging: r8188eu: support only us in PWR_CMD_DELAY PWR_CMD_DELAY has only a single remaining user, who needs a delay in us. Remove the code and defines for delays in ms. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220704145221.159949-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/HalPwrSeqCmd.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 687a7264fca6dd8cd9cf0b84c9c16f88b0821575 Author: Martin Kaiser Date: Mon Jul 4 16:52:17 2022 +0200 staging: r8188eu: move pwr seq defines to HalPwrSeqCmd.c The power sequences are now defined and processed in the same file. We can move the defines for power sequences and the related struct and enum from HalPwrSeqCmd.h to HalPwrSeqCmd.c. They don't have to be visible in other files any more. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220704145221.159949-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/HalPwrSeqCmd.c | 43 +++++++++++++++++++++++ drivers/staging/r8188eu/include/HalPwrSeqCmd.h | 47 -------------------------- 2 files changed, 43 insertions(+), 47 deletions(-) commit 32e0d9b3104845e0b3f24d89033a17a317ba37f9 Author: Daniel Müller Date: Wed Jul 6 21:28:55 2022 +0000 selftests/bpf: Add test involving restrict type qualifier This change adds a type based test involving the restrict type qualifier to the BPF selftests. On the btfgen path, this will verify that bpftool correctly handles the corresponding RESTRICT BTF kind. Signed-off-by: Daniel Müller Signed-off-by: Daniel Borkmann Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20220706212855.1700615-3-deso@posteo.net tools/testing/selftests/bpf/prog_tests/core_reloc.c | 2 ++ tools/testing/selftests/bpf/progs/core_reloc_types.h | 8 ++++++-- tools/testing/selftests/bpf/progs/test_core_reloc_type_based.c | 5 +++++ 3 files changed, 13 insertions(+), 2 deletions(-) commit aad53f17f0ad7485872d66fbcb53cc0c60e811f2 Author: Daniel Müller Date: Wed Jul 6 21:28:54 2022 +0000 bpftool: Add support for KIND_RESTRICT to gen min_core_btf command This change adjusts bpftool's type marking logic, as used in conjunction with TYPE_EXISTS relocations, to correctly recognize and handle the RESTRICT BTF kind. Suggested-by: Andrii Nakryiko Signed-off-by: Daniel Müller Signed-off-by: Daniel Borkmann Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20220623212205.2805002-1-deso@posteo.net/T/#m4c75205145701762a4b398e0cdb911d5b5305ffc Link: https://lore.kernel.org/bpf/20220706212855.1700615-2-deso@posteo.net tools/bpf/bpftool/gen.c | 1 + 1 file changed, 1 insertion(+) commit e0e91965a10b79ca26a315eb283509b9de90f6eb Author: Michael Straube Date: Sat Jul 2 08:46:26 2022 +0200 staging: r8188eu: make ffaddr2pipehdl() static The function ffaddr2pipehdl() is only used in usb_ops_linux.c. Make it static. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20220702064626.27506-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/usb_ops_linux.h | 2 -- drivers/staging/r8188eu/os_dep/usb_ops_linux.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) commit 05710750974cff9c3a5b06beeb5ab3cbe64b95a3 Author: Michael Straube Date: Fri Jul 1 23:07:53 2022 +0200 staging: r8188eu: remove HW_VAR_AMPDU_FACTOR from SetHwReg8188EU() Remove the case HW_VAR_AMPDU_FACTOR from SetHwReg8188EU() and move the functionality to a static function in rtw_wlan_util.c. This is part of the ongoing effort to get rid of SetHwReg8188EU(). Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20220701210753.8210-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_wlan_util.c | 28 +++++++++++++++++++++++++++- drivers/staging/r8188eu/hal/usb_halinit.c | 26 -------------------------- drivers/staging/r8188eu/include/hal_intf.h | 1 - 3 files changed, 27 insertions(+), 28 deletions(-) commit a27e2eb5e9febf16c503423424a67289a4eb03c3 Author: Felix Schlepper Date: Fri Jul 1 11:24:54 2022 +0200 Staging: rtl8192e: Added spaces around '+' This addresses two issues raised by checkpatch.pl: $ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c CHECK: spaces preferred around that '+' (ctx:VxV) Tested-by: Philipp Hortmann Signed-off-by: Felix Schlepper Link: https://lore.kernel.org/r/87628a2dd08ec0e5b02090485e7a9a1d91b7d2a5.1656667089.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_wx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea32f580e853ca28709474f786134b574bbeacbf Author: Felix Schlepper Date: Fri Jul 1 11:24:53 2022 +0200 Staging: rtl8192e: Remove unnecessary blank line This addresses an issue raised by checkpatch.pl: $ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c CHECK: Blank lines aren't necessary before a close brace '}' Tested-by: Philipp Hortmann Signed-off-by: Felix Schlepper Link: https://lore.kernel.org/r/f3c6bd5c79331e82f006fb2694f791030b07c5ba.1656667089.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_wx.c | 1 - 1 file changed, 1 deletion(-) commit 58f364ecb13ecece3a84d6517b6be4a4672db655 Author: Felix Schlepper Date: Fri Jul 1 11:24:52 2022 +0200 Staging: rtl8192e: Added braces around else This addresses two issues raised by checkpatch.pl: $ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c CHECK: braces {} should be used on all arms of this statement CHECK: Unbalanced braces around else statement The coding style rule with not using unnecessary braces around if/else does not apply if only one branch is a single statement. Tested-by: Philipp Hortmann Signed-off-by: Felix Schlepper Link: https://lore.kernel.org/r/651f51d9f92e8a445ceaf9f2073f16dd10458a74.1656667089.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_wx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 907d2772f75168d2f39087c8c77195c16d3e019d Author: Felix Schlepper Date: Fri Jul 1 11:24:51 2022 +0200 Staging: rtl8192e: Remove unnecessary parentheses This addresses an issue raised by checkpatch.pl: $ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c Unnecessary parentheses around wrqu->encoding Tested-by: Philipp Hortmann Signed-off-by: Felix Schlepper Link: https://lore.kernel.org/r/0e4e340be3f4c7f35a5381b726b1db5fc6842f10.1656667089.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_wx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2393ef09cad85a0563a7d30ea7a560a7af58f26c Author: Felix Schlepper Date: Fri Jul 1 11:24:50 2022 +0200 Staging: rtl8192e: Avoid multiple assignments This addresses an issue raised by checkpatch.pl: $ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c CHECK: multiple assignments should be avoided Tested-by: Philipp Hortmann Signed-off-by: Felix Schlepper Link: https://lore.kernel.org/r/899a1010643a05668465069951518e5dcab9c77e.1656667089.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_wx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 177a561e0bebe81444473d5d779d163bd53bc949 Author: Felix Schlepper Date: Fri Jul 1 11:24:49 2022 +0200 Staging: rtl8192e: Refactored rtllib_modes The initial reason for looking at this code was an issue raised by checkpatch.pl: $ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c CHECK: Please use a blank line after function/struct/union/enum declarations The additional blank line above the struct/before the headers is just cleaner. However, as it turns out since there is no str formatting required One can replace the error prone str + size struct with a char array. The rest of this patch fixes the usecases. Tested-by: Philipp Hortmann Signed-off-by: Felix Schlepper Link: https://lore.kernel.org/r/4dbc4939e88a2c94f1819b4b0cc2c81dc332710b.1656667089.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_wx.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit f6639994a6dded10fe3ee7882c0394dde294ecbf Author: Qin Jian Date: Tue Jun 28 14:26:51 2022 +0800 ARM: dts: Add Sunplus SP7021-Demo-V3 board device tree Add the basic support for Sunplus SP7021-Demo-V3 board. Signed-off-by: Qin Jian Acked-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann MAINTAINERS | 1 + arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/sunplus-sp7021-achip.dtsi | 84 ++++++++ arch/arm/boot/dts/sunplus-sp7021-demo-v3.dts | 30 +++ arch/arm/boot/dts/sunplus-sp7021.dtsi | 310 +++++++++++++++++++++++++++ 5 files changed, 427 insertions(+) commit 027a68e35206c4c82889dd7b56dc954dbc86d11b Author: Qin Jian Date: Tue Jun 28 14:26:50 2022 +0800 ARM: sp7021_defconfig: Add Sunplus SP7021 defconfig Add generic Sunplus SP7021 based board defconfig Signed-off-by: Qin Jian Reviewed-by: Arnd Bergmann Signed-off-by: Arnd Bergmann MAINTAINERS | 1 + arch/arm/configs/multi_v7_defconfig | 1 + arch/arm/configs/sp7021_defconfig | 59 +++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) commit 0aa94eea8d955c82014e5368a843da93f1dc58f8 Author: Qin Jian Date: Tue Jun 28 14:26:49 2022 +0800 ARM: sunplus: Add initial support for Sunplus SP7021 SoC This patch aims to add an initial support for Sunplus SP7021 SoC. Signed-off-by: Qin Jian Reviewed-by: Arnd Bergmann Signed-off-by: Arnd Bergmann MAINTAINERS | 1 + arch/arm/Kconfig | 2 ++ arch/arm/Makefile | 1 + arch/arm/mach-sunplus/Kconfig | 27 +++++++++++++++++++++++++++ arch/arm/mach-sunplus/Makefile | 8 ++++++++ arch/arm/mach-sunplus/sp7021.c | 16 ++++++++++++++++ 6 files changed, 55 insertions(+) commit f7189d938b31efd27399268918a5dc195745447a Author: Qin Jian Date: Tue Jun 28 14:26:48 2022 +0800 irqchip: Add Sunplus SP7021 interrupt controller driver Add interrupt controller driver for Sunplus SP7021 SoC. This is the interrupt controller in P-chip which collects all interrupt sources in P-chip and routes them to parent interrupt controller in C-chip. Signed-off-by: Qin Jian Acked-by: Marc Zyngier Signed-off-by: Arnd Bergmann drivers/irqchip/Kconfig | 9 ++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-sp7021-intc.c | 278 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 288 insertions(+) commit 4966dfe186a4e0c8206a623e34988c35997125b5 Author: Qin Jian Date: Tue Jun 28 14:26:47 2022 +0800 dt-bindings: interrupt-controller: Add bindings for SP7021 interrupt controller Add documentation to describe Sunplus SP7021 interrupt controller bindings. Signed-off-by: Qin Jian Reviewed-by: Rob Herring Signed-off-by: Arnd Bergmann .../interrupt-controller/sunplus,sp7021-intc.yaml | 62 ++++++++++++++++++++++ MAINTAINERS | 2 + 2 files changed, 64 insertions(+) commit 5543604a05a9dcc8972489c6051347aee17ac135 Author: Qin Jian Date: Tue Jun 28 14:26:44 2022 +0800 dt-bindings: clock: Add bindings for SP7021 clock driver Add documentation to describe Sunplus SP7021 clock driver bindings. Signed-off-by: Qin Jian Reviewed-by: Stephen Boyd Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann .../bindings/clock/sunplus,sp7021-clkc.yaml | 52 +++++++++++++ MAINTAINERS | 2 + include/dt-bindings/clock/sunplus,sp7021-clkc.h | 88 ++++++++++++++++++++++ 3 files changed, 142 insertions(+) commit dbf018be52e312bdd7d51d1b944dbdb32ccf8fa4 Author: Qin Jian Date: Tue Jun 28 14:26:43 2022 +0800 reset: Add Sunplus SP7021 reset driver Add reset driver for Sunplus SP7021 SoC. Signed-off-by: Qin Jian Reviewed-by: Philipp Zabel Signed-off-by: Arnd Bergmann MAINTAINERS | 1 + drivers/reset/Kconfig | 9 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-sunplus.c | 212 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 223 insertions(+) commit 55bfc376b8fb421a193fb422ca052235f023161b Author: Qin Jian Date: Tue Jun 28 14:26:42 2022 +0800 dt-bindings: reset: Add bindings for SP7021 reset driver Add documentation to describe Sunplus SP7021 reset driver bindings. Signed-off-by: Qin Jian Reviewed-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann .../devicetree/bindings/reset/sunplus,reset.yaml | 38 ++++++++++ MAINTAINERS | 2 + include/dt-bindings/reset/sunplus,sp7021-reset.h | 87 ++++++++++++++++++++++ 3 files changed, 127 insertions(+) commit 8bbb1dd569c1b604a3fd65fb78f13448f6353990 Author: Qin Jian Date: Tue Jun 28 14:26:41 2022 +0800 dt-bindings: arm: sunplus: Add bindings for Sunplus SP7021 SoC boards This introduces bindings for boards based Sunplus SP7021 SoC. Signed-off-by: Qin Jian Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Arnd Bergmann .../devicetree/bindings/arm/sunplus,sp7021.yaml | 29 ++++++++++++++++++++++ MAINTAINERS | 7 ++++++ 2 files changed, 36 insertions(+) commit d6f34f7f77fba25b07b0a4f1e55054637e4027b3 Author: Maciej Fijalkowski Date: Thu Jul 7 13:16:13 2022 +0200 MAINTAINERS: Add entry for AF_XDP selftests files Lukas reported that after commit f36600634282 ("libbpf: move xsk.{c,h} into selftests/bpf") MAINTAINERS file needed an update. In the meantime, Magnus removed AF_XDP samples in commit cfb5a2dbf141 ("bpf, samples: Remove AF_XDP samples"), but selftests part still misses its entry in MAINTAINERS. Now that xdpxceiver became xskxceiver, tools/testing/selftests/bpf/*xsk* will match all of the files related to AF_XDP testing (test_xsk.sh, xskxceiver, xsk_prereqs.sh, xsk.{c,h}). Reported-by: Lukas Bulwahn Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220707111613.49031-3-maciej.fijalkowski@intel.com MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 018a8e75b49cb846ebfa48076bc4fe0bb67c9c24 Author: Maciej Fijalkowski Date: Thu Jul 7 13:16:12 2022 +0200 selftests, xsk: Rename AF_XDP testing app Recently, xsk part of libbpf was moved to selftests/bpf directory and lives on its own because there is an AF_XDP testing application that needs it called xdpxceiver. That name makes it a bit hard to indicate who maintains it as there are other XDP samples in there, whereas this one is strictly about AF_XDP. Do s/xdpxceiver/xskxceiver so that it will be easier to figure out who maintains it. A follow-up patch will correct MAINTAINERS file. Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220707111613.49031-2-maciej.fijalkowski@intel.com tools/testing/selftests/bpf/.gitignore | 2 +- tools/testing/selftests/bpf/Makefile | 4 ++-- tools/testing/selftests/bpf/test_xsk.sh | 6 +++--- tools/testing/selftests/bpf/xsk_prereqs.sh | 4 ++-- tools/testing/selftests/bpf/{xdpxceiver.c => xskxceiver.c} | 4 ++-- tools/testing/selftests/bpf/{xdpxceiver.h => xskxceiver.h} | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) commit fb8ddf24c71dc97d6b07ecb7791b4fa5e7f48efc Author: Pu Lehui Date: Fri Jul 8 12:27:36 2022 +0800 bpf, docs: Remove deprecated xsk libbpf APIs description Since xsk APIs has been removed from libbpf, let's clean up the BPF docs simutaneously. Signed-off-by: Pu Lehui Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20220708042736.669132-1-pulehui@huawei.com Documentation/bpf/libbpf/libbpf_naming_convention.rst | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 11055c32c71f5296ab8e3bf6a51e20efc8ec968f Merge: a2668c1500e3 75a185fb92e5 Author: Arnd Bergmann Date: Fri Jul 8 13:46:01 2022 +0200 Merge tag 'renesas-arm-soc-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/soc Renesas ARM SoC updates for v5.20 - Fix of_node reference counting in the R-Car Gen2 board quirk. * tag 'renesas-arm-soc-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: shmobile: rcar-gen2: Increase refcount for new reference Link: https://lore.kernel.org/r/cover.1657278849.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit b83c42935c9117273d7f87d439c400709806c378 Merge: 132582d21075 d955cf3df3c2 Author: Arnd Bergmann Date: Fri Jul 8 13:44:30 2022 +0200 Merge tag 'renesas-dt-bindings-for-v5.20-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas DT binding updates for v5.20 (take two) - Miscellaneous fixes and improvements. * tag 'renesas-dt-bindings-for-v5.20-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: dt-bindings: hwinfo: renesas,prr: move from soc directory MAINTAINERS: Add Renesas SoC DT bindings to Renesas Architecture sections Link: https://lore.kernel.org/r/cover.1657278851.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 132582d210752783b138b5dc2c1db0c93dbbb3c1 Merge: d67fe5e3b2ca fec6d133cee5 Author: Arnd Bergmann Date: Fri Jul 8 13:40:17 2022 +0200 Merge tag 'renesas-arm-dt-for-v5.20-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM DT updates for v5.20 (take two) - Ethernet MAC and switch support for the RZ/N1 SoC on the RZN1D-DB development board, - AA1024XD12 panel overlay support for the Draak, Ebisu, and Salvator-X(S) development boards, - Miscellaneous fixes and improvements. * tag 'renesas-arm-dt-for-v5.20-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: Add panel overlay for Draak and Ebisu boards arm64: dts: renesas: Add panel overlay for Salvator-X(S) boards arm64: dts: renesas: Prepare AA1024XD12 panel .dtsi for overlay support arm64: dts: renesas: spider-cpu: Fix scif0/scif3 sort order ARM: dts: r9a06g032-rzn1d400-db: Add switch description dt-bindings: net: pcs: add bindings for Renesas RZ/N1 MII converter ARM: dts: r9a06g032: Describe switch ARM: dts: r9a06g032: Describe GMAC2 ARM: dts: r9a06g032: Describe MII converter arm64: dts: renesas: r9a07g054l2-smarc: Correct SoC name in comment ARM: dts: renesas: Fix DA9063 watchdog subnode names arm64: dts: renesas: r8a779m8: Drop operating points above 1.5 GHz Link: https://lore.kernel.org/r/cover.1657278845.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 9d899dbe23016856effc01eafec31c587a3c8791 Author: Justin Stitt Date: Thu Jul 7 15:14:56 2022 -0700 l2tp: l2tp_debugfs: fix Clang -Wformat warnings When building with Clang we encounter the following warnings: | net/l2tp/l2tp_debugfs.c:187:40: error: format specifies type 'unsigned | short' but the argument has type 'u32' (aka 'unsigned int') | [-Werror,-Wformat] seq_printf(m, " nr %hu, ns %hu\n", session->nr, | session->ns); - | net/l2tp/l2tp_debugfs.c:196:32: error: format specifies type 'unsigned | short' but the argument has type 'int' [-Werror,-Wformat] | session->l2specific_type, l2tp_get_l2specific_len(session)); - | net/l2tp/l2tp_debugfs.c:219:6: error: format specifies type 'unsigned | short' but the argument has type 'u32' (aka 'unsigned int') | [-Werror,-Wformat] session->nr, session->ns, Both session->nr and ->nc are of type `u32`. The currently used format specifier is `%hu` which describes a `u16`. My proposed fix is to listen to Clang and use the correct format specifier `%u`. For the warning at line 196, l2tp_get_l2specific_len() returns an int and should therefore be using the `%d` format specifier. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Justin Stitt Acked-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_debugfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9157533a0a8bba385ab2db6b1dc31e7ea27d64b5 Author: Jakub Kicinski Date: Wed Jul 6 20:00:20 2022 -0700 eth: sp7021: switch to netif_napi_add_tx() The Tx NAPI should use netif_napi_add_tx(). Signed-off-by: Jakub Kicinski Acked-by: Wells Lu Signed-off-by: David S. Miller drivers/net/ethernet/sunplus/spl2sw_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0f50574223c468f135cecd31132b68829c654d8 Author: Jakub Kicinski Date: Wed Jul 6 20:00:19 2022 -0700 eth: mtk: switch to netif_napi_add_tx() netif_napi_add_tx() does not require the weight argument. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_star_emac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6abcf98eec85884f11ce64fcbe0c229c27244d21 Author: Wan Jiabing Date: Mon May 16 14:12:54 2022 +0100 media: c8sectpfe: Remove unneeded NULL check before clk_disable_unprepare clk_disable_unprepare() already checks NULL by using IS_ERR_OR_NULL. Remove unneeded NULL check for fei->c8sectpfeclk. Link: https://lore.kernel.org/linux-media/20220516131254.13816-1-wanjiabing@vivo.com Signed-off-by: Wan Jiabing Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 64e46b637bbafc774e58dfb57031f48f167e34d9 Author: Andy Shevchenko Date: Wed Feb 9 18:25:21 2022 +0000 media: c8sectpfe: Clean up handling of *_buffer_aligned There are a few cases where code is harder than needed to read. Improve those by: - dropping unnecessary castings (see note below) - use PTR_ALING() to be more explicit on what's going on there - use proper definitions instead of hard coded values Note, dropping castings will allow to perform an additional check that type is not changed from void * to something else, e.g. u64, which may very well break the bitmap APIs. Link: https://lore.kernel.org/linux-media/20220209182521.55632-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Reviewed-by: Alain Volmat Signed-off-by: Mauro Carvalho Chehab .../platform/st/sti/c8sectpfe/c8sectpfe-core.c | 30 ++++++++-------------- 1 file changed, 11 insertions(+), 19 deletions(-) commit 0ca3d2ba1dfd110bf5e0b25ebeb8f1e1587598fb Author: David Lin Date: Fri Jul 8 13:46:48 2022 +0800 ASoC: nau8825: Declare 2 channels for DAI of capture stream The patch is to make driver with flexibility for more platforms support even if the internal design is just one ADC. Besides, many I2S controllers only support 2 channels. Signed-off-by: David Lin Link: https://lore.kernel.org/r/20220708054647.540621-1-CTLIN0@nuvoton.com Signed-off-by: Mark Brown sound/soc/codecs/nau8825.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 657efd9c985255960cdd90bafc382a39dc303277 Author: Yang Li Date: Fri Jul 8 07:25:40 2022 +0800 ASoC: amd: Remove duplicated include in acp-es8336.c Fix following includecheck warning: ./sound/soc/amd/acp-es8336.c: linux/module.h is included more than once. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20220707232540.22589-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown sound/soc/amd/acp-es8336.c | 1 - 1 file changed, 1 deletion(-) commit a6426e7189e09bdf8decffd8a539f3727b672d3e Author: Raphael-Xu <13691752556@139.com> Date: Thu Jul 7 20:33:43 2022 +0800 ASoC: add tas2780 DT binding add tas2780.yaml Signed-off-by: Raphael-Xu <13691752556@139.com> Link: https://lore.kernel.org/r/20220707123343.2403-2-13691752556@139.com Signed-off-by: Mark Brown .../devicetree/bindings/sound/tas2780.yaml | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit eae9f9ce181be4f47dcba1ee93185b71cac3f312 Author: Raphael-Xu <13691752556@139.com> Date: Thu Jul 7 20:33:42 2022 +0800 ASoC: add tas2780 driver 1.update Kconfig and Makefile 2.add tas2780.c and tas2780.h Signed-off-by: Raphael-Xu <13691752556@139.com> Link: https://lore.kernel.org/r/20220707123343.2403-1-13691752556@139.com Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 8 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/tas2780.c | 663 +++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/tas2780.h | 101 +++++++ 4 files changed, 774 insertions(+) commit cf39ed2e8ecddbee38e02691d6293b812e98e397 Author: Matt Ranostay Date: Thu Jul 7 18:31:25 2022 -0700 regmap: add WARN_ONCE when invalid mask is provided to regmap_field_init() In regmap_field_init() when a invalid mask is provided it still initializes with any warnings. An example of this is when the LSB is greater than MSB a mask of zero is produced. WARN_ONCE() is not ideal for this but requires less changes to core regmap code. Cc: Mark Brown Cc: Nishanth Menon Signed-off-by: Matt Ranostay Link: https://lore.kernel.org/r/20220708013125.313892-1-mranostay@ti.com Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 3 +++ 1 file changed, 3 insertions(+) commit 0de876c125188e502d2899de4bcba8d4a6b1f98c Author: Vijendar Mukunda Date: Thu Jul 7 18:56:10 2022 +0530 ASoC: amd: fix for variable set but not used warning Fix below kernel warning. >>> sound/soc/amd/acp-es8336.c:200:13: warning: variable 'ret' set but >>> not used [-Wunused-but-set-variable] Signed-off-by: Vijendar Mukunda Reported-by: kernel test robot Link: https://lore.kernel.org/r/20220707132613.3150931-3-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown sound/soc/amd/acp-es8336.c | 3 +++ 1 file changed, 3 insertions(+) commit 8d9cd3ead42a6d3bac131c4331acfa5244674fbb Author: Vijendar Mukunda Date: Thu Jul 7 18:56:09 2022 +0530 ASoC: amd: drop machine driver remove function Drop machine driver remove() function. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20220707132613.3150931-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown sound/soc/amd/acp-es8336.c | 6 ------ 1 file changed, 6 deletions(-) commit d7e5d8d24c1179b36a3cb40b3f785e23a8992acd Author: Vijendar Mukunda Date: Thu Jul 7 18:56:08 2022 +0530 ASoC: amd: remove unused header file inclusion Removed unused header file inclusion from Jadeite platform machine driver. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20220707132613.3150931-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown sound/soc/amd/acp-es8336.c | 1 - 1 file changed, 1 deletion(-) commit f460e3a9740b8c1ec5a9a034262674514bbbdcac Author: Pierre-Louis Bossart Date: Thu Jul 7 16:46:14 2022 -0500 ASoC: amd: acp-es8336: use static variables Sparse warnings: sound/soc/amd/acp-es8336.c:36:15: error: symbol 'codec_dev' was not declared. Should it be static? sound/soc/amd/acp-es8336.c:37:18: error: symbol 'gpio_pa' was not declared. Should it be static? Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220707214614.61081-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/amd/acp-es8336.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 16b7ba9c0f53032e2a9365f3de89b66426b5716c Author: Kuninori Morimoto Date: Fri Jul 1 05:18:51 2022 +0000 ASoC: simple-card-utils.c: care Codec2Codec vs DPCM:BE Current asoc_simple_init_for_codec2codec() adds default Codec2Codec settings if rtd was Codec only. But DPCM:BE also judged as Codec only, because dummy-DAI doesn't have "endianness" (which is key parameter to judge as Codec). This patch ignores setup Codec2Codec settings if it was DPCM:BE case. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a69ts950.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/generic/simple-card-utils.c | 4 ++++ 1 file changed, 4 insertions(+) commit 75d1b39067ed6699ec8a906fa9d83609bca9113b Author: Kuninori Morimoto Date: Fri Jul 1 05:18:40 2022 +0000 ASoC: simple-card-utils.c: ignore Codec2Codec setting if it already have Audio Graph Card2 setups own Codec2Codec settings, but current simple-card-utils.c will try to setup Codec2Codec default settings if needed, it will overwirtes the settings. This patch ignores default Codec2Codec settings if it already have. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87bku9s95b.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/generic/simple-card-utils.c | 4 ++++ 1 file changed, 4 insertions(+) commit d33083f941150dc2079975d032547f6ce9a8e81b Author: Kuninori Morimoto Date: Fri Jul 1 05:18:34 2022 +0000 ASoC: audio-graph-card2-custom-sample.dtsi: add verbose explanation audio-graph-card2-custom-sample.dtsi will be used to test Audio-Graph-Card2 behavior. But it is difficult to say that it is easy to understand, because the comment/explanation are not so many. This patch add verbose explanation to it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87czeps95h.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown .../generic/audio-graph-card2-custom-sample.dtsi | 98 ++++++++++++++++++++-- 1 file changed, 90 insertions(+), 8 deletions(-) commit 6976ed0137d98c2ec0f11af8a01716e9f3af873d Author: Kuninori Morimoto Date: Fri Jul 1 05:18:27 2022 +0000 ASoC: audio-graph-card2.c: remove pre-alloced Codec2Codec space Because Codec2Codec settings becomes optional, we don't need to keep its parameter space when init time. This patch removes its default memory allocation from simple-card-utils.c, and allocate it at audio-graph-card2 ondemand. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87edz5s95o.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 3 --- sound/soc/generic/audio-graph-card2.c | 10 +++++++--- sound/soc/generic/simple-card-utils.c | 18 +----------------- 3 files changed, 8 insertions(+), 23 deletions(-) commit c2ff7f15a4ef74b8cb6d425dfa8d8b928f193a80 Author: Kuninori Morimoto Date: Fri Jul 1 05:18:21 2022 +0000 ASoC: audio-graph-card2.c: make Codec2Codec settings optional Current audio-graph-card2 can use Codec2Codec, and having its original parameter (= rate) on DT is mandatory for now. But simple-card-utils.c has asoc_simple_init_for_codec2codec() to setup *default* Codec2Codec settings. This patch makes Audio Graph Card2 Codec2Codec rate settings optional. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87fsjls95u.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown .../generic/audio-graph-card2-custom-sample.dtsi | 3 +- sound/soc/generic/audio-graph-card2.c | 36 +++++++++++++--------- 2 files changed, 23 insertions(+), 16 deletions(-) commit 817a62108dfacebd548e38451bf0e7eee023e97f Author: Kuninori Morimoto Date: Fri Jul 1 05:18:14 2022 +0000 ASoC: audio-graph-card2.c: use of_property_read_u32() for rate Audio Graph Card2 is using of_get_property(), but it should use of_property_read_u32() to getting rate. Otherwise the setting will be strange value. This patch fixup it. Fixes: c3a15c92a67b701 ("ASoC: audio-graph-card2: add Codec2Codec support") Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h741s961.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3876f4829a5745dcd078488a79b47a07d80a5ef5 Author: Abel Vesa Date: Thu Jul 7 15:50:22 2022 +0300 arm64: dts: freescale: imx8qxp: Fix the keys node name The proper name is 'keys', not 'scu-keys'. Signed-off-by: Abel Vesa Signed-off-by: Viorel Suman Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7b3c053097bbbebfddd44b990a6478352a824f0 Author: Viorel Suman Date: Thu Jul 7 15:50:21 2022 +0300 arm64: dts: freescale: imx8: Fix the system-controller node name The proper name is 'system-controller', not 'scu'. Signed-off-by: Viorel Suman Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8qm.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6003913ac766444b4ba3a48c62f8b256ff17ef86 Author: Viorel Suman Date: Thu Jul 7 15:50:20 2022 +0300 arm64: dts: freescale: imx8qxp: Fix the ocotp node name The proper name is 'ocotp', not 'imx8qx-ocotp'. Signed-off-by: Viorel Suman Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b64aebbe7931a1e403a12c1afd20ebf1e8691d79 Author: Abel Vesa Date: Thu Jul 7 15:50:19 2022 +0300 arm64: dts: freescale: imx8qxp: Add fallback compatible for clock controller Both i.MX8QM and i.MX8DXL use the fallback fsl,scu-clk compatible. They rely on the same driver generic part as the i.MX8QXP, so lets add it to i.MX8QXP too, for consitency. Signed-off-by: Abel Vesa Signed-off-by: Viorel Suman Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3993c7adf674ed0155b92801ac30361c3ebe44f Author: Abel Vesa Date: Thu Jul 7 15:50:18 2022 +0300 arm64: dts: freescale: imx8: Fix power controller name The proper name is power-controller, not imx8qx-pd. Signed-off-by: Abel Vesa Signed-off-by: Viorel Suman Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8qm.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 78cba06629be7edc545132f18eb5c5c47da5bb73 Author: Viorel Suman Date: Thu Jul 7 15:50:17 2022 +0300 arm64: dts: freescale: imx8qxp: Remove unnecessary clock related entries XTAL clocks are not exposed by SCU to OS via OS<->SCU communication protocol, so remove unnecessary entries. Signed-off-by: Viorel Suman Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 06d6022353cc52ba35a31fb18383b0e6a6079733 Author: Abel Vesa Date: Thu Jul 7 15:50:16 2022 +0300 dt-bindings: firmware: Add fsl,scu yaml file In order to replace the fsl,scu txt file from bindings/arm/freescale, we need to split it between the right subsystems. This patch adds the fsl,scu.yaml in the firmware bindings folder. This one is only for the main SCU node. The old txt file will be removed only after all the child nodes have been properly switch to yaml. Signed-off-by: Abel Vesa Signed-off-by: Viorel Suman Signed-off-by: Shawn Guo .../devicetree/bindings/arm/freescale/fsl,scu.txt | 96 ---------- .../devicetree/bindings/firmware/fsl,scu.yaml | 210 +++++++++++++++++++++ 2 files changed, 210 insertions(+), 96 deletions(-) commit 3115888c9702e095f147883cd1a94511025978ab Author: Abel Vesa Date: Thu Jul 7 15:50:15 2022 +0300 dt-bindings: watchdog: Add fsl,scu-wdt yaml file In order to replace the fsl,scu txt file from bindings/arm/freescale, we need to split it between the right subsystems. This patch documents separately the 'watchdog' child node of the SCU main node. Signed-off-by: Abel Vesa Signed-off-by: Viorel Suman Reviewed-by: Guenter Roeck Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo .../devicetree/bindings/arm/freescale/fsl,scu.txt | 15 ---------- .../devicetree/bindings/watchdog/fsl,scu-wdt.yaml | 34 ++++++++++++++++++++++ 2 files changed, 34 insertions(+), 15 deletions(-) commit 636ad31bd222cc7b0499b6cc7b1aeb2f3f3b3b53 Author: Abel Vesa Date: Thu Jul 7 15:50:14 2022 +0300 dt-bindings: thermal: Add fsl,scu-thermal yaml file In order to replace the fsl,scu txt file from bindings/arm/freescale, we need to split it between the right subsystems. This patch documents separately the 'thermal' child node of the SCU main node. Signed-off-by: Abel Vesa Signed-off-by: Viorel Suman Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo .../devicetree/bindings/arm/freescale/fsl,scu.txt | 16 --------- .../bindings/thermal/fsl,scu-thermal.yaml | 38 ++++++++++++++++++++++ 2 files changed, 38 insertions(+), 16 deletions(-) commit df4381bff778e553c7ec6bc82dfa25647251dae1 Author: Abel Vesa Date: Thu Jul 7 15:50:13 2022 +0300 dt-bindings: rtc: Add fsl,scu-rtc yaml file In order to replace the fsl,scu txt file from bindings/arm/freescale, we need to split it between the right subsystems. This patch documents separately the 'rtc' child node of the SCU main node. Signed-off-by: Abel Vesa Signed-off-by: Viorel Suman Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo .../devicetree/bindings/arm/freescale/fsl,scu.txt | 10 ------- .../devicetree/bindings/rtc/fsl,scu-rtc.yaml | 31 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 10 deletions(-) commit e46902e16fe282cf8323db8f9806da2bbe9e4386 Author: Abel Vesa Date: Thu Jul 7 15:50:12 2022 +0300 dt-bindings: power: Add fsl,scu-pd yaml file In order to replace the fsl,scu txt file from bindings/arm/freescale, we need to split it between the right subsystems. This patch documents separately the 'power controller' child node of the SCU main node. Signed-off-by: Abel Vesa Signed-off-by: Viorel Suman Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo .../devicetree/bindings/arm/freescale/fsl,scu.txt | 25 ------------- .../devicetree/bindings/power/fsl,scu-pd.yaml | 41 ++++++++++++++++++++++ 2 files changed, 41 insertions(+), 25 deletions(-) commit 470d96c850b56cd7d1cbc3e219150a92c20d310c Author: Abel Vesa Date: Thu Jul 7 15:50:11 2022 +0300 dt-bindings: nvmem: Add fsl,scu-ocotp yaml file In order to replace the fsl,scu txt file from bindings/arm/freescale, we need to split it between the right subsystems. This patch documents separately the 'ocotp' child node of the SCU main node. Signed-off-by: Abel Vesa Signed-off-by: Viorel Suman Signed-off-by: Shawn Guo .../devicetree/bindings/arm/freescale/fsl,scu.txt | 24 ---------- .../devicetree/bindings/nvmem/fsl,scu-ocotp.yaml | 56 ++++++++++++++++++++++ 2 files changed, 56 insertions(+), 24 deletions(-) commit 92dae33a4d67267d61e86a5b6be1c6fd90ffce4a Author: Abel Vesa Date: Thu Jul 7 15:50:10 2022 +0300 dt-bindings: input: Add fsl,scu-key yaml file In order to replace the fsl,scu txt file from bindings/arm/freescale, we need to split it between the right subsystems. This patch documents separately the 'keys' child node of the SCU main node. Signed-off-by: Abel Vesa Signed-off-by: Viorel Suman Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo .../devicetree/bindings/arm/freescale/fsl,scu.txt | 14 -------- .../devicetree/bindings/input/fsl,scu-key.yaml | 40 ++++++++++++++++++++++ 2 files changed, 40 insertions(+), 14 deletions(-) commit aeb871d67988059cbe1fdf499b57ae60a83f2291 Author: Abel Vesa Date: Thu Jul 7 15:50:09 2022 +0300 dt-bindings: pinctrl: imx: Add fsl,scu-iomux yaml file In order to replace the fsl,scu txt file from bindings/arm/freescale, we need to split it between the right subsystems. This patch documents separately the 'iomux/pinctrl' child node of the SCU main node. Signed-off-by: Abel Vesa Signed-off-by: Viorel Suman Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo .../devicetree/bindings/arm/freescale/fsl,scu.txt | 40 ------------ .../bindings/pinctrl/fsl,scu-pinctrl.yaml | 74 ++++++++++++++++++++++ 2 files changed, 74 insertions(+), 40 deletions(-) commit 9056aa045173aeada210c68acf97aa31ad024d29 Author: Abel Vesa Date: Thu Jul 7 15:50:08 2022 +0300 dt-bindings: clk: imx: Add fsl,scu-clk yaml file In order to replace the fsl,scu txt file from bindings/arm/freescale, we need to split it between the right subsystems. This patch documents separately the 'clock' child node of the SCU main node. Signed-off-by: Abel Vesa Signed-off-by: Viorel Suman Acked-by: Stephen Boyd Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo .../devicetree/bindings/arm/freescale/fsl,scu.txt | 31 ---------------- .../devicetree/bindings/clock/fsl,scu-clk.yaml | 43 ++++++++++++++++++++++ 2 files changed, 43 insertions(+), 31 deletions(-) commit 5060237b0ee1b1c70fcd9a8048664905b74ba6a4 Author: Thierry Reding Date: Wed Jul 6 08:42:54 2022 +0530 memory: tegra: Add MGBE memory clients for Tegra234 Tegra234 has multiple network interfaces with each their own memory clients and stream IDs to allow for proper isolation. Signed-off-by: Thierry Reding Signed-off-by: Bhadram Varka Acked-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding drivers/memory/tegra/tegra234.c | 80 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit 8c2261e9f040fefa0f9589b2f3710a5a34fcc565 Merge: f2906aa86338 68ce0053f061 Author: Thierry Reding Date: Fri Jul 8 10:29:20 2022 +0200 Merge branch 'for-5.20/dt-bindings' into for-5.20/memory commit 4d3ddc9bce4b2bfc167d8c2880f34de29b4587c6 Author: AngeloGioacchino Del Regno Date: Thu Jun 23 14:17:01 2022 +0200 soc: mediatek: mutex: Simplify with devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. While at it, also remove a redundant call to of_address_to_resource(), as this was getting the address of the same resource index 0: we can as well get the iostart from the 'regs' pointer. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220623121701.107512-1-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-mutex.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 2b5764fb7bf8e22c9e853eb58865df9d74f8f20a Author: AngeloGioacchino Del Regno Date: Tue May 3 16:14:41 2022 +0200 soc: mediatek: pm-domains: Add support for Helio X10 MT6795 Add pm-domains (mtcmos) data for MediaTek Helio X10 MT6795 SoC. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220503141441.125852-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mt6795-pm-domains.h | 112 +++++++++++++++++++++++++++++++ drivers/soc/mediatek/mtk-pm-domains.c | 5 ++ 2 files changed, 117 insertions(+) commit 2b48db01a066f738cf467876237587f1c4b6b7a2 Author: AngeloGioacchino Del Regno Date: Tue May 3 16:14:40 2022 +0200 dt-bindings: power: Add MediaTek Helio X10 MT6795 power domains Add power domains dt-bindings for MediaTek Helio X10 (MT6795). Signed-off-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220503141441.125852-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger .../bindings/power/mediatek,power-controller.yaml | 2 ++ include/dt-bindings/power/mt6795-power.h | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) commit 68ce0053f061721850a3e83ca708abdd6fc506d0 Author: Sumit Gupta Date: Thu May 12 01:46:48 2022 +0530 dt-bindings: arm: tegra: Add NVIDIA Tegra234 CBB 2.0 binding Add device-tree binding documentation to represent the Control Backbone (CBB) version 2.0 used on Tegra234 SoCs. Signed-off-by: Sumit Gupta Reviewed-by: Rob Herring Signed-off-by: Thierry Reding .../bindings/arm/tegra/nvidia,tegra234-cbb.yaml | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit 3bf80f8d4fd91f1af09272416348a428e6430fc1 Author: Sumit Gupta Date: Thu May 12 01:46:45 2022 +0530 dt-bindings: arm: tegra: Add NVIDIA Tegra194 AXI2APB binding Add device-tree binding documentation to represent the AXI2APB bridges used by Control Backbone (CBB) 1.0 on Tegra194 SoCs. All errors for APB slaves are reported as slave error because APB bas single bit to report error. So, CBB driver needs to further check error status registers of all the AXI2APB bridges to find error type. Signed-off-by: Sumit Gupta Signed-off-by: Thierry Reding Reviewed-by: Rob Herring Signed-off-by: Thierry Reding .../arm/tegra/nvidia,tegra194-axi2apb.yaml | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 476111be5f269897e5cdacb340be10a22d2c8fcc Author: Sumit Gupta Date: Thu May 12 01:46:44 2022 +0530 dt-bindings: arm: tegra: Add NVIDIA Tegra194 CBB 1.0 binding Add device-tree binding documentation to represent the Control Backbone (CBB) version 1.0 used on Tegra194 SoCs. Signed-off-by: Sumit Gupta Reviewed-by: Rob Herring Signed-off-by: Thierry Reding .../bindings/arm/tegra/nvidia,tegra194-cbb.yaml | 97 ++++++++++++++++++++++ 1 file changed, 97 insertions(+) commit 833f5a7eb2889067c45e5367aa7d5516df17520d Author: Thierry Reding Date: Wed Jul 6 08:42:53 2022 +0530 dt-bindings: memory: Add Tegra234 MGBE memory clients Add the memory client and stream ID definitions for the MGBE hardware found on Tegra234 SoCs. Signed-off-by: Thierry Reding Signed-off-by: Bhadram Varka Acked-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding include/dt-bindings/memory/tegra234-mc.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit b0aedf342bc31d7b8e9a782cd8b439db07fbdc78 Author: Thierry Reding Date: Wed Jul 6 08:42:52 2022 +0530 dt-bindings: Add Tegra234 MGBE clocks and resets Add the clocks and resets used by the MGBE Ethernet hardware found on Tegra234 SoCs. Signed-off-by: Thierry Reding Signed-off-by: Bhadram Varka Acked-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding include/dt-bindings/clock/tegra234-clock.h | 101 +++++++++++++++++++++++++++++ include/dt-bindings/reset/tegra234-reset.h | 8 +++ 2 files changed, 109 insertions(+) commit 5de7d31b50c77d97fc568e7279c1831a72c33ee9 Author: Thierry Reding Date: Wed Jul 6 08:42:51 2022 +0530 dt-bindings: power: Add Tegra234 MGBE power domains Add power domain IDs for the four MGBE power partitions found on Tegra234. Signed-off-by: Thierry Reding Signed-off-by: Bhadram Varka Acked-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding include/dt-bindings/power/tegra234-powergate.h | 1 + 1 file changed, 1 insertion(+) commit d4ac6028b991b866803ffa36a1039d5573a4f52a Author: Peng Fan Date: Thu Jul 7 07:47:57 2022 +0800 arm64: dts: imx8mp: add NoC node Add i.MX8MP NoC node to make the interconnect i.MX8MP driver could work. Currently dynamic frequency scaling of the i.MX8MP NoC has not been supported, only NoC initial settings are configured by interconnect driver. Signed-off-by: Peng Fan Acked-by: Georgi Djakov Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 9167fd5d5549bcea6d4735a270908da2a3475f3a Author: Samuel Holland Date: Thu Jul 7 19:49:31 2022 -0500 PCI: hv: Take a const cpumask in hv_compose_msi_req_get_cpu() The cpumask that is passed to this function ultimately comes from irq_data_get_effective_affinity_mask(), which was recently changed to return a const cpumask pointer. The first level of functions handling the affinity mask were updated, but not this helper function. Fixes: 4d0b8298818b ("genirq: Return a const cpumask from irq_data_get_affinity_mask") Reported-by: kernel test robot Signed-off-by: Samuel Holland Reviewed-by: Michael Kelley Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220708004931.1672-1-samuel@sholland.org drivers/pci/controller/pci-hyperv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d67fe5e3b2caf68c02b27d42dd63f4898d14d43c Merge: 30a32ee55f6a 228e8a88b191 Author: Arnd Bergmann Date: Fri Jul 8 09:40:30 2022 +0200 Merge tag 'zynqmp-dt-for-v5.20' of https://github.com/Xilinx/linux-xlnx into arm/dt arm64: dts: ZynqMP DT changes for v5.20 - Extend gpio-zynq DT binding (compatible, power-domains, gpio-line-names) - Fix sm-k26 gpio comment - Wire AMS device - Align gpio-keys node names with dtschema * tag 'zynqmp-dt-for-v5.20' of https://github.com/Xilinx/linux-xlnx: arm64: dts: xilinx: align gpio-key node names with dtschema arm64: dts: zynqmp: add AMS driver to device tree dt-bindings: gpio: zynq: Describe gpio-line-names arm64: zynqmp: Fix comment about number of gpio line names dt-bindings: gpio: zynq: Add power-domains dt-bindings: gpio: zynq: Add missing compatible strings Link: https://lore.kernel.org/r/452e8c68-b63b-f4f6-a937-67f65c64a8a0@monstr.eu Signed-off-by: Arnd Bergmann commit 30a32ee55f6a4290da30ed939961009ac8ca505d Merge: 999462d33649 c8b35008b4f1 Author: Arnd Bergmann Date: Fri Jul 8 09:38:50 2022 +0200 Merge tag 'zynq-dt-for-v5.20' of https://github.com/Xilinx/linux-xlnx into arm/dt ARM: Zynq DT changes for v5.20 - Align gpio-keys node names with dtschema * tag 'zynq-dt-for-v5.20' of https://github.com/Xilinx/linux-xlnx: ARM: dts: xilinx: align gpio-key node names with dtschema Link: https://lore.kernel.org/r/87d2bd4a-b90d-6396-17c5-c95ac64d17d0@monstr.eu Signed-off-by: Arnd Bergmann commit 79e6e2f3f3ff345947075341781e900e4f70db81 Author: Ignat Korchagin Date: Mon Jul 4 11:38:40 2022 +0100 crypto: testmgr - populate RSA CRT parameters in RSA test vectors Changes from v1: * replace some accidental spaces with tabs In commit f145d411a67e ("crypto: rsa - implement Chinese Remainder Theorem for faster private key operations") we have started to use the additional primes and coefficients for RSA private key operations. However, these additional parameters are not present (defined as 0 integers) in the RSA test vectors. Some parameters were borrowed from OpenSSL, so I was able to find the source. I could not find the public source for 1 vector though, so had to recover the parameters by implementing Appendix C from [1]. [1]: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Br1.pdf Fixes: f145d411a67e ("crypto: rsa - implement Chinese Remainder Theorem for faster private key operations") Reported-by: Tasmiya Nalatwad Signed-off-by: Ignat Korchagin Signed-off-by: Herbert Xu crypto/testmgr.h | 121 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 100 insertions(+), 21 deletions(-) commit 932be3e95b228d13cd1b8aaf5c0578c76e3f7dc6 Author: Ofer Heifetz Date: Sat Jul 2 10:14:26 2022 +0300 crypto: inside-secure - fix packed bit-field result descriptor When mixing bit-field and none bit-filed in packed struct the none bit-field starts at a distinct memory location, thus adding an additional byte to the overall structure which is used in memory zero-ing and other configuration calculations. Fix this by removing the none bit-field that has a following bit-field. Signed-off-by: Ofer Heifetz Acked-by: Antoine Tenart Acked-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 68740ab505431f268dc1ee26a54b871e75f0ddaa Author: Zhengchao Shao Date: Fri Jul 1 09:59:54 2022 +0800 crypto: hisilicon - Kunpeng916 crypto driver don't sleep when in softirq When kunpeng916 encryption driver is used to deencrypt and decrypt packets during the softirq, it is not allowed to use mutex lock. Fixes: 915e4e8413da ("crypto: hisilicon - SEC security accelerator driver") Signed-off-by: Zhengchao Shao Signed-off-by: Herbert Xu drivers/crypto/hisilicon/sec/sec_algs.c | 14 +++++++------- drivers/crypto/hisilicon/sec/sec_drv.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) commit 02884a4f12de11f54d4ca67a07dd1f111d96fdbd Author: Zhengchao Shao Date: Fri Jul 1 09:55:11 2022 +0800 crypto: hisilicon/sec - don't sleep when in softirq When kunpeng920 encryption driver is used to deencrypt and decrypt packets during the softirq, it is not allowed to use mutex lock. The kernel will report the following error: BUG: scheduling while atomic: swapper/57/0/0x00000300 Call trace: dump_backtrace+0x0/0x1e4 show_stack+0x20/0x2c dump_stack+0xd8/0x140 __schedule_bug+0x68/0x80 __schedule+0x728/0x840 schedule+0x50/0xe0 schedule_preempt_disabled+0x18/0x24 __mutex_lock.constprop.0+0x594/0x5dc __mutex_lock_slowpath+0x1c/0x30 mutex_lock+0x50/0x60 sec_request_init+0x8c/0x1a0 [hisi_sec2] sec_process+0x28/0x1ac [hisi_sec2] sec_skcipher_crypto+0xf4/0x1d4 [hisi_sec2] sec_skcipher_encrypt+0x1c/0x30 [hisi_sec2] crypto_skcipher_encrypt+0x2c/0x40 crypto_authenc_encrypt+0xc8/0xfc [authenc] crypto_aead_encrypt+0x2c/0x40 echainiv_encrypt+0x144/0x1a0 [echainiv] crypto_aead_encrypt+0x2c/0x40 esp_output_tail+0x348/0x5c0 [esp4] esp_output+0x120/0x19c [esp4] xfrm_output_one+0x25c/0x4d4 xfrm_output_resume+0x6c/0x1fc xfrm_output+0xac/0x3c0 xfrm4_output+0x64/0x130 ip_build_and_send_pkt+0x158/0x20c tcp_v4_send_synack+0xdc/0x1f0 tcp_conn_request+0x7d0/0x994 tcp_v4_conn_request+0x58/0x6c tcp_v6_conn_request+0xf0/0x100 tcp_rcv_state_process+0x1cc/0xd60 tcp_v4_do_rcv+0x10c/0x250 tcp_v4_rcv+0xfc4/0x10a4 ip_protocol_deliver_rcu+0xf4/0x200 ip_local_deliver_finish+0x58/0x70 ip_local_deliver+0x68/0x120 ip_sublist_rcv_finish+0x70/0x94 ip_list_rcv_finish.constprop.0+0x17c/0x1d0 ip_sublist_rcv+0x40/0xb0 ip_list_rcv+0x140/0x1dc __netif_receive_skb_list_core+0x154/0x28c __netif_receive_skb_list+0x120/0x1a0 netif_receive_skb_list_internal+0xe4/0x1f0 napi_complete_done+0x70/0x1f0 gro_cell_poll+0x9c/0xb0 napi_poll+0xcc/0x264 net_rx_action+0xd4/0x21c __do_softirq+0x130/0x358 irq_exit+0x11c/0x13c __handle_domain_irq+0x88/0xf0 gic_handle_irq+0x78/0x2c0 el1_irq+0xb8/0x140 arch_cpu_idle+0x18/0x40 default_idle_call+0x5c/0x1c0 cpuidle_idle_call+0x174/0x1b0 do_idle+0xc8/0x160 cpu_startup_entry+0x30/0x11c secondary_start_kernel+0x158/0x1e4 softirq: huh, entered softirq 3 NET_RX 0000000093774ee4 with preempt_count 00000100, exited with fffffe00? Fixes: 416d82204df4 ("crypto: hisilicon - add HiSilicon SEC V2 driver") Signed-off-by: Zhengchao Shao Signed-off-by: Herbert Xu drivers/crypto/hisilicon/sec2/sec.h | 2 +- drivers/crypto/hisilicon/sec2/sec_crypto.c | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) commit 32c0f7d4194c4352f902f07d2ab990994800596e Author: Jianglei Nie Date: Thu Jun 30 22:31:32 2022 +0800 crypto: hisilicon/sec - fix inconsistent argument The argument passed to sec_queue_aw_alloc() should be SEC_QUEUE_AW_FROCE_NOALLOC instead of SEC_QUEUE_AR_FROCE_NOALLOC. Signed-off-by: Jianglei Nie Signed-off-by: Herbert Xu drivers/crypto/hisilicon/sec/sec_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ccc9cc47c8c9e69c7bd9a7694a1d8c33108dd28 Author: Liang He Date: Thu Jun 30 16:36:57 2022 +0800 crypto: nx - Hold the reference returned by of_find_compatible_node In nx842_pseries_init(), we should hold the reference returned by of_find_compatible_node() and use it to call of_node_put to keep refcount balance. Signed-off-by: Liang He Signed-off-by: Herbert Xu drivers/crypto/nx/nx-common-pseries.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9984a6447389a01cc5e8501b2ead3024b2d99c19 Author: Liang He Date: Thu Jun 30 16:36:56 2022 +0800 crypto: amcc - Hold the reference returned by of_find_compatible_node In crypto4xx_probe(), we should hold the reference returned by of_find_compatible_node() and use it to call of_node_put to keep refcount balance. Signed-off-by: Liang He Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.c | 40 +++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 16 deletions(-) commit cc8166bfc829043020b5cc3b7cdba02a17d03b6d Author: Herbert Xu Date: Thu Jun 30 16:11:49 2022 +0800 crypto: vmx - Fix warning on p8_ghash_alg The compiler complains that p8_ghash_alg isn't declared which is because the header file aesp8-ppc.h isn't included in ghash.c. This patch fixes the warning. Signed-off-by: Herbert Xu Acked-by: Breno Leitao Signed-off-by: Herbert Xu drivers/crypto/vmx/ghash.c | 1 + 1 file changed, 1 insertion(+) commit d4cfb144f60551d80732c93c892fe76fc8df860d Author: Giovanni Cabiddu Date: Mon Jun 27 09:36:52 2022 +0100 crypto: qat - expose device config through sysfs for 4xxx qat_4xxx devices can be configured to allow either crypto or compression operations. At the moment, devices are configured statically according to the following rule: - odd numbered devices assigned to compression services - even numbered devices assigned to crypto services Expose the sysfs attribute /sys/bus/pci/devices//qat/cfg_services to allow to detect the configuration of a device and to change it. The `cfg_service` attribute is only exposed for qat_4xxx devices and it is limited to two configurations: (1) "sym;asym" for crypto services and "dc" for compression services. Signed-off-by: Giovanni Cabiddu Co-developed-by: Tomasz Kowallik Signed-off-by: Tomasz Kowallik Reviewed-by: Adam Guerin Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Vladis Dronov Signed-off-by: Herbert Xu Documentation/ABI/testing/sysfs-driver-qat | 39 +++++++++++++++ drivers/crypto/qat/qat_common/adf_sysfs.c | 80 ++++++++++++++++++++++++++++-- 2 files changed, 115 insertions(+), 4 deletions(-) commit 16c1ed95d1c4956e428c8daa2783bcc7fa7f6fb9 Author: Giovanni Cabiddu Date: Mon Jun 27 09:36:51 2022 +0100 crypto: qat - relocate and rename adf_sriov_prepare_restart() The function adf_sriov_prepare_restart() is used in adf_sriov.c to stop and shutdown a device preserving its configuration. Since this function will be re-used by the logic that allows to reconfigure the device through sysfs, move it to adf_init.c and rename it as adf_dev_shutdown_cache_cfg(); Signed-off-by: Giovanni Cabiddu Reviewed-by: Adam Guerin Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Vladis Dronov Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/adf_common_drv.h | 1 + drivers/crypto/qat/qat_common/adf_init.c | 26 ++++++++++++++++++++++++ drivers/crypto/qat/qat_common/adf_sriov.c | 28 +------------------------- 3 files changed, 28 insertions(+), 27 deletions(-) commit 92bf269fbfe94018f15405e1644049de7c7b46dd Author: Giovanni Cabiddu Date: Mon Jun 27 09:36:50 2022 +0100 crypto: qat - change behaviour of adf_cfg_add_key_value_param() The function adf_cfg_add_key_value_param() allows to insert duplicates entries in the key value store of the driver. Change the behaviour of that function to the following policy: - if the key doesn't exist, add it; - if the key already exists with a different value, then delete it and replace it with a new one containing the new value; - if the key exists with the same value, then return without doing anything. The behaviour of this function has been changed in order to easily update key-values in the driver database. In particular this is required to update the value of the ServiceEnables key used to change the service loaded on a device. Signed-off-by: Giovanni Cabiddu Reviewed-by: Adam Guerin Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Vladis Dronov Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/adf_cfg.c | 41 ++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) commit 5ee52118ac1481dd8a8f7e6a9bfe6ee05ac6ec92 Author: Giovanni Cabiddu Date: Mon Jun 27 09:36:49 2022 +0100 crypto: qat - expose device state through sysfs for 4xxx Expose the device state through an attribute in sysfs and allow to change it. This is to stop and shutdown a QAT device in order to change its configuration. The state attribute has been added to a newly created `qat` attribute group which will contain all _QAT specific_ attributes. The logic that implements the sysfs entries is part of a new file, adf_sysfs.c. This exposes an entry point to allow the driver to create attributes. The function that creates the sysfs attributes is called from the probe function of the driver and not in the state machine init function to allow the change of states even if the device is in the down state. In order to restore the device configuration between a transition from down to up, the function that configures the devices has been abstracted into the HW data structure. The `state` attribute is only exposed for qat_4xxx devices. Signed-off-by: Giovanni Cabiddu Co-developed-by: Tomasz Kowallik Signed-off-by: Tomasz Kowallik Reviewed-by: Adam Guerin Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Vladis Dronov Signed-off-by: Herbert Xu Documentation/ABI/testing/sysfs-driver-qat | 21 ++++ drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c | 1 + drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.h | 1 + drivers/crypto/qat/qat_4xxx/adf_drv.c | 6 +- drivers/crypto/qat/qat_common/Makefile | 1 + drivers/crypto/qat/qat_common/adf_accel_devices.h | 1 + drivers/crypto/qat/qat_common/adf_common_drv.h | 2 + drivers/crypto/qat/qat_common/adf_sysfs.c | 119 ++++++++++++++++++++++ 8 files changed, 151 insertions(+), 1 deletion(-) commit a2668c1500e3ae1525525d72d9b86ce57afc70db Merge: 8fcdf10295b4 d1ff2559cef0 Author: Arnd Bergmann Date: Fri Jul 8 09:13:23 2022 +0200 Merge tag 'zynq-soc-for-v5.20' of https://github.com/Xilinx/linux-xlnx into arm/soc ARM: Zynq SoC changes for v5.20 - Fix refcount leak in zynq_get_revision() * tag 'zynq-soc-for-v5.20' of https://github.com/Xilinx/linux-xlnx: cpufreq: zynq: Fix refcount leak in zynq_get_revision Link: https://lore.kernel.org/r/e1d0a721-afa4-93a0-7119-0e4481a0624b@monstr.eu Signed-off-by: Arnd Bergmann commit 8fcdf10295b40ac42f10a642fae61da066a15390 Merge: e0ed9e672565 acd6510dd7ab Author: Arnd Bergmann Date: Fri Jul 8 09:11:24 2022 +0200 Merge tag 'zynqmp-soc-for-v5.20' of https://github.com/Xilinx/linux-xlnx into arm/soc arm64: ZynqMP SoC changes for v5.20 - Register SGI separately out of EEMI * tag 'zynqmp-soc-for-v5.20' of https://github.com/Xilinx/linux-xlnx: firmware: xilinx: Add TF_A_PM_REGISTER_SGI SMC call Link: https://lore.kernel.org/r/0196d1f3-e9c7-ef51-143d-e98b14980f63@monstr.eu Signed-off-by: Arnd Bergmann commit 3cb16ad69bef90a86390d7f94081fd5ae9e0df8d Author: Krzysztof Kozlowski Date: Fri May 13 08:13:42 2022 +0200 dt-bindings: opp: accept array of frequencies Devices might need to control several clocks when scaling the frequency and voltage. Allow passing array of clock frequencies, similarly to the voltages. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bjorn Andersson Acked-by: Rob Herring Reviewed-by: Manivannan Sadhasivam Signed-off-by: Viresh Kumar Documentation/devicetree/bindings/opp/opp-v2-base.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 1efae8d2e7775b04656eb18d0a044fbd412dab3c Author: Viresh Kumar Date: Fri Jun 3 15:01:30 2022 +0530 OPP: Make dev_pm_opp_set_opp() independent of frequency dev_pm_opp_set_opp() can be called for any device, it may or may not have a frequency value associated with it. If a frequency value isn't available, we pass 0 to _set_opp(). Make it optional instead by making _set_opp() accept a pointer instead, as the frequency value is anyway available in the OPP. This makes dev_pm_opp_set_opp() and _set_opp() completely independent of any special key value. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/opp/core.c | 52 ++++++++++++++++++++++++++++++++++++++-------------- drivers/opp/opp.h | 4 ++-- 2 files changed, 40 insertions(+), 16 deletions(-) commit 8bdac14b0cd56d9578d3112375ed8b23884c1a69 Author: Viresh Kumar Date: Fri Jun 10 10:32:50 2022 +0530 OPP: Reuse _opp_compare_key() in _opp_add_static_v2() Reuse _opp_compare_key() in _opp_add_static_v2() instead of just comparing frequency while finding suspend frequency. Also add a comment over _opp_compare_key() explaining its return values. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/opp/core.c | 6 ++++++ drivers/opp/of.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit 4768914bffdb0b2b023d9b1c5c4e596bf8332137 Author: Viresh Kumar Date: Wed Jun 8 11:57:24 2022 +0530 OPP: Remove rate_not_available parameter to _opp_add() commit 32715be4fe95 ("opp: Fix adding OPP entries in a wrong order if rate is unavailable") removed the only user of this field, get rid of rest of it now. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/opp/core.c | 4 ++-- drivers/opp/of.c | 10 ++++------ drivers/opp/opp.h | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) commit d613458332ccbab83c0600145d851796787305b4 Author: Viresh Kumar Date: Thu Jun 9 15:35:36 2022 +0530 OPP: Use consistent names for OPP table instances The OPP table is called "opp_table" at most of the places and "table" at few. Make all of them follow the same naming convention, "opp_table". Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/opp/core.c | 7 ++++--- drivers/opp/cpu.c | 12 ++++++------ drivers/opp/of.c | 12 ++++++------ 3 files changed, 16 insertions(+), 15 deletions(-) commit add1dc094a7456d3c56782b7478940b6a550c7ed Author: Viresh Kumar Date: Thu Jun 2 13:05:45 2022 +0530 OPP: Use generic key finding helpers for bandwidth key Use the recently added generic key findings helpers to find bandwidth key values. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/opp/core.c | 83 ++++++++++-------------------------------------------- 1 file changed, 15 insertions(+), 68 deletions(-) commit c2ab2cb6379ce302dec3a017fc0de1d5bae349f8 Author: Viresh Kumar Date: Thu Jun 2 13:05:45 2022 +0530 OPP: Use generic key finding helpers for level key Use the recently added generic key findings helpers to find level key values. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/opp/core.c | 63 +++++++++--------------------------------------------- 1 file changed, 10 insertions(+), 53 deletions(-) commit aab8ced2210837c3f1f7f42f715cdf32729cabde Author: Viresh Kumar Date: Thu Jun 2 13:03:05 2022 +0530 OPP: Add generic key finding helpers and use them for freq APIs There are three type of helpers, to find exact, ceil, and floor values, replicated for multiple key types, freq, level, bw. And all of these helpers share a lot of boilerplate code. Add generic key finding helpers to reduce code redundancy. Also update the freq finder helpers to use the new infrastructure. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/opp/core.c | 229 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 130 insertions(+), 99 deletions(-) commit 9fbb62605607d8f00c32a4765cd1ae67f022b640 Author: Viresh Kumar Date: Thu Jun 2 14:05:59 2022 +0530 OPP: Remove dev_pm_opp_find_freq_ceil_by_volt() This was added few years back, but the code that was supposed to use it never got merged. Remove the unused helper. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/opp/core.c | 54 -------------------------------------------------- include/linux/pm_opp.h | 8 -------- 2 files changed, 62 deletions(-) commit 1f378c6ead5c69decf36e8e61de2e50377c76ab8 Author: Viresh Kumar Date: Mon Jul 4 14:57:06 2022 +0530 OPP: Remove custom OPP helper support The only user of the custom helper is migrated to use dev_pm_opp_set_config_regulators() interface. Remove the now unused custom OPP helper support. This cleans up _set_opp() and leaves a single code path to be used by all users. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/opp/core.c | 132 +------------------------------------------------ drivers/opp/opp.h | 7 --- include/linux/pm_opp.h | 51 ------------------- 3 files changed, 2 insertions(+), 188 deletions(-) commit 6baee034cb55d53b74165d31c2371f0736c432e8 Author: Viresh Kumar Date: Tue May 31 14:36:35 2022 +0530 OPP: ti: Migrate to dev_pm_opp_set_config_regulators() The OPP core now provides dev_pm_opp_set_config_regulators() interface, which needs the platforms to just set the OPP voltages instead of both clk and voltage. The clock is set by the OPP core instead and hence reduces code redundancy. Migrate the only user of the custom set_opp() to dev_pm_opp_set_config_regulators(). Signed-off-by: Viresh Kumar drivers/opp/ti-opp-supply.c | 75 ++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 41 deletions(-) commit 69b1af178a3a534da2f20fa0c7356fcbbe8cce1f Author: Viresh Kumar Date: Tue May 31 13:24:21 2022 +0530 OPP: Add dev_pm_opp_get_supplies() We already have an API for getting voltage information for a single regulator, dev_pm_opp_get_voltage(), but there is nothing available for multiple regulator case. This patch adds a new API, dev_pm_opp_get_supplies(), to get all information related to the supplies for an OPP. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/opp/core.c | 25 +++++++++++++++++++++++++ include/linux/pm_opp.h | 7 +++++++ 2 files changed, 32 insertions(+) commit c522ce8a08066b44539e0dd0998b8e3b277a759b Author: Viresh Kumar Date: Tue May 31 12:49:19 2022 +0530 OPP: Make _generic_set_opp_regulator() a config_regulators() interface In order to reuse the same code path, i.e. clk_set_rate() from _set_opp(), migrate _generic_set_opp_regulator() to implement a config_regulators() interface. It is renamed to _opp_config_regulator_single() and is set as the preferred config_regulators() interface whenever we have a single regulator available. Note that this also drops code responsible for restoring the voltage/freq in case of errors. We aren't handling that properly currently, restoring only some of the resources while leaving others out (like bandwidth and required OPPs). It is better to drop all of it instead of partial restoration. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/opp/core.c | 51 ++++++++++++--------------------------------------- 1 file changed, 12 insertions(+), 39 deletions(-) commit aee3352f6ecf8cfad1f1ee5838cfc4d37c6b8f75 Author: Viresh Kumar Date: Mon Jul 4 13:45:08 2022 +0530 OPP: Add support for config_regulators() helper Extend the dev_pm_opp_set_config() interface to allow adding config_regulators() helpers. This helper will be called to set the voltages of the regulators from the regular path in _set_opp(), while we are trying to change the OPP. This will eventually replace the custom set_opp() helper. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/opp/core.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++- drivers/opp/opp.h | 2 ++ include/linux/pm_opp.h | 22 ++++++++++++++++ 3 files changed, 91 insertions(+), 1 deletion(-) commit 298098e55a6fcc176a5af52cd689f33577ead5ca Author: Viresh Kumar Date: Thu May 26 09:36:27 2022 +0530 OPP: Migrate set-prop-name helper API to use set-config helpers Now that we have a central API to handle all OPP table configurations, migrate the set-prop-name family of helpers to use the new infrastructure. The return type and parameter to the APIs change a bit due to this, update the current users as well in the same commit in order to avoid breaking builds. Acked-by: Samuel Holland # sun50i Signed-off-by: Viresh Kumar drivers/cpufreq/sun50i-cpufreq-nvmem.c | 31 +++++++++---------- drivers/opp/core.c | 55 +++++++++++----------------------- include/linux/pm_opp.h | 23 ++++++++------ 3 files changed, 46 insertions(+), 63 deletions(-) commit 442e7a1786e628b38175314ec1805966b8d0c02c Author: Viresh Kumar Date: Thu May 26 09:36:27 2022 +0530 OPP: Migrate attach-genpd API to use set-config helpers Now that we have a central API to handle all OPP table configurations, migrate the attach-genpd family of helpers to use the new infrastructure. Signed-off-by: Viresh Kumar drivers/opp/core.c | 85 +++++++++++--------------------------------------- include/linux/pm_opp.h | 48 ++++++++++++++++++---------- 2 files changed, 49 insertions(+), 84 deletions(-) commit 3c543b42a6df35feb3db6689e512fa167739451e Author: Viresh Kumar Date: Thu May 26 09:36:27 2022 +0530 OPP: Migrate set-opp-helper API to use set-config helpers Now that we have a central API to handle all OPP table configurations, migrate the set-opp-helper family of helpers to use the new infrastructure. The return type and parameter to the APIs change a bit due to this, update the current users as well in the same commit in order to avoid breaking builds. Remove devm_pm_opp_register_set_opp_helper() as it has no users currently. Signed-off-by: Viresh Kumar drivers/opp/core.c | 89 ++++++++++----------------------------------- drivers/opp/ti-opp-supply.c | 6 +-- include/linux/pm_opp.h | 33 ++++++++--------- 3 files changed, 39 insertions(+), 89 deletions(-) commit 2368f57685768f9f9cd666eaa4194a359d89afb8 Author: Viresh Kumar Date: Thu May 26 09:36:27 2022 +0530 OPP: Migrate set-clk-name API to use set-config helpers Now that we have a central API to handle all OPP table configurations, migrate the set-clk-name family of helpers to use the new infrastructure. Signed-off-by: Viresh Kumar drivers/opp/core.c | 142 +++++++++++++++---------------------------------- include/linux/pm_opp.h | 41 ++++++++------ 2 files changed, 69 insertions(+), 114 deletions(-) commit 89f03984fa2abface1ffb1fe050b7c175651ffc7 Author: Viresh Kumar Date: Thu May 26 09:36:27 2022 +0530 OPP: Migrate set-supported-hw API to use set-config helpers Now that we have a central API to handle all OPP table configurations, migrate the set-supported-hw family of helpers to use the new infrastructure. The return type and parameter to the APIs change a bit due to this, update the current users as well in the same commit in order to avoid breaking builds. Signed-off-by: Viresh Kumar drivers/cpufreq/imx-cpufreq-dt.c | 12 ++--- drivers/cpufreq/tegra20-cpufreq.c | 12 +++-- drivers/memory/tegra/tegra124-emc.c | 11 +++-- drivers/opp/core.c | 87 +++++++++---------------------------- include/linux/pm_opp.h | 49 +++++++++++++-------- 5 files changed, 66 insertions(+), 105 deletions(-) commit b0ec09428621daee5101130c307634a390b0213b Author: Viresh Kumar Date: Mon Jul 4 16:36:26 2022 +0530 OPP: Migrate set-regulators API to use set-config helpers Now that we have a central API to handle all OPP table configurations, migrate the set-regulators family of helpers to use the new infrastructure. The return type and parameter to the APIs change a bit due to this, update the current users as well in the same commit in order to avoid breaking builds. Reviewed-by: Chanwoo Choi Signed-off-by: Viresh Kumar drivers/cpufreq/cpufreq-dt.c | 12 +++--- drivers/devfreq/exynos-bus.c | 19 ++++----- drivers/opp/core.c | 91 +++++++++----------------------------------- include/linux/pm_opp.h | 44 +++++++++++++-------- 4 files changed, 60 insertions(+), 106 deletions(-) commit 25a18559b8ae4f6491e189483fb00f7de0a0d2d8 Author: Viresh Kumar Date: Wed May 25 17:00:51 2022 +0530 soc/tegra: Migrate to dev_pm_opp_set_config() The OPP core now provides a unified API for setting all configuration types, i.e. dev_pm_opp_set_config(). Lets start using it. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/soc/tegra/common.c | 52 +++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 21 deletions(-) commit a6db3b92323a0005b8685864be74262729780d5e Author: Viresh Kumar Date: Fri Jun 24 05:58:56 2022 +0530 soc/tegra: Add comment over devm_pm_opp_set_clkname() Explain why special handling was required here, it isn't obvious at all. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/soc/tegra/common.c | 7 +++++++ 1 file changed, 7 insertions(+) commit d8c32d3971e4c4f9e81c28031c46b755c17192d2 Author: Viresh Kumar Date: Wed May 25 17:00:51 2022 +0530 drm/lima: Migrate to dev_pm_opp_set_config() The OPP core now provides a unified API for setting all configuration types, i.e. dev_pm_opp_set_config(). Lets start using it. Signed-off-by: Viresh Kumar drivers/gpu/drm/lima/lima_devfreq.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit f88d152dc739b3b50c72fc6bf91e5b11b5e06b8e Author: Viresh Kumar Date: Wed May 25 17:00:51 2022 +0530 cpufreq: ti: Migrate to dev_pm_opp_set_config() The OPP core now provides a unified API for setting all configuration types, i.e. dev_pm_opp_set_config(). Lets start using it. Signed-off-by: Viresh Kumar drivers/cpufreq/ti-cpufreq.c | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) commit 49df85d033730eda0ba50b4032f12e35f9968485 Author: Viresh Kumar Date: Wed May 25 17:00:51 2022 +0530 cpufreq: sti: Migrate to dev_pm_opp_set_config() The OPP core now provides a unified API for setting all configuration types, i.e. dev_pm_opp_set_config(). Lets start using it. Signed-off-by: Viresh Kumar drivers/cpufreq/sti-cpufreq.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) commit 49cd000dc51bf8b0daf0ba4b8c433c416da5b742 Author: Viresh Kumar Date: Wed May 25 17:00:51 2022 +0530 cpufreq: qcom-nvmem: Migrate to dev_pm_opp_set_config() The OPP core now provides a unified API for setting all configuration types, i.e. dev_pm_opp_set_config(). Lets start using it. Signed-off-by: Viresh Kumar drivers/cpufreq/qcom-cpufreq-nvmem.c | 109 +++++++++-------------------------- 1 file changed, 28 insertions(+), 81 deletions(-) commit 11b9b663585c4f8b00846089ebbca4d1e3283e86 Author: Viresh Kumar Date: Wed May 25 15:23:16 2022 +0530 OPP: Add dev_pm_opp_set_config() and friends The OPP core already have few configuration specific APIs and it is getting complex or messy for both the OPP core and its users. Lets introduce a new set of API which will be used for all kind of different configurations, and shall eventually be used by all the existing ones. The new API, returns a unique token instead of a pointer to the OPP table, which allows the OPP core to drop the resources selectively later on. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar drivers/opp/core.c | 229 ++++++++++++++++++++++++++++++++++++++++++++++++- drivers/opp/opp.h | 21 +++++ include/linux/pm_opp.h | 42 +++++++++ 3 files changed, 291 insertions(+), 1 deletion(-) commit 87686cc845c3be7dea777f1dbf2de0767007cda8 Author: Viresh Kumar Date: Mon Jul 4 16:10:39 2022 +0530 OPP: Make dev_pm_opp_set_regulators() accept NULL terminated list Make dev_pm_opp_set_regulators() accept a NULL terminated list of names instead of making the callers keep the two parameters in sync, which creates an opportunity for bugs to get in. Suggested-by: Greg Kroah-Hartman Reviewed-by: Steven Price # panfrost Reviewed-by: Chanwoo Choi Signed-off-by: Viresh Kumar drivers/cpufreq/cpufreq-dt.c | 9 ++++----- drivers/cpufreq/ti-cpufreq.c | 7 +++---- drivers/devfreq/exynos-bus.c | 4 ++-- drivers/gpu/drm/lima/lima_devfreq.c | 3 ++- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 3 +-- drivers/gpu/drm/panfrost/panfrost_drv.c | 15 ++++++++++----- drivers/opp/core.c | 18 ++++++++++++------ drivers/soc/tegra/pmc.c | 4 ++-- include/linux/pm_opp.h | 9 ++++----- 9 files changed, 40 insertions(+), 32 deletions(-) commit 08fd292fdffcf5fbca6301ff43aa1ad3cf9d69da Author: Yang Yingliang Date: Thu Jul 7 21:53:09 2022 +0800 phy: phy-mtk-dp: change mtk_dp_phy_driver to static mtk_dp_phy_driver is only used in phy-mtk-dp.c now, change it to static. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220707135309.801181-1-yangyingliang@huawei.com Signed-off-by: Vinod Koul drivers/phy/mediatek/phy-mtk-dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06ff622d61d2ff0d06ae964627a8928e5243efc2 Author: Liu Ying Date: Wed Jul 6 11:48:10 2022 +0800 phy: freescale: Add i.MX8qm Mixel LVDS PHY support Add Freescale i.MX8qm LVDS PHY support. The PHY IP is from Mixel, Inc. Signed-off-by: Liu Ying Link: https://lore.kernel.org/r/20220706034810.2352641-4-victor.liu@nxp.com Signed-off-by: Vinod Koul drivers/phy/freescale/Kconfig | 9 + drivers/phy/freescale/Makefile | 1 + drivers/phy/freescale/phy-fsl-imx8qm-lvds-phy.c | 450 ++++++++++++++++++++++++ 3 files changed, 460 insertions(+) commit 4a902a02bb8dbc08ae762db0fad0c0e2fff75ca2 Author: Liu Ying Date: Wed Jul 6 11:48:09 2022 +0800 dt-bindings: phy: Add Freescale i.MX8qm Mixel LVDS PHY binding Add bindings for Mixel LVDS PHY found on Freescale i.MX8qm SoC. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Liu Ying Link: https://lore.kernel.org/r/20220706034810.2352641-3-victor.liu@nxp.com Signed-off-by: Vinod Koul .../bindings/phy/fsl,imx8qm-lvds-phy.yaml | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit b79a950cc1d221673f0e8d11bf98e6af090d69a8 Author: Liu Ying Date: Wed Jul 6 11:48:08 2022 +0800 dt-bindings: vendor-prefixes: Add prefix for Mixel, Inc. Add a vendor prefix entry for Mixel, Inc. (https://www.mixel.com). Acked-by: Krzysztof Kozlowski Signed-off-by: Liu Ying Link: https://lore.kernel.org/r/20220706034810.2352641-2-victor.liu@nxp.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit b26baa53003d34c389565596d53f57712e723ce0 Author: Lars-Peter Clausen Date: Thu Jul 7 09:17:22 2022 +0200 phy: cadence-torrent: Remove unused `regmap` field from state struct The driver state struct for the sierra PHY driver has a field named `regmap` that is never referenced. Remove it since it is unused. Not that there are separate fields of type `struct regmap` for the individual sections of the device's register map. These other regmaps are used and not affected by the patch. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20220707071722.44201-2-lars@metafoo.de Signed-off-by: Vinod Koul drivers/phy/cadence/phy-cadence-torrent.c | 1 - 1 file changed, 1 deletion(-) commit 085009f9b27243d6f2b6910a877f868553e75d84 Author: Lars-Peter Clausen Date: Thu Jul 7 09:17:21 2022 +0200 phy: cadence: Sierra: Remove unused `regmap` field from state struct The driver state struct for the sierra PHY driver has a field named `regmap` that is never referenced. Remove it since it is unused. Not that there are separate fields of type `struct regmap` for the individual sections of the device's register map. These other regmaps are used and not affected by the patch. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20220707071722.44201-1-lars@metafoo.de Signed-off-by: Vinod Koul drivers/phy/cadence/phy-cadence-sierra.c | 1 - 1 file changed, 1 deletion(-) commit 4e123efa45671ab9255aa4c4d990eb26a0e2ab94 Author: Chanho Park Date: Wed Jul 6 11:02:54 2022 +0900 phy: samsung-ufs: ufs: change phy on/off control The sequence of controlling ufs phy block should be below: 1) Power On - Turn off pmu isolation - Clock enable 2) Power Off - Clock disable - Turn on pmu isolation Signed-off-by: Chanho Park Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220706020255.151177-3-chanho61.park@samsung.com Signed-off-by: Vinod Koul drivers/phy/samsung/phy-samsung-ufs.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) commit 8d5bb683d50a80edaf8a6db9bfa28864914f5947 Author: Chanho Park Date: Wed Jul 6 11:02:53 2022 +0900 phy: samsung-ufs: convert phy clk usage to clk_bulk API Instead of using separated clock manipulation, this converts the phy clock usage to be clk_bulk APIs. By using this, we can completely remove has_symbol_clk check and symbol clk variables. Furthermore, clk_get should be moved to probe because there is no need to get them in the phy_init callback. Signed-off-by: Chanho Park Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220706020255.151177-2-chanho61.park@samsung.com Signed-off-by: Vinod Koul drivers/phy/samsung/phy-exynos7-ufs.c | 7 ++- drivers/phy/samsung/phy-exynosautov9-ufs.c | 7 ++- drivers/phy/samsung/phy-fsd-ufs.c | 7 ++- drivers/phy/samsung/phy-samsung-ufs.c | 99 +++++++----------------------- drivers/phy/samsung/phy-samsung-ufs.h | 10 +-- 5 files changed, 42 insertions(+), 88 deletions(-) commit 9d542f7bf1978fbb9378503a637498730309ed29 Merge: a2b6111b55f3 8a78ac73de20 Author: Jakub Kicinski Date: Thu Jul 7 20:01:53 2022 -0700 Merge branch 'polarfire-soc-macb-reset-support' Conor Dooley says: ==================== PolarFire SoC macb reset support The Cadence MACBs on PolarFire SoC (MPFS) have reset capability and are compatible with the zynqmp's init function. I have removed the zynqmp specific comments from that function & renamed it to reflect what it does, since it is no longer zynqmp only. MPFS's MACB had previously used the generic binding, so I also added the required specific binding. For v2, I noticed some low hanging cleanup fruit so there are extra patches added for that: moving the init function out of the config structs, aligning the alignment of the zynqmp & default config structs with the other dozen or so structs & simplifing the error paths to use dev_err_probe(). Feel free to apply as many or as few of those as you like. ==================== Link: https://lore.kernel.org/r/20220706095129.828253-1-conor.dooley@microchip.com Signed-off-by: Jakub Kicinski commit 8a78ac73de201ba9a1dbaf8ea598dab7549a4d45 Author: Conor Dooley Date: Wed Jul 6 10:51:29 2022 +0100 net: macb: sort init_reset_optional() with other init()s init_reset_optional() is somewhat oddly placed amidst the macb_config struct definitions. Move it to a more reasonable location alongside the fu540 init functions. Reviewed-by: Claudiu Beznea Signed-off-by: Conor Dooley Signed-off-by: Jakub Kicinski drivers/net/ethernet/cadence/macb_main.c | 68 ++++++++++++++++---------------- 1 file changed, 34 insertions(+), 34 deletions(-) commit ea242f821a2d0d55e275b9618f9628bcc30867a2 Author: Conor Dooley Date: Wed Jul 6 10:51:28 2022 +0100 net: macb: simplify error paths in init_reset_optional() The error handling paths in init_reset_optional() can all be simplified to return dev_err_probe(). Do so. Reviewed-by: Claudiu Beznea Signed-off-by: Conor Dooley Signed-off-by: Jakub Kicinski drivers/net/ethernet/cadence/macb_main.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 649bef9c7663f23f8813b8b26d615ffc0df64787 Author: Conor Dooley Date: Wed Jul 6 10:51:27 2022 +0100 net: macb: unify macb_config alignment style The various macb_config structs have taken different approaches to alignment when broken over newlines. Pick one style and make them match. Reviewed-by: Claudiu Beznea Signed-off-by: Conor Dooley Signed-off-by: Jakub Kicinski drivers/net/ethernet/cadence/macb_main.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 8aad66aa59be53e7bc5d0591db1a8147049dba4c Author: Conor Dooley Date: Wed Jul 6 10:51:26 2022 +0100 net: macb: add polarfire soc reset support To date, the Microchip PolarFire SoC (MPFS) has been using the cdns,macb compatible, however the generic device does not have reset support. Add a new compatible & .data for MPFS to hook into the reset functionality added for zynqmp support (and make the zynqmp init function generic in the process). Reviewed-by: Claudiu Beznea Signed-off-by: Conor Dooley Signed-off-by: Jakub Kicinski drivers/net/ethernet/cadence/macb_main.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit b09c6f8ff73157b5359eb5c1473d8d3678b2409e Author: Conor Dooley Date: Wed Jul 6 10:51:25 2022 +0100 dt-bindings: net: cdns,macb: document polarfire soc's macb Until now the PolarFire SoC (MPFS) has been using the generic "cdns,macb" compatible but has optional reset support. Add a specific compatible which falls back to the currently used generic binding. Acked-by: Rob Herring Reviewed-by: Claudiu Beznea Signed-off-by: Conor Dooley Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/cdns,macb.yaml | 1 + 1 file changed, 1 insertion(+) commit a2b6111b55f3d1b8d303e986db9d761571793aba Author: Justin Stitt Date: Wed Jul 6 16:08:33 2022 -0700 net: l2tp: fix clang -Wformat warning When building with clang we encounter this warning: | net/l2tp/l2tp_ppp.c:1557:6: error: format specifies type 'unsigned | short' but the argument has type 'u32' (aka 'unsigned int') | [-Werror,-Wformat] session->nr, session->ns, Both session->nr and session->ns are of type u32. The format specifier previously used is `%hu` which would truncate our unsigned integer from 32 to 16 bits. This doesn't seem like intended behavior, if it is then perhaps we need to consider suppressing the warning with pragma clauses. This patch should get us closer to the goal of enabling the -Wformat flag for Clang builds. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Justin Stitt Acked-by: Guillaume Nault Link: https://lore.kernel.org/r/20220706230833.535238-1-justinstitt@google.com Signed-off-by: Jakub Kicinski net/l2tp/l2tp_ppp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d202d1496a0be94100d8cbc2b658dcd980a3edf Author: Daniel Latypov Date: Mon Jun 27 22:14:46 2022 +0000 kunit: add coverage_uml.config to enable GCOV on UML Now that kunit.py's --kunitconfig is repeatable, let's create a file to hold the various options needed to enable coverage under UML. This can be used like so: $ ./tools/testing/kunit/kunit.py run \ --kunitconfig=tools/testing/kunit/configs/all_tests_uml.config \ --kunitconfig=tools/testing/kunit/configs/coverage_uml.config \ --make_options=CC=/usr/bin/gcc-6 which on my system is enough to get coverage working [1]. This is still a clunky command, but far better than before. [1] at the time of this commit, I get: Overall coverage rate: lines......: 11.6% (34112 of 295033 lines) functions..: 15.3% (3721 of 24368 functions) Signed-off-by: Daniel Latypov Reviewed-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan Documentation/dev-tools/kunit/running_tips.rst | 3 +-- tools/testing/kunit/configs/coverage_uml.config | 11 +++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) commit 8a7c6f859a20ca36a9e3ce71662de697898c9ef5 Author: Daniel Latypov Date: Mon Jun 27 22:14:44 2022 +0000 kunit: tool: refactor internal kconfig handling, allow overriding Currently, you cannot ovewrwrite what's in your kunitconfig via --kconfig_add. Nor can you override something in a qemu_config via either means. This patch makes it so we have this level of priority * --kconfig_add * kunitconfig file (the default or the one from --kunitconfig) * qemu_config The rationale for this order is that the more "dynamic" sources of kconfig options should take priority. --kconfig_add is obviously the most dynamic. And for kunitconfig, users probably tweak the file manually or specify --kunitconfig more often than they delve into qemu_config python files. And internally, we convert the kconfigs from a python list into a set or dict fairly often. We should just use a dict internally. We exposed the set transform in the past since we didn't define __eq__, so also take the chance to shore up the kunit_kconfig.Kconfig interface. Example ======= Let's consider the unrealistic example where someone would want to disable CONFIG_KUNIT. I.e. they run $ ./tools/testing/kunit/kunit.py config --kconfig_add=CONFIG_KUNIT=n Before ------ We'd write the following > # CONFIG_KUNIT is not set > CONFIG_KUNIT_ALL_TESTS=y > CONFIG_KUNIT_TEST=y > CONFIG_KUNIT=y > CONFIG_KUNIT_EXAMPLE_TEST=y And we'd error out with > ERROR:root:Not all Kconfig options selected in kunitconfig were in the generated .config. > This is probably due to unsatisfied dependencies. > Missing: # CONFIG_KUNIT is not set After ----- We'd write the following > # CONFIG_KUNIT is not set > CONFIG_KUNIT_TEST=y > CONFIG_KUNIT_ALL_TESTS=y > CONFIG_KUNIT_EXAMPLE_TEST=y And we'd error out with > ERROR:root:Not all Kconfig options selected in kunitconfig were in the generated .config. > This is probably due to unsatisfied dependencies. > Missing: CONFIG_KUNIT_EXAMPLE_TEST=y, CONFIG_KUNIT_TEST=y, CONFIG_KUNIT_ALL_TESTS=y Signed-off-by: Daniel Latypov Reviewed-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan tools/testing/kunit/kunit_config.py | 45 +++++++++++++++++++--------------- tools/testing/kunit/kunit_kernel.py | 20 ++++++++------- tools/testing/kunit/kunit_tool_test.py | 45 ++++++++++++++-------------------- 3 files changed, 54 insertions(+), 56 deletions(-) commit d810d367ec40a1031173a447bd0146cf48e98733 Author: Jie Wang Date: Tue Jul 5 19:35:15 2022 +0800 net: page_pool: optimize page pool page allocation in NUMA scenario Currently NIC packet receiving performance based on page pool deteriorates occasionally. To analysis the causes of this problem page allocation stats are collected. Here are the stats when NIC rx performance deteriorates: bandwidth(Gbits/s) 16.8 6.91 rx_pp_alloc_fast 13794308 21141869 rx_pp_alloc_slow 108625 166481 rx_pp_alloc_slow_h 0 0 rx_pp_alloc_empty 8192 8192 rx_pp_alloc_refill 0 0 rx_pp_alloc_waive 100433 158289 rx_pp_recycle_cached 0 0 rx_pp_recycle_cache_full 0 0 rx_pp_recycle_ring 362400 420281 rx_pp_recycle_ring_full 6064893 9709724 rx_pp_recycle_released_ref 0 0 The rx_pp_alloc_waive count indicates that a large number of pages' numa node are inconsistent with the NIC device numa node. Therefore these pages can't be reused by the page pool. As a result, many new pages would be allocated by __page_pool_alloc_pages_slow which is time consuming. This causes the NIC rx performance fluctuations. The main reason of huge numa mismatch pages in page pool is that page pool uses alloc_pages_bulk_array to allocate original pages. This function is not suitable for page allocation in NUMA scenario. So this patch uses alloc_pages_bulk_array_node which has a NUMA id input parameter to ensure the NUMA consistent between NIC device and allocated pages. Repeated NIC rx performance tests are performed 40 times. NIC rx bandwidth is higher and more stable compared to the datas above. Here are three test stats, the rx_pp_alloc_waive count is zero and rx_pp_alloc_slow which indicates pages allocated from slow patch is relatively low. bandwidth(Gbits/s) 93 93.9 93.8 rx_pp_alloc_fast 60066264 61266386 60938254 rx_pp_alloc_slow 16512 16517 16539 rx_pp_alloc_slow_ho 0 0 0 rx_pp_alloc_empty 16512 16517 16539 rx_pp_alloc_refill 473841 481910 481585 rx_pp_alloc_waive 0 0 0 rx_pp_recycle_cached 0 0 0 rx_pp_recycle_cache_full 0 0 0 rx_pp_recycle_ring 29754145 30358243 30194023 rx_pp_recycle_ring_full 0 0 0 rx_pp_recycle_released_ref 0 0 0 Signed-off-by: Jie Wang Acked-by: Jesper Dangaard Brouer Acked-by: Ilias Apalodimas Link: https://lore.kernel.org/r/20220705113515.54342-1-huangguangbin2@huawei.com Signed-off-by: Jakub Kicinski net/core/page_pool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a9333bd344ad6eaf942221e0497ed65ec3224052 Author: Daniel Latypov Date: Wed May 18 10:01:24 2022 -0700 kunit: tool: introduce --qemu_args Example usage: $ ./tools/testing/kunit/kunit.py run --arch=x86_64 \ --kconfig_add=CONFIG_SMP=y --qemu_args='-smp 8' Looking in the test.log, one can see > smp: Bringing up secondary CPUs ... > .... node #0, CPUs: #1 #2 #3 #4 #5 #6 #7 > smp: Brought up 1 node, 8 CPUs This flag would allow people to make tweaks like this without having to create custom qemu_config files. For consistency with --kernel_args, we allow users to repeat this argument, e.g. you can tack on a --qemu_args='-m 2048', or you could just append it to the first string ('-smp 8 -m 2048'). Signed-off-by: Daniel Latypov Reviewed-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan tools/testing/kunit/kunit.py | 14 +++++++++++++- tools/testing/kunit/kunit_kernel.py | 10 +++++++--- tools/testing/kunit/kunit_tool_test.py | 20 +++++++++++++++++--- 3 files changed, 37 insertions(+), 7 deletions(-) commit 8c278d97ad721442692e610007494e8e18cc0288 Author: Daniel Latypov Date: Wed May 18 10:01:23 2022 -0700 kunit: tool: simplify creating LinuxSourceTreeOperations Drop get_source_tree_ops() and just call what used to be get_source_tree_ops_from_qemu_config() in both cases. Also rename the functions to have shorter names and add a "_" prefix to note they're not meant to be used outside this function. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan tools/testing/kunit/kunit_kernel.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 9241bc818d54b9cb7d1c9a28f26afa58e6d0bb7c Author: Daniel Latypov Date: Fri May 13 11:10:32 2022 -0700 kunit: tool: cosmetic: don't specify duplicate kernel cmdline options Context: When using a non-UML arch, kunit.py will boot the test kernel with options like these by default (this is x86_64): > mem=1G console=tty kunit_shutdown=halt console=ttyS0 kunit_shutdown=reboot The first three options are added unconditionally but are only intended for UML. 1. 'mem=1G' is redundant with the '-m 1024' that we hard-code into the qemu commandline. 2. We specify a 'console' for all tools/testing/kunit/qemu_configs/*.py already, so 'console=tty' gets overwritten. 3. For QEMU, we need to use 'reboot', and for UML we need to use 'halt'. If you switch them, kunit.py will hang until the --timeout expires. This patch: Having these duplicate options is a bit noisy. Switch so we only add UML-specific options for UML. I.e. we now get UML: 'mem=1G console=tty kunit_shutdown=halt' (unchanged) x86_64: 'console=ttyS0 kunit_shutdown=reboot' Side effect: you can't overwrite these options on UML w/ --kernel_arg. But you already couldn't for QEMU (console, kunit_shutdown), and why would you want to? Signed-off-by: Daniel Latypov Reviewed-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan tools/testing/kunit/kunit_kernel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e756dbebd95d7ea7ae2a2343e8924eee10ec6253 Author: Daniel Latypov Date: Mon May 16 12:47:30 2022 -0700 kunit: tool: refactoring printing logic into kunit_printer.py Context: * kunit_kernel.py is importing kunit_parser.py just to use the print_with_timestamp() function * the parser is directly printing to stdout, which will become an issue if we ever try to run multiple kernels in parallel This patch introduces a kunit_printer.py file and migrates callers of kunit_parser.print_with_timestamp() to call kunit_printer.stdout.print_with_timestamp() instead. Future changes: If we want to support showing results for parallel runs, we could then create new Printer's that don't directly write to stdout and refactor the code to pass around these Printer objects. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan tools/testing/kunit/kunit.py | 17 ++++----- tools/testing/kunit/kunit_kernel.py | 8 ++--- tools/testing/kunit/kunit_parser.py | 63 ++++++++++------------------------ tools/testing/kunit/kunit_printer.py | 48 ++++++++++++++++++++++++++ tools/testing/kunit/kunit_tool_test.py | 4 +-- 5 files changed, 82 insertions(+), 58 deletions(-) commit 8a04930f2bb0047de4ae18af12e5731084bd555c Author: Daniel Latypov Date: Mon May 16 12:47:29 2022 -0700 kunit: tool: redo how we construct and mock LinuxSourceTree Our main function currently has an optional `linux` argument which is used to by our unit tests to inject a mock. We currently have the same code copy-pasted several times to do if not linux: linux = MakeRealInstance(cli_args.foo, cli_args.bar, ...) But in python, dependency injection isn't necessary or idiomatic when we can just use mock.patch() to mock things out. This change 1. adds a helper to create a LinuxSourceTree from the cli_args 2. drops the `linux` parameter in favor of mocking the __init__ func. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan tools/testing/kunit/kunit.py | 49 +++++----------- tools/testing/kunit/kunit_tool_test.py | 103 ++++++++++++++++----------------- 2 files changed, 65 insertions(+), 87 deletions(-) commit 76f0d6f581693fbfd1be82aadc28fb52e33000fd Author: Daniel Latypov Date: Mon May 16 12:47:28 2022 -0700 kunit: tool: drop unused load_config argument It's always set to true except in one test case. And in that test case it can safely be set to true anyways. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan tools/testing/kunit/kunit_kernel.py | 4 ---- tools/testing/kunit/kunit_tool_test.py | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) commit d2fbdde838f270377de4fc20e919aac3941ea55f Author: Daniel Latypov Date: Mon May 16 09:54:46 2022 -0700 kunit: use kmemdup in kunit_filter_tests(), take suite as const kmemdup() is easier than kmalloc() + memcpy(), per lkp bot. Also make the input `suite` as const since we're now always making copies after commit a127b154a8f2 ("kunit: tool: allow filtering test cases via glob"). Reported-by: kernel test robot Signed-off-by: Daniel Latypov Reviewed-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan lib/kunit/executor.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 88d319c6abaeb37f0e2323275eaf57a8388e0265 Author: Conor Dooley Date: Tue Jul 5 20:04:35 2022 +0100 riscv: dts: microchip: Add mpfs' topology information The mpfs has no cpu-map node, so tools like hwloc cannot correctly parse the topology. Add the node using the existing node labels. Reported-by: Brice Goglin Link: https://github.com/open-mpi/hwloc/issues/536 Signed-off-by: Conor Dooley Reviewed-by: Sudeep Holla arch/riscv/boot/dts/microchip/mpfs.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 9821106213c826f9c3dbccb617ce76f8981c8aba Author: Jiang Jian Date: Wed Jul 6 17:59:40 2022 +0200 scsi: zfcp: Drop redundant "the" in the comments There is an unexpected word "the" in the comments that needs to be dropped. file: ./drivers/s390/scsi/zfcp_diag.h line: 5 * Definitions for handling diagnostics in the the zfcp device driver. changed to * Definitions for handling diagnostics in the zfcp device driver. Link: https://lore.kernel.org/r/20220621114207.106405-1-jiangjian@cdjrlc.com Link: https://lore.kernel.org/r/4c02fefa19ab46f0f163990bde3ce10bd9c7caf1.1657122360.git.bblock@linux.ibm.com Reviewed-by: Benjamin Block Signed-off-by: Jiang Jian Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_diag.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9787bdfdba5ab0e558e3d142b1c2f6a54cbf6b1 Author: Julian Wiedmann Date: Wed Jul 6 17:59:39 2022 +0200 scsi: zfcp: Declare zfcp_sdev_attrs as static These attributes are now only accessed through the zfcp_sysfs_sdev_attr_group. Link: https://lore.kernel.org/r/0791b9149ebfa39e6b8eab093113cd2527dbf3d3.1657122360.git.bblock@linux.ibm.com Fixes: d8d7cf3f7d07 ("scsi: zfcp: Switch to attribute groups") Reviewed-by: Benjamin Block Signed-off-by: Julian Wiedmann Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 174e909b5435d3f840067f36c4915a618d44b6bb Author: Junwoo Lee Date: Tue Jul 5 17:35:38 2022 +0900 scsi: ufs: Skip last hci reset to get valid register values Once the host link startup fails 3 times, all host registers are reset to default values except in ufshcd_hba_enable(). The ufs host controller is disabled and enabled in ufshcd_hba_enable(). Consequently we need to skip last hci reset to get valid host register values. e.g. [ 1.898026] [2: kworker/u16:2: 211] ufs: link startup failed 1 [ 1.898133] [2: kworker/u16:2: 211] host_regs: 00000000: 1383ff1f 00000000 00000300 00000000 [ 1.898141] [2: kworker/u16:2: 211] host_regs: 00000010: 00000106 000001ce 00000000 00000000 [ 1.898148] [2: kworker/u16:2: 211] host_regs: 00000020: 00000000 00000470 00000000 00000000 [ 1.898155] [2: kworker/u16:2: 211] host_regs: 00000030: 00000008 00000003 00000000 00000000 [ 1.898163] [2: kworker/u16:2: 211] host_regs: 00000040: 00000000 00000000 00000000 00000000 [ 1.898171] [2: kworker/u16:2: 211] host_regs: 00000050: 00000000 00000000 00000000 00000000 [ 1.898177] [2: kworker/u16:2: 211] host_regs: 00000060: 00000000 00000000 00000000 00000000 [ 1.898186] [2: kworker/u16:2: 211] host_regs: 00000070: 00000000 00000000 00000000 00000000 [ 1.898194] [2: kworker/u16:2: 211] host_regs: 00000080: 00000000 00000000 00000000 00000000 [ 1.898201] [2: kworker/u16:2: 211] host_regs: 00000090: 00000000 00000000 00000000 00000000 Link: https://lore.kernel.org/r/20220705083538.15143-1-sh043.lee@samsung.com Reviewed-by: Avri Altman Signed-off-by: Junwoo Lee Signed-off-by: Seunghui Lee Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1466b3bc456a04c2eecb639d303b91ca8ef02c33 Author: Daniil Lunev Date: Tue Jul 5 16:53:26 2022 +1000 scsi: ufs: ufs-pci: Enable WriteBooster capability on ADL Sets the WriteBooster capability flag when ADL's UFS controller is used. Link: https://lore.kernel.org/r/20220705165316.v2.1.Ib5ebec952d9a59f5c69c89b694777f517d22466d@changeid Acked-by: Adrian Hunter Signed-off-by: Daniil Lunev Signed-off-by: Martin K. Petersen drivers/ufs/host/ufshcd-pci.c | 1 + 1 file changed, 1 insertion(+) commit b3d11f195cbbe665c100b964f6837984b4226cd1 Author: James Smart Date: Fri Jul 1 14:14:25 2022 -0700 scsi: lpfc: Copyright updates for 14.2.0.5 patches Update copyrights to 2022 for files modified in the 14.2.0.5 patch set. Link: https://lore.kernel.org/r/20220701211425.2708-13-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_bsg.h | 2 +- drivers/scsi/lpfc/lpfc_debugfs.c | 2 +- drivers/scsi/lpfc/lpfc_ids.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 71faf8d30fdb7c0ea88caa785e97ed697f048f14 Author: James Smart Date: Fri Jul 1 14:14:24 2022 -0700 scsi: lpfc: Update lpfc version to 14.2.0.5 Update lpfc version to 14.2.0.5 Link: https://lore.kernel.org/r/20220701211425.2708-12-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f86d2b84708752f7667f9d7b9e370125d2004e8 Author: James Smart Date: Fri Jul 1 14:14:23 2022 -0700 scsi: lpfc: Remove Menlo/Hornet related code The Menlo/Hornet adapter was never released to the field. As such, driver code specific to the adapter is unnecessary and should be removed. Link: https://lore.kernel.org/r/20220701211425.2708-11-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 7 - drivers/scsi/lpfc/lpfc_attr.c | 27 +--- drivers/scsi/lpfc/lpfc_bsg.c | 324 --------------------------------------- drivers/scsi/lpfc/lpfc_bsg.h | 12 -- drivers/scsi/lpfc/lpfc_els.c | 9 -- drivers/scsi/lpfc/lpfc_hbadisc.c | 57 +------ drivers/scsi/lpfc/lpfc_hw.h | 10 -- drivers/scsi/lpfc/lpfc_ids.h | 2 - drivers/scsi/lpfc/lpfc_init.c | 13 -- drivers/scsi/lpfc/lpfc_sli.c | 10 -- drivers/scsi/lpfc/lpfc_sli.h | 1 - 11 files changed, 7 insertions(+), 465 deletions(-) commit b21c9deb1479bcbeea8b06c490a815690c7c86e9 Author: James Smart Date: Fri Jul 1 14:14:22 2022 -0700 scsi: lpfc: Refactor lpfc_nvmet_prep_abort_wqe() into lpfc_sli_prep_abort_xri() lpfc_nvmet_prep_abort_wqe() has a lot of common code with lpfc_sli_prep_abort_xri(). Delete lpfc_nvmet_prep_abort_wqe() as the wqe can be filled out using the generic lpfc_sli_prep_abort_xri routine(). Add the wqec option to lpfc_sli_prep_abort_xri() for lpfc_nvmet_prep_abort_wqe(). Link: https://lore.kernel.org/r/20220701211425.2708-10-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 3 ++- drivers/scsi/lpfc/lpfc_crtn.h | 2 +- drivers/scsi/lpfc/lpfc_hw4.h | 1 - drivers/scsi/lpfc/lpfc_nvmet.c | 48 +++++------------------------------------- drivers/scsi/lpfc/lpfc_sli.c | 16 ++++++++------ 5 files changed, 18 insertions(+), 52 deletions(-) commit ffc566411aded3c12c63e1310fb23830e9608c59 Author: James Smart Date: Fri Jul 1 14:14:21 2022 -0700 scsi: lpfc: Revert RSCN_MEMENTO workaround for misbehaved configuration The RSCN_MEMENTO logic was to workaround a target that does not register both FCP and NVMe FC4 types at the same time. This caused the configuration to not produce a second RSCN for the NVMe FC4 type registration in a timely manner. The intention of the RSCN_MEMENTO flag was to always signal to try NVMe PRLI. However, there are other FCP-only target arrays in correctly behaved configurations that reject the NVMe PRLI followed by a LOGO leading to never rediscovering the target after an issue_lip (as LOGO causes a repeat of PLOGI/PRLIs). Revert the RSCN_MEMENTO patch as it is causing correctly behaved configs to fail while it exists only to succeed on a misbehaved config. Link: https://lore.kernel.org/r/20220701211425.2708-9-jsmart2021@gmail.com Fixes: 1045592fc968 ("scsi: lpfc: Introduce FC_RSCN_MEMENTO flag for tracking post RSCN completion") Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 1 - drivers/scsi/lpfc/lpfc_els.c | 8 ++------ drivers/scsi/lpfc/lpfc_hbadisc.c | 3 +-- 3 files changed, 3 insertions(+), 9 deletions(-) commit ea92e173dc55460f1b9e71df5ceac951c506d214 Author: James Smart Date: Fri Jul 1 14:14:20 2022 -0700 scsi: lpfc: Fix lost NVMe paths during LIF bounce stress test During a target link bounce test, the driver sees a mismatch between the NPortId and the WWPN on the node structures (ndlps) involved. When this occurs, the driver "swaps" the ndlp and new_ndlp node parameters to restore WWPN/DID uniqueness in the fc_nodes list per vport. However, the driver neglected to swap the nlp_fc4_type in the ndlp passed to lpfc_plogi_confirm_nport causing a failure to recover the NVMe PLOGI/PRLI and ultimately the NVMe paths. Correct confirm_nport to preserve the fc4 types from the new-ndlp when the data is moved over ot the ndlp structure. Link: https://lore.kernel.org/r/20220701211425.2708-8-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 43e19a96a7895f5588ffc6bf9768f362ae3af70e Author: James Smart Date: Fri Jul 1 14:14:19 2022 -0700 scsi: lpfc: Fix attempted FA-PWWN usage after feature disable Disabling FA-PWWN should be effective after port reset, but in some cases it was found to be impossible to clear FA-PWWN usage without a driver reload. Clean up FA-PWWN flag management to make enable and disable of the feature more robust. Link: https://lore.kernel.org/r/20220701211425.2708-7-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 6 +++++- drivers/scsi/lpfc/lpfc_sli.c | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) commit 2f67dc7970bce3529edce93a0a14234d88b3fcd5 Author: James Smart Date: Fri Jul 1 14:14:18 2022 -0700 scsi: lpfc: Fix possible memory leak when failing to issue CMF WQE There is no corresponding free routine if lpfc_sli4_issue_wqe fails to issue the CMF WQE in lpfc_issue_cmf_sync_wqe. If ret_val is non-zero, then free the iocbq request structure. Link: https://lore.kernel.org/r/20220701211425.2708-6-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0948a9c5386095baae4012190a6b65aba684a907 Author: James Smart Date: Fri Jul 1 14:14:17 2022 -0700 scsi: lpfc: Remove extra atomic_inc on cmd_pending in queuecommand after VMID VMID introduced an extra increment of cmd_pending, causing double-counting of the I/O. The normal increment ios performed in lpfc_get_scsi_buf. Link: https://lore.kernel.org/r/20220701211425.2708-5-jsmart2021@gmail.com Fixes: 33c79741deaf ("scsi: lpfc: vmid: Introduce VMID in I/O path") Cc: # v5.14+ Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_scsi.c | 1 - 1 file changed, 1 deletion(-) commit 35251b4d79db4ca2efeb63d6bc8fc463aa867156 Author: James Smart Date: Fri Jul 1 14:14:16 2022 -0700 scsi: lpfc: Set PU field when providing D_ID in XMIT_ELS_RSP64_CX iocb When providing a D_ID in XMIT_ELS_RSP64_CX iocb the PU field should be set to 3 to describe the parameter being passed to firmware. Link: https://lore.kernel.org/r/20220701211425.2708-4-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 1 + 1 file changed, 1 insertion(+) commit f8191d40aa612981ce897e66cda6a88db8df17bb Author: James Smart Date: Fri Jul 1 14:14:15 2022 -0700 scsi: lpfc: Prevent buffer overflow crashes in debugfs with malformed user input Malformed user input to debugfs results in buffer overflow crashes. Adapt input string lengths to fit within internal buffers, leaving space for NULL terminators. Link: https://lore.kernel.org/r/20220701211425.2708-3-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_debugfs.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 4ecc9b0271a7623deabcbe8fcb39f065701d8f74 Author: James Smart Date: Fri Jul 1 14:14:14 2022 -0700 scsi: lpfc: Fix uninitialized cqe field in lpfc_nvme_cancel_iocb() In lpfc_nvme_cancel_iocb(), a cqe is created locally from stack storage. The code didn't initialize the total_data_placed word, inheriting stack content. Initialize the total_data_placed word. Link: https://lore.kernel.org/r/20220701211425.2708-2-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 1 + 1 file changed, 1 insertion(+) commit 11e50ed239b5b7f383874dd737283ae93f62ece3 Merge: 88f1669019bd fce54ed02757 Author: Martin K. Petersen Date: Thu Jul 7 17:20:43 2022 -0400 Merge branch '5.19/scsi-fixes' into 5.20/scsi-staging Bring in fixes to resolve a merge conflict in the lpfc driver update. Signed-off-by: Martin K. Petersen commit 066ab294504fe868eb90d8d34b3eeab9785d33f0 Author: Sebastian Reichel Date: Thu Jun 23 18:31:36 2022 +0200 dt-bindings: i2c: i2c-rk3x: add rk3588 compatible Just like RK356x, RK3588 is compatible to the existing rk3399 binding. Signed-off-by: Sebastian Reichel Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-rk3x.yaml | 1 + 1 file changed, 1 insertion(+) commit 88f1669019bd62b3009a3cebf772fbaaa21b9f38 Author: Bart Van Assche Date: Thu Jun 30 12:57:03 2022 -0700 scsi: sd: Rework asynchronous resume support For some technologies, e.g. an ATA bus, resuming can take multiple seconds. Waiting for resume to finish can cause a very noticeable delay. Hence this commit that restores the behavior from before "scsi: core: pm: Rely on the device driver core for async power management" for most SCSI devices. This commit introduces a behavior change: if the START command fails, do not consider this as a SCSI disk resume failure. Link: https://bugzilla.kernel.org/show_bug.cgi?id=215880 Link: https://lore.kernel.org/r/20220630195703.10155-3-bvanassche@acm.org Fixes: a19a93e4c6a9 ("scsi: core: pm: Rely on the device driver core for async power management") Cc: Ming Lei Cc: Hannes Reinecke Cc: John Garry Cc: ericspero@icloud.com Cc: jason600.groome@gmail.com Tested-by: jason600.groome@gmail.com Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 84 +++++++++++++++++++++++++++++++++++++++++++------------ drivers/scsi/sd.h | 5 ++++ 2 files changed, 71 insertions(+), 18 deletions(-) commit 90552cd2d1f962478f1bb426c686540cbd145bec Author: Bart Van Assche Date: Thu Jun 30 12:57:02 2022 -0700 scsi: core: Move the definition of SCSI_QUEUE_DELAY Move the definition of SCSI_QUEUE_DELAY to just above the function that uses it. Link: https://lore.kernel.org/r/20220630195703.10155-2-bvanassche@acm.org Cc: Ming Lei Cc: Hannes Reinecke Cc: John Garry Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 2a8ed7ef00b939fbcc98b948f780bd03bafed227 Merge: ff4f65e4ddce 6577067d7f04 204b394a23ad Author: Alex Williamson Date: Thu Jul 7 15:05:13 2022 -0600 Merge branches 'v5.20/vfio/spapr_tce-unused-arg-v1', 'v5.20/vfio/comment-typo-v1' and 'v5.20/vfio/vfio-ccw-rework-v4' into v5.20/vfio/next commit acd1a2786c568ee7c254eda9c60eabc401d13c04 Author: Jiapeng Chong Date: Thu Jun 30 15:41:52 2022 +0800 scsi: megaraid_sas: Clean up some inconsistent indenting This was found by coccicheck: drivers/scsi/megaraid/megaraid_sas_base.c:3950 process_fw_state_change_wq() warn: inconsistent indenting. Link: https://lore.kernel.org/r/20220630074152.29171-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 158da6bcae7a66e631bbec458f35ea3bd0ac5d71 Author: Michael Schmitz Date: Thu Jun 30 15:33:02 2022 +1200 scsi: gvp11: Convert m68k WD33C93 drivers to DMA API Use dma_map_single() for gvp11 driver (leave bounce buffer logic unchanged). Use dma_set_mask_and_coherent() to avoid explicit cache flushes. Compile-tested only. CC: linux-scsi@vger.kernel.org Link: https://lore.kernel.org/r/6d1d88ee-1cf6-c735-1e6d-bafd2096e322@gmail.com Link: https://lore.kernel.org/r/20220630033302.3183-4-schmitzmic@gmail.com Reviewed-by: Arnd Bergmann Signed-off-by: Michael Schmitz Signed-off-by: Martin K. Petersen -- Changes from v1: Arnd Bergmann: - reorder bounce buffer copy and dma mapping drivers/scsi/gvp11.c | 95 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 77 insertions(+), 18 deletions(-) commit 479accbbb8398a31e716d40d4d6ccce089f3de86 Author: Michael Schmitz Date: Thu Jun 30 15:33:01 2022 +1200 scsi: a2091: Convert m68k WD33C93 drivers to DMA API Use dma_map_single() for a2091 driver (leave bounce buffer logic unchanged). Use dma_set_mask_and_coherent() to avoid explicit cache flushes. Compile-tested only. CC: linux-scsi@vger.kernel.org Link: https://lore.kernel.org/r/6d1d88ee-1cf6-c735-1e6d-bafd2096e322@gmail.com Link: https://lore.kernel.org/r/20220630033302.3183-3-schmitzmic@gmail.com Reviewed-by: Arnd Bergmann Signed-off-by: Michael Schmitz Signed-off-by: Martin K. Petersen -- Changes from v1: Arnd Bergmann: - reorder mapping and bounce buffer copy drivers/scsi/a2091.c | 63 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 15 deletions(-) commit e214806d52b808ee744672f3ebae8817e760ad65 Author: Michael Schmitz Date: Thu Jun 30 15:33:00 2022 +1200 scsi: a3000: Convert m68k WD33C93 drivers to DMA API Use dma_map_single() for a3000 driver (leave bounce buffer logic unchanged). Use dma_set_mask_and_coherent() to avoid explicit cache flushes. Compile-tested only. CC: linux-scsi@vger.kernel.org Link: https://lore.kernel.org/r/6d1d88ee-1cf6-c735-1e6d-bafd2096e322@gmail.com Link: https://lore.kernel.org/r/20220630033302.3183-2-schmitzmic@gmail.com Reviewed-by: Arnd Bergmann Signed-off-by: Michael Schmitz Signed-off-by: Martin K. Petersen -- Changes from v1: - restore bounce buffer allocation (dropped in v1) Arnd Bergmann: - reorder dma mapping and bounce buffer copy drivers/scsi/a3000.c | 53 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 9 deletions(-) commit a2417db3679cffa67fbdc6c175cf68ffc86b8ac3 Author: Li Zhijian Date: Thu Jun 30 02:38:11 2022 +0000 scsi: core: Shorten long warning messages sdev_printk() will only accept messages up to 128 bytes. Shorten strings exceeding 128 bytes avoid printing an incomplete sentence like: [ 475.156955] sd 9:0:0:0: Warning! Received an indication that the LUN assignments on this target have changed. The Linux SCSI layer does not automatical Link: https://lore.kernel.org/r/20220630024516.1571209-1-lizhijian@fujitsu.com Suggested-by: Finn Thain Reviewed-by: Bart Van Assche Signed-off-by: Li Zhijian Signed-off-by: Martin K. Petersen drivers/scsi/scsi_error.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 64a6f1c4987e027339818b9d142257e7ede6dfe0 Author: Conor Dooley Date: Wed Jul 6 15:13:13 2022 +0100 i2c: add support for microchip fpga i2c controllers Add Microchip CoreI2C i2c controller support. This driver supports the "hard" i2c controller on the Microchip PolarFire SoC & the basic feature set for "soft" i2c controller implemtations in the FPGA fabric. Co-developed-by: Daire McNamara Signed-off-by: Daire McNamara Signed-off-by: Conor Dooley Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 11 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-microchip-corei2c.c | 480 +++++++++++++++++++++++++++++ 3 files changed, 492 insertions(+) commit 34bd1dcacf0dd86ab8c35f703bc237723fee354c Author: Mike Christie Date: Tue Jun 28 15:02:30 2022 -0500 scsi: target: Detect UNMAP support post configuration On our backend we can do something similar to LIO where we can enable and disable UNMAP support on the fly. In the SCSI/block layer we can detect this by just doing a rescan. However, LIO cannot detect this change because we only check during the initial configuration. This patch allows UNMAP detection to also happen when the user tries to turn it on. Link: https://lore.kernel.org/r/20220628200230.15052-6-michael.christie@oracle.com Reviewed-by: Christoph Hellwig Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_configfs.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit 33efaaf6e24b68c15e08a12477c8610b5e1334d7 Author: Mike Christie Date: Tue Jun 28 15:02:29 2022 -0500 scsi: target: Add file configure_unmap callout Move file's UNMAP setup code to a configure_unmap callout. Link: https://lore.kernel.org/r/20220628200230.15052-5-michael.christie@oracle.com Reviewed-by: Christoph Hellwig Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_file.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit d7c382c51d0379f38eee270db575018094826c73 Author: Mike Christie Date: Tue Jun 28 15:02:28 2022 -0500 scsi: target: Add iblock configure_unmap callout Move iblock's UNMAP setup code to a configure_unmap callout. Link: https://lore.kernel.org/r/20220628200230.15052-4-michael.christie@oracle.com Reviewed-by: Christoph Hellwig Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_iblock.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 6b206a5a8c2912c3c2174c5afc2f6e798d6ad212 Author: Mike Christie Date: Tue Jun 28 15:02:27 2022 -0500 scsi: target: Add callout to configure UNMAP settings Add a callout to configure a backend's UNMAP settings. This will be used to allow userspace to configure UNMAP after the initial device setup, similar to how we can set up the other attributes post device configuration. Link: https://lore.kernel.org/r/20220628200230.15052-3-michael.christie@oracle.com Reviewed-by: Christoph Hellwig Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_device.c | 6 ++++++ include/target/target_core_backend.h | 1 + 2 files changed, 7 insertions(+) commit 036d8903f03b662bbdce5e32525bd2931b14c420 Author: Mike Christie Date: Tue Jun 28 15:02:26 2022 -0500 scsi: target: Remove incorrect zero blocks WRITE_SAME check We use WSNZ=1 so if we get a WRITE_SAME with zero logical blocks we are supposed to fail it. We do this check and failure in target_core_sbc.c before calling into the backend, so we can remove the incorrect check in target_core_file. Link: https://lore.kernel.org/r/20220628200230.15052-2-michael.christie@oracle.com Reviewed-by: Christoph Hellwig Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_file.c | 4 ---- 1 file changed, 4 deletions(-) commit d29ea7b71621f42a9580f1c65f3b822dfd593137 Author: Sreekanth Reddy Date: Tue Jun 28 13:18:48 2022 +0530 scsi: mpi3mr: Increase cmd_per_lun to 128 Increase cmd_per_lun to 128. Link: https://lore.kernel.org/r/20220628074848.5036-3-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen drivers/scsi/mpi3mr/mpi3mr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 465191d6526a8ea21ef9f5533aad24b8f531b879 Author: Sreekanth Reddy Date: Tue Jun 28 13:18:47 2022 +0530 scsi: mpi3mr: Enable shared host tagset Enable shared host tagset to make sure that total outstanding I/O count can not exceed controller's can_queue setting. Link: https://lore.kernel.org/r/20220628074848.5036-2-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen drivers/scsi/mpi3mr/mpi3mr_os.c | 2 ++ 1 file changed, 2 insertions(+) commit 204b394a23ad5e30944f23518e21e844614da2ff Author: Eric Farman Date: Thu Jul 7 15:57:37 2022 +0200 vfio/ccw: Move FSM open/close to MDEV open/close Part of the confusion that has existed is the FSM lifecycle of subchannels between the common CSS driver and the vfio-ccw driver. During configuration, the FSM state goes from NOT_OPER to STANDBY to IDLE, but then back to NOT_OPER. For example: vfio_ccw_sch_probe: VFIO_CCW_STATE_NOT_OPER vfio_ccw_sch_probe: VFIO_CCW_STATE_STANDBY vfio_ccw_mdev_probe: VFIO_CCW_STATE_IDLE vfio_ccw_mdev_remove: VFIO_CCW_STATE_NOT_OPER vfio_ccw_sch_remove: VFIO_CCW_STATE_NOT_OPER vfio_ccw_sch_shutdown: VFIO_CCW_STATE_NOT_OPER Rearrange the open/close events to align with the mdev open/close, to better manage the memory and state of the devices as time progresses. Specifically, make mdev_open() perform the FSM open, and mdev_close() perform the FSM close instead of reset (which is both close and open). This makes the NOT_OPER state a dead-end path, indicating the device is probably not recoverable without fully probing and re-configuring the device. This has the nice side-effect of removing a number of special-cases where the FSM state is managed outside of the FSM itself (such as the aforementioned mdev_close() routine). Suggested-by: Jason Gunthorpe Signed-off-by: Eric Farman Reviewed-by: Jason Gunthorpe Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20220707135737.720765-12-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_drv.c | 11 +++-------- drivers/s390/cio/vfio_ccw_fsm.c | 34 +++++++++++++++++++++++++--------- drivers/s390/cio/vfio_ccw_ops.c | 26 +++++++++++--------------- 3 files changed, 39 insertions(+), 32 deletions(-) commit bfec266c8159450720705f16208736e03812e5dc Author: Eric Farman Date: Thu Jul 7 15:57:36 2022 +0200 vfio/ccw: Refactor vfio_ccw_mdev_reset Use both the FSM Close and Open events when resetting an mdev, rather than making a separate call to cio_enable_subchannel(). Signed-off-by: Eric Farman Reviewed-by: Jason Gunthorpe Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20220707135737.720765-11-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_ops.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit f4b4ed44770221819daa19800f232a2708588c2f Author: Eric Farman Date: Thu Jul 7 15:57:35 2022 +0200 vfio/ccw: Create a CLOSE FSM event Refactor the vfio_ccw_sch_quiesce() routine to extract the bit that disables the subchannel and affects the FSM state. Use this to form the basis of a CLOSE event that will mirror the OPEN event, and move the subchannel back to NOT_OPER state. A key difference with that mirroring is that while OPEN handles the transition from NOT_OPER => STANDBY, the later probing of the mdev handles the transition from STANDBY => IDLE. On the other hand, the CLOSE event will move from one of the operating states {IDLE, CP_PROCESSING, CP_PENDING} => NOT_OPER. That is, there is no stop in a STANDBY state on the deconfigure path. Add a call to cp_free() in this event, such that it is captured for the various permutations of this event. In the unlikely event that cio_disable_subchannel() returns -EBUSY, the remaining logic of vfio_ccw_sch_quiesce() can still be used. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20220707135737.720765-10-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_drv.c | 17 +++++------------ drivers/s390/cio/vfio_ccw_fsm.c | 26 ++++++++++++++++++++++++++ drivers/s390/cio/vfio_ccw_ops.c | 14 ++------------ drivers/s390/cio/vfio_ccw_private.h | 1 + 4 files changed, 34 insertions(+), 24 deletions(-) commit 62ec0d49e683c25e35927a942c64433878de143c Author: Eric Farman Date: Thu Jul 7 15:57:34 2022 +0200 vfio/ccw: Create an OPEN FSM Event Move the process of enabling a subchannel for use by vfio-ccw into the FSM, such that it can manage the sequence of lifecycle events for the device. That is, if the FSM state is NOT_OPER(erational), then do the work that would enable the subchannel and move the FSM to STANDBY state. An attempt to perform this event again from any of the other operating states (IDLE, CP_PROCESSING, CP_PENDING) will convert the device back to NOT_OPER so the configuration process can be started again. Signed-off-by: Eric Farman Reviewed-by: Jason Gunthorpe Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20220707135737.720765-9-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_drv.c | 9 ++------- drivers/s390/cio/vfio_ccw_fsm.c | 21 +++++++++++++++++++++ drivers/s390/cio/vfio_ccw_private.h | 1 + 3 files changed, 24 insertions(+), 7 deletions(-) commit 4cc2c051c35639787de1b5797de2cd003bbc98ab Author: Eric Farman Date: Thu Jul 7 15:57:33 2022 +0200 vfio/ccw: Update trace data for not operational event We currently cut a very basic trace whenever the FSM directs control to the not operational routine. Convert this to a message, so it's alongside the other configuration related traces (create, remove, etc.), and record both the event that brought us here and the current state of the device. This will provide some better footprints if things go bad. Suggested-by: Matthew Rosato Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20220707135737.720765-8-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_fsm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 09205a7659714c14591c274fdbdfa97a20f4cef2 Author: Eric Farman Date: Thu Jul 7 15:57:32 2022 +0200 vfio/ccw: Flatten MDEV device (un)register The vfio_ccw_mdev_(un)reg routines are merely vfio-ccw routines that pass control to mdev_(un)register_device. Since there's only one caller of each, let's just call the mdev routines directly. Suggested-by: Jason Gunthorpe Signed-off-by: Eric Farman Reviewed-by: Jason Gunthorpe Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20220707135737.720765-7-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_drv.c | 4 ++-- drivers/s390/cio/vfio_ccw_ops.c | 10 ---------- drivers/s390/cio/vfio_ccw_private.h | 3 --- 3 files changed, 2 insertions(+), 15 deletions(-) commit 8557d73bddbb28d10745f3545f6686a92db4c781 Author: Eric Farman Date: Thu Jul 7 15:57:31 2022 +0200 vfio/ccw: Pass enum to FSM event jumptable The FSM has an enumerated list of events defined. Use that as the argument passed to the jump table, instead of a regular int. Suggested-by: Jason Gunthorpe Signed-off-by: Eric Farman Reviewed-by: Jason Gunthorpe Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20220707135737.720765-6-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e46a724886914c4de154f2103a019b422f3c9bb2 Author: Eric Farman Date: Thu Jul 7 15:57:30 2022 +0200 vfio/ccw: Remove private->mdev There are no remaining users of private->mdev. Remove it. Suggested-by: Jason Gunthorpe Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20220707135737.720765-5-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_async.c | 1 - drivers/s390/cio/vfio_ccw_ops.c | 3 --- drivers/s390/cio/vfio_ccw_private.h | 2 -- 3 files changed, 6 deletions(-) commit cffcc109fd682075dee79bade3d60a07152a8fd1 Author: Eric Farman Date: Thu Jul 7 15:57:29 2022 +0200 vfio/ccw: Do not change FSM state in subchannel event The routine vfio_ccw_sch_event() is tasked with handling subchannel events, specifically machine checks, on behalf of vfio-ccw. It correctly calls cio_update_schib(), and if that fails (meaning the subchannel is gone) it makes an FSM event call to mark the subchannel Not Operational. If that worked, however, then it decides that if the FSM state was already Not Operational (implying the subchannel just came back), then it should simply change the FSM to partially- or fully-open. Remove this trickery, since a subchannel returning will require more probing than simply "oh all is well again" to ensure it works correctly. Fixes: bbe37e4cb8970 ("vfio: ccw: introduce a finite state machine") Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20220707135737.720765-4-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_drv.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit f6c876d67e956de8d69349b0ee43bc7277c09e5c Author: Eric Farman Date: Thu Jul 7 15:57:28 2022 +0200 vfio/ccw: Fix FSM state if mdev probe fails The FSM is in STANDBY state when arriving in vfio_ccw_mdev_probe(), and this routine converts it to IDLE as part of its processing. The error exit sets it to IDLE (again) but clears the private->mdev pointer. The FSM should of course be managing the state itself, but the correct thing for vfio_ccw_mdev_probe() to do would be to put the state back the way it found it. The corresponding check of private->mdev in vfio_ccw_sch_io_todo() can be removed, since the distinction is unnecessary at this point. Fixes: 3bf1311f351ef ("vfio/ccw: Convert to use vfio_register_emulated_iommu_dev()") Signed-off-by: Eric Farman Reviewed-by: Jason Gunthorpe Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20220707135737.720765-3-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_drv.c | 5 +++-- drivers/s390/cio/vfio_ccw_ops.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit 3566ee1d776c1393393564b2514f9cd52a49c16e Author: Michael Kawano Date: Thu Jul 7 15:57:27 2022 +0200 vfio/ccw: Remove UUID from s390 debug log As vfio-ccw devices are created/destroyed, the uuid of the associated mdevs that are recorded in $S390DBF/vfio_ccw_msg/sprintf get lost. This is because a pointer to the UUID is stored instead of the UUID itself, and that memory may have been repurposed if/when the logs are examined. The result is usually garbage UUID data in the logs, though there is an outside chance of an oops happening here. Simply remove the UUID from the traces, as the subchannel number will provide useful configuration information for problem determination, and is stored directly into the log instead of a pointer. As we were the only consumer of mdev_uuid(), remove that too. Cc: Kirti Wankhede Signed-off-by: Michael Kawano Fixes: 60e05d1cf0875 ("vfio-ccw: add some logging") Fixes: b7701dfbf9832 ("vfio-ccw: Register a chp_event callback for vfio-ccw") [farman: reworded commit message, added Fixes: tags] Signed-off-by: Eric Farman Reviewed-by: Jason Gunthorpe Reviewed-by: Matthew Rosato Reviewed-by: Kirti Wankhede Link: https://lore.kernel.org/r/20220707135737.720765-2-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_drv.c | 5 ++--- drivers/s390/cio/vfio_ccw_fsm.c | 26 ++++++++++++-------------- drivers/s390/cio/vfio_ccw_ops.c | 8 ++++---- include/linux/mdev.h | 5 ----- 4 files changed, 18 insertions(+), 26 deletions(-) commit 8c96e566d95aaad910a54aa0b21b7753eb615a00 Author: Yang Li Date: Thu Jul 7 09:38:12 2022 +0800 drm/amd/display: clean up some inconsistent indenting Eliminate the follow smatch warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:405 get_bios_object_from_path_v3() warn: inconsistent indenting drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:611 bios_parser_get_hpd_info() warn: inconsistent indenting drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:818 bios_parser_get_device_tag() warn: inconsistent indenting drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:1599 bios_parser_is_device_id_supported() warn: inconsistent indenting Signed-off-by: Yang Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit bdd0d7e290e0e4c8f7545fff89770abbd22bd51a Author: Alex Deucher Date: Wed Jul 6 15:33:01 2022 -0400 drm/amd/display: fix non-x86/PPC64 compilation Need to protect FP DMCUB code with CONFIG_DRM_AMD_DC_DCN. Fixes build failures like the following on arm64: ERROR: modpost: "__floatunsidf" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "__divdf3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "fma" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "__adddf3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "__fixdfsi" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "__muldf3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "__floatsidf" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "__fixunsdfsi" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! Fixes: 85f4bc0c333c ("drm/amd/display: Add SubVP required code") Reported-by: Nathan Chancellor Tested-by: Nathan Chancellor Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn32/Makefile | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) commit 11d526f1972f486aa222fdfba751d2f0249c002a Author: Stylon Wang Date: Thu Jul 7 16:23:29 2022 +0800 drm/amd/display: Fix new dmub notification enabling in DM [Why] Changes from "Fix for dmub outbox notification enable" need to land in DM or DMUB outbox notification would be disabled. [How] Enable outbox notification only after interrupt are enabled and IRQ handlers registered. Any pending notification will be sent by DMUB once outbox notification is enabled. Fixes: ed7208706448 ("drm/amd/display: Fix for dmub outbox notification enable") Reviewed-by: Nicholas Kazlauskas Acked-by: Solomon Chiu Signed-off-by: Stylon Wang Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 27 ++++++++++++++++------- 1 file changed, 19 insertions(+), 8 deletions(-) commit cc3cb791f19ad0c4f951f38c98aa513b042ab329 Author: xinhui pan Date: Thu Jul 7 18:20:00 2022 +0800 drm/amdgpu: Fix one list corruption when create queue fails Queue would be freed when create_queue_cpsch fails So lets do queue cleanup otherwise various list and memory issues happen. Signed-off-by: xinhui pan Reviewed-by: Philip Yang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 9da2902609f7519c48eda84f953f72fee53f2b71 Author: Mateusz Jończyk Date: Wed Jul 6 22:01:44 2022 +0200 drm/radeon: avoid bogus "vram limit (0) must be a power of 2" warning I was getting the following message on boot on Linux 5.19-rc5: radeon 0000:01:05.0: vram limit (0) must be a power of 2 (I didn't use any radeon.vramlimit commandline parameter). This is caused by commit 8c2d34eb53b9 ("drm/radeon: use kernel is_power_of_2 rather than local version") which removed radeon_check_pot_argument() and converted its users to is_power_of_2(). The two functions differ in its handling of 0, which is the default value of radeon_vram_limit: radeon_check_pot_argument() "incorrectly" considered it a power of 2, while is_power_of_2() does not. An appropriate conditional silences the warning message. It is not necessary to add a similar test to other callers of is_power_of_2() in radeon_device.c. The matching commit in amdgpu: commit 761175078466 ("drm/amdgpu: use kernel is_power_of_2 rather than local version") is unaffected by this bug. Tested on Radeon HD 3200. Not ccing stable, this is not serious enough. Fixes: 8c2d34eb53b9 ("drm/radeon: use kernel is_power_of_2 rather than local version") Cc: Alex Deucher Cc: Christian König Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Jonathan Gray Signed-off-by: Mateusz Jończyk Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75072128d704576c39b3ec36b2cb84af316d88d2 Author: Guo Zhengkui Date: Wed Jul 6 17:13:27 2022 +0800 drm/amd/display: remove repeated includes Remove a repeated "#include " Reviewed-by: Harry Wentland Signed-off-by: Guo Zhengkui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/os_types.h | 2 -- 1 file changed, 2 deletions(-) commit 34ce1a6a29db41d5d4bffbab0872b1e1876cb4b8 Author: Zhongjun Tan Date: Wed Jul 6 12:57:12 2022 +0800 drm/amdgpu/display: Remove duplicated argument to || Remove duplicated argument to || Signed-off-by: Zhongjun Tan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30ef0808e61850ec9dd105fe0a21f7f9a7c69324 Author: Alex Deucher Date: Wed Jul 6 10:04:15 2022 -0400 drm/amd/display: make get_refresh_rate() static It's not used outside of dcn30_resource.c. Reported-by: kernel test robot Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b83c9e3dd5b5dabc507e79c3f03e700a20b2a4ee Author: Alex Deucher Date: Wed Jul 6 09:59:38 2022 -0400 drm/amd/display: remove set but unused variable Fixes the following: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_hwseq.c:428:33: warning: variable 'old_pipe' set but not used Reported-by: kernel test robot Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f72fc9bd226979c272d6f829a3c60c3d9e8dc969 Author: Eric Huang Date: Thu Jun 30 14:49:39 2022 -0400 drm/amdkfd: optimize svm range evict It is to avoid unnecessary queue eviction when range is not mapped to gpu. Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 1f374171fd345aaad9fcb30ac3acd255b5cd2076 Author: Evan Quan Date: Wed Jul 6 16:38:38 2022 +0800 drm/amd/display: correct idle_power_optimizations disablement return value [Why] The return value indicates whether the operation(disable/enable) succeeded or not. The existing logic reports wrong result even if the disablement was performed successfully. That will make succeeding reenablement abandoned as dc->idle_optimizations_allowed is always true. [How] Correct the return value to reflect the real result of disablement. Fixes: 235c67634230 ("drm/amd/display: add DCN32/321 specific files for Display Core") Signed-off-by: Evan Quan Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 371409df9236bd1abedc143e76fdd7080cba3ba3 Author: Aurabindo Pillai Date: Tue Jul 5 15:01:59 2022 -0400 drm/amd/display: remove stale debug setting [Why&How] The debug option to disable idle power optimization can be dropped Fixes: 235c67634230 ("drm/amd/display: add DCN32/321 specific files for Display Core") Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 1 - 1 file changed, 1 deletion(-) commit 7d261c50d9c1adb70f6ac2e26edbc64c774c21ca Author: Eric Huang Date: Fri Jun 24 11:15:28 2022 -0400 drm/amdkfd: change svm range evict Adding always evict queues when flag is set to KFD_IOCTL_SVM_FLAG_GPU_ALWAYS_MAPPED as if XNACK off. Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fce7bf30d3309ea325a7ec452456f8f7c079f622 Author: Eric Huang Date: Fri Jun 24 11:03:37 2022 -0400 drm/amdkfd: add new flag for svm It is to add new option for always keeping gpu mapping. Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher include/uapi/linux/kfd_ioctl.h | 2 ++ 1 file changed, 2 insertions(+) commit 7c33e477bd883f79cccec418980cb8f7f2d50347 Author: Dan Carpenter Date: Wed Jun 22 09:21:55 2022 +0300 scsi: qla2xxx: Check correct variable in qla24xx_async_gffid() There is a copy and paste bug here. It should check ".rsp" instead of ".req". The error message is copy and pasted as well so update that too. Link: https://lore.kernel.org/r/YrK1A/t3L6HKnswO@kili Fixes: 9c40c36e75ff ("scsi: qla2xxx: edif: Reduce Initiator-Initiator thrashing") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_gs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 75c654242f2947013cf50823f5a8f3bc814d9590 Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:11:05 2022 +0100 MAINTAINERS: update nvidia,tegra20-host1x.yaml reference Changeset fd27de58b0ad ("dt-bindings: display: tegra: Convert to json-schema") renamed: Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt to: Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.yaml. Update its cross-reference accordingly. Fixes: fd27de58b0ad ("dt-bindings: display: tegra: Convert to json-schema") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/e0adee01fe8064f981eb854e04fb64c4a0408b66.1656234456.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 932e778b294cd7a94072a59be2047a32288f860c Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:11:04 2022 +0100 dt-bindings: mfd: update dlg,da9063.yaml reference Changeset 441613662db7 ("dt-bindings: mfd: Convert da9063 to yaml") renamed: Documentation/devicetree/bindings/mfd/da9063.txt to: Documentation/devicetree/bindings/mfd/dlg,da9063.yaml. Update its cross-reference accordingly. Fixes: 441613662db7 ("dt-bindings: mfd: Convert da9063 to yaml") Signed-off-by: Mauro Carvalho Chehab Acked-by: Rob Herring Acked-by: Conor Dooley Link: https://lore.kernel.org/r/da459164d166d994b06f9ce8bf3a2108ccd0abd5.1656234456.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet Documentation/devicetree/bindings/input/da9062-onkey.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b510592b76d80e83f06db1a810b7ea3348aa3823 Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:11:03 2022 +0100 tegra194-hte.rst: fix reference to its binding The binding directory for hte was renamed. Update references accordingly. Fixes: af583852d2ef ("dt-bindings: Renamed hte directory to timestamp") Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Dipen Patel Link: https://lore.kernel.org/r/2e2c86485cb0642455cee01796f9a74de21403e6.1656234456.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet Documentation/driver-api/hte/tegra194-hte.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78b02317310ee30e922328e332b937d2607727e1 Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:11:02 2022 +0100 arch: m68k: q40: README: drop references to IDE driver Since IDE support was deleted by Christoph Hellwig , Jun 16 2021, drop the left-over from README file, updating the documentation to point to ata/pata_falcon.c. Fixes: 44b1fbc0f5f3 ("m68k/q40: Replace q40ide driver with pata_falcon and falconide") Fixes: b7fb14d3ac63 ("ide: remove the legacy ide driver") Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/d6e3482ed622b6953db69cddb70f20c55c96e4da.1656234456.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet arch/m68k/q40/README | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d6a21f2d73258f2a4cd2e7806f5755ee73fddced Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:11:01 2022 +0100 objtool: update objtool.txt references Changeset a8e35fece49b ("objtool: Update documentation") renamed: tools/objtool/Documentation/stack-validation.txt to: tools/objtool/Documentation/objtool.txt. Update the cross-references accordingly. Fixes: a8e35fece49b ("objtool: Update documentation") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/ec285ece6348a5be191aebe45f78d06b3319056b.1656234456.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet Documentation/x86/orc-unwinder.rst | 2 +- include/linux/objtool.h | 2 +- lib/Kconfig.debug | 2 +- tools/include/linux/objtool.h | 2 +- tools/objtool/check.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 8a5d192166726cd106a94d3e3bab47fb9843c14c Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:11:00 2022 +0100 Documentation: KVM: update s390-diag.rst reference Changeset daec8d408308 ("Documentation: KVM: add separate directories for architecture-specific documentation") renamed: Documentation/virt/kvm/s390-diag.rst to: Documentation/virt/kvm/s390/s390-diag.rst. Update its cross-reference accordingly. Fixes: daec8d408308 ("Documentation: KVM: add separate directories for architecture-specific documentation") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/85b81e4678bbe23d0e9692616798762a6465f0a3.1656234456.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet Documentation/virt/kvm/x86/hypercalls.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48b36e59ac213d534b79df79739f9ed2da7b12df Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:10:59 2022 +0100 Documentation: KVM: update msr.rst reference Changeset daec8d408308 ("Documentation: KVM: add separate directories for architecture-specific documentation") renamed: Documentation/virt/kvm/msr.rst to: Documentation/virt/kvm/x86/msr.rst. Update its cross-reference accordingly. Fixes: daec8d408308 ("Documentation: KVM: add separate directories for architecture-specific documentation") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/5652b7f5caff3b817a660b75f1f319a2f8962380.1656234456.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet Documentation/virt/kvm/api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ac3945d8e22cfa4f32ec5b7f81a68d2afe4e38e Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:10:58 2022 +0100 Documentation: KVM: update amd-memory-encryption.rst references Changeset daec8d408308 ("Documentation: KVM: add separate directories for architecture-specific documentation") renamed: Documentation/virt/kvm/amd-memory-encryption.rst to: Documentation/virt/kvm/x86/amd-memory-encryption.rst. Update the cross-references accordingly. Fixes: daec8d408308 ("Documentation: KVM: add separate directories for architecture-specific documentation") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/fd80db889e34aae87a4ca88cad94f650723668f4.1656234456.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet Documentation/admin-guide/kernel-parameters.txt | 2 +- Documentation/security/secrets/coco.rst | 2 +- Documentation/virt/kvm/api.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit e38fd63749eb5debc9e6b030a813f45f6141dee0 Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:10:57 2022 +0100 Documentation: KVM: update s390-pv.rst reference Changesets: daec8d408308 ("Documentation: KVM: add separate directories for architecture-specific documentation") and: daec8d408308 ("Documentation: KVM: add separate directories for architecture-specific documentation") renamed: Documentation/virt/kvm/s390-pv.rst to: Documentation/virt/kvm/s390/s390-pv.rst. Update its cross-reference accordingly. Fixes: daec8d408308 ("Documentation: KVM: add separate directories for architecture-specific documentation") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/e2676f087d287db0bc31ae7c05c80ce5adf93333.1656234456.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet Documentation/virt/kvm/s390/s390-pv-boot.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c02b872a7ca7842e4cdbbf621f77607d0a655f83 Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:10:56 2022 +0100 Documentation: update watch_queue.rst references Changeset f5461124d59b ("Documentation: move watch_queue to core-api") renamed: Documentation/watch_queue.rst to: Documentation/core-api/watch_queue.rst. Update the cross-references accordingly. Fixes: f5461124d59b ("Documentation: move watch_queue to core-api") Reviewed-by: Randy Dunlap Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/1c220de9c58f35e815a3df9458ac2bea323c8bfb.1656234456.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet Documentation/security/keys/core.rst | 2 +- include/linux/watch_queue.h | 2 +- init/Kconfig | 2 +- kernel/watch_queue.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 97e937dec70d0b78b8d11091273e818158b56070 Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:10:54 2022 +0100 docs: zh_CN/vm/zsmalloc.rst: fix a typo typo: zs_malloc.rst -> zsmalloc.rst Fixes: 6dbc3a5bdb46 ("docs/zh_CN: add vm zsmalloc translation") Signed-off-by: Mauro Carvalho Chehab Acked-by: Yanteng Si Link: https://lore.kernel.org/r/25a9fff20d39a6638b8a7c0fefa0767e77d96dec.1656234456.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/vm/zsmalloc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36395fb365df3c216b6bda1fd55cf9a39907852b Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:10:53 2022 +0100 docs: zh_CN/vm: fix a typo for page reporting ReST file typo: _free_page_reporting.rst -> free_page_reporting.rst Fixes: 9859b277bffe ("docs/zh_CN: add vm frontswap translation") Fixes: adeacecbd36c ("docs/zh_CN: add free_page_reporting translation") Signed-off-by: Mauro Carvalho Chehab Acked-by: Yanteng Si Link: https://lore.kernel.org/r/c7db8f975f461eaebd7ea7489ff9666d89e121c6.1656234456.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/vm/free_page_reporting.rst | 2 +- Documentation/translations/zh_CN/vm/frontswap.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 695c62a823a5798245a5a9c99ea62b65d6f50d6e Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:10:52 2022 +0100 docs: zh_CN: fix a broken reference The location of the rust doc is wrong (probably a typo). Fix it. Fixes: 3a5915156429 ("docs/zh_CN: Add translation zh_CN/doc-guide/kernel-doc.rst") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/94fe771609d32583fee41f47fe29433cbce5b04e.1656234456.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/doc-guide/kernel-doc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e13ce769a00658c9ccc0ead9954c43558056a7d8 Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:10:51 2022 +0100 docs: zh_CN/devicetree: fix typos The devicetree directory was using wrong case: Devicetree/ -> devicetree/ Fixes: a17b0169f29b ("docs/zh_CN: add devicetree index translation") Fixes: c56481299df3 ("docs/zh_CN: add devicetree usage-model translation") Fixes: 09d4466d3f3c ("docs/zh_CN: add devicetree of_unittest translation") Signed-off-by: Mauro Carvalho Chehab Acked-by: Yanteng Si Link: https://lore.kernel.org/r/b4ca010ef223ab9cb76e8caa0a3cde734e0b6b2f.1656234456.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/devicetree/index.rst | 2 +- Documentation/translations/zh_CN/devicetree/of_unittest.rst | 2 +- Documentation/translations/zh_CN/devicetree/usage-model.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 5fe84fe446d8309bf9a704741850c30ab9a95ac2 Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:10:49 2022 +0100 docs: zh_CN: page_frags.rst: fix a broken reference typo: page_frag.rst -> page_frags.rst Fixes: f51debc256f8 ("docs/zh_CN: add vm page_frags translation") Signed-off-by: Mauro Carvalho Chehab Acked-by: Yanteng Si Link: https://lore.kernel.org/r/a12e18044ddb2ca16a1fed10823d59558d6de405.1656234456.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/vm/page_frags.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 752f596371289cb3b45e99453b5c09d96ed36614 Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:10:48 2022 +0100 docs: filesystems: update netfs-api.rst reference Changeset efc930fa1d84 ("docs: filesystems: caching/netfs-api.txt: convert it to ReST") renamed: Documentation/filesystems/caching/netfs-api.txt to: Documentation/filesystems/caching/netfs-api.rst. Update its cross-reference accordingly. Fixes: efc930fa1d84 ("docs: filesystems: caching/netfs-api.txt: convert it to ReST") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/5f867f01d42c3e65e111167739ed1a41a26623f9.1656234456.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet include/linux/fscache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 335220ab017d5f727fbc557c157fda0e10e19c8c Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:10:47 2022 +0100 docs: netdev: update maintainer-netdev.rst reference Changeset 8df0136376dc ("docs: netdev: move the netdev-FAQ to the process pages") renamed: Documentation/networking/netdev-FAQ.rst to: Documentation/process/maintainer-netdev.rst. Update its cross-reference accordingly. Fixes: 8df0136376dc ("docs: netdev: move the netdev-FAQ to the process pages") Acked-by: Jakub Kicinski Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/aed0482b3d931bfcfe84f38197526edcbb8fd830.1656234456.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet Documentation/translations/it_IT/networking/netdev-FAQ.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83ec88d81aa8762d4fb75f95365da6b73a38efe9 Merge: cf21b355ccb3 ef4ab3ba4e4f Author: Jakub Kicinski Date: Thu Jul 7 12:07:37 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net No conflicts. Signed-off-by: Jakub Kicinski commit 309027b57c61d4d168679d49fd11add0dfdce900 Author: Jonathan Corbet Date: Thu Jun 30 10:36:30 2022 -0600 docs: automarkup: do not look up symbols twice The automarkup code tries to look up symbols once as a function, and once as a macro. The Sphinx C domain code, though, totally ignores that distinction and will return the same results either way. So just look things up once and be done with it; the resulting output does not change, but htmldocs build time drops by about 5%. Tested-by: Akira Yokosawa Link: https://lore.kernel.org/r/20220630163630.714673-3-corbet@lwn.net Signed-off-by: Jonathan Corbet Documentation/sphinx/automarkup.py | 57 +++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 31 deletions(-) commit 26c82972f20f6b3fdbd77b2802693808da3c0c09 Author: Jonathan Corbet Date: Thu Jun 30 10:36:29 2022 -0600 docs: automarkup: track failed cross-reference attempts The automarkup code tries to create a lot of cross-references that don't exist. Cross-reference lookups are expensive, especially in later versions of Sphinx, so there is value in avoiding unnecessary ones. Remember attempts that failed and do not retry them. This improves the htmldocs build time by 5-10% depending on the phase of the moon and other factors. Tested-by: Akira Yokosawa Link: https://lore.kernel.org/r/20220630163630.714673-2-corbet@lwn.net Signed-off-by: Jonathan Corbet Documentation/sphinx/automarkup.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit f2c1ff0d3be2670d04afba792ec0c79d37a9cfc8 Author: Mauro Carvalho Chehab Date: Sat Jul 2 12:07:34 2022 +0100 docs: tegra194-hte.rst: don't include gpiolib.c twice All extern functions of drivers/gpio/gpiolib.c are already inside the Kernel documentation, as driver-api/gpio/index.rst already includes it. Placing a kernel-doc here will only cause mess, as the same symbol will be placed on two parts of the document, causing breakages in cross-references. So, instead, add a cross-reference there. This solves those Sphinx 3.1+ warnings: .../Documentation/driver-api/hte/tegra194-hte:28: ./drivers/gpio/gpiolib.c:2464: WARNING: Duplicate C declaration, also defined at driver-api/gpio/index:2464. .../Documentation/driver-api/hte/tegra194-hte:28: ./drivers/gpio/gpiolib.c:2493: WARNING: Duplicate C declaration, also defined at driver-api/gpio/index:2493. .../Documentation/driver-api/hte/tegra194-hte.rst:2464: WARNING: Duplicate C declaration, also defined at driver-api/gpio/index:2464. .../Documentation/driver-api/hte/tegra194-hte.rst:2464: WARNING: Duplicate C declaration, also defined at driver-api/gpio/index:2464. .../Documentation/driver-api/hte/tegra194-hte.rst:2464: WARNING: Duplicate C declaration, also defined at driver-api/gpio/index:2464. .../Documentation/driver-api/hte/tegra194-hte.rst:2493: WARNING: Duplicate C declaration, also defined at driver-api/gpio/index:2493. .../Documentation/driver-api/hte/tegra194-hte.rst:2493: WARNING: Duplicate C declaration, also defined at driver-api/gpio/index:2493. .../Documentation/driver-api/hte/tegra194-hte.rst:2493: WARNING: Duplicate C declaration, also defined at driver-api/gpio/index:2493. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/de81b472f552bd651f140f0aa779a29652fffa62.1656759989.git.mchehab@kernel.org Acked-by: Dipen Patel Signed-off-by: Jonathan Corbet Documentation/driver-api/hte/tegra194-hte.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 02bba8ca90b1877ae47400c31002ceb498b0dd9f Author: Mauro Carvalho Chehab Date: Sat Jul 2 11:11:29 2022 +0100 scripts: sphinx-pre-install: place a warning for Sphinx >= 3.0 Newer versions of Sphinx have a known bug: https://github.com/sphinx-doc/sphinx/pull/8313 Those currently produces 11 false-positive warnings On Sphinx version 3.1+. While Sphinx fix is not applied, let's warn adventurers that would be using Sphinx installed via distro packages. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/085e0ada65c11da9303d07e70c510dc45f21315b.1656756450.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet scripts/sphinx-pre-install | 4 ++++ 1 file changed, 4 insertions(+) commit 6a5d7320fb75af071cde628e82ebc938575a2fd6 Author: Mauro Carvalho Chehab Date: Sat Jul 2 11:11:28 2022 +0100 scripts: sphinx-pre-install: provide both venv and package installs As it is not a consensus about installing sphinx using venv, and modern distributions are now shipping with Sphinx versions above the minimal requirements to build the docs, provide both venv and package install commands by default. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/7c99d985df204c73e3daafd5fd2f30a31269405d.1656756450.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet scripts/sphinx-pre-install | 55 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 13 deletions(-) commit 5b27d2551c199c3077b7104b1417b6aecff15d34 Author: Mauro Carvalho Chehab Date: Sat Jul 2 11:11:27 2022 +0100 scripts: sphinx-pre-install: check for PDF min version later on Better to add the PDF note late for venv recommendation. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/8e117aabe6dfa1b1ec92dccd20e801393c977667.1656756450.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet scripts/sphinx-pre-install | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit ed2133b7b5859bc1de86ed44d5cd93096cadc446 Author: Mauro Carvalho Chehab Date: Sat Jul 2 11:11:26 2022 +0100 scripts: sphinx-pre-install: report broken venv After distro upgrades, the directory names for python may change. On such case, the previously-created venv will be broken, and sphinx-build won't run. Add a logic to report it. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/f117f03555b0636d2be0b68f3a23b1d3f03ccf1d.1656756450.git.mchehab@kernel.org [jc: fixed typo in warning message] Signed-off-by: Jonathan Corbet scripts/sphinx-pre-install | 6 ++++++ 1 file changed, 6 insertions(+) commit 7c2d45a347c7933cbe0efff14fe96adeb13fd761 Author: Mauro Carvalho Chehab Date: Sat Jul 2 11:11:25 2022 +0100 scripts: sphinx-pre-install: fix venv version check logic The logic which checks if the venv version is good enough but was not activated is broken: it is checking against the wrong val, making it to recommend to re-create a venv every time. Fix it. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/afe01b7863fd655986d84ace8948f3d7aede796d.1656756450.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet scripts/sphinx-pre-install | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 11093e6f0de9783c26355e0962f210a7ae18ab3c Author: Bagas Sanjaya Date: Sat Jul 2 11:23:50 2022 +0700 Documentation: dm writecache: Render status list as list The status list isn't rendered as list, but rather as normal paragraph, because there is missing blank line between "Status:" line and the list. Fix the issue by adding the blank line separator. Fixes: 48debafe4f2fea ("dm: add writecache target") Signed-off-by: Bagas Sanjaya Signed-off-by: Mike Snitzer Documentation/admin-guide/device-mapper/writecache.rst | 1 + 1 file changed, 1 insertion(+) commit 8b301af4c65b9f9f6ea2ca546a357fce09f945cd Author: Mauro Carvalho Chehab Date: Sat Jul 2 12:07:35 2022 +0100 Documentation: dm writecache: add blank line before optional parameters Otherwise this warning occurs: Documentation/admin-guide/device-mapper/writecache.rst:23: WARNING: Unexpected indentation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mike Snitzer Documentation/admin-guide/device-mapper/writecache.rst | 1 + 1 file changed, 1 insertion(+) commit 6507cce561b43b071999502103804e3dc1478e60 Author: Reinette Chatre Date: Tue May 10 11:09:07 2022 -0700 selftests/sgx: Page removal stress test Create enclave with additional heap that consumes all physical SGX memory and then remove it. Depending on the available SGX memory this test could take a significant time to run (several minutes) as it (1) creates the enclave, (2) changes the type of every page to be trimmed, (3) enters the enclave once per page to run EACCEPT, before (4) the pages are finally removed. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/e7c6aa2ab30cb1c41e52b776958409c06970d168.1652137848.git.reinette.chatre@intel.com tools/testing/selftests/sgx/main.c | 120 +++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) commit 08ceab2c37d32f422f8d98540656ee5a416ba729 Author: Reinette Chatre Date: Tue May 10 11:09:06 2022 -0700 selftests/sgx: Test reclaiming of untouched page Removing a page from an initialized enclave involves three steps: (1) the user requests changing the page type to PT_TRIM via the SGX_IOC_ENCLAVE_MODIFY_TYPES ioctl() (2) on success the ENCLU[EACCEPT] instruction is run from within the enclave to accept the page removal (3) the user initiates the actual removal of the page via the SGX_IOC_ENCLAVE_REMOVE_PAGES ioctl(). Remove a page that has never been accessed. This means that when the first ioctl() requesting page removal arrives, there will be no page table entry, yet a valid page table entry needs to exist for the ENCLU[EACCEPT] function to succeed. In this test it is verified that a page table entry can still be installed for a page that is in the process of being removed. Suggested-by: Haitao Huang Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/45e1b2a2fcd8c14597d04e40af5d8a9c1c5b017e.1652137848.git.reinette.chatre@intel.com tools/testing/selftests/sgx/main.c | 80 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit 35c7e6dacb038e9311e98901d56bb1abd56f9ae0 Author: Reinette Chatre Date: Tue May 10 11:09:05 2022 -0700 selftests/sgx: Test invalid access to removed enclave page Removing a page from an initialized enclave involves three steps: (1) the user requests changing the page type to SGX_PAGE_TYPE_TRIM via the SGX_IOC_ENCLAVE_MODIFY_TYPES ioctl(), (2) on success the ENCLU[EACCEPT] instruction is run from within the enclave to accept the page removal, (3) the user initiates the actual removal of the page via the SGX_IOC_ENCLAVE_REMOVE_PAGES ioctl(). Test two possible invalid accesses during the page removal flow: * Test the behavior when a request to remove the page by changing its type to SGX_PAGE_TYPE_TRIM completes successfully but instead of executing ENCLU[EACCEPT] from within the enclave the enclave attempts to read from the page. Even though the page is accessible from the page table entries its type is SGX_PAGE_TYPE_TRIM and thus not accessible according to SGX. The expected behavior is a page fault with the SGX flag set in the error code. * Test the behavior when the page type is changed successfully and ENCLU[EACCEPT] was run from within the enclave. The final ioctl(), SGX_IOC_ENCLAVE_REMOVE_PAGES, is omitted and replaced with an attempt to access the page. Even though the page is accessible from the page table entries its type is SGX_PAGE_TYPE_TRIM and thus not accessible according to SGX. The expected behavior is a page fault with the SGX flag set in the error code. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/189a86c25d6d62da7cfdd08ee97abc1a06fcc179.1652137848.git.reinette.chatre@intel.com tools/testing/selftests/sgx/main.c | 243 +++++++++++++++++++++++++++++++++++++ 1 file changed, 243 insertions(+) commit 50b822e4b785948ed663c89c84e124fc8c099c9b Author: Reinette Chatre Date: Tue May 10 11:09:04 2022 -0700 selftests/sgx: Test faulty enclave behavior Removing a page from an initialized enclave involves three steps: first the user requests changing the page type to SGX_PAGE_TYPE_TRIM via an ioctl(), on success the ENCLU[EACCEPT] instruction needs to be run from within the enclave to accept the page removal, finally the user requests page removal to be completed via an ioctl(). Only after acceptance (ENCLU[EACCEPT]) from within the enclave can the kernel remove the page from a running enclave. Test the behavior when the user's request to change the page type succeeds, but the ENCLU[EACCEPT] instruction is not run before the ioctl() requesting page removal is run. This should not be permitted. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/fa5da30ebac108b7517194c3038b52995602b996.1652137848.git.reinette.chatre@intel.com tools/testing/selftests/sgx/main.c | 114 +++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) commit 33c5aac3bf32c3ef120ad6d2eb5c65ab64a5fec4 Author: Reinette Chatre Date: Tue May 10 11:09:03 2022 -0700 selftests/sgx: Test complete changing of page type flow Support for changing an enclave page's type enables an initialized enclave to be expanded with support for more threads by changing the type of a regular enclave page to that of a Thread Control Structure (TCS). Additionally, being able to change a TCS or regular enclave page's type to be trimmed (SGX_PAGE_TYPE_TRIM) initiates the removal of the page from the enclave. Test changing page type to TCS as well as page removal flows in two phases: In the first phase support for a new thread is dynamically added to an initialized enclave and in the second phase the pages associated with the new thread are removed from the enclave. As an additional sanity check after the second phase the page used as a TCS page during the first phase is added back as a regular page and ensured that it can be written to (which is not possible if it was a TCS page). Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/d05b48b00338683a94dcaef9f478540fc3d6d5f9.1652137848.git.reinette.chatre@intel.com tools/testing/selftests/sgx/load.c | 41 +++++ tools/testing/selftests/sgx/main.c | 343 +++++++++++++++++++++++++++++++++++++ tools/testing/selftests/sgx/main.h | 1 + 3 files changed, 385 insertions(+) commit b564982fda13be6314e49f2344e7c422565e34d3 Author: Reinette Chatre Date: Tue May 10 11:09:02 2022 -0700 selftests/sgx: Introduce TCS initialization enclave operation The Thread Control Structure (TCS) contains meta-data used by the hardware to save and restore thread specific information when entering/exiting the enclave. A TCS can be added to an initialized enclave by first adding a new regular enclave page, initializing the content of the new page from within the enclave, and then changing that page's type to a TCS. Support the initialization of a TCS from within the enclave. The variable information needed that should be provided from outside the enclave is the address of the TCS, address of the State Save Area (SSA), and the entry point that the thread should use to enter the enclave. With this information provided all needed fields of a TCS can be initialized. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/bad6052056188bde753a54313da1ac8f1e29088a.1652137848.git.reinette.chatre@intel.com tools/testing/selftests/sgx/defines.h | 8 ++++++++ tools/testing/selftests/sgx/test_encl.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit 7eb4370152beb2f1e25543088bce2e3f0621ab81 Author: Reinette Chatre Date: Tue May 10 11:09:01 2022 -0700 selftests/sgx: Introduce dynamic entry point The test enclave (test_encl.elf) is built with two initialized Thread Control Structures (TCS) included in the binary. Both TCS are initialized with the same entry point, encl_entry, that correctly computes the absolute address of the stack based on the stack of each TCS that is also built into the binary. A new TCS can be added dynamically to the enclave and requires to be initialized with an entry point used to enter the enclave. Since the existing entry point, encl_entry, assumes that the TCS and its stack exists at particular offsets within the binary it is not able to handle a dynamically added TCS and its stack. Introduce a new entry point, encl_dyn_entry, that initializes the absolute address of that thread's stack to the address immediately preceding the TCS itself. It is now possible to dynamically add a contiguous memory region to the enclave with the new stack preceding the new TCS. With the new TCS initialized with encl_dyn_entry as entry point the absolute address of the stack is computed correctly on entry. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/93e9c420dedf5f773ba6965c18245bc7d62aca83.1652137848.git.reinette.chatre@intel.com tools/testing/selftests/sgx/test_encl_bootstrap.S | 6 ++++++ 1 file changed, 6 insertions(+) commit 67f1f70a23d117628d5cfc78bcdf8eb9d2d04874 Author: Reinette Chatre Date: Tue May 10 11:09:00 2022 -0700 selftests/sgx: Test two different SGX2 EAUG flows Enclave pages can be added to an initialized enclave when an address belonging to the enclave but without a backing page is accessed from within the enclave. Accessing memory without a backing enclave page from within an enclave can be in different ways: 1) Pre-emptively run ENCLU[EACCEPT]. Since the addition of a page always needs to be accepted by the enclave via ENCLU[EACCEPT] this flow is efficient since the first execution of ENCLU[EACCEPT] triggers the addition of the page and when execution returns to the same instruction the second execution would be successful as an acceptance of the page. 2) A direct read or write. The flow where a direct read or write triggers the page addition execution cannot resume from the instruction (read/write) that triggered the fault but instead the enclave needs to be entered at a different entry point to run needed ENCLU[EACCEPT] before execution can return to the original entry point and the read/write instruction that faulted. Add tests for both flows. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/0c321e0e32790ac1de742ce5017a331e6d902ac1.1652137848.git.reinette.chatre@intel.com tools/testing/selftests/sgx/main.c | 250 +++++++++++++++++++++++++++++++++++++ 1 file changed, 250 insertions(+) commit 7088c81f94733fd5d103f8975d5e1d1fad12f665 Author: Reinette Chatre Date: Tue May 10 11:08:59 2022 -0700 selftests/sgx: Add test for TCS page permission changes Kernel should not allow permission changes on TCS pages. Add test to confirm this behavior. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/0121ad1b21befb94519072e2c18b89aa5dca00d4.1652137848.git.reinette.chatre@intel.com tools/testing/selftests/sgx/main.c | 71 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit 20404a808593a6812cb485bec16256e702ff94c3 Author: Reinette Chatre Date: Tue May 10 11:08:58 2022 -0700 selftests/sgx: Add test for EPCM permission changes EPCM permission changes could be made from within (to relax permissions) or out (to restrict permissions) the enclave. Kernel support is needed when permissions are restricted to be able to call the privileged ENCLS[EMODPR] instruction. EPCM permissions can be relaxed via ENCLU[EMODPE] from within the enclave but the enclave still depends on the kernel to install PTEs with the needed permissions. Add a test that exercises a few of the enclave page permission flows: 1) Test starts with a RW (from enclave and kernel perspective) enclave page that is mapped via a RW VMA. 2) Use the SGX_IOC_ENCLAVE_RESTRICT_PERMISSIONS ioctl() to restrict the enclave (EPCM) page permissions to read-only. 3) Run ENCLU[EACCEPT] from within the enclave to accept the new page permissions. 4) Attempt to write to the enclave page from within the enclave - this should fail with a page fault on the EPCM permissions since the page table entry continues to allow RW access. 5) Restore EPCM permissions to RW by running ENCLU[EMODPE] from within the enclave. 6) Attempt to write to the enclave page from within the enclave - this should succeed since both EPCM and PTE permissions allow this access. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/2617bf2b2d1e27ca1d0096e1192ae5896baf3f80.1652137848.git.reinette.chatre@intel.com tools/testing/selftests/sgx/defines.h | 15 +++ tools/testing/selftests/sgx/main.c | 214 ++++++++++++++++++++++++++++++++ tools/testing/selftests/sgx/test_encl.c | 38 ++++++ 3 files changed, 267 insertions(+) commit 629b5155d01b699e50ee63a3973402c64d0ac5d6 Author: Reinette Chatre Date: Tue May 10 11:08:57 2022 -0700 Documentation/x86: Introduce enclave runtime management section Enclave runtime management is introduced following the pattern of the section describing enclave building. Provide a brief summary of enclave runtime management, pointing to the functions implementing the ioctl()s that will contain details within their kernel-doc. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/1da0b9a938b28e68e6870ebd5291490d680e700b.1652137848.git.reinette.chatre@intel.com Documentation/x86/sgx.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit a0506b3b063641f0a05b2a4399442a38aad22291 Author: Reinette Chatre Date: Tue May 10 11:08:56 2022 -0700 x86/sgx: Free up EPC pages directly to support large page ranges The page reclaimer ensures availability of EPC pages across all enclaves. In support of this it runs independently from the individual enclaves in order to take locks from the different enclaves as it writes pages to swap. When needing to load a page from swap an EPC page needs to be available for its contents to be loaded into. Loading an existing enclave page from swap does not reclaim EPC pages directly if none are available, instead the reclaimer is woken when the available EPC pages are found to be below a watermark. When iterating over a large number of pages in an oversubscribed environment there is a race between the reclaimer woken up and EPC pages reclaimed fast enough for the page operations to proceed. Ensure there are EPC pages available before attempting to load a page that may potentially be pulled from swap into an available EPC page. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/a0d8f037c4a075d56bf79f432438412985f7ff7a.1652137848.git.reinette.chatre@intel.com arch/x86/kernel/cpu/sgx/ioctl.c | 6 ++++++ arch/x86/kernel/cpu/sgx/main.c | 11 +++++++++++ arch/x86/kernel/cpu/sgx/sgx.h | 1 + 3 files changed, 18 insertions(+) commit 9849bb27152c18e8531424c0a8ef5f51ece40aea Author: Reinette Chatre Date: Tue May 10 11:08:55 2022 -0700 x86/sgx: Support complete page removal The SGX2 page removal flow was introduced in previous patch and is as follows: 1) Change the type of the pages to be removed to SGX_PAGE_TYPE_TRIM using the ioctl() SGX_IOC_ENCLAVE_MODIFY_TYPES introduced in previous patch. 2) Approve the page removal by running ENCLU[EACCEPT] from within the enclave. 3) Initiate actual page removal using the ioctl() SGX_IOC_ENCLAVE_REMOVE_PAGES introduced here. Support the final step of the SGX2 page removal flow with ioctl() SGX_IOC_ENCLAVE_REMOVE_PAGES. With this ioctl() the user specifies a page range that should be removed. All pages in the provided range should have the SGX_PAGE_TYPE_TRIM page type and the request will fail with EPERM (Operation not permitted) if a page that does not have the correct type is encountered. Page removal can fail on any page within the provided range. Support partial success by returning the number of pages that were successfully removed. Since actual page removal will succeed even if ENCLU[EACCEPT] was not run from within the enclave the ENCLU[EMODPR] instruction with RWX permissions is used as a no-op mechanism to ensure ENCLU[EACCEPT] was successfully run from within the enclave before the enclave page is removed. If the user omits running SGX_IOC_ENCLAVE_REMOVE_PAGES the pages will still be removed when the enclave is unloaded. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Tested-by: Haitao Huang Tested-by: Vijay Dhanraj Tested-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/b75ee93e96774e38bb44a24b8e9bbfb67b08b51b.1652137848.git.reinette.chatre@intel.com arch/x86/include/uapi/asm/sgx.h | 21 ++++++ arch/x86/kernel/cpu/sgx/ioctl.c | 145 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 166 insertions(+) commit 45d546b8c109d69f6659d58b2ace005b2f07f557 Author: Reinette Chatre Date: Tue May 10 11:08:54 2022 -0700 x86/sgx: Support modifying SGX page type Every enclave contains one or more Thread Control Structures (TCS). The TCS contains meta-data used by the hardware to save and restore thread specific information when entering/exiting the enclave. With SGX1 an enclave needs to be created with enough TCSs to support the largest number of threads expecting to use the enclave and enough enclave pages to meet all its anticipated memory demands. In SGX1 all pages remain in the enclave until the enclave is unloaded. SGX2 introduces a new function, ENCLS[EMODT], that is used to change the type of an enclave page from a regular (SGX_PAGE_TYPE_REG) enclave page to a TCS (SGX_PAGE_TYPE_TCS) page or change the type from a regular (SGX_PAGE_TYPE_REG) or TCS (SGX_PAGE_TYPE_TCS) page to a trimmed (SGX_PAGE_TYPE_TRIM) page (setting it up for later removal). With the existing support of dynamically adding regular enclave pages to an initialized enclave and changing the page type to TCS it is possible to dynamically increase the number of threads supported by an enclave. Changing the enclave page type to SGX_PAGE_TYPE_TRIM is the first step of dynamically removing pages from an initialized enclave. The complete page removal flow is: 1) Change the type of the pages to be removed to SGX_PAGE_TYPE_TRIM using the SGX_IOC_ENCLAVE_MODIFY_TYPES ioctl() introduced here. 2) Approve the page removal by running ENCLU[EACCEPT] from within the enclave. 3) Initiate actual page removal using the ioctl() introduced in the following patch. Add ioctl() SGX_IOC_ENCLAVE_MODIFY_TYPES to support changing SGX enclave page types within an initialized enclave. With SGX_IOC_ENCLAVE_MODIFY_TYPES the user specifies a page range and the enclave page type to be applied to all pages in the provided range. The ioctl() itself can return an error code based on failures encountered by the kernel. It is also possible for SGX specific failures to be encountered. Add a result output parameter to communicate the SGX return code. It is possible for the enclave page type change request to fail on any page within the provided range. Support partial success by returning the number of pages that were successfully changed. After the page type is changed the page continues to be accessible from the kernel perspective with page table entries and internal state. The page may be moved to swap. Any access until ENCLU[EACCEPT] will encounter a page fault with SGX flag set in error code. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Tested-by: Haitao Huang Tested-by: Vijay Dhanraj Link: https://lkml.kernel.org/r/babe39318c5bf16fc65fbfb38896cdee72161575.1652137848.git.reinette.chatre@intel.com arch/x86/include/uapi/asm/sgx.h | 20 ++++ arch/x86/kernel/cpu/sgx/ioctl.c | 202 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 222 insertions(+) commit 7b013e723a1f689077347b30778d8831b6d92969 Author: Reinette Chatre Date: Tue May 10 11:08:53 2022 -0700 x86/sgx: Tighten accessible memory range after enclave initialization Before an enclave is initialized the enclave's memory range is unknown. The enclave's memory range is learned at the time it is created via the SGX_IOC_ENCLAVE_CREATE ioctl() where the provided memory range is obtained from an earlier mmap() of /dev/sgx_enclave. After an enclave is initialized its memory can be mapped into user space (mmap()) from where it can be entered at its defined entry points. With the enclave's memory range known after it is initialized there is no reason why it should be possible to map memory outside this range. Lock down access to the initialized enclave's memory range by denying any attempt to map memory outside its memory range. Locking down the memory range also makes adding pages to an initialized enclave more efficient. Pages are added to an initialized enclave by accessing memory that belongs to the enclave's memory range but not yet backed by an enclave page. If it is possible for user space to map memory that does not form part of the enclave then an access to this memory would eventually fail. Failures range from a prompt general protection fault if the access was an ENCLU[EACCEPT] from within the enclave, or a page fault via the vDSO if it was another access from within the enclave, or a SIGBUS (also resulting from a page fault) if the access was from outside the enclave. Disallowing invalid memory to be mapped in the first place avoids preventable failures. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/6391460d75ae79cea2e81eef0f6ffc03c6e9cfe7.1652137848.git.reinette.chatre@intel.com arch/x86/kernel/cpu/sgx/encl.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5a90d2c3f5ef87717e54572af8426aba6fdbdaa6 Author: Reinette Chatre Date: Tue May 10 11:08:52 2022 -0700 x86/sgx: Support adding of pages to an initialized enclave With SGX1 an enclave needs to be created with its maximum memory demands allocated. Pages cannot be added to an enclave after it is initialized. SGX2 introduces a new function, ENCLS[EAUG], that can be used to add pages to an initialized enclave. With SGX2 the enclave still needs to set aside address space for its maximum memory demands during enclave creation, but all pages need not be added before enclave initialization. Pages can be added during enclave runtime. Add support for dynamically adding pages to an initialized enclave, architecturally limited to RW permission at creation but allowed to obtain RWX permissions after trusted enclave runs EMODPE. Add pages via the page fault handler at the time an enclave address without a backing enclave page is accessed, potentially directly reclaiming pages if no free pages are available. The enclave is still required to run ENCLU[EACCEPT] on the page before it can be used. A useful flow is for the enclave to run ENCLU[EACCEPT] on an uninitialized address. This will trigger the page fault handler that will add the enclave page and return execution to the enclave to repeat the ENCLU[EACCEPT] instruction, this time successful. If the enclave accesses an uninitialized address in another way, for example by expanding the enclave stack to a page that has not yet been added, then the page fault handler would add the page on the first write but upon returning to the enclave the instruction that triggered the page fault would be repeated and since ENCLU[EACCEPT] was not run yet it would trigger a second page fault, this time with the SGX flag set in the page fault error code. This can only be recovered by entering the enclave again and directly running the ENCLU[EACCEPT] instruction on the now initialized address. Accessing an uninitialized address from outside the enclave also triggers this flow but the page will remain inaccessible (access will result in #PF) until accepted from within the enclave via ENCLU[EACCEPT]. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Tested-by: Haitao Huang Tested-by: Vijay Dhanraj Link: https://lkml.kernel.org/r/a254a58eabea053803277449b24b6e4963a3883b.1652137848.git.reinette.chatre@intel.com arch/x86/kernel/cpu/sgx/encl.c | 117 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) commit ff08530a5232aab3b610db44cdc5045d26421911 Author: Reinette Chatre Date: Tue May 10 11:08:51 2022 -0700 x86/sgx: Support restricting of enclave page permissions In the initial (SGX1) version of SGX, pages in an enclave need to be created with permissions that support all usages of the pages, from the time the enclave is initialized until it is unloaded. For example, pages used by a JIT compiler or when code needs to otherwise be relocated need to always have RWX permissions. SGX2 includes a new function ENCLS[EMODPR] that is run from the kernel and can be used to restrict the EPCM permissions of regular enclave pages within an initialized enclave. Introduce ioctl() SGX_IOC_ENCLAVE_RESTRICT_PERMISSIONS to support restricting EPCM permissions. With this ioctl() the user specifies a page range and the EPCM permissions to be applied to all pages in the provided range. ENCLS[EMODPR] is run to restrict the EPCM permissions followed by the ENCLS[ETRACK] flow that will ensure no cached linear-to-physical address mappings to the changed pages remain. It is possible for the permission change request to fail on any page within the provided range, either with an error encountered by the kernel or by the SGX hardware while running ENCLS[EMODPR]. To support partial success the ioctl() returns an error code based on failures encountered by the kernel as well as two result output parameters: one for the number of pages that were successfully changed and one for the SGX return code. The page table entry permissions are not impacted by the EPCM permission changes. VMAs and PTEs will continue to allow the maximum vetted permissions determined at the time the pages are added to the enclave. The SGX error code in a page fault will indicate if it was an EPCM permission check that prevented an access attempt. No checking is done to ensure that the permissions are actually being restricted. This is because the enclave may have relaxed the EPCM permissions from within the enclave without the kernel knowing. An attempt to relax permissions using this call will be ignored by the hardware. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Tested-by: Haitao Huang Tested-by: Vijay Dhanraj Link: https://lkml.kernel.org/r/082cee986f3c1a2f4fdbf49501d7a8c5a98446f8.1652137848.git.reinette.chatre@intel.com arch/x86/include/uapi/asm/sgx.h | 21 ++++ arch/x86/kernel/cpu/sgx/ioctl.c | 216 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 237 insertions(+) commit a76e7f1f18884a94998ca82862c0a4e6d0fd2933 Author: Reinette Chatre Date: Tue May 10 11:08:50 2022 -0700 x86/sgx: Support VA page allocation without reclaiming struct sgx_encl should be protected with the mutex sgx_encl->lock. One exception is sgx_encl->page_cnt that is incremented (in sgx_encl_grow()) when an enclave page is added to the enclave. The reason the mutex is not held is to allow the reclaimer to be called directly if there are no EPC pages (in support of a new VA page) available at the time. Incrementing sgx_encl->page_cnt without sgc_encl->lock held is currently (before SGX2) safe from concurrent updates because all paths in which sgx_encl_grow() is called occur before enclave initialization and are protected with an atomic operation on SGX_ENCL_IOCTL. SGX2 includes support for dynamically adding pages after enclave initialization where the protection of SGX_ENCL_IOCTL is not available. Make direct reclaim of EPC pages optional when new VA pages are added to the enclave. Essentially the existing "reclaim" flag used when regular EPC pages are added to an enclave becomes available to the caller when used to allocate VA pages instead of always being "true". When adding pages without invoking the reclaimer it is possible to do so with sgx_encl->lock held, gaining its protection against concurrent updates to sgx_encl->page_cnt after enclave initialization. No functional change. Reported-by: Haitao Huang Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/42c5934c229982ee67982bb97c6ab34bde758620.1652137848.git.reinette.chatre@intel.com arch/x86/kernel/cpu/sgx/encl.c | 6 ++++-- arch/x86/kernel/cpu/sgx/encl.h | 4 ++-- arch/x86/kernel/cpu/sgx/ioctl.c | 8 ++++---- 3 files changed, 10 insertions(+), 8 deletions(-) commit 8123073c4335fcd18ea5e049b85220f122ac1ca3 Author: Jarkko Sakkinen Date: Tue May 10 11:08:49 2022 -0700 x86/sgx: Export sgx_encl_page_alloc() Move sgx_encl_page_alloc() to encl.c and export it so that it can be used in the implementation for support of adding pages to initialized enclaves, which requires to allocate new enclave pages. Signed-off-by: Jarkko Sakkinen Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Link: https://lkml.kernel.org/r/57ae71b4ea17998467670232e12d6617b95c6811.1652137848.git.reinette.chatre@intel.com arch/x86/kernel/cpu/sgx/encl.c | 32 ++++++++++++++++++++++++++++++++ arch/x86/kernel/cpu/sgx/encl.h | 3 +++ arch/x86/kernel/cpu/sgx/ioctl.c | 32 -------------------------------- 3 files changed, 35 insertions(+), 32 deletions(-) commit 3a5351415228d06c988a1e610e71d3889f707ac9 Author: Reinette Chatre Date: Tue May 10 11:08:48 2022 -0700 x86/sgx: Export sgx_encl_{grow,shrink}() In order to use sgx_encl_{grow,shrink}() in the page augmentation code located in encl.c, export these functions. Suggested-by: Jarkko Sakkinen Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/d51730acf54b6565710b2261b3099517b38c2ec4.1652137848.git.reinette.chatre@intel.com arch/x86/kernel/cpu/sgx/encl.h | 2 ++ arch/x86/kernel/cpu/sgx/ioctl.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit 8cb7b502f31e6cc4c6ebe2c5eeaa90dcab418cf1 Author: Reinette Chatre Date: Tue May 10 11:08:47 2022 -0700 x86/sgx: Keep record of SGX page type SGX2 functions are not allowed on all page types. For example, ENCLS[EMODPR] is only allowed on regular SGX enclave pages and ENCLS[EMODPT] is only allowed on TCS and regular pages. If these functions are attempted on another type of page the hardware would trigger a fault. Keep a record of the SGX page type so that there is more certainty whether an SGX2 instruction can succeed and faults can be treated as real failures. The page type is a property of struct sgx_encl_page and thus does not cover the VA page type. VA pages are maintained in separate structures and their type can be determined in a different way. The SGX2 instructions needing the page type do not operate on VA pages and this is thus not a scenario needing to be covered at this time. struct sgx_encl_page hosting this information is maintained for each enclave page so the space consumed by the struct is important. The existing sgx_encl_page->vm_max_prot_bits is already unsigned long while only using three bits. Transition to a bitfield for the two members to support the additional information without increasing the space consumed by the struct. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/a0a6939eefe7ba26514f6c49723521cde372de64.1652137848.git.reinette.chatre@intel.com arch/x86/include/asm/sgx.h | 3 +++ arch/x86/kernel/cpu/sgx/encl.h | 3 ++- arch/x86/kernel/cpu/sgx/ioctl.c | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) commit dda03e2c331b9fc7bbc8fc0de12a6d92d8c18661 Author: Reinette Chatre Date: Tue May 10 11:08:46 2022 -0700 x86/sgx: Create utility to validate user provided offset and length User provided offset and length is validated when parsing the parameters of the SGX_IOC_ENCLAVE_ADD_PAGES ioctl(). Extract this validation (with consistent use of IS_ALIGNED) into a utility that can be used by the SGX2 ioctl()s that will also provide these values. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/767147bc100047abed47fe27c592901adfbb93a2.1652137848.git.reinette.chatre@intel.com arch/x86/kernel/cpu/sgx/ioctl.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) commit c7c6a8a61b0066ba7e891783032dc2a7873c6dc7 Author: Reinette Chatre Date: Tue May 10 11:08:45 2022 -0700 x86/sgx: Make sgx_ipi_cb() available internally The ETRACK function followed by an IPI to all CPUs within an enclave is a common pattern with more frequent use in support of SGX2. Make the (empty) IPI callback function available internally in preparation for usage by SGX2. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/1179ed4a9c3c1c2abf49d51bfcf2c30b493181cc.1652137848.git.reinette.chatre@intel.com arch/x86/kernel/cpu/sgx/main.c | 2 +- arch/x86/kernel/cpu/sgx/sgx.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit f89c2f9bf5a64f619de06ded4349dff5a35da860 Author: Reinette Chatre Date: Tue May 10 11:08:44 2022 -0700 x86/sgx: Move PTE zap code to new sgx_zap_enclave_ptes() The SGX reclaimer removes page table entries pointing to pages that are moved to swap. SGX2 enables changes to pages belonging to an initialized enclave, thus enclave pages may have their permission or type changed while the page is being accessed by an enclave. Supporting SGX2 requires page table entries to be removed so that any cached mappings to changed pages are removed. For example, with the ability to change enclave page types a regular enclave page may be changed to a Thread Control Structure (TCS) page that may not be accessed by an enclave. Factor out the code removing page table entries to a separate function sgx_zap_enclave_ptes(), fixing accuracy of comments in the process, and make it available to the upcoming SGX2 code. Place sgx_zap_enclave_ptes() with the rest of the enclave code in encl.c interacting with the page table since this code is no longer unique to the reclaimer. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/b010cdf01d7ce55dd0f00e883b7ccbd9db57160a.1652137848.git.reinette.chatre@intel.com arch/x86/kernel/cpu/sgx/encl.c | 45 +++++++++++++++++++++++++++++++++++++++++- arch/x86/kernel/cpu/sgx/encl.h | 2 +- arch/x86/kernel/cpu/sgx/main.c | 31 ++--------------------------- 3 files changed, 47 insertions(+), 31 deletions(-) commit bdaa8799f697daa059bf807da40a9444de94d7e3 Author: Reinette Chatre Date: Tue May 10 11:08:43 2022 -0700 x86/sgx: Rename sgx_encl_ewb_cpumask() as sgx_encl_cpumask() sgx_encl_ewb_cpumask() is no longer unique to the reclaimer where it is used during the EWB ENCLS leaf function when EPC pages are written out to main memory and sgx_encl_ewb_cpumask() is used to learn which CPUs might have executed the enclave to ensure that TLBs are cleared. Upcoming SGX2 enabling will use sgx_encl_ewb_cpumask() during the EMODPR and EMODT ENCLS leaf functions that make changes to enclave pages. The function is needed for the same reason it is used now: to learn which CPUs might have executed the enclave to ensure that TLBs no longer point to the changed pages. Rename sgx_encl_ewb_cpumask() to sgx_encl_cpumask() to reflect the broader usage. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/d4d08c449450a13d8dd3bb6c2b1af03895586d4f.1652137848.git.reinette.chatre@intel.com arch/x86/kernel/cpu/sgx/encl.c | 6 +++--- arch/x86/kernel/cpu/sgx/encl.h | 2 +- arch/x86/kernel/cpu/sgx/main.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 7f391752d4adac10cfc1e5d7a76bab0ab5c9c9d4 Author: Reinette Chatre Date: Tue May 10 11:08:42 2022 -0700 x86/sgx: Export sgx_encl_ewb_cpumask() Using sgx_encl_ewb_cpumask() to learn which CPUs might have executed an enclave is useful to ensure that TLBs are cleared when changes are made to enclave pages. sgx_encl_ewb_cpumask() is used within the reclaimer when an enclave page is evicted. The upcoming SGX2 support enables changes to be made to enclave pages and will require TLBs to not refer to the changed pages and thus will be needing sgx_encl_ewb_cpumask(). Relocate sgx_encl_ewb_cpumask() to be with the rest of the enclave code in encl.c now that it is no longer unique to the reclaimer. Take care to ensure that any future usage maintains the current context requirement that ETRACK has been called first. Expand the existing comments to highlight this while moving them to a more prominent location before the function. No functional change. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/05b60747fd45130cf9fc6edb1c373a69a18a22c5.1652137848.git.reinette.chatre@intel.com arch/x86/kernel/cpu/sgx/encl.c | 67 ++++++++++++++++++++++++++++++++++++++++++ arch/x86/kernel/cpu/sgx/encl.h | 1 + arch/x86/kernel/cpu/sgx/main.c | 29 ------------------ 3 files changed, 68 insertions(+), 29 deletions(-) commit b3fb517dc6020fec85c82171a909da10c6a6f90a Author: Reinette Chatre Date: Tue May 10 11:08:41 2022 -0700 x86/sgx: Support loading enclave page without VMA permissions check sgx_encl_load_page() is used to find and load an enclave page into enclave (EPC) memory, potentially loading it from the backing storage. Both usages of sgx_encl_load_page() are during an access to the enclave page from a VMA and thus the permissions of the VMA are considered before the enclave page is loaded. SGX2 functions operating on enclave pages belonging to an initialized enclave requiring the page to be in EPC. It is thus required to support loading enclave pages into the EPC independent from a VMA. Split the current sgx_encl_load_page() to support the two usages: A new call, sgx_encl_load_page_in_vma(), behaves exactly like the current sgx_encl_load_page() that takes VMA permissions into account, while sgx_encl_load_page() just loads an enclave page into EPC. VMA, PTE, and EPCM permissions continue to dictate whether the pages can be accessed from within an enclave. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/d4393513c1f18987c14a490bcf133bfb71a5dc43.1652137848.git.reinette.chatre@intel.com arch/x86/kernel/cpu/sgx/encl.c | 57 ++++++++++++++++++++++++++++-------------- arch/x86/kernel/cpu/sgx/encl.h | 2 ++ 2 files changed, 40 insertions(+), 19 deletions(-) commit 61416b294af02e4747554c0d1b28d436a4a537d2 Author: Reinette Chatre Date: Tue May 10 11:08:40 2022 -0700 x86/sgx: Add wrapper for SGX2 EAUG function Add a wrapper for the EAUG ENCLS leaf function used to add a page to an initialized enclave. EAUG: 1) Stores all properties of the new enclave page in the SGX hardware's Enclave Page Cache Map (EPCM). 2) Sets the PENDING bit in the EPCM entry of the enclave page. This bit is cleared by the enclave by invoking ENCLU leaf function EACCEPT or EACCEPTCOPY. Access from within the enclave to the new enclave page is not possible until the PENDING bit is cleared. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/97a46754fe4764e908651df63694fb760f783d6e.1652137848.git.reinette.chatre@intel.com arch/x86/kernel/cpu/sgx/encls.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 09b38d0b412dbf8922b3dc33103c1a1257519ab9 Author: Reinette Chatre Date: Tue May 10 11:08:39 2022 -0700 x86/sgx: Add wrapper for SGX2 EMODT function Add a wrapper for the EMODT ENCLS leaf function used to change the type of an enclave page as maintained in the SGX hardware's Enclave Page Cache Map (EPCM). EMODT: 1) Updates the EPCM page type of the enclave page. 2) Sets the MODIFIED bit in the EPCM entry of the enclave page. This bit is reset by the enclave by invoking ENCLU leaf function EACCEPT or EACCEPTCOPY. Access from within the enclave to the enclave page is not possible while the MODIFIED bit is set. After changing the enclave page type by issuing EMODT the kernel needs to collaborate with the hardware to ensure that no logical processor continues to hold a reference to the changed page. This is required to ensure no required security checks are circumvented and is required for the enclave's EACCEPT/EACCEPTCOPY to succeed. Ensuring that no references to the changed page remain is accomplished with the ETRACK flow. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/dba63a8c0db1d510b940beee1ba2a8207efeb1f1.1652137848.git.reinette.chatre@intel.com arch/x86/kernel/cpu/sgx/encls.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 0fb2126db8414e0206960febb3e4a116439c69dd Author: Reinette Chatre Date: Tue May 10 11:08:38 2022 -0700 x86/sgx: Add wrapper for SGX2 EMODPR function Add a wrapper for the EMODPR ENCLS leaf function used to restrict enclave page permissions as maintained in the SGX hardware's Enclave Page Cache Map (EPCM). EMODPR: 1) Updates the EPCM permissions of an enclave page by treating the new permissions as a mask. Supplying a value that attempts to relax EPCM permissions has no effect on EPCM permissions (PR bit, see below, is changed). 2) Sets the PR bit in the EPCM entry of the enclave page to indicate that permission restriction is in progress. The bit is reset by the enclave by invoking ENCLU leaf function EACCEPT or EACCEPTCOPY. The enclave may access the page throughout the entire process if conforming to the EPCM permissions for the enclave page. After performing the permission restriction by issuing EMODPR the kernel needs to collaborate with the hardware to ensure that all logical processors sees the new restricted permissions. This is required for the enclave's EACCEPT/EACCEPTCOPY to succeed and is accomplished with the ETRACK flow. Expand enum sgx_return_code with the possible EMODPR return values. Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/d15e7a769e13e4ca671fa2d0a0d3e3aec5aedbd4.1652137848.git.reinette.chatre@intel.com arch/x86/include/asm/sgx.h | 5 +++++ arch/x86/kernel/cpu/sgx/encls.h | 6 ++++++ 2 files changed, 11 insertions(+) commit 4c3f73584c0c0152b75dd6a090558ada39601159 Author: Reinette Chatre Date: Tue May 10 11:08:37 2022 -0700 x86/sgx: Add short descriptions to ENCLS wrappers The SGX ENCLS instruction uses EAX to specify an SGX function and may require additional registers, depending on the SGX function. ENCLS invokes the specified privileged SGX function for managing and debugging enclaves. Macros are used to wrap the ENCLS functionality and several wrappers are used to wrap the macros to make the different SGX functions accessible in the code. The wrappers of the supported SGX functions are cryptic. Add short descriptions of each as a comment. Suggested-by: Dave Hansen Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/5e78a1126711cbd692d5b8132e0683873398f69e.1652137848.git.reinette.chatre@intel.com arch/x86/kernel/cpu/sgx/encls.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 92ef86ab513593c6329d04146e61f9a670e72fc5 Author: Rob Clark Date: Thu Jul 7 09:20:37 2022 -0700 drm/msm/mdp5: Fix global state lock backoff We need to grab the lock after the early return for !hwpipe case. Otherwise, we could have hit contention yet still returned 0. Fixes an issue that the new CONFIG_DRM_DEBUG_MODESET_LOCK stuff flagged in CI: WARNING: CPU: 0 PID: 282 at drivers/gpu/drm/drm_modeset_lock.c:296 drm_modeset_lock+0xf8/0x154 Modules linked in: CPU: 0 PID: 282 Comm: kms_cursor_lega Tainted: G W 5.19.0-rc2-15930-g875cc8bc536a #1 Hardware name: Qualcomm Technologies, Inc. DB820c (DT) pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : drm_modeset_lock+0xf8/0x154 lr : drm_atomic_get_private_obj_state+0x84/0x170 sp : ffff80000cfab6a0 x29: ffff80000cfab6a0 x28: 0000000000000000 x27: ffff000083bc4d00 x26: 0000000000000038 x25: 0000000000000000 x24: ffff80000957ca58 x23: 0000000000000000 x22: ffff000081ace080 x21: 0000000000000001 x20: ffff000081acec18 x19: ffff80000cfabb80 x18: 0000000000000038 x17: 0000000000000000 x16: 0000000000000000 x15: fffffffffffea0d0 x14: 0000000000000000 x13: 284e4f5f4e524157 x12: 5f534b434f4c5f47 x11: ffff80000a386aa8 x10: 0000000000000029 x9 : ffff80000cfab610 x8 : 0000000000000029 x7 : 0000000000000014 x6 : 0000000000000000 x5 : 0000000000000001 x4 : ffff8000081ad904 x3 : 0000000000000029 x2 : ffff0000801db4c0 x1 : ffff80000cfabb80 x0 : ffff000081aceb58 Call trace: drm_modeset_lock+0xf8/0x154 drm_atomic_get_private_obj_state+0x84/0x170 mdp5_get_global_state+0x54/0x6c mdp5_pipe_release+0x2c/0xd4 mdp5_plane_atomic_check+0x2ec/0x414 drm_atomic_helper_check_planes+0xd8/0x210 drm_atomic_helper_check+0x54/0xb0 ... ---[ end trace 0000000000000000 ]--- drm_modeset_lock attempting to lock a contended lock without backoff: drm_modeset_lock+0x148/0x154 mdp5_get_global_state+0x30/0x6c mdp5_pipe_release+0x2c/0xd4 mdp5_plane_atomic_check+0x290/0x414 drm_atomic_helper_check_planes+0xd8/0x210 drm_atomic_helper_check+0x54/0xb0 drm_atomic_check_only+0x4b0/0x8f4 drm_atomic_commit+0x68/0xe0 Fixes: d59be579fa93 ("drm/msm/mdp5: Return error code in mdp5_pipe_release when deadlock is detected") Signed-off-by: Rob Clark Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/492701/ Link: https://lore.kernel.org/r/20220707162040.1594855-1-robdclark@gmail.com drivers/gpu/drm/msm/disp/mdp5/mdp5_pipe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ff4f65e4ddcebb96bee503e644160b1f9d57dbac Author: Deming Wang Date: Sat Jul 2 02:46:13 2022 -0400 vfio/spapr_tce: Remove the unused parameters container The parameter of container has been unused for tce_iommu_unuse_page. So, we should delete it. Signed-off-by: Deming Wang Reviewed-by: Alexey Kardashevskiy Link: https://lore.kernel.org/r/20220702064613.5293-1-wangdeming@inspur.com Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_spapr_tce.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 9de76f41ea2188f2784f48352f9278819d249afc Author: Lukas Bulwahn Date: Thu Jul 7 13:54:42 2022 +0200 x86/mm: Refer to the intended config STRICT_DEVMEM in a comment Commit a4866aa81251 ("mm: Tighten x86 /dev/mem with zeroing reads") adds a comment to the function devmem_is_allowed() referring to a non-existing config STRICT_IOMEM, whereas the comment very likely intended to refer to the config STRICT_DEVMEM, as the commit adds some behavior for the config STRICT_DEVMEM. Most of the initial analysis was actually done by Dave Hansen in the email thread below (see Link). Refer to the intended and existing config STRICT_DEVMEM. Suggested-by: Dave Hansen Signed-off-by: Lukas Bulwahn Signed-off-by: Dave Hansen Link: https://lore.kernel.org/r/f9074e8d-9314-9d7d-7bf5-5b5538c8be8d@intel.com/ Link: https://lkml.kernel.org/r/20220707115442.21107-1-lukas.bulwahn@gmail.com arch/x86/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68c1b3dd5c48b2323067f8c1f0649ae2f31ab20b Author: Kai-Heng Feng Date: Thu Jul 7 08:01:51 2022 +0800 iio: light: cm32181: Add PM support The read on in_illuminance_input keeps at 0 after system sleep. So add proper suspend and resume callback to make the sensor keep working after system sleep. Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20220707000151.33381-1-kai.heng.feng@canonical.com Signed-off-by: Jonathan Cameron drivers/iio/light/cm32181.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 7b86d50e74b9688aef6e75440ad59800ba770595 Author: Lukas Bulwahn Date: Thu Jun 23 11:54:52 2022 +0200 MAINTAINERS: Rectify entry for NVIDIA TEGRA DRM and VIDEO DRIVER Commit fd27de58b0ad ("dt-bindings: display: tegra: Convert to json-schema") converts nvidia,tegra20-host1x.txt to yaml, but missed to adjust its references in MAINTAINERS. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Repair these file references in NVIDIA TEGRA DRM and VIDEO DRIVER. Signed-off-by: Lukas Bulwahn Signed-off-by: Thierry Reding MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fe8b45aa61153f44a2e4851b021fda0b8bc94fb9 Author: Thierry Reding Date: Mon May 25 17:32:08 2020 +0200 dt-bindings: display: tegra: Convert to json-schema Convert the Tegra host1x controller bindings from the free-form text format to json-schema. This also adds the missing display-hub DT bindings that were not previously documented. Reviewed-by: Rob Herring Signed-off-by: Thierry Reding .../display/tegra/nvidia,tegra114-mipi.txt | 41 -- .../display/tegra/nvidia,tegra114-mipi.yaml | 74 +++ .../display/tegra/nvidia,tegra124-dpaux.yaml | 152 +++++ .../display/tegra/nvidia,tegra124-sor.yaml | 197 ++++++ .../display/tegra/nvidia,tegra124-vic.yaml | 71 +++ .../bindings/display/tegra/nvidia,tegra186-dc.yaml | 85 +++ .../display/tegra/nvidia,tegra186-display.yaml | 310 ++++++++++ .../display/tegra/nvidia,tegra186-dsi-padctl.yaml | 45 ++ .../bindings/display/tegra/nvidia,tegra20-dc.yaml | 183 ++++++ .../bindings/display/tegra/nvidia,tegra20-dsi.yaml | 159 +++++ .../bindings/display/tegra/nvidia,tegra20-epp.yaml | 70 +++ .../display/tegra/nvidia,tegra20-gr2d.yaml | 74 +++ .../display/tegra/nvidia,tegra20-gr3d.yaml | 215 +++++++ .../display/tegra/nvidia,tegra20-hdmi.yaml | 126 ++++ .../display/tegra/nvidia,tegra20-host1x.txt | 675 --------------------- .../display/tegra/nvidia,tegra20-host1x.yaml | 348 +++++++++++ .../bindings/display/tegra/nvidia,tegra20-isp.yaml | 67 ++ .../bindings/display/tegra/nvidia,tegra20-mpe.yaml | 73 +++ .../bindings/display/tegra/nvidia,tegra20-tvo.yaml | 58 ++ .../bindings/display/tegra/nvidia,tegra20-vi.yaml | 163 +++++ .../display/tegra/nvidia,tegra210-csi.yaml | 52 ++ .../pinctrl/nvidia,tegra124-dpaux-padctl.txt | 59 -- 22 files changed, 2522 insertions(+), 775 deletions(-) commit 4136ce90f079e812fec2c5e10732b2265f61f1bd Author: Robin Murphy Date: Thu Apr 21 12:36:59 2022 +0100 ARM/dma-mapping: merge IOMMU ops The dma_sync_* operations are now the only difference between the coherent and non-coherent IOMMU ops. Some minor tweaks to make those safe for coherent devices with minimal overhead, and we can condense down to a single set of DMA ops. Signed-off-by: Robin Murphy Signed-off-by: Christoph Hellwig Tested-by: Marc Zyngier arch/arm/mm/dma-mapping.c | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) commit d563bccfa35b59c2cdb982b181cf9de0ddc6c0be Author: Robin Murphy Date: Thu Apr 21 12:36:58 2022 +0100 ARM/dma-mapping: consolidate IOMMU ops callbacks Merge the coherent and non-coherent callbacks down to a single implementation each, relying on the generic dev->dma_coherent flag at the points where the difference matters. Signed-off-by: Robin Murphy Signed-off-by: Christoph Hellwig Tested-by: Marc Zyngier arch/arm/mm/dma-mapping.c | 238 +++++++++++----------------------------------- 1 file changed, 55 insertions(+), 183 deletions(-) commit 42998ef08aba01643d99f65718903b4414a8922f Author: Robin Murphy Date: Thu Apr 21 12:36:57 2022 +0100 ARM/dma-mapping: drop .dma_supported for IOMMU ops When an IOMMU is present, we trust that it should be capable of remapping any physical memory, and since the device masks represent the input (virtual) addresses to the IOMMU it makes no sense to validate them against physical PFNs anyway. Signed-off-by: Robin Murphy Signed-off-by: Christoph Hellwig Tested-by: Marc Zyngier arch/arm/mm/dma-mapping.c | 23 ----------------------- 1 file changed, 23 deletions(-) commit ae626eb97376148bb63c3f3ca9517fde0f39bec3 Author: Christoph Hellwig Date: Tue Apr 19 10:28:28 2022 +0200 ARM/dma-mapping: use dma-direct unconditionally Use dma-direct unconditionally on arm. It has already been used for some time for LPAE and nommu configurations. This mostly changes the streaming mapping implementation and the (simple) coherent allocator for device that are DMA coherent. The existing complex allocator for uncached mappings for non-coherent devices is still used as is using the arch_dma_alloc/arch_dma_free hooks. Signed-off-by: Christoph Hellwig Reviewed-by: Arnd Bergmann Acked-by: Andre Przywara [highbank] Tested-by: Marc Zyngier arch/arm/Kconfig | 4 +- arch/arm/include/asm/dma-mapping.h | 24 --- arch/arm/mach-highbank/highbank.c | 2 +- arch/arm/mach-mvebu/coherency.c | 2 +- arch/arm/mm/dma-mapping.c | 365 ++----------------------------------- 5 files changed, 19 insertions(+), 378 deletions(-) commit af6f23b88e9508f1cb8d0af008bb175019428f73 Author: Christoph Hellwig Date: Tue Apr 19 10:00:32 2022 +0200 ARM/dma-mapping: use the generic versions of dma_to_phys/phys_to_dma by default Only the footbridge platforms provide their own DMA address translation helpers, so switch to the generic version for all other platforms, and consolidate the footbridge implementation to remove two levels of indirection. Signed-off-by: Christoph Hellwig Reviewed-by: Arnd Bergmann Tested-by: Marc Zyngier arch/arm/Kconfig | 1 - arch/arm/include/asm/dma-direct.h | 41 +--------------------- arch/arm/include/asm/memory.h | 2 -- arch/arm/mach-footbridge/Kconfig | 1 + arch/arm/mach-footbridge/common.c | 19 +++++----- arch/arm/mach-footbridge/include/mach/dma-direct.h | 8 +++++ arch/arm/mach-footbridge/include/mach/memory.h | 4 --- 7 files changed, 21 insertions(+), 55 deletions(-) commit f9774cfd5062d69dc8ba522369638f919c35391e Author: Christoph Hellwig Date: Tue Apr 19 09:48:53 2022 +0200 ARM/dma-mapping: use dma_to_phys/phys_to_dma in the dma-mapping code Use the helpers as expected by the dma-direct code in the old arm dma-mapping code to ease a gradual switch to the common DMA code. Signed-off-by: Christoph Hellwig Reviewed-by: Arnd Bergmann Tested-by: Marc Zyngier arch/arm/mm/dma-mapping.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit d6e2e92597ed2036206b084e94828403d7fb14a6 Author: Christoph Hellwig Date: Tue Apr 19 09:43:48 2022 +0200 ARM/dma-mapping: remove the unused virt_to_dma helper virt_to_dma was only used by the now removed dmabounce code. Signed-off-by: Christoph Hellwig Reviewed-by: Arnd Bergmann Tested-by: Marc Zyngier arch/arm/include/asm/dma-direct.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 5ed390e5a9d4d84f220e012ee20ae97fc254a9d9 Author: Christoph Hellwig Date: Tue Apr 19 09:40:17 2022 +0200 ARM/dma-mapping: mark various dma-mapping routines static in dma-mapping.c With the dmabounce removal these aren't used outside of dma-mapping.c, so mark them static. Move the dma_map_ops declarations down a bit to avoid lots of forward declarations. Signed-off-by: Christoph Hellwig Reviewed-by: Arnd Bergmann Tested-by: Marc Zyngier arch/arm/include/asm/dma-mapping.h | 75 ---------------------------- arch/arm/mm/dma-mapping.c | 100 +++++++++++++++++-------------------- 2 files changed, 46 insertions(+), 129 deletions(-) commit e3217540c2710f42a2388fe7896f0f28695c00b2 Author: Christoph Hellwig Date: Tue Apr 19 09:35:29 2022 +0200 ARM/dma-mapping: remove dmabounce Remove the now unused dmabounce code. Signed-off-by: Christoph Hellwig Reviewed-by: Arnd Bergmann arch/arm/common/Kconfig | 4 - arch/arm/common/Makefile | 1 - arch/arm/common/dmabounce.c | 582 ------------------------------------- arch/arm/include/asm/device.h | 3 - arch/arm/include/asm/dma-mapping.h | 29 -- 5 files changed, 619 deletions(-) commit 9ba26f5cecd86c85551a5120529c2f548099100f Author: Arnd Bergmann Date: Thu Feb 3 09:36:33 2022 +0100 ARM: sa1100/assabet: move dmabounce hack to ohci driver The sa1111 platform is one of the two remaining users of the old Arm specific "dmabounce" code, which is an earlier implementation of the generic swiotlb. Linus Walleij submitted a patch that removes dmabounce support from the ixp4xx, and I had a look at the other user, which is the sa1111 companion chip. Looking at how dmabounce is used, I could narrow it down to one driver one three machines: - dmabounce is only initialized on assabet/neponset, jornada720 and badge4, which are the platforms that have an sa1111 and support DMA on it. - All three of these suffer from "erratum #7" that requires only doing DMA to half the memory sections based on one of the address lines, in addition, the neponset also can't DMA to the RAM that is connected to sa1111 itself. - the pxa lubbock machine also has sa1111, but does not support DMA on it and does not set dmabounce. - only the OHCI and audio devices on sa1111 support DMA, but as there is no audio driver for this hardware, only OHCI remains. In the OHCI code, I noticed that two other platforms already have a local bounce buffer support in the form of the "local_mem" allocator. Specifically, TMIO and SM501 use this on a few other ARM boards with 16KB or 128KB of local SRAM that can be accessed from the OHCI and from the CPU. While this is not the same problem as on sa1111, I could not find a reason why we can't re-use the existing implementation but replace the physical SRAM address mapping with a locally allocated DMA buffer. There are two main downsides: - rather than using a dynamically sized pool, this buffer needs to be allocated at probe time using a fixed size. Without having any idea of what it should be, I picked a size of 64KB, which is between what the other two OHCI front-ends use in their SRAM. If anyone has a better idea what that size is reasonable, this can be trivially changed. - Previously, only USB transfers to unaddressable memory needed to go through the bounce buffer, now all of them do, which may impact runtime performance for USB endpoints that do a lot of transfers. On the upside, the local_mem support uses write-combining buffers, which should be a bit faster for transfers to the device compared to normal uncached coherent memory as used in dmabounce. Cc: Linus Walleij Cc: Russell King Cc: Christoph Hellwig Cc: Laurentiu Tudor Cc: linux-usb@vger.kernel.org Signed-off-by: Arnd Bergmann Reviewed-by: Greg Kroah-Hartman Acked-by: Alan Stern Signed-off-by: Christoph Hellwig arch/arm/common/Kconfig | 2 +- arch/arm/common/sa1111.c | 64 ------------------------------------------ drivers/usb/core/hcd.c | 17 +++++++++-- drivers/usb/host/ohci-sa1111.c | 25 +++++++++++++++++ 4 files changed, 40 insertions(+), 68 deletions(-) commit f392d6f64d179913fc716996cd35dd9dc1adc0f1 Author: Rob Clark Date: Sat Jun 25 15:54:37 2022 -0700 drm/msm: Make enable_eviction flag static No need for it to be visible outside of this one src file. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/491219/ Link: https://lore.kernel.org/r/20220625225454.81039-3-robdclark@gmail.com drivers/gpu/drm/msm/msm_gem_shrinker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 962c6296f05418bcb48a4577d8bbfce9a1139543 Author: Zhang Jiaming Date: Fri Jul 1 16:09:59 2022 +0800 dm snapshot: fix typo in snapshot_map() comment Signed-off-by: Zhang Jiaming Signed-off-by: Mike Snitzer drivers/md/dm-snap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce92fc4b8bc077b562ca945adbde0bca21caefb3 Author: Jiang Jian Date: Tue Jun 21 19:32:34 2022 +0800 dm raid: remove redundant "the" in parse_raid_params() comment Signed-off-by: Jiang Jian Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c29e784738c25be0f4ab188a88bf47697ca28fb Author: Steven Lung <1030steven@gmail.com> Date: Tue Jun 21 15:12:59 2022 +0800 dm cache: fix typo in 2 comment blocks Replace neccessarily with necessarily. Signed-off-by: Steven Lung <1030steven@gmail.com> Signed-off-by: Mike Snitzer drivers/md/dm-cache-metadata.h | 2 +- drivers/md/dm-cache-target.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 20e6fc85621c32bbe53d110bf0ecabdaa15acd2e Author: JeongHyeon Lee Date: Wed Jun 15 09:51:51 2022 +0900 dm verity: fix checkpatch close brace error Resolves: ERROR: else should follow close brace '}' Signed-off-by: JeongHyeon Lee Signed-off-by: Mike Snitzer drivers/md/dm-verity-target.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 899ab445a467ee3bb0d52fc845b0dba14cc6c316 Author: Mike Snitzer Date: Tue Jul 5 16:29:09 2022 -0400 dm table: rename dm_target variable in dm_table_add_target() Rename from "tgt" to "ti" so that all of dm-table.c code uses the same naming for dm_target variables. Signed-off-by: Mike Snitzer drivers/md/dm-table.c | 56 +++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit 564b5c5476cdb71b717340897b2b50f9c45df158 Author: Mike Snitzer Date: Tue Jul 5 16:12:27 2022 -0400 dm table: audit all dm_table_get_target() callers All callers of dm_table_get_target() are expected to do proper bounds checking on the index they pass. Move dm_table_get_target() to dm-core.h to make it extra clear that only DM core code should be using it. Switch it to be inlined while at it. Standardize all DM core callers to use the same for loop pattern and make associated variables as local as possible. Rename some variables (e.g. s/table/t/ and s/tgt/ti/) along the way. Signed-off-by: Mike Snitzer drivers/md/dm-core.h | 7 ++ drivers/md/dm-ima.c | 3 - drivers/md/dm-table.c | 200 +++++++++++++++++++------------------------------- drivers/md/dm-zone.c | 7 +- drivers/md/dm.c | 22 +++--- drivers/md/dm.h | 1 - 6 files changed, 97 insertions(+), 143 deletions(-) commit 2aec377a29250b942f14d3c16d49783da3e9df11 Author: Mike Snitzer Date: Tue Jul 5 14:00:36 2022 -0400 dm table: remove dm_table_get_num_targets() wrapper More efficient and readable to just access table->num_targets directly. Suggested-by: Linus Torvalds Signed-off-by: Mike Snitzer drivers/md/dm-ima.c | 2 +- drivers/md/dm-ioctl.c | 6 +++--- drivers/md/dm-table.c | 37 ++++++++++++++++--------------------- drivers/md/dm-zone.c | 2 +- drivers/md/dm.c | 4 ++-- include/linux/device-mapper.h | 1 - 6 files changed, 23 insertions(+), 29 deletions(-) commit 8b211aaccb915bbf4f4a68f1910c4de701df393b Author: Ming Lei Date: Fri Jun 24 22:12:55 2022 +0800 dm: add two stage requeue mechanism Commit 61b6e2e5321d ("dm: fix BLK_STS_DM_REQUEUE handling when dm_io represents split bio") reverted DM core's bio splitting back to using bio_split()+bio_chain() because it was found that otherwise DM's BLK_STS_DM_REQUEUE would trigger a live-lock waiting for bio completion that would never occur. Restore using bio_trim()+bio_inc_remaining(), like was done in commit 7dd76d1feec7 ("dm: improve bio splitting and associated IO accounting"), but this time with proper handling for the above scenario that is covered in more detail in the commit header for 61b6e2e5321d. Solve this issue by adding a two staged dm_io requeue mechanism that uses the new dm_bio_rewind() via dm_io_rewind(): 1) requeue the dm_io into the requeue_list added to struct mapped_device, and schedule it via new added requeue work. This workqueue just clones the dm_io->orig_bio (which DM saves and ensures its end sector isn't modified). dm_io_rewind() uses the sectors and sectors_offset members of the dm_io that are recorded relative to the end of orig_bio: dm_bio_rewind()+bio_trim() are then used to make that cloned bio reflect the subset of the original bio that is represented by the dm_io that is being requeued. 2) the 2nd stage requeue is same with original requeue, but io->orig_bio points to new cloned bio (which matches the requeued dm_io as described above). This allows DM core to shift the need for bio cloning from bio-split time (during IO submission) to the less likely BLK_STS_DM_REQUEUE handling (after IO completes with that error). Signed-off-by: Ming Lei Signed-off-by: Mike Snitzer drivers/md/dm-core.h | 15 ++++-- drivers/md/dm-io-rewind.c | 25 +++++++++- drivers/md/dm.c | 121 +++++++++++++++++++++++++++++++++++----------- 3 files changed, 130 insertions(+), 31 deletions(-) commit 61cbe7888d0376cd8828b52c5bca56987c6d6cfa Author: Ming Lei Date: Fri Jun 24 22:12:52 2022 +0800 dm: add dm_bio_rewind() API to DM core Commit 7759eb23fd98 ("block: remove bio_rewind_iter()") removed a similar API for the following reasons: ``` It is pointed that bio_rewind_iter() is one very bad API[1]: 1) bio size may not be restored after rewinding 2) it causes some bogus change, such as 5151842b9d8732 (block: reset bi_iter.bi_done after splitting bio) 3) rewinding really makes things complicated wrt. bio splitting 4) unnecessary updating of .bi_done in fast path [1] https://marc.info/?t=153549924200005&r=1&w=2 So this patch takes Kent's suggestion to restore one bio into its original state via saving bio iterator(struct bvec_iter) in bio_integrity_prep(), given now bio_rewind_iter() is only used by bio integrity code. ``` However, saving off a copy of the 32 bytes bio->bi_iter in case rewind needed isn't efficient because it bloats per-bio-data for what is an unlikely case. That suggestion also ignores the need to restore crypto and integrity info. Add dm_bio_rewind() API for a specific use-case that is much more narrow than the previous more generic rewind code that was reverted: 1) most bios have a fixed end sector since bio split is done from front of the bio, if driver just records how many sectors between current bio's start sector and the original bio's end sector, the original position can be restored. Keeping the original bio's end sector fixed is a _hard_ requirement for this interface! 2) if a bio's end sector won't change (usually bio_trim() isn't called, or in the case of DM it preserves original bio), user can restore the original position by storing sector offset from the current ->bi_iter.bi_sector to bio's end sector; together with saving bio size, only 8 bytes is needed to restore to original bio. 3) DM's requeue use case: when BLK_STS_DM_REQUEUE happens, DM core needs to restore to an "original bio" which represents the current dm_io to be requeued (which may be a subset of the original bio). By storing the sector offset from the original bio's end sector and dm_io's size, dm_bio_rewind() can restore such original bio. See commit 7dd76d1feec7 ("dm: improve bio splitting and associated IO accounting") for more details on how DM does this. Leveraging this, allows DM core to shift the need for bio cloning from bio-split time (during IO submission) to the less likely BLK_STS_DM_REQUEUE handling (after IO completes with that error). 4) Unlike the original rewind API, dm_bio_rewind() doesn't add .bi_done to bvec_iter and there is no effect on the fast path. Implement dm_bio_rewind() by factoring out clear helpers that it calls: dm_bio_integrity_rewind, dm_bio_crypt_rewind and dm_bio_rewind_iter. DM is able to ensure that dm_bio_rewind() is used safely but, given the constraint that the bio's end must never change, other hypothetical future callers may not take the same care. So make dm_bio_rewind() and all supporting code local to DM to avoid risk of hypothetical abuse. A "dm_" prefix was added to all functions to avoid any namespace collisions. Suggested-by: Jens Axboe Signed-off-by: Ming Lei Signed-off-by: Mike Snitzer drivers/md/Makefile | 2 +- drivers/md/dm-core.h | 2 + drivers/md/dm-io-rewind.c | 143 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 146 insertions(+), 1 deletion(-) commit 050237e6b0bea0fafbf7d3d57e717c6fa1e4e819 Author: Shengjiu Wang Date: Thu Jul 7 19:20:06 2022 +0800 ASoC: fsl_utils: Don't use plain integer as NULL pointer Fix sparse warning: sound/soc/fsl/fsl_utils.c:125:31: sparse: warning: Using plain integer as NULL pointer sound/soc/fsl/fsl_utils.c:125:42: sparse: warning: Using plain integer as NULL pointer Fixes: 7bad8125549c ("ASoC: fsl_utils: Add function to handle PLL clock source") Reported-by: kernel test robot Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1657192806-10569-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c61051561b02dc3c0974f8f883f986c62517bc3 Author: Hsin-Yi Wang Date: Mon May 30 19:30:33 2022 +0800 arm64: dts: mt8183: Add panel rotation krane, kakadu, and kodama boards have a default panel rotation. Signed-off-by: Hsin-Yi Wang Reviewed-by: Enric Balletbo i Serra Tested-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20220530113033.124072-2-hsinyi@chromium.org Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 1 + 1 file changed, 1 insertion(+) commit c98e6e683632386a3bd284acda4342e68aec4c41 Author: Nick Hainke Date: Thu Jun 30 13:16:57 2022 +0200 arm64: dts: mt7622: fix BPI-R64 WPS button The bananapi R64 (BPI-R64) experiences wrong WPS button signals. In OpenWrt pushing the WPS button while powering on the device will set it to recovery mode. Currently, this also happens without any user interaction. In particular, the wrong signals appear while booting the device or restarting it, e.g. after doing a system upgrade. If the device is in recovery mode the user needs to manually power cycle or restart it. The official BPI-R64 sources set the WPS button to GPIO_ACTIVE_LOW in the device tree. This setting seems to suppress the unwanted WPS button press signals. So this commit changes the button from GPIO_ACTIVE_HIGH to GPIO_ACTIVE_LOW. The official BPI-R64 sources can be found on https://github.com/BPI-SINOVOIP/BPI-R64-openwrt Fixes: 0b6286dd96c0 ("arm64: dts: mt7622: add bananapi BPI-R64 board") Suggested-by: INAGAKI Hiroshi Signed-off-by: Nick Hainke Link: https://lore.kernel.org/r/20220630111746.4098-1-vincent@systemli.org Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04266856cee7fd5f6a0fd4ff818cd7b7091dd87a Author: Xiangsheng Hou Date: Thu Jun 30 17:01:56 2022 +0800 arm64: dts: mt8173: Fix nor_flash node Add axi clock since the driver change to DMA mode which need to enable axi clock. And change spi clock to 26MHz as default. Signed-off-by: Xiangsheng Hou Link: https://lore.kernel.org/r/20220630090157.29486-2-xiangsheng.hou@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8173.dtsi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 10d4a706ff4244fe3131158cee30a65799925c1b Author: AngeloGioacchino Del Regno Date: Mon Jul 4 12:13:21 2022 +0200 arm64: dts: mediatek: cherry: Add I2C-HID touchscreen on I2C4 This platform carries a HID compatible I2C touchscreen on the i2c4 bus, but it may be at a different address, depending on the board model. Add the node for a touchscreen at 0x10, but enable it only in the final board dts. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220704101321.44835-12-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger .../boot/dts/mediatek/mt8195-cherry-tomato-r1.dts | 4 ++++ .../boot/dts/mediatek/mt8195-cherry-tomato-r2.dts | 4 ++++ .../boot/dts/mediatek/mt8195-cherry-tomato-r3.dts | 4 ++++ arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 28 ++++++++++++++++++++++ 4 files changed, 40 insertions(+) commit c34bc66086e763a3c957ea2568812dd02754dfb0 Author: AngeloGioacchino Del Regno Date: Mon Jul 4 12:13:20 2022 +0200 arm64: dts: mediatek: cherry: Enable support for the SPI NOR flash This platform has a SPI NOR: enable support for it, completing the storage compartment enablement for the entire platform. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220704101321.44835-11-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 0de0fe950f1b0f7b5eaa2ee4e93851eb905b1b77 Author: AngeloGioacchino Del Regno Date: Mon Jul 4 12:13:19 2022 +0200 arm64: dts: mediatek: cherry: Enable MT6360 sub-pmic on I2C7 All devices of the Cherry platform have a MT6360 sub-pmic, providing two LDOs. Add the required node to enable the PMIC but without regulators yet, as these will be added in a later commit. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220704101321.44835-10-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit b6267a396e1cc57b62dac5dd010f78d66b68bae4 Author: AngeloGioacchino Del Regno Date: Mon Jul 4 12:13:18 2022 +0200 arm64: dts: mediatek: cherry: Enable T-PHYs and USB XHCI controllers Add USB functionality by enabling the required PHYs and the XHCI controllers. This enables all of the supported USB ports on the Cherry boards. Please note that u3phy1 also enables u3port1, which is configured to be a PCI-Express PHY for the second PCIe controller that is found on the MT8195 SoC, which will be enabled in a later commit. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220704101321.44835-9-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 55 +++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit d82b3562c4dd435ea9c3a10cdfd3f98719d74e96 Author: AngeloGioacchino Del Regno Date: Mon Jul 4 12:13:17 2022 +0200 arm64: dts: mediatek: cherry: Enable I2C and SPI controllers This platform uses eight I2C controllers and one SPI controller: in preparation for enabling devices attached to these controllers, add basic configuration to enable the busses. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220704101321.44835-8-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 148 ++++++++++++++++++++++++ 1 file changed, 148 insertions(+) commit 5bf7dabe40f223d550a984651aafc7907ad8716f Author: AngeloGioacchino Del Regno Date: Mon Jul 4 12:13:16 2022 +0200 arm64: dts: mediatek: cherry: Document gpios and add default pin config Add gpio-line-names to document GPIO names and add the default basic pin configuration to allow lower power operation by setting appropriate state on the unused pins. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220704101321.44835-7-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger .../boot/dts/mediatek/mt8195-cherry-tomato-r2.dts | 20 +++ .../boot/dts/mediatek/mt8195-cherry-tomato-r3.dts | 20 +++ arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 199 +++++++++++++++++++++ 3 files changed, 239 insertions(+) commit 4d3807080708d824d8674c8d93fd32652f00d41d Author: AngeloGioacchino Del Regno Date: Mon Jul 4 12:13:15 2022 +0200 arm64: dts: mediatek: cherry: Add support for internal eMMC storage Add mtk-sd controller and pin configuration to enable the internal eMMC storage: now it is possible to mount a rootfs located at the internal storage. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220704101321.44835-6-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 87 +++++++++++++++++++++++++ 1 file changed, 87 insertions(+) commit 9e0565069b14f44506563d4f89edbdffd8fc09ea Author: AngeloGioacchino Del Regno Date: Mon Jul 4 12:13:14 2022 +0200 arm64: dts: mediatek: cherry: Assign interrupt line to MT6359 PMIC To allow MT6359 peripherals to trigger interrupts and the driver to safely handle them, assign the right interrupt line for the Cherry platform to the MT6359 PMIC node. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220704101321.44835-5-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 37242cb97afa653fd65d184c216dffa109cfc54b Author: AngeloGioacchino Del Regno Date: Mon Jul 4 12:13:13 2022 +0200 arm64: dts: mediatek: cherry: Add platform regulators layout and config Add the regulators layout for this platform, including the basic power rails controlled by the EC (and/or always on). Moreover, include the MT6359 PMIC devicetree and add some configuration for its regulators, essential to keep the machine alive after booting. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220704101321.44835-4-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 104 ++++++++++++++++++++++++ 1 file changed, 104 insertions(+) commit 5eb2e303ec6b8923adf61eba130f711196de7fd5 Author: AngeloGioacchino Del Regno Date: Mon Jul 4 12:13:12 2022 +0200 arm64: dts: mediatek: Introduce MT8195 Cherry platform's Tomato Introduce the MT8195 Cherry Chromebook platform, including three revisions of Cherry Tomato boards. This basic configuration allows to boot Linux on all board revisions and get a serial console from a ramdisk. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220704101321.44835-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/Makefile | 3 +++ .../boot/dts/mediatek/mt8195-cherry-tomato-r1.dts | 11 +++++++++ .../boot/dts/mediatek/mt8195-cherry-tomato-r2.dts | 11 +++++++++ .../boot/dts/mediatek/mt8195-cherry-tomato-r3.dts | 12 ++++++++++ arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 26 ++++++++++++++++++++++ 5 files changed, 63 insertions(+) commit 61d8066b4efbabad2d4cb244ae24d868a79d9ebd Author: AngeloGioacchino Del Regno Date: Mon Jul 4 12:13:11 2022 +0200 dt-bindings: arm: mediatek: Add MT8195 Cherry Tomato Chromebooks Document board compatibles for the MT8195 Cherry platform's Tomato Chromebooks, at the time of writing composed of four revisions (r1, r2, r3-r4). Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220704101321.44835-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger Documentation/devicetree/bindings/arm/mediatek.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b0e50a1f5d240bc71ffc2dbdca9cc986bc370279 Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:56 2022 -0400 arm64: dts: mediatek: asurada: Add SPI NOR flash memory Add support for the SPI NOR flash memory present on the Asurada platform. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220629155956.1138955-20-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 40 ++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit b10e80b173b608a36b2d799272884c87c054530e Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:55 2022 -0400 arm64: dts: mediatek: asurada: Enable SCP Enable support for the SCP co-processor present on MT8192. It is used as part of the video encoding and decoding processes. A region of memory is carved out for its use, and remoteproc setup for communication with the ChromeOS EC. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220629155956.1138955-19-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 15306b9062f8d30e68dd4cd709b33e258164e22c Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:54 2022 -0400 arm64: dts: mediatek: asurada: Enable MMC Enable both MMC controllers present on Asurada. MMC0 is for non-removable internal memory, while MMC1 is an SD card slot. MMC1 isn't used on all machines, but in those cases the CD interrupt is never triggered and thus it is basically as if it was disabled. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220629155956.1138955-18-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 149 +++++++++++++++++++++++ 1 file changed, 149 insertions(+) commit 3183cb62b0338e7d2a47ea84cea5c2d95c20f8ab Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:53 2022 -0400 arm64: dts: mediatek: asurada: Add SPMI regulators The Asurada platform uses regulators from MT6315 PMICs acessible through SPMI. Add support for them. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220629155956.1138955-17-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 49 ++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit af9e3ed08775dee9ffed86e57ca9e8c774f51df5 Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:52 2022 -0400 arm64: dts: mediatek: asurada: Add MT6359 PMIC MT6359 is the primary PMIC present on the Asurada platform. Include its dtsi and configure properties specific for the platform. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220629155956.1138955-16-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 0dca9f0b3e63014600588232448292b211e5075e Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:51 2022 -0400 arm64: dts: mediatek: asurada: Enable PCIe and add WiFi Enable MT8192's PCIe controller and add support for the MT7921e WiFi card that is present on that bus for the Asurada platform. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220629155956.1138955-15-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 74 ++++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit aa421ef2eef569dd92db214c89a019a151b0a9d1 Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:50 2022 -0400 arm64: dts: mediatek: asurada: Enable XHCI Enable XHCI controller on the Asurada platform. This allows the use of the USB ports, and therefore a rootfs can be loaded and a usable shell reached from a live USB image. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220629155956.1138955-14-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6812f4ed6e77f422be5a17e5cebf14bd51411c5e Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:49 2022 -0400 arm64: dts: mediatek: spherion: Add keyboard backlight The Spherion board has keyboard backlight controlled by the PWM signal generated by the ChromeOS EC. Enable PWM output for ChromeOS EC and add a PWM controlled LED node for the keyboard backlight. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220629155956.1138955-13-nfraprado@collabora.com Signed-off-by: Matthias Brugger .../boot/dts/mediatek/mt8192-asurada-spherion-r0.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit cbd4af081a216025dd5c8a8f6a653c47c8a02353 Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:48 2022 -0400 arm64: dts: mediatek: asurada: Add I2C touchscreen All machines of the Asurada platform have a touchscreen at address 0x10 in the I2C0 bus, but the devices vary: Spherion has the Elan eKTH3500 touchscreen, while Hayato has a generic HID-over-i2c touchscreen. Add common support for the touchscreens on the platform and the specifics in each board file. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220629155956.1138955-12-nfraprado@collabora.com Signed-off-by: Matthias Brugger .../boot/dts/mediatek/mt8192-asurada-hayato-r1.dts | 7 ++++++ .../dts/mediatek/mt8192-asurada-spherion-r0.dts | 4 ++++ arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 25 ++++++++++++++++++++++ 3 files changed, 36 insertions(+) commit e031715a7027c63e0f722a0a4d844c3d9c020b71 Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:47 2022 -0400 arm64: dts: mediatek: asurada: Add Elan eKTH3000 I2C trackpad Add support for the Elan eKTH3000 i2c trackpad present on Asurada. It is connected to the I2C2 bus and has address 0x15. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220629155956.1138955-11-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 863fb752352a7e48ea67b0f772e016aee130a09a Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:46 2022 -0400 arm64: dts: mediatek: asurada: Add Cr50 TPM The Asurada platform has a Google Security Chip connected to the SPI5 bus. It runs the cr50 firmware and provides TPM functionality. Add support for it. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220629155956.1138955-10-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 9b909db680c0c213cd911933e9e25fe20c7c062d Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:45 2022 -0400 arm64: dts: mediatek: asurada: Add keyboard mapping for the top row Chromebooks' embedded keyboards differ from standard layouts for the top row in that they have shortcuts in place of the standard function keys. Map these keys to achieve the functionality that is pictured on the printouts. There's a minor difference between the keys present on Hayato, which uses an older layout, and Spherion, which uses a newer one. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220629155956.1138955-9-nfraprado@collabora.com Signed-off-by: Matthias Brugger .../boot/dts/mediatek/mt8192-asurada-hayato-r1.dts | 29 ++++++++++++++++++++++ .../dts/mediatek/mt8192-asurada-spherion-r0.dts | 29 ++++++++++++++++++++++ 2 files changed, 58 insertions(+) commit eb188a2aaa823849b8a5993fc0fd8a8c5e049c56 Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:44 2022 -0400 arm64: dts: mediatek: asurada: Add ChromeOS EC Add support for the ChromeOS Embedded Controller present on the Asurada platform. It is connected through the SPI1 bus and offers several functionalities: base detection, PWM controller, I2C tunneling, regulators, Type-C connector management, keyboard and Smart Battery Metrics (SBS). Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220629155956.1138955-8-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 79 ++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit 23e0fff324b88855626077d7de7c83dde151707d Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:43 2022 -0400 arm64: dts: mediatek: asurada: Enable and configure I2C and SPI busses The Asurada platform has five I2C controllers and two SPI controllers that are used. In preparation for enabling the devices connected to these controllers, enable and configure their busses. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220629155956.1138955-7-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 126 +++++++++++++++++++++++ 1 file changed, 126 insertions(+) commit cb75aeaf8915a6cdbb90878718b793c8c3bdbab5 Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:42 2022 -0400 arm64: dts: mediatek: asurada: Add system-wide power supplies Add system-wide power supplies present on all of the boards in the Asurada family. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220629155956.1138955-6-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 64 ++++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit 9ec952276f67ec39115d62ca3ffa6a987e9b8d05 Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:41 2022 -0400 arm64: dts: mediatek: asurada: Document GPIO names Add the gpio-line-names property to gpio-controller in order to document the usage of GPIOs on the Asurada platform. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220629155956.1138955-5-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 228 +++++++++++++++++++++++ 1 file changed, 228 insertions(+) commit 331fae2fc922a0cd1dff9d716b2088b611c91f89 Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:40 2022 -0400 arm64: dts: mediatek: Introduce MT8192-based Asurada board family Introduce the MT8192 Asurada Chromebook platform, including the Asurada Spherion and Asurada Hayato boards. This is enough configuration to get serial output working on Spherion and Hayato. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220629155956.1138955-4-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/Makefile | 2 ++ .../boot/dts/mediatek/mt8192-asurada-hayato-r1.dts | 11 +++++++++ .../dts/mediatek/mt8192-asurada-spherion-r0.dts | 13 +++++++++++ arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 26 ++++++++++++++++++++++ 4 files changed, 52 insertions(+) commit 87136ff6feea3ab5ad295f6b5f461f5e2ac81ab5 Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:39 2022 -0400 dt-bindings: arm64: dts: mediatek: Add mt8192-asurada-hayato Add binding for the Google Hayato board. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220629155956.1138955-3-nfraprado@collabora.com Signed-off-by: Matthias Brugger Documentation/devicetree/bindings/arm/mediatek.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit cda34e81b3f1bc9fca4d2f54950f46c9cabfd712 Author: Nícolas F. R. A. Prado Date: Wed Jun 29 11:59:38 2022 -0400 dt-bindings: arm64: dts: mediatek: Add mt8192-asurada-spherion Add binding for the Google Spherion board, which is used for Acer Chromebook 514 (CB514-2H). Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220629155956.1138955-2-nfraprado@collabora.com Signed-off-by: Matthias Brugger Documentation/devicetree/bindings/arm/mediatek.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2b4b2621fd6401865b31b9f403e4b936b7439e94 Author: Dave Marchevsky Date: Tue Jul 5 12:00:18 2022 -0700 selftests/bpf: Add benchmark for local_storage RCU Tasks Trace usage This benchmark measures grace period latency and kthread cpu usage of RCU Tasks Trace when many processes are creating/deleting BPF local_storage. Intent here is to quantify improvement on these metrics after Paul's recent RCU Tasks patches [0]. Specifically, fork 15k tasks which call a bpf prog that creates/destroys task local_storage and sleep in a loop, resulting in many call_rcu_tasks_trace calls. To determine grace period latency, trace time elapsed between rcu_tasks_trace_pregp_step and rcu_tasks_trace_postgp; for cpu usage look at rcu_task_trace_kthread's stime in /proc/PID/stat. On my virtualized test environment (Skylake, 8 cpus) benchmark results demonstrate significant improvement: BEFORE Paul's patches: SUMMARY tasks_trace grace period latency avg 22298.551 us stddev 1302.165 us SUMMARY ticks per tasks_trace grace period avg 2.291 stddev 0.324 AFTER Paul's patches: SUMMARY tasks_trace grace period latency avg 16969.197 us stddev 2525.053 us SUMMARY ticks per tasks_trace grace period avg 1.146 stddev 0.178 Note that since these patches are not in bpf-next benchmarking was done by cherry-picking this patch onto rcu tree. [0] https://lore.kernel.org/rcu/20220620225402.GA3842369@paulmck-ThinkPad-P17-Gen-1/ Signed-off-by: Dave Marchevsky Signed-off-by: Daniel Borkmann Acked-by: Paul E. McKenney Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20220705190018.3239050-1-davemarchevsky@fb.com tools/testing/selftests/bpf/Makefile | 4 +- tools/testing/selftests/bpf/bench.c | 42 +++ tools/testing/selftests/bpf/bench.h | 12 + .../benchs/bench_local_storage_rcu_tasks_trace.c | 281 +++++++++++++++++++++ .../run_bench_local_storage_rcu_tasks_trace.sh | 11 + .../progs/local_storage_rcu_tasks_trace_bench.c | 67 +++++ 6 files changed, 416 insertions(+), 1 deletion(-) commit 935dc35c75318fa213d26808ad8bb130fb0b486e Author: Yixun Lan Date: Wed Jul 6 22:02:04 2022 +0800 libbpf, riscv: Use a0 for RC register According to the RISC-V calling convention register usage here [0], a0 is used as return value register, so rename it to make it consistent with the spec. [0] section 18.2, table 18.2 https://riscv.org/wp-content/uploads/2015/01/riscv-calling.pdf Fixes: 589fed479ba1 ("riscv, libbpf: Add RISC-V (RV64) support to bpf_tracing.h") Signed-off-by: Yixun Lan Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Acked-by: Amjad OULED-AMEUR Link: https://lore.kernel.org/bpf/20220706140204.47926-1-dlan@gentoo.org tools/lib/bpf/bpf_tracing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfec073fc9bf53e009ab399322471be9ec807ff6 Merge: ab34403db242 8a7691010992 Author: Mark Brown Date: Thu Jul 7 14:53:16 2022 +0100 ASoC: cleanups and improvements for jz4740-i2s Merge series from Aidan MacDonald : This series is a preparatory cleanup of the jz4740-i2s driver before adding support for a new SoC. commit 751f4d14cdb47df3721d1a7431cc1d5a790f9302 Author: Bryan O'Donoghue Date: Thu Jul 7 10:38:23 2022 +0100 interconnect: icc-rpm: Set destination bandwidth as well as source bandwidth Make it possible to set destination as well as source bandwidth. If the *dst pointer is non-NULL. Right now it appears that we never make the destination bw allocation call, which is inconsistent with the downstream way of doing this. Signed-off-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20220707093823.1691870-1-bryan.odonoghue@linaro.org Signed-off-by: Georgi Djakov drivers/interconnect/qcom/icc-rpm.c | 41 +++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 11 deletions(-) commit 85c73bf726e41be276bcad3325d9a8aef10be289 Author: Dave Chinner Date: Thu Jul 7 22:05:18 2022 +1000 xfs: rework xfs_buf_incore() API Make it consistent with the other buffer APIs to return a error and the buffer is placed in a parameter. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/libxfs/xfs_attr_remote.c | 15 ++++++++++----- fs/xfs/scrub/repair.c | 15 +++++++++------ fs/xfs/xfs_buf.c | 19 ++----------------- fs/xfs/xfs_buf.h | 20 ++++++++++++++++---- fs/xfs/xfs_qm.c | 9 ++++----- 5 files changed, 41 insertions(+), 37 deletions(-) commit 79152fc74ff664e2912abe17f21c42d7c49c90c9 Author: Mark Brown Date: Thu Jul 7 12:17:53 2022 +0100 regulator: Fix MFD_MAX597X dependency Drivers should depend on rather than select their MFDs. Reported-by: Stephen Rothwell Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220707111753.16581-1-broonie@kernel.org Signed-off-by: Mark Brown drivers/regulator/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a7691010992886290b340a1ba943067c2e70f85 Author: Aidan MacDonald Date: Wed Jul 6 22:13:21 2022 +0100 ASoC: jz4740-i2s: Refactor DMA channel setup It's simpler to set up the playback and capture DMA settings at driver probe time instead of during DAI probing. Signed-off-by: Aidan MacDonald Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/20220706211330.120198-3-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown sound/soc/jz4740/jz4740-i2s.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) commit 98356c89d44dac838dfbab02975645d828de3099 Author: Aidan MacDonald Date: Wed Jul 6 22:13:20 2022 +0100 ASoC: jz4740-i2s: Remove Open Firmware dependency This driver doesn't require Open Firmware support. Remove the OF-specific includes and drop the Kconfig dependency. Signed-off-by: Aidan MacDonald Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/20220706211330.120198-2-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown sound/soc/jz4740/Kconfig | 2 +- sound/soc/jz4740/jz4740-i2s.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit cf21b355ccb39b0de0b6a7362532bb5584c84a80 Author: Kuniyuki Iwashima Date: Tue Jul 5 16:37:15 2022 -0700 af_unix: Optimise hash table layout. Commit 6dd4142fb5a9 ("Merge branch 'af_unix-per-netns-socket-hash'") and commit 51bae889fe11 ("af_unix: Put pathname sockets in the global hash table.") changed a hash table layout. Before: unix_socket_table [0 - 255] : abstract & pathname sockets [256 - 511] : unnamed sockets After: per-netns table [0 - 255] : abstract & pathname sockets [256 - 511] : unnamed sockets bsd_socket_table [0 - 255] : pathname sockets (sk_bind_node) Now, while looking up sockets, we traverse the global table for the pathname sockets and the first half of each per-netns hash table for abstract sockets, where pathname sockets are also linked. Thus, the more pathname sockets we have, the longer we take to look up abstract sockets. This characteristic has been there before the layout change, but we can improve it now. This patch changes the per-netns hash table's layout so that sockets not requiring lookup reside in the first half and do not impact the lookup of abstract sockets. per-netns table [0 - 255] : pathname & unnamed sockets [256 - 511] : abstract sockets bsd_socket_table [0 - 255] : pathname sockets (sk_bind_node) We have run a test that bind()s 100,000 abstract/pathname sockets for each, bind()s an abstract socket 100,000 times and measures the time on __unix_find_socket_byname(). The result shows that the patch makes each lookup faster. Without this patch: $ sudo ./funclatency -p 2278 --microseconds __unix_find_socket_byname.isra.44 usec : count distribution 0 -> 1 : 0 | | 2 -> 3 : 0 | | 4 -> 7 : 0 | | 8 -> 15 : 126 | | 16 -> 31 : 1438 |* | 32 -> 63 : 4150 |*** | 64 -> 127 : 9049 |******* | 128 -> 255 : 37704 |******************************* | 256 -> 511 : 47533 |****************************************| With this patch: $ sudo ./funclatency -p 3648 --microseconds __unix_find_socket_byname.isra.46 usec : count distribution 0 -> 1 : 109 | | 2 -> 3 : 318 | | 4 -> 7 : 725 | | 8 -> 15 : 2501 |* | 16 -> 31 : 3061 |** | 32 -> 63 : 4028 |*** | 64 -> 127 : 9312 |******* | 128 -> 255 : 51372 |****************************************| 256 -> 511 : 28574 |********************** | Signed-off-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20220705233715.759-1-kuniyu@amazon.com Signed-off-by: Paolo Abeni net/unix/af_unix.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit ab34403db24233e603338b70deb9a84093c88397 Author: Vijendar Mukunda Date: Thu Jul 7 02:25:14 2022 +0530 ASoC: amd: fix ACPI dependency compile errors and warnings Fixed ACPI dependency complie errors and warnings as listed below. All warnings (new ones prefixed by >>): sound/soc/soc-acpi.c:34:1: error: redefinition of 'snd_soc_acpi_find_machine' 34 | snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines) | ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from sound/soc/soc-acpi.c:9: include/sound/soc-acpi.h:38:1: note: previous definition of 'snd_soc_acpi_find_machine' with type 'struct snd_soc_acpi_mach *(struct snd_soc_acpi_mach *)' 38 | snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines) | ^~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/soc-acpi.c: In function 'snd_soc_acpi_find_package': sound/soc/soc-acpi.c:58:36: error: implicit declaration of function 'acpi_fetch_acpi_dev'; did you mean 'device_match_acpi_dev'? [-Werror=implicit-function-declaration] 58 | struct acpi_device *adev = acpi_fetch_acpi_dev(handle); | ^~~~~~~~~~~~~~~~~~~ | device_match_acpi_dev >> sound/soc/soc-acpi.c:58:36: warning: initialization of 'struct acpi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion] sound/soc/soc-acpi.c:64:25: error: invalid use of undefined type 'struct acpi_device' 64 | if (adev && adev->status.present && adev->status.functional) { | ^~ sound/soc/soc-acpi.c:64:49: error: invalid use of undefined type 'struct acpi_device' 64 | if (adev && adev->status.present && adev->status.functional) { | ^~ sound/soc/soc-acpi.c:80:26: error: implicit declaration of function 'acpi_extract_package' [-Werror=implicit-function-declaration] 80 | status = acpi_extract_package(myobj, | ^~~~~~~~~~~~~~~~~~~~ sound/soc/soc-acpi.c: At top level: sound/soc/soc-acpi.c:95:6: error: redefinition of 'snd_soc_acpi_find_package_from_hid' 95 | bool snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN], | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from sound/soc/soc-acpi.c:9: include/sound/soc-acpi.h:44:1: note: previous definition of 'snd_soc_acpi_find_package_from_hid' with type 'bool(const u8 *, struct snd_soc_acpi_package_context *)' {aka '_Bool(const unsigned char *, struct snd_soc_acpi_package_context *)'} 44 | snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN], | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/soc-acpi.c:109:27: error: redefinition of 'snd_soc_acpi_codec_list' 109 | struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg) | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from sound/soc/soc-acpi.c:9: include/sound/soc-acpi.h:51:41: note: previous definition of 'snd_soc_acpi_codec_list' with type 'struct snd_soc_acpi_mach *(void *)' 51 | static inline struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg) | ^~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Vijendar Mukunda Reported-by: kernel test robot Link: https://lore.kernel.org/r/20220706205515.2485601-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown sound/soc/amd/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit aaaee7b55c9e58410abcef6e3e2fd80e4135d02e Author: Will Deacon Date: Thu Jul 7 11:25:40 2022 +0100 docs: perf: Include hns3-pmu.rst in toctree to fix 'htmldocs' WARNING After commit 39915b6b5fc2 ("drivers/perf: hisi: Add description for HNS3 PMU driver"),building the 'htmldocs' target results in the following warning: | Documentation/admin-guide/perf/hns3-pmu.rst: WARNING: document isn't included in any toctree Add 'hns3-pmu' to the perf toctree to silence the warning. Reported-by: Stephen Rothwell Signed-off-by: Will Deacon Documentation/admin-guide/perf/index.rst | 1 + 1 file changed, 1 insertion(+) commit c749d676a33d99ee4c40d69ac2bf280270d890ad Author: Nathan Chancellor Date: Wed Jun 22 10:56:49 2022 -0700 soc: mediatek: SVS: Use DEFINE_SIMPLE_DEV_PM_OPS for svs_pm_ops When building this driver for an architecture that does not support CONFIG_PM_SLEEP, such as hexagon, the following warnings occur: drivers/soc/mediatek/mtk-svs.c:1481:12: error: unused function 'svs_suspend' [-Werror,-Wunused-function] static int svs_suspend(struct device *dev) ^ drivers/soc/mediatek/mtk-svs.c:1515:12: error: unused function 'svs_resume' [-Werror,-Wunused-function] static int svs_resume(struct device *dev) ^ 2 errors generated. This happens because SIMPLE_DEV_PM_OPS uses SET_SYSTEM_SLEEP_PM_OPS, which evaluates to nothing when CONFIG_PM_SLEEP is not set, leaving the functions unused in the eyes of the compiler. This problem was rectified in commit 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones") with new macros. Use DEFINE_SIMPLE_DEV_PM_OPS to fix the warning while not changing svs_pm_ops when CONFIG_PM_SLEEP is set. Fixes: 681a02e95000 ("soc: mediatek: SVS: introduce MTK SVS engine") Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20220622175649.1856337-1-nathan@kernel.org Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-svs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13bde169c6fe0ff7a527927a838eb732d6b14f37 Author: AngeloGioacchino Del Regno Date: Thu Jun 23 14:38:49 2022 +0200 soc: mediatek: mtk-pm-domains: Allow probing vreg supply on two MFGs MediaTek SoCs have multiple MFG power-domains, exclusively used for the GPU which, in turn, requires external power supplies: make sure to have the MTK_SCPD_DOMAIN_SUPPLY cap on the two topmost MFGs to allow voting for regulators on/off upon usage of these power domains. This also ensures that the SRAM is actually powered and that we're not relying on the bootloader leaving this supply on when performing the first (and latter) poweron sequence for these domains' sram. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220623123850.110225-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mt8183-pm-domains.h | 1 + drivers/soc/mediatek/mt8186-pm-domains.h | 2 +- drivers/soc/mediatek/mt8192-pm-domains.h | 2 ++ drivers/soc/mediatek/mt8195-pm-domains.h | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) commit 20794545c14692094a882d2221c251c4573e6adf Author: Catalin Marinas Date: Fri Jun 10 16:21:41 2022 +0100 arm64: kasan: Revert "arm64: mte: reset the page tag in page->flags" This reverts commit e5b8d9218951e59df986f627ec93569a0d22149b. Pages mapped in user-space with PROT_MTE have the allocation tags either zeroed or copied/restored to some user values. In order for the kernel to access such pages via page_address(), resetting the tag in page->flags was necessary. This tag resetting was deferred to set_pte_at() -> mte_sync_page_tags() but it can race with another CPU reading the flags (via page_to_virt()): P0 (mte_sync_page_tags): P1 (memcpy from virt_to_page): Rflags!=0xff Wflags=0xff DMB (doesn't help) Wtags=0 Rtags=0 // fault Since now the post_alloc_hook() function resets the page->flags tag when unpoisoning is skipped for user pages (including the __GFP_ZEROTAGS case), revert the arm64 commit calling page_kasan_tag_reset(). Signed-off-by: Catalin Marinas Cc: Will Deacon Cc: Vincenzo Frascino Cc: Andrey Konovalov Cc: Peter Collingbourne Reviewed-by: Vincenzo Frascino Acked-by: Andrey Konovalov Link: https://lore.kernel.org/r/20220610152141.2148929-5-catalin.marinas@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/hibernate.c | 5 ----- arch/arm64/kernel/mte.c | 9 --------- arch/arm64/mm/copypage.c | 9 --------- arch/arm64/mm/mteswap.c | 9 --------- 4 files changed, 32 deletions(-) commit 6d05141a393071e104bf5be5ad4d0c79c6dff343 Author: Catalin Marinas Date: Fri Jun 10 16:21:40 2022 +0100 mm: kasan: Skip page unpoisoning only if __GFP_SKIP_KASAN_UNPOISON Currently post_alloc_hook() skips the kasan unpoisoning if the tags will be zeroed (__GFP_ZEROTAGS) or __GFP_SKIP_KASAN_UNPOISON is passed. Since __GFP_ZEROTAGS is now accompanied by __GFP_SKIP_KASAN_UNPOISON, remove the extra check. Signed-off-by: Catalin Marinas Cc: Andrey Ryabinin Cc: Andrey Konovalov Cc: Peter Collingbourne Cc: Vincenzo Frascino Reviewed-by: Vincenzo Frascino Reviewed-by: Andrey Konovalov Link: https://lore.kernel.org/r/20220610152141.2148929-4-catalin.marinas@arm.com Signed-off-by: Will Deacon mm/page_alloc.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 70c248aca9e7efa85a6664d5ab56c17c326c958f Author: Catalin Marinas Date: Fri Jun 10 16:21:39 2022 +0100 mm: kasan: Skip unpoisoning of user pages Commit c275c5c6d50a ("kasan: disable freed user page poisoning with HW tags") added __GFP_SKIP_KASAN_POISON to GFP_HIGHUSER_MOVABLE. A similar argument can be made about unpoisoning, so also add __GFP_SKIP_KASAN_UNPOISON to user pages. To ensure the user page is still accessible via page_address() without a kasan fault, reset the page->flags tag. With the above changes, there is no need for the arm64 tag_clear_highpage() to reset the page->flags tag. Signed-off-by: Catalin Marinas Cc: Andrey Ryabinin Cc: Andrey Konovalov Cc: Peter Collingbourne Cc: Vincenzo Frascino Reviewed-by: Vincenzo Frascino Reviewed-by: Andrey Konovalov Link: https://lore.kernel.org/r/20220610152141.2148929-3-catalin.marinas@arm.com Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 1 - include/linux/gfp.h | 2 +- mm/page_alloc.c | 7 +++++-- 3 files changed, 6 insertions(+), 4 deletions(-) commit ed0a6d1d973e9763989b44913ae1bd2a5d5d5777 Author: Catalin Marinas Date: Fri Jun 10 16:21:38 2022 +0100 mm: kasan: Ensure the tags are visible before the tag in page->flags __kasan_unpoison_pages() colours the memory with a random tag and stores it in page->flags in order to re-create the tagged pointer via page_to_virt() later. When the tag from the page->flags is read, ensure that the in-memory tags are already visible by re-ordering the page_kasan_tag_set() after kasan_unpoison(). The former already has barriers in place through try_cmpxchg(). On the reader side, the order is ensured by the address dependency between page->flags and the memory access. Signed-off-by: Catalin Marinas Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Vincenzo Frascino Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20220610152141.2148929-2-catalin.marinas@arm.com Signed-off-by: Will Deacon mm/kasan/common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 63859d711a13c7dd96f499b921793363db1a76dd Author: AngeloGioacchino Del Regno Date: Thu Jun 23 14:38:50 2022 +0200 arm64: dts: mediatek: mt8183-kukui: Assign sram supply to mfg_async pd Add a phandle to the MT8183_POWER_DOMAIN_MFG_ASYNC power domain and assign the GPU VSRAM supply to this in mt8183-kukui: this allows to keep the sram powered up while the GPU is used. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220623123850.110225-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 4 ++++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 36029dee382a20cf515494376ce9f0d5949944eb Author: Dave Chinner Date: Thu Jul 7 19:13:21 2022 +1000 xfs: make is_log_ag() a first class helper We check if an ag contains the log in many places, so make this a first class XFS helper by lifting it to fs/xfs/libxfs/xfs_ag.h and renaming it xfs_ag_contains_log(). The convert all the places that check if the AG contains the log to use this helper. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/libxfs/xfs_ag.c | 12 +++--------- fs/xfs/libxfs/xfs_ag.h | 7 +++++++ fs/xfs/libxfs/xfs_ialloc.c | 3 +-- fs/xfs/libxfs/xfs_ialloc_btree.c | 3 +-- fs/xfs/libxfs/xfs_refcount_btree.c | 3 +-- fs/xfs/libxfs/xfs_rmap_btree.c | 3 +-- fs/xfs/scrub/health.c | 2 ++ fs/xfs/scrub/refcount.c | 2 ++ 8 files changed, 18 insertions(+), 17 deletions(-) commit 3829c9a10fc7da40194ec9860df8c557c2b86ed8 Author: Dave Chinner Date: Thu Jul 7 19:13:17 2022 +1000 xfs: replace xfs_ag_block_count() with perag accesses Many of the places that call xfs_ag_block_count() have a perag available. These places can just read pag->block_count directly instead of calculating the AG block count from first principles. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/libxfs/xfs_ialloc_btree.c | 10 +++++----- fs/xfs/scrub/agheader_repair.c | 6 ++---- fs/xfs/scrub/repair.c | 8 ++++---- 3 files changed, 11 insertions(+), 13 deletions(-) commit 2d6ca8321c354e1cb6f6b1963c4f7bd053d2e272 Author: Dave Chinner Date: Thu Jul 7 19:13:10 2022 +1000 xfs: Pre-calculate per-AG agino geometry There is a lot of overhead in functions like xfs_verify_agino() that repeatedly calculate the geometry limits of an AG. These can be pre-calculated as they are static and the verification context has a per-ag context it can quickly reference. In the case of xfs_verify_agino(), we now always have a perag context handy, so we can store the minimum and maximum agino values in the AG in the perag. This means we don't have to calculate it on every call and it can be inlined in callers if we move it to xfs_ag.h. xfs_verify_agino_or_null() gets the same perag treatment. xfs_agino_range() is moved to xfs_ag.c as it's not really a type function, and it's use is largely restricted as the first and last aginos can be grabbed straight from the perag in most cases. Note that we leave the original xfs_verify_agino in place in xfs_types.c as a static function as other callers in that file do not have per-ag contexts so still need to go the long way. It's been renamed to xfs_verify_agno_agino() to indicate it takes both an agno and an agino to differentiate it from new function. $ size --totals fs/xfs/built-in.a text data bss dec hex filename before 1482185 329588 572 1812345 1ba779 (TOTALS) after 1481937 329588 572 1812097 1ba681 (TOTALS) Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/libxfs/xfs_ag.c | 39 ++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_ag.h | 30 +++++++++++++++++++++++ fs/xfs/libxfs/xfs_ialloc.c | 6 ++--- fs/xfs/libxfs/xfs_inode_buf.c | 5 ++-- fs/xfs/libxfs/xfs_types.c | 55 ++++--------------------------------------- fs/xfs/libxfs/xfs_types.h | 6 ----- fs/xfs/scrub/agheader.c | 6 ++--- fs/xfs/scrub/ialloc.c | 6 ++--- fs/xfs/scrub/repair.c | 9 +++---- fs/xfs/xfs_inode.c | 14 +++++------ 10 files changed, 95 insertions(+), 81 deletions(-) commit 0800169e3e2c97a033e8b7f3d1e6c689e0d71a19 Author: Dave Chinner Date: Thu Jul 7 19:13:02 2022 +1000 xfs: Pre-calculate per-AG agbno geometry There is a lot of overhead in functions like xfs_verify_agbno() that repeatedly calculate the geometry limits of an AG. These can be pre-calculated as they are static and the verification context has a per-ag context it can quickly reference. In the case of xfs_verify_agbno(), we now always have a perag context handy, so we can store the AG length and the minimum valid block in the AG in the perag. This means we don't have to calculate it on every call and it can be inlined in callers if we move it to xfs_ag.h. Move xfs_ag_block_count() to xfs_ag.c because it's really a per-ag function and not an XFS type function. We need a little bit of rework that is specific to xfs_initialise_perag() to allow growfs to calculate the new perag sizes before we've updated the primary superblock during the grow (chicken/egg situation). Note that we leave the original xfs_verify_agbno in place in xfs_types.c as a static function as other callers in that file do not have per-ag contexts so still need to go the long way. It's been renamed to xfs_verify_agno_agbno() to indicate it takes both an agno and an agbno to differentiate it from new function. Future commits will make similar changes for other per-ag geometry validation functions. Further: $ size --totals fs/xfs/built-in.a text data bss dec hex filename before 1483006 329588 572 1813166 1baaae (TOTALS) after 1482185 329588 572 1812345 1ba779 (TOTALS) This rework reduces the binary size by ~820 bytes, indicating that much less work is being done to bounds check the agbno values against on per-ag geometry information. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/libxfs/xfs_ag.c | 40 +++++++++++++++++++++++++++++++++++++++- fs/xfs/libxfs/xfs_ag.h | 21 ++++++++++++++++++++- fs/xfs/libxfs/xfs_alloc.c | 9 +++++---- fs/xfs/libxfs/xfs_btree.c | 25 ++++++++++--------------- fs/xfs/libxfs/xfs_refcount.c | 13 ++++++------- fs/xfs/libxfs/xfs_rmap.c | 8 ++++---- fs/xfs/libxfs/xfs_types.c | 18 +++--------------- fs/xfs/libxfs/xfs_types.h | 3 --- fs/xfs/scrub/agheader.c | 19 +++++++++---------- fs/xfs/scrub/agheader_repair.c | 7 ++----- fs/xfs/scrub/alloc.c | 7 +++---- fs/xfs/scrub/ialloc.c | 6 +++--- fs/xfs/scrub/refcount.c | 7 +++---- fs/xfs/scrub/rmap.c | 6 +++--- fs/xfs/xfs_fsops.c | 2 +- fs/xfs/xfs_log_recover.c | 3 ++- fs/xfs/xfs_mount.c | 3 ++- 17 files changed, 115 insertions(+), 82 deletions(-) commit cec7bb7d58fa0e644f8cec46b081bf5427c1a0f8 Author: Dave Chinner Date: Thu Jul 7 19:08:15 2022 +1000 xfs: pass perag to xfs_alloc_read_agfl We have the perag in most places we call xfs_alloc_read_agfl, so pass the perag instead of a mount/agno pair. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/libxfs/xfs_alloc.c | 31 ++++++++++++++++--------------- fs/xfs/libxfs/xfs_alloc.h | 4 ++-- fs/xfs/scrub/agheader_repair.c | 2 +- fs/xfs/scrub/common.c | 2 +- 4 files changed, 20 insertions(+), 19 deletions(-) commit 8c392eb27f7a98e403658d066e387c7b1c604f2b Author: Dave Chinner Date: Thu Jul 7 19:08:08 2022 +1000 xfs: pass perag to xfs_alloc_put_freelist It's available in all callers, so pass it in so that the perag can be passed further down the stack. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/libxfs/xfs_alloc.c | 5 ++--- fs/xfs/libxfs/xfs_alloc.h | 14 +++----------- fs/xfs/libxfs/xfs_alloc_btree.c | 3 ++- fs/xfs/libxfs/xfs_rmap_btree.c | 2 +- fs/xfs/scrub/repair.c | 4 ++-- 5 files changed, 10 insertions(+), 18 deletions(-) commit 49f0d84ec1db5bd46dcf3796fc792fce74ff25a3 Author: Dave Chinner Date: Thu Jul 7 19:08:01 2022 +1000 xfs: pass perag to xfs_alloc_get_freelist It's available in all callers, so pass it in so that the perag can be passed further down the stack. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/libxfs/xfs_alloc.c | 8 ++++---- fs/xfs/libxfs/xfs_alloc.h | 13 ++----------- fs/xfs/libxfs/xfs_alloc_btree.c | 6 +++--- fs/xfs/libxfs/xfs_rmap_btree.c | 2 +- fs/xfs/scrub/repair.c | 6 +++--- 5 files changed, 13 insertions(+), 22 deletions(-) commit fa044ae70c64343b07277256952d22a0dc05b319 Author: Dave Chinner Date: Thu Jul 7 19:07:54 2022 +1000 xfs: pass perag to xfs_read_agf We have the perag in most places we call xfs_read_agf, so pass the perag instead of a mount/agno pair. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/libxfs/xfs_alloc.c | 26 ++++++++++++-------------- fs/xfs/libxfs/xfs_alloc.h | 4 ++-- 2 files changed, 14 insertions(+), 16 deletions(-) commit 61021deb1faa5b2b913bf0ad76e2769276160b04 Author: Dave Chinner Date: Thu Jul 7 19:07:47 2022 +1000 xfs: pass perag to xfs_read_agi We have the perag in most palces we call xfs_read_agi, so pass the perag instead of a mount/agno pair. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/libxfs/xfs_ialloc.c | 21 ++++++++++----------- fs/xfs/libxfs/xfs_ialloc.h | 10 +++------- fs/xfs/xfs_inode.c | 14 ++++++++------ fs/xfs/xfs_log_recover.c | 38 +++++++++++++++++++------------------- 4 files changed, 40 insertions(+), 43 deletions(-) commit 08d3e84feeb8cb8e20d54f659446b98fe17913aa Author: Dave Chinner Date: Thu Jul 7 19:07:40 2022 +1000 xfs: pass perag to xfs_alloc_read_agf() xfs_alloc_read_agf() initialises the perag if it hasn't been done yet, so it makes sense to pass it the perag rather than pull a reference from the buffer. This allows callers to be per-ag centric rather than passing mount/agno pairs everywhere. Whilst modifying the xfs_reflink_find_shared() function definition, declare it static and remove the extern declaration as it is an internal function only these days. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/libxfs/xfs_ag.c | 20 ++++++++----------- fs/xfs/libxfs/xfs_ag_resv.c | 2 +- fs/xfs/libxfs/xfs_alloc.c | 31 +++++++++++++---------------- fs/xfs/libxfs/xfs_alloc.h | 13 ++----------- fs/xfs/libxfs/xfs_bmap.c | 2 +- fs/xfs/libxfs/xfs_ialloc.c | 2 +- fs/xfs/libxfs/xfs_refcount.c | 6 +++--- fs/xfs/libxfs/xfs_refcount_btree.c | 2 +- fs/xfs/libxfs/xfs_rmap_btree.c | 2 +- fs/xfs/scrub/agheader_repair.c | 6 ++---- fs/xfs/scrub/bmap.c | 2 +- fs/xfs/scrub/common.c | 2 +- fs/xfs/scrub/fscounters.c | 2 +- fs/xfs/scrub/repair.c | 5 +++-- fs/xfs/xfs_discard.c | 2 +- fs/xfs/xfs_extfree_item.c | 6 +++++- fs/xfs/xfs_filestream.c | 2 +- fs/xfs/xfs_fsmap.c | 3 +-- fs/xfs/xfs_reflink.c | 40 +++++++++++++++++++++----------------- fs/xfs/xfs_reflink.h | 3 --- 20 files changed, 70 insertions(+), 83 deletions(-) commit 76b47e528e3a27a3bf3b3f9153aad9435e03be8c Author: Dave Chinner Date: Thu Jul 7 19:07:32 2022 +1000 xfs: kill xfs_alloc_pagf_init() Trivial wrapper around xfs_alloc_read_agf(), can be easily replaced by passing a NULL agfbp to xfs_alloc_read_agf(). Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/libxfs/xfs_ag.c | 2 +- fs/xfs/libxfs/xfs_ag_resv.c | 2 +- fs/xfs/libxfs/xfs_alloc.c | 37 ++++++++++++------------------------- fs/xfs/libxfs/xfs_alloc.h | 10 ---------- fs/xfs/libxfs/xfs_bmap.c | 3 ++- fs/xfs/libxfs/xfs_ialloc.c | 2 +- fs/xfs/xfs_filestream.c | 4 ++-- 7 files changed, 19 insertions(+), 41 deletions(-) commit 99b13c7f0bd35dd3cf2cacb61beb4557dc2b6f9b Author: Dave Chinner Date: Thu Jul 7 19:07:24 2022 +1000 xfs: pass perag to xfs_ialloc_read_agi() xfs_ialloc_read_agi() initialises the perag if it hasn't been done yet, so it makes sense to pass it the perag rather than pull a reference from the buffer. This allows callers to be per-ag centric rather than passing mount/agno pairs everywhere. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/libxfs/xfs_ag.c | 22 ++++++++++++---------- fs/xfs/libxfs/xfs_ialloc.c | 23 ++++++++++------------- fs/xfs/libxfs/xfs_ialloc.h | 7 ++----- fs/xfs/libxfs/xfs_ialloc_btree.c | 9 ++++----- fs/xfs/scrub/common.c | 2 +- fs/xfs/scrub/fscounters.c | 2 +- fs/xfs/scrub/repair.c | 2 +- 7 files changed, 31 insertions(+), 36 deletions(-) commit a95fee40e3d433d8fabff7c02e75f7c2c2e54400 Author: Dave Chinner Date: Thu Jul 7 19:07:16 2022 +1000 xfs: kill xfs_ialloc_pagi_init() This is just a basic wrapper around xfs_ialloc_read_agi(), which can be entirely handled by xfs_ialloc_read_agi() by passing a NULL agibpp.... Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/libxfs/xfs_ag.c | 3 ++- fs/xfs/libxfs/xfs_ialloc.c | 39 ++++++++++++++------------------------- fs/xfs/libxfs/xfs_ialloc.h | 10 ---------- 3 files changed, 16 insertions(+), 36 deletions(-) commit c6aee2481419b638a5257adbd3ffd33b11c59fa8 Author: Dave Chinner Date: Thu Jul 7 19:07:09 2022 +1000 xfs: make last AG grow/shrink perag centric Because the perag must exist for these operations, look it up as part of the common shrink operations and pass it instead of the mount/agno pair. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/libxfs/xfs_ag.c | 51 +++++++++++++++++++++----------------------------- fs/xfs/libxfs/xfs_ag.h | 11 +++++------ fs/xfs/xfs_fsops.c | 11 +++++++---- fs/xfs/xfs_ioctl.c | 8 +++++++- 4 files changed, 40 insertions(+), 41 deletions(-) commit fec6d133cee53971841159c33e95b17b421dd0a1 Author: Laurent Pinchart Date: Wed Dec 29 21:31:35 2021 +0200 arm64: dts: renesas: Add panel overlay for Draak and Ebisu boards The Draak and Ebisu boards support an optional LVDS panel. One compatible panel is the Mitsubishi AA104XD12. Add a corresponding DT overlay. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Link: https://lore.kernel.org/r/20211229193135.28767-4-laurent.pinchart+renesas@ideasonboard.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/Makefile | 1 + .../dts/renesas/draak-ebisu-panel-aa104xd12.dts | 36 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit e47b5501451f0d7420394996227965bba9c961a9 Author: Laurent Pinchart Date: Wed Dec 29 21:31:34 2021 +0200 arm64: dts: renesas: Add panel overlay for Salvator-X(S) boards The Salvator-X and Salvator-XS boards support an optional LVDS panel. One compatible panel is the Mitsubishi AA104XD12. Add a corresponding DT overlay. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Link: https://lore.kernel.org/r/20211229193135.28767-3-laurent.pinchart+renesas@ideasonboard.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/Makefile | 2 ++ .../boot/dts/renesas/salvator-panel-aa104xd12.dts | 36 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit 79e682024559ccc8b01b36ef128afbe89cf25092 Author: Laurent Pinchart Date: Wed Dec 29 21:31:33 2021 +0200 arm64: dts: renesas: Prepare AA1024XD12 panel .dtsi for overlay support The Mitsubishi AA1024XD12 panel can be used for R-Car Gen2 and Gen3 boards as an optional external panel. It is described in the arm/boot/dts/r8a77xx-aa104xd12-panel.dtsi file as a direct child of the DT root node. This allows including r8a77xx-aa104xd12-panel.dtsi in board device trees, with other minor modifications, to enable the panel. This is however not how external components should be modelled. Instead of modifying the board device tree to enable the panel, it should be compiled as a DT overlay, to be loaded by the boot loader. Prepare the r8a77xx-aa104xd12-panel.dtsi file for this usage by declaring a panel node only, without hardcoding its path. Overlay sources can then include r8a77xx-aa104xd12-panel.dtsi where appropriate. This change doesn't cause any regression as r8a77xx-aa104xd12-panel.dtsi is currently unused. As overlay support for this panel has only been tested with Gen3 hardware, and Gen2 support will require more development, move the file to arch/arm64/boot/dts/renesas/. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Link: https://lore.kernel.org/r/20211229193135.28767-2-laurent.pinchart+renesas@ideasonboard.com Signed-off-by: Geert Uytterhoeven arch/arm/boot/dts/r8a77xx-aa104xd12-panel.dtsi | 39 ------------------------ arch/arm64/boot/dts/renesas/panel-aa104xd12.dtsi | 30 ++++++++++++++++++ 2 files changed, 30 insertions(+), 39 deletions(-) commit 51a117edff133a1ea8cb0fcbc599b8d5a34414e9 Author: Dave Chinner Date: Thu Jul 7 18:56:09 2022 +1000 xfs: expanding delayed logging design with background material I wrote up a description of how transactions, space reservations and relogging work together in response to a question for background material on the delayed logging design. Add this to the existing document for ease of future reference. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong .../filesystems/xfs-delayed-logging-design.rst | 361 ++++++++++++++++++--- 1 file changed, 322 insertions(+), 39 deletions(-) commit d9f68777b2515452828d97b521ff8e3517b42eb1 Author: Dave Chinner Date: Thu Jul 7 18:56:09 2022 +1000 xfs: xlog_sync() manually adjusts grant head space When xlog_sync() rounds off the tail the iclog that is being flushed, it manually subtracts that space from the grant heads. This space is actually reserved by the transaction ticket that covers the xlog_sync() call from xlog_write(), but we don't plumb the ticket down far enough for it to account for the space consumed in the current log ticket. The grant heads are hot, so we really should be accounting this to the ticket is we can, rather than adding thousands of extra grant head updates every CIL commit. Interestingly, this actually indicates a potential log space overrun can occur when we force the log. By the time that xfs_log_force() pushes out an active iclog and consumes the roundoff space, the reservation for that roundoff space has been returned to the grant heads and is no longer covered by a reservation. In theory the roundoff added to log force on an already full log could push the write head past the tail. In practice, the CIL commit that writes to the log and needs the iclog pushed will have reserved space for roundoff, so when it releases the ticket there will still be physical space for the roundoff to be committed to the log, even though it is no longer reserved. This roundoff won't be enough space to allow a transaction to be woken if the log is full, so overruns should not actually occur in practice. That said, it indicates that we should not release the CIL context log ticket until after we've released the commit iclog. It also means that xlog_sync() still needs the direct grant head manipulation if we don't provide it with a ticket. Log forces are rare when we are in fast paths running 1.5 million transactions/s that make the grant heads hot, so let's optimise the hot case and pass CIL log tickets down to the xlog_sync() code. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/xfs_log.c | 35 +++++++++++++++++++++++------------ fs/xfs/xfs_log_cil.c | 20 ++++++++++++++++---- fs/xfs/xfs_log_priv.h | 3 ++- 3 files changed, 41 insertions(+), 17 deletions(-) commit 1ccb0745a97fb8b38913b39b8ecb1aea39fdbcb0 Author: Dave Chinner Date: Thu Jul 7 18:56:08 2022 +1000 xfs: avoid cil push lock if possible Because now it hurts when the CIL fills up. - 37.20% __xfs_trans_commit - 35.84% xfs_log_commit_cil - 19.34% _raw_spin_lock - do_raw_spin_lock 19.01% __pv_queued_spin_lock_slowpath - 4.20% xfs_log_ticket_ungrant 0.90% xfs_log_space_wake Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/xfs_log_cil.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 4eb56069cb2835fafe569e27e746e6a4c9735186 Author: Dave Chinner Date: Thu Jul 7 18:56:08 2022 +1000 xfs: move CIL ordering to the logvec chain Adding a list_sort() call to the CIL push work while the xc_ctx_lock is held exclusively has resulted in fairly long lock hold times and that stops all front end transaction commits from making progress. We can move the sorting out of the xc_ctx_lock if we can transfer the ordering information to the log vectors as they are detached from the log items and then we can sort the log vectors. With these changes, we can move the list_sort() call to just before we call xlog_write() when we aren't holding any locks at all. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/xfs_log.h | 1 + fs/xfs/xfs_log_cil.c | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) commit 169248536a2b28e4228ba63772936c1ba979c9c0 Author: Dave Chinner Date: Thu Jul 7 18:55:59 2022 +1000 xfs: convert log vector chain to use list heads Because the next change is going to require sorting log vectors, and that requires arbitrary rearrangement of the list which cannot be done easily with a single linked list. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/xfs_log.c | 11 +++++----- fs/xfs/xfs_log.h | 2 +- fs/xfs/xfs_log_cil.c | 54 +++++++++++++++++++++++++++---------------------- fs/xfs/xfs_log_priv.h | 4 ++-- fs/xfs/xfs_trans.c | 4 ++-- fs/xfs/xfs_trans_priv.h | 3 ++- 6 files changed, 43 insertions(+), 35 deletions(-) commit c0fb4765c5086cfd00f1158f5f44e7e1906530ad Author: Dave Chinner Date: Thu Jul 7 18:54:59 2022 +1000 xfs: convert CIL to unordered per cpu lists So that we can remove the cil_lock which is a global serialisation point. We've already got ordering sorted, so all we need to do is treat the CIL list like the busy extent list and reconstruct it before the push starts. This is what we're trying to avoid: - 75.35% 1.83% [kernel] [k] xfs_log_commit_cil - 46.35% xfs_log_commit_cil - 41.54% _raw_spin_lock - 67.30% do_raw_spin_lock 66.96% __pv_queued_spin_lock_slowpath Which happens on a 32p system when running a 32-way 'rm -rf' workload. After this patch: - 20.90% 3.23% [kernel] [k] xfs_log_commit_cil - 17.67% xfs_log_commit_cil - 6.51% xfs_log_ticket_ungrant 1.40% xfs_log_space_wake 2.32% memcpy_erms - 2.18% xfs_buf_item_committing - 2.12% xfs_buf_item_release - 1.03% xfs_buf_unlock 0.96% up 0.72% xfs_buf_rele 1.33% xfs_inode_item_format 1.19% down_read 0.91% up_read 0.76% xfs_buf_item_format - 0.68% kmem_alloc_large - 0.67% kmem_alloc 0.64% __kmalloc 0.50% xfs_buf_item_size It kinda looks like the workload is running out of log space all the time. But all the spinlock contention is gone and the transaction commit rate has gone from 800k/s to 1.3M/s so the amount of real work being done has gone up a *lot*. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/xfs_log_cil.c | 35 ++++++++++++++++------------------- fs/xfs/xfs_log_priv.h | 3 +-- 2 files changed, 17 insertions(+), 21 deletions(-) commit d955cf3df3c26097aeab5712bc76f1c62a4ce86f Author: Krzysztof Kozlowski Date: Tue Jul 5 17:50:38 2022 +0200 dt-bindings: hwinfo: renesas,prr: move from soc directory Group devices like Chip ID or SoC information under "hwinfo" directory. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220705155038.454251-1-krzysztof.kozlowski@linaro.org Signed-off-by: Geert Uytterhoeven .../devicetree/bindings/{soc/renesas => hwinfo}/renesas,prr.yaml | 2 +- MAINTAINERS | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 016a23388cdcb2740deb1379dc408f21c84efb11 Author: Dave Chinner Date: Thu Jul 7 18:53:59 2022 +1000 xfs: Add order IDs to log items in CIL Before we split the ordered CIL up into per cpu lists, we need a mechanism to track the order of the items in the CIL. We need to do this because there are rules around the order in which related items must physically appear in the log even inside a single checkpoint transaction. An example of this is intents - an intent must appear in the log before it's intent done record so that log recovery can cancel the intent correctly. If we have these two records misordered in the CIL, then they will not be recovered correctly by journal replay. We also will not be able to move items to the tail of the CIL list when they are relogged, hence the log items will need some mechanism to allow the correct log item order to be recreated before we write log items to the hournal. Hence we need to have a mechanism for recording global order of transactions in the log items so that we can recover that order from un-ordered per-cpu lists. Do this with a simple monotonic increasing commit counter in the CIL context. Each log item in the transaction gets stamped with the current commit order ID before it is added to the CIL. If the item is already in the CIL, leave it where it is instead of moving it to the tail of the list and instead sort the list before we start the push work. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/xfs_log_cil.c | 39 +++++++++++++++++++++++++++++++-------- fs/xfs/xfs_log_priv.h | 1 + fs/xfs/xfs_trans.h | 1 + 3 files changed, 33 insertions(+), 8 deletions(-) commit df7a4a2134b0a201c93e96efe4bb2be747f9da9f Author: Dave Chinner Date: Thu Jul 7 18:52:59 2022 +1000 xfs: convert CIL busy extents to per-cpu To get them out from under the CIL lock. This is an unordered list, so we can simply punt it to per-cpu lists during transaction commits and reaggregate it back into a single list during the CIL push work. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/xfs_log_cil.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit 1dd2a2c18e314ad89200f8296c86dd4ecd53dea6 Author: Dave Chinner Date: Thu Jul 7 18:51:59 2022 +1000 xfs: track CIL ticket reservation in percpu structure To get it out from under the cil spinlock. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/xfs_log_cil.c | 16 ++++++++++++---- fs/xfs/xfs_log_priv.h | 1 + 2 files changed, 13 insertions(+), 4 deletions(-) commit 7c8ade212120085439eddc4cfddfa29d41c3f426 Author: Dave Chinner Date: Thu Jul 7 18:50:59 2022 +1000 xfs: implement percpu cil space used calculation Now that we have the CIL percpu structures in place, implement the space used counter as a per-cpu counter. We have to be really careful now about ensuring that the checks and updates run without arbitrary delays, which means they need to run with pre-emption disabled. We do this by careful placement of the get_cpu_ptr/put_cpu_ptr calls to access the per-cpu structures for that CPU. We need to be able to reliably detect that the CIL has reached the hard limit threshold so we can take extra reservations for the iclog headers when the space used overruns the original reservation. hence we factor out xlog_cil_over_hard_limit() from xlog_cil_push_background(). The global CIL space used is an atomic variable that is backed by per-cpu aggregation to minimise the number of atomic updates we do to the global state in the fast path. While we are under the soft limit, we aggregate only when the per-cpu aggregation is over the proportion of the soft limit assigned to that CPU. This means that all CPUs can use all but one byte of their aggregation threshold and we will not go over the soft limit. Hence once we detect that we've gone over both a per-cpu aggregation threshold and the soft limit, we know that we have only exceeded the soft limit by one per-cpu aggregation threshold. Even if all CPUs hit this at the same time, we can't be over the hard limit, so we can run an aggregation back into the atomic counter at this point and still be under the hard limit. At this point, we will be over the soft limit and hence we'll aggregate into the global atomic used space directly rather than the per-cpu counters, hence providing accurate detection of hard limit excursion for accounting and reservation purposes. Hence we get the best of both worlds - lockless, scalable per-cpu fast path plus accurate, atomic detection of hard limit excursion. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/xfs_log_cil.c | 176 +++++++++++++++++++++++++++++++++++++++++--------- fs/xfs/xfs_log_priv.h | 4 +- 2 files changed, 149 insertions(+), 31 deletions(-) commit aa0813581b8d37bdd91cd40b67ef79ffa45104b2 Author: Samuel Holland Date: Fri Jul 1 15:00:56 2022 -0500 genirq: Provide an IRQ affinity mask in non-SMP configs IRQ affinity masks are not allocated in uniprocessor configurations. This requires special case non-SMP code in drivers for irqchips which have per-CPU enable or mask registers. Since IRQ affinity is always the same in a uniprocessor configuration, we can provide a correct affinity mask without allocating one per IRQ. By returning a real cpumask from irq_data_get_affinity_mask even when SMP is disabled, irqchip drivers which iterate over that mask will automatically do the right thing. Signed-off-by: Samuel Holland Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220701200056.46555-9-samuel@sholland.org include/linux/irq.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4d0b8298818b623f5fa51d5c49e1a142d3618ac9 Author: Samuel Holland Date: Fri Jul 1 15:00:55 2022 -0500 genirq: Return a const cpumask from irq_data_get_affinity_mask Now that the irq_data_update_affinity helper exists, enforce its use by returning a a const cpumask from irq_data_get_affinity_mask. Since the previous commit already updated places that needed to call irq_data_update_affinity, this commit updates the remaining code that either did not modify the cpumask or immediately passed the modified mask to irq_set_affinity. Signed-off-by: Samuel Holland Reviewed-by: Michael Kelley Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220701200056.46555-8-samuel@sholland.org arch/mips/cavium-octeon/octeon-irq.c | 4 ++-- arch/sh/kernel/irq.c | 7 ++++--- arch/x86/hyperv/irqdomain.c | 2 +- arch/xtensa/kernel/irq.c | 7 ++++--- drivers/iommu/hyperv-iommu.c | 2 +- drivers/pci/controller/pci-hyperv.c | 10 +++++----- include/linux/irq.h | 12 +++++++----- kernel/irq/chip.c | 8 +++++--- kernel/irq/debugfs.c | 2 +- kernel/irq/ipi.c | 16 +++++++++------- 10 files changed, 39 insertions(+), 31 deletions(-) commit 073352e951f60946452da358d64841066c3142ff Author: Samuel Holland Date: Fri Jul 1 15:00:54 2022 -0500 genirq: Add and use an irq_data_update_affinity helper Some architectures and irqchip drivers modify the cpumask returned by irq_data_get_affinity_mask, usually by copying in to it. This is problematic for uniprocessor configurations, where the affinity mask should be constant, as it is known at compile time. Add and use a setter for the affinity mask, following the pattern of irq_data_update_effective_affinity. This allows the getter function to return a const cpumask pointer. Signed-off-by: Samuel Holland Reviewed-by: Oleksandr Tyshchenko # Xen bits Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220701200056.46555-7-samuel@sholland.org arch/alpha/kernel/irq.c | 2 +- arch/ia64/kernel/iosapic.c | 2 +- arch/ia64/kernel/irq.c | 4 ++-- arch/ia64/kernel/msi_ia64.c | 4 ++-- arch/parisc/kernel/irq.c | 2 +- drivers/irqchip/irq-bcm6345-l1.c | 4 ++-- drivers/parisc/iosapic.c | 2 +- drivers/sh/intc/chip.c | 2 +- drivers/xen/events/events_base.c | 7 ++++--- include/linux/irq.h | 6 ++++++ 10 files changed, 21 insertions(+), 14 deletions(-) commit 961343d7822624d0e329ab4167c7e1d02bb53112 Author: Samuel Holland Date: Fri Jul 1 15:00:53 2022 -0500 genirq: Refactor accessors to use irq_data_get_affinity_mask A couple of functions directly reference the affinity mask. Route them through irq_data_get_affinity_mask so they will pick up any refactoring done there. Signed-off-by: Samuel Holland Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220701200056.46555-6-samuel@sholland.org include/linux/irq.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 610306306aaa56ab324d03a55138ea611be9e282 Author: Samuel Holland Date: Fri Jul 1 15:00:52 2022 -0500 genirq: Drop redundant irq_init_effective_affinity It does exactly the same thing as irq_data_update_effective_affinity. Signed-off-by: Samuel Holland Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220701200056.46555-5-samuel@sholland.org kernel/irq/manage.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 0e6c027c035507abc67b356264a12c49f58c946e Author: Samuel Holland Date: Fri Jul 1 15:00:51 2022 -0500 genirq: GENERIC_IRQ_EFFECTIVE_AFF_MASK depends on SMP An IRQ's effective affinity can only be different from its configured affinity if there are multiple CPUs. Make it clear that this option is only meaningful when SMP is enabled. Most of the relevant code in irqdesc.c is already hidden behind CONFIG_SMP anyway. Signed-off-by: Samuel Holland Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220701200056.46555-4-samuel@sholland.org arch/arm/mach-hisi/Kconfig | 2 +- drivers/irqchip/Kconfig | 14 +++++++------- kernel/irq/Kconfig | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) commit 0f5209fee90b4544c58b4278d944425292789967 Author: Samuel Holland Date: Fri Jul 1 15:00:50 2022 -0500 genirq: GENERIC_IRQ_IPI depends on SMP The generic IPI code depends on the IRQ affinity mask being allocated and initialized. This will not be the case if SMP is disabled. Fix up the remaining driver that selected GENERIC_IRQ_IPI in a non-SMP config. Reported-by: kernel test robot Signed-off-by: Samuel Holland Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220701200056.46555-3-samuel@sholland.org drivers/irqchip/Kconfig | 2 +- kernel/irq/Kconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 8190cc572981f2f13b6ffc26c7cfa7899e5d3ccc Author: Samuel Holland Date: Fri Jul 1 15:00:49 2022 -0500 irqchip/mips-gic: Only register IPI domain when SMP is enabled The MIPS GIC irqchip driver may be selected in a uniprocessor configuration, but it unconditionally registers an IPI domain. Limit the part of the driver dealing with IPIs to only be compiled when GENERIC_IRQ_IPI is enabled, which corresponds to an SMP configuration. Reported-by: kernel test robot Signed-off-by: Samuel Holland Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220701200056.46555-2-samuel@sholland.org drivers/irqchip/Kconfig | 3 +- drivers/irqchip/irq-mips-gic.c | 80 ++++++++++++++++++++++++++++-------------- 2 files changed, 56 insertions(+), 27 deletions(-) commit 999462d336492e04e427158fac04c92ade465bc9 Merge: 8873d6b87791 1ba1fd7d775d Author: Arnd Bergmann Date: Thu Jul 7 10:22:49 2022 +0200 Merge tag 'samsung-dt64-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM64 changes for v5.20, part two 1. Correct SPI11 pin names on ExynosAutov9. 2. Add more USI (I2C/SPI/UART) devices to ExynosAutov9. * tag 'samsung-dt64-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynosautov9: add usi device tree nodes arm64: dts: exynosautov9: prepare usi0 changes arm64: dts: exynosautov9: add pdma0 device tree node dt-bindings: soc: samsung: usi: add exynosautov9-usi compatible arm64: dts: exynosautov9: correct spi11 pin names Link: https://lore.kernel.org/r/20220707080408.69251-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 8873d6b8779195b877ebd2bc05794aec089302eb Merge: 72e76dc2f93b 3e27bf719303 Author: Arnd Bergmann Date: Thu Jul 7 10:21:24 2022 +0200 Merge tag 'samsung-dt-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v5.20, part two 1. Cleanups: align SDHCI node names. 2. DT bindings: Document preferred compatible naming schema. 3. DT bindings: fixes and improvements to Exynos PMU bindings. * tag 'samsung-dt-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: dt-bindings: soc: samsung: exynos-pmu: add reboot-mode dt-bindings: soc: samsung: exynos-pmu: use abolute ref paths dt-bindings: soc: samsung: exynos-pmu: cleanup assigned clocks dt-bindings: samsung: document preferred compatible naming ARM: dts: s5pv210: align SDHCI node name with dtschema ARM: dts: s3c64xx: align SDHCI node name with dtschema ARM: dts: s3c24xx: align SDHCI node name with dtschema ARM: dts: exynos: align SDHCI node name with dtschema Link: https://lore.kernel.org/r/20220707080408.69251-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit c0ab2901fc68a274b4e5e6436892806e6785babe Author: Vikash Garodia Date: Mon May 23 14:43:41 2022 +0100 media: venus: hfi_platform: Correct supported codecs for sc7280 VP8 codec is deprecated for sc7280 SOC. Fix in platform layer to update the supported codecs accordingly. Signed-off-by: Vikash Garodia Acked-by: Stanimir Varbanov Tested-by: Fritz Koenig Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/hfi_parser.c | 6 ++++-- drivers/media/platform/qcom/venus/hfi_platform.c | 22 ++++++++++++++++++++++ drivers/media/platform/qcom/venus/hfi_platform.h | 2 ++ 3 files changed, 28 insertions(+), 2 deletions(-) commit 748b080f21678f2988b0da2d2b396a6f928d9b2c Author: Dikshita Agarwal Date: Thu Jun 16 12:02:02 2022 +0100 media: venus: Add support for SSR trigger using fault injection Here we introduce a new fault injection for SSR trigger. To trigger the SSR: echo 100 > /sys/kernel/debug/venus/fail_ssr/probability echo 1 > /sys/kernel/debug/venus/fail_ssr/times Co-developed-by: Stanimir Varbanov Signed-off-by: Stanimir Varbanov Signed-off-by: Dikshita Agarwal Reviewed-by: Stephen Boyd Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/core.c | 15 ++++++++++++++- drivers/media/platform/qcom/venus/dbgfs.c | 9 +++++++++ drivers/media/platform/qcom/venus/dbgfs.h | 13 +++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) commit 027c38b4121e7d9ae43b2fa21b35582d1aef2a05 Author: Chris Wilson Date: Wed Jul 6 16:47:38 2022 +0100 drm/i915/selftests: Grab the runtime pm in shrink_thp Since we are not holding a wakeref, shrinking a bound object is not guaranteed. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6370 Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20220706154738.235204-1-matthew.auld@intel.com drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c297493336b7bc0c12ced484a9e61d04ec2d9403 Author: Antonio Borneo Date: Mon Jun 6 18:27:57 2022 +0200 irqchip/stm32-exti: Simplify irq description table Having removed the event trigger type from struct stm32_desc_irq makes worthless keep using a struct. Replace the struct by a single dimension array and use 8 bit type to reduce the overal memory footprint. On armv7a this patch reduces by 7% the size of the driver, from text data bss dec hex filename 6977 424 4 7405 1ced irq-stm32-exti.o to 6449 424 4 6877 1add irq-stm32-exti.o Signed-off-by: Antonio Borneo Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220606162757.415354-7-antonio.borneo@foss.st.com drivers/irqchip/irq-stm32-exti.c | 220 ++++++++++++++++++--------------------- 1 file changed, 101 insertions(+), 119 deletions(-) commit ce4ef8f9f2abcf104a5417225cbfe3560e779093 Author: Antonio Borneo Date: Mon Jun 6 18:27:56 2022 +0200 irqchip/stm32-exti: Read event trigger type from event_trg register The flag reporting whether an event is 'direct' or 'configurable' is available in the read-only registers EVENT_TRG. Drop this redundant information from the struct stm32_desc_irq and use the proper bit from EVENT_TRG register. On armv7a this patch reduces by 3% the size of the driver, from text data bss dec hex filename 7233 424 4 7661 1ded irq-stm32-exti.o to 6977 424 4 7405 1ced irq-stm32-exti.o Signed-off-by: Antonio Borneo Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220606162757.415354-6-antonio.borneo@foss.st.com drivers/irqchip/irq-stm32-exti.c | 180 +++++++++++++++++++++------------------ 1 file changed, 96 insertions(+), 84 deletions(-) commit b38040f0167d25092e813c8d1a70cf2708c1720b Author: Alexandre Torgue Date: Mon Jun 6 18:27:55 2022 +0200 irqchip/stm32-exti: Tag emr register as undefined for stm32mp15 The reference manual RM0436 of stm32mp15 till version v4.0 was erroneously reporting the Event Mask Registers (EMR) for the Cortex-A CPUs. These registers have been removed from v5.0 of the manual and the corresponding offsets have been marked as 'Reserved'. Prevent accessing these reserved addresses by tagging the EMR offsets as UNDEF_REG and modifying the code to handle this case. Signed-off-by: Alexandre Torgue Signed-off-by: Antonio Borneo Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220606162757.415354-5-antonio.borneo@foss.st.com drivers/irqchip/irq-stm32-exti.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c16ae609214e835692c33b1a090b5a15bf1b9e7e Author: Antonio Borneo Date: Mon Jun 6 18:27:54 2022 +0200 irqchip/stm32-exti: Prevent illegal read due to unbounded DT value The value hwirq is received from DT. If it exceeds the maximum valid value it causes the code to address unexisting irq chips reading outside the array boundary. Check the value of hwirq before using it. Signed-off-by: Antonio Borneo Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220606162757.415354-4-antonio.borneo@foss.st.com drivers/irqchip/irq-stm32-exti.c | 3 +++ 1 file changed, 3 insertions(+) commit f8b3eb4245113c8a9156d5db8e80c6134127bcc1 Author: Loic Pallardy Date: Mon Jun 6 18:27:53 2022 +0200 irqchip/stm32-exti: Fix irq_mask/irq_unmask for direct events The driver has to mask/unmask the corresponding flag in the Interrupt Mask Register (IMR). This is already done for configurable event, while direct events only forward the mask/unmask request to the parent. Use the existing stm32_exti_h_mask()/stm32_exti_h_unmask() for direct events too. Signed-off-by: Loic Pallardy Signed-off-by: Antonio Borneo Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220606162757.415354-3-antonio.borneo@foss.st.com drivers/irqchip/irq-stm32-exti.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3e17683ff4a870ed99e989425bc976a944978711 Author: Ludovic Barre Date: Mon Jun 6 18:27:52 2022 +0200 irqchip/stm32-exti: Fix irq_set_affinity return value When there is no parent, there is no specific action to do in stm32-exti irqchip. In such case, it's incorrect returning an error. Let irq_set_affinity to return IRQ_SET_MASK_OK_DONE when there is no parent. Signed-off-by: Ludovic Barre Signed-off-by: Antonio Borneo Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220606162757.415354-2-antonio.borneo@foss.st.com drivers/irqchip/irq-stm32-exti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95001b756467ecc9f5973eb5e74e97699d9bbdf1 Author: Antonio Borneo Date: Thu May 12 18:05:44 2022 +0200 genirq: Don't return error on missing optional irq_request_resources() Function irq_chip::irq_request_resources() is reported as optional in the declaration of struct irq_chip. If the parent irq_chip does not implement it, we should ignore it and return. Don't return error if the functions is missing. Signed-off-by: Antonio Borneo Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220512160544.13561-1-antonio.borneo@foss.st.com kernel/irq/chip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 301c3ca125767e7cf931b092c353f89ade87cf2c Author: Yunfei Wang Date: Thu Jun 30 17:29:26 2022 +0800 iommu/mediatek: Allow page table PA up to 35bit Single memory zone feature will remove ZONE_DMA32 and ZONE_DMA. So add the quirk IO_PGTABLE_QUIRK_ARM_MTK_TTBR_EXT to let level 1 and level 2 pgtable support at most 35bit PA. Signed-off-by: Ning Li Signed-off-by: Yunfei Wang Reviewed-by: Yong Wu Reviewed-by: Robin Murphy Acked-by: Will Deacon Link: https://lore.kernel.org/r/20220630092927.24925-3-yf.wang@mediatek.com Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit bfdd231374181254742c5e2faef0bef2d30c0ee4 Author: Yunfei Wang Date: Thu Jun 30 17:29:25 2022 +0800 iommu/io-pgtable-arm-v7s: Add a quirk to allow pgtable PA up to 35bit Single memory zone feature will remove ZONE_DMA32 and ZONE_DMA and cause pgtable PA size larger than 32bit. Since Mediatek IOMMU hardware support at most 35bit PA in pgtable, so add a quirk to allow the PA of pgtables support up to bit35. Signed-off-by: Ning Li Signed-off-by: Yunfei Wang Reviewed-by: Robin Murphy Acked-by: Will Deacon Link: https://lore.kernel.org/r/20220630092927.24925-2-yf.wang@mediatek.com Signed-off-by: Joerg Roedel drivers/iommu/io-pgtable-arm-v7s.c | 75 ++++++++++++++++++++++++++++---------- include/linux/io-pgtable.h | 15 +++++--- 2 files changed, 66 insertions(+), 24 deletions(-) commit 214a05c1c2314b92c9a2e5c594b8646930d788e4 Author: Vasant Hegde Date: Wed Jul 6 17:08:25 2022 +0530 iommu/amd: Update amd_iommu_fault structure to include PCI seg ID Rename 'device_id' as 'sbdf' and extend it to 32bit so that we can pass PCI segment ID to ppr_notifier(). Also pass PCI segment ID to pci_get_domain_bus_and_slot() instead of default value. Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-36-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 2 +- drivers/iommu/amd/iommu.c | 2 +- drivers/iommu/amd/iommu_v2.c | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) commit 196dff712ea2c86f4957ad1a99bc7d65d4b01c5d Author: Vasant Hegde Date: Wed Jul 6 17:08:24 2022 +0530 iommu/amd: Update device_state structure to include PCI seg ID Rename struct device_state.devid variable to struct device_state.sbdf and extend it to 32-bit to include the 16-bit PCI segment ID via the helper function get_pci_sbdf_id(). Co-developed-by: Suravee Suthikulpanit Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-35-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu_v2.c | 58 ++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 34 deletions(-) commit b36a5b0f1cedbb2de2f527883d4eda8a5025591d Author: Vasant Hegde Date: Wed Jul 6 17:08:23 2022 +0530 iommu/amd: Print PCI segment ID in error log messages Print pci segment ID along with bdf. Useful for debugging. Co-developed-by: Suravee Suthikulpaint Signed-off-by: Suravee Suthikulpaint Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-34-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/init.c | 10 +++++----- drivers/iommu/amd/iommu.c | 36 ++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 23 deletions(-) commit bbe3a106580c21bc883fb0c9fa3da01534392fe8 Author: Suravee Suthikulpanit Date: Wed Jul 6 17:08:22 2022 +0530 iommu/amd: Add PCI segment support for ivrs_[ioapic/hpet/acpihid] commands By default, PCI segment is zero and can be omitted. To support system with non-zero PCI segment ID, modify the parsing functions to allow PCI segment ID. Co-developed-by: Vasant Hegde Signed-off-by: Vasant Hegde Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220706113825.25582-33-vasant.hegde@amd.com Signed-off-by: Joerg Roedel Documentation/admin-guide/kernel-parameters.txt | 34 ++++++++++++++----- drivers/iommu/amd/init.c | 44 +++++++++++++++---------- 2 files changed, 52 insertions(+), 26 deletions(-) commit e5670e1822cf2858e4c9133fc4e834a1d4a8a4d2 Author: Suravee Suthikulpanit Date: Wed Jul 6 17:08:21 2022 +0530 iommu/amd: Specify PCI segment ID when getting pci device Upcoming AMD systems can have multiple PCI segments. Hence pass PCI segment ID to pci_get_domain_bus_and_slot() instead of '0'. Co-developed-by: Vasant Hegde Signed-off-by: Vasant Hegde Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220706113825.25582-32-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/init.c | 6 ++++-- drivers/iommu/amd/iommu.c | 19 ++++++++++--------- 2 files changed, 14 insertions(+), 11 deletions(-) commit a45627baa7bc56d633ade47d5503bd2be53f1baa Author: Suravee Suthikulpanit Date: Wed Jul 6 17:08:20 2022 +0530 iommu/amd: Include PCI segment ID when initialize IOMMU Extend current device ID variables to 32-bit to include the 16-bit segment ID when parsing device information from IVRS table to initialize each IOMMU. Co-developed-by: Vasant Hegde Signed-off-by: Vasant Hegde Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220706113825.25582-31-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu.h | 2 +- drivers/iommu/amd/amd_iommu_types.h | 6 ++-- drivers/iommu/amd/init.c | 56 +++++++++++++++++++------------------ drivers/iommu/amd/quirks.c | 4 +-- 4 files changed, 35 insertions(+), 33 deletions(-) commit bf87972ca664863dcfd38ab581589c1d87677cb6 Author: Suravee Suthikulpanit Date: Wed Jul 6 17:08:19 2022 +0530 iommu/amd: Introduce get_device_sbdf_id() helper function Current get_device_id() only provide 16-bit PCI device ID (i.e. BDF). With multiple PCI segment support, we need to extend the helper function to include PCI segment ID. So, introduce a new helper function get_device_sbdf_id() to replace the current get_pci_device_id(). Co-developed-by: Vasant Hegde Signed-off-by: Vasant Hegde Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220706113825.25582-30-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu.h | 7 +++++ drivers/iommu/amd/amd_iommu_types.h | 2 ++ drivers/iommu/amd/iommu.c | 58 ++++++++++++++++++------------------- 3 files changed, 38 insertions(+), 29 deletions(-) commit a3cf6ab35751ea77a2bd47636dca761e835b282d Author: Vasant Hegde Date: Wed Jul 6 17:08:18 2022 +0530 iommu/amd: Flush upto last_bdf only Fix amd_iommu_flush_dte_all() and amd_iommu_flush_tlb_all() to flush upto last_bdf only. Co-developed-by: Suravee Suthikulpanit Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-29-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 401360ec98c61bf91a107f292bfbfc9245795eea Author: Suravee Suthikulpanit Date: Wed Jul 6 17:08:17 2022 +0530 iommu/amd: Remove global amd_iommu_[dev_table/alias_table/last_bdf] Replace them with per PCI segment device table. Also remove dev_table_size, alias_table_size, amd_iommu_last_bdf variables. Co-developed-by: Vasant Hegde Signed-off-by: Vasant Hegde Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220706113825.25582-28-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 15 ------- drivers/iommu/amd/init.c | 89 +++++++------------------------------ drivers/iommu/amd/iommu.c | 18 +++++--- 3 files changed, 27 insertions(+), 95 deletions(-) commit 56fb79514c52947107001ff9313870d76c4c8008 Author: Suravee Suthikulpanit Date: Wed Jul 6 17:08:16 2022 +0530 iommu/amd: Update set_dev_entry_bit() and get_dev_entry_bit() To include a pointer to per PCI segment device table. Also include struct amd_iommu as one of the function parameter to amd_iommu_apply_erratum_63() since it is needed when setting up DTE. Co-developed-by: Vasant Hegde Signed-off-by: Vasant Hegde Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220706113825.25582-27-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu.h | 2 +- drivers/iommu/amd/init.c | 59 ++++++++++++++++++++++++++++--------------- drivers/iommu/amd/iommu.c | 2 +- 3 files changed, 41 insertions(+), 22 deletions(-) commit 1ab5a15334529d3980a85abb2e06498c8e5ac8cc Author: Suravee Suthikulpanit Date: Wed Jul 6 17:08:15 2022 +0530 iommu/amd: Update (un)init_device_table_dma() Include struct amd_iommu_pci_seg as a function parameter since we need to access per PCI segment device table. Co-developed-by: Vasant Hegde Signed-off-by: Vasant Hegde Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220706113825.25582-26-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/init.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit c7d311247b1b03906bc54d578db53f0bc2112674 Author: Suravee Suthikulpanit Date: Wed Jul 6 17:08:14 2022 +0530 iommu/amd: Update set_dte_irq_entry Start using per PCI segment device table instead of global device table. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-25-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 4cc053d7aea778a959a9300e8acff7854de1be7f Author: Suravee Suthikulpanit Date: Wed Jul 6 17:08:13 2022 +0530 iommu/amd: Update dump_dte_entry Start using per PCI segment device table instead of global device table. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-24-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ccbb091f3f2019c803480bb4ed63c84869da68dc Author: Suravee Suthikulpanit Date: Wed Jul 6 17:08:12 2022 +0530 iommu/amd: Update iommu_ignore_device Start using per PCI segment device table instead of global device table. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-23-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 54625ef1db1ce7e57f356d8f355095a4fbb71efb Author: Suravee Suthikulpanit Date: Wed Jul 6 17:08:11 2022 +0530 iommu/amd: Update set_dte_entry and clear_dte_entry Start using per PCI segment data structures instead of global data structures. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-22-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit ccacd94fdacabe77f5a887c3b75334982b1ce9ca Author: Vasant Hegde Date: Wed Jul 6 17:08:10 2022 +0530 iommu/amd: Convert to use per PCI segment rlookup_table Then, remove the global amd_iommu_rlookup_table and rlookup_table_size. Co-developed-by: Suravee Suthikulpanit Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-21-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 5 ----- drivers/iommu/amd/init.c | 23 ++--------------------- drivers/iommu/amd/iommu.c | 19 +++++++++---------- 3 files changed, 11 insertions(+), 36 deletions(-) commit e6457d7cfca14e8f7f2199cd724c4f03abe493c2 Author: Suravee Suthikulpanit Date: Wed Jul 6 17:08:09 2022 +0530 iommu/amd: Update alloc_irq_table and alloc_irq_index Pass amd_iommu structure as one of the parameter to these functions as its needed to retrieve variable tables inside these functions. Co-developed-by: Vasant Hegde Signed-off-by: Vasant Hegde Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220706113825.25582-20-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) commit c4649a45f613a34012be82c700f9be5292893752 Author: Suravee Suthikulpanit Date: Wed Jul 6 17:08:08 2022 +0530 iommu/amd: Update amd_irte_ops functions Pass amd_iommu structure as one of the parameter to amd_irte_ops functions since its needed to activate/deactivate the iommu. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-19-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 6 ++--- drivers/iommu/amd/iommu.c | 51 +++++++++++++++---------------------- 2 files changed, 24 insertions(+), 33 deletions(-) commit 9457d75c056ad52b6c33693c87500e38fdd41c6f Author: Suravee Suthikulpanit Date: Wed Jul 6 17:08:07 2022 +0530 iommu/amd: Introduce struct amd_ir_data.iommu Add a pointer to struct amd_iommu to amd_ir_data structure, which can be used to correlate interrupt remapping data to a per-PCI-segment interrupt remapping table. Co-developed-by: Vasant Hegde Signed-off-by: Vasant Hegde Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220706113825.25582-18-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 1 + drivers/iommu/amd/iommu.c | 34 +++++++++++++++------------------- 2 files changed, 16 insertions(+), 19 deletions(-) commit 9873ae6e944d2e6f939ab81b25b2be7f0ee92d18 Author: Suravee Suthikulpanit Date: Wed Jul 6 17:08:06 2022 +0530 iommu/amd: Update irq_remapping_alloc to use IOMMU lookup helper function To allow IOMMU rlookup using both PCI segment and device ID. Co-developed-by: Vasant Hegde Signed-off-by: Vasant Hegde Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220706113825.25582-17-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 8b71c9bf4df8294f775b81babfd384d1b3c00aa8 Author: Suravee Suthikulpanit Date: Wed Jul 6 17:08:05 2022 +0530 iommu/amd: Convert to use rlookup_amd_iommu helper function Use rlookup_amd_iommu() helper function which will give per PCI segment rlookup_table. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-16-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu.c | 64 ++++++++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 26 deletions(-) commit 0217ed5a946b61cca3a608d1ba9a422f8f85baf6 Author: Vasant Hegde Date: Wed Jul 6 17:08:04 2022 +0530 iommu/amd: Convert to use per PCI segment irq_lookup_table Then, remove the global irq_lookup_table. Co-developed-by: Suravee Suthikulpanit Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-15-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 2 -- drivers/iommu/amd/init.c | 19 ------------------- drivers/iommu/amd/iommu.c | 36 +++++++++++++++++++++++------------- 3 files changed, 23 insertions(+), 34 deletions(-) commit ec12dd139252cede736b8f98c5ced9644121de30 Author: Vasant Hegde Date: Wed Jul 6 17:08:03 2022 +0530 iommu/amd: Introduce per PCI segment rlookup table size It will replace global "rlookup_table_size" variable. Co-developed-by: Suravee Suthikulpanit Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-14-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 3 +++ drivers/iommu/amd/init.c | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) commit 74ce42a9ab7a245c293c58a4cb964ad285e8fb2e Author: Vasant Hegde Date: Wed Jul 6 17:08:02 2022 +0530 iommu/amd: Introduce per PCI segment alias table size It will replace global "alias_table_size" variable. Co-developed-by: Suravee Suthikulpanit Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-13-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 3 +++ drivers/iommu/amd/init.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit b5c852907e0e8a52f8660235390b831ce0a2b50c Author: Vasant Hegde Date: Wed Jul 6 17:08:01 2022 +0530 iommu/amd: Introduce per PCI segment device table size With multiple pci segment support, number of BDF supported by each segment may differ. Hence introduce per segment device table size which depends on last_bdf. This will replace global "device_table_size" variable. Co-developed-by: Suravee Suthikulpanit Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-12-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 3 +++ drivers/iommu/amd/init.c | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) commit 307959008d80cdfd67fb19a146932582bb68a399 Author: Vasant Hegde Date: Wed Jul 6 17:08:00 2022 +0530 iommu/amd: Introduce per PCI segment last_bdf Current code uses global "amd_iommu_last_bdf" to track the last bdf supported by the system. This value is used for various memory allocation, device data flushing, etc. Introduce per PCI segment last_bdf which will be used to track last bdf supported by the given PCI segment and use this value for all per segment memory allocations. Eventually it will replace global "amd_iommu_last_bdf". Co-developed-by: Suravee Suthikulpanit Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-11-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 3 ++ drivers/iommu/amd/init.c | 69 ++++++++++++++++++++++--------------- 2 files changed, 45 insertions(+), 27 deletions(-) commit b618ae6247bbafe0844355bafd948e59ebd77098 Author: Vasant Hegde Date: Wed Jul 6 17:07:59 2022 +0530 iommu/amd: Introduce per PCI segment unity map list Newer AMD systems can support multiple PCI segments. In order to support multiple PCI segments IVMD table in IVRS structure is enhanced to include pci segment id. Update ivmd_header structure to include "pci_seg". Also introduce per PCI segment unity map list. It will replace global amd_iommu_unity_map list. Note that we have used "reserved" field in IVMD table to include "pci_seg id" which was set to zero. It will take care of backward compatibility (new kernel will work fine on older systems). Co-developed-by: Suravee Suthikulpanit Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-10-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 13 +++++++------ drivers/iommu/amd/init.c | 30 ++++++++++++++++++++---------- drivers/iommu/amd/iommu.c | 8 +++++++- 3 files changed, 34 insertions(+), 17 deletions(-) commit 99fc4ac3d2978cec1ae80dbc452fac1bb2cc976f Author: Suravee Suthikulpanit Date: Wed Jul 6 17:07:58 2022 +0530 iommu/amd: Introduce per PCI segment alias_table This will replace global alias table (amd_iommu_alias_table). Co-developed-by: Vasant Hegde Signed-off-by: Vasant Hegde Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220706113825.25582-9-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 7 +++++++ drivers/iommu/amd/init.c | 41 +++++++++++++++++++++++++++++-------- drivers/iommu/amd/iommu.c | 41 ++++++++++++++++++++++--------------- 3 files changed, 64 insertions(+), 25 deletions(-) commit eb21ef0227915ba61c8927fddca53571a0a35de8 Author: Suravee Suthikulpanit Date: Wed Jul 6 17:07:57 2022 +0530 iommu/amd: Introduce per PCI segment old_dev_tbl_cpy It will remove global old_dev_tbl_cpy. Also update copy_device_table() copy device table for all PCI segments. Co-developed-by: Vasant Hegde Signed-off-by: Vasant Hegde Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220706113825.25582-8-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 6 ++ drivers/iommu/amd/init.c | 109 +++++++++++++++++++++--------------- 2 files changed, 70 insertions(+), 45 deletions(-) commit 39a303ba4a57f263aa2ed4908161bca3583f35f9 Author: Vasant Hegde Date: Wed Jul 6 17:07:56 2022 +0530 iommu/amd: Introduce per PCI segment dev_data_list This will replace global dev_data_list. Co-developed-by: Suravee Suthikulpanit Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-7-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 3 +++ drivers/iommu/amd/init.c | 1 + drivers/iommu/amd/iommu.c | 21 ++++++++++----------- 3 files changed, 14 insertions(+), 11 deletions(-) commit 333e581bcdffc09e6c6c95a0c24bfc66b3b4dcfd Author: Vasant Hegde Date: Wed Jul 6 17:07:55 2022 +0530 iommu/amd: Introduce per PCI segment irq_lookup_table This will replace global irq lookup table (irq_lookup_table). Co-developed-by: Suravee Suthikulpanit Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-6-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 6 ++++++ drivers/iommu/amd/init.c | 27 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit eda797a2779509280c84c557a9caf568b23db4e6 Author: Suravee Suthikulpanit Date: Wed Jul 6 17:07:54 2022 +0530 iommu/amd: Introduce per PCI segment rlookup table This will replace global rlookup table (amd_iommu_rlookup_table). Add helper functions to set/get rlookup table for the given device. Also add macros to get seg/devid from sbdf. Co-developed-by: Vasant Hegde Signed-off-by: Vasant Hegde Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220706113825.25582-5-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu.h | 1 + drivers/iommu/amd/amd_iommu_types.h | 11 ++++++++++ drivers/iommu/amd/init.c | 23 +++++++++++++++++++ drivers/iommu/amd/iommu.c | 44 +++++++++++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+) commit 04230c119930299f2a30de783c0a643481a66eed Author: Suravee Suthikulpanit Date: Wed Jul 6 17:07:53 2022 +0530 iommu/amd: Introduce per PCI segment device table Introduce per PCI segment device table. All IOMMUs within the segment will share this device table. This will replace global device table i.e. amd_iommu_dev_table. Also introduce helper function to get the device table for the given IOMMU. Co-developed-by: Vasant Hegde Signed-off-by: Vasant Hegde Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20220706113825.25582-4-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu.h | 1 + drivers/iommu/amd/amd_iommu_types.h | 10 ++++++++++ drivers/iommu/amd/init.c | 26 ++++++++++++++++++++++++-- drivers/iommu/amd/iommu.c | 12 ++++++++++++ 4 files changed, 47 insertions(+), 2 deletions(-) commit 404ec4e4c169fb64da6b2a38b471c13ac0897c76 Author: Vasant Hegde Date: Wed Jul 6 17:07:52 2022 +0530 iommu/amd: Introduce pci segment structure Newer AMD systems can support multiple PCI segments, where each segment contains one or more IOMMU instances. However, an IOMMU instance can only support a single PCI segment. Current code assumes that system contains only one pci segment (segment 0) and creates global data structures such as device table, rlookup table, etc. Introducing per PCI segment data structure, which contains segment specific data structures. This will eventually replace the global data structures. Also update `amd_iommu->pci_seg` variable to point to PCI segment structure instead of PCI segment ID. Co-developed-by: Suravee Suthikulpanit Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-3-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 24 ++++++++++++++++++- drivers/iommu/amd/init.c | 46 ++++++++++++++++++++++++++++++++++++- 2 files changed, 68 insertions(+), 2 deletions(-) commit d02674d71c5a625e5b2e4323edbf05ebedaf4273 Author: Vasant Hegde Date: Wed Jul 6 17:07:51 2022 +0530 iommu/amd: Update struct iommu_dev_data definition struct iommu_dev_data contains member "pdev" to point to pci_dev. This is valid for only PCI devices and for other devices this will be NULL. This causes unnecessary "pdev != NULL" check at various places. Replace "struct pci_dev" member with "struct device" and use to_pci_dev() to get pci device reference as needed. Also adjust setup_aliases() and clone_aliases() function. No functional change intended. Co-developed-by: Suravee Suthikulpanit Signed-off-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20220706113825.25582-2-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 2 +- drivers/iommu/amd/iommu.c | 32 +++++++++++++++++++------------- 2 files changed, 20 insertions(+), 14 deletions(-) commit 83874d51eb4a51725c9403e11476a433add98c34 Author: Bo Liu Date: Fri Jul 1 02:20:08 2022 -0400 iommu/amd: Handle return of iommu_device_sysfs_add As iommu_device_sysfs_add() can fail, we should check the return value. Signed-off-by: Bo Liu Link: https://lore.kernel.org/r/20220701062008.6988-1-liubo03@inspur.com Signed-off-by: Joerg Roedel drivers/iommu/amd/init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c1ab64aaacd61be70af26c711aa08345ff84f166 Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:20 2022 +0300 phy: qcom-qmp-usb: define QPHY_V2_PCS_PLL_LOCK_CHK_DLY_TIME register Other PHYs tables directly reference QPHY_PLL_LOCK_CHK_DLY_TIME register without using reglayout. Define corresponding register to be used by msm8996 PHY tables and use it directly. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-29-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 1 - drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 4 +--- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 4 +--- drivers/phy/qualcomm/phy-qcom-qmp-pcs-v2.h | 1 + drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 1 - drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 1 - 6 files changed, 3 insertions(+), 9 deletions(-) commit d36e341a177471e118db3b4e3c8d4afd89a99cd0 Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:19 2022 +0300 phy: qcom-qmp-usb: replace FLL layout writes for msm8996 Other PHYs tables directly reference FLL registers without using reglayout. Define corresponding registers to be used by msm8996 PHY tables and use them directly. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-28-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 5 ----- drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 10 ---------- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 10 ---------- drivers/phy/qualcomm/phy-qcom-qmp-pcs-v2.h | 7 +++++++ drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 5 ----- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 20 +++++--------------- 6 files changed, 12 insertions(+), 45 deletions(-) commit 9f2fd65fd9125f4873012f80c4e25e0fff77179d Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:18 2022 +0300 phy: qcom-qmp: pcs-pcie-v4: add missing registers Add missing registers, verified against: - msm-4.19's qcom,kona-qmp-usb3.h Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-27-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v4.h | 49 +++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 3599cb6a19cc4547126d33a688fa7ca1103cf793 Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:17 2022 +0300 phy: qcom-qmp: pcs-v3: add missing registers Add missing registers, verified against: - msm-4.19's qcom,usb3-11nm-qmp-combo.h Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-26-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcs-v3.h | 82 ++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit 03baa67f497d3ed94109b8099353a4f46a147ce7 Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:16 2022 +0300 phy: qcom-qmp: qserdes-com-v5: add missing registers Add missing registers, verified against: - msm-5.4's qcom,usb3-5nm-qmp-uni.h - msm-5.4's qcom,usb3-5nm-qmp-combo.h Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-25-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-qserdes-com-v5.h | 59 ++++++++ .../phy/qualcomm/phy-qcom-qmp-qserdes-txrx-v5.h | 155 ++++++++++++++++++++- 2 files changed, 210 insertions(+), 4 deletions(-) commit 1195c1dabf416432d20fa03cb8c8902948f8fbba Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:15 2022 +0300 phy: qcom-qmp: qserdes-com-v4: add missing registers Add missing registers, verified against: - msm-4.19's qcom,kona-qmp-usb3.h The 0x1a0 register name was corrected, verified via msm-4.14's qcom,sdxprairie-qmp-usb3.h. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-24-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 2 +- drivers/phy/qualcomm/phy-qcom-qmp-qserdes-com-v4.h | 47 ++++++- .../phy/qualcomm/phy-qcom-qmp-qserdes-txrx-v4.h | 141 +++++++++++++++++++++ 3 files changed, 188 insertions(+), 2 deletions(-) commit d88b3058c0077a02fbfce0862ef877e13acd92ae Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:14 2022 +0300 phy: qcom-qmp: qserdes-com-v3: add missing registers Add missing registers, verified against: - msm-4.4's phy-qcom-ufs-qmp-v3.h Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-23-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-qserdes-com-v3.h | 25 ++++++++++++++++++++++ .../phy/qualcomm/phy-qcom-qmp-qserdes-txrx-v3.h | 3 +++ 2 files changed, 28 insertions(+) commit f7c5cedb609231f64d54b043a9afc88179b01055 Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:13 2022 +0300 phy: qcom-qmp: qserdes-com: add missing registers Add missing registers, verified against: - msm-3.18's phy-qcom-ufs-qmp-14nm.h - msm-3.18's mdss-hdmi-pll-8996.c - msm-5.4's ep_pcie_phy.h Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-22-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 2 +- drivers/phy/qualcomm/phy-qcom-qmp-qserdes-com.h | 57 ++++++++ drivers/phy/qualcomm/phy-qcom-qmp-qserdes-txrx.h | 163 ++++++++++++++++++++++- 3 files changed, 220 insertions(+), 2 deletions(-) commit fc270d136a157b03d6c96590242ad5401a9f1ed2 Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:12 2022 +0300 phy: qcom-qmp: split PCS_UFS V3 symbols to separate header Several registers defined in the PCS V3 namespace in reality belong to the PCS_UFS V3 register space. Move them to the separate header and rename them to explicitly mention PCS_UFS. While we are at it, correct one register in the msm8998_usb3_pcs_tbl table to use PCS register name. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-21-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcs-ufs-v3.h | 18 ++++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-pcs-v3.h | 8 -------- drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 16 ++++++++-------- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 2 +- drivers/phy/qualcomm/phy-qcom-qmp.h | 1 + 5 files changed, 28 insertions(+), 17 deletions(-) commit 25ad4a4cfeff80021f041c71b4968adf470f9ec3 Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:11 2022 +0300 phy: qcom-qmp: split allegedly 4.20 and 5.20 PCS registers Split registers definitions belonging allegedly to 4.20 and 5.20 QMP PHYs. They are used for the PCIe QMP PHYs, which have no good open source reference. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-20-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v4_20.h | 17 ++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v5_20.h | 17 ++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-pcs-v4_20.h | 15 ++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp.h | 27 ++++------------------ 4 files changed, 54 insertions(+), 22 deletions(-) commit 5fc21d1bd3d7b2b35a01a47d7a1fb54cd77350bc Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:10 2022 +0300 phy: qcom-qmp: split allegedly 4.20 and 5.20 TX/RX registers Split registers definitions belonging allegedly to 4.20 and 5.20 QMP PHYs. They are used for the PCIe QMP PHYs, which have no good open source reference. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-19-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul .../phy/qualcomm/phy-qcom-qmp-qserdes-txrx-v4_20.h | 43 +++++++++++ .../phy/qualcomm/phy-qcom-qmp-qserdes-txrx-v5_20.h | 60 +++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp.h | 88 +--------------------- 3 files changed, 105 insertions(+), 86 deletions(-) commit 87d71378c61a34b64a4879712a068cd8cb98c7f2 Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:09 2022 +0300 phy: qcom-qmp: move PCIE QHP registers to separate header Move PCIE QHP registers to the separate header. QHP is a sepecial PHY kind used on sdm845 to drive one of PCIe links. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-18-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie-qhp.h | 123 +++++++++++++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp.h | 116 +------------------------ 2 files changed, 125 insertions(+), 114 deletions(-) commit b7a2f882574b6a895a73cfcaa1577950ee102df4 Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:08 2022 +0300 phy: qcom-qmp: move PCS V5 registers to separate headers Move PCS V5 registers to the separate headers. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-17-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v5.h | 16 +++++++ drivers/phy/qualcomm/phy-qcom-qmp-pcs-ufs-v5.h | 27 +++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-pcs-usb-v5.h | 36 ++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-pcs-v5.h | 17 +++++++ drivers/phy/qualcomm/phy-qcom-qmp.h | 63 ++----------------------- 5 files changed, 101 insertions(+), 58 deletions(-) commit 41ad371f029118c1aee53c30b86ca4903479149a Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:07 2022 +0300 phy: qcom-qmp: move PCS V4 registers to separate headers Move PCS V4 registers to the separate headers. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-16-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v4.h | 23 +++ drivers/phy/qualcomm/phy-qcom-qmp-pcs-ufs-v4.h | 31 ++++ drivers/phy/qualcomm/phy-qcom-qmp-pcs-usb-v4.h | 34 +++++ drivers/phy/qualcomm/phy-qcom-qmp-pcs-v4.h | 135 +++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp.h | 192 +----------------------- 5 files changed, 228 insertions(+), 187 deletions(-) commit 56a1fa09445be51ec3990579b1f613341e53f343 Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:06 2022 +0300 phy: qcom-qmp: move PCS V3 registers to separate headers Move PCS V3 registers to the separate headers. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-15-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcs-misc-v3.h | 17 ++++++ drivers/phy/qualcomm/phy-qcom-qmp-pcs-v3.h | 71 ++++++++++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp.h | 73 +------------------------ 3 files changed, 91 insertions(+), 70 deletions(-) commit 5ae11aa488443e815bdddbcdfcb2f488222933fe Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:05 2022 +0300 phy: qcom-qmp: move PCS V2 registers to separate header Move PCS V2 registers to the separate header. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-14-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcs-v2.h | 38 ++++++++++++++++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp.h | 29 +---------------------- 2 files changed, 39 insertions(+), 28 deletions(-) commit 147924ffe2e9f7d301e14d55ae66f08ebac7c431 Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:04 2022 +0300 phy: qcom-qmp: move QSERDES PLL registers to separate header Move QSERDES PLL registers to the separate header. This register set is unique for the IPQ PCIe Gen3 PHYs. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-13-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-qserdes-pll.h | 66 +++++++++++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp.h | 58 +--------------------- 2 files changed, 67 insertions(+), 57 deletions(-) commit f1f923ad3712a27e88743b590806c4ffb8f20eb3 Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:03 2022 +0300 phy: qcom-qmp: move QSERDES V5 registers to separate headers Move QSERDES V5 registers to the separate headers. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-12-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-qserdes-com-v5.h | 65 ++++++++++ .../phy/qualcomm/phy-qcom-qmp-qserdes-txrx-v5.h | 84 +++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp.h | 133 +-------------------- 3 files changed, 152 insertions(+), 130 deletions(-) commit 32d2cf532515beb5c2c34a1cbcf9c34d0fb040a8 Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:02 2022 +0300 phy: qcom-qmp: move QSERDES V4 registers to separate headers Move QSERDES V4 registers to the separate headers. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-11-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-qserdes-com-v4.h | 78 +++++++++++ .../phy/qualcomm/phy-qcom-qmp-qserdes-txrx-v4.h | 92 ++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp.h | 154 +-------------------- 3 files changed, 173 insertions(+), 151 deletions(-) commit a7fc833e2b6b99edbc867145f1c3266dcb7fca25 Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:01 2022 +0300 phy: qcom-qmp: move QSERDES V3 registers to separate headers Move QSERDES V3 registers to the separate headers. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-10-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-qserdes-com-v3.h | 86 +++++++++++++ .../phy/qualcomm/phy-qcom-qmp-qserdes-txrx-v3.h | 65 ++++++++++ drivers/phy/qualcomm/phy-qcom-qmp.h | 138 +-------------------- 3 files changed, 156 insertions(+), 133 deletions(-) commit 9e1bae6d67498ffc52a791c97f1afe043046c2c8 Author: Dmitry Baryshkov Date: Tue Jul 5 12:43:00 2022 +0300 phy: qcom-qmp: move QSERDES registers to separate header Move QSERDES V2 registers to the separate header. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-9-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-qserdes-com.h | 83 +++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-qserdes-txrx.h | 44 +++++++++ drivers/phy/qualcomm/phy-qcom-qmp.h | 112 +---------------------- 3 files changed, 130 insertions(+), 109 deletions(-) commit 60f2341447f6ba63894ef0dabd64e29777f27fe6 Author: Dmitry Baryshkov Date: Tue Jul 5 12:42:59 2022 +0300 phy: qcom-qmp: use QPHY_V4_PCS for ipq6018/ipq8074 PCIe gen3 PCS_COM_* symbols duplicate the QPHY_V4_PCS_*. PCS_PCIE_* symbols duplicate the QPHY_V4_PCS_PCIE_*. Use generic register names for the IPQ6018 and IPQ8074 tables and drop the custom PCS_COM_*/PCS_PCIE* names. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-8-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 80 ++++++++++++++++---------------- drivers/phy/qualcomm/phy-qcom-qmp.h | 35 +------------- 2 files changed, 41 insertions(+), 74 deletions(-) commit 6cad29831de18a8c2815b90271150982b4983b31 Author: Dmitry Baryshkov Date: Tue Jul 5 12:42:58 2022 +0300 phy: qcom-qmp: rename QMP V2 PCS registers Rename QMP V2 PCS registers to follow the usual pattern of QPHY_V2_PCS_*. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-7-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 4 +- drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 20 ++++----- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 26 ++++++------ drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 22 +++++----- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 12 +++--- drivers/phy/qualcomm/phy-qcom-qmp.h | 54 ++++++++++++------------ 6 files changed, 69 insertions(+), 69 deletions(-) commit 079328a97508fe72b3a84e222b17aa88779c3714 Author: Dmitry Baryshkov Date: Tue Jul 5 12:42:57 2022 +0300 phy: qcom-qmp: drop special QMP V2 PCIE gen3 defines Replace separate defines for QMP V2 PHY for PCIe gen3 ports. They are equivalent to the QSERDES_V4_ symbols. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-6-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 134 +++++++++++++++---------------- drivers/phy/qualcomm/phy-qcom-qmp.h | 40 --------- 2 files changed, 67 insertions(+), 107 deletions(-) commit af6643242d3ac9c90674c5ba8dbddb01ffc37f29 Author: Dmitry Baryshkov Date: Tue Jul 5 12:42:56 2022 +0300 phy: qcom-qmp-pcie: split pcs_misc region for ipq6018 pcie gen3 Follow the example of other PCIe PHYs and use separate pcs_misc region to access PCS_PCIE_* resources. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-5-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 9 +++++++++ drivers/phy/qualcomm/phy-qcom-qmp.h | 32 ++++++++++++++++---------------- 2 files changed, 25 insertions(+), 16 deletions(-) commit fc64623637da5e964566628bc0e660e93dc7a395 Author: Dmitry Baryshkov Date: Tue Jul 5 12:42:55 2022 +0300 phy: qcom-qmp-combo,usb: add support for separate PCS_USB region Different QMP USB PHYs might have different offset from PCS to PCS_USB register space, but the same PCS_USB register layout. Add separate PCS_USB region space and merge related PCS_USB definitions. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-4-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 47 +++++++++--- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 118 +++++++++++++++++++----------- drivers/phy/qualcomm/phy-qcom-qmp.h | 106 +++++++++++++-------------- 3 files changed, 163 insertions(+), 108 deletions(-) commit 2eb2920a053fcaf46dbba4fff3b47f986a503a71 Author: Dmitry Baryshkov Date: Tue Jul 5 12:42:54 2022 +0300 phy: qcom-qmp-ufs: remove spurious register write in the msm8996 table The msm8996_ufs_serdes_tbl table contains write to QPHY_POWER_DOWN_CONTROL, however this register doesn't belong to the QSERDES register space. Also the PHY power down is already handled in the qcom_qmp_phy_ufs_com_init(). Drop this entry completely. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-3-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 1 - 1 file changed, 1 deletion(-) commit 488987b2d5cade4e7680f7e81590435a848d1fa9 Author: Dmitry Baryshkov Date: Tue Jul 5 12:42:53 2022 +0300 phy: qcom-qmp: fix the QSERDES_V5_COM_CMN_MODE register Change QSERDES_V5_COM_CMN_MODE to be defined to 0x1a0 rather than 0x1a4. The only user of this register name (sm8450_qmp_gen4x2_pcie_serdes_tbl) should use the 0x1a0 register, as stated in the downstream dtsi tree. Fixes: 2c91bf6bf290 ("phy: qcom-qmp: Add SM8450 PCIe1 PHY support") Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220705094320.1313312-2-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7516351bebc1c678e02a4a46ef571bac210978ed Author: Kuogee Hsieh Date: Tue Jul 5 09:29:16 2022 -0700 drm/msm/dp: delete vdda regulator related functions from eDP/DP controller Vdda regulators are related to both eDP and DP phy so that it should be managed at eDP and DP phy driver instead of controller. This patch removes vdda regulators related functions out of eDP/DP controller. Signed-off-by: Kuogee Hsieh Reviewed-by: Stephen Boyd Reviewed-by: Dmitry Baryshkov Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/1657038556-2231-4-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Vinod Koul drivers/gpu/drm/msm/dp/dp_parser.c | 14 ------ drivers/gpu/drm/msm/dp/dp_parser.h | 8 ---- drivers/gpu/drm/msm/dp/dp_power.c | 95 +------------------------------------- 3 files changed, 2 insertions(+), 115 deletions(-) commit 85936d4f3815be8b81dc06cf9027f82546009a14 Author: Kuogee Hsieh Date: Tue Jul 5 09:29:15 2022 -0700 phy: qcom-qmp: add regulator_set_load to dp phy This patch add regulator_set_load() before enable regulator at DP phy driver. Signed-off-by: Kuogee Hsieh Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/1657038556-2231-3-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 41 ++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 9 deletions(-) commit 672478cf34729d6da2d8c0bf851663bc326739ef Author: Luca Weiss Date: Mon Jun 6 15:23:24 2022 +0200 dt-bindings: remoteproc: qcom: q6v5: fix example Use the node in the examples that is present in msm8974.dtsi, which uses proper flags for the interrupts and add required 'xo' clock among others. Signed-off-by: Luca Weiss Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220606132324.1497349-1-luca@z3ntu.xyz .../devicetree/bindings/remoteproc/qcom,q6v5.txt | 41 ++++++++++++---------- 1 file changed, 23 insertions(+), 18 deletions(-) commit bed0adac1ded4cb486ba19a3a7e730fbd9a1c9c6 Author: Sireesh Kodali Date: Thu May 26 19:47:39 2022 +0530 remoteproc: qcom: wcnss: Fix handling of IRQs The wcnss_get_irq function is expected to return a value > 0 in the event that an IRQ is succssfully obtained, but it instead returns 0. This causes the stop and ready IRQs to never actually be used despite being defined in the device-tree. This patch fixes that. Fixes: aed361adca9f ("remoteproc: qcom: Introduce WCNSS peripheral image loader") Signed-off-by: Sireesh Kodali Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220526141740.15834-2-sireeshkodali1@gmail.com drivers/remoteproc/qcom_wcnss.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 385fad1303afb89ab08412d56fc28c15bb551b26 Author: Krzysztof Kozlowski Date: Tue May 17 09:01:09 2022 +0200 dt-bindings: remoteproc: qcom,smd-edge: define re-usable schema for smd-edge 'smd-edge' property appears in multiple bindings, so split it into one place which can be re-used. This reduces code duplication and adds strict schema matching for smd-edge nodes (instead of just "type:object"). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220517070113.18023-9-krzysztof.kozlowski@linaro.org .../devicetree/bindings/remoteproc/qcom,adsp.yaml | 2 +- .../bindings/remoteproc/qcom,smd-edge.yaml | 85 ++++++++++++++++++++++ .../devicetree/bindings/soc/qcom/qcom,smd.yaml | 50 +------------ 3 files changed, 87 insertions(+), 50 deletions(-) commit ae9d475a10066823d21a1a93f81524851c4441a7 Author: Krzysztof Kozlowski Date: Tue May 17 09:01:08 2022 +0200 dt-bindings: remoteproc: qcom,glink-edge: define re-usable schema for glink-edge 'glink-edge' property appears in multiple bindings, so split it into one place which can be re-used. This reduces code duplication and adds strict schema matching for glink-edge nodes (instead of just "type:object"). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220517070113.18023-8-krzysztof.kozlowski@linaro.org .../devicetree/bindings/remoteproc/qcom,adsp.yaml | 2 +- .../bindings/remoteproc/qcom,glink-edge.yaml | 72 ++++++++++++++++++++++ .../bindings/remoteproc/qcom,sc7280-wpss-pil.yaml | 18 ++---- 3 files changed, 77 insertions(+), 15 deletions(-) commit c47b3b3959f2775bbc6fe74714cd41ba5d5bdce9 Author: Krzysztof Kozlowski Date: Tue May 17 09:01:07 2022 +0200 dt-bindings: remoteproc: qcom,adsp: use GIC_SPI defines in example Use GIC_SPI defines instead of raw value in the DTS example. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220517070113.18023-7-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 13b1adc11dde480e2582407a41f4f8b0e5f301a6 Author: Krzysztof Kozlowski Date: Tue May 17 09:01:06 2022 +0200 dt-bindings: remoteproc: qcom,adsp: simplify SM8150 power domains The SM8150 if cases for power domains can be merged with another entry. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220517070113.18023-6-krzysztof.kozlowski@linaro.org .../devicetree/bindings/remoteproc/qcom,adsp.yaml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit d2403ee73d20a11380b01d3efa4f2fdcd7bc0cbb Author: Krzysztof Kozlowski Date: Tue May 17 09:01:05 2022 +0200 dt-bindings: remoteproc: qcom,adsp: simplify interrupts Interrupts between variants differ only with presence of last optional interrupt, so the constraints can be simplified. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220517070113.18023-5-krzysztof.kozlowski@linaro.org .../devicetree/bindings/remoteproc/qcom,adsp.yaml | 46 +++++++++------------- 1 file changed, 18 insertions(+), 28 deletions(-) commit 3bf96d4620cadacf68207b0760e5f7cb09d52374 Author: Krzysztof Kozlowski Date: Tue May 17 09:01:04 2022 +0200 dt-bindings: remoteproc: qcom,adsp: add interconnects SM8350 ADSP Peripheral Image Loader already defines interconnects, so document the property: sm8350-hdk.dtb: remoteproc@4080000: 'interconnects' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220517070113.18023-4-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 8f69d59b05f9d07e8799ad1ae6c20d4d79134643 Author: Krzysztof Kozlowski Date: Tue May 17 09:01:03 2022 +0200 dt-bindings: remoteproc: remove unneeded ref for names The core schema already sets a 'ref' for properties ending with 'names'. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220517070113.18023-3-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml | 1 - Documentation/devicetree/bindings/remoteproc/qcom,qcs404-cdsp-pil.yaml | 1 - Documentation/devicetree/bindings/remoteproc/qcom,sc7280-wpss-pil.yaml | 3 +-- Documentation/devicetree/bindings/remoteproc/qcom,sdm845-adsp-pil.yaml | 1 - 4 files changed, 1 insertion(+), 5 deletions(-) commit 7ed5f2454acf8ebc126ff4d541832e8d2c28c0a0 Author: Christophe JAILLET Date: Tue Jul 5 22:36:26 2022 +0200 qed: Use bitmap_empty() Use bitmap_empty() instead of hand-writing it. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/78713a72414b99f673c3a9ec0519bb41c080935a.1657053343.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/ethernet/qlogic/qed/qed_rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 291dbea16c711d31b6b3b26b8475116110a7b7b3 Author: Christophe JAILLET Date: Tue Jul 5 22:36:16 2022 +0200 qed: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/d61ec77ce0b92f7539c6a144106139f8d737ec29.1657053343.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/ethernet/qlogic/qed/qed_rdma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 76d3c114706f438d5d2593401574c457849bd90c Author: Christophe JAILLET Date: Tue Jul 5 22:25:58 2022 +0200 cnic: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/521bd2a49be5d88e493bcfb63505d3df91a1c2d2.1657052743.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/cnic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 45262522d0027269dbece119f1cb89e25f5de965 Author: Christophe JAILLET Date: Tue Jul 5 22:22:59 2022 +0200 bnxt: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/d508f3adf7e2804f4d3793271b82b196a2ccb940.1657052562.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ee4c0c5d2593d5f694447f4053076cdc23e606c9 Author: Christophe JAILLET Date: Tue Jul 5 21:36:51 2022 +0200 sfc: falcon: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Acked-by: Martin Habets Link: https://lore.kernel.org/r/c62c1774e6a34bc64323ce526b385aa87c1ca575.1657049799.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/falcon/farch.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 820aceb53c7558386e8028ca56144b25fe20b010 Author: Christophe JAILLET Date: Tue Jul 5 21:34:08 2022 +0200 sfc/siena: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Acked-by: Martin Habets Link: https://lore.kernel.org/r/717ba530215f4d7ce9fedcc73d98dba1f70d7f71.1657049636.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/siena/farch.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 6ca4b3932114def81fc35b2580fa0378a7ed6f09 Author: Yang Yingliang Date: Tue Jul 5 21:17:33 2022 +0800 net: dsa: b53: remove unnecessary spi_set_drvdata() Remove unnecessary spi_set_drvdata() in b53_spi_remove(), the driver_data will be set to NULL in device_unbind_cleanup() after calling ->remove(). Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220705131733.351962-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski drivers/net/dsa/b53/b53_spi.c | 2 -- 1 file changed, 2 deletions(-) commit 02d99d4cfe0984ea05edfbcbae2c9660a05f7b11 Author: Johan Hovold Date: Tue Jul 5 13:40:32 2022 +0200 arm64: dts: qcom: msm8996: clean up PCIe PHY node Clean up the PCIe PHY node by renaming the wrapper node and grouping the child node properties. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705114032.22787-15-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 3a5da59af38d77088aa5226208cca0beb9125485 Author: Johan Hovold Date: Tue Jul 5 13:40:31 2022 +0200 arm64: dts: qcom: msm8996: use non-empty ranges for PCIe PHYs Clean up the PCIe PHY nodes by using a non-empty ranges property. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705114032.22787-14-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit e30d9f1e58c0f860b8a740c63527106146f0f3fd Author: Johan Hovold Date: Tue Jul 5 13:40:29 2022 +0200 arm64: dts: qcom: sm8450: drop UFS PHY clock-cells The QMP UFS PHY provides more than one symbol clock and would need an index to differentiate the clocks, but none of this is described by the binding currently. Drop the incorrect '#clock-cells' property for now. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705114032.22787-12-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sm8450.dtsi | 1 - 1 file changed, 1 deletion(-) commit be18bc7bd9e82e2d08095d9ed0d9978dcb707e7c Author: Johan Hovold Date: Tue Jul 5 13:40:28 2022 +0200 arm64: dts: qcom: sm8250: drop UFS PHY clock-cells The QMP UFS PHY provides more than one symbol clock and would need an index to differentiate the clocks, but none of this is described by the binding currently. Drop the incorrect '#clock-cells' property for now. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705114032.22787-11-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sm8350.dtsi | 1 - 1 file changed, 1 deletion(-) commit 119feff14672af57cc62d2e1350a34e4aa3c5f10 Author: Johan Hovold Date: Tue Jul 5 13:40:27 2022 +0200 arm64: dts: qcom: sc8280xp: drop UFS PHY clock-cells The QMP UFS PHY provides more than one symbol clock and would need an index to differentiate the clocks, but none of this is described by the binding currently. Drop the incorrect '#clock-cells' property for now. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705114032.22787-10-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 0aaa0a9a4745ff4b4ffeed80ce3463c9c8c0f693 Author: Johan Hovold Date: Tue Jul 5 13:40:26 2022 +0200 arm64: dts: qcom: sm8450: drop USB PHY clock index The QMP USB PHY provides a single clock so drop the redundant clock index. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705114032.22787-9-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af5515543b9b5999d547f4f2afcad95f0aff5b1d Author: Johan Hovold Date: Tue Jul 5 13:40:25 2022 +0200 arm64: dts: qcom: sm8350: drop USB PHY clock index The QMP USB PHY provides a single clock so drop the redundant clock index. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705114032.22787-8-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sm8350.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ed9cbbcb8c6a1925db7995214602c6a8983ff870 Author: Johan Hovold Date: Tue Jul 5 13:40:24 2022 +0200 arm64: dts: qcom: msm8998: drop USB PHY clock index The QMP USB PHY provides a single clock so drop the redundant clock index. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705114032.22787-7-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de9e7f77d8694ed6f5064fe865711b5f8321c09d Author: Johan Hovold Date: Tue Jul 5 13:40:22 2022 +0200 arm64: dts: qcom: ipq8074: drop USB PHY clock index The QMP USB PHY provides a single clock so drop the redundant clock index. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705114032.22787-5-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/ipq8074.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9215a64a0776c4797ed08520655fba7e85530156 Author: Johan Hovold Date: Tue Jul 5 13:40:21 2022 +0200 arm64: dts: qcom: ipq6018: drop USB PHY clock index The QMP USB PHY provides a single clock so drop the redundant clock index. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705114032.22787-4-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9fd162ce764c227fcfd4242f6c1639895a9481f Author: Johan Hovold Date: Tue Jul 5 13:40:20 2022 +0200 arm64: dts: qcom: sm8250: add missing PCIe PHY clock-cells Add the missing '#clock-cells' properties to the PCIe QMP PHY nodes. Signed-off-by: Johan Hovold Fixes: e53bdfc00977 ("arm64: dts: qcom: sm8250: Add PCIe support") Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705114032.22787-3-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 531c738fb36069d60aff267a0b25533a35d59fd0 Author: Johan Hovold Date: Tue Jul 5 13:40:19 2022 +0200 arm64: dts: qcom: sc7280: drop PCIe PHY clock index The QMP PCIe PHY provides a single clock so drop the redundant clock index. Signed-off-by: Johan Hovold Fixes: bd7d507935ca ("arm64: dts: qcom: sc7280: Add pcie clock support") Fixes: 92e0ee9f83b3 ("arm64: dts: qcom: sc7280: Add PCIe and PHY related nodes") Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220705114032.22787-2-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc7280.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21857088fa274750608e25b44ededa6199fac4a5 Author: Douglas Anderson Date: Wed Jul 6 14:47:33 2022 -0700 Revert "arm64: dts: qcom: Fix 'reg-names' for sdhci nodes" This reverts commit afcbe252e9c19161e4d4c95f33faaf592f1de086. The commit in question caused my sc7280-herobrine-herobrine-r1 board not to boot anymore. This shouldn't be too surprising since the driver is relying on the name "cqhci". The issue seems to be that someone decided to change the names of things when the binding moved from .txt to .yaml. We should go back to the names that the bindings have historically specified. For some history, see commit d3392339cae9 ("mmc: cqhci: Update cqhci memory ioresource name") and commit d79100c91ae5 ("dt-bindings: mmc: sdhci-msm: Add CQE reg map"). Fixes: afcbe252e9c1 ("arm64: dts: qcom: Fix 'reg-names' for sdhci nodes") Signed-off-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220706144706.1.I48f35820bf3670d54940110462555c2d0a6d5eb2@changeid arch/arm64/boot/dts/qcom/qcs404.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm630.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sm6125.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) commit 713aa4efbcba0e60df5a56369a93ed362e220c6b Author: Dmitry Baryshkov Date: Wed Jul 6 17:54:09 2022 +0300 arm64: dts: qcom: sc7180-idp: add vdds supply to the DSI PHY Add the (required) vdss-supply property to the DSI PHY node. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220706145412.1566011-3-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sc7180-idp.dts | 1 + 1 file changed, 1 insertion(+) commit 63162b473e3ae016d1f4b468b26386bea1bd8d08 Author: Dmitry Baryshkov Date: Wed Jul 6 17:54:08 2022 +0300 arm64: dts: qcom: sc7280: use constants for gpucc clocks and power-domains To ease merging of bindings and dts files, the constants were replaced with numeric values. Change them back to defined constants. While we are at it, fix the indentation of these clocks properties to follow established guidelines. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220706145412.1566011-2-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sc7280.dtsi | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 1789a159732d0065bb11bcdd3d0b928592696104 Author: Dmitry Baryshkov Date: Wed Jul 6 17:54:07 2022 +0300 arm64: dts: qcom: msm8996: add missing DSI clock assignments Add missing DSI clock assignments to properly use DSI PHY clocks as DSI byte and pixel clock parents. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220706145412.1566011-1-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 730d55d861c63647df3cc9f77904a01c6719201b Author: Robert Marko Date: Mon Jul 4 16:35:54 2022 +0200 arm64: dts: qcom: ipq8074: add reset to SDHCI Add reset to SDHCI controller so it can be reset to avoid timeout issues after software reset due to bootloader set configuration. Signed-off-by: Robert Marko Reviewed-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220704143554.1180927-2-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq8074.dtsi | 1 + 1 file changed, 1 insertion(+) commit d3ef125cf844ab2f6365d8645d7468cec709170a Author: Krzysztof Kozlowski Date: Mon Jul 4 14:17:30 2022 +0200 arm64: dts: qcom: sdm845: Add CPU BWMON Add device node for CPU-memory BWMON device (bandwidth monitoring) on SDM845 measuring bandwidth between CPU (gladiator_noc) and Last Level Cache (memnoc). Usage of this BWMON allows to remove fixed bandwidth votes from cpufreq (CPU nodes) thus achieve high memory throughput even with lower CPU frequencies. Co-developed-by: Thara Gopinath Signed-off-by: Thara Gopinath Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220704121730.127925-5-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm845.dtsi | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 7d9c1da91a614d52b84a4628e21888bb5c526276 Author: Robert Marko Date: Mon Jul 4 13:33:18 2022 +0200 arm64: dts: qcom: ipq8074: move ARMv8 timer out of SoC node The ARM timer is usually considered not part of SoC node, just like other ARM designed blocks (PMU, PSCI). This fixes dtbs_check warning: arch/arm64/boot/dts/qcom/ipq8072-ax9000.dtb: soc: timer: {'compatible': ['arm,armv8-timer'], 'interrupts': [[1, 2, 3848], [1, 3, 3848], [1, 4, 3848], [1, 1, 3848]]} should not be valid under {'type': 'object'} From schema: dtschema/schemas/simple-bus.yaml Signed-off-by: Robert Marko Acked-by: Krzysztof Kozlowski [bjorn: Moved node after "soc" for alphabetical ordering] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220704113318.623102-1-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq8074.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 154fd146a446c0fffa81d72c78611b0ce26b2718 Author: Kuogee Hsieh Date: Fri Jul 1 08:47:16 2022 -0700 arm64: dta: qcom: sc7180: delete vdda-1p2 and vdda-0p9 from mdss_dp Both vdda-1p2-supply and vdda-0p9-supply regulators are controlled by dp combo phy. Therefore remove them from dp controller. Signed-off-by: Kuogee Hsieh Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1656690436-15221-1-git-send-email-quic_khsieh@quicinc.com arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 2 -- 1 file changed, 2 deletions(-) commit a1ade6cac5a2adc87099fc040074305804684cf0 Author: Abel Vesa Date: Thu Jun 30 13:14:03 2022 +0300 arm64: dts: qcom: sdm845: Switch PSCI cpu idle states from PC to OSI Switch from the flat PC idle states of sdm845 to OSI hierarchical idle states. The exceptions are the cheza plaftorms, which need to remain with PC idle states. So in order allow all the other platforms to switch, while cheza platforms to remain the same, replace the PC idle states with the OSI ones in the main SDM845 dtsi, and then override the inherited OSI states with PC ones, delete inherited psci cpus nodes, domain idle states and power domain properties. Signed-off-by: Abel Vesa Tested-by: Steev Klimaszewski Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220630101403.1888541-1-abel.vesa@linaro.org arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 132 ++++++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/sdm845.dtsi | 135 +++++++++++++++++------------ 2 files changed, 213 insertions(+), 54 deletions(-) commit b9c0c0e5da43ff3aa6dd93e2f994dc889dd5b261 Author: David Heidelberg Date: Sun Jun 26 20:32:46 2022 +0200 arm64: dts: qcom: extend scm compatible strings First device specific compatible, then general one. Reviewed-by: Krzysztof Kozlowski Signed-off-by: David Heidelberg Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220626183247.142776-2-david@ixit.cz arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8953.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 28ae8aa3923c394c8efa8e6439c0f84fa42c96fb Author: Anton Bambura Date: Sun Jun 26 12:45:38 2022 -0400 arm64: dts: qcom: add device tree for LG G7 and LG V35 Adds initial support for the LG G7 (judyln) and LG V35 (judyp) phones. Currently supported features: - Display via simplefb (panel driver is WIP) - Keys - Micro SD card - Modem (not tested much, but initialises) - UFS (crashes during intensive workloads, may need quirks) - USB in peripheral mode Notable missing features: - Enabling WiFi causes a remoteproc crash, so it's disabled here. Needs to be debugged - ideas welcome! Signed-off-by: Anton Bambura Signed-off-by: Stefan Hansson Tested-by: Gregari Ivanov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220626164536.16011-2-newbie13xd@gmail.com arch/arm64/boot/dts/qcom/Makefile | 2 + arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 614 +++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts | 68 +++ arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts | 44 ++ 4 files changed, 728 insertions(+) commit 2b111e30c3b114d20ddaf3b79d07723fdedbe1a3 Author: Dmitry Baryshkov Date: Mon Jun 20 10:19:36 2022 +0300 arm64: dts: qcom: msm8996: add xo clock source to rpmcc Add XO clock source to the RPM clock controller. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220620071936.1558906-5-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit edb8e38ca99f198b59c967c9e26719198cea8bf8 Author: Dmitry Baryshkov Date: Mon Jun 20 10:19:35 2022 +0300 arm64: dts: qcom: msm8996: add GCC's optional clock sources Add missing GCC clock sources. This includes PCIe and USB PIPE and UFS symbol clocks. Signed-off-by: Dmitry Baryshkov Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220620071936.1558906-4-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit b874fff9a7683df30e5aff16d5a85b1f8a43aa5d Author: Dmitry Baryshkov Date: Mon Jun 20 10:19:34 2022 +0300 arm64: dts: qcom: msm8996: correct #clock-cells for QMP PHY nodes The commit 82d61e19fccb ("arm64: dts: qcom: msm8996: Move '#clock-cells' to QMP PHY child node") moved the '#clock-cells' properties to the child nodes. However it missed the fact that the property must have been set to <0> (as all pipe clocks use of_clk_hw_simple_get as the xlate function. Also the mentioned commit didn't add '#clock-cells' properties to second and third PCIe PHY nodes. Correct both these mistakes: - Set '#clock-cells' to <0>, - Add the property to pciephy_1 and pciephy_2 nodes. Fixes: 82d61e19fccb ("arm64: dts: qcom: msm8996: Move '#clock-cells' to QMP PHY child node") Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220620071936.1558906-3-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8b936253e3dad69506cb47043dd6451a0a14cf22 Author: Dylan Van Assche Date: Thu May 12 07:44:39 2022 +0200 arm64: dts: qcom: sdm845-shift-axolotl: Enable pmi9889 LPG LED Enables the RGB notification LED on the SHIFT 6mq (sdm845-shift-axolotl) with the Qualcomm Light Pulse Generator bindings by Bjorn Andersson [1]. Patches are merged in for-next branch of linux-leds. Tested these changes on the SHIFT 6mq. [1] https://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git/commit/?h=for-next&id=a8e53db46f19f67be6a26488aafb7d10c78e33bd Signed-off-by: Dylan Van Assche Reviewed-by: Alexander Martinz Tested-by: Alexander Martinz Tested-by: Caleb Connolly Reviewed-by: Caleb Connolly Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220512054439.13971-1-me@dylanvanassche.be arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 676ad8e997036e2f815c293b76c356fb7cc97a08 Author: Laurent Pinchart Date: Tue Jun 7 19:33:22 2022 +0300 drm: rcar-du: Lift z-pos restriction on primary plane for Gen3 There's no reason to require the primary plane to always be at the bottom of the stack, as the VSP supports arbitrary ordering of planes, and the KMS API doesn't have such a requirement either. Lift the restriction. As the primary plane can now be positioned arbitrarily, enable control of its alpha channel as well. Signed-off-by: Laurent Pinchart Tested-by: Tomohito Esaki drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit b7aaa61726cbc7b941007af14a9f991a828c67e4 Author: LUU HOAI Date: Tue Apr 26 09:41:57 2022 +0100 drm: rcar-du: Fix Alpha blending issue on Gen3 As per R-Car-Gen3_Common_OPC_Customer_Notifications_V30.1.pdf, unexpected image output(such as incorrect colors or planes being invisible) can happen on the below conditions, as PnALPHAR register is not initialized by reset. When alpha blending (PpMRm.PpSPIM=0b101) is performed and: •two Planes are enabled on any DUn (n=0,1,2,3) oDSPRn= 0x0000 0031 or 0x0000 0013 •or DU0 and DU1 is used for display at the same time oDSPR0= 0x0000 0001 and DSPR1= 0x0000 0003 oDSPR0= 0x0000 0003 and DSPR1= 0x0000 0001 •or DU2 and DU3(H3 Only) is used for display at the same time oDSPR2= 0x0000 0001 and DSPR3= 0x0000 0003 oDSPR2= 0x0000 0003 and DSPR3= 0x0000 0001 This patch set PnALPHAR register to 0 to avoid this issue. Signed-off-by: LUU HOAI Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_plane.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 3e7f74dcfb7233ba3f8b3879066fdd3e79f2f701 Author: Biju Das Date: Thu Apr 21 17:31:27 2022 +0100 drm: rcar-du: Add num_rpf to struct rcar_du_device_info Number of RPF's VSP is different on R-Car and RZ/G2L R-Car Gen3 -> 5 RPFs R-Car Gen2 -> 4 RPFs RZ/G2L -> 2 RPFs Add num_rpf to struct rcar_du_device_info to support later SoC without any code changes. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_drv.c | 17 +++++++++++++++++ drivers/gpu/drm/rcar-du/rcar_du_drv.h | 2 ++ drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 6 +----- 3 files changed, 20 insertions(+), 5 deletions(-) commit 11d27fb95aa48db66a70fd8e34c1ff02c98f4041 Author: Laurent Pinchart Date: Sun Apr 24 23:44:35 2022 +0300 drm: rcar-du: Drop file name from comment header blocks The comment blocks at the beginning of each file have a one-line summary description of the file that includes the file name. While the description is useful, the file name only creates opportunities for mistakes (as seen in rcar_du_vsp.c) without any added value. Drop it. Reported-by: Biju Das Suggested-by: Geert Uytterhoeven Reviewed-by: Geert Uytterhoeven Reviewed-by: Kieran Bingham Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_cmm.c | 2 +- drivers/gpu/drm/rcar-du/rcar_cmm.h | 2 +- drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 2 +- drivers/gpu/drm/rcar-du/rcar_du_crtc.h | 2 +- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 2 +- drivers/gpu/drm/rcar-du/rcar_du_drv.h | 2 +- drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 2 +- drivers/gpu/drm/rcar-du/rcar_du_encoder.h | 2 +- drivers/gpu/drm/rcar-du/rcar_du_group.c | 2 +- drivers/gpu/drm/rcar-du/rcar_du_group.h | 2 +- drivers/gpu/drm/rcar-du/rcar_du_kms.c | 2 +- drivers/gpu/drm/rcar-du/rcar_du_kms.h | 2 +- drivers/gpu/drm/rcar-du/rcar_du_plane.c | 2 +- drivers/gpu/drm/rcar-du/rcar_du_plane.h | 2 +- drivers/gpu/drm/rcar-du/rcar_du_regs.h | 2 +- drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 2 +- drivers/gpu/drm/rcar-du/rcar_du_vsp.h | 2 +- drivers/gpu/drm/rcar-du/rcar_du_writeback.c | 2 +- drivers/gpu/drm/rcar-du/rcar_du_writeback.h | 2 +- drivers/gpu/drm/rcar-du/rcar_lvds.c | 2 +- drivers/gpu/drm/rcar-du/rcar_lvds.h | 2 +- drivers/gpu/drm/rcar-du/rcar_lvds_regs.h | 2 +- drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c | 2 +- drivers/gpu/drm/rcar-du/rcar_mipi_dsi_regs.h | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) commit 5278027b3df1a157c7f7d8e3f7e3ba2884aaeee5 Author: Kieran Bingham Date: Sat Apr 9 19:57:06 2022 +0100 drm: rcar-du: Extend CMM HDSE documentation When the CMM is enabled, the HDSE offset is further adjusted to compensate for consumed pixels. Explain this further, with an extra comment at the point the offset is adjusted. Suggested-by: Laurent Pinchart Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8246913a2e30e7028bff23b35f16657441d10855 Author: Rob Clark Date: Sat Jun 25 15:54:36 2022 -0700 drm/msm: Switch to pfn mappings I'm not entirely sure why we were using VM_MIXEDMAP. These are never CoW mappings. Let's switch to be more consistent with what other drivers and the GEM shmem helpers do. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/491218/ Link: https://lore.kernel.org/r/20220625225454.81039-2-robdclark@gmail.com drivers/gpu/drm/msm/msm_gem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8b5de73595899858b377b41805f1d00ecbe18fcd Author: Rob Clark Date: Mon Jun 13 12:46:23 2022 -0700 drm/msm: Deprecate MSM_BO_UNCACHED harder Handle the demotion to MSM_BO_WC at the userspace ABI level, and fix the remaining internal MSM_BO_UNCACHED user. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/489339/ Link: https://lore.kernel.org/r/20220613194623.2588353-1-robdclark@gmail.com drivers/gpu/drm/msm/msm_drv.c | 13 +++++++++++++ drivers/gpu/drm/msm/msm_gem.c | 7 +++---- drivers/gpu/drm/msm/msm_gpu.c | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) commit 4b18299b33655fa9672b774b6df774dc03d6aee8 Author: Rob Clark Date: Mon Jun 13 11:20:30 2022 -0700 drm/msm/adreno: Defer enabling runpm until hw_init() To avoid preventing the display from coming up before the rootfs is mounted, without resorting to packing fw in the initrd, the GPU has this limbo state where the device is probed, but we aren't ready to start sending commands to it. This is particularly problematic for a6xx, since the GMU (which requires fw to be loaded) is the one that is controlling the power/clk/icc votes. So defer enabling runpm until we are ready to call gpu->hw_init(), as that is a point where we know we have all the needed fw and are ready to start sending commands to the coproc's. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/489337/ Link: https://lore.kernel.org/r/20220613182036.2567963-1-robdclark@gmail.com drivers/gpu/drm/msm/adreno/adreno_device.c | 6 ++++++ drivers/gpu/drm/msm/adreno/adreno_gpu.c | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) commit a414fe3a2129b490e1e9b8ad66f0364f4f961887 Author: Rob Clark Date: Mon Jun 13 13:50:32 2022 -0700 drm/msm/gem: Drop obj lock in msm_gem_free_object() The only reason we grabbed the lock was to satisfy a bunch of places that WARN_ON() if called without the lock held. But this angers lockdep which doesn't realize no one else can be holding the lock by the time we end up destroying the object (and sees what would otherwise be a locking inversion between reservation_ww_class_mutex and fs_reclaim). Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/14 Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/489364/ Link: https://lore.kernel.org/r/20220613205032.2652374-1-robdclark@gmail.com drivers/gpu/drm/msm/msm_gem.c | 8 -------- drivers/gpu/drm/msm/msm_gem.h | 14 +++++++++++++- 2 files changed, 13 insertions(+), 9 deletions(-) commit ff46c2c481f2a379c457f2a815afdd6819521cc0 Author: Dmitry Baryshkov Date: Sat Jun 18 02:24:34 2022 +0300 drm/msm/dp: remove dp_display_en/disable prototypes and data argument Remove unused dp_display_en/disable prototypes. While we are at it, remove extra 'data' argument that is unused. Signed-off-by: Dmitry Baryshkov Reviewed-by: Kuogee Hsieh Patchwork: https://patchwork.freedesktop.org/patch/490104/ Link: https://lore.kernel.org/r/20220617232434.1139950-3-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/dp/dp_display.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 786a4f668550f8576c28d167fd50f4ef84af8ba4 Author: Dmitry Baryshkov Date: Sat Jun 18 02:24:33 2022 +0300 drm/msm/dp: rename second dp_display_enable()'s argument To follow up recent changes, rename (and change type of) second dp_display_enable()'s argument from generic u32 data to bool force_link_train, which is later passed to dp_ctrl_on_stream(). Signed-off-by: Dmitry Baryshkov Reviewed-by: Kuogee Hsieh Patchwork: https://patchwork.freedesktop.org/patch/490102/ Link: https://lore.kernel.org/r/20220617232434.1139950-2-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/dp/dp_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bce1e40568cbe7bee1c1425f2269673fd1f3c28b Author: Dmitry Baryshkov Date: Sat Jun 18 02:24:32 2022 +0300 drm/msm/dp: remove unused stubs Refactoring DP code transformed several functions into empty stubs. Remove them. Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Reviewed-by: Kuogee Hsieh Patchwork: https://patchwork.freedesktop.org/patch/490100/ Link: https://lore.kernel.org/r/20220617232434.1139950-1-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/dp/dp_display.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) commit d7499634db4f43d3347ae58c5931ad1c795d4cbf Author: Geert Uytterhoeven Date: Wed Jul 6 15:18:48 2022 +0200 drm/msm/adreno: Do not propagate void return values With sparse ("make C=2"), lots of error: return expression in void function messages are seen. Fix this by removing the return statements to propagate void return values. Signed-off-by: Geert Uytterhoeven Reviewed-by: Guenter Roeck Patchwork: https://patchwork.freedesktop.org/patch/492529/ Link: https://lore.kernel.org/r/0083bc7e23753c19902580b902582ae499b44dbf.1657113388.git.geert@linux-m68k.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 2 +- drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 4 ++-- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 18514c3848cf86f3e2843c9cfc218c8471a1984e Author: Rob Clark Date: Wed Jun 29 14:19:16 2022 -0700 drm/msm/gpu: Add GEM debug label to devcore When trying to understand an iova fault devcore, once you figure out which buffer we accessed beyond the end of, it is useful to see the buffer's debug label. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/491910/ Link: https://lore.kernel.org/r/20220629211919.563585-3-robdclark@gmail.com drivers/gpu/drm/msm/adreno/adreno_gpu.c | 1 + drivers/gpu/drm/msm/msm_gpu.c | 4 ++++ drivers/gpu/drm/msm/msm_gpu.h | 1 + 3 files changed, 6 insertions(+) commit cc66a42c94b11b4a92068a730773283a28937571 Author: Rob Clark Date: Wed Jun 29 14:19:15 2022 -0700 drm/msm/gpu: Capture all BO addr+size in devcore It is useful to know what buffers userspace thinks are associated with the submit, even if we don't care to capture their content. This brings things more inline with $debugfs/rd cmdstream dumping. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/491908/ Link: https://lore.kernel.org/r/20220629211919.563585-2-robdclark@gmail.com drivers/gpu/drm/msm/msm_gpu.c | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) commit b571cb5273ad2feacc75ab2d951d950534aa589d Author: Dmitry Baryshkov Date: Thu Jun 16 11:11:06 2022 +0300 drm/msm: switch msm_kms_init_aspace() to use device_iommu_mapped() Change msm_kms_init_aspace() to use generic function device_iommu_mapped() instead of the fwnode-specific interface dev_iommu_fwspec_get(). While we are at it, stop referencing platform_bus_type directly and use the bus of the IOMMU device. Suggested-by: Robin Murphy Reviewed-by: Robin Murphy Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/489703/ Link: https://lore.kernel.org/r/20220616081106.350262-6-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 40ae54ed734a112c09fb80e2ee16a6bbb733aed4 Author: Dmitry Baryshkov Date: Thu Jun 16 11:11:05 2022 +0300 drm/msm: move KMS aspace init to the separate helper MDP5 and DPU drivers have the same piece of code now to initialize IOMMU and GEM address space. Move it to the msm_drv.c Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/489701/ Link: https://lore.kernel.org/r/20220616081106.350262-5-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 32 +++----------------------- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 33 +++++---------------------- drivers/gpu/drm/msm/msm_drv.c | 39 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/msm/msm_drv.h | 1 + 4 files changed, 49 insertions(+), 56 deletions(-) commit 8cb72adb1c6618c77fdf3e7c8acd8876d6d1b0b7 Author: Dmitry Baryshkov Date: Thu Jun 16 11:11:04 2022 +0300 drm/msm: Stop using iommu_present() Even if some IOMMU has registered itself on the platform "bus", that doesn't necessarily mean it provides translation for the device we care about. Replace iommu_present() with a more appropriate check. On Qualcomm platforms the IOMMU can be specified either for the MDP/DPU device or for its parent MDSS device depending on the actual platform. Check both of them, since that is how both DPU and MDP5 drivers work. Co-developed-by: Robin Murphy Signed-off-by: Robin Murphy Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/489699/ Link: https://lore.kernel.org/r/20220616081106.350262-4-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 69d7d257cd35c9d36c93019f87de6c9f8b514119 Author: Jakub Kicinski Date: Wed Jul 6 18:32:01 2022 -0700 Revert "Merge branch 'octeontx2-af-next'" This reverts commit 2ef8e39f58f08589ab035223c2687830c0eba30f, reversing changes made to e7ce9fc9ad38773b660ef663ae98df4f93cb6a37. There are build warnings here which break the normal build due to -Werror. Ratheesh was nice enough to quickly follow up with fixes but didn't hit all the warnings I see on GCC 12 so to unlock net-next from taking patches let get this series out for now. Link: https://lore.kernel.org/r/20220707013201.1372433-1-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/Makefile | 2 +- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 41 +- drivers/net/ethernet/marvell/octeontx2/af/npc.h | 25 - .../ethernet/marvell/octeontx2/af/npc_profile.h | 5 +- drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 16 - drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 24 +- .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 39 +- .../ethernet/marvell/octeontx2/af/rvu_debugfs.c | 179 -- .../ethernet/marvell/octeontx2/af/rvu_devlink.c | 71 +- .../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 7 - .../net/ethernet/marvell/octeontx2/af/rvu_npc.c | 51 +- .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 162 +- .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.h | 17 - .../ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 1958 -------------------- .../ethernet/marvell/octeontx2/af/rvu_npc_hash.h | 233 --- .../net/ethernet/marvell/octeontx2/af/rvu_reg.h | 15 - .../ethernet/marvell/octeontx2/nic/otx2_common.h | 10 +- .../ethernet/marvell/octeontx2/nic/otx2_dmac_flt.c | 46 +- .../ethernet/marvell/octeontx2/nic/otx2_flows.c | 40 +- .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +- 20 files changed, 67 insertions(+), 2876 deletions(-) commit f16afe238a7ff3c71a943cf74392538974c29b22 Author: Kishon Vijay Abraham I Date: Thu Jun 2 17:36:13 2022 +0530 soc: ti: pruss: Enable support for PRUSS-M subsystem on K3 AM62x SoCs The K3 AM62x family of SoC has one PRUSS-M instance and it has two Programmable Real-Time Units (PRU0 and PRU1). This does not support Industrial Communications Subsystem features like Ethernet. The existing pruss platform driver has been updated to support this through a new AM62x specific compatible. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20220602120613.2175-4-kishon@ti.com drivers/soc/ti/pruss.c | 1 + 1 file changed, 1 insertion(+) commit 75938bab63a4bf5c654360aebfb96235de10d882 Author: Kishon Vijay Abraham I Date: Thu Jun 2 17:36:12 2022 +0530 dt-bindings: soc: ti: pruss: Update bindings for K3 AM62x SoCs Update the PRUSS bindings for the PRUSSM instance present in AM625 SoC. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Nishanth Menon Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220602120613.2175-3-kishon@ti.com Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml | 1 + 1 file changed, 1 insertion(+) commit b8c8d647f2fe4e263864b800f4647431ec0aabdf Author: Kishon Vijay Abraham I Date: Thu Jun 2 17:36:11 2022 +0530 dt-bindings: soc: ti: pruss: Re-arrange "compatible" in alphabetic order Re-arrange "compatible" string in alphabetic order to decrease the chance of conflicts. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Nishanth Menon Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220602120613.2175-2-kishon@ti.com Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8af893654c027fb679f67851aedb569ce7acb1e4 Author: Jayesh Choudhary Date: Fri Jun 24 10:09:05 2022 +0530 arm64: dts: ti: k3-am62-main: Enable crypto accelerator Add the node for sa3ul crypto accelerator. Signed-off-by: Jayesh Choudhary Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20220624043905.129207-1-j-choudhary@ti.com arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit dd45ab9dd28c82fc495d98cd9788666fd8d76b99 Author: Al Viro Date: Fri Jun 17 16:07:49 2022 -0400 first_iovec_segment(): just return address ... and calculate the offset in the caller Reviewed-by: Jeff Layton Signed-off-by: Al Viro lib/iov_iter.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit e2788887b33f00c4fabbfa251c8efb6bec1fba2e Author: Guillaume La Roque Date: Tue May 17 14:28:28 2022 +0200 arm64: dts: ti: k3-am625-sk: Enable ramoops Enable ramoops features to easily debug some issues. Signed-off-by: Guillaume La Roque Signed-off-by: Kevin Hilman Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20220517122828.2985179-1-glaroque@baylibre.com arch/arm64/boot/dts/ti/k3-am625-sk.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit c553bf25f0f4135e17cf064a6875d5cbc43b0956 Author: Aswath Govindraju Date: Mon May 16 17:04:17 2022 +0530 arm64: dts: ti: k3-am642-sk: Add pinmux corresponding to main_uart0 Add pinmux details required for the zeroth instance of main UART. Signed-off-by: Aswath Govindraju Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20220516113417.3516-1-a-govindraju@ti.com arch/arm64/boot/dts/ti/k3-am642-sk.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 671007281de93c721c1ea2d4af603d211b0a7e1f Author: David Gow Date: Wed Jul 6 18:06:07 2022 +0800 apparmor: test: Remove some casts which are no-longer required With some of the stricter type checking in KUnit's EXPECT macros removed, several casts in policy_unpack_test are no longer required. Remove the unnecessary casts, making the conditions clearer. Reviewed-by: Brendan Higgins Acked-by: John Johansen Signed-off-by: David Gow Signed-off-by: Shuah Khan security/apparmor/policy_unpack_test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c4bcc1b99b8b8acdfe673e4701a9c2acb6b8b2fb Author: Andy Shevchenko Date: Wed Jul 6 16:29:11 2022 -0700 Input: goodix - switch use of acpi_gpio_get_*_resource() APIs No need to open code functionality that is provided by the acpi_gpio_get_irq_resource() and acpi_gpio_get_io_resource(). Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20220705180252.963-1-andriy.shevchenko@linux.intel.com Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/goodix.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 6bac30bb8ff8195cbcfc177b3b6b0732929170c1 Author: Fabio M. De Francesco Date: Tue Jul 5 16:22:02 2022 +0200 zonefs: Call page_address() on page acquired with GFP_KERNEL flag zonefs_read_super() acquires a page with alloc_page(GFP_KERNEL). That page cannot come from ZONE_HIGHMEM, thus there's no need to map it with kmap(). Therefore, use a plain page_address() on that page. Suggested-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Reviewed-by: Ira Weiny Reviewed-by: Johannes Thumshirn Signed-off-by: Damien Le Moal fs/zonefs/super.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit b94a1a207de5e06a55b5a8259073fd8d1637f093 Author: Alan Previn Date: Mon Jun 6 17:23:14 2022 -0700 drm/i915/guc: Asynchronous flush of GuC log regions Both error-capture and relay-logging mechanism use the GuC log infrastructure. That means the KMD must send a log flush complete notification back to GuC after reading the data out. This call is currently being sent synchronously. However, synchronous H2Gs cause problems when the system is backed up. There is no need for this to be synchronous. The KMD wasn't even looking at the return status from it. So make it asynchronous and then there is no issue about time outs. Signed-off-by: Alan Previn Reviewed-by: John Harrison Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20220607002314.1451656-2-alan.previn.teres.alexis@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 3 ++- drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 59dbd7d0904a887ede1538b55bb8095ff2ce5078 Author: Al Viro Date: Tue Jun 21 16:10:37 2022 -0400 iov_iter: massage calling conventions for first_{iovec,bvec}_segment() Pass maxsize by reference, return length via the same. Signed-off-by: Al Viro lib/iov_iter.c | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) commit dda8e5d17c170415a3c10f68365f3a2800a6e68f Author: Al Viro Date: Tue Jun 21 15:55:19 2022 -0400 iov_iter: first_{iovec,bvec}_segment() - simplify a bit We return length + offset in page via *size. Don't bother - the caller can do that arithmetics just as well; just report the length to it. Signed-off-by: Al Viro lib/iov_iter.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 864cfdeb76735909a9afcc314416ccaa1ce82a1a Author: Dmitry Baryshkov Date: Wed Jul 6 17:54:12 2022 +0300 ARM: dts: qcom: msm8974: rename GPU's OPP table node Rename the GPU's opp table node to make it follow the display/msm/gpu.yaml schema. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220706145412.1566011-6-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8e51f13c31c585caf6a9497627ecad14e78211b Author: Dmitry Baryshkov Date: Wed Jul 6 17:54:11 2022 +0300 ARM: dts: qcom: apq8064: disable DSI and DSI PHY by default Disable DSI and DSI PHY devices by default. The only actual user, Nexus 7, already contains `status = "okay"` property in the respective devices nodes. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220706145412.1566011-5-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 9c10bb43db82bc9289af50c39cc940aff79b7aed Author: Dmitry Baryshkov Date: Wed Jul 6 17:54:10 2022 +0300 ARM: dts: qcom: apq8064: rename DSI PHY iface clock Follow the usual scheme and use name 'iface' rather than 'iface_clk' for the interface clock. The DSI PHY driver can cope with both of them, so there is no breakage. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220706145412.1566011-4-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76f11e77f919397f31198354cd0e0bd8e76f8748 Author: Krzysztof Kozlowski Date: Mon Jul 4 14:17:29 2022 +0200 arm64: defconfig: enable Qualcomm Bandwidth Monitor Enable the Qualcomm Bandwidth Monitor to allow scaling interconnects depending on bandwidth usage between CPU and memory. This is used already on Qualcomm SDM845 SoC. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220704121730.127925-4-krzysztof.kozlowski@linaro.org arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit b9c2ae6cac403dee3195fda9eb28d8ee733b225b Author: Krzysztof Kozlowski Date: Mon Jul 4 14:17:28 2022 +0200 soc: qcom: icc-bwmon: Add bandwidth monitoring driver Bandwidth monitoring (BWMON) sits between various subsytems like CPU, GPU, Last Level caches and memory subsystem. The BWMON can be configured to monitor the data throuhput between memory and other subsytems. The throughput is measured within specified sampling window and is used to vote for corresponding interconnect bandwidth. Current implementation brings support for BWMON v4, used for example on SDM845 to measure bandwidth between CPU (gladiator_noc) and Last Level Cache (memnoc). Usage of this BWMON allows to remove fixed bandwidth votes from cpufreq (CPU nodes) thus achieve high memory throughput even with lower CPU frequencies. The driver was tested on SDM845. Co-developed-by: Thara Gopinath Signed-off-by: Thara Gopinath Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220704121730.127925-3-krzysztof.kozlowski@linaro.org MAINTAINERS | 7 + drivers/soc/qcom/Kconfig | 15 ++ drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/icc-bwmon.c | 421 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 444 insertions(+) commit a7ee53e19b6234834acc8f27f8ddb64ef73eebdb Author: Krzysztof Kozlowski Date: Mon Jul 4 14:17:27 2022 +0200 dt-bindings: interconnect: qcom,msm8998-cpu-bwmon: add BWMON device Add bindings for the Qualcomm Bandwidth Monitor device providing performance data on interconnects. The bindings describe only BWMON CPU (version 4), e.g. the instance which appeared for the first on Qualcomm MSM8998 SoC and is also used on SDM845. This BWMON device sits between CPU and Last Level Cache Controller. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Acked-by: Georgi Djakov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220704121730.127925-2-krzysztof.kozlowski@linaro.org .../bindings/interconnect/qcom,msm8998-bwmon.yaml | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) commit 363c1b04cfce5615f2dc1b7f19e4456937ed2068 Author: David Heidelberg Date: Sun Jun 26 20:32:45 2022 +0200 ARM: dts: qcom: extend scm compatible to match dt-schema First device specific compatible, then general one. Reviewed-by: Krzysztof Kozlowski Signed-off-by: David Heidelberg Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220626183247.142776-1-david@ixit.cz arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +- arch/arm/boot/dts/qcom-apq8084.dtsi | 2 +- arch/arm/boot/dts/qcom-ipq4019.dtsi | 2 +- arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 599a0bdd72f0a7ed5f55faef0ecdcd36cb1bc287 Author: Al Viro Date: Fri Jun 10 20:53:17 2022 -0400 iov_iter: lift dealing with maxpages out of first_{iovec,bvec}_segment() caller can do that just as easily Signed-off-by: Al Viro lib/iov_iter.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 72e76dc2f93b5b8f6e5421e44fe251ace89ffe9f Merge: ec21041bb35f 3d34cae102b0 Author: Arnd Bergmann Date: Wed Jul 6 22:34:02 2022 +0200 Merge tag 'dt-cleanup-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Cleanup of ARM DTS for v5.20, part two Series of cleanups for ARM DTS - white-spaces, gpio-key subnode names and gpio-key properties for more boards: TI, Marvell, AT91 and Aspeed. * tag 'dt-cleanup-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: aspeed: correct gpio-keys properties ARM: dts: aspeed: align gpio-key node names with dtschema ARM: dts: at91: drop unneeded status from gpio-keys ARM: dts: at91: correct gpio-keys properties ARM: dts: at91: align gpio-key node names with dtschema ARM: dts: omap: correct gpio-keys properties ARM: dts: omap: align gpio-key node names with dtschema ARM: dts: marvell: correct gpio-keys properties ARM: dts: marvell: align gpio-key node names with dtschema ARM: dts: omap: adjust whitespace around '=' ARM: dts: ti: adjust whitespace around '=' Link: https://lore.kernel.org/r/20220706163754.33064-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 2b4e75a7a7c8d3531a40ebb103b92f88ff693f79 Author: Dmitry Baryshkov Date: Mon Jun 20 10:19:33 2022 +0300 dt-bindings: clock: qcom,gcc-msm8996: add more GCC clock sources Add additional GCC clock sources. This includes PCIe and USB PIPE and UFS symbol clocks. Fixes: 2a8aa18c1131 ("dt-bindings: clk: qcom: Fix self-validation, split, and clean cruft") Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220620071936.1558906-2-dmitry.baryshkov@linaro.org .../devicetree/bindings/clock/qcom,gcc-msm8996.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit ec21041bb35fa32b4fb9748211db34305afb3cd5 Merge: 6a65fc3614d1 2b090180dced Author: Arnd Bergmann Date: Wed Jul 6 22:32:51 2022 +0200 Merge tag 'dt64-cleanup-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Cleanup of ARM64 DTS for v5.20, part two Remaining cleanups for ARM64 DTS: gpio-keys and led node names on Marvel platforms. * tag 'dt64-cleanup-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: marvell: armada-3720: align lednode names with dtschema arm64: dts: marvell: align gpio-key node names with dtschema Link: https://lore.kernel.org/r/20220706163754.33064-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit e5de51e264e147d4bf882a464fb89501e9c87e14 Author: Marijn Suijten Date: Sun May 8 12:03:35 2022 +0200 arm64: dts: qcom: sm6125: Add DLL/DDR configuration on SDHCI 1/2 These config values have been extracted from CodeLinaro's most recent trinket/sm6125 tag: https://git.codelinaro.org/clo/la/kernel/msm-4.14/-/blob/LA.UM.9.11.r1-05600-NICOBAR.QSSI12.0/arch/arm64/boot/dts/qcom/trinket.dtsi Signed-off-by: Marijn Suijten Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220508100336.127176-3-marijn.suijten@somainline.org arch/arm64/boot/dts/qcom/sm6125.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit cbfb5668aece448877fa7826cde81c9d06f4a4ac Author: Marijn Suijten Date: Sun May 8 12:03:34 2022 +0200 arm64: dts: qcom: sm6125: Append -state suffix to pinctrl nodes According to qcom,sm6125-pinctrl.yaml all nodes inside the tlmm must be suffixed by -state: qcom/sm6125-sony-xperia-seine-pdx201.dtb: pinctrl@500000: 'sdc2-off', 'sdc2-on' do not match any of the regexes: '-state$', 'pinctrl-[0-9]+' The label names have been updated to match, going from sdc2_state_X to sdc2_X_state. Fixes: cff4bbaf2a2d ("arm64: dts: qcom: Add support for SM6125") Fixes: 82e1783890b7 ("arm64: dts: qcom: sm6125: Add support for Sony Xperia 10II") Signed-off-by: Marijn Suijten Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220508100336.127176-2-marijn.suijten@somainline.org arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts | 4 ++-- arch/arm64/boot/dts/qcom/sm6125.dtsi | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 6990640a93ba4e76dd62ca3ea1082a7354db09d7 Author: Marijn Suijten Date: Sun May 8 12:03:33 2022 +0200 arm64: dts: qcom: sm6125: Move sdc2 pinctrl from seine-pdx201 to sm6125 Both the sdc2-on and sdc2-off pinctrl nodes are used by the sdhci@4784000 node in sm6125.dtsi. Surprisingly sdc2-off is defined in sm6125, yet its sdc2-on counterpart is only defined in board-specific DT for the Sony Seine PDX201 board/device resulting in an "undefined label &sdc2_state_on" error if sm6125.dtsi were included elsewhere. This sm6125 base dtsi should not rely on externally defined labels; the properties referencing it should then also be written externally. Since the sdc2-on pin configuration is board-independent just like sdc2-off, move it from seine-pdx201.dts into sm6125.dtsi. The SDCard-detect pin (gpio98) is however board-specific, and remains as an overwrite in seine-pdx201.dts for both the on and off state. As a drive-by cleanup, reorder bias- and drive-strength properties. Fixes: cff4bbaf2a2d ("arm64: dts: qcom: Add support for SM6125") Fixes: 82e1783890b7 ("arm64: dts: qcom: sm6125: Add support for Sony Xperia 10II") Signed-off-by: Marijn Suijten Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220508100336.127176-1-marijn.suijten@somainline.org .../dts/qcom/sm6125-sony-xperia-seine-pdx201.dts | 34 +++++----------------- arch/arm64/boot/dts/qcom/sm6125.dtsi | 24 +++++++++++++-- 2 files changed, 30 insertions(+), 28 deletions(-) commit 7392ed1734c319150b5ddec3f192a6405728e8d0 Author: Al Viro Date: Sat Jun 11 16:44:21 2022 -0400 iov_iter_get_pages{,_alloc}(): cap the maxsize with MAX_RW_COUNT All callers can and should handle iov_iter_get_pages() returning fewer pages than requested. All in-kernel ones do. And it makes the arithmetical overflow analysis much simpler... Reviewed-by: Jeff Layton Signed-off-by: Al Viro lib/iov_iter.c | 4 ++++ 1 file changed, 4 insertions(+) commit 18fa9af7263164ec9a8d7b28a848324825f14672 Author: Al Viro Date: Mon Jun 6 23:44:33 2022 -0400 iov_iter_bvec_advance(): don't bother with bvec_iter do what we do for iovec/kvec; that ends up generating better code, AFAICS. Reviewed-by: Jeff Layton Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Al Viro lib/iov_iter.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 1bc2b7bfba6e2f64edf5e246f3af2967261f6c3d Author: Shunsuke Mie Date: Wed Jun 22 13:09:24 2022 +0900 PCI: endpoint: Don't stop controller when unbinding endpoint function Unbinding an endpoint function from the endpoint controller shouldn't stop the controller. This is especially a problem for multi-function endpoints where other endpoints may still be active. Don't stop the controller when unbinding one of its endpoints. Normally the controller is stopped via configfs. Fixes: 349e7a85b25f ("PCI: endpoint: functions: Add an EP function to test PCI") Link: https://lore.kernel.org/r/20220622040924.113279-1-mie@igel.co.jp Signed-off-by: Shunsuke Mie Signed-off-by: Bjorn Helgaas Acked-by: Kishon Vijay Abraham I drivers/pci/endpoint/functions/pci-epf-test.c | 1 - 1 file changed, 1 deletion(-) commit d1a405d2228f686a3fecf0f0374b61ae81d441aa Author: Bjorn Andersson Date: Wed May 4 19:27:06 2022 -0700 arm64: dts: qcom: db820c: Add user LEDs The db820c has 4 "user LEDs", all connected to the PMI8994. The first three are connected to the three current sinks provided by the TRILED and the fourth is connected to MPP2. By utilizing the DTEST bus the MPP is fed the control signal from the fourth LPG block, providing a consistent interface to the user. Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Reviewed-by: Dylan Van Assche Link: https://lore.kernel.org/r/20220505022706.1692554-5-bjorn.andersson@linaro.org arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 56 +++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit f041bb3cd77fb68b59cbec8031bfe65eeff15823 Author: Bjorn Andersson Date: Wed May 4 19:27:05 2022 -0700 arm64: dts: qcom: pmi8994: Define MPP block The pmi8994 has 4 multi-purpose-pins, add these to the definition. Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Reviewed-by: Dylan Van Assche Link: https://lore.kernel.org/r/20220505022706.1692554-4-bjorn.andersson@linaro.org arch/arm64/boot/dts/qcom/pmi8994.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f23f1fa880bfbf47404aef9aaaff1dc7804d4df7 Author: Bjorn Andersson Date: Wed May 4 19:27:04 2022 -0700 arm64: dts: qcom: sdm845: Enable user LEDs on DB845c The DB845c has 4 "user LEDs", the last one is already supported as it's just wired to a gpio. Now that the LPG binding is in place we can wire up the other 3 LEDs as well. Signed-off-by: Bjorn Andersson Reviewed-by: Caleb Connolly Reviewed-by: Dylan Van Assche Link: https://lore.kernel.org/r/20220505022706.1692554-3-bjorn.andersson@linaro.org arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit e79a1385ab74451e2e61efd5e59de3c1d3b4cd05 Author: Bjorn Andersson Date: Wed May 4 19:27:03 2022 -0700 arm64: dts: qcom: Add LPG to pm8916, pm8994, pmi8994 and pmi8998 Add PWM/LPG nodes to the PMICs currently supported by the binding. Signed-off-by: Bjorn Andersson Reviewed-by: Caleb Connolly Reviewed-by: Dylan Van Assche Link: https://lore.kernel.org/r/20220505022706.1692554-2-bjorn.andersson@linaro.org arch/arm64/boot/dts/qcom/pm8916.dtsi | 8 ++++++++ arch/arm64/boot/dts/qcom/pm8994.dtsi | 10 ++++++++++ arch/arm64/boot/dts/qcom/pmi8994.dtsi | 10 ++++++++++ arch/arm64/boot/dts/qcom/pmi8998.dtsi | 11 ++++++++++- 4 files changed, 38 insertions(+), 1 deletion(-) commit d0e285c3d8d3b9c0a103760668f481a28aa16dd0 Author: Robert Foss Date: Wed Jul 6 17:28:30 2022 +0200 arm64: dts: qcom: sm8350: Replace integers with rpmpd defines Replace &rpmhpd power domain integers with their respective defines in order to improve legibility. Signed-off-by: Robert Foss Reviewed-by: Konrad Dybcio Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220706152830.2021197-1-robert.foss@linaro.org arch/arm64/boot/dts/qcom/sm8350.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 9fd4887cdec6395a4ff447af8988bce61b707fb0 Author: Robert Foss Date: Wed Jul 6 17:43:37 2022 +0200 arm64: dts: qcom: sm8350: Add DISPCC node Add the dispcc clock-controller DT node for sm8350. Signed-off-by: Robert Foss Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220706154337.2026269-6-robert.foss@linaro.org arch/arm64/boot/dts/qcom/sm8350.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 1352b152880b84b843f3ee1bc1d0a133c0e1dd10 Merge: e07e07dac950 909e5be2ca88 Author: Bjorn Andersson Date: Wed Jul 6 15:16:51 2022 -0500 Merge branch '20220706154337.2026269-1-robert.foss@linaro.org' into arm64-for-5.20 commit e07e07dac9502bc42b602d2d1f06f28c16ab602c Author: Vladimir Zapolskiy Date: Fri Jul 1 09:26:22 2022 +0300 arm64: dts: qcom: sm8450: Add description of camera clock controller The change adds description of Qualcomm SM8450 camera clock controller. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220701062622.2757831-3-vladimir.zapolskiy@linaro.org arch/arm64/boot/dts/qcom/sm8450.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 8273ea89940914b1e8cdf9018168ca3e7fdb635a Merge: f35aaef152d1 494e984af5b2 Author: Bjorn Andersson Date: Wed Jul 6 15:22:54 2022 -0500 Merge branch '20220701062622.2757831-2-vladimir.zapolskiy@linaro.org' into arm64-for-5.20 commit 205737fe3345a41a57fbdb3fbd8409421d43e482 Author: Jonathan Marek Date: Wed Jul 6 17:43:36 2022 +0200 clk: qcom: add support for SM8350 DISPCC Add support to the SM8350 display clock controller by extending the SM8250 display clock controller, which is almost identical but has some minor differences. Signed-off-by: Jonathan Marek Signed-off-by: Robert Foss Reviewed-by: Dmitry Baryshkov Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220706154337.2026269-5-robert.foss@linaro.org drivers/clk/qcom/Kconfig | 6 ++-- drivers/clk/qcom/dispcc-sm8250.c | 63 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 65 insertions(+), 4 deletions(-) commit 160758b05ab1679dae83c7facf312b60dd263308 Author: Robert Foss Date: Wed Jul 6 17:43:34 2022 +0200 clk: qcom: add support for SM8350 GPUCC The GPUCC manages the clocks for the Adreno GPU found on the sm8350 SoCs. Signed-off-by: Robert Foss Signed-off-by: Jonathan Marek Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220706154337.2026269-3-robert.foss@linaro.org drivers/clk/qcom/Kconfig | 8 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/gpucc-sm8350.c | 637 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 646 insertions(+) commit 7e06c69221d3513fadfbf31273ebad5a7100b83e Merge: 6082037fe62e 909e5be2ca88 Author: Bjorn Andersson Date: Wed Jul 6 15:16:12 2022 -0500 Merge branch '20220706154337.2026269-1-robert.foss@linaro.org' into clk-for-5.20 commit 6082037fe62eb17aa3029fd5524fe3b02223f48b Author: Vladimir Zapolskiy Date: Fri Jul 1 09:27:44 2022 +0300 clk: qcom: add camera clock controller driver for SM8450 SoC Add camera clock controller driver found on Qualcomm SM8450 SoC. Reviewed-by: Bjorn Andersson Signed-off-by: Vladimir Zapolskiy Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220701062744.2757931-1-vladimir.zapolskiy@linaro.org drivers/clk/qcom/Kconfig | 7 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/camcc-sm8450.c | 2856 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 2864 insertions(+) commit bbc780132d626fdacaee0dab3376250ccd3a1a22 Author: Vladimir Zapolskiy Date: Fri Jul 1 09:27:39 2022 +0300 clk: qcom: clk-alpha-pll: add Rivian EVO PLL configuration interfaces Add and export Rivian EVO PLL configuration and control functions to clock controller drivers, the PLL is used by SM8450 camera clock controller. Reviewed-by: Stephen Boyd Reviewed-by: Vinod Koul Signed-off-by: Vladimir Zapolskiy Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220701062739.2757912-1-vladimir.zapolskiy@linaro.org drivers/clk/qcom/clk-alpha-pll.c | 70 ++++++++++++++++++++++++++++++++++++++++ drivers/clk/qcom/clk-alpha-pll.h | 6 ++++ 2 files changed, 76 insertions(+) commit 260e36606a0391a300bbe412b339bb68fc7aa7d9 Author: Vladimir Zapolskiy Date: Fri Jul 1 09:27:29 2022 +0300 clk: qcom: clk-alpha-pll: add Lucid EVO PLL configuration interfaces Add controls for Lucid EVO PLL configuration and export control functions to clock controller drivers, the PLL is used by Qualcomm SM8450 camera and display clock controllers. Reviewed-by: Vinod Koul Signed-off-by: Vladimir Zapolskiy Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220701062729.2757893-1-vladimir.zapolskiy@linaro.org drivers/clk/qcom/clk-alpha-pll.c | 64 ++++++++++++++++++++++++++++++++++++++++ drivers/clk/qcom/clk-alpha-pll.h | 5 +++- 2 files changed, 68 insertions(+), 1 deletion(-) commit 74d40ace3f08ce4d81b4a7e5d4d87a7294f55d36 Author: Vladimir Zapolskiy Date: Fri Jul 1 09:27:20 2022 +0300 clk: qcom: clk-alpha-pll: limit exported symbols to GPL licensed code Unify all exported PLL clock configuration functions and data structures as GPL symbols. Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Reviewed-by: Vinod Koul Signed-off-by: Vladimir Zapolskiy Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220701062720.2757874-1-vladimir.zapolskiy@linaro.org drivers/clk/qcom/clk-alpha-pll.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 94bed9bb05c7850ff5d80b87cc29004901f37956 Author: Vladimir Zapolskiy Date: Fri Jul 1 09:27:11 2022 +0300 clk: qcom: clk-alpha-pll: fix clk_trion_pll_configure description After merging lucid and trion pll functions in commit 0b01489475c6 ("clk: qcom: clk-alpha-pll: same regs and ops for trion and lucid") the function clk_trion_pll_configure() is left with an old description header, which results in a W=2 compile time warning, fix it. Acked-by: Stephen Boyd Reviewed-by: Vinod Koul Signed-off-by: Vladimir Zapolskiy Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220701062711.2757855-1-vladimir.zapolskiy@linaro.org drivers/clk/qcom/clk-alpha-pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb162534b32bff2a8fadda4ceaf8b7fff7bdd658 Merge: 93b793d88da8 494e984af5b2 Author: Bjorn Andersson Date: Wed Jul 6 15:20:51 2022 -0500 Merge branch '20220701062622.2757831-2-vladimir.zapolskiy@linaro.org' into clk-for-5.20 commit 494e984af5b26dd286baaaad8a621fd7a7258c21 Author: Vladimir Zapolskiy Date: Fri Jul 1 09:26:21 2022 +0300 dt-bindings: clock: add QCOM SM8450 camera clock bindings The change adds device tree bindings for camera clock controller found on SM8450 SoC. Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Signed-off-by: Vladimir Zapolskiy Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220701062622.2757831-2-vladimir.zapolskiy@linaro.org .../bindings/clock/qcom,sm8450-camcc.yaml | 80 +++++++++++ include/dt-bindings/clock/qcom,sm8450-camcc.h | 159 +++++++++++++++++++++ 2 files changed, 239 insertions(+) commit 909e5be2ca882a0384018370f065ef1c611e6ed9 Author: Jonathan Marek Date: Wed Jul 6 17:43:35 2022 +0200 dt-bindings: clock: Add Qcom SM8350 DISPCC bindings Add sm8350 DISPCC bindings, which are simply a symlink to the sm8250 bindings. Update the documentation with the new compatible. Signed-off-by: Jonathan Marek Signed-off-by: Robert Foss Reviewed-by: Rob Herring Reviewed-by: Dmitry Baryshkov Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220706154337.2026269-4-robert.foss@linaro.org Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml | 6 ++++-- include/dt-bindings/clock/qcom,dispcc-sm8350.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) commit e67a004482c092e326b32f24d4542c85fb8f79bf Author: Robert Foss Date: Wed Jul 6 17:43:33 2022 +0200 dt-bindings: clock: Add Qcom SM8350 GPUCC bindings Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's SM8350 SoCs. Signed-off-by: Robert Foss Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220706154337.2026269-2-robert.foss@linaro.org .../bindings/clock/qcom,gpucc-sm8350.yaml | 72 ++++++++++++++++++++++ include/dt-bindings/clock/qcom,gpucc-sm8350.h | 52 ++++++++++++++++ 2 files changed, 124 insertions(+) commit 3915f8bddefda1c914d5c3149d329819a988761f Author: Randy Dunlap Date: Wed Jul 6 11:42:24 2022 -0700 drm: xlnx: add for readl/writel Add a header file to prevent build errors: ../drivers/gpu/drm/xlnx/zynqmp_dp.c: In function ‘zynqmp_dp_write’: ../drivers/gpu/drm/xlnx/zynqmp_dp.c:335:9: error: implicit declaration of function ‘writel’ [-Werror=implicit-function-declaration] 335 | writel(val, dp->iomem + offset); ../drivers/gpu/drm/xlnx/zynqmp_dp.c: In function ‘zynqmp_dp_read’: ../drivers/gpu/drm/xlnx/zynqmp_dp.c:340:16: error: implicit declaration of function ‘readl’ [-Werror=implicit-function-declaration] 340 | return readl(dp->iomem + offset); Fixes: a204f9743b68 ("drm: Remove linux/i2c.h from drm_crtc.h") Signed-off-by: Randy Dunlap Cc: Hyun Kwon Cc: Laurent Pinchart Cc: "Ville Syrjälä" Cc: David Airlie Cc: Daniel Vetter Cc: Michal Simek Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220706184224.29116-1-rdunlap@infradead.org drivers/gpu/drm/xlnx/zynqmp_dp.c | 1 + 1 file changed, 1 insertion(+) commit 41cae19e4ca424036bf4d57a5f9fb4258511546d Merge: acfc34f008c3 55861e36b663 Author: Mark Brown Date: Wed Jul 6 20:37:03 2022 +0100 spi: AMD SPI controller driver bug fix and cleanups Merge series from Cristian Ciocaltea : This patch series addresses an issue in the spi-amd driver and, while there, performs some additional cleanups, like simplifying the error handling in the probe function and removing an unused struct member. For improving code readability, it also adds some kernel-doc comments. commit 1dff012f636d4440f2f99256c09c5b6bfacf7552 Author: Bjorn Helgaas Date: Wed Jul 6 14:27:21 2022 -0500 PCI: Drop of_match_ptr() to avoid unused variables We have stubs for most OF interfaces even when CONFIG_OF is not set, so we allow building of most controller drivers in that case for compile testing. When CONFIG_OF is not set, "of_match_ptr()" compiles to NULL, which leaves unused, resulting in errors like this: $ make W=1 drivers/pci/controller/pci-xgene.c:636:34: error: ‘xgene_pcie_match_table’ defined but not used [-Werror=unused-const-variable=] Drop of_match_ptr() to avoid the unused variable warning. Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pci-keystone.c | 2 +- drivers/pci/controller/dwc/pcie-armada8k.c | 2 +- drivers/pci/controller/dwc/pcie-spear13xx.c | 2 +- drivers/pci/controller/pci-xgene.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 6577067d7f044923aa26129766d6b457030a251b Author: Bo Liu Date: Sun Jul 3 22:36:49 2022 -0400 vfio/pci: fix the wrong word This patch fixes a wrong word in comment. Signed-off-by: Bo Liu Link: https://lore.kernel.org/r/20220704023649.3913-1-liubo03@inspur.com Signed-off-by: Alex Williamson drivers/vfio/pci/vfio_pci_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d9c653cf635849d0c24a1ab17c2752a19f4ded8 Author: Ville Syrjälä Date: Thu Jun 30 18:06:00 2022 +0300 drm/i915: Nuke PCH_JSP JSP is based on ICP and we don't really need to differentiate between the two. So let's just delcare JSP to be ICP. The only slight change here is for Wa_14011294188 which we used to apply for JSP but now we'll only apply to MCC. This should be fine since the issue being dealt with was introduced in TGP and inherited into MCC. JSP being derived from ICP should not need this workaround. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220630150600.24611-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display_power.c | 2 +- drivers/gpu/drm/i915/intel_pch.c | 3 ++- drivers/gpu/drm/i915/intel_pch.h | 4 +--- 3 files changed, 4 insertions(+), 5 deletions(-) commit f24d1d45084155c59a135506a37bc4db10703fe6 Author: Ville Syrjälä Date: Thu Jun 30 18:05:59 2022 +0300 drm/i915: Nuke PCH_MCC MCC is derived from TGP, and we have no real need to differentiate between the two. Thus remove PCH_MCC and just declare it to be PCH_TGP compatible. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220630150600.24611-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_ddi.c | 2 +- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- drivers/gpu/drm/i915/intel_pch.c | 3 ++- drivers/gpu/drm/i915/intel_pch.h | 4 +--- 4 files changed, 5 insertions(+), 6 deletions(-) commit ca1dc50fd5cfd7420faa46183f84bc203fae156a Author: Ville Syrjälä Date: Thu Jun 30 18:05:58 2022 +0300 drm/i915: Use short PCH names consistently The comments regarding PCH compatibility use long vs. short names inconsistently. Just use short names always. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220630150600.24611-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/intel_pch.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3bd8bc897161730042051cd5f9c6ed1e94cb5453 Author: Al Viro Date: Sun Jul 3 22:35:56 2022 -0400 step_into(): move fetching ->d_inode past handle_mounts() ... and lose messing with it in __follow_mount_rcu() Signed-off-by: Al Viro fs/namei.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) commit 4cb640248041dab1c718a6140d758dad5a84b8ec Author: Al Viro Date: Sun Jul 3 22:20:20 2022 -0400 lookup_fast(): don't bother with inode Note that validation of ->d_seq after ->d_inode fetch is gone, along with fetching of ->d_inode itself. Signed-off-by: Al Viro fs/namei.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit b16c001de0f66bc633aefe770a8b0a75c8c39a3b Author: Al Viro Date: Sun Jul 3 22:18:11 2022 -0400 follow_dotdot{,_rcu}(): don't bother with inode step_into() will fetch it, TYVM. Signed-off-by: Al Viro fs/namei.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit a4f5b52167a80edec74093fe6fef291a0318f4ba Author: Al Viro Date: Sun Jul 3 22:07:32 2022 -0400 step_into(): lose inode argument make handle_mounts() always fetch it. This is just the first step - the callers of step_into() will stop trying to calculate the sucker, etc. The passed value should be equal to dentry->d_inode in all cases; in RCU mode - fetched after we'd sampled ->d_seq. Might as well fetch it here. We do need to validate ->d_seq, which duplicates the check currently done in lookup_fast(); that duplication will go away shortly. After that change handle_mounts() always ignores the initial value of *inode and always sets it on success. Signed-off-by: Al Viro fs/namei.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 03fa86e9f79d8b9a6aa28965829a4a8646139a0a Author: Al Viro Date: Mon Jul 4 18:12:39 2022 -0400 namei: stash the sampled ->d_seq into nameidata New field: nd->next_seq. Set to 0 outside of RCU mode, holds the sampled value for the next dentry to be considered. Used instead of an arseload of local variables, arguments, etc. step_into() has lost seq argument; nd->next_seq is used, so dentry passed to it must be the one ->next_seq is about. There are two requirements for RCU pathwalk: 1) it should not give a hard failure (other than -ECHILD) unless non-RCU pathwalk might fail that way given suitable timings. 2) it should not succeed unless non-RCU pathwalk might succeed with the same end location given suitable timings. The use of seq numbers is the way we achieve that. Invariant we want to maintain is: if RCU pathwalk can reach the state with given nd->path, nd->inode and nd->seq after having traversed some part of pathname, it must be possible for non-RCU pathwalk to reach the same nd->path and nd->inode after having traversed the same part of pathname, and observe the nd->path.dentry->d_seq equal to what RCU pathwalk has in nd->seq For transition from parent to child, we sample child's ->d_seq and verify that parent's ->d_seq remains unchanged. Anything that disrupts parent-child relationship would've bumped ->d_seq on both. For transitions from child to parent we sample parent's ->d_seq and verify that child's ->d_seq has not changed. Same reasoning as for the previous case applies. For transition from mountpoint to root of mounted we sample the ->d_seq of root and verify that nobody has touched mount_lock since the beginning of pathwalk. That guarantees that mount we'd found had been there all along, with these mountpoint and root of the mounted. It would be possible for a non-RCU pathwalk to reach the previous state, find the same mount and observe its root at the moment we'd sampled ->d_seq of that For transitions from root of mounted to mountpoint we sample ->d_seq of mountpoint and verify that mount_lock had not been touched since the beginning of pathwalk. The same reasoning as in the previous case applies. Signed-off-by: Al Viro fs/namei.c | 98 ++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 48 insertions(+), 50 deletions(-) commit a4888b2005d1b226ba2ba2aa38ba302c4cdf80a6 Author: Kuogee Hsieh Date: Tue Jul 5 09:29:14 2022 -0700 phy: qcom-edp: add regulator_set_load to edp phy This patch add regulator_set_load() before enable regulator at eDP phy driver. Signed-off-by: Kuogee Hsieh Reviewed-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/1657038556-2231-2-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-edp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 3f4a70268d54c41117bc4e1bed0ba4be756735a8 Author: Srinivasa Rao Mandadapu Date: Fri Jul 1 12:47:07 2022 +0530 soundwire: qcom: Enable software clock gating requirement flag Enable software clock gating flag in private data for SC7280 based platforms, which are soundwire 1.6.0 version based. Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Srinivas Kandagatla [vkoul: fix patch subystem tag] Link: https://lore.kernel.org/r/1656659827-27450-3-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Vinod Koul drivers/soundwire/qcom.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit aa1262ca66957183ea1fb32a067e145b995f3744 Author: Srinivas Kandagatla Date: Wed Jul 6 10:56:44 2022 +0100 soundwire: qcom: Check device status before reading devid As per hardware datasheet its recommended that we check the device status before reading devid assigned by auto-enumeration. Without this patch we see SoundWire devices with invalid enumeration addresses on the bus. Cc: stable@vger.kernel.org Fixes: a6e6581942ca ("soundwire: qcom: add auto enumeration support") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220706095644.5852-1-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul drivers/soundwire/qcom.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6e180327153071281dbbf6a16759e49862debdca Author: Al Viro Date: Wed Jul 6 12:40:31 2022 -0400 namei: move clearing LOOKUP_RCU towards rcu_read_unlock() try_to_unlazy()/try_to_unlazy_next() drop LOOKUP_RCU in the very beginning and do rcu_read_unlock() only at the very end. However, nothing done in between even looks at the flag in question; might as well clear it at the same time we unlock. Note that try_to_unlazy_next() used to call legitimize_mnt(), which might drop/regain rcu_read_lock() in some cases. This is no longer true, so we really have rcu_read_lock() held all along until the end. Signed-off-by: Al Viro fs/namei.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 4348d99efa01fe030eb625495de8b9f3578b5c7d Author: Jiapeng Chong Date: Wed Jul 6 16:26:05 2022 +0800 dmaengine: altera-msgdma: Fixed some inconsistent function name descriptions Inconsistent function names describing msgdma_chan_remove() and msgdma_dma_remove are modified to msgdma_dev_remove() and msgdma_remove(). Remove some warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'. drivers/dma/altera-msgdma.c:927: warning: expecting prototype for msgdma_dma_remove(). Prototype was for msgdma_remove() instead. drivers/dma/altera-msgdma.c:758: warning: expecting prototype for msgdma_chan_remove(). Prototype was for msgdma_dev_remove() instead. Signed-off-by: Jiapeng Chong Reviewed-by: Stefan Roese Link: https://lore.kernel.org/r/20220706082605.114907-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Vinod Koul drivers/dma/altera-msgdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 01eafd4b23805890dfe8b3e639f1bf299a6dbcf5 Author: Shengjiu Wang Date: Wed Jul 6 13:45:09 2022 +0800 dmaengine: imx-sdma: Add missing struct documentation Fix compile warning that 'Function parameter or member not described' with 'W=1' option: Add missing description for struct sdma_desc There is not any description for struct sdma_script_start_addrs, so use /* instead of /** Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1657086309-7964-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Vinod Koul drivers/dma/imx-sdma.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3e27bf719303b1b19edd37bd04e9e586c73f6511 Author: Krzysztof Kozlowski Date: Wed Jul 6 18:02:57 2022 +0200 dt-bindings: soc: samsung: exynos-pmu: add reboot-mode ExynosAutov9 gained a reboot-mode node, so document the property to fix warning: exynosautov9-sadk.dtb: system-controller@10460000: 'reboot-mode' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220706160257.27579-3-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 61bebc2902901cc2f1cac496dc81be38ca74d7d4 Author: Krzysztof Kozlowski Date: Wed Jul 6 18:02:56 2022 +0200 dt-bindings: soc: samsung: exynos-pmu: use abolute ref paths Preferred coding for referencing other schemas is to use absolute path. Quotes over path are also not needed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220706160257.27579-2-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 38aed2e0aa406de6dda64515cc3937976a27038e Author: Krzysztof Kozlowski Date: Wed Jul 6 18:02:55 2022 +0200 dt-bindings: soc: samsung: exynos-pmu: cleanup assigned clocks "assigned-clocks" are not needed in the device schema as they come from core schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220706160257.27579-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml | 3 --- 1 file changed, 3 deletions(-) commit 681f872a2eb39bd4054e31b5fdc55e21a0bd7c1b Merge: 9a073d4fbb18 9e95c67efa8a Author: Florian Fainelli Date: Wed Jul 6 09:18:05 2022 -0700 Merge tag 'tags/ib-mfd-soc-bcm-v5.20' into drivers/next Immutable branch between MFD and SoC due for the v5.20 merge window Signed-off-by: Florian Fainelli commit 30e1f7bb96a918b6551ff5f97dd9f144aa04386d Author: Krzysztof Kozlowski Date: Tue Jul 5 18:13:40 2022 +0200 dt-bindings: samsung: document preferred compatible naming Compatibles can come in two formats. Either "vendor,ip-soc" or "vendor,soc-ip". Add a DT schema documenting preferred policy and enforcing it for all new compatibles, except few existing patterns. The schema also disallows wild-cards used in SoC compatibles. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220705161340.493474-1-krzysztof.kozlowski@linaro.org .../bindings/arm/samsung/samsung-soc.yaml | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 8010b14e6219c0060716c885a89658060a388544 Author: Dmitry Baryshkov Date: Thu Jun 16 11:11:03 2022 +0300 drm/msm/mdp5: move iommu_domain_alloc() call close to its usage Move iommu_domain_alloc() in front of adress space/IOMMU initialization. This allows us to drop final bits of struct mdp5_cfg_platform which remained from the pre-DT days. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/489695/ Link: https://lore.kernel.org/r/20220616081106.350262-3-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c | 16 ---------------- drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.h | 6 ------ drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 6 ++++-- 3 files changed, 4 insertions(+), 24 deletions(-) commit a07ea70a57e258289acc1bc41360c384cc53ec22 Author: Dmitry Baryshkov Date: Thu Jun 16 11:11:02 2022 +0300 drm/msm/dpu: check both DPU and MDSS devices for the IOMMU Follow the lead of MDP5 driver and check both DPU and MDSS devices for the IOMMU specifiers. Historically DPU devices had IOMMU specified in the MDSS device tree node, but as some of MDP5 devices are being converted to the supported by the DPU driver, the driver should adapt and check both devices. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/489696/ Link: https://lore.kernel.org/r/20220616081106.350262-2-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 604a9d272dc3802d880e0510b9d145b1090b3f8a Author: Li kunyu Date: Mon Jul 4 18:31:13 2022 +0800 fs/ntfs3: Remove unnecessary 'NULL' values from pointers There is no need to initialize with NULL as it'll be rewritten later. Signed-off-by: Li kunyu Signed-off-by: Konstantin Komarov fs/ntfs3/index.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ba0386a9c4827725e0fa677112941268f7b45e23 Author: Rob Clark Date: Wed Jun 15 09:35:28 2022 -0700 drm/msm: Fix %d vs %u In debugging fence rollover, I noticed that GPU state capture and devcore dumps were showing me negative fence numbers. Let's fix that and some related signed vs unsigned confusion. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/489621/ Link: https://lore.kernel.org/r/20220615163532.3013035-1-robdclark@gmail.com drivers/gpu/drm/msm/adreno/adreno_gpu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4a42c5b5dd938f9775ab7897105ea6089a92c894 Author: Dmitry Baryshkov Date: Wed Jun 1 19:13:49 2022 +0300 drm/msm/dpu: move struct dpu_hw_blk definition to dpu_hw_utils.h There is little point in having a separate header just for a single opaque struct definition. Drop it now and move the struct to the dpu_hw_util.h header. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/488016/ Link: https://lore.kernel.org/r/20220601161349.1517667-5-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 1 - .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.h | 25 ---------------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h | 2 -- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h | 7 ++++++ 12 files changed, 7 insertions(+), 36 deletions(-) commit 9403f9a42c881d59396a454347540108d787685f Author: Dmitry Baryshkov Date: Wed Jun 1 19:13:48 2022 +0300 drm/msm/dpu: merge base_off with blk_off in struct dpu_hw_blk_reg_map There is little point in keeping a separate MDP address and block offset in this struct. Merge them to form a new blk_addr field used for all register access. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/488017/ Link: https://lore.kernel.org/r/20220601161349.1517667-4-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 3 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 3 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c | 3 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 3 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 3 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | 3 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c | 3 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c | 5 ++--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 3 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 3 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c | 6 +++--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h | 7 +++---- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c | 3 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c | 3 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +- 15 files changed, 20 insertions(+), 33 deletions(-) commit 1e5df24b996c1c46b60e396302120927b42c7f14 Author: Dmitry Baryshkov Date: Wed Jun 1 19:13:47 2022 +0300 drm/msm/dpu: drop length from struct dpu_hw_blk_reg_map We (nearly) do not use the length field from struct dpu_hw_blk_reg_map, so we can drop it safely. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/488013/ Link: https://lore.kernel.org/r/20220601161349.1517667-3-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h | 2 -- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +- 13 files changed, 1 insertion(+), 14 deletions(-) commit d352d6d5241be2d9bf86da4ba71b6e58d34235a4 Author: Dmitry Baryshkov Date: Wed Jun 1 19:13:46 2022 +0300 drm/msm/dpu: drop xin_id from struct dpu_hw_blk_reg_map Drop the unused field xin_id. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/488011/ Link: https://lore.kernel.org/r/20220601161349.1517667-2-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h | 2 -- 1 file changed, 2 deletions(-) commit 36bbfdb8bcb62752966211de1c0b9ee5fd972305 Author: Rob Clark Date: Sun May 29 11:04:23 2022 -0700 drm/msm/adreno: Allow larger address space size The restriction to 4G was strictly to work around 64b math bug in some versions of SQE firmware. This appears to be fixed in a650+ SQE fw, so allow a larger address space size on these devices. Also, add a modparam override for debugging and igt. v2: Send the right version of the patch (ie. the one that actually compiles) Signed-off-by: Rob Clark Reviewed-by: Chia-I Wu Patchwork: https://patchwork.freedesktop.org/patch/487601/ Link: https://lore.kernel.org/r/20220529180428.2577832-1-robdclark@gmail.com drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 3 ++- drivers/gpu/drm/msm/adreno/adreno_device.c | 3 +++ drivers/gpu/drm/msm/adreno/adreno_gpu.c | 17 +++++++++++++++++ drivers/gpu/drm/msm/adreno/adreno_gpu.h | 2 ++ 4 files changed, 24 insertions(+), 1 deletion(-) commit 9bec4399af223edba58ccb66c406b10878ef45b3 Author: Konrad Dybcio Date: Sat May 28 18:03:51 2022 +0200 drm/msm/adreno: Fix up formatting Leading spaces are not something checkpatch likes, and it says so when they are present. Use tabs consistently to indent function body and unwrap a 83-char-long line, as 100 is cool nowadays. Signed-off-by: Konrad Dybcio Reviewed-by: Akhil P Oommen Patchwork: https://patchwork.freedesktop.org/patch/487592/ Link: https://lore.kernel.org/r/20220528160353.157870-4-konrad.dybcio@somainline.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_gpu.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit fba6767c2dabcfaed0a8abf77fde0a8cb1b9fe10 Author: Konrad Dybcio Date: Sat May 28 18:03:50 2022 +0200 drm/msm/a6xx: Add speedbin support for A619 GPU There are various SKUs of A619, ranging from 565 MHz to 850 MHz, depending on the bin. Add support for distinguishing them, so that proper frequency ranges can be applied, depending on the HW. Signed-off-by: Konrad Dybcio Reviewed-by: Akhil P Oommen Patchwork: https://patchwork.freedesktop.org/patch/487590/ Link: https://lore.kernel.org/r/20220528160353.157870-3-konrad.dybcio@somainline.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit b7616b5c69e62e76cf5364915321377344ce1f8e Author: Konrad Dybcio Date: Sat May 28 18:03:49 2022 +0200 drm/msm/adreno: Add A619 support Add support for the Adreno 619 GPU, as found in Snapdragon 690 (SM6350), 480 (SM4350) and 750G (SM7225). Signed-off-by: Konrad Dybcio Reviewed-by: Akhil P Oommen Patchwork: https://patchwork.freedesktop.org/patch/487588/ Link: https://lore.kernel.org/r/20220528160353.157870-2-konrad.dybcio@somainline.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 13 +++++- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 70 +++++++++++++++++++++++++++++- drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 65 ++++++++++++++++++++++++++- drivers/gpu/drm/msm/adreno/adreno_device.c | 14 ++++++ drivers/gpu/drm/msm/adreno/adreno_gpu.h | 13 +++++- 5 files changed, 169 insertions(+), 6 deletions(-) commit 0165e9c119c92fae4366c92ea459edde0224bfa7 Author: Konrad Dybcio Date: Sat May 28 18:03:48 2022 +0200 drm/msm/adreno: Remove dead code This BUG_ON will never be reached, and there is a comment 20 above explaining why. Signed-off-by: Konrad Dybcio Reviewed-by: Akhil P Oommen Patchwork: https://patchwork.freedesktop.org/patch/487586/ Link: https://lore.kernel.org/r/20220528160353.157870-1-konrad.dybcio@somainline.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 2 -- 1 file changed, 2 deletions(-) commit 6694482a70e9536efbf2ac233cbf0c302d6e2dae Author: Douglas Anderson Date: Fri Jun 10 12:47:31 2022 -0700 drm/msm: Avoid unclocked GMU register access in 6xx gpu_busy From testing on sc7180-trogdor devices, reading the GMU registers needs the GMU clocks to be enabled. Those clocks get turned on in a6xx_gmu_resume(). Confusingly enough, that function is called as a result of the runtime_pm of the GPU "struct device", not the GMU "struct device". Unfortunately the current a6xx_gpu_busy() grabs a reference to the GMU's "struct device". The fact that we were grabbing the wrong reference was easily seen to cause crashes that happen if we change the GPU's pm_runtime usage to not use autosuspend. It's also believed to cause some long tail GPU crashes even with autosuspend. We could look at changing it so that we do pm_runtime_get_if_in_use() on the GPU's "struct device", but then we run into a different problem. pm_runtime_get_if_in_use() will return 0 for the GPU's "struct device" the whole time when we're in the "autosuspend delay". That is, when we drop the last reference to the GPU but we're waiting a period before actually suspending then we'll think the GPU is off. One reason that's bad is that if the GPU didn't actually turn off then the cycle counter doesn't lose state and that throws off all of our calculations. Let's change the code to keep track of the suspend state of devfreq. msm_devfreq_suspend() is always called before we actually suspend the GPU and msm_devfreq_resume() after we resume it. This means we can use the suspended state to know if we're powered or not. NOTE: one might wonder when exactly our status function is called when devfreq is supposed to be disabled. The stack crawl I captured was: msm_devfreq_get_dev_status devfreq_simple_ondemand_func devfreq_update_target qos_notifier_call qos_max_notifier_call blocking_notifier_call_chain pm_qos_update_target freq_qos_apply apply_constraint __dev_pm_qos_update_request dev_pm_qos_update_request msm_devfreq_idle_work Fixes: eadf79286a4b ("drm/msm: Check for powered down HW in the devfreq callbacks") Signed-off-by: Douglas Anderson Reviewed-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/489124/ Link: https://lore.kernel.org/r/20220610124639.v4.1.Ie846c5352bc307ee4248d7cab998ab3016b85d06@changeid Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 8 ------- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 13 ++++++------ drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 12 +++-------- drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 3 ++- drivers/gpu/drm/msm/msm_gpu.h | 11 +++++++++- drivers/gpu/drm/msm/msm_gpu_devfreq.c | 39 ++++++++++++++++++++++++++++------- 6 files changed, 53 insertions(+), 33 deletions(-) commit 774daad3c0d800f84f3abd725bd66f9ff04b42c6 Author: James Clark Date: Wed May 11 15:46:01 2022 +0100 Documentation: coresight: Expand branch broadcast documentation Now that there is a way of enabling branch broadcast via perf, mention the possible use cases and known limitations. Signed-off-by: James Clark Reviewed-by: Mike Leach Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20220511144601.2257870-5-james.clark@arm.com Documentation/trace/coresight/coresight-etm4x-reference.rst | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 32ee00d86e90c9bc9fa453deadbbfe87a921ea70 Author: James Clark Date: Wed May 11 15:46:00 2022 +0100 Documentation: coresight: Link config options to existing documentation In order to document the newly added branch_broadcast option, create a table that links all of the config option formats to any existing docs. That way when the branch broadcast docs are expanded they are accessible from both places. Signed-off-by: James Clark Reviewed-by: Mike Leach Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20220511144601.2257870-4-james.clark@arm.com .../trace/coresight/coresight-etm4x-reference.rst | 4 +++ Documentation/trace/coresight/coresight.rst | 39 ++++++++++++++++++++++ 2 files changed, 43 insertions(+) commit bcc5834fba668f30a4e6d4d8c531af808c692f59 Author: James Clark Date: Wed May 11 15:45:59 2022 +0100 Documentation: coresight: Turn numbered subsections into real subsections This is to allow them to be referenced in a later commit. There was also a mistake where sysFS was introduced as section 2, but numbered as section 1. And vice versa for 'Using perf framework'. This can't happen with unnumbered sections. Signed-off-by: James Clark Reviewed-by: Mike Leach Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20220511144601.2257870-3-james.clark@arm.com Documentation/trace/coresight/coresight.rst | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 2d693ed436a67db06d1473c22d4caee899a4e9d2 Author: James Clark Date: Wed May 11 15:45:58 2022 +0100 coresight: Add config flag to enable branch broadcast When enabled, all taken branch addresses are output, even if the branch was because of a direct branch instruction. This enables reconstruction of the program flow without having access to the memory image of the code being executed. Use bit 8 for the config option which would be the correct bit for programming ETMv3. Although branch broadcast can't be enabled on ETMv3 because it's not in the define ETM3X_SUPPORTED_OPTIONS, using the correct bit might help prevent future collisions or allow it to be enabled if needed. Signed-off-by: James Clark Reviewed-by: Mike Leach Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20220511144601.2257870-2-james.clark@arm.com drivers/hwtracing/coresight/coresight-etm-perf.c | 2 ++ drivers/hwtracing/coresight/coresight-etm4x-core.c | 14 ++++++++++++++ include/linux/coresight-pmu.h | 2 ++ 3 files changed, 18 insertions(+) commit 128a16b9704bc844fd0374b12eea16b563a7738a Author: Krzysztof Kozlowski Date: Tue Jul 5 17:46:13 2022 +0200 dt-bindings: hwinfo: samsung,s5pv210-chipid: add S5PV210 ChipID Document already used S5PV210 ChipID block. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220705154613.453096-2-krzysztof.kozlowski@linaro.org .../bindings/hwinfo/samsung,s5pv210-chipid.yaml | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 560045a46a071417f1c80d9cf1fd40e274cef5e8 Author: Krzysztof Kozlowski Date: Tue Jul 5 17:46:12 2022 +0200 dt-bindings: hwinfo: group Chip ID-like devices Group devices like Chip ID or SoC information under "hwinfo" directory. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220705154613.453096-1-krzysztof.kozlowski@linaro.org .../samsung/exynos-chipid.yaml => hwinfo/samsung,exynos-chipid.yaml} | 2 +- .../bindings/{soc/ti/k3-socinfo.yaml => hwinfo/ti,k3-socinfo.yaml} | 2 +- MAINTAINERS | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) commit d8b599bf625d1d818fdbb322a272fd2a5ea32e38 Author: Sam Ravnborg Date: Sun Jul 3 22:27:24 2022 +0200 drm/bridge: ti-sn65dsi86: Use atomic variants of drm_bridge_funcs Move away from the deprecated enable/disable operations in drm_bridge_funcs and enable atomic use. v3: - Drop use of DRM_BRIDGE_STATE_OPS v2: - fix build (kernel test robot ) Signed-off-by: Sam Ravnborg Cc: Kieran Bingham Cc: Douglas Anderson Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220703202724.9553-2-sam@ravnborg.org drivers/gpu/drm/bridge/ti-sn65dsi86.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit d86c1568910e7079e6ceb875d653e44293409194 Author: Guillaume Ranquet Date: Tue Jul 5 18:25:30 2022 +0800 drm/mediatek: dpi: Add dp_intf support Dpintf is the displayport interface hardware unit. This unit is similar to dpi and can reuse most of the code. This patch adds support for mt8195-dpintf to this dpi driver. Main differences are: - 4 pixels for one iteration for dp_intf while dpi is 1 pixel for one iteration. - Input of dp_intf is two pixels per iteration. - Some register contents differ slightly between the two components. Signed-off-by: Markus Schneider-Pargmann Signed-off-by: Guillaume Ranquet Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220705102530.1344-6-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 32 +++++++++++++++++++++++++++++ drivers/gpu/drm/mediatek/mtk_dpi_regs.h | 11 ++++++++++ drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 4 ++++ drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 1 + drivers/gpu/drm/mediatek/mtk_drm_drv.c | 3 +++ 5 files changed, 51 insertions(+) commit 7c8121af1bfe29feedfa4fcb3154886660ecbe3a Author: Andrii Nakryiko Date: Tue Jul 5 15:48:18 2022 -0700 libbpf: Remove unnecessary usdt_rel_ip assignments Coverity detected that usdt_rel_ip is unconditionally overwritten anyways, so there is no need to unnecessarily initialize it with unused value. Clean this up. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20220705224818.4026623-4-andrii@kernel.org tools/lib/bpf/usdt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c46a12200114ae5ad7b0922e6c8969a22c3afbd7 Author: Andrii Nakryiko Date: Tue Jul 5 15:48:17 2022 -0700 selftests/bpf: Fix few more compiler warnings When compiling with -O2, GCC detects few problems with selftests/bpf, so fix all of them. Two are real issues (uninitialized err and nums out-of-bounds access), but two other uninitialized variables warnings are due to GCC not being able to prove that variables are indeed initialized under conditions under which they are used. Fix all 4 cases, though. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20220705224818.4026623-3-andrii@kernel.org tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c | 4 ++-- tools/testing/selftests/bpf/prog_tests/usdt.c | 2 +- tools/testing/selftests/bpf/prog_tests/xdp_synproxy.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 645d5d3bc001a7d77459cb8360c36a60954d6008 Author: Andrii Nakryiko Date: Tue Jul 5 15:48:16 2022 -0700 selftests/bpf: Fix bogus uninitialized variable warning When compiling selftests/bpf in optimized mode (-O2), GCC erroneously complains about uninitialized token variable: In file included from network_helpers.c:22: network_helpers.c: In function ‘open_netns’: test_progs.h:355:22: error: ‘token’ may be used uninitialized [-Werror=maybe-uninitialized] 355 | int ___err = libbpf_get_error(___res); \ | ^~~~~~~~~~~~~~~~~~~~~~~~ network_helpers.c:440:14: note: in expansion of macro ‘ASSERT_OK_PTR’ 440 | if (!ASSERT_OK_PTR(token, "malloc token")) | ^~~~~~~~~~~~~ In file included from /data/users/andriin/linux/tools/testing/selftests/bpf/tools/include/bpf/libbpf.h:21, from bpf_util.h:9, from network_helpers.c:20: /data/users/andriin/linux/tools/testing/selftests/bpf/tools/include/bpf/libbpf_legacy.h:113:17: note: by argument 1 of type ‘const void *’ to ‘libbpf_get_error’ declared here 113 | LIBBPF_API long libbpf_get_error(const void *ptr); | ^~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make: *** [Makefile:522: /data/users/andriin/linux/tools/testing/selftests/bpf/network_helpers.o] Error 1 This is completely bogus becuase libbpf_get_error() doesn't dereference pointer, but the only easy way to silence this is to allocate initialized memory with calloc(). Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20220705224818.4026623-2-andrii@kernel.org tools/testing/selftests/bpf/network_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49ecbb78dda86f5551fb176bba9a31ec419c6365 Author: Bo-Chen Chen Date: Tue Jul 5 18:25:29 2022 +0800 drm/mediatek: dpi: Add pixels_per_iter config support The quantity of output for one iteration could be different for dpi and dp_intf. For dp_intf, it's 4 pixels for one iteration it's 1 pixel for one iteration for dpi. Therefore, we add a new config "pixels_per_iter" to control quantity of transferred pixels per iteration. Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220705102530.1344-5-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) commit 2587d8951b2f0e20a5e4a1f79b33f0b0932fb917 Author: Bo-Chen Chen Date: Tue Jul 5 18:25:28 2022 +0800 drm/mediatek: dpi: Add input_2pixel config support The input pixel per iteration could be different, so we add a new config "input_2pixel" to control this. Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220705102530.1344-4-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 7 +++++++ drivers/gpu/drm/mediatek/mtk_dpi_regs.h | 1 + 2 files changed, 8 insertions(+) commit c83da6233d05715a1e5841aa0b874faaa8150074 Author: Bo-Chen Chen Date: Tue Jul 5 18:25:27 2022 +0800 drm/mediatek: dpi: Add config to support direct connection to dpi panels MediaTek dpi supports direct connection to dpi panels while dp_intf does not support. Therefore, add a config "support_direct_pin" to control this. Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220705102530.1344-3-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit b992131aac655ac451d4078d83c5a3b4a28ea802 Author: Bo-Chen Chen Date: Tue Jul 5 18:25:26 2022 +0800 drm/mediatek: dpi: Add YUV422 output support Dp_intf supports YUV422 as output format. In MT8195 Chrome project, YUV422 output format is used for 4K resolution. To support this, it is also needed to support color format transfer. Color format transfer is a new feature for both dpi and dpintf of MT8195. The input format could be RGB888 and output format for dp_intf should be YUV422. Therefore, we add a mtk_dpi_matrix_sel() helper to update the DPI_MATRIX_SET register depending on the color format. Signed-off-by: Guillaume Ranquet Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220705102530.1344-2-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 31 ++++++++++++++++++++++++------- drivers/gpu/drm/mediatek/mtk_dpi_regs.h | 6 ++++++ 2 files changed, 30 insertions(+), 7 deletions(-) commit 55861e36b663f6e584d1b0659c1c5cec0ce26a5d Author: Cristian Ciocaltea Date: Wed Jul 6 13:06:26 2022 +0300 spi: amd: Add struct and enum kernel-doc comments Provide documentation comments in the kernel-doc format for enum amd_spi_versions and struct amd_spi. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20220706100626.1234731-6-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown drivers/spi/spi-amd.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 1e71ffee97ac02b83b6ff75b52fa7b21b9149f7d Author: Cristian Ciocaltea Date: Wed Jul 6 13:06:25 2022 +0300 spi: amd: Drop io_base_addr member from struct amd_spi The io_base_addr member of struct amd_spi is not referenced anywhere in the driver implementation and there is no indication that it could be used in the future, hence drop it. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20220706100626.1234731-5-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown drivers/spi/spi-amd.c | 1 - 1 file changed, 1 deletion(-) commit deef4da8be2f7e94a0807e56f856d3e20addce4d Author: Cristian Ciocaltea Date: Wed Jul 6 13:06:24 2022 +0300 spi: amd: Make use of dev_err_probe() Simplify the error handling in probe function by switching from dev_err() to dev_err_probe(). Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20220706100626.1234731-4-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown drivers/spi/spi-amd.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 2e063bb1d4272e7b64ef813566691ea8ea192f9c Author: Cristian Ciocaltea Date: Wed Jul 6 13:06:23 2022 +0300 spi: amd: Make use of devm_spi_alloc_master() Make use of the devm variant of spi_alloc_master() in order to cleanup and simplify the error handling in the probe function by getting rid of the goto statements. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20220706100626.1234731-3-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown drivers/spi/spi-amd.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit e57297fc0915e2f95de26d18ad8ab6f17c068658 Author: Uwe Kleine-König Date: Tue Jul 5 08:36:13 2022 +0200 ASoC: rsnd: Emit useful error messages in .remove() If more than one call of rsnd_dai_call(remove, ...) fails the platform remove callback returns all values orred together which then makes the driver core emit a generic error message which is little helpful. Instead emit details of which call failed exactly and return 0. Note returning 0 instead of an error code doesn't make a difference in the driver core apart from the error message. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220705063613.93770-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 24fff66f1f26d618d3b16c36603c10175e3d660f Author: Jarkko Nikula Date: Thu Jun 30 10:41:54 2022 +0300 i2c: i801: Add support for Intel Meteor Lake-P Add SMBus PCI ID on Intel Meteor Lake-P. Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang Documentation/i2c/busses/i2c-i801.rst | 1 + drivers/i2c/busses/Kconfig | 1 + drivers/i2c/busses/i2c-i801.c | 3 +++ 3 files changed, 5 insertions(+) commit faa60f188cc3fc9d2900196b0ae96c4781225036 Author: Linus Walleij Date: Sat Jul 2 00:53:03 2022 +0200 dt-bindings: i2c: nomadik: Add power domain to binding The power domain is used in the example and in the device trees for this IP block. Add it. Reported-by: Rob Herring Signed-off-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml | 3 +++ 1 file changed, 3 insertions(+) commit d4ae0222f6bb749cd5badb89e20d25e7da15b1b7 Author: Linus Walleij Date: Sat Jul 2 00:41:36 2022 +0200 dt-bindings: i2c: nomadik: Drop unused voltage supply from example This drops the pointless v-i2c-supply from the Nomadik I2C example. This is a leftover from before the use of power domains when the power domain voltage was attached to a regulator. The unused property in the device trees will be removed in a separate patch. Reported-by: Rob Herring Signed-off-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml | 1 - 1 file changed, 1 deletion(-) commit 819da60d77c9f0ec9f069cb27952501562a2e17a Author: Liu Ying Date: Fri Jul 1 14:56:33 2022 +0800 drm/bridge: fsl-ldb: Enable split mode for LVDS dual link When LVDS dual link is used, we have to enable the LDB_CTRL_SPLIT_MODE bit. Fixes: 463db5c2ed4a ("drm: bridge: ldb: Implement simple Freescale i.MX8MP LDB bridge") Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: David Airlie Cc: Daniel Vetter Cc: Sam Ravnborg Cc: Marek Vasut Cc: NXP Linux Team Signed-off-by: Liu Ying Reviewed-by: Marek Vasut Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220701065634.4027537-3-victor.liu@nxp.com Link: https://patchwork.freedesktop.org/patch/msgid/20220701065634.4027537-4-victor.liu@nxp.com drivers/gpu/drm/bridge/fsl-ldb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90f5514bcc1a40de3391da552984717fb83b16f8 Author: Liu Ying Date: Fri Jul 1 14:56:32 2022 +0800 drm/bridge: fsl-ldb: Fix mode clock rate validation With LVDS dual link, up to 160MHz mode clock rate is supported. With LVDS single link, up to 80MHz mode clock rate is supported. Fix mode clock rate validation by swapping the maximum mode clock rates of the two link modes. Fixes: 463db5c2ed4a ("drm: bridge: ldb: Implement simple Freescale i.MX8MP LDB bridge") Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: David Airlie Cc: Daniel Vetter Cc: Sam Ravnborg Cc: Marek Vasut Cc: NXP Linux Team Signed-off-by: Liu Ying Reviewed-by: Marek Vasut Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220701065634.4027537-2-victor.liu@nxp.com drivers/gpu/drm/bridge/fsl-ldb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47a4fb46797016228198e63a7aa679841f80889c Author: Marek Vasut Date: Thu Jun 30 19:40:31 2022 +0200 drm: bridge: ldb: Drop DE flip from Freescale i.MX8MP LDB bridge The DE inversion is implemented in LCDIFv3 driver and is no longer needed in the LDB bridge which does not invert the DE signal. Drop the inversion. Fixes: 463db5c2ed4ae ("drm: bridge: ldb: Implement simple Freescale i.MX8MP LDB bridge") Signed-off-by: Marek Vasut Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Peng Fan Cc: Robby Cai Cc: Robert Foss Cc: Sam Ravnborg Cc: Thomas Zimmermann To: dri-devel@lists.freedesktop.org Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220630174031.92354-1-marex@denx.de drivers/gpu/drm/bridge/fsl-ldb.c | 17 ----------------- 1 file changed, 17 deletions(-) commit a57e7345cac12ccdf883f9825523470850166635 Author: Hsin-Yi Wang Date: Wed Jul 6 20:52:54 2022 +0800 drm/bridge: anx7625: Add wait_hpd_asserted() callback Move hpd polling check into wait_hpd_asserted() callback. For the cases that aux transfer function wasn't used, do hpd polling check after pm runtime resume, which will power on the bridge. Signed-off-by: Hsin-Yi Wang Reviewed-by: Xin Ji Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220706125254.2474095-5-hsinyi@chromium.org drivers/gpu/drm/bridge/analogix/anx7625.c | 33 +++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) commit dfb02eb6bdf84697dbadd69a7df12db612ce4ed0 Author: Hsin-Yi Wang Date: Wed Jul 6 20:52:53 2022 +0800 drm/bridge: anx7625: Fix NULL pointer crash when using edp-panel Move devm_of_dp_aux_populate_ep_devices() after pm runtime and i2c setup to avoid NULL pointer crash. edp-panel probe (generic_edp_panel_probe) calls pm_runtime_get_sync() to read EDID. At this time, bridge should have pm runtime enabled and i2c clients ready. Fixes: adca62ec370c ("drm/bridge: anx7625: Support reading edid through aux channel") Signed-off-by: Hsin-Yi Wang Reviewed-by: Xin Ji Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220706125254.2474095-4-hsinyi@chromium.org drivers/gpu/drm/bridge/analogix/anx7625.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit aa1965973cc734bd61294b675ac9763cddcac0ed Author: Hsin-Yi Wang Date: Wed Jul 6 20:52:52 2022 +0800 drm/bridge: anx7625: use pm_runtime_force_suspend(resume) There's no need to check for IRQ or disable it in suspend. Use pm_runtime_force_suspend(resume) to make sure anx7625 is powered off correctly. Make the system suspend/resume and pm runtime suspend/resume more consistent. Signed-off-by: Hsin-Yi Wang Reviewed-by: Xin Ji Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220706125254.2474095-3-hsinyi@chromium.org drivers/gpu/drm/bridge/analogix/anx7625.c | 33 ++----------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) commit e660916b7f4dd3f17e5f28707213b66c1553d83b Author: Hsin-Yi Wang Date: Wed Jul 6 20:52:51 2022 +0800 drm/bridge: anx7625: Convert to devm_i2c_new_dummy_device() Simplify the resource management. Signed-off-by: Hsin-Yi Wang Reviewed-by: Xin Ji Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220706125254.2474095-2-hsinyi@chromium.org drivers/gpu/drm/bridge/analogix/anx7625.c | 96 +++++++++---------------------- 1 file changed, 27 insertions(+), 69 deletions(-) commit d86e716aa40643e3eb8c69fab3a198146bf76dd6 Author: Christoph Hellwig Date: Wed Jul 6 09:03:50 2022 +0200 block: move zone related fields to struct gendisk Move the zone related fields that are currently stored in struct request_queue to struct gendisk as these are part of the highlevel block layer API and are only used for non-passthrough I/O that requires the gendisk. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220706070350.1703384-17-hch@lst.de Signed-off-by: Jens Axboe block/blk-mq-debugfs-zoned.c | 6 +-- block/blk-sysfs.c | 2 +- block/blk-zoned.c | 45 ++++++++++----------- drivers/block/null_blk/zoned.c | 2 +- drivers/md/dm-zone.c | 74 ++++++++++++++++------------------ drivers/nvme/host/multipath.c | 2 +- drivers/nvme/target/zns.c | 4 +- drivers/scsi/sd_zbc.c | 2 +- include/linux/blk-mq.h | 8 ++-- include/linux/blkdev.h | 91 +++++++++++++++++++----------------------- 10 files changed, 111 insertions(+), 125 deletions(-) commit de71973c2951cb2ce4b46560f021f03b15906408 Author: Christoph Hellwig Date: Wed Jul 6 09:03:49 2022 +0200 block: remove blk_queue_zone_sectors Always use bdev_zone_sectors instead. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220706070350.1703384-16-hch@lst.de Signed-off-by: Jens Axboe drivers/md/dm-table.c | 4 +--- drivers/md/dm-zone.c | 10 ++++++---- include/linux/blkdev.h | 11 +++-------- 3 files changed, 10 insertions(+), 15 deletions(-) commit fabed68c272389db85655a2933737d602f4008fb Author: Christoph Hellwig Date: Wed Jul 6 09:03:48 2022 +0200 dm-zoned: cleanup dmz_fixup_devices Use the bdev based helpers where applicable and move the zoned_dev into the scope where it is actually used. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220706070350.1703384-15-hch@lst.de Signed-off-by: Jens Axboe drivers/md/dm-zoned-target.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit a239145ad18b59338a2b6c419c1a15a0e52d1315 Author: Christoph Hellwig Date: Wed Jul 6 09:03:47 2022 +0200 nvmet:: use bdev based helpers in nvmet_bdev_zone_mgmt_emulate_all Use the bdev based helpers instead of the queue based ones to clean up the code a bit and prepare for storing all zone related fields in struct gendisk. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20220706070350.1703384-14-hch@lst.de Signed-off-by: Jens Axboe drivers/nvme/target/zns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 375c140c199ebd2866f9c50a0b8853ffca3f1b68 Author: Christoph Hellwig Date: Wed Jul 6 09:03:46 2022 +0200 block: use bdev based helpers in blkdev_zone_mgmt{,all} Use the bdev based helpers instead of the queue based ones to clean up the code a bit and prepare for storing all zone related fields in struct gendisk. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220706070350.1703384-13-hch@lst.de Signed-off-by: Jens Axboe block/blk-zoned.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b623e347323f6464b20fb0d899a0a73522ed8f6c Author: Christoph Hellwig Date: Wed Jul 6 09:03:45 2022 +0200 block: replace blkdev_nr_zones with bdev_nr_zones Pass a block_device instead of a request_queue as that is what most callers have at hand. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Acked-by: Damien Le Moal Link: https://lore.kernel.org/r/20220706070350.1703384-12-hch@lst.de Signed-off-by: Jens Axboe block/blk-zoned.c | 15 ++++++++------- block/ioctl.c | 2 +- drivers/block/null_blk/zoned.c | 2 +- drivers/md/dm-zone.c | 2 +- drivers/md/dm-zoned-target.c | 5 ++--- drivers/nvme/target/zns.c | 6 +++--- fs/zonefs/super.c | 17 ++++++++--------- include/linux/blkdev.h | 4 ++-- 8 files changed, 26 insertions(+), 27 deletions(-) commit 982977df48179c8c690868f398051074e68eef0f Author: Christoph Hellwig Date: Wed Jul 6 09:03:44 2022 +0200 block: pass a gendisk to blk_queue_max_open_zones and blk_queue_max_active_zones Switch to a gendisk based API in preparation for moving all zone related fields from the request_queue to the gendisk. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220706070350.1703384-11-hch@lst.de Signed-off-by: Jens Axboe drivers/block/null_blk/zoned.c | 4 ++-- drivers/nvme/host/zns.c | 4 ++-- drivers/scsi/sd_zbc.c | 6 +++--- include/linux/blkdev.h | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) commit 1dc0172027b0aa09823b430e395b1116d2745f36 Author: Christoph Hellwig Date: Wed Jul 6 09:03:43 2022 +0200 block: remove queue_max_open_zones and queue_max_active_zones Always use the bdev based helpers instead. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220706070350.1703384-10-hch@lst.de Signed-off-by: Jens Axboe block/blk-sysfs.c | 4 ++-- include/linux/blkdev.h | 37 ++++++++++--------------------------- 2 files changed, 12 insertions(+), 29 deletions(-) commit 5d40066567a73a67ddb656ad118c6cfa1c4a6d71 Author: Christoph Hellwig Date: Wed Jul 6 09:03:42 2022 +0200 block: pass a gendisk to blk_queue_free_zone_bitmaps Switch to a gendisk based API in preparation for moving all zone related fields from the request_queue to the gendisk. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220706070350.1703384-9-hch@lst.de Signed-off-by: Jens Axboe block/blk-zoned.c | 8 +++++--- block/blk.h | 4 ++-- block/genhd.c | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) commit b3c72f8138b5f967a9fa527af84b35018897aba3 Author: Christoph Hellwig Date: Wed Jul 6 09:03:41 2022 +0200 block: pass a gendisk to blk_queue_clear_zone_settings Switch to a gendisk based API in preparation for moving all zone related fields from the request_queue to the gendisk. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220706070350.1703384-8-hch@lst.de Signed-off-by: Jens Axboe block/blk-settings.c | 2 +- block/blk-zoned.c | 4 +++- block/blk.h | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) commit 6b2bd274744e6454ba7bbbe6a09b44866f2f414a Author: Christoph Hellwig Date: Wed Jul 6 09:03:40 2022 +0200 block: pass a gendisk to blk_queue_set_zoned Prepare for storing the zone related field in struct gendisk instead of struct request_queue. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220706070350.1703384-7-hch@lst.de Signed-off-by: Jens Axboe block/blk-settings.c | 9 +++++---- block/partitions/core.c | 2 +- drivers/block/null_blk/zoned.c | 2 +- drivers/nvme/host/zns.c | 2 +- drivers/scsi/sd.c | 6 +++--- drivers/scsi/sd_zbc.c | 2 +- include/linux/blkdev.h | 2 +- 7 files changed, 13 insertions(+), 12 deletions(-) commit 052e545c9276f97e86368579fda32aa1ac017d51 Author: Christoph Hellwig Date: Wed Jul 6 09:03:39 2022 +0200 block: simplify blk_check_zone_append Use the bdev based helpers instead of open coding them. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220706070350.1703384-6-hch@lst.de Signed-off-by: Jens Axboe block/blk-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6deacb3bfac2b720e707c566549a7041f17db9c8 Author: Christoph Hellwig Date: Wed Jul 6 09:03:38 2022 +0200 block: simplify blk_mq_plug Drop the unused q argument, and invert the check to move the exception into a branch and the regular path as the normal return. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220706070350.1703384-5-hch@lst.de Signed-off-by: Jens Axboe block/blk-core.c | 2 +- block/blk-merge.c | 2 +- block/blk-mq.c | 2 +- block/blk-mq.h | 18 ++++++++---------- 4 files changed, 11 insertions(+), 13 deletions(-) commit edd1dbc83b1de3b98590b76e09b86ddf6887fce7 Author: Christoph Hellwig Date: Wed Jul 6 09:03:37 2022 +0200 block: use bdev_is_zoned instead of open coding it Use bdev_is_zoned in all places where a block_device is available instead of open coding it. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220706070350.1703384-4-hch@lst.de Signed-off-by: Jens Axboe block/bio.c | 2 +- block/blk-core.c | 6 +++--- block/blk-mq.h | 2 +- block/blk-zoned.c | 9 ++++----- drivers/md/dm-table.c | 2 +- drivers/md/dm-zone.c | 2 +- drivers/md/dm.c | 2 +- 7 files changed, 12 insertions(+), 13 deletions(-) commit 6cc37a672a1e21245b931722a016b3bd4ae10e2d Author: Christoph Hellwig Date: Wed Jul 6 09:03:36 2022 +0200 block: call blk_queue_free_zone_bitmaps from disk_release The zone bitmaps are only used for non-passthrough I/O, so free them as soon as the disk is released. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220706070350.1703384-3-hch@lst.de Signed-off-by: Jens Axboe block/blk-sysfs.c | 2 -- block/genhd.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) commit f1a8bbd1100d9cd117bc8b7fc0903982bbaf474f Author: Christoph Hellwig Date: Wed Jul 6 09:03:35 2022 +0200 block: remove a superflous ifdef in blkdev.h It doesn't hurt to always have the blk_zone_cond_str prototype, and the two inlines can also be defined unconditionally. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220706070350.1703384-2-hch@lst.de Signed-off-by: Jens Axboe include/linux/blkdev.h | 3 --- 1 file changed, 3 deletions(-) commit b2cc5c465c2cb8ab697c3fd6583c614e3f6cfbcc Author: Viacheslav Mitrofanov Date: Fri Jul 1 11:29:42 2022 +0300 dmaengine: sf-pdma: Add multithread support for a DMA channel When we get a DMA channel and try to use it in multiple threads it will cause oops and hanging the system. % echo 64 > /sys/module/dmatest/parameters/threads_per_chan % echo 10000 > /sys/module/dmatest/parameters/iterations % echo 1 > /sys/module/dmatest/parameters/run [ 89.480664] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000a0 [ 89.488725] Oops [#1] [ 89.494708] CPU: 2 PID: 1008 Comm: dma0chan0-copy0 Not tainted 5.17.0-rc5 [ 89.509385] epc : vchan_find_desc+0x32/0x46 [ 89.513553] ra : sf_pdma_tx_status+0xca/0xd6 This happens because of data race. Each thread rewrite channels's descriptor as soon as device_prep_dma_memcpy() is called. It leads to the situation when the driver thinks that it uses right descriptor that actually is freed or substituted for other one. With current fixes a descriptor changes its value only when it has been used. A new descriptor is acquired from vc->desc_issued queue that is already filled with descriptors that are ready to be sent. Threads have no direct access to DMA channel descriptor. Now it is just possible to queue a descriptor for further processing. Fixes: 6973886ad58e ("dmaengine: sf-pdma: add platform DMA support for HiFive Unleashed A00") Signed-off-by: Viacheslav Mitrofanov Link: https://lore.kernel.org/r/20220701082942.12835-1-v.v.mitrofanov@yadro.com Signed-off-by: Vinod Koul drivers/dma/sf-pdma/sf-pdma.c | 44 +++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) commit 4cf6e6c0106bf6e6d034fa6043b4428ac2f267fc Author: John Garry Date: Wed Jul 6 20:03:54 2022 +0800 blk-mq: Drop local variable for reserved tag The local variable is now only referenced once so drop it. Signed-off-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/1657109034-206040-7-git-send-email-john.garry@huawei.com Signed-off-by: Jens Axboe block/blk-mq-tag.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2dd6532e9591f201e7571b30915db807603ab924 Author: John Garry Date: Wed Jul 6 20:03:53 2022 +0800 blk-mq: Drop 'reserved' arg of busy_tag_iter_fn We no longer use the 'reserved' arg in busy_tag_iter_fn for any iter function so it may be dropped. Signed-off-by: John Garry Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Reviewed-by: Sagi Grimberg #nvme Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/1657109034-206040-6-git-send-email-john.garry@huawei.com Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 2 +- block/blk-mq-tag.c | 7 +++---- block/blk-mq.c | 10 ++++------ drivers/block/mtip32xx/mtip32xx.c | 4 ++-- drivers/block/nbd.c | 2 +- drivers/infiniband/ulp/srp/ib_srp.c | 3 +-- drivers/nvme/host/core.c | 2 +- drivers/nvme/host/fc.c | 3 +-- drivers/nvme/host/nvme.h | 2 +- drivers/scsi/aacraid/comminit.c | 2 +- drivers/scsi/aacraid/linit.c | 2 +- drivers/scsi/fnic/fnic_scsi.c | 12 ++++-------- drivers/scsi/hosts.c | 14 ++++++-------- drivers/scsi/mpi3mr/mpi3mr_os.c | 16 ++++------------ include/linux/blk-mq.h | 2 +- include/scsi/scsi_host.h | 2 +- 16 files changed, 33 insertions(+), 52 deletions(-) commit 1263c1929fb8c375494666ec6d1bac838ff02c25 Author: John Garry Date: Wed Jul 6 20:03:52 2022 +0800 scsi: fnic: Drop reserved request handling The SCSI core code does not support reserved requests, so drop the handling in fnic_pending_aborts_iter(). Signed-off-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/1657109034-206040-5-git-send-email-john.garry@huawei.com Signed-off-by: Jens Axboe drivers/scsi/fnic/fnic_scsi.c | 2 -- 1 file changed, 2 deletions(-) commit 9bdb4833dd399cbff82cc20893f52bdec66a9eca Author: John Garry Date: Wed Jul 6 20:03:51 2022 +0800 blk-mq: Drop blk_mq_ops.timeout 'reserved' arg With new API blk_mq_is_reserved_rq() we can tell if a request is from the reserved pool, so stop passing 'reserved' arg. There is actually only a single user of that arg for all the callback implementations, which can use blk_mq_is_reserved_rq() instead. This will also allow us to stop passing the same 'reserved' around the blk-mq iter functions next. Signed-off-by: John Garry Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Hannes Reinecke Acked-by: Ulf Hansson # For MMC Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/1657109034-206040-4-git-send-email-john.garry@huawei.com Signed-off-by: Jens Axboe block/blk-mq.c | 6 +++--- block/bsg-lib.c | 2 +- drivers/block/mtip32xx/mtip32xx.c | 5 ++--- drivers/block/nbd.c | 3 +-- drivers/block/null_blk/main.c | 2 +- drivers/mmc/core/queue.c | 3 +-- drivers/nvme/host/apple.c | 3 +-- drivers/nvme/host/fc.c | 3 +-- drivers/nvme/host/pci.c | 2 +- drivers/nvme/host/rdma.c | 3 +-- drivers/nvme/host/tcp.c | 3 +-- drivers/s390/block/dasd.c | 2 +- drivers/s390/block/dasd_int.h | 2 +- drivers/scsi/scsi_error.c | 3 +-- drivers/scsi/scsi_priv.h | 3 +-- include/linux/blk-mq.h | 2 +- 16 files changed, 19 insertions(+), 28 deletions(-) commit 99e48cd6855e9535488e3c90d65edd46c6e6fc1b Author: John Garry Date: Wed Jul 6 20:03:50 2022 +0800 blk-mq: Add a flag for reserved requests Add a flag for reserved requests so that drivers may know this for any special handling. Signed-off-by: John Garry Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/1657109034-206040-3-git-send-email-john.garry@huawei.com Signed-off-by: Jens Axboe block/blk-mq.c | 6 ++++++ include/linux/blk-mq.h | 6 ++++++ 2 files changed, 12 insertions(+) commit deef1be18e3fc62ddf04fb3e5e8ff6a301693dcc Author: John Garry Date: Wed Jul 6 20:03:49 2022 +0800 scsi: core: Remove reserved request time-out handling The SCSI core code does not currently support reserved commands. As such, requests which time-out would never be reserved, and scsi_timeout() 'reserved' arg should never be set. Remove handling for reserved requests, drop the wrapper scsi_timeout() as it now just calls scsi_times_out() always, and finally rename scsi_times_out() -> scsi_timeout() to match the blk_mq_ops method name. Signed-off-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/1657109034-206040-2-git-send-email-john.garry@huawei.com Signed-off-by: Jens Axboe Documentation/scsi/scsi_eh.rst | 3 +-- Documentation/scsi/scsi_mid_low_api.rst | 2 +- drivers/scsi/scsi_error.c | 7 ++++--- drivers/scsi/scsi_lib.c | 8 -------- drivers/scsi/scsi_priv.h | 3 ++- 5 files changed, 8 insertions(+), 15 deletions(-) commit 2fd26970cf66bd52dc42843c46968040caa8c9a1 Author: Imran Khan Date: Wed Jul 6 06:10:26 2022 +1000 Revert "kernfs: Change kernfs_notify_list to llist." This reverts commit b8f35fa1188b84035c59d4842826c4e93a1b1c9f. This is causing regression due to same kernfs_node getting added multiple times in kernfs_notify_list so revert it until safe way of using llist in this context is found. Reported-by: Nathan Chancellor Reported-by: Michael Walle Reported-by: Marek Szyprowski Signed-off-by: Imran Khan Cc: Tejun Heo Link: https://lore.kernel.org/r/20220705201026.2487665-1-imran.f.khan@oracle.com Signed-off-by: Greg Kroah-Hartman fs/kernfs/file.c | 47 +++++++++++++++++++++++++++-------------------- include/linux/kernfs.h | 2 +- 2 files changed, 28 insertions(+), 21 deletions(-) commit cd355d0bc60df51266d228c0f69570cdcfa1e6ba Merge: 4874fb9484be 98f9fcdee35a Author: David S. Miller Date: Wed Jul 6 13:09:28 2022 +0100 Merge branch 'hinic-dev_get_stats-fixes' Qiao Ma says: ==================== net: hinic: fix bugs about dev_get_stats These patches fixes 2 bugs of hinic driver: - fix bug that ethtool get wrong stats because of hinic_{txq|rxq}_clean_stats() is called - avoid kernel hung in hinic_get_stats64() See every patch for more information. Changes in v4: - removed meaningless u64_stats_sync protection in hinic_{txq|rxq}_get_stats - merged the third patch in v2 into first one Changes in v3: - fixes a compile warning reported by kernel test robot Changes in v2: - fixes another 2 bugs. (v1 is a single patch, see: https://lore.kernel.org/all/07736c2b7019b6883076a06129e06e8f7c5f7154.1656487154.git.mqaio@linux.alibaba.com/). - to fix extra bugs, hinic_dev.tx_stats/rx_stats is removed, so there is no need to use spinlock or semaphore now. ==================== Signed-off-by: David S. Miller commit 98f9fcdee35add80505b6c73f72de5f750d5c03c Author: Qiao Ma Date: Tue Jul 5 19:22:23 2022 +0800 net: hinic: avoid kernel hung in hinic_get_stats64() When using hinic device as a bond slave device, and reading device stats of master bond device, the kernel may hung. The kernel panic calltrace as follows: Kernel panic - not syncing: softlockup: hung tasks Call trace: native_queued_spin_lock_slowpath+0x1ec/0x31c dev_get_stats+0x60/0xcc dev_seq_printf_stats+0x40/0x120 dev_seq_show+0x1c/0x40 seq_read_iter+0x3c8/0x4dc seq_read+0xe0/0x130 proc_reg_read+0xa8/0xe0 vfs_read+0xb0/0x1d4 ksys_read+0x70/0xfc __arm64_sys_read+0x20/0x30 el0_svc_common+0x88/0x234 do_el0_svc+0x2c/0x90 el0_svc+0x1c/0x30 el0_sync_handler+0xa8/0xb0 el0_sync+0x148/0x180 And the calltrace of task that actually caused kernel hungs as follows: __switch_to+124 __schedule+548 schedule+72 schedule_timeout+348 __down_common+188 __down+24 down+104 hinic_get_stats64+44 [hinic] dev_get_stats+92 bond_get_stats+172 [bonding] dev_get_stats+92 dev_seq_printf_stats+60 dev_seq_show+24 seq_read_iter+964 seq_read+220 proc_reg_read+164 vfs_read+172 ksys_read+108 __arm64_sys_read+28 el0_svc_common+132 do_el0_svc+40 el0_svc+24 el0_sync_handler+164 el0_sync+324 When getting device stats from bond, kernel will call bond_get_stats(). It first holds the spinlock bond->stats_lock, and then call hinic_get_stats64() to collect hinic device's stats. However, hinic_get_stats64() calls `down(&nic_dev->mgmt_lock)` to protect its critical section, which may schedule current task out. And if system is under high pressure, the task cannot be woken up immediately, which eventually triggers kernel hung panic. Since previous patch has replaced hinic_dev.tx_stats/rx_stats with local variable in hinic_get_stats64(), there is nothing need to be protected by lock, so just removing down()/up() is ok. Fixes: edd384f682cc ("net-next/hinic: Add ethtool and stats") Signed-off-by: Qiao Ma Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_main.c | 4 ---- 1 file changed, 4 deletions(-) commit 67dffd3db98570af8ff54c934f7d14664c0d182a Author: Qiao Ma Date: Tue Jul 5 19:22:22 2022 +0800 net: hinic: fix bug that ethtool get wrong stats Function hinic_get_stats64() will do two operations: 1. reads stats from every hinic_rxq/txq and accumulates them 2. calls hinic_rxq/txq_clean_stats() to clean every rxq/txq's stats For hinic_get_stats64(), it could get right data, because it sums all data to nic_dev->rx_stats/tx_stats. But it is wrong for get_drv_queue_stats(), this function will read hinic_rxq's stats, which have been cleared to zero by hinic_get_stats64(). I have observed hinic's cleanup operation by using such command: > watch -n 1 "cat ethtool -S eth4 | tail -40" Result before: ... rxq7_pkts: 1 rxq7_bytes: 90 rxq7_errors: 0 rxq7_csum_errors: 0 rxq7_other_errors: 0 ... rxq9_pkts: 11 rxq9_bytes: 726 rxq9_errors: 0 rxq9_csum_errors: 0 rxq9_other_errors: 0 ... rxq11_pkts: 0 rxq11_bytes: 0 rxq11_errors: 0 rxq11_csum_errors: 0 rxq11_other_errors: 0 Result after a few seconds: ... rxq7_pkts: 0 rxq7_bytes: 0 rxq7_errors: 0 rxq7_csum_errors: 0 rxq7_other_errors: 0 ... rxq9_pkts: 2 rxq9_bytes: 132 rxq9_errors: 0 rxq9_csum_errors: 0 rxq9_other_errors: 0 ... rxq11_pkts: 1 rxq11_bytes: 170 rxq11_errors: 0 rxq11_csum_errors: 0 rxq11_other_errors: 0 To solve this problem, we just keep every queue's total stats in their own queue (aka hinic_{rxq|txq}), and simply sum all per-queue stats every time calling hinic_get_stats64(). With that solution, there is no need to clean per-queue stats now, and there is no need to maintain global hinic_dev.{tx|rx}_stats, too. Fixes: edd384f682cc ("net-next/hinic: Add ethtool and stats") Signed-off-by: Qiao Ma Reported-by: kernel test robot Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_dev.h | 3 -- drivers/net/ethernet/huawei/hinic/hinic_main.c | 57 ++++++++------------------ drivers/net/ethernet/huawei/hinic/hinic_rx.c | 2 - drivers/net/ethernet/huawei/hinic/hinic_tx.c | 2 - 4 files changed, 16 insertions(+), 48 deletions(-) commit 566a2d6d8e429727832c7e347cbe736b12ad7297 Author: Yang Yingliang Date: Tue Jun 28 16:49:03 2022 +0800 m68k: virt: Fix missing platform_device_unregister() on error in virt_platform_init() Add the missing platform_device_unregister() before return from virt_platform_init() in the error handling case. Fixes: 05d51e42df06 ("m68k: Introduce a virtual m68k machine") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Laurent Vivier Link: https://lore.kernel.org/r/20220628084903.3147123-1-yangyingliang@huawei.com Signed-off-by: Geert Uytterhoeven arch/m68k/virt/platform.c | 58 +++++++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 25 deletions(-) commit a1ee38ab1a75ee20e4aad232894db3ea45d3ce4f Author: Jason A. Donenfeld Date: Sun Jun 26 13:15:09 2022 +0200 m68k: virt: Use RNG seed from bootinfo block Other virt VMs can pass RNG seeds via the "rng-seed" device tree property or via UEFI, but m68k doesn't have either. Instead it has its own bootinfo protocol. So this commit adds support for receiving a RNG seed from it, which will be used at the earliest possible time in boot, just like device tree. Reviewed-by: Laurent Vivier Signed-off-by: Jason A. Donenfeld Link: https://lore.kernel.org/r/20220626111509.330159-1-Jason@zx2c4.com Signed-off-by: Geert Uytterhoeven arch/m68k/include/uapi/asm/bootinfo-virt.h | 8 ++++++++ arch/m68k/virt/config.c | 11 +++++++++++ 2 files changed, 19 insertions(+) commit 6f08e51cdbe08370ad0a8580d0d6ea6ffdfed46d Author: Amadeusz Sławiński Date: Fri May 27 13:53:44 2022 +0200 m68k: bitops: Change __fls to return and accept unsigned long As per asm-generic definition and other architectures __fls should return and accept unsigned long as its parameter. No functional change is expected as return value should fit in unsigned long. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20220527115345.2588775-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Geert Uytterhoeven arch/m68k/include/asm/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5d263cde50a455815cd714445b71f2554c8a888 Author: Juerg Haefliger Date: Tue May 24 09:58:48 2022 +0200 m68k: Kconfig.machine: Add endif comment Add missing trailing endif comment. Signed-off-by: Juerg Haefliger Link: https://lore.kernel.org/r/20220524075848.21684-4-juergh@canonical.com Signed-off-by: Geert Uytterhoeven arch/m68k/Kconfig.machine | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 687b2754b080a6e6608b177e195ed3329724ca02 Author: Juerg Haefliger Date: Tue May 24 09:58:47 2022 +0200 m68k: Kconfig.debug: Replace single quotes Replace single quotes in strings with double quotes to match the majority of the rest of the kernel's Kconfig files. Signed-off-by: Juerg Haefliger Link: https://lore.kernel.org/r/20220524075848.21684-3-juergh@canonical.com Signed-off-by: Geert Uytterhoeven arch/m68k/Kconfig.debug | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a1ab4c1cc28c153cc1cb2cecc7180ad296c9d2c3 Author: Juerg Haefliger Date: Tue May 24 09:58:46 2022 +0200 m68k: Kconfig.cpu: Fix indentation and add endif comments The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules. While at it, add missing trailing endif comments and squeeze multiple empty lines. Signed-off-by: Juerg Haefliger Link: https://lore.kernel.org/r/20220524075848.21684-2-juergh@canonical.com Signed-off-by: Geert Uytterhoeven arch/m68k/Kconfig.cpu | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4874fb9484be4cee78d8b3b0f0209cd16e5ae35d Merge: 2ef8e39f58f0 c46b01839f7a Author: David S. Miller Date: Wed Jul 6 12:56:35 2022 +0100 Merge branch 'tls-rx-nopad-and-backlog-flushing' Jakub Kicinski says: ==================== tls: rx: nopad and backlog flushing This small series contains the two changes I've been working towards in the previous ~50 patches a couple of months ago. The first major change is the optional "nopad" optimization. Currently TLS 1.3 Rx performs quite poorly because it does not support the "zero-copy" or rather direct decrypt to a user space buffer. Because of TLS 1.3 record padding we don't know if a record contains data or a control message until we decrypt it. Most records will contain data, tho, so the optimization is to try the decryption hoping its data and retry if it wasn't. The performance gain from doing that is significant (~40%) but if I'm completely honest the major reason is that we call skb_cow_data() on the non-"zc" path. The next series will remove the CoW, dropping the gain to only ~10%. The second change is to flush the backlog every 128kB. ==================== Signed-off-by: David S. Miller commit c46b01839f7aad5889e23505bbfbeb5f4d7fde8e Author: Jakub Kicinski Date: Tue Jul 5 16:59:26 2022 -0700 tls: rx: periodically flush socket backlog We continuously hold the socket lock during large reads and writes. This may inflate RTT and negatively impact TCP performance. Flush the backlog periodically. I tried to pick a flush period (128kB) which gives significant benefit but the max Bps rate is not yet visibly impacted. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/core/sock.c | 1 + net/tls/tls_sw.c | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) commit f36068a20256bad993d60e49602f02e3af336506 Author: Jakub Kicinski Date: Tue Jul 5 16:59:25 2022 -0700 selftests: tls: add selftest variant for pad Add a self-test variant with TLS 1.3 nopad set. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller tools/testing/selftests/net/tls.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 88527790c079fb1ea41cbcfa4450ee37906a2fb0 Author: Jakub Kicinski Date: Tue Jul 5 16:59:24 2022 -0700 tls: rx: add sockopt for enabling optimistic decrypt with TLS 1.3 Since optimisitic decrypt may add extra load in case of retries require socket owner to explicitly opt-in. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller Documentation/networking/tls.rst | 18 ++++++++++ include/linux/sockptr.h | 8 +++++ include/net/tls.h | 3 ++ include/uapi/linux/snmp.h | 1 + include/uapi/linux/tls.h | 2 ++ net/tls/tls_main.c | 75 ++++++++++++++++++++++++++++++++++++++++ net/tls/tls_proc.c | 1 + net/tls/tls_sw.c | 21 +++++++---- 8 files changed, 122 insertions(+), 7 deletions(-) commit ce61327ce989b63c0bd1cc7afee00e218ee696ac Author: Jakub Kicinski Date: Tue Jul 5 16:59:23 2022 -0700 tls: rx: support optimistic decrypt to user buffer with TLS 1.3 We currently don't support decrypt to user buffer with TLS 1.3 because we don't know the record type and how much padding record contains before decryption. In practice data records are by far most common and padding gets used rarely so we can assume data record, no padding, and if we find out that wasn't the case - retry the crypto in place (decrypt to skb). To safeguard from user overwriting content type and padding before we can check it attach a 1B sg entry where last byte of the record will land. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/tls/tls_sw.c | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) commit 603380f54f837a7837c30713de25cb146254a0d7 Author: Jakub Kicinski Date: Tue Jul 5 16:59:22 2022 -0700 tls: rx: don't include tail size in data_len To make future patches easier to review make data_len contain the length of the data, without the tail. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/tls/tls_sw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 77abf47213c6065d878020707aa611ef02f2e4bf Merge: 3ed9222ce728 b27d04d5a51c Author: Arnd Bergmann Date: Wed Jul 6 13:56:10 2022 +0200 Merge tag 'scmi-updates-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/drivers Arm SCMI updates for v5.20 The main additions this time around are: 1. The capability to trace full SCMI message headers and payloads. The recent unearthing of chain of old firmware issues motivated this effort so that it is easier to trace them and debug quicker than it took this time around in absence of such tracing. 2. SCMI System power control driver to handle platform's requests for a graceful shutdown. Though the system power control protocol has been around since the begining of SCMI, it lacked the timeout information that was added in SCMI v3.1 that enables kernel to take appropriate action within the timeout and doesn't have to rely on any other user inputs(which was blocking factor for addition of this driver earlier) 3. Support for SCMI Power Capping protocol that was introduced in SCMI v3.1 This protocol is intended for controlling and monitoring the power consumption of power capping domains. The firmware also provides the hierarchy of powercap domains by providing parent domain information. It also contains a bug fix in the old SCPI driver addressing possible user-after-free issues. * tag 'scmi-updates-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Use fast channel tracing include: trace: Add SCMI fast channel tracing firmware: arm_scmi: Add SCMI v3.1 powercap fast channels support firmware: arm_scmi: Generalize the fast channel support firmware: arm_scmi: Add SCMI v3.1 powercap protocol basic support dt-bindings: firmware: arm,scmi: Add support for powercap protocol firmware: arm_scmi: Add SCMI System Power Control driver firmware: arm_scmi: Add devm_protocol_acquire helper firmware: arm_scmi: Add SCMI v3.1 System Power extensions firmware: arm_scmi: Support only one single system power device firmware: arm_scmi: Use new SCMI full message tracing include: trace: Add SCMI full message tracing firmware: arm_scpi: Ensure scpi_info is not assigned if the probe fails firmware: arm_scmi: Remove usage of the deprecated ida_simple_xxx API firmware: arm_scmi: Fix response size warning for OPTEE transport firmware: arm_scmi: Relax CLOCK_DESCRIBE_RATES out-of-spec checks Link: https://lore.kernel.org/r/20220706115045.2272678-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 6a65fc3614d1e47ba2f8870881f9e42821feb807 Merge: 888c173e3198 156c90415b5c Author: Arnd Bergmann Date: Wed Jul 6 13:55:01 2022 +0200 Merge tag 'juno-updates-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/dt Armv8 Juno/FVP updates for v5.20 Just a small bunch of miscellaneous updates: addition of missing cache-level property to L2 caches on Juno, whitespace adjustments and removal of erroneous 'mbox-name' and 'panel-dpi' compatible in the device tree nodes. * tag 'juno-updates-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: juno: Add cache-level property to L2 caches arm64: dts: arm: adjust whitespace around '=' arm64: dts: arm/juno: Drop erroneous 'mbox-name' property arm64: dts: arm/fvp-base-revc: Remove 'panel-dpi' compatible Link: https://lore.kernel.org/r/20220706115026.2272643-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 3482c0b7307365fa9d00cfc1040ff8c39bb8604e Author: Emma Anholt Date: Tue Jun 14 16:01:35 2022 -0700 iommu: arm-smmu-impl: Add 8250 display compatible to the client list. Required for turning on per-process page tables for the GPU. Signed-off-by: Emma Anholt Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220614230136.3726047-1-emma@anholt.net Signed-off-by: Will Deacon drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 + 1 file changed, 1 insertion(+) commit 888c173e3198fe4a2ba3bb1caa913d13dcd0ac35 Merge: 5b98b4021e1c cc6280cf885c Author: Arnd Bergmann Date: Wed Jul 6 13:46:26 2022 +0200 Merge tag 'stm32-dt-for-v5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/dt STM32 DT for v5.20, round 1 Highlights: ---------- - MCU: -Fix whitespace coding style. No functional changes. - MPU: - General: - Remove specific IPCC wakeup interrupt on STM32MP15. - Enable OPTEE firmware and scmi support (clock/reset) on STM32MP13. It allows to enable RCC clock driver. - Add new pins configurations groups. - DH boards: - Add DHCOR based DRC Compact board. It embeds: 2xETH, 1xCAN, uSD, USB, eMMC and SDIO wifi. - Add ST MIPID02 bindings to AV96 (not enabled by default) - OSD32: - Correct vcc-supply for eeprom. - fix missing internally connected voltage regulator (ldo3 supplied by vdd_ddr). * tag 'stm32-dt-for-v5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: (25 commits) ARM: dts: stm32: Add ST MIPID02 bindings to AV96 ARM: dts: stm32: Add alternate pinmux for RCC pin ARM: dts: stm32: Add alternate pinmux for DCMI pins ARM: dts: stm32: Add DHCOR based DRC Compact board ARM: dts: stm32: Add alternate pinmux for UART5 pins ARM: dts: stm32: Add alternate pinmux for UART4 pins ARM: dts: stm32: Add alternate pinmux for UART3 pins ARM: dts: stm32: Add alternate pinmux for SPI2 pins ARM: dts: stm32: Add alternate pinmux for CAN1 pins dt-bindings: arm: stm32: Add compatible string for DH electronics DHCOR DRC Compact ARM: dts: stm32: Fix SPI2 pinmux pin comments on stm32mp15 ARM: dts: stm32: add optee reserved memory on stm32mp135f-dk ARM: dts: stm32: add RCC on STM32MP13x SoC family ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP13 dt-bindings: rcc: stm32: select the "secure" path for stm32mp13 ARM: dts: stm32: correct vcc-supply for eeprom on stm32mp15xx-osd32 ARM: dts: stm32: fix missing internally connected voltage regulator for OSD32MP1 ARM: dts: stm32: adjust whitespace around '=' on MCU boards ARM: dts: stm32: Move DHCOR BUCK3 VDD 2V9 adjustment to 1V8 DTSI ARM: dts: stm32: remove the IPCC "wakeup" IRQ on stm32mp151 ... Link: https://lore.kernel.org/r/a250f32b-f67c-2922-0748-e39dc791e95c@foss.st.com Signed-off-by: Arnd Bergmann commit 5b98b4021e1ca272e5a70ec58ee20e07e25f41f2 Merge: 11303e4e4c0e 4dd1a613e464 Author: Arnd Bergmann Date: Wed Jul 6 13:42:46 2022 +0200 Merge tag 'at91-dt-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt AT91 DT for v5.20 It contains: - compilation warning fixes for SAMA5D2 - updates for all AT91 device tree to use generic name for reset controller - reset controller node for SAMA7G5 - MCAN1 and UDPHS nodes for LAN966 SoCs - Flexcom3 bindings were updated for lan966x-pcb8291.dts board to cope with reality * tag 'at91-dt-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: lan966x: Add UDPHS support dt-bindings: usb: atmel: Add Microchip LAN9662 compatible string ARM: dts: lan966x: Cleanup flexcom3 usart pinctrl settings. ARM: dts: lan966x: Add mcan1 node. ARM: dts: at91: sama7g5: add reset-controller node ARM: dts: at91: use generic name for reset controller ARM: dts: at91: sama5d2: fix compilation warning ARM: dts: at91: sama5d2: fix compilation warning Link: https://lore.kernel.org/r/20220705084637.818216-1-claudiu.beznea@microchip.com Signed-off-by: Arnd Bergmann commit 11303e4e4c0e62ea3fb08d4922297fa71fa04222 Merge: 2630a9127c7e c6aaccf1c906 Author: Arnd Bergmann Date: Wed Jul 6 13:41:57 2022 +0200 Merge tag 'ux500-dts-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into arm/dt Ux500 DTS updates for the v5.20 kernel: - Fix orientation matrices on a few U8500 mobile phones. - Drop unused i2c power supply handled by the power domain. * tag 'ux500-dts-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: dts: ux500: Drop unused i2c power domain supply ARM: dts: ux500: Fix Gavini accelerometer mounting matrix ARM: dts: ux500: Fix Codina accelerometer mounting matrix ARM: dts: ux500: Fix Janice accelerometer mounting matrix Link: https://lore.kernel.org/r/CACRpkdY1MG=HG+tOCmD1_LEAStV1-ycCLkwShMRD4R=4jGDYHQ@mail.gmail.com Signed-off-by: Arnd Bergmann commit 2630a9127c7eec852324b26b33d07beeacd81c32 Merge: 73a4ccf93867 e5a3cbe8b45b Author: Arnd Bergmann Date: Wed Jul 6 13:40:10 2022 +0200 Merge tag 'v5.20-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt NFC flash node on rk3066a-mk808 and some dts styling fixes (alignment and node names). * tag 'v5.20-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: correct gpio-keys properties on rk3288-tinker ARM: dts: rockchip: align gpio-key node names with dtschema ARM: dts: rockchip: adjust whitespace around '=' ARM: dts: rockchip: enable nfc node in rk3066a-mk808.dts Link: https://lore.kernel.org/r/14795241.VsHLxoZxqI@phil Signed-off-by: Arnd Bergmann commit 73a4ccf938679b6cd250789cfb1cc24e2d794012 Merge: 9b47c57437aa 9eee552fd8c4 Author: Arnd Bergmann Date: Wed Jul 6 13:37:33 2022 +0200 Merge tag 'v5.20-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt New board the Radxa Rock Pi S, enablement of graphics support and hdmi-audio on rk356x in general plus necessary board-specific changes on Rock-3A, Quartz64-A, rk3568-evb, BPI-R2-Pro. A number of additional peripherals on BPI-R2-Pro (gpu, thermal, rtc) and PCIe2x1 support on rk3568 and enablement on Quart64-A as well as a number of additional peripherals to this board (sfc node, sdr-104 support, fan). And finally touch panel support for rockpro64 and some misc dt cleanups (node names for dtschema and styling). * tag 'v5.20-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (27 commits) arm64: dts: rockchip: enable hdmi tx audio on rock-3a arm64: dts: rockchip: enable hdmi tx audio on rk3568-evb1-v10 arm64: dts: rockchip: align gpio-key node names with dtschema arm64: dts: rockchip: rock-pi-s add more peripherals arm64: dts: rockchip: add ROCK Pi S DTS support dt-bindings: arm: rockchip: Add Radxa ROCK Pi S arm64: dts: rockchip: Add missing space around regulator-name on rk3368-orion-r68 arm64: dts: rockchip: enable the gpu on BPI-R2-Pro arm64: dts: rockchip: configure thermal shutdown for BPI-R2-Pro arm64: dts: rockchip: Enable HDMI audio on BPI R2 Pro arm64: dts: rockchip: enable vop2 and hdmi tx on BPI-R2-Pro arm64: dts: rockchip: set display regulators to always-on on BPI-R2-Pro arm64: dts: rockchip: add RTC to BPI-R2 Pro arm64: dts: rockchip: Enable HDMI audio on Quartz64 A arm64: dts: rockchip: Add HDMI audio nodes to rk356x arm64: dts: rockchip: adjust whitespace around '=' arm64: dts: rockchip: enable vop2 and hdmi tx on rock-3a arm64: dts: rockchip: enable vop2 and hdmi tx on quartz64a arm64: dts: rockchip: rk3568-evb: Enable VOP2 and hdmi arm64: dts: rockchip: rk356x: Add HDMI nodes ... Link: https://lore.kernel.org/r/40088956.J2Yia2DhmK@phil Signed-off-by: Arnd Bergmann commit b4c9bf178ace26c52c9cac36f265ba95132a221d Author: Feng Tang Date: Sun Jul 3 19:44:50 2022 +0800 iommu/iova: change IOVA_MAG_SIZE to 127 to save memory kmalloc will round up the request size to power of 2, and current iova_magazine's size is 1032 (1024+8) bytes, so each instance allocated will get 2048 bytes from kmalloc, causing around 1KB waste. Change IOVA_MAG_SIZE from 128 to 127 to make size of 'iova_magazine' 1024 bytes so that no memory will be wasted. Signed-off-by: Feng Tang Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20220703114450.15184-1-feng.tang@intel.com Signed-off-by: Joerg Roedel drivers/iommu/iova.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit f1fd46e068f52893608469df98d4608672e3e45f Author: Cezary Rojewski Date: Wed Jul 6 08:29:52 2022 +0200 ASoC: Intel: avs: Fix i2s_test card name initialization Update printf formatting as 'ssp_port' argument is of type 'int', not 'long int'. Fixes: e39acc4cfd92 ("ASoC: Intel: avs: Add I2S-test machine board") Reported-by: kernel test robot Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220706062952.251704-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/i2s_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0fabd12a8570cb932f13d9388f3d887ad44369b Author: Shengjiu Wang Date: Wed Jul 6 17:42:55 2022 +0800 ASoC: imx-card: Fix DSD/PDM mclk frequency The DSD/PDM rate not only DSD64/128/256/512, which are the multiple rate of 44.1kHz, but also support the multiple rate of 8kHz, so can't force all mclk frequency to be 22579200Hz, need to assign the frequency according to rate. Fixes: aa736700f42f ("ASoC: imx-card: Add imx-card machine driver") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1657100575-8261-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/imx-card.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 676c6cc50d588528b9f30a81dd7aba16248da28c Merge: 945c7683c52a f94fa8405801 Author: Mark Brown Date: Wed Jul 6 12:06:46 2022 +0100 I2S driver changes for Jadeite platform Merge series from Vijendar Mukunda : Jadeite(JD) platform is Stoney APU varaint which uses I2S MICSP instance and ES8336 Codec. This patch series creates I2S platform devices for JD platform, adds I2S MICSP instance support and Machine driver support commit 945c7683c52ac39e8def05cf826632b52044874a Merge: 65b6851d243f 6c06ad34eda9 Author: Mark Brown Date: Wed Jul 6 12:06:44 2022 +0100 Add support of two Audio PLL source Merge series from Shengjiu Wang : i.MX8MQ/MN/MM/MP platforms typically have 2 AUDIO PLLs being configured to handle 8kHz and 11kHz series audio rates. The patches implement the functionality to select at runtime the appropriate AUDIO PLL for root clock, if there is no two PLL registered, then no action taken. commit 32977242f80e343e2247f77e53fe20e8f7c23938 Author: Marek Szyprowski Date: Thu Jun 23 11:36:29 2022 +0200 iommu/exynos: Make driver independent of the system page size PAGE_{SIZE,SHIFT} macros depend on the configured kernel's page size, but the driver expects values calculated as for 4KB pages. Fix this. Reported-by: Robin Murphy Signed-off-by: Marek Szyprowski Reviewed-by: Sam Protsenko Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220623093629.32178-1-m.szyprowski@samsung.com Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4d26ba671e3deed010311345e4426e6e11eaaf4c Author: Robin Murphy Date: Tue Jun 21 16:14:27 2022 +0100 iommu: Clean up release_device checks Since .release_device is now called through per-device ops, any call which gets as far as a driver definitely *is* for that driver, for a device which has successfully passed .probe_device, so all the checks to that effect are now redundant and can be removed. In the same vein we can also skip freeing fwspecs which are now managed by core code. Signed-off-by: Robin Murphy Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/02671dbfad7a3343fc25a44222350efcb455fe3c.1655822151.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel drivers/iommu/apple-dart.c | 3 --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 8 +------- drivers/iommu/arm/arm-smmu/arm-smmu.c | 14 +++----------- drivers/iommu/arm/arm-smmu/qcom_iommu.c | 11 ----------- drivers/iommu/exynos-iommu.c | 3 --- drivers/iommu/mtk_iommu.c | 5 ----- drivers/iommu/mtk_iommu_v1.c | 5 ----- drivers/iommu/sprd-iommu.c | 11 ----------- drivers/iommu/virtio-iommu.c | 8 +------- 9 files changed, 5 insertions(+), 63 deletions(-) commit b321a2fba2734cbac799034081e20dcdb321ef4f Author: Robin Murphy Date: Tue Jun 21 16:14:26 2022 +0100 iommu: Make .release_device optional Many drivers do nothing meaningful for .release_device, and it's neatly abstracted to just two callsites in the core code, so let's make it optional to implement. Signed-off-by: Robin Murphy Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/bda9d3eb4527eac8f6544a15067e2529cca54a2e.1655822151.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel drivers/iommu/fsl_pamu_domain.c | 5 ----- drivers/iommu/iommu.c | 6 ++++-- drivers/iommu/msm_iommu.c | 5 ----- drivers/iommu/sun50i-iommu.c | 3 --- drivers/iommu/tegra-gart.c | 5 ----- drivers/iommu/tegra-smmu.c | 3 --- 6 files changed, 4 insertions(+), 23 deletions(-) commit e63cfb5faac57056eeed22d78ee1c8f7a4ddbef2 Author: Robin Murphy Date: Tue Jun 21 16:14:25 2022 +0100 iommu: Use dev_iommu_ops() for probe_finalize The ->probe_finalize hook only runs after ->probe_device succeeds, so we can move that over to the new dev_iommu_ops() as well. Reviewed-by: Lu Baolu Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/5fe4b0ce22f676f435d332f2b2828dc7ef848a19.1655822151.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0bec05574d13ed7e8643733fe5dccbd0c86604d2 Author: Jon Nettleton Date: Wed Jun 15 11:10:44 2022 +0100 iommu/arm-smmu: Get associated RMR info and install bypass SMR Check if there is any RMR info associated with the devices behind the SMMU and if any, install bypass SMRs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMU during probe(). Signed-off-by: Jon Nettleton Signed-off-by: Steven Price Tested-by: Steven Price Tested-by: Laurentiu Tudor Signed-off-by: Shameer Kolothum Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20220615101044.1972-10-shameerali.kolothum.thodi@huawei.com Signed-off-by: Joerg Roedel drivers/iommu/arm/arm-smmu/arm-smmu.c | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 9bdbdaa3c44ea97c8e97e51dd503a7061bd676a0 Author: Shameer Kolothum Date: Wed Jun 15 11:10:43 2022 +0100 iommu/arm-smmu-v3: Get associated RMR info and install bypass STE Check if there is any RMR info associated with the devices behind the SMMUv3 and if any, install bypass STEs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMUv3 during probe(). Tested-by: Hanjun Guo Signed-off-by: Shameer Kolothum Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20220615101044.1972-9-shameerali.kolothum.thodi@huawei.com Signed-off-by: Joerg Roedel drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 6c998abb1ea54b3d83420f68ce382354a30f2238 Author: Shameer Kolothum Date: Wed Jun 15 11:10:42 2022 +0100 iommu/arm-smmu-v3: Refactor arm_smmu_init_bypass_stes() to force bypass By default, disable_bypass flag is set and any dev without an iommu domain installs STE with CFG_ABORT during arm_smmu_init_bypass_stes(). Introduce a "force" flag and move the STE update logic to arm_smmu_init_bypass_stes() so that we can force it to install CFG_BYPASS STE for specific SIDs. This will be useful in a follow-up patch to install bypass for IORT RMR SIDs. Tested-by: Hanjun Guo Signed-off-by: Shameer Kolothum Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20220615101044.1972-8-shameerali.kolothum.thodi@huawei.com Signed-off-by: Joerg Roedel drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 04e2afd1a71c98e8ad84e5e6bf8352c3de6e6eaf Author: Shameer Kolothum Date: Wed Jun 15 11:10:41 2022 +0100 iommu/arm-smmu-v3: Introduce strtab init helper Introduce a helper to check the sid range and to init the l2 strtab entries(bypass). This will be useful when we have to initialize the l2 strtab with bypass for RMR SIDs. Tested-by: Hanjun Guo Acked-by: Will Deacon Signed-off-by: Shameer Kolothum Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20220615101044.1972-7-shameerali.kolothum.thodi@huawei.com Signed-off-by: Joerg Roedel drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit e302eea8f49717253ac64fd45b7cc719e87fa010 Author: Shameer Kolothum Date: Wed Jun 15 11:10:40 2022 +0100 ACPI/IORT: Add a helper to retrieve RMR info directly This will provide a way for SMMU drivers to retrieve StreamIDs associated with IORT RMR nodes and use that to set bypass settings for those IDs. Tested-by: Steven Price Tested-by: Laurentiu Tudor Tested-by: Hanjun Guo Reviewed-by: Hanjun Guo Signed-off-by: Shameer Kolothum Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20220615101044.1972-6-shameerali.kolothum.thodi@huawei.com Signed-off-by: Joerg Roedel drivers/acpi/arm64/iort.c | 28 ++++++++++++++++++++++++++++ include/linux/acpi_iort.h | 8 ++++++++ 2 files changed, 36 insertions(+) commit 491cf4a6735a957cd0733365f8d17e0f4308f5a4 Author: Shameer Kolothum Date: Wed Jun 15 11:10:39 2022 +0100 ACPI/IORT: Add support to retrieve IORT RMR reserved regions Parse through the IORT RMR nodes and populate the reserve region list corresponding to a given IOMMU and device(optional). Also, go through the ID mappings of the RMR node and retrieve all the SIDs associated with it. Reviewed-by: Lorenzo Pieralisi Tested-by: Steven Price Tested-by: Laurentiu Tudor Tested-by: Hanjun Guo Reviewed-by: Hanjun Guo Signed-off-by: Shameer Kolothum Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20220615101044.1972-5-shameerali.kolothum.thodi@huawei.com Signed-off-by: Joerg Roedel drivers/acpi/arm64/iort.c | 291 ++++++++++++++++++++++++++++++++++++++++++++++ include/linux/iommu.h | 8 ++ 2 files changed, 299 insertions(+) commit 55be25b8b5e4e2fd680cfb073b84a74a79c002fa Author: Shameer Kolothum Date: Wed Jun 15 11:10:38 2022 +0100 ACPI/IORT: Provide a generic helper to retrieve reserve regions Currently IORT provides a helper to retrieve HW MSI reserve regions. Change this to a generic helper to retrieve any IORT related reserve regions. This will be useful when we add support for RMR nodes in subsequent patches. [Lorenzo: For ACPI IORT] Reviewed-by: Lorenzo Pieralisi Reviewed-by: Christoph Hellwig Tested-by: Steven Price Tested-by: Laurentiu Tudor Tested-by: Hanjun Guo Reviewed-by: Hanjun Guo Signed-off-by: Shameer Kolothum Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20220615101044.1972-4-shameerali.kolothum.thodi@huawei.com Signed-off-by: Joerg Roedel drivers/acpi/arm64/iort.c | 22 +++++++++++++++------- drivers/iommu/dma-iommu.c | 2 +- include/linux/acpi_iort.h | 4 ++-- 3 files changed, 18 insertions(+), 10 deletions(-) commit 8778b1d48117055c710a01498f65fa730160fdfa Author: Shameer Kolothum Date: Wed Jun 15 11:10:37 2022 +0100 ACPI/IORT: Make iort_iommu_msi_get_resv_regions() return void At present iort_iommu_msi_get_resv_regions() returns the number of MSI reserved regions on success and there are no users for this. The reserved region list will get populated anyway for platforms that require the HW MSI region reservation. Hence, change the function to return void instead. Reviewed-by: Christoph Hellwig Tested-by: Steven Price Tested-by: Laurentiu Tudor Reviewed-by: Hanjun Guo Signed-off-by: Shameer Kolothum Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20220615101044.1972-3-shameerali.kolothum.thodi@huawei.com Signed-off-by: Joerg Roedel drivers/acpi/arm64/iort.c | 25 +++++++++---------------- include/linux/acpi_iort.h | 6 +++--- 2 files changed, 12 insertions(+), 19 deletions(-) commit 3b7e2482f9a3f2e99628048b945c9c6cc53bd38e Author: Shameer Kolothum Date: Wed Jun 15 11:10:36 2022 +0100 iommu: Introduce a callback to struct iommu_resv_region A callback is introduced to struct iommu_resv_region to free memory allocations associated with the reserved region. This will be useful when we introduce support for IORT RMR based reserved regions. Reviewed-by: Christoph Hellwig Tested-by: Steven Price Tested-by: Laurentiu Tudor Tested-by: Hanjun Guo Signed-off-by: Shameer Kolothum Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20220615101044.1972-2-shameerali.kolothum.thodi@huawei.com Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 16 +++++++++++----- include/linux/iommu.h | 2 ++ 2 files changed, 13 insertions(+), 5 deletions(-) commit 66637ab137b44914356a9dc7a9b3f8ebcf0b0695 Author: Guangbin Huang Date: Tue Jun 28 14:34:19 2022 +0800 drivers/perf: hisi: add driver for HNS3 PMU HNS3(HiSilicon Network System 3) PMU is RCiEP device in HiSilicon SoC NIC, supports collection of performance statistics such as bandwidth, latency, packet rate and interrupt rate. NIC of each SICL has one PMU device for it. Driver registers each PMU device to perf, and exports information of supported events, filter mode of each event, bdf range, hardware clock frequency, identifier and so on via sysfs. Each PMU device has its own registers of control, counters and interrupt, and it supports 8 hardware events, each hardward event has its own registers for configuration, counters and interrupt. Filter options contains: config - select event port - select physical port of nic tc - select tc(must be used with port) func - select PF/VF queue - select queue of PF/VF(must be used with func) intr - select interrupt number(must be used with func) global - select all functions of IO DIE Signed-off-by: Guangbin Huang Reviewed-by: John Garry Reviewed-by: Shaokun Zhang Link: https://lore.kernel.org/r/20220628063419.38514-3-huangguangbin2@huawei.com Signed-off-by: Will Deacon MAINTAINERS | 6 + drivers/perf/hisilicon/Kconfig | 10 + drivers/perf/hisilicon/Makefile | 1 + drivers/perf/hisilicon/hns3_pmu.c | 1671 +++++++++++++++++++++++++++++++++++++ include/linux/cpuhotplug.h | 1 + 5 files changed, 1689 insertions(+) commit 39915b6b5fc209c9262b32ec754b3838550f2a1f Author: Guangbin Huang Date: Tue Jun 28 14:34:18 2022 +0800 drivers/perf: hisi: Add description for HNS3 PMU driver HNS3 PMU End Point device is supported on HiSilicon HIP09 platform, so add document hns3-pmu.rst to provide guidance on how to use it. Signed-off-by: Guangbin Huang Reviewed-by: John Garry Reviewed-by: Shaokun Zhang Link: https://lore.kernel.org/r/20220628063419.38514-2-huangguangbin2@huawei.com Signed-off-by: Will Deacon Documentation/admin-guide/perf/hns3-pmu.rst | 136 ++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) commit 26fabd6d2ffc2812138a613bec84ec72541842e7 Author: Nikita Shubin Date: Tue Jun 28 14:45:55 2022 +0300 drivers/perf: riscv_pmu_sbi: perf format Update driver to export formatting and event information to sysfs so it can be used by the perf user space tools with the syntaxes: perf stat -e cpu/event=0x05 perf stat -e cpu/event=0x05,firmware=0x1/ 63-bit is used to distinguish hardware events from firmware. Firmware events are defined by "RISC-V Supervisor Binary Interface Specification". perf stat -e cpu/event=0x05,firmware=0x1/ is equivalent to perf stat -e r8000000000000005 Suggested-by: João Mário Domingos Signed-off-by: Nikita Shubin Link: https://github.com/riscv-non-isa/riscv-sbi-doc/blob/master/riscv-sbi.adoc Link: https://lore.kernel.org/r/20220628114625.166665-2-nikita.shubin@maquefel.me Signed-off-by: Will Deacon drivers/perf/riscv_pmu_sbi.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 0e35850b341e88055ca11cad74efa464b2159984 Author: Christophe JAILLET Date: Wed Jul 6 07:20:15 2022 +0200 perf/arm-cci: Use the bitmap API to allocate bitmaps Use devm_bitmap_zalloc() instead of hand-writing it. It is less verbose and it improves the semantic. While at it, use bitmap_zero() instead of hand-writing it. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/fbde85a5e8ae99b10a2115d8ea1e69320a62947f.1657084786.git.christophe.jaillet@wanadoo.fr Signed-off-by: Will Deacon drivers/perf/arm-cci.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit e9a023f2b73ac35ff5cfbefe8524c64d8173d65f Author: Eric Lin Date: Tue Jul 5 17:19:20 2022 +0800 drivers/perf: riscv_pmu: Add riscv pmu pm notifier Currently, when the CPU is doing suspend to ram, we don't save pmu counter register and its content will be lost. To ensure perf profiling is not affected by suspend to ram, this patch is based on arm_pmu CPU_PM notifier and implements riscv pmu pm notifier. In the pm notifier, we stop the counter and update the counter value before suspend and start the counter after resume. Signed-off-by: Eric Lin Link: https://lore.kernel.org/r/20220705091920.27432-1-eric.lin@sifive.com Signed-off-by: Will Deacon drivers/perf/riscv_pmu.c | 4 +-- drivers/perf/riscv_pmu_sbi.c | 81 +++++++++++++++++++++++++++++++++++++++--- include/linux/perf/riscv_pmu.h | 4 +++ 3 files changed, 83 insertions(+), 6 deletions(-) commit 1c3ace2b8b3995d3213c5e2d2aca01a0577a3b0f Author: Quentin Perret Date: Tue Jul 5 14:23:10 2022 +0000 KVM: arm64: Don't return from void function Although harmless, the return statement in kvm_unexpected_el2_exception is rather confusing as the function itself has a void return type. The C standard is also pretty clear that "A return statement with an expression shall not appear in a function whose return type is void". Given that this return statement does not seem to add any actual value, let's not pointlessly violate the standard. Build-tested with GCC 10 and CLANG 13 for good measure, the disassembled code is identical with or without the return statement. Fixes: e9ee186bb735 ("KVM: arm64: Add kvm_extable for vaxorcism code") Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220705142310.3847918-1-qperret@google.com arch/arm64/kvm/hyp/nvhe/switch.c | 2 +- arch/arm64/kvm/hyp/vhe/switch.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2ef8e39f58f08589ab035223c2687830c0eba30f Merge: e7ce9fc9ad38 7189d28e7e2d Author: David S. Miller Date: Wed Jul 6 08:16:48 2022 +0100 Merge branch 'octeontx2-af-next' Ratheesh Kannoth says: ==================== octeontx2: *** Exact Match Table and Field hash *** *** Exact match table and Field hash support for CN10KB silicon *** Ratheesh Kannoth (11): These patch series enables exact match table in CN10KB silicon. Legacy silicon used NPC mcam to do packet fields/channel matching for NPC rules. NPC mcam resources exahausted as customer use case increased. Supporting many DMAC filter becomes a challenge, as RPM based filter count is less. Exact match table has 4way 2K entry table and a 32 entry fully associative cam table. Second table is to handle hash table collision overflows in 4way 2K entry table. Enabling exact match table results in KEX key to be appended with Hit/Miss status. This can be used to match in NPC mcam for a more generic rule and drop those packets than having DMAC drop rules for each DMAC entry in NPC mcam. octeontx2-af: Exact match support octeontx2-af: Exact match scan from kex profile octeontx2-af: devlink configuration support octeontx2-af: FLR handler for exact match table. octeontx2-af: Drop rules for NPC MCAM octeontx2-af: Debugsfs support for exact match. octeontx2: Modify mbox request and response structures octeontx2-af: Wrapper functions for mac addr add/del/update/reset octeontx2-af: Invoke exact match functions if supported octeontx2-pf: Add support for exact match table. octeontx2-af: Enable Exact match flag in kex profile Suman Ghosh (1): CN10KB variant of CN10K series of silicons supports a new feature where in a large protocol field (eg 128bit IPv6 DIP) can be condensed into a small hashed 32bit data. This saves a lot of space in MCAM key and allows user to add more protocol fields into the filter. A max of two such protocol data can be hashed. This patch adds support for hashing IPv6 SIP and/or DIP. ==================== Signed-off-by: David S. Miller commit 7189d28e7e2d697cde5ad18678007d8fe555afeb Author: Ratheesh Kannoth Date: Wed Jul 6 09:14:42 2022 +0530 octeontx2-af: Enable Exact match flag in kex profile Enabled EXACT match flag in Kex default profile. Since there is no space in key, NPC_PARSE_NIBBLE_ERRCODE is removed Signed-off-by: Ratheesh Kannoth Signed-off-by: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/npc_profile.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e56468377fa0f6e24b898e4c4169de0fbc63fe8e Author: Ratheesh Kannoth Date: Wed Jul 6 09:14:41 2022 +0530 octeontx2-pf: Add support for exact match table. NPC exact match table can support more entries than RPM dmac filters. This requires field size of DMAC filter count and index to be increased. Signed-off-by: Ratheesh Kannoth Signed-off-by: David S. Miller .../ethernet/marvell/octeontx2/nic/otx2_common.h | 10 ++--- .../ethernet/marvell/octeontx2/nic/otx2_dmac_flt.c | 44 ++++++++++++++++------ .../ethernet/marvell/octeontx2/nic/otx2_flows.c | 40 ++++++++++++++------ .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +- 4 files changed, 67 insertions(+), 29 deletions(-) commit 84926eb57dbfc6f09bc9ccd90feacd02ef4b273f Author: Ratheesh Kannoth Date: Wed Jul 6 09:14:40 2022 +0530 octeontx2-af: Invoke exact match functions if supported If exact match table is suppoted, call functions to add/del/update entries in exact match table instead of RPM dmac filters Signed-off-by: Ratheesh Kannoth Signed-off-by: David S. Miller .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 34 ++++++++++++++++++++++ .../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 7 +++++ 2 files changed, 41 insertions(+) commit 87e91f92cdcd02d180e6592a510207e8e2577071 Author: Ratheesh Kannoth Date: Wed Jul 6 09:14:39 2022 +0530 octeontx2-af: Wrapper functions for MAC addr add/del/update/reset These functions are wrappers for mac add/addr/del/update in exact match table. These will be invoked from mbox handler routines if exact matct table is supported and enabled. Signed-off-by: Ratheesh Kannoth Signed-off-by: David S. Miller .../ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 351 ++++++++++++++++++++- .../ethernet/marvell/octeontx2/af/rvu_npc_hash.h | 23 +- 2 files changed, 363 insertions(+), 11 deletions(-) commit 68793a8bbfcda74596c278315894af6684351d35 Author: Ratheesh Kannoth Date: Wed Jul 6 09:14:38 2022 +0530 octeontx2: Modify mbox request and response structures Exact match table modification requires wider fields as it has more number of slots to fill in. Modifying an entry in exact match table may cause hash collision and may be required to delete entry from 4-way 2K table and add to fully associative 32 entry CAM table. Signed-off-by: Ratheesh Kannoth Signed-off-by: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 27 +++++++++++++++++----- .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 4 ++-- .../ethernet/marvell/octeontx2/nic/otx2_dmac_flt.c | 2 +- 3 files changed, 24 insertions(+), 9 deletions(-) commit 01b9228b20ad53872130427cb0ea1e7f1cf2284b Author: Ratheesh Kannoth Date: Wed Jul 6 09:14:37 2022 +0530 octeontx2-af: Debugsfs support for exact match. There debugfs files created. 1. General information on exact match table 2. Exact match table entries. 3. NPC mcam drop on hit count stats. Signed-off-by: Ratheesh Kannoth Signed-off-by: David S. Miller .../ethernet/marvell/octeontx2/af/rvu_debugfs.c | 179 +++++++++++++++++++++ 1 file changed, 179 insertions(+) commit c6238bc0614d3bafa5f491a065584b2e5ba6194a Author: Ratheesh Kannoth Date: Wed Jul 6 09:14:36 2022 +0530 octeontx2-af: Drop rules for NPC MCAM NPC exact match table installs drop on hit rules in NPC mcam for each channel. This rule has broadcast and multicast bits cleared. Exact match bit cleared and channel bits set. If exact match table hit bit is 0, corresponding NPC mcam drop rule will be hit for the packet and will be dropped. Signed-off-by: Ratheesh Kannoth Signed-off-by: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 6 + drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 2 + .../net/ethernet/marvell/octeontx2/af/rvu_npc.c | 37 ++- .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 106 ++++++- .../ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 309 ++++++++++++++++++++- .../ethernet/marvell/octeontx2/af/rvu_npc_hash.h | 22 ++ 6 files changed, 476 insertions(+), 6 deletions(-) commit 799f02ef2ce38e5da7f9c8724df87d5043287526 Author: Ratheesh Kannoth Date: Wed Jul 6 09:14:35 2022 +0530 octeontx2-af: FLR handler for exact match table. FLR handler should remove/free all exact match table resources corresponding to each interface. Signed-off-by: Ratheesh Kannoth Signed-off-by: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 3 +++ .../ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 27 ++++++++++++++++++++++ .../ethernet/marvell/octeontx2/af/rvu_npc_hash.h | 1 + 3 files changed, 31 insertions(+) commit ffd92c57469d9395ed2df1ee9d71bba39b37d950 Author: Ratheesh Kannoth Date: Wed Jul 6 09:14:34 2022 +0530 octeontx2-af: devlink configuration support CN10KB silicon supports Exact match feature. This feature can be disabled through devlink configuration. Devlink command fails if DMAC filter rules are already present. Once disabled, legacy RPM based DMAC filters will be configured. Signed-off-by: Ratheesh Kannoth Signed-off-by: David S. Miller .../ethernet/marvell/octeontx2/af/rvu_devlink.c | 71 +++++++++++++++++++++- .../ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 28 +++++++++ .../ethernet/marvell/octeontx2/af/rvu_npc_hash.h | 3 + 3 files changed, 100 insertions(+), 2 deletions(-) commit 60ec393117503e97a59ff9545b1b5be1a875c1c7 Author: Ratheesh Kannoth Date: Wed Jul 6 09:14:33 2022 +0530 octeontx2-af: Exact match scan from kex profile CN10KB silicon supports exact match table. Scanning KEX profile should check for exact match feature is enabled and then set profile masks properly. These kex profile masks are required to configure NPC MCAM drop rules. If there is a miss in exact match table, these drop rules will drop those packets. Signed-off-by: Ratheesh Kannoth Signed-off-by: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/npc.h | 1 + .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 37 ++++++++++++++++++++-- 2 files changed, 35 insertions(+), 3 deletions(-) commit 017691914c115903ee513d9ca058335bb35f8bd6 Author: Ratheesh Kannoth Date: Wed Jul 6 09:14:32 2022 +0530 octeontx2-af: Exact match support CN10KB silicon has support for exact match table. This table can be used to match maimum 64 bit value of KPU parsed output. Hit/non hit in exact match table can be used as a KEX key to NPC mcam. This patch makes use of Exact match table to increase number of DMAC filters supported. NPC mcam is no more need for each of these DMAC entries as will be populated in Exact match table. This patch implements following 1. Initialization of exact match table only for CN10KB. 2. Add/del/update interface function for exact match table. Signed-off-by: Ratheesh Kannoth Signed-off-by: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/npc.h | 16 + drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2 + drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 9 +- .../ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 925 +++++++++++++++++++++ .../ethernet/marvell/octeontx2/af/rvu_npc_hash.h | 56 ++ .../net/ethernet/marvell/octeontx2/af/rvu_reg.h | 9 + 6 files changed, 1016 insertions(+), 1 deletion(-) commit a95ab93550d33ec870bd8eda5e7814c1e28ab6d0 Author: Ratheesh Kannoth Date: Wed Jul 6 09:14:31 2022 +0530 octeontx2-af: Use hashed field in MCAM key CN10KB variant of CN10K series of silicons supports a new feature where in a large protocol field (eg 128bit IPv6 DIP) can be condensed into a small hashed 32bit data. This saves a lot of space in MCAM key and allows user to add more protocol fields into the filter. A max of two such protocol data can be hashed. This patch adds support for hashing IPv6 SIP and/or DIP. Signed-off-by: Suman Ghosh Signed-off-by: Ratheesh Kannoth Signed-off-by: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/Makefile | 2 +- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 14 + drivers/net/ethernet/marvell/octeontx2/af/npc.h | 8 + drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 5 + drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 13 + .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 1 + .../net/ethernet/marvell/octeontx2/af/rvu_npc.c | 14 +- .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 21 +- .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.h | 17 ++ .../ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 338 +++++++++++++++++++++ .../ethernet/marvell/octeontx2/af/rvu_npc_hash.h | 132 ++++++++ .../net/ethernet/marvell/octeontx2/af/rvu_reg.h | 6 + 12 files changed, 554 insertions(+), 17 deletions(-) commit e7ce9fc9ad38773b660ef663ae98df4f93cb6a37 Merge: 7e40e16e38ba 7de8b691615f Author: David S. Miller Date: Wed Jul 6 08:15:51 2022 +0100 Merge branch 'nfp-tso' Merge branch 'nfp-tso' Simon Horman says: ==================== nfp: enable TSO by default this short series enables TSO by default on all NICs supported by the NFP driver. ==================== Signed-off-by: David S. Miller commit 7de8b691615f5a16bb6998debdbcf57687eb3944 Author: Simon Horman Date: Tue Jul 5 08:36:04 2022 +0100 nfp: enable TSO by default for nfp netdev We can benefit from TSO when the host CPU is not powerful enough, so enable it by default now. Signed-off-by: Yinjun Zhang Reviewed-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 7 +++---- drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) commit ccccb49329776340d99377cfae30ef3d92378fcc Author: Yinjun Zhang Date: Tue Jul 5 08:36:03 2022 +0100 nfp: allow TSO packets with metadata prepended in NFDK path Packets with metadata prepended can be correctly handled in firmware when TSO is enabled, now remove the error path and related comments. Since there's no existing firmware that uses prepended metadata, no need to add compatibility check here. Signed-off-by: Yinjun Zhang Reviewed-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfdk/dp.c | 17 ----------------- 1 file changed, 17 deletions(-) commit 1fd0d85affe4d64e54b81d04bf9577e57172a341 Author: Srinivasa Rao Mandadapu Date: Fri Jul 1 12:47:06 2022 +0530 soundwire: qcom: Add flag for software clock gating check Validate software clock gating required or not and do software clock gating on hclk if soundwire is operational and keep it running by adding flag in private data structure. This is to avoid conflict between older architectures, where software clock gating is not required and on latest architectures, where software clock gating is mandatory. Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/1656659827-27450-2-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Vinod Koul drivers/soundwire/qcom.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 33ba01788889666d90abb89a9c057c6ff8135178 Author: Srinivasa Rao Mandadapu Date: Wed May 18 18:12:35 2022 +0530 soundwire: qcom: Add support for controlling audio CGCR from HLOS Add support for controlling soundwire audio CGCR interface using clock framework to make hclk ungating with software. As per new hardware changes, software has to always ungate hclk if soundwire is operational and keep it running. This requirement is for latest LPASS chipsets for RX, TX and WSA path to work. Signed-off-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/1652877755-25120-1-git-send-email-quic_srivasam@quicinc.com [vkoul: change patch subsystem tag] Signed-off-by: Vinod Koul drivers/soundwire/qcom.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3e9c9f90573f4633ec8270d0d02bcea4fad1e802 Author: Pierre-Louis Bossart Date: Tue Jun 21 17:56:40 2022 -0500 soundwire: intel: use pm_runtime_resume() on component probe During the card registration, transactions on the SoundWire bus can be initiated. If the ALSA card is registered after the bus suspends, timeouts can be seen while reading/writing codec registers. This is extremely easy to reproduce in driver bind/unbind tests. In an initial experiment, the ASoC soc-component.c code was modified to initiate a pm_runtime resume on a component probe. The results showed this was too invasive. Instead this patch suggests resuming the SoundWire component only. Because of the parent-child hierarchy enforced by the pm_runtime framework, it can be argued that the codec component probe should be enough to resume all necessary devices, and indeed the same resume will be applied to SoundWire codecs used on Intel platforms. Calling pm_runtime_resume() on both the Intel and codec sides has the benefit of resuming the bus without assuming any order during the card registration. The first component on a dailink to be probed will resume the bus. In addition, if a codec driver did not implement this transition, the Intel component would still resume the bus and avoid timeouts on card registration. BugLink: https://github.com/thesofproject/linux/issues/3651 Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220621225641.221170-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul drivers/soundwire/intel.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 9a24bb35b0d81edb826f174d7752c2a54bc00abd Author: Pierre-Louis Bossart Date: Tue Jun 21 17:56:39 2022 -0500 soundwire: peripheral: remove useless ops pointer Now that we are using the ops structure directly from the driver, there are no users left of this ops pointer. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220621225641.221170-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul include/linux/soundwire/sdw.h | 2 -- 1 file changed, 2 deletions(-) commit bd29c00edd0a5dac8b6e7332bb470cd50f92e893 Author: Pierre-Louis Bossart Date: Tue Jun 21 17:56:38 2022 -0500 soundwire: revisit driver bind/unbind and callbacks In the SoundWire probe, we store a pointer from the driver ops into the 'slave' structure. This can lead to kernel oopses when unbinding codec drivers, e.g. with the following sequence to remove machine driver and codec driver. /sbin/modprobe -r snd_soc_sof_sdw /sbin/modprobe -r snd_soc_rt711 The full details can be found in the BugLink below, for reference the two following examples show different cases of driver ops/callbacks being invoked after the driver .remove(). kernel: BUG: kernel NULL pointer dereference, address: 0000000000000150 kernel: Workqueue: events cdns_update_slave_status_work [soundwire_cadence] kernel: RIP: 0010:mutex_lock+0x19/0x30 kernel: Call Trace: kernel: ? sdw_handle_slave_status+0x426/0xe00 [soundwire_bus 94ff184bf398570c3f8ff7efe9e32529f532e4ae] kernel: ? newidle_balance+0x26a/0x400 kernel: ? cdns_update_slave_status_work+0x1e9/0x200 [soundwire_cadence 1bcf98eebe5ba9833cd433323769ac923c9c6f82] kernel: BUG: unable to handle page fault for address: ffffffffc07654c8 kernel: Workqueue: pm pm_runtime_work kernel: RIP: 0010:sdw_bus_prep_clk_stop+0x6f/0x160 [soundwire_bus] kernel: Call Trace: kernel: kernel: sdw_cdns_clock_stop+0xb5/0x1b0 [soundwire_cadence 1bcf98eebe5ba9833cd433323769ac923c9c6f82] kernel: intel_suspend_runtime+0x5f/0x120 [soundwire_intel aca858f7c87048d3152a4a41bb68abb9b663a1dd] kernel: ? dpm_sysfs_remove+0x60/0x60 This was not detected earlier in Intel tests since the tests first remove the parent PCI device and shut down the bus. The sequence above is a corner case which keeps the bus operational but without a driver bound. While trying to solve this kernel oopses, it became clear that the existing SoundWire bus does not deal well with the unbind case. Commit 528be501b7d4a ("soundwire: sdw_slave: add probe_complete structure and new fields") added a 'probed' status variable and a 'probe_complete' struct completion. This status is however not reset on remove and likewise the 'probe complete' is not re-initialized, so the bind/unbind/bind test cases would fail. The timeout used before the 'update_status' callback was also a bad idea in hindsight, there should really be no timing assumption as to if and when a driver is bound to a device. An initial draft was based on device_lock() and device_unlock() was tested. This proved too complicated, with deadlocks created during the suspend-resume sequences, which also use the same device_lock/unlock() as the bind/unbind sequences. On a CometLake device, a bad DSDT/BIOS caused spurious resumes and the use of device_lock() caused hangs during suspend. After multiple weeks or testing and painful reverse-engineering of deadlocks on different devices, we looked for alternatives that did not interfere with the device core. A bus notifier was used successfully to keep track of DRIVER_BOUND and DRIVER_UNBIND events. This solved the bind-unbind-bind case in tests, but it can still be defeated with a theoretical corner case where the memory is freed by a .remove while the callback is in use. The notifier only helps make sure the driver callbacks are valid, but not that the memory allocated in probe remains valid while the callbacks are invoked. This patch suggests the introduction of a new 'sdw_dev_lock' mutex protecting probe/remove and all driver callbacks. Since this mutex is 'local' to SoundWire only, it does not interfere with existing locks and does not create deadlocks. In addition, this patch removes the 'probe_complete' completion, instead we directly invoke the 'update_status' from the probe routine. That removes any sort of timing dependency and a much better support for the device/driver model, the driver could be bound before the bus started, or eons after the bus started and the hardware would be properly initialized in all cases. BugLink: https://github.com/thesofproject/linux/issues/3531 Fixes: 56d4fe31af77 ("soundwire: Add MIPI DisCo property helpers") Fixes: 528be501b7d4a ("soundwire: sdw_slave: add probe_complete structure and new fields") Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220621225641.221170-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul drivers/soundwire/bus.c | 75 ++++++++++++++++++++++++------------------- drivers/soundwire/bus_type.c | 30 ++++++++++++++--- drivers/soundwire/slave.c | 3 +- drivers/soundwire/stream.c | 53 +++++++++++++++++++----------- include/linux/soundwire/sdw.h | 6 ++-- 5 files changed, 106 insertions(+), 61 deletions(-) commit df6407782964dc7e35ad84230abb38f46314b245 Author: Pierre-Louis Bossart Date: Fri Jun 10 09:51:05 2022 +0800 soundwire: bus_type: fix remove and shutdown support The bus sdw_drv_remove() and sdw_drv_shutdown() helpers are used conditionally, if the driver provides these routines. These helpers already test if the driver provides a .remove or .shutdown callback, so there's no harm in invoking the sdw_drv_remove() and sdw_drv_shutdown() unconditionally. In addition, the current code is imbalanced with dev_pm_domain_attach() called from sdw_drv_probe(), but dev_pm_domain_detach() called from sdw_drv_remove() only if the driver provides a .remove callback. Fixes: 9251345dca24b ("soundwire: Add SoundWire bus type") Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20220610015105.25987-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul drivers/soundwire/bus_type.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 4ce653d7c651d6a9fc6d5db4275624ac8d856b99 Author: Conor Dooley Date: Tue Jul 5 22:52:04 2022 +0100 dt-bindings: dma: dw-axi-dmac: extend the number of interrupts The Canaan k210 apparently has a Sysnopsys Designware AXI DMA controller, but according to the documentation & devicetree it has 6 interrupts rather than the standard one. Support the 6 interrupt configuration by unconditionally extending the binding to a maximum of 8 per-channel interrupts thereby matching the number of possible channels. Link: https://canaan-creative.com/wp-content/uploads/2020/03/kendryte_standalone_programming_guide_20190311144158_en.pdf #Page 51 Reviewed-by: Serge Semin Reviewed-by: Rob Herring Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220705215213.1802496-4-mail@conchuod.ie Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 6bc7ea3c9b49c869f688d949bb473c4e1484894f Author: XueBing Chen Date: Wed May 25 17:03:03 2022 +0800 dmaengine: dmatest: use strscpy to replace strlcpy The strlcpy should not be used because it doesn't limit the source length. Preferred is strscpy. Signed-off-by: XueBing Chen Link: https://lore.kernel.org/r/12e4cf06.a35.180fa748c29.Coremail.chenxuebing@jari.cn Signed-off-by: Vinod Koul drivers/dma/dmatest.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 450a8dcb8c7f819431b09e5c1debbf0b6c2e824e Author: Quentin Monnet Date: Tue Jul 5 21:04:56 2022 +0100 bpftool: Remove zlib feature test from Makefile The feature test to detect the availability of zlib in bpftool's Makefile does not bring much. The library is not optional: it may or may not be required along libbfd for disassembling instructions, but in any case it is necessary to build feature.o or even libbpf, on which bpftool depends. If we remove the feature test, we lose the nicely formatted error message, but we get a compiler error about "zlib.h: No such file or directory", which is equally informative. Let's get rid of the test. Suggested-by: Andrii Nakryiko Signed-off-by: Quentin Monnet Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220705200456.285943-1-quentin@isovalent.com tools/bpf/bpftool/Makefile | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit a71da24ce1f8f6844c6378ae394b5c4b31ff5725 Author: Julia Lawall Date: Sat May 21 13:10:27 2022 +0200 dmaengine: ste_dma40: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20220521111145.81697-17-Julia.Lawall@inria.fr Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d7c11af47aa3b065dc0bbc96d42baf411ce09e0 Author: Julia Lawall Date: Sat May 21 13:10:30 2022 +0200 dmaengine: jz4780: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/20220521111145.81697-20-Julia.Lawall@inria.fr Signed-off-by: Vinod Koul drivers/dma/dma-jz4780.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0e02b8cfb0559dbaf0e1a79e4944d5ad0d914f2 Author: Julia Lawall Date: Sat May 21 13:10:56 2022 +0200 dmaengine: s3c24xx: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220521111145.81697-46-Julia.Lawall@inria.fr Signed-off-by: Vinod Koul drivers/dma/s3c24xx-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a4e9307cd3782f8e805fac970b9a240ab3078d6 Author: Julia Lawall Date: Sat May 21 13:11:12 2022 +0200 dmaengine: qcom: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-62-Julia.Lawall@inria.fr Signed-off-by: Vinod Koul include/linux/dma/qcom-gpi-dma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2749416f7529993afc8dedaf7e3ce5e5114d40c1 Author: Julia Lawall Date: Sat May 21 13:10:17 2022 +0200 dmaengine: owl: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-7-Julia.Lawall@inria.fr Signed-off-by: Vinod Koul drivers/dma/owl-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd39ae75b66260f235b05e48246fe63e9ea1a0e5 Author: Julia Lawall Date: Sat May 21 13:11:11 2022 +0200 dmaengine: mediatek-cqdma: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-61-Julia.Lawall@inria.fr Signed-off-by: Vinod Koul drivers/dma/mediatek/mtk-cqdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4c4182f3c55648d427060da55ad6aa55269651a Author: Julia Lawall Date: Sat May 21 13:11:01 2022 +0200 dmaengine: fix typos in comments Spelling mistakes (triple letters) in comments. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-51-Julia.Lawall@inria.fr Signed-off-by: Vinod Koul drivers/dma/amba-pl08x.c | 2 +- drivers/dma/mv_xor_v2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8f64c2a4c8b59fe6dfc29add92c55947b1299da3 Author: Tang Bin Date: Thu May 19 21:08:55 2022 +0800 dmaengine: xilinx_dpdma: Omit superfluous error message in xilinx_dpdma_probe() In the function xilinx_dpdma_probe(), when get irq failed, the function platform_get_irq() logs an error message, so remove redundant message here. Signed-off-by: Tang Bin Link: https://lore.kernel.org/r/20220519130855.7664-1-tangbin@cmss.chinamobile.com Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_dpdma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e4adceef5b0e75f000754254047af59c65295ac4 Merge: f6b9f6d57e5c 2655144fb49b Author: Andrii Nakryiko Date: Tue Jul 5 21:20:42 2022 -0700 Merge branch 'cleanup the legacy probe_event on failed scenario' Chuang Wang says: ==================== A potential scenario, when an error is returned after add_uprobe_event_legacy() in perf_event_uprobe_open_legacy(), or bpf_program__attach_perf_event_opts() in bpf_program__attach_uprobe_opts() returns an error, the uprobe_event that was previously created is not cleaned. At the same time, the legacy kprobe_event also have similar problems. With these patches, whenever an error is returned, it ensures that the created kprobe_event/uprobe_event is cleaned. V1 -> v3: - add detail commits - call remove_kprobe_event_legacy() on failed bpf_program__attach_perf_event_opts() v3 -> v4: - cleanup the legacy kprobe_event on failed add/attach_event ==================== Signed-off-by: Andrii Nakryiko commit 2655144fb49bae26eae038c6d056f824a7db2726 Author: Chuang Wang Date: Wed Jun 29 23:18:47 2022 +0800 libbpf: Cleanup the legacy uprobe_event on failed add/attach_event() A potential scenario, when an error is returned after add_uprobe_event_legacy() in perf_event_uprobe_open_legacy(), or bpf_program__attach_perf_event_opts() in bpf_program__attach_uprobe_opts() returns an error, the uprobe_event that was previously created is not cleaned. So, with this patch, when an error is returned, fix this by adding remove_uprobe_event_legacy() Signed-off-by: Chuang Wang Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220629151848.65587-4-nashuiliang@gmail.com tools/lib/bpf/libbpf.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 5666fc997ccb93859ea1d4437936c64c6d75c060 Author: Chuang Wang Date: Wed Jun 29 23:18:46 2022 +0800 libbpf: Fix wrong variable used in perf_event_uprobe_open_legacy() Use "type" as opposed to "err" in pr_warn() after determine_uprobe_perf_type_legacy() returns an error. Signed-off-by: Chuang Wang Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220629151848.65587-3-nashuiliang@gmail.com tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8094029330a2f03fb406ecff80671cf27ce28d42 Author: Chuang Wang Date: Wed Jun 29 23:18:45 2022 +0800 libbpf: Cleanup the legacy kprobe_event on failed add/attach_event() Before the 0bc11ed5ab60 commit ("kprobes: Allow kprobes coexist with livepatch"), in a scenario where livepatch and kprobe coexist on the same function entry, the creation of kprobe_event using add_kprobe_event_legacy() will be successful, at the same time as a trace event (e.g. /debugfs/tracing/events/kprobe/XXX) will exist, but perf_event_open() will return an error because both livepatch and kprobe use FTRACE_OPS_FL_IPMODIFY. As follows: 1) add a livepatch $ insmod livepatch-XXX.ko 2) add a kprobe using tracefs API (i.e. add_kprobe_event_legacy) $ echo 'p:mykprobe XXX' > /sys/kernel/debug/tracing/kprobe_events 3) enable this kprobe (i.e. sys_perf_event_open) This will return an error, -EBUSY. On Andrii Nakryiko's comment, few error paths in bpf_program__attach_kprobe_opts() that should need to call remove_kprobe_event_legacy(). With this patch, whenever an error is returned after add_kprobe_event_legacy() or bpf_program__attach_perf_event_opts(), this ensures that the created kprobe_event is cleaned. Signed-off-by: Chuang Wang Signed-off-by: Jingren Zhou Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220629151848.65587-2-nashuiliang@gmail.com tools/lib/bpf/libbpf.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit f6b9f6d57e5c765b5ff358af1d7749df5e30334c Merge: cfb5a2dbf141 950b34778722 Author: Andrii Nakryiko Date: Tue Jul 5 20:24:13 2022 -0700 Merge branch 'Introduce type match support' Daniel Müller says: ==================== This patch set proposes the addition of a new way for performing type queries to BPF. It introduces the "type matches" relation, similar to what is already present with "type exists" (in the form of bpf_core_type_exists). "type exists" performs fairly superficial checking, mostly concerned with whether a type exists in the kernel and is of the same kind (enum/struct/...). Notably, compatibility checks for members of composite types is lacking. The newly introduced "type matches" (bpf_core_type_matches) fills this gap in that it performs stricter checks: compatibility of members and existence of similarly named enum variants is checked as well. E.g., given these definitions: struct task_struct___og { int pid; int tgid; }; struct task_struct___foo { int foo; } 'task_struct___og' would "match" the kernel type 'task_struct', because the members match up, while 'task_struct___foo' would not match, because the kernel's 'task_struct' has no member named 'foo'. More precisely, the "type match" relation is defined as follows (copied from source): - modifiers and typedefs are stripped (and, hence, effectively ignored) - generally speaking types need to be of same kind (struct vs. struct, union vs. union, etc.) - exceptions are struct/union behind a pointer which could also match a forward declaration of a struct or union, respectively, and enum vs. enum64 (see below) Then, depending on type: - integers: - match if size and signedness match - arrays & pointers: - target types are recursively matched - structs & unions: - local members need to exist in target with the same name - for each member we recursively check match unless it is already behind a pointer, in which case we only check matching names and compatible kind - enums: - local variants have to have a match in target by symbolic name (but not numeric value) - size has to match (but enum may match enum64 and vice versa) - function pointers: - number and position of arguments in local type has to match target - for each argument and the return value we recursively check match Enabling this feature requires a new relocation to be made known to the compiler. This is being taken care of for LLVM as part of https://reviews.llvm.org/D126838. If applied, among other things, usage of this functionality could have helped flag issues such as the one discussed here https://lore.kernel.org/all/93a20759600c05b6d9e4359a1517c88e06b44834.camel@fb.com/ earlier. Suggested-by: Andrii Nakryiko --- Changelog: v2 -> v3: - renamed btfgen_mark_types_match - covered BTF_KIND_RESTRICT in type match marking logic - used bpf_core_names_match in more places - reworked "behind pointer" logic - added test using live task_struct v1 -> v2: - deduplicated and moved core algorithm into relo_core.c - adjusted bpf_core_names_match to get btf_type passed in - removed some length equality checks before strncmp usage - correctly use kflag from targ_t instead of local_t - added comment for meaning of kflag w/ FWD kind - __u32 -> u32 - handle BTF_KIND_FWD properly in bpftool marking logic - rebased ==================== Signed-off-by: Andrii Nakryiko commit 950b347787224e62f59c099e3e3f3f6ecc720d61 Author: Daniel Müller Date: Tue Jun 28 16:01:27 2022 +0000 selftests/bpf: Add type match test against kernel's task_struct This change extends the existing core_reloc/kernel test to include a type match check of a local task_struct against the kernel's definition -- which we assume to succeed. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220628160127.607834-11-deso@posteo.net tools/testing/selftests/bpf/prog_tests/core_reloc.c | 1 + tools/testing/selftests/bpf/progs/core_reloc_types.h | 1 + .../selftests/bpf/progs/test_core_reloc_kernel.c | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+) commit 537905c4b68fe3a32c4925122fe792eb2f594b73 Author: Daniel Müller Date: Tue Jun 28 16:01:26 2022 +0000 selftests/bpf: Add nested type to type based tests This change extends the type based tests with another struct type (in addition to a_struct) to check relocations against: a_complex_struct. This type is nested more deeply to provide additional coverage of certain paths in the type match logic. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220628160127.607834-10-deso@posteo.net .../testing/selftests/bpf/prog_tests/core_reloc.c | 4 ++ .../testing/selftests/bpf/progs/core_reloc_types.h | 62 +++++++++++++++------- .../bpf/progs/test_core_reloc_type_based.c | 12 +++++ 3 files changed, 58 insertions(+), 20 deletions(-) commit bed56a6dd4cbf76ff757679a9333f9d3a72ed7ec Author: Daniel Müller Date: Tue Jun 28 16:01:25 2022 +0000 selftests/bpf: Add test checking more characteristics This change adds another type-based self-test that specifically aims to test some more characteristics of the TYPE_MATCH logic. Specifically, it covers a few more potential differences between types, such as different orders, enum variant values, and integer signedness. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220628160127.607834-9-deso@posteo.net .../testing/selftests/bpf/prog_tests/core_reloc.c | 37 ++++++++++++++++ .../bpf/progs/btf__core_reloc_type_based___diff.c | 3 ++ .../testing/selftests/bpf/progs/core_reloc_types.h | 51 ++++++++++++++++++++++ 3 files changed, 91 insertions(+) commit 67d8ed4295258cb17e2bed7ed5ada92526a643f5 Author: Daniel Müller Date: Tue Jun 28 16:01:24 2022 +0000 selftests/bpf: Add type-match checks to type-based tests Now that we have type-match logic in both libbpf and the kernel, this change adjusts the existing BPF self tests to check this functionality. Specifically, we extend the existing type-based tests to check the previously introduced bpf_core_type_matches macro. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220628160127.607834-8-deso@posteo.net .../testing/selftests/bpf/prog_tests/core_reloc.c | 31 +++++++++++++++++++-- .../testing/selftests/bpf/progs/core_reloc_types.h | 14 +++++++++- .../bpf/progs/test_core_reloc_type_based.c | 32 +++++++++++++++++++++- 3 files changed, 73 insertions(+), 4 deletions(-) commit b8a195dc299391bc171c47971974ec6d5ea6fb14 Author: Andrii Nakryiko Date: Tue Jul 5 20:56:48 2022 -0700 libbpf: add bpf_core_type_matches() helper macro This patch finalizes support for the proposed type match relation in libbpf by adding bpf_core_type_matches() macro which emits TYPE_MATCH relocation. Clang support for this relocation was added in [0]. [0] https://reviews.llvm.org/D126838 Signed-off-by: Daniel Müller ¬ Signed-off-by: Andrii Nakryiko ¬ Link: https://lore.kernel.org/bpf/20220628160127.607834-7-deso@posteo.net¬ tools/lib/bpf/bpf_core_read.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ec6209c8d42f815bc3bef10934637ca92114cd1b Author: Daniel Müller Date: Tue Jun 28 16:01:21 2022 +0000 bpf, libbpf: Add type match support This patch adds support for the proposed type match relation to relo_core where it is shared between userspace and kernel. It plumbs through both kernel-side and libbpf-side support. The matching relation is defined as follows (copy from source): - modifiers and typedefs are stripped (and, hence, effectively ignored) - generally speaking types need to be of same kind (struct vs. struct, union vs. union, etc.) - exceptions are struct/union behind a pointer which could also match a forward declaration of a struct or union, respectively, and enum vs. enum64 (see below) Then, depending on type: - integers: - match if size and signedness match - arrays & pointers: - target types are recursively matched - structs & unions: - local members need to exist in target with the same name - for each member we recursively check match unless it is already behind a pointer, in which case we only check matching names and compatible kind - enums: - local variants have to have a match in target by symbolic name (but not numeric value) - size has to match (but enum may match enum64 and vice versa) - function pointers: - number and position of arguments in local type has to match target - for each argument and the return value we recursively check match Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220628160127.607834-5-deso@posteo.net kernel/bpf/btf.c | 9 ++ tools/lib/bpf/libbpf.c | 6 + tools/lib/bpf/relo_core.c | 279 +++++++++++++++++++++++++++++++++++++++++++++- tools/lib/bpf/relo_core.h | 4 + 4 files changed, 294 insertions(+), 4 deletions(-) commit 633e7ceb2cbbae9b2f5ca69106b0de65728c5988 Author: Daniel Müller Date: Tue Jun 28 16:01:19 2022 +0000 bpftool: Honor BPF_CORE_TYPE_MATCHES relocation bpftool needs to know about the newly introduced BPF_CORE_TYPE_MATCHES relocation for its 'gen min_core_btf' command to work properly in the present of this relocation. Specifically, we need to make sure to mark types and fields so that they are present in the minimized BTF for "type match" checks to work out. However, contrary to the existing btfgen_record_field_relo, we need to rely on the BTF -- and not the spec -- to find fields. With this change we handle this new variant correctly. The functionality will be tested with follow on changes to BPF selftests, which already run against a minimized BTF created with bpftool. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20220628160127.607834-3-deso@posteo.net tools/bpf/bpftool/gen.c | 108 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) commit 3c660a5d86f4c01cf641bfea004a49f5860a5bed Author: Daniel Müller Date: Tue Jun 28 16:01:18 2022 +0000 bpf: Introduce TYPE_MATCH related constants/macros In order to provide type match support we require a new type of relocation which, in turn, requires toolchain support. Recent LLVM/Clang versions support a new value for the last argument to the __builtin_preserve_type_info builtin, for example. With this change we introduce the necessary constants into relevant header files, mirroring what the compiler may support. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220628160127.607834-2-deso@posteo.net include/uapi/linux/bpf.h | 1 + tools/include/uapi/linux/bpf.h | 1 + tools/lib/bpf/bpf_core_read.h | 1 + 3 files changed, 3 insertions(+) commit 7e40e16e38ba58858b0056ef9ea34459fc80dc52 Author: Zhengchao Shao Date: Mon Jul 4 20:34:48 2022 +0800 net: asix: change the type of asix_set_sw/hw_mii to static The functions of asix_set_sw/hw_mii are not called in other files, so change them to static. Signed-off-by: Zhengchao Shao Link: https://lore.kernel.org/r/20220704123448.128980-1-shaozhengchao@huawei.com Signed-off-by: Jakub Kicinski drivers/net/usb/asix.h | 3 --- drivers/net/usb/asix_common.c | 40 +++++++++++++++++++++------------------- 2 files changed, 21 insertions(+), 22 deletions(-) commit 10ed11ab6399813eb652137db9c378433c28a95c Author: Vladimir Oltean Date: Mon Jul 4 22:02:41 2022 +0300 net: dsa: felix: build as module when tc-taprio is module felix_vsc9959.c calls taprio_offload_get() and taprio_offload_free(), symbols exported by net/sched/sch_taprio.c. As such, we must disallow building the Felix driver as built-in when the symbol exported by tc-taprio isn't present in the kernel image. Fixes: 1c9017e44af2 ("net: dsa: felix: keep reference on entire tc-taprio config") Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220704190241.1288847-2-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski drivers/net/dsa/ocelot/Kconfig | 1 + 1 file changed, 1 insertion(+) commit d7be266adbfd3aca6965ea6a0c36b2c3d8fc9fc8 Author: Vladimir Oltean Date: Mon Jul 4 22:02:40 2022 +0300 net: sched: provide shim definitions for taprio_offload_{get,free} All callers of taprio_offload_get() and taprio_offload_free() prior to the blamed commit are conditionally compiled based on CONFIG_NET_SCH_TAPRIO. felix_vsc9959.c is different; it provides vsc9959_qos_port_tas_set() even when taprio is compiled out. Provide shim definitions for the functions exported by taprio so that felix_vsc9959.c is able to compile. vsc9959_qos_port_tas_set() in that case is dead code anyway, and ocelot_port->taprio remains NULL, which is fine for the rest of the logic. Fixes: 1c9017e44af2 ("net: dsa: felix: keep reference on entire tc-taprio config") Reported-by: Colin Foster Signed-off-by: Vladimir Oltean Tested-by: Colin Foster Acked-by: Vinicius Costa Gomes Link: https://lore.kernel.org/r/20220704190241.1288847-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski include/net/pkt_sched.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 7659806aded90bbfdc8f31fc858bc661da5a2840 Author: Serge Semin Date: Fri Jun 24 17:34:28 2022 +0300 PCI: dwc-plat: Drop dw_plat_pcie_of_match[] forward declaration The dw_plat_pcie_of_match[] forward declaration was required when dw_plat_pcie_probe() called of_match_device(). 5c204204cf24 ("PCI: designware-plat: Prefer of_device_get_match_data()") replaced that with of_device_get_match_data(), which no longer needs the declaration. Drop the unnecessary forward declaration. [bhelgaas: commit log] Link: https://lore.kernel.org/r/20220624143428.8334-19-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring drivers/pci/controller/dwc/pcie-designware-plat.c | 2 -- 1 file changed, 2 deletions(-) commit 03139e66a5981b3bddf43206cb7dbdce8115072d Author: Serge Semin Date: Fri Jun 24 17:34:27 2022 +0300 PCI: dwc-plat: Drop unused regmap pointer 1d906b22076e ("PCI: dwc: Add support for EP mode") added the struct dw_plat_pcie regmap pointer, but it has never been used. Remove it. [bhelgaas: commit log] Link: https://lore.kernel.org/r/20220624143428.8334-18-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring drivers/pci/controller/dwc/pcie-designware-plat.c | 2 -- 1 file changed, 2 deletions(-) commit 43e6f2d94d91511ce0bdde411ca501cd829eab68 Author: Serge Semin Date: Fri Jun 24 17:34:26 2022 +0300 PCI: dwc-plat: Simplify dw_plat_pcie_probe() return values Save the return value in "ret" for all three cases (DW_PCIE_RC_TYPE, DW_PCIE_EP_TYPE, default) handled by dw_plat_pcie_probe() and return from a single place. [bhelgaas: commit log] Link: https://lore.kernel.org/r/20220624143428.8334-17-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring drivers/pci/controller/dwc/pcie-designware-plat.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 60b3c27fb9b92b8b55cd8bdcc444c3f7cb556652 Author: Serge Semin Date: Fri Jun 24 17:34:25 2022 +0300 PCI: dwc: Rename struct pcie_port to dw_pcie_rp All of the DW PCIe core driver entities except the pcie_port struct have names with the "dw_" prefix to distinguish local and common PCIe name spaces, and endpoint-related entities have an "_ep" suffix. Rename struct pcie_port to dw_pcie_rp to make it more consistent with other names. [bhelgaas: commit log] Link: https://lore.kernel.org/r/20220624143428.8334-16-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Neil Armstrong Reviewed-by: Manivannan Sadhasivam Acked-by: Jesper Nilsson drivers/pci/controller/dwc/pci-dra7xx.c | 12 ++++---- drivers/pci/controller/dwc/pci-exynos.c | 6 ++-- drivers/pci/controller/dwc/pci-imx6.c | 6 ++-- drivers/pci/controller/dwc/pci-keystone.c | 20 ++++++------- drivers/pci/controller/dwc/pci-layerscape.c | 2 +- drivers/pci/controller/dwc/pci-meson.c | 2 +- drivers/pci/controller/dwc/pcie-al.c | 6 ++-- drivers/pci/controller/dwc/pcie-armada8k.c | 4 +-- drivers/pci/controller/dwc/pcie-artpec6.c | 4 +-- drivers/pci/controller/dwc/pcie-designware-host.c | 36 +++++++++++------------ drivers/pci/controller/dwc/pcie-designware-plat.c | 2 +- drivers/pci/controller/dwc/pcie-designware.h | 30 +++++++++---------- drivers/pci/controller/dwc/pcie-dw-rockchip.c | 4 +-- drivers/pci/controller/dwc/pcie-fu740.c | 2 +- drivers/pci/controller/dwc/pcie-histb.c | 10 +++---- drivers/pci/controller/dwc/pcie-intel-gw.c | 6 ++-- drivers/pci/controller/dwc/pcie-keembay.c | 4 +-- drivers/pci/controller/dwc/pcie-kirin.c | 2 +- drivers/pci/controller/dwc/pcie-qcom.c | 4 +-- drivers/pci/controller/dwc/pcie-spear13xx.c | 6 ++-- drivers/pci/controller/dwc/pcie-tegra194.c | 22 +++++++------- drivers/pci/controller/dwc/pcie-uniphier.c | 10 +++---- drivers/pci/controller/dwc/pcie-visconti.c | 6 ++-- 23 files changed, 103 insertions(+), 103 deletions(-) commit d6bdbcd8bfe134566035d3eabed915ed27a04320 Author: Serge Semin Date: Fri Jun 24 17:34:24 2022 +0300 PCI: dwc: Move io_cfg_atu_shared to struct pcie_port The io_cfg_atu_shared flag is set if there is an outbound iATU window used for both config space accesses and IO port transfers. Since the flag semantic is purely Root Port specific, it's not used in either the DW PCIe common code or in the DW PCIe Endpoint driver. Move it to the struct pcie_port and rename to cfg0_io_shared. [bhelgaas: commit log] Link: https://lore.kernel.org/r/20220624143428.8334-15-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware-host.c | 6 +++--- drivers/pci/controller/dwc/pcie-designware.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit a37beefbde8802a4eab2545fee1b1780a03f2aa0 Author: Serge Semin Date: Fri Jun 24 17:34:23 2022 +0300 PCI: dwc: Add start_link/stop_link inlines Factor out this pattern: if (!pci->ops || !pci->ops->start_link) return -EINVAL; return pci->ops->start_link(pci); into a new dw_pcie_start_link() wrapper and do the same for the stop_link() method. Note that dw_pcie_ep_start() previously returned -EINVAL if there was no platform start_link() method, which didn't make much sense since that is not an error. It will now return 0 in that case. As a side-effect, drop the empty start_link() and dummy dw_pcie_ops instances from the generic DW PCIe and Layerscape EP platform drivers. [bhelgaas: commit log] Link: https://lore.kernel.org/r/20220624143428.8334-14-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pci-layerscape-ep.c | 12 ------------ drivers/pci/controller/dwc/pcie-designware-ep.c | 8 ++------ drivers/pci/controller/dwc/pcie-designware-host.c | 10 ++++------ drivers/pci/controller/dwc/pcie-designware-plat.c | 10 ---------- drivers/pci/controller/dwc/pcie-designware.h | 14 ++++++++++++++ 5 files changed, 20 insertions(+), 34 deletions(-) commit bd42f3108b41687f579dbb6705e7a2711a063485 Author: Serge Semin Date: Fri Jun 24 17:34:22 2022 +0300 PCI: dwc: Reuse local pointer to the resource data dw_pcie_host_init() has two instances of the resource structure pointers used in unrelated places. It's pointless to have two different local storages for them since the corresponding code is small and having resource-specific names doesn't make it more readable. Convert these parts of the function to use a common pointer to the resource structure instance. Link: https://lore.kernel.org/r/20220624143428.8334-13-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware-host.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 60a4352f648c08902599cc06be12f9d1b475f31e Author: Serge Semin Date: Fri Jun 24 17:34:21 2022 +0300 PCI: dwc: Organize local variable usage There are several places in the common DW PCIe code with incoherent local variable usage: a variable is defined and initialized with a structure field, but the structure pointer is dereferenced to access that field anyway; the local variable is defined and initialized but either used just once or not used afterwards in the main part of the subsequent method. It mainly concerns the pcie_port.dev field. Fix that in the relevant places. Link: https://lore.kernel.org/r/20220624143428.8334-12-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware-host.c | 10 +++++----- drivers/pci/controller/dwc/pcie-designware.c | 8 +++----- 2 files changed, 8 insertions(+), 10 deletions(-) commit 3869e9a3ba385d5d0798076ab9cfa7eb91262e50 Author: Serge Semin Date: Fri Jun 24 17:34:20 2022 +0300 PCI: dwc: Convert dw_pcie_link_up() to use dw_pcie_readl_dbi() While the rest of the generic DWC PCIe code uses the dedicated IO-mem accessors, the dw_pcie_link_up() method for some unobvious reason directly calls readl() to get PortLogic.DEBUG1 register content. Since the way the DBI bus is accessed can be platform-specific, use dw_pcie_readl_dbi() instead so dw_pcie_link_up() is slightly more generic. Link: https://lore.kernel.org/r/20220624143428.8334-11-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring drivers/pci/controller/dwc/pcie-designware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbc7c4de33e4cf2904f4bf562631b513a4df40bb Author: Serge Semin Date: Fri Jun 24 17:34:19 2022 +0300 PCI: dwc: Simplify unrolled iATU detection The unrolled version of the internal ATU has been available since the DWC PCIe v4.80a IP core, but it may not be enabled. Per [1], if unrolled ATU is enabled, the PCIE_ATU_VIEWPORT does not exist and reads as 0xffffffff; while if unrolled ATU is disabled, PCIE_ATU_VIEWPORT will contain some zeros. Simplify dw_pcie_iatu_unroll_enabled() by checking the value of PCIE_ATU_VIEWPORT. [1] DesignWare Cores, PCI Express Controller, Register Desciptions, v.4.90a, December 2016, p.855 [bhelgaas: commit log] Link: https://lore.kernel.org/r/20220624143428.8334-10-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring drivers/pci/controller/dwc/pcie-designware.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 671733184364012461c18643da8188c992b040ea Author: Serge Semin Date: Fri Jun 24 17:34:18 2022 +0300 PCI: dwc: Add newlines to log messages Add newlines to log messages that are missing them. [bhelgaas: commit log] Link: https://lore.kernel.org/r/20220624143428.8334-9-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring drivers/pci/controller/dwc/pcie-designware-host.c | 2 +- drivers/pci/controller/dwc/pcie-designware.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 816f505f44eef5797ab23b02c9215ccbd2881885 Author: Serge Semin Date: Fri Jun 24 17:34:17 2022 +0300 PCI: dwc: Add braces to multi-line if-else statements Add braces around single-line if-else statements when the opposite case requires them. Link: https://lore.kernel.org/r/20220624143428.8334-8-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring drivers/pci/controller/dwc/pcie-designware-ep.c | 4 ++-- drivers/pci/controller/dwc/pcie-designware.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) commit ec7b952f453ce7eabe7e1bea584626934d44f668 Author: Serge Semin Date: Fri Jun 24 17:34:16 2022 +0300 PCI: dwc: Always enable CDM check if "snps,enable-cdm-check" exists If the "snps,enable-cdm-check" property exists, we should enable the CDM check. But previously dw_pcie_setup() could exit before doing so if the "num-lanes" property was absent or invalid. Move the CDM enable earlier so we do it regardless of whether "num-lanes" is present. [bhelgaas: commit log] Fixes: 07f123def73e ("PCI: dwc: Add support to enable CDM register check") Link: https://lore.kernel.org/r/20220624143428.8334-7-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Vidya Sagar Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 8161e9626b50892eaedbd8070ecb1586ecedb109 Author: Serge Semin Date: Fri Jun 24 17:34:15 2022 +0300 PCI: dwc: Deallocate EPC memory on dw_pcie_ep_init() errors If dw_pcie_ep_init() fails to perform any action after the EPC memory is initialized and the MSI memory region is allocated, the latter parts won't be undone thus causing a memory leak. Add a cleanup-on-error path to fix these leaks. [bhelgaas: commit log] Fixes: 2fd0c9d966cc ("PCI: designware-ep: Pre-allocate memory for MSI in dw_pcie_ep_init") Link: https://lore.kernel.org/r/20220624143428.8334-6-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware-ep.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 777e7c3ab73036105e6fc4a67ed950179dbffbab Author: Serge Semin Date: Fri Jun 24 17:34:14 2022 +0300 PCI: dwc: Set INCREASE_REGION_SIZE flag based on limit address We program the 64-bit ATU limit address (in PCIE_ATU_LIMIT/ PCIE_ATU_UPPER_LIMIT or PCIE_ATU_UNR_LOWER_LIMIT/PCIE_ATU_UNR_UPPER_LIMIT), but in addition, the PCIE_ATU_INCREASE_REGION_SIZE bit must be set if the upper 32 bits of the limit address differ from the upper 32 bits of the base address (see [1,2]). 5b4cf0f65324 ("PCI: dwc: Add upper limit address for outbound iATU") set PCIE_ATU_INCREASE_REGION_SIZE, but only when the *size* was greater than 4GB. It did not set it when a smaller region crossed a 4GB boundary, e.g., [mem 0x0_f0000000-0x1_0fffffff]. Set PCIE_ATU_INCREASE_REGION_SIZE whenever PCIE_ATU_UPPER_LIMIT is greater than PCIE_ATU_UPPER_BASE. [1] DesignWare Cores PCI Express Controller Databook - DWC PCIe Root Port, v5.40a, March 2019, fig.3-36, p.175 [2] DesignWare Cores PCI Express Controller Databook - DWC PCIe Root Port, v5.40a, March 2019, fig.3-37, p.176 [bhelgaas: commit log] Fixes: 5b4cf0f65324 ("PCI: dwc: Add upper limit address for outbound iATU") Link: https://lore.kernel.org/r/20220624143428.8334-5-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring drivers/pci/controller/dwc/pcie-designware.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit d60a2e281e9de2b2f67343b2e39417ca0f4fd54e Author: Serge Semin Date: Fri Jun 24 17:34:13 2022 +0300 PCI: dwc: Disable outbound windows only for controllers using iATU Some DWC-based controllers (e.g., pcie-al.c and pci-keystone.c, identified by the fact that they override the default dw_child_pcie_ops) use their own address translation approach instead of the DWC internal ATU (iATU). For those controllers, skip disabling the iATU outbound windows. [bhelgaas: commit log, update multiple window comment] Fixes: 458ad06c4cdd ("PCI: dwc: Ensure all outbound ATU windows are reset") Link: https://lore.kernel.org/r/20220624143428.8334-4-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring drivers/pci/controller/dwc/pcie-designware-host.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit d1cf738f2b65a5640234e1da90a68d3523fbed83 Author: Serge Semin Date: Fri Jun 24 17:34:12 2022 +0300 PCI: dwc: Add unroll iATU space support to dw_pcie_disable_atu() dw_pcie_disable_atu() was introduced by f8aed6ec624f ("PCI: dwc: designware: Add EP mode support") and supported only the viewport version of the iATU CSRs. DW PCIe IP cores v4.80a and newer also support unrolled iATU/eDMA space. Callers of dw_pcie_disable_atu(), including pci_epc_ops.clear_bar(), pci_epc_ops.unmap_addr(), and dw_pcie_setup_rc(), don't work correctly when it is enabled. Add dw_pcie_disable_atu() support for controllers with unrolled iATU CSRs enabled. [bhelgaas: commit log] Fixes: f8aed6ec624f ("PCI: dwc: designware: Add EP mode support") Link: https://lore.kernel.org/r/20220624143428.8334-3-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring drivers/pci/controller/dwc/pcie-designware.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 113fa857b74c947137d845e7e635afcf6a59c43a Author: Serge Semin Date: Fri Jun 24 17:34:11 2022 +0300 PCI: dwc: Stop link on host_init errors and de-initialization It's logically correct to undo everything that was done when an error is discovered or in the corresponding cleanup counterpart. Otherwise the host controller will be left in an undetermined state. Since the link is set up in the host_init method, deactivate it there in the cleanup-on-error block and stop the link in the antagonistic routine - dw_pcie_host_deinit(). Link deactivation is platform-specific and should be implemented in dw_pcie_ops.stop_link(). Fixes: 886a9c134755 ("PCI: dwc: Move link handling into common code") Link: https://lore.kernel.org/r/20220624143428.8334-2-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring drivers/pci/controller/dwc/pcie-designware-host.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit f05643a0f60bf67c09a5276b81258b845b0c73b4 Author: Jakub Kicinski Date: Tue Jul 5 15:22:28 2022 -0700 eth: remove neterion/vxge The last meaningful change to this driver was made by Jon in 2011. As much as we'd like to believe that this is because the code is perfect the chances are nobody is using this hardware. Because of the size of this driver there is a nontrivial maintenance cost to keeping this code around, in the last 2 years we're averaging more than 1 change a month. Some of which require nontrivial review effort, see commit 877fe9d49b74 ("Revert "drivers/net/ethernet/neterion/vxge: Fix a use-after-free bug in vxge-main.c"") for example. Let's try to remove this driver. In general, IMHO, we need to establish a clear path for shedding dead code. It will be hard to unless we have some experience trying to delete stuff. Link: https://lore.kernel.org/r/20220701044234.706229-1-kuba@kernel.org Signed-off-by: Jakub Kicinski .../networking/device_drivers/ethernet/index.rst | 1 - .../device_drivers/ethernet/neterion/vxge.rst | 115 - MAINTAINERS | 3 +- drivers/net/ethernet/neterion/Kconfig | 24 - drivers/net/ethernet/neterion/Makefile | 1 - drivers/net/ethernet/neterion/vxge/Makefile | 8 - drivers/net/ethernet/neterion/vxge/vxge-config.c | 5099 -------------------- drivers/net/ethernet/neterion/vxge/vxge-config.h | 2086 -------- drivers/net/ethernet/neterion/vxge/vxge-ethtool.c | 1154 ----- drivers/net/ethernet/neterion/vxge/vxge-ethtool.h | 48 - drivers/net/ethernet/neterion/vxge/vxge-main.c | 4808 ------------------ drivers/net/ethernet/neterion/vxge/vxge-main.h | 516 -- drivers/net/ethernet/neterion/vxge/vxge-reg.h | 4636 ------------------ drivers/net/ethernet/neterion/vxge/vxge-traffic.c | 2428 ---------- drivers/net/ethernet/neterion/vxge/vxge-traffic.h | 2290 --------- drivers/net/ethernet/neterion/vxge/vxge-version.h | 49 - 16 files changed, 1 insertion(+), 23265 deletions(-) commit 3359619a6ea5bb53c5b259c83791a1e14c5aa125 Author: Rob Herring Date: Fri Jul 1 16:22:40 2022 -0600 dt-bindings: net: dsa: mediatek,mt7530: Add missing 'reg' property The 'reg' property is missing from the mediatek,mt7530 schema which results in the following warning once 'unevaluatedProperties' is fixed: Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.example.dtb: switch@0: Unevaluated properties are not allowed ('reg' was unexpected) Fixes: e0dda3119741 ("dt-bindings: net: dsa: convert binding for mediatek switches") Signed-off-by: Rob Herring Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20220701222240.1706272-1-robh@kernel.org Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 6cd514e58f12b211d638dbf6f791fa18d854f09c Author: Kai-Heng Feng Date: Tue May 17 12:37:38 2022 +0800 PCI: Clear PCI_STATUS when setting up device We are seeing Master Abort bit is set on Intel I350 ethernet device and its root port right after boot, probably happened during BIOS phase: 00:06.0 PCI bridge [0604]: Intel Corporation Device [8086:464d] (rev 05) (prog-if 00 [Normal decode]) Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 3 +++ 1 file changed, 3 insertions(+) commit 1dcaa3b462265f688613163a1562a65ee53a3311 Author: Paul E. McKenney Date: Thu Jun 16 09:30:37 2022 -0700 context_tracking: Use arch_atomic_read() in __ct_state for KASAN Context tracking's __ct_state() function can be invoked from noinstr state where RCU is not watching. This means that its use of atomic_read() causes KASAN to invoke the non-noinstr __kasan_check_read() function from the noinstr function __ct_state(). This is problematic because someone tracing the __kasan_check_read() function could get a nasty surprise because of RCU not watching. This commit therefore replaces the __ct_state() function's use of atomic_read() with arch_atomic_read(), which KASAN does not attempt to add instrumention to. Reported-by: kernel test robot Signed-off-by: Paul E. McKenney Cc: Frederic Weisbecker Cc: Marco Elver Reviewed-by: Marco Elver include/linux/context_tracking_state.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08ab707dfc83d6ab7829c1c0f39b0d4530fa42a8 Author: Frederic Weisbecker Date: Wed Jun 8 16:40:37 2022 +0200 MAINTAINERS: Add Paul as context tracking maintainer Since most of the bits have been imported from kernel/rcu/tree.c and now that the context tracking code is tightly linked to RCU, add Paul as a context tracking maintainer. Also update the context tracking file header accordingly. Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne MAINTAINERS | 1 + kernel/context_tracking.c | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) commit 171476775d32a40bfebf83250136c19b2e842672 Author: Frederic Weisbecker Date: Wed Jun 8 16:40:35 2022 +0200 context_tracking: Convert state to atomic_t Context tracking's state and dynticks counter are going to be merged in a single field so that both updates can happen atomically and at the same time. Prepare for that with converting the state into an atomic_t. [ paulmck: Apply kernel test robot feedback. ] Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne include/linux/context_tracking.h | 32 +++----- include/linux/context_tracking_state.h | 57 ++++++++++--- kernel/context_tracking.c | 143 ++++++++++++++++++++++----------- kernel/rcu/tree.c | 13 ++- kernel/rcu/tree_stall.h | 4 +- 5 files changed, 158 insertions(+), 91 deletions(-) commit c33ef43a359001415032665dfcd433979c462b71 Author: Frederic Weisbecker Date: Wed Jun 8 16:40:34 2022 +0200 rcu/context-tracking: Remove unused and/or unecessary middle functions Some eqs functions are now only used internally by context tracking, so their public declarations can be removed. Also middle functions such as rcu_user_*() and rcu_idle_*() which now directly call to rcu_eqs_enter() and rcu_eqs_exit() can be wiped out as well. Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Documentation/RCU/stallwarn.rst | 2 +- include/linux/hardirq.h | 8 ---- include/linux/rcupdate.h | 8 ---- include/linux/rcutiny.h | 2 - include/linux/rcutree.h | 2 - kernel/context_tracking.c | 98 ++++++++++++----------------------------- 6 files changed, 28 insertions(+), 92 deletions(-) commit 172114552701b85d5c3b1a089a73ee85d0d7786b Author: Frederic Weisbecker Date: Wed Jun 8 16:40:33 2022 +0200 rcu/context-tracking: Move RCU-dynticks internal functions to context_tracking Move the core RCU eqs/dynticks functions to context tracking so that we can later merge all that code within context tracking. Acked-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne include/linux/context_tracking.h | 20 +++ include/linux/rcutree.h | 3 + kernel/context_tracking.c | 336 +++++++++++++++++++++++++++++++++++++++ kernel/rcu/tree.c | 324 +------------------------------------ kernel/rcu/tree.h | 5 - kernel/rcu/tree_plugin.h | 38 +---- 6 files changed, 364 insertions(+), 362 deletions(-) commit 564506495ca96a6e66d077d3d5b9f02d4b9b0f45 Author: Frederic Weisbecker Date: Wed Jun 8 16:40:32 2022 +0200 rcu/context-tracking: Move deferred nocb resched to context tracking To prepare for migrating the RCU eqs accounting code to context tracking, split the last-resort deferred nocb resched from rcu_user_enter() and move it into a separate call from context tracking. Acked-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne include/linux/rcupdate.h | 6 ++++++ kernel/context_tracking.c | 8 ++++++++ kernel/rcu/tree.c | 15 ++------------- 3 files changed, 16 insertions(+), 13 deletions(-) commit 95e04f48ec0a634e2f221081f5fa1a904755f326 Author: Frederic Weisbecker Date: Wed Jun 8 16:40:31 2022 +0200 rcu/context_tracking: Move dynticks_nmi_nesting to context tracking The RCU eqs tracking is going to be performed by the context tracking subsystem. The related nesting counters thus need to be moved to the context tracking structure. Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne include/linux/context_tracking_state.h | 16 ++++++++++++ kernel/context_tracking.c | 1 + kernel/rcu/rcu.h | 4 --- kernel/rcu/tree.c | 48 +++++++++++++++------------------- kernel/rcu/tree.h | 1 - kernel/rcu/tree_stall.h | 2 +- 6 files changed, 39 insertions(+), 33 deletions(-) commit 904e600e60f46f92eb4bcfb95788b1fedf7e8237 Author: Frederic Weisbecker Date: Wed Jun 8 16:40:30 2022 +0200 rcu/context_tracking: Move dynticks_nesting to context tracking The RCU eqs tracking is going to be performed by the context tracking subsystem. The related nesting counters thus need to be moved to the context tracking structure. Acked-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne include/linux/context_tracking_state.h | 13 +++++++++++++ kernel/context_tracking.c | 1 + kernel/rcu/tree.c | 31 ++++++++++++++++--------------- kernel/rcu/tree.h | 1 - kernel/rcu/tree_stall.h | 2 +- 5 files changed, 31 insertions(+), 17 deletions(-) commit 62e2412df4b90ae6706ce1f1a9649b789b2e44ef Author: Frederic Weisbecker Date: Wed Jun 8 16:40:29 2022 +0200 rcu/context_tracking: Move dynticks counter to context tracking In order to prepare for merging RCU dynticks counter into the context tracking state, move the rcu_data's dynticks field to the context tracking structure. It will later be mixed within the context tracking state itself. [ paulmck: Move enum ctx_state into global scope. ] Acked-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne include/linux/context_tracking_state.h | 45 ++++++++++++++++++++++----- kernel/context_tracking.c | 10 ++++-- kernel/rcu/tree.c | 56 ++++++++++++++++------------------ kernel/rcu/tree.h | 1 - kernel/rcu/tree_exp.h | 2 +- kernel/rcu/tree_stall.h | 4 +-- 6 files changed, 75 insertions(+), 43 deletions(-) commit 3864caafe7c66f01b188ffccb6a4215f3bf56292 Author: Frederic Weisbecker Date: Wed Jun 8 16:40:28 2022 +0200 rcu/context-tracking: Remove rcu_irq_enter/exit() Now rcu_irq_enter/exit() is an unnecessary middle call between ct_irq_enter/exit() and nmi_irq_enter/exit(). Take this opportunity to remove the former functions and move the comments above them to the new entrypoints. Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne include/linux/rcutiny.h | 4 --- include/linux/rcutree.h | 4 --- kernel/context_tracking.c | 71 +++++++++++++++++++++++++++++++++++++--- kernel/rcu/tree.c | 83 ----------------------------------------------- 4 files changed, 67 insertions(+), 95 deletions(-) commit 493c1822825f00025d6754ec0632990a27edc6f8 Author: Frederic Weisbecker Date: Wed Jun 8 16:40:27 2022 +0200 context_tracking: Take NMI eqs entrypoints over RCU The RCU dynticks counter is going to be merged into the context tracking subsystem. Prepare with moving the NMI extended quiescent states entrypoints to context tracking. For now those are dumb redirection to existing RCU calls. Acked-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Documentation/RCU/Design/Requirements/Requirements.rst | 2 +- arch/Kconfig | 2 +- arch/arm64/kernel/entry-common.c | 8 ++++---- include/linux/context_tracking_irq.h | 4 ++++ include/linux/hardirq.h | 4 ++-- kernel/context_tracking.c | 10 ++++++++++ kernel/entry/common.c | 4 ++-- kernel/extable.c | 4 ++-- kernel/trace/trace.c | 2 +- 9 files changed, 27 insertions(+), 13 deletions(-) commit 6f0e6c1598b1a3d19fc30db86b6e26d6f881b43d Author: Frederic Weisbecker Date: Wed Jun 8 16:40:26 2022 +0200 context_tracking: Take IRQ eqs entrypoints over RCU The RCU dynticks counter is going to be merged into the context tracking subsystem. Prepare with moving the IRQ extended quiescent states entrypoints to context tracking. For now those are dumb redirection to existing RCU calls. [ paulmck: Apply Stephen Rothwell feedback from -next. ] [ paulmck: Apply Nathan Chancellor feedback. ] Acked-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne .../RCU/Design/Requirements/Requirements.rst | 10 ++++----- Documentation/RCU/stallwarn.rst | 4 ++-- arch/Kconfig | 2 +- arch/arm64/kernel/entry-common.c | 6 +++--- arch/x86/mm/fault.c | 2 +- drivers/cpuidle/cpuidle-psci.c | 8 ++++---- drivers/cpuidle/cpuidle-riscv-sbi.c | 8 ++++---- include/linux/context_tracking_irq.h | 17 +++++++++++++++ include/linux/context_tracking_state.h | 1 + include/linux/entry-common.h | 10 ++++----- include/linux/rcupdate.h | 5 +++-- include/linux/tracepoint.h | 4 ++-- kernel/cfi.c | 4 ++-- kernel/context_tracking.c | 24 ++++++++++++++++++++-- kernel/cpu_pm.c | 8 ++++---- kernel/entry/common.c | 12 +++++------ kernel/softirq.c | 4 ++-- kernel/trace/trace.c | 6 +++--- 18 files changed, 87 insertions(+), 48 deletions(-) commit e67198cc05b8ecbb7b8e2d8ef9fb5c8d26821873 Author: Frederic Weisbecker Date: Wed Jun 8 16:40:25 2022 +0200 context_tracking: Take idle eqs entrypoints over RCU The RCU dynticks counter is going to be merged into the context tracking subsystem. Start with moving the idle extended quiescent states entrypoints to context tracking. For now those are dumb redirections to existing RCU calls. [ paulmck: Apply kernel test robot feedback. ] Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Documentation/RCU/stallwarn.rst | 4 ++-- arch/arm/mach-imx/cpuidle-imx6q.c | 5 +++-- drivers/acpi/processor_idle.c | 5 +++-- drivers/cpuidle/cpuidle.c | 9 +++++---- include/linux/context_tracking.h | 8 ++++++++ include/linux/rcupdate.h | 2 +- kernel/context_tracking.c | 15 +++++++++++++++ kernel/locking/lockdep.c | 2 +- kernel/rcu/Kconfig | 2 ++ kernel/rcu/tree.c | 2 -- kernel/rcu/update.c | 2 +- kernel/sched/idle.c | 10 +++++----- kernel/sched/sched.h | 1 + kernel/time/Kconfig | 6 ++++++ 14 files changed, 53 insertions(+), 20 deletions(-) commit fc25fd602b1e101a45650475a8d2f00d7bb8e971 Author: Alex Deucher Date: Tue Jun 21 10:10:37 2022 -0400 drm/amdgpu/display: disable prefer_shadow for generic fb helpers Seems to break hibernation. Disable for now until we can root cause it. Fixes: 087451f372bf ("drm/amdgpu: use generic fb helpers instead of setting up AMD own's.") Bug: https://bugzilla.kernel.org/show_bug.cgi?id=216119 Acked-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 3 ++- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 3 ++- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) commit 89e2b4373ae5215f5c5d1b7726549950daa77018 Author: Alex Deucher Date: Tue Jun 21 10:04:55 2022 -0400 drm/amdgpu: keep fbdev buffers pinned during suspend Was dropped when we converted to the generic helpers. Fixes: 087451f372bf ("drm/amdgpu: use generic fb helpers instead of setting up AMD own's.") Acked-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit 2e02ceb73ff87193618a21c2fe165632f52b9b9d Author: Maíra Canal Date: Thu Jun 30 18:53:16 2022 -0300 drm/amd/display: Remove unused variables from vba_vars_st Some variables from the struct vba_vars_st are not referenced in any other place on the codebase. As they are not used, this commit removes those variables. Signed-off-by: Maíra Canal Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dml/display_mode_vba.c | 1 - .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 33 ---------------------- 2 files changed, 34 deletions(-) commit fd3bc691fc7b4e553f49bc79f86b515ce2638141 Author: Maíra Canal Date: Thu Jun 30 17:17:41 2022 -0300 drm/amd/display: Remove duplicate code across dcn30 and dcn31 The function CalculateBytePerPixelAnd256BBlockSizes was defined four times: on display_mode_vba_30.c, display_rq_dlg_calc_30.c, display_mode_vba_31.c and display_rq_dlg_calc_31.c. In order to avoid code duplication, the CalculateBytePerPixelAnd256BBlockSizes is defined on display_mode_vba_30.h and used across dcn30 and dcn31. Signed-off-by: Maíra Canal Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn30/display_mode_vba_30.c | 21 +--- .../amd/display/dc/dml/dcn30/display_mode_vba_30.h | 11 +++ .../display/dc/dml/dcn30/display_rq_dlg_calc_30.c | 93 +----------------- .../amd/display/dc/dml/dcn31/display_mode_vba_31.c | 106 +-------------------- .../display/dc/dml/dcn31/display_rq_dlg_calc_31.c | 91 +----------------- 5 files changed, 23 insertions(+), 299 deletions(-) commit 61e419f651a65ebe01658b46bfc317896cac0eda Author: Yang Li Date: Fri Jul 1 17:19:14 2022 +0800 drm/amd/display: clean up some inconsistent indenting Eliminate the follow smatch warning: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3151 commit_planes_for_stream() warn: inconsistent indenting Signed-off-by: Yang Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7e4745a09426b3fe63e9fbea3190e0f8500820a4 Author: Al Viro Date: Tue Jul 5 12:22:46 2022 -0400 switch try_to_unlazy_next() to __legitimize_mnt() The tricky case (__legitimize_mnt() failing after having grabbed a reference) can be trivially dealt with by leaving nd->path.mnt non-NULL, for terminate_walk() to drop it. legitimize_mnt() becomes static after that. Signed-off-by: Al Viro fs/mount.h | 1 - fs/namei.c | 9 +++++++-- fs/namespace.c | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) commit eb08accdd8d966e4027f8ba52f43faffa3e6dcbd Author: Maíra Canal Date: Thu Jun 30 15:50:05 2022 -0300 drm/amd/display: Remove return value of Calculate256BBlockSizes The function Calculate256BBlockSizes always returns true, regardless of the parameters. As any file checks the return of the function, this commit changes the return value to void. Signed-off-by: Maíra Canal Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 3 +-- drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit edadd6fc28b24dd5806dafc4b38633494ff423e6 Author: André Almeida Date: Mon Jul 4 10:45:32 2022 -0300 drm/amdpgu/debugfs: Simplify some exit paths To avoid code repetition, unify the function exit path when possible. No functional changes. Acked-by: Christian König Signed-off-by: André Almeida Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 107 +++++++++++----------------- 1 file changed, 42 insertions(+), 65 deletions(-) commit c3c483391bb23e9bb8d8a51e54fefcf508b1cce3 Author: Jianglei Nie Date: Tue Jul 5 21:46:03 2022 +0800 drm/amdgpu/mes: Fix an error handling path in amdgpu_mes_self_test() if amdgpu_mes_ctx_alloc_meta_data() fails, we should call amdgpu_vm_fini() to handle amdgpu_vm_init(). Add a new lable before amdgpu_vm_init() and goto this lable when amdgpu_mes_ctx_alloc_meta_data() fails. Signed-off-by: Jianglei Nie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3e211f23aa1e1a3223edb64c4bc25cae28a1e3ae Author: Alvin Lee Date: Fri Jun 3 15:29:27 2022 -0400 drm/amd/display: Maintain old audio programming sequence [Description] Program audio DTO before wall dto for audio Reviewed-by: Martin Leung Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit a00a3cef25a969bef8cce011c34b76071756dd05 Author: Aric Cyr Date: Sun Jun 19 22:29:19 2022 -0400 drm/amd/display: 3.2.192 This DC patchset brings improvements in multiple areas. In summary, we highlight: - Program ACP-related registers - Fixes for DMUB, DPIA, PSR, and others - Improvements in the pipe split - Add SubVP code - Add basic setup for FAMS support - Improve BB capabilities Acked-by: Rodrigo Siqueira Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 068ab0cdc1a97628f7007b568adadc2a1fb08384 Author: Hamza Mahfooz Date: Wed Jun 22 16:07:33 2022 -0400 drm/amd/display: rename hdmi_frl_pcon_support hdmi_frl_pcon_support has been the source of confusion. So, rename it to dp_hdmi21_pcon_support. Signed-off-by: Hamza Mahfooz Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) commit 81990c3c07905af1e316f048a1ff456b2be224ad Author: Hamza Mahfooz Date: Tue Jun 21 15:32:31 2022 -0400 drm/amd/display: enable PCON SST support for newer ASICs Generic PCON SST support already exists and works for newer ASICs. So, enable it by default. Acked-by: Rodrigo Siqueira Signed-off-by: Hamza Mahfooz Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 1 + 4 files changed, 4 insertions(+) commit 427a60c1c30e1c0e9d0800a63df51985aaf3a26a Author: Chris Park Date: Fri Feb 4 17:03:24 2022 -0500 drm/amd/display: OVT Update on InfoFrame and Mode Management [Why] Integrate OVT timing from DM to DC logic to update info frame and mode management to report the resolution to the OS. [How] Reflect RID and Frame Rate to AVI InfoFrame Version 5. Define new Timing Standard for OVT timing. Reviewed-by: Charlene Liu Acked-by: Alan Liu Signed-off-by: Chris Park Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 11 +++++++++++ drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 ++ drivers/gpu/drm/amd/display/dc/dc_types.h | 2 ++ drivers/gpu/drm/amd/display/include/set_mode_types.h | 8 ++++++-- 4 files changed, 21 insertions(+), 2 deletions(-) commit 7acd7ab0297a37e44df928378f53d4260b25fd2b Author: Jack Xiao Date: Wed Jun 22 12:45:24 2022 +0800 drm/amdgpu/mes11: fix to unmap legacy queue MES fw updated to support unmapping legacy gfx/compute queue. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 9 ++++----- drivers/gpu/drm/amd/include/mes_v11_api_def.h | 6 +++++- 2 files changed, 9 insertions(+), 6 deletions(-) commit b278b738c3be4f383796d09ef8fb6e49fee2091f Author: Michael Strauss Date: Mon Aug 16 16:15:36 2021 -0400 drm/amd/display: Initialize lt_settings on instantiation [WHY] lt_settings' pointers remain uninitialized but nonzero if display fails to light up with no DPCD/EDID info populated, leading to a hang on access Reviewed-by: Nicholas Kazlauskas Acked-by: Alan Liu Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b779044c81754f094ee88afe431d839e3a74aa0 Author: Jimmy Kizito Date: Mon Jul 19 15:45:10 2021 -0400 drm/amd/display: Fix uninitialized variable. [Why] Uninitialized variable causes diag compilation build failure. [How] - Ensure that variable in question is always initialized before being used. - The variable in question is the USB4 DP training pattern. In case an unsupported training pattern has been requested, update status accordingly and abort current link training attempt. Reviewed-by: Meenakshikumar Somasundaram Acked-by: Alan Liu Signed-off-by: Jimmy Kizito Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c | 49 ++++++++++++---------- 1 file changed, 28 insertions(+), 21 deletions(-) commit 09de5cd2c170b19e04e37439a712da52a0535015 Author: Harry Wentland Date: Fri Nov 22 10:12:51 2019 -0500 drm/amd/display: Move all linux includes into OS types Move all linux includes into OS types. Acked-by: Alan Liu Signed-off-by: Harry Wentland Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/vector.c | 2 -- drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 2 -- drivers/gpu/drm/amd/display/dc/core/dc.c | 3 --- drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 2 -- drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 2 -- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 -- drivers/gpu/drm/amd/display/dc/core/dc_sink.c | 2 -- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 3 --- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 2 -- drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 2 -- drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 3 --- drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 2 -- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 3 --- drivers/gpu/drm/amd/display/dc/dce/dce_i2c_sw.c | 2 -- drivers/gpu/drm/amd/display/dc/dce/dce_ipp.c | 2 -- drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 3 --- drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 2 -- drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 2 -- drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 2 -- drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c | 3 --- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 -- drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c | 2 -- drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 2 -- drivers/gpu/drm/amd/display/dc/dce110/dce110_transform_v.c | 2 -- drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.c | 3 --- drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 2 -- drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | 2 -- drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 2 -- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c | 2 -- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 2 -- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c | 3 --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c | 2 -- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 -- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c | 2 -- drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c | 2 -- drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c | 2 -- drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c | 3 --- drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 2 -- drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c | 2 -- drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c | 2 -- drivers/gpu/drm/amd/display/dc/irq/dce120/irq_service_dce120.c | 2 -- drivers/gpu/drm/amd/display/dc/irq/dce80/irq_service_dce80.c | 2 -- drivers/gpu/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c | 2 -- drivers/gpu/drm/amd/display/dc/irq/irq_service.c | 2 -- drivers/gpu/drm/amd/display/dc/os_types.h | 5 ++++- drivers/gpu/drm/amd/display/dc/virtual/virtual_link_encoder.c | 2 -- drivers/gpu/drm/amd/display/dc/virtual/virtual_stream_encoder.c | 2 -- drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 3 --- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 2 -- 49 files changed, 4 insertions(+), 107 deletions(-) commit c1127df9515ca781940927deffc5ae657ed73a5f Author: Eric Bernstein Date: Mon Jul 30 17:43:23 2018 -0400 drm/amd/display: Fix null timing generator resource [Why] For some customer blending transition cases, the available pipe for second stream is a pipe index that is greater than the number of timing generators, which can cause a problem in acquire_first_free_pipe since it assumes same index for pipe and timing generator [How] Added logic to use last timing generator index if the pipe index is greater than number of timing generators. Acked-by: Alan Liu Signed-off-by: Eric Bernstein Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8bc3812d0b33c214c365fff5dfb65397ad6aaf19 Author: Duncan Ma Date: Mon Jun 20 14:21:12 2022 -0400 drm/amd/display: Add flag to modify MST delay [Why] Some panels may require more MST delay on discovery [How] Add panel patch and debug mst delay flag Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Signed-off-by: Duncan Ma Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 3 ++- drivers/gpu/drm/amd/display/dc/dc_types.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 51c6546c30ea6efe9aa819015bd61ffefc910944 Author: Al Viro Date: Mon Jul 4 11:20:51 2022 -0400 follow_dotdot{,_rcu}(): change calling conventions Instead of returning NULL when we are in root, just make it return the current position (and set *seqp and *inodep accordingly). That collapses the calls of step_into() in handle_dots() Signed-off-by: Al Viro fs/namei.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 9a714dcf1039d1142a1c3ad81db09d2706230e00 Author: Jimmy Kizito Date: Mon Jun 13 10:19:18 2022 -0400 drm/amd/display: Disable TBT3 DSC work around by default. [Why] Some TBT3 docks have DPOAs which report USB4 capability and are expected to support USB4 DPOA features such as FEC/DSC. [How] By default, do not override FEC/DSC capabilities reported by TBT3 docks. Reviewed-by: Meenakshikumar Somasundaram Acked-by: Rodrigo Siqueira Signed-off-by: Jimmy Kizito Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 82ef069805a352bacb22fd4322b746edf809603c Author: Al Viro Date: Tue Jul 5 11:23:58 2022 -0400 namei: get rid of pointless unlikely(read_seqcount_retry(...)) read_seqcount_retry() et.al. are inlined and there's enough annotations for compiler to figure out that those are unlikely to return non-zero. Signed-off-by: Al Viro fs/namei.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit e9a7d236eaaeb1cdfe20e583e2e1899b26d7469c Author: Rodrigo Siqueira Date: Thu Jun 16 16:48:22 2022 -0400 drm/amd/display: Fix refresh rate issue on Club 3D Recently we introduced a patch for fixing an MST issue, but it caused a regression on Club 3D since we could not set a refresh rate higher than 60Hz. This commit fixes this issue by adding a proper check after validating the stream. Fixes: f04d275d94e164 ("drm/amd/display: add mst port output bw check") Reviewed-by: Hersen Wu Acked-by: Rodrigo Siqueira Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f64f3a72835fc63069a87c2811b61c9a73033c72 Author: Meenakshikumar Somasundaram Date: Thu Jun 16 23:16:31 2022 -0400 drm/amd/display: Remove configuration option for dpia hpd delay [Why] DC debug option to configure dpia hpd processing delay is not required. [How] Remove dc debug option for dpia hpd delay and also added log for querying dpia hpd state. Reviewed-by: Mustapha Ghaddar Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Meenakshikumar Somasundaram Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c | 7 +++++++ drivers/gpu/drm/amd/display/dc/dc.h | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) commit 20aac6c60981f5bfacd66661d090d907bf1482f0 Author: Al Viro Date: Mon Jul 4 17:26:29 2022 -0400 __follow_mount_rcu(): verify that mount_lock remains unchanged Validate mount_lock seqcount as soon as we cross into mount in RCU mode. Sure, ->mnt_root is pinned and will remain so until we do rcu_read_unlock() anyway, and we will eventually fail to unlazy if the mount_lock had been touched, but we might run into a hard error (e.g. -ENOENT) before trying to unlazy. And it's possible to end up with RCU pathwalk racing with rename() and umount() in a way that would fail with -ENOENT while non-RCU pathwalk would've succeeded with any timings. Once upon a time we hadn't needed that, but analysis had been subtle, brittle and went out of window as soon as RENAME_EXCHANGE had been added. It's narrow, hard to hit and won't get you anything other than stray -ENOENT that could be arranged in much easier way with the same priveleges, but it's a bug all the same. Cc: stable@kernel.org X-sky-is-falling: unlikely Fixes: da1ce0670c14 "vfs: add cross-rename" Signed-off-by: Al Viro fs/namei.c | 2 ++ 1 file changed, 2 insertions(+) commit 4984dcdc1f78529a0c699c1931971b7bc5e32a04 Author: Chris Park Date: Fri Jun 17 13:21:16 2022 -0400 drm/amd/display: Indicate stream change on ODM change [Why] With ODM policy 2 to 1, there exists a new use case scenario where stream content is unchanged, but ODM may be used. When this happens, the stream needs to be committed with a new pipe setting. This did not happen due to stream change detection logic not accounting for ODM. [How] Set ODM flag in stream and commit stream when change in ODM has been detected due to policy change. Reviewed-by: Samson Tam Acked-by: Rodrigo Siqueira Signed-off-by: Chris Park Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 +++ drivers/gpu/drm/amd/display/dc/dc_stream.h | 2 ++ 2 files changed, 5 insertions(+) commit 8a077d9caa3a274de36ee2fe7b608041f5690343 Author: Dmytro Laktyushkin Date: Fri Jun 10 17:44:41 2022 -0400 drm/amd/display: disable otg toggle w/a on boot This w/a has a bad interaction with seamless boot toggling an active stream. Most panels recover, however some fail leading to display corruption. Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Signed-off-by: Dmytro Laktyushkin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 22676bc500c27d987a0b42cbe162aebf783f1c38 Author: Fangzhi Zuo Date: Thu Jun 16 15:09:01 2022 -0400 drm/amd/display: Fix dmub soft hang for PSR 1 [Why] Unexpected change of aux hw mapping causes dmub soft hang when initiate aux transation at wrong aux channel. ddc_channel stands for hw dp aux index which is from vbios, but link_index is pure software concept for link count depending on which link is probed first. They are not interchangeable. dmub aux transaction could pass if happens eDP link_index gets the same value as vbios ddc_channel, e.g., ddc_channel = 1, link_index = 1 if they gets different, e.g., ddc_channel = 2, link_index = 0, overwrite ddc_channel with link_index will have wrong ddc channel being used for aux transaction in dmub PSR, cause aux transaction soft hang. [How] ddc_channel mapping to each link is determined by vbios and further parsed in dc. Such info. should not be touched in any kind, otherwise the mapping is screwed up leading to aux transaction timeout. Reviewed-by: Aurabindo Jayamohanan Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1daf740137275aa56858ea1cd194eb3c1f6da5a0 Author: Nicholas Kazlauskas Date: Mon Jun 13 15:11:04 2022 -0400 drm/amd/display: Guard against NULL link encoder in log hw state [Why & How] Check lenc is not NULL since dynamic link encoder assignment could end up assigning a NULL link encoder. Reviewed-by: Michael Strauss Acked-by: Rodrigo Siqueira Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c7ea6f824345ffbb3b4ef880c7c56170365bc1e Author: Nicholas Kazlauskas Date: Thu Jun 9 13:33:33 2022 -0400 drm/amd/display: Remove incorrect ASSERT check for link_enc [Why] It's possible that we don't have a link encoder assignment if the context is NULL but we're calling dc_add_stream_to_ctx from DM directly. Link encoder assignment will happen later after global validation runs with fast_validate = false. [How] Remove the ASSERTION. We already guard against NULL link_enc. Reviewed-by: Michael Strauss Acked-by: Rodrigo Siqueira Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bc19909f19fdc8253d720d11c948935786fbfa08 Author: Nicholas Kazlauskas Date: Thu Jun 9 13:30:42 2022 -0400 drm/amd/display: Guard against ddc_pin being NULL for AUX [Why] In the case where we don't support DMUB aux but we have DPIA links in the configuration we might try to message AUX using the legacy path - where DDC pin is NULL. This causes a NULL pointer dereference. [How] Guard against NULL DDC pin, return a failure for aux engine acquire. Reviewed-by: Michael Strauss Acked-by: Rodrigo Siqueira Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7c50a3e99a2eab5b3a9f273ea9e40ce919a3a3e2 Author: Alan Liu Date: Tue Jun 14 22:29:41 2022 +0800 drm/amd/display: Program ACP related register - Setup the shift and mask of HDMI_ACP_SEND register - Program the register in hdmi stream encoder - Also update ACP register in azalia configuration Reviewed-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alan Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 11 +++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 3 ++- drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h | 14 ++++++-------- .../gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c | 3 ++- .../gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.h | 16 ++-------------- .../gpu/drm/amd/display/dc/dcn20/dcn20_stream_encoder.c | 1 - .../drm/amd/display/dc/dcn30/dcn30_dio_stream_encoder.c | 4 +++- .../drm/amd/display/dc/dcn30/dcn30_dio_stream_encoder.h | 6 ++---- drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 1 + .../gpu/drm/amd/include/asic_reg/dce/dce_6_0_sh_mask.h | 2 ++ 10 files changed, 31 insertions(+), 30 deletions(-) commit b3859b16d27fa58f99ad6221ea427dac7d751e70 Author: Evgenii Krasnikov Date: Tue May 17 14:21:24 2022 -0400 drm/amd/display: add an option to skip wait for HPD when powering on eDP panel [HOW/WHY] Add an option to skip edp_wait_for_hpd_ready when necessary Reviewed-by: Jayendran Ramani Acked-by: Rodrigo Siqueira Signed-off-by: Evgenii Krasnikov Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 5 +++-- drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) commit fff7eb56b376cadc58af14df286009086cc4d80f Author: Alvin Lee Date: Thu Jun 16 10:58:08 2022 -0400 drm/amd/display: Don't set dram clock change requirement for SubVP [Description] In general cases we want to keep the dram clock change requirement (we prefer configs that support MCLK switch). Only override to false for SubVP. Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h | 1 + drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 0147064588253b9c07766bd6292a6159475c2790 Author: Jun Lei Date: Thu May 26 16:58:25 2022 -0400 drm/amd/display: Extend soc BB capabilitiy [why] Some parts are consuming dangerously close to maximum number of states supported when updating the BB (i.e. 8). [how] Change maximum stages from 9 to 20. Acked-by: Rodrigo Siqueira Signed-off-by: Jun Lei Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 508 ++++++++++++++++----- .../drm/amd/display/dc/dcn321/dcn321_resource.c | 503 +++++++++++++++----- 2 files changed, 784 insertions(+), 227 deletions(-) commit 6366b00346c0fe8ae95d91eed3dd2d04f77729e7 Author: Jimmy Kizito Date: Wed Oct 20 12:27:06 2021 -0400 drm/amd/display: Maintain consistent mode of operation during encoder assignment [Why] While applying a state to hardware, there is a transition period where the back-end is reset using the old state; then enabled using the new state. Generally, the link encoder configuration module queries stream-to-encoder assignments in either the new or old state based on a mode variable. During the transition there is a need to query both states, however toggling this mode variable can lead to incorrect programming of encoders. [How] - Add new function to explicity query stream-to-encoder assignment in the current state rather than intermittently switch the mode of operation of the link encoder assignment module. - Add additional checks for encoder assignment defects. - Explicitly reset the mode of operation if application of state to hardware ends prematurely. Acked-by: Rodrigo Siqueira Signed-off-by: Jimmy Kizito Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 5 +++- .../gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c | 32 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 7 ++--- drivers/gpu/drm/amd/display/dc/inc/link_enc_cfg.h | 5 ++++ 4 files changed, 44 insertions(+), 5 deletions(-) commit e73b386e75586f28b9b58641938ae0feb340bca0 Author: Martin Leung Date: Fri Feb 19 18:04:42 2021 -0500 drm/amd/display: guard for virtual calling destroy_link_encoders [Why]: On power down, virtual dal may try to delete link_encoders by referencing uninitialized res_pool. [How]: Added guard against empty res_pool. Acked-by: Rodrigo Siqueira Signed-off-by: Martin Leung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 82a562ab5f0a918ef905c29c759b4f0c788754d3 Author: Dmytro Laktyushkin Date: Mon Oct 7 15:39:25 2019 -0400 drm/amd/display: disable timing sync b/w odm halves Fix for a bug where we would try to timing sync 2 odm halves. Acked-by: Rodrigo Siqueira Signed-off-by: Dmytro Laktyushkin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 97ca308925a50aa80711ccfaf814fa3898374862 Author: Rodrigo Siqueira Date: Mon Jun 20 16:37:07 2022 -0400 drm/amd/display: Add minimal pipe split transition state [WHY?] When adding/removing a plane to some configurations, unsupported pipe programming can occur when moving to a new plane. Such cases include pipe split on multi-display, with MPO, and/or ODM. [HOW?] Add a safe transistion state that minimizes pipe usage before programming new configuration. When adding a plane, the current state has the least pipes required so it is applied without splitting. This must be applied prior to updating the plane_state for seamless transition. When removing a plane, the new state has the least pieps required so it is applied without splitting. Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 277 +++++++++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc_stream.h | 18 ++ 2 files changed, 295 insertions(+) commit a5eeb70de411ef8b1cf5d97806ed6769b84be872 Author: Rodrigo Siqueira Date: Fri Jun 17 14:09:13 2022 -0400 drm/amd/display: Add SubVP control lock Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 48e03843f99857a561f25fb8e583c9a7dee5b81f Author: Nicholas Kazlauskas Date: Tue Jan 25 12:04:34 2022 -0500 drm/amd/display: Fix stream->link_enc unassigned during stream removal [Why] Found when running igt@kms_atomic. Userspace attempts to do a TEST_COMMIT when 0 streams which calls dc_remove_stream_from_ctx. This in turn calls link_enc_unassign which ends up modifying stream->link = NULL directly, causing the global link_enc to be removed preventing further link activity and future link validation from passing. [How] We take care of link_enc unassignment at the start of link_enc_cfg_link_encs_assign so this call is no longer necessary. Fixes global state from being modified while unlocked. Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 --- 1 file changed, 3 deletions(-) commit 00fa7f031dd4b885175da390e24cb02f6a45977e Author: Rodrigo Siqueira Date: Thu Jun 16 10:15:22 2022 -0400 drm/amd/display: Add basic infrastructure for enabling FAMS We want to enable Firmware Assisted Memory (FAMS) Switching, but first, we need to add the required code infrastructure in DC before allowing it in amdgpu_dm. Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 8 + drivers/gpu/drm/amd/display/dc/dc.h | 10 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 87 +++++++++++ drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 4 + drivers/gpu/drm/amd/display/dc/dc_types.h | 2 + drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 22 ++- .../gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 170 +++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 6 + .../gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c | 2 + drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 25 ++- 10 files changed, 328 insertions(+), 8 deletions(-) commit bbb6e5ae7ccfed7be06b5e8f99602100d4251d5f Author: Alvin Lee Date: Tue Apr 19 11:22:17 2022 -0400 drm/amd/display: Make OPTC3 function accessible to other DCN [Why] Newer DCN should use optc3 [How] Declare optc3 vmin/vmax function in header. Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.c | 5 +++++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_optc.c | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) commit 7e053bab30e3a97bb681cec207a87413a024fc22 Author: Eric Bernstein Date: Thu Feb 10 19:19:22 2022 -0500 drm/amd/display: Update gpuvm_max_page_table_levels IP param After some experimental tests, we noticed that we need to set gpuvm_max_page_table_levels to '4' to meet the hardware requirements. Signed-off-by: Eric Bernstein Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 15360d7fc35b6b0f46240659a129c9255345a41d Author: Chris Park Date: Wed May 25 23:22:11 2022 -0400 drm/amd/display: Switch to correct DTO on HDMI [Why] For Pixel Rate control, when on HDMI, HDMI DTO should be selected instead of DP DTO. [How] Pass HDMI parameter for HDMI stream, and select correct DTO. Signed-off-by: Chris Park Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c | 4 ++++ 2 files changed, 6 insertions(+) commit 740ccea3d36732346387ce882c50a7e4c3599316 Author: Alvin Lee Date: Wed May 4 11:20:53 2022 -0400 drm/amd/display: Change DET policy for MPO cases For MPO we want to allocate less than maximum DET for MPO pipes because we need enogh buffer to move DET back to other pipes when removing an MPO plane. Also update regular DET allocation to use DET override (DCN32 has an internal policy which driver does not want to use) Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 34 +++++++++++++--------- .../gpu/drm/amd/display/dc/dml/display_mode_vba.c | 2 +- 2 files changed, 22 insertions(+), 14 deletions(-) commit 2b2b3a751b29a09942a15bc0c4fed940b7ce1857 Author: Rodrigo Siqueira Date: Tue Jun 14 16:38:01 2022 -0400 drm/amd/display: Use two pixel per container for k1/k2 div Currently, we check if pixel_encoding is equal to PIXEL_ENCODING_YCBCR422 to get the k1/k2 div parameters. This commit changes this logic slightly by checking if two pixels per container are used. Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 88ef4c5bb36bf60b317b74d8652c7766c9272a7e Author: Samson Tam Date: Thu May 26 21:12:23 2022 -0400 drm/amd/display: Apply ODM 2:1 policy for single display configuration [Why] Most of the time, a single display uses the ODM combine. When using multi-display, we use ODM combine only if it is necessary. These cases are not flexible enough for us, and we can improve them to take advantage of our hardware. We want to have more control over the ODM policy. [How] This commit add a new debug flag named enable_single_display_2to1_odm_policy to control the ODM policy and another flag named enable_dp_dig_pixel_rate_div_policy to fine control the ODM combine. This is possible by adding a new "pipe.dest" parameter that can be set to ODM 2:1 combined if we use a single display. For dynamic ODM combine, when using DP-DIG, DCN applies K2=2 settings for ODM combine. Note that this feature affects the following registers: - timing.pix_clk_100khz -> DP_VID_M, DP_VID_N - requested_pix_clk_100hz -> DP_DTOn_PHASE - OTGn_PIXEL_RATE_DIVK2 - DP_PIXEL_PER_CYCLE_PROCESSING_MODE - DIG_FIFO_OUTPUT_PIXEL_MODE - DP_VID_N_MUL Acked-by: Rodrigo Siqueira Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 + .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 7 +++ .../display/dc/dcn32/dcn32_dio_stream_encoder.c | 4 +- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 58 ++++++++++++++++++++-- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.h | 5 ++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.c | 3 +- .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 6 +++ .../drm/amd/display/dc/dml/display_mode_structs.h | 1 + .../gpu/drm/amd/display/dc/dml/display_mode_vba.c | 3 +- .../drm/amd/display/dc/inc/hw_sequencer_private.h | 1 + 10 files changed, 83 insertions(+), 7 deletions(-) commit 64a30aaf0b0d9dcd52af526652937c1350a948dc Author: Eric Bernstein Date: Fri Apr 1 13:49:45 2022 -0400 drm/amd/display: Add function to set pixels per cycle Add function to set pixels per cycle in DIG stream encoder Acked-by: Rodrigo Siqueira Signed-off-by: Eric Bernstein Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.h | 1 + drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 5 ++--- .../drm/amd/display/dc/dcn32/dcn32_dio_stream_encoder.c | 4 ++-- .../drm/amd/display/dc/dcn32/dcn32_dio_stream_encoder.h | 1 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 17 +++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.h | 2 ++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.c | 1 + .../gpu/drm/amd/display/dc/inc/hw_sequencer_private.h | 1 + 8 files changed, 27 insertions(+), 5 deletions(-) commit 90f33674a0756a6f0907b8f6350cec3f7be4032c Author: Martin Leung Date: Fri May 13 17:40:42 2022 -0400 drm/amd/display: Prepare for new interfaces [WHY]: Lut pipeline will be hooked up differently in some asics need to add new interfaces and missing registers. [HOW]: Add missing registers and hook up programming from DPP for pre-blend lut. Acked-by: Rodrigo Siqueira Signed-off-by: Martin Leung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.h | 106 ++++++++- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 91 ++++++++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.h | 7 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.c | 5 +- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c | 236 ++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mpc.h | 117 +++++++++- .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 14 +- .../drm/amd/display/dc/dcn321/dcn321_resource.c | 16 +- 8 files changed, 564 insertions(+), 28 deletions(-) commit 85f4bc0c333ceed24cbc9f69a2a77fab1ae3d4d1 Author: Alvin Lee Date: Mon May 2 15:04:31 2022 -0400 drm/amd/display: Add SubVP required code This commit enables the SubVP feature. To achieve that, we need to: - Don't force p-state disallow on SubVP (can't block dummy p-state) - Send calculated watermark to DMCUB for SubVP - Adjust CAB mode message to PMFW - Add a proper locking sequence for SubVP - Various fixes to SubVP static analysis and determining SubVP config - Currently SubVP not supported with pipe split so merge all pipes before setting up SubVp Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Acked-by: Alan Liu Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/Makefile | 27 +- drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 6 + .../dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.c | 5 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 65 +++- drivers/gpu/drm/amd/display/dc/dc.h | 2 - drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 329 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc_stream.h | 4 - drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 39 ++- drivers/gpu/drm/amd/display/dc/dcn32/Makefile | 14 +- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 73 ++++- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.h | 7 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.c | 1 + .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 115 ++++--- .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.h | 20 +- .../amd/display/dc/dcn32/dcn32_resource_helpers.c | 260 ++++++++++++++++ .../drm/amd/display/dc/dml/display_mode_structs.h | 1 + drivers/gpu/drm/amd/display/dc/inc/core_types.h | 5 +- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 7 + drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 89 ++++++ .../drm/amd/display/dmub/inc/dmub_subvp_state.h | 183 ++++++++++++ 20 files changed, 1185 insertions(+), 67 deletions(-) commit e72f03f4bdc4f3a251343cf343bce28c28cbac2a Author: Rodrigo Siqueira Date: Tue Jun 21 13:30:54 2022 -0400 drm/amd/display: Add missing registers for ACP We are missing some ACP registers/mask value for some specific ASICs. This commit includes it to those ASICs that support it. Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_0_0_sh_mask.h | 2 ++ drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_0_1_sh_mask.h | 2 ++ drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_0_2_sh_mask.h | 2 ++ drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_0_3_sh_mask.h | 2 ++ drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_1_2_sh_mask.h | 2 ++ 5 files changed, 10 insertions(+) commit e0e146d5567317d6ba7d0169bed55d1d9ea05a61 Author: Stanley.Yang Date: Mon Jul 4 15:41:39 2022 +0800 drm/amdgpu: skip whole ras bad page framework on sriov It should not init whole ras bad page framework on sriov guest side due to it is handled on host side. Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26093ce14b75bb0c4f0088abf2e11c351abc18c3 Author: Stanley.Yang Date: Thu Jun 23 15:59:46 2022 +0800 drm/amdgpu: Only send ras feature for gfx block GFX is the only IP block that RAS TA needs to program the hardware when receiving enable_feature command. Changed from V1: remove amdgpu_ras_need_send_ras_feature inline function, use GFX RAS block check directly. Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 36 ++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit cbe07c982dbd206defa10ba539e046767179edb3 Author: Evan Quan Date: Wed Jun 29 19:33:05 2022 +0800 drm/amd/pm: update SMU 13.0.0 driver_if header And bump the version to 0x2A. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 3 ++- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 4bdb9d6501763e83bacbf26846754c567773a1fb Author: Lang Yu Date: Tue Jun 7 15:58:23 2022 +0800 drm/amdkfd: simplify vm_validate_pt_pd_bos We don't need to validate and map root PD specially here, it would be validated and mapped by amdgpu_vm_validate_pt_bos if it is evicted. The special case is when turning a GFX VM to a compute VM, if vm_update_mode changed, we should make sure root PD gets mapped. So just map root PD after updating vm->update_funcs in amdgpu_vm_make_compute whether the vm_update_mode changed or not. v3: - Add some comments suggested by Christian. v2: - Don't rename vm_validate_pt_pd_bos and make it public. Signed-off-by: Lang Yu Acked-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 14 -------------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 ++++++++ 2 files changed, 8 insertions(+), 14 deletions(-) commit cfb979f71736361ec564d47d0a41f07e09983e32 Author: Aurabindo Pillai Date: Tue Jun 28 17:26:35 2022 -0400 drm/amd: Add debug mask for subviewport mclk switch [Why&How] Expose a new dc debug mask enum to force a subviewport memory clock switch to facilitate easy testing. Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ drivers/gpu/drm/amd/include/amd_shared.h | 1 + 2 files changed, 4 insertions(+) commit db1bfbd60e325abddc824c49b2fd45a39a10b2f5 Author: Samuel Holland Date: Fri Jul 1 22:25:20 2022 -0500 soc: sunxi: mbus: Only build the driver on ARM/ARM64 This driver exists as a workaround for old devicetrees which are missing interconnects properties, so it is only useful for those specific platforms, which all happen to be ARM or ARM64. This solves the issue that the driver fails to build on RISC-V, where PHYS_OFFSET is not defined. Signed-off-by: Samuel Holland Reviewed-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220702032520.22129-1-samuel@sholland.org drivers/soc/sunxi/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 52664090101a881ee67eb23e24859d45fce34dc8 Author: Christophe JAILLET Date: Mon Jul 4 15:15:03 2022 +0200 PCI: iproc: Use bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Link: https://lore.kernel.org/r/d839a951358ceb447226dc776590a2a38f3e3f9d.1656940469.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Bjorn Helgaas Acked-by: Ray Jui drivers/pci/controller/pcie-iproc-msi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 534445e0d15230a6c3b48b65e75c0f7bd9c0db19 Author: Samuel Holland Date: Sat Jul 2 14:52:49 2022 -0500 dt-bindings: usb: generic-ohci: Add Allwinner D1 compatible The Allwinner D1 contains USB controllers which claim to be compatible with the OHCI specification version 1.0a. Signed-off-by: Samuel Holland Acked-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220702195249.54160-4-samuel@sholland.org Documentation/devicetree/bindings/usb/generic-ohci.yaml | 1 + 1 file changed, 1 insertion(+) commit 821d83c20e32adaedb3774939dfc14acc87fce08 Author: Samuel Holland Date: Sat Jul 2 14:52:48 2022 -0500 dt-bindings: usb: generic-ehci: Add Allwinner D1 compatible The Allwinner D1 contains USB controllers which claim to be compatible with the EHCI specification version 1.0. Signed-off-by: Samuel Holland Acked-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220702195249.54160-3-samuel@sholland.org Documentation/devicetree/bindings/usb/generic-ehci.yaml | 1 + 1 file changed, 1 insertion(+) commit fe938040e089d9f96bd50976b77a52657deb8336 Author: Samuel Holland Date: Sat Jul 2 14:52:47 2022 -0500 dt-bindings: usb: sunxi-musb: Add Allwinner D1 compatible The MUSB controller in the Allwinner D1 has 10 endpoints, making it compatible with the A33 variant of the hardware. Signed-off-by: Samuel Holland Acked-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220702195249.54160-2-samuel@sholland.org Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.yaml | 1 + 1 file changed, 1 insertion(+) commit 790edb2eae0a90033e5b362830717eeda42c985a Author: Samuel Holland Date: Sat Jul 2 00:25:43 2022 -0500 arm64: dts: allwinner: a100: Update I2C controller fallback The I2C controllers in the A100 SoC are newer-generation hardware which includes an offload engine. Signify that by including the allwinner,sun8i-v536-i2c fallback compatible, as V536 is the first SoC with this generation of I2C controller. Signed-off-by: Samuel Holland Reviewed-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220702052544.31443-2-samuel@sholland.org arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit e01f242a8f78d733f1cc9e2e18633f21e0ad412f Author: Samuel Holland Date: Sat Jul 2 00:25:42 2022 -0500 dt-bindings: i2c: mv64xxx: Add variants with offload support V536 and newer Allwinner SoCs contain an updated I2C controller which includes an offload engine for master mode. The controller retains the existing register interface, so the A31 compatible still applies. Add the V536 compatible and use it as a fallback for other SoCs with the updated hardware. This includes two SoCs that were already documented (H616 and A100) and two new SoCs (R329 and D1). Signed-off-by: Samuel Holland Reviewed-by: Andre Przywara Acked-by: Krzysztof Kozlowski Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220702052544.31443-1-samuel@sholland.org Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 7d655166dbb29b6d735b4699ded5d2b2d74d579c Author: qianfan Zhao Date: Tue May 17 09:36:07 2022 +0800 ARM: dts: sun8i-r40: Add thermal trip points/cooling maps For the trip points, I used values from the BSP code. The critical trip point value is 30°C above the maximum recommended ambient temperature (85°C) for the SoC from the datasheet, so there's some headroom even at such a high ambient temperature. Signed-off-by: qianfan Zhao Reviewed-by: Samuel Holland Tested-by: Samuel Holland Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220517013607.2252-4-qianfanguijin@163.com arch/arm/boot/dts/sun8i-r40.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 14dbef6772cd1d07b953a4b46e2be99351a4e953 Author: qianfan Zhao Date: Tue May 17 09:36:06 2022 +0800 ARM: dts: sun8i-r40: add opp table for cpu OPP table value is get from allwinner lichee linux-3.10 kernel driver Signed-off-by: qianfan Zhao Reviewed-by: Samuel Holland Tested-by: Samuel Holland Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220517013607.2252-3-qianfanguijin@163.com arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 1 + arch/arm/boot/dts/sun8i-r40-cpu-opp.dtsi | 52 +++++++++++++++++++++++ arch/arm/boot/dts/sun8i-r40-feta40i.dtsi | 1 + arch/arm/boot/dts/sun8i-r40.dtsi | 8 ++++ arch/arm/boot/dts/sun8i-t3-cqa3t-bv3.dts | 1 + arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 1 + 6 files changed, 64 insertions(+) commit 6d5f3f67584a4e17b70970c7fc567b2251b880ed Author: qianfan Zhao Date: Tue May 17 09:36:05 2022 +0800 ARM: dts: sun8i-r40: Add "cpu-supply" node for sun8i-r40 based board The CPU of sun8i-r40 is powered by PMIC, let's add "cpu-supply" node. Signed-off-by: qianfan Zhao Reviewed-by: Samuel Holland Tested-by: Samuel Holland Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220517013607.2252-2-qianfanguijin@163.com arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 4 ++++ arch/arm/boot/dts/sun8i-r40-feta40i.dtsi | 4 ++++ arch/arm/boot/dts/sun8i-t3-cqa3t-bv3.dts | 4 ++++ arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 4 ++++ 4 files changed, 16 insertions(+) commit 2755714656d0f2f41adfe231f3865e72da2cbe39 Author: George D Sworo Date: Wed Jun 1 12:22:16 2022 -0700 powercap: intel_rapl: Add support for RAPTORLAKE_P Add RAPTORLAKE_P to the list of supported processor models in the Intel RAPL power capping driver. Signed-off-by: George D Sworo Acked-by: Zhang Rui Tested-by: Sumeet Pawnikar [ rjw: Minor changelog edits ] Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl_common.c | 1 + 1 file changed, 1 insertion(+) commit 65b6851d243ff54cbd4adfb887a8af9d04b7f286 Author: Andy Shevchenko Date: Tue Jul 5 19:11:02 2022 +0300 ASoC: SOF: Intel: byt: remove duplicating driver data retrieval device_get_match_data() in ACPI case calls similar to acpi_match_device(). Hence there is no need to duplicate the call. Just assign what is in the id->driver_data. Signed-off-by: Andy Shevchenko Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220705161102.76250-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/byt.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 0d356c186ffd6d4c3e10abb283379d09a93d2515 Author: Andy Shevchenko Date: Tue Jul 5 19:11:01 2022 +0300 ASoC: SOF: Intel: bdw: remove duplicating driver data retrieval device_get_match_data() in ACPI case calls similar to acpi_match_device(). Hence there is no need to duplicate the call. Just assign what is in the id->driver_data. Signed-off-by: Andy Shevchenko Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220705161102.76250-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/bdw.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit fb617612fd8e017720d7fe907b22b4bb44027948 Author: Uwe Kleine-König Date: Wed Jun 29 21:42:24 2022 +0200 ASoC: tegra: tegra20_das: Drop write-only driver data member The dev member of struct tegra20_das is only written once in .probe(). There is no loss of functionality if the member and the assignment go away. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220629194224.175607-5-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown sound/soc/tegra/tegra20_das.c | 3 --- 1 file changed, 3 deletions(-) commit a10a8b6661c478dac3a8c55ad41f5cb00779c6b9 Author: Uwe Kleine-König Date: Wed Jun 29 21:42:23 2022 +0200 ASoC: tegra: tegra20_das: Make helper functions return void These only ever return a value != 0 if the parameter das is NULL. In the only caller however it's already asserted this isn't the case. So convert the functions to return void and simplify the caller accordingly. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220629194224.175607-4-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown sound/soc/tegra/tegra20_das.c | 47 +++++++++---------------------------------- 1 file changed, 10 insertions(+), 37 deletions(-) commit eefaea93235523d248cc8cadcd6be9f47b03b9d5 Author: Uwe Kleine-König Date: Wed Jun 29 21:42:22 2022 +0200 ASoC: tegra: tegra20_das: Get rid of global pointer for driver data This enables the driver (at least theoretically) to bind to more than one device. The remove function has nothing to do now, so it is dropped. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220629194224.175607-3-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown sound/soc/tegra/tegra20_das.c | 66 +++++++++++++------------------------------ 1 file changed, 20 insertions(+), 46 deletions(-) commit 9a99b9b26451ca2a81867ce0cd8fe18dce856a8c Author: Uwe Kleine-König Date: Wed Jun 29 21:42:21 2022 +0200 ASoC: tegra: tegra20_das: Remove unused function tegra20_das_read This function is unused since commit 7203a62562dc ("ASoC: convert Tegra20 DAS driver to regmap"). Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220629194224.175607-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown sound/soc/tegra/tegra20_das.c | 8 -------- 1 file changed, 8 deletions(-) commit 6dbc34d9c31e71aeb8175ce443c11b9e19e9f8ee Author: Uwe Kleine-König Date: Wed Jun 29 21:42:20 2022 +0200 ASoC: tegra: tegra20_das: Fold header file into only user Since commit fcff5f99742e ("ASoC: tegra: remove unnecessary includes") the header file (which at the time was named tegra_das.h) there is only the actual driver that includes it. Just move the definitions into the driver, drop the exports and remove the completely unused function. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220629194224.175607-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown sound/soc/tegra/tegra20_das.c | 110 ++++++++++++++++++++++++++++---------- sound/soc/tegra/tegra20_das.h | 120 ------------------------------------------ 2 files changed, 83 insertions(+), 147 deletions(-) commit 0ff9f8b9f59208332c6707e37d5739c57c7f7bce Author: Judy Hsiao Date: Fri Jul 1 02:14:27 2022 +0000 ASoC: rockchip: i2s: Fix error code when fail to read I2S_CLR Add the error code '-EBUSY' when fail to read I2S_CLR in rockchip_snd_rxctrl() and rockchip_snd_txctrl() Fixes: 44f362c2cc6d ("ASoC: rockchip: i2s: switch BCLK to GPIO") Signed-off-by: Judy Hsiao Reviewed-by: Brian Norris Link: https://lore.kernel.org/r/20220701021427.3120549-1-judyhsiao@chromium.org Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 2 ++ 1 file changed, 2 insertions(+) commit 50791dcb7de32f9f78061f7f460966ac5616b38e Author: Krzysztof Kozlowski Date: Tue Jul 5 20:28:02 2022 +0200 ASoC: dt-bindings: qcom,sm8250: add SDM845 sound The Qualcomm SDM845 sound card bindings are almost the same as SM8250, except "pin-switches" and "widgets" properties. These were not documented in SDM845 text bindings but are actually valid for SDM845. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephan Gerhold Link: https://lore.kernel.org/r/20220705182802.775803-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../devicetree/bindings/sound/qcom,sdm845.txt | 91 ---------------------- .../devicetree/bindings/sound/qcom,sm8250.yaml | 3 + 2 files changed, 3 insertions(+), 91 deletions(-) commit b03bd215742c620812e47a9ef5f08e4e0e5f0a1a Author: Andy Shevchenko Date: Tue Jul 5 18:58:13 2022 +0300 ASoC: Intel: catpt: remove duplicating driver data retrieval device_get_match_data() in ACPI case calls similar to acpi_match_device(). Hence there is no need to duplicate the call. Just assign what is in the id->driver_data. Signed-off-by: Andy Shevchenko Acked-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220705155813.75917-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/catpt/device.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit d08412328e4ff4928a60438e62e34e67f687a740 Author: Zhang Jiaming Date: Tue Jul 5 15:14:45 2022 +0800 regulator: Fix parameter declaration and spelling mistake. Use Complete data type declaration of 'sel' in ti_abb_set_voltage_sel(). Fix spelling of 'are'nt' in comments. Signed-off-by: Zhang Jiaming Link: https://lore.kernel.org/r/20220705071445.21124-1-jiaming@nfschina.com Signed-off-by: Mark Brown drivers/regulator/ti-abb-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 09d3154a6f0f0bb5b604832095804780f3684b96 Author: Bjorn Helgaas Date: Mon Jun 6 22:51:58 2022 -0500 PM: wakeup: Unify device_init_wakeup() for PM_SLEEP and !PM_SLEEP Previously the CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP device_init_wakeup() implementations differed in confusing ways: - The PM_SLEEP version checked for a NULL device pointer and returned -EINVAL, while the !PM_SLEEP version did not and would simply dereference a NULL pointer. - When called with "false", the !PM_SLEEP version cleared "capable" and "enable" in the opposite order of the PM_SLEEP version. That was harmless because for !PM_SLEEP they're simple assignments, but it's unnecessary confusion. Use a simplified version of the PM_SLEEP implementation for both cases. Signed-off-by: Bjorn Helgaas Signed-off-by: Rafael J. Wysocki drivers/base/power/wakeup.c | 30 ------------------------------ include/linux/pm_wakeup.h | 31 +++++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 38 deletions(-) commit ed470febf837dfb117601f0df058dcab02c8c570 Author: Shyam Sundar S K Date: Mon Jul 4 09:20:17 2022 +0530 ACPI: PM: s2idle: Add support for upcoming AMD uPEP HID AMDI008 New version of uPEP will have a separate ACPI id, add that to the support list. Signed-off-by: Shyam Sundar S K Reviewed-by: Mario Limonciello Signed-off-by: Rafael J. Wysocki drivers/acpi/x86/s2idle.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3dcb861dbc6ab101838a1548b1efddd00ca3c3ec Author: Eric Auger Date: Thu Jun 30 11:40:59 2022 +0200 ACPI: VIOT: Fix ACS setup Currently acpi_viot_init() gets called after the pci device has been scanned and pci_enable_acs() has been called. So pci_request_acs() fails to be taken into account leading to wrong single iommu group topologies when dealing with multi-function root ports for instance. We cannot simply move the acpi_viot_init() earlier, similarly as the IORT init because the VIOT parsing relies on the pci scan. However we can detect VIOT is present earlier and in such a case, request ACS. Introduce a new acpi_viot_early_init() routine that allows to call pci_request_acs() before the scan. While at it, guard the call to pci_request_acs() with #ifdef CONFIG_PCI. Fixes: 3cf485540e7b ("ACPI: Add driver for the VIOT table") Signed-off-by: Eric Auger Reported-by: Jin Liu Reviewed-by: Jean-Philippe Brucker Tested-by: Jean-Philippe Brucker Signed-off-by: Rafael J. Wysocki drivers/acpi/bus.c | 1 + drivers/acpi/viot.c | 26 ++++++++++++++++++++------ include/linux/acpi_viot.h | 2 ++ 3 files changed, 23 insertions(+), 6 deletions(-) commit a204f9743b6808ca658c1bacedb34bf4c7e6f800 Author: Ville Syrjälä Date: Thu Jun 30 22:51:14 2022 +0300 drm: Remove linux/i2c.h from drm_crtc.h drm_crtc.h has no need for linux/i2c.h, so don't include it. Avoids useless rebuilds of the entire universe when touching linux/i2c.h. Quite a few placs do currently depend on linux/i2c.h without actually including it directly. All of those need to be fixed up. v2: imx and mcde need linux/io.h for readl()/etc. Acked-by: Sam Ravnborg Acked-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220630195114.17407-5-ville.syrjala@linux.intel.com drivers/gpu/drm/bridge/chrontel-ch7033.c | 1 + drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c | 1 + drivers/gpu/drm/bridge/lontium-lt9611.c | 1 + drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 1 + drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 + drivers/gpu/drm/exynos/exynos_dp.c | 1 + drivers/gpu/drm/i2c/tda998x_drv.c | 1 + drivers/gpu/drm/mcde/mcde_clk_div.c | 1 + drivers/gpu/drm/panel/panel-simple.c | 1 + drivers/gpu/drm/sti/sti_hdmi.c | 1 + drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 1 + include/drm/drm_crtc.h | 1 - include/drm/drm_encoder_slave.h | 2 ++ 13 files changed, 13 insertions(+), 1 deletion(-) commit 72bd9ea389c70ac948f48d20c0e4ae70c0153940 Author: Ville Syrjälä Date: Thu Jun 30 22:51:13 2022 +0300 drm: Remove linux/media-bus-format.h from drm_crtc.h drm_crtc.h has no need for linux/media-bus-format.h, so don't include it. Avoids useless rebuilds of the entire universe when touching linux/media-bus-format.h. Quite a few placs do currently depend on linux/media-bus-format.h without actually including it directly. All of those need to be fixed up. v2: Deal with ingenic as well v3: Fix up mxsfb and remaining parts of imx Acked-by: Sam Ravnborg Acked-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220630195114.17407-4-ville.syrjala@linux.intel.com drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 1 + drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 1 + drivers/gpu/drm/bridge/chipone-icn6211.c | 1 + drivers/gpu/drm/bridge/display-connector.c | 1 + drivers/gpu/drm/bridge/fsl-ldb.c | 1 + drivers/gpu/drm/bridge/imx/imx-ldb-helper.c | 1 + drivers/gpu/drm/bridge/imx/imx8qm-ldb-drv.c | 1 + drivers/gpu/drm/bridge/imx/imx8qxp-ldb-drv.c | 1 + drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c | 1 + drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c | 1 + drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c | 1 + drivers/gpu/drm/bridge/ite-it66121.c | 1 + drivers/gpu/drm/bridge/lontium-lt8912b.c | 1 + drivers/gpu/drm/bridge/lontium-lt9211.c | 1 + drivers/gpu/drm/bridge/lontium-lt9611.c | 1 + drivers/gpu/drm/bridge/nwl-dsi.c | 1 + drivers/gpu/drm/bridge/sii902x.c | 1 + drivers/gpu/drm/bridge/tc358767.c | 1 + drivers/gpu/drm/bridge/tc358775.c | 1 + drivers/gpu/drm/bridge/ti-dlpc3433.c | 1 + drivers/gpu/drm/bridge/ti-sn65dsi83.c | 1 + drivers/gpu/drm/bridge/ti-tfp410.c | 1 + drivers/gpu/drm/drm_bridge.c | 1 + drivers/gpu/drm/drm_of.c | 1 + drivers/gpu/drm/imx/imx-ldb.c | 1 + drivers/gpu/drm/imx/parallel-display.c | 1 + drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 1 + drivers/gpu/drm/mediatek/mtk_dpi.c | 1 + drivers/gpu/drm/mxsfb/lcdif_kms.c | 1 + drivers/gpu/drm/mxsfb/mxsfb_kms.c | 1 + drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 1 + drivers/gpu/drm/panel/panel-raydium-rm67191.c | 1 + drivers/gpu/drm/panel/panel-seiko-43wvf1g.c | 1 + drivers/gpu/drm/panel/panel-simple.c | 1 + drivers/gpu/drm/pl111/pl111_display.c | 1 + drivers/gpu/drm/rcar-du/rcar_lvds.c | 1 + drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 1 + drivers/gpu/drm/rockchip/rockchip_rgb.c | 1 + drivers/gpu/drm/stm/ltdc.c | 1 + drivers/gpu/drm/sun4i/sun4i_tcon.c | 1 + drivers/gpu/drm/tidss/tidss_dispc.c | 1 + drivers/gpu/drm/vc4/vc4_dpi.c | 1 + include/drm/drm_crtc.h | 1 - 43 files changed, 42 insertions(+), 1 deletion(-) commit 73289afe03619bac585b69f563d0bb9a52e67722 Author: Ville Syrjälä Date: Thu Jun 30 22:51:12 2022 +0300 drm: Remove linux/fb.h from drm_crtc.h drm_crtc.h has no need for linux/fb.h, so don't include it. Avoids useless rebuilds of the entire universe when touching linux/fb.h. Quite a few placs do currently depend on linux/fb.h or other headers pulled in by it without actually including any of it directly. All of those need to be fixed up. v2: Split the vmwgfx change out Acked-by: Sam Ravnborg Acked-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220630195114.17407-3-ville.syrjala@linux.intel.com drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c | 2 ++ drivers/gpu/drm/armada/armada_510.c | 1 + drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 1 + drivers/gpu/drm/bridge/tc358764.c | 1 + drivers/gpu/drm/display/drm_dp_helper.c | 1 + drivers/gpu/drm/drm_connector.c | 1 + drivers/gpu/drm/drm_mipi_dbi.c | 1 + drivers/gpu/drm/drm_modes.c | 1 + drivers/gpu/drm/drm_of.c | 1 + drivers/gpu/drm/exynos/exynos_drm_dpi.c | 1 + drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 1 + drivers/gpu/drm/i915/display/intel_backlight.c | 1 + drivers/gpu/drm/imx/dcss/dcss-drv.c | 1 + drivers/gpu/drm/kmb/kmb_dsi.c | 1 + drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 1 + drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 1 + drivers/gpu/drm/sti/sti_compositor.c | 1 + drivers/gpu/drm/sti/sti_gdp.c | 1 + drivers/gpu/drm/sti/sti_hda.c | 1 + drivers/gpu/drm/sti/sti_hqvdp.c | 1 + drivers/gpu/drm/sun4i/sun4i_tcon.h | 1 + drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 + drivers/gpu/drm/vc4/vc4_drv.h | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 1 + include/drm/drm_crtc.h | 1 - include/drm/drm_fb_helper.h | 1 + 26 files changed, 26 insertions(+), 1 deletion(-) commit 207d2073c648614dabcb06863d990f0c2a32c4e9 Author: Ville Syrjälä Date: Thu Jun 30 22:51:11 2022 +0300 drm/vmwgfx: Stop using 'TRUE' Stop using the 'TRUE' define. This ultimately gets defined by acpi/actypes.h that gets included here via a convoluted chain of other headers. drm_crtc.h is part of that chain, and I'm trying to eliminate all unnecessary includes from it to avoid pointless rebuilds. v2: Split out from the bigger patch Cc: Zack Rusin Cc: VMware Graphics Reviewers Acked-by: Sam Ravnborg Acked-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220630195114.17407-2-ville.syrjala@linux.intel.com Reviewed-by: Zack Rusin > drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa0cec248c37e44ac2871261bcac05598f35a7dd Author: Kishon Vijay Abraham I Date: Thu Jun 2 15:49:20 2022 +0530 remoteproc: pru: Add support for various PRU cores on K3 AM62x SoCs The K3 AM62x family of SoC has one PRUSS-M instance and it has two Programmable Real-Time Units (PRU0 and PRU1). This does not support Industrial Communications Subsystem features like Ethernet. Enhance the existing PRU remoteproc driver to support the 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. Signed-off-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20220602101920.12504-4-kishon@ti.com Signed-off-by: Mathieu Poirier drivers/remoteproc/pru_rproc.c | 1 + 1 file changed, 1 insertion(+) commit ca63e3d8f65409a0940d945a7ee2ae49b4b32898 Author: Kishon Vijay Abraham I Date: Thu Jun 2 15:49:19 2022 +0530 dt-bindings: remoteproc: pru: Update bindings for K3 AM62x SoCs Update the PRU remoteproc bindings for the PRU cores on AM62x SoCs. Signed-off-by: Kishon Vijay Abraham I Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220602101920.12504-3-kishon@ti.com Signed-off-by: Mathieu Poirier Documentation/devicetree/bindings/remoteproc/ti,pru-rproc.yaml | 1 + 1 file changed, 1 insertion(+) commit 10f003b4e631e9a51ade3935549db89c0ebf263c Author: Kishon Vijay Abraham I Date: Thu Jun 2 15:49:18 2022 +0530 dt-bindings: remoteproc: pru: Re-arrange "compatible" in alphabetic order Re-arrange "compatible" string in alphabetic order to decrease the chance of conflicts. Signed-off-by: Kishon Vijay Abraham I Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220602101920.12504-2-kishon@ti.com Signed-off-by: Mathieu Poirier Documentation/devicetree/bindings/remoteproc/ti,pru-rproc.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7d0221fb59125181a31ef3a561306c70fb238bc7 Author: Konrad Dybcio Date: Fri Jul 1 09:37:00 2022 +0200 soc/qcom: Make QCOM_RPMPD select PM_GENERIC_DOMAINS/_OF The driver uses generic genpd OF APIs and with a very minimal config where nothing else selects them, this driver will not probe, as of_genpd_add_provider_onecell will return -EOPNOTSUPP. Make sure to select these in Kconfig to prevent that. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220701073700.17124-1-konrad.dybcio@somainline.org drivers/soc/qcom/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit f4ba35b79bd0104f00e8e21e400b980bfaa2f17e Author: Lukas Bulwahn Date: Tue Jul 5 12:32:38 2022 +0200 ASoC: Intel: avs: correct config reference for I2S test board Commit e39acc4cfd92 ("ASoC: Intel: avs: Add I2S-test machine board") adds the config "SND_SOC_INTEL_AVS_MACH_I2S_TEST", but in the Makefile refers to config "SND_SOC_INTEL_AVS_MACH_i2s_TEST" (notice the uppercase and lowercase difference). Adjust the Makefile to refer to the actual existing config. Signed-off-by: Lukas Bulwahn Acked-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20220705103238.7484-1-lukas.bulwahn@gmail.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 275cc7f5bd6f60565672ce339505b77fd47a8157 Author: Uwe Kleine-König Date: Tue Jul 5 11:26:45 2022 +0200 ASoC: xilinx: Suppress second error message about reset failure in .remove() Returning an error value in a platform remove callback results in an error message being emitted by the platform core, but otherwise it doesn't make a difference. If ret is != 0, there is already an error message and another very generic doesn't add any value, so return 0 unconditionally. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220705092645.101343-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown sound/soc/xilinx/xlnx_formatter_pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eec8a5f44e4f68c64ce21d90e438e31e85b92178 Author: Gaosheng Cui Date: Tue Jul 5 08:53:15 2022 +0800 ASoC: codecs: wsa883x: fix warning using-module-alias-sdw.cocci This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Gaosheng Cui Link: https://lore.kernel.org/r/20220705005315.663920-1-cuigaosheng1@huawei.com Signed-off-by: Mark Brown sound/soc/codecs/wsa883x.c | 2 ++ 1 file changed, 2 insertions(+) commit 61c606a43b6c74556e35acc645c7a1b6a67c2af9 Author: Jan Schär Date: Tue Jul 5 15:57:46 2022 +0200 ALSA: usb-audio: Add endianness annotations Fixes: 4b8ea38fabab ("ALSA: usb-audio: Support jack detection on Dell dock") Reported-by: kernel test robot Link: https://lore.kernel.org/r/202207051932.qUilU0am-lkp@intel.com Signed-off-by: Jan Schär Link: https://lore.kernel.org/r/20220705135746.13713-1-jan@jschaer.ch Signed-off-by: Takashi Iwai sound/usb/mixer_quirks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2be9e847070939c50d745e68815e673960586ac2 Merge: 76a748e2c1aa 6a6eff73a954 Author: Georgi Djakov Date: Tue Jul 5 16:40:15 2022 +0300 Merge branch 'icc-sm6350' into icc-next This series adds interconnect support for the various NoCs found on sm6350. A more special modification is allowing child NoC devices, like done for rpm-based qcm2290 which was already merged, but now for rpmh-based interconnect. See also downstream dts: https://android.googlesource.com/kernel/msm-extra/devicetree/+/refs/tags/android-11.0.0_r0.81/qcom/lagoon-bus.dtsi Link: https://lore.kernel.org/r/20220525144404.200390-1-luca.weiss@fairphone.com Signed-off-by: Georgi Djakov commit 76a748e2c1aa976d0c7fef872fa6ff93ce334a8a Author: Leo Yan Date: Sat Apr 16 09:26:34 2022 +0800 interconnect: qcom: msm8939: Use icc_sync_state It's fashion to use the icc_sync_state callback to notify the framework when all consumers are probed, so that the bandwidth request doesn't need to stay on maximum value. Do the same thing for msm8939 driver. Signed-off-by: Leo Yan Link: https://lore.kernel.org/r/20220416012634.479617-1-leo.yan@linaro.org Signed-off-by: Georgi Djakov drivers/interconnect/qcom/msm8939.c | 1 + 1 file changed, 1 insertion(+) commit 38493f008deb435577361d4c4cdd69f7bb30f4b9 Author: Patrick Rudolph Date: Tue Jul 5 14:22:41 2022 +0200 regulator: max597x: Add support for max597x regulator max597x is hot swap controller. This regulator driver controls the same & also configures fault protection features supported by the chip. Signed-off-by: Patrick Rudolph Signed-off-by: Marcello Sylvester Bauer Signed-off-by: Naresh Solanki Link: https://lore.kernel.org/r/20220705122244.472894-4-Naresh.Solanki@9elements.com Signed-off-by: Mark Brown drivers/regulator/Kconfig | 10 + drivers/regulator/Makefile | 1 + drivers/regulator/max597x-regulator.c | 506 ++++++++++++++++++++++++++++++++++ 3 files changed, 517 insertions(+) commit cc83b0c7e3064e2bb1f9d099bbfdaf493cd669fe Author: Colin Ian King Date: Mon Jul 4 19:53:19 2022 +0100 fs/ntfs3: Remove duplicated assignment to variable r The assignment to variable r is duplicated, the second assignment is redundant and can be removed. Signed-off-by: Colin Ian King Signed-off-by: Konstantin Komarov fs/ntfs3/run.c | 1 - 1 file changed, 1 deletion(-) commit 4838ec0d80b110a5f30c7e3169dc5021efd203d4 Author: Dan Carpenter Date: Thu Jun 30 16:10:56 2022 +0300 fs/ntfs3: Unlock on error in attr_insert_range() This error path needs to call up_write(&ni->file.run_lock) and do some other clean up before returning. Fixes: aa30eccb24e5 ("fs/ntfs3: Fallocate (FALLOC_FL_INSERT_RANGE) implementation") Signed-off-by: Dan Carpenter Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e66af07ca2b57e01dbf6001ae565ab40037b2df3 Author: Pavel Skripkin Date: Thu Apr 21 23:53:45 2022 +0300 fs/ntfs3: Make ntfs_update_mftmirr return void None of callers check the return value of ntfs_update_mftmirr(), so make it return void to make code simpler. Signed-off-by: Pavel Skripkin Signed-off-by: Konstantin Komarov fs/ntfs3/fsntfs.c | 20 +++++++------------- fs/ntfs3/ntfs_fs.h | 2 +- 2 files changed, 8 insertions(+), 14 deletions(-) commit 321460ca3b55f48b3ba6008248264ab2bd6407d9 Author: Pavel Skripkin Date: Thu Apr 21 23:53:36 2022 +0300 fs/ntfs3: Fix NULL deref in ntfs_update_mftmirr If ntfs_fill_super() wasn't called then sbi->sb will be equal to NULL. Code should check this ptr before dereferencing. Syzbot hit this issue via passing wrong mount param as can be seen from log below Fail log: ntfs3: Unknown parameter 'iochvrset' general protection fault, probably for non-canonical address 0xdffffc0000000003: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f] CPU: 1 PID: 3589 Comm: syz-executor210 Not tainted 5.18.0-rc3-syzkaller-00016-gb253435746d9 #0 ... Call Trace: put_ntfs+0x1ed/0x2a0 fs/ntfs3/super.c:463 ntfs_fs_free+0x6a/0xe0 fs/ntfs3/super.c:1363 put_fs_context+0x119/0x7a0 fs/fs_context.c:469 do_new_mount+0x2b4/0xad0 fs/namespace.c:3044 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") Reported-and-tested-by: syzbot+c95173762127ad76a824@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Signed-off-by: Konstantin Komarov fs/ntfs3/fsntfs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a94a098a21c678c07c8a742e4a65e8aa2bebdf08 Author: Samuel Holland Date: Mon Jun 20 22:13:50 2022 -0500 dmaengine: sun4i: Set the maximum segment size The sun4i DMA engine supports transfer sizes up to 128k for normal DMA and 16M for dedicated DMA, as documented in the A10 and A20 manuals. Since this is larger than the default segment size limit (64k), exposing the real limit reduces the number of transfers needed for a transaction. However, because the device can only report one segment size limit, we have to expose the smaller limit from normal DMA. One complication is that the driver combines pairs of periodic transfers to reduce programming overhead. This only works when the period size is at most half of the maximum transfer size. With the default 64k segment size limit, this was always the case, but for normal DMA it is no longer guaranteed. Skip the optimization if the period is too long; even without it, the overhead is less than before. Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20220621031350.36187-1-samuel@sholland.org Signed-off-by: Vinod Koul drivers/dma/sun4i-dma.c | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) commit 5352ebf735064373dc2dd96b39c0fbf347db0095 Author: Siddh Raman Pant Date: Mon Jun 27 13:21:48 2022 +0530 tools/testing/crypto: Use vzalloc instead of vmalloc+memset This fixes the corresponding coccinelle warning. Signed-off-by: Siddh Raman Pant Signed-off-by: Harald Freudenberger Link: https://lore.kernel.org/r/20220627075148.140705-1-code@siddh.me [agordeev@linux.ibm.com added Link] Signed-off-by: Alexander Gordeev tools/testing/crypto/chacha20-s390/test-cipher.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 7eacf1858bc86fe93b457c529a3a40e8b94d5af1 Author: Will Deacon Date: Fri Jun 10 16:12:28 2022 +0100 arm64: mm: Remove assembly DMA cache maintenance wrappers Remove the __dma_{flush,map,unmap}_area assembly wrappers and call the appropriate cache maintenance functions directly from the DMA mapping callbacks. Reviewed-by: Catalin Marinas Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220610151228.4562-3-will@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/cacheflush.h | 7 ------- arch/arm64/mm/cache.S | 41 ------------------------------------- arch/arm64/mm/dma-mapping.c | 19 ++++++++++++----- 3 files changed, 14 insertions(+), 53 deletions(-) commit 773d09b4c3acafd35f8b6e90848a39cedc03c52b Author: Aidan MacDonald Date: Mon Jul 4 12:28:47 2022 +0100 regmap-irq: Fix bug in regmap_irq_get_irq_reg_linear() irq_reg_stride in struct regmap_irq_chip is often 0, but that actually means to use the default stride of 1. The effective stride is stored in struct regmap_irq_chip_data->irq_reg_stride and will get the corrected default value. The default ->get_irq_reg() callback was using the stride from the chip definition, which is wrong; fix it to use the effective stride from the chip data instead. Link: https://lore.kernel.org/lkml/acaaf77f-3282-8544-dd3c-7915fc1a6a4f@samsung.com/ Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20220704112847.23844-1-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dcc165d6179c3934b93b8c3bffde1ed9710fd7ef Author: Andy Shevchenko Date: Fri Jun 3 20:07:07 2022 +0300 ASoC: madera: Replace kernel.h with the necessary inclusions When kernel.h is used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved. Replace kernel.h inclusion with the list of what is really being used. Signed-off-by: Andy Shevchenko Reviewed-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20220603170707.48728-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown include/sound/madera-pdata.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8dbefb20b2d0fa8dbf81db161db443096120b326 Author: Oder Chiou Date: Tue Jul 5 18:11:34 2022 +0800 ASoC: rt5640: Add the MICBIAS1 to the dapm routing The patch adds the MICBIAS1 to the dapm routing while the HDA header used. Signed-off-by: Oder Chiou Reported-by: Sameer Pujar Link: https://lore.kernel.org/r/20220705101134.16792-2-oder_chiou@realtek.com Signed-off-by: Mark Brown sound/soc/codecs/rt5640.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f94fa84058014f81ad526641f1b1f583ca2cf32f Author: Vijendar Mukunda Date: Fri Jul 1 17:11:07 2022 +0530 ASoC: amd: enable machine driver build for Jadeite platform Enable machine driver build for Jadeite platform using ES8336 Codec. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20220701114107.1105948-6-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown sound/soc/amd/Kconfig | 13 +++++++++++++ sound/soc/amd/Makefile | 2 ++ 2 files changed, 15 insertions(+) commit 02527c3f2300100a25524c8c020d98c7957e485e Author: Vijendar Mukunda Date: Fri Jul 1 17:11:06 2022 +0530 ASoC: amd: add Machine driver for Jadeite platform Add Machine driver for Jadeite platform which uses ES8336 codec. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20220701114107.1105948-5-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown sound/soc/amd/acp-es8336.c | 324 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 324 insertions(+) commit 3eb8440d0d268437202ccbd28a3ca3212e02e57f Author: Vijendar Mukunda Date: Fri Jul 1 17:11:05 2022 +0530 ASoC: amd: add I2S MICSP instance support Add I2S MICSP instance support for Stoney variant. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20220701114107.1105948-4-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown sound/soc/amd/acp-pcm-dma.c | 50 +++++++++++++++++++++++++++++++++++++++++++-- sound/soc/amd/acp.h | 13 ++++++++++++ 2 files changed, 61 insertions(+), 2 deletions(-) commit 6c06ad34eda9e1990313ff80999e1a75a02fa1c0 Author: Shengjiu Wang Date: Fri Jul 1 17:32:41 2022 +0800 ASoC: dt-bindings: fsl-sai: Add two PLL clock source Add two PLL clock source, they are the parent clocks of root clock one is for 8kHz series rates, another one is for 11kHz series rates. They are optional clocks, if there are such clocks, then driver can switch between them for supporting more accurate rates. Signed-off-by: Shengjiu Wang Acked-by: Rob Herring Link: https://lore.kernel.org/r/1656667961-1799-7-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/fsl-sai.txt | 3 +++ 1 file changed, 3 insertions(+) commit df0835a810c1585bd54ffb10db92b455e922c7ec Author: Shengjiu Wang Date: Fri Jul 1 17:32:40 2022 +0800 ASoC: dt-bindings: fsl_spdif: Add two PLL clock source Add two PLL clock source, they are the parent clocks of root clock one is for 8kHz series rates, another one is for 11kHz series rates. They are optional clocks, if there are such clocks, then driver can switch between them for supporting more accurate rates. Signed-off-by: Shengjiu Wang Acked-by: Rob Herring Link: https://lore.kernel.org/r/1656667961-1799-6-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/fsl,spdif.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 7cb7f07d2491a3435578ab97eeeb70fadac6385c Author: Shengjiu Wang Date: Fri Jul 1 17:32:39 2022 +0800 ASoC: fsl_sai: Add support for PLL switch at runtime i.MX8MQ/MN/MM/MP platforms typically have 2 AUDIO PLLs being configured to handle 8kHz and 11kHz series audio rates. The patch implements the functionality to select at runtime the appropriate AUDIO PLL as function of sysclk rate. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1656667961-1799-5-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/Kconfig | 1 + sound/soc/fsl/fsl_sai.c | 38 ++++++++++++++++++++++++++++++++++++++ sound/soc/fsl/fsl_sai.h | 2 ++ 3 files changed, 41 insertions(+) commit 93f54100fbdedc22e8d88d037a8a3e32101724eb Author: Shengjiu Wang Date: Fri Jul 1 17:32:38 2022 +0800 ASoC: fsl_micfil: Add support for PLL switch at runtime i.MX8MQ/MN/MM/MP platforms typically have 2 AUDIO PLLs being configured to handle 8kHz and 11kHz series audio rates. The patch implements the functionality to select at runtime the appropriate AUDIO PLL as function of audio file rate. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1656667961-1799-4-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/Kconfig | 1 + sound/soc/fsl/fsl_micfil.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) commit 34dcdebecf2f05e1b275e1da8352f8e4c1aab6f6 Author: Shengjiu Wang Date: Fri Jul 1 17:32:37 2022 +0800 ASoC: fsl_spdif: Add support for PLL switch at runtime. i.MX8MQ/MN/MM/MP platforms typically have 2 AUDIO PLLs being configured to handle 8kHz and 11kHz series audio rates. The patch implements the functionality to select at runtime the appropriate AUDIO PLL as function of audio file rate. As the clock parent may be changed, need to probe txclk according to sample rate again. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1656667961-1799-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/Kconfig | 1 + sound/soc/fsl/fsl_spdif.c | 48 ++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 44 insertions(+), 5 deletions(-) commit 7bad8125549cda14d9ccf97d7d76f7ef6ac9d206 Author: Shengjiu Wang Date: Fri Jul 1 17:32:36 2022 +0800 ASoC: fsl_utils: Add function to handle PLL clock source i.MX8MQ/MN/MM/MP platforms typically have 2 AUDIO PLLs being configured to handle 8kHz and 11kHz series audio rates. Add common function in fsl_utils to handle these two PLL clock source, which are needed by CPU DAI drivers Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1656667961-1799-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_utils.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++ sound/soc/fsl/fsl_utils.h | 7 +++++ 2 files changed, 76 insertions(+) commit 3d34cae102b0612dcce0bd4603a4d6302b8039ed Merge: 592feeea1135 bafd5bb5ea49 Author: Krzysztof Kozlowski Date: Tue Jul 5 13:44:14 2022 +0200 Merge branch 'for-v5.20/aspeed-dts-cleanup' into for-v5.20/dts-cleanup commit bafd5bb5ea496c8fc443e6b9de70af840bec0b9c Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:30 2022 -0700 ARM: dts: aspeed: correct gpio-keys properties gpio-keys children do not use unit addresses. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-37-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/aspeed-bmc-ibm-everest.dts | 2 -- arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts | 2 -- arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 2 -- 3 files changed, 6 deletions(-) commit 7bd809eee4290ae7277f4fb20f270fcedd74737b Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:29 2022 -0700 ARM: dts: aspeed: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-36-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dts | 30 +++++++-------- arch/arm/boot/dts/aspeed-bmc-bytedance-g220a.dts | 48 ++++++++++++------------ arch/arm/boot/dts/aspeed-bmc-ibm-everest.dts | 8 ++-- arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts | 12 +++--- arch/arm/boot/dts/aspeed-bmc-inspur-fp5280g2.dts | 22 +++++------ arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts | 23 ++++++------ arch/arm/boot/dts/aspeed-bmc-opp-mowgli.dts | 20 +++++----- arch/arm/boot/dts/aspeed-bmc-opp-nicole.dts | 2 +- arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 2 +- arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 2 +- arch/arm/boot/dts/aspeed-bmc-opp-swift.dts | 30 +++++++-------- arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 12 +++--- arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts | 4 +- arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 16 ++++---- arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts | 4 +- 15 files changed, 118 insertions(+), 117 deletions(-) commit 39fdb65f52e9a53d32a6ba719f96669fd300ae78 Author: James Morse Date: Mon Jul 4 16:57:32 2022 +0100 arm64: errata: Add Cortex-A510 to the repeat tlbi list Cortex-A510 is affected by an erratum where in rare circumstances the CPUs may not handle a race between a break-before-make sequence on one CPU, and another CPU accessing the same page. This could allow a store to a page that has been unmapped. Work around this by adding the affected CPUs to the list that needs TLB sequences to be done twice. Signed-off-by: James Morse Link: https://lore.kernel.org/r/20220704155732.21216-1-james.morse@arm.com Signed-off-by: Will Deacon Documentation/arm64/silicon-errata.rst | 2 ++ arch/arm64/Kconfig | 17 +++++++++++++++++ arch/arm64/kernel/cpu_errata.c | 8 +++++++- 3 files changed, 26 insertions(+), 1 deletion(-) commit 3bbeca99309fd795f8697648e59fec8b70209f6e Author: Mark Brown Date: Mon Jul 4 18:03:02 2022 +0100 arm64/sysreg: Convert ID_AA64ZFR0_EL1 to automatic generation Convert ID_AA64ZFR0_EL1 to automatic register generation as per DDI0487H.a, no functional changes. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-29-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 23 --------------------- arch/arm64/tools/sysreg | 46 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 23 deletions(-) commit 2bc589bd645fd085bb7f621a6e2a723a40fd8948 Author: Mark Brown Date: Mon Jul 4 18:03:01 2022 +0100 arm64/sysreg: Convert ID_AA64SMFR0_EL1 to automatic generation Convert ID_AA64SMFR0_EL1 to automatic register generation as per DDI0487H.a, no functional change. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-28-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 18 ------------------ arch/arm64/tools/sysreg | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 18 deletions(-) commit 12c897b4ffecce971e6654e952a0f6453976b3bc Author: Mark Brown Date: Mon Jul 4 18:03:00 2022 +0100 arm64/sysreg: Convert LORID_EL1 to automatic generation Convert LORID_EL1 to automatic register generation as per DDI0487H.a, no functional changes. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-27-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 2 -- arch/arm64/tools/sysreg | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit 41cc24e0c883bb610da5841e6df6672712346c48 Author: Mark Brown Date: Mon Jul 4 18:02:59 2022 +0100 arm64/sysreg: Convert LORC_EL1 to automatic generation Convert LORC_EL1 to automatic register generation as per DDI0487H.a, no functional changes. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-26-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 1 - arch/arm64/tools/sysreg | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit cdf428f79b3c1a9a86c581e7141a979249cbd966 Author: Mark Brown Date: Mon Jul 4 18:02:58 2022 +0100 arm64/sysreg: Convert LORN_EL1 to automatic generation Convert LORN_EL1 to automatic register generation as per DDI0487H.a, no functional changes. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-25-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 1 - arch/arm64/tools/sysreg | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 0d879f7a32a8e8ac8990ec6c771da0f12d40bb2b Author: Mark Brown Date: Mon Jul 4 18:02:57 2022 +0100 arm64/sysreg: Convert LOREA_EL1 to automatic generation Convert LOREA_EL1 to automatic register generation as per DDI0487H.a, no functional changes. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-24-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 1 - arch/arm64/tools/sysreg | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 464ca8df6248eced7bce5309c344f62b08a1d5c0 Author: Mark Brown Date: Mon Jul 4 18:02:56 2022 +0100 arm64/sysreg: Convert LORSA_EL1 to automatic generation Convert LORSA_EL1 to automatic register generation as per DDI0487H.a, no functional changes. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-23-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 1 - arch/arm64/tools/sysreg | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 8fcc8285c0e312a6d5ec6060c67eba87d2881419 Author: Mark Brown Date: Mon Jul 4 18:02:55 2022 +0100 arm64/sysreg: Convert ID_AA64ISAR2_EL1 to automatic generation Automatically generate defines for ID_AA64ISAR2_EL1, using the definitions in DDI0487H.a. No functional changes. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-22-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 27 --------------------------- arch/arm64/tools/sysreg | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 27 deletions(-) commit f7b5115cc39cfbe49a1d0b57605c918237e1b8c2 Author: Mark Brown Date: Mon Jul 4 18:02:54 2022 +0100 arm64/sysreg: Convert ID_AA64ISAR1_EL1 to automatic generation Automatically generate defines for ID_AA64ISAR1_EL1, using the definitions in DDI0487H.a. No functional changes. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-21-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 34 ----------------- arch/arm64/tools/sysreg | 83 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 34 deletions(-) commit d1b60bed639bd5ea6c4a80d43816e05c16c0ec6c Author: Mark Brown Date: Mon Jul 4 18:02:53 2022 +0100 arm64/sysreg: Convert GMID to automatic generation Automatically generate the register definitions for GMID as per DDI0487H.a, no functional change. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-20-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 1 - arch/arm64/tools/sysreg | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 5589083d802b1f1434f9481f671eee5d985f5772 Author: Mark Brown Date: Mon Jul 4 18:02:52 2022 +0100 arm64/sysreg: Convert DCZID_EL0 to automatic generation Convert DCZID_EL0 to automatic register generation as per DDI0487H.a, no functional change. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-19-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 5 ----- arch/arm64/tools/sysreg | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) commit 9a3634d023012cf54e541f825ed11ff481c6a110 Author: Mark Brown Date: Mon Jul 4 18:02:51 2022 +0100 arm64/sysreg: Convert CTR_EL0 to automatic generation Convert CTR_EL0 to automatic register generation as per DDI0487H.a, no functional change. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-18-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 16 ---------------- arch/arm64/tools/sysreg | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 16 deletions(-) commit b2d71f275d544719598ed754069f2bb421e4af17 Author: Mark Brown Date: Mon Jul 4 18:02:50 2022 +0100 arm64/sysreg: Add _EL1 into ID_AA64ISAR2_EL1 definition names Normally we include the full register name in the defines for fields within registers but this has not been followed for ID registers. In preparation for automatic generation of defines add the _EL1s into the defines for ID_AA64ISAR2_EL1 to follow the convention. No functional changes. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-17-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/asm_pointer_auth.h | 2 +- arch/arm64/include/asm/cpufeature.h | 2 +- arch/arm64/include/asm/sysreg.h | 34 +++++++++++++------------- arch/arm64/kernel/cpufeature.c | 34 +++++++++++++------------- arch/arm64/kernel/idreg-override.c | 4 +-- arch/arm64/kvm/hyp/include/nvhe/fixed_config.h | 4 +-- arch/arm64/kvm/hyp/nvhe/sys_regs.c | 4 +-- arch/arm64/kvm/sys_regs.c | 6 ++--- 8 files changed, 45 insertions(+), 45 deletions(-) commit aa50479b4f8adc8d4f0744a2d060f6e5c014d279 Author: Mark Brown Date: Mon Jul 4 18:02:49 2022 +0100 arm64/sysreg: Add _EL1 into ID_AA64ISAR1_EL1 definition names Normally we include the full register name in the defines for fields within registers but this has not been followed for ID registers. In preparation for automatic generation of defines add the _EL1s into the defines for ID_AA64ISAR1_EL1 to follow the convention. No functional changes. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-16-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/asm_pointer_auth.h | 2 +- arch/arm64/include/asm/sysreg.h | 62 +++++++++--------- arch/arm64/kernel/cpufeature.c | 90 +++++++++++++------------- arch/arm64/kernel/idreg-override.c | 8 +-- arch/arm64/kvm/hyp/include/nvhe/fixed_config.h | 28 ++++---- arch/arm64/kvm/hyp/nvhe/sys_regs.c | 8 +-- arch/arm64/kvm/sys_regs.c | 8 +-- 7 files changed, 103 insertions(+), 103 deletions(-) commit b7e4a2d787532d659b6c96c6fbbebe6d92d2a040 Author: Mark Brown Date: Mon Jul 4 18:02:48 2022 +0100 arm64/sysreg: Remove defines for RPRES enumeration We have defines for the RPRES enumeration in ID_AA64ISAR2 which do not follow our normal conventions. Since these defines are never used just remove them. No functional changes. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-15-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 2 -- 1 file changed, 2 deletions(-) commit 8d8feb0eaee12eccd2b5d12af2cbb86cb427945d Author: Mark Brown Date: Mon Jul 4 18:02:47 2022 +0100 arm64/sysreg: Standardise naming for ID_AA64ZFR0_EL1 fields The various defines for bitfields in ID_AA64ZFR0_EL1 do not follow our conventions for register field names, they omit the _EL1, they don't use specific defines for enumeration values and they don't follow the naming in the architecture in some cases. In preparation for automatic generation bring them into line with convention. No functional changes. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-14-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 40 ++++++++++++++++++++-------------------- arch/arm64/kernel/cpufeature.c | 38 +++++++++++++++++++------------------- 2 files changed, 39 insertions(+), 39 deletions(-) commit f13d54697bbeff19c13774f7af1fd267d696f0e4 Author: Mark Brown Date: Mon Jul 4 18:02:46 2022 +0100 arm64/sysreg: Standardise naming for ID_AA64SMFR0_EL1 enums We have a series of defines for enumeration values we test for in the fields in ID_AA64SMFR0_EL1 which do not follow our usual convention of including the EL1 in the name and having _IMP at the end of the basic "feature present" define. In preparation for automatic register generation bring the defines into sync with convention, no functional change. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-13-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/el2_setup.h | 2 +- arch/arm64/include/asm/sysreg.h | 30 +++++++++++++++--------------- arch/arm64/kernel/cpufeature.c | 32 ++++++++++++++++---------------- 3 files changed, 32 insertions(+), 32 deletions(-) commit 9a2f3290bb101146246eaf3f807bdc9718b56e49 Author: Mark Brown Date: Mon Jul 4 18:02:45 2022 +0100 arm64/sysreg: Standardise naming for WFxT defines The defines for WFxT refer to the feature as WFXT and use SUPPORTED rather than IMP. In preparation for automatic generation of defines update these to be more standard. No functional changes. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-12-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 6 +++--- arch/arm64/kernel/cpufeature.c | 8 ++++---- arch/arm64/kvm/sys_regs.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) commit 356137e68a9f920c3fa0d2cd41dbff43c77010a8 Author: Mark Brown Date: Mon Jul 4 18:02:44 2022 +0100 arm64/sysreg: Make BHB clear feature defines match the architecture The architecture refers to the field identifying support for BHB clear as BC but the kernel has called it CLEARBHB. In preparation for generation of defines for ID_AA64ISAR2_EL1 rename to use the architecture's naming. No functional changes. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-11-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 2 +- arch/arm64/include/asm/sysreg.h | 2 +- arch/arm64/kernel/cpufeature.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 38e29671813bef415288fd42f378f703f185aa55 Author: Mark Brown Date: Mon Jul 4 18:02:43 2022 +0100 arm64/sysreg: Align pointer auth enumeration defines with architecture The defines used for the pointer authentication feature enumerations do not follow the naming convention we've decided to use where we name things after the architecture feature that introduced. Prepare for generating the defines for the ISA ID registers by updating to use the feature names. No functional changes. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-10-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 34 +++++++++++++++++----------------- arch/arm64/kernel/cpufeature.c | 24 ++++++++++++------------ 2 files changed, 29 insertions(+), 29 deletions(-) commit e97575533a801bc9b0c690bb7e58f126ede4ad41 Author: Mark Brown Date: Mon Jul 4 18:02:42 2022 +0100 arm64/mte: Standardise GMID field name definitions Usually our defines for bitfields in system registers do not include a SYS_ prefix but those for GMID do. In preparation for automatic generation of defines remove that prefix. No functional change. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-9-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 4 ++-- arch/arm64/kernel/cpufeature.c | 2 +- arch/arm64/lib/mte.S | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit bacf3085bf03396eb1e51be88639e8e2310fe59c Author: Mark Brown Date: Mon Jul 4 18:02:41 2022 +0100 arm64/sysreg: Standardise naming for DCZID_EL0 field names The constants defining field names for DCZID_EL0 do not include the _EL0 that is included as part of our standard naming scheme. In preparation for automatic generation of the defines add the _EL0 in. No functional change. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-8-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 4 ++-- arch/arm64/kernel/cpufeature.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 5b345e39d3ebc213904bf959605be056fe53682c Author: Mark Brown Date: Mon Jul 4 18:02:40 2022 +0100 arm64/sysreg: Standardise naming for CTR_EL0 fields cache.h contains some defines which are used to represent fields and enumeration values which do not follow the standard naming convention used for when we automatically generate defines for system registers. Update the names of the constants to reflect standardised naming and move them to sysreg.h. There is also a helper CTR_L1IP() which was open coded and has been converted to use SYS_FIELD_GET(). Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-7-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/cache.h | 31 +++++++++---------------------- arch/arm64/include/asm/sysreg.h | 15 +++++++++++++++ arch/arm64/kernel/alternative.c | 2 +- arch/arm64/kernel/cpu_errata.c | 2 +- arch/arm64/kernel/cpufeature.c | 20 ++++++++++---------- arch/arm64/kernel/cpuinfo.c | 12 ++++++------ arch/arm64/kernel/traps.c | 6 +++--- 7 files changed, 45 insertions(+), 43 deletions(-) commit 971f4592881524ddaa7ab487182789925cef4599 Author: Mark Brown Date: Mon Jul 4 18:02:39 2022 +0100 arm64/cache: Restrict which headers are included in __ASSEMBLY__ Future changes to generate register definitions automatically will cause this header to be included in a linker script. This will mean that headers it in turn includes that are not safe for use in such a context (eg, due to the use of assembler macros) cause build problems. Avoid these issues by moving the affected includes and associated defines to the section of the file already guarded by ifndef __ASSEMBLY__. Suggested-by: Will Deacon Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-6-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/cache.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 3a87d53853c57c4abea0a2f37cc874c102c2c712 Author: Mark Brown Date: Mon Jul 4 18:02:38 2022 +0100 arm64/sysreg: Add SYS_FIELD_GET() helper Add a SYS_FIELD_GET() helper to match SYS_FIELD_PREP(), providing a simplified interface to FIELD_GET() when using the generated defines with standardized naming. Signed-off-by: Mark Brown Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20220704170302.2609529-5-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 3 +++ 1 file changed, 3 insertions(+) commit f43ff286512ec2da2e1038ab76471e9a07e3a951 Author: Mark Brown Date: Mon Jul 4 18:02:37 2022 +0100 arm64/sysreg: Allow leading blanks on comments in sysreg file Currently we only accept comments where the # is placed at the start of a line, allow leading blanks so we can format comments inside definitions in a more pleasing manner. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-4-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/tools/gen-sysreg.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9105a295d6f507bac733d9681c15c418d5db8aee Author: Mark Brown Date: Mon Jul 4 18:02:36 2022 +0100 arm64/idreg: Fix tab/space damage Quite a few of the overrides in idreg-override.c have a mix of tabs and spaces in their definitions, fix these. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-3-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/idreg-override.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit dabb128debc4e9dcdb71f395f5b32b201f4fd241 Author: Mark Brown Date: Mon Jul 4 18:02:35 2022 +0100 arm64/cpuinfo: Remove references to reserved cache type In 155433cb365ee466 ("arm64: cache: Remove support for ASID-tagged VIVT I-caches") we removed all the support fir AIVIVT cache types and renamed all references to the field to say "unknown" since support for AIVIVT caches was removed from the architecture. Some confusion has resulted since the corresponding change to the architecture left the value named as AIVIVT but documented it as reserved in v8, refactor the code so we don't define the constant instead. This will help with automatic generation of this register field since it means we care less about the correspondence with the ARM. No functional change, the value displayed to userspace is unchanged. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220704170302.2609529-2-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/cache.h | 1 - arch/arm64/kernel/cpuinfo.c | 23 +++++++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) commit 4890cc18f94979b406f95708f8cb238eb2d0e5a9 Author: Anshuman Khandual Date: Tue Jul 5 11:55:56 2022 +0530 arm64/mm: Define defer_reserve_crashkernel() Crash kernel memory reservation gets deferred, when either CONFIG_ZONE_DMA or CONFIG_ZONE_DMA32 config is enabled on the platform. This deferral also impacts overall linear mapping creation including the crash kernel itself. Just encapsulate this deferral check in a new helper for better clarity. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Link: https://lore.kernel.org/r/20220705062556.1845734-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/memory.h | 5 +++++ arch/arm64/mm/init.c | 4 ++-- arch/arm64/mm/mmu.c | 6 ++---- 3 files changed, 9 insertions(+), 6 deletions(-) commit 1ba1fd7d775dbccf43951671a7331c561408e72b Author: Chanho Park Date: Fri Jul 1 10:52:26 2022 +0900 arm64: dts: exynosautov9: add usi device tree nodes Universal Serial Interface (USI) supports three types of serial interface such as Universal Asynchronous Receiver and Transmitter (UART), Serial Peripheral Interface (SPI), and Inter-Integrated Circuit (I2C). Each protocols can be working independently and configured as one of those using external configuration inputs. Exynos Auto v9 SoC support 12 USIs. When a USI uses two pins such as i2c and 3 wire uarts(RX/TX only), we can use remain two pins as i2c mode. So, we can define one USI node that includes serial/spi and hsi2c. usi_i2c nodes can be used only for i2c mode. We can have below combinations for one USI. 1) The usi node is used either 4 pin uart or 4 pin spi -> No usi_i2c can be used 2) The usi node is used 2 pin uart(RX/TX) and i2c(SDA/SCL) -> usi_i2c should be enabled to use the latter i2c 3) The usi node is used i2c(SDA/SCL) and i2c(SDA/SCL) -> usi_i2c should be enabled to use the latter i2c By default, all USIs are initially set to uart mode by below setting. samsung,mode = ; You can change it either USI_V2_SPI or USI_V2_I2C. Signed-off-by: Chanho Park Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220701015226.32781-6-chanho61.park@samsung.com arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 1067 ++++++++++++++++++++++++++ 1 file changed, 1067 insertions(+) commit aae10d2bc56fd5c4e9741b98f220e56ca88bf7ca Author: Chanho Park Date: Fri Jul 1 10:52:25 2022 +0900 arm64: dts: exynosautov9: prepare usi0 changes Before adding whole USI nodes, this applies the changes of usi0 in advance. To be the usi0 and serian_0 nodes as SoC default, some properties should be moved to exynosautov9-sadk.dts. Signed-off-by: Chanho Park Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220701015226.32781-5-chanho61.park@samsung.com arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts | 2 ++ arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) commit 358ab0d11d8446a93efc9c79007e8513e8becc30 Author: Chanho Park Date: Fri Jul 1 10:52:24 2022 +0900 arm64: dts: exynosautov9: add pdma0 device tree node Add an ARM pl330 dma controller DT node as pdma0. Signed-off-by: Chanho Park Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220701015226.32781-4-chanho61.park@samsung.com arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 4e112c7b5df2c37545836397b4297117fc7887ad Author: Chanho Park Date: Fri Jul 1 10:52:22 2022 +0900 dt-bindings: soc: samsung: usi: add exynosautov9-usi compatible Add samsung,exynosautov9-usi dedicated compatible for representing USI of Exynos Auto v9 SoC. Signed-off-by: Chanho Park Reviewed-by: Sam Protsenko Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220701015226.32781-2-chanho61.park@samsung.com Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ec53d77ae3d5405aa252a99cd2914c87296d9fb8 Author: Christophe JAILLET Date: Sun Jul 3 18:46:36 2022 +0200 cxgb4: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. While at it, remove a useless bitmap_zero(). The bitmap is already zeroed when allocated. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/8a2168ef9871bd9c4f1cf19b8d5f7530662a5d15.1656866770.git.christophe.jaillet@wanadoo.fr Signed-off-by: Paolo Abeni drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 6 ++--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 8 +++---- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 27 +++++++++------------- 3 files changed, 17 insertions(+), 24 deletions(-) commit ba205449828f47f80532a1453beef5eed2982176 Author: Chanho Park Date: Mon Jun 27 09:58:32 2022 +0900 arm64: dts: exynosautov9: correct spi11 pin names They should be started with "gpp5-". Fixes: 31bbac5263aa ("arm64: dts: exynos: add initial support for exynosautov9 SoC") Signed-off-by: Chanho Park Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220627005832.8709-1-chanho61.park@samsung.com arch/arm64/boot/dts/exynos/exynosautov9-pinctrl.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 55ae465222d0296e81f707c2b9447e715b59b9ac Author: Paolo Abeni Date: Tue Jul 5 09:17:04 2022 +0200 net/mlx5: fix 32bit build We can't use the division operator on 64 bits integers, that breaks 32 bits build. Instead use the relevant helper. Fixes: 6ddac26cf763 ("net/mlx5e: Add support to modify hardware flow meter parameters") Acked-by: Saeed Mahameed Link: https://lore.kernel.org/r/ecb00ddd1197b4f8a4882090206bd2eee1eb8b5b.1657005206.git.pabeni@redhat.com Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlx5/core/en/tc/meter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 81e005842d0b8167c059553a1c29c36d8a7a9329 Author: Randy Dunlap Date: Wed Mar 30 02:56:52 2022 +0100 media: isl7998x: select V4L2_FWNODE to fix build error Fix build error when VIDEO_ISL7998X=y and V4L2_FWNODE=m by selecting V4L2_FWNODE. microblaze-linux-ld: drivers/media/i2c/isl7998x.o: in function `isl7998x_probe': (.text+0x8f4): undefined reference to `v4l2_fwnode_endpoint_parse' Cc: stable@vger.kernel.org # 5.18 and above Fixes: 51ef2be546e2 ("media: i2c: isl7998x: Add driver for Intersil ISL7998x") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Marek Vasut Cc: Pengutronix Kernel Team Reviewed-by: Michael Tretter Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 1 + 1 file changed, 1 insertion(+) commit cfb5a2dbf1413a0086e987d99ad591b91fc9cf5c Author: Magnus Karlsson Date: Thu Jun 30 11:37:17 2022 +0200 bpf, samples: Remove AF_XDP samples Remove the AF_XDP samples from samples/bpf/ as they are dependent on the AF_XDP support in libbpf. This support has now been removed in the 1.0 release, so these samples cannot be compiled anymore. Please start to use libxdp instead. It is backwards compatible with the AF_XDP support that was offered in libbpf. New samples can be found in the various xdp-project repositories connected to libxdp and by googling. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Toke Høiland-Jørgensen Acked-by: Maciej Fijalkowski Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/20220630093717.8664-1-magnus.karlsson@gmail.com MAINTAINERS | 2 - samples/bpf/Makefile | 9 - samples/bpf/xdpsock.h | 19 - samples/bpf/xdpsock_ctrl_proc.c | 190 ---- samples/bpf/xdpsock_kern.c | 24 - samples/bpf/xdpsock_user.c | 2019 --------------------------------------- samples/bpf/xsk_fwd.c | 1085 --------------------- 7 files changed, 3348 deletions(-) commit 990a6194f7e16cc23334892287f32899e241b1a9 Author: Quentin Monnet Date: Fri Jul 1 10:38:05 2022 +0100 bpftool: Rename "bpftool feature list" into "... feature list_builtins" To make it more explicit that the features listed with "bpftool feature list" are known to bpftool, but not necessary available on the system (as opposed to the probed features), rename the "feature list" command into "feature list_builtins". Note that "bpftool feature list" still works as before given that we recognise arguments from their prefixes; but the real name of the subcommand, in particular as displayed in the man page or the interactive help, will now include "_builtins". Since we update the bash completion accordingly, let's also take this chance to redirect error output to /dev/null in the completion script, to avoid displaying unexpected error messages when users attempt to tab-complete. Suggested-by: Daniel Borkmann Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220701093805.16920-1-quentin@isovalent.com tools/bpf/bpftool/Documentation/bpftool-feature.rst | 4 ++-- tools/bpf/bpftool/bash-completion/bpftool | 8 ++++---- tools/bpf/bpftool/feature.c | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) commit 2064a132c0de3426d5ba43023200994e0c77e652 Author: Tobias Klauser Date: Thu Jun 30 10:26:18 2022 +0200 bpf: Omit superfluous address family check in __bpf_skc_lookup family is only set to either AF_INET or AF_INET6 based on len. In all other cases we return early. Thus the check against AF_UNSPEC can be omitted. Signed-off-by: Tobias Klauser Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220630082618.15649-1-tklauser@distanz.ch net/core/filter.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cc6280cf885ce9ab923b9f9779aa8fbe10983d20 Author: Marek Vasut Date: Sun May 22 22:24:04 2022 +0200 ARM: dts: stm32: Add ST MIPID02 bindings to AV96 Add DT bindings for ST MIPID02 and DCMI to Avenger96 base DT. Both the ST MIPID02 and DCMI are disabled by default, as the AV96 camera module is optional. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Manivannan Sadhasivam Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit f95a5242c54d528eab5c7c4f3f5910d72f585bbe Author: Marek Vasut Date: Sun May 22 22:24:03 2022 +0200 ARM: dts: stm32: Add alternate pinmux for RCC pin Add another mux option for RCC pin, this is used on AV96 board for e.g. sensor clock supply. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Manivannan Sadhasivam 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 arch/arm/boot/dts/stm32mp15-pinctrl.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit bcdf998ea3eae91921eb1327664db227fd6b773e Author: Marek Vasut Date: Sun May 22 22:24:02 2022 +0200 ARM: dts: stm32: Add alternate pinmux for DCMI pins Add another mux option for DCMI pins, this is used on AV96 board. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Manivannan Sadhasivam 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 arch/arm/boot/dts/stm32mp15-pinctrl.dtsi | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 49c66eb382da2ecac40f0b7d0e529ec9d24ce84e Author: Marek Vasut Date: Sun Jun 26 02:21:05 2022 +0200 ARM: dts: stm32: Add DHCOR based DRC Compact board Add DT for DH DRC Compact unit, which is a universal controller device. The system has two ethernet ports, one CAN, RS485 and RS232, USB, uSD card slot, eMMC and SDIO Wi-Fi. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue arch/arm/boot/dts/Makefile | 1 + .../arm/boot/dts/stm32mp153c-dhcor-drc-compact.dts | 30 ++ .../boot/dts/stm32mp15xx-dhcor-drc-compact.dtsi | 322 +++++++++++++++++++++ 3 files changed, 353 insertions(+) commit 35b2cb537c2147b61139e8ca226eb7c13fbe60b2 Author: Marek Vasut Date: Sun Jun 26 02:21:04 2022 +0200 ARM: dts: stm32: Add alternate pinmux for UART5 pins Add another mux option for UART5 pins, this is used on DRC Compact board. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp15-pinctrl.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit ced0cb456b429a126b8992035b3069db5f77f09e Author: Marek Vasut Date: Sun Jun 26 02:21:03 2022 +0200 ARM: dts: stm32: Add alternate pinmux for UART4 pins Add another mux option for UART4 pins, this is used on DRC Compact board. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp15-pinctrl.dtsi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 2ff9ec3a77f2d06165761e9606c4a5fccbe0feb2 Author: Marek Vasut Date: Sun Jun 26 02:21:02 2022 +0200 ARM: dts: stm32: Add alternate pinmux for UART3 pins Add another mux option for UART3 pins, this is used on DRC Compact board. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp15-pinctrl.dtsi | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 5eabbd30fe60e03367b0d06461d1f94ea46a1b8a Author: Marek Vasut Date: Sun Jun 26 02:21:01 2022 +0200 ARM: dts: stm32: Add alternate pinmux for SPI2 pins Add another mux option for SPI2 pins, this is used on DRC Compact board. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp15-pinctrl.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit bdb1f18fa959aa305c97708345fa9d9f90a59ef3 Author: Marek Vasut Date: Sun Jun 26 02:21:00 2022 +0200 ARM: dts: stm32: Add alternate pinmux for CAN1 pins Add another mux option for CAN1 pins, this is used on DRC Compact board. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp15-pinctrl.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit d9865c34b85af05ba0e07bf6f903eb6a56b06f25 Author: Marek Vasut Date: Sun Jun 26 02:20:59 2022 +0200 dt-bindings: arm: stm32: Add compatible string for DH electronics DHCOR DRC Compact Add DT compatible string for DH electronics STM32MP15xx DHCOR on DRC Compact carrier board into YAML DT binding document. This system is a general purpose DIN Rail Controller design. 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 Reviewed-by: Rob Herring Signed-off-by: Alexandre Torgue Documentation/devicetree/bindings/arm/stm32/stm32.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit fe7758e0e70b4199ff239720b53cff5248c8497c Author: Marek Vasut Date: Sun Jun 26 02:15:59 2022 +0200 ARM: dts: stm32: Fix SPI2 pinmux pin comments on stm32mp15 Those pin comments refer to SPI2 pins, not SPI1 pins, update the comments. No functional change. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp15-pinctrl.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a94afe18ac3b4cae88a50a1e5de6bfe9989f06b0 Merge: 874bdbfe624e e95ab1d85289 Author: Paolo Abeni Date: Tue Jul 5 11:35:00 2022 +0200 Merge branch 'af_unix-fix-regression-by-the-per-netns-hash-table-series' Kuniyuki Iwashima says: ==================== af_unix: Fix regression by the per-netns hash table series. The series 6dd4142fb5a9 ("Merge branch 'af_unix-per-netns-socket-hash'") replaced a global hash table with per-netns tables, which caused regression reported in the links below. [0][1] When a pathname socket is visible, any socket with the same type has to be able to connect to it even in different netns. The series puts all sockets into each namespace's hash table, making it impossible to look up a visible socket in different netns. On the other hand, while dumping sockets, they are filtered by netns. To keep such code simple, let's add a new global hash table only for pathname sockets and link them with sk_bind_node. Then we can keep all sockets in each per-netns table and look up pathname sockets via the global table. [0]: https://lore.kernel.org/netdev/B2AA3091-796D-475E-9A11-0021996E1C00@linux.ibm.com/ [1]: https://lore.kernel.org/netdev/5fb8d86f-b633-7552-8ba9-41e42f07c02a@gmail.com/ Changes: v3: * 1st: Update changelog s/named/pathname/ * 2nd: Fix checkpatch.pl CHECK by --strict option v2: https://lore.kernel.org/netdev/20220702014447.93746-1-kuniyu@amazon.com/ * Add selftest v1: https://lore.kernel.org/netdev/20220701072519.96097-1-kuniyu@amazon.com/ ==================== Link: https://lore.kernel.org/r/20220702154818.66761-1-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit e95ab1d852897a0b697cd0fb609d496ce97fff3a Author: Kuniyuki Iwashima Date: Sat Jul 2 08:48:18 2022 -0700 selftests: net: af_unix: Test connect() with different netns. This patch add a test that checks connect()ivity between two sockets: unnamed socket -> bound socket * SOCK_STREAM or SOCK_DGRAM * pathname or abstract * same or different netns Signed-off-by: Kuniyuki Iwashima Signed-off-by: Paolo Abeni tools/testing/selftests/net/.gitignore | 1 + tools/testing/selftests/net/af_unix/Makefile | 3 +- tools/testing/selftests/net/af_unix/unix_connect.c | 149 +++++++++++++++++++++ 3 files changed, 152 insertions(+), 1 deletion(-) commit 51bae889fe111e418321ff0e6bb5f67e64cb9042 Author: Kuniyuki Iwashima Date: Sat Jul 2 08:48:17 2022 -0700 af_unix: Put pathname sockets in the global hash table. Commit cf2f225e2653 ("af_unix: Put a socket into a per-netns hash table.") accidentally broke user API for pathname sockets. A socket was able to connect() to a pathname socket whose file was visible even if they were in different network namespaces. The commit puts all sockets into a per-netns hash table. As a result, connect() to a pathname socket in a different netns fails to find it in the caller's per-netns hash table and returns -ECONNREFUSED even when the task can view the peer socket file. We can reproduce this issue by: Console A: # python3 >>> from socket import * >>> s = socket(AF_UNIX, SOCK_STREAM, 0) >>> s.bind('test') >>> s.listen(32) Console B: # ip netns add test # ip netns exec test sh # python3 >>> from socket import * >>> s = socket(AF_UNIX, SOCK_STREAM, 0) >>> s.connect('test') Note when dumping sockets by sock_diag, procfs, and bpf_iter, they are filtered only by netns. In other words, even if they are visible and connect()able, all sockets in different netns are skipped while iterating sockets. Thus, we need a fix only for finding a peer pathname socket. This patch adds a global hash table for pathname sockets, links them with sk_bind_node, and uses it in unix_find_socket_byinode(). By doing so, we can keep sockets in per-netns hash tables and dump them easily. Thanks to Sachin Sant and Leonard Crestez for reports, logs and a reproducer. Fixes: cf2f225e2653 ("af_unix: Put a socket into a per-netns hash table.") Reported-by: Sachin Sant Reported-by: Leonard Crestez Tested-by: Sachin Sant Tested-by: Nathan Chancellor Signed-off-by: Kuniyuki Iwashima Tested-by: Leonard Crestez Signed-off-by: Paolo Abeni net/unix/af_unix.c | 47 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 10 deletions(-) commit 08472f6ebdc23334ad11dcd761d2d52c32897793 Author: Tiezhu Yang Date: Mon Jun 27 15:07:13 2022 +0800 MIPS: Loongson64: Fix section mismatch warning prom_init_numa_memory() is annotated __init and not used by any module, thus don't export it. Remove not needed EXPORT_SYMBOL for prom_init_numa_memory() to fix the following section mismatch warning: LD vmlinux.o MODPOST vmlinux.symvers WARNING: modpost: vmlinux.o(___ksymtab+prom_init_numa_memory+0x0): Section mismatch in reference from the variable __ksymtab_prom_init_numa_memory to the function .init.text:prom_init_numa_memory() The symbol prom_init_numa_memory is exported and annotated __init Fix this by removing the __init annotation of prom_init_numa_memory or drop the export. This is build on Linux 5.19-rc4. Fixes: 6fbde6b492df ("MIPS: Loongson64: Move files to the top-level directory") Signed-off-by: Tiezhu Yang Reviewed-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer arch/mips/loongson64/numa.c | 1 - 1 file changed, 1 deletion(-) commit 7a9f743ceead60ed454c46fbc3085ee9a79cbebb Author: Liang He Date: Fri Jul 1 20:41:12 2022 +0800 mips: cavium-octeon: Fix missing of_node_put() in octeon2_usb_clocks_start We should call of_node_put() for the reference 'uctl_node' returned by of_get_parent() which will increase the refcount. Otherwise, there will be a refcount leak bug. Signed-off-by: Liang He Signed-off-by: Thomas Bogendoerfer arch/mips/cavium-octeon/octeon-platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5f7e2f3e7ce78719c438e9240ea7aa6779632068 Author: Alexandre Belloni Date: Fri Jun 24 17:25:48 2022 +0200 MIPS: mscc: ocelot: enable FDMA usage Enable FDMA usage by adding "fdma" resource in regs and interrupts. Signed-off-by: Alexandre Belloni Signed-off-by: Clément Léger Reviewed-by: Vladimir Oltean Signed-off-by: Thomas Bogendoerfer arch/mips/boot/dts/mscc/ocelot.dtsi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 5e1138c657f717737134f89d7c05a1375ca712f2 Author: Zhang Jiaming Date: Wed Jun 22 18:27:20 2022 +0800 MIPS: Fix some typos Change 'modifed' to 'modified'. Change 'relys' to 'relies'. Signed-off-by: Zhang Jiaming Signed-off-by: Thomas Bogendoerfer arch/mips/cavium-octeon/executive/cvmx-helper-board.c | 4 ++-- arch/mips/include/asm/octeon/cvmx-helper-board.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) commit 34bb179738a6c39f3ed459da593946b8bdefb366 Author: Jiang Jian Date: Wed Jun 22 00:34:18 2022 +0800 MIPS: Alchemy: devboards: Remove duplicate 'the' in two places. file: ./arch/mips/alchemy/devboards/pm.c line: 20 * sources and configure the timeout after which the the TOYMATCH2 irq changed to * sources and configure the timeout after which the TOYMATCH2 irq Signed-off-by: Jiang Jian Signed-off-by: Thomas Bogendoerfer arch/mips/alchemy/devboards/pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c9de8233c9ce156bb050501d5cb00a57eaba5e2 Author: Colin Ian King Date: Mon Jun 20 12:55:49 2022 +0100 MIPS: PCI: Remove leading space in info message, rename pci There is an info message with an extraneous leading space. Remove it. Also rename pci to PCI. Signed-off-by: Colin Ian King Signed-off-by: Thomas Bogendoerfer arch/mips/pci/fixup-lemote2f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3bc5342c2e4aa07769ff4e5f6614ebb3a001fb55 Author: Uwe Kleine-König Date: Sat Jun 18 22:40:37 2022 +0200 mips: sgi-ip22: Drop redundant check from .remove() The remove callback is only called by the driver core if there is a driver to unbind, so there is no need to check dev->driver to be non-NULL. Signed-off-by: Uwe Kleine-König Signed-off-by: Thomas Bogendoerfer arch/mips/sgi-ip22/ip22-gio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7dbdf04d6bd8dd0c1d57d353fd4220442055e730 Author: Lukas Bulwahn Date: Mon Jun 13 14:14:08 2022 +0200 MAINTAINERS: add include/dt-bindings/mips to MIPS Maintainers of the directory Documentation/devicetree/bindings/mips are also the maintainers of the corresponding directory include/dt-bindings/mips. Add the file entry for include/dt-bindings/mips to the appropriate section in MAINTAINERS. Signed-off-by: Lukas Bulwahn Signed-off-by: Thomas Bogendoerfer MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 2a56dc650e546f700836aeab2921be819ab0cf7f Author: Neil Armstrong Date: Tue Jul 5 09:56:50 2022 +0200 phy: amlogic: Add G12A Analog MIPI D-PHY driver The Amlogic G12A SoCs embeds an Analog MIPI D-PHY used to communicate with DSI panels. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20220705075650.3165348-3-narmstrong@baylibre.com Signed-off-by: Vinod Koul drivers/phy/amlogic/Kconfig | 12 ++ drivers/phy/amlogic/Makefile | 1 + .../phy/amlogic/phy-meson-g12a-mipi-dphy-analog.c | 171 +++++++++++++++++++++ 3 files changed, 184 insertions(+) commit 76ab79f9726c37a532d069747f3b4f33ba9677d5 Author: Neil Armstrong Date: Tue Jul 5 09:56:49 2022 +0200 dt-bindings: phy: add Amlogic G12A Analog MIPI D-PHY bindings The Amlogic G12A SoCs embeds an Analog MIPI D-PHY to communicate with DSI panels, this adds the bindings. This Analog D-PHY works with a separate Digital MIPI D-PHY. Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220705075650.3165348-2-narmstrong@baylibre.com Signed-off-by: Vinod Koul .../phy/amlogic,g12a-mipi-dphy-analog.yaml | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 65123b899818b1adf7388b3583624e0f1d8d6858 Author: Tom Rix Date: Mon Jul 4 10:28:36 2022 -0400 ALSA: hda/cs8409: change cs8409_fixups v.pins initializers to static sparse reports sound/pci/hda/patch_cs8409-tables.c:79:25: warning: symbol 'cs8409_cs42l42_pincfgs_no_dmic' was not declared. Should it be static? cs8409_cs42l42_pincfgs_no_dmic is only used by cs8409_fixups table as an initializer for the hda_fixup element v.pins. Both are defined in the patch_cs8408-table.c file but only cs8409_fixups is used externally in patch_cs8409.c. So cs8409_cs42l42_pincfgs_no_dmic should have a static storage class specifier. The other v.pins initializers in cs8409_fixups table, though declared extern in patch_cs8409.h are also only used in patch_cs8409-tables.c. So change all the v.pins initializers to static. Fixes: 9e7647b5070f ("ALSA: hda/cs8409: Move arrays of configuration to a new file") Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20220704142836.636204-1-trix@redhat.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_cs8409-tables.c | 6 +++--- sound/pci/hda/patch_cs8409.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) commit 4dd1a613e464e9036d5163fc8ec5f7dc6e394b53 Author: Herve Codina Date: Mon Jul 4 12:28:45 2022 +0200 ARM: dts: lan966x: Add UDPHS support Add UDPHS (the USB High Speed Device Port controller) support. The both lan966x SOCs (LAN9662 and LAN9668) have the same UDPHS IP. This IP is also the same as the one present in the SAMA5D3 SOC. Signed-off-by: Herve Codina Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220704102845.168438-4-herve.codina@bootlin.com arch/arm/boot/dts/lan966x.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 8e2388b2898a020791ac2ebcb03f6e20e8b278f1 Author: Herve Codina Date: Mon Jul 4 12:28:44 2022 +0200 dt-bindings: usb: atmel: Add Microchip LAN9662 compatible string The USB device controller available in the Microchip LAN9662 SOC is the same IP as the one present in the SAMA5D3 SOC. Add the LAN9662 compatible string and set the SAMA5D3 compatible string as a fallback for the LAN9662. Signed-off-by: Herve Codina Acked-by: Krzysztof Kozlowski Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220704102845.168438-3-herve.codina@bootlin.com Documentation/devicetree/bindings/usb/atmel-usb.txt | 3 +++ 1 file changed, 3 insertions(+) commit fc227d807b4b4da9fe05dcf61340eec80ff19de0 Author: Jiang Jian Date: Tue Jun 21 20:24:01 2022 +0800 phy: phy-brcm-usb: drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: ./drivers/phy/broadcom/phy-brcm-usb-init.c line: 864 * Make sure the the second and third memory controller changed to * Make sure the second and third memory controller Signed-off-by: Jiang Jian Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20220621122401.115500-1-jiangjian@cdjrlc.com Signed-off-by: Vinod Koul drivers/phy/broadcom/phy-brcm-usb-init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8dc60f8da22fdbaa1fafcfb5ff6d24bc9eff56aa Author: Peter Geis Date: Tue Jun 21 20:31:40 2022 -0400 phy: rockchip-inno-usb2: Sync initial otg state The initial otg state for the phy defaults to device mode. The actual state isn't detected until an ID IRQ fires. Fix this by syncing the ID state during initialization. Fixes: 51a9b2c03dd3 ("phy: rockchip-inno-usb2: Handle ID IRQ") Signed-off-by: Peter Geis Reviewed-by: Samuel Holland Link: https://lore.kernel.org/r/20220622003140.30365-1-pgwipeout@gmail.com Signed-off-by: Vinod Koul drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e007ec8422d3a4286f9ecdab35e92b710843b7e1 Author: Gabriel Fernandez Date: Fri May 13 16:51:48 2022 +0200 ARM: dts: stm32: add optee reserved memory on stm32mp135f-dk Add the static OP-TEE reserved memory regions. Signed-off-by: Gabriel Fernandez Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp135f-dk.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f95634becdad3fecc01310a45bd54497c64a13c9 Author: Gabriel Fernandez Date: Wed Feb 23 10:18:19 2022 +0100 ARM: dts: stm32: add RCC on STM32MP13x SoC family Enables Reset and Clocks Controller on STM32MP13 Signed-off-by: Gabriel Fernandez Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp131.dtsi | 116 +++++++++++++------------------------ arch/arm/boot/dts/stm32mp133.dtsi | 4 +- arch/arm/boot/dts/stm32mp13xc.dtsi | 3 +- arch/arm/boot/dts/stm32mp13xf.dtsi | 3 +- 4 files changed, 47 insertions(+), 79 deletions(-) commit 63058bfbdaf4c59cd5883d982a5a620471b7af52 Author: Gabriel Fernandez Date: Wed Feb 23 10:16:06 2022 +0100 ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP13 Enable optee and SCMI clocks support. Signed-off-by: Gabriel Fernandez Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp131.dtsi | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit f3af33a8ee11a8067f8ef757f4d66451552ab16a Author: Alexandre Torgue Date: Mon Jun 13 11:34:19 2022 +0200 dt-bindings: rcc: stm32: select the "secure" path for stm32mp13 Like for stm32mp15, when stm32 RCC node is used to interact with a secure context (using clock SCMI protocol), a different path has to be used for yaml verification. Signed-off-by: Alexandre Torgue Acked-by: Rob Herring Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml | 1 + 1 file changed, 1 insertion(+) commit ef4ea690c5d75685592d687e1bfe0466808de246 Author: Leonard Göhrs Date: Fri Jun 3 11:44:21 2022 +0200 ARM: dts: stm32: correct vcc-supply for eeprom on stm32mp15xx-osd32 According to the OSD32MP1 Power System overview[1] the EEPROM is connected to the VDD line and not to some single-purpose fixed regulator. Set the EEPROM supply according to the diagram to eliminate this parent-less regulator. [1]: https://octavosystems.com/app_notes/osd32mp1-power-system-overview/#connections Signed-off-by: Leonard Göhrs Acked-by: Ahmad Fatoum Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp15xx-osd32.dtsi | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit b2082d28d8c63678b80bf08e79b484c8982793f8 Author: Leonard Göhrs Date: Fri Jun 3 11:44:20 2022 +0200 ARM: dts: stm32: fix missing internally connected voltage regulator for OSD32MP1 According to the OSD32MP1 Power System overview[1] ldo3's input is always internally connected to vdd_ddr. [1]: https://octavosystems.com/app_notes/osd32mp1-power-system-overview/#connections Signed-off-by: Leonard Göhrs Reviewed-by: Ahmad Fatoum Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp15xx-osd32.dtsi | 1 + 1 file changed, 1 insertion(+) commit 95a73a50da9b0590c20010b64479d1736c95532b Author: Krzysztof Kozlowski Date: Thu May 26 22:36:32 2022 +0200 ARM: dts: stm32: adjust whitespace around '=' on MCU boards Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32429i-eval.dts | 8 ++++---- arch/arm/boot/dts/stm32h743.dtsi | 4 ++-- arch/arm/boot/dts/stm32h743i-disco.dts | 8 ++++---- arch/arm/boot/dts/stm32h743i-eval.dts | 8 ++++---- arch/arm/boot/dts/stm32h750i-art-pi.dts | 8 ++++---- 5 files changed, 18 insertions(+), 18 deletions(-) commit 1748c5c13e1586d3a359334f959626ba0f760fa5 Author: Marek Vasut Date: Wed May 4 14:49:45 2022 +0200 ARM: dts: stm32: Move DHCOR BUCK3 VDD 2V9 adjustment to 1V8 DTSI The Buck3 on DHCOR is used to supply IO voltage. It can output either 3V3 in the default DHCOR configuration, or 2V9 in case of AV96 DHCOR variant which has extra Empirion DCDC converter in front of the 1V8 IO supply, or outright 1V8 in case of 1V8 IO DHCOR without the Empirion DCDC converter. The 2V9 mode in case of AV96 DHCOR variant is used to reduce unnecessarily high input voltage to the Empirion DCDC converter, so move it into matching DTSI to stop confusing users. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp15xx-dhcor-io1v8.dtsi | 5 +++++ arch/arm/boot/dts/stm32mp15xx-dhcor-som.dtsi | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 7d9802bb0e34f118375937c6caa94818416c865a Author: Fabien Dessenne Date: Tue May 3 16:56:06 2022 +0200 ARM: dts: stm32: remove the IPCC "wakeup" IRQ on stm32mp151 The stm32 ipcc mailbox driver supports only two interrupts (rx and tx), so remove the unsupported "wakeup" one. Note that the EXTI interrupt 61 has two roles : it is hierarchically linked to the GIC IPCC "rx" interrupt, and it acts as a wakeup source. Signed-off-by: Fabien Dessenne Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp151.dtsi | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 43a4ab4cf5683b1d5efd0f5174f687412bfec9c5 Author: Kavyasree Kotagiri Date: Mon Jul 4 11:58:09 2022 -0200 ARM: dts: lan966x: Cleanup flexcom3 usart pinctrl settings. On pcb8291, Flexcom3 usart has only tx and rx pins. Cleaningup usart3 pinctrl settings. Signed-off-by: Kavyasree Kotagiri Acked-by: Nicolas Ferre Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220704135809.6952-1-kavyasree.kotagiri@microchip.com arch/arm/boot/dts/lan966x-pcb8291.dts | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 334fad1854158f566a277c3996a885cee56a037f Author: Robert Marko Date: Tue Jun 21 21:55:12 2022 +0200 phy: qcom-qmp-pcie: add IPQ8074 PCIe Gen3 QMP PHY support IPQ8074 has 2 different single lane PCIe PHY-s, one Gen2 and one Gen3. Gen2 one is already supported, so add the support for the Gen3 one. It uses the same register layout as IPQ6018. Signed-off-by: Robert Marko Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220621195512.1760362-3-robimarko@gmail.com Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 160 +++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) commit 85d43a69db2dd38048b86d6eb8a15f9150c524cd Author: Robert Marko Date: Tue Jun 21 21:55:11 2022 +0200 dt-bindings: phy: qcom,qmp: add IPQ8074 PCIe Gen3 PHY binding IPQ8074 has 2 different single lane PCIe PHY-s, one Gen2 and one Gen3. Gen2 one is already supported, document the bindings for the Gen3 one. Signed-off-by: Robert Marko Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220621195512.1760362-2-robimarko@gmail.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 2ec9bc8d1b0a742bce68b0f6b64a2500d882bf02 Author: Robert Marko Date: Tue Jun 21 21:55:10 2022 +0200 phy: qcom-qmp-pcie: make pipe clock rate configurable IPQ8074 Gen3 PCIe PHY uses 250MHz as the pipe clock rate instead of 125MHz like every other PCIe QMP PHY does, so make it configurable as part of the qmp_phy_cfg. Signed-off-by: Robert Marko Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220621195512.1760362-1-robimarko@gmail.com Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 0e704f6c42dc64f081d0b1738d06b2dee9524f27 Author: Andi Kleen Date: Thu Jun 23 10:32:17 2022 +0200 clk: renesas: rcar-gen4: Fix initconst confusion for cpg_pll_config A variable pointing to const isn't const itself. It'd have to contain "const" keyword after "*" too. Therefore, cpg_pll_config cannot be put to "rodata". Hence use __initdata instead of __initconst to fix this. Signed-off-by: Andi Kleen [js] more explanatory commit message. Signed-off-by: Jiri Slaby Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20220623083217.26433-2-jslaby@suse.cz Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/rcar-gen4-cpg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95d48d270305ad2ce4e6e8d84a9fb6ea49d6f8aa Author: Lad Prabhakar Date: Wed Jun 22 19:17:23 2022 +0100 clk: renesas: r9a07g043: Add support for RZ/Five SoC Renesas RZ/Five SoC has almost the same clock structure compared to the Renesas RZ/G2UL SoC, re-use the r9a07g043-cpg.c file to add support for RZ/Five SoC. This patch splits up the clocks and reset arrays for RZ/G2UL and RZ/Five SoC using #ifdef CONFIG_ARM64 and #ifdef CONFIG_RISCV checks. Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20220622181723.13033-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r9a07g043-cpg.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit ce05f30dc3a04ca32f91f9fd2a3de7e0b52b0417 Merge: 080bcd8d5997 668d361c9d89 Author: Geert Uytterhoeven Date: Tue Jul 5 09:20:22 2022 +0200 Merge tag 'renesas-r9a07g043-dt-binding-defs-tag2' into HEAD Renesas RZ/Five DT Binding Definitions Clock and reset definitions for the Renesas RZ/Five (R9A07G043) SoC, shared by driver and DT source files. commit 668d361c9d893be3cbd4f3650e1934a62b204def Author: Lad Prabhakar Date: Wed Jun 22 19:17:22 2022 +0100 dt-bindings: clock: r9a07g043-cpg: Add Renesas RZ/Five CPG Clock and Reset Definitions Renesas RZ/Five SoC has almost the same clock structure compared to the Renesas RZ/G2UL SoC, re-use the r9a07g043-cpg.h header file and just amend the RZ/Five CPG clock and reset definitions. Signed-off-by: Lad Prabhakar Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220622181723.13033-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven include/dt-bindings/clock/r9a07g043-cpg.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 36611d28f5130d8bb9aa36ec64d4ebcd736e8dba Author: Kuninori Morimoto Date: Fri Jul 1 01:41:02 2022 +0000 pinctrl: renesas: r8a779g0: Add missing MODSELx for AVBx AVB1 needs MODSEL6, AVB2 needs MODSEL5 settings. This patch adds missing MODSELx settings for the affected pins. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k08xsj81.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 58 ++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 28 deletions(-) commit 36fb7b8af55b83e0a9c88ef5d48623f4606e0688 Author: Kuninori Morimoto Date: Fri Jul 1 01:40:49 2022 +0000 pinctrl: renesas: r8a779g0: Add missing MODSELx for TSN0 TSN0 needs MODSEL4 settings. This patch adds missing MODSELx settings for the affected pins. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87letdsj8e.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit b811062e5fd0343c4884b5d1eb94e1344b518c76 Author: Kuninori Morimoto Date: Fri Jul 1 01:40:42 2022 +0000 pinctrl: renesas: r8a779g0: Add missing ERROROUTC_A This patch adds missing ERROROUTC_A settings. Current existing ERROROUTC should be _B, this patch tidies it up. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87mtdtsj8m.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c606c2fde23305473dcfe5a0bb7e8cb07c2ca11e Author: Kuninori Morimoto Date: Fri Jul 1 01:40:27 2022 +0000 pinctrl: renesas: r8a779g0: Add missing PWM R-Car V4H has PWM/PWM_A/PWM_B, but current PFC setting is mixed. This patch adds missing PWM settings, and tidies these up. According to Document, GP3_14 Function4 is PWM2_A, but we can't select it at P1SR3[27:24]. This patch just ignore it for now. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o7y9sj90.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 140 ++++++++++++++++++++------------- 1 file changed, 84 insertions(+), 56 deletions(-) commit 1c2646b5cebfff07e70ccf8e2653412cb3f4c257 Author: Kuninori Morimoto Date: Fri Jul 1 01:40:17 2022 +0000 pinctrl: renesas: r8a779g0: Add missing FlexRay This patch adds missing FlexRay pins. Because Document (Rev.0.51) has 2x FXR_TXENA/B pin with no suffix (_A, _B), this patch names them as _X. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pmipsj9a.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 85a9cbe4c57bb95878bc18670a34b942c3b938c2 Author: Kuninori Morimoto Date: Fri Jul 1 01:40:09 2022 +0000 pinctrl: renesas: r8a779g0: Add missing TPU0TOx_A This patch adds missing TPU0TOx_A. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87r135sj9j.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 59 +++++++++++++++++++++++++++++----- 1 file changed, 51 insertions(+), 8 deletions(-) commit c2b4b2cd632d17e76a6a2662a0043d8942c5e966 Author: Kuninori Morimoto Date: Fri Jul 1 01:39:59 2022 +0000 pinctrl: renesas: r8a779g0: Add missing CANFD5_B This patch adds missing CANFD5_B. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87sfnlsj9t.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 9c151c2be92becf242872a4a1e8d924ca3030b9c Author: Kuninori Morimoto Date: Fri Jul 1 01:39:51 2022 +0000 pinctrl: renesas: r8a779g0: Add missing SCIF1_X This patch adds missing SCIF1_X. Because Document (Rev.0.51) has 2x SCIF1 with no suffix (_A, _B), this patch names it as _X. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87tu81sja1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 51 ++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 8 deletions(-) commit 49e4697656bdd1cd3a97585e8dec5438093c4377 Author: Kuninori Morimoto Date: Fri Jul 1 01:39:44 2022 +0000 pinctrl: renesas: r8a779g0: Add missing SCIF3 R-Car V4H has SCIF3 and SCIF3_A, but current PFC setting is mixed. This patch cleans up SCIF3/SCIF3_A, based on Rev.0.51. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87v8shsja7.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 71 +++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 18 deletions(-) commit cf4f7891847bc5586326a7a39562631d6e4b7921 Author: Kuninori Morimoto Date: Fri Jul 1 01:39:34 2022 +0000 pinctrl: renesas: r8a779g0: Add missing HSCIF1_X This patch adds missing HSCIF1. Because Document (Rev.0.51) has 2x HSCIF1 with no suffix (_A, _B), this patch names it as _X. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87wncxsjah.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 53 +++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 8 deletions(-) commit 213b713255defaa650ff01e49ea95094771448b6 Author: Kuninori Morimoto Date: Fri Jul 1 01:39:24 2022 +0000 pinctrl: renesas: r8a779g0: Add missing HSCIF3_A This patch adds missing HSCIF3_A. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87y1xdsjar.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 56 +++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 8 deletions(-) commit 1b23d8a478bea9d124a60dcd6a98e63e767cc2cf Author: Kuninori Morimoto Date: Fri Jul 1 01:39:11 2022 +0000 pinctrl: renesas: r8a779g0: Add missing IRQx_A/IRQx_B This patch adds missing IRQx_A/IRQx_B, and tidies up existing IRQs. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87zghtsjb4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 0df46188a58895e132e4aa897aba29ea4364b2eb Author: Kuninori Morimoto Date: Fri Jul 1 01:39:03 2022 +0000 pinctrl: renesas: r8a779g0: Add missing TCLKx_A/TCLKx_B/TCLKx_X This patch adds missing TCLKx_A/TCLKx_B/TCLKx_X. Because Document (Rev.0.51) has 2x TCLK3/TCLK4 with no suffix (_A, _B), this patch names them as _X. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/871qv5txvt.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 475425ee38d62164739ba09dd39005dd6d3a328b Author: Kuninori Morimoto Date: Fri Jul 1 01:38:40 2022 +0000 pinctrl: renesas: r8a779g0: Tidyup POC1 voltage According to Rev.0.51 datasheet 004_R-CarV4H_pin_function.xlsx, GP1_23 - GP1_28 are 1.8/3.3V. But they are not on Table 7.28. According to the HW team, there are no bits assigned. This patch follows HW team's comment. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/8735fltxwg.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 5a494f02b8868a2a601089f0b5083bbe8cd738e7 Author: Kuninori Morimoto Date: Fri Jul 1 01:37:34 2022 +0000 pinctrl: renesas: r8a779g0: Tidy up ioctrl_regs Remove POC2 which is not documented, and remove TD0SEL3 which is not needed. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/874k01txy9.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 4 ---- 1 file changed, 4 deletions(-) commit b279b54b5075823954afc2e3360153d81b1da9de Author: Kuninori Morimoto Date: Fri Jul 1 01:37:21 2022 +0000 pinctrl: renesas: r8a779g0: Remove unused MOD_SELx definitions Current R-Car V4H PFC code has many MOD_SELx definitions with all 0. But these have no meaning. This patch removes them. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/875ykhtxym.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 72 +++++++++------------------------- 1 file changed, 18 insertions(+), 54 deletions(-) commit 1204bc463b1e1567deb544b206ad4b5568055368 Author: Kuninori Morimoto Date: Fri Jul 1 01:37:12 2022 +0000 pinctrl: renesas: r8a779g0: Remove unused IPxSRx definitions Current R-Car V4H PFC code has many IPxSRx definitions with all 0. But these have no meaning. This patch removes them. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/877d4xtxyv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 67 +++++++++++----------------------- 1 file changed, 22 insertions(+), 45 deletions(-) commit aa83be7c8dca66fa0bcc93316fa66cd9daa9d399 Author: Kuninori Morimoto Date: Fri Jul 1 01:36:59 2022 +0000 pinctrl: renesas: r8a779g0: Remove unused NOGP definitions Current R-Car V4H PFC code has many NOGP definitions. But these are not used, and they are different from original usage. This patch removes them. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/878rpdtxz8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 17 ----------------- 1 file changed, 17 deletions(-) commit 42cbd16e7c5474996a27a1f47c24f20bb3a145d0 Author: Kuninori Morimoto Date: Fri Jul 1 01:36:51 2022 +0000 pinctrl: renesas: r8a779g0: Fixup MODSEL8 MODSEL8 controls I2C vs. GPIO modes, and the Datasheet (Rev.0.51) is indicating that I2C needs 1. But we should use 0 for all cases in reality. New Datasheet should be updated. Signed-off-by: Takeshi Kihara Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a69ttxzg.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 050442ae4c74f83042b95e2df0538ec9183faa8e Author: Phong Hoang Date: Fri Jul 1 01:36:21 2022 +0000 pinctrl: renesas: r8a779g0: Add pins, groups and functions This patch adds SCIF, I2C, EthernetAVB, HSCIF, MMC, QSPI, MSIOF, PWM, CAN-FD, Ethernet-TSN, PCIe pins, groups, and functions. This patch was created based on the Rev.0.51 datasheet. Signed-off-by: Phong Hoang Signed-off-by: Hai Pham Signed-off-by: Thanh Quan Signed-off-by: CongDang Signed-off-by: Kazuya Mizuguch Signed-off-by: Tho Vu [Morimoto: merged above patches into one, cleanup white space, sort modules alphabetically, fixup comments] Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87bku9ty0b.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pfc-r8a779g0.c | 1620 +++++++++++++++++++++++++++++++- 1 file changed, 1619 insertions(+), 1 deletion(-) commit ad9bb2fec66262b03105cc9fa58e7e09b7958196 Author: LUU HOAI Date: Fri Jul 1 01:36:13 2022 +0000 pinctrl: renesas: Initial R8A779G0 (R-Car V4H) PFC support This patch adds initial pinctrl support for the R-Car V4H (R8A779G0) SoC, including bias, drive strength and voltage control. This patch was created based on the Rev.0.51 datasheet. Signed-off-by: LUU HOAI Signed-off-by: Takeshi Kihara [Morimoto: merge Kihara-san's MODSEL8 fixup patch, cleanup white space, care about reserved bits on each configs, fixup comments, etc.] Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87czepty0j.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/Kconfig | 5 + drivers/pinctrl/renesas/Makefile | 1 + drivers/pinctrl/renesas/core.c | 6 + drivers/pinctrl/renesas/pfc-r8a779g0.c | 2466 ++++++++++++++++++++++++++++++++ drivers/pinctrl/renesas/sh_pfc.h | 1 + 5 files changed, 2479 insertions(+) commit 665f77eb0d2f272b191bf442aef033cbce4647f9 Author: Kuninori Morimoto Date: Fri Jul 1 01:36:04 2022 +0000 pinctrl: renesas: Add PORT_GP_CFG_13 macros Add PORT_GP_CFG_13() and PORT_GP_13() helper macros, to be used by the r8a779g0 subdriver. Based on a larger patch in the BSP by LUU HOAI. Signed-off-by: LUU HOAI Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87edz5ty0r.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/sh_pfc.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1929683e5b94d64ea2717b38c034a6d06f8b488e Author: Kuninori Morimoto Date: Fri Jul 1 01:35:52 2022 +0000 dt-bindings: pinctrl: renesas,pfc: Document r8a779g0 support Document Pin Function Controller (PFC) support for the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87fsjlty13.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven Documentation/devicetree/bindings/pinctrl/renesas,pfc.yaml | 1 + 1 file changed, 1 insertion(+) commit 92a9b825257614af19cfb538d1adedbe83408b9a Author: Phil Edworthy Date: Fri Jun 24 09:48:33 2022 +0100 pinctrl: renesas: Add RZ/V2M pin and gpio controller driver Add support for pin and gpio controller driver for RZ/V2M SoC. Based on the RZ/G2L driver. Note that the DETDO and DETMS dedicated pins are currently not documented in the HW manual as to which pin group they are in. HW team has since said that the output level of 1.8V I/O group 4 (for MD0-7, and debugger) is the same as the 1.8V I/O group 3. Signed-off-by: Phil Edworthy Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20220624084833.22605-3-phil.edworthy@renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/Kconfig | 13 + drivers/pinctrl/renesas/Makefile | 1 + drivers/pinctrl/renesas/pinctrl-rzv2m.c | 1119 +++++++++++++++++++++++++++++++ 3 files changed, 1133 insertions(+) commit fe841d5ba7541b828bad98c2b9fa830e9078c575 Author: Johan Hovold Date: Thu Jun 9 14:03:38 2022 +0200 phy: qcom-qmp: clean up hex defines Use lower case hex consistently for define values. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220609120338.4080-4-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b46ae21d0ab6ba1eff6945cb4c128a60290d2ca9 Author: Johan Hovold Date: Thu Jun 9 14:03:37 2022 +0200 phy: qcom-qmp: clean up define alignment Clean up the QMP defines by removing some stray white space and making sure values are aligned. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220609120338.4080-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp.h | 48 ++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) commit 74acf0ee6eaafd7c44c34e379cdd45549fc57057 Author: Johan Hovold Date: Thu Jun 9 14:03:36 2022 +0200 phy: qcom-qmp: clean up v4 and v5 define order Clean up the QMP v4 and v5 defines by moving a few entries that were out of order. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220609120338.4080-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3896b8f09271403b641ce09de6b5362fbd622430 Author: Geert Uytterhoeven Date: Mon Jul 4 18:16:26 2022 +0200 arm64: dts: renesas: spider-cpu: Fix scif0/scif3 sort order The scif0 nodes were accidentally inserted after the scif3 nodes, breaking alphabetical sort order. Fixes: 1614c8624a48b9c9 ("arm64: dts: renesas: spider-cpu: Enable SCIF0 on second connector") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/2fe0e782351c202ed009dcd658f4bceec8f3a56d.1656951240.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779f0-spider-cpu.dtsi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 75a185fb92e58ccd3670258d8d3b826bd2fa6d29 Author: Liang He Date: Fri Jul 1 20:18:04 2022 +0800 ARM: shmobile: rcar-gen2: Increase refcount for new reference In rcar_gen2_regulator_quirk(), for_each_matching_node_and_match() will automatically increase and decrease the refcount. However, we should call of_node_get() for the new reference created in 'quirk->np'. Besides, we also should call of_node_put() before the 'quirk' being freed. Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220701121804.234223-1-windhl@126.com Signed-off-by: Geert Uytterhoeven arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5d5b7d509ff85675779caeafcffa8086d7094339 Author: Johan Hovold Date: Thu Jun 23 13:33:14 2022 +0200 phy: qcom-qmp-usb: clean up pipe clock handling Clean up the pipe clock handling by using dev_err_probe() to handle probe deferral and dropping the obsolete comment that claimed that the pipe clock was optional for some other PHY types. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220623113314.29761-4-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 36db6ce1e47cf85772a4f6199f8f14c1fad672ce Author: Johan Hovold Date: Thu Jun 23 13:33:13 2022 +0200 phy: qcom-qmp-pcie-msm8996: drop obsolete pipe clock type check Drop the obsolete pipe clock handling which was used to treat the pipe clock as optional for types other than PCIe and USB and which is no longer needed since splitting the PHY driver. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220623113314.29761-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) commit 8f662cd9f6aac13462f8f8aaafb58e5b3d26e342 Author: Johan Hovold Date: Thu Jun 23 13:33:12 2022 +0200 phy: qcom-qmp-pcie: drop obsolete pipe clock type check Drop the obsolete pipe clock handling which was used to treat the pipe clock as optional for types other than PCIe and USB and which is no longer needed since splitting the PHY driver. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220623113314.29761-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) commit 6a23afad443a8e067c7a9b77e4d2409cac32d79b Author: Markus Schneider-Pargmann Date: Fri Jun 24 14:27:25 2022 +0800 phy: phy-mtk-dp: Add driver for DP phy This is a new driver that supports the integrated DisplayPort phy for mediatek SoCs, especially the mt8195. The phy is integrated into the DisplayPort controller and will be created by the mtk-dp driver. This driver expects a struct regmap to be able to work on the same registers as the DisplayPort controller. It sets the device data to be the struct phy so that the DisplayPort controller can easily work with it. The driver does not have any devicetree bindings because the datasheet does not list the controller and the phy as distinct units. The interaction with the controller can be covered by the configure callback of the phy framework and its displayport parameters. Signed-off-by: Markus Schneider-Pargmann Signed-off-by: Guillaume Ranquet [Bo-Chen: Modify reviewers' comments.] Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220624062725.4095-1-rex-bc.chen@mediatek.com Signed-off-by: Vinod Koul MAINTAINERS | 1 + drivers/phy/mediatek/Kconfig | 8 ++ drivers/phy/mediatek/Makefile | 1 + drivers/phy/mediatek/phy-mtk-dp.c | 202 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 212 insertions(+) commit f6723b8495360ce3f99233d70ed8416a2ac01fbb Author: Rahul T R Date: Thu Jun 23 18:24:33 2022 +0530 phy: cdns-dphy: Add support for DPHY TX on J721e Add support new compatible for dphy-tx on j721e and implement dphy ops required. Signed-off-by: Rahul T R Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20220623125433.18467-4-r-ravikumar@ti.com Signed-off-by: Vinod Koul drivers/phy/cadence/cdns-dphy.c | 61 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit efcd5f5268a8689781f6d66e697440128219a6ed Author: Rahul T R Date: Thu Jun 23 18:24:32 2022 +0530 phy: cdns-dphy: Add band config for dphy tx Add support for band ctrl config for dphy tx. Signed-off-by: Rahul T R Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20220623125433.18467-3-r-ravikumar@ti.com Signed-off-by: Vinod Koul drivers/phy/cadence/cdns-dphy.c | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) commit 79446a2d2b4e1893cd8e80618ca3b91c359107ca Author: Rahul T R Date: Thu Jun 23 18:24:31 2022 +0530 phy: dt-bindings: cdns,dphy: Add compatible for dphy on j721e Add compatible to support dphy tx on j721e Signed-off-by: Rahul T R Reviewed-by: Laurent Pinchart Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220623125433.18467-2-r-ravikumar@ti.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/phy/cdns,dphy.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b113e55913e7f7f031d6cbf9d7b585c6b112f55a Author: Peter Geis Date: Sat Jun 25 17:27:11 2022 -0400 phy: rockchip-inno-usb2: Prevent incorrect error on probe If a phy supply is designated but isn't available at probe time, an EPROBE_DEFER is returned. Use dev_err_probe to prevent this from incorrectly printing during boot. Signed-off-by: Peter Geis Link: https://lore.kernel.org/r/20220625212711.558495-1-pgwipeout@gmail.com Signed-off-by: Vinod Koul drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f49f2ece44f4ba5d532f70e86ffcfe8d82cd5bce Author: Jiang Jian Date: Tue Jun 21 20:00:15 2022 +0800 phy: dphy: drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: ./drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c line: 139 * when in RxULPS check state, after the the logic enable the analog, changed to * when in RxULPS check state, after the logic enable the analog, Signed-off-by: Jiang Jian Reviewed-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20220621120015.113682-1-jiangjian@cdjrlc.com Signed-off-by: Vinod Koul drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de6026682569dd72988339c529ac040ce4fe2829 Author: Vidya Sagar Date: Wed Jun 29 11:34:32 2022 +0530 phy: tegra: Add PCIe PIPE2UPHY support for Tegra234 Synopsys DesignWare core based PCIe controllers in Tegra234 SoC interface with Universal PHY (UPHY) module through a PIPE2UPHY (P2U) module. For each PCIe lane of a controller, there is a P2U unit instantiated at hardware level. This driver provides support for the programming required for each P2U that is going to be used for a PCIe controller. Signed-off-by: Vidya Sagar Link: https://lore.kernel.org/r/20220629060435.25297-9-vidyas@nvidia.com Signed-off-by: Vinod Koul drivers/phy/tegra/phy-tegra194-p2u.c | 48 +++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) commit 93134b0a4bb565762eaaf41ade8c43a43acead5c Author: Vidya Sagar Date: Wed Jun 29 11:34:25 2022 +0530 dt-bindings: PHY: P2U: Add support for Tegra234 P2U block Add support for Tegra234 P2U (PIPE to UPHY) module block which is a glue module instantiated once for each PCIe lane between Synopsys DesignWare core based PCIe IP and Universal PHY block. Signed-off-by: Vidya Sagar Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220629060435.25297-2-vidyas@nvidia.com Signed-off-by: Vinod Koul .../devicetree/bindings/phy/phy-tegra194-p2u.yaml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit e4e46bc71c18407c087bbade3c92d4554207be21 Author: Jianjun Wang Date: Fri Jun 17 15:02:46 2022 +0800 phy: mediatek: Add PCIe PHY driver Add PCIe GEN3 PHY driver support on MediaTek chipsets. Signed-off-by: Jianjun Wang Reviewed-by: Chunfeng Yun Reviewed-by: AngeloGioachino Del Regno Link: https://lore.kernel.org/r/20220617070246.20142-3-jianjun.wang@mediatek.com Signed-off-by: Vinod Koul drivers/phy/mediatek/Kconfig | 11 ++ drivers/phy/mediatek/Makefile | 1 + drivers/phy/mediatek/phy-mtk-pcie.c | 267 ++++++++++++++++++++++++++++++++++++ 3 files changed, 279 insertions(+) commit 3a8802528db4341cd0a5fe06c777878ce7157143 Author: Jianjun Wang Date: Fri Jun 17 15:02:45 2022 +0800 dt-bindings: phy: mediatek: Add YAML schema for PCIe PHY Add YAML schema documentation for PCIe PHY on MediaTek chipsets. Signed-off-by: Jianjun Wang Reviewed-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220617070246.20142-2-jianjun.wang@mediatek.com Signed-off-by: Vinod Koul .../devicetree/bindings/phy/mediatek,pcie-phy.yaml | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit d4a0a189b72a7c98e4256292b18b67c69fbc9343 Author: Andy Shevchenko Date: Mon Jun 13 19:08:48 2022 +0300 phy: ti: tusb1210: Don't check for write errors when powering on On some platforms, like Intel Merrifield, the writing values during power on may timeout: tusb1210 dwc3.0.auto.ulpi: error -110 writing val 0x41 to reg 0x80 phy phy-dwc3.0.auto.ulpi.0: phy poweron failed --> -110 dwc3 dwc3.0.auto: error -ETIMEDOUT: failed to initialize core dwc3: probe of dwc3.0.auto failed with error -110 which effectively fails the probe of the USB controller. Drop the check as it was before the culprit commit (see Fixes tag). Fixes: 09a3512681b3 ("phy: ti: tusb1210: Improve ulpi_read()/_write() error checking") Signed-off-by: Andy Shevchenko Acked-by: Hans de Goede Tested-by: Ferry Toth Link: https://lore.kernel.org/r/20220613160848.82746-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul drivers/phy/ti/phy-tusb1210.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1ff1da40d6fc9b0125e1c0fcceb09f1d3bca9f05 Merge: 2311720a0182 fca5ad26b7d8 94a9e05228c8 4f0718bfa472 a7977d5cd9db eeda2bc4fcd9 97b10e15df73 Author: Dmitry Baryshkov Date: Tue Jul 5 06:01:16 2022 +0300 Merge branches 'msm-next-lumag-core', 'msm-next-lumag-dpu', 'msm-next-lumag-dp', 'msm-next-lumag-dsi', 'msm-next-lumag-hdmi', 'msm-next-lumag-mdp5' and 'msm-next-lumag-mdp4' into msm-next-lumag Changes in this merge: Core: - client utilization via fdinfo support - fix fence rollover issue DPU: - constification of HW catalog - support for using encoder as CRC source - WB support on sc7180 - WB resolution fixes - enable DSPP support for sc7280 DP: - dropped custom bulk clock implementation - made dp_bridge_mode_valid() return MODE_CLOCK_HIGH where applicable - fix link retraining on resolution change MDP5: - MSM8953 perf data HDMI: - YAML'ification of schema - dropped obsolete GPIO support - misc cleanups Signed-off-by: Dmitry Baryshkov commit 2311720a0182756f175fbf4afc1fb76ac487b587 Author: Rob Clark Date: Wed Jun 15 09:24:35 2022 -0700 drm/msm: Fix fence rollover issue And while we are at it, let's start the fence counter close to the rollover point so that if issues slip in, they are more obvious. Signed-off-by: Rob Clark Fixes: fde5de6cb461 ("drm/msm: move fence code to it's own file") Fixes: 5f3aee4ceb5b ("drm/msm: Handle fence rollover") Patchwork: https://patchwork.freedesktop.org/patch/489619/ Link: https://lore.kernel.org/r/20220615162435.3011793-1-robdclark@gmail.com [DB: fixed the conflict while applying the patch] Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/msm_fence.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 4400c3a1d48f7f7863ca65d24f99ad295b37726c Author: Wan Jiabing Date: Tue Apr 26 21:21:26 2022 +0800 drm/msm: Use div64_ul instead of do_div Fix following coccicheck warning: drivers/gpu/drm/msm/msm_gpu_devfreq.c:72:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead. Use div64_ul instead of do_div to avoid a possible truncation. Signed-off-by: Wan Jiabing Reviewed-by: Dmitry Baryshkov Acked-by: Tvrtko Ursulin Patchwork: https://patchwork.freedesktop.org/patch/483499/ Link: https://lore.kernel.org/r/20220426132126.686447-1-wanjiabing@vivo.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/msm_gpu_devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cfebe3fd599634540960ec37e3a6c2eb8b5bed2f Author: Rob Clark Date: Thu Jun 9 10:42:12 2022 -0700 drm/msm: Expose client engine utilization via fdinfo Similar to AMD commit 874442541133 ("drm/amdgpu: Add show_fdinfo() interface"), using the infrastructure added in previous patches, we add basic client info and GPU engine utilisation for msm. Example output: # cat /proc/`pgrep glmark2`/fdinfo/6 pos: 0 flags: 02400002 mnt_id: 21 ino: 162 drm-driver: msm drm-client-id: 7 drm-engine-gpu: 1734371319 ns drm-cycles-gpu: 1153645024 drm-maxfreq-gpu: 800000000 Hz See also: https://patchwork.freedesktop.org/patch/468505/ v2: Add dev-maxfreq-$engine and update drm-usage-stats.rst v3: spelling and compiler warning Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Acked-by: Tvrtko Ursulin Patchwork: https://patchwork.freedesktop.org/patch/488906/ Link: https://lore.kernel.org/r/20220609174213.2265938-2-robdclark@gmail.com Signed-off-by: Dmitry Baryshkov Documentation/gpu/drm-usage-stats.rst | 21 +++++++++++++++++++++ drivers/gpu/drm/msm/msm_drv.c | 19 ++++++++++++++++++- drivers/gpu/drm/msm/msm_gpu.c | 21 +++++++++++++++++++-- drivers/gpu/drm/msm/msm_gpu.h | 19 +++++++++++++++++++ 4 files changed, 77 insertions(+), 3 deletions(-) commit 1981c35bf7533d70f295b184bbb638d280fe2f36 Author: Rob Clark Date: Thu Jun 9 10:42:11 2022 -0700 drm: Add DRM_GEM_FOPS The DEFINE_DRM_GEM_FOPS() helper is a bit limiting if a driver wants to provide additional file ops, like show_fdinfo(). v2: Split out DRM_GEM_FOPS instead of making DEFINE_DRM_GEM_FOPS varardic v3: nits Signed-off-by: Rob Clark Acked-by: Thomas Zimmermann Patchwork: https://patchwork.freedesktop.org/patch/488904/ Link: https://lore.kernel.org/r/20220609174213.2265938-1-robdclark@gmail.com Signed-off-by: Dmitry Baryshkov include/drm/drm_gem.h | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 6867c9aff860b23ca5ffa6c427f0fbb7ccf3ac6b Author: Rob Clark Date: Mon Jun 13 13:49:10 2022 -0700 drm/msm: Make msm_gem_free_object() static Misc small cleanup I noticed. Not called from another object file since commit 3c9edd9c85f5 ("drm/msm: Introduce GEM object funcs") Signed-off-by: Rob Clark Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/489362/ Link: https://lore.kernel.org/r/20220613204910.2651747-1-robdclark@gmail.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/msm_gem.c | 2 +- drivers/gpu/drm/msm/msm_gem.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 93b793d88da8b2c7afd63c64772666ec4274efad Author: Dmitry Baryshkov Date: Sat May 21 18:14:36 2022 +0300 clk: qcom: gcc-msm8960: create tsens device if there are no child nodes Currently gcc-msm8960 driver manually creates tsens platform device manually. It would be better to follow IPQ8064 approach, where tsens device is defined as gcc's child device in the device tree. If nothing else, it removes gcc's dependency on QFPROM, thus allowing clock controller to be probed earlier. Don't create it in case there are available child nodes (tsens) inside the gcc's device tree node. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521151437.1489111-4-dmitry.baryshkov@linaro.org drivers/clk/qcom/gcc-msm8960.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 621f984840928f0bd14b20c86b70a15590ed2d3e Author: Dmitry Baryshkov Date: Sat May 21 18:14:35 2022 +0300 dt-bindings: clock: qcom,gcc-apq8064: split tsens to the child node Split tsens properties to the child node of the gcc. This follows the lead of ipq8064 (which also uses a separate node for tsens) and makes device tree closer to other platforms, where tsens is a completely separate device. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521151437.1489111-3-dmitry.baryshkov@linaro.org .../bindings/clock/qcom,gcc-apq8064.yaml | 40 ++++++++++++++++------ 1 file changed, 30 insertions(+), 10 deletions(-) commit 91a4cbf93326f2d27dda7361c43a5bb24cfd93c3 Author: Dmitry Baryshkov Date: Sat May 21 18:14:34 2022 +0300 dt-bindings: clock: qcom,gcc-apq8064: move msm8960 compat from gcc-other.yaml MSM8960 shares the design (and the driver) of the global clock controller with APQ8064. Move it from clock/qcom,gcc-other.yaml to clock/qcom,gcc-apq8064.yaml. As the example in gcc-other.yaml was using qcom,gcc-msm8960 compat string, change it to qcom,gcc-msm8974. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521151437.1489111-2-dmitry.baryshkov@linaro.org Documentation/devicetree/bindings/clock/qcom,gcc-apq8064.yaml | 6 ++++-- Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) commit f35aaef152d16caa9e27656c51e95b20f7af5514 Author: Yassine Oudjana Date: Thu Oct 21 13:25:23 2021 +0000 arm64: dts: qcom: msm8996: Add interconnect support Add interconnect providers for the multiple NoCs available on the platform, and assign interconnects used by some blocks. Signed-off-by: Yassine Oudjana Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20211021132329.234942-6-y.oudjana@protonmail.com arch/arm64/boot/dts/qcom/msm8996.dtsi | 93 +++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit e0f6d9eba3cf5bc1d7b7691ab6cd646f7468a7fc Author: Sean Anderson Date: Thu Jun 30 18:32:07 2022 -0400 arm64: dts: Add SFP node for TA 3.0 devices This adds an SFP node for Trust Architecture 3.0 devices. Signed-off-by: Sean Anderson Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 8 ++++++++ arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 8 ++++++++ arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 8 ++++++++ 3 files changed, 24 insertions(+) commit 043dce4e42f131c3ee5c1968b8395b1cbd34045b Author: Sean Anderson Date: Thu Jun 30 18:32:05 2022 -0400 arm64: dts: layerscape: Add SFP node for TA 2.1 devices This adds an appropriate SFP node for Trust Architecture 2.1 devices. Signed-off-by: Sean Anderson Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 8 ++++++++ arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 8 ++++++++ arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 8 ++++++++ 3 files changed, 24 insertions(+) commit 04069a86bf9650f82ee29715322165bd7739a7c2 Author: Sean Anderson Date: Thu Jun 30 18:32:06 2022 -0400 ARM: dts: layerscape: Add SFP node for TA 2.1 devices This adds an appropriate SFP node for Trust Architecture 2.1 devices. Signed-off-by: Sean Anderson Signed-off-by: Shawn Guo arch/arm/boot/dts/ls1021a.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 63f98153075167a6c88d8ac90bfd26f1887c670c Author: Yang Yingliang Date: Tue Jun 28 22:02:49 2022 +0800 soc: fsl: guts: check return value after calling of_iomap() in fsl_guts_get_soc_uid() of_iomap() may return NULL, so we need check the return value. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Michael Walle Signed-off-by: Shawn Guo drivers/soc/fsl/guts.c | 4 ++++ 1 file changed, 4 insertions(+) commit edf12b913abb69abce4cd6996398a4ce23e5b047 Author: Yang Yingliang Date: Tue Jun 28 22:02:48 2022 +0800 soc: fsl: guts: fix return value check in fsl_guts_init() In case of error, of_iomap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test and return -ENOMEM as error value. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Michael Walle Signed-off-by: Shawn Guo drivers/soc/fsl/guts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c6aaccf1c906fd9539b738a59f53dda603c99b2e Author: Linus Walleij Date: Sat Jul 2 00:53:39 2022 +0200 ARM: dts: ux500: Drop unused i2c power domain supply This regulator supply is replaced by the proper power domain. Reported-by: Rob Herring Link: https://lore.kernel.org/r/20220701225339.814962-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij arch/arm/boot/dts/ste-dbx5x0.dtsi | 5 ----- 1 file changed, 5 deletions(-) commit 900bd8cb85277dd23713f92db72dedd59b62d9fd Author: Mark Brown Date: Fri Jul 1 12:22:13 2022 +0100 arm64: defconfig: Enable Allwinner built in CODECs Allwinner provide an audio CODEC as part of their SoCs which is used on a number of designs, enable the driver as part of defconfig in order to improve coverage of this in the various automated testing systems. Signed-off-by: Mark Brown Reviewed-by: Samuel Holland Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220701112213.1765599-1-broonie@kernel.org arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit b8eb2df19fbf97aa1e950cf491232c2e3bef8357 Author: Samuel Holland Date: Sat Jul 2 08:28:15 2022 -0500 arm64: dts: allwinner: a64: orangepi-win: Fix LED node name "status" does not match any pattern in the gpio-leds binding. Rename the node to the preferred pattern. This fixes a `make dtbs_check` error. Signed-off-by: Samuel Holland Reviewed-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220702132816.46456-1-samuel@sholland.org arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b17403a56064c63b10dc56884b99114355f03e57 Author: Samuel Holland Date: Sat Jul 2 14:01:35 2022 -0500 clk: sunxi: Do not select the PRCM MFD The PRCM MFD driver is already selected by the two platforms where it is actually used (MACH_SUN6I and MACH_SUN8I). Selecting it here builds it unnecessarily on the rest of the Allwinner platforms. Signed-off-by: Samuel Holland Reviewed-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220702190135.51744-2-samuel@sholland.org drivers/clk/sunxi/Kconfig | 2 -- 1 file changed, 2 deletions(-) commit 2b4c206963a6a83ce39e321344da10009e44d99b Author: Samuel Holland Date: Sat Jul 2 14:01:34 2022 -0500 clk: sunxi: Limit legacy clocks to 32-bit ARM The sunxi legacy clocks were never compatible with any 64-bit SoC, so there is no point in building them as part of a 64-bit ARM kernel. They make even less sense being built in to a 64-bit RISC-V kernel. Signed-off-by: Samuel Holland Reviewed-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220702190135.51744-1-samuel@sholland.org drivers/clk/sunxi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21779cc21c732c5eff8ea1624be6590450baa30f Author: Hangyu Hua Date: Wed May 18 14:58:56 2022 +0800 drm: bridge: sii8620: fix possible off-by-one The next call to sii8620_burst_get_tx_buf will result in off-by-one When ctx->burst.tx_count + size == ARRAY_SIZE(ctx->burst.tx_buf). The same thing happens in sii8620_burst_get_rx_buf. This patch also change tx_count and tx_buf to rx_count and rx_buf in sii8620_burst_get_rx_buf. It is unreasonable to check tx_buf's size and use rx_buf. Fixes: e19e9c692f81 ("drm/bridge/sii8620: add support for burst eMSC transmissions") Signed-off-by: Hangyu Hua Reviewed-by: Andrzej Hajda Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220518065856.18936-1-hbh25y@gmail.com drivers/gpu/drm/bridge/sil-sii8620.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fca5ad26b7d8390f474d886a0778d4f9266c6662 Author: Kalyan Thota Date: Tue Jun 21 02:06:26 2022 -0700 drm/msm/disp/dpu1: add dspp support for sc7280 Add destination side post processing hw block support in sc7280. This hwblock enablement is necessary to support color features like CT Matix (Ex: Night Light feature) Signed-off-by: Kalyan Thota Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/490382/ Link: https://lore.kernel.org/r/1655802387-15275-1-git-send-email-quic_kalyant@quicinc.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit eeda2bc4fcd9f544b668efc6489ab165dc0d607e Author: Vladimir Lypak Date: Sat Jun 11 00:53:02 2022 +0200 drm/msm/mdp5: Add perf data for MDP v1.16 Add the perf data for the mdp found in msm8953. Signed-off-by: Vladimir Lypak Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/489153/ Link: https://lore.kernel.org/r/20220610225304.267508-1-luca@z3ntu.xyz Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c | 5 +++++ 1 file changed, 5 insertions(+) commit 97b10e15df73249a6e5dfe36d07322110748cf67 Author: Dmitry Baryshkov Date: Thu May 5 16:50:08 2022 +0300 drm/msm/mdp4: get rid of struct mdp4_platform_config Struct mdp4_platform_config is a relict from the DT-conversion time. Move the max_clk field to the mdp4_kms_init(), the place where it is used and drop the struct mdp4_platform_config and the mdp4_get_config() function. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/485050/ Link: https://lore.kernel.org/r/20220505135008.1351533-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 21 ++++++--------------- drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.h | 5 ----- 2 files changed, 6 insertions(+), 20 deletions(-) commit a143890fefa5c519772cace8be27ca1bd1792e95 Author: Dmitry Baryshkov Date: Thu May 5 16:50:07 2022 +0300 drm/msm/mdp4: move iommu_domain_alloc() call close to its usage Move iommu_domain_alloc() in front of adress space/IOMMU initialization. This allows us to drop it from struct mdp4_cfg_platform which remained from the pre-DT days. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/485049/ Link: https://lore.kernel.org/r/20220505135008.1351533-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 8 ++++---- drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.h | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) commit a7977d5cd9dbf4c9e8706d9e254655ed422859f0 Author: Dmitry Baryshkov Date: Thu Jun 16 11:50:57 2022 +0300 drm/msm/hdmi: support attaching the "next" bridge There might be a chain of bridges attached to the HDMI node (including but not limited to the display-connector bridge). Add support for attaching them right to the HDMI bridge chain. Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Patchwork: https://patchwork.freedesktop.org/patch/489709/ Link: https://lore.kernel.org/r/20220616085057.432353-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/hdmi/hdmi.c | 14 ++++++++++++++ drivers/gpu/drm/msm/hdmi/hdmi.h | 2 ++ 2 files changed, 16 insertions(+) commit 089008b698f8c4a42e5e73b0a5628509b608b8da Author: Dmitry Baryshkov Date: Thu Jun 16 11:50:54 2022 +0300 drm/msm/hdmi: drop empty bridge callbacks Drop empty callbacks msm_hdmi_bridge_enable() and msm_hdmi_bridge_disable(). Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Patchwork: https://patchwork.freedesktop.org/patch/489707/ Link: https://lore.kernel.org/r/20220616085054.432317-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 10 ---------- 1 file changed, 10 deletions(-) commit 0f390c8ca0e18149ec77967cedf12aac8284b48d Author: Dmitry Baryshkov Date: Thu Jun 9 15:23:48 2022 +0300 drm/msm/hdmi-phy: populate 8x60 HDMI PHY requirements Declare that 8x60 HDMI PHY uses the core-vdda regulator and slave_iface clock (this is the same config as is used by the 8960). Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/488863/ Link: https://lore.kernel.org/r/20220609122350.3157529-13-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/hdmi/hdmi_phy_8x60.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit ac1c2787bb297ccc0ae4d6071b3b21103145fe98 Author: Dmitry Baryshkov Date: Thu Jun 9 15:23:47 2022 +0300 drm/msm/hdmi: reuse MSM8960's config for MSM8660 MSM8660 requires the same set of clocks and regulators as MSM8960. Reuse MSM8960's config for the MSM8660 (8x60). Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/488864/ Link: https://lore.kernel.org/r/20220609122350.3157529-12-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/hdmi/hdmi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9edaba8751ca4e218d06bfeb002ef27c34057e18 Author: Dmitry Baryshkov Date: Thu Jun 9 15:23:46 2022 +0300 drm/msm/hdmi: merge platform config for 8974/8084/8994/8996 Since there is no more difference between the HDMI platform data between MSM8974/APQ8084/MSM8994/MSM8996, merge these configs into a single entry. Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/488868/ Link: https://lore.kernel.org/r/20220609122350.3157529-11-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/hdmi/hdmi.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) commit b45aff9688e7d0e2dc478b43125d6901849a16b6 Author: Dmitry Baryshkov Date: Thu Jun 9 15:23:45 2022 +0300 drm/msm/hdmi: drop hpd_regs usage on 8x74/8084 The MSM HDMI driver has support for hpd_regs on 8x74/8084: supply regulators that are to be enabled for HPD to work. Currently these regulators contain the hpd_gdsc, which was replaced by the power-domains support and hpd-5v/hpd-5v-en, which are not used by the chip itself. They power up the ESD bridge. However it is a separate device which should be represented separately in the device tree. None of upstreamed devices support these properties. Thus drop support for them from the HDMI driver. Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/488860/ Link: https://lore.kernel.org/r/20220609122350.3157529-10-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/hdmi/hdmi.c | 5 ----- 1 file changed, 5 deletions(-) commit 53d9118f7d39f9ae8dc0555d7ae2186b4cf783e3 Author: Dmitry Baryshkov Date: Thu Jun 9 15:23:44 2022 +0300 drm/msm/hdmi: drop empty 'none' regulator lists Several platform configs use empty 'none' regulator arrays. They are not necessary, as the code will use corresponding _cnt field and skip the array completely. Drop them now. Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/488861/ Link: https://lore.kernel.org/r/20220609122350.3157529-9-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/hdmi/hdmi.c | 5 ----- 1 file changed, 5 deletions(-) commit 1f88301794595ff4c28a1f1befe690e8dbac72a2 Author: Dmitry Baryshkov Date: Thu Jun 9 15:23:43 2022 +0300 drm/msm/hdmi: enable core-vcc/core-vdda-supply for 8996 platform DB820c makes use of core-vcc-supply and core-vdda-supply, however the driver code doesn't support these regulators. Enable them for HDMI on 8996 platform. Fixes: 0afbe59edd3f ("drm/msm/hdmi: Add basic HDMI support for msm8996") Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Patchwork: https://patchwork.freedesktop.org/patch/488857/ Link: https://lore.kernel.org/r/20220609122350.3157529-8-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/hdmi/hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68e674b13b17ed41aac2763d12ece6deaae8df58 Author: Dmitry Baryshkov Date: Thu Jun 9 15:23:42 2022 +0300 drm/msm/hdmi: drop unused GPIO support The HDMI driver has code to configure extra GPIOs, which predates pinctrl support. Nowadays all platforms should use pinctrl instead. Neither of upstreamed Qualcomm platforms uses these properties, so it's safe to drop them. Reported-by: kernel test robot Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Patchwork: https://patchwork.freedesktop.org/patch/488858/ Link: https://lore.kernel.org/r/20220609122350.3157529-7-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/hdmi/hdmi.c | 66 +++++++++---------------------------- drivers/gpu/drm/msm/hdmi/hdmi.h | 13 ++------ drivers/gpu/drm/msm/hdmi/hdmi_hpd.c | 62 +++------------------------------- 3 files changed, 21 insertions(+), 120 deletions(-) commit 7fbf025305e9f9f554ec5f0ac781035c7edd27a6 Author: Dmitry Baryshkov Date: Thu Jun 9 15:23:41 2022 +0300 drm/msm/hdmi: drop the hdmi-mux support With the last (and only) in-kernel user of hdmi-mux regulator, drop it from the HDMI driver. Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/488855/ Link: https://lore.kernel.org/r/20220609122350.3157529-6-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/hdmi/hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c04d89a6138a3d398e893c6c1f7542b1ff406a3 Author: Dmitry Baryshkov Date: Thu Jun 9 15:23:39 2022 +0300 dt-bindings: display/msm: hdmi: mark hdmi-mux-supply as deprecated hdmi-mux-supply is not used by the SoC's HDMI block, it is thought to power up the external logic. Thus it should not be a part of HDMI bindings, but it should be declared at some other device in the DT (like HDMI mux, bridge, etc). Mark it as deprecated. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/488870/ Link: https://lore.kernel.org/r/20220609122350.3157529-4-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov Documentation/devicetree/bindings/display/msm/hdmi.yaml | 1 + 1 file changed, 1 insertion(+) commit e3c5ce88e8f93b498e0632add6899afc31d89607 Author: Dmitry Baryshkov Date: Thu Jun 9 15:23:38 2022 +0300 dt-bindings: display/msm: hdmi: mark old GPIO properties as deprecated Mark obsolete GPIO properties as deprecated. They are not used by existing device trees. While we are at it, also drop them from the schema example. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/488852/ Link: https://lore.kernel.org/r/20220609122350.3157529-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov Documentation/devicetree/bindings/display/msm/hdmi.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 2f14bc38d88a47e79fc2d8bf5d4ced752db7e1fb Author: Dmitry Baryshkov Date: Thu Jun 9 15:23:37 2022 +0300 dt-bindings: display/msm: hdmi: split and convert to yaml Convert Qualcomm HDMI binding into HDMI TX and PHY yaml bindings. Changes to schema: HDMI: - fixed reg-names numbering to match 0..3 instead 0,1,3,4 - dropped qcom,tx-ddc-* from example, they were not documented - make phy-names deprecated, drop it from the examples PHY: - moved into phy/ directory - split into QMP and non-QMP PHY schemas Co-developed-by: David Heidelberg Signed-off-by: David Heidelberg Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/488850/ Link: https://lore.kernel.org/r/20220609122350.3157529-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov .../devicetree/bindings/display/msm/hdmi.txt | 99 --------- .../devicetree/bindings/display/msm/hdmi.yaml | 228 +++++++++++++++++++++ .../bindings/phy/qcom,hdmi-phy-other.yaml | 104 ++++++++++ .../devicetree/bindings/phy/qcom,hdmi-phy-qmp.yaml | 85 ++++++++ 4 files changed, 417 insertions(+), 99 deletions(-) commit 94a9e05228c8624fbb08f4d8b2775dd0dc588f76 Author: Dmitry Baryshkov Date: Mon Jun 27 19:54:13 2022 +0300 drm/msm/dp: use ARRAY_SIZE for calculating num_descs If for some reason the msm_dp_config::descs array starts from non-zero index or contains the hole, setting the msm_dp_config::num_descs might be not that obvious and error-prone. Use ARRAY_SIZE to set this field rather than encoding the value manually. Reported-by: Kuogee Hsieh Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Reviewed-by: Kuogee Hsieh Patchwork: https://patchwork.freedesktop.org/patch/491399/ Link: https://lore.kernel.org/r/20220627165413.657142-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dp/dp_display.c | 46 ++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 19 deletions(-) commit 4f0718bfa47266de90f9e5eec8545ba20939c872 Author: Vladimir Lypak Date: Sat Jun 11 00:02:57 2022 +0200 drm/msm/dsi: Use single function for reset There is currently two function for performing reset: dsi_sw_reset and dsi_sw_reset_restore. Only difference between those is that latter one assumes that DSI controller is enabled. In contrary former one assumes that controller is disabled and executed during power-on. However this assumtion is not true mobile devices which have boot splash set up by boot-loader. This patch removes dsi_sw_reset_restore and makes dsi_sw_reset disable DSI controller during reset sequence if it's enabled. Signed-off-by: Vladimir Lypak Signed-off-by: Luca Weiss Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/489152/ Link: https://lore.kernel.org/r/20220610220259.220622-1-luca@z3ntu.xyz [DB: fixed the typo in the commit message] Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dsi/dsi_host.c | 48 +++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 27 deletions(-) commit a18a44e9262d5c7f7fbccbc9458df64d69185d41 Author: Dmitry Baryshkov Date: Thu Jun 9 14:31:48 2022 +0300 drm/msm/hdmi: fill the pwr_regs bulk regulators Conversion to use bulk regulator API omitted filling the pwr_regs with proper regulator IDs. This was left unnoticed, since none of my testing platforms has used the pwr_regs. Fix this by propagating regulator ids properly. Fixes: 31b3b1f5e352 ("drm/msm/hdmi: use bulk regulator API") Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Patchwork: https://patchwork.freedesktop.org/patch/488847/ Link: https://lore.kernel.org/r/20220609113148.3149194-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/hdmi/hdmi.c | 3 +++ 1 file changed, 3 insertions(+) commit efc7617086bf3ce5a782fcc926947d73788316c5 Author: Stephen Boyd Date: Fri Jun 24 17:28:11 2022 -0700 drm/msm/dp: Remove encoder pointer from struct msm_dp We don't need to stash the encoder here. Instead we can simply pass it around as an argument. Cc: Kuogee Hsieh Signed-off-by: Stephen Boyd Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/491187/ Link: https://lore.kernel.org/r/20220625002811.3225344-1-swboyd@chromium.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dp/dp_display.c | 4 +--- drivers/gpu/drm/msm/dp/dp_display.h | 1 - drivers/gpu/drm/msm/dp/dp_drm.c | 8 ++++---- drivers/gpu/drm/msm/dp/dp_drm.h | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) commit 3bcecf2b6d06f71ce3392cc5f5a2d8cd52bd72a1 Author: Dmitry Baryshkov Date: Wed Jun 15 14:59:20 2022 +0300 drm/msm/dp: make dp_bridge_mode_valid() more precise Make dp_connector_mode_valid() return precise MODE_CLOCK_HIGH rather than generic MODE_BAD in case the mode clock is higher than DP_MAX_PIXEL_CLK_KHZ (675 MHz). Reviewed-by: Kuogee Hsieh Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/489554/ Link: https://lore.kernel.org/r/20220615115920.6768-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dp/dp_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01161a5c0ea6d21da8f59001ffeb95aed4e35526 Author: Kuogee Hsieh Date: Fri Jun 3 13:09:39 2022 -0700 dt-bindings: msm: update maintainers list with proper id Use quic id instead of codeaurora id in maintainers list for display devicetree bindings. Signed-off-by: Kuogee Hsieh Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/488296/ Link: https://lore.kernel.org/r/1654286979-11072-1-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Dmitry Baryshkov Documentation/devicetree/bindings/display/msm/dp-controller.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2709935b4a9e5b2b97288b391da9fe5aab24c280 Author: Dmitry Baryshkov Date: Sat Jun 25 03:30:28 2022 +0300 drm/msm/dpu: simplify and unify dpu_encoder_get_intf and dpu_encoder_get_wb Remove extra nestting level from the dpu_encoder_get_intf(), replacing it with the explicit return in case the INTF_WB was passed to the function. While we are at it, also change dpu_encoder_get_wb() to also use explicit return rather than the goto. Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/491189/ Link: https://lore.kernel.org/r/20220625003028.383259-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit ce557eaf52ab03c376bb1a29b17e9abd04f9be26 Author: Douglas Anderson Date: Mon Apr 25 14:06:42 2022 -0700 dt-bindings: msm/dp: List supplies in the bindings We're supposed to list the supplies in the dt bindings but there are none in the DP controller bindings. Looking at the Linux driver and existing device trees, we can see that two supplies are expected: - vdda-0p9-supply - vdda-1p2-supply Let's list them both in the bindings. Note that the datasheet for sc7280 doesn't describe these supplies very verbosely. For the 0p9 supply, for instance, it says "Power for eDP 0.9 V circuits". This this is obvious from the property name, we don't bother cluttering the bindings with a description. Signed-off-by: Douglas Anderson Reviewed-by: Sankeerth Billakanti Patchwork: https://patchwork.freedesktop.org/patch/483373/ Link: https://lore.kernel.org/r/20220425140619.1.Ibfde5a26a7182c4b478d570c23d2649823ac2cce@changeid Signed-off-by: Dmitry Baryshkov Documentation/devicetree/bindings/display/msm/dp-controller.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit b16650478635f06600bd6bc3cc04f09a5c3888af Author: Jessica Zhang Date: Wed Jun 22 10:18:35 2022 -0700 drm/msm/dpu: Add interface support for CRC debugfs Add support for writing CRC values for the interface block to the debugfs by calling the necessary MISR setup/collect methods. Changes since V1: - Set values_cnt to only include phys with backing hw_intf - Loop over all drm_encs connected to crtc Changes since V2: - Remove vblank.h inclusion - Change `pos + i` to `pos + entries` - Initialize values_cnt to 0 for encoder - Change DPU_CRTC_CRC_SOURCE_INTF to DPU_CRTC_CRC_SOURCE_ENCODER (and "intf" to "enc") - Change dpu_encoder_get_num_phys to dpu_encoder_get_num_hw_intfs - Add checks for setup_misr and collect_misr in dpu_encoder_get_num_hw_intfs Changes since V3: - Remove extra whitespace - Change "enc" to "encoder" - Move crcs array to dpu_crtc_get_encoder_crc - Rename dpu_encoder_get_num_hw_intfs to dpu_encoder_get_crc_values_cnt Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/490736/ Link: https://lore.kernel.org/r/20220622171835.7558-5-quic_jesszhan@quicinc.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 46 ++++++++++++++++++++- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 3 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 64 +++++++++++++++++++++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 22 ++++++++++ 4 files changed, 134 insertions(+), 1 deletion(-) commit 50b1131e067496b1cdd6e52d48f1aea94eccecaf Author: Dmitry Baryshkov Date: Thu Feb 17 08:55:29 2022 +0300 drm/msm/dp: rewrite dss_module_power to use bulk clock functions In order to simplify DP code, drop hand-coded loops over clock arrays, replacing them with clk_bulk_* functions. Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Patchwork: https://patchwork.freedesktop.org/patch/474717/ Link: https://lore.kernel.org/r/20220217055529.499829-6-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/Makefile | 1 - drivers/gpu/drm/msm/dp/dp_clk_util.c | 87 ------------------------------------ drivers/gpu/drm/msm/dp/dp_clk_util.h | 29 ------------ drivers/gpu/drm/msm/dp/dp_ctrl.c | 4 +- drivers/gpu/drm/msm/dp/dp_parser.c | 36 +++++++-------- drivers/gpu/drm/msm/dp/dp_parser.h | 6 ++- drivers/gpu/drm/msm/dp/dp_power.c | 45 +++++-------------- 7 files changed, 34 insertions(+), 174 deletions(-) commit 91143873a05db2ae606128c9e246745a721c60b9 Author: Jessica Zhang Date: Wed Jun 22 10:18:34 2022 -0700 drm/msm/dpu: Add MISR register support for interface Add support for setting MISR registers within the interface Changes since V1: - Replaced dpu_hw_intf collect_misr and setup_misr implementations with calls to dpu_hw_utils helper methods Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/490730/ Link: https://lore.kernel.org/r/20220622171835.7558-4-quic_jesszhan@quicinc.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 19 ++++++++++++++++++- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h | 8 +++++++- 2 files changed, 25 insertions(+), 2 deletions(-) commit fc18ea9818cdf2767f007d108d07a5b47083d67f Author: Dmitry Baryshkov Date: Thu Feb 17 08:55:28 2022 +0300 drm/msm/dp: inline dp_power_clk_set_rate() Inline the dp_power_clk_set_rate() function, replacing it with the call to msm_dss_enable_clk(). Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Patchwork: https://patchwork.freedesktop.org/patch/474719/ Link: https://lore.kernel.org/r/20220217055529.499829-5-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dp/dp_power.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) commit 7b37523fb1d1b2afe64d5fbd16a1ea72596e3663 Author: Jessica Zhang Date: Wed Jun 22 10:18:33 2022 -0700 drm/msm/dpu: Move MISR methods to dpu_hw_util Move layer mixer specific MISR methods to generalized helper methods. This will make it easier to add CRC support for other blocks in the future. Changes since V2: - Reordered parameters so that offsets are after hw_blk_reg_map - Fixed mismatched whitespace in bitmask definitions Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/490732/ Link: https://lore.kernel.org/r/20220622171835.7558-3-quic_jesszhan@quicinc.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | 42 ++----------------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c | 49 ++++++++++++++++++++++++++++- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h | 16 ++++++++++ 3 files changed, 67 insertions(+), 40 deletions(-) commit 26345e0117234c89e9d581c63aa25f10e6b50517 Author: Dmitry Baryshkov Date: Thu Feb 17 08:55:27 2022 +0300 drm/msm/dp: set stream_pixel rate directly The only clock for which we set the rate is the "stream_pixel". Rather than storing the rate and then setting it by looping over all the clocks, set the clock rate directly. Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Patchwork: https://patchwork.freedesktop.org/patch/474714/ Link: https://lore.kernel.org/r/20220217055529.499829-4-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dp/dp_clk_util.c | 33 --------------------------------- drivers/gpu/drm/msm/dp/dp_clk_util.h | 9 --------- drivers/gpu/drm/msm/dp/dp_ctrl.c | 2 +- drivers/gpu/drm/msm/dp/dp_parser.c | 7 ------- drivers/gpu/drm/msm/dp/dp_power.c | 10 ---------- 5 files changed, 1 insertion(+), 60 deletions(-) commit d9e0f7a6631baf8b5abb2e7364101f05a5b4e7cb Author: Dmitry Baryshkov Date: Thu Feb 17 08:55:26 2022 +0300 drm/msm/dp: "inline" dp_ctrl_set_clock_rate("ctrl_link") "ctrl_link" is the clock from DP_CTRL_PM module. The result of setting the rate for it would be a call to dev_pm_opp_set_rate(). Instead of saving the rate inside struct dss_module_power, call the devm_pm_opp_set_rate() directly. Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Patchwork: https://patchwork.freedesktop.org/patch/474712/ Link: https://lore.kernel.org/r/20220217055529.499829-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dp/dp_ctrl.c | 7 +++++-- drivers/gpu/drm/msm/dp/dp_power.c | 33 +-------------------------------- 2 files changed, 6 insertions(+), 34 deletions(-) commit 58fc5d186db44cc33bbd9622eff18a15a995a08b Author: Jessica Zhang Date: Wed Jun 22 10:18:32 2022 -0700 drm/msm/dpu: Move LM CRC code into separate method Move layer mixer-specific section of dpu_crtc_get_crc() into a separate helper method. This way, we can make it easier to get CRCs from other HW blocks by adding other get_crc helper methods. Changes since V1: - Move common bitmasks to dpu_hw_util.h - Move common CRC methods to dpu_hw_util.c - Update copyrights - Change crcs array to a dynamically allocated array and added it as a member of crtc_state Changes since V2: - Put changes for hw_util into a separate commit - Revert crcs array to a static array - Add else case for set_crc_source to return EINVAL if no valid source is selected - Add DPU_CRTC_MAX_CRC_ENTRIES macro Changes since V3: - Move crcs array into dpu_crtc_get_lm_crc - Remove comment about crcs array in dpu_crtc_state struct - Revert `lm` rename - Remove DPU_CRTC_MAX_CRC_ENTRIES macro - Return EINVAL in dpu_crtc_get_crc if no valid CRC source is set Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/490735/ Link: https://lore.kernel.org/r/20220622171835.7558-2-quic_jesszhan@quicinc.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 65 ++++++++++++++++++++------------ drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 2 + 2 files changed, 43 insertions(+), 24 deletions(-) commit 4edea8d305873336a626c5f4ce17cb8751059054 Author: Abhinav Kumar Date: Thu Jun 16 12:01:24 2022 -0700 drm/msm/dpu: remove hard-coded linewidth limit for writeback Remove the hard-coded limit for writeback and lets start using the one from catalog instead. changes in v3: - correct the Fixes tag Fixes: d7d0e73f7de3 ("drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback") Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/489888/ Link: https://lore.kernel.org/r/1655406084-17407-3-git-send-email-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a370cc392e075de5a4b7f3fb27cdeec0d70b5893 Author: Abhinav Kumar Date: Thu Jun 16 12:01:23 2022 -0700 drm/msm/dpu: fix maxlinewidth for writeback block Writeback block for sm8250 was using the default maxlinewidth of 2048. But this is not right as it supports upto 4096. This should have no effect on most resolutions as we are still limiting upto maxlinewidth of SSPP for adding the modes. Fix the maxlinewidth for writeback block on sm8250. changes in v3: - correct the Fixes tag Fixes: 53324b99bd7b ("drm/msm/dpu: add writeback blocks to the sm8250 DPU catalog") Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/489887/ Link: https://lore.kernel.org/r/1655406084-17407-2-git-send-email-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b4a624acabe99f2ea912e895529b8b37d1fa909d Author: Abhinav Kumar Date: Thu Jun 16 12:01:22 2022 -0700 drm/msm/dpu: move intf and wb assignment to dpu_encoder_setup_display() intf and wb resources are not dependent on the rm global state so need not be allocated during dpu_encoder_virt_atomic_mode_set(). Move the allocation of intf and wb resources to dpu_encoder_setup_display() so that we can utilize the hw caps even during atomic_check() phase. Since dpu_encoder_setup_display() already has protection against setting invalid intf_idx and wb_idx, these checks can now be dropped as well. changes in v2: - add phys->hw_intf and phys->hw_wb checks back changes in v3: - correct the Fixes tag Fixes: e02a559a720f ("drm/msm/dpu: make changes to dpu_encoder to support virtual encoder") Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/489885/ Link: https://lore.kernel.org/r/1655406084-17407-1-git-send-email-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) commit b6529e33761f8c2f482d0f7e37e4d7a054cc1d9f Author: Dmitry Baryshkov Date: Sat May 7 14:59:42 2022 +0300 drm/msm/dpu: drop enum msm_display_caps After the commit c46f0d69039c ("drm/msm: remove unused hotplug and edid macros from msm_drv.h") the msm_display_caps enum contains two bits describing whether the encoder should work in video or command mode. Drop the enum and replace capabilities field in struct msm_display_info with boolean is_cmd_mode field. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/485454/ Link: https://lore.kernel.org/r/20220507115942.1705872-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 31 ++++++++++++----------------- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 5 +---- drivers/gpu/drm/msm/msm_drv.h | 10 ---------- 4 files changed, 16 insertions(+), 34 deletions(-) commit b1ed585a16da8ad3ee426309d684a7a4a919ae56 Author: Dmitry Baryshkov Date: Sat May 7 14:59:41 2022 +0300 drm/msm/dpu: dont_use IS_ERR_OR_NULL for encoder phys backends The functions dpu_encoder_phys_foo_init() can not return NULL. Replace corresponding IS_ERR_OR_NULL() checks with just IS_ERR(). Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/485452/ Link: https://lore.kernel.org/r/20220507115942.1705872-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit de7d480f5e8ca6eace02a725abdadb9ea13294ef Author: Dmitry Baryshkov Date: Thu Jun 2 23:24:47 2022 +0300 drm/msm/dpu: make dpu hardware catalog static const Replace superfluous cfg_init functions, which just assign a static config to the struct dpu_mdss_cfg, with static instances of struct dpu_mdss_cfg. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/488166/ Link: https://lore.kernel.org/r/20220602202447.1755115-8-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 479 +++++++++++-------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 5 +- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +- 3 files changed, 215 insertions(+), 271 deletions(-) commit 3208496720a180985b35ec7ccad8334ce885d3a8 Author: Dmitry Baryshkov Date: Thu Jun 2 23:24:46 2022 +0300 drm/msm/dpu: constify struct dpu_mdss_cfg Mark struct dpu_mdss_cfg instance as a const pointer. This is mostly a preparation for the next patch. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/488164/ Link: https://lore.kernel.org/r/20220602202447.1755115-7-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 11 +++-------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 9 ++------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.h | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 8 +++----- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 2 +- 17 files changed, 29 insertions(+), 41 deletions(-) commit 481d5dbb93ae5083e20bcf973d8b6696ee54be86 Author: Dmitry Baryshkov Date: Thu Jun 2 23:24:45 2022 +0300 drm/msm/dpu: change catalog->dma_cfg to be a const pointer Change dpu_mdss_cfg::dma_cfg to be a const pointer rather than embedding the dpu_reg_dma_cfg struct into the struct dpu_mdss_cfg. Reported-by: kernel test robot Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/488162/ Link: https://lore.kernel.org/r/20220602202447.1755115-6-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 12 ++++++------ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 477db4feea03e6b93071d2152efac761b8cab22d Author: Dmitry Baryshkov Date: Thu Jun 2 23:24:44 2022 +0300 drm/msm/dpu: change catalog->perf to be a const pointer Change dpu_mdss_cfg::perf to be a const pointer rather than embedding the dpu_perf_cfg struct into the struct dpu_mdss_cfg. Reported-by: kernel test robot Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/488158/ Link: https://lore.kernel.org/r/20220602202447.1755115-5-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 20 ++++++++++---------- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 10 +++++----- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 16 ++++++++-------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 18 +++++++++--------- 5 files changed, 33 insertions(+), 33 deletions(-) commit 129ae533fabfbbbfe59aabf6a26cce2cfeccbf23 Author: Dmitry Baryshkov Date: Thu Jun 2 23:24:43 2022 +0300 drm/msm/dpu: remove hwversion field from data structures The driver should not depend on hw revision for detecting features. Instead it should use features from the hw catalog. Drop the hwversion field from struct dpu_mdss_cfg and struct dpu_hw_blk_reg_map. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/488160/ Link: https://lore.kernel.org/r/20220602202447.1755115-4-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 2 -- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h | 2 -- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c | 1 - 15 files changed, 17 deletions(-) commit c87443150a982727dbd1f57bc91649864b471ab2 Author: Dmitry Baryshkov Date: Thu Jun 2 23:24:42 2022 +0300 drm/msm/dpu: move VBIF_XINL_QOS_LVL_REMAP size to hw_catalog Rather than detecting VBIF_XINL_QOS_LVL_REMAP_000 based on the hwversion, push the offset to the hw_catalog. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/488156/ Link: https://lore.kernel.org/r/20220602202447.1755115-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 2 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 2 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) commit 2d8a4edb672dbd997ee1d82eb13b08def29b4329 Author: Dmitry Baryshkov Date: Thu Jun 2 23:24:41 2022 +0300 drm/msm/dpu: use feature bit for LM combined alpha check Rather than checking hwversion, follow the usual patter and add special bit to the lm->features to check whether the LM has combined or separate alpha registers. While we are at it, rename dpu_hw_lm_setup_blend_config_sdm845() to dpu_hw_lm_setup_blend_config_combined_alpha(). Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/488155/ Link: https://lore.kernel.org/r/20220602202447.1755115-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 19 +++++++++++-------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 2 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | 6 +++--- 3 files changed, 16 insertions(+), 11 deletions(-) commit 51e4d60e6ba50cc53150885549318c3470d44e3c Author: Abhinav Kumar Date: Tue May 10 16:54:39 2022 -0700 drm/msm/dpu: add writeback support for sc7180 Add writeback support for sc7180 devices. This has been validated on sc7180 chromebook using IGT writeback test suite. localhost /usr/local/libexec/igt-gpu-tools # ./kms_writeback Starting subtest: writeback-pixel-formats Subtest writeback-pixel-formats: SUCCESS (0.001s) Starting subtest: writeback-invalid-parameters Subtest writeback-invalid-parameters: SUCCESS (0.004s) Starting subtest: writeback-fb-id Subtest writeback-fb-id: SUCCESS (0.009s) Starting subtest: writeback-check-output Subtest writeback-check-output: SUCCESS (0.203s) Adding this will increase IGT coverage on chromebooks and also allow using writeback functionality for other use-cases as necessary. Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/485787/ Link: https://lore.kernel.org/r/20220510235439.31916-1-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 2 ++ 1 file changed, 2 insertions(+) commit 4977636d44b8d02cab7d04616283005b733477d7 Author: Jiang Jian Date: Tue Jun 21 13:06:27 2022 +0800 m68k: q40: Align '*' in comments The '*' in the comment is not aligned. Signed-off-by: Jiang Jian Link: https://lore.kernel.org/r/20220621050627.13666-1-jiangjian@cdjrlc.com Signed-off-by: Geert Uytterhoeven arch/m68k/q40/q40ints.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca62229162a905b13f02e081767bf126f230ecc9 Merge: 049b1ed9bef1 d6f895965592 Author: Rafael J. Wysocki Date: Mon Jul 4 19:30:58 2022 +0200 Merge back earlier cpufreq material for 5.20. commit 54439d20c027f17ff022e828cb0c05b25ee2d124 Author: Allen-KH Cheng Date: Fri Jul 1 20:12:29 2022 +0800 remoteproc: mediatek: Enable cache for mt8186 SCP This patch is for enabling cache in SCP. There is not enough space on the SRAM of SCP. We need to run programs in DRAM. The DRAM power and latency is much larger than SRAM, so cache is used to mitigate the negative effects for performance. We set SCP registers for cache size before loading SCP FW. (8KB+8KB) and also adjust ipi_buf_offset in SRAM from 0x7bdb0 to 0x3bdb0 for enabling cache. Signed-off-by: Allen-KH Cheng Tested-by: TingHan Shen Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220701121229.22756-2-allen-kh.cheng@mediatek.com Signed-off-by: Mathieu Poirier drivers/remoteproc/mtk_scp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit fe833b4edc594a4a6f1ce2d68975733e17b8f8ed Author: Rebecca Mckeever Date: Sun Jul 3 23:06:58 2022 -0500 memblock tests: remove completed TODO items Remove completed items from TODO list. Signed-off-by: Rebecca Mckeever Signed-off-by: Mike Rapoport Link: https://lore.kernel.org/r/6a3e74fcb51a07e8d9fbbcbe84bdb8aa8b00e843.1656907314.git.remckee0@gmail.com tools/testing/memblock/TODO | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit c55b31a124a68171e5915b1036ca42d8a683eca2 Author: Rebecca Mckeever Date: Sun Jul 3 23:06:57 2022 -0500 memblock tests: set memblock_debug to enable memblock_dbg() messages If Memblock simulator was compiled with MEMBLOCK_DEBUG=1, set memblock_debug to 1 so that memblock_dbg() will print debug information when memblock functions are tested in Memblock simulator. Signed-off-by: Rebecca Mckeever Signed-off-by: Mike Rapoport Link: https://lore.kernel.org/r/aee4200cce1c09992ed055006a81fde1b6b5b567.1656907314.git.remckee0@gmail.com tools/testing/memblock/internal.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 76586c00e74d189964d2fde26345a4a15f2ea02e Author: Rebecca Mckeever Date: Sun Jul 3 23:06:56 2022 -0500 memblock tests: add verbose output to memblock tests Add and use functions and macros for printing verbose testing output. If the Memblock simulator was compiled with VERBOSE=1: - prefix_push(): appends the given string to a prefix string that will be printed in test_fail() and test_pass*(). - prefix_pop(): removes the last prefix from the prefix string. - prefix_reset(): clears the prefix string. - test_fail(): prints a message after a test fails containing the test number of the failing test and the prefix. - test_pass(): prints a message after a test passes containing its test number and the prefix. - test_print(): prints the given formatted output string. - test_pass_pop(): runs test_pass() followed by prefix_pop(). - PREFIX_PUSH(): runs prefix_push(__func__). If the Memblock simulator was not compiled with VERBOSE=1, these functions/macros do nothing. Add the assert wrapper macros ASSERT_EQ(), ASSERT_NE(), and ASSERT_LT(). If the assert condition fails, these macros call test_fail() before executing assert(). Acked-by: David Hildenbrand Reviewed-by: Shaoqin Huang Signed-off-by: Rebecca Mckeever Signed-off-by: Mike Rapoport Link: https://lore.kernel.org/r/f234d443fe154d5ae8d8aa07284aff69edfb6f61.1656907314.git.remckee0@gmail.com tools/testing/memblock/tests/alloc_api.c | 225 ++++++++++----- tools/testing/memblock/tests/alloc_helpers_api.c | 129 ++++++--- tools/testing/memblock/tests/alloc_nid_api.c | 351 +++++++++++++++-------- tools/testing/memblock/tests/basic_api.c | 337 +++++++++++++++------- tools/testing/memblock/tests/common.c | 57 ++++ tools/testing/memblock/tests/common.h | 62 ++++ 6 files changed, 817 insertions(+), 344 deletions(-) commit 946dccb35d74079436677afcdc767d0406e99a88 Author: Rebecca Mckeever Date: Sun Jul 3 23:06:55 2022 -0500 memblock tests: Makefile: add arguments to control verbosity Add VERBOSE and MEMBLOCK_DEBUG user-provided arguments. VERBOSE will enable verbose output from Memblock simulator. MEMBLOCK_DEBUG will enable memblock_dbg() messages. Update the help message to include VERBOSE and MEMBLOCK_DEBUG. Update the README to include VERBOSE. The README does not include all available options and refers to the help message for the remaining options. Therefore, omit MEMBLOCK_DEBUG from README. Reviewed-by: David Hildenbrand Signed-off-by: Rebecca Mckeever Signed-off-by: Mike Rapoport Link: https://lore.kernel.org/r/5503f3efe82ecef5c99961a1d53003c8ad06cf27.1656907314.git.remckee0@gmail.com tools/testing/memblock/Makefile | 4 ++++ tools/testing/memblock/README | 10 +++++++++- tools/testing/memblock/scripts/Makefile.include | 10 ++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) commit acfc34f008c3e66bbcb7b9162c80c8327b6e800f Author: Krzysztof Kozlowski Date: Mon Jul 4 15:06:18 2022 +0200 spi: dt-bindings: zynqmp-qspi: add missing 'required' During the conversion the bindings lost list of required properties. Fixes: c58db2abb19f ("spi: convert Xilinx Zynq UltraScale+ MPSoC GQSPI bindings to YAML") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Michal Simek Link: https://lore.kernel.org/r/20220704130618.199231-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-zynqmp-qspi.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 6eee27c598fde65988723b785a9c9192d5ffb93a Author: Krzysztof Kozlowski Date: Mon Jul 4 15:06:17 2022 +0200 spi: dt-bindings: cadence: add missing 'required' During the conversion the bindings lost list of required properties. Fixes: aa7968682a2b ("spi: convert Cadence SPI bindings to YAML") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Michal Simek Link: https://lore.kernel.org/r/20220704130618.199231-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-cadence.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 50d6281ce9b8412f7ef02d1bc9d23aa62ae0cf98 Author: Ren Zhijie Date: Thu Jun 30 20:35:28 2022 +0800 dma-mapping: Fix build error unused-value If CONFIG_DMA_DECLARE_COHERENT is not set, make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu- will be failed, like this: drivers/remoteproc/remoteproc_core.c: In function ‘rproc_rvdev_release’: ./include/linux/dma-map-ops.h:182:42: error: statement with no effect [-Werror=unused-value] #define dma_release_coherent_memory(dev) (0) ^ drivers/remoteproc/remoteproc_core.c:464:2: note: in expansion of macro ‘dma_release_coherent_memory’ dma_release_coherent_memory(dev); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors The return type of function dma_release_coherent_memory in CONFIG_DMA_DECLARE_COHERENT area is void, so in !CONFIG_DMA_DECLARE_COHERENT area it should neither return any value nor be defined as zero. Reported-by: Hulk Robot Fixes: e61c451476e6 ("dma-mapping: Add dma_release_coherent_memory to DMA API") Signed-off-by: Ren Zhijie Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220630123528.251181-1-renzhijie2@huawei.com Signed-off-by: Mathieu Poirier include/linux/dma-map-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7128af87c7f1c30cd6cebe0b012cc25872c689e2 Author: Sudeep Holla Date: Mon Jul 4 11:16:05 2022 +0100 ACPI: Remove the unused find_acpi_cpu_cache_topology() The sole user of this find_acpi_cpu_cache_topology() was arm64 topology which is now consolidated into the generic arch_topology without the need of this function. Drop the unused function find_acpi_cpu_cache_topology(). Link: https://lore.kernel.org/r/20220704101605.1318280-22-sudeep.holla@arm.com Cc: Rafael J. Wysocki Reported-by: Ionela Voinescu Tested-by: Conor Dooley Acked-by: Rafael J. Wysocki Signed-off-by: Sudeep Holla drivers/acpi/pptt.c | 37 ------------------------------------- include/linux/acpi.h | 5 ----- 2 files changed, 42 deletions(-) commit 00e66e37af0090f9ed95ca4bc3d8f5c6171daaf0 Author: Sudeep Holla Date: Mon Jul 4 11:16:04 2022 +0100 arch_topology: Warn that topology for nested clusters is not supported We don't support the topology for clusters of CPU clusters while the DT and ACPI bindings theoritcally support the same. Just warn about the same so that it is clear to the users of arch_topology that the nested clusters are not yet supported. Link: https://lore.kernel.org/r/20220704101605.1318280-21-sudeep.holla@arm.com Tested-by: Ionela Voinescu Tested-by: Conor Dooley Signed-off-by: Sudeep Holla drivers/base/arch_topology.c | 2 ++ 1 file changed, 2 insertions(+) commit dea8c0b40fb500be29f4649cf01202e42a8a54f8 Author: Sudeep Holla Date: Mon Jul 4 11:16:03 2022 +0100 arch_topology: Add support for parsing sockets in /cpu-map Finally let us add support for socket nodes in /cpu-map in the device tree. Since this may not be present in all the old platforms and even most of the existing platforms, we need to assume absence of the socket node indicates that it is a single socket system and handle appropriately. Also it is likely that most single socket systems skip to as the node since it is optional. Link: https://lore.kernel.org/r/20220704101605.1318280-20-sudeep.holla@arm.com Tested-by: Ionela Voinescu Tested-by: Conor Dooley Reviewed-by: Ionela Voinescu Signed-off-by: Sudeep Holla drivers/base/arch_topology.c | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) commit 556c9678a7d4456a677588ce308200a673b7eb1f Author: Sudeep Holla Date: Mon Jul 4 11:16:02 2022 +0100 arch_topology: Set cluster identifier in each core/thread from /cpu-map Let us set the cluster identifier as parsed from the device tree cluster nodes within /cpu-map. We don't support nesting of clusters yet as there are no real hardware to support clusters of clusters. Link: https://lore.kernel.org/r/20220704101605.1318280-19-sudeep.holla@arm.com Tested-by: Ionela Voinescu Tested-by: Conor Dooley Reviewed-by: Ionela Voinescu Signed-off-by: Sudeep Holla drivers/base/arch_topology.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit bfcc4397435dc0407099b9a805391abc05c2313b Author: Ionela Voinescu Date: Mon Jul 4 11:16:01 2022 +0100 arch_topology: Limit span of cpu_clustergroup_mask() Currently the cluster identifier is not set on DT based platforms. The reset or default value is -1 for all the CPUs. Once we assign the cluster identifier values correctly, the cluster_sibling mask will be populated and returned by cpu_clustergroup_mask() to contribute in the creation of the CLS scheduling domain level, if SCHED_CLUSTER is enabled. To avoid topologies that will result in questionable or incorrect scheduling domains, impose restrictions regarding the span of clusters, as presented to scheduling domains building code: cluster_sibling should not span more or the same CPUs as cpu_coregroup_mask(). This is needed in order to obtain a strict separation between the MC and CLS levels, and maintain the same domains for existing platforms in the presence of CONFIG_SCHED_CLUSTER, where the new cluster information is redundant and irrelevant for the scheduler. While previously the scheduling domain builder code would have removed MC as redundant and kept CLS if SCHED_CLUSTER was enabled and the cpu_coregroup_mask() and cpu_clustergroup_mask() spanned the same CPUs, now CLS will be removed and MC kept. Link: https://lore.kernel.org/r/20220704101605.1318280-18-sudeep.holla@arm.com Cc: Darren Hart Tested-by: Conor Dooley Acked-by: Vincent Guittot Signed-off-by: Ionela Voinescu Signed-off-by: Sudeep Holla drivers/base/arch_topology.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 26a2b73a7b15a51ec1409648c9b43882f66fbacf Author: Sudeep Holla Date: Mon Jul 4 11:16:00 2022 +0100 arch_topology: Don't set cluster identifier as physical package identifier Currently as we parse the CPU topology from /cpu-map node from the device tree, we assign generated cluster count as the physical package identifier for each CPU which is wrong. The device tree bindings for CPU topology supports sockets to infer the socket or physical package identifier for a given CPU. Since it is fairly new and not supported on most of the old and existing systems, we can assume all such systems have single socket/physical package. Fix the physical package identifier to 0 by removing the assignment of cluster identifier to the same. Link: https://lore.kernel.org/r/20220704101605.1318280-17-sudeep.holla@arm.com Tested-by: Ionela Voinescu Tested-by: Conor Dooley Reviewed-by: Ionela Voinescu Signed-off-by: Sudeep Holla drivers/base/arch_topology.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 5a01bb8efb5177236498fc57b147cabd2b792613 Author: Sudeep Holla Date: Mon Jul 4 11:15:59 2022 +0100 arch_topology: Avoid parsing through all the CPUs once a outlier CPU is found There is no point in looping through all the CPU's physical package identifier to check if it is valid or not once a CPU which is outside the topology(i.e. outlier CPU) is found. Let us just break out of the loop early in such case. Link: https://lore.kernel.org/r/20220704101605.1318280-16-sudeep.holla@arm.com Tested-by: Ionela Voinescu Tested-by: Conor Dooley Reviewed-by: Gavin Shan Signed-off-by: Sudeep Holla drivers/base/arch_topology.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9eb5e54f876dda1aae0aef10bdd61da4331509ba Author: Sudeep Holla Date: Mon Jul 4 11:15:58 2022 +0100 arch_topology: Check for non-negative value rather than -1 for IDs validity Instead of just comparing the cpu topology IDs with -1 to check their validity, improve that by checking for a valid non-negative value. Link: https://lore.kernel.org/r/20220704101605.1318280-15-sudeep.holla@arm.com Suggested-by: Andy Shevchenko Tested-by: Ionela Voinescu Tested-by: Conor Dooley Reviewed-by: Gavin Shan Signed-off-by: Sudeep Holla drivers/base/arch_topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3f8283296b16c4e43fd79a5ac364ae8171fe1567 Author: Sudeep Holla Date: Mon Jul 4 11:15:57 2022 +0100 arch_topology: Set thread sibling cpumask only within the cluster Currently the cluster identifier is not set on the DT based platforms. The reset or default value is -1 for all the CPUs. Once we assign the cluster identifier values correctly that may result in getting the thread siblings wrong as the core identifiers can be same for 2 different CPUs belonging to 2 different cluster. So, in order to get the thread sibling cpumasks correct, we need to update them only if the cores they belong are in the same cluster within the socket. Let us skip updation of the thread sibling cpumaks if the cluster identifier doesn't match. This change won't affect even if the cluster identifiers are not set currently but will avoid any breakage once we set the same correctly. Link: https://lore.kernel.org/r/20220704101605.1318280-14-sudeep.holla@arm.com Tested-by: Gavin Shan Tested-by: Ionela Voinescu Tested-by: Conor Dooley Reviewed-by: Gavin Shan Signed-off-by: Sudeep Holla drivers/base/arch_topology.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 5b8dc787ce4a45c87254d1b0b22f161347ab7f81 Author: Sudeep Holla Date: Mon Jul 4 11:15:56 2022 +0100 arch_topology: Drop LLC identifier stash from the CPU topology Since the cacheinfo LLC information is used directly in arch_topology, there is no need to parse and store the LLC ID information only for ACPI systems in the CPU topology. Remove the redundant LLC ID from the generic CPU arch_topology information. Link: https://lore.kernel.org/r/20220704101605.1318280-13-sudeep.holla@arm.com Tested-by: Ionela Voinescu Tested-by: Conor Dooley Reviewed-by: Gavin Shan Signed-off-by: Sudeep Holla drivers/base/arch_topology.c | 1 - include/linux/arch_topology.h | 1 - 2 files changed, 2 deletions(-) commit 798eb5b4d41b282f021afc90b5187e91fc731930 Author: Sudeep Holla Date: Mon Jul 4 11:15:55 2022 +0100 arm64: topology: Remove redundant setting of llc_id in CPU topology Since the cacheinfo LLC information is used directly in arch_topology, there is no need to parse and fetch the LLC ID information only for ACPI systems. Just drop the redundant parsing and setting of llc_id in CPU topology from ACPI PPTT. Link: https://lore.kernel.org/r/20220704101605.1318280-12-sudeep.holla@arm.com Cc: Will Deacon Cc: Catalin Marinas Tested-by: Ionela Voinescu Tested-by: Conor Dooley Reviewed-by: Gavin Shan Acked-by: Catalin Marinas Signed-off-by: Sudeep Holla arch/arm64/kernel/topology.c | 14 -------------- 1 file changed, 14 deletions(-) commit f027db2f9a09e76858d06828b9ff817272d64ccc Author: Sudeep Holla Date: Mon Jul 4 11:15:54 2022 +0100 arch_topology: Use the last level cache information from the cacheinfo The cacheinfo is now initialised early along with the CPU topology initialisation. Instead of relying on the LLC ID information parsed separately only with ACPI PPTT elsewhere, migrate to use the similar information from the cacheinfo. This is generic for both DT and ACPI systems. The ACPI LLC ID information parsed separately can now be removed from arch specific code. Link: https://lore.kernel.org/r/20220704101605.1318280-11-sudeep.holla@arm.com Tested-by: Ionela Voinescu Tested-by: Conor Dooley Reviewed-by: Gavin Shan Signed-off-by: Sudeep Holla drivers/base/arch_topology.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 38db9b95464f82fed28794afe0214d9439d86f7c Author: Sudeep Holla Date: Mon Jul 4 11:15:53 2022 +0100 arch_topology: Add support to parse and detect cache attributes Currently ACPI populates just the minimum information about the last level cache from PPTT in order to feed the same to build sched_domains. Similar support for DT platforms is not present. In order to enable the same, the entire cache hierarchy information can be built as part of CPU topoplogy parsing both on ACPI and DT platforms. Note that this change builds the cacheinfo early even on ACPI systems, but the current mechanism of building llc_sibling mask remains unchanged. Link: https://lore.kernel.org/r/20220704101605.1318280-10-sudeep.holla@arm.com Tested-by: Ionela Voinescu Tested-by: Conor Dooley Reviewed-by: Gavin Shan Signed-off-by: Sudeep Holla drivers/base/arch_topology.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit 521103134a0d07774c8b17f25ff0ef70cbd56c9d Author: Sudeep Holla Date: Mon Jul 4 11:15:52 2022 +0100 cacheinfo: Align checks in cache_shared_cpu_map_{setup,remove} for readability The checks to skip the CPU itself or no cacheinfo case are implemented bit differently though the effect is exactly same. Just align the implementation in both cache_shared_cpu_map_{setup,remove} just for improved readability. No functional change. Link: https://lore.kernel.org/r/20220704101605.1318280-9-sudeep.holla@arm.com Tested-by: Conor Dooley Signed-off-by: Sudeep Holla drivers/base/cacheinfo.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit f16d1becf96f0a95dc9e1a5a7f97feeec2b149d5 Author: Sudeep Holla Date: Mon Jul 4 11:15:51 2022 +0100 cacheinfo: Use cache identifiers to check if the caches are shared if available The cache identifiers is an optional property on most of the platforms. The presence of one must be indicated by the CACHE_ID valid bit in the attributes. We can use the cache identifiers provided by the firmware to check if any two cpus share the same cache instead of relying on the fw_token generated and set in the OS. Link: https://lore.kernel.org/r/20220704101605.1318280-8-sudeep.holla@arm.com Tested-by: Ionela Voinescu Tested-by: Conor Dooley Signed-off-by: Sudeep Holla drivers/base/cacheinfo.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 36bbc5b4ffab33ccac0f4db27f619a6ba7a4fd32 Author: Sudeep Holla Date: Mon Jul 4 11:15:50 2022 +0100 cacheinfo: Allow early detection and population of cache attributes Some architecture/platforms may need to setup cache properties very early in the boot along with other cpu topologies so that all these information can be used to build sched_domains which is used by the scheduler. Allow detect_cache_attributes to be called quite early during the boot. Link: https://lore.kernel.org/r/20220704101605.1318280-7-sudeep.holla@arm.com Tested-by: Ionela Voinescu Tested-by: Conor Dooley Reviewed-by: Gavin Shan Signed-off-by: Sudeep Holla drivers/base/cacheinfo.c | 55 +++++++++++++++++++++++++++++++---------------- include/linux/cacheinfo.h | 1 + 2 files changed, 38 insertions(+), 18 deletions(-) commit cc1cfc47ea47187a21ec1f079b3c53264157fe15 Author: Sudeep Holla Date: Mon Jul 4 11:15:49 2022 +0100 cacheinfo: Add support to check if last level cache(LLC) is valid or shared It is useful to have helper to check if the given two CPUs share last level cache. We can do that check by comparing fw_token or by comparing the cache ID. Currently we check just for fw_token as the cache ID is optional. This helper can be used to build the llc_sibling during arch specific topology parsing and feeding information to the sched_domains. This also helps to get rid of llc_id in the CPU topology as it is sort of duplicate information. Also add helper to check if the llc information in cacheinfo is valid or not. Link: https://lore.kernel.org/r/20220704101605.1318280-6-sudeep.holla@arm.com Tested-by: Ionela Voinescu Tested-by: Conor Dooley Reviewed-by: Gavin Shan Signed-off-by: Sudeep Holla drivers/base/cacheinfo.c | 26 ++++++++++++++++++++++++++ include/linux/cacheinfo.h | 2 ++ 2 files changed, 28 insertions(+) commit 9447eb0f1575572218267180b4edff937b3aec57 Author: Sudeep Holla Date: Mon Jul 4 11:15:48 2022 +0100 cacheinfo: Move cache_leaves_are_shared out of CONFIG_OF cache_leaves_are_shared is already used even with ACPI and PPTT. It checks if the cache leaves are the shared based on fw_token pointer. However it is defined conditionally only if CONFIG_OF is enabled which is wrong. Move the function cache_leaves_are_shared out of CONFIG_OF and keep it generic. It also handles the case where both OF and ACPI is not defined. Link: https://lore.kernel.org/r/20220704101605.1318280-5-sudeep.holla@arm.com Tested-by: Ionela Voinescu Tested-by: Conor Dooley Reviewed-by: Gavin Shan Signed-off-by: Sudeep Holla drivers/base/cacheinfo.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit b14e8d21f726f4ffeaf8833783eda68a1c152b15 Author: Sudeep Holla Date: Mon Jul 4 11:15:47 2022 +0100 cacheinfo: Add helper to access any cache index for a given CPU The cacheinfo for a given CPU at a given index is used at quite a few places by fetching the base point for index 0 using the helper per_cpu_cacheinfo(cpu) and offsetting it by the required index. Instead, add another helper to fetch the required pointer directly and use it to simplify and improve readability. Link: https://lore.kernel.org/r/20220704101605.1318280-4-sudeep.holla@arm.com Tested-by: Ionela Voinescu Tested-by: Conor Dooley Reviewed-by: Gavin Shan Signed-off-by: Sudeep Holla drivers/base/cacheinfo.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit d4ec840baecbed280c7305f9103a10641d4d3799 Author: Sudeep Holla Date: Mon Jul 4 11:15:46 2022 +0100 cacheinfo: Use of_cpu_device_node_get instead cpu_dev->of_node The of_cpu_device_node_get takes care of fetching the CPU'd device node either from cached cpu_dev->of_node if cpu_dev is initialised or uses of_get_cpu_node to parse and fetch node if cpu_dev isn't available yet. Just use of_cpu_device_node_get instead of getting the cpu device first and then using cpu_dev->of_node for two reasons: 1. There is no other use of cpu_dev and can be simplified 2. It enabled the use detect_cache_attributes and hence cache_setup_of_node much earlier before the CPUs are registered as devices. Link: https://lore.kernel.org/r/20220704101605.1318280-3-sudeep.holla@arm.com Tested-by: Ionela Voinescu Tested-by: Conor Dooley Reviewed-by: Gavin Shan Signed-off-by: Sudeep Holla drivers/base/cacheinfo.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 0d4c331af4d169de26186170010c7b7acd49f266 Author: Sudeep Holla Date: Mon Jul 4 11:15:45 2022 +0100 ACPI: PPTT: Use table offset as fw_token instead of virtual address There is need to use the cache sharing information quite early during the boot before the secondary cores are up and running. The permanent memory map for all the ACPI tables(via acpi_permanent_mmap) is turned on in acpi_early_init() which is quite late for the above requirement. As a result there is possibility that the ACPI PPTT gets mapped to different virtual addresses. In such scenarios, using virtual address as fw_token before the acpi_permanent_mmap is enabled results in different fw_token for the same cache entity and hence wrong cache sharing information will be deduced based on the same. Instead of using virtual address, just use the table offset as the unique firmware token for the caches. The same offset is used as ACPI identifiers if the firmware has not set a valid one for other entries in the ACPI PPTT. Link: https://lore.kernel.org/r/20220704101605.1318280-2-sudeep.holla@arm.com Cc: linux-acpi@vger.kernel.org Tested-by: Ionela Voinescu Tested-by: Conor Dooley Acked-by: Rafael J. Wysocki Signed-off-by: Sudeep Holla drivers/acpi/pptt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b77d5b1b83e3e14870224de7c63f115a2dc44e9a Author: Muchun Song Date: Fri Apr 29 20:30:44 2022 +0800 mm: slab: optimize memcg_slab_free_hook() Most callers of memcg_slab_free_hook() already know the slab, which could be passed to memcg_slab_free_hook() directly to reduce the overhead of an another call of virt_to_slab(). For bulk freeing of objects, the call of slab_objcgs() in the loop in memcg_slab_free_hook() is redundant as well. Rework memcg_slab_free_hook() and build_detached_freelist() to reduce those unnecessary overhead and make memcg_slab_free_hook() can handle bulk freeing in slab_free(). Move the calling site of memcg_slab_free_hook() from do_slab_free() to slab_free() for slub to make the code clearer since the logic is weird (e.g. the caller need to judge whether it needs to call memcg_slab_free_hook()). It is easy to make mistakes like missing calling of memcg_slab_free_hook() like fixes of: commit d1b2cf6cb84a ("mm: memcg/slab: uncharge during kmem_cache_free_bulk()") commit ae085d7f9365 ("mm: kfence: fix missing objcg housekeeping for SLAB") This optimization is mainly for bulk objects freeing. The following numbers is shown for 16-object freeing. before after kmem_cache_free_bulk: ~430 ns ~400 ns The overhead is reduced by about 7% for 16-object freeing. Signed-off-by: Muchun Song Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Link: https://lore.kernel.org/r/20220429123044.37885-1-songmuchun@bytedance.com Signed-off-by: Vlastimil Babka mm/slab.c | 4 ++-- mm/slab.h | 30 ++++++++--------------------- mm/slub.c | 66 +++++++++++++++++++++------------------------------------------ 3 files changed, 32 insertions(+), 68 deletions(-) commit b347aa7b57477f71c740e2bbc6d1078a7109ba23 Author: Vasily Averin Date: Fri Jun 3 06:21:49 2022 +0300 mm/tracing: add 'accounted' entry into output of allocation tracepoints Slab caches marked with SLAB_ACCOUNT force accounting for every allocation from this cache even if __GFP_ACCOUNT flag is not passed. Unfortunately, at the moment this flag is not visible in ftrace output, and this makes it difficult to analyze the accounted allocations. This patch adds boolean "accounted" entry into trace output, and set it to 'true' for calls used __GFP_ACCOUNT flag and for allocations from caches marked with SLAB_ACCOUNT. Set it to 'false' if accounting is disabled in configs. Signed-off-by: Vasily Averin Acked-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Muchun Song Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Link: https://lore.kernel.org/r/c418ed25-65fe-f623-fbf8-1676528859ed@openvz.org Signed-off-by: Vlastimil Babka include/trace/events/kmem.h | 40 ++++++++++++++++++++++++++-------------- mm/slab.c | 10 +++++----- mm/slab_common.c | 9 ++++----- mm/slob.c | 8 ++++---- mm/slub.c | 20 ++++++++++---------- 5 files changed, 49 insertions(+), 38 deletions(-) commit 0c7e0d699ef1430d7f4cf12b4b1d097af58b5515 Author: Stéphane Graber Date: Thu Jun 23 16:45:52 2022 -0500 tools/vm/slabinfo: Handle files in debugfs Commit 64dd68497be76 relocated and renamed the alloc_calls and free_calls files from /sys/kernel/slab/NAME/*_calls over to /sys/kernel/debug/slab/NAME/*_calls but didn't update the slabinfo tool with the new location. This change will now have slabinfo look at the new location (and filenames) with a fallback to the prior files. Fixes: 64dd68497be76 ("mm: slub: move sysfs slab alloc/free interfaces to debugfs") Cc: stable@vger.kernel.org Signed-off-by: Stéphane Graber Tested-by: Stéphane Graber Signed-off-by: Vlastimil Babka tools/vm/slabinfo.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit efb9352700ba95f349522689679b7c7949e66245 Author: Xiongwei Song Date: Tue May 31 08:55:50 2022 +0800 mm/slub: Simplify __kmem_cache_alias() There is no need to do anything if sysfs_slab_alias() return nonzero value after getting a mergeable cache. Signed-off-by: Xiongwei Song Reviewed-by: Muchun Song Link: https://lore.kernel.org/all/e5ebc952-af17-321f-5343-bc914d47c931@suse.cz/ Signed-off-by: Vlastimil Babka mm/slub.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 9eee552fd8c45ca3628317bc458d8ff9cd670fc4 Author: Michael Riesch Date: Wed Jun 15 01:03:54 2022 +0200 arm64: dts: rockchip: enable hdmi tx audio on rock-3a Enable the I2S0 controller and the hdmi-sound node on the Radxa ROCK3 Model A. Signed-off-by: Michael Riesch Link: https://lore.kernel.org/r/20220614230354.3756364-2-michael.riesch@wolfvision.net Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit ea452bc0e6cc571165649d4a80300f7e8891877c Author: Michael Riesch Date: Wed Jun 15 01:03:53 2022 +0200 arm64: dts: rockchip: enable hdmi tx audio on rk3568-evb1-v10 Enable the I2S0 controller and the hdmi-sound node on the Rockchip RK3568 EVB1. Signed-off-by: Michael Riesch Link: https://lore.kernel.org/r/20220614230354.3756364-1-michael.riesch@wolfvision.net Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit d1ca263d0d518b4918473768aee0cfb2770014bc Author: Jiapeng Chong Date: Thu Jun 9 12:01:32 2022 +0800 mm, slab: fix bad alignments As reported by coccicheck: ./mm/slab.c:3253:2-59: code aligned with following code on line 3255. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: David Rientjes Reviewed-by: Muchun Song Signed-off-by: Vlastimil Babka mm/slab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 091e5e004e697a758358195bb774d3d3cd12414f Author: Guillaume Ranquet Date: Fri Jul 1 11:58:41 2022 +0800 drm/mediatek: dpi: Move the csc_enable bit to SoC config Add flexibility by moving the csc_enable bit to SoC specific config Signed-off-by: Guillaume Ranquet Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-13-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 4e28119bd52beda1643f885a01db2ac404878755 Author: Guillaume Ranquet Date: Fri Jul 1 11:58:40 2022 +0800 drm/mediatek: dpi: Move the yuv422_en_bit to SoC config Add flexibility by moving the yuv422 en bit to SoC specific config Signed-off-by: Guillaume Ranquet Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-12-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 48fb81a2717d732448c08d34484ae18cd9f73769 Author: Guillaume Ranquet Date: Fri Jul 1 11:58:39 2022 +0800 drm/mediatek: dpi: Move swap_shift to SoC config Add flexibility by moving the swap shift value to SoC specific config. Signed-off-by: Guillaume Ranquet Signed-off-by: Bo-Chen Chen Reviewed-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-11-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit e373924d7eb1db0d0f46de9db270b0ee88f857c7 Author: Guillaume Ranquet Date: Fri Jul 1 11:58:38 2022 +0800 drm/mediatek: dpi: Move hvsize_mask to SoC config Add flexibility by moving the hvsize mask to SoC specific config. Signed-off-by: Guillaume Ranquet Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-10-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit a519e22bcfd4ddfed0524946124b6fe1fd27a954 Author: Guillaume Ranquet Date: Fri Jul 1 11:58:37 2022 +0800 drm/mediatek: dpi: Move dimension mask to SoC config Add flexibility by moving the dimension mask to the SoC config Signed-off-by: Guillaume Ranquet Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-9-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 3145095fae25de45b029746730f5249823ba059c Author: Guillaume Ranquet Date: Fri Jul 1 11:58:36 2022 +0800 drm/mediatek: dpi: Implement a swap_input toggle in SoC config The hardware design of dp_intf does not support input swap, so we add a bit of flexibility to support SoCs without swap_input support. We also add a warning message if the hardware is not supported and it needs to swap input. Signed-off-by: Guillaume Ranquet Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-8-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit cf060519e48e7ca9844325d73bc3225182ac6223 Author: Guillaume Ranquet Date: Fri Jul 1 11:58:35 2022 +0800 drm/mediatek: dpi: Implement a CK/DE pol toggle in SoC config Dp_intf does not support CK/DE polarity because the polarity information is not used for eDP and DP while dp_intf is only for eDP and DP. Therefore, we add a bit of flexibility to support SoCs without CK/DE pol support. Signed-off-by: Guillaume Ranquet Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-7-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 4393c74a88cdbf36d8ccc315af09eae1bbe47ae2 Author: Bo-Chen Chen Date: Fri Jul 1 11:58:34 2022 +0800 drm/mediatek: dpi: Add support for quantization range For RGB colorimetry, CTA-861 support both limited and full range data when receiving video with RGB color space. We use drm_default_rgb_quant_range() to determine the correct setting. Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-6-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) commit aed61ef6beb911cc043af0f2f291167663995065 Author: Guillaume Ranquet Date: Fri Jul 1 11:58:44 2022 +0800 drm/mediatek: dpi: Only enable dpi after the bridge is enabled Enabling the dpi too early causes glitches on screen. Move the call to mtk_dpi_enable() at the end of the bridge_enable callback to ensure everything is setup properly before enabling dpi. Fixes: 9e629c17aa8d ("drm/mediatek: Add DPI sub driver") Signed-off-by: Guillaume Ranquet Signed-off-by: Bo-Chen Chen Tested-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-16-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9ed0713b3c35fc45677707ba47f432cad95da56 Author: Bo-Chen Chen Date: Fri Jul 1 11:58:33 2022 +0800 drm/mediatek: dpi: Remove output format of YUV DPI is not support output format as YUV, but there is the setting of configuring output YUV. Therefore, remove them in this patch. Fixes: 9e629c17aa8d ("drm/mediatek: Add DPI sub driver") Signed-off-by: Bo-Chen Chen Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-5-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) commit 0bf0cb60116a4f8f44136d03ed8a47ea32f02f8e Author: Bo-Chen Chen Date: Fri Jul 1 11:58:32 2022 +0800 drm/mediatek: dpi: Add kernel document for struct mtk_dpi_conf This driver will support dp_intf and there are many configs between dpi and dp_intf. Therefore, we will add many configs in "struct mtk_dpi_conf". To let this structure more readable, we add this kernel doc. Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-4-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f294c89fbc3806d8c292a9ff9385acadb0f19233 Author: Bo-Chen Chen Date: Fri Jul 1 11:58:31 2022 +0800 dt-bindings: display: mediatek: dpi: Revise mediatek strings to correct format Strings replacement: - s/mediatek/MediaTek/ in title. - s/Mediatek/MediaTek/ in description. Signed-off-by: Bo-Chen Chen Reviewed-by: Rob Herring Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-3-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e32895fc7fdfd61be26a4fef12b0f012ce578756 Author: Markus Schneider-Pargmann Date: Fri Jul 1 11:58:30 2022 +0800 dt-bindings: display: mediatek: dpi: Add DP_INTF compatible DP_INTF is similar to DPI but does not have the exact same feature set or register layouts. DP_INTF is the sink of the display pipeline that is connected to the DisplayPort controller and encoder unit. It takes the same clocks as DPI. Signed-off-by: Markus Schneider-Pargmann Signed-off-by: Guillaume Ranquet Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-2-rex-bc.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit e0ed9e672565be5db8b2e6d95f047d46140e3297 Merge: 1c74a93ce9b6 fe71f6e1bbff Author: Arnd Bergmann Date: Mon Jul 4 15:48:45 2022 +0200 Merge tag 'omap-for-v5.20/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc SoC changes omaps for v5.20 merge window SoC changes omaps mostly for missing of_node_put() calls and cosmetic Kconfig changes. These can be all merged when suitable, there is no urgent need to merge this as fixes. * tag 'omap-for-v5.20/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Kconfig: Fix indentation ARM: OMAP2+: Fix refcount leak in omap3xxx_prm_late_init ARM: OMAP2+: pdata-quirks: Fix refcount leak bug ARM: OMAP2+: display: Fix refcount leak bug ARM: OMAP2+: Fix refcount leak in omapdss_init_of Link: https://lore.kernel.org/r/pull-1656918583-2801@atomide.com Signed-off-by: Arnd Bergmann commit 0f15d785ff2d59884f6271bb4ba4522596f218c7 Author: Hsin-Yi Wang Date: Thu Jun 30 03:05:46 2022 +0800 drm/mediatek: Ensure bridge disable happends before suspend Make sure bridge_disable will be called before suspend by calling drm_mode_config_helper_suspend() in .prepare callback. Signed-off-by: Hsin-Yi Wang Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220629190545.478113-1-hsinyi@chromium.org/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_drm_drv.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b27d04d5a51c28322cadb18d8d2ff5d0fb892fff Author: Cristian Marussi Date: Mon Jul 4 11:22:40 2022 +0100 firmware: arm_scmi: Use fast channel tracing Make use of SCMI fast channel event tracing. Link: https://lore.kernel.org/r/20220704102241.2988447-7-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/perf.c | 10 ++++++++++ drivers/firmware/arm_scmi/powercap.c | 10 ++++++++++ 2 files changed, 20 insertions(+) commit e699eb9b4f1b98be08197d699e5c34a8b576b26f Author: Cristian Marussi Date: Mon Jul 4 11:22:39 2022 +0100 include: trace: Add SCMI fast channel tracing All the currently defined SCMI events are meant to trace only regular SCMI transfers based on SCMI messages exchanges; SCMI transactions based on fast channels, where used, are completely invisible from the tracing point of view. Add support to trace fast channel transactions; while doing that avoid exposing full shared memory location addresses. Link: https://lore.kernel.org/r/20220704102241.2988447-6-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla include/trace/events/scmi.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 855aa26e5f56d415b71d3f8d86ef0cc51b2166a3 Author: Cristian Marussi Date: Mon Jul 4 11:22:38 2022 +0100 firmware: arm_scmi: Add SCMI v3.1 powercap fast channels support Add SCMIv3.1 powercap protocol fast channel support using common helpers provided by the SCMI core with scmi_proto_helpers_ops operations. Link: https://lore.kernel.org/r/20220704102241.2988447-5-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/powercap.c | 169 ++++++++++++++++++++++++++++------- include/linux/scmi_protocol.h | 2 + 2 files changed, 138 insertions(+), 33 deletions(-) commit 6f9ea4dabd2d8831b470660a83fa09966933f850 Author: Cristian Marussi Date: Mon Jul 4 11:22:37 2022 +0100 firmware: arm_scmi: Generalize the fast channel support Generalize existing fast channel support used in the perf protocol and make it available to possibly any protocol refactoring the common code into a couple of new scmi_proto_helpers_ops routines. Make perf protocol use this new infrastructure. No functional change. Link: https://lore.kernel.org/r/20220704102241.2988447-4-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/driver.c | 165 ++++++++++++++++++++++++++ drivers/firmware/arm_scmi/perf.c | 215 +++++++--------------------------- drivers/firmware/arm_scmi/protocols.h | 22 ++++ 3 files changed, 231 insertions(+), 171 deletions(-) commit 0316f99c4780b0a5fd60b7f136c64cb1af8d5fc3 Author: Cristian Marussi Date: Mon Jul 4 11:22:36 2022 +0100 firmware: arm_scmi: Add SCMI v3.1 powercap protocol basic support Add support for SCMI v3.1 powercap protocol, with the exception of powercap fast channels, exposing all the new related powercap protocol operations as usual in include/linux/scmi_protocol.h. Link: https://lore.kernel.org/r/20220704102241.2988447-3-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/Makefile | 2 +- drivers/firmware/arm_scmi/driver.c | 2 + drivers/firmware/arm_scmi/powercap.c | 753 ++++++++++++++++++++++++++++++++++ drivers/firmware/arm_scmi/protocols.h | 1 + include/linux/scmi_protocol.h | 125 ++++++ 5 files changed, 882 insertions(+), 1 deletion(-) commit 451d8457bc9d193611993909644724117a8d1e8f Author: Cristian Marussi Date: Mon Jul 4 11:22:35 2022 +0100 dt-bindings: firmware: arm,scmi: Add support for powercap protocol Add new SCMI v3.1 powercap protocol bindings definitions and example. Link: https://lore.kernel.org/r/20220704102241.2988447-2-cristian.marussi@arm.com Cc: Rob Herring Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla Documentation/devicetree/bindings/firmware/arm,scmi.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2c4b97fee94acd4a4eb2a6943584055a14e14830 Author: Cristian Marussi Date: Mon Jul 4 11:19:33 2022 +0100 firmware: arm_scmi: Add SCMI System Power Control driver Add an SCMI System Power control driver to handle platform's requests carried by SYSTEM_POWER_STATE_NOTIFIER notifications: such platform requested system-wide power state transitions are handled accordingly, gracefully or forcefully, depending on the notifications' message flags. Graceful requests are relayed to userspace using the same Kernel API used to handle ACPI Shutdown bus events. Link: https://lore.kernel.org/r/20220704101933.2981635-5-cristian.marussi@arm.com Reviewed-by: Greg Kroah-Hartman Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/Kconfig | 12 + drivers/firmware/arm_scmi/Makefile | 1 + drivers/firmware/arm_scmi/scmi_power_control.c | 362 +++++++++++++++++++++++++ 3 files changed, 375 insertions(+) commit d91079995fa62720e11a39c08b932f2f9a8cbfae Author: Cristian Marussi Date: Mon Jul 4 11:19:32 2022 +0100 firmware: arm_scmi: Add devm_protocol_acquire helper Add a method to get hold of a protocol, causing it to be initialized and its resource accounting updated, without getting access to its operations and handle. Some protocols, like SCMI SystemPower, do not expose any protocol ops to the kernel OSPM agent but still need to be at least initialized. This helper avoids the need to invoke a full devm_get_protocol() only to get the protocol initialized while throwing away unused the protocol ops and handle. Link: https://lore.kernel.org/r/20220704101933.2981635-4-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/driver.c | 70 ++++++++++++++++++++++++++++++-------- include/linux/scmi_protocol.h | 5 +++ 2 files changed, 60 insertions(+), 15 deletions(-) commit 7097f29819bb70374dfae9f705e548a720f16f94 Author: Cristian Marussi Date: Mon Jul 4 11:19:31 2022 +0100 firmware: arm_scmi: Add SCMI v3.1 System Power extensions Add support for SCMIv3.1 System Power optional timeout field while dispatching SYSTEM_POWER_STATE_NOTIFIER notification. Link: https://lore.kernel.org/r/20220704101933.2981635-3-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/system.c | 17 ++++++++++++++++- include/linux/scmi_protocol.h | 2 ++ 2 files changed, 18 insertions(+), 1 deletion(-) commit a0db3962fb33564017b067255c20828632145c36 Author: Cristian Marussi Date: Mon Jul 4 11:19:30 2022 +0100 firmware: arm_scmi: Support only one single system power device In order to minimize SCMI platform fw-side complexity, only one single SCMI platform should be in charge of SCMI SystemPower protocol communications with the OSPM. Enforce the existence of one single unique device associated with SystemPower protocol across any possible number of SCMI platforms, and warn if a system tries to register different SystemPower devices from multiple platforms. Link: https://lore.kernel.org/r/20220704101933.2981635-2-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/driver.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit b60e088682b74eca03f322a3b099a234b8f2fb1d Author: Cristian Marussi Date: Thu Jun 30 18:31:35 2022 +0100 firmware: arm_scmi: Use new SCMI full message tracing Add full message tracing for all transmitted and successfully received SCMI commands, replies and notifications. Link: https://lore.kernel.org/r/20220630173135.2086631-3-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/driver.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 2bd0467074f078372ac2c979c56dc94228c90fbf Author: Cristian Marussi Date: Thu Jun 30 18:31:34 2022 +0100 include: trace: Add SCMI full message tracing Add a distinct trace event to dump full SCMI message headers and payloads. Link: https://lore.kernel.org/r/20220630173135.2086631-2-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla include/trace/events/scmi.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 689640efc0a2c4e07e6f88affe6d42cd40cc3f85 Author: Sudeep Holla Date: Fri Jul 1 17:03:10 2022 +0100 firmware: arm_scpi: Ensure scpi_info is not assigned if the probe fails When scpi probe fails, at any point, we need to ensure that the scpi_info is not set and will remain NULL until the probe succeeds. If it is not taken care, then it could result use-after-free as the value is exported via get_scpi_ops() and could refer to a memory allocated via devm_kzalloc() but freed when the probe fails. Link: https://lore.kernel.org/r/20220701160310.148344-1-sudeep.holla@arm.com Cc: stable@vger.kernel.org # 4.19+ Reported-by: huhai Reviewed-by: Jackie Liu Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 61 ++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 26 deletions(-) commit 2635d2a8d4664b665bc12e15eee88e9b1b40ae7b Author: Zhang Jiaming Date: Fri Jul 1 15:48:12 2022 +0800 IB: Fix spelling of 'writable' There is a typo (writeable) in qib_file_ops.c, qib_sd7220.c's comments, and in rxe_check_bind_mw() Link: https://lore.kernel.org/r/20220701074812.12615-1-jiaming@nfschina.com Link: https://lore.kernel.org/r/20220701080019.13329-1-jiaming@nfschina.com Signed-off-by: Zhang Jiaming Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/qib/qib_file_ops.c | 4 ++-- drivers/infiniband/hw/qib/qib_sd7220.c | 2 +- drivers/infiniband/sw/rxe/rxe_mw.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 2fcfa72fc13f0203bb676bd1ec30ec85e17855be Author: Peng Fan Date: Sun Jul 3 17:11:25 2022 +0800 interconnect: add device managed bulk API Add device managed bulk API to simplify driver. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20220703091132.1412063-4-peng.fan@oss.nxp.com Signed-off-by: Georgi Djakov drivers/interconnect/bulk.c | 42 ++++++++++++++++++++++++++++++++++++++++++ include/linux/interconnect.h | 7 +++++++ 2 files changed, 49 insertions(+) commit e2a4a0eeb0cd308bb96d168f90c225da2084d4dc Author: Peng Fan Date: Sun Jul 3 17:11:24 2022 +0800 dt-bindings: interconnect: add fsl,imx8mp.h Add fsl,imx8mp.h for i.MX8MP Signed-off-by: Peng Fan Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220703091132.1412063-3-peng.fan@oss.nxp.com Signed-off-by: Georgi Djakov include/dt-bindings/interconnect/fsl,imx8mp.h | 59 +++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 740115505ed4f4e7597c75ed6dd9af4d610ddb85 Author: Peng Fan Date: Sun Jul 3 17:11:23 2022 +0800 dt-bindings: interconnect: imx8m: Add bindings for imx8mp noc i.MX8MP features same NoC/NIC as i.MX8MM/N/Q, and use two compatible strings. Signed-off-by: Peng Fan Acked-by: Rob Herring Reviewed-by: Chanwoo Choi Link: https://lore.kernel.org/r/20220703091132.1412063-2-peng.fan@oss.nxp.com Signed-off-by: Georgi Djakov Documentation/devicetree/bindings/interconnect/fsl,imx8m-noc.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 96938258b1978331448df02952c9f00d8672ec7c Author: Bob Pearson Date: Thu Jun 30 14:04:20 2022 -0500 RDMA/rxe: Remove unnecessary include statement rxe_verbs.h includes the file . It should have been , however, it is not used and not required in this file. This patch removes the include statement. Link: https://lore.kernel.org/r/20220630190425.2251-4-rpearsonhpe@gmail.com Reported-by: Frank Zago Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_verbs.h | 1 - 1 file changed, 1 deletion(-) commit f0dce5c4fdaf9e98dd2755ffb1363822854b6287 Author: Paul Cercueil Date: Sun Jul 3 00:07:27 2022 +0100 drm/ingenic: Use the highest possible DMA burst size Until now, when running at the maximum resolution of 1280x720 at 32bpp on the JZ4770 SoC the output was garbled, the X/Y position of the top-left corner of the framebuffer warping to a random position with the whole image being offset accordingly, every time a new frame was being submitted. This problem can be eliminated by using a bigger burst size for the DMA. Set in each soc_info structure the maximum burst size supported by the corresponding SoC, and use it in the driver. Set the new value using regmap_update_bits() instead of regmap_set_bits(), since we do want to override the old value of the burst size. (Note that regmap_set_bits() wasn't really valid before for the same reason, but it never seemed to be a problem). Cc: Fixes: 90b86fcc47b4 ("DRM: Add KMS driver for the Ingenic JZ47xx SoCs") Signed-off-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20220702230727.66704-1-paul@crapouillou.net Acked-by: Sam Ravnborg Tested-by: Christophe Branchereau drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 10 ++++++++-- drivers/gpu/drm/ingenic/ingenic-drm.h | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) commit 9b47c57437aaf5aa252b2091f6fb1a250b47d582 Merge: a57cbe02c058 6db372de959a Author: Arnd Bergmann Date: Mon Jul 4 14:32:32 2022 +0200 Merge tag 'omap-for-v5.20/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt Devicetree changes omaps for v5.20 merge window Just one devicetree change to add EEPROM regulator for BeagleBone Black. * tag 'omap-for-v5.20/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am33xx: Map baseboard EEPROM on BeagleBone Black Link: https://lore.kernel.org/r/pull-1656918942-515224@atomide.com Signed-off-by: Arnd Bergmann commit c71531007ef0fe5cd64a8aa9b86bdb53ccef1504 Author: Steven Rostedt (Google) Date: Sun Jul 3 11:06:05 2022 -0400 tracing: ALSA: hda: Remove string manipulation out of the fast path The TRACE_EVENT() macro is broken up into various parts to be efficient. The TP_fast_assign() is just to record the event into the ring buffer, and is to be done as fast as possible as this occurs during the actual running of the code. The slower this is, the slower the code that is being traced becomes. The TP_printk() is processed when reading the tracing buffer. This is considered the slow path. Any processing that can be moved from the TP_fast_assign() to the TP_printk() should do so. For some reason, the entire string processing of the trace events hda_send_cmd, hda_get_response, and hda_unsol_event was moved from the TP_printk() into the TP_fast_assign(). On top of that, the __dynamic_array() was used with a fixed size of HDAC_MSG_MAX, which is useless as a dynamic_array as it will always allocate HDAC_MSG_MAX bytes on the ring buffer and even save that amount into the event (as it expects the size to be dynamic, which using a fixed size defeats that purpose). Instead, just save the necessary elements in the TP_fast_assign() and do the string manipulation in the slow path. The output should be the same. Signed-off-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20220703110605.07a86fb2@rorschach.local.home Signed-off-by: Takashi Iwai sound/hda/trace.h | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) commit df98a94ce9c450a1af1193e06add37e601cbf2df Author: Colin Ian King Date: Wed Jun 29 11:27:43 2022 +0100 ALSA: wavefront: remove redundant assignment to pointer end Pointer end is being re-assigned the same value as it was initialized with in the previous statement. The re-assignment is redundant and can be removed. Cleans up clang scan-build warning: sound/isa/wavefront/wavefront_synth.c:582:17: warning: Value stored to 'end' during its initialization is never read Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20220629102744.139673-1-colin.i.king@gmail.com Signed-off-by: Takashi Iwai sound/isa/wavefront/wavefront_synth.c | 2 -- 1 file changed, 2 deletions(-) commit 2e57a3358dda20128593fff9b39b522f1bdd26c6 Author: Jan Schär Date: Mon Jun 27 19:18:55 2022 +0200 ALSA: usb-audio: Turn off 'manual mode' on Dell dock This removes the need to power cycle the Dell WD15 dock if it has been attached to a Windows machine. The Windows driver puts the ALC4020 USB audio controller into 'manual mode', and then does all the power management and other configuration itself, by sending HD audio commands directly to the ALC3263 audio codec via vendor-type USB messages. If manual mode is off, this is all handled by the firmware, and works well enough. If manual mode is turned on, the latency of the SET INTERFACE command goes from several hundred ms to less than 1 ms (see https://bugzilla.suse.com/show_bug.cgi?id=1089467), but I'm not sure if the additional code that would be required is worth it. Funnily enough, the Windows driver tries to turn off manual mode when the dock is disconnected, which doesn't work for obvious reasons. Additionally, fix a bug in dell_dock_init_vol, which didn't work because the Control Selector was missing. Now, it properly resets the volume to 0dB. Fixes: 964af639ad69 ("ALSA: usb-audio: Initialize Dell Dock playback volumes") Signed-off-by: Jan Schär Link: https://lore.kernel.org/r/20220627171855.42338-2-jan@jschaer.ch Signed-off-by: Takashi Iwai sound/usb/mixer_quirks.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 4b8ea38fabab45ad911a32a336416062553dfe9c Author: Jan Schär Date: Mon Jun 27 19:18:54 2022 +0200 ALSA: usb-audio: Support jack detection on Dell dock The Dell WD15 dock has a headset and a line out port. Add support for detecting if a jack is inserted into one of these ports. For the headset jack, additionally determine if a mic is present. The WD15 contains an ALC4020 USB audio controller and ALC3263 audio codec from Realtek. It is a UAC 1 device, and UAC 1 does not support jack detection. Instead, jack detection works by sending HD Audio commands over vendor-type USB messages. I found out how it works by looking at USB captures on Windows. The audio codec is very similar to the one supported by sound/soc/codecs/rt298.c / rt298.h, some constant names and the mic detection are adapted from there. The realtek_add_jack function is adapted from build_connector_control in sound/usb/mixer.c. I tested this on a WD15 dock with the latest firmware. Signed-off-by: Jan Schär Link: https://lore.kernel.org/r/20220627171855.42338-1-jan@jschaer.ch Signed-off-by: Takashi Iwai sound/usb/mixer_quirks.c | 167 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) commit 4a1e6ac7d5a014fcc14bf25b6cd14328619a6233 Merge: 3809db6430bf dd84cfff3cc3 Author: Takashi Iwai Date: Mon Jul 4 14:14:29 2022 +0200 Merge branch 'for-linus' into for-next Back-merge of 5.19-rc branch for the futher development, mainly about USB-audio and HD-audio Cirrus stuff. Signed-off-by: Takashi Iwai commit acf981f94edca13c85fa24dd8511cdc6bd4c98ed Author: Jiapeng Chong Date: Fri Jul 1 15:28:50 2022 +0800 ASoC: tegra20_ac97: Fix missing error code in tegra20_ac97_platform_probe() The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'ret'. This was found by coccicheck: sound/soc/tegra/tegra20_ac97.c:357 tegra20_ac97_platform_probe() warn: missing error code 'ret'. Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20220701072850.62408-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown sound/soc/tegra/tegra20_ac97.c | 2 ++ 1 file changed, 2 insertions(+) commit 446499743b26958a58891a8f9a061deb5cce7c82 Author: Shengjiu Wang Date: Mon Jul 4 09:50:17 2022 +0800 ASoC: fsl_asrc_dma: Add legacy_dai_naming flag Need to add legacy_dai_naming flag otherwise there will be issue when registerring component, that cause the probe failure. Fixes: 1e63fcc74ace ("ASoC: fsl: Migrate to new style legacy DAI naming flag") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1656899417-4775-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_asrc_dma.c | 1 + 1 file changed, 1 insertion(+) commit 978bd27c9aed13d7d739bdcdcf98cbca9106b0ec Author: Shengjiu Wang Date: Mon Jul 4 09:50:16 2022 +0800 ASoC: fsl_micfil: Add legacy_dai_naming flag Need to add legacy_dai_naming flag otherwise there will be issue when registerring component, that cause the probe failure. Fixes: 1e63fcc74ace ("ASoC: fsl: Migrate to new style legacy DAI naming flag") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1656899417-4775-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_micfil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3684020a82ff43a64b5a7e42564ee7e2065d3011 Author: Zhu Ning Date: Mon Jul 4 09:24:16 2022 +0800 ASoC: codes: Add support for ES8316 producer mode The AMD acp-es8336 machine driver requires ES8316 run in producer mode, which is not supported previously. Signed-off-by: David Yang Signed-off-by: Zhu Ning Link: https://lore.kernel.org/r/20220704012416.3165-1-zhuning0077@gmail.com Signed-off-by: Mark Brown sound/soc/codecs/es8316.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 679139ea62e3e78542cd409c2437ac1da9f31026 Author: Yang Yingliang Date: Mon Jul 4 15:51:34 2022 +0800 ASoC: fsl: pcm030-audio-fabric: use platform_device_unregsiter() Replace platform_device_del/put() with platform_device_unregsiter() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220704075134.26230-1-yangyingliang@huawei.com Signed-off-by: Mark Brown sound/soc/fsl/pcm030-audio-fabric.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1d5c7a91dfc2b7a5672a2706553e5782482d6e6f Author: Jiapeng Chong Date: Fri Jul 1 15:30:39 2022 +0800 ASoC: codecs: max98088: Clean up some inconsistent indenting This was found by coccicheck: sound/soc/codecs/max98088.c:1761 max98088_i2c_probe() warn: inconsistent indenting. Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20220701073039.64556-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown sound/soc/codecs/max98088.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit bc4c9d85179ca90679c8bb046cf7aad16fb88076 Author: Conor Dooley Date: Fri Jul 1 20:22:49 2022 +0100 ASoC: dt-bindings: convert designware-i2s to dt-schema Convert the Synopsys DesignWare I2S controller binding to dt-schema. There was no listed maintainer but Jose Abreu was the last editor of the txt binding so add him as maintainer. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220701192300.2293643-4-conor@kernel.org Signed-off-by: Mark Brown .../devicetree/bindings/sound/designware-i2s.txt | 35 -------- .../bindings/sound/snps,designware-i2s.yaml | 94 ++++++++++++++++++++++ 2 files changed, 94 insertions(+), 35 deletions(-) commit f507c0c67dac57d2bcd5dcae4b6139b0305d8957 Author: Liang He Date: Sat Jul 2 10:01:09 2022 +0800 ASoC: qcom: Fix missing of_node_put() in asoc_qcom_lpass_cpu_platform_probe() We should call of_node_put() for the reference 'dsp_of_node' returned by of_parse_phandle() which will increase the refcount. Fixes: 9bae4880acee ("ASoC: qcom: move ipq806x specific bits out of lpass driver.") Co-authored-by: Miaoqian Lin Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220702020109.263980-1-windhl@126.com Signed-off-by: Mark Brown sound/soc/qcom/lpass-cpu.c | 1 + 1 file changed, 1 insertion(+) commit af483947d472eccb79e42059276c4deed76f99a6 Author: haibinzhang (张海斌) Date: Sat Jul 2 05:43:19 2022 +0000 arm64: fix oops in concurrently setting insn_emulation sysctls emulation_proc_handler() changes table->data for proc_dointvec_minmax and can generate the following Oops if called concurrently with itself: | Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010 | Internal error: Oops: 96000006 [#1] SMP | Call trace: | update_insn_emulation_mode+0xc0/0x148 | emulation_proc_handler+0x64/0xb8 | proc_sys_call_handler+0x9c/0xf8 | proc_sys_write+0x18/0x20 | __vfs_write+0x20/0x48 | vfs_write+0xe4/0x1d0 | ksys_write+0x70/0xf8 | __arm64_sys_write+0x20/0x28 | el0_svc_common.constprop.0+0x7c/0x1c0 | el0_svc_handler+0x2c/0xa0 | el0_svc+0x8/0x200 To fix this issue, keep the table->data as &insn->current_mode and use container_of() to retrieve the insn pointer. Another mutex is used to protect against the current_mode update but not for retrieving insn_emulation as table->data is no longer changing. Co-developed-by: hewenliang Signed-off-by: hewenliang Signed-off-by: Haibin Zhang Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20220128090324.2727688-1-hewenliang4@huawei.com Link: https://lore.kernel.org/r/9A004C03-250B-46C5-BF39-782D7551B00E@tencent.com Signed-off-by: Will Deacon arch/arm64/kernel/armv8_deprecated.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 9e95c67efa8aa26f03b08147a552eb71e83e1a77 Author: Nicolas Saenz Julienne Date: Sat Jun 25 13:36:19 2022 +0200 soc: bcm: bcm2835-power: Bypass power_on/off() calls Bypass power_on/power_off() when running on BCM2711 as they are not needed. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Reviewed-by: Peter Robinson Acked-by: Florian Fainelli Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220625113619.15944-12-stefan.wahren@i2se.com drivers/soc/bcm/bcm2835-power.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit a7120238c2086d95172abb8507c8819e11e195f1 Author: Stefan Wahren Date: Sat Jun 25 13:36:18 2022 +0200 soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB In BCM2711 the new RPiVid ASB took over V3D. The old ASB is still present with the ISP and H264 bits, and V3D is in the same place in the new ASB as the old one. Use the fact that 'pm->rpivid_asb' is populated as a hint that we're on BCM2711. Signed-off-by: Stefan Wahren Reviewed-by: Peter Robinson Acked-by: Florian Fainelli Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220625113619.15944-11-stefan.wahren@i2se.com drivers/soc/bcm/bcm2835-power.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit a6a1747a5ca90051e49f8a394dd0464cef8d755d Author: Stefan Wahren Date: Sat Jun 25 13:36:17 2022 +0200 soc: bcm: bcm2835-power: Resolve ASB register macros The macros in order to access the ASB registers have a hard coded base address. So extending them for other platforms would make them harder to read. As a solution resolve these macros. Signed-off-by: Stefan Wahren Reviewed-by: Peter Robinson Acked-by: Florian Fainelli Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220625113619.15944-10-stefan.wahren@i2se.com drivers/soc/bcm/bcm2835-power.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit c494a447c14e7a8b997b4b8c4eaf9808e216ea70 Author: Stefan Wahren Date: Sat Jun 25 13:36:16 2022 +0200 soc: bcm: bcm2835-power: Refactor ASB control The functions to control the async AXI bridges are almost identical. So define a general function to handle it and keep the original ones as wrapper. This should make this driver easier to extend. Signed-off-by: Stefan Wahren Reviewed-by: Peter Robinson Acked-by: Florian Fainelli Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220625113619.15944-9-stefan.wahren@i2se.com drivers/soc/bcm/bcm2835-power.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) commit df76234276e22136b2468825c18407fdfbb2076a Author: Stefan Wahren Date: Sat Jun 25 13:36:15 2022 +0200 mfd: bcm2835-pm: Add support for BCM2711 In BCM2711 the new RPiVid ASB took over V3D. The old ASB is still present with the ISP and H264 bits, and V3D is in the same place in the new ASB as the old one. As per the devicetree bindings, BCM2711 will provide both the old and new ASB resources, so get both of them and pass them into 'bcm2835-power,' which will take care of selecting which one to use accordingly. Since the RPiVid ASB's resources were being provided prior to formalizing the bindings[1], also support the old DT files that didn't use 'reg-names.' [1] See: 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi 4 support") Signed-off-by: Stefan Wahren Reviewed-by: Peter Robinson Acked-by: Florian Fainelli Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220625113619.15944-8-stefan.wahren@i2se.com drivers/mfd/bcm2835-pm.c | 13 +++++++++++++ include/linux/mfd/bcm2835-pm.h | 1 + 2 files changed, 14 insertions(+) commit 01e7865d18d53f7d736e04618037760a00c28448 Author: Nicolas Saenz Julienne Date: Sat Jun 25 13:36:14 2022 +0200 mfd: bcm2835-pm: Use 'reg-names' to get resources If available in firmware, find resources by their 'reg-names' position instead of relying on hardcoded offsets. Care is taken to support old firmware nonetheless. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Acked-by: Florian Fainelli Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220625113619.15944-7-stefan.wahren@i2se.com drivers/mfd/bcm2835-pm.c | 61 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 20 deletions(-) commit 874bdbfe624e577687c2053a26aab44715c68453 Author: Zhang Jiaming Date: Mon Jul 4 17:36:32 2022 +0800 net: hns: Fix spelling mistakes in comments. Fix spelling of 'waitting' in comments. remove unnecessary space of 'MDIO_COMMAND_REG 's'. Signed-off-by: Zhang Jiaming Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns_mdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fd4b96c44aba86c4bacda2a93f57429ffd835284 Merge: 5ee4bba272d1 d80702ff1257 Author: David S. Miller Date: Mon Jul 4 10:44:08 2022 +0100 Merge branch 'nfp-vlan-strip-and-insert' Simon Horman says: ==================== nfp: support VLAN strip and insert this series adds support to the NFP driver for HW offload of both: * RX VLAN ctag/stag strip * TX VLAN ctag insert ==================== Signed-off-by: David S. Miller commit d80702ff12576682b8bce121600f687535716e7d Author: Diana Wang Date: Sat Jul 2 09:35:51 2022 +0200 nfp: support TX VLAN ctag insert Add support for TX VLAN ctag insert which may be configured via ethtool. e.g. # ethtool -K $DEV tx-vlan-offload on The NIC supplies VLAN insert information as packet metadata. The fields of this VLAN metadata are gotten from sk_buff, including vlan_proto and vlan tag. Configuration control bit NFP_NET_CFG_CTRL_TXVLAN_V2 is to signal availability of ctag-insert features of the firmware. NFDK is used to communicate via PCIE to NFP-3800 based NICs while NFD3 is used for other NICs supported by the NFP driver. The metadata format on tx side of NFD3 is different from NFDK. This feature is not currently implemented for NFDK. Signed-off-by: Diana Wang Reviewed-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfd3/dp.c | 41 +++++++++++++++------- drivers/net/ethernet/netronome/nfp/nfd3/rings.c | 1 + .../net/ethernet/netronome/nfp/nfp_net_common.c | 13 ++++--- drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 7 ++++ drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 2 +- 5 files changed, 45 insertions(+), 19 deletions(-) commit 67d2656b48f108bcf8819f05374c68cfedda3133 Author: Diana Wang Date: Sat Jul 2 09:35:50 2022 +0200 nfp: support RX VLAN ctag/stag strip Add support for RX VLAN ctag/stag strip which may be configured via ethtool. e.g. # ethtool -K $DEV rx-vlan-offload on # ethtool -K $DEV rx-vlan-stag-hw-parse on Ctag-stripped and stag-stripped cannot be enabled at the same time because currently the kernel supports only one layer of VLAN stripping. The NIC supplies VLAN strip information as packet metadata. The fields of this VLAN metadata are: * strip flag: 1 for stripped; 0 for unstripped * tci: VLAN TCI ID * tpid: 1 for ETH_P_8021AD; 0 for ETH_P_8021Q Configuration control bits NFP_NET_CFG_CTRL_RXVLAN_V2 and NFP_NET_CFG_CTRL_RXQINQ are to signal availability of ctag-strip and stag-strip features of the firmware. Signed-off-by: Diana Wang Reviewed-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfd3/dp.c | 22 +++++++-- drivers/net/ethernet/netronome/nfp/nfd3/rings.c | 1 + drivers/net/ethernet/netronome/nfp/nfd3/xsk.c | 9 ++-- drivers/net/ethernet/netronome/nfp/nfdk/dp.c | 21 ++++++-- drivers/net/ethernet/netronome/nfp/nfdk/rings.c | 1 + drivers/net/ethernet/netronome/nfp/nfp_net.h | 7 +++ .../net/ethernet/netronome/nfp/nfp_net_common.c | 57 +++++++++++++++++++--- drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 10 ++++ drivers/net/ethernet/netronome/nfp/nfp_net_dp.c | 24 +++++++++ drivers/net/ethernet/netronome/nfp/nfp_net_dp.h | 2 + drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 11 +++-- 11 files changed, 143 insertions(+), 22 deletions(-) commit 5ee4bba272d171e797c1b3c7b5ff889c3a2f0ec9 Merge: 39bfb3c12d79 03b3df43ce1f Author: David S. Miller Date: Mon Jul 4 10:39:25 2022 +0100 Merge branch 'smsc95xx-deadlock' Lukas Wunner says: ==================== Deadlock no more in LAN95xx Second attempt at fixing a runtime resume deadlock in the LAN95xx USB driver: In short, the driver isn't using the "nopm" register accessors in portions of its runtime resume path, causing a deadlock. I'm fixing that by auto-detecting whether nopm accessors shall be used, instead of having to explicitly call them wherever it's necessary. As a byproduct, code size shrinks significantly (see diffstat below). Back in April I submitted a first attempt which was rejected by Alan Stern: https://lore.kernel.org/all/6710d8c18ff54139cdc538763ba544187c5a0cee.1651041411.git.lukas@wunner.de/ That approach only detected whether a PM callback is running concurrently, not whether the access is performed by the PM callback. I've come up with a different approach which should resolve the objection (see patch [1/3]). ==================== Signed-off-by: David S. Miller commit 03b3df43ce1f64b2ec6ef8cbcf2006f3938643b2 Author: Lukas Wunner Date: Fri Jul 1 22:47:53 2022 +0200 usbnet: smsc95xx: Clean up unnecessary BUG_ON() upon register access smsc95xx_read_reg() and smsc95xx_write_reg() call BUG_ON() if the struct usbnet pointer passed in is NULL. The functions have just been amended to dereference the pointer on entry. So the kernel now oopses if the pointer is NULL, eliminating the need for an explicit BUG_ON(). Signed-off-by: Lukas Wunner Signed-off-by: David S. Miller drivers/net/usb/smsc95xx.c | 4 ---- 1 file changed, 4 deletions(-) commit 3147242980c5f849978b424cf79dda4fef20716f Author: Lukas Wunner Date: Fri Jul 1 22:47:52 2022 +0200 usbnet: smsc95xx: Clean up nopm handling The LAN95xx driver has just been amended to auto-detect whether the _nopm variant of usbnet_read_cmd() / usbnet_write_cmd() shall be used. Drop all the now unnecessary open coding of that distinction. Signed-off-by: Lukas Wunner Signed-off-by: David S. Miller drivers/net/usb/smsc95xx.c | 172 +++++++++++++++++---------------------------- 1 file changed, 66 insertions(+), 106 deletions(-) commit 7b960c967f2aa01ab8f45c5a0bd78e754cffdeee Author: Lukas Wunner Date: Fri Jul 1 22:47:51 2022 +0200 usbnet: smsc95xx: Fix deadlock on runtime resume Commit 05b35e7eb9a1 ("smsc95xx: add phylib support") amended smsc95xx_resume() to call phy_init_hw(). That function waits for the device to runtime resume even though it is placed in the runtime resume path, causing a deadlock. The problem is that phy_init_hw() calls down to smsc95xx_mdiobus_read(), which never uses the _nopm variant of usbnet_read_cmd(). Commit b4df480f68ae ("usbnet: smsc95xx: add reset_resume function with reset operation") causes a similar deadlock on resume if the device was already runtime suspended when entering system sleep: That's because the commit introduced smsc95xx_reset_resume(), which calls down to smsc95xx_reset(), which neglects to use _nopm accessors. Fix by auto-detecting whether a device access is performed by the suspend/resume task_struct and use the _nopm variant if so. This works because the PM core guarantees that suspend/resume callbacks are run in task context. Stacktrace for posterity: INFO: task kworker/2:1:49 blocked for more than 122 seconds. Workqueue: usb_hub_wq hub_event schedule rpm_resume __pm_runtime_resume usb_autopm_get_interface usbnet_read_cmd __smsc95xx_read_reg __smsc95xx_phy_wait_not_busy __smsc95xx_mdio_read smsc95xx_mdiobus_read __mdiobus_read mdiobus_read smsc_phy_reset phy_init_hw smsc95xx_resume usb_resume_interface usb_resume_both usb_runtime_resume __rpm_callback rpm_callback rpm_resume __pm_runtime_resume usb_autoresume_device hub_event process_one_work Fixes: b4df480f68ae ("usbnet: smsc95xx: add reset_resume function with reset operation") Signed-off-by: Lukas Wunner Cc: stable@vger.kernel.org # v3.16+ Cc: Andre Edich Signed-off-by: David S. Miller drivers/net/usb/smsc95xx.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit 39bfb3c12d792181de0cf3306be1ea03664a1b05 Author: Kurt Kanzenbach Date: Fri Jul 1 19:56:06 2022 +0200 net: phy: broadcom: Add support for BCM53128 internal PHYs Add support for BCM53128 internal PHYs. These support interrupts as well as statistics. Therefore, enable the Broadcom PHY driver for them. Tested on BCM53128 switch using the mainline b53 DSA driver. Signed-off-by: Kurt Kanzenbach Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/broadcom.c | 15 +++++++++++++++ include/linux/brcmphy.h | 1 + 2 files changed, 16 insertions(+) commit 326569cc33b9f712c96267f8c5c788bba3b30ca5 Author: Clément Léger Date: Fri Jul 1 19:52:31 2022 +0200 dt-bindings: net: dsa: renesas,rzn1-a5psw: add interrupts description Describe the switch interrupts (dlr, switch, prp, hub, pattern) which are connected to the GIC. Signed-off-by: Clément Léger Reviewed-by: Rob Herring Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller .../bindings/net/dsa/renesas,rzn1-a5psw.yaml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 0d153dd208d46c2096151ac1c484e776754dfe51 Author: Casper Andersson Date: Fri Jul 1 16:43:50 2022 +0200 selftest: net: bridge mdb add/del entry to port that is down Tests that permanent mdb entries can be added/deleted on ports with state down. Signed-off-by: Casper Andersson Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/Makefile | 1 + .../net/forwarding/bridge_mdb_port_down.sh | 118 +++++++++++++++++++++ 2 files changed, 119 insertions(+) commit 634b215b73073f91523d6a97e547802aa2483ac8 Author: XueBing Chen Date: Fri Jul 1 18:55:17 2022 +0800 net: ipconfig: use strscpy to replace strlcpy The strlcpy should not be used because it doesn't limit the source length. Preferred is strscpy. Signed-off-by: XueBing Chen Signed-off-by: David S. Miller net/ipv4/ipconfig.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 798661c73672797549ba95a8a3da432d32b67178 Merge: d0bf1fe6454e 88840d697f6e Author: David S. Miller Date: Mon Jul 4 09:56:58 2022 +0100 Merge branch 'mlxsw-unified-bridge-conversion-part-6' Ido Schimmel says: ==================== mlxsw: Unified bridge conversion - part 6/6 This is the sixth and final part of the conversion of mlxsw to the unified bridge model. It transitions the last bits of functionality that were under firmware's responsibility in the legacy model to the driver. The last patches flip the driver to the unified bridge model and clean up code that was used to make the conversion easier to review. Patchset overview: Patch #1 sets the egress VID for known unicast packets. For multicast packets, the egress VID is configured using the MPE table. See commit 8c2da081c8b8 ("mlxsw: spectrum_fid: Configure egress VID classification for multicast"). Patch #2 configures the VNI to FID classification that is used during decapsulation. Patch #3 configures ingress router interface (RIF) in FID classification records, so that when a packet reaches the router block, its ingress RIF is known. Care is taken to configure this in all the different flows (e.g., RIF set on a FID, {Port, VID} joins a FID that already has a RIF etc.). Patch #4 configures the egress VID for routed packets. For such packets, the egress VID is not set by the MPE table or by an FDB record at the egress bridge, but instead by a dedicated table that maps {Egress RIF, Egress port} to a VID. Patch #5 removes VID configuration from RIF creation as in the unified bridge model firmware no longer needs it. Patch #6 sets the egress FID to use in RIF configuration so that the device knows using which FID to bridge the packet after routing. Patches #7-#9 add a new 802.1Q family and associated VLAN RIFs. In the unified bridge model, we no longer need to emulate 802.1Q FIDs using 802.1D FIDs as VNI can be associated with both. Patches #10-#11 finally flip the driver to the unified bridge model. Patches #12-#13 clean up code that was used to make the conversion easier to review. v2: * Fix build failure [1] in patch #1. [1] https://lore.kernel.org/netdev/20220630201709.6e66a1bb@kernel.org/ ==================== Signed-off-by: David S. Miller commit 88840d697f6e01de885f012fb9b21b9c26743346 Author: Amit Cohen Date: Mon Jul 4 09:11:39 2022 +0300 mlxsw: spectrum_fid: Remove '_ub_' indication from structures and defines Some structures and defines were added with '_ub_' indication, as there were equivalent objects for the legacy model. Now when the legacy model is not used anymore, remove the '_ub_' indication. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 94 +++++++++++----------- 1 file changed, 47 insertions(+), 47 deletions(-) commit 8928fd47782c77c81c9219dfce08e8c768f6c111 Author: Amit Cohen Date: Mon Jul 4 09:11:38 2022 +0300 mlxsw: spectrum_fid: Remove flood_index() from FID operation structure The flood_index() function is not needed anymore, as in the unified bridge model the flood index is calculated using 'mid_base' and 'fid_offset'. Remove this function. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 77b7f83d5c2594c5dbdd217aec03bd2265c0f11c Author: Amit Cohen Date: Mon Jul 4 09:11:37 2022 +0300 mlxsw: Enable unified bridge model After all the preparations for unified bridge model, finally flip mlxsw driver to use the new model. Change config profile, set 'ubridge' to true and remove the configurations that are relevant only for the legacy model. Set 'flood_mode' to 'controlled' as the current mode is not supported with unified bridge model. Remove all the code which is dedicated to the legacy model. Remove 'struct mlxsw_sp.ubridge' variable which was temporarily added to separate configurations between the models. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 29 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 7 - drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 326 ++++----------------- drivers/net/ethernet/mellanox/mlxsw/spectrum_pgt.c | 21 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 20 +- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 4 +- 6 files changed, 79 insertions(+), 328 deletions(-) commit e9cf8990faea42a0809b9f1e618effd6fd836e8a Author: Amit Cohen Date: Mon Jul 4 09:11:36 2022 +0300 mlxsw: Add ubridge to config profile The unified bridge model is enabled via the CONFIG_PROFILE command during driver initialization. Add the definition of the relevant fields to the command's payload in preparation for unified bridge enablement. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/cmd.h | 13 +++++++++++++ drivers/net/ethernet/mellanox/mlxsw/core.h | 2 ++ drivers/net/ethernet/mellanox/mlxsw/pci.c | 5 +++++ 3 files changed, 20 insertions(+) commit bf73904f5fba7c92c0c11ebe8cf91788354bf068 Author: Amit Cohen Date: Mon Jul 4 09:11:35 2022 +0300 mlxsw: Add support for 802.1Q FID family Using the legacy bridge model, there is no VID classification at egress for 802.1Q FIDs, which means that the VID is maintained. This behavior cause the limitation that 802.1Q FIDs cannot work with VXLAN. This limitation stems from the fact that a decapsulated VXLAN packet should not contain a VLAN tag. If such a packet was to egress from a local port using a 802.1Q FID, it would "maintain" its VLAN on egress, which is no VLAN at all. Currently 802.1Q FIDs are emulated in mlxsw driver using 802.1D FIDs. Using unified bridge model, there is a FID->VID mapping, so it is possible to stop emulating 802.1Q FIDs. The main changes are: 1. Use 'SFGC.bridge_type' = 0, to separate between 802.1Q FIDs and 802.1D FIDs. 2. Use VLAN RIF instead of the emulated one (VLAN_EMU which is emulated using FID RIF). 3. Create VID->FID mapping when the FID is created. Then when a new port is mapped to the FID, if it not in virtual mode, no new mapping is needed. Save the new port in 'port_vid_list', to be able to update a RIF in all {Port, VID}->FID mappings in case that the port will be in virtual mode later. 4. Add a dedicated operation function per FID family to update RIF for VID->FID mappings. For 802.1d and rFID families, just return. For 802.1q family, handle the global mapping which is created for new 802.1q FID. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 192 ++++++++++++++++++++- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 3 +- 2 files changed, 193 insertions(+), 2 deletions(-) commit d4324e3194c78a304cc86ffb4f79fef2fdadf599 Author: Amit Cohen Date: Mon Jul 4 09:11:34 2022 +0300 mlxsw: Add new FID families for unified bridge model In the unified bridge model, mlxsw will no longer emulate 802.1Q FIDs using 802.1D FIDs. The new FID table will look as follows: +---------------+ | 802.1q FIDs | 4K entries | [1..4094] | +---------------+ | 802.1d FIDs | 1K entries | [4095..5118] | +---------------+ | Dummy FIDs | 1 entry | [5119..5119] | +---------------+ | rFIDs | 11K entries | [5120..16383] | +---------------+ In order to make the change easier to review, four new temporary FID families will be added (e.g., MLXSW_SP_FID_TYPE_8021D_UB) and will not be registered with the FID core until mlxsw is flipped to use the unified bridge model. Add .1d, rfid and dummy FID families for unified bridge, the next patch will add .1q family separately as it requires more changes. The following changes are required: 1. Add 'smpe_index_valid' field to 'struct mlxsw_sp_fid_family' and set SFMR.smpe accordingly. SMPE index is reserved for rFIDs, as their flooding is handled by firmware, and always reserved in Spectrum-1, as it is configured as part of PGT table. 2. Add 'ubridge' field to 'struct mlxsw_sp_fid_family'. This field will be removed later, use it in mlxsw_sp_fid_family_{register,unregister}() to skip the registration / unregistration of the new families when the legacy model is used. 3. Indexes - the start and end indexes of each FID family will need to be changed according to the above diagram. 4. Add flood tables for unified bridge model, use 'fid_offset' as table type, as in the new model the access to flood tables will be using 'fid_offset' calculation. 5. FID family operation changes: a. rFID supposed to be created using SFMR, as it is not created by firmware using unified bridge model. b. port_vid_map() should perform SVFA for rFID, as the mapping is not created by firmware using unified bridge model. c. flood_index() is not aligned to the new model, as this function will be removed later. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 5 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 + drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 187 ++++++++++++++++++++- 3 files changed, 189 insertions(+), 7 deletions(-) commit 662761d8987dc232e85fc35b529f80e01fd4fc71 Author: Amit Cohen Date: Mon Jul 4 09:11:33 2022 +0300 mlxsw: Add support for VLAN RIFs Router interfaces (RIFs) constructed on top of VLAN-aware bridges are of 'VLAN' type, whereas RIFs constructed on top of VLAN-unaware bridges are of 'FID' type. Currently 802.1Q FIDs are emulated using 802.1D FIDs, therefore VLAN RIFs are emulated using FID RIFs. As part of converting the driver to use unified bridge model, 802.1Q FIDs and VLAN RIFs will be used. The egress FID is required for VLAN RIFs in Spectrum-2 and above, but not in Spectrum-1, as in Spectrum-1 the mapping for VLAN RIFs is VID->FID, while in other ASICs it is FID->FID. The reason for the change is that it is more scalable to reuse the FID->FID entry than creating multiple {Port, VID}->FID entries for the router port. Use the existing operation structure to separate the configuration between different ASICs. Add support for VLAN RIFs, most of the configurations are same to FID RIFs. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 119 +++++++++++++++++++++ 2 files changed, 120 insertions(+) commit 058de325a4fbbdfbaf111d31a28918c3fd92e096 Author: Amit Cohen Date: Mon Jul 4 09:11:32 2022 +0300 mlxsw: Configure egress FID classification after routing After routing, a packet needs to perform an L2 lookup using the DMAC it got from the routing and a FID. In unified bridge model, the egress FID configuration needs to be performed by software. It is configured by RITR for both sub-port RIFs and FID RIFs. Currently FID RIFs already configure eFID. Add eFID configuration for sub-port RIFs. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 3 ++- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 2c3ae763eb703760a5388015582c10fd62d6ea18 Author: Amit Cohen Date: Mon Jul 4 09:11:31 2022 +0300 mlxsw: spectrum_router: Do not configure VID for sub-port RIFs The field 'vid' in RITR is reserved when unified bridge model is used and the RIF's type is sub-port RIF. Instead, ingress VID is configured via SVFA and egress VID is configured via REIV. Set 'vid' to zero in RITR register for sub-port RIF when unified bridge model is used. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4b464d20bc122699a7258cb44158d83d7fdc0ec Author: Amit Cohen Date: Mon Jul 4 09:11:30 2022 +0300 mlxsw: spectrum_fid: Configure layer 3 egress VID classification After routing, the device always consults a table that determines the packet's egress VID based on {egress RIF, egress local port}. In the unified bridge model, it is up to software to maintain this table via REIV register. The table needs to be updated in the following flows: 1. When a RIF is set on a FID, need to iterate over the FID's {Port, VID} list and issue REIV write to map the {RIF, Port} to the given VID. 2. When a {Port, VID} is mapped to a FID and the FID already has a RIF, need to issue REIV write with a single record to map the {RIF, Port} to the given VID. REIV register supports a simultaneous update of 256 ports, so use this capability for the first flow. Handle the two above mentioned flows. Add mlxsw_sp_fid_evid_map() function to handle egress VID classification for both unicast and multicast. Layer 2 multicast configuration is already done in the driver, just move it to the new function. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 142 ++++++++++++++++++++- 1 file changed, 137 insertions(+), 5 deletions(-) commit fea20547d5b50017e1a0525e6788bd3db22f5ca3 Author: Amit Cohen Date: Mon Jul 4 09:11:29 2022 +0300 mlxsw: Configure ingress RIF classification Before layer 2 forwarding, the device classifies an incoming packet to a FID. The classification is done based on one of the following keys: 1. FID 2. VNI (after decapsulation) 3. VID / {Port, VID} After classification, the FID is known, but also all the attributes of the FID, such as the router interface (RIF) via which a packet that needs to be routed will ingress the router block. In the legacy model, when a RIF was created / destroyed, it was firmware's responsibility to update it in the previously mentioned FID classification records. In the unified bridge model, this responsibility moved to software. The third classification requires to iterate over the FID's {Port, VID} list and issue SVFA write with the correct mapping table according to the port's mode (virtual or not). We never map multiple VLANs to the same FID using VID->FID mapping, so such a mapping needs to be performed once. When a new FID classification entry is configured and the FID already has a RIF, set the RIF as part of SVFA configuration. The reverse needs to be done when clearing a RIF from a FID. Currently, clearing is done by issuing mlxsw_sp_fid_rif_set() with a NULL RIF pointer. Instead, introduce mlxsw_sp_fid_rif_unset(). Note that mlxsw_sp_fid_rif_set() is called after the RIF is fully operational, so it conforms to the internal requirement regarding SVFA.irif_v: "Must not be set for a non-enabled RIF". Do not set the ingress RIF for rFIDs, as the {Port, VID}->rFID entry is configured by firmware when legacy model is used, a next patch will handle this configuration for rFIDs and unified bridge model. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 17 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 173 +++++++++++++++++++-- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 20 ++- .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 1 - 5 files changed, 189 insertions(+), 26 deletions(-) commit 8cfc7f7707c1812d879e942ddc45b25bf088c0b4 Author: Amit Cohen Date: Mon Jul 4 09:11:28 2022 +0300 mlxsw: spectrum_fid: Configure VNI to FID classification In the new model, SFMR no longer configures both VNI->FID and FID->VNI classifications, but only the later. The former needs to be configured via SVFA. Add SVFA configuration as part of vni_set() and vni_clear(). Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 38 ++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) commit 53d7ae53d8071fa1270c208a730d6cf205a50533 Author: Amit Cohen Date: Mon Jul 4 09:11:27 2022 +0300 mlxsw: Configure egress VID for unicast FDB entries Using unified bridge model, firmware no longer configures the egress VID "under the hood" and moves this responsibility to software. For layer 2, this means that software needs to determine the egress VID for both unicast (i.e., FDB) and multicast (i.e., MDB and flooding) flows. Unicast FDB records and unicast LAG FDB records have new fields - "set_vid" and "vid", set them. For records which point to router port, do not set these fields. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 5 ++++- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 24 ++++++++++++---------- 2 files changed, 17 insertions(+), 12 deletions(-) commit 1926a6b75954fc1a8b44d10bd0c67db957b78cf7 Author: Thomas Hellström Date: Mon Jun 20 14:36:59 2022 +0200 drm/i915: Fix vm use-after-free in vma destruction In vma destruction, the following race may occur: Thread 1: Thread 2: i915_vma_destroy(); ... list_del_init(vma->vm_link); ... mutex_unlock(vma->vm->mutex); __i915_vm_release(); release_references(); And in release_reference() we dereference vma->vm to get to the vm gt pointer, leading to a use-after free. However, __i915_vm_release() grabs the vm->mutex so the vm won't be destroyed before vma->vm->mutex is released, so extract the gt pointer under the vm->mutex to avoid the vma->vm dereference in release_references(). v2: Fix a typo in the commit message (Andi Shyti) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5944 Fixes: e1a7ab4fca0c ("drm/i915: Remove the vm open count") Cc: Niranjana Vishwanathapura Cc: Matthew Auld Signed-off-by: Thomas Hellström Acked-by: Nirmoy Das Reviewed-by: Andrzej Hajda Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220620123659.381772-1-thomas.hellstrom@linux.intel.com drivers/gpu/drm/i915/i915_vma.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 5e25c25aa2c08fb9a79476e029c0b1e3dcd70566 Author: Petr Vaněk Date: Thu Jun 30 16:27:20 2022 +0200 xfrm: improve wording of comment above XFRM_OFFLOAD flags I have noticed a few minor wording issues in a comment recently added above XFRM_OFFLOAD flags in 7c76ecd9c99b ("xfrm: enforce validity of offload input flags"). Signed-off-by: Petr Vaněk Signed-off-by: Steffen Klassert include/uapi/linux/xfrm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cf746bac6c5ba4577a9c7c528f351f56d0ebf4d6 Author: Zhang Jiaming Date: Thu Jun 23 17:27:12 2022 +0800 esp6: Fix spelling mistake Change 'accomodate' to 'accommodate'. Signed-off-by: Zhang Jiaming Signed-off-by: Steffen Klassert net/ipv6/esp6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ccf170e9d8fdacfe435bbe3749c897c7d86d32f8 Author: Kan Liang Date: Wed Jun 29 08:08:40 2022 -0700 perf/x86/intel: Fix PEBS data source encoding for ADL The PEBS data source encoding for the e-core is different from the p-core. Add the pebs_data_source[] in the struct x86_hybrid_pmu to store the data source encoding for each type of the core. Add intel_pmu_pebs_data_source_grt() for the e-core. There is nothing changed for the data source encoding of the p-core, which still reuse the intel_pmu_pebs_data_source_skl(). Fixes: f83d2f91d259 ("perf/x86/intel: Add Alder Lake Hybrid support") Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/20220629150840.2235741-2-kan.liang@linux.intel.com arch/x86/events/intel/core.c | 2 +- arch/x86/events/intel/ds.c | 51 +++++++++++++++++++++++++++++++++----------- arch/x86/events/perf_event.h | 6 ++++++ 3 files changed, 45 insertions(+), 14 deletions(-) commit 39a41278f041e4b7ee6c83caefac845c9b19fc61 Author: Kan Liang Date: Wed Jun 29 08:08:39 2022 -0700 perf/x86/intel: Fix PEBS memory access info encoding for ADL The PEBS memory access latency encoding for the e-core is slightly different from the p-core. The bit 4 is Lock, while the bit 5 is TLB access. Add a new flag to indicate the load/store latency event on a hybrid platform. Add a new function pointer to retrieve the latency data for a hybrid platform. Only implement the new flag and function for the e-core on ADL. Still use the existing PERF_X86_EVENT_PEBS_LDLAT/STLAT flag for the p-core on ADL. Factor out pebs_set_tlb_lock() to set the generic memory data source information of the TLB access and lock for both load and store latency. Move the intel_get_event_constraints() to ahead of the :ppp check, otherwise the new flag never gets a chance to be set for the :ppp events. Fixes: f83d2f91d259 ("perf/x86/intel: Add Alder Lake Hybrid support") Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/20220629150840.2235741-1-kan.liang@linux.intel.com arch/x86/events/intel/core.c | 5 +-- arch/x86/events/intel/ds.c | 80 +++++++++++++++++++++++++++----------------- arch/x86/events/perf_event.h | 8 +++++ 3 files changed, 60 insertions(+), 33 deletions(-) commit c02d5546ea34d589c83eda5055dbd727a396642b Author: Uros Bizjak Date: Wed Jun 29 17:15:52 2022 +0200 sched/core: Use try_cmpxchg in set_nr_{and_not,if}_polling Use try_cmpxchg instead of cmpxchg (*ptr, old, new) != old in set_nr_{and_not,if}_polling. x86 cmpxchg returns success in ZF flag, so this change saves a compare after cmpxchg. The definition of cmpxchg based fetch_or was changed in the same way as atomic_fetch_##op definitions were changed in e6790e4b5d5e97dc287f3496dd2cf2dbabdfdb35. Also declare these two functions as inline to ensure inlining. In the case of set_nr_and_not_polling, the compiler (gcc) tries to outsmart itself by constructing the boolean return value with logic operations on the fetched value, and these extra operations enlarge the function over the inlining threshold value. Signed-off-by: Uros Bizjak Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20220629151552.6015-1-ubizjak@gmail.com kernel/sched/core.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit 1fcf54deb767d474181ad7cf33c92bb2a33607fb Author: Josh Don Date: Wed Jun 29 14:14:26 2022 -0700 sched/core: add forced idle accounting for cgroups 4feee7d1260 previously added per-task forced idle accounting. This patch extends this to also include cgroups. rstat is used for cgroup accounting, except for the root, which uses kcpustat in order to bypass the need for doing an rstat flush when reading root stats. Only cgroup v2 is supported. Similar to the task accounting, the cgroup accounting requires that schedstats is enabled. Signed-off-by: Josh Don Signed-off-by: Peter Zijlstra (Intel) Acked-by: Tejun Heo Link: https://lkml.kernel.org/r/20220629211426.3329954-1-joshdon@google.com include/linux/cgroup-defs.h | 4 ++++ include/linux/kernel_stat.h | 7 +++++++ kernel/cgroup/rstat.c | 44 ++++++++++++++++++++++++++++++++++++++------ kernel/sched/core_sched.c | 6 +++++- kernel/sched/cputime.c | 15 +++++++++++++++ 5 files changed, 69 insertions(+), 7 deletions(-) commit 3e6fd02fce7bc415d702490026b41107c2c83763 Author: Kavyasree Kotagiri Date: Mon Jun 27 16:35:52 2022 +0530 ARM: dts: lan966x: Add mcan1 node. Add the mcan1 node. By default, keep it disabled. Signed-off-by: Kavyasree Kotagiri Acked-by: Nicolas Ferre Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220627110552.26315-1-kavyasree.kotagiri@microchip.com arch/arm/boot/dts/lan966x.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit d657ab84476b1e11146b0c0fa7856d39a8b80da2 Author: Claudiu Beznea Date: Fri Jun 10 12:24:14 2022 +0300 ARM: dts: at91: sama7g5: add reset-controller node Add reset controller node. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220610092414.1816571-10-claudiu.beznea@microchip.com arch/arm/boot/dts/sama7g5.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 979813d2ab70513a4dca68a13cd75fc656579b19 Author: Claudiu Beznea Date: Fri Jun 10 12:24:06 2022 +0300 ARM: dts: at91: use generic name for reset controller Use generic name for reset controller of AT91 devices to comply with DT specifications. Signed-off-by: Claudiu Beznea Reviewed-by: Philipp Zabel Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220610092414.1816571-2-claudiu.beznea@microchip.com arch/arm/boot/dts/at91sam9260.dtsi | 2 +- arch/arm/boot/dts/at91sam9261.dtsi | 2 +- arch/arm/boot/dts/at91sam9263.dtsi | 2 +- arch/arm/boot/dts/at91sam9g45.dtsi | 2 +- arch/arm/boot/dts/at91sam9n12.dtsi | 2 +- arch/arm/boot/dts/at91sam9rl.dtsi | 2 +- arch/arm/boot/dts/at91sam9x5.dtsi | 2 +- arch/arm/boot/dts/sam9x60.dtsi | 2 +- arch/arm/boot/dts/sama5d2.dtsi | 2 +- arch/arm/boot/dts/sama5d3.dtsi | 2 +- arch/arm/boot/dts/sama5d4.dtsi | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) commit b66724d23d1d1b7eb968aff9513e9724c8a3d613 Author: Claudiu Beznea Date: Wed Jun 15 11:06:33 2022 +0300 ARM: dts: at91: sama5d2: fix compilation warning Fix the following compilation warning: arch/arm/boot/dts/sama5d2.dtsi:371.29-382.6: Warning (avoid_unnecessary_addr_size): /ahb/apb/ethernet@f8008000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property also defined at arch/arm/boot/dts/at91-sama5d2_icp.dts:353.8-363.3 Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220615080633.1881196-2-claudiu.beznea@microchip.com arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 2 ++ arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi | 2 ++ arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 2 ++ arch/arm/boot/dts/at91-sama5d2_xplained.dts | 2 ++ arch/arm/boot/dts/sama5d2.dtsi | 2 -- 5 files changed, 8 insertions(+), 2 deletions(-) commit 005627ea13c9c64e1a880d18f2d2b7a0c89bd4a5 Author: Claudiu Beznea Date: Wed Jun 15 11:06:32 2022 +0300 ARM: dts: at91: sama5d2: fix compilation warning Fix the following compilation warning: Warning (simple_bus_reg): /ahb/apb/resistive-touch: missing or empty reg/ranges property Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220615080633.1881196-1-claudiu.beznea@microchip.com arch/arm/boot/dts/sama5d2.dtsi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 4f2930c6718afbb6c5904cda6f6781a70c52a042 Author: Adam Sindelar Date: Mon Jun 27 18:39:12 2022 +0200 selftests/vm: only run 128TBswitch with 5-level paging The test va_128TBswitch.c expects to be able to pass mmap an address hint and length that cross the address 1<<47. On x86_64, this is not possible without 5-level page tables, so the test fails. The test is already only run on 64-bit powerpc and x86_64 archs, but this patch adds an additional check on x86_64 that skips the test if PG_TABLE_LEVELS < 5. There is precedent for checking /proc/config.gz in selftests, e.g. in selftests/firmware. Running the tests produces the desired output: sudo make -C tools/testing/selftests TARGETS=vm run_tests --------------------------- running ./va_128TBswitch.sh --------------------------- ./va_128TBswitch.sh: PG_TABLE_LEVELS=4, must be >= 5 to run this test [SKIP] ------------------------------- [adam@wowsignal.io: restrict the check to x86_64] Link: https://lkml.kernel.org/r/20220628163654.337600-1-adam@wowsignal.io [adam@wowsignal.io: fix formatting issues, rename "die" to "fail"] Link: https://lkml.kernel.org/r/20220701163030.415735-1-adam@wowsignal.io Link: https://lkml.kernel.org/r/20220627163912.5581-1-adam@wowsignal.io Signed-off-by: Adam Sindelar Cc: Adam Sindelar Cc: David Vernet Cc: Aneesh Kumar K.V Signed-off-by: Andrew Morton tools/testing/selftests/vm/Makefile | 1 + tools/testing/selftests/vm/run_vmtests.sh | 2 +- tools/testing/selftests/vm/va_128TBswitch.sh | 54 ++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) commit 1baec203b77cafa24610b5c9ae7a2aa380d74ef6 Author: Miaohe Lin Date: Sat Jun 25 17:28:16 2022 +0800 mm/khugepaged: try to free transhuge swapcache when possible Transhuge swapcaches won't be freed in __collapse_huge_page_copy(). It's because release_pte_page() is not called for these pages and thus free_page_and_swap_cache can't grab the page lock. These pages won't be freed from swap cache even if we are the only user until next time reclaim. It shouldn't hurt indeed, but we could try to free these pages to save more memory for system. Link: https://lkml.kernel.org/r/20220625092816.4856-8-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Alistair Popple Cc: Andrea Arcangeli Cc: David Hildenbrand Cc: David Howells Cc: Matthew Wilcox (Oracle) Cc: NeilBrown Cc: Peter Xu Cc: Suren Baghdasaryan Cc: Vlastimil Babka Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton include/linux/swap.h | 5 +++++ mm/khugepaged.c | 7 ++++++- mm/swap.h | 5 ----- 3 files changed, 11 insertions(+), 6 deletions(-) commit 081c32564bac58365be53b905721c9ba2300819a Author: Miaohe Lin Date: Sat Jun 25 17:28:15 2022 +0800 mm/khugepaged: remove unneeded return value of khugepaged_add_pte_mapped_thp() The return value of khugepaged_add_pte_mapped_thp() is always 0 and also ignored. Remove it to clean up the code. Link: https://lkml.kernel.org/r/20220625092816.4856-7-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Zach O'Keefe Reviewed-by: Yang Shi Cc: Alistair Popple Cc: Andrea Arcangeli Cc: David Hildenbrand Cc: David Howells Cc: Matthew Wilcox (Oracle) Cc: NeilBrown Cc: Peter Xu Cc: Suren Baghdasaryan Cc: Vlastimil Babka Signed-off-by: Andrew Morton mm/khugepaged.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6dcdc94db1d45da0e40b6947888098b9daf9eda6 Author: Miaohe Lin Date: Sat Jun 25 17:28:14 2022 +0800 mm/khugepaged: use helper macro __ATTR_RW Use helper macro __ATTR_RW to define the khugepaged attributes. Minor readability improvement. Link: https://lkml.kernel.org/r/20220625092816.4856-6-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Yang Shi Cc: Alistair Popple Cc: Andrea Arcangeli Cc: David Hildenbrand Cc: David Howells Cc: Matthew Wilcox (Oracle) Cc: NeilBrown Cc: Peter Xu Cc: Suren Baghdasaryan Cc: Vlastimil Babka Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/khugepaged.c | 67 ++++++++++++++++++++++++++------------------------------- 1 file changed, 30 insertions(+), 37 deletions(-) commit 2f55f070e5b80f130f5b161931ca91ce9cb2e625 Author: Miaohe Lin Date: Sat Jun 25 17:28:13 2022 +0800 mm/khugepaged: minor cleanup for collapse_file nr_none is always 0 for non-shmem case because the page can be read from the backend store. So when nr_none ! = 0, it must be in is_shmem case. Also only adjust the nrpages and uncharge shmem when nr_none != 0 to save cpu cycles. Link: https://lkml.kernel.org/r/20220625092816.4856-5-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Zach O'Keefe Cc: Alistair Popple Cc: Andrea Arcangeli Cc: David Hildenbrand Cc: David Howells Cc: Matthew Wilcox (Oracle) Cc: NeilBrown Cc: Peter Xu Cc: Suren Baghdasaryan Cc: Vlastimil Babka Cc: Yang Shi Signed-off-by: Andrew Morton mm/khugepaged.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 36ee2c784af0dcfa9bb442f7fa68c842d48371fc Author: Miaohe Lin Date: Sat Jun 25 17:28:12 2022 +0800 mm/khugepaged: trivial typo and codestyle cleanup Fix some typos and tweak the code to meet codestyle. No functional change intended. Link: https://lkml.kernel.org/r/20220625092816.4856-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Zach O'Keefe Reviewed-by: Yang Shi Cc: Alistair Popple Cc: Andrea Arcangeli Cc: David Hildenbrand Cc: David Howells Cc: Matthew Wilcox (Oracle) Cc: NeilBrown Cc: Peter Xu Cc: Suren Baghdasaryan Cc: Vlastimil Babka Signed-off-by: Andrew Morton mm/khugepaged.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 4d928e20fd5b9fd97e1e631500386ef12a2858d7 Author: Miaohe Lin Date: Sat Jun 25 17:28:11 2022 +0800 mm/khugepaged: stop swapping in page when VM_FAULT_RETRY occurs When do_swap_page returns VM_FAULT_RETRY, we do not retry here and thus swap entry will remain in pagetable. This will result in later failure. So stop swapping in pages in this case to save cpu cycles. As A further optimization, mmap_lock is released when __collapse_huge_page_swapin() fails to avoid relocking mmap_lock. And "swapped_in++" is moved after error handling to make it more accurate. Link: https://lkml.kernel.org/r/20220625092816.4856-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Alistair Popple Cc: Andrea Arcangeli Cc: David Hildenbrand Cc: David Howells Cc: Matthew Wilcox (Oracle) Cc: NeilBrown Cc: Peter Xu Cc: Suren Baghdasaryan Cc: Vlastimil Babka Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/khugepaged.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) commit dd5ff79d4ab85ac0cdb5f87e8fee4c4725255c4b Author: Miaohe Lin Date: Sat Jun 25 17:28:10 2022 +0800 mm/khugepaged: remove unneeded shmem_huge_enabled() check Patch series "A few cleanup patches for khugepaged", v2. This series contains a few cleaup patches to remove unneeded return value, use helper macro, fix typos and so on. More details can be found in the respective changelogs. This patch (of 7): If we reach here, khugepaged_scan_mm_slot() has already made sure that hugepage is enabled for shmem, via its call to hugepage_vma_check(). Remove this duplicated check. Link: https://lkml.kernel.org/r/20220625092816.4856-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20220625092816.4856-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Yang Shi Reviewed-by: Zach O'Keefe Cc: Andrea Arcangeli Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Cc: David Howells Cc: NeilBrown Cc: Alistair Popple Cc: David Hildenbrand Cc: Suren Baghdasaryan Cc: Peter Xu Signed-off-by: Andrew Morton mm/khugepaged.c | 2 -- 1 file changed, 2 deletions(-) commit f673bd7c2654a0e2a1ec59417dcf9b7ceae9c14c Author: XueBing Chen Date: Sat Jun 25 16:51:35 2022 +0800 mm: sparsemem: drop unexpected word 'a' in comments there is an unexpected word 'a' in the comments that need to be dropped Link: https://lkml.kernel.org/r/24fbdae3.c86.1819a0f31b9.Coremail.chenxuebing@jari.cn Signed-off-by: XueBing Chen Signed-off-by: Andrew Morton mm/sparse-vmemmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18f3962953e40401b7ed98e8524167282c3e626e Author: Qi Zheng Date: Sun Jun 26 22:57:17 2022 +0800 mm: hugetlb: kill set_huge_swap_pte_at() Commit e5251fd43007 ("mm/hugetlb: introduce set_huge_swap_pte_at() helper") add set_huge_swap_pte_at() to handle swap entries on architectures that support hugepages consisting of contiguous ptes. And currently the set_huge_swap_pte_at() is only overridden by arm64. set_huge_swap_pte_at() provide a sz parameter to help determine the number of entries to be updated. But in fact, all hugetlb swap entries contain pfn information, so we can find the corresponding folio through the pfn recorded in the swap entry, then the folio_size() is the number of entries that need to be updated. And considering that users will easily cause bugs by ignoring the difference between set_huge_swap_pte_at() and set_huge_pte_at(). Let's handle swap entries in set_huge_pte_at() and remove the set_huge_swap_pte_at(), then we can call set_huge_pte_at() anywhere, which simplifies our coding. Link: https://lkml.kernel.org/r/20220626145717.53572-1-zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Acked-by: Muchun Song Cc: Mike Kravetz Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Andrew Morton arch/arm64/include/asm/hugetlb.h | 3 --- arch/arm64/mm/hugetlbpage.c | 34 +++++++++++++++++----------------- include/linux/hugetlb.h | 13 ------------- mm/hugetlb.c | 8 +++----- mm/rmap.c | 11 +++-------- 5 files changed, 23 insertions(+), 46 deletions(-) commit ade63b419c4e8d27f0642804b6c8c7a76ffc18ac Author: Yang Yang Date: Thu Jun 23 02:08:34 2022 +0000 mm/page_alloc: make the annotations of available memory more accurate Not all systems use swap, so estimating available memory would help to prevent swapping or OOM of system that not use swap. And we need to reserve some page cache to prevent swapping or thrashing. If somebody is accessing the pages in pagecache, and if too much would be freed, most accesses might mean reading data from disk, i.e. thrashing. Link: https://lkml.kernel.org/r/20220623020833.972979-1-yang.yang29@zte.com.cn Signed-off-by: Yang Yang Signed-off-by: CGEL ZTE Cc: Matthew Wilcox Signed-off-by: Andrew Morton mm/page_alloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dc89997264de565999a1cb55db3f295d3a8e457b Author: Sergey Senozhatsky Date: Wed Jun 22 11:35:01 2022 +0900 zram: do not lookup algorithm in backends table Always use crypto_has_comp() so that crypto can lookup module, call usermodhelper to load the modules, wait for usermodhelper to finish and so on. Otherwise crypto will do all of these steps under CPU hot-plug lock and this looks like too much stuff to handle under the CPU hot-plug lock. Besides this can end up in a deadlock when usermodhelper triggers a code path that attempts to lock the CPU hot-plug lock, that zram already holds. An example of such deadlock: - path A. zram grabs CPU hot-plug lock, execs /sbin/modprobe from crypto and waits for modprobe to finish disksize_store zcomp_create __cpuhp_state_add_instance __cpuhp_state_add_instance_cpuslocked zcomp_cpu_up_prepare crypto_alloc_base crypto_alg_mod_lookup call_usermodehelper_exec wait_for_completion_killable do_wait_for_common schedule - path B. async work kthread that brings in scsi device. It wants to register CPUHP states at some point, and it needs the CPU hot-plug lock for that, which is owned by zram. async_run_entry_fn scsi_probe_and_add_lun scsi_mq_alloc_queue blk_mq_init_queue blk_mq_init_allocated_queue blk_mq_realloc_hw_ctxs __cpuhp_state_add_instance __cpuhp_state_add_instance_cpuslocked mutex_lock schedule - path C. modprobe sleeps, waiting for all aync works to finish. load_module do_init_module async_synchronize_full async_synchronize_cookie_domain schedule [senozhatsky@chromium.org: add comment] Link: https://lkml.kernel.org/r/20220624060606.1014474-1-senozhatsky@chromium.org Link: https://lkml.kernel.org/r/20220622023501.517125-1-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Cc: Nitin Gupta Signed-off-by: Andrew Morton drivers/block/zram/zcomp.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit e8da368a1e42a8056d1a6b419e1b91b6cf11d77e Author: Yun-Ze Li Date: Mon Jun 20 07:15:16 2022 +0000 mm, docs: fix comments that mention mem_hotplug_end() Comments that mention mem_hotplug_end() are confusing as there is no function called mem_hotplug_end(). Fix them by replacing all the occurences of mem_hotplug_end() in the comments with mem_hotplug_done(). [akpm@linux-foundation.org: grammatical fixes] Link: https://lkml.kernel.org/r/20220620071516.1286101-1-p76091292@gs.ncku.edu.tw Signed-off-by: Yun-Ze Li Cc: Souptick Joarder Signed-off-by: Andrew Morton include/linux/mmzone.h | 6 +++--- mm/compaction.c | 2 +- mm/vmscan.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 30934843019a18df975217e4a819f1c362994764 Author: Vincent Whitchurch Date: Mon Jun 20 10:12:50 2022 +0200 mm/smaps: add Pss_Dirty Pss is the sum of the sizes of clean and dirty private pages, and the proportional sizes of clean and dirty shared pages: Private = Private_Dirty + Private_Clean Shared_Proportional = Shared_Dirty_Proportional + Shared_Clean_Proportional Pss = Private + Shared_Proportional The Shared*Proportional fields are not present in smaps, so it is not always possible to determine how much of the Pss is from dirty pages and how much is from clean pages. This information can be useful for measuring memory usage for the purpose of optimisation, since clean pages can usually be discarded by the kernel immediately while dirty pages cannot. The smaps routines in the kernel already have access to this data, so add a Pss_Dirty to show it to userspace. Pss_Clean is not added since it can be calculated from Pss and Pss_Dirty. Link: https://lkml.kernel.org/r/20220620081251.2928103-1-vincent.whitchurch@axis.com Signed-off-by: Vincent Whitchurch Cc: Jonathan Corbet Cc: Alexey Dobriyan Signed-off-by: Andrew Morton Documentation/ABI/testing/procfs-smaps_rollup | 1 + Documentation/filesystems/proc.rst | 5 ++++- fs/proc/task_mmu.c | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) commit 0506c31d0a8443a9f55eb69d81db426f2eb3296e Author: Baolin Wang Date: Mon Jun 20 19:47:15 2022 +0800 mm: rmap: simplify the hugetlb handling when unmapping or migration According to previous discussion [1], there are so many levels of indenting to handle the hugetlb case when unmapping or migration. We can combine folio_test_anon() and huge_pmd_unshare() to save one level of indenting, by adding a local variable and moving the VM_BUG_ON() a little forward. No intended functional changes in this patch. [1] https://lore.kernel.org/all/0b986dc4-5843-3e2d-c2df-5a2e9f13e6ab@oracle.com/ Link: https://lkml.kernel.org/r/28414b1b96f095e838c1e548074f8e0fc70d78cf.1655724713.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Cc: Mike Kravetz Cc: Muchun Song Signed-off-by: Andrew Morton mm/rmap.c | 90 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 44 insertions(+), 46 deletions(-) commit f7cc67ae7f6221abe57857bd6efd21e06a05bd45 Author: Miaohe Lin Date: Sat Jun 18 17:05:27 2022 +0800 mm/madvise: minor cleanup for swapin_walk_pmd_entry() Passing index to pte_offset_map_lock() directly so the below calculation can be avoided. Rename orig_pte to ptep as it's not changed. Also use helper is_swap_pte() to improve the readability. No functional change intended. [akpm@linux-foundation.org: reduce scope of `ptep'] Link: https://lkml.kernel.org/r/20220618090527.37843-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton mm/madvise.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit dc2628f39582e79bce41842fc91235b70054838c Author: Muchun Song Date: Thu Jun 16 11:38:46 2022 +0800 mm: hugetlb: remove minimum_order variable commit 641844f5616d ("mm/hugetlb: introduce minimum hugepage order") fixed a static checker warning and introduced a global variable minimum_order to fix the warning. However, the local variable in dissolve_free_huge_pages() can be initialized to huge_page_order(&default_hstate) to fix the warning. So remove minimum_order to simplify the code. Link: https://lkml.kernel.org/r/20220616033846.96937-1-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Oscar Salvador Reviewed-by: Mike Kravetz Signed-off-by: Andrew Morton mm/hugetlb.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 66361095129b3b5d065e6c09cf0c085ef4a8c40f Author: Muchun Song Date: Fri Jun 17 21:56:50 2022 +0800 mm: memory_hotplug: make hugetlb_optimize_vmemmap compatible with memmap_on_memory For now, the feature of hugetlb_free_vmemmap is not compatible with the feature of memory_hotplug.memmap_on_memory, and hugetlb_free_vmemmap takes precedence over memory_hotplug.memmap_on_memory. However, someone wants to make memory_hotplug.memmap_on_memory takes precedence over hugetlb_free_vmemmap since memmap_on_memory makes it more likely to succeed memory hotplug in close-to-OOM situations. So the decision of making hugetlb_free_vmemmap take precedence is not wise and elegant. The proper approach is to have hugetlb_vmemmap.c do the check whether the section which the HugeTLB pages belong to can be optimized. If the section's vmemmap pages are allocated from the added memory block itself, hugetlb_free_vmemmap should refuse to optimize the vmemmap, otherwise, do the optimization. Then both kernel parameters are compatible. So this patch introduces VmemmapSelfHosted to mask any non-optimizable vmemmap pages. The hugetlb_vmemmap can use this flag to detect if a vmemmap page can be optimized. [songmuchun@bytedance.com: walk vmemmap page tables to avoid false-positive] Link: https://lkml.kernel.org/r/20220620110616.12056-3-songmuchun@bytedance.com Link: https://lkml.kernel.org/r/20220617135650.74901-3-songmuchun@bytedance.com Signed-off-by: Muchun Song Co-developed-by: Oscar Salvador Signed-off-by: Oscar Salvador Acked-by: David Hildenbrand Cc: Jonathan Corbet Cc: Mike Kravetz Cc: Paul E. McKenney Cc: Xiongchun Duan Signed-off-by: Andrew Morton Documentation/admin-guide/kernel-parameters.txt | 22 ++++----- Documentation/admin-guide/sysctl/vm.rst | 5 +- include/linux/memory_hotplug.h | 9 ---- include/linux/page-flags.h | 11 +++++ mm/hugetlb_vmemmap.c | 66 ++++++++++++++++++++++--- mm/memory_hotplug.c | 27 +++++----- 6 files changed, 93 insertions(+), 47 deletions(-) commit ed7802dd48f7a507213cbb95bb4c6f1fe134eb5d Author: Muchun Song Date: Fri Jun 17 21:56:49 2022 +0800 mm: memory_hotplug: enumerate all supported section flags Patch series "make hugetlb_optimize_vmemmap compatible with memmap_on_memory", v3. This series makes hugetlb_optimize_vmemmap compatible with memmap_on_memory. This patch (of 2): We are almost running out of section flags, only one bit is available in the worst case (powerpc with 256k pages). However, there are still some free bits (in ->section_mem_map) on other architectures (e.g. x86_64 has 10 bits available, arm64 has 8 bits available with worst case of 64K pages). We have hard coded those numbers in code, it is inconvenient to use those bits on other architectures except powerpc. So transfer those section flags to enumeration to make it easy to add new section flags in the future. Also, move SECTION_TAINT_ZONE_DEVICE into the scope of CONFIG_ZONE_DEVICE to save a bit on non-zone-device case. [songmuchun@bytedance.com: replace enum with defines per David] Link: https://lkml.kernel.org/r/20220620110616.12056-2-songmuchun@bytedance.com Link: https://lkml.kernel.org/r/20220617135650.74901-1-songmuchun@bytedance.com Link: https://lkml.kernel.org/r/20220617135650.74901-2-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: David Hildenbrand Cc: Jonathan Corbet Cc: Mike Kravetz Cc: Oscar Salvador Cc: Paul E. McKenney Cc: Xiongchun Duan Signed-off-by: Andrew Morton include/linux/mmzone.h | 41 ++++++++++++++++++++++++++++++++--------- mm/memory_hotplug.c | 6 ++++++ mm/sparse.c | 2 +- 3 files changed, 39 insertions(+), 10 deletions(-) commit ceff9d3354e95ca17e12ad869acea5407cc467f9 Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:20 2022 +0100 mm/swap: convert __delete_from_swap_cache() to a folio All callers now have a folio, so convert the entire function to operate on folios. Link: https://lkml.kernel.org/r/20220617175020.717127-23-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swap.h | 4 ++-- mm/swap_state.c | 25 +++++++++++++------------ mm/vmscan.c | 2 +- 3 files changed, 16 insertions(+), 15 deletions(-) commit 75fa68a5d89871a35246aa2759c95d6dfaf1b582 Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:19 2022 +0100 mm/swap: convert delete_from_swap_cache() to take a folio All but one caller already has a folio, so convert it to use a folio. Link: https://lkml.kernel.org/r/20220617175020.717127-22-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/memory-failure.c | 5 +++-- mm/shmem.c | 4 ++-- mm/swap.h | 4 ++-- mm/swap_state.c | 16 ++++++++-------- mm/swapfile.c | 2 +- 5 files changed, 16 insertions(+), 15 deletions(-) commit b98c359f1d921deae04bb5dbbbbbb9d8705b7c4c Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:18 2022 +0100 mm: convert page_swap_flags to folio_swap_flags The only caller already has a folio, so push the folio->page conversion down a level. Link: https://lkml.kernel.org/r/20220617175020.717127-21-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swap.h | 6 +++--- mm/vmscan.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 5375336c8c42a343c3b440b6f1e21c65e7b174b9 Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:17 2022 +0100 mm: convert destroy_compound_page() to destroy_large_folio() All callers now have a folio, so push the folio->page conversion down to this function. [akpm@linux-foundation.org: uninline destroy_large_folio() to fix build issue] Link: https://lkml.kernel.org/r/20220617175020.717127-20-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton include/linux/mm.h | 6 +----- mm/page_alloc.c | 8 ++++++++ mm/swap.c | 2 +- mm/vmscan.c | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) commit 188e8caee968def9fb67c7536c270b5b463c3461 Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:16 2022 +0100 mm/swap: convert __page_cache_release() to use a folio All the callers now have a folio. Saves several calls to compound_head, totalling 502 bytes of text. Link: https://lkml.kernel.org/r/20220617175020.717127-19-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swap.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit 5ef82fe7f6bca2827c3d1457e9ecd6219da29ede Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:15 2022 +0100 mm/swap: convert __put_compound_page() to __folio_put_large() All the callers now have a folio, so pass it in. This doesn't save any text, but it does save a call to compound_head() as folio_test_hugetlb() does not contain a call like PageHuge() does. Link: https://lkml.kernel.org/r/20220617175020.717127-18-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 83d9965995408c450c7ee8c2c8bc26abe21c311b Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:14 2022 +0100 mm/swap: convert __put_single_page() to __folio_put_small() Saves 56 bytes of text by removing a call to compound_head(). Link: https://lkml.kernel.org/r/20220617175020.717127-17-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8d29c7036f5ff360ea1f51b9fed5d909be7c8094 Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:13 2022 +0100 mm/swap: convert __put_page() to __folio_put() Saves 11 bytes of text by removing a check of PageTail. Link: https://lkml.kernel.org/r/20220617175020.717127-16-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton include/linux/mm.h | 6 +++--- mm/swap.c | 14 +++++++------- net/core/page_pool.c | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) commit 2f58e5de662726312fd98259a07ab945210999d1 Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:12 2022 +0100 mm/swap: convert put_pages_list to use folios Pages linked through the LRU list cannot be tail pages as ->compound_head is in a union with one of the words of the list_head, and they cannot be ZONE_DEVICE pages as ->pgmap is in a union with the same word. Saves 60 bytes of text by removing a call to page_is_fake_head(). Link: https://lkml.kernel.org/r/20220617175020.717127-15-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit ab5e653ee810024a1e170c75f973a252053f7467 Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:11 2022 +0100 mm/swap: convert release_pages to use a folio internally This function was already calling compound_head(), but now it can cache the result of calling compound_head() and avoid calling it again. Saves 299 bytes of text by avoiding various calls to compound_page() and avoiding checks of PageTail. Link: https://lkml.kernel.org/r/20220617175020.717127-14-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swap.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit 2397f780e1e05c7bd7ffebd931931b5d8a45ad8c Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:10 2022 +0100 mm/swap: convert try_to_free_swap to use a folio Save a few calls to compound_head by converting the passed page to a folio. Reduces kernel text size by 74 bytes. Link: https://lkml.kernel.org/r/20220617175020.717127-13-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swapfile.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit a2d33b5dd674c21e75ca47e3d791d070cba267dd Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:09 2022 +0100 mm/swap: optimise lru_add_drain_cpu() Do the per-cpu dereferencing of the fbatches once which saves 14 bytes of text and several percpu relocations. Link: https://lkml.kernel.org/r/20220617175020.717127-12-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 4864545a4669781f75aa711ebf7b25e6f0f37d13 Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:08 2022 +0100 mm/swap: pull the CPU conditional out of __lru_add_drain_all() The function is too long, so pull this complicated conditional out into cpu_needs_drain(). This ends up shrinking the text by 14 bytes, by allowing GCC to cache the result of calling per_cpu() instead of relocating each lookup individually. Link: https://lkml.kernel.org/r/20220617175020.717127-11-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swap.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 82ac64d86fb079431e3af618a074e77be398299b Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:07 2022 +0100 mm/swap: rename lru_pvecs to cpu_fbatches No change to generated code, but this struct no longer contains any pagevecs, and not all the folio batches it contains are lru. Link: https://lkml.kernel.org/r/20220617175020.717127-10-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swap.c | 90 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 46 insertions(+), 44 deletions(-) commit 3a44610b126399021095b4495941926a7dd756c4 Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:06 2022 +0100 mm/swap: convert activate_page to a folio_batch Rename it to just 'activate', saving 696 bytes of text from removals of compound_page() and the pagevec_lru_move_fn() infrastructure. Inline need_activate_page_drain() into its only caller. Link: https://lkml.kernel.org/r/20220617175020.717127-9-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swap.c | 81 +++++++++++++-------------------------------------------------- 1 file changed, 16 insertions(+), 65 deletions(-) commit cec394bafab5d921d21e273b0db94a4802d9a991 Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:05 2022 +0100 mm/swap: convert lru_lazyfree to a folio_batch Using folios instead of pages removes several calls to compound_head(), shrinking the kernel by 1089 bytes of text. Link: https://lkml.kernel.org/r/20220617175020.717127-8-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swap.c | 51 ++++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 25 deletions(-) commit 85cd7791a809156e562df6381a7c6d4ab12c7280 Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:04 2022 +0100 mm/swap: convert lru_deactivate to a folio_batch Using folios instead of pages shrinks deactivate_page() and lru_deactivate_fn() by 778 bytes between them. Link: https://lkml.kernel.org/r/20220617175020.717127-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swap.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) commit 7a3dbfe8a52b5d7a1639aa0bf7b3a3271d9e6e05 Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:03 2022 +0100 mm/swap: convert lru_deactivate_file to a folio_batch Use a folio throughout lru_deactivate_file_fn(), removing many hidden calls to compound_head(). Shrinks the kernel by 864 bytes of text. Link: https://lkml.kernel.org/r/20220617175020.717127-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swap.c | 82 ++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 39 insertions(+), 43 deletions(-) commit 70dea5346ea327499f9a71e77bec2732e4d422ed Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:02 2022 +0100 mm/swap: convert lru_add to a folio_batch When adding folios to the LRU for the first time, the LRU flag will already be clear, so skip the test-and-clear part of moving from one LRU to another. Removes 285 bytes from kernel text, mostly due to removing __pagevec_lru_add(). Link: https://lkml.kernel.org/r/20220617175020.717127-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swap.c | 75 ++++++++++++++++++++++----------------------------------------- 1 file changed, 26 insertions(+), 49 deletions(-) commit 7d80dd096f8f889128f67a2d452e4dadeed71e63 Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:01 2022 +0100 mm/swap: make __pagevec_lru_add static __pagevec_lru_add has no callers outside swap.c, so make it static, and move it to a more logical position in the file. Link: https://lkml.kernel.org/r/20220617175020.717127-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton include/linux/pagevec.h | 1 - mm/swap.c | 126 ++++++++++++++++++++++++------------------------ 2 files changed, 63 insertions(+), 64 deletions(-) commit c2bc16817aa0dcd5d4b452661840be976f5d5c65 Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:50:00 2022 +0100 mm/swap: add folio_batch_move_lru() Start converting the LRU from pagevecs to folio_batches. Combine the functionality of pagevec_add_and_need_flush() with pagevec_lru_move_fn() in the new folio_batch_add_and_move(). Convert the lru_rotate pagevec to a folio_batch. Adds 223 bytes total to kernel text, because we're duplicating infrastructure. This will be more than made up for in future patches. Link: https://lkml.kernel.org/r/20220617175020.717127-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swap.c | 78 +++++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 56 insertions(+), 22 deletions(-) commit e3c4cebf3f9db8c9150eb1982da7e353d9938bed Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 18:49:59 2022 +0100 mm: add folios_put() Patch series "Convert the swap code to be more folio-based". There's still more to do with the swap code, but this reaps a lot of the folio benefit. More than 4kB of kernel text saved (with the UEK7 kernel config). I don't know how much that's going to translate into CPU savings, but some of those compound_head() calls are on every page free, so it should be noticable. It might even be noticable just from an I-cache consumption perspective. This patch (of 22): This is just a wrapper around release_pages() for now. Place the prototype in mm.h along with folio_put() and folio_put_refs(). Link: https://lkml.kernel.org/r/20220617175020.717127-1-willy@infradead.org Link: https://lkml.kernel.org/r/20220617175020.717127-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton include/linux/mm.h | 19 +++++++++++++++++++ include/linux/pagemap.h | 2 -- 2 files changed, 19 insertions(+), 2 deletions(-) commit a83f0551f49682c81444d682053d49f9dfcbe5fa Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 16:42:48 2022 +0100 mm/vmscan: convert reclaim_pages() to use a folio Remove a few hidden calls to compound_head, saving 76 bytes of text. Link: https://lkml.kernel.org/r/20220617154248.700416-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Signed-off-by: Andrew Morton mm/vmscan.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 07f67a8dedc0788f3f91d945bc6e987cf9cccd4a Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 16:42:47 2022 +0100 mm/vmscan: convert shrink_active_list() to use a folio Remove a few hidden calls to compound_head, saving 411 bytes of text. Link: https://lkml.kernel.org/r/20220617154248.700416-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Signed-off-by: Andrew Morton mm/vmscan.c | 61 +++++++++++++++++++++++++++++-------------------------------- 1 file changed, 29 insertions(+), 32 deletions(-) commit ff00a170d950309f9daef836caa3d54671b883b8 Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 16:42:46 2022 +0100 mm/vmscan: convert move_pages_to_lru() to use a folio Remove a few hidden calls to compound_head, saving 387 bytes of text on my test configuration. Link: https://lkml.kernel.org/r/20220617154248.700416-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Signed-off-by: Andrew Morton mm/vmscan.c | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 166e3d32276f4c9ffd290f92b9df55b255f5fed7 Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 16:42:45 2022 +0100 mm/vmscan: convert isolate_lru_pages() to use a folio Remove a few hidden calls to compound_head, saving 279 bytes of text. Link: https://lkml.kernel.org/r/20220617154248.700416-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Signed-off-by: Andrew Morton mm/vmscan.c | 66 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) commit b8cecb9376b9d3031cf62b476a0db087b6b01072 Author: Matthew Wilcox (Oracle) Date: Fri Jun 17 16:42:44 2022 +0100 mm/vmscan: convert reclaim_clean_pages_from_list() to folios Patch series "nvert much of vmscan to folios" vmscan always operates on folios since it puts the pages on the LRU list. Switching all of these functions from pages to folios saves 1483 bytes of text from removing all the baggage around calling compound_page() and similar functions. This patch (of 5): This is a straightforward conversion which removes several hidden calls to compound_head, saving 330 bytes of kernel text. Link: https://lkml.kernel.org/r/20220617154248.700416-1-willy@infradead.org Link: https://lkml.kernel.org/r/20220617154248.700416-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Signed-off-by: Andrew Morton include/linux/page-flags.h | 6 ++++++ mm/vmscan.c | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 11 deletions(-) commit 64fe24a3e05e5f3ac56fcd45afd2fd1d9cc8fcb6 Author: David Hildenbrand Date: Tue Jun 14 11:36:29 2022 +0200 mm/mprotect: try avoiding write faults for exclusive anonymous pages when changing protection Similar to our MM_CP_DIRTY_ACCT handling for shared, writable mappings, we can try mapping anonymous pages in a private writable mapping writable if they are exclusive, the PTE is already dirty, and no special handling applies. Mapping the anonymous page writable is essentially the same thing the write fault handler would do in this case. Special handling is required for uffd-wp and softdirty tracking, so take care of that properly. Also, leave PROT_NONE handling alone for now; in the future, we could similarly extend the logic in do_numa_page() or use pte_mk_savedwrite() here. While this improves mprotect(PROT_READ)+mprotect(PROT_READ|PROT_WRITE) performance, it should also be a valuable optimization for uffd-wp, when un-protecting. This has been previously suggested by Peter Collingbourne in [1], relevant in the context of the Scudo memory allocator, before we had PageAnonExclusive. This commit doesn't add the same handling for PMDs (i.e., anonymous THP, anonymous hugetlb); benchmark results from Andrea indicate that there are minor performance gains, so it's might still be valuable to streamline that logic for all anonymous pages in the future. As we now also set MM_CP_DIRTY_ACCT for private mappings, let's rename it to MM_CP_TRY_CHANGE_WRITABLE, to make it clearer what's actually happening. Micro-benchmark courtesy of Andrea: === #define _GNU_SOURCE #include #include #include #include #include #define SIZE (1024*1024*1024) int main(int argc, char *argv[]) { char *p; if (posix_memalign((void **)&p, sysconf(_SC_PAGESIZE)*512, SIZE)) perror("posix_memalign"), exit(1); if (madvise(p, SIZE, argc > 1 ? MADV_HUGEPAGE : MADV_NOHUGEPAGE)) perror("madvise"); explicit_bzero(p, SIZE); for (int loops = 0; loops < 40; loops++) { if (mprotect(p, SIZE, PROT_READ)) perror("mprotect"), exit(1); if (mprotect(p, SIZE, PROT_READ|PROT_WRITE)) perror("mprotect"), exit(1); explicit_bzero(p, SIZE); } } === Results on my Ryzen 9 3900X: Stock 10 runs (lower is better): AVG 6.398s, STDEV 0.043 Patched 10 runs (lower is better): AVG 3.780s, STDEV 0.026 === [1] https://lkml.kernel.org/r/20210429214801.2583336-1-pcc@google.com Link: https://lkml.kernel.org/r/20220614093629.76309-1-david@redhat.com Signed-off-by: David Hildenbrand Suggested-by: Peter Collingbourne Acked-by: Peter Xu Cc: Nadav Amit Cc: Dave Hansen Cc: Andrea Arcangeli Cc: Yang Shi Cc: Hugh Dickins Cc: Mel Gorman Signed-off-by: Andrew Morton include/linux/mm.h | 8 ++++-- mm/mprotect.c | 77 +++++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 68 insertions(+), 17 deletions(-) commit 50b0f797cab6cb7dff418777e1acf82dfd3568f8 Author: Edward Liaw Date: Mon Jun 13 23:33:21 2022 +0000 userfaultfd: selftests: infinite loop in faulting_process On Android this test is getting stuck in an infinite loop due to indeterminate behavior: The local variables steps and signalled were being reset to 1 and 0 respectively after every jump back to sigsetjmp by siglongjmp in the signal handler. The test was incrementing them and expecting them to retain their incremented values. The documentation for siglongjmp says: All accessible objects have values as of the time sigsetjmp() was called, except that the values of objects of automatic storage duration which are local to the function containing the invocation of the corresponding sigsetjmp() which do not have volatile-qualified type and which are changed between the sigsetjmp() invocation and siglongjmp() call are indeterminate. Tagging steps and signalled with volatile enabled the test to pass. Link: https://lkml.kernel.org/r/20220613233321.431282-1-edliaw@google.com Signed-off-by: Edward Liaw Reviewed-by: Axel Rasmussen Cc: Shuah Khan Cc: Peter Xu Signed-off-by: Andrew Morton tools/testing/selftests/vm/userfaultfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6acfcd0d75244178a4a101fe0da888fa3bff29fb Author: SeongJae Park Date: Mon Jun 13 19:23:01 2022 +0000 Docs/admin-guide/damon: add a document for DAMON_LRU_SORT This commit documents the usage of DAMON_LRU_SORT for admins. Link: https://lkml.kernel.org/r/20220613192301.8817-10-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/admin-guide/mm/damon/index.rst | 1 + Documentation/admin-guide/mm/damon/lru_sort.rst | 294 ++++++++++++++++++++++++ 2 files changed, 295 insertions(+) commit 40e983cca9274e177bd5b9379299b44d9536ac68 Author: SeongJae Park Date: Mon Jun 13 19:23:00 2022 +0000 mm/damon: introduce DAMON-based LRU-lists Sorting Users can do data access-aware LRU-lists sorting using 'LRU_PRIO' and 'LRU_DEPRIO' DAMOS actions. However, finding best parameters including the hotness/coldness thresholds, CPU quota, and watermarks could be challenging for some users. To make the scheme easy to be used without complex tuning for common situations, this commit implements a static kernel module called 'DAMON_LRU_SORT' using the 'LRU_PRIO' and 'LRU_DEPRIO' DAMOS actions. It proactively sorts LRU-lists using DAMON with conservatively chosen default values of the parameters. That is, the module under its default parameters will make no harm for common situations but provide some level of efficiency improvements for systems having clear hot/cold access pattern under a level of memory pressure while consuming only a limited small portion of CPU time. Link: https://lkml.kernel.org/r/20220613192301.8817-9-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/Kconfig | 8 + mm/damon/Makefile | 1 + mm/damon/lru_sort.c | 546 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 555 insertions(+) commit b57e39a743e4efc6945523f121691ac76f9161de Author: SeongJae Park Date: Mon Jun 13 19:22:59 2022 +0000 Docs/admin-guide/damon/sysfs: document 'LRU_DEPRIO' scheme action This commit documents the 'LRU_DEPRIO' scheme action for DAMON sysfs interface.` Link: https://lkml.kernel.org/r/20220613192301.8817-8-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/admin-guide/mm/damon/usage.rst | 1 + 1 file changed, 1 insertion(+) commit 99cdc2cd180a7adc87badc9ca92f8af803d8bf3b Author: SeongJae Park Date: Mon Jun 13 19:22:58 2022 +0000 mm/damon/schemes: add 'LRU_DEPRIO' action This commit adds a new DAMON-based operation scheme action called 'LRU_DEPRIO' for physical address space. The action deprioritizes pages in the memory area of the target access pattern on their LRU lists. This is hence supposed to be used for rarely accessed (cold) memory regions so that cold pages could be more likely reclaimed first under memory pressure. Internally, it simply calls 'lru_deactivate()'. Using this with 'LRU_PRIO' action for hot pages, users can proactively sort LRU lists based on the access pattern. That is, it can make the LRU lists somewhat more trustworthy source of access temperature. As a result, efficiency of LRU-lists based mechanisms including the reclamation target selection could be improved. Link: https://lkml.kernel.org/r/20220613192301.8817-7-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton include/linux/damon.h | 2 ++ mm/damon/paddr.c | 20 ++++++++++++++++++++ mm/damon/sysfs.c | 1 + 3 files changed, 23 insertions(+) commit 0bcba960b1fa30607f3a0b566c88cd4a8a44ebaf Author: SeongJae Park Date: Mon Jun 13 19:22:57 2022 +0000 Docs/admin-guide/damon/sysfs: document 'LRU_PRIO' scheme action This commit documents the 'lru_prio' scheme action for DAMON sysfs interface. Link: https://lkml.kernel.org/r/20220613192301.8817-6-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/admin-guide/mm/damon/usage.rst | 1 + 1 file changed, 1 insertion(+) commit 8cdcc532268df0893d9756f537cbce479f4c4831 Author: SeongJae Park Date: Mon Jun 13 19:22:56 2022 +0000 mm/damon/schemes: add 'LRU_PRIO' DAMOS action This commit adds a new DAMOS action called 'LRU_PRIO' for the physical address space. The action prioritizes pages in the memory regions of the user-specified target access pattern on their LRU lists. This is hence supposed to be used for frequently accessed (hot) memory regions so that hot pages could be more likely protected under memory pressure. Internally, it simply calls 'mark_page_accessed()'. Link: https://lkml.kernel.org/r/20220613192301.8817-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton include/linux/damon.h | 2 ++ mm/damon/ops-common.c | 42 ++++++++++++++++++++++++++++++++++++++++++ mm/damon/ops-common.h | 2 ++ mm/damon/paddr.c | 20 ++++++++++++++++++++ mm/damon/sysfs.c | 1 + 5 files changed, 67 insertions(+) commit 0e93e8bfd0b8b953038785109d0bab72280823f6 Author: SeongJae Park Date: Mon Jun 13 19:22:55 2022 +0000 mm/damon/paddr: use a separate function for 'DAMOS_PAGEOUT' handling This commit moves code for 'DAMOS_PAGEOUT' handling of the physical address space monitoring operations set to a separate function so that its caller, 'damon_pa_apply_scheme()', can be more easily extended for additional DAMOS actions later. Link: https://lkml.kernel.org/r/20220613192301.8817-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/paddr.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit c364f9af299f2a3d16e5bae94e8f155dc8a721a4 Author: SeongJae Park Date: Mon Jun 13 19:22:53 2022 +0000 mm/damon/dbgfs: add and use mappings between 'schemes' action inputs and 'damos_action' values Patch series "Extend DAMOS for Proactive LRU-lists Sorting". Introduction ============ In short, this patchset 1) extends DAMON-based Operation Schemes (DAMOS) for low overhead data access pattern based LRU-lists sorting, and 2) implements a static kernel module for easy use of conservatively-tuned version of that using the extended DAMOS capability. Background ---------- As page-granularity access checking overhead could be significant on huge systems, LRU lists are normally not proactively sorted but partially and reactively sorted for special events including specific user requests, system calls and memory pressure. As a result, LRU lists are sometimes not so perfectly prepared to be used as a trustworthy access pattern source for some situations including reclamation target pages selection under sudden memory pressure. DAMON-based Proactive LRU-lists Sorting --------------------------------------- Because DAMON can identify access patterns of best-effort accuracy while inducing only user-specified range of overhead, using DAMON for Proactive LRU-lists Sorting (PLRUS) could be helpful for this situation. The idea is quite simple. Find hot pages and cold pages using DAMON, and prioritize hot pages while deprioritizing cold pages on their LRU-lists. This patchset extends DAMON to support such schemes by introducing a couple of new DAMOS actions for prioritizing and deprioritizing memory regions of specific access patterns on their LRU-lists. In detail, this patchset simply uses 'mark_page_accessed()' and 'deactivate_page()' functions for prioritization and deprioritization of pages on their LRU lists, respectively. To make the scheme easy to use without complex tuning for common situations, this patchset further implements a static kernel module called 'DAMON_LRU_SORT' using the extended DAMOS functionality. It proactively sorts LRU-lists using DAMON with conservatively chosen default hotness/coldness thresholds and small CPU usage quota limit. That is, the module under its default parameters will make no harm for common situation but provide some level of benefit for systems having clear hot/cold access pattern under only memory pressure while consuming only limited small portion of CPU time. Related Works ------------- Proactive reclamation is well known to be helpful for reducing non-optimal reclamation target selection caused performance drops. However, proactive reclamation is not a best option for some cases, because it could incur additional I/O. For an example, it could be prohitive for systems using storage devices that total number of writes is limited, or cloud block storages that charges every I/O. Some proactive reclamation approaches[1,2] induce a level of memory pressure using memcg files or swappiness while monitoring PSI. As reclamation target selection is still relying on the original LRU-lists mechanism, using DAMON-based proactive reclamation before inducing the proactive reclamation could allow more memory saving with same level of performance overhead, or less performance overhead with same level of memory saving. [1] https://blogs.oracle.com/linux/post/anticipating-your-memory-needs [2] https://www.pdl.cmu.edu/ftp/NVM/tmo_asplos22.pdf Evaluation ========== In short, PLRUS achieves 10% memory PSI (some) reduction, 14% major page faults reduction, and 3.74% speedup under memory pressure. Setup ----- To show the effect of PLRUS, I run PARSEC3 and SPLASH-2X benchmarks under below variant systems and measure a few metrics including the runtime of each workload, number of system-wide major page faults, and system-wide memory PSI (some). - orig: v5.18-rc4 based mm-unstable kernel + this patchset, but no DAMON scheme applied. - mprs: Same to 'orig' but artificial memory pressure is induced. - plrus: Same to 'mprs' but a radically tuned PLRUS scheme is applied to the entire physical address space of the system. For the artificial memory pressure, I set 'memory.limit_in_bytes' to 75% of the running workload's peak RSS, wait 1 second, remove the pressure by setting it to 200% of the peak RSS, wait 10 seconds, and repeat the procedure until the workload finishes[1]. I use zram based swap device. The tests are automated[2]. [1] https://github.com/awslabs/damon-tests/blob/next/perf/runners/back/0009_memcg_pressure.sh [2] https://github.com/awslabs/damon-tests/blob/next/perf/full_once_config.sh Radically Tuned PLRUS --------------------- To show effect of PLRUS on the PARSEC3/SPLASH-2X workloads which runs for no long time, we use radically tuned version of PLRUS. The version asks DAMON to do the proactive LRU-lists sorting as below. 1. Find any memory regions shown some accesses (approximately >=20 accesses per 100 sampling) and prioritize pages of the regions on their LRU lists using up to 2% CPU time. Under the CPU time limit, prioritize regions having higher access frequency and kept the access frequency longer first. 2. Find any memory regions shown no access for at least >=5 seconds and deprioritize pages of the rgions on their LRU lists using up to 2% CPU time. Under the CPU time limit, deprioritize regions that not accessed for longer time first. Results ------- I repeat the tests 25 times and calculate average of the measured numbers. The results are as below: metric orig mprs plrus plrus/mprs runtime_seconds 190.06 292.83 281.87 0.96 pgmajfaults 852.55 8769420.00 7525040.00 0.86 memory_psi_some_us 106911.00 6943420.00 6220920.00 0.90 The first row is for legend. The first cell shows the metric that the following cells of the row shows. Second, third, and fourth cells show the metrics under the configs shown at the first row of the cell, and the fifth cell shows the metric under 'plrus' divided by the metric under 'mprs'. Second row shows the averaged runtime of the workloads in seconds. Third row shows the number of system-wide major page faults while the test was ongoing. Fourth row shows the system-wide memory pressure stall for some processes in microseconds while the test was ongoing. In short, PLRUS achieves 10% memory PSI (some) reduction, 14% major page faults reduction, and 3.74% speedup under memory pressure. We also confirmed the CPU usage of kdamond was 2.61% of single CPU, which is below 4% as expected. Sequence of Patches =================== The first and second patch cleans up DAMON debugfs interface and DAMOS_PAGEOUT handling code of physical address space monitoring operations implementation for easier extension of the code. The thrid and fourth patches implement a new DAMOS action called 'lru_prio', which prioritizes pages under memory regions which have a user-specified access pattern, and document it, respectively. The fifth and sixth patches implement yet another new DAMOS action called 'lru_deprio', which deprioritizes pages under memory regions which have a user-specified access pattern, and document it, respectively. The seventh patch implements a static kernel module called 'damon_lru_sort', which utilizes the DAMON-based proactive LRU-lists sorting under conservatively chosen default parameter. Finally, the eighth patch documents 'damon_lru_sort'. This patch (of 8): DAMON debugfs interface assumes users will write 'damos_action' value directly to the 'schemes' file. This makes adding new 'damos_action' in the middle of its definition breaks the backward compatibility of DAMON debugfs interface, as values of some 'damos_action' could be changed. To mitigate the situation, this commit adds mappings between the user inputs and 'damos_action' value and makes DAMON debugfs code uses those. Link: https://lkml.kernel.org/r/20220613192301.8817-1-sj@kernel.org Link: https://lkml.kernel.org/r/20220613192301.8817-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/dbgfs.c | 64 +++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 14 deletions(-) commit 442701e7058bd8dcb00c7885de99a43f5d0a0d47 Author: Miaohe Lin Date: Wed Jun 8 22:40:31 2022 +0800 mm/swap: remove swap_cache_info statistics swap_cache_info are not statistics that could be easily used to tune system performance because they are not easily accessile. Also they can't provide really useful info when OOM occurs. Remove these statistics can also help mitigate unneeded global swap_cache_info cacheline contention. Link: https://lkml.kernel.org/r/20220608144031.829-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Suggested-by: David Hildenbrand Reviewed-by: David Hildenbrand Reviewed-by: Muchun Song Acked-by: "Huang, Ying" Cc: Hugh Dickins Signed-off-by: Andrew Morton mm/swap_state.c | 17 ----------------- 1 file changed, 17 deletions(-) commit c8945306976f497802b208cf8f2cad4543868bc6 Author: Miaohe Lin Date: Wed Jun 8 22:40:30 2022 +0800 mm/swapfile: fix possible data races of inuse_pages si->inuse_pages could still be accessed concurrently now. The plain reads outside si->lock critical section, i.e. swap_show and si_swapinfo, which results in data races. READ_ONCE and WRITE_ONCE is used to fix such data races. Note these data races should be ok because they're just used for showing swap info. [linmiaohe@huawei.com: use WRITE_ONCE to pair with READ_ONCE] Link: https://lkml.kernel.org/r/20220625093346.48894-2-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20220608144031.829-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: David Hildenbrand Reviewed-by: "Huang, Ying" Cc: Hugh Dickins Signed-off-by: Andrew Morton mm/swapfile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5e21f2d577cf174ced5fe9bdff67dcb70190d9f8 Author: Uladzislau Rezki (Sony) Date: Tue Jun 7 11:34:49 2022 +0200 lib/test_vmalloc: switch to prandom_u32() A get_random_bytes() function can cause a high contention if it is called across CPUs simultaneously. Because it shares one lock per all CPUs: class name con-bounces contentions waittime-min waittime-max waittime-total waittime-avg acq-bounces acquisitions holdtime-min holdtime-max holdtime-total holdtime-avg &crng->lock: 663145 665886 0.05 8.85 261966.66 0.39 7188152 13731279 0.04 11.89 2181582.30 0.16 ----------- &crng->lock 307835 [<00000000acba59cd>] _extract_crng+0x48/0x90 &crng->lock 358051 [<00000000f0075abc>] _crng_backtrack_protect+0x32/0x90 ----------- &crng->lock 234241 [<00000000f0075abc>] _crng_backtrack_protect+0x32/0x90 &crng->lock 431645 [<00000000acba59cd>] _extract_crng+0x48/0x90 Switch from the get_random_bytes() to prandom_u32() that does not have any internal contention when a random value is needed for the tests. The reason is to minimize CPU cycles introduced by the test-suite itself from the vmalloc performance metrics. Link: https://lkml.kernel.org/r/20220607093449.3100-6-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Signed-off-by: Andrew Morton lib/test_vmalloc.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 899c6efe58dbe8cb9768057ffc206d03e5a89ce8 Author: Uladzislau Rezki (Sony) Date: Tue Jun 7 11:34:48 2022 +0200 mm/vmalloc: extend __find_vmap_area() with one more argument __find_vmap_area() finds a "vmap_area" based on passed address. It scan the specific "vmap_area_root" rb-tree. Extend the function with one extra argument, so any tree can be specified where the search has to be done. There is no functional change as a result of this patch. Link: https://lkml.kernel.org/r/20220607093449.3100-5-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Baoquan He Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Signed-off-by: Andrew Morton mm/vmalloc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5d7a7c54d3d7ff2f54725881dc7e06a7f5c94dc2 Author: Uladzislau Rezki (Sony) Date: Tue Jun 7 11:34:47 2022 +0200 mm/vmalloc: initialize VA's list node after unlink A vmap_area can travel between different places. For example attached/detached to/from different rb-trees. In order to prevent fancy bugs, initialize a VA's list node after it is removed from the list, so it pairs with VA's rb_node which is also initialized. There is no functional change as a result of this patch. Link: https://lkml.kernel.org/r/20220607093449.3100-4-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Baoquan He Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Signed-off-by: Andrew Morton mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9863be49312aa1f566dca12603e33487965e6a4 Author: Uladzislau Rezki (Sony) Date: Tue Jun 7 11:34:46 2022 +0200 mm/vmalloc: extend __alloc_vmap_area() with extra arguments It implies that __alloc_vmap_area() allocates only from the global vmap space, therefore a list-head and rb-tree, which represent a free vmap space, are not passed as parameters to this function and are accessed directly from this function. Extend the __alloc_vmap_area() and other dependent functions to have a possibility to allocate from different trees making an interface common and not specific. There is no functional change as a result of this patch. Link: https://lkml.kernel.org/r/20220607093449.3100-3-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Baoquan He Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Signed-off-by: Andrew Morton mm/vmalloc.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit 8eb510db2125ab471967819d1f8749162588bba9 Author: Uladzislau Rezki (Sony) Date: Tue Jun 7 11:34:45 2022 +0200 mm/vmalloc: make link_va()/unlink_va() common to different rb_root Patch series "Reduce a vmalloc internal lock contention preparation work". This small serias is preparation work to implement per-cpu vmalloc allocation in order to reduce a high internal lock contention. This series does not introduce any functional changes, it is only about preparation. This patch (of 5): Currently link_va() and unlik_va(), in order to figure out a tree type, compares a passed root value with a global free_vmap_area_root variable to distinguish the augmented rb-tree from a regular one. It is hard coded since such functions can manipulate only with specific "free_vmap_area_root" tree that represents a global free vmap space. Make it common by introducing "_augment" versions of both internal functions, so it is possible to deal with different trees. There is no functional change as a result of this patch. Link: https://lkml.kernel.org/r/20220607093449.3100-1-urezki@gmail.com Link: https://lkml.kernel.org/r/20220607093449.3100-2-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Baoquan He Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Signed-off-by: Andrew Morton mm/vmalloc.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 48 insertions(+), 12 deletions(-) commit bbf535fd6f06b94b9d07ed6f09397a936d4a58d8 Author: Roman Gushchin Date: Tue May 31 20:22:27 2022 -0700 mm: shrinkers: add scan interface for shrinker debugfs Add a scan interface which allows to trigger scanning of a particular shrinker and specify memcg and numa node. It's useful for testing, debugging and profiling of a specific scan_objects() callback. Unlike alternatives (creating a real memory pressure and dropping caches via /proc/sys/vm/drop_caches) this interface allows to interact with only one shrinker at once. Also, if a shrinker is misreporting the number of objects (as some do), it doesn't affect scanning. [roman.gushchin@linux.dev: improve typing, fix arg count checking] Link: https://lkml.kernel.org/r/YpgKttTowT22mKPQ@carbon [akpm@linux-foundation.org: fix arg count checking] Link: https://lkml.kernel.org/r/20220601032227.4076670-7-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Muchun Song Cc: Christophe JAILLET Cc: Dave Chinner Cc: Hillf Danton Cc: Kent Overstreet Signed-off-by: Andrew Morton Documentation/admin-guide/mm/shrinker_debugfs.rst | 39 ++++++++++-- mm/shrinker_debug.c | 74 +++++++++++++++++++++++ 2 files changed, 109 insertions(+), 4 deletions(-) commit d261ea23533b5da113b0779f32d39c3803dddb02 Author: Roman Gushchin Date: Tue May 31 20:22:26 2022 -0700 tools: add memcg_shrinker.py Add a simple tool which prints a sorted list of shrinker lists in the following format: (number of objects, shrinker name, cgroup). Example: $ ./memcg_shrinker.py -n 10 2090 sb-sysfs-26 /sys/fs/cgroup/system.slice 1809 sb-sysfs-26 /sys/fs/cgroup/system.slice/systemd-udevd.service 1044 sb-btrfs:vda2-24 /sys/fs/cgroup/system.slice/system-dbus\x2d:1.3\... 861 sb-btrfs:vda2-24 /sys/fs/cgroup/system.slice/system-dbus\x2d:1.3\... 804 sb-btrfs:vda2-24 /sys/fs/cgroup/system.slice 643 sb-btrfs:vda2-24 /sys/fs/cgroup/system.slice/firewalld.service 616 sb-cgroup2-30 /sys/fs/cgroup/init.scope 275 sb-sysfs-26 / 238 sb-proc-25 /sys/fs/cgroup/system.slice/systemd-journald.service 225 sb-proc-25 /sys/fs/cgroup/system.slice/abrtd.service Link: https://lkml.kernel.org/r/20220601032227.4076670-6-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Cc: Christophe JAILLET Cc: Dave Chinner Cc: Hillf Danton Cc: Kent Overstreet Cc: Muchun Song Signed-off-by: Andrew Morton tools/cgroup/memcg_shrinker.py | 71 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit 7507f0991d59169b75a09aa21ffa8ffeda58116f Author: Roman Gushchin Date: Tue May 31 20:22:25 2022 -0700 mm: docs: document shrinker debugfs Add a document describing the shrinker debugfs interface. Link: https://lkml.kernel.org/r/20220601032227.4076670-5-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Reviewed-by: Muchun Song Cc: Christophe JAILLET Cc: Dave Chinner Cc: Hillf Danton Cc: Kent Overstreet Signed-off-by: Andrew Morton Documentation/admin-guide/mm/index.rst | 1 + Documentation/admin-guide/mm/shrinker_debugfs.rst | 104 ++++++++++++++++++++++ 2 files changed, 105 insertions(+) commit e33c267ab70de4249d22d7eab1cc7d68a889bac2 Author: Roman Gushchin Date: Tue May 31 20:22:24 2022 -0700 mm: shrinkers: provide shrinkers with names Currently shrinkers are anonymous objects. For debugging purposes they can be identified by count/scan function names, but it's not always useful: e.g. for superblock's shrinkers it's nice to have at least an idea of to which superblock the shrinker belongs. This commit adds names to shrinkers. register_shrinker() and prealloc_shrinker() functions are extended to take a format and arguments to master a name. In some cases it's not possible to determine a good name at the time when a shrinker is allocated. For such cases shrinker_debugfs_rename() is provided. The expected format is: -[:]- For some shrinkers an instance can be encoded as (MAJOR:MINOR) pair. After this change the shrinker debugfs directory looks like: $ cd /sys/kernel/debug/shrinker/ $ ls dquota-cache-16 sb-devpts-28 sb-proc-47 sb-tmpfs-42 mm-shadow-18 sb-devtmpfs-5 sb-proc-48 sb-tmpfs-43 mm-zspool:zram0-34 sb-hugetlbfs-17 sb-pstore-31 sb-tmpfs-44 rcu-kfree-0 sb-hugetlbfs-33 sb-rootfs-2 sb-tmpfs-49 sb-aio-20 sb-iomem-12 sb-securityfs-6 sb-tracefs-13 sb-anon_inodefs-15 sb-mqueue-21 sb-selinuxfs-22 sb-xfs:vda1-36 sb-bdev-3 sb-nsfs-4 sb-sockfs-8 sb-zsmalloc-19 sb-bpf-32 sb-pipefs-14 sb-sysfs-26 thp-deferred_split-10 sb-btrfs:vda2-24 sb-proc-25 sb-tmpfs-1 thp-zero-9 sb-cgroup2-30 sb-proc-39 sb-tmpfs-27 xfs-buf:vda1-37 sb-configfs-23 sb-proc-41 sb-tmpfs-29 xfs-inodegc:vda1-38 sb-dax-11 sb-proc-45 sb-tmpfs-35 sb-debugfs-7 sb-proc-46 sb-tmpfs-40 [roman.gushchin@linux.dev: fix build warnings] Link: https://lkml.kernel.org/r/Yr+ZTnLb9lJk6fJO@castle Reported-by: kernel test robot Link: https://lkml.kernel.org/r/20220601032227.4076670-4-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Cc: Christophe JAILLET Cc: Dave Chinner Cc: Hillf Danton Cc: Kent Overstreet Cc: Muchun Song Signed-off-by: Andrew Morton arch/x86/kvm/mmu/mmu.c | 2 +- drivers/android/binder_alloc.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 3 +- drivers/gpu/drm/msm/msm_gem_shrinker.c | 2 +- drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 2 +- drivers/gpu/drm/ttm/ttm_pool.c | 2 +- drivers/md/bcache/btree.c | 2 +- drivers/md/dm-bufio.c | 3 +- drivers/md/dm-zoned-metadata.c | 4 +- drivers/md/raid5.c | 2 +- drivers/misc/vmw_balloon.c | 2 +- drivers/virtio/virtio_balloon.c | 2 +- drivers/xen/xenbus/xenbus_probe_backend.c | 2 +- fs/btrfs/super.c | 2 + fs/erofs/utils.c | 2 +- fs/ext4/extents_status.c | 3 +- fs/f2fs/super.c | 2 +- fs/gfs2/glock.c | 2 +- fs/gfs2/main.c | 2 +- fs/jbd2/journal.c | 3 +- fs/mbcache.c | 2 +- fs/nfs/nfs42xattr.c | 7 +-- fs/nfs/super.c | 2 +- fs/nfsd/filecache.c | 2 +- fs/nfsd/nfscache.c | 3 +- fs/quota/dquot.c | 2 +- fs/super.c | 6 ++- fs/ubifs/super.c | 2 +- fs/xfs/xfs_buf.c | 3 +- fs/xfs/xfs_icache.c | 2 +- fs/xfs/xfs_qm.c | 3 +- include/linux/shrinker.h | 14 +++++- kernel/rcu/tree.c | 2 +- mm/huge_memory.c | 4 +- mm/shrinker_debug.c | 47 ++++++++++++++++++- mm/vmscan.c | 58 ++++++++++++++++++++++-- mm/workingset.c | 2 +- mm/zsmalloc.c | 3 +- net/sunrpc/auth.c | 2 +- 39 files changed, 167 insertions(+), 45 deletions(-) commit 5035ebc644aec92d55d1bbfe042f35341e4bffb5 Author: Roman Gushchin Date: Tue May 31 20:22:23 2022 -0700 mm: shrinkers: introduce debugfs interface for memory shrinkers This commit introduces the /sys/kernel/debug/shrinker debugfs interface which provides an ability to observe the state of individual kernel memory shrinkers. Because the feature adds some memory overhead (which shouldn't be large unless there is a huge amount of registered shrinkers), it's guarded by a config option (enabled by default). This commit introduces the "count" interface for each shrinker registered in the system. The output is in the following format: ... ... ... To reduce the size of output on machines with many thousands cgroups, if the total number of objects on all nodes is 0, the line is omitted. If the shrinker is not memcg-aware or CONFIG_MEMCG is off, 0 is printed as cgroup inode id. If the shrinker is not numa-aware, 0's are printed for all nodes except the first one. This commit gives debugfs entries simple numeric names, which are not very convenient. The following commit in the series will provide shrinkers with more meaningful names. [akpm@linux-foundation.org: remove WARN_ON_ONCE(), per Roman] Reported-by: syzbot+300d27c79fe6d4cbcc39@syzkaller.appspotmail.com Link: https://lkml.kernel.org/r/20220601032227.4076670-3-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Reviewed-by: Kent Overstreet Acked-by: Muchun Song Cc: Christophe JAILLET Cc: Dave Chinner Cc: Hillf Danton Signed-off-by: Andrew Morton include/linux/shrinker.h | 19 +++++- lib/Kconfig.debug | 9 +++ mm/Makefile | 1 + mm/shrinker_debug.c | 168 +++++++++++++++++++++++++++++++++++++++++++++++ mm/vmscan.c | 6 +- 5 files changed, 200 insertions(+), 3 deletions(-) commit c15187a4a2d660bf490f7873afd0de5288f65c8f Author: Roman Gushchin Date: Tue May 31 20:22:22 2022 -0700 mm: memcontrol: introduce mem_cgroup_ino() and mem_cgroup_get_from_ino() Patch series "mm: introduce shrinker debugfs interface", v5. The only existing debugging mechanism is a couple of tracepoints in do_shrink_slab(): mm_shrink_slab_start and mm_shrink_slab_end. They aren't covering everything though: shrinkers which report 0 objects will never show up, there is no support for memcg-aware shrinkers. Shrinkers are identified by their scan function, which is not always enough (e.g. hard to guess which super block's shrinker it is having only "super_cache_scan"). To provide a better visibility and debug options for memory shrinkers this patchset introduces a /sys/kernel/debug/shrinker interface, to some extent similar to /sys/kernel/slab. For each shrinker registered in the system a directory is created. As now, the directory will contain only a "scan" file, which allows to get the number of managed objects for each memory cgroup (for memcg-aware shrinkers) and each numa node (for numa-aware shrinkers on a numa machine). Other interfaces might be added in the future. To make debugging more pleasant, the patchset also names all shrinkers, so that debugfs entries can have meaningful names. This patch (of 5): Shrinker debugfs requires a way to represent memory cgroups without using full paths, both for displaying information and getting input from a user. Cgroup inode number is a perfect way, already used by bpf. This commit adds a couple of helper functions which will be used to handle memcg-aware shrinkers. Link: https://lkml.kernel.org/r/20220601032227.4076670-1-roman.gushchin@linux.dev Link: https://lkml.kernel.org/r/20220601032227.4076670-2-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Muchun Song Cc: Dave Chinner Cc: Kent Overstreet Cc: Hillf Danton Cc: Christophe JAILLET Cc: Roman Gushchin Signed-off-by: Andrew Morton include/linux/memcontrol.h | 21 +++++++++++++++++++++ mm/memcontrol.c | 23 +++++++++++++++++++++++ 2 files changed, 44 insertions(+) commit 000eca5d044d1ee23b4ca311793cf3fc528da6c6 Author: Tianyu Li Date: Wed Jun 1 17:32:11 2022 +0800 mm/mempolicy: fix get_nodes out of bound access When user specified more nodes than supported, get_nodes will access nmask array out of bounds. Link: https://lkml.kernel.org/r/20220601093211.2970565-1-tianyu.li@arm.com Fixes: e130242dc351 ("mm: simplify compat numa syscalls") Signed-off-by: Tianyu Li Cc: Arnd Bergmann Cc: Mark Rutland Signed-off-by: Andrew Morton mm/mempolicy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8edaec0756005a3f286c9272e909dff07d12cf75 Author: Baolin Wang Date: Fri May 27 10:01:35 2022 +0800 mm/hugetlb: remove unnecessary huge_ptep_set_access_flags() in hugetlb_mcopy_atomic_pte() There is no need to update the hugetlb access flags after just setting the hugetlb page table entry by set_huge_pte_at(), since the page table entry value has no changes. Thus remove the unnecessary huge_ptep_set_access_flags() in hugetlb_mcopy_atomic_pte(). Link: https://lkml.kernel.org/r/f3e28b897b53a69967a8b98a6fdcda3be80c9229.1653616175.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Reviewed-by: Muchun Song Reviewed-by: Mike Kravetz Reviewed-by: Anshuman Khandual Signed-off-by: Andrew Morton mm/hugetlb.c | 2 -- 1 file changed, 2 deletions(-) commit 6c2f761dad7851d8088b91063ccaea3c970efe78 Author: Andrey Konovalov Date: Thu Jun 9 20:18:47 2022 +0200 kasan: fix zeroing vmalloc memory with HW_TAGS HW_TAGS KASAN skips zeroing page_alloc allocations backing vmalloc mappings via __GFP_SKIP_ZERO. Instead, these pages are zeroed via kasan_unpoison_vmalloc() by passing the KASAN_VMALLOC_INIT flag. The problem is that __kasan_unpoison_vmalloc() does not zero pages when either kasan_vmalloc_enabled() or is_vmalloc_or_module_addr() fail. Thus: 1. Change __vmalloc_node_range() to only set KASAN_VMALLOC_INIT when __GFP_SKIP_ZERO is set. 2. Change __kasan_unpoison_vmalloc() to always zero pages when the KASAN_VMALLOC_INIT flag is set. 3. Add WARN_ON() asserts to check that KASAN_VMALLOC_INIT cannot be set in other early return paths of __kasan_unpoison_vmalloc(). Also clean up the comment in __kasan_unpoison_vmalloc. Link: https://lkml.kernel.org/r/4bc503537efdc539ffc3f461c1b70162eea31cf6.1654798516.git.andreyknvl@google.com Fixes: 23689e91fb22 ("kasan, vmalloc: add vmalloc tagging for HW_TAGS") Signed-off-by: Andrey Konovalov Cc: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Andrey Ryabinin Signed-off-by: Andrew Morton mm/kasan/hw_tags.c | 32 +++++++++++++++++++++++--------- mm/vmalloc.c | 10 +++++----- 2 files changed, 28 insertions(+), 14 deletions(-) commit d9da8f6cf55eeca642c021912af1890002464c64 Author: Andrey Konovalov Date: Thu Jun 9 20:18:46 2022 +0200 mm: introduce clear_highpage_kasan_tagged Add a clear_highpage_kasan_tagged() helper that does clear_highpage() on a page potentially tagged by KASAN. This helper is used by the following patch. Link: https://lkml.kernel.org/r/4471979b46b2c487787ddcd08b9dc5fedd1b6ffd.1654798516.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton include/linux/highmem.h | 10 ++++++++++ mm/page_alloc.c | 8 ++------ 2 files changed, 12 insertions(+), 6 deletions(-) commit aeaec8e27eddc147b96fe32df2671980ce7ca87c Author: Andrey Konovalov Date: Thu Jun 9 20:18:45 2022 +0200 mm: rename kernel_init_free_pages to kernel_init_pages Rename kernel_init_free_pages() to kernel_init_pages(). This function is not only used for free pages but also for pages that were just allocated. Link: https://lkml.kernel.org/r/1ecaffc0a9c1404d4d7cf52efe0b2dc8a0c681d8.1654798516.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Muchun Song Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton mm/page_alloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d79905c77f96988284e3b286e4b50ae8762eebca Author: SeongJae Park Date: Mon Jun 6 18:23:10 2022 +0000 mm/damon/reclaim: add 'damon_reclaim_' prefix to 'enabled_store()' This commit adds 'damon_reclaim_' prefix to 'enabled_store()', so that we can distinguish it easily from the stack trace using 'faddr2line.sh' like tools. Link: https://lkml.kernel.org/r/20220606182310.48781-7-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/reclaim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f943e7e3a4c6202eeb8b3c4bf2889778450eaf7e Author: SeongJae Park Date: Mon Jun 6 18:23:09 2022 +0000 mm/damon/reclaim: make 'enabled' checking timer simpler DAMON_RECLAIM's 'enabled' parameter store callback ('enabled_store()') schedules the parameter check timer ('damon_reclaim_timer') if the parameter is set as 'Y'. Then, the timer schedules itself to check if user has set the parameter as 'N'. It's unnecessarily complex. This commit makes it simpler by making the parameter store callback to schedule the timer regardless of the parameter value and disabling the timer's self scheduling. Link: https://lkml.kernel.org/r/20220606182310.48781-6-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/reclaim.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit a79b68ee3e21f3e5e39b6bd07759c1b4d5267bc4 Author: SeongJae Park Date: Mon Jun 6 18:23:08 2022 +0000 mm/damon/sysfs: deduplicate inputs applying DAMON sysfs interface's DAMON context building and its online parameter update have duplicated code. This commit removes the duplicate. Link: https://lkml.kernel.org/r/20220606182310.48781-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/sysfs.c | 59 +++++++++++++++++++++++--------------------------------- 1 file changed, 24 insertions(+), 35 deletions(-) commit f25ab3bdfb6f8548a721d4592b2c56cb2ac90ce6 Author: SeongJae Park Date: Mon Jun 6 18:23:07 2022 +0000 mm/damon/reclaim: deduplicate 'commit_inputs' handling DAMON_RECLAIM's handling of 'commit_inputs' parameter is duplicated in 'after_aggregation()' and 'after_wmarks_check()' callbacks. This commit deduplicates the code for better maintenance. Link: https://lkml.kernel.org/r/20220606182310.48781-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/reclaim.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit c9e124e0382d83d458db204f929002ea98daa6a8 Author: SeongJae Park Date: Mon Jun 6 18:23:06 2022 +0000 mm/damon/{dbgfs,sysfs}: move target_has_pid() from dbgfs to damon.h The function for knowing if given monitoring context's targets will have pid or not is defined and used in dbgfs only. However, the logic is also needed for sysfs. This commit moves the code to damon.h and makes both dbgfs and sysfs to use it. Link: https://lkml.kernel.org/r/20220606182310.48781-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton include/linux/damon.h | 6 ++++++ mm/damon/dbgfs.c | 15 +++++---------- mm/damon/sysfs.c | 8 +++----- 3 files changed, 14 insertions(+), 15 deletions(-) commit 205498012513f9a1209d9335bf3766080c587a33 Author: SeongJae Park Date: Mon Jun 6 18:23:05 2022 +0000 Docs/admin-guide/damon/reclaim: remove a paragraph that been obsolete due to online tuning support Patch series "mm/damon: trivial cleanups". This patchset contains trivial cleansups for DAMON code. This patch (of 6): Commit 81a84182c343 ("Docs/admin-guide/mm/damon/reclaim: document 'commit_inputs' parameter") has documented the 'commit_inputs' parameter which allows online parameter update, but it didn't remove a paragraph saying the online parameter update is impossible. This commit removes the obsolete paragraph. Link: https://lkml.kernel.org/r/20220606182310.48781-1-sj@kernel.org Link: https://lkml.kernel.org/r/20220606182310.48781-2-sj@kernel.org Fixes: 81a84182c343 ("Docs/admin-guide/mm/damon/reclaim: document 'commit_inputs' parameter") Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/admin-guide/mm/damon/reclaim.rst | 6 ------ 1 file changed, 6 deletions(-) commit ad1ac596e8a8c4b06715dfbd89853eb73c9886b2 Author: Miaohe Lin Date: Mon May 30 19:30:16 2022 +0800 mm/migration: fix potential pte_unmap on an not mapped pte __migration_entry_wait and migration_entry_wait_on_locked assume pte is always mapped from caller. But this is not the case when it's called from migration_entry_wait_huge and follow_huge_pmd. Add a hugetlbfs variant that calls hugetlb_migration_entry_wait(ptep == NULL) to fix this issue. Link: https://lkml.kernel.org/r/20220530113016.16663-5-linmiaohe@huawei.com Fixes: 30dad30922cc ("mm: migration: add migrate_entry_wait_huge()") Signed-off-by: Miaohe Lin Suggested-by: David Hildenbrand Reviewed-by: David Hildenbrand Cc: Alistair Popple Cc: Christoph Hellwig Cc: Christoph Lameter Cc: David Howells Cc: Huang Ying Cc: kernel test robot Cc: Mike Kravetz Cc: Muchun Song Cc: Oscar Salvador Cc: Peter Xu Signed-off-by: Andrew Morton include/linux/swapops.h | 12 ++++++++---- mm/hugetlb.c | 4 ++-- mm/migrate.c | 23 +++++++++++++++++++---- 3 files changed, 29 insertions(+), 10 deletions(-) commit 7ce82f4c3f3ead13a9d9498768e3b1a79975c4d8 Author: Miaohe Lin Date: Mon May 30 19:30:15 2022 +0800 mm/migration: return errno when isolate_huge_page failed We might fail to isolate huge page due to e.g. the page is under migration which cleared HPageMigratable. We should return errno in this case rather than always return 1 which could confuse the user, i.e. the caller might think all of the memory is migrated while the hugetlb page is left behind. We make the prototype of isolate_huge_page consistent with isolate_lru_page as suggested by Huang Ying and rename isolate_huge_page to isolate_hugetlb as suggested by Muchun to improve the readability. Link: https://lkml.kernel.org/r/20220530113016.16663-4-linmiaohe@huawei.com Fixes: e8db67eb0ded ("mm: migrate: move_pages() supports thp migration") Signed-off-by: Miaohe Lin Suggested-by: Huang Ying Reported-by: kernel test robot (build error) Cc: Alistair Popple Cc: Christoph Hellwig Cc: Christoph Lameter Cc: David Hildenbrand Cc: David Howells Cc: Mike Kravetz Cc: Muchun Song Cc: Oscar Salvador Cc: Peter Xu Signed-off-by: Andrew Morton include/linux/hugetlb.h | 6 +++--- mm/gup.c | 2 +- mm/hugetlb.c | 11 +++++------ mm/memory-failure.c | 2 +- mm/memory_hotplug.c | 2 +- mm/mempolicy.c | 2 +- mm/migrate.c | 7 ++++--- 7 files changed, 16 insertions(+), 16 deletions(-) commit 160088b3b6d7946e456caa379dcdfc8702c66274 Author: Miaohe Lin Date: Mon May 30 19:30:14 2022 +0800 mm/migration: remove unneeded lock page and PageMovable check When non-lru movable page was freed from under us, __ClearPageMovable must have been done. So we can remove unneeded lock page and PageMovable check here. Also free_pages_prepare() will clear PG_isolated for us, so we can further remove ClearPageIsolated as suggested by David. Link: https://lkml.kernel.org/r/20220530113016.16663-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Christoph Hellwig Reviewed-by: Oscar Salvador Reviewed-by: David Hildenbrand Cc: Alistair Popple Cc: Christoph Lameter Cc: David Howells Cc: Huang Ying Cc: kernel test robot Cc: Mike Kravetz Cc: Muchun Song Cc: Peter Xu Signed-off-by: Andrew Morton mm/migrate.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit c453d8c7d1384d7e1d7f26d3ec0d527092edf801 Author: Yang Shi Date: Fri May 13 12:17:05 2022 -0700 mm/page_vma_mapped.c: check possible huge PMD map with transhuge_vma_suitable() IIUC page_vma_mapped_walk() checks if the vma is possibly huge PMD mapped with transparent_hugepage_active() and "pvmw->nr_pages >= HPAGE_PMD_NR". Actually pvmw->nr_pages is returned by compound_nr() or folio_nr_pages(), so the page should be THP as long as "pvmw->nr_pages >= HPAGE_PMD_NR". And it is guaranteed THP is allocated for valid VMA in the first place. But it may be not PMD mapped if the VMA is file VMA and it is not properly aligned. The transhuge_vma_suitable() is used to do such check, so replace transparent_hugepage_active() to it, which is too heavy and overkilling. Link: https://lkml.kernel.org/r/20220513191705.457775-1-shy828301@gmail.com Signed-off-by: Yang Shi Reviewed-by: Muchun Song Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton include/linux/huge_mm.h | 8 ++++++-- mm/page_vma_mapped.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) commit 507db7927cd181d409dd495c8384b8e14c21c600 Author: Yang Shi Date: Sun Jul 3 18:08:36 2022 -0700 mm: rmap: use the correct parameter name for DEFINE_PAGE_VMA_WALK The parameter used by DEFINE_PAGE_VMA_WALK is _page not page, fix the parameter name. It didn't cause any build error, it is probably because the only caller is write_protect_page() from ksm.c, which pass in page. Link: https://lkml.kernel.org/r/20220512174551.81279-1-shy828301@gmail.com Fixes: 2aff7a4755be ("mm: Convert page_vma_mapped_walk to work on PFNs") Signed-off-by: Yang Shi Reviewed-by: Muchun Song Reviewed-by: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton include/linux/rmap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 38857318692acd02353b47129bb06326528a47c0 Author: Jérémy LEFAURE Date: Fri Jul 1 16:01:36 2022 +0000 coccinelle: Extend address test from ifaddr semantic patch to test expressions The test of an expression's address does not necessarily represent the whole condition, it may only be a part of it. Also, an expression's address is likely to be non-zero in every test expression, not only in if statements. This change aims at detecting an address test in more complex conditions and not only in if statements. Signed-off-by: Jérémy Lefaure Signed-off-by: Julia Lawall scripts/coccinelle/misc/{ifaddr.cocci => test_addr.cocci} | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b7ecce6800eb1aa97c486c1aabf64659193d5a4c Author: Zan Aziz Date: Fri Jul 1 18:08:34 2022 -0600 selftests:timers: globals don't need initialization to 0 Global variables do not need to be initialized to 0 and checkpatch flags this error in tools/testing/selftests/timers/alarmtimer-suspend.c: ERROR: do not initialise globals to 0 +int final_ret = 0; Fix this checkpatch error. Signed-off-by: Zan Aziz Signed-off-by: Shuah Khan tools/testing/selftests/timers/alarmtimer-suspend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6cc3c72aa0e8fb10b695c1a0c4ef07a66b3c2b0 Author: Marco Felsch Date: Mon May 30 14:24:07 2022 +0200 drm/panel: simple: add ETML0700Y5DHA panel Add support for the 1024x600 LVDS panel. Signed-off-by: Marco Felsch Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220530122407.918874-2-m.felsch@pengutronix.de drivers/gpu/drm/panel/panel-simple.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit c033f26de261128ac79c8337c1bd6cb1e5cef708 Author: Marco Felsch Date: Mon May 30 14:24:06 2022 +0200 dt-bindings: display: simple: add EDT ETML0700Y5DHA panel Add binding for the Emerging Display Technology ETML0700Y5DHA panel. It is a 7" WSVGA (1024x600) TFT LCD panel with: - LVDS data interface, - backlight and - capacitive touch. Signed-off-by: Marco Felsch Acked-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220530122407.918874-1-m.felsch@pengutronix.de Documentation/devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 170a41e9bc07618d164f11b5154b449e9c24973b Author: Svyatoslav Ryhel Date: Sun May 29 21:05:48 2022 +0300 drm/panel: simple: Add support for HannStar HSD101PWW2 panel Add definition of the HannStar HSD101PWW2 Rev0-A00/A01 LCD SuperIPS+ HD panel. Signed-off-by: Svyatoslav Ryhel Signed-off-by: Dmitry Osipenko Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220529180548.9942-4-clamor95@gmail.com drivers/gpu/drm/panel/panel-simple.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 0a9f6ffd490307d696a96ff4ff2de1c15c61ad65 Author: Svyatoslav Ryhel Date: Sun May 29 21:05:47 2022 +0300 dt-bindings: display: simple: Add HannStar HSD101PWW2 Add HannStar HSD101PWW2 10.1" WXGA (1280x800) TFT-LCD LVDS panel to the list of compatibles. Acked-by: Rob Herring Signed-off-by: Svyatoslav Ryhel Signed-off-by: Dmitry Osipenko Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220529180548.9942-3-clamor95@gmail.com Documentation/devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 68427dacc5266f85cb96277e91cadb8988ec0474 Author: Anton Bambura Date: Sun May 29 21:05:46 2022 +0300 dt-bindings: sharp,lq101r1sx01: Add compatible for LQ101R1SX03 LQ101R1SX03 is compatible with LQ101R1SX01 from software perspective, document it. The LQ101R1SX03 is a newer revision of LQ101R1SX01, it has minor differences in hardware pins in comparison to the older version. The newer version of the panel can be found on Android tablets, like ASUS TF701T. Reviewed-by: Rob Herring Signed-off-by: Anton Bambura Signed-off-by: Dmitry Osipenko Signed-off-by: Svyatoslav Ryhel Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220529180548.9942-2-clamor95@gmail.com .../devicetree/bindings/display/panel/sharp,lq101r1sx01.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2545e12da4281f859c7b41b9681db15668e7f44d Author: Allen-KH Cheng Date: Fri Jul 1 17:05:42 2022 +0800 drm/mediatek: Remove mt8192 display rdma compatible The compatible “mediatek,mt8192-disp-rdma” is being used for reading the data into DMA for back-end panel driver in mt8192 but there is no difference between mt8183 and mt8192 in rdma driver. Remove compatible “mediatek,mt8192-disp-rdma” from the driver and should use “mediatek,mt8183-disp-rdma” as fallback in 8192 DTS according to the mediatek,rdma.yaml. Signed-off-by: Allen-KH Cheng Reviewed-by: Chen-Yu Tsai Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701090547.21429-2-allen-kh.cheng@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 6 ------ drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 -- 2 files changed, 8 deletions(-) commit d0bf1fe6454e976e39bc1524b9159fa2c0fcf321 Author: Li kunyu Date: Fri Jul 1 15:18:02 2022 +0800 net: usb: Remove unnecessary '0' values from hasdata hasdata does not need to be initialized to zero. It will be assigned a value in the following judgment conditions. Signed-off-by: Li kunyu Signed-off-by: David S. Miller drivers/net/usb/catc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a48e789dd2633bdeb6552dfdfedd0435f9c2f897 Merge: c67289e064ca 0ebd5529d2dd Author: David S. Miller Date: Sun Jul 3 12:32:15 2022 +0100 Merge tag 'linux-can-next-for-5.20-20220703' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2022-07-03 this is a pull request of 15 patches for net-next/master. The first 2 patches are by Max Staudt and add the can327 serial CAN driver along with a new line discipline ID. The next patch is by me an fixes a typo in the ctucanfd driver. The last 12 patches are by Dario Binacchi and integrate slcan CAN serial driver better into the existing CAN driver API. ==================== Signed-off-by: David S. Miller commit c67289e064cacda22ace61b8079a4e3f0e4aa520 Merge: 8e60a041e478 a8d52b024d6d Author: David S. Miller Date: Sun Jul 3 12:02:20 2022 +0100 Merge tag 'mlx5-updates-2022-06-29' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux mlx5-updates-2022-06-29 Chris Mi Says: ============== Remove dependency between sriov and eswitch mode Currently, there are three eswitch modes, none, legacy and switchdev. None is the default mode. And when disabling sriov, current eswitch mode will be changed to none. This patchset removes eswitch mode none and also removes dependency between sriov and eswitch mode. With this patchset, there are two behavior changes: Original behavior ----------------- - When driver is loaded without sriov enabled, none is the default mode. But actually eswitch mode should be either legacy or switchdev, so devlink will return unsupported when showing eswitch mode. - When disabling sriov in either legacy or switchdev mode, eswitch mode will be changed to none. New behavior ------------ - When driver is loaded, legacy will be the default mode. - When disabling sriov in either legacy or switchdev mode, eswitch mode will not be changed. Jianbo Liu Says: ================ Add support offloading police action This patchset supports offloading police action by flow meter ASO object in hardware. The first part is to add interfaces to create and destroy flow meter ASO object, and modify meter parameters by ACCESS_ASO WQE. As multiple objects are created at a time, and two meters are in one object, bitmaps are used manage these meters in one creation. Then the police action can be mapped to a meter by the action index. After mlx5e tc action refactoring was merged and post_act table was added, a simple tc flow with one police action is broken down into two rules in hardware. One rule with the original match in the original table, which performs a metadata rewrite and do metering, then jumps to post_meter table. The second rule is placed in the post_act table with all the actions left. The rules in post_meter table match on the meter outcome. If the outcome is GREEN, we merely jump back to the post_act table for further processing. Otherwise, the outcome is RED, and we drop the packet. The last part is to support flow meter ASO object in sw steering. Signed-off-by: David S. Miller commit 0ebd5529d2ddab76a46681991d350b82c62ef13e Merge: 50f2944009a2 0a9cdcf098a4 Author: Marc Kleine-Budde Date: Sun Jul 3 11:37:05 2022 +0200 Merge branch 'can-slcan-extend-supported-features' Dario Binacchi says: ==================== This series originated as a result of CAN communication tests for an application using the USBtin adapter (https://www.fischl.de/usbtin/). The tests showed some errors but for the driver everything was ok. Also, being the first time I used the slcan driver, I was amazed that it was not possible to configure the bitrate via the ip tool. For these two reasons, I started looking at the driver code and realized that it didn't use the CAN network device driver interface. Starting from these assumptions, I tried to: - Use the CAN network device driver interface. - Set the bitrate via the ip tool. - Send the open/close command to the adapter from the driver. - Add ethtool support to reset the adapter errors. - Extend the protocol to forward the adapter CAN communication errors and the CAN state changes to the netdev upper layers. Except for the protocol extension patches (i. e. forward the adapter CAN communication errors and the CAN state changes to the netdev upper layers), the whole series has been tested under QEMU with Linux 4.19.208 using the USBtin adapter. Testing the extension protocol patches requires updating the adapter firmware. Before modifying the firmware I think it makes sense to know if these extensions can be considered useful. Before applying the series I used these commands: slcan_attach -f -s6 -o /dev/ttyACM0 slcand ttyACM0 can0 ip link set can0 up After applying the series I am using these commands: slcan_attach /dev/ttyACM0 slcand ttyACM0 can0 ip link set dev can0 down ip link set can0 type can bitrate 500000 ethtool --set-priv-flags can0 err-rst-on-open on ip link set dev can0 up Now there is a clearer separation between serial line and CAN, but above all, it is possible to use the ip and ethtool commands as it happens for any CAN device driver. The changes are backward compatible, you can continue to use the slcand and slcan_attach command options. Changes in v5: - Update the commit message. - Restore the use of rtnl_lock() and rtnl_unlock(). Changes in v4: - Move the patch in front of the patch "[v3,04/13] can: slcan: use CAN network device driver API". - Add the CAN_BITRATE_UNSET (0) and CAN_BITRATE_UNKNOWN (-1U) macros. - Simplify the bitrate check to dump it. - Update the commit description. - Update the commit description. - Use the CAN_BITRATE_UNKNOWN macro. - Use kfree_skb() instead of can_put_echo_skb() in the slc_xmit(). - Remove the `if (slcan_devs)' check in the slc_dealloc(). - Replace `sl->tty == NULL' with `!sl->tty'. - Use CAN_BITRATE_UNSET (0) and CAN_BITRATE_UNKNOWN (-1U) macros. - Don't reset the bitrate in ndo_stop() if it has been configured. - Squashed to the patch [v3,09/13] can: slcan: send the close command to the adapter. - Use the CAN_BITRATE_UNKNOWN macro. - Add description of slc_bump_err() function. - Remove check for the 'e' character at the beggining of the function. It was already checked by the caller function. - Protect decoding against the case the len value is longer than the received data. - Some small changes to make the decoding more readable. - Increment all the error counters at the end of the function. - Add description of slc_bump_state() function. - Remove check for the 's' character at the beggining of the function. It was already checked by the caller function. - Protect decoding against the case the frame len is longer than the received data (add SLC_STATE_FRAME_LEN macro). - Set cf to NULL in case of alloc_can_err_skb() failure. - Some small changes to make the decoding more readable. - Use the character 'b' instead of 'f' for bus-off state. Changes in v3: - Increment the error counter in case of decoding failure. - Replace (-1) with (-1U) in the commit description. - Update the commit description. - Remove the slc_do_set_bittiming(). - Set the bitrate in the ndo_open(). - Replace -1UL with -1U in setting a fake value for the bitrate. - Drop the patch "can: slcan: simplify the device de-allocation". - Add the patch "can: netlink: dump bitrate 0 if can_priv::bittiming.bitrate is -1U". Changes in v2: - Put the data into the allocated skb directly instead of first filling the "cf" on the stack and then doing a memcpy(). - Move CAN_SLCAN Kconfig option inside CAN_DEV scope. - Improve the commit message. - Use the CAN framework support for setting fixed bit rates. - Improve the commit message. - Protect decoding against the case the len value is longer than the received data. - Continue error handling even if no skb can be allocated. - Continue error handling even if no skb can be allocated. ==================== Link: https://lore.kernel.org/all/20220628163137.413025-1-dario.binacchi@amarulasolutions.com/ Signed-off-by: Marc Kleine-Budde commit 0a9cdcf098a4a52b1a44b522022d1466a2d2680d Author: Dario Binacchi Date: Tue Jun 28 18:31:36 2022 +0200 can: slcan: extend the protocol with CAN state info It extends the protocol to receive the adapter CAN state changes (warning, busoff, etc.) and forward them to the netdev upper levels. Link: https://lore.kernel.org/all/20220628163137.413025-13-dario.binacchi@amarulasolutions.com Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 74 +++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) commit b32ff4668544e1333b694fcc7812b2d7397b4d6a Author: Dario Binacchi Date: Tue Jun 28 18:31:35 2022 +0200 can: slcan: extend the protocol with error info It extends the protocol to receive the adapter CAN communication errors and forward them to the netdev upper levels. Link: https://lore.kernel.org/all/20220628163137.413025-12-dario.binacchi@amarulasolutions.com Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/slcan-core.c | 140 ++++++++++++++++++++++++++++++++++++- 1 file changed, 139 insertions(+), 1 deletion(-) commit 4de0e8efa052b1f0b3dae9e7c1538163cad216e7 Author: Dario Binacchi Date: Tue Jun 28 18:31:34 2022 +0200 can: slcan: add ethtool support to reset adapter errors This patch adds a private flag to the slcan driver to switch the "err-rst-on-open" setting on and off. "err-rst-on-open" on - Reset error states on opening command "err-rst-on-open" off - Don't reset error states on opening command (default) The setting can only be changed if the interface is down: ip link set dev can0 down ethtool --set-priv-flags can0 err-rst-on-open {off|on} ip link set dev can0 up Link: https://lore.kernel.org/all/20220628163137.413025-11-dario.binacchi@amarulasolutions.com Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan/Makefile | 1 + drivers/net/can/slcan/slcan-core.c | 36 +++++++++++++++++++ drivers/net/can/slcan/slcan-ethtool.c | 65 +++++++++++++++++++++++++++++++++++ drivers/net/can/slcan/slcan.h | 18 ++++++++++ 4 files changed, 120 insertions(+) commit 98b12064591d635db86da4957b547067dc6897cc Author: Dario Binacchi Date: Tue Jun 28 18:31:33 2022 +0200 can: slcan: move driver into separate sub directory This patch moves the slcan driver into a separate directory, a later patch will add more files. Link: https://lore.kernel.org/all/20220628163137.413025-10-dario.binacchi@amarulasolutions.com Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde drivers/net/can/Makefile | 2 +- drivers/net/can/slcan/Makefile | 6 ++++++ drivers/net/can/{slcan.c => slcan/slcan-core.c} | 0 3 files changed, 7 insertions(+), 1 deletion(-) commit 5bac315be7eb6a7442d390c6b99e7ff5cb61f848 Author: Dario Binacchi Date: Tue Jun 28 18:31:32 2022 +0200 can: slcan: send the open/close commands to the adapter In case the bitrate has been set via ip tool, this patch changes the driver to send the open ("O\r") and close ("C\r) commands to the adapter. Link: https://lore.kernel.org/all/20220628163137.413025-9-dario.binacchi@amarulasolutions.com Signed-off-by: Dario Binacchi Tested-by: Jeroen Hofstee Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit dca796299462579dad380413783588192b0c3433 Author: Dario Binacchi Date: Tue Jun 28 18:31:31 2022 +0200 can: slcan: set bitrate by CAN device driver API It allows to set the bitrate via ip tool, as it happens for the other CAN device drivers. It still remains possible to set the bitrate via slcand or slcan_attach utilities. In case the ip tool is used, the driver will send the serial command to the adapter. Link: https://lore.kernel.org/all/20220628163137.413025-8-dario.binacchi@amarulasolutions.com Signed-off-by: Dario Binacchi Tested-by: Jeroen Hofstee Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan.c | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) commit 52f9ac85b8766d16021775f2c1bb85a903a582ff Author: Dario Binacchi Date: Tue Jun 28 18:31:30 2022 +0200 can: slcan: allow to send commands to the adapter This is a preparation patch for the upcoming support to change the bitrate via ip tool, reset the adapter error states via the ethtool API and, more generally, send commands to the adapter. Since the close command (i. e. "C\r") will be sent in the ndo_stop() where netif_running() returns false, a new flag bit (i. e. SLF_XCMD) for serial transmission has to be added. Link: https://lore.kernel.org/all/20220628163137.413025-7-dario.binacchi@amarulasolutions.com Signed-off-by: Dario Binacchi Tested-by: Jeroen Hofstee Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan.c | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) commit c4e54b063f42f20a6b3ad1ffa61c574e631e0216 Author: Dario Binacchi Date: Tue Jun 28 18:31:29 2022 +0200 can: slcan: use CAN network device driver API As suggested by commit [1], now the driver uses the functions and the data structures provided by the CAN network device driver interface. Currently the driver doesn't implement a way to set bitrate for SLCAN based devices via ip tool, so you'll have to do this by slcand or slcan_attach invocation through the -sX parameter: - slcan_attach -f -s6 -o /dev/ttyACM0 - slcand -f -s8 -o /dev/ttyUSB0 where -s6 in will set adapter's bitrate to 500 Kbit/s and -s8 to 1Mbit/s. See the table below for further CAN bitrates: - s0 -> 10 Kbit/s - s1 -> 20 Kbit/s - s2 -> 50 Kbit/s - s3 -> 100 Kbit/s - s4 -> 125 Kbit/s - s5 -> 250 Kbit/s - s6 -> 500 Kbit/s - s7 -> 800 Kbit/s - s8 -> 1000 Kbit/s In doing so, the struct can_priv::bittiming.bitrate of the driver is not set and since the open_candev() checks that the bitrate has been set, it must be a non-zero value, the bitrate is set to a fake value (-1U) before it is called. Using the rtnl_lock()/rtnl_unlock() functions has become a bit more tricky as the register_candev() function indirectly calls rtnl_lock() via register_netdev(). To avoid a deadlock it is therefore necessary to call rtnl_unlock() before calling register_candev(). The same goes for the unregister_candev() function. [1] commit 39549eef3587f ("can: CAN Network device driver and Netlink interface") Link: https://lore.kernel.org/all/20220628163137.413025-6-dario.binacchi@amarulasolutions.com Signed-off-by: Dario Binacchi Tested-by: Jeroen Hofstee Signed-off-by: Marc Kleine-Budde drivers/net/can/Kconfig | 40 ++++++++++++------------ drivers/net/can/slcan.c | 82 ++++++++++++++++++++++++------------------------- 2 files changed, 60 insertions(+), 62 deletions(-) commit 036bff2800cbcf8217dd0bc93d8421b5b8f72476 Author: Dario Binacchi Date: Tue Jun 28 18:31:28 2022 +0200 can: netlink: dump bitrate 0 if can_priv::bittiming.bitrate is -1U Upcoming changes on slcan driver will require you to specify a bitrate of value -1 to prevent the open_candev() from failing but at the same time highlighting that it is a fake value. In this case the command `ip --details -s -s link show' would print 4294967295 as the bitrate value. The patch change this value in 0. Link: https://lore.kernel.org/all/20220628163137.413025-5-dario.binacchi@amarulasolutions.com Suggested-by: Marc Kleine-Budde Signed-off-by: Dario Binacchi Tested-by: Jeroen Hofstee Signed-off-by: Marc Kleine-Budde drivers/net/can/dev/netlink.c | 3 ++- include/linux/can/bittiming.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 92a31782c8487e496a9f1b2be3995e5c9c9a3265 Author: Dario Binacchi Date: Tue Jun 28 18:31:27 2022 +0200 can: slcan: use the alloc_can_skb() helper It is used successfully by most (if not all) CAN device drivers. It allows to remove replicated code. Link: https://lore.kernel.org/all/20220628163137.413025-4-dario.binacchi@amarulasolutions.com Signed-off-by: Dario Binacchi Tested-by: Jeroen Hofstee Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan.c | 70 +++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 37 deletions(-) commit da6788ea025c62343fec81f92409012d82096a09 Author: Dario Binacchi Date: Tue Jun 28 18:31:26 2022 +0200 can: slcan: use netdev helpers to print out messages Replace printk() calls with corresponding netdev helpers. Link: https://lore.kernel.org/all/20220628163137.413025-3-dario.binacchi@amarulasolutions.com Signed-off-by: Dario Binacchi Tested-by: Jeroen Hofstee Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3cd864901bc5d5aa2bd38533dcd63d2bf2387030 Author: Dario Binacchi Date: Tue Jun 28 18:31:25 2022 +0200 can: slcan: use the BIT() helper Use the BIT() helper instead of an explicit shift. Link: https://lore.kernel.org/all/20220628163137.413025-2-dario.binacchi@amarulasolutions.com Signed-off-by: Dario Binacchi Tested-by: Jeroen Hofstee Signed-off-by: Marc Kleine-Budde drivers/net/can/slcan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2477d81901a23ad80045798edbeb7f91b5ff6143 Author: Bhupesh Sharma Date: Sun May 15 03:24:19 2022 +0530 ARM: dts: qcom: Fix sdhci node names - use 'mmc@' Since the Qualcomm sdhci-msm device-tree binding has been converted to yaml format, 'make dtbs_check' reports issues with inconsistent 'sdhci@' convention used for specifying the sdhci nodes. The generic mmc bindings expect 'mmc@' format instead. Fix the same. Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma [bjorn: Extracted from combined arm64 patch] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220514215424.1007718-2-bhupesh.sharma@linaro.org arch/arm/boot/dts/qcom-apq8084.dtsi | 4 ++-- arch/arm/boot/dts/qcom-ipq4019.dtsi | 2 +- arch/arm/boot/dts/qcom-msm8226.dtsi | 6 +++--- arch/arm/boot/dts/qcom-msm8974.dtsi | 6 +++--- arch/arm/boot/dts/qcom-sdx55.dtsi | 2 +- arch/arm/boot/dts/qcom-sdx65.dtsi | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) commit 817c2f3519745749e60ea35d9be676819bb2fe6a Merge: a10b760b7402 5fb779558f1c Author: Bjorn Andersson Date: Sat Jul 2 22:03:46 2022 -0500 Merge tag 'qcom-arm64-fixes-for-5.19' into arm64-for-5.20 This merges the 'qcom-arm64-fixes-for-5.19' tag into arm64-for-5.20 to handle the merge conflict related to the header file changes in sc7180-trogdor. commit a10b760b7402563661fa305882b181a75a1d4894 Author: Stephen Boyd Date: Mon Jun 27 14:28:02 2022 -0700 arm64: dts: qcom: sc7180-trogdor: Split out keyboard node and describe detachables Trogdor devices that have a detachable keyboard still have a non-detachable keyboard input device present because we include the cros-ec-keyboard.dtsi snippet in the top-level sc7180-trogdor.dtsi file that every variant board includes. We do this because the keyboard-controller node also provides some buttons like the power button and volume buttons. Unfortunately, this means we register a keyboard input device that doesn't do anything on boards with a detachable keyboard. Change the node's compatible on detachables to the newly introduced "google,cros-ec-keyb-switches" compatible to indicate that there are only switches and no keyboard to register. Similarly, move the keyboard include that defines the keyboard-controller node out of sc7180-trogdor.dtsi to boards that actually have a keyboard so that the matrix properties are not defined on boards with the switches compatible. Future boards can either use the include approach or the node definition approach to describe a keyboard with possible switches or just some switches. Cc: Benson Leung Cc: Guenter Roeck Cc: Douglas Anderson Cc: Hsin-Yi Wang Cc: "Joseph S. Barrera III" Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220627212802.3593012-1-swboyd@chromium.org arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi | 4 ++++ arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar.dtsi | 6 ++++++ arch/arm64/boot/dts/qcom/sc7180-trogdor-kingoftown.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi | 1 + arch/arm64/boot/dts/qcom/sc7180-trogdor-mrbland.dtsi | 6 ++++++ arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel.dtsi | 1 + arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi | 2 ++ arch/arm64/boot/dts/qcom/sc7180-trogdor-quackingstick.dtsi | 6 ++++++ arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts | 2 ++ arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler.dtsi | 4 ++++ arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 1 - 11 files changed, 33 insertions(+), 2 deletions(-) commit b39961659ffc3c3a9e3d0d43b0476547b5f35d49 Author: Robert Marko Date: Tue Jun 21 14:06:42 2022 +0200 arm64: dts: qcom: ipq8074: fix NAND node name Per schema it should be nand-controller@79b0000 instead of nand@79b0000. Fix it to match nand-controller.yaml requirements. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220621120642.518575-1-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq8074.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93d7cf2ee59fe6f4484d2833e18d8d4a12b9767e Author: Dmitry Baryshkov Date: Mon Jun 20 04:05:19 2022 +0300 arm64: dts: qcom: msm8916: add xo clocks to rpmcc and a53pll Both a53pll and rpmcc make use of xo as a clock parent. Add it to the respective device nodes. Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephan Gerhold Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220620010519.1533364-1-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 2752bb7d9b58accbaa15bcfc50de0e41e84990d5 Author: Dmitry Baryshkov Date: Fri Jun 17 13:36:52 2022 +0300 arm64: dts: qcom: msm8996: add second DSI interface Add device nodes for the DSI1, second DSI interface found on MSM8996/APQ8096 platforms. For example on db820c it is routed to the secondary HS expansion connector. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220617103652.606250-1-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 73 +++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit 2e4ae611ab73d8e35d6059fc30cb4da4cd568d4c Author: Dmitry Baryshkov Date: Wed Jun 15 16:59:35 2022 +0300 arm64: dts: qcom: add mdp_clk clock to the MDSS device Add MDP_CLK ("core") clock to the mdss device to allow MDSS driver to access HW_REV/etc registers. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220615135935.87381-5-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 213d7368723709cf4567488e63dd667802378202 Author: Emma Anholt Date: Tue Jun 14 16:01:36 2022 -0700 arm64: dts: qcom: sm8250: Enable per-process page tables. This is an SMMU for the adreno gpu, and adding this compatible lets the driver use per-fd page tables, which are required for security between GPU clients. Signed-off-by: Emma Anholt Reviewed-by: Dmitry Baryshkov [bjorn: Move arm,smmu-500 last, per Dmitry's request] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220614230136.3726047-2-emma@anholt.net arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7618a2de8121d5723c0fd68a381877c8f2e31826 Author: Lin, Meng-Bo Date: Fri Jun 10 17:54:09 2022 +0000 arm64: dts: qcom: msm8916-samsung-a2015: Add touchscreen pinctrl A3, A5 and most of the Samsung phones with MSM8916 SoC use GPIO pin 13 for touchscreen interrupts. Add touchscreen pinctrl to a2015 common dtsi. Signed-off-by: Lin, Meng-Bo Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220610175332.104154-1-linmengbo0689@protonmail.com arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi | 8 ++++++++ arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts | 8 -------- arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts | 8 -------- 3 files changed, 8 insertions(+), 16 deletions(-) commit 917a6de1b0a0d55c67533c5d3827ddd4388b14a5 Author: Dmitry Baryshkov Date: Thu Jun 9 15:23:50 2022 +0300 arm64: dts: qcom: msm8996: drop phy-names from HDMI device node The HDMI driver doesn't use the phy-names to identify the PHY. Different Qualcomm platforms have used different names for the PHY. So, we are deprecating phy-names propertty of the HDMI device and dropping them from existing DTs. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220609122350.3157529-15-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 1 - 1 file changed, 1 deletion(-) commit 07f3c7a11dadbead580b6d6e7d86bcc87119fe74 Author: Krzysztof Kozlowski Date: Tue Jun 7 19:18:48 2022 +0200 arm64: dts: qcom: msm8994: add required ranges to OCMEM The OCMEM bindings require ranges property. Fixes: 9d511d0a7926 ("arm64: dts: qcom: msm8994: Add OCMEM node") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607171848.535128-14-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8994.dtsi | 1 + 1 file changed, 1 insertion(+) commit 7cc60f6c09f49f0d8f8fa3083e7ff4fddec39ec0 Author: Krzysztof Kozlowski Date: Tue Jun 7 19:18:47 2022 +0200 arm64: dts: qcom: sdm845: add dedicated IMEM and syscon compatibles Add proper compatibles to the IMEM device node: 1. syscon to allow accessing memory from other devices, 2. dedicated compatible as required for syscon and simple-mfd nodes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607171848.535128-13-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 616ab047bec7c47d881751bc537d3d6f6ae0c6d0 Author: Krzysztof Kozlowski Date: Tue Jun 7 19:18:46 2022 +0200 arm64: dts: qcom: sdm630: add dedicated IMEM and syscon compatibles Add proper compatibles to the IMEM device node: 1. syscon to allow accessing memory from other devices, 2. dedicated compatible as required for syscon and simple-mfd nodes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607171848.535128-12-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ffe4f99cbdd0639fc9a1254d39abd7b9dbe075e Author: Krzysztof Kozlowski Date: Tue Jun 7 19:18:45 2022 +0200 arm64: dts: qcom: sc7280: add simple-mfd to IMEM The IMEM node has children (PIL) which should be instantiated with simple-mfd. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607171848.535128-11-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c220f33e03a0cc4136ef205513b2266faf025e2e Author: Krzysztof Kozlowski Date: Tue Jun 7 19:18:44 2022 +0200 arm64: dts: qcom: sc7180: add dedicated IMEM and syscon compatibles Add proper compatibles to the IMEM device node: 1. syscon to allow accessing memory from other devices, 2. dedicated compatible as required for syscon and simple-mfd nodes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607171848.535128-10-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2b86a2d89c26de048e44d3be439d9b2b1cb7ce5 Author: Krzysztof Kozlowski Date: Tue Jun 7 19:18:43 2022 +0200 arm64: dts: qcom: qcs404: add dedicated IMEM and syscon compatibles Add proper compatibles to the IMEM device node: 1. syscon to allow accessing memory from other devices, 2. dedicated compatible as required for syscon and simple-mfd nodes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607171848.535128-9-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/qcs404.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bed0855657afebbcdd9d8a29546c550848452cf1 Author: Krzysztof Kozlowski Date: Tue Jun 7 19:18:42 2022 +0200 arm64: dts: qcom: use generic sram as name for imem and ocmem nodes According to Devicetree specification, the device nodes should be generic, reflecting the function of the device. The typical name for memory regions is "sram". Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607171848.535128-8-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8994.dtsi | 2 +- arch/arm64/boot/dts/qcom/qcs404.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 0cdfa122a5ee39dc7b979f3e224f9f2b71c94660 Author: Krzysztof Kozlowski Date: Tue Jun 7 12:29:31 2022 +0200 arm64: dts: qcom: sdm845-db845c: add function and color to LED nodes Add common LED properties - the function and color - to LED nodes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607102931.102805-10-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit b7428806b4345c5cce056756570ce68b4fdbcc57 Author: Krzysztof Kozlowski Date: Tue Jun 7 12:29:30 2022 +0200 arm64: dts: qcom: sc7280-herobrine: add function to LED node Add common LED property - the function - to LED node. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607102931.102805-9-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 09143dd2cbd6d0b14fa18fcbabb12b8f78e88a1a Author: Krzysztof Kozlowski Date: Tue Jun 7 12:29:29 2022 +0200 arm64: dts: qcom: sc7180-trogdor: add function to LED node Add common LED property - the function - to LED node. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607102931.102805-8-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 984a8c90c158affd8cf3bb3b5666cad436e3ca7b Author: Krzysztof Kozlowski Date: Tue Jun 7 12:29:28 2022 +0200 arm64: dts: qcom: qrb5165-rb5: add function and color to LED nodes Add common LED properties - the function and color - to LED nodes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607102931.102805-7-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit a072128b881e24c3711a41143ef9866208da0fe1 Author: Krzysztof Kozlowski Date: Tue Jun 7 12:29:27 2022 +0200 arm64: dts: qcom: apq8016-sbc: add function and color to LED nodes Add common LED properties - the function and color - to LED nodes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607102931.102805-6-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 191c85b852c122e9282797ae3ce2a36083f1e9a9 Author: Vinod Koul Date: Mon Jun 6 12:20:35 2022 +0530 arm64: dts: qcom: sm8250: Move qup-opp-table out of soc node The soc node expects all the nodes to have unit addresses. The qup-opp-table does not have that which causes warnings: arch/arm64/boot/dts/qcom/sm8250.dtsi:916.32-933.5: Warning (simple_bus_reg): /soc@0/qup-opp-table: missing or empty reg/ranges property Move the qup-opp-table out of soc node to fix these warnings Signed-off-by: Vinod Koul Reviewed-by: Krzysztof Kozlowski [bjorn: Rebased ontop of Krzysztof's node name update] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220606065035.553533-4-vkoul@kernel.org arch/arm64/boot/dts/qcom/sm8250.dtsi | 38 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) commit e2eedde448a9be6202fd9965aef29d4b6607ee67 Author: Vinod Koul Date: Mon Jun 6 12:20:34 2022 +0530 arm64: dts: qcom: sm8350: Move qup-opp-tables out of soc node The soc node expects all the nodes to have unit addresses. The qup-opp-tables do not have that which causes warnings: arch/arm64/boot/dts/qcom/sm8350.dtsi:640.46-657.5: Warning (simple_bus_reg): /soc@0/qup-100mhz-opp-table: missing or empty reg/ranges property arch/arm64/boot/dts/qcom/sm8350.dtsi:659.46-676.5: Warning (simple_bus_reg): /soc@0/qup-120mhz-opp-table: missing or empty reg/ranges property Move the qup-opp-tables out of soc node to fix these warnings Signed-off-by: Vinod Koul Reviewed-by: Krzysztof Kozlowski [bjorn: Rebased ontop of Krzysztof's node name update] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220606065035.553533-3-vkoul@kernel.org arch/arm64/boot/dts/qcom/sm8350.dtsi | 76 ++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 38 deletions(-) commit 12cfafe7b78876133474f4b3e44e0464a94f61b0 Author: Vinod Koul Date: Mon Jun 6 12:20:33 2022 +0530 arm64: dts: qcom: sm8450: rename interconnect nodes clk-virt and mc-virt interconnect nodes were named interconnect@0 and interconnect@1. That is incorrect as we don't have unit addresses 0/1 for these node. This causes warning: arch/arm64/boot/dts/qcom/sm8450.dtsi:255.27-259.4: Warning (unit_address_vs_reg): /interconnect@0: node has a unit name, but no reg or ranges property arch/arm64/boot/dts/qcom/sm8450.dtsi:261.26-265.4: Warning (unit_address_vs_reg): /interconnect@1: node has a unit name, but no reg or ranges property arch/arm64/boot/dts/qcom/sm8450.dtsi:255.27-259.4: Warning (unique_unit_address_if_enabled): /interconnect@0: duplicate unit-address (also used in node /soc@0) Rename the nodes to interconnect-0 and interconnect-1 to fix the warning. Signed-off-by: Vinod Koul Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220606065035.553533-2-vkoul@kernel.org arch/arm64/boot/dts/qcom/sm8450.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 13e75fe786a16c35bccc5e9d8890224fd38ad733 Author: Alec Su Date: Mon Jun 6 02:47:06 2022 +0000 arm64: dts: qcom: msm8996-xiaomi-natrium: Add support for Xiaomi Mi 5s Plus Add the device tree for Xiaomi Mi 5s Plus (natrium). Signed-off-by: Alec Su Reviewed-by: Yassine Oudjana Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220606024706.22861-3-ae40515@yahoo.com.tw arch/arm64/boot/dts/qcom/Makefile | 1 + .../arm64/boot/dts/qcom/msm8996-xiaomi-natrium.dts | 414 +++++++++++++++++++++ 2 files changed, 415 insertions(+) commit bb856fdf07f666686439b2c186fbb80a41e93277 Author: Alec Su Date: Mon Jun 6 02:47:05 2022 +0000 dt-bindings: arm: qcom: Document xiaomi,natrium board Document Xiaomi Mi 5s Plus (xiaomi-natrium) smartphone which is based on Snapdragon 821 SoC. Signed-off-by: Alec Su Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220606024706.22861-2-ae40515@yahoo.com.tw Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) commit f82c48d468521cd9d1a31797c6f9e6cac6f7c1b3 Author: Robert Marko Date: Sat Jun 4 17:30:03 2022 +0200 arm64: dts: qcom: ipq6018: correct QUP peripheral labels Current QUP peripheral labels like spi_0 and i2c_0 dont really tell what is the exact QUP HW being used as there are actually 6 identical QUP HW blocks for UART, SPI and I2C. For example current i2c_0 label actually points to the QUP2 I2C HW. This style of labeling does not follow what the rest of Qualcomm SoC-s use, for example IPQ8074 which has the identical QUP blocks. It also makes it really hard to add the missing QUP DT nodes as there are multiple missing. So utilize the same style as other Qualcomm SoC-s are using and update the CP01 DTS as its the current sole user of them. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220604153003.55172-1-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts | 4 ++-- arch/arm64/boot/dts/qcom/ipq6018.dtsi | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 7858ef3cfba2e123835b1b561deb9357afbfae29 Author: Luca Weiss Date: Fri Jun 3 11:47:10 2022 +0200 arm64: dts: qcom: sm8250: use constants for audio clocks The use of these constants was removed during merging, probably because the patches adding those defines and the dts patches were merged through different trees. Re-add them to make it clear which clocks are getting used. Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220603094710.64591-2-luca.weiss@fairphone.com arch/arm64/boot/dts/qcom/sm8250.dtsi | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit a102644dccfe3c0e91d517d3cad2b846e793eddb Author: Luca Weiss Date: Fri Jun 3 11:47:09 2022 +0200 arm64: dts: qcom: sdm845*: replace i2s reg with constant Make it easier to understand what the reg in those nodes is by using the constants provided by qcom,q6dsp-lpass-ports.h. Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220603094710.64591-1-luca.weiss@fairphone.com arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 4 ++-- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 +- arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 20402c94721a05fe3e581c1bfb88f0b45452766c Author: Manivannan Sadhasivam Date: Mon May 30 13:38:41 2022 +0530 arm64: dts: qcom: sm8450: Fix the IRQ trigger type for remoteproc nodes The watchdog IRQ trigger type should be EDGE_RISING. So fix all remoteproc nodes. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220530080842.37024-3-manivannan.sadhasivam@linaro.org arch/arm64/boot/dts/qcom/sm8450.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5458d6f2827cd30218570f266b8d238417461f2f Author: Sireesh Kodali Date: Thu May 26 19:47:40 2022 +0530 arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node The smem-state properties for the pronto node were incorrectly labelled, reading `qcom,state*` rather than `qcom,smem-state*`. Fix that, allowing the stop state to be used. Fixes: 88106096cbf8 ("ARM: dts: msm8916: Add and enable wcnss node") Signed-off-by: Sireesh Kodali Reviewed-by: Krzysztof Kozlowski Reviewed-by: Stephan Gerhold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220526141740.15834-3-sireeshkodali1@gmail.com arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 642f13c32087c29ed907866c7e6765d472e8f457 Author: Markuss Broks Date: Mon May 23 20:53:44 2022 +0300 arm64: dts: qcom: msm8998-xperia: Introduce ToF sensor support This patch adds device tree support for the VL53L0X ToF sensor found on all Yoshino devices. Signed-off-by: Markuss Broks Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220523175344.5845-6-markuss.broks@gmail.com .../boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit a0cdc83fa89b3a53cf03ecd338832392be0dd4b3 Author: Sibi Sankar Date: Thu May 19 22:17:03 2022 +0530 arm64: dts: qcom: sc7280: Add proxy interconnect requirements for modem Add interconnects that are required to be proxy voted upon during modem bootup on SC7280 SoCs. Reviewed-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1652978825-5304-2-git-send-email-quic_sibis@quicinc.com arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi | 1 + 1 file changed, 1 insertion(+) commit c372baf317f4e10e67b81594cc38607549557a93 Author: Krzysztof Kozlowski Date: Tue May 17 09:01:13 2022 +0200 arm64: dts: qcom: sm8450: remove duplicated glink-edge interrupt Specifying interrupts and interrupts-extended is not correct. Keep only the extended ones, routed towards IPCC mailbox to fix warnings like: sm8450-qrd.dtb: glink-edge: More than one condition true in oneOf schema: {'$filename': 'Documentation/devicetree/bindings/remoteproc/qcom,glink-edge.yaml', Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220517070113.18023-13-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8450.dtsi | 1 - 1 file changed, 1 deletion(-) commit 140488b46b96aed232fc5e911a4455ec6e441177 Author: Krzysztof Kozlowski Date: Tue May 17 09:01:12 2022 +0200 arm64: dts: qcom: sm8350: remove duplicated glink-edge interrupt Specifying interrupts and interrupts-extended is not correct. Keep only the extended ones, routed towards IPCC mailbox to fix warnings like: sm8350-sony-xperia-sagami-pdx214.dtb: glink-edge: More than one condition true in oneOf schema: {'$filename': 'Documentation/devicetree/bindings/remoteproc/qcom,glink-edge.yaml', Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220517070113.18023-12-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8350.dtsi | 1 - 1 file changed, 1 deletion(-) commit dc74f89e3281f9ea5669831db05d56db0555ced2 Author: Krzysztof Kozlowski Date: Tue May 17 09:01:11 2022 +0200 arm64: dts: qcom: sdm630: remove unneeded address/size cells in glink-edge glink-edge node does not have children with unit addresses: sdm630-sony-xperia-ganges-kirin.dtb: glink-edge: '#address-cells', '#size-cells' do not match any of the regexes: 'pinctrl-[0-9] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220517070113.18023-11-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 -- 1 file changed, 2 deletions(-) commit f0b255b4f012055ab12137ecc1b68dfe12b06107 Author: Krzysztof Kozlowski Date: Tue May 17 09:01:10 2022 +0200 arm64: dts: qcom: ipq6018: add label to remoteproc node glink-edge bindings require label: ipq6018-cp01-c1.dtb: glink-edge: 'label' is a required property Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220517070113.18023-10-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/ipq6018.dtsi | 1 + 1 file changed, 1 insertion(+) commit ddc35664a38e31034c3519de71c2dea52005bc2a Author: Bhupesh Sharma Date: Mon May 16 12:01:55 2022 +0530 arm64: dts: qcom: Remove unused 'vdda-max-microamp' & 'vdda-pll-max-microamp' properties As Bjorn noted in [1], since the qmp phy driver doesn't use the 'vdda-max-microamp' & 'vdda-pll-max-microamp' properties currently, let's remove them from the dts files as well. Otherwise, it leads to the following '$ make dtbs_check' warning(s): sm8350-microsoft-surface-duo2.dt.yaml: phy@1d87000: 'vdda-max-microamp', 'vdda-pll-max-microamp' do not match any of the regexes: '^phy@[0-9a-f]+$', 'pinctrl-[0-9]+ If later on the driver support is added, we can add these properties back to the dts files. [1]. https://lore.kernel.org/linux-arm-msm/YmQhpsmiYJzR99LK@ripper/ Cc: Bjorn Andersson Cc: Vinod Koul Cc: Rob Herring Signed-off-by: Bhupesh Sharma Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220516063155.1332683-5-bhupesh.sharma@linaro.org arch/arm64/boot/dts/qcom/sm8350-microsoft-surface-duo2.dts | 2 -- arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 2 -- arch/arm64/boot/dts/qcom/sm8450-qrd.dts | 2 -- 3 files changed, 6 deletions(-) commit 8bbda511a3d93be7b24b666dc0820cdbea4fbf37 Author: Robert Marko Date: Sun May 15 23:00:48 2022 +0200 arm64: dts: qcom: ipq8074: add USB power domains Add USB power domains provided by GCC GDSCs. Add the required #power-domain-cells to the GCC as well. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220515210048.483898-11-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq8074.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 877460f6a466f14327fca950c4a1ec17fac5280e Merge: afcbe252e9c1 74622e401e21 Author: Bjorn Andersson Date: Sat Jul 2 22:17:02 2022 -0500 Merge branch '20220515210048.483898-8-robimarko@gmail.com' into arm64-for-5.20 commit afcbe252e9c19161e4d4c95f33faaf592f1de086 Author: Bhupesh Sharma Date: Sun May 15 03:24:23 2022 +0530 arm64: dts: qcom: Fix 'reg-names' for sdhci nodes Since the Qualcomm sdhci-msm device-tree binding has been converted to yaml format, 'make dtbs_check' reports a number of issues with ordering of 'reg-names' as various possible combinations are possible for different qcom SoC dts files. Fix the same by updating the offending 'dts' files. Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220514215424.1007718-6-bhupesh.sharma@linaro.org arch/arm64/boot/dts/qcom/qcs404.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm630.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sm6125.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) commit 4ff12270dbbe245cf92c0247bcc1a2bfbc03639c Author: Bhupesh Sharma Date: Sun May 15 03:24:22 2022 +0530 arm64: dts: qcom: Fix ordering of 'clocks' & 'clock-names' for sdhci nodes Since the Qualcomm sdhci-msm device-tree binding has been converted to yaml format, 'make dtbs_check' reports a number of issues with ordering of 'clocks' & 'clock-names' for sdhci nodes: arch/arm64/boot/dts/qcom/ipq8074-hk10-c2.dtb: sdhci@7824900: clock-names:0: 'iface' was expected arch/arm64/boot/dts/qcom/ipq8074-hk10-c2.dtb: sdhci@7824900: clock-names:1: 'core' was expected arch/arm64/boot/dts/qcom/ipq8074-hk10-c2.dtb: sdhci@7824900: clock-names:2: 'xo' was expected Fix the same by updating the offending 'dts' files. Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220514215424.1007718-5-bhupesh.sharma@linaro.org arch/arm64/boot/dts/qcom/ipq8074.dtsi | 8 ++++---- arch/arm64/boot/dts/qcom/msm8916.dtsi | 12 ++++++------ arch/arm64/boot/dts/qcom/msm8994.dtsi | 14 +++++++------- arch/arm64/boot/dts/qcom/qcs404.dtsi | 6 +++--- arch/arm64/boot/dts/qcom/sc7180.dtsi | 12 ++++++------ arch/arm64/boot/dts/qcom/sc7280.dtsi | 12 ++++++------ arch/arm64/boot/dts/qcom/sdm630.dtsi | 14 ++++++++------ 7 files changed, 40 insertions(+), 38 deletions(-) commit 40940823cb582acc13f5fda5688a5287893b3281 Author: Bhupesh Sharma Date: Sun May 15 03:24:20 2022 +0530 arm64: dts: qcom: sdm630: Fix 'interconnect-names' for sdhci nodes Since the Qualcomm sdhci-msm device-tree binding has been converted to yaml format, 'make dtbs_check' reports issues with inconsistent 'interconnect-names' used for sdhci nodes. Fix the same. Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220514215424.1007718-3-bhupesh.sharma@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 96bb736f05d156a1d616a48a82239dfbde46c597 Author: Bhupesh Sharma Date: Sun May 15 03:24:19 2022 +0530 arm64: dts: qcom: Fix sdhci node names - use 'mmc@' Since the Qualcomm sdhci-msm device-tree binding has been converted to yaml format, 'make dtbs_check' reports issues with inconsistent 'sdhci@' convention used for specifying the sdhci nodes. The generic mmc bindings expect 'mmc@' format instead. Fix the same. Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma [bjorn: Moved non-arm64 changes to separate commit] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220514215424.1007718-2-bhupesh.sharma@linaro.org arch/arm64/boot/dts/qcom/ipq8074.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/msm8953.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/msm8994.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- arch/arm64/boot/dts/qcom/qcs404.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7180.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sc7280.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sdm630.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm6125.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sm6350.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sm8150.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- 15 files changed, 24 insertions(+), 24 deletions(-) commit dd764e1a42367c93d1e8e3f9e1ce08752a6dbac2 Author: Marijn Suijten Date: Wed May 11 21:07:18 2022 +0200 arm64: dts: qcom: sdm630-nile: Add RGB status LED on the PM660L LPG The entire Sony Nile and Ganges lineup utilize the first three channels (the triled channels) of the LPG block for an RGB (battery) status and notification indicator. Signed-off-by: Marijn Suijten [bjorn: Dropped #address/#size-cells] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220511190718.764445-4-marijn.suijten@somainline.org .../boot/dts/qcom/sdm630-sony-xperia-nile.dtsi | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit fc41893fe8289967d0aaffab25d8bb96334cc676 Author: Marijn Suijten Date: Wed May 11 21:07:17 2022 +0200 arm64: dts: qcom: pm660l: Add LPG node The Light Pulse Generator describes a hardware block responsible for displaying colors and patterns on an RGB LED (usually used for [battery] status and notifications), and drive PWM signals for general-purpose (ie. backlight) LEDs. The availability and usage of the individual channels differ per board and is hence left for individual platform DTs to configure. Signed-off-by: Marijn Suijten [bjorn: Dropped #address/size-cells] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220511190718.764445-3-marijn.suijten@somainline.org arch/arm64/boot/dts/qcom/pm660l.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 2cac6baf0249cdd3748128f3196c2d203b06a4af Author: Andrey Konovalov Date: Sat Jun 11 22:57:13 2022 +0300 arm64: dts: qcom: qcs404: fix default pinctrl settings for blsp1_spi1 The current settings refer to "blsp_spi1" function which isn't defined. For this reason an attempt to enable blsp1_spi1 interface results in the probe failure below: [ 3.492900] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table [ 3.502460] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table [ 3.517725] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table [ 3.532998] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table [ 3.548277] spi_qup: probe of 78b6000.spi failed with error -22 Fix this by making the functions used in qcs404.dtsi to match the contents of drivers/pinctrl/qcom/pinctrl-qcs404.c. Signed-off-by: Andrey Konovalov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220611195713.131597-1-andrey.konovalov@linaro.org arch/arm64/boot/dts/qcom/qcs404.dtsi | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit bf3708c6734a4bc8e9c538fa586d798c4768bf3f Author: Dmitry Baryshkov Date: Thu May 5 17:51:02 2022 +0300 arm64: dts: qcom: qrb5165-rb5: declare tri-led user leds Qualcomm RB5 platform uses Light Pulse Generator tri-led block to drive three green leds. Add device nodes defining those leds. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220505145102.1432670-4-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 3e48f7428c1e8a4cf2477489d6d0e400c41df28f Author: Dmitry Baryshkov Date: Thu May 5 17:51:01 2022 +0300 arm64: dts: qcom: pm8150l: add Light Pulse Generator device node Add device node defining LPG/PWM block on PM8150L PMIC chip. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220505145102.1432670-3-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/pm8150l.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit efe9185c4e213680b7089931d0b7fc2a3416fe51 Author: Dmitry Baryshkov Date: Thu May 5 17:51:00 2022 +0300 arm64: dts: qcom: pm8150b: add Light Pulse Generator device node Add device node defining LPG/PWM block on PM8150B PMIC chip. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220505145102.1432670-2-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/pm8150b.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3cfe94d660a8ebc19e78ea0a4781d7e9a1054c65 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:17 2022 -0700 arm64: dts: qcom: align led node names with dtschema The node names should be generic and DT schema expects certain pattern with 'led'. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220616005333.18491-24-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts | 4 ++-- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 9d8840f6ee426b6dfcb65bdf39e2898652e2b1e5 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:16 2022 -0700 arm64: dts: qcom: sdm630-sony-xperia-nile: drop unneeded status from gpio-keys Nodes do not need explicit status=okay. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220616005333.18491-23-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi | 1 - 1 file changed, 1 deletion(-) commit 5a4b0b853a2914403746b0a1decab695202ff242 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:15 2022 -0700 arm64: dts: qcom: correct gpio-keys properties gpio-keys children do not use unit addresses. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220616005333.18491-22-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 4 +--- arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 4 +--- arch/arm64/boot/dts/qcom/msm8992-xiaomi-libra.dts | 4 +--- arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami.dtsi | 10 ++++------ arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts | 2 -- arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi | 2 -- arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts | 2 -- 7 files changed, 7 insertions(+), 21 deletions(-) commit b08f5cbd69dcd25f5ab2a0798fe3836a97a9d7c6 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:14 2022 -0700 arm64: dts: qcom: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220616005333.18491-21-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 2 +- arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts | 2 +- arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts | 4 ++-- arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts | 2 +- arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts | 2 +- arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts | 2 +- .../boot/dts/qcom/msm8916-samsung-a2015-common.dtsi | 6 +++--- arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts | 4 ++-- .../boot/dts/qcom/msm8916-samsung-serranove.dts | 6 +++--- .../arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts | 2 +- arch/arm64/boot/dts/qcom/msm8992-xiaomi-libra.dts | 2 +- .../boot/dts/qcom/msm8994-msft-lumia-octagon.dtsi | 10 +++++----- .../boot/dts/qcom/msm8994-sony-xperia-kitakami.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi | 6 +++--- arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts | 20 ++++++++++---------- arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi | 6 +++--- .../boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi | 8 ++++---- arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 2 +- .../arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi | 8 ++++---- arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts | 2 +- arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts | 2 +- arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 4 ++-- arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 2 +- .../arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 2 +- arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 4 ++-- .../dts/qcom/sm6125-sony-xperia-seine-pdx201.dts | 2 +- arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 2 +- arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 4 ++-- .../boot/dts/qcom/sm8150-microsoft-surface-duo.dts | 4 ++-- arch/arm64/boot/dts/qcom/sm8250-hdk.dts | 4 ++-- arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi | 2 +- .../boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi | 2 +- 36 files changed, 71 insertions(+), 71 deletions(-) commit 372cf591acbca3bd9a729742ea4c81d7f99f1b6e Author: Krzysztof Kozlowski Date: Thu May 26 22:42:47 2022 +0200 arm64: dts: qcom: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220526204248.832139-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 10 +++++----- arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 12 ++++++------ arch/arm64/boot/dts/qcom/ipq6018.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts | 2 +- .../arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts | 2 +- arch/arm64/boot/dts/qcom/msm8996.dtsi | 22 +++++++++++----------- arch/arm64/boot/dts/qcom/msm8998.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 2 +- arch/arm64/boot/dts/qcom/sc7180-idp.dts | 2 +- arch/arm64/boot/dts/qcom/sc7180.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sc7280.dtsi | 6 +++--- .../boot/dts/qcom/sdm630-sony-xperia-nile.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm660.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 4 ++-- arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 2 +- .../boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 2 +- arch/arm64/boot/dts/qcom/sdm845.dtsi | 16 ++++++++-------- .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 6 +++--- arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts | 4 ++-- arch/arm64/boot/dts/qcom/sm8150.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- 24 files changed, 60 insertions(+), 60 deletions(-) commit 6dfe4e195271a59f396d414c5fae299eefa5d3da Author: Krzysztof Kozlowski Date: Sat May 21 18:45:50 2022 +0200 arm64: dts: qcom: msm8998-mtp: correct board compatible Add qcom,msm8998 SoC fallback to the board compatible. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521164550.91115-12-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8998-mtp.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 693b6207fc7fbfe81aa9759ef82c3953245641d9 Author: Krzysztof Kozlowski Date: Sat May 21 18:45:49 2022 +0200 arm64: dts: qcom: ipq6018-cp01-c1: fix Micron SPI NOR compatible The proper compatible for Micron n25q128a11 SPI NOR flash should include vendor-prefix. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521164550.91115-11-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74b0fbd6048f8f4caaed712ceeca52c6034e9ad6 Author: Krzysztof Kozlowski Date: Thu May 5 13:38:02 2022 +0200 arm64: dts: qcom: sdm630: correct QFPROM byte offsets The NVMEM bindings expect that 'bits' property holds offset and size of region within a byte, so it applies a constraint of <0, 7> for the offset. Using 25 as HSTX trim offset is within 4-byte QFPROM word, but outside of the byte: sdm630-sony-xperia-nile-discovery.dtb: qfprom@780000: hstx-trim@240:bits:0:0: 25 is greater than the maximum of 7 sdm630-sony-xperia-nile-discovery.dtb: qfprom@780000: gpu-speed-bin@41a0:bits:0:0: 21 is greater than the maximum of 7 Align the offsets to match the bindings. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220505113802.243301-6-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b2eab35be13d4537eb9f0e23846f2ab400bf63dd Author: Krzysztof Kozlowski Date: Thu May 5 13:38:01 2022 +0200 arm64: dts: qcom: use dedicated QFPROM compatibles Use dedicated compatibles for QFPROM on MSM8916, MSM8996, MSM8998, QCS404 and SDM630 which is expected by the bindings: msm8996-mtp.dtb: qfprom@74000: compatible:0: 'qcom,qfprom' is not one of ['qcom,apq8064-qfprom', ... Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220505113802.243301-5-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- arch/arm64/boot/dts/qcom/qcs404.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit d66b1d2e4afc0c8a9eb267740825240b67f6b1d1 Author: Krzysztof Kozlowski Date: Thu May 5 17:47:02 2022 +0200 arm64: dts: qcom: correct SPMI WLED register range encoding On PM660L, PMI8994 and PMI8998, the WLED has two address spaces and with size-cells=0, they should be encoded as two separate items. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220505154702.422108-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/pm660l.dtsi | 2 +- arch/arm64/boot/dts/qcom/pmi8994.dtsi | 2 +- arch/arm64/boot/dts/qcom/pmi8998.dtsi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 6ba93ba9f63fbc44c3a6af7fe6f2536d009cfd5a Author: Krzysztof Kozlowski Date: Wed May 4 15:19:15 2022 +0200 arm64: dts: qcom: add missing AOSS QMP compatible fallback The AOSS QMP bindings expect all compatibles to be followed by fallback "qcom,aoss-qmp" because all of these are actually compatible with each other. This fixes dtbs_check warnings like: sm8250-hdk.dtb: power-controller@c300000: compatible: ['qcom,sm8250-aoss-qmp'] is too short Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220504131923.214367-6-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8150.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8350.dtsi | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 6afcee78b4a495ed970ef3c5104f91ed649d478a Author: Joseph S. Barrera III Date: Sat Jun 25 18:39:06 2022 -0700 arm64: dts: qcom: sc7180: Add kingoftown dts files Kingoftown is a trogdor-based board. These dts files are unchanged copies from the downstream Chrome OS 5.4 kernel. Signed-off-by: Joseph S. Barrera III Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220625183538.v14.5.Ib62291487a664a65066d18a3e83c5428a6d2cc6c@changeid arch/arm64/boot/dts/qcom/Makefile | 2 + .../boot/dts/qcom/sc7180-trogdor-kingoftown-r0.dts | 44 ++++ .../boot/dts/qcom/sc7180-trogdor-kingoftown-r1.dts | 17 ++ .../boot/dts/qcom/sc7180-trogdor-kingoftown.dtsi | 225 +++++++++++++++++++++ 4 files changed, 288 insertions(+) commit fb69f6adaf88a70beb671852bc2842cb79c31059 Author: Joseph S. Barrera III Date: Sat Jun 25 18:39:05 2022 -0700 arm64: dts: qcom: sc7180: Add pazquel dts files Pazquel is a trogdor-based board. These dts files are unchanged copies from the downstream Chrome OS 5.4 kernel. Signed-off-by: Joseph S. Barrera III Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220625183538.v14.4.I41e2c2dc12961fe000ebc4d4ef6f0bc5da1259ea@changeid arch/arm64/boot/dts/qcom/Makefile | 4 + .../dts/qcom/sc7180-trogdor-pazquel-lte-parade.dts | 22 ++ .../dts/qcom/sc7180-trogdor-pazquel-lte-ti.dts | 22 ++ .../dts/qcom/sc7180-trogdor-pazquel-parade.dts | 17 ++ .../boot/dts/qcom/sc7180-trogdor-pazquel-ti.dts | 17 ++ .../boot/dts/qcom/sc7180-trogdor-pazquel.dtsi | 221 +++++++++++++++++++++ 6 files changed, 303 insertions(+) commit 9520fef900494dd202fda5d2b3cfc2cfcb674ad9 Author: Joseph S. Barrera III Date: Sat Jun 25 18:39:04 2022 -0700 arm64: dts: qcom: sc7180: Add mrbland dts files Mrbland is a trogdor-based board. These dts files are copies from the downstream Chrome OS 5.4 kernel, but with downstream bits removed. Signed-off-by: Joseph S. Barrera III Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220625183538.v14.3.I71176ebf7e5aebddb211f00e805b32c08376d1be@changeid arch/arm64/boot/dts/qcom/Makefile | 4 + .../dts/qcom/sc7180-trogdor-mrbland-rev0-auo.dts | 22 ++ .../dts/qcom/sc7180-trogdor-mrbland-rev0-boe.dts | 22 ++ .../boot/dts/qcom/sc7180-trogdor-mrbland-rev0.dtsi | 53 ++++ .../dts/qcom/sc7180-trogdor-mrbland-rev1-auo.dts | 22 ++ .../dts/qcom/sc7180-trogdor-mrbland-rev1-boe.dts | 24 ++ .../boot/dts/qcom/sc7180-trogdor-mrbland.dtsi | 344 +++++++++++++++++++++ 7 files changed, 491 insertions(+) commit c77a3d4a2bfa0957121ec7050e68bfcc73932a52 Author: Joseph S. Barrera III Date: Sat Jun 25 18:39:03 2022 -0700 arm64: dts: qcom: sc7180: Add quackingstick dts files Quackingstick is a trogdor-based board. These dts files are copies from the downstream Chrome OS 5.4 kernel, but with downstream bits removed. Signed-off-by: Joseph S. Barrera III Tested-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220625183538.v14.2.I0977b1a08830d0caa8bfb1bdedb4ecceac709a7f@changeid arch/arm64/boot/dts/qcom/Makefile | 2 + .../qcom/sc7180-trogdor-quackingstick-r0-lte.dts | 38 +++ .../dts/qcom/sc7180-trogdor-quackingstick-r0.dts | 26 ++ .../dts/qcom/sc7180-trogdor-quackingstick.dtsi | 318 +++++++++++++++++++++ 4 files changed, 384 insertions(+) commit e0ff30b23de99f55197692fcb11bee9ba4f2c559 Author: Joseph S. Barrera III Date: Sat Jun 25 18:39:02 2022 -0700 arm64: dts: qcom: sc7180: Add wormdingler dts files Wormdingler is a trogdor-based board, shipping to customers as the Lenovo IdeaPad Chromebook Duet 3. These dts files are copies from the downstream Chrome OS 5.4 kernel, but with the camera (sc7180-trogdor-mipi-camera.dtsi) #include removed. Signed-off-by: Joseph S. Barrera III Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220625183538.v14.1.Id769ddc5dbf570ccb511db96da59f97d08f75a9c@changeid arch/arm64/boot/dts/qcom/Makefile | 6 + .../qcom/sc7180-trogdor-wormdingler-rev0-boe.dts | 22 ++ .../qcom/sc7180-trogdor-wormdingler-rev0-inx.dts | 22 ++ .../dts/qcom/sc7180-trogdor-wormdingler-rev0.dtsi | 53 +++ ...sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts | 29 ++ .../qcom/sc7180-trogdor-wormdingler-rev1-boe.dts | 28 ++ ...sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts | 29 ++ .../qcom/sc7180-trogdor-wormdingler-rev1-inx.dts | 22 ++ .../boot/dts/qcom/sc7180-trogdor-wormdingler.dtsi | 408 +++++++++++++++++++++ 9 files changed, 619 insertions(+) commit 9c54f1711fc2516faf1f8d31217462184157b429 Author: Gwendal Grignou Date: Thu Jun 23 15:31:19 2022 -0700 arm64: dts: qcom: sc7280: Rename sar sensor labels To ease matching configuration of sysfs attributes for particular sensor, match label reported by iio 'label' attribute with the location label generated by ChromeOS config tool. Signed-off-by: Gwendal Grignou Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220623223119.1858863-1-gwendal@chromium.org arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 32c231385ed437bd088d67ce7f505e1784a26430 Author: Johan Hovold Date: Wed Jun 22 15:26:17 2022 +0200 arm64: dts: qcom: sc8280xp: add Lenovo Thinkpad X13s devicetree Add an initial devicetree for the Lenovo Thinkpad X13s with support for USB, backlight, keyboard, touchpad, touchscreen (to be verified), PMICs and remoteprocs. Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220622132617.24604-1-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/Makefile | 1 + .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 386 +++++++++++++++++++++ 2 files changed, 387 insertions(+) commit 519183af39b2cac56614c14f5e710f8caa0bc32a Author: Bjorn Andersson Date: Tue Jun 28 21:14:38 2022 -0700 arm64: dts: qcom: add SA8540P and ADP Introduce the Qualcomm SA8540P automotive platform and the SA8295P ADP development board. The SA8540P and SC8280XP are fairly similar, so the SA8540P is built ontop of the SC8280XP dtsi to reduce duplication. As more advanced features are integrated this might be re-evaluated. This initial contribution supports SMP, CPUFreq, cluster idle, UFS, RPMh regulators, debug UART, PMICs, remoteprocs (NSPs crashes shortly after booting) and USB. The SA8295P ADP contains four PM8450 PMICs, which according to their revid are compatible with PM8150. They are defined within the ADP for now, to avoid creating additional .dtsi files for PM8150 with just addresses changed - and to allow using the labels from the schematics. Signed-off-by: Bjorn Andersson Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20220629041438.1352536-6-bjorn.andersson@linaro.org arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 389 +++++++++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/sa8540p.dtsi | 133 +++++++++++ 3 files changed, 523 insertions(+) commit ccd3517faf18330c051068f07dd8ef79853238c7 Author: Bjorn Andersson Date: Tue Jun 28 21:14:37 2022 -0700 arm64: dts: qcom: sc8280xp: Add reference device Add basic support for the SC8280XP reference device, which allows it to boot to a shell (using EFIFB) with functional storage (UFS), USB, keyboard, touchpad, touchscreen, backlight and remoteprocs. The PMICs are, per socinfo, reused from other platforms. But given that the address of the PMICs doesn't match other cases and that it's desirable to label things according to the schematics a new dtsi file is created to represent the reference combination of PMICs. Signed-off-by: Bjorn Andersson Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20220629041438.1352536-5-bjorn.andersson@linaro.org arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 427 +++++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 109 +++++++ 3 files changed, 537 insertions(+) commit a8d52b024d6d39bb1c3caf8f2b4cf7ca94b4e2ec Author: Jianbo Liu Date: Tue Jun 22 08:25:38 2021 +0000 net/mlx5e: TC, Support offloading police action Add parsing support by implementing struct mlx5e_tc_act for police action. TC rule with police actions is broken down into several rules in different tables. One rule with the original match in the original flow table, which set fte_id, do metering, and jump to the post_meter table. If there are more police actions, more rules are created for each of them. Besides, a last rule is created in the end. In post_meter table, there are two pre-defined rules, one is to drop packet if its packet color is RED, the other is to jump back to post_act table. As fte_id is updated before jumping, the rule for next meter is matched to do another round of metering (if there are multiple meters in the flow rule). Otherwise, last fte_id is matched and do the original actions. Signed-off-by: Jianbo Liu Reviewed-by: Roi Dayan Reviewed-by: Ariel Levkovich Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../ethernet/mellanox/mlx5/core/en/tc/act/act.c | 2 +- .../ethernet/mellanox/mlx5/core/en/tc/act/act.h | 1 + .../ethernet/mellanox/mlx5/core/en/tc/act/police.c | 61 ++++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/en/tc/meter.c | 6 +++ .../net/ethernet/mellanox/mlx5/core/en/tc/meter.h | 9 ++++ .../net/ethernet/mellanox/mlx5/core/en/tc_priv.h | 4 ++ drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 42 +++++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 2 + 9 files changed, 124 insertions(+), 5 deletions(-) commit 03a92a938dc7f3357410b23aae8cef8a8dc81390 Author: Jianbo Liu Date: Tue Mar 1 09:02:19 2022 +0000 net/mlx5e: Add flow_action to parse state As a preparation for validating police action, adds flow_action to parse state, which is to passed to parsing callbacks. Signed-off-by: Jianbo Liu Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/act.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/act.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/trap.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 06fe52a476599f309b230e0f0f8e17ec68b49ae9 Author: Jianbo Liu Date: Fri Jun 18 06:47:15 2021 +0000 net/mlx5e: Add post meter table for flow metering Flow meter object monitors the packets rate for the flows it is attached to, and color packets with GREEN or RED. The post meter table is used to check the color. Packet is dropped if it's RED, or forwarded to post_act table if GREEN. Packet color will be set to 8 LSB of the register C5, so they are reserved for metering, which are previously used for matching fte id. Signed-off-by: Jianbo Liu Reviewed-by: Roi Dayan Reviewed-by: Ariel Levkovich Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 3 +- .../net/ethernet/mellanox/mlx5/core/en/tc/meter.c | 12 ++ .../ethernet/mellanox/mlx5/core/en/tc/post_meter.c | 198 +++++++++++++++++++++ .../ethernet/mellanox/mlx5/core/en/tc/post_meter.h | 27 +++ drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.h | 5 +- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 + drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 1 + 7 files changed, 245 insertions(+), 3 deletions(-) commit 17c5da03879b97da91968e3db58c19e1679e457c Author: Jianbo Liu Date: Mon Nov 1 02:40:28 2021 +0000 net/mlx5e: Add generic macros to use metadata register mapping There are many definitions to get bits and mask for different types of metadata register mapping, add generic macros to unify them. Signed-off-by: Jianbo Liu Reviewed-by: Roi Dayan Reviewed-by: Ariel Levkovich Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c | 6 +++--- drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.h | 6 ++---- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 4 ++++ 5 files changed, 12 insertions(+), 10 deletions(-) commit b8acfd4f21e2d4f41964af0e0a2b24cbbc24440a Author: Jianbo Liu Date: Mon Jun 7 01:40:16 2021 +0000 net/mlx5e: Get or put meter by the index of tc police action Add functions to create and destroy flow meter aso object. This object only supports the range allocation. 64 objects are allocated at a time, and there are two meters in each object. Usually only one meter is allocated for a flow, so bitmap is used to manage these 128 meters. TC police action is mapped to hardware meter. As the index is unique for each police action, add APIs to allocate or free hardware meter by the index. If the meter is already created, increment its refcnt, otherwise create new one. If police action has different parameters, update hardware meter accordingly. Signed-off-by: Jianbo Liu Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en/tc/meter.c | 213 +++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/en/tc/meter.h | 13 ++ 2 files changed, 226 insertions(+) commit 6ddac26cf7633766e4e59d513d81f6fd5afa6fcd Author: Jianbo Liu Date: Mon Jun 7 03:56:05 2021 +0000 net/mlx5e: Add support to modify hardware flow meter parameters The policing rate and burst from user are converted to flow meter parameters in hardware. These parameters are set or modified by ACCESS_ASO WQE, add function to support it. Signed-off-by: Jianbo Liu Reviewed-by: Roi Dayan Reviewed-by: Ariel Levkovich Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en/tc/meter.c | 161 +++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/en/tc/meter.h | 22 +++ drivers/net/ethernet/mellanox/mlx5/core/lib/aso.h | 9 ++ 3 files changed, 192 insertions(+) commit 74e6b2a87433db3034e3b0e2a97706510e960892 Author: Jianbo Liu Date: Wed Jun 9 03:11:58 2021 +0000 net/mlx5e: Prepare for flow meter offload if hardware supports it If flow meter aso object is supported, set the allocated range, and initialize aso wqe. The allocated range is indicated by log_meter_aso_granularity in HW capabilities, and currently is 6. Signed-off-by: Jianbo Liu Reviewed-by: Roi Dayan Reviewed-by: Maor Dickman Reviewed-by: Ariel Levkovich Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../net/ethernet/mellanox/mlx5/core/en/tc/meter.c | 81 ++++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/en/tc/meter.h | 16 +++++ .../net/ethernet/mellanox/mlx5/core/en/tc_priv.h | 2 + drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 3 + drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 25 +++++++ drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 1 + 7 files changed, 129 insertions(+), 1 deletion(-) commit c491ded04325b92fa1cc4af678154cb02fec0ae4 Author: Jianbo Liu Date: Fri Apr 29 07:46:47 2022 +0000 net/mlx5: Implement interfaces to control ASO SQ and CQ Add interfaces to use ASO object control channel. The channel consists of a control SQ and CQ to which user can post ACCESS_ASO work requests to modify ASO objects. The functions to get wqe from SQ, fill wqe, post the request, and poll the completion of the work, are provided. Signed-off-by: Jianbo Liu Reviewed-by: Ariel Levkovich Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/lib/aso.c | 97 +++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/lib/aso.h | 65 +++++++++++++++ 2 files changed, 162 insertions(+) commit cdd04f4d4d71cbf93d0d9abe63bc838f47c467fa Author: Jianbo Liu Date: Sat Apr 30 14:31:28 2022 +0000 net/mlx5: Add support to create SQ and CQ for ASO Add a separate API to create SQ and CQ for advanced steering operations (ASO). Since the mlx5_en API to create these resources is strongly coupled with netdev channels and datapath elements, this API provides an alternative for creating send queues that are used for ASO. Currently the API allows creating channels with 2 wqbbs only - meaning the support will be for a single ACCESS_ASO wqe with data at a time. Signed-off-by: Jianbo Liu Reviewed-by: Ariel Levkovich Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mellanox/mlx5/core/lib/aso.c | 336 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/lib/aso.h | 13 + 3 files changed, 350 insertions(+), 1 deletion(-) commit b6f2846afc0c3dafd58452a74a51499734d9f451 Author: Chris Mi Date: Mon May 30 05:06:05 2022 +0300 net/mlx5: E-switch: Change eswitch mode only via devlink command Enable or disable switchdev according to the eswitch mode set by devlink command. So it is not changed by other functions anymore. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 18 +++++------------- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 2 +- .../net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 17 +++++++++-------- 3 files changed, 15 insertions(+), 22 deletions(-) commit f019679ea5f2ab650c3348a79e7d9c3625f62899 Author: Chris Mi Date: Mon May 30 06:07:57 2022 +0300 net/mlx5: E-switch, Remove dependency between sriov and eswitch mode Currently, there are three eswitch modes, none, legacy and switchdev. None is the default mode. Remove redundant none mode as eswitch mode should always be either legacy mode or switchdev mode. With this patch, there are two behavior changes: 1. Legacy becomes the default mode. When querying eswitch mode using devlink, a valid mode is always returned. 2. When disabling sriov, the eswitch mode will not change, only vfs are unloaded. Signed-off-by: Chris Mi Reviewed-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 87 ++++++++++++++-------- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 9 ++- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 52 ++++--------- drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 10 +-- drivers/net/ethernet/mellanox/mlx5/core/main.c | 1 + .../net/ethernet/mellanox/mlx5/core/sf/devlink.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 3 +- include/linux/mlx5/eswitch.h | 8 +- 8 files changed, 89 insertions(+), 83 deletions(-) commit fbd43b7259bc699e540ef8e7eb81631d57618a2e Author: Chris Mi Date: Thu May 5 09:23:39 2022 +0300 net/mlx5: E-switch, Introduce flag to indicate if fdb table is created Introduce flag to indicate if fdb table is created as a pre-step to prepare for removing dependency between sriov and eswitch mode in the downstream patches. Signed-off-by: Chris Mi Reviewed-by: Mark Bloch Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 3 +++ drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 9 +++++++++ 2 files changed, 12 insertions(+) commit ea5872dd6b052dc0dcb4974b314ffac739c535c4 Author: Chris Mi Date: Thu Feb 10 09:22:04 2022 +0200 net/mlx5: E-switch, Introduce flag to indicate if vport acl namespace is created Eswitch vport acl namespace is needed when loading vfs. There is no need to free and reallocate it when switching eswitch mode. Introduce flag to indicate if it is created or not. When needed, create it. Only free it when the driver is unloaded or in bare metal mode. Signed-off-by: Chris Mi Reviewed-by: Mark Bloch Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 5 +++++ drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 1 + 2 files changed, 6 insertions(+) commit 8e755f7a8cef6c3b64c5bdac2c8a3d6efb9f916c Author: Dan Carpenter Date: Mon May 30 14:40:42 2022 +0300 net/mlx5: delete dead code in mlx5_esw_unlock() Smatch complains about this function: drivers/net/ethernet/mellanox/mlx5/core/eswitch.c:2000 mlx5_esw_unlock() warn: inconsistent returns '&esw->mode_lock'. Before commit ec2fa47d7b98 ("net/mlx5: Lag, use lag lock") there used to be a matching mlx5_esw_lock() function and the lock and unlock functions were symmetric. But now we take the lock unconditionally and must unlock unconditionally as well. As near as I can tell this is dead code and can just be deleted. Signed-off-by: Dan Carpenter Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 2 -- 1 file changed, 2 deletions(-) commit 9de64ae8160df782de011dc6f1ddb63cdafbb939 Author: Leon Romanovsky Date: Wed May 11 15:00:01 2022 +0300 net/mlx5: Delete ipsec_fs header file as not used ipsec_fs.h is not used and can be safely deleted. Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.h | 21 --------------------- 1 file changed, 21 deletions(-) commit 8e60a041e4782189486bab8e0f542325b8f4b7d5 Merge: f3f6631bb0d9 c8fac9d0aa5a Author: David S. Miller Date: Sat Jul 2 16:34:05 2022 +0100 Merge branch 'lan937x-dsa-driver' Arun Ramadoss says: ==================== net: dsa: microchip: DSA Driver support for LAN937x LAN937x is a Multi-Port 100BASE-T1 Ethernet Physical Layer switch compliant with the IEEE 802.3bw-2015 specification. The device provides 100 Mbit/s transmit and receive capability over a single Unshielded Twisted Pair (UTP) cable. LAN937x is successive revision of KSZ series switch. This series of patches provide the DSA driver support for Microchip LAN937X switch through MII/RMII interface. The RGMII interface support will be added in the follow up series. LAN937x uses the most of functionality of KSZ9477. The LAN937x switch series family consists of following SKUs: LAN9370: - 4 T1 Phys - 1 RGMII port LAN9371: - 3 T1 Phys & 1 TX Phy - 2 RGMII ports LAN9372: - 5 T1 Phys & 1 TX Phy - 2 RGMII ports LAN9373: - 5 T1 Phys - 2 RGMII - 1 SGMII port LAN9374: - 6 T1 Phys - 2 RGMII ports Changes in v15: - fixed compilation issue. - Updated the phylink_mac_link_up to check only for 10/100/1000 speed. Changes in v14: - Updated the patch series to latest ksz code refactoring. - RGMII register configuration is removed from the series. It will be added in the follow up patch series. Changes in v13: - Fixed the compilation issue in patch 5 and 6 Changes in v12: - Removed the reduntant spi indirect enable in lan937x_init - Used the ksz_port_stp_state_set function - Apply rgmii internal delay only if it is rgmii port - Set the bit for 100baseTx in phylink_get_caps - Moved the ethtool related API from patch 5 to 7 - Moved lan_alu_entry struct in lan937x_dev.h from patch 5 to 9 - Moved lan_vlan_entry in lan937x_dev.h from patch 5 to 10 - Used the ksz_get_stats64 function for get_stats64 hook - Splitted the patch 5. one for port configuration, spi driver, phy read & write and mtu configuration. - Updated the indentation in ethernet-controller.yaml - lan937x.yaml: Removed the blank lines, updated the ethernet handle to macb0. Added the rgmii internal delay only for the ports. Changes in v11: - Tagged as RFC to get the feedback for the subpatches 1/10, 5/10 and 6/10 Changes in v10: - dsa.yaml: dropped moving mdio properties to dsa.yaml as per the feedback https://patchwork.kernel.org/project/netdevbpf/patch/20220318085540.281721-3-prasanna.vengateshan@microchip.com/#24787466 - microchip,lan937x.yaml: Naming convention changes in the example - lan937x_main.c: Moving configurations from lan937x_reset_switch() to setup() - lan937x_main.c: helper function has been introduced for lan937x_internal_phy_read & write - lan937x_dev.h: lan_alu_struct struct data type changes - lan937x_main.c: lan937x_get_stats64 make non blocking - lan937x_main.c: modified lan937x_port_mirror_add to include extack Changes in v9: - lan937x_main.c: of_node_put() correction in lan937x_parse_dt_rgmii_delay - lan937x_dev.c: removed the interface checks from lan937x_apply_rgmii_delay. - changes in ethernet-controller.yaml and dsa.yaml Changes in v8: - lan937x_dev.c: fixed lan937x_r_mib_pkt warning in the sub patches - lan937x_main.c: phylink_autoneg_inband() check removed in lan937x_phylink_mac_link_up() - lan937x_main.c: made legacy_pre_march2020 = false as this is non-legacy driver and indentation correction in lan937x_phylink_mac_link_up() - removed unnecessary parenthesis in lan937x_get_strings() Changes in v7: - microchip,lan937x.yaml: *-internal-delay-ps enum values & commit messages corrections - lan937x_main.c: removed phylink_validate() and added phylink_get_caps() - lan937x_main.c: added support for ethtool standard stats (get_eth_*_stats and get_stats64) - lan937x_main.c: removed unnecessary PVID read from lan937x_port_vlan_del() - integrated the changes of ksz9477 multi bridging support to lan937x dev and tested both multi bridging and STP - lan937x_port_vlan_del - dummy pvid read removed Changes in v6: - microchip_t1.c: There was new merge done in the net-next tree for microchip_1.c after the v5 submission. Hence rebased it for v6. Changes in v5: - microchip,lan937x.yaml: Added mdio properties detail - microchip,lan937x.yaml: *-internal-delay-ps added under port node - lan937x_dev.c: changed devm_mdiobus_alloc from of_mdiobus_register as suggested by Vladimir - lan937x_dev.c: added dev_info for rgmii internal delay & error message to user in case of out of range values - lan937x_dev.c: return -EOPNOTSUPP for C45 regnum values for lan937x_sw_mdio_read & write operations - return from function with out storing in a variable - lan937x_main.c: Added vlan_enable info in vlan_filtering API - lan937x_main.c: lan937x_port_vlan_del: removed unintended PVID write Changes in v4: - tag_ksz.c: cpu_to_be16 to put_unaligned_be16 - correct spacing in comments - tag_ksz.c: NETIF_F_HW_CSUM fix is integrated - lan937x_dev.c: mdio_np is removed from global and handled locally - lan937x_dev.c: unused functions removed lan937x_cfg32 & lan937x_port_cfg32 - lan937x_dev.c: lan937x_is_internal_100BTX_phy_port function name changes - lan937x_dev.c: RGMII internal delay handling for MAC. Delay values are retrieved from DTS and updated - lan937x_dev.c: corrected mutex operations for few dev variables - microchip,lan937x.yaml: introduced rx-internal-delay-ps & tx-internal-delay-ps for RGMII internal delay - lan937x_dev.c: Unnecessary mutex_lock has been removed - lan937x_main.c: PHY_INTERFACE_MODE_NA handling for lan937x_phylink_validate - lan937x_main.c: PORT_MIRROR_SNIFFER check in right place - lan937x_main.c: memset is used instead of writing 0's individually in lan937x_port_fdb_add function - lan937x_main.c: Removed \n from NL_SET_ERR_MSG_MOD calls Changes in v3: - Removed settings of cnt_ptr to zero and the memset() added a cleanup patch which moves this into ksz_init_mib_timer(). - Used ret everywhere instead of rc - microchip,lan937x.yaml: Remove mdio compatible - microchip_t1.c: Renaming standard phy registers - tag_ksz.c: LAN937X_TAIL_TAG_OVERRIDE renaming LAN937X_TAIL_TAG_BLOCKING_OVERRIDE - tag_ksz.c: Changed Ingress and Egress naming convention based on Host - tag_ksz.c: converted to skb_mac_header(skb) from (is_link_local_ether_addr(hdr->h_dest)) - lan937x_dev.c: Removed BCAST Storm protection settings since we have Tc commands for them - lan937x_dev.c: Flow control setting in lan937x_port_setup function - lan937x_dev.c: RGMII internal delay added only for cpu port, - lan937x_dev.c: of_get_compatible_child(node, "microchip,lan937x-mdio") to of_get_child_by_name(node, "mdio"); - lan937x_dev.c:lan937x_get_interface API: returned PHY_INTERFACE_MODE_INTERNAL instead of PHY_INTERFACE_MODE_NA - lan937x_main.c: Removed compat interface implementation in lan937x_config_cpu_port() API & dev_info corrected as well - lan937x_main.c: deleted ds->configure_vlan_while_not_filtering = true - lan937x_main.c: Added explanation for lan937x_setup lines - lan937x_main.c: FR_MAX_SIZE correction in lan937x_get_max_mtu API - lan937x_main.c: removed lan937x_port_bridge_flags dummy functions - lan937x_spi.c - mdiobus_unregister to be added to spi_remove function - lan937x_main.c: phy link layer changes - lan937x_main.c: port mirroring: sniff port selection limiting to one port - lan937x_main.c: Changed to global vlan filtering - lan937x_main.c: vlan_table array to structure - lan937x_main.c -Use extack instead of reporting errors to Console - lan937x_main.c - Remove cpu_port addition in vlan_add api - lan937x_main.c - removed pvid resetting Changes in v2: - return check for register read/writes - dt compatible compatible check is added against chip id value - lan937x_internal_t1_tx_phy_write() is renamed to lan937x_internal_phy_write() - lan937x_is_internal_tx_phy_port is renamed to lan937x_is_internal_100BTX_phy_port as it is 100Base-Tx phy - Return value for lan937x_internal_phy_write() is -EOPNOTSUPP in case of failures - Return value for lan937x_internal_phy_read() is 0xffff for non existent phy - cpu_port checking is removed from lan937x_port_stp_state_set() - lan937x_phy_link_validate: 100baseT_Full to 100baseT1_Full - T1 Phy driver is moved to drivers/net/phy/microchip_t1.c - Tx phy driver support will be added later - Legacy switch checkings in dts file are removed. - tag_ksz.c: Re-used ksz9477_rcv for lan937x_rcv - tag_ksz.c: Xmit() & rcv() Comments are corrected w.r.to host - net/dsa/Kconfig: Family skew numbers altered in ascending order - microchip,lan937x.yaml: eth is replaced with ethernet - microchip,lan937x.yaml: spi1 is replaced with spi - microchip,lan937x.yaml: cpu labelling is removed - microchip,lan937x.yaml: port@x value will match the reg value now ==================== commit c8fac9d0aa5a5395100fc01aba03b95e96db6831 Author: Arun Ramadoss Date: Fri Jul 1 20:46:00 2022 +0530 net: dsa: microchip: add LAN937x in the ksz spi probe This patch add the LAN937x part support in the existing ksz_spi_probe. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz_spi.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit a0cb1aa43825f064a803b8b469c13bb0ec337997 Author: Arun Ramadoss Date: Fri Jul 1 20:42:03 2022 +0530 net: dsa: microchip: lan937x: add phylink_mac_config support This patch add support for phylink_mac_config dsa hook. It configures the mac for MII/RMII modes. The RGMII mode will be added in the future patches. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz_common.c | 12 +++++++ drivers/net/dsa/microchip/ksz_common.h | 3 ++ drivers/net/dsa/microchip/lan937x.h | 3 ++ drivers/net/dsa/microchip/lan937x_main.c | 58 ++++++++++++++++++++++++++++++-- 4 files changed, 74 insertions(+), 2 deletions(-) commit f597d3ad75b85083f6f129a7ee25da2b67efefce Author: Arun Ramadoss Date: Fri Jul 1 20:41:24 2022 +0530 net: dsa: microchip: lan937x: add phylink_mac_link_up support This patch add support for phylink_mac_link_up. It configures the mac for the speed, flow control and duplex mode. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz_common.c | 16 +++++++++++ drivers/net/dsa/microchip/ksz_common.h | 5 ++++ drivers/net/dsa/microchip/lan937x.h | 4 +++ drivers/net/dsa/microchip/lan937x_main.c | 46 ++++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/lan937x_reg.h | 11 ++++++++ 5 files changed, 82 insertions(+) commit c14e878d4a4f6f5e1f58e83ac25363a1b80fa374 Author: Arun Ramadoss Date: Fri Jul 1 20:40:34 2022 +0530 net: dsa: microchip: lan937x: add phylink_get_caps support The internal phy of the LAN937x are capable of 100Mbps Full duplex. The xMII port of switch is capable of 10Mbps Full & Half Duplex, 100Mbps Full & Half Duplex and 1000Mbps Half duplex. xMII port also supports Tx and Rx Flow control. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz_common.c | 1 + drivers/net/dsa/microchip/lan937x.h | 2 ++ drivers/net/dsa/microchip/lan937x_main.c | 12 ++++++++++++ 3 files changed, 15 insertions(+) commit ab8823688f9e4adb0d423d5659df619806c8d15c Author: Arun Ramadoss Date: Fri Jul 1 20:39:54 2022 +0530 net: dsa: microchip: lan937x: add MTU and fast_age support This patch add the support for port_max_mtu, port_change_mtu and port_fast_age dsa functionality. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz_common.c | 2 ++ drivers/net/dsa/microchip/lan937x.h | 1 + drivers/net/dsa/microchip/lan937x_main.c | 28 ++++++++++++++++++++++++++++ drivers/net/dsa/microchip/lan937x_reg.h | 5 +++++ 4 files changed, 36 insertions(+) commit a50b35366c646ed6735d996480f57d8d16e707ff Author: Arun Ramadoss Date: Fri Jul 1 20:37:09 2022 +0530 net: dsa: microchip: lan937x: register mdio-bus This patch register mdio-bus for the lan937x series switch. mdio read and write uses the vphy for accessing the phy register. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/lan937x_main.c | 74 ++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit ffaf1de2f62d2e783a169976846d9fe6c11e8b64 Author: Arun Ramadoss Date: Fri Jul 1 20:36:29 2022 +0530 net: dsa: microchip: lan937x: add phy read and write support This patch add support for the writing and reading of the phy registers. LAN937x uses the Vphy indirect addressing method for accessing the phys. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz_common.c | 2 + drivers/net/dsa/microchip/lan937x.h | 2 + drivers/net/dsa/microchip/lan937x_main.c | 116 +++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/lan937x_reg.h | 36 ++++++++++ 4 files changed, 156 insertions(+) commit 99b16df0cd5236f4cb69d8732b96e436a23a220b Author: Arun Ramadoss Date: Fri Jul 1 20:32:23 2022 +0530 net: dsa: microchip: lan937x: add dsa_tag_protocol This patch update the ksz_get_tag_protocol to return LAN937x specific tag if the chip id matches one of LAN937x series switch Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz_common.c | 3 +++ drivers/net/dsa/microchip/ksz_common.h | 9 +++++++++ 2 files changed, 12 insertions(+) commit 55ab6ffaf378d6a5ed9682f24fec4b947eb29930 Author: Arun Ramadoss Date: Fri Jul 1 20:31:46 2022 +0530 net: dsa: microchip: add DSA support for microchip LAN937x Basic DSA driver support for lan937x and the device will be configured through SPI interface. It adds the lan937x_dev_ops in ksz_common.c file and tries to reuse the functionality of ksz9477 series switch. drivers/net/dsa/microchip/ path is already part of MAINTAINERS & the new files come under this path. Hence no update needed to the MAINTAINERS Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/Kconfig | 2 +- drivers/net/dsa/microchip/Makefile | 1 + drivers/net/dsa/microchip/ksz_common.c | 34 +++++++ drivers/net/dsa/microchip/lan937x.h | 15 +++ drivers/net/dsa/microchip/lan937x_main.c | 154 +++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/lan937x_reg.h | 128 +++++++++++++++++++++++++ 6 files changed, 333 insertions(+), 1 deletion(-) commit 457c182af597a5a2a9c1c4d12beac1ff35ee76e2 Author: Arun Ramadoss Date: Fri Jul 1 20:31:01 2022 +0530 net: dsa: microchip: generic access to ksz9477 static and reserved table The ksz9477 and lan937x has few difference in the static and reserved table register 0x041C. For the ksz9477 if the bit 0 is 1 - read operation and 0 - write operation. But for lan937x bit 1:0 used for selecting the read/write operation, 01 - write and 10 - read. To use ksz9477 mdb add/del and enable_stp_addr for the lan937x, masks & shifts are introduced for ksz9477 & lan937x in ksz_common.c. Then updated the function with masks & shifts based on the switch instead of hard coding it. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477.c | 27 ++++++++++++++++++------- drivers/net/dsa/microchip/ksz9477_reg.h | 3 --- drivers/net/dsa/microchip/ksz_common.c | 35 +++++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 3 +++ 4 files changed, 58 insertions(+), 10 deletions(-) commit 092f875131dcdbd8f48b2ece9416225a141e656b Author: Prasanna Vengateshan Date: Fri Jul 1 20:30:20 2022 +0530 net: dsa: tag_ksz: add tag handling for Microchip LAN937x The Microchip LAN937X switches have a tagging protocol which is very similar to KSZ tagging. So that the implementation is added to tag_ksz.c and reused common APIs Signed-off-by: Prasanna Vengateshan Signed-off-by: Arun Ramadoss Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 2 ++ net/dsa/Kconfig | 4 ++-- net/dsa/tag_ksz.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 2 deletions(-) commit 8926d94e5c50fbe21fe957dc0220acb67e15bf82 Author: Prasanna Vengateshan Date: Fri Jul 1 20:27:03 2022 +0530 dt-bindings: net: dsa: dt bindings for microchip lan937x Documentation in .yaml format and updates to the MAINTAINERS Also 'make dt_binding_check' is passed. RGMII internal delay values for the mac is retrieved from rx-internal-delay-ps & tx-internal-delay-ps as per the feedback from v3 patch series. https://lore.kernel.org/netdev/20210802121550.gqgbipqdvp5x76ii@skbuf/ It supports only the delay value of 0ns and 2ns. Signed-off-by: Prasanna Vengateshan Signed-off-by: Arun Ramadoss Reviewed-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller .../bindings/net/dsa/microchip,lan937x.yaml | 192 +++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 193 insertions(+) commit 528f7f1fadf1c2745f62df16948c99835a5db94d Author: Prasanna Vengateshan Date: Fri Jul 1 20:16:40 2022 +0530 dt-bindings: net: make internal-delay-ps based on phy-mode *-internal-delay-ps properties would be applicable only for RGMII interface modes. It is changed as per the request. Ran dt_binding_check to confirm nothing is broken. link: https://lore.kernel.org/netdev/d8e5f6a8-a7e1-dabd-f4b4-ea8ea21d0a1d@gmail.com/ Signed-off-by: Prasanna Vengateshan Signed-off-by: Arun Ramadoss Reviewed-by: Andrew Lunn Reviewed-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller .../bindings/net/ethernet-controller.yaml | 35 ++++++++++++++-------- 1 file changed, 23 insertions(+), 12 deletions(-) commit f3f6631bb0d96747d664b81fbeaed7ededdb4227 Merge: 504148fedb85 a516b7f7ca53 Author: David S. Miller Date: Sat Jul 2 16:30:44 2022 +0100 Merge branch 'lan8814-led' Divya Koppera says: ==================== net: LED feature for LAN8814 PHY Enable LED mode configuration for LAN8814 PHY v2 -> v3: - Fixed compilation issues v1 -> v2: - Updated dt-bindings for micrel,led-mode in LAN8814 PHY ==================== Signed-off-by: David S. Miller commit a516b7f7ca530c1fedc56d0dfba5b237798b9de1 Author: Divya Koppera Date: Fri Jul 1 09:27:09 2022 +0530 net: phy: micrel: Adding LED feature for LAN8814 PHY LED support for extended mode where LED 1: Enhanced Mode 5 (10M/1000M/Activity) LED 2: Enhanced Mode 4 (100M/1000M/Activity) By default it supports KSZ9031 LED mode Signed-off-by: Divya Koppera Signed-off-by: David S. Miller drivers/net/phy/micrel.c | 73 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 56 insertions(+), 17 deletions(-) commit eb566fc83920a4288512c454e0b224104906c437 Author: Divya Koppera Date: Fri Jul 1 09:27:08 2022 +0530 dt-bindings: net: Updated micrel,led-mode for LAN8814 PHY Enable led-mode configuration for LAN8814 phy Signed-off-by: Divya Koppera Acked-by: Rob Herring Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/micrel.txt | 1 + 1 file changed, 1 insertion(+) commit 504148fedb854299972d164b001357b888a9193e Author: Eric Dumazet Date: Thu Jun 30 15:07:50 2022 +0000 net: add skb_[inner_]tcp_all_headers helpers Most drivers use "skb_transport_offset(skb) + tcp_hdrlen(skb)" to compute headers length for a TCP packet, but others use more convoluted (but equivalent) ways. Add skb_tcp_all_headers() and skb_inner_tcp_all_headers() helpers to harmonize this a bit. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/infiniband/ulp/ipoib/ipoib_ib.c | 2 +- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 6 ++--- drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 9 ++++--- drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 8 +++--- drivers/net/ethernet/atheros/atlx/atl1.c | 7 +++-- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 17 +++++------- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 7 ++--- drivers/net/ethernet/broadcom/tg3.c | 2 +- drivers/net/ethernet/brocade/bna/bnad.c | 6 ++--- drivers/net/ethernet/cadence/macb_main.c | 2 +- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 4 +-- drivers/net/ethernet/chelsio/cxgb4/sge.c | 2 +- .../chelsio/inline_crypto/ch_ktls/chcr_ktls.c | 6 ++--- drivers/net/ethernet/cisco/enic/enic_main.c | 5 ++-- drivers/net/ethernet/emulex/benet/be_main.c | 6 ++--- drivers/net/ethernet/freescale/fec_main.c | 2 +- drivers/net/ethernet/fungible/funeth/funeth_tx.c | 2 +- drivers/net/ethernet/google/gve/gve_tx_dqo.c | 4 +-- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 6 ++--- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 +-- drivers/net/ethernet/hisilicon/hns3/hns3_trace.h | 3 +-- drivers/net/ethernet/ibm/ehea/ehea_main.c | 2 +- drivers/net/ethernet/intel/e1000/e1000_main.c | 4 +-- drivers/net/ethernet/intel/e1000e/netdev.c | 4 +-- drivers/net/ethernet/intel/ixgb/ixgb_main.c | 2 +- drivers/net/ethernet/marvell/mv643xx_eth.c | 2 +- drivers/net/ethernet/marvell/mvneta.c | 4 +-- .../net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 4 +-- drivers/net/ethernet/marvell/sky2.c | 2 +- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 4 +-- .../ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 4 +-- drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 2 +- drivers/net/ethernet/netronome/nfp/nfd3/dp.c | 5 ++-- drivers/net/ethernet/netronome/nfp/nfdk/dp.c | 5 ++-- .../net/ethernet/netronome/nfp/nfp_net_common.c | 7 +++-- drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 5 ++-- .../net/ethernet/qlogic/netxen/netxen_nic_main.c | 2 +- drivers/net/ethernet/qlogic/qede/qede_fp.c | 8 +++--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 2 +- drivers/net/ethernet/qualcomm/emac/emac-mac.c | 4 +-- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- drivers/net/ethernet/synopsys/dwc-xlgmac-net.c | 2 +- drivers/net/wireless/ath/wil6210/txrx.c | 4 +-- drivers/net/xen-netback/netback.c | 4 +-- drivers/staging/qlge/qlge_main.c | 2 +- include/linux/tcp.h | 30 ++++++++++++++++++++++ net/tls/tls_device_fallback.c | 6 ++--- 48 files changed, 119 insertions(+), 115 deletions(-) commit 5074376822fe99fa4ce344b851c5016d00c0444f Author: Christophe JAILLET Date: Sat Jun 18 19:08:05 2022 +0200 drm/rockchip: Fix an error handling path rockchip_dp_probe() Should component_add() fail, we should call analogix_dp_remove() in the error handling path, as already done in the remove function. Fixes: 152cce0006ab ("drm/bridge: analogix_dp: Split bind() into probe() and real bind()") Signed-off-by: Christophe JAILLET Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/b719d9061bb97eb85145fbd3c5e63f4549f2e13e.1655572071.git.christophe.jaillet@wanadoo.fr drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 1449110b0dade8b638d2c17ab7c5b0ff696bfccb Author: Brian Norris Date: Fri Jun 17 17:26:52 2022 -0700 drm/rockchip: vop: Don't crash for invalid duplicate_state() It's possible for users to try to duplicate the CRTC state even when the state doesn't exist. drm_atomic_helper_crtc_duplicate_state() (and other users of __drm_atomic_helper_crtc_duplicate_state()) already guard this with a WARN_ON() instead of crashing, so let's do that here too. Fixes: 4e257d9eee23 ("drm/rockchip: get rid of rockchip_drm_crtc_mode_config") Signed-off-by: Brian Norris Reviewed-by: Sean Paul Reviewed-by: Douglas Anderson Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20220617172623.1.I62db228170b1559ada60b8d3e1637e1688424926@changeid drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 +++ 1 file changed, 3 insertions(+) commit e3baced02a521a6f213b29053db76394aa22d5e1 Author: Yang Li Date: Wed Jun 15 09:20:39 2022 +0800 9p: Fix some kernel-doc comments Remove warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'. fs/9p/fid.c:35: warning: Function parameter or member 'pfid' not described in 'v9fs_fid_add' fs/9p/fid.c:35: warning: Excess function parameter 'fid' description in 'v9fs_fid_add' fs/9p/fid.c:80: warning: Function parameter or member 'pfid' not described in 'v9fs_open_fid_add' fs/9p/fid.c:80: warning: Excess function parameter 'fid' description in 'v9fs_open_fid_add' Link: https://lkml.kernel.org/r/20220615012039.43479-1-yang.lee@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Yang Li [Dominique: further adjust comment] Signed-off-by: Dominique Martinet fs/9p/fid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dafbe689736f62c696ac64809b17bdc752cfbe76 Author: Dominique Martinet Date: Sun Jun 12 16:05:39 2022 +0900 9p fid refcount: cleanup p9_fid_put calls Simplify p9_fid_put cleanup path in many 9p functions since the function is noop on null or error fids. Also make the *_add_fid() helpers "steal" the fid by nulling its pointer, so put after them will be noop. This should lead to no change of behaviour Link: https://lkml.kernel.org/r/20220612085330.1451496-7-asmadeus@codewreck.org Reviewed-by: Tyler Hicks Signed-off-by: Dominique Martinet fs/9p/fid.c | 24 +++++++++++++------- fs/9p/fid.h | 4 ++-- fs/9p/vfs_file.c | 5 +++-- fs/9p/vfs_inode.c | 61 ++++++++++++++++++++------------------------------ fs/9p/vfs_inode_dotl.c | 58 +++++++++++++++-------------------------------- fs/9p/vfs_super.c | 2 +- 6 files changed, 64 insertions(+), 90 deletions(-) commit 286c171b86ebc693e18b485dde3a3fc470af37bd Author: Dominique Martinet Date: Mon Jun 13 08:32:06 2022 +0900 9p fid refcount: add a 9p_fid_ref tracepoint This adds a tracepoint event for 9p fid lifecycle tracing: when a fid is created, its reference count increased/decreased, and freed. The new 9p_fid_ref tracepoint should help anyone wishing to debug any fid problem such as missing clunk (destroy) or use-after-free. Link: https://lkml.kernel.org/r/20220612085330.1451496-6-asmadeus@codewreck.org Signed-off-by: Dominique Martinet include/net/9p/client.h | 13 +++++++++++++ include/trace/events/9p.h | 48 +++++++++++++++++++++++++++++++++++++++++++++++ net/9p/client.c | 20 +++++++++++++++++++- 3 files changed, 80 insertions(+), 1 deletion(-) commit b48dbb998d70b7f48c2ec0a15c3cf47136808e4e Author: Dominique Martinet Date: Sun Jun 12 13:42:32 2022 +0900 9p fid refcount: add p9_fid_get/put wrappers I was recently reminded that it is not clear that p9_client_clunk() was actually just decrementing refcount and clunking only when that reaches zero: make it clear through a set of helpers. This will also allow instrumenting refcounting better for debugging next patch Link: https://lkml.kernel.org/r/20220612085330.1451496-5-asmadeus@codewreck.org Reviewed-by: Tyler Hicks Reviewed-by: Christian Schoenebeck Signed-off-by: Dominique Martinet fs/9p/fid.c | 18 +++++++++--------- fs/9p/fid.h | 2 +- fs/9p/vfs_addr.c | 4 ++-- fs/9p/vfs_dentry.c | 4 ++-- fs/9p/vfs_dir.c | 2 +- fs/9p/vfs_file.c | 4 ++-- fs/9p/vfs_inode.c | 48 ++++++++++++++++++++++++------------------------ fs/9p/vfs_inode_dotl.c | 42 +++++++++++++++++++++--------------------- fs/9p/vfs_super.c | 6 +++--- fs/9p/xattr.c | 8 ++++---- include/net/9p/client.h | 28 ++++++++++++++++++++++++++++ net/9p/client.c | 15 +++------------ 12 files changed, 100 insertions(+), 81 deletions(-) commit b296d05746b7fa0d663e3b11abf0e03eab6e03e6 Author: Tyler Hicks Date: Thu May 26 19:00:03 2022 -0500 9p: Fix minor typo in code comment Fix s/patch/path/ typo and make it clear that we're talking about multiple path components. Link: https://lkml.kernel.org/r/20220527000003.355812-6-tyhicks@linux.microsoft.com Signed-off-by: Tyler Hicks Signed-off-by: Dominique Martinet fs/9p/fid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47b1e3432b06c17b2d123b7ad30f04dd97b6d6f7 Author: Tyler Hicks Date: Thu May 26 19:00:02 2022 -0500 9p: Remove unnecessary variable for old fids while walking from d_parent Remove the ofid variable that's local to the conditional block in favor of the old_fid variable that's local to the entire function. Link: https://lkml.kernel.org/r/20220527000003.355812-5-tyhicks@linux.microsoft.com Signed-off-by: Tyler Hicks Signed-off-by: Dominique Martinet fs/9p/fid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c58c72d301d3d16ba1167d56417af39761829030 Author: Tyler Hicks Date: Thu May 26 19:00:01 2022 -0500 9p: Make the path walk logic more clear about when cloning is required Cloning during a path component walk is only needed when the old fid used for the walk operation is the root fid. Make that clear by comparing the two fids rather than using an additional variable. Link: https://lkml.kernel.org/r/20220527000003.355812-4-tyhicks@linux.microsoft.com Signed-off-by: Tyler Hicks Signed-off-by: Dominique Martinet fs/9p/fid.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit cba83f47fc0ef52638870890e9e352afcc56dd73 Author: Tyler Hicks Date: Thu May 26 19:00:00 2022 -0500 9p: Track the root fid with its own variable during lookups Improve readability by using a new variable when dealing with the root fid. The root fid requires special handling in comparison to other fids used during fid lookup. Link: https://lkml.kernel.org/r/20220527000003.355812-3-tyhicks@linux.microsoft.com Signed-off-by: Tyler Hicks Signed-off-by: Dominique Martinet fs/9p/fid.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit ba7e421eee0f98fb2f6aedc83bc5231df64556a1 Author: David E. Box Date: Wed Jun 29 15:13:33 2022 -0700 platform/x86/intel/pmt: telemetry: Fix fixed region handling Use the telem_type and the fixed block guid to determine if an entry is a fixed region. For certain platforms we don't support this. Cc: Srinivas Pandruvada Signed-off-by: David E. Box Signed-off-by: Gayatri Kammela Link: https://lore.kernel.org/r/20220629221334.434307-4-gayatri.kammela@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/intel/pmt/telemetry.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 99de05043e77cdecc34c09e4fabffdc6d9147c80 Author: David E. Box Date: Wed Jun 29 15:13:32 2022 -0700 platform/x86/intel/vsec: Add support for Raptor Lake Add Raptor Lake support to Intel's PMT driver. Cc: Srinivas Pandruvada Signed-off-by: David E. Box Signed-off-by: Gayatri Kammela Link: https://lore.kernel.org/r/20220629221334.434307-3-gayatri.kammela@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/intel/vsec.c | 2 ++ 1 file changed, 2 insertions(+) commit f21c179e1206e88d187d517d97d270c6492d4673 Author: David E. Box Date: Wed Jun 29 15:13:31 2022 -0700 platform/x86/intel/vsec: Rework early hardware code In the Intel VSEC PCI driver, use a new VSEC_QUIRK_EARLY_HW flag in driver_data to indicate the need for early hardware quirks in auxiliary devices. Remove the separate PCI ID list maintained by the Intel PMT auxiliary driver. Cc: Srinivas Pandruvada Signed-off-by: David E. Box Signed-off-by: Gayatri Kammela Link: https://lore.kernel.org/r/20220629221334.434307-2-gayatri.kammela@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/intel/pmt/class.c | 23 ++++++----------- drivers/platform/x86/intel/vsec.c | 46 ++++++++++++++++------------------ drivers/platform/x86/intel/vsec.h | 11 +++++++- 3 files changed, 39 insertions(+), 41 deletions(-) commit 9a1aac8a96dc014bec49806a7a964bf2fdbd315f Author: Srinivas Pandruvada Date: Wed Jun 29 12:48:17 2022 -0700 platform/x86: ISST: PUNIT device mapping with Sub-NUMA clustering On a multiple package system using Sub-NUMA clustering, there is an issue in mapping Linux CPU number to PUNIT PCI device when manufacturer decided to reuse the PCI bus number across packages. Bus number can be reused as long as they are in different domain or segment. In this case some CPU will fail to find a PCI device to issue SST requests. When bus numbers are reused across CPU packages, we are using proximity information by matching CPU numa node id to PUNIT PCI device numa node id. But on a package there can be only one PUNIT PCI device, but multiple numa nodes (one for each sub cluster). So, the numa node ID of the PUNIT PCI device can only match with one numa node id of CPUs in a sub cluster in the package. Since there can be only one PUNIT PCI device per package, if we match with numa node id of any sub cluster in that package, we can use that mapping for any CPU in that package. So, store the match information in a per package data structure and return the information when there is no match. While here, use defines for max bus number instead of hardcoding. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20220629194817.2418240-1-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede .../x86/intel/speed_select_if/isst_if_common.c | 39 ++++++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) commit 221756e61b7cc3d7f47f57fb4f371242aa4ccb1d Author: Maximilian Luz Date: Fri Jun 24 22:58:00 2022 +0200 platform/surface: Update copyright year of various drivers Update the copyright of various Surface drivers to the current year. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220624205800.1355621-4-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/surface/aggregator/Kconfig | 2 +- drivers/platform/surface/aggregator/Makefile | 2 +- drivers/platform/surface/aggregator/bus.c | 2 +- drivers/platform/surface/aggregator/bus.h | 2 +- drivers/platform/surface/aggregator/controller.c | 2 +- drivers/platform/surface/aggregator/controller.h | 2 +- drivers/platform/surface/aggregator/core.c | 2 +- drivers/platform/surface/aggregator/ssh_msgb.h | 2 +- drivers/platform/surface/aggregator/ssh_packet_layer.c | 2 +- drivers/platform/surface/aggregator/ssh_packet_layer.h | 2 +- drivers/platform/surface/aggregator/ssh_parser.c | 2 +- drivers/platform/surface/aggregator/ssh_parser.h | 2 +- drivers/platform/surface/aggregator/ssh_request_layer.c | 2 +- drivers/platform/surface/aggregator/ssh_request_layer.h | 2 +- drivers/platform/surface/aggregator/trace.h | 2 +- drivers/platform/surface/surface_acpi_notify.c | 2 +- drivers/platform/surface/surface_aggregator_cdev.c | 2 +- drivers/platform/surface/surface_aggregator_registry.c | 2 +- drivers/platform/surface/surface_dtx.c | 2 +- drivers/platform/surface/surface_gpe.c | 2 +- drivers/platform/surface/surface_hotplug.c | 2 +- drivers/platform/surface/surface_platform_profile.c | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) commit 993a9e2aca6e6432695082d689353a03662d18d1 Author: Maximilian Luz Date: Fri Jun 24 22:57:59 2022 +0200 platform/surface: aggregator: Move subsystem hub drivers to their own module Split out subsystem device hub drivers into their own module. This allows us to load the hub drivers separately from the registry, which will help future DT/OF support. While doing so, also remove a small bit of code duplication. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220624205800.1355621-3-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede MAINTAINERS | 6 + drivers/platform/surface/Kconfig | 35 +- drivers/platform/surface/Makefile | 1 + drivers/platform/surface/surface_aggregator_hub.c | 371 +++++++++++++++++++++ .../platform/surface/surface_aggregator_registry.c | 371 +-------------------- 5 files changed, 410 insertions(+), 374 deletions(-) commit 4a4ab610b8ae912c28a4fd28442ef24ed7a1a5bd Author: Maximilian Luz Date: Fri Jun 24 22:57:58 2022 +0200 platform/surface: aggregator: Move device registry helper functions to core module Move helper functions for client device registration to the core module. This simplifies addition of future DT/OF support and also allows us to split out the device hub drivers into their own module. At the same time, also improve device node validation a bit by not silently skipping devices with invalid device UID specifiers. Further, ensure proper lifetime management for the firmware/software nodes associated with the added devices. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220624205800.1355621-2-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/surface/aggregator/bus.c | 149 ++++++++++++++++++--- .../platform/surface/surface_aggregator_registry.c | 75 +---------- include/linux/surface_aggregator/device.h | 52 +++++++ 3 files changed, 187 insertions(+), 89 deletions(-) commit 70e85eb071a118c13b690df595bd8129e9fbbe79 Author: Maximilian Luz Date: Fri Jun 24 20:36:42 2022 +0200 platform/surface: aggregator_registry: Add support for tablet mode switch on Surface Laptop Studio Add a POS subsystem tablet-mode switch device for the Surface Laptop Studio. The respective driver for this device provides SW_TABLET_MODE input events for user-space based on the posture of the screen. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220624183642.910893-5-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/surface/surface_aggregator_registry.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f9eb5c4babed86197000a12068245b40fd639747 Author: Maximilian Luz Date: Fri Jun 24 20:36:41 2022 +0200 platform/surface: aggregator_registry: Add support for tablet mode switch on Surface Pro 8 Add a KIP subsystem tablet-mode switch device for the Surface Pro 8. The respective driver for this device provides SW_TABLET_MODE input events for user-space based on the state of the keyboard cover (e.g. detached, folded-back, normal/laptop mode). Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220624183642.910893-4-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/surface/surface_aggregator_registry.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 9f794056db5bb1e1add83ed553b6aec57298358c Author: Maximilian Luz Date: Fri Jun 24 20:36:40 2022 +0200 platform/surface: Add KIP/POS tablet-mode switch driver Add a driver providing a tablet-mode switch input device for Microsoft Surface devices using the Surface Aggregator KIP subsystem (to manage detachable peripherals) or POS subsystem (to obtain device posture information). The KIP (full name unknown, abbreviation found through reverse engineering) subsystem is used on the Surface Pro 8 and Surface Pro X to manage the keyboard cover. Among other things, it provides information on the positioning (posture) of the cover (closed, laptop-style, detached, folded-back, ...), which can be used to implement an input device providing the SW_TABLET_MODE event. Similarly, the POS (posture information) subsystem provides such information on the Surface Laptop Studio, with the difference being that the keyboard is not detachable. As implementing the tablet-mode switch for both subsystems is largely similar, the driver proposed in this commit, in large, acts as a generic tablet mode switch driver framework for the Surface Aggregator Module. Specific implementations using this framework are provided for the KIP and POS subsystems, adding tablet-mode switch support to the aforementioned devices. A few more notes on the Surface Laptop Studio: A peculiarity of the Surface Laptop Studio is its "slate/tent" mode (symbolized: user> _/\). In this mode, the screen covers the keyboard but leaves the touchpad exposed. This is essentially a mode in-between tablet and laptop, and it is debatable whether tablet-mode should be enabled in this mode. We therefore let the user decide this via a module parameter. In particular, tablet-mode may bring up the on-screen touch keyboard more easily, which would be desirable in this mode. However, some user-space software currently also decides to disable keyboard and, more importantly, touchpad input, while the touchpad is still accessible in the "slate/tent" mode. Furthermore, this mode shares its identifier with "slate/flipped" mode where the screen is flipped 180° and the keyboard points away from the user (symbolized: user> /_). In this mode we would like to enable auto-rotation, something that user-space software may only do when tablet-mode is enabled. We therefore default to the slate-mode enabling the tablet-mode switch. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220624183642.910893-3-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede .../testing/sysfs-bus-surface_aggregator-tabletsw | 57 +++ MAINTAINERS | 6 + drivers/platform/surface/Kconfig | 23 + drivers/platform/surface/Makefile | 1 + .../platform/surface/surface_aggregator_tabletsw.c | 533 +++++++++++++++++++++ 5 files changed, 620 insertions(+) commit eb003bf3ba221bb3d21d1fdcddaa36c158fd2d8f Author: Maximilian Luz Date: Fri Jun 24 20:36:39 2022 +0200 platform/surface: aggregator: Add helper macros for requests with argument and return value Add helper macros for synchronous stack-allocated Surface Aggregator request with both argument and return value, similar to the current argument-only and return-value-only ones. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220624183642.910893-2-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede include/linux/surface_aggregator/controller.h | 125 ++++++++++++++++++++++++++ include/linux/surface_aggregator/device.h | 36 ++++++++ 2 files changed, 161 insertions(+) commit 04740c53cac4bf93b5233a0d774d7f39620378e1 Author: Jilin Yuan Date: Thu Jun 30 20:39:24 2022 +0800 qlogic/qed: fix repeated words in comments Delete the redundant word 'a'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220630123924.7531-1-yuanjilin@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/qlogic/qed/qed_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abf1efb6ae78961aa5e1154959e60eeb57c095de Author: Jilin Yuan Date: Thu Jun 30 20:46:39 2022 +0800 samsung/sxgbe: fix repeated words in comments Delete the redundant word 'are'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220630124639.11420-1-yuanjilin@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93d663c7e5a40357867067d396f56d18cc54270c Author: Jilin Yuan Date: Thu Jun 30 20:52:22 2022 +0800 stmicro/stmmac: fix repeated words in comments Delete the redundant word 'all'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220630125222.14357-1-yuanjilin@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/mmc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c31788832f87c79a1795d776c03f2f60abe62c1c Author: Jilin Yuan Date: Thu Jun 30 21:09:16 2022 +0800 ethernet/sun: fix repeated words in comments Delete the redundant word 'the'. Delete the redundant word 'is'. Delete the redundant word 'start'. Delete the redundant word 'checking'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220630130916.21074-1-yuanjilin@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/sun/cassini.c | 2 +- drivers/net/ethernet/sun/cassini.h | 2 +- drivers/net/ethernet/sun/ldmvsw.c | 2 +- drivers/net/ethernet/sun/sungem.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 1d7f94cdd8f0975ce7aa35b21f4c381bd4123681 Author: Oliver Neukum Date: Thu Jun 30 13:07:41 2022 +0200 usbnet: remove vestiges of debug macros The driver has long since be converted to dynamic debugging. The internal compile options for more debugging can simply be deleted. Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20220630110741.21314-1-oneukum@suse.com Signed-off-by: Jakub Kicinski drivers/net/usb/usbnet.c | 3 --- 1 file changed, 3 deletions(-) commit 90c74f4d90ad769fc84e0b91a08b5514d83aa683 Author: Clément Léger Date: Wed Jun 29 14:20:03 2022 +0200 net: pcs: rzn1-miic: update speed only if interface is changed As stated by Russel King, miic_config() can be called as a result of ethtool setting the configuration while the link is already up. Since the speed is also set in this function, it could potentially modify the current speed that is set. This will only happen if there is no PHY present and we aren't using fixed-link mode. Handle that by storing the current interface mode in the miic_port structure and update the speed only if the interface mode is going to be changed. Signed-off-by: Clément Léger Link: https://lore.kernel.org/r/20220629122003.189397-1-clement.leger@bootlin.com Signed-off-by: Jakub Kicinski drivers/net/pcs/pcs-rzn1-miic.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit b14056914357beee6a84f6ff1b9195f4659fab9d Author: Shijith Thotton Date: Thu Jun 30 16:24:31 2022 +0530 octeontx2-af: fix operand size in bitwise operation Made size of operands same in bitwise operations. The patch fixes the klocwork issue, operands in a bitwise operation have different size at line 375 and 483. Signed-off-by: Shijith Thotton Link: https://lore.kernel.org/r/f4fba33fe4f89b420b4da11d51255e7cc6ea1dbf.1656586269.git.sthotton@marvell.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 375561bd6195a31bf4c109732bd538cb97a941f4 Author: GONG, Ruiqi Date: Wed Jun 29 14:04:23 2022 +0800 stack: Declare {randomize_,}kstack_offset to fix Sparse warnings Fix the following Sparse warnings that got noticed when the PPC-dev patchwork was checking another patch (see the link below): init/main.c:862:1: warning: symbol 'randomize_kstack_offset' was not declared. Should it be static? init/main.c:864:1: warning: symbol 'kstack_offset' was not declared. Should it be static? Which in fact are triggered on all architectures that have HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET support (for instances x86, arm64 etc). Link: https://lore.kernel.org/lkml/e7b0d68b-914d-7283-827c-101988923929@huawei.com/T/#m49b2d4490121445ce4bf7653500aba59eefcb67f Cc: Christophe Leroy Cc: Xiu Jianfeng Signed-off-by: GONG, Ruiqi Reviewed-by: Christophe Leroy Fixes: 39218ff4c625 ("stack: Optionally randomize kernel stack offset each syscall") Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220629060423.2515693-1-gongruiqi1@huawei.com init/main.c | 1 + 1 file changed, 1 insertion(+) commit 6a022dd29f2cefbac4895a34e2e1f14b2d12d819 Author: Kees Cook Date: Wed May 11 10:40:43 2022 -0700 lib: overflow: Do not define 64-bit tests on 32-bit The 64-bit overflow tests will trigger 64-bit division on 32-bit hosts, which is not currently used anywhere in the kernel, and tickles bugs in at least Clang 13 and earlier: https://github.com/ClangBuiltLinux/linux/issues/1636 In reality, there shouldn't be a reason to not build the 64-bit test cases on 32-bit systems, so these #ifdefs can be removed once the minimum Clang version reaches 13. In the meantime, silence W=1 warnings given by the current code: ../lib/overflow_kunit.c:191:19: warning: 's64_tests' defined but not used [-Wunused-const-variable=] 191 | DEFINE_TEST_ARRAY(s64) = { | ^~~ ../lib/overflow_kunit.c:24:11: note: in definition of macro 'DEFINE_TEST_ARRAY' 24 | } t ## _tests[] | ^ ../lib/overflow_kunit.c:94:19: warning: 'u64_tests' defined but not used [-Wunused-const-variable=] 94 | DEFINE_TEST_ARRAY(u64) = { | ^~~ ../lib/overflow_kunit.c:24:11: note: in definition of macro 'DEFINE_TEST_ARRAY' 24 | } t ## _tests[] | ^ Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/202205110324.7GrtxG8u-lkp@intel.com Fixes: 455a35a6cdb6 ("lib: add runtime test of check_*_overflow functions") Cc: Rasmus Villemoes Cc: Nick Desaulniers Cc: Vitor Massaru Iha Cc: "Gustavo A. R. Silva" Tested-by: Daniel Latypov Link: https://lore.kernel.org/lkml/CAGS_qxokQAjQRip2vPi80toW7hmBnXf=KMTNT51B1wuDqSZuVQ@mail.gmail.com Signed-off-by: Kees Cook lib/overflow_kunit.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 437bd3a0acff903e8a159e94c8e04d15c0ef8b4e Author: Kees Cook Date: Wed May 11 11:52:59 2022 -0700 MAINTAINERS: Add a general "kernel hardening" section While many large subsystems related to kernel hardening have their own distinct MAINTAINERS entries, there are some smaller collections that don't, but are maintained/reviewed by linux-hardening@vger.kernel.org. Add a section to capture these, add (or replace defunct) trees that are now all carried in the hardening tree. Signed-off-by: Kees Cook MAINTAINERS | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 170b2c350cfcb6f74074e44dd9f916787546db0d Author: Jason A. Donenfeld Date: Thu Jun 16 16:36:17 2022 +0200 usercopy: use unsigned long instead of uintptr_t A recent commit factored out a series of annoying (unsigned long) casts into a single variable declaration, but made the pointer type a `uintptr_t` rather than the usual `unsigned long`. This patch changes it to be the integer type more typically used by the kernel to represent addresses. Fixes: 35fb9ae4aa2e ("usercopy: Cast pointer to an integer once") Cc: Matthew Wilcox Cc: Uladzislau Rezki Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Joe Perches Signed-off-by: Jason A. Donenfeld Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220616143617.449094-1-Jason@zx2c4.com mm/usercopy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3461b040a90d723c93c9d1c7c11e3464f5cadc0e Author: Tom Rix Date: Fri Jul 1 16:32:36 2022 -0400 drm/i915/display: clean up comments spelling changes resoluition -> resolution dont -> don't commmit -> commit Invalidade -> Invalidate Signed-off-by: Tom Rix Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220701203236.1871668-1-trix@redhat.com drivers/gpu/drm/i915/display/intel_psr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 99c0b3ce6cbaa42ab602185ec4871424cc0a56a0 Author: Niranjana Vishwanathapura Date: Thu Jun 30 17:31:10 2022 -0700 drm/doc/rfc: VM_BIND uapi definition VM_BIND and related uapi definitions v2: Reduce the scope to simple Mesa use case. v3: Expand VM_UNBIND documentation and add I915_GEM_VM_BIND/UNBIND_FENCE_VALID and I915_GEM_VM_BIND_TLB_FLUSH flags. v4: Remove I915_GEM_VM_BIND_TLB_FLUSH flag and add additional documentation for vm_bind/unbind. v5: Remove TLB flush requirement on VM_UNBIND. Add version support to stage implementation. v6: Define and use drm_i915_gem_timeline_fence structure for all timeline fences. v7: Rename I915_PARAM_HAS_VM_BIND to I915_PARAM_VM_BIND_VERSION. Update documentation on async vm_bind/unbind and versioning. Remove redundant vm_bind/unbind FENCE_VALID flag, execbuf3 batch_count field and I915_EXEC3_SECURE flag. v8: Remove I915_GEM_VM_BIND_READONLY and minor documentation updates. Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Daniel Vetter Acked-by: Paulo Zanoni Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220701003110.24843-4-niranjana.vishwanathapura@intel.com Documentation/gpu/rfc/i915_vm_bind.h | 291 +++++++++++++++++++++++++++++++++++ 1 file changed, 291 insertions(+) commit a913bde810fc464da6f12f3f19f3483034cc7e16 Author: Niranjana Vishwanathapura Date: Thu Jun 30 17:31:09 2022 -0700 drm/i915: Update i915 uapi documentation Add some missing i915 uapi documentation which the new i915 VM_BIND feature documentation will be refer to. Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Matthew Auld Reviewed-by: Daniel Vetter Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220701003110.24843-3-niranjana.vishwanathapura@intel.com include/uapi/drm/i915_drm.h | 205 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 160 insertions(+), 45 deletions(-) commit ece91c882dee5fe45484c8e34efc07539433d1f7 Author: Niranjana Vishwanathapura Date: Thu Jun 30 17:31:08 2022 -0700 drm/doc/rfc: VM_BIND feature design document VM_BIND design document with description of intended use cases. v2: Reduce the scope to simple Mesa use case. v3: Expand documentation on dma-resv usage, TLB flushing and execbuf3. v4: Remove vm_bind tlb flush request support. v5: Update TLB flushing documentation. v6: Update out of order completion documentation. Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Daniel Vetter Acked-by: Paulo Zanoni Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220701003110.24843-2-niranjana.vishwanathapura@intel.com Documentation/gpu/rfc/i915_vm_bind.rst | 245 +++++++++++++++++++++++++++++++++ Documentation/gpu/rfc/index.rst | 4 + 2 files changed, 249 insertions(+) commit 8618b8489ba6ecc025be033d0fa87c0db53f5211 Author: Matt Roper Date: Fri Jul 1 08:22:31 2022 -0700 drm/i915: DG2 and ATS-M device ID updates Small BAR support has now landed, which allows us to add the PCI IDs that correspond to add-in card designs of DG2 and ATS-M. There's also one additional MB-down PCI ID that recently appeared (0x5698) so we add it too. Cc: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20220701152231.529511-2-matthew.d.roper@intel.com drivers/gpu/drm/i915/i915_pci.c | 2 +- drivers/gpu/drm/i915/intel_device_info.c | 2 ++ include/drm/i915_pciids.h | 26 +++++++++++++++++++++++--- 3 files changed, 26 insertions(+), 4 deletions(-) commit c272612cb4a2f7cde550d35f46cde159a2af0bab Author: David Gow Date: Fri Jul 1 16:47:43 2022 +0800 kunit: Taint the kernel when KUnit tests are run Make KUnit trigger the new TAINT_TEST taint when any KUnit test is run. Due to KUnit tests not being intended to run on production systems, and potentially causing problems (or security issues like leaking kernel addresses), the kernel's state should not be considered safe for production use after KUnit tests are run. This both marks KUnit modules as test modules using MODULE_INFO() and manually taints the kernel when tests are run (which catches builtin tests). Acked-by: Luis Chamberlain Tested-by: Daniel Latypov Reviewed-by: Brendan Higgins Signed-off-by: David Gow Tested-by: Maíra Canal Signed-off-by: Shuah Khan include/kunit/test.h | 3 ++- lib/kunit/test.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 2852ca7fba9f77b204f0fe953b31fadd0057c936 Author: David Gow Date: Fri Jul 1 16:47:41 2022 +0800 panic: Taint kernel if tests are run Most in-kernel tests (such as KUnit tests) are not supposed to run on production systems: they may do deliberately illegal things to trigger errors, and have security implications (for example, KUnit assertions will often deliberately leak kernel addresses). Add a new taint type, TAINT_TEST to signal that a test has been run. This will be printed as 'N' (originally for kuNit, as every other sensible letter was taken.) This should discourage people from running these tests on production systems, and to make it easier to tell if tests have been run accidentally (by loading the wrong configuration, etc.) Acked-by: Luis Chamberlain Reviewed-by: Brendan Higgins Signed-off-by: David Gow Signed-off-by: Shuah Khan Documentation/admin-guide/tainted-kernels.rst | 1 + include/linux/panic.h | 3 ++- kernel/panic.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) commit e35330f879cf5d202ef5e13005b3505f07373614 Author: Rob Herring Date: Wed May 25 20:41:27 2022 -0500 dt-bindings: watchdog: faraday: Fix typo in example 'timeout-sec' property The 'unevaluatedProperties' schema checks is not fully working and doesn't catch some cases where there's a $ref to another schema. A fix is pending, but results in new warnings in examples. The correct common watchdog property is 'timeout-sec', not 'timeout-secs'. Signed-off-by: Rob Herring Reviewed-by: Linus Walleij Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220526014127.2872254-1-robh@kernel.org Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5036793d7dbd0b14aec51526441a50b01c7bf66d Author: Zhang Jiaming Date: Wed Jun 29 15:29:32 2022 +0800 exec: Fix a spelling mistake Change 'wont't' to 'won't'. Signed-off-by: Zhang Jiaming Reviewed-by: Souptick Joarder (HPE) Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220629072932.27506-1-jiaming@nfschina.com fs/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad6c94de2ec453d966f71654cd7dd68cafd03dc3 Author: Jason A. Donenfeld Date: Tue Jun 28 17:33:54 2022 +0200 dt-bindings: chosen: remove old .txt binding chosen.txt has been replaced by a schema in dtschema[1] and is now out of date as well. Remove it to avoid confusion. [1] https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/chosen.yaml Link: https://lore.kernel.org/lkml/c8dddfe6-6385-ed34-e789-9f845c8a32bd@linaro.org/ Link: https://lore.kernel.org/lkml/CAL_Jsq+uSdk9YNbUW35yjN3q8-3FDobrxHmBpy=4RKmCfnB0KQ@mail.gmail.com/ Signed-off-by: Jason A. Donenfeld [robh: Improve commmit msg] Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220628153354.870543-1-Jason@zx2c4.com Documentation/devicetree/bindings/chosen.txt | 137 --------------------------- 1 file changed, 137 deletions(-) commit 3ed9222ce728fd3f1c4e429293270f58f3a8256d Merge: aa61fa3e36cf 0d97f2176dec Author: Arnd Bergmann Date: Fri Jul 1 22:56:38 2022 +0200 Merge tag 'memory-controller-drv-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.20 Add MediaTek MT6795 Helio X10 SMI support. * tag 'memory-controller-drv-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: mtk-smi: Add support for MT6795 Helio X10 dt-bindings: memory: mtk-smi: Add MT6795 Helio X10 bindings Link: https://lore.kernel.org/r/20220624081828.33649-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 1c74a93ce9b6eeb32ed24cd238424f771e59ac73 Merge: 03c765b0e3b4 d1065293010a Author: Arnd Bergmann Date: Fri Jul 1 22:48:50 2022 +0200 Merge tag 'samsung-soc-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc Samsung mach/soc changes for v5.20 1. Use preferred strscpy() over strlcpy(). 2. Kconfig indentation cleanup. * tag 'samsung-soc-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: s3c: Kconfig.s3c64xx: Fix indentation ARM: s3c: Kconfig.s3c24xx: Fix indentation and replace some tabs ARM: s3c: Kconfig: Fix indentation ARM: s3c: Use strscpy to replace strlcpy Link: https://lore.kernel.org/r/20220624080746.31947-3-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 89a24d7d85bd4b5899d5a4bb63e56a30e5984300 Merge: 03c765b0e3b4 7e1ab5a8a3b5 Author: Arnd Bergmann Date: Fri Jul 1 22:24:46 2022 +0200 Merge tag 'renesas-arm-defconfig-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/defconfig Renesas ARM defconfig updates for v5.20 - Enable support for the Renesas R-Car V4H SoC, - Refresh shmobile_defconfig for v5.19-rc1. * tag 'renesas-arm-defconfig-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: defconfig: Enable R8A779G0 SoC ARM: shmobile: defconfig: Refresh for v5.19-rc1 Link: https://lore.kernel.org/r/cover.1656069632.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit aa61fa3e36cf9298ac647e2f10298839413a9403 Merge: 92a1691b9db8 d18529a4c12f Author: Arnd Bergmann Date: Fri Jul 1 22:22:56 2022 +0200 Merge tag 'amlogic-drivers-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/drivers Amlogic Drivers changes for v5.20: - Fix refcount leak in meson-secure-pwrc.c - Fix refcount leak in meson_mx_socinfo_init * tag 'amlogic-drivers-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: soc: amlogic: Fix refcount leak in meson-secure-pwrc.c meson-mx-socinfo: Fix refcount leak in meson_mx_socinfo_init Link: https://lore.kernel.org/r/0c01e173-9abf-69ac-7882-e6ecc3935c33@baylibre.com Signed-off-by: Arnd Bergmann commit 92a1691b9db8d5191009e833f104551d3438496c Merge: 03c765b0e3b4 4f5bc54d28ec Author: Arnd Bergmann Date: Fri Jul 1 22:21:30 2022 +0200 Merge tag 'renesas-drivers-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/drivers Renesas driver updates for v5.20 - Small fixes and improvements. * tag 'renesas-drivers-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: rcar-sysc: Optimize rcar_sysc_area struct sizes soc: renesas: r8a779a0-sysc: Fix A2DP1 and A2CV[2357] PDR values Link: https://lore.kernel.org/r/cover.1656069638.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit e6bdbcc764af822ff7172a4a78d437dc433a0c74 Author: Rafael J. Wysocki Date: Mon Jun 13 20:38:00 2022 +0200 ACPI: bus: Drop unused list heads from struct acpi_device Drop the children and node list heads that have no more users from struct acpi_device and the code manipulating them from __acpi_device_add() and acpi_device_del(). Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko drivers/acpi/scan.c | 11 +---------- include/acpi/acpi_bus.h | 2 -- 2 files changed, 1 insertion(+), 12 deletions(-) commit d674553009afc9b24cab2bbec71628609edbbb27 Author: Rafael J. Wysocki Date: Thu Jun 30 20:13:52 2022 +0200 hisi_lpc: Use acpi_dev_for_each_child() Instead of walking the list of children of an ACPI device directly, use acpi_dev_for_each_child() to carry out an action for all of the given ACPI device's children. This will help to eliminate the children list head from struct acpi_device as it is redundant and it is used in questionable ways in some places (in particular, locking is needed for walking the list pointed to it safely, but it is often missing). While at it, simplify hisi_lpc_acpi_set_io_res() by making it accept a struct acpi_device pointer from the caller, instead of going to struct device and back to get the same result, and clean up confusion regarding hostdev and its ACPI companion in that function. Also remove a redundant check from it. Signed-off-by: Rafael J. Wysocki Reviewed-by: Greg Kroah-Hartman Reviewed-by: John Garry drivers/bus/hisi_lpc.c | 204 ++++++++++++++++++++++++------------------------- 1 file changed, 100 insertions(+), 104 deletions(-) commit 54872fea6a5ac967ec2272aea525d1438ac6735a Author: Yang Yingliang Date: Fri Jul 1 17:43:52 2022 +0800 bus: hisi_lpc: fix missing platform_device_put() in hisi_lpc_acpi_probe() In error case in hisi_lpc_acpi_probe() after calling platform_device_add(), hisi_lpc_acpi_remove() can't release the failed 'pdev', so it will be leak, call platform_device_put() to fix this problem. I'v constructed this error case and tested this patch on D05 board. Fixes: 99c0228d6ff1 ("HISI LPC: Re-Add ACPI child enumeration support") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Acked-by: John Garry Signed-off-by: Rafael J. Wysocki drivers/bus/hisi_lpc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit bca036de0ab2c317902d4fa1dd9900f238b03e1f Author: Marcus Folkesson Date: Wed Jun 29 22:38:47 2022 +0200 iio: adc: ad778-1: do not explicity set INDIO_BUFFER_TRIGGERED mode The core sets INDIO_BUFFER_TRIGGERED as part of devm_iio_triggered_buffer_setup(). Signed-off-by: Marcus Folkesson Link: https://lore.kernel.org/r/20220629203847.4801-1-marcus.folkesson@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7768-1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 338222d8e1121bcb78a86fb39982eddcc367a5bc Author: Marcus Folkesson Date: Wed Jun 29 22:39:10 2022 +0200 iio: adc: ti-tsc2046: do not explicity set INDIO_BUFFER_TRIGGERED mode The core sets INDIO_BUFFER_TRIGGERED as part of devm_iio_triggered_buffer_setup(). Signed-off-by: Marcus Folkesson Reviewed-by: Oleksij Rempel Link: https://lore.kernel.org/r/20220629203910.4836-1-marcus.folkesson@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/adc/ti-tsc2046.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bef4929fa21477d44b4934d02296c4d0126dd40 Author: Colin Ian King Date: Tue Jun 14 19:47:59 2022 +0100 dmaengine: fsl-edma: remove redundant assignment to pointer last_sg The pointer last_sg is being assigned a value at the start of a loop however it is never read and is being re-assigned later on in both brances of an if-statement. The assignment is redundant and can be removed. Cleans up clang scan-build warning: drivers/dma/fsl-edma-common.c:563:3: warning: Value stored to 'last_sg' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20220614184759.164379-1-colin.i.king@gmail.com Signed-off-by: Vinod Koul drivers/dma/fsl-edma-common.c | 3 --- 1 file changed, 3 deletions(-) commit 8d8bbefa6a3397e6f730dd75ba5128d9d106d4ea Author: Xiang wangx Date: Sat Jun 18 21:01:20 2022 +0800 dmaengine: mediatek: mtk-hsdma: Fix typo in comment Delete the redundant word 'be'. Signed-off-by: Xiang wangx Link: https://lore.kernel.org/r/20220618130120.9783-1-wangxiang@cdjrlc.com Signed-off-by: Vinod Koul drivers/dma/mediatek/mtk-hsdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab356484dbb950b069b363e45681270eb14fd02c Author: Xiang wangx Date: Sat Jun 18 21:03:49 2022 +0800 dmaengine: at_xdmac: Fix typo in comment Delete the redundant word 'the'. Signed-off-by: Xiang wangx Link: https://lore.kernel.org/r/20220618130349.11507-1-wangxiang@cdjrlc.com Signed-off-by: Vinod Koul drivers/dma/at_xdmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cfa1927f8468c76e42d727693a3c2be1a9540ee1 Author: Peng Fan Date: Mon Jun 20 10:00:02 2022 +0800 dt-bindings: dma: fsl-edma: Convert to DT schema Convert the eDMA controller binding to DT schema. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20220620020002.3966343-1-peng.fan@oss.nxp.com Signed-off-by: Vinod Koul .../devicetree/bindings/dma/fsl,edma.yaml | 155 +++++++++++++++++++++ Documentation/devicetree/bindings/dma/fsl-edma.txt | 111 --------------- 2 files changed, 155 insertions(+), 111 deletions(-) commit a7a5c1a93d83e5b6331d6ed94f1bcdb15cc9a6c0 Author: Jiang Jian Date: Wed Jun 22 22:31:58 2022 +0800 dmaengine: ep93xx: Fix typo in comments Remove the repeated word 'and' from comments Signed-off-by: Jiang Jian Link: https://lore.kernel.org/r/20220622143158.15091-1-jiangjian@cdjrlc.com Signed-off-by: Vinod Koul drivers/dma/ep93xx_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0951a90e343d20b62daa7720da61f124b1c32d71 Author: Fabio Estevam Date: Thu Jun 23 09:33:53 2022 -0300 dmaengine: imx-sdma: Improve the SDMA irq name On SoCs with several SDMA instances, such as i.MX8M for example, all the SDMA related interrupts appear with the same "sdma" name. Improve the SDMA irq name by associating it with the SDMA instance via dev_name(), so that the SDMA irq names can be unique. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20220623123353.2570410-1-festevam@gmail.com Signed-off-by: Vinod Koul drivers/dma/imx-sdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit af1c2146a50b1ffe7e10cae1f7e64ab56b7f8c1f Author: Dave Chinner Date: Sat Jul 2 02:13:52 2022 +1000 xfs: introduce per-cpu CIL tracking structure The CIL push lock is highly contended on larger machines, becoming a hard bottleneck that about 700,000 transaction commits/s on >16p machines. To address this, start moving the CIL tracking infrastructure to utilise per-CPU structures. We need to track the space used, the amount of log reservation space reserved to write the CIL, the log items in the CIL and the busy extents that need to be completed by the CIL commit. This requires a couple of per-cpu counters, an unordered per-cpu list and a globally ordered per-cpu list. Create a per-cpu structure to hold these and all the management interfaces needed, as well as the hooks to handle hotplug CPUs. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/xfs_log_cil.c | 30 ++++++++++++++++++++++++++++-- fs/xfs/xfs_log_priv.h | 18 ++++++++++++++++++ fs/xfs/xfs_super.c | 1 + 3 files changed, 47 insertions(+), 2 deletions(-) commit 31151cc342dd9cc2c5a5954f3e7b2dcf2fb50f64 Author: Dave Chinner Date: Sat Jul 2 02:12:52 2022 +1000 xfs: rework per-iclog header CIL reservation For every iclog that a CIL push will use up, we need to ensure we have space reserved for the iclog header in each iclog. It is extremely difficult to do this accurately with a per-cpu counter without expensive summing of the counter in every commit. However, we know what the maximum CIL size is going to be because of the hard space limit we have, and hence we know exactly how many iclogs we are going to need to write out the CIL. We are constrained by the requirement that small transactions only have reservation space for a single iclog header built into them. At commit time we don't know how much of the current transaction reservation is made up of iclog header reservations as calculated by xfs_log_calc_unit_res() when the ticket was reserved. As larger reservations have multiple header spaces reserved, we can steal more than one iclog header reservation at a time, but we only steal the exact number needed for the given log vector size delta. As a result, we don't know exactly when we are going to steal iclog header reservations, nor do we know exactly how many we are going to need for a given CIL. To make things simple, start by calculating the worst case number of iclog headers a full CIL push will require. Record this into an atomic variable in the CIL. Then add a byte counter to the log ticket that records exactly how much iclog header space has been reserved in this ticket by xfs_log_calc_unit_res(). This tells us exactly how much space we can steal from the ticket at transaction commit time. Now, at transaction commit time, we can check if the CIL has a full iclog header reservation and, if not, steal the entire reservation the current ticket holds for iclog headers. This minimises the number of times we need to do atomic operations in the fast path, but still guarantees we get all the reservations we need. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/xfs_log.c | 9 ++++++--- fs/xfs/xfs_log_cil.c | 55 +++++++++++++++++++++++++++++++++++++++------------ fs/xfs/xfs_log_priv.h | 20 ++++++++++--------- 3 files changed, 59 insertions(+), 25 deletions(-) commit 12380d237b819bd6cf2183f10b55ab47cdaab5e6 Author: Dave Chinner Date: Sat Jul 2 02:11:52 2022 +1000 xfs: lift init CIL reservation out of xc_cil_lock The xc_cil_lock is the most highly contended lock in XFS now. To start the process of getting rid of it, lift the initial reservation of the CIL log space out from under the xc_cil_lock. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/xfs_log_cil.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit 88591e7f06a42b241ca2a3e3e7067a8f17661947 Author: Dave Chinner Date: Sat Jul 2 02:10:52 2022 +1000 xfs: use the CIL space used counter for emptiness checks In the next patches we are going to make the CIL list itself per-cpu, and so we cannot use list_empty() to check is the list is empty. Replace the list_empty() checks with a flag in the CIL to indicate we have committed at least one transaction to the CIL and hence the CIL is not empty. We need this flag to be an atomic so that we can clear it without holding any locks in the commit fast path, but we also need to be careful to avoid atomic operations in the fast path. Hence we use the fact that test_bit() is not an atomic op to first check if the flag is set and then run the atomic test_and_clear_bit() operation to clear it and steal the initial unit reservation for the CIL context checkpoint. When we are switching to a new context in a push, we place the setting of the XLOG_CIL_EMPTY flag under the xc_push_lock. THis allows all the other places that need to check whether the CIL is empty to use test_bit() and still be serialised correctly with the CIL context swaps that set the bit. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/xfs_log_cil.c | 43 ++++++++++++++++++++++++------------------- fs/xfs/xfs_log_priv.h | 4 ++++ 2 files changed, 28 insertions(+), 19 deletions(-) commit 3b05c960788439dbb47d0e62335f23869696b079 Author: Gustavo Sousa Date: Thu Jun 30 17:14:07 2022 -0300 drm/i915/pvc: Implement w/a 16016694945 A new PVC-specific workaround has just been added to the BSpec. BSpec: 64027 Signed-off-by: Gustavo Sousa Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220630201407.16770-1-gustavo.sousa@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 4 ++++ drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++ 2 files changed, 7 insertions(+) commit ee4aae577721035b21fcb9f9359825e9626edcfd Merge: a111daf0c53a 5873ba559101 Author: Marc Zyngier Date: Fri Jul 1 15:31:20 2022 +0100 Merge branch irq/plic-edge-fixes into irq/irqchip-next * irq/plic-edge-fixes: : . : Work around broken PLIC implementations that deal pretty : badly with edge-triggered interrupts. Flag two implementations : as affected. : . irqchip/sifive-plic: Fix T-HEAD PLIC edge trigger handling dt-bindings: interrupt-controller: Require trigger type for T-HEAD PLIC irqchip/sifive-plic: Add support for Renesas RZ/Five SoC dt-bindings: interrupt-controller: sifive,plic: Document Renesas RZ/Five SoC Signed-off-by: Marc Zyngier commit 5873ba559101fa37ad9764e79856f71bf54021aa Author: Samuel Holland Date: Thu Jun 30 05:02:41 2022 -0500 irqchip/sifive-plic: Fix T-HEAD PLIC edge trigger handling The T-HEAD PLIC ignores additional edges seen while an edge-triggered interrupt is being handled. Because of this behavior, the driver needs to complete edge-triggered interrupts in the .irq_ack callback before handling them, instead of in the .irq_eoi callback afterward. Otherwise, it could miss some interrupts. Reviewed-by: Lad Prabhakar Signed-off-by: Samuel Holland Reviewed-by: Guo Ren Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220630100241.35233-5-samuel@sholland.org drivers/irqchip/irq-sifive-plic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d60df7fd225af37e31859a9badb0cca73f7aa12d Author: Samuel Holland Date: Thu Jun 30 05:02:40 2022 -0500 dt-bindings: interrupt-controller: Require trigger type for T-HEAD PLIC The RISC-V PLIC specification unfortunately allows PLIC implementations to ignore edges seen while an edge-triggered interrupt is being handled: Depending on the design of the device and the interrupt handler, in between sending an interrupt request and receiving notice of its handler’s completion, the gateway might either ignore additional matching edges or increment a counter of pending interrupts. Like the NCEPLIC100, the T-HEAD C900 PLIC also has this behavior. Thus it also needs to inform software about each interrupt's trigger type, so the driver can use the right interrupt flow. Reviewed-by: Lad Prabhakar Signed-off-by: Samuel Holland Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220630100241.35233-4-samuel@sholland.org .../devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dd46337ca69662b6912bc230d393c4261d126b8f Author: Lad Prabhakar Date: Thu Jun 30 05:02:39 2022 -0500 irqchip/sifive-plic: Add support for Renesas RZ/Five SoC The Renesas RZ/Five SoC has a RISC-V AX45MP AndesCore with NCEPLIC100. The NCEPLIC100 supports both edge-triggered and level-triggered interrupts. In case of edge-triggered interrupts NCEPLIC100 ignores the next interrupt edge until the previous completion message has been received and NCEPLIC100 doesn't support pending interrupt counter, hence losing the interrupts if not acknowledged in time. So the workaround for edge-triggered interrupts to be handled correctly and without losing is that it needs to be acknowledged first and then handler must be run so that we don't miss on the next edge-triggered interrupt. This patch adds a new compatible string for NCEPLIC100 (from Andes Technology) interrupt controller found on Renesas RZ/Five SoC and adds quirk bits to priv structure and implements PLIC_QUIRK_EDGE_INTERRUPT quirk to change the interrupt flow. Suggested-by: Marc Zyngier Signed-off-by: Lad Prabhakar Signed-off-by: Samuel Holland Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220630100241.35233-3-samuel@sholland.org drivers/irqchip/irq-sifive-plic.c | 78 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 74 insertions(+), 4 deletions(-) commit 1267d983117178b507b40c516cdcc5cceec553f9 Author: Lad Prabhakar Date: Thu Jun 30 05:02:38 2022 -0500 dt-bindings: interrupt-controller: sifive,plic: Document Renesas RZ/Five SoC Renesas RZ/Five (R9A07G043) SoC is equipped with NCEPLIC100 RISC-V platform level interrupt controller from Andes Technology. NCEPLIC100 ignores subsequent EDGE interrupts until the previous EDGE interrupt is completed, due to this issue we have to follow different interrupt flow for EDGE and LEVEL interrupts. This patch documents Renesas RZ/Five (R9A07G043) SoC. Signed-off-by: Lad Prabhakar Signed-off-by: Samuel Holland Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220630100241.35233-2-samuel@sholland.org .../interrupt-controller/sifive,plic-1.0.0.yaml | 64 ++++++++++++++++++++-- 1 file changed, 59 insertions(+), 5 deletions(-) commit 68f26639dc40b5d6aca201f3e250a1538e68eae6 Author: Srinivas Kandagatla Date: Fri Jul 1 13:55:15 2022 +0100 ASoC: codecs: wsa883x: add missing break statement Add missing break in one of the switch statement. Reported-by: kernel test robot Fixes: cdb09e623143 ("ASoC: codecs: wsa883x: add control, dapm widgets and map") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220701125515.32332-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/codecs/wsa883x.c | 1 + 1 file changed, 1 insertion(+) commit 18c9aa490795745e67e30816fa9b4fafab2df7dc Author: Marc Zyngier Date: Thu Jun 30 17:05:00 2022 +0100 arm64: Add an override for ID_AA64SMFR0_EL1.FA64 Add a specific override for ID_AA64SMFR0_EL1.FA64, which disables the full A64 streaming SVE mode. Note that no alias is provided for this, as this is already covered by arm64.nosme, and is only added as a debugging facility. Signed-off-by: Marc Zyngier Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20220630160500.1536744-10-maz@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/hyp-stub.S | 15 ++++++++------- arch/arm64/kernel/idreg-override.c | 11 +++++++++++ 2 files changed, 19 insertions(+), 7 deletions(-) commit 504ee23611c4bb27777576ec6c1170fd45026093 Author: Marc Zyngier Date: Thu Jun 30 17:04:59 2022 +0100 arm64: Add the arm64.nosve command line option In order to be able to completely disable SVE even if the HW seems to support it (most likely because the FW is broken), move the SVE setup into the EL2 finalisation block, and use a new idreg override to deal with it. Note that we also nuke id_aa64zfr0_el1 as a byproduct, and that SME also gets disabled, due to the dependency between the two features. Signed-off-by: Marc Zyngier Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20220630160500.1536744-9-maz@kernel.org Signed-off-by: Will Deacon Documentation/admin-guide/kernel-parameters.txt | 3 +++ arch/arm64/include/asm/cpufeature.h | 2 ++ arch/arm64/include/asm/el2_setup.h | 15 -------------- arch/arm64/kernel/cpufeature.c | 8 ++++++-- arch/arm64/kernel/hyp-stub.S | 11 +++++++++++ arch/arm64/kernel/idreg-override.c | 26 +++++++++++++++++++++++++ 6 files changed, 48 insertions(+), 17 deletions(-) commit b3000e2133d878e586416e440642ca82d234c6fb Author: Marc Zyngier Date: Thu Jun 30 17:04:58 2022 +0100 arm64: Add the arm64.nosme command line option In order to be able to completely disable SME even if the HW seems to support it (most likely because the FW is broken), move the SME setup into the EL2 finalisation block, and use a new idreg override to deal with it. Note that we also nuke id_aa64smfr0_el1 as a byproduct. Signed-off-by: Marc Zyngier Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20220630160500.1536744-8-maz@kernel.org Signed-off-by: Will Deacon Documentation/admin-guide/kernel-parameters.txt | 3 ++ arch/arm64/include/asm/cpufeature.h | 1 + arch/arm64/include/asm/el2_setup.h | 45 ------------------------- arch/arm64/kernel/cpufeature.c | 4 ++- arch/arm64/kernel/hyp-stub.S | 41 ++++++++++++++++++++++ arch/arm64/kernel/idreg-override.c | 17 ++++++++++ 6 files changed, 65 insertions(+), 46 deletions(-) commit 6ab7661e1d3930edc8462099f047ca2cfdbd343a Author: Marc Zyngier Date: Thu Jun 30 17:04:57 2022 +0100 arm64: Expose a __check_override primitive for oddball features In order to feal with early override of features that are not classically encoded in a standard ID register with a 4 bit wide field, add a primitive that takes a sysreg value as an input (instead of the usual sysreg name) as well as a bit field width (usually 4). No functional change. Signed-off-by: Marc Zyngier Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20220630160500.1536744-7-maz@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/hyp-stub.S | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 6b7ec18c09763f72dcd3d87e194860f9e9db8968 Author: Marc Zyngier Date: Thu Jun 30 17:04:56 2022 +0100 arm64: Allow the idreg override to deal with variable field width Currently, the override mechanism can only deal with 4bit fields, which is the most common case. However, we now have a bunch of ID registers that have more diverse field widths, such as ID_AA64SMFR0_EL1, which has fields that are a single bit wide. Add the support for variable width, and a macro that encodes a feature width of 4 for all existing override. No functional change. Signed-off-by: Marc Zyngier Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20220630160500.1536744-6-maz@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/idreg-override.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit fa8aa59ae6454b7a6a670acb2097e7800992cba1 Author: Marc Zyngier Date: Thu Jun 30 17:04:55 2022 +0100 arm64: Factor out checking of a feature against the override into a macro Checking for a feature being supported from assembly code is a bit tedious if we need to factor in the idreg override. Since we already have such code written for forcing nVHE, move the whole thing into a macro. This heavily relies on the override structure being called foo_override for foo_el1. No functional change. Reviewed-by: Mark Brown Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220630160500.1536744-5-maz@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/hyp-stub.S | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) commit ae4b7e38e9a94798f08f5d66b02077900ab92903 Author: Marc Zyngier Date: Thu Jun 30 17:04:54 2022 +0100 arm64: Allow sticky E2H when entering EL1 For CPUs that have the unfortunate mis-feature to be stuck in VHE mode, we perform a funny dance where we completely shortcut the normal boot process to enable VHE and run the kernel at EL2, and only then start booting the kernel. Not only this is pretty ugly, but it means that the EL2 finalisation occurs before we have processed the sysreg override. Instead, start executing the kernel as if it was an EL1 guest and rely on the normal EL2 finalisation to go back to EL2. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220630160500.1536744-4-maz@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) commit b65e411d6cc2f12a728cabe66b930c63c527a340 Author: Marc Zyngier Date: Thu Jun 30 17:04:53 2022 +0100 arm64: Save state of HCR_EL2.E2H before switch to EL1 As we're about to switch the way E2H-stuck CPUs boot, save the boot CPU E2H state as a flag tied to the boot mode that can then be checked by the idreg override code. This allows us to replace the is_kernel_in_hyp_mode() check with a simple comparison with this state, even when running at EL1. Note that this flag isn't saved in __boot_cpu_mode, and is only kept in a register in the assembly code. Use with caution. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220630160500.1536744-3-maz@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/virt.h | 7 +++++++ arch/arm64/kernel/head.S | 7 +++++-- arch/arm64/kernel/idreg-override.c | 11 ++++++++--- 3 files changed, 20 insertions(+), 5 deletions(-) commit 7ddb0c3df7881206dcd8339c8dabf0318a781f91 Author: Marc Zyngier Date: Thu Jun 30 17:04:52 2022 +0100 arm64: Rename the VHE switch to "finalise_el2" as we are about to perform a lot more in 'mutate_to_vhe' than we currently do, this function really becomes the point where we finalise the basic EL2 configuration. Reflect this into the code by renaming a bunch of things: - HVC_VHE_RESTART -> HVC_FINALISE_EL2 - switch_to_vhe --> finalise_el2 - mutate_to_vhe -> __finalise_el2 No functional changes. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220630160500.1536744-2-maz@kernel.org Signed-off-by: Will Deacon Documentation/virt/kvm/arm/hyp-abi.rst | 11 ++++++----- arch/arm64/include/asm/virt.h | 4 ++-- arch/arm64/kernel/head.S | 6 +++--- arch/arm64/kernel/hyp-stub.S | 21 ++++++++++----------- arch/arm64/kernel/sleep.S | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) commit 0aaa68532e9da5cd6b1383e1535a5526253e359f Author: Ard Biesheuvel Date: Fri Jul 1 13:10:45 2022 +0200 arm64: mm: fix booting with 52-bit address space Joey reports that booting 52-bit VA capable builds on 52-bit VA capable CPUs is broken since commit 0d9b1ffefabe ("arm64: mm: make vabits_actual a build time constant if possible"). This is due to the fact that the primary CPU reads the vabits_actual variable before it has been assigned. The reason for deferring the assignment of vabits_actual was that we try to perform as few stores to memory as we can with the MMU and caches off, due to the cache coherency issues it creates. Since __cpu_setup() [which is where the read of vabits_actual occurs] is also called on the secondary boot path, we cannot just read the CPU ID registers directly, given that the size of the VA space is decided by the capabilities of the primary CPU. So let's read vabits_actual only on the secondary boot path, and read the CPU ID registers directly on the primary boot path, by making it a function parameter of __cpu_setup(). To ensure that all users of vabits_actual (including kasan_early_init()) observe the correct value, move the assignment of vabits_actual back into asm code, but still defer it to after the MMU and caches have been enabled. Cc: Will Deacon Cc: Anshuman Khandual Cc: Mark Rutland Fixes: 0d9b1ffefabe ("arm64: mm: make vabits_actual a build time constant if possible") Reported-by: Joey Gouly Co-developed-by: Joey Gouly Signed-off-by: Joey Gouly Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220701111045.2944309-1-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 18 ++++++++++++++++++ arch/arm64/mm/init.c | 15 +-------------- arch/arm64/mm/proc.S | 5 +++-- 3 files changed, 22 insertions(+), 16 deletions(-) commit a57cbe02c058410b8d9adc801761ca5d1297785e Merge: d5444cc4cbbe b7bfbbbf72fc Author: Arnd Bergmann Date: Fri Jul 1 16:15:53 2022 +0200 Merge tag 'amlogic-arm64-dt-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/dt Amlogic ARM64 DT changes for v5.20: - adjust whitespace around '=' - add reset controller node for Meson-S4 SoC - correct gpio-keys properties - align gpio-key node names with dtschema - add gpio-fan control to GS-King-X * tag 'amlogic-arm64-dt-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: arm64: dts: meson: add gpio-fan control to GS-King-X arm64: dts: amlogic: align gpio-key node names with dtschema arm64: dts: amlogic: correct gpio-keys properties arm64: dts: meson: add reset controller for Meson-S4 SoC arm64: dts: amlogic: adjust whitespace around '=' Link: https://lore.kernel.org/r/9c8b8570-f20c-ce9a-8c6c-51fdadf7722c@baylibre.com Signed-off-by: Arnd Bergmann commit d5444cc4cbbe52332b655e356fc9a9dad43de925 Merge: 7ccd1f6dcec0 c110f7a94015 Author: Arnd Bergmann Date: Fri Jul 1 16:15:23 2022 +0200 Merge tag 'amlogic-arm-dt-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/dt Amlogic ARM DT changes for v5.20: - adjust whitespace around '=' in ARM meson DT * tag 'amlogic-arm-dt-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: ARM: dts: meson: adjust whitespace around '=' Link: https://lore.kernel.org/r/51034acd-13db-5c25-7b9f-ff87537406bd@baylibre.com Signed-off-by: Arnd Bergmann commit 7ccd1f6dcec04231dab8ee0ab87e340cd43d647e Merge: 5d16aa7458a4 2f7a7f941d77 Author: Arnd Bergmann Date: Fri Jul 1 16:14:16 2022 +0200 Merge tag 'dt-cleanup-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Cleanup of ARM DTS for v5.20 Series of cleanups for ARM DTS: 1. White-spaces, gpio-key subnode names, USB DWC3/EHCI node names, 2. Add board-level compatibles to Aspeed evaluation boards. * tag 'dt-cleanup-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: stih407-family: Harmonize DWC USB3 DT nodes name ARM: dts: lpc18xx: Harmonize EHCI/OHCI DT nodes name ARM: dts: ast2600-evb-a1: fix board compatible ARM: dts: ast2600-evb: fix board compatible ARM: dts: ast2500-evb: fix board compatible ARM: dts: animeo: correct gpio-keys properties ARM: dts: animeo: align gpio-key node names with dtschema ARM: dts: sd: adjust whitespace around '=' ARM: dts: sti: adjust whitespace around '=' ARM: dts: ste: adjust whitespace around '=' ARM: dts: nuvoton: adjust whitespace around '=' ARM: dts: lpc: adjust whitespace around '=' ARM: dts: ecx: adjust whitespace around '=' ARM: dts: alpine: adjust whitespace around '=' ARM: dts: spear: adjust whitespace around '=' ARM: dts: axm: adjust whitespace around '=' ARM: dts: at91: adjust whitespace around '=' ARM: dts: aspeed: adjust whitespace around '=' ARM: dts: pxa: adjust whitespace around '=' Link: https://lore.kernel.org/r/20220627082842.50508-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 5d16aa7458a4b1c5f9d939f3e25353ade733d053 Merge: 3966af40559d 87ccc38e2f8e Author: Arnd Bergmann Date: Fri Jul 1 16:13:27 2022 +0200 Merge tag 'dt64-cleanup-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Cleanup of ARM64 DTS for v5.20 Series of cleanups for ARM64 DTS: White-spaces, gpio-key subnode names, USB DWC3/EHCI node names. * tag 'dt64-cleanup-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: apm: Harmonize DWC USB3 DT nodes name arm64: dts: hisilicon: correct gpio-keys properties arm64: dts: hisilicon: align gpio-key node names with dtschema arm64: dts: broadcom: align gpio-key node names with dtschema arm64: dts: apm: correct gpio-keys properties arm64: dts: microchip: adjust whitespace around '=' arm64: dts: sprd: adjust whitespace around '=' arm64: dts: hisilicon: adjust whitespace around '=' arm64: dts: marvell: adjust whitespace around '=' arm64: dts: lg: adjust whitespace around '=' arm64: dts: apm: adjust whitespace around '=' arm64: dts: amd: adjust whitespace around '=' Link: https://lore.kernel.org/r/20220627082842.50508-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 3966af40559dd690ff42fdea8f40c1f647579d49 Merge: 6c0534397d87 357513c052e1 Author: Arnd Bergmann Date: Fri Jul 1 16:11:58 2022 +0200 Merge tag 'socfpga_dts_updates_for_v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/dt SoCFPGA dts updates for v5.20 - Clean up the Mercury++ AA1 dts - Add support the Google Chameleon v3 board - Add defined GIC interrupt type for Agilex ECC - Fix coding style around Stratix10 QSPI dts entry - Add support for Stratix10 SW Virtual platform - Move clocks entry out of the Stratix10 soc node * tag 'socfpga_dts_updates_for_v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: dts: altera: socfpga_stratix10: move clocks out of soc node arm64: dts: Add support for Stratix 10 Software Virtual Platform dt-bindings: altera: document Stratix 10 SWVP compatibles arm64: dts: altera: adjust whitespace around '=' arm64: dts: intel: socfpga_agilex: use defined GIC interrupt type for ECC dt-bindings: altera: Add Chameleon v3 board ARM: dts: socfpga: Add Google Chameleon v3 devicetree ARM: dts: socfpga: Add atsha204a node to Mercury+ AA1 dts ARM: dts: socfpga: Move sdmmc-ecc node to Arria 10 dts ARM: dts: socfpga: Change Mercury+ AA1 dts to dtsi Link: https://lore.kernel.org/r/20220626004437.1224820-1-dinguyen@kernel.org Signed-off-by: Arnd Bergmann commit 6c0534397d871741e6f1cef3401d49b94209c3c4 Merge: 4505bb959ad2 774fecc7ece1 Author: Arnd Bergmann Date: Fri Jul 1 16:08:54 2022 +0200 Merge tag 'renesas-dt-bindings-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas DT binding updates for v5.20 - Reorganize the renesas,prr DT binding document. * tag 'renesas-dt-bindings-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: dt-bindings: soc: renesas: Move renesas,prr from arm to soc Link: https://lore.kernel.org/r/cover.1656069640.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 4505bb959ad210eaa5200477d1c06408c9e3063a Merge: 813b08089075 3c7742a45c17 Author: Arnd Bergmann Date: Fri Jul 1 16:03:00 2022 +0200 Merge tag 'renesas-arm-dt-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM DT updates for v5.20 - ADC and SPI support for the RZ/G2UL Soc and the RZ/G2UL SMARC EVK development board, - Ethernet support for the RZ/V2M SoC and the RZV2MEVK2 development board, - Thermal, IOMMU, Universal Flash Storage, octal Cortex-A55, and full serial support for the R-Car S4-8 SoC on the Spider development board, - RTC support for the RZN1D-DB board, - Miscellaneous fixes and improvements. * tag 'renesas-arm-dt-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: (27 commits) ARM: dts: rza2mevb: Fix LED node names arm64: dts: renesas: Fix thermal-sensors on single-zone sensors arm64: dts: renesas: spider-cpu: Enable SCIF0 on second connector arm64: dts: renesas: r8a779f0: Add SCIF nodes arm64: dts: renesas: r8a779f0: Add HSCIF nodes arm64: dts: renesas: r8a779f0: Add DMA properties to SCIF3 arm64: dts: renesas: Add missing space after remote-endpoint arm64: dts: renesas: rzg2ul-smarc-som: Enable ADC on SMARC platform arm64: dts: renesas: rzg2ul-smarc: Enable RSPI1 on carrier board arm64: dts: renesas: r8a779f0: Add CPU core clocks arm64: dts: renesas: r8a779f0: Add CPUIdle support arm64: dts: renesas: r8a779f0: Add secondary CA55 CPU cores arm64: dts: renesas: r8a779f0: Add L3 cache controller arm64: dts: renesas: r8a779a0: Add CPU0 core clock arm64: dts: renesas: r8a779a0: Update to R-Car Gen4 compatible values ARM: dts: r9a06g032-rzn1d400-db: Enable rtc0 arm64: dts: renesas: rzg2l-smarc: Use proper bool operator arm64: dts: renesas: r8a779f0: Add UFS node arm64: dts: renesas: r8a779f0: Add iommus to DMAC nodes arm64: dts: renesas: r8a779f0: Add IPMMU nodes ... Link: https://lore.kernel.org/r/cover.1656069634.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 813b0808907511ea30a7c648a52ccf625b4d5f6d Merge: 7949803d3847 1a4f20cab641 Author: Arnd Bergmann Date: Fri Jul 1 16:01:52 2022 +0200 Merge tag 'samsung-dt64-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM64 changes for v5.20 1. Add CPU cache, UFS to Tesla FSD. 2. Add reboot-mode (boot into specific bootloader mode) to ExynosAutov9. 3. Add watchdogs to ExynosAutov9. 4. Add eMMC to Exynos7885 JackpotLTE (Samsung Galaxy A8). 5. DTS cleanup: white-spaces, node names, LED color/function. 6. Switch to DTS-local header for pinctrl register values instead of bindings header. The bindings header is being deprecated because it does not reflect the purpose of bindings. * tag 'samsung-dt64-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: Add internal eMMC support to jackpotlte dt-bindings: clock: Add indices for Exynos7885 TREX clocks dt-bindings: clock: Add bindings for Exynos7885 CMU_FSYS arm64: dts: exynos: enable secondary ufs devices ExynosAutov9 SADK arm64: dts: exynos: add secondary ufs devices in ExynosAutov9 arm64: dts: fsd: use local header for pinctrl register values arm64: dts: exynos: use local header for pinctrl register values arm64: dts: exynos: align MMC node name with dtschema arm64: dts: exynos: adjust DT style of ufs nodes in ExynosAutov9 arm64: dts: exynos: adjust whitespace around '=' arm64: dts: fsd: add ufs device node arm64: dts: exynos: add watchdog in ExynosAutov9 arm64: dts: exynos: add syscon reboot/reboot_mode support in ExynosAutov9 dt-bindings: soc: add samsung,boot-mode definitions arm64: dts: fsd: Add cpu cache information Link: https://lore.kernel.org/r/20220624080746.31947-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 7949803d384738ddba6f2c92db8635eb74f0434d Merge: 03c765b0e3b4 82cd16902a51 Author: Arnd Bergmann Date: Fri Jul 1 16:00:56 2022 +0200 Merge tag 'samsung-dt-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v5.20 1. Add display panel and backlight to P4 Note family (Samsung Galaxy Note 10.1). 2. DTS cleanup: white-spaces, node names, LED color/function. 3. Switch to DTS-local header for pinctrl register values instead of bindings header. The bindings header is being deprecated because it does not reflect the purpose of bindings. * tag 'samsung-dt-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: add function and color to LED nodes in Odroid XU/XU3 ARM: dts: exynos: add function and color to LED node in Odroid XU4 ARM: dts: exynos: add function and color to LED node in Odroid HC1 ARM: dts: exynos: add function and color to LED nodes in Odroid X/X2 ARM: dts: exynos: add function and color to LED node in Odroid U3 ARM: dts: exynos: add function and color to LED nodes in Itop Elite ARM: dts: exynos: add function to LED nodes in Tiny4412 ARM: dts: exynos: add function to LED node in Origen 4210 ARM: dts: exynos: add function and color to aat1290 flash LED node in Galaxy S3 ARM: dts: exynos: align aat1290 flash LED node with bindings in Galaxy S3 ARM: dts: s5pv210: align gpio-key node names with dtschema ARM: dts: exynos: align gpio-key node names with dtschema ARM: dts: exynos: use local header for pinctrl register values ARM: dts: s5pv210: use local header for pinctrl register values ARM: dts: s3c64xx: use local header for pinctrl register values ARM: dts: s3c2410: use local header for pinctrl register values ARM: dts: exynos: align MMC node name with dtschema ARM: dts: exynos: adjust whitespace around '=' ARM: dts: exynos: add panel and backlight to p4note Link: https://lore.kernel.org/r/20220624080746.31947-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit b69a2afd5afce9bf6d56e349d6ab592c916e20f2 Author: Jonathan McDowell Date: Thu Jun 30 08:36:12 2022 +0000 x86/kexec: Carry forward IMA measurement log on kexec On kexec file load, the Integrity Measurement Architecture (IMA) subsystem may verify the IMA signature of the kernel and initramfs, and measure it. The command line parameters passed to the kernel in the kexec call may also be measured by IMA. A remote attestation service can verify a TPM quote based on the TPM event log, the IMA measurement list and the TPM PCR data. This can be achieved only if the IMA measurement log is carried over from the current kernel to the next kernel across the kexec call. PowerPC and ARM64 both achieve this using device tree with a "linux,ima-kexec-buffer" node. x86 platforms generally don't make use of device tree, so use the setup_data mechanism to pass the IMA buffer to the new kernel. Signed-off-by: Jonathan McDowell Signed-off-by: Borislav Petkov Reviewed-by: Mimi Zohar # IMA function definitions Link: https://lore.kernel.org/r/YmKyvlF3my1yWTvK@noodles-fedora-PC23Y6EG arch/x86/Kconfig | 1 + arch/x86/include/uapi/asm/bootparam.h | 9 +++++ arch/x86/kernel/e820.c | 6 ++-- arch/x86/kernel/kexec-bzimage64.c | 42 +++++++++++++++++++++-- arch/x86/kernel/setup.c | 63 +++++++++++++++++++++++++++++++++++ drivers/of/kexec.c | 13 +++----- include/linux/ima.h | 5 +++ include/linux/of.h | 2 -- security/integrity/ima/ima_kexec.c | 2 +- 9 files changed, 127 insertions(+), 16 deletions(-) commit b0d93b44641a83c28014ca38001e85bf6dc8501e Author: Stanislav Fomichev Date: Thu Jun 30 15:42:03 2022 -0700 selftests/bpf: Skip lsm_cgroup when we don't have trampolines With arch_prepare_bpf_trampoline removed on x86: [...] #98/1 lsm_cgroup/functional:SKIP #98 lsm_cgroup:SKIP Summary: 1/0 PASSED, 1 SKIPPED, 0 FAILED Fixes: dca85aac8895 ("selftests/bpf: lsm_cgroup functional test") Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Hao Luo Link: https://lore.kernel.org/bpf/20220630224203.512815-1-sdf@google.com tools/testing/selftests/bpf/prog_tests/lsm_cgroup.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit e252f2ed1c8c6c3884ab5dd34e003ed21f1fe6e0 Author: Amir Goldstein Date: Wed Jun 29 17:42:10 2022 +0300 fanotify: introduce FAN_MARK_IGNORE This flag is a new way to configure ignore mask which allows adding and removing the event flags FAN_ONDIR and FAN_EVENT_ON_CHILD in ignore mask. The legacy FAN_MARK_IGNORED_MASK flag would always ignore events on directories and would ignore events on children depending on whether the FAN_EVENT_ON_CHILD flag was set in the (non ignored) mask. FAN_MARK_IGNORE can be used to ignore events on children without setting FAN_EVENT_ON_CHILD in the mark's mask and will not ignore events on directories unconditionally, only when FAN_ONDIR is set in ignore mask. The new behavior is non-downgradable. After calling fanotify_mark() with FAN_MARK_IGNORE once, calling fanotify_mark() with FAN_MARK_IGNORED_MASK on the same object will return EEXIST error. Setting the event flags with FAN_MARK_IGNORE on a non-dir inode mark has no meaning and will return ENOTDIR error. The meaning of FAN_MARK_IGNORED_SURV_MODIFY is preserved with the new FAN_MARK_IGNORE flag, but with a few semantic differences: 1. FAN_MARK_IGNORED_SURV_MODIFY is required for filesystem and mount marks and on an inode mark on a directory. Omitting this flag will return EINVAL or EISDIR error. 2. An ignore mask on a non-directory inode that survives modify could never be downgraded to an ignore mask that does not survive modify. With new FAN_MARK_IGNORE semantics we make that rule explicit - trying to update a surviving ignore mask without the flag FAN_MARK_IGNORED_SURV_MODIFY will return EEXIST error. The conveniene macro FAN_MARK_IGNORE_SURV is added for (FAN_MARK_IGNORE | FAN_MARK_IGNORED_SURV_MODIFY), because the common case should use short constant names. Link: https://lore.kernel.org/r/20220629144210.2983229-4-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fanotify/fanotify.h | 2 ++ fs/notify/fanotify/fanotify_user.c | 63 ++++++++++++++++++++++++++++++++------ include/linux/fanotify.h | 5 ++- include/uapi/linux/fanotify.h | 8 +++++ 4 files changed, 67 insertions(+), 11 deletions(-) commit dbdd9a28e1406ab8218a69e60f10a168b968c81d Author: Li kunyu Date: Fri Jul 1 17:13:45 2022 +0800 net/cmsg_sender: Remove a semicolon Remove the repeated ';' from code. Signed-off-by: Li kunyu Signed-off-by: David S. Miller tools/testing/selftests/net/cmsg_sender.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8afd7215aa97f8868d033f6e1d01a276ab2d29c0 Author: Amir Goldstein Date: Wed Jun 29 17:42:09 2022 +0300 fanotify: cleanups for fanotify_mark() input validations Create helper fanotify_may_update_existing_mark() for checking for conflicts between existing mark flags and fanotify_mark() flags. Use variable mark_cmd to make the checks for mark command bits cleaner. Link: https://lore.kernel.org/r/20220629144210.2983229-3-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fanotify/fanotify_user.c | 30 +++++++++++++++++++++--------- include/linux/fanotify.h | 9 +++++---- 2 files changed, 26 insertions(+), 13 deletions(-) commit 31a371e419c885e0f137ce70395356ba8639dc52 Author: Amir Goldstein Date: Wed Jun 29 17:42:08 2022 +0300 fanotify: prepare for setting event flags in ignore mask Setting flags FAN_ONDIR FAN_EVENT_ON_CHILD in ignore mask has no effect. The FAN_EVENT_ON_CHILD flag in mask implicitly applies to ignore mask and ignore mask is always implicitly applied to events on directories. Define a mark flag that replaces this legacy behavior with logic of applying the ignore mask according to event flags in ignore mask. Implement the new logic to prepare for supporting an ignore mask that ignores events on children and ignore mask that does not ignore events on directories. To emphasize the change in terminology, also rename ignored_mask mark member to ignore_mask and use accessors to get only the effective ignored events or the ignored events and flags. This change in terminology finally aligns with the "ignore mask" language in man pages and in most of the comments. Link: https://lore.kernel.org/r/20220629144210.2983229-2-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fanotify/fanotify.c | 19 ++++---- fs/notify/fanotify/fanotify_user.c | 21 +++++---- fs/notify/fdinfo.c | 6 +-- fs/notify/fsnotify.c | 21 +++++---- include/linux/fsnotify_backend.h | 89 +++++++++++++++++++++++++++++++++++--- 5 files changed, 121 insertions(+), 35 deletions(-) commit c05787b4c2f80a3bebcb9cdbf255d4fa5c1e24e1 Author: Oliver Ford Date: Wed May 18 15:59:59 2022 +0100 fs: inotify: Fix typo in inotify comment Correct spelling in comment. Signed-off-by: Oliver Ford Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20220518145959.41-1-ojford@gmail.com fs/notify/inotify/inotify_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7349660438603ed19282e75949561406531785a5 Author: Daniel Starke Date: Fri Jul 1 14:23:32 2022 +0200 tty: n_gsm: fix resource allocation order in gsm_activate_mux() Within gsm_activate_mux() all timers and locks are initiated before the actual resource for the control channel is allocated. This can lead to race conditions. Allocate the control channel DLCI object first to avoid race conditions. Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20220701122332.2039-2-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0af021678d5d30c31f5a6b631f404ead3575212a Author: Daniel Starke Date: Fri Jul 1 14:23:31 2022 +0200 tty: n_gsm: fix deadlock and link starvation in outgoing data path The current implementation queues up new control and user packets as needed and processes this queue down to the ldisc in the same code path. That means that the upper and the lower layer are hard coupled in the code. Due to this deadlocks can happen as seen below while transmitting data, especially during ldisc congestion. Furthermore, the data channels starve the control channel on high transmission load on the ldisc. Introduce an additional control channel data queue to prevent timeouts and link hangups during ldisc congestion. This is being processed before the user channel data queue in gsm_data_kick(), i.e. with the highest priority. Put the queue to ldisc data path into a workqueue and trigger it whenever new data has been put into the transmission queue. Change gsm_dlci_data_sweep() accordingly to fill up the transmission queue until TX_THRESH_HI. This solves the locking issue, keeps latency low and provides good performance on high data load. Note that now all packets from a DLCI are removed from the internal queue if the associated DLCI was closed. This ensures that no data is sent by the introduced write task to an already closed DLCI. BUG: spinlock recursion on CPU#0, test_v24_loop/124 lock: serial8250_ports+0x3a8/0x7500, .magic: dead4ead, .owner: test_v24_loop/124, .owner_cpu: 0 CPU: 0 PID: 124 Comm: test_v24_loop Tainted: G O 5.18.0-rc2 #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 Call Trace: dump_stack_lvl+0x34/0x44 do_raw_spin_lock+0x76/0xa0 _raw_spin_lock_irqsave+0x72/0x80 uart_write_room+0x3b/0xc0 gsm_data_kick+0x14b/0x240 [n_gsm] gsmld_write_wakeup+0x35/0x70 [n_gsm] tty_wakeup+0x53/0x60 tty_port_default_wakeup+0x1b/0x30 serial8250_tx_chars+0x12f/0x220 serial8250_handle_irq.part.0+0xfe/0x150 serial8250_default_handle_irq+0x48/0x80 serial8250_interrupt+0x56/0xa0 __handle_irq_event_percpu+0x78/0x1f0 handle_irq_event+0x34/0x70 handle_fasteoi_irq+0x90/0x1e0 __common_interrupt+0x69/0x100 common_interrupt+0x48/0xc0 asm_common_interrupt+0x1e/0x40 RIP: 0010:__do_softirq+0x83/0x34e Code: 2a 0a ff 0f b7 ed c7 44 24 10 0a 00 00 00 48 c7 c7 51 2a 64 82 e8 2d e2 d5 ff 65 66 c7 05 83 af 1e 7e 00 00 fb b8 ff ff ff ff <49> c7 c2 40 61 80 82 0f bc c5 41 89 c4 41 83 c4 01 0f 84 e6 00 00 RSP: 0018:ffffc90000003f98 EFLAGS: 00000286 RAX: 00000000ffffffff RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff82642a51 RDI: ffffffff825bb5e7 RBP: 0000000000000200 R08: 00000008de3271a8 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000030 R14: 0000000000000000 R15: 0000000000000000 ? __do_softirq+0x73/0x34e irq_exit_rcu+0xb5/0x100 common_interrupt+0xa4/0xc0 asm_common_interrupt+0x1e/0x40 RIP: 0010:_raw_spin_unlock_irqrestore+0x2e/0x50 Code: 00 55 48 89 fd 48 83 c7 18 53 48 89 f3 48 8b 74 24 10 e8 85 28 36 ff 48 89 ef e8 cd 58 36 ff 80 e7 02 74 01 fb bf 01 00 00 00 3d 97 33 ff 65 8b 05 96 23 2b 7e 85 c0 74 03 5b 5d c3 0f 1f 44 RSP: 0018:ffffc9000020fd08 EFLAGS: 00000202 RAX: 0000000000000000 RBX: 0000000000000246 RCX: 0000000000000000 RDX: 0000000000000004 RSI: ffffffff8257fd74 RDI: 0000000000000001 RBP: ffff8880057de3a0 R08: 00000008de233000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000100 R14: 0000000000000202 R15: ffff8880057df0b8 ? _raw_spin_unlock_irqrestore+0x23/0x50 gsmtty_write+0x65/0x80 [n_gsm] n_tty_write+0x33f/0x530 ? swake_up_all+0xe0/0xe0 file_tty_write.constprop.0+0x1b1/0x320 ? n_tty_flush_buffer+0xb0/0xb0 new_sync_write+0x10c/0x190 vfs_write+0x282/0x310 ksys_write+0x68/0xe0 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f3e5e35c15c Code: 8b 7c 24 08 89 c5 e8 c5 ff ff ff 89 ef 89 44 24 08 e8 58 bc 02 00 8b 44 24 08 48 83 c4 10 5d c3 48 63 ff b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 10 48 8b 15 fd fc 05 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffcee77cd18 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007ffcee77cd70 RCX: 00007f3e5e35c15c RDX: 0000000000000100 RSI: 00007ffcee77cd90 RDI: 0000000000000003 RBP: 0000000000000100 R08: 0000000000000000 R09: 7efefefefefefeff R10: 00007f3e5e3bddeb R11: 0000000000000246 R12: 00007ffcee77ce8f R13: 0000000000000001 R14: 000056214404e010 R15: 00007ffcee77cd90 Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20220701122332.2039-1-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 407 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 279 insertions(+), 128 deletions(-) commit c7b1267b1c64925ef0c036ffb303057884481c53 Author: Bin Chen Date: Thu Jun 30 13:21:55 2022 +0200 nfp: support VF rate limit with NFDK Support VF rate limiting with NFDK by adding ndo_set_vf_rate to the NFDK ops structure. NFDK is used to communicate via PCIE to NFP-3800 based NICs while NFD3 is used for other NICs supported by the NFP driver. The VF rate limit feature is already supported by the driver for NFD3. Signed-off-by: Bin Chen Reviewed-by: Baowen Zheng Reviewed-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 1 + 1 file changed, 1 insertion(+) commit 7fa2d1707d4102a5b3dcd3f49b235015f4d66955 Author: Oliver Neukum Date: Thu Jun 30 13:51:09 2022 +0200 cdc-eem: always use BIT Either you use BIT(x) or 1 << x in the same expression. Mixing them is ridiculous. Go to BIT() Signed-off-by: Oliver Neukum Signed-off-by: David S. Miller drivers/net/usb/cdc_eem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 368843301d08de38186fcd98e991fc12caac72b1 Author: Li kunyu Date: Thu Jun 30 20:44:52 2022 +0800 cxgb4: Fix typo in string Remove the repeated ',' from string Signed-off-by: Li kunyu Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c154ab47f5e5ff632d2b7af6342c027d7e04b92 Author: Alaa Mohamed Date: Thu Jun 30 12:24:49 2022 +0200 selftests: net: fib_rule_tests: fix support for running individual tests parsing and usage of -t got missed in the previous patch. this patch fixes it Fixes: 816cda9ae531 ("selftests: net: fib_rule_tests: add support to select a test to run") Signed-off-by: Alaa Mohamed Signed-off-by: David S. Miller tools/testing/selftests/net/fib_rule_tests.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 13463f731fbbadbd6d7610600d4924c3707e4ecd Merge: 456bfd9dc8a1 e918c137db40 Author: David S. Miller Date: Fri Jul 1 13:25:00 2022 +0100 Merge branch 'mptcp-mem-scheduling' Mat Martineau says: ==================== mptcp: Updates for mem scheduling and SK_RECLAIM In the "net: reduce tcp_memory_allocated inflation" series (merge commit e10b02ee5b6c), Eric Dumazet noted that "Removal of SK_RECLAIM_CHUNK and SK_RECLAIM_THRESHOLD is left to MPTCP maintainers as a follow up." Patches 1-3 align MPTCP with the above TCP changes to forward memory allocation, reclaim, and memory scheduling. Patch 4 removes the SK_RECLAIM_* macros as Eric requested. ==================== Signed-off-by: David S. Miller commit e918c137db4083e59866d2aaa603887cbd9969bf Author: Paolo Abeni Date: Thu Jun 30 15:17:57 2022 -0700 net: remove SK_RECLAIM_THRESHOLD and SK_RECLAIM_CHUNK There are no more users for the mentioned macros, just drop them. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller include/net/sock.h | 5 ----- 1 file changed, 5 deletions(-) commit 69d93daec026cdda98e29e8edb12534bfa5b1a9b Author: Paolo Abeni Date: Thu Jun 30 15:17:56 2022 -0700 mptcp: refine memory scheduling Similar to commit 7c80b038d23e ("net: fix sk_wmem_schedule() and sk_rmem_schedule() errors"), let the MPTCP receive path schedule exactly the required amount of memory. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller net/mptcp/protocol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d24141fe7b48d3572afb673ae350cf0e88caba6c Author: Paolo Abeni Date: Thu Jun 30 15:17:55 2022 -0700 mptcp: drop SK_RECLAIM_* macros After commit 4890b686f408 ("net: keep sk->sk_forward_alloc as small as possible"), the MPTCP protocol is the last SK_RECLAIM_CHUNK and SK_RECLAIM_THRESHOLD users. Update the MPTCP reclaim schema to match the core/TCP one and drop the mentioned macros. This additionally clean the MPTCP code a bit. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller net/mptcp/protocol.c | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) commit 4aaa1685f750b293316d2a09cde2ea25be2a5de2 Author: Paolo Abeni Date: Thu Jun 30 15:17:54 2022 -0700 mptcp: never fetch fwd memory from the subflow The memory accounting is broken in such exceptional code path, and after commit 4890b686f408 ("net: keep sk->sk_forward_alloc as small as possible") we can't find much help there. Drop the broken code. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller net/mptcp/protocol.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit b4aed01de48652928c8299f793625936f14d1739 Author: Linus Walleij Date: Fri Jul 1 14:05:11 2022 +0200 ARM: davinci: Delete DM646x board files The interest of maintaining the DaVinci DM644x board files seems very low. Patches to convert the EVM board to use GPIO descriptors has not been reviewed, tested or merged for several merge windows in a row, see link below. When I look in the logs for the board files I see nothing but generic kernel maintenance and no testing on real hardware for years. I conclude the DM646x board files are unused and can be deleted. Cc: Kevin Hilman Cc: Arnd Bergmann Cc: Matt Porter Cc: Sekhar Nori Cc: Bartosz Golaszewski Link: https://lore.kernel.org/linux-arm-kernel/20220507124536.171930-2-linus.walleij@linaro.org/ Signed-off-by: Linus Walleij arch/arm/mach-davinci/Kconfig | 17 - arch/arm/mach-davinci/Makefile | 2 - arch/arm/mach-davinci/board-dm646x-evm.c | 873 ------------------------------- arch/arm/mach-davinci/dm646x.c | 726 ------------------------- 4 files changed, 1618 deletions(-) commit 7dd33764486ddc92abf8a9b97d87d9820d6b1e29 Author: Linus Walleij Date: Fri Jul 1 13:50:57 2022 +0200 ARM: davinci: Delete DM644x board files The interest of maintaining the DaVinci DM644x board files seems very low. Patches to convert the EVM board to use GPIO descriptors has not been reviewed, tested or merged for several merge windows in a row, see link below. When I look in the logs for the board files I see nothing but generic kernel maintenance and no testing on real hardware for years. I conclude the DM644x board files are unused and can be deleted. Cc: Arnd Bergmann Cc: Matt Porter Cc: Sekhar Nori Cc: Bartosz Golaszewski Link: https://lore.kernel.org/linux-arm-kernel/20220507124536.171930-1-linus.walleij@linaro.org/ Signed-off-by: Linus Walleij arch/arm/mach-davinci/Kconfig | 27 - arch/arm/mach-davinci/Makefile | 4 - arch/arm/mach-davinci/board-dm644x-evm.c | 928 ------------------------------ arch/arm/mach-davinci/board-neuros-osd2.c | 238 -------- arch/arm/mach-davinci/board-sffsdr.c | 151 ----- arch/arm/mach-davinci/dm644x.c | 765 ------------------------ 6 files changed, 2113 deletions(-) commit 3a4413b77429b56bae725363392b56ea65c790c4 Author: Jayesh Choudhary Date: Tue Jun 28 10:32:32 2022 +0530 dmaengine: ti: k3-psil-j721s2: Add psil threads for sa2ul Add endpoint configuration for the four ingress and two egress threads for main domain crypto accelerator. Signed-off-by: Jayesh Choudhary Link: https://lore.kernel.org/r/20220628050232.331956-1-j-choudhary@ti.com Signed-off-by: Vinod Koul drivers/dma/ti/k3-psil-j721s2.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit de6921856f99c11d3986c6702d851e1328d4f7f6 Author: Francis Laniel Date: Wed Jun 8 17:24:46 2022 +0100 arm64: Do not forget syscall when starting a new thread. Enable tracing of the execve*() system calls with the syscalls:sys_exit_execve tracepoint by removing the call to forget_syscall() when starting a new thread and preserving the value of regs->syscallno across exec. Signed-off-by: Francis Laniel Link: https://lore.kernel.org/r/20220608162447.666494-2-flaniel@linux.microsoft.com Signed-off-by: Will Deacon arch/arm64/include/asm/processor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9e07352ef7791b08c3784acb2822dd9363ec4eae Author: Nathan Chancellor Date: Thu Jun 30 08:31:21 2022 -0700 arm64: vdso32: Add DWARF_DEBUG When building the 32-bit vDSO with LLVM 15 and CONFIG_DEBUG_INFO, there are the following orphan section warnings: ld.lld: warning: arch/arm64/kernel/vdso32/note.o:(.debug_abbrev) is being placed in '.debug_abbrev' ld.lld: warning: arch/arm64/kernel/vdso32/note.o:(.debug_info) is being placed in '.debug_info' ld.lld: warning: arch/arm64/kernel/vdso32/note.o:(.debug_str_offsets) is being placed in '.debug_str_offsets' ld.lld: warning: arch/arm64/kernel/vdso32/note.o:(.debug_str) is being placed in '.debug_str' ld.lld: warning: arch/arm64/kernel/vdso32/note.o:(.debug_addr) is being placed in '.debug_addr' ld.lld: warning: arch/arm64/kernel/vdso32/note.o:(.debug_line) is being placed in '.debug_line' ld.lld: warning: arch/arm64/kernel/vdso32/note.o:(.debug_line_str) is being placed in '.debug_line_str' ld.lld: warning: arch/arm64/kernel/vdso32/vgettimeofday.o:(.debug_loclists) is being placed in '.debug_loclists' ld.lld: warning: arch/arm64/kernel/vdso32/vgettimeofday.o:(.debug_abbrev) is being placed in '.debug_abbrev' ld.lld: warning: arch/arm64/kernel/vdso32/vgettimeofday.o:(.debug_info) is being placed in '.debug_info' ld.lld: warning: arch/arm64/kernel/vdso32/vgettimeofday.o:(.debug_rnglists) is being placed in '.debug_rnglists' ld.lld: warning: arch/arm64/kernel/vdso32/vgettimeofday.o:(.debug_str_offsets) is being placed in '.debug_str_offsets' ld.lld: warning: arch/arm64/kernel/vdso32/vgettimeofday.o:(.debug_str) is being placed in '.debug_str' ld.lld: warning: arch/arm64/kernel/vdso32/vgettimeofday.o:(.debug_addr) is being placed in '.debug_addr' ld.lld: warning: arch/arm64/kernel/vdso32/vgettimeofday.o:(.debug_frame) is being placed in '.debug_frame' ld.lld: warning: arch/arm64/kernel/vdso32/vgettimeofday.o:(.debug_line) is being placed in '.debug_line' ld.lld: warning: arch/arm64/kernel/vdso32/vgettimeofday.o:(.debug_line_str) is being placed in '.debug_line_str' These are DWARF5 sections, as that is the implicit default version for clang-14 and newer when just '-g' is used. All DWARF sections are handled by the DWARF_DEBUG macro from include/asm-generic/vmlinux.lds.h so use that macro here to fix the warnings regardless of DWARF version. Fixes: 9d4775b332e1 ("arm64: vdso32: enable orphan handling for VDSO") Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20220630153121.1317045-3-nathan@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/vdso32/vdso.lds.S | 1 + 1 file changed, 1 insertion(+) commit 859716b4131feb42fd2e3d87fbc25ec28152c029 Author: Nathan Chancellor Date: Thu Jun 30 08:31:20 2022 -0700 arm64: vdso32: Shuffle .ARM.exidx section above ELF_DETAILS When building the 32-bit vDSO after commit 5c4fb60816ea ("arm64: vdso32: add ARM.exidx* sections"), ld.lld 11 fails to link: ld.lld: error: could not allocate headers ld.lld: error: unable to place section .text at file offset [0x2A0, 0xBB1]; check your linker script for overflows ld.lld: error: unable to place section .comment at file offset [0xBB2, 0xC8A]; check your linker script for overflows ld.lld: error: unable to place section .symtab at file offset [0xC8C, 0xE0B]; check your linker script for overflows ld.lld: error: unable to place section .strtab at file offset [0xE0C, 0xF1C]; check your linker script for overflows ld.lld: error: unable to place section .shstrtab at file offset [0xF1D, 0xFAA]; check your linker script for overflows ld.lld: error: section .ARM.exidx file range overlaps with .hash >>> .ARM.exidx range is [0x90, 0xCF] >>> .hash range is [0xB4, 0xE3] ld.lld: error: section .hash file range overlaps with .ARM.attributes >>> .hash range is [0xB4, 0xE3] >>> .ARM.attributes range is [0xD0, 0x10B] ld.lld: error: section .ARM.attributes file range overlaps with .dynsym >>> .ARM.attributes range is [0xD0, 0x10B] >>> .dynsym range is [0xE4, 0x133] ld.lld: error: section .ARM.exidx virtual address range overlaps with .hash >>> .ARM.exidx range is [0x90, 0xCF] >>> .hash range is [0xB4, 0xE3] ld.lld: error: section .ARM.exidx load address range overlaps with .hash >>> .ARM.exidx range is [0x90, 0xCF] >>> .hash range is [0xB4, 0xE3] This was fixed in ld.lld 12 with a change to match GNU ld's semantics of placing non-SHF_ALLOC sections after SHF_ALLOC sections. To workaround this issue, move the .ARM.exidx section before the .comment, .symtab, .strtab, and .shstrtab sections (ELF_DETAILS) so that those sections remain contiguous with the .ARM.attributes section. Fixes: 5c4fb60816ea ("arm64: vdso32: add ARM.exidx* sections") Link: https://github.com/llvm/llvm-project/commit/ec29538af2e0886a65f479d6a533956a1c478132 Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20220630153121.1317045-2-nathan@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/vdso32/vdso.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9b728f8600bb0b3d0a190dd9480b193b77773a8 Author: Chen Zhongjin Date: Fri Jul 1 11:54:56 2022 +0800 arm64: compat: Move sigreturn32.S to .rodata section Kuser code should be inside .rodata. sigreturn32.S is splited from kuser32.S, the code in .text section is never executed. Move it to .rodata. Signed-off-by: Chen Zhongjin Link: https://lore.kernel.org/r/20220701035456.250877-1-chenzhongjin@huawei.com Signed-off-by: Will Deacon arch/arm64/kernel/sigreturn32.S | 1 + 1 file changed, 1 insertion(+) commit 8bc65d38ee466897a264c9e336fe21058818b1b1 Author: Aloka Dixit Date: Sun May 22 23:49:04 2022 -0700 wifi: nl80211: retrieve EHT related elements in AP mode Add support to retrieve EHT capabilities and EHT operation elements passed by the userspace in the beacon template and store the pointers in struct cfg80211_ap_settings to be used by the drivers. Co-developed-by: Vikram Kandukuri Signed-off-by: Vikram Kandukuri Co-developed-by: Veerendranath Jakkam Signed-off-by: Veerendranath Jakkam Signed-off-by: Aloka Dixit Link: https://lore.kernel.org/r/20220523064904.28523-1-quic_alokad@quicinc.com Signed-off-by: Johannes Berg include/net/cfg80211.h | 4 ++++ net/wireless/nl80211.c | 26 ++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) commit 456bfd9dc8a11213f665a28d49010ee1d31547c4 Merge: 023e79db59ad afa646299a28 Author: David S. Miller Date: Fri Jul 1 11:21:56 2022 +0100 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/nex t-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2022-06-30 This series contains updates to ice driver only. Martyna adds support for VLAN related TC switchdev filters and reworks dummy packet implementation of VLANs to enable dynamic header insertion to allow for more rule types. Lu Wei utilizes eth_broadcast_addr() helper over an open coded version. Ziyang Xuan removes unneeded NULL checks. ==================== Signed-off-by: David S. Miller commit 883f50ead31cabff321605a6aa7c044438d44b1f Author: Olivier Moysan Date: Mon Jun 20 17:47:38 2022 +0200 iio: adc: stm32-adc: disable adc before calibration The calibration is launched from prepare callback. The ADC state when entering this function may be unknown as the ADC may have been left enabled by boot stage. One prerequisite for ADC calibration is to have ADC in disabled state. If the calibration is started when ADC is still enabled, the behavior is unpredictable, and the calibration may fail with a timeout error. Force ADC to disabled state in stm32h7_adc_selfcalib(). ADC enabling is ensured by stm32h7_adc_enable() call, before leaving prepare callback. Signed-off-by: Olivier Moysan Reviewed-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20220620154738.801706-3-olivier.moysan@foss.st.com Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc.c | 3 +++ 1 file changed, 3 insertions(+) commit cf59ad968bb70b304bd4489428135072fb4871e3 Author: Olivier Moysan Date: Mon Jun 20 17:47:37 2022 +0200 iio: adc: stm32-adc: make safe adc disable From ADC reference manual the software is allowed to write the control bit ADDIS of the ADC_CR register only if the ADC is enabled. Return immediately from stm32h7_adc_disable() if ADC is already disabled. Signed-off-by: Olivier Moysan Reviewed-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20220620154738.801706-2-olivier.moysan@foss.st.com Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc.c | 3 +++ 1 file changed, 3 insertions(+) commit 65816728967159cc4c9db6097ccbb1b452836064 Author: Jiang Jian Date: Tue Jun 21 17:23:19 2022 +0800 iio: dac: ad5380: align '*' each line and drop unneeded blank line Tidy up a missing space before */ and a unwanted blank line between function documentation and code. Signed-off-by: Jiang Jian Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220621092319.69598-1-jiangjian@cdjrlc.com Signed-off-by: Jonathan Cameron drivers/iio/dac/ad5380.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2a5bf05f123fae2fca2eeed0a0bc0eff7c97cefe Author: Colin Ian King Date: Tue Jun 21 10:47:36 2022 +0100 iio: adc: qcom-spmi-rradc: Fix spelling mistake "coherrency" -> "coherency" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20220621094736.90436-1-colin.i.king@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/adc/qcom-spmi-rradc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abeba59f93542f57b106e8d27927d36a5b02a822 Author: Joe Simmons-Talbott Date: Thu Jun 23 22:18:06 2022 -0400 iio: Don't use bare "unsigned" Use "unsigned int" rather than bare "unsigned". Reported by checkpatch.pl. Signed-off-by: Joe Simmons-Talbott Link: https://lore.kernel.org/r/20220624021806.1010962-1-joetalbott@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/industrialio-buffer.c | 10 +++++----- drivers/iio/industrialio-core.c | 4 ++-- drivers/iio/industrialio-sw-device.c | 2 +- drivers/iio/industrialio-sw-trigger.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) commit 654f9661232aa5142f8a548179576482c892b69c Author: Kory Maincent Date: Fri Jun 24 11:56:18 2022 +0200 dt-bindings: iio: dac: mcp4922: expand for mcp4921 support Add device tree bindings for the MCP4921 DAC. Signed-off-by: Kory Maincent Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220624095619.1415614-2-kory.maincent@bootlin.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/dac/microchip,mcp4922.yaml | 1 + 1 file changed, 1 insertion(+) commit 1c8dbb5be5b8a300f0c858e5ee33660a41ffffd9 Author: Kory Maincent Date: Fri Jun 24 11:56:17 2022 +0200 iio: dac: mcp4922: add support to mcp4921 Add support to mcp4921 which has only one output channel. Signed-off-by: Kory Maincent Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20220624095619.1415614-1-kory.maincent@bootlin.com Signed-off-by: Jonathan Cameron drivers/iio/dac/mcp4922.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 023e79db59ad9df54b81a1657af5a10c45de27d3 Author: Jilin Yuan Date: Thu Jun 30 16:03:55 2022 +0800 neterion/vxge: fix repeated words in comments Delete the redundant word 'frame'. Signed-off-by: Jilin Yuan Signed-off-by: David S. Miller drivers/net/ethernet/neterion/vxge/vxge-config.c | 2 +- drivers/net/ethernet/neterion/vxge/vxge-ethtool.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f9f108f6d985573b2370abf70818d9d03bd7179e Author: Jilin Yuan Date: Thu Jun 30 15:57:51 2022 +0800 ethernet/neterion: fix repeated words in comments Delete the redundant word 'the'. Delete the redundant word 'a'. Delete the redundant word 'frame'. Delete the redundant word 'is'. Delete the redundant word 'not'. Signed-off-by: Jilin Yuan Signed-off-by: David S. Miller drivers/net/ethernet/neterion/s2io.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 951c62709cd8ce485e19c3bedbbd38743a77aa32 Author: Jilin Yuan Date: Thu Jun 30 15:51:56 2022 +0800 ethernet/natsemi: fix repeated words in comments Delete the redundant word 'in'. Signed-off-by: Jilin Yuan Signed-off-by: David S. Miller drivers/net/ethernet/natsemi/natsemi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 627838275a5494b9dac5437ad9347a3981ea1505 Author: Jilin Yuan Date: Thu Jun 30 15:42:21 2022 +0800 mellanox/mlxsw: fix repeated words in comments Delete the redundant word 'action'. Delete the redundant word 'refer'. Delete the redundant word 'for'. Signed-off-by: Jilin Yuan Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/core_env.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum2_kvdl.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 1c3997b1cdb0e65829c8fb175656a8c8e7735956 Author: Jilin Yuan Date: Thu Jun 30 13:49:25 2022 +0800 ethernet/marvell: fix repeated words in comments Delete the redundant word 'a'. Signed-off-by: Jilin Yuan Signed-off-by: David S. Miller drivers/net/ethernet/marvell/sky2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36704239c8fe725468a09061fecf9af09ccf43ac Author: Jilin Yuan Date: Thu Jun 30 13:42:04 2022 +0800 marvell/octeontx2/af: fix repeated words in comments Delete the redundant word 'so'. Signed-off-by: Jilin Yuan Signed-off-by: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecad3b0b99bff7247a11f8c7cb19ac9b0cb28b09 Author: Veerendranath Jakkam Date: Mon May 23 18:55:58 2022 +0530 wifi: cfg80211: Increase akm_suites array size in cfg80211_crypto_settings Increase akm_suites array size in struct cfg80211_crypto_settings to 10 and advertise the capability to userspace. This allows userspace to send more than two AKMs to driver in netlink commands such as NL80211_CMD_CONNECT. This capability is needed for implementing WPA3-Personal transition mode correctly with any driver that handles roaming internally. Currently, the possible AKMs for multi-AKM connect can include PSK, PSK-SHA-256, SAE, FT-PSK and FT-SAE. Since the count is already 5, increasing the akm_suites array size to 10 should be reasonable for future usecases. Signed-off-by: Veerendranath Jakkam Link: https://lore.kernel.org/r/1653312358-12321-1-git-send-email-quic_vjakkam@quicinc.com Signed-off-by: Johannes Berg drivers/net/wireless/quantenna/qtnfmac/commands.c | 12 ++++++++---- include/net/cfg80211.h | 11 ++++++++++- include/uapi/linux/nl80211.h | 14 ++++++++++++++ net/wireless/core.c | 6 ++++++ net/wireless/nl80211.c | 7 ++++++- 5 files changed, 44 insertions(+), 6 deletions(-) commit d6f671c8a339d5b655acfacb8be6918c744fbabf Author: Johannes Berg Date: Mon Jun 27 12:49:03 2022 +0200 wifi: cfg80211: remove chandef check in cfg80211_cac_event() The current check only worked for AP mode, but we can do radar detection in mesh as well (for example). We could try to check this using wdev_chandef(), but we also don't really care since the chandef is passed in and we have no need to use it anymore (since we added the argument in commit d2859df5e7f0 ("cfg80211/mac80211: DFS setup chandef for cac event")). Change-Id: I856e4344d5e64ff4d2eead0b4c53b11f264be9b8 Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs") Signed-off-by: Johannes Berg net/wireless/mlme.c | 3 --- 1 file changed, 3 deletions(-) commit 31177127e067eb73d5ca46ce32a410e41333d42f Author: Johannes Berg Date: Mon Jun 27 12:49:03 2022 +0200 wifi: nl80211: relax wdev mutex check in wdev_chandef() In many cases we might get here from driver code that's not really set up to care about the locking, and for the non-MLO cases we really don't care so much about it. So relax the checking here for now, perhaps we should even remove it completely since we might not really care if we point to an invalid link's chandef and can require the caller to check the link validity first. Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs") Signed-off-by: Johannes Berg net/wireless/chan.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit c2653990d5729a445296d6d04395be5dea8e282e Author: Johannes Berg Date: Mon Jun 27 12:49:03 2022 +0200 wifi: nl80211: acquire wdev mutex earlier in start_ap We need to hold the wdev mutex already in order to call nl80211_parse_tx_bitrate_mask(), so acquire it earlier. Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs") Signed-off-by: Johannes Berg net/wireless/nl80211.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 206bbcf76121664e95a42e1c014c3fe168d07a3d Author: Johannes Berg Date: Mon Jun 27 12:43:37 2022 +0200 wifi: nl80211: hold wdev mutex for tid config We need wdev_chandef() in this code, which now requires the wdev mutex due to the per-link nature. Hold it here to make sure we can access the link. Reported-by: syzbot+b4e9aa0f32ffd9902442@syzkaller.appspotmail.com Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs") Signed-off-by: Johannes Berg net/wireless/nl80211.c | 3 +++ 1 file changed, 3 insertions(+) commit 77e7b6ba78edf817bddfa97fadb15a971992b1ee Author: Johannes Berg Date: Mon Jun 27 12:36:03 2022 +0200 wifi: cfg80211: handle IBSS in channel switch Prior to commit 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs") the interface type didn't really matter here, but now we need to handle all of the possible cases. Add IBSS ("ADHOC") and handle it. Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs") Reported-by: syzbot+90d912872157e63589e4@syzkaller.appspotmail.com Signed-off-by: Johannes Berg net/wireless/nl80211.c | 3 +++ 1 file changed, 3 insertions(+) commit 591e73ee3f737098723406bcfae43673add31881 Author: Johannes Berg Date: Mon Jun 27 12:28:31 2022 +0200 wifi: mac80211: properly skip link info driver update If the interface isn't (yet) added to the driver, skip the link info update. This was previously done for the BSS info changes, but I forgot to copy the same check here. Fixes: 7b7090b4c6a9 ("wifi: mac80211: split bss_info_changed method") Reported-by: syzbot+bce2ca140cc00578ed07@syzkaller.appspotmail.com Signed-off-by: Johannes Berg net/mac80211/main.c | 3 +++ 1 file changed, 3 insertions(+) commit 8b037cabc4966b010c44a76e05a43d276318bc49 Author: Conor Dooley Date: Wed Jun 29 19:43:33 2022 +0100 spi: dt-bindings: dw-apb-ssi: update spi-{r,t}x-bus-width Most users of dw-apb-ssi use spi-{r,t}x-bus-width of 1, however the Canaan k210 is wired up for a width of 4. Quoting Serge: The modern DW APB SSI controllers of v.4.* and newer also support the enhanced SPI Modes too (Dual, Quad and Octal). Since the IP-core version is auto-detected at run-time there is no way to create a DT-schema correctly constraining the Rx/Tx SPI bus widths. /endquote As such, drop the restriction on only supporting a bus width of 1. Link: https://lore.kernel.org/all/20220620205654.g7fyipwytbww5757@mobilestation/ Signed-off-by: Conor Dooley Reviewed-by: Serge Semin Reviewed-by: Rob Herring Tested-by: Niklas Cassel Link: https://lore.kernel.org/r/20220629184343.3438856-5-mail@conchuod.ie Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 6 ------ 1 file changed, 6 deletions(-) commit c77bfab9237109d93162d9fce0d69f97aed5dc40 Author: Felix Fietkau Date: Sat Jun 25 23:24:11 2022 +0200 wifi: mac80211: only accumulate airtime deficit for active clients When a client does not generate any local tx activity, accumulating airtime deficit for the round-robin scheduler can be harmful. If this goes on for too long, the deficit could grow quite large, which might cause unreasonable initial latency once the client becomes active Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20220625212411.36675-7-nbd@nbd.name Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3db2c5604f39e3760fa67ca8c8905c4b19339230 Author: Felix Fietkau Date: Sat Jun 25 23:24:10 2022 +0200 wifi: mac80211: add debugfs file to display per-phy AQL pending airtime Now that the global pending airtime is more relevant for airtime fairness, it makes sense to make it accessible via debugfs for debugging Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20220625212411.36675-6-nbd@nbd.name Signed-off-by: Johannes Berg net/mac80211/debugfs.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 8e4bac0671054ba1ad2e3d41aa568ac55f51affd Author: Felix Fietkau Date: Sat Jun 25 23:24:09 2022 +0200 wifi: mac80211: add a per-PHY AQL limit to improve fairness In order to maintain fairness, the amount of queueing needs to be limited beyond the simple per-station AQL budget, otherwise the driver can simply repeatedly do scheduling rounds until all queues that have not used their AQL budget become eligble. To be conservative, use the high AQL limit for the first txq and add half of the low AQL for each subsequent queue. Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20220625212411.36675-5-nbd@nbd.name Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 1 + net/mac80211/main.c | 1 + net/mac80211/sta_info.c | 10 +++++++--- net/mac80211/tx.c | 35 ++++++++++++++++++++++++++++++++++- 4 files changed, 43 insertions(+), 4 deletions(-) commit 8ccc07028cb7aaa6ad313f24a9442c7796416e19 Author: Felix Fietkau Date: Sat Jun 25 23:24:08 2022 +0200 wifi: mac80211: keep recently active tx queues in scheduling list This allows proper deficit accounting to ensure that they don't carry their deficit until the next time they become active Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20220625212411.36675-4-nbd@nbd.name Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 7 +++++++ net/mac80211/sta_info.h | 1 + net/mac80211/tx.c | 40 ++++++++++++++++++++++++++++++++++++---- 3 files changed, 44 insertions(+), 4 deletions(-) commit 9c1be3cde0046c7b06e69238a7af94039b3bed85 Author: Felix Fietkau Date: Sat Jun 25 23:24:07 2022 +0200 wifi: mac80211: consider aql_tx_pending when checking airtime deficit When queueing packets for a station, deficit only gets added once the packets have been transmitted, which could be much later. During that time, a lot of temporary unfairness could happen, which could lead to bursty behavior. Fix this by subtracting the aql_tx_pending when checking the deficit in tx scheduling. Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20220625212411.36675-3-nbd@nbd.name Signed-off-by: Johannes Berg net/mac80211/tx.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 445452d438e2f40355e2ed1aa9894e7094237dc9 Author: Felix Fietkau Date: Sat Jun 25 23:24:06 2022 +0200 wifi: mac80211: make sta airtime deficit field s32 instead of s64 32 bit is more than enough range for the airtime deficit Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20220625212411.36675-2-nbd@nbd.name Signed-off-by: Johannes Berg net/mac80211/debugfs_sta.c | 4 ++-- net/mac80211/sta_info.h | 2 +- net/mac80211/tx.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 942741dabcb43236006f557178801ce2051e69f9 Author: Felix Fietkau Date: Sat Jun 25 23:24:05 2022 +0200 wifi: mac80211: switch airtime fairness back to deficit round-robin scheduling This reverts commits 6a789ba679d652587532cec2a0e0274fda172f3b and 2433647bc8d983a543e7d31b41ca2de1c7e2c198. The virtual time scheduler code has a number of issues: - queues slowed down by hardware/firmware powersave handling were not properly handled. - on ath10k in push-pull mode, tx queues that the driver tries to pull from were starved, causing excessive latency - delay between tx enqueue and reported airtime use were causing excessively bursty tx behavior The bursty behavior may also be present on the round-robin scheduler, but there it is much easier to fix without introducing additional regressions Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20220625212411.36675-1-nbd@nbd.name Signed-off-by: Johannes Berg include/net/mac80211.h | 17 +- net/mac80211/cfg.c | 35 +--- net/mac80211/debugfs.c | 70 ++------ net/mac80211/debugfs_netdev.c | 32 +--- net/mac80211/debugfs_sta.c | 24 +-- net/mac80211/ieee80211_i.h | 182 ++------------------- net/mac80211/iface.c | 4 - net/mac80211/main.c | 11 +- net/mac80211/rx.c | 6 +- net/mac80211/sta_info.c | 67 +++----- net/mac80211/sta_info.h | 11 +- net/mac80211/status.c | 19 --- net/mac80211/tx.c | 366 ++++++++++++------------------------------ 13 files changed, 190 insertions(+), 654 deletions(-) commit 7f884baae68adc85db55b97e3fc903a1f20bd1f9 Author: Johannes Berg Date: Fri Jul 1 10:42:40 2022 +0200 wifi: mac80211: fix a kernel-doc complaint Somehow kernel-doc complains here about strong markup, but we really don't need the [] so just remove that. Signed-off-by: Johannes Berg include/net/mac80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1045a06724f322ed61f1ffb994427c7bdbe64647 Author: Christoph Hellwig Date: Wed Jun 29 17:01:02 2022 +0200 remove CONFIG_ANDROID The ANDROID config symbol is only used to guard the binder config symbol and to inject completely random config changes. Remove it as it is obviously a bad idea. Acked-by: Paul E. McKenney Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220629150102.1582425-2-hch@lst.de Signed-off-by: Greg Kroah-Hartman drivers/Makefile | 2 +- drivers/android/Kconfig | 9 --------- kernel/configs/android-base.config | 1 - kernel/rcu/Kconfig.debug | 3 +-- tools/testing/selftests/filesystems/binderfs/config | 1 - tools/testing/selftests/sync/config | 1 - 6 files changed, 2 insertions(+), 15 deletions(-) commit 261e224d6a5c43e2bb8a07b7662f9b4ec425cfec Author: Kalesh Singh Date: Thu Jun 30 19:12:29 2022 +0000 pm/sleep: Add PM_USERSPACE_AUTOSLEEP Kconfig Systems that initiate frequent suspend/resume from userspace can make the kernel aware by enabling PM_USERSPACE_AUTOSLEEP config. This allows for certain sleep-sensitive code (wireguard/rng) to decide on what preparatory work should be performed (or not) in their pm_notification callbacks. This patch was prompted by the discussion at [1] which attempts to remove CONFIG_ANDROID that currently guards these code paths. [1] https://lore.kernel.org/r/20220629150102.1582425-1-hch@lst.de/ Suggested-by: Jason A. Donenfeld Acked-by: Jason A. Donenfeld Signed-off-by: Kalesh Singh Link: https://lore.kernel.org/r/20220630191230.235306-1-kaleshsingh@google.com Signed-off-by: Greg Kroah-Hartman drivers/char/random.c | 4 ++-- drivers/net/wireguard/device.c | 3 ++- kernel/power/Kconfig | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) commit 72b5d5aef246a0387cefa23121dd90901c7a691a Author: Yushan Zhou Date: Thu Jun 30 16:25:12 2022 +0800 kernfs: fix potential NULL dereference in __kernfs_remove When lockdep is enabled, lockdep_assert_held_write would cause potential NULL pointer dereference. Fix the following smatch warnings: fs/kernfs/dir.c:1353 __kernfs_remove() warn: variable dereferenced before check 'kn' (see line 1346) Fixes: 393c3714081a ("kernfs: switch global kernfs_rwsem lock to per-fs lock") Signed-off-by: Yushan Zhou Link: https://lore.kernel.org/r/20220630082512.3482581-1-zys.zljxml@gmail.com Signed-off-by: Greg Kroah-Hartman fs/kernfs/dir.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit c8a9415e6ddef98a948f8c30d9ec2e749c0ccd9d Author: Johannes Berg Date: Fri Jul 1 10:36:36 2022 +0200 wifi: cfg80211: remove redundant documentation These struct members no longer exist, remove them from documentation. Signed-off-by: Johannes Berg include/net/cfg80211.h | 10 ---------- 1 file changed, 10 deletions(-) commit c882716b6d411495f221bdd73e9137357c16a3ea Author: Liang He Date: Tue Jun 28 10:16:40 2022 +0800 firmware: Hold a reference for of_find_compatible_node() In of_register_trusted_foundations(), we need to hold the reference returned by of_find_compatible_node() and then use it to call of_node_put() for refcount balance. Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220628021640.4015-1-windhl@126.com Signed-off-by: Greg Kroah-Hartman include/linux/firmware/trusted_foundations.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 80fc671bcc0173836e9032b0c698ea74c13b9d7c Author: Jean-Philippe Brucker Date: Fri Jul 1 11:48:43 2022 +0800 uacce: Handle parent device removal or parent driver module rmmod The uacce driver must deal with a possible removal of the parent device or parent driver module rmmod at any time. Although uacce_remove(), called on device removal and on driver unbind, prevents future use of the uacce fops by removing the cdev, fops that were called before that point may still be running. Serialize uacce_fops_open() and uacce_remove() with uacce->mutex. Serialize other fops against uacce_remove() with q->mutex. Since we need to protect uacce_fops_poll() which gets called on the fast path, replace uacce->queues_lock with q->mutex to improve scalability. The other fops are only used during setup. uacce_queue_is_valid(), checked under q->mutex or uacce->mutex, denotes whether uacce_remove() has disabled all queues. If that is the case, don't go any further since the parent device is being removed and uacce->ops should not be called anymore. Reported-by: Yang Shen Signed-off-by: Zhangfei Gao Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20220701034843.7502-1-zhangfei.gao@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/misc/uacce/uacce.c | 133 +++++++++++++++++++++++++++++---------------- include/linux/uacce.h | 6 +- 2 files changed, 91 insertions(+), 48 deletions(-) commit d60be533a0033c2cb9e36c0a1ee4b3080ed4eef2 Author: Vipin Sharma Date: Fri Jun 17 17:54:57 2022 -0700 scripts/tags.sh: Include tools directory in tags generation Add tools directory in generating tags and quiet the "No such file or directory" warnings. It reverts the changes introduced in commit 162343a876f1 ("scripts/tags.sh: exclude tools directory from tags generation") while maintainig the original intent of the patch to get rid of the warnings. This allows the root level cscope files to include tools source code besides kernel and a single place to browse the code for both. Acked-by: Cristian Ciocaltea Signed-off-by: Vipin Sharma Link: https://lore.kernel.org/r/20220618005457.2379324-1-vipinsh@google.com Signed-off-by: Greg Kroah-Hartman scripts/tags.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 85df46465bbb95cf15197ef627ba8d0ee2cf2eba Author: Zhang Jiaming Date: Wed Jun 29 14:07:16 2022 +0800 bus: mvebu-mbus: Fix spelling mistake Change 'informations' to 'information'. Change 'accross' to 'across'. Signed-off-by: Zhang Jiaming Link: https://lore.kernel.org/r/20220629060716.22310-1-jiaming@nfschina.com Signed-off-by: Greg Kroah-Hartman drivers/bus/mvebu-mbus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fe37f73d1109367d749e2771045ae28e0c1543a9 Author: Mauro Carvalho Chehab Date: Tue Jun 28 10:46:07 2022 +0100 wifi: mac80211: sta_info: fix a missing kernel-doc struct element struct link_sta_info has now a cur_max_bandwidth data: net/mac80211/sta_info.h:569: warning: Function parameter or member 'cur_max_bandwidth' not described in 'link_sta_info' Copy the meaning from struct sta_info, documenting it. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/37d898634bb30776442a33833c48cbb21c90ecc6.1656409369.git.mchehab@kernel.org Signed-off-by: Johannes Berg net/mac80211/sta_info.h | 2 ++ 1 file changed, 2 insertions(+) commit 2af23d20bea6b6dfae3e9b76238cb4631fbc193d Author: Carlos Llamas Date: Mon Jun 27 19:47:53 2022 +0000 MAINTAINERS: update Android driver maintainers I've been contributing patches for binder{,fs} targeting fixes as well as new functionality. I've also helped reviewing some of the incoming changes. As such I'd like to be added to the maintainers list for the Android drivers. Note I'm also dropping Hridya's name from the list as she has now moved to a different role. Acked-by: Christian Brauner (Microsoft) Acked-by: Todd Kjos Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20220627194753.2309523-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82757b792be7a549460137b2dbfb9d48003a072a Author: Mauro Carvalho Chehab Date: Tue Jun 28 10:46:06 2022 +0100 wifi: mac80211: add a missing comma at kernel-doc markup The lack of the colon makes it not parse the function parameter: include/net/mac80211.h:6250: warning: Function parameter or member 'vif' not described in 'ieee80211_channel_switch_disconnect' Fix it. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/11c1bdb861d89c93058fcfe312749b482851cbdb.1656409369.git.mchehab@kernel.org Signed-off-by: Johannes Berg include/net/mac80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d8b08fef0af23aa2fe7f1a1719ac5b11478042f Author: Mauro Carvalho Chehab Date: Tue Jun 28 10:46:05 2022 +0100 wifi: cfg80211: fix kernel-doc warnings all over the file There are currently 17 kernel-doc warnings on this file: include/net/cfg80211.h:391: warning: Function parameter or member 'bw' not described in 'ieee80211_eht_mcs_nss_supp' include/net/cfg80211.h:437: warning: Function parameter or member 'eht_cap' not described in 'ieee80211_sband_iftype_data' include/net/cfg80211.h:507: warning: Function parameter or member 's1g' not described in 'ieee80211_sta_s1g_cap' include/net/cfg80211.h:1390: warning: Function parameter or member 'counter_offset_beacon' not described in 'cfg80211_color_change_settings' include/net/cfg80211.h:1390: warning: Function parameter or member 'counter_offset_presp' not described in 'cfg80211_color_change_settings' include/net/cfg80211.h:1430: warning: Enum value 'STATION_PARAM_APPLY_STA_TXPOWER' not described in enum 'station_parameters_apply_mask' include/net/cfg80211.h:2195: warning: Function parameter or member 'dot11MeshConnectedToAuthServer' not described in 'mesh_config' include/net/cfg80211.h:2341: warning: Function parameter or member 'short_ssid' not described in 'cfg80211_scan_6ghz_params' include/net/cfg80211.h:3328: warning: Function parameter or member 'kck_len' not described in 'cfg80211_gtk_rekey_data' include/net/cfg80211.h:3698: warning: Function parameter or member 'ftm' not described in 'cfg80211_pmsr_result' include/net/cfg80211.h:3828: warning: Function parameter or member 'global_mcast_stypes' not described in 'mgmt_frame_regs' include/net/cfg80211.h:4977: warning: Function parameter or member 'ftm' not described in 'cfg80211_pmsr_capabilities' include/net/cfg80211.h:5742: warning: Function parameter or member 'u' not described in 'wireless_dev' include/net/cfg80211.h:5742: warning: Function parameter or member 'links' not described in 'wireless_dev' include/net/cfg80211.h:5742: warning: Function parameter or member 'valid_links' not described in 'wireless_dev' include/net/cfg80211.h:6076: warning: Function parameter or member 'is_amsdu' not described in 'ieee80211_data_to_8023_exthdr' include/net/cfg80211.h:6949: warning: Function parameter or member 'sig_dbm' not described in 'cfg80211_notify_new_peer_candidate' Address them, in order to build a better documentation from this header. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/f6f522cdc716a01744bb0eae2186f4592976222b.1656409369.git.mchehab@kernel.org Signed-off-by: Johannes Berg include/net/cfg80211.h | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit 3e753ecc5d6f2e69f991a776920fdd4a867bc4d0 Author: Zhang Jiaming Date: Wed Jun 29 17:10:11 2022 +0800 misc: rtsx_pcr: Fix a typo Change 'timout' to 'timeout'. Reviewed-by: Tom Rix Signed-off-by: Zhang Jiaming Link: https://lore.kernel.org/r/20220629091011.36187-1-jiaming@nfschina.com Signed-off-by: Greg Kroah-Hartman drivers/misc/cardreader/rtsx_pcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5cd561688b3e8a248fdbb37a1b10801b06736865 Author: Geert Uytterhoeven Date: Fri Jun 24 14:10:51 2022 +0200 drm/bridge: imx: i.MX8 bridge drivers should depend on ARCH_MXC The various Freescale i.MX8 display bridges are only present on Freescale i.MX8 SoCs. Hence add a dependency on ARCH_MXC, to prevent asking the user about these drivers when configuring a kernel without i.MX SoC support. Fixes: e60c4354840b2fe8 ("drm/bridge: imx: Add LDB support for i.MX8qm") Fixes: 3818715f62b42b5c ("drm/bridge: imx: Add LDB support for i.MX8qxp") Fixes: 96988a526c97cfbe ("drm/bridge: imx: Add i.MX8qxp pixel link to DPI support") Fixes: 1ec17c26bc06289d ("drm/bridge: imx: Add i.MX8qm/qxp display pixel link support") Fixes: 93e163a9e0392aca ("drm/bridge: imx: Add i.MX8qm/qxp pixel combiner support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Liu Ying Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/42c542b53a1c8027b23a045045fbb7b34479913d.1656072500.git.geert+renesas@glider.be drivers/gpu/drm/bridge/imx/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 6708be40047789aa3587a3866b782d5cda7b2a31 Author: Peter Chiu Date: Wed Jun 22 09:08:20 2022 +0800 wifi: ieee80211: s1g action frames are not robust S1g action frame with code 22 is not protected so update the robust action frame list. Signed-off-by: Peter Chiu Link: https://lore.kernel.org/r/20220622010820.17522-1-chui-hao.chiu@mediatek.com Signed-off-by: Johannes Berg include/linux/ieee80211.h | 1 + 1 file changed, 1 insertion(+) commit 32dd59f96924f45e33bc79854f7a00679c0fa28e Author: Daniel Starke Date: Fri Jul 1 08:16:52 2022 +0200 tty: n_gsm: fix race condition in gsmld_write() The function may be used by the user directly and also by the n_gsm internal functions. They can lead into a race condition which results in interleaved frames if both are writing at the same time. The receiving side is not able to decode those interleaved frames correctly. Add a lock around the low side tty write to avoid race conditions and frame interleaving between user originated writes and n_gsm writes. Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20220701061652.39604-9-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 4fae831b3a71fc5a44cc5c7d0b8c1267ee7659f5 Author: Daniel Starke Date: Fri Jul 1 08:16:50 2022 +0200 tty: n_gsm: fix packet re-transmission without open control channel In the current implementation control packets are re-transmitted even if the control channel closed down during T2. This is wrong. Check whether the control channel is open before re-transmitting any packets. Note that control channel open/close is handled by T1 and not T2 and remains unaffected by this. Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20220701061652.39604-7-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bec0224816d19abe4fe503586d16d51890540615 Author: Daniel Starke Date: Fri Jul 1 08:16:48 2022 +0200 tty: n_gsm: fix non flow control frames during mux flow off n_gsm is based on the 3GPP 07.010 and its newer version is the 3GPP 27.010. See https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1516 The changes from 07.010 to 27.010 are non-functional. Therefore, I refer to the newer 27.010 here. Chapter 5.4.6.3.6 states that FCoff stops the transmission on all channels except the control channel. This is already implemented in gsm_data_kick(). However, chapter 5.4.8.1 explains that this shall result in the same behavior as software flow control on the ldisc in advanced option mode. That means only flow control frames shall be sent during flow off. The current implementation does not consider this case. Change gsm_data_kick() to send only flow control frames if constipated to abide the standard. gsm_read_ea_val() and gsm_is_flow_ctrl_msg() are introduced as helper functions for this. It is planned to use gsm_read_ea_val() in later code cleanups for other functions, too. Fixes: c01af4fec2c8 ("n_gsm : Flow control handling in Mux driver") Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20220701061652.39604-5-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) commit c568f7086c6e771c77aad13d727c70ef70e07243 Author: Daniel Starke Date: Fri Jul 1 08:16:47 2022 +0200 tty: n_gsm: fix missing timer to handle stalled links The current implementation does not handle the situation that no data is in the internal queue and needs to be sent out while the user tty fifo is full. Add a timer that moves more data from user tty down to the internal queue which is then serialized on the ldisc. This timer is triggered if no data was moved from a user tty to the internal queue within 10 * T1. Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20220701061652.39604-4-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) commit 556fc8ac06513cced381588d6d58c184d95cc4fe Author: Daniel Starke Date: Fri Jul 1 08:16:46 2022 +0200 tty: n_gsm: fix wrong queuing behavior in gsm_dlci_data_output() 1) The function drains the fifo for the given user tty/DLCI without considering 'TX_THRESH_HI' and different to gsm_dlci_data_output_framed(), which moves only one packet from the user side to the internal transmission queue. We can only handle one packet at a time here if we want to allow DLCI priority handling in gsm_dlci_data_sweep() to avoid link starvation. 2) Furthermore, the additional header octet from convergence layer type 2 is not counted against MTU. It is part of the UI/UIH frame message which needs to be limited to MTU. Hence, it is wrong not to consider this octet. 3) Finally, the waiting user tty is not informed about freed space in its send queue. Take at most one packet worth of data out of the DLCI fifo to fix 1). Limit the max user data size per packet to MTU - 1 in case of convergence layer type 2 to leave space for the control signal octet which is added in the later part of the function. This fixes 2). Add tty_port_tty_wakeup() to wake up the user tty if new write space has been made available to fix 3). Fixes: 268e526b935e ("tty/n_gsm: avoid fifo overflow in gsm_dlci_data_output") Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20220701061652.39604-3-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 74 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 32 deletions(-) commit 01aecd917114577c423f07cec0d186ad007d76fc Author: Daniel Starke Date: Fri Jul 1 08:16:45 2022 +0200 tty: n_gsm: fix tty registration before control channel open The current implementation registers/deregisters the user ttys at mux attach/detach. That means that the user devices are available before any control channel is open. However, user channel initialization requires an open control channel. Furthermore, the user is not informed if the mux restarts due to configuration changes. Put the registration/deregistration procedure into separate function to improve readability. Move registration to mux activation and deregistration to mux cleanup to keep the user devices only open as long as a control channel exists. The user will be informed via the device driver if the mux was reconfigured in a way that required a mux re-activation. This makes it necessary to add T2 initialization to gsmld_open() for the ldisc open code path (not the reconfiguration code path) to avoid deletion of an uninitialized T2 at mux cleanup. Fixes: d50f6dcaf22a ("tty: n_gsm: expose gsmtty device nodes at ldisc open time") Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20220701061652.39604-2-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 117 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 79 insertions(+), 38 deletions(-) commit ac77f0077c3265197d378158c85a55eee6d21508 Author: Daniel Starke Date: Fri Jul 1 08:16:44 2022 +0200 tty: n_gsm: fix user open not possible at responder until initiator open After setting up the control channel on both sides the responder side may want to open a virtual tty to listen on until the initiator starts an application on a user channel. The current implementation allows the open() but no other operation, like termios. These fail with EINVAL. The responder sided application has no means to detect an open by the initiator sided application this way. And the initiator sided applications usually expect the responder sided application to listen on the user channel upon open. Set the user channel into half-open state on responder side once a user application opens the virtual tty to allow IO operations on it. Furthermore, keep the user channel constipated until the initiator side opens it to give the responder sided application the chance to detect the new connection and to avoid data loss if the responder sided application starts sending before the user channel is open. Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20220701061652.39604-1-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) commit 90557fa89d3e99286506593fd5180f699c41b152 Author: Herve Codina Date: Fri Jul 1 09:09:27 2022 +0200 dt-bindings: usb: atmel: Add Microchip LAN9662 compatible string The USB device controller available in the Microchip LAN9662 SOC is the same IP as the one present in the SAMA5D3 SOC. Add the LAN9662 compatible string and set the SAMA5D3 compatible string as a fallback for the LAN9662. Signed-off-by: Herve Codina Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220701070928.459135-3-herve.codina@bootlin.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/atmel-usb.txt | 3 +++ 1 file changed, 3 insertions(+) commit 3355a12760deceb09e1888c5b9ad1f89bf86939b Author: Yang Li Date: Thu Jun 30 17:09:37 2022 +0800 staging: r8188eu: remove unneeded semicolon Eliminate the following coccicheck warning: ./drivers/staging/r8188eu/hal/HalPwrSeqCmd.c:70:2-3: Unneeded semicolon Fixes: df8d0a55047b ("staging: r8188eu: make power sequences static") Reviewed-by: Martin Kaiser Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20220630090937.4983-1-yang.lee@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/HalPwrSeqCmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d61da1d7a1bf9f6483ec15e9dd3b1023bf293264 Author: Michael Straube Date: Thu Jun 30 08:17:36 2022 +0200 staging: r8188eu: remove HW_VAR_H2C_MEDIA_STATUS_RPT from SetHwReg8188EU() The HW_VAR_H2C_MEDIA_STATUS_RPT case in SetHwReg8188EU() only calls rtl8188e_set_FwMediaStatus_cmd(). In order to get rid of SetHwReg8188EU() remove the case HW_VAR_H2C_MEDIA_STATUS_RPT and call rtl8188e_set_FwMediaStatus_cmd() directly. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20220630061736.9200-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme.c | 4 ++-- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/r8188eu/hal/usb_halinit.c | 3 --- drivers/staging/r8188eu/include/hal_intf.h | 1 - 4 files changed, 3 insertions(+), 7 deletions(-) commit c87d8e90bccb835184749621d990f7626c3daf31 Author: Martin Kaiser Date: Sun Jun 26 20:07:34 2022 +0200 staging: r8188eu: drop return value from receive_disconnect The receive_disconnect function always returns _SUCCESS. None of the callers checks the return value. We can remove it. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220626180734.287137-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 5 ++--- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) commit eb1c535f0d69e3ec7679d4d714bb2a9765ceda69 Author: Matthew Auld Date: Wed Jun 29 18:43:50 2022 +0100 drm/i915: turn on small BAR support With the uAPI in place we should now have enough in place to ensure a working system on small BAR configurations. v2: (Nirmoy & Thomas): - s/full BAR/Resizable BAR/ which is hopefully more easily understood by users. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20220629174350.384910-13-matthew.auld@intel.com drivers/gpu/drm/i915/gt/intel_region_lmem.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit efeb3caf4341357a7f4745c0da643b13200f0b9f Author: Matthew Auld Date: Wed Jun 29 18:43:49 2022 +0100 drm/i915/ttm: disallow CPU fallback mode for ccs pages Falling back to memcpy/memset shouldn't be allowed if we know we have CCS state to manage using the blitter. Otherwise we are potentially leaving the aux CCS state in an unknown state, which smells like an info leak. Fixes: 48760ffe923a ("drm/i915/gt: Clear compress metadata for Flat-ccs objects") Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Cc: Ramalingam C Reviewed-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20220629174350.384910-12-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_object.c | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/i915/gem/i915_gem_object.h | 2 ++ drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 18 ------------------ drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 3 +++ 4 files changed, 31 insertions(+), 18 deletions(-) commit bfe53be268afd2248d1e28b4520361693c1c0fce Author: Matthew Auld Date: Wed Jun 29 18:43:48 2022 +0100 drm/i915/ttm: handle blitter failure on DG2 If the move or clear operation somehow fails, and the memory underneath is not cleared, like when moving to lmem, then we currently fallback to memcpy or memset. However with small-BAR systems this fallback might no longer be possible. For now we use the set_wedged sledgehammer if we ever encounter such a scenario, and mark the object as borked to plug any holes where access to the memory underneath can happen. Add some basic selftests to exercise this. v2: - In the selftests make sure we grab the runtime pm around the reset. Also make sure we grab the reset lock before checking if the device is wedged, since the wedge might still be in-progress and hence the bit might not be set yet. - Don't wedge or put the object into an unknown state, if the request construction fails (or similar). Just returning an error and skipping the fallback should be safe here. - Make sure we wedge each gt. (Thomas) - Peek at the unknown_state in io_reserve, that way we don't have to export or hand roll the fault_wait_for_idle. (Thomas) - Add the missing read-side barriers for the unknown_state. (Thomas) - Some kernel-doc fixes. (Thomas) v3: - Tweak the ordering of the set_wedged, also add FIXME. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20220629174350.384910-11-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_object.c | 21 +++ drivers/gpu/drm/i915/gem/i915_gem_object.h | 1 + drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 18 +++ drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 26 +++- drivers/gpu/drm/i915/gem/i915_gem_ttm.h | 3 + drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 96 ++++++++++++-- drivers/gpu/drm/i915/gem/i915_gem_ttm_move.h | 1 + .../gpu/drm/i915/gem/selftests/i915_gem_migrate.c | 141 +++++++++++++++++---- drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 69 ++++++++++ drivers/gpu/drm/i915/i915_vma.c | 25 ++-- 10 files changed, 353 insertions(+), 48 deletions(-) commit 11f01dcf3b32d01982d99df4492feef4332cf0b3 Author: Matthew Auld Date: Wed Jun 29 18:43:47 2022 +0100 drm/i915/selftests: ensure we reserve a fence slot We should always be explicit and allocate a fence slot before adding a new fence. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20220629174350.384910-10-matthew.auld@intel.com drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 938d2fd17d173d0489b1bc96b87a1dd93954dc28 Author: Matthew Auld Date: Wed Jun 29 18:43:46 2022 +0100 drm/i915/selftests: skip the mman tests for stolen It's not supported, and just skips later anyway. With small-BAR things get more complicated since all of stolen is likely not even CPU accessible, hence not passing I915_BO_ALLOC_GPU_ONLY just results in the object create failing. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20220629174350.384910-9-matthew.auld@intel.com drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 71b1669ea9bd962d419aac41bc179e09e504327f Author: Matthew Auld Date: Wed Jun 29 18:43:45 2022 +0100 drm/i915/uapi: tweak error capture on recoverable contexts A non-recoverable context must be used if the user wants proper error capture on discrete platforms. In the future the kernel may want to blit the contents of some objects when later doing the capture stage. Also extend to newer integrated platforms. v2(Thomas): - Also extend to newer integrated platforms, for capture buffer memory allocation purposes. v3 (Reported-by: kernel test robot ): - Fix build on !CONFIG_DRM_I915_CAPTURE_ERROR Testcase: igt@gem_exec_capture@capture-recoverable Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20220629174350.384910-8-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit d42a738e5ae5a73212a83414648a4fae524117f3 Author: Matthew Auld Date: Wed Jun 29 18:43:44 2022 +0100 drm/i915/error: skip non-mappable pages Skip capturing any lmem pages that can't be copied using the CPU. This in now only best effort on platforms that have small BAR. Testcase: igt@gem-exec-capture@capture-invisible Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Nirmoy Das Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20220629174350.384910-7-matthew.auld@intel.com drivers/gpu/drm/i915/i915_gpu_error.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 525e93f6317a08a03cc42847b3e075c92a382c99 Author: Matthew Auld Date: Wed Jun 29 18:43:43 2022 +0100 drm/i915/uapi: add NEEDS_CPU_ACCESS hint If set, force the allocation to be placed in the mappable portion of I915_MEMORY_CLASS_DEVICE. One big restriction here is that system memory (i.e I915_MEMORY_CLASS_SYSTEM) must be given as a potential placement for the object, that way we can always spill the object into system memory if we can't make space. Testcase: igt@gem-create@create-ext-cpu-access-sanity-check Testcase: igt@gem-create@create-ext-cpu-access-big Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Nirmoy Das Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20220629174350.384910-6-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_create.c | 26 +++++++++---- include/uapi/drm/i915_drm.h | 61 ++++++++++++++++++++++++++---- 2 files changed, 71 insertions(+), 16 deletions(-) commit 1dbd07e088673dbf0e10f4bcfa17f971fd870195 Author: Matthew Auld Date: Wed Jun 29 18:43:42 2022 +0100 drm/i915/uapi: apply ALLOC_GPU_ONLY by default On small BAR configurations, when dealing with I915_MEMORY_CLASS_DEVICE allocations, we assume that by default, all userspace allocations should be placed in the non-CPU visible portion. Note that dumb buffers are not included here, since these are not "GPU accelerated" and likely need CPU access. We choose to just always set GPU_ONLY, and let the backend figure out if that should be ignored or not, for example on full BAR systems. In a later patch userspace will be able to provide a hint if CPU access to the buffer is needed. v2(Thomas) - Apply GPU_ONLY on all discrete devices, but only if the BO can be placed in LMEM. Down in the depths this should be turned into a noop, where required, and as an annotation it still make some sense. If we apply it regardless of the placements then we end up needing to check the placements during exec capture. Also it's slightly inconsistent since the NEEDS_CPU_ACCESS can only be applied on objects that can be placed in LMEM. The other annoyance would be gem_create_ext vs plain gem_create, if we were to always apply GPU_ONLY. Testcase: igt@gem-create@create-ext-cpu-access-sanity-check Testcase: igt@gem-create@create-ext-cpu-access-big Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20220629174350.384910-5-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_create.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit be4e366602303615cecb7636075bb18b0d3cc33d Author: Matthew Auld Date: Wed Jun 29 18:43:41 2022 +0100 drm/i915: remove intel_memory_region avail No longer used. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20220629174350.384910-4-matthew.auld@intel.com drivers/gpu/drm/i915/intel_memory_region.c | 4 +--- drivers/gpu/drm/i915/intel_memory_region.h | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) commit 141f733bb3abb000d3949c3b2f119751fe93b0c0 Author: Matthew Auld Date: Wed Jun 29 18:43:40 2022 +0100 drm/i915/uapi: expose the avail tracking Vulkan would like to have a rough measure of how much device memory can in theory be allocated. Also add unallocated_cpu_visible_size to track the visible portion, in case the device is using small BAR. Also tweak the locking so we nice consistent values for both the mm->avail and the visible tracking. v2: tweak the locking slightly so we update the mm->avail and visible tracking as one atomic operation, such that userspace doesn't get strange values when sampling the values. Testcase: igt@i915_query@query-regions-unallocated Testcase: igt@i915_query@query-regions-sanity-check Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20220629174350.384910-3-matthew.auld@intel.com drivers/gpu/drm/i915/i915_query.c | 10 ++++++++- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 31 ++++++++++++++++++++------- drivers/gpu/drm/i915/i915_ttm_buddy_manager.h | 3 +++ drivers/gpu/drm/i915/intel_memory_region.c | 14 ++++++++++++ drivers/gpu/drm/i915/intel_memory_region.h | 3 +++ include/uapi/drm/i915_drm.h | 31 ++++++++++++++++++++++++++- 6 files changed, 82 insertions(+), 10 deletions(-) commit 3f4309cbdc8496373875cfce67d7b5dba87c3ccb Author: Matthew Auld Date: Wed Jun 29 18:43:39 2022 +0100 drm/i915/uapi: add probed_cpu_visible_size Userspace wants to know the size of CPU visible portion of device local-memory, and on small BAR devices the probed_size is no longer enough. In Vulkan, for example, it would like to know the size in bytes for CPU visible VkMemoryHeap. We already track the io_size for each region, so plumb that through to the region query. v2: Drop the ( -1 = unknown ) stuff, which is confusing since nothing can currently ever return such a value. Testcase: igt@i915_query@query-regions-sanity-check Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Acked-by: Nirmoy Das Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20220629174350.384910-2-matthew.auld@intel.com drivers/gpu/drm/i915/i915_query.c | 6 ++++ include/uapi/drm/i915_drm.h | 76 +++++++++++++++++++++------------------ 2 files changed, 48 insertions(+), 34 deletions(-) commit fff1d972f42e7e9a89376378f6a23be1ead16aa1 Author: Matthew Auld Date: Wed Jun 29 18:43:38 2022 +0100 drm/doc: add rfc section for small BAR uapi Add an entry for the new uapi needed for small BAR on DG2+. v2: - Some spelling fixes and other small tweaks. (Akeem & Thomas) - Rework error capture interactions, including no longer needing NEEDS_CPU_ACCESS for objects marked for capture. (Thomas) - Add probed_cpu_visible_size. (Lionel) v3: - Drop the vma query for now. - Add unallocated_cpu_visible_size as part of the region query. - Improve the docs some more, including documenting the expected behaviour on older kernels, since this came up in some offline discussion. v4: - Various improvements all over. (Tvrtko) v5: - Include newer integrated platforms when applying the non-recoverable context and error capture restriction. (Thomas) Mesa: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16739 Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Cc: mesa-dev@lists.freedesktop.org Acked-by: Tvrtko Ursulin Acked-by: Akeem G Abodunrin Reviewed-by: Thomas Hellström Acked-by: Lionel Landwerlin Acked-by: Jordan Justen Link: https://patchwork.freedesktop.org/patch/msgid/20220629174350.384910-1-matthew.auld@intel.com Documentation/gpu/rfc/i915_small_bar.h | 189 +++++++++++++++++++++++++++++++ Documentation/gpu/rfc/i915_small_bar.rst | 47 ++++++++ Documentation/gpu/rfc/index.rst | 4 + 3 files changed, 240 insertions(+) commit 34e3b69b1edc966f0f4dcdd880afba3a2dad8c09 Author: Phil Edworthy Date: Fri Jun 24 09:48:32 2022 +0100 dt-bindings: pinctrl: Add DT bindings for Renesas RZ/V2M pinctrl Add device tree binding documentation and header file for Renesas RZ/V2M pinctrl. Signed-off-by: Phil Edworthy Reviewed-by: Lad Prabhakar Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220624084833.22605-2-phil.edworthy@renesas.com Signed-off-by: Geert Uytterhoeven .../bindings/pinctrl/renesas,rzv2m-pinctrl.yaml | 170 +++++++++++++++++++++ include/dt-bindings/pinctrl/rzv2m-pinctrl.h | 23 +++ 2 files changed, 193 insertions(+) commit 087b79854b9bf8cff3f7b4dd2a25380aac6858a4 Merge: c7e5c423cb59 837ced3a1a5d Author: Jakub Kicinski Date: Thu Jun 30 21:18:18 2022 -0700 Merge branch 'prevent-permanently-closed-tc-taprio-gates-from-blocking-a-felix-dsa-switch-port' Vladimir Oltean says: ==================== Prevent permanently closed tc-taprio gates from blocking a Felix DSA switch port Richie Pearn reports that if we install a tc-taprio schedule on a Felix switch port, and that schedule has at least one gate that never opens (for example TC0 below): tc qdisc add dev swp1 root taprio num_tc 8 map 0 1 2 3 4 5 6 7 \ queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 \ base-time 0 sched-entry S fe 1000000 flags 0x2 then packets classified to the permanently closed traffic class will not be dequeued by the egress port. They will just remain in the queue system, to consume resources. Frame aging does not trigger either, because in order for that to happen, the packets need to be eligible for egress scheduling in the first place, which they aren't. If that port is allowed to consume the entire shared buffer of the switch (as we configure things by default using devlink-sb), then eventually, by sending enough packets, the entire switch will hang. If we think enough about the problem, we realize that this is only a special case of a more general issue, and can also be reproduced with gates that aren't permanently closed, but are not large enough to send an entire frame. In that sense, a permanently closed gate is simply a case where all frames are oversized. The ENETC has logic to reject transmitted packets that would overrun the time window - see commit 285e8dedb4bd ("net: enetc: count the tc-taprio window drops"). The Felix switch has no such thing on a per-packet basis, but it has a register replicated per {egress port, TC} which essentially limits the max MTU. A packet which exceeds the per-port-TC MTU is immediately discarded and therefore will not hang the port anymore (albeit, sadly, this only bumps a generic drop hardware counter and we cannot really infer the reason such as to offer a dedicated counter for these events). This patch set calculates the max MTU per {port, TC} when the tc-taprio config, or link speed, or port-global MTU values change. This solves the larger "gate too small for packet" problem, but also the original issue with the gate permanently closed that was reported by Richie. ==================== Link: https://lore.kernel.org/r/20220628145238.3247853-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 837ced3a1a5d8bb1a637dd584711f31ae6b54d93 Author: Vladimir Oltean Date: Tue Jun 28 17:52:38 2022 +0300 time64.h: consolidate uses of PSEC_PER_NSEC Time-sensitive networking code needs to work with PTP times expressed in nanoseconds, and with packet transmission times expressed in picoseconds, since those would be fractional at higher than gigabit speed when expressed in nanoseconds. Convert the existing uses in tc-taprio and the ocelot/felix DSA driver to a PSEC_PER_NSEC macro. This macro is placed in include/linux/time64.h as opposed to its relatives (PSEC_PER_SEC etc) from include/vdso/time64.h because the vDSO library does not (yet) need/use it. Cc: Andy Lutomirski Cc: Thomas Gleixner Signed-off-by: Vladimir Oltean Reviewed-by: Vincenzo Frascino # for the vDSO parts Signed-off-by: Jakub Kicinski drivers/net/dsa/ocelot/felix_vsc9959.c | 5 +++-- include/linux/time64.h | 3 +++ net/sched/sch_taprio.c | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) commit 55a515b1f5a97df5704a1788fe97a4a740be2b9e Author: Vladimir Oltean Date: Tue Jun 28 17:52:37 2022 +0300 net: dsa: felix: drop oversized frames with tc-taprio instead of hanging the port Currently, sending a packet into a time gate too small for it (or always closed) causes the queue system to hold the frame forever. Even worse, this frame isn't subject to aging either, because for that to happen, it needs to be scheduled for transmission in the first place. But the frame will consume buffer memory and frame references while it is forever held in the queue system. Before commit a4ae997adcbd ("net: mscc: ocelot: initialize watermarks to sane defaults"), this behavior was somewhat subtle, as the switch had a more intricately tuned default watermark configuration out of reset, which did not allow any single port and tc to consume the entire switch buffer space. Nonetheless, the held frames are still there, and they reduce the total backplane capacity of the switch. However, after the aforementioned commit, the behavior can be very clearly seen, since we deliberately allow each {port, tc} to consume the entire shared buffer of the switch minus the reservations (and we disable all reservations by default). That is to say, we allow a permanently closed tc-taprio gate to hang the entire switch. A careful inspection of the documentation shows that the QSYS:Q_MAX_SDU per-port-tc registers serve 2 purposes: one is for guard band calculation (when zero, this falls back to QSYS:PORT_MAX_SDU), and the other is to enable oversized frame dropping (when non-zero). Currently the QSYS:Q_MAX_SDU registers are all zero, so oversized frame dropping is disabled. The goal of the change is to enable it seamlessly. For that, we need to hook into the MTU change, tc-taprio change, and port link speed change procedures, since we depend on these variables. Frames are not dropped on egress due to a queue system oversize condition, instead that egress port is simply excluded from the mask of valid destination ports for the packet. If there are no destination ports at all, the ingress counter that increments is the generic "drop_tail" in ethtool -S. The issue exists in various forms since the tc-taprio offload was introduced. Fixes: de143c0e274b ("net: dsa: felix: Configure Time-Aware Scheduler via taprio offload") Reported-by: Richie Pearn Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/ocelot/felix.c | 9 ++ drivers/net/dsa/ocelot/felix.h | 1 + drivers/net/dsa/ocelot/felix_vsc9959.c | 201 +++++++++++++++++++++++++++++++++ 3 files changed, 211 insertions(+) commit d68a373bfbf4c0bbe5ea2a420d7a79b28fef1921 Author: Vladimir Oltean Date: Tue Jun 28 17:52:36 2022 +0300 net: dsa: felix: keep QSYS_TAG_CONFIG_INIT_GATE_STATE(0xFF) out of rmw In vsc9959_tas_clock_adjust(), the INIT_GATE_STATE field is not changed, only the ENABLE field. Similarly for the disabling of the time-aware shaper in vsc9959_qos_port_tas_set(). To reflect this, keep the QSYS_TAG_CONFIG_INIT_GATE_STATE_M mask out of the read-modify-write procedure to make it clearer what is the intention of the code. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/ocelot/felix_vsc9959.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 1c9017e44af2eee94b1001af18c401ae440ad77c Author: Vladimir Oltean Date: Tue Jun 28 17:52:35 2022 +0300 net: dsa: felix: keep reference on entire tc-taprio config In a future change we will need to remember the entire tc-taprio config on all ports rather than just the base time, so use the taprio_offload_get() helper function to replace ocelot_port->base_time with ocelot_port->taprio. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/dsa/ocelot/felix_vsc9959.c | 23 +++++++++++++---------- include/soc/mscc/ocelot.h | 5 ++--- 2 files changed, 15 insertions(+), 13 deletions(-) commit c6a3d73592ae20f2f6306f823aa5121c83c88223 Merge: f929217499cf a06968563775 Author: Dave Airlie Date: Fri Jul 1 14:14:52 2022 +1000 Merge tag 'drm-intel-gt-next-2022-06-29' of git://anongit.freedesktop.org/drm/drm-intel into drm-next UAPI Changes: - Expose per tile media freq factor in sysfs (Ashutosh Dixit, Dale B Stimson) - Document memory residency and Flat-CCS capability of obj (Ramalingam C) - Disable GETPARAM lookups of I915_PARAM_[SUB]SLICE_MASK on Xe_HP+ (Matt Roper) Cross-subsystem Changes: - Rename intel-gtt symbols (Lucas De Marchi) Core Changes: Driver Changes: - Support programming the EU priority in the GuC descriptor (DG2) (Matthew Brost) - DG2 HuC loading support (Daniele Ceraolo Spurio) - Fix build error without CONFIG_PM (YueHaibing) - Enable THP on Icelake and beyond (Tvrtko Ursulin) - Only setup private tmpfs mount when needed and fix logging (Tvrtko Ursulin) - Make __guc_reset_context aware of guilty engines (Umesh Nerlige Ramappa) - DG2 small bar memory probing fixes (Nirmoy Das) - Remove unnecessary GuC err capture noise (Alan Previn) - Fix i915_gem_object_ggtt_pin_ww regression on old platforms (Maarten Lankhorst) - Fix undefined behavior in GuC backend due to shift overflowing the constant (Borislav Petkov) - New DG2 workarounds (Swathi Dhanavanthri, Anshuman Gupta) - Report no hwconfig support on ADL-N (Balasubramani Vivekanandan) - Fix error_state_read ptr + offset use (Alan Previn) - Expose per tile media freq factor in sysfs (Ashutosh Dixit, Dale B Stimson) - Fix memory leaks in per-gt sysfs (Ashutosh Dixit) - Fix dma_resv fence handling in multi-batch execbuf (Nirmoy Das) - Add extra registers to GPU error dump on Gen11+ (Stuart Summers) - More PVC+DG2 workarounds (Matt Roper) - Improve user experience and driver robustness under SIGINT or similar (Tvrtko Ursulin) - Don't show engine classes not present (Tvrtko Ursulin) - Improve on suspend / resume time with VT-d enabled (Thomas Hellström) - Add missing else (katrinzhou) - Don't leak lmem mapping in vma_evict (Juha-Pekka Heikkila) - Add smem fallback allocation for dpt (Juha-Pekka Heikkila) - Tweak the ordering in cpu_write_needs_clflush (Matthew Auld) - Do not access rq->engine without a reference (Niranjana Vishwanathapura) - Revert "drm/i915: Hold reference to intel_context over life of i915_request" (Niranjana Vishwanathapura) - Don't update engine busyness stats too frequently (Alan Previn) - Add additional steps for Wa_22011802037 for execlist backend (Umesh Nerlige Ramappa) - Fix a lockdep warning at error capture (Nirmoy Das) - Ponte Vecchio prep work and new blitter engines (Matt Roper, John Harrison, Lucas De Marchi) - Read correct RP_STATE_CAP register (PVC) (Matt Roper) - Define MOCS table for PVC (Ayaz A Siddiqui) - Driver refactor and support Ponte Vecchio forcewake handling (Matt Roper) - Remove additional 3D flags from PIPE_CONTROL (Ponte Vecchio) (Stuart Summers) - XEHPSDV and PVC do not use HuC (Daniele Ceraolo Spurio) - Extract stepping information from PCI revid (Ponte Vecchio) (Matt Roper) - Add initial PVC workarounds (Stuart Summers) - SSEU handling driver refactor and Ponte Vecchio support (Matt Roper) - GuC depriv applies to PVC (Matt Roper) - Add register steering (Ponte Vecchio) (Matt Roper) - Add recommended MMIO setting (Ponte Vecchio) (Matt Roper) - Move multicast register handling to a dedicated file (Matt Roper) - Cleanup interface for MCR operations (Matt Roper) - Extend i915_vma_pin_iomap() (CQ Tang) - Re-do the intel-gtt split (Lucas De Marchi) - Correct duplicated/misplaced GT register definitions (Matt Roper) - Prefer "XEHP_" prefix for registers (Matt Roper) - Don't use DRM_DEBUG_WARN_ON for unexpected l3bank/mslice config (Tvrtko Ursulin) - Don't use DRM_DEBUG_WARN_ON for ring unexpectedly not idle (Tvrtko Ursulin) - Make drop_pages() return bool (Lucas De Marchi) - Fix CFI violation with show_dynamic_id() (Nathan Chancellor) - Use i915_probe_error instead of drm_error in GuC code (Vinay Belgaumkar) - Fix use of static in macro mismatch (Andi Shyti) - Update tiled blits selftest (Bommu Krishnaiah) - Future-proof platform checks (Matt Roper) - Only include what's needed (Jani Nikula) - remove accidental static from a local variable (Jani Nikula) - Add global forcewake request to drpc (Vinay Belgaumkar) - Fix spelling typo in comment (pengfuyuan) - Increase timeout for live_parallel_switch selftest (Akeem G Abodunrin) - Use non-blocking H2G for waitboost (Vinay Belgaumkar) Signed-off-by: Dave Airlie From: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/YrwtLM081SQUG1Dc@tursulin-desk commit c7e5c423cb59caddbf296717af484dcbacd76a3f Author: Vladimir Oltean Date: Wed Jun 29 21:13:35 2022 +0300 net: gianfar: add support for software TX timestamping These are required by certain network profiling applications in order to measure delays. Signed-off-by: Vladimir Oltean Acked-by: Richard Cochran Reviewed-by: Claudiu Manoil Link: https://lore.kernel.org/r/20220629181335.3800821-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/gianfar.c | 1 + drivers/net/ethernet/freescale/gianfar_ethtool.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 5a24389457ba82e8ce176e0325f5a1b79ed5be14 Author: Yang Yingliang Date: Thu Jun 30 09:41:53 2022 +0800 net: dsa: rzn1-a5psw: add missing of_node_put() in a5psw_pcs_get() of_parse_phandle() will increase the refcount of 'pcs_node', so add of_node_put() before return from a5psw_pcs_get(). Fixes: 888cdb892b61 ("net: dsa: rzn1-a5psw: add Renesas RZ/N1 advanced 5 port switch driver") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220630014153.1888811-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski drivers/net/dsa/rzn1_a5psw.c | 2 ++ 1 file changed, 2 insertions(+) commit 3d1188df789f777306756aeb201c8709eef6b627 Author: Vinod Koul Date: Tue Jun 28 10:24:54 2022 +0530 arm64: defconfig: Enable qcom interconnect drivers While enabling QCS404 interconnect driver, I found that other drivers are missing too, so add all the interconnect driver Signed-off-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220628045454.621175-2-vkoul@kernel.org arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 974db040c5190b5e925883600d023a9ecce8a840 Author: Vinod Koul Date: Tue Jun 28 10:24:53 2022 +0530 arm64: defconfig: Enable qcom ss & hs usb phy These phys are used for USB controller found in QCS404 board, so enable them in the defconfig Signed-off-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220628045454.621175-1-vkoul@kernel.org arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit bf8bb8eaccf4e68d79743da631f61252753ca7cd Author: Nikita Travkin Date: Sun Jun 12 19:59:55 2022 +0500 clk: qcom: gcc-msm8916: Add rates to the GP clocks msm8916 has (at least) 6 "General Purpose" clocks that can be muxed to SoC pins. These clocks are: GP_CLK{0, 1} : GPIO_{31, 32} (Belongs to CAMSS according to Linux) GP_CLK_{1-3}{A, B} : GPIO_{49-51, 97, 12, 13} (Belongs to GCC itself) GP_MN : GPIO_110 (Doesn't seem to be described in gcc, ignored in this patch) Those clocks may be used as e.g. PWM sources for external peripherals. Add more frequencies to the table for those clocks so it's possible for arbitrary peripherals to make use of them. Reviewed-by: Stephen Boyd Signed-off-by: Nikita Travkin Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220612145955.385787-5-nikita@trvn.ru drivers/clk/qcom/gcc-msm8916.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit d0696770cef35a1fd16ea2167e2198c18aa6fbfe Author: Nikita Travkin Date: Sun Jun 12 19:59:53 2022 +0500 clk: qcom: clk-rcg2: Make sure to not write d=0 to the NMD register Sometimes calculation of d value may result in 0 because of the rounding after integer division. This causes the following error: [ 113.969689] camss_gp1_clk_src: rcg didn't update its configuration. [ 113.969754] WARNING: CPU: 3 PID: 35 at drivers/clk/qcom/clk-rcg2.c:122 update_config+0xc8/0xdc Make sure that D value is never zero. Fixes: 7f891faf596e ("clk: qcom: clk-rcg2: Add support for duty-cycle for RCG") Signed-off-by: Nikita Travkin Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220612145955.385787-3-nikita@trvn.ru drivers/clk/qcom/clk-rcg2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit bdafb609c3bb848d710ad9cd4debd2ee9d6a4049 Author: Nikita Travkin Date: Sun Jun 12 19:59:52 2022 +0500 clk: qcom: clk-rcg2: Fail Duty-Cycle configuration if MND divider is not enabled. In cases when MND is not enabled (e.g. when only Half Integer Divider is used), setting D registers makes no effect. Fail instead of making ineffective write. Fixes: 7f891faf596e ("clk: qcom: clk-rcg2: Add support for duty-cycle for RCG") Signed-off-by: Nikita Travkin Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220612145955.385787-2-nikita@trvn.ru drivers/clk/qcom/clk-rcg2.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit fe5651cc8e33b5fcdc351e36cd0cd4bff2f6192f Author: Dmitry Baryshkov Date: Thu Jun 9 15:23:49 2022 +0300 ARM: dts: qcom: apq8064: drop phy-names from HDMI device node The HDMI driver doesn't use the phy-names to identify the PHY. Different Qualcomm platforms have used different names for the PHY. So, we are deprecating phy-names propertty of the HDMI device and dropping them from existing DTs. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220609122350.3157529-14-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064.dtsi | 1 - 1 file changed, 1 deletion(-) commit 6ac2799c3096dc2fe6d65026efa8a6cf212976bd Author: Dmitry Baryshkov Date: Thu Jun 9 15:23:40 2022 +0300 ARM: dts: qcom: apq8064-ifc6410: drop hdmi-mux-supply The HDMI circuitry on the IFC6410 is not powered by the 3v3. Drop the hdmi-mux-supply property. Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220609122350.3157529-5-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 1 - 1 file changed, 1 deletion(-) commit e2759fa0676c9a32bbddb9aff955b54bb35066ad Author: Krzysztof Kozlowski Date: Wed Jun 8 13:27:02 2022 +0200 ARM: dts: qcom: pm8841: add required thermal-sensor-cells The PM8841 temperature sensor has to define thermal-sensor-cells. Fixes: dab8134ca072 ("ARM: dts: qcom: Add PM8841 functions device nodes") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220608112702.80873-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-pm8841.dtsi | 1 + 1 file changed, 1 insertion(+) commit 7a16ea7f3a5ec0f30b146b058c273b7a9c8ceadf Author: Krzysztof Kozlowski Date: Tue Jun 7 19:18:41 2022 +0200 ARM: dts: qcom: msm8974: add required ranges to OCMEM The OCMEM bindings require ranges property. Fixes: a2cc991ed634 ("ARM: dts: qcom: msm8974: add ocmem node") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Luca Weiss Tested-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607171848.535128-7-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-msm8974.dtsi | 1 + 1 file changed, 1 insertion(+) commit def2565bc66da3e9643f71b2be5f8e707cbdebd0 Author: Krzysztof Kozlowski Date: Tue Jun 7 19:18:40 2022 +0200 ARM: dts: qcom: sdx55: add dedicated IMEM and syscon compatibles Add proper compatibles to the IMEM device node: 1. syscon to allow accessing memory from other devices, 2. dedicated compatible as required for syscon and simple-mfd nodes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607171848.535128-6-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-sdx55.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f19be941efd19b6c68eef87a2d4a1942e4ebd493 Author: Krzysztof Kozlowski Date: Tue Jun 7 19:18:39 2022 +0200 ARM: dts: qcom: msm8974: add dedicated IMEM compatible syscon compatible must be preceded with a specific compatible, to accurately describe the device. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607171848.535128-5-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 626a60292a8eb345df71b40ecaea54395ca8e618 Author: Krzysztof Kozlowski Date: Tue Jun 7 19:18:38 2022 +0200 ARM: dts: qcom: apq8064-asus-nexus7: add dedicated IMEM compatible syscon compatible must be preceded with a specific compatible, to accurately describe the device. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607171848.535128-4-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 230b5edaa34b81d0f1de675ff17d8777f9f2d02b Author: Krzysztof Kozlowski Date: Tue Jun 7 19:18:37 2022 +0200 ARM: dts: qcom: use generic sram as name for imem and ocmem nodes According to Devicetree specification, the device nodes should be generic, reflecting the function of the device. The typical name for memory regions is "sram". Signed-off-by: Krzysztof Kozlowski Reviewed-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607171848.535128-3-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts | 2 +- arch/arm/boot/dts/qcom-msm8974.dtsi | 4 ++-- arch/arm/boot/dts/qcom-sdx55.dtsi | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 69b1142baeab4e1603a94b5e8c1676ecc911c9b5 Author: Krzysztof Kozlowski Date: Tue Jun 7 12:29:26 2022 +0200 ARM: dts: qcom: ipq8064: add function to LED nodes Add common LED property - the function - to LED nodes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607102931.102805-5-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 445c44e25342564326384640453d26d1655ebc44 Author: Krzysztof Kozlowski Date: Tue Jun 7 12:29:25 2022 +0200 ARM: dts: qcom: ipq8064-rb3011: add color to LED node Add common LED property - the color - to LED node. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607102931.102805-4-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-ipq8064-rb3011.dts | 2 ++ 1 file changed, 2 insertions(+) commit 47e889d3d9a7da9542fd5d6f76c2b1ab2d22fcaa Author: Krzysztof Kozlowski Date: Tue Jun 7 12:29:24 2022 +0200 ARM: dts: qcom: ipq4018-ap120c-ac: add function and color to LED nodes Add common LED properties - the function and color - to LED nodes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607102931.102805-3-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-ipq4018-ap120c-ac-bit.dts | 6 ++++++ arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts | 7 +++++++ 2 files changed, 13 insertions(+) commit 966d7e9c35cf3a759b51a490308ca5d83727569f Author: Krzysztof Kozlowski Date: Tue Jun 7 12:29:23 2022 +0200 ARM: dts: qcom: apq8060-ifc6410: add color to LED node Add common LED property - the color - to LED node. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607102931.102805-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 2 ++ 1 file changed, 2 insertions(+) commit b8f9cae583c46ef6df0e643ec0022084d39769e7 Author: Krzysztof Kozlowski Date: Tue Jun 7 12:29:22 2022 +0200 ARM: dts: qcom: apq8060-dragonboard: add function and color to LED nodes Add common LED properties - the function and color - to LED nodes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220607102931.102805-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-apq8060-dragonboard.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 34eff17ec4e2b449f92705ce4d6f592fc1a05926 Author: Jilin Yuan Date: Wed Jun 29 21:13:30 2022 +0800 hisilicon/hns3/hns3vf:fix repeated words in comments Delete the redundant word 'new'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220629131330.16812-1-yuanjilin@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 577d7685d591e5b247d460972123e3931c91321a Author: Jilin Yuan Date: Wed Jun 29 21:00:13 2022 +0800 google/gve:fix repeated words in comments Delete the redundant word 'a'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220629130013.3273-1-yuanjilin@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/google/gve/gve_tx_dqo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1769b6eb06b58b6a72260b787aaa477bb327716 Author: Jilin Yuan Date: Wed Jun 29 20:54:41 2022 +0800 freescale/fs_enet:fix repeated words in comments Delete the redundant word 'a'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220629125441.62420-1-yuanjilin@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/fs_enet/fs_enet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6e0951414a314e7db3e9e24fd924b3e15515288 Author: Miaoqian Lin Date: Mon Jun 6 10:42:52 2022 +0400 soc: qcom: aoss: Fix refcount leak in qmp_cooling_devices_register Every iteration of for_each_available_child_of_node() decrements the reference count of the previous node. When breaking early from a for_each_available_child_of_node() loop, we need to explicitly call of_node_put() on the child node. Add missing of_node_put() to avoid refcount leak. Fixes: 05589b30b21a ("soc: qcom: Extend AOSS QMP driver to support resources that are used to wake up the SoC.") Signed-off-by: Miaoqian Lin Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220606064252.42595-1-linmq006@gmail.com drivers/soc/qcom/qcom_aoss.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4c2d6acd765f380adcd296fe0a166b40e4b66a61 Author: Jilin Yuan Date: Wed Jun 29 20:37:56 2022 +0800 ethernet/emulex:fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220629123756.48860-1-yuanjilin@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/emulex/benet/be_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8dcc8ab805b77d41d8f205190b9ae179211fb26c Author: Jilin Yuan Date: Wed Jun 29 17:28:56 2022 +0800 atheros/atl1e:fix repeated words in comments Delete the redundant word 'slot'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220629092856.35678-1-yuanjilin@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3e7259f9ebe04054dc202b9b9f887abf3e4b12a Author: Xiang wangx Date: Sat Jun 4 22:23:27 2022 +0800 soc: qcom: llcc: Fix syntax errors in comments Delete the redundant word 'and'. Signed-off-by: Xiang wangx Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220604142327.14714-1-wangxiang@cdjrlc.com drivers/soc/qcom/llcc-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1cebc3ca4aba41d4bf05453c6b2a0a0475eb49e4 Merge: 0d8730f07c82 173e468c717c Author: Jakub Kicinski Date: Thu Jun 30 19:57:38 2022 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 1GbE Intel Wired LAN Driver Updates 2022-06-30 This series contains updates to misc Intel drivers. Jesse removes unused macros from e100, e1000, e1000e, i40e, iavf, igc, ixgb, ixgbe, and ixgbevf drivers. Jiang Jian removes repeated words from ixgbe, fm10k, igb, and ixgbe drivers. Jilin Yuan removes repeated words from e1000, e1000e, fm10k, i40e, iavf, igb, igbvf, igc, ixgbevf, and ice drivers. * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: intel/ice:fix repeated words in comments intel/ixgbevf:fix repeated words in comments intel/igc:fix repeated words in comments intel/igbvf:fix repeated words in comments intel/igb:fix repeated words in comments intel/iavf:fix repeated words in comments intel/i40e:fix repeated words in comments intel/fm10k:fix repeated words in comments intel/e1000e:fix repeated words in comments intel/e1000:fix repeated words in comments ixgbe: drop unexpected word 'for' in comments igb: remove unexpected word "the" fm10k: remove unexpected word "the" ixgbe: remove unexpected word "the" intel: remove unused macros ==================== Link: https://lore.kernel.org/r/20220630213208.3034968-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit dc34d5036692c614eef23c1130ee42a201c316bf Author: Alexander Lobakin Date: Fri Jun 24 14:13:13 2022 +0200 lib: test_bitmap: add compile-time optimization/evaluations assertions Add a function to the bitmap test suite, which will ensure that compilers are able to evaluate operations performed by the bitops/bitmap helpers to compile-time constants when all of the arguments are compile-time constants as well, or trigger a build bug otherwise. This should work on all architectures and all the optimization levels supported by Kbuild. The function doesn't perform any runtime tests and gets optimized out to nothing after passing the build assertions. Unfortunately, Clang for s390 is currently broken (up to the latest Git snapshots) -- see the comment in the code -- so for now there's a small workaround for it which doesn't alter the logics. Hope we'll be able to remove it one day (bugreport is on its way). Suggested-by: Yury Norov Signed-off-by: Alexander Lobakin Reviewed-by: Andy Shevchenko Signed-off-by: Yury Norov lib/test_bitmap.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit 3e7e5baaaba78075a7f3a57432609e363bf2a486 Author: Alexander Lobakin Date: Fri Jun 24 14:13:12 2022 +0200 bitmap: don't assume compiler evaluates small mem*() builtins calls Intel kernel bot triggered the build bug on ARC architecture that in fact is as follows: DECLARE_BITMAP(bitmap, BITS_PER_LONG); bitmap_clear(bitmap, 0, BITS_PER_LONG); BUILD_BUG_ON(!__builtin_constant_p(*bitmap)); which can be expanded to: unsigned long bitmap[1]; memset(bitmap, 0, sizeof(*bitmap)); BUILD_BUG_ON(!__builtin_constant_p(*bitmap)); In most cases, a compiler is able to expand small/simple mem*() calls to simple assignments or bitops, in this case that would mean: unsigned long bitmap[1] = { 0 }; BUILD_BUG_ON(!__builtin_constant_p(*bitmap)); and on most architectures this works, but not on ARC, despite having -O3 for every build. So, to make this work, in case when the last bit to modify is still within the first long (small_const_nbits()), just use plain assignments for the rest of bitmap_*() functions which still use mem*(), but didn't receive such compile-time optimizations yet. This doesn't have the same coverage as compilers provide, but at least something to start: text: add/remove: 3/7 grow/shrink: 43/78 up/down: 1848/-3370 (-1546) data: add/remove: 1/11 grow/shrink: 0/8 up/down: 4/-356 (-352) notably cpumask_*() family when NR_CPUS <= BITS_PER_LONG: netif_get_num_default_rss_queues 38 4 -34 cpumask_copy 90 - -90 cpumask_clear 146 - -146 and the abovementioned assertion started passing. Signed-off-by: Alexander Lobakin Signed-off-by: Yury Norov include/linux/bitmap.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit 2f7ee2a72ccec8b85a05c4644d7ec9f40c1c50c8 Author: Alexander Lobakin Date: Fri Jun 24 14:13:11 2022 +0200 net/ice: fix initializing the bitmap in the switch code Kbuild spotted the following bug during the testing of one of the optimizations: In file included from include/linux/cpumask.h:12, [...] from drivers/net/ethernet/intel/ice/ice_switch.c:4: drivers/net/ethernet/intel/ice/ice_switch.c: In function 'ice_find_free_recp_res_idx.constprop': include/linux/bitmap.h:447:22: warning: 'possible_idx[0]' is used uninitialized [-Wuninitialized] 447 | *map |= GENMASK(start + nbits - 1, start); | ^~ In file included from drivers/net/ethernet/intel/ice/ice.h:7, from drivers/net/ethernet/intel/ice/ice_lib.h:7, from drivers/net/ethernet/intel/ice/ice_switch.c:4: drivers/net/ethernet/intel/ice/ice_switch.c:4929:24: note: 'possible_idx[0]' was declared here 4929 | DECLARE_BITMAP(possible_idx, ICE_MAX_FV_WORDS); | ^~~~~~~~~~~~ include/linux/types.h:11:23: note: in definition of macro 'DECLARE_BITMAP' 11 | unsigned long name[BITS_TO_LONGS(bits)] | ^~~~ %ICE_MAX_FV_WORDS is 48, so bitmap_set() here was initializing only 48 bits, leaving a junk in the rest 16. It was previously hidden due to that filling 48 bits makes bitmap_set() call external __bitmap_set(), but after making it use plain bit arithmetics on small bitmaps, compilers started seeing the issue. It was still working because those 16 weren't used anywhere anyhow. bitmap_{clear,set}() are not really intended to initialize bitmaps, rather to modify already initialized ones, as they don't do anything past the passed number of bits. The correct function to do this in that particular case is bitmap_fill(), so use it here. It will do `*possible_idx = ~0UL` instead of `*possible_idx |= GENMASK(47, 0)`, not leaving anything in an undefined state. Fixes: fd2a6b71e300 ("ice: create advanced switch recipe") Reported-by: kernel test robot Signed-off-by: Alexander Lobakin Signed-off-by: Yury Norov drivers/net/ethernet/intel/ice/ice_switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b03fc1173c0c2bb8fad61902a862985cecdc4b1b Author: Alexander Lobakin Date: Fri Jun 24 14:13:10 2022 +0200 bitops: let optimize out non-atomic bitops on compile-time constants Currently, many architecture-specific non-atomic bitop implementations use inline asm or other hacks which are faster or more robust when working with "real" variables (i.e. fields from the structures etc.), but the compilers have no clue how to optimize them out when called on compile-time constants. That said, the following code: DECLARE_BITMAP(foo, BITS_PER_LONG) = { }; // -> unsigned long foo[1]; unsigned long bar = BIT(BAR_BIT); unsigned long baz = 0; __set_bit(FOO_BIT, foo); baz |= BIT(BAZ_BIT); BUILD_BUG_ON(!__builtin_constant_p(test_bit(FOO_BIT, foo)); BUILD_BUG_ON(!__builtin_constant_p(bar & BAR_BIT)); BUILD_BUG_ON(!__builtin_constant_p(baz & BAZ_BIT)); triggers the first assertion on x86_64, which means that the compiler is unable to evaluate it to a compile-time initializer when the architecture-specific bitop is used even if it's obvious. In order to let the compiler optimize out such cases, expand the bitop() macro to use the "constant" C non-atomic bitop implementations when all of the arguments passed are compile-time constants, which means that the result will be a compile-time constant as well, so that it produces more efficient and simple code in 100% cases, comparing to the architecture-specific counterparts. The savings are architecture, compiler and compiler flags dependent, for example, on x86_64 -O2: GCC 12: add/remove: 78/29 grow/shrink: 332/525 up/down: 31325/-61560 (-30235) LLVM 13: add/remove: 79/76 grow/shrink: 184/537 up/down: 55076/-141892 (-86816) LLVM 14: add/remove: 10/3 grow/shrink: 93/138 up/down: 3705/-6992 (-3287) and ARM64 (courtesy of Mark): GCC 11: add/remove: 92/29 grow/shrink: 933/2766 up/down: 39340/-82580 (-43240) LLVM 14: add/remove: 21/11 grow/shrink: 620/651 up/down: 12060/-15824 (-3764) Cc: Mark Rutland Signed-off-by: Alexander Lobakin Reviewed-by: Marco Elver Signed-off-by: Yury Norov include/linux/bitops.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit e69eb9c460f128b71c6b995d75a05244e4b6cc3e Author: Alexander Lobakin Date: Fri Jun 24 14:13:09 2022 +0200 bitops: wrap non-atomic bitops with a transparent macro In preparation for altering the non-atomic bitops with a macro, wrap them in a transparent definition. This requires prepending one more '_' to their names in order to be able to do that seamlessly. It is a simple change, given that all the non-prefixed definitions are now in asm-generic. sparc32 already has several triple-underscored functions, so I had to rename them ('___' -> 'sp32_'). Signed-off-by: Alexander Lobakin Reviewed-by: Marco Elver Reviewed-by: Andy Shevchenko Signed-off-by: Yury Norov arch/sparc/include/asm/bitops_32.h | 18 +++++++------- arch/sparc/lib/atomic32.c | 12 +++++----- .../asm-generic/bitops/instrumented-non-atomic.h | 28 +++++++++++----------- .../bitops/non-instrumented-non-atomic.h | 14 +++++------ include/linux/bitops.h | 18 +++++++++++++- tools/include/asm-generic/bitops/non-atomic.h | 24 +++++++++---------- tools/include/linux/bitops.h | 16 +++++++++++++ 7 files changed, 81 insertions(+), 49 deletions(-) commit bb7379bfa680bd48b468e856475778db2ad866c1 Author: Alexander Lobakin Date: Fri Jun 24 14:13:08 2022 +0200 bitops: define const_*() versions of the non-atomics Define const_*() variants of the non-atomic bitops to be used when the input arguments are compile-time constants, so that the compiler will be always able to resolve those to compile-time constants as well. Those are mostly direct aliases for generic_*() with one exception for const_test_bit(): the original one is declared atomic-safe and thus doesn't discard the `volatile` qualifier, so in order to let optimize code, define it separately disregarding the qualifier. Add them to the compile-time type checks as well just in case. Suggested-by: Marco Elver Signed-off-by: Alexander Lobakin Reviewed-by: Marco Elver Reviewed-by: Andy Shevchenko Signed-off-by: Yury Norov include/asm-generic/bitops/generic-non-atomic.h | 31 +++++++++++++++++++++++++ include/linux/bitops.h | 1 + 2 files changed, 32 insertions(+) commit 0e862838f290147ea9c16db852d8d494b552d38d Author: Alexander Lobakin Date: Fri Jun 24 14:13:07 2022 +0200 bitops: unify non-atomic bitops prototypes across architectures Currently, there is a mess with the prototypes of the non-atomic bitops across the different architectures: ret bool, int, unsigned long nr int, long, unsigned int, unsigned long addr volatile unsigned long *, volatile void * Thankfully, it doesn't provoke any bugs, but can sometimes make the compiler angry when it's not handy at all. Adjust all the prototypes to the following standard: ret bool retval can be only 0 or 1 nr unsigned long native; signed makes no sense addr volatile unsigned long * bitmaps are arrays of ulongs Next, some architectures don't define 'arch_' versions as they don't support instrumentation, others do. To make sure there is always the same set of callables present and to ease any potential future changes, make them all follow the rule: * architecture-specific files define only 'arch_' versions; * non-prefixed versions can be defined only in asm-generic files; and place the non-prefixed definitions into a new file in asm-generic to be included by non-instrumented architectures. Finally, add some static assertions in order to prevent people from making a mess in this room again. I also used the %__always_inline attribute consistently, so that they always get resolved to the actual operations. Suggested-by: Andy Shevchenko Signed-off-by: Alexander Lobakin Acked-by: Mark Rutland Reviewed-by: Yury Norov Reviewed-by: Andy Shevchenko Signed-off-by: Yury Norov arch/alpha/include/asm/bitops.h | 32 ++++++------ arch/hexagon/include/asm/bitops.h | 24 +++++---- arch/ia64/include/asm/bitops.h | 42 ++++++++------- arch/m68k/include/asm/bitops.h | 49 +++++++++++------ arch/s390/include/asm/bitops.h | 61 +++++++++++----------- arch/sh/include/asm/bitops-op32.h | 34 +++++++----- arch/x86/include/asm/bitops.h | 22 ++++---- include/asm-generic/bitops/generic-non-atomic.h | 24 ++++----- .../asm-generic/bitops/instrumented-non-atomic.h | 21 +++++--- include/asm-generic/bitops/non-atomic.h | 13 +---- .../bitops/non-instrumented-non-atomic.h | 16 ++++++ include/linux/bitops.h | 17 ++++++ tools/include/asm-generic/bitops/non-atomic.h | 24 +++++---- 13 files changed, 229 insertions(+), 150 deletions(-) commit 21bb8af513d35c005c401706030f4eb469538d1d Author: Alexander Lobakin Date: Fri Jun 24 14:13:06 2022 +0200 bitops: always define asm-generic non-atomic bitops Move generic non-atomic bitops from the asm-generic header which gets included only when there are no architecture-specific alternatives, to a separate independent file to make them always available. Almost no actual code changes, only one comment added to generic_test_bit() saying that it's an atomic operation itself and thus `volatile` must always stay there with no cast-aways. Suggested-by: Andy Shevchenko # comment Suggested-by: Marco Elver # reference to kernel-doc Signed-off-by: Alexander Lobakin Reviewed-by: Andy Shevchenko Reviewed-by: Marco Elver Signed-off-by: Yury Norov include/asm-generic/bitops/generic-non-atomic.h | 130 ++++++++++++++++++++++++ include/asm-generic/bitops/non-atomic.h | 110 ++------------------ 2 files changed, 138 insertions(+), 102 deletions(-) commit e5a16a5c4602c119262f350274021f90465f479d Author: Alexander Lobakin Date: Fri Jun 24 14:13:05 2022 +0200 ia64, processor: fix -Wincompatible-pointer-types in ia64_get_irr() test_bit(), as any other bitmap op, takes `unsigned long *` as a second argument (pointer to the actual bitmap), as any bitmap itself is an array of unsigned longs. However, the ia64_get_irr() code passes a ref to `u64` as a second argument. This works with the ia64 bitops implementation due to that they have `void *` as the second argument and then cast it later on. This works with the bitmap API itself due to that `unsigned long` has the same size on ia64 as `u64` (`unsigned long long`), but from the compiler PoV those two are different. Define @irr as `unsigned long` to fix that. That implies no functional changes. Has been hidden for 16 years! Fixes: a58786917ce2 ("[IA64] avoid broken SAL_CACHE_FLUSH implementations") Cc: stable@vger.kernel.org # 2.6.16+ Reported-by: kernel test robot Signed-off-by: Alexander Lobakin Reviewed-by: Andy Shevchenko Reviewed-by: Yury Norov Signed-off-by: Yury Norov arch/ia64/include/asm/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92a563fcf14b3093226fb36f12e9b5cf630c5a5d Author: Miaoqian Lin Date: Thu Jun 2 08:24:30 2022 +0400 soc: qcom: ocmem: Fix refcount leak in of_get_ocmem of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. of_node_put() will check NULL pointer. Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver") Signed-off-by: Miaoqian Lin Reviewed-by: Brian Masney Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220602042430.1114-1-linmq006@gmail.com drivers/soc/qcom/ocmem.c | 3 +++ 1 file changed, 3 insertions(+) commit ae500b351ab0006d933d804a2b7507fe1e98cecc Author: Manivannan Sadhasivam Date: Mon May 30 13:38:40 2022 +0530 ARM: dts: qcom: sdx55: Fix the IRQ trigger type for UART The trigger type should be LEVEL_HIGH. So fix it! Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220530080842.37024-2-manivannan.sadhasivam@linaro.org arch/arm/boot/dts/qcom-sdx55.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54f0f3b298e21ca9a5684aa120e6bcf70e66f0c5 Merge: bb356ddb78b2 ca503bb29022 Author: Palmer Dabbelt Date: Thu Jun 30 19:18:51 2022 -0700 riscv: Kconfig: Style cleanups The majority of the Kconfig files use a single tab for basic indentation and a single tab followed by two whitespaces for help text indentation. Fix the lines that don't follow this convention. While at it, add trailing comments to endif/endmenu statements for better readability. * 'riscv-kconfig_cleanups' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/palmer/linux: riscv: Kconfig.socs: Add comments riscv: Kconfig.erratas: Add comments riscv: Kconfig: Fix indentation and add comments commit f929217499cf54a30be995aae65e9951ba079c90 Merge: 805ada63ba05 6fb5ee7cec06 Author: Dave Airlie Date: Fri Jul 1 09:52:36 2022 +1000 Merge tag 'drm-misc-next-2022-06-30' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.20: UAPI Changes: * fourcc: Update documentation Cross-subsystem Changes: * iosys-map: Rework iosys_map_{rd,wr} for improved performance * vfio: Use aperture helpers Core Changes: * aperture: Export for use with other subsystems * connector: Remove deprecated ida_simple_get() * crtc: Add helper with general state checks, convert drivers * format-helper: Add Kunit tests for RGB32 to RGB8 Driver Changes: * ast: Fix black screen on resume * bridge: tc358767: Simplify DSI lane handling * mcde: Fix ref-count leak * mxsfb/lcdif: Support i.MX8MP LCD controller * stm/ltdc: Support dynamic Z order; Support mirroring; Fixes and cleanups * vc4: Many small fixes throughout the driver Signed-off-by: Dave Airlie # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmK9TnYACgkQaA3BHVML # eiMJcgf+JsGWlFutkxlJCEUDKTXk6BYHQL4czyskDvpBoLrdU1tyrAfKKtqP5k+0 # SMvS6h1CFa/fSUCYpbdpJ6ER1fZ9r19WdgoPTBc4b97/uQTOJDzd5zuHDiJZquwC # O6HD/rptUzPFe6HJuY2cYVtwMlWb2NhITMHfctgyeQJSMK8TwoU1bDVFftwxaWFt # ISscTz0enn38sCjEarSpyKkBCinuaWDcpe5BI2Dp3imkDWR3ktzuh4B11QWS0DKs # Q/FLGTEl1sDrV7r93WiA5BIAPVwNMm1Pl0syd1p42SNLNnv0gcap4GL6qni4h9Ev # P/3fIInor/Sht8fyhlFsOUA8k2x7MA== # =6NoJ # -----END PGP SIGNATURE----- # gpg: Signature made Thu 30 Jun 2022 17:19:18 AEST # gpg: using RSA key 7217FBAC8CE9CF6344A168E5680DC11D530B7A23 # gpg: Can't check signature: No public key From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/Yr1On+eT1mCvIMzW@linux-uq9g commit f5d1f6d63c9a1f52a2f6f5f489afcaae92e47f53 Author: Bob Pearson Date: Thu Jun 30 14:04:21 2022 -0500 RDMA/rxe: Replace include statement rxe_queue.h currently includes for a definition of struct rxe_queue_buf. But it is only used as a pointer so the definition is not needed. This patch replaces the include statement with the declaration struct rxe_queue_buf; Link: https://lore.kernel.org/r/20220630190425.2251-5-rpearsonhpe@gmail.com Reported-by: Frank Zago Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_queue.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cae3fa541e623d286978d17e12e66a23c2185a1e Author: Bob Pearson Date: Thu Jun 30 14:04:19 2022 -0500 RDMA/rxe: Convert pr_warn/err to pr_debug in pyverbs The pyverbs test suite generates a few dmesg traces from intentional error tests. This patch replaces those messages with pr_debug() calls which improves the usefullness of the tests. Link: https://lore.kernel.org/r/20220630190425.2251-3-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_cq.c | 8 ++++---- drivers/infiniband/sw/rxe/rxe_resp.c | 8 +++++--- 2 files changed, 9 insertions(+), 7 deletions(-) commit ab1489017aa7a9f02e24bee73cf9ec8079cd3909 Author: Luca Weiss Date: Sun May 22 10:36:18 2022 +0200 ARM: dts: qcom-msm8974: fix irq type on blsp2_uart1 IRQ_TYPE_NONE is invalid, so use the correct interrupt type. Signed-off-by: Luca Weiss Fixes: b05f82b152c9 ("ARM: dts: qcom: msm8974: Add blsp2_uart7 for bluetooth on sirius") Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220522083618.17894-1-luca@z3ntu.xyz arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5da61cf5bab30059f22ea368702c445ee87171a Author: Alex Deucher Date: Mon Jun 27 16:35:43 2022 -0400 drm/amdgpu/display: add missing FP_START/END checks dcn32_clk_mgr.c Properly handle FP code in dcn32_clk_mgr.c. Fixes: 265280b99822 ("drm/amd/display: add CLKMGR changes for DCN32/321") Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 4 ++++ 1 file changed, 4 insertions(+) commit 780f97cec866e1ec6967c66c2a1f68b8aa1e3f23 Author: Rodrigo Siqueira Date: Thu Jun 30 14:46:21 2022 -0400 drm/amd/display: Fix __nedf2 undefined for 32 bit compilation When we tried to compile DCN32/321 for 32-bit architecture, we got this error message: ERROR: modpost: "__nedf2" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! This commit fixes this issue by rewriting a small part of the dcn32_build_wm_range_table. Cc: Aurabindo Pillai Cc: Harry Wentland Cc: Alex Deucher Cc: Randy Dunlap Fixes: 265280b99822 ("drm/amd/display: add CLKMGR changes for DCN32/321") Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Reviewed-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 202804b9705ce26788c443a54aec47eae20f4596 Author: Rodrigo Siqueira Date: Thu Jun 30 14:46:20 2022 -0400 drm/amd/display: Fix __muldf3 undefined for 32 bit compilation Sometimes when trying to enable some feature, we have to define some values with educated guesses, but we mark those values as TBD, which means "To Be Determined". However, the correct way to approach it is by loading that information from the firmware. Anyway, some of the values that we were experimenting with caused this issue: ERROR: modpost: "__muldf3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! This commit fixes this issue by removing the division by two since it is harmless in this case. Cc: Aurabindo Pillai Cc: Harry Wentland Cc: Alex Deucher Cc: Randy Dunlap Fixes: 265280b99822 ("drm/amd/display: add CLKMGR changes for DCN32/321") Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Reviewed-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 071ebbb0d4826ce7c47953b955a522f503dcedfb Author: Rodrigo Siqueira Date: Thu Jun 30 14:46:19 2022 -0400 drm/amd/display: Fix __floatunsidf undefined for 32 bit compilation When we tried to compile DCN32/321 for 32-bit architecture, we got this error message: ERROR: modpost: "__floatunsidf" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! This was caused because we were trying to assign an unsigned int to a double value which causes issues for 32-bit architecture. This issue can be fixed by changing the value type. Cc: Aurabindo Pillai Cc: Harry Wentland Cc: Alex Deucher Cc: Randy Dunlap Fixes: 265280b99822 ("drm/amd/display: add CLKMGR changes for DCN32/321") Reported-by: Stephen Rothwell Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Reviewed-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f8acf01a6a4f84baf05181e24bd48def4ba23f5b Author: Vladimir Zapolskiy Date: Fri May 20 00:41:33 2022 +0300 clk: qcom: camcc-sm8250: Fix topology around titan_top power domain On SM8250 two found VFE GDSC power domains shall not be operated, if titan top is turned off, thus the former power domains will be set as subdomains by a GDSC registration routine. Fixes: 5d66ca79b58c ("clk: qcom: Add camera clock controller driver for SM8250") Signed-off-by: Vladimir Zapolskiy Reviewed-by: Robert Foss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220519214133.1728979-3-vladimir.zapolskiy@linaro.org drivers/clk/qcom/camcc-sm8250.c | 4 ++++ 1 file changed, 4 insertions(+) commit 103dd2338bbff567bce7acd00fc5a09c806b38ec Author: Vladimir Zapolskiy Date: Fri May 20 00:41:32 2022 +0300 clk: qcom: camcc-sdm845: Fix topology around titan_top power domain On SDM845 two found VFE GDSC power domains shall not be operated, if titan top is turned off, thus the former power domains will be set as subdomains by a GDSC registration routine. Fixes: 78412c262004 ("clk: qcom: Add camera clock controller driver for SDM845") Signed-off-by: Vladimir Zapolskiy Reviewed-by: Robert Foss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220519214133.1728979-2-vladimir.zapolskiy@linaro.org drivers/clk/qcom/camcc-sdm845.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0d8928a94ba18205cc7b41793af333e6731e9d76 Author: Rodrigo Siqueira Date: Thu Jun 30 14:46:18 2022 -0400 drm/amd/display: Fix __umoddi3 undefined for 32 bit compilation While we tried to build amdgpu on i386, we got this error: ERROR: modpost: "__umoddi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! This commit fixes this issue by replacing the standard module operator with div_u64_rem. Cc: Aurabindo Pillai Cc: Harry Wentland Cc: Alex Deucher Cc: Randy Dunlap Fixes: d3dfceb58de5 ("drm/amd/display: Add dependant changes for DCN32/321") Reported-by: Stephen Rothwell Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Reviewed-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ca503bb2902296a14141a7e3e4416333b2e0e447 Author: Juerg Haefliger Date: Fri May 20 14:02:32 2022 +0200 riscv: Kconfig.socs: Add comments Add trailing comments to endif and endmenu statements for better readability. Signed-off-by: Juerg Haefliger Link: https://lore.kernel.org/r/20220520120232.148310-4-juergh@canonical.com Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig.socs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 84b10f781abfd2a19fcc6439ddd7313cd87ff047 Author: Juerg Haefliger Date: Fri May 20 14:02:31 2022 +0200 riscv: Kconfig.erratas: Add comments Add trailing comments to endmenu statements for better readability. Signed-off-by: Juerg Haefliger Link: https://lore.kernel.org/r/20220520120232.148310-3-juergh@canonical.com Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig.erratas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f66a3d099941f2b659f79f357191e2332c419fc Author: Juerg Haefliger Date: Fri May 20 14:02:30 2022 +0200 riscv: Kconfig: Fix indentation and add comments The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules. While add it, add trailing comments to endmenu statements for better readability. Signed-off-by: Juerg Haefliger Link: https://lore.kernel.org/r/20220520120232.148310-2-juergh@canonical.com Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 0d8730f07c822a351a624462918c7109cdc7f402 Merge: b7d78b46d5e8 5e8379351dbd Author: Jakub Kicinski Date: Thu Jun 30 16:31:00 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c 9c5de246c1db ("net: sparx5: mdb add/del handle non-sparx5 devices") fbb89d02e33a ("net: sparx5: Allow mdb entries to both CPU and ports") Signed-off-by: Jakub Kicinski commit 4eb1560259de4fd5f89ec5e7faf5d4c6a83bae9c Author: Luca Weiss Date: Tue May 17 22:34:51 2022 +0200 ARM: dts: qcom: msm8974: Add BAM DMUX Ethernet/IP device BAM DMUX is used as the network interface to the modem. Signed-off-by: Luca Weiss Reviewed-by: Stephan Gerhold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220517203450.1155696-1-luca@z3ntu.xyz arch/arm/boot/dts/qcom-msm8974.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 1bf7305e79aab095196131bdc87a97796e0e3fac Author: Robert Marko Date: Sun May 15 23:00:47 2022 +0200 clk: qcom: ipq8074: dont disable gcc_sleep_clk_src Once the usb sleep clocks are disabled, clock framework is trying to disable the sleep clock source also. However, it seems that it cannot be disabled and trying to do so produces: [ 245.436390] ------------[ cut here ]------------ [ 245.441233] gcc_sleep_clk_src status stuck at 'on' [ 245.441254] WARNING: CPU: 2 PID: 223 at clk_branch_wait+0x130/0x140 [ 245.450435] Modules linked in: xhci_plat_hcd xhci_hcd dwc3 dwc3_qcom leds_gpio [ 245.456601] CPU: 2 PID: 223 Comm: sh Not tainted 5.18.0-rc4 #215 [ 245.463889] Hardware name: Xiaomi AX9000 (DT) [ 245.470050] pstate: 204000c5 (nzCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 245.474307] pc : clk_branch_wait+0x130/0x140 [ 245.481073] lr : clk_branch_wait+0x130/0x140 [ 245.485588] sp : ffffffc009f2bad0 [ 245.489838] x29: ffffffc009f2bad0 x28: ffffff8003e6c800 x27: 0000000000000000 [ 245.493057] x26: 0000000000000000 x25: 0000000000000000 x24: ffffff800226ef20 [ 245.500175] x23: ffffffc0089ff550 x22: 0000000000000000 x21: ffffffc008476ad0 [ 245.507294] x20: 0000000000000000 x19: ffffffc00965ac70 x18: fffffffffffc51a7 [ 245.514413] x17: 68702e3030303837 x16: 3a6d726f6674616c x15: ffffffc089f2b777 [ 245.521531] x14: ffffffc0095c9d18 x13: 0000000000000129 x12: 0000000000000129 [ 245.528649] x11: 00000000ffffffea x10: ffffffc009621d18 x9 : 0000000000000001 [ 245.535767] x8 : 0000000000000001 x7 : 0000000000017fe8 x6 : 0000000000000001 [ 245.542885] x5 : ffffff803fdca6d8 x4 : 0000000000000000 x3 : 0000000000000027 [ 245.550002] x2 : 0000000000000027 x1 : 0000000000000023 x0 : 0000000000000026 [ 245.557122] Call trace: [ 245.564229] clk_branch_wait+0x130/0x140 [ 245.566490] clk_branch2_disable+0x2c/0x40 [ 245.570656] clk_core_disable+0x60/0xb0 [ 245.574561] clk_core_disable+0x68/0xb0 [ 245.578293] clk_disable+0x30/0x50 [ 245.582113] dwc3_qcom_remove+0x60/0xc0 [dwc3_qcom] [ 245.585588] platform_remove+0x28/0x60 [ 245.590361] device_remove+0x4c/0x80 [ 245.594179] device_release_driver_internal+0x1dc/0x230 [ 245.597914] device_driver_detach+0x18/0x30 [ 245.602861] unbind_store+0xec/0x110 [ 245.607027] drv_attr_store+0x24/0x40 [ 245.610847] sysfs_kf_write+0x44/0x60 [ 245.614405] kernfs_fop_write_iter+0x128/0x1c0 [ 245.618052] new_sync_write+0xc0/0x130 [ 245.622391] vfs_write+0x1d4/0x2a0 [ 245.626123] ksys_write+0x58/0xe0 [ 245.629508] __arm64_sys_write+0x1c/0x30 [ 245.632895] invoke_syscall.constprop.0+0x5c/0x110 [ 245.636890] do_el0_svc+0xa0/0x150 [ 245.641488] el0_svc+0x18/0x60 [ 245.644872] el0t_64_sync_handler+0xa4/0x130 [ 245.647914] el0t_64_sync+0x174/0x178 [ 245.652340] ---[ end trace 0000000000000000 ]--- So, add CLK_IS_CRITICAL flag to the clock so that the kernel won't try to disable the sleep clock. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220515210048.483898-10-robimarko@gmail.com drivers/clk/qcom/gcc-ipq8074.c | 1 + 1 file changed, 1 insertion(+) commit 8add990ace3db767c2dab59113fbdf137d237529 Author: Robert Marko Date: Sun May 15 23:00:46 2022 +0200 clk: qcom: ipq8074: add USB GDSCs Add GDSC-s for each of the two USB controllers built-in the IPQ8074. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220515210048.483898-9-robimarko@gmail.com drivers/clk/qcom/Kconfig | 1 + drivers/clk/qcom/gcc-ipq8074.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) commit c87969d2187035cea3152ee8ca4b9f44afe77d9c Merge: 2c930dc1e34f 74622e401e21 Author: Bjorn Andersson Date: Thu Jun 30 18:24:35 2022 -0500 Merge branch '20220515210048.483898-8-robimarko@gmail.com' into clk-for-5.20 commit 74622e401e2109a9aacce0b9698bbcd2307db17a Author: Robert Marko Date: Sun May 15 23:00:45 2022 +0200 dt-bindings: clock: qcom: ipq8074: add USB GDSCs Add bindings for the USB GDSCs found in IPQ8074 GCC. Signed-off-by: Robert Marko Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220515210048.483898-8-robimarko@gmail.com include/dt-bindings/clock/qcom,gcc-ipq8074.h | 3 +++ 1 file changed, 3 insertions(+) commit 99e7e16445c41e44a6f678a376d55d277289b60d Author: Krzysztof Kozlowski Date: Tue May 17 09:01:02 2022 +0200 dt-bindings: soc: qcom,wcnss: remove unneeded ref for names The core schema already sets a 'ref' for properties ending with 'names'. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220517070113.18023-2-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/soc/qcom/qcom,wcnss.yaml | 1 - 1 file changed, 1 deletion(-) commit 2c930dc1e34f08d32ccf1b2baf01dec56b41ab05 Author: Robert Marko Date: Sun May 15 23:00:44 2022 +0200 dt-bindings: clocks: qcom,gcc-ipq8074: support power domains GCC inside of IPQ8074 also provides power management via built-in GDSCs. In order to do so, '#power-domain-cells' must be set to 1. Signed-off-by: Robert Marko Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220515210048.483898-7-robimarko@gmail.com Documentation/devicetree/bindings/clock/qcom,gcc-ipq8074.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit 2bd357e698207e2e65db03007e4be65bf9d6a7b3 Author: Robert Marko Date: Sun May 15 23:00:43 2022 +0200 clk: qcom: ipq8074: set BRANCH_HALT_DELAY flag for UBI clocks Currently, attempting to enable the UBI clocks will cause the stuck at off warning to be printed and clk_enable will fail. [ 14.936694] gcc_ubi1_ahb_clk status stuck at 'off' Downstream 5.4 QCA kernel has fixed this by seting the BRANCH_HALT_DELAY flag on UBI clocks, so lets do the same. Fixes: 5736294aef83 ("clk: qcom: ipq8074: add NSS clocks") Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220515210048.483898-6-robimarko@gmail.com drivers/clk/qcom/gcc-ipq8074.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 74521205b64030b1321ccc04372729cfd2800996 Author: Robert Marko Date: Sun May 15 23:00:42 2022 +0200 clk: qcom: ipq8074: add PPE crypto clock The built-in PPE engine has a dedicated clock for the EIP-197 crypto engine. So, since the required clock currently missing add support for it. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220515210048.483898-5-robimarko@gmail.com drivers/clk/qcom/gcc-ipq8074.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 90e6d290603df6387c95c114cc8154862c3e7515 Author: Robert Marko Date: Sun May 15 23:00:41 2022 +0200 dt-bindings: clock: qcom: ipq8074: add PPE crypto clock Add binding for the PPE crypto clock in IPQ8074. Signed-off-by: Robert Marko Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220515210048.483898-4-robimarko@gmail.com include/dt-bindings/clock/qcom,gcc-ipq8074.h | 1 + 1 file changed, 1 insertion(+) commit 0e9e61a2815b5cd34f1b495b2d72e8127ce9b794 Author: Robert Marko Date: Sun May 15 23:00:40 2022 +0200 clk: qcom: ipq8074: fix NSS port frequency tables NSS port 5 and 6 frequency tables are currently broken and are causing a wide ranges of issue like 1G not working at all on port 6 or port 5 being clocked with 312 instead of 125 MHz as UNIPHY1 gets selected. So, update the frequency tables with the ones from the downstream QCA 5.4 based kernel which has already fixed this. Fixes: 7117a51ed303 ("clk: qcom: ipq8074: add NSS ethernet port clocks") Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220515210048.483898-3-robimarko@gmail.com drivers/clk/qcom/gcc-ipq8074.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3401ea2856ef84f39b75f0dc5ebcaeda81cb90ec Author: Robert Marko Date: Sun May 15 23:00:39 2022 +0200 clk: qcom: ipq8074: SW workaround for UBI32 PLL lock UBI32 Huayra PLL fails to lock in 5 us in some SoC silicon and thus it will cause the wait_for_pll() to timeout and thus return the error indicating that the PLL failed to lock. This is bug in Huayra PLL HW for which SW workaround is to set bit 26 of TEST_CTL register. This is ported from the QCA 5.4 based downstream kernel. Fixes: b8e7e519625f ("clk: qcom: ipq8074: add remaining PLL’s") Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220515210048.483898-2-robimarko@gmail.com drivers/clk/qcom/gcc-ipq8074.c | 3 +++ 1 file changed, 3 insertions(+) commit ca41ec1b30434636c56c5600b24a8d964d359d9c Author: Robert Marko Date: Sun May 15 23:00:38 2022 +0200 clk: qcom: ipq8074: fix NSS core PLL-s Like in IPQ6018 the NSS related Alpha PLL-s require initial configuration to work. So, obtain the regmap that is required for the Alpha PLL configuration and thus utilize the qcom_cc_really_probe() as we already have the regmap. Then utilize the Alpha PLL configs from the downstream QCA 5.4 based kernel to configure them. This fixes the UBI32 and NSS crypto PLL-s failing to get enabled by the kernel. Fixes: b8e7e519625f ("clk: qcom: ipq8074: add remaining PLL’s") Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220515210048.483898-1-robimarko@gmail.com drivers/clk/qcom/gcc-ipq8074.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit f25b0d9dd6d9579294ef43fb8dfad4757b0ed447 Author: Krzysztof Kozlowski Date: Fri Jun 24 18:21:41 2022 +0200 dt-bindings: connector: usb: align example indentation to four-space One DTS example was using 8-space indentation, while others 2-space. For complex DTS with multiple levels, 2-space is not that readable and in DTS examples 4-space is preferred. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220624162141.25890-1-krzysztof.kozlowski@linaro.org .../bindings/connector/usb-connector.yaml | 152 ++++++++++----------- 1 file changed, 76 insertions(+), 76 deletions(-) commit 7a255ae77216237a4ce83ddea595aa4e0a812f46 Author: Yafang Shao Date: Wed Jun 29 15:48:32 2022 +0000 bpftool: Show also the name of type BPF_OBJ_LINK For example, /sys/fs/bpf/maps.debug is a BPF link. When you run `bpftool map show` to show it: Before: $ bpftool map show pinned /sys/fs/bpf/maps.debug Error: incorrect object type: unknown After: $ bpftool map show pinned /sys/fs/bpf/maps.debug Error: incorrect object type: link Signed-off-by: Yafang Shao Signed-off-by: Daniel Borkmann Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20220629154832.56986-5-laoar.shao@gmail.com tools/bpf/bpftool/common.c | 1 + 1 file changed, 1 insertion(+) commit fbd2251d3ee9937ec21762dd7c785877e1c9faaa Author: Paul Cercueil Date: Mon Jun 27 23:39:50 2022 +0100 docs: dt: writing-bindings: Update URL to DT schemas The previous URL was giving a 404 error. Signed-off-by: Paul Cercueil Reviewed-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220627223950.35748-1-paul@crapouillou.net Documentation/devicetree/bindings/writing-bindings.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 971e4a9781742aaad1587e25fd5582b2dd595ef8 Author: Daniele Ceraolo Spurio Date: Tue Jun 21 16:30:05 2022 -0700 drm/i915/guc: ADL-N should use the same GuC FW as ADL-S The only difference between the ADL S and P GuC FWs is the HWConfig support. ADL-N does not support HWConfig, so we should use the same binary as ADL-S, otherwise the GuC might attempt to fetch a config table that does not exist. ADL-N is internally identified as an ADL-P, so we need to special-case it in the FW selection code. Fixes: 7e28d0b26759 ("drm/i915/adl-n: Enable ADL-N platform") Cc: John Harrison Cc: Tejas Upadhyay Cc: Anusha Srivatsa Cc: Jani Nikula Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220621233005.3952293-1-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 173e468c717c4f422e3785d6bc95a85c456faece Author: Jilin Yuan Date: Wed Jun 29 22:08:24 2022 +0800 intel/ice:fix repeated words in comments Delete the redundant word 'a'. Signed-off-by: Jilin Yuan Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_flex_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit afa646299a282c5e621242c2db8c95c0ccb57d0e Author: Ziyang Xuan Date: Thu Jun 16 12:52:59 2022 +0800 ice: Remove unnecessary NULL check before dev_put Since commit b37a46683739 ("netdevice: add the case if dev is NULL"), dev_put(NULL) is safe, check NULL before dev_put() is not needed. Signed-off-by: Ziyang Xuan Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_lag.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0ca85829903f1d4849f2fb463d86ea04d679c98f Author: Lu Wei Date: Wed May 18 14:27:59 2022 -0700 ice: use eth_broadcast_addr() to set broadcast address Use eth_broadcast_addr() to set broadcast address instead of memset(). Signed-off-by: Lu Wei Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_tc_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 263957263a0008508b34425dd69722e01e2e4554 Author: Martyna Szapar-Mudlaw Date: Wed Apr 20 23:00:49 2022 +0200 ice: switch: dynamically add VLAN headers to dummy packets Enable the support of creating all kinds of declared dummy packets with the VLAN tags by inserting VLAN headers (single VLAN and QinQ cases) if needed. Decrease the number of declared dummy packets and increase in the possible packet's combinations for adding switch rules. This change enables support of creating filters that match both on VLAN + tunnels properties in switchdev. Signed-off-by: Martyna Szapar-Mudlaw Reviewed-by: Alexander Lobakin Tested-by: Sandeep Penigalapati Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_switch.c | 537 ++++++++-------------------- 1 file changed, 140 insertions(+), 397 deletions(-) commit ea71b967a50785fed7129aaf0e7cb201944c01e7 Author: Martyna Szapar-Mudlaw Date: Fri Mar 25 11:30:49 2022 +0100 ice: Add support for VLAN TPID filters in switchdev Enable support for adding TC rules that filter on the VLAN tag type in switchdev mode. Signed-off-by: Martyna Szapar-Mudlaw Tested-by: Sandeep Penigalapati Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_protocol_type.h | 7 ++- drivers/net/ethernet/intel/ice/ice_switch.c | 59 ++++++++++++++++++++-- drivers/net/ethernet/intel/ice/ice_switch.h | 1 + drivers/net/ethernet/intel/ice/ice_tc_lib.c | 21 ++++++++ drivers/net/ethernet/intel/ice/ice_tc_lib.h | 1 + drivers/net/ethernet/intel/ice/ice_vlan_mode.c | 1 - 6 files changed, 85 insertions(+), 5 deletions(-) commit 06bca7c2685a9ab129ede0272de00d92c40347ac Author: Martyna Szapar-Mudlaw Date: Sat Mar 26 13:35:36 2022 +0100 ice: Add support for double VLAN in switchdev Enable support for adding TC rules with both C-tag and S-tag that can filter on the inner and outer VLAN in QinQ for basic packets (not tunneled cases). Signed-off-by: Wiktor Pilarczyk Signed-off-by: Martyna Szapar-Mudlaw Reviewed-by: Alexander Lobakin Tested-by: Sandeep Penigalapati Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_protocol_type.h | 2 + drivers/net/ethernet/intel/ice/ice_switch.c | 230 ++++++++++++++++++++- drivers/net/ethernet/intel/ice/ice_tc_lib.c | 43 +++- drivers/net/ethernet/intel/ice/ice_tc_lib.h | 2 + 4 files changed, 275 insertions(+), 2 deletions(-) commit 39e940d4abfabb08b6937a315546b24d10be67e3 Author: Maciej Fijalkowski Date: Wed Jun 29 16:34:58 2022 +0200 selftests/xsk: Destroy BPF resources only when ctx refcount drops to 0 Currently, xsk_socket__delete frees BPF resources regardless of ctx refcount. Xdpxceiver has a test to verify whether underlying BPF resources would not be wiped out after closing XSK socket that was bound to interface with other active sockets. From library's xsk part perspective it also means that the internal xsk context is shared and its refcount is bumped accordingly. After a switch to loading XDP prog based on previously opened XSK socket, mentioned xdpxceiver test fails with: not ok 16 [xdpxceiver.c:swap_xsk_resources:1334]: ERROR: 9/"Bad file descriptor which means that in swap_xsk_resources(), xsk_socket__delete() released xskmap which in turn caused a failure of xsk_socket__update_xskmap(). To fix this, when deleting socket, decrement ctx refcount before releasing BPF resources and do so only when refcount dropped to 0 which means there are no more active sockets for this ctx so BPF resources can be freed safely. Fixes: 2f6324a3937f ("libbpf: Support shared umems between queues and devices") Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20220629143458.934337-5-maciej.fijalkowski@intel.com tools/testing/selftests/bpf/xsk.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 6d4c767c032b165cc290c51f4e82bc54b14b1cf1 Author: Maciej Fijalkowski Date: Wed Jun 29 16:34:57 2022 +0200 selftests/xsk: Verify correctness of XDP prog attach point To prevent the case we had previously where for TEST_MODE_SKB, XDP prog was attached in native mode, call bpf_xdp_query() after loading prog and make sure that attach_mode is as expected. Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20220629143458.934337-4-maciej.fijalkowski@intel.com tools/testing/selftests/bpf/xdpxceiver.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 61333008d01e18716a7050fdc9479cc8d6e63883 Author: Maciej Fijalkowski Date: Wed Jun 29 16:34:56 2022 +0200 selftests/xsk: Introduce XDP prog load based on existing AF_XDP socket Currently, xsk_setup_xdp_prog() uses anonymous xsk_socket struct which means that during xsk_create_bpf_link() call, xsk->config.xdp_flags is always 0. This in turn means that from xdpxceiver it is impossible to use xdpgeneric attachment, so since commit 3b22523bca02 ("selftests, xsk: Fix bpf_res cleanup test") we were not testing SKB mode at all. To fix this, introduce a function, called xsk_setup_xdp_prog_xsk(), that will load XDP prog based on the existing xsk_socket, so that xsk context's refcount is correctly bumped and flags from application side are respected. Use this from xdpxceiver side so we get coverage of generic and native XDP program attach points. Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20220629143458.934337-3-maciej.fijalkowski@intel.com tools/testing/selftests/bpf/xdpxceiver.c | 2 +- tools/testing/selftests/bpf/xsk.c | 5 +++++ tools/testing/selftests/bpf/xsk.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) commit 24d2e5d9da608445e2e5c2c9ab5cf418f0fc4612 Author: Maciej Fijalkowski Date: Wed Jun 29 16:34:55 2022 +0200 selftests/xsk: Avoid bpf_link probe for existing xsk Currently bpf_link probe is done for each call of xsk_socket__create(). For cases where xsk context was previously created and current socket creation uses it, has_bpf_link will be overwritten, where it has already been initialized. Optimize this by moving the query to the xsk_create_ctx() so that when xsk_get_ctx() finds a ctx then no further bpf_link probes are needed. Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20220629143458.934337-2-maciej.fijalkowski@intel.com tools/testing/selftests/bpf/xsk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cb33d1bc1ac8e51fd88928f96674d392f8e07c4 Author: Bob Pearson Date: Mon May 23 17:32:52 2022 -0500 RDMA/rxe: Fix deadlock in rxe_do_local_ops() When a local operation (invalidate mr, reg mr, bind mw) is finished there will be no ack packet coming from a responder to cause the wqe to be completed. This may happen anyway if a subsequent wqe performs IO. Currently if the wqe is signalled the completer tasklet is scheduled immediately but not otherwise. This leads to a deadlock if the next wqe has the fence bit set in send flags and the operation is not signalled. This patch removes the condition that the wqe must be signalled in order to schedule the completer tasklet which is the simplest fix for this deadlock and is fairly low cost. This is the analog for local operations of always setting the ackreq bit in all last or only request packets even if the operation is not signalled. Link: https://lore.kernel.org/r/20220523223251.15350-1-rpearsonhpe@gmail.com Reported-by: Jenny Hack Fixes: c1a411268a4b ("RDMA/rxe: Move local ops to subroutine") Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_req.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3db7f894549a54dd6f8dfb7fe213ede83249bb94 Author: Philip Yang Date: Wed Jan 19 12:57:26 2022 -0500 drm/amdkfd: Bump KFD API version for SMI profiling event Indicate SMI profiling events available. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher include/uapi/linux/kfd_ioctl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 414e9f520e897818302a6b1729aa2dad8cc928ca Author: Philip Yang Date: Fri Apr 8 10:25:11 2022 -0400 drm/amdkfd: Asynchronously free smi_client The synchronize_rcu may take several ms, which noticeably slows down applications close SMI event handle. Use call_rcu to free client->fifo and client asynchronously and eliminate the synchronize_rcu call in the user thread. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 46ae2af9a8aa168cbad69f21bb1426771339ac9a Author: Philip Yang Date: Thu Jan 20 16:43:42 2022 -0500 drm/amdkfd: Add unmap from GPU SMI event SVM range unmapped from GPUs when range is unmapped from CPU, or with xnack on from MMU notifier when range is evicted or migrated. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 9 +++++++++ drivers/gpu/drm/amd/amdkfd/kfd_smi_events.h | 3 +++ drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 25 ++++++++++++++++++------- 3 files changed, 30 insertions(+), 7 deletions(-) commit c7f21978fa6aafaf7ad37155c7d3a217dc3d16b0 Author: Philip Yang Date: Thu Jan 13 21:24:20 2022 -0500 drm/amdkfd: Add user queue eviction restore SMI event Output user queue eviction and restore event. User queue eviction may be triggered by svm or userptr MMU notifier, TTM eviction, device suspend and CRIU checkpoint and restore. User queue restore may be rescheduled if eviction happens again while restore. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 12 +++++--- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 4 +-- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 4 +-- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 15 ++++++++-- drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 35 ++++++++++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_smi_events.h | 4 +++ drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 6 ++-- 9 files changed, 69 insertions(+), 15 deletions(-) commit acac270d09828edda2d530d255ee75ceb87583ec Author: Philip Yang Date: Thu Jan 13 19:28:13 2022 -0500 drm/amdkfd: Add migration SMI event For migration start and end event, output timestamp when migration starts, ends, svm range address and size, GPU id of migration source and destination and svm range attributes, Migration trigger could be prefetch, CPU or GPU page fault and TTM eviction. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 53 ++++++++++++++++++++++------- drivers/gpu/drm/amd/amdkfd/kfd_migrate.h | 5 +-- drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 22 ++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_smi_events.h | 8 +++++ drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 16 +++++---- 5 files changed, 83 insertions(+), 21 deletions(-) commit e0f1e65b836c42741288a367eab565167a408b59 Author: Philip Yang Date: Thu Jan 13 19:22:54 2022 -0500 drm/amdkfd: Add GPU recoverable fault SMI event Use ktime_get_boottime_ns() as timestamp to correlate with other APIs. Output timestamp when GPU recoverable fault starts and ends to recover the fault, if migration happened or only GPU page table is updated to recover, fault address, if read or write fault. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 17 +++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_smi_events.h | 6 +++++- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 19 ++++++++++++++----- drivers/gpu/drm/amd/amdkfd/kfd_svm.h | 2 +- 4 files changed, 37 insertions(+), 7 deletions(-) commit 163a5a58437062ce4dbef2aab6de4d784043bcf5 Author: Philip Yang Date: Thu Jan 13 18:59:02 2022 -0500 drm/amdkfd: Enable per process SMI event Process receive event from same process by default. Add a flag to be able to receive event from all processes, this requires super user permission. Event using pid 0 to send the event to all processes, to keep the default behavior of existing SMI events. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 37 ++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 11 deletions(-) commit d7cfea332cca483ccd3970ed4de73ed892643e51 Author: Philip Yang Date: Thu Jan 20 15:06:30 2022 -0500 drm/amdkfd: Add KFD SMI event IDs and triggers Define new system management interface event IDs for migration, GPU recoverable page fault, user queues eviction, restore and unmap from GPU events and corresponding event triggers, those will be implemented in the following patches. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher include/uapi/linux/kfd_ioctl.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 395ece6f14124c2245e4b7fe74932514f999faa1 Author: Jack Xiao Date: Tue Jun 28 12:28:43 2022 +0800 Revert "drm/amdgpu/gmc11: avoid cpu accessing registers to flush VM" This reverts commit 8748de873fedf4d55bdd99bbb738ee7ddf329792 since drv enabled mes to access registers. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 51 +--------------------------------- 1 file changed, 1 insertion(+), 50 deletions(-) commit cf6067290034b9ebbe4c39733b1a4acc94876c26 Author: Jack Xiao Date: Thu Jun 16 21:34:24 2022 +0800 drm/amdgpu: enable mes to access registers v2 Enable mes to access registers. v2: squash mes sched ring enablement flag Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 1 + 4 files changed, 16 insertions(+), 1 deletion(-) commit adc0e6ab0df390907228abb76c6bf82382089af1 Author: Jack Xiao Date: Thu Jun 16 21:23:01 2022 +0800 drm/amdgpu/mes: add mes register access interface Add mes register access routines: 1. read register 2. write register 3. wait register 4. write and wait register Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 132 +++++++++++++++++++++++++++++++- 1 file changed, 131 insertions(+), 1 deletion(-) commit 7d4705b33cb84bfbba04de153d4f5e83041ac393 Author: Jack Xiao Date: Thu Jun 16 21:49:29 2022 +0800 drm/amdgpu/mes11: add mes11 misc op Add misc op commands in mes11. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 53 ++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit cff35798fad565b5f8bbf4ef84ac698270dcaf64 Author: Jonathan Kim Date: Sun Jun 26 21:35:10 2022 -0400 drm/amdkfd: fix cu mask for asics with wgps GFX10 and up have work group processors (WGP) and WGP mode is the native compile mode. KFD and ROCr have no visibility into whether a dispatch is operating in CU or WGP mode. Enforce CU masking to be pairwise continguous in enablement and round robin distribute CUs across the SEs in a pairwise manner to assume WGP mode at all times. Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 12 +++++++----- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 5 deletions(-) commit 6a4a1f6054318cd3590562668798304b4351ef36 Author: Jack Xiao Date: Thu Jun 16 21:23:45 2022 +0800 drm/amdgpu: add common interface for mes misc op Add common interface for mes misc op, including accessing register interface. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 46 +++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 90d5fd317c745a80019ed7f12a1933ce6116e0e4 Author: Jack Xiao Date: Mon Jun 6 17:30:34 2022 +0800 drm/amdgpu/mes11: update mes interface for acessing registers Update MES firmware api for accessing registers. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/mes_v11_api_def.h | 37 +++++++++++++++++++-------- 1 file changed, 26 insertions(+), 11 deletions(-) commit b7d78b46d5e8dc77c656c13885d31e931923b915 Author: Vladimir Oltean Date: Wed Jun 29 22:33:58 2022 +0300 net: phylink: fix NULL pl->pcs dereference during phylink_pcs_poll_start The current link mode of the phylink instance may not require an attached PCS. However, phylink_major_config() unconditionally dereferences this potentially NULL pointer when restarting the link poll timer, which will panic the kernel. Fix the problem by checking whether a PCS exists in phylink_pcs_poll_start(), otherwise do nothing. The code prior to the blamed patch also only looked at pcs->poll within an "if (pcs)" block. Fixes: bfac8c490d60 ("net: phylink: disable PCS polling over major configuration") Signed-off-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) Tested-by: Gerhard Engleder Tested-by: Michael Walle # on kontron-kbox-a-230-ls Tested-by: Nicolas Ferre # on sam9x60ek Link: https://lore.kernel.org/r/20220629193358.4007923-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski drivers/net/phy/phylink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3019a8d7c1891ceea55820ee0f7bb36192181aa4 Author: Ville Syrjälä Date: Mon Jun 13 23:03:14 2022 +0300 drm: Remove unnecessary junk from drm_crtc.h drm_crtc.h is including several entirely unnecessary headers, and also contains unused forward declarations. Remove it all. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220613200317.11305-6-ville.syrjala@linux.intel.com Acked-by: Jani Nikula include/drm/drm_crtc.h | 8 -------- 1 file changed, 8 deletions(-) commit 4d627ef12b409fd149226617180f1cc6088bbf12 Author: Akira Yokosawa Date: Sat Jun 25 06:58:09 2022 +0900 docs/doc-guide: Mention make variable SPHINXDIRS SPHINXDIRS is useful when you want to test build only those documents affected by your changes. Mention it in the "Sphinx Build" section. Signed-off-by: Akira Yokosawa Cc: Maciej W. Rozycki Link: https://lore.kernel.org/r/50d6f0bc-030d-9529-0665-e2b3e7c792d8@gmail.com Signed-off-by: Jonathan Corbet Documentation/doc-guide/sphinx.rst | 7 +++++++ 1 file changed, 7 insertions(+) commit 2bc6430884d5ee0e30ae18652d31f821d8e9ec32 Author: David Reaver Date: Sat Jun 25 14:15:48 2022 -0700 scripts: get_feat.pl: use /usr/bin/env to find perl I tried running `make pdfdocs` on NixOS, but it failed because get_feat.pl uses a shebang line with /usr/bin/perl, and that file path doesn't exist on NixOS. Using the more portable /usr/bin/env perl fixes the problem. Signed-off-by: David Reaver Link: https://lore.kernel.org/r/20220625211548.1200198-1-me@davidreaver.com Signed-off-by: Jonathan Corbet scripts/get_feat.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bfb7869ec3760f3d81f0d0900431a750cd0642b Author: Jilin Yuan Date: Wed Jun 29 22:34:01 2022 +0800 intel/ixgbevf:fix repeated words in comments Delete the redundant word 'slot'. Delete the redundant word 'we'. Signed-off-by: Jilin Yuan Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +- drivers/net/ethernet/intel/ixgbevf/vf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1e401f7680c9a23e33675a1654fa3f93334e7ac9 Author: Jilin Yuan Date: Wed Jun 29 22:24:57 2022 +0800 intel/igc:fix repeated words in comments Delete the redundant word 'frames'. Signed-off-by: Jilin Yuan Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igc/igc_mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ca33bf983f306a4ca250831a93b86a11f7552d4 Author: Jilin Yuan Date: Wed Jun 29 22:21:47 2022 +0800 intel/igbvf:fix repeated words in comments Delete the redundant word 'on'. Delete the redundant word 'slot'. Signed-off-by: Jilin Yuan Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igbvf/igbvf.h | 2 +- drivers/net/ethernet/intel/igbvf/netdev.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7cdb8cc82ffbf8d1a524d633ca270cd621cfd653 Author: Jilin Yuan Date: Wed Jun 29 22:17:08 2022 +0800 intel/igb:fix repeated words in comments Delete the redundant word 'frames'. Delete the redundant word 'set'. Delete the redundant word 'slot'. Signed-off-by: Jilin Yuan Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igb/e1000_mac.c | 2 +- drivers/net/ethernet/intel/igb/igb_main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit afdc8a54e29778df05be620890d8037fa587e6df Author: Jilin Yuan Date: Wed Jun 29 22:03:52 2022 +0800 intel/iavf:fix repeated words in comments Delete the redundant word 'a'. Signed-off-by: Jilin Yuan Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09f85edd98e27ccd95382de10a3be09a2056ec16 Author: Jilin Yuan Date: Wed Jun 29 21:41:25 2022 +0800 intel/i40e:fix repeated words in comments Delete the redundant word 'a'. Signed-off-by: Jilin Yuan Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17527829dfb6f9688969b987374d60edbf7406c6 Author: Jilin Yuan Date: Wed Jun 29 21:36:54 2022 +0800 intel/fm10k:fix repeated words in comments Delete the redundant word 'by'. Delete the redundant word 'a'. Signed-off-by: Jilin Yuan Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/fm10k/fm10k_tlv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7654a8881a54c335f176c7dc0a923480228497de Merge: 6e97eba8ad87 3b498b665621 a13b1e472b93 1c61d51e9695 6641085e8d7b ffed0518d871 330c179976f3 Author: Alex Williamson Date: Thu Jun 30 11:50:40 2022 -0600 Merge branches 'v5.20/vfio/migration-enhancements-v3', 'v5.20/vfio/simplify-bus_type-determination-v3', 'v5.20/vfio/check-vfio_register_iommu_driver-return-v2', 'v5.20/vfio/check-iommu_group_set_name_return-v1', 'v5.20/vfio/clear-caps-buf-v3', 'v5.20/vfio/remove-useless-judgement-v1' and 'v5.20/vfio/move-device_open-count-v2' into v5.20/vfio/next commit e2ef1c2d9a14bcc351bd5fc3b36cf91e987dd38d Author: Jilin Yuan Date: Wed Jun 29 21:31:07 2022 +0800 intel/e1000e:fix repeated words in comments Delete the redundant word 'frames'. Signed-off-by: Jilin Yuan Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/e1000e/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38f0430e1658529dd26ca9889ea7b546cbed5e48 Author: Jilin Yuan Date: Wed Jun 29 21:26:36 2022 +0800 intel/e1000:fix repeated words in comments Delete the redundant word 'frames'. Signed-off-by: Jilin Yuan Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/e1000/e1000_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb6683b622c5a580adb5cca4f3f759669c7bd49c Author: Jiang Jian Date: Thu Jun 23 18:49:19 2022 +0800 ixgbe: drop unexpected word 'for' in comments there is an unexpected word 'for' in the comments that need to be dropped file - drivers/net/ethernet/intel/ixgbe/ixgbe_main.c line - 5164 * ixgbe_lpbthresh - calculate low water mark for for flow control changed to: * ixgbe_lpbthresh - calculate low water mark for flow control Signed-off-by: Jiang Jian Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d5173c6f6ebb103bd0fd6ed91ab8a7af9f9ff7e Author: Jiang Jian Date: Tue Jun 21 16:31:40 2022 +0800 igb: remove unexpected word "the" there is an unexpected word "the" in the comments that need to be removed Signed-off-by: Jiang Jian Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igb/e1000_82575.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5f976580238375a52463db064819543d253f751 Author: Jiang Jian Date: Tue Jun 21 16:29:11 2022 +0800 fm10k: remove unexpected word "the" there is an unexpected word "the" in the comments that need to be removed Signed-off-by: Jiang Jian Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fb8cfedd8fcd6110f6d52650c7f47336d6813d7 Author: Jiang Jian Date: Tue Jun 21 16:25:54 2022 +0800 ixgbe: remove unexpected word "the" there is an unexpected word "the" in the comments that need to be removed Signed-off-by: Jiang Jian Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ee5956bb9ce637d7743b93ce6749cac883339e67 Author: Tang Yizhou Date: Wed Jun 29 09:32:40 2022 +0800 docs/zh_CN: Add mutex-design Chinese translation Translate locking/mutex-design.rst into Chinese. Signed-off-by: Tang Yizhou Reviewed-by: Alex Shi Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/20220629013240.65386-3-yizhou.tang@shopee.com Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/locking/index.rst | 2 +- .../translations/zh_CN/locking/mutex-design.rst | 145 +++++++++++++++++++++ 2 files changed, 146 insertions(+), 1 deletion(-) commit bf02fb07c79af46483bee539f12635d998963462 Author: Tang Yizhou Date: Wed Jun 29 09:32:39 2022 +0800 docs/zh_CN: Show the Chinese translation of spinlocks Last time I forgot to edit locking/index.rst so the Chinese translation of spinlocks hasn't been shown on web yet. Signed-off-by: Tang Yizhou Reviewed-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20220629013240.65386-2-yizhou.tang@shopee.com Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/locking/index.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e129e413814720fe3ad3cdc74cfc32245cdbe972 Merge: a5201d42e2f8 48e014ee9a61 Author: Mark Brown Date: Thu Jun 30 18:26:37 2022 +0100 regmap-irq cleanups and refactoring Merge series from Aidan MacDonald : This series is an attempt at cleaning up the regmap-irq API in order to simplify things and consolidate existing features, while at the same time generalizing it to support a wider range of hardware. There is a new system for IRQ type configuration, some tweaks to unmask registers so they're more intuitive and useful, and a new callback for calculating register addresses. There's also a few minor code cleanups in here. In v2 I've taken the approach of adding new features and deprecating existing ones rather than removing them aggressively. Warnings will be issued for any drivers that use deprecated features, but they'll otherwise continue to function normally. One important caveat: not all of these changes are tested beyond compile testing, since I don't have hardware to exercise all of the features. commit 330c179976f3801526bf222b010b669bf6743098 Author: Yi Liu Date: Mon Jun 27 00:41:19 2022 -0700 vfio: Move "device->open_count--" out of group_rwsem in vfio_device_open() We do not protect the vfio_device::open_count with group_rwsem elsewhere (see vfio_device_fops_release as a comparison, where we already drop group_rwsem before open_count--). So move the group_rwsem unlock prior to open_count--. This change now also drops group_rswem before setting device->kvm = NULL, but that's also OK (again, just like vfio_device_fops_release). The setting of device->kvm before open_device is technically done while holding the group_rwsem, this is done to protect the group kvm value we are copying from, and we should not be relying on that to protect the contents of device->kvm; instead we assume this value will not change until after the device is closed and while under the dev_set->lock. Cc: Matthew Rosato Cc: Jason Gunthorpe Signed-off-by: Yi Liu Reviewed-by: Matthew Rosato Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20220627074119.523274-1-yi.l.liu@intel.com Signed-off-by: Alex Williamson drivers/vfio/vfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f8189d5d5fbf082786fb91c549f5127f23daec09 Author: Kaixu Xia Date: Thu Jun 30 10:04:18 2022 -0700 dax: set did_zero to true when zeroing successfully It is unnecessary to check and set did_zero value in while() loop in dax_zero_iter(), we can set did_zero to true only when zeroing successfully at last. Signed-off-by: Kaixu Xia Reviewed-by: Chaitanya Kulkarni Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/dax.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 98eb8d95025bd96d78fa4d27fb9e1e8d162c7227 Author: Kaixu Xia Date: Thu Jun 30 10:04:18 2022 -0700 iomap: set did_zero to true when zeroing successfully It is unnecessary to check and set did_zero value in while() loop in iomap_zero_iter(), we can set did_zero to true only when zeroing successfully at last. Signed-off-by: Kaixu Xia Reviewed-by: Chaitanya Kulkarni Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/iomap/buffered-io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ffed0518d871482e26c5826c0875bea6775446da Author: Li Zhe Date: Mon Jun 27 11:51:09 2022 +0800 vfio: remove useless judgement In function vfio_dma_do_unmap(), we currently prevent process to unmap vfio dma region whose mm_struct is different from the vfio_dma->task. In our virtual machine scenario which is using kvm and qemu, this judgement stops us from liveupgrading our qemu, which uses fork() && exec() to load the new binary but the new process cannot do the VFIO_IOMMU_UNMAP_DMA action during vm exit because of this judgement. This judgement is added in commit 8f0d5bb95f76 ("vfio iommu type1: Add task structure to vfio_dma") for the security reason. But it seems that no other task who has no family relationship with old and new process can get the same vfio_dma struct here for the reason of resource isolation. So this patch delete it. Signed-off-by: Li Zhe Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20220627035109.73745-1-lizhe.67@bytedance.com Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_type1.c | 6 ------ 1 file changed, 6 deletions(-) commit 6641085e8d7b3f061911517f79a2a15a0a21b97b Author: Schspa Shi Date: Wed Jun 29 10:29:48 2022 +0800 vfio: Clear the caps->buf to NULL after free On buffer resize failure, vfio_info_cap_add() will free the buffer, report zero for the size, and return -ENOMEM. As additional hardening, also clear the buffer pointer to prevent any chance of a double free. Signed-off-by: Schspa Shi Reviewed-by: Cornelia Huck Link: https://lore.kernel.org/r/20220629022948.55608-1-schspa@gmail.com Signed-off-by: Alex Williamson drivers/vfio/vfio.c | 1 + 1 file changed, 1 insertion(+) commit dc1848388137d20e5786b976caa49a26889f36f3 Author: Bob Pearson Date: Mon Jun 6 09:38:37 2022 -0500 RDMA/rxe: Merge normal and retry atomic flows Make the execution of the atomic operation in rxe_atomic_reply() conditional on res->replay and make duplicate_request() call into rxe_atomic_reply() to merge the two flows. This is modeled on the behavior of read reply. Delete the skb from the atomic responder resource since it is no longer used. Adjust the reference counting of the qp in send_atomic_ack() for this flow. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20220606143836.3323-6-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_qp.c | 2 - drivers/infiniband/sw/rxe/rxe_resp.c | 79 ++++++++++++++++------------------- drivers/infiniband/sw/rxe/rxe_verbs.h | 1 - 3 files changed, 36 insertions(+), 46 deletions(-) commit 8264411595fabf0455ed45badf1be612493db681 Author: Bob Pearson Date: Mon Jun 6 09:38:36 2022 -0500 RDMA/rxe: Move atomic original value to res Move the saved original value to the atomic responder resource. This replaces saving it in the qp. In preparation for merging the normal and retry atomic responder flows. Link: https://lore.kernel.org/r/20220606143836.3323-5-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_resp.c | 13 +++++++------ drivers/infiniband/sw/rxe/rxe_verbs.h | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) commit 220e842815f90c678394ae747e3da98348c4ba28 Author: Bob Pearson Date: Mon Jun 6 09:38:35 2022 -0500 RDMA/rxe: Move atomic responder res to atomic_reply Move the allocation of the atomic responder resource up into rxe_atomic_reply() from send_atomic_ack(). In preparation for merging the normal and retry atomic responder flows. Link: https://lore.kernel.org/r/20220606143836.3323-4-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_resp.c | 55 +++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 22 deletions(-) commit 1c61d51e9695d00535d28fc2e123ba9397378707 Author: Liam Ni Date: Sat Jun 25 19:42:39 2022 +0800 vfio: check iommu_group_set_name() return value As iommu_group_set_name() can fail, we should check the return value. Signed-off-by: Liam Ni Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20220625114239.9301-1-zhiguangni01@gmail.com Signed-off-by: Alex Williamson drivers/vfio/vfio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0ed5493e430a1d887eb62b45c75dd5d6bb2dcf48 Author: Bob Pearson Date: Mon Jun 6 09:38:34 2022 -0500 RDMA/rxe: Add a responder state for atomic reply Add a responder state for atomic reply similar to read reply and rename process_atomic() rxe_atomic_reply(). In preparation for merging the normal and retry atomic responder flows. Link: https://lore.kernel.org/r/20220606143836.3323-3-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_resp.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 24f0ab0102115c7569379a606f9a26826577522f Author: Bob Pearson Date: Mon Jun 6 09:38:33 2022 -0500 RDMA/rxe: Move code to rxe_prepare_atomic_res() Separate the code that prepares the atomic responder resource into a subroutine. This is preparation for merging the normal and retry atomic responder flows. Link: https://lore.kernel.org/r/20220606143836.3323-2-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_resp.c | 43 ++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 16 deletions(-) commit d58562ca6c992fc5577838d010c8a37401c2a831 Author: Chris Mason Date: Thu Jun 30 09:52:57 2022 -0700 iomap: skip pages past eof in iomap_do_writepage() iomap_do_writepage() sends pages past i_size through folio_redirty_for_writepage(), which normally isn't a problem because truncate and friends clean them very quickly. When the system has cgroups configured, we can end up in situations where one cgroup has almost no dirty pages at all, and other cgroups consume the entire background dirty limit. This is especially common in our XFS workloads in production because they have cgroups using O_DIRECT for almost all of the IO mixed in with cgroups that do more traditional buffered IO work. We've hit storms where the redirty path hits millions of times in a few seconds, on all a single file that's only ~40 pages long. This leads to long tail latencies for file writes because the pdflush workers are hogging the CPU from some kworkers bound to the same CPU. Reproducing this on 5.18 was tricky because 869ae85dae ("xfs: flush new eof page on truncate...") ends up writing/waiting most of these dirty pages before truncate gets a chance to wait on them. The actual repro looks like this: /* * run me in a cgroup all alone. Start a second cgroup with dd * streaming IO into the block device. */ int main(int ac, char **av) { int fd; int ret; char buf[BUFFER_SIZE]; char *filename = av[1]; memset(buf, 0, BUFFER_SIZE); if (ac != 2) { fprintf(stderr, "usage: looper filename\n"); exit(1); } fd = open(filename, O_WRONLY | O_CREAT, 0600); if (fd < 0) { err(errno, "failed to open"); } fprintf(stderr, "looping on %s\n", filename); while(1) { /* * skip past page 0 so truncate doesn't write and wait * on our extent before changing i_size */ ret = lseek(fd, 8192, SEEK_SET); if (ret < 0) err(errno, "lseek"); ret = write(fd, buf, BUFFER_SIZE); if (ret != BUFFER_SIZE) err(errno, "write failed"); /* start IO so truncate has to wait after i_size is 0 */ ret = sync_file_range(fd, 16384, 4095, SYNC_FILE_RANGE_WRITE); if (ret < 0) err(errno, "sync_file_range"); ret = ftruncate(fd, 0); if (ret < 0) err(errno, "truncate"); usleep(1000); } } And this bpftrace script will show when you've hit a redirty storm: kretprobe:xfs_vm_writepages { delete(@dirty[pid]); } kprobe:xfs_vm_writepages { @dirty[pid] = 1; } kprobe:folio_redirty_for_writepage /@dirty[pid] > 0/ { $inode = ((struct folio *)arg1)->mapping->host->i_ino; @inodes[$inode] = count(); @redirty++; if (@redirty > 90000) { printf("inode %d redirty was %d", $inode, @redirty); exit(); } } This patch has the same number of failures on xfstests as unpatched 5.18: Failures: generic/648 xfs/019 xfs/050 xfs/168 xfs/299 xfs/348 xfs/506 xfs/543 I also ran it through a long stress of multiple fsx processes hammering. (Johannes Weiner did significant tracing and debugging on this as well) Signed-off-by: Chris Mason Co-authored-by: Johannes Weiner Reviewed-by: Johannes Weiner Reported-by: Domas Mituzas Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/iomap/buffered-io.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit c06475910b526159adb02d82e7299e3151113285 Author: Bagas Sanjaya Date: Thu Jun 30 17:13:17 2022 +0700 Documentation: coresight: Escape coresight bindings file wildcard Stephen Rothwell reported htmldocs warning: Documentation/trace/coresight/coresight.rst:133: WARNING: Inline emphasis start-string without end-string. The warning above is due to unescaped wildcard asterisk (*) on CoreSight devicetree binding filename, which confuses Sphinx as emphasis instead. Escape the wildcard to fix the warning. Link: https://lore.kernel.org/linux-next/20220630173801.41bf22a2@canb.auug.org.au/ Fixes: 3c15fddf312120 ("dt-bindings: arm: Convert CoreSight bindings to DT schema") Cc: Mathieu Poirier Cc: Suzuki K Poulose Cc: Mike Leach Cc: Leo Yan Cc: Jonathan Corbet Cc: Rob Herring Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-next@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reported-by: Stephen Rothwell Signed-off-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20220630101317.102680-1-bagasdotme@gmail.com Signed-off-by: Mathieu Poirier Documentation/trace/coresight/coresight.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e97eba8ad8748fabb795cffc5d9e1a7dcfd7367 Author: Yishai Hadas Date: Tue Jun 28 18:59:10 2022 +0300 vfio: Split migration ops from main device ops vfio core checks whether the driver sets some migration op (e.g. set_state/get_state) and accordingly calls its op. However, currently mlx5 driver sets the above ops without regards to its migration caps. This might lead to unexpected usage/Oops if user space may call to the above ops even if the driver doesn't support migration. As for example, the migration state_mutex is not initialized in that case. The cleanest way to manage that seems to split the migration ops from the main device ops, this will let the driver setting them separately from the main ops when it's applicable. As part of that, validate ops construction on registration and include a check for VFIO_MIGRATION_STOP_COPY since the uAPI claims it must be set in migration_flags. HISI driver was changed as well to match this scheme. This scheme may enable down the road to come with some extra group of ops (e.g. DMA log) that can be set without regards to the other options based on driver caps. Fixes: 6fadb021266d ("vfio/mlx5: Implement vfio_pci driver for mlx5 devices") Reviewed-by: Kevin Tian Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20220628155910.171454-3-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 11 +++++++--- drivers/vfio/pci/mlx5/cmd.c | 4 +++- drivers/vfio/pci/mlx5/cmd.h | 3 ++- drivers/vfio/pci/mlx5/main.c | 9 +++++--- drivers/vfio/pci/vfio_pci_core.c | 7 ++++++ drivers/vfio/vfio.c | 11 +++++----- include/linux/vfio.h | 30 +++++++++++++++++--------- 7 files changed, 51 insertions(+), 24 deletions(-) commit 2b1c1906286fa547845f5385ee72db74b2b0251d Author: Yishai Hadas Date: Tue Jun 28 18:59:09 2022 +0300 vfio/mlx5: Protect mlx5vf_disable_fds() upon close device Protect mlx5vf_disable_fds() upon close device to be called under the state mutex as done in all other places. This will prevent a race with any other flow which calls mlx5vf_disable_fds() as of health/recovery upon MLX5_PF_NOTIFY_DISABLE_VF event. Encapsulate this functionality in a separate function named mlx5vf_cmd_close_migratable() to consider migration caps and for further usage upon close device. Fixes: 6fadb021266d ("vfio/mlx5: Implement vfio_pci driver for mlx5 devices") Reviewed-by: Kevin Tian Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20220628155910.171454-2-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/mlx5/cmd.c | 10 ++++++++++ drivers/vfio/pci/mlx5/cmd.h | 1 + drivers/vfio/pci/mlx5/main.c | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) commit fda35af9759552cd8da6c127725d8ef0c751a6e3 Author: Jesse Brandeburg Date: Fri Jun 24 17:33:02 2022 -0700 intel: remove unused macros As found by the compile option -Wunused-macros, remove these macros that are never used by the code. Signed-off-by: Jesse Brandeburg Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/e100.c | 1 - drivers/net/ethernet/intel/e1000/e1000_param.c | 2 -- drivers/net/ethernet/intel/e1000e/param.c | 2 -- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 -- drivers/net/ethernet/intel/i40e/i40e_ptp.c | 1 - drivers/net/ethernet/intel/i40e/i40e_txrx.c | 1 - drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 4 ---- drivers/net/ethernet/intel/igc/igc_ptp.c | 1 - drivers/net/ethernet/intel/ixgb/ixgb_main.c | 1 - drivers/net/ethernet/intel/ixgb/ixgb_param.c | 2 -- drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c | 2 -- drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 2 -- drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 1 - drivers/net/ethernet/intel/ixgbevf/ethtool.c | 4 ---- 14 files changed, 26 deletions(-) commit e3435fff6ae03ca3ec1279299664f968478067e2 Author: Sudeep Holla Date: Tue Jun 28 13:53:46 2022 +0100 ACPI: Move PRM config option under the main ACPI config Currently PRM(Platform Runtime Mechanism) config option is listed along with the main ACPI (Advanced Configuration and Power Interface) option at the same level. On ARM64 platforms unlike x86, ACPI option is listed at the topmost level of configuration menu. It is rather very confusing to see PRM option also listed along with ACPI in the topmost level. Move the same under ACPI config option. No functional change, just changes the level of visibility of this option under the configuration menu. Signed-off-by: Sudeep Holla Acked-by: Rafael J. Wysocki Signed-off-by: Ard Biesheuvel drivers/acpi/Kconfig | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 36d1f098e674f90b010d6eaa60e3f22f7a6aaf96 Author: Sudeep Holla Date: Tue Jun 28 13:53:45 2022 +0100 ACPI: Enable Platform Runtime Mechanism(PRM) support on ARM64 There is interest to make use of PRM(Platform Runtime Mechanism) even on ARM64 ACPI platforms. Allow PRM to be enabled on ARM64 platforms. It will be enabled by default as on x86_64. Signed-off-by: Sudeep Holla Acked-by: Rafael J. Wysocki Signed-off-by: Ard Biesheuvel drivers/acpi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 353efd5e97a7973d78f2634274b57309d0966e29 Author: Sudeep Holla Date: Tue Jun 28 13:53:43 2022 +0100 ACPI: PRM: Change handler_addr type to void pointer handler_addr is a virtual address passed to efi_call_virt_pointer. While x86 currently type cast it into the pointer in it's arch specific arch_efi_call_virt() implementation, ARM64 is restrictive for right reasons. Convert the handler_addr type from u64 to void pointer. Signed-off-by: Sudeep Holla Acked-by: Rafael J. Wysocki Signed-off-by: Ard Biesheuvel drivers/acpi/prmt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c8177f90b7c618042e8dd19c87307cf29a7dc275 Author: Tomer Maimon Date: Thu Jun 30 13:35:51 2022 +0300 dt-bindings: serial: 8250: Add npcm845 compatible string Add a compatible string for Nuvoton BMC NPCM845 UART. Signed-off-by: Tomer Maimon Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220630103606.83261-3-tmaimon77@gmail.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/8250.yaml | 1 + 1 file changed, 1 insertion(+) commit 309f7beddf053bd0560b07f3251ac64a5872ecf9 Author: Ilpo Järvinen Date: Tue Jun 28 16:42:31 2022 +0300 serial: 8250_dw: Use dw8250_serial_out() in dw8250_serial_out38x() Place dw8250_serial_out() before dw8250_serial_out38x() so that it can be called from dw8250_serial_out38x() to do the actual write. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220628134234.53771-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit e9f9736679566cfa4158a40820cd50a46e601349 Author: Ilpo Järvinen Date: Thu Jun 30 13:05:36 2022 +0300 8250_dwlib: Convert bitops to newer form Instead of open-coding, use BIT(), GENMASK(), and FIELD_GET() helpers. Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220630100536.41329-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dwlib.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 808313bc2182ab60761eed82d2c345883fbc65a7 Author: Andy Shevchenko Date: Thu Jun 30 13:05:07 2022 +0300 serial: 8250_dw: Drop PM ifdeffery Drop CONFIG_PM and CONFIG_PM_SLEEP ifdeffery while converting dw8250_pm_ops to use new PM macros. Since we are using runtime PM, wrap dw8250_pm_ops into pm_ptr(). Reviewed-by: Ilpo Järvinen Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220630100507.31113-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 0df73e1a9f7b1152ace21b6406138f7487239128 Author: Srinivas Kandagatla Date: Thu Jun 30 14:00:23 2022 +0100 ASoC: codecs: wsa883x: handle timeouts in resume path Currently we do not check if SoundWire slave initialization timeout expired before continuing to access its registers. Its possible that the registers are not accessible if timeout is expired. Handle this by returning timeout in resume path. Reported-by: Pierre-Louis Bossart Fixes: 43b8c7dc85a1 ("ASoC: codecs: add wsa883x amplifier support") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220630130023.9308-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/codecs/wsa883x.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 6343ecd76c828951fbe55e7d5b29e1923655aed9 Author: Andy Shevchenko Date: Thu Jun 30 12:38:16 2022 +0300 serial: 8250_dw: Sort headers alphabetically For the sake of better maintenance, sort included headers alphabetically. While at it, split the serial group of headers which makes clear the subsystem the driver belongs to. Reviewed-by: Ilpo Järvinen Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220630093816.28271-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit cf6af24b54903f9f70c29b3e5b19cb72cc862d60 Author: Srinivas Kandagatla Date: Thu Jun 30 14:00:22 2022 +0100 ASoC: codecs: wsa881x: handle timeouts in resume path Currently we do not check if SoundWire slave initialization timeout expired before continuing to access its registers. Its possible that the registers are not accessible if timeout is expired. Handle this by returning timeout in resume path. Reported-by: Pierre-Louis Bossart Fixes: 8dd552458361 ("ASoC: codecs: wsa881x: add runtime pm support") Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220630130023.9308-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/codecs/wsa881x.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 65e20e8cbbccaf0968474d27420c3a5170a5a5b8 Author: Michael Walle Date: Tue Jun 28 14:07:05 2022 +0200 earlycon: prevent multiple register_console() If the earlycon parameter is given twice, the kernel will spit out a WARN() in register_console() because it was already registered. The non-dt variant setup_earlycon() already handles that gracefully. The dt variant of_setup_earlycon() doesn't. Add the check there and add the -EALREADY handling in early_init_dt_scan_chosen_stdout(). FWIW, this doesn't happen if CONFIG_ACPI_SPCR_TABLE is set. In that case the registration is delayed until after earlycon parameter(s) are parsed. Reviewed-by: Rob Herring Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20220628120705.200617-1-michael@walle.cc Signed-off-by: Greg Kroah-Hartman drivers/of/fdt.c | 4 +++- drivers/tty/serial/earlycon.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) commit b9491b2e45d71eb64245560e208897af95ffbf95 Author: Ilpo Järvinen Date: Tue Jun 28 12:01:28 2022 +0300 serial: 8250_dw: Take port lock while accessing LSR Accessing LSR requires port lock because it mutates lsr_saved_flags in serial_lsr_in(). Fixes: 197eb5c416ff ("serial: 8250_dw: Use serial_lsr_in() in dw8250_handle_irq()") Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/c5879db7-bee9-93f-526e-872a292442@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 3 +++ 1 file changed, 3 insertions(+) commit f3762ddfa24068cf67bc395cb80a7928306ad1ef Merge: d8d6253b36f5 9cc69528188a Author: Mark Brown Date: Thu Jun 30 16:09:32 2022 +0100 ASoC: soc-core.c: fixup snd_soc_of_get_dai_link_cpus() Merge series from Kuninori Morimoto : Current ASoC has fixup both snd_soc_of_get_dai_link_cpus/codecs(). I guess cpu was copied from codec, but it is using "codec" naming everwhere in "cpu" function. It is strange, and thus, error case will be issue (It should call cpu function instead of codec). This patch tidyup it, and try to cleanup. [1/2] is for bug-fix, [2/2] is for new feature. commit 137b2d985928890557f8e73cf7e53677637b7af8 Author: Zhang Jiaming Date: Wed Jun 29 17:44:11 2022 +0800 serial: 8250_port: Fix spelling mistake Change 'timeing' to 'timing'. Change 'Characteres' to 'Characters'. Reviewed-by: Ilpo Järvinen Signed-off-by: Zhang Jiaming Link: https://lore.kernel.org/r/20220629094411.39066-1-jiaming@nfschina.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 72a43046b61a3fe7164a622224bcdfc3cf6b795d Author: Chanho Park Date: Wed Jun 29 09:41:41 2022 +0900 tty: serial: samsung_tty: loopback mode support Internal loopback mode can be supported by setting UCON register's Loopback Mode bit. The mode & bit can be supported since s3c2410 and later SoCs. The prefix of LOOPBACK / BIT(5) naming should be also changed to S3C2410_ in order to avoid confusion. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Ilpo Järvinen Signed-off-by: Chanho Park Link: https://lore.kernel.org/r/20220629004141.51484-1-chanho61.park@samsung.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/samsung_tty.c | 8 ++++++++ include/linux/serial_s3c.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) commit 9636047ffafcf5988946c05f0ebd7e0b2114aa74 Author: Chanho Park Date: Wed Jun 29 09:55:38 2022 +0900 tty: serial: samsung_tty: support more than 4 uart ports Regarding Exynos Auto v9 SoC, it supports uarts up to 12. However, the maximum number of the ports has been derived from CONFIG_SERIAL_SAMSUNG_UARTS and tightly coupled with the config for previous Samsung SoCs such as s3c24xx and s3c64xx. To overcome this limitation, this changes the usage of the definition to UART_NR which is widely used from other serial drivers. This also defines the value to 12 only for ARM64 SoCs to not affect the change to previous arm32 SoCs. Instead of enumerating all the ports as predefined arrays, this introduces s3c24xx_serial_init_port_default that is initializing the structure as the default value. Reviewed-by: Hector Martin Reviewed-by: Krzysztof Kozlowski Signed-off-by: Chanho Park Link: https://lore.kernel.org/r/20220629005538.60132-1-chanho61.park@samsung.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/samsung_tty.c | 82 ++++++++++++---------------------------- 1 file changed, 25 insertions(+), 57 deletions(-) commit 6d304871e3ef4c339c06aa9b4ab55b6c77642884 Author: Quentin Monnet Date: Wed Jun 29 21:36:37 2022 +0100 bpftool: Use feature list in bash completion Now that bpftool is able to produce a list of known program, map, attach types, let's use as much of this as we can in the bash completion file, so that we don't have to expand the list each time a new type is added to the kernel. Also update the relevant test script to remove some checks that are no longer needed. Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Acked-by: Daniel Müller Link: https://lore.kernel.org/bpf/20220629203637.138944-3-quentin@isovalent.com tools/bpf/bpftool/bash-completion/bpftool | 21 ++++----------------- .../testing/selftests/bpf/test_bpftool_synctypes.py | 20 +++----------------- 2 files changed, 7 insertions(+), 34 deletions(-) commit 27b3f70553432114b3d26f4d9c72cf02f38b84ee Author: Quentin Monnet Date: Wed Jun 29 21:36:36 2022 +0100 bpftool: Add feature list (prog/map/link/attach types, helpers) Add a "bpftool feature list" subcommand to list BPF "features". Contrarily to "bpftool feature probe", this is not about the features available on the system. Instead, it lists all features known to bpftool from compilation time; in other words, all program, map, attach, link types known to the libbpf version in use, and all helpers found in the UAPI BPF header. The first use case for this feature is bash completion: running the command provides a list of types that can be used to produce the list of candidate map types, for example. Now that bpftool uses "standard" names provided by libbpf for the program, map, link, and attach types, having the ability to list these types and helpers could also be useful in scripts to loop over existing items. Sample output: # bpftool feature list prog_types | grep -vw unspec | head -n 6 socket_filter kprobe sched_cls sched_act tracepoint xdp # bpftool -p feature list map_types | jq '.[1]' "hash" # bpftool feature list attach_types | grep '^cgroup_' cgroup_inet_ingress cgroup_inet_egress [...] cgroup_inet_sock_release # bpftool feature list helpers | grep -vw bpf_unspec | wc -l 207 The "unspec" types and helpers are not filtered out by bpftool, so as to remain closer to the enums, and to preserve the indices in the JSON arrays (e.g. "hash" at index 1 == BPF_MAP_TYPE_HASH in map types list). Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Acked-by: Daniel Müller Link: https://lore.kernel.org/bpf/20220629203637.138944-2-quentin@isovalent.com .../bpf/bpftool/Documentation/bpftool-feature.rst | 12 +++++ tools/bpf/bpftool/bash-completion/bpftool | 7 ++- tools/bpf/bpftool/feature.c | 55 ++++++++++++++++++++++ 3 files changed, 73 insertions(+), 1 deletion(-) commit 10365cad180273dee6c5e3b3e29f951ca8e92b53 Merge: 3190d4be3764 31d4c1bdf157 Author: Mark Brown Date: Thu Jun 30 15:16:59 2022 +0100 Fix some coding style issues Merge series from David Jander : This series fixes some coding style issues. No functional change. commit b0cbd6154a9a3964490cafa0a9444be626271bd9 Author: Tobias Klauser Date: Thu Jun 30 11:36:38 2022 +0200 bpftool: Remove attach_type_name forward declaration The attach_type_name definition was removed in commit 1ba5ad36e00f ("bpftool: Use libbpf_bpf_attach_type_str"). Remove its forward declaration in main.h as well. Signed-off-by: Tobias Klauser Signed-off-by: Daniel Borkmann Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20220630093638.25916-1-tklauser@distanz.ch tools/bpf/bpftool/main.h | 2 -- 1 file changed, 2 deletions(-) commit 25097de7b2369625994793b788fa6ed4cad664cd Author: Andy Shevchenko Date: Thu Jun 30 15:38:58 2022 +0300 pinctrl: intel: Add Intel Meteor Lake pin controller support This driver adds pinctrl/GPIO support for Intel Meteor Lake. 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 drivers/pinctrl/intel/Kconfig | 8 + drivers/pinctrl/intel/Makefile | 1 + drivers/pinctrl/intel/pinctrl-meteorlake.c | 417 +++++++++++++++++++++++++++++ 3 files changed, 426 insertions(+) commit b54c2a25ace5aed21c9944b7605b623abd2ca99c Author: Bob Pearson Date: Sun Jun 12 17:34:35 2022 -0500 RDMA/rxe: Convert read side locking to rcu Use rcu_read_lock() for protecting read side operations in rxe_pool.c. Link: https://lore.kernel.org/r/20220612223434.31462-3-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_pool.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit 215d0a755e1bcd92cbe6a71a21194ce7c82ec106 Author: Bob Pearson Date: Sun Jun 12 17:34:34 2022 -0500 RDMA/rxe: Stop lookup of partially built objects Currently the rdma_rxe driver has a security weakness due to giving objects which are partially initialized indices allowing external actors to gain access to them by sending packets which refer to their index (e.g. qpn, rkey, etc) causing unpredictable results. This patch adds a new API rxe_finalize(obj) which enables looking up pool objects from indices using rxe_pool_get_index() for AH, QP, MR, and MW. They are added in create verbs only after the objects are fully initialized. It also adds wait for completion to destroy/dealloc verbs to assure that all references have been dropped before returning to rdma_core by implementing a new rxe_pool API rxe_cleanup() which drops a reference to the object and then waits for all other references to be dropped. When the last reference is dropped the object is completed by kref. After that it cleans up the object and if locally allocated frees the memory. In the special case of address handle objects the delay is implemented separately if the destroy_ah call is not sleepable. Combined with deferring cleanup code to type specific cleanup routines this allows all pending activity referring to objects to complete before returning to rdma_core. Link: https://lore.kernel.org/r/20220612223434.31462-2-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_mr.c | 2 +- drivers/infiniband/sw/rxe/rxe_mw.c | 4 +- drivers/infiniband/sw/rxe/rxe_pool.c | 100 ++++++++++++++++++++++++++++++++-- drivers/infiniband/sw/rxe/rxe_pool.h | 18 ++++-- drivers/infiniband/sw/rxe/rxe_verbs.c | 39 ++++++++----- 5 files changed, 136 insertions(+), 27 deletions(-) commit 87a7d5350c67aca513dc0a80f696d5583430d594 Author: José Roberto de Souza Date: Wed Jun 29 06:47:21 2022 -0700 drm/i915: Drain freed object after suspend display Display is turned off by i915_drm_suspend() during the suspend procedure, removing the last reference of some gem objects that were used by display. The issue is that those objects are only actually freed when mm.free_work executed and that can happen very late in the suspend process causing issues. So here draining all freed objects released by display fixing suspend issues. Signed-off-by: José Roberto de Souza Reviewed-by: Matt Atwood Link: https://patchwork.freedesktop.org/patch/msgid/20220629134721.48375-1-jose.souza@intel.com drivers/gpu/drm/i915/i915_driver.c | 2 ++ 1 file changed, 2 insertions(+) commit cdd23dd9fcd67cc3581d0f98a1c89acd90030336 Author: Ying Sun Date: Wed Jun 29 16:06:52 2022 +0800 arch: microblaze: Remove unused "select HANDLE_DOMAIN_IRQ" The "CONFIG_HANDLE_DOMAIN_IRQ" item has not been used right now. Remove the old unused selection in config MICROBLAZE. Signed-off-by: Ying Sun Link: https://lore.kernel.org/r/20220629080652.28029-1-sunying@nj.iscas.ac.cn Signed-off-by: Michal Simek arch/microblaze/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 152d1faf1e2f32cfb1956c7e5e42e8cb2c95ff18 Author: Bjorn Andersson Date: Tue Jun 28 21:14:36 2022 -0700 arm64: dts: qcom: add SC8280XP platform Introduce initial support for the Qualcomm SC8280XP platform, aka 8cx Gen 3. This initial contribution supports SMP, CPUfreq, CPU cluster idling, GCC, TLMM, SMMU, RPMh regulators, power-domains and clocks, interconnects, some QUPs, UFS, remoteprocs, USB, watchdog, LLCC and tsens. Signed-off-by: Bjorn Andersson Reviewed-by: Johan Hovold Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220629041438.1352536-4-bjorn.andersson@linaro.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2141 ++++++++++++++++++++++++++++++++ 1 file changed, 2141 insertions(+) commit 36a7b63f069630e854beb305e99c151cddd3b8e5 Author: Bjorn Andersson Date: Tue Jun 28 21:14:35 2022 -0700 dt-bindings: mailbox: qcom-ipcc: Add NSP1 client Add a client for the NSP1 found in some recent Qualcomm platforms. Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220629041438.1352536-3-bjorn.andersson@linaro.org include/dt-bindings/mailbox/qcom-ipcc.h | 1 + 1 file changed, 1 insertion(+) commit 05b90d240409240cbc40c2eb4a0f2b206a513e13 Author: Bjorn Andersson Date: Tue Jun 28 21:14:34 2022 -0700 dt-bindings: arm: qcom: Document additional sc8280xp devices Add the CRD (Compute Reference Design?) and the Lenovo Thinkpad X13s to the valid device compatibles found on the sc8280xp platform. Signed-off-by: Bjorn Andersson Acked-by: Krzysztof Kozlowski Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20220629041438.1352536-2-bjorn.andersson@linaro.org Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 4c9fb8e89849db0f12fbfd4ad6a6ce036251a200 Author: Sibi Sankar Date: Mon May 23 12:30:58 2022 +0530 arm64: dts: qcom: sm8450: Add interconnect requirements for SCM Add interconnects requirements for the SCM interface on SM8450 SoCs. Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1653289258-17699-4-git-send-email-quic_sibis@quicinc.com arch/arm64/boot/dts/qcom/sm8450.dtsi | 1 + 1 file changed, 1 insertion(+) commit 34279d6e3f32c7b2dd1192d8ba3e1d28b6ac775e Author: Dmitry Baryshkov Date: Sat May 21 23:27:08 2022 +0300 arm64: dts: qcom: sdm660: Add initial Inforce IFC6560 board support The IFC6560 is a board from Inforce Computing, built around the SDA660 SoC. This patch describes core clocks, some regulators from the two PMICs, debug uart, storage, bluetooth and audio DSP remoteproc. The regulator settings are inherited from prior work by Konrad Dybcio and AngeloGioacchino Del Regno. Reviewed-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov Co-developed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521202708.1509308-12-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/Makefile | 1 + .../arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts | 461 +++++++++++++++++++++ 2 files changed, 462 insertions(+) commit 1ce69c35b86038dd11d3a6115a04501c5b89a940 Author: Sergey Shtylyov Date: Thu Jun 30 15:46:45 2022 +0300 usb: host: xhci: use snprintf() in xhci_decode_trb() Commit cbf286e8ef83 ("xhci: fix unsafe memory usage in xhci tracing") apparently missed one sprintf() call in xhci_decode_trb() -- replace it with the snprintf() call as well... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Fixes: cbf286e8ef83 ("xhci: fix unsafe memory usage in xhci tracing") Signed-off-by: Sergey Shtylyov Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20220630124645.1805902-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3dbee7f9e9e005e3bd7b5e35c8a5bab4fc27bd48 Merge: a9e37a828ca0 bc4d193238be Author: Mark Brown Date: Thu Jun 30 14:31:05 2022 +0100 regulator: qcom_smd: Add PM8909 and fix pm8916_pldo range Merge series from Stephan Gerhold : Fix the voltage range for the pm8916_pldo in the qcom_smd-regulator driver and add definitions for the regulators available in PM8909. commit 31d4c1bdf157421b26d51f61a4da95dd20d171e2 Author: David Jander Date: Wed Jun 29 16:25:19 2022 +0200 spi: spi.c: Remove redundant else block Reported-by: Andy Shevchenko Signed-off-by: David Jander Link: https://lore.kernel.org/r/20220629142519.3985486-4-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 95c8222f0e52b09b7607616274e7cae84d519a9b Author: David Jander Date: Wed Jun 29 16:25:18 2022 +0200 spi: spi.c: Fix comment style Capitalize first word in comment where appropriate and add parentheses to function names. Reported-by: Andy Shevchenko Signed-off-by: David Jander Link: https://lore.kernel.org/r/20220629142519.3985486-3-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 94 ++++++++++++++++++++++++------------------------- include/linux/spi/spi.h | 82 +++++++++++++++++++++--------------------- 2 files changed, 88 insertions(+), 88 deletions(-) commit c191543e99fc03a36ccf7869392957a7182e0ada Author: David Jander Date: Wed Jun 29 16:25:17 2022 +0200 spi: spi.c: White-space fix in __spi_pump_messages() Reported-by: Andy Shevchenko Signed-off-by: David Jander Link: https://lore.kernel.org/r/20220629142519.3985486-2-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8d6253b36f55d199590ef908712fe52bb39ee97 Author: Li kunyu Date: Thu Jun 30 10:03:47 2022 +0800 ASoC: tegra: delete a semicolon extra semicolons could be deleted. Signed-off-by: Li kunyu Link: https://lore.kernel.org/r/20220630020347.7148-1-kunyu@nfschina.com Signed-off-by: Mark Brown sound/soc/tegra/tegra210_adx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8010efc7b83038d1c18abe1b8d171e3c7d4ed92 Author: Charles Keepax Date: Thu Jun 30 11:14:59 2022 +0100 ASoC: wm_adsp: Minor clean and redundant code removal The cs_dsp core will return an error if passed a NULL cs_dsp struct so there is no need for the wm_adsp_write|read_ctl functions to manually check that. The cs_dsp core will also check the data is within bounds of the control so the additional bounds check is redundant too. Simplify things a bit by removing said code. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220630101459.3442327-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) commit 871325d800ed532ba5874257f04bb4ae75125bc4 Author: Tom Rix Date: Wed Jun 29 16:18:11 2022 -0400 ASoC: samsung: change neo1973_audio from a global to static sparse reports sound/soc/samsung/neo1973_wm8753.c:347:24: warning: symbol 'neo1973_audio' was not declared. Should it be static? neo1973_audio is only used in neo1973_wm8753.c, so it's storage class specifier should be static. Fixes: e26a2abcc246 ("ASoC: samsung: neo1973: turn into platform driver") Signed-off-by: Tom Rix Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220629201811.2537853-1-trix@redhat.com Signed-off-by: Mark Brown sound/soc/samsung/neo1973_wm8753.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdb09e6231433b65e31c40fbe298099db6513a7f Author: Srinivas Kandagatla Date: Thu Jun 30 13:36:33 2022 +0100 ASoC: codecs: wsa883x: add control, dapm widgets and map Add controls, dapm widgets along with route. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220630123633.8047-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/codecs/wsa883x.c | 200 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 200 insertions(+) commit a5201d42e2f8a8e8062103170027840ee372742f Author: Schspa Shi Date: Wed Jun 29 21:09:51 2022 +0800 regmap: cache: Add extra parameter check in regcache_init When num_reg_defaults > 0 but reg_defaults is NULL, there will be a NULL pointer exception. Current code has no such usage, but as additional hardening, also check this to prevent any chance of crashing. Signed-off-by: Schspa Shi Link: https://lore.kernel.org/r/20220629130951.63040-1-schspa@gmail.com Signed-off-by: Mark Brown drivers/base/regmap/regcache.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a9e37a828ca069802b2f817e3cbf791b3806c97c Author: Liang He Date: Wed Jun 22 11:48:16 2022 +0800 regulator: scmi: Add missing of_node_get() In scmi_regulator_probe(), of_find_node_by_name() will decrease the refcount of its first argument and we need a of_node_get() to keep reference balance. Signed-off-by: Liang He Reviewed-by: Cristian Marussi Link: https://lore.kernel.org/r/20220622034816.4094043-1-windhl@126.com Signed-off-by: Mark Brown drivers/regulator/scmi-regulator.c | 1 + 1 file changed, 1 insertion(+) commit d6fb6ee1820cb9c49717b8d28c5b2e940cb2e439 Author: Uwe Kleine-König Date: Sat Jun 18 13:23:11 2022 +0200 ACPI: bus: Drop driver member of struct acpi_device struct acpi_device::driver tracks the same information as the driver member of struct acpi_device::dev. Fix all users of the former to use the latter and drop the redundant data from struct acpi_device. Signed-off-by: Uwe Kleine-König Signed-off-by: Rafael J. Wysocki drivers/acpi/bus.c | 21 ++++++++++----------- drivers/acpi/device_sysfs.c | 2 +- include/acpi/acpi_bus.h | 1 - 3 files changed, 11 insertions(+), 13 deletions(-) commit e5ed878ddb7cd95cd7886a0298fcb080eeab5e90 Author: Uwe Kleine-König Date: Sat Jun 18 13:23:10 2022 +0200 ACPI: bus: Drop redundant check in acpi_device_remove() A bus remove callback is only ever called by the device core with a bound driver. So there is no need to check if the driver is non-NULL. Signed-off-by: Uwe Kleine-König [ rjw: Added empty code line after if () ] Signed-off-by: Rafael J. Wysocki drivers/acpi/bus.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d4c0b614b5a47d0b3870e89fd211b6e80f6973eb Author: Samuel Holland Date: Mon Jun 20 22:42:23 2022 -0500 pinctrl: axp209: Support the AXP221/AXP223/AXP809 variant These PMICs each have 2 GPIOs with the same register layout as AXP813, but without an ADC function. They all fall back to the AXP221 compatible string, so only that one needs to be listed in the driver. Signed-off-by: Samuel Holland Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220621034224.38995-4-samuel@sholland.org Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-axp209.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit f9f991e14969465448ab598c6f70dbedf2938ed5 Author: Samuel Holland Date: Mon Jun 20 22:42:21 2022 -0500 dt-bindings: gpio: Add AXP221/AXP223/AXP809 compatibles These PMICs each have 2 GPIOs with the same register layout as AXP813, but without an ADC function. Signed-off-by: Samuel Holland Reviewed-by: Chen-Yu Tsai Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220621034224.38995-2-samuel@sholland.org Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit bb2c2fe7b8d52338a81dd6af8ae26d63863f3ca3 Author: Srinivasa Rao Mandadapu Date: Wed Jun 29 13:24:50 2022 +0530 pinctrl: qcom: sc7280: Fix compile bug Fix the compilation error, caused by updating constant variable. Hence remove redundant constant variable, which is no more useful as per new design. The issue is due to some unstaged changes. Fix it up. Fixes: 36fe26843d6d ("pinctrl: qcom: sc7280: Add clock optional check for ADSP bypass targets") Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1656489290-20881-1-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 5 +---- drivers/pinctrl/qcom/pinctrl-lpass-lpi.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) commit 53447365ccb442bbd3dfffc2d7fd96203770dfb6 Merge: d15534a6f4cf 66348f178d5a Author: Mark Brown Date: Thu Jun 30 12:45:02 2022 +0100 ASoC: dt-bindings: Add bindings for WCD9335 DAIs Merge series from Yassine Oudjana : Add DT bindings for WCD9335 DAIs and use them in the driver as well as all device trees currently using WCD9335. commit bf48c3fae6d78d6418f62bd3259cd62dd16f83ec Merge: d19b4c52f7c9 211da42eaa45 Author: Paolo Abeni Date: Thu Jun 30 13:14:38 2022 +0200 Merge branch 'net-neigh-introduce-interval_probe_time-for-periodic-probe' Yuwei Wang says: ==================== net, neigh: introduce interval_probe_time for periodic probe This series adds a new option `interval_probe_time_ms` in net, neigh for periodic probe, and add a limitation to prevent it set to 0 ==================== Link: https://lore.kernel.org/r/20220629084832.2842973-1-wangyuweihx@gmail.com Signed-off-by: Paolo Abeni commit 211da42eaa45db7b0edfde187dd88a85fbd466b5 Author: Yuwei Wang Date: Wed Jun 29 08:48:32 2022 +0000 net, neigh: introduce interval_probe_time_ms for periodic probe commit ed6cd6a17896 ("net, neigh: Set lower cap for neigh_managed_work rearming") fixed a case when DELAY_PROBE_TIME is configured to 0, the processing of the system work queue hog CPU to 100%, and further more we should introduce a new option used by periodic probe Signed-off-by: Yuwei Wang Signed-off-by: Paolo Abeni Documentation/networking/ip-sysctl.rst | 6 ++++++ include/net/neighbour.h | 1 + include/uapi/linux/neighbour.h | 1 + include/uapi/linux/sysctl.h | 37 +++++++++++++++++----------------- net/core/neighbour.c | 32 +++++++++++++++++++++++++++-- net/decnet/dn_neigh.c | 1 + net/ipv4/arp.c | 1 + net/ipv6/ndisc.c | 1 + 8 files changed, 60 insertions(+), 20 deletions(-) commit c381d02b2fd5f82d2207db1b9b25ff60d0d9c27c Author: Yuwei Wang Date: Wed Jun 29 08:48:31 2022 +0000 sysctl: add proc_dointvec_ms_jiffies_minmax add proc_dointvec_ms_jiffies_minmax to fit read msecs value to jiffies with a limited range of values Signed-off-by: Yuwei Wang Signed-off-by: Paolo Abeni include/linux/sysctl.h | 2 ++ kernel/sysctl.c | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) commit d19b4c52f7c99fdc5198a6f5885ba818245966cd Author: Jilin Yuan Date: Wed Jun 29 16:16:32 2022 +0800 atheros/atl1c:fix repeated words in comments Delete the redundant word 'slot'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220629081632.54445-1-yuanjilin@cdjrlc.com Signed-off-by: Paolo Abeni drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f36d074aeb51a20508a65861d1518dbc231a1fc Author: Jani Nikula Date: Tue Jun 28 17:10:05 2022 +0300 drm/i915: use DISPLAY_VER() instead of accessing match_info directly We've just set up device info in i915_driver_create() so we can use DISPLAY_VER() intead of looking at match_info directly. Semantically we want to check the display version instead of the graphics version, and for the earlier platforms they are always the same. v2: Use DISPLAY_VER() instead of GRAPHICS_VER() (Ville) Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220628141005.226252-1-jani.nikula@intel.com drivers/gpu/drm/i915/i915_driver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e61f294c7e8da94bb1c9d66f2cdcebfa2dc535a2 Author: Jani Nikula Date: Tue Jun 21 15:37:32 2022 +0300 drm/i915/bios: debug log ddi port info after parsing The ddc pin and aux channel sanitization may disable DVI/HDMI and DP, respectively, of ports parsed earlier, in "last one wins" fashion. With parsing and printing interleaved, we'll end up logging support first and disabling later anyway. Now that we've split ddi port info parsing and printing, take it further by doing the printing in a separate loop, fixing the logging. Note that this also changes the logging order from VBT child device order to port number order. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220621123732.1118437-1-jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_bios.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 3190d4be3764fd847d57e26197158940e89272ae Author: Jarkko Nikula Date: Thu Jun 30 10:33:05 2022 +0300 spi: pxa2xx: Add support for Intel Meteor Lake-P Add support for LPSS SPI on Intel Meteor Lake-P. It has three controllers each having two chip selects. This squashes a fix from Ap, Kamal fixing incorrect PCI ID of 3rd controller. Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220630073305.632850-1-jarkko.nikula@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 4 ++++ 1 file changed, 4 insertions(+) commit d15534a6f4cff031f1233154f1e275302c03e5d4 Author: Marek Vasut Date: Tue Jun 28 18:58:07 2022 +0200 ASoC: doc: Update dead links The alsa-project documentation is now part of the kernel docs, the original links are long dead, update links. Signed-off-by: Marek Vasut Cc: Mark Brown Cc: Takashi Iwai Link: https://lore.kernel.org/r/20220628165807.152191-1-marex@denx.de Signed-off-by: Mark Brown Documentation/process/kernel-docs.rst | 2 +- Documentation/sound/soc/codec.rst | 2 +- Documentation/sound/soc/platform.rst | 2 +- sound/pci/ens1370.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit d2294461b90e0c5b3bbfaaf2c8baff4fd3e2bb13 Author: Tom Rix Date: Wed Jun 29 14:53:45 2022 -0400 ASoC: samsung: change gpiod_speaker_power and rx1950_audio from global to static variables sparse reports sound/soc/samsung/rx1950_uda1380.c:131:18: warning: symbol 'gpiod_speaker_power' was not declared. Should it be static? sound/soc/samsung/rx1950_uda1380.c:231:24: warning: symbol 'rx1950_audio' was not declared. Should it be static? Both gpiod_speaker_power and rx1950_audio are only used in rx1950_uda1380.c, so their storage class specifiers should be static. Fixes: 83d74e354200 ("ASoC: samsung: rx1950: turn into platform driver") Signed-off-by: Tom Rix Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220629185345.910406-1-trix@redhat.com Signed-off-by: Mark Brown sound/soc/samsung/rx1950_uda1380.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 28e1a8f4b0ff1eafc320ec733b9c61ee7eb633ea Author: Jinyu Tang Date: Wed Jun 15 17:40:15 2022 +0800 memblock: avoid some repeat when add new range The worst case is that the new memory range overlaps all existing regions, which requires type->cnt + 1 empty struct memblock_region slots in the type->regions array. So if type->cnt + 1 + type->cnt is less than type->max, we can insert regions directly rather than calculate the needed amount before the insertion. And becase of merge operation in the end of function, tpye->cnt will increase slowly for many cases. This change allows to avoid unnecessary repeat of memblock ranges traversal for many cases when adding new memory range. Signed-off-by: Jinyu Tang [rppt: massaged comment and changelog text] Signed-off-by: Mike Rapoport mm/memblock.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit fac76f2260893dde5aa05bb693b4c13e8ed0454b Author: Qian Cai Date: Fri Jun 24 07:13:38 2022 -0400 crypto: arm64/gcm - Select AEAD for GHASH_ARM64_CE Otherwise, we could fail to compile. ld: arch/arm64/crypto/ghash-ce-glue.o: in function 'ghash_ce_mod_exit': ghash-ce-glue.c:(.exit.text+0x24): undefined reference to 'crypto_unregister_aead' ld: arch/arm64/crypto/ghash-ce-glue.o: in function 'ghash_ce_mod_init': ghash-ce-glue.c:(.init.text+0x34): undefined reference to 'crypto_register_aead' Fixes: 537c1445ab0b ("crypto: arm64/gcm - implement native driver using v8 Crypto Extensions") Signed-off-by: Qian Cai Signed-off-by: Herbert Xu arch/arm64/crypto/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 0bb8f125253843c445b70fc6ef4fb21aa7b25625 Author: lei he Date: Fri Jun 24 18:06:25 2022 +0800 crypto: testmgr - fix version number of RSA tests According to PKCS#1 standard, the 'otherPrimeInfos' field contains the information for the additional primes r_3, ..., r_u, in order. It shall be omitted if the version is 0 and shall contain at least one instance of OtherPrimeInfo if the version is 1, see: https://www.rfc-editor.org/rfc/rfc3447#page-44 Replace the version number '1' with 0, otherwise, some drivers may not pass the run-time tests. Signed-off-by: lei he Signed-off-by: Herbert Xu crypto/testmgr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8e7ae8bafe98a288727d647dace03fed2bdcc5fc Author: Jiang Jian Date: Thu Jun 23 18:30:14 2022 +0800 crypto: vmx - drop unexpected word 'for' in comments there is an unexpected word 'for' in the comments that need to be dropped file - drivers/crypto/vmx/ghashp8-ppc.pl line - 19 "# GHASH for for PowerISA v2.07." changed to: "# GHASH for PowerISA v2.07." Signed-off-by: Jiang Jian Signed-off-by: Herbert Xu drivers/crypto/vmx/ghashp8-ppc.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a89db0595f52ca4d05c9301b4b0bae4cce2ecaf7 Author: Jiang Jian Date: Thu Jun 23 18:25:36 2022 +0800 crypto: caam - drop unexpected word 'for' in comments there is an unexpected word 'for' in the comments that need to be dropped file - drivers/crypto/caam/caamhash_desc.c line - 25 * must be false for for ahash first and digest changed to: * must be false for ahash first and digest Signed-off-by: Jiang Jian Reviewed-by: Gaurav Jain Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash_desc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dac230179fdc9ffa074fcb1533a0dd56f162a00a Author: Jiang Jian Date: Thu Jun 23 15:11:23 2022 +0800 crypto: caam - drop unexpected word 'a' in comments Drop the unexpected word 'a' in the comments that need to be dropped * This is a a cache of buffers, from which the users of CAAM QI driver --> * This is a cache of buffers, from which the users of CAAM QI driver Signed-off-by: Jiang Jian Reviewed-by: Gaurav Jain Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg_qi2.c | 2 +- drivers/crypto/caam/qi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e34525c3975832971451cb0908594c310fc83cd5 Author: Jiang Jian Date: Thu Jun 23 00:02:22 2022 +0800 crypto: cavium - fix typos in comments Replace 'is' with 'it' file: drivers/crypto/cavium/cpt/cpt_hw_types.h line: 268 * which if the line hits and is is dirty will cause the line to be changed to: * which if the line hits and it is dirty will cause the line to be Signed-off-by: Jiang Jian Signed-off-by: Herbert Xu drivers/crypto/cavium/cpt/cpt_hw_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b069597c254a2969cf21142c3881b2d5e80c658 Author: Jilin Yuan Date: Wed Jun 22 17:07:30 2022 +0800 crypto: arm64/aes-neon - Fix typo in comment Delete the redundant word 'the'. Signed-off-by: Jilin Yuan Signed-off-by: Herbert Xu arch/arm64/crypto/aes-neon.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 882f0a59377da3fc5153c06790227930e5c00f88 Author: Jiang Jian Date: Tue Jun 21 18:27:33 2022 +0800 crypto: ux500/hash - drop unexpected word "the" there is an unexpected word "the" in the comments that need to be dropped >- * specified in the the hw design spec. Either due to incorrect info in the >+ * specified in the hw design spec. Either due to incorrect info in the Signed-off-by: Jiang Jian Signed-off-by: Herbert Xu drivers/crypto/ux500/hash/hash_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54a8b6802f03b6d0fa6ecad67f51466f8fa2ad6d Author: Jiang Jian Date: Tue Jun 21 18:22:54 2022 +0800 crypto: nx - drop unexpected word "the" there is an unexpected word "the" in the comments that need to be dropped >- * The DDE is setup with the the DDE count, byte count, and address of >+ * The DDE is setup with the DDE count, byte count, and address of Signed-off-by: Jiang Jian Signed-off-by: Herbert Xu drivers/crypto/nx/nx-common-powernv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6c14da474bf260d73953fbf7992c98d9112aec7 Author: Jason A. Donenfeld Date: Mon Jun 20 09:52:43 2022 +0200 crypto: lib/blake2s - reduce stack frame usage in self test Using 3 blocks here doesn't give us much more than using 2, and it causes a stack frame size warning on certain compiler/config/arch combinations: lib/crypto/blake2s-selftest.c: In function 'blake2s_selftest': >> lib/crypto/blake2s-selftest.c:632:1: warning: the frame size of 1088 bytes is larger than 1024 bytes [-Wframe-larger-than=] 632 | } | ^ So this patch just reduces the block from 3 to 2, which makes the warning go away. Reported-by: kernel test robot Link: https://lore.kernel.org/linux-crypto/202206200851.gE3MHCgd-lkp@intel.com Fixes: 2d16803c562e ("crypto: blake2s - remove shash module") Signed-off-by: Jason A. Donenfeld Signed-off-by: Herbert Xu lib/crypto/blake2s-selftest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b1dee9527e654207c0980023fadabdd12d3dba80 Author: Jani Nikula Date: Wed Jun 29 12:27:55 2022 +0300 drm/edid: take HF-EEODB extension count into account Take the HF-EEODB extension count override into account. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/c31b5796feb05c3ebac067600be2e88e098d7592.1656494768.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 18e3c1d5d4cf6bd30cf1f1bc10ffac7a05a6719d Author: Jani Nikula Date: Wed Jun 29 12:27:54 2022 +0300 drm/edid: add HF-EEODB support to EDID read and allocation HDMI 2.1 section 10.3.6 defines an HDMI Forum EDID Extension Override Data Block, which may contain a different extension count than the base block claims. Add support for reading more EDID data if available. The extra blocks aren't parsed yet, though. Hard-coding the EEODB parsing instead of using the iterators we have is a bit of a bummer, but we have to be able to do this on a partially allocated EDID while reading it. v2: - Check for CEA Data Block Collection size (Ville) - Amend commit message and comment about hard-coded parsing Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/57b57a355d62eb91ad1e3cf555978576f2bd9fdd.1656494768.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 89 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 86 insertions(+), 3 deletions(-) commit 89f4b4c53a7c12d2feec0ecaa15b0493b2bd61e6 Author: Jani Nikula Date: Wed Jun 29 12:27:53 2022 +0300 drm/edid: do invalid block filtering in-place Rewrite edid_filter_invalid_blocks() to filter invalid blocks in-place. The main motivation is to not rely on passed in information on invalid block count or the allocation size, which will be helpful in follow-up work on HF-EEODB. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/a6ad5e4e7b91338c0d19d7be189af31094e65555.1656494768.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) commit 3d1ab66e043f2a143e4d93242de7710a9c98c829 Author: Jani Nikula Date: Wed Jun 29 12:27:52 2022 +0300 drm/edid: add drm_edid_raw() to access the raw EDID data Unfortunately, there are still plenty of interfaces around that require a struct edid pointer, and it's impossible to change them all at once. Add an accessor to the raw EDID data to help the transition. While there are no such cases now, be defensive against raw EDID extension count indicating bigger EDID than is actually allocated. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/fb55d0b580d556bf2b8e58070239657ac9cb4b2f.1656494768.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 26 ++++++++++++++++++++++++++ include/drm/drm_edid.h | 1 + 2 files changed, 27 insertions(+) commit 964893d3caff6bc39f6cf5cb7d90fd78a810c535 Author: Jani Nikula Date: Wed Jun 29 12:27:51 2022 +0300 drm/probe-helper: add drm_connector_helper_get_modes() Add a helper function to be used as the "default" .get_modes() hook. This also works as an example of what the driver .get_modes() hooks are supposed to do regarding the new drm_edid_read*() and drm_edid_connector_update() calls. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/d985449ed4b95971490ab7c09d2d59b58a892769.1656494768.git.jani.nikula@intel.com drivers/gpu/drm/drm_probe_helper.c | 34 ++++++++++++++++++++++++++++++++++ include/drm/drm_probe_helper.h | 1 + 2 files changed, 35 insertions(+) commit b71c0aaab9ef1054155a075cf5e8a1db7b37ca5f Author: Jani Nikula Date: Wed Jun 29 12:27:50 2022 +0300 drm/edid: add drm_edid_connector_update() Add a new function drm_edid_connector_update() to replace the combination of calls drm_connector_update_edid_property() and drm_add_edid_modes(). Usually they are called in the drivers in this order, however the former needs information from the latter. Since the new drm_edid_read*() functions no longer call the connector updates directly, and the read and update are separated, we'll need this new function for the connector update. This is all in drm_edid.c simply to keep struct drm_edid opaque. v2: - Share code with drm_connector_update_edid_property() (Ville) - Add comment about override EDID handling Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/75aa3dbc8c9aa26ebbcdeacd98a466ef8d8827f4.1656494768.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 103 ++++++++++++++++++++++++++++++++++----------- include/drm/drm_edid.h | 2 + 2 files changed, 81 insertions(+), 24 deletions(-) commit 6aa145bc943d34bf05f2bc24ea3aa36d70470f1d Author: Jani Nikula Date: Wed Jun 29 12:27:49 2022 +0300 drm/edid: abstract debugfs override EDID set/reset Add functions drm_edid_override_set() and drm_edid_override_reset() to support "edid_override" connector debugfs, and to hide the details about it in drm_edid.c. No functional changes at this time. Also note in the connector.override_edid flag kernel-doc that this is only supposed to be modified by the code doing debugfs EDID override handling. Currently, it is still being modified by amdgpu in create_eml_sink() and handle_edid_mgmt() for reasons unknown. This was added in commit 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)") and later moved to amdgpu_dm.c in commit e7b07ceef2a6 ("drm/amd/display: Merge amdgpu_dm_types and amdgpu_dm"). Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/8f6b4001630cafac5f44aa5913429ac9979743d2.1656494768.git.jani.nikula@intel.com drivers/gpu/drm/drm_crtc_internal.h | 2 ++ drivers/gpu/drm/drm_debugfs.c | 21 +++++---------------- drivers/gpu/drm/drm_edid.c | 26 ++++++++++++++++++++++++++ include/drm/drm_connector.h | 6 +++++- 4 files changed, 38 insertions(+), 17 deletions(-) commit f999b37eefd7f1d59bece1d94fa0dbee2f2d62d6 Author: Jani Nikula Date: Wed Jun 29 12:27:48 2022 +0300 drm/edid: clean up connector update error handling and debug logging Bail out on all errors, debug log all errors, and convert to drm device based debug logging. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/de4270b3d2e61fe42b9248490376594d472d19aa.1656494768.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) commit a819451eda6df8f8445f9c7b093b86c4d1919b62 Author: Jani Nikula Date: Wed Jun 29 12:27:47 2022 +0300 drm/edid: convert drm_connector_update_edid_property() to struct drm_edid Make drm_connector_update_edid_property() a thin wrapper around a struct drm_edid based version of the same. This lets us remove the legacy drm_update_tile_info() and drm_add_display_info() functions altogether. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/4bfe87ae392554ffb41d725353c4265ae56700bb.1656494768.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 81 ++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 46 deletions(-) commit 02b16fbc56e97b295239c83e43f186c191e42dd3 Author: Jani Nikula Date: Wed Jun 29 12:27:46 2022 +0300 drm/edid: move drm_connector_update_edid_property() to drm_edid.c The function needs access to drm_edid.c internals more than drm_connector.c. We can make drm_reset_display_info(), drm_add_display_info() and drm_update_tile_info() static. There will be more benefits with follow-up struct drm_edid refactoring. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/cbabce6ffb41fdc903533f21d946e8cae0667be5.1656494768.git.jani.nikula@intel.com drivers/gpu/drm/drm_connector.c | 74 ------------------------------- drivers/gpu/drm/drm_crtc_internal.h | 3 -- drivers/gpu/drm/drm_edid.c | 86 ++++++++++++++++++++++++++++++++++--- 3 files changed, 81 insertions(+), 82 deletions(-) commit 63569d90863ff26c8b10c8971d1271c17a45224b Author: Tom Rix Date: Wed Jun 29 16:01:01 2022 -0400 drm/vc4: change vc4_dma_range_matches from a global to static sparse reports drivers/gpu/drm/vc4/vc4_drv.c:270:27: warning: symbol 'vc4_dma_range_matches' was not declared. Should it be static? vc4_dma_range_matches is only used in vc4_drv.c, so it's storage class specifier should be static. Fixes: da8e393e23ef ("drm/vc4: drv: Adopt the dma configuration from the HVS or V3D component") Signed-off-by: Tom Rix Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20220629200101.498138-1-trix@redhat.com drivers/gpu/drm/vc4/vc4_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c377e7b1156dbcb301587e3851d31db50ede07b Author: Dmitry Baryshkov Date: Thu May 5 17:49:13 2022 +0300 arm64: defconfig: enable Qualcomm LPG leds driver Enable the driver for Qualcomm Light Pulse Generator block, it is used on many Qualcomm platforms. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220505144913.1432346-1-dmitry.baryshkov@linaro.org arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit dbc6fc7e3f76ac8a584cd39f9978d6b41a96e75a Author: Yang Yingliang Date: Tue Jun 28 21:12:59 2022 +0800 net: pcs-rzn1-miic: fix return value check in miic_probe() On failure, devm_platform_ioremap_resource() returns a ERR_PTR() value and not NULL. Fix return value checking by using IS_ERR() and return PTR_ERR() as error value. Fixes: 7dc54d3b8d91 ("net: pcs: add Renesas MII converter driver") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Clément Léger Link: https://lore.kernel.org/r/20220628131259.3109124-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski drivers/net/pcs/pcs-rzn1-miic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 626af58bad5817af442d992f9966a7bf793f1562 Author: Peng Wu Date: Tue Jun 28 13:09:20 2022 +0000 net: dsa: rzn1-a5psw: fix a NULL vs IS_ERR() check in a5psw_probe() The devm_platform_ioremap_resource() function never returns NULL. It returns error pointers. Signed-off-by: Peng Wu Reported-by: Hulk Robot Reviewed-by: Clément Léger Link: https://lore.kernel.org/r/20220628130920.49493-1-wupeng58@huawei.com Signed-off-by: Jakub Kicinski drivers/net/dsa/rzn1_a5psw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3ce7547e5b710cb90e1150f9bb867c133576441a Author: Jiawen Wu Date: Tue Jun 28 17:55:30 2022 +0800 net: txgbe: Add build support for txgbe Add doc build infrastructure for txgbe driver. Initialize PCI memory space for WangXun 10 Gigabit Ethernet devices. Signed-off-by: Jiawen Wu Link: https://lore.kernel.org/r/20220628095530.889344-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski .../networking/device_drivers/ethernet/index.rst | 1 + .../device_drivers/ethernet/wangxun/txgbe.rst | 20 +++ MAINTAINERS | 7 + drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/Makefile | 1 + drivers/net/ethernet/wangxun/Kconfig | 32 ++++ drivers/net/ethernet/wangxun/Makefile | 6 + drivers/net/ethernet/wangxun/txgbe/Makefile | 9 ++ drivers/net/ethernet/wangxun/txgbe/txgbe.h | 24 +++ drivers/net/ethernet/wangxun/txgbe/txgbe_main.c | 165 +++++++++++++++++++++ drivers/net/ethernet/wangxun/txgbe/txgbe_type.h | 57 +++++++ 11 files changed, 323 insertions(+) commit 05eed0990927aa9634682fec58660e30f7b7ae30 Author: Bryan O'Donoghue Date: Wed May 4 17:38:35 2022 +0100 clk: qcom: gcc-msm8939: Point MM peripherals to system_mm_noc clock Qcom docs indciate the following peripherals operating from System NOC MM not from System NOC clocks. - MDP - VFE - JPEGe - Venus Switch over the relevant parent pointers. Fixes: 1664014e4679 ("clk: qcom: gcc-msm8939: Add MSM8939 Generic Clock Controller") Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220504163835.40130-5-bryan.odonoghue@linaro.org drivers/clk/qcom/gcc-msm8939.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit dd363e2f7196278e7a30f509a0e8a841cb763b14 Author: Bryan O'Donoghue Date: Wed May 4 17:38:34 2022 +0100 clk: qcom: gcc-msm8939: Add missing system_mm_noc_bfdcd_clk_src The msm8939 has an additional higher operating point for the multi-media peripherals. The higher throughput MM componets operate off of the system-mm noc not the system noc. system_mm_noc_bfdcd_clk_src is the source clock for the higher frequency capable system noc mm. Maximum frequency for the MM SNOC is 400 MHz. Fixes: 1664014e4679 ("clk: qcom: gcc-msm8939: Add MSM8939 Generic Clock Controller") Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220504163835.40130-4-bryan.odonoghue@linaro.org drivers/clk/qcom/gcc-msm8939.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 63d42708320d6d2ca9ed505123d50ff4a542c36f Author: Bryan O'Donoghue Date: Wed May 4 17:38:33 2022 +0100 clk: qcom: gcc-msm8939: Fix bimc_ddr_clk_src rcgr base address Reviewing qcom docs for the 8939 we can see the command rcgr is pointing to the wrong address. bimc_ddr_clk_src_rcgr is @ 0x01832024 not 0x01832004. Fixes: 1664014e4679 ("clk: qcom: gcc-msm8939: Add MSM8939 Generic Clock Controller") Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220504163835.40130-3-bryan.odonoghue@linaro.org drivers/clk/qcom/gcc-msm8939.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07e7fcf1714c5f9930ad27613fea940aedba68da Author: Bryan O'Donoghue Date: Wed May 4 17:38:32 2022 +0100 clk: qcom: gcc-msm8939: Add missing SYSTEM_MM_NOC_BFDCD_CLK_SRC When adding in the indexes for this clock-controller we missed SYSTEM_MM_NOC_BFDCD_CLK_SRC. Add it in now. Fixes: 4c71d6abc4fc ("clk: qcom: Add DT bindings for MSM8939 GCC") Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: devicetree@vger.kernel.org Signed-off-by: Bryan O'Donoghue Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220504163835.40130-2-bryan.odonoghue@linaro.org include/dt-bindings/clock/qcom,gcc-msm8939.h | 1 + 1 file changed, 1 insertion(+) commit 74fd304f2395e574a21cd06912f860771c82ee88 Author: Colin Ian King Date: Tue Jun 28 15:54:06 2022 +0100 ipv6: remove redundant store to value after addition There is no need to store the result of the addition back to variable count after the addition. The store is redundant, replace += with just + Cleans up clang scan build warning: warning: Although the value stored to 'count' is used in the enclosing expression, the value is never actually read from 'count' Signed-off-by: Colin Ian King Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20220628145406.183527-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski net/ipv6/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3eb4a4c3442c0642feaf466ecf6fe3cfb4af2c43 Author: Vladimir Oltean Date: Tue Jun 28 13:08:31 2022 +0300 net: switchdev: add reminder near struct switchdev_notifier_fdb_info br_switchdev_fdb_notify() creates an on-stack FDB info variable, and initializes it member by member. As such, newly added fields which are not initialized by br_switchdev_fdb_notify() will contain junk bytes from the stack. Other uses of struct switchdev_notifier_fdb_info have a struct initializer which should put zeroes in the uninitialized fields. Add a reminder above the structure for future developers. Recently discussed during review. Link: https://patchwork.kernel.org/project/netdevbpf/patch/20220524152144.40527-2-schultz.hans+netdev@gmail.com/#24877698 Link: https://patchwork.kernel.org/project/netdevbpf/patch/20220524152144.40527-3-schultz.hans+netdev@gmail.com/#24912269 Signed-off-by: Vladimir Oltean Reviewed-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20220628100831.2899434-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski include/net/switchdev.h | 3 +++ 1 file changed, 3 insertions(+) commit 9c17baaa97c89379cbd89e36115b7fb6aba43518 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:18 2022 -0700 ARM: dts: qcom: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220616005333.18491-25-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts | 4 ++-- arch/arm/boot/dts/qcom-apq8064-sony-xperia-lagan-yuga.dts | 8 ++++---- arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dtsi | 2 +- arch/arm/boot/dts/qcom-ipq8064-rb3011.dts | 4 ++-- arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi | 6 +++--- arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 4 ++-- arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine.dtsi | 8 ++++---- arch/arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dts | 6 +++--- arch/arm/boot/dts/qcom-msm8974pro-samsung-klte.dts | 6 +++--- arch/arm/boot/dts/qcom-msm8974pro-sony-xperia-shinano-castor.dts | 8 ++++---- 10 files changed, 28 insertions(+), 28 deletions(-) commit 31b2edcab4d153145354c4333a6be5209e185598 Author: Krzysztof Kozlowski Date: Thu May 26 22:42:48 2022 +0200 ARM: dts: qcom: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220526204248.832139-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts | 16 +-- arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts | 10 +- arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 14 +- arch/arm/boot/dts/qcom-apq8064.dtsi | 142 ++++++++++----------- arch/arm/boot/dts/qcom-ipq8064.dtsi | 32 ++--- arch/arm/boot/dts/qcom-mdm9615.dtsi | 6 +- arch/arm/boot/dts/qcom-msm8660.dtsi | 112 ++++++++-------- arch/arm/boot/dts/qcom-msm8960.dtsi | 54 ++++---- .../arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dts | 6 +- 9 files changed, 196 insertions(+), 196 deletions(-) commit 7afef282d7453ded3b31f71771a31b34dda51aff Author: Krzysztof Kozlowski Date: Sat May 21 18:45:48 2022 +0200 ARM: dts: qcom: ipq4019: fix Micron SPI NOR compatible The proper compatible for Micron n25q128a11 SPI NOR flash should include vendor-prefix and use jedec,spi-nor fallback. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521164550.91115-10-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1.dtsi | 2 +- arch/arm/boot/dts/qcom-ipq4019-ap.dk07.1-c1.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7b7e501f7a7293db0f66d27f0f3f191502faaad9 Author: Krzysztof Kozlowski Date: Thu May 5 13:38:00 2022 +0200 ARM: dts: qcom: apq8064: add unit addresses to QFPROM regions QFPROM children have 'reg' so they must have unit address. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220505113802.243301-4-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-apq8064.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 10193ad6d487e0abdc73c704306ebe8d15d4ab74 Author: Krzysztof Kozlowski Date: Thu May 5 13:37:59 2022 +0200 ARM: dts: qcom: cleanup QFPROM nodes Cleanup coding style of QFPROM nodes - put compatible as first property and drop tabs before '=' character. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220505113802.243301-3-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-apq8064.dtsi | 6 +++--- arch/arm/boot/dts/qcom-apq8084.dtsi | 4 ++-- arch/arm/boot/dts/qcom-msm8974.dtsi | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) commit aaed15efce65c20951f573955e10b51c24ca6e4d Author: Krzysztof Kozlowski Date: Thu May 5 13:37:58 2022 +0200 ARM: dts: qcom: use dedicated QFPROM compatibles Use dedicated compatibles for QFPROM on APQ8064, IPQ8064 and MSM9874, which is expected by the bindings. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220505113802.243301-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +- arch/arm/boot/dts/qcom-apq8084.dtsi | 2 +- arch/arm/boot/dts/qcom-ipq8064.dtsi | 2 +- arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 2a832912dba29f30f8df58b682ab0535c89682b5 Merge: 702e70143291 961d6c70d886 Author: Jakub Kicinski Date: Wed Jun 29 20:17:14 2022 -0700 Merge branch 'net-dsa-add-pause-stats-support' Oleksij Rempel says: ==================== net: dsa: add pause stats support ==================== Link: https://lore.kernel.org/r/20220628085155.2591201-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit 961d6c70d886ecc057f6e501db5879feb55db3b3 Author: Oleksij Rempel Date: Tue Jun 28 10:51:55 2022 +0200 net: dsa: microchip: count pause packets together will all other packets This switch is calculating tx/rx_bytes for all packets including pause. So, include rx/tx_pause counter to rx/tx_packets to make tx/rx_bytes fit to rx/tx_packets. Link: https://lore.kernel.org/all/20220624220317.ckhx6z7cmzegvoqi@skbuf/ Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski drivers/net/dsa/microchip/ksz_common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c4748ff6566b77d236052375747576009a1af1f7 Author: Oleksij Rempel Date: Tue Jun 28 10:51:54 2022 +0200 net: dsa: microchip: add pause stats support Add support for pause specific stats. Tested on ksz9477. Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski drivers/net/dsa/microchip/ksz_common.c | 19 +++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 1 + 2 files changed, 20 insertions(+) commit ea294f39b4382b7932285e52607bc668d83b31da Author: Oleksij Rempel Date: Tue Jun 28 10:51:53 2022 +0200 net: dsa: ar9331: add support for pause stats Add support for pause stats. Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski drivers/net/dsa/qca/ar9331.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 3d410403a572766628947754e2f62c29bcbf9035 Author: Oleksij Rempel Date: Tue Jun 28 10:51:52 2022 +0200 net: dsa: add get_pause_stats support Add support for pause stats Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski include/net/dsa.h | 2 ++ net/dsa/slave.c | 11 +++++++++++ 2 files changed, 13 insertions(+) commit eb9e93937756a05787977875830c0dc482cb57e0 Author: Christian Marangi Date: Sat Apr 30 07:51:17 2022 +0200 ARM: dts: qcom: replace gcc PXO with pxo_board fixed clock Replace gcc PXO phandle to pxo_board fixed clock declared in the dts. gcc driver doesn't provide PXO_SRC as it's a fixed-clock. This cause a kernel panic if any driver actually try to use it. Fixes: 40cf5c884a96 ("ARM: dts: qcom: add L2CC and RPM for IPQ8064") Signed-off-by: Ansuel Smith Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430055118.1947-2-ansuelsmth@gmail.com arch/arm/boot/dts/qcom-ipq8064.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9410fb940114444f37a0b787bd84077b61d76bf6 Author: Johan Hovold Date: Tue Jun 28 10:57:07 2022 +0200 clk: qcom: gcc-sc8280xp: use phy-mux clock for PCIe Use the new phy-mux clock implementation for the PCIe pipe clock muxes so that the pipe clock source is set to the QMP PHY PLL when the downstream pipe clock is enabled and restored to the always-on XO when it is again disabled. This is needed to prevent the corresponding GDSC from hanging when enabling or disabling the PCIe power domain, something which requires a ticking source. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220628085707.16214-1-johan+linaro@kernel.org drivers/clk/qcom/gcc-sc8280xp.c | 121 ++++++++++------------------------------ 1 file changed, 31 insertions(+), 90 deletions(-) commit 65b7ebda5028615f7ee7628759e05da5db7f0d25 Author: Sibi Sankar Date: Mon May 23 12:30:57 2022 +0530 firmware: qcom_scm: Add bw voting support to the SCM interface The SMC calls required by remoteproc PAS driver on SM8450 SoCs get a performance benefit from having a max vote to the crypto->ddr path. Add support for bandwidth (bw) voting for those SMC calls when the interconnects property is specified. Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1653289258-17699-3-git-send-email-quic_sibis@quicinc.com drivers/firmware/qcom_scm.c | 69 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit 7f045132bc23904fa962d9e1574dca521b9d47ec Author: Sibi Sankar Date: Mon May 23 12:30:56 2022 +0530 dt-bindings: firmware: qcom-scm: Add interconnects property Add interconnects as an optional property for SM8450 SoCs. Signed-off-by: Sibi Sankar Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1653289258-17699-2-git-send-email-quic_sibis@quicinc.com Documentation/devicetree/bindings/firmware/qcom,scm.txt | 1 + 1 file changed, 1 insertion(+) commit 6e9c65f71eddef88f14b7210bbf30e6ce2409b87 Author: Alex Deucher Date: Thu Jun 23 12:37:40 2022 -0400 drm/amdgpu: fix documentation warning Fixes this issue: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:5094: warning: expecting prototype for amdgpu_device_gpu_recover_imp(). Prototype was for amdgpu_device_gpu_recover() instead Fixes: cf727044144d ("drm/amdgpu: Rename amdgpu_device_gpu_recover_imp back to amdgpu_device_gpu_recover") Reviewed-by: Kent Russell Reported-by: Stephen Rothwell Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fb5ee7cec06266a29f25ecc01a23b9d107f64e1 Author: Lucas De Marchi Date: Tue Jun 28 12:10:16 2022 -0700 iosys-map: Add per-word write Like was done for read, provide the equivalent for write. Even if current users are not in the hot path, this should future-proof it. v2: - Remove default from _Generic() - callers wanting to write more than u64 should use iosys_map_memcpy_to() - Add WRITE_ONCE() cases dereferencing the pointer when using system memory v3: - Fix precedence issue when casting inside WRITE_ONCE(). By not using () around vaddr__ the offset was not part of the cast, but rather added to it, producing a wrong address - Remove compiletime_assert() as WRITE_ONCE() already contains it Signed-off-by: Lucas De Marchi Reviewed-by: Reviewed-by: Christian König # v1 Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220628191016.3899428-2-lucas.demarchi@intel.com include/linux/iosys-map.h | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) commit 5f278dbd540b7548bc5193552e6d478255c14c2d Author: Lucas De Marchi Date: Tue Jun 28 12:10:15 2022 -0700 iosys-map: Add per-word read Instead of always falling back to memcpy_fromio() for any size, prefer using read{b,w,l}(). When reading struct members it's common to read individual integer variables individually. Going through memcpy_fromio() for each of them poses a high penalty. Employ a similar trick as __seqprop() by using _Generic() to generate only the specific call based on a type-compatible variable. For a pariticular i915 workload producing GPU context switches, __get_engine_usage_record() is particularly hot since the engine usage is read from device local memory with dgfx, possibly multiple times since it's racy. Test execution time for this test shows a ~12.5% improvement with DG2: Before: nrepeats = 1000; min = 7.63243e+06; max = 1.01817e+07; median = 9.52548e+06; var = 526149; After: nrepeats = 1000; min = 7.03402e+06; max = 8.8832e+06; median = 8.33955e+06; var = 333113; Other things attempted that didn't prove very useful: 1) Change the _Generic() on x86 to just dereference the memory address 2) Change __get_engine_usage_record() to do just 1 read per loop, comparing with the previous value read 3) Change __get_engine_usage_record() to access the fields directly as it was before the conversion to iosys-map (3) did gave a small improvement (~3%), but doesn't seem to scale well to other similar cases in the driver. Additional test by Chris Wilson using gem_create from igt with some changes to track object creation time. This happens to accidentally stress this code path: Pre iosys_map conversion of engine busyness: lmem0: Creating 262144 4KiB objects took 59274.2ms Unpatched: lmem0: Creating 262144 4KiB objects took 108830.2ms With readl (this patch): lmem0: Creating 262144 4KiB objects took 61348.6ms s/readl/READ_ONCE/ lmem0: Creating 262144 4KiB objects took 61333.2ms So we do take a little bit more time than before the conversion, but that is due to other factors: bringing the READ_ONCE back would be as good as just doing this conversion. v2: - Remove default from _Generic() - callers wanting to read more than u64 should use iosys_map_memcpy_from() - Add READ_ONCE() cases dereferencing the pointer when using system memory v3: - Fix precedence issue when casting inside READ_ONCE(). By not using () around vaddr__ the offset was not part of the cast, but rather added to it, producing a wrong address - Remove compiletime_assert() as READ_ONCE() already contains it Signed-off-by: Lucas De Marchi Reviewed-by: Christian König # v1 Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220628191016.3899428-1-lucas.demarchi@intel.com include/linux/iosys-map.h | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) commit a6a87c36165e6791eeaed88025cde270536c3198 Author: Werner Sembach Date: Wed Jun 29 17:38:52 2022 -0700 Input: i8042 - add TUXEDO devices to i8042 quirk tables A lot of modern Clevo barebones have touchpad and/or keyboard issues after suspend fixable with nomux + reset + noloop + nopnp. Luckily, none of them have an external PS/2 port so this can safely be set for all of them. I'm not entirely sure if every device listed really needs all four quirks, but after testing and production use. No negative effects could be observed when setting all four. The list is quite massive as neither the TUXEDO nor the Clevo dmi strings have been very consistent historically. I tried to keep the list as short as possible without risking on missing an affected device. This is revision 3. The Clevo N150CU barebone is still removed as it might have problems with the fix and needs further investigations. The SchenkerTechnologiesGmbH System-/Board-Vendor string variations are added. This is now based in the quirk table refactor. This now also includes the additional noaux flag for the NS7xMU. Signed-off-by: Werner Sembach Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20220629112725.12922-5-wse@tuxedocomputers.com Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-x86ia64io.h | 129 ++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) commit 69c00695723d35ff3d25490b557799e238bcc0c3 Author: Werner Sembach Date: Wed Jun 29 17:38:33 2022 -0700 Input: i8042 - add debug output for quirks Make new quirk table easily debugable with some debug output. With no functional change, evaluation of i8042_reset_quirk and i8042_reset_never_quirk had to be moved for this. Signed-off-by: Werner Sembach Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20220629112725.12922-4-wse@tuxedocomputers.com Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-x86ia64io.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit ff946268a0813c35b790dfbe07c3bfaa7bfb869c Author: Werner Sembach Date: Wed Jun 29 17:38:07 2022 -0700 Input: i8042 - merge quirk tables Merge i8042 quirk tables to reduce code duplication for devices that need more than one quirk. Before every quirk had its own table with devices needing that quirk. If a new quirk needed to be added a new table had to be created. When a device needed multiple quirks, it appeared in multiple tables. Now only one table called i8042_dmi_quirk_table exists. In it every device has one entry and required quirks are coded in the .driver_data field of the struct dmi_system_id used by this table. Multiple quirks for one device can be applied by bitwise-or of the new SERIO_QUIRK_* defines. Also align quirkable options with command line parameters and make vendor wide quirks per device overwriteable on a per device basis. The first match is honored while following matches are ignored. So when a vendor wide quirk is defined in the table, a device can inserted before and therefore ignoring the vendor wide define. Signed-off-by: Werner Sembach Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20220629112725.12922-3-wse@tuxedocomputers.com Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-x86ia64io.h | 1100 ++++++++++++++++++--------------- 1 file changed, 595 insertions(+), 505 deletions(-) commit 95a9916c909f0b1d95e24b4232b4bc38ff755415 Author: Werner Sembach Date: Wed Jun 29 17:34:42 2022 -0700 Input: i8042 - move __initconst to fix code styling warning Move __intconst from before i8042_dmi_laptop_table[] to after it for consistent code styling. Signed-off-by: Werner Sembach Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20220629112725.12922-2-wse@tuxedocomputers.com Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-x86ia64io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24a9c54182b3758801b8ca6c8c237cc2ff654732 Author: Frederic Weisbecker Date: Wed Jun 8 16:40:24 2022 +0200 context_tracking: Split user tracking Kconfig Context tracking is going to be used not only to track user transitions but also idle/IRQs/NMIs. The user tracking part will then become a separate feature. Prepare Kconfig for that. [ frederic: Apply Max Filippov feedback. ] Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne .../time/context-tracking/arch-support.txt | 6 ++--- arch/Kconfig | 4 +-- arch/arm/Kconfig | 2 +- arch/arm/kernel/entry-common.S | 4 +-- arch/arm/kernel/entry-header.S | 4 +-- arch/arm64/Kconfig | 2 +- arch/csky/Kconfig | 2 +- arch/csky/kernel/entry.S | 4 +-- arch/loongarch/Kconfig | 2 +- arch/mips/Kconfig | 2 +- arch/powerpc/Kconfig | 2 +- arch/powerpc/include/asm/context_tracking.h | 2 +- arch/riscv/Kconfig | 2 +- arch/riscv/kernel/entry.S | 6 ++--- arch/sparc/Kconfig | 2 +- arch/sparc/kernel/rtrap_64.S | 2 +- arch/x86/Kconfig | 4 +-- arch/xtensa/Kconfig | 2 +- arch/xtensa/kernel/entry.S | 4 +-- include/linux/context_tracking.h | 12 ++++----- include/linux/context_tracking_state.h | 4 +-- init/Kconfig | 4 +-- kernel/context_tracking.c | 6 ++++- kernel/sched/core.c | 2 +- kernel/time/Kconfig | 31 ++++++++++++++-------- 25 files changed, 65 insertions(+), 52 deletions(-) commit 2a0aafce963dab996b843f6cdb49237b0ae4a118 Author: Frederic Weisbecker Date: Wed Jun 8 16:40:23 2022 +0200 context_tracking: Rename context_tracking_cpu_set() to ct_cpu_track_user() context_tracking_cpu_set() is called in order to tell a CPU to track user/kernel transitions. Since context tracking is going to expand in to also track transitions from/to idle/IRQ/NMIs, the scope of this function name becomes too broad and needs to be made more specific. Also shorten the prefix to align with the new namespace. Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne include/linux/context_tracking.h | 2 +- kernel/context_tracking.c | 4 ++-- kernel/time/tick-sched.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit fe98db1c6d1ad7349e61a5a2766ad64975bc9ae4 Author: Frederic Weisbecker Date: Wed Jun 8 16:40:22 2022 +0200 context_tracking: Rename context_tracking_enter/exit() to ct_user_enter/exit() context_tracking_enter() and context_tracking_exit() have confusing names that don't explain the fact they are referring to user/guest state. Use more self-explanatory names and shrink to the new context tracking prefix instead. Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne include/linux/context_tracking.h | 13 +++++++------ kernel/context_tracking.c | 12 ++++++------ 2 files changed, 13 insertions(+), 12 deletions(-) commit f163f0302ab69722c052519f4014814bf10026a9 Author: Frederic Weisbecker Date: Wed Jun 8 16:40:21 2022 +0200 context_tracking: Rename context_tracking_user_enter/exit() to user_enter/exit_callable() context_tracking_user_enter() and context_tracking_user_exit() are ASM callable versions of user_enter() and user_exit() for architectures that didn't manage to check the context tracking static key from ASM. Change those function names to better reflect their purpose. [ frederic: Apply Max Filippov feedback. ] Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne arch/arm/kernel/entry-header.S | 8 ++++---- arch/csky/kernel/entry.S | 4 ++-- arch/riscv/kernel/entry.S | 6 +++--- arch/xtensa/kernel/entry.S | 4 ++-- include/linux/context_tracking.h | 4 ++-- kernel/context_tracking.c | 28 +++++++++++++++++----------- 6 files changed, 30 insertions(+), 24 deletions(-) commit 5a059790afe8a6e11dbe45475eb45401ec9937ea Author: Ian Rogers Date: Wed Jun 29 11:25:05 2022 -0700 perf jevents: Remove jevents.c Remove files and build rules. Remove test for comparing with jevents.py as there is no longer a binary to compare with. Signed-off-by: Ian Rogers Tested-by: John Garry Cc: Alexander Shishkin Cc: Ananth Narayan Cc: Andi Kleen Cc: Andrew Kilroy Cc: Caleb Biggers Cc: Felix Fietkau Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Like Xu Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Nick Forrington Cc: Paul Clarke Cc: Perry Taylor Cc: Peter Zijlstra Cc: Qi Liu Cc: Ravi Bangoria Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20220629182505.406269-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 21 +- tools/perf/pmu-events/Build | 4 - tools/perf/pmu-events/jevents-test.sh | 33 - tools/perf/pmu-events/jevents.c | 1342 --------------------------------- tools/perf/pmu-events/jsmn.c | 352 --------- tools/perf/pmu-events/jsmn.h | 68 -- tools/perf/pmu-events/json.c | 162 ---- tools/perf/pmu-events/json.h | 39 - 8 files changed, 2 insertions(+), 2019 deletions(-) commit 00facc760903be6675870c2749e2cd72140e396e Author: Ian Rogers Date: Wed Jun 29 11:25:04 2022 -0700 perf jevents: Switch build to use jevents.py Generate pmu-events.c using jevents.py rather than the binary built from jevents.c. Add a new config variable NO_JEVENTS that is set when there is no architecture json or an appropriate python interpreter isn't present. When NO_JEVENTS is defined the file pmu-events/empty-pmu-events.c is copied and used as the pmu-events.c file. Signed-off-by: Ian Rogers Tested-by: John Garry Cc: Alexander Shishkin Cc: Ananth Narayan Cc: Andi Kleen Cc: Andrew Kilroy Cc: Caleb Biggers Cc: Felix Fietkau Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Like Xu Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Nick Forrington Cc: Paul Clarke Cc: Perry Taylor Cc: Peter Zijlstra Cc: Qi Liu Cc: Ravi Bangoria Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20220629182505.406269-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 19 ++++ tools/perf/Makefile.perf | 1 + tools/perf/pmu-events/Build | 13 ++- tools/perf/pmu-events/empty-pmu-events.c | 158 +++++++++++++++++++++++++++++++ 4 files changed, 189 insertions(+), 2 deletions(-) commit ffc606ada3d7d8b200a27fc0c3a1cf0e000d75b2 Author: Ian Rogers Date: Wed Jun 29 11:25:03 2022 -0700 perf jevents: Add python converter script jevents.c is large, has a dependency on an old forked version of jsmn, and is challenging to work upon. A lot of jevents.c's complexity comes from needing to write json and csv parsing from first principles. In contrast python has this functionality in standard libraries and is already a build pre-requisite for tools like asciidoc (that builds all of the perf man pages). Introduce jevents.py that produces identical output to jevents.c. Add a test that runs both converter tools and validates there are no output differences. The test can be invoked with a phony build target like: $ make -C tools/perf jevents-py-test The python code deliberately tries to replicate the behavior of jevents.c so that the output matches and transitioning tools shouldn't introduce regressions. In some cases the code isn't as elegant as hoped, but fixing this can be done as follow up. Committer testing: $ make -C tools/perf jevents-py-test make: Entering directory '/var/home/acme/git/perf/tools/perf' BUILD: Doing 'make -j32' parallel build HOSTCC fixdep.o HOSTLD fixdep-in.o LINK fixdep 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: [ OFF ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... libaio: [ on ] ... libzstd: [ on ] ... disassembler-four-args: [ on ] HOSTCC pmu-events/json.o HOSTCC pmu-events/jsmn.o HOSTCC pmu-events/jevents.o HOSTLD pmu-events/jevents-in.o LINK pmu-events/jevents Checking architecture: arm64 Generating using jevents.c Generating using jevents.py Diffing Checking architecture: nds32 Generating using jevents.c Generating using jevents.py Diffing Checking architecture: powerpc Generating using jevents.c Generating using jevents.py Diffing Checking architecture: s390 Generating using jevents.c Generating using jevents.py Diffing Checking architecture: x86 Generating using jevents.c Generating using jevents.py Diffing make: Leaving directory '/var/home/acme/git/perf/tools/perf' $ Signed-off-by: Ian Rogers Tested-by: John Garry Tested-by: Thomas Richter Tested-by: Xing Zhengjun Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ananth Narayan Cc: Andi Kleen Cc: Andrew Kilroy Cc: Caleb Biggers Cc: Felix Fietkau Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Like Xu Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Nick Forrington Cc: Paul Clarke Cc: Perry Taylor Cc: Peter Zijlstra Cc: Qi Liu Cc: Ravi Bangoria Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Cc: Will Deacon Link: https://lore.kernel.org/r/20220629182505.406269-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 6 + tools/perf/pmu-events/jevents-test.sh | 33 +++ tools/perf/pmu-events/jevents.py | 409 ++++++++++++++++++++++++++++++++++ 3 files changed, 448 insertions(+) commit f0cf642c56b76dfbbb5f2be67fa180191d5ab0ef Author: Quentin Monnet Date: Wed Jun 29 12:13:51 2022 +0100 bpftool: Probe for memcg-based accounting before bumping rlimit Bpftool used to bump the memlock rlimit to make sure to be able to load BPF objects. After the kernel has switched to memcg-based memory accounting [0] in 5.11, bpftool has relied on libbpf to probe the system for memcg-based accounting support and for raising the rlimit if necessary [1]. But this was later reverted, because the probe would sometimes fail, resulting in bpftool not being able to load all required objects [2]. Here we add a more efficient probe, in bpftool itself. We first lower the rlimit to 0, then we attempt to load a BPF object (and finally reset the rlimit): if the load succeeds, then memcg-based memory accounting is supported. This approach was earlier proposed for the probe in libbpf itself [3], but given that the library may be used in multithreaded applications, the probe could have undesirable consequences if one thread attempts to lock kernel memory while memlock rlimit is at 0. Since bpftool is single-threaded and the rlimit is process-based, this is fine to do in bpftool itself. This probe was inspired by the similar one from the cilium/ebpf Go library [4]. [0] commit 97306be45fbe ("Merge branch 'switch to memcg-based memory accounting'") [1] commit a777e18f1bcd ("bpftool: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK") [2] commit 6b4384ff1088 ("Revert "bpftool: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK"") [3] https://lore.kernel.org/bpf/20220609143614.97837-1-quentin@isovalent.com/t/#u [4] https://github.com/cilium/ebpf/blob/v0.9.0/rlimit/rlimit.go#L39 Suggested-by: Daniel Borkmann Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Reviewed-by: Stanislav Fomichev Acked-by: Yafang Shao Link: https://lore.kernel.org/bpf/20220629111351.47699-1-quentin@isovalent.com tools/bpf/bpftool/common.c | 71 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 3 deletions(-) commit 4c41cb46a732fe82575df0015b7d0d8a52efb59b Author: Ian Rogers Date: Wed Jun 29 11:25:02 2022 -0700 perf python: Prefer python3 The PYTHON_AUTO code orders the preference for the PYTHON command to be python3, python and then python2. python3 makes a more logical preference as python2 is no longer supported: https://www.python.org/doc/sunset-python-2/ Reorder the priority of the PYTHON command to be python2, python and then python3. Reported-by: John Garry Signed-off-by: Ian Rogers Tested-by: John Garry Tested-by: Thomas Richter Tested-by: Xing Zhengjun Cc: Alexander Shishkin Cc: Ananth Narayan Cc: Andi Kleen Cc: Andrew Kilroy Cc: Caleb Biggers Cc: Felix Fietkau Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Kshipra Bopardikar Cc: Like Xu Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Nick Forrington Cc: Paul Clarke Cc: Perry Taylor Cc: Peter Zijlstra Cc: Qi Liu Cc: Ravi Bangoria Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Cc: Will Deacon Link: https://lore.kernel.org/r/20220629182505.406269-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c5cb2cdf23ceefd9ef319d6c0d6ac294dfe356b6 Author: Chandan Vurdigere Nataraj Date: Sun Jun 26 15:41:44 2022 +0530 drm/amd/display: Re-org and cleanup the redundant code [Why] Redundant if-else cases for repeater and non-repeater checks [How] Without changing the core logic, rearranged the code by removing redundant checks Signed-off-by: Chandan Vurdigere Nataraj Reviewed-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit ff15cea338d2c78e0086d55c8a9dd637a5dd3ccc Author: Aurabindo Pillai Date: Tue Jun 28 16:25:28 2022 -0400 drm/amd/display: expose additional modifier for DCN32/321 [Why&How] Some userspace expect a backwards compatible modifier on DCN32/321. For hardware with num_pipes more than 16, we expose the most efficient modifier first. As a fall back method, we need to expose slightly inefficient modifier AMD_FMT_MOD_TILE_GFX9_64K_R_X after the best option. Also set the number of packers to fixed value as required per hardware documentation. This value is cached during hardware initialization and can be read through the base driver. Signed-off-by: Aurabindo Pillai Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 3 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 66 ++++++++++++----------- 2 files changed, 36 insertions(+), 33 deletions(-) commit 7268f0a9e842c52fa73b9f5afc1bebcf9f7d48b7 Author: Aurabindo Pillai Date: Tue Jun 28 15:07:16 2022 -0400 drm/amd: Load TA firmware for DCN321/DCN32 [Why&How] TA firmware is needed to enable HDCP. Changes in v2: Load separate firmware for PSP 13.0.0 Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 46d44516aa6e142fd70287e829e3bbad0d2ed35b Author: Mauro Carvalho Chehab Date: Tue Jun 28 10:46:15 2022 +0100 drm/amd/amd_shared.h: Add missing doc for PP_GFX_DCS_MASK This symbol is missing documentation: drivers/gpu/drm/amd/include/amd_shared.h:224: warning: Enum value 'PP_GFX_DCS_MASK' not described in enum 'PP_FEATURE_MASK' Document it. Fixes: 680602d6c2d6 ("drm/amd/pm: enable DCS") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/amd_shared.h | 1 + 1 file changed, 1 insertion(+) commit 2639d3e44f9c15b3f29f79943ed58f769faeaef2 Author: Mauro Carvalho Chehab Date: Tue Jun 28 10:46:13 2022 +0100 drm/amdgpu/amdgpu_dm: fix kernel-doc markups There are 4 undocumented fields at struct amdgpu_display_manager. Add documentation for them, fixing those warnings: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:544: warning: Function parameter or member 'dmub_outbox_params' not described in 'amdgpu_display_manager' drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:544: warning: Function parameter or member 'num_of_edps' not described in 'amdgpu_display_manager' drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:544: warning: Function parameter or member 'disable_hpd_irq' not described in 'amdgpu_display_manager' drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:544: warning: Function parameter or member 'dmub_aux_transfer_done' not described in 'amdgpu_display_manager' drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:544: warning: Function parameter or member 'delayed_hpd_wq' not described in 'amdgpu_display_manager' Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 01752681f1ee5febc9dd2da23f5dc0289ea125a6 Author: Tom Rix Date: Sun Jun 26 10:46:15 2022 -0400 drm/amd/display: change to_dal_irq_source_dnc32() storage class specifier to static sparse reports drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn32/irq_service_dcn32.c:39:20: warning: symbol 'to_dal_irq_source_dcn32' was not declared. Should it be static? to_dal_irq_source_dnc32() is only referenced in irq_service_dnc32.c, so change its storage class specifier to static. Fixes: 0efd4374f6b4 ("drm/amd/display: add dcn32 IRQ changes") Reviewed-by: Aurabindo Pillai Signed-off-by: Tom Rix Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/irq/dcn32/irq_service_dcn32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef314d213dd57af1454b32fdd332223f41d03833 Merge: 2d5a64707aa0 0b9431c8221c Author: Rob Herring Date: Wed Jun 29 15:11:43 2022 -0600 Merge branch 'dt/linus' into dt/next Pull in the binding fixes so we don't have all the warnings. commit 70f1fcbc83582419fd753701c5abe674e05db785 Author: Tom Rix Date: Sun Jun 26 10:20:53 2022 -0400 drm/amd/display: Remove unused globals FORCE_RATE and FORCE_LANE_COUNT sparse reports drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:3885:6: warning: symbol 'FORCE_RATE' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:3886:10: warning: symbol 'FORCE_LANE_COUNT' was not declared. Should it be static? Neither of thse variables is used in dc_link_dp.c. Reviewing the commit listed in the fixes tag shows neither was used in the original patch. So remove them. Fixes: 265280b99822 ("drm/amd/display: add CLKMGR changes for DCN32/321") Reviewed-by: Aurabindo Pillai Signed-off-by: Tom Rix Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 3 --- 1 file changed, 3 deletions(-) commit 7bb97c5a39ecebc8ff5db1491fe4e7a8129f93d5 Author: Alex Deucher Date: Thu Jun 23 12:34:18 2022 -0400 drm/amdgpu/display: drop set but unused variable No longer used so drop it. Fixes: ec457f837890 ("drm/amd/display: Drop unnecessary detect link code") Reported-by: kernel test robot Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 -- 1 file changed, 2 deletions(-) commit d193b12b2fa6dc316e3ee8871b4ec05992bcb7b1 Author: Kent Russell Date: Tue Jun 28 10:40:59 2022 -0400 drm/amdgpu: Fix typos in amdgpu_stop_pending_resets Change amdggpu to amdgpu and pedning to pending Signed-off-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d5a64707aa0c97c1aa5533234afd4aa1d99040c Author: Rob Herring Date: Mon Jun 6 13:49:44 2022 -0500 media: dt-bindings: Convert gpio-ir-receiver to DT schema Convert the gpio-ir-receiver binding to DT schema format. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220606184944.1067068-2-robh@kernel.org .../devicetree/bindings/media/gpio-ir-receiver.txt | 20 ----------- .../bindings/media/gpio-ir-receiver.yaml | 40 ++++++++++++++++++++++ 2 files changed, 40 insertions(+), 20 deletions(-) commit 0b58162e1207db5052d1fadd5a16eeb90720d765 Author: Souptick Joarder (HPE) Date: Sat Jun 25 07:11:57 2022 +0530 drm/amd/display: Removed unused variable ret Kernel test robot throws below warning -> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c: In function 'dc_link_reduce_mst_payload': drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:3782:32: warning: variable 'ret' set but not used [-Wunused-but-set-variable] 3782 | enum act_return_status ret; Removed the unused ret variable. Reported-by: kernel test robot Signed-off-by: Souptick Joarder (HPE) Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 864138ab0e09d241c704a851aaddc29d997e45db Author: Rob Herring Date: Mon Jun 6 13:49:43 2022 -0500 media: dt-bindings: rc: Allow 'ir-receiver' node names Most existing 'gpio-ir-receiver' nodes use 'ir-receiver' for their node name, so add it as an allowed node name. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220606184944.1067068-1-robh@kernel.org Documentation/devicetree/bindings/media/rc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79398d24da4c9294285bdedf67018ff09fe97bdc Author: Vinay Belgaumkar Date: Mon Jun 27 16:03:46 2022 -0700 drm/i915/guc/slpc: Add a new SLPC selftest This test will validate we can achieve actual frequency of RP0. Pcode grants frequencies based on what GuC is requesting. However, thermal throttling can limit what is being granted. Add a test to request for max, but don't fail the test if RP0 is not granted due to throttle reasons. Also optimize the selftest by using a common run_test function to avoid code duplication. Rename the "clamp" tests to vary_max_freq and vary_min_freq. v2: Fix compile warning v3: Review comments (Ashutosh). Added a FIXME for the media RP0 case. v4: Checkpatch (strict) fixes, remove FIXME and other comments (Ashutosh) Fixes commit 8ee2c227822e ("drm/i915/guc/slpc: Add SLPC selftest") Cc: Ashutosh Dixit Signed-off-by: Vinay Belgaumkar Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20220627230346.27720-1-vinay.belgaumkar@intel.com drivers/gpu/drm/i915/gt/selftest_slpc.c | 323 +++++++++++++++----------------- 1 file changed, 155 insertions(+), 168 deletions(-) commit d17b557e5eadc9a74bd55191a54841b460c115b7 Merge: c5c7358e4c76 dca85aac8895 Author: Alexei Starovoitov Date: Wed Jun 29 13:21:53 2022 -0700 Merge branch 'bpf: cgroup_sock lsm flavor' Stanislav Fomichev says: ==================== This series implements new lsm flavor for attaching per-cgroup programs to existing lsm hooks. The cgroup is taken out of 'current', unless the first argument of the hook is 'struct socket'. In this case, the cgroup association is taken out of socket. The attachment looks like a regular per-cgroup attachment: we add new BPF_LSM_CGROUP attach type which, together with attach_btf_id, signals per-cgroup lsm. Behind the scenes, we allocate trampoline shim program and attach to lsm. This program looks up cgroup from current/socket and runs cgroup's effective prog array. The rest of the per-cgroup BPF stays the same: hierarchy, local storage, retval conventions (return 1 == success). Current limitations: * haven't considered sleepable bpf; can be extended later on * not sure the verifier does the right thing with null checks; see latest selftest for details * total of 10 (global) per-cgroup LSM attach points v11: - Martin: address selftest memory & fd leaks - Martin: address moving into root (instead have another temp leaf cgroup) - Martin: move tools/include/uapi/linux/bpf.h change from libbpf patch into 'sync tools' patch v10: - Martin: reword commit message, drop outdated items - Martin: remove rcu_real_lock from __cgroup_bpf_run_lsm_current - Martin: remove CONFIG_BPF_LSM from cgroup_bpf_release - Martin: fix leaking shim reference in bpf_cgroup_link_release - Martin: WARN_ON_ONCE for bpf_trampoline_lookup in bpf_trampoline_unlink_cgroup_shim - Martin: sync tools/include/linux/btf_ids.h - Martin: move progs/flags closer to the places where they are used in __cgroup_bpf_query - Martin: remove sk_clone_security & sctp_bind_connect from bpf_lsm_locked_sockopt_hooks - Martin: try to determine vmlinux btf_id in bpftool - Martin: update tools header in a separate commit - Quentin: do libbpf_find_kernel_btf from the ops that need it - lkp@intel.com: another build failure v9: Major change since last version is the switch to bpf_setsockopt to change the socket state instead of letting the progs poke socket directly. This, in turn, highlights the challenge that we need to care about whether the socket is locked or not when we call bpf_setsockopt. (with my original example selftest, the hooks are running early in the init phase for this not to matter). For now, I've added two btf id lists: * hooks where we know the socket is locked and it's safe to call bpf_setsockopt * hooks where we know the socket is _not_ locked, but the hook works on the socket that's not yet exposed to userspace so it should be safe (for this mode, special new set of bpf_{s,g}etsockopt helpers is added; they don't have sock_owned_by_me check) Going forward, for the rest of the hooks, this might be a good motivation to expand lsm cgroup to support sleeping bpf and allow the callers to lock/unlock sockets or have a new bpf_setsockopt variant that does the locking. - ifdef around cleanup in cgroup_bpf_release - Andrii: a few nits in libbpf patches - Martin: remove unused btf_id_set_index - Martin: bring back refcnt for cgroup_atype - Martin: make __cgroup_bpf_query a bit more readable - Martin: expose dst_prog->aux->attach_btf as attach_btf_obj_id as well - Martin: reorg check_return_code path for BPF_LSM_CGROUP - Martin: return directly from check_helper_call (instead of goto err) - Martin: add note to new warning in check_return_code, print only for void hooks - Martin: remove confusing shim reuse - Martin: use bpf_{s,g}etsockopt instead of poking into socket data - Martin: use CONFIG_CGROUP_BPF in bpf_prog_alloc_no_stats/bpf_prog_free_deferred v8: - CI: fix compile issue - CI: fix broken bpf_cookie - Yonghong: remove __bpf_trampoline_unlink_prog comment - Yonghong: move cgroup_atype around to fill the gap - Yonghong: make bpf_lsm_find_cgroup_shim void - Yonghong: rename regs to args - Yonghong: remove if(current) check - Martin: move refcnt into bpf_link - Martin: move shim management to bpf_link ops - Martin: use cgroup_atype for shim only - Martin: go back to arrays for managing cgroup_atype(s) - Martin: export bpf_obj_id(aux->attach_btf) - Andrii: reorder SEC_DEF("lsm_cgroup+") - Andrii: OPTS_SET instead of OPTS_HAS - Andrii: rename attach_btf_func_id - Andrii: move into 1.0 map v7: - there were a lot of comments last time, hope I didn't forget anything, some of the bigger ones: - Martin: use/extend BTF_SOCK_TYPE_SOCKET - Martin: expose bpf_set_retval - Martin: reject 'return 0' at the verifier for 'void' hooks - Martin: prog_query returns all BPF_LSM_CGROUP, prog_info returns attach_btf_func_id - Andrii: split libbpf changes - Andrii: add field access test to test_progs, not test_verifier (still using asm though) - things that I haven't addressed, stating them here explicitly, let me know if some of these are still problematic: 1. Andrii: exposing only link-based api: seems like the changes to support non-link-based ones are minimal, couple of lines, so seems like it worth having it? 2. Alexei: applying cgroup_atype for all cgroup hooks, not only cgroup lsm: looks a bit harder to apply everywhere that I originally thought; with lsm cgroup, we have a shim_prog pointer where we store cgroup_atype; for non-lsm programs, we don't have a trace program where to store it, so we still need some kind of global table to map from "static" hook to "dynamic" slot. So I'm dropping this "can be easily extended" clause from the description for now. I have converted this whole machinery to an RCU-managed list to remove synchronize_rcu(). - also note that I had to introduce new bpf_shim_tramp_link and moved refcnt there; we need something to manage new bpf_tramp_link v6: - remove active count & stats for shim program (Martin KaFai Lau) - remove NULL/error check for btf_vmlinux (Martin) - don't check cgroup_atype in bpf_cgroup_lsm_shim_release (Martin) - use old_prog (instead of passed one) in __cgroup_bpf_detach (Martin) - make sure attach_btf_id is the same in __cgroup_bpf_replace (Martin) - enable cgroup local storage and test it (Martin) - properly implement prog query and add bpftool & tests (Martin) - prohibit non-shared cgroup storage mode for BPF_LSM_CGROUP (Martin) v5: - __cgroup_bpf_run_lsm_socket remove NULL sock/sk checks (Martin KaFai Lau) - __cgroup_bpf_run_lsm_{socket,current} s/prog/shim_prog/ (Martin) - make sure bpf_lsm_find_cgroup_shim works for hooks without args (Martin) - __cgroup_bpf_attach make sure attach_btf_id is the same when replacing (Martin) - call bpf_cgroup_lsm_shim_release only for LSM_CGROUP (Martin) - drop BPF_LSM_CGROUP from bpf_attach_type_to_tramp (Martin) - drop jited check from cgroup_shim_find (Martin) - new patch to convert cgroup_bpf to hlist_node (Jakub Sitnicki) - new shim flavor for 'struct sock' + list of exceptions (Martin) v4: - fix build when jit is on but syscall is off v3: - add BPF_LSM_CGROUP to bpftool - use simple int instead of refcnt_t (to avoid use-after-free false positive) v2: - addressed build bot failures ==================== Signed-off-by: Alexei Starovoitov commit dca85aac8895708b74c7f2264e3ab5048c02b8b2 Author: Stanislav Fomichev Date: Tue Jun 28 10:43:14 2022 -0700 selftests/bpf: lsm_cgroup functional test Functional test that exercises the following: 1. apply default sk_priority policy 2. permit TX-only AF_PACKET socket 3. cgroup attach/detach/replace 4. reusing trampoline shim Signed-off-by: Stanislav Fomichev Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20220628174314.1216643-12-sdf@google.com Signed-off-by: Alexei Starovoitov .../testing/selftests/bpf/prog_tests/lsm_cgroup.c | 293 +++++++++++++++++++++ .../testing/selftests/bpf/progs/bpf_tracing_net.h | 1 + tools/testing/selftests/bpf/progs/lsm_cgroup.c | 180 +++++++++++++ 3 files changed, 474 insertions(+) commit 596f5fb2ea2a38032abb8043606ce7168f21f6ab Author: Stanislav Fomichev Date: Tue Jun 28 10:43:13 2022 -0700 bpftool: implement cgroup tree for BPF_LSM_CGROUP $ bpftool --nomount prog loadall $KDIR/tools/testing/selftests/bpf/lsm_cgroup.o /sys/fs/bpf/x $ bpftool cgroup attach /sys/fs/cgroup lsm_cgroup pinned /sys/fs/bpf/x/socket_alloc $ bpftool cgroup attach /sys/fs/cgroup lsm_cgroup pinned /sys/fs/bpf/x/socket_bind $ bpftool cgroup attach /sys/fs/cgroup lsm_cgroup pinned /sys/fs/bpf/x/socket_clone $ bpftool cgroup attach /sys/fs/cgroup lsm_cgroup pinned /sys/fs/bpf/x/socket_post_create $ bpftool cgroup tree CgroupPath ID AttachType AttachFlags Name /sys/fs/cgroup 6 lsm_cgroup socket_post_create bpf_lsm_socket_post_create 8 lsm_cgroup socket_bind bpf_lsm_socket_bind 10 lsm_cgroup socket_alloc bpf_lsm_sk_alloc_security 11 lsm_cgroup socket_clone bpf_lsm_inet_csk_clone $ bpftool cgroup detach /sys/fs/cgroup lsm_cgroup pinned /sys/fs/bpf/x/socket_post_create $ bpftool cgroup tree CgroupPath ID AttachType AttachFlags Name /sys/fs/cgroup 8 lsm_cgroup socket_bind bpf_lsm_socket_bind 10 lsm_cgroup socket_alloc bpf_lsm_sk_alloc_security 11 lsm_cgroup socket_clone bpf_lsm_inet_csk_clone Reviewed-by: Quentin Monnet Acked-by: Martin KaFai Lau Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20220628174314.1216643-11-sdf@google.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/cgroup.c | 109 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 87 insertions(+), 22 deletions(-) commit a4b2f3cf699f8ec3964722e7ef3f37f809701172 Author: Stanislav Fomichev Date: Tue Jun 28 10:43:12 2022 -0700 libbpf: implement bpf_prog_query_opts Implement bpf_prog_query_opts as a more expendable version of bpf_prog_query. Expose new prog_attach_flags and attach_btf_func_id as well: * prog_attach_flags is a per-program attach_type; relevant only for lsm cgroup program which might have different attach_flags per attach_btf_id * attach_btf_func_id is a new field expose for prog_query which specifies real btf function id for lsm cgroup attachments Acked-by: Martin KaFai Lau Acked-by: Andrii Nakryiko Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20220628174314.1216643-10-sdf@google.com Signed-off-by: Alexei Starovoitov tools/lib/bpf/bpf.c | 38 +++++++++++++++++++++++++++++++------- tools/lib/bpf/bpf.h | 15 +++++++++++++++ tools/lib/bpf/libbpf.map | 1 + 3 files changed, 47 insertions(+), 7 deletions(-) commit bffcf34878b1c16c322c6606e4a48d82bd5f7f24 Author: Stanislav Fomichev Date: Tue Jun 28 10:43:11 2022 -0700 libbpf: add lsm_cgoup_sock type lsm_cgroup/ is the prefix for BPF_LSM_CGROUP. Acked-by: Martin KaFai Lau Acked-by: Andrii Nakryiko Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20220628174314.1216643-9-sdf@google.com Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 3 +++ 1 file changed, 3 insertions(+) commit 3b34bcb946c2a8240ef6761be2ee404ceb7e1079 Author: Stanislav Fomichev Date: Tue Jun 28 10:43:10 2022 -0700 tools/bpf: Sync btf_ids.h to tools Has been slowly getting out of sync, let's update it. resolve_btfids usage has been updated to match the header changes. Also bring new parts of tools/include/uapi/linux/bpf.h. Acked-by: Martin KaFai Lau Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20220628174314.1216643-8-sdf@google.com Signed-off-by: Alexei Starovoitov tools/include/linux/btf_ids.h | 35 +++++++++++++++++----- tools/include/uapi/linux/bpf.h | 3 ++ .../selftests/bpf/prog_tests/resolve_btfids.c | 2 +- 3 files changed, 32 insertions(+), 8 deletions(-) commit 9113d7e48e9128522b9f5a54dfd30dff10509a92 Author: Stanislav Fomichev Date: Tue Jun 28 10:43:09 2022 -0700 bpf: expose bpf_{g,s}etsockopt to lsm cgroup I don't see how to make it nice without introducing btf id lists for the hooks where these helpers are allowed. Some LSM hooks work on the locked sockets, some are triggering early and don't grab any locks, so have two lists for now: 1. LSM hooks which trigger under socket lock - minority of the hooks, but ideal case for us, we can expose existing BTF-based helpers 2. LSM hooks which trigger without socket lock, but they trigger early in the socket creation path where it should be safe to do setsockopt without any locks 3. The rest are prohibited. I'm thinking that this use-case might be a good gateway to sleeping lsm cgroup hooks in the future. We can either expose lock/unlock operations (and add tracking to the verifier) or have another set of bpf_setsockopt wrapper that grab the locks and might sleep. Reviewed-by: Martin KaFai Lau Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20220628174314.1216643-7-sdf@google.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 2 ++ kernel/bpf/bpf_lsm.c | 38 +++++++++++++++++++++++++++++++++ net/core/filter.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 93 insertions(+), 7 deletions(-) commit b79c9fc9551b45953a94abf550b7bd3b00e3a0f9 Author: Stanislav Fomichev Date: Tue Jun 28 10:43:08 2022 -0700 bpf: implement BPF_PROG_QUERY for BPF_LSM_CGROUP We have two options: 1. Treat all BPF_LSM_CGROUP the same, regardless of attach_btf_id 2. Treat BPF_LSM_CGROUP+attach_btf_id as a separate hook point I was doing (2) in the original patch, but switching to (1) here: * bpf_prog_query returns all attached BPF_LSM_CGROUP programs regardless of attach_btf_id * attach_btf_id is exported via bpf_prog_info Reviewed-by: Martin KaFai Lau Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20220628174314.1216643-6-sdf@google.com Signed-off-by: Alexei Starovoitov include/uapi/linux/bpf.h | 3 ++ kernel/bpf/cgroup.c | 95 ++++++++++++++++++++++++++++++++---------------- kernel/bpf/syscall.c | 8 +++- 3 files changed, 74 insertions(+), 32 deletions(-) commit c0e19f2c9a3edd38e4b1bdae98eb44555d02bc31 Author: Stanislav Fomichev Date: Tue Jun 28 10:43:07 2022 -0700 bpf: minimize number of allocated lsm slots per program Previous patch adds 1:1 mapping between all 211 LSM hooks and bpf_cgroup program array. Instead of reserving a slot per possible hook, reserve 10 slots per cgroup for lsm programs. Those slots are dynamically allocated on demand and reclaimed. struct cgroup_bpf { struct bpf_prog_array * effective[33]; /* 0 264 */ /* --- cacheline 4 boundary (256 bytes) was 8 bytes ago --- */ struct hlist_head progs[33]; /* 264 264 */ /* --- cacheline 8 boundary (512 bytes) was 16 bytes ago --- */ u8 flags[33]; /* 528 33 */ /* XXX 7 bytes hole, try to pack */ struct list_head storages; /* 568 16 */ /* --- cacheline 9 boundary (576 bytes) was 8 bytes ago --- */ struct bpf_prog_array * inactive; /* 584 8 */ struct percpu_ref refcnt; /* 592 16 */ struct work_struct release_work; /* 608 72 */ /* size: 680, cachelines: 11, members: 7 */ /* sum members: 673, holes: 1, sum holes: 7 */ /* last cacheline: 40 bytes */ }; Reviewed-by: Martin KaFai Lau Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20220628174314.1216643-5-sdf@google.com Signed-off-by: Alexei Starovoitov include/linux/bpf-cgroup-defs.h | 3 ++- include/linux/bpf.h | 9 +++++++- include/linux/bpf_lsm.h | 6 ------ kernel/bpf/bpf_lsm.c | 5 ----- kernel/bpf/btf.c | 10 --------- kernel/bpf/cgroup.c | 47 ++++++++++++++++++++++++++++++++++++++++- kernel/bpf/core.c | 7 ++++++ kernel/bpf/trampoline.c | 1 + 8 files changed, 64 insertions(+), 24 deletions(-) commit 69fd337a975c7e690dfe49d9cb4fe5ba1e6db44e Author: Stanislav Fomichev Date: Tue Jun 28 10:43:06 2022 -0700 bpf: per-cgroup lsm flavor Allow attaching to lsm hooks in the cgroup context. Attaching to per-cgroup LSM works exactly like attaching to other per-cgroup hooks. New BPF_LSM_CGROUP is added to trigger new mode; the actual lsm hook we attach to is signaled via existing attach_btf_id. For the hooks that have 'struct socket' or 'struct sock' as its first argument, we use the cgroup associated with that socket. For the rest, we use 'current' cgroup (this is all on default hierarchy == v2 only). Note that for some hooks that work on 'struct sock' we still take the cgroup from 'current' because some of them work on the socket that hasn't been properly initialized yet. Behind the scenes, we allocate a shim program that is attached to the trampoline and runs cgroup effective BPF programs array. This shim has some rudimentary ref counting and can be shared between several programs attaching to the same lsm hook from different cgroups. Note that this patch bloats cgroup size because we add 211 cgroup_bpf_attach_type(s) for simplicity sake. This will be addressed in the subsequent patch. Also note that we only add non-sleepable flavor for now. To enable sleepable use-cases, bpf_prog_run_array_cg has to grab trace rcu, shim programs have to be freed via trace rcu, cgroup_bpf.effective should be also trace-rcu-managed + maybe some other changes that I'm not aware of. Reviewed-by: Martin KaFai Lau Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20220628174314.1216643-4-sdf@google.com Signed-off-by: Alexei Starovoitov arch/x86/net/bpf_jit_comp.c | 24 +++-- include/linux/bpf-cgroup-defs.h | 8 ++ include/linux/bpf-cgroup.h | 7 ++ include/linux/bpf.h | 24 +++++ include/linux/bpf_lsm.h | 13 +++ include/linux/btf_ids.h | 3 +- include/uapi/linux/bpf.h | 1 + kernel/bpf/bpf_lsm.c | 48 ++++++++++ kernel/bpf/btf.c | 11 +++ kernel/bpf/cgroup.c | 136 ++++++++++++++++++++++++--- kernel/bpf/core.c | 2 + kernel/bpf/syscall.c | 10 ++ kernel/bpf/trampoline.c | 198 ++++++++++++++++++++++++++++++++++++++++ kernel/bpf/verifier.c | 32 +++++++ tools/include/uapi/linux/bpf.h | 1 + 15 files changed, 498 insertions(+), 20 deletions(-) commit 00442143a2ab7f1da46fbf4d2a99c85df767d49a Author: Stanislav Fomichev Date: Tue Jun 28 10:43:05 2022 -0700 bpf: convert cgroup_bpf.progs to hlist This lets us reclaim some space to be used by new cgroup lsm slots. Before: struct cgroup_bpf { struct bpf_prog_array * effective[23]; /* 0 184 */ /* --- cacheline 2 boundary (128 bytes) was 56 bytes ago --- */ struct list_head progs[23]; /* 184 368 */ /* --- cacheline 8 boundary (512 bytes) was 40 bytes ago --- */ u32 flags[23]; /* 552 92 */ /* XXX 4 bytes hole, try to pack */ /* --- cacheline 10 boundary (640 bytes) was 8 bytes ago --- */ struct list_head storages; /* 648 16 */ struct bpf_prog_array * inactive; /* 664 8 */ struct percpu_ref refcnt; /* 672 16 */ struct work_struct release_work; /* 688 32 */ /* size: 720, cachelines: 12, members: 7 */ /* sum members: 716, holes: 1, sum holes: 4 */ /* last cacheline: 16 bytes */ }; After: struct cgroup_bpf { struct bpf_prog_array * effective[23]; /* 0 184 */ /* --- cacheline 2 boundary (128 bytes) was 56 bytes ago --- */ struct hlist_head progs[23]; /* 184 184 */ /* --- cacheline 5 boundary (320 bytes) was 48 bytes ago --- */ u8 flags[23]; /* 368 23 */ /* XXX 1 byte hole, try to pack */ /* --- cacheline 6 boundary (384 bytes) was 8 bytes ago --- */ struct list_head storages; /* 392 16 */ struct bpf_prog_array * inactive; /* 408 8 */ struct percpu_ref refcnt; /* 416 16 */ struct work_struct release_work; /* 432 72 */ /* size: 504, cachelines: 8, members: 7 */ /* sum members: 503, holes: 1, sum holes: 1 */ /* last cacheline: 56 bytes */ }; Suggested-by: Jakub Sitnicki Reviewed-by: Jakub Sitnicki Reviewed-by: Martin KaFai Lau Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20220628174314.1216643-3-sdf@google.com Signed-off-by: Alexei Starovoitov include/linux/bpf-cgroup-defs.h | 4 +-- include/linux/bpf-cgroup.h | 2 +- kernel/bpf/cgroup.c | 76 ++++++++++++++++++++++++----------------- 3 files changed, 47 insertions(+), 35 deletions(-) commit af3f4134006bf3bf894179c08aaf98ed5938cf4e Author: Stanislav Fomichev Date: Tue Jun 28 10:43:04 2022 -0700 bpf: add bpf_func_t and trampoline helpers I'll be adding lsm cgroup specific helpers that grab trampoline mutex. No functional changes. Reviewed-by: Martin KaFai Lau Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20220628174314.1216643-2-sdf@google.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 11 ++++----- kernel/bpf/trampoline.c | 63 ++++++++++++++++++++++++++----------------------- 2 files changed, 38 insertions(+), 36 deletions(-) commit a578cc3af5cea5c7a912d2cfb8601875eb8ce451 Author: Tom Rix Date: Wed Jun 29 15:20:45 2022 -0400 power: reset: pwr-mlxbf: change rst_pwr_hid and low_pwr_hid from global to local variables sparse reports drivers/power/reset/pwr-mlxbf.c:19:12: warning: symbol 'rst_pwr_hid' was not declared. Should it be static? drivers/power/reset/pwr-mlxbf.c:20:12: warning: symbol 'low_pwr_hid' was not declared. Should it be static? Both rst_pwr_hid and low_pwr_hid are only used in a single function so they should be local variables. Fixes: a4c0094fcf76 ("power: reset: pwr-mlxbf: add BlueField SoC power control driver") Signed-off-by: Tom Rix Acked-by: Asmaa Mnebhi Signed-off-by: Sebastian Reichel drivers/power/reset/pwr-mlxbf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3b91edd624ab1ab694deef513a45eb9e9d49d75f Author: Neal Liu Date: Tue Jun 28 10:14:36 2022 +0800 usb: gadget: f_mass_storage: Make CD-ROM emulation works with Windows OS Add read TOC with format 1 to support CD-ROM emulation with Windows OS. This patch is tested on Windows OS Server 2019. Fixes: 89ada0fe669a ("usb: gadget: f_mass_storage: Make CD-ROM emulation work with Mac OS-X") Reviewed-by: Alan Stern Signed-off-by: Neal Liu Link: https://lore.kernel.org/r/20220628021436.3252262-1-neal_liu@aspeedtech.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_mass_storage.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit df574080fad0d73f7aaf472a0fa45ea3f18230e0 Author: Oliver Neukum Date: Wed Jun 29 15:26:38 2022 +0200 USB: cdc-acm: use define for timeout We have a symbolic name for the standard timeout. Use it. No functional change intended. Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20220629132638.31810-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98ceba7559280cdd09feccc7af4406d93187fbfb Author: Yang Yingliang Date: Tue Jun 28 22:05:27 2022 +0800 usb: musb: mpfs: add missing clk_disable_unprepare() in mpfs_remove() clock source is prepared and enabled by clk_prepare_enable() in probe function, but no disable or unprepare in remove. Fixes: 7a96b6ea90a4 ("usb: musb: Add support for PolarFire SoC's musb controller") Reported-by: Hulk Robot Reviewed-by: Conor Dooley Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220628140527.1404439-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/mpfs.c | 1 + 1 file changed, 1 insertion(+) commit 70cdb930f7e97e0abe4ec4ac30e63ada490ef375 Author: Dan Carpenter Date: Tue Jun 28 11:21:43 2022 +0300 usb: gadget: aspeed_udc: fix handling of tx_len == 0 The bug is that we should still enter this loop if "tx_len" is zero. After adding the "last" variable, then the "chunk >= 0" condition is no longer required but I left it for readability. Fixes: c09b1f372e74 ("usb: gadget: aspeed_udc: cleanup loop in ast_dma_descriptor_setup()") Reported-by: Neal Liu Reviewed-by: Neal Liu Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Yrq6F5okoX1y05rT@kili Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/aspeed_udc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit babfcd947eba6e4c80a023683a37723ad43816e2 Author: Mauro Carvalho Chehab Date: Tue Jun 28 10:46:26 2022 +0100 usb: dwc3: gadget: fix a kernel-doc warning The multiplier parameter of dwc3_gadget_calc_tx_fifo_size() was not documented: drivers/usb/dwc3/gadget.c:675: warning: Function parameter or member 'mult' not described in 'dwc3_gadget_calc_tx_fifo_size' Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/bd599a18cea45c57d91c69d3e30d8b1e8ea69dd1.1656409369.git.mchehab@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/gadget.c | 1 + 1 file changed, 1 insertion(+) commit ad44cf402486a0c84e65e6f0a65c20ce58a65a96 Author: Mauro Carvalho Chehab Date: Tue Jun 28 10:46:25 2022 +0100 usb: dwc3: document async_callbacks field Avoid a kernel-doc warning by documenting it: drivers/usb/dwc3/core.h:1328: warning: Function parameter or member 'async_callbacks' not described in 'dwc3' Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/2c3de5935934baec097286f525ce4beff0a31ec0.1656409369.git.mchehab@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.h | 2 ++ 1 file changed, 2 insertions(+) commit ae92b1c84306a68c361d90b46ad3acef99c10e29 Author: Mauro Carvalho Chehab Date: Tue Jun 28 10:46:24 2022 +0100 usb: typec_altmode: add a missing "@" at a kernel-doc parameter Without that, the parameter is not properly parsed: include/linux/usb/typec_altmode.h:132: warning: Function parameter or member 'altmode' not described in 'typec_altmode_get_orientation' Signed-off-by: Mauro Carvalho Chehab Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/70dc4c5d744cf1fe9a0efe6b85deaa0489628282.1656409369.git.mchehab@kernel.org Signed-off-by: Greg Kroah-Hartman include/linux/usb/typec_altmode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b13a3e5fd40b7d1b394c5ecbb5eb301a4c38e7b2 Author: Dan Williams Date: Fri Jun 24 16:05:26 2022 -0700 ACPI: APEI: Fix _EINJ vs EFI_MEMORY_SP When a platform marks a memory range as "special purpose" it is not onlined as System RAM by default. However, it is still suitable for error injection. Add IORES_DESC_SOFT_RESERVED to einj_error_inject() as a permissible memory type in the sanity checking of the arguments to _EINJ. Fixes: 262b45ae3ab4 ("x86/efi: EFI soft reservation to E820 enumeration") Reviewed-by: Tony Luck Reported-by: Omar Avelar Signed-off-by: Dan Williams Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/einj.c | 2 ++ 1 file changed, 2 insertions(+) commit b4f1f61ed5928b1128e60e38d0dffa16966f06dc Author: huhai Date: Thu Jun 23 21:21:27 2022 +0800 ACPI: LPSS: Fix missing check in register_device_clock() register_device_clock() misses a check for platform_device_register_simple(). Add a check to fix it. Signed-off-by: huhai Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_lpss.c | 3 +++ 1 file changed, 3 insertions(+) commit 444fe04f7a5a7991daa1a8fc3680670ac87fc2ce Author: Ming Lei Date: Fri Jun 24 22:12:53 2022 +0800 dm: improve BLK_STS_DM_REQUEUE and BLK_STS_AGAIN handling If either BLK_STS_DM_REQUEUE or BLK_STS_AGAIN is returned for POLLED io, we requeue the original bio into deferred list and kick md->wq to re-submit it to block layer. Improve the handling in the following way: 1) Factor out dm_handle_requeue() for handling dm_io requeue. 2) Unify handling for BLK_STS_DM_REQUEUE and BLK_STS_AGAIN: clear REQ_POLLED for BLK_STS_DM_REQUEUE too, for the sake of simplicity, given BLK_STS_DM_REQUEUE is very unusual. 3) Queue md->wq explicitly in dm_handle_requeue(), so requeue handling becomes more robust. Signed-off-by: Ming Lei Signed-off-by: Mike Snitzer drivers/md/dm.c | 70 ++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 25 deletions(-) commit d6f895965592d5cd2771860639219964df85d555 Author: Tony W Wang-oc Date: Thu Jun 23 09:21:26 2022 +0800 cpufreq: ACPI: Add Zhaoxin/Centaur turbo boost control interface support Recent Zhaoxin/Centaur CPUs support X86_FEATURE_IDA and the turbo boost can be dynamically enabled or disabled through MSR 0x1a0[38] in the same way as Intel. So add turbo boost control support for these CPUs too. Signed-off-by: Tony W Wang-oc Signed-off-by: Rafael J. Wysocki drivers/cpufreq/acpi-cpufreq.c | 4 ++++ 1 file changed, 4 insertions(+) commit c3481b6b75b4797657838f44028fd28226ab48e0 Author: Tony Luck Date: Wed Jun 22 10:09:06 2022 -0700 ACPI: APEI: Better fix to avoid spamming the console with old error logs The fix in commit 3f8dec116210 ("ACPI/APEI: Limit printable size of BERT table data") does not work as intended on systems where the BIOS has a fixed size block of memory for the BERT table, relying on s/w to quit when it finds a record with estatus->block_status == 0. On these systems all errors are suppressed because the check: if (region_len < ACPI_BERT_PRINT_MAX_LEN) always fails. New scheme skips individual CPER records that are too large, and also limits the total number of records that will be printed to 5. Fixes: 3f8dec116210 ("ACPI/APEI: Limit printable size of BERT table data") Cc: All applicable Signed-off-by: Tony Luck Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/bert.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) commit 4b7ef7b05afcde44142225c184bf43a0cd9e2178 Author: Manyi Li Date: Wed Jun 22 15:42:48 2022 +0800 ACPI: PM: save NVS memory for Lenovo G40-45 [821d6f0359b0614792ab8e2fb93b503e25a65079] is to make machines produced from 2012 to now not saving NVS region to accelerate S3. But, Lenovo G40-45, a platform released in 2015, still needs NVS memory saving during S3. A quirk is introduced for this platform. Signed-off-by: Manyi Li Signed-off-by: Rafael J. Wysocki drivers/acpi/sleep.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit dd5e555400305bcc9bf1f063d7206656c4c68e96 Author: Sudeep Holla Date: Tue Jun 21 16:04:36 2022 +0100 Documentation: ACPI: Update links and references to DSD related docs The existing references to DSD are stale and outdated. The new process and guidance is maintained @https://github.com/UEFI/DSD-Guide Update the existing documents to reflect the same. Signed-off-by: Sudeep Holla Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki Documentation/firmware-guide/acpi/DSD-properties-rules.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 3e6573c5d275cc7c109f824c6710354fa9a878b1 Author: Hans de Goede Date: Mon Jun 20 11:25:46 2022 +0200 ACPI: EC: Drop unused ident initializers from dmi_system_id tables Drop the unused const string ident initializers from the dmi_system_id tables to make the object size a bit smaller. While at it also use proper named struct-member initializers for the ec_dmi_table[]. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) commit 81df5f91974347b9d95de06953b839101fec4a5e Author: Hans de Goede Date: Mon Jun 20 11:25:45 2022 +0200 ACPI: EC: Re-use boot_ec when possible even when EC_FLAGS_TRUST_DSDT_GPE is set EC_FLAGS_TRUST_DSDT_GPE only does anything when the: if (boot_ec && ec->command_addr == boot_ec->command_addr && ec->data_addr == boot_ec->data_addr) conditions are all true. Normally acpi_ec_add() would re-use the boot_ec struct acpi_ec in this case. But when the EC_FLAGS_TRUST_DSDT_GPE flag was set the code would continue with a newly allocated (second) struct acpi_ec. There is no reason to use a second struct acpi_ec if all the above checks match. Instead just change boot_ec->gpe to ec->gpe, when the flag is set, similar to how this is already one done for boot_ec->handle. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit f7090e0ef360d674f08a22fab90e4e209fb1f658 Author: Hans de Goede Date: Mon Jun 20 11:25:44 2022 +0200 ACPI: EC: Drop the EC_FLAGS_IGNORE_DSDT_GPE quirk It seems that these quirks are no longer necessary since commit 69b957c26b32 ("ACPI: EC: Fix possible issues related to EC initialization order"), which has fixed this in a generic manner. There are 3 commits adding DMI entries with this quirk (adding multiple DMI entries per commit). 2/3 commits are from before the generic fix. Which leaves commit 6306f0431914 ("ACPI: EC: Make more Asus laptops use ECDT _GPE"), which was committed way after the generic fix. But this was just due to slow upstreaming of it. This commit stems from Endless from 15 Aug 2017 (committed upstream 20 May 2021): https://github.com/endlessm/linux/pull/288 The current code should work fine without this: 1. The EC_FLAGS_IGNORE_DSDT_GPE flag is only checked in ec_parse_device(), like this: if (boot_ec && boot_ec_is_ecdt && EC_FLAGS_IGNORE_DSDT_GPE) { ec->gpe = boot_ec->gpe; } else { /* parse GPE */ } 2. ec_parse_device() is only called from acpi_ec_add() and acpi_ec_dsdt_probe() 3. acpi_ec_dsdt_probe() starts with: if (boot_ec) return; so it only calls ec_parse_device() when boot_ec == NULL, meaning that the quirk never triggers for this call. So only the call in acpi_ec_add() matters. 4. acpi_ec_add() does the following after the ec_parse_device() call: if (boot_ec && ec->command_addr == boot_ec->command_addr && ec->data_addr == boot_ec->data_addr && !EC_FLAGS_TRUST_DSDT_GPE) { /* * Trust PNP0C09 namespace location rather than * ECDT ID. But trust ECDT GPE rather than _GPE * because of ASUS quirks, so do not change * boot_ec->gpe to ec->gpe. */ boot_ec->handle = ec->handle; acpi_handle_debug(ec->handle, "duplicated.\n"); acpi_ec_free(ec); ec = boot_ec; } The quirk only matters if boot_ec != NULL and EC_FLAGS_TRUST_DSDT_GPE is never set at the same time as EC_FLAGS_IGNORE_DSDT_GPE. That means that if the addresses match we always enter this if block and then only the ec->handle part of the data stored in ec by ec_parse_device() is used and the rest is thrown away, after which ec is made to point to boot_ec, at which point ec->gpe == boot_ec->gpe, so the same result as with the quirk set, independent of the value of the quirk. Also note the comment in this block which indicates that the gpe result from ec_parse_device() is deliberately not taken to deal with buggy Asus laptops and all DMI quirks setting EC_FLAGS_IGNORE_DSDT_GPE are for Asus laptops. Based on the above I believe that unless on some quirked laptops the ECDT and DSDT EC addresses do not match we can drop the quirk. I've checked dmesg output to ensure the ECDT and DSDT EC addresses match for quirked models using https://linux-hardware.org hw-probe reports. I've been able to confirm that the addresses match for the following models this way: GL702VMK, X505BA, X505BP, X550VXK, X580VD. Whereas for the following models I could find any dmesg output: FX502VD, FX502VE, X542BA, X542BP. Note the models without dmesg all were submitted in patches with a batch of models and other models from the same batch checkout ok. This, combined with that all the code adding the quirks was written before the generic fix makes me believe that it is safe to remove this quirk now. Signed-off-by: Hans de Goede Reviewed-by: Daniel Drake Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 75 +++++++------------------------------------------------ 1 file changed, 9 insertions(+), 66 deletions(-) commit 0dd6db359e5f206cbf1dd1fd40dd211588cd2725 Author: Hans de Goede Date: Mon Jun 20 11:25:43 2022 +0200 ACPI: EC: Remove duplicate ThinkPad X1 Carbon 6th entry from DMI quirks Somehow the "ThinkPad X1 Carbon 6th" entry ended up twice in the struct dmi_system_id acpi_ec_no_wakeup[] array. Remove one of the entries. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 7 ------- 1 file changed, 7 deletions(-) commit 48e014ee9a61e8f4700987b82f7cb1dc3c89fa76 Author: Aidan MacDonald Date: Thu Jun 23 22:14:20 2022 +0100 regmap-irq: Deprecate the not_fixed_stride flag This flag is a bit of a hack and the same thing can be accomplished using a custom ->get_irq_reg() callback. Add a warning to catch any use of the flag. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20220623211420.918875-13-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 2 ++ include/linux/regmap.h | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit bdf9b86cd3adbbcf590ab82b74ab8554534c9b6e Author: Aidan MacDonald Date: Thu Jun 23 22:14:19 2022 +0100 regmap-irq: Add get_irq_reg() callback Replace the internal sub_irq_reg() function with a public callback that drivers can use when they have more complex register layouts. The default implementation is regmap_irq_get_irq_reg_linear(), used if the chip doesn't provide its own callback. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20220623211420.918875-12-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 126 +++++++++++++++++++++++++-------------- include/linux/regmap.h | 15 ++++- 2 files changed, 93 insertions(+), 48 deletions(-) commit e8ffb12e7f065db616a3eba79ff138bececf0825 Author: Aidan MacDonald Date: Thu Jun 23 22:14:18 2022 +0100 regmap-irq: Fix inverted handling of unmask registers To me "unmask" suggests that we write 1s to the register when an interrupt is enabled. This also makes sense because it's the opposite of what the "mask" register does (write 1s to disable an interrupt). But regmap-irq does the opposite: for a disabled interrupt, it writes 1s to "unmask" and 0s to "mask". This is surprising and deviates from the usual way mask registers are handled. Additionally, mask_invert didn't interact with unmask registers properly -- it caused them to be ignored entirely. Fix this by making mask and unmask registers orthogonal, using the following behavior: * Mask registers are written with 1s for disabled interrupts. * Unmask registers are written with 1s for enabled interrupts. This behavior supports both normal or inverted mask registers and separate set/clear registers via different combinations of mask_base/unmask_base. The old unmask register behavior is deprecated. Drivers need to opt-in to the new behavior by setting mask_unmask_non_inverted. Warnings are issued if the driver relies on deprecated behavior. Chips that only set one of mask_base/unmask_base don't have to use the mask_unmask_non_inverted flag because that use case was previously not supported. The mask_invert flag is also deprecated in favor of describing inverted mask registers as unmask registers. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20220623211420.918875-11-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 114 +++++++++++++++++++++++---------------- include/linux/regmap.h | 18 +++++-- 2 files changed, 84 insertions(+), 48 deletions(-) commit 9edd4f5aee8470dcfd0db04005908f61fbfae8e0 Author: Aidan MacDonald Date: Thu Jun 23 22:14:17 2022 +0100 regmap-irq: Deprecate type registers and virtual registers Config registers can be used to replace both type and virtual registers, so mark both features are deprecated and issue a warning if they're used. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20220623211420.918875-10-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 6 ++++++ include/linux/regmap.h | 18 ++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) commit faa87ce9196dbb074d75bd4aecb8bacf18f19b4e Author: Aidan MacDonald Date: Thu Jun 23 22:14:16 2022 +0100 regmap-irq: Introduce config registers for irq types Config registers provide a more uniform approach to handling irq type registers. They are essentially an extension of the virtual registers used by the qcom-pm8008 driver. Config registers can be represented as a 2D array: config_base[0] reg0,0 reg0,1 reg0,2 reg0,3 config_base[1] reg1,0 reg1,1 reg1,2 reg1,3 config_base[2] reg2,0 reg2,1 reg2,2 reg2,3 There are 'num_config_bases' base registers, each of which is used to address 'num_config_regs' registers. The addresses are calculated in the same way as for other bases. It is assumed that an irq's type is controlled by one column of registers; that column is identified by the irq's 'type_reg_offset'. The set_type_config() callback is responsible for updating the config register contents. It receives an array of buffers (each represents a row of registers) and the index of the column to update, along with the 'struct regmap_irq' description and requested irq type. Buffered values are written to registers in regmap_irq_sync_unlock(). Note that the entire register contents are overwritten, which is a minor change in behavior from type registers via 'type_base'. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20220623211420.918875-9-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 115 +++++++++++++++++++++++++++++++++++++-- include/linux/regmap.h | 12 ++++ 2 files changed, 122 insertions(+), 5 deletions(-) commit f7cc5062d6e5ca439708e8403b1a622cca75adf7 Author: Aidan MacDonald Date: Thu Jun 23 22:14:15 2022 +0100 regmap-irq: Refactor checks for status bulk read support There are several conditions that must be satisfied to support bulk read of status registers. Move the check into a function to avoid duplicating it in two places. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20220623211420.918875-8-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit ad22b3e98f9430896bd4bd8f4fbff4667f02a0c8 Author: Aidan MacDonald Date: Thu Jun 23 22:14:14 2022 +0100 regmap-irq: Remove mask_writeonly and regmap_irq_update_bits() Commit a71411dbf6c8 ("regmap: irq: add chip option mask_writeonly") introduced the mask_writeonly option, but it isn't used now and it appears it's never been used by any in-tree drivers. The motivation for the option is mentioned in the commit message, Some irq controllers have writeonly/multipurpose register layouts. In those cases we read invalid data back. [...] The option causes mask register updates to use regmap_write_bits() instead of regmap_update_bits(). However, regmap_write_bits() doesn't solve the reading invalid data problem. It's still a read-modify-write op like regmap_update_bits(). The difference is that 'update bits' will only write the new value if it is different from the current value, while 'write bits' will write the new value unconditionally, even if it's the same as the current value. This seems like a bit of a specialized use case and probably isn't that useful for regmap-irq, so let's just remove the option and go back to using an 'update bits' op for the mask registers. We can always add the option back if some driver ends up needing it in the future. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20220623211420.918875-7-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 24 +++++++----------------- include/linux/regmap.h | 2 -- 2 files changed, 7 insertions(+), 19 deletions(-) commit 6b0c31747722936101d56e71e809bfd7a6a440b7 Author: Aidan MacDonald Date: Thu Jun 23 22:14:13 2022 +0100 regmap-irq: Remove inappropriate uses of regmap_irq_update_bits() regmap_irq_update_bits() is misnamed and should only be used for updating mask registers, since it checks the mask_writeonly flag. However, it was also used for updating wake and type registers. It's safe to replace these uses with regmap_update_bits() because there are no users of the mask_writeonly flag. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20220623211420.918875-6-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 610fdd668e6af48fcae7908161d14eee3a95ec92 Author: Aidan MacDonald Date: Thu Jun 23 22:14:12 2022 +0100 regmap-irq: Remove an unnecessary restriction on type_in_mask Check types_supported instead of checking type_rising/falling_val when using type_in_mask interrupts. This makes the intent clearer and allows a type_in_mask irq to support level or edge triggers, rather than only edge triggers. Update the documentation and comments to reflect the new behavior. This shouldn't affect existing drivers, because if they didn't set types_supported properly the type buffer wouldn't be updated. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20220623211420.918875-5-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 19 ++++++++----------- include/linux/regmap.h | 8 +++++--- 2 files changed, 13 insertions(+), 14 deletions(-) commit cffc2be30288786e242bceb9fedde4dfe6ce442d Author: Aidan MacDonald Date: Thu Jun 23 22:14:11 2022 +0100 regmap-irq: Cleanup sizeof(...) use in memory allocation Instead of mentioning unsigned int directly, use a sizeof(...) involving the buffer we're allocating to ensure the types don't get out of sync. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20220623211420.918875-4-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 53a1a16dcc972163bd5816192d5d63ae433c9e56 Author: Aidan MacDonald Date: Thu Jun 23 22:14:10 2022 +0100 regmap-irq: Remove unused type_reg_stride field It appears that no chip ever required a nonzero type_reg_stride and commit 1066cfbdfa3f ("regmap-irq: Extend sub-irq to support non-fixed reg strides") broke support. Just remove the field. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20220623211420.918875-3-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 6 ------ include/linux/regmap.h | 3 --- 2 files changed, 9 deletions(-) commit 445cbd219ac3b8f451153c210aaf97adcbf4bd02 Author: Aidan MacDonald Date: Thu Jun 23 22:14:09 2022 +0100 regmap-irq: Convert bool bitfields to unsigned int Use 'unsigned int' for bitfields for consistency with most other kernel code. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20220623211420.918875-2-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 2 +- include/linux/regmap.h | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) commit 06fae51bb24451927118b4297886ebc8adbad8fa Merge: 3d0afe9cf1ef 3f05010f243b Author: Mark Brown Date: Wed Jun 29 18:12:24 2022 +0100 regmap: Merge up fixes Needed for the regmap-irq rework. commit 66348f178d5a842c8afe52c3b743fb4af24cdb2a Author: Yassine Oudjana Date: Wed Jun 22 20:13:21 2022 +0400 ASoC: wcd9335: Use DT bindings instead of local DAI definitions Get DAI indices from DT bindings and remove the currently used local definitions. Signed-off-by: Yassine Oudjana Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220622161322.168017-3-y.oudjana@protonmail.com Signed-off-by: Mark Brown sound/soc/codecs/wcd9335.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 57b8b2113e2056d72dbe1d6123950f145c874168 Author: Yassine Oudjana Date: Wed Jun 22 20:13:20 2022 +0400 ASoC: dt-bindings: Add bindings for WCD9335 DAIs Add bindings for the DAIs available in WCD9335 to avoid having to use unclear number indices in device trees. Signed-off-by: Yassine Oudjana Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220622161322.168017-2-y.oudjana@protonmail.com Signed-off-by: Mark Brown MAINTAINERS | 1 + include/dt-bindings/sound/qcom,wcd9335.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+) commit 9cc69528188a4e3eb24370f6c05a92791ac249ba Author: Kuninori Morimoto Date: Wed Jun 22 05:54:13 2022 +0000 ASoC: soc-core.c: share code for snd_soc_of_get_dai_link_cpus/codecs() ASoC has snd_soc_of_get_dai_link_cpus/codecs(), and these are almost same code. The main difference are below. for_each_link_cpus() dai_link->cpus dai_link->num_cpus for_each_link_codecs() dai_link->codecs dai_link->num_codecs Because we need to use these parameters, we can't share full-code for now, but can share some codes. This patch adds __snd_soc_of_get/put_xxx() functions, and share the code. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87y1xpp7ju.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/soc-core.c | 140 ++++++++++++++++++++++++++------------------------- 1 file changed, 72 insertions(+), 68 deletions(-) commit 586fb2641371cf7f23a401ab1c79b17e3ec457f4 Author: Kuninori Morimoto Date: Wed Jun 22 05:54:06 2022 +0000 ASoC: soc-core.c: fixup snd_soc_of_get_dai_link_cpus() commit 900dedd7e47cc3f ("ASoC: Introduce snd_soc_of_get_dai_link_cpus") adds new snd_soc_of_get_dai_link_cpus(), but it is using "codec" everywhere. It is very strange, and is issue when error case. It should call cpu instead of codec in error case. This patch tidyup it. Fixes: 900dedd7e47cc3f ("ASoC: Introduce snd_soc_of_get_dai_link_cpus") Signed-off-by: Kuninori Morimoto Reviewed-by: Martin Povišer Link: https://lore.kernel.org/r/87zgi5p7k1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/soc-core.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit e55cf798140518b900e5254093f1195f65c23026 Author: Jason Yan Date: Wed Jun 29 15:09:17 2022 +0800 blk-cgroup: factor out blkcg_free_all_cpd() To reduce some duplicated code, factor out blkcg_free_all_cpd(). No functional change. Signed-off-by: Jason Yan Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220629070917.3113016-3-yanaijie@huawei.com Signed-off-by: Jens Axboe block/blk-cgroup.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 362b8c16f8fc73fddfe4bded25055fa0c9e2bf1e Author: Jason Yan Date: Wed Jun 29 15:09:16 2022 +0800 blk-cgroup: factor out blkcg_iostat_update() To reduce some duplicated code, factor out blkcg_iostat_update(). No functional change. Signed-off-by: Jason Yan Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220629070917.3113016-2-yanaijie@huawei.com Signed-off-by: Jens Axboe block/blk-cgroup.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) commit e414207d12f38bc42222037dbcdbe6b4649418d6 Author: Riwen Lu Date: Fri Jun 17 10:51:52 2022 +0800 ACPI: processor: Drop leftover acpi_processor_get_limit_info() declaration Commit 22e7551eb6fd ("ACPI / processor: Remove acpi_processor_get_limit_info()"), left it behind, so drop it. Signed-off-by: Riwen Lu Reviewed-by: Punit Agrawal [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki include/acpi/processor.h | 1 - 1 file changed, 1 deletion(-) commit 7fdc74da940ddf8f2eb0dd1202cbfbfe08342cbb Author: Riwen Lu Date: Fri Jun 17 10:51:51 2022 +0800 ACPI: processor: Split out thermal initialization from ACPI PSS Commit 239708a3af44 ("ACPI: Split out ACPI PSS from ACPI Processor driver"), moves processor thermal registration to acpi_pss_perf_init(), which doesn't get executed if ACPI_CPU_FREQ_PSS is not enabled. As ARM64 supports P-states using CPPC, it should be possible to also support processor passive cooling even if PSS is not enabled. Split out the processor thermal cooling register from ACPI PSS to support this, and move it into a separate function in processor_thermal.c. Signed-off-by: Riwen Lu Reviewed-by: Punit Agrawal [ rjw: Subject edits ] Signed-off-by: Rafael J. Wysocki drivers/acpi/Kconfig | 2 +- drivers/acpi/Makefile | 5 ++- drivers/acpi/processor_driver.c | 72 +++++----------------------------------- drivers/acpi/processor_thermal.c | 54 ++++++++++++++++++++++++++++++ include/acpi/processor.h | 8 +++-- 5 files changed, 71 insertions(+), 70 deletions(-) commit e810cb78bc4b4febeac451a0d823ca68622cd86b Author: Christoph Hellwig Date: Wed Jun 8 08:34:09 2022 +0200 dm: refactor dm_md_mempool allocation The current split between dm_table_alloc_md_mempools and dm_alloc_md_mempools is rather arbitrary, so merge the two into one easy to follow function. Signed-off-by: Christoph Hellwig Signed-off-by: Mike Snitzer drivers/md/dm-core.h | 3 +++ drivers/md/dm-table.c | 57 ++++++++++++++++++++++++++++++++++++--------------- drivers/md/dm.c | 52 ---------------------------------------------- drivers/md/dm.h | 3 --- 4 files changed, 44 insertions(+), 71 deletions(-) commit 4ed045d8756a08dd6b823ffc6867dfc344491909 Author: Christoph Hellwig Date: Wed Jun 8 08:34:08 2022 +0200 dm: unexport dm_get_reserved_rq_based_ios dm_get_reserved_rq_based_ios is only used in the core dm code, so remove the export. Signed-off-by: Christoph Hellwig Signed-off-by: Mike Snitzer drivers/md/dm-rq.c | 1 - 1 file changed, 1 deletion(-) commit 038275d227841d4978ceceb397b584b4b39f2b50 Author: Riwen Lu Date: Mon Jun 13 17:33:47 2022 +0800 ACPI: video: Drop X86 dependency from Kconfig The ACPI video device is also present in ARM64 laptops, so drop the Kconfig dependency on X86 for ACPI_VIDEO. Signed-off-by: Riwen Lu [ rjw: Subject rewrite, changelog edits ] Signed-off-by: Rafael J. Wysocki drivers/acpi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66d052047ca85fd0c948e08ca46d59420187afbe Author: Rob Herring Date: Thu Jun 2 20:19:33 2022 -0500 dt-bindings: arm: Convert CoreSight CPU debug to DT schema Convert the CoreSight CPU debug binding to DT schema format. Reviewed-by: Leo Yan Reviewed-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Reviewed-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20220603011933.3277315-4-robh@kernel.org Signed-off-by: Mathieu Poirier .../bindings/arm/arm,coresight-cpu-debug.yaml | 81 ++++++++++++++++++++++ .../bindings/arm/coresight-cpu-debug.txt | 49 ------------- MAINTAINERS | 1 - 3 files changed, 81 insertions(+), 50 deletions(-) commit 3c15fddf312120fe659bccd41cdee70db9cc4a63 Author: Rob Herring Date: Thu Jun 2 20:19:32 2022 -0500 dt-bindings: arm: Convert CoreSight bindings to DT schema Each CoreSight component has slightly different requirements and nothing applies to every component, so each CoreSight component has its own schema document. Signed-off-by: Rob Herring Reviewed-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20220603011933.3277315-3-robh@kernel.org Signed-off-by: Mathieu Poirier .../bindings/arm/arm,coresight-catu.yaml | 101 ++++++ .../devicetree/bindings/arm/arm,coresight-cti.yaml | 3 +- .../bindings/arm/arm,coresight-dynamic-funnel.yaml | 126 +++++++ .../arm/arm,coresight-dynamic-replicator.yaml | 126 +++++++ .../bindings/arm/arm,coresight-etb10.yaml | 92 +++++ .../devicetree/bindings/arm/arm,coresight-etm.yaml | 156 ++++++++ .../bindings/arm/arm,coresight-static-funnel.yaml | 90 +++++ .../arm/arm,coresight-static-replicator.yaml | 91 +++++ .../devicetree/bindings/arm/arm,coresight-stm.yaml | 101 ++++++ .../devicetree/bindings/arm/arm,coresight-tmc.yaml | 131 +++++++ .../bindings/arm/arm,coresight-tpiu.yaml | 91 +++++ .../bindings/arm/arm,embedded-trace-extension.yaml | 1 - .../devicetree/bindings/arm/coresight.txt | 402 --------------------- Documentation/trace/coresight/coresight.rst | 2 +- MAINTAINERS | 3 +- 15 files changed, 1108 insertions(+), 408 deletions(-) commit fc34ece41f7183d522d15dc4189d8df6e8e23737 Merge: 7ed186642e62 01936221278c Author: Mark Brown Date: Wed Jun 29 16:58:08 2022 +0100 ASoC: Refactor non_legacy_dai_naming flag Merge series from Charles Keepax : Historically, the legacy DAI naming scheme was applied to platform drivers and the newer scheme to CODEC drivers. During componentisation the core lost the knowledge of if a driver was a CODEC or platform, they were all now components. To continue to support the legacy naming on older platform drivers a flag was added to the snd_soc_component_driver structure, non_legacy_dai_naming, to indicate to use the new scheme and this was applied to all CODECs as part of the migration. However, a slight issue appears to be developing with respect to this flag being opt in for the non-legacy scheme, which presumably we want to be the primary scheme used. Many codec drivers appear to forget to include this flag: grep -l -r "snd_soc_component_driver" sound/soc/codecs/*.c | xargs grep -L "non_legacy_dai_naming" | wc 48 48 556 Whilst in many cases the configuration of the DAIs themselves will cause the core to apply the new scheme anyway, it would seem more sensible to change the flag to legacy_dai_naming making the new scheme opt out. This patch series migrates across to such a scheme. commit 92c2b1c12f8a908d849b64717e8809981b66f759 Author: Rob Herring Date: Thu Jun 2 20:19:31 2022 -0500 dt-bindings: arm: Rename Coresight filenames to match compatible Use the compatible strings for filenames as that is the preferred naming convention for DT bindings. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220603011933.3277315-2-robh@kernel.org Signed-off-by: Mathieu Poirier .../bindings/arm/{coresight-cti.yaml => arm,coresight-cti.yaml} | 2 +- .../bindings/arm/{ete.yaml => arm,embedded-trace-extension.yaml} | 2 +- .../bindings/arm/{trbe.yaml => arm,trace-buffer-extension.yaml} | 2 +- MAINTAINERS | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) commit 8add26f7ef33bba7984cb6ff7911c6aa970fe55a Author: Mike Leach Date: Tue Jun 28 18:30:04 2022 +0100 coresight: syscfg: Update load and unload operations The configfs system is a source of access to the config information in the configuration and feature lists. This can result in additional LOCKDEP issues as a result of the mutex ordering between the config list mutex (cscfg_mutex) and the configfs system mutexes. As such we need to adjust how load/unload operations work to ensure correct operation. 1) Previously the cscfg_mutex was held throughout the load/unload operation. This is now only held during configuration list manipulations, resulting in a multi-stage load/unload process. 2) All operations that manipulate the configfs representation of the configurations and features are now separated out and run without the cscfg_mutex being held. This avoids circular lock_dep issue with the built-in configfs mutexes and semaphores 3) As the load and unload is now multi-stage, some parts under the cscfg_mutex and others not: i) A flag indicating a load / unload operation in progress is used to serialise load / unload operations. ii) activating any configuration not possible when unload is in progress. iii) Configurations have an "available" flag set only after the last load stage for the configuration is complete. Activation of the configuration not possible till flag is set. 4) Following load/unload rules remain: i) Unload prevented while any configuration is active remains. ii) Unload in strict reverse order of load. iii) Existing configurations can be activated while a new load operation is underway. (by definition there can be no dependencies between an existing configuration and a new loading one due to ii) above.) Fixes: eb2ec49606c2 ("coresight: syscfg: Update load API for config loadable modules") Reported-by: Suzuki Poulose Signed-off-by: Mike Leach Reviewed-and-tested-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20220628173004.30002-3-mike.leach@linaro.org Signed-off-by: Mathieu Poirier drivers/hwtracing/coresight/coresight-config.h | 2 + drivers/hwtracing/coresight/coresight-syscfg.c | 191 +++++++++++++++++++------ drivers/hwtracing/coresight/coresight-syscfg.h | 13 ++ 3 files changed, 165 insertions(+), 41 deletions(-) commit bc4d193238be4ef8ecee1ba0e0371169ad448c31 Author: Stephan Gerhold Date: Thu Jun 23 11:46:14 2022 +0200 regulator: qcom_smd: Add PM8909 RPM regulators The set of regulators available in the PM8909 PMIC is similar to PM8916 which is already supported by the driver. s3, s4 and l16 are missing. However, probing the SPMI hardware identification registers using the qcom_spmi-regulator driver reveals that the regulators in PM8909 are actually some kind of mixture between PM8916 and PM8226: - ult_lo_smps (= pm8916_buck_lvo_smps): s1 - ult_ho_smps (= pm8916_buck_hvo_smps): s2 - ult_nldo (= pm8916_nldo): l1, l2, l3, l10 - ult_pldo (= pm8916_pldo): l4, l8, l9, l12-l15, l17, l18 - pldo (= pm8226_pldo): l5, l6, l7, l11 Use this mapping to add the rpm_regulator_data for PM8909 by reusing the existing regulator definitions. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20220623094614.1410180-4-stephan.gerhold@kernkonzept.com Signed-off-by: Mark Brown drivers/regulator/qcom_smd-regulator.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 8cbb948a7cc2875d09234e2ce0424bc501c370b9 Author: Stephan Gerhold Date: Thu Jun 23 11:46:13 2022 +0200 regulator: dt-bindings: qcom,smd-rpm: Add PM8909 Document the "qcom,rpm-pm8909-regulators" compatible for describing the regulators available in the PM8909 PMIC (controlled via the RPM firmware). PM8909 is very similar to the existing PM8916 but lacks 3 of the regulators (s3, s4 and l16). Signed-off-by: Stephan Gerhold Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220623094614.1410180-3-stephan.gerhold@kernkonzept.com Signed-off-by: Mark Brown .../devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit e8977917e116d1571dacb8e9864474551c1c12bd Author: Stephan Gerhold Date: Thu Jun 23 11:46:12 2022 +0200 regulator: qcom_smd: Fix pm8916_pldo range The PM8916 device specification [1] documents a programmable range of 1.75V to 3.337V with 12.5mV steps for the PMOS LDOs in PM8916. This range is also used when controlling the regulator directly using the qcom_spmi-regulator driver ("ult_pldo" there). However, for some reason the qcom_smd-regulator driver allows a much larger range for the same hardware component. This could be simply a typo, since the start of the range is essentially just missing a '1'. In practice this does not cause any major problems, since the driver just sends the actual voltage to the RPM firmware instead of making use of the incorrect voltage selector. Still, having the wrong range there is confusing and prevents the regulator core from validating requests correctly. [1]: https://developer.qualcomm.com/download/sd410/pm8916pm8916-1-power-management-ic-device-specification.pdf Fixes: 57d6567680ed ("regulator: qcom-smd: Add PM8916 support") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20220623094614.1410180-2-stephan.gerhold@kernkonzept.com Signed-off-by: Mark Brown drivers/regulator/qcom_smd-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 46ae6fb58fd49c4cb2d1ca34e87d603b7c96ba97 Author: ChiYuan Huang Date: Wed Jun 29 09:41:01 2022 +0800 regulator: mt6370: Use the correct header for platform_device_id 'platform_device_id' struct is defined in 'mod_devicetable.h'. Even 'of.h' also includes this header usage. The 'of.h' cannot be removed due to 'of_match_ptr' function. Signed-off-by: ChiYuan Huang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/1656466861-7737-2-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown drivers/regulator/mt6370-regulator.c | 1 + 1 file changed, 1 insertion(+) commit 4806c991bf4ff959acf921ea72f931a945a968ae Author: ChiYuan Huang Date: Wed Jun 29 09:41:00 2022 +0800 regulator: mt6370: Use 'fwnode_gpiod_get_index' to fix gpio parsing From the common binding, 'enable-gpio' or 'enable-gpios' are all well for external 'enable' gpio. 'gpiod_get_from_of_node' only parse the 'enable' property, it need to add the gpio suffix. It's more convenient to use fwnode_gpiod_get_index. Although fwnode parsing is not preferred, but 'of_parse_cb' already can guarantee the callback will only be used by regulator of_node parsing. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1656466861-7737-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown drivers/regulator/mt6370-regulator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 199380decc5f9188a9e65676031950f1734aaffe Author: Mike Leach Date: Tue Jun 28 18:30:03 2022 +0100 coresight: configfs: Fix unload of configurations on module exit Any loaded configurations must be correctly unloaded on coresight module exit, or issues can arise with nested locking in the configfs directory code if built with CONFIG_LOCKDEP. Prior to this patch, the preloaded configuration configfs directory entries were being unloaded by the recursive code in configfs_unregister_subsystem(). However, when built with CONFIG_LOCKDEP, this caused a nested lock warning, which was not mitigated by the LOCKDEP dependent code in fs/configfs/dir.c designed to prevent this, due to the different directory levels for the root of the directory being removed. As the preloaded (and all other) configurations are registered after configfs_register_subsystem(), we now explicitly unload them before the call to configfs_unregister_subsystem(). The new routine cscfg_unload_cfgs_on_exit() iterates through the load owner list to unload any remaining configurations that were not unloaded by the user before the module exits. This covers both the CSCFG_OWNER_PRELOAD and CSCFG_OWNER_MODULE owner types, and will be extended to cover future load owner types for CoreSight configurations. Fixes: eb2ec49606c2 ("coresight: syscfg: Update load API for config loadable modules") Reported-by: Suzuki Poulose Signed-off-by: Mike Leach Reviewed-and-tested-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20220628173004.30002-2-mike.leach@linaro.org Signed-off-by: Mathieu Poirier drivers/hwtracing/coresight/coresight-syscfg.c | 104 ++++++++++++++++++++++--- 1 file changed, 93 insertions(+), 11 deletions(-) commit 6feaec81477af0390a41470cbd6b353f68dd853c Author: Andreas Gruenbacher Date: Sat Jun 11 05:00:23 2022 +0200 gfs2: List traversal in do_promote is safe In do_promote(), we're never removing the current entry from the list and so the list traversal is actually safe. Switch back to list_for_each_entry(). Signed-off-by: Andreas Gruenbacher fs/gfs2/glock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0befb8511e6a91716980c40c552acc5eec963cbd Author: Bob Peterson Date: Sat Jun 11 00:53:32 2022 +0200 gfs2: do_promote glock holder stealing fix In do_promote(), when the glock had no strong holders, we were accidentally calling demote_incompat_holders() with new_gh == NULL, so no weak holders were considered incompatible. Instead, the new holder should have been passed in. For doing that, the HIF_HOLDER flag needs to be set in new_gh to prevent may_grant() from complaining. This means that the new holder will now be recognized as a current holder, so skip over it explicitly in demote_incompat_holders() to prevent it from being dequeued. To further clarify things, we can now rename new_gh to current_gh in demote_incompat_holders(); after all, the HIF_HOLDER flag is already set, which means the new holder is already a current holder. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher fs/gfs2/glock.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 8f0028fc60a42a1305040676ce22e5f5488efee5 Author: Andreas Gruenbacher Date: Sat Jun 11 00:43:00 2022 +0200 gfs2: Use better variable name In do_promote() and add_to_queue(), use current_gh as the variable name for the first strong holder we could find: this matches the variable name is may_grant(), and more clearly indicates that we're interested in one (any) of the current strong holders. Signed-off-by: Andreas Gruenbacher fs/gfs2/glock.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 5f38a4d3c44b01495dcb4952b53d90170a30c51a Author: Andreas Gruenbacher Date: Fri Jun 10 12:06:06 2022 +0200 gfs2: Make go_instantiate take a glock Make go_instantiate take a glock instead of a glock holder as its argument: this handler is supposed to instantiate the object associated with the glock. Signed-off-by: Andreas Gruenbacher fs/gfs2/glock.c | 2 +- fs/gfs2/glops.c | 3 +-- fs/gfs2/incore.h | 2 +- fs/gfs2/rgrp.c | 3 +-- fs/gfs2/rgrp.h | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) commit 86c30a01f5da411d0d090f14f7aeadd8c20b2d05 Author: Andreas Gruenbacher Date: Fri Jun 10 11:42:33 2022 +0200 gfs2: Add new go_held glock operation Right now, inode_go_instantiate() contains functionality that relates to how a glock is held rather than the glock itself, like waiting for pending direct I/O to complete and completing interrupted truncates. This code is meant to be run each time a holder is acquired, but go_instantiate is actually only called once, when the glock is instantiated. To fix that, introduce a new go_held glock operation that is called each time a glock holder is acquired. Move the holder specific code in inode_go_instantiate() over to inode_go_held(). Signed-off-by: Andreas Gruenbacher fs/gfs2/glock.c | 10 ++++++++-- fs/gfs2/glops.c | 19 +++++++++++++------ fs/gfs2/incore.h | 1 + 3 files changed, 22 insertions(+), 8 deletions(-) commit de3f906f0af0c3f5d862b07df4d020c9322cd9c3 Author: Andreas Gruenbacher Date: Thu Jun 2 15:15:02 2022 -0500 gfs2: Revert 'Fix "truncate in progress" hang' Now that interrupted truncates are completed in the context of the process taking the glock, there is no need for the glock state engine to delegate that task to gfs2_quotad or for quotad to perform those truncates anymore. Get rid of the obsolete associated infrastructure. Reverts commit 813e0c46c9e2 ("GFS2: Fix "truncate in progress" hang"). Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/glock.c | 41 +++++------------------------------------ fs/gfs2/glock.h | 2 -- fs/gfs2/glops.c | 11 ++--------- fs/gfs2/incore.h | 3 --- fs/gfs2/main.c | 1 - fs/gfs2/ops_fstype.c | 2 -- fs/gfs2/quota.c | 28 +--------------------------- 7 files changed, 8 insertions(+), 80 deletions(-) commit 53d69132958f7e144973d02ad0f0798386219efd Author: Andreas Gruenbacher Date: Sat Jun 11 05:04:11 2022 +0200 gfs2: Instantiate glocks ouside of glock state engine Instantiate glocks outside of the glock state engine: there is no real reason for instantiating them inside the glock state engine; it only complicates the code. Instead, instantiate them in gfs2_glock_wait() and gfs2_glock_async_wait() using the new gfs2_glock_holder_ready() helper. On top of that, the only other place that acquires a glock without using gfs2_glock_wait() or gfs2_glock_async_wait() is gfs2_upgrade_iopen_glock(), so call gfs2_glock_holder_ready() there as well. If a dinode has a pending truncate, the glock-specific instantiate function for inodes wakes up the truncate function in the quota daemon. Waiting for the completion of the truncate was previously done by the glock state engine, but we now need to wait in inode_go_instantiate(). This also means that gfs2_instantiate() will now no longer return any "special" error codes. Signed-off-by: Andreas Gruenbacher fs/gfs2/glock.c | 66 ++++++++++++++++++++++++++++----------------------------- fs/gfs2/glock.h | 2 ++ fs/gfs2/glops.c | 2 +- fs/gfs2/super.c | 2 +- 4 files changed, 37 insertions(+), 35 deletions(-) commit bdff777cbb582da52cf4b536adc0815a41b407ed Author: Andreas Gruenbacher Date: Thu Jun 9 13:39:10 2022 +0200 gfs2: Fix up gfs2_glock_async_wait Since commit 1fc05c8d8426 ("gfs2: cancel timed-out glock requests"), a pending locking request can be canceled by calling gfs2_glock_dq() on the pending holder. In gfs2_glock_async_wait(), when we time out, use that to cancel the remaining locking requests and dequeue the locking requests already granted. That's simpler as well as more efficient than waiting for all locking requests to eventually be granted and dequeuing them then. In addition, gfs2_glock_async_wait() promises that by the time the function completes, all glocks are either granted or dequeued, but the implementation doesn't keep that promise if individual locking requests fail. Fix that as well. Signed-off-by: Andreas Gruenbacher fs/gfs2/glock.c | 53 +++++++++++++++-------------------------------------- 1 file changed, 15 insertions(+), 38 deletions(-) commit 0dbc49476ac7226130c79119f3f0d88e964880c0 Merge: 3f977c574dfd 9dbeef8ad5f8 Author: Mark Brown Date: Wed Jun 29 15:43:11 2022 +0100 spi support for Exynos Auto v9 SoC Merge series from Chanho Park : Add to support Exynos Auto v9 SoC's spi. By supporting USI(Universal Serial Interface) mode, the SoC can support up to 12 spi ports. Thus, we need to increase MAX_SPI_PORTS from 6 to 12. The spi of the SoC can support loopback mode unlike previous exynos SoCs. To separate the feature, we need to add .has_loopback to the s3c64xx_spi_port_config. Furthermore, it uses 4 as the default internal clock divider. We also need to clk_div field of the structure and assign "2" as the default value to the existing SoC's port config. Device tree definitions of exynosautov9-spi will be added in separated patchset to include usi(i2c/uart/spi) nodes all together. commit 7ed186642e6218671e27e2a36c86a70c1fba9ef9 Merge: d6910eaa6fc7 a7b028e4252b Author: Mark Brown Date: Wed Jun 29 15:43:09 2022 +0100 ASoC: codecs: add WSA883x support Merge series from Srinivas Kandagatla : This patchset adds support for WSA883x smart speaker amplifier codec connected via SoundWire. This codec also has a temperature sensor used for speaker protection, support for this is not added yet. Most of the code is derived from Qualcomm downstream msm-5.10 kernel. Thanks to Patrick Lai's Team. This codec is tested on SM8450 MTP. commit 22d0c4080fe49299640d9d6c43154c49794c2825 Author: Christoph Hellwig Date: Wed Jun 29 08:20:13 2022 +0200 block: simplify disk_set_independent_access_ranges Lift setting disk->ia_ranges from disk_register_independent_access_ranges into disk_set_independent_access_ranges, and make the behavior the same for the registered vs non-registered queue cases. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Link: https://lore.kernel.org/r/20220629062013.1331068-3-hch@lst.de Signed-off-by: Jens Axboe block/blk-ia-ranges.c | 57 +++++++++++++++------------------------------------ block/blk-sysfs.c | 2 +- block/blk.h | 3 +-- 3 files changed, 18 insertions(+), 44 deletions(-) commit 6a27d28c81bc5843de2490688a04ee5baa6615e7 Author: Christoph Hellwig Date: Wed Jun 29 08:20:12 2022 +0200 block: move ->ia_ranges from the request_queue to the gendisk Independent access ranges only matter for file system I/O and are only valid with a registered gendisk, so move them there. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Link: https://lore.kernel.org/r/20220629062013.1331068-2-hch@lst.de Signed-off-by: Jens Axboe block/blk-ia-ranges.c | 18 +++++++++--------- include/linux/blkdev.h | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) commit b9a1c179bdfa133d28ab8b7d30631b0accdc2057 Author: Ying Sun Date: Wed Jun 29 14:24:09 2022 +0800 block: remove "select BLK_RQ_IO_DATA_LEN" from BLK_CGROUP_IOCOST dependency The configuration item BLK_RQ_IO_DATA_LEN is not declared in the kernel. Select BLK_RQ_IO_DATA_LEN is meaningless which could be removed. Signed-off-by: Ying Sun Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220629062409.19458-1-sunying@nj.iscas.ac.cn Signed-off-by: Jens Axboe block/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 77940f0d96cd2ec9fe2125f74f513a7254bcdd7f Author: Christian Brauner Date: Wed Jun 29 16:31:12 2022 +0200 mnt_idmapping: align kernel doc and parameter order The kernel documentation added for the new helpers had a few tiny ordering issues. Fix them. Signed-off-by: Christian Brauner (Microsoft) include/linux/mnt_idmapping.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 5b6d7c3c5861ad4ad43eb7b7b64689221b2fc53f Author: Clément Léger Date: Fri Jun 24 16:40:00 2022 +0200 ARM: dts: r9a06g032-rzn1d400-db: Add switch description Add the description for the switch, GMAC2 and MII converter. With these definitions, the switch ports 0 and 1 (MII ports 5 and 4) are working on the RZ/N1D-DB board. Signed-off-by: Clément Léger Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20220624144001.95518-16-clement.leger@bootlin.com Signed-off-by: Geert Uytterhoeven arch/arm/boot/dts/r9a06g032-rzn1d400-db.dts | 115 ++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) commit 45ed13d9b40cc711a996192a8ef98c0f773238e6 Author: Clément Léger Date: Fri Jun 24 16:39:49 2022 +0200 dt-bindings: net: pcs: add bindings for Renesas RZ/N1 MII converter This MII converter can be found on the RZ/N1 processor family. The MII converter ports are declared as subnodes which are then referenced by users of the PCS driver such as the switch. Signed-off-by: Clément Léger Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220624144001.95518-5-clement.leger@bootlin.com Signed-off-by: Geert Uytterhoeven .../bindings/net/pcs/renesas,rzn1-miic.yaml | 171 +++++++++++++++++++++ include/dt-bindings/net/pcs-rzn1-miic.h | 33 ++++ 2 files changed, 204 insertions(+) commit 2f805cba10d7b3892707f160502ffb3ee57f4a52 Author: Geert Uytterhoeven Date: Wed Jun 15 15:59:41 2022 +0200 pinctrl: renesas: r8a779f0: Remove unused POC2 The POWER Condition Control Register 2 (POC2) is unused, and the documentation does not define any valid bits. Remove it. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/d8a9ea39b49d24e39f4da3f00b64bce34016887d.1655301529.git.geert+renesas@glider.be drivers/pinctrl/renesas/pfc-r8a779f0.c | 2 -- 1 file changed, 2 deletions(-) commit b6b9585876da018bdde2d5f15d206a689c0d70f3 Author: Clément Léger Date: Fri Jun 17 12:37:30 2022 +0200 reset: microchip-sparx5: allow building as a module Set RESET_MCHP_SPARX5 as a tristate and add MODULE_DEVICE_TABLE() to allow building this driver as a module. Signed-off-by: Clément Léger Signed-off-by: Philipp Zabel Link: https://lore.kernel.org/r/20220617103730.490588-1-clement.leger@bootlin.com drivers/reset/Kconfig | 2 +- drivers/reset/reset-microchip-sparx5.c | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) commit cda41c14ab8ae25acec3b8b956336bbb05cedc35 Author: Clément Léger Date: Fri Jun 24 16:39:59 2022 +0200 ARM: dts: r9a06g032: Describe switch Add the description of the switch that is present on the RZ/N1 SoC. This description includes ethernet-port descriptions for all the ports that are present on the switch along with their connection to the MII converter ports and to the GMAC for the CPU port. Signed-off-by: Clément Léger Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20220624144001.95518-15-clement.leger@bootlin.com Signed-off-by: Geert Uytterhoeven arch/arm/boot/dts/r9a06g032.dtsi | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit c6f600923600e7af24efab1697a859d1d2389c66 Author: Clément Léger Date: Fri Jun 24 16:39:58 2022 +0200 ARM: dts: r9a06g032: Describe GMAC2 The RZ/N1 SoC includes two MACs named GMACx that are compatible with the "snps,dwmac" driver. GMAC1 is connected directly to the MII converter port 1. GMAC2 however can be used as the MAC for the switch CPU management port or can be muxed to be connected directly to the MII converter port 2. This commit adds the description for the GMAC2 which will be used by the switch description. Signed-off-by: Clément Léger Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220624144001.95518-14-clement.leger@bootlin.com Signed-off-by: Geert Uytterhoeven arch/arm/boot/dts/r9a06g032.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit dc0f67311416c86ed3c6f14a365c8e833ed4b8dd Author: Clément Léger Date: Fri Jun 24 16:39:57 2022 +0200 ARM: dts: r9a06g032: Describe MII converter Add the MII converter node which describes the MII converter that is present on the RZ/N1 SoC. Signed-off-by: Clément Léger Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220624144001.95518-13-clement.leger@bootlin.com Signed-off-by: Geert Uytterhoeven arch/arm/boot/dts/r9a06g032.dtsi | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit a71a62dd5e012e3786e54d43b260ed9d74e75a1a Author: Geert Uytterhoeven Date: Wed Jun 15 15:58:40 2022 +0200 dt-bindings: pinctrl: renesas: Remove spaces before #define Remove spaces at the beginning of lines with #defines. Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/r/5188ef93a911ce3781b16530fdebbf0f0af462b6.1655301264.git.geert+renesas@glider.be include/dt-bindings/pinctrl/r7s9210-pinctrl.h | 2 +- include/dt-bindings/pinctrl/rzg2l-pinctrl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d1273f541ab409242e08da6bb836bb564021274c Author: Chris Paterson Date: Thu Jun 23 11:30:24 2022 +0100 arm64: dts: renesas: r9a07g054l2-smarc: Correct SoC name in comment This dts is for the RZ/V2L SMARC EVK, not RZ/G2L. Fixes: f91c4c74796a ("arm64: dts: renesas: Add initial device tree for RZ/V2L SMARC EVK") Signed-off-by: Chris Paterson Link: https://lore.kernel.org/r/20220623103024.24222-1-chris.paterson2@renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r9a07g054l2-smarc.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 826783953013150aa94afd727e324a4987e574cb Author: Geert Uytterhoeven Date: Tue Jun 21 15:33:10 2022 +0200 ARM: dts: renesas: Fix DA9063 watchdog subnode names make dtbs_check: arch/arm/boot/dts/r8a7791-koelsch-single-memory-node.dtb: pmic@58: 'wdt' does not match any of the regexes: 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/mfd/dlg,da9063.yaml ... Change the watchdog child node names to match the DA9063 DT bindings and the Generic Names Recommendation in the Devicetree Specification. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/1dafdce285f7d14bec9e2033ac87fb30135895db.1655818230.git.geert+renesas@glider.be arch/arm/boot/dts/r8a7790-lager.dts | 2 +- arch/arm/boot/dts/r8a7790-stout.dts | 2 +- arch/arm/boot/dts/r8a7791-koelsch.dts | 2 +- arch/arm/boot/dts/r8a7791-porter.dts | 2 +- arch/arm/boot/dts/r8a7792-blanche.dts | 2 +- arch/arm/boot/dts/r8a7793-gose.dts | 2 +- arch/arm/boot/dts/r8a7794-alt.dts | 2 +- arch/arm/boot/dts/r8a7794-silk.dts | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) commit f48cb21a28c07d0754d5f2f85444cfb0e7b1fd05 Author: Geert Uytterhoeven Date: Fri Jun 17 11:36:58 2022 +0200 arm64: dts: renesas: r8a779m8: Drop operating points above 1.5 GHz The highest-performance mode for the Cortex-A57 CPU cores supported on R-Car H3Ne (R8A779M8) is the Power Optimized (1.5 GHz) mode. The Normal (1.6 GHz) and High Performance (1.7 GHz) modes are not supported. Hence drop the "turbo-mode" entries from the operating points table inherited from r8a77951.dtsi. Fixes: 6e87525d751fac57 ("arm64: dts: renesas: Add Renesas R8A779M8 SoC support") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/aeb4530f7fbac8329b334dcb169382c836a5f32d.1655458564.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779m8.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 0553b288ab2656c1d00ce17320be8873a16d6ca0 Author: Geert Uytterhoeven Date: Fri Jun 17 11:04:10 2022 +0200 MAINTAINERS: Add Renesas SoC DT bindings to Renesas Architecture sections While Renesas SoC DT bindings documents started to appear under Documentation/devicetree/bindings/soc/renesas, these are not yet covered by the file and directory patterns in the Renesas ARM/ARM64 Architecture sections. Add the missing patterns. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/f99c03a95a103517418f0b23d3da45e0dd0ffb3b.1655456310.git.geert+renesas@glider.be MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 702e70143291b09e6245deb8ab904d1c18ed4f47 Author: Maksym Glubokiy Date: Mon Jun 27 12:50:18 2022 +0300 net: prestera: acl: add support for 'egress' rules The following is now supported: $ tc qdisc add PORT clsact $ tc filter add dev PORT egress ... Signed-off-by: Maksym Glubokiy Signed-off-by: David S. Miller drivers/net/ethernet/marvell/prestera/prestera.h | 3 +- .../net/ethernet/marvell/prestera/prestera_acl.c | 47 ++++++++++++++----- .../net/ethernet/marvell/prestera/prestera_acl.h | 4 +- .../net/ethernet/marvell/prestera/prestera_flow.c | 52 +++++++++++++++------- .../net/ethernet/marvell/prestera/prestera_flow.h | 1 + .../ethernet/marvell/prestera/prestera_flower.c | 2 +- .../net/ethernet/marvell/prestera/prestera_hw.h | 7 +-- 7 files changed, 82 insertions(+), 34 deletions(-) commit 04cfbc1d89d4cc73b5b328e3bacf24d43e9aa4b7 Author: Petr Machata Date: Tue Jun 28 12:37:44 2022 +0200 selftests: forwarding: ethtool_extended_state: Convert to busywait Currently, this script sets up the test scenario, which is supposed to end in an inability of the system to negotiate a link. It then waits for a bit, and verifies that the system can diagnose why the link was not established. The wait time for the scenario where different link speeds are forced on the two ends of a loopback cable, was set to 4 seconds, which exactly covered it. As of a recent mlxsw firmware update, this time gets longer, and this test starts failing. The time that selftests currently wait for links to be established is currently $WAIT_TIMEOUT, or 20 seconds. It seems reasonable that if this is the time necessary to establish and bring up a link, it should also be enough to determine that a link cannot be established and why. Therefore in this patch, convert the sleeps to busywaits, so that if a failure is established sooner (as is expected), the test runs quicker. And use $WAIT_TIMEOUT as the time to wait. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Signed-off-by: David S. Miller .../net/forwarding/ethtool_extended_state.sh | 43 ++++++++++++++-------- 1 file changed, 28 insertions(+), 15 deletions(-) commit 9bacb93bcfb83ab0e939ce9185f8ba910fb6adb0 Author: Walter Heymans Date: Tue Jun 28 14:18:02 2022 +0200 nfp: flower: fix comment typos and formatting A number of spelling and language mistakes in the flower section are fixed. The spacing between the text inside some comments and the comment symbols are also updated for consistency. Signed-off-by: Walter Heymans Reviewed-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/action.c | 2 +- drivers/net/ethernet/netronome/nfp/flower/conntrack.c | 14 +++++++------- drivers/net/ethernet/netronome/nfp/flower/lag_conf.c | 4 ++-- drivers/net/ethernet/netronome/nfp/flower/metadata.c | 2 +- drivers/net/ethernet/netronome/nfp/flower/offload.c | 4 ++-- drivers/net/ethernet/netronome/nfp/flower/qos_conf.c | 6 +++--- drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) commit 0b768a9610c6de9811c6d33900bebfb665192ee1 Author: Matthew Wilcox (Oracle) Date: Mon May 16 10:30:09 2022 -0400 nfs: Leave pages in the pagecache if readpage failed The pagecache handles readpage failing by itself; it doesn't want filesystems to remove pages from under it. Signed-off-by: Matthew Wilcox (Oracle) fs/nfs/read.c | 4 ---- 1 file changed, 4 deletions(-) commit 6e8e79fc84435c159891182cddab8e7784e1b3b2 Author: Matthew Wilcox (Oracle) Date: Thu May 26 16:03:43 2022 -0400 buffer: Remove check for PageError If a buffer is completed with an error, its uptodate flag will be clear, so the page_uptodate variable will have been set to 0. There's no need to check PageError here. Signed-off-by: Matthew Wilcox (Oracle) fs/buffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9329883a1c9b200bfe7f3c9e5338c407a690e39b Author: Matthew Wilcox (Oracle) Date: Fri Apr 29 11:12:16 2022 -0400 orangefs: Remove test for folio error The page cache clears the error bit before calling ->read_folio(), so this condition could never have been true. Signed-off-by: Matthew Wilcox (Oracle) fs/orangefs/inode.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ba9863127cdf9e438f277e15533bb9ebff87897d Author: Matthew Wilcox (Oracle) Date: Wed May 25 00:10:01 2022 -0400 iomap: Remove test for folio error Just because there has been a read error doesn't mean we should avoid marking this part of the folio as uptodate. Indeed, it may overwrite the error part of the folio and let us mark the entire folio uptodate. Signed-off-by: Matthew Wilcox (Oracle) fs/iomap/buffered-io.c | 3 --- 1 file changed, 3 deletions(-) commit 3b60d53df07fc67422cb7cadd1c2c6df720a1922 Author: Matthew Wilcox (Oracle) Date: Tue May 17 23:32:34 2022 -0400 jfs: Remove check for PageUptodate Pages returned from read_mapping_page() are always uptodate, so this check is unnecessary. Signed-off-by: Matthew Wilcox (Oracle) fs/jfs/jfs_metapage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da028b6b648e7f7bcfa52521675980f291b34c2a Author: Matthew Wilcox (Oracle) Date: Tue May 17 23:29:06 2022 -0400 remap_range: Remove check of uptodate flag read_mapping_folio() returns an ERR_PTR if the folio is not uptodate, so this check is simply dead code. Signed-off-by: Matthew Wilcox (Oracle) fs/remap_range.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 771075e15e39b30abcf38186592383f38d06a40f Author: Matthew Wilcox (Oracle) Date: Tue May 17 18:12:25 2022 -0400 ufs: Remove checks for PageError If read_mapping_page() encounters an error, it returns an errno, not a page with PageError set, or a page that is not Uptodate, so this is dead code. Signed-off-by: Matthew Wilcox (Oracle) fs/ufs/dir.c | 2 +- fs/ufs/util.c | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) commit b0c971e7b76887bfab44e6b891e90ebb4c637172 Author: Matthew Wilcox (Oracle) Date: Tue May 17 18:12:25 2022 -0400 reiserfs: Remove check for PageError If read_mapping_page() encounters an error, it returns an errno, not a page with PageError set, so this is dead code. Signed-off-by: Matthew Wilcox (Oracle) fs/reiserfs/xattr.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 19cb4273a245dae6ed1168172c619ccbf6a704bc Author: Matthew Wilcox (Oracle) Date: Tue May 17 18:12:25 2022 -0400 ntfs3: Remove check for PageError If read_mapping_page() encounters an error, it returns an errno, not a page with PageError set, so this is dead code. Signed-off-by: Matthew Wilcox (Oracle) fs/ntfs3/ntfs_fs.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 62a3a4dd476d5d1db9f13bb902f78fed2b6abd18 Author: Matthew Wilcox (Oracle) Date: Tue May 17 18:12:25 2022 -0400 ntfs: Remove check for PageError If read_mapping_page() encounters an error, it returns an errno, not a page with PageError set, so this is dead code. Signed-off-by: Matthew Wilcox (Oracle) fs/ntfs/aops.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 79ea65563ad8aaab309d61eeb4d5019dd6cf5fa0 Author: Matthew Wilcox (Oracle) Date: Tue May 17 18:12:25 2022 -0400 nilfs2: Remove check for PageError If read_mapping_page() encounters an error, it returns an errno, not a page with PageError set, so this test is not needed. Signed-off-by: Matthew Wilcox (Oracle) fs/nilfs2/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 750cd7d0e65f2f65c52932ea48b2702fee6ab7a7 Author: Matthew Wilcox (Oracle) Date: Tue May 17 18:12:25 2022 -0400 ext2: Remove check for PageError If read_mapping_page() encounters an error, it returns an errno, not a page with PageError set, so this test is not needed. Signed-off-by: Matthew Wilcox (Oracle) fs/ext2/dir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 17bb55487988c5dac32d55a4f085e52f875f98cc Author: Matthew Wilcox (Oracle) Date: Tue May 17 18:12:25 2022 -0400 ntfs: Remove check for PageError If read_mapping_page() encounters an error, it returns an errno, not a page with PageError set, so this is dead code. Signed-off-by: Matthew Wilcox (Oracle) fs/ntfs/file.c | 5 ----- 1 file changed, 5 deletions(-) commit ca02bcabd79f7a58d97e1ec0a3439e47139282ec Author: Matthew Wilcox (Oracle) Date: Tue May 17 18:12:25 2022 -0400 hfsplus: Remove check for PageError If read_mapping_page() encounters an error, it returns an errno, not a page with PageError set, so this is dead code. Signed-off-by: Matthew Wilcox (Oracle) fs/hfsplus/bnode.c | 4 ---- 1 file changed, 4 deletions(-) commit c9ed489c664cf041a785c0117a21bc6d71545dde Author: Matthew Wilcox (Oracle) Date: Tue May 17 18:12:25 2022 -0400 hfs: Remove check for PageError If read_mapping_page() encounters an error, it returns an errno, not a page with PageError set, so this is dead code. Signed-off-by: Matthew Wilcox (Oracle) fs/hfs/bnode.c | 4 ---- 1 file changed, 4 deletions(-) commit 54c6260fa88180a758645fe5ceeecb10cd5f4dd0 Author: Matthew Wilcox (Oracle) Date: Tue May 17 18:12:25 2022 -0400 freevxfs: Remove check of PageError If read_mapping_page() encounters an error, it returns an errno, not a page with PageError set, so this is dead code. Signed-off-by: Matthew Wilcox (Oracle) fs/freevxfs/vxfs_subr.c | 6 ------ 1 file changed, 6 deletions(-) commit 59fc64740571685441f754db4846a1fb22896b53 Author: Matthew Wilcox (Oracle) Date: Fri May 13 14:53:02 2022 -0400 afs: Remove check of PageError If read_mapping_page() encounters an error, it returns an errno, not a page with PageError set, so this is dead code. Signed-off-by: Matthew Wilcox (Oracle) fs/afs/mntpt.c | 6 ------ 1 file changed, 6 deletions(-) commit 0e00fa5f83606064f3b7bb11d9608d216ac6b45a Author: Matthew Wilcox (Oracle) Date: Tue May 17 18:12:25 2022 -0400 block: Remove check of PageError If read_mapping_page() sees a page with PageError set, it returns a PTR_ERR(). Checking PageError again is simply dead code. Signed-off-by: Matthew Wilcox (Oracle) block/partitions/core.c | 4 ---- 1 file changed, 4 deletions(-) commit 90c02eb9a76c16427d644927a0de86600ad5ef85 Author: Matthew Wilcox (Oracle) Date: Fri Apr 29 08:45:43 2022 -0400 docs: Improve ->read_folio documentation Add information on the use of 'file', whether ->read_folio should be synchronous, and steer new callers towards calling read_mapping_folio() instead of calling ->read_folio directly. Signed-off-by: Matthew Wilcox (Oracle) Documentation/filesystems/vfs.rst | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) commit 290e1a320437011fc4f26456ab45eaebf9e44f5e Author: Matthew Wilcox (Oracle) Date: Thu May 12 17:37:01 2022 -0400 filemap: Use filemap_read_folio() in do_read_cache_folio() By passing ->read_folio to filemap_read_folio(), we can use filemap_read_folio() in do_read_cache_folio(). Signed-off-by: Matthew Wilcox (Oracle) mm/filemap.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) commit 1dfa24a4bf3b00325d3957019e3ada2ec21d82cf Author: Matthew Wilcox (Oracle) Date: Thu May 12 17:47:06 2022 -0400 filemap: Handle AOP_TRUNCATED_PAGE in do_read_cache_folio() If the call to filler() returns AOP_TRUNCATED_PAGE, we need to retry the page cache lookup. Signed-off-by: Matthew Wilcox (Oracle) mm/filemap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9bc3e869386bdf5a00ecf71d6592050997e69d53 Author: Matthew Wilcox (Oracle) Date: Thu May 12 17:12:21 2022 -0400 filemap: Move 'filler' case to the end of do_read_cache_folio() No functionality change intended; this simply moves code around to disentangle the function a little. Signed-off-by: Matthew Wilcox (Oracle) mm/filemap.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit 0e8e08cca5e3256a6209f02b482bee96fb91ba1b Author: Matthew Wilcox (Oracle) Date: Fri Apr 29 08:49:28 2022 -0400 netfs: Remove extern from function prototypes The 'extern' keyword is not necessary and removing it lets us shorten some lines. Signed-off-by: Matthew Wilcox (Oracle) include/linux/netfs.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit bb4b42ba926224e26ed699e51def164b4b163935 Author: Matthew Wilcox (Oracle) Date: Sat Jun 4 17:46:02 2022 -0400 filemap: Remove find_get_pages_range() and associated functions All callers of find_get_pages_range(), pagevec_lookup_range() and pagevec_lookup() have now been removed. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Acked-by: Christian Brauner (Microsoft) include/linux/pagemap.h | 3 --- include/linux/pagevec.h | 10 -------- mm/filemap.c | 67 ------------------------------------------------- mm/swap.c | 29 --------------------- 4 files changed, 109 deletions(-) commit 105c988f5dd76397616e0392ea85d45225397191 Author: Matthew Wilcox (Oracle) Date: Sat Jun 4 17:40:17 2022 -0400 shmem: Convert shmem_unlock_mapping() to use filemap_get_folios() This is a straightforward conversion. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Acked-by: Christian Brauner (Microsoft) mm/shmem.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 77414d195f905dd43f58bce82118775ffa59575c Author: Matthew Wilcox (Oracle) Date: Sat Jun 4 17:39:09 2022 -0400 vmscan: Add check_move_unevictable_folios() Change the guts of check_move_unevictable_pages() over to use folios and add check_move_unevictable_pages() as a wrapper. Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Christian Brauner (Microsoft) include/linux/swap.h | 3 ++- mm/vmscan.c | 56 +++++++++++++++++++++++++++++++--------------------- 2 files changed, 36 insertions(+), 23 deletions(-) commit f6e0e173442459759f0bfc76a3693c47a615d54c Author: Matthew Wilcox (Oracle) Date: Sat Jun 4 16:40:39 2022 -0400 nilfs2: Convert nilfs_copy_back_pages() to use filemap_get_folios() Use folios throughout. Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Ryusuke Konishi Reviewed-by: Christoph Hellwig Acked-by: Christian Brauner (Microsoft) fs/nilfs2/page.c | 60 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit 1508062ecd5515bcd50e76ceda20d626e8bfe939 Author: Matthew Wilcox (Oracle) Date: Sat Jun 4 16:39:04 2022 -0400 hugetlbfs: Convert remove_inode_hugepages() to use filemap_get_folios() Use folios throughout this function. That removes the last caller of huge_pagevec_release(), so delete that too. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Acked-by: Christian Brauner (Microsoft) fs/hugetlbfs/inode.c | 44 ++++++++++++++------------------------------ 1 file changed, 14 insertions(+), 30 deletions(-) commit bbfe4f66002a1a0816e2f5dd3c87dd76dbfd41e6 Author: Matthew Wilcox (Oracle) Date: Sat Jun 4 16:27:58 2022 -0400 f2fs: Convert f2fs_invalidate_compress_pages() to use filemap_get_folios() Convert this function to use folios throughout. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Acked-by: Christian Brauner (Microsoft) Acked-by: Chao Yu fs/f2fs/compress.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) commit 7530d0935cc7a5c58eab0acbc4ab8d32ac476d9a Author: Matthew Wilcox (Oracle) Date: Sat Jun 4 16:26:01 2022 -0400 ext4: Convert mpage_map_and_submit_buffers() to use filemap_get_folios() The called functions all use pages, so just convert back to a page. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Acked-by: Christian Brauner (Microsoft) fs/ext4/inode.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit fb5a5be05fb45ab6fb3d1036c53435cde3d420ab Author: Matthew Wilcox (Oracle) Date: Fri Jun 3 15:36:49 2022 -0400 ext4: Convert mpage_release_unused_pages() to use filemap_get_folios() If the folio is large, it may overlap the beginning or end of the unused range. If it does, we need to avoid invalidating it. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Acked-by: Christian Brauner (Microsoft) fs/ext4/inode.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 9e0b6f31bae6645010d2aa325560e74c05e17e5b Author: Matthew Wilcox (Oracle) Date: Sat Jun 4 16:24:22 2022 -0400 buffer: Convert clean_bdev_aliases() to use filemap_get_folios() Use a folio throughout this function. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Acked-by: Christian Brauner (Microsoft) fs/buffer.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit be0ced5e9cb81a4c2edefd081a7794a1814fb60d Author: Matthew Wilcox (Oracle) Date: Fri Jun 3 15:30:25 2022 -0400 filemap: Add filemap_get_folios() This is the equivalent of find_get_pages() but fills a folio_batch instead of an array of pages. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Acked-by: Christian Brauner (Microsoft) include/linux/pagemap.h | 2 ++ mm/filemap.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) commit 2bb876b58d593d7f2522ec0f41f20a74fde76822 Author: Matthew Wilcox (Oracle) Date: Wed Jun 1 15:13:59 2022 -0400 filemap: Remove add_to_page_cache() and add_to_page_cache_locked() These functions have no more users, so delete them. Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Mike Kravetz Reviewed-by: Muchun Song Documentation/admin-guide/cgroup-v1/memcg_test.rst | 2 +- include/linux/pagemap.h | 18 ------------------ mm/filemap.c | 20 -------------------- mm/shmem.c | 2 +- mm/swap_state.c | 2 +- 5 files changed, 3 insertions(+), 41 deletions(-) commit d9ef44de5d731e1a1fa94ddb5e39ea1b308b1456 Author: Matthew Wilcox (Oracle) Date: Wed Jun 1 15:11:01 2022 -0400 hugetlb: Convert huge_add_to_page_cache() to use a folio Remove the last caller of add_to_page_cache() Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song fs/hugetlbfs/inode.c | 2 +- mm/hugetlb.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) commit 211d04445b96db5b3640bcf345ad59105068a549 Author: Matthew Wilcox (Oracle) Date: Fri Jun 10 22:58:24 2022 -0400 mpage: Convert do_mpage_readpage() to use a folio Pass in a folio from mpage_readahead(). Also convert map_buffer_to_page() to map_buffer_to_folio(). There's still no support for large folios here; there are numerous places which depend on the folio being PAGE_SIZE. The VM_BUG_ON prevents anyone from thinking that it will work. Signed-off-by: Matthew Wilcox (Oracle) fs/mpage.c | 78 ++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 40 insertions(+), 38 deletions(-) commit 6ffcd825e7d0416d78fd41cd5b7856a78122cc8c Author: Matthew Wilcox (Oracle) Date: Tue Jun 28 20:41:40 2022 -0400 mm: Remove __delete_from_page_cache() This wrapper is no longer used. Remove it and all references to it. Signed-off-by: Matthew Wilcox (Oracle) fs/inode.c | 2 +- include/linux/pagemap.h | 4 ---- mm/memory-failure.c | 2 +- mm/shmem.c | 2 +- mm/truncate.c | 2 +- 5 files changed, 4 insertions(+), 8 deletions(-) commit fb5c2029f8221e904e604938171c4a8ef169aadb Author: Matthew Wilcox (Oracle) Date: Tue Jun 28 20:15:29 2022 -0400 mm: Account dirty folios properly during splits If the last folio in a file is split as a result of truncation, we simply clear the dirty bits for the pages we're discarding. That causes NR_FILE_DIRTY (among other counters) to be thrown off and eventually Linux will hang in balance_dirty_pages_ratelimited() Reported-by: Dave Chinner Tested-by: Dave Chinner Tested-by: Darrick J. Wong Fixes: d68eccad3706 ("mm/filemap: Allow large folios to be added to the page cache") Signed-off-by: Matthew Wilcox (Oracle) mm/huge_memory.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 4b2373c91f057f3e9102a25222a66ae01c5b772c Merge: 216516351315 9d95329c65db Author: David S. Miller Date: Wed Jun 29 13:48:00 2022 +0100 Merge branch 'dsa-microchip-ksz_chip_reg' Arun Ramadoss says: ==================== net: dsa: microchip: use ksz_chip_reg for This patch series tries to use the same approach as struct ksz8 for register which has different address for different switch family. It moves the struct ksz8 from ksz8.h to struct ksz_chip_reg. Based on the switch detect, the corresponding mask, reg and shifts are assigned. ==================== Signed-off-by: David S. Miller commit 9d95329c65db9b3041693637339250979e762cbc Author: Arun Ramadoss Date: Tue Jun 28 22:43:29 2022 +0530 net: dsa: microchip: move remaining register offset to ksz_chip_reg This patch moves the broadcast ctrl, multicast ctrl and start control registers from ksz_chip_dat to ksz_chip_reg. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz_common.c | 57 +++++++++------------------------- drivers/net/dsa/microchip/ksz_common.h | 3 ++ 2 files changed, 18 insertions(+), 42 deletions(-) commit 6877102f95f3835952b5c0685e991e24ef9b2a21 Author: Arun Ramadoss Date: Tue Jun 28 22:43:28 2022 +0530 net: dsa: microchip: add P_STP_CTRL to ksz_chip_reg This patch moves the stp_ctrl_reg from the ksz_chip_data to ksz_chip_reg structure. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8795.c | 17 ++++++++------- drivers/net/dsa/microchip/ksz8795_reg.h | 1 - drivers/net/dsa/microchip/ksz9477.c | 7 ++++--- drivers/net/dsa/microchip/ksz9477_reg.h | 1 - drivers/net/dsa/microchip/ksz_common.c | 37 ++++++++++++++++++--------------- drivers/net/dsa/microchip/ksz_common.h | 1 + 6 files changed, 35 insertions(+), 29 deletions(-) commit a02579df160e2fb64764064182bc3c205d812aa4 Author: Arun Ramadoss Date: Tue Jun 28 22:43:27 2022 +0530 net: dsa: microchip: change the size of reg from u8 to u16 The register size for the ksz8 switches is u8 and for ksz9477 series is u16. To have common struct for ksz series switches the size of reg is increased from u8 to u16. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8795.c | 22 +++++++++++----------- drivers/net/dsa/microchip/ksz_common.c | 4 ++-- drivers/net/dsa/microchip/ksz_common.h | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) commit 47d82864eee104d22f282b24098e2dcdc0e73cbe Author: Arun Ramadoss Date: Tue Jun 28 22:43:26 2022 +0530 net: dsa: microchip: remove the struct ksz8 This patch removes the struct ksz8 from ksz8.h which is no longer needed. The platform bus specific details are now deferenced through dev->priv. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8.h | 4 ---- drivers/net/dsa/microchip/ksz8863_smi.c | 17 +++-------------- drivers/net/dsa/microchip/ksz_spi.c | 10 +--------- 3 files changed, 4 insertions(+), 27 deletions(-) commit 34e48383636f61152dcc38eb6ec4396b8daa39b4 Author: Arun Ramadoss Date: Tue Jun 28 22:43:25 2022 +0530 net: dsa: microchip: move ksz8->shifts to ksz_common This patch moves ksz8->shifts from ksz8795.c to ksz_common.c. The shifts are dereferenced using dev->info->shifts. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8.h | 13 --------- drivers/net/dsa/microchip/ksz8795.c | 49 +++++----------------------------- drivers/net/dsa/microchip/ksz_common.c | 27 +++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 13 +++++++++ 4 files changed, 46 insertions(+), 56 deletions(-) commit d23a5e18606ce3017773691670c2b528e417b1a3 Author: Arun Ramadoss Date: Tue Jun 28 22:43:24 2022 +0530 net: dsa: microchip: move ksz8->masks to ksz_common This patch moves the ksz8->masks from ksz8795.c to ksz_common.c. The mask will be dereferenced using dev->info->masks. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8.h | 23 ----------- drivers/net/dsa/microchip/ksz8795.c | 71 +++++---------------------------- drivers/net/dsa/microchip/ksz9477_reg.h | 2 - drivers/net/dsa/microchip/ksz_common.c | 48 ++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 23 +++++++++++ 5 files changed, 81 insertions(+), 86 deletions(-) commit 486f9ca715d7b70ed79dbe91296b9e0110deaab5 Author: Arun Ramadoss Date: Tue Jun 28 22:43:23 2022 +0530 net: dsa: microchip: move ksz8->regs to ksz_common This patch moves the ksz8->regs from ksz8795.c to the ksz_common.c. And the regs is dereferrenced using dev->info->regs. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8.h | 18 -------- drivers/net/dsa/microchip/ksz8795.c | 76 +++++++++++---------------------- drivers/net/dsa/microchip/ksz9477_reg.h | 3 -- drivers/net/dsa/microchip/ksz_common.c | 37 ++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 18 ++++++++ 5 files changed, 79 insertions(+), 73 deletions(-) commit acd6510dd7ab3664b69eb99e37c4fd6325a7d442 Author: Tanmay Shah Date: Tue Jun 7 15:42:54 2022 -0700 firmware: xilinx: Add TF_A_PM_REGISTER_SGI SMC call SGI interrupt register and reset is performed by EEMI ioctl IOCTL_REGISTER_SGI. However, this is not correct use of EEMI call. SGI registration functionality does not qualify as energy management activity and so shouldn't be mapped to EEMI call. This new call will replace IOCTL_REGISTER_SGI and will be handled by TF-A specific handler in TF-A. To maintain backward compatibility for a while firmware driver will still use IOCTL_REGISTER_SGI as fallback strategy if new call fails or is not supported by TF-A. This new design also helps to make TF-A as pass through layer for EEMI calls. So we don't have to maintain PM_IOCTL as EEMI API ID in TF-A. Signed-off-by: Tanmay Shah Acked-by: Michal Simek Link: https://lore.kernel.org/r/20220607224253.54919-1-tanmay.shah@xilinx.com Signed-off-by: Michal Simek drivers/firmware/xilinx/zynqmp.c | 16 +++++++++++++++- drivers/soc/xilinx/xlnx_event_manager.c | 5 ++--- include/linux/firmware/xlnx-zynqmp.h | 7 +++++++ 3 files changed, 24 insertions(+), 4 deletions(-) commit 2165163513150d347641845845879abbca63f41d Merge: bfc715146ea6 02e9ce07d8b8 Author: David S. Miller Date: Wed Jun 29 13:45:31 2022 +0100 Merge branch 'mtk-star-emac-features' Biao Huang says: ==================== net: add more features for mtk-star-emac Changes in v4: 1. correct the usage of spin_lock/__napi_schedule. 2. fix coding style as Jakub's comments. Changes in v3: 1. refractor driver as Jakub's comments in patch "net: ethernet: mtk-star-emac: separate tx/rx handling with two NAPIs". 2. add acked-by as Rob's comments. 3. add a new patch for halp-duplex support in driver. Changes in v2: 1. fix coding style as Bartosz's comments. 2. add reviewed-by as Bartosz's comments. This series add more features for mtk-star-emac: 1. add reference clock pad selection for RMII; 2. add simple timing adjustment for RMII; 3. add support for MII; 4. add support for new IC MT8365; 5. separate tx/rx interrupt handling. ==================== Signed-off-by: David S. Miller commit 02e9ce07d8b8e508d3276a73c056d26d30d76450 Author: Biao Huang Date: Wed Jun 29 11:17:43 2022 +0800 net: ethernet: mtk-star-emac: enable half duplex hardware support Current driver doesn't support half duplex correctly. This patch enable half duplex capability in hardware. Signed-off-by: Biao Huang Signed-off-by: Yinghua Pan Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_star_emac.c | 30 +++++++++++---------------- 1 file changed, 12 insertions(+), 18 deletions(-) commit 0a8bd81fd6aaace14979152e0540da8ff158a00a Author: Biao Huang Date: Wed Jun 29 11:17:42 2022 +0800 net: ethernet: mtk-star-emac: separate tx/rx handling with two NAPIs Current driver may lost tx interrupts under bidirectional test with iperf3, which leads to some unexpected issues. This patch let rx/tx interrupt enable/disable separately, and rx/tx are handled in different NAPIs. Signed-off-by: Biao Huang Signed-off-by: Yinghua Pan Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_star_emac.c | 340 +++++++++++++++----------- 1 file changed, 199 insertions(+), 141 deletions(-) commit 0027340a239bf7b7d370dde4a00be06fbe7e80e6 Author: Biao Huang Date: Wed Jun 29 11:17:41 2022 +0800 net: ethernet: mtk-star-emac: add support for MII interface Add support for MII interface. If user wants to use MII, assign "MII" to "phy-mode" property in dts. Signed-off-by: Biao Huang Signed-off-by: Yinghua Pan Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_star_emac.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 320c49fe31b0e567a785f37391c50e35b90e3240 Author: Biao Huang Date: Wed Jun 29 11:17:40 2022 +0800 dt-bindings: net: mtk-star-emac: add description for new properties Add description for new properties which will be parsed in driver. Signed-off-by: Biao Huang Acked-by: Rob Herring Signed-off-by: David S. Miller .../devicetree/bindings/net/mediatek,star-emac.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 769c197b097c9fd433b73374cd5ebc57c0220977 Author: Biao Huang Date: Wed Jun 29 11:17:39 2022 +0800 net: ethernet: mtk-star-emac: add timing adjustment support Add simple clock inversion for timing adjustment in driver. Add property "mediatek,txc-inverse" or "mediatek,rxc-inverse" to device node when necessary. Signed-off-by: Biao Huang Signed-off-by: Yinghua Pan Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_star_emac.c | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 85ef60330d37f8213ca6709559c7c7376d246a26 Author: Biao Huang Date: Wed Jun 29 11:17:38 2022 +0800 net: ethernet: mtk-star-emac: add clock pad selection for RMII This patch add a new dts property named "mediatek,rmii-rxc" parsing in driver, which will configure MAC to select which pin the RMII reference clock is connected to, TXC or RXC. TXC pad is the default reference clock pin. If user wants to use RXC pad instead, add "mediatek,rmii-rxc" to corresponding device node. Signed-off-by: Biao Huang Signed-off-by: Yinghua Pan Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_star_emac.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 43360697a27618dab2565bbdf0360a6441326dc5 Author: Biao Huang Date: Wed Jun 29 11:17:37 2022 +0800 dt-bindings: net: mtk-star-emac: add support for MT8365 Add binding document for Ethernet on MT8365. Signed-off-by: Biao Huang Reviewed-by: Bartosz Golaszewski Acked-by: Rob Herring Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/mediatek,star-emac.yaml | 1 + 1 file changed, 1 insertion(+) commit 6cde23b3ace57c339e380484b29820348aadd9b4 Author: Biao Huang Date: Wed Jun 29 11:17:36 2022 +0800 net: ethernet: mtk-star-emac: add support for MT8365 SoC Add Ethernet driver support for MT8365 SoC. Signed-off-by: Biao Huang Signed-off-by: Yinghua Pan Signed-off-by: Fabien Parent Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_star_emac.c | 75 +++++++++++++++++++++++---- 1 file changed, 64 insertions(+), 11 deletions(-) commit 9ccbfdefe716ede5ece0a7331df7903d3879dbb7 Author: Biao Huang Date: Wed Jun 29 11:17:35 2022 +0800 net: ethernet: mtk-star-emac: modify IRQ trigger flags If the flags in request_irq() is IRQF_TRIGGER_NONE, the trigger method is determined by "interrupt" property in dts. So, modify the flag from IRQF_TRIGGER_FALLING to IRQF_TRIGGER_NONE. Signed-off-by: Biao Huang Signed-off-by: Yinghua Pan Reviewed-by: Bartosz Golaszewski Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_star_emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c16cc6a0667262dcf7bec9f74c9740079a46802d Author: Biao Huang Date: Wed Jun 29 11:17:34 2022 +0800 net: ethernet: mtk-star-emac: store bit_clk_div in compat structure Not all the SoC are using the same clock divider. Move the divider into a compat structure specific to the SoCs. Signed-off-by: Biao Huang Signed-off-by: Fabien Parent Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_star_emac.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit bfc715146ea6dca52c97f7d59b0a2e35ff4aa772 Merge: da8ff2a278b9 98ff4c7c8ac7 Author: David S. Miller Date: Wed Jun 29 13:40:47 2022 +0100 Merge branch 'sfc-add-extra-states-for-VDPA' Martin Habets says: ==================== sfc: Add extra states for VDPA For EF100 VDPA support we need to enhance the sfc driver's load and unload functionality so that it can probe and then unregister its network device, so that VDPA can use services such as MCDI to initialise VDPA resources. v2: - Fix checkpatch errors. - Correct signoffs. ==================== Signed-off-by: David S. Miller commit 98ff4c7c8ac7f5339aac6114105395fea19f992e Author: Jonathan Cooper Date: Tue Jun 28 15:00:47 2022 +0100 sfc: Separate netdev probe/remove from PCI probe/remove The netdev probe will be used when moving from vDPA to EF100 BAR config. The netdev remove will be used when moving from EF100 to vDPA BAR config. In the process, change several log messages to pci_ instead of netif_ to remove the "(unregistered net_device)" text. Signed-off-by: Jonathan Cooper Co-developed-by: Martin Habets Signed-off-by: Martin Habets Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef100.c | 65 ++++++------------ drivers/net/ethernet/sfc/ef100_netdev.c | 116 +++++++++++++++++++++++++++++++- drivers/net/ethernet/sfc/ef100_netdev.h | 4 +- drivers/net/ethernet/sfc/ef100_nic.c | 80 ++++------------------ drivers/net/ethernet/sfc/ef100_nic.h | 10 ++- drivers/net/ethernet/sfc/efx.c | 2 +- drivers/net/ethernet/sfc/efx_common.c | 38 +++++------ drivers/net/ethernet/sfc/mcdi.c | 16 ++--- 8 files changed, 183 insertions(+), 148 deletions(-) commit 7592d754c09c6cf0f1758ddba41cdb4e5c16b0b2 Author: Jonathan Cooper Date: Tue Jun 28 15:00:34 2022 +0100 sfc: replace function name in string with __func__ Minor fix to existing code to make later patch checkpatch clean. Signed-off-by: Jonathan Cooper Acked-by: Martin Habets Signed-off-by: David S. Miller drivers/net/ethernet/sfc/mcdi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bba84bf4c1f2f8f8406149fd43a5baa81586cea0 Author: Jonathan Cooper Date: Tue Jun 28 15:00:22 2022 +0100 sfc: Unsplit literal string. Minor fix to existing code to later patch checkpatch clean. Signed-off-by: Jonathan Cooper Acked-by: Martin Habets Signed-off-by: David S. Miller drivers/net/ethernet/sfc/efx_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3e341d84bd9f4a7f27611407e52699786b373017 Author: Jonathan Cooper Date: Tue Jun 28 15:00:10 2022 +0100 sfc: Move EF100 efx_nic_type structs to the end of the file This avoids a forward declaration in a subsequent patch. Signed-off-by: Jonathan Cooper Co-developed-by: Martin Habets Signed-off-by: Martin Habets Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef100_nic.c | 344 +++++++++++++++++------------------ 1 file changed, 172 insertions(+), 172 deletions(-) commit 7e773594dada10f60c16c7085e0f0760122af8a7 Author: Jonathan Cooper Date: Tue Jun 28 14:59:57 2022 +0100 sfc: Separate efx_nic memory from net_device memory As we have a lot of common code this applies to all NIC architectures. Signed-off-by: Jonathan Cooper Co-developed-by: Martin Habets Signed-off-by: Martin Habets Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef100.c | 18 +++++++++++++++--- drivers/net/ethernet/sfc/ef100_netdev.c | 2 +- drivers/net/ethernet/sfc/efx.c | 20 ++++++++++++++++---- drivers/net/ethernet/sfc/net_driver.h | 15 ++++++++++++++- 4 files changed, 46 insertions(+), 9 deletions(-) commit 8cb03f4e084e8472d5fec77c01ee70eae8fa8b22 Author: Jonathan Cooper Date: Tue Jun 28 14:59:45 2022 +0100 sfc: Encapsulate access to netdev_priv() Once we separate struct efx_nic memory from net_device memory the existing usage will have to change. Apart from the new function efx_netdev_priv() accesses have been changed using: sed -i 's/netdev_priv/efx_netdev_priv/' Signed-off-by: Jonathan Cooper Co-developed-by: Martin Habets Signed-off-by: Martin Habets Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 4 +-- drivers/net/ethernet/sfc/ef100.c | 2 +- drivers/net/ethernet/sfc/ef100_ethtool.c | 2 +- drivers/net/ethernet/sfc/ef100_netdev.c | 8 +++--- drivers/net/ethernet/sfc/efx.c | 20 ++++++------- drivers/net/ethernet/sfc/efx_common.c | 18 ++++++------ drivers/net/ethernet/sfc/ethtool.c | 22 +++++++------- drivers/net/ethernet/sfc/ethtool_common.c | 48 +++++++++++++++---------------- drivers/net/ethernet/sfc/mcdi_port.c | 4 +-- drivers/net/ethernet/sfc/net_driver.h | 5 ++++ drivers/net/ethernet/sfc/rx_common.c | 4 +-- drivers/net/ethernet/sfc/sriov.c | 10 +++---- drivers/net/ethernet/sfc/tx.c | 4 +-- 13 files changed, 78 insertions(+), 73 deletions(-) commit b3fd0a86dad2f574b5196829d5881a940c0d0cb1 Author: Jonathan Cooper Date: Tue Jun 28 14:59:32 2022 +0100 sfc: Change BUG_ON to WARN_ON and recovery code. Pre-emptively fix a checkpatch warning in a subsequent patch. Signed-off-by: Jonathan Cooper Co-developed-by: Martin Habets Signed-off-by: Martin Habets Signed-off-by: David S. Miller drivers/net/ethernet/sfc/efx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 62ac3ce542fffdd71295cf8bbf6148e12efe4b4a Author: Jonathan Cooper Date: Tue Jun 28 14:59:20 2022 +0100 sfc: Remove netdev init from efx_init_struct Move functionality involving the struct net_device out of efx_init_struct so that we can initialise without a net dev for VDPA operation. Signed-off-by: Jonathan Cooper Co-developed-by: Martin Habets Signed-off-by: Martin Habets Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef100.c | 4 +++- drivers/net/ethernet/sfc/efx.c | 3 ++- drivers/net/ethernet/sfc/efx_common.c | 5 +---- drivers/net/ethernet/sfc/efx_common.h | 3 +-- 4 files changed, 7 insertions(+), 8 deletions(-) commit 8b39db19b21b7edfa0a48ca8a00ba042353b7887 Author: Jonathan Cooper Date: Tue Jun 28 14:59:08 2022 +0100 sfc: Add a PROBED state for EF100 VDPA use. For VDPA we need to tear down the driver to the point where it has various control channels like MCDI, but it no longer has a network device. This adds a state corresponding to that mode that will be used when VDPA support is added. Signed-off-by: Jonathan Cooper Co-developed-by: Martin Habets Signed-off-by: Martin Habets Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef100_netdev.c | 2 +- drivers/net/ethernet/sfc/efx_common.c | 6 ++++-- drivers/net/ethernet/sfc/efx_common.h | 9 +++++---- drivers/net/ethernet/sfc/net_driver.h | 3 ++- 4 files changed, 12 insertions(+), 8 deletions(-) commit 813cf9d1e753e1e0a247d3d685212a06141b483e Author: Jonathan Cooper Date: Tue Jun 28 14:58:55 2022 +0100 sfc: Split STATE_READY in to STATE_NET_DOWN and STATE_NET_UP. This patch splits the READY state in to NET_UP and NET_DOWN. This is to prepare for future work to delay resource allocation until interface up so that we can use resources more efficiently in SRIOV environments, and also to lay the ground work for an extra PROBED state where we don't create a network interface, for VDPA operation. Signed-off-by: Jonathan Cooper Acked-by: Martin Habets Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef100_netdev.c | 6 +++- drivers/net/ethernet/sfc/efx.c | 29 ++++++++---------- drivers/net/ethernet/sfc/efx_common.c | 10 +++---- drivers/net/ethernet/sfc/efx_common.h | 6 ++-- drivers/net/ethernet/sfc/ethtool_common.c | 2 +- drivers/net/ethernet/sfc/net_driver.h | 50 ++++++++++++++++++++++++++++--- 6 files changed, 72 insertions(+), 31 deletions(-) commit da8ff2a278b94088f501e55f543644f88b3ffe37 Merge: d640516a65d8 e28cd993b9a4 Author: David S. Miller Date: Wed Jun 29 13:35:47 2022 +0100 Merge branch 'mlxsw-unified-bridge-conversion-part-5' Ido Schimmel says: ==================== mlxsw: Unified bridge conversion - part 5/6 This is the fifth part of the conversion of mlxsw to the unified bridge model. The previous part that was merged in commit d521bc0a0f7c ("Merge branch 'mlxsw-unified-bridge-conversion-part-4-6'") converted the flooding code to use the new APIs of the unified bridge model. As part of this conversion, the flooding code started accessing the port group table (PGT) directly in order to allocate MID indexes and configure the ports via which a packet needs to be replicated. MDB entries in the device also make use of the PGT table, but the related code has its own PGT allocator and does not make use of the common core that was added in the previous patchset. This patchset converts the MDB code to use the common PGT code. The first nine patches prepare the MDB code for the conversion that is performed by the last patch. ==================== Signed-off-by: David S. Miller commit e28cd993b9a46bc1394d0e46646444b12ee5b69b Author: Amit Cohen Date: Wed Jun 29 12:40:07 2022 +0300 mlxsw: spectrum_switchdev: Convert MDB code to use PGT APIs The previous patches added common APIs for maintaining PGT (Port Group Table) table. In the legacy model, software did not interact with this table directly. Instead, it was accessed by firmware in response to registers such as SFTR and SMID. In the new model, software has full control over the PGT table using the SMID register. The configuration of MDB entries is already done via SMID, so the new PGT APIs can be used also using the legacy model, the only difference is that MID index should be aligned to bridge model. See a previous patch which added API for that. The main changes are: - MDB code does not maintain bitmap of ports in MDB entry anymore, instead, it stores a list of ports with additional information. - MDB code does not configure SMID register directly anymore, it will be done via PGT API when port is first added or removed. - Today MDB code does not update SMID when port is added/removed while multicast is disabled. Instead, it maintains bitmap of ports and once multicast is enabled, it rewrite the entry to hardware. Using PGT APIs, the entry will be updated also when multicast is disabled, but the mapping between {MAC, FID}->{MID} will not appear in SFD register. It means that SMID will be updated all the time and disable/enable multicast will impact only SFD configuration. - For multicast router, today only SMID is updated and the bitmap is not updated. Using the new list of ports, there is a reference count for each port, so it can be saved in software also. For such port, 'struct mlxsw_sp_mdb_entry.ports_count' will not be updated and the port in the list will be marked as 'mrouter'. - Finally, `struct mlxsw_sp_mid.in_hw` is not needed anymore. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 352 +++------------------ 1 file changed, 48 insertions(+), 304 deletions(-) commit 4c3f7442770b6f9b83c88f83d7d43126340ae303 Author: Amit Cohen Date: Wed Jun 29 12:40:06 2022 +0300 mlxsw: spectrum_switchdev: Flush port from MDB entries according to FID index Currently, flushing port from all MDB entries is done when the last VLAN is removed. This behavior is inaccurate, as port can be removed while there is another port which uses the same VLAN, in such case, this is not the last port which uses this VLAN and removed, but this port is supposed to be removed from the MDB entries. Flush the port from MDB when it is removed, regardless the state of other ports. Flush only the MDB entries which are relevant for the same FID index. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 7434ed6102c1a9b898affaeb0685cafd4cd7597c Author: Amit Cohen Date: Wed Jun 29 12:40:05 2022 +0300 mlxsw: spectrum_switchdev: Add support for getting and putting MDB entry A previous patch added support for init() and fini() for MDB entries. MDB entry can be updated, ports can be added and removed from the entry. Add get() and put() functions, the first one checks if the entry already exists and otherwise initializes the entry. The second removes the entry just in case that there are no more ports in this entry. Use the list of the ports which was added in a previous patch. When the list contains only one port which is not multicast router, and this port is removed, the MDB entry can be removed. Use 'struct mlxsw_sp_mdb_entry.ports_count' to know how many ports use the entry, regardless the use of multicast router ports. When mlxsw_sp_mc_mdb_entry_put() is called with specific port which supposed to be removed, check if the removal will cause a deletion of the entry. If this is the case, call mlxsw_sp_mc_mdb_entry_fini() which first deletes the MDB entry and then releases the PGT entry, to avoid a temporary situation in which the MDB entry points to an empty PGT entry, as otherwise packets will be temporarily dropped instead of being flooded. The new functions will be used in the next patches. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 80 +++++++++++++++++++++- 1 file changed, 78 insertions(+), 2 deletions(-) commit ea0f58d6c54325b9d9ff4f5e2649e07a67faad59 Author: Amit Cohen Date: Wed Jun 29 12:40:04 2022 +0300 mlxsw: spectrum_switchdev: Implement mlxsw_sp_mc_mdb_entry_{init, fini}() The next patches will convert MDB code to use PGT APIs. The change will move the responsibility of allocating MID indexes and writing PGT configurations to hardware to PGT code. As part of this change, most of the MDB code will be changed and improved. As a preparation for the above mentioned change, implement mlxsw_sp_mc_mdb_entry_{init, fini}(). Currently, there is a function __mlxsw_sp_mc_alloc(), which does not only allocate MID. In addition, there is no an equivalent function to free the MID. When mlxsw_sp_port_remove_from_mid() removes the last port, it handles MID removal. Instead, add init() and fini() functions, which use PGT APIs. The differences between the existing and the new functions are as follows: 1. Today MDB code does not update SMID when port is added/removed while multicast is disabled. It maintains a bitmap of ports and once multicast is enabled, it writes the entry to hardware. Instead, using PGT APIs, the entry will be updated also when multicast is disabled, but the mapping between {MAC, FID}->{MID} (is configured using SFD) will be updated according to multicast state. It means that SMID will be updated all the time and disable/enable multicast will impact only SFD configuration. 2. Today the allocation of MID index is done as part of mlxsw_sp_mc_write_mdb_entry(). The fact that the entry will be written in hardware all the time, moves the allocation of the index to be as part of the MDB entry initialization. PGT API is used for the allocation. 3. Today the update of multicast router ports is done as part of mlxsw_sp_mc_write_mdb_entry(). Instead, add functions to add/remove all multicast router ports when entry is first added or removed. When new multicast router port will be added/removed, the dedicated API will be used to add/remove it from the existing entries. 4. A list of ports will be stored per MDB entry instead of the exiting bitmap. The list will contain the multicast router ports and maintain reference counter per port. Add mlxsw_sp_mdb_entry_write() which is almost identical to mlxsw_sp_port_mdb_op(). Use more clear name and align the MID index to bridge model using PGT API. The existing function will be removed in the next patches. Note that PGT APIs configure the firmware using SMID register, like the driver already does today for MDB entries, so PGT APIs can be used also using legacy bridge model. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 176 ++++++++++++++++++++- 1 file changed, 174 insertions(+), 2 deletions(-) commit d2994e13058582a7ca20fc39e6e56c6c021a6eca Author: Amit Cohen Date: Wed Jun 29 12:40:03 2022 +0300 mlxsw: spectrum_switchdev: Add support for maintaining list of ports per MDB entry As part of converting MDB code to use PGT APIs, PGT code stores which ports are mapped to each PGT entry. PGT code is not aware of the type of the port (multicast router or not), as it is not relevant there. To be able to release an MDB entry when the there are no ports which are not multicast routers, the entry should be aware of the state of its ports. Add support for maintaining list of ports per MDB entry. Each port will hold a reference count as multiple MDB entries can use the same hardware MDB entry. It occurs because MDB entries in the Linux bridge are keyed according to their multicast IP, when these entries are notified to device drivers via switchdev, the multicast IP is converted to a multicast MAC. This conversion might cause collisions, for example, ff0e::1 and ff0e:1234::1 are both mapped to the multicast MAC 33:33:00:00:00:01. Multicast router port will take a reference once, and will be marked as 'mrouter', then when port in the list is multicast router and its reference value is one, it means that the entry can be removed in case that there are no other ports which are not multicast routers. For that, maintain a counter per MDB entry to count ports in the list, which were added to the multicast group, and not because they are multicast routers. When this counter is zero, the entry can be removed. Add mlxsw_sp_mdb_entry_port_{get,put}() for regular ports and mlxsw_sp_mdb_entry_mrouter_port_{get,put}() for multicast router ports. Call PGT API to add or remove port from PGT entry when port is first added or removed, according to the reference counting. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 153 +++++++++++++++++++++ 1 file changed, 153 insertions(+) commit 5d0512e5cf7482998dab45273c6542b4c25155aa Author: Amit Cohen Date: Wed Jun 29 12:40:02 2022 +0300 mlxsw: spectrum_switchdev: Add support for maintaining hash table of MDB entries Currently MDB entries are stored in a list as part of 'struct mlxsw_sp_bridge_device'. Storing them in a hash table in addition to the list will allow finding a specific entry more efficiently. Add support for the required hash table, the next patches will insert and remove MDB entries from the table. The existing code which adds and removes entries will be removed and replaced by new code in the next patches, so there is no point to adjust the existing code. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 0ac985436eb99056e8248b12caa4b006ed93d8b3 Author: Amit Cohen Date: Wed Jun 29 12:40:01 2022 +0300 mlxsw: spectrum_switchdev: Save MAC and FID as a key in 'struct mlxsw_sp_mdb_entry' The next patch will add support for storing all the MDB entries in a hash table. As a preparation, save the MAC address and the FID in a separate structure. This structure will be used later as a key for the hash table. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) commit eaa0791aed8bf95ac50c8e3c79f14c7879235623 Author: Amit Cohen Date: Wed Jun 29 12:40:00 2022 +0300 mlxsw: spectrum_switchdev: Rename MIDs list Currently, the list which stores the MDB entries for a given bridge instance is called 'mids_list'. This name is not accurate as a MID entry stores a bitmap of ports to which a packet needs to be replicated and a MDB entry stores the mapping from {MAC, FID} to PGT index (MID) Rename it to 'mdb_list'. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit eede53a49b3c52a95a9f11145ff0e3d86f192f39 Author: Amit Cohen Date: Wed Jun 29 12:39:59 2022 +0300 mlxsw: spectrum_switchdev: Rename MID structure Currently the structure which represents MDB entry is called 'struct mlxsw_sp_mid'. This name is not accurate as a MID entry stores a bitmap of ports to which a packet needs to be replicated and a MDB entry stores the mapping from {MAC, FID} to PGT index (MID). Rename the structure to 'struct mlxsw_sp_mdb_entry'. The structure 'mlxsw_sp_mid' is defined as part of spectrum.h. The only file which uses it is spectrum_switchdev.c, so there is no reason to expose it to other files. Move the definition to spectrum_switchdev.c. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 9 -- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 179 +++++++++++---------- 2 files changed, 97 insertions(+), 91 deletions(-) commit 4abaa5cc4d7c42ae61ce482acc5aa1e1cededc73 Author: Amit Cohen Date: Wed Jun 29 12:39:58 2022 +0300 mlxsw: Align PGT index to legacy bridge model FID code reserves about 15K entries in PGT table for flooding. These entries are just allocated and are not used yet because the code that uses them is skipped now. The next patches will convert MDB code to use PGT APIs. The allocation of indexes for multicast is done after FID code reserves 15K entries. Currently, legacy bridge model is used and firmware manages PGT table. That means that the indexes which are allocated using PGT API are too high when legacy bridge model is used. To not exceed firmware limitation for MDB entries, add an API that returns the correct 'mid_index', based on bridge model. For legacy model, subtract the number of flood entries from PGT index. Use it to write the correct MID to SMID register. This API will be used also from MDB code in the next patches. PGT should not be aware of MDB and FID different usage, this API is temporary and will be removed once unified bridge model will be used. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_pgt.c | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) commit d1ff2559cef0f6f8d97fba6337b28adb10689e16 Author: Miaoqian Lin Date: Sun Jun 5 12:28:07 2022 +0400 cpufreq: zynq: Fix refcount leak in zynq_get_revision of_find_compatible_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak. Fixes: 00f7dc636366 ("ARM: zynq: Add support for SOC_BUS") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220605082807.21526-1-linmq006@gmail.com Signed-off-by: Michal Simek arch/arm/mach-zynq/common.c | 1 + 1 file changed, 1 insertion(+) commit 3f977c574dfd344bea562e9d28a17de90c46e95a Author: Mika Westerberg Date: Wed Jun 29 14:34:03 2022 +0300 spi: intel: Add support for Intel Meteor Lake-P SPI serial flash Intel Meteor Lake-P has the same SPI serial flash controller as Alder Lake-P. Add Meteor Lake-P PCI ID to the driver list of supported devices. Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20220629113403.79942-1-mika.westerberg@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi-intel-pci.c | 1 + 1 file changed, 1 insertion(+) commit e16eceea863b417fd328588b1be1a79de0bc937f Author: Olga Kitaina Date: Tue Jun 28 21:18:24 2022 +0530 mtd: rawnand: arasan: Fix clock rate in NV-DDR According to the Arasan NAND controller spec, the flash clock rate for SDR must be <= 100 MHz, while for NV-DDR it must be the same as the rate of the CLK line for the mode. The driver previously always set 100 MHz for NV-DDR, which would result in incorrect behavior for NV-DDR modes 0-4. The appropriate clock rate can be calculated from the NV-DDR timing parameters as 1/tCK, or for rates measured in picoseconds, 10^12 / nand_nvddr_timings->tCK_min. Fixes: 197b88fecc50 ("mtd: rawnand: arasan: Add new Arasan NAND controller") CC: stable@vger.kernel.org # 5.8+ Signed-off-by: Olga Kitaina Signed-off-by: Amit Kumar Mahapatra Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220628154824.12222-3-amit.kumar-mahapatra@xilinx.com drivers/mtd/nand/raw/arasan-nand-controller.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 9dbeef8ad5f8e7d2cab7b888853b4abe9db87ffd Author: Chanho Park Date: Wed Jun 29 19:23:03 2022 +0900 spi: s3c64xx: define exynosautov9 compatible Define "samsung,exynosautov9-spi" for Exynos Auto v9's spi. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Andi Shyti Signed-off-by: Chanho Park Link: https://lore.kernel.org/r/20220629102304.65712-4-chanho61.park@samsung.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/samsung,spi.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 11d50d853dceb2df8d28bf772d3e928c1c5b137a Author: Chanho Park Date: Wed Jun 29 19:23:04 2022 +0900 spi: s3c64xx: add spi port configuration for Exynos Auto v9 SoC Add exynosautov9 spi port configuration. It supports up to 12 spis so MAX_SPI_PORTS should be increased from 6 to 12. It has DIV_4 as the default internal clock divider and an internal loopback mode to run a loopback test. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Andi Shyti Signed-off-by: Chanho Park Link: https://lore.kernel.org/r/20220629102304.65712-5-chanho61.park@samsung.com Signed-off-by: Mark Brown drivers/spi/spi-s3c64xx.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit bfcd27dcb7b93bd1f3b89d03d8b90207876d635f Author: Chanho Park Date: Wed Jun 29 19:23:02 2022 +0900 spi: s3c64xx: support custom value of internal clock divider Modern exynos SoCs such as Exynos Auto v9 have different internal clock divider, for example "4". To support this internal value, this adds clk_div of the s3c64xx_spi_port_config and assign "2" as the default value to existing s3c64xx_spi_port_config. Signed-off-by: Chanho Park Reviewed-by: Andi Shyti Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220629102304.65712-3-chanho61.park@samsung.com Signed-off-by: Mark Brown drivers/spi/spi-s3c64xx.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit ffb7bcd3b27e86fa7bdbabf4488060064ec9d00d Author: Chanho Park Date: Wed Jun 29 19:23:01 2022 +0900 spi: s3c64xx: support loopback mode Modern exynos SoCs can support self loopback mode via setting BIT(3) of MODE_CFG register. Previous SoCs don't have the bit so we need to add has_loopback field in the s3c64xx_spi_port_config. Exynos Auto v9 SoC has the bit and it will define the field to "true". When it is set, SPI_LOOP mode will be marked. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Andi Shyti Signed-off-by: Chanho Park Link: https://lore.kernel.org/r/20220629102304.65712-2-chanho61.park@samsung.com Signed-off-by: Mark Brown drivers/spi/spi-s3c64xx.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7499bfeedb47efc1ee4dc793b92c610d46e6d6a6 Author: Amit Kumar Mahapatra Date: Tue Jun 28 21:18:23 2022 +0530 mtd: rawnand: arasan: Update NAND bus clock instead of system clock In current implementation the Arasan NAND driver is updating the system clock(i.e., anand->clk) in accordance to the timing modes (i.e., SDR or NVDDR). But as per the Arasan NAND controller spec the flash clock or the NAND bus clock(i.e., nfc->bus_clk), need to be updated instead. This patch keeps the system clock unchanged and updates the NAND bus clock as per the timing modes. Fixes: 197b88fecc50 ("mtd: rawnand: arasan: Add new Arasan NAND controller") CC: stable@vger.kernel.org # 5.8+ Signed-off-by: Amit Kumar Mahapatra Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220628154824.12222-2-amit.kumar-mahapatra@xilinx.com drivers/mtd/nand/raw/arasan-nand-controller.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ad9b10d1eaada169bd764abcab58f08538877e26 Author: Christian Marangi Date: Wed Jun 22 03:06:28 2022 +0200 mtd: core: introduce of support for dynamic partitions We have many parser that register mtd partitions at runtime. One example is the cmdlinepart or the smem-part parser where the compatible is defined in the dts and the partitions gets detected and registered by the parser. This is problematic for the NVMEM subsystem that requires an OF node to detect NVMEM cells. To fix this problem, introduce an additional logic that will try to assign an OF node to the MTD if declared. On MTD addition, it will be checked if the MTD has an OF node and if not declared will check if a partition with the same label / node name is declared in DTS. If an exact match is found, the partition dynamically allocated by the parser will have a connected OF node. The NVMEM subsystem will detect the OF node and register any NVMEM cells declared statically in the DTS. Signed-off-by: Christian Marangi Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220622010628.30414-4-ansuelsmth@gmail.com drivers/mtd/mtdcore.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit dd638202dfb6507cd529751b6c39680c292e245e Author: Christian Marangi Date: Wed Jun 22 03:06:27 2022 +0200 dt-bindings: mtd: partitions: add additional example for qcom,smem-part Add additional example for qcom,smem-part to declare a dynamic partition to provide NVMEM cells for the commonly ART partition provided by this parser. Signed-off-by: Christian Marangi Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220622010628.30414-3-ansuelsmth@gmail.com .../bindings/mtd/partitions/qcom,smem-part.yaml | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 118f3fbe517f49e17877f34fd677f7374970d92e Author: Christian Marangi Date: Wed Jun 22 03:06:26 2022 +0200 dt-bindings: mtd: partitions: support label/name only partition Document new partition nodes that declare only the label/name instead of the reg used to provide an OF node for partition registred at runtime by parsers. This is required for nvmem system to declare and detect nvmem-cells. With these special partitions, the reg / offset is not required and a 'partition-' prefix is needed. The node name with the 'partition-' prefix stripped, is used to match the partition allocated by the parser at runtime and the parser will provide reg and offset of the mtd. If the partition to match contains invalid char for a node name, the label binding can be used to declare the partition name. NVMEM will use the data from the parser and provide the NVMEM cells declared in the DTS, "connecting" the dynamic partition with a static declaration of cells in them. Signed-off-by: Christian Marangi Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220622010628.30414-2-ansuelsmth@gmail.com .../bindings/mtd/partitions/partition.yaml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit fc04dafd263d8c0b0251b63d47f35b29373d50f2 Author: Christian Brauner Date: Wed Jun 29 13:15:10 2022 +0200 mnt_idmapping: use new helpers in mapped_fs{g,u}id() The old non-type safe helpers will soon be removed. Cc: Seth Forshee Signed-off-by: Christian Brauner (Microsoft) include/linux/mnt_idmapping.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d6910eaa6fc71c0307e16b310a07cdb347d26d7d Author: Judy Hsiao Date: Wed Jun 29 08:04:21 2022 +0000 ASoC: rockchip: i2s: Remove unwanted dma settings in rockchip_i2s_probe Remove the unwanted dma settings in rockchip_i2s_probe. Fixes: 44f362c2cc6d ("ASoC: rockchip: i2s: switch BCLK to GPIO") Signed-off-by: Judy Hsiao Link: https://lore.kernel.org/r/20220629080421.2427933-1-judyhsiao@chromium.org Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 8 -------- 1 file changed, 8 deletions(-) commit 02d91fe47100a29a79fcb8798e45c22591ca852d Author: Shengjiu Wang Date: Tue Jun 28 11:13:25 2022 +0800 ASoC: dt-bindings: fsl,micfil: Convert format to json-schema Convert the NXP MICFIL binding to DT schema format using json-schema. Signed-off-by: Shengjiu Wang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1656386005-29376-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown .../devicetree/bindings/sound/fsl,micfil.txt | 33 --------- .../devicetree/bindings/sound/fsl,micfil.yaml | 85 ++++++++++++++++++++++ 2 files changed, 85 insertions(+), 33 deletions(-) commit 3b13b1437dcce4469db575c60d1da4fa9ff80694 Author: Shengjiu Wang Date: Tue Jun 28 16:39:49 2022 +0800 ASoC: fsl_micfil: change micfil default settings Previous default settings resulted in loose dynamic range and low sound level. New default configuration changes: - outgain = 2 - quality mode = VLOW0 - dc remover = bypass Signed-off-by: Irina Patru Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1656405589-29850-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_micfil.c | 22 ++++++++++++++++++---- sound/soc/fsl/fsl_micfil.h | 9 +++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) commit d29e0a6e3631724c0b36786c6d9616b6e4ebeaa4 Author: Daniel Mack Date: Wed Jun 29 07:06:30 2022 +0200 ASoC: max98396: Fix TDM mode BSEL settings In TDM mode, the BSEL register value must be set according to table 5 in the datasheet. This patch adds a lookup function and uses it in max98396_dai_tdm_slot(). As the first 3 entries can also be used for non-TDM setups, the code re-uses the same table for such scenarios. Signed-off-by: Daniel Mack Link: https://lore.kernel.org/r/20220629050630.2848317-1-daniel@zonque.org Signed-off-by: Mark Brown sound/soc/codecs/max98396.c | 138 ++++++++++++++++++++++++++++++-------------- sound/soc/codecs/max98396.h | 2 +- 2 files changed, 96 insertions(+), 44 deletions(-) commit 48620f17e071060092197a09663a1c1fe6207829 Author: Judy Hsiao Date: Wed Jun 29 08:03:45 2022 +0000 ASoC: rockchip: i2s: Fix the debug level on missing pinctrl Use dev_dbg on missing i2s->pinctrl as the pinctrl property is optional. Fixes: 44f362c2cc6d ("ASoC: rockchip: i2s: switch BCLK to GPIO") Signed-off-by: Judy Hsiao Link: https://lore.kernel.org/r/20220629080345.2427872-1-judyhsiao@chromium.org Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7b028e4252bc1e8b5646657fd45a68792826c23 Author: Srinivas Kandagatla Date: Wed Jun 29 10:06:44 2022 +0100 MAINTAINERS: add ASoC Qualcomm codecs Add missing Qualcomm codes to the list. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220629090644.67982-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown MAINTAINERS | 4 ++++ 1 file changed, 4 insertions(+) commit 43b8c7dc85a14f36048a27bb6c627fd49144a8d1 Author: Srinivas Kandagatla Date: Wed Jun 29 10:06:42 2022 +0100 ASoC: codecs: add wsa883x amplifier support This patch adds support to WSA8830/WSA8812/WSA8835 Class-D Smart Speaker Amplifier. This Amplifier is primarily interfaced with SoundWire. This patch is tested on SM8450 MTP Board. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220629090644.67982-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 10 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/wsa883x.c | 1301 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1313 insertions(+) commit 16e2f8a4e9d5e4c7653ee774d9377d602070b16e Author: Srinivas Kandagatla Date: Wed Jun 29 10:06:41 2022 +0100 ASoC: dt-bindings: Add WSA883x bindings This patch adds bindings for WSA883x Smart Speaker Amplifier. This Amplifier also has a simple thermal sensor for temperature measurments with speaker protection. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220629090644.67982-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown .../devicetree/bindings/sound/qcom,wsa883x.yaml | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit 156c90415b5c96b49a1ce59e48a702445a340229 Author: Sudeep Holla Date: Wed Jun 29 10:59:59 2022 +0100 arm64: dts: juno: Add cache-level property to L2 caches Add the missing cache-level property to L2 caches. This is needed if we need to find the last level cache directly from the device tree cache node. Link: https://lore.kernel.org/r/20220629095959.1115587-1-sudeep.holla@arm.com Cc: Liviu Dudau Cc: Lorenzo Pieralisi Acked-by: Liviu Dudau Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-r1.dts | 2 ++ arch/arm64/boot/dts/arm/juno-r2.dts | 2 ++ arch/arm64/boot/dts/arm/juno.dts | 2 ++ 3 files changed, 6 insertions(+) commit 2113651ddf3d0689a8b25461adf038e9d4c8a7cb Author: Bjorn Andersson Date: Mon Jun 27 10:07:17 2022 -0700 bus: mhi: host: pci_generic: Add another Foxconn T99W175 The Foxconn e0c3 device identifies itself as a T99W175 X55, add support for this to the pci_generic driver. Signed-off-by: Bjorn Andersson Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20220627170717.2252335-1-bjorn.andersson@linaro.org Signed-off-by: Manivannan Sadhasivam drivers/bus/mhi/host/pci_generic.c | 3 +++ 1 file changed, 3 insertions(+) commit 9adf24a40978c19f57f44572b292b38938da7686 Author: Christian Brauner Date: Wed Jun 29 12:25:53 2022 +0200 fs: port HAS_UNMAPPED_ID() to vfs{g,u}id_t The HAS_UNMAPPED_ID() helper is fully self contained so we can port it to vfs{g,u}id_t without much effort. Cc: Seth Forshee Signed-off-by: Christian Brauner (Microsoft) include/linux/fs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 40c56bd8e1aea7929a09f1d4d68ac3221bb142c4 Author: Masahiro Yamada Date: Mon Jun 13 18:20:26 2022 +0900 KVM: arm64: nvhe: Add intermediates to 'targets' instead of extra-y These are generated on demand. Adding them to 'targets' is enough. Signed-off-by: Masahiro Yamada Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220613092026.1705630-2-masahiroy@kernel.org arch/arm64/kvm/hyp/nvhe/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d5697f95e492899d0bf813cbab2af03dde77fa2 Author: Masahiro Yamada Date: Mon Jun 13 18:20:25 2022 +0900 KVM: arm64: nvhe: Rename confusing obj-y This Makefile appends several objects to obj-y from line 15, but none of them is linked to vmlinux in an ordinary way. obj-y is overwritten at line 30: obj-y := kvm_nvhe.o So, kvm_nvhe.o is the only object directly linked to vmlinux. Replace the abused obj-y with hyp-obj-y. Signed-off-by: Masahiro Yamada Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220613092026.1705630-1-masahiroy@kernel.org arch/arm64/kvm/hyp/nvhe/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 54c15ec3b738c6086f2be001dae962ec412640e5 Author: Pali Rohár Date: Fri Jun 24 10:55:50 2022 +0200 powerpc: dts: Add DTS file for CZ.NIC Turris 1.x routers CZ.NIC Turris 1.0 and 1.1 are open source routers, they have dual-core PowerPC Freescale P2020 CPU and are based on Freescale P2020RDB-PC-A board. Hardware design is fully open source, all firmware and hardware design files are available at Turris project website: https://docs.turris.cz/hw/turris-1x/turris-1x/ https://project.turris.cz/en/hardware.html Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220624085550.20570-1-pali@kernel.org arch/powerpc/boot/dts/turris1x.dts | 475 +++++++++++++++++++++++++++++++++++++ 1 file changed, 475 insertions(+) commit 81e9685dd41384a39adda823df8b4f6e16ec2898 Author: Juerg Haefliger Date: Fri May 20 13:54:31 2022 +0200 KVM: PPC: Kconfig: Fix indentation The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules. Signed-off-by: Juerg Haefliger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220520115431.147593-1-juergh@canonical.com arch/powerpc/kvm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e2e5e82748aaf1fcc0e2a91e309793cd6cc5076 Author: Juerg Haefliger Date: Fri May 20 13:52:29 2022 +0200 powerpc/powernv: Kconfig: Replace single quotes Replace single quotes with double quotes which seems to be the convention for strings. Signed-off-by: Juerg Haefliger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220520115229.147368-1-juergh@canonical.com arch/powerpc/platforms/powernv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d60cb5010cafc7889384ce49292a320f5bcd56ff Author: Juerg Haefliger Date: Thu May 26 08:57:37 2022 +0200 powerpc: Kconfig.debug: Remove extra empty line Remove a stray extra empty line. Signed-off-by: Juerg Haefliger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220526065737.86370-3-juerg.haefliger@canonical.com arch/powerpc/Kconfig.debug | 1 - 1 file changed, 1 deletion(-) commit cea9d62b64c981b2a72e7166b21ba413fea16c83 Author: Juerg Haefliger Date: Thu May 26 08:57:36 2022 +0200 powerpc: Kconfig: Replace tabs with whitespaces Replace tabs after keywords with whitespaces to be consistent. Signed-off-by: Juerg Haefliger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220526065737.86370-2-juerg.haefliger@canonical.com arch/powerpc/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5969e0c1c7e2132d8b2cf80168072b1195ddce46 Author: Madhavan Srinivasan Date: Thu Apr 29 10:32:08 2021 +0530 powerpc/perf: Update MMCR2 to support event exclude_idle struct perf_event_attr supports exclude counting of idle task. This is sent to kernel via perf_event_attr.exclude_idle and in perf tool, user can use ":I" event modifier to enable this for specific event. Monitor Mode Control Register 2 (MMCR2) SPR has control bits for each PMCs to freeze counting based on the Control Register CTRL[RUN] state. CTRL[RUN] is not set when idle task is running. Patch adds a check for event attr.exclude_idle to set MMCR2[FCnWAIT] bit. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210429050208.266619-1-maddy@linux.ibm.com arch/powerpc/perf/isa207-common.c | 3 +++ arch/powerpc/perf/isa207-common.h | 1 + 2 files changed, 4 insertions(+) commit a28a2eff1e0ff684f51b3dc6371ff5b651a063d4 Author: Alexey Kardashevskiy Date: Wed Jun 1 14:01:17 2022 +1000 powerpc/pseries/iommu: Print ibm,query-pe-dma-windows parameters PowerVM has a stricter policy about allocating TCEs for LPARs and often there is not enough TCEs for 1:1 mapping, this adds the supported numbers into dev_info() to help analyzing bugreports. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220601040117.1467710-1-aik@ozlabs.ru arch/powerpc/platforms/pseries/iommu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 4dee21e0f2520f5032b0abce0ecae593a71bd19d Author: Alexey Kardashevskiy Date: Tue Jun 28 18:02:28 2022 +1000 KVM: PPC: Do not warn when userspace asked for too big TCE table KVM manages emulated TCE tables for guest LIOBNs by a two level table which maps up to 128TiB with 16MB IOMMU pages (enabled in QEMU by default) and MAX_ORDER=11 (the kernel's default). Note that the last level of the table is allocated when actual TCE is updated. However these tables are created via ioctl() on kvmfd and the userspace can trigger WARN_ON_ONCE_GFP(order >= MAX_ORDER, gfp) in mm/page_alloc.c and flood dmesg. This adds __GFP_NOWARN. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220628080228.1508847-1-aik@ozlabs.ru arch/powerpc/kvm/book3s_64_vio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d9206b227434912582049c49af1085660fa1e50 Author: Hari Bathini Date: Fri Jun 10 21:25:52 2022 +0530 powerpc/bpf/32: Add instructions for atomic_[cmp]xchg This adds two atomic opcodes BPF_XCHG and BPF_CMPXCHG on ppc32, both of which include the BPF_FETCH flag. The kernel's atomic_cmpxchg operation fundamentally has 3 operands, but we only have two register fields. Therefore the operand we compare against (the kernel's API calls it 'old') is hard-coded to be BPF_REG_R0. Also, kernel's atomic_cmpxchg returns the previous value at dst_reg + off. JIT the same for BPF too with return value put in BPF_REG_0. BPF_REG_R0 = atomic_cmpxchg(dst_reg + off, BPF_REG_R0, src_reg); Signed-off-by: Hari Bathini Tested-by: Naveen N. Rao (ppc64le) Reviewed-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610155552.25892-6-hbathini@linux.ibm.com arch/powerpc/net/bpf_jit_comp32.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit aea7ef8a82c0ea13ff20b65ff2edf8a38a17eda8 Author: Hari Bathini Date: Fri Jun 10 21:25:51 2022 +0530 powerpc/bpf/32: add support for BPF_ATOMIC bitwise operations Adding instructions for ppc32 for atomic_and atomic_or atomic_xor atomic_fetch_add atomic_fetch_and atomic_fetch_or atomic_fetch_xor Signed-off-by: Hari Bathini Tested-by: Naveen N. Rao (ppc64le) Reviewed-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610155552.25892-5-hbathini@linux.ibm.com arch/powerpc/net/bpf_jit_comp32.c | 53 ++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 12 deletions(-) commit 1e82dfaa7819f03f0b0022be7ca15bbc83090da1 Author: Hari Bathini Date: Fri Jun 10 21:25:50 2022 +0530 powerpc/bpf/64: Add instructions for atomic_[cmp]xchg This adds two atomic opcodes BPF_XCHG and BPF_CMPXCHG on ppc64, both of which include the BPF_FETCH flag. The kernel's atomic_cmpxchg operation fundamentally has 3 operands, but we only have two register fields. Therefore the operand we compare against (the kernel's API calls it 'old') is hard-coded to be BPF_REG_R0. Also, kernel's atomic_cmpxchg returns the previous value at dst_reg + off. JIT the same for BPF too with return value put in BPF_REG_0. BPF_REG_R0 = atomic_cmpxchg(dst_reg + off, BPF_REG_R0, src_reg); Signed-off-by: Hari Bathini Tested-by: Naveen N. Rao (ppc64le) Reviewed-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610155552.25892-4-hbathini@linux.ibm.com arch/powerpc/net/bpf_jit_comp64.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) commit dbe6e2456fb0263a5a961a92836d2cebdbca979c Author: Hari Bathini Date: Fri Jun 10 21:25:49 2022 +0530 powerpc/bpf/64: add support for atomic fetch operations Adding instructions for ppc64 for atomic[64]_fetch_add atomic[64]_fetch_and atomic[64]_fetch_or atomic[64]_fetch_xor Signed-off-by: Hari Bathini Tested-by: Naveen N. Rao (ppc64le) Reviewed-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610155552.25892-3-hbathini@linux.ibm.com arch/powerpc/net/bpf_jit_comp64.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 65112709115f48f16d7082bcabf173d08622e69f Author: Hari Bathini Date: Fri Jun 10 21:25:48 2022 +0530 powerpc/bpf/64: add support for BPF_ATOMIC bitwise operations Adding instructions for ppc64 for atomic[64]_and atomic[64]_or atomic[64]_xor Signed-off-by: Hari Bathini Tested-by: Naveen N. Rao (ppc64le) Reviewed-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610155552.25892-2-hbathini@linux.ibm.com arch/powerpc/net/bpf_jit_comp64.c | 57 ++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 28 deletions(-) commit 61bdbca855024997fd8c82dc190f458aa81beca8 Author: Laurent Dufour Date: Mon May 23 18:43:53 2022 +0200 powerpc/64s: Don't read H_BLOCK_REMOVE characteristics in radix mode There is no need to read the H_BLOCK_REMOVE characteristics when running in Radix mode because this hcall is never called. Furthermore since the commit 387e220a2e5e ("powerpc/64s: Move hash MMU support code under CONFIG_PPC_64S_HASH_MMU") define pseries_lpar_read_hblkrm_characteristics as un empty function if CONFIG_PPC_64S_HASH_MMU is not set, the #ifdef block can be removed. Signed-off-by: Laurent Dufour Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220523164353.26441-1-ldufour@linux.ibm.com arch/powerpc/platforms/pseries/setup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d9abe36df74976231baa5abc4d399d11b504ace2 Author: Haowen Bai Date: Tue May 31 17:19:50 2022 +0800 powerpc/papr_scm: use dev_get_drvdata Eliminate direct accesses to the driver_data field. Signed-off-by: Haowen Bai Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1653988790-19999-1-git-send-email-baihaowen@meizu.com arch/powerpc/platforms/pseries/papr_scm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a83afe72a2b5760155c2dd840c776aee292dc90 Author: Michael Ellerman Date: Tue May 31 16:59:36 2022 +1000 powerpc/64: Drop ppc_inst_as_str() The ppc_inst_as_str() macro tries to make printing variable length, aka "prefixed", instructions convenient. It mostly succeeds, but it does hide an on-stack buffer, which triggers stack protector. More problematically it doesn't compile at all with GCC 12, with -Wdangling-pointer, due to the fact that it returns the char buffer declared inside the macro: arch/powerpc/kernel/trace/ftrace.c: In function '__ftrace_modify_call': ./include/linux/printk.h:475:44: error: using a dangling pointer to '__str' [-Werror=dangling-pointer=] 475 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ... arch/powerpc/kernel/trace/ftrace.c:567:17: note: in expansion of macro 'pr_err' 567 | pr_err("Not expected bl: opcode is %s\n", ppc_inst_as_str(op)); | ^~~~~~ ./arch/powerpc/include/asm/inst.h:156:14: note: '__str' declared here 156 | char __str[PPC_INST_STR_LEN]; \ | ^~~~~ This could be fixed by having the caller declare the buffer, but in some places there'd need to be two buffers. In all cases where ppc_inst_as_str() is used the output is not really meant for user consumption, it's almost always indicative of a kernel bug. A simpler solution is to just print the value as an unsigned long. For normal instructions the output is identical. For prefixed instructions the value is printed as a single 64-bit quantity, whereas previously the low half was printed first. But that is good enough for debug output, especially as prefixed instructions will be rare in kernel code in practice. Old: c000000000111170 60420000 ori r2,r2,0 c000000000111174 04100001 e580fb00 .long 0xe580fb0004100001 New: c00000000010f90c 60420000 ori r2,r2,0 c00000000010f910 e580fb0004100001 .long 0xe580fb0004100001 Reported-by: Bagas Sanjaya Reported-by: Petr Mladek Signed-off-by: Michael Ellerman Tested-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20220531065936.3674348-1-mpe@ellerman.id.au arch/powerpc/include/asm/inst.h | 19 ------------------- arch/powerpc/kernel/kprobes.c | 2 +- arch/powerpc/kernel/trace/ftrace.c | 24 +++++++++++++----------- arch/powerpc/lib/test_emulate_step.c | 6 +++--- arch/powerpc/xmon/xmon.c | 2 +- 5 files changed, 18 insertions(+), 35 deletions(-) commit dd3549c5032d588bf444bc8b8eae5108d0aa055a Author: Michael Ellerman Date: Thu Jun 16 17:07:05 2022 +1000 selftests/powerpc: Add missing files to .gitignores These were missed when the respective tests were added, add them now. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220616070705.1941829-1-mpe@ellerman.id.au tools/testing/selftests/powerpc/math/.gitignore | 1 + tools/testing/selftests/powerpc/mce/.gitignore | 1 + tools/testing/selftests/powerpc/pmu/ebb/.gitignore | 1 + tools/testing/selftests/powerpc/security/.gitignore | 1 + 4 files changed, 4 insertions(+) commit dc94f89ae68fba71f0423dde3c9956f4d9c47e5d Merge: a111daf0c53a b4da91879e98 Author: Marc Zyngier Date: Wed Jun 29 10:30:10 2022 +0100 Merge branch kvm-arm64/burn-the-flags into kvmarm-master/next * kvm-arm64/burn-the-flags: : . : Rework the per-vcpu flags to make them more manageable, : splitting them in different sets that have specific : uses: : : - configuration flags : - input to the world-switch : - state bookkeeping for the kernel itself : : The FP tracking is also simplified and tracked outside : of the flags as a separate state. : . KVM: arm64: Move the handling of !FP outside of the fast path KVM: arm64: Document why pause cannot be turned into a flag KVM: arm64: Reduce the size of the vcpu flag members KVM: arm64: Add build-time sanity checks for flags KVM: arm64: Warn when PENDING_EXCEPTION and INCREMENT_PC are set together KVM: arm64: Convert vcpu sysregs_loaded_on_cpu to a state flag KVM: arm64: Kill unused vcpu flags field KVM: arm64: Move vcpu WFIT flag to the state flag set KVM: arm64: Move vcpu ON_UNSUPPORTED_CPU flag to the state flag set KVM: arm64: Move vcpu SVE/SME flags to the state flag set KVM: arm64: Move vcpu debug/SPE/TRBE flags to the input flag set KVM: arm64: Move vcpu PC/Exception flags to the input flag set KVM: arm64: Move vcpu configuration flags into their own set KVM: arm64: Add three sets of flags to the vcpu state KVM: arm64: Add helpers to manipulate vcpu flags among a set KVM: arm64: Move FP state ownership from flag to a tristate KVM: arm64: Drop FP_FOREIGN_STATE from the hypervisor code Signed-off-by: Marc Zyngier commit 4139320d19e61093cfcd3fa1936c091f717fd3cf Author: Schspa Shi Date: Wed Jun 29 13:10:23 2022 +0800 arm64/fpsimd: Remove duplicate SYS_SVCR read It seems to be a typo, remove the duplicate SYS_SVCR read. Signed-off-by: Schspa Shi Link: https://lore.kernel.org/r/20220629051023.18173-1-schspa@gmail.com Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 1 - 1 file changed, 1 deletion(-) commit bdbcd22d491212c266589892f0818c65a2bc4704 Author: Mark Rutland Date: Wed Jun 29 09:42:07 2022 +0530 arm64: head: remove __PHYS_OFFSET It's very easy to confuse __PHYS_OFFSET and PHYS_OFFSET. To clarify things, let's remove __PHYS_OFFSET and use KERNEL_START directly, with comments to show that we're using physical address, as we do for other objects. At the same time, update the comment regarding the kernel entry address to mention __pa(KERNEL_START) rather than __pa(PAGE_OFFSET). There should be no functional change as a result of this patch. Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Will Deacon Acked-by: Ard Biesheuvel Signed-off-by: Mark Rutland Signed-off-by: Anshuman Khandual Link: https://lore.kernel.org/r/20220629041207.1670133-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit b4da91879e98bdd5998ee84f47f02426ac50a729 Author: Marc Zyngier Date: Wed Jun 8 14:22:31 2022 +0100 KVM: arm64: Move the handling of !FP outside of the fast path We currently start by assuming that the host owns the FP unit at load time, then check again whether this is the case as we are about to run. Only at this point do we account for the fact that there is a (vanishingly small) chance that we're running on a system without a FPSIMD unit (yes, this is madness). We can actually move this FPSIMD check as early as load-time, and drop the check at run time. No intended change in behaviour. Suggested-by: Reiji Watanabe Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/kvm/arm.c | 6 ++++++ arch/arm64/kvm/fpsimd.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) commit 0fa4a3137e943cd6acab386ff26cd8d5e94e9559 Author: Marc Zyngier Date: Sat May 28 12:38:28 2022 +0100 KVM: arm64: Document why pause cannot be turned into a flag It would be tempting to turn the 'pause' state into a flag. However, this cannot easily be done as it is updated out of context, while all the flags expect to only be updated from the vcpu thread. Turning it into a flag would require to make all flag updates atomic, which isn't necessary desireable. Document this, and take this opportunity to move the field next to the flag sets, filling a hole in the vcpu structure. Reviewed-by: Fuad Tabba Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 54ddda919c4bc37c113727034619c4e15c184334 Author: Marc Zyngier Date: Sat May 28 12:38:27 2022 +0100 KVM: arm64: Reduce the size of the vcpu flag members Now that we can detect flags overflowing their container, reduce the size of all flag set members in the vcpu struct, turning them into 8bit quantities. Even with the FP state enum occupying 32bit, the whole of the state that was represented by flags is smaller by one byte. Profit! Reviewed-by: Fuad Tabba Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5a3984f4ec73d1c7cf31a4cee46cca7d4c75deee Author: Marc Zyngier Date: Sat May 28 12:38:26 2022 +0100 KVM: arm64: Add build-time sanity checks for flags Flags are great, but flags can also be dangerous: it is easy to encode a flag that is bigger than its container (unless the container is a u64), and it is easy to construct a flag value that doesn't fit in the mask that is associated with it. Add a couple of build-time sanity checks that ensure we catch these two cases. Reviewed-by: Fuad Tabba Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit e19f2c6cd14668c0d5b1cef280632b7ca5893118 Author: Marc Zyngier Date: Sat May 28 12:38:25 2022 +0100 KVM: arm64: Warn when PENDING_EXCEPTION and INCREMENT_PC are set together We really don't want PENDING_EXCEPTION and INCREMENT_PC to ever be set at the same time, as they are mutually exclusive. Add checks that will generate a warning should this ever happen. Reviewed-by: Fuad Tabba Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_emulate.h | 2 ++ 1 file changed, 2 insertions(+) commit 30b6ab45f81334e83dcb440451b6a4c4a753a118 Author: Marc Zyngier Date: Sat May 28 12:38:24 2022 +0100 KVM: arm64: Convert vcpu sysregs_loaded_on_cpu to a state flag The aptly named boolean 'sysregs_loaded_on_cpu' tracks whether some of the vcpu system registers are resident on the physical CPU when running in VHE mode. This is obviously a flag in hidding, so let's convert it to a state flag, since this is solely a host concern (the hypervisor itself always knows which state we're in). Reviewed-by: Fuad Tabba Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 6 ++---- arch/arm64/kvm/hyp/vhe/sysreg-sr.c | 4 ++-- arch/arm64/kvm/sys_regs.c | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) commit 781e3ae148fd2f9b0cf9b5b94f6c32f2361eb7c0 Author: Marc Zyngier Date: Sat May 28 12:38:23 2022 +0100 KVM: arm64: Kill unused vcpu flags field Horray, we have now sorted all the preexisting flags, and the 'flags' field is now unused. Get rid of it while nobody is looking. Reviewed-by: Fuad Tabba Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 3 --- 1 file changed, 3 deletions(-) commit eebc538d8e07e0ec759823664cbe2011a8bd885d Author: Marc Zyngier Date: Sat May 28 12:38:22 2022 +0100 KVM: arm64: Move vcpu WFIT flag to the state flag set The host kernel uses the WFIT flag to remember that a vcpu has used this instruction and wake it up as required. Move it to the state set, as nothing in the hypervisor uses this information. Reviewed-by: Fuad Tabba Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 4 ++-- arch/arm64/kvm/arch_timer.c | 2 +- arch/arm64/kvm/arm.c | 2 +- arch/arm64/kvm/handle_exit.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit aff3ccd7320eed5814d317fcb80244f474d66a84 Author: Marc Zyngier Date: Sat May 28 12:38:21 2022 +0100 KVM: arm64: Move vcpu ON_UNSUPPORTED_CPU flag to the state flag set The ON_UNSUPPORTED_CPU flag is only there to track the sad fact that we have ended-up on a CPU where we cannot really run. Since this is only for the host kernel's use, move it to the state set. Reviewed-by: Fuad Tabba Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 0affa37fcd1d6f701a0fe805c4ceb7f348d377d5 Author: Marc Zyngier Date: Sat May 28 12:38:20 2022 +0100 KVM: arm64: Move vcpu SVE/SME flags to the state flag set The two HOST_{SVE,SME}_ENABLED are only used for the host kernel to track its own state across a vcpu run so that it can be fully restored. Move these flags to the so called state set. Reviewed-by: Fuad Tabba Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 8 +++++--- arch/arm64/kvm/fpsimd.c | 12 ++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) commit b1da49088ac68a21c613efd734dada8272ec0b00 Author: Marc Zyngier Date: Sat May 28 12:38:19 2022 +0100 KVM: arm64: Move vcpu debug/SPE/TRBE flags to the input flag set The three debug flags (which deal with the debug registers, SPE and TRBE) all are input flags to the hypervisor code. Move them into the input set and convert them to the new accessors. Reviewed-by: Fuad Tabba Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 9 ++++++--- arch/arm64/kvm/debug.c | 25 ++++++++++++------------- arch/arm64/kvm/hyp/include/hyp/debug-sr.h | 6 +++--- arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h | 4 ++-- arch/arm64/kvm/hyp/nvhe/debug-sr.c | 8 ++++---- arch/arm64/kvm/sys_regs.c | 8 ++++---- 6 files changed, 31 insertions(+), 29 deletions(-) commit a06968563775181690125091f470a8655742dcbf Author: Nirmoy Das Date: Fri Jun 24 13:08:21 2022 +0200 drm/i915: Fix a lockdep warning at error capture For some platfroms we use stop_machine version of gen8_ggtt_insert_page/gen8_ggtt_insert_entries to avoid a concurrent GGTT access bug but this causes a circular locking dependency warning: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ggtt->error_mutex); lock(dma_fence_map); lock(&ggtt->error_mutex); lock(cpu_hotplug_lock); Fix this by calling gen8_ggtt_insert_page/gen8_ggtt_insert_entries directly at error capture which is concurrent GGTT access safe because reset path make sure of that. v2: Fix rebase conflict and added a comment. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5595 Reviewed-by: Gwan-gyeong Mun Suggested-by: Chris Wilson Signed-off-by: Nirmoy Das Reviewed-by: Andrzej Hajda Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20220624110821.29190-1-nirmoy.das@intel.com drivers/gpu/drm/i915/gt/intel_ggtt.c | 10 ++++++++++ drivers/gpu/drm/i915/gt/intel_gtt.h | 9 +++++++++ drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 5 ++++- drivers/gpu/drm/i915/i915_gpu_error.c | 8 ++++++-- 4 files changed, 29 insertions(+), 3 deletions(-) commit f5c847ea19d323974d6f7c7e9fa4858ce0727096 Author: Fabiano Rosas Date: Fri Jun 24 11:27:12 2022 -0300 KVM: PPC: Align pt_regs in kvm_vcpu_arch structure The H_ENTER_NESTED hypercall receives as second parameter the address of a region of memory containing the values for the nested guest privileged registers. We currently use the pt_regs structure contained within kvm_vcpu_arch for that end. Most hypercalls that receive a memory address expect that region to not cross a 4K page boundary. We would want H_ENTER_NESTED to follow the same pattern so this patch ensures the pt_regs structure sits within a page. Note: the pt_regs structure is currently 384 bytes in size, so aligning to 512 is sufficient to ensure it will not cross a 4K page and avoids punching too big a hole in struct kvm_vcpu_arch. Signed-off-by: Fabiano Rosas Signed-off-by: Murilo Opsfelder Araújo Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220624142712.790491-1-farosas@linux.ibm.com arch/powerpc/include/asm/kvm_host.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0df01238b8aa300cbc736e7ec433d201a76036f3 Author: Fabiano Rosas Date: Tue Jun 14 13:52:04 2022 -0300 KVM: PPC: Book3S HV: tracing: Add missing hcall names The kvm_trace_symbol_hcall macro is missing several of the hypercalls defined in hvcall.h. Add the most common ones that are issued during guest lifetime, including the ones that are only used by QEMU and SLOF. Signed-off-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220614165204.549229-1-farosas@linux.ibm.com arch/powerpc/include/asm/hvcall.h | 8 ++++++++ arch/powerpc/kvm/trace_hv.h | 21 ++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) commit fbf6ad5efe95665c188248b6abee94f4bf296604 Author: Ard Biesheuvel Date: Wed Jun 29 10:32:46 2022 +0200 arm64: lds: use PROVIDE instead of conditional definitions Currently, a build with CONFIG_EFI=n and CONFIG_KASAN=y will not complete successfully because of missing symbols. This is due to the fact that the __pi_ prefixed aliases for __memcpy/__memmove were put inside a #ifdef CONFIG_EFI block inadvertently, and are therefore missing from the build in question. These definitions should only be provided when needed, as they will otherwise clutter up the symbol table, kallsyms etc for no reason. Fortunately, instead of using CPP conditionals, we can achieve the same result by using the linker's PROVIDE() directive, which only defines a symbol if it is required to complete the link. So let's use that for all symbols alias definitions. Reported-by: kernel test robot Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220629083246.3729177-1-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/image-vars.h | 63 +++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 32 deletions(-) commit b44bb1b7cbbae66ec73868f5fbd57c54f0612d1c Author: Fabiano Rosas Date: Wed May 25 10:05:54 2022 -0300 KVM: PPC: Book3S HV: Provide more detailed timings for P9 entry path Alter the data collection points for the debug timing code in the P9 path to be more in line with what the code does. The points where we accumulate time are now the following: vcpu_entry: From vcpu_run_hv entry until the start of the inner loop; guest_entry: From the start of the inner loop until the guest entry in asm; in_guest: From the guest entry in asm until the return to KVM C code; guest_exit: From the return into KVM C code until the corresponding hypercall/page fault handling or re-entry into the guest; hypercall: Time spent handling hcalls in the kernel (hcalls can go to QEMU, not accounted here); page_fault: Time spent handling page faults; vcpu_exit: vcpu_run_hv exit (almost no code here currently). Like before, these are exposed in debugfs in a file called "timings". There are four values: - number of occurrences of the accumulation point; - total time the vcpu spent in the phase in ns; - shortest time the vcpu spent in the phase in ns; - longest time the vcpu spent in the phase in ns; === Before: rm_entry: 53132 16793518 256 4060 rm_intr: 53132 2125914 22 340 rm_exit: 53132 24108344 374 2180 guest: 53132 40980507996 404 9997650 cede: 0 0 0 0 After: vcpu_entry: 34637 7716108 178 4416 guest_entry: 52414 49365608 324 747542 in_guest: 52411 40828715840 258 9997480 guest_exit: 52410 19681717182 826 102496674 vcpu_exit: 34636 1744462 38 182 hypercall: 45712 22878288 38 1307962 page_fault: 992 111104034 568 168688 With just one instruction (hcall): vcpu_entry: 1 942 942 942 guest_entry: 1 4044 4044 4044 in_guest: 1 1540 1540 1540 guest_exit: 1 3542 3542 3542 vcpu_exit: 1 80 80 80 hypercall: 0 0 0 0 page_fault: 0 0 0 0 === Signed-off-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220525130554.2614394-6-farosas@linux.ibm.com arch/powerpc/include/asm/kvm_host.h | 12 +++++++----- arch/powerpc/kvm/Kconfig | 9 +++++---- arch/powerpc/kvm/book3s_hv.c | 23 ++++++++++++++++++----- arch/powerpc/kvm/book3s_hv_p9_entry.c | 14 ++++---------- 4 files changed, 34 insertions(+), 24 deletions(-) commit 2861c827286fb6646f6b6caee418efd99992097c Author: Fabiano Rosas Date: Wed May 25 10:05:53 2022 -0300 KVM: PPC: Book3S HV: Expose timing functions to module code The next patch adds new timing points to the P9 entry path, some of which are in the module code, so we need to export the timing functions. Signed-off-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220525130554.2614394-5-farosas@linux.ibm.com arch/powerpc/kvm/book3s_hv.h | 10 ++++++++++ arch/powerpc/kvm/book3s_hv_p9_entry.c | 11 ++--------- 2 files changed, 12 insertions(+), 9 deletions(-) commit c3fa64c99c61d99631a8e06a6cf991c35c98ec7d Author: Fabiano Rosas Date: Wed May 25 10:05:52 2022 -0300 KVM: PPC: Book3S HV: Decouple the debug timing from the P8 entry path We are currently doing the timing for debug purposes of the P9 entry path using the accumulators and terminology defined by the old entry path for P8 machines. Not only the "real-mode" and "napping" mentions are out of place for the P9 Radix entry path but also we cannot change them because the timing code is coupled to the structures defined in struct kvm_vcpu_arch. Add a new CONFIG_KVM_BOOK3S_HV_P9_TIMING to enable the timing code for the P9 entry path. For now, just add the new CONFIG and duplicate the structures. A subsequent patch will add the P9 changes. Signed-off-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220525130554.2614394-4-farosas@linux.ibm.com arch/powerpc/include/asm/kvm_host.h | 8 ++++++++ arch/powerpc/kvm/Kconfig | 14 +++++++++++++- arch/powerpc/kvm/book3s_hv.c | 13 +++++++++++-- arch/powerpc/kvm/book3s_hv_p9_entry.c | 2 +- 4 files changed, 33 insertions(+), 4 deletions(-) commit 3f8ed993be3cf154a91d9ab5e80470c6c755adbe Author: Fabiano Rosas Date: Wed May 25 10:05:51 2022 -0300 KVM: PPC: Book3S HV: Add a new config for P8 debug timing Turn the existing Kconfig KVM_BOOK3S_HV_EXIT_TIMING into KVM_BOOK3S_HV_P8_TIMING in preparation for the addition of a new config for P9 timings. This applies only to P8 code, the generic timing code is still kept under KVM_BOOK3S_HV_EXIT_TIMING. Signed-off-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220525130554.2614394-3-farosas@linux.ibm.com arch/powerpc/kernel/asm-offsets.c | 2 +- arch/powerpc/kvm/Kconfig | 6 +++++- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 24 ++++++++++++------------ 3 files changed, 18 insertions(+), 14 deletions(-) commit 9981bace85d816ed8724ac46e49285e8488d29e6 Author: Fabiano Rosas Date: Wed May 25 10:05:50 2022 -0300 KVM: PPC: Book3S HV: Fix "rm_exit" entry in debugfs timings At debugfs/kvm//vcpu0/timings we show how long each part of the code takes to run: $ cat /sys/kernel/debug/kvm/*-*/vcpu0/timings rm_entry: 123785 49398892 118 4898 rm_intr: 123780 6075890 22 390 rm_exit: 0 0 0 0 <-- NOK guest: 123780 46732919988 402 9997638 cede: 0 0 0 0 <-- OK, no cede napping in P9 The "rm_exit" is always showing zero because it is the last one and end_timing does not increment the counter of the previous entry. We can fix it by calling accumulate_time again instead of end_timing. That way the counter gets incremented. The rest of the arithmetic can be ignored because there are no timing points after this and the accumulators are reset before the next round. Signed-off-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220525130554.2614394-2-farosas@linux.ibm.com arch/powerpc/kvm/book3s_hv_p9_entry.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit ee794221a6f66d054beb1cbc151d8de4083e634e Author: Colin Ian King Date: Fri Jun 24 09:14:09 2022 +0100 fpga: fpga-mgr: Fix spelling mistake "bitsream" -> "bitstream" There is an spelling mistake in a dev_err message. Fix it. Fixes: 3cc624beba63 ("fpga: fpga-mgr: support bitstream offset in image buffer") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20220624081409.14760-1-colin.i.king@gmail.com [yilun.xu@intel.com: add the Fixes tag] Signed-off-by: Xu Yilun drivers/fpga/fpga-mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7b9ed7c34a9f5dbf8222d63e3e313cef9f3150b Author: Christophe Leroy Date: Tue Jun 28 16:48:59 2022 +0200 powerpc/64e: KASAN Full support for BOOK3E/64 We now have memory organised in a way that allows implementing KASAN. Unlike book3s/64, book3e always has translation active so the only thing needed to use KASAN is to setup an early zero shadow mapping just after setting a stack pointer and before calling early_setup(). The memory layout is now as follows +------------------------+ Kernel virtual map end (0xc000200000000000) | | | 16TB of KASAN map | | | +------------------------+ Kernel KASAN shadow map start | | | 16TB of IO map | | | +------------------------+ Kernel IO map start | | | 16TB of vmemmap | | | +------------------------+ Kernel vmemmap start | | | 16TB of vmap | | | +------------------------+ Kernel virt start (0xc000100000000000) | | | 64TB of linear mem | | | +------------------------+ Kernel linear (0xc.....) Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0bef8beda27baf71e3b9e8b13e620fba6e19499b.1656427701.git.christophe.leroy@csgroup.eu arch/powerpc/Kconfig | 2 + arch/powerpc/Kconfig.debug | 3 +- arch/powerpc/include/asm/kasan.h | 13 +++- arch/powerpc/kernel/head_64.S | 3 + arch/powerpc/mm/kasan/Makefile | 1 + arch/powerpc/mm/kasan/init_book3e_64.c | 133 +++++++++++++++++++++++++++++++++ arch/powerpc/mm/kasan/init_book3s_64.c | 2 + arch/powerpc/platforms/Kconfig.cputype | 1 - 8 files changed, 155 insertions(+), 3 deletions(-) commit 059c189389ebe9c4909d849d1a5f65c53115ca19 Author: Christophe Leroy Date: Tue Jun 28 16:48:58 2022 +0200 powerpc/64e: Reorganise virtual memory Reduce the size of IO map in order to leave the last quarter of virtual MAP for KASAN shadow mapping. This gives the following layout. +------------------------+ Kernel virtual map end (0xc000200000000000) | | | 16TB (unused) | | | +------------------------+ Kernel IO map end | | | 16TB of IO map | | | +------------------------+ Kernel IO map start | | | 16TB of vmemmap | | | +------------------------+ Kernel vmemmap start | | | 16TB of vmap | | | +------------------------+ Kernel virt start (0xc000100000000000) | | | 64TB of linear mem | | | +------------------------+ Kernel linear (0xc.....) Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/54ef01673bf14228106afd629f795c83acb9a00c.1656427701.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/nohash/64/pgtable.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 128c1ea2f838d3031a1c475607860e4271a8e9dc Author: Christophe Leroy Date: Tue Jun 28 16:48:57 2022 +0200 powerpc/64e: Move virtual memory closer to linear memory Today nohash/64 have linear memory based at 0xc000000000000000 and virtual memory based at 0x8000000000000000. In order to implement KASAN, we need to regroup both areas. Move virtual memmory at 0xc000100000000000. This complicates a bit TLB miss handlers. Until now, memory region was easily identified with the 4 higher bits of address: - 0 ==> User - c ==> Linear Memory - 8 ==> Virtual Memory Now we need to rely on the 20 higher bits, with: - 0xxxx ==> User - c0000 ==> Linear Memory - c0001 ==> Virtual Memory Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4b225168031449fc34fc7132f3923cc8dc54af60.1656427701.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/nohash/64/pgtable.h | 2 +- arch/powerpc/mm/nohash/tlb_low_64e.S | 64 ++++++++++++++++------------ 2 files changed, 38 insertions(+), 28 deletions(-) commit b646c1f7f43c13510d519e3044c87aa32352fc1f Author: Christophe Leroy Date: Tue Jun 28 16:48:56 2022 +0200 powerpc/64e: Remove unused REGION related macros Those macros are not used anywhere. Remove them as they are soon going to be wrong and are not worth modifying as they are not used. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f0efde8cee0924c3991790042b176ac77ad35e1f.1656427701.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/nohash/64/pgtable.h | 12 ------------ 1 file changed, 12 deletions(-) commit 3adfb457b84bd6de4e78a99814038fbd7205f253 Author: Christophe Leroy Date: Tue Jun 28 16:48:55 2022 +0200 powerpc/64e: Remove MMU_FTR_USE_TLBRSRV and MMU_FTR_USE_PAIRED_MAS Commit fb5a515704d7 ("powerpc: Remove platforms/wsp and associated pieces") removed the last CPU having features MMU_FTRS_A2 and commit cd68098bcedd ("powerpc: Clean up MMU_FTRS_A2 and MMU_FTR_TYPE_3E") removed MMU_FTRS_A2 which was the last user of MMU_FTR_USE_TLBRSRV and MMU_FTR_USE_PAIRED_MAS. Remove all code that relies on MMU_FTR_USE_TLBRSRV and MMU_FTR_USE_PAIRED_MAS. With this change done, TLB miss can happen before the mmu feature fixups. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/cfd5a0ecdb1598da968832e1bddf7431ec267200.1656427701.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/mmu.h | 12 ------ arch/powerpc/kernel/setup_64.c | 1 - arch/powerpc/mm/nohash/book3e_hugetlbpage.c | 30 ++++--------- arch/powerpc/mm/nohash/tlb_low_64e.S | 66 ----------------------------- 4 files changed, 8 insertions(+), 101 deletions(-) commit 09317643117ade87c03158341e87466413fa8f1a Author: Christophe Leroy Date: Tue Jun 28 16:48:54 2022 +0200 powerpc/64e: Fix early TLB miss with KUAP With KUAP, the TLB miss handler bails out when an access to user memory is performed with a nul TID. But the normal TLB miss routine which is only used early during boot does the check regardless for all memory areas, not only user memory. By chance there is no early IO or vmalloc access, but when KASAN come we will start having early TLB misses. Fix it by creating a special branch for user accesses similar to the one in the 'bolted' TLB miss handlers. Unfortunately SPRN_MAS1 is now read too early and there are no registers available to preserve it so it will be read a second time. Fixes: 57bc963837f5 ("powerpc/kuap: Wire-up KUAP on book3e/64") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8d6c5859a45935d6e1a336da4dc20be421e8cea7.1656427701.git.christophe.leroy@csgroup.eu arch/powerpc/mm/nohash/tlb_low_64e.S | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit dd8de84b57b02ba9c1fe530a6d916c0853f136bd Author: Christophe Leroy Date: Tue Jun 28 16:43:35 2022 +0200 powerpc/ptdump: Fix display of RW pages on FSL_BOOK3E On FSL_BOOK3E, _PAGE_RW is defined with two bits, one for user and one for supervisor. As soon as one of the two bits is set, the page has to be display as RW. But the way it is implemented today requires both bits to be set in order to display it as RW. Instead of display RW when _PAGE_RW bits are set and R otherwise, reverse the logic and display R when _PAGE_RW bits are all 0 and RW otherwise. This change has no impact on other platforms as _PAGE_RW is a single bit on all of them. Fixes: 8eb07b187000 ("powerpc/mm: Dump linux pagetables") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0c33b96317811edf691e81698aaee8fa45ec3449.1656427391.git.christophe.leroy@csgroup.eu arch/powerpc/mm/ptdump/shared.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2db2008e636327a3caa648ef1e34a9d501d20e2e Author: Christophe Leroy Date: Thu Jun 23 10:56:57 2022 +0200 powerpc/64e: Rewrite p4d_populate() as a static inline function Rewrite p4d_populate() as a static inline function instead of a macro. This change allows typechecking and would have helped detecting a recently found bug in map_kernel_page(). Signed-off-by: Christophe Leroy Acked-by: Mike Rapoport Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1b416f8a8fe1bc3f4e01175680ce310b7eb3a1e4.1655974565.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/nohash/64/pgalloc.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 12a9eddd239e14ccbf0ea50b3504a21bda002ba9 Author: Christophe Leroy Date: Mon Jun 20 08:21:22 2022 +0200 powerpc: Remove _PAGE_SAO stub for book3e/64 Since commit 634093c59a12 ("powerpc/mm: enable ARCH_HAS_VM_GET_PAGE_PROT"), _PAGE_SAO is used only in arch/powerpc/mm/book3s64/pgtable.c The _PAGE_SAO stub defined as 0 for book3e/64 can be removed. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/715e644fb3c7d992c0b71f6165ab6cf8c682055a.1655706069.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/nohash/64/pgtable.h | 2 -- 1 file changed, 2 deletions(-) commit 513f5bbac7b9ca7046bc350dd6eb39b957e338a7 Author: Christophe Leroy Date: Tue Jun 14 12:32:25 2022 +0200 powerpc/32: Remove __map_without_ltlbs __map_without_ltlbs is used only for 40x, and only when STRICT_KERNEL_RWX, KFENCE or DEBUG_PAGEALLOC is active. Do the verification directly in 40x version of mmu_mapin_ram() and remove __map_without_ltlbs from core ppc32. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/3422094db965d218c4c3d8580f526963a9ac897f.1655202721.git.christophe.leroy@csgroup.eu arch/powerpc/mm/init_32.c | 23 ----------------------- arch/powerpc/mm/nohash/40x.c | 9 +++++++-- 2 files changed, 7 insertions(+), 25 deletions(-) commit 56e54b4e6c477b2a7df43f9a320ae5f9a5bfb16c Author: Christophe Leroy Date: Tue Jun 14 12:32:24 2022 +0200 powerpc/32: Remove 'noltlbs' kernel parameter Mapping without large TLBs has no added value on the 8xx. Mapping without large TLBs is still necessary on 40x when selecting CONFIG_KFENCE or CONFIG_DEBUG_PAGEALLOC or CONFIG_STRICT_KERNEL_RWX, but this is done automatically and doesn't require user selection. Remove 'noltlbs' kernel parameter, the user has no reason to use it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/80ca17bd39cf608a8ebd0764d7064a498e131199.1655202721.git.christophe.leroy@csgroup.eu Documentation/admin-guide/kernel-parameters.txt | 3 --- arch/powerpc/mm/init_32.c | 3 --- arch/powerpc/mm/nohash/8xx.c | 9 --------- 3 files changed, 15 deletions(-) commit 1ce844973bb516e95d3f2bcb001a3992548def9d Author: Christophe Leroy Date: Tue Jun 14 12:32:23 2022 +0200 powerpc/32: Remove the 'nobats' kernel parameter Mapping without BATs doesn't bring any added value to the user. Remove that option. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6977314c823cfb728bc0273cea634b41807bfb64.1655202721.git.christophe.leroy@csgroup.eu Documentation/admin-guide/kernel-parameters.txt | 3 --- arch/powerpc/mm/book3s32/mmu.c | 2 +- arch/powerpc/mm/init_32.c | 11 ----------- arch/powerpc/mm/mmu_decl.h | 1 - arch/powerpc/platforms/83xx/misc.c | 14 ++++++-------- 5 files changed, 7 insertions(+), 24 deletions(-) commit 92f89ec1b534b6eca2b81bae97d30a786932f51a Author: Christophe Leroy Date: Sat Jun 11 08:51:57 2022 +0200 powerpc: Restore CONFIG_DEBUG_INFO in defconfigs Commit f9b3cd245784 ("Kconfig.debug: make DEBUG_INFO selectable from a choice") broke the selection of CONFIG_DEBUG_INFO by powerpc defconfigs. It is now necessary to select one of the three DEBUG_INFO_DWARF* options to get DEBUG_INFO enabled. Replace DEBUG_INFO=y by DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y in all defconfigs using the following command: sed -i s/DEBUG_INFO=y/DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y/g `git grep -l DEBUG_INFO arch/powerpc/configs/` Fixes: f9b3cd245784 ("Kconfig.debug: make DEBUG_INFO selectable from a choice") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Reviewed-by: Kees Cook Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/98a4c2603bf9e4b776e219f5b8541d23aa24e854.1654930308.git.christophe.leroy@csgroup.eu arch/powerpc/configs/44x/akebono_defconfig | 2 +- arch/powerpc/configs/44x/currituck_defconfig | 2 +- arch/powerpc/configs/44x/fsp2_defconfig | 2 +- arch/powerpc/configs/44x/iss476-smp_defconfig | 2 +- arch/powerpc/configs/44x/warp_defconfig | 2 +- arch/powerpc/configs/52xx/lite5200b_defconfig | 2 +- arch/powerpc/configs/52xx/motionpro_defconfig | 2 +- arch/powerpc/configs/52xx/tqm5200_defconfig | 2 +- arch/powerpc/configs/adder875_defconfig | 2 +- arch/powerpc/configs/ep8248e_defconfig | 2 +- arch/powerpc/configs/ep88xc_defconfig | 2 +- arch/powerpc/configs/fsl-emb-nonhw.config | 2 +- arch/powerpc/configs/mgcoge_defconfig | 2 +- arch/powerpc/configs/mpc5200_defconfig | 2 +- arch/powerpc/configs/mpc8272_ads_defconfig | 2 +- arch/powerpc/configs/mpc885_ads_defconfig | 2 +- arch/powerpc/configs/ppc6xx_defconfig | 2 +- arch/powerpc/configs/pq2fads_defconfig | 2 +- arch/powerpc/configs/ps3_defconfig | 2 +- arch/powerpc/configs/tqm8xx_defconfig | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) commit 78f1c24abd16952d383f34eefbb0af7bb53f9b0b Author: Christophe Leroy Date: Thu Jun 9 12:16:42 2022 +0200 powerpc/irq: Simplify __do_irq() Remove duplicated code by implementing a proper if/else. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5a3b21311191f1240850db6ab29b19ac7885fe03.1654769775.git.christophe.leroy@csgroup.eu arch/powerpc/kernel/irq.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit e90855be9e90e4a046d2be817a31fae6637415a4 Author: Christophe Leroy Date: Thu Jun 9 12:16:41 2022 +0200 powerpc/irq: Perform stack_overflow detection after switching to IRQ stack When KASAN is enabled, as shown by the Oops below, the 2k limit is not enough to allow stack dump after a stack overflow detection when CONFIG_DEBUG_STACKOVERFLOW is selected: do_IRQ: stack overflow: 1984 CPU: 0 PID: 126 Comm: systemd-udevd Not tainted 5.18.0-gentoo-PMacG4 #1 Call Trace: Oops: Kernel stack overflow, sig: 11 [#1] BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac Modules linked in: sr_mod cdrom radeon(+) ohci_pci(+) hwmon i2c_algo_bit drm_ttm_helper ttm drm_dp_helper snd_aoa_i2sbus snd_aoa_soundbus snd_pcm ehci_pci snd_timer ohci_hcd snd ssb ehci_hcd 8250_pci soundcore drm_kms_helper pcmcia 8250 pcmcia_core syscopyarea usbcore sysfillrect 8250_base sysimgblt serial_mctrl_gpio fb_sys_fops usb_common pkcs8_key_parser fuse drm drm_panel_orientation_quirks configfs CPU: 0 PID: 126 Comm: systemd-udevd Not tainted 5.18.0-gentoo-PMacG4 #1 NIP: c02e5558 LR: c07eb3bc CTR: c07f46a8 REGS: e7fe9f50 TRAP: 0000 Not tainted (5.18.0-gentoo-PMacG4) MSR: 00001032 CR: 44a14824 XER: 20000000 GPR00: c07eb3bc eaa1c000 c26baea0 eaa1c0a0 00000008 00000000 c07eb3bc eaa1c010 GPR08: eaa1c0a8 04f3f3f3 f1f1f1f1 c07f4c84 44a14824 0080f7e4 00000005 00000010 GPR16: 00000025 eaa1c154 eaa1c158 c0dbad64 00000020 fd543810 eaa1c0a0 eaa1c29e GPR24: c0dbad44 c0db8740 05ffffff fd543802 eaa1c150 c0c9a3c0 eaa1c0a0 c0c9a3c0 NIP [c02e5558] kasan_check_range+0xc/0x2b4 LR [c07eb3bc] format_decode+0x80/0x604 Call Trace: [eaa1c000] [c07eb3bc] format_decode+0x80/0x604 (unreliable) [eaa1c070] [c07f4dac] vsnprintf+0x128/0x938 [eaa1c110] [c07f5788] sprintf+0xa0/0xc0 [eaa1c180] [c0154c1c] __sprint_symbol.constprop.0+0x170/0x198 [eaa1c230] [c07ee71c] symbol_string+0xf8/0x260 [eaa1c430] [c07f46d0] pointer+0x15c/0x710 [eaa1c4b0] [c07f4fbc] vsnprintf+0x338/0x938 [eaa1c550] [c00e8fa0] vprintk_store+0x2a8/0x678 [eaa1c690] [c00e94e4] vprintk_emit+0x174/0x378 [eaa1c6d0] [c00ea008] _printk+0x9c/0xc0 [eaa1c750] [c000ca94] show_stack+0x21c/0x260 [eaa1c7a0] [c07d0bd4] dump_stack_lvl+0x60/0x90 [eaa1c7c0] [c0009234] __do_IRQ+0x170/0x174 [eaa1c800] [c0009258] do_IRQ+0x20/0x34 [eaa1c820] [c00045b4] HardwareInterrupt_virt+0x108/0x10c ... As the detection is asynchronously performed at IRQs, we could be long after the limit has been crossed, so increasing the limit would not solve the problem completely. In order to be sure that there is enough stack space for the stack dump, do it after the switch to the IRQ stack. That way it is sure that the stack is large enough, unless the IRQ stack has been overfilled in which case the end of life is close. Reported-by: Erhard Furtner Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c215d714329f475b431a6193369035aadfc0d182.1654769775.git.christophe.leroy@csgroup.eu arch/powerpc/kernel/irq.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 051bd351a2ef9c69753dc9cf6bd396986f27778c Author: Christophe Leroy Date: Thu Jun 9 12:16:40 2022 +0200 powerpc/irq: Make __do_irq() static Since commit 48cf12d88969 ("powerpc/irq: Inline call_do_irq() and call_do_softirq()"), __do_irq() is not used outside irq.c Reorder functions and make __do_irq() static and drop the declaration in irq.h. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/adbe1c8315ec2d63259f41468e82e51677bb1eda.1654769775.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/irq.h | 1 - arch/powerpc/kernel/irq.c | 46 +++++++++++++++++++++--------------------- 2 files changed, 23 insertions(+), 24 deletions(-) commit 41f20d6db2b64677225bb0b97df956241c353ef8 Author: Christophe Leroy Date: Fri Jun 3 15:08:14 2022 +0200 powerpc/irq: Increase stack_overflow detection limit when KASAN is enabled When KASAN is enabled, as shown by the Oops below, the 2k limit is not enough to allow stack dump after a stack overflow detection when CONFIG_DEBUG_STACKOVERFLOW is selected: do_IRQ: stack overflow: 1984 CPU: 0 PID: 126 Comm: systemd-udevd Not tainted 5.18.0-gentoo-PMacG4 #1 Call Trace: Oops: Kernel stack overflow, sig: 11 [#1] BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac Modules linked in: sr_mod cdrom radeon(+) ohci_pci(+) hwmon i2c_algo_bit drm_ttm_helper ttm drm_dp_helper snd_aoa_i2sbus snd_aoa_soundbus snd_pcm ehci_pci snd_timer ohci_hcd snd ssb ehci_hcd 8250_pci soundcore drm_kms_helper pcmcia 8250 pcmcia_core syscopyarea usbcore sysfillrect 8250_base sysimgblt serial_mctrl_gpio fb_sys_fops usb_common pkcs8_key_parser fuse drm drm_panel_orientation_quirks configfs CPU: 0 PID: 126 Comm: systemd-udevd Not tainted 5.18.0-gentoo-PMacG4 #1 NIP: c02e5558 LR: c07eb3bc CTR: c07f46a8 REGS: e7fe9f50 TRAP: 0000 Not tainted (5.18.0-gentoo-PMacG4) MSR: 00001032 CR: 44a14824 XER: 20000000 GPR00: c07eb3bc eaa1c000 c26baea0 eaa1c0a0 00000008 00000000 c07eb3bc eaa1c010 GPR08: eaa1c0a8 04f3f3f3 f1f1f1f1 c07f4c84 44a14824 0080f7e4 00000005 00000010 GPR16: 00000025 eaa1c154 eaa1c158 c0dbad64 00000020 fd543810 eaa1c0a0 eaa1c29e GPR24: c0dbad44 c0db8740 05ffffff fd543802 eaa1c150 c0c9a3c0 eaa1c0a0 c0c9a3c0 NIP [c02e5558] kasan_check_range+0xc/0x2b4 LR [c07eb3bc] format_decode+0x80/0x604 Call Trace: [eaa1c000] [c07eb3bc] format_decode+0x80/0x604 (unreliable) [eaa1c070] [c07f4dac] vsnprintf+0x128/0x938 [eaa1c110] [c07f5788] sprintf+0xa0/0xc0 [eaa1c180] [c0154c1c] __sprint_symbol.constprop.0+0x170/0x198 [eaa1c230] [c07ee71c] symbol_string+0xf8/0x260 [eaa1c430] [c07f46d0] pointer+0x15c/0x710 [eaa1c4b0] [c07f4fbc] vsnprintf+0x338/0x938 [eaa1c550] [c00e8fa0] vprintk_store+0x2a8/0x678 [eaa1c690] [c00e94e4] vprintk_emit+0x174/0x378 [eaa1c6d0] [c00ea008] _printk+0x9c/0xc0 [eaa1c750] [c000ca94] show_stack+0x21c/0x260 [eaa1c7a0] [c07d0bd4] dump_stack_lvl+0x60/0x90 [eaa1c7c0] [c0009234] __do_IRQ+0x170/0x174 [eaa1c800] [c0009258] do_IRQ+0x20/0x34 [eaa1c820] [c00045b4] HardwareInterrupt_virt+0x108/0x10c ... An investigation shows that on PPC32, calling dump_stack() requires more than 1k when KASAN is not selected and a bit more than 2k bytes when KASAN is selected. On PPC64 the registers are twice the size of PPC32 registers, so the need should be approximately twice the need on PPC32. In the meantime we have THREAD_SIZE which is twice larger on PPC64 than PPC32, and twice larger when KASAN is selected. So we can easily use the value of THREAD_SIZE to set the limit. On PPC32, THREAD_SIZE is 8k without KASAN and 16k with KASAN. On PPC64, THREAD_SIZE is 16k without KASAN. To be on the safe side, leave 2k on PPC32 without KASAN, 4k with KASAN, and 4k on PPC64 without KASAN. It means the limit should be one fourth of THREAD_SIZE. Reported-by: Erhard Furtner Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e8b4eb82a126c3c6c352173a544fe94609ff660b.1654261687.git.christophe.leroy@csgroup.eu arch/powerpc/kernel/irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 077fc62b2b66a95af43dbb363fb8e932999812d3 Author: Christophe Leroy Date: Wed May 18 10:48:55 2022 +0200 powerpc/irq: remove inline assembly in hard_irq_disable macro Use WRITE_ONCE() instead of opencoding the saving of current stack pointeur. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/9f05937d8722ddd2064a7c2362d8f9000e15e1ba.1652863723.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/hw_irq.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 78ffe6a7e2a169c4dcbbd08717a0a8d738659d15 Author: Christophe Leroy Date: Wed May 18 10:32:28 2022 +0200 powerpc/irq: Replace #ifdefs by IS_ENABLED() Replace #ifdef CONFIG_PPC_IRQ_SOFT_MASK_DEBUG and #ifdef CONFIG_PERF_EVENTS by IS_ENABLED() in hw_irq.h and plpar_wrappers.h Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c1ded642f8d9002767f8fed48ed6d1e76254ed73.1652862729.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/hw_irq.h | 30 ++++++++++++++---------------- arch/powerpc/include/asm/plpar_wrappers.h | 5 ++--- 2 files changed, 16 insertions(+), 19 deletions(-) commit ef5b570d3700fbb8628a58da0487486ceeb713cd Author: Christophe Leroy Date: Wed May 18 10:32:27 2022 +0200 powerpc/irq: Don't open code irq_soft_mask helpers Use READ_ONCE() and WRITE_ONCE() instead of open coding read and write of local PACA irq_soft_mask. For the write, add a barrier to keep the memory clobber that was there previously. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e2454434992cc932a5a34b695ae981c0b2f4c28e.1652862729.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/hw_irq.h | 43 +++++++-------------------------------- 1 file changed, 7 insertions(+), 36 deletions(-) commit 98552307e3a72d480e72744bf5da2a865822f496 Author: Christophe Leroy Date: Wed May 18 09:40:16 2022 +0200 powerpc/irq64: Remove get_irq_happened() No need to open code the read of local_paca->irq_happened in assembly, we have READ_ONCE() for doing the same. Replace get_irq_happened() by READ_ONCE(local_paca->irq_happened). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/af511b53e4eb51f8fbc51eda7f5597175e68dce6.1652859593.git.christophe.leroy@csgroup.eu arch/powerpc/kernel/irq_64.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 7d7b28b302085e1ec2815bc9f5205af28394c5db Author: Christophe Leroy Date: Wed May 18 09:40:15 2022 +0200 powerpc/irq: Split irq.c More than half of irq.c is dedicated to PPC64. Move PPC64 code out of irq.c into irq_64.c Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/9f1a47de80f78d3dd270a7a72f69f55f581c4054.1652859593.git.christophe.leroy@csgroup.eu arch/powerpc/kernel/Makefile | 2 +- arch/powerpc/kernel/irq.c | 421 -------------------------------------- arch/powerpc/kernel/irq_64.c | 476 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 477 insertions(+), 422 deletions(-) commit e93dee186fc95f2058b0c9d2317d8b876b8512db Author: Christophe Leroy Date: Fri May 6 11:14:25 2022 +0200 powerpc: Don't include asm/ppc_asm.h in other headers asm/ppc_asm.h is not needed in any of the header it is included. It is only needed by irq.c. Include it there and remove it from other headers. word-at-a-time.h only need ex_table.h, so include it instead. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e2d7b96547037f852c7ed164e4f79e8918c2607a.1651828453.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/io.h | 1 - arch/powerpc/include/asm/uaccess.h | 1 - arch/powerpc/include/asm/word-at-a-time.h | 2 +- arch/powerpc/kernel/irq.c | 1 + 4 files changed, 2 insertions(+), 3 deletions(-) commit 46d60bdb1283bb0f22d9480e2d6c972623cb4182 Author: Christophe Leroy Date: Fri May 6 11:14:24 2022 +0200 powerpc: Include asm/firmware.h in all users of firmware_has_feature() Trying to remove asm/ppc_asm.h from all places that don't need it leads to several failures linked to firmware_has_feature(). To fix it, include asm/firmware.h in all files using firmware_has_feature() All users found with: git grep -L "firmware\.h" ` git grep -l "firmware_has_feature("` Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/11956ec181a034b51a881ac9c059eea72c679a73.1651828453.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/book3s/64/hugetlb.h | 3 +++ arch/powerpc/include/asm/cputime.h | 1 + arch/powerpc/include/asm/interrupt.h | 1 + arch/powerpc/include/asm/mman.h | 1 + arch/powerpc/include/asm/prom.h | 1 + arch/powerpc/kernel/dawr.c | 1 + arch/powerpc/kexec/core.c | 1 + arch/powerpc/kvm/book3s_64_mmu_radix.c | 1 + arch/powerpc/kvm/book3s_hv_nested.c | 1 + arch/powerpc/mm/book3s64/hash_pgtable.c | 1 + arch/powerpc/mm/book3s64/pkeys.c | 1 + arch/powerpc/mm/hugetlbpage.c | 1 + arch/powerpc/platforms/pseries/papr_platform_attributes.c | 1 + arch/powerpc/platforms/pseries/vas.c | 1 + 14 files changed, 16 insertions(+) commit b2274ff2c4bb7eb6fca6039c7e431506c6c26605 Author: Yang Li Date: Tue Jun 28 22:49:08 2022 -0700 Input: sensehat-joystick - remove unnecessary error message The print function dev_err() is redundant because platform_get_irq() already prints an error. Eliminates the follow coccicheck warning: ./drivers/input/joystick/sensehat-joystick.c:102:2-9: line 102 is redundant because platform_get_irq() already prints an error Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20220427004906.129893-1-yang.lee@linux.alibaba.com Signed-off-by: Dmitry Torokhov drivers/input/joystick/sensehat-joystick.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 6bb7144c3fa16a5efb54a8e2aff1817b4168018e Author: Miaoqian Lin Date: Tue Jun 28 22:42:35 2022 -0700 Input: exc3000 - fix return value check of wait_for_completion_timeout wait_for_completion_timeout() returns unsigned long not int. It returns 0 if timed out, and positive if completed. The check for <= 0 is ambiguous and should be == 0 here indicating timeout which is the only error case. Fixes: 102feb1ddfd0 ("Input: exc3000 - factor out vendor data request") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220411105828.22140-1-linmq006@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/exc3000.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 863fdccdc5ed1e187a30a4a103340be4569904c8 Author: Dan Williams Date: Wed Jun 22 01:00:45 2022 -0700 tools/testing/cxl: Fix cxl_hdm_decode_init() calling convention This failing signature: [ 8.392669] cxl_bus_probe: cxl_port endpoint2: probe: 970997760 [ 8.392670] cxl_port: probe of endpoint2 failed with error 970997760 [ 8.392719] create_endpoint: cxl_mem mem0: add: endpoint2 [ 8.392721] cxl_mem mem0: endpoint2 failed probe [ 8.392725] cxl_bus_probe: cxl_mem mem0: probe: -6 ...shows cxl_hdm_decode_init() resulting in a return code ("970997760") that looks like stack corruption. The problem goes away if cxl_hdm_decode_init() is not mocked via __wrap_cxl_hdm_decode_init(). The corruption results from the mismatch that the calling convention for cxl_hdm_decode_init() is: int cxl_hdm_decode_init(struct cxl_dev_state *cxlds, struct cxl_hdm *cxlhdm) ...and __wrap_cxl_hdm_decode_init() is: bool __wrap_cxl_hdm_decode_init(struct cxl_dev_state *cxlds, struct cxl_hdm *cxlhdm) ...i.e. an int is expected but __wrap_hdm_decode_init() returns bool. Fix the convention and cleanup the organization to match __wrap_cxl_await_media_ready() as the difference was a red herring that distracted from finding the bug. Fixes: 92804edb11f0 ("cxl/pci: Drop @info argument to cxl_hdm_decode_init()") Reviewed-by: Jonathan Cameron Reviewed-by: Adam Manzanares Link: https://lore.kernel.org/r/165603870776.551046.8709990108936497723.stgit@dwillia2-xfh Signed-off-by: Dan Williams tools/testing/cxl/test/mock.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit d640516a65d8bec3e5f9ddccc3e15503277c7cbb Author: Menglong Dong Date: Mon Jun 27 20:16:25 2022 +0800 net: mptcp: fix some spelling mistake in mptcp codespell finds some spelling mistake in mptcp: net/mptcp/subflow.c:1624: interaces ==> interfaces net/mptcp/pm_netlink.c:1130: regarless ==> regardless Just fix them. Signed-off-by: Menglong Dong Reviewed-by: Matthieu Baerts Link: https://lore.kernel.org/r/20220627121626.1595732-1-imagedong@tencent.com Signed-off-by: Jakub Kicinski net/mptcp/pm_netlink.c | 2 +- net/mptcp/subflow.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit eba3a9816ad11d4bba9e14acbc8737bdce6c067c Author: Jakub Kicinski Date: Mon Jun 27 10:39:00 2022 -0700 Revert the ARM/dts changes for Renesas RZ/N1 Based on a request from Geert: Revert "ARM: dts: r9a06g032-rzn1d400-db: add switch description" This reverts commit 9aab31d66ec97d7047e42feacc356bc9c21a5bf5. Revert "ARM: dts: r9a06g032: describe switch" This reverts commit cf9695d8a7e927f7563ce6ea0a4e54b8214a12f1. Revert "ARM: dts: r9a06g032: describe GMAC2" This reverts commit 3f5261f1c2a8d7b178f9f65c6dda92523329486e. Revert "ARM: dts: r9a06g032: describe MII converter" This reverts commit 066c3bd358355185d9313358281fe03113c0a9ad. to let these changes flow thru the platform and SoC trees. Link: https://lore.kernel.org/r/CAMuHMdUvSLFU56gsp1a9isOiP9otdCJ2-BqhbrffcoHuA6JNig@mail.gmail.com/ Link: https://lore.kernel.org/r/20220627173900.3136386-1-kuba@kernel.org Signed-off-by: Jakub Kicinski arch/arm/boot/dts/r9a06g032-rzn1d400-db.dts | 117 ---------------------------- arch/arm/boot/dts/r9a06g032.dtsi | 108 ------------------------- 2 files changed, 225 deletions(-) commit b777f93b6a135ae92e2e12126a59d972777946e9 Author: Dario Binacchi Date: Tue Jun 28 10:58:59 2022 -0700 Input: edt-ft5x06 - show crc and header errors by sysfs M06 sends packets with header and crc for data verification. Now you can check at runtime how many packets have been dropped. Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20220621123937.1330389-7-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/edt-ft5x06.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 480343dc89ed9f5d56000a54e5b919379a5001fe Author: Dario Binacchi Date: Tue Jun 28 10:57:47 2022 -0700 Input: edt-ft5x06 - show firmware version by sysfs The firmware version was printed only if debug mode was enabled. Now you can always get it from sysfs. Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Acked-by: Oliver Graute Link: https://lore.kernel.org/r/20220621123937.1330389-6-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/edt-ft5x06.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 60790a5802afe20f9ef2c126dca1acbdd1d23e61 Author: Dario Binacchi Date: Tue Jun 28 10:57:15 2022 -0700 Input: edt-ft5x06 - show model name by sysfs The model name was printed only if debug mode was enabled. Now you can always get it from sysfs. Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Acked-by: Oliver Graute Link: https://lore.kernel.org/r/20220621123937.1330389-5-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/edt-ft5x06.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5bcee83a406c6136fe011b7307f0f034d4e1e20b Author: Dario Binacchi Date: Tue Jun 28 10:56:49 2022 -0700 Input: edt-ft5x06 - set report rate by dts property It allows to change the M06/M12 default scan rate on driver probing. Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20220621123937.1330389-4-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/edt-ft5x06.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 23ea98f4bafa0c4639401747a354e09a5e7686da Author: Dario Binacchi Date: Tue Jun 28 10:56:28 2022 -0700 Input: edt-ft5x06 - get/set M12 report rate by sysfs Add support for reading/writing scan rate (SC) register for M12 by sysfs. The register value is equal to the SC (Hz), unlike M06, where instead it is equal to SC / 10. Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Tested-by: Dario Binacchi Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20220621123937.1330389-3-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/edt-ft5x06.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 625f829586ea96b93817bf675cc42990ab451a17 Author: Dario Binacchi Date: Mon Jun 27 18:32:22 2022 -0700 dt-bindings: input: touchscreen: edt-ft5x06: add report-rate-hz It allows to change the M06/M12 default scan rate. Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220621123937.1330389-2-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/touchscreen/edt-ft5x06.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) commit 957b96e35b9c4bb9526d90de9888c347d9a85fcb Merge: af9784d007d8 bfac8c490d60 Author: Jakub Kicinski Date: Tue Jun 28 21:30:11 2022 -0700 Merge branch 'net-phylink-cleanup-pcs-code' Russell King says: ==================== net: phylink: cleanup pcs code These two patches were part of the larger series for the mv88e6xxx phylink pcs conversion. As this is delayed, I've decided to send these two patches now. ==================== Link: https://lore.kernel.org/r/YrmYEC2N9mVpg9g6@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit bfac8c490d605bea03b1f1927582b6f396462164 Author: Russell King (Oracle) Date: Mon Jun 27 12:44:43 2022 +0100 net: phylink: disable PCS polling over major configuration While we are performing a major configuration, there is no point having the PCS polling timer running. Stop it before we begin preparing for the configuration change, and restart it only once we've successfully completed the change. Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski drivers/net/phy/phylink.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 4f1dd48f403149dc720a24c54120749433c4b984 Author: Russell King (Oracle) Date: Mon Jun 27 12:44:38 2022 +0100 net: phylink: remove pcs_ops member Remove the pcs_ops member from struct phylink, using the one stored in struct phylink_pcs instead. Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski drivers/net/phy/phylink.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) commit af9784d007d8382e71fb841c06ab5ef6aa2540fc Author: Eric Dumazet Date: Mon Jun 27 12:10:38 2022 +0000 tcp: diag: add support for TIME_WAIT sockets to tcp_abort() Currently, "ss -K -ta ..." does not support TIME_WAIT sockets. Issue has been raised at least two times in the past [1] [2] it is time to fix it. [1] https://lore.kernel.org/netdev/ba65f579-4e69-ae0d-4770-bc6234beb428@gmail.com/ [2] https://lore.kernel.org/netdev/CANn89i+R9RgmD=AQ4vX1Vb_SQAj4c3fi7-ZtQz-inYY4Sq4CMQ@mail.gmail.com/T/ While we are at it, use inet_sk_state_load() while tcp_abort() does not hold a lock on the socket. Signed-off-by: Eric Dumazet Tested-by: Muhammad Usama Anjum Link: https://lore.kernel.org/r/20220627121038.226500-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv4/tcp.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit f03c8a1e33ce5f28851b8077a5a417a2d0600c2f Author: Dimitris Michailidis Date: Mon Jun 27 11:20:00 2022 -0700 net/funeth: Support for ethtool -m Add the FW command for reading port module memory pages and implement ethtool's get_module_eeprom_by_page operation. Signed-off-by: Dimitris Michailidis Link: https://lore.kernel.org/r/20220627182000.8198-1-dmichail@fungible.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/fungible/funcore/fun_hci.h | 40 ++++++++++++++++++++++ .../net/ethernet/fungible/funeth/funeth_ethtool.c | 34 ++++++++++++++++++ 2 files changed, 74 insertions(+) commit 849d5aa3a1d833d0b3a18c2d5b816e23003cfe55 Author: Kuniyuki Iwashima Date: Mon Jun 27 16:36:27 2022 -0700 af_unix: Do not call kmemdup() for init_net's sysctl table. While setting up init_net's sysctl table, we need not duplicate the global table and can use it directly as ipv4_sysctl_init_net() does. Unlike IPv4, AF_UNIX does not have a huge sysctl table for now, so it cannot be a problem, but this patch makes code consistent. Acked-by: Eric W. Biederman Signed-off-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20220627233627.51646-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/unix/sysctl_net_unix.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 0184898dd14d53e81cc439b6735260f19750e3c1 Author: Sergey Shtylyov Date: Fri Jun 24 23:39:44 2022 +0300 ata: libata-scsi: fix result type of ata_ioc32() While ata_ioc32() returns 'int', its result gets assigned to and compared with the 'unsigned long' variable 'val' in ata_sas_scsi_ioctl(), its only caller, which implies a problematic implicit cast (with sign extension). Fix this by returning 'bool' instead -- the implicit cast then implies zero extension which is OK. Note that actually the object code doesn't change because ata_ioc32() is always inlined -- I can see the expected code changes with 'noinline'... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: Sergey Shtylyov Signed-off-by: Damien Le Moal drivers/ata/libata-scsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a5a3d94fc4edecb894bc79810aea511ff9261c09 Author: Asmaa Mnebhi Date: Tue Jun 21 08:49:30 2022 -0400 power: reset: pwr-mlxbf: add missing include Add missing include for devm_work_autocancel to fix build error: drivers/power/reset/pwr-mlxbf.c: In function 'pwr_mlxbf_probe': drivers/power/reset/pwr-mlxbf.c:67:15: error: implicit declaration of function 'devm_work_autocancel' [-Werror=implicit-function-declaration] 67 | err = devm_work_autocancel(dev, &priv->send_work, pwr_mlxbf_send_work); | ^~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Fixes: a4c0094fcf76 ("power: reset: pwr-mlxbf: add BlueField SoC power control driver") Reported-by: Stephen Rothwell Signed-off-by: Asmaa Mnebhi Signed-off-by: Sebastian Reichel drivers/power/reset/pwr-mlxbf.c | 1 + 1 file changed, 1 insertion(+) commit 9db35bb349a0ef32184ab68f79cc36026be4585d Author: Marek Vasut Date: Tue Jun 28 19:41:52 2022 +0200 drm: lcdif: Add support for i.MX8MP LCDIF variant Add support for i.MX8MP LCDIF variant. This is called LCDIFv3 and is completely different from the LCDIFv3 found in i.MX23 in that it has a completely scrambled register layout compared to all previous LCDIF variants. The new LCDIFv3 also supports 36bit address space. Add a separate driver which is really a fork of MXSFB driver with the i.MX8MP LCDIF variant handling filled in. Tested-by: Alexander Stein Tested-by: Martyn Welch Signed-off-by: Marek Vasut Cc: Alexander Stein Cc: Laurent Pinchart Cc: Lucas Stach Cc: Peng Fan Cc: Robby Cai Cc: Sam Ravnborg Cc: Stefan Agner Reviewed-by: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/20220628174152.167284-2-marex@denx.de drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/mxsfb/Kconfig | 16 ++ drivers/gpu/drm/mxsfb/Makefile | 2 + drivers/gpu/drm/mxsfb/lcdif_drv.c | 340 ++++++++++++++++++++++++++ drivers/gpu/drm/mxsfb/lcdif_drv.h | 44 ++++ drivers/gpu/drm/mxsfb/lcdif_kms.c | 484 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/mxsfb/lcdif_regs.h | 257 ++++++++++++++++++++ 7 files changed, 1144 insertions(+), 1 deletion(-) commit f5419cb0743fe834adf0678126a17f2d34d01e97 Author: Marek Vasut Date: Tue Jun 28 19:41:51 2022 +0200 dt-bindings: lcdif: Add compatible for i.MX8MP Add compatible string for i.MX8MP LCDIF variant. This is called LCDIFv3 and is completely different from the LCDIFv3 found in i.MX23 in that it has a completely scrambled register layout compared to all previous LCDIF variants. The new LCDIFv3 also supports 36bit address space. However, except for the complete bit reshuffling, this is still LCDIF and it still works like one. Acked-by: Rob Herring Signed-off-by: Marek Vasut Cc: Alexander Stein Cc: Laurent Pinchart Cc: Lucas Stach Cc: Peng Fan Cc: Rob Herring Cc: Robby Cai Cc: Sam Ravnborg Cc: Stefan Agner Cc: devicetree@vger.kernel.org Reviewed-by: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/20220628174152.167284-1-marex@denx.de Documentation/devicetree/bindings/display/fsl,lcdif.yaml | 1 + 1 file changed, 1 insertion(+) commit 5bdaaf4fbf85d47d08f76f41108d8d3bbdf15f1c Author: Marek Vasut Date: Fri Jun 24 20:19:02 2022 +0200 drm/bridge: tc358767: Do not cache dsi_lanes twice The DSI lane count can be accessed via the dsi device pointer, make use of that. No functional change. Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg Reviewed-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20220624181902.151959-1-marex@denx.de drivers/gpu/drm/bridge/tc358767.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 57a128acaba023048585233e7dada9972c2a6b4c Author: Francisco Munoz Date: Tue Jun 28 15:10:23 2022 -0700 PCI: vmd: Add DID 8086:7D0B and 8086:AD0B for Intel MTL SKUs Add support for VMD devices in MTL-H/P/U/S/M with bus restriction mode and vector 0 disabled for MSI-X remapping. Link: https://lore.kernel.org/r/20220628221023.190547-1-francisco.munoz.ruiz@linux.intel.com Signed-off-by: Francisco Munoz Signed-off-by: Bjorn Helgaas Reviewed-by: Nirmal Patel drivers/pci/controller/vmd.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ab8bca92aebcb59d81dc95ddebe241052f2bb411 Author: Kajol Jain Date: Fri Jun 10 19:11:13 2022 +0530 selftests/powerpc/pmu: Add test for hardware cache events The testcase checks if the transalation of a generic hardware cache event is done properly via perf interface. The hardware cache events has type as PERF_TYPE_HW_CACHE and each event points to raw event code id. Testcase checks different combination of cache level, cache event operation type and cache event result type and verify for a given event code, whether transalation matches with the current cache event mappings via perf interface. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-36-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 3 +- .../event_code_tests/hw_cache_event_type_test.c | 88 ++++++++++++++++++++++ 2 files changed, 90 insertions(+), 1 deletion(-) commit 9ac92fecd1dbfcabd64925571b94151d7a814878 Author: Kajol Jain Date: Fri Jun 10 19:11:12 2022 +0530 selftests/powerpc/pmu: Add selftest for group constraint check for MMCRA thresh_sel field Thresh select bits in the event code is used to program thresh_sel field in Monitor Mode Control Register A (MMCRA: 45-47). When scheduling events as a group, all events in that group should match value in these bits. Otherwise event open for the sibling events will fail. Testcase uses event code PM_MRK_INST_CMPL (0x401e0) as leader and another event PM_THRESH_MET (0x101ec) as sibling event, and checks if group constraint checks for thresh_sel field added correctly via perf interface. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-35-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 2 +- .../group_constraint_thresh_sel_test.c | 63 ++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) commit c178606ab51076d464fe537cd7a6bcbc615939e5 Author: Kajol Jain Date: Fri Jun 10 19:11:11 2022 +0530 selftests/powerpc/pmu: Add selftest for group constraint check for MMCRA thresh_ctl field Thresh control bits in the event code is used to program thresh_ctl field in Monitor Mode Control Register A (MMCRA: 48-55). When scheduling events as a group, all events in that group should match value in these bits. Otherwise event open for the sibling events will fail. Testcase uses event code PM_MRK_INST_CMPL (0x401e0) as leader and another event PM_THRESH_MET (101ec) as sibling event, and checks if group constraint checks for thresh_ctl field added correctly via perf interface. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-34-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 2 +- .../group_constraint_thresh_ctl_test.c | 64 ++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) commit 142c9bd1ff215f364a5d683a9dd0b7c413397185 Author: Kajol Jain Date: Fri Jun 10 19:11:10 2022 +0530 selftests/powerpc/pmu: Add selftest for group constraint for unit and pmc field in p9 Unit and pmu bits in the event code is used to program unit and pmc fields in Monitor Mode Control Register 1 (MMCR1). For power9 platform, incase unit field value is within 6 to 9, one of the event in the group should use PMC4. Otherwise event_open should fail for that group. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-33-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 3 +- .../event_code_tests/group_constraint_unit_test.c | 74 ++++++++++++++++++++++ 2 files changed, 76 insertions(+), 1 deletion(-) commit 8eaca8c4b4ed9a2058e4f232d56b5973191fec37 Author: Kajol Jain Date: Fri Jun 10 19:11:09 2022 +0530 selftests/powerpc/pmu: Add selftest for group constraint check for MMCRA thresh_cmp field Thresh compare bits for a event is used to program thresh compare field in Monitor Mode Control Register A (MMCRA: 9-18 bits for power9 and MMCRA: 8-18 bits for power10). When scheduling events as a group, all events in that group should match value in thresh compare bits. Otherwise event open for the sibling events will fail. Testcase uses event code "0x401e0" as leader and another event "0x101ec" as sibling event, and checks for thresh compare constraint via perf interface. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-32-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 2 +- .../group_constraint_thresh_cmp_test.c | 96 ++++++++++++++++++++++ 2 files changed, 97 insertions(+), 1 deletion(-) commit 291c01ed207d83c8910e0fb21944e6ef84021956 Author: Kajol Jain Date: Fri Jun 10 19:11:08 2022 +0530 selftests/powerpc/pmu: Add selftest for group constraint check for MMCR1 cache bits Data and instruction cache qualifier bits in the event code is used to program cache select field in Monitor Mode Control Register 1 (MMCR1: 16-17). When scheduling events as a group, all events in that group should match value in these bits. Otherwise event open for the sibling events will fail. Testcase uses event code "0x1100fc" as leader and other events like "0x23e054" and "0x13e054" as sibling events to checks for l1 cache select field constraints via perf interface. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-31-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 2 +- .../event_code_tests/group_constraint_cache_test.c | 60 ++++++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) commit 20b3073f8727e20332379f145b6eecf580291b2c Author: Kajol Jain Date: Fri Jun 10 19:11:07 2022 +0530 selftests/powerpc/pmu: Add selftest for group constraint check for MMCR0 l2l3_sel bits In power10, L2L3 select bits in the event code is used to program l2l3_sel field in Monitor Mode Control Register 0 (MMCR0: 56-60). When scheduling events as a group, all events in that group should match value in these bits. Otherwise event open for the sibling events will fail. Testcase uses event code "0x010000046080" as leader and another events "0x26880" and "0x010000026880" as sibling events, and checks for l2l3_sel constraints via perf interface for ISA v3.1 platform. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-30-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 3 +- .../group_constraint_l2l3_sel_test.c | 64 ++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) commit 8efeedf5aac77b58f68e6eb9df62758ba1882bb3 Author: Athira Rajeev Date: Fri Jun 10 19:11:06 2022 +0530 selftests/powerpc/pmu: Add selftest for PERF_TYPE_HARDWARE events valid check Testcase to ensure that using invalid event in generic event for PERF_TYPE_HARDWARE will fail. Invalid generic events in power10 are: - PERF_COUNT_HW_BUS_CYCLES - PERF_COUNT_HW_STALLED_CYCLES_FRONTEND - PERF_COUNT_HW_STALLED_CYCLES_BACKEND - PERF_COUNT_HW_REF_CPU_CYCLES Invalid generic events in power9 are: - PERF_COUNT_HW_BUS_CYCLES - PERF_COUNT_HW_REF_CPU_CYCLES Testcase does event open for valid and invalid generic events to ensure event open works for all valid events and fails for invalid events. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-29-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 2 +- .../event_code_tests/generic_events_valid_test.c | 130 +++++++++++++++++++++ 2 files changed, 131 insertions(+), 1 deletion(-) commit 3f1a87425f8c2f9af745923865a4765e36a2ed3c Author: Athira Rajeev Date: Fri Jun 10 19:11:05 2022 +0530 selftests/powerpc/pmu: Add selftest for event alternatives for power10 Platform specific PMU supports alternative event for some of the event codes. During perf_event_open, it any event group doesn't match constraint check criteria, further lookup is done to find alternative event. Code checks to see if it is possible to schedule event as group using alternative events. Testcase exercises the alternative event find code for power10. Example, Using PMC1 to PMC4 in a group and again trying to schedule PM_CYC_ALT (0x0001e) will fail since this exceeds number of programmable events in group. But since 0x600f4 is an alternative event for 0x0001e, it is possible to use 0x0001e in the group. Testcase uses such combination all events in power10 which has alternative event. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-28-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 2 +- .../event_alternatives_tests_p10.c | 109 +++++++++++++++++++++ 2 files changed, 110 insertions(+), 1 deletion(-) commit 5958ad4392b0f437605ade8bab42447b0d97ad8c Author: Athira Rajeev Date: Fri Jun 10 19:11:04 2022 +0530 selftests/powerpc/pmu: Add selftest for event alternatives for power9 Platform specific PMU supports alternative event for some of the event codes. During perf_event_open, it any event group doesn't match constraint check criteria, further lookup is done to find alternative event. Code checks to see if it is possible to schedule event as group using alternative events. Testcase exercises the alternative event find code for power9. Example, since events in same PMC can't go in as a group, ideally using PM_RUN_CYC_ALT (0x200f4) and PM_BR_TAKEN_CMPL (0x200fa) will fail. But since RUN_CYC (0x600f4) is alternative event for 0x200f4, it is possible to use 0x600f4 and 0x200fa as group. Testcase uses such combination for all events in power9 which has an alternative event. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-27-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 2 +- .../event_code_tests/event_alternatives_tests_p9.c | 116 +++++++++++++++++++++ 2 files changed, 117 insertions(+), 1 deletion(-) commit a77c69766c7d4a213e65a4ecdedda7c22f2deb01 Author: Athira Rajeev Date: Fri Jun 10 19:11:03 2022 +0530 selftests/powerpc/pmu: Add selftest for blacklist events check in power9 Some of the events are blacklisted in power9. The list of blacklisted events are noted in power9-events-list.h When trying to do event open for any of these blacklisted event will cause a failure. Testcase ensures that using blacklisted events will cause event_open to fail in power9. This test is only applicable on power9 DD2.1 and DD2.2 and hence test adds checks to skip on other platforms. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-26-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 3 +- .../pmu/event_code_tests/blacklisted_events_test.c | 132 +++++++++++++++++++++ 2 files changed, 134 insertions(+), 1 deletion(-) commit 0c90263339da3e4cdcbf57cfa43d6d866c3ac95e Author: Athira Rajeev Date: Fri Jun 10 19:11:02 2022 +0530 selftests/powerpc/pmu: Add selftest for reserved bit check for MMCRA thresh_ctl field Testcase for reserved bits in Monitor Mode Control Register A (MMCRA) thresh_ctl bits. For MMCRA[48:51]/[52:55]) Threshold Start/Stop, 0b11110000/0b00001111 is reserved. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-25-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 2 +- .../reserved_bits_mmcra_thresh_ctl_test.c | 44 ++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) commit 5196a27978dcc74251eab14cffa8fa96813e0365 Author: Athira Rajeev Date: Fri Jun 10 19:11:01 2022 +0530 selftests/powerpc/pmu: Add selftest for checking invalid bits in event code Some of the bits in the event code is reserved for specific platforms. Event code bits 52-59 are reserved in power9, whereas in power10, these are used for programming Monitor Mode Control Register 3 (MMCR3). Bit 9 in event code is reserved in power9, whereas it is used for programming "radix_scope_qual" bit 18 in Monitor Mode Control Register 1 (MMCR1). Testcase to ensure that using reserved bits in event code should cause event_open to fail. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-24-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 2 +- .../pmu/event_code_tests/invalid_event_code_test.c | 67 ++++++++++++++++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) commit 122b6b9e57006520addd9f3a44f6b7e3ce503044 Author: Athira Rajeev Date: Fri Jun 10 19:11:00 2022 +0530 selftests/powerpc/pmu: Add selftest for group constraint check MMCRA sample bits Events with different "sample" field values which is used to program Monitor Mode Control Register A (MMCRA) in a group will fail to schedule. Testcase uses event with load only sampling mode as group leader and event with store only sampling as sibling event. So that it can check that using different sample bits in event code will fail in event open for group of events Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-23-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 3 +- .../group_constraint_mmcra_sample_test.c | 54 ++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) commit beebeecb47d3b93198fe46922fd4ba2af2090cdd Author: Athira Rajeev Date: Fri Jun 10 19:10:59 2022 +0530 selftests/powerpc/pmu: Add selftest for group constraint for MMCRA Sampling Mode field Testcase for reserved bits in Monitor Mode Control Register A (MMCRA) Random Sampling Mode (SM) value. As per Instruction Set Architecture (ISA), the values 0x5, 0x9, 0xD, 0x19, 0x1D, 0x1A, 0x1E are reserved for sampling mode field. Test that having these reserved bit values should cause event_open to fail. Input event code in testcases uses these sampling bits along with 401e0 (PM_MRK_INST_CMPL). Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-22-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 2 +- .../reserved_bits_mmcra_sample_elig_mode_test.c | 77 ++++++++++++++++++++++ 2 files changed, 78 insertions(+), 1 deletion(-) commit dc431be3b54901744e84f5f94f0f0a2b5d36bb7f Author: Athira Rajeev Date: Fri Jun 10 19:10:58 2022 +0530 selftests/powerpc/pmu: Add selftest for group constraint check for radix_scope_qual field Testcase for group constraint check for radix_scope_qual field which is used to program Monitor Mode Control Register (MMCR1) bit 18. All events in the group should match radix_scope_qual bit, otherwise event_open for the group should fail. Testcase uses "0x14242" (PM_DATA_RADIX_PROCESS_L2_PTE_FROM_L2) with radix_scope_qual bit set for power10. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-21-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 2 +- .../group_constraint_radix_scope_qual_test.c | 56 ++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) commit 38b6da45304e55de11b8b79a0f31a4d61818e63e Author: Athira Rajeev Date: Fri Jun 10 19:10:57 2022 +0530 selftests/powerpc/pmu: Add selftest for group constraint check when using same PMC Testcase for group constraint check when using events with same PMC. Multiple events in a group asking for same PMC should fail. Testcase uses "0x22C040" on PMC2 as leader and also subling which is expected to fail. Using PMC1 for sibling event should pass the test. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-20-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 3 +- .../group_constraint_repeat_test.c | 56 ++++++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) commit 827765a449dbc41ad19ab3e31757c93cac47b728 Author: Athira Rajeev Date: Fri Jun 10 19:10:56 2022 +0530 selftests/powerpc/pmu: Add selftest to check constraint for number of counters in use. Testcase for group constraint check for number of counters in use. The number of programmable counters is from PMC1 to PMC4. Testcase uses four events with PMC1 to PMC4 and 5th event without any PMC which is expected to fail since it is exceeding the number of counters in use. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-19-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 2 +- .../group_constraint_pmc_count_test.c | 70 ++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) commit 4000c2e5d40a3ee340c3940949d658fc52a56603 Author: Athira Rajeev Date: Fri Jun 10 19:10:55 2022 +0530 selftests/powerpc/pmu: Add selftest to check PMC5/6 is excluded from some constraint checks Events using Performance Monitor Counter 5 (PMC5) and Performance Monitor Counter 6 (PMC6) should be excluded from constraint check when scheduled along with group of events. Example, combination of PMC5, PMC6, and an event with cache bit will succeed to schedule though first two events doesn't have cache bit set. Testcase use three events, ie, 600f4(cycles), 500fa(instructions), 22C040 with cache bit (dc_ic) set to test this constraint check. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-18-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 2 +- .../group_pmc56_exclude_constraints_test.c | 64 ++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) commit 9258c0aa755fac469869dd647a6c3d5299ff7725 Author: Athira Rajeev Date: Fri Jun 10 19:10:54 2022 +0530 selftests/powerpc/pmu: Add selftest for group constraint check for PMC5 and PMC6 Events using Performance Monitor Counter 5 (PMC5) and Performance Monitor Counter 6 (PMC6) can't have other fields in event code like cache bits, thresholding or marked bit. PMC5 and PMC6 only supports base events: ie 500fa and 600f4. Other combinations should fail. Testcase tries setting other bits in event code for 500fa and 600f4 to check this scenario. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-17-atrajeev@linux.vnet.ibm.com .../powerpc/pmu/event_code_tests/Makefile | 2 +- .../event_code_tests/group_constraint_pmc56_test.c | 63 ++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) commit 0a110a4b69dacc30ce4f6c10c0396bd2fd097831 Author: Athira Rajeev Date: Fri Jun 10 19:10:53 2022 +0530 selftests/powerpc/pmu: Add support for perf event code tests Add new folder for enabling perf event code tests which includes checking for group constraints, valid/invalid events, also checks for event excludes, alternatives so on. A new folder "event_code_tests", is created under "selftests/powerpc/pmu". Also updates the corresponding Makefiles in "selftests/powerpc" and "event_code_tests" folder. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-16-atrajeev@linux.vnet.ibm.com tools/testing/selftests/powerpc/pmu/Makefile | 11 +++++++++-- tools/testing/selftests/powerpc/pmu/event_code_tests/Makefile | 9 +++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) commit 78cd598af648131d2e9a32825c59b8d1e9ec9357 Author: Kajol Jain Date: Fri Jun 10 19:10:52 2022 +0530 selftests/powerpc/pmu: Add interface test for bhrb disable field for non-branch samples The testcase uses "instructions" event to generate the samples and fetch Monitor Mode Control Register A (MMCRA) when overflow. Branch History Rolling Buffer(bhrb) disable bit is part of MMCRA which need to be verified by perf interface. Incase sample is not of branch type, bhrb disable bit is explicitly set to 1. Testcase checks if the bhrb disable bit is set of MMCRA register via perf interface for ISA v3.1 platform Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-15-atrajeev@linux.vnet.ibm.com .../selftests/powerpc/pmu/sampling_tests/Makefile | 2 +- .../mmcra_bhrb_disable_no_branch_test.c | 64 ++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) commit 0321f2d0ae6959f79f5b8a21b31694b54dbaa35d Author: Athira Rajeev Date: Fri Jun 10 19:10:51 2022 +0530 selftests/powerpc/pmu: Add selftest for mmcr1 pmcxsel/unit/cache fields The testcase uses event code "0x21c040" to verify the settings for different fields in Monitor Mode Control Register 1 (MMCR1). The fields include PMCxSEL, PMCXCOMB PMCxUNIT, cache. Checks if these fields are translated correctly via perf interface to MMCR1 Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-14-atrajeev@linux.vnet.ibm.com .../selftests/powerpc/pmu/sampling_tests/Makefile | 2 +- .../pmu/sampling_tests/mmcr1_sel_unit_cache_test.c | 77 ++++++++++++++++++++++ 2 files changed, 78 insertions(+), 1 deletion(-) commit f6380e05aa92b005ac6f38be92afbdd2a0706cff Author: Athira Rajeev Date: Fri Jun 10 19:10:50 2022 +0530 selftests/powerpc/pmu: Add selftest for checking valid and invalid bhrb filter maps For PERF_SAMPLE_BRANCH_STACK sample type, different branch_sample_type, ie branch filters are supported. All the branch filters are not supported in powerpc. Example, power10 platform supports any, ind_call and cond branch filters. Whereas, it is different in power9. Testcase checks event open for invalid and valid branch sample types. The branch types for testcase are picked from "perf_branch_sample_type" in perf_event.h Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-13-atrajeev@linux.vnet.ibm.com .../selftests/powerpc/pmu/sampling_tests/Makefile | 3 +- .../pmu/sampling_tests/bhrb_filter_map_test.c | 105 +++++++++++++++++++++ 2 files changed, 107 insertions(+), 1 deletion(-) commit 11bbc524390572dfe1bd0375c7e7ab8f9ddf4b34 Author: Athira Rajeev Date: Fri Jun 10 19:10:49 2022 +0530 selftests/powerpc/pmu: Add selftest to check PERF_SAMPLE_REGS_INTR option will not crash on any platforms With sampling, --intr-regs option is used for capturing interrupt regs. When --intr-regs option is used, PMU code uses is_sier_available() function which uses PMU flags in the code. In environment where platform specific PMU is not registered, PMU flags is not defined. A fix was added in kernel to address crash while accessing is_sier_available() function when pmu is not set. commit f75e7d73bdf7 ("powerpc/perf: Fix crash with is_sier_available when pmu is not set"). Add perf sampling test to exercise this code and make sure enabling intr_regs shouldn't crash in any platform. Testcase uses software event cycles since software event will work even in cases without PMU. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-12-atrajeev@linux.vnet.ibm.com .../selftests/powerpc/pmu/sampling_tests/Makefile | 2 +- .../intr_regs_no_crash_wo_pmu_test.c | 57 ++++++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) commit 2ac05f8f2e4b9068e5bbc0836b35abafd70f02c1 Author: Athira Rajeev Date: Fri Jun 10 19:10:48 2022 +0530 selftests/powerpc/pmu: Add selftest to check branch stack enablement will not crash on any platforms While enabling branch stack for an event, BHRB (Branch History Rolling Buffer) filter is set using bhrb_filter_map() callback. This callback is not defined for cases like generic_compat_pmu or in case where there is no PMU registered. A fix was added in kernel to address a crash issue observed while enabling branch stack for environments which doesn't have this callback. commit b460b512417a ("powerpc/perf: Fix crashes with generic_compat_pmu & BHRB"). Add perf sampling test to exercise this code path and make sure enabling branch stack shouldn't crash in any platform. Testcase uses software event cycles since software event is available and can be used even in cases without PMU. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-11-atrajeev@linux.vnet.ibm.com .../selftests/powerpc/pmu/sampling_tests/Makefile | 2 +- .../pmu/sampling_tests/bhrb_no_crash_wo_pmu_test.c | 59 ++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) commit 9cfd110a36649f9452120a648f15f32d1c82b99d Author: Athira Rajeev Date: Fri Jun 10 19:10:47 2022 +0530 selftests/powerpc/pmu: Refactor the platform check and add macros to find array size/PVR The platform check for selftest support "check_pvr_for_sampling_tests" is specific to sampling tests which includes PVR check, presence of PMU and extended regs support. Extended regs support is needed for sampling tests which tests whether PMU registers are programmed correctly. There could be other sampling tests which may not need extended regs, example, bhrb filter tests which only needs validity check via event open. Hence refactor the platform check to have a common function "platform_check_for_tests" that checks only for PVR check and presence of PMU. The existing function "check_pvr_for_sampling_tests" will invoke the common function and also will include checks for extended regs specific for sampling. The common function can also be used by tests other than sampling like event code tests. Add macro to find array size ("ARRAY_SIZE") to sampling tests "misc.h" file. This can be used in next tests to find event array size. Also update "include/reg.h" to add macros to find minor and major version from PVR which will be used in testcases. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-10-atrajeev@linux.vnet.ibm.com tools/testing/selftests/powerpc/include/reg.h | 4 ++++ .../selftests/powerpc/pmu/sampling_tests/misc.c | 20 ++++++++++++++++---- .../selftests/powerpc/pmu/sampling_tests/misc.h | 3 +++ 3 files changed, 23 insertions(+), 4 deletions(-) commit 50ca65b44e50e66e370f34e83a1d04a41bbffb70 Author: Jiang Jian Date: Thu Jun 23 18:06:32 2022 +0800 drm/display/selftests: drop extra word 'for' in comments for MST selftests there is an unexpected word 'for' in the comments that need to be dropped file - ./drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c line - 3 * Test cases for for the DRM DP MST helpers changed to: * Test cases for the DRM DP MST helpers Signed-off-by: Jiang Jian Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220623100632.27056-1-jiangjian@cdjrlc.com drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1796c0255bae9d3d4528b8b3916182b2bc4e1e71 Merge: b13baccc3850 08de214138cd Author: Rob Clark Date: Tue Jun 28 15:41:29 2022 -0700 Merge tag 'drm-msm-fixes-2022-06-28' into msm-next-staging Merge v5.19 fixes to avoid merge conflicts Signed-off-by: Rob Clark commit c3497fd009ef2c59eea60d21c3ac22de3585ed7d Author: Al Viro Date: Sun Jun 12 19:50:29 2022 -0400 fix short copy handling in copy_mc_pipe_to_iter() Unlike other copying operations on ITER_PIPE, copy_mc_to_iter() can result in a short copy. In that case we need to trim the unused buffers, as well as the length of partially filled one - it's not enough to set ->head, ->iov_offset and ->count to reflect how much had we copied. Not hard to fix, fortunately... I'd put a helper (pipe_discard_from(pipe, head)) into pipe_fs_i.h, rather than iov_iter.c - it has nothing to do with iov_iter and having it will allow us to avoid an ugly kludge in fs/splice.c. We could put it into lib/iov_iter.c for now and move it later, but I don't see the point going that way... Cc: stable@kernel.org # 4.19+ Fixes: ca146f6f091e "lib/iov_iter: Fix pipe handling in _copy_to_iter_mcsafe()" Reviewed-by: Jeff Layton Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Al Viro include/linux/pipe_fs_i.h | 9 +++++++++ lib/iov_iter.c | 15 +++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) commit 59bb69c67cf1475a04cd5629d9c4f6dbbcba5e4a Author: Al Viro Date: Thu May 26 19:07:11 2022 -0400 copy_page_{to,from}_iter(): switch iovec variants to generic we can do copyin/copyout under kmap_local_page(); it shouldn't overflow the kmap stack - the maximal footprint increase only by one here. Reviewed-by: Jeff Layton Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Al Viro lib/iov_iter.c | 191 ++------------------------------------------------------- 1 file changed, 4 insertions(+), 187 deletions(-) commit bbd5a68919081d2fea6b0a6d6ab4c34effbf2847 Author: Dmitry Baryshkov Date: Sat May 21 23:27:07 2022 +0300 dt-bindings: arm: qcom: document sda660 SoC and ifc6560 board Add binding documentation for the Inforce IFC6560 board which uses Snapdragon SDA660. Reviewed-by: Marijn Suijten Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521202708.1509308-11-dmitry.baryshkov@linaro.org Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 5e9bc1ba7ace0793b62e612eb48b7774a13e7f74 Author: Dmitry Baryshkov Date: Sat May 21 23:27:06 2022 +0300 arm64: dts: qcom: sdm660: move SDHC2 card detect pinconf to board files This results in dts duplication, but per mutual agreement card detect pin configuration belongs to the board files. Move it from the SoC dtsi to the board DT files. Suggested-by: Marijn Suijten Reviewed-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521202708.1509308-10-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi | 16 ++++++++++++++++ arch/arm64/boot/dts/qcom/sdm630.dtsi | 12 ------------ arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts | 16 ++++++++++++++++ 3 files changed, 32 insertions(+), 12 deletions(-) commit 3a04cec9cba393abfe70fc62e523f381c9baec2e Author: Dmitry Baryshkov Date: Sat May 21 23:27:05 2022 +0300 arm64: dts: qcom: sdm636-sony-xperia-ganges-mermaid: correct sdc2 pinconf Fix the device tree node in the &sdc2_state_on override. The sdm630 uses 'clk' rather than 'pinconf-clk'. Fixes: 4c1d849ec047 ("arm64: dts: qcom: sdm630-xperia: Retire sdm630-sony-xperia-ganges.dtsi") Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521202708.1509308-9-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sdm636-sony-xperia-ganges-mermaid.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3cd1c4f41d64a40ea6bc4575ae28e37542123d77 Author: Dmitry Baryshkov Date: Sat May 21 23:27:04 2022 +0300 arm64: dts: qcom: sdm630: fix gpu's interconnect path ICC path for the GPU incorrectly states <&gnoc 1 &bimc 5>, which is a path from SLAVE_GNOC_BIMC to SLAVE_EBI. According to the downstream kernel sources, the GPU uses MASTER_OXILI here, which is equivalent to <&bimc 1 ...>. While we are at it, use defined names instead of the numbers for this interconnect path. Fixes: 5cf69dcbec8b ("arm64: dts: qcom: sdm630: Add Adreno 508 GPU configuration") Reported-by: Marijn Suijten Reviewed-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521202708.1509308-8-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8b6da22e6a44b597a0a4e2d60d81303090b6d24e Author: Dmitry Baryshkov Date: Sat May 21 23:27:03 2022 +0300 arm64: dts: qcom: sdm630: add second (HS) USB host support Add DT entries for the second DWC3 USB host, which is limited to the USB2.0 (HighSpeed), and the corresponding QUSB PHY. Reviewed-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521202708.1509308-7-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 696dea7e1c3a568b125baee98bbf6b8db09a7afb Author: Dmitry Baryshkov Date: Sat May 21 23:27:02 2022 +0300 arm64: dts: qcom: sdm630: rename qusb2phy to qusb2phy0 In preparation to adding second USB host/PHY pair, change first USB PHY's label to qusb2phy0. Suggested-by: Marijn Suijten Reviewed-by: Konrad Dybcio Reviewed-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521202708.1509308-6-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm630.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 924bbd8dd60e094344711c3526a5b308d71dc008 Author: Dmitry Baryshkov Date: Sat May 21 23:27:01 2022 +0300 arm64: dts: qcom: sdm630: fix the qusb2phy ref clock According to the downstram DT file, the qusb2phy ref clock should be GCC_RX0_USB2_CLKREF_CLK, not GCC_RX1_USB2_CLKREF_CLK. Fixes: c65a4ed2ea8b ("arm64: dts: qcom: sdm630: Add USB configuration") Cc: Konrad Dybcio Reviewed-by: Konrad Dybcio Reviewed-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521202708.1509308-5-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c047919763b4548381d1ab3320af1df66ab83df Author: Dmitry Baryshkov Date: Sat May 21 23:27:00 2022 +0300 arm64: dts: qcom: sdm630: disable GPU by default The SoC's device tree file disables gpucc and adreno's SMMU by default. So let's disable the GPU too. Moreover it looks like SMMU might be not usable without additional patches (which means that GPU is unusable too). No board uses GPU at this moment. Fixes: 5cf69dcbec8b ("arm64: dts: qcom: sdm630: Add Adreno 508 GPU configuration") Reviewed-by: Konrad Dybcio Reviewed-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521202708.1509308-4-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 7d8ee8e5db53b99cb522dd5126dc80fa5726aa07 Author: Dmitry Baryshkov Date: Sat May 21 23:26:59 2022 +0300 arm64: dts: qcom: sdm660: disable dsi1/dsi1_phy by default Follow the typical practice and keep DSI1/DSI1 PHY disabled by default. They should be enabled in the board DT files. No existing boards use them at this moment. Reviewed-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521202708.1509308-3-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sdm660.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 79d8e016fddfe0315c4b682a891b446ec748a6e5 Author: Dmitry Baryshkov Date: Sat May 21 23:26:58 2022 +0300 arm64: dts: qcom: sdm630: disable dsi0/dsi0_phy by default Follow the typical practice and keep DSI0/DSI0 PHY disabled by default. They should be enabled in the board DT files. No existing boards use them at this moment. Suggested-by: Marijn Suijten Reviewed-by: Konrad Dybcio Reviewed-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521202708.1509308-2-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 2ac96c800dd18e7fc08589d5f5962710db6c927c Author: Kai-Heng Feng Date: Tue Jun 28 20:37:26 2022 +0800 platform/x86: hp-wmi: Ignore Sanitization Mode event After system resume the hp-wmi driver may complain: [ 702.620180] hp_wmi: Unknown event_id - 23 - 0x0 According to HP it means 'Sanitization Mode' and it's harmless to just ignore the event. Cc: Jorge Lopez Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20220628123726.250062-1-kai.heng.feng@canonical.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/hp-wmi.c | 3 +++ 1 file changed, 3 insertions(+) commit 57a3487eefa598bdcc15df6dd3991b7ea843fb53 Author: Mark Pearson Date: Mon Jun 27 14:14:49 2022 -0400 platform/x86: thinkpad_acpi: do not use PSC mode on Intel platforms PSC platform profile mode is only supported on Linux for AMD platforms. Some older Intel platforms (e.g T490) are advertising it's capability as Windows uses it - but on Linux we should only be using MMC profile for Intel systems. Add a check to prevent it being enabled incorrectly. Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20220627181449.3537-1-markpearson@lenovo.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/thinkpad_acpi.c | 5 +++++ 1 file changed, 5 insertions(+) commit 4908e3ace24be2f3a95a0cccd0993bd3ab44a073 Author: Michael Walle Date: Tue Jun 28 09:09:59 2022 +0200 dt-bindings: nfc: nxp,nci: drop Charles Gorand's mail Mails to Charles get an auto reply, that he is no longer working at Eff'Innov technologies. Remove the entry. Signed-off-by: Michael Walle Reviewed-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220628070959.187734-1-michael@walle.cc Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml | 1 - 1 file changed, 1 deletion(-) commit f2fb1b50fbac4a0a462e1705ac913abf52aae906 Author: Piyush Mehta Date: Mon Jun 20 13:07:17 2022 +0530 dt-bindings: ata: ahci-ceva: convert to yaml Convert the ahci-ceva doc to yaml. Signed-off-by: Piyush Mehta Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220620073717.3079-1-piyush.mehta@xilinx.com .../devicetree/bindings/ata/ahci-ceva.txt | 63 ------- .../devicetree/bindings/ata/ceva,ahci-1v84.yaml | 189 +++++++++++++++++++++ 2 files changed, 189 insertions(+), 63 deletions(-) commit 6991cd744f068349a934fd31254c77f48fa530ec Author: Vincent Whitchurch Date: Tue Jun 28 13:35:40 2022 +0200 of: reserved-memory: Print allocation/reservation failures as error If the allocation/reservation of reserved-memory fails, it is normally an error, so print it as an error so that it doesn't get hidden from the console due to the loglevel. Also make the allocation failure include the size just like the reservation failure. Signed-off-by: Vincent Whitchurch Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220628113540.2790835-1-vincent.whitchurch@axis.com drivers/of/fdt.c | 4 ++-- drivers/of/of_reserved_mem.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) commit c5c7358e4c76e2017a6566a29208996fcca75200 Merge: 697fb80a5364 ab9a5a05dc48 Author: Alexei Starovoitov Date: Tue Jun 28 13:13:33 2022 -0700 Merge branch 'libbpf: remove deprecated APIs' Andrii Nakryiko says: ==================== This patch set removes all the deprecated APIs in preparation for 1.0 release. It also makes libbpf_set_strict_mode() a no-op (but keeps it to let per-1.0 applications buildable and dynamically linkable against libbpf 1.0 if they were already libbpf-1.0 ready) and starts enforcing all the behaviors that were previously opt-in through libbpf_set_strict_mode(). xsk.{c,h} parts that are now properly provided by libxdp ([0]) are still used by xdpxceiver.c in selftest/bpf, so I've moved xsk.{c,h} with barely any changes to under selftests/bpf. Other than that, apart from removing all the LIBBPF_DEPRECATED-marked APIs, there is a bunch of internal clean ups allowed by that. I've also "restored" libbpf.map inheritance chain while removing all the deprecated APIs. I think that's the right way to do this, as applications using libbpf as shared library but not relying on any deprecated APIs (i.e., "good citizens" that prepared for libbpf 1.0 release ahead of time to minimize disruption) should be able to link both against 0.x and 1.x versions. Either way, it doesn't seem to break anything and preserve a history on when each "surviving" API was added. [0] https://github.com/xdp-project/xdp-tools/tree/master/lib/libxdp v1->v2: - rebase on latest bpf-next now that Jiri's perf patches landed; - fix xsk.o dependency in Makefile to ensure libbpf headers are installed reliably. ==================== Signed-off-by: Alexei Starovoitov commit ab9a5a05dc480f8994eddd31093a8920b08ee71d Author: Andrii Nakryiko Date: Mon Jun 27 14:15:27 2022 -0700 libbpf: fix up few libbpf.map problems Seems like we missed to add 2 APIs to libbpf.map and another API was misspelled. Fix it in libbpf.map. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220627211527.2245459-16-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.map | 3 ++- tools/lib/bpf/libbpf_legacy.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit bd054102a8c7f36ff03446cc41822601180241f3 Author: Andrii Nakryiko Date: Mon Jun 27 14:15:26 2022 -0700 libbpf: enforce strict libbpf 1.0 behaviors Remove support for legacy features and behaviors that previously had to be disabled by calling libbpf_set_strict_mode(): - legacy BPF map definitions are not supported now; - RLIMIT_MEMLOCK auto-setting, if necessary, is always on (but see libbpf_set_memlock_rlim()); - program name is used for program pinning (instead of section name); - cleaned up error returning logic; - entry BPF programs should have SEC() always. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220627211527.2245459-15-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/bpf.c | 4 - tools/lib/bpf/libbpf.c | 212 ++-------------------------------------- tools/lib/bpf/libbpf.h | 34 ------- tools/lib/bpf/libbpf_internal.h | 24 +---- tools/lib/bpf/libbpf_legacy.h | 24 +++++ 5 files changed, 37 insertions(+), 261 deletions(-) commit 31e42721976b9c445477038f8a4006150cd27a60 Author: Andrii Nakryiko Date: Mon Jun 27 14:15:25 2022 -0700 selftests/bpf: remove last tests with legacy BPF map definitions Libbpf 1.0 stops support legacy-style BPF map definitions. Selftests has been migrated away from using legacy BPF map definitions except for two selftests, to make sure that legacy functionality still worked in pre-1.0 libbpf. Now it's time to let those tests go as libbpf 1.0 is imminent. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220627211527.2245459-14-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/bpf_legacy.h | 9 ---- tools/testing/selftests/bpf/prog_tests/btf.c | 1 - tools/testing/selftests/bpf/progs/test_btf_haskv.c | 51 ---------------------- tools/testing/selftests/bpf/progs/test_btf_newkv.c | 18 -------- 4 files changed, 79 deletions(-) commit 450b167fb9be91a8164d3f3d734674f5fe95b22d Author: Andrii Nakryiko Date: Mon Jun 27 14:15:24 2022 -0700 libbpf: clean up SEC() handling Get rid of sloppy prefix logic and remove deprecated xdp_{devmap,cpumap} sections. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220627211527.2245459-13-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 119 +++++++++++++++++++------------------------------ 1 file changed, 47 insertions(+), 72 deletions(-) commit cf90a20db878fddedefbdfeaff6695a0ee20f690 Author: Andrii Nakryiko Date: Mon Jun 27 14:15:23 2022 -0700 libbpf: remove internal multi-instance prog support Clean up internals that had to deal with the possibility of multi-instance bpf_programs. Libbpf 1.0 doesn't support this, so all this is not necessary now and can be simplified. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220627211527.2245459-12-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 317 ++++++------------------------------------------- 1 file changed, 34 insertions(+), 283 deletions(-) commit a11113a2dcbedd488ca82f46853cf3e1ee486a6e Author: Andrii Nakryiko Date: Mon Jun 27 14:15:22 2022 -0700 libbpf: cleanup LIBBPF_DEPRECATED_SINCE supporting macros for v0.x Keep the LIBBPF_DEPRECATED_SINCE macro "framework" for future deprecations, but clean up 0.x related helper macros. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220627211527.2245459-11-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf_common.h | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit b4bda502dfa28c7cb78e25f24593fc1d4628b21c Author: Andrii Nakryiko Date: Mon Jun 27 14:15:21 2022 -0700 libbpf: remove multi-instance and custom private data APIs Remove all the public APIs that are related to creating multi-instance bpf_programs through custom preprocessing callback and generally working with them. Also remove all the bpf_{object,map,program}__[set_]priv() APIs. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220627211527.2245459-10-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 121 ++++------------------------------------------- tools/lib/bpf/libbpf.h | 91 ----------------------------------- tools/lib/bpf/libbpf.map | 10 ---- 3 files changed, 10 insertions(+), 212 deletions(-) commit 146bf811f5ac133e619fcf4e77bc7a97a9e401e7 Author: Andrii Nakryiko Date: Mon Jun 27 14:15:20 2022 -0700 libbpf: remove most other deprecated high-level APIs Remove a bunch of high-level bpf_object/bpf_map/bpf_program related APIs. All the APIs related to private per-object/map/prog state, program preprocessing callback, and generally everything multi-instance related is removed in a separate patch. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220627211527.2245459-9-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 241 +++++------------------------------------------ tools/lib/bpf/libbpf.h | 163 +------------------------------- tools/lib/bpf/libbpf.map | 43 --------- 3 files changed, 26 insertions(+), 421 deletions(-) commit 9a590538ba4fbe6d0a4586cdab039df782153fcb Author: Andrii Nakryiko Date: Mon Jun 27 14:15:19 2022 -0700 libbpf: remove prog_info_linear APIs Remove prog_info_linear-related APIs previously used by perf. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220627211527.2245459-8-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 248 ----------------------------------------------- tools/lib/bpf/libbpf.h | 66 ------------- tools/lib/bpf/libbpf.map | 3 - 3 files changed, 317 deletions(-) commit 22dd7a58b2e9965c1a612b6a09c4a6146cbb5873 Author: Andrii Nakryiko Date: Mon Jun 27 14:15:18 2022 -0700 libbpf: clean up perfbuf APIs Remove deprecated perfbuf APIs and clean up opts structs. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220627211527.2245459-7-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 54 ++++++++---------------------------- tools/lib/bpf/libbpf.h | 71 ++++-------------------------------------------- tools/lib/bpf/libbpf.map | 5 ---- 3 files changed, 18 insertions(+), 112 deletions(-) commit aaf6886d9b53d34f0a3d2f577ddc1224026d12ab Author: Andrii Nakryiko Date: Mon Jun 27 14:15:17 2022 -0700 libbpf: remove deprecated BTF APIs Get rid of deprecated BTF-related APIs. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220627211527.2245459-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/btf.c | 183 +---------------------------------------------- tools/lib/bpf/btf.h | 86 +--------------------- tools/lib/bpf/btf_dump.c | 23 ++---- tools/lib/bpf/libbpf.c | 44 ++++-------- tools/lib/bpf/libbpf.map | 13 ---- 5 files changed, 24 insertions(+), 325 deletions(-) commit d320fad217b79849d66b53d7fdb361020ab4f64c Author: Andrii Nakryiko Date: Mon Jun 27 14:15:16 2022 -0700 libbpf: remove deprecated probing APIs Get rid of deprecated feature-probing APIs. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220627211527.2245459-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.h | 8 --- tools/lib/bpf/libbpf.map | 4 -- tools/lib/bpf/libbpf_probes.c | 125 ++---------------------------------------- 3 files changed, 5 insertions(+), 132 deletions(-) commit 53e6af3a761c6913164303f4f31da55ee2d3b134 Author: Andrii Nakryiko Date: Mon Jun 27 14:15:15 2022 -0700 libbpf: remove deprecated XDP APIs Get rid of deprecated bpf_set_link*() and bpf_get_link*() APIs. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220627211527.2245459-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.h | 20 ---------------- tools/lib/bpf/libbpf.map | 4 ---- tools/lib/bpf/netlink.c | 62 +++++++----------------------------------------- 3 files changed, 8 insertions(+), 78 deletions(-) commit 765a34130ea506fafefe179bdfa47da296016d92 Author: Andrii Nakryiko Date: Mon Jun 27 14:15:14 2022 -0700 libbpf: remove deprecated low-level APIs Drop low-level APIs as well as high-level (and very confusingly named) BPF object loading bpf_prog_load_xattr() and bpf_prog_load_deprecated() APIs. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220627211527.2245459-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/bpf.c | 174 ++--------------------------------------------- tools/lib/bpf/bpf.h | 83 ---------------------- tools/lib/bpf/libbpf.c | 89 ------------------------ tools/lib/bpf/libbpf.h | 16 ----- tools/lib/bpf/libbpf.map | 16 ----- 5 files changed, 4 insertions(+), 374 deletions(-) commit f36600634282a519e1b0abea609acdc8731515d7 Author: Andrii Nakryiko Date: Mon Jun 27 14:15:13 2022 -0700 libbpf: move xsk.{c,h} into selftests/bpf Remove deprecated xsk APIs from libbpf. But given we have selftests relying on this, move those files (with minimal adjustments to make them compilable) under selftests/bpf. We also remove all the removed APIs from libbpf.map, while overall keeping version inheritance chain, as most APIs are backwards compatible so there is no need to reassign them as LIBBPF_1.0.0 versions. Cc: Magnus Karlsson Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20220627211527.2245459-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/Build | 2 +- tools/lib/bpf/Makefile | 2 +- tools/lib/bpf/libbpf.map | 12 ----- tools/testing/selftests/bpf/Makefile | 2 + tools/testing/selftests/bpf/xdpxceiver.c | 2 +- tools/{lib => testing/selftests}/bpf/xsk.c | 76 ++++++++++++++++-------------- tools/{lib => testing/selftests}/bpf/xsk.h | 29 ++---------- 7 files changed, 49 insertions(+), 76 deletions(-) commit a984d5d191527108a934cb9da2a15b07ea05a8ea Author: Krzysztof Kozlowski Date: Sun May 8 15:59:31 2022 +0200 arm64: dts: qcom: correct interrupt controller on PM8916 and PMS405 The PM8916 and PMS405 PMIC GPIOs are interrupt controllers, as described in the bindings and used by the driver. Drop the interrupts (apparently copied from downstream tree), just like in commit 61d2ca503d0b ("arm64: dts: qcom: fix pm8150 gpio interrupts"): qcs404-evb-4000.dtb: gpio@c000: 'interrupts' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+' qcs404-evb-4000.dtb: gpio@c000: 'interrupt-controller' is a required property Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220508135932.132378-4-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/pm8916.dtsi | 6 ++---- arch/arm64/boot/dts/qcom/pms405.dtsi | 14 ++------------ 2 files changed, 4 insertions(+), 16 deletions(-) commit b07bfd8ebe31b0a39184cba522fdae433b6cd0ad Author: Krzysztof Kozlowski Date: Sun May 8 15:59:30 2022 +0200 arm64: dts: qcom: add missing gpio-ranges in PMIC GPIOs The new Qualcomm PMIC GPIO bindings require gpio-ranges property: sm8250-sony-xperia-edo-pdx203.dtb: gpio@c000: 'gpio-ranges' is a required property Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220508135932.132378-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/pm6350.dtsi | 1 + arch/arm64/boot/dts/qcom/pm8009.dtsi | 1 + arch/arm64/boot/dts/qcom/pm8150.dtsi | 1 + arch/arm64/boot/dts/qcom/pm8150b.dtsi | 1 + arch/arm64/boot/dts/qcom/pm8150l.dtsi | 1 + arch/arm64/boot/dts/qcom/pm8350.dtsi | 1 + arch/arm64/boot/dts/qcom/pm8350b.dtsi | 1 + arch/arm64/boot/dts/qcom/pm8916.dtsi | 1 + arch/arm64/boot/dts/qcom/pmr735b.dtsi | 1 + arch/arm64/boot/dts/qcom/pms405.dtsi | 1 + 10 files changed, 10 insertions(+) commit 4da4742236ce74b92590bc65184eb10826a12006 Author: Hans de Goede Date: Fri Jun 24 13:23:40 2022 +0200 platform/x86: panasonic-laptop: Use acpi_video_get_backlight_type() Use acpi_video_get_backlight_type() to determine if we should register the panasonic specific backlight interface. To avoid registering this on systems where the ACPI or GPU native backlight control methods should be used instead. Tested-by: Stefan Seyfried Tested-by: Kenneth Chan Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220624112340.10130-8-hdegoede@redhat.com drivers/platform/x86/panasonic-laptop.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 5e24e1eca1f2a3aed924e44606134a9381c3ccb9 Author: Hans de Goede Date: Fri Jun 24 13:23:39 2022 +0200 platform/x86: panasonic-laptop: filter out duplicate volume up/down/mute keypresses On some Panasonic models the volume up/down/mute keypresses get reported both through the Panasonic ACPI HKEY interface as well as through the atkbd device. Filter out the atkbd scan-codes for these to avoid reporting presses twice. Note normally we would leave the filtering of these to userspace by mapping the scan-codes to KEY_UNKNOWN through /lib/udev/hwdb.d/60-keyboard.hwdb. However in this case that would cause regressions since we were filtering the Panasonic ACPI HKEY events before, so filter these in the kernel. Fixes: ed83c9171829 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug") Reported-and-tested-by: Stefan Seyfried Reported-and-tested-by: Kenneth Chan Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220624112340.10130-7-hdegoede@redhat.com drivers/platform/x86/Kconfig | 1 + drivers/platform/x86/panasonic-laptop.c | 41 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) commit 027f88453dbf34cafce1c31e93c216665cdd71d2 Author: Hans de Goede Date: Fri Jun 24 13:23:38 2022 +0200 platform/x86: panasonic-laptop: don't report duplicate brightness key-presses The brightness key-presses might also get reported by the ACPI video bus, check for this and in this case don't report the presses to avoid reporting 2 presses for a single key-press. Fixes: ed83c9171829 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug") Reported-and-tested-by: Stefan Seyfried Reported-and-tested-by: Kenneth Chan Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220624112340.10130-6-hdegoede@redhat.com drivers/platform/x86/Kconfig | 1 + drivers/platform/x86/panasonic-laptop.c | 8 ++++++++ 2 files changed, 9 insertions(+) commit cb1f7d49736e05862c7d7df1c97676bb42c75e5c Author: Hans de Goede Date: Fri Jun 24 13:23:37 2022 +0200 platform/x86: panasonic-laptop: revert "Resolve hotkey double trigger bug" In hindsight blindly throwing away most of the key-press events is not a good idea. So revert commit ed83c9171829 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug"). Fixes: ed83c9171829 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug") Reported-and-tested-by: Stefan Seyfried Reported-and-tested-by: Kenneth Chan Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220624112340.10130-5-hdegoede@redhat.com drivers/platform/x86/panasonic-laptop.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 9cfebda442f73a5810d03c635645193634ba85e7 Author: Hans de Goede Date: Fri Jun 24 13:23:36 2022 +0200 platform/x86: panasonic-laptop: sort includes alphabetically Sort includes alphabetically, small cleanup patch in preparation of further changes. Fixes: ed83c9171829 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug") Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220624112340.10130-4-hdegoede@redhat.com drivers/platform/x86/panasonic-laptop.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 758babb511d883cd2aa784d48a362d92119ade99 Author: Stefan Seyfried Date: Fri Jun 24 13:23:35 2022 +0200 platform/x86: panasonic-laptop: de-obfuscate button codes In the definition of panasonic_keymap[] the key codes are given in decimal, later checks are done with hexadecimal values, which does not help in understanding the code. Additionally use two helper variables to shorten the code and make the logic more obvious. Fixes: ed83c9171829 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug") Signed-off-by: Stefan Seyfried Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220624112340.10130-3-hdegoede@redhat.com drivers/platform/x86/panasonic-laptop.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit fe72f9bce137055fb744d4f8a91baa234ec07baa Author: Douglas Anderson Date: Tue Jun 28 06:43:13 2022 -0700 soc: qcom: cmd-db: replace strscpy_pad() with strncpy() Commit ac0126a01735 ("soc: qcom: cmd-db: replace strncpy() with strscpy_pad()") breaks booting on my sc7280-herobrine-herobrine device. From printouts I see that at bootup the function is called with an id of "lnbclka2" which is 8 bytes big. Previously all 8 bytes of this string were copied to the destination. Now only 7 bytes will be copied since strscpy_pad() saves a byte for '\0' termination. We don't need the '\0' termination in the destination. Let's go back to strncpy(). According to the warning: If a caller is using non-NUL-terminated strings, strncpy() can still be used, but destinations should be marked with the __nonstring attribute to avoid future compiler warnings. ...so we'll do that. While we're at it, let's change the query array to use "sizeof(ent->id)" so it can't possibly go out of sync with our later copy. Fixes: ac0126a01735 ("soc: qcom: cmd-db: replace strncpy() with strscpy_pad()") Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220628064301.v3.1.Ie7b480cd99e2c13319220cbc108caf2bcd41286b@changeid drivers/soc/qcom/cmd-db.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 8587f3732b37a39de205d8c42f5448dbe6aa6b55 Author: Gautam Menghani Date: Tue Jun 28 11:16:03 2022 +0530 selftests/drivers/gpu: Add error messages to drm_mm.sh Add error messages when the module test-drm_mm is not found or could not be removed to make tests output more readable. Signed-off-by: Gautam Menghani Signed-off-by: Shuah Khan tools/testing/selftests/drivers/gpu/drm_mm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6b56f5f1ef93ec1b34dee1ef72da33ec046f82be Author: Johannes Holland Date: Tue Jun 28 16:39:27 2022 +0200 selftests/tpm2: increase timeout for kselftests Due to CreatePrimary commands which need to create RSA keys of increasing size, the timeout value need to be raised, as well. Default is 45s. Fixed git am white space warns: Shuah Khan Signed-off-by: Johannes Holland Signed-off-by: Stefan Mahnke-Hartmann Signed-off-by: Shuah Khan tools/testing/selftests/tpm2/settings | 1 + 1 file changed, 1 insertion(+) commit b1f359711a28670651dc5b1d7f1018b07416a944 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:52:57 2022 -0700 dt-bindings: pinctrl: nuvoton,wpcm450-pinctrl: align key node name gpio-keys schema requires keys to have more generic name. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220616005333.18491-4-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/nuvoton,wpcm450-pinctrl.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94dfc73e7cf4a31da66b8843f0b9283ddd6b8381 Author: Gustavo A. R. Silva Date: Wed Apr 6 19:36:51 2022 -0500 treewide: uapi: Replace zero-length arrays with flexible-array members 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]. This code was transformed with the help of Coccinelle: (linux-5.19-rc2$ spatch --jobs $(getconf _NPROCESSORS_ONLN) --sp-file script.cocci --include-headers --dir . > output.patch) @@ identifier S, member, array; type T1, T2; @@ struct S { ... T1 member; T2 array[ - 0 ]; }; -fstrict-flex-arrays=3 is coming and we need to land these changes to prevent issues like these in the short future: ../fs/minix/dir.c:337:3: warning: 'strcpy' will always overflow; destination buffer has size 0, but the source string has length 2 (including NUL byte) [-Wfortify-source] strcpy(de3->name, "."); ^ Since these are all [0] to [] changes, the risk to UAPI is nearly zero. If this breaks anything, we can use a union with a new member name. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/78 Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/62b675ec.wKX6AOZ6cbE71vtF%25lkp@intel.com/ Acked-by: Dan Williams # For ndctl.h Signed-off-by: Gustavo A. R. Silva arch/m68k/include/uapi/asm/bootinfo.h | 4 +- arch/mips/include/uapi/asm/ucontext.h | 2 +- arch/s390/include/uapi/asm/hwctrset.h | 6 +-- arch/x86/include/uapi/asm/bootparam.h | 2 +- arch/x86/include/uapi/asm/kvm.h | 12 ++--- include/uapi/drm/i915_drm.h | 6 +-- include/uapi/linux/blkzoned.h | 2 +- include/uapi/linux/bpf.h | 2 +- include/uapi/linux/btrfs.h | 10 ++-- include/uapi/linux/btrfs_tree.h | 2 +- include/uapi/linux/can/bcm.h | 2 +- include/uapi/linux/connector.h | 2 +- include/uapi/linux/cycx_cfm.h | 2 +- include/uapi/linux/dm-ioctl.h | 8 +-- include/uapi/linux/dm-log-userspace.h | 2 +- include/uapi/linux/ethtool.h | 28 +++++----- include/uapi/linux/fanotify.h | 2 +- include/uapi/linux/fiemap.h | 2 +- include/uapi/linux/firewire-cdev.h | 12 ++--- include/uapi/linux/fs.h | 2 +- include/uapi/linux/if_alg.h | 2 +- include/uapi/linux/if_arcnet.h | 6 +-- include/uapi/linux/if_pppox.h | 4 +- include/uapi/linux/if_tun.h | 2 +- include/uapi/linux/igmp.h | 6 +-- include/uapi/linux/inet_diag.h | 2 +- include/uapi/linux/inotify.h | 2 +- include/uapi/linux/ip.h | 4 +- include/uapi/linux/ip_vs.h | 4 +- include/uapi/linux/iso_fs.h | 4 +- include/uapi/linux/jffs2.h | 8 +-- include/uapi/linux/kcov.h | 2 +- include/uapi/linux/kvm.h | 8 +-- include/uapi/linux/minix_fs.h | 4 +- include/uapi/linux/mmc/ioctl.h | 2 +- include/uapi/linux/ndctl.h | 10 ++-- include/uapi/linux/net_dropmon.h | 4 +- include/uapi/linux/netfilter/x_tables.h | 4 +- include/uapi/linux/netfilter_arp/arp_tables.h | 6 +-- include/uapi/linux/netfilter_bridge/ebt_among.h | 2 +- include/uapi/linux/netfilter_ipv4/ip_tables.h | 6 +-- include/uapi/linux/netfilter_ipv6/ip6_tables.h | 4 +- include/uapi/linux/perf_event.h | 2 +- include/uapi/linux/pkt_cls.h | 4 +- include/uapi/linux/raid/md_p.h | 2 +- include/uapi/linux/random.h | 2 +- include/uapi/linux/romfs_fs.h | 4 +- include/uapi/linux/rtnetlink.h | 2 +- include/uapi/linux/sctp.h | 10 ++-- include/uapi/linux/seg6.h | 2 +- include/uapi/linux/seg6_iptunnel.h | 2 +- include/uapi/linux/stm.h | 2 +- include/uapi/linux/target_core_user.h | 2 +- include/uapi/linux/usb/audio.h | 2 +- include/uapi/linux/usb/cdc.h | 6 +-- include/uapi/linux/usb/ch9.h | 2 +- include/uapi/linux/usb/raw_gadget.h | 4 +- include/uapi/linux/usbdevice_fs.h | 4 +- include/uapi/linux/vhost_types.h | 4 +- include/uapi/linux/virtio_9p.h | 2 +- include/uapi/linux/xfrm.h | 10 ++-- include/uapi/rdma/hfi/hfi1_user.h | 2 +- include/uapi/rdma/ib_user_verbs.h | 72 ++++++++++++------------- include/uapi/rdma/rdma_user_cm.h | 2 +- include/uapi/rdma/rdma_user_ioctl_cmds.h | 2 +- include/uapi/scsi/fc/fc_els.h | 18 +++---- include/uapi/scsi/scsi_bsg_fc.h | 2 +- include/uapi/sound/asound.h | 2 +- include/uapi/sound/firewire.h | 6 +-- include/uapi/sound/skl-tplg-interface.h | 2 +- include/uapi/sound/sof/header.h | 2 +- include/uapi/sound/usb_stream.h | 2 +- tools/arch/x86/include/uapi/asm/kvm.h | 12 ++--- tools/include/uapi/drm/i915_drm.h | 6 +-- tools/include/uapi/linux/fs.h | 2 +- tools/include/uapi/linux/if_tun.h | 2 +- tools/include/uapi/linux/kvm.h | 8 +-- tools/include/uapi/linux/perf_event.h | 2 +- tools/include/uapi/linux/pkt_cls.h | 4 +- tools/include/uapi/linux/seg6.h | 4 +- tools/include/uapi/linux/usbdevice_fs.h | 4 +- tools/include/uapi/sound/asound.h | 2 +- 82 files changed, 216 insertions(+), 216 deletions(-) commit 50f2944009a25bb39a09f2f7bab64a73ce928bef Author: Marc Kleine-Budde Date: Mon Jun 27 16:58:59 2022 +0200 can: ctucanfd: ctucan_interrupt(): fix typo This patch fixes the typo "poniter" -> "pointer" in the kerneldoc of ctucan_interrupt(). Link: https://lore.kernel.org/all/20220628083204.881311-1-mkl@pengutronix.de Fixes: 2dcb8e8782d8 ("can: ctucanfd: add support for CTU CAN FD open-source IP core - bus independent part.") Cc: Ondrej Ille Cc: Martin Jerabek Acked-by: Pavel Pisa Signed-off-by: Marc Kleine-Budde drivers/net/can/ctucanfd/ctucanfd_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44dab005fd4298c209ea32ffda6131cad4358d21 Author: Andreas Gruenbacher Date: Tue Jun 14 21:55:45 2022 +0200 gfs2: Minor gfs2_glock_nq_m cleanup Add state and flags arguments to gfs2_rlist_alloc() to make it somewhat more obvious which state and flags an rlist uses. With that, stop knocking off flags in gfs2_glock_nq_m() and its nq_m_sync() helper that are never set in the first place. Signed-off-by: Andreas Gruenbacher fs/gfs2/dir.c | 2 +- fs/gfs2/glock.c | 6 +----- fs/gfs2/rgrp.c | 9 ++++++--- fs/gfs2/rgrp.h | 3 ++- fs/gfs2/xattr.c | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) commit 8add9a3a2243166f8f60fc20e876caaf30a333f7 Author: Sudeep Holla Date: Tue Jun 28 15:18:21 2022 +0100 efi: Simplify arch_efi_call_virt() macro Currently, the arch_efi_call_virt() assumes all users of it will have defined a type 'efi_##f##_t' to make use of it. Simplify the arch_efi_call_virt() macro by eliminating the explicit need for efi_##f##_t type for every user of this macro. Signed-off-by: Sudeep Holla Acked-by: Russell King (Oracle) [ardb: apply Sudeep's ARM fix to i686, Loongarch and RISC-V too] Signed-off-by: Ard Biesheuvel arch/arm/include/asm/efi.h | 7 ------- arch/arm64/include/asm/efi.h | 7 ++----- arch/loongarch/include/asm/efi.h | 16 ++-------------- arch/riscv/include/asm/efi.h | 2 -- arch/x86/include/asm/efi.h | 3 +-- include/linux/efi.h | 2 ++ 6 files changed, 7 insertions(+), 30 deletions(-) commit 1df4d1724baafa55e9803414ebcdf1ca702bc958 Author: Zheng Zhi Yuan Date: Sun Jun 26 22:29:58 2022 +0800 drivers: fix typo in firmware/efi/memmap.c This patch fixes the spelling error in firmware/efi/memmap.c, changing it to the correct word. Signed-off-by: Zheng Zhi Yuan Signed-off-by: Ard Biesheuvel drivers/firmware/efi/memmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed5fce76b5ea40c87b44cafbe4f3222da8ec981a Author: Siddhesh Poyarekar Date: Tue Jun 28 08:30:58 2022 +0800 vfs: escape hash as well When a filesystem is mounted with a name that starts with a #: # mount '#name' /mnt/bad -t tmpfs this will cause the entry to look like this (leading space added so that git does not strip it out): #name /mnt/bad tmpfs rw,seclabel,relatime,inode64 0 0 This breaks getmntent and any code that aims to parse fstab as well as /proc/mounts with the same logic since they need to strip leading spaces or skip over comment lines, due to which they report incorrect output or skip over the line respectively. Solve this by translating the hash character into its octal encoding equivalent so that applications can decode the name correctly. Signed-off-by: Siddhesh Poyarekar Signed-off-by: Ian Kent Signed-off-by: Al Viro fs/proc_namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8682b92e5ab852b93739a0f2b261fff4c733be57 Author: Christoph Hellwig Date: Tue Jun 28 19:18:50 2022 +0200 blk-mq: cleanup disk sysfs registration Pass a gendisk to the sysfs register/unregister functions and give them descriptive names. Also move the unregistration helper next to the one doing the registration. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20220628171850.1313069-7-hch@lst.de Signed-off-by: Jens Axboe block/blk-mq-sysfs.c | 39 ++++++++++++++++++++------------------- block/blk-mq.h | 3 ++- block/blk-sysfs.c | 9 ++++----- include/linux/blk-mq.h | 1 - 4 files changed, 26 insertions(+), 26 deletions(-) commit eaa870f97544668025ba1f96ee267abac7b3c73c Author: Christoph Hellwig Date: Tue Jun 28 19:18:49 2022 +0200 blk-mq: rename blk_mq_sysfs_{,un}register Add a _hctx postfix to better describe what the functions do, match the debugfs equivalents and release the old names for functions that should be using them. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20220628171850.1313069-6-hch@lst.de Signed-off-by: Jens Axboe block/blk-mq-sysfs.c | 4 ++-- block/blk-mq.c | 4 ++-- block/blk-mq.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 81f0c2ef41b02185928563899cd4d618ffc7eebf Author: Christoph Hellwig Date: Tue Jun 28 19:18:48 2022 +0200 block: remove the extra gendisk reference in __blk_mq_register_dev kobject_add already grabs a reference to the parent, no need to have another one. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20220628171850.1313069-5-hch@lst.de Signed-off-by: Jens Axboe block/blk-mq-sysfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4a8d14bba486cca6880062f1ef240cf1d45f3367 Author: Christoph Hellwig Date: Tue Jun 28 19:18:47 2022 +0200 block: use default groups to register the queue attributes Set up the default_groups for blk_queue_ktype instead of manually calling sysfs_create_group. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20220628171850.1313069-4-hch@lst.de Signed-off-by: Jens Axboe block/blk-sysfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 060f131e9c438837f9792e456fae424e621fb881 Author: Christoph Hellwig Date: Tue Jun 28 19:18:46 2022 +0200 block: remove a superflous queue kobject reference kobject_add already adds a reference to the parent that is dropped on deletion, so don't bother grabbing another one. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20220628171850.1313069-3-hch@lst.de Signed-off-by: Jens Axboe block/blk-sysfs.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit cc5c516df028b221d94c65c47c5ae8d20f61b6f9 Author: Christoph Hellwig Date: Tue Jun 28 19:18:45 2022 +0200 block: simplify blktrace sysfs attribute creation Add the trace attributes to the default gendisk attributes, just like we already do for partitions. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20220628171850.1313069-2-hch@lst.de Signed-off-by: Jens Axboe block/blk-sysfs.c | 11 +---------- block/blk.h | 2 ++ block/genhd.c | 3 +++ block/partitions/core.c | 1 - include/linux/blktrace_api.h | 10 ---------- kernel/trace/blktrace.c | 11 ----------- 6 files changed, 6 insertions(+), 32 deletions(-) commit 3888bb741177718177c49a6b1b7c174b5b18c1be Author: Hans de Goede Date: Fri Jun 24 13:23:34 2022 +0200 ACPI: video: Change how we determine if brightness key-presses are handled Some systems have an ACPI video bus but not ACPI video devices with backlight capability. On these devices brightness key-presses are (logically) not reported through the ACPI video bus. Change how acpi_video_handles_brightness_key_presses() determines if brightness key-presses are handled by the ACPI video driver to avoid vendor specific drivers/platform/x86 drivers filtering out their brightness key-presses even though they are the only ones reporting these presses. Fixes: ed83c9171829 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug") Reported-and-tested-by: Stefan Seyfried Reported-and-tested-by: Kenneth Chan Signed-off-by: Hans de Goede Acked-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220624112340.10130-2-hdegoede@redhat.com drivers/acpi/acpi_video.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 4274929c7ee6f442c3f89c5da64d112a9de4a6ba Author: Joey Gouly Date: Tue Jun 28 16:13:07 2022 +0100 arm64: vdso*: place got/plt sections in .rodata The vDSO will not contain absolute relocations, so place these sections in .rodata. Signed-off-by: Joey Gouly Link: https://lore.kernel.org/linux-arm-kernel/00abb0c5-6360-0004-353f-e7a88b3bd22c@arm.com/ Cc: Will Deacon Cc: Vincenzo Frascino Link: https://lore.kernel.org/r/20220628151307.35561-3-joey.gouly@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/vdso/vdso.lds.S | 12 +++++------- arch/arm64/kernel/vdso32/vdso.lds.S | 23 ++++++++++------------- 2 files changed, 15 insertions(+), 20 deletions(-) commit 5c4fb60816ea55f66a046cc3662ca379aed52f7b Author: Joey Gouly Date: Tue Jun 28 16:13:06 2022 +0100 arm64: vdso32: add ARM.exidx* sections These show up when building with clang+lld. Signed-off-by: Joey Gouly Cc: Will Deacon Cc: Vincenzo Frascino Link: https://lore.kernel.org/r/20220628151307.35561-2-joey.gouly@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/vdso32/vdso.lds.S | 1 + 1 file changed, 1 insertion(+) commit 29be7ec3df7a3ed95584d39aa4014df0cd056991 Author: Chao Yu Date: Sun Jun 19 01:51:55 2022 +0800 f2fs: initialize page_array_entry slab only if compression feature is on Otherwise, in image which doesn't support compression feature, page_array_entry will be initialized w/o use. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/compress.c | 3 +++ 1 file changed, 3 insertions(+) commit a4a0e16dbf77582c4f58ab472229dd071b5c4260 Author: Jack Qiu Date: Tue May 31 09:16:56 2022 +0800 f2fs: optimize error handling in redirty_blocks Current error handling is at risk of page leaks. However, we dot't seek any failure scenarios, just use f2fs_bug_on. Signed-off-by: Jack Qiu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7859e97f62202e81129a0d667153b463fad6513e Author: Jaegeuk Kim Date: Sat Jun 11 10:55:43 2022 -0700 f2fs: do not skip updating inode when retrying to flush node page Let's try to flush dirty inode again to improve subtle i_blocks mismatch. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit e4d2f4fd5341064d2b3c5158da69421a581e7ec1 Author: Konstantin Komarov Date: Tue Jun 21 12:49:52 2022 +0300 fs/ntfs3: Enable FALLOC_FL_INSERT_RANGE Changed logic in ntfs_fallocate - more clear checks in beginning instead of the middle of function and added FALLOC_FL_INSERT_RANGE. Fixes xfstest generic/064 Fixes: 4342306f0f0d ("fs/ntfs3: Add file operations and implementation") Signed-off-by: Konstantin Komarov fs/ntfs3/file.c | 97 ++++++++++++++++++++++++++++++++------------------------- 1 file changed, 55 insertions(+), 42 deletions(-) commit aa30eccb24e5a66a2cf7f7b34a69c3651d12cc6a Author: Konstantin Komarov Date: Tue Jun 21 12:46:25 2022 +0300 fs/ntfs3: Fallocate (FALLOC_FL_INSERT_RANGE) implementation Add functions for inserting hole in file and inserting range in run. Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/ntfs3/ntfs_fs.h | 4 +- fs/ntfs3/run.c | 43 +++++++++++++ 3 files changed, 222 insertions(+), 1 deletion(-) commit 8c07f33ea096a1d25fcefa4e904ce50aa2358876 Author: Philip Yang Date: Mon Jun 27 13:23:27 2022 -0400 Revert "drm/amdkfd: Free queue after unmap queue success" This reverts commit ab8529b0cdb271d9b222cbbddb2641f3fca5df8f. This causes KFDTest KFDMemoryTest.MemoryRegister test failed on gfx9. Signed-off-by: Philip Yang Acked-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 28 +++++++++------------- .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 2 +- 2 files changed, 12 insertions(+), 18 deletions(-) commit 1c4dae3e4639540fb567e570cc56a3c292afb6fe Author: Rahul Kumar Date: Tue Jun 28 01:36:38 2022 +0530 drm/amdgpu/display/dc: Fix null pointer exception We observed hard hang due to NULL derefrence This issue is seen after running system all the time after two or three days struct dc *dc = plane_state->ctx->dc; Randomly in long run we found plane_state or plane_state->ctx is found NULL which causes exception. BUG: kernel NULL pointer dereference, address: 0000000000000000 PF: supervisor read access in kernel mode PF: error_code(0x0000) - not-present page PGD 1dc7f2067 P4D 1dc7f2067 PUD 222c75067 PMD 0 Oops: 0000 [#1] SMP NOPTI CPU: 5 PID: 29855 Comm: kworker/u16:4 ... ... Workqueue: events_unbound commit_work [drm_kms_helper] RIP: 0010:dcn10_update_pending_status+0x1f/0xee [amdgpu] Code: 41 5f c3 0f 1f 44 00 00 b0 01 c3 0f 1f 44 00 00 41 55 41 54 55 53 48 8b 1f 4c 8b af f8 00 00 00 48 8b 83 88 03 00 00 48 85 db <4c> 8b 20 0f 84 bf 00 00 00 48 89 fd 48 8b bf b8 00 00 00 48 8b 07 RSP: 0018:ffff942941997ab8 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff8d7fd98d2000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff8d7e3e87c708 RDI: ffff8d7f2d8c0690 RBP: ffff8d7f2d8c0000 R08: ffff942941997a34 R09: 00000000ffffffff R10: 0000000000005000 R11: 00000000000000f0 R12: ffff8d7f2d8c0690 R13: ffff8d8035a41680 R14: 00000000000186a0 R15: ffff8d7f2d8c1dd8 FS: 0000000000000000(0000) GS:ffff8d8037340000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000148030000 CR4: 00000000003406e0 Call Trace: dc_commit_state+0x6a2/0x7f0 [amdgpu] amdgpu_dm_atomic_commit_tail+0x460/0x19bb [amdgpu] Tested-by: Rodrigo Siqueira Reviewed-by: Harry Wentland Signed-off-by: Rahul Kumar Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ae55f030dc523fc4dc6069557e4a887ea815453 Author: Andrey Grodzovsky Date: Mon Jun 20 17:33:55 2022 -0400 drm/amdgpu: Follow up change to previous drm scheduler change. Align refcount behaviour for amdgpu_job embedded HW fence with classic pointer style HW fences by increasing refcount each time emit is called so amdgpu code doesn't need to make workarounds using amdgpu_job.job_run_counter to keep the HW fence refcount balanced. Also since in the previous patch we resumed setting s_fence->parent to NULL in drm_sched_stop switch to directly checking if job->hw_fence is signaled to short circuit reset if already signed. Signed-off-by: Andrey Grodzovsky Tested-by: Yiqing Yao Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 27 +++++++++++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 7 ++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 4 ---- 4 files changed, 29 insertions(+), 11 deletions(-) commit 45ecaea738830b9d521c93520c8f201359dcbd95 Author: Andrey Grodzovsky Date: Mon Jun 20 16:39:47 2022 -0400 drm/sched: Partial revert of 'drm/sched: Keep s_fence->parent pointer' Problem: This patch caused negative refcount as described in [1] because for that case parent fence did not signal by the time of drm_sched_stop and hence kept in pending list the assumption was they will not signal and so fence was put to account for the s_fence->parent refcount but for amdgpu which has embedded HW fence (always same parent fence) drm_sched_fence_release_scheduled was always called and would still drop the count for parent fence once more. For jobs that never signaled this imbalance was masked by refcount bug in amdgpu_fence_driver_clear_job_fences that would not drop refcount on the fences that were removed from fence drive fences array (against prevois insertion into the array in get in amdgpu_fence_emit). Fix: Revert this patch and by setting s_job->s_fence->parent to NULL as before prevent the extra refcount drop in amdgpu when drm_sched_fence_release_scheduled is called on job release. Also - align behaviour in drm_sched_resubmit_jobs_ext with that of drm_sched_main when submitting jobs - take a refcount for the new parent fence pointer and drop refcount for original kref_init for new HW fence creation (or fake new HW fence in amdgpu - see next patch). [1] - https://lore.kernel.org/all/731b7ff1-3cc9-e314-df2a-7c51b76d4db0@amd.com/t/#r00c728fcc069b1276642c325bfa9d82bf8fa21a3 Signed-off-by: Andrey Grodzovsky Tested-by: Yiqing Yao Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/scheduler/sched_main.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 9e225fb9e636b31b97e9d35324c2f9e43ee0aab4 Author: Andrey Grodzovsky Date: Sat Jun 18 00:28:50 2022 -0400 drm/amdgpu: Prevent race between late signaled fences and GPU reset. Problem: After we start handling timed out jobs we assume there fences won't be signaled but we cannot be sure and sometimes they fire late. We need to prevent concurrent accesses to fence array from amdgpu_fence_driver_clear_job_fences during GPU reset and amdgpu_fence_process from a late EOP interrupt. Fix: Before accessing fence array in GPU disable EOP interrupt and flush all pending interrupt handlers for amdgpu device's interrupt line. v2: Switch from irq_get/put to full enable/disable_irq for amdgpu Signed-off-by: Andrey Grodzovsky Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 18 ++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + 3 files changed, 23 insertions(+) commit dd70748eda3f63217d5284f48651239a9721245e Author: Andrey Grodzovsky Date: Mon Jun 20 13:08:52 2022 -0400 drm/amdgpu: Add put fence in amdgpu_fence_driver_clear_job_fences This function should drop the fence refcount when it extracts the fence from the fence array, just as it's done in amdgpu_fence_process. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5c4904ac34b76eb58abc15a52603ee59bf8be85d Author: Leslie Shi Date: Mon Jun 27 12:52:17 2022 +0800 drm/amdgpu: Remove useless amdgpu_display_freesync_ioctl() declaration Signed-off-by: Leslie Shi Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | 2 -- 1 file changed, 2 deletions(-) commit fe4e9ff9873758ad07e6f7b3088ae3a9dd3ff1b3 Author: Jack Xiao Date: Thu Jun 2 16:37:56 2022 +0800 drm/amdgpu: add mc wptr addr support for mes MES requires mc wptr address for usermode queues. Export bo gart address for mc wptr address. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 10 ++++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_mes_ctx.h | 1 + drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 8 +++++++- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 6 +++--- 5 files changed, 21 insertions(+), 6 deletions(-) commit ca0cb8959f7b84742c3dd612f5b044788cddfcc7 Author: Chandan Vurdigere Nataraj Date: Thu Jun 23 12:48:49 2022 +0530 drm/amd/display : Log DP link training failure reason [Why] Existing logs doesn't print DP LT failure reason [How] Update the existing log with DP LT failure reason Signed-off-by: Chandan Vurdigere Nataraj Reviewed-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1d3182006cf6eea26d0cd752f8042c3cae43139b Author: Evan Quan Date: Tue Jun 14 15:21:48 2022 +0800 drm/amd/pm: enable VR0 HOT support for SMU 13.0.0 Enable VR0 Hot support for SMU 13.0.0. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 ++ 1 file changed, 2 insertions(+) commit d7f0c8aff01340c2bed48f1e712a7f17c31b3db9 Author: Evan Quan Date: Thu Mar 3 14:39:22 2022 +0800 drm/amdgpu: update GFX11 cs settings Update GFX11 cs related settings. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/clearstate_gfx11.h | 307 +++++++++++++------------- 1 file changed, 158 insertions(+), 149 deletions(-) commit 01cf387b1c7f60527c91627528370f463bcb84f3 Author: Alex Deucher Date: Wed Jun 22 10:36:58 2022 -0400 drm/amdgpu/display: reduce stack size in dml32_ModeSupportAndSystemConfigurationFull() Move more stack variable in to dummy vars structure on the heap. Fixes stack frame size errors: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c: In function 'dml32_ModeSupportAndSystemConfigurationFull': drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c:3833:1: error: the frame size of 2720 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] 3833 | } // ModeSupportAndSystemConfigurationFull | ^ Fixes: dda4fb85e433 ("drm/amd/display: DML changes for DCN32/321") Cc: Stephen Rothwell Cc: Aurabindo Pillai Cc: Rodrigo Siqueira Jordao Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 77 ++++++++++------------ .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 3 +- 2 files changed, 36 insertions(+), 44 deletions(-) commit c3f464542b7099692827f0094c00aa9a26a2acbc Author: Nícolas F. R. A. Prado Date: Mon Jun 27 13:32:08 2022 -0400 dt-bindings: pinctrl: mt8192: Add RSEL values to bias-pull-{up,down} Commit fe44e4984018 ("pinctrl: mediatek: add rsel setting on mt8192") added RSEL bias type definition for some pins on mt8192. In order to be able to configure the bias on those pins, add the RSEL values in the bias-pull-up and bias-pull-down properties in the binding. Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220627173209.604400-1-nfraprado@collabora.com Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 5f78e1fb7a3ed1acc355145536ddd54f183b635d Author: Srinivasa Rao Mandadapu Date: Mon Jun 27 16:14:22 2022 +0530 ASoC: qcom: Add driver support for audioreach solution Add Machine driver support for audioreach solution, which uses ADSP in SC7280 based paltforms. Signed-off-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/1656326662-14524-1-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown sound/soc/qcom/sc7280.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit e92b25731ef6c21471a79404cebb0f6738096f77 Author: Liu Song Date: Fri Jun 24 09:20:48 2022 +0800 arm64: correct the effect of mitigations off on kpti If KASLR is enabled, then kpti will be forced to be enabled even if mitigations off, so we need to adjust the description of this parameter. Signed-off-by: Liu Song Link: https://lore.kernel.org/r/1656033648-84181-1-git-send-email-liusong@linux.alibaba.com Signed-off-by: Will Deacon Documentation/admin-guide/kernel-parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 849f35422319a46c2a52289e2d5c85eb3346a921 Merge: ebc4969ae125 34b9715b7cae Author: Greg Kroah-Hartman Date: Tue Jun 28 16:02:17 2022 +0200 Merge tag 'thunderbolt-for-v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next Mika writes: thunderbolt: Changes for v5.20 merge window This includes following Thunderbolt/USB4 changes for the v5.20 merge window: * Enable CL1 low power link state * Add support for Intel Raptor Lake Thunderbolt/USB4 controller * A couple of typos fixed. All these have been in linux-next with no reported issues. * tag 'thunderbolt-for-v5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Fix typo in comment thunderbolt: Add support for Intel Raptor Lake thunderbolt: Fix some kernel-doc comments thunderbolt: Change TMU mode to HiFi uni-directional once DisplayPort tunneled thunderbolt: Add CL1 support for USB4 and Titan Ridge routers thunderbolt: Change downstream router's TMU rate in both TMU uni/bidir mode thunderbolt: Fix typos in CLx enabling thunderbolt: CLx disable before system suspend only if previously enabled thunderbolt: Silently ignore CLx enabling in case CLx is not supported commit 84cc4e66d90f6624f821df381073813dd502f657 Author: Kajol Jain Date: Fri Jun 10 19:10:46 2022 +0530 selftests/powerpc/pmu: Add interface test for bhrb disable field The testcase uses "instructions" event to generate the samples and fetch Monitor Mode Control Register A (MMCRA) when overflow. Branch History Rolling Buffer(bhrb) disable bit is part of MMCRA which need to be verified by perf interface. Testcase checks if the bhrb disable bit of MMCRA register is programmed correctly via perf interface for ISA v3.1 platform Also make get_mmcra_ifm return type as u64. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-9-atrajeev@linux.vnet.ibm.com .../selftests/powerpc/pmu/sampling_tests/Makefile | 3 +- .../selftests/powerpc/pmu/sampling_tests/misc.h | 2 +- .../pmu/sampling_tests/mmcra_bhrb_disable_test.c | 66 ++++++++++++++++++++++ 3 files changed, 69 insertions(+), 2 deletions(-) commit 014fb4a3ae746276f4320f7010d03157485051cb Author: Kajol Jain Date: Fri Jun 10 19:10:45 2022 +0530 selftests/powerpc/pmu: Add interface test for mmcra_ifm field for conditional branch type The testcase uses "instructions" event to check if the Instruction filtering mode(IFM) bits are programmed correctly for conditional branch type. Testcase checks if IFM bits is programmed correctly to Monitor Mode Control Register A (MMCRA) via perf interface for ISA v3.1 platform. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-8-atrajeev@linux.vnet.ibm.com .../selftests/powerpc/pmu/sampling_tests/Makefile | 2 +- .../pmu/sampling_tests/mmcra_bhrb_cond_test.c | 69 ++++++++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) commit faa64ddc1e398131e7eaadc8f03cb7bd3904eff2 Author: Kajol Jain Date: Fri Jun 10 19:10:44 2022 +0530 selftests/powerpc/pmu: Add interface test for mmcra_ifm field for any branch type The testcase uses "instructions" event to check if the Instruction filtering mode(IFM) bits are programmed correctly for type any branch. Testcase checks if IFM bits is programmed correctly to Monitor Mode Control Register A (MMCRA) via perf interface. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-7-atrajeev@linux.vnet.ibm.com .../selftests/powerpc/pmu/sampling_tests/Makefile | 2 +- .../pmu/sampling_tests/mmcra_bhrb_any_test.c | 65 ++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) commit c55dabc6d577a864cd618107ea6aaa6cad8c987b Author: Kajol Jain Date: Fri Jun 10 19:10:43 2022 +0530 selftests/powerpc/pmu: Add interface test for mmcra_ifm field of indirect call type The testcase uses "instructions" event to check if the Instruction filtering mode(IFM) bits are programmed correctly for indirect branch type. Testcase checks if IFM bits are programmed correctly to Monitor Mode Control Register A (MMCRA) via perf interface for ISA v3.1 platform. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-6-atrajeev@linux.vnet.ibm.com tools/testing/selftests/powerpc/pmu/branch_loops.S | 28 +++++++++ .../selftests/powerpc/pmu/sampling_tests/Makefile | 5 +- .../pmu/sampling_tests/mmcra_bhrb_ind_call_test.c | 69 ++++++++++++++++++++++ 3 files changed, 100 insertions(+), 2 deletions(-) commit 61d89900315aa25f6da0c1bc800ce295d74d69f1 Author: Kajol Jain Date: Fri Jun 10 19:10:42 2022 +0530 selftests/powerpc/pmu: Add support for branch sampling in get_intr_regs function Add support for sample type as PERF_SAMPLE_BRANCH_STACK in sampling tests. This change is a precursor/helper for sampling testcases, that test branck stack feature in perf interface. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-5-atrajeev@linux.vnet.ibm.com .../selftests/powerpc/pmu/sampling_tests/misc.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 50d9c30a685c14e41e44d48a08a08703c680d861 Author: Kajol Jain Date: Fri Jun 10 19:10:41 2022 +0530 selftests/powerpc/pmu: Add interface test for mmcra_thresh_cmp fields The testcase uses event code 0x35340401e0 for load only sampling, to verify the settings of thresh compare field in Monitor Mode Control Register A (MMCRA: 9-18 bits for power9 and MMCRA: 8-18 bits for power10). Testcase checks if the thresh compare field is programmed correctly via perf interface to MMCRA register. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-4-atrajeev@linux.vnet.ibm.com .../selftests/powerpc/pmu/sampling_tests/Makefile | 2 +- .../pmu/sampling_tests/mmcra_thresh_cmp_test.c | 74 ++++++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) commit a069b5f980e3b65b64b6322b71d5819f90dbb42b Author: Athira Rajeev Date: Fri Jun 10 19:10:40 2022 +0530 selftests/powerpc: Add support to fetch "platform" and "base platform" from auxv to detect platform. The /proc/self/auxv contains information about "platform" on any system. Also "base platform" which is an indication about platform string corresponding to the real PVR. When systems are booted in compat mode, say, power10 booted in power9 mode, "platform" will point to power9 whereas base platform will point to power10. Incase, if the distro doesn't support platform indicated by real PVR, base platform will have a default value. The mismatch of platform/base platform is an indication of system booted in compat mode. In such cases, distro will have a Generic Compat registered which supports basic features for performance monitoring. Some of the selftest needs to be handled differently ( ex: generic events, alternative events, bhrb filter map) in Generic Compat PMU. Hence selftest framework needs utility functions to identify such cases. One way is make sure of auxv information. Below condition can be used to detect if Generic Compat PMU is registered. ie: if ((AT_PLATFORM != AT_BASE_PLATFORM) && (AT_BASE_PLATFORM != PVR)) this indicates Generic Compat PMU. Add utility function in "include/utils.h" to return: AT_PLATFORM and AT_BASE_PLATFORM from auxv. Also update misc.c in "sampling_tests" folder to add function to use above check to determine presence of generic compat pmu. In other architecture ( like x86 ), pmu_name is exposed via "/sys/bus/event_source/devices/cpu/caps". The same could be used in powerpc in future. Since currently we don't have the "caps" support in powerpc, patch uses auxv information to detect platform type and compat mode. But as placeholder utility function is added considering possiblity of getting "caps" information via sysfs. If that doesn't exist, fallback to using auxv information. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-3-atrajeev@linux.vnet.ibm.com tools/testing/selftests/powerpc/include/utils.h | 10 +++++ .../selftests/powerpc/pmu/sampling_tests/misc.c | 50 ++++++++++++++++++++++ .../selftests/powerpc/pmu/sampling_tests/misc.h | 3 ++ 3 files changed, 63 insertions(+) commit 42e0576eec75479fa7709c41e5c3b9ec556b8f4d Author: Kajol Jain Date: Fri Jun 10 19:10:39 2022 +0530 selftests/powerpc/pmu: Add mask/shift bits for extracting threshold compare field In power10, threshold compare field is not part of the raw event code and provided via event attribute config1. Hence add the mask and shift bits based on event attribute config1, to extract the threshold compare value for power10 Also add a new function called get_thresh_cmp_val to compute and return the threshold compare field for a given platform, since incase of power10, threshold compare value provided is decimal. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220610134113.62991-2-atrajeev@linux.vnet.ibm.com .../selftests/powerpc/pmu/sampling_tests/misc.c | 44 ++++++++++++++++++++++ .../selftests/powerpc/pmu/sampling_tests/misc.h | 1 + 2 files changed, 45 insertions(+) commit 3eb12bced6ab4f79af2540107c5d54d9ab392883 Author: Krzysztof Kozlowski Date: Fri Jun 24 10:10:22 2022 +0200 pinctrl: samsung: do not use bindings header with constants The Samsung SoC pin controller driver uses only three defines from the bindings header with pin configuration register values, which proves the point that this header is not a proper bindings-type abstraction layer with IDs. Define the needed register values directly in the driver and stop using the bindings header. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanho Park Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220605160508.134075-8-krzysztof.kozlowski@linaro.org Link: https://lore.kernel.org/r/20220624081022.32384-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-exynos.c | 6 ++---- drivers/pinctrl/samsung/pinctrl-exynos.h | 3 +++ drivers/pinctrl/samsung/pinctrl-samsung.c | 4 +--- drivers/pinctrl/samsung/pinctrl-samsung.h | 8 ++++++++ 4 files changed, 14 insertions(+), 7 deletions(-) commit 890005a7d98f7452cfe86dcfb2aeeb7df01132ce Author: Athira Rajeev Date: Sun May 22 19:52:56 2022 +0530 powerpc/perf: Optimize clearing the pending PMI and remove WARN_ON for PMI check in power_pmu_disable commit 2c9ac51b850d ("powerpc/perf: Fix PMU callbacks to clear pending PMI before resetting an overflown PMC") added a new function "pmi_irq_pending" in hw_irq.h. This function is to check if there is a PMI marked as pending in Paca (PACA_IRQ_PMI).This is used in power_pmu_disable in a WARN_ON. The intention here is to provide a warning if there is PMI pending, but no counter is found overflown. During some of the perf runs, below warning is hit: WARNING: CPU: 36 PID: 0 at arch/powerpc/perf/core-book3s.c:1332 power_pmu_disable+0x25c/0x2c0 Modules linked in: ----- NIP [c000000000141c3c] power_pmu_disable+0x25c/0x2c0 LR [c000000000141c8c] power_pmu_disable+0x2ac/0x2c0 Call Trace: [c000000baffcfb90] [c000000000141c8c] power_pmu_disable+0x2ac/0x2c0 (unreliable) [c000000baffcfc10] [c0000000003e2f8c] perf_pmu_disable+0x4c/0x60 [c000000baffcfc30] [c0000000003e3344] group_sched_out.part.124+0x44/0x100 [c000000baffcfc80] [c0000000003e353c] __perf_event_disable+0x13c/0x240 [c000000baffcfcd0] [c0000000003dd334] event_function+0xc4/0x140 [c000000baffcfd20] [c0000000003d855c] remote_function+0x7c/0xa0 [c000000baffcfd50] [c00000000026c394] flush_smp_call_function_queue+0xd4/0x300 [c000000baffcfde0] [c000000000065b24] smp_ipi_demux_relaxed+0xa4/0x100 [c000000baffcfe20] [c0000000000cb2b0] xive_muxed_ipi_action+0x20/0x40 [c000000baffcfe40] [c000000000207c3c] __handle_irq_event_percpu+0x8c/0x250 [c000000baffcfee0] [c000000000207e2c] handle_irq_event_percpu+0x2c/0xa0 [c000000baffcff10] [c000000000210a04] handle_percpu_irq+0x84/0xc0 [c000000baffcff40] [c000000000205f14] generic_handle_irq+0x54/0x80 [c000000baffcff60] [c000000000015740] __do_irq+0x90/0x1d0 [c000000baffcff90] [c000000000016990] __do_IRQ+0xc0/0x140 [c0000009732f3940] [c000000bafceaca8] 0xc000000bafceaca8 [c0000009732f39d0] [c000000000016b78] do_IRQ+0x168/0x1c0 [c0000009732f3a00] [c0000000000090c8] hardware_interrupt_common_virt+0x218/0x220 This means that there is no PMC overflown among the active events in the PMU, but there is a PMU pending in Paca. The function "any_pmc_overflown" checks the PMCs on active events in cpuhw->n_events. Code snippet: <<>> if (any_pmc_overflown(cpuhw)) clear_pmi_irq_pending(); else WARN_ON(pmi_irq_pending()); <<>> Here the PMC overflown is not from active event. Example: When we do perf record, default cycles and instructions will be running on PMC6 and PMC5 respectively. It could happen that overflowed event is currently not active and pending PMI is for the inactive event. Debug logs from trace_printk: <<>> any_pmc_overflown: idx is 5: pmc value is 0xd9a power_pmu_disable: PMC1: 0x0, PMC2: 0x0, PMC3: 0x0, PMC4: 0x0, PMC5: 0xd9a, PMC6: 0x80002011 <<>> Here active PMC (from idx) is PMC5 , but overflown PMC is PMC6(0x80002011). When we handle PMI interrupt for such cases, if the PMC overflown is from inactive event, it will be ignored. Reference commit: commit bc09c219b2e6 ("powerpc/perf: Fix finding overflowed PMC in interrupt") Patch addresses two changes: 1) Fix 1 : Removal of warning ( WARN_ON(pmi_irq_pending()); ) We were printing warning if no PMC is found overflown among active PMU events, but PMI pending in PACA. But this could happen in cases where PMC overflown is not in active PMC. An inactive event could have caused the overflow. Hence the warning is not needed. To know pending PMI is from an inactive event, we need to loop through all PMC's which will cause more SPR reads via mfspr and increase in context switch. Also in existing function: perf_event_interrupt, already we ignore PMI's overflown when it is from an inactive PMC. 2) Fix 2: optimization in clearing pending PMI. Currently we check for any active PMC overflown before clearing PMI pending in Paca. This is causing additional SPR read also. From point 1, we know that if PMI pending in Paca from inactive cases, that is going to be ignored during replay. Hence if there is pending PMI in Paca, just clear it irrespective of PMC overflown or not. In summary, remove the any_pmc_overflown check entirely in power_pmu_disable. ie If there is a pending PMI in Paca, clear it, since we are in pmu_disable. There could be cases where PMI is pending because of inactive PMC ( which later when replayed also will get ignored ), so WARN_ON could give false warning. Hence removing it. Fixes: 2c9ac51b850d ("powerpc/perf: Fix PMU callbacks to clear pending PMI before resetting an overflown PMC") Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220522142256.24699-1-atrajeev@linux.vnet.ibm.com arch/powerpc/perf/core-book3s.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) commit 3a5230a87c3b719bd536190b76b029c4cf2452cc Author: Deming Wang Date: Thu Jun 23 21:12:47 2022 -0400 of: Drop duplicate 'the' in of_find_last_cache_level kerneldoc Delete duplicate words of "the". Signed-off-by: Deming Wang Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220624011247.1735-1-wangdeming@inspur.com drivers/of/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cea9ed611e85d36a05db52b6457bf584b7d969e2 Author: Hangyu Hua Date: Fri Jun 24 06:04:06 2022 -0700 drm/i915: fix a possible refcount leak in intel_dp_add_mst_connector() If drm_connector_init fails, intel_connector_free will be called to take care of proper free. So it is necessary to drop the refcount of port before intel_connector_free. Fixes: 091a4f91942a ("drm/i915: Handle drm-layer errors in intel_dp_add_mst_connector") Signed-off-by: Hangyu Hua Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20220624130406.17996-1-jose.souza@intel.com Signed-off-by: José Roberto de Souza drivers/gpu/drm/i915/display/intel_dp_mst.c | 1 + 1 file changed, 1 insertion(+) commit 3650062e4281ab28a6f8c9d59606d0a6266be736 Author: Dave Stevenson Date: Mon Jun 13 16:48:00 2022 +0200 drm/vc4: hdmi: Move pixel doubling from Pixelvalve to HDMI block With the change to 2 pixels/clock, the pixel doubling in the PV results in doubling each pair of pixels, ie ABABCDCD instead of AABBCCDD. Move the pixel doubling to the HDMI block, however this means that DBLCLK modes now fall foul of requiring even values for all the horizontal timing parameters. As both 480i and 576i fail this, attempt to fix up DBLCLK modes that have odd timings values. Fixes: 8323989140f3 ("drm/vc4: hdmi: Support the BCM2711 HDMI controllers") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-34-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_crtc.c | 4 +++- drivers/gpu/drm/vc4/vc4_hdmi.c | 34 ++++++++++++++++++++++++++++------ 2 files changed, 31 insertions(+), 7 deletions(-) commit fb10dc451c0f15e3c19798a2f41d357f3f7576f5 Author: Dave Stevenson Date: Mon Jun 13 16:47:59 2022 +0200 drm/vc4: hdmi: Correct HDMI timing registers for interlaced modes For interlaced modes the timings were not being correctly programmed into the HDMI block, so correct them. Fixes: 8323989140f3 ("drm/vc4: hdmi: Support the BCM2711 HDMI controllers") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-33-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c94cd0620a922156c9ff9af9c3301b174b287677 Author: Dom Cobley Date: Mon Jun 13 16:47:58 2022 +0200 drm/vc4: hdmi: Force modeset when bpc or format changes Whenever the maximum BPC is changed, vc4_hdmi_encoder_compute_config() might pick up a different BPC or format depending on the display capabilities. That change will have a number of side effects, including the clock rates and whether the scrambling is enabled. However, only drm_crtc_state.connectors_changed will be set to true, since that properly only affects the connector. This means that while drm_atomic_crtc_needs_modeset() will return true, and thus drm_atomic_helper_commit_modeset_enables() will call our encoder atomic_enable() hook, mode_changed will be false. So crtc_set_mode() will not call our encoder .atomic_mode_set() hook. We use this hook in vc4 to set the vc4_hdmi_connector_state.output_bpc (and output_format), and will then reuse the value in .atomic_enable() to select whether or not scrambling should be enabled. However, since our clock rate is pre-computed during .atomic_check(), we end up with the clocks properly configured, but the scrambling disabled, leading to a blank screen. Let's set mode_changed to true in our HDMI driver to force the update of output_bpc, and thus prevent the issue entirely. Fixes: ba8c0faebbb0 ("drm/vc4: hdmi: Enable 10/12 bpc output") Signed-off-by: Dom Cobley Link: https://lore.kernel.org/r/20220613144800.326124-32-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 0ee5a40152b15f200ed3a0d51e8aa782ea979c6a Author: Mateusz Kwiatkowski Date: Mon Jun 13 16:47:57 2022 +0200 drm/vc4: hdmi: Fix timings for interlaced modes Increase the number of post-sync blanking lines on odd fields instead of decreasing it on even fields. This makes the total number of lines properly match the modelines. Additionally fix the value of PV_VCONTROL_ODD_DELAY, which did not take pixels_per_clock into account, causing some displays to invert the fields when driven by bcm2711. Fixes: 682e62c45406 ("drm/vc4: Fix support for interlaced modes on HDMI.") Signed-off-by: Mateusz Kwiatkowski Link: https://lore.kernel.org/r/20220613144800.326124-31-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_crtc.c | 7 ++++--- drivers/gpu/drm/vc4/vc4_hdmi.c | 12 ++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) commit 5731f7abf32281fc55a089cce255f6121b1596fb Author: Dom Cobley Date: Mon Jun 13 16:47:56 2022 +0200 drm/vc4: hdmi: Report that 3d/stereo is allowed Our HDMI controllers supports Stereo output so let's enable it. Signed-off-by: Dom Cobley Link: https://lore.kernel.org/r/20220613144800.326124-30-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi.c | 1 + 1 file changed, 1 insertion(+) commit f3f27511316bd14ebf0a3c0f76aafced59e541df Author: Dave Stevenson Date: Mon Jun 13 16:47:55 2022 +0200 drm/vc4: hdmi: Add MISC_CONTROL register for vc4 The MISC_CONTROL register allows configuration of pixel repetition for pixel doubling in the HDMI block instead of PixelValve. It was already defined for vc5, so add it for vc4. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-29-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi_regs.h | 1 + 1 file changed, 1 insertion(+) commit d5ca98701af6cc82c9ed2406cf6eca407212e8d0 Author: Dave Stevenson Date: Mon Jun 13 16:47:54 2022 +0200 drm/vc4: hdmi: Add HDMI format detection registers to register list The block can detect what the incoming image timings are for debug purposes. Add them to the list of registers understood by the driver to allow easy dumping of the values. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-28-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi_regs.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 125076c8754ee6bb7419134cf3c6b56144217685 Author: Dom Cobley Date: Mon Jun 13 16:47:53 2022 +0200 drm/vc4: hdmi: Remove VC4_HDMI_SCHEDULER_CONTROL_VERT_ALWAYS_KEEPOUT This bit ensures data island packets are never generated when disallowed by HDCP. As no Pi boards support HDCP this is providing an unnecessary restriction Signed-off-by: Dom Cobley Link: https://lore.kernel.org/r/20220613144800.326124-27-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi.c | 3 --- 1 file changed, 3 deletions(-) commit 4ae3d6c09d25a932ce812b1e092d615ab799d5dd Author: Dom Cobley Date: Mon Jun 13 16:47:52 2022 +0200 drm/vc4: hdmi: Skip writes to disabled packet RAM This path actually occurs when audio is started during a hdmi mode set. As the data will be written by vc4_hdmi_set_infoframes when packet RAM is enabled again, don't treat as an error Signed-off-by: Dom Cobley Link: https://lore.kernel.org/r/20220613144800.326124-26-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi.c | 7 ++++++- drivers/gpu/drm/vc4/vc4_hdmi.h | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) commit 05954270bd230ec31f894b34874fb0e2e534873d Author: Dom Cobley Date: Mon Jun 13 16:47:51 2022 +0200 drm/vc4: hdmi: Stop checking for enabled output in audio The current HDMI driver, in vc4_hdmi_audio_can_stream() checks whether the display output is enabled. This has been there in one form or the other since the introduction of the audio support in the VC4 HDMI driver in commit bb7d78568814 ("drm/vc4: Add HDMI audio support"), but no justification for this check is in the commit message, or in the discussions around the patches. One can only assume this was done to prevent a user from playing audio on the ALSA soundcard when the monitor doesn't support it. However, this is causing some issues. Indeed, Kodi, for example, was hitting some errors if it was streaming audio during a modeset. With the theory above, it does make sense, but the display and audio threads are typically completely different processes with no opportunity to synchronise which makes it hard to workaround. Removing that check also doesn't seem to cause any trouble, so let's just remove it. Signed-off-by: Dom Cobley Link: https://lore.kernel.org/r/20220613144800.326124-25-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi.c | 30 +++--------------------------- drivers/gpu/drm/vc4/vc4_hdmi.h | 6 ------ 2 files changed, 3 insertions(+), 33 deletions(-) commit 467e30171b5b483922b1c24c573fa50787207cb6 Author: Dave Stevenson Date: Mon Jun 13 16:47:50 2022 +0200 drm/vc4: hdmi: Move HDMI reset to pm_resume The BCM2835-37 found in the RaspberryPi 0 to 3 have a power domain attached to the HDMI block, handled in Linux through runtime_pm. That power domain is shared with the VEC block, so even if we put our runtime_pm reference in the HDMI driver it would keep being on. If the VEC is disabled though, the power domain would be disabled and we would lose any initialization done in our bind implementation. That initialization involves calling the reset function and initializing the CEC registers. Let's move the initialization to our runtime_resume implementation so that we initialize everything properly if we ever need to. Fixes: c86b41214362 ("drm/vc4: hdmi: Move the HSM clock enable to runtime_pm") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-24-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi.c | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) commit fcef97e70094a33ded73b3eb9bef06698c6e9c12 Author: Dave Stevenson Date: Mon Jun 13 16:47:49 2022 +0200 drm/vc4: hdmi: Switch to pm_runtime_status_suspended If the controller isn't clocked or its domain powered up, the register accesses will either stall the CPU or return garbage, respectively. Thus, we had a warning in our register access function to complain when that kind of risky accesses were performed. In order to check the runtime_pm power state, we were using pm_runtime_active(), but it turns out that it will become active only once the runtime_resume hook has been executed. This prevents us from doing any WARN-free register access in our runtime_resume() implementation, while this is valid. Let's switch to pm_runtime_status_suspended() instead. Fixes: 14e193b95604 ("drm/vc4: hdmi: Warn if we access the controller while disabled") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-23-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi_regs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 35dc00c12a72700a9c4592afee7d136ecb280cbd Author: Dave Stevenson Date: Mon Jun 13 16:47:48 2022 +0200 drm/vc4: hdmi: Reset HDMI MISC_CONTROL register The HDMI block can repeat pixels for double clocked modes, and the firmware is now configuring the block to do this as the PV is doing it incorrectly when at 2pixels/clock. If the kernel doesn't reset it then we end up with strange modes. Reset MISC_CONTROL. Fixes: 8323989140f3 ("drm/vc4: hdmi: Support the BCM2711 HDMI controllers") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-22-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi.c | 8 ++++++++ drivers/gpu/drm/vc4/vc4_hdmi_regs.h | 3 +++ 2 files changed, 11 insertions(+) commit 1c594eeccf92368177c2e22f1d3ee4933dfb8567 Author: Dom Cobley Date: Mon Jun 13 16:47:47 2022 +0200 drm/vc4: hdmi: Avoid full hdmi audio fifo writes We are getting occasional VC4_HD_MAI_CTL_ERRORF in HDMI_MAI_CTL which seem to correspond with audio dropouts. Reduce the threshold where we deassert DREQ to avoid the fifo overfilling Fixes: bb7d78568814 ("drm/vc4: Add HDMI audio support") Signed-off-by: Dom Cobley Link: https://lore.kernel.org/r/20220613144800.326124-21-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b6079d1578dc4b4b8050d613a5449a63def7d1dd Author: Dom Cobley Date: Mon Jun 13 16:47:46 2022 +0200 drm/vc4: hdmi: Clear unused infoframe packet RAM registers Using a hdmi analyser the bytes in packet ram registers beyond the length were visible in the infoframes and it flagged the checksum as invalid. Zeroing unused words of packet RAM avoids this Fixes: 21317b3fba54 ("drm/vc4: Set up the AVI and SPD infoframes.") Signed-off-by: Dom Cobley Link: https://lore.kernel.org/r/20220613144800.326124-20-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 25eb441d55d479581a65bcc9de88bc1d86bf76c1 Author: Dave Stevenson Date: Mon Jun 13 16:47:45 2022 +0200 drm/vc4: hdmi: Add all the vc5 HDMI registers into the debugfs dumps The vc5 HDMI registers hadn't been added into the debugfs register sets, therefore weren't dumped on request. Add them in. Fixes: 8323989140f3 ("drm/vc4: hdmi: Support the BCM2711 HDMI controllers") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-19-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi.c | 39 +++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/vc4/vc4_hdmi.h | 8 ++++++++ 2 files changed, 47 insertions(+) commit db2b927f8668adf3ac765e0921cd2720f5c04172 Author: Phil Elwell Date: Mon Jun 13 16:47:44 2022 +0200 drm/vc4: hdmi: Disable audio if dmas property is present but empty The dmas property is used to hold the dmaengine channel used for audio output. Older device trees were missing that property, so if it's not there we disable the audio output entirely. However, some overlays have set an empty value to that property, mostly to workaround the fact that overlays cannot remove a property. Let's add a test for that case and if it's empty, let's disable it as well. Cc: Signed-off-by: Phil Elwell Link: https://lore.kernel.org/r/20220613144800.326124-18-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7bcb9c8d0bc9f3cab8ac2634b056c2e6b63945ca Author: Dave Stevenson Date: Mon Jun 13 16:47:43 2022 +0200 drm/vc4: dsi: Add correct stop condition to vc4_dsi_encoder_disable iteration vc4_dsi_encoder_disable is partially an open coded version of drm_bridge_chain_disable, but it missed a termination condition in the loop for ->disable which meant that no post_disable calls were made. Add in the termination clause. Fixes: 033bfe7538a1 ("drm/vc4: dsi: Fix bridge chain handling") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-17-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_dsi.c | 3 +++ 1 file changed, 3 insertions(+) commit bc5b815e06f90cccdb6461aba1e49fdc2f3c8cd1 Author: Dave Stevenson Date: Mon Jun 13 16:47:42 2022 +0200 drm/vc4: dsi: Fix dsi0 interrupt support DSI0 seemingly had very little or no testing as a load of the register mappings were incorrect/missing, so host transfers always timed out due to enabling/checking incorrect bits in the interrupt enable and status registers. Fixes: 4078f5757144 ("drm/vc4: Add DSI driver") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-16-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_dsi.c | 111 ++++++++++++++++++++++++++++++++---------- 1 file changed, 85 insertions(+), 26 deletions(-) commit 4d9273c978d4c1af15d7874c10c732ec83d444d0 Author: Dave Stevenson Date: Mon Jun 13 16:47:41 2022 +0200 drm/vc4: dsi: Register dsi0 as the correct vc4 encoder type vc4_dsi was registering both dsi0 and dsi1 as VC4_ENCODER_TYPE_DSI1 which seemed to work OK for a single DSI display, but fails if there are two DSI displays connected. Update to register the correct type. Fixes: 4078f5757144 ("drm/vc4: Add DSI driver") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-15-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit edfe84ae0df16be1251b5a8e840d95f1f3827500 Author: Dave Stevenson Date: Mon Jun 13 16:47:40 2022 +0200 drm/vc4: dsi: Correct pixel order for DSI0 For slightly unknown reasons, dsi0 takes a different pixel format to dsi1, and that has to be set in the pixel valve. Amend the setup accordingly. Fixes: a86773d120d7 ("drm/vc4: Add support for feeding DSI encoders from the pixel valve.") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-14-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_crtc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3b45eee87da171caa28f61240ddb5c21170cda53 Author: Dave Stevenson Date: Mon Jun 13 16:47:39 2022 +0200 drm/vc4: dsi: Correct DSI divider calculations The divider calculations tried to find the divider just faster than the clock requested. However if it required a divider of 7 then the for loop aborted without handling the "error" case, and could end up with a clock lower than requested. The integer divider from parent PLL to DSI clock is also capable of going up to /255, not just /7 that the driver was trying. This allows for slower link frequencies on the DSI bus where the resolution permits. Correct the loop so that we always have a clock greater than requested, and covering the whole range of dividers. Fixes: 86c1b9eff3f2 ("drm/vc4: Adjust modes in DSI to work around the integer PLL divider.") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-13-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_dsi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 89c4bbe2a01ea401c2b0fabc104720809084b77f Author: Dave Stevenson Date: Mon Jun 13 16:47:38 2022 +0200 drm/vc4: dsi: Release workaround buffer and DMA On Pi0-3 the driver allocates a buffer and requests a DMA channel because the ARM can't write to DSI1's registers directly. However, we never release that buffer or channel. Let's add a device-managed action to release each. Fixes: 4078f5757144 ("drm/vc4: Add DSI driver") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-12-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_dsi.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit 7a70b0b97889a89f397913c971cadfc6db9b310a Author: Dave Stevenson Date: Mon Jun 13 16:47:37 2022 +0200 drm/vc4: dpi: Ensure a default format is selected In a couple of error/incomplete configuration cases, the DPI_FORMAT bits wouldn't get set. Enforce our RGB888 default in all these cases. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-11-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_dpi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3c2707632146b22e97b0fbf6778bab8add2eaa1d Author: Dave Stevenson Date: Mon Jun 13 16:47:36 2022 +0200 drm/vc4: dpi: Add option for inverting pixel clock and output enable DRM provides flags for inverting pixel clock and output enable signals, but these were not mapped to the relevant registers. Add those mappings. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-10-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_dpi.c | 66 +++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 28 deletions(-) commit 7fea3c23c87321b56430c4e52b025a698cde6ec7 Author: Dave Stevenson Date: Mon Jun 13 16:47:35 2022 +0200 drm/vc4: dpi: Add support for composite syncs to vc4_dpi The hardware can combine H&V syncs onto the output enable line as composite syncs, so add the relevant configuration to do that. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-9-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_dpi.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit c6dac00340fcd20b076cd2c3413610d1d7ade7bd Author: Dave Stevenson Date: Mon Jun 13 16:47:34 2022 +0200 drm/vc4: hvs: Add debugfs node that dumps the current display lists This allows easy analysis of display lists when debugging. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-8-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hvs.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit a1aaefbacc2385a041823dcaf7bbcd7a73d2aa2f Author: Dave Stevenson Date: Mon Jun 13 16:47:33 2022 +0200 drm/vc4: plane: Add alpha_blend_mode property to each plane. Move from only supporting the default of pre-multiplied alpha to supporting user specified blend mode using the standardised property. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-7-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_plane.c | 62 ++++++++++++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 13 deletions(-) commit b7c3d6821627861f4ea3e1f2b595d0ed9e80aac8 Author: Dave Stevenson Date: Mon Jun 13 16:47:32 2022 +0200 drm/vc4: plane: Fix margin calculations for the right/bottom edges The current plane margin calculation code clips the right and bottom edges of the range based using the left and top margins. This is obviously wrong, so let's fix it. Fixes: 666e73587f90 ("drm/vc4: Take margin setup into account when updating planes") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-6-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_plane.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 517db1ab1566dba3093dbdb8de4263ba4aa66416 Author: Dom Cobley Date: Mon Jun 13 16:47:31 2022 +0200 drm/vc4: plane: Remove subpixel positioning check There is little harm in ignoring fractional coordinates (they just get truncated). Without this: modetest -M vc4 -F tiles,gradient -s 32:1920x1080-60 -P89@74:1920x1080*.1.1@XR24 is rejected. We have the same issue in Kodi when trying to use zoom options on video. Note: even if all coordinates are fully integer. e.g. src:[0,0,1920,1080] dest:[-10,-10,1940,1100] it will still get rejected as drm_atomic_helper_check_plane_state uses drm_rect_clip_scaled which transforms this to fractional src coords Fixes: 21af94cf1a4c ("drm/vc4: Add support for scaling of display planes.") Signed-off-by: Dom Cobley Link: https://lore.kernel.org/r/20220613144800.326124-5-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_plane.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 1701a23a4ef0993964ccc2f2d5d13f83a5ff4c70 Author: Maxime Ripard Date: Mon Jun 13 16:47:30 2022 +0200 drm/vc4: kms: Use maximum FIFO load for the HVS clock rate The core clock computation takes into account both the load due to the input (ie, planes) and its output (ie, encoders). However, while the input load needs to consider all the planes, and thus sum all of their associated loads, the output happens mostly in parallel. Therefore, we need to consider only the maximum of all the output loads, and not the sum like we were doing. This resulted in a clock rate way too high which could be discarded for being too high by the clock framework. Since recent changes, the clock framework will even downright reject it, leading to a core clock being too low for its current needs. Fixes: 16e101051f32 ("drm/vc4: Increase the core clock based on HVS load") Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-4-maxime@cerno.tech drivers/gpu/drm/vc4/vc4_kms.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7d0648c8773cd16fe16eaa3b4aee04093a6bd085 Author: Maxime Ripard Date: Mon Jun 13 16:47:29 2022 +0200 drm/vc4: kms: Warn if clk_set_min_rate fails We currently ignore the clk_set_min_rate return code assuming it would succeed. However, it can fail if we ask for a rate higher than the current maximum for example. Since we can't fail in atomic_commit, at least warn on failure. Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-3-maxime@cerno.tech drivers/gpu/drm/vc4/vc4_kms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit da8e393e23efb60eba8959856c7df88f9859f6eb Author: Dave Stevenson Date: Mon Jun 13 16:47:28 2022 +0200 drm/vc4: drv: Adopt the dma configuration from the HVS or V3D component vc4_drv isn't necessarily under the /soc node in DT as it is a virtual device, but it is the one that does the allocations. The DMA addresses are consumed by primarily the HVS or V3D, and those require VideoCore cache alias address mapping, and so will be under /soc. During probe find the a suitable device node for HVS or V3D, and adopt the DMA configuration of that node. Cc: Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-2-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_drv.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 8b9ab62662048a3274361c7e5f64037c2c133e2c Author: Christoph Hellwig Date: Sun Jun 19 08:05:52 2022 +0200 block: remove blk_cleanup_disk blk_cleanup_disk is nothing but a trivial wrapper for put_disk now, so remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20220619060552.1850436-7-hch@lst.de Signed-off-by: Jens Axboe arch/m68k/emu/nfblock.c | 4 ++-- arch/um/drivers/ubd_kern.c | 4 ++-- arch/xtensa/platforms/iss/simdisk.c | 4 ++-- block/genhd.c | 15 --------------- drivers/block/amiflop.c | 2 +- drivers/block/aoe/aoeblk.c | 2 +- drivers/block/aoe/aoedev.c | 2 +- drivers/block/ataflop.c | 4 ++-- drivers/block/brd.c | 4 ++-- drivers/block/drbd/drbd_main.c | 4 ++-- drivers/block/floppy.c | 6 +++--- drivers/block/loop.c | 2 +- drivers/block/mtip32xx/mtip32xx.c | 2 +- drivers/block/n64cart.c | 2 +- drivers/block/nbd.c | 4 ++-- drivers/block/null_blk/main.c | 4 ++-- drivers/block/paride/pcd.c | 4 ++-- drivers/block/paride/pd.c | 4 ++-- drivers/block/paride/pf.c | 4 ++-- drivers/block/pktcdvd.c | 4 ++-- drivers/block/ps3disk.c | 4 ++-- drivers/block/ps3vram.c | 4 ++-- drivers/block/rbd.c | 2 +- drivers/block/rnbd/rnbd-clt.c | 4 ++-- drivers/block/sunvdc.c | 4 ++-- drivers/block/swim.c | 2 +- drivers/block/swim3.c | 2 +- drivers/block/sx8.c | 2 +- drivers/block/virtio_blk.c | 2 +- drivers/block/xen-blkfront.c | 4 ++-- drivers/block/z2ram.c | 2 +- drivers/block/zram/zram_drv.c | 4 ++-- drivers/cdrom/gdrom.c | 2 +- drivers/md/bcache/super.c | 2 +- drivers/md/dm.c | 2 +- drivers/md/md.c | 4 ++-- drivers/memstick/core/ms_block.c | 2 +- drivers/memstick/core/mspro_block.c | 2 +- drivers/mtd/mtd_blkdevs.c | 4 ++-- drivers/mtd/ubi/block.c | 4 ++-- drivers/nvdimm/btt.c | 4 ++-- drivers/nvdimm/pmem.c | 4 ++-- drivers/nvme/host/core.c | 2 +- drivers/nvme/host/multipath.c | 2 +- drivers/s390/block/dcssblk.c | 8 ++++---- drivers/s390/block/scm_blk.c | 4 ++-- include/linux/blkdev.h | 1 - 47 files changed, 74 insertions(+), 90 deletions(-) commit d521bc0a0f7cdd56b646e6283d5f7296eb16793d Merge: 778964f2fdf0 fe94df6dc622 Author: Paolo Abeni Date: Tue Jun 28 14:31:43 2022 +0200 Merge branch 'mlxsw-unified-bridge-conversion-part-4-6' Ido Schimmel says: ==================== mlxsw: Unified bridge conversion - part 4/6 This is the fourth part of the conversion of mlxsw to the unified bridge model. Unlike previous parts that prepared mlxsw for the conversion, this part actually starts the conversion. It focuses on flooding configuration and converts mlxsw to the more "raw" APIs of the unified bridge model. The patches configure the different stages of the flooding pipeline in Spectrum that looks as follows (at a high-level): +------------+ +----------+ +-------+ {FID, | | {Packet type, | | | | MID DMAC} | FDB lookup | Bridge type} | SFGC | MID base | | Index +--------> (miss) +----------------> register +-----------> Adder +-------> | | | | | | | | | | | | +------------+ +----+-----+ +---^---+ | | Table | | type | | Offset | +-------+ | | | | | | | | | +----->+ Mux +------+ | | | | +-^---^-+ | | FID| |FID | |offset + + The multicast identifier (MID) index is used as an index to the port group table (PGT) that contains a bitmap of ports via which a packet needs to be replicated. From the PGT table, the packet continues to the multicast port egress (MPE) table that determines the packet's egress VLAN. This is a two-dimensional table that is indexed by port and switch multicast port to egress (SMPE) index. The latter can be thought of as a FID. Without it, all the packets replicated via a certain port would get the same VLAN, regardless of the bridge domain (FID). Logically, these two steps look as follows: PGT table MPE table +-----------------------+ +---------------+ | | {Local port, | | Egress MID index | Local ports bitmap #1 | SMPE index} | | VID +------------> ... +---------------> +--------> | Local ports bitmap #N | | | | | SMPE | | +-----------------------+ +---------------+ Local port Patchset overview: Patch #1 adds a variable to guard against mixed model configuration. Will be removed in part 6 when mlxsw is fully converted to the unified model. Patches #2-#5 introduce two new FID attributes required for flooding configuration in the new model: 1. 'flood_rsp': Instructs the firmware to handle flooding configuration for this FID. Only set for router FIDs (rFIDs) which are used to connect a {Port, VLAN} to the router block. 2. 'bridge_type': Allows the device to determine the flood table (i.e., base index to the PGT table) for the FID. The first type will be used for FIDs in a VLAN-aware bridge and the second for FIDs representing VLAN-unaware bridges. Patch #6 configures the MPE table that determines the egress VLAN of a packet that is forwarded according to L2 multicast / flood. Patches #7-#11 add the PGT table and related APIs to allocate entries and set / clear ports in them. Patches #12-#13 convert the flooding configuration to use the new PGT APIs. ==================== Link: https://lore.kernel.org/r/20220627070621.648499-1-idosch@nvidia.com Signed-off-by: Paolo Abeni commit fe94df6dc6225e034cca71a917c2fa3302e7b2c8 Author: Amit Cohen Date: Mon Jun 27 10:06:21 2022 +0300 mlxsw: spectrum_fid: Configure flooding entries using PGT APIs The PGT (Port Group Table) table maps an index to a bitmap of local ports to which a packet needs to be replicated. This table is used for layer 2 multicast and flooding. In the legacy model, software did not interact with PGT table directly. Instead, it was accessed by firmware in response to registers such as SFTR and SMID. In the new model, the SFTR register is deprecated and software has full control over the PGT table using the SMID register. Use the new PGT APIs to allocate entries for flooding as part of flood tables initialization. Add mlxsw_sp_fid_flood_tables_fini() to free the allocated indexes. In addition, use PGT APIs to add/remove ports from PGT table. The existing code which configures the flood entries via SFTR2 will be removed later. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 65 ++++++++++++++++++++-- 1 file changed, 59 insertions(+), 6 deletions(-) commit 9f6f467a3cdb1cfcca570af0c8901479b090cb35 Author: Amit Cohen Date: Mon Jun 27 10:06:20 2022 +0300 mlxsw: spectrum_fid: Set 'mid_base' as part of flood tables initialization The PGT (Port Group Table) table maps an index to a bitmap of local ports to which a packet needs to be replicated. This table is used for layer 2 multicast and flooding. The index to PGT table which is called 'mid_index', is a result of 'mid_base' + 'fid_offset'. Using the legacy bridge model, firmware configures 'mid_base'. However, using the new model, software is responsible to configure it via SFGC register. The first 15K entries will be used for flooding and the rest for multicast. The table will look as follows: +----------------------------+ | | | 802.1q, unicast flooding | 4K entries | | +----------------------------+ | | | 802.1q, multicast flooding | 4K entries | | +----------------------------+ | | | 802.1q, broadcast flooding | 4K entries | | +----------------------------+ | 802.1d, unicast flooding | 1K entries +----------------------------+ | 802.1d, multicast flooding | 1K entries +----------------------------+ | 802.1d, broadcast flooding | 1K entries +----------------------------+ | | | | | Multicast entries | The rest of the table | | | | +----------------------------+ Add 'pgt_base' to 'struct mlxsw_sp_fid_family' and use it to calculate MID base, set 'SFGC.mid_base' as part of flood tables initialization. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlxsw/reg.h | 3 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 33 ++++++++++++++++++++-- 2 files changed, 32 insertions(+), 4 deletions(-) commit bb1bba35f50a4cae858ff4891f4c6698cf5b50b0 Author: Amit Cohen Date: Mon Jun 27 10:06:19 2022 +0300 mlxsw: spectrum: Initialize PGT table Initialize PGT table as part of mlxsw_sp_init(). This table will be used first in the next patch by FID code to set flooding entries, and later by MDB code to add multicast entries. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit a3a7992bc4e42633c34ab6a7623fd502e76146ed Author: Amit Cohen Date: Mon Jun 27 10:06:18 2022 +0300 mlxsw: Extend PGT APIs to support maintaining list of ports per entry Add an API to associate a PGT entry with SMPE index and add or remove a port. This API will be used by FID code and MDB code, to add/remove port from specific PGT entry. When the first port is added to PGT entry, allocate the entry in the given MID index, when the last port is removed from PGT entry, free it. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 + drivers/net/ethernet/mellanox/mlxsw/spectrum_pgt.c | 229 +++++++++++++++++++++ 2 files changed, 231 insertions(+) commit d7a7b69787091b7ed78399dc40e8c6c9759b9b90 Author: Amit Cohen Date: Mon Jun 27 10:06:17 2022 +0300 mlxsw: Add a dedicated structure for bitmap of ports Currently when bitmap of ports is needed, 'unsigned long *' type is used. The functions which use the bitmap assume its length according to its name, i.e., each function which gets a bitmap of ports queries the maximum number of ports and uses it as the size. As preparation for the next patch which will use bitmap of ports, add a dedicated structure for it. Refactor the existing code to use the new structure. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 25 +++++++++++++++ .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 37 +++++++++++----------- 2 files changed, 43 insertions(+), 19 deletions(-) commit a1697d11c945d7c3d46e22fca02299c9cb4b465f Author: Amit Cohen Date: Mon Jun 27 10:06:16 2022 +0300 mlxsw: Add an indication of SMPE index validity for PGT table In Spectrum-1, the index into the MPE table - called switch multicast to port egress VID (SMPE) - is derived from the PGT entry, whereas in Spectrum-2 and later ASICs it is derived from the FID. Therefore, in Spectrum-1, the SMPE index needs to be programmed as part of the PGT entry via SMID register, while it is reserved for Spectrum-2 and later ASICs. Add 'pgt_smpe_index_valid' boolean as part of 'struct mlxsw_sp' and set it to true for Spectrum-1 and to false for the later ASICs. Add 'smpe_index_valid' as part of 'struct mlxsw_sp_pgt' and set it according to the value in 'struct mlxsw_sp' as part of PGT initialization. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_pgt.c | 2 ++ 3 files changed, 7 insertions(+) commit d8782ec59eb882b3be432a9a5288e81d4efe79dd Author: Amit Cohen Date: Mon Jun 27 10:06:15 2022 +0300 mlxsw: Add an initial PGT table support The PGT (Port Group Table) table maps an index to a bitmap of local ports to which a packet needs to be replicated. This table is used for layer 2 multicast and flooding. In the legacy model, software did not interact with this table directly. Instead, it was accessed by firmware in response to registers such as SFTR and SMID. In the new model, the SFTR register is deprecated and software has full control over the PGT table using the SMID register. The entire state of the PGT table needs to be maintained in software because member ports in a PGT entry needs to be reference counted to avoid releasing entries which are still in use. Add the following APIs: 1. mlxsw_sp_pgt_{init, fini}() - allocate/free the PGT table. 2. mlxsw_sp_pgt_mid_alloc_range() - allocate a range of MID indexes in PGT. To be used by FID code during initialization to reserve specific PGT indexes for flooding entries. 3. mlxsw_sp_pgt_mid_free_range() - free indexes in a given range. 4. mlxsw_sp_pgt_mid_alloc() - allocate one MID index in the PGT at a non-specific range, just search for free index. To be used by MDB code. 5. mlxsw_sp_pgt_mid_free() - free the given index. Note that alloc() functions do not allocate the entries in software, just allocate IDs using 'idr'. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlxsw/Makefile | 3 +- drivers/net/ethernet/mellanox/mlxsw/resources.h | 2 + drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 12 +++ drivers/net/ethernet/mellanox/mlxsw/spectrum_pgt.c | 120 +++++++++++++++++++++ 4 files changed, 136 insertions(+), 1 deletion(-) commit 8c2da081c8b88216977a3305ce44351475d204ac Author: Amit Cohen Date: Mon Jun 27 10:06:14 2022 +0300 mlxsw: spectrum_fid: Configure egress VID classification for multicast The device includes two main tables to support layer 2 multicast (i.e., MDB and flooding). These are the PGT (Port Group Table) table and the MPE (Multicast Port Egress) table. - PGT is {MID -> (bitmap of local_port, SPME index)} - MPE is {(Local port, SMPE index) -> eVID} In the legacy model, software did not interact with MPE table as it was completely hidden in firmware. In the new model, software needs to populate the table itself in order to map from {Local port, SMPE} to an egress VID. This is done using the SMPE register. Configure SMPE register when a {Local port, VID} are mapped/unmapped to a 802.1d and 802.1q emulated FIDs. The MPE table is not relevant for rFIDs as firmware handles their flooding. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit aa845e36a069a4cb7a7314d629bc415456e2df0a Author: Amit Cohen Date: Mon Jun 27 10:06:13 2022 +0300 mlxsw: Set flood bridge type for FIDs In the unified bridge model, the bridge type FID attribute is no longer configured by the firmware, but instead by software when creating and editing a FID via SFMR register. Set this field as part of FID creation and edition flow. Default to 0 (reserved) as long as the driver operates in the legacy bridge model. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlxsw/reg.h | 4 +++- drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 15 +++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) commit dd8c77d597086cb4aa4d5d0f9f61f98c491bb122 Author: Amit Cohen Date: Mon Jun 27 10:06:12 2022 +0300 mlxsw: spectrum_fid: Store 'bridge_type' as part of FID family Currently, 'bridge_type' is an attribute of 'struct mlxsw_sp_flood_table', which is defined per FID family. Instead, it can be an attribute of 'struct mlxsw_sp_fid_family' as all flood tables in the same family are of the same type. This change will ease the configuration of 'SFMR.flood_bridge_type' which will be added in the next patch. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit fad8e1b6d52de875a63a64c465be7349958bb561 Author: Amit Cohen Date: Mon Jun 27 10:06:11 2022 +0300 mlxsw: Prepare 'bridge_type' field for SFMR usage Under the legacy bridge model, the field 'bridge_type' is used only in SFGC register, to determine the type of flood table (FID/FID offset). Under the unified bridge model, it will be used also in SFMR register. When a BUM packet needs to be flooded, SFGC is used to provide the 'mid_base' for PGT table. The access to SFGC is by {packet type, bridge type}. Under the unified bridge model, software is responsible for configuring 'bridge_type' as part of SFMR. As preparation for the new required configuration, rename 'enum mlxsw_reg_sfgc_bridge_type' to 'enum mlxsw_reg_bridge_type'. Then it can be used also in SFMR. In addition, align the names of the values to internal documentation. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlxsw/reg.h | 9 +++++---- drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) commit 93303ff828fd435afef3bf1991defb3e4ae26464 Author: Amit Cohen Date: Mon Jun 27 10:06:10 2022 +0300 mlxsw: spectrum_fid: Configure flooding table type for rFID Using unified bridge model, RITR register no longer configures the rFID used for sub-port RIFs. It needs to be created by software via SFMR. Such FIDs need to be created with a special flood indication using 'SFMR.flood_rsp=1'. It means that for such FIDs, router sub-port flooding table will be used, this table is configured by firmware. Set the above mentioned field as part of FID initialization and FID edition, so then when other fields will be updated in SFMR, this field will store the correct value and will not be overwritten. Add 'flood_rsp' variable to 'struct mlxsw_sp_fid_family', set it to true for rFID and to false for the rest. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlxsw/reg.h | 3 ++- drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) commit d6d9026668db8fd9f86b6121e9a7e147539ffaa2 Author: Amit Cohen Date: Mon Jun 27 10:06:09 2022 +0300 mlxsw: spectrum: Add a temporary variable to indicate bridge model As part of transition to unified bridge model, many different firmware configurations are done. Some of the configuration that needs to be done for the unified bridge model is not valid under the legacy model, and would be rejected by the firmware. At the same time, the driver cannot switch to the unified bridge model until all of the code has been converted. To allow breaking the change into patches, and to not break driver behavior during the transition, add a boolean variable to indicate bridge model. Then, forbidden configurations will be skipped using the check - "if (!mlxsw_sp->ubridge)". The new variable is temporary for several sets, it will be removed when firmware will be configured to work with unified bridge model. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + 2 files changed, 2 insertions(+) commit 6f8191fdf41d3a53cc1d63fe2234e812c55a0092 Author: Christoph Hellwig Date: Sun Jun 19 08:05:51 2022 +0200 block: simplify disk shutdown Set the queue dying flag and call blk_mq_exit_queue from del_gendisk for all disks that do not have separately allocated queues, and thus remove the need to call blk_cleanup_queue for them. Rename blk_cleanup_disk to blk_mq_destroy_queue to make it clear that this function is intended only for separately allocated blk-mq queues. This saves an extra queue freeze for devices without a separately allocated queue. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20220619060552.1850436-6-hch@lst.de Signed-off-by: Jens Axboe block/blk-core.c | 37 ------------------------------- block/blk-mq.c | 43 +++++++++++++++++++++++++++++++++++-- block/blk-sysfs.c | 5 ----- block/blk.h | 3 +++ block/bsg-lib.c | 4 ++-- block/genhd.c | 23 +++++++++++--------- drivers/block/ataflop.c | 1 - drivers/block/loop.c | 1 - drivers/block/mtip32xx/mtip32xx.c | 2 -- drivers/block/rnbd/rnbd-clt.c | 2 +- drivers/block/sx8.c | 4 ++-- drivers/block/virtio_blk.c | 1 - drivers/block/z2ram.c | 1 - drivers/cdrom/gdrom.c | 1 - drivers/memstick/core/ms_block.c | 1 - drivers/memstick/core/mspro_block.c | 1 - drivers/mmc/core/block.c | 1 - drivers/mmc/core/queue.c | 1 - drivers/nvme/host/apple.c | 2 +- drivers/nvme/host/core.c | 1 - drivers/nvme/host/fc.c | 12 +++++------ drivers/nvme/host/pci.c | 2 +- drivers/nvme/host/rdma.c | 12 +++++------ drivers/nvme/host/tcp.c | 12 +++++------ drivers/nvme/target/loop.c | 12 +++++------ drivers/s390/block/dasd.c | 2 +- drivers/s390/block/dasd_genhd.c | 4 ++-- drivers/scsi/scsi_lib.c | 6 +++--- drivers/scsi/scsi_sysfs.c | 2 +- drivers/scsi/sd.c | 4 ++-- drivers/scsi/sr.c | 4 ++-- drivers/ufs/core/ufshcd.c | 4 ++-- include/linux/blk-mq.h | 3 +++ include/linux/blkdev.h | 4 +--- 34 files changed, 105 insertions(+), 113 deletions(-) commit 0e3534022f26ae51f7cf28347a253230604b6f4e Author: Christoph Hellwig Date: Sun Jun 19 08:05:50 2022 +0200 block: stop setting the nomerges flags in blk_cleanup_queue These flags only apply to file system I/O, and all file system I/O is already drained by del_gendisk and thus can't be in progress when blk_cleanup_queue is called. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20220619060552.1850436-5-hch@lst.de Signed-off-by: Jens Axboe block/blk-core.c | 3 --- 1 file changed, 3 deletions(-) commit 1f90307e5f0d7bc9a336ead528f616a5df8e5944 Author: Christoph Hellwig Date: Sun Jun 19 08:05:49 2022 +0200 block: remove QUEUE_FLAG_DEAD Disallow setting the blk-mq state on any queue that is already dying as setting the state even then is a bad idea, and remove the now unused QUEUE_FLAG_DEAD flag. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20220619060552.1850436-4-hch@lst.de Signed-off-by: Jens Axboe block/blk-core.c | 3 --- block/blk-mq-debugfs.c | 8 +++----- include/linux/blkdev.h | 2 -- 3 files changed, 3 insertions(+), 10 deletions(-) commit e8b58ef09e84c15cf782b01cfc73cc5b1180d519 Author: Christoph Hellwig Date: Sun Jun 19 08:05:48 2022 +0200 mtip32xx: fix device removal Use the proper helper to mark a surpise removal, remove the gendisk as soon as possible when removing the device and implement the ->free_disk callback to ensure the private data is alive as long as the gendisk has references. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20220619060552.1850436-3-hch@lst.de Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 157 +++++++++++--------------------------- drivers/block/mtip32xx/mtip32xx.h | 1 - 2 files changed, 44 insertions(+), 114 deletions(-) commit ec5263f422a3364442e0db2d9c2866d9154cbcc4 Author: Christoph Hellwig Date: Sun Jun 19 08:05:47 2022 +0200 mtip32xx: remove the device_status debugfs file This file is a huge mess that iterates over all devices and is in the way of fixing the device removal in this driver, so remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20220619060552.1850436-2-hch@lst.de Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 141 +------------------------------------- drivers/block/mtip32xx/mtip32xx.h | 4 -- 2 files changed, 1 insertion(+), 144 deletions(-) commit d1e7bb90f0d453943d49db2f671e9d61c7d13466 Author: Xiang wangx Date: Sat Jun 18 21:08:54 2022 +0800 pinctrl: aspeed: Fix typo in comment Delete the redundant word 'and'. Signed-off-by: Xiang wangx Reviewed-by: Paul Menzel Link: https://lore.kernel.org/r/20220618130854.12321-1-wangxiang@cdjrlc.com Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinmux-aspeed.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a2ef688b1b03eea3a5b020d9bef50d015f619be Author: Bryan O'Donoghue Date: Tue Jun 28 13:04:34 2022 +0100 ASoC: qcom: lpass: Fix apq8016 compat string to match yaml The documented yaml compat string for the apq8016 is "qcom,apq8016-lpass-cpu" not "qcom,lpass-cpu-apq8016". Looking at the other lpass compat strings the general form is "qcom,socnum-lpass-cpu". We need to fix both the driver and dts to match. Reviewed-by: Srinivas Kandagatla Reviewed-by: Bjorn Andersson Signed-off-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20220628120435.3044939-2-bryan.odonoghue@linaro.org Signed-off-by: Mark Brown sound/soc/qcom/lpass-apq8016.c | 1 + sound/soc/qcom/lpass-cpu.c | 5 +++++ 2 files changed, 6 insertions(+) commit 0e584d46218e3b9dc12a98e18e81a0cd3e0d5419 Author: Mauro Carvalho Chehab Date: Tue Jun 28 10:46:22 2022 +0100 regulator: fix a kernel-doc warning document n_ramp_values field at struct regulator_desc, in order to solve this warning: include/linux/regulator/driver.h:434: warning: Function parameter or member 'n_ramp_values' not described in 'regulator_desc' Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/15efc16e878aa327aa2769023bcdf959a795f41d.1656409369.git.mchehab@kernel.org Signed-off-by: Mark Brown include/linux/regulator/driver.h | 1 + 1 file changed, 1 insertion(+) commit 882d90310f04f3f90753653b8787fb4d309fbbdf Author: Imre Deak Date: Thu Jun 23 17:49:55 2022 +0300 drm/fourcc: Document the Intel CCS modifiers' CC plane expected pitch The driver expects the pitch of the Intel CCS CC color planes to be 64 bytes aligned, adjust the modifier descriptions accordingly. Cc: Nanley Chery Signed-off-by: Imre Deak Reviewed-by: Nanley Chery Reviewed-by: Jordan Justen Link: https://patchwork.freedesktop.org/patch/msgid/20220623144955.2486736-1-imre.deak@intel.com include/uapi/drm/drm_fourcc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 71f5e7b3b2adb6f04802cbf1f3156c7527708247 Author: Aidan MacDonald Date: Wed Jun 22 19:50:10 2022 +0100 pinctrl: ingenic: Convert to immutable irq chip Update the driver to use an immutable IRQ chip to fix this warning: "not an immutable chip, please consider fixing it!" Preserve per-chip labels by adding an ->irq_print_chip() callback. Acked-by: Marc Zyngier Reviewed-by: Paul Cercueil Reviewed-by: Andy Shevchenko Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20220622185010.2022515-3-aidanmacdonald.0x0@gmail.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-ingenic.c | 41 ++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 14 deletions(-) commit 4c76a7fc8681c3c5d7465918bcda9534107a04f2 Author: Aidan MacDonald Date: Wed Jun 22 19:50:09 2022 +0100 pinctrl: ingenic: Use irqd_to_hwirq() Instead of accessing ->hwirq directly, use irqd_to_hwirq(). Suggested-by: Andy Shevchenko Acked-by: Marc Zyngier Reviewed-by: Paul Cercueil Reviewed-by: Andy Shevchenko Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20220622185010.2022515-2-aidanmacdonald.0x0@gmail.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-ingenic.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 4313a24985f00340eeb591fd66aa2b257b9e0a69 Author: Arnd Bergmann Date: Mon May 23 21:59:02 2022 +0200 arch/*/: remove CONFIG_VIRT_TO_BUS All architecture-independent users of virt_to_bus() and bus_to_virt() have been fixed to use the dma mapping interfaces or have been removed now. This means the definitions on most architectures, and the CONFIG_VIRT_TO_BUS symbol are now obsolete and can be removed. The only exceptions to this are a few network and scsi drivers for m68k Amiga and VME machines and ppc32 Macintosh. These drivers work correctly with the old interfaces and are probably not worth changing. On alpha and parisc, virt_to_bus() were still used in asm/floppy.h. alpha can use isa_virt_to_bus() like x86 does, and parisc can just open-code the virt_to_phys() here, as this is architecture specific code. I tried updating the bus-virt-phys-mapping.rst documentation, which started as an email from Linus to explain some details of the Linux-2.0 driver interfaces. The bits about virt_to_bus() were declared obsolete backin 2000, and the rest is not all that relevant any more, so in the end I just decided to remove the file completely. Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Acked-by: Michael Ellerman (powerpc) Acked-by: Helge Deller # parisc Signed-off-by: Arnd Bergmann Documentation/core-api/bus-virt-phys-mapping.rst | 220 --------------------- Documentation/core-api/dma-api-howto.rst | 14 -- Documentation/core-api/index.rst | 1 - .../translations/zh_CN/core-api/index.rst | 1 - arch/alpha/Kconfig | 1 - arch/alpha/include/asm/floppy.h | 2 +- arch/alpha/include/asm/io.h | 8 +- arch/ia64/Kconfig | 1 - arch/ia64/include/asm/io.h | 8 - arch/m68k/Kconfig | 1 - arch/m68k/include/asm/virtconvert.h | 4 +- arch/microblaze/Kconfig | 1 - arch/microblaze/include/asm/io.h | 2 - arch/mips/Kconfig | 1 - arch/mips/include/asm/io.h | 9 - arch/parisc/Kconfig | 1 - arch/parisc/include/asm/floppy.h | 4 +- arch/parisc/include/asm/io.h | 2 - arch/powerpc/Kconfig | 1 - arch/powerpc/include/asm/io.h | 2 - arch/riscv/include/asm/page.h | 1 - arch/x86/Kconfig | 1 - arch/x86/include/asm/io.h | 9 - arch/xtensa/Kconfig | 1 - arch/xtensa/include/asm/io.h | 3 - include/asm-generic/io.h | 14 -- mm/Kconfig | 8 - 27 files changed, 10 insertions(+), 311 deletions(-) commit bacac637025c2d73c2af5188e5a12008c5869df9 Author: Tong Tiangen Date: Tue Jun 21 07:26:34 2022 +0000 arm64: extable: cleanup redundant extable type EX_TYPE_FIXUP Currently, extable type EX_TYPE_FIXUP is no place to use, We can safely remove it. Suggested-by: Mark Rutland Signed-off-by: Tong Tiangen Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20220621072638.1273594-7-tongtiangen@huawei.com Signed-off-by: Will Deacon arch/arm64/include/asm/asm-extable.h | 23 ++++------------------- arch/arm64/mm/extable.c | 9 --------- 2 files changed, 4 insertions(+), 28 deletions(-) commit e4208e80a353b5ee1d2ae4681bd41f62a3391958 Author: Tong Tiangen Date: Tue Jun 21 07:26:33 2022 +0000 arm64: extable: move _cond_extable to _cond_uaccess_extable Currently, We use _cond_extable for cache maintenance uaccess helper caches_clean_inval_user_pou(), so this should be moved over to EX_TYPE_UACCESS_ERR_ZERO and rename _cond_extable to _cond_uaccess_extable for clarity. Suggested-by: Mark Rutland Signed-off-by: Tong Tiangen Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20220621072638.1273594-6-tongtiangen@huawei.com Signed-off-by: Will Deacon arch/arm64/include/asm/asm-extable.h | 6 +++--- arch/arm64/include/asm/assembler.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit c4ed0d73ede96f1f9a20b5af17aa793ca91f8c4c Author: Tong Tiangen Date: Tue Jun 21 07:26:32 2022 +0000 arm64: extable: make uaaccess helper use extable type EX_TYPE_UACCESS_ERR_ZERO Currnetly, the extable type used by __arch_copy_from/to_user() is EX_TYPE_FIXUP. In fact, It is more clearly to use meaningful EX_TYPE_UACCESS_*. Suggested-by: Mark Rutland Signed-off-by: Tong Tiangen Link: https://lore.kernel.org/r/20220621072638.1273594-5-tongtiangen@huawei.com Signed-off-by: Will Deacon arch/arm64/include/asm/asm-extable.h | 8 ++++++++ arch/arm64/include/asm/asm-uaccess.h | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) commit 59e8a1ce8f7b7dd3cf5979ded908158e7e8bd3bc Author: Mark Rutland Date: Tue Jun 21 07:26:31 2022 +0000 arm64: asm-extable: add asm uacess helpers In subsequent patches we want to explciitly annotate uaccess fixups in assembly files. We have existing helpers for this for inline assembly, but due to differing stringification requirements it's not possible to have a single definition that we can use for both inline asm and plain asm files. So as with other cases (e.g. gpr-regnum.h), we must prove separate helprs for plain asm and inline asm. So that we can do so, this patch adds helpers to define EX_TYPE_UACCESS_ERR_ZERO fixups in plain assembly. These correspond 1-1 with the inline assembly versions except for the absence of stringification. No plain assmebly heleprs are added for EX_TYPE_LOAD_UNALIGNED_ZEROPAD fixups as these only exist for a single C function. For copy_{to,from}_user() we'll need fixups with regs and err, so I've added _ASM_EXTABLE_UACCESS(insn, fixup), where both the error and zero registers are WZR. For clarity, the existing `_asm_extable` assemgbly maco is now defined in terms of the _ASM_EXTABLE() CPP macro, making the CPP macros canonical in all cases. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Tong Tiangen Link: https://lore.kernel.org/r/20220621072638.1273594-4-tongtiangen@huawei.com Signed-off-by: Will Deacon arch/arm64/include/asm/asm-extable.h | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit 5519d7de2f8e81c317034d2f08362285a0e7ab42 Author: Mark Rutland Date: Tue Jun 21 07:26:30 2022 +0000 arm64: asm-extable: move data fields In subsequent patches we'll need to fill in extable data fields in regular assembly files. In preparation for this, move the definitions of the extable data fields earlier in asm-extable.h so that they are defined for both assembly and C files. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Tong Tiangen Link: https://lore.kernel.org/r/20220621072638.1273594-3-tongtiangen@huawei.com Signed-off-by: Will Deacon arch/arm64/include/asm/asm-extable.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 4953fc3d3270b7466a3b334838b76308c75f7751 Author: Tong Tiangen Date: Tue Jun 21 07:26:29 2022 +0000 arm64: extable: add new extable type EX_TYPE_KACCESS_ERR_ZERO support Currently, The extable type EX_TYPE_UACCESS_ERR_ZERO is used by __get/put_kernel_nofault(), but those helpers are not uaccess type, so we add a new extable type EX_TYPE_KACCESS_ERR_ZERO which can be used by __get/put_kernel_no_fault(). This is also to prepare for distinguishing the two types in machine check safe process. Suggested-by: Mark Rutland Signed-off-by: Tong Tiangen Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20220621072638.1273594-2-tongtiangen@huawei.com Signed-off-by: Will Deacon arch/arm64/include/asm/asm-extable.h | 15 +++++- arch/arm64/include/asm/uaccess.h | 94 ++++++++++++++++++------------------ arch/arm64/mm/extable.c | 1 + 3 files changed, 62 insertions(+), 48 deletions(-) commit 152f2494ac16d17c111cf982d2ad75c6a82d9da8 Merge: 82295bc0d192 dc3029056b02 Author: Mark Brown Date: Tue Jun 28 11:30:13 2022 +0100 Optimize spi_sync path Merge series from David Jander : These patches optimize the spi_sync call for the common case that the worker thread is idle and the queue is empty. It also opens the possibility to potentially further optimize the async path also, since it doesn't need to take into account the direct sync path anymore. As an example for the performance gain, on an i.MX8MM SoC with a SPI CAN controller attached (MCP2518FD), the time the interrupt line stays active (which corresponds roughly with the time it takes to send 3 relatively short consecutive spi_sync messages) is reduced from 98us to only 72us by this patch. A note about message ordering: This patch series should not change the behavior of message ordering when coming from the same context. This means that if a client driver issues one or more spi_async() messages immediately followed by a spi_sync() message in the same context, it can still rely on these messages being sent out in the order they were fired. commit 6ed91f5b10e80c72d8381a673ad26fbfdbf73017 Merge: 1e0ec034dbcb e3f4e5b1a3e6 Author: Mark Brown Date: Tue Jun 28 11:30:11 2022 +0100 Add PDM/DSD/dataline configuration support Merge series from Shengjiu Wang : Support PDM format and DSD format. Add new dts property to configure dataline. The SAI has multiple successive FIFO registers, but in some use case the required dataline/FIFOs are not successive. commit 1e0ec034dbcbc3ec2e6a4bdd6a0fbab8766d3ecd Merge: bd10b0dafdcf cecc81d6a5de Author: Mark Brown Date: Tue Jun 28 11:30:10 2022 +0100 ASoC: use pm_runtime_resume_and_get() when possible Merge series from Pierre-Louis Bossart : After a set of SOF-specific changes, this patchset correct problematic uses of pm_runtime_get_sync() in ASoC, or simplifies the flow with no functional changes. Two patches for Intel platforms also add a test on resume success. Additional changes were initially suggested to completely remove the use of pm_runtime_get_sync(). These changes were dropped since they are way too invasive, specifically in cases where the return values were not tested, which would lead to duplicate pm_runtime_put(). The remaining uses of pm_runtime_get_sync() cannot really be blindly modified without context and knowledge of each driver. commit 9569ff1a188fe48b46eb1ac2ae4543c271e0d4c2 Author: Dan Carpenter Date: Fri Jun 24 09:39:24 2022 +0300 drm/i915: Fix error code in icl_compute_combo_phy_dpll() This function is supposed to return zero or negative error codes but it accidentally returns true on failure. Fixes: 92a020747d6c ("drm/i915: Split shared dpll .get_dplls() into compute and get phases") Signed-off-by: Dan Carpenter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/YrVcHArNMTGCSy+9@kili Reviewed-by: José Roberto de Souza drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 891e465a1bd8798d5f97c3afb99393f123817fef Author: Smita Koralahalli Date: Mon Jun 27 20:56:46 2022 +0000 x86/mce: Check whether writes to MCA_STATUS are getting ignored The platform can sometimes - depending on its settings - cause writes to MCA_STATUS MSRs to get ignored, regardless of HWCR[McStatusWrEn]'s value. For further info see PPR for AMD Family 19h, Model 01h, Revision B1 Processors, doc ID 55898 at https://bugzilla.kernel.org/show_bug.cgi?id=206537. Therefore, probe for ignored writes to MCA_STATUS to determine if hardware error injection is at all possible. [ bp: Heavily massage commit message and patch. ] Signed-off-by: Smita Koralahalli Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20220214233640.70510-2-Smita.KoralahalliChannabasappa@amd.com arch/x86/kernel/cpu/mce/inject.c | 47 ++++++++++++++++++++++++++++++++++++++ arch/x86/kernel/cpu/mce/internal.h | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) commit 778964f2fdf05e5d2e6ca9bc3f450b3db454ba9c Author: Sam Edwards Date: Thu Jun 23 12:11:04 2022 -0600 ipv6/addrconf: fix timing bug in tempaddr regen The addrconf_verify_rtnl() function uses a big if/elseif/elseif/... block to categorize each address by what type of attention it needs. An about-to-expire (RFC 4941) temporary address is one such category, but the previous elseif branch catches addresses that have already run out their prefered_lft. This means that if addrconf_verify_rtnl() fails to run in the necessary time window (i.e. REGEN_ADVANCE time units before the end of the prefered_lft), the temporary address will never be regenerated, and no temporary addresses will be available until each one's valid_lft runs out and manage_tempaddrs() begins anew. Fix this by moving the entire temporary address regeneration case out of that block. That block is supposed to implement the "destructive" part of an address's lifecycle, and regenerating a fresh temporary address is not, semantically speaking, actually tied to any particular lifecycle stage. The age test is also changed from `age >= prefered_lft - regen_advance` to `age + regen_advance >= prefered_lft` instead, to ensure no underflow occurs if the system administrator increases the regen_advance to a value greater than the already-set prefered_lft. Note that this does not fix the problem of addrconf_verify_rtnl() sometimes not running in time, resulting in the race condition described in RFC 4941 section 3.4 - it only ensures that the address is regenerated. Fixing THAT problem may require either using jiffies instead of seconds for all time arithmetic here, or always rounding up when regen_advance is converted to seconds. Signed-off-by: Sam Edwards Link: https://lore.kernel.org/r/20220623181103.7033-1-CFSworks@gmail.com Signed-off-by: Paolo Abeni net/ipv6/addrconf.c | 62 ++++++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 29 deletions(-) commit eb1c38c64b386d6452636c75a99a589d46469d83 Author: Sai Krishna Potthuri Date: Fri Jun 17 16:16:59 2022 +0530 pinctrl: pinctrl-zynqmp: Fix kernel-doc warning Fix the below kernel-doc warning by adding the description for return value. "warning: No description found for return value of 'zynqmp_pmux_get_function_groups'". Signed-off-by: Sai Krishna Potthuri Link: https://lore.kernel.org/r/1655462819-28801-5-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-zynqmp.c | 2 ++ 1 file changed, 2 insertions(+) commit ad2bea79ef0144043721d4893eef719c907e2e63 Author: Sai Krishna Potthuri Date: Fri Jun 17 16:16:58 2022 +0530 pinctrl: pinctrl-zynqmp: Add support for output-enable and bias-high-impedance Add support to handle 'output-enable' and 'bias-high-impedance' configurations. As part of the output-enable configuration, ZynqMP pinctrl driver takes care of removing the pins from tri-state. Signed-off-by: Sai Krishna Potthuri Link: https://lore.kernel.org/r/1655462819-28801-4-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-zynqmp.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 133ad0d9af99bdca90705dadd8d31c20bfc9919f Author: Sai Krishna Potthuri Date: Fri Jun 17 16:16:57 2022 +0530 dt-bindings: pinctrl-zynqmp: Add output-enable configuration Add 'output-enable' configuration parameter to the properties list. Signed-off-by: Sai Krishna Potthuri Acked-by: Rob Herring Link: https://lore.kernel.org/r/1655462819-28801-3-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 586b3b7600e44c1cad52c683ccfbb76fb2c10cc8 Author: Sai Krishna Potthuri Date: Fri Jun 17 16:16:56 2022 +0530 firmware: xilinx: Add configuration values for tri-state Add configuration values(enable/disable) for tri-state parameter. Signed-off-by: Sai Krishna Potthuri Link: https://lore.kernel.org/r/1655462819-28801-2-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com Signed-off-by: Linus Walleij include/linux/firmware/xlnx-zynqmp.h | 5 +++++ 1 file changed, 5 insertions(+) commit 697fb80a53642be624f5121b6ca9d66769c180e0 Author: John Fastabend Date: Mon Jun 27 20:58:03 2022 -0700 bpf: Fix sockmap calling sleepable function in teardown path syzbot reproduced the bug ... BUG: sleeping function called from invalid context at kernel/workqueue.c:3010 ... with the following stack trace fragment ... start_flush_work kernel/workqueue.c:3010 [inline] __flush_work+0x109/0xb10 kernel/workqueue.c:3074 __cancel_work_timer+0x3f9/0x570 kernel/workqueue.c:3162 sk_psock_stop+0x4cb/0x630 net/core/skmsg.c:802 sock_map_destroy+0x333/0x760 net/core/sock_map.c:1581 inet_csk_destroy_sock+0x196/0x440 net/ipv4/inet_connection_sock.c:1130 __tcp_close+0xd5b/0x12b0 net/ipv4/tcp.c:2897 tcp_close+0x29/0xc0 net/ipv4/tcp.c:2909 ... introduced by d8616ee2affc. Do a quick trace of the code path and the bug is obvious: inet_csk_destroy_sock(sk) sk_prot->destroy(sk); <--- sock_map_destroy sk_psock_stop(, true); <--- true so cancel workqueue cancel_work_sync() <--- splat, because *_bh_disable() We can not call cancel_work_sync() from inside destroy path. So mark the sk_psock_stop call to skip this cancel_work_sync(). This will avoid the BUG, but means we may run sk_psock_backlog after or during the destroy op. We zapped the ingress_skb queue in sk_psock_stop (safe to do with local_bh_disable) so its empty and the sk_psock_backlog work item will not find any pkts to process here. However, because we are not going to wait for it or clear its ->state its possible it kicks off or is already running. This should be 'safe' up until psock drops its refcnt to psock->sk. The sock_put() that drops this reference is only done at psock destroy time from sk_psock_destroy(). This is done through workqueue when sk_psock_drop() is called on psock refnt reaches 0. And importantly sk_psock_destroy() does a cancel_work_sync(). So trivial fix works. I've had hit or miss luck reproducing this caught it once or twice with the provided reproducer when running with many runners. However, syzkaller is very good at reproducing so relying on syzkaller to verify fix. Fixes: d8616ee2affc ("bpf, sockmap: Fix sk->sk_forward_alloc warn_on in sk_stream_kill_queues") Reported-by: syzbot+140186ceba0c496183bc@syzkaller.appspotmail.com Suggested-by: Hillf Danton Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Cc: Wang Yufen Link: https://lore.kernel.org/bpf/20220628035803.317876-1-john.fastabend@gmail.com net/core/sock_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4425205ea38bef591a6c800bb47082fc35e788a0 Author: Clément Léger Date: Fri Jun 17 12:35:48 2022 +0200 pinctrl: ocelot: allow building as a module Set PINCTRL_OCELOT config option as a tristate and add MODULE_DEVICE_TABLE()/MODULE_LICENSE() to export appropriate information. Moreover, switch from builtin_platform_driver() to module_platform_driver(). Signed-off-by: Clément Léger Link: https://lore.kernel.org/r/20220617103548.490092-1-clement.leger@bootlin.com Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 2 +- drivers/pinctrl/pinctrl-ocelot.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) commit b812fc9768e0048582c8e18d7b66559c1758dde1 Author: Vincent Donnefort Date: Tue Jun 21 10:04:14 2022 +0100 sched/fair: Remove the energy margin in feec() find_energy_efficient_cpu() integrates a margin to protect tasks from bouncing back and forth from a CPU to another. This margin is set as being 6% of the total current energy estimated on the system. This however does not work for two reasons: 1. The energy estimation is not a good absolute value: compute_energy() used in feec() is a good estimation for task placement as it allows to compare the energy with and without a task. The computed delta will give a good overview of the cost for a certain task placement. It, however, doesn't work as an absolute estimation for the total energy of the system. First it adds the contribution to idle CPUs into the energy, second it mixes util_avg with util_est values. util_avg contains the near history for a CPU usage, it doesn't tell at all what the current utilization is. A system that has been quite busy in the near past will hold a very high energy and then a high margin preventing any task migration to a lower capacity CPU, wasting energy. It even creates a negative feedback loop: by holding the tasks on a less efficient CPU, the margin contributes in keeping the energy high. 2. The margin handicaps small tasks: On a system where the workload is composed mostly of small tasks (which is often the case on Android), the overall energy will be high enough to create a margin none of those tasks can cross. On a Pixel4, a small utilization of 5% on all the CPUs creates a global estimated energy of 140 joules, as per the Energy Model declaration of that same device. This means, after applying the 6% margin that any migration must save more than 8 joules to happen. No task with a utilization lower than 40 would then be able to migrate away from the biggest CPU of the system. The 6% of the overall system energy was brought by the following patch: (eb92692b2544 sched/fair: Speed-up energy-aware wake-ups) It was previously 6% of the prev_cpu energy. Also, the following one made this margin value conditional on the clusters where the task fits: (8d4c97c105ca sched/fair: Only compute base_energy_pd if necessary) We could simply revert that margin change to what it was, but the original version didn't have strong grounds neither and as demonstrated in (1.) the estimated energy isn't a good absolute value. Instead, removing it completely. It is indeed, made possible by recent changes that improved energy estimation comparison fairness (sched/fair: Remove task_util from effective utilization in feec()) (PM: EM: Increase energy calculation precision) and task utilization stabilization (sched/fair: Decay task util_avg during migration) Without a margin, we could have feared bouncing between CPUs. But running LISA's eas_behaviour test coverage on three different platforms (Hikey960, RB-5 and DB-845) showed no issue. Removing the energy margin enables more energy-optimized placements for a more energy efficient system. Signed-off-by: Vincent Donnefort Signed-off-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Tested-by: Lukasz Luba Link: https://lkml.kernel.org/r/20220621090414.433602-8-vdonnefort@google.com kernel/sched/fair.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit 3e8c6c9aac42ced4ca705714b6dd34cf4d305cf0 Author: Vincent Donnefort Date: Tue Jun 21 10:04:13 2022 +0100 sched/fair: Remove task_util from effective utilization in feec() The energy estimation in find_energy_efficient_cpu() (feec()) relies on the computation of the effective utilization for each CPU of a perf domain (PD). This effective utilization is then used as an estimation of the busy time for this pd. The function effective_cpu_util() which gives this value, scales the utilization relative to IRQ pressure on the CPU to take into account that the IRQ time is hidden from the task clock. The IRQ scaling is as follow: effective_cpu_util = irq + (cpu_cap - irq)/cpu_cap * util Where util is the sum of CFS/RT/DL utilization, cpu_cap the capacity of the CPU and irq the IRQ avg time. If now we take as an example a task placement which doesn't raise the OPP on the candidate CPU, we can write the energy delta as: delta = OPPcost/cpu_cap * (effective_cpu_util(cpu_util + task_util) - effective_cpu_util(cpu_util)) = OPPcost/cpu_cap * (cpu_cap - irq)/cpu_cap * task_util We end-up with an energy delta depending on the IRQ avg time, which is a problem: first the time spent on IRQs by a CPU has no effect on the additional energy that would be consumed by a task. Second, we don't want to favour a CPU with a higher IRQ avg time value. Nonetheless, we need to take the IRQ avg time into account. If a task placement raises the PD's frequency, it will increase the energy cost for the entire time where the CPU is busy. A solution is to only use effective_cpu_util() with the CPU contribution part. The task contribution is added separately and scaled according to prev_cpu's IRQ time. No change for the FREQUENCY_UTIL component of the energy estimation. We still want to get the actual frequency that would be selected after the task placement. Signed-off-by: Vincent Donnefort Signed-off-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Tested-by: Lukasz Luba Link: https://lkml.kernel.org/r/20220621090414.433602-7-vdonnefort@google.com kernel/sched/fair.c | 202 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 139 insertions(+), 63 deletions(-) commit 9b340131a4bcf6d0a282a2bdcd8ca268a74da709 Author: Dietmar Eggemann Date: Tue Jun 21 10:04:12 2022 +0100 sched/fair: Use the same cpumask per-PD throughout find_energy_efficient_cpu() The Perf Domain (PD) cpumask (struct em_perf_domain.cpus) stays invariant after Energy Model creation, i.e. it is not updated after CPU hotplug operations. That's why the PD mask is used in conjunction with the cpu_online_mask (or Sched Domain cpumask). Thereby the cpu_online_mask is fetched multiple times (in compute_energy()) during a run-queue selection for a task. cpu_online_mask may change during this time which can lead to wrong energy calculations. To be able to avoid this, use the select_rq_mask per-cpu cpumask to create a cpumask out of PD cpumask and cpu_online_mask and pass it through the function calls of the EAS run-queue selection path. The PD cpumask for max_spare_cap_cpu/compute_prev_delta selection (find_energy_efficient_cpu()) is now ANDed not only with the SD mask but also with the cpu_online_mask. This is fine since this cpumask has to be in syc with the one used for energy computation (compute_energy()). An exclusive cpuset setup with at least one asymmetric CPU capacity island (hence the additional AND with the SD cpumask) is the obvious exception here. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Tested-by: Lukasz Luba Link: https://lkml.kernel.org/r/20220621090414.433602-6-vdonnefort@google.com kernel/sched/fair.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit ec4fc801a02d96180c597238fe87141471b70971 Author: Dietmar Eggemann Date: Thu Jun 23 11:11:02 2022 +0200 sched/fair: Rename select_idle_mask to select_rq_mask On 21/06/2022 11:04, Vincent Donnefort wrote: > From: Dietmar Eggemann https://lkml.kernel.org/r/202206221253.ZVyGQvPX-lkp@intel.com discovered that this patch doesn't build anymore (on tip sched/core or linux-next) because of commit f5b2eeb499910 ("sched/fair: Consider CPU affinity when allowing NUMA imbalance in find_idlest_group()"). New version of [PATCH v11 4/7] sched/fair: Rename select_idle_mask to select_rq_mask below. -- >8 -- Decouple the name of the per-cpu cpumask select_idle_mask from its usage in select_idle_[cpu/capacity]() of the CFS run-queue selection (select_task_rq_fair()). This is to support the reuse of this cpumask in the Energy Aware Scheduling (EAS) path (find_energy_efficient_cpu()) of the CFS run-queue selection. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Tested-by: Lukasz Luba Link: https://lkml.kernel.org/r/250691c7-0e2b-05ab-bedf-b245c11d9400@arm.com kernel/sched/core.c | 4 ++-- kernel/sched/fair.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) commit bb4479994945e9170534389a7762eb56149320ac Author: Dietmar Eggemann Date: Tue Jun 21 10:04:10 2022 +0100 sched, drivers: Remove max param from effective_cpu_util()/sched_cpu_util() effective_cpu_util() already has a `int cpu' parameter which allows to retrieve the CPU capacity scale factor (or maximum CPU capacity) inside this function via an arch_scale_cpu_capacity(cpu). A lot of code calling effective_cpu_util() (or the shim sched_cpu_util()) needs the maximum CPU capacity, i.e. it will call arch_scale_cpu_capacity() already. But not having to pass it into effective_cpu_util() will make the EAS wake-up code easier, especially when the maximum CPU capacity reduced by the thermal pressure is passed through the EAS wake-up functions. Due to the asymmetric CPU capacity support of arm/arm64 architectures, arch_scale_cpu_capacity(int cpu) is a per-CPU variable read access via per_cpu(cpu_scale, cpu) on such a system. On all other architectures it is a a compile-time constant (SCHED_CAPACITY_SCALE). Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Acked-by: Vincent Guittot Tested-by: Lukasz Luba Link: https://lkml.kernel.org/r/20220621090414.433602-4-vdonnefort@google.com drivers/powercap/dtpm_cpu.c | 33 +++++++++------------------------ drivers/thermal/cpufreq_cooling.c | 6 ++---- include/linux/sched.h | 2 +- kernel/sched/core.c | 11 ++++++----- kernel/sched/cpufreq_schedutil.c | 5 ++--- kernel/sched/fair.c | 21 ++++++++++----------- kernel/sched/sched.h | 2 +- 7 files changed, 31 insertions(+), 49 deletions(-) commit e2f3e35f1f5a4dccddf352cea534542544c9b867 Author: Vincent Donnefort Date: Tue Jun 21 10:04:09 2022 +0100 sched/fair: Decay task PELT values during wakeup migration Before being migrated to a new CPU, a task sees its PELT values synchronized with rq last_update_time. Once done, that same task will also have its sched_avg last_update_time reset. This means the time between the migration and the last clock update will not be accounted for in util_avg and a discontinuity will appear. This issue is amplified by the PELT clock scaling. It takes currently one tick after the CPU being idle to let clock_pelt catching up clock_task. This is especially problematic for asymmetric CPU capacity systems which need stable util_avg signals for task placement and energy estimation. Ideally, this problem would be solved by updating the runqueue clocks before the migration. But that would require taking the runqueue lock which is quite expensive [1]. Instead estimate the missing time and update the task util_avg with that value. To that end, we need sched_clock_cpu() but it is a costly function. Limit the usage to the case where the source CPU is idle as we know this is when the clock is having the biggest risk of being outdated. See comment in migrate_se_pelt_lag() for more details about how the PELT value is estimated. Notice though this estimation doesn't take into account IRQ and Paravirt time. [1] https://lkml.kernel.org/r/20190709115759.10451-1-chris.redpath@arm.com Signed-off-by: Vincent Donnefort Signed-off-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Reviewed-by: Dietmar Eggemann Tested-by: Lukasz Luba Link: https://lkml.kernel.org/r/20220621090414.433602-3-vdonnefort@google.com kernel/sched/fair.c | 156 ++++++++++++++++++++++++++++++++++++++++++--------- kernel/sched/pelt.h | 40 ++++++++++--- kernel/sched/sched.h | 10 ++++ 3 files changed, 172 insertions(+), 34 deletions(-) commit d05b43059dfa115037cd37bc276a8316391def28 Author: Vincent Donnefort Date: Tue Jun 21 10:04:08 2022 +0100 sched/fair: Provide u64 read for 32-bits arch helper Introducing macro helpers u64_u32_{store,load}() to factorize lockless accesses to u64 variables for 32-bits architectures. Users are for now cfs_rq.min_vruntime and sched_avg.last_update_time. To accommodate the later where the copy lies outside of the structure (cfs_rq.last_udpate_time_copy instead of sched_avg.last_update_time_copy), use the _copy() version of those helpers. Those new helpers encapsulate smp_rmb() and smp_wmb() synchronization and therefore, have a small penalty for 32-bits machines in set_task_rq_fair() and init_cfs_rq(). Signed-off-by: Vincent Donnefort Signed-off-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Tested-by: Lukasz Luba Link: https://lkml.kernel.org/r/20220621090414.433602-2-vdonnefort@google.com kernel/sched/fair.c | 84 +++++++++------------------------------------------- kernel/sched/sched.h | 41 ++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 71 deletions(-) commit 119a784c81270eb88e573174ed2209225d646656 Author: Namhyung Kim Date: Thu Jun 16 11:06:23 2022 -0700 perf/core: Add a new read format to get a number of lost samples Sometimes we want to know an accurate number of samples even if it's lost. Currenlty PERF_RECORD_LOST is generated for a ring-buffer which might be shared with other events. So it's hard to know per-event lost count. Add event->lost_samples field and PERF_FORMAT_LOST to retrieve it from userspace. Original-patch-by: Jiri Olsa Signed-off-by: Namhyung Kim Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20220616180623.1358843-1-namhyung@kernel.org include/linux/perf_event.h | 2 ++ include/uapi/linux/perf_event.h | 5 ++++- kernel/events/core.c | 21 ++++++++++++++++++--- kernel/events/ring_buffer.c | 5 ++++- 4 files changed, 28 insertions(+), 5 deletions(-) commit 70fb5ccf2ebb09a0c8ebba775041567812d45f86 Author: Chen Yu Date: Mon Jun 13 00:34:28 2022 +0800 sched/fair: Introduce SIS_UTIL to search idle CPU based on sum of util_avg [Problem Statement] select_idle_cpu() might spend too much time searching for an idle CPU, when the system is overloaded. The following histogram is the time spent in select_idle_cpu(), when running 224 instances of netperf on a system with 112 CPUs per LLC domain: @usecs: [0] 533 | | [1] 5495 | | [2, 4) 12008 | | [4, 8) 239252 | | [8, 16) 4041924 |@@@@@@@@@@@@@@ | [16, 32) 12357398 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | [32, 64) 14820255 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| [64, 128) 13047682 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | [128, 256) 8235013 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | [256, 512) 4507667 |@@@@@@@@@@@@@@@ | [512, 1K) 2600472 |@@@@@@@@@ | [1K, 2K) 927912 |@@@ | [2K, 4K) 218720 | | [4K, 8K) 98161 | | [8K, 16K) 37722 | | [16K, 32K) 6715 | | [32K, 64K) 477 | | [64K, 128K) 7 | | netperf latency usecs: ======= case load Lat_99th std% TCP_RR thread-224 257.39 ( 0.21) The time spent in select_idle_cpu() is visible to netperf and might have a negative impact. [Symptom analysis] The patch [1] from Mel Gorman has been applied to track the efficiency of select_idle_sibling. Copy the indicators here: SIS Search Efficiency(se_eff%): A ratio expressed as a percentage of runqueues scanned versus idle CPUs found. A 100% efficiency indicates that the target, prev or recent CPU of a task was idle at wakeup. The lower the efficiency, the more runqueues were scanned before an idle CPU was found. SIS Domain Search Efficiency(dom_eff%): Similar, except only for the slower SIS patch. SIS Fast Success Rate(fast_rate%): Percentage of SIS that used target, prev or recent CPUs. SIS Success rate(success_rate%): Percentage of scans that found an idle CPU. The test is based on Aubrey's schedtests tool, including netperf, hackbench, schbench and tbench. Test on vanilla kernel: schedstat_parse.py -f netperf_vanilla.log case load se_eff% dom_eff% fast_rate% success_rate% TCP_RR 28 threads 99.978 18.535 99.995 100.000 TCP_RR 56 threads 99.397 5.671 99.964 100.000 TCP_RR 84 threads 21.721 6.818 73.632 100.000 TCP_RR 112 threads 12.500 5.533 59.000 100.000 TCP_RR 140 threads 8.524 4.535 49.020 100.000 TCP_RR 168 threads 6.438 3.945 40.309 99.999 TCP_RR 196 threads 5.397 3.718 32.320 99.982 TCP_RR 224 threads 4.874 3.661 25.775 99.767 UDP_RR 28 threads 99.988 17.704 99.997 100.000 UDP_RR 56 threads 99.528 5.977 99.970 100.000 UDP_RR 84 threads 24.219 6.992 76.479 100.000 UDP_RR 112 threads 13.907 5.706 62.538 100.000 UDP_RR 140 threads 9.408 4.699 52.519 100.000 UDP_RR 168 threads 7.095 4.077 44.352 100.000 UDP_RR 196 threads 5.757 3.775 35.764 99.991 UDP_RR 224 threads 5.124 3.704 28.748 99.860 schedstat_parse.py -f schbench_vanilla.log (each group has 28 tasks) case load se_eff% dom_eff% fast_rate% success_rate% normal 1 mthread 99.152 6.400 99.941 100.000 normal 2 mthreads 97.844 4.003 99.908 100.000 normal 3 mthreads 96.395 2.118 99.917 99.998 normal 4 mthreads 55.288 1.451 98.615 99.804 normal 5 mthreads 7.004 1.870 45.597 61.036 normal 6 mthreads 3.354 1.346 20.777 34.230 normal 7 mthreads 2.183 1.028 11.257 21.055 normal 8 mthreads 1.653 0.825 7.849 15.549 schedstat_parse.py -f hackbench_vanilla.log (each group has 28 tasks) case load se_eff% dom_eff% fast_rate% success_rate% process-pipe 1 group 99.991 7.692 99.999 100.000 process-pipe 2 groups 99.934 4.615 99.997 100.000 process-pipe 3 groups 99.597 3.198 99.987 100.000 process-pipe 4 groups 98.378 2.464 99.958 100.000 process-pipe 5 groups 27.474 3.653 89.811 99.800 process-pipe 6 groups 20.201 4.098 82.763 99.570 process-pipe 7 groups 16.423 4.156 77.398 99.316 process-pipe 8 groups 13.165 3.920 72.232 98.828 process-sockets 1 group 99.977 5.882 99.999 100.000 process-sockets 2 groups 99.927 5.505 99.996 100.000 process-sockets 3 groups 99.397 3.250 99.980 100.000 process-sockets 4 groups 79.680 4.258 98.864 99.998 process-sockets 5 groups 7.673 2.503 63.659 92.115 process-sockets 6 groups 4.642 1.584 58.946 88.048 process-sockets 7 groups 3.493 1.379 49.816 81.164 process-sockets 8 groups 3.015 1.407 40.845 75.500 threads-pipe 1 group 99.997 0.000 100.000 100.000 threads-pipe 2 groups 99.894 2.932 99.997 100.000 threads-pipe 3 groups 99.611 4.117 99.983 100.000 threads-pipe 4 groups 97.703 2.624 99.937 100.000 threads-pipe 5 groups 22.919 3.623 87.150 99.764 threads-pipe 6 groups 18.016 4.038 80.491 99.557 threads-pipe 7 groups 14.663 3.991 75.239 99.247 threads-pipe 8 groups 12.242 3.808 70.651 98.644 threads-sockets 1 group 99.990 6.667 99.999 100.000 threads-sockets 2 groups 99.940 5.114 99.997 100.000 threads-sockets 3 groups 99.469 4.115 99.977 100.000 threads-sockets 4 groups 87.528 4.038 99.400 100.000 threads-sockets 5 groups 6.942 2.398 59.244 88.337 threads-sockets 6 groups 4.359 1.954 49.448 87.860 threads-sockets 7 groups 2.845 1.345 41.198 77.102 threads-sockets 8 groups 2.871 1.404 38.512 74.312 schedstat_parse.py -f tbench_vanilla.log case load se_eff% dom_eff% fast_rate% success_rate% loopback 28 threads 99.976 18.369 99.995 100.000 loopback 56 threads 99.222 7.799 99.934 100.000 loopback 84 threads 19.723 6.819 70.215 100.000 loopback 112 threads 11.283 5.371 55.371 99.999 loopback 140 threads 0.000 0.000 0.000 0.000 loopback 168 threads 0.000 0.000 0.000 0.000 loopback 196 threads 0.000 0.000 0.000 0.000 loopback 224 threads 0.000 0.000 0.000 0.000 According to the test above, if the system becomes busy, the SIS Search Efficiency(se_eff%) drops significantly. Although some benchmarks would finally find an idle CPU(success_rate% = 100%), it is doubtful whether it is worth it to search the whole LLC domain. [Proposal] It would be ideal to have a crystal ball to answer this question: How many CPUs must a wakeup path walk down, before it can find an idle CPU? Many potential metrics could be used to predict the number. One candidate is the sum of util_avg in this LLC domain. The benefit of choosing util_avg is that it is a metric of accumulated historic activity, which seems to be smoother than instantaneous metrics (such as rq->nr_running). Besides, choosing the sum of util_avg would help predict the load of the LLC domain more precisely, because SIS_PROP uses one CPU's idle time to estimate the total LLC domain idle time. In summary, the lower the util_avg is, the more select_idle_cpu() should scan for idle CPU, and vice versa. When the sum of util_avg in this LLC domain hits 85% or above, the scan stops. The reason to choose 85% as the threshold is that this is the imbalance_pct(117) when a LLC sched group is overloaded. Introduce the quadratic function: y = SCHED_CAPACITY_SCALE - p * x^2 and y'= y / SCHED_CAPACITY_SCALE x is the ratio of sum_util compared to the CPU capacity: x = sum_util / (llc_weight * SCHED_CAPACITY_SCALE) y' is the ratio of CPUs to be scanned in the LLC domain, and the number of CPUs to scan is calculated by: nr_scan = llc_weight * y' Choosing quadratic function is because: [1] Compared to the linear function, it scans more aggressively when the sum_util is low. [2] Compared to the exponential function, it is easier to calculate. [3] It seems that there is no accurate mapping between the sum of util_avg and the number of CPUs to be scanned. Use heuristic scan for now. For a platform with 112 CPUs per LLC, the number of CPUs to scan is: sum_util% 0 5 15 25 35 45 55 65 75 85 86 ... scan_nr 112 111 108 102 93 81 65 47 25 1 0 ... For a platform with 16 CPUs per LLC, the number of CPUs to scan is: sum_util% 0 5 15 25 35 45 55 65 75 85 86 ... scan_nr 16 15 15 14 13 11 9 6 3 0 0 ... Furthermore, to minimize the overhead of calculating the metrics in select_idle_cpu(), borrow the statistics from periodic load balance. As mentioned by Abel, on a platform with 112 CPUs per LLC, the sum_util calculated by periodic load balance after 112 ms would decay to about 0.5 * 0.5 * 0.5 * 0.7 = 8.75%, thus bringing a delay in reflecting the latest utilization. But it is a trade-off. Checking the util_avg in newidle load balance would be more frequent, but it brings overhead - multiple CPUs write/read the per-LLC shared variable and introduces cache contention. Tim also mentioned that, it is allowed to be non-optimal in terms of scheduling for the short-term variations, but if there is a long-term trend in the load behavior, the scheduler can adjust for that. When SIS_UTIL is enabled, the select_idle_cpu() uses the nr_scan calculated by SIS_UTIL instead of the one from SIS_PROP. As Peter and Mel suggested, SIS_UTIL should be enabled by default. This patch is based on the util_avg, which is very sensitive to the CPU frequency invariance. There is an issue that, when the max frequency has been clamp, the util_avg would decay insanely fast when the CPU is idle. Commit addca285120b ("cpufreq: intel_pstate: Handle no_turbo in frequency invariance") could be used to mitigate this symptom, by adjusting the arch_max_freq_ratio when turbo is disabled. But this issue is still not thoroughly fixed, because the current code is unaware of the user-specified max CPU frequency. [Test result] netperf and tbench were launched with 25% 50% 75% 100% 125% 150% 175% 200% of CPU number respectively. Hackbench and schbench were launched by 1, 2 ,4, 8 groups. Each test lasts for 100 seconds and repeats 3 times. The following is the benchmark result comparison between baseline:vanilla v5.19-rc1 and compare:patched kernel. Positive compare% indicates better performance. Each netperf test is a: netperf -4 -H 127.0.1 -t TCP/UDP_RR -c -C -l 100 netperf.throughput ======= case load baseline(std%) compare%( std%) TCP_RR 28 threads 1.00 ( 0.34) -0.16 ( 0.40) TCP_RR 56 threads 1.00 ( 0.19) -0.02 ( 0.20) TCP_RR 84 threads 1.00 ( 0.39) -0.47 ( 0.40) TCP_RR 112 threads 1.00 ( 0.21) -0.66 ( 0.22) TCP_RR 140 threads 1.00 ( 0.19) -0.69 ( 0.19) TCP_RR 168 threads 1.00 ( 0.18) -0.48 ( 0.18) TCP_RR 196 threads 1.00 ( 0.16) +194.70 ( 16.43) TCP_RR 224 threads 1.00 ( 0.16) +197.30 ( 7.85) UDP_RR 28 threads 1.00 ( 0.37) +0.35 ( 0.33) UDP_RR 56 threads 1.00 ( 11.18) -0.32 ( 0.21) UDP_RR 84 threads 1.00 ( 1.46) -0.98 ( 0.32) UDP_RR 112 threads 1.00 ( 28.85) -2.48 ( 19.61) UDP_RR 140 threads 1.00 ( 0.70) -0.71 ( 14.04) UDP_RR 168 threads 1.00 ( 14.33) -0.26 ( 11.16) UDP_RR 196 threads 1.00 ( 12.92) +186.92 ( 20.93) UDP_RR 224 threads 1.00 ( 11.74) +196.79 ( 18.62) Take the 224 threads as an example, the SIS search metrics changes are illustrated below: vanilla patched 4544492 +237.5% 15338634 sched_debug.cpu.sis_domain_search.avg 38539 +39686.8% 15333634 sched_debug.cpu.sis_failed.avg 128300000 -87.9% 15551326 sched_debug.cpu.sis_scanned.avg 5842896 +162.7% 15347978 sched_debug.cpu.sis_search.avg There is -87.9% less CPU scans after patched, which indicates lower overhead. Besides, with this patch applied, there is -13% less rq lock contention in perf-profile.calltrace.cycles-pp._raw_spin_lock.raw_spin_rq_lock_nested .try_to_wake_up.default_wake_function.woken_wake_function. This might help explain the performance improvement - Because this patch allows the waking task to remain on the previous CPU, rather than grabbing other CPUs' lock. Each hackbench test is a: hackbench -g $job --process/threads --pipe/sockets -l 1000000 -s 100 hackbench.throughput ========= case load baseline(std%) compare%( std%) process-pipe 1 group 1.00 ( 1.29) +0.57 ( 0.47) process-pipe 2 groups 1.00 ( 0.27) +0.77 ( 0.81) process-pipe 4 groups 1.00 ( 0.26) +1.17 ( 0.02) process-pipe 8 groups 1.00 ( 0.15) -4.79 ( 0.02) process-sockets 1 group 1.00 ( 0.63) -0.92 ( 0.13) process-sockets 2 groups 1.00 ( 0.03) -0.83 ( 0.14) process-sockets 4 groups 1.00 ( 0.40) +5.20 ( 0.26) process-sockets 8 groups 1.00 ( 0.04) +3.52 ( 0.03) threads-pipe 1 group 1.00 ( 1.28) +0.07 ( 0.14) threads-pipe 2 groups 1.00 ( 0.22) -0.49 ( 0.74) threads-pipe 4 groups 1.00 ( 0.05) +1.88 ( 0.13) threads-pipe 8 groups 1.00 ( 0.09) -4.90 ( 0.06) threads-sockets 1 group 1.00 ( 0.25) -0.70 ( 0.53) threads-sockets 2 groups 1.00 ( 0.10) -0.63 ( 0.26) threads-sockets 4 groups 1.00 ( 0.19) +11.92 ( 0.24) threads-sockets 8 groups 1.00 ( 0.08) +4.31 ( 0.11) Each tbench test is a: tbench -t 100 $job 127.0.0.1 tbench.throughput ====== case load baseline(std%) compare%( std%) loopback 28 threads 1.00 ( 0.06) -0.14 ( 0.09) loopback 56 threads 1.00 ( 0.03) -0.04 ( 0.17) loopback 84 threads 1.00 ( 0.05) +0.36 ( 0.13) loopback 112 threads 1.00 ( 0.03) +0.51 ( 0.03) loopback 140 threads 1.00 ( 0.02) -1.67 ( 0.19) loopback 168 threads 1.00 ( 0.38) +1.27 ( 0.27) loopback 196 threads 1.00 ( 0.11) +1.34 ( 0.17) loopback 224 threads 1.00 ( 0.11) +1.67 ( 0.22) Each schbench test is a: schbench -m $job -t 28 -r 100 -s 30000 -c 30000 schbench.latency_90%_us ======== case load baseline(std%) compare%( std%) normal 1 mthread 1.00 ( 31.22) -7.36 ( 20.25)* normal 2 mthreads 1.00 ( 2.45) -0.48 ( 1.79) normal 4 mthreads 1.00 ( 1.69) +0.45 ( 0.64) normal 8 mthreads 1.00 ( 5.47) +9.81 ( 14.28) *Consider the Standard Deviation, this -7.36% regression might not be valid. Also, a OLTP workload with a commercial RDBMS has been tested, and there is no significant change. There were concerns that unbalanced tasks among CPUs would cause problems. For example, suppose the LLC domain is composed of 8 CPUs, and 7 tasks are bound to CPU0~CPU6, while CPU7 is idle: CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 util_avg 1024 1024 1024 1024 1024 1024 1024 0 Since the util_avg ratio is 87.5%( = 7/8 ), which is higher than 85%, select_idle_cpu() will not scan, thus CPU7 is undetected during scan. But according to Mel, it is unlikely the CPU7 will be idle all the time because CPU7 could pull some tasks via CPU_NEWLY_IDLE. lkp(kernel test robot) has reported a regression on stress-ng.sock on a very busy system. According to the sched_debug statistics, it might be caused by SIS_UTIL terminates the scan and chooses a previous CPU earlier, and this might introduce more context switch, especially involuntary preemption, which impacts a busy stress-ng. This regression has shown that, not all benchmarks in every scenario benefit from idle CPU scan limit, and it needs further investigation. Besides, there is slight regression in hackbench's 16 groups case when the LLC domain has 16 CPUs. Prateek mentioned that we should scan aggressively in an LLC domain with 16 CPUs. Because the cost to search for an idle one among 16 CPUs is negligible. The current patch aims to propose a generic solution and only considers the util_avg. Something like the below could be applied on top of the current patch to fulfill the requirement: if (llc_weight <= 16) nr_scan = nr_scan * 32 / llc_weight; For LLC domain with 16 CPUs, the nr_scan will be expanded to 2 times large. The smaller the CPU number this LLC domain has, the larger nr_scan will be expanded. This needs further investigation. There is also ongoing work[2] from Abel to filter out the busy CPUs during wakeup, to further speed up the idle CPU scan. And it could be a following-up optimization on top of this change. Suggested-by: Tim Chen Suggested-by: Peter Zijlstra Signed-off-by: Chen Yu Signed-off-by: Peter Zijlstra (Intel) Tested-by: Yicong Yang Tested-by: Mohini Narkhede Tested-by: K Prateek Nayak Link: https://lore.kernel.org/r/20220612163428.849378-1-yu.c.chen@intel.com include/linux/sched/topology.h | 1 + kernel/sched/fair.c | 87 ++++++++++++++++++++++++++++++++++++++++++ kernel/sched/features.h | 3 +- 3 files changed, 90 insertions(+), 1 deletion(-) commit 700a78335fc28a59c307f420857fd2d4521549f8 Author: Christian Göttsche Date: Wed Jun 15 17:25:04 2022 +0200 sched: only perform capability check on privileged operation sched_setattr(2) issues via kernel/sched/core.c:__sched_setscheduler() a CAP_SYS_NICE audit event unconditionally, even when the requested operation does not require that capability / is unprivileged, i.e. for reducing niceness. This is relevant in connection with SELinux, where a capability check results in a policy decision and by default a denial message on insufficient permission is issued. It can lead to three undesired cases: 1. A denial message is generated, even in case the operation was an unprivileged one and thus the syscall succeeded, creating noise. 2. To avoid the noise from 1. the policy writer adds a rule to ignore those denial messages, hiding future syscalls, where the task performs an actual privileged operation, leading to hidden limited functionality of that task. 3. To avoid the noise from 1. the policy writer adds a rule to allow the task the capability CAP_SYS_NICE, while it does not need it, violating the principle of least privilege. Conduct privilged/unprivileged categorization first and perform a capable test (and at most once) only if needed. Signed-off-by: Christian Göttsche Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20220615152505.310488-1-cgzones@googlemail.com kernel/sched/core.c | 138 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 83 insertions(+), 55 deletions(-) commit c64b551f6a338eb9724a2f9ef3dddf80ccef2894 Author: Zhang Qiao Date: Sat Jun 18 02:11:51 2022 +0800 sched: Remove unused function group_first_cpu() As of commit afe06efdf07c ("sched: Extend scheduler's asym packing") group_first_cpu() became an unused function, remove it. Signed-off-by: Zhang Qiao Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Link: https://lore.kernel.org/r/20220617181151.29980-3-zhangqiao22@huawei.com kernel/sched/sched.h | 9 --------- 1 file changed, 9 deletions(-) commit fb95a5a04d72aecdd5e151a4c2f7e4cde368bc10 Author: Zhang Qiao Date: Sat Jun 18 02:11:50 2022 +0800 sched/fair: Remove redundant word " *" " *" is redundant. so remove it. Signed-off-by: Zhang Qiao Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220617181151.29980-2-zhangqiao22@huawei.com kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1a997ba4c1bf65497d956aea90de42a6398f73a Author: Michael Jeanson Date: Tue Jun 14 11:48:30 2022 -0400 selftests/rseq: check if libc rseq support is registered When checking for libc rseq support in the library constructor, don't only depend on the symbols presence, check that the registration was completed. This targets a scenario where the libc has rseq support but it is not wired for the current architecture in 'bits/rseq.h', we want to fallback to our internal registration mechanism. Signed-off-by: Michael Jeanson Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Mathieu Desnoyers Link: https://lore.kernel.org/r/20220614154830.1367382-4-mjeanson@efficios.com tools/testing/selftests/rseq/rseq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d47c0cc94a86b9098930523a9e68180bef6b26cf Author: Michael Jeanson Date: Tue Jun 14 11:48:29 2022 -0400 selftests/rseq: riscv: fix 'literal-suffix' warning This header is also used in librseq where it can be included in C++ code, add a space between literals and string macros. Signed-off-by: Michael Jeanson Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Mathieu Desnoyers Link: https://lore.kernel.org/r/20220614154830.1367382-3-mjeanson@efficios.com tools/testing/selftests/rseq/rseq-riscv.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 4f3394924358fe04ced0411c72fc7eeb0d3be652 Author: Michael Jeanson Date: Tue Jun 14 11:48:28 2022 -0400 selftests/rseq: riscv: use rseq_get_abi() helper Make the RISC-V rseq selftests compatible with glibc-2.35 by using the rseq_get_abi() helper. Signed-off-by: Michael Jeanson Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Mathieu Desnoyers Link: https://lore.kernel.org/r/20220614154830.1367382-2-mjeanson@efficios.com tools/testing/selftests/rseq/rseq-riscv.h | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) commit c83375699fc648f94787d00bc615e370cf8f5fa2 Author: Marek Vasut Date: Tue Jun 28 02:34:07 2022 +0200 drm/doc: Fix comment typo Replace apprpriately with appropriately. Fixes: 1e4d84c6589e9 ("drm/doc: Polish plane composition property docs") Signed-off-by: Marek Vasut Cc: Benjamin Gaignard Cc: Daniel Vetter Cc: Dmitry Baryshkov Cc: Maxime Ripard Cc: Sean Paul Cc: Simon Ser Cc: Ville Syrjälä Signed-off-by: Simon Ser Reviewed-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/20220628003407.77765-1-marex@denx.de drivers/gpu/drm/drm_blend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe71f6e1bbffb99ef28121a22a72859fb276af04 Author: Juerg Haefliger Date: Mon May 23 08:30:40 2022 +0200 ARM: OMAP2+: Kconfig: Fix indentation The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules. While at it, remove an extra tab. Signed-off-by: Juerg Haefliger Message-Id: <20220523063040.10991-1-juergh@canonical.com> [tony@atomide.com: updated for extra tab] Signed-off-by: Tony Lindgren arch/arm/mach-omap2/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7c2c57263af41cfd8b5022274e6801542831bb69 Author: Christophe JAILLET Date: Sun Jun 26 18:27:45 2022 +0200 hinic: Use the bitmap API when applicable 'vlan_bitmap' is a bitmap and is used as such. So allocate it with devm_bitmap_zalloc() and its explicit bit size (i.e. VLAN_N_VID). This avoids the need of the VLAN_BITMAP_SIZE macro which: - needlessly has a 'nic_dev' parameter - should be "long" (and not byte) aligned, so that the bitmap semantic is respected This is in fact not an issue because VLAN_N_VID is 4096 at the time being, but devm_bitmap_zalloc() is less verbose and easier to understand. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/6ff7b7d21414240794a77dc2456914412718a145.1656260842.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/ethernet/huawei/hinic/hinic_main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 942228fbf5d4901112178b93d41225be7c0dd9de Author: Miaoqian Lin Date: Thu May 26 11:37:24 2022 +0400 ARM: OMAP2+: Fix refcount leak in omap3xxx_prm_late_init of_find_matching_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: 1e037794f7f0 ("ARM: OMAP3+: PRM: register interrupt information from DT") Signed-off-by: Miaoqian Lin Message-Id: <20220526073724.21169-1-linmq006@gmail.com> Signed-off-by: Tony Lindgren arch/arm/mach-omap2/prm3xxx.c | 1 + 1 file changed, 1 insertion(+) commit 5ef28832c585155655cb7464dd35abe99170f403 Merge: 63769819079d 15137daef7b0 Author: Jakub Kicinski Date: Mon Jun 27 22:07:11 2022 -0700 Merge branch 'nfp-add-vepa-and-adapter-selftest-support' Simon Horman says: ==================== nfp: add VEPA and adapter selftest support 1. Support for ethtool -t: adapter selftest 2. VEPA mode in HW bridge. This supplements existing support for VEB mode. ==================== Link: https://lore.kernel.org/r/20220624073816.1272984-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski commit 15137daef7b0d7981ce81b28a64abfe3df2455fb Author: Fei Qin Date: Fri Jun 24 09:38:16 2022 +0200 nfp: add support for 'ethtool -t DEVNAME' command Add support for ethtool selftest. e.g. # ethtool -t DEVNAME test result like: The test result is PASS The test extra info: Link Test 0 NSP Test 0 Firmware Test 0 Register Test 0 Signed-off-by: Fei Qin Reviewed-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: Jakub Kicinski .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 167 +++++++++++++++++++++ 1 file changed, 167 insertions(+) commit be80141108bc043c71f5fffdfefa75b1e3e6f441 Author: Yinjun Zhang Date: Fri Jun 24 09:38:15 2022 +0200 nfp: support vepa mode in HW bridge Add support for VEPA mode of HW bridge. The default remains VEB mode. The mode may be configured using ndo_bridge_setlink, and inspected using ndo_bridge_getlink. Signed-off-by: Yinjun Zhang Reviewed-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: Jakub Kicinski drivers/net/ethernet/netronome/nfp/nfd3/rings.c | 1 + drivers/net/ethernet/netronome/nfp/nfdk/rings.c | 2 +- .../net/ethernet/netronome/nfp/nfp_net_common.c | 71 +++++++++++++++++++++- drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 1 + 4 files changed, 73 insertions(+), 2 deletions(-) commit 63769819079d87dc322fefaf981589e227de2978 Author: Jilin Yuan Date: Sat Jun 25 15:15:58 2022 +0800 net: atlantic:fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220625071558.3852-1-yuanjilin@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/aquantia/atlantic/macsec/macsec_struct.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7eddba1644c900a81ef964b5355fadde12c269be Author: Jilin Yuan Date: Sat Jun 25 15:06:33 2022 +0800 amd/xgbe: fix repeated words in comments Delete the redundant word 'use'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220625070633.64982-1-yuanjilin@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/amd/xgbe/xgbe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3e2bad76a50e2c0bf0628bd1454ff9e63e8810f Author: Jilin Yuan Date: Sat Jun 25 14:57:45 2022 +0800 agere: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220625065745.61464-1-yuanjilin@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/agere/et131x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5cdbab96bab314c6f2f5e4e8b8a019181328bf5f Author: Liang He Date: Sat Jun 18 10:06:03 2022 +0800 ARM: OMAP2+: pdata-quirks: Fix refcount leak bug In pdata_quirks_init_clocks(), the loop contains of_find_node_by_name() but without corresponding of_node_put(). Signed-off-by: Liang He Message-Id: <20220618020603.4055792-1-windhl@126.com> Signed-off-by: Tony Lindgren arch/arm/mach-omap2/pdata-quirks.c | 2 ++ 1 file changed, 2 insertions(+) commit e3b64a7a5af3f451d4dba607260fb7f997797fc4 Author: Deming Wang Date: Thu Jun 23 21:31:14 2022 -0400 net: axienet: Modify function description Delete duplicate words of "the". Signed-off-by: Deming Wang Link: https://lore.kernel.org/r/20220624013114.1913-1-wangdeming@inspur.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50b87a32a79bca6e275918a711fb8cc55e16d739 Author: Liang He Date: Fri Jun 17 22:58:03 2022 +0800 ARM: OMAP2+: display: Fix refcount leak bug In omapdss_init_fbdev(), of_find_node_by_name() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: Liang He Message-Id: <20220617145803.4050918-1-windhl@126.com> Signed-off-by: Tony Lindgren arch/arm/mach-omap2/display.c | 1 + 1 file changed, 1 insertion(+) commit 9705db1eff38d6b9114121f9e253746199b759c9 Author: Miaoqian Lin Date: Wed Jun 1 08:48:58 2022 +0400 ARM: OMAP2+: Fix refcount leak in omapdss_init_of omapdss_find_dss_of_node() calls of_find_compatible_node() to get device node. of_find_compatible_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() in later error path and normal path. Fixes: e0c827aca0730 ("drm/omap: Populate DSS children in omapdss driver") Signed-off-by: Miaoqian Lin Message-Id: <20220601044858.3352-1-linmq006@gmail.com> Reviewed-by: Laurent Pinchart Signed-off-by: Tony Lindgren arch/arm/mach-omap2/display.c | 2 ++ 1 file changed, 2 insertions(+) commit bcec04b3cce4c498ef0d416a3a2aaf0369578151 Author: ChanWoo Lee Date: Tue Jun 28 08:55:45 2022 +0900 scsi: ufs: ufs-qcom: Remove unneeded code Checks information about tx_lanes, but is not used. Since commit 1e1e465c6d23 ("scsi/ufs: qcom: Remove ufs_qcom_phy_*() calls from host"), tx_lanes is deprecated. As a result, ufs_qcom_link_startup_notify -> POST_CHANGE action does nothing. If it is not going to be updated, it can be removed. Link: https://lore.kernel.org/r/20220627235545.16943-1-cw9316.lee@samsung.com Reviewed-by: Bart Van Assche Signed-off-by: ChanWoo Lee Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-qcom.c | 23 ----------------------- 1 file changed, 23 deletions(-) commit df1ea242e3d702342fd0c7c1a7b9ed6838645a05 Author: Alice Chao Date: Thu Jun 23 11:50:52 2022 +0800 scsi: ufs: ufs-mediatek: Fix invalid access to vccqx NULL pointer access issue was found for the regulator released by ufs_mtk_vreg_fix_vccq(). Simply fix this issue by clearing the released vreg pointer in ufs_hba struct. Link: https://lore.kernel.org/r/20220623035052.18802-9-stanley.chu@mediatek.com Reviewed-by: Stanley Chu Reviewed-by: Bart Van Assche Signed-off-by: Alice Chao Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 1 + 1 file changed, 1 insertion(+) commit c64c487d953331df239cf866d178612796e59f93 Author: Peter Wang Date: Thu Jun 23 11:50:51 2022 +0800 scsi: ufs: ufs-mediatek: Support performance boosting Add pm-qos request to support performance boosting in MediaTek UFS platforms. At the same time, adjust the order of function calls to be symmetric during the low-power control flow. Link: https://lore.kernel.org/r/20220623035052.18802-8-stanley.chu@mediatek.com Reviewed-by: Stanley Chu Reviewed-by: Bart Van Assche Signed-off-by: Peter Wang Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 34 ++++++++++++++++++++++++++-------- drivers/ufs/host/ufs-mediatek.h | 3 +++ 2 files changed, 29 insertions(+), 8 deletions(-) commit 2cf5cb2bb13140ecc0f01ebc8844ee8b5203293f Author: Po-Wen Kao Date: Thu Jun 23 11:50:50 2022 +0800 scsi: ufs: ufs-mediatek: Support host power control Add interfaces for controlling the host power to optimize the power consumption in MediaTek UFS platforms. Link: https://lore.kernel.org/r/20220623035052.18802-7-stanley.chu@mediatek.com Reviewed-by: Stanley Chu Reviewed-by: Bart Van Assche Signed-off-by: Po-Wen Kao Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 5 +++++ drivers/ufs/host/ufs-mediatek.h | 12 ++++++++++++ 2 files changed, 17 insertions(+) commit 4918694ccd6974f3ec8eeda3f34ace0ce480153e Author: Po-Wen Kao Date: Thu Jun 23 11:50:49 2022 +0800 scsi: ufs: ufs-mediatek: Disable reset confirm feature by UniPro In MediaTek UFS platforms, UniPro will not return reset confirm if it is in POWERDOWN state thus hang issue may happen while disabling UFSHCI. Simply disable this feature before UniPro leaves POWERDOWN state. Link: https://lore.kernel.org/r/20220623035052.18802-6-stanley.chu@mediatek.com Reviewed-by: Stanley Chu Reviewed-by: Bart Van Assche Signed-off-by: Po-Wen Kao Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 5 +++++ 1 file changed, 5 insertions(+) commit f53f19135765780f93dd0c9506a138d1b27ffd0e Author: Peter Wang Date: Thu Jun 23 11:50:48 2022 +0800 scsi: ufs: ufs-mediatek: Add stage information for ref-clk control Add "PRE_CHANGE" and "POST_CHANGE" information for ref-clk control to precisely configure the low-power state of the parent of ref-clk. Link: https://lore.kernel.org/r/20220623035052.18802-5-stanley.chu@mediatek.com Reviewed-by: Stanley Chu Reviewed-by: Bart Van Assche Signed-off-by: Peter Wang Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 9 +++++---- drivers/ufs/host/ufs-mediatek.h | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) commit 2bae03a6ac985fe80a7a228af3bcc2d5dbe43381 Author: Peter Wang Date: Thu Jun 23 11:50:47 2022 +0800 scsi: ufs: ufs-mediatek: Prevent host hang by setting CLK_CG early Some UFSHCI hosts in MediaTek UFS platform need workaround to prevent host hang issue by setting CLK_CG bit before host is enabled. This operation shall have no side effect on those platforms which do not support this bit. Link: https://lore.kernel.org/r/20220623035052.18802-4-stanley.chu@mediatek.com Reviewed-by: Stanley Chu Reviewed-by: Bart Van Assche Signed-off-by: Peter Wang Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 8 ++++++++ drivers/ufs/host/ufs-mediatek.h | 1 + 2 files changed, 9 insertions(+) commit 981b4ac04c2f7c24724d3b3a62c3d0c2fc9adcb7 Author: Peter Wang Date: Thu Jun 23 11:50:46 2022 +0800 scsi: ufs: ufs-mediatek: Always add delays for VCC operations MediaTek decides to always add delays before and after VCC is turned-off. Link: https://lore.kernel.org/r/20220623035052.18802-3-stanley.chu@mediatek.com Reviewed-by: Stanley Chu Reviewed-by: Bart Van Assche Signed-off-by: Peter Wang Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e7bf1d50063ce0dcae84ddbd27531a3ecec59e28 Author: Stanley Chu Date: Thu Jun 23 11:50:45 2022 +0800 scsi: ufs: ufs-mediatek: Fix build warnings Fix build warnings: 1. ../drivers/ufs/host/ufs-mediatek.c:1375:5: error: no previous prototype for function 'ufs_mtk_system_suspend' [-Werror,-Wmissing-prototypes] int ufs_mtk_system_suspend(struct device *dev) ^ ../drivers/ufs/host/ufs-mediatek.c:1375:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int ufs_mtk_system_suspend(struct device *dev) ^ static 2. ../drivers/ufs/host/ufs-mediatek.c:702:50: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat] snprintf(vcc_name, MAX_VCC_NAME, "vcc-ufs%lu", ver); ~~~ ^~~ %d Link: https://lore.kernel.org/r/20220623035052.18802-2-stanley.chu@mediatek.com Reviewed-by: Bart Van Assche Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b04e75a4a8a81887386a0d2dbf605a48e779d2a0 Author: Arnd Bergmann Date: Fri Jun 24 17:52:25 2022 +0200 scsi: dpt_i2o: Remove obsolete driver The dpt_i2o driver was fixed to stop using virt_to_bus() in 2008, but it still has a stale reference in an error handling code path that could never work. I submitted a patch to fix this reference earlier, but Hannes Reinecke suggested that removing the driver may be just as good here. The i2o driver layer was removed in 2015 with commit 4a72a7af462d ("staging: remove i2o subsystem"), but the even older dpt_i2o scsi driver stayed around. The last non-cleanup patches I could find were from Miquel van Smoorenburg and Mark Salyzyn back in 2008, they might know if there is any chance of the hardware still being used anywhere. Link: https://lore.kernel.org/linux-scsi/CAK8P3a1XfwkTOV7qOs1fTxf4vthNBRXKNu8A5V7TWnHT081NGA@mail.gmail.com/T/ Link: https://lore.kernel.org/r/20220624155226.2889613-3-arnd@kernel.org Cc: Miquel van Smoorenburg Cc: Mark Salyzyn Cc: Hannes Reinecke Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen Documentation/userspace-api/ioctl/ioctl-number.rst | 2 +- MAINTAINERS | 8 - drivers/scsi/Kconfig | 11 - drivers/scsi/Makefile | 1 - drivers/scsi/dpt/dpti_i2o.h | 441 --- drivers/scsi/dpt/dpti_ioctl.h | 136 - drivers/scsi/dpt/dptsig.h | 336 -- drivers/scsi/dpt/osd_defs.h | 79 - drivers/scsi/dpt/osd_util.h | 358 -- drivers/scsi/dpt/sys_info.h | 417 --- drivers/scsi/dpt_i2o.c | 3545 -------------------- drivers/scsi/dpti.h | 331 -- 12 files changed, 1 insertion(+), 5664 deletions(-) commit 9f7c2232e131b1de2ee4abadfce5d8f010e223c6 Author: Arnd Bergmann Date: Fri Jun 24 17:52:24 2022 +0200 scsi: BusLogic: Remove bus_to_virt() The BusLogic driver is the last remaining driver that relies on the deprecated bus_to_virt() function, which in turn only works on a few architectures, and is incompatible with both swiotlb and iommu support. Before commit 391e2f25601e ("[SCSI] BusLogic: Port driver to 64-bit."), the driver had a dependency on x86-32, presumably because of this problem. However, the change introduced another bug that made it still impossible to use the driver on any 64-bit machine. This was in turn fixed in commit 56f396146af2 ("scsi: BusLogic: Fix 64-bit system enumeration error for Buslogic"), 8 years later, which shows that there are not a lot of users. Maciej is still using the driver on 32-bit hardware, and Khalid mentioned that the driver works with the device emulation used in VirtualBox and VMware. Both of those only emulate it for Windows 2000 and older operating systems that did not ship with the better LSI logic driver. Do a minimum fix that searches through the list of descriptors to find one that matches the bus address. This is clearly as inefficient as was indicated in the code comment about the lack of a bus_to_virt() replacement. A better fix would likely involve changing out the entire descriptor allocation for a simpler one, but that would be much more invasive. Link: https://lore.kernel.org/r/20220624155226.2889613-2-arnd@kernel.org Cc: Maciej W. Rozycki Cc: Matt Wang Tested-by: Khalid Aziz Reviewed-by: Robin Murphy Reviewed-by: Hannes Reinecke Acked-by: Khalid Aziz Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen drivers/scsi/BusLogic.c | 35 +++++++++++++++++++++++------------ drivers/scsi/Kconfig | 2 +- 2 files changed, 24 insertions(+), 13 deletions(-) commit 07f0c8aff55156e0ef671fdc87bb44207cfc4f56 Author: Colin Ian King Date: Thu Jun 23 17:47:10 2022 +0100 scsi: fcoe: Remove redundant assignment to variable 'wlen' Variable wlen is being assigned a value that is never read, it is being re-assigned with a different value later on. The assignment is redundant and can be removed. Cleans up clang scan build warning: drivers/scsi/fcoe/fcoe.c:1491:2: warning: Value stored to 'wlen' is never read [deadcode.DeadStores] Link: https://lore.kernel.org/r/20220623164710.76831-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/scsi/fcoe/fcoe.c | 1 - 1 file changed, 1 deletion(-) commit 35d11ec239e0996291b140a61a677210ff854f11 Author: Krzysztof Kozlowski Date: Thu Jun 23 12:24:32 2022 +0200 scsi: ufs: ufshcd: Constify pointed data For code safety, constify arrays and pointers to data which is not modified. Link: https://lore.kernel.org/r/20220623102432.108059-4-krzysztof.kozlowski@linaro.org Reviewed-by: Bart Van Assche Signed-off-by: Krzysztof Kozlowski Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd-priv.h | 6 +++--- drivers/ufs/core/ufshcd.c | 42 ++++++++++++++++++++++-------------------- include/ufs/ufshcd.h | 6 +++--- 3 files changed, 28 insertions(+), 26 deletions(-) commit a48aac5dfc1bab0ed601e05a9447f675b17db91c Author: Krzysztof Kozlowski Date: Thu Jun 23 12:24:31 2022 +0200 scsi: ufs: ufshcd-pltfrm: Constify pointed data For code safety, constify pointers to data which is not modified. Link: https://lore.kernel.org/r/20220623102432.108059-3-krzysztof.kozlowski@linaro.org Reviewed-by: Bart Van Assche Signed-off-by: Krzysztof Kozlowski Signed-off-by: Martin K. Petersen drivers/ufs/host/ufshcd-pltfrm.c | 10 +++++----- drivers/ufs/host/ufshcd-pltfrm.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) commit 82295bc0d192d7e35e0568b18ca66da2c3058fd5 Author: Chanho Park Date: Mon Jun 27 10:38:45 2022 +0900 spi: s3c64xx: move dma_release_channel to unprepare This fixes the sequence of dma_release_channel. Since commit f52b03c70744 ("spi: s3c64xx: requests spi-dma channel only during data transfer"), dma_release_channel has been located in the s3c64xx_spi_transfer_one but this makes invalid return of can_dma callback. __spi_unmap_msg will check whether the request is requested by dma or not via can_dma callback. When it is calling to check it, the channels will be already released at the end of s3c64xx_spi_transfer_one so the callback function will return always "false". So, they can't be unmapped from __spi_unmap_msg call. To fix this, we need to add unprepare_transfer_hardware callback and move the dma_release_channel from s3c64xx_spi_transfer_one to there. Fixes: f52b03c70744 ("spi: s3c64xx: requests spi-dma channel only during data transfer") Signed-off-by: Chanho Park Link: https://lore.kernel.org/r/20220627013845.138350-1-chanho61.park@samsung.com Signed-off-by: Mark Brown drivers/spi/spi-s3c64xx.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit 917e43de2a56d9b82576f1cc94748261f1988458 Author: Guo Mengqi Date: Fri Jun 24 08:56:14 2022 +0800 spi: synquacer: Add missing clk_disable_unprepare() Add missing clk_disable_unprepare() in synquacer_spi_resume(). Reported-by: Hulk Robot Signed-off-by: Guo Mengqi Link: https://lore.kernel.org/r/20220624005614.49434-1-guomengqi3@huawei.com Signed-off-by: Mark Brown drivers/spi/spi-synquacer.c | 1 + 1 file changed, 1 insertion(+) commit bd10b0dafdcf0ec1677cad70101e1f97b9e28f2e Author: Krzysztof Kozlowski Date: Mon Jun 27 16:19:00 2022 +0200 ASoC: samsung: h1940_uda1380: include proepr GPIO consumer header h1940_uda1380 uses gpiod*/GPIOD* so it should include GPIO consumer header. Fixes: 9666e27f90b9 ("ASoC: samsung: h1940: turn into platform driver") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220627141900.470469-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown sound/soc/samsung/h1940_uda1380.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f43ff8038e8289ca811b5b89e8cc15083dafe5c4 Author: Krzysztof Kozlowski Date: Mon Jun 27 16:34:12 2022 +0200 ASoC: samsung: Enable compile test Allow compile testing of Samsung SoC Sound drivers. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220627143412.477226-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown sound/soc/samsung/Kconfig | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 3e4bac7cf06e46225322f264e7387efe6ddd457e Author: Krzysztof Kozlowski Date: Mon Jun 27 16:34:11 2022 +0200 ASoC: samsung: s3c24xx-i2s: Drop unneeded gpio.h include The module does not use anything from gpio.h header. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220627143412.477226-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown sound/soc/samsung/s3c24xx-i2s.c | 1 - 1 file changed, 1 deletion(-) commit 17a1ffc7bc4d5b4657d0f3fe5c01778d8fcab9a3 Author: Krzysztof Kozlowski Date: Mon Jun 27 16:34:10 2022 +0200 ASoC: samsung: s3c-i2s-v2: Allow build for unsupported hardware There is no particular need to restrict building of S3C I2S driver to supported platforms within the C unit, because Kconfig does it. Removing such restricting #ifdef from s3c-i2s-v2 allows compile testing it on other platforms. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220627143412.477226-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown sound/soc/samsung/s3c-i2s-v2.c | 11 ----------- 1 file changed, 11 deletions(-) commit f0ea452715d72bc365d2b401ceb458f5ae82eeec Author: Jeff LaBundy Date: Mon Jun 27 15:16:15 2022 -0700 dt-bindings: input: iqs7222: Extend slider-mapped GPIO to IQS7222C Although the IQS7222C does not offer slider gesture support, the press/release event can still be mapped to any of the IQS7222C's three GPIO pins. Update the binding to reflect this relationship. Fixes: 44dc42d254bf ("dt-bindings: input: Add bindings for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220626072412.475211-10-jeff@labundy.com Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/azoteq,iqs7222.yaml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 6cfb357851bd3ef0a48e14bccfb5ca6b8104ea61 Author: Jeff LaBundy Date: Mon Jun 27 15:16:00 2022 -0700 dt-bindings: input: iqs7222: Correct bottom speed step size The bottom speed property is specified in steps of 1, not 4. Fixes: 44dc42d254bf ("dt-bindings: input: Add bindings for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220626072412.475211-9-jeff@labundy.com Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f5d2c1ed72c26152e6883ed67dc3004a39165098 Author: Jeff LaBundy Date: Mon Jun 27 15:15:46 2022 -0700 dt-bindings: input: iqs7222: Remove support for RF filter The vendor has marked the RF filter enable control as reserved in the datasheet; remove it from the binding. Fixes: 44dc42d254bf ("dt-bindings: input: Add bindings for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220626072412.475211-8-jeff@labundy.com Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml | 4 ---- 1 file changed, 4 deletions(-) commit 381932cf61d52bde656c8596c0cb8f46bed53dc0 Author: Jeff LaBundy Date: Mon Jun 27 15:15:25 2022 -0700 Input: iqs7222 - remove support for RF filter The vendor has marked the RF filter enable control as reserved in the datasheet; remove it from the driver. Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220626072412.475211-7-jeff@labundy.com Signed-off-by: Dmitry Torokhov drivers/input/misc/iqs7222.c | 7 ------- 1 file changed, 7 deletions(-) commit 8635c68891c6d786d644747d599c41bdf512fbbf Author: Jeff LaBundy Date: Mon Jun 27 15:15:09 2022 -0700 Input: iqs7222 - handle reset during ATI If the device suffers a spurious reset during ATI, there is no point in enduring any further retries. Instead, simply return successfully from the polling loop. In this case, the interrupt handler will intervene and recognize the device has been reset. It then proceeds to initialize the device and trigger ATI once more. As part of this change, swap the order of status field evaluation to match that of the interrupt handler, and correct a nearby off-by-one error that causes an error message to suggest the final attempt will be retried. Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220626072412.475211-6-jeff@labundy.com Signed-off-by: Dmitry Torokhov drivers/input/misc/iqs7222.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 2e70ef525b7309287b2d4dd24e7c9c038a006328 Author: Jeff LaBundy Date: Mon Jun 27 15:14:42 2022 -0700 Input: iqs7222 - acknowledge reset before writing registers If the device suffers a spurious reset while reacting to a previous spurious reset, the second reset interrupt is preempted because the ACK_RESET bit is written last. To solve this problem, write the ACK_RESET bit prior to writing any other registers. This ensures that any registers written before the second spurious reset will be rewritten. Last but not least, the order in which the ACK_RESET bit is written relative to the second filter beta register is important for select variants of silicon. Enforce the correct order so as to not clobber the system status register. Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220626072412.475211-5-jeff@labundy.com Signed-off-by: Dmitry Torokhov drivers/input/misc/iqs7222.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) commit 1e4189d8af2749e2db406f92bdc4abccbab63138 Author: Jeff LaBundy Date: Mon Jun 27 15:14:23 2022 -0700 Input: iqs7222 - protect volatile registers Select variants of silicon silently mirror part of the event mask register to the system setup register (0xD0), and vice versa. For the following sequence: 1. Read registers 0xD0 onward and store their contents. 2. Modify the contents, including event mask fields. 3. Write registers 0xD0 onward with the modified contents. 4. Write register 0xD0 on its own again later, using the contents from step 1 to populate any reserved fields. ...the event mask register (e.g. address 0xDA) has been corrupted by writing register 0xD0 with contents that were made stale after step 3. To solve this problem, read register 0xD0 once more between steps 3 and 4. When register 0xD0 is written during step 4, the portion which is mirrored to the event mask register already matches what was written in step 3. Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220626072412.475211-4-jeff@labundy.com Signed-off-by: Dmitry Torokhov drivers/input/misc/iqs7222.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 95215d3d19c5b47b8ccef8cb61c9dcd17ac7a669 Author: Jeff LaBundy Date: Mon Jun 27 15:14:04 2022 -0700 Input: iqs7222 - fortify slider event reporting The release cycle of any key mapped to a slider gesture relies upon trailing interrupts generated by other unmasked sources, the timing and presence of which are inconsistent. To solve this problem, explicitly report a release cycle to emulate a full keystroke. Also, unmask touch interrupts if the slider press event is defined; this ensures the device reports a final interrupt with coordinate = 0xFFFF once the finger is lifted. As a result of how the logic has been refactored, the press/release event can now be mapped to a GPIO. This is more convenient than the previous solution, which required each channel within the slider to specify the same GPIO. As part of this change, use the device's resolution rather than its number of interrupt status registers to more safely determine if it is capable of reporting gestures. Last but not least, make the code a bit simpler by eliminating some unnecessarily complex conditional statements and a macro that could be derived using information that is already available. Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220626072412.475211-3-jeff@labundy.com Signed-off-by: Dmitry Torokhov drivers/input/misc/iqs7222.c | 96 ++++++++++++++++++++++++++------------------ 1 file changed, 58 insertions(+), 38 deletions(-) commit 56a0c54c4c2bdb6c0952de90dd690020a703b50e Author: Jeff LaBundy Date: Mon Jun 27 15:13:49 2022 -0700 Input: iqs7222 - correct slider event disable logic If a positive swipe/flick gesture is defined but the corresponding negative gesture is not, the former is inadvertently disabled. Fix this by gently refactoring the logic responsible for disabling all gestures by default. As part of this change, make the code a bit simpler by eliminating a superfluous conditional check. If a slider event does not define an enable control, the second term of the bitwise AND operation is simply 0xFFFF. Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220626072412.475211-2-jeff@labundy.com Signed-off-by: Dmitry Torokhov drivers/input/misc/iqs7222.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 5372de4e4545dead978c53d9c03b7aee12d0f94d Author: Akira Yokosawa Date: Thu Jun 9 22:28:40 2022 +0900 docs/doc-guide: Put meta title for kernel-doc HTML page kernel-doc.rst has two 1st level section titles of "Writing kernel-doc comments" and "Including kernel-doc comments". Therefore, rather than using the first one, put a meta title of "Kernel-doc comments" for the title of the resulting HTML page by using the "title" directive. Signed-off-by: Akira Yokosawa Link: https://lore.kernel.org/r/15636c13-7fa2-f973-6d3d-361222b839ef@gmail.com Signed-off-by: Jonathan Corbet Documentation/doc-guide/kernel-doc.rst | 2 ++ 1 file changed, 2 insertions(+) commit 7c43214dddfddbb7fd2dac9bf543a056b34ce58c Author: Akira Yokosawa Date: Thu Jun 9 22:23:27 2022 +0900 docs/doc-guide: Add footnote on Inkscape for better images in PDF documents With kernel releases v5.18 and later, if you have Inkscape, images embedded in PDF documents are of vector graphics, not the raster images as are the case with pre-v5.18 releases. Even with pre-5.18 releases, having Inkscape would improve images converted from some of SVG files which are not fully covered by the limited capability of rsvg-convert(1) [1]. Add a footnote mentioning the expected improvements of such images. Link: https://gitlab.gnome.org/GNOME/librsvg#non-goals-of-librsvg [1] Signed-off-by: Akira Yokosawa Link: https://lore.kernel.org/r/81cddbde-bc28-bec1-fca4-3c8fe2df502f@gmail.com Signed-off-by: Jonathan Corbet Documentation/doc-guide/sphinx.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 820636106342a6c5cfbb8279a4bf029ea2e00acd Author: Muhammad Usama Anjum Date: Sat May 21 12:36:51 2022 +0500 docs/kselftest: add more guidelines for adding new tests Improve and add instructions to add new tests. Add build commands to test before sending the new test patch. Signed-off-by: Muhammad Usama Anjum Reviewed-by: Shuah Khan Link: https://lore.kernel.org/r/20220521073651.4191910-1-usama.anjum@collabora.com Signed-off-by: Jonathan Corbet Documentation/dev-tools/kselftest.rst | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 6de8d58cf98dd93f054291e9ac354d4becfc8c7e Author: Wu XiangCheng Date: Tue Jun 7 01:14:33 2022 +0800 docs/zh_CN: Update zh_CN/kernel-hacking/hacking.rst to 5.19-rc1 * update to commit f35cf1a59e9a ("Documentation: kernel-hacking: minor edits for style") * fix a homophone typo reported by Li Feng Reported-by: Li Feng Signed-off-by: Wu XiangCheng Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/Yp41+eTjoPRa4hrl@bobwxc.mipc Signed-off-by: Jonathan Corbet .../translations/zh_CN/kernel-hacking/hacking.rst | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 17c260504f6fb3d7da096fdad1774ac262aaac7d Author: Yanteng Si Date: Tue Jun 7 15:13:18 2022 +0800 docs/zh_CN: add vm vmalloced-kernel-stacks translation Translate .../vm/vmalloced-kernel-stacks.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/01de54c7ecfd1999a636ee59ac40b79917251af2.1654585011.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/vm/index.rst | 2 +- .../zh_CN/vm/vmalloced-kernel-stacks.rst | 133 +++++++++++++++++++++ 2 files changed, 134 insertions(+), 1 deletion(-) commit 3f39b3d70fcdea68e8e9c7b9d1e763fe90418ca0 Author: Yanteng Si Date: Tue Jun 7 15:13:00 2022 +0800 docs/zh_CN: add vm page_migration translation Translate .../vm/page_migration.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/44bc4486e5019f689bcbec20a629a9f7800ece33.1654585011.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/vm/index.rst | 2 +- .../translations/zh_CN/vm/page_migration.rst | 228 +++++++++++++++++++++ 2 files changed, 229 insertions(+), 1 deletion(-) commit f41c74af10583fa440deed2713488176e7efa8b7 Author: Binbin Zhou Date: Wed Jun 8 19:08:21 2022 +0800 docs/zh_CN: riscv: Update the translation of vm-layout.rst to 5.19-rc1 Synchronous translation from upstream commit 9d19f2b5256e ("Documentation: riscv: Add sv48 description to VM layout") Signed-off-by: Binbin Zhou Reviewed-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/10cd6a241a0266d1d19ee5f0b2177d7d14d17ed2.1654685338.git.zhoubinbin@loongson.cn Signed-off-by: Jonathan Corbet .../translations/zh_CN/riscv/vm-layout.rst | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 1a5b8aa25f153318efecc1fb5b9048a748f49ef2 Author: Binbin Zhou Date: Wed Jun 8 19:08:20 2022 +0800 docs/zh_CN: riscv: Remove the translation of pmu.rst Synchronous translation from the following: [1]: commit 23b1f18326ec("Documentation: riscv: Remove the old documentation") [2]: commit 8933e7f2e375 ("Documentation: riscv: remove non-existent directory from table of contents") Signed-off-by: Binbin Zhou Reviewed-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/6fe45d69210300a6c065262470bce963f8dc0ec3.1654685338.git.zhoubinbin@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/riscv/index.rst | 1 - Documentation/translations/zh_CN/riscv/pmu.rst | 235 ----------------------- 2 files changed, 236 deletions(-) commit 87444fdce5bb3249f740f5e7f66443169b3003a8 Author: Dongliang Mu Date: Mon Jun 13 15:12:42 2022 +0800 docs: dev-tools: modify SPL reference URL to actual SPL doc entry Fix the invalid url about Semantic Patch Language Signed-off-by: Dongliang Mu Link: https://lore.kernel.org/r/20220613071243.12961-1-dzm91@hust.edu.cn Signed-off-by: Jonathan Corbet Documentation/dev-tools/coccinelle.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d218bee86aa570daae9b3c8dc375ac6110813782 Author: Chao Liu Date: Mon Jun 13 10:08:00 2022 +0800 docs: filesystems: f2fs: fix description about compress ioctl Since commit c61404153eb6 ("f2fs: introduce FI_COMPRESS_RELEASED instead of using IMMUTABLE bit"), we no longer use the IMMUTABLE bit to prevent writing data for compression. Let's correct the corresponding documentation. BTW, this patch fixes some alignment issues in the compress metadata layout. Signed-off-by: Chao Liu Link: https://lore.kernel.org/r/20220613020800.3379482-1-chaoliu719@gmail.com Signed-off-by: Jonathan Corbet Documentation/filesystems/f2fs.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 910cb3137c076dc908e267bad034364cd9e4af6e Author: Yanteng Si Date: Thu Jun 16 15:44:58 2022 +0800 docs/zh_CN: Update the translation of vm index to 5.19-rc1 update to commit 481cc97349d6 ("mm,doc: Add new documentation structure") Note: There are some empty files that do not need to be updated for now, they are: bootmem, oom, page_allocation, page_cache, page_reclaim, page_tables, physical_memory process_addrs, shmfs, slab, vmalloc, swap. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/35d10864fb9b57bf288d4efa5642f93a60079029.1655362610.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/vm/index.rst | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit 34191e04cd49c1b5b7a6a558b328c0b0d7b4b404 Author: Yanteng Si Date: Thu Jun 16 15:44:57 2022 +0800 docs/zh_CN: Update the translation of page_owner to 5.19-rc1 update to commit d1ed51fcdbd6 ("docs: vm/page_owner: tweak literal block in STANDARD FORMAT SPECIFIERS") Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/e96557b73b036c33a9fa5abdab0c541704235e92.1655362610.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/vm/page_owner.rst | 79 +++++++++++++++++++--- 1 file changed, 70 insertions(+), 9 deletions(-) commit 882946793000debbd83253216b7f4ee7d2496b5e Author: Yanteng Si Date: Thu Jun 16 15:44:56 2022 +0800 docs/zh_CN: Update the translation of highmem to 5.19-rc1 update to commit 110bf7a52307 ("Documentation/vm: rework "Temporary Virtual Mappings" section") Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/76c418554d9b8d395f7e8331e8e3b89d1b7beff0.1655362610.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/vm/highmem.rst | 77 ++++++++++++++----------- 1 file changed, 43 insertions(+), 34 deletions(-) commit 58eaa6b3fb636072a4f19e6b6c76bbf564e95b95 Author: Vinay Belgaumkar Date: Wed Jun 22 17:32:25 2022 -0700 drm/i915/guc/slpc: Use non-blocking H2G for waitboost SLPC min/max frequency updates require H2G calls. We are seeing timeouts when GuC channel is backed up and it is unable to respond in a timely fashion causing warnings and affecting CI. This is seen when waitboosting happens during a stress test. this patch updates the waitboost path to use a non-blocking H2G call instead, which returns as soon as the message is successfully transmitted. v2: Use drm_notice to report any errors that might occur while sending the waitboost H2G request (Tvrtko) v3: Add drm_notice inside force_min_freq (Ashutosh) Cc: Ashutosh Dixit Signed-off-by: Vinay Belgaumkar Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20220623003225.23301-1-vinay.belgaumkar@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c | 42 ++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 7 deletions(-) commit d62cac46b0184b8730c68b01359a33769fee821b Author: Krzysztof Kozlowski Date: Fri May 13 08:13:41 2022 +0200 dt-bindings: clock: qcom,gcc-sdm845: add parent power domain Allow Qualcomm GCC to register its parent power domain (e.g. RPMHPD) to properly pass performance state from children. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bjorn Andersson Acked-by: Rob Herring Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220513061347.46480-2-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/clock/qcom,gcc-sdm845.yaml | 3 +++ 1 file changed, 3 insertions(+) commit cb0b68537713208824af74f2b1dbae22e8e52f82 Author: Krzysztof Kozlowski Date: Mon May 9 16:47:14 2022 +0200 arm64: dts: qcom: sdm630: order interrupts according to bindings The CAMSS DTSI device node, which came after the bindings were merged, got the interrupts ordered differently then specified in the bindings: sdm630-sony-xperia-nile-pioneer.dtb: camss@ca00000: interrupt-names:0: 'csid0' was expected Reordering them to match bindings should not cause ABI issues, because the driver relies on names, not ordering. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220509144714.144154-4-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 7908dcc8be2db90c9d9bbcbd5fb021f935b76b26 Author: Krzysztof Kozlowski Date: Mon May 9 16:47:13 2022 +0200 arm64: dts: qcom: sdm630: order regs according to bindings The CAMSS DTSI device node, which came after the bindings were merged, got the regs ordered differently then specified in the bindings: sdm636-sony-xperia-ganges-mermaid.dtb: camss@ca00000: reg-names:0: 'csi_clk_mux' was expected Reordering them to match bindings should not cause ABI issues, because the driver relies on names, not ordering. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220509144714.144154-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit e8881372ccc6ff5a86bddeb4ebc248ff892d2ffc Author: Krzysztof Kozlowski Date: Mon May 9 16:47:12 2022 +0200 arm64: dts: qcom: sdm630: order clocks according to bindings The CAMSS DTSI device node, which came after the bindings were merged, got the clocks ordered differently then specified in the bindings: sdm636-sony-xperia-ganges-mermaid.dtb: camss@ca00000: reg-names:4: 'csid3' was expected Reordering them to match bindings should not cause ABI issues, because the driver relies on names, not ordering. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220509144714.144154-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 168 +++++++++++++++++------------------ 1 file changed, 84 insertions(+), 84 deletions(-) commit eea939a0da869e00f40e41182edbcd911ee11fd4 Author: Krzysztof Kozlowski Date: Sun May 8 15:59:32 2022 +0200 ARM: dts: qcom: add missing gpio-ranges in PMIC GPIOs The new Qualcomm PMIC GPIO bindings require gpio-ranges property: qcom-sdx55-telit-fn980-tlb.dtb: gpio@c000: 'gpio-ranges' is a required property Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220508135932.132378-5-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-pmx55.dtsi | 1 + arch/arm/boot/dts/qcom-pmx65.dtsi | 1 + 2 files changed, 2 insertions(+) commit 255889f4baf51e887c83333d82ac8470a11246e4 Author: Krzysztof Kozlowski Date: Sat May 7 21:49:13 2022 +0200 ARM: dts: qcom: pmx65: add fallback compatible to PMIC GPIO The bindings require all PMIC GPIO nodes to have two compatibles - specific followed by SPMI or SSBI fallback. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220507194913.261121-12-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-pmx65.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc590cdc31f636ea15658f1206c3e380a53fb78e Author: Krzysztof Kozlowski Date: Sat May 7 21:49:12 2022 +0200 ARM: dts: qcom: mdm9615: add missing PMIC GPIO reg 'reg' property is required in SSBI children: qcom-mdm9615-wp8548-mangoh-green.dtb: gpio@150: 'reg' is a required property Fixes: 2c5e596524e7 ("ARM: dts: Add MDM9615 dtsi") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220507194913.261121-11-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-mdm9615.dtsi | 1 + 1 file changed, 1 insertion(+) commit 4fcdaf4b0320f93d0ccb4d36b795ed258fb07b27 Author: Krzysztof Kozlowski Date: Sat May 7 21:49:11 2022 +0200 ARM: dts: qcom: align PMIC GPIO pin configuration with DT schema DT schema expects PMIC GPIO pin configuration nodes to be named with '-state' suffix. Optional children should be either 'pinconf' or followed with '-pins' suffix. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220507194913.261121-10-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-apq8060-dragonboard.dts | 20 ++++++++++---------- arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts | 4 ++-- arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 8 ++++---- .../boot/dts/qcom-apq8064-sony-xperia-lagan-yuga.dts | 2 +- arch/arm/boot/dts/qcom-mdm9615-wp8548.dtsi | 2 +- .../boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 8 ++++---- .../arm/boot/dts/qcom-msm8974-sony-xperia-rhine.dtsi | 2 +- arch/arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dts | 2 +- arch/arm/boot/dts/qcom-msm8974pro-samsung-klte.dts | 14 +++++++------- .../qcom-msm8974pro-sony-xperia-shinano-castor.dts | 10 +++++----- arch/arm/boot/dts/qcom-pm8941.dtsi | 2 +- 11 files changed, 37 insertions(+), 37 deletions(-) commit 761a8fe4f3dbe1f840fa9eb6890ed035f5b23a43 Author: Krzysztof Kozlowski Date: Sat May 7 21:49:10 2022 +0200 arm64: dts: qcom: msm8994-msft-lumia-octagon: add PM8994 pin properties The bindings require that every pin configuration comes with 'function' property. There is also no 'drive-strength' property but 'qcom,drive-strength': msm8994-msft-lumia-octagon-cityman.dtb: gpios@c000: amsel-high-state: 'oneOf' conditional failed, one must be fixed: 'drive-strength' does not match any of the regexes: 'pinctrl-[0-9]+' 'bias-pull-up', 'drive-strength', 'function', 'pins' do not match any of the regexes: '(pinconf|-pins)$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220507194913.261121-9-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8994-msft-lumia-octagon.dtsi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 9f454375bc3e4f1acfa5b1f97721637c7a165986 Author: Krzysztof Kozlowski Date: Sat May 7 21:49:09 2022 +0200 arm64: dts: qcom: apq8096-db820c: add PM8994 pin function The bindings require that every pin configuration comes with 'function' property. Add such to PM8994 GPIO5. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220507194913.261121-8-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 1 + 1 file changed, 1 insertion(+) commit 019102a912c61961afb85f575f24272551d367ca Author: Krzysztof Kozlowski Date: Sat May 7 21:49:08 2022 +0200 arm64: dts: qcom: add fallback compatible to PMIC GPIOs The bindings require all PMIC GPIO nodes to have two compatibles - specific followed by SPMI or SSBI fallback. Add the fallback to fix warnings like: msm8916-samsung-serranove.dtb: gpios@c000: compatible: ['qcom,pm8916-gpio'] is too short Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220507194913.261121-7-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/pm6350.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm660.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm8009.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm8150.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm8150b.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm8150l.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm8350.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm8350b.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm8916.dtsi | 2 +- arch/arm64/boot/dts/qcom/pmm8155au_1.dtsi | 2 +- arch/arm64/boot/dts/qcom/pmm8155au_2.dtsi | 2 +- arch/arm64/boot/dts/qcom/pmr735b.dtsi | 2 +- arch/arm64/boot/dts/qcom/pms405.dtsi | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) commit ff36bed5dc24ba25d4ff9882d3cdb37d31ceeaf4 Author: Krzysztof Kozlowski Date: Sat May 7 21:49:07 2022 +0200 arm64: dts: qcom: align PMIC GPIO pin configuration with DT schema DT schema expects PMIC GPIO pin configuration nodes to be named with '-state' suffix. Optional children should be either 'pinconf' or followed with '-pins' suffix. This fixes dtbs_check warnings like: sdm845-xiaomi-beryllium.dtb: gpios@c000: 'vol-up-active' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220507194913.261121-6-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 10 ++-- arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 16 ++--- .../dts/qcom/msm8916-samsung-a2015-common.dtsi | 2 +- .../boot/dts/qcom/msm8994-msft-lumia-octagon.dtsi | 10 ++-- .../boot/dts/qcom/msm8996-sony-xperia-tone.dtsi | 70 +++++++++++----------- .../arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi | 8 +-- arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts | 2 +- arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts | 6 +- .../boot/dts/qcom/msm8998-oneplus-cheeseburger.dts | 2 +- .../boot/dts/qcom/msm8998-oneplus-common.dtsi | 2 +- .../dts/qcom/msm8998-sony-xperia-yoshino-maple.dts | 2 +- .../boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi | 12 ++-- arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 4 +- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 2 +- arch/arm64/boot/dts/qcom/sc7180-idp.dts | 2 +- arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi | 4 +- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 6 +- .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 4 +- arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 2 +- .../boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 2 +- arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 2 +- 22 files changed, 86 insertions(+), 86 deletions(-) commit 4148a9eeb15152865d60b0913d96beb7ca166f9a Author: Marijn Suijten Date: Mon Jun 20 23:12:12 2022 +0200 arm64: dts: qcom: sdm845-akatsuki: Round down l22a regulator voltage 2700000 is not a multiple of pmic4_pldo's step size of 8000 (with base voltage 1664000), resulting in pm8998-rpmh-regulators not probing. Just as we did with MSM8998's Sony Yoshino Poplar [1], round the voltages down to err on the cautious side and leave a comment in place to document this discrepancy wrt downstream sources. [1]: https://lore.kernel.org/linux-arm-msm/20220507153627.1478268-1-marijn.suijten@somainline.org/ Fixes: 30a7f99befc6 ("arm64: dts: qcom: Add support for SONY Xperia XZ2 / XZ2C / XZ3 (Tama platform)") Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220620211212.269956-1-marijn.suijten@somainline.org arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akatsuki.dts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 39eebfce4bdb88f53959d570ab9c8956bb9f0988 Author: Rohit Agarwal Date: Wed Jun 1 16:15:11 2022 +0530 ARM: dts: qcom: sdx65: Add Watchdog support Enable Watchdog support for Application Processor Subsystem (APSS) block on SDX65 platform. Signed-off-by: Rohit Agarwal Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1654080312-5408-11-git-send-email-quic_rohiagar@quicinc.com arch/arm/boot/dts/qcom-sdx65.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 2ea6af6cc1f58f828180cf6124febbde47a10bad Author: Rohit Agarwal Date: Wed Jun 1 16:15:05 2022 +0530 dt-bindings: firmware: scm: Add compatible for SDX65 Add devicetree compatible for SCM present in SDX65 platform. Signed-off-by: Rohit Agarwal Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1654080312-5408-5-git-send-email-quic_rohiagar@quicinc.com Documentation/devicetree/bindings/firmware/qcom,scm.txt | 1 + 1 file changed, 1 insertion(+) commit df6d7b86f4885d370886a44339017e32c80556e7 Author: Rohit Agarwal Date: Wed Jun 1 16:15:12 2022 +0530 ARM: dts: qcom: sdx65: Add pshold support Add support for pshold block to drive pshold towards the PMIC, which is used to trigger a configurable event such as reboot or poweroff of the SDX65 platform. Signed-off-by: Rohit Agarwal Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1654080312-5408-12-git-send-email-quic_rohiagar@quicinc.com arch/arm/boot/dts/qcom-sdx65.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit aae0f5314f95df66962acfcce23158e2a047b03c Author: Rohit Agarwal Date: Wed Jun 1 16:15:08 2022 +0530 ARM: dts: qcom: sdx65-mtp: Enable modem Enable modem on SDX65 MTP board. Signed-off-by: Rohit Agarwal Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1654080312-5408-8-git-send-email-quic_rohiagar@quicinc.com arch/arm/boot/dts/qcom-sdx65-mtp.dts | 5 +++++ 1 file changed, 5 insertions(+) commit a3ae01ed96e7efc2525125c36dc8e34186f0d7bc Author: Rohit Agarwal Date: Wed Jun 1 16:15:07 2022 +0530 ARM: dts: qcom: sdx65: Add Modem remoteproc node Add modem support to SDX65 using the PAS remoteproc driver. Signed-off-by: Rohit Agarwal Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1654080312-5408-7-git-send-email-quic_rohiagar@quicinc.com arch/arm/boot/dts/qcom-sdx65.dtsi | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 261e09b4e3fb847b9a1e99538e31fdfdc2d1ee90 Author: Rohit Agarwal Date: Wed Jun 1 16:15:06 2022 +0530 ARM: dts: qcom: sdx65: Add SCM node Add SCM node to enable SCM functionality on SDX65 platform. Signed-off-by: Rohit Agarwal Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1654080312-5408-6-git-send-email-quic_rohiagar@quicinc.com arch/arm/boot/dts/qcom-sdx65.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 69117a2abfe0b02c6828979e8a6f9b039908b42a Author: Rohit Agarwal Date: Wed Jun 1 16:15:04 2022 +0530 ARM: dts: qcom: sdx65: Add IMEM and PIL info region Add a simple-mfd representing IMEM on SDX65 and define the PIL relocation info region, so that post mortem tools will be able to locate the loaded remoteproc. Signed-off-by: Rohit Agarwal Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1654080312-5408-4-git-send-email-quic_rohiagar@quicinc.com arch/arm/boot/dts/qcom-sdx65.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 7f928c735880ed20e4d7670416aa7877b47a47d1 Author: Rohit Agarwal Date: Wed Jun 1 16:15:03 2022 +0530 ARM: dts: qcom: sdx65: Add modem SMP2P node Add SMP2P nodes for the SDX65 platform to communicate with the modem. Signed-off-by: Rohit Agarwal Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1654080312-5408-3-git-send-email-quic_rohiagar@quicinc.com arch/arm/boot/dts/qcom-sdx65.dtsi | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit b427679adcddf9d56b28175d435fc7ec4d4c99ef Author: Rohit Agarwal Date: Wed Jun 1 16:15:02 2022 +0530 ARM: dts: qcom: sdx65: Add CPUFreq support Add CPUFreq support to SDX65 platform using the cpufreq-dt driver. There is no dedicated hardware block available on this platform to carry on the CPUFreq duties. Hence, it is accomplished using the CPU clock and regulators tied together by the operating points table. Signed-off-by: Rohit Agarwal Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1654080312-5408-2-git-send-email-quic_rohiagar@quicinc.com arch/arm/boot/dts/qcom-sdx65.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 59e73f67e14b95eddbbff2f009c98a55cef47f8a Author: Kaushal Kumar Date: Mon May 2 10:08:06 2022 -0700 ARM: dts: qcom: sdx65-mtp: Enable QPIC NAND support Enable QPIC NAND devicetree node for Qualcomm SDX65-MTP board. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Kaushal Kumar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1651511286-18690-5-git-send-email-quic_kaushalk@quicinc.com arch/arm/boot/dts/qcom-sdx65-mtp.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit eae61fddd64861fc496a7786b02449abe8188145 Author: Kaushal Kumar Date: Mon May 2 10:08:05 2022 -0700 ARM: dts: qcom: sdx65-mtp: Enable QPIC BAM support Enable QPIC BAM devicetree node for Qualcomm SDX65-MTP board. While at it, sort the blsp1_uart3 node in alphabetical order and set it's status as "okay". Reviewed-by: Manivannan Sadhasivam Signed-off-by: Kaushal Kumar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1651511286-18690-4-git-send-email-quic_kaushalk@quicinc.com arch/arm/boot/dts/qcom-sdx65-mtp.dts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 0ec15b6f7621c2e5ded3d3d1a67361da1895c26b Author: Kaushal Kumar Date: Mon May 2 10:08:04 2022 -0700 ARM: dts: qcom: sdx65: Add QPIC NAND support Add devicetree node to enable support for QPIC NAND controller on Qualcomm SDX65 platform. Since there is no "aon" clock in SDX65, a dummy clock is provided. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Kaushal Kumar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1651511286-18690-3-git-send-email-quic_kaushalk@quicinc.com arch/arm/boot/dts/qcom-sdx65.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit ab11b74d87ddadb1e6e6d8dc36f3145a26158ef2 Author: Kaushal Kumar Date: Mon May 2 10:08:03 2022 -0700 ARM: dts: qcom: sdx65: Add QPIC BAM support Add devicetree node to enable support for QPIC BAM DMA controller on Qualcomm SDX65 platform. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Kaushal Kumar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1651511286-18690-2-git-send-email-quic_kaushalk@quicinc.com arch/arm/boot/dts/qcom-sdx65.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit eeaec4f2b926ffcb35a9c1c4af549ac9f7a6ce56 Author: Rohit Agarwal Date: Mon May 2 14:36:35 2022 +0530 ARM: dts: qcom: sdx65-mtp: Enable USB3 and PHY support Enable the support for USB3 controller, QMP PHY and HS PHY on SDX65 MTP. Signed-off-by: Rohit Agarwal Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1651482395-29443-5-git-send-email-quic_rohiagar@quicinc.com arch/arm/boot/dts/qcom-sdx65-mtp.dts | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) commit fbb6447deba87dc409e274d9d6d90d9c79851fb7 Author: Rohit Agarwal Date: Mon May 2 14:36:34 2022 +0530 ARM: dts: qcom: sdx65: Add USB3 and PHY support Add devicetree nodes for enabling USB3 controller, Qcom QMP PHY and SNPS HS PHY on SDX65. Signed-off-by: Rohit Agarwal Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1651482395-29443-4-git-send-email-quic_rohiagar@quicinc.com arch/arm/boot/dts/qcom-sdx65.dtsi | 83 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit b456b5e7d1df276a4e1050680eec86ccb99d8a82 Author: Rohit Agarwal Date: Mon May 2 14:36:32 2022 +0530 ARM: dts: qcom: sdx65: Add interconnect nodes Add interconnect devicetree nodes in SDX65 platform. Signed-off-by: Rohit Agarwal Acked-by: Krzysztof Kozlowski [bjorn: Sorted nodes] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1651482395-29443-2-git-send-email-quic_rohiagar@quicinc.com arch/arm/boot/dts/qcom-sdx65.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit e378b965330d99e8622eb369021d0dac01591046 Author: Rohit Agarwal Date: Mon May 2 14:07:45 2022 +0530 ARM: dts: qcom: sdx65: Add Shared memory manager support Add smem node to support shared memory manager on SDX65 platform. Signed-off-by: Rohit Agarwal Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1651480665-14978-5-git-send-email-quic_rohiagar@quicinc.com arch/arm/boot/dts/qcom-sdx65.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 68333a42fcf53f20aa09567f8b57216438cdd2f6 Author: Konrad Dybcio Date: Sat Apr 30 18:26:42 2022 +0200 arm64: dts: qcom: msm8996: Add SDHCI resets On MSM8996, the default bootloader configuration leaves the hosts in some weird state that never allows them to function properly under Linux. Add the hardware resets so that we can start clean and get them actually working. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430162642.608106-1-konrad.dybcio@somainline.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit a743dff7acc4a4c613e6853a8748430946f941a4 Author: Konrad Dybcio Date: Sat Apr 30 18:25:24 2022 +0200 arm64: dts: qcom: msm8996-tone: Rule out PM(I)8994 variants It looks like all Tone devices out in the wild are using PMI8996, which suggests the PMI8994-variant DTs are not needed. Remove them. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430162525.607946-1-konrad.dybcio@somainline.org arch/arm64/boot/dts/qcom/Makefile | 3 --- .../boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-dora.dts | 11 ----------- .../boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-kagura.dts | 11 ----------- .../boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-keyaki.dts | 11 ----------- arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi | 2 +- 5 files changed, 1 insertion(+), 37 deletions(-) commit bb9bb4123abe2f35db02ad3073cc85a8cdc32ff5 Author: Konrad Dybcio Date: Sat Apr 30 18:23:19 2022 +0200 arm64: dts: qcom: msm8996-tone: Drop cont_splash_mem region Tone does not have a functioning bootloader framebuffer and Linux allocates the DRM framebuffer dynamically. Free up 36 MiB of precious RAM by removing this reservation. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430162319.607629-1-konrad.dybcio@somainline.org arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi | 5 ----- 1 file changed, 5 deletions(-) commit 3ae6156e2f414f0ba2bf860e4173bbd366d5e101 Author: Konrad Dybcio Date: Sat Apr 30 18:23:52 2022 +0200 arm64: dts: qcom: msm8998-mtp: Merge and fix up the DT Merge the two DT files into one, sort the nodes and fix up a couple of style incoherencies by adding some newlines, removing some, sorting properties etc. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430162353.607709-14-konrad.dybcio@somainline.org arch/arm64/boot/dts/qcom/msm8998-mtp.dts | 441 +++++++++++++++++++++++++++++- arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 421 ---------------------------- 2 files changed, 440 insertions(+), 422 deletions(-) commit d0eaf4122c9eb6a7536bf1a607c0570ca82daa99 Author: Konrad Dybcio Date: Sat Apr 30 18:23:51 2022 +0200 arm64: dts: qcom: msm8998-fxtec: Decouple from 8998 MTP While the Pro-1 is based on MTP and is very close to it, it's really not great for it to include the MTP dtsi straight up, as any small change will affect both boards and not all of them will apply to the phone as well. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430162353.607709-13-konrad.dybcio@somainline.org arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts | 421 +++++++++++++++++++++++- 1 file changed, 420 insertions(+), 1 deletion(-) commit 5d393f14d4de41ff30ccad78129d96606eca827c Author: Konrad Dybcio Date: Sat Apr 30 18:23:50 2022 +0200 arm64: dts: qcom: msm8998*: Clean up #includes Sort the includes and remove unused ones. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430162353.607709-12-konrad.dybcio@somainline.org arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts | 3 +-- arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi | 8 +++----- 3 files changed, 5 insertions(+), 8 deletions(-) commit d582c02012d2a07251339bf0762223dbc6bb2955 Author: Konrad Dybcio Date: Sat Apr 30 18:23:49 2022 +0200 arm64: dts: qcom: msm8998-oneplus: Add clocks & GDSC to simplefb This is required to keep the display working with MMCC enabled until proper panel support is in place. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430162353.607709-11-konrad.dybcio@somainline.org arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 392b73cb816094348abb7e3ff1288b5786b4ee16 Author: Konrad Dybcio Date: Sat Apr 30 18:23:48 2022 +0200 arm64: dts: qcom: msm8998*: Keep MMCC & MMSS_SMMU enabled by default MMCC is a component of the SoC that should always be configured. It was kept off due to misconfiguration on clamshell machines. Keep it disabled on these ones and enable it by default on all the others. Exactly the same story applies to MMSS_SMMU, which directly depends on MMCC. Do note, that if a platform doesn't use neither EFIFB (only applies to WoA devices in this case) or simplefb (applies to precisely 2 msm8998 devices as of this commit), this will not cause any harm. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430162353.607709-10-konrad.dybcio@somainline.org arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi | 14 ++++++++++++++ arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts | 8 -------- arch/arm64/boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi | 8 -------- arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 -- 4 files changed, 14 insertions(+), 18 deletions(-) commit 20bba6b73264e7a7f1743676d7942e25d3a2131d Author: Konrad Dybcio Date: Sat Apr 30 18:23:47 2022 +0200 arm64: dts: qcom: msm8998-fxtec: Use "okay" instead of "ok" This is the standard way. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430162353.607709-9-konrad.dybcio@somainline.org arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit bc0e82fbb25b32b5c69bef017ebd3e79b85883d4 Author: Konrad Dybcio Date: Sat Apr 30 18:23:46 2022 +0200 arm64: dts: qcom: msm8998-oneplus: Apply style fixes Add some newlines, reorder some properties, remove some indentation to make it more coherent. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430162353.607709-8-konrad.dybcio@somainline.org .../boot/dts/qcom/msm8998-oneplus-common.dtsi | 45 +++++++++++++++++----- 1 file changed, 36 insertions(+), 9 deletions(-) commit b448501c2e770aad1c09abadec2045c35eb08f36 Author: Konrad Dybcio Date: Sat Apr 30 18:23:45 2022 +0200 arm64: dts: qcom: msm8998-yoshino/oneplus: Use pm8005_regulators label Now that a label is added, use it! Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430162353.607709-7-konrad.dybcio@somainline.org .../boot/dts/qcom/msm8998-oneplus-common.dtsi | 22 ++++++++-------------- .../boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi | 21 ++++++++------------- 2 files changed, 16 insertions(+), 27 deletions(-) commit 016928c052a75bef4ef66d844f0000058429e18c Author: Konrad Dybcio Date: Sat Apr 30 18:23:44 2022 +0200 arm64: dts: qcom: msm8998-yoshino: Remove simple-bus compatible from clocks{} It's not necessary and the SoC clocks{} node doesn't use it either. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430162353.607709-6-konrad.dybcio@somainline.org arch/arm64/boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 6dad36ebe1cb219615ead56692cea816d144c645 Author: Konrad Dybcio Date: Sat Apr 30 18:23:43 2022 +0200 arm64: dts: qcom: msm8998-yoshino: Add USB extcon While not strictly necessary, at least on maple, configure the USB extcon, which requires two pins on Yoshino. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430162353.607709-5-konrad.dybcio@somainline.org .../boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 4efbec42c050e9e59171822a3829c9a364e88611 Author: Konrad Dybcio Date: Sat Apr 30 18:23:42 2022 +0200 arm64: dts: qcom: msm8998-yoshino-lilac: Disable LVS1 It's disabled on downstream, follow it. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430162353.607709-4-konrad.dybcio@somainline.org arch/arm64/boot/dts/qcom/msm8998-sony-xperia-yoshino-lilac.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 16901ba567d789557b90871e23504a2118c35216 Author: Konrad Dybcio Date: Sat Apr 30 18:23:41 2022 +0200 arm64: dts: qcom: msm8998-laptops: Clean up DTs Reorder properties to match new laptop DTs, change hex to dec. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430162353.607709-3-konrad.dybcio@somainline.org arch/arm64/boot/dts/qcom/msm8998-asus-novago-tp370ql.dts | 14 ++++++++------ arch/arm64/boot/dts/qcom/msm8998-hp-envy-x2.dts | 9 +++++---- arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts | 9 +++++---- 3 files changed, 18 insertions(+), 14 deletions(-) commit ce383e80782e9b416d5022dc692fc80306358372 Author: Konrad Dybcio Date: Sat Apr 30 18:23:40 2022 +0200 arm64: dts: qcom: msm8998-clamshell: Clean up the DT Keep the nodes and includes in order, clean up unnecessary properties & nodes. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430162353.607709-2-konrad.dybcio@somainline.org arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi | 118 ++++++++++++++---------- arch/arm64/boot/dts/qcom/pm8005.dtsi | 4 + 2 files changed, 73 insertions(+), 49 deletions(-) commit 12541f687e4994774cbb4158e5fe3ecd6c639bdf Author: Konrad Dybcio Date: Sat Apr 30 18:23:39 2022 +0200 arm64: dts: qcom: msm8998*: Fix TLMM and pin nodes Remove the unnecessary level of indentation, commonize SDC2 pins and notice that SDCC2_CD_ON and _OFF is identical, deduplicate it! Also, remove some unnecessary overrides and use decimal values in #-cells Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430162353.607709-1-konrad.dybcio@somainline.org .../boot/dts/qcom/msm8998-asus-novago-tp370ql.dts | 9 --- arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi | 12 ++-- arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 4 +- .../boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi | 4 +- arch/arm64/boot/dts/qcom/msm8998.dtsi | 75 +++++++--------------- 5 files changed, 33 insertions(+), 71 deletions(-) commit 77c77f03fef76848c3a1f26e12bdc9268c79d9c3 Merge: 7b0cd83c5ac6 f42924b49bf7 Author: Mark Brown Date: Mon Jun 27 21:45:57 2022 +0100 ASoC: max98396: Some assorted fixes and additions Merge series from Daniel Mack : This is a series of some patches that I collected while using the max98396 driver is a TDM mode setup. They correct BSEL and PCM mode configs, add support for power supplies and add some bits to the documentation. The code is tested in TDM-16 and TDM-8 mode with 32 channel width. commit 7b0cd83c5ac6c7fa04636120430f651d0859ea06 Merge: ccb0bbe3e93e 25ae1a04da0d Author: Mark Brown Date: Mon Jun 27 21:45:56 2022 +0100 ASoC: sun50i-codec-analog: Internal bias support Merge series from Samuel Holland : This series adds support for enabling the codec's internal microphone bias, which is needed on at least some versions of the PinePhone. Changes in v2: - Move register update from component probe to device probe Arnaud Ferraris (2): ASoC: dt-bindings: sun50i-codec: Add binding for internal bias ASoC: sun50i-codec-analog: Add support for internal bias Samuel Holland (1): arm64: dts: allwinner: pinephone: Enable internal HMIC bias .../bindings/sound/allwinner,sun50i-a64-codec-analog.yaml | 5 +++++ .../arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts | 4 ++++ .../arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts | 4 ++++ sound/soc/sunxi/sun50i-codec-analog.c | 8 ++++++++ 4 files changed, 21 insertions(+) -- 2.35.1 commit 898d0d6483a9360f1968e0a900465c1fa152a4a9 Author: Christian Marangi Date: Sat Apr 30 07:44:58 2022 +0200 clk: qcom: clk-krait: add apq/ipq8064 errata workaround Add apq/ipq8064 errata workaround where the sec_src clock gating needs to be disabled during switching. krait-cc compatible is not enough to handle this and limit this workaround to apq/ipq8064. We check machine compatible to handle this. Signed-off-by: Ansuel Smith Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430054458.31321-4-ansuelsmth@gmail.com drivers/clk/qcom/clk-krait.c | 16 ++++++++++++++++ drivers/clk/qcom/clk-krait.h | 1 + drivers/clk/qcom/krait-cc.c | 8 ++++++++ 3 files changed, 25 insertions(+) commit df83d2c9e72910416f650ade1e07cc314ff02731 Author: Christian Marangi Date: Sat Apr 30 07:44:57 2022 +0200 clk: qcom: clk-krait: unlock spin after mux completion Unlock spinlock after the mux switch is completed to prevent any corner case of mux request while the switch still needs to be done. Fixes: 4d7dc77babfe ("clk: qcom: Add support for Krait clocks") Signed-off-by: Ansuel Smith Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430054458.31321-3-ansuelsmth@gmail.com drivers/clk/qcom/clk-krait.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit fcfbfe373d41b4728ffec075f8f91b6572a88c27 Author: Christian Marangi Date: Sat Apr 30 07:44:56 2022 +0200 clk: qcom: clk-hfpll: use poll_timeout macro Use regmap_read_poll_timeout macro instead of do-while structure to tidy things up. Also set a timeout to prevent any sort of system stall. Signed-off-by: Ansuel Smith Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220430054458.31321-2-ansuelsmth@gmail.com drivers/clk/qcom/clk-hfpll.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit f424d754212ae976dcbea997d5699fe508b737d9 Author: Bryan O'Donoghue Date: Tue Jan 11 12:52:08 2022 +0000 arm64: dts: qcom: sdm845: Add camss vdda-pll-supply Add in the missing vdda-pll-supply rail description. Reviewed-by: Robert Foss Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220111125212.2343184-5-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 1 + 1 file changed, 1 insertion(+) commit 11c83450ff1157d31acbbff4d236d9787929c4c5 Author: Bryan O'Donoghue Date: Tue Jan 11 12:52:07 2022 +0000 arm64: dts: qcom: sdm845: Rename camss vdda-supply to vdda-phy-supply The dts entry vdda-supply connects to a common vdda-phy-supply rail. Rename to reflect what the functionality is. Reviewed-by: Robert Foss Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220111125212.2343184-4-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 458ebdbb8e5d596a462d8125cec74142ff5dfa97 Author: David Heidelberg Date: Sun Jun 26 12:57:59 2022 +0200 arm64: dts: qcom: timer should use only 32-bit size There's no reason the timer needs > 32-bits of address or size. Since we using 32-bit size, we need to define ranges properly. Fixes warnings as: ``` arch/arm64/boot/dts/qcom/sdm845-oneplus-fajita.dt.yaml: timer@17c90000: #size-cells:0:0: 1 was expected From schema: Documentation/devicetree/bindings/timer/arm,arch_timer_mmio.yaml ``` Signed-off-by: David Heidelberg Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220626105800.35586-1-david@ixit.cz arch/arm64/boot/dts/qcom/ipq6018.dtsi | 22 +++++++++++----------- arch/arm64/boot/dts/qcom/sc7180.dtsi | 22 +++++++++++----------- arch/arm64/boot/dts/qcom/sc7280.dtsi | 22 +++++++++++----------- arch/arm64/boot/dts/qcom/sdm845.dtsi | 22 +++++++++++----------- arch/arm64/boot/dts/qcom/sm6350.dtsi | 22 +++++++++++----------- arch/arm64/boot/dts/qcom/sm8150.dtsi | 22 +++++++++++----------- arch/arm64/boot/dts/qcom/sm8250.dtsi | 22 +++++++++++----------- arch/arm64/boot/dts/qcom/sm8350.dtsi | 22 +++++++++++----------- arch/arm64/boot/dts/qcom/sm8450.dtsi | 22 +++++++++++----------- 9 files changed, 99 insertions(+), 99 deletions(-) commit 43fe0cc46b6206b25f0f13bb249f0078441ae15a Author: Gautam Date: Sun Jun 26 01:22:45 2022 +0530 kselftests/damon: add support for cases where debugfs cannot be read The kernel is in lockdown mode when secureboot is enabled and hence debugfs cannot be used. Add support for this and other general cases where debugfs cannot be read and communicate the same to the user before running tests. Signed-off-by: Gautam Reviewed-by: SeongJae Park Signed-off-by: Shuah Khan tools/testing/selftests/damon/_chk_dependency.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 18afe1bf05a11c1b186bcf696e7a06bfed0e5ba2 Author: Gautam Menghani Date: Thu Jun 23 09:18:32 2022 +0530 selftests: Make the usage formatting consistent in kselftest_deps.sh Add a colon in the "Optional" test usage message to ensure consistency with the "Default" test usage message. Signed-off-by: Gautam Menghani Signed-off-by: Shuah Khan tools/testing/selftests/kselftest_deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3297a4df805d4263506b6dfec4d1bbeff8862dd8 Author: Gautam Date: Sat Jun 25 19:24:55 2022 +0530 kselftests: Enable the echo command to print newlines in Makefile In the install section of the main Makefile of kselftests, the echo command is used with -n flag, which disables the printing of new line due to which the output contains "\n" chars as follows: Emit Tests for alsa\nSkipping non-existent dir: arm64 Emit Tests for breakpoints\nEmit Tests for capabilities\n This patch fixes the above bug by using the -e flag. Signed-off-by: Gautam Signed-off-by: Shuah Khan tools/testing/selftests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 255a47e745674dbbda9250ae0ad1f78a49179988 Author: Li kunyu Date: Mon Jun 27 10:05:00 2022 +0800 clk: qcom: gcc-sm6350: Drop extra semicolon Drop the extra semicolon after qcom_cc_really_probe() Signed-off-by: Li kunyu [bjorn: Rewrote commit message] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220627020500.135125-1-kunyu@nfschina.com drivers/clk/qcom/gcc-sm6350.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e3e654696074b304302c7cc2a67314b7875f1ae Author: Krzysztof Kozlowski Date: Mon Jun 27 11:32:50 2022 +0200 arm64: dts: qcom: align OPP table names with DT schema DT schema expects names of operating points tables to start with "opp-table": ipq6018-cp01-c1.dtb: cpu_opp_table: $nodename:0: 'cpu_opp_table' does not match '^opp-table(-[a-z0-9]+)?$' Use hyphens instead of underscores, fix the names to match DT schema or remove the prefix entirely when it is not needed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220627093250.84391-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7180.dtsi | 18 +++++++++--------- arch/arm64/boot/dts/qcom/sc7280.dtsi | 12 ++++++------ arch/arm64/boot/dts/qcom/sdm630.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sdm845.dtsi | 16 ++++++++-------- arch/arm64/boot/dts/qcom/sm6350.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sm8150.dtsi | 8 ++++---- arch/arm64/boot/dts/qcom/sm8250.dtsi | 16 ++++++++-------- arch/arm64/boot/dts/qcom/sm8350.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 +- 11 files changed, 44 insertions(+), 44 deletions(-) commit 3d6c1dfb1f75d856cb6247aab7c2dcca45de5cd4 Author: Xiang wangx Date: Fri Jun 10 15:12:44 2022 +0800 userfaultfd/selftests: Fix typo in comment Delete the redundant word 'in'. Signed-off-by: Xiang wangx Signed-off-by: Shuah Khan tools/testing/selftests/vm/userfaultfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a13b1e472b93f69c35976351e59831564ed6a376 Author: Bo Liu Date: Wed Jun 22 00:56:51 2022 -0400 vfio: check vfio_register_iommu_driver() return value As vfio_register_iommu_driver() can fail, we should check the return value. Signed-off-by: Bo Liu Acked-by: Cornelia Huck Link: https://lore.kernel.org/r/20220622045651.5416-1-liubo03@inspur.com Signed-off-by: Alex Williamson drivers/vfio/vfio.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit ee65728e103bb7dd99d8604bf6c7aa89c7d7e446 Author: Mike Rapoport Date: Mon Jun 27 09:00:26 2022 +0300 docs: rename Documentation/vm to Documentation/mm so it will be consistent with code mm directory and with Documentation/admin-guide/mm and won't be confused with virtual machines. Signed-off-by: Mike Rapoport Suggested-by: Matthew Wilcox Tested-by: Ira Weiny Acked-by: Jonathan Corbet Acked-by: Wu XiangCheng Documentation/ABI/testing/sysfs-kernel-mm-ksm | 2 +- Documentation/ABI/testing/sysfs-kernel-slab | 4 ++-- Documentation/admin-guide/kernel-parameters.txt | 10 +++++----- Documentation/admin-guide/mm/concepts.rst | 2 +- Documentation/admin-guide/mm/damon/index.rst | 2 +- Documentation/admin-guide/mm/damon/reclaim.rst | 2 +- Documentation/admin-guide/mm/damon/usage.rst | 8 ++++---- Documentation/admin-guide/sysctl/vm.rst | 2 +- Documentation/core-api/index.rst | 2 +- Documentation/filesystems/proc.rst | 2 +- Documentation/index.rst | 2 +- Documentation/{vm => mm}/active_mm.rst | 0 Documentation/{vm => mm}/arch_pgtable_helpers.rst | 0 Documentation/{vm => mm}/balance.rst | 0 Documentation/{vm => mm}/bootmem.rst | 0 Documentation/{vm => mm}/damon/api.rst | 0 Documentation/{vm => mm}/damon/design.rst | 0 Documentation/{vm => mm}/damon/faq.rst | 0 Documentation/{vm => mm}/damon/index.rst | 0 Documentation/{vm => mm}/free_page_reporting.rst | 0 Documentation/{vm => mm}/frontswap.rst | 0 Documentation/{vm => mm}/highmem.rst | 0 Documentation/{vm => mm}/hmm.rst | 0 Documentation/{vm => mm}/hugetlbfs_reserv.rst | 0 Documentation/{vm => mm}/hwpoison.rst | 0 Documentation/{vm => mm}/index.rst | 0 Documentation/{vm => mm}/ksm.rst | 0 Documentation/{vm => mm}/memory-model.rst | 2 +- Documentation/{vm => mm}/mmu_notifier.rst | 0 Documentation/{vm => mm}/numa.rst | 0 Documentation/{vm => mm}/oom.rst | 0 Documentation/{vm => mm}/overcommit-accounting.rst | 0 Documentation/{vm => mm}/page_allocation.rst | 0 Documentation/{vm => mm}/page_cache.rst | 0 Documentation/{vm => mm}/page_frags.rst | 0 Documentation/{vm => mm}/page_migration.rst | 0 Documentation/{vm => mm}/page_owner.rst | 0 Documentation/{vm => mm}/page_reclaim.rst | 0 Documentation/{vm => mm}/page_table_check.rst | 0 Documentation/{vm => mm}/page_tables.rst | 0 Documentation/{vm => mm}/physical_memory.rst | 0 Documentation/{vm => mm}/process_addrs.rst | 0 Documentation/{vm => mm}/remap_file_pages.rst | 0 Documentation/{vm => mm}/shmfs.rst | 0 Documentation/{vm => mm}/slab.rst | 0 Documentation/{vm => mm}/slub.rst | 0 Documentation/{vm => mm}/split_page_table_lock.rst | 0 Documentation/{vm => mm}/swap.rst | 0 Documentation/{vm => mm}/transhuge.rst | 0 Documentation/{vm => mm}/unevictable-lru.rst | 0 Documentation/{vm => mm}/vmalloc.rst | 0 Documentation/{vm => mm}/vmalloced-kernel-stacks.rst | 0 Documentation/{vm => mm}/vmemmap_dedup.rst | 0 Documentation/{vm => mm}/z3fold.rst | 0 Documentation/{vm => mm}/zsmalloc.rst | 0 .../translations/zh_CN/admin-guide/mm/damon/index.rst | 2 +- .../translations/zh_CN/admin-guide/mm/damon/reclaim.rst | 2 +- .../translations/zh_CN/admin-guide/mm/damon/usage.rst | 8 ++++---- Documentation/translations/zh_CN/core-api/index.rst | 2 +- Documentation/translations/zh_CN/index.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/active_mm.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/balance.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/damon/api.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/damon/design.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/damon/faq.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/damon/index.rst | 5 ++--- .../translations/zh_CN/{vm => mm}/free_page_reporting.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/frontswap.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/highmem.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/hmm.rst | 2 +- .../translations/zh_CN/{vm => mm}/hugetlbfs_reserv.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/hwpoison.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/index.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/ksm.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/memory-model.rst | 4 ++-- Documentation/translations/zh_CN/{vm => mm}/mmu_notifier.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/numa.rst | 2 +- .../translations/zh_CN/{vm => mm}/overcommit-accounting.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/page_frags.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/page_owner.rst | 2 +- .../translations/zh_CN/{vm => mm}/page_table_check.rst | 2 +- .../translations/zh_CN/{vm => mm}/remap_file_pages.rst | 2 +- .../translations/zh_CN/{vm => mm}/split_page_table_lock.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/z3fold.rst | 2 +- Documentation/translations/zh_CN/{vm => mm}/zsmalloc.rst | 2 +- Documentation/translations/zh_TW/index.rst | 2 +- Documentation/vm/.gitignore | 3 --- MAINTAINERS | 12 ++++++------ arch/loongarch/Kconfig | 2 +- arch/powerpc/include/asm/book3s/64/pgtable.h | 2 +- include/linux/hmm.h | 4 ++-- include/linux/memremap.h | 2 +- include/linux/mmu_notifier.h | 2 +- include/linux/sched/mm.h | 4 ++-- include/linux/swap.h | 2 +- mm/Kconfig | 2 +- mm/debug_vm_pgtable.c | 2 +- mm/frontswap.c | 2 +- mm/huge_memory.c | 2 +- mm/hugetlb.c | 6 +++--- mm/hugetlb_vmemmap.c | 2 +- mm/ksm.c | 4 ++-- mm/mmap.c | 2 +- mm/rmap.c | 8 ++++---- mm/sparse-vmemmap.c | 2 +- mm/util.c | 2 +- tools/vm/page_owner_sort.c | 2 +- 107 files changed, 89 insertions(+), 93 deletions(-) commit 3b498b6656214d499d57f1e4935448821d0febf9 Author: Robin Murphy Date: Fri Jun 24 18:59:35 2022 +0100 vfio: Use device_iommu_capable() Use the new interface to check the capabilities for our device specifically. Reviewed-by: Lu Baolu Signed-off-by: Robin Murphy Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/4ea5eb64246f1ee188d1a61c3e93b37756932eb7.1656092606.git.robin.murphy@arm.com Signed-off-by: Alex Williamson drivers/vfio/vfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eed20c782aea57b7efb42af2905dc381268b21e9 Author: Robin Murphy Date: Fri Jun 24 18:51:44 2022 +0100 vfio/type1: Simplify bus_type determination Since IOMMU groups are mandatory for drivers to support, it stands to reason that any device which has been successfully added to a group must be on a bus supported by that IOMMU driver, and therefore a domain viable for any device in the group must be viable for all devices in the group. This already has to be the case for the IOMMU API's internal default domain, for instance. Thus even if the group contains devices on different buses, that can only mean that the IOMMU driver actually supports such an odd topology, and so without loss of generality we can expect the bus type of any device in a group to be suitable for IOMMU API calls. Furthermore, scrutiny reveals a lack of protection for the bus being removed while vfio_iommu_type1_attach_group() is using it; the reference that VFIO holds on the iommu_group ensures that data remains valid, but does not prevent the group's membership changing underfoot. We can address both concerns by recycling vfio_bus_type() into some superficially similar logic to indirect the IOMMU API calls themselves. Each call is thus protected from races by the IOMMU group's own locking, and we no longer need to hold group-derived pointers beyond that scope. It also gives us an easy path for the IOMMU API's migration of bus-based interfaces to device-based, of which we can already take the first step with device_iommu_capable(). As with domains, any capability must in practice be consistent for devices in a given group - and after all it's still the same capability which was expected to be consistent across an entire bus! - so there's no need for any complicated validation. Signed-off-by: Robin Murphy Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/194a12d3434d7b38f84fa96503c7664451c8c395.1656092606.git.robin.murphy@arm.com [aw: add comment to vfio_iommu_device_capable()] Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_type1.c | 43 ++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 20 deletions(-) commit 0667429ce68e0b08f9f1fec8fd0b1f57228f605e Author: Umesh Nerlige Ramappa Date: Tue Jun 21 12:21:05 2022 -0700 drm/i915/reset: Add additional steps for Wa_22011802037 for execlist backend For execlists backend, current implementation of Wa_22011802037 is to stop the CS before doing a reset of the engine. This WA was further extended to wait for any pending MI FORCE WAKEUPs before issuing a reset. Add the extended steps in the execlist path of reset. In addition, extend the WA to gen11. v2: (Tvrtko) - Clarify comments, commit message, fix typos - Use IS_GRAPHICS_VER for gen 11/12 checks v3: (Daneile) - Drop changes to intel_ring_submission since WA does not apply to it - Log an error if MSG IDLE is not defined for an engine Signed-off-by: Umesh Nerlige Ramappa Fixes: f6aa0d713c88 ("drm/i915: Add Wa_22011802037 force cs halt") Acked-by: Tvrtko Ursulin Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20220621192105.2100585-1-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/gt/intel_engine.h | 2 + drivers/gpu/drm/i915/gt/intel_engine_cs.c | 88 +++++++++++++++++++++- .../gpu/drm/i915/gt/intel_execlists_submission.c | 7 ++ drivers/gpu/drm/i915/gt/uc/intel_guc.c | 4 +- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 81 ++------------------ 5 files changed, 103 insertions(+), 79 deletions(-) commit 59bcdb564b3bac3e86cc274e5dec05d4647ce47f Author: Alan Previn Date: Wed Jun 22 19:31:57 2022 -0700 drm/i915/guc: Don't update engine busyness stats too frequently Using two different types of workoads, it was observed that guc_update_engine_gt_clks was being called too frequently and/or causing a CPU-to-lmem bandwidth hit over PCIE. Details on the workloads and numbers are in the notes below. Background: At the moment, guc_update_engine_gt_clks can be invoked via one of 3 ways. #1 and #2 are infrequent under normal operating conditions: 1.When a predefined "ping_delay" timer expires so that GuC- busyness can sample the GTPM clock counter to ensure it doesn't miss a wrap-around of the 32-bits of the HW counter. (The ping_delay is calculated based on 1/8th the time taken for the counter go from 0x0 to 0xffffffff based on the GT frequency. This comes to about once every 28 seconds at a GT frequency of 19.2Mhz). 2.In preparation for a gt reset. 3.In response to __gt_park events (as the gt power management puts the gt into a lower power state when there is no work being done). Root-cause: For both the workloads described farther below, it was observed that when user space calls IOCTLs that unparks the gt momentarily and repeats such calls many times in quick succession, it triggers calling guc_update_engine_gt_clks as many times. However, the primary purpose of guc_update_engine_gt_clks is to ensure we don't miss the wraparound while the counter is ticking. Thus, the solution is to ensure we skip that check if gt_park is calling this function earlier than necessary. Solution: Snapshot jiffies when we do actually update the busyness stats. Then get the new jiffies every time intel_guc_busyness_park is called and bail if we are being called too soon. Use half of the ping_delay as a safe threshold. NOTE1: Workload1: IGTs' gem_create was modified to create a file handle, allocate memory with sizes that range from a min of 4K to the max supported (in power of two step-sizes). Its maps, modifies and reads back the memory. Allocations and modification is repeated until total memory allocation reaches the max. Then the file handle is closed. With this workload, guc_update_engine_gt_clks was called over 188 thousand times in the span of 15 seconds while this test ran three times. With this patch, the number of calls reduced to 14. NOTE2: Workload2: 30 transcode sessions are created in quick succession. While these sessions are created, pcm-iio tool was used to measure I/O read operation bandwidth consumption sampled at 100 milisecond intervals over the course of 20 seconds. The total bandwidth consumed over 20 seconds without this patch was measured at average at 311KBps per sample. With this patch, the number went down to about 175Kbps which is about a 43% savings. Signed-off-by: Alan Previn Reviewed-by: Umesh Nerlige Ramappa Acked-by: Tvrtko Ursulin Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20220623023157.211650-2-alan.previn.teres.alexis@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc.h | 8 ++++++++ drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 13 +++++++++++++ 2 files changed, 21 insertions(+) commit bcb9aa45d5a0e11ef91245330c53cde214d15e8d Author: Niranjana Vishwanathapura Date: Wed Jun 15 00:13:47 2022 +0530 Revert "drm/i915: Hold reference to intel_context over life of i915_request" This reverts commit 1e98d8c52ed5dfbaf273c4423c636525c2ce59e7. The problem with this patch is that it makes i915_request to hold a reference to intel_context, which in turn holds a reference on the VM. This strong back referencing can lead to reference loops which leads to resource leak. An example is the upcoming VM_BIND work which requires VM to hold a reference to some shared VM specific BO. But this BO's dma-resv fences holds reference to the i915_request thus leading to reference loop. v2: Do not use reserved requests for virtual engines Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Ramalingam C Suggested-by: Matthew Brost Reviewed-by: Mathew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20220614184348.23746-3-ramalingam.c@intel.com drivers/gpu/drm/i915/i915_request.c | 52 +++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 20 deletions(-) commit 7307e91bfcd0e3f123aab01b30557f93923b6d73 Author: Niranjana Vishwanathapura Date: Wed Jun 15 00:13:46 2022 +0530 drm/i915: Do not access rq->engine without a reference In i915_fence_get_driver_name(), user may not hold a reference to rq->engine. Hence do not access it. Instead, store required device private pointer in 'rq->i915' and use it. Signed-off-by: Niranjana Vishwanathapura Suggested-by: Matthew Brost Reviewed-by: Matthew Brost Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20220614184348.23746-2-ramalingam.c@intel.com drivers/gpu/drm/i915/i915_request.c | 3 ++- drivers/gpu/drm/i915/i915_request.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit b334c1afad17132a3c2360de64c1cfff90908739 Author: Nicolas Saenz Julienne Date: Sat Jun 25 13:36:13 2022 +0200 ARM: dts: bcm2711: Use proper compatible in PM/Watchdog node A new compatible string was introduced specifically for BCM2711, so make use of it. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Reviewed-by: Peter Robinson Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm2711.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b722443fa72b266f4ea823dcb2f09c2e90f8635b Author: Nicolas Saenz Julienne Date: Sat Jun 25 13:36:12 2022 +0200 ARM: dts: bcm2835/bcm2711: Introduce reg-names in watchdog node bcm2835-pm's bindings now support explicitly setting 'reg-names,' so use them. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Reviewed-by: Peter Robinson Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm2711.dtsi | 1 + arch/arm/boot/dts/bcm2835-common.dtsi | 1 + 2 files changed, 2 insertions(+) commit 0e44511117f92197bea58e1999891e5c6f014156 Author: Stefan Wahren Date: Sat Jun 25 13:36:11 2022 +0200 dt-bindings: soc: bcm: bcm2835-pm: Add support for bcm2711 Add a new compatible string for BCM2711 and the option to provide a third reg property for the board's new RPiVid ASB. In BCM2711 the new RPiVid ASB took over V3D, which is our only consumer of this driver so far. The old ASB is still be present with ISP and H264 bits but no V3D. Signed-off-by: Stefan Wahren Reviewed-by: Peter Robinson Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 7bc592cf4831b86725ee8007bf3a1732cc54a7aa Author: Nicolas Saenz Julienne Date: Sat Jun 25 13:36:10 2022 +0200 dt-bindings: soc: bcm: bcm2835-pm: Introduce reg-names Anticipating the introduction of BCM2711, of which we'll need to support its new RPiVid ASB, introduce reg-names into bcm2835-pm's binding. This will help to have a consistent mapping between resources and their meaning. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring Signed-off-by: Stefan Wahren Reviewed-by: Peter Robinson Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 520d0abe6aee7de88c7be34d939a1ae0cd8e40e5 Author: Nicolas Saenz Julienne Date: Sat Jun 25 13:36:09 2022 +0200 dt-bindings: soc: bcm: bcm2835-pm: Convert bindings to DT schema This converts the brcm,bcm2835-pm bindings from text to proper schema. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring Signed-off-by: Stefan Wahren Signed-off-by: Florian Fainelli .../bindings/soc/bcm/brcm,bcm2835-pm.txt | 46 ------------- .../bindings/soc/bcm/brcm,bcm2835-pm.yaml | 77 ++++++++++++++++++++++ 2 files changed, 77 insertions(+), 46 deletions(-) commit ee56c3e8eec166f4e4a2ca842b7804d14f3a0208 Merge: 00c9d5632277 03c765b0e3b4 Author: Andrew Morton Date: Mon Jun 27 10:31:44 2022 -0700 Merge branch 'master' into mm-nonmm-stable commit 46a3b1125308f8f90a065eeecfafd2a96b01a36c Merge: 6edda04ccc7c 03c765b0e3b4 Author: Andrew Morton Date: Mon Jun 27 10:31:34 2022 -0700 Merge branch 'master' into mm-stable commit ccb0bbe3e93efa1c794176200785737ba65b0131 Author: Charles Keepax Date: Mon Jun 27 10:43:35 2022 +0100 ASoC: samsung: s3c24xx-i2s: Fix typo in DAIFMT handling The conversion of the set_fmt callback to direct clock specification included a small typo, correct the affected code. Reported-by: kernel test robot Signed-off-by: Charles Keepax Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220627094335.3051210-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/samsung/s3c24xx-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9566b1d1fb41c7745d872c303766961614431ec Merge: 658e95953075 e112c42eb3b7 Author: Mark Brown Date: Mon Jun 27 18:27:03 2022 +0100 ASoC: Merge up fixes Further development will need some of the fixes. commit f7fb92cd2e39357f14846d69ae0e1d8692371f82 Author: Ville Syrjälä Date: Thu Jun 23 16:09:00 2022 +0300 drm/i915: Move the color stuff under INTEL_INFO->display The LUTs are a display feature so move the details into the display portion of the device info. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220623130900.26078-10-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_color.c | 28 +++++++++++----------- drivers/gpu/drm/i915/i915_pci.c | 38 +++++++++++++++++------------- drivers/gpu/drm/i915/intel_device_info.h | 15 ++++++------ 3 files changed, 42 insertions(+), 39 deletions(-) commit 95be40c875fc848d99f231e77b341e7ab5d8125d Author: Ville Syrjälä Date: Thu Jun 23 16:08:59 2022 +0300 drm/i915: Get rid of XE_LPD_CURSOR_OFFSETS XE_LPD_CURSOR_OFFSETS is a duplicate of TGL_CURSOR_OFFSETS. Just use the latter. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220623130900.26078-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/i915_pci.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit e97f91e8d39f8f5cff071d847c2d192904e35d0b Author: Ville Syrjälä Date: Thu Jun 23 16:08:58 2022 +0300 drm/i915: Use _MMIO_PIPE2() where appropriate Stop hand rolling _MMIO_TRANS2() and just use the real thing. Note that this register isn't even used atm, hence why this builds despite the _PIPE2() macro not actually existing. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220623130900.26078-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/i915_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e25ae522164e8586520ef20bddbb41c97b0057a Author: Ville Syrjälä Date: Thu Jun 23 16:08:57 2022 +0300 drm/i915: Use _MMIO_TRANS2() where appropriate Stop hand rolling _MMIO_TRANS2() and just use the real thing. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220623130900.26078-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/i915_reg.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit d5a680548eddca0e2e01fb84b85c1f7687355e21 Author: Ville Syrjälä Date: Thu Jun 23 16:08:56 2022 +0300 drm/i915: s/_CURSOR2/_MMIO_CURSOR2// The other similar macros have the _MMIO prefix, so give it also to _CURSOR2. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220623130900.26078-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/i915_reg.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 5ba584ec1101cd63081ba7c228849acef962f6b9 Author: Ville Syrjälä Date: Thu Jun 23 16:08:55 2022 +0300 drm/i915: Make pipe_offsets[] & co. u32 Using a signed type for the register offsets doesn't really make sense. Switch to u32. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220623130900.26078-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/intel_device_info.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c92df6aa397b5a37cf06004a219b4fdf26234dd6 Author: Ville Syrjälä Date: Thu Jun 23 16:08:54 2022 +0300 drm/i915: Move display_mmio_offset under INTEL_INFO->display The display register offsets are display stuff so stick into the display portion of the device info. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220623130900.26078-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/i915_pci.c | 4 ++-- drivers/gpu/drm/i915/i915_reg.h | 2 +- drivers/gpu/drm/i915/intel_device_info.h | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) commit 12d74553726675b5c991251f349422a24c575e56 Author: Ville Syrjälä Date: Thu Jun 23 16:08:53 2022 +0300 drm/i915: Move pipe_offsets[] & co. to INTEL_INFO->display The display register offsets are display stuff so stick into the display portion of the device info. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220623130900.26078-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/i915_pci.c | 44 ++++++++++++++++---------------- drivers/gpu/drm/i915/i915_reg.h | 18 ++++++------- drivers/gpu/drm/i915/intel_device_info.h | 10 ++++---- 3 files changed, 36 insertions(+), 36 deletions(-) commit d1877e639bc6bf1c3131eda3f9ede73f8da96c22 Author: Alex Williamson Date: Wed Jun 8 12:55:13 2022 -0600 vfio: de-extern-ify function prototypes The use of 'extern' in function prototypes has been disrecommended in the kernel coding style for several years now, remove them from all vfio related files so contributors no longer need to decide between style and consistency. Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Reviewed-by: Eric Farman Reviewed-by: Eric Auger Reviewed-by: Cornelia Huck Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/165471414407.203056.474032786990662279.stgit@omen Signed-off-by: Alex Williamson Documentation/driver-api/vfio-mediated-device.rst | 10 ++-- drivers/s390/cio/vfio_ccw_cp.h | 12 ++-- drivers/s390/cio/vfio_ccw_private.h | 6 +- drivers/vfio/fsl-mc/vfio_fsl_mc_private.h | 2 +- drivers/vfio/platform/vfio_platform_private.h | 21 ++++--- include/linux/vfio.h | 70 +++++++++++------------ include/linux/vfio_pci_core.h | 65 +++++++++++---------- 7 files changed, 91 insertions(+), 95 deletions(-) commit 04155815dbb8320ecd17dd54e85c9a5ae5d63bb9 Author: Ville Syrjälä Date: Thu Jun 23 16:08:52 2022 +0300 drm/i915: Move dbuf details to INTEL_INFO->display DBUF is a display thing, so move it into the display portion of the device info. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220623130900.26078-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display.h | 2 +- drivers/gpu/drm/i915/display/intel_display_power.c | 2 +- drivers/gpu/drm/i915/i915_pci.c | 18 +++++++++--------- drivers/gpu/drm/i915/intel_device_info.h | 9 +++++---- drivers/gpu/drm/i915/intel_pm.c | 8 ++++---- 5 files changed, 20 insertions(+), 19 deletions(-) commit 3cdcdc34f35eb4616f7e5954cbdcd3390da8eae4 Author: Ville Syrjälä Date: Wed Apr 13 22:26:07 2022 +0300 drm/i915: Eliminate PIPECONF RMWs from .color_commit() Eliminate the PIPECONF RMWs from .comit_commit() so that we can finally declare the whole vblank evade part (and the noarm() part) of the pipe commit free of register reads. Or at least I hope that's the last read... Only the i9xx/ilk codepaths need this for now, but let's add the same thing for hsw+ just in case we want to start calling that during fastsets at some point (eg. to change dithering settings/etc.). Should open up the way to start experimenting with different DSB usage approaches for pipe commits. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220413192607.27533-1-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar drivers/gpu/drm/i915/display/intel_color.c | 21 +++++-------------- drivers/gpu/drm/i915/display/intel_display.c | 30 ++++++++++++++++++++-------- drivers/gpu/drm/i915/display/intel_display.h | 2 ++ 3 files changed, 29 insertions(+), 24 deletions(-) commit 9f0109685f075880283934b274ad6f2ef313c21e Merge: 0fcae3c8b1b3 43da2f07622f Author: Marc Kleine-Budde Date: Mon Jun 27 17:00:38 2022 +0200 Merge branch 'can327-CAN-ldisc-driver-for-ELM327-based-OBD-II-adapters' Max Staudt says: ==================== This is the can327 driver. It does a surprisingly good job at turning ELM327 based OBD-II interfaces into cheap CAN interfaces for simple homebrew projects. Please see the included documentation for details and limitations: Documentation/networking/device_drivers/can/can327.rst ==================== Link: https://lore.kernel.org/all/20220618195031.10975-1-max@enpas.org/ Signed-off-by: Marc Kleine-Budde commit 43da2f07622f41376c7ddab8f73dc2b1d3ab9715 Author: Max Staudt Date: Sat Jun 18 21:50:31 2022 +0200 can: can327: CAN/ldisc driver for ELM327 based OBD-II adapters This is the can327 driver. It does a surprisingly good job at turning ELM327 based OBD-II interfaces into cheap CAN interfaces for simple homebrew projects. Please see the included documentation for details and limitations: Documentation/networking/device_drivers/can/can327.rst Link: https://lore.kernel.org/all/20220618195031.10975-1-max@enpas.org Signed-off-by: Max Staudt Reviewed-by: Vincent Mailhol [mkl: minor coding style improvements] Signed-off-by: Marc Kleine-Budde .../networking/device_drivers/can/can327.rst | 331 ++++++ .../networking/device_drivers/can/index.rst | 1 + MAINTAINERS | 7 + drivers/net/can/Kconfig | 18 + drivers/net/can/Makefile | 1 + drivers/net/can/can327.c | 1137 ++++++++++++++++++++ 6 files changed, 1495 insertions(+) commit a244ec3640e0dfe90f31750033433cb2c99446e8 Author: Saravana Kannan Date: Thu Jun 23 01:03:43 2022 -0700 of: base: Avoid console probe delay when fw_devlink.strict=1 Commit 71066545b48e ("driver core: Set fw_devlink.strict=1 by default") enabled iommus and dmas dependency enforcement by default. On some systems, this caused the console device's probe to get delayed until the deferred_probe_timeout expires. We need consoles to work as soon as possible, so mark the console device node with FWNODE_FLAG_BEST_EFFORT so that fw_delink knows not to delay the probe of the console device for suppliers without drivers. The driver can then make the decision on where it can probe without those suppliers or defer its probe. Fixes: 71066545b48e ("driver core: Set fw_devlink.strict=1 by default") Reported-by: Sascha Hauer Reported-by: Peng Fan Tested-by: Peng Fan Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20220623080344.783549-3-saravanak@google.com Signed-off-by: Greg Kroah-Hartman drivers/of/base.c | 2 ++ 1 file changed, 2 insertions(+) commit 8f486cab263ca1b761c1aab9b36975afd355b799 Author: Saravana Kannan Date: Thu Jun 23 01:03:42 2022 -0700 driver core: fw_devlink: Allow firmware to mark devices as best effort When firmware sets the FWNODE_FLAG_BEST_EFFORT flag for a fwnode, fw_devlink will do a best effort ordering for that device where it'll only enforce the probe/suspend/resume ordering of that device with suppliers that have drivers. The driver of that device can then decide if it wants to defer probe or probe without the suppliers. This will be useful for avoid probe delays of the console device that were caused by commit 71066545b48e ("driver core: Set fw_devlink.strict=1 by default"). Fixes: 71066545b48e ("driver core: Set fw_devlink.strict=1 by default") Reported-by: Sascha Hauer Reported-by: Peng Fan Tested-by: Peng Fan Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20220623080344.783549-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman drivers/base/core.c | 3 ++- include/linux/fwnode.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 1d25b84e444ad66313c473407979ea9cd33deb3f Author: Imran Khan Date: Wed Jun 15 12:10:59 2022 +1000 kernfs: Replace global kernfs_open_file_mutex with hashed mutexes. In current kernfs design a single mutex, kernfs_open_file_mutex, protects the list of kernfs_open_file instances corresponding to a sysfs attribute. So even if different tasks are opening or closing different sysfs files they can contend on osq_lock of this mutex. The contention is more apparent in large scale systems with few hundred CPUs where most of the CPUs have running tasks that are opening, accessing or closing sysfs files at any point of time. Using hashed mutexes in place of a single global mutex, can significantly reduce contention around global mutex and hence can provide better scalability. Moreover as these hashed mutexes are not part of kernfs_node objects we will not see any singnificant change in memory utilization of kernfs based file systems like sysfs, cgroupfs etc. Modify interface introduced in previous patch to make use of hashed mutexes. Use kernfs_node address as hashing key. Acked-by: Tejun Heo Signed-off-by: Imran Khan Link: https://lore.kernel.org/r/20220615021059.862643-5-imran.f.khan@oracle.com Signed-off-by: Greg Kroah-Hartman fs/kernfs/file.c | 17 +++----------- fs/kernfs/kernfs-internal.h | 4 ++++ fs/kernfs/mount.c | 19 +++++++++++++++ include/linux/kernfs.h | 57 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 83 insertions(+), 14 deletions(-) commit 41448c614815965d1cdfa720df34257b84afbb9d Author: Imran Khan Date: Wed Jun 15 12:10:58 2022 +1000 kernfs: Introduce interface to access global kernfs_open_file_mutex. This allows to change underlying mutex locking, without needing to change the users of the lock. For example next patch modifies this interface to use hashed mutexes in place of a single global kernfs_open_file_mutex. Acked-by: Tejun Heo Signed-off-by: Imran Khan Link: https://lore.kernel.org/r/20220615021059.862643-4-imran.f.khan@oracle.com Signed-off-by: Greg Kroah-Hartman fs/kernfs/file.c | 56 ++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 18 deletions(-) commit b8f35fa1188b84035c59d4842826c4e93a1b1c9f Author: Imran Khan Date: Wed Jun 15 12:10:57 2022 +1000 kernfs: Change kernfs_notify_list to llist. At present kernfs_notify_list is implemented as a singly linked list of kernfs_node(s), where last element points to itself and value of ->attr.next tells if node is present on the list or not. Both addition and deletion to list happen under kernfs_notify_lock. Change kernfs_notify_list to llist so that addition to list can heppen locklessly. Suggested by: Al Viro Acked-by: Tejun Heo Signed-off-by: Imran Khan Link: https://lore.kernel.org/r/20220615021059.862643-3-imran.f.khan@oracle.com Signed-off-by: Greg Kroah-Hartman fs/kernfs/file.c | 47 ++++++++++++++++++++--------------------------- include/linux/kernfs.h | 2 +- 2 files changed, 21 insertions(+), 28 deletions(-) commit 086c00c71fc8d47db6983f419a45f9ee167de03f Author: Imran Khan Date: Wed Jun 15 12:10:56 2022 +1000 kernfs: make ->attr.open RCU protected. After removal of kernfs_open_node->refcnt in the previous patch, kernfs_open_node_lock can be removed as well by making ->attr.open RCU protected. kernfs_put_open_node can delegate freeing to ->attr.open to RCU and other readers of ->attr.open can do so under rcu_read_(un)lock. Suggested by: Al Viro Acked-by: Tejun Heo Signed-off-by: Imran Khan Link: https://lore.kernel.org/r/20220615021059.862643-2-imran.f.khan@oracle.com Signed-off-by: Greg Kroah-Hartman fs/kernfs/file.c | 147 +++++++++++++++++++++++++++++++++---------------- include/linux/kernfs.h | 2 +- 2 files changed, 102 insertions(+), 47 deletions(-) commit dcab8da13ff4886aab26348b925d20dca4f12bac Author: Lin Feng Date: Fri Jun 17 17:17:46 2022 +0800 kernfs/file.c: remove redundant error return counter assignment Since previous 'rc = -EINVAL;', rc value doesn't change, so not necessary to re-assign it again. Signed-off-by: Lin Feng Link: https://lore.kernel.org/r/20220617091746.206515-1-linf@wangsu.com Signed-off-by: Greg Kroah-Hartman fs/kernfs/file.c | 1 - 1 file changed, 1 deletion(-) commit 7d8097073caa334ed6187a964645335324231e01 Author: Matt Roper Date: Fri Jun 24 14:03:28 2022 -0700 drm/i915: Prefer "XEHP_" prefix for registers We've been introducing new registers with a mix of "XEHP_" (architecture) and "XEHPSDV_" (platform) prefixes. For consistency, let's settle on "XEHP_" as the preferred form. XEHPSDV_RP_STATE_CAP stays with its current name since that's truly a platform-specific register and not something that applies to the Xe_HP architecture as a whole. Signed-off-by: Matt Roper Reviewed-by: Caz Yokoyama Link: https://patchwork.freedesktop.org/patch/msgid/20220624210328.308630-2-matthew.d.roper@intel.com drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 4 ++-- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 8 ++++---- drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 4 ++-- drivers/gpu/drm/i915/gt/intel_region_lmem.c | 8 ++++---- drivers/gpu/drm/i915/i915_reg.h | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) commit 8524bb67145d8a2b495fabcd4b5643010ea43353 Author: Matt Roper Date: Fri Jun 24 14:03:27 2022 -0700 drm/i915: Correct duplicated/misplaced GT register definitions XEHPSDV_FLAT_CCS_BASE_ADDR, GEN8_L3_LRA_1_GPGPU, and MMCD_MISC_CTRL were duplicated between i915_reg.h and intel_gt_regs.h. These are all GT registers, so we should drop the copy from i915_reg.h. XEHPSDV_TILE0_ADDR_RANGE was defined in i915_reg.h, but really belongs in intel_gt_regs.h. Move it. Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20220624210328.308630-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 1 + drivers/gpu/drm/i915/gt/intel_gt_regs.h | 3 +++ drivers/gpu/drm/i915/i915_reg.h | 17 ----------------- 3 files changed, 4 insertions(+), 17 deletions(-) commit 70fe758352cafdee72a7b13bf9db065f9613ced8 Author: Zhang Wensheng Date: Wed Jun 22 15:43:27 2022 +0800 driver core: fix potential deadlock in __driver_attach In __driver_attach function, There are also AA deadlock problem, like the commit b232b02bf3c2 ("driver core: fix deadlock in __device_attach"). stack like commit b232b02bf3c2 ("driver core: fix deadlock in __device_attach"). list below: In __driver_attach function, The lock holding logic is as follows: ... __driver_attach if (driver_allows_async_probing(drv)) device_lock(dev) // get lock dev async_schedule_dev(__driver_attach_async_helper, dev); // func async_schedule_node async_schedule_node_domain(func) entry = kzalloc(sizeof(struct async_entry), GFP_ATOMIC); /* when fail or work limit, sync to execute func, but __driver_attach_async_helper will get lock dev as will, which will lead to A-A deadlock. */ if (!entry || atomic_read(&entry_count) > MAX_WORK) { func; else queue_work_node(node, system_unbound_wq, &entry->work) device_unlock(dev) As above show, when it is allowed to do async probes, because of out of memory or work limit, async work is not be allowed, to do sync execute instead. it will lead to A-A deadlock because of __driver_attach_async_helper getting lock dev. Reproduce: and it can be reproduce by make the condition (if (!entry || atomic_read(&entry_count) > MAX_WORK)) untenable, like below: [ 370.785650] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 370.787154] task:swapper/0 state:D stack: 0 pid: 1 ppid: 0 flags:0x00004000 [ 370.788865] Call Trace: [ 370.789374] [ 370.789841] __schedule+0x482/0x1050 [ 370.790613] schedule+0x92/0x1a0 [ 370.791290] schedule_preempt_disabled+0x2c/0x50 [ 370.792256] __mutex_lock.isra.0+0x757/0xec0 [ 370.793158] __mutex_lock_slowpath+0x1f/0x30 [ 370.794079] mutex_lock+0x50/0x60 [ 370.794795] __device_driver_lock+0x2f/0x70 [ 370.795677] ? driver_probe_device+0xd0/0xd0 [ 370.796576] __driver_attach_async_helper+0x1d/0xd0 [ 370.797318] ? driver_probe_device+0xd0/0xd0 [ 370.797957] async_schedule_node_domain+0xa5/0xc0 [ 370.798652] async_schedule_node+0x19/0x30 [ 370.799243] __driver_attach+0x246/0x290 [ 370.799828] ? driver_allows_async_probing+0xa0/0xa0 [ 370.800548] bus_for_each_dev+0x9d/0x130 [ 370.801132] driver_attach+0x22/0x30 [ 370.801666] bus_add_driver+0x290/0x340 [ 370.802246] driver_register+0x88/0x140 [ 370.802817] ? virtio_scsi_init+0x116/0x116 [ 370.803425] scsi_register_driver+0x1a/0x30 [ 370.804057] init_sd+0x184/0x226 [ 370.804533] do_one_initcall+0x71/0x3a0 [ 370.805107] kernel_init_freeable+0x39a/0x43a [ 370.805759] ? rest_init+0x150/0x150 [ 370.806283] kernel_init+0x26/0x230 [ 370.806799] ret_from_fork+0x1f/0x30 To fix the deadlock, move the async_schedule_dev outside device_lock, as we can see, in async_schedule_node_domain, the parameter of queue_work_node is system_unbound_wq, so it can accept concurrent operations. which will also not change the code logic, and will not lead to deadlock. Fixes: ef0ff68351be ("driver core: Probe devices asynchronously instead of the driver") Signed-off-by: Zhang Wensheng Link: https://lore.kernel.org/r/20220622074327.497102-1-zhangwensheng5@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/base/dd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1d248d2302da5b96e06281a52056eeafec0d2e11 Author: Mauro Carvalho Chehab Date: Sun Jun 26 10:32:21 2022 +0100 ABI: testing/sysfs-devices-system-cpu: remove duplicated core_id This was already defined at stable/sysfs-devices-system-cpu with the same description, as pointed by get_abi.pl: Warning: /sys/devices/system/cpu/cpuX/topology/core_id is defined 2 times: Documentation/ABI/stable/sysfs-devices-system-cpu:38 Documentation/ABI/testing/sysfs-devices-system-cpu:69 Remove the duplicated one. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/1e92337c1ef74f5eb9e1c1871e20b858b490d269.1656235926.git.mchehab@kernel.org Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-devices-system-cpu | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit afa8fe4cc40e197c99fc650113bb96d26091648a Author: Xie Yongji Date: Tue May 24 19:51:42 2022 +0800 Docs/ABI/testing: Add VDUSE sysfs interface ABI document This adds missing documentation for VDUSE sysfs interface ABI under Documentation/ABI/testing. Signed-off-by: Xie Yongji Acked-by: Jason Wang Link: https://lore.kernel.org/r/20220524115143.187-1-xieyongji@bytedance.com Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-class-vduse | 33 +++++++++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 34 insertions(+) commit 5621416b11f4147585751fdaf714a06ffe2f57b6 Author: Nancy.Lin Date: Mon Jun 20 17:19:25 2022 +0800 drm/mediatek: Add mediatek-drm plane color encoding info Add plane color encoding information for color space conversion. It's a preparation for adding support for mt8195 ovl_adaptor mdp_rdma csc control. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220620091930.27797-10-nancy.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_drm_plane.c | 1 + drivers/gpu/drm/mediatek/mtk_drm_plane.h | 1 + 2 files changed, 2 insertions(+) commit 31c779f293b343577690c01369a5019ca6ec5de9 Author: Yangxi Xiang Date: Mon Jun 27 20:04:09 2022 +0800 devtmpfs: fix the dangling pointer of global devtmpfsd thread When the devtmpfs fails to mount, a dangling pointer still remains in global. Specifically, the err variable is passed by a pointer to the devtmpfsd. When the devtmpfsd exits, it sets the error and completes the setup_done. In this situation, the thread pointer is not set to null. After the devtmpfsd exited, the devtmpfs can wakes up the destroyed devtmpfsd thread by wake_up_process if a device change event comes. Signed-off-by: Yangxi Xiang Link: https://lore.kernel.org/r/20220627120409.11174-1-xyangxi5@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/base/devtmpfs.c | 1 + 1 file changed, 1 insertion(+) commit aaf94f7c3ae6b86135ada5bdb01bce5242b27175 Author: Nancy.Lin Date: Mon Jun 20 17:19:23 2022 +0800 drm/mediatek: Add display merge async reset control Add merge async reset control in mtk_merge_stop. Async hw doesn't do self reset on each sof signal(start of frame), so need to reset the async to clear the hw status for the next merge start. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220620091930.27797-8-nancy.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_disp_merge.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 38a523a2946d3a0961d141d477a1ee2b1f3bdbb1 Author: Greg Kroah-Hartman Date: Mon Jun 27 16:36:57 2022 +0200 Revert "devcoredump: remove the useless gfp_t parameter in dev_coredumpv and dev_coredumpm" This reverts commit 77515ebaf01920e2db49e04672ef669a7c2907f2 as it causes build problems in linux-next. It needs to be reintroduced in a way that can allow the api to evolve and not require a "flag day" to catch all users. Link: https://lore.kernel.org/r/20220623160723.7a44b573@canb.auug.org.au Cc: Duoming Zhou Cc: Brian Norris Cc: Johannes Berg Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman drivers/base/devcoredump.c | 16 ++++++++++------ drivers/bluetooth/btmrvl_sdio.c | 2 +- drivers/bluetooth/hci_qca.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_dump.c | 2 +- drivers/gpu/drm/msm/disp/msm_disp_snapshot.c | 4 ++-- drivers/gpu/drm/msm/msm_gpu.c | 4 ++-- drivers/media/platform/qcom/venus/core.c | 2 +- drivers/net/can/spi/mcp251xfd/mcp251xfd-dump.c | 2 +- drivers/net/wireless/ath/ath10k/coredump.c | 2 +- drivers/net/wireless/ath/wil6210/wil_crash_dump.c | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c | 2 +- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 6 ++++-- drivers/net/wireless/marvell/mwifiex/main.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 3 ++- drivers/net/wireless/realtek/rtw88/main.c | 2 +- drivers/net/wireless/realtek/rtw89/ser.c | 2 +- drivers/remoteproc/qcom_q6v5_mss.c | 2 +- drivers/remoteproc/remoteproc_coredump.c | 8 ++++---- include/drm/drm_print.h | 2 +- include/linux/devcoredump.h | 13 +++++++------ sound/soc/intel/avs/apl.c | 2 +- sound/soc/intel/avs/skl.c | 2 +- sound/soc/intel/catpt/dsp.c | 2 +- 24 files changed, 50 insertions(+), 40 deletions(-) commit 5f8954e099b8ae96e7de1bb95950e00c85bedd40 Author: Greg Kroah-Hartman Date: Mon Jun 27 16:35:59 2022 +0200 Revert "mwifiex: fix sleep in atomic context bugs caused by dev_coredumpv" This reverts commit a52ed4866d2b90dd5e4ae9dabd453f3ed8fa3cbc as it causes build problems in linux-next. It needs to be reintroduced in a way that can allow the api to evolve and not require a "flag day" to catch all users. Link: https://lore.kernel.org/r/20220623160723.7a44b573@canb.auug.org.au Cc: Duoming Zhou Cc: Brian Norris Cc: Johannes Berg Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman drivers/net/wireless/marvell/mwifiex/init.c | 9 ++++----- drivers/net/wireless/marvell/mwifiex/main.h | 3 +-- drivers/net/wireless/marvell/mwifiex/sta_event.c | 6 +++--- 3 files changed, 8 insertions(+), 10 deletions(-) commit a5b51d1dd95fd3a103b35fe0235ee6c35cf32c29 Author: Nancy.Lin Date: Mon Jun 20 17:19:22 2022 +0800 drm/mediatek: Add display merge mute/unmute support for MT8195 Add merge mute/unmute setting for MT8195. MT8195 Vdosys1 merge1~merge4 support HW mute function. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220620091930.27797-7-nancy.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_disp_merge.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit d2ae586f0e207ab418263018fd2e3cec2322179f Author: Nancy.Lin Date: Mon Jun 20 17:19:21 2022 +0800 drm/mediatek: Add display merge start/stop API for cmdq support Add merge start/stop API for cmdq support. The ovl_adaptor merges are configured with each drm plane update. Need to enable/disable merge with cmdq making sure all the settings taken effect in the same vblank. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220620091930.27797-6-nancy.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_disp_drv.h | 2 ++ drivers/gpu/drm/mediatek/mtk_disp_merge.c | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) commit 7e4727f74520dd4038acb4f29f3d4195890094fa Author: Nancy.Lin Date: Mon Jun 20 17:19:20 2022 +0800 drm/mediatek: Add display merge advance config API for MT8195 Add merge new advance config API. The original merge API is mtk_ddp_comp_funcs function prototype. The API interface parameters cannot be modified, so add a new config API for extension. This is the preparation for ovl_adaptor merge control. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220620091930.27797-5-nancy.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_disp_drv.h | 3 ++ drivers/gpu/drm/mediatek/mtk_disp_merge.c | 52 ++++++++++++++++++++++++++----- 2 files changed, 48 insertions(+), 7 deletions(-) commit 713eb3c1261a1f89e35bdf233265aa5a2c46e9b2 Author: Max Staudt Date: Sat Jun 18 20:01:34 2022 +0200 tty: Add N_CAN327 line discipline ID for ELM327 based CAN driver The actual driver will be added via the CAN tree. Link: https://lore.kernel.org/all/20220618180134.9890-1-max@enpas.org Link: https://lore.kernel.org/all/Yrm9Ezlw1dLmIxyS@kroah.com Signed-off-by: Max Staudt Acked-by: Marc Kleine-Budde Acked-by: Greg Kroah-Hartman Signed-off-by: Marc Kleine-Budde include/uapi/linux/tty.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f8946e2b6bb2a0efd450cc054f6b5b45a1f5c7d3 Author: Nancy.Lin Date: Mon Jun 20 17:19:19 2022 +0800 drm/mediatek: Add display MDP RDMA support for MT8195 Add MDP_RDMA driver for MT8195. MDP_RDMA is the DMA engine of the ovl_adaptor component. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220620091930.27797-4-nancy.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/Makefile | 3 +- drivers/gpu/drm/mediatek/mtk_disp_drv.h | 7 + drivers/gpu/drm/mediatek/mtk_drm_drv.c | 1 + drivers/gpu/drm/mediatek/mtk_drm_drv.h | 1 + drivers/gpu/drm/mediatek/mtk_mdp_rdma.c | 315 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/mediatek/mtk_mdp_rdma.h | 20 ++ 6 files changed, 346 insertions(+), 1 deletion(-) commit 7dbd3af50aad93a1e97c0d2a7b544a64e0a0a6b0 Author: Hans de Goede Date: Mon Jun 27 15:08:50 2022 +0200 platform/x86: ideapad-laptop: Add Ideapad 5 15ITL05 to ideapad_dytc_v4_allow_table[] The Ideapad 5 15ITL05 uses DYTC version 4 for platform-profile control. This has been tested successfully with the ideapad-laptop DYTC version 5 code; Add the Ideapad 5 15ITL05 to the ideapad_dytc_v4_allow_table[]. Fixes: 599482c58ebd ("platform/x86: ideapad-laptop: Add platform support for Ideapad 5 Pro 16ACH6-82L5") Link: https://bugzilla.kernel.org/show_bug.cgi?id=213297 Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20220627130850.313537-1-hdegoede@redhat.com drivers/platform/x86/ideapad-laptop.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 1ccd59066246188a0ecb5ba816e223294d73aa26 Author: Hans de Goede Date: Thu Jun 23 13:59:14 2022 +0200 platform/x86: ideapad-laptop: Add allow_v4_dytc module parameter Add an allow_v4_dytc module parameter to allow users to easily test if DYTC version 4 platform-profiles work on their laptop. Fixes: 599482c58ebd ("platform/x86: ideapad-laptop: Add platform support for Ideapad 5 Pro 16ACH6-82L5") Link: https://bugzilla.kernel.org/show_bug.cgi?id=213297 Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20220623115914.103001-1-hdegoede@redhat.com drivers/platform/x86/ideapad-laptop.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 44fd1917314e9d4f53dd95dd65df1c152f503d3a Author: Christophe JAILLET Date: Wed Jun 15 07:33:44 2022 +0200 misc: rtsx: Fix an error handling path in rtsx_pci_probe() If an error occurs after a successful idr_alloc() call, the corresponding resource must be released with idr_remove() as already done in the .remove function. Update the error handling path to add the missing idr_remove() call. Fixes: ada8a8a13b13 ("mfd: Add realtek pcie card reader driver") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/e8dc41716cbf52fb37a12e70d8972848e69df6d6.1655271216.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman drivers/misc/cardreader/rtsx_pcr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 9864bb4801331daa48514face9d0f4861e4d485b Author: Li Li Date: Thu May 26 15:00:18 2022 -0700 Binder: add TF_UPDATE_TXN to replace outdated txn When the target process is busy, incoming oneway transactions are queued in the async_todo list. If the clients continue sending extra oneway transactions while the target process is frozen, this queue can become too large to accommodate new transactions. That's why binder driver introduced ONEWAY_SPAM_DETECTION to detect this situation. It's helpful to debug the async binder buffer exhausting issue, but the issue itself isn't solved directly. In real cases applications are designed to send oneway transactions repeatedly, delivering updated inforamtion to the target process. Typical examples are Wi-Fi signal strength and some real time sensor data. Even if the apps might only care about the lastet information, all outdated oneway transactions are still accumulated there until the frozen process is thawed later. For this kind of situations, there's no existing method to skip those outdated transactions and deliver the latest one only. This patch introduces a new transaction flag TF_UPDATE_TXN. To use it, use apps can set this new flag along with TF_ONE_WAY. When such an oneway transaction is to be queued into the async_todo list of a frozen process, binder driver will check if any previous pending transactions can be superseded by comparing their code, flags and target node. If such an outdated pending transaction is found, the latest transaction will supersede that outdated one. This effectively prevents the async binder buffer running out and saves unnecessary binder read workloads. Acked-by: Todd Kjos Signed-off-by: Li Li Link: https://lore.kernel.org/r/20220526220018.3334775-2-dualli@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 85 +++++++++++++++++++++++++++++++++++-- drivers/android/binder_trace.h | 4 ++ include/uapi/linux/android/binder.h | 1 + 3 files changed, 87 insertions(+), 3 deletions(-) commit 5afbfa8cddb451432016fd37d836f9e5b1f0d6cb Author: Colin Ian King Date: Sun Jun 12 21:27:08 2022 +0100 lkdtm: cfi: use NULL for a null pointer rather than zero There is a pointer being initialized with a zero, use NULL instead. Cleans up sparse warning: drivers/misc/lkdtm/cfi.c:100:27: warning: Using plain integer as NULL pointer Acked-by: Kees Cook Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20220612202708.2754270-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/misc/lkdtm/cfi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6169525b76764acb81918aa387ac168fb9a55575 Author: Pascal Terjan Date: Sun Jun 12 14:37:44 2022 +0100 vboxguest: Do not use devm for irq When relying on devm it doesn't get freed early enough which causes the following warning when unloading the module: [249348.837181] remove_proc_entry: removing non-empty directory 'irq/20', leaking at least 'vboxguest' [249348.837219] WARNING: CPU: 0 PID: 6708 at fs/proc/generic.c:715 remove_proc_entry+0x119/0x140 [249348.837379] Call Trace: [249348.837385] unregister_irq_proc+0xbd/0xe0 [249348.837392] free_desc+0x23/0x60 [249348.837396] irq_free_descs+0x4a/0x70 [249348.837401] irq_domain_free_irqs+0x160/0x1a0 [249348.837452] mp_unmap_irq+0x5c/0x60 [249348.837458] acpi_unregister_gsi_ioapic+0x29/0x40 [249348.837463] acpi_unregister_gsi+0x17/0x30 [249348.837467] acpi_pci_irq_disable+0xbf/0xe0 [249348.837473] pcibios_disable_device+0x20/0x30 [249348.837478] pci_disable_device+0xef/0x120 [249348.837482] vbg_pci_remove+0x6c/0x70 [vboxguest] Reviewed-by: Hans de Goede Signed-off-by: Pascal Terjan Link: https://lore.kernel.org/r/20220612133744.4030602-1-pterjan@google.com Signed-off-by: Greg Kroah-Hartman drivers/virt/vboxguest/vboxguest_linux.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 4270f984b0419cb97fa7f72c20c14d1c30c2f7e5 Author: Jiang Jian Date: Tue Jun 21 20:53:21 2022 +0800 cxl: drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: drivers/misc/cxl/cxl.h line: 1107 +/* check if the given pci_dev is on the the cxl vphb bus */ changed to +/* check if the given pci_dev is on the cxl vphb bus */ Acked-by: Andrew Donnellan Signed-off-by: Jiang Jian Link: https://lore.kernel.org/r/20220621125321.122280-1-jiangjian@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/misc/cxl/cxl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e1cfc64ea66fa06096c67d1c1fa04c46aefd9301 Author: Jiang Jian Date: Tue Jun 21 20:48:40 2022 +0800 sgi-xp: xpc_uv: drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: ./drivers/misc/sgi-xp/xpc_uv.c line: 1601 * to put the the msg_slot back on the free list. changed to * to put the msg_slot back on the free list. Signed-off-by: Jiang Jian Link: https://lore.kernel.org/r/20220621124840.119875-1-jiangjian@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/misc/sgi-xp/xpc_uv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1cb53f0417a757849039538569c269a237a35124 Author: Jiang Jian Date: Tue Jun 21 19:53:10 2022 +0800 apm-emulation: drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: drivers/char/apm-emulation.c line: 547 * Wait for the the suspend_acks_pending variable to drop to changed to * Wait for the suspend_acks_pending variable to drop to Signed-off-by: Jiang Jian Link: https://lore.kernel.org/r/20220621115310.110740-1-jiangjian@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/char/apm-emulation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e813f47cdc90506406646877664ea30038dd51e Author: Jiang Jian Date: Tue Jun 21 20:32:03 2022 +0800 misc: sgi-gru: grukservices: drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: drivers/misc/sgi-gru/grukservices.c line: 39 * reserved whenever the the kernel context for the blade is loaded. Note changed to * reserved whenever the kernel context for the blade is loaded. Note Acked-by: Dimitri Sivanich Signed-off-by: Jiang Jian Link: https://lore.kernel.org/r/20220621123203.118488-1-jiangjian@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/misc/sgi-gru/grukservices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e201c9630b374e394b7cadcc4d3679371cf98388 Author: Nancy.Lin Date: Mon Jun 20 17:19:17 2022 +0800 dt-bindings: display: mediatek: add vdosys1 RDMA definition for mt8195 Add vdosys1 RDMA definition. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Tested-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220620091930.27797-2-nancy.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu .../display/mediatek/mediatek,mdp-rdma.yaml | 88 ++++++++++++++++++++++ 1 file changed, 88 insertions(+) commit 4d0548a7b806a78ba253f1389b9ecdcaca47d583 Author: Seth Forshee Date: Mon Jun 27 08:01:58 2022 -0500 mnt_idmapping: return false when comparing two invalid ids INVALID_VFS{U,G}ID represent ids which have no mapping in the target mnt_usersns. This can happen for a couple of different reasons -- the source id might be valid but has no mapping in mnt_userns, or the source id might have been invalid (either due to a failed mapping or because it was set to invalid to indicate it is uninitialized). This means that two arbitrary vfs{u,g}ids which are both invalid could represent two different underlying ids, or they could represent a failed mapping and an uninitialized value. In these situation the vfs{u,g}id equality functions evaluate these ids as equal, and care must be taken when comparing ids to avoid problems. It would be less error prone to always evaluate two invalid ids as not equal to each other, and to check explicitly for vfs{u,g}id validity when that is needed. Change all vfs{u,g}id equality functions to return false when both ids are invalid. Functions for checking whether an id is valid exist and are already being used by code which needs to check this. Link: https://lore.kernel.org/linux-fsdevel/YrIMZirGoE0VIO45@do-x1extreme Signed-off-by: Seth Forshee Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Christian Brauner (Microsoft) include/linux/mnt_idmapping.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 81a1807d80dd26cdf8a357cf55f556ade90c7fda Author: Christian Brauner Date: Mon Jun 27 15:40:45 2022 +0200 attr: fix kernel doc When building kernel documentation new warnings were generated because the name in the parameter documentation didn't match the parameter name. Signed-off-by: Christian Brauner (Microsoft) fs/attr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8b0bce056351bb9abd06a09cffff1ff0d84ee580 Author: ChiYuan Huang Date: Tue Jun 21 18:36:28 2022 +0800 backlight: rt4831: Apply ocp level from devicetree Add 'richtek,bled-ocp-microamp' property parsing in device_property_init function. This value may configure prior to the kernel driver. If it's not specified in devicetree, keep the original setting. Else, use clamp to align the value in min/max range and also roundup to choose the best selector. Reported-by: Lucas Tsai Signed-off-by: ChiYuan Huang Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/1655807788-24511-3-git-send-email-u0084500@gmail.com drivers/video/backlight/rt4831-backlight.c | 33 +++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit 27e5c6546333bc7bbbb58b1a823ef21a6317b546 Author: ChiYuan Huang Date: Tue Jun 21 18:36:27 2022 +0800 dt-bindings: backlight: rt4831: Add the new ocp level property Add 'richtek,bled-ocp-microamp' property to make it chooseable. The wrong backlight ocp level may affect the backlight channel output current smaller than configured. Signed-off-by: ChiYuan Huang Reviewed-by: Daniel Thompson Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/1655807788-24511-2-git-send-email-u0084500@gmail.com .../devicetree/bindings/leds/backlight/richtek,rt4831-backlight.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit 7d008eecb0cfc2b1a1a742d6faa0a02f339535c2 Author: Yannick Fertre Date: Fri Jun 3 15:46:54 2022 +0200 drm/stm: ltdc: update hardware error management The latest hardware version (0x40100) supports a hardware threshold register (aka FUTR) to trigger a fifo underrun interrupt. A software threshold has been implemented for other hardware versions. The threshold is set to 128 by default. Signed-off-by: Yannick Fertre Signed-off-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20220603134654.594373-1-yannick.fertre@foss.st.com drivers/gpu/drm/stm/ltdc.c | 90 ++++++++++++++++++++++++++++++++++++---------- drivers/gpu/drm/stm/ltdc.h | 6 +++- 2 files changed, 77 insertions(+), 19 deletions(-) commit c6193dc57f74bc626c02a9880b921a7f124e1456 Author: Yannick Fertre Date: Fri Jun 3 15:45:47 2022 +0200 drm/stm: ltdc: add support of horizontal & vertical mirroring Support of vertical & horizontal mirroring features thanks to the plane rotation property. Signed-off-by: Yannick Fertre Signed-off-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20220603134547.593790-1-yannick.fertre@foss.st.com drivers/gpu/drm/stm/ltdc.c | 163 +++++++++++++++++++++++++++++---------------- drivers/gpu/drm/stm/ltdc.h | 1 + 2 files changed, 108 insertions(+), 56 deletions(-) commit 62467fccb73fb700d23c35fcac71cb0cf0662ddb Author: Yannick Fertre Date: Fri Jun 3 15:44:59 2022 +0200 drm/stm: ltdc: add support of the dynamic z-order Zpos property is immutable for all hardware versions except the last version (0x40100) which support the blending order feature (dynamic z-order). Signed-off-by: Yannick Fertre Signed-off-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20220603134459.593379-1-yannick.fertre@foss.st.com drivers/gpu/drm/stm/drv.c | 1 + drivers/gpu/drm/stm/ltdc.c | 23 ++++++++++++++++++++--- drivers/gpu/drm/stm/ltdc.h | 1 + 3 files changed, 22 insertions(+), 3 deletions(-) commit 44b4e7282249903a3f9689da3fd26fc9cf7c5d2c Author: Yannick Fertre Date: Fri Jun 3 15:43:34 2022 +0200 drm/stm: ltdc: fix various coding-style warnings Fix issues reported by checkpatch.pl: - Braces {} should be used on all arms - Blank lines Signed-off-by: Yannick Fertre Acked-by: Raphael Gallais-Pou Signed-off-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20220603134334.592805-1-yannick.fertre@foss.st.com drivers/gpu/drm/stm/ltdc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fb37cfa032a90201af45c9e42a8549c57f1de573 Author: Yannick Fertre Date: Fri Jun 3 15:42:50 2022 +0200 drm/stm: ltdc: remove error message about scaling Remove error message about scaling & replace it by a debug message to avoid too much error. Signed-off-by: Yannick Fertre Acked-by: Raphael Gallais-Pou Signed-off-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20220603134250.592408-1-yannick.fertre@foss.st.com drivers/gpu/drm/stm/ltdc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c4f218d46fafd709df8e03c275c4d4ad6ebed019 Author: Yannick Fertre Date: Fri Jun 3 15:41:51 2022 +0200 drm/stm: ltdc: disable all layers before crtc shutdown All plans must be disabled before the CRTC shutdown helping the crtc to restart from a clean situation (without unwanted planes already enable). Signed-off-by: Yannick Fertre Signed-off-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20220603134151.591997-1-yannick.fertre@foss.st.com drivers/gpu/drm/stm/ltdc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6a5c94d92699b7f12f5dae32fa889d196bda3a80 Author: Samuel Thibault Date: Sun Jun 12 19:22:44 2022 +0200 speakup: Generate speakupmap.h automatically speakupmap.h was not actually intended to be source code, speakupmap.map is. This resurrects the makemapdata.c and genmap.c tools to generate speakupmap.h automatically from the input and speakup headers, and the speakupmap.map keyboard mapping source file. Signed-off-by: Samuel Thibault Link: https://lore.kernel.org/r/20220612172244.il3siyq7ueqnvah5@begin Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/.gitignore | 4 + drivers/accessibility/speakup/Makefile | 28 +++++ drivers/accessibility/speakup/genmap.c | 162 ++++++++++++++++++++++++++++ drivers/accessibility/speakup/makemapdata.c | 125 +++++++++++++++++++++ drivers/accessibility/speakup/speakupmap.h | 66 ------------ drivers/accessibility/speakup/utils.h | 102 ++++++++++++++++++ 6 files changed, 421 insertions(+), 66 deletions(-) commit ebc4969ae125e65fdb563f66f4bfa7aec95f7eb4 Author: Nícolas F. R. A. Prado Date: Thu Jun 23 15:37:00 2022 -0400 dt-bindings: usb: mtk-xhci: Make all clocks required All of the clocks listed in the binding are always wired to the XHCI controller hardware blocks on all SoCs. The reason some clocks were made optional in the binding was to account for the fact that depending on the SoC, some of the clocks might be fixed (ie not controlled by software). Given that the devicetree should represent the hardware, make all clocks required in the binding. Subsequent patches will make the DTS changes to specify fixed-clocks for the clocks that aren't controllable. Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220623193702.817996-3-nfraprado@collabora.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b2c510ffe29f20a5f6ff31ae28d32ffa494b8cfb Author: Nícolas F. R. A. Prado Date: Thu Jun 23 15:36:59 2022 -0400 dt-bindings: usb: mtk-xhci: Allow wakeup interrupt-names to be optional Add missing "minItems: 1" to the interrupt-names property to allow the second interrupt-names, "wakeup", to be optional. Fixes: fe8e488058c4 ("dt-bindings: usb: mtk-xhci: add wakeup interrupt") Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: Krzysztof Kozlowski Acked-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220623193702.817996-2-nfraprado@collabora.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 1 + 1 file changed, 1 insertion(+) commit 6569689e78299ff91002960a163012b576f2b21a Author: Xuezhi Zhang Date: Fri Jun 24 20:12:38 2022 +0800 usb: core: sysfs: convert sysfs snprintf to sysfs_emit Fix up all sysfs show entries to use sysfs_emit Signed-off-by: Xuezhi Zhang Link: https://lore.kernel.org/r/20220624121238.134256-1-zhangxuezhi1@coolpad.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/sysfs.c | 79 ++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 39 deletions(-) commit 58301e1c15db89c0edc6a122c8f6fb5af271954b Author: Bagas Sanjaya Date: Tue Jun 14 15:46:58 2022 +0700 Documentation: samsung-s3c24xx: Add blank line after SPDX directive After merging spdx tree for linux-next testing, Stephen Rothwell reported htmldocs warning: Documentation/arm/samsung-s3c24xx/cpufreq.rst:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. It is due to missing blank line separator between SPDX directive and page title. Add the blank line to fix the warning. Link: https://lore.kernel.org/linux-next/20220614164506.6afd65a6@canb.auug.org.au/ Fixes: b7bc1c9e5b04da ("treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_147.RULE") Cc: Jonathan Corbet Cc: Allison Randal Cc: Greg Kroah-Hartman Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Reported-by: Stephen Rothwell Signed-off-by: Bagas Sanjaya Signed-off-by: Greg Kroah-Hartman Documentation/arm/samsung-s3c24xx/cpufreq.rst | 1 + 1 file changed, 1 insertion(+) commit f287f971e2569827fe9fb3a8d55a37703a13cf29 Author: Ilpo Järvinen Date: Fri Jun 24 23:42:10 2022 +0300 serial: 8250_dwlib: Support for 9th bit multipoint addressing Add 9th bit multipoint addressing mode for DW UART. 9th bit addressing can be used only when HW RS485 is available. Updating RAR (receive address register) is bit tricky because busy indication is not be available when DW UART is strictly 16550 compatible, which is the case with the hardware I was testing with. RAR should not be updated while receive is in progress which is now achieved by deasserting RE and waiting for one frame (in case rx would be in progress, the driver seems to have no way of knowing it w/o busy indication). Because of this complexity, it's better to avoid doing it unless really needed. Co-developed-by: Heikki Krogerus Co-developed-by: Andy Shevchenko Co-developed-by: Raymond Tan Co-developed-by: Lakshmi Sowjanya Signed-off-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Signed-off-by: Raymond Tan Signed-off-by: Lakshmi Sowjanya Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220624204210.11112-7-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dwlib.c | 102 ++++++++++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 1 deletion(-) commit 4f768e94774c58c9f7f54ebd38dadf172970046a Author: Ilpo Järvinen Date: Fri Jun 24 23:42:09 2022 +0300 serial: Support for RS-485 multipoint addresses Add support for RS-485 multipoint addressing using 9th bit [*]. The addressing mode is configured through ->rs485_config(). ADDRB in termios indicates 9th bit addressing mode is enabled. In this mode, 9th bit is used to indicate an address (byte) within the communication line. ADDRB can only be enabled/disabled through ->rs485_config() that is also responsible for setting the destination and receiver (filter) addresses. Add traps to detect unwanted changes to struct serial_rs485 layout using static_assert(). [*] Technically, RS485 is just an electronic spec and does not itself specify the 9th bit addressing mode but 9th bit seems at least "semi-standard" way to do addressing with RS485. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220624204210.11112-6-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/serial/driver.rst | 2 ++ Documentation/driver-api/serial/serial-rs485.rst | 26 +++++++++++++++++++++++- drivers/tty/serial/serial_core.c | 22 +++++++++++++++++++- drivers/tty/tty_ioctl.c | 4 ++++ include/uapi/asm-generic/termbits-common.h | 1 + include/uapi/linux/serial.h | 20 ++++++++++++++++-- 6 files changed, 71 insertions(+), 4 deletions(-) commit ae50bb2752836277ae15aa4e9d99074d6d947946 Author: Ilpo Järvinen Date: Fri Jun 24 23:42:08 2022 +0300 serial: take termios_rwsem for ->rs485_config() & pass termios as param To be able to alter ADDRB within ->rs485_config(), take termios_rwsem before calling ->rs485_config() and pass termios. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220624204210.11112-5-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250.h | 3 ++- drivers/tty/serial/8250/8250_dwlib.c | 3 ++- drivers/tty/serial/8250/8250_exar.c | 9 +++++---- drivers/tty/serial/8250/8250_fintek.c | 2 +- drivers/tty/serial/8250/8250_lpc18xx.c | 2 +- drivers/tty/serial/8250/8250_pci.c | 2 +- drivers/tty/serial/8250/8250_port.c | 3 ++- drivers/tty/serial/amba-pl011.c | 2 +- drivers/tty/serial/ar933x_uart.c | 2 +- drivers/tty/serial/atmel_serial.c | 2 +- drivers/tty/serial/fsl_lpuart.c | 4 ++-- drivers/tty/serial/imx.c | 2 +- drivers/tty/serial/max310x.c | 2 +- drivers/tty/serial/mcf.c | 3 ++- drivers/tty/serial/omap-serial.c | 3 ++- drivers/tty/serial/sc16is7xx.c | 2 +- drivers/tty/serial/serial_core.c | 14 ++++++++++---- drivers/tty/serial/stm32-usart.c | 2 +- include/linux/serial_core.h | 1 + 19 files changed, 38 insertions(+), 25 deletions(-) commit 79b3e69fa4a1c796d1002faf70da3280430eab61 Author: Ilpo Järvinen Date: Fri Jun 24 23:42:07 2022 +0300 serial: 8250_lpss: Use 32-bit reads Use 32-bit reads in order to not lose higher bits of DW UART regs. This change does not fix any known issue as the high bits are not used for anything related to 8250 driver (dw8250_readl_ext and dw8250_writel_ext used within the dwlib are already doing readl/writel/ioread32be/iowrite32be anyway). This change is necessary to enables 9th bit address mode. DW UART reports address frames with BIT(8) of LSR. Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220624204210.11112-4-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_lpss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 507bd6fbaaefcb8dd89bd00baddf00b439d30c51 Author: Ilpo Järvinen Date: Fri Jun 24 23:42:06 2022 +0300 serial: 8250: create lsr_save_mask Allow drivers to alter LSR save mask. Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220624204210.11112-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250.h | 2 +- drivers/tty/serial/8250/8250_core.c | 4 ++++ drivers/tty/serial/8250/8250_dw.c | 2 +- include/linux/serial_8250.h | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) commit f8ba5680a56be696b3f4343ed0a591abab807da4 Author: Ilpo Järvinen Date: Fri Jun 24 23:42:05 2022 +0300 serial: 8250: make saved LSR larger DW flags address received as BIT(8) in LSR. In order to not lose that on read, enlarge lsr_saved_flags to u16. Adjust lsr/status variables and related call chains to use u16. Technically, some of these type conversion would not be needed but it doesn't hurt to be consistent. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220624204210.11112-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250.h | 4 ++-- drivers/tty/serial/8250/8250_exar.c | 2 +- drivers/tty/serial/8250/8250_fsl.c | 2 +- drivers/tty/serial/8250/8250_ingenic.c | 2 +- drivers/tty/serial/8250/8250_omap.c | 7 +++---- drivers/tty/serial/8250/8250_port.c | 17 +++++++++-------- include/linux/serial_8250.h | 6 +++--- 7 files changed, 20 insertions(+), 20 deletions(-) commit 34619de1b8cb52afa90bbeb3b4fbad34c28f19cf Author: Ilpo Järvinen Date: Fri Jun 24 23:54:24 2022 +0300 serial: Consolidate BOTH_EMPTY use Per file BOTH_EMPTY defines are littering our source code here and there. Define once in serial.h and create helper for the check too. Reviewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220624205424.12686-7-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman arch/mips/ath79/early_printk.c | 9 +++++---- drivers/accessibility/speakup/serialio.h | 3 +-- drivers/tty/serial/8250/8250_early.c | 4 +--- drivers/tty/serial/8250/8250_port.c | 12 +++++------- drivers/tty/serial/omap-serial.c | 7 +++---- drivers/tty/serial/pch_uart.c | 7 +++---- drivers/tty/serial/pxa.c | 5 ++--- drivers/tty/serial/sunsu.c | 4 +--- drivers/tty/serial/vr41xx_siu.c | 4 +--- include/linux/serial.h | 9 +++++++++ 10 files changed, 31 insertions(+), 33 deletions(-) commit eb47b59afb7e46c952d7b03884245364990d4910 Author: Ilpo Järvinen Date: Fri Jun 24 23:54:23 2022 +0300 serial: Convert SERIAL_XMIT_SIZE to UART_XMIT_SIZE Both UART_XMIT_SIZE and SERIAL_XMIT_SIZE are defined. Make them all UART_XMIT_SIZE. Reviewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220624205424.12686-6-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/amiserial.c | 18 +++++++++--------- drivers/tty/mips_ejtag_fdc.c | 2 +- drivers/tty/serial/meson_uart.c | 2 +- drivers/tty/serial/owl-uart.c | 2 +- drivers/tty/serial/rda-uart.c | 2 +- include/linux/serial.h | 6 ------ 6 files changed, 13 insertions(+), 19 deletions(-) commit 27a1c39215a2f4f4ca6bae0dba1bebc8e16a01a0 Author: Ilpo Järvinen Date: Fri Jun 24 23:54:22 2022 +0300 serial: 8250: Use C99 array initializer & define UART_REG_UNMAPPED Use C99 array initializer insteads of comments and make unmapped checks more obvious. Reviewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220624205424.12686-5-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 38 +++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) commit e23ee9d2c4ccb08fdfee3aea0a04a27bccd77433 Author: Ilpo Järvinen Date: Fri Jun 24 23:54:21 2022 +0300 serial: Use bits for UART_LSR_BRK_ERROR_BITS/MSR_ANY_DELTA Instead of listing the bits for UART_LSR_BRK_ERROR_BITS and UART_MSR_ANY_DELTA in comment, use them to define instead. Reviewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220624205424.12686-4-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman include/uapi/linux/serial_reg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fddbab7b40b34d204c4dfa7c6a62e5f7c1920e98 Author: Ilpo Järvinen Date: Fri Jun 24 23:54:20 2022 +0300 serial: msm: Rename UART_* defines to MSM_UART_* Using UART_* to name defines is a bit problematic. When trying to do unrelated cleanup which also involved tweaking header inclusion logic, caused UART_CSR from serial_reg.h to leak into msm's namespace which is also among msm defines. Thus, rename all UART_* ones to MSM_UART_* to eliminate possibility of collisions. Reviewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220624205424.12686-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/msm_serial.c | 501 ++++++++++++++++++++-------------------- 1 file changed, 250 insertions(+), 251 deletions(-) commit 24b5596a858d1b27e63b4f7f894403f0f3dc31c3 Author: Ilpo Järvinen Date: Fri Jun 24 23:54:19 2022 +0300 serial: msm: Convert container_of UART_TO_MSM to static inline Create static inline instead of define as it provides type safety and is safer wrt. macros expansion. Reviewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220624205424.12686-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/msm_serial.c | 49 ++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 23 deletions(-) commit df5dac860111aa9cfab61521494d25825446cfcc Author: Claudiu Beznea Date: Thu Jun 16 17:00:24 2022 +0300 serial: st-asc: remove include of pm_runtime.h st-asc driver doesn't use helpers from pm_runtime.h thus remove its include. Reviewed-by: Patrice Chotard Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220616140024.2081238-5-claudiu.beznea@microchip.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/st-asc.c | 1 - 1 file changed, 1 deletion(-) commit 61dbc75ce00f4e27da61683d23cb4f9f3ef3f944 Author: Claudiu Beznea Date: Thu Jun 16 17:00:23 2022 +0300 tty: serial: atmel: remove enable/disable clock due to atmel_console_setup() There is no need for clk_prepare_enable() at the beginning of atmel_console_setup() and clk_disable_unprepare() at the end of atmel_console_setup() as the clock is already enabled when calling atmel_console_setup() and its disablement is done at the end of probe. Acked-by: Richard Genoud Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220616140024.2081238-4-claudiu.beznea@microchip.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 84b476b124d4581d0c18e2e39e14fca52feedffd Author: Claudiu Beznea Date: Thu Jun 16 17:00:22 2022 +0300 tty: serial: atmel: use devm_clk_get() Use devm_clk_get() for serial clock instead of clk_get()/clk_put(). With this move the clk_get in driver's probe function. Acked-by: Richard Genoud Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220616140024.2081238-3-claudiu.beznea@microchip.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 50 ++++++++++++--------------------------- 1 file changed, 15 insertions(+), 35 deletions(-) commit b50058b82e0a0ea2cb11889c261cb7d587b62e1c Author: Claudiu Beznea Date: Thu Jun 16 17:00:21 2022 +0300 tty: serial: atmel: stop using legacy pm ops Stop using legacy PM ops and switch using dev_pm_ops. Along with it #ifdef CONFIG_PM are removed and __maybe_unused and pm_ptr() used instead. Coding style recommends (at chapter Conditional Compilation) to avoid using preprocessor conditional and use __maybe_unused instead. Acked-by: Richard Genoud Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220616140024.2081238-2-claudiu.beznea@microchip.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit 1fce2867c7cb147978b116953aa033880654089b Author: Sebastian Reichel Date: Thu Jun 23 18:13:50 2022 +0200 dt-bindings: serial: snps-dw-apb-uart: Add Rockchip RK3588 Add a Rockchip RK3588 compatible. Acked-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20220623161350.242079-1-sebastian.reichel@collabora.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml | 1 + 1 file changed, 1 insertion(+) commit ab8ba6c59d5ab4f894cd731c0b05825576d15ed1 Author: Xiang wangx Date: Mon Jun 20 18:46:53 2022 +0800 serial: kgdboc: Fix typo in comment Delete the redundant word 'the'. Signed-off-by: Xiang wangx Link: https://lore.kernel.org/r/20220620104653.5451-1-wangxiang@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/kgdboc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b28be5d06d337423836b96a29afd53047a3d290f Author: Ilpo Järvinen Date: Fri Jun 17 12:39:29 2022 +0300 MAINTAINERS: Update DW 8250 UART maintainership Add myself as maintainer for DW 8250 UART and up it to Supported. Reported-by: kernel test robot Reviewed-by: Andy Shevchenko Acked-by: From: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/be58b398-71ff-7c12-1bf1-a09181d9c80@linux.intel.com Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 599fc76a5a00a3351caf06f96fc8a7e1bf67d9ea Author: Wolfram Sang Date: Mon Jun 13 15:10:07 2022 +0200 dt-bindings: serial: renesas,hscif: Document r8a779f0 bindings Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20220613131007.10027-1-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/renesas,hscif.yaml | 1 + 1 file changed, 1 insertion(+) commit d24d7bb2cd947676f9b71fb944d045e09b8b282f Author: Liang He Date: Sat Jun 18 14:08:50 2022 +0800 tty: serial: Fix refcount leak bug in ucc_uart.c In soc_info(), of_find_node_by_type() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Acked-by: Timur Tabi Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220618060850.4058525-1-windhl@126.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/ucc_uart.c | 2 ++ 1 file changed, 2 insertions(+) commit eb01611056cf835cf2c1cc1a800bfff9386c82ea Author: Liang He Date: Wed Jun 15 19:17:47 2022 +0800 drivers: tty: serial: Add missing of_node_put() in serial-tegra.c In tegra_uart_init(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220615111747.3963930-1-windhl@126.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial-tegra.c | 1 + 1 file changed, 1 insertion(+) commit f9008285bb69e4713918a665250ab2d356b731ba Author: Ilpo Järvinen Date: Mon Jun 13 14:39:05 2022 +0300 serial: Drop timeout from uart_port Since commit 31f6bd7fad3b ("serial: Store character timing information to uart_port"), per frame timing information is available on uart_port. Uart port's timeout can be derived from frame_time by multiplying with fifosize. Most callers of uart_poll_timeout are not made under port's lock. To be on the safe side, make sure frame_time is only accessed once. As fifo_size is effectively a constant, it shouldn't cause any issues. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220613113905.22962-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/serial/driver.rst | 5 +++-- drivers/tty/serial/mux.c | 6 ------ drivers/tty/serial/serial_core.c | 25 ++++++++++--------------- include/linux/serial_core.h | 16 ++++++++++++++-- 4 files changed, 27 insertions(+), 25 deletions(-) commit ab24a01b276508dc884761bcb8e2759c36702377 Author: Ilpo Järvinen Date: Tue Jun 14 10:50:54 2022 +0300 tty: Add closing marker into comment in tty_ldisc.h The closing `` is missing. Add it. Fixes: 6bb6fa6908eb ("tty: Implement lookahead to process XON/XOFF timely") Reported-by: Stephen Rothwell Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/9bc6d45d-48c8-519-1646-78ba22505b1f@linux.intel.com Signed-off-by: Greg Kroah-Hartman include/linux/tty_ldisc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4b06172861bfcb390fc196bf616f60e95665e7d Author: Ilpo Järvinen Date: Mon Jun 13 10:57:36 2022 +0300 serial: 8250_pericom: Use UART_LCR_DLAB Use UART_LCR_DLAB instead of literal. Reviewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220613075736.12283-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pericom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5db6db08c6de4f95865c16a5f5b46726da295809 Author: Ilpo Järvinen Date: Mon Jun 13 10:57:35 2022 +0300 serial: 8250: Use UART_LCR_WLEN8 instead of literal Use UART_LCR_WLEN8 instead of literal 0x03 in size_fifo(). Reviewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220613075736.12283-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2069cb2e1f3ed2d97e8b6fe818982432de7f4e69 Author: Christophe JAILLET Date: Sat Jun 11 10:42:06 2022 +0200 serial: sifive: Remove useless license text when SPDX-License-Identifier is already used An SPDX-License-Identifier is already in place. There is no need to duplicate part of the corresponding license. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/dbc54eff6f4e077d9126054f395d5bc5b3405917.1654936915.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sifive.c | 10 ---------- 1 file changed, 10 deletions(-) commit ee78ec1077d37d1a4a0860589a65df8ae6d2255c Author: Liu Song Date: Sat Jun 25 23:15:21 2022 +0800 blk-mq: blk_mq_tag_busy is no need to return a value Currently "blk_mq_tag_busy" return value has no effect, so adjust it. Some code implementations have also been adjusted to enhance readability. Signed-off-by: Liu Song Link: https://lore.kernel.org/r/1656170121-1619-1-git-send-email-liusong@linux.alibaba.com Signed-off-by: Jens Axboe block/blk-mq-tag.c | 18 +++++++----------- block/blk-mq-tag.h | 10 ++++------ 2 files changed, 11 insertions(+), 17 deletions(-) commit a78418e6a04c93b9ffd3f0f601c5cb10612acb7f Author: Jan Kara Date: Thu Jun 23 09:48:34 2022 +0200 block: Always initialize bio IO priority on submit Currently, IO priority set in task's IO context is not reflected in the bio->bi_ioprio for most IO (only io_uring and direct IO set it). This results in odd results where process is submitting some bios with one priority and other bios with a different (unset) priority and due to differing priorities bios cannot be merged. Make sure bio->bi_ioprio is always set on bio submission. Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Jan Kara Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220623074840.5960-9-jack@suse.cz Signed-off-by: Jens Axboe block/blk-mq.c | 3 +++ 1 file changed, 3 insertions(+) commit 9c6227e04355a430aa59709bbf869d9126112d0d Author: Jan Kara Date: Thu Jun 23 09:48:33 2022 +0200 block: Initialize bio priority earlier Bio's IO priority needs to be initialized before we try to merge the bio with other bios. Otherwise we could merge bios which would otherwise receive different IO priorities leading to possible QoS issues. Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Jan Kara Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220623074840.5960-8-jack@suse.cz Signed-off-by: Jens Axboe block/blk-mq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 82b74cac28493fb40ea74fb2fe648b5fc7ea0c1c Author: Jan Kara Date: Thu Jun 23 09:48:32 2022 +0200 blk-ioprio: Convert from rqos policy to direct call Convert blk-ioprio handling from a rqos policy to a direct call from blk_mq_submit_bio(). Firstly, blk-ioprio is not much of a rqos policy anyway, it just needs a hook in bio submission path to set the bio's IO priority. Secondly, the rqos .track hook gets actually called too late for blk-ioprio purposes and introducing a special rqos hook just for blk-ioprio looks even weirder. Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Jan Kara Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220623074840.5960-7-jack@suse.cz Signed-off-by: Jens Axboe block/blk-cgroup.c | 1 + block/blk-ioprio.c | 50 +++++--------------------------------------------- block/blk-ioprio.h | 9 +++++++++ block/blk-mq.c | 8 ++++++++ 4 files changed, 23 insertions(+), 45 deletions(-) commit f25865447294bf2468c2587dd98f8fa999260893 Author: Jan Kara Date: Thu Jun 23 09:48:31 2022 +0200 blk-ioprio: Remove unneeded field blkcg->ioprio_set field is not really useful except for avoiding possibly more expensive checks inside blkcg_ioprio_track(). The check for blkcg->prio_policy being equal to POLICY_NO_CHANGE does the same service so just remove the ioprio_set field and replace the check. Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Jan Kara Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220623074840.5960-6-jack@suse.cz Signed-off-by: Jens Axboe block/blk-ioprio.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 4b838d9ee950b37bee624e301bd8e923165b1cf3 Author: Jan Kara Date: Thu Jun 23 09:48:30 2022 +0200 block: Fix handling of tasks without ioprio in ioprio_get(2) ioprio_get(2) can be asked to return the best IO priority from several tasks (IOPRIO_WHO_PGRP, IOPRIO_WHO_USER). Currently the call treats tasks without set IO priority as having priority IOPRIO_CLASS_BE/IOPRIO_BE_NORM however this does not really reflect the IO priority the task will get (which depends on task's nice value). Fix the code to use the real IO priority task's IO will use. We have to modify code for ioprio_get(IOPRIO_WHO_PROCESS) to keep returning IOPRIO_CLASS_NONE priority for tasks without set IO priority as a special case to maintain userspace visible API. Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20220623074840.5960-5-jack@suse.cz Signed-off-by: Jens Axboe block/ioprio.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) commit fc25545e17bd74befe0b8ab2c65ac84936be5066 Author: Jan Kara Date: Thu Jun 23 09:48:29 2022 +0200 block: Make ioprio_best() static Nobody outside of block/ioprio.c uses it. Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Jan Kara Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220623074840.5960-4-jack@suse.cz Signed-off-by: Jens Axboe block/ioprio.c | 2 +- include/linux/ioprio.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) commit 893e5d32d5832674bcf6465f27958e883b72b346 Author: Jan Kara Date: Thu Jun 23 09:48:28 2022 +0200 block: Generalize get_current_ioprio() for any task get_current_ioprio() operates only on current task. We will need the same functionality for other tasks as well. Generalize get_current_ioprio() for that and also move the bulk out of the header file because it is large enough. Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Jan Kara Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220623074840.5960-3-jack@suse.cz Signed-off-by: Jens Axboe block/ioprio.c | 26 ++++++++++++++++++++++++++ include/linux/ioprio.h | 26 ++++++++++---------------- 2 files changed, 36 insertions(+), 16 deletions(-) commit f7eda402878b12bc0884c5bc1192a9e76ad121fb Author: Jan Kara Date: Thu Jun 23 09:48:27 2022 +0200 block: Return effective IO priority from get_current_ioprio() get_current_ioprio() is used to initialize IO priority of various requests. As such it should be returning the effective IO priority of the task (i.e., reflecting the fact that unset IO priority should get set based on task's CPU priority) so that the conversion is concentrated in one place. Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Jan Kara Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220623074840.5960-2-jack@suse.cz Signed-off-by: Jens Axboe include/linux/ioprio.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit e589f46445960c274cc813a1cc8e2fc73b2a1849 Author: Jan Kara Date: Thu Jun 23 09:48:26 2022 +0200 block: fix default IO priority handling again Commit e70344c05995 ("block: fix default IO priority handling") introduced an inconsistency in get_current_ioprio() that tasks without IO context return IOPRIO_DEFAULT priority while tasks with freshly allocated IO context will return 0 (IOPRIO_CLASS_NONE/0) IO priority. Tasks without IO context used to be rare before 5a9d041ba2f6 ("block: move io_context creation into where it's needed") but after this commit they became common because now only BFQ IO scheduler setups task's IO context. Similar inconsistency is there for get_task_ioprio() so this inconsistency is now exposed to userspace and userspace will see different IO priority for tasks operating on devices with BFQ compared to devices without BFQ. Furthemore the changes done by commit e70344c05995 change the behavior when no IO priority is set for BFQ IO scheduler which is also documented in ioprio_set(2) manpage: "If no I/O scheduler has been set for a thread, then by default the I/O priority will follow the CPU nice value (setpriority(2)). In Linux kernels before version 2.6.24, once an I/O priority had been set using ioprio_set(), there was no way to reset the I/O scheduling behavior to the default. Since Linux 2.6.24, specifying ioprio as 0 can be used to reset to the default I/O scheduling behavior." So make sure we default to IOPRIO_CLASS_NONE as used to be the case before commit e70344c05995. Also cleanup alloc_io_context() to explicitely set this IO priority for the allocated IO context to avoid future surprises. Note that we tweak ioprio_best() to maintain ioprio_get(2) behavior and make this commit easily backportable. CC: stable@vger.kernel.org Fixes: e70344c05995 ("block: fix default IO priority handling") Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Jan Kara Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220623074840.5960-1-jack@suse.cz Signed-off-by: Jens Axboe block/blk-ioc.c | 2 ++ block/ioprio.c | 4 ++-- include/linux/ioprio.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) commit 3c8f9da41ed90294d8ca42b3ad8a13c5379bd549 Author: Sebastian Andrzej Siewior Date: Wed Jun 22 10:25:54 2022 +0200 blk-mq: Don't disable preemption around __blk_mq_run_hw_queue(). __blk_mq_delay_run_hw_queue() disables preemption to get a stable current CPU number and then invokes __blk_mq_run_hw_queue() if the CPU number is part the mask. __blk_mq_run_hw_queue() acquires a spin_lock_t which is a sleeping lock on PREEMPT_RT and can't be acquired with disabled preemption. It is not required for correctness to invoke __blk_mq_run_hw_queue() on a CPU matching hctx->cpumask. Both (async and direct requests) can run on a CPU not matching hctx->cpumask. The CPU mask without disabling preemption and invoking __blk_mq_run_hw_queue(). Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/YrLSEiNvagKJaDs5@linutronix.de Signed-off-by: Jens Axboe block/blk-mq.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 1d87be8212c8c2bb1216a0ba49373e4e0123aaf3 Author: Bart Van Assche Date: Fri Jun 17 14:08:59 2022 -0700 block: bfq: Fix kernel-doc headers Fix the following warnings: block/bfq-cgroup.c:721: warning: Function parameter or member 'bfqg' not described in '__bfq_bic_change_cgroup' block/bfq-cgroup.c:721: warning: Excess function parameter 'blkcg' description in '__bfq_bic_change_cgroup' block/bfq-cgroup.c:870: warning: Function parameter or member 'ioprio_class' not described in 'bfq_reparent_leaf_entity' block/bfq-cgroup.c:900: warning: Function parameter or member 'ioprio_class' not described in 'bfq_reparent_active_queues' Cc: Jan Kara Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe Link: https://lore.kernel.org/r/20220617210859.106623-1-bvanassche@acm.org block/bfq-cgroup.c | 6 ++++-- block/bfq-wf2q.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) commit c28c49b09e493adf5f79201d6de2d16d9356e9eb Author: Bart Van Assche Date: Fri Jun 17 13:44:33 2022 -0700 block: bfq: Remove an unused function definition This patch is the result of the analysis of a sparse report. Cc: Jan Kara Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe Link: https://lore.kernel.org/r/20220617204433.102022-1-bvanassche@acm.org block/bfq-cgroup.c | 2 -- 1 file changed, 2 deletions(-) commit 6c77b152f5f1324972cdbdb71e9a6e02d601f49f Author: GuoYong Zheng Date: Fri Jun 17 18:28:04 2022 +0800 bfq: Remove useless code in bfq_lookup_next_entity It is no need to judge entity is null or not here, directly return entity is ok, so remove it. Signed-off-by: GuoYong Zheng Link: https://lore.kernel.org/r/1655461684-19075-1-git-send-email-zhenggy@chinatelecom.cn Signed-off-by: Jens Axboe block/bfq-wf2q.c | 3 --- 1 file changed, 3 deletions(-) commit 2a9336c42a6abdcef564d522648a684a474a3483 Author: Christoph Hellwig Date: Tue Jun 14 11:09:34 2022 +0200 block: move blk_queue_get_max_sectors to blk.h blk_queue_get_max_sectors is private to the block layer, so move it out of blkdev.h. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20220614090934.570632-7-hch@lst.de Signed-off-by: Jens Axboe block/blk.h | 13 +++++++++++++ include/linux/blkdev.h | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) commit efef739d5f37dc998b113fb965aea68d42a9eddc Author: Christoph Hellwig Date: Tue Jun 14 11:09:33 2022 +0200 block: fold blk_max_size_offset into get_max_io_size Now that blk_max_size_offset has a single caller left, fold it into that and clean up the naming convention for the local variables there. Signed-off-by: Christoph Hellwig Reviewed-by: Pankaj Raghav Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20220614090934.570632-6-hch@lst.de Signed-off-by: Jens Axboe block/blk-merge.c | 9 +++++++-- include/linux/blkdev.h | 19 ------------------- 2 files changed, 7 insertions(+), 21 deletions(-) commit 84613beda427b6e4c3d7a9ed2b68efd26300ec63 Author: Christoph Hellwig Date: Tue Jun 14 11:09:32 2022 +0200 block: cleanup variable naming in get_max_io_size get_max_io_size has a very odd choice of variables names and initialization patterns. Switch to more descriptive names and more clear initialization of them. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220614090934.570632-5-hch@lst.de Signed-off-by: Jens Axboe block/blk-merge.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit c887519074957f0ebd73b8158c2e0546d97ce0e8 Author: Christoph Hellwig Date: Tue Jun 14 11:09:31 2022 +0200 block: open code blk_max_size_offset in blk_rq_get_max_sectors blk_rq_get_max_sectors always uses q->limits.chunk_sectors as the chunk_sectors argument, and already checks for max_sectors through the call to blk_queue_get_max_sectors. That means much of blk_max_size_offset is not needed and open coding it simplifies the code. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20220614090934.570632-4-hch@lst.de Signed-off-by: Jens Axboe block/blk-merge.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c39493222e41098cd15d11f972d16e943919506d Author: Christoph Hellwig Date: Tue Jun 14 11:09:30 2022 +0200 dm: open code blk_max_size_offset in max_io_len max_io_len always passes an explicitly non-zero chunk_sectors into blk_max_size_offset. That means much of blk_max_size_offset is not needed and can be open coded to simplify the code. Signed-off-by: Christoph Hellwig Reviewed-by: Mike Snitzer Link: https://lore.kernel.org/r/20220614090934.570632-3-hch@lst.de Signed-off-by: Jens Axboe drivers/md/dm.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 8689461be3f1ce6686bc26f1f379790bb0fc7a8c Author: Christoph Hellwig Date: Tue Jun 14 11:09:29 2022 +0200 block: factor out a chunk_size_left helper Factor out a helper from blk_max_size_offset so that it can be reused independently. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Pankaj Raghav Link: https://lore.kernel.org/r/20220614090934.570632-2-hch@lst.de Signed-off-by: Jens Axboe include/linux/blkdev.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 51ab80f0aa861335eb80327af53e444a27e824b8 Author: Bart Van Assche Date: Wed Jun 15 15:55:49 2022 -0700 block: Make blk_mq_get_sq_hctx() select the proper hardware queue type Since the introduction of blk_mq_get_hctx_type() the operation type in the second argument of blk_mq_get_hctx_type() matters. The introduction of blk_mq_get_hctx_type() caused blk_mq_get_sq_hctx() to select a hardware queue of type HCTX_TYPE_READ instead of HCTX_TYPE_DEFAULT. Switch to hardware queue type HCTX_TYPE_DEFAULT since HCTX_TYPE_READ should only be used for read requests. Cc: Ming Lei Cc: Christoph Hellwig Signed-off-by: Bart Van Assche Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220615225549.1054905-4-bvanassche@acm.org Signed-off-by: Jens Axboe block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e923f40a4d229bd9573d6cae64479d6a9770fc3 Author: Bart Van Assche Date: Wed Jun 15 15:55:48 2022 -0700 block: Rename a blk_mq_map_queue() argument Before the introduction of blk_mq_get_hctx_type(), blk_mq_map_queue() only used the flags from its second argument. Since the introduction of blk_mq_get_hctx_type(), blk_mq_map_queue() uses both the operation and the flags encoded in that argument. Rename the second argument of blk_mq_map_queue() to make this clear. Cc: Christoph Hellwig Reviewed-by: Christoph Hellwig Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220615225549.1054905-3-bvanassche@acm.org Signed-off-by: Jens Axboe block/blk-mq.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 62c159a03da92121b1b909fd8039028de97885fc Author: Bart Van Assche Date: Wed Jun 15 15:55:47 2022 -0700 blk-iocost: Simplify ioc_rqos_done() Leave out the superfluous "& REQ_OP_MASK" code. The definition of req_op() shows that that code is superfluous: #define req_op(req) ((req)->cmd_flags & REQ_OP_MASK) Compile-tested only. Cc: Tejun Heo Acked-by: Tejun Heo Reviewed-by: Christoph Hellwig Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220615225549.1054905-2-bvanassche@acm.org Signed-off-by: Jens Axboe block/blk-iocost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 798f2a6f734de87633351c3ab13b17b07397cf68 Author: Bo Liu Date: Wed Jun 15 04:18:16 2022 -0400 block: Directly use ida_alloc()/free() Use ida_alloc()/ida_free() instead of ida_simple_get()/ida_simple_remove(). The latter is deprecated and more verbose. Signed-off-by: Bo Liu Reviewed-by: Christophe JAILLET Link: https://lore.kernel.org/r/20220615081816.4342-1-liubo03@inspur.com Signed-off-by: Jens Axboe block/blk-core.c | 4 ++-- block/blk-sysfs.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit bf8d08532bc19a14cfb54ae61099dccadefca446 Author: Keith Busch Date: Fri Jun 10 12:58:30 2022 -0700 iomap: add support for dma aligned direct-io Use the address alignment requirements from the block_device for direct io instead of requiring addresses be aligned to the block size. Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220610195830.3574005-12-kbusch@fb.com Signed-off-by: Jens Axboe fs/iomap/direct-io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b1a000d3b8ec582da64bb644be633e5a0beffcbf Author: Keith Busch Date: Fri Jun 10 12:58:29 2022 -0700 block: relax direct io memory alignment Use the address alignment requirements from the block_device for direct io instead of requiring addresses be aligned to the block size. User space can discover the alignment requirements from the dma_alignment queue attribute. User space can specify any hardware compatible DMA offset for each segment, but every segment length is still required to be a multiple of the block size. Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220610195830.3574005-11-kbusch@fb.com Signed-off-by: Jens Axboe block/bio.c | 9 +++++++++ block/fops.c | 4 ++-- include/linux/blkdev.h | 5 +++++ 3 files changed, 16 insertions(+), 2 deletions(-) commit 5debd9691c3ac64c3acd6867c264ad38bbe48cdc Author: Keith Busch Date: Fri Jun 10 12:58:28 2022 -0700 block: introduce bdev_iter_is_aligned helper Provide a convenient function for this repeatable coding pattern. Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220610195830.3574005-10-kbusch@fb.com Signed-off-by: Jens Axboe include/linux/blkdev.h | 7 +++++++ 1 file changed, 7 insertions(+) commit cfa320f72882f0e944e2237287db84b0f7df877d Author: Keith Busch Date: Fri Jun 10 12:58:27 2022 -0700 iov: introduce iov_iter_aligned The existing iov_iter_alignment() function returns the logical OR of address and length. For cases where address and length need to be considered separately, introduce a helper function that a caller can specificy length and address masks that indicate if the iov is unaligned. Cc: Alexander Viro Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220610195830.3574005-9-kbusch@fb.com Signed-off-by: Jens Axboe include/linux/uio.h | 2 ++ lib/iov_iter.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) commit 9cfe3ddecdc556ab1d1693b29e8a26ba80953ccc Author: Keith Busch Date: Fri Jun 10 12:58:26 2022 -0700 block/bounce: count bytes instead of sectors Individual bv_len's may not be a sector size. Signed-off-by: Keith Busch Reviewed-by: Damien Le Moal Reviewed-by: Pankaj Raghav Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220610195830.3574005-8-kbusch@fb.com Signed-off-by: Jens Axboe block/bounce.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 67927d22015060967122facc8cfeaad8012e8808 Author: Keith Busch Date: Fri Jun 10 12:58:25 2022 -0700 block/merge: count bytes instead of sectors Individual bv_len's may not be a sector size. Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220610195830.3574005-7-kbusch@fb.com Signed-off-by: Jens Axboe block/blk-merge.c | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) commit 37fee2e42ebbc33e5b7b6944979792bd9aa09e34 Author: Keith Busch Date: Fri Jun 10 12:58:24 2022 -0700 block: add a helper function for dio alignment This will make it easier to add more complex acceptable alignment criteria in the future. Signed-off-by: Keith Busch Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220610195830.3574005-6-kbusch@fb.com Signed-off-by: Jens Axboe block/fops.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 4a2dcc35911324d6fcde09b1760cf4f2962699ef Author: Keith Busch Date: Fri Jun 10 12:58:23 2022 -0700 block: introduce bdev_dma_alignment helper Preparing for upcoming dma_alignment users that have a block_device, but don't need the request_queue. Signed-off-by: Keith Busch Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220610195830.3574005-5-kbusch@fb.com Signed-off-by: Jens Axboe include/linux/blkdev.h | 5 +++++ 1 file changed, 5 insertions(+) commit 3850e13f2853a17c083eb00fad2c6da4fde0b41e Author: Keith Busch Date: Fri Jun 10 12:58:22 2022 -0700 block: export dma_alignment attribute User space may want to know how to align their buffers to avoid bouncing. Export the queue attribute. Signed-off-by: Keith Busch Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220610195830.3574005-4-kbusch@fb.com Signed-off-by: Jens Axboe Documentation/ABI/stable/sysfs-block | 9 +++++++++ block/blk-sysfs.c | 7 +++++++ 2 files changed, 16 insertions(+) commit c58c0074c54c2e2bb3bb0d5a4d8896bb660cc8bc Author: Keith Busch Date: Fri Jun 10 12:58:21 2022 -0700 block/bio: remove duplicate append pages code The getting pages setup for zone append and normal IO are identical. Use common code for each. Signed-off-by: Keith Busch Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220610195830.3574005-3-kbusch@fb.com Signed-off-by: Jens Axboe block/bio.c | 102 +++++++++++++++++++++++++----------------------------------- 1 file changed, 42 insertions(+), 60 deletions(-) commit b82d9fa257cb3725c49d94d2aeafc4677c34448a Author: Keith Busch Date: Fri Jun 10 12:58:20 2022 -0700 block: fix infinite loop for invalid zone append Returning 0 early from __bio_iov_append_get_pages() for the max_append_sectors warning just creates an infinite loop since 0 means success, and the bio will never fill from the unadvancing iov_iter. We could turn the return into an error value, but it will already be turned into an error value later on, so just remove the warning. Clearly no one ever hit it anyway. Fixes: 0512a75b98f84 ("block: Introduce REQ_OP_ZONE_APPEND") Signed-off-by: Keith Busch Reviewed-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20220610195830.3574005-2-kbusch@fb.com Signed-off-by: Jens Axboe block/bio.c | 3 --- 1 file changed, 3 deletions(-) commit dc3029056b02414c29b6627e3dd7b16624725ae9 Author: David Jander Date: Tue Jun 21 08:12:34 2022 +0200 spi: opportunistically skip ctlr->cur_msg_completion There are only a few drivers that do not call spi_finalize_current_message() in the context of transfer_one_message(), and even for those cases the completion ctlr->cur_msg_completion is not needed always. The calls to complete() and wait_for_completion() each take a spin-lock, which is costly. This patch makes it possible to avoid those calls in the big majority of cases, by introducing two flags that with the help of ordering via barriers can avoid using the completion safely. In case of a race with the context calling spi_finalize_current_message(), the scheme errs on the safe side and takes the completion. The impact of this patch is worth the effort: On a i.MX8MM SoC, the time the SPI bus is idle between two consecutive calls to spi_sync(), is reduced from 19.6us to 16.8us... roughly 15%. Signed-off-by: David Jander Link: https://lore.kernel.org/r/20220621061234.3626638-12-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 27 +++++++++++++++++++++++++-- include/linux/spi/spi.h | 8 ++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) commit 69fa95905d40846756d22402690ddf5361a9d13b Author: David Jander Date: Tue Jun 21 08:12:33 2022 +0200 spi: Ensure the io_mutex is held until spi_finalize_current_message() This patch introduces a completion that is completed in spi_finalize_current_message() and waited for in __spi_pump_transfer_message(). This way all manipulation of ctlr->cur_msg is done with the io_mutex held and strictly ordered: __spi_pump_transfer_message() will not return until spi_finalize_current_message() is done using ctlr->cur_msg, and its calling context is only touching ctlr->cur_msg after returning. Due to this, we can safely drop the spin-locks around ctlr->cur_msg. Signed-off-by: David Jander Link: https://lore.kernel.org/r/20220621061234.3626638-11-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 32 ++++++++++++++------------------ include/linux/spi/spi.h | 6 ++---- 2 files changed, 16 insertions(+), 22 deletions(-) commit 72c5c59b659d54d0c824d0333a211f373316361d Author: David Jander Date: Tue Jun 21 08:12:32 2022 +0200 spi: Set ctlr->cur_msg also in the sync transfer case Some drivers rely on this to point to the currently processed message, so set this here also. Signed-off-by: David Jander Link: https://lore.kernel.org/r/20220621061234.3626638-10-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 1 + 1 file changed, 1 insertion(+) commit 1a9cafcb57b70fc1439d4a5cb28963122568967a Author: David Jander Date: Tue Jun 21 08:12:31 2022 +0200 spi: Remove unneeded READ_ONCE for ctlr->busy flag Now this flag is written entirely in the mutex, so no need for READ_ONCE Signed-off-by: David Jander Link: https://lore.kernel.org/r/20220621061234.3626638-9-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66a221593cb26dd6aabba63bcd18173f4e69c7ab Author: David Jander Date: Tue Jun 21 08:12:30 2022 +0200 spi: Remove the now unused ctlr->idling flag The ctlr->idling flag is never checked now, so we don't need to set it either. Signed-off-by: David Jander Link: https://lore.kernel.org/r/20220621061234.3626638-8-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 2 -- include/linux/spi/spi.h | 2 -- 2 files changed, 4 deletions(-) commit 049d6ccc4da8d34f382949ebec6d4fb318a9c7c0 Author: David Jander Date: Tue Jun 21 08:12:29 2022 +0200 spi: Remove check for idling in __spi_pump_messages() Since the whole idling transition is locked by the io_mutex now, there is no need to check this flag anymore. Signed-off-by: David Jander Link: https://lore.kernel.org/r/20220621061234.3626638-7-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 7 ------- 1 file changed, 7 deletions(-) commit d5256cce1f50ff4c8fad6b8eb7b4ec9e47d38925 Author: David Jander Date: Tue Jun 21 08:12:28 2022 +0200 spi: Remove check for controller idling in spi sync path Now that the idling flag is wholly behind the io_mutex, this broken piece of code can be safely removed. Signed-off-by: David Jander Link: https://lore.kernel.org/r/20220621061234.3626638-6-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 4 ---- 1 file changed, 4 deletions(-) commit 8711a2ab51dd47b2bcb3880403add25dd7fc7c13 Author: David Jander Date: Tue Jun 21 08:12:27 2022 +0200 spi: __spi_pump_messages: Consolidate spin_unlocks to goto target Signed-off-by: David Jander Link: https://lore.kernel.org/r/20220621061234.3626638-5-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit c1038165fbbf83967f29b3bb38872faa780b3a72 Author: David Jander Date: Tue Jun 21 08:12:26 2022 +0200 spi: Lock controller idling transition inside the io_mutex This way, the spi sync path does not need to deal with the idling transition. Signed-off-by: David Jander Link: https://lore.kernel.org/r/20220621061234.3626638-4-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit ae7d2346dc89ae89a6e0aabe6037591a11e593c0 Author: David Jander Date: Tue Jun 21 08:12:25 2022 +0200 spi: Don't use the message queue if possible in spi_sync The interaction with the controller message queue and its corresponding auxiliary flags and variables requires the use of the queue_lock which is costly. Since spi_sync will transfer the complete message anyway, and not return until it is finished, there is no need to put the message into the queue if the queue is empty. This can save a lot of overhead. As an example of how significant this is, when using the MCP2518FD SPI CAN controller on a i.MX8MM SoC, the time during which the interrupt line stays active (during 3 relatively short spi_sync messages), is reduced from 98us to 72us by this patch. Signed-off-by: David Jander Link: https://lore.kernel.org/r/20220621061234.3626638-3-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 246 +++++++++++++++++++++++++++++------------------- include/linux/spi/spi.h | 11 ++- 2 files changed, 159 insertions(+), 98 deletions(-) commit 1714582a3a087eda8786d5a1b32b2ec86ca8a303 Author: David Jander Date: Tue Jun 21 08:12:24 2022 +0200 spi: Move ctlr->cur_msg_prepared to struct spi_message This enables the possibility to transfer a message that is not at the current tip of the async message queue. This is in preparation of the next patch(es) which enable spi_sync messages to skip the queue altogether. Signed-off-by: David Jander Link: https://lore.kernel.org/r/20220621061234.3626638-2-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 7 ++++--- include/linux/spi/spi.h | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) commit 145cfc3840e5931a789a8e2e76af841ab4cad44b Author: Mark Brown Date: Mon Jun 13 13:19:46 2022 +0100 spi: mpc52xx-psc: Switch to using core message queue We deprecated open coding of the transfer queue back in 2017 so it's high time we finished up converting drivers to use the standard message queue code. The mpc52xx-psc driver is fairly straightforward so convert to use transfer_one_message(), it looks like the driver would be a good fit for transfer_one() with a little bit of updating but this smaller change seems safer. The driver seems like a good candidate for transfer_one() but the chip select function is actually doing rather more than just updating the chip select and both transfer_one() and transfer_one_message() are current APIs so leave that refactoring for another day, ideally by someone with the hardware. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220613121946.136193-1-broonie@kernel.org Signed-off-by: Mark Brown drivers/spi/spi-mpc52xx-psc.c | 116 +++++++++++++----------------------------- 1 file changed, 34 insertions(+), 82 deletions(-) commit e2185072a4a4786eb46be046cf20494c08dcc78f Author: Mark Brown Date: Fri Jun 10 16:46:49 2022 +0100 spi: sh: Switch to using core message queue We deprecated open coding of the transfer queue back in 2017 so it's high time we finished up converting drivers to use the standard message queue code. The SH driver is fairly straightforward so convert to use transfer_one_message(), it looks like the driver would be a good fit for transfer_one() with a little bit of updating but this smaller change seems safer. I'm not actually clear how the driver worked robustly previously, it clears SSA and CR1 when queueing a transfer which looks like it would interfere with any running transfer. This clearing has been moved to the start of the message transfer function. I'm also unclear how exactly the chip select is managed with this driver. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220610154649.1707851-1-broonie@kernel.org Signed-off-by: Mark Brown drivers/spi/spi-sh.c | 94 ++++++++++++++++------------------------------------ 1 file changed, 28 insertions(+), 66 deletions(-) commit 595d68c1b7a81c6cfbdd7c8b50c1e047dc1087ac Author: Krzysztof Kozlowski Date: Sun Jun 26 13:28:38 2022 +0200 spi: dt-bindings: samsung: Add Exynos4210 SPI Document samsung,exynos4210-spi compatible which is already used on several Exynos SoCs. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanho Park Link: https://lore.kernel.org/r/20220626112838.19281-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/samsung,spi.yaml | 1 + 1 file changed, 1 insertion(+) commit e95a1cd2cfe722dc8434db6de33958035853aa05 Author: Serge Semin Date: Sat Jun 25 00:06:23 2022 +0300 spi: dw: Add deferred DMA-channels setup support Currently if the source DMA device isn't ready to provide the channels capable of the SPI DMA transfers, the DW SSI controller will be registered with no DMA support. It isn't right since all what the driver needs to do is to postpone the probe procedure until the DMA device is ready. Let's fix that in the framework of the DWC SSI generic DMA implementation. First we need to use the dma_request_chan() method instead of the dma_request_slave_channel() function, because the later one is deprecated and most importantly doesn't return the failure cause but the NULL-pointer. Second we need to stop the DW SSI controller probe procedure if the -EPROBE_DEFER error is returned on the DMA initialization. The procedure will resume later when the channels are ready to be requested. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220624210623.6383-1-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown drivers/spi/spi-dw-core.c | 5 ++++- drivers/spi/spi-dw-dma.c | 25 ++++++++++++++++++------- 2 files changed, 22 insertions(+), 8 deletions(-) commit a813c47d22b0a0c51567292bc198a39bdcdc3799 Author: Krzysztof Kozlowski Date: Mon Jun 27 11:45:41 2022 +0200 spi: s3c64xx: constify fsd_spi_port_config All struct s3c64xx_spi_port_config should be const. Fixes: 4ebb15a15799 ("spi: s3c64xx: Add spi port configuration for Tesla FSD SoC") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220627094541.95166-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown drivers/spi/spi-s3c64xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d0afe9cf1ef871a71596f990d7d2e60cc0b8669 Author: Mark Brown Date: Wed Jun 22 18:17:23 2022 +0100 regmap: Don't warn about cache only mode for devices with no cache For devices with no cache it can make sense to use cache only mode as a mechanism for trapping writes to hardware which is inaccessible but since no cache is equivalent to cache bypass we force such devices into bypass mode. This means that our check that bypass and cache only mode aren't both enabled simultanously is less sensible for devices without a cache so relax it. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220622171723.1235749-1-broonie@kernel.org Signed-off-by: Mark Brown drivers/base/regmap/regcache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e3f4e5b1a3e654d518155b37c7b2084cbce9d1a7 Author: Shengjiu Wang Date: Fri Jun 17 15:44:37 2022 +0800 ASoC: fsl_sai: Configure dataline/FIFO information from dts property The SAI has multiple successive FIFO registers, but in some use case the required dataline/FIFOs are not successive, so need get such information from dts property "fsl,dataline" fsl,dataline has 3 values for each configuration: first one means the type: I2S(1) or DSD(2), second one is dataline mask for 'rx', third one is dataline mask for 'tx'. Also set dma peripheral address and TRCE bits according to data lane. Signed-off-by: Shengjiu Wang Signed-off-by: Viorel Suman Link: https://lore.kernel.org/r/1655451877-16382-8-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 161 ++++++++++++++++++++++++++++++++++++++++++++++-- sound/soc/fsl/fsl_sai.h | 17 +++++ 2 files changed, 174 insertions(+), 4 deletions(-) commit 6b878ac2711056dd07c712caf89f58449cf5a592 Author: Shengjiu Wang Date: Fri Jun 17 15:44:36 2022 +0800 ASoC: dt-bindings: fsl-sai: Add new property to configure dataline "fsl,dataline" is added to configure the dataline of SAI. It has 3 value for each configuration, first one means the type: I2S(1) or PDM(2), second one is dataline mask for 'rx', third one is dataline mask for 'tx'. for example: fsl,dataline = <1 0xff 0xff 2 0xff 0x11>, it means I2S type rx mask is 0xff, tx mask is 0xff, PDM type rx mask is 0xff, tx mask is 0x11 (dataline 1 and 4 enabled). Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1655451877-16382-7-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/fsl-sai.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit cd640ca20095ed3b9306981f0064313a54fd4568 Author: Shengjiu Wang Date: Fri Jun 17 15:44:35 2022 +0800 ASoC: fsl_sai: Make res a member of struct fsl_sai The resource info need to be accessed by hw_params() function for multi fifo case, the start address may be not the FIFO0. So move it to be a member of struct fsl_sai. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1655451877-16382-6-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 7 +++---- sound/soc/fsl/fsl_sai.h | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) commit b4ee8a913e617a2d0f19226225bc025c8640bf34 Author: Shengjiu Wang Date: Fri Jun 17 15:44:34 2022 +0800 ASoc: fsl_sai: Add pinctrl operation for PDM and DSD With DSD format, the pinctrl is different compare with I2S format, because one dataline only has one channel data, and the codec always mux the LRCLK pin to DSD data line, and on i.MX8MQ the BCLK pin can route to codec on DSD case for the MCLK is too high. Add pinctrl operation that the pinctrl can be switched on runtime according to the I2S format or DSD format Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1655451877-16382-5-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 70 ++++++++++++++++++++++++++++++++++++++++++------- sound/soc/fsl/fsl_sai.h | 2 ++ 2 files changed, 63 insertions(+), 9 deletions(-) commit 0d11bab8ef3e5540dfba111947dbd8dcfb813150 Author: Shengjiu Wang Date: Fri Jun 17 15:44:33 2022 +0800 ASoC: fsl_sai: Add support for more sample rates Add support for more sample rates, because PDM format bitstream has higher sample rates. for example DSD512 format, the bit clock is 22.5792MHz, if the word width is U8_LE, then the max sample rate is 2822400. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1655451877-16382-4-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 4665770407de8af3b24250cec2209eaf58546f8a Author: Shengjiu Wang Date: Fri Jun 17 15:44:32 2022 +0800 ASoC: fsl_sai: Add DSD bit format support Support DSD_U8, DSD_U16_LE, DSD_U32_LE. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1655451877-16382-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c111c2ddb3fdfca06bb5c7a56db7f97d6d9ea640 Author: Shengjiu Wang Date: Fri Jun 17 15:44:31 2022 +0800 ASoC: fsl_sai: Add PDM daifmt support PDM format is used for 1-bit stream, so clear the FBT and SYWD, and the each dataline only has one channel data. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1655451877-16382-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 17 +++++++++++++++-- sound/soc/fsl/fsl_sai.h | 1 + 2 files changed, 16 insertions(+), 2 deletions(-) commit 25ae1a04da0d32c22db0b018e5668129b91fa104 Author: Arnaud Ferraris Date: Mon Jun 20 22:54:51 2022 -0500 ASoC: sun50i-codec-analog: Add support for internal bias In order to properly bias headset microphones, there should be a pull-up resistor between pins HBIAS and MIC2P. This can be an external resistor, but the codec also provides an internal 2.2K resistor which is enabled by a register. This patch enables or disables the internal bias resistor based on a device tree property. Signed-off-by: Arnaud Ferraris [Samuel: split binding and implementation; move to device probe] Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20220621035452.60272-3-samuel@sholland.org Signed-off-by: Mark Brown sound/soc/sunxi/sun50i-codec-analog.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 24e0b04dd42be34ec4b18dc1a1e139d66eb572a3 Author: Arnaud Ferraris Date: Mon Jun 20 22:54:50 2022 -0500 ASoC: dt-bindings: sun50i-codec: Add binding for internal bias In order to properly bias headset microphones, there should be a pull-up resistor between pins HBIAS and MIC2P. This can be an external resistor, but the codec also provides an internal 2.2K resistor which is enabled by a register. This patch adds a device-tree property to the sun50i-codec-analog driver to take advantage of this feature. Signed-off-by: Arnaud Ferraris [Samuel: split binding and implementation patches] Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20220621035452.60272-2-samuel@sholland.org Signed-off-by: Mark Brown .../devicetree/bindings/sound/allwinner,sun50i-a64-codec-analog.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit cecc81d6a5deb094bdbc6a1d7f2c014ba9b71cf8 Author: Pierre-Louis Bossart Date: Thu Jun 16 17:04:27 2022 -0500 ASoC: ti: davinci-mcasp: use pm_runtime_resume_and_get() The use of pm_runtime_get_sync() is buggy with no use of put_noidle on error. Use pm_runtime_resume_and_get() instead. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Acked-by: Peter Ujfalusi Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220616220427.136036-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/ti/davinci-mcasp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 05b71fb2a5014d2430ff6c5678db021c67afa9ec Author: Pierre-Louis Bossart Date: Thu Jun 16 17:04:26 2022 -0500 ASoC: tas2552: use pm_runtime_resume_and_get() The use of pm_runtime_get_sync() is buggy with no use of put_noidle() on error. Use pm_runtime_resume_and_get() instead. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220616220427.136036-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/tas2552.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76a6f4537650e6d2211f34661de35630487c7c64 Author: Pierre-Louis Bossart Date: Thu Jun 16 17:04:25 2022 -0500 ASoC: rockchip: pdm: use pm_runtime_resume_and_get() Simplify the flow. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220616220427.136036-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_pdm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 57d714535051b1baca9ffd92e79fbda1fae3177a Author: Pierre-Louis Bossart Date: Thu Jun 16 17:04:24 2022 -0500 ASoC: img: img-i2s-out: use pm_runtime_resume_and_get() Simplify the flow. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220616220427.136036-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/img/img-i2s-out.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 37cb8a58013fc6ca2febaed355f6559012699542 Author: Pierre-Louis Bossart Date: Thu Jun 16 17:04:23 2022 -0500 ASoC: fsl: fsl_sai: use pm_runtime_resume_and_get() Simplify the flow. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220616220427.136036-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8c8a13e83c29472044d733dfb1fced2ccd025d35 Author: Pierre-Louis Bossart Date: Thu Jun 16 17:04:22 2022 -0500 ASoC: rockchip: i2s_tdm: use pm_runtime_resume_and_get() simplify the flow. No functionality change, except that on -EACCESS the reference count will be decreased. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220616220427.136036-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s_tdm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9a1a28610a1c49bf93777d017aa3fe121eef944e Author: Pierre-Louis Bossart Date: Thu Jun 16 17:04:21 2022 -0500 ASoC: wsa881x: use pm_runtime_resume_and_get() simplify the flow. No functionality change, except that on -EACCESS the reference count will be decreased. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Srinivas Kandagatla Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220616220427.136036-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/wsa881x.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ddea4bbf287b6028eaa15a185d0693856956ecf2 Author: Pierre-Louis Bossart Date: Thu Jun 16 17:04:20 2022 -0500 ASoC: wcd-mbhc-v2: use pm_runtime_resume_and_get() simplify the flow. No functionality change, except that on -EACCESS the reference count will be decreased. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Srinivas Kandagatla Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220616220427.136036-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/wcd-mbhc-v2.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 7213170a9515109322f75c08b5268d8e9cdad8e4 Author: Pierre-Louis Bossart Date: Thu Jun 16 17:04:18 2022 -0500 ASoC: Intel: skylake: skl-pcm: use pm_runtime_resume_and_get() The current code does not check for errors and does not release the reference on errors. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Acked-by: Cezary Rojewski Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220616220427.136036-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 82102a24c930986aedc572f89b437cd9e4d44d7e Author: Pierre-Louis Bossart Date: Thu Jun 16 17:04:17 2022 -0500 ASoC: Intel: catpt: use pm_runtime_resume_and_get() The current code does not check for errors and does not release the reference on errors. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Acked-by: Cezary Rojewski Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220616220427.136036-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/catpt/pcm.c | 26 ++++++++++++++++++++------ sound/soc/intel/catpt/sysfs.c | 4 +++- 2 files changed, 23 insertions(+), 7 deletions(-) commit 01936221278c5af60d82b8e78ca74caa491c0d31 Author: Charles Keepax Date: Thu Jun 23 13:52:50 2022 +0100 ASoC: soc-component: Remove non_legacy_dai_naming flag Now all the users are moved over to the new legacy_dai_naming flag, remove the now unused old flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-97-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown include/sound/soc-component.h | 1 - 1 file changed, 1 deletion(-) commit 4a7a283a41dad608ce32c4ed623cc2caf68150c4 Author: Charles Keepax Date: Thu Jun 23 13:52:49 2022 +0100 ASoC: zl38060: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-96-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/zl38060.c | 1 - 1 file changed, 1 deletion(-) commit 11c8bfaacbcd6c8251f65101d5ceeb173a76b1a3 Author: Charles Keepax Date: Thu Jun 23 13:52:48 2022 +0100 ASoC: wl1273: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-95-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/wl1273.c | 1 - 1 file changed, 1 deletion(-) commit c06fb318493a059ac2c47937761d048f9ab1b542 Author: Charles Keepax Date: Thu Jun 23 13:52:47 2022 +0100 ASoC: tscs42xx: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-94-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/tscs42xx.c | 1 - 1 file changed, 1 deletion(-) commit 20b1894d16547dcd99f190f5a0604a06a0c4479f Author: Charles Keepax Date: Thu Jun 23 13:52:46 2022 +0100 ASoC: sti-sas: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-93-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/sti-sas.c | 1 - 1 file changed, 1 deletion(-) commit e5257aa583b6d9f80e3aaa3ed6fc68c1b1b5925a Author: Charles Keepax Date: Thu Jun 23 13:52:45 2022 +0100 ASoC: stac9766: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-92-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/stac9766.c | 2 -- 1 file changed, 2 deletions(-) commit 89571b892e74b9724e155774576651cd675b4110 Author: Charles Keepax Date: Thu Jun 23 13:52:44 2022 +0100 ASoC: si476x: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-91-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/si476x.c | 1 - 1 file changed, 1 deletion(-) commit 81ed3cb8d93936fe32b2b5c213dd56d8ecae7be8 Author: Charles Keepax Date: Thu Jun 23 13:52:43 2022 +0100 ASoC: sgtl5000: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-90-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/sgtl5000.c | 1 - 1 file changed, 1 deletion(-) commit 2e938b8edfedb73efd07545a58fe51bb7fc48a56 Author: Charles Keepax Date: Thu Jun 23 13:52:42 2022 +0100 ASoC: rk817: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-89-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/rk817_codec.c | 1 - 1 file changed, 1 deletion(-) commit 7e6fcd7f6223ab32bdccc5e22cdec780cde305c3 Author: Charles Keepax Date: Thu Jun 23 13:52:41 2022 +0100 ASoC: ml26124: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-88-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/ml26124.c | 1 - 1 file changed, 1 deletion(-) commit 139db4ad9e0b793ffd3f4f23976bf72d5e4e6703 Author: Charles Keepax Date: Thu Jun 23 13:52:40 2022 +0100 ASoC: mc13783: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-87-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/mc13783.c | 1 - 1 file changed, 1 deletion(-) commit 34b89b309441f7f45f68d7ec3633ee3d50921bc8 Author: Charles Keepax Date: Thu Jun 23 13:52:39 2022 +0100 ASoC: lochnagar: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-86-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/lochnagar-sc.c | 1 - 1 file changed, 1 deletion(-) commit 191889406df931cc2e40abf0a0de141b098f0481 Author: Charles Keepax Date: Thu Jun 23 13:52:38 2022 +0100 ASoC: lm49453: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-85-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/lm49453.c | 1 - 1 file changed, 1 deletion(-) commit dd213681c801fd9d26aef95f4eb563c38f4967f9 Author: Charles Keepax Date: Thu Jun 23 13:52:37 2022 +0100 ASoC: jz4740: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-84-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/jz4740.c | 2 -- 1 file changed, 2 deletions(-) commit 328bd81743f0823d9604b0098c95f071e7d02805 Author: Charles Keepax Date: Thu Jun 23 13:52:36 2022 +0100 ASoC: isabelle: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-83-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/isabelle.c | 1 - 1 file changed, 1 deletion(-) commit 22afe04dd84a63440e69dfc7f0e670404fbce831 Author: Charles Keepax Date: Thu Jun 23 13:52:35 2022 +0100 ASoC: Intel: avs: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-82-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/intel/avs/pcm.c | 2 -- 1 file changed, 2 deletions(-) commit 1f1ee5ae7a8b3d30cbfe18561a4e3b7430e96c9f Author: Charles Keepax Date: Thu Jun 23 13:52:34 2022 +0100 ASoC: inno_rk3036: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-81-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/inno_rk3036.c | 1 - 1 file changed, 1 deletion(-) commit e8f88be5c1548791397dadf2250fb5dcc9461f10 Author: Charles Keepax Date: Thu Jun 23 13:52:33 2022 +0100 ASoC: ics43432: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-80-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/ics43432.c | 1 - 1 file changed, 1 deletion(-) commit f5f8019371b42c742d9777052c189e89a0745319 Author: Charles Keepax Date: Thu Jun 23 13:52:32 2022 +0100 ASoC: hdmi-codec: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-79-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/hdmi-codec.c | 1 - 1 file changed, 1 deletion(-) commit f02a7d11998eefe8c5627b93627469a0aab8d3da Author: Charles Keepax Date: Thu Jun 23 13:52:31 2022 +0100 ASoC: hdac_hdmi: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-78-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 1 - 1 file changed, 1 deletion(-) commit 33b179e7513c30f03277f5de2a845e940a9bde9c Author: Charles Keepax Date: Thu Jun 23 13:52:30 2022 +0100 ASoC: gtm601: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-77-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/gtm601.c | 1 - 1 file changed, 1 deletion(-) commit 4eaf75fa427262289a2bc34d3fcfbc602ebbacfa Author: Charles Keepax Date: Thu Jun 23 13:52:29 2022 +0100 ASoC: dmic: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-76-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/dmic.c | 1 - 1 file changed, 1 deletion(-) commit a0b6e4048228829485a43247c12c7774531728c4 Author: Charles Keepax Date: Thu Jun 23 13:52:28 2022 +0100 ASoC: cx20442: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-75-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cx20442.c | 1 - 1 file changed, 1 deletion(-) commit 73a3dca65cbe5e7de20f3453b6881acf3fb3cfbe Author: Charles Keepax Date: Thu Jun 23 13:52:27 2022 +0100 ASoC: cq93vc: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-74-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cq93vc.c | 1 - 1 file changed, 1 deletion(-) commit 35c5013ce7ca3ad55974e3517273a0e42140b5e7 Author: Charles Keepax Date: Thu Jun 23 13:52:26 2022 +0100 ASoC: cpcap: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-73-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cpcap.c | 1 - 1 file changed, 1 deletion(-) commit 8c657358f685cec541d7ad3c54f899a65f56783e Author: Charles Keepax Date: Thu Jun 23 13:52:25 2022 +0100 ASoC: bt-sco: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-72-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/bt-sco.c | 1 - 1 file changed, 1 deletion(-) commit 310288271f55ae0edccd01257c9fdf460dd45e30 Author: Charles Keepax Date: Thu Jun 23 13:52:24 2022 +0100 ASoC: bd28623: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-71-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/bd28623.c | 1 - 1 file changed, 1 deletion(-) commit e556a108e0aab4688cb0c7b1c0517e3fab8b5eb4 Author: Charles Keepax Date: Thu Jun 23 13:52:23 2022 +0100 ASoC: ads117x: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-70-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/ads117x.c | 1 - 1 file changed, 1 deletion(-) commit 96b409c94d6766ae8faa9f07fabc3694ddb7d018 Author: Charles Keepax Date: Thu Jun 23 13:52:22 2022 +0100 ASoC: ac97: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-69-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/ac97.c | 1 - 1 file changed, 1 deletion(-) commit bb426d37dcd9a1474f785fea434875233d24e537 Author: Charles Keepax Date: Thu Jun 23 13:52:21 2022 +0100 ASoC: ab8500: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-68-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/ab8500-codec.c | 1 - 1 file changed, 1 deletion(-) commit 4c90eebd97c519361f32e11de991e299f5b47e3d Author: Charles Keepax Date: Thu Jun 23 13:52:20 2022 +0100 ASoC: 88pm860x: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-67-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/88pm860x-codec.c | 1 - 1 file changed, 1 deletion(-) commit 02004449dbe6ec05b5b64a88824939b8fe474b82 Author: Charles Keepax Date: Thu Jun 23 13:52:19 2022 +0100 ASoC: wm*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-66-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/wm0010.c | 1 - sound/soc/codecs/wm1250-ev1.c | 1 - sound/soc/codecs/wm2000.c | 1 - sound/soc/codecs/wm2200.c | 1 - sound/soc/codecs/wm5100.c | 1 - sound/soc/codecs/wm5102.c | 1 - sound/soc/codecs/wm5110.c | 1 - sound/soc/codecs/wm8350.c | 1 - sound/soc/codecs/wm8400.c | 1 - sound/soc/codecs/wm8510.c | 1 - sound/soc/codecs/wm8523.c | 1 - sound/soc/codecs/wm8524.c | 1 - sound/soc/codecs/wm8580.c | 1 - sound/soc/codecs/wm8711.c | 1 - sound/soc/codecs/wm8727.c | 1 - sound/soc/codecs/wm8728.c | 1 - sound/soc/codecs/wm8731.c | 1 - sound/soc/codecs/wm8737.c | 1 - sound/soc/codecs/wm8741.c | 1 - sound/soc/codecs/wm8750.c | 1 - sound/soc/codecs/wm8753.c | 1 - sound/soc/codecs/wm8770.c | 1 - sound/soc/codecs/wm8776.c | 1 - sound/soc/codecs/wm8782.c | 1 - sound/soc/codecs/wm8804.c | 1 - sound/soc/codecs/wm8900.c | 1 - sound/soc/codecs/wm8903.c | 1 - sound/soc/codecs/wm8904.c | 1 - sound/soc/codecs/wm8940.c | 1 - sound/soc/codecs/wm8955.c | 1 - sound/soc/codecs/wm8960.c | 1 - sound/soc/codecs/wm8961.c | 1 - sound/soc/codecs/wm8962.c | 1 - sound/soc/codecs/wm8971.c | 1 - sound/soc/codecs/wm8974.c | 1 - sound/soc/codecs/wm8978.c | 1 - sound/soc/codecs/wm8983.c | 1 - sound/soc/codecs/wm8985.c | 1 - sound/soc/codecs/wm8988.c | 1 - sound/soc/codecs/wm8990.c | 1 - sound/soc/codecs/wm8991.c | 1 - sound/soc/codecs/wm8993.c | 1 - sound/soc/codecs/wm8994.c | 1 - sound/soc/codecs/wm8995.c | 1 - sound/soc/codecs/wm8996.c | 2 -- sound/soc/codecs/wm8997.c | 1 - sound/soc/codecs/wm8998.c | 1 - sound/soc/codecs/wm9081.c | 1 - sound/soc/codecs/wm9090.c | 1 - sound/soc/codecs/wm9705.c | 1 - sound/soc/codecs/wm9712.c | 1 - sound/soc/codecs/wm9713.c | 1 - 52 files changed, 53 deletions(-) commit 792008f6df86f7e5f861ef80fd4d6eb444a4aa92 Author: Charles Keepax Date: Thu Jun 23 13:52:18 2022 +0100 ASoC: uda*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-65-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/uda1334.c | 1 - sound/soc/codecs/uda134x.c | 1 - sound/soc/codecs/uda1380.c | 1 - 3 files changed, 3 deletions(-) commit 2a9c56cceec04c50490befd5662423e3bb8c476f Author: Jiri Slaby Date: Tue Jun 14 11:05:37 2022 +0200 tty/vt: consolemap: use E_TABSZ for the translations size The code expects "translations" to have 256 (E_TABSZ) values. Use the macro instead of the constant to be explicit about this. Suggested-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220614090537.15557-8-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5947b42cbe0ee580c31f7f327119e7f7c703c25c Author: Charles Keepax Date: Thu Jun 23 13:52:17 2022 +0100 ASoC: twl*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-64-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/twl4030.c | 1 - sound/soc/codecs/twl6040.c | 1 - 2 files changed, 2 deletions(-) commit a666c70c0c2c63a60b5672a14b022da9376cffb9 Author: Jiri Slaby Date: Tue Jun 14 11:05:36 2022 +0200 tty/vt: consolemap: remove dflt reset from con_do_clear_unimap() con_do_clear_unimap() sets dflt to NULL and then calls con_release_unimap() which does the very same as the first thing. So remove the former as it is apparently superfluous. Suggested-by: Ilpo Järvinen Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220614090537.15557-7-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 2 -- 1 file changed, 2 deletions(-) commit 1c2f6294a3613b84fc20d6620da078dedbb2ac1e Author: Jiri Slaby Date: Tue Jun 14 11:05:35 2022 +0200 tty/vt: consolemap: improve UNI_*() macros definitions Use FIELD_GET() and GENMASK() helpers instead of direct shifts and ANDs. This makes the code even more obvious. I didn't know about the helpers at the time of writing the macros. Suggested-by: Ilpo Järvinen Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220614090537.15557-6-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 8da443b1a4036b5863fd2ec7e0251164b704c726 Author: Jiri Slaby Date: Tue Jun 14 11:05:34 2022 +0200 tty/vt: consolemap: rename struct vc_data::vc_uni_pagedir* As a follow-up to the commit 4173f018aae1 (tty/vt: consolemap: rename and document struct uni_pagedir), rename also the members of struct vc_data. I.e. pagedir -> pagedict. And while touching all the places, remove also the unnecessary vc_ prefix. Suggested-by: Ilpo Järvinen Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220614090537.15557-5-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 46 ++++++++++++++++----------------- drivers/tty/vt/vt.c | 8 +++--- drivers/usb/misc/sisusbvga/sisusb_con.c | 2 +- drivers/video/console/vgacon.c | 8 +++--- drivers/video/fbdev/core/fbcon.c | 8 +++--- include/linux/console_struct.h | 4 +-- 6 files changed, 38 insertions(+), 38 deletions(-) commit d524e1c764a6befcaf384f40b45d05ba63fc172f Author: Jiri Slaby Date: Tue Jun 14 11:05:33 2022 +0200 tty/vt: consolemap: saner variable names in set_inverse_transl() The function uses too vague variable names like i, j, k for iterators, p, q, p1, p2 for pointers etc. Rename all these, so that it is clear what is going on: - dict: for dictionaries. - d, r, g: for dir, row, glyph iterators -- these are unsigned now. - dir, row: for directory and row pointers. - glyph: for the glyph. - and so on... This is a lot of shuffling, but the result pays off, IMO. Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220614090537.15557-4-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit a7311228ae9bbfe532844ac55e8cfb68a574f2e1 Author: Jiri Slaby Date: Tue Jun 14 11:05:32 2022 +0200 tty/vt: consolemap: saner variable names in set_inverse_trans_unicode() The function still uses too vague parameter name after commit 50c92a1b2d50 (tty/vt: consolemap: saner variable names in set_inverse_trans_unicode()). So use "dict" instead of "p" for that parameter too. Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220614090537.15557-3-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 04f3d715df3a463985dc25e55a55dbd970dd77b7 Author: Charles Keepax Date: Thu Jun 23 13:52:16 2022 +0100 ASoC: tlv320*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-63-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/tlv320adcx140.c | 1 - sound/soc/codecs/tlv320aic23.c | 1 - sound/soc/codecs/tlv320aic26.c | 1 - sound/soc/codecs/tlv320aic31xx.c | 1 - sound/soc/codecs/tlv320aic32x4.c | 2 -- sound/soc/codecs/tlv320aic3x.c | 1 - sound/soc/codecs/tlv320dac33.c | 1 - 7 files changed, 8 deletions(-) commit 43e1d0776840b05c356c78a0c5c7d544af07a6a4 Author: Jiri Slaby Date: Tue Jun 14 11:05:31 2022 +0200 tty/vt: consolemap: remove unused parameter from set_inverse_trans_unicode() conp is unused in set_inverse_trans_unicode(), remove it. Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220614090537.15557-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 139f39be42fcd5f88366d6f3e6f05002027d3514 Author: Jiri Slaby Date: Tue Jun 14 11:05:30 2022 +0200 tty/vt: consolemap: use ARRAY_SIZE(), part II. The code still uses constants (macros) as bounds in loops after commit 17945d317a52 (tty/vt: consolemap: use ARRAY_SIZE()). The contants are at least macros used also in the definition of the arrays. But use ARRAY_SIZE() on two more places to ensure the loops never run out of bounds even if the array definition change. Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220614090537.15557-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c91f7e94ce931f058543174a409bb082208cae4a Author: Charles Keepax Date: Thu Jun 23 13:52:15 2022 +0100 ASoC: tfa*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-62-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/tfa9879.c | 1 - sound/soc/codecs/tfa989x.c | 1 - 2 files changed, 2 deletions(-) commit 02bcc2be4c12763dd4c524e67973afe4d8ea6d4c Author: Charles Keepax Date: Thu Jun 23 13:52:14 2022 +0100 ASoC: tas*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-61-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/tas2552.c | 1 - sound/soc/codecs/tas2562.c | 2 -- sound/soc/codecs/tas2764.c | 1 - sound/soc/codecs/tas2770.c | 1 - sound/soc/codecs/tas5086.c | 1 - sound/soc/codecs/tas571x.c | 1 - sound/soc/codecs/tas5720.c | 2 -- sound/soc/codecs/tas5805m.c | 1 - sound/soc/codecs/tas6424.c | 1 - 9 files changed, 11 deletions(-) commit 402f437b43870e65377bb97240ee3911858547cb Author: Charles Keepax Date: Thu Jun 23 13:52:13 2022 +0100 ASoC: sta*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-60-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/sta32x.c | 1 - sound/soc/codecs/sta350.c | 1 - sound/soc/codecs/sta529.c | 1 - 3 files changed, 3 deletions(-) commit a4311a5b1502f747576e5995d1b5ab04f60033f9 Author: Charles Keepax Date: Thu Jun 23 13:52:12 2022 +0100 ASoC: ssm*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-59-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/ssm2518.c | 1 - sound/soc/codecs/ssm2602.c | 1 - sound/soc/codecs/ssm4567.c | 1 - 3 files changed, 3 deletions(-) commit 792a8a944e7aa3f6ae0733429ba9937d7029ee4b Author: Charles Keepax Date: Thu Jun 23 13:52:11 2022 +0100 ASoC: spdif: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-58-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/spdif_receiver.c | 1 - sound/soc/codecs/spdif_transmitter.c | 1 - 2 files changed, 2 deletions(-) commit a524837ddd11bc20ec59d033d0260707cfa3cb99 Author: Charles Keepax Date: Thu Jun 23 13:52:10 2022 +0100 ASoC: rt*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-57-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/rt1011.c | 1 - sound/soc/codecs/rt1015.c | 1 - sound/soc/codecs/rt1015p.c | 1 - sound/soc/codecs/rt1016.c | 1 - sound/soc/codecs/rt1019.c | 1 - sound/soc/codecs/rt1305.c | 1 - sound/soc/codecs/rt1308.c | 1 - sound/soc/codecs/rt274.c | 1 - sound/soc/codecs/rt286.c | 1 - sound/soc/codecs/rt298.c | 1 - sound/soc/codecs/rt5514.c | 1 - sound/soc/codecs/rt5616.c | 1 - sound/soc/codecs/rt5631.c | 1 - sound/soc/codecs/rt5640.c | 2 -- sound/soc/codecs/rt5645.c | 1 - sound/soc/codecs/rt5651.c | 1 - sound/soc/codecs/rt5659.c | 1 - sound/soc/codecs/rt5660.c | 1 - sound/soc/codecs/rt5663.c | 1 - sound/soc/codecs/rt5665.c | 1 - sound/soc/codecs/rt5668.c | 1 - sound/soc/codecs/rt5670.c | 1 - sound/soc/codecs/rt5677.c | 1 - sound/soc/codecs/rt5682.c | 1 - sound/soc/codecs/rt5682s.c | 1 - 25 files changed, 26 deletions(-) commit 8d4470b8d08b4aab5136cc3265eb0b05d2a1c72d Author: Charles Keepax Date: Thu Jun 23 13:52:09 2022 +0100 ASoC: pcm*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-56-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/pcm1681.c | 1 - sound/soc/codecs/pcm1789.c | 1 - sound/soc/codecs/pcm179x.c | 1 - sound/soc/codecs/pcm186x.c | 2 -- sound/soc/codecs/pcm3008.c | 1 - sound/soc/codecs/pcm3168a.c | 1 - sound/soc/codecs/pcm5102a.c | 1 - sound/soc/codecs/pcm512x.c | 1 - 8 files changed, 9 deletions(-) commit c2fd88f0029172679917ebc536cfdc4b8fabe168 Author: Charles Keepax Date: Thu Jun 23 13:52:08 2022 +0100 ASoC: nau*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-55-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/nau8315.c | 1 - sound/soc/codecs/nau8540.c | 1 - sound/soc/codecs/nau8810.c | 1 - sound/soc/codecs/nau8821.c | 1 - sound/soc/codecs/nau8822.c | 1 - sound/soc/codecs/nau8824.c | 1 - sound/soc/codecs/nau8825.c | 1 - 7 files changed, 7 deletions(-) commit 736f48714c1b85b0b1f6c88af07989a5828531c9 Author: Charles Keepax Date: Thu Jun 23 13:52:07 2022 +0100 ASoC: msm*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-54-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/msm8916-wcd-analog.c | 1 - sound/soc/codecs/msm8916-wcd-digital.c | 1 - 2 files changed, 2 deletions(-) commit d2d3219ebe568fe4ee90ac748939304f7e05a8ec Author: Charles Keepax Date: Thu Jun 23 13:52:06 2022 +0100 ASoC: max*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-53-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/max98088.c | 1 - sound/soc/codecs/max98090.c | 1 - sound/soc/codecs/max98095.c | 1 - sound/soc/codecs/max98357a.c | 1 - sound/soc/codecs/max98371.c | 1 - sound/soc/codecs/max98373.c | 2 -- sound/soc/codecs/max98390.c | 1 - sound/soc/codecs/max98396.c | 2 -- sound/soc/codecs/max9850.c | 1 - sound/soc/codecs/max98520.c | 1 - sound/soc/codecs/max9860.c | 1 - sound/soc/codecs/max9867.c | 1 - sound/soc/codecs/max98925.c | 1 - sound/soc/codecs/max98926.c | 1 - sound/soc/codecs/max98927.c | 1 - 15 files changed, 17 deletions(-) commit f0b163b4d5a215f610bd64eb8ab8a8906e53bec6 Author: Charles Keepax Date: Thu Jun 23 13:52:05 2022 +0100 ASoC: es*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-52-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/es7134.c | 1 - sound/soc/codecs/es7241.c | 1 - sound/soc/codecs/es8316.c | 1 - sound/soc/codecs/es8328.c | 1 - 4 files changed, 4 deletions(-) commit c03a5b4c419799676013cb0c58c03e00ebe21a61 Author: Charles Keepax Date: Thu Jun 23 13:52:04 2022 +0100 ASoC: da*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-51-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/da7210.c | 1 - sound/soc/codecs/da7213.c | 1 - sound/soc/codecs/da7218.c | 1 - sound/soc/codecs/da7219.c | 1 - sound/soc/codecs/da732x.c | 1 - sound/soc/codecs/da9055.c | 1 - 6 files changed, 6 deletions(-) commit ff946fd98bffe5de450047f54a27492827186b75 Author: Charles Keepax Date: Thu Jun 23 13:52:03 2022 +0100 ASoC: cs*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-50-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cs35l32.c | 1 - sound/soc/codecs/cs35l33.c | 1 - sound/soc/codecs/cs35l34.c | 1 - sound/soc/codecs/cs35l35.c | 1 - sound/soc/codecs/cs35l36.c | 1 - sound/soc/codecs/cs4234.c | 1 - sound/soc/codecs/cs4265.c | 1 - sound/soc/codecs/cs4270.c | 1 - sound/soc/codecs/cs4271.c | 1 - sound/soc/codecs/cs42l42.c | 1 - sound/soc/codecs/cs42l51.c | 1 - sound/soc/codecs/cs42l52.c | 1 - sound/soc/codecs/cs42l56.c | 1 - sound/soc/codecs/cs42l73.c | 1 - sound/soc/codecs/cs42xx8.c | 1 - sound/soc/codecs/cs43130.c | 1 - sound/soc/codecs/cs4341.c | 1 - sound/soc/codecs/cs4349.c | 1 - sound/soc/codecs/cs47l15.c | 1 - sound/soc/codecs/cs47l24.c | 1 - sound/soc/codecs/cs47l35.c | 1 - sound/soc/codecs/cs47l85.c | 1 - sound/soc/codecs/cs47l90.c | 1 - sound/soc/codecs/cs47l92.c | 1 - sound/soc/codecs/cs53l30.c | 1 - 25 files changed, 25 deletions(-) commit 60d28b5c47c7f02bb52fc5e52a84d669b9b54dbc Author: Charles Keepax Date: Thu Jun 23 13:52:02 2022 +0100 ASoC: alc*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-49-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/alc5623.c | 1 - sound/soc/codecs/alc5632.c | 1 - 2 files changed, 2 deletions(-) commit 410e73a5338d72c31a32a50c1629d81d8ce6a71f Author: Charles Keepax Date: Thu Jun 23 13:52:01 2022 +0100 ASoC: ak*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-48-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/ak4104.c | 1 - sound/soc/codecs/ak4118.c | 1 - sound/soc/codecs/ak4375.c | 1 - sound/soc/codecs/ak4458.c | 2 -- sound/soc/codecs/ak4535.c | 1 - sound/soc/codecs/ak4554.c | 1 - sound/soc/codecs/ak4613.c | 1 - sound/soc/codecs/ak4641.c | 1 - sound/soc/codecs/ak4642.c | 1 - sound/soc/codecs/ak4671.c | 1 - sound/soc/codecs/ak5386.c | 1 - sound/soc/codecs/ak5558.c | 2 -- 12 files changed, 14 deletions(-) commit d9e7ddb98604de6470a0fe4f9e2434a55ca35730 Author: Charles Keepax Date: Thu Jun 23 13:52:00 2022 +0100 ASoC: ad*: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-47-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/ad1836.c | 1 - sound/soc/codecs/ad193x.c | 1 - sound/soc/codecs/ad1980.c | 1 - sound/soc/codecs/ad73311.c | 1 - sound/soc/codecs/adau1373.c | 1 - sound/soc/codecs/adau1701.c | 1 - sound/soc/codecs/adau1761.c | 1 - sound/soc/codecs/adau1781.c | 1 - sound/soc/codecs/adau1977.c | 1 - sound/soc/codecs/adau7002.c | 1 - sound/soc/codecs/adau7118.c | 1 - sound/soc/codecs/adav80x.c | 1 - 12 files changed, 12 deletions(-) commit 36e79a44b12e4ce2d8659f47dbcce42690919567 Author: Charles Keepax Date: Thu Jun 23 13:51:59 2022 +0100 ASoC: uniphier: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-46-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/uniphier/evea.c | 1 - 1 file changed, 1 deletion(-) commit 7cfb102a55556f5f165a2150a6f77a5aa7257599 Author: Charles Keepax Date: Thu Jun 23 13:51:58 2022 +0100 ASoC: topology: KUnit: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-45-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/soc-topology-test.c | 3 --- 1 file changed, 3 deletions(-) commit 485c5924f262d4aef720c508ee2ff3cb8e2e531b Author: Charles Keepax Date: Thu Jun 23 13:51:57 2022 +0100 ASoC: test-component: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-44-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/generic/test-component.c | 1 - 1 file changed, 1 deletion(-) commit 63c0ec9ebfec499d603993ea8244907bfbe39598 Author: Charles Keepax Date: Thu Jun 23 13:51:56 2022 +0100 ASoC: tegra: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-43-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/tegra/tegra210_i2s.c | 1 - 1 file changed, 1 deletion(-) commit 4c6391f59c459e7cf8d584299d0746cb681c2cb7 Author: Charles Keepax Date: Thu Jun 23 13:51:55 2022 +0100 ASoC: sunxi: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-42-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-codec.c | 4 ---- sound/soc/sunxi/sun8i-codec.c | 1 - 2 files changed, 5 deletions(-) commit 0f91b4de756415382c10c502010c7536500a1632 Author: Charles Keepax Date: Thu Jun 23 13:51:54 2022 +0100 ASoC: soc-utils: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-41-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/soc-utils.c | 1 - 1 file changed, 1 deletion(-) commit 752044db5b54c867dadfbd0daea90f1b9ecb21f1 Author: Charles Keepax Date: Thu Jun 23 13:51:53 2022 +0100 ASoC: samsung: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-40-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/samsung/aries_wm8994.c | 1 - 1 file changed, 1 deletion(-) commit 7e91c90863df7387b9e1f04d9bfc2a43c77d2a46 Author: Charles Keepax Date: Thu Jun 23 13:51:52 2022 +0100 ASoC: pistachio: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-39-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/img/pistachio-internal-dac.c | 1 - 1 file changed, 1 deletion(-) commit 9455e289246d8769631e6bec78c0c2ef40171b70 Author: Charles Keepax Date: Thu Jun 23 13:51:51 2022 +0100 ASoC: meson: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-38-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/meson/aiu-acodec-ctrl.c | 1 - sound/soc/meson/aiu-codec-ctrl.c | 1 - sound/soc/meson/g12a-toacodec.c | 2 -- sound/soc/meson/g12a-tohdmitx.c | 1 - sound/soc/meson/t9015.c | 1 - 5 files changed, 6 deletions(-) commit 89836f00429b5c3dedb2e2f30262e53847b82ad0 Author: Charles Keepax Date: Thu Jun 23 13:51:50 2022 +0100 ASoC: fsl: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-37-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_mqs.c | 1 - 1 file changed, 1 deletion(-) commit 55b566ded44db29e9c1ab61623c60ade4600301e Author: Charles Keepax Date: Thu Jun 23 13:51:49 2022 +0100 media: TDA1997x: Remove now redundant non_legacy_dai_naming flag The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-36-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown drivers/media/i2c/tda1997x.c | 1 - 1 file changed, 1 deletion(-) commit 129f055a2144ab588a43c2e66d21a1f55ce54f81 Author: Charles Keepax Date: Thu Jun 23 13:51:48 2022 +0100 ASoC: core: Switch core to new DAI naming flag Now all the drivers are updated to have the new legacy_dai_naming flag, update the core code so it also uses the new flag. Paving the way for the old non_legacy_dai_naming flag to be removed. It should be noted this patch will affect the CODEC drivers that don't specify the non_legacy_dai_naming flag. These drivers will update from using legacy DAI naming to the new scheme after this patch, this is being considered a fix as the intention was for all CODEC drivers to use the new scheme and all existing CODEC drivers were updated to do so before componentisation. This just corrects those devices that have snuck in since componentisation. The corrected devices are as follows: adau1372, cros_ec_codec, cs35l41, cs35l45, cx2072x, hdac_hda, jz4725/60/70, lpass-rx/tx/va/wsa-macro, max98504, max9877, mt6351/58/59, mt6660, pcm3060, rk3328, rt1308/16, rt5514, rt5677, rt700/11/15, rt9120, sdw-mockup, tlv320adc3xxx, tscs454, wcd9335/4x/8x, wsa881x Some of these devices are used in some in kernel machine drivers, however it appears all the usages use the actual DAI driver name (since snd_soc_find_dai checks both the DAI name and the DAI driver name). So it is not believed this change will break any in tree machine drivers. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-35-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/soc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7bfa516a39a111a5d3b6473cdac20ee6075358c Author: Charles Keepax Date: Thu Jun 23 13:51:47 2022 +0100 ASoC: samsung: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-34-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/samsung/i2s.c | 2 ++ sound/soc/samsung/pcm.c | 3 ++- sound/soc/samsung/s3c2412-i2s.c | 7 ++++--- sound/soc/samsung/s3c24xx-i2s.c | 7 ++++--- sound/soc/samsung/spdif.c | 7 ++++--- 5 files changed, 16 insertions(+), 10 deletions(-) commit 4cc4e22843e9bec6e9083d85e8a0bfed85fe5423 Author: Charles Keepax Date: Thu Jun 23 13:51:46 2022 +0100 ASoC: mxs-saif: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). This driver appears to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-33-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/mxs/mxs-saif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 39c84e77da04f66f20fc54c6c6f49a5863bace5d Author: Charles Keepax Date: Thu Jun 23 13:51:45 2022 +0100 ASoC: ti: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-32-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/ti/davinci-i2s.c | 3 ++- sound/soc/ti/davinci-mcasp.c | 3 ++- sound/soc/ti/davinci-vcif.c | 3 ++- sound/soc/ti/omap-dmic.c | 3 ++- sound/soc/ti/omap-hdmi.c | 1 + sound/soc/ti/omap-mcbsp.c | 3 ++- sound/soc/ti/omap-mcpdm.c | 7 ++++--- 7 files changed, 15 insertions(+), 8 deletions(-) commit 768be0d633d9ff668a7ca4ba3b8e3eebea328cb8 Author: Charles Keepax Date: Thu Jun 23 13:51:44 2022 +0100 ASoC: ux500: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). This driver appears to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-31-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/ux500/ux500_msp_dai.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a718ba30038402e6daa311c566d9be39e4ab3f05 Author: Charles Keepax Date: Thu Jun 23 13:51:43 2022 +0100 ASoC: sof: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-30-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/sof/pcm.c | 2 ++ sound/soc/sof/sof-client-probes.c | 1 + 2 files changed, 3 insertions(+) commit 05603f15b67a517c05ee2e2298e9accb8b7f1794 Author: Charles Keepax Date: Thu Jun 23 13:51:42 2022 +0100 ASoC: pxa: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-29-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/pxa/mmp-sspa.c | 9 +++++---- sound/soc/pxa/pxa-ssp.c | 21 +++++++++++---------- sound/soc/pxa/pxa2xx-i2s.c | 21 +++++++++++---------- 3 files changed, 27 insertions(+), 24 deletions(-) commit 8e750817a1943b49d81c633f48370bce93bab98c Author: Charles Keepax Date: Thu Jun 23 13:51:41 2022 +0100 ASoC: au1x: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-28-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/au1x/ac97c.c | 3 ++- sound/soc/au1x/i2sc.c | 3 ++- sound/soc/au1x/psc-ac97.c | 3 ++- sound/soc/au1x/psc-i2s.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) commit d48a77173534df90788075e76fa88c52b7395a1e Author: Charles Keepax Date: Thu Jun 23 13:51:40 2022 +0100 ASoC: rockchip: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-27-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 1 + sound/soc/rockchip/rockchip_i2s_tdm.c | 1 + sound/soc/rockchip/rockchip_pdm.c | 1 + sound/soc/rockchip/rockchip_spdif.c | 1 + 4 files changed, 4 insertions(+) commit d73130ba523b88a3edb097ae3eb9f93df844b5e2 Author: Charles Keepax Date: Thu Jun 23 13:51:39 2022 +0100 ASoC: test-component: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). This driver appears to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-26-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/generic/test-component.c | 1 + 1 file changed, 1 insertion(+) commit 8135d0290a9a1f1f752bb374f93a017b2074d09b Author: Charles Keepax Date: Thu Jun 23 13:51:38 2022 +0100 ASoC: qcom: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-25-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/qcom/lpass-cpu.c | 1 + sound/soc/qcom/qdsp6/q6asm-dai.c | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 11 deletions(-) commit e740ef3d9418db78ac7a8a24071933f9146af6e4 Author: Charles Keepax Date: Thu Jun 23 13:51:37 2022 +0100 ASoC: dwc: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). This driver appears to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-24-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/dwc/dwc-i2s.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 9a34161a0bc90df825694195659d894e80afe7a3 Author: Charles Keepax Date: Thu Jun 23 13:51:36 2022 +0100 ASoC: adi: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-23-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/adi/axi-i2s.c | 1 + sound/soc/adi/axi-spdif.c | 1 + 2 files changed, 2 insertions(+) commit f257dea1c589fa3f558502b3ac7b1c09699a73ab Author: Charles Keepax Date: Thu Jun 23 13:51:35 2022 +0100 ASoC: xtensa: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). This driver appears to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-22-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/xtensa/xtfpga-i2s.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 1e63fcc74ace9824f3529eeabbb8f1881a7d3800 Author: Charles Keepax Date: Thu Jun 23 13:51:34 2022 +0100 ASoC: fsl: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-21-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_aud2htx.c | 3 ++- sound/soc/fsl/fsl_easrc.c | 7 ++++--- sound/soc/fsl/fsl_esai.c | 3 ++- sound/soc/fsl/fsl_rpmsg.c | 3 ++- sound/soc/fsl/fsl_sai.c | 3 ++- sound/soc/fsl/fsl_spdif.c | 3 ++- sound/soc/fsl/fsl_ssi.c | 1 + sound/soc/fsl/fsl_xcvr.c | 3 ++- sound/soc/fsl/mpc5200_psc_i2s.c | 3 ++- 9 files changed, 19 insertions(+), 10 deletions(-) commit 7593e00807fb62e9f5e7367fc2500428cc317ff0 Author: Charles Keepax Date: Thu Jun 23 13:51:33 2022 +0100 ASoC: atmel: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-20-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/atmel/atmel-classd.c | 1 + sound/soc/atmel/atmel-i2s.c | 3 ++- sound/soc/atmel/atmel-pdmic.c | 1 + sound/soc/atmel/atmel_ssc_dai.c | 7 ++++--- sound/soc/atmel/mchp-i2s-mcc.c | 3 ++- sound/soc/atmel/mchp-pdmc.c | 1 + sound/soc/atmel/mchp-spdifrx.c | 3 ++- sound/soc/atmel/mchp-spdiftx.c | 3 ++- 8 files changed, 15 insertions(+), 7 deletions(-) commit 0bc1e7d1fc3c50cf1eb62cd3c8d2b73c5f6d83fe Author: Charles Keepax Date: Thu Jun 23 13:51:32 2022 +0100 ASoC: amd: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-19-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/amd/acp/acp-platform.c | 15 ++++++++------- sound/soc/amd/raven/acp3x-i2s.c | 3 ++- sound/soc/amd/renoir/acp3x-pdm-dma.c | 13 +++++++------ sound/soc/amd/vangogh/acp5x-i2s.c | 1 + sound/soc/amd/yc/acp6x-pdm-dma.c | 13 +++++++------ 5 files changed, 25 insertions(+), 20 deletions(-) commit ad483da7b0a17fdf4df0bd75b2cf29b5650ca2f7 Author: Charles Keepax Date: Thu Jun 23 13:51:31 2022 +0100 ASoC: sti-uniperf: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). This driver appears to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-18-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/sti/sti_uniperif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d8572da099247860e97b27a7fddc9d80a71b8c25 Author: Charles Keepax Date: Thu Jun 23 13:51:30 2022 +0100 ASoC: meson: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-17-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/meson/axg-frddr.c | 3 +++ sound/soc/meson/axg-pdm.c | 4 +++- sound/soc/meson/axg-spdifin.c | 1 + sound/soc/meson/axg-spdifout.c | 1 + sound/soc/meson/axg-toddr.c | 3 +++ 5 files changed, 11 insertions(+), 1 deletion(-) commit 725cf3bc6009b7fa156b73982eddf23c71767fbb Author: Charles Keepax Date: Thu Jun 23 13:51:29 2022 +0100 ASoC: Intel: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-16-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/intel/keembay/kmb_platform.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit f450b5dbce413b276e6c9215b40868b905c7b634 Author: Charles Keepax Date: Thu Jun 23 13:51:28 2022 +0100 ASoC: sunxi: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-15-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-codec.c | 3 ++- sound/soc/sunxi/sun4i-i2s.c | 3 ++- sound/soc/sunxi/sun4i-spdif.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit bd486b070b1e24b38b3d6d7e33abffe4a18e3296 Author: Charles Keepax Date: Thu Jun 23 13:51:27 2022 +0100 ASoC: xilinx: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-14-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/xilinx/xlnx_formatter_pcm.c | 16 ++++++++-------- sound/soc/xilinx/xlnx_i2s.c | 1 + sound/soc/xilinx/xlnx_spdif.c | 1 + 3 files changed, 10 insertions(+), 8 deletions(-) commit bf6dacb784f0efb5a225f6560d693fa71c7fda64 Author: Charles Keepax Date: Thu Jun 23 13:51:26 2022 +0100 ASoC: hisilicon: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). This driver appears to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-13-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/hisilicon/hi6210-i2s.c | 1 + 1 file changed, 1 insertion(+) commit 3172582c10540d4bf1caac1c39c903793648db8f Author: Charles Keepax Date: Thu Jun 23 13:51:25 2022 +0100 ASoC: tegra: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-12-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/tegra/tegra20_ac97.c | 3 ++- sound/soc/tegra/tegra20_i2s.c | 3 ++- sound/soc/tegra/tegra20_spdif.c | 1 + sound/soc/tegra/tegra30_i2s.c | 3 ++- 4 files changed, 7 insertions(+), 3 deletions(-) commit f712ff57a27090baff61f92bdb6521e8781d5e6b Author: Charles Keepax Date: Thu Jun 23 13:51:24 2022 +0100 ASoC: sh: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-11-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/sh/hac.c | 3 ++- sound/soc/sh/rcar/core.c | 11 ++++++----- sound/soc/sh/rz-ssi.c | 9 +++++---- sound/soc/sh/siu_pcm.c | 17 +++++++++-------- sound/soc/sh/ssi.c | 3 ++- 5 files changed, 24 insertions(+), 19 deletions(-) commit b9a0db0ae5247d92f379107a9c479f881914999d Author: Charles Keepax Date: Thu Jun 23 13:51:23 2022 +0100 ASoC: bcm: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-10-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/bcm/bcm2835-i2s.c | 3 ++- sound/soc/bcm/bcm63xx-i2s-whistler.c | 1 + sound/soc/bcm/cygnus-ssp.c | 7 ++++--- 3 files changed, 7 insertions(+), 4 deletions(-) commit 36f07985f81b7482dceb8e650d2ce1f0222294d1 Author: Charles Keepax Date: Thu Jun 23 13:51:22 2022 +0100 ASoC: stm32: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-9-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/stm/stm32_adfsdm.c | 1 + sound/soc/stm/stm32_i2s.c | 1 + sound/soc/stm/stm32_sai_sub.c | 1 + sound/soc/stm/stm32_spdifrx.c | 1 + 4 files changed, 4 insertions(+) commit fe58b58330434ffad5fa0bc97e177aa93a9a6222 Author: Charles Keepax Date: Thu Jun 23 13:51:21 2022 +0100 ASoC: ep93xx: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-8-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/cirrus/ep93xx-ac97.c | 3 ++- sound/soc/cirrus/ep93xx-i2s.c | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) commit 2bebc3b622c3c300eb3a3f603473429d8264c3b6 Author: Charles Keepax Date: Thu Jun 23 13:51:20 2022 +0100 ASoC: jz4740-i2c: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). This driver appears to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-7-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/jz4740/jz4740-i2s.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit eeb021ee8fab0baae82e3784664666fd6b826e89 Author: Charles Keepax Date: Thu Jun 23 13:51:19 2022 +0100 ASoC: spear: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-6-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/spear/spdif_in.c | 3 ++- sound/soc/spear/spdif_out.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 5f9d69986014945b826c712081678446c1f10fd7 Author: Charles Keepax Date: Thu Jun 23 13:51:18 2022 +0100 ASoC: img: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-5-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/img/img-i2s-in.c | 3 ++- sound/soc/img/img-i2s-out.c | 3 ++- sound/soc/img/img-parallel-out.c | 3 ++- sound/soc/img/img-spdif-in.c | 3 ++- sound/soc/img/img-spdif-out.c | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) commit db827cb34ca38f4106f7c667bea3bbb48bc73552 Author: Charles Keepax Date: Thu Jun 23 13:51:17 2022 +0100 drm/vc4: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). This driver appears to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Acked-by: Maxime Ripard Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown drivers/gpu/drm/vc4/vc4_hdmi.c | 1 + 1 file changed, 1 insertion(+) commit ca68202098a4416501cc9b5d68a54de22d754766 Author: Charles Keepax Date: Thu Jun 23 13:51:16 2022 +0100 soundwire: intel: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). This driver appears to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax Acked-By: Vinod Koul Link: https://lore.kernel.org/r/20220623125250.2355471-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown drivers/soundwire/intel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1c348f748b4dd7711c5564a8fce0842529498dff Author: Charles Keepax Date: Thu Jun 23 13:51:15 2022 +0100 ASoC: soc-component: Add legacy_dai_naming flag Historically, the legacy DAI naming scheme was applied to platform drivers and the newer scheme to CODEC drivers. During componentisation the core lost the knowledge of if a driver was a CODEC or platform, they were all now components. To continue to support the legacy naming on older platform drivers a flag was added to the snd_soc_component_driver structure, non_legacy_dai_naming, to indicate to use the new scheme and this was applied to all CODECs as part of the migration. However, a slight issue appears to be developing with respect to this flag being opt in for the non-legacy scheme, which presumably we want to be the primary scheme used. Many codec drivers appear to forget to include this flag: grep -l -r "snd_soc_component_driver" sound/soc/codecs/*.c | xargs grep -L "non_legacy_dai_naming" | wc 48 48 556 It would seem more sensible to change the flag to legacy_dai_naming making the new scheme opt out. As a first step this patch adds a new flag for this so that the users can be updated. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623125250.2355471-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown include/sound/soc-component.h | 1 + 1 file changed, 1 insertion(+) commit f42924b49bf7935d21e2f2e98fdc9aa8dd176699 Author: Daniel Mack Date: Fri Jun 24 12:47:11 2022 +0200 ASoC: max98396: Implement DSP speaker monitor Allow the selection of the TDM slot that is used to send back speaker monitor data. The DT property adi,spkfb-slot-no can be used to configure this setting which defaults to 2. Signed-off-by: Daniel Mack Link: https://lore.kernel.org/r/20220624104712.1934484-8-daniel@zonque.org Signed-off-by: Mark Brown sound/soc/codecs/max98396.c | 8 ++++++++ sound/soc/codecs/max98396.h | 1 + 2 files changed, 9 insertions(+) commit c529fd620b842c926ccc8cea913886d802c30f16 Author: Daniel Mack Date: Fri Jun 24 12:47:10 2022 +0200 ASoC: max98396: Fix register access for PCM format settings max98396_dai_set_fmt() modifes register 2041 and touches bits in the mask 0x3a. Make sure to use the right mask for that operation. Signed-off-by: Daniel Mack Link: https://lore.kernel.org/r/20220624104712.1934484-7-daniel@zonque.org Signed-off-by: Mark Brown sound/soc/codecs/max98396.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit a8c1dc9e8f01811b0c3fee65b9bc4773b2d00d96 Author: Daniel Mack Date: Fri Jun 24 12:47:09 2022 +0200 ASoC: max98396: Improve some error prints Let's log what actually failed and log at some more places. Signed-off-by: Daniel Mack Link: https://lore.kernel.org/r/20220624104712.1934484-6-daniel@zonque.org Signed-off-by: Mark Brown sound/soc/codecs/max98396.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 703ee0557f8921c96e8c42f832b3bd69b7bfb262 Author: Daniel Mack Date: Fri Jun 24 12:47:08 2022 +0200 ASoC: max98396: add voltage regulators The device has up to 5 potentially independent power supplies: AVDD, DVDD, DVVDIO, VBAT and PVDD. The former 3 are mandatory for the device to function. One of VBAT and PVDD should also be made available. Regulators are enabled during probe time and will stay active except when in suspend mode. Futher, the chip needs to be informed about the presence of VBAT through a bit in register 0x20a0. Signed-off-by: Daniel Mack Link: https://lore.kernel.org/r/20220624104712.1934484-5-daniel@zonque.org Signed-off-by: Mark Brown sound/soc/codecs/max98396.c | 117 +++++++++++++++++++++++++++++++++++++++++++- sound/soc/codecs/max98396.h | 7 +++ 2 files changed, 123 insertions(+), 1 deletion(-) commit 0ce44afd29768e893ff9112ba208271e0d558780 Author: Daniel Mack Date: Fri Jun 24 12:47:07 2022 +0200 ASoC: dt-bindings: max98396: Document adi,bypass-slot-no This property allows to select the PCM data input channel that is routed to the speaker audio processing bypass path. The driver already implements this property. While at it, fix the default value for adi,imon-slot-no. Signed-off-by: Daniel Mack Link: https://lore.kernel.org/r/20220624104712.1934484-4-daniel@zonque.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/adi,max98396.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit d9bd3aea31aba94b5811776e0817a15ea4420e84 Author: Daniel Mack Date: Fri Jun 24 12:47:05 2022 +0200 ASoC: dt-bindings: max98396: add voltage supplies The device is supplied with 3 core voltages (DVVDIO, DVDD, AVDD), and PVDD and/or VBAT. Signed-off-by: Daniel Mack Link: https://lore.kernel.org/r/20220624104712.1934484-2-daniel@zonque.org Signed-off-by: Mark Brown .../devicetree/bindings/sound/adi,max98396.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit dfc17f6eec035e103f0a7f046ec52da9b4c58268 Merge: a22f18bddd82 0c9b9c2ac0df Author: Rafael J. Wysocki Date: Mon Jun 27 14:13:26 2022 +0200 Merge tag 'ib-mfd-acpi-for-rafael-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD changes for 5.20 from Lee Jones to satisfy dependencies: "Immutable branch between MFD and ACPI due for the v5.20 merge window." * tag 'ib-mfd-acpi-for-rafael-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: mfd: core: Use acpi_dev_for_each_child() commit 563aaf4a928def2d36d1b3de0a4b515e2477b4da Author: Matthew Auld Date: Wed Jun 22 16:59:19 2022 +0100 drm/i915: tweak the ordering in cpu_write_needs_clflush For imported dma-buf objects we leave the object as cache_coherent = 0 across all platforms, which is reasonable given that have no clue what the memory underneath is, and its not like the driver can ever manually clflush the pages anyway (like with i915_gem_clflush_object) for such objects. However on discrete we choose to treat cache_dirty = true as a programmer error, leading to a warning. The simplest fix looks to be to just change the ordering in cpu_write_needs_clflush to prevent ever setting cache_dirty for dma-buf objects on discrete. Fixes: d028a7690d87 ("drm/i915/dmabuf: Fix prime_mmap to work when using LMEM") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5266 Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Gwan-gyeong Mun Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20220622155919.355081-1-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_domain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit df8d0a55047b57074ac69db795a9775b3abe364e Author: Martin Kaiser Date: Mon Jun 27 10:53:54 2022 +0200 staging: r8188eu: make power sequences static Simplify the handling of "power sequences". At the moment, this is rather complicated: The hal layer calls HalPwrSeqCmdParsing. This function takes a pointer to a power sequence. The sequences themselves are defined as global variables in a separate file. There's an alias for each sequence, the callers of HalPwrSeqCmdParsing use these aliases instead of the sequences themselves. There's no point in passing the sequences around. We can move the sequences into the same file as the HalPwrSeqCmdParsing function where they are used. Callers of HalPwrSeqCmdParsing can refer to a sequence by using a numeric define rather than a pointer to the sequence. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220627085354.28849-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/Makefile | 1 - drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c | 45 ------------------- drivers/staging/r8188eu/hal/HalPwrSeqCmd.c | 57 +++++++++++++++++++++++- drivers/staging/r8188eu/hal/usb_halinit.c | 8 ++-- drivers/staging/r8188eu/include/Hal8188EPwrSeq.h | 13 ------ drivers/staging/r8188eu/include/HalPwrSeqCmd.h | 8 +++- drivers/staging/r8188eu/include/rtl8188e_hal.h | 5 --- 7 files changed, 67 insertions(+), 70 deletions(-) commit 1b0a54b3e83f67cade6e510f43804ac7ab4c0bb9 Author: Martin Kaiser Date: Sun Jun 26 20:09:59 2022 +0200 staging: r8188eu: merge two led structs The led layer uses struct led_priv and struct LED_871x to store state info. Merge the two structs. Move LED_871x's components into led_priv. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220626181000.287225-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_led.c | 27 ++++++++++++--------------- drivers/staging/r8188eu/include/rtw_led.h | 9 +++------ 2 files changed, 15 insertions(+), 21 deletions(-) commit 80394da44b7be8f5e474b048aed6ceaf0082c2b4 Author: Martin Kaiser Date: Sun Jun 26 20:06:03 2022 +0200 staging: r8188eu: remove rtw_usleep_os Remove the rtw_usleep_os helper function. There are only two callers, both of which call rtw_usleep_os(100). This is equivalent to msleep(1). Tested-by: Philipp Hortmann # Edimax N150 Tested-by: Pavel Skripkin Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220626180603.287054-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_pwrctrl.c | 2 +- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 2 +- drivers/staging/r8188eu/include/osdep_service.h | 2 -- drivers/staging/r8188eu/os_dep/osdep_service.c | 8 -------- 4 files changed, 2 insertions(+), 12 deletions(-) commit b78137d00a66f69c51e291e06d3e4ec6d1223acd Author: Chang Yu Date: Fri Jun 24 07:45:26 2022 -0700 staging: r8188eu: core/rtw_recv.c: clean up nested if statements Combine two nested if statements into a single one to fix indentation issue and improve readability, as suggested by checkpatch.pl Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Chang Yu Link: https://lore.kernel.org/r/20220624144526.437322-1-marcus.yu.56@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f6c99d86246ad4a9013caf7914138368e80f7b93 Author: Phil Elwell Date: Fri Jun 24 18:39:02 2022 +0200 staging: vchiq_arm: Add missing memory barrier comments One of points on the TODO list was to comment the memory barriers. This patch addresses the missing ones in order to help reviewers. Link: https://github.com/raspberrypi/linux/pull/5066 Signed-off-by: Phil Elwell Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20220624163902.6913-1-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 ++++ drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 9 +++++++++ 2 files changed, 13 insertions(+) commit acde2522fa1aaa9aea58fb4c7dca596e8c0b5d57 Author: Felix Schlepper Date: Fri Jun 24 15:54:55 2022 +0200 Staging: rtl8192e: Cleaning up error handling Moved error handling to one common block. This removes double checking if all txb->fragments[] were initialized. The original code worked fine, but this is cleaner. Signed-off-by: Felix Schlepper Link: https://lore.kernel.org/r/13b32131cd00a1f0b8793657a24ada71240a8350.1656078068.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_tx.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 9fdc63fe40faaffeecaf3f1425dd1b27892f96fc Author: Felix Schlepper Date: Fri Jun 24 15:54:54 2022 +0200 Staging: rtl8192e: Using kzalloc and delete memset By using kzalloc, we can delete a memset. The practical difference is that using kzalloc() will zero out the txb->fragments[] array. The original code worked fine, but zeroing everything seems nicer. Signed-off-by: Felix Schlepper Link: https://lore.kernel.org/r/9727fe31c675f2f3052ca2fa586d137dd856ac91.1656078068.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_tx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 71eac0c07c7b26063bf5ee14a082e05421688552 Author: Felix Schlepper Date: Fri Jun 24 15:54:53 2022 +0200 Staging: rtl8192e: Use struct_size Using struct_size is encouraged because it is safer than using sizeof and calculations by hand. Signed-off-by: Felix Schlepper Link: https://lore.kernel.org/r/54ea62a2b7628d3bdd5aa52df82c3e91704a2127.1656078068.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_tx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6fde8eec71796f3534f0c274066862829813b21f Author: José Expósito Date: Mon Jun 20 18:06:40 2022 +0200 drm/doc: Add KUnit documentation Explain how to run the KUnit tests present in the DRM subsystem and clarify why the UML-only options were not added to the configuration file present in drivers/gpu/drm/.kunitconfig [1] [2]. [1] https://lore.kernel.org/dri-devel/CABVgOSn8i=LO5p7830h2XU1Jgg0KrN0qTnxkOMhf1oTgxjaKKw@mail.gmail.com/ [2] https://lore.kernel.org/dri-devel/CAGS_qxqpiCim_sy1LDK7PLwVgWf-LKW+uNFTGM=T7ydk-dYcEw@mail.gmail.com/ Reviewed-by: Maxime Ripard Reviewed-by: Javier Martinez Canillas Reviewed-by: David Gow Acked-by: Thomas Zimmermann Signed-off-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20220620160640.3790-4-jose.exposito89@gmail.com Documentation/gpu/drm-internals.rst | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 8f456104915f0f991a2ce059a640b0a6f807e2cd Author: José Expósito Date: Mon Jun 20 18:06:39 2022 +0200 drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332() Test the conversion from XRGB8888 to RGB332. What is tested? - Different values for the X in XRGB8888 to make sure it is ignored - Different clip values: Single pixel and full and partial buffer - Well known colors: White, black, red, green, blue, magenta, yellow and cyan - Other colors: Randomly picked - Destination pitch How to run the tests? $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/gpu/drm/tests \ --kconfig_add CONFIG_VIRTIO_UML=y \ --kconfig_add CONFIG_UML_PCI_OVER_VIRTIO=y Suggested-by: Javier Martinez Canillas Reviewed-by: Javier Martinez Canillas Reviewed-by: David Gow Acked-by: Thomas Zimmermann Signed-off-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20220620160640.3790-3-jose.exposito89@gmail.com drivers/gpu/drm/Kconfig | 16 +++ drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/tests/.kunitconfig | 3 + drivers/gpu/drm/tests/Makefile | 3 + drivers/gpu/drm/tests/drm_format_helper_test.c | 161 +++++++++++++++++++++++++ 5 files changed, 184 insertions(+) commit 84509eede6203bc5ab43ce0361a6ae17e2a17152 Author: José Expósito Date: Mon Jun 20 18:06:38 2022 +0200 drm/rect: Add DRM_RECT_INIT() macro Add a helper macro to initialize a rectangle from x, y, width and height information. Reviewed-by: Jani Nikula Reviewed-by: David Gow Acked-by: Thomas Zimmermann Signed-off-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20220620160640.3790-2-jose.exposito89@gmail.com include/drm/drm_rect.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 138c2fca6f408f397ea8fbbbf33203f244d96e01 Author: Anshuman Gupta Date: Thu Jun 16 17:52:49 2022 +0530 drm/i915/dgfx: Disable d3cold at gfx root port Currently i915 disables d3cold for i915 pci dev. This blocks D3 for i915 gfx pci upstream bridge (VSP). Let's disable d3cold at gfx root port to make sure that i915 gfx VSP can transition to D3 to save some power. We don't need to disable/enable d3cold in rpm, s2idle suspend/resume handlers. Disabling/Enabling d3cold at gfx root port in probe/remove phase is sufficient. Fixes: 1a085e23411d ("drm/i915: Disable D3Cold in s2idle and runtime pm") Cc: Rodrigo Vivi Signed-off-by: Anshuman Gupta Reviewed-by: Badal Nilawar Acked-by:: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20220616122249.5007-1-anshuman.gupta@intel.com drivers/gpu/drm/i915/i915_driver.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) commit 893dea9ccd08dab924839354aba21d4ed7a9abc0 Author: Kefeng Wang Date: Tue Jun 7 20:50:27 2022 +0800 arm64: Add HAVE_IOREMAP_PROT support With ioremap_prot() definition from generic ioremap, also move pte_pgprot() from hugetlbpage.c into pgtable.h, then arm64 could have HAVE_IOREMAP_PROT, which will enable generic_access_phys() code, it is useful for debug, eg, gdb. Acked-by: Catalin Marinas Reviewed-by: Anshuman Khandual Signed-off-by: Kefeng Wang Link: https://lore.kernel.org/r/20220607125027.44946-7-wangkefeng.wang@huawei.com Signed-off-by: Will Deacon Documentation/features/vm/ioremap_prot/arch-support.txt | 2 +- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/pgtable.h | 10 ++++++++++ arch/arm64/mm/hugetlbpage.c | 10 ---------- 4 files changed, 12 insertions(+), 11 deletions(-) commit f23eab0bfaefb3319c7de90c9c632bebf53a03bc Author: Kefeng Wang Date: Tue Jun 7 20:50:26 2022 +0800 arm64: mm: Convert to GENERIC_IOREMAP Add hook for arm64's special operation when ioremap(), then ioremap_wc/np/cache is converted to use ioremap_prot() from GENERIC_IOREMAP, update the Copyright and kill the unused inclusions. Reviewed-by: Anshuman Khandual Acked-by: Catalin Marinas Signed-off-by: Kefeng Wang Link: https://lore.kernel.org/r/20220607125027.44946-6-wangkefeng.wang@huawei.com Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 + arch/arm64/include/asm/io.h | 24 +++++++++--- arch/arm64/kernel/acpi.c | 2 +- arch/arm64/mm/ioremap.c | 90 ++++----------------------------------------- 4 files changed, 28 insertions(+), 89 deletions(-) commit 18e780b4e6ab89a3a10f46d151971863562c1c91 Author: Kefeng Wang Date: Tue Jun 7 20:50:25 2022 +0800 mm: ioremap: Add ioremap/iounmap_allowed() Add special hook for architecture to verify addr, size or prot when ioremap() or iounmap(), which will make the generic ioremap more useful. ioremap_allowed() return a bool, - true means continue to remap - false means skip remap and return directly iounmap_allowed() return a bool, - true means continue to vunmap - false code means skip vunmap and return directly Meanwhile, only vunmap the address when it is in vmalloc area as the generic ioremap only returns vmalloc addresses. Acked-by: Andrew Morton Signed-off-by: Kefeng Wang Reviewed-by: Christoph Hellwig Reviewed-by: Baoquan He Link: https://lore.kernel.org/r/20220607125027.44946-5-wangkefeng.wang@huawei.com Signed-off-by: Will Deacon include/asm-generic/io.h | 26 ++++++++++++++++++++++++++ mm/ioremap.c | 11 ++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) commit a14fff1c0379d0422c5ca0084b0ab86ed7bedf3e Author: Kefeng Wang Date: Tue Jun 7 20:50:24 2022 +0800 mm: ioremap: Setup phys_addr of struct vm_struct Show physical address of each ioremap in /proc/vmallocinfo. Acked-by: Andrew Morton Reviewed-by: Christoph Hellwig Reviewed-by: Anshuman Khandual Signed-off-by: Kefeng Wang Link: https://lore.kernel.org/r/20220607125027.44946-4-wangkefeng.wang@huawei.com Signed-off-by: Will Deacon mm/ioremap.c | 1 + 1 file changed, 1 insertion(+) commit 0c9b9c2ac0df57b6b5949a51c45043b345698428 Author: Rafael J. Wysocki Date: Mon Jun 13 20:31:08 2022 +0200 mfd: core: Use acpi_dev_for_each_child() Instead of walking the list of children of an ACPI device directly, use acpi_dev_for_each_child() to carry out an action for all of the given ACPI device's children. This will help to eliminate the children list head from struct acpi_device as it is redundant and it is used in questionable ways in some places (in particular, locking is needed for walking the list pointed to it safely, but it is often missing). Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/2726954.BEx9A2HvPv@kreacher drivers/mfd/mfd-core.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit abc5992b9dd0ba599f7a91d5a0f4569a78ae88ac Author: Kefeng Wang Date: Tue Jun 7 20:50:23 2022 +0800 mm: ioremap: Use more sensible name in ioremap_prot() Use more meaningful and sensible naming phys_addr instead addr in ioremap_prot(). Suggested-by: Andrew Morton Reviewed-by: Anshuman Khandual Signed-off-by: Kefeng Wang Reviewed-by: Baoquan He Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220610092255.32445-1-wangkefeng.wang@huawei.com Signed-off-by: Will Deacon include/asm-generic/io.h | 3 ++- mm/ioremap.c | 14 ++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) commit d803336abdbc1bfacdb32b2cf9f4fdbee072b8ee Author: Kefeng Wang Date: Tue Jun 7 20:50:22 2022 +0800 ARM: mm: kill unused runtime hook arch_iounmap() Since the following commits, v5.4 commit 59d3ae9a5bf6 ("ARM: remove Intel iop33x and iop13xx support") v5.11 commit 3e3f354bc383 ("ARM: remove ebsa110 platform") The runtime hook arch_iounmap() on ARM is useless, kill arch_iounmap() and __iounmap(). Cc: Russell King Reviewed-by: Christoph Hellwig Reviewed-by: Arnd Bergmann Signed-off-by: Kefeng Wang Reviewed-by: Russell King (Oracle) Reported-by: kernel test robot Link: https://lore.kernel.org/r/20220607125027.44946-2-wangkefeng.wang@huawei.com Signed-off-by: Will Deacon arch/arm/include/asm/io.h | 4 +--- arch/arm/mm/ioremap.c | 9 +-------- arch/arm/mm/nommu.c | 9 +-------- 3 files changed, 3 insertions(+), 19 deletions(-) commit 0fcae3c8b1b32d79cb4bbf841023757358fb0413 Author: Eric Dumazet Date: Sat Jun 25 06:47:22 2022 +0000 ipmr: fix a lockdep splat in ipmr_rtm_dumplink() vif_dev_read() should be used from RCU protected sections only. ipmr_rtm_dumplink() is holding RTNL, so the data structures can not be changed. syzbot reported: net/ipv4/ipmr.c:84 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by syz-executor.4/3068: stack backtrace: CPU: 1 PID: 3068 Comm: syz-executor.4 Not tainted 5.19.0-rc3-syzkaller-00565-g5d04b0b634bb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 vif_dev_read net/ipv4/ipmr.c:84 [inline] vif_dev_read net/ipv4/ipmr.c:82 [inline] ipmr_fill_vif net/ipv4/ipmr.c:2756 [inline] ipmr_rtm_dumplink+0x1343/0x18c0 net/ipv4/ipmr.c:2866 netlink_dump+0x541/0xc20 net/netlink/af_netlink.c:2275 __netlink_dump_start+0x647/0x900 net/netlink/af_netlink.c:2380 netlink_dump_start include/linux/netlink.h:245 [inline] rtnetlink_rcv_msg+0x73e/0xc90 net/core/rtnetlink.c:6046 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2501 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x543/0x7f0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x917/0xe10 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:734 ____sys_sendmsg+0x334/0x810 net/socket.c:2489 ___sys_sendmsg+0xf3/0x170 net/socket.c:2543 __sys_sendmmsg+0x195/0x470 net/socket.c:2629 __do_sys_sendmmsg net/socket.c:2658 [inline] __se_sys_sendmmsg net/socket.c:2655 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2655 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7fefd8a89109 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fefd9ca6168 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007fefd8b9bf60 RCX: 00007fefd8a89109 RDX: 0000000004924b68 RSI: 0000000020000140 RDI: 0000000000000003 RBP: 00007fefd8ae305d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc346febaf R14: 00007fefd9ca6300 R15: 0000000000022000 Fixes: ebc3197963fc ("ipmr: add rcu protection over (struct vif_device)->dev") Reported-by: syzbot Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ipmr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb4a0c88ae3108209c6a7144ccd0b456856cf316 Author: Jilin Yuan Date: Sat Jun 25 14:32:40 2022 +0800 sfc:falcon: fix repeated words in comments Delete the redundant word 'in'. Signed-off-by: Jilin Yuan Signed-off-by: David S. Miller drivers/net/ethernet/sfc/falcon/bitfield.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 982a2b5ffdbb48a7a7d97918ce16f408526f706e Author: Jilin Yuan Date: Sat Jun 25 14:12:23 2022 +0800 sfc: fix repeated words in comments Delete the redundant word 'set'. Delete the redundant word 'a'. Delete the redundant word 'in'. Found the same error as before. Signed-off-by: Jilin Yuan Signed-off-by: David S. Miller drivers/net/ethernet/sfc/mcdi_pcol.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6deb209dc6b0952a460da17ee61223ee3b3429d5 Author: Subash Abhinov Kasiviswanathan Date: Fri Jun 24 15:34:25 2022 -0600 net: Print hashed skb addresses for all net and qdisc events The following commits added support for printing the real address- 65875073eddd ("net: use %px to print skb address in trace_netif_receive_skb") 70713dddf3d2 ("net_sched: introduce tracepoint trace_qdisc_enqueue()") 851f36e40962 ("net_sched: use %px to print skb address in trace_qdisc_dequeue()") However, tracing the packet traversal shows a mix of hashes and real addresses. Pasting a sample trace for reference- ping-14249 [002] ..... 3424.046612: netif_rx_entry: dev=lo napi_id=0x3 queue_mapping=0 skbaddr=00000000dcbed83e vlan_tagged=0 vlan_proto=0x0000 vlan_tci=0x0000 protocol=0x0800 ip_summed=0 hash=0x00000000 l4_hash=0 len=84 data_len=0 truesize=768 mac_header_valid=1 mac_header=-14 nr_frags=0 gso_size=0 gso_type=0x0 ping-14249 [002] ..... 3424.046615: netif_rx: dev=lo skbaddr=ffffff888e5d1000 len=84 Switch the trace print formats to %p for all the events to have a consistent format of printing the hashed addresses in all cases. Signed-off-by: Sean Tranchetti Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller include/trace/events/net.h | 2 +- include/trace/events/qdisc.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 6db372de959ac68b261cdbc2dd3c315f256c6d74 Author: Mark Brown Date: Mon Jun 20 16:21:50 2022 +0100 ARM: dts: am33xx: Map baseboard EEPROM on BeagleBone Black The identification EEPROM on the BeagleBone Black baseboard is supplied by VDD_3V3A which is supplied by LDO4 on the PMIC. Map this as per the DT binding for the EEPROM. Since this supply is always-on this has no practical impact but it does silence a warning at boot due to using a dummy regulator. Signed-off-by: Mark Brown Message-Id: <20220620152150.708664-1-broonie@kernel.org> Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-boneblack.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 9dd094ee142b8dfd649df2d43c71a2ac7536b9ea Merge: c83bc86a0596 c3d396120d68 Author: David S. Miller Date: Mon Jun 27 11:47:18 2022 +0100 Merge tag 'linux-can-next-for-5.20-20220625' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2022-06-25 this is a pull request of 22 patches for net-next/master. The first 2 patches target the xilinx driver. Srinivas Neeli's patch adds Transmitter Delay Compensation (TDC) support, a patch by me fixes a typo. The next patch is by me and fixes a typo in the m_can driver. Another patch by me allows the configuration of fixed bit rates without need for do_set_bittiming callback. The following 7 patches are by Vincent Mailhol and refactor the can-dev module and Kbuild, de-inline the can_dropped_invalid_skb() function, which has grown over the time, and drop outgoing skbs if the controller is in listen only mode. Max Staudt's patch fixes a reference in the networking/can.rst documentation. Vincent Mailhol provides 2 patches with cleanups for the etas_es58x driver. Conor Dooley adds bindings for the mpfs-can to the PolarFire SoC dtsi. Another patch by me allows the configuration of fixed data bit rates without need for do_set_data_bittiming callback. The last 5 patches are by Frank Jungclaus. They prepare the esd_usb driver to add support for the the CAN-USB/3 device in a later series. ==================== Signed-off-by: David S. Miller commit c83bc86a0596f88958a4279e2558e65c7332169a Merge: ebeae54d3a77 717a5c56deec Author: David S. Miller Date: Mon Jun 27 11:37:56 2022 +0100 Merge branch 'Renesas-rz-n1' Clément Léger says: ==================== net: add support for Renesas RZ/N1 ethernet su The Renesas RZ/N1 SoCs features an ethernet subsystem which contains (most notably) a switch, two GMACs, and a MII converter [1]. This series adds support for the switch and the MII converter. The MII converter present on this SoC has been represented as a PCS which sit between the MACs and the PHY. This PCS driver is probed from the device-tree since it requires to be configured. Indeed the MII converter also contains the registers that are handling the muxing of ports (Switch, MAC, HSR, RTOS, etc) internally to the SoC. The switch driver is based on DSA and exposes 4 ports + 1 CPU management port. It include basic bridging support as well as FDB and statistics support. Link: [1] https://www.renesas.com/us/en/document/mah/rzn1d-group-rzn1s-group-rzn1l-group-users-manual-r-engine-and-ethernet-peripherals ----- Changes in V9: - Cover letter: - Remove comment about RZN1 patches that are now in the master branch. - Commits: - Add Vladimir Oltean Reviewed-by - PCS: - Add "Depends on OF" for PCS_RZN1_MIIC due to error found by intel kernel test robot . - Check return value of of_property_read_u32() for "renesas,miic-switch-portin" property before setting conf. - Return miic_parse_dt() return value in miic_probe() on error - Switch: - Add "Depends on OF" for NET_DSA_RZN1_A5PSW due to errors found by intel kernel test robot . - DT: - Add spaces between switch port and '{' ==================== Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 717a5c56deec2e0021df40080db75bcb86a74b77 Author: Clément Léger Date: Fri Jun 24 16:40:01 2022 +0200 MAINTAINERS: add Renesas RZ/N1 switch related driver entry After contributing the drivers, volunteer for maintenance and add myself as the maintainer for Renesas RZ/N1 switch related drivers. Signed-off-by: Clément Léger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller MAINTAINERS | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 9aab31d66ec97d7047e42feacc356bc9c21a5bf5 Author: Clément Léger Date: Fri Jun 24 16:40:00 2022 +0200 ARM: dts: r9a06g032-rzn1d400-db: add switch description Add description for the switch, GMAC2 and MII converter. With these definitions, the switch port 0 and 1 (MII port 5 and 4) are working on RZ/N1D-DB board. Signed-off-by: Clément Léger Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller arch/arm/boot/dts/r9a06g032-rzn1d400-db.dts | 117 ++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) commit cf9695d8a7e927f7563ce6ea0a4e54b8214a12f1 Author: Clément Léger Date: Fri Jun 24 16:39:59 2022 +0200 ARM: dts: r9a06g032: describe switch Add description of the switch that is present on the RZ/N1 SoC. This description includes ethernet-ports description for all the ports that are present on the switch along with their connection to the MII converter ports and to the GMAC for the CPU port. Signed-off-by: Clément Léger Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller arch/arm/boot/dts/r9a06g032.dtsi | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 3f5261f1c2a8d7b178f9f65c6dda92523329486e Author: Clément Léger Date: Fri Jun 24 16:39:58 2022 +0200 ARM: dts: r9a06g032: describe GMAC2 RZ/N1 SoC includes two MAC named GMACx that are compatible with the "snps,dwmac" driver. GMAC1 is connected directly to the MII converter port 1. GMAC2 however can be used as the MAC for the switch CPU management port or can be muxed to be connected directly to the MII converter port 2. This commit add description for the GMAC2 which will be used by the switch description. Signed-off-by: Clément Léger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller arch/arm/boot/dts/r9a06g032.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 066c3bd358355185d9313358281fe03113c0a9ad Author: Clément Léger Date: Fri Jun 24 16:39:57 2022 +0200 ARM: dts: r9a06g032: describe MII converter Add the MII converter node which describes the MII converter that is present on the RZ/N1 SoC. Signed-off-by: Clément Léger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller arch/arm/boot/dts/r9a06g032.dtsi | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit d7cc14bc98029ed7de422f5ea465b4b1e3397a82 Author: Clément Léger Date: Fri Jun 24 16:39:56 2022 +0200 dt-bindings: net: snps,dwmac: add "renesas,rzn1" compatible Add "renesas,rzn1-gmac" and "renesas,r9a06g032-gmac" compatible strings. Signed-off-by: Clément Léger Acked-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/snps,dwmac.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 955fe312a9d2325267860eaea4f22dd2b0a472c9 Author: Clément Léger Date: Fri Jun 24 16:39:55 2022 +0200 dt-bindings: net: snps,dwmac: add "power-domains" property Since the stmmac driver already uses pm_runtime*() functions, describe "power-domains" property in the binding. Reported-by: Geert Uytterhoeven Signed-off-by: Clément Léger Acked-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/snps,dwmac.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 5edf246c686986e0e19fa839b5f52bc51ccb51fd Author: Clément Léger Date: Fri Jun 24 16:39:54 2022 +0200 net: dsa: rzn1-a5psw: add FDB support This commits add forwarding database support to the driver. It implements fdb_add(), fdb_del() and fdb_dump(). Signed-off-by: Clément Léger Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/rzn1_a5psw.c | 168 +++++++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/rzn1_a5psw.h | 17 +++++ 2 files changed, 185 insertions(+) commit c7243fd4a62f2f891811d3d1cd4f9e8e93acd41c Author: Clément Léger Date: Fri Jun 24 16:39:53 2022 +0200 net: dsa: rzn1-a5psw: add statistics support Add statistics support to the rzn1-a5psw driver by implementing the following dsa_switch_ops callbacks: - get_sset_count() - get_strings() - get_ethtool_stats() - get_eth_mac_stats() - get_eth_ctrl_stats() - get_rmon_stats() Signed-off-by: Clément Léger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/rzn1_a5psw.c | 174 +++++++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/rzn1_a5psw.h | 46 ++++++++++++ 2 files changed, 220 insertions(+) commit 888cdb892b61d7a77ac07a73c388bd237933b8f8 Author: Clément Léger Date: Fri Jun 24 16:39:52 2022 +0200 net: dsa: rzn1-a5psw: add Renesas RZ/N1 advanced 5 port switch driver Add Renesas RZ/N1 advanced 5 port switch driver. This switch handles 5 ports including 1 CPU management port. A MDIO bus is also exposed by this switch and allows to communicate with PHYs connected to the ports. Each switch port (except for the CPU management ports) is connected to the MII converter. This driver includes basic bridging support, more support will be added later (vlan, etc). Suggested-by: Jean-Pierre Geslin Suggested-by: Phil Edworthy Signed-off-by: Clément Léger Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/Kconfig | 9 + drivers/net/dsa/Makefile | 1 + drivers/net/dsa/rzn1_a5psw.c | 720 +++++++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/rzn1_a5psw.h | 196 ++++++++++++ 4 files changed, 926 insertions(+) commit 8956e96c1d4d46c58dd10f7da1a20da66f96ef48 Author: Clément Léger Date: Fri Jun 24 16:39:51 2022 +0200 dt-bindings: net: dsa: add bindings for Renesas RZ/N1 Advanced 5 port switch Add bindings for Renesas RZ/N1 Advanced 5 port switch. This switch is present on Renesas RZ/N1 SoC and was probably provided by MoreThanIP. This company does not exists anymore and has been bought by Synopsys. Since this IP can't be find anymore in the Synospsy portfolio, lets use Renesas as the vendor compatible for this IP. Signed-off-by: Clément Léger Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller .../bindings/net/dsa/renesas,rzn1-a5psw.yaml | 134 +++++++++++++++++++++ 1 file changed, 134 insertions(+) commit 7dc54d3b8d9100c65b0860f76342fc9f3b4694d9 Author: Clément Léger Date: Fri Jun 24 16:39:50 2022 +0200 net: pcs: add Renesas MII converter driver Add a PCS driver for the MII converter that is present on the Renesas RZ/N1 SoC. This MII converter is reponsible for converting MII to RMII/RGMII or act as a MII pass-trough. Exposing it as a PCS allows to reuse it in both the switch driver and the stmmac driver. Currently, this driver only allows the PCS to be used by the dual Cortex-A7 subsystem since the register locking system is not used. Signed-off-by: Clément Léger Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/pcs/Kconfig | 8 + drivers/net/pcs/Makefile | 1 + drivers/net/pcs/pcs-rzn1-miic.c | 520 ++++++++++++++++++++++++++++++++++++++++ include/linux/pcs-rzn1-miic.h | 18 ++ 4 files changed, 547 insertions(+) commit c823c2bf91568f3e473479e25dcc225a5be4b7b1 Author: Clément Léger Date: Fri Jun 24 16:39:49 2022 +0200 dt-bindings: net: pcs: add bindings for Renesas RZ/N1 MII converter This MII converter can be found on the RZ/N1 processor family. The MII converter ports are declared as subnodes which are then referenced by users of the PCS driver such as the switch. Signed-off-by: Clément Léger Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller .../bindings/net/pcs/renesas,rzn1-miic.yaml | 171 +++++++++++++++++++++ include/dt-bindings/net/pcs-rzn1-miic.h | 33 ++++ 2 files changed, 204 insertions(+) commit a08d6a6dc82036cbd889fe3d53f9c69dc13436eb Author: Clément Léger Date: Fri Jun 24 16:39:48 2022 +0200 net: dsa: add Renesas RZ/N1 switch tag driver The switch that is present on the Renesas RZ/N1 SoC uses a specific VLAN value followed by 6 bytes which contains forwarding configuration. Signed-off-by: Clément Léger Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 2 + include/uapi/linux/if_ether.h | 1 + net/dsa/Kconfig | 7 +++ net/dsa/Makefile | 1 + net/dsa/tag_rzn1_a5psw.c | 113 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 124 insertions(+) commit 67f38b1c7324a13113e23f7177b1f1c223da3f55 Author: Clément Léger Date: Fri Jun 24 16:39:47 2022 +0200 net: dsa: add support for ethtool get_rmon_stats() Add support to allow dsa drivers to specify the .get_rmon_stats() operation. Signed-off-by: Clément Léger Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 3 +++ net/dsa/slave.c | 13 +++++++++++++ 2 files changed, 16 insertions(+) commit 1c6e8088d9a74674b4017f8d2090ca9a314954b7 Author: Clément Léger Date: Fri Jun 24 16:39:46 2022 +0200 net: dsa: allow port_bridge_join() to override extack message Some drivers might report that they are unable to bridge ports by returning -EOPNOTSUPP, but still wants to override extack message. In order to do so, in dsa_slave_changeupper(), if port_bridge_join() returns -EOPNOTSUPP, check if extack message is set and if so, do not override it. Signed-off-by: Clément Léger Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e500405dd15d956790859fa532c64d8186445372 Author: Chen Jun Date: Mon May 16 13:16:01 2022 +0000 perf: hisi: Extract hisi_pmu_init Extract the initialization code of hisi_pmu->pmu into a function Signed-off-by: Chen Jun Link: https://lore.kernel.org/r/20220516131601.48383-1-chenjun102@huawei.com Signed-off-by: Will Deacon drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 16 +--------------- drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 16 +--------------- drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 16 +--------------- drivers/perf/hisilicon/hisi_uncore_pa_pmu.c | 16 +--------------- drivers/perf/hisilicon/hisi_uncore_pmu.c | 18 ++++++++++++++++++ drivers/perf/hisilicon/hisi_uncore_pmu.h | 2 ++ drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c | 15 +-------------- 7 files changed, 25 insertions(+), 74 deletions(-) commit 77d4ac6d38487c2ab2688335b2a904469f5b16a4 Author: Michael Walle Date: Mon Apr 18 13:26:50 2022 +0200 mtd: spi-nor: move SECT_4K_PMC special handling The SECT_4K_PMC flag will set a device specific opcode for the 4k sector erase. Instead of handling it in the core, we can move it to a late_init(). In that late init, loop over all erase types, look for the 4k size and replace the opcode. Signed-off-by: Michael Walle Signed-off-by: Pratyush Yadav Link: https://lore.kernel.org/r/20220418112650.2791459-1-michael@walle.cc drivers/mtd/spi-nor/core.c | 7 +------ drivers/mtd/spi-nor/core.h | 2 -- drivers/mtd/spi-nor/issi.c | 23 +++++++++++++++++++++-- 3 files changed, 22 insertions(+), 10 deletions(-) commit 82a592c13b0aeff94d84d54183dae0b26384c95f Author: Madhavan T. Venkataraman Date: Fri Jun 17 13:02:15 2022 -0500 arm64: Copy the task argument to unwind_state Copy the task argument passed to arch_stack_walk() to unwind_state so that it can be passed to unwind functions via unwind_state rather than as a separate argument. The task is a fundamental part of the unwind state. Signed-off-by: Madhavan T. Venkataraman Reviewed-by: Mark Brown Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20220617180219.20352-3-madvenka@linux.microsoft.com Signed-off-by: Will Deacon arch/arm64/kernel/stacktrace.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) commit a019d8a2cc82a95880677fb0ec16d1d4e8647df7 Author: Madhavan T. Venkataraman Date: Fri Jun 17 13:02:14 2022 -0500 arm64: Split unwind_init() unwind_init() is currently a single function that initializes all of the unwind state. Split it into the following functions and call them appropriately: - unwind_init_from_regs() - initialize from regs passed by caller. - unwind_init_from_caller() - initialize for the current task from the caller of arch_stack_walk(). - unwind_init_from_task() - initialize from the saved state of a task other than the current task. In this case, the other task must not be running. This is done for two reasons: - the different ways of initializing are clear - specialized code can be added to each initializer in the future. Signed-off-by: Madhavan T. Venkataraman Reviewed-by: Mark Brown Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20220617180219.20352-2-madvenka@linux.microsoft.com Signed-off-by: Will Deacon arch/arm64/kernel/stacktrace.c | 66 +++++++++++++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 11 deletions(-) commit df07443f477a7ebd36c2f21705419979b9865c9f Author: Mark Brown Date: Fri Jun 24 18:21:08 2022 +0100 arm64/signal: Clean up SVE/SME feature checking inconsistency Currently when restoring signal state we check to see if SVE is supported in restore_sigframe() but check to see if SVE is supported inside restore_sve_fpsimd_context(). This makes no real difference since SVE is always supported in systems with SME but looks a bit untidy and makes things slightly harder to follow, move the SVE check next to the SME one in restore_sve_fpsimd_context(). Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220624172108.555000-1-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/signal.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 61a2cc093bdcb96cd3e3ed2082c3c30e3795d87e Author: Linus Walleij Date: Mon Jun 27 11:20:46 2022 +0200 pinctrl: qcom: sc7280: Fix compile bug The idea was right but the code was breaking in next. I assume some unstaged commit was involed. Fix it up. Cc: Srinivasa Rao Mandadapu Cc: Stephen Boyd Fixes: 36fe26843d6d ("pinctrl: qcom: sc7280: Add clock optional check for ADSP bypass targets") Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 016a14beac6d407c9a51f0b92d1e586a00bfc345 Author: Thomas Zimmermann Date: Fri Jun 17 12:32:26 2022 +0200 drm/ast: Enable primary plane with CRTC As the CRTC requires a primary plane for display, ensure that the primary plane is enabled with the CRTC. Use drm_atomic_helper_check_crtc_state(). Add all affected planes to the atomic state so that their state will be checked as well. Signed-off-by: Thomas Zimmermann Acked-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220617103226.25617-4-tzimmermann@suse.de drivers/gpu/drm/ast/ast_mode.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit dc2cdd17d1fe25c8d25c306a90cfc9ff17a7ca4f Author: Thomas Zimmermann Date: Fri Jun 17 12:32:25 2022 +0200 drm/simple-kms: Use drm_atomic_helper_check_crtc_state() Simple-KMS helpers guarantee that the CRTC and plane enable flags are synchronized. Implement this with atomic helpers drm_atomic_helper_check_crtc_state() on the CRTC side, and drm_atomic_helper_check_plane_state() on the plane side. Signed-off-by: Thomas Zimmermann Acked-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220617103226.25617-3-tzimmermann@suse.de drivers/gpu/drm/drm_simple_kms_helper.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit d6b9af1097fefa7e6509a4b2f03af45f9eaddae9 Author: Thomas Zimmermann Date: Fri Jun 17 12:32:24 2022 +0200 drm/atomic-helper: Add helper drm_atomic_helper_check_crtc_state() Add drm_atomic_helper_check_crtc_state(), which contains tests common to many CRTCs. The first added test verifies that an enabled CRTC has at least one enabled primary plane. Signed-off-by: Thomas Zimmermann Acked-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220617103226.25617-2-tzimmermann@suse.de drivers/gpu/drm/drm_atomic_helper.c | 55 +++++++++++++++++++++++++++++++++++++ include/drm/drm_atomic_helper.h | 2 ++ 2 files changed, 57 insertions(+) commit ae25885bdf59fde40726863c57fd20e4a0642183 Author: Thomas Zimmermann Date: Tue Jun 21 12:46:17 2022 +0200 drm/fb-helper: Fix out-of-bounds access Clip memory range to screen-buffer size to avoid out-of-bounds access in fbdev deferred I/O's damage handling. Fbdev's deferred I/O can only track pages. From the range of pages, the damage handler computes the clipping rectangle for the display update. If the fbdev screen buffer ends near the beginning of a page, that page could contain more scanlines. The damage handler would then track these non-existing scanlines as dirty and provoke an out-of-bounds access during the screen update. Hence, clip the maximum memory range to the size of the screen buffer. While at it, rename the variables min/max to min_off/max_off in drm_fb_helper_deferred_io(). This avoids confusion with the macros of the same name. Reported-by: Nuno Gonçalves Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Tested-by: Nuno Gonçalves Fixes: 67b723f5b742 ("drm/fb-helper: Calculate damaged area in separate helper") Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: # v5.18+ Link: https://patchwork.freedesktop.org/patch/msgid/20220621104617.8817-1-tzimmermann@suse.de drivers/gpu/drm/drm_fb_helper.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit d173780620792c725506b0f3c5ec52c7fbac1db0 Author: Alex Williamson Date: Wed Jun 22 16:01:34 2022 +0200 vfio/pci: Remove console drivers Console drivers can create conflicts with PCI resources resulting in userspace getting mmap failures to memory BARs. This is especially evident when trying to re-use the system primary console for userspace drivers. Use the aperture helpers to remove these conflicts. v3: * call aperture_remove_conflicting_pci_devices() Reported-by: Laszlo Ersek Suggested-by: Gerd Hoffmann Signed-off-by: Alex Williamson Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Tested-by: Laszlo Ersek Link: https://patchwork.freedesktop.org/patch/msgid/20220622140134.12763-4-tzimmermann@suse.de drivers/vfio/pci/vfio_pci_core.c | 5 +++++ 1 file changed, 5 insertions(+) commit d75cd55ae2dedeee5382bb48832c322673b9781c Author: Lin Feng Date: Tue Jun 21 17:23:58 2022 +0800 cgroup.c: remove redundant check for mixable cgroup in cgroup_migrate_vet_dst We have: int cgroup_migrate_vet_dst(struct cgroup *dst_cgrp) { ... /* mixables don't care */ if (cgroup_is_mixable(dst_cgrp)) return 0; /* * If @dst_cgrp is already or can become a thread root or is * threaded, it doesn't matter. */ if (cgroup_can_be_thread_root(dst_cgrp) || cgroup_is_threaded(dst_cgrp)) return 0; ... } but in fact the entry of cgroup_can_be_thread_root() covers case that checking cgroup_is_mixable() as following: static bool cgroup_can_be_thread_root(struct cgroup *cgrp) { /* mixables don't care */ if (cgroup_is_mixable(cgrp)) return true; ... } so explicitly checking in cgroup_migrate_vet_dst is unnecessary. Signed-off-by: Lin Feng Reviewed-by: Michal Koutný Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 4 ---- 1 file changed, 4 deletions(-) commit 7283f862bd991c8657e9bf1c02db772fcf018f13 Author: Thomas Zimmermann Date: Wed Jun 22 16:01:33 2022 +0200 drm: Implement DRM aperture helpers under video/ Implement DRM's aperture helpers under video/ for sharing with other sub-systems. Remove DRM-isms from the interface. The helpers track the ownership of framebuffer apertures and provide hand-over from firmware, such as EFI and VESA, to native graphics drivers. Other subsystems, such as fbdev and vfio, also have to maintain ownership of framebuffer apertures. Moving DRM's aperture helpers to a more public location allows all subsystems to interact with each other and share a common implementation. The aperture helpers are selected by the various firmware drivers within DRM and fbdev, and the VGA text-console driver. The original DRM interface is kept in place for use by DRM drivers. v3: * prefix all interfaces with aperture_ (Javier) * rework and simplify documentation (Javier) * rename struct dev_aperture to struct aperture_range * rebase onto latest DRM * update MAINTAINERS entry Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Tested-by: Laszlo Ersek Link: https://patchwork.freedesktop.org/patch/msgid/20220622140134.12763-3-tzimmermann@suse.de Documentation/driver-api/aperture.rst | 13 ++ Documentation/driver-api/index.rst | 1 + MAINTAINERS | 2 + drivers/gpu/drm/drm_aperture.c | 178 +---------------- drivers/gpu/drm/tiny/Kconfig | 1 + drivers/video/Kconfig | 6 + drivers/video/Makefile | 2 + drivers/video/aperture.c | 351 ++++++++++++++++++++++++++++++++++ drivers/video/console/Kconfig | 1 + drivers/video/fbdev/Kconfig | 7 +- include/linux/aperture.h | 56 ++++++ 11 files changed, 448 insertions(+), 170 deletions(-) commit efc8f3229f846ea6e6d96ffc336b3db8837eae56 Author: Thomas Zimmermann Date: Wed Jun 22 16:01:32 2022 +0200 MAINTAINERS: Broaden scope of simpledrm entry There will be more DRM drivers for firmware-provided framebuffers. Use the existing entry for simpledrm instead of adding a new one for each driver. Also add DRM's aperture helpers, which are part of the driver's infrastructure. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20220622140134.12763-2-tzimmermann@suse.de MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6a82ef85c4a4de42214e0c5a79242d54436541c3 Author: Krzysztof Kozlowski Date: Sun Jun 26 14:03:41 2022 +0200 ARM: dts: s5pv210: align SDHCI node name with dtschema The node names should be generic and DT schema expects "mmc". Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20220626120342.38851-5-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/s5pv210.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1b90ddb9d942bc75d468758fd2ad632137e733cf Author: Krzysztof Kozlowski Date: Sun Jun 26 14:03:40 2022 +0200 ARM: dts: s3c64xx: align SDHCI node name with dtschema The node names should be generic and DT schema expects "mmc". Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20220626120342.38851-4-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/s3c64xx.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1923e58045471c7226eeab34762e2f821c2c31b7 Author: Krzysztof Kozlowski Date: Sun Jun 26 14:03:39 2022 +0200 ARM: dts: s3c24xx: align SDHCI node name with dtschema The node names should be generic and DT schema expects "mmc". Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20220626120342.38851-3-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/s3c2416.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c805b77caba9e49d43321112f272508d2b1acd25 Author: Krzysztof Kozlowski Date: Sun Jun 26 14:03:38 2022 +0200 ARM: dts: exynos: align SDHCI node name with dtschema The node names should be generic and DT schema expects "mmc". Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20220626120342.38851-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/exynos4.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 592feeea113553be142680a25a9c0850daae3567 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:33 2022 -0700 ARM: dts: at91: drop unneeded status from gpio-keys Nodes do not need explicit status=okay. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220616005333.18491-40-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/at91-sam9x60ek.dts | 1 - arch/arm/boot/dts/at91-sama5d27_wlsom1_ek.dts | 1 - arch/arm/boot/dts/at91-sama5d2_icp.dts | 1 - 3 files changed, 3 deletions(-) commit fa8cc83a3bffaa868b789a424d5573b7901edd7c Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:32 2022 -0700 ARM: dts: at91: correct gpio-keys properties gpio-keys children do not use unit addresses. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220616005333.18491-39-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/at91-kizbox.dts | 2 -- arch/arm/boot/dts/at91-kizbox2-common.dtsi | 2 -- arch/arm/boot/dts/at91-kizboxmini-common.dtsi | 2 -- arch/arm/boot/dts/at91-qil_a9260.dts | 2 -- arch/arm/boot/dts/at91-wb45n.dts | 5 +---- arch/arm/boot/dts/at91-wb50n.dts | 8 ++------ 6 files changed, 3 insertions(+), 18 deletions(-) commit 17413b15ed9398e5d7f01f0da0da6043bb8392c7 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:31 2022 -0700 ARM: dts: at91: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220616005333.18491-38-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/at91-foxg20.dts | 4 ++-- arch/arm/boot/dts/at91-gatwick.dts | 2 +- arch/arm/boot/dts/at91-kizbox.dts | 6 +++--- arch/arm/boot/dts/at91-kizbox2-common.dtsi | 8 ++++---- arch/arm/boot/dts/at91-kizbox3-hs.dts | 12 ++++++------ arch/arm/boot/dts/at91-kizboxmini-common.dtsi | 4 ++-- arch/arm/boot/dts/at91-nattis-2-natte-2.dts | 2 +- arch/arm/boot/dts/at91-qil_a9260.dts | 2 +- arch/arm/boot/dts/at91-sam9x60ek.dts | 4 ++-- arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 4 ++-- arch/arm/boot/dts/at91-sama5d27_wlsom1_ek.dts | 4 ++-- arch/arm/boot/dts/at91-sama5d2_icp.dts | 4 ++-- arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 4 ++-- arch/arm/boot/dts/at91-sama5d2_xplained.dts | 4 ++-- arch/arm/boot/dts/at91-sama5d3_xplained.dts | 4 ++-- arch/arm/boot/dts/at91-sama5d4_xplained.dts | 4 ++-- arch/arm/boot/dts/at91-sama5d4ek.dts | 4 ++-- arch/arm/boot/dts/at91-sama7g5ek.dts | 4 ++-- arch/arm/boot/dts/at91-wb45n.dts | 2 +- arch/arm/boot/dts/at91-wb50n.dts | 2 +- arch/arm/boot/dts/at91sam9260ek.dts | 6 +++--- arch/arm/boot/dts/at91sam9261ek.dts | 10 +++++----- arch/arm/boot/dts/at91sam9263ek.dts | 6 +++--- arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 6 +++--- arch/arm/boot/dts/at91sam9g25-gardena-smart-gateway.dts | 2 +- arch/arm/boot/dts/at91sam9m10g45ek.dts | 16 ++++++++-------- arch/arm/boot/dts/at91sam9n12ek.dts | 4 ++-- arch/arm/boot/dts/at91sam9rlek.dts | 6 +++--- 28 files changed, 70 insertions(+), 70 deletions(-) commit 54ab5f367142577b8280f5b03eeb36616980cd68 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:26 2022 -0700 ARM: dts: omap: correct gpio-keys properties gpio-keys children do not use unit addresses. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-33-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/am335x-evm.dts | 2 -- arch/arm/boot/dts/am335x-guardian.dts | 2 -- arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi | 4 +--- arch/arm/boot/dts/am335x-moxa-uc-8100-common.dtsi | 4 +--- arch/arm/boot/dts/am335x-pcm-953.dtsi | 4 ++-- arch/arm/boot/dts/am335x-pepper.dts | 8 +++----- arch/arm/boot/dts/am437x-idk-evm.dts | 4 +--- 7 files changed, 8 insertions(+), 20 deletions(-) commit b1c9af5fec442b164849dc6802ec3bdb4b0c4768 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:25 2022 -0700 ARM: dts: omap: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-32-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/am335x-evm.dts | 6 +++--- arch/arm/boot/dts/am335x-shc.dts | 6 +++--- arch/arm/boot/dts/am3517-evm-ui.dtsi | 20 ++++++++++---------- arch/arm/boot/dts/am3517-evm.dts | 18 +++++++++--------- arch/arm/boot/dts/am437x-idk-evm.dts | 2 +- 5 files changed, 26 insertions(+), 26 deletions(-) commit 2b090180dced85ccf27f276c1b6c9521d4c4120e Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:05 2022 -0700 arm64: dts: marvell: armada-3720: align lednode names with dtschema The node names should be generic and DT schema expects certain pattern with 'led'. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-12-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebb8ba54950a1c6382647e573ab597e2b7b4af1b Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:04 2022 -0700 arm64: dts: marvell: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-11-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | 2 +- arch/arm64/boot/dts/marvell/armada-8040-clearfog-gt-8k.dts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 8b0848f57769ae9ee4b8104a5ba7c7ee98d1fd35 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:07 2022 -0700 ARM: dts: marvell: correct gpio-keys properties gpio-keys children do not use unit addresses. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-14-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/armada-370-rd.dts | 2 -- arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi | 2 -- arch/arm/boot/dts/armada-370-seagate-personal-cloud.dtsi | 2 -- arch/arm/boot/dts/armada-xp-axpwifiap.dts | 2 -- arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 2 -- arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 2 -- 6 files changed, 12 deletions(-) commit 41340053cc72180e9095ca02418a5ab80794983c Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:06 2022 -0700 ARM: dts: marvell: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-13-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/armada-370-c200-v2.dts | 8 ++++---- arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi | 6 +++--- arch/arm/boot/dts/armada-370-seagate-personal-cloud.dtsi | 6 +++--- arch/arm/boot/dts/armada-381-netgear-gs110emx.dts | 2 +- arch/arm/boot/dts/armada-385-clearfog-gtr.dtsi | 4 ++-- arch/arm/boot/dts/armada-385-linksys.dtsi | 4 ++-- arch/arm/boot/dts/armada-388-clearfog-base.dts | 2 +- arch/arm/boot/dts/armada-388-clearfog.dts | 2 +- arch/arm/boot/dts/armada-xp-axpwifiap.dts | 4 ++-- arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 6 +++--- arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 4 ++-- 11 files changed, 24 insertions(+), 24 deletions(-) commit eef3af89b6b66ad61df636464ce92f5deabbc4a4 Author: Krzysztof Kozlowski Date: Thu May 26 22:40:44 2022 +0200 ARM: dts: omap: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526204044.831656-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/omap2420-h4.dts | 2 +- arch/arm/boot/dts/omap3-evm-37xx.dts | 2 +- arch/arm/boot/dts/omap3-evm.dts | 2 +- arch/arm/boot/dts/omap3-gta04.dtsi | 2 +- arch/arm/boot/dts/omap3-igep.dtsi | 2 +- arch/arm/boot/dts/omap3-ldp.dts | 6 +++--- arch/arm/boot/dts/omap3-lilly-a83x.dtsi | 2 +- arch/arm/boot/dts/omap3-n900.dts | 4 ++-- arch/arm/boot/dts/omap3-n950-n9.dtsi | 4 ++-- arch/arm/boot/dts/omap3-overo-base.dtsi | 2 +- arch/arm/boot/dts/omap3-pandora-common.dtsi | 2 +- arch/arm/boot/dts/omap3430-sdp.dts | 6 +++--- arch/arm/boot/dts/omap5-l4.dtsi | 2 +- 13 files changed, 19 insertions(+), 19 deletions(-) commit ae25b445914a754a74133021d39fc51261493ac8 Author: Krzysztof Kozlowski Date: Thu May 26 22:41:37 2022 +0200 ARM: dts: ti: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526204139.831895-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/am335x-boneblack-wireless.dts | 2 +- arch/arm/boot/dts/am335x-boneblue.dts | 2 +- arch/arm/boot/dts/am335x-bonegreen-wireless.dts | 2 +- arch/arm/boot/dts/am335x-cm-t335.dts | 4 ++-- .../arm/boot/dts/am335x-sancloud-bbe-extended-wifi.dts | 2 +- arch/arm/boot/dts/am3517-evm-ui.dtsi | 6 +++--- arch/arm/boot/dts/am3874-iceboard.dts | 4 ++-- arch/arm/boot/dts/am437x-l4.dtsi | 2 +- arch/arm/boot/dts/da850-evm.dts | 18 +++++++++--------- arch/arm/boot/dts/da850.dtsi | 12 ++++++------ arch/arm/boot/dts/dm8148-evm.dts | 2 +- arch/arm/boot/dts/dm8168-evm.dts | 2 +- arch/arm/boot/dts/dra62x-j5eco-evm.dts | 2 +- arch/arm/boot/dts/dra76x.dtsi | 6 +++--- 14 files changed, 33 insertions(+), 33 deletions(-) commit d8e8aa866ed8636fd6c1017c3d9453eab2922496 Author: Hirokazu Honda Date: Wed Jun 22 09:36:24 2022 +0100 media: mediatek: vcodec: Report supported bitrate modes The media driver supports constant bitrate mode only. The supported rate control mode is reported through querymenu() and s_ctrl() fails if non constant bitrate mode (e.g. VBR) is requested. Signed-off-by: Hirokazu Honda Reviewed-by: Irui Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c2cc2aa1d06b9c06495380b7d332680a992531f0 Author: Jiang Jian Date: Tue Jun 21 17:30:30 2022 +0100 media: av7110: Remove duplicate 'with' in two places. file: ./drivers/staging/media/av7110/av7110.c line: 2367 * reset with with MASK_31 to MC1 changed to * reset with MASK_31 to MC1 Signed-off-by: Jiang Jian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/av7110/av7110.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4502aae07b3b84cb3f3da6444ff8a1d412f9c7e1 Author: Jiang Jian Date: Tue Jun 21 16:05:28 2022 +0100 media: saa7164: Remove duplicate 'on' in two places. file: drivers/media/pci/saa7164/saa7164-api.c line: 804 /* Assumption: Hauppauge eeprom is at 0xa0 on on bus 0 */ changed to /* Assumption: Hauppauge eeprom is at 0xa0 on bus 0 */ Signed-off-by: Jiang Jian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/saa7164/saa7164-api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 083f54a7c9c66496b9d9f3c50dfdca24e6aa7012 Author: Yunfei Dong Date: Fri Jun 17 08:25:21 2022 +0100 media: mediatek: vcodec: Fix non subdev architecture open power fail According to subdev_bitmap bit value to open hardware power, need to set subdev_bitmap value for non subdev architecture. Fixes: c05bada35f01 ("media: mtk-vcodec: Add to support multi hardware decode") Signed-off-by: Yunfei Dong Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 65c3e8e9c7a4ae62f1344d0744ca81f12c8d1212 Author: Jiang Jian Date: Tue Jun 21 07:55:02 2022 +0100 media: usb: gspca: aligned '*' each line Consider "*" alignment in comments Signed-off-by: Jiang Jian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/xirlink_cit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0b212ec9d8177d6f7c404315293f6a085d6ee42 Author: Miaoqian Lin Date: Tue Jun 21 06:30:30 2022 +0100 media: tw686x: Fix memory leak in tw686x_video_init video_device_alloc() allocates memory for vdev, when video_register_device() fails, it doesn't release the memory and leads to memory leak, call video_device_release() to fix this. Fixes: 704a84ccdbf1 ("[media] media: Support Intersil/Techwell TW686x-based video capture cards") Signed-off-by: Miaoqian Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw686x/tw686x-video.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5b304046a81eda221b5d06a9c62f7b5e45530fa5 Author: Jian Zhang Date: Mon Jun 20 09:34:23 2022 +0100 media: driver/nxp/imx-jpeg: fix a unexpected return value problem In function mxc_jpeg_probe(), when devm_clk_get() fail, the return value will be unexpected, and it should be the devm_clk_get's error code. Fixes: 4c2e5156d9fa6 ("media: imx-jpeg: Add pm-runtime support for imx-jpeg") Reported-by: Hulk Robot Signed-off-by: Jian Zhang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 2 ++ 1 file changed, 2 insertions(+) commit 2f7a7f941d770c03942fefe1d91ce954cb329c7e Merge: 3120910a099b 33c39140cc29 Author: Krzysztof Kozlowski Date: Mon Jun 27 10:19:57 2022 +0200 Merge branch 'for-v5.20/aspeed-dts-cleanup' into for-v5.20/dts-cleanup commit 3120910a099bcd8411ba92b7397fa9f4409278bd Author: Serge Semin Date: Fri Jun 24 17:16:20 2022 +0300 ARM: dts: stih407-family: 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 Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20220624141622.7149-5-Sergey.Semin@baikalelectronics.ru Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/stih407-family.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a340c85c4e2402776f291de21c04367a9d2fc4f7 Author: Yunfei Dong Date: Mon Jun 20 08:18:17 2022 +0100 media: MAINTAINERS: add Yunfei Dong as mediatek vcodec driver maintainer I have been working on mediatek driver development for a very long time, and sent many patches to change the driver architecture. Add myself as co-maintainer for mediatek vcodec driver. Signed-off-by: Yunfei Dong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit e13ca460e20ed42fe57a3845b0bb9a82f81f05cd Author: Chen-Yu Tsai Date: Mon Jun 20 07:33:49 2022 +0100 media: mediatek: vcodec: Skip SOURCE_CHANGE & EOS events for stateless The stateless decoder API does not specify the usage of SOURCE_CHANGE and EOF events. These events are used by stateful decoders to signal changes in the bitstream. They do not make sense for stateless decoders. Do not handle subscription for these two types of events for stateless decoder instances. This fixes the last v4l2-compliance error: Control ioctls: fail: v4l2-test-controls.cpp(946): have_source_change || have_eos test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL Fixes: 8cdc3794b2e3 ("media: mtk-vcodec: vdec: support stateless API") Signed-off-by: Chen-Yu Tsai Reviewed-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c | 5 +++++ 1 file changed, 5 insertions(+) commit 1ec32a4f1c694b5424f6fab1a977d3e556c539bf Author: Marek Vasut Date: Fri Jun 24 20:29:39 2022 +0200 soc: imx: imx8m-blk-ctrl: Make error prints useful Print the name of the power domain which failed to make the error prints actually useful for finding the error. Signed-off-by: Marek Vasut Cc: Alexander Stein Cc: Lucas Stach Cc: Martyn Welch Cc: Paul Elder Cc: Shawn Guo Acked-by: Alexander Stein Signed-off-by: Shawn Guo drivers/soc/imx/imx8m-blk-ctrl.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 978bbc392c51e0ece959978daa0ad7fb4dd7f932 Author: Christophe JAILLET Date: Mon Jun 20 06:31:53 2022 +0100 media: tw686x: Fix an error handling path in tw686x_probe() The commit in Fixes: is incomplete. It has moved some code in the probe but not all error handling paths have been updated. Now, if request_irq() fails, we must release some resources. Fixes: c8946454ed96 ("media: tw686x: Register the irq at the end of probe") Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw686x/tw686x-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e5833b56f75dbf70b8c446fc3b0b2c3814d50e67 Author: Marek Vasut Date: Sat Jun 18 23:23:54 2022 +0100 media: stm32: dcmi: Drop always NULL sd_state from dcmi_pipeline_s_fmt() The second argument is always NULL, stop passing it to the function. Signed-off-by: Marek Vasut Cc: Alain Volmat Cc: Alexandre Torgue Cc: Amelie DELAUNAY Cc: Hugues FRUCHET Cc: Laurent Pinchart Cc: Philippe CORNU Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/st/stm32/stm32-dcmi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 87ccc38e2f8e55853ddfe633d9934bc7ca74b21c Author: Serge Semin Date: Fri Jun 24 17:16:21 2022 +0300 arm64: dts: apm: 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 despite of the warning comment about possible backward compatibility issues. Signed-off-by: Serge Semin Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220624141622.7149-6-Sergey.Semin@baikalelectronics.ru Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/apm/apm-shadowcat.dtsi | 4 ++-- arch/arm64/boot/dts/apm/apm-storm.dtsi | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 90f8cb5154944dbe6f4dd630dc23f7ddbac624f6 Author: Marek Vasut Date: Sat Jun 18 23:23:17 2022 +0100 media: stm32: dcmi: Fill in remaining Bayer formats Fill in 10, 12, 14 bit Bayer formats into the DCMI driver. Those are useful e.g. when MT9P006 sensor is connected. Signed-off-by: Marek Vasut Cc: Alain Volmat Cc: Alexandre Torgue Cc: Amelie DELAUNAY Cc: Hugues FRUCHET Cc: Laurent Pinchart Cc: Philippe CORNU Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/st/stm32/stm32-dcmi.c | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 5171660cbb14f3359e8a8bf7523afb0789fe1bcd Author: Jocelyn Falempe Date: Wed Jun 22 14:48:15 2022 +0200 drm/ast: Fix black screen when getting out of suspend With an AST2600, the screen is garbage when going out of suspend. This is because color settings are lost, and not restored on resume. Force the color settings on DPMS_ON, to make sure the settings are correct. I didn't write this code, it comes from the out-of-tree aspeed driver v1.13 https://www.aspeedtech.com/support_driver/ Signed-off-by: Jocelyn Falempe Tested-by: Venkat Tadikonda Reviewed-by: Lyude Paul Acked-by: Thomas Zimmermann Tested-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220622124815.356035-1-jfalempe@redhat.com drivers/gpu/drm/ast/ast_mode.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit faddaa735c208560a3f419038e8d154a01b584e3 Author: Yunfei Dong Date: Sat Jun 18 08:29:29 2022 +0100 media: mediatek: vcodec: Initialize decoder parameters after getting dec_capability Need to get dec_capability from scp first, then initialize decoder supported format and other parameters according to dec_capability value. Fixes: fd00d90330d1 ("media: mtk-vcodec: vdec: move stateful ops into their own file") Signed-off-by: Yunfei Dong Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c | 2 -- drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit 3e52be9bc501e577e2d8429bc2337bd979d38887 Author: Zhang Zekun Date: Fri Jun 17 10:39:25 2022 +0100 media: rkvdec:Remove redundant memset As dma_alloc_coherent() will return a zeroed buffer, we don't need to memset the returned buffer. priv_tbl = dma_alloc_coherent() and count_tbl = dma_alloc_coherent() should be enough. -see commit 750afb08ca71 ("cross-tree: phase out dma_zalloc_coherent()") Signed-off-by: Zhang Zekun Reviewed-by: Dan Carpenter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/rkvdec/rkvdec-vp9.c | 2 -- 1 file changed, 2 deletions(-) commit aa63c5eaf7f7d2d3a4b1cc5782e7151b8ae3079f Author: Eugen Hristev Date: Thu Jun 16 15:42:59 2022 +0100 media: atmel: atmel-isc-base: allow wb ctrls to be changed when isc is not configured When attempting to change the white balance (WB) ctrls before starting streaming, e.g.: # v4l2-ctl -L User Controls .. blue_component_gain 0x009819c1 (int) : min=0 max=8191 step=1 default=512 value=512 flags=slider .. # v4l2-ctl --set-ctrl=blue_component_gain=500 # v4l2-ctl -L .. blue_component_gain 0x009819c1 (int) : min=0 max=8191 step=1 default=512 value=500 flags=slider .. These will not be written to the internal data struct and will not be written to the WB hardware module. Thus, after starting streaming, they will be reset to default: # v4l2-ctl -L .. blue_component_gain 0x009819c1 (int) : min=0 max=8191 step=1 default=512 value=512 flags=slider .. It does not make much sense to not be able to configure the WB controls at all times. Even if the sensor would not be RAW Bayer (and in this case the WB module is unavailable), the user could configure the ISC itself, as the ISC should not care about the sensor format. Thus, when WB module is available (if the sensor changes format e.g.) it will be already configured as be user's desires. In consequence, remove the check in isc_s_awb_ctrl that will return if ISC does not know the sensor format. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc-base.c | 4 ---- 1 file changed, 4 deletions(-) commit a157802359f7451ed8046b2b6dbaca187797e062 Author: Arnd Bergmann Date: Thu Jun 16 09:52:42 2022 +0100 media: sta2x11: remove VIRT_TO_BUS dependency This driver does not use the virt_to_bus() function, though it depends on x86 specific fixups in the swiotlb code, which was last rewritten in commit e380a0394c36 ("x86/PCI: sta2x11: use default DMA address translation"). It is possible that the driver still fails to build on some architectures that are missing CONFIG_VIRT_TO_BUS, but it is always set on x86 machines with the STA2X11 platform enabled. More likely though is that it was never meant to depend on CONFIG_VIRT_TO_BUS, and the Kconfig dependency was kept from an out-of-tree version when the driver was originally merged. Fixes: efeb98b4e2b2 ("[media] STA2X11 VIP: new V4L2 driver") Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/sta2x11/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5caaa47f55fa742f1a230e5b4258c139e223c74 Author: Justin Green Date: Wed Jun 15 16:38:27 2022 +0100 media: mediatek: vcodec: return EINVAL if plane is too small Modify vb2ops_vdec_buf_prepare to return EINVAL if the size of the plane is less than the size of the image. Currently we just log an error and return 0 anyway, which may cause a buffer overrun bug. Signed-off-by: Justin Green Suggested-by: Andres Calderon Jaramillo Reviewed-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c | 1 + 1 file changed, 1 insertion(+) commit d4de27a9b1eadd33a2e40de87a646d1bf5fef756 Author: Ming Qian Date: Wed Jun 15 04:19:20 2022 +0100 media: v4l2-mem2mem: prevent pollerr when last_buffer_dequeued is set If the last buffer was dequeued from the capture queue, signal userspace. DQBUF(CAPTURE) will return -EPIPE. But if output queue is empty and capture queue is empty, v4l2_m2m_poll_for_data will return EPOLLERR, This is very easy to happen in drain. When last_buffer_dequeued is set, we shouldn't return EPOLLERR, but return EPOLLIN | EPOLLRDNORM. Fixes: 1698a7f151126 ("media: v4l2-mem2mem: simplify poll logic") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-mem2mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae6847f26ac913c49b7a3af16ba6aabb2f2b26e6 Author: Teresa Remmet Date: Thu Jun 23 16:41:24 2022 +0200 arm64: dts: freescale: Add phyBOARD-Polis-i.MX8MM support Add initial support for phyBOARD-Polis-i.MX8MM. Main features are: * Bluetooth and Wifi * CANFD * eMMC * i2c RTC * Ethernet * PCIe * RS232/RS485 * SD-Card * SPI-NOR flash * USB Signed-off-by: Teresa Remmet Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/Makefile | 1 + .../dts/freescale/imx8mm-phyboard-polis-rdk.dts | 450 +++++++++++++++++++++ .../boot/dts/freescale/imx8mm-phycore-som.dtsi | 440 ++++++++++++++++++++ 3 files changed, 891 insertions(+) commit a242ef5f3c10740f48ccd4a1f6b0ad4355f64e21 Author: Philippe Schenker Date: Wed Jun 22 18:44:10 2022 +0200 arm64: dts: imx8m{m,p}-verdin: use IT temperatures Use IT temperature threshold for critical/passive trip point on Verdin iMX8M Plus and Mini. Signed-off-by: Philippe Schenker Reviewed-by: Francesco Dolcini Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 8 ++++++++ arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi | 8 ++++++++ 2 files changed, 16 insertions(+) commit 38c771014ce697322babf3ec29a7a686eaf24f64 Author: Yang Li Date: Wed Jun 15 01:59:46 2022 +0100 media: mediatek: vcodec: remove unneeded semicolon Eliminate the following coccicheck warning: ./drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c:71:2-3: Unneeded semicolon Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6aa42f93751e4d9ac8505b7ac57acd5506bdec9 Merge: 508aeb54e4f0 03c765b0e3b4 Author: Greg Kroah-Hartman Date: Mon Jun 27 10:03:28 2022 +0200 Merge 5.19-rc4 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 359c27c6ddbde404f44a9c0d3ec88ccd1e2042f2 Author: Niels Dossche Date: Tue Jun 14 18:50:02 2022 +0100 media: hdpvr: fix error value returns in hdpvr_read Error return values are supposed to be negative in hdpvr_read. Most error returns are currently handled via an unsigned integer "ret". When setting a negative error value to "ret", the value actually becomes a large positive value, because "ret" is unsigned. Later on, the "ret" value is returned. But as ssize_t is a 64-bit signed number, the error return value stays a large positive integer instead of a negative integer. This can cause an error value to be interpreted as the read size, which can cause a buffer overread for applications relying on the returned size. Fixes: 9aba42efe85b ("V4L/DVB (11096): V4L2 Driver for the Hauppauge HD PVR usb capture device") Signed-off-by: Niels Dossche Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/hdpvr/hdpvr-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d40b918fdf144e9f7a1f032be1af808ce5902c1 Merge: 152520cb5fdb 03c765b0e3b4 Author: Greg Kroah-Hartman Date: Mon Jun 27 10:02:04 2022 +0200 Merge 5.19-rc4 into char-misc-next We need the IIO fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 63249a5cab81b69d43b0a508eb597e7be6f5343a Author: Guo Zhengkui Date: Tue Jun 14 08:25:59 2022 +0100 media: mediatek: vcodec: fix minmax.cocci warning Fix the following coccicheck warning: drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c: 694:15-16: WARNING opportunity for min(). Signed-off-by: Guo Zhengkui Reviewed-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d772a47cace0fd9a540e811af2578545078a825 Author: Lukas Bulwahn Date: Mon Jun 13 13:10:07 2022 +0100 media: MAINTAINERS: add include/dt-bindings/media to MEDIA INPUT INFRASTRUCTURE Maintainers of the directory Documentation/devicetree/bindings/media are also the maintainers of the corresponding directory include/dt-bindings/media. Add the file entry for include/dt-bindings/media to the appropriate section in MAINTAINERS. Signed-off-by: Lukas Bulwahn Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 3a149169e4a2f9127022fec6ef5d71b4e804b3b9 Author: Miaoqian Lin Date: Wed May 25 15:54:11 2022 +0400 drm/mcde: Fix refcount leak in mcde_dsi_bind Every iteration of for_each_available_child_of_node() decrements the reference counter of the previous node. There is no decrement when break out from the loop and results in refcount leak. Add missing of_node_put() to fix this. Fixes: 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE") Signed-off-by: Miaoqian Lin Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20220525115411.65455-1-linmq006@gmail.com drivers/gpu/drm/mcde/mcde_dsi.c | 1 + 1 file changed, 1 insertion(+) commit 34c7fdb8fd73135b2d09b1039fcce2e2a1250f94 Author: Christophe JAILLET Date: Sat Jun 11 11:39:47 2022 +0100 media: ddbridge: Remove useless license text when SPDX-License-Identifier is already used An SPDX-License-Identifier is already in place. There is no need to duplicate part of the corresponding license. While at it, a few comments at the end of some .h files have been updated to reflect the correct include guard name (missing '_' and co.) Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ddbridge/ddbridge-ci.c | 9 --------- drivers/media/pci/ddbridge/ddbridge-ci.h | 9 --------- drivers/media/pci/ddbridge/ddbridge-core.c | 9 --------- drivers/media/pci/ddbridge/ddbridge-hw.c | 9 --------- drivers/media/pci/ddbridge/ddbridge-hw.h | 11 +---------- drivers/media/pci/ddbridge/ddbridge-i2c.c | 9 --------- drivers/media/pci/ddbridge/ddbridge-i2c.h | 9 --------- drivers/media/pci/ddbridge/ddbridge-io.h | 9 --------- drivers/media/pci/ddbridge/ddbridge-main.c | 9 --------- drivers/media/pci/ddbridge/ddbridge-max.c | 9 --------- drivers/media/pci/ddbridge/ddbridge-max.h | 11 +---------- drivers/media/pci/ddbridge/ddbridge-mci.c | 9 --------- drivers/media/pci/ddbridge/ddbridge-mci.h | 9 --------- drivers/media/pci/ddbridge/ddbridge-regs.h | 9 --------- drivers/media/pci/ddbridge/ddbridge-sx8.c | 9 --------- drivers/media/pci/ddbridge/ddbridge.h | 11 +---------- 16 files changed, 3 insertions(+), 147 deletions(-) commit c1b217853fc02a1c7b1d6a01bde44b95f32a2ee5 Author: Christophe JAILLET Date: Sat Jun 11 11:24:32 2022 +0100 media: em28xx: Remove useless license text when SPDX-License-Identifier is already used An SPDX-License-Identifier is already in place. There is no need to duplicate part of the corresponding license. Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-audio.c | 10 ---------- drivers/media/usb/em28xx/em28xx-camera.c | 10 ---------- drivers/media/usb/em28xx/em28xx-cards.c | 10 ---------- drivers/media/usb/em28xx/em28xx-core.c | 10 ---------- drivers/media/usb/em28xx/em28xx-dvb.c | 4 ---- drivers/media/usb/em28xx/em28xx-i2c.c | 10 ---------- drivers/media/usb/em28xx/em28xx-input.c | 10 ---------- drivers/media/usb/em28xx/em28xx-v4l.h | 9 --------- drivers/media/usb/em28xx/em28xx-vbi.c | 10 ---------- drivers/media/usb/em28xx/em28xx-video.c | 10 ---------- drivers/media/usb/em28xx/em28xx.h | 10 ---------- 11 files changed, 103 deletions(-) commit 6addd33f06ea9c88ad48ace94cddae69c3671575 Author: Christophe JAILLET Date: Sat Jun 11 11:22:12 2022 +0100 media: rcar_drif: Remove useless license text when SPDX-License-Identifier is already used An SPDX-License-Identifier is already in place. There is no need to duplicate part of the corresponding license. This is a left-over from commit adeb69705682 ("media: rcar_drif: convert to SPDX identifiers") Signed-off-by: Christophe JAILLET Reviewed-by: Geert Uytterhoeven Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/renesas/rcar_drif.c | 5 ----- 1 file changed, 5 deletions(-) commit f5d48ba2cae20c2aaec87f7a949075ad85b76b0b Author: Ajye Huang Date: Fri Jun 10 14:33:42 2022 +0100 media: platform: cros-ec: Add kinox to the match table The Google Kinox device uses the same approach as the Google Brask which enables the HDMI CEC via the cros-ec-cec driver. Signed-off-by: Ajye Huang Reviewed-by: Guenter Roeck Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 2 ++ 1 file changed, 2 insertions(+) commit 89e3f3fb3d9014efa59ed6bb526d5f1a00168452 Author: Ming Qian Date: Fri Jun 10 07:26:11 2022 +0100 media: amphion: output firmware error message Firmware may send the error event with some error message, and it help locate the firmware error, so output the error message if it exists Fixes: 61cbf1c1fa6d7 ("media: amphion: implement vpu core communication based on mailbox") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/amphion/vpu_msgs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 22a2bc88c139dc9757bdb1d0a3665ac27edc79a5 Author: Ming Qian Date: Fri Jun 10 03:00:57 2022 +0100 media: imx-jpeg: Disable slot interrupt when frame done The interrupt STMBUF_HALF may be triggered after frame done. It may led to system hang if driver try to access the register after power off. Disable the slot interrupt when frame done. Fixes: 2db16c6ed72ce ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") Signed-off-by: Ming Qian Reviewed-by: Mirela Rabulea Tested-by: Mirela Rabulea Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.c | 5 +++++ drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h | 1 + drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 10 ++-------- 3 files changed, 8 insertions(+), 8 deletions(-) commit fd9f8050e355d7fd1e126cd207b06c96cde7f783 Author: Yunfei Dong Date: Fri Jun 10 02:53:15 2022 +0100 media: mediatek: vcodec: Change encoder v4l2 capability value Change the value of v4l2 capability parameters: driver and card. Signed-off-by: Yunfei Dong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h | 1 - drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) commit b51b15030054f391201ab7bcbf76b5541cef5591 Author: Yunfei Dong Date: Fri Jun 10 02:53:14 2022 +0100 media: mediatek: vcodec: Fix encoder v4l2 bus_info not correctly Fix v4l2 capability bus_info value with correct chip name according to compatible. Signed-off-by: Yunfei Dong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/platform/mediatek/vcodec/mtk_vcodec_enc.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit a8a7a278c56ad3b4ddd4db9a960e0537d032b0b3 Author: Yunfei Dong Date: Fri Jun 10 02:53:13 2022 +0100 media: mediatek: vcodec: Change decoder v4l2 capability value Change the value of v4l2 capability parameters: driver and card. Signed-off-by: Yunfei Dong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cce4de66ccca78b45b78f9935c1bb14765ca8490 Author: Yunfei Dong Date: Fri Jun 10 02:53:12 2022 +0100 media: mediatek: vcodec: Fix decoder v4l2 bus_info not correctly Fix v4l2 capability bus_info value with correct chip name according to compatible. Signed-off-by: Yunfei Dong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../platform/mediatek/vcodec/mtk_vcodec_dec.c | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 4e0ce6e703c24d2d7a2acf027f4b712368a35eb9 Author: Robin van der Gracht Date: Tue Jun 21 16:03:34 2022 +0200 ARM: dts: imx6qdl-prti6q.dtsi: Add applicable properties to usdhc3 The usdhc3 interface is connected to a soldered eMMC chip on all boards that import this dtsi. Adding these properties speeds up the device probe during boot. Signed-off-by: Robin van der Gracht Reviewed-by: Ahmad Fatoum Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-prti6q.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 01f8d921f72286dd9145181ede121f4b393fc810 Author: Fabio Estevam Date: Tue Jun 21 09:45:15 2022 -0300 ARM: dts: imx6q-bosch-acc: Replace 'enable-sdio-wakeup' As explained in Documentation/devicetree/bindings/mmc/mmc-controller.yaml, the 'enable-sdio-wakeup' property is considered deprecated. Replace it with the 'wakeup-source' property instead. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-bosch-acc.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cf461f2bf4ecf32b6cf4a7cb19b002d58ec9618 Author: Fabio Estevam Date: Tue Jun 21 09:45:14 2022 -0300 ARM: dts: imx7d-smegw01: Replace 'enable-sdio-wakeup' As explained in Documentation/devicetree/bindings/mmc/mmc-controller.yaml, the 'enable-sdio-wakeup' property is considered deprecated. Replace it with the 'wakeup-source' property instead. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-smegw01.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fd83ef8f8e59053c0b5b2b847d0357589d4c35bd Author: Laurent Pinchart Date: Sun Feb 27 20:56:16 2022 +0000 media: rkisp1: Drop parentheses and fix indentation in rkisp1_probe() Fix a small indentation issue to increase code readability, and drop unneeded parentheses. Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 34098a83de352cf82759f76dff0a75c3486b5fa8 Author: Laurent Pinchart Date: Sun Feb 27 20:43:03 2022 +0000 media: rkisp1: Align macro definitions Make the code more readable by using the same alignment for all macros in rkisp1-common.h. Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-common.h | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 3d91b856ae69bcea2a5ec4046531926a3b86557d Author: Paul Elder Date: Tue Feb 22 08:52:07 2022 +0000 media: rkisp1: capture: Bypass the main device for handling querycap When handling querycap, the capture node would access the main rkisp1 device unnecessarily. Get the information from the most direct source. Signed-off-by: Paul Elder Reviewed-by: Dafna Hirschfeld Reviewed-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit a124765f8781a75df6c491bd04a0389ce078454c Author: Laurent Pinchart Date: Sun Mar 6 16:00:16 2022 +0000 media: rkisp1: debug: Update max register name length Update the maximum register name length to match all the registers being printed. This helps getting a consistent alignment of register dumps when concatenating multiple debugfs files. Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit afff3d3aef14c9775a154584a8becce1d33f9446 Author: Teresa Remmet Date: Tue Jun 21 09:10:47 2022 +0200 arm64: defconfig: Enable gpio-fan support Enable gpio-fan support as this is needed by phyBOARD-Polis-i.MX8M Mini. Signed-off-by: Teresa Remmet Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 7d62f2f367f89db7ac9f03a4f664cc488ab764d8 Author: Laurent Pinchart Date: Sun Mar 6 16:00:16 2022 +0000 media: rkisp1: debug: Consolidate reg dumps for shadow registers Extend the rkisp1_debug_register structure and the rkisp1_debug_dump_regs() function to support shadow registers, and replace the manual registers dump implementation in rkisp1_debug_dump_rsz_regs_show() with a call to rkisp1_debug_dump_regs(). Support for printing register values in decimal is dropped, as it was actually confusing to print resizer register expressed as fixed-point values in decimal. Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-debug.c | 83 +++++++++------------- 1 file changed, 33 insertions(+), 50 deletions(-) commit f0da93cbaf7af868e34d611d555f4067b748ecdf Author: Jean Delvare Date: Tue Jun 21 15:55:11 2022 +0200 platform/x86: thinkpad_acpi: Fix a memory leak of EFCH MMIO resource Unlike release_mem_region(), a call to release_resource() does not free the resource, so it has to be freed explicitly to avoid a memory leak. Signed-off-by: Jean Delvare Fixes: 455cd867b85b ("platform/x86: thinkpad_acpi: Add a s2idle resume quirk for a number of laptops") Cc: Mario Limonciello Cc: Henrique de Moraes Holschuh Cc: Hans de Goede Cc: Mark Gross Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20220621155511.5b266395@endymion.delvare Signed-off-by: Hans de Goede drivers/platform/x86/thinkpad_acpi.c | 1 + 1 file changed, 1 insertion(+) commit 63a00f04bff91d22f1668e4f530514c995232ebc Author: Hans de Goede Date: Mon Jun 20 16:56:28 2022 +0200 platform/x86/dell: Kconfig: Remove unnecessary "depends on X86_PLATFORM_DEVICES" platform/x86/dell/Kconfig is only sourced if X86_PLATFORM_DEVICES is set, so it does not need to depend on it. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20220620145628.5882-3-hdegoede@redhat.com drivers/platform/x86/dell/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 44fc1060a62d4810e2ce8f961232c34dad006ec8 Author: Hans de Goede Date: Mon Jun 20 16:56:27 2022 +0200 platform/x86: Kconfig: Remove unnecessary "if X86" drivers/platform/x86/Kconfig is wrapped in one big if X86_PLATFORM_DEVICES .. endif and X86_PLATFORM_DEVICES already has a "depends on X86" so the "if X86" in drivers/platform/Kconfig is not necessary and except for MIPS none of the other includes there has such an if. So let's remove it. While at it also move the x86/Kconfig include to the end of the file for alphabetical sorting. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220620145628.5882-2-hdegoede@redhat.com drivers/platform/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 349da8ee726a19c5034145199985bbf78a1e933d Author: Hans de Goede Date: Mon Jun 20 16:56:26 2022 +0200 platform/x86: acer_wmi: Cleanup Kconfig selects ACER_WMI already depends on ACPI_WMI which depends on ACPI so the "depends on ACPI" is unnecessary. And since ACER_WMI already depends on ACPI adding an "if ACPI" to the ACPI_VIDEO select is nonsense. While at it also group all the selects together. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20220620145628.5882-1-hdegoede@redhat.com drivers/platform/x86/Kconfig | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 664607f54594d939bb9dda2a29db2b8e926b4e3f Author: Andy Shevchenko Date: Fri Jun 17 01:49:51 2022 +0300 platform/x86: thinkpad_acpi: Replace custom str_on_off() etc Replace enabled(), onoff() and other similar places by str_*() helpers. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220616224951.66660-2-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/thinkpad_acpi.c | 55 ++++++++++++++---------------------- 1 file changed, 21 insertions(+), 34 deletions(-) commit 3c40a71c03b6b4478ac7d517a8dff30617a0cdc8 Author: Andy Shevchenko Date: Fri Jun 17 01:49:50 2022 +0300 platform/x86: thinkpad_acpi: Sort headers for better maintenance It's quite hard to understand in that zillions of headers that are included if any specific one is already listed. Sort headers for better maintenance. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220616224951.66660-1-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/thinkpad_acpi.c | 58 +++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 27 deletions(-) commit d7e64c6d9c60f8c72d46c82af185336eaa2a1989 Author: Dan Carpenter Date: Wed Jun 15 11:11:07 2022 +0300 platform/mellanox: nvsw-sn2201: fix error code in nvsw_sn2201_create_static_devices() This should return PTR_ERR() instead of IS_ERR(). Also "dev->client" has been set to NULL by this point so it returns 0/success so preserve the error code earlier. Fixes: 662f24826f95 ("platform/mellanox: Add support for new SN2201 system") Signed-off-by: Dan Carpenter Acked-by: Michael Shych Link: https://lore.kernel.org/r/YqmUGwmPK7cPolk/@kili Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/mellanox/nvsw-sn2201.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 20a051cd4d1d6b15f534a44fbb65069040413900 Author: Teresa Remmet Date: Tue Jun 21 09:10:46 2022 +0200 bindings: arm: fsl: Add PHYTEC i.MX8MM devicetree bindings Add devicetree bindings for i.MX8MM based phyCORE-i.MX8MM and phyBOARD-Polis RDK. Signed-off-by: Teresa Remmet Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit ce380f225d78b86fdb1a85947529d21b2c726d8d Author: Laurent Pinchart Date: Sun Feb 27 15:20:48 2022 +0000 media: rkisp1: debug: Move resizer register dump to debugfs The debugfs support already includes support to dump core and ISP registers. Move the resizer register dump there too to make the userspace interface consistent. Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-debug.c | 57 ++++++++++++++++++++++ .../platform/rockchip/rkisp1/rkisp1-resizer.c | 37 -------------- 2 files changed, 57 insertions(+), 37 deletions(-) commit 1024a6e0c004248b7041709741f92cfb76f59df8 Author: Gayatri Kammela Date: Tue Jun 14 17:27:51 2022 -0700 platform/x86: intel/pmc: Add Alder Lake N support to PMC core driver Add Alder Lake N (ADL-N) to the list of the platforms that Intel's PMC core driver supports. Alder Lake N reuses all the TigerLake PCH IPs. Cc: Srinivas Pandruvada Cc: Andy Shevchenko Cc: David E. Box Signed-off-by: Gayatri Kammela Reviewed-by: Rajneesh Bhardwaj Link: https://lore.kernel.org/r/20220615002751.3371730-1-gayatri.kammela@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/intel/pmc/core.c | 1 + 1 file changed, 1 insertion(+) commit 2a6b586035ecb1c1e26a9aec5f8934055e18b0a7 Author: Laurent Pinchart Date: Sun Feb 27 13:41:09 2022 +0000 media: rkisp1: debug: Add debugfs files to dump core and ISP registers It's useful to dump the value of registers for debugging purpose. Add two debugfs files to dump key core and ISP registers. Signed-off-by: Laurent Pinchart Signed-off-by: Paul Elder Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-debug.c | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit cbb819c363c572715ddba8ea8a049392629707a4 Author: Laurent Pinchart Date: Sat Feb 26 07:57:09 2022 +0000 media: rkisp1: debug: Collect input status by sampling ISP_FLAGS_SHD The ISP_FLAGS_SHD register exposes the ISP parallel input signals (data and synchronization) in real time. This can help debugging when the device doesn't output any image. Sample the register 10000 times with a 1µs delay and expose the result through debugfs. Signed-off-by: Laurent Pinchart Signed-off-by: Paul Elder Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-debug.c | 54 ++++++++++++++++++++++ .../media/platform/rockchip/rkisp1/rkisp1-regs.h | 9 ++++ 2 files changed, 63 insertions(+) commit fd3608fe6bfe7a41cc597faa6498793276f1290e Author: Laurent Pinchart Date: Sat Feb 26 07:57:09 2022 +0000 media: rkisp1: Compile debugfs support conditionally When CONFIG_DEBUGFS is disabled, there's no need to compile the debugfs support in. Make it conditional. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/Makefile | 18 ++++++++++-------- drivers/media/platform/rockchip/rkisp1/rkisp1-common.h | 9 +++++++++ 2 files changed, 19 insertions(+), 8 deletions(-) commit 07ce797de4d3760e0a7ccf543973e312ba1e46e0 Author: Shengjiu Wang Date: Tue Jun 21 10:16:03 2022 +0800 arm64: dts: imx8mn-evk: add bt-sco sound card support Add bt-sco sound card, which supports wb profile as default Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 3f5d1fdaa585c6fa12dab1e180c3fa61ed4d8f02 Author: Shengjiu Wang Date: Tue Jun 21 10:16:02 2022 +0800 arm64: dts: imx8mq-evk: add bt-sco sound card support Add bt-sco sound card, which supports wb profile as default Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 43 ++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit f8e03537772d32c10f621df753f9ae79525c0a0b Author: Shengjiu Wang Date: Tue Jun 21 10:16:01 2022 +0800 arm64: dts: imx8mm-evk: add bt-sco sound card support Add bt-sco sound card, which supports wb profile as default Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 8682037db36c81c7910e28c3060b8875d2944a7c Author: Laurent Pinchart Date: Sat Feb 26 07:57:09 2022 +0000 media: rkisp1: Move debugfs code to a separate file To avoid cluttering the main rkisp1-dev.c driver file, move debugfs code to a separate source file. This prepares for extensions to the debugfs infrastructure. While at it, add a missing forward declaration for struct dentry in rkisp1-common.h to avoid depending on indirect includes. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/Makefile | 1 + .../media/platform/rockchip/rkisp1/rkisp1-common.h | 5 +++ .../media/platform/rockchip/rkisp1/rkisp1-debug.c | 50 ++++++++++++++++++++++ .../media/platform/rockchip/rkisp1/rkisp1-dev.c | 33 +------------- 4 files changed, 57 insertions(+), 32 deletions(-) commit 3e74a42223862de7429e1882cc2f56227cf1a5d9 Author: Laurent Pinchart Date: Sun Feb 27 14:38:47 2022 +0000 media: rkisp1: resizer: Simplify register access The registers for the mainpath and selfpath resizers are located at the same offset from the instance-specific base. Use this to simplify register access, removing the need to store per-register offsets in the rkisp1_rsz_config structure. Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-common.h | 2 + .../media/platform/rockchip/rkisp1/rkisp1-regs.h | 67 +++------ .../platform/rockchip/rkisp1/rkisp1-resizer.c | 161 +++++++-------------- 3 files changed, 75 insertions(+), 155 deletions(-) commit 0ef7dc305bd44d1c8330baa403d36c5df38b1215 Author: Laurent Pinchart Date: Thu Mar 3 15:35:10 2022 +0000 media: rkisp1: Swap value and address arguments to rkisp1_write() While writel() takes the value and address arguments in that order, most write functions (including in the regmap API) use the opposite convention. Having the value first is considered confusing, and often leads to more difficult to read code compared to the opposite convention where the write call and the register name often fit on a single line: rkisp1_write(rkisp1, RKISP1_CIF_THE_REG_NAME, complicate_calculation + for / the_register value + goes | here); Swap the arguments of the rkisp1_write() function, and use the following semantic patch to update the callers: @@ expression rkisp1, value, address; @@ - rkisp1_write(rkisp1, value, address) + rkisp1_write(rkisp1, address, value) This commit also includes a few additional line break cleanups in the rkisp1_write() calls, but no other manual change. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab .../platform/rockchip/rkisp1/rkisp1-capture.c | 107 ++-- .../media/platform/rockchip/rkisp1/rkisp1-common.h | 2 +- .../media/platform/rockchip/rkisp1/rkisp1-isp.c | 125 ++-- .../media/platform/rockchip/rkisp1/rkisp1-params.c | 689 ++++++++++----------- .../platform/rockchip/rkisp1/rkisp1-resizer.c | 40 +- .../media/platform/rockchip/rkisp1/rkisp1-stats.c | 2 +- 6 files changed, 477 insertions(+), 488 deletions(-) commit 93929fb6c4ef6211e96679f060c842f35fac7710 Merge: b13baccc3850 6f1de1da8156 Author: Arnd Bergmann Date: Mon Jun 27 09:07:07 2022 +0200 Merge branch 'asm-generic-mmiotrace' into asm-generic A patch series from Sai Prakash Ranjan, who explains: Generic MMIO read/write i.e., __raw_{read,write}{b,l,w,q} accessors are typically used to read/write from/to memory mapped registers and can cause hangs or some undefined behaviour in following cases, * If the access to the register space is unclocked, for example: if there is an access to multimedia(MM) block registers without MM clocks. * If the register space is protected and not set to be accessible from non-secure world, for example: only EL3 (EL: Exception level) access is allowed and any EL2/EL1 access is forbidden. * If xPU(memory/register protection units) is controlling access to certain memory/register space for specific clients. and more... Such cases usually results in instant reboot/SErrors/NOC or interconnect hangs and tracing these register accesses can be very helpful to debug such issues during initial development stages and also in later stages. So use ftrace trace events to log such MMIO register accesses which provides rich feature set such as early enablement of trace events, filtering capability, dumping ftrace logs on console and many more. Sample output: rwmmio_write: __qcom_geni_serial_console_write+0x160/0x1e0 width=32 val=0xa0d5d addr=0xfffffbfffdbff700 rwmmio_post_write: __qcom_geni_serial_console_write+0x160/0x1e0 width=32 val=0xa0d5d addr=0xfffffbfffdbff700 rwmmio_read: qcom_geni_serial_poll_bit+0x94/0x138 width=32 addr=0xfffffbfffdbff610 rwmmio_post_read: qcom_geni_serial_poll_bit+0x94/0x138 width=32 val=0x0 addr=0xfffffbfffdbff610 This series is a follow-up for the series [1] and a recent series [2] making use of both. [1] https://lore.kernel.org/lkml/cover.1536430404.git.saiprakash.ranjan@codeaurora.org/ [2] https://lore.kernel.org/lkml/1604631386-178312-1-git-send-email-psodagud@codeaurora.org/ Note in v4 version, Arnd suggested to benchmark and compare size with callback based implementation, please see [3] for more details on that with brief comparison below. **Inline version with CONFIG_FTRACE=y and CONFIG_TRACE_MMIO_ACCESS=y** $ size vmlinux text data bss dec hex filename 23884219 14284468 532568 38701255 24e88c7 vmlinux **Callback version with CONFIG_FTRACE=y and CONFIG_TRACE_MMIO_ACCESS=y** $ size vmlinux text data bss dec hex filename 24108179 14279596 532568 38920343 251e097 vmlinux $ ./scripts/bloat-o-meter inline-vmlinux callback-vmlinux add/remove: 8/3 grow/shrink: 4889/89 up/down: 242244/-11564 (230680) Total: Before=25812612, After=26043292, chg +0.89% [3] https://lore.kernel.org/lkml/466449a1-36da-aaa9-7e4f-477f36b52c9e@quicinc.com/ Link: https://lore.kernel.org/lkml/cover.1652891705.git.quic_saipraka@quicinc.com/ * asm-generic-mmiotrace: soc: qcom: geni: Disable MMIO tracing for GENI SE serial: qcom_geni_serial: Disable MMIO tracing for geni serial asm-generic/io: Add logging support for MMIO accessors KVM: arm64: Add a flag to disable MMIO trace for nVHE KVM lib: Add register read/write tracing support drm/meson: Fix overflow implicit truncation warnings irqchip/tegra: Fix overflow implicit truncation warnings coresight: etm4x: Use asm-generic IO memory barriers arm64: io: Use asm-generic high level MMIO accessors arch/*: Disable softirq stacks on PREEMPT_RT. commit 3b430c2cf0e44dcac8639a36332f45a8326721c7 Author: Laurent Pinchart Date: Sat Feb 26 18:09:58 2022 +0000 media: rkisp1: regs: Rename CCL, ICCL and IRCL registers with VI_ prefix The documentation names the CCL, ICCL and IRCL registers with a VI_ prefix, like the VI_ID and VI_DPCL registers. Fix the macro names accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-isp.c | 19 +++---- .../media/platform/rockchip/rkisp1/rkisp1-params.c | 8 +-- .../media/platform/rockchip/rkisp1/rkisp1-regs.h | 60 +++++++++++----------- 3 files changed, 44 insertions(+), 43 deletions(-) commit 240e92eaee8ce314d075679f513da03d84aa8974 Author: Laurent Pinchart Date: Sat Feb 26 18:09:58 2022 +0000 media: rkisp1: regs: Don't use BIT() macro for multi-bit register fields The BIT() macro is meant to represent a single bit. It is incorrectly used for register field values that store the value 1 in a multi-bit field. Use the usual (1 << n) construct for those. While at it, move RKISP1_CIF_MI_DMA_CTRL_READ_FMT_PACKED where it belongs with the other READ_FMT values. Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-regs.h | 54 +++++++++++----------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 6ff02276beb93e305a463fb950f3501a60a887f8 Author: Laurent Pinchart Date: Thu Feb 24 14:24:10 2022 +0000 media: rkisp1: Simplify rkisp1_entities_register() error path Now that all the unregistration functions are safe to call on non-registered entities, the error path in rkisp1_entities_register() can be simplified. Factor out the unregistration to a separate function to share code with rkisp1_remove(). Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab .../media/platform/rockchip/rkisp1/rkisp1-dev.c | 40 ++++++++++------------ 1 file changed, 19 insertions(+), 21 deletions(-) commit 6adceb706e51bb5ff3c2a9700a0ee275ee0c76b2 Author: Laurent Pinchart Date: Thu Feb 24 12:58:40 2022 +0000 media: rkisp1: stats: Simplify (un)registration Simplify error handling at registration time as media_entity_cleanup() can be called on an uninitialized entity, and make rkisp1_stats_unregister() safe to be called on an unregistered stats node to prepare for simplification of error handling at probe time. Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-stats.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 8ba4862eb59bb2717d8390649cf973a512d892aa Author: Laurent Pinchart Date: Thu Feb 24 12:58:40 2022 +0000 media: rkisp1: params: Fix and simplify (un)registration The rkisp1_params_register() and rkisp1_params_unregister() functions don't destroy the mutex (in the error path for the former). Fix this, simplify error handling at registration time as media_entity_cleanup() can be called on an uninitialized entity, and make rkisp1_params_unregister() safe to be called on an unregistered params node to prepare for simplification of error handling at probe time. Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit f738cb62a8a7e1bea55e7f7047e2a352f1106f55 Author: Laurent Pinchart Date: Thu Feb 24 12:58:40 2022 +0000 media: rkisp1: resizer: Fix and simplify (un)registration The rkisp1_rsz_register() and rkisp1_rsz_unregister() functions don't destroy the mutex (in the error path for the former). Fix this, simplify error handling at registration time as media_entity_cleanup() can be called on an uninitialized entity, and make rkisp1_rsz_unregister() and rkisp1_resizer_devs_unregister() safe to be called on an unregistered resizer subdev to prepare for simplification of error handling at probe time. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab .../platform/rockchip/rkisp1/rkisp1-resizer.c | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 48d775688f34f77757dd1961f14b772771197daa Author: Laurent Pinchart Date: Thu Feb 24 12:58:40 2022 +0000 media: rkisp1: isp: Fix and simplify (un)registration The rkisp1_isp_register() and rkisp1_isp_unregister() functions don't destroy the mutex (in the error path for the former). Fix this, simplify error handling at registration time as media_entity_cleanup() can be called on an uninitialized entity, and make rkisp1_isp_unregister() and safe to be called on an unregistered isp subdev to prepare for simplification of error handling at probe time. Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 55fcb913d5d3d1f3d0ce91d8d42c50d9cd496427 Author: Laurent Pinchart Date: Thu Feb 24 12:58:40 2022 +0000 media: rkisp1: capture: Fix and simplify (un)registration The rkisp1_register_capture() and rkisp1_unregister_capture() functions don't destroy the mutex (in the error path for the former). Fix this and make rkisp1_unregister_capture() and rkisp1_capture_devs_unregister() safe to be called on an unregistered capture node to prepare for simplification of error handling at probe time. While at it, drop the double initialization of cap->rkisp1 in rkisp1_capture_devs_register() as the field is already initialized in rkisp1_capture_init(). Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab .../platform/rockchip/rkisp1/rkisp1-capture.c | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 786dde1e59d7122f55e42f5ab1167bc10ad87a41 Author: Michael Walle Date: Mon Apr 4 11:56:09 2022 +0200 soc: fsl: guts: add serial_number support Most layerscapes provide a security fuse processor where the vendor will store a unique id per part. Unfortunately, we cannot use the corresponding efuse driver because this driver needs to be ready early during the boot phase. To get the unique identifier, we just need to access two registers. Thus we just search the device tree for the corresponding device, map its memory to read the id and then unmap it again. Because it is likely that the offset within the fuses is dependent on the SoC, we need a per SoC data. Also, the compatible string is different among the SoCs. For now, this add support for the LS1028A SoC. Signed-off-by: Michael Walle Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo drivers/soc/fsl/guts.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) commit 55488c90b392d74a6a8bbd358b7129aab0b19aee Author: Michael Walle Date: Mon Apr 4 11:56:08 2022 +0200 soc: fsl: guts: drop platform driver This driver cannot be unloaded and it will be needed very early in the boot process because other driver (weakly) depend on it (eg. for chip errata handling). Drop all the platform driver and devres stuff and simply make it a core_initcall. Signed-off-by: Michael Walle Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo drivers/soc/fsl/guts.c | 134 ++++++++++++++++++++++++++----------------------- 1 file changed, 71 insertions(+), 63 deletions(-) commit b46dd0cb93decf58c43db0a39c1c047fc5315901 Author: Michael Walle Date: Mon Apr 4 11:56:07 2022 +0200 soc: fsl: guts: use of_root instead of own reference There is already a global of_root reference. Use that instead of getting one on our own. We don't need to care about the reference count either this way. Signed-off-by: Michael Walle Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo drivers/soc/fsl/guts.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 5d707e4e3fb5185b24a41d72f75599cc77afab61 Author: Michael Walle Date: Mon Apr 4 11:56:06 2022 +0200 soc: fsl: guts: allocate soc_dev_attr on the heap This is the last global static variable. Drop it and allocate the memory on the heap instead. Signed-off-by: Michael Walle Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo drivers/soc/fsl/guts.c | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) commit ab4988d6a39348dd8c031ef6db946afb9a543f0f Author: Michael Walle Date: Mon Apr 4 11:56:05 2022 +0200 soc: fsl: guts: embed fsl_guts_get_svr() in probe() Move the reading of the SVR into the probe function as fsl_guts_get_svr() is the only user of the static guts variable and this lets us drop that as well as the malloc() for this variable. Also, we can unmap the memory region after we accessed it, which will simplify error handling later. Signed-off-by: Michael Walle Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo drivers/soc/fsl/guts.c | 42 +++++++++++------------------------------- 1 file changed, 11 insertions(+), 31 deletions(-) commit 6de6cb89fc031cf95cb759bbf9fa00b139e0281a Author: Michael Walle Date: Mon Apr 4 11:56:04 2022 +0200 soc: fsl: guts: remove module_exit() and fsl_guts_remove() This driver will never be unloaded. Firstly, it is not available as a module, but more importantly, other drivers will depend on this one to apply possible chip errata. Signed-off-by: Michael Walle Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo drivers/soc/fsl/guts.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit ab3f045774f704c4e7b6a878102f4e9d4ae7bc74 Author: Michael Walle Date: Mon Apr 4 11:56:03 2022 +0200 soc: fsl: guts: machine variable might be unset If both the model and the compatible properties are missing, then machine will not be set. Initialize it with NULL. Fixes: 34c1c21e94ac ("soc: fsl: fix section mismatch build warnings") Signed-off-by: Michael Walle Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo drivers/soc/fsl/guts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56c8534e2d2f9bf789cdfc50e62bc30c992da69f Author: Laurent Pinchart Date: Thu Feb 24 13:57:32 2022 +0000 media: rkisp1: capture: Initialize entity before video device The media_entity embedded in the video_device needs to be initialized before registering the video_device. Do so. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Reviewed-by: Jacopo Mondi Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 0cae04373b77a117830e5f7d7aaa7eaf01f950d5 Author: Christoph Hellwig Date: Mon Jun 6 09:47:33 2022 +0200 dmaengine: remove DMA_MEMCPY_SG once again This was removed before due to the complete lack of users, but 3218910fd585 ("dmaengine: Add core function and capability check for DMA_MEMCPY_SG") and 29cf37fa6dd9 ("dmaengine: Add consumer for the new DMA_MEMCPY_SG API function.") added it back despite still not having any users whatsoever. Fixes: 3218910fd585 ("dmaengine: Add core function and capability check for DMA_MEMCPY_SG") Fixes: 29cf37fa6dd9 ("dmaengine: Add consumer for the new DMA_MEMCPY_SG API function.") Signed-off-by: Christoph Hellwig Acked-by: Michal Simek Link: https://lore.kernel.org/r/20220606074733.622616-1-hch@lst.de Signed-off-by: Vinod Koul Documentation/driver-api/dmaengine/provider.rst | 10 -- drivers/dma/dmaengine.c | 7 -- drivers/dma/xilinx/xilinx_dma.c | 122 ------------------------ include/linux/dmaengine.h | 20 ---- 4 files changed, 159 deletions(-) commit f94bc517b4992aeddeeb30a4ac813cb4d1d81241 Author: Jeffle Xu Date: Mon Jun 6 10:11:03 2022 +0800 MAINTAINERS: erofs: add myself as reviewer Glad to contribute the fscache mode to erofs. Sincerely I recommend myself as the reviewer to maintain these codes. Signed-off-by: Jeffle Xu Acked-by: Chao Yu Acked-by: Gao Xiang Link: https://lore.kernel.org/r/20220606021103.89211-1-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit c753b70c9feb8c0633b5cf10819e16f6fb335d34 Author: Yue Hu Date: Sun Jun 5 15:02:04 2022 +0800 MAINTAINERS: erofs: add myself as reviewer I have been doing some erofs patches. Now I have the time and would like to help with the reviews. Signed-off-by: Yue Hu Acked-by: Gao Xiang Acked-by: Chao Yu Link: https://lore.kernel.org/r/20220605070133.4280-1-huyue2@coolpad.com Signed-off-by: Gao Xiang MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 243a0ef843c86e29ca7a62ee70fe0e005eeaa0fb Merge: 28d860dd08d5 5223c511eb4f Author: Linus Walleij Date: Mon Jun 27 01:58:27 2022 +0200 Merge tag 'renesas-pinctrl-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v5.20 - Fix reporting of input disabled pins on RZ/G2L. commit 28d860dd08d5d4d7a6f865df57081dc36583c86f Author: Linus Walleij Date: Mon Jun 27 01:55:16 2022 +0200 pinctrl: mediatek: mt8192: Fix compile warnings After applying patches I get these warnings: drivers/pinctrl/mediatek/pinctrl-mt8192.c:1302:56: warning: "/*" within comment [-Wcomment] drivers/pinctrl/mediatek/pinctrl-mt8192.c:1362:56: warning: "/*" within comment [-Wcomment] Something is wrong with the missing end-slashes. Add them. Cc: Guodong Liu Cc: Nícolas F. R. A. Prado Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mt8192.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit b27c82e1296572cfa3997e58db3118a33915f85c Author: Christian Brauner Date: Tue Jun 21 16:14:54 2022 +0200 attr: port attribute changes to new types Now that we introduced new infrastructure to increase the type safety for filesystems supporting idmapped mounts port the first part of the vfs over to them. This ports the attribute changes codepaths to rely on the new better helpers using a dedicated type. Before this change we used to take a shortcut and place the actual values that would be written to inode->i_{g,u}id into struct iattr. This had the advantage that we moved idmappings mostly out of the picture early on but it made reasoning about changes more difficult than it should be. The filesystem was never explicitly told that it dealt with an idmapped mount. The transition to the value that needed to be stored in inode->i_{g,u}id appeared way too early and increased the probability of bugs in various codepaths. We know place the same value in struct iattr no matter if this is an idmapped mount or not. The vfs will only deal with type safe vfs{g,u}id_t. This makes it massively safer to perform permission checks as the type will tell us what checks we need to perform and what helpers we need to use. Fileystems raising FS_ALLOW_IDMAP can't simply write ia_vfs{g,u}id to inode->i_{g,u}id since they are different types. Instead they need to use the dedicated vfs{g,u}id_to_k{g,u}id() helpers that map the vfs{g,u}id into the filesystem. The other nice effect is that filesystems like overlayfs don't need to care about idmappings explicitly anymore and can simply set up struct iattr accordingly directly. Link: https://lore.kernel.org/lkml/CAHk-=win6+ahs1EwLkcq8apqLi_1wXFWbrPf340zYEhObpz4jA@mail.gmail.com [1] Link: https://lore.kernel.org/r/20220621141454.2914719-9-brauner@kernel.org Cc: Seth Forshee Cc: Christoph Hellwig Cc: Aleksa Sarai Cc: Linus Torvalds Cc: Al Viro CC: linux-fsdevel@vger.kernel.org Reviewed-by: Seth Forshee Signed-off-by: Christian Brauner (Microsoft) fs/attr.c | 68 ++++++++++++++++++--------------------- fs/ext2/inode.c | 8 ++--- fs/ext4/inode.c | 12 +++---- fs/f2fs/file.c | 16 ++++----- fs/f2fs/recovery.c | 8 ++--- fs/fat/file.c | 8 +++-- fs/jfs/file.c | 4 +-- fs/ocfs2/file.c | 2 +- fs/open.c | 60 +++++++++++++++++++++++++--------- fs/overlayfs/copy_up.c | 4 +-- fs/overlayfs/overlayfs.h | 12 +------ fs/quota/dquot.c | 14 +++++--- fs/reiserfs/inode.c | 4 +-- fs/xfs/xfs_iops.c | 10 +++--- fs/zonefs/super.c | 2 +- include/linux/fs.h | 4 +++ include/linux/quotaops.h | 4 +-- security/integrity/evm/evm_main.c | 4 +-- 18 files changed, 137 insertions(+), 107 deletions(-) commit 0e363cf3fa598c69340794da068d4d9cbc869322 Author: Christian Brauner Date: Tue Jun 21 16:14:53 2022 +0200 security: pass down mount idmapping to setattr hook Before this change we used to take a shortcut and place the actual values that would be written to inode->i_{g,u}id into struct iattr. This had the advantage that we moved idmappings mostly out of the picture early on but it made reasoning about changes more difficult than it should be. The filesystem was never explicitly told that it dealt with an idmapped mount. The transition to the value that needed to be stored in inode->i_{g,u}id appeared way too early and increased the probability of bugs in various codepaths. We know place the same value in struct iattr no matter if this is an idmapped mount or not. The vfs will only deal with type safe vfs{g,u}id_t. This makes it massively safer to perform permission checks as the type will tell us what checks we need to perform and what helpers we need to use. Adapt the security_inode_setattr() helper to pass down the mount's idmapping to account for that change. Link: https://lore.kernel.org/r/20220621141454.2914719-8-brauner@kernel.org Cc: Seth Forshee Cc: Christoph Hellwig Cc: Aleksa Sarai Cc: Linus Torvalds Cc: Al Viro CC: linux-fsdevel@vger.kernel.org Reviewed-by: Seth Forshee Signed-off-by: Christian Brauner (Microsoft) fs/attr.c | 2 +- fs/fat/file.c | 3 ++- include/linux/evm.h | 6 ++++-- include/linux/security.h | 8 +++++--- security/integrity/evm/evm_main.c | 8 +++++--- security/security.c | 5 +++-- 6 files changed, 20 insertions(+), 12 deletions(-) commit 71e7b535b8900d7ce7d5279fa472711db5251ae5 Author: Christian Brauner Date: Tue Jun 21 16:14:52 2022 +0200 quota: port quota helpers mount ids Port the is_quota_modification() and dqout_transfer() helper to type safe vfs{g,u}id_t. Since these helpers are only called by a few filesystems don't introduce a new helper but simply extend the existing helpers to pass down the mount's idmapping. Note, that this is a non-functional change, i.e. nothing will have happened here or at the end of this series to how quota are done! This a change necessary because we will at the end of this series make ownership changes easier to reason about by keeping the original value in struct iattr for both non-idmapped and idmapped mounts. For now we always pass the initial idmapping which makes the idmapping functions these helpers call nops. This is done because we currently always pass the actual value to be written to i_{g,u}id via struct iattr. While this allowed us to treat the {g,u}id values in struct iattr as values that can be directly written to inode->i_{g,u}id it also increases the potential for confusion for filesystems. Now that we are have dedicated types to prevent this confusion we will ultimately only map the value from the idmapped mount into a filesystem value that can be written to inode->i_{g,u}id when the filesystem actually updates the inode. So pass down the initial idmapping until we finished that conversion at which point we pass down the mount's idmapping. Since struct iattr uses an anonymous union with overlapping types as supported by the C standard, filesystems that haven't converted to ia_vfs{g,u}id won't see any difference and things will continue to work as before. In other words, no functional changes intended with this change. Link: https://lore.kernel.org/r/20220621141454.2914719-7-brauner@kernel.org Cc: Seth Forshee Cc: Christoph Hellwig Cc: Jan Kara Cc: Aleksa Sarai Cc: Linus Torvalds Cc: Al Viro CC: linux-fsdevel@vger.kernel.org Reviewed-by: Jan Kara Reviewed-by: Seth Forshee Signed-off-by: Christian Brauner (Microsoft) fs/ext2/inode.c | 4 ++-- fs/ext4/inode.c | 4 ++-- fs/f2fs/file.c | 4 ++-- fs/f2fs/recovery.c | 2 +- fs/jfs/file.c | 4 ++-- fs/ocfs2/file.c | 2 +- fs/quota/dquot.c | 3 ++- fs/reiserfs/inode.c | 4 ++-- fs/zonefs/super.c | 2 +- include/linux/quotaops.h | 9 ++++++--- 10 files changed, 21 insertions(+), 17 deletions(-) commit 35faf3109a78516f60ca13f957083d5e5535fde0 Author: Christian Brauner Date: Tue Jun 21 16:14:51 2022 +0200 fs: port to iattr ownership update helpers Earlier we introduced new helpers to abstract ownership update and remove code duplication. This converts all filesystems supporting idmapped mounts to make use of these new helpers. For now we always pass the initial idmapping which makes the idmapping functions these helpers call nops. This is done because we currently always pass the actual value to be written to i_{g,u}id via struct iattr. While this allowed us to treat the {g,u}id values in struct iattr as values that can be directly written to inode->i_{g,u}id it also increases the potential for confusion for filesystems. Now that we are have dedicated types to prevent this confusion we will ultimately only map the value from the idmapped mount into a filesystem value that can be written to inode->i_{g,u}id when the filesystem actually updates the inode. So pass down the initial idmapping until we finished that conversion at which point we pass down the mount's idmapping. No functional changes intended. Link: https://lore.kernel.org/r/20220621141454.2914719-6-brauner@kernel.org Cc: Seth Forshee Cc: Christoph Hellwig Cc: Aleksa Sarai Cc: Linus Torvalds Cc: Al Viro CC: linux-fsdevel@vger.kernel.org Reviewed-by: Seth Forshee Signed-off-by: Christian Brauner (Microsoft) fs/attr.c | 6 ++---- fs/ext2/inode.c | 4 ++-- fs/ext4/inode.c | 10 ++++------ fs/f2fs/file.c | 18 ++++++------------ fs/quota/dquot.c | 4 ++-- fs/xfs/xfs_iops.c | 8 ++++---- include/linux/quotaops.h | 6 +++--- security/integrity/evm/evm_main.c | 4 ++-- 8 files changed, 25 insertions(+), 35 deletions(-) commit 1f36146a5a3dc6098566d34a9886f9e97c88d93e Author: Christian Brauner Date: Tue Jun 21 16:14:50 2022 +0200 fs: introduce tiny iattr ownership update helpers Nearly all fileystems currently open-code the same checks for determining whether the i_{g,u}id fields of an inode need to be updated and then updating the fields. Introduce tiny helpers i_{g,u}id_needs_update() and i_{g,u}id_update() that wrap this logic. This allows filesystems to not care about updating inode->i_{g,u}id with the correct values themselves instead leaving this to the helpers. We also get rid of a lot of code duplication and make it easier to change struct iattr in the future since changes can be localized to these helpers. And finally we make it hard to conflate k{g,u}id_t types with vfs{g,u}id_t types for filesystems that support idmapped mounts. In the following patch we will port all filesystems that raise FS_ALLOW_IDMAP to use the new helpers. However, the ultimate goal is to convert all filesystems to make use of these helpers. All new helpers are nops on non-idmapped mounts. Link: https://lore.kernel.org/r/20220621141454.2914719-5-brauner@kernel.org Cc: Seth Forshee Cc: Christoph Hellwig Cc: Aleksa Sarai Cc: Linus Torvalds Cc: Al Viro CC: linux-fsdevel@vger.kernel.org Reviewed-by: Seth Forshee Signed-off-by: Christian Brauner (Microsoft) include/linux/fs.h | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit 45c311501c77217c50d08ed08aa722c812d92ab5 Author: Christian Brauner Date: Tue Jun 21 16:14:49 2022 +0200 fs: use mount types in iattr Add ia_vfs{g,u}id members of type vfs{g,u}id_t to struct iattr. We use an anonymous union (similar to what we do in struct file) around ia_{g,u}id and ia_vfs{g,u}id. At the end of this series ia_{g,u}id and ia_vfs{g,u}id will always contain the same value independent of whether struct iattr is initialized from an idmapped mount. This is a change from how this is done today. Wrapping this in a anonymous unions has a few advantages. It allows us to avoid needlessly increasing struct iattr. Since the types for ia_{g,u}id and ia_vfs{g,u}id are structures with overlapping/identical members they are covered by 6.5.2.3/6 of the C standard and it is safe to initialize and access them. Filesystems that raise FS_ALLOW_IDMAP and thus support idmapped mounts will have to use ia_vfs{g,u}id and the associated helpers. And will be ported at the end of this series. They will immediately benefit from the type safe new helpers. Filesystems that do not support FS_ALLOW_IDMAP can continue to use ia_{g,u}id for now. The aim is to convert every filesystem to always use ia_vfs{g,u}id and thus ultimately remove the ia_{g,u}id members. Link: https://lore.kernel.org/r/20220621141454.2914719-4-brauner@kernel.org Cc: Seth Forshee Cc: Christoph Hellwig Cc: Aleksa Sarai Cc: Linus Torvalds Cc: Al Viro CC: linux-fsdevel@vger.kernel.org Reviewed-by: Seth Forshee Signed-off-by: Christian Brauner (Microsoft) include/linux/fs.h | 18 ++++++++++++++++-- include/linux/mnt_idmapping.h | 5 +++++ 2 files changed, 21 insertions(+), 2 deletions(-) commit 234a3113f28d02973ecf501f83d796ea89db295f Author: Christian Brauner Date: Tue Jun 21 16:14:48 2022 +0200 fs: add two type safe mapping helpers Introduce i_{g,u}id_into_vfs{g,u}id(). They return vfs{g,u}id_t. This makes it way harder to confused idmapped mount {g,u}ids with filesystem {g,u}ids. The two helpers will eventually replace the old non type safe i_{g,u}id_into_mnt() helpers once we finished converting all places. Add a comment noting that they will be removed in the future. All new helpers are nops on non-idmapped mounts. Link: https://lore.kernel.org/r/20220621141454.2914719-3-brauner@kernel.org Cc: Seth Forshee Cc: Christoph Hellwig Cc: Aleksa Sarai Cc: Linus Torvalds Cc: Al Viro CC: linux-fsdevel@vger.kernel.org Reviewed-by: Seth Forshee Signed-off-by: Christian Brauner (Microsoft) include/linux/fs.h | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) commit 1e5267cd0895183e09c5bb76da85c674014285d0 Author: Christian Brauner Date: Tue Jun 21 16:14:47 2022 +0200 mnt_idmapping: add vfs{g,u}id_t Introduces new vfs{g,u}id_t types. Similar to k{g,u}id_t the new types are just simple wrapper structs around regular {g,u}id_t types. They allows to establish a type safety boundary between {g,u}ids on idmapped mounts and {g,u}ids as they are represented in filesystems themselves. A vfs{g,u}id_t is always created from a k{g,u}id_t, never directly from a {g,u}id_t as idmapped mounts remap a given {g,u}id according to the mount's idmapping. This is expressed in the VFS{G,U}IDT_INIT() macros. A vfs{g,u}id_t may be used as a k{g,u}id_t via AS_K{G,U}IDT(). This often happens when we need to check whether a {g,u}id mapped according to an idmapped mount is identical to a given k{g,u}id_t. For an example, see vfsgid_in_group_p() which determines whether the value of vfsgid_t matches the value of any of the caller's groups. Similar logic is expressed in the k{g,u}id_eq_vfs{g,u}id(). The from_vfs{g,u}id() helpers map a given vfs{g,u}id_t from the mount's idmapping into the filesystem idmapping. They make it possible to update a filesystem object such as inode->i_{g,u}id with the correct value. This makes it harder to accidently write a wrong {g,u}id anwywhere. The vfs{g,u}id_has_fsmapping() helpers check whether a given vfs{g,u}id_t can be mapped into the filesystem idmapping. All new helpers are nops on non-idmapped mounts. I've done work on this roughly 7 months ago but dropped it to focus on the testsuite. Linus brought this up independently just last week and it's time to move this along (see [1]). [1]: https://lore.kernel.org/lkml/CAHk-=win6+ahs1EwLkcq8apqLi_1wXFWbrPf340zYEhObpz4jA@mail.gmail.com Link: https://lore.kernel.org/r/20220621141454.2914719-2-brauner@kernel.org Cc: Seth Forshee Cc: Christoph Hellwig Cc: Aleksa Sarai Cc: Linus Torvalds Cc: Al Viro CC: linux-fsdevel@vger.kernel.org Reviewed-by: Seth Forshee Signed-off-by: Christian Brauner (Microsoft) include/linux/mnt_idmapping.h | 262 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 234 insertions(+), 28 deletions(-) commit 418ef34c006119a1cb7967b490c6d268bda845c2 Author: Krzysztof Kozlowski Date: Fri May 20 14:40:18 2022 +0200 dt-bindings: arm: qcom: switch maintainer to Bjorn Emails to Stephen bounce since long time ("Recipient address rejected: undeliverable address: No such user here."), so change maintainer to Qualcomm platform maintainer. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220520124018.367004-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/arm/qcom.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d114b94fc39210b88b203b57aaf04836a87a4f0 Author: Johan Hovold Date: Fri May 20 12:09:48 2022 +0200 clk: qcom: gcc-sc8280xp: use collapse-voting for PCIe GDSCs The PCIe GDSCs can be shared with other masters and should use the APCS collapse-vote register when updating the power state. This is specifically also needed to be able to disable power domains that have been enabled by boot firmware using the vote register. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220520100948.19622-4-johan+linaro@kernel.org drivers/clk/qcom/gcc-sc8280xp.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 77ea2bd72da4f61f59ad2e839babe83849f35dea Author: Johan Hovold Date: Fri May 20 12:09:47 2022 +0200 clk: qcom: gdsc: add support for collapse-vote registers Recent Qualcomm platforms have APCS collapse-vote registers that allow for sharing GDSCs with other masters (e.g. LPASS). Add support for using such vote registers instead of the control register when updating the GDSC power state. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220520100948.19622-3-johan+linaro@kernel.org drivers/clk/qcom/gdsc.c | 9 +++++++-- drivers/clk/qcom/gdsc.h | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) commit e73cb8527c597598599119fcd9c7d1752d9e9fd7 Author: Johan Hovold Date: Fri May 20 12:09:46 2022 +0200 clk: qcom: gdsc: add collapse-bit helper Add a helper for updating the SW_COLLAPSE bit during initialisation and state updates. Note that the update during initialisation was relying on the SW_COLLAPSE bit not having been set earlier rather than passing in zero explicitly to clear the collapse vote. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220520100948.19622-2-johan+linaro@kernel.org drivers/clk/qcom/gdsc.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit a20e55d4771c1bcb531f77434a953cd7acdd1687 Author: Julia Lawall Date: Sat May 21 13:10:19 2022 +0200 soc: qcom: rpmhpd: fix typos in comment Spelling mistakes (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220521111145.81697-9-Julia.Lawall@inria.fr drivers/soc/qcom/rpmhpd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1b3bfc4066c34da2f7808acf16344ac43722c2b7 Author: Vladimir Zapolskiy Date: Wed May 18 12:19:43 2022 +0300 arm64: dts: qcom: sm8250: Disable camcc by default At the moment there are no changes in SM8250 board files, which require camera clock controller to run, whenever it is needed for a particular board, the status of camcc device node will be changed in a board file. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220518091943.734478-1-vladimir.zapolskiy@linaro.org arch/arm64/boot/dts/qcom/sm8250.dtsi | 1 + 1 file changed, 1 insertion(+) commit c4f40351901a10cd662ac2c081396d8fb04f584d Author: Vladimir Zapolskiy Date: Wed May 18 13:35:54 2022 +0300 clk: qcom: camcc-sm8250: Fix halt on boot by reducing driver's init level Access to I/O of SM8250 camera clock controller IP depends on enabled GCC_CAMERA_AHB_CLK clock supplied by global clock controller, the latter one is inited on subsys level, so, to satisfy the dependency, it would make sense to deprive the init level of camcc-sm8250 driver. If both drivers are compiled as built-in, there is a change that a board won't boot up due to a race, which happens on the same init level. Fixes: 5d66ca79b58c ("clk: qcom: Add camera clock controller driver for SM8250") Signed-off-by: Vladimir Zapolskiy Reviewed-by: Bryan O'Donoghue Tested-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220518103554.949511-1-vladimir.zapolskiy@linaro.org drivers/clk/qcom/camcc-sm8250.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit d11a34a404ee5565ce8e0abe3e2b9ce6f5cc0a4b Author: Krzysztof Kozlowski Date: Thu May 19 09:33:01 2022 +0200 soc: qcom: correct kerneldoc Correct kerneldoc warnings like: drivers/soc/qcom/mdt_loader.c:126: warning: Function parameter or member 'fw_name' not described in 'qcom_mdt_read_metadata' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220519073301.7072-2-krzysztof.kozlowski@linaro.org drivers/soc/qcom/mdt_loader.c | 4 +++- drivers/soc/qcom/smp2p.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) commit ac0126a0173531d91d164e244ed1ebbee64bcd54 Author: Krzysztof Kozlowski Date: Thu May 19 09:33:00 2022 +0200 soc: qcom: cmd-db: replace strncpy() with strscpy_pad() The use of strncpy() is considered deprecated for NUL-terminated strings[1]. Replace strncpy() with strscpy_pad(), to keep existing pad-behavior of strncpy. This fixes W=1 warning: drivers/soc/qcom/cmd-db.c: In function ‘cmd_db_get_header.part.0’: drivers/soc/qcom/cmd-db.c:151:9: warning: ‘strncpy’ specified bound 8 equals destination size [-Wstringop-truncation] 151 | strncpy(query, id, sizeof(query)); [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220519073301.7072-1-krzysztof.kozlowski@linaro.org drivers/soc/qcom/cmd-db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebf21bbc2ff56ad42994f04ada64280bc819bb0b Author: Krzysztof Kozlowski Date: Thu May 19 09:34:10 2022 +0200 firmware: qcom_scm-legacy: correct kerneldoc Correct kerneldoc warnings like: drivers/firmware/qcom_scm-legacy.c:133: warning: Function parameter or member 'dev' not described in 'scm_legacy_call' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220519073410.7358-1-krzysztof.kozlowski@linaro.org drivers/firmware/qcom_scm-legacy.c | 4 ++++ 1 file changed, 4 insertions(+) commit 86b78de5fd4ba550a239dea9cade355fd58efa56 Author: Krzysztof Kozlowski Date: Wed Jun 22 13:51:09 2022 +0200 dt-bindings: firmware: document Qualcomm QCS404 and SM6125 SCM Document the compatible for Qualcomm QCS404 and SM6125 SCM. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220622115109.6724-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/firmware/qcom,scm.txt | 2 ++ 1 file changed, 2 insertions(+) commit bc0f149376894343839c4b156fa5653958fda496 Author: Uwe Kleine-König Date: Sat Jun 18 22:39:13 2022 +0200 soc: qcom: apr: Drop redundant check in .remove() The remove callback is only called by the driver core if there is a driver to unbind, so there is no need to check dev->driver to be non-NULL. Signed-off-by: Uwe Kleine-König Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220618203913.35785-1-u.kleine-koenig@pengutronix.de drivers/soc/qcom/apr.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 48aa636285ad76c7cc08d080e4c2a1fb955b9f11 Author: Dmitry Baryshkov Date: Fri Jun 17 15:29:22 2022 +0300 arm64: dts: qcom: msm8996: add clocks to the MMCC device node As we are converting this platform to use DT clock bindings, add clocks and clock-names properties to the MMCC device tree node. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220617122922.769562-7-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit f5837418479a3f0fafca601ec83eaee0465b5a9e Author: Dmitry Baryshkov Date: Mon May 2 22:51:33 2022 +0300 arm64: dts: qcom: sm8450: add uart20 node Add device tree node for uart20, which is typically used for Bluetooth attachment. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220502195133.275209-1-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sm8450.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit a57de71f0980aeaef4c1c1e88bb2d396b9ccb650 Author: Srinivasa Rao Mandadapu Date: Fri Apr 22 15:32:14 2022 +0530 arm64: dts: qcom: sc7280-qcard: Add ldo_l17b regulator node Add pm7325 ldo_l17b regulator, which is required for wcd codec vdd buck supply on sc7280-qcard board. Signed-off-by: Srinivasa Rao Mandadapu Co-developed-by: Venkata Prasad Potturu Signed-off-by: Venkata Prasad Potturu Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1650621734-10297-1-git-send-email-quic_srivasam@quicinc.com arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit d756a0b29f4013badc9d3b4ee7c24d4a700cbac9 Author: Douglas Anderson Date: Thu May 5 16:14:30 2022 -0700 arm64: dts: qcom: sc7280: Set SPI flash to 50 MHz for herobrine boards sc7280-herobrine based boards are specced to be able to access their SPI flash at 50 MHz with the drive strength of the pins set at 8. The drive strength is already set to 8 in "sc7280-herobrine.dtsi", so let's bump up the clock. The matching firmware change for this is at: https://review.coreboot.org/c/coreboot/+/63948 NOTE: the firmware change isn't _required_ to make the kernel work at 50 MHz, it merely shows that the boards are known to work fine at 50 MHz. ALSO NOTE: this doesn't update the "sc7280-chrome-common.dtsi" file which is used by both herobrine boards and IDP. At the moment the IDP boards aren't configuring a drive strength of 8 and it seems safer to just leave them at the slower speed if they're already working. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220505161425.1.Icf6f3796d2fa122b4c0566d9317b461bfbc24b7f@changeid arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 1c20d3dbaa673a5d5dc6bcef06df0e0813b95c7d Author: Matthias Kaehlcke Date: Tue May 10 10:47:08 2022 -0700 arm64: dts: qcom: sc7280: Set modem FW path for Chrome OS boards Specify the path of the modem FW for SC7280 Chrome OS boards in the 'remoteproc_mpss' node. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220510104656.1.Id98b473e08c950f9a461826dde187ef7705a928c@changeid arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 4ab03ef8b33c2c80ac39da32c05f90f594b32e79 Author: Douglas Anderson Date: Fri May 13 06:57:14 2022 -0700 arm64: qcom: sc7280-herobrine: Enable DP This enables DisplayPort for herobrine boards. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Abhinav Kumar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220513065704.1.I9b9b9d4d1a3e0350a89221892261881a1771ad15@changeid arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit e60414644cf3a703e10ed4429c15263095945ffe Author: Stephen Boyd Date: Tue May 17 12:33:07 2022 -0700 arm64: dts: qcom: sc7180: Remove ipa_fw_mem node on trogdor We don't use this carveout on trogdor boards, and having it defined in the sc7180 SoC file causes an overlap message to be printed at boot. OF: reserved mem: OVERLAP DETECTED! memory@86000000 (0x0000000086000000--0x000000008ec00000) overlaps with memory@8b700000 (0x000000008b700000--0x000000008b710000) Delete the node in the trogdor dtsi file to fix the overlap problem and remove the error message. Cc: Alex Elder Cc: Matthias Kaehlcke Fixes: 310b266655a3 ("arm64: dts: qcom: sc7180: define ipa_fw_mem node") Signed-off-by: Stephen Boyd Reviewed-by: Alex Elder Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220517193307.3034602-1-swboyd@chromium.org arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 1 + 1 file changed, 1 insertion(+) commit 2a77ada5168af6c4ab8df1ea13655245f149b3fe Author: Matthias Kaehlcke Date: Wed May 18 15:52:55 2022 -0700 arm64: dts: qcom: sc7280: Enable wifi for Chrome OS boards Enable the 'wifi' and 'remoteproc_wpss' nodes for all sc7280 based Chrome OS boards. Delete the corresponding entries from sc7280-idp.dtsi since this file includes sc7280-chrome-common.dtsi. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220518155252.1.I176d4254c79cfaafa38cbe36f066f02f819df9b6@changeid arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi | 13 +++++++++++++ arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 11 ----------- 2 files changed, 13 insertions(+), 11 deletions(-) commit 5069fe941f76c9f37abc98636a7db33a5ac72840 Author: Douglas Anderson Date: Fri May 20 14:38:45 2022 -0700 dt-bindings: arm: qcom: Add more sc7180 Chromebook board bindings This adds board bindings for boards that are downstream but not quite upstream yet. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220520143502.v4.5.Ie8713bc0377672ed8dd71189e66fc0b77226fb85@changeid Documentation/devicetree/bindings/arm/qcom.yaml | 92 +++++++++++++++++++++++++ 1 file changed, 92 insertions(+) commit 707b9b08789bf3312c9cf23c621ad942de9aa48c Author: Douglas Anderson Date: Fri May 20 14:38:44 2022 -0700 dt-bindings: arm: qcom: Add / fix sc7280 board bindings This copy-pastes compatibles from sc7280-based boards from the device trees to the yaml file. It also fixes the CRD/IDP bindings which had gotten stale. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220520143502.v4.4.I1318c1ae2ce55ade1d092fc21df846360b15c560@changeid Documentation/devicetree/bindings/arm/qcom.yaml | 42 ++++++++++++++++++++----- 1 file changed, 34 insertions(+), 8 deletions(-) commit 3b8bfe002c4ba633b48cc497238a69eb88346a60 Author: Douglas Anderson Date: Fri May 20 14:38:43 2022 -0700 dt-bindings: arm: qcom: Add sc7180 Chromebook board bindings This copy-pastes compatibles from sc7180-based boards from the device trees to the yaml file so that `make dtbs_check` will be happy. NOTES: - I make no attempt to try to share an "item" for all sc7180 based Chromebooks. Because of the revision matching scheme used by the Chromebook bootloader, at times we need a different number of revisions listed. - Some of the odd entries in here (like google,homestar-rev23 or the fact that "Google Lazor Limozeen without Touchscreen" changed from sku5 to sku6) are not typos but simply reflect reality. - Many revisions of boards here never actually went to consumers, but they are still in use within various companies that were involved in Chromebook development. Since Chromebooks are developed with an "upstream first" methodology, having these revisions supported with upstream Linux is important. Making it easy for Chromebooks to be developed with an "upstream first" methodology is valuable to the upstream community because it improves the quality of upstream and gets Chromebooks supported with vanilla upstream faster. One other note here is that, though the bootloader effectively treats the list of compatibles in a given device tree as unordered, some people would prefer future boards to list higher-numbered revisions first in the list. Chromebooks here are not changing and typically list lower revisions first just to avoid churn. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220520143502.v4.3.I9804fcd5d6c8552ab25f598dd7a3ea71b15b55f0@changeid Documentation/devicetree/bindings/arm/qcom.yaml | 182 +++++++++++++++++++++++- 1 file changed, 181 insertions(+), 1 deletion(-) commit dbbccb3db122558b35ecb4c87a86bbad37c80862 Author: Douglas Anderson Date: Fri May 20 14:38:42 2022 -0700 dt-bindings: arm: qcom: Mention that Chromebooks use a different scheme The qcom.yaml bindings file has a whole description of what the top-level compatible should look like for Qualcomm devices. It doesn't match what Chromebooks do, so add a link to the Chromebook docs. Reported-by: Stephen Boyd Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220520143502.v4.2.I6418884d8bab6956c7016304f45adc7df808face@changeid Documentation/devicetree/bindings/arm/qcom.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit 59228d3b9060b0e5e6b37ceca078fd81a165cfc9 Author: Douglas Anderson Date: Fri May 20 14:38:41 2022 -0700 dt-bindings: Document how Chromebooks with depthcharge boot This documents how many Chromebooks pick the device tree that will be passed to the OS and can help understand the revisions / SKUs listed as the top-level "compatible" in many Chromebooks. Signed-off-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220520143502.v4.1.I71e42c6174f1cec17da3024c9f73ba373263b9b6@changeid Documentation/arm/google/chromebook-boot-flow.rst | 69 +++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit 1a22eff4b429f9da9e4259d019cc809ba7b4593c Author: Matthias Kaehlcke Date: Mon May 23 12:32:04 2022 -0700 arm64: dts: qcom: sc7280: Enable keyboard backlight for villager Villager has a backlit keyboard, enable support for the backlight. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220523123157.v2.2.I3d1b5a109675a0cc90e66a4e0b45cb823edbdee7@changeid arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 426e81c7e6250723eb37c8a05187e28eef17484f Author: Matthias Kaehlcke Date: Mon May 23 12:32:03 2022 -0700 arm64: dts: qcom: sc7280: herobrine: Don't disable the keyboard backlight node On herobrine boards the keyboard backlight is controlled through the PWM LED driver. Currently both the PWM LED node and the node for the keyboard backlight are disabled in sc7280-herobrine.dtsi, which requires boards with a backlit keyboard to enable both nodes. There are no other PWM LEDs on herobrine boards besides the keyboard backlight, delete the 'disabled' status from the keyboard backlight node, with that boards only have to enable the 'pwmleds' node for keyboard backlight support. Also add a label to the 'pwmleds' node to allow board files to refer to it with a phandle. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220523123157.v2.1.I47ec78581907f7ef024f10bc085f970abf01ec11@changeid arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e58539532bab3cbe5b1ba71d54db6d6b7d4eeced Author: Douglas Anderson Date: Tue May 24 13:48:49 2022 -0700 arm64: dts: qcom: sc7280: Add touchscreen to villager This adds the touchscreen to the sc7280-herobrine-villager device tree. Note that the touchscreen on villager actually uses the reset line and thus we use the more specific "elan,ekth6915" compatible which allows us to specify the reset. The fact that villager's touchscreen uses the reset line can be contrasted against the touchscreen for CRD/herobrine-r1. On those boards, even though the touchscreen goes to the display, it's not hooked up to anything there. In order to keep the line parked on herobrine/CRD, we'll move the pullup from the qcard.dtsi file to the specific boards. This allows us to disable the pullup in the villager device tree since the pin is an output. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220524134840.1.I80072b8815ac08c12af8f379a33cc2d83693dc51@changeid arch/arm64/boot/dts/qcom/sc7280-herobrine-crd.dts | 11 ++++++++++ .../dts/qcom/sc7280-herobrine-herobrine-r1.dts | 11 ++++++++++ .../boot/dts/qcom/sc7280-herobrine-villager-r0.dts | 25 ++++++++++++++++++++++ arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi | 1 - 4 files changed, 47 insertions(+), 1 deletion(-) commit 1ecbc2b37f9c880e93e062901a107ea51d6101d1 Merge: e7c659124c9a 553d12b20c10 Author: Bjorn Andersson Date: Sat Jun 25 21:38:04 2022 -0500 Merge tag '20220608105238.2973600-1-dmitry.baryshkov@linaro.org' into clk-for-5.20 v5.19-rc1 + 20220608105238.2973600-2-dmitry.baryshkov@linaro.org + 20220608105238.2973600-3-dmitry.baryshkov@linaro.org + 20220608105238.2973600-4-dmitry.baryshkov@linaro.org commit 553d12b20c10953617cc195f9e447a177c776f9d Author: Dmitry Baryshkov Date: Wed Jun 8 13:52:36 2022 +0300 clk: qcom: gcc-sc7280: use new clk_regmap_phy_mux_ops for PCIe pipe clocks Use newly defined clk_regmap_phy_mux_ops for PCIe pipe clocks to let the clock framework automatically park the clock when the clock is switched off and restore the parent when the clock is switched on. Reviewed-by: Johan Hovold Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220608105238.2973600-4-dmitry.baryshkov@linaro.org drivers/clk/qcom/gcc-sc7280.c | 49 +++++++++++++------------------------------ 1 file changed, 15 insertions(+), 34 deletions(-) commit 7ee9d2e8b9c9f4a829cd2d77c8cba36c514f24ba Author: Dmitry Baryshkov Date: Wed Jun 8 13:52:35 2022 +0300 clk: qcom: gcc-sm8450: use new clk_regmap_phy_mux_ops for PCIe pipe clocks Use newly defined clk_regmap_phy_mux_ops for PCIe pipe clocks to let the clock framework automatically park the clock when the clock is switched off and restore the parent when the clock is switched on. Reviewed-by: Johan Hovold Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220608105238.2973600-3-dmitry.baryshkov@linaro.org drivers/clk/qcom/gcc-sm8450.c | 49 ++++++++++++------------------------------- 1 file changed, 13 insertions(+), 36 deletions(-) commit 74e4190cdebe5a4aa099185edb4db418fc9883e3 Author: Dmitry Baryshkov Date: Wed Jun 8 13:52:34 2022 +0300 clk: qcom: regmap: add PHY clock source implementation On recent Qualcomm platforms the QMP PIPE clocks feed into a set of muxes which must be parked to the "safe" source (bi_tcxo) when corresponding GDSC is turned off and on again. Currently this is handcoded in the PCIe driver by reparenting the gcc_pipe_N_clk_src clock. However the same code sequence should be applied in the pcie-qcom endpoint, USB3 and UFS drivers. Rather than copying this sequence over and over again, follow the example of clk_rcg2_shared_ops and implement this parking in the enable() and disable() clock operations. Supplement the regmap-mux with the new clk_regmap_phy_mux type, which implements such multiplexers as a simple gate clocks. This is possible since each of these multiplexers has just two clock sources: one coming from the PHY and a reference (XO) one. If the clock is running off the from-PHY source, report it as enabled. Report it as disabled otherwise (if it uses reference source). This way the PHY will disable the pipe clock before turning off the GDSC, which in turn would lead to disabling corresponding pipe_clk_src (and thus it being parked to a safe, reference clock source). And vice versa, after enabling the GDSC the PHY will enable the pipe clock, which would cause pipe_clk_src to be switched from a safe source to the working one. Reviewed-by: Johan Hovold Tested-by: Johan Hovold Reported-by: kernel test robot Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220608105238.2973600-2-dmitry.baryshkov@linaro.org drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/clk-regmap-phy-mux.c | 62 +++++++++++++++++++++++++++++++++++ drivers/clk/qcom/clk-regmap-phy-mux.h | 33 +++++++++++++++++++ 3 files changed, 96 insertions(+) commit d7f396461518c766b2436d64b6d3ba6a4c418dcf Author: Christophe Leroy Date: Thu Jun 23 12:08:36 2022 +0200 powerpc/powermac: Remove empty function note_scsi_host() note_scsi_host() has been an empty function since commit 6ee0d9f744d4 ("[POWERPC] Remove unused old code from powermac setup code"). Remove it. Reported-by: kernel test robot Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/26f8b72a4276c0bd8ed63860c7316f6361c351b4.1655978907.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/setup.h | 1 - arch/powerpc/platforms/powermac/setup.c | 7 ------- drivers/scsi/mesh.c | 5 ----- 3 files changed, 13 deletions(-) commit 2d386769753a71e57a1a38c7fb79013d3ac451e9 Author: Michael Ellerman Date: Fri Jun 17 18:02:43 2022 +1000 powerpc: Update asm-prototypes.h comment This header was recently cleaned up in commit 76222808fc25 ("powerpc: Move C prototypes out of asm-prototypes.h"), update the comment to reflect it's proper purpose. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220617080243.2177583-1-mpe@ellerman.id.au arch/powerpc/include/asm/asm-prototypes.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4228a996b072d36f3baafb4afdc2d2d66d2cbadf Author: Michael Ellerman Date: Mon Jun 20 09:31:03 2022 +1000 selftests/powerpc: Skip energy_scale_info test on older firmware Older machines don't have the firmware feature that enables the code this test is testing. Skip the test if the sysfs directory doesn't exist. Also use the FAIL_IF() macro to provide more verbose error reporting if an error is encountered. Fixes: 57201d657eb7 ("selftest/powerpc: Add PAPR sysfs attributes sniff test") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220619233103.2666171-1-mpe@ellerman.id.au .../selftests/powerpc/papr_attributes/attr_test.c | 30 +++++++++++++--------- 1 file changed, 18 insertions(+), 12 deletions(-) commit 2e0a5241577c8893757d4e86f38f26848c0ec4d0 Author: Guodong Liu Date: Fri Jun 24 21:37:00 2022 +0800 pinctrl: mediatek: fix the pinconf definition of some GPIO pins Remove pin definitions that do not support the R0 & R1 pinconfig property. Signed-off-by: Guodong Liu Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220624133700.15487-6-guodong.liu@mediatek.com Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mt8192.c | 60 ------------------------------- 1 file changed, 60 deletions(-) commit 23b044e5c966af3054c7576f18a3d90668a636b5 Author: Guodong Liu Date: Fri Jun 24 21:36:59 2022 +0800 pinctrl: mediatek: dropping original advanced drive configuration function Function bias_combo getter/setters already handle all cases advanced drive configuration, include drive for I2C related pins. Signed-off-by: Guodong Liu Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220624133700.15487-5-guodong.liu@mediatek.com Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mt8192.c | 2 -- 1 file changed, 2 deletions(-) commit fe44e49840186c93ae26e3eda2c48c823fc7f33f Author: Guodong Liu Date: Fri Jun 24 21:36:58 2022 +0800 pinctrl: mediatek: add rsel setting on mt8192 1. I2C pins's resistance value can be controlled by rsel register. This patch provides rsel (resistance selection) setting on mt8192. 2. Also add the missing pull type array for mt8192 to document the pull type of each pin and prevent invalid pull type settings. Signed-off-by: Guodong Liu Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220624133700.15487-4-guodong.liu@mediatek.com Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mt8192.c | 136 ++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) commit e104141a13a83452a6652651bed99bcdfd0f2874 Author: Guodong Liu Date: Fri Jun 24 21:36:57 2022 +0800 pinctrl: mediatek: add drive for I2C related pins on mt8192 This patch provides the advanced drive raw data setting version for I2C used pins on mt8192. Signed-off-by: Guodong Liu Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220624133700.15487-3-guodong.liu@mediatek.com Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mt8192.c | 96 +++++++++---------------------- 1 file changed, 26 insertions(+), 70 deletions(-) commit a36474f59ace0122fa739df99408dcb77c50d6ed Author: Guodong Liu Date: Fri Jun 24 21:36:56 2022 +0800 pinctrl: mediatek: add generic driving setup property on mt8192 1. The dt-binding expects that drive-strength arguments be passed in mA, but the driver was expecting raw values. And that this commit changes the driver so that it is aligned with the binding. 2. This commit provides generic driving setup, which support 2/4/6/8/10/12/14/16mA driving, original driver just set raw data setup setting when use drive-strength property. Signed-off-by: Guodong Liu Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220624133700.15487-2-guodong.liu@mediatek.com Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mt8192.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 08752e0749ba3c3d830d1899ea4ca8cf1980d584 Author: Stefan Wahren Date: Tue Jun 14 22:28:31 2022 +0200 pinctrl: bcm2835: Make the irqchip immutable Commit 6c846d026d49 ("gpio: Don't fiddle with irqchips marked as immutable") added a warning to indicate if the gpiolib is altering the internals of irqchips. The bcm2835 pinctrl is also affected by this warning. Fix this by making the irqchip in the bcm2835 pinctrl driver immutable. Signed-off-by: Stefan Wahren Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20220614202831.236341-3-stefan.wahren@i2se.com Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-bcm2835.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit db1b3ecee9dbb010f0ac951e3953167f5e088c6f Author: Stefan Wahren Date: Tue Jun 14 22:28:30 2022 +0200 pinctrl: bcm2835: drop irq_enable/disable callbacks The commit b8a19382ac62 ("pinctrl: bcm2835: Fix support for threaded level triggered IRQs") assigned the irq_mask/unmask callbacks with the already existing functions for irq_enable/disable. The wasn't completely the right way (tm) to fix the issue, because these callbacks shouldn't be identical. So fix this by rename the functions to represent their intension and drop the unnecessary irq_enable/disable assigment. Suggested-by: Marc Zyngier Signed-off-by: Stefan Wahren Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20220614202831.236341-2-stefan.wahren@i2se.com Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-bcm2835.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit f9446fd1e9471b25f0d93bbba17e60724aff89d5 Author: Lukas Bulwahn Date: Mon Jun 13 14:29:55 2022 +0200 MAINTAINERS: add include/dt-bindings/pinctrl to PIN CONTROL SUBSYSTEM Maintainers of the directory Documentation/devicetree/bindings/pinctrl are also the maintainers of the corresponding directory include/dt-bindings/pinctrl. Add the file entry for include/dt-bindings/pinctrl to the appropriate section in MAINTAINERS. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220613122955.20714-1-lukas.bulwahn@gmail.com Signed-off-by: Linus Walleij MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 44339391c666e46cba522d19c65a6ad1071c68b7 Author: Nikita Travkin Date: Sun Jun 12 19:59:54 2022 +0500 pinctrl: qcom: msm8916: Allow CAMSS GP clocks to be muxed GPIO 31, 32 can be muxed to GCC_CAMSS_GP(1,2)_CLK respectively but the function was never assigned to the pingroup (even though the function exists already). Add this mode to the related pins. Fixes: 5373a2c5abb6 ("pinctrl: qcom: Add msm8916 pinctrl driver") Signed-off-by: Nikita Travkin Link: https://lore.kernel.org/r/20220612145955.385787-4-nikita@trvn.ru Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-msm8916.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 36fe26843d6dde34b65c3273c63bb12fd036239d Author: Srinivasa Rao Mandadapu Date: Sat Jun 11 09:52:37 2022 +0530 pinctrl: qcom: sc7280: Add clock optional check for ADSP bypass targets Update lpass lpi pin control driver, with clock optional check for ADSP disabled platforms. This check required for distingushing ADSP based platforms and ADSP bypass platforms. In case of ADSP enabled platforms, where audio is routed through ADSP macro and decodec GDSC Switches are triggered as clocks by pinctrl driver and ADSP firmware controls them. So It's mandatory to enable them in ADSP based solutions. In case of ADSP bypass platforms clock voting is optional as these macro and dcodec GDSC switches are maintained as power domains and operated from lpass clock drivers. Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1654921357-16400-3-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 2 ++ drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) commit 174eceeafb5afbfbc34f28b76c3a486cd8acf514 Author: Srinivasa Rao Mandadapu Date: Sat Jun 11 09:52:36 2022 +0530 dt-bindings: pinctrl: qcom: sc7280: Add boolean param for ADSP bypass platforms Add boolean param qcom,adsp-bypass-mode to support adsp bypassed sc7280 platforms. Which is required to make clock voting as optional for ADSP bypass platforms. Signed-off-by: Srinivasa Rao Mandadapu Acked-by: Rob Herring Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1654921357-16400-2-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit e7c659124c9a031c48e2fecf72c849cb63f9497b Author: Dmitry Baryshkov Date: Fri Jun 17 15:29:21 2022 +0300 clk: qcom: mmcc-msm8996: use parent_hws/_data instead of parent_names Convert the clock driver to specify parent data rather than parent names, to actually bind using 'clock-names' specified in the DTS rather than global clock names. Use parent_hws where possible to refer parent clocks directly, skipping the lookup. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220617122922.769562-6-dmitry.baryshkov@linaro.org drivers/clk/qcom/mmcc-msm8996.c | 734 +++++++++++++++++++++++++++------------- 1 file changed, 495 insertions(+), 239 deletions(-) commit 208c564fe66e2f76abb29468d067223eb50b3005 Author: Dmitry Baryshkov Date: Fri Jun 17 15:29:20 2022 +0300 clk: qcom: mmcc-msm8996: move clock parent tables down Move clock parent tables down, after the MMPLL declrataions, so that we can use gpll hw clock fields in the next commit. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220617122922.769562-5-dmitry.baryshkov@linaro.org drivers/clk/qcom/mmcc-msm8996.c | 364 ++++++++++++++++++++-------------------- 1 file changed, 182 insertions(+), 182 deletions(-) commit a7a4fc9498f55f3e91f89a19f74e2016c3e7f62f Author: Dmitry Baryshkov Date: Fri Jun 17 15:29:19 2022 +0300 clk: qcom: mmcc-msm8996: use ARRAY_SIZE instead of specifying num_parents Use ARRAY_SIZE() instead of manually specifying num_parents. This makes adding/removing entries to/from parent_data easy and errorproof. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220617122922.769562-4-dmitry.baryshkov@linaro.org drivers/clk/qcom/mmcc-msm8996.c | 88 ++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 44 deletions(-) commit c19698a9e41bd6cf6dc3be436ed625e5182343ca Author: Jiang Jian Date: Tue Jun 21 17:49:24 2022 +0800 firmware: qcom_scm: drop unexpected word "the" there is an unexpected word "the" in the comments that need to be dropped > * will cause the the boot stages to enter download mode, unless Signed-off-by: Jiang Jian Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220621094924.83135-1-jiangjian@cdjrlc.com drivers/firmware/qcom_scm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29f66b625281a3026653fd33b710771a4ae394d2 Author: Stephen Boyd Date: Tue May 17 12:09:49 2022 -0700 clk: qcom: rpmh: Add note about sleep/wake state for BCMs The sleep/wake state doesn't need to be set here because of specific RPMh behavior that carries over the active state when sleep/wake state hasn't been modified. Add a note to the code so we aren't tempted to set the sleep/wake states. Cc: Alex Elder Cc: Taniya Das Signed-off-by: Stephen Boyd Reviewed-by: Alex Elder Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220517190949.2922197-1-swboyd@chromium.org drivers/clk/qcom/clk-rpmh.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0f0eca0ccb9b37743466fbd1b388a04ea0307b89 Author: Douglas Anderson Date: Mon May 23 08:54:57 2022 -0700 soc: qcom: socinfo: Add an ID for sc7180P Some sc7180 Chromebooks actually have sc7180P (known by many names, apparently, including possibly sc7180 Pro and sc7185). This is a sc7180 part that has slightly higher clock speeds. The official ID number allocated to these devices by Qualcomm is 495 so we'll add an entry to the table for them. Note that currently shipping BIOS for these devices will actually end up reporting an ID of 407 due to a bug but eventually a new BIOS will be released which corrects it to 495. Signed-off-by: Douglas Anderson Reviewed-by: Sai Prakash Ranjan Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220523085437.v3.1.I26eca1856f99e6160d30de6d50ecab60e6226354@changeid drivers/soc/qcom/socinfo.c | 1 + 1 file changed, 1 insertion(+) commit a4c1fc8cff056461b9bd0e07e775f93073b4d527 Author: Srinivasa Rao Mandadapu Date: Mon Jun 13 13:54:05 2022 +0530 arm64: dts: qcom: sc7280-herobrine: Add lpi pinmux properties for CRD 3.0/3.1 Add LPASS LPI pinctrl properties, which are required for Audio functionality on herobrine based platforms of rev5+ (aka CRD 3.0/3.1) boards. Signed-off-by: Srinivasa Rao Mandadapu Co-developed-by: Venkata Prasad Potturu Signed-off-by: Venkata Prasad Potturu Reviewed-by: Matthias Kaehlcke Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1655108645-1517-5-git-send-email-quic_srivasam@quicinc.com arch/arm64/boot/dts/qcom/sc7280-herobrine-crd.dts | 61 +++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 32d4541abe0f981cbcc45e142543d5811fd07692 Author: Srinivasa Rao Mandadapu Date: Mon Jun 13 13:54:04 2022 +0530 arm64: dts: qcom: sc7280: add lpass lpi pin controller node Add LPASS LPI pinctrl node required for Audio functionality on sc7280 based platforms. Signed-off-by: Srinivasa Rao Mandadapu Co-developed-by: Venkata Prasad Potturu Signed-off-by: Venkata Prasad Potturu Reviewed-by: Stephen Boyd Reviewed-by: Matthias Kaehlcke Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1655108645-1517-4-git-send-email-quic_srivasam@quicinc.com arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 62 +++++++++++++++++++++ arch/arm64/boot/dts/qcom/sc7280.dtsi | 92 ++++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+) commit 06c73a39c38b9321e638002450dcb22aa592ae99 Author: Srinivasa Rao Mandadapu Date: Mon Jun 13 13:54:03 2022 +0530 arm64: dts: qcom: sc7280: Add secondary MI2S pinmux specifications for CRD 3.0/3.1 Add drive strength property for secondary MI2S on sc7280 based platforms of rev5+ (aka CRD 3.0/3.1) boards. Signed-off-by: Srinivasa Rao Mandadapu Co-developed-by: Venkata Prasad Potturu Signed-off-by: Venkata Prasad Potturu Reviewed-by: Matthias Kaehlcke Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1655108645-1517-3-git-send-email-quic_srivasam@quicinc.com .../dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi | 20 ++++++++++++++++++++ arch/arm64/boot/dts/qcom/sc7280-herobrine-crd.dts | 1 + 2 files changed, 21 insertions(+) commit b9e3f65ecf85854c9717467c3cffaca194edd19f Author: Srinivasa Rao Mandadapu Date: Mon Jun 13 13:54:02 2022 +0530 arm64: dts: qcom: sc7280: Add pinmux for I2S speaker and Headset Add pinmux nodes for primary and secondary I2S for SC7280 based platforms. Signed-off-by: Srinivasa Rao Mandadapu Co-developed-by: Venkata Prasad Potturu Signed-off-by: Venkata Prasad Potturu Reviewed-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1655108645-1517-2-git-send-email-quic_srivasam@quicinc.com arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 14 +++++++++++ arch/arm64/boot/dts/qcom/sc7280.dtsi | 40 ++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) commit b74f7b8f174f0ce2261cc05050dcbfed3314ab1e Author: Dang Huynh Date: Mon Apr 25 10:28:24 2022 +0700 arm64: dts: qcom: sdm660-xiaomi-lavender: Configure WLED WLED is used for controlling display backlight on this phone. Signed-off-by: Dang Huynh Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220425032824.211975-1-danct12@riseup.net arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit c5bca38d2edc8a8030a8f1b99115480046c5bd7d Author: Eric Biggers Date: Mon Jun 6 15:32:41 2022 -0700 f2fs: use the updated test_dummy_encryption helper functions Switch f2fs over to the functions that are replacing fscrypt_set_test_dummy_encryption(). Since f2fs hasn't been converted to the new mount API yet, this doesn't really provide a benefit for f2fs. But it allows fscrypt_set_test_dummy_encryption() to be removed. Also take the opportunity to eliminate an #ifdef. Reviewed-by: Chao Yu Signed-off-by: Eric Biggers Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit c3d396120d68c40cdf2a2da70eff3bf8806f0ff5 Merge: ec30c109391c ce87c0f1b859 Author: Marc Kleine-Budde Date: Sat Jun 25 13:08:41 2022 +0200 Merge branch 'preparation-for-supporting-esd-CAN-USB-3' Frank Jungclaus says: ==================== All following 5 patches must be seen as preparation for adding support of the newly available esd CAN-USB/3 to esd_usb2.c. After having gained some confidence and experience on sending patches to linux-can@vger.kernel.org, I'll again submit the code changes for CAN-USB/3 support as step #2. ==================== Link: https://lore.kernel.org/all/20220624190517.2299701-1-frank.jungclaus@esd.eu Signed-off-by: Marc Kleine-Budde commit ce87c0f1b8592e4f934bac16c44a801b7cfa7123 Author: Frank Jungclaus Date: Fri Jun 24 21:05:19 2022 +0200 can/esd_usb: Update to copyright, M_AUTHOR and M_DESCRIPTION - Brought the copyright notice up to date - Also regarding the changed company name from esd electronic system design gmbh to esd electronics gmbh - Using socketcan@esd.eu as a generic mail address for matthias who left esd 6 years before - Added a second MODULE_AUTHOR() for Frank Jungclaus Link: https://lore.kernel.org/all/20220624190517.2299701-6-frank.jungclaus@esd.eu Signed-off-by: Frank Jungclaus Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/esd_usb.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 2244610050c8eaa02a696dbe2966ce584eda8a6b Author: Frank Jungclaus Date: Fri Jun 24 21:05:18 2022 +0200 can/esd_usb: Fixed some checkpatch.pl warnings Link: https://lore.kernel.org/all/20220624190517.2299701-5-frank.jungclaus@esd.eu Signed-off-by: Frank Jungclaus Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/esd_usb.c | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) commit 4d54977fe3f43dde2d7a28679fc259b7a593b1bb Author: Frank Jungclaus Date: Fri Jun 24 21:05:17 2022 +0200 can/esd_usb: Rename all terms USB2 to USB Each occurrence of the term "usb2" within variables, function names, comments, etc. is changed to "usb" where it is shared for all esd CAN/USB devices. Link: https://lore.kernel.org/all/20220624190517.2299701-4-frank.jungclaus@esd.eu Signed-off-by: Frank Jungclaus Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/esd_usb.c | 213 +++++++++++++++++++++--------------------- 1 file changed, 109 insertions(+), 104 deletions(-) commit f4a45ef328a2e3b751f9cf0f6bb25786a4d05d15 Author: Frank Jungclaus Date: Fri Jun 24 21:05:16 2022 +0200 can/esd_usb: Add an entry to the MAINTAINERS file As suggested by Marc, I added an entry for ESD CAN/USB Drivers to the MAINTAINERS file Link: https://lore.kernel.org/all/20220624190517.2299701-3-frank.jungclaus@esd.eu Signed-off-by: Frank Jungclaus Signed-off-by: Marc Kleine-Budde MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 5e910bdedc84c1f196863cebdf27c1806449c27c Author: Frank Jungclaus Date: Fri Jun 24 21:05:15 2022 +0200 can/esd_usb2: Rename esd_usb2.c to esd_usb.c As suggested by Vincent, renaming of esd_usb2.c to esd_usb.c and according to that, adaption of Kconfig and Makfile, too. Link: https://lore.kernel.org/all/20220624190517.2299701-2-frank.jungclaus@esd.eu Signed-off-by: Frank Jungclaus Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/Kconfig | 15 +++++++++++---- drivers/net/can/usb/Makefile | 2 +- drivers/net/can/usb/{esd_usb2.c => esd_usb.c} | 0 3 files changed, 12 insertions(+), 5 deletions(-) commit b9b71f43683ae9d76b0989249607bbe8c9eb6c5c Author: Sean Christopherson Date: Fri Jun 24 17:18:08 2022 +0000 KVM: x86/mmu: Buffer nested MMU split_desc_cache only by default capacity Buffer split_desc_cache, the cache used to allcoate rmap list entries, only by the default cache capacity (currently 40), not by doubling the minimum (513). Aliasing L2 GPAs to L1 GPAs is uncommon, thus eager page splitting is unlikely to need 500+ entries. And because each object is a non-trivial 128 bytes (see struct pte_list_desc), those extra ~500 entries means KVM is in all likelihood wasting ~64kb of memory per VM. Link: https://lore.kernel.org/all/YrTDcrsn0%2F+alpzf@google.com Cc: David Matlack Signed-off-by: Sean Christopherson Message-Id: <20220624171808.2845941-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 72ae5822b81a6686c4b4d526ccdd7b7f5f0f9b97 Author: Sean Christopherson Date: Fri Jun 24 17:18:07 2022 +0000 KVM: x86/mmu: Use "unsigned int", not "u32", for SPTEs' @access info Use an "unsigned int" for @access parameters instead of a "u32", mostly to be consistent throughout KVM, but also because "u32" is misleading. @access can actually squeeze into a u8, i.e. doesn't need 32 bits, but is as an "unsigned int" because sp->role.access is an unsigned int. No functional change intended. Link: https://lore.kernel.org/all/YqyZxEfxXLsHGoZ%2F@google.com Cc: David Matlack Signed-off-by: Sean Christopherson Message-Id: <20220624171808.2845941-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit ebeae54d3a77e2f6b6b4e18a31bb9a0f7cbff238 Author: Jakub Kicinski Date: Thu Jun 23 13:29:33 2022 -0700 net: pcs: xpcs: depends on PHYLINK in Kconfig This is yet another attempt at fixing: >> ERROR: modpost: "phylink_mii_c22_pcs_encode_advertisement" [drivers/net/pcs/pcs_xpcs.ko] undefined! >> ERROR: modpost: "phylink_mii_c22_pcs_decode_state" [drivers/net/pcs/pcs_xpcs.ko] undefined! Switch XPCS to be invisible, as Russell points out it's "selected" by its consumers. Drop the dependency on MDIO_BUS as "depends" is meaningless on "selected" symbols. Reported-by: kernel test robot Fixes: b47aec885bcd ("net: pcs: xpcs: add CL37 1000BASE-X AN support") Link: https://lore.kernel.org/netdev/20220620201915.1195280-1-kuba@kernel.org/ Link: https://lore.kernel.org/r/20220622083521.0de3ea5c@kernel.org/ Link: https://lore.kernel.org/r/20220623202933.2341938-1-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/pcs/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 97a4d46b1516250d640c1ae0c9e7129d160d6a1c Author: Eric Dumazet Date: Thu Jun 23 19:35:40 2022 +0000 raw: fix a typo in raw_icmp_error() I accidentally broke IPv4 traceroute, by swapping iph->saddr and iph->daddr. Probably because raw_icmp_error() and raw_v4_input() use different order for iph->saddr and iph->daddr. Fixes: ba44f8182ec2 ("raw: use more conventional iterators") Reported-by: John Sperbeck Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20220623193540.2851799-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv4/raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a69e617e533edddf3fa3123149900f36e0a6dc74 Author: Lukas Wunner Date: Thu Jun 23 14:50:59 2022 +0200 usbnet: Fix linkwatch use-after-free on disconnect usbnet uses the work usbnet_deferred_kevent() to perform tasks which may sleep. On disconnect, completion of the work was originally awaited in ->ndo_stop(). But in 2003, that was moved to ->disconnect() by historic commit "[PATCH] USB: usbnet, prevent exotic rtnl deadlock": https://git.kernel.org/tglx/history/c/0f138bbfd83c The change was made because back then, the kernel's workqueue implementation did not allow waiting for a single work. One had to wait for completion of *all* work by calling flush_scheduled_work(), and that could deadlock when waiting for usbnet_deferred_kevent() with rtnl_mutex held in ->ndo_stop(). The commit solved one problem but created another: It causes a use-after-free in USB Ethernet drivers aqc111.c, asix_devices.c, ax88179_178a.c, ch9200.c and smsc75xx.c: * If the drivers receive a link change interrupt immediately before disconnect, they raise EVENT_LINK_RESET in their (non-sleepable) ->status() callback and schedule usbnet_deferred_kevent(). * usbnet_deferred_kevent() invokes the driver's ->link_reset() callback, which calls netif_carrier_{on,off}(). * That in turn schedules the work linkwatch_event(). Because usbnet_deferred_kevent() is awaited after unregister_netdev(), netif_carrier_{on,off}() may operate on an unregistered netdev and linkwatch_event() may run after free_netdev(), causing a use-after-free. In 2010, usbnet was changed to only wait for a single instance of usbnet_deferred_kevent() instead of *all* work by commit 23f333a2bfaf ("drivers/net: don't use flush_scheduled_work()"). Unfortunately the commit neglected to move the wait back to ->ndo_stop(). Rectify that omission at long last. Reported-by: Jann Horn Link: https://lore.kernel.org/netdev/CAG48ez0MHBbENX5gCdHAUXZ7h7s20LnepBF-pa5M=7Bi-jZrEA@mail.gmail.com/ Reported-by: Oleksij Rempel Link: https://lore.kernel.org/netdev/20220315113841.GA22337@pengutronix.de/ Signed-off-by: Lukas Wunner Cc: stable@vger.kernel.org Acked-by: Oliver Neukum Link: https://lore.kernel.org/r/d1c87ebe9fc502bffcd1576e238d685ad08321e4.1655987888.git.lukas@wunner.de Signed-off-by: Jakub Kicinski drivers/net/usb/usbnet.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 78f319315764e6730c143570609b230d1bea6928 Author: Ciara Loftus Date: Thu Jun 23 10:08:52 2022 +0000 i40e: read the XDP program once per NAPI Similar to how it's done in the ice driver since 'eb087cd82864 ("ice: propagate xdp_ring onto rx_ring")', read the XDP program once per NAPI instead of once per descriptor cleaned. I measured an improvement in throughput of 2% for the AF_XDP xdpsock l2fwd benchmark for zero copy mode and 1% for copy mode. Signed-off-by: Ciara Loftus Link: https://lore.kernel.org/r/20220623100852.7867-1-ciara.loftus@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/i40e/i40e_txrx.c | 11 ++++++----- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 17 ++++++++++------- 2 files changed, 16 insertions(+), 12 deletions(-) commit 85a1c6536f9939696f687d1b0996167e38998fb9 Author: Jilin Yuan Date: Thu Jun 23 12:31:15 2022 +0800 sfc: siena: fix repeated words in comments Delete the redundant word 'set'. Delete the redundant word 'a'. Delete the redundant word 'in'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220623043115.60482-1-yuanjilin@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/siena/mcdi_pcol.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ede57d58e6f38d5bc66137368e4a1e68a157af6e Author: Richard Gobert Date: Wed Jun 22 18:09:03 2022 +0200 net: helper function skb_len_add Move the len fields manipulation in the skbs to a helper function. There is a comment specifically requesting this and there are several other areas in the code displaying the same pattern which can be refactored. This improves code readability. Signed-off-by: Richard Gobert Link: https://lore.kernel.org/r/20220622160853.GA6478@debian Signed-off-by: Jakub Kicinski include/linux/skbuff.h | 12 ++++++++++++ include/net/sock.h | 4 +--- net/core/skbuff.c | 13 +++---------- net/ipv4/esp4.c | 4 +--- net/ipv4/ip_output.c | 8 ++------ 5 files changed, 19 insertions(+), 22 deletions(-) commit 1da9e27415bfc54db25c8374331aaf5321185a1d Author: liujing Date: Wed Jun 22 08:12:37 2022 -0400 tc-testing: gitignore, delete plugins directory when we modfying kernel, commit it to our environment building. we find a error that is "tools/testing/selftests/tc-testing/plugins" failed: No such file or directory" we find plugins directory is ignored in "tools/testing/selftests/tc-testing/.gitignore", but the plugins directory is need in "tools/testing/selftests/tc-testing/Makefile" Signed-off-by: liujing Link: https://lore.kernel.org/r/20220622121237.5832-1-liujing@cmss.chinamobile.com Signed-off-by: Jakub Kicinski tools/testing/selftests/tc-testing/.gitignore | 1 - 1 file changed, 1 deletion(-) commit 6ce1df88b1f31f0e19372afe127cf5678d63c559 Author: Dimitris Michailidis Date: Wed Jun 22 15:37:03 2022 -0700 net/funeth: Support UDP segmentation offload Handle skbs with SKB_GSO_UDP_L4, advertise the offload in features, and add an ethtool counter for it. Small change to existing TSO code due to UDP's different header length. Signed-off-by: Dimitris Michailidis Link: https://lore.kernel.org/r/20220622223703.59886-1-dmichail@fungible.com Signed-off-by: Jakub Kicinski .../net/ethernet/fungible/funeth/funeth_ethtool.c | 2 ++ drivers/net/ethernet/fungible/funeth/funeth_main.c | 3 ++- drivers/net/ethernet/fungible/funeth/funeth_tx.c | 23 +++++++++++++++++++++- drivers/net/ethernet/fungible/funeth/funeth_txrx.h | 1 + 4 files changed, 27 insertions(+), 2 deletions(-) commit 80a14dd4c37f94300bc9375592b54f98c6ad7b8e Author: Xiao Yang Date: Thu Jun 23 21:16:27 2022 +0800 RDMA/rxe: Remove useless pkt parameters The pkt parameters in prepare_ack_packet(), send_ack() and send_atomic_ack() have become useless by the following commits. So remove them directly. Fixes: bf139b58af09 ("RDMA/rxe: Remove unused pkt->offset") Fixes: 3896bde92d03 ("RDMA/rxe: Fix extra copy in prepare_ack_packet") Link: https://lore.kernel.org/r/20220623131627.18903-1-yangx.jy@fujitsu.com Signed-off-by: Xiao Yang Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_resp.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit e5d6eeead88e40282cb6dff38f8effd6341561b1 Author: Bo Liu Date: Fri Jun 17 04:23:19 2022 -0400 drm/connector: Remove usage of the deprecated ida_simple_xxx API Use ida_alloc_xxx()/ida_free() instead of ida_simple_get()/ida_simple_remove(). The latter is deprecated and more verbose. Signed-off-by: Bo Liu Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220617082319.7599-1-liubo03@inspur.com Link: https://patchwork.freedesktop.org/patch/msgid/20220621190055.8323-1-jiangjian@cdjrlc.com drivers/gpu/drm/drm_connector.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit d39afb73fd529c999e8f977639f96cec6937ccc8 Merge: f2906aa86338 080bcd8d5997 Author: Stephen Boyd Date: Fri Jun 24 14:31:26 2022 -0700 Merge tag 'renesas-clk-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas Pull Renesas clk driver updates from Geert Uytterhoeven: - Add GPT/POEG (PWM) clocks and resets on RZ/G2L - Add PFC and WDT clocks and resets on RZ/V2M - Add thermal, SDHI, Z (CPU core), PCIe, and HSCIF (serial) clocks on R-Car S4-8 - Miscellaneous fixes and improvements * tag 'renesas-clk-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r8a779f0: Add HSCIF clocks clk: renesas: r8a779f0: Add PCIe clocks clk: renesas: r8a779f0: Add Z0 and Z1 clock support dt-bindings: clock: renesas,rzg2l: Simplify header file references clk: renesas: rza1: Remove struct rz_cpg clk: renesas: r8a7779: Remove struct r8a7779_cpg clk: renesas: r8a7778: Remove struct r8a7778_cpg clk: renesas: sh73a0: Remove sh73a0_cpg.reg clk: renesas: r8a7740: Remove r8a7740_cpg.reg clk: renesas: r8a73a4: Remove r8a73a4_cpg.reg clk: renesas: r8a779f0: Add SDHI0 clock clk: renesas: r8a779f0: Add thermal clock clk: renesas: rzg2l: Fix reset status function clk: renesas: r9a06g032: Fix UART clkgrp bitsel clk: renesas: r9a06g032: Drop some unused fields clk: renesas: r9a09g011: Add WDT clock and reset entries clk: renesas: r9a09g011: Add PFC clock and reset entries clk: renesas: r9a07g044: Add POEG clock and reset entries clk: renesas: r9a07g044: Add GPT clock and reset entry commit fd75733da2f376c0c8c6513c3cb2ac227082ec5c Author: Daniel Müller Date: Thu Jun 23 18:29:34 2022 +0000 bpf: Merge "types_are_compat" logic into relo_core.c BPF type compatibility checks (bpf_core_types_are_compat()) are currently duplicated between kernel and user space. That's a historical artifact more than intentional doing and can lead to subtle bugs where one implementation is adjusted but another is forgotten. That happened with the enum64 work, for example, where the libbpf side was changed (commit 23b2a3a8f63a ("libbpf: Add enum64 relocation support")) to use the btf_kind_core_compat() helper function but the kernel side was not (commit 6089fb325cf7 ("bpf: Add btf enum64 support")). This patch addresses both the duplication issue, by merging both implementations and moving them into relo_core.c, and fixes the alluded to kind check (by giving preference to libbpf's already adjusted logic). For discussion of the topic, please refer to: https://lore.kernel.org/bpf/CAADnVQKbWR7oarBdewgOBZUPzryhRYvEbkhyPJQHHuxq=0K1gw@mail.gmail.com/T/#mcc99f4a33ad9a322afaf1b9276fb1f0b7add9665 Changelog: v1 -> v2: - limited libbpf recursion limit to 32 - changed name to __bpf_core_types_are_compat - included warning previously present in libbpf version - merged kernel and user space changes into a single patch Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220623182934.2582827-1-deso@posteo.net kernel/bpf/btf.c | 84 +---------------------------------------------- tools/lib/bpf/libbpf.c | 72 +--------------------------------------- tools/lib/bpf/relo_core.c | 80 ++++++++++++++++++++++++++++++++++++++++++++ tools/lib/bpf/relo_core.h | 2 ++ 4 files changed, 84 insertions(+), 154 deletions(-) commit 2f6d1e0f8ff3cf66b1eef8ed36f6c64d2e679284 Author: Shahab Vahedi Date: Fri Jun 24 14:14:11 2022 +0000 bpf, docs: Fix the code formatting in instruction-set A minor typo fix to include "| BPF_LD" into its previous code phrase: ``BPF_IND`` | BPF_LD --> ``BPF_IND | BPF_LD`` Signed-off-by: Shahab Vahedi Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/b6120b31-3d1d-bf2d-2f2a-aa768d91257b@synopsys.com Documentation/bpf/instruction-set.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 780d3d5a24bbdd48cb43f35afb6f5b7544cdf45a Merge: 41188e9e9def b168852eb8ef Author: Andrii Nakryiko Date: Fri Jun 24 13:36:23 2022 -0700 Merge branch 'perf tools: Fix prologue generation' Jiri Olsa says: ==================== hi, sending change we discussed some time ago [1] to get rid of some deprecated functions we use in perf prologue code. Despite the gloomy discussion I think the final code does not look that bad ;-) This patchset removes following libbpf functions from perf: bpf_program__set_prep bpf_program__nth_fd struct bpf_prog_prep_result v5 changes: - squashed patches together so we don't break bisection [Arnaldo] v4 changes: - fix typo [Andrii] v3 changes: - removed R0/R1 zero init in libbpf_prog_prepare_load_fn, because it's not needed [Andrii] - rebased/post on top of bpf-next/master which now has all the needed perf/core changes v2 changes: - use fallback section prog handler, so we don't need to use section prefix [Andrii] - realloc prog->insns array in bpf_program__set_insns [Andrii] - squash patch 1 from previous version with bpf_program__set_insns change [Daniel] - patch 3 already merged [Arnaldo] - added more comments thanks, jirka [1] https://lore.kernel.org/bpf/CAEf4BzaiBO3_617kkXZdYJ8hS8YF--ZLgapNbgeeEJ-pY0H88g@mail.gmail.com/ ==================== Signed-off-by: Andrii Nakryiko commit b168852eb8eff57b63e72e3bc584bda3d2cb9577 Author: Jiri Olsa Date: Thu Jun 16 22:22:14 2022 +0200 perf tools: Rework prologue generation code Some functions we use for bpf prologue generation are going to be deprecated. This change reworks current code not to use them. We need to replace following functions/struct: bpf_program__set_prep bpf_program__nth_fd struct bpf_prog_prep_result Currently we use bpf_program__set_prep to hook perf callback before program is loaded and provide new instructions with the prologue. We replace this function/ality by taking instructions for specific program, attaching prologue to them and load such new ebpf programs with prologue using separate bpf_prog_load calls (outside libbpf load machinery). Before we can take and use program instructions, we need libbpf to actually load it. This way we get the final shape of its instructions with all relocations and verifier adjustments). There's one glitch though.. perf kprobe program already assumes generated prologue code with proper values in argument registers, so loading such program directly will fail in the verifier. That's where the fallback pre-load handler fits in and prepends the initialization code to the program. Once such program is loaded we take its instructions, cut off the initialization code and prepend the prologue. I know.. sorry ;-) To have access to the program when loading this patch adds support to register 'fallback' section handler to take care of perf kprobe programs. The fallback means that it handles any section definition besides the ones that libbpf handles. The handler serves two purposes: - allows perf programs to have special arguments in section name - allows perf to use pre-load callback where we can attach init code (zeroing all argument registers) to each perf program Suggested-by: Andrii Nakryiko Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Tested-by: Arnaldo Carvalho de Melo Acked-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/bpf/20220616202214.70359-2-jolsa@kernel.org tools/perf/util/bpf-loader.c | 204 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 175 insertions(+), 29 deletions(-) commit b00de0e237da32793dce221119c3120b8276f4ec Author: Joel Selvaraj Date: Wed Jun 1 13:54:10 2022 +0530 drm/panel: introduce ebbg,ft8719 panel Add DRM panel driver for EBBG FT8719 6.18" 2246x1080 DSI video mode panel, which can be found on some Xiaomi Poco F1 phones. The panel's backlight is managed through QCOM WLED driver. Signed-off-by: Joel Selvaraj Reviewed-by: Linus Walleij Reviewed-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/BY5PR02MB7009B6FA7F17A3DA36DDA44CD9DF9@BY5PR02MB7009.namprd02.prod.outlook.com MAINTAINERS | 7 + drivers/gpu/drm/panel/Kconfig | 11 ++ drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-ebbg-ft8719.c | 285 ++++++++++++++++++++++++++++++ 4 files changed, 304 insertions(+) commit 2a9e9daf75231c2f577209af5ec62aecdf7ca7af Author: Joel Selvaraj Date: Wed Jun 1 13:54:09 2022 +0530 drm/mipi-dsi: Introduce mipi_dsi_dcs_write_seq macro A helper macro that can be used to simplify sending DCS commands. It is useful in scenarios like panel initialization which can sometimes involve sending lot of DCS commands. Signed-off-by: Joel Selvaraj Reviewed-by: Linus Walleij Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/BY5PR02MB700952493EEB6F0E77DC8416D9DF9@BY5PR02MB7009.namprd02.prod.outlook.com include/drm/drm_mipi_dsi.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit c5ec5fa3931675e583aada31db1453038f7b76a4 Author: Joel Selvaraj Date: Wed Jun 1 13:54:08 2022 +0530 dt-bindings: display: Add bindings for EBBG FT8719 Add bindings for the EBBG FT8719 6.18" 2246x1080 DSI video mode panel, which can be found on some Xiaomi Poco F1 phones. The backlight is managed through the QCOM WLED driver. Signed-off-by: Joel Selvaraj Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/BY5PR02MB7009E821B0D4AC20E11F8F13D9DF9@BY5PR02MB7009.namprd02.prod.outlook.com .../bindings/display/panel/ebbg,ft8719.yaml | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit 6ef425abb0f7c2a94e9a758017a0483c79d6c2a4 Author: Joel Selvaraj Date: Wed Jun 1 13:54:07 2022 +0530 dt-bindings: vendor-prefixes: Add prefix for EBBG Add a prefix for EBBG. They manufacture displays which are used in some Xiaomi phones, but I could not find much details about the company. Signed-off-by: Joel Selvaraj Acked-by: Krzysztof Kozlowski Acked-by: Linus Walleij Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/BY5PR02MB7009387E1E6C060864C03F87D9DF9@BY5PR02MB7009.namprd02.prod.outlook.com Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 831463667b5f4f1e5bce9c3b94e9e794d2bc8923 Author: Jiasheng Jiang Date: Thu Jun 2 18:34:01 2022 +0800 drm: bridge: adv7511: Add check for mipi_dsi_driver_register As mipi_dsi_driver_register could return error if fails, it should be better to check the return value and return error if fails. Moreover, if i2c_add_driver fails, mipi_dsi_driver_register should be reverted. Fixes: 1e4d58cd7f88 ("drm/bridge: adv7533: Create a MIPI DSI device") Signed-off-by: Jiasheng Jiang Reviewed-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220602103401.2980938-1-jiasheng@iscas.ac.cn drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 25ba9429e0f40d3b725781e70d2d6b9ce47a0df4 Author: Stephen Kitt Date: Tue Jun 7 20:10:22 2022 +0200 drm/bridge: parade-ps8622: Use backlight helper backlight_properties.fb_blank is deprecated. The states it represents are handled by other properties; but instead of accessing those properties directly, drivers should use the helpers provided by backlight.h. Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220607181022.1119546-1-steve@sk2.org drivers/gpu/drm/bridge/parade-ps8622.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 9126ef85f2b8654060929c5b6a876376702d1017 Author: Bjorn Andersson Date: Tue Jun 7 19:06:14 2022 -0700 drm/panel-edp: Add LQ140M1JW48 edp panel entry Add panel identification entry for the Sharp LQ140M1JW48 eDP panel. Due to lacking documentation, a delay similar to those for the LQ140M1JW46 numbers are picked for now. Signed-off-by: Bjorn Andersson Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220608020614.4098292-1-bjorn.andersson@linaro.org drivers/gpu/drm/panel/panel-edp.c | 1 + 1 file changed, 1 insertion(+) commit fd46ef3d8247958921cb9f2a86cced130bbae60e Author: Jiang Jian Date: Thu Jun 23 00:22:13 2022 +0800 RDMA: Correct duplicated words in comments There is a duplicated word 'is' and 'for' in a comment that needs to be dropped. Link: https://lore.kernel.org/r/20220622170853.3644-1-jiangjian@cdjrlc.com Link: https://lore.kernel.org/r/20220623103708.43104-1-jiangjian@cdjrlc.com Signed-off-by: Jiang Jian Signed-off-by: Jason Gunthorpe drivers/infiniband/core/rdma_core.c | 2 +- drivers/infiniband/hw/bnxt_re/bnxt_re.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 103f06fd478106fbc2394030599db5c852b7fa32 Author: Bastian Krause Date: Fri Jun 10 13:15:11 2022 +0200 drm/panel: simple: add AM-800600P5TMQW-TB8H Add support for the Ampire AM-800600P5TMQW-TB8H 800x600 panel. Data sheet is currently not publicly available, unfortunately. Signed-off-by: Bastian Krause Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220610111511.1421067-2-bst@pengutronix.de drivers/gpu/drm/panel/panel-simple.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 1959fa9d54640d5020df8f4d19c8a0051ba854a8 Author: Bastian Krause Date: Fri Jun 10 13:15:10 2022 +0200 dt-bindings: display: simple: add Ampire AM-800600P5TMQW-TB8H panel Add Ampire AM-800600P5TMQW-TB8H 8" TFT LCD panel compatible string. Signed-off-by: Bastian Krause Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220610111511.1421067-1-bst@pengutronix.de Documentation/devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+) commit ad4fd3b1dfd3e3496bd21a5caee35540112fe95e Author: Stephen Kitt Date: Thu Jun 16 19:08:21 2022 +0200 drm: shmobile: Use backlight helper This started with work on the removal of backlight_properties' deprecated fb_blank field, much of which can be taken care of by using helper functions provided by backlight.h instead of directly accessing fields in backlight_properties. This patch series doesn't involve fb_blank, but it still seems useful to use helper functions where appropriate. Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Cc: Laurent Pinchart Cc: Kieran Bingham Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220616170821.1348169-1-steve@sk2.org drivers/gpu/drm/shmobile/shmob_drm_backlight.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 592ff0c8d0648610511f4e4fb532f100168e6e0d Author: keliu Date: Fri May 27 07:36:36 2022 +0000 rtc: Directly use ida_alloc()/free() Use ida_alloc()/ida_free() instead of deprecated ida_simple_get()/ida_simple_remove() . Signed-off-by: keliu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220527073636.2474546-1-liuke94@huawei.com drivers/rtc/class.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit db475c11cd592d626749c9ccd98f12c05f29ed88 Author: Stephen Kitt Date: Thu Jun 16 19:23:13 2022 +0200 drm/panel: panel-asus-z00t-tm5p5-n35596: Use backlight helper backlight_properties.fb_blank is deprecated. The states it represents are handled by other properties; but instead of accessing those properties directly, drivers should use the helpers provided by backlight.h. Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Cc: Thierry Reding Cc: Sam Ravnborg Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220616172316.1355133-2-steve@sk2.org drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 91c2cbf9b6a6779ee428955fb202ae66c750aaaf Author: Stephen Kitt Date: Thu Jun 16 19:23:14 2022 +0200 drm/panel: panel-dsi-cm: Use backlight helpers Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Instead of setting the power state by manually updating fields in struct backlight_properties, use backlight_enable() and backlight_disable(). These also call backlight_update_status() so the separate call is no longer needed. Signed-off-by: Stephen Kitt Reviewed-by: Sebastian Reichel Cc: Thierry Reding Cc: Sam Ravnborg Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220616172316.1355133-3-steve@sk2.org drivers/gpu/drm/panel/panel-dsi-cm.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) commit c974f755372bceda2c3cdc31b4b27dd772172203 Author: Stephen Kitt Date: Thu Jun 16 19:23:15 2022 +0200 drm/panel: sony-acx565akm: Use backlight helpers Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Instead of manually checking the power state in struct backlight_properties, use backlight_is_blank(). While we're at it, drop .fb_blank from the initialisation function; it is deprecated, and this helps make progress towards enabling its removal. This change makes no functional difference since FB_BLANK_UNBLANK is the default value. Signed-off-by: Stephen Kitt Reviewed-by: Sebastian Reichel Cc: Thierry Reding Cc: Sam Ravnborg Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220616172316.1355133-4-steve@sk2.org drivers/gpu/drm/panel/panel-sony-acx565akm.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit b09d633575e54e98e1362bd5c36cd9571cb71d8a Author: Nishanth Menon Date: Thu Jun 23 12:08:08 2022 -0500 rtc: Introduce ti-k3-rtc Introduce support for Texas Instruments Real Time Clock controller on newer K3 family of SoCs such as AM62x. The hardware module that is being supported is the "digital only" version which doesn't have capability of external wakeup sources and external power backup. However, for many practical applications, this should suffice as RTC is operational across low power sequences. The hardware block by itself is split into two distinct domains internally to further reduce the power consumption with the actual counter block and comparators clocked off a 32k clock source (which based on SoC integration can be sourced by an external crystal) and an register interface block which is driven by the bus clock. While optimal from power perspective, it does create some complicated synchronizations and sequences that one must be wary of in the driver handling. Acked-by: Andrew Davis Signed-off-by: Nishanth Menon Tested-by: Georgi Vlaev Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220623170808.20998-3-nm@ti.com drivers/rtc/Kconfig | 11 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-ti-k3.c | 680 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 692 insertions(+) commit 5e665cf1f0c52163de5517bfb9258390e63772b2 Author: Nishanth Menon Date: Thu Jun 23 12:08:07 2022 -0500 dt-bindings: rtc: Add TI K3 RTC description This adds the documentation for the devicetree bindings of the Texas Instruments RTC modules on K3 family of SoCs such as AM62x SoCs or newer. Signed-off-by: Nishanth Menon Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220623170808.20998-2-nm@ti.com .../devicetree/bindings/rtc/ti,k3-rtc.yaml | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit d9e74da2f1fc42926c6ace1bc47a700f88ada696 Author: Alexander Stein Date: Tue Jun 21 09:21:18 2022 +0200 drm/panel: panel-simple: Add dev_err_probe if backlight could not be found If the backlight node is not enabled, this (silently) returns with -EPROBE_DEFER. /sys/kernel/debug/devices_deferred also shows nothing helpful: $ cat /sys/kernel/debug/devices_deferred display With this patch, there is a helpful hint: $ cat /sys/kernel/debug/devices_deferred display panel-simple: Could not find backlight Signed-off-by: Alexander Stein Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220621072118.513346-1-alexander.stein@ew.tq-group.com drivers/gpu/drm/panel/panel-simple.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a68078b44846379bd276701b537a68542e406c78 Author: Jiang Jian Date: Tue Jun 21 21:31:07 2022 +0800 drm/pl111: drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: drivers/gpu/drm/pl111/pl111_display.c line: 251 * Note that the the ARM hardware's format reader takes 'r' from changed to * Note that the the ARM hardware's format reader takes 'r' from Signed-off-by: Jiang Jian Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220621133107.3752-1-jiangjian@cdjrlc.com drivers/gpu/drm/pl111/pl111_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c56d5105747189c86e6df975257580acb2dd223 Author: Jiang Jian Date: Tue Jun 21 22:01:51 2022 +0800 drm/panel: nt35510: Remove duplicate 'the' in two places. file: ./drivers/gpu/drm/panel/panel-novatek-nt35510.c line: 193,214,253 * amplification for the the step-up circuit: changed to * amplification for the step-up circuit: Signed-off-by: Jiang Jian Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220621140151.14404-1-jiangjian@cdjrlc.com drivers/gpu/drm/panel/panel-novatek-nt35510.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fa1f8e6ac455b20955f107023916eef946674cb8 Author: Satya Priya Date: Wed Jun 22 10:40:39 2022 +0530 dt-bindings: rtc: qcom-pm8xxx-rtc: Update the maintainers section Update the maintainers section with latest mail ID. Signed-off-by: Satya Priya Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1655874639-11273-3-git-send-email-quic_c_skakit@quicinc.com Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bdb08c180e8556d3d4cef844ea0f0bae79bb95d Author: Conor Dooley Date: Wed Jun 1 13:33:21 2022 +0100 MAINTAINERS: add PolarFire SoC's RTC Add an entry for PolarFire SoC's RTC drver to the existing support for PolarFire SoC. Signed-off-by: Conor Dooley Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220601123320.2861043-3-conor.dooley@microchip.com MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 0b31d703598dc1993867597bbd45e87d824fc427 Author: Conor Dooley Date: Wed Jun 1 13:33:20 2022 +0100 rtc: Add driver for Microchip PolarFire SoC Add support for the built-in RTC on Microchip PolarFire SoC Co-Developed-by: Daire McNamara Signed-off-by: Daire McNamara Signed-off-by: Conor Dooley Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220601123320.2861043-2-conor.dooley@microchip.com drivers/rtc/Kconfig | 10 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-mpfs.c | 326 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 337 insertions(+) commit 3f4a3322477ccc13fc6a2b15c2f6a4d0376f5ff2 Author: Stephen Kitt Date: Fri Jun 10 18:23:43 2022 +0200 rtc: use simple i2c probe All these drivers have an i2c probe function which doesn't use the "struct i2c_device_id *id" parameter, so they can trivially be converted to the "probe_new" style of probe with a single argument. This change was done using the following Coccinelle script, and fixed up for whitespace changes: @ rule1 @ identifier fn; identifier client, id; @@ - static int fn(struct i2c_client *client, const struct i2c_device_id *id) + static int fn(struct i2c_client *client) { ...when != id } @ rule2 depends on rule1 @ identifier rule1.fn; identifier driver; @@ struct i2c_driver driver = { - .probe + .probe_new = ( fn | - &fn + fn ) , }; Signed-off-by: Stephen Kitt Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220610162346.4134094-1-steve@sk2.org drivers/rtc/rtc-ab-b5ze-s3.c | 5 ++--- drivers/rtc/rtc-ab-eoz9.c | 5 ++--- drivers/rtc/rtc-bq32k.c | 5 ++--- drivers/rtc/rtc-ds1374.c | 5 ++--- drivers/rtc/rtc-ds1672.c | 5 ++--- drivers/rtc/rtc-ds3232.c | 5 ++--- drivers/rtc/rtc-em3027.c | 5 ++--- drivers/rtc/rtc-fm3130.c | 5 ++--- drivers/rtc/rtc-hym8563.c | 5 ++--- drivers/rtc/rtc-isl12022.c | 5 ++--- drivers/rtc/rtc-max6900.c | 5 ++--- drivers/rtc/rtc-pcf8523.c | 5 ++--- drivers/rtc/rtc-pcf85363.c | 5 ++--- drivers/rtc/rtc-pcf8563.c | 5 ++--- drivers/rtc/rtc-pcf8583.c | 5 ++--- drivers/rtc/rtc-rv3029c2.c | 5 ++--- drivers/rtc/rtc-rx6110.c | 5 ++--- drivers/rtc/rtc-rx8581.c | 5 ++--- drivers/rtc/rtc-s35390a.c | 5 ++--- drivers/rtc/rtc-sd3078.c | 5 ++--- drivers/rtc/rtc-x1205.c | 5 ++--- 21 files changed, 42 insertions(+), 63 deletions(-) commit 33740c7f94f948767578e852e6f256038a56803d Author: Tetsuo Handa Date: Sat Jun 11 23:38:46 2022 +0900 rtc: Remove unused rtc_dev_exit(). Commit 270a3bd6bdc21407 ("rtc: make class.c explicitly non-modular") removed rtc_dev_exit() call. Signed-off-by: Tetsuo Handa Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1e2f9a99-435d-e149-7456-dfacd53be85a@I-love.SAKURA.ne.jp drivers/rtc/dev.c | 6 ------ drivers/rtc/rtc-core.h | 5 ----- 2 files changed, 11 deletions(-) commit 162b05524ed30586bd2a7ede1f0392c3d1ed2d6e Author: Tetsuo Handa Date: Fri Jun 10 19:48:36 2022 +0900 rtc: Replace flush_scheduled_work() with flush_work(). Since "struct rtc_device" is per a device struct, I assume that clear_uie() needs to wait for only one work associated with that device. Therefore, wait for only that work using flush_work(). Signed-off-by: Tetsuo Handa Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/8d3a0f55-d861-ba93-0d25-b1172eaa8343@I-love.SAKURA.ne.jp drivers/rtc/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2023c5c8fe2e85ec7491d5a470fcca48f8144c02 Author: Quentin Schulz Date: Mon May 23 16:53:20 2022 +0200 rtc: isl1208: do not advertise update interrupt feature if no interrupt specified If an ISL1208 device does not have an interrupt line routed, the feature shouldn't be advertised (it is by default in rtc core) or it'll confuse userspace requesting that feature (such as hwclock from util-linux). Signed-off-by: Quentin Schulz Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220523145320.123713-1-foss+kernel@0leil.net drivers/rtc/rtc-isl1208.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 139682400a2ac549ed717eac3a09759a1762366d Author: Allen-KH Cheng Date: Thu Apr 28 17:27:26 2022 +0800 dt-bindings: rtc: mediatek: add mt6358 and mt6366 compatible Add mt6358 and mt6366 compatible in devicetree-binding document for MediaTek PMIC based RTC. mt6358 and mt6366 use same compatible data to store RTC_WRTGR address offset. mt6358-rtc should be used as fallback for mt6366-rtc. Signed-off-by: Allen-KH Cheng Signed-off-by: Yuchen Huang Acked-by: Krzysztof Kozlowski Reviewed-by: Matthias Brugger Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220428092726.25814-2-allen-kh.cheng@mediatek.com Documentation/devicetree/bindings/rtc/rtc-mt6397.txt | 2 ++ 1 file changed, 2 insertions(+) commit c27fee16fab17bc5d62b643285e7cd76a6c49d95 Author: Ahmad Fatoum Date: Tue Apr 26 09:10:54 2022 +0200 rtc: rv8803: re-initialize all Epson RX8803 registers on voltage loss The reference manuals of both the RX8803 and RV8803 dictate that "[On V2F/VLF = ] all registers must be initialized". The RV-8803 application manual (rev. 1.6) further specifies that crossing V_LOW2 threshold enables flag V2F and triggers a Power-On reset. According to table 3.11 in the document, all control registers are defined to sensible values. However, The Epson RX-8803 doesn't offer the same guarantees. It explicitly states: During the initial power-up, the TEST bit is reset to "0" and the VLF bit is set to "1". ∗ At this point, all other register values are _undefined_, so be sure to perform a reset before using the module. Commit d3700b6b6479 ("rtc: rv8803: Stop the clock while setting the time") also had this rationale: Indeed, all the registers must be initialized if the voltage has been lower than VLOW2 (triggering V2F), but not low enough to trigger a POR. We should follow the advice and initialize all applicable registers. We can group the registers into 3 groups: A) Already correctly handled registers: * 0B-0Ch | Timer Counter | unused and disabled by clearing TE in 0Dh * 0Dh | Extension Reg | already initialized in rv8803_regs_configure * 0Eh | Flag Reg | handled in IRQ handler, except for VLF, VDET * 0Eh | VLF, VDET | cleared in ->set_time * 10h | 100th Seconds | Already reset via RESET bit * 20-21h | Capture Buffer | holds timestamp unused by driver * 2Fh | Event Control | resets automatically B) Registers that are hardware initialized on POR, but not on VLF: * 0Fh | Control Reg * 2Ch | OSC Offset C) RAM that is undefined on voltage loss: * 00-06h | Date/Time * 07h | RAM * 08-0Ah | Alarm This means we should initialize after VLF the registers in group B (RV8803_CTRL and RV8803_OSC_OFFSET). Group C is all-zero after voltage loss on the RV-8803, but undefined on the RX-8803. This is ok for Date/Time because ->get_time returns an error code for as long as the voltage loss flag is active. It's cleared on ->set_time however. Zeroing both RAM and alarm ensures a fixed value is read afterwards. Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220426071056.1187235-4-s.hauer@pengutronix.de drivers/rtc/rtc-rv8803.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) commit f8176e0bb83ff8dcc6d9fa8595a0966e631d2ba7 Author: Ahmad Fatoum Date: Tue Apr 26 09:10:53 2022 +0200 rtc: rv8803: initialize registers on post-probe voltage loss The driver probe currently initializes some registers to non-POR values. These values are not reinstated if the RTC experiences voltage loss later on. Fix this. Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220426071056.1187235-3-s.hauer@pengutronix.de drivers/rtc/rtc-rv8803.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 8c798e1ec185431a57403a908c379eea1b6bc751 Author: Ahmad Fatoum Date: Tue Apr 26 09:10:52 2022 +0200 rtc: rv8803: factor out existing register initialization to function The driver probe currently initializes some registers to non-POR values. These values are not reinstated if the RTC experiences voltage loss later on. Prepare for fixing this by factoring out the initialization to a separate function. Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220426071056.1187235-2-s.hauer@pengutronix.de drivers/rtc/rtc-rv8803.c | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) commit d2a632a8a11756197deb1341bbb09c09abaf20ce Author: Mateusz Jończyk Date: Fri Feb 25 22:50:09 2022 +0100 rtc: mc146818-lib: reduce RTC_UIP polling period Waiting 1ms every time is not necessary, for example on some AMD boxes the RTC_UIP bit is documented as being high for around 270 microseconds in some cases [1], which agreed with experiments on an SB710 southbridge. So 100us seems optimal. This in preparation for mach_get_cmos_time() refactoring. The functions mc146818_get_time() and mach_get_cmos_time() in arch/x86/kernel/rtc.c perform the same function and the code is duplicated. mach_get_cmos_time() is busy waiting for the RTC_UIP bit to clear, so make mc146818_get_time() more similar to it by reducing the polling period. [1] AMD SB700/710/750 Register Reference Guide, page 307, https://developer.amd.com/wordpress/media/2012/10/43009_sb7xx_rrg_pub_1.00.pdf "SB700 A12: The UIP high pulse is 270 μS Typical when SS on SRC clock is OFF and 100μ min when SRC SS is ON." [sic] Signed-off-by: Mateusz Jończyk Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: "H. Peter Anvin" Cc: Alessandro Zummo Cc: Alexandre Belloni Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20220225215011.861477-2-mat.jonczyk@o2.pl drivers/rtc/rtc-mc146818-lib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5b8d9ee0034576062460255d8bab3b3e61a2a25f Author: Steven Lung <1030steven@gmail.com> Date: Tue Jun 21 15:29:10 2022 +0800 docs: UML: fix typo Replace 'absense' with 'absence'. Signed-off-by: Steven Lung <1030steven@gmail.com> Link: https://lore.kernel.org/r/20220621072910.4704-1-1030steven@gmail.com Signed-off-by: Jonathan Corbet Documentation/virt/uml/user_mode_linux_howto_v2.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b259867be27cab399cdc32b28ddaa86a877f382b Author: Max Gurtovoy Date: Wed Jun 15 11:28:39 2022 +0300 IB/iser: Drain the entire QP during destruction flow It's important to drain both the sq and the rq to make sure all WRs were flushed before destroying the QP. Link: https://lore.kernel.org/r/20220615082839.26328-1-mgurtovoy@nvidia.com Reviewed-by: Sergey Gorenko Reviewed-by: Israel Rukshin Signed-off-by: Max Gurtovoy Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/iser/iser_verbs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4a6d00a43ef7c1d1449f2601f7195e4e5d40d432 Author: Binbin Zhou Date: Wed Jun 22 18:19:49 2022 +0800 docs/zh_CN: core-api: Update the translation of xarray.rst to 5.19-rc3 Synchronous translation from upstream commit ac23d1a96460 ("XArray: Document the locking requirement for the xa_state") Signed-off-by: Binbin Zhou Reviewed-by: Wu XiangCheng Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/b7d5f3ca914667ec14ba35a7c0db3ec3506e670d.1655863769.git.zhoubinbin@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/core-api/xarray.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c290f175e73fe04feba492e08a92093a4763914c Author: Binbin Zhou Date: Wed Jun 22 18:19:42 2022 +0800 docs/zh_CN: core-api: Update the translation of workqueue.rst to 5.19-rc3 Synchronous translation from upstream commit f9eaaa82b474 ("workqueue: doc: Call out the non-reentrance conditions") Signed-off-by: Binbin Zhou Reviewed-by: Wu XiangCheng Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/d045cb5623b5ae703c2296d3caa05017d5d225bd.1655863769.git.zhoubinbin@loongson.cn Signed-off-by: Jonathan Corbet .../translations/zh_CN/core-api/workqueue.rst | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit e86a0e297f0b5e7c0f233c2e2a4a6c403b27afa6 Author: Binbin Zhou Date: Wed Jun 22 18:18:53 2022 +0800 docs/zh_CN: core-api: Update the translation of printk-format.rst to 5.19-rc3 Synchronous translation from upstream commit 6a7ca80f4033 ("vsprintf: Update %pGp documentation about that it prints hex value") Signed-off-by: Binbin Zhou Reviewed-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/2ba15ab2aa46bfdd400d1c043eecc12bc6154836.1655863769.git.zhoubinbin@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/core-api/printk-formats.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4faa99e38c3e45ff031400839783ab0843740c35 Author: Binbin Zhou Date: Wed Jun 22 18:18:52 2022 +0800 docs/zh_CN: core-api: Update the translation of printk-basics.rst to 5.19-rc3 Synchronous translation from upstream commit 7d9e2661f268 ("printk: Move the printk() kerneldoc comment to its new home") Signed-off-by: Binbin Zhou Reviewed-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/56c6d212d6835029b4adf19cf78eec49c7a126d6.1655863769.git.zhoubinbin@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/core-api/printk-basics.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f5158bfe8777d1c42694cd53c59a7b0297e57cc6 Author: Binbin Zhou Date: Wed Jun 22 18:18:51 2022 +0800 docs/zh_CN: core-api: Update the translation of mm-api.rst to 5.19-rc3 Synchronous translation from the following commits(Latest in front): [1]: commit 84dacdbd5352("mm: document and polish read-ahead code") [2]: commit 2f52578f9c64("mm/util: Add folio_mapping() and folio_file_mapping()") [3]: commit 889a3747b3b7("mm/lru: Add folio LRU functions") [4]: commit c24016ac3a62("mm: Add folio reference count functions") Signed-off-by: Binbin Zhou Reviewed-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/0bd7b03a5d38dd1599715343360bef4289b7c0fb.1655863769.git.zhoubinbin@loongson.cn Signed-off-by: Jonathan Corbet .../translations/zh_CN/core-api/mm-api.rst | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit b2fdf7f080b4fbc8b22e006c2b78153253518741 Author: Binbin Zhou Date: Wed Jun 22 18:18:50 2022 +0800 docs/zh_CN: core-api: Update the translation of kernel-api.rst to 5.19-rc3 Synchronous translation from upstream commit 640d1930bef4 ("block: Add bio_for_each_folio_all()") Signed-off-by: Binbin Zhou Reviewed-by: Wu XiangCheng Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/9173878562404f4518fecc7c55032fe815f87fd9.1655863769.git.zhoubinbin@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/core-api/kernel-api.rst | 3 +++ 1 file changed, 3 insertions(+) commit 722ecdbce68a87de2d9296f91308f44ea900a039 Author: Binbin Zhou Date: Wed Jun 22 18:18:49 2022 +0800 docs/zh_CN: core-api: Update the translation of irq/irq-domain.rst to 5.19-rc3 Synchronous translation from the following commits(Latest in front): [1]: commit 0953fb263714("irq: remove handle_domain_{irq,nmi}()") [2]: commit 0ddc5e55e6f1("Documentation: Fix irq-domain.rst build warning") [3]: commit 991007ba6cca("Documentation: Update irq_domain.rst with new lookup APIs") [4]: commit 405e94e9aed2("irqdomain: Kill irq_domain_add_legacy_isa") Signed-off-by: Binbin Zhou Reviewed-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/eb82606f323c4c25e497a01a060e1e76f18be72f.1655863769.git.zhoubinbin@loongson.cn Signed-off-by: Jonathan Corbet .../translations/zh_CN/core-api/irq/irq-domain.rst | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 1ebfae49fd441686b805cb340808697b45159bf9 Author: Binbin Zhou Date: Wed Jun 22 18:18:48 2022 +0800 docs/zh_CN: core-api: Update the translation of cpu_hotplug.rst to 5.19-rc3 Synchronous translation from upstream commit c9871c800f65 ("Documentation: core-api/cpuhotplug: Rewrite the API section") Signed-off-by: Binbin Zhou Reviewed-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/9a123a1938a09f883db0b429396954e0792c84c1.1655863769.git.zhoubinbin@loongson.cn Signed-off-by: Jonathan Corbet .../translations/zh_CN/core-api/cpu_hotplug.rst | 435 ++++++++++++++++++--- 1 file changed, 377 insertions(+), 58 deletions(-) commit 417c434aa1b4426aff242c46a562e9e71ab14e25 Author: Binbin Zhou Date: Wed Jun 22 18:18:47 2022 +0800 docs/zh_CN: core-api: Update the translation of cachetlb.rst to 5.19-rc3 Synchronous translation from upstream commit 08b0b0059bf1 ("mm: Add flush_dcache_folio()") Signed-off-by: Binbin Zhou Reviewed-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/d1fe8dfa3cfc3fe38c7caf8b5cf3b3482b5bddf8.1655863769.git.zhoubinbin@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/core-api/cachetlb.rst | 6 ++++++ 1 file changed, 6 insertions(+) commit f9b21cd086070a111eebc107341d822a37796c89 Author: Tom Schwindl Date: Thu Jun 23 21:37:06 2022 +0000 docs: driver-api: gpio: Fix some typos Correct some simple spelling mistakes in consumer.rst, driver.rst and using-gpio.rst. Signed-off-by: Tom Schwindl Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/YrTdAv3YPlCiDr2u@posteo.de Signed-off-by: Jonathan Corbet Documentation/driver-api/gpio/consumer.rst | 2 +- Documentation/driver-api/gpio/driver.rst | 6 +++--- Documentation/driver-api/gpio/using-gpio.rst | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit df6725651f6f4b0f4f475cf7f539dfb8c9535da5 Author: Deming Wang Date: Thu Jun 23 21:46:05 2022 -0400 docs: Remove duplicate word Delete duplicate words of "the". Signed-off-by: Deming Wang Link: https://lore.kernel.org/r/20220624014605.2007-1-wangdeming@inspur.com Signed-off-by: Jonathan Corbet Documentation/filesystems/overlayfs.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 357513c052e10945427dd341bdf7a7ee5bf065a9 Author: Niravkumar L Rabara Date: Sat Jun 25 00:21:59 2022 +0800 arm64: dts: altera: socfpga_stratix10: move clocks out of soc node The clocks are not part of the SoC but provided on the board (external oscillators). Moving them out of soc node. Signed-off-by: Niravkumar L Rabara Signed-off-by: Dinh Nguyen arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 56 +++++++++++----------- .../boot/dts/altera/socfpga_stratix10_socdk.dts | 10 ++-- .../dts/altera/socfpga_stratix10_socdk_nand.dts | 10 ++-- 3 files changed, 36 insertions(+), 40 deletions(-) commit 30fb8761419ebf1f26492a0bfaa5d795aa819179 Author: Stephen Kitt Date: Fri Jun 24 13:02:30 2022 +0200 docs: admin-guide/sysctl: Fix rendering error Text in ``literal`` markup must be separated by word separators, so text like ``lowwater``% renders incorrectly. Add the suggested "\ " after two problematic occurrences. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20220624110230.595740-1-steve@sk2.org [jc: tweaked to use "\ "] Signed-off-by: Jonathan Corbet Documentation/admin-guide/sysctl/kernel.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ac4f83482afbfd927d0fe118151b747cf175e724 Author: Mark Brown Date: Mon Jun 20 16:23:13 2022 +0100 mtd: dataflash: Add SPI ID table Currently autoloading for SPI devices does not use the DT ID table, it uses SPI modalises. Supporting OF modalises is going to be difficult if not impractical, an attempt was made but has been reverted, so ensure that module autoloading works for this driver by adding an id_table listing the SPI IDs for everything. Fixes: 96c8395e2166 ("spi: Revert modalias changes") Signed-off-by: Mark Brown Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220620152313.708768-1-broonie@kernel.org drivers/mtd/devices/mtd_dataflash.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit c223a38d62e57aa60a890ea7247e3c58a54478e6 Author: Geert Uytterhoeven Date: Fri Jun 17 11:26:51 2022 +0200 mtd: hyperbus: rpc-if: Fix RPM imbalance in probe error path If rpcif_hw_init() fails, Runtime PM is left enabled. Fixes: b04cc0d912eb80d3 ("memory: renesas-rpc-if: Add support for RZ/G2L") Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Reviewed-by: Lad Prabhakar Reviewed-by: Sergey Shtylyov Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/f3070e1af480cb252ae183d479a593dbbf947685.1655457790.git.geert+renesas@glider.be drivers/mtd/hyperbus/rpc-if.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 431eae20a093fe3a47cf617b01b911ef39ce3a83 Author: Jiang Jian Date: Thu Jun 23 00:05:11 2022 +0800 mtd: rawnand: sm_common: drop unexpected word 'is' in the comments there is an unexpected word 'is' in the comments that need to be dropped file: drivers/mtd/nand/raw/sm_common.c line: 55 /* NOTE: This layout is is not compatabable with SmartMedia, */ changed to: /* NOTE: This layout is not compatabable with SmartMedia, */ Signed-off-by: Jiang Jian Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220622160511.11679-1-jiangjian@cdjrlc.com drivers/mtd/nand/raw/sm_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d82e6227ea189c0589e7383a36616ac2a2d248c Author: Ard Biesheuvel Date: Mon Jun 20 18:19:43 2022 +0200 efi: vars: Move efivar caching layer into efivarfs Move the fiddly bits of the efivar layer into its only remaining user, efivarfs, and confine its use to that particular module. All other uses of the EFI variable store have no need for this additional layer of complexity, given that they either only read variables, or read and write variables into a separate GUIDed namespace, and cannot be used to manipulate EFI variables that are covered by the EFI spec and/or affect the boot flow. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/efi.c | 1 + drivers/firmware/efi/vars.c | 733 ------------------------------------------- fs/efivarfs/Makefile | 2 +- fs/efivarfs/internal.h | 40 +++ fs/efivarfs/vars.c | 738 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/efi.h | 38 --- 6 files changed, 780 insertions(+), 772 deletions(-) commit 5ac941367a6f85777ef34ec15d60e17ea8e446d4 Author: Ard Biesheuvel Date: Tue Jun 21 15:54:53 2022 +0200 efi: vars: Drop __efivar_entry_iter() helper which is no longer used __efivar_entry_iter() uses a list iterator in a dubious way, i.e., it assumes that the iteration variable always points to an object of the appropriate type, even if the list traversal exhausts the list completely, in which case it will point somewhere in the vicinity of the list's anchor instead. Fortunately, we no longer use this function so we can just get rid of it entirely. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/vars.c | 61 ++++++--------------------------------------- include/linux/efi.h | 3 --- 2 files changed, 7 insertions(+), 57 deletions(-) commit bbc6d2c6ef2248f42689ba0cab7ea8b61588bef2 Author: Ard Biesheuvel Date: Tue Jun 21 12:02:48 2022 +0200 efi: vars: Switch to new wrapper layer Switch the caching linked-list efivars layer implementation to the newly introduced efivar get/set variable wrappers, instead of accessing the lock and the ops pointer directly. This will permit us to move this code out of the public efivars API, and into efivarfs once the obsolete sysfs access method is finally removed. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/vars.c | 133 +++++++++++++++++--------------------------- 1 file changed, 52 insertions(+), 81 deletions(-) commit 3a75f9f2f9ad19bb9a0f566373ae91d8f09db85e Author: Ard Biesheuvel Date: Tue Jun 21 15:48:29 2022 +0200 efi: vars: Use locking version to iterate over efivars linked lists Both efivars and efivarfs uses __efivar_entry_iter() to go over the linked list that shadows the list of EFI variables held by the firmware, but fail to call the begin/end helpers that are documented as a prerequisite. So switch to the proper version, which is efivar_entry_iter(). Given that in both cases, efivar_entry_remove() is invoked with the lock held already, don't take the lock there anymore. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/efivars.c | 8 ++------ drivers/firmware/efi/vars.c | 9 +-------- fs/efivarfs/super.c | 9 +++------ include/linux/efi.h | 2 +- 4 files changed, 7 insertions(+), 21 deletions(-) commit 0f5b2c69a4cbe4166ca24b76d5ada98ed2867741 Author: Ard Biesheuvel Date: Mon Jun 20 13:34:03 2022 +0200 efi: vars: Remove deprecated 'efivars' sysfs interface Commit 5d9db883761a ("efi: Add support for a UEFI variable filesystem") dated Oct 5, 2012, introduced a new efivarfs pseudo-filesystem to replace the efivars sysfs interface that was used up to that point to expose EFI variables to user space. The main problem with the sysfs interface was that it only supported up to 1024 bytes of payload per file, whereas the underlying variables themselves are only bounded by a platform specific per-variable and global limit that is typically much higher than 1024 bytes. The deprecated sysfs interface is only enabled on x86 and Itanium, other EFI enabled architectures only support the efivarfs pseudo-filesystem. So let's finally rip off the band aid, and drop the old interface entirely. This will make it easier to refactor and clean up the underlying infrastructure that is shared between efivars, efivarfs and efi-pstore, and is long overdue for a makeover. Signed-off-by: Ard Biesheuvel Documentation/x86/x86_64/uefi.rst | 2 +- arch/arm/configs/milbeaut_m10v_defconfig | 1 - arch/ia64/configs/bigsur_defconfig | 1 - arch/ia64/configs/generic_defconfig | 1 - arch/ia64/configs/gensparse_defconfig | 1 - arch/ia64/configs/tiger_defconfig | 1 - arch/ia64/configs/zx1_defconfig | 1 - arch/x86/configs/i386_defconfig | 1 - arch/x86/configs/x86_64_defconfig | 1 - drivers/firmware/efi/Kconfig | 12 - drivers/firmware/efi/Makefile | 1 - drivers/firmware/efi/efivars.c | 660 ------------------------------- drivers/firmware/efi/vars.c | 265 +------------ include/linux/efi.h | 18 - 14 files changed, 3 insertions(+), 963 deletions(-) commit 859748255b43460685e93a1f8a40b8cdc3be02f2 Author: Ard Biesheuvel Date: Mon Jun 20 13:21:26 2022 +0200 efi: pstore: Omit efivars caching EFI varstore access layer Avoid the efivars layer and simply call the newly introduced EFI varstore helpers instead. This simplifies the code substantially, and also allows us to remove some hacks in the shared efivars layer that were added for efi-pstore specifically. In order to be able to delete the EFI variable associated with a record, store the UTF-16 name of the variable in the pstore record's priv field. That way, we don't have to make guesses regarding which variable the record may have been loaded from. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/Kconfig | 1 + drivers/firmware/efi/efi-pstore.c | 374 +++++++++----------------------------- drivers/firmware/efi/efivars.c | 12 +- drivers/firmware/efi/vars.c | 12 +- include/linux/efi.h | 2 - 5 files changed, 91 insertions(+), 310 deletions(-) commit 472831d4c4b2d8eac783b256e5c829487d5310df Author: Ard Biesheuvel Date: Mon Jun 20 13:17:20 2022 +0200 efi: vars: Add thin wrapper around EFI get/set variable interface The current efivars layer is a jumble of list iterators, shadow data structures and safe variable manipulation helpers that really belong in the efivarfs pseudo file system once the obsolete sysfs access method to EFI variables is removed. So split off a minimal efivar get/set variable API that reuses the existing efivars_lock semaphore to mediate access to the various runtime services, primarily to ensure that performing a SetVariable() on one CPU while another is calling GetNextVariable() in a loop to enumerate the contents of the EFI variable store does not result in surprises. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/vars.c | 154 +++++++++++++++++++++++++++++++++++++++++--- include/linux/efi.h | 20 ++++++ 2 files changed, 164 insertions(+), 10 deletions(-) commit ec3507b2ca51286de6ecd85fdac8e722219cdef8 Author: Ard Biesheuvel Date: Mon Jun 20 17:04:32 2022 +0200 efi: vars: Don't drop lock in the middle of efivar_init() Even though the efivars_lock lock is documented as protecting the efivars->ops pointer (among other things), efivar_init() happily releases and reacquires the lock for every EFI variable that it enumerates. This used to be needed because the lock was originally a spinlock, which prevented the callback that is invoked for every variable from being able to sleep. However, releasing the lock could potentially invalidate the ops pointer, but more importantly, it might allow a SetVariable() runtime service call to take place concurrently, and the UEFI spec does not define how this affects an enumeration that is running in parallel using the GetNextVariable() runtime service, which is what efivar_init() uses. In the meantime, the lock has been converted into a semaphore, and the only reason we need to drop the lock is because the efivarfs pseudo filesystem driver will otherwise deadlock when it invokes the efivars API from the callback to create the efivar_entry items and insert them into the linked list. (EFI pstore is affected in a similar way) So let's switch to helpers that can be used while the lock is already taken. This way, we can hold on to the lock throughout the enumeration. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/efi-pstore.c | 7 ++----- drivers/firmware/efi/efivars.c | 5 +---- drivers/firmware/efi/vars.c | 22 +++++++++++----------- fs/efivarfs/super.c | 6 ++---- include/linux/efi.h | 1 + 5 files changed, 17 insertions(+), 24 deletions(-) commit 8ca869b24538a7b5501af368e87e4a59b0c04117 Author: Ard Biesheuvel Date: Wed Jun 22 09:31:31 2022 +0200 pstore: Add priv field to pstore_record for backend specific use The EFI pstore backend will need to store per-record variable name data when we switch away from the efivars layer. Add a priv field to struct pstore_record, and document it as holding a backend specific pointer that is assumed to be a kmalloc()d buffer, and will be kfree()d when the entire record is freed. Acked-by: Kees Cook Signed-off-by: Ard Biesheuvel fs/pstore/inode.c | 1 + fs/pstore/platform.c | 1 + include/linux/pstore.h | 4 ++++ 3 files changed, 6 insertions(+) commit 5d04b0b634bb4739f421a1a1a62d666a69cefb10 Merge: b4cbd7a9339f 06f9a6148e28 Author: Jakub Kicinski Date: Fri Jun 24 11:27:28 2022 -0700 Merge branch 'net-pcs-lynx-consolidate-gigabit-code' Russell King says: ==================== net: pcs: lynx: consolidate gigabit code This series consolidates the gigabit setup code in the Lynx PCS driver. In order to do this properly, we first need to fix phylink's advertisement encoding function to handle QSGMII. ==================== Tested-by: Ioana Ciornei Reviewed-by: Ioana Ciornei Link: https://lore.kernel.org/r/YrRbjOEEww38JFIK@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 06f9a6148e28105213961a738f4c317ca6562cf4 Author: Russell King (Oracle) Date: Thu Jun 23 13:25:30 2022 +0100 net: pcs: lynx: consolidate sgmii and 1000base-x config code Consolidate lynx_pcs_config_1000basex() and lynx_pcs_config_sgmii() into a single function. The differences between these two are: - The value that the link timer is set to. - The value of the IF_MODE register. Everything else is identical. This patch depends on "net: phylink: add QSGMII support to phylink_mii_c22_pcs_encode_advertisement()". Signed-off-by: Russell King (Oracle) Tested-by: Ioana Ciornei Reviewed-by: Ioana Ciornei Signed-off-by: Jakub Kicinski drivers/net/pcs/pcs-lynx.c | 56 +++++++++++++++++----------------------------- 1 file changed, 21 insertions(+), 35 deletions(-) commit f56866c486fa8e092d9cc52d45f65b8f07a2f96a Author: Russell King (Oracle) Date: Thu Jun 23 13:25:25 2022 +0100 net: phylink: add QSGMII support to phylink_mii_c22_pcs_encode_advertisement() The QSGMII MAC-to-PHY reply is the same as the SGMII MAC-to-PHY reply. Add support for this to phylink_mii_c22_pcs_encode_advertisement(). Signed-off-by: Russell King (Oracle) Tested-by: Ioana Ciornei Reviewed-by: Ioana Ciornei Signed-off-by: Jakub Kicinski drivers/net/phy/phylink.c | 1 + 1 file changed, 1 insertion(+) commit b4cbd7a9339f396a991a9a056c4b57a35a4cbd96 Author: Dan Carpenter Date: Thu Jun 23 16:34:03 2022 +0300 net: lan743x: Use correct variable in lan743x_sgmii_config() There is a copy and paste bug in lan743x_sgmii_config() so it checks if (ret < 0) instead of if (mii_ctl < 0). Fixes: 46b777ad9a8c ("net: lan743x: Add support to SGMII 1G and 2.5G") Signed-off-by: Dan Carpenter Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/YrRry7K66BzKezl8@kili Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/lan743x_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 99de6509c4135f1d1ceb98c42fa02d249b28b40f Author: Saud Farooqui Date: Thu Jun 23 14:20:47 2022 +0500 rpmsg: Strcpy is not safe, use strscpy_pad() instead Replace strcpy() with strscpy_pad() for copying the rpmsg device name in rpmsg_register_device_override(). Reported-by: kernel test robot Signed-off-by: Saud Farooqui Link: https://lore.kernel.org/r/PA4P189MB14210AA95DCA3715AFA7F4A68BB59@PA4P189MB1421.EURP189.PROD.OUTLOOK.COM Signed-off-by: Mathieu Poirier drivers/rpmsg/rpmsg_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7bd416d35121c95fe47330e09a5c04adbc5f928 Author: Hangyu Hua Date: Fri Jun 24 10:41:20 2022 +0800 rpmsg: Fix possible refcount leak in rpmsg_register_device_override() rpmsg_register_device_override need to call put_device to free vch when driver_set_override fails. Fix this by adding a put_device() to the error path. Fixes: bb17d110cbf2 ("rpmsg: Fix calling device_lock() on non-initialized device") Reviewed-by: Krzysztof Kozlowski Signed-off-by: Hangyu Hua Link: https://lore.kernel.org/r/20220624024120.11576-1-hbh25y@gmail.com Signed-off-by: Mathieu Poirier drivers/rpmsg/rpmsg_core.c | 1 + 1 file changed, 1 insertion(+) commit 803481d869a4c49337c9ae40197c668e365a6fcd Author: Philip Oberfichtner Date: Thu Jun 23 13:22:58 2022 +0200 drm/panel: simple: Add DataImage FG1001L0DSSWMG01 panel support Add DataImage FG1001L0DSSWMG01 10.1" 1280x800 TFT LCD panel support. Signed-off-by: Philip Oberfichtner Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220623112257.4178461-2-pro@denx.de drivers/gpu/drm/panel/panel-simple.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit c3156c6fc3a20bdc59c4f037359609382ce4166c Author: Philip Oberfichtner Date: Thu Jun 23 13:22:56 2022 +0200 dt-bindings: display: simple: Add DataImage FG1001L0DSSWMG01 compatible string Add DataImage FG1001L0DSSWMG01 10.1" 1280x800 TFT LCD panel compatible string. Signed-off-by: Philip Oberfichtner Acked-by: Krzysztof Kozlowski Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220623112257.4178461-1-pro@denx.de Documentation/devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 986fd5fe55cb369c34a1dc65b1469aac536a6d50 Author: Serge Semin Date: Fri Jun 24 17:16:18 2022 +0300 ARM: dts: lpc18xx: 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: Vladimir Zapolskiy Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220624141622.7149-3-Sergey.Semin@baikalelectronics.ru Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/lpc18xx.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6edb323837909462d493f22c07a38a23ef44f944 Author: Vinod Polimera Date: Tue Mar 22 08:57:11 2022 +0530 arm64: dts: qcom: sm8250: remove assigned-clock-rate property for mdp clk Drop the assigned clock rate property and vote on the mdp clock as per calculated value during the usecase. This patch is dependent on the patch ("drm/msm/disp/dpu1: set mdp clk to the maximum frequency in opp table during probe") [1]. [1] https://lore.kernel.org/r/1647269217-14064-2-git-send-email-quic_vpolimer@quicinc.com/ Signed-off-by: Vinod Polimera Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1647919631-14447-6-git-send-email-quic_vpolimer@quicinc.com arch/arm64/boot/dts/qcom/sm8250.dtsi | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 0b24829fd74cf954b3a02e9e4c4da3c098c69fbc Author: Vinod Polimera Date: Tue Mar 22 08:57:10 2022 +0530 arm64: dts: qcom: sdm845: remove assigned-clock-rate property for mdp clk Drop the assigned clock rate property and vote on the mdp clock as per calculated value during the usecase. This patch is dependent on the patch ("drm/msm/disp/dpu1: set mdp clk to the maximum frequency in opp table during probe") [1]. [1] https://lore.kernel.org/r/1647269217-14064-2-git-send-email-quic_vpolimer@quicinc.com/ Signed-off-by: Vinod Polimera Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1647919631-14447-5-git-send-email-quic_vpolimer@quicinc.com arch/arm64/boot/dts/qcom/sdm845.dtsi | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit aa4ae511a760e66f22641d9b9b6052b469df3c10 Author: Vinod Polimera Date: Tue Mar 22 08:57:09 2022 +0530 arm64: dts: qcom: sm7180: remove assigned-clock-rate property for mdp clk Drop the assigned clock rate property and vote on the mdp clock as per calculated value during the usecase. This patch is dependent on the patch ("drm/msm/disp/dpu1: set mdp clk to the maximum frequency in opp table during probe") [1]. [1] https://lore.kernel.org/r/1647269217-14064-2-git-send-email-quic_vpolimer@quicinc.com/ Signed-off-by: Vinod Polimera Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1647919631-14447-4-git-send-email-quic_vpolimer@quicinc.com arch/arm64/boot/dts/qcom/sc7180.dtsi | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 5241fd7fee9bee0cffa33f6d074194e94831e467 Author: Vinod Polimera Date: Tue Mar 22 08:57:08 2022 +0530 arm64: dts: qcom: sm7280: remove assigned-clock-rate property for mdp clk Drop the assigned clock rate property and vote on the mdp clock as per calculated value during the usecase. This patch is dependent on the patch ("drm/msm/disp/dpu1: set mdp clk to the maximum frequency in opp table during probe") [1]. [1] https://lore.kernel.org/r/1647269217-14064-2-git-send-email-quic_vpolimer@quicinc.com/ Signed-off-by: Vinod Polimera Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1647919631-14447-3-git-send-email-quic_vpolimer@quicinc.com arch/arm64/boot/dts/qcom/sc7280.dtsi | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit db209369d48eab1e2c724d90c606752d398ae334 Author: Paolo Bonzini Date: Fri Oct 22 08:47:56 2021 -0400 KVM: SEV-ES: reuse advance_sev_es_emulated_ins for OUT too complete_emulator_pio_in() only has to be called by complete_sev_es_emulated_ins() now; therefore, all that the function does now is adjust sev_pio_count and sev_pio_data. Which is the same for both IN and OUT. No functional change intended. Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 416b992b05c94cd691a1909f10e333f02cb81e56 Author: Arnaud Pouliquen Date: Mon Apr 25 09:17:23 2022 +0200 rpmsg: Fix parameter naming for announce_create/destroy ops The parameter associated to the announce_create and announce_destroy ops functions is not an endpoint but a rpmsg device. Signed-off-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20220425071723.774050-1-arnaud.pouliquen@foss.st.com Signed-off-by: Mathieu Poirier drivers/rpmsg/rpmsg_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8d614a4457f5515be54dca6f0b95b6a9f968a888 Author: Alexander Aring Date: Wed Jun 22 14:45:21 2022 -0400 fs: dlm: remove timeout from dlm_user_adopt_orphan Remove the unused timeout parameter from dlm_user_adopt_orphan(). Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lock.c | 2 +- fs/dlm/lock.h | 2 +- fs/dlm/user.c | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) commit 2bb2a3d66c6f3971a278265011c9ce1d5f0fb3e2 Author: Alexander Aring Date: Wed Jun 22 14:45:20 2022 -0400 fs: dlm: remove waiter warnings This patch removes warning messages that could be logged when remote requests had been waiting on a reply message for some timeout period (which could be set through configfs, but was rarely enabled.) The improved midcomms layer now carefully tracks all messages and replies, and logs much more useful messages if there is an actual problem. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/config.c | 7 ----- fs/dlm/config.h | 1 - fs/dlm/dlm_internal.h | 1 - fs/dlm/lock.c | 80 --------------------------------------------------- fs/dlm/lock.h | 1 - fs/dlm/lockspace.c | 1 - 6 files changed, 91 deletions(-) commit dfc020f334f8daa36bf44417b3066c78ffa5d083 Author: Alexander Aring Date: Wed Jun 22 21:04:22 2022 -0400 fs: dlm: fix grammar in lowcomms output This patch fixes some grammar output in lowcomms implementation by removing the "successful" word which should be "successfully" but it can never be unsuccessfully so we remove it. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lowcomms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f10da927a5e2b0998dca3e5607b39fb8ec007485 Author: Alexander Aring Date: Wed Jun 22 14:45:19 2022 -0400 fs: dlm: add comment about lkb IFL flags This patch adds comments about the difference between the lower 2 bytes of lkb flags and the 2 upper bytes of the lkb IFL flags. In short the upper 2 bytes will be handled as internal flags whereas the lower 2 bytes are part of the DLM protocol and are used to exchange messages. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/dlm_internal.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3182599f5fff93a30bc094a4a20924eea47fcf42 Author: Alexander Aring Date: Wed Jun 22 14:45:16 2022 -0400 fs: dlm: handle recovery result outside of ls_recover This patch cleans up the handling of recovery results by moving it from ls_recover() to the caller do_ls_recovery(). This makes the error handling clearer. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/recoverd.c | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) commit 682bb91b6ba829e4efc635630610444141ee567d Author: Alexander Aring Date: Wed Jun 22 14:45:15 2022 -0400 fs: dlm: make new_lockspace() wait until recovery completes Make dlm_new_lockspace() wait until a full recovery completes sucessfully or fails. Previously, dlm_new_lockspace() returned to the caller after dlm_recover_members() finished, which is only partially through recovery. The result of the previous behavior is that the new lockspace would not be usable for some time (especially with overlapping recoveries), and some errors in the later part of recovery could not be returned to the caller. Kernel callers gfs2 and cluster-md have their own wait handling to wait for recovery to complete after calling dlm_new_lockspace(). This continues to work, but will be unnecessary. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/dlm_internal.h | 4 ++-- fs/dlm/lockspace.c | 9 +++++---- fs/dlm/member.c | 13 ------------- fs/dlm/recoverd.c | 13 +++++++++++++ 4 files changed, 20 insertions(+), 19 deletions(-) commit 7e09b15cfe7b6a6135448015482112869722a763 Author: Alexander Aring Date: Wed Jun 22 14:45:14 2022 -0400 fs: dlm: call dlm_lsop_recover_prep once A lockspace can be "stopped" multiple times consecutively before being "started" (when recoveries overlap.) In this case, the lsop_recover_prep callback only needs to be called once when the lockspace is first stopped, and not repeatedly for each stop. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/member.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit ca8031d917691e5c4f101c9ec39fc41b105b7e14 Author: Alexander Aring Date: Wed Jun 22 14:45:13 2022 -0400 fs: dlm: update comments about recovery and membership handling Make clear that a particular recovery iteration must not be aborted before membership changes are applied to the members list (ls_nodes) and midcomms layer. Interrupting recovery before this can result in missing node-specific changes in midcomms or through lsops. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/member.c | 6 +++++- fs/dlm/recoverd.c | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit f35cee4adb54af59129193d528706b390befb5f4 Author: Paolo Bonzini Date: Fri Oct 22 08:19:48 2021 -0400 KVM: x86: de-underscorify __emulator_pio_in Now all callers except emulator_pio_in_emulated are using __emulator_pio_in/complete_emulator_pio_in explicitly. Move the "either copy the result or attempt PIO" logic in emulator_pio_in_emulated, and rename __emulator_pio_in to just emulator_pio_in. Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit dc7a4bfde507ffe1d8bef49aba1322f1d20c2cb3 Author: Paolo Bonzini Date: Fri Oct 22 08:01:36 2021 -0400 KVM: x86: wean fast IN from emulator_pio_in Use __emulator_pio_in() directly for fast PIO instead of bouncing through emulator_pio_in() now that __emulator_pio_in() fills "val" when handling in-kernel PIO. vcpu->arch.pio.count is guaranteed to be '0', so this a pure nop. emulator_pio_in_emulated is now the last caller of emulator_pio_in. No functional change intended. Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c05e10bce5217657bcdaa9787c9ea94e6b384b2 Author: Paolo Bonzini Date: Wed Jun 15 10:24:01 2022 -0400 KVM: x86: wean in-kernel PIO from vcpu->arch.pio* Make emulator_pio_in_out operate directly on the provided buffer as long as PIO is handled inside KVM. For input operations, this means that, in the case of in-kernel PIO, __emulator_pio_in() does not have to be always followed by complete_emulator_pio_in(). This affects emulator_pio_in() and kvm_sev_es_ins(); for the latter, that is why the call moves from advance_sev_es_emulated_ins() to complete_sev_es_emulated_ins(). For output, it means that vcpu->pio.count is never set unnecessarily and there is no need to clear it; but also vcpu->pio.size must not be used in kvm_sev_es_outs(), because it will not be updated for in-kernel OUT. Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 73 ++++++++++++++++++++++++------------------------------ 1 file changed, 32 insertions(+), 41 deletions(-) commit 30d583fd4e1ecafa8642f9f74e102876b4aeb733 Author: Paolo Bonzini Date: Fri Oct 22 08:07:19 2021 -0400 KVM: x86: move all vcpu->arch.pio* setup in emulator_pio_in_out() For now, this is basically an excuse to add back the void* argument to the function, while removing some knowledge of vcpu->arch.pio* from its callers. The WARN that vcpu->arch.pio.count is zero is also extended to OUT operations. The vcpu->arch.pio* fields still need to be filled even when the PIO is handled in-kernel as __emulator_pio_in() is always followed by complete_emulator_pio_in(). But after fixing that, it will be possible to to only populate the vcpu->arch.pio* fields on userspace exits. No functional change intended. Signed-off-by: Paolo Bonzini arch/x86/kvm/trace.h | 2 +- arch/x86/kvm/x86.c | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) commit 35ab3b77a0ae76246dd2666d4f8190c824392fb4 Author: Paolo Bonzini Date: Wed Jun 15 11:05:06 2022 -0400 KVM: x86: drop PIO from unregistered devices KVM protects the device list with SRCU, and therefore different calls to kvm_io_bus_read()/kvm_io_bus_write() can very well see different incarnations of kvm->buses. If userspace unregisters a device while vCPUs are running there is no well-defined result. This patch applies a safe fallback by returning early from emulator_pio_in_out(). This corresponds to returning zeroes from IN, and dropping the writes on the floor for OUT. Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 0f87ac234d98c68e4b2bfde6a8bcdeef3d3f54b7 Author: Paolo Bonzini Date: Fri Oct 22 06:50:06 2021 -0400 KVM: x86: inline kernel_pio into its sole caller The caller of kernel_pio already has arguments for most of what kernel_pio fishes out of vcpu->arch.pio. This is the first step towards ensuring that vcpu->arch.pio.* is only used when exiting to userspace. No functional change intended. Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) commit 5d92a30e900dc97221e36f09ae740457d560d281 Author: Alexander Aring Date: Wed Jun 22 14:45:12 2022 -0400 fs: dlm: add resource name to tracepoints This patch adds the resource name to dlm tracepoints. The name usually comes through the lkb_resource, but in some cases a resource may not yet be associated with an lkb, in which case the name and namelen parameters are used. It should be okay to access the lkb_resource and the res_name field at the time when the tracepoint is invoked. The resource is assigned to a lkb and it's reference is being held during the tracepoint call. During this time the resource cannot be freed. Also a lkb will never switch its assigned resource. The name of a dlm_rsb is assigned at creation time and should never be changed during runtime as well. The TP_printk() call uses always a hexadecimal string array representation for the resource name (which is not necessarily ascii.) Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lock.c | 4 +- include/trace/events/dlm.h | 110 +++++++++++++++++++++++++++++++++++++-------- 2 files changed, 94 insertions(+), 20 deletions(-) commit 0c4c516fa206d6e8a3986eebd3016a96022792c6 Author: Alexander Aring Date: Wed Jun 22 14:45:11 2022 -0400 fs: dlm: remove additional dereference of lksb This patch removes a dereference of lksb of lkb when calling ast tracepoint. First it reduces additional overhead, even if traces are not active. Second we can deference it in TP_fast_assign from the existing lkb parameter. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/ast.c | 2 +- include/trace/events/dlm.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 7a6177d6f344941410faa51f3e46ef242c54b406 Author: Paolo Bonzini Date: Wed Jun 15 13:32:29 2022 -0400 KVM: x86: complete fast IN directly with complete_emulator_pio_in() Use complete_emulator_pio_in() directly when completing fast PIO, there's no need to bounce through emulator_pio_in(): the comment about ECX changing doesn't apply to fast PIO, which isn't used for string I/O. No functional change intended. Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit cd1e8ca9f3a4c7e3e1f22341a71e013797b3a0f0 Author: Alexander Aring Date: Wed Jun 22 14:45:10 2022 -0400 fs: dlm: change ast and bast trace order This patch moves the trace calls for ast and bast to before the ast and bast callback functions are called rather than after. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/ast.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b92a4e3f86b1a1d0b001ec832ddc96195e3edf31 Author: Alexander Aring Date: Wed Jun 22 14:45:09 2022 -0400 fs: dlm: change posix lock sigint handling This patch changes the handling of a plock operation that was interrupted while waiting for a user space reply from dlm_controld. (This is not the lock blocking state, i.e. locks_lock_file_wait().) Currently, when an op is interrupted while waiting on user space, the op is removed. When the user space result later arrives, a kernel message is loggged: "dev_write no op...". This can be seen from a test such as "stress-ng --fcntl 100" and interrupting it with ctrl-c. Now, leave the op in place when interrupted and remove it when the result arrives (the result will be ignored.) With this change, the logged message is not expected to appear, and would indicate a bug. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/plock.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit 4d413ae9ced4180c0e2114553c3a7560b509b0f8 Author: Alexander Aring Date: Wed Jun 22 14:45:08 2022 -0400 fs: dlm: use dlm_plock_info for do_unlock_close This patch refactors do_unlock_close() by using only struct dlm_plock_info as a parameter. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/plock.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 091abbf578f926e763adc0f577baeb7f405b4bdc Author: Maxim Levitsky Date: Thu May 19 05:27:09 2022 -0500 KVM: x86: nSVM: optimize svm_set_x2apic_msr_interception - Avoid toggling the x2apic msr interception if it is already up to date. - Avoid touching L0 msr bitmap when AVIC is inhibited on entry to the guest mode, because in this case the guest usually uses its own msr bitmap. Later on VM exit, the 1st optimization will allow KVM to skip touching the L0 msr bitmap as well. Reviewed-by: Suravee Suthikulpanit Tested-by: Suravee Suthikulpanit Signed-off-by: Maxim Levitsky Message-Id: <20220519102709.24125-18-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/avic.c | 8 ++++++++ arch/x86/kvm/svm/svm.c | 7 +++++++ arch/x86/kvm/svm/svm.h | 2 ++ 3 files changed, 17 insertions(+) commit 39b6b8c35cf37970e07e9081c0e7d1083930b2f7 Author: Suravee Suthikulpanit Date: Thu May 19 05:27:08 2022 -0500 KVM: SVM: Add AVIC doorbell tracepoint Add a tracepoint to track number of doorbells being sent to signal a running vCPU to process IRQ after being injected. Reviewed-by: Maxim Levitsky Signed-off-by: Suravee Suthikulpanit Message-Id: <20220519102709.24125-17-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/avic.c | 4 +++- arch/x86/kvm/trace.h | 18 ++++++++++++++++++ arch/x86/kvm/x86.c | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) commit ea06d4cabf529eefbe7e89e3a8325f1f89355ccd Author: Alexander Aring Date: Wed Jun 22 14:45:05 2022 -0400 fs: dlm: change plock interrupted message to debug again This patch reverses the commit bcfad4265ced ("dlm: improve plock logging if interrupted") by moving it to debug level and notifying the user an op was removed. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/plock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8c9e639da435874fb845c4d296ce55664071ea7a Author: Suravee Suthikulpanit Date: Thu May 19 05:27:07 2022 -0500 KVM: SVM: Use target APIC ID to complete x2AVIC IRQs when possible For x2AVIC, the index from incomplete IPI #vmexit info is invalid for logical cluster mode. Only ICRH/ICRL values can be used to determine the IPI destination APIC ID. Since QEMU defines guest physical APIC ID to be the same as vCPU ID, it can be used to quickly identify the target vCPU to deliver IPI, and avoid the overhead from searching through all vCPUs to match the target vCPU. Reviewed-by: Maxim Levitsky Signed-off-by: Suravee Suthikulpanit Message-Id: <20220519102709.24125-16-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/avic.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit f8d8ac215919cf40d3b358846ed8e8e3a3683131 Author: Suravee Suthikulpanit Date: Thu May 19 05:27:06 2022 -0500 KVM: x86: Warning APICv inconsistency only when vcpu APIC mode is valid When launching a VM with x2APIC and specify more than 255 vCPUs, the guest kernel can disable x2APIC (e.g. specify nox2apic kernel option). The VM fallbacks to xAPIC mode, and disable the vCPU ID 255 and greater. In this case, APICV is deactivated for the disabled vCPUs. However, the current APICv consistency warning does not account for this case, which results in a warning. Therefore, modify warning logic to report only when vCPU APIC mode is valid. Reviewed-by: Maxim Levitsky Signed-off-by: Suravee Suthikulpanit Message-Id: <20220519102709.24125-15-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0e311d33bfbef86da130674e8528cc23e6acfe16 Author: Suravee Suthikulpanit Date: Thu May 19 05:27:05 2022 -0500 KVM: SVM: Introduce hybrid-AVIC mode Currently, AVIC is inhibited when booting a VM w/ x2APIC support. because AVIC cannot virtualize x2APIC MSR register accesses. However, the AVIC doorbell can be used to accelerate interrupt injection into a running vCPU, while all guest accesses to x2APIC MSRs will be intercepted and emulated by KVM. With hybrid-AVIC support, the APICV_INHIBIT_REASON_X2APIC is no longer enforced. Suggested-by: Maxim Levitsky Reviewed-by: Maxim Levitsky Signed-off-by: Suravee Suthikulpanit Message-Id: <20220519102709.24125-14-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 5 ----- arch/x86/kvm/svm/avic.c | 13 +++++++++++-- arch/x86/kvm/svm/svm.c | 9 --------- 3 files changed, 11 insertions(+), 16 deletions(-) commit c0caeee65af3944b7b8abbf566e7cc1fae15c775 Author: Suravee Suthikulpanit Date: Thu May 19 05:27:04 2022 -0500 KVM: SVM: Do not throw warning when calling avic_vcpu_load on a running vcpu Originalliy, this WARN_ON is designed to detect when calling avic_vcpu_load() on an already running vcpu in AVIC mode (i.e. the AVIC is_running bit is set). However, for x2AVIC, the vCPU can switch from xAPIC to x2APIC mode while in running state, in which the avic_vcpu_load() will be called from svm_refresh_apicv_exec_ctrl(). Therefore, remove this warning since it is no longer appropriate. Reviewed-by: Maxim Levitsky Reviewed-by: Pankaj Gupta Signed-off-by: Suravee Suthikulpanit Message-Id: <20220519102709.24125-13-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/avic.c | 1 - 1 file changed, 1 deletion(-) commit 4d1d7942e36add0aa741a62d0c8e3aba2d5b3ab1 Author: Suravee Suthikulpanit Date: Thu May 19 05:27:03 2022 -0500 KVM: SVM: Introduce logic to (de)activate x2AVIC mode Introduce logic to (de)activate AVIC, which also allows switching between AVIC to x2AVIC mode at runtime. When an AVIC-enabled guest switches from APIC to x2APIC mode, the SVM driver needs to perform the following steps: 1. Set the x2APIC mode bit for AVIC in VMCB along with the maximum APIC ID support for each mode accodingly. 2. Disable x2APIC MSRs interception in order to allow the hardware to virtualize x2APIC MSRs accesses. Reported-by: kernel test robot Reviewed-by: Maxim Levitsky Signed-off-by: Suravee Suthikulpanit Message-Id: <20220519102709.24125-12-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/svm.h | 1 + arch/x86/kvm/svm/avic.c | 39 ++++++++++++++++++++++++++++++++++----- arch/x86/kvm/svm/svm.c | 18 ++++++++++++++++++ arch/x86/kvm/svm/svm.h | 1 + 4 files changed, 54 insertions(+), 5 deletions(-) commit 7a8f7c1f3434afc94b6895eff713e0fcea01e3b4 Author: Maxim Levitsky Date: Thu May 19 05:27:02 2022 -0500 KVM: x86: nSVM: always intercept x2apic msrs As a preparation for x2avic, this patch ensures that x2apic msrs are always intercepted for the nested guest. Reviewed-by: Suravee Suthikulpanit Tested-by: Suravee Suthikulpanit Signed-off-by: Maxim Levitsky Message-Id: <20220519102709.24125-11-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/nested.c | 5 +++++ arch/x86/kvm/svm/svm.h | 9 +++++++++ 2 files changed, 14 insertions(+) commit 05c4fe8c1bd94c6f59a8b82cbd535b1aea55945f Author: Suravee Suthikulpanit Date: Thu May 19 05:27:01 2022 -0500 KVM: SVM: Refresh AVIC configuration when changing APIC mode AMD AVIC can support xAPIC and x2APIC virtualization, which requires changing x2APIC bit VMCB and MSR intercepton for x2APIC MSRs. Therefore, call avic_refresh_apicv_exec_ctrl() to refresh configuration accordingly. Reviewed-by: Maxim Levitsky Signed-off-by: Suravee Suthikulpanit Message-Id: <20220519102709.24125-10-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/avic.c | 12 ++++++++++++ arch/x86/kvm/svm/svm.c | 1 + arch/x86/kvm/svm/svm.h | 2 ++ 3 files changed, 15 insertions(+) commit 8fc9c7a3079e2d2e72dfb2f4e9bb2b1fc67f0ee6 Author: Suravee Suthikulpanit Date: Thu May 19 05:27:00 2022 -0500 KVM: x86: Deactivate APICv on vCPU with APIC disabled APICv should be deactivated on vCPU that has APIC disabled. Therefore, call kvm_vcpu_update_apicv() when changing APIC mode, and add additional check for APIC disable mode when determine APICV activation, Suggested-by: Maxim Levitsky Reviewed-by: Maxim Levitsky Signed-off-by: Suravee Suthikulpanit Message-Id: <20220519102709.24125-9-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 4 +++- arch/x86/kvm/x86.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 5c127c85472c0c4c9d1f88e2807adcab9335d97c Author: Suravee Suthikulpanit Date: Thu May 19 05:26:59 2022 -0500 KVM: SVM: Adding support for configuring x2APIC MSRs interception When enabling x2APIC virtualization (x2AVIC), the interception of x2APIC MSRs must be disabled to let the hardware virtualize guest MSR accesses. Current implementation keeps track of list of MSR interception state in the svm_direct_access_msrs array. Therefore, extends the array to include x2APIC MSRs. Reviewed-by: Maxim Levitsky Signed-off-by: Suravee Suthikulpanit Message-Id: <20220519102709.24125-8-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/svm.c | 25 +++++++++++++++++++++++++ arch/x86/kvm/svm/svm.h | 4 ++-- 2 files changed, 27 insertions(+), 2 deletions(-) commit ab1b1dc131cd7da4c66758e711c0f69da3633561 Author: Suravee Suthikulpanit Date: Thu May 19 05:26:58 2022 -0500 KVM: SVM: Do not support updating APIC ID when in x2APIC mode In X2APIC mode, the Logical Destination Register is read-only, which provides a fixed mapping between the logical and physical APIC IDs. Therefore, there is no Logical APIC ID table in X2AVIC and the processor uses the X2APIC ID in the backing page to create a vCPU’s logical ID. In addition, KVM does not support updating APIC ID in x2APIC mode, which means AVIC does not need to handle this case. Therefore, check x2APIC mode when handling physical and logical APIC ID update, and when invalidating logical APIC ID table. Reviewed-by: Maxim Levitsky Suggested-by: Maxim Levitsky Signed-off-by: Suravee Suthikulpanit Message-Id: <20220519102709.24125-7-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/avic.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit c514d3a348ac4358215fdfb9ed17d4c01dd39731 Author: Suravee Suthikulpanit Date: Thu May 19 05:26:57 2022 -0500 KVM: SVM: Update avic_kick_target_vcpus to support 32-bit APIC ID In x2APIC mode, ICRH contains 32-bit destination APIC ID. So, update the avic_kick_target_vcpus() accordingly. Reviewed-by: Maxim Levitsky Signed-off-by: Suravee Suthikulpanit Message-Id: <20220519102709.24125-6-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/avic.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit d2fe6bf5b881205ae99e858ed9b7ba1ebdb9c029 Author: Suravee Suthikulpanit Date: Thu May 19 05:26:56 2022 -0500 KVM: SVM: Update max number of vCPUs supported for x2AVIC mode xAVIC and x2AVIC modes can support diffferent number of vcpus. Update existing logics to support each mode accordingly. Also, modify the maximum physical APIC ID for AVIC to 255 to reflect the actual value supported by the architecture. Reviewed-by: Maxim Levitsky Reviewed-by: Pankaj Gupta Signed-off-by: Suravee Suthikulpanit Message-Id: <20220519102709.24125-5-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/svm.h | 12 +++++++++--- arch/x86/kvm/svm/avic.c | 8 +++++--- 2 files changed, 14 insertions(+), 6 deletions(-) commit 4bdec12aa8d6d0fd7f1ac6740c456bf726e53c0b Author: Suravee Suthikulpanit Date: Thu May 19 05:26:55 2022 -0500 KVM: SVM: Detect X2APIC virtualization (x2AVIC) support Add CPUID check for the x2APIC virtualization (x2AVIC) feature. If available, the SVM driver can support both AVIC and x2AVIC modes when load the kvm_amd driver with avic=1. The operating mode will be determined at runtime depending on the guest APIC mode. Reviewed-by: Maxim Levitsky Reviewed-by: Pankaj Gupta Signed-off-by: Suravee Suthikulpanit Message-Id: <20220519102709.24125-4-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/svm.h | 3 +++ arch/x86/kvm/svm/avic.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ arch/x86/kvm/svm/svm.c | 15 ++------------- arch/x86/kvm/svm/svm.h | 9 +++++++++ 4 files changed, 59 insertions(+), 13 deletions(-) commit bf348f667ed36c0799dd6d10adb7be9cdfea48c3 Author: Suravee Suthikulpanit Date: Thu May 19 05:26:54 2022 -0500 KVM: x86: lapic: Rename [GET/SET]_APIC_DEST_FIELD to [GET/SET]_XAPIC_DEST_FIELD To signify that the macros only support 8-bit xAPIC destination ID. Suggested-by: Maxim Levitsky Reviewed-by: Maxim Levitsky Reviewed-by: Pankaj Gupta Signed-off-by: Suravee Suthikulpanit Reviewed-by: Paolo Bonzini Message-Id: <20220519102709.24125-3-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/hyperv/hv_apic.c | 2 +- arch/x86/include/asm/apicdef.h | 4 ++-- arch/x86/kernel/apic/apic.c | 2 +- arch/x86/kernel/apic/ipi.c | 2 +- arch/x86/kvm/lapic.c | 2 +- arch/x86/kvm/svm/avic.c | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) commit aae99a7c9ab371b2cb402eebf62d4e70258f8a6d Author: Suravee Suthikulpanit Date: Thu May 19 05:26:53 2022 -0500 x86/cpufeatures: Introduce x2AVIC CPUID bit Introduce a new feature bit for virtualized x2APIC (x2AVIC) in CPUID_Fn8000000A_EDX [SVM Revision and Feature Identification]. Reviewed-by: Maxim Levitsky Signed-off-by: Suravee Suthikulpanit Reviewed-by: Paolo Bonzini Message-Id: <20220519102709.24125-2-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) commit e36de87d34a7f2f26b2e2129c6dc18a0024663eb Author: Vineeth Pillai Date: Mon May 23 15:03:27 2022 -0400 KVM: debugfs: expose pid of vcpu threads Add a new debugfs file to expose the pid of each vcpu threads. This is very helpful for userland tools to get the vcpu pids without worrying about thread naming conventions of the VMM. Signed-off-by: Vineeth Pillai (Google) Message-Id: <20220523190327.2658-1-vineeth@bitbyteword.org> Signed-off-by: Paolo Bonzini include/linux/kvm_host.h | 2 ++ virt/kvm/kvm_main.c | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) commit 0429796e45ec17eee26d7a59de92271c275d7666 Author: Ravi Bangoria Date: Sat Jun 4 10:15:19 2022 +0530 perf script ibs: Support new IBS bits in raw trace dump Interpret Additional set of IBS register bits while doing perf report/script raw dump. IBS op PMU ex: $ sudo ./perf record -c 130 -a -e ibs_op/l3missonly=1/ --raw-samples $ sudo ./perf report -D ... ibs_op_ctl: 0000004500070008 MaxCnt 128 L3MissOnly 1 En 1 Val 1 CntCtl 0=cycles CurCnt 69 ibs_op_data: 0000000000710002 CompToRetCtr 2 TagToRetCtr 113 BrnRet 0 RipInvalid 0 BrnFuse 0 Microcode 0 ibs_op_data2: 0000000000000002 CacheHitSt 0=M-state RmtNode 0 DataSrc 2=A peer cache in a near CCX ibs_op_data3: 000000681d1700a1 LdOp 1 StOp 0 DcL1TlbMiss 0 DcL2TlbMiss 0 DcL1TlbHit2M 0 DcL1TlbHit1G 1 DcL2TlbHit2M 0 DcMiss 1 DcMisAcc 0 DcWcMemAcc 0 DcUcMemAcc 0 DcLockedOp 0 DcMissNoMabAlloc 1 DcLinAddrValid 1 DcPhyAddrValid 1 DcL2TlbHit1G 0 L2Miss 1 SwPf 0 OpMemWidth 8 bytes OpDcMissOpenMemReqs 7 DcMissLat 104 TlbRefillLat 0 IBS Fetch PMU ex: $ sudo ./perf record -c 130 -a -e ibs_fetch/l3missonly=1/ --raw-samples $ sudo ./perf report -D ... ibs_fetch_ctl: 3c1f00c700080008 MaxCnt 128 Cnt 128 Lat 199 En 1 Val 1 Comp 1 IcMiss 1 PhyAddrValid 1 L1TlbPgSz 4KB L1TlbMiss 0 L2TlbMiss 0 RandEn 0 L2Miss 1 L3MissOnly 1 FetchOcMiss 1 FetchL3Miss 1 With the DataSrc extensions, the source of data can be decoded among: - Local L3 or other L1/L2 in CCX. - A peer cache in a near CCX. - Data returned from DRAM. - A peer cache in a far CCX. - DRAM address map with "long latency" bit set. - Data returned from MMIO/Config/PCI/APIC. - Extension Memory (S-Link, GenZ, etc - identified by the CS target and/or address map at DF's choice). - Peer Agent Memory. Signed-off-by: Ravi Bangoria Acked-by: Namhyung Kim Cc: Ananth Narayan Cc: Andi Kleen Cc: Borislav Petkov Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Peter Zijlstra Cc: Robert Richter Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Cc: Thomas Gleixner Cc: like.xu.linux@gmail.com Cc: x86@kernel.org Link: https://lore.kernel.org/r/20220604044519.594-9-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/amd-sample-raw.c | 64 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 58 insertions(+), 6 deletions(-) commit c1f4f92b7d5d3deeaae758a1a7ed263b1381dd1c Author: Ravi Bangoria Date: Sat Jun 4 10:15:18 2022 +0530 perf tool ibs: Sync AMD IBS header file IBS support has been enhanced with two new features in upcoming uarch: 1. DataSrc extension 2. L3 miss filtering. Additional set of bits has been introduced in IBS registers to exploit these features. New bits are already defining in arch/x86/ header. Sync it with tools header file. Also rename existing ibs_op_data field 'data_src' to 'data_src_lo'. Signed-off-by: Ravi Bangoria Acked-by: Namhyung Kim Cc: Ananth Narayan Cc: Andi Kleen Cc: Borislav Petkov Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Peter Zijlstra Cc: Robert Richter Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Cc: Thomas Gleixner Cc: like.xu.linux@gmail.com Cc: x86@kernel.org Link: https://lore.kernel.org/r/20220604044519.594-8-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/asm/amd-ibs.h | 16 ++++++++++------ tools/perf/util/amd-sample-raw.c | 4 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) commit 2139f7424819818afc25fbfd0effda4babe235f6 Author: Ravi Bangoria Date: Sat Jun 4 10:15:16 2022 +0530 perf header: Record non-CPU PMU capabilities PMUs advertise their capabilities via sysfs attribute files but the perf tool currently parses only core(CPU) or hybrid core PMU capabilities. Add support of recording non-core PMU capabilities int perf.data header. Note that a newly proposed HEADER_PMU_CAPS is replacing existing HEADER_HYBRID_CPU_PMU_CAPS. Special care is taken for hybrid core PMUs by writing their capabilities first in the perf.data header to make sure new perf.data file being read by old perf tool does not break. Reviewed-by: Kan Liang Signed-off-by: Ravi Bangoria Acked-by: Namhyung Kim Cc: Ananth Narayan Cc: Andi Kleen Cc: Borislav Petkov Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Peter Zijlstra Cc: Robert Richter Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Cc: Thomas Gleixner Cc: like.xu.linux@gmail.com Cc: x86@kernel.org Link: https://lore.kernel.org/r/20220604044519.594-6-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf.data-file-format.txt | 10 +- tools/perf/builtin-inject.c | 2 +- tools/perf/util/env.c | 60 +++++++- tools/perf/util/env.h | 12 +- tools/perf/util/header.c | 160 ++++++++++++--------- tools/perf/util/header.h | 2 +- 6 files changed, 158 insertions(+), 88 deletions(-) commit ff34eaa820231dfaecca9c048637bd86ba294bc7 Author: Ravi Bangoria Date: Sat Jun 4 10:15:15 2022 +0530 perf header: Store PMU caps in an array of strings Currently all capabilities are stored in a single string separated by NULL character. Instead, store them in an array which makes searching of capability easier. Reviewed-by: Kan Liang Signed-off-by: Ravi Bangoria Acked-by: Namhyung Kim Cc: Ananth Narayan Cc: Andi Kleen Cc: Borislav Petkov Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Peter Zijlstra Cc: Robert Richter Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Cc: Thomas Gleixner Cc: like.xu.linux@gmail.com Cc: x86@kernel.org Link: https://lore.kernel.org/r/20220604044519.594-5-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/env.c | 6 ++++- tools/perf/util/env.h | 4 +-- tools/perf/util/header.c | 63 ++++++++++++++++++++++++++---------------------- 3 files changed, 41 insertions(+), 32 deletions(-) commit 2a12bef413bb278db202ecb6adbd9c18dec4b260 Author: Ravi Bangoria Date: Sat Jun 4 10:15:14 2022 +0530 perf header: Pass "cpu" pmu name while printing caps Avoid unnecessary conditional code to check if pmu name is NULL or not by passing "cpu" pmu name to the printing function. Reviewed-by: Kan Liang Signed-off-by: Ravi Bangoria Acked-by: Namhyung Kim Cc: Ananth Narayan Cc: Andi Kleen Cc: Borislav Petkov Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Peter Zijlstra Cc: Robert Richter Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Cc: Thomas Gleixner Cc: like.xu.linux@gmail.com Cc: x86@kernel.org Link: https://lore.kernel.org/r/20220604044519.594-4-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 3339ec44be7f9963c82d5d21e163f16f96e5ca58 Author: Ravi Bangoria Date: Sat Jun 4 10:15:13 2022 +0530 perf pmu: Parse pmu caps sysfs only once In addition to returning nr_caps, cache it locally in struct perf_pmu. Similarly, cache status of whether caps sysfs has already been parsed or not. These will help to avoid parsing sysfs every time the function gets called. Reviewed-by: Kan Liang Signed-off-by: Ravi Bangoria Acked-by: Namhyung Kim Cc: Ananth Narayan Cc: Andi Kleen Cc: Borislav Petkov Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Peter Zijlstra Cc: Robert Richter Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Cc: Thomas Gleixner Cc: like.xu.linux@gmail.com Cc: x86@kernel.org Link: https://lore.kernel.org/r/20220604044519.594-3-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 15 +++++++++++---- tools/perf/util/pmu.h | 2 ++ 2 files changed, 13 insertions(+), 4 deletions(-) commit 9ab95b0b15a092abb7c3309f3580f572a041f9ab Author: Ravi Bangoria Date: Sat Jun 4 10:15:12 2022 +0530 perf record ibs: Warn about sampling period skew Samples without an L3 miss are discarded and counter is reset with random value (between 1-15 for fetch PMU and 1-127 for op PMU) when IBS L3 miss filtering is enabled. This causes a sampling period skew but there is no way to reconstruct aggregated sampling period. So print a warning at perf record if user sets l3missonly=1. Ex: # perf record -c 10000 -C 0 -e ibs_op/l3missonly=1/ WARNING: Hw internally resets sampling period when L3 Miss Filtering is enabled and tagged operation does not cause L3 Miss. This causes sampling period skew. Signed-off-by: Ravi Bangoria Acked-by: Ian Rogers Acked-by: Namhyung Kim Cc: Ananth Narayan Cc: Andi Kleen Cc: Borislav Petkov Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Peter Zijlstra Cc: Robert Richter Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Cc: Thomas Gleixner Cc: like.xu.linux@gmail.com Cc: x86@kernel.org Link: http://lore.kernel.org/lkml/20220604044519.594-2-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/evsel.c | 52 ++++++++++++++++++++++++++++++++++++++++ tools/perf/util/evsel.c | 7 ++++++ tools/perf/util/evsel.h | 1 + 3 files changed, 60 insertions(+) commit 7559d9f97581654fbd0c3fa21878b6d043bbe439 Author: Ard Biesheuvel Date: Fri Jun 24 17:06:51 2022 +0200 arm64: setup: drop early FDT pointer helpers We no longer need to call into the kernel to map the FDT before calling into the kernel so let's drop the helpers we added for this. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-22-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/setup.h | 3 --- arch/arm64/kernel/head.S | 2 -- arch/arm64/kernel/setup.c | 15 --------------- 3 files changed, 20 deletions(-) commit aacd149b62382c63911060b8f64c1e3d89bd405a Author: Ard Biesheuvel Date: Fri Jun 24 17:06:50 2022 +0200 arm64: head: avoid relocating the kernel twice for KASLR Currently, when KASLR is in effect, we set up the kernel virtual address space twice: the first time, the KASLR seed is looked up in the device tree, and the kernel virtual mapping is torn down and recreated again, after which the relocations are applied a second time. The latter step means that statically initialized global pointer variables will be reset to their initial values, and to ensure that BSS variables are not set to values based on the initial translation, they are cleared again as well. All of this is needed because we need the command line (taken from the DT) to tell us whether or not to randomize the virtual address space before entering the kernel proper. However, this code has expanded little by little and now creates global state unrelated to the virtual randomization of the kernel before the mapping is torn down and set up again, and the BSS cleared for a second time. This has created some issues in the past, and it would be better to avoid this little dance if possible. So instead, let's use the temporary mapping of the device tree, and execute the bare minimum of code to decide whether or not KASLR should be enabled, and what the seed is. Only then, create the virtual kernel mapping, clear BSS, etc and proceed as normal. This avoids the issues around inconsistent global state due to BSS being cleared twice, and is generally more maintainable, as it permits us to defer all the remaining DT parsing and KASLR initialization to a later time. This means the relocation fixup code runs only a single time as well, allowing us to simplify the RELR handling code too, which is not idempotent and was therefore required to keep track of the offset that was applied the first time around. Note that this means we have to clone a pair of FDT library objects, so that we can control how they are built - we need the stack protector and other instrumentation disabled so that the code can tolerate being called this early. Note that only the kernel page tables and the temporary stack are mapped read-write at this point, which ensures that the early code does not modify any global state inadvertently. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-21-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/Makefile | 2 +- arch/arm64/kernel/head.S | 73 +++++++----------------- arch/arm64/kernel/image-vars.h | 4 ++ arch/arm64/kernel/kaslr.c | 87 ---------------------------- arch/arm64/kernel/pi/Makefile | 33 +++++++++++ arch/arm64/kernel/pi/kaslr_early.c | 112 +++++++++++++++++++++++++++++++++++++ 6 files changed, 171 insertions(+), 140 deletions(-) commit fc5a89f75d2aad3e566e030675ac420aee49729c Author: Ard Biesheuvel Date: Fri Jun 24 17:06:49 2022 +0200 arm64: kaslr: defer initialization to initcall where permitted The early KASLR init code runs extremely early, and anything that could be deferred until later should be. So let's defer the randomization of the module region until much later - this also simplifies the arithmetic, given that we no longer have to reason about the link time vs load time placement of the core kernel explicitly. Also get rid of the global status variable, and infer the status reported by the diagnostic print from other KASLR related context. While at it, get rid of the special case for KASAN without KASAN_VMALLOC, which never occurs in practice. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-20-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/kaslr.c | 95 ++++++++++++++++++++--------------------------- 1 file changed, 40 insertions(+), 55 deletions(-) commit 005e12676af09a308f18cb94aa593bb30dee031e Author: Ard Biesheuvel Date: Fri Jun 24 17:06:48 2022 +0200 arm64: head: record CPU boot mode after enabling the MMU In order to avoid having to touch memory with the MMU and caches disabled, and therefore having to invalidate it from the caches explicitly, just defer storing the value until after the MMU has been turned on, unless we are giving up with an error. While at it, move the associated variable definitions into C code. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-19-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 50 ++++++++++++-------------------------------- arch/arm64/kernel/hyp-stub.S | 4 ++-- arch/arm64/mm/mmu.c | 8 +++++++ 3 files changed, 23 insertions(+), 39 deletions(-) commit 6495b9ba62711b581680fbdd90d0bfc48cf5c91b Author: Ard Biesheuvel Date: Fri Jun 24 17:06:47 2022 +0200 arm64: head: populate kernel page tables with MMU and caches on Now that we can access the entire kernel image via the ID map, we can execute the page table population code with the MMU and caches enabled. The only thing we need to ensure is that translations via TTBR1 remain disabled while we are updating the page tables the second time around, in case KASLR wants them to be randomized. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-18-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 62 +++++++++++++----------------------------------- 1 file changed, 16 insertions(+), 46 deletions(-) commit c0be8f18a3bfcfd369eba21337e6c89a4bb8b0e8 Author: Ard Biesheuvel Date: Fri Jun 24 17:06:46 2022 +0200 arm64: head: factor out TTBR1 assignment into a macro Create a macro load_ttbr1 to avoid having to repeat the same instruction sequence 3 times in a subsequent patch. No functional change intended. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-17-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 17 +++++++++++++---- arch/arm64/kernel/head.S | 5 +---- 2 files changed, 14 insertions(+), 8 deletions(-) commit a004393f45d9a55e55d76f252914bdddffdde204 Author: Ard Biesheuvel Date: Fri Jun 24 17:06:45 2022 +0200 arm64: idreg-override: use early FDT mapping in ID map Instead of calling into the kernel to map the FDT into the kernel page tables before even calling start_kernel(), let's switch to the initial, temporary mapping of the device tree that has been added to the ID map. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-16-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 1 + arch/arm64/kernel/idreg-override.c | 17 ++++++----------- 2 files changed, 7 insertions(+), 11 deletions(-) commit f70b3a23324a2d31efb83cc01302acb343e4ec1b Author: Ard Biesheuvel Date: Fri Jun 24 17:06:44 2022 +0200 arm64: head: create a temporary FDT mapping in the initial ID map We need to access the DT very early to get at the command line and the KASLR seed, which currently means we rely on some hacks to call into the kernel before really calling into the kernel, which is undesirable. So instead, let's create a mapping for the FDT in the initial ID map, which is feasible now that it has been extended to cover more than a single page or block, and can be updated in place to remap other output addresses. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-15-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/kernel-pgtable.h | 6 ++++-- arch/arm64/kernel/head.S | 14 +++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) commit d7bea550279db28cd154fd54843ebc858ffdf0b7 Author: Ard Biesheuvel Date: Fri Jun 24 17:06:43 2022 +0200 arm64: head: use relative references to the RELA and RELR tables Formerly, we had to access the RELA and RELR tables via the kernel mapping that was being relocated, and so deriving the start and end addresses using ADRP/ADD references was not possible, as the relocation code runs from the ID map. Now that we map the entire kernel image via the ID map, we can simplify this, and just load the entries via the ID map as well. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-14-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 13 ++++--------- arch/arm64/kernel/vmlinux.lds.S | 12 ++++-------- 2 files changed, 8 insertions(+), 17 deletions(-) commit c3cee924bd855184d15bc4aa6088dcf8e2c1394c Author: Ard Biesheuvel Date: Fri Jun 24 17:06:42 2022 +0200 arm64: head: cover entire kernel image in initial ID map As a first step towards avoiding the need to create, tear down and recreate the kernel virtual mapping with MMU and caches disabled, start by expanding the ID map so it covers the page tables as well as all executable code. This will allow us to populate the page tables with the MMU and caches on, and call KASLR init code before setting up the virtual mapping. Since this ID map is only needed at boot, create it as a temporary set of page tables, and populate the permanent ID map after enabling the MMU and caches. While at it, switch to read-only attributes for the where possible, as writable permissions are only needed for the initial kernel page tables. Note that on 4k granule configurations, the permanent ID map will now be reduced to a single page rather than a 2M block mapping. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-13-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/kernel-pgtable.h | 16 ++++++++++----- arch/arm64/kernel/head.S | 31 +++++++++++++++++++---------- arch/arm64/kernel/vmlinux.lds.S | 7 +++++-- arch/arm64/mm/mmu.c | 35 ++++++++++++++++++++++++++++++++- arch/arm64/mm/proc.S | 8 +++++--- 5 files changed, 76 insertions(+), 21 deletions(-) commit b013c1e1c659b0742f81cc4a95fe61faf6929ae5 Author: Ard Biesheuvel Date: Fri Jun 24 17:06:41 2022 +0200 arm64: head: add helper function to remap regions in early page tables The asm macros used to create the initial ID map and kernel mappings don't support randomly remapping parts of the address space after it has been populated. What we can do, however, given that all block or page mappings are created at the final level, is take a subset of the mapped range and update its attributes or output address. This will permit us to make parts of these page tables read-only, or remap a part of it to cover the device tree. So add a helper that encapsulates this. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-12-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 1682c45b920643cbde31d8a5b7ca7c2be92d6928 Author: Ard Biesheuvel Date: Fri Jun 24 17:06:40 2022 +0200 arm64: mm: provide idmap pointer to cpu_replace_ttbr1() In preparation for changing the way we initialize the permanent ID map, update cpu_replace_ttbr1() so we can use it with the initial ID map as well. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-11-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/mmu_context.h | 13 +++++++++---- arch/arm64/kernel/cpufeature.c | 2 +- arch/arm64/kernel/suspend.c | 2 +- arch/arm64/mm/kasan_init.c | 4 ++-- arch/arm64/mm/mmu.c | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) commit 723d3a8ed1726081ca40f602073c53de28eebb93 Author: Ard Biesheuvel Date: Fri Jun 24 17:06:39 2022 +0200 arm64: head: pass ID map root table address to __enable_mmu() We will be adding an initial ID map that covers the entire kernel image, so we will pass the actual ID map root table to use to __enable_mmu(), rather than hard code it. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-10-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 14 ++++++++------ arch/arm64/kernel/sleep.S | 1 + 2 files changed, 9 insertions(+), 6 deletions(-) commit 2e945851e26836c0f2d34be3763ddf55870e49fe Author: Ard Biesheuvel Date: Fri Jun 24 17:06:38 2022 +0200 arm64: kernel: drop unnecessary PoC cache clean+invalidate Some early boot code runs before the virtual placement of the kernel is finalized, and we used to go back to the very start and recreate the ID map along with the page tables describing the virtual kernel mapping, and this involved setting some global variables with the caches off. In order to ensure that global state created by the KASLR code is not corrupted by the cache invalidation that occurs in that case, we needed to clean those global variables to the PoC explicitly. This is no longer needed now that the ID map is created only once (and the associated global variable updates are no longer repeated). So drop the cache maintenance that is no longer necessary. Signed-off-by: Ard Biesheuvel Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20220624150651.1358849-9-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/kaslr.c | 11 ----------- 1 file changed, 11 deletions(-) commit e42ade29e3bcb32049da298d2927522c104abae9 Author: Ard Biesheuvel Date: Fri Jun 24 17:06:37 2022 +0200 arm64: head: split off idmap creation code Split off the creation of the ID map page tables, so that we can avoid running it again unnecessarily when KASLR is in effect (which only randomizes the virtual placement). This will permit us to drop some explicit cache maintenance to the PoC which was necessary because the cache invalidation being performed on some global variables might otherwise clobber unrelated variables that happen to share a cacheline. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-8-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 101 ++++++++++++++++++++++++----------------------- 1 file changed, 52 insertions(+), 49 deletions(-) commit 50fcd39d24c24bb86d695c93ad41fccfed1fc7ac Author: Ard Biesheuvel Date: Fri Jun 24 17:06:36 2022 +0200 arm64: head: switch to map_memory macro for the extended ID map In a future patch, we will start using an ID map that covers the entire image, rather than a single page. This means that we need to deal with the pathological case of an extended ID map where the kernel image does not fit neatly inside a single entry at the root level, which means we will need to create additional table entries and map additional pages for page tables. The existing map_memory macro already takes care of most of that, so let's just extend it to deal with this case as well. While at it, drop the conditional branch on the value of T0SZ: we don't set the variable anymore in the entry code, and so we can just let the map_memory macro deal with the case where the output address exceeds VA_BITS. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-7-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 76 +++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 39 deletions(-) commit 53519ddf5894476bf87b1c8694cee13524e211ac Author: Ard Biesheuvel Date: Fri Jun 24 17:06:35 2022 +0200 arm64: head: simplify page table mapping macros (slightly) Simplify the macros in head.S that are used to set up the early page tables, by switching to immediates for the number of bits that are interpreted as the table index at each level. This makes it much easier to infer from the instruction stream what is going on, and reduces the number of instructions emitted substantially. Note that the extended ID map for cases where no additional level needs to be configured now uses a compile time size as well, which means that we interpret up to 10 bits as the table index at the root level (for 52-bit physical addressing), without taking into account whether or not this is supported on the current system. However, those bits can only be set if we are executing the image from an address that exceeds the 48-bit PA range, and are guaranteed to be cleared otherwise, and given that we are dealing with a mapping in the lower TTBR0 range of the address space, the result is therefore the same as if we'd mask off only 6 bits. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-6-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 55 +++++++++++++++++++----------------------------- 1 file changed, 22 insertions(+), 33 deletions(-) commit ebd9aea1f27ef27ed8581c16a96352b3cce89f39 Author: Ard Biesheuvel Date: Fri Jun 24 17:06:34 2022 +0200 arm64: head: drop idmap_ptrs_per_pgd The assignment of idmap_ptrs_per_pgd lacks any cache invalidation, even though it is updated with the MMU and caches disabled. However, we never bother to read the value again except in the very next instruction, and so we can just drop the variable entirely. Signed-off-by: Ard Biesheuvel Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20220624150651.1358849-5-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/mmu_context.h | 1 - arch/arm64/kernel/head.S | 7 +++---- arch/arm64/mm/mmu.c | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) commit e8d13cced5c5038cc93de9561cf2cb4f22205061 Author: Ard Biesheuvel Date: Fri Jun 24 17:06:33 2022 +0200 arm64: head: move assignment of idmap_t0sz to C code Setting idmap_t0sz involves fiddling with the caches if done with the MMU off. Since we will be creating an initial ID map with the MMU and caches off, and the permanent ID map with the MMU and caches on, let's move this assignment of idmap_t0sz out of the startup code, and replace it with a macro that simply issues the three instructions needed to calculate the value wherever it is needed before the MMU is turned on. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-4-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 14 ++++++++++++++ arch/arm64/include/asm/mmu_context.h | 2 +- arch/arm64/kernel/head.S | 13 +------------ arch/arm64/mm/mmu.c | 4 +++- arch/arm64/mm/proc.S | 2 +- 5 files changed, 20 insertions(+), 15 deletions(-) commit 0d9b1ffefabee93727bae68201593fac80a79002 Author: Ard Biesheuvel Date: Fri Jun 24 17:06:32 2022 +0200 arm64: mm: make vabits_actual a build time constant if possible Currently, we only support 52-bit virtual addressing on 64k pages configurations, and in all other cases, vabits_actual is guaranteed to equal VA_BITS (== VA_BITS_MIN). So get rid of the variable entirely in that case. While at it, move the assignment out of the asm entry code - it has no need to be there. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220624150651.1358849-3-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/memory.h | 4 ++++ arch/arm64/kernel/head.S | 15 +-------------- arch/arm64/mm/init.c | 15 ++++++++++++++- arch/arm64/mm/mmu.c | 4 +++- 4 files changed, 22 insertions(+), 16 deletions(-) commit 475031b6ed43d208925c81bea612f48c3259c3c8 Author: Ard Biesheuvel Date: Fri Jun 24 17:06:31 2022 +0200 arm64: head: move kimage_vaddr variable into C file This variable definition does not need to be in head.S so move it out. Signed-off-by: Ard Biesheuvel Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20220624150651.1358849-2-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 7 ------- arch/arm64/mm/mmu.c | 3 +++ 2 files changed, 3 insertions(+), 7 deletions(-) commit 799270e9b8be0846d418ed6c3f61408aef8059a1 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:13 2022 -0700 ARM: tegra: Align gpio-keys node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra114-asus-tf701t.dts | 8 ++++---- arch/arm/boot/dts/tegra114-dalmore.dts | 8 ++++---- arch/arm/boot/dts/tegra114-roth.dts | 6 +++--- arch/arm/boot/dts/tegra114-tn7.dts | 6 +++--- arch/arm/boot/dts/tegra124-apalis-eval.dts | 2 +- arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts | 2 +- arch/arm/boot/dts/tegra124-jetson-tk1.dts | 2 +- arch/arm/boot/dts/tegra124-nyan.dtsi | 4 ++-- arch/arm/boot/dts/tegra124-venice2.dts | 2 +- arch/arm/boot/dts/tegra20-acer-a500-picasso.dts | 8 ++++---- arch/arm/boot/dts/tegra20-asus-tf101.dts | 8 ++++---- arch/arm/boot/dts/tegra20-colibri-eval-v3.dts | 2 +- arch/arm/boot/dts/tegra20-colibri-iris.dts | 2 +- arch/arm/boot/dts/tegra20-harmony.dts | 2 +- arch/arm/boot/dts/tegra20-paz00.dts | 2 +- arch/arm/boot/dts/tegra20-seaboard.dts | 4 ++-- arch/arm/boot/dts/tegra20-trimslice.dts | 2 +- arch/arm/boot/dts/tegra20-ventana.dts | 2 +- arch/arm/boot/dts/tegra30-apalis-eval.dts | 2 +- arch/arm/boot/dts/tegra30-apalis-v1.1-eval.dts | 2 +- arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi | 8 ++++---- arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi | 10 +++++----- arch/arm/boot/dts/tegra30-cardhu.dtsi | 6 +++--- arch/arm/boot/dts/tegra30-colibri-eval-v3.dts | 2 +- arch/arm/boot/dts/tegra30-ouya.dts | 2 +- arch/arm/boot/dts/tegra30-pegatron-chagall.dts | 10 +++++----- 26 files changed, 57 insertions(+), 57 deletions(-) commit a4740b148a04dc60e14fe6a1dfe216d3bae214fd Author: Timo Alho Date: Wed Jun 22 16:22:59 2022 +0300 firmware: tegra: bpmp: Do only aligned access to IPC memory area Use memcpy_toio and memcpy_fromio variants of memcpy to guarantee no unaligned access to IPC memory area. This is to allow the IPC memory to be mapped as Device memory to further suppress speculative reads from happening within the 64 kB memory area above the IPC memory when 64 kB memory pages are used. Signed-off-by: Timo Alho Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/firmware/tegra/bpmp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4de5c54f8c806621ab055eeb240877d75d53b208 Author: Paolo Bonzini Date: Fri Jun 24 11:45:45 2022 -0400 KVM: nVMX: clean up posted interrupt descriptor try_cmpxchg Rely on try_cmpxchg64 for re-reading the PID on failure, using READ_ONCE only right before the first iteration. Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/posted_intr.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 1404acbb7f68dc0a708091240e75efa5e09b0894 Author: Mark-PK Tsai Date: Fri Apr 22 14:24:36 2022 +0800 remoteproc: Fix dma_mem leak after rproc_shutdown Release dma coherent memory before rvdev is free in rproc_rvdev_release(). Below is the kmemleak report: unreferenced object 0xffffff8051c1a980 (size 128): comm "sh", pid 4895, jiffies 4295026604 (age 15481.896s) 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: [<000000003a0f3ec0>] dma_declare_coherent_memory+0x44/0x11c [<00000000ad243164>] rproc_add_virtio_dev+0xb8/0x20c [<00000000d219c8e9>] rproc_vdev_do_start+0x18/0x24 [<00000000e694b468>] rproc_start+0x22c/0x3e0 [<000000000b938941>] rproc_boot+0x4a4/0x860 [<000000003c4dc532>] state_store.52856+0x10c/0x1b8 [<00000000df2297ac>] dev_attr_store+0x34/0x84 [<0000000083a53bdb>] sysfs_kf_write+0x60/0xbc [<000000008ed830df>] kernfs_fop_write+0x198/0x458 [<0000000072b9ad06>] __vfs_write+0x50/0x210 [<00000000377d7469>] vfs_write+0xe4/0x1a8 [<00000000c3fc594e>] ksys_write+0x78/0x144 [<000000009aef6f4b>] __arm64_sys_write+0x1c/0x28 [<0000000003496a98>] el0_svc_common+0xc8/0x22c [<00000000ea3fe7a3>] el0_svc_compat_handler+0x1c/0x28 [<00000000d1a85a4e>] el0_svc_compat+0x8/0x24 Signed-off-by: Mark-PK Tsai Acked-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220422062436.14384-3-mark-pk.tsai@mediatek.com Signed-off-by: Mathieu Poirier drivers/remoteproc/remoteproc_core.c | 1 + 1 file changed, 1 insertion(+) commit e61c451476e61450f6771ce03bbc01210a09be16 Author: Mark-PK Tsai Date: Fri Apr 22 14:24:35 2022 +0800 dma-mapping: Add dma_release_coherent_memory to DMA API Add dma_release_coherent_memory to DMA API to allow dma user call it to release dev->dma_mem when the device is removed. Signed-off-by: Mark-PK Tsai Acked-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220422062436.14384-2-mark-pk.tsai@mediatek.com Signed-off-by: Mathieu Poirier include/linux/dma-map-ops.h | 3 +++ kernel/dma/coherent.c | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) commit e112c42eb3b7225dd722493e9be8ce286c8a5af0 Author: Sascha Hauer Date: Fri Jun 24 11:26:01 2022 +0200 ASoC: audio_graph_card2: Fix port numbers in example The example in audio-graph-card2.c has multiple nodes with the same name in it. Change the port numbers to get different names. Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20220624092601.2445224-1-s.hauer@pengutronix.de Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bf2aebccddef890c4385d1ef19f9fee62d51bcc2 Author: Francesco Dolcini Date: Fri Jun 24 12:13:01 2022 +0200 ASoC: sgtl5000: Fix noise on shutdown/remove Put the SGTL5000 in a silent/safe state on shutdown/remove, this is required since the SGTL5000 produces a constant noise on its output after it is configured and its clock is removed. Without this change this is happening every time the module is unbound/removed or from reboot till the clock is enabled again. The issue was experienced on both a Toradex Colibri/Apalis iMX6, but can be easily reproduced everywhere just playing something on the codec and after that removing/unbinding the driver. Fixes: 9b34e6cc3bc2 ("ASoC: Add Freescale SGTL5000 codec support") Signed-off-by: Francesco Dolcini Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/20220624101301.441314-1-francesco.dolcini@toradex.com Signed-off-by: Mark Brown sound/soc/codecs/sgtl5000.c | 9 +++++++++ sound/soc/codecs/sgtl5000.h | 1 + 2 files changed, 10 insertions(+) commit 419386b6299a01bcea20c2244dbaca4585c2ae33 Author: Javier Martinez Canillas Date: Thu Jun 16 09:34:35 2022 +0200 regmap: Wire up regmap_config provided bulk write in missed functions There are some functions that were missed by commit d77e74561368 ("regmap: Add bulk read/write callbacks into regmap_config") when support to define bulk read/write callbacks in regmap_config was introduced. The regmap_bulk_write() and regmap_noinc_write() functions weren't changed to use the added map->write instead of the map->bus->write handler. Also, the regmap_can_raw_write() was not modified to take map->write into account. So will only return true if a bus with a .write callback is set. Fixes: d77e74561368 ("regmap: Add bulk read/write callbacks into regmap_config") Signed-off-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20220616073435.1988219-4-javierm@redhat.com Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 147b5fffc2cfa00956552f32e64c060d10d84010 Author: Javier Martinez Canillas Date: Thu Jun 16 09:34:34 2022 +0200 regmap: Make regmap_noinc_read() return -ENOTSUPP if map->read isn't set Before adding support to define bulk read/write callbacks in regmap_config by the commit d77e74561368 ("regmap: Add bulk read/write callbacks into regmap_config"), the regmap_noinc_read() function returned an errno early a map->bus->read callback wasn't set. But that commit dropped the check and now a call to _regmap_raw_read() is attempted even when bulk read operations are not supported. That function checks for map->read anyways but there's no point to continue if the read can't succeed. Also is a fragile assumption to make so is better to make it fail earlier. Fixes: d77e74561368 ("regmap: Add bulk read/write callbacks into regmap_config") Signed-off-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20220616073435.1988219-3-javierm@redhat.com Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 3 +++ 1 file changed, 3 insertions(+) commit b688a7629c425d7916f9bde7fce8f7da2f852ceb Author: Javier Martinez Canillas Date: Thu Jun 16 09:34:33 2022 +0200 regmap: Re-introduce bulk read support check in regmap_bulk_read() Support for drivers to define bulk read/write callbacks in regmap_config was introduced by the commit d77e74561368 ("regmap: Add bulk read/write callbacks into regmap_config"), but this commit wrongly dropped a check in regmap_bulk_read() to determine whether bulk reads can be done or not. Before that commit, it was checked if map->bus was set. Now has to check if a map->read callback has been set. Fixes: d77e74561368 ("regmap: Add bulk read/write callbacks into regmap_config") Signed-off-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20220616073435.1988219-2-javierm@redhat.com Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9fcc60ddd29994a8b2a276ee9b454d7cd449194 Author: Yang Yingliang Date: Tue Jun 14 19:21:12 2022 +0800 drm/logicvc: add missing of_node_put() in logicvc_layers_init() The of_node_put() need be called in error path in logicvc_layers_init(). Fixes: efeeaefe9be5 ("drm: Add support for the LogiCVC display controller") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Paul Kocialkowski Link: https://patchwork.freedesktop.org/patch/msgid/20220614112112.1537319-1-yangyingliang@huawei.com drivers/gpu/drm/logicvc/logicvc_layer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d3a453416270f5c7f1bf409597d702a2230e5a6c Author: Julia Lawall Date: Sun Jun 12 13:02:31 2022 +0200 drm: fix device_node_continue.cocci warnings drivers/gpu/drm/logicvc/logicvc_layer.c:616:2-13: ERROR: probable double put. Device node iterators put the previous value of the index variable, so an explicit put causes a double put. Generated by: scripts/coccinelle/iterators/device_node_continue.cocci Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Acked-by: Paul Kocialkowski Signed-off-by: Paul Kocialkowski Link: https://patchwork.freedesktop.org/patch/msgid/alpine.DEB.2.22.394.2206121300120.3447@hadrien drivers/gpu/drm/logicvc/logicvc_layer.c | 2 -- 1 file changed, 2 deletions(-) commit f9bbc1c8449a51a049a1d6d436eb973b00b6cd7a Author: Yang Li Date: Mon Jun 13 09:26:58 2022 +0800 drm: Remove unnecessary print function dev_err() The print function dev_err() is redundant because platform_get_irq() already prints an error. Eliminate the follow coccicheck warning: ./drivers/gpu/drm/logicvc/logicvc_drm.c:352:2-9: line 352 is redundant because platform_get_irq() already prints an error Reported-by: Abaci Robot Signed-off-by: Yang Li Acked-by: Paul Kocialkowski Signed-off-by: Paul Kocialkowski Link: https://patchwork.freedesktop.org/patch/msgid/20220613012658.85814-1-yang.lee@linux.alibaba.com drivers/gpu/drm/logicvc/logicvc_drm.c | 1 - 1 file changed, 1 deletion(-) commit d54cda74a9a27d6a18c6b670f7299114272a5e50 Author: Dan Carpenter Date: Tue Jun 14 15:08:53 2022 +0300 drm: logicvc: fix error code in logicvc_layer_init() Return -EINVAL if logicvc_layer_formats_lookup() fails. Don't return success. Fixes: efeeaefe9be5 ("drm: Add support for the LogiCVC display controller") Signed-off-by: Dan Carpenter Acked-by: Paul Kocialkowski Signed-off-by: Paul Kocialkowski Link: https://patchwork.freedesktop.org/patch/msgid/Yqh6VdNiDvJYMOQ+@kili drivers/gpu/drm/logicvc/logicvc_layer.c | 1 + 1 file changed, 1 insertion(+) commit 5e8034364c22050b8564060e79947d094a65d45e Author: Dan Carpenter Date: Tue Jun 14 15:08:25 2022 +0300 drm: logicvc: Fix uninitialized variable in probe The "regmap" is supposed to be initialized to NULL but it's used without being initialized. Fixes: efeeaefe9be5 ("drm: Add support for the LogiCVC display controller") Signed-off-by: Dan Carpenter Acked-by: Paul Kocialkowski Signed-off-by: Paul Kocialkowski Link: https://patchwork.freedesktop.org/patch/msgid/Yqh6OfSiPFuVrGo4@kili drivers/gpu/drm/logicvc/logicvc_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba1afa676d0babf99e99f5415db43fdd7ecef104 Author: Qu Wenruo Date: Fri Jun 24 17:31:47 2022 +0800 lib: bitmap: fix the duplicated comments on bitmap_to_arr64() Thanks to the recent commit 0a97953fd221 ("lib: add bitmap_{from,to}_arr64") now we can directly convert a U64 value into a bitmap and vice verse. However when checking the header there is duplicated helper for bitmap_to_arr64(), but no bitmap_from_arr64(). Just fix the copy-n-paste error. Signed-off-by: Qu Wenruo Signed-off-by: Yury Norov include/linux/bitmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41188e9e9defa1678abbf860ad7f6dd1ba48ad1c Author: Eduard Zingerman Date: Fri Jun 24 05:06:13 2022 +0300 selftest/bpf: Test for use-after-free bug fix in inline_bpf_loop This test verifies that bpf_loop() inlining works as expected when address of `env->prog` is updated. This address is updated upon BPF program reallocation. Reallocation is handled by bpf_prog_realloc(), which reuses old memory if page boundary is not crossed. The value of `len` in the test is chosen to cross this boundary on bpf_loop() patching. Verify that the use-after-free bug in inline_bpf_loop() reported by Dan Carpenter is fixed. Signed-off-by: Eduard Zingerman Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220624020613.548108-3-eddyz87@gmail.com tools/testing/selftests/bpf/test_verifier.c | 39 ++++++++++++++++++++++ .../selftests/bpf/verifier/bpf_loop_inline.c | 11 ++++++ 2 files changed, 50 insertions(+) commit fb4e3b33e3e7f13befdf9ee232e34818c6cc5fb9 Author: Eduard Zingerman Date: Fri Jun 24 05:06:12 2022 +0300 bpf: Fix for use-after-free bug in inline_bpf_loop As reported by Dan Carpenter, the following statements in inline_bpf_loop() might cause a use-after-free bug: struct bpf_prog *new_prog; // ... new_prog = bpf_patch_insn_data(env, position, insn_buf, *cnt); // ... env->prog->insnsi[call_insn_offset].imm = callback_offset; The bpf_patch_insn_data() might free the memory used by env->prog. Fixes: 1ade23711971 ("bpf: Inline calls to bpf_loop when callback is known") Reported-by: Dan Carpenter Signed-off-by: Eduard Zingerman Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220624020613.548108-2-eddyz87@gmail.com kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 395e942d34a25824457da379baf434b5d6da4dcc Author: Simon Wang Date: Tue Jun 21 23:19:23 2022 -0400 bpf: Replace hard-coded 0 with BPF_K in check_alu_op Enhance readability a bit. Signed-off-by: Simon Wang Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20220622031923.65692-1-wangchuanguo@inspur.com kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 658e95953075ca781ef8712d0a3203e485888c7f Author: Cristian Ciocaltea Date: Wed Jun 22 00:38:19 2022 +0300 ASoC: cs35l41: Add support for CLSA3541 ACPI device ID Add support for the CLSA3541 ACPI device ID used on Valve's Steam Deck. The driver is fully compatible with the indicated hardware, hence no additional changes are required. Signed-off-by: Cristian Ciocaltea Acked-by: David Rhodes Link: https://lore.kernel.org/r/20220621213819.262537-1-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown sound/soc/codecs/cs35l41-spi.c | 1 + 1 file changed, 1 insertion(+) commit 7f6409fd9b54b6f56444edc996cd28059f215415 Author: Jiapeng Chong Date: Fri Jun 24 16:27:45 2022 +0800 ASoC: rockchip: i2s: Fix missing error code in rockchip_i2s_probe() The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'ret'. This was found by coccicheck: sound/soc/rockchip/rockchip_i2s.c:810 rockchip_i2s_probe() warn: missing error code 'ret'. Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20220624082745.68367-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 1 + 1 file changed, 1 insertion(+) commit f5ebeb138fa6eb62d90264f9619019aa8c926a22 Author: Tanmay Jagdale Date: Tue Jun 14 17:13:56 2022 +0000 perf/marvell_cn10k: Fix TAD PMU register offset The existing offset of TAD_PRF and TAD_PFC registers are incorrect. Hence, fix with the right register offsets. Also, drop read of TAD_PRF register in tad_pmu_event_counter_start() since we don't have to preserve any bit fields and always write an updated value. Signed-off-by: Tanmay Jagdale Link: https://lore.kernel.org/r/20220614171356.773967-1-tanmay@marvell.com Signed-off-by: Will Deacon drivers/perf/marvell_cn10k_tad_pmu.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 8e28e53f13562e3fba4c64d01dfb66a9c34167da Author: Christophe JAILLET Date: Sat Jun 11 10:37:40 2022 +0200 perf/marvell_cn10k: Remove useless license text when SPDX-License-Identifier is already used An SPDX-License-Identifier is already in place. There is no need to duplicate part of the corresponding license. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/4a8016a6da9cc6815cfa0f97ae8d3dd862797bda.1654936653.git.christophe.jaillet@wanadoo.fr Signed-off-by: Will Deacon drivers/perf/marvell_cn10k_tad_pmu.c | 4 ---- 1 file changed, 4 deletions(-) commit 1c9a8e87680870d5daf1eaa6314373dcc156ac15 Author: Ard Biesheuvel Date: Wed Jun 22 18:10:10 2022 +0200 arm64: entry: simplify trampoline data page Get rid of some clunky open coded arithmetic on section addresses, by emitting the trampoline data variables into a separate, dedicated r/o data section, and putting it at the next page boundary. This way, we can access the literals via single LDR instruction. While at it, get rid of other, implicit literals, and use ADRP/ADD or MOVZ/MOVK sequences, as appropriate. Note that the latter are only supported for CONFIG_RELOCATABLE=n (which is usually the case if CONFIG_RANDOMIZE_BASE=n), so update the CPP conditionals to reflect this. Acked-by: Mark Rutland Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220622161010.3845775-1-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/fixmap.h | 4 +++- arch/arm64/kernel/entry.S | 53 +++++++++++++++++------------------------ arch/arm64/kernel/vmlinux.lds.S | 3 ++- arch/arm64/mm/mmu.c | 10 +++----- 4 files changed, 30 insertions(+), 40 deletions(-) commit 508aeb54e4f0225f4ff3da9b7ec8ac44ce30aad8 Author: Yang Li Date: Thu Jun 23 09:08:08 2022 +0800 usb: gadget: u_ether: Remove duplicated include in u_ether.c Fix following includecheck warning: ./drivers/usb/gadget/function/u_ether.c: linux/etherdevice.h is included more than once. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20220623010808.9816-1-yang.lee@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/u_ether.c | 1 - 1 file changed, 1 deletion(-) commit d46b4343e13246ab1d2b057b972657886e2a5f14 Author: Jiang Jian Date: Wed Jun 22 18:30:03 2022 +0800 usb: max-3421: drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: ./drivers/usb/host/max3421-hcd.c line: 315 * reasonable overview of how control transfers use the the IN/OUT changed to: * reasonable overview of how control transfers use the IN/OUT Signed-off-by: Jiang Jian Link: https://lore.kernel.org/r/20220622103003.5420-1-jiangjian@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/max3421-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2958d494b7577037a257461bae0bfe723f192910 Author: Jiang Jian Date: Wed Jun 22 18:35:58 2022 +0800 usb: dwc2: drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: ./drivers/usb/dwc2/hcd.c line: 1002 * even and the current frame number is even the the transfer changed to: * even and the current frame number is even the transfer Signed-off-by: Jiang Jian Link: https://lore.kernel.org/r/20220622103558.6647-1-jiangjian@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc2/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db638c6500abaffb8f7770b2a69c40d003d54ae1 Author: Amelie Delaunay Date: Wed Jun 22 18:07:17 2022 +0200 usb: dwc2: gadget: remove D+ pull-up while no vbus with usb-role-switch When using usb-role-switch, D+ pull-up is set as soon as DTCL_SFTDISCON is cleared, whatever the vbus valid signal state is. The pull-up should not be set when vbus isn't present (this is determined by the drd controller). This patch ensures that B-Session (so Peripheral role + vbus valid signal) is valid before clearing the DCTL_SFTDISCON bit when role switch is used. Keep original behavior when usb-role-switch isn't used. Acked-by: Minas Harutyunyan Signed-off-by: Amelie Delaunay Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20220622160717.314580-1-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc2/gadget.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 21cdd6a0e8441461e549f0c25af9696c6c4de22c Author: Dan Carpenter Date: Fri Jun 24 10:22:20 2022 +0300 usb: musb: mpfs: Fix error codes in probe() These error paths return success but they need to return a negative error code. Fixes: 7a96b6ea90a4 ("usb: musb: Add support for PolarFire SoC's musb controller") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YrVmLEc/FOEzNdzj@kili Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/mpfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cbdabaecb1f64ac0b2c033a7c9b7daa43c242c82 Merge: 23f94f1bc144 7dd196480664 Author: David S. Miller Date: Fri Jun 24 12:32:33 2022 +0100 Merge branch 'mlxsw-unified-bridge-conversion-part-3' Ido Schimmel says: ==================== mlxsw: Unified bridge conversion - part 3/6 This is the third part of the conversion of mlxsw to the unified bridge model. Like the second part, this patchset does not begin the conversion, but instead prepares the FID code for it. The individual changes are relatively small and self-contained with detailed description and motivation in the commit message. ==================== Signed-off-by: David S. Miller commit 7dd19648066418600da11896b744d0f39736829e Author: Amit Cohen Date: Thu Jun 23 10:17:37 2022 +0300 mlxsw: spectrum: Change mlxsw_sp_rif_vlan_fid_op() to be dedicated for FID RIFs The function was designed to configure both VLAN and FID RIFs, but currently the driver does not use VLAN RIFs. Instead, it emulates VLAN RIFs using FID RIFs. As part of the conversion to the unified bridge model, the driver will need to use VLAN RIFs, but they will be configured differently from FID RIFs. As a preparation for this change, rename the function to reflect the fact that it is specific to FID RIFs and do not pass the RIF type as an argument. This leaves mlxsw_reg_ritr_fid_set() unused, so remove it. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 10 ---------- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 18 ++++++++---------- 2 files changed, 8 insertions(+), 20 deletions(-) commit 027c92e00ef9cd7023bc0b75a3e0ceac6c12b71f Author: Amit Cohen Date: Thu Jun 23 10:17:36 2022 +0300 mlxsw: spectrum: Rename MLXSW_SP_RIF_TYPE_VLAN Currently, the driver emulates 802.1Q FIDs using 802.1D FIDs. As such, the RIFs configured on top of these FIDs are FID RIFs and not VLAN RIFs. As part of converting the driver to the unified bridge model, 802.1Q FIDs and VLAN RIFs will be used. As a preparation for this change, rename the emulated VLAN RIFs from 'MLXSW_SP_RIF_TYPE_VLAN' to 'MLXSW_SP_RIF_TYPE_VLAN_EMU'. After the conversion the emulated VLAN RIFs will be removed. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) commit 04e85970ceead5301337afd0d78012546494e0a1 Author: Amit Cohen Date: Thu Jun 23 10:17:35 2022 +0300 mlxsw: spectrum: Use different arrays of FID families per-ASIC type Egress VID for layer 2 multicast is determined from two tables, the MPE and PGT tables. The MPE table is a two dimensional table indexed by local port and SMPE index, which should be thought of as a FID index. In Spectrum-1 the SMPE index is derived from the PGT entry, whereas in Spectrum-2 and newer ASICs the SMPE index is a FID attribute configured via the SFMR register. The validity of the SMPE index in SFMR is influenced from two factors: 1. FID family. SMPE index is reserved for rFIDs, as their flooding is handled by firmware. 2. ASIC generation. SMPE index is always reserved for Spectrum-1. As such, the validity of the SMPE index should be an attribute of the FID family and have different arrays of FID families per-ASIC type. As a preparation for SMPE index configuration, create separate arrays of FID families for different ASICs. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 ++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 11 +++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) commit 2c091048015d00bc19756c6ec5f930f4b58c091b Author: Amit Cohen Date: Thu Jun 23 10:17:34 2022 +0300 mlxsw: spectrum_fid: Pass FID structure to __mlxsw_sp_fid_port_vid_map() The function configures {Port, VID}->FID classification entries using the SVFA register. In the unified bridge model such entries will need to be programmed with an ingress RIF parameter, which is a FID attribute. As a preparation for this change, pass the FID structure itself to the function. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 25 +++++++++------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 97a2ae0f0c2389fa7d998a67c255746d95350107 Author: Amit Cohen Date: Thu Jun 23 10:17:33 2022 +0300 mlxsw: spectrum_fid: Pass FID structure to mlxsw_sp_fid_op() The function gets several arguments derived from the FID structure itself. In the future, it will need to be extended to configure additional FID attributes. Prepare for that change and reduce the arguments list by passing the FID structure itself. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 23 ++++++++-------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit 893b5c307a48957def37a8fb970cacfaf92f13ee Author: Amit Cohen Date: Thu Jun 23 10:17:32 2022 +0300 mlxsw: spectrum_fid: Rename mlxsw_sp_fid_vni_op() After the previous patch, all the callers of the function pass arguments extracted from the FID structure itself. Reduce the arguments list by simply passing the FID structure itself. This makes the function more generic as it can be easily extended to edit any FID attributes. Rename it to mlxsw_sp_fid_edit_op() to reflect that. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 43 ++++++---------------- 1 file changed, 12 insertions(+), 31 deletions(-) commit d97da68e543ba576221cf0f57bc58d95080538e0 Author: Amit Cohen Date: Thu Jun 23 10:17:31 2022 +0300 mlxsw: spectrum_fid: Update FID structure prior to device configuration Currently, the only FID attributes that are edited after FID creation are its VNI and NVE tunnel flood pointer. This is achieved by eventually invoking mlxsw_sp_fid_vni_op() with an updated set of arguments. In the future, more FID attributes will need to be edited, such as the ingress RIF configured on top of the FID. Therefore, it makes sense to encapsulate all the FID edit logic in one function that will perform the edit based on an updated FID structure. To that end, update the FID structure before invoking the various edit operations that eventually call into mlxsw_sp_fid_vni_op(). Use the updated structure as the sole argument of the edit operations. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 48 +++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) commit fddf42c34349757c2717c57d776b9af2ff355d61 Author: Amit Cohen Date: Thu Jun 23 10:17:30 2022 +0300 mlxsw: spectrum_fid: Maintain {port, VID}->FID mappings In the unified bridge model, FID classification mappings (e.g., {Port, VID}->FID) and layer 3 egress VID classification mappings (i.e., {eRIF, ePort}->VID) will need to be updated when a RIF is configured on top of a FID. This requires the driver to be aware of all the {Port, VID} pairs mapped to a FID. To that end, extend the FID structure with a linked list of {Port, VID} pairs. Add an entry to the list when a {Port, VID} is mapped to a FID and remove it upon unmap. Keep the list sorted by local port as it will be useful for {eRIF, ePort}->VID mappings via REIV register in the future. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit a725a29d52ef8cbc4904449672d35964f1392217 Author: Chang Yu Date: Wed Jun 22 21:38:55 2022 -0700 staging: r8188eu: Make rtw_signal_stat_timer_hdl a static function Make rtw_signal_stat_timer_hdl a static function instead of a global function. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Chang Yu Link: https://lore.kernel.org/r/20220623043855.407208-1-marcus.yu.56@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 53c9fac844775880ba1253efc7fa810bf82b9cb2 Merge: 4d6c2b46d817 e7f688635451 Author: Mark Brown Date: Fri Jun 24 11:58:33 2022 +0100 ASoC: Intel: haswell and broadwell boards update Merge series from Cezary Rojewski : A number of patches improving overall quality and readability of haswell.c and broadwell.c source files found in sound/soc/intel/boards. Both files are first renamed and only then actual changes are being incrementally added. The respective names are: hsw_rt5640 and bdw_rt286 to match the pattern found in more recent boards. Most patches bring no functional change - the more impactful patches at are placed the end. The last patch is removing of FE DAI ops. Given the existence of platform FE DAI capabilities (either static declaration or through topology file), this code is redundant. commit 23f94f1bc144469efc45370a8be6a73965cf4b68 Merge: 7fcb820c7609 a96f7a6a60b3 Author: David S. Miller Date: Fri Jun 24 11:34:38 2022 +0100 Merge branch 'ipmr-remove-rwlocks' Eric Dumazet says: ==================== ipmr: get rid of rwlocks We need to get rid of rwlocks in networking stacks, if read_lock() is (ab)used from softirq context. As discussed recently [1], rwlock are unfair by design in this case, and writers can starve and trigger soft lockups. This series convert ipmr code (both IPv4 and IPv6 families) to RCU and spinlocks. [1] https://lkml.org/lkml/2022/6/17/272 v2: fixed two typos, and resent because patch 19/19 did not make it to patchwork. ==================== Signed-off-by: David S. Miller commit a96f7a6a60b310fdb7913d5ae70961eeeca9527d Author: Eric Dumazet Date: Thu Jun 23 04:34:49 2022 +0000 ip6mr: convert mrt_lock to a spinlock mrt_lock is only held in write mode, from process context only. We can switch to a mere spinlock, and avoid blocking BH. Also, vif_dev_read() is always called under standard rcu_read_lock(). Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6mr.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 3f55211ecf6a8fb271565adcb704cd57a8e4547c Author: Eric Dumazet Date: Thu Jun 23 04:34:48 2022 +0000 ipmr: convert mrt_lock to a spinlock mrt_lock is only held in write mode, from process context only. We can switch to a mere spinlock, and avoid blocking BH. Also, vif_dev_read() is always called under standard rcu_read_lock(). Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ipmr.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit b96ef16d2f837870daaea51c38cd50458b95ad5c Author: Eric Dumazet Date: Thu Jun 23 04:34:47 2022 +0000 ipmr: convert /proc handlers to rcu_read_lock() We can use standard rcu_read_lock(), to get rid of last read_lock(&mrt_lock) call points. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ipmr.c | 8 ++++---- net/ipv6/ip6mr.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit 194366b28b8306b7a24596c57c09635ab2891252 Author: Eric Dumazet Date: Thu Jun 23 04:34:46 2022 +0000 ipmr: adopt rcu_read_lock() in mr_dump() We no longer need to acquire mrt_lock() in mr_dump, using rcu_read_lock() is enough. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/mroute_base.h | 4 ++-- net/ipv4/ipmr.c | 2 +- net/ipv4/ipmr_base.c | 8 +++----- net/ipv6/ip6mr.c | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) commit 6fa40a29021976c91b6ad720285bdfd4410aaa34 Author: Eric Dumazet Date: Thu Jun 23 04:34:45 2022 +0000 ip6mr: switch ip6mr_get_route() to rcu_read_lock() Like ipmr_get_route(), we can use standard RCU here. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6mr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 9b1c21d898fdcab75c47c9827b6ded526eb33a18 Author: Eric Dumazet Date: Thu Jun 23 04:34:44 2022 +0000 ip6mr: do not acquire mrt_lock while calling ip6_mr_forward() ip6_mr_forward() uses standard RCU protection already. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6mr.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit db9eb7c8ae34c4acdb8a94c3566d1b4f4b5e7b1c Author: Eric Dumazet Date: Thu Jun 23 04:34:43 2022 +0000 ip6mr: do not acquire mrt_lock before calling ip6mr_cache_unresolved rcu_read_lock() protection is good enough. ip6mr_cache_unresolved() uses a dedicated spinlock (mfc_unres_lock) Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6mr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 638cf4a24a09d14c51415dd0964f978f97d54642 Author: Eric Dumazet Date: Thu Jun 23 04:34:42 2022 +0000 ip6mr: do not acquire mrt_lock in ioctl(SIOCGETMIFCNT_IN6) rcu_read_lock() protection is good enough. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6mr.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit 6d08658736fc8b4baae778a7f51d2c7baa47eeff Author: Eric Dumazet Date: Thu Jun 23 04:34:41 2022 +0000 ip6mr: do not acquire mrt_lock in pim6_rcv() rcu_read_lock() protection is more than enough. vif_dev_read() supports either mrt_lock or rcu_read_lock(). Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6mr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3493a5b730e5c0dfecb445e56a4ad36a36819ba9 Author: Eric Dumazet Date: Thu Jun 23 04:34:40 2022 +0000 ip6mr: ip6mr_cache_report() changes ip6mr_cache_report() first argument can be marked const, and we change the caller convention about which lock needs to be held. Instead of read_lock(&mrt_lock), we can use rcu_read_lock(). Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6mr.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) commit e4cd9868e8ec3691e6d94725c8b10edd1ec6eca2 Author: Eric Dumazet Date: Thu Jun 23 04:34:39 2022 +0000 ipmr: do not acquire mrt_lock in ipmr_get_route() mr_fill_mroute() uses standard rcu_read_unlock(), no need to grab mrt_lock anymore. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ipmr.c | 2 -- 1 file changed, 2 deletions(-) commit 4eadb88244d17056179a47f613e30c49191072c5 Author: Eric Dumazet Date: Thu Jun 23 04:34:38 2022 +0000 ipmr: do not acquire mrt_lock while calling ip_mr_forward() ip_mr_forward() uses standard RCU protection already. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ipmr.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 9094db4b8004fca4899852684df2a32dab15c851 Author: Eric Dumazet Date: Thu Jun 23 04:34:37 2022 +0000 ipmr: do not acquire mrt_lock before calling ipmr_cache_unresolved() rcu_read_lock() protection is good enough. ipmr_cache_unresolved() uses a dedicated spinlock (mfc_unres_lock) Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ipmr.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) commit 559260fd9d9a43afa4f8dd518969a1cc7dd40418 Author: Eric Dumazet Date: Thu Jun 23 04:34:36 2022 +0000 ipmr: do not acquire mrt_lock in ioctl(SIOCGETVIFCNT) rcu_read_lock() protection is good enough. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ipmr.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit 121fefc669bf6f603bbda380c91d788405bc4f1f Author: Eric Dumazet Date: Thu Jun 23 04:34:35 2022 +0000 ipmr: do not acquire mrt_lock in __pim_rcv() rcu_read_lock() protection is more than enough. vif_dev_read() supports either mrt_lock or rcu_read_lock(). Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ipmr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 646679881a02a15a0915f4cd18dff6cecb8960fc Author: Eric Dumazet Date: Thu Jun 23 04:34:34 2022 +0000 ipmr: ipmr_cache_report() changes ipmr_cache_report() first argument can be marked const, and we change the caller convention about which lock needs to be held. Instead of read_lock(&mrt_lock), we can use rcu_read_lock(). Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ipmr.c | 45 +++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-) commit 0b490b51d226b562a0aa6d287cfa25417f71fb79 Author: Eric Dumazet Date: Thu Jun 23 04:34:33 2022 +0000 ipmr: change igmpmsg_netlink_event() prototype igmpmsg_netlink_event() first argument can be marked const. igmpmsg_netlink_event() reads mrt->net and mrt->id, both being set once in mr_table_alloc(). Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ipmr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ebc3197963fc42841b183d0280bd3f9f85f13c30 Author: Eric Dumazet Date: Thu Jun 23 04:34:32 2022 +0000 ipmr: add rcu protection over (struct vif_device)->dev We will soon use RCU instead of rwlock in ipmr & ip6mr This preliminary patch adds proper rcu verbs to read/write (struct vif_device)->dev Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/mroute_base.h | 11 +++++--- net/ipv4/ipmr.c | 65 ++++++++++++++++++++++++++------------------- net/ipv4/ipmr_base.c | 49 +++++++++++++++++++++------------- net/ipv6/ip6mr.c | 63 ++++++++++++++++++++++++------------------- 4 files changed, 111 insertions(+), 77 deletions(-) commit 0a24c43f54b296629774b47a0763123f3c18db9b Author: Eric Dumazet Date: Thu Jun 23 04:34:31 2022 +0000 ip6mr: do not get a device reference in pim6_rcv() pim6_rcv() is called under rcu_read_lock(), there is no need to use dev_hold()/dev_put() pair. IPv4 side was handled in commit 55747a0a73ea ("ipmr: __pim_rcv() is called under rcu_read_lock") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6mr.c | 2 -- 1 file changed, 2 deletions(-) commit 7fcb820c7609f207cd2e5b49bff96a5b55167cf3 Merge: 5d99ec3aaa16 4658f2fe8fbc Author: David S. Miller Date: Fri Jun 24 11:31:44 2022 +0100 Merge branch 'dsa-microchip-common-spi-probe' Arun Ramadoss says: ==================== net: dsa: microchip: common spi probe for the ksz series switches - part 2 This patch series aims to refactor the ksz_switch_register routine to have the common flow for the ksz series switch. And this is the follow up patch series. First, it tries moves the common implementation in the setup from individual files to ksz_setup. Then implements the common dsa_switch_ops structure instead of independent registration. And then moves the ksz_dev_ops to ksz_common.c, it allows the dynamic detection of which ksz_dev_ops to be used based on the switch detection function. Finally, the patch updates the ksz_spi probe function to be same for all the ksz_switches. ==================== Signed-off-by: David S. Miller commit 4658f2fe8fbcb12c1db0577ad9c46b67f10d09f1 Author: Arun Ramadoss Date: Wed Jun 22 14:34:25 2022 +0530 net: dsa: microchip: common ksz_spi_probe for ksz switches As of now, there are two spi probes, one ksz8795_spi.c and other ksz9477_spi.c. This patch combines two files into single ksz_spi.c. The difference between the two are regmap config and struct ksz8. The regmap config is assigned based on the platform data. And struct ksz8 is left untouched, as it is used only ksz8795.c. It can be used for all other switches also in future. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/Kconfig | 16 +-- drivers/net/dsa/microchip/Makefile | 3 +- drivers/net/dsa/microchip/ksz9477_spi.c | 150 --------------------- .../net/dsa/microchip/{ksz8795_spi.c => ksz_spi.c} | 83 +++++++++--- 4 files changed, 69 insertions(+), 183 deletions(-) commit ff3f3a3090d23259fae62f81ebca3bcb7f992bb8 Author: Arun Ramadoss Date: Wed Jun 22 14:34:24 2022 +0530 net: dsa: microchip: remove the ksz8/ksz9477_switch_register This patch delete the ksz8_switch_register and ksz9477_switch_register since both are calling the ksz_switch_register function. Instead the ksz_switch_register is called from the probe function. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8795.c | 6 ------ drivers/net/dsa/microchip/ksz8795_spi.c | 2 +- drivers/net/dsa/microchip/ksz8863_smi.c | 2 +- drivers/net/dsa/microchip/ksz9477.c | 6 ------ drivers/net/dsa/microchip/ksz9477_i2c.c | 2 +- drivers/net/dsa/microchip/ksz9477_spi.c | 2 +- drivers/net/dsa/microchip/ksz_common.h | 3 --- 7 files changed, 4 insertions(+), 19 deletions(-) commit 6ec23aaaac43c9ab2e5f9dbfeedd5290d1803892 Author: Arun Ramadoss Date: Wed Jun 22 14:34:23 2022 +0530 net: dsa: microchip: move ksz_dev_ops to ksz_common.c This patch move the ksz_dev_ops from individual files to ksz_common.c. And the dev_ops is assigned to ksz_device based on the switch detect. This reduces the redundant function and allows to reuse the functionality for LAN937x which has similar register set. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8.h | 48 ++++++++++++ drivers/net/dsa/microchip/ksz8795.c | 119 +++++++++++------------------- drivers/net/dsa/microchip/ksz9477.c | 129 ++++++++++++--------------------- drivers/net/dsa/microchip/ksz9477.h | 60 +++++++++++++++ drivers/net/dsa/microchip/ksz_common.c | 75 ++++++++++++++++++- drivers/net/dsa/microchip/ksz_common.h | 4 +- 6 files changed, 271 insertions(+), 164 deletions(-) commit 07bca160469b4d19ca0a35bc83b26ed18fcbd96d Author: Arun Ramadoss Date: Wed Jun 22 14:34:22 2022 +0530 net: dsa: microchip: common menuconfig for ksz series switch This patch replaces the two different menuconfig for ksz9477 and ksz8795 to single ksz_common. so that it can be extended for the other switch like lan937x. And removes the export_symbols for the extern functions in the ksz_common.h. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/Kconfig | 28 +++++++++------------------- drivers/net/dsa/microchip/Makefile | 7 ++++--- drivers/net/dsa/microchip/ksz_common.c | 3 --- 3 files changed, 13 insertions(+), 25 deletions(-) commit 7a8988a17c48bcca361ebd04440c2e898f9cdb9d Author: Arun Ramadoss Date: Wed Jun 22 14:34:21 2022 +0530 net: dsa: microchip: ksz9477: separate phylink mode from switch register As per 'commit 3506b2f42dff ("net: dsa: microchip: call phy_remove_link_mode during probe")' phy_remove_link_mode is added in the switch_register function after dsa_switch_register. In order to have the common switch register function, moving this phylink validation to phylink_get_caps validation hook. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477.c | 31 ++++++------------------------- drivers/net/dsa/microchip/ksz_common.c | 2 +- 2 files changed, 7 insertions(+), 26 deletions(-) commit 1958eee85f6724c2398af3de93c72c78f756165c Author: Arun Ramadoss Date: Wed Jun 22 14:34:20 2022 +0530 net: dsa: microchip: common dsa_switch_ops for ksz switches At present, ksz8795.c and ksz9477.c have separate dsa_switch_ops structure initialization. This patch modifies the files such a way that ksz switches has common dsa_switch_ops in the ksz_common.c file. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8795.c | 28 ------ drivers/net/dsa/microchip/ksz9477.c | 33 +------ drivers/net/dsa/microchip/ksz_common.c | 164 +++++++++++++++++---------------- drivers/net/dsa/microchip/ksz_common.h | 54 +---------- 4 files changed, 89 insertions(+), 190 deletions(-) commit ad08ac189758c4e34cf10616fcfccb4069b271e2 Author: Arun Ramadoss Date: Wed Jun 22 14:34:19 2022 +0530 net: dsa: microchip: move start of switch to ksz_setup This patch move the setting the start bit from the individual switch configuration to ksz_setup Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8795_reg.h | 1 - drivers/net/dsa/microchip/ksz9477.c | 3 --- drivers/net/dsa/microchip/ksz9477_reg.h | 1 - drivers/net/dsa/microchip/ksz_common.c | 17 +++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 3 +++ 5 files changed, 20 insertions(+), 5 deletions(-) commit 0abab9f3ec6b4d8b820a2e22ffa83b88d7e6cccd Author: Arun Ramadoss Date: Wed Jun 22 14:34:18 2022 +0530 net: dsa: microchip: move multicast enable to ksz_setup This patch moves the enabling the multicast storm protection from individual setup function to ksz_setup function. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8795.c | 2 -- drivers/net/dsa/microchip/ksz8795_reg.h | 1 - drivers/net/dsa/microchip/ksz9477.c | 2 -- drivers/net/dsa/microchip/ksz9477_reg.h | 1 - drivers/net/dsa/microchip/ksz_common.c | 16 ++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 3 +++ 6 files changed, 19 insertions(+), 6 deletions(-) commit 1ca6437fafc9ffddda7a6fa9b61059bcf8774b10 Author: Arun Ramadoss Date: Wed Jun 22 14:34:17 2022 +0530 net: dsa: microchip: move broadcast rate limit to ksz_setup This patch move the 10% broadcast protection from the individual setup to ksz_setup. In the ksz9477, broadcast protection is updated in reset function. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8795.c | 6 ------ drivers/net/dsa/microchip/ksz8795_reg.h | 10 ---------- drivers/net/dsa/microchip/ksz9477.c | 6 ------ drivers/net/dsa/microchip/ksz9477_reg.h | 10 ---------- drivers/net/dsa/microchip/ksz_common.c | 19 +++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 11 +++++++++++ 6 files changed, 30 insertions(+), 32 deletions(-) commit d2822e68687926ec8b103f4f146bf47ce6f0362e Author: Arun Ramadoss Date: Wed Jun 22 14:34:16 2022 +0530 net: dsa: microchip: move setup function to ksz_common This patch move the common initialization of switches to ksz_setup and perform the switch specific initialization using the ksz_dev_ops function pointer. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8795.c | 24 +++--------------------- drivers/net/dsa/microchip/ksz9477.c | 22 ++-------------------- drivers/net/dsa/microchip/ksz_common.c | 34 ++++++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 2 ++ 4 files changed, 41 insertions(+), 41 deletions(-) commit 331d64f752bbdae4c846416d6f4406010a24f539 Author: Arun Ramadoss Date: Wed Jun 22 14:34:15 2022 +0530 net: dsa: microchip: add the enable_stp_addr pointer in ksz_dev_ops In order to transmit the STP BPDU packet to the CPU port, the STP address 01-80-c2-00-00-00 has to be added to static alu table for ksz8795 series switch. For the ksz9477 switch, there is reserved multicast table which handles forwarding the particular set of multicast address to cpu port. So enabling the multicast reserved table and updated the cpu port index. The stp addr is enabled during the setup phase using the enable_stp_addr pointer in struct ksz_dev_ops. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8795.c | 27 ++++++++++++++++++--------- drivers/net/dsa/microchip/ksz9477.c | 33 +++++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 1 + 3 files changed, 52 insertions(+), 9 deletions(-) commit fb9324beb5d4ce8e4f81718a3270ae0c4a354f56 Author: Arun Ramadoss Date: Wed Jun 22 14:34:14 2022 +0530 net: dsa: microchip: add config_cpu_port to struct ksz_dev_ops To have the common set of initialization in ksz_setup, introduced the new config_cpu_port member to ksz_dev_ops. Since both the ksz8795.c and ksz9477.c configuring the cpu port in the setup function, introduced the member. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8795.c | 3 ++- drivers/net/dsa/microchip/ksz9477.c | 3 ++- drivers/net/dsa/microchip/ksz_common.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) commit 673b196fdd3416719b6ec8130c8769aa38c0b38d Author: Arun Ramadoss Date: Wed Jun 22 14:34:13 2022 +0530 net: dsa: microchip: rename shutdown to reset in ksz_dev_ops This patch renames the shutdown to reset in ksz_dev_ops in order to use the reset dev_ops in the ksz_setup. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8795.c | 4 ++-- drivers/net/dsa/microchip/ksz8795_spi.c | 4 ++-- drivers/net/dsa/microchip/ksz9477.c | 4 ++-- drivers/net/dsa/microchip/ksz9477_i2c.c | 4 ++-- drivers/net/dsa/microchip/ksz_common.h | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) commit 5d99ec3aaa16a71220e17a7559ea7bd1ec2f1260 Merge: 7747de17f750 0a2ff7cc8ad4 Author: David S. Miller Date: Fri Jun 24 11:27:59 2022 +0100 Merge branch 'bonding-per-port-priorities' Hangbin Liu says: ==================== Bonding: add per-port priority support This patch set add per-port priority for bonding failover re-selection. The first patch add a new filed for bond_opt_value so we can set slave value easier. I will update the bond_option_queue_id_set() setting in later patch. The second patch add the per-port priority for bonding. I defined it as s32 to compatible with team prio option, which also use a s32 value. v3: store slave_dev in bond_opt_value directly to simplify setting values for slave. v2: using the extant bonding options management stuff instead setting slave prio in bond_slave_changelink() directly. ==================== Signed-off-by: David S. Miller commit 0a2ff7cc8ad48a86939a91bd3457f38e59e741a1 Author: Hangbin Liu Date: Tue Jun 21 15:49:19 2022 +0800 Bonding: add per-port priority for failover re-selection Add per port priority support for bonding active slave re-selection during failover. A higher number means higher priority in selection. The primary slave still has the highest priority. This option also follows the primary_reselect rules. This option could only be configured via netlink. Signed-off-by: Hangbin Liu Acked-by: Jonathan Toppins Signed-off-by: David S. Miller Documentation/networking/bonding.rst | 11 +++++++++++ drivers/net/bonding/bond_main.c | 27 +++++++++++++++++++++++++++ drivers/net/bonding/bond_netlink.c | 15 +++++++++++++++ drivers/net/bonding/bond_options.c | 33 +++++++++++++++++++++++++++++++++ include/net/bond_options.h | 1 + include/net/bonding.h | 1 + include/uapi/linux/if_link.h | 1 + tools/include/uapi/linux/if_link.h | 1 + 8 files changed, 90 insertions(+) commit f2b3b28ce5237a4995a17d6f6aac9e05243d7a0b Author: Hangbin Liu Date: Tue Jun 21 15:49:18 2022 +0800 bonding: add slave_dev field for bond_opt_value Currently, bond_opt_value are mostly used for bonding option settings. If we want to set a value for slave, we need to re-alloc a string to store both slave name and vlaue, like bond_option_queue_id_set() does, which is complex and dumb. As Jon suggested, let's add a union field slave_dev for bond_opt_value, which will be benefit for future slave option setting. In function __bond_opt_init(), we will always check the extra field and set it if it's not NULL. Suggested-by: Jonathan Toppins Signed-off-by: Hangbin Liu Acked-by: Jonathan Toppins Signed-off-by: David S. Miller include/net/bond_options.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 9c846c5d2d4e63d75b2cb172625087cadadbe065 Author: Yoan Picchi Date: Fri Jun 17 09:59:45 2022 +0000 crypto: qat - Removes the x86 dependency on the QAT drivers This dependency looks outdated. After the previous patch, we have been able to use this driver to encrypt some data and to create working VF on arm64. We have not tested it yet on any big endian machine, hence the new dependency Signed-off-by: Yoan Picchi Signed-off-by: Herbert Xu drivers/crypto/qat/Kconfig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit c2a1b91e47984e477298912ffd55570095d67318 Author: Andre Przywara Date: Fri Jun 17 09:59:44 2022 +0000 crypto: qat - replace get_current_node() with numa_node_id() Currently the QAT driver code uses a self-defined wrapper function called get_current_node() when it wants to learn the current NUMA node. This implementation references the topology_physical_package_id[] array, which more or less coincidentally contains the NUMA node id, at least on x86. Because this is not universal, and Linux offers a direct function to learn the NUMA node ID, replace that function with a call to numa_node_id(), which would work everywhere. This fixes the QAT driver operation on arm64 machines. Reported-by: Yoan Picchi Signed-off-by: Andre Przywara Signed-off-by: Yoan Picchi Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/adf_common_drv.h | 5 ----- drivers/crypto/qat/qat_common/qat_algs.c | 4 ++-- drivers/crypto/qat/qat_common/qat_asym_algs.c | 4 ++-- 3 files changed, 4 insertions(+), 9 deletions(-) commit f145d411a67efacc0731fc3f9c7b2d89fb62523a Author: Ignat Korchagin Date: Fri Jun 17 09:42:10 2022 +0100 crypto: rsa - implement Chinese Remainder Theorem for faster private key operations Changes from v1: * exported mpi_sub and mpi_mul, otherwise the build fails when RSA is a module The kernel RSA ASN.1 private key parser already supports only private keys with additional values to be used with the Chinese Remainder Theorem [1], but these values are currently not used. This rudimentary CRT implementation speeds up RSA private key operations for the following Go benchmark up to ~3x. This implementation also tries to minimise the allocation of additional MPIs, so existing MPIs are reused as much as possible (hence the variable names are a bit weird). The benchmark used: ``` package keyring_test import ( "crypto" "crypto/rand" "crypto/rsa" "crypto/x509" "io" "syscall" "testing" "unsafe" ) type KeySerial int32 type Keyring int32 const ( KEY_SPEC_PROCESS_KEYRING Keyring = -2 KEYCTL_PKEY_SIGN = 27 ) var ( keyTypeAsym = []byte("asymmetric\x00") sha256pkcs1 = []byte("enc=pkcs1 hash=sha256\x00") ) func (keyring Keyring) LoadAsym(desc string, payload []byte) (KeySerial, error) { cdesc := []byte(desc + "\x00") serial, _, errno := syscall.Syscall6(syscall.SYS_ADD_KEY, uintptr(unsafe.Pointer(&keyTypeAsym[0])), uintptr(unsafe.Pointer(&cdesc[0])), uintptr(unsafe.Pointer(&payload[0])), uintptr(len(payload)), uintptr(keyring), uintptr(0)) if errno == 0 { return KeySerial(serial), nil } return KeySerial(serial), errno } type pkeyParams struct { key_id KeySerial in_len uint32 out_or_in2_len uint32 __spare [7]uint32 } // the output signature buffer is an input parameter here, because we want to // avoid Go buffer allocation leaking into our benchmarks func (key KeySerial) Sign(info, digest, out []byte) error { var params pkeyParams params.key_id = key params.in_len = uint32(len(digest)) params.out_or_in2_len = uint32(len(out)) _, _, errno := syscall.Syscall6(syscall.SYS_KEYCTL, KEYCTL_PKEY_SIGN, uintptr(unsafe.Pointer(¶ms)), uintptr(unsafe.Pointer(&info[0])), uintptr(unsafe.Pointer(&digest[0])), uintptr(unsafe.Pointer(&out[0])), uintptr(0)) if errno == 0 { return nil } return errno } func BenchmarkSign(b *testing.B) { priv, err := rsa.GenerateKey(rand.Reader, 2048) if err != nil { b.Fatalf("failed to generate private key: %v", err) } pkcs8, err := x509.MarshalPKCS8PrivateKey(priv) if err != nil { b.Fatalf("failed to serialize the private key to PKCS8 blob: %v", err) } serial, err := KEY_SPEC_PROCESS_KEYRING.LoadAsym("test rsa key", pkcs8) if err != nil { b.Fatalf("failed to load the private key into the keyring: %v", err) } b.Logf("loaded test rsa key: %v", serial) digest := make([]byte, 32) _, err = io.ReadFull(rand.Reader, digest) if err != nil { b.Fatalf("failed to generate a random digest: %v", err) } sig := make([]byte, 256) for n := 0; n < b.N; n++ { err = serial.Sign(sha256pkcs1, digest, sig) if err != nil { b.Fatalf("failed to sign the digest: %v", err) } } err = rsa.VerifyPKCS1v15(&priv.PublicKey, crypto.SHA256, digest, sig) if err != nil { b.Fatalf("failed to verify the signature: %v", err) } } ``` [1]: https://en.wikipedia.org/wiki/RSA_(cryptosystem)#Using_the_Chinese_remainder_algorithm Signed-off-by: Ignat Korchagin Reported-by: kernel test robot Signed-off-by: Herbert Xu crypto/rsa.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++---- lib/mpi/mpi-add.c | 2 +- lib/mpi/mpi-mul.c | 1 + 3 files changed, 75 insertions(+), 6 deletions(-) commit 1b05ece0c931536c0a38a9385e243a7962e933f6 Author: Tom Lendacky Date: Thu Jun 16 10:26:18 2022 -0500 crypto: ccp - During shutdown, check SEV data pointer before using On shutdown, each CCP device instance performs shutdown processing. However, __sev_platform_shutdown_locked() uses the controlling psp structure to obtain the pointer to the sev_device structure. However, during driver initialization, it is possible that an error can be received from the firmware that results in the sev_data pointer being cleared from the controlling psp structure. The __sev_platform_shutdown_locked() function does not check for this situation and will segfault. While not common, this scenario should be accounted for. Add a check for a NULL sev_device structure before attempting to use it. Fixes: 5441a07a127f ("crypto: ccp - shutdown SEV firmware on kexec") Signed-off-by: Tom Lendacky Signed-off-by: Herbert Xu drivers/crypto/ccp/sev-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b88b1a518b337de1252b8180519ca4c00015c9e Author: Zeng Guang Date: Thu Jun 23 17:45:11 2022 +0800 KVM: selftests: Enhance handling WRMSR ICR register in x2APIC mode Hardware would directly write x2APIC ICR register instead of software emulation in some circumstances, e.g when Intel IPI virtualization is enabled. This behavior requires normal reserved bits checking to ensure them input as zero, otherwise it will cause #GP. So we need mask out those reserved bits from the data written to vICR register. Remove Delivery Status bit emulation in test case as this flag is invalid and not needed in x2APIC mode. KVM may ignore clearing it during interrupt dispatch which will lead to fake test failure. Opportunistically correct vector number for test sending IPI to non-existent vCPUs. Signed-off-by: Zeng Guang Message-Id: <20220623094511.26066-1-guang.zeng@intel.com> Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/x86_64/xapic_state_test.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit eede2065cacce2e04110bc6e45e9dc8e843c571b Author: Jue Wang Date: Fri Jun 10 10:11:34 2022 -0700 KVM: selftests: Add a self test for CMCI and UCNA emulations. This patch add a self test that verifies user space can inject UnCorrectable No Action required (UCNA) memory errors to the guest. It also verifies that incorrectly configured MSRs for Corrected Machine Check Interrupt (CMCI) emulation will result in #GP. Signed-off-by: Jue Wang Signed-off-by: Paolo Bonzini Message-Id: <20220610171134.772566-9-juew@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/.gitignore | 1 + tools/testing/selftests/kvm/Makefile | 1 + tools/testing/selftests/kvm/include/x86_64/apic.h | 1 + tools/testing/selftests/kvm/include/x86_64/mce.h | 25 ++ .../selftests/kvm/x86_64/ucna_injection_test.c | 316 +++++++++++++++++++++ 5 files changed, 344 insertions(+) commit aebc3ca19063d68b76bcaaca81558d4f180c61b0 Author: Jue Wang Date: Fri Jun 10 10:11:33 2022 -0700 KVM: x86: Enable CMCI capability by default and handle injected UCNA errors This patch enables MCG_CMCI_P by default in kvm_mce_cap_supported. It reuses ioctl KVM_X86_SET_MCE to implement injection of UnCorrectable No Action required (UCNA) errors, signaled via Corrected Machine Check Interrupt (CMCI). Neither of the CMCI and UCNA emulations depends on hardware. Signed-off-by: Jue Wang Signed-off-by: Paolo Bonzini Message-Id: <20220610171134.772566-8-juew@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 1 + arch/x86/kvm/x86.c | 43 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) commit 281b52780b57821abc434c0413107d3075881a1f Author: Jue Wang Date: Fri Jun 10 10:11:32 2022 -0700 KVM: x86: Add emulation for MSR_IA32_MCx_CTL2 MSRs. This patch adds the emulation of IA32_MCi_CTL2 registers to KVM. A separate mci_ctl2_banks array is used to keep the existing mce_banks register layout intact. In Machine Check Architecture, in addition to MCG_CMCI_P, bit 30 of the per-bank register IA32_MCi_CTL2 controls whether Corrected Machine Check error reporting is enabled. Signed-off-by: Jue Wang Signed-off-by: Paolo Bonzini Message-Id: <20220610171134.772566-7-juew@google.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/x86.c | 130 ++++++++++++++++++++++++++++------------ 2 files changed, 92 insertions(+), 39 deletions(-) commit 087acc4e1847993a66f43128e40be0ab2244c98f Author: Jue Wang Date: Fri Jun 10 10:11:31 2022 -0700 KVM: x86: Use kcalloc to allocate the mce_banks array. This patch updates the allocation of mce_banks with the array allocation API (kcalloc) as a precedent for the later mci_ctl2_banks to implement per-bank control of Corrected Machine Check Interrupt (CMCI). Suggested-by: Sean Christopherson Signed-off-by: Jue Wang Signed-off-by: Paolo Bonzini Message-Id: <20220610171134.772566-6-juew@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b903561ec499eef233bf690076cd71b1f8604cf Author: Jue Wang Date: Fri Jun 10 10:11:30 2022 -0700 KVM: x86: Add Corrected Machine Check Interrupt (CMCI) emulation to lapic. This patch calculates the number of lvt entries as part of KVM_X86_MCE_SETUP conditioned on the presence of MCG_CMCI_P bit in MCG_CAP and stores result in kvm_lapic. It translats from APIC_LVTx register to index in lapic_lvt_entry enum. It extends the APIC_LVTx macro as well as other lapic write/reset handling etc to support Corrected Machine Check Interrupt. Signed-off-by: Jue Wang Signed-off-by: Paolo Bonzini Message-Id: <20220610171134.772566-5-juew@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 49 ++++++++++++++++++++++++++++++++++--------------- arch/x86/kvm/lapic.h | 4 +++- arch/x86/kvm/x86.c | 2 ++ 3 files changed, 39 insertions(+), 16 deletions(-) commit 987f625e0799c9666ce0a0e18c2d0c001db96fad Author: Jue Wang Date: Fri Jun 10 10:11:29 2022 -0700 KVM: x86: Add APIC_LVTx() macro. An APIC_LVTx macro is introduced to calcualte the APIC_LVTx register offset based on the index in the lapic_lvt_entry enum. Later patches will extend the APIC_LVTx macro to support the APIC_LVTCMCI register in order to implement Corrected Machine Check Interrupt signaling. Suggested-by: Sean Christopherson Signed-off-by: Jue Wang Signed-off-by: Paolo Bonzini Message-Id: <20220610171134.772566-4-juew@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 7 +++---- arch/x86/kvm/lapic.h | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) commit 0378739401cfc2fd2a50a2a337a4f394e8493008 Author: Paolo Bonzini Date: Wed Jun 22 15:27:10 2022 -0400 KVM: x86/mmu: Avoid unnecessary flush on eager page split The TLB flush before installing the newly-populated lower level page table is unnecessary if the lower-level page table maps the huge page identically. KVM knows it is if it did not reuse an existing shadow page table, tell drop_large_spte() to skip the flush in that case. Extracted from a patch by David Matlack. Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit 1d8c681fb6ed459128ab9d5e36adb7ec06a26aea Author: Jue Wang Date: Fri Jun 10 10:11:28 2022 -0700 KVM: x86: Fill apic_lvt_mask with enums / explicit entries. This patch defines a lapic_lvt_entry enum used as explicit indices to the apic_lvt_mask array. In later patches a LVT_CMCI will be added to implement the Corrected Machine Check Interrupt signaling. Suggested-by: Sean Christopherson Signed-off-by: Jue Wang Signed-off-by: Paolo Bonzini Message-Id: <20220610171134.772566-3-juew@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 19 ++++++++++--------- arch/x86/kvm/lapic.h | 12 +++++++++++- 2 files changed, 21 insertions(+), 10 deletions(-) commit 951ceb94ede39acbebf34481ec87fe2c46b91e0f Author: Jue Wang Date: Fri Jun 10 10:11:27 2022 -0700 KVM: x86: Make APIC_VERSION capture only the magic 0x14UL. Refactor APIC_VERSION so that the maximum number of LVT entries is inserted at runtime rather than compile time. This will be used in a subsequent commit to expose the LVT CMCI Register to VMs that support Corrected Machine Check error counting/signaling (IA32_MCG_CAP.MCG_CMCI_P=1). Suggested-by: Sean Christopherson Signed-off-by: Jue Wang Signed-off-by: Paolo Bonzini Message-Id: <20220610171134.772566-2-juew@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ada51a9de7375ef8933fcaa1af9cb61a7fe0ceef Author: David Matlack Date: Wed Jun 22 15:27:09 2022 -0400 KVM: x86/mmu: Extend Eager Page Splitting to nested MMUs Add support for Eager Page Splitting pages that are mapped by nested MMUs. Walk through the rmap first splitting all 1GiB pages to 2MiB pages, and then splitting all 2MiB pages to 4KiB pages. Note, Eager Page Splitting is limited to nested MMUs as a policy rather than due to any technical reason (the sp->role.guest_mode check could just be deleted and Eager Page Splitting would work correctly for all shadow MMU pages). There is really no reason to support Eager Page Splitting for tdp_mmu=N, since such support will eventually be phased out, and there is no current use case supporting Eager Page Splitting on hosts where TDP is either disabled or unavailable in hardware. Furthermore, future improvements to nested MMU scalability may diverge the code from the legacy shadow paging implementation. These improvements will be simpler to make if Eager Page Splitting does not have to worry about legacy shadow paging. Splitting huge pages mapped by nested MMUs requires dealing with some extra complexity beyond that of the TDP MMU: (1) The shadow MMU has a limit on the number of shadow pages that are allowed to be allocated. So, as a policy, Eager Page Splitting refuses to split if there are KVM_MIN_FREE_MMU_PAGES or fewer pages available. (2) Splitting a huge page may end up re-using an existing lower level shadow page tables. This is unlike the TDP MMU which always allocates new shadow page tables when splitting. (3) When installing the lower level SPTEs, they must be added to the rmap which may require allocating additional pte_list_desc structs. Case (2) is especially interesting since it may require a TLB flush, unlike the TDP MMU which can fully split huge pages without any TLB flushes. Specifically, an existing lower level page table may point to even lower level page tables that are not fully populated, effectively unmapping a portion of the huge page, which requires a flush. As of this commit, a flush is always done always after dropping the huge page and before installing the lower level page table. This TLB flush could instead be delayed until the MMU lock is about to be dropped, which would batch flushes for multiple splits. However these flushes should be rare in practice (a huge page must be aliased in multiple SPTEs and have been split for NX Huge Pages in only some of them). Flushing immediately is simpler to plumb and also reduces the chances of tripping over a CPU bug (e.g. see iTLB multihit). [ This commit is based off of the original implementation of Eager Page Splitting from Peter in Google's kernel from 2016. ] Suggested-by: Peter Feiner Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-23-dmatlack@google.com> Signed-off-by: Paolo Bonzini Documentation/admin-guide/kernel-parameters.txt | 3 +- arch/x86/include/asm/kvm_host.h | 22 ++ arch/x86/kvm/mmu/mmu.c | 259 +++++++++++++++++++++++- 3 files changed, 275 insertions(+), 9 deletions(-) commit 837f66c71207542283831d0762c5dca3db5b397a Author: David Matlack Date: Wed Jun 22 15:27:08 2022 -0400 KVM: Allow for different capacities in kvm_mmu_memory_cache structs Allow the capacity of the kvm_mmu_memory_cache struct to be chosen at declaration time rather than being fixed for all declarations. This will be used in a follow-up commit to declare an cache in x86 with a capacity of 512+ objects without having to increase the capacity of all caches in KVM. This change requires each cache now specify its capacity at runtime, since the cache struct itself no longer has a fixed capacity known at compile time. To protect against someone accidentally defining a kvm_mmu_memory_cache struct directly (without the extra storage), this commit includes a WARN_ON() in kvm_mmu_topup_memory_cache(). In order to support different capacities, this commit changes the objects pointer array to be dynamically allocated the first time the cache is topped-up. While here, opportunistically clean up the stack-allocated kvm_mmu_memory_cache structs in riscv and arm64 to use designated initializers. No functional change intended. Reviewed-by: Marc Zyngier Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-22-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/arm64/kvm/mmu.c | 2 +- arch/riscv/kvm/mmu.c | 5 +---- include/linux/kvm_host.h | 1 + include/linux/kvm_types.h | 6 +++++- virt/kvm/kvm_main.c | 33 ++++++++++++++++++++++++++++++--- 5 files changed, 38 insertions(+), 9 deletions(-) commit 0cd8dc739833080aa0813cbd94d907a93e3a14c3 Author: Paolo Bonzini Date: Wed Jun 22 15:27:07 2022 -0400 KVM: x86/mmu: pull call to drop_large_spte() into __link_shadow_page() Before allocating a child shadow page table, all callers check whether the parent already points to a huge page and, if so, they drop that SPTE. This is done by drop_large_spte(). However, dropping the large SPTE is really only necessary before the sp is installed. While the sp is returned by kvm_mmu_get_child_sp(), installing it happens later in __link_shadow_page(). Move the call there instead of having it in each and every caller. To ensure that the shadow page is not linked twice if it was present, do _not_ opportunistically make kvm_mmu_get_child_sp() idempotent: instead, return an error value if the shadow page already existed. This is a bit more verbose, but clearer than NULL. Finally, now that the drop_large_spte() name is not taken anymore, remove the two underscores in front of __drop_large_spte(). Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 43 +++++++++++++++++++++--------------------- arch/x86/kvm/mmu/paging_tmpl.h | 31 ++++++++++++++---------------- 2 files changed, 35 insertions(+), 39 deletions(-) commit 20d49186c0302015c229e23c7e63855cbacc8032 Author: David Matlack Date: Wed Jun 22 15:27:06 2022 -0400 KVM: x86/mmu: Zap collapsible SPTEs in shadow MMU at all possible levels Currently KVM only zaps collapsible 4KiB SPTEs in the shadow MMU. This is fine for now since KVM never creates intermediate huge pages during dirty logging. In other words, KVM always replaces 1GiB pages directly with 4KiB pages, so there is no reason to look for collapsible 2MiB pages. However, this will stop being true once the shadow MMU participates in eager page splitting. During eager page splitting, each 1GiB is first split into 2MiB pages and then those are split into 4KiB pages. The intermediate 2MiB pages may be left behind if an error condition causes eager page splitting to bail early. No functional change intended. Reviewed-by: Peter Xu Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-20-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 47855da0555a46eb4f98f5e5cae98525daf83ff9 Author: David Matlack Date: Wed Jun 22 15:27:05 2022 -0400 KVM: x86/mmu: Extend make_huge_page_split_spte() for the shadow MMU Currently make_huge_page_split_spte() assumes execute permissions can be granted to any 4K SPTE when splitting huge pages. This is true for the TDP MMU but is not necessarily true for the shadow MMU, since KVM may be shadowing a non-executable huge page. To fix this, pass in the role of the child shadow page where the huge page will be split and derive the execution permission from that. This is correct because huge pages are always split with direct shadow page and thus the shadow page role contains the correct access permissions. No functional change intended. Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-19-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/spte.c | 15 +++++++-------- arch/x86/kvm/mmu/spte.h | 4 ++-- arch/x86/kvm/mmu/tdp_mmu.c | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) commit 6a97575d5cffb71aa9a95d33f0ca03c8a4bb3b2b Author: David Matlack Date: Wed Jun 22 15:27:04 2022 -0400 KVM: x86/mmu: Cache the access bits of shadowed translations Splitting huge pages requires allocating/finding shadow pages to replace the huge page. Shadow pages are keyed, in part, off the guest access permissions they are shadowing. For fully direct MMUs, there is no shadowing so the access bits in the shadow page role are always ACC_ALL. But during shadow paging, the guest can enforce whatever access permissions it wants. In particular, eager page splitting needs to know the permissions to use for the subpages, but KVM cannot retrieve them from the guest page tables because eager page splitting does not have a vCPU. Fortunately, the guest access permissions are easy to cache whenever page faults or FNAME(sync_page) update the shadow page tables; this is an extension of the existing cache of the shadowed GFNs in the gfns array of the shadow page. The access bits only take up 3 bits, which leaves 61 bits left over for gfns, which is more than enough. Now that the gfns array caches more information than just GFNs, rename it to shadowed_translation. While here, preemptively fix up the WARN_ON() that detects gfn mismatches in direct SPs. The WARN_ON() was paired with a pr_err_ratelimited(), which means that users could sometimes see the WARN without the accompanying error message. Fix this by outputting the error message as part of the WARN splat, and opportunistically make them WARN_ONCE() because if these ever fire, they are all but guaranteed to fire a lot and will bring down the kernel. Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-18-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/mmu/mmu.c | 85 +++++++++++++++++++++++++++++------------ arch/x86/kvm/mmu/mmu_internal.h | 17 ++++++++- arch/x86/kvm/mmu/paging_tmpl.h | 9 ++++- 4 files changed, 84 insertions(+), 29 deletions(-) commit 81cb4657e9f0d931216fc22966ddf68a5151a206 Author: David Matlack Date: Wed Jun 22 15:27:03 2022 -0400 KVM: x86/mmu: Update page stats in __rmap_add() Update the page stats in __rmap_add() rather than at the call site. This will avoid having to manually update page stats when splitting huge pages in a subsequent commit. No functional change intended. Reviewed-by: Ben Gardon Reviewed-by: Peter Xu Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-17-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2ff9039a75a8c19fbbcef7fe74ea61a10e4639f3 Author: David Matlack Date: Wed Jun 22 15:27:02 2022 -0400 KVM: x86/mmu: Decouple rmap_add() and link_shadow_page() from kvm_vcpu Allow adding new entries to the rmap and linking shadow pages without a struct kvm_vcpu pointer by moving the implementation of rmap_add() and link_shadow_page() into inner helper functions. No functional change intended. Reviewed-by: Ben Gardon Reviewed-by: Peter Xu Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-16-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 47 +++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 18 deletions(-) commit 6ec6509eea39ee249550a398fd1790b26833675d Author: David Matlack Date: Wed Jun 22 15:27:01 2022 -0400 KVM: x86/mmu: Pass const memslot to rmap_add() Constify rmap_add()'s @slot parameter; it is simply passed on to gfn_to_rmap(), which takes a const memslot. No functional change intended. Reviewed-by: Ben Gardon Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-15-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbd858b17e379f727c6bf1eaedde7b1a44e75b40 Author: David Matlack Date: Wed Jun 22 15:27:00 2022 -0400 KVM: x86/mmu: Allow NULL @vcpu in kvm_mmu_find_shadow_page() Allow @vcpu to be NULL in kvm_mmu_find_shadow_page() (and its only caller __kvm_mmu_get_shadow_page()). @vcpu is only required to sync indirect shadow pages, so it's safe to pass in NULL when looking up direct shadow pages. This will be used for doing eager page splitting, which allocates direct shadow pages from the context of a VM ioctl without access to a vCPU pointer. Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-14-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3cc736b35799ab330225d89976fac36794e4bec0 Author: David Matlack Date: Wed Jun 22 15:26:59 2022 -0400 KVM: x86/mmu: Pass kvm pointer separately from vcpu to kvm_mmu_find_shadow_page() Get the kvm pointer from the caller, rather than deriving it from vcpu->kvm, and plumb the kvm pointer all the way from kvm_mmu_get_shadow_page(). With this change in place, the vcpu pointer is only needed to sync indirect shadow pages. In other words, __kvm_mmu_get_shadow_page() can now be used to get *direct* shadow pages without a vcpu pointer. This enables eager page splitting, which needs to allocate direct shadow pages during VM ioctls. No functional change intended. Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-13-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 336081fb3f26a3e819838317c011aee41d88e676 Author: David Matlack Date: Wed Jun 22 15:26:58 2022 -0400 KVM: x86/mmu: Replace vcpu with kvm in kvm_mmu_alloc_shadow_page() The vcpu pointer in kvm_mmu_alloc_shadow_page() is only used to get the kvm pointer. So drop the vcpu pointer and just pass in the kvm pointer. No functional change intended. Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-12-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2f8b1b539be37f6bbc4827dfe3320935976fefa4 Author: David Matlack Date: Wed Jun 22 15:26:57 2022 -0400 KVM: x86/mmu: Pass memory caches to allocate SPs separately Refactor kvm_mmu_alloc_shadow_page() to receive the caches from which it will allocate the various pieces of memory for shadow pages as a parameter, rather than deriving them from the vcpu pointer. This will be useful in a future commit where shadow pages are allocated during VM ioctls for eager page splitting, and thus will use a different set of caches. Preemptively pull the caches out all the way to kvm_mmu_get_shadow_page() since eager page splitting will not be calling kvm_mmu_alloc_shadow_page() directly. No functional change intended. Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-11-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) commit be911771330a2ae0938d452fd89a8df085533134 Author: David Matlack Date: Wed Jun 22 15:26:56 2022 -0400 KVM: x86/mmu: Move guest PT write-protection to account_shadowed() Move the code that write-protects newly-shadowed guest page tables into account_shadowed(). This avoids a extra gfn-to-memslot lookup and is a more logical place for this code to live. But most importantly, this reduces kvm_mmu_alloc_shadow_page()'s reliance on having a struct kvm_vcpu pointer, which will be necessary when creating new shadow pages during VM ioctls for eager page splitting. Note, it is safe to drop the role.level == PG_LEVEL_4K check since account_shadowed() returns early if role.level > PG_LEVEL_4K. No functional change intended. Reviewed-by: Sean Christopherson Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-10-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 876546436db9775caee4cadf78edd2b5bf72ac84 Author: David Matlack Date: Wed Jun 22 15:26:55 2022 -0400 KVM: x86/mmu: Rename shadow MMU functions that deal with shadow pages Rename 2 functions: kvm_mmu_get_page() -> kvm_mmu_get_shadow_page() kvm_mmu_free_page() -> kvm_mmu_free_shadow_page() This change makes it clear that these functions deal with shadow pages rather than struct pages. It also aligns these functions with the naming scheme for kvm_mmu_find_shadow_page() and kvm_mmu_alloc_shadow_page(). Prefer "shadow_page" over the shorter "sp" since these are core functions and the line lengths aren't terrible. No functional change intended. Reviewed-by: Sean Christopherson Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-9-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit c306aec81ae1f40af42bf531065b66308ff72251 Author: David Matlack Date: Wed Jun 22 15:26:54 2022 -0400 KVM: x86/mmu: Consolidate shadow page allocation and initialization Consolidate kvm_mmu_alloc_page() and kvm_mmu_alloc_shadow_page() under the latter so that all shadow page allocation and initialization happens in one place. No functional change intended. Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-8-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) commit 94c8136448c80496cbfe0922bcb379bcf62cb8ac Author: David Matlack Date: Wed Jun 22 15:26:53 2022 -0400 KVM: x86/mmu: Decompose kvm_mmu_get_page() into separate functions Decompose kvm_mmu_get_page() into separate helper functions to increase readability and prepare for allocating shadow pages without a vcpu pointer. Specifically, pull the guts of kvm_mmu_get_page() into 2 helper functions: kvm_mmu_find_shadow_page() - Walks the page hash checking for any existing mmu pages that match the given gfn and role. kvm_mmu_alloc_shadow_page() Allocates and initializes an entirely new kvm_mmu_page. This currently requries a vcpu pointer for allocation and looking up the memslot but that will be removed in a future commit. No functional change intended. Reviewed-by: Sean Christopherson Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-7-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 52 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 13 deletions(-) commit 7f49777550e55a7d6832cbb0873f48f91c175b9c Author: David Matlack Date: Wed Jun 22 15:26:52 2022 -0400 KVM: x86/mmu: Always pass 0 for @quadrant when gptes are 8 bytes The quadrant is only used when gptes are 4 bytes, but mmu_alloc_{direct,shadow}_roots() pass in a non-zero quadrant for PAE page directories regardless. Make this less confusing by only passing in a non-zero quadrant when it is actually necessary. Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-6-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 2e65e842c57d72e9a573ba42bc2055b7f626ea1f Author: David Matlack Date: Wed Jun 22 15:26:51 2022 -0400 KVM: x86/mmu: Derive shadow MMU page role from parent Instead of computing the shadow page role from scratch for every new page, derive most of the information from the parent shadow page. This eliminates the dependency on the vCPU root role to allocate shadow page tables, and reduces the number of parameters to kvm_mmu_get_page(). Preemptively split out the role calculation to a separate function for use in a following commit. Note that when calculating the MMU root role, we can take @role.passthrough, @role.direct, and @role.access directly from @vcpu->arch.mmu->root_role. Only @role.level and @role.quadrant still must be overridden for PAE page directories, when shadowing 32-bit guest page tables with PAE page tables. No functional change intended. Reviewed-by: Peter Xu Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-5-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 114 ++++++++++++++++++++++++----------------- arch/x86/kvm/mmu/paging_tmpl.h | 9 ++-- 2 files changed, 71 insertions(+), 52 deletions(-) commit 86938ab6925b8fe174ca6abf397e6ea9d3c054a4 Author: David Matlack Date: Wed Jun 22 15:26:50 2022 -0400 KVM: x86/mmu: Stop passing "direct" to mmu_alloc_root() The "direct" argument is vcpu->arch.mmu->root_role.direct, because unlike non-root page tables, it's impossible to have a direct root in an indirect MMU. So just use that. Suggested-by: Lai Jiangshan Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-4-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 27a59d57f073f21f029df1517c2c0a1abea5b0ce Author: David Matlack Date: Wed Jun 22 15:26:49 2022 -0400 KVM: x86/mmu: Use a bool for direct The parameter "direct" can either be true or false, and all of the callers pass in a bool variable or true/false literal, so just use the type bool. No functional change intended. Reviewed-by: Lai Jiangshan Reviewed-by: Sean Christopherson Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-3-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bb924ca69f71b4f54c8f07be28e2b76f5ad1d2ac Author: David Matlack Date: Wed Jun 22 15:26:48 2022 -0400 KVM: x86/mmu: Optimize MMU page cache lookup for all direct SPs Commit fb58a9c345f6 ("KVM: x86/mmu: Optimize MMU page cache lookup for fully direct MMUs") skipped the unsync checks and write flood clearing for full direct MMUs. We can extend this further to skip the checks for all direct shadow pages. Direct shadow pages in indirect MMUs (i.e. shadow paging) are used when shadowing a guest huge page with smaller pages. Such direct shadow pages, like their counterparts in fully direct MMUs, are never marked unsynced or have a non-zero write-flooding count. Checking sp->role.direct also generates better code than checking direct_map because, due to register pressure, direct_map has to get shoved onto the stack and then pulled back off. No functional change intended. Reviewed-by: Lai Jiangshan Reviewed-by: Sean Christopherson Reviewed-by: Peter Xu Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-2-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 83f6e109f562063ab7a1f54d99bcab2858b09ead Author: Ben Gardon Date: Mon Jun 13 21:25:23 2022 +0000 KVM: selftests: Cache binary stats metadata for duration of test In order to improve performance across multiple reads of VM stats, cache the stats metadata in the VM struct. Signed-off-by: Ben Gardon Message-Id: <20220613212523.3436117-11-bgardon@google.com> Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 5 ++++ tools/testing/selftests/kvm/lib/kvm_util.c | 32 ++++++++++++---------- 2 files changed, 22 insertions(+), 15 deletions(-) commit b774da3f2e5761cb85881ce62eb6dc97d15396c4 Author: Ben Gardon Date: Mon Jun 13 21:25:22 2022 +0000 KVM: selftests: Test disabling NX hugepages on a VM Add an argument to the NX huge pages test to test disabling the feature on a VM using the new capability. Reviewed-by: David Matlack Signed-off-by: Ben Gardon Message-Id: <20220613212523.3436117-10-bgardon@google.com> [Handle failure of sudo or setcap more gracefully. - Paolo] Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 6 + .../selftests/kvm/x86_64/nx_huge_pages_test.c | 134 +++++++++++++-------- .../selftests/kvm/x86_64/nx_huge_pages_test.sh | 21 +++- 3 files changed, 113 insertions(+), 48 deletions(-) commit 8448ec5993beee031376e36f77969cc0a07d8c6b Author: Ben Gardon Date: Mon Jun 13 21:25:19 2022 +0000 KVM: selftests: Add NX huge pages test There's currently no test coverage of NX hugepages in KVM selftests, so add a basic test to ensure that the feature works as intended. The test creates a VM with a data slot backed with huge pages. The memory in the data slot is filled with op-codes for the return instruction. The guest then executes a series of accesses on the memory, some reads, some instruction fetches. After each operation, the guest exits and the test performs some checks on the backing page counts to ensure that NX page splitting an reclaim work as expected. Reviewed-by: David Matlack Signed-off-by: Ben Gardon Message-Id: <20220613212523.3436117-7-bgardon@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/.gitignore | 1 + tools/testing/selftests/kvm/Makefile | 10 + .../testing/selftests/kvm/include/kvm_util_base.h | 11 + tools/testing/selftests/kvm/lib/kvm_util.c | 46 +++++ .../selftests/kvm/x86_64/nx_huge_pages_test.c | 229 +++++++++++++++++++++ .../selftests/kvm/x86_64/nx_huge_pages_test.sh | 40 ++++ 6 files changed, 337 insertions(+) commit 084cc29f8bbb034cf30a7ee07a816c115e0c28df Author: Ben Gardon Date: Mon Jun 13 21:25:21 2022 +0000 KVM: x86/MMU: Allow NX huge pages to be disabled on a per-vm basis In some cases, the NX hugepage mitigation for iTLB multihit is not needed for all guests on a host. Allow disabling the mitigation on a per-VM basis to avoid the performance hit of NX hugepages on trusted workloads. In order to disable NX hugepages on a VM, ensure that the userspace actor has permission to reboot the system. Since disabling NX hugepages would allow a guest to crash the system, it is similar to reboot permissions. Ideally, KVM would require userspace to prove it has access to KVM's nx_huge_pages module param, e.g. so that userspace can opt out without needing full reboot permissions. But getting access to the module param file info is difficult because it is buried in layers of sysfs and module glue. Requiring CAP_SYS_BOOT is sufficient for all known use cases. Suggested-by: Jim Mattson Reviewed-by: David Matlack Reviewed-by: Peter Xu Signed-off-by: Ben Gardon Message-Id: <20220613212523.3436117-9-bgardon@google.com> Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 16 ++++++++++++++++ arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/mmu/mmu_internal.h | 7 ++++--- arch/x86/kvm/mmu/spte.c | 7 ++++--- arch/x86/kvm/mmu/spte.h | 3 ++- arch/x86/kvm/mmu/tdp_mmu.c | 2 +- arch/x86/kvm/x86.c | 30 ++++++++++++++++++++++++++++++ include/uapi/linux/kvm.h | 1 + 8 files changed, 60 insertions(+), 8 deletions(-) commit 1c4dc57328bf218e999951824dce75c6125c4f3c Author: Ben Gardon Date: Mon Jun 13 21:25:20 2022 +0000 KVM: x86: Fix errant brace in KVM capability handling The braces around the KVM_CAP_XSAVE2 block also surround the KVM_CAP_PMU_CAPABILITY block, likely the result of a merge issue. Simply move the curly brace back to where it belongs. Fixes: ba7bb663f5547 ("KVM: x86: Provide per VM capability for disabling PMU virtualization") Reviewed-by: David Matlack Reviewed-by: Peter Xu Signed-off-by: Ben Gardon Message-Id: <20220613212523.3436117-8-bgardon@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed6b53ec9090133cd744705a09811cf627f3e9cb Author: Ben Gardon Date: Mon Jun 13 21:25:18 2022 +0000 KVM: selftests: Read binary stat data in lib Move the code to read the binary stats data to the KVM selftests library. It will be re-used by other tests to check KVM behavior. Also opportunistically remove an unnecessary calculation with "size_data" in stats_test. Reviewed-by: David Matlack Reviewed-by: Peter Xu Signed-off-by: Ben Gardon Message-Id: <20220613212523.3436117-6-bgardon@google.com> Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 4 +++ .../testing/selftests/kvm/kvm_binary_stats_test.c | 9 ++---- tools/testing/selftests/kvm/lib/kvm_util.c | 35 ++++++++++++++++++++++ 3 files changed, 41 insertions(+), 7 deletions(-) commit 143e7eea3d66737c73cc3aa3538123ea3bb1f640 Author: Sean Christopherson Date: Mon Jun 13 21:25:17 2022 +0000 KVM: selftests: Clean up coding style in binary stats test Fix a variety of code style violations and/or inconsistencies in the binary stats test. The 80 char limit is a soft limit and can and should be ignored/violated if doing so improves the overall code readability. Specifically, provide consistent indentation and don't split expressions at arbitrary points just to honor the 80 char limit. Opportunistically expand/add comments to call out the more subtle aspects of the code. Signed-off-by: Sean Christopherson Reviewed-by: David Matlack Signed-off-by: Ben Gardon Message-Id: <20220613212523.3436117-5-bgardon@google.com> Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/kvm_binary_stats_test.c | 79 ++++++++++++---------- 1 file changed, 45 insertions(+), 34 deletions(-) commit 4d0a059415708ec0f221616f187853176d2fbebc Author: Ben Gardon Date: Mon Jun 13 21:25:16 2022 +0000 KVM: selftests: Read binary stats desc in lib Move the code to read the binary stats descriptors to the KVM selftests library. It will be re-used by other tests to check KVM behavior. No functional change intended. Reviewed-by: David Matlack Reviewed-by: Peter Xu Signed-off-by: Ben Gardon Message-Id: <20220613212523.3436117-4-bgardon@google.com> Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 25 ++++++++++++++++ .../testing/selftests/kvm/kvm_binary_stats_test.c | 16 ++++------- tools/testing/selftests/kvm/lib/kvm_util.c | 33 ++++++++++++++++++++++ 3 files changed, 63 insertions(+), 11 deletions(-) commit 32faa0647cea46ffda9095c3a8c95b315e139f0f Author: Ben Gardon Date: Mon Jun 13 21:25:15 2022 +0000 KVM: selftests: Read binary stats header in lib Move the code to read the binary stats header to the KVM selftests library. It will be re-used by other tests to check KVM behavior. No functional change intended. Reviewed-by: David Matlack Reviewed-by: Peter Xu Signed-off-by: Ben Gardon Message-Id: <20220613212523.3436117-3-bgardon@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/kvm_util_base.h | 8 ++++++++ tools/testing/selftests/kvm/kvm_binary_stats_test.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit fcd48a213f0ac45c2187b09e19d4849e14cb59f8 Author: Ben Gardon Date: Mon Jun 13 21:25:14 2022 +0000 KVM: selftests: Remove dynamic memory allocation for stats header There's no need to allocate dynamic memory for the stats header since its size is known at compile time. Reviewed-by: David Matlack Reviewed-by: Peter Xu Signed-off-by: Ben Gardon Message-Id: <20220613212523.3436117-2-bgardon@google.com> Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/kvm_binary_stats_test.c | 58 ++++++++++------------ 1 file changed, 27 insertions(+), 31 deletions(-) commit f662092b2e0c4a43d09e5b1f67ca969ea47a93d3 Author: Ard Biesheuvel Date: Fri Jun 17 18:34:06 2022 +0200 Input: applespi - avoid efivars API and invoke EFI services directly This driver abuses the efivar API, by using a few of its helpers on entries that were not instantiated by the API itself. This is a problem as future cleanup work on efivars is complicated by this. So let's just switch to the get/set variable runtime wrappers directly. Cc: Dmitry Torokhov Signed-off-by: Ard Biesheuvel drivers/input/keyboard/applespi.c | 42 +++++++++++++-------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) commit c07d2475f9cd7eaf6ddc60b5d284b375699d9553 Author: Ard Biesheuvel Date: Wed Jun 8 09:54:47 2022 +0200 selftests/kexec: remove broken EFI_VARS secure boot fallback check Commit b433a52aa28733e0 ("selftests/kexec: update get_secureboot_mode") refactored the code that discovers the EFI secure boot mode so it only depends on either the efivars pseudo filesystem or the efivars sysfs interface, but never both. However, the latter version was not implemented correctly, given the fact that the local 'efi_vars' variable never assumes a value. This means the fallback has been dead code ever since it was introduced. So let's drop the fallback altogether. The sysfs interface has been deprecated for ~10 years now, and is only enabled on x86 to begin with, so it is time to get rid of it entirely. Reviewed-by: Mimi Zohar Signed-off-by: Ard Biesheuvel tools/testing/selftests/kexec/kexec_common_lib.sh | 36 ++--------------------- 1 file changed, 2 insertions(+), 34 deletions(-) commit f41b284a2c187c299f496f6fa1914ec986bdf0ee Author: Zhengchao Shao Date: Wed Jun 15 09:55:19 2022 +0800 xfrm: change the type of xfrm_register_km and xfrm_unregister_km Functions xfrm_register_km and xfrm_unregister_km do always return 0, change the type of functions to void. Signed-off-by: Zhengchao Shao Signed-off-by: Steffen Klassert include/net/xfrm.h | 4 ++-- net/key/af_key.c | 6 +----- net/xfrm/xfrm_state.c | 6 ++---- net/xfrm/xfrm_user.c | 6 ++---- 4 files changed, 7 insertions(+), 15 deletions(-) commit eae6d58d67d9739be5f7ae2dbead1d0ef6528243 Author: Peter Zijlstra Date: Fri Jun 17 15:26:06 2022 +0200 locking/lockdep: Fix lockdep_init_map_*() confusion Commit dfd5e3f5fe27 ("locking/lockdep: Mark local_lock_t") added yet another lockdep_init_map_*() variant, but forgot to update all the existing users of the most complicated version. This could lead to a loss of lock_type and hence an incorrect report. Given the relative rarity of both local_lock and these annotations, this is unlikely to happen in practise, still, best fix things. Fixes: dfd5e3f5fe27 ("locking/lockdep: Mark local_lock_t") Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/YqyEDtoan20K0CVD@worktop.programming.kicks-ass.net include/linux/lockdep.h | 30 +++++++++++++++++------------- kernel/locking/lockdep.c | 7 ++++--- 2 files changed, 21 insertions(+), 16 deletions(-) commit 7e6b9db27de9f69a705c1a046d45882c768e16c3 Author: Ard Biesheuvel Date: Wed Jun 15 17:41:42 2022 +0200 jump_label: make initial NOP patching the special case Instead of defaulting to patching NOP opcodes at init time, and leaving it to the architectures to override this if this is not needed, switch to a model where doing nothing is the default. This is the common case by far, as only MIPS requires NOP patching at init time. On all other architectures, the correct encodings are emitted by the compiler and so no initial patching is needed. Signed-off-by: Ard Biesheuvel Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220615154142.1574619-4-ardb@kernel.org Documentation/staging/static-keys.rst | 3 --- arch/arc/kernel/jump_label.c | 13 ------------- arch/arm/kernel/jump_label.c | 6 ------ arch/arm64/kernel/jump_label.c | 11 ----------- arch/mips/include/asm/jump_label.h | 2 ++ arch/parisc/kernel/jump_label.c | 11 ----------- arch/riscv/kernel/jump_label.c | 12 ------------ arch/s390/kernel/jump_label.c | 5 ----- arch/x86/kernel/jump_label.c | 13 ------------- include/linux/jump_label.h | 2 -- kernel/jump_label.c | 14 +++++--------- 11 files changed, 7 insertions(+), 85 deletions(-) commit fdfd42892f311e2b3695852036e5be23661dc590 Author: Ard Biesheuvel Date: Wed Jun 15 17:41:41 2022 +0200 jump_label: mips: move module NOP patching into arch code MIPS is the only remaining architecture that needs to patch jump label NOP encodings to initialize them at load time. So let's move the module patching part of that from generic code into arch/mips, and drop it from the others. Signed-off-by: Ard Biesheuvel Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220615154142.1574619-3-ardb@kernel.org arch/mips/kernel/jump_label.c | 19 +++++++++++++++++++ arch/mips/kernel/module.c | 5 +++-- arch/s390/kernel/module.c | 1 - arch/sparc/kernel/module.c | 3 --- arch/x86/kernel/module.c | 3 --- include/linux/jump_label.h | 7 +------ kernel/jump_label.c | 27 +-------------------------- 7 files changed, 24 insertions(+), 41 deletions(-) commit 0c3b61e00a0d0872c521586494ec23f6016c317a Author: Ard Biesheuvel Date: Wed Jun 15 17:41:40 2022 +0200 jump_label: s390: avoid pointless initial NOP patching Patching NOPs into other NOPs at boot time serves no purpose, so let's use the same NOP encodings at compile time and runtime. Signed-off-by: Ard Biesheuvel Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220615154142.1574619-2-ardb@kernel.org arch/s390/include/asm/jump_label.h | 5 ++--- arch/s390/kernel/jump_label.c | 23 +++++------------------ 2 files changed, 7 insertions(+), 21 deletions(-) commit 232b95ba4e83ca0a77f19fc772ccc6581051e5cc Author: KuoHsiang Chou Date: Thu Jun 23 16:31:16 2022 +0800 drm/ast: Fixed the casting issue reported by sparse V1: 1.Fixed sparse:cast truncates bits form constant value ()cast truncates bits from constant value (ffffffffffffff00 becomes 0) Reported-by: kernel test robot Signed-off-by: KuoHsiang Chou Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220623083116.35365-1-kuohsiang_chou@aspeedtech.com drivers/gpu/drm/ast/ast_dp.c | 10 +++++----- drivers/gpu/drm/ast/ast_drv.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit 1227d2a20cd7319fb45c62fab4b252600e0308bf Author: Qiang Yu Date: Thu Jun 23 10:43:03 2022 +0800 bus: mhi: host: Move IRQ allocation to controller registration phase During runtime, the MHI endpoint may be powered up/down several times. So instead of allocating and destroying the IRQs all the time, let's just enable/disable IRQs during power up/down. The IRQs will be allocated during mhi_register_controller() and freed during mhi_unregister_controller(). This works well for things like PCI hotplug also as once the PCI device gets removed, the controller will get unregistered. And once it comes back, it will get registered back and even if the IRQ configuration changes (MSI), that will get accounted. Signed-off-by: Qiang Yu Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1655952183-66792-1-git-send-email-quic_qianyu@quicinc.com Signed-off-by: Manivannan Sadhasivam drivers/bus/mhi/host/init.c | 17 ++++++++++++++++- drivers/bus/mhi/host/pm.c | 19 +++++++++++++------ 2 files changed, 29 insertions(+), 7 deletions(-) commit 1a4f20cab6411c6e73dd22d28b6595b728cc2829 Merge: 5c4a99cf5d25 ced37411d7f5 Author: Krzysztof Kozlowski Date: Fri Jun 24 09:12:47 2022 +0200 Merge branch 'for-v5.20/exynos7885-emmc-clk' into next/dt64 commit e2c003bc6488704b28d59087d097863ea69a710d Author: Ivan Bornyakov Date: Thu Jun 23 19:32:48 2022 +0300 MAINTAINERS: add Microchip PolarFire FPGA drivers entry Add MAINTAINERS entry for the newly added Microchip PolarFire (MPF) FPGA manager. Add myself as a reviewer and Conor Dooley as a maintainer. Suggested-by: Conor Dooley Signed-off-by: Ivan Bornyakov Acked-by: Conor Dooley Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20220623163248.3672-6-i.bornyakov@metrotek.ru Signed-off-by: Xu Yilun MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit b7eb6da9b5f9c8cee231e466e107acdd5e5d2909 Author: Ivan Bornyakov Date: Thu Jun 23 19:32:47 2022 +0300 dt-bindings: fpga: add binding doc for microchip-spi fpga mgr Add Device Tree Binding doc for Microchip Polarfire FPGA Manager using slave SPI to load .dat formatted bitstream image. Signed-off-by: Ivan Bornyakov Reviewed-by: Rob Herring Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20220623163248.3672-5-i.bornyakov@metrotek.ru Signed-off-by: Xu Yilun .../bindings/fpga/microchip,mpf-spi-fpga-mgr.yaml | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 5f8d4a9008307e0bf210906948953386935d361c Author: Ivan Bornyakov Date: Thu Jun 23 19:32:46 2022 +0300 fpga: microchip-spi: add Microchip MPF FPGA manager Add support to the FPGA manager for programming Microchip Polarfire FPGAs over slave SPI interface with .dat formatted bitsream image. Signed-off-by: Ivan Bornyakov Reviewed-by: Conor Dooley Tested-by: Conor Dooley Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20220623163248.3672-4-i.bornyakov@metrotek.ru Signed-off-by: Xu Yilun drivers/fpga/Kconfig | 8 + drivers/fpga/Makefile | 1 + drivers/fpga/microchip-spi.c | 398 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 407 insertions(+) commit 288cc44b27077a941101ac7c1b683b0c90c1a214 Author: Ivan Bornyakov Date: Thu Jun 23 19:32:45 2022 +0300 docs: fpga: mgr: document parse_header() callback Document newly introduced fpga_manager_ops callback parse_header() and flag skip_header along with header_size and data_size fields of struct fpga_image_info. Signed-off-by: Ivan Bornyakov Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20220623163248.3672-3-i.bornyakov@metrotek.ru Signed-off-by: Xu Yilun Documentation/driver-api/fpga/fpga-mgr.rst | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit 3cc624beba6310a8a534fb00841f22445a200d54 Author: Ivan Bornyakov Date: Thu Jun 23 19:32:44 2022 +0300 fpga: fpga-mgr: support bitstream offset in image buffer At the moment FPGA manager core loads to the device entire image provided to fpga_mgr_load(). But it is not always whole FPGA image buffer meant to be written to the device. In particular, .dat formatted image for Microchip MPF contains meta info in the header that is not meant to be written to the device. This is issue for those low level drivers that loads data to the device with write() fpga_manager_ops callback, since write() can be called in iterator over scatter-gather table, not only linear image buffer. On the other hand, write_sg() callback is provided with whole image in scatter-gather form and can decide itself which part should be sent to the device. Add header_size and data_size to the fpga_image_info struct, add skip_header to the fpga_manager_ops struct and adjust fpga_mgr_write() callers with respect to them. * info->header_size indicates part at the beginning of image buffer that contains some meta info. It is optional and can be 0, initialized with mops->initial_header_size. * mops->skip_header tells fpga-mgr core whether write should start from the beginning of image buffer or at the offset of header_size. * info->data_size is the size of bitstream data that is meant to be written to the device. It is also optional and can be 0, which means bitstream data is up to the end of image buffer. Also add parse_header() callback to fpga_manager_ops, which purpose is to set info->header_size and info->data_size. At least initial_header_size bytes of image buffer will be passed into parse_header() first time. If it is not enough, parse_header() should set desired size into info->header_size and return -EAGAIN, then it will be called again with greater part of image buffer on the input. Suggested-by: Xu Yilun Signed-off-by: Ivan Bornyakov Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20220623163248.3672-2-i.bornyakov@metrotek.ru Signed-off-by: Xu Yilun drivers/fpga/fpga-mgr.c | 223 +++++++++++++++++++++++++++++++++++++----- include/linux/fpga/fpga-mgr.h | 24 ++++- 2 files changed, 220 insertions(+), 27 deletions(-) commit 3de7203115af2f3a76ffdb0c90a89ad99f4c4e04 Author: Jiang Jian Date: Wed Jun 22 14:14:42 2022 +0800 platform/chrome: wilco_ec: event: Fix typo in comment Drop the redundant word 'the'. Signed-off-by: Jiang Jian Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220622061442.18242-1-jiangjian@cdjrlc.com drivers/platform/chrome/wilco_ec/event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7747de17f7507f26a21b17097862f0da409be111 Author: Jiang Jian Date: Wed Jun 22 22:48:41 2022 +0800 cxgb4/cxgb4vf: Fix typo in comments Remove the repeated word 'and' from comments Signed-off-by: Jiang Jian Link: https://lore.kernel.org/r/20220622144841.21274-1-jiangjian@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c909e7ca494f397f51648048252d00d3dd61cefd Author: Jiang Jian Date: Wed Jun 22 22:45:26 2022 +0800 bnxt: Fix typo in comments Remove the repeated word 'and' from comments Signed-off-by: Jiang Jian Link: https://lore.kernel.org/r/20220622144526.20659-1-jiangjian@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09ce6b20103b57e4d24b2b57b5f46a6968c1f281 Author: Michael Walle Date: Wed Jun 22 16:17:16 2022 +0200 net: phy: mxl-gpy: add temperature sensor The GPY115 and GPY2xx PHYs contain an integrated temperature sensor. It accuracy is +/- 5°C. Add support for it. Signed-off-by: Michael Walle Acked-by: Guenter Roeck Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20220622141716.3517645-1-michael@walle.cc Signed-off-by: Jakub Kicinski drivers/net/phy/Kconfig | 2 + drivers/net/phy/mxl-gpy.c | 106 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) commit 5dc4868440be87e5f09e669574f586e1f5228c27 Merge: 84296d4c0d55 363b65459b78 Author: Jakub Kicinski Date: Thu Jun 23 20:52:21 2022 -0700 Merge branch 'net-use-new-hwmon_sanitize_name' Michael Walle says: ==================== net: use new hwmon_sanitize_name() These are the remaining patches of my former series [1] which were hold back because it would have required a stable branch between the subsystems. [1] https://lore.kernel.org/r/20220405092452.4033674-1-michael@walle.cc/ ==================== Link: https://lore.kernel.org/r/20220622123543.3463209-1-michael@walle.cc Signed-off-by: Jakub Kicinski commit 363b65459b78c0488721196186fac7f48593234e Author: Michael Walle Date: Wed Jun 22 14:35:43 2022 +0200 net: phy: nxp-tja11xx: use devm_hwmon_sanitize_name() Instead of open-coding the bad characters replacement in the hwmon name, use the new devm_hwmon_sanitize_name(). Signed-off-by: Michael Walle Acked-by: Guenter Roeck Signed-off-by: Jakub Kicinski drivers/net/phy/nxp-tja11xx.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 3f118c449c8ef7713e9acdebe333d947ab46933b Author: Michael Walle Date: Wed Jun 22 14:35:42 2022 +0200 net: sfp: use hwmon_sanitize_name() Instead of open-coding the bad characters replacement in the hwmon name, use the new hwmon_sanitize_name(). Signed-off-by: Michael Walle Acked-by: Russell King (Oracle) Acked-by: Guenter Roeck Signed-off-by: Jakub Kicinski drivers/net/phy/sfp.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 84296d4c0d559157dd3db745ad1e492d061e00b8 Merge: 0aeaaa8d9769 7bfe91efd525 Author: Jakub Kicinski Date: Thu Jun 23 20:49:05 2022 -0700 Merge branch 'broadcom-ptp-phy-support' Jonathan Lemon says: ==================== Broadcom PTP PHY support This adds PTP support for the Broadcom PHY BCM54210E (and the specific variant BCM54213PE that the rpi-5.15 branch uses). This has only been tested on the RPI CM4, which has one port. There are other Broadcom chips which may benefit from using the same framework here, although with different register sets. ==================== Link: https://lore.kernel.org/r/20220622050454.878052-1-jonathan.lemon@gmail.com Signed-off-by: Jakub Kicinski commit 7bfe91efd525a4608ccf4f78f9ec1dba748c5b37 Author: Jonathan Lemon Date: Tue Jun 21 22:04:54 2022 -0700 net: phy: Add support for 1PPS out and external timestamps The perout function is used to generate a 1PPS signal, synchronized to the PHC. This is accomplished by a using the hardware oneshot functionality, which is reset by a timer. The external timestamp function is set up for a 1PPS input pulse, and uses a timer to poll for temestamps. Both functions use the SYNC_OUT/SYNC_IN1 pin, so cannot run simultaneously. Co-developed-by: Lasse Johnsen Signed-off-by: Lasse Johnsen Signed-off-by: Jonathan Lemon Acked-by: Richard Cochran Signed-off-by: Jakub Kicinski drivers/net/phy/bcm-phy-ptp.c | 226 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 226 insertions(+) commit 39db6be781cd7dfd44ea259acecaf23f8685550b Author: Jonathan Lemon Date: Tue Jun 21 22:04:53 2022 -0700 net: phy: broadcom: Add PTP support for some Broadcom PHYs. This adds PTP support for BCM54210E Broadcom PHYs, in particular, the BCM54213PE, as used in the Rasperry PI CM4. It has only been tested on that hardware. Signed-off-by: Jonathan Lemon Acked-by: Richard Cochran Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski drivers/net/phy/Kconfig | 5 + drivers/net/phy/Makefile | 1 + drivers/net/phy/bcm-phy-ptp.c | 718 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 724 insertions(+) commit 15acf89e1286b91fc46aebf56d9334b33e5ca847 Author: Jonathan Lemon Date: Tue Jun 21 22:04:52 2022 -0700 net: phy: broadcom: Add Broadcom PTP hooks to bcm-phy-lib Add 'struct bcm_ptp_private' to bcm54xx_phy_priv which points to an optional PTP structure attached to the PHY. This is allocated on probe if PHY PTP support is configured, and if the driver supports PTP for the specified PHY. Add the bcm_ptp_probe(), bcm_ptp_config_init() and bcn_ptp_stop() API functions to the bcm-phy library. Signed-off-by: Jonathan Lemon Reviewed-by: Florian Fainelli Acked-by: Richard Cochran Signed-off-by: Jakub Kicinski drivers/net/phy/bcm-phy-lib.h | 19 +++++++++++++++++++ drivers/net/phy/broadcom.c | 33 +++++++++++++++++++++++++++++---- 2 files changed, 48 insertions(+), 4 deletions(-) commit 0aeaaa8d9769393e9b76efce2bf051ae28d59ee7 Merge: 93817be8b62c 3c783b83bd0f Author: Jakub Kicinski Date: Thu Jun 23 20:26:47 2022 -0700 Merge branch 'net-dsa-mv88e6xxx-get-rid-of-speed_max' Russell King says: ==================== net: dsa: mv88e6xxx: get rid of SPEED_MAX This series does two things: 1. it gets rid of mv88e6065_port_set_speed_duplex() which is completely unused (do we support this device? I couldn't find it in the tables in chip.c) This has a max speed of 200Mbps which we don't support. 2. get rid of the SPEED_MAX constant, which is used to configure a DSA or CPU port to their maximum speed during initialisation. We no longer need this as we can derive the maximum port speed from the mac_capabilities instead. The reason for making this change is in preparation for phylink to be used by DSA for CPU ports. This omission has come back to bite us with the conversion of DSA drivers to phylink_pcs, since phylink_pcs won't get used unless phylink is being used. Particularly with this driver, it is very common for DT descriptions to omit the fixed-link details which means "use maximum speed". It will eventually be necessary to hoist the selection of "max speed" into the DSA layer (trivial) and also have a way for the DSA driver to tell the DSA layer which interface it should be using for these ports. ==================== Link: https://lore.kernel.org/r/YrGQBssOvQBZiDS4@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 3c783b83bd0f52f3f4e017ed1598c646e083e7a2 Author: Russell King Date: Tue Jun 21 10:37:40 2022 +0100 net: dsa: mv88e6xxx: get rid of SPEED_MAX setting Currently, all the device specific speed setting functions convert SPEED_MAX to the actual speed of the port. Rather than having each of the mv88e6xxx chip specifics handling SPEED_MAX, derive it from the mac_capabilities instead. This is only needed for CPU and DSA ports, so move the logic up into mv88e6xxx_setup_port() - which allows us to kill off all users of SPEED_MAX throughout the driver. Signed-off-by: Russell King Signed-off-by: Jakub Kicinski drivers/net/dsa/mv88e6xxx/chip.c | 39 +++++++++++++++++++++++++++++---------- drivers/net/dsa/mv88e6xxx/chip.h | 3 +-- drivers/net/dsa/mv88e6xxx/port.c | 21 --------------------- 3 files changed, 30 insertions(+), 33 deletions(-) commit aa64bc1990b2bf1623986fbe79663ed0e6efc623 Author: Russell King (Oracle) Date: Tue Jun 21 10:37:35 2022 +0100 net: dsa: mv88e6xxx: remove mv88e6065 dead code Remove mv88e6065_port_set_speed_duplex() - this is never called, and thus is completely redundant. Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski drivers/net/dsa/mv88e6xxx/port.c | 15 --------------- drivers/net/dsa/mv88e6xxx/port.h | 2 -- 2 files changed, 17 deletions(-) commit a784101f77b1bef4b40f4ad68af3f54fcfa5321b Author: Alexey Kardashevskiy Date: Wed Jun 22 15:52:35 2022 +1000 KVM: PPC: Book3s: Fix warning about xics_rm_h_xirr_x This fixes "no previous prototype": arch/powerpc/kvm/book3s_hv_rm_xics.c:482:15: warning: no previous prototype for 'xics_rm_h_xirr_x' [-Wmissing-prototypes] Reported by the kernel test robot. Fixes: b22af9041927 ("KVM: PPC: Book3s: Remove real mode interrupt controller hcalls handlers") Signed-off-by: Alexey Kardashevskiy Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220622055235.1139204-1-aik@ozlabs.ru arch/powerpc/kvm/book3s_xics.h | 1 + 1 file changed, 1 insertion(+) commit 805ada63ba0567b15d10d40419bcc5e6f0b461e6 Merge: 0936de1e96d6 6434cf630086 Author: Dave Airlie Date: Fri Jun 24 12:07:36 2022 +1000 Merge tag 'drm-intel-next-2022-06-22' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - General driver clean-up (Jani, Ville, Julia) - DG2 enabling (Anusha, Vandita) - Fix sparse warnings (Imre, Jani) - DMC MMIO range checks (Anusha) - Audio related fixes (Jani) - Runtime PM fixes (Anshuman) - PSR fixes (Jouni, Jose) - Media freq factor and per-gt enhancements (Ashutosh, Dale) - DSI fixes for ICL+ (Jani) - Disable DMC flip queue handlers (Imre) - ADL_P voltage swing updates (Balasubramani) - Use more the VBT for panel information (Ville, Animesh) - Fix on Type-C ports with TBT mode (Vivek) - Improve fastset and allow seamless M/N changes (Ville) - Accept more fixed modes with VRR/DMRRS panels (Ville) - FBC fix (Jose) - Remove noise logs (Luca) - Disable connector polling for a headless SKU (Jouni) - Sanitize display underrun reporting (Ville) - ADL-S display PLL w/a (Ville) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YrNzP2WTf3WBvpvd@intel.com commit 0936de1e96d6cbcd3d0ede8f31b1c3e6570dad2e Merge: 0a2af0bd6e48 009a3a52791f Author: Dave Airlie Date: Fri Jun 24 10:29:53 2022 +1000 Merge tag 'drm-misc-next-2022-06-23' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.20: UAPI Changes: * media: Add various RGB666 and RGB888 format constants Cross-subsystem Changes: * media: Documentation Core Changes: * aperture: Fix segfault during hot-unplug * dp: Support waiting for HDP signal, plus driver updates; Port-validation fixes * fbcon: Improve scrolling performance; Sanitize input * Clean up Driver Changes: * amdgpu: Cleanups * bridge: Add support for i.MX8qxp and i.MX8qm; anx7625: DPI fixes; tc358775: Fix clock settings; ti-sn65dsi83: Allow GPIO to sleep * panel: Set orientation from panel, plus driver updates * Several small cleanups Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YrQeAAVvQ6jxu2dl@linux-uq9g commit fe39dc98fb241a67f4a5a5eb6f842a05c4e316b8 Author: Zhang Jiaming Date: Thu Jun 23 17:37:16 2022 +0800 gfs2: Fix spelling mistake in comment Change 'accomodate' to 'accommodate'. Signed-off-by: Zhang Jiaming Signed-off-by: Andreas Gruenbacher fs/gfs2/lock_dlm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aefffba672881f7fdb29ec15fcbcab55f3c0592d Author: Herve Codina Date: Fri May 20 11:41:52 2022 +0200 PCI: rcar-gen2: Add RZ/N1 SOC family compatible string Add Renesas RZ/N1 SOC family support to the Renesas R-Car Gen2 PCI bridge driver. The Renesas RZ/N1 SOC internal PCI bridge is compatible with the one in the R-Car Gen2 family. Tested with the RZ/N1D (R9A06G032) SOC. Link: https://lore.kernel.org/r/20220520094155.313784-4-herve.codina@bootlin.com Signed-off-by: Herve Codina Signed-off-by: Bjorn Helgaas Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring drivers/pci/controller/pci-rcar-gen2.c | 1 + 1 file changed, 1 insertion(+) commit 2ed9ae81e8f4a5c96818403452a28f7947de3d34 Author: Herve Codina Date: Fri May 20 11:41:51 2022 +0200 dt-bindings: PCI: renesas,pci-rcar-gen2: Add device tree support for R9A06G032 Add internal PCI bridge support for the R9A06G032 SOC. The Renesas RZ/N1D (R9A06G032) internal PCI bridge is compatible with the one present in the R-Car Gen2 family, but compared to R-Car Gen2, it needs three clocks instead of one. The 'resets' property is not required for the RZ/N1 family. Link: https://lore.kernel.org/r/20220520094155.313784-3-herve.codina@bootlin.com Signed-off-by: Herve Codina Signed-off-by: Bjorn Helgaas Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring .../bindings/pci/renesas,pci-rcar-gen2.yaml | 50 +++++++++++++++++----- 1 file changed, 40 insertions(+), 10 deletions(-) commit 409ae431b9c23fc2752982a80c9b8b55ab5903c7 Author: Herve Codina Date: Fri May 20 11:41:50 2022 +0200 dt-bindings: PCI: pci-rcar-gen2: Convert bindings to json-schema Convert Renesas PCI bridge bindings documentation to json-schema. Link: https://lore.kernel.org/r/20220520094155.313784-2-herve.codina@bootlin.com Signed-off-by: Herve Codina Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Geert Uytterhoeven .../devicetree/bindings/pci/pci-rcar-gen2.txt | 84 ----------- .../bindings/pci/renesas,pci-rcar-gen2.yaml | 156 +++++++++++++++++++++ 2 files changed, 156 insertions(+), 84 deletions(-) commit 366e817e83e4d795fe3f6e7379bfe79d49cac89b Author: Bas Nieuwenhuizen Date: Mon Jun 20 02:37:20 2022 +0200 Revert "drm/amd/display: ignore modifiers when checking for format support" This reverts commit 5089c4a8ebea3c3ad9eedf038dad7098ebc06131. This breaks validation and enumeration of display capable modifiers. The early return true means the rest of the validation code never gets executed, and we need that to enumerate the right modifiers to userspace for the format. The modifiers that are in the initial list generated for a plane are the superset for all formats and we need the proper checks in this function to filter some of them out for formats with which they're invalid to be used. Furthermore, the safety contract here is that we validate the incoming modifiers to ensure the kernel can handle them and the display hardware can handle them. This includes e.g. rejecting multi-plane images with DCC. Note that the legacy swizzle mechanism allows encoding more swizzles, and at fb creation time we convert them to modifiers and reject those with no corresponding modifiers. If we are seeing rejections I'm happy to help define modifiers that correspond to those, or if absolutely needed implement a fallback path to allow for less strict validation of the legacy path. However, I'd like to revert this patch, since any of these is going to be a significant rework of the patch, and I'd rather not the regression gets into a release or forgotten in the meantime. Reviewed-by: Aurabindo Pillai Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 53 +++-------------------- 1 file changed, 7 insertions(+), 46 deletions(-) commit 7fc494f9cf8ec7497d4aab26a3b19deceab0fe31 Author: Colin Ian King Date: Thu Jun 23 13:19:04 2022 -0400 drm/amdgpu/display: Fix spelling mistake "supporing" -> "supporting" There is a spelling mistake in a dml_print message. Fix it. Reviewed-by: Harry Wentland Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5027605aedec363b3209c17d382efe5e29211594 Author: Colin Ian King Date: Thu Jun 23 13:14:18 2022 -0400 drm/amdkfd: Fix spelling mistake "mechanim" -> "mechanism" There is a spelling mistake in a pr_debug message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f64e6e0b6afe047cb0d34a5369597fe0d188e94d Author: Alex Deucher Date: Mon Jun 20 18:29:39 2022 -0400 Revert "drm/amdgpu/display: set vblank_disable_immediate for DC" This reverts commit 92020e81ddbeac351ea4a19bcf01743f32b9c800. This causes stuttering and timeouts with DMCUB for some users so revert it until we understand why and safely enable it to save power. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1887 Acked-by: Harry Wentland Signed-off-by: Alex Deucher Cc: Nicholas Kazlauskas drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) commit 50ef0cacc43c5b01d5d1d65f08af33513b07e2c7 Author: Jiang Jian Date: Thu Jun 23 18:14:48 2022 +0800 drm/amdgpu: drop unexpected word 'for' in comments there is an unexpected word 'for' in the comments that need to be dropped file - drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c line - 245 * position and also advance the position for for Vega10 changed to: * position and also advance the position for Vega10 Signed-off-by: Jiang Jian Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10a9035c36d00586ad4bdb838f8800be951db8d2 Author: Nathan Chancellor Date: Thu Jun 23 08:30:01 2022 -0700 drm/amd/display: Fix indentation in dcn32_get_vco_frequency_from_reg() Clang warns: drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c:549:4: warning: misleading indentation; statement is not part of the previous 'else' [-Wmisleading-indentation] pll_req = dc_fixpt_from_int(pll_req_reg & clk_mgr->clk_mgr_mask->FbMult_int); ^ drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c:542:3: note: previous statement is here else ^ 1 warning generated. Indent this statement to the left, as it was clearly intended to be called unconditionally, which will fix the warning. Link: https://github.com/ClangBuiltLinux/linux/issues/1655 Fixes: 3e838f7ccf64 ("drm/amd/display: Get VCO frequency from registers") Signed-off-by: Nathan Chancellor Reviewed-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a957995618a8afe3efa2b5746c0a954bbd450882 Author: Graham Sider Date: Thu Apr 28 10:16:16 2022 -0400 drm/amdgpu: Update mes_v11_api_def.h Update MES API to support oversubscription without aggregated doorbell for usermode queues. v2: Change oversubscription_no_aggregated_en to is_kfd_process (align with MES) Signed-off-by: Graham Sider Acked-by: Felix Kuehling Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 1 + drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 ++ drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 ++ drivers/gpu/drm/amd/include/mes_v11_api_def.h | 4 +++- 5 files changed, 9 insertions(+), 1 deletion(-) commit e77a541f5dea0a2ff9d6a40dcda9b284e1e736fe Author: Graham Sider Date: Wed May 11 12:33:35 2022 -0400 drm/amdkfd: Enable GFX11 usermode queue oversubscription Starting with GFX11, MES requires wptr BOs to be GTT allocated/mapped to GART for usermode queues in order to support oversubscription. In the case that work is submitted to an unmapped queue, MES must have a GART wptr address to determine whether the queue should be mapped. This change is accompanied with changes in MES and is applicable for MES_API_VERSION >= 2. v3: - Use amdgpu_vm_bo_lookup_mapping for wptr_bo mapping lookup - Move wptr_bo refcount increment to amdgpu_amdkfd_map_gtt_bo_to_gart - Remove list_del_init from amdgpu_amdkfd_map_gtt_bo_to_gart - Cleanup/fix create_queue wptr_bo error handling v4: - Add MES version shift/mask defines to amdgpu_mes.h - Change version check from MES_VERSION to MES_API_VERSION - Add check in kfd_ioctl_create_queue before wptr bo pin/GART map to ensure bo is a single page. Signed-off-by: Graham Sider Acked-by: Alex Deucher Acked-by: Christian König Reviewed-by: Philip Yang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 48 ++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 7 ++++ drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 45 +++++++++++++++++++- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 9 +++- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c | 2 + drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 3 ++ .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 17 +++++--- 8 files changed, 125 insertions(+), 8 deletions(-) commit ff83e6e7ab042e1f6f4345be1837d08c41b0a49d Author: Graham Sider Date: Fri Jun 3 09:53:54 2022 -0400 drm/amdgpu: Fetch MES scheduler/KIQ versions Store MES scheduler and MES KIQ version numbers in amdgpu_mes for GFX11. Signed-off-by: Graham Sider Acked-by: Felix Kuehling Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 3 +++ drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 12 ++++++++++++ 2 files changed, 15 insertions(+) commit 508f748b03949143ccda614b900e3f7d842251e5 Author: Ruili Ji Date: Wed Jun 22 14:20:22 2022 +0800 drm/amdgpu: To flush tlb for MMHUB of RAVEN series amdgpu: [mmhub0] no-retry page fault (src_id:0 ring:40 vmid:8 pasid:32769, for process test_basic pid 3305 thread test_basic pid 3305) amdgpu: in page starting at address 0x00007ff990003000 from IH client 0x12 (VMC) amdgpu: VM_L2_PROTECTION_FAULT_STATUS:0x00840051 amdgpu: Faulty UTCL2 client ID: MP1 (0x0) amdgpu: MORE_FAULTS: 0x1 amdgpu: WALKER_ERROR: 0x0 amdgpu: PERMISSION_FAULTS: 0x5 amdgpu: MAPPING_ERROR: 0x0 amdgpu: RW: 0x1 When memory is allocated by kfd, no one triggers the tlb flush for MMHUB0. There is page fault from MMHUB0. v2:fix indentation v3:change subject and fix indentation Signed-off-by: Ruili Ji Reviewed-by: Philip Yang Reviewed-by: Aaron Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fa3dab48defe1ae2f5a5fb56df5f5931fb3e45c8 Author: Jiang Jian Date: Wed Jun 22 22:22:37 2022 +0800 gpu/drm/radeon: Fix typo in comments Remove the repeated word 'and' from comments Signed-off-by: Jiang Jian Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/r300_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d313f09f31490cec9d5251b59adeb6542c944cc Author: Carlos Llamas Date: Tue Jun 21 20:39:21 2022 +0000 drm/fourcc: fix integer type usage in uapi header Kernel uapi headers are supposed to use __[us]{8,16,32,64} types defined by as opposed to 'uint32_t' and similar. See [1] for the relevant discussion about this topic. In this particular case, the usage of 'uint64_t' escaped headers_check as these macros are not being called here. However, the following program triggers a compilation error: #include int main() { unsigned long x = AMD_FMT_MOD_CLEAR(RB); return 0; } gcc error: drm.c:5:27: error: ‘uint64_t’ undeclared (first use in this function) 5 | unsigned long x = AMD_FMT_MOD_CLEAR(RB); | ^~~~~~~~~~~~~~~~~ This patch changes AMD_FMT_MOD_{SET,CLEAR} macros to use the correct integer types, which fixes the above issue. [1] https://lkml.org/lkml/2019/6/5/18 Fixes: 8ba16d599374 ("drm/fourcc: Add AMD DRM modifiers.") Signed-off-by: Carlos Llamas Reviewed-by: Simon Ser Signed-off-by: Alex Deucher include/uapi/drm/drm_fourcc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 421f5410965dbc65b7bf7d2b2323203920ad370c Author: José Roberto de Souza Date: Fri Jun 17 12:06:29 2022 -0700 drm/i915: Call i915_gem_suspend() only after display is turned off When the last reference of a gem object is removed it is added to the mm.free_list list and mm.free_work is queued to actually free the object. So gem objects that had their last reference removed by display during drm_atomic_helper_shutdown() are added to mm.free_list what could cause that mm.free_work is executed at the same time as intel_runtime_pm_driver_release() causing raw-wakerefs warning. So here only calling i915_gem_suspend() and by consequence i915_gem_drain_freed_objects() only after display is down making sure all display gem objecs are freed when intel_runtime_pm_driver_release() is executed. Signed-off-by: José Roberto de Souza Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220617190629.355356-1-jose.souza@intel.com drivers/gpu/drm/i915/i915_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d6b03171f9fc8127b3a7adfd4e74ee5d4dae5d14 Author: Frank Li Date: Tue May 24 10:21:58 2022 -0500 dmaengine: dw-edma: Add support for chip-specific flags Add a "flags" field to the "struct dw_edma_chip" so that the controller drivers can pass flags that are relevant to the platform. DW_EDMA_CHIP_LOCAL - Used by the controller drivers accessing eDMA locally. Local eDMA access doesn't require generating MSIs to the remote. Link: https://lore.kernel.org/r/20220524152159.2370739-8-Frank.Li@nxp.com Tested-by: Serge Semin Tested-by: Manivannan Sadhasivam Signed-off-by: Frank Li Signed-off-by: Bjorn Helgaas Reviewed-by: Serge Semin Reviewed-by: Manivannan Sadhasivam Acked-By: Vinod Koul drivers/dma/dw-edma/dw-edma-v0-core.c | 9 ++++++--- include/linux/dma/edma.h | 10 ++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) commit c1e33979171da63cf47e56243ccb8ba82363c7d3 Author: Serge Semin Date: Tue May 24 10:21:57 2022 -0500 dmaengine: dw-edma: Fix eDMA Rd/Wr-channels and DMA-direction semantics In accordance with [1, 2] the DW eDMA controller has been created to be part of the DW PCIe Root Port and DW PCIe End-point controllers and to offload the transferring of large blocks of data between application and remote PCIe domains leaving the system CPU free for other tasks. In the first case (eDMA being part of DW PCIe Root Port) the eDMA controller is always accessible via the CPU DBI interface and never over the PCIe wire. The latter case is more complex. Depending on the DW PCIe End-Point IP-core synthesize parameters it's possible to have the eDMA registers accessible not only from the application CPU side, but also via mapping the eDMA CSRs over a dedicated endpoint BAR. So based on the specifics denoted above the eDMA driver is supposed to support two types of the DMA controller setups: 1) eDMA embedded into the DW PCIe Root Port/End-point and accessible over the local CPU from the application side. 2) eDMA embedded into the DW PCIe End-point and accessible via the PCIe wire with MWr/MRd TLPs generated by the CPU PCIe host controller. Since the CPU memory resides different sides in these cases the semantics of the MEM_TO_DEV and DEV_TO_MEM operations is flipped with respect to the Tx and Rx DMA channels. So MEM_TO_DEV/DEV_TO_MEM corresponds to the Tx/Rx channels in setup 1) and to the Rx/Tx channels in case of setup 2). The DW eDMA driver has supported the case 2) since e63d79d1ffcd ("dmaengine: Add Synopsys eDMA IP core driver") in the framework of the drivers/dma/dw-edma/dw-edma-pcie.c driver. The case 1) support was added later by bd96f1b2f43a ("dmaengine: dw-edma: support local dma device transfer semantics"). Afterwards the driver was supposed to cover the both possible eDMA setups, but the latter commit turned out to be not fully correct. The problem was that the commit together with the new functionality support also changed the channel direction semantics so the eDMA Read-channel (corresponding to the DMA_DEV_TO_MEM direction for case 1) now uses the sgl/cyclic base addresses as the Source addresses of the DMA transfers and dma_slave_config.dst_addr as the Destination address of the DMA transfers. Similarly the eDMA Write-channel (corresponding to the DMA_MEM_TO_DEV direction for case 1) now uses dma_slave_config.src_addr as a source address of the DMA transfers and sgl/cyclic base address as the Destination address of the DMA transfers. This contradicts the logic of the DMA-interface, which implies that DEV side is supposed to belong to the PCIe device memory and MEM - to the CPU/Application memory. Indeed it seems irrational to have the SG-list defined in the PCIe bus space, while expecting a contiguous buffer allocated in the CPU memory. Moreover the passed SG-list and cyclic DMA buffers are supposed to be mapped in a way so to be seen by the DW eDMA Application (CPU) interface. So in order to have the correct DW eDMA interface we need to invert the eDMA Rd/Wr-channels and DMA-slave directions semantics by selecting the src/dst addresses based on the DMA transfer direction instead of using the channel direction capability. [1] DesignWare Cores PCI Express Controller Databook - DWC PCIe Root Port, v.5.40a, March 2019, p.1092 [2] DesignWare Cores PCI Express Controller Databook - DWC PCIe Endpoint, v.5.40a, March 2019, p.1189 Co-developed-by: Manivannan Sadhasivam Fixes: bd96f1b2f43a ("dmaengine: dw-edma: support local dma device transfer semantics") Link: https://lore.kernel.org/r/20220524152159.2370739-7-Frank.Li@nxp.com Tested-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Frank Li Signed-off-by: Bjorn Helgaas Acked-By: Vinod Koul drivers/dma/dw-edma/dw-edma-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 794a0f7b6f5ccbcb3bbb504b90d980bf2240d110 Author: Serge Semin Date: Tue May 24 10:21:56 2022 -0500 dmaengine: dw-edma: Drop dma_slave_config.direction field usage The dma_slave_config.direction field usage in the DW eDMA driver was introduced by bd96f1b2f43a ("dmaengine: dw-edma: support local dma device transfer semantics"). Mainly the change introduced there was correct (indeed DEV_TO_MEM means using RD-channel and MEM_TO_DEV - WR-channel for the case of having eDMA accessed locally from CPU/Application side), but providing an additional MEM_TO_MEM/DEV_TO_DEV-based semantics was quite redundant if not to say potentially harmful (when it comes to removing the denoted field). First of all since the dma_slave_config.direction field has been marked as obsolete (see [1] and the struct dma_slave_config [2]) and will be discarded in future, using it especially in a non-standard way is discouraged. Secondly in accordance with the commit denoted above the default dw_edma_device_transfer() semantics has been changed despite what its message said. So claiming that the method was left backward compatible was wrong. Fix the problems denoted above and simplify the dw_edma_device_transfer() method by dropping the parsing of the DMA-channel direction field. Instead of having that implicit dma_slave_config.direction field semantic, use the recently added DW_EDMA_CHIP_LOCAL flag to distinguish between the local and remote DW eDMA setups thus preserving support for both cases. Add an ASCII figure to clarify the situation. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/driver-api/dmaengine/provider.rst?id=v5.18#n478 [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/dmaengine.h?id=v5.18#n389 [bhelgaas: convert references to specific URLs] Co-developed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20220524152159.2370739-6-Frank.Li@nxp.com Tested-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Frank Li Signed-off-by: Bjorn Helgaas Acked-By: Vinod Koul drivers/dma/dw-edma/dw-edma-core.c | 49 ++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 15 deletions(-) commit 6951ee96c649f6e963b98c11b2b1a92697d3c45c Author: Frank Li Date: Tue May 24 10:21:55 2022 -0500 dmaengine: dw-edma: Rename wr(rd)_ch_cnt to ll_wr(rd)_cnt in struct dw_edma_chip The struct dw_edma contains wr(rd)_ch_cnt fields. The EDMA driver gets write(read) channel number from register, then saves these into dw_edma. The wr(rd)_ch_cnt in dw_edma_chip actually means how many link list memory are available in ll_region_wr(rd)[EDMA_MAX_WR_CH]. Rename it to ll_wr(rd)_cnt to indicate actual usage. Link: https://lore.kernel.org/r/20220524152159.2370739-5-Frank.Li@nxp.com Tested-by: Serge Semin Tested-by: Manivannan Sadhasivam Signed-off-by: Frank Li Signed-off-by: Bjorn Helgaas Reviewed-by: Serge Semin Reviewed-by: Manivannan Sadhasivam Acked-By: Vinod Koul drivers/dma/dw-edma/dw-edma-core.c | 4 ++-- drivers/dma/dw-edma/dw-edma-pcie.c | 12 ++++++------ include/linux/dma/edma.h | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) commit e51b3048116a6e10b96bd5298cbcb209b6d729cd Author: Frank Li Date: Tue May 24 10:21:54 2022 -0500 dmaengine: dw-edma: Change rg_region to reg_base in struct dw_edma_chip struct dw_edma_region rg_region included virtual address, physical address and size information. But only the virtual address is used by EDMA driver. Change it to void __iomem *reg_base to clean up code. Link: https://lore.kernel.org/r/20220524152159.2370739-4-Frank.Li@nxp.com Tested-by: Serge Semin Tested-by: Manivannan Sadhasivam Signed-off-by: Frank Li Signed-off-by: Bjorn Helgaas Reviewed-by: Serge Semin Reviewed-by: Manivannan Sadhasivam Acked-By: Vinod Koul drivers/dma/dw-edma/dw-edma-pcie.c | 6 +++--- drivers/dma/dw-edma/dw-edma-v0-core.c | 2 +- drivers/dma/dw-edma/dw-edma-v0-debugfs.c | 2 +- include/linux/dma/edma.h | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) commit 203184571388a988283543f0fd7da1a0da7c3f91 Author: Frank Li Date: Tue May 24 10:21:53 2022 -0500 dmaengine: dw-edma: Detach the private data and chip info structures "struct dw_edma_chip" contains an internal structure "struct dw_edma" that is used by the eDMA core internally and should not be touched by the eDMA controller drivers themselves. But currently, the eDMA controller drivers like "dw-edma-pci" allocate and populate this internal structure before passing it on to the eDMA core. The eDMA core further populates the structure and uses it. This is wrong! Hence, move all the "struct dw_edma" specifics from controller drivers to the eDMA core. Link: https://lore.kernel.org/r/20220524152159.2370739-3-Frank.Li@nxp.com Tested-by: Serge Semin Tested-by: Manivannan Sadhasivam Signed-off-by: Frank Li Signed-off-by: Bjorn Helgaas Reviewed-by: Serge Semin Reviewed-by: Manivannan Sadhasivam Acked-By: Vinod Koul drivers/dma/dw-edma/dw-edma-core.c | 90 +++++++++++++++++--------------- drivers/dma/dw-edma/dw-edma-core.h | 31 ++--------- drivers/dma/dw-edma/dw-edma-pcie.c | 82 ++++++++++++----------------- drivers/dma/dw-edma/dw-edma-v0-core.c | 32 ++++++------ drivers/dma/dw-edma/dw-edma-v0-core.h | 4 +- drivers/dma/dw-edma/dw-edma-v0-debugfs.c | 18 +++---- drivers/dma/dw-edma/dw-edma-v0-debugfs.h | 8 +-- include/linux/dma/edma.h | 48 ++++++++++++++++- 8 files changed, 164 insertions(+), 149 deletions(-) commit 19d7ca051d303622c423b4cb39e6bde5d177328b Author: Alexander Aring Date: Wed Jun 22 14:45:06 2022 -0400 fs: dlm: add pid to debug log This patch adds the pid information which requested the lock operation to the debug log output. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/plock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 93817be8b62c7fa1f1bdc3e8c037a73a60026be9 Merge: ccb9bc1dfa44 399bd66e219e Author: Jakub Kicinski Date: Thu Jun 23 12:33:24 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net No conflicts. Signed-off-by: Jakub Kicinski commit 976a062434739dffa1f5eec77f254109247a5a00 Author: Alexander Aring Date: Wed Jun 22 14:45:04 2022 -0400 fs: dlm: plock use list_first_entry This patch will use the list helper list_first_entry() instead of using list_entry() to get the first element of a list. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/plock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a22f18bddd824e96db839ccda75ff7e035e938ca Author: Rafael J. Wysocki Date: Mon Jun 13 20:36:06 2022 +0200 ACPI / MMC: PM: Unify fixing up device power Introduce acpi_device_fix_up_power_extended() for fixing up power of a device having an ACPI companion in a manner that takes the device's children into account and make the MMC code use it in two places instead of walking the list of the device ACPI companion's children directly. This will help to eliminate the children list head from struct acpi_device as it is redundant and it is used in questionable ways in some places (in particular, locking is needed for walking the list pointed to it safely, but it is often missing). Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko Acked-by: Adrian Hunter Acked-by: Ulf Hansson drivers/acpi/device_pm.c | 22 ++++++++++++++++++++++ drivers/mmc/host/sdhci-acpi.c | 7 ++----- drivers/mmc/host/sdhci-pci-core.c | 11 +++-------- include/acpi/acpi_bus.h | 1 + 4 files changed, 28 insertions(+), 13 deletions(-) commit 9089d1a41aab0298aaed04f24572035db351db7b Author: Rafael J. Wysocki Date: Mon Jun 13 20:35:26 2022 +0200 soundwire: Use acpi_dev_for_each_child() Instead of walking the list of children of an ACPI device directly, use acpi_dev_for_each_child() to carry out an action for all of the given ACPI device's children. This will help to eliminate the children list head from struct acpi_device as it is redundant and it is used in questionable ways in some places (in particular, locking is needed for walking the list pointed to it safely, but it is often missing). Signed-off-by: Rafael J. Wysocki Reviewed-by: Pierre-Louis Bossart Tested-by: Pierre-Louis Bossart Acked-By: Vinod Koul drivers/soundwire/slave.c | 117 ++++++++++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 50 deletions(-) commit 6dc7a0baf1a70b7d22662d38481824c14ddd80c5 Author: Jörn-Thorben Hinz Date: Tue Jun 21 09:01:16 2022 +0200 selftests/bpf: Fix rare segfault in sock_fields prog test test_sock_fields__detach() got called with a null pointer here when one of the CHECKs or ASSERTs up to the test_sock_fields__open_and_load() call resulted in a jump to the "done" label. A skeletons *__detach() is not safe to call with a null pointer, though. This led to a segfault. Go the easy route and only call test_sock_fields__destroy() which is null-pointer safe and includes detaching. Came across this while looking[1] to introduce the usage of bpf_tcp_helpers.h (included in progs/test_sock_fields.c) together with vmlinux.h. [1] https://lore.kernel.org/bpf/629bc069dd807d7ac646f836e9dca28bbc1108e2.camel@mailbox.tu-berlin.de/ Fixes: 8f50f16ff39d ("selftests/bpf: Extend verifier and bpf_sock tests for dst_port loads") Signed-off-by: Jörn-Thorben Hinz Signed-off-by: Andrii Nakryiko Reviewed-by: Jakub Sitnicki Reviewed-by: Martin KaFai Lau Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20220621070116.307221-1-jthinz@mailbox.tu-berlin.de tools/testing/selftests/bpf/prog_tests/sock_fields.c | 1 - 1 file changed, 1 deletion(-) commit 3a46b352a3e6721db02f60827bdb974d48825bfe Author: Kristina Martsenko Date: Wed Jun 22 12:54:24 2022 +0100 arm64: trap implementation defined functionality in userspace The Arm v8.8 extension adds a new control FEAT_TIDCP1 that allows the kernel to disable all implementation-defined system registers and instructions in userspace. This can improve robustness against covert channels between processes, for example in cases where the firmware or hardware didn't disable that functionality by default. The kernel does not currently support any implementation-defined features, as there are no hwcaps for any such features, so disable all imp-def features unconditionally. Any use of imp-def instructions will result in a SIGILL being delivered to the process (same as for undefined instructions). Signed-off-by: Kristina Martsenko Link: https://lore.kernel.org/r/20220622115424.683520-1-kristina.martsenko@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 4 ++++ arch/arm64/kernel/cpufeature.c | 18 ++++++++++++++++++ arch/arm64/tools/cpucaps | 1 + 3 files changed, 23 insertions(+) commit 5bed6a93920dea85b1828cbe3aa3e333ed663ea3 Author: Andre Mueller Date: Tue Jun 21 10:16:51 2022 +0200 Documentation/arm64: update memory layout table. Commit b89ddf4cca43("arm64/bpf: Remove 128MB limit for BPF JIT programs") removes the bpf jit region from the memory layout of the Aarch64 architecture. However, it forgets to update the documentation accordingly. - Remove the bpf jit region. - Fix the Start and End addresses of the modules region. - Fix the Start address of the vmalloc region. Signed-off-by: Andre Mueller Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20220621081651.61755-1-am@emlix.com Signed-off-by: Will Deacon Documentation/arm64/memory.rst | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 4d09caec2fab16977cf7c3f384a7daf76dc1f3fb Author: Kefeng Wang Date: Mon May 23 19:31:26 2022 +0800 arm64: kcsan: Support detecting more missing memory barriers As "kcsan: Support detecting a subset of missing memory barriers"[1] introduced KCSAN_STRICT/KCSAN_WEAK_MEMORY which make kcsan detects more missing memory barrier, but arm64 don't have KCSAN instrumentation for barriers, so the new selftest test_barrier() and test cases for memory barrier instrumentation in kcsan_test module will fail, even panic on selftest. Let's prefix all barriers with __ on arm64, as asm-generic/barriers.h defined the final instrumented version of these barriers, which will fix the above issues. Note, barrier instrumentation that can be disabled via __no_kcsan with appropriate compiler-support (and not just with objtool help), see commit bd3d5bd1a0ad ("kcsan: Support WEAK_MEMORY with Clang where no objtool support exists"), it adds disable_sanitizer_instrumentation to __no_kcsan attribute which will remove all sanitizer instrumentation fully (with Clang 14.0). Meanwhile, GCC does the same thing with no_sanitize. [1] https://lore.kernel.org/linux-mm/20211130114433.2580590-1-elver@google.com/ Acked-by: Marco Elver Signed-off-by: Kefeng Wang Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20220523113126.171714-3-wangkefeng.wang@huawei.com Signed-off-by: Will Deacon arch/arm64/include/asm/barrier.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ed59dfd9509d172e4920994ed9cbebf93b0050cc Author: Kefeng Wang Date: Mon May 23 19:31:25 2022 +0800 asm-generic: Add memory barrier dma_mb() The memory barrier dma_mb() is introduced by commit a76a37777f2c ("iommu/arm-smmu-v3: Ensure queue is read after updating prod pointer"), which is used to ensure that prior (both reads and writes) accesses to memory by a CPU are ordered w.r.t. a subsequent MMIO write. Reviewed-by: Arnd Bergmann # for asm-generic Signed-off-by: Kefeng Wang Reviewed-by: Marco Elver Link: https://lore.kernel.org/r/20220523113126.171714-2-wangkefeng.wang@huawei.com Signed-off-by: Will Deacon Documentation/memory-barriers.txt | 11 ++++++----- include/asm-generic/barrier.h | 8 ++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) commit 9f6a503d5238f444b13aaeaf8b88032dbcc5b707 Author: Jisheng Zhang Date: Mon Jun 20 01:06:57 2022 +0800 arm64: boot: add zstd support Support build the zstd compressed Image.zst. Similar as other compressed formats, the Image.zst is not self-decompressing and the bootloader still needs to handle decompression before launching the kernel image. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20220619170657.2657-1-jszhang@kernel.org Signed-off-by: Will Deacon arch/arm64/boot/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 506506cad3947b942425b119ffa2b06715d5d804 Author: Alexandru Elisei Date: Fri Jun 17 12:13:32 2022 +0100 arm64: cpufeature: Allow different PMU versions in ID_DFR0_EL1 Commit b20d1ba3cf4b ("arm64: cpufeature: allow for version discrepancy in PMU implementations") made it possible to run Linux on a machine with PMUs with different versions without tainting the kernel. The patch relaxed the restriction only for the ID_AA64DFR0_EL1.PMUVer field, and missed doing the same for ID_DFR0_EL1.PerfMon , which also reports the PMU version, but for the AArch32 state. For example, with Linux running on two clusters with different PMU versions, the kernel is tainted when bringing up secondaries with the following message: [ 0.097027] smp: Bringing up secondary CPUs ... [..] [ 0.142805] Detected PIPT I-cache on CPU4 [ 0.142805] CPU features: SANITY CHECK: Unexpected variation in SYS_ID_DFR0_EL1. Boot CPU: 0x00000004011088, CPU4: 0x00000005011088 [ 0.143555] CPU features: Unsupported CPU feature variation detected. [ 0.143702] GICv3: CPU4: found redistributor 10000 region 0:0x000000002f180000 [ 0.143702] GICv3: CPU4: using allocated LPI pending table @0x00000008800d0000 [ 0.144888] CPU4: Booted secondary processor 0x0000010000 [0x410fd0f0] The boot CPU implements FEAT_PMUv3p1 (ID_DFR0_EL1.PerfMon, bits 27:24, is 0b0100), but CPU4, part of the other cluster, implements FEAT_PMUv3p4 (ID_DFR0_EL1.PerfMon = 0b0101). Treat the PerfMon field as FTR_NONSTRICT and FTR_EXACT to pass the sanity check and to match how PMUVer is treated for the 64bit ID register. Fixes: b20d1ba3cf4b ("arm64: cpufeature: allow for version discrepancy in PMU implementations") Signed-off-by: Alexandru Elisei Link: https://lore.kernel.org/r/20220617111332.203061-1-alexandru.elisei@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47546a1912fc4a037035746998c3cfa740beed70 Author: Ard Biesheuvel Date: Thu Jun 9 19:43:20 2022 +0200 arm64: mm: install KPTI nG mappings with MMU enabled In cases where we unmap the kernel while running in user space, we rely on ASIDs to distinguish the minimal trampoline from the full kernel mapping, and this means we must use non-global attributes for those mappings, to ensure they are scoped by ASID and will not hit in the TLB inadvertently. We only do this when needed, as this is generally more costly in terms of TLB pressure, and so we boot without these non-global attributes, and apply them to all existing kernel mappings once all CPUs are up and we know whether or not the non-global attributes are needed. At this point, we cannot simply unmap and remap the entire address space, so we have to update all existing block and page descriptors in place. Currently, we go through a lot of trouble to perform these updates with the MMU and caches off, to avoid violating break before make (BBM) rules imposed by the architecture. Since we make changes to page tables that are not covered by the ID map, we gain access to those descriptors by disabling translations altogether. This means that the stores to memory are issued with device attributes, and require extra care in terms of coherency, which is costly. We also rely on the ID map to access a shared flag, which requires the ID map to be executable and writable at the same time, which is another thing we'd prefer to avoid. So let's switch to an approach where we replace the kernel mapping with a minimal mapping of a few pages that can be used for a minimal, ad-hoc fixmap that we can use to map each page table in turn as we traverse the hierarchy. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220609174320.4035379-3-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 54 ++++++++++++++++++++++++++-- arch/arm64/mm/mmu.c | 7 ++++ arch/arm64/mm/proc.S | 81 ++++++++++++++++++++++++++++-------------- 3 files changed, 113 insertions(+), 29 deletions(-) commit c7eff738cf45ef149060939f3be65816eea461c8 Author: Ard Biesheuvel Date: Thu Jun 9 19:43:19 2022 +0200 arm64: kpti-ng: simplify page table traversal logic Simplify the KPTI G-to-nG asm helper code by: - pulling the 'table bit' test into the get/put macros so we can combine them and incorporate the entire loop; - moving the 'table bit' test after the update of bit #11 so we no longer need separate next_xxx and skip_xxx labels; - redefining the pmd/pud register aliases and the next_pmd/next_pud labels instead of branching to them if the number of configured page table levels is less than 3 or 4, respectively. No functional change intended, except for the fact that we now descend into a next level table after setting bit #11 on its descriptor but this should make no difference in practice. While at it, switch to .L prefixed local labels so they don't clutter up the symbol tables, kallsyms, etc, and clean up the indentation for legibility. Signed-off-by: Ard Biesheuvel Reviewed-by: Mark Rutland Tested-by: Mark Rutland Link: https://lore.kernel.org/r/20220609174320.4035379-2-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/mm/proc.S | 100 +++++++++++++++++++-------------------------------- 1 file changed, 36 insertions(+), 64 deletions(-) commit d69d564964872f52c4a8f0db172d842eaf3b84cf Author: Mark Brown Date: Tue Jun 7 14:28:57 2022 +0100 arm64/sme: Expose SMIDR through sysfs We currently expose MIDR and REVID to userspace through sysfs to enable it to make decisions based on the specific implementation. Since SME supports implementations where streaming mode is provided by a separate hardware unit called a SMCU it provides a similar ID register SMIDR. Expose it to userspace via sysfs when the system supports SME along with the other ID registers. Since we disable the SME priority mapping feature if it is supported by hardware we currently mask out the SMPS bit which reports that it is supported. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220607132857.1358361-1-broonie@kernel.org Signed-off-by: Will Deacon Documentation/ABI/testing/sysfs-devices-system-cpu | 3 ++- arch/arm64/include/asm/cpu.h | 1 + arch/arm64/kernel/cpuinfo.c | 23 +++++++++++++++++++++- 3 files changed, 25 insertions(+), 2 deletions(-) commit bb7a4257892717caf82fe6da45b259b35f73445c Merge: 9676feccacdb f14a3f644a1c Author: Alexei Starovoitov Date: Thu Jun 23 09:49:58 2022 -0700 Merge branch 'Align BPF TCP CCs implementing cong_control() with non-BPF CCs' Jörn-Thorben Hinz says: ==================== This series corrects some inconveniences for a BPF TCP CC that implements and uses tcp_congestion_ops.cong_control(). Until now, such a CC did not have all necessary write access to struct sock and unnecessarily needed to implement cong_avoid(). v4: - Remove braces around single statements after if - Don’t check pointer passed to bpf_link__destroy() v3: - Add a selftest writing sk_pacing_* - Add a selftest with incomplete tcp_congestion_ops - Add a selftest with unsupported get_info() - Remove an unused variable - Reword a comment about reg() in bpf_struct_ops_map_update_elem() v2: - Drop redundant check for required functions and just rely on tcp_register_congestion_control() (Martin KaFai Lau) ==================== Reviewed-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit f14a3f644a1c5a2e2dbe6073f51793119a12e6ce Author: Jörn-Thorben Hinz Date: Wed Jun 22 21:12:27 2022 +0200 selftests/bpf: Test a BPF CC implementing the unsupported get_info() Test whether a TCP CC implemented in BPF providing get_info() is rejected correctly. get_info() is unsupported in a BPF CC. The check for required functions in a BPF CC has moved, this test ensures unsupported functions are still rejected correctly. Signed-off-by: Jörn-Thorben Hinz Reviewed-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20220622191227.898118-6-jthinz@mailbox.tu-berlin.de Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c | 20 ++++++++++++++++++++ .../selftests/bpf/progs/tcp_ca_unsupp_cong_op.c | 21 +++++++++++++++++++++ 2 files changed, 41 insertions(+) commit 0735627d78caa56f219dc14608ce0bdbd045e07e Author: Jörn-Thorben Hinz Date: Wed Jun 22 21:12:26 2022 +0200 selftests/bpf: Test an incomplete BPF CC Test whether a TCP CC implemented in BPF providing neither cong_avoid() nor cong_control() is correctly rejected. This check solely depends on tcp_register_congestion_control() now, which is invoked during bpf_map__attach_struct_ops(). Signed-off-by: Jörn-Thorben Hinz Link: https://lore.kernel.org/r/20220622191227.898118-5-jthinz@mailbox.tu-berlin.de Signed-off-by: Alexei Starovoitov .../testing/selftests/bpf/prog_tests/bpf_tcp_ca.c | 22 ++++++++++++++ .../selftests/bpf/progs/tcp_ca_incompl_cong_ops.c | 35 ++++++++++++++++++++++ 2 files changed, 57 insertions(+) commit 6e945d57cc9f6e27893d57a419434a2859ba6f3f Author: Jörn-Thorben Hinz Date: Wed Jun 22 21:12:25 2022 +0200 selftests/bpf: Test a BPF CC writing sk_pacing_* Test whether a TCP CC implemented in BPF is allowed to write sk_pacing_rate and sk_pacing_status in struct sock. This is needed when cong_control() is implemented and used. Signed-off-by: Jörn-Thorben Hinz Link: https://lore.kernel.org/r/20220622191227.898118-4-jthinz@mailbox.tu-berlin.de Signed-off-by: Alexei Starovoitov .../testing/selftests/bpf/prog_tests/bpf_tcp_ca.c | 19 +++++++ .../selftests/bpf/progs/tcp_ca_write_sk_pacing.c | 60 ++++++++++++++++++++++ 2 files changed, 79 insertions(+) commit 9f0265e921dee14096943ee11f793fa076aa7a72 Author: Jörn-Thorben Hinz Date: Wed Jun 22 21:12:24 2022 +0200 bpf: Require only one of cong_avoid() and cong_control() from a TCP CC Remove the check for required and optional functions in a struct tcp_congestion_ops from bpf_tcp_ca.c. Rely on tcp_register_congestion_control() to reject a BPF CC that does not implement all required functions, as it will do for a non-BPF CC. When a CC implements tcp_congestion_ops.cong_control(), the alternate cong_avoid() is not in use in the TCP stack. Previously, a BPF CC was still forced to implement cong_avoid() as a no-op since it was non-optional in bpf_tcp_ca.c. Signed-off-by: Jörn-Thorben Hinz Reviewed-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20220622191227.898118-3-jthinz@mailbox.tu-berlin.de Signed-off-by: Alexei Starovoitov kernel/bpf/bpf_struct_ops.c | 7 +++---- net/ipv4/bpf_tcp_ca.c | 33 --------------------------------- 2 files changed, 3 insertions(+), 37 deletions(-) commit 41c95dd6a604dc3f5fae55c99c138cc8e7fec76e Author: Jörn-Thorben Hinz Date: Wed Jun 22 21:12:23 2022 +0200 bpf: Allow a TCP CC to write sk_pacing_rate and sk_pacing_status A CC that implements tcp_congestion_ops.cong_control() should be able to control sk_pacing_rate and set sk_pacing_status, since tcp_update_pacing_rate() is never called in this case. A built-in CC or one from a kernel module is already able to write to both struct sock members. For a BPF program, write access has not been allowed, yet. Signed-off-by: Jörn-Thorben Hinz Reviewed-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20220622191227.898118-2-jthinz@mailbox.tu-berlin.de Signed-off-by: Alexei Starovoitov net/ipv4/bpf_tcp_ca.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2c09d1443b9b8b6e25bfb2acf51ad442cf9b314e Author: Dan Carpenter Date: Thu Jun 23 16:40:13 2022 +0300 pstore/zone: cleanup "rcnt" type The info->read() function returns ssize_t. That means that info->read() either returns either negative error codes or a positive number representing the bytes read. The "rcnt" variable should be declared as ssize_t as well. Most places do this correctly but psz_kmsg_recover_meta() needed to be fixed. This code casts the "rcnt" to int. That is unnecessary when "rcnt" is already signed. It's also slightly wrong because if info->read() returned a very high (more than INT_MAX) number of bytes then this might treat that as an error. This bug cannot happen in real life, so it doesn't affect run time, but static checkers correctly complain that it is wrong. fs/pstore/zone.c:366 psz_kmsg_recover_data() warn: casting 'rcnt' truncates high bits Signed-off-by: Dan Carpenter Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/YrRtPSFHDVJzV6d+@kili fs/pstore/zone.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2d304afaedc4e8f2587188cfa5b78fc0dbd81840 Author: Chen Zhongjin Date: Tue May 31 09:53:50 2022 +0800 arm64: compat: Move kuser32.S to .rodata section Kuser code should be inside .rodata. Now code in kuser32.S is inside .text section and never executed. Move it to .rodata. Signed-off-by: Chen Zhongjin Link: https://lore.kernel.org/r/20220531015350.233827-1-chenzhongjin@huawei.com Signed-off-by: Will Deacon arch/arm64/kernel/kuser32.S | 1 + 1 file changed, 1 insertion(+) commit 446297b28a21244e4045026c4599d1b14a67e2ce Author: Andrey Konovalov Date: Mon May 23 16:51:52 2022 +0200 arm64: stacktrace: use non-atomic __set_bit Use the non-atomic version of set_bit() in arch/arm64/kernel/stacktrace.c, as there is no concurrent accesses to frame->prev_type. This speeds up stack trace collection and improves the boot time of Generic KASAN by 2-5%. Suggested-by: Mark Rutland Acked-by: Mark Rutland Signed-off-by: Andrey Konovalov Link: https://lore.kernel.org/r/23dfa36d1cc91e4a1059945b7834eac22fb9854d.1653317461.git.andreyknvl@google.com Signed-off-by: Will Deacon arch/arm64/kernel/stacktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 802b91118d11227b527153849ea761b280691373 Author: Andrey Konovalov Date: Mon May 23 16:51:51 2022 +0200 arm64: kasan: do not instrument stacktrace.c Disable KASAN instrumentation of arch/arm64/kernel/stacktrace.c. This speeds up Generic KASAN by 5-20%. As a side-effect, KASAN is now unable to detect bugs in the stack trace collection code. This is taken as an acceptable downside. Also replace READ_ONCE_NOCHECK() with READ_ONCE() in stacktrace.c. As the file is now not instrumented, there is no need to use the NOCHECK version of READ_ONCE(). Suggested-by: Mark Rutland Acked-by: Mark Rutland Signed-off-by: Andrey Konovalov Link: https://lore.kernel.org/r/c4c944a2a905e949760fbeb29258185087171708.1653317461.git.andreyknvl@google.com Signed-off-by: Will Deacon arch/arm64/kernel/Makefile | 5 +++++ arch/arm64/kernel/stacktrace.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 52f28b7bac75da9b8508f17438c9a8d83ab48e5d Author: Adrian Hunter Date: Fri Jun 10 14:33:16 2022 +0300 perf script: Add some missing event dumps When the -D option is used, the details of thread-map, cpu-map and event-update events are not currently dumped. Add prints so that they are. Example: # perf record --kcore sleep 0.1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.021 MB perf.data (7 samples) ] # perf script -D | grep 'THREAD\|CPU' 0 0x4950 [0x28]: PERF_RECORD_THREAD_MAP nr: 1 thread: 35116 0 0x4978 [0x20]: PERF_RECORD_CPU_MAP: 0-7 # perf script -D | grep -A4 'UPDATE' 0 0x4920 [0x30]: PERF_RECORD_EVENT_UPDATE ... id: 147 ... 0-7 Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20220610113316.6682-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 6 ++++++ tools/perf/util/header.c | 3 +++ 2 files changed, 9 insertions(+) commit 3812d2987733c5a00e103be4e23d63ec9342043a Author: Adrian Hunter Date: Fri Jun 10 14:33:15 2022 +0300 perf record: Add finished init event In preparation for recording sideband events in a virtual machine guest so that they can be injected into a host perf.data file. This is needed to enable injecting events after the initial synthesized user events (that have an all zero id sample) but before regular events. Committer notes: Add entry about PERF_RECORD_FINISHED_INIT to tools/perf/Documentation/perf.data-file-format.txt. Committer testing: Before: # perf report -D | grep FINISHED 0 0x5910 [0x8]: PERF_RECORD_FINISHED_ROUND FINISHED_ROUND events: 1 ( 0.5%) # After: # perf record -- sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.020 MB perf.data (7 samples) ] # perf report -D | grep FINISHED 0 0x5068 [0x8]: PERF_RECORD_FINISHED_INIT: unhandled! 0 0x5390 [0x8]: PERF_RECORD_FINISHED_ROUND FINISHED_ROUND events: 1 ( 0.5%) FINISHED_INIT events: 1 ( 0.5%) # Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20220610113316.6682-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/perf/include/perf/event.h | 1 + tools/perf/Documentation/perf.data-file-format.txt | 10 ++++++++ tools/perf/builtin-inject.c | 1 + tools/perf/builtin-record.c | 27 ++++++++++++++++++++++ tools/perf/util/event.c | 1 + tools/perf/util/session.c | 4 ++++ tools/perf/util/tool.h | 3 ++- 7 files changed, 46 insertions(+), 1 deletion(-) commit 61110883a02090cb5fd1f890978e238cc99f0164 Author: Adrian Hunter Date: Wed Jun 15 08:25:11 2022 +0300 perf record: Add new option to sample identifier In preparation for recording sideband events in a virtual machine guest so that they can be injected into a host perf.data file. Add an option to always include sample type PERF_SAMPLE_IDENTIFIER. Committer testing: # perf record sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.020 MB perf.data (7 samples) ] # perf evlist -v cycles: size: 128, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|PERIOD, read_format: ID, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1 # # # perf record --sample-identifier sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.022 MB perf.data (7 samples) ] # perf evlist -v cycles: size: 128, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|PERIOD|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1 # Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20220615052511.4441-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 5 +++++ tools/perf/builtin-record.c | 2 ++ tools/perf/util/record.c | 2 +- tools/perf/util/record.h | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) commit 6b080312fc821658a479e74bdb0c3f7d9ac5838f Author: Adrian Hunter Date: Fri Jun 10 14:33:13 2022 +0300 perf record: Always record id index In preparation for recording sideband events in a virtual machine guest so that they can be injected into a host perf.data file. Adjust the logic so that if there are IDs then the id index is recorded. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20220610113316.6682-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 12 +++++------- tools/perf/util/synthetic-events.c | 7 +++++-- 2 files changed, 10 insertions(+), 9 deletions(-) commit f42c0ce573df79d1b8bd169008c994dcdd43585a Author: Adrian Hunter Date: Fri Jun 10 14:33:12 2022 +0300 perf record: Always get text_poke events with --kcore option kcore provides a copy of the running kernel including any modified code. A trace that benefits from that also benefits from text_poke events, so enable them. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20220610113316.6682-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 3 +++ 1 file changed, 3 insertions(+) commit 924a221581db557f6c61b93fe5f25893a74bc3ea Author: Shawn M. Chapla Date: Thu May 26 16:14:47 2022 -0400 perf data convert: Prefer sampled CPU when exporting JSON When CPU has been explicitly sampled (via --sample-cpu), prefer this sampled value over the thread CPU value when exporting to JSON. Signed-off-by: Shawn M. Chapla Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220526201506.2028281-1-schapla@codeweavers.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/data-convert-json.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e24c75f02a81d6ddac0072cbd7a03e799c19d558 Author: Linus Walleij Date: Sat Jun 11 22:51:38 2022 +0200 ARM: dts: ux500: Fix Gavini accelerometer mounting matrix This was fixed wrong so fix it. Now verified by using iio-sensor-proxy monitor-sensor test program. Link: https://lore.kernel.org/r/20220611205138.491513-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij arch/arm/boot/dts/ste-ux500-samsung-gavini.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0b2152e428ab91533a02888ff24e52e788dc4637 Author: Linus Walleij Date: Sat Jun 11 22:42:49 2022 +0200 ARM: dts: ux500: Fix Codina accelerometer mounting matrix This was fixed wrong so fix it again. Now verified by using iio-sensor-proxy monitor-sensor test program. Link: https://lore.kernel.org/r/20220611204249.472250-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij arch/arm/boot/dts/ste-ux500-samsung-codina.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 013fda41c03e6bcb3dc416669187b609e9e5fdbc Author: Linus Walleij Date: Thu Jun 9 10:35:16 2022 +0200 ARM: dts: ux500: Fix Janice accelerometer mounting matrix This was fixed wrong so fix it again. Now verified by using iio-sensor-proxy monitor-sensor test program. Link: https://lore.kernel.org/r/20220609083516.329281-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij arch/arm/boot/dts/ste-ux500-samsung-janice.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 40308f9642a85c30fa7cc5ab8672020cb96ecb66 Author: Eddie James Date: Thu Jun 23 09:05:47 2022 -0500 spi: fsi: Increase timeout and ensure status is checked Only timeout after at least one iteration of checking the status registers. In addition, increase the transfer timeout to 1 second. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20220623140547.71762-1-eajames@linux.ibm.com Signed-off-by: Mark Brown drivers/spi/spi-fsi.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 8171c93bac1bf9e98269b2efb19ef4e6c4e55ed7 Author: ChiYuan Huang Date: Thu Jun 23 19:56:26 2022 +0800 regulator: mt6370: Add mt6370 DisplayBias and VibLDO support Add mt6370 DisplayBias and VibLDO support. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/20220623115631.22209-10-peterwu.pub@gmail.com Signed-off-by: Mark Brown drivers/regulator/Kconfig | 8 + drivers/regulator/Makefile | 1 + drivers/regulator/mt6370-regulator.c | 388 +++++++++++++++++++++++++++++++++++ 3 files changed, 397 insertions(+) commit 9ba86a4746351424cb9aa8fdd2dd5f9f899df461 Author: Julia Lawall Date: Sat May 21 13:11:17 2022 +0200 perf/arm-cci: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-67-Julia.Lawall@inria.fr Signed-off-by: Will Deacon drivers/perf/arm-cci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a336916b067c40e06448cb50533b9e2ed561e5d3 Author: keliu Date: Thu May 19 08:01:27 2022 +0000 drivers/perf:Directly use ida_alloc()/free() Use ida_alloc()/ida_free() instead of deprecated ida_simple_get()/ida_simple_remove() . Signed-off-by: keliu Link: https://lore.kernel.org/r/20220519080127.147030-2-liuke94@huawei.com Signed-off-by: Will Deacon drivers/perf/arm-ccn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 49785a77780ce78cae4478fedad2fd4d03067761 Author: keliu Date: Thu May 19 08:01:26 2022 +0000 drivers/perf: Directly use ida_alloc()/free() Use ida_alloc()/ida_free() instead of deprecated ida_simple_get()/ida_simple_remove() . Signed-off-by: keliu Link: https://lore.kernel.org/r/20220519080127.147030-1-liuke94@huawei.com Signed-off-by: Will Deacon drivers/perf/fsl_imx8_ddr_perf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 373269ae6f90bbbe945abde4c0811a991a27901a Author: Akeem G Abodunrin Date: Wed Jun 22 15:11:04 2022 +0100 drm/i915/selftests: Increase timeout for live_parallel_switch With GuC submission, it takes a little bit longer switching contexts among all available engines simultaneously, when running live_parallel_switch subtest. Increase the timeout. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5885 Signed-off-by: Akeem G Abodunrin Cc: Matthew Brost Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220622141104.334432-1-matthew.auld@intel.com drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3381da254fab37ba08c4b7c4f19b4ee28b1a27ec Author: Mark Rutland Date: Wed May 11 14:17:33 2022 +0100 arm64: select TRACE_IRQFLAGS_NMI_SUPPORT Due to an oversight, on arm64 lockdep IRQ state tracking doesn't work as intended in NMI context. This demonstrably results in bogus warnings from lockdep, and in theory could mask a variety of issues. On arm64, we've consistently tracked IRQ flag state for NMIs (and saved/restored the state of the interrupted context) since commit: f0cd5ac1e4c53cb6 ("arm64: entry: fix NMI {user, kernel}->kernel transitions") That commit fixed most lockdep issues with NMI by virtue of the save/restore of the lockdep state of the interrupted context. However, for lockdep IRQ state tracking to consistently take effect in NMI context it has been necessary to select TRACE_IRQFLAGS_NMI_SUPPORT since commit: ed00495333ccc80f ("locking/lockdep: Fix TRACE_IRQFLAGS vs. NMIs") As arm64 does not select TRACE_IRQFLAGS_NMI_SUPPORT, this means that the lockdep state can be stale in NMI context, and some uses of that state can consume stale data. When an NMI is taken arm64 entry code will call arm64_enter_nmi(). This will enter NMI context via __nmi_enter() before calling lockdep_hardirqs_off() to inform lockdep that IRQs have been masked. Where TRACE_IRQFLAGS_NMI_SUPPORT is not selected, lockdep_hardirqs_off() will not update lockdep state if called in NMI context. Thus if IRQs were enabled in the original context, lockdep will continue to believe that IRQs are enabled despite the call to lockdep_hardirqs_off(). However, the lockdep_assert_*() checks do take effect in NMI context, and will consume the stale lockdep state. If an NMI is taken from a context which had IRQs enabled, and during the handling of the NMI something calls lockdep_assert_irqs_disabled(), this will result in a spurious warning based upon the stale lockdep state. This can be seen when using perf with GICv3 pseudo-NMIs. Within the perf NMI handler we may attempt a uaccess to record the userspace callchain, and is this faults the el1_abort() call in the nested context will call exit_to_kernel_mode() when returning, which has a lockdep_assert_irqs_disabled() assertion: | # ./perf record -a -g sh | ------------[ cut here ]------------ | WARNING: CPU: 0 PID: 164 at arch/arm64/kernel/entry-common.c:73 exit_to_kernel_mode+0x118/0x1ac | Modules linked in: | CPU: 0 PID: 164 Comm: perf Not tainted 5.18.0-rc5 #1 | Hardware name: linux,dummy-virt (DT) | pstate: 004003c5 (nzcv DAIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) | pc : exit_to_kernel_mode+0x118/0x1ac | lr : el1_abort+0x80/0xbc | sp : ffff8000080039f0 | pmr_save: 000000f0 | x29: ffff8000080039f0 x28: ffff6831054e4980 x27: ffff683103adb400 | x26: 0000000000000000 x25: 0000000000000001 x24: 0000000000000001 | x23: 00000000804000c5 x22: 00000000000000c0 x21: 0000000000000001 | x20: ffffbd51e635ec44 x19: ffff800008003a60 x18: 0000000000000000 | x17: ffffaadf98d23000 x16: ffff800008004000 x15: 0000ffffd14f25c0 | x14: 0000000000000000 x13: 00000000000018eb x12: 0000000000000040 | x11: 000000000000001e x10: 000000002b820020 x9 : 0000000100110000 | x8 : 000000000045cac0 x7 : 0000ffffd14f25c0 x6 : ffffbd51e639b000 | x5 : 00000000000003e5 x4 : ffffbd51e58543b0 x3 : 0000000000000001 | x2 : ffffaadf98d23000 x1 : ffff6831054e4980 x0 : 0000000100110000 | Call trace: | exit_to_kernel_mode+0x118/0x1ac | el1_abort+0x80/0xbc | el1h_64_sync_handler+0xa4/0xd0 | el1h_64_sync+0x74/0x78 | __arch_copy_from_user+0xa4/0x230 | get_perf_callchain+0x134/0x1e4 | perf_callchain+0x7c/0xa0 | perf_prepare_sample+0x414/0x660 | perf_event_output_forward+0x80/0x180 | __perf_event_overflow+0x70/0x13c | perf_event_overflow+0x1c/0x30 | armv8pmu_handle_irq+0xe8/0x160 | armpmu_dispatch_irq+0x2c/0x70 | handle_percpu_devid_fasteoi_nmi+0x7c/0xbc | generic_handle_domain_nmi+0x3c/0x60 | gic_handle_irq+0x1dc/0x310 | call_on_irq_stack+0x2c/0x54 | do_interrupt_handler+0x80/0x94 | el1_interrupt+0xb0/0xe4 | el1h_64_irq_handler+0x18/0x24 | el1h_64_irq+0x74/0x78 | lockdep_hardirqs_off+0x50/0x120 | trace_hardirqs_off+0x38/0x214 | _raw_spin_lock_irq+0x98/0xa0 | pipe_read+0x1f8/0x404 | new_sync_read+0x140/0x150 | vfs_read+0x190/0x1dc | ksys_read+0xdc/0xfc | __arm64_sys_read+0x20/0x30 | invoke_syscall+0x48/0x114 | el0_svc_common.constprop.0+0x158/0x17c | do_el0_svc+0x28/0x90 | el0_svc+0x60/0x150 | el0t_64_sync_handler+0xa4/0x130 | el0t_64_sync+0x19c/0x1a0 | irq event stamp: 483 | hardirqs last enabled at (483): [] _raw_spin_unlock_irqrestore+0xa4/0xb0 | hardirqs last disabled at (482): [] _raw_spin_lock_irqsave+0xb0/0xb4 | softirqs last enabled at (468): [] put_cpu_fpsimd_context+0x28/0x70 | softirqs last disabled at (466): [] get_cpu_fpsimd_context+0x0/0x5c | ---[ end trace 0000000000000000 ]--- Note that as lockdep_assert_irqs_disabled() uses WARN_ON_ONCE(), and this uses a BRK, the warning is logged with the real PSTATE at the time of the warning, which clearly has DAIF.I set, meaning IRQs (and pseudo-NMIs) were definitely masked and the warning is spurious. Fix this by selecting TRACE_IRQFLAGS_NMI_SUPPORT such that the existing entry tracking takes effect, as we had originally intended when the arm64 entry code was fixed for transitions to/from NMI. Arguably the lockdep_assert_*() functions should have the same NMI checks as the rest of the code to prevent spurious warnings when TRACE_IRQFLAGS_NMI_SUPPORT is not selected, but the real fix for any architecture is to explicitly handle the transitions to/from NMI in the entry code. Fixes: f0cd5ac1e4c5 ("arm64: entry: fix NMI {user, kernel}->kernel transitions") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Ingo Molnar Cc: Peter Zijlstra (Intel) Cc: Thomas Gleixner Cc: Will Deacon Link: https://lore.kernel.org/r/20220511131733.4074499-3-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 4510bffb4d0246cdcc1f14c7367c026b807a862d Author: Mark Rutland Date: Wed May 11 14:17:32 2022 +0100 arch: make TRACE_IRQFLAGS_NMI_SUPPORT generic On most architectures, IRQ flag tracing is disabled in NMI context, and architectures need to define and select TRACE_IRQFLAGS_NMI_SUPPORT in order to enable this. Commit: 859d069ee1ddd878 ("lockdep: Prepare for NMI IRQ state tracking") Permitted IRQ flag tracing in NMI context, allowing lockdep to work in NMI context where an architecture had suitable entry logic. At the time, most architectures did not have such suitable entry logic, and this broke lockdep on such architectures. Thus, this was partially disabled in commit: ed00495333ccc80f ("locking/lockdep: Fix TRACE_IRQFLAGS vs. NMIs") ... with architectures needing to select TRACE_IRQFLAGS_NMI_SUPPORT to enable IRQ flag tracing in NMI context. Currently TRACE_IRQFLAGS_NMI_SUPPORT is defined under arch/x86/Kconfig.debug. Move it to arch/Kconfig so architectures can select it without having to provide their own definition. Since the regular TRACE_IRQFLAGS_SUPPORT is selected by arch/x86/Kconfig, the select of TRACE_IRQFLAGS_NMI_SUPPORT is moved there too. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Ingo Molnar Cc: Peter Zijlstra (Intel) Cc: Thomas Gleixner Cc: Will Deacon Link: https://lore.kernel.org/r/20220511131733.4074499-2-mark.rutland@arm.com Signed-off-by: Will Deacon arch/Kconfig | 3 +++ arch/x86/Kconfig | 1 + arch/x86/Kconfig.debug | 3 --- 3 files changed, 4 insertions(+), 3 deletions(-) commit 9d4775b332e16a37413d189060553ef9b4378679 Author: Joey Gouly Date: Tue May 10 10:58:34 2022 +0100 arm64: vdso32: enable orphan handling for VDSO Like vmlinux, enable orphan-handling for the compat VDSO32. This can catch subtle errors that might arise from unexpected sections being included. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Cc: Masahiro Yamada Cc: Vincenzo Frascino Cc: Kees Cook Reviewed-by: Kees Cook Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20220510095834.32394-5-joey.gouly@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/vdso32/Makefile | 1 + 1 file changed, 1 insertion(+) commit eeec7223b6977b28dc0ae657a6f56dfef9eb868a Author: Joey Gouly Date: Tue May 10 10:58:33 2022 +0100 arm64: vdso32: put ELF related sections in the linker script Use macros from vmlinux.lds.h to explicitly name sections that are included in the compat VDSO32 output. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Cc: Masahiro Yamada Cc: Vincenzo Frascino Cc: Kees Cook Reviewed-by: Kees Cook Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20220510095834.32394-4-joey.gouly@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/vdso32/vdso.lds.S | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit e0ab20b20a1bb53d61feedb1fd6c23cbbed11d18 Author: Joey Gouly Date: Tue May 10 10:58:32 2022 +0100 arm64: vdso: enable orphan handling for VDSO Like vmlinux, enable orphan-handling for the VDSO. This can catch subtle errors that might arise from unexpected sections being included. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Cc: Masahiro Yamada Cc: Vincenzo Frascino Cc: Kees Cook Reviewed-by: Kees Cook Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20220510095834.32394-3-joey.gouly@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/vdso/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit b87d34ca60cedd6ad769da69c39c4329647fc6a9 Author: Joey Gouly Date: Tue May 10 10:58:31 2022 +0100 arm64: vdso: put ELF related sections in the linker script Use macros from vmlinux.lds.h to explicitly name sections that are included in the VDSO output. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Cc: Masahiro Yamada Cc: Vincenzo Frascino Cc: Kees Cook Reviewed-by: Kees Cook Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20220510095834.32394-2-joey.gouly@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/vdso/vdso.lds.S | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 876271118aa41097d035c84f99648746b4a125f3 Author: YueHaibing Date: Sat Jun 11 12:16:12 2022 +0800 drm/display: Fix build error without CONFIG_OF While CONFIG_OF is n but COMPILE_TEST is y, we got this: WARNING: unmet direct dependencies detected for DRM_DP_AUX_BUS Depends on [n]: HAS_IOMEM [=y] && DRM [=y] && OF [=n] Selected by [y]: - DRM_MSM [=y] && HAS_IOMEM [=y] && DRM [=y] && (ARCH_QCOM || SOC_IMX5 || COMPILE_TEST [=y]) && COMMON_CLK [=y] && IOMMU_SUPPORT [=y] && (QCOM_OCMEM [=n] || QCOM_OCMEM [=n]=n) && (QCOM_LLCC [=y] || QCOM_LLCC [=y]=n) && (QCOM_COMMAND_DB [=n] || QCOM_COMMAND_DB [=n]=n) Make DRM_DP_AUX_BUS depends on OF || COMPILE_TEST to fix this warning. Fixes: 1e0f66420b13 ("drm/display: Introduce a DRM display-helper module") Signed-off-by: YueHaibing Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Acked-by: Linus Walleij Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20220611041612.1976-1-yuehaibing@huawei.com drivers/gpu/drm/display/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 471f80db9ef178f84a6f5d70ffdd7990970031f6 Author: Michael Walle Date: Sun May 29 20:13:29 2022 +0200 arm64: cpuidle: remove generic cpuidle support The arm64 support of the generic ARM cpuidle driver was removed. This let us remove all support code for it. Signed-off-by: Michael Walle Reviewed-by: Sudeep Holla Acked-by: Daniel Lezcano Link: https://lore.kernel.org/r/20220529181329.2345722-3-michael@walle.cc Signed-off-by: Will Deacon arch/arm64/include/asm/cpu_ops.h | 9 --------- arch/arm64/include/asm/cpuidle.h | 15 --------------- arch/arm64/kernel/cpuidle.c | 29 ----------------------------- 3 files changed, 53 deletions(-) commit 51280acad8559bd9d2c2e0f98faf08414676478d Author: Michael Walle Date: Sun May 29 20:13:28 2022 +0200 cpuidle: cpuidle-arm: remove arm64 support Since commit 788961462f34 ("ARM: psci: cpuidle: Enable PSCI CPUidle driver") the generic ARM cpuidle driver doesn't probe anymore because arm_cpuidle_init() will always return -EOPNOTSUPP. That is, because the mentioned commit removes the only .cpu_suspend and .cpu_init_idle provider. Signed-off-by: Michael Walle Reviewed-by: Sudeep Holla Acked-by: Daniel Lezcano Link: https://lore.kernel.org/r/20220529181329.2345722-2-michael@walle.cc Signed-off-by: Will Deacon drivers/cpuidle/Kconfig.arm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c0216c0e68f736d20ac02bbaaaf4a216c10e53af Author: ChiYuan Huang Date: Wed Jun 22 18:01:43 2022 +0800 regulator: rt5120: Add PMIC regulator support Add RT5120 PMIC regulator support. It integrates 4 buck convertes, 1 LDO voltage regulator, 1 external enable signal to control the external power source. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1655892104-10874-4-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown drivers/regulator/Kconfig | 10 + drivers/regulator/Makefile | 1 + drivers/regulator/rt5120-regulator.c | 420 +++++++++++++++++++++++++++++++++++ 3 files changed, 431 insertions(+) commit 4d6c2b46d81765e920007f76185a8d1fb5e41ca3 Author: Charles Keepax Date: Thu Jun 23 11:51:20 2022 +0100 ASoC: dapm: Move stereo autodisable check Tidy up the code a little, rather than repeating the check of mc->autodisable move the stereo error check to be under the existing if for mc->autodisable. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623105120.1981154-6-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d5017d1323d45db14d1db3d348779264ffce9fb2 Author: Uwe Kleine-König Date: Wed Jun 22 23:06:29 2022 +0200 ASoC: topology: KUnit: Followup prototype change of snd_soc_unregister_card() snd_soc_unregister_card() was recently converted to return void. Only the first instance was adapted, so convert the remaining ones now to fix building the topology test. Reported-by: kernel test robot Fixes: 1892a991886a ("ASoC: core: Make snd_soc_unregister_card() return void") Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220622210629.286487-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown sound/soc/soc-topology-test.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) commit e7f68863545163ec75b6bc3cc48fe888c28e0ec6 Author: Cezary Rojewski Date: Mon Jun 20 12:14:02 2022 +0200 ASoC: Intel: bdw_rt286: Remove FE DAI ops bdw_rt286_fe_ops is redundant as platform components already limit the number of channels available for the endpoint. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220620101402.2684366-18-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bdw_rt286.c | 25 ------------------------- 1 file changed, 25 deletions(-) commit 8fe4709962d74a19c0c1dfc877ba600101340c62 Author: Cezary Rojewski Date: Mon Jun 20 12:14:00 2022 +0200 ASoC: Intel: bdw_rt286: Improve codec_init() quality Drop redundant 'ret' assignemnt, stop ignoring set_jack() return value and reword local 'component' variable to 'codec' to improve readability. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220620101402.2684366-16-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bdw_rt286.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 423cc2d0e8506a0ce6e3ef1806a561de1076e033 Author: Cezary Rojewski Date: Mon Jun 20 12:13:59 2022 +0200 ASoC: Intel: bdw_rt286: Improve hw_params() debug-ability Print status if setting sysclk fails. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220620101402.2684366-15-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bdw_rt286.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9177203c209d9137dce52c7f0bc28e54960e5a41 Author: Cezary Rojewski Date: Mon Jun 20 12:13:58 2022 +0200 ASoC: Intel: bdw_rt286: Improve probe() function quality Declare local 'dev' and make use of it plus dev_get_platdata() to improve code readability. Relocate few relevant to the function macros for the exact same read too. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220620101402.2684366-14-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bdw_rt286.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 128bb6fb530841348ee4d9b4234b30006c44c803 Author: Cezary Rojewski Date: Mon Jun 20 12:13:57 2022 +0200 ASoC: Intel: bdw_rt286: Update file comments Drop redundant and update valuable comments within the file to increase readability. This patch also revisits module information and kconfig help strings. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220620101402.2684366-13-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/Kconfig | 2 +- sound/soc/intel/boards/bdw_rt286.c | 23 +++++++---------------- 2 files changed, 8 insertions(+), 17 deletions(-) commit 9de833d2dcd43c953f7869f27bffd41896adb425 Author: Cezary Rojewski Date: Mon Jun 20 12:13:56 2022 +0200 ASoC: Intel: bdw_rt286: Update code indentation Make use of 100 character limit and modify indentation so code is easier to read. While at it, sort includes in alphabetical order. While at it, rename local variable 'chan' to 'channels' to match hsw_rt5640 board's equivalent. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220620101402.2684366-12-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bdw_rt286.c | 79 ++++++++++++++------------------------ 1 file changed, 28 insertions(+), 51 deletions(-) commit 86156bcbca08ee32d04ca56c57ff3fce6fc5fc4b Author: Cezary Rojewski Date: Mon Jun 20 12:13:55 2022 +0200 ASoC: Intel: bdw_rt286: Reword driver name Align with other Intel boards naming convention and let the name explicitly state which components are being connected. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220620101402.2684366-11-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bdw_rt286.c | 4 ++-- sound/soc/intel/common/soc-acpi-intel-hsw-bdw-match.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 40b5c9030a87e97c00c84403902481deadd2a57b Author: Cezary Rojewski Date: Mon Jun 20 12:13:54 2022 +0200 ASoC: Intel: bdw_rt286: Reword prefixes of all driver members Replace ambiguous 'broadwell_rt286_' prefixes in favour of 'card_', 'link_' and other similar strings to clearly state which object given member implements behavior for. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220620101402.2684366-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bdw_rt286.c | 102 ++++++++++++++++++------------------- 1 file changed, 51 insertions(+), 51 deletions(-) commit 6d8758f6afd91cced9c6c5571337a5fbc6955bb2 Author: Cezary Rojewski Date: Mon Jun 20 12:13:53 2022 +0200 ASoC: Intel: Rename broadwell source file to bdw_rt286 Rename source file to drop any ambiguity. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220620101402.2684366-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/Makefile | 2 +- sound/soc/intel/boards/{broadwell.c => bdw_rt286.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) commit 6c65908251edc637b53bdeb9e79d918a8d081183 Author: Cezary Rojewski Date: Mon Jun 20 12:13:52 2022 +0200 ASoC: Intel: hsw_rt5640: Improve hw_params() debug-ability Print status if setting sysclk fails. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220620101402.2684366-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/hsw_rt5640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0439f262a9b39734c1440733850969f0342c50c3 Author: Cezary Rojewski Date: Mon Jun 20 12:13:51 2022 +0200 ASoC: Intel: hsw_rt5640: Improve probe() function quality Declare local 'dev' and make use of it plus dev_get_platdata() to improve code readability. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220620101402.2684366-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/hsw_rt5640.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 2c53debbbf04eb40854fa33813514828fa455783 Author: Cezary Rojewski Date: Mon Jun 20 12:13:50 2022 +0200 ASoC: Intel: hsw_rt5640: Update file comments Drop redundant and update valuable comments within the file to increase readability. This patch also revisits module information and kconfig help strings. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220620101402.2684366-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/Kconfig | 2 +- sound/soc/intel/boards/hsw_rt5640.c | 16 ++++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) commit 5b66dde4ada531c1a2417d8daf68004067932a19 Author: Cezary Rojewski Date: Mon Jun 20 12:13:49 2022 +0200 ASoC: Intel: hsw_rt5640: Update code indentation Make use of 100 character limit and modify indentation so code is easier to read. While at it, sort includes in alphabetical order. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220620101402.2684366-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/hsw_rt5640.c | 59 +++++++++++-------------------------- 1 file changed, 18 insertions(+), 41 deletions(-) commit a69615e81709da0ff1f035886e8b3faf6125cd22 Author: Cezary Rojewski Date: Mon Jun 20 12:13:48 2022 +0200 ASoC: Intel: hsw_rt5640: Reword driver name Align with other Intel boards naming convention and let the name explicitly state which components are being connected. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220620101402.2684366-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/hsw_rt5640.c | 4 ++-- sound/soc/intel/common/soc-acpi-intel-hsw-bdw-match.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 675002b6ca9132445e340bd106297d584e44fc9a Author: Cezary Rojewski Date: Mon Jun 20 12:13:47 2022 +0200 ASoC: Intel: hsw_rt5640: Reword prefixes of all driver members Replace ambiguous 'haswell_rt5640_' prefixes in favour of 'card_', 'link_' and other similar strings to clearly state which object given member implements behavior for. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220620101402.2684366-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/hsw_rt5640.c | 46 ++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit 8b99e24de3fae72ff5ef38832b94b1e41059eeed Author: Cezary Rojewski Date: Mon Jun 20 12:13:46 2022 +0200 ASoC: Intel: Rename haswell source file to hsw_rt5640 Rename source file to drop any ambiguity. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220620101402.2684366-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/Makefile | 2 +- sound/soc/intel/boards/{haswell.c => hsw_rt5640.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) commit ccb9bc1dfa444e3541622ccfff135e83d2a569d1 Author: Sixiang Chen Date: Wed Jun 22 10:39:38 2022 +0200 nfp: add 'ethtool --identify' support Add support for ethtool -p|--identify by enabling blinking of the panel LED if supported by the NIC firmware. Signed-off-by: Sixiang Chen Signed-off-by: Simon Horman Acked-by: Jakub Kicinski Link: https://lore.kernel.org/r/20220622083938.291548-1-simon.horman@corigine.com Signed-off-by: Paolo Abeni .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 34 ++++++++++++++++++++++ .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h | 2 ++ .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 30 +++++++++++++++++++ 3 files changed, 66 insertions(+) commit 7ac20b3a6a6bf1181a6f9d76c4d36b2395ae8922 Author: Hans de Goede Date: Mon Jun 20 11:46:27 2022 +0200 drm/nouveau/Kconfig: Drop duplicate "select ACPI_VIDEO" Before this change nouveau's Kconfig section had 2 "select ACPI_VIDEO" statements: select ACPI_VIDEO if ACPI && X86 && BACKLIGHT_CLASS_DEVICE && INPUT select ACPI_VIDEO if ACPI && X86 Drop the one with the extra conditions, if the conditions for that one are true then the second statement will always select ACPI_VIDEO already. Signed-off-by: Hans de Goede Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220620094627.9730-1-hdegoede@redhat.com drivers/gpu/drm/nouveau/Kconfig | 1 - 1 file changed, 1 deletion(-) commit e0a9f1fe206a66c3507ff8b7da56f9d1d1dbb9c4 Author: Christian König Date: Fri Jun 17 10:35:25 2022 +0200 dma-buf: deprecate DMABUF_SYSFS_STATS Add a warning that this UAPI wasn't such a good idea and shouldn't be used by anybody. That should give us a better chance to remove it at some point and prevents others from running into the same issues. Signed-off-by: Christian König Reviewed-by: T.J. Mercier Link: https://patchwork.freedesktop.org/patch/msgid/20220617085702.4298-1-christian.koenig@amd.com drivers/dma-buf/Kconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a825d72f74a318b479da7b79ba5e1611ccfc511f Author: Peng Wu Date: Thu Jun 23 07:02:40 2022 +0000 soc: mediatek: fix missing clk_disable_unprepare() on err in svs_resume() Fix the missing clk_disable_unprepare() before return from svs_resume() in the error handling case. Signed-off-by: Peng Wu Reported-by: Hulk Robot Link: https://lore.kernel.org/r/20220623070240.63382-1-wupeng58@huawei.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-svs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c8b35008b4f1104b7d1296ee9508d45f9079e312 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:24 2022 -0700 ARM: dts: xilinx: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-31-krzysztof.kozlowski@linaro.org Signed-off-by: Michal Simek arch/arm/boot/dts/zynq-zc702.dts | 4 ++-- arch/arm/boot/dts/zynq-zturn-common.dtsi | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 228e8a88b1915a2b467c83d8d0976605f1272fae Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:23 2022 -0700 arm64: dts: xilinx: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-30-krzysztof.kozlowski@linaro.org Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts | 2 +- arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts | 2 +- arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts | 2 +- arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts | 2 +- arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 271c1fa01c2307cf74f4656390d6299991119c3e Author: Robert Hancock Date: Wed Jan 19 19:02:43 2022 -0600 arm64: dts: zynqmp: add AMS driver to device tree Add an entry to the ZynqMP device tree to support the AMS device which now has a driver in mainline. Signed-off-by: Robert Hancock Reviewed-by: Michael Tretter Link: https://lore.kernel.org/r/20220120010246.3794962-2-robert.hancock@calian.com Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi | 4 ++++ arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) commit 847e2ed23d4c697c22621adb12df354f46aeef92 Author: Michal Simek Date: Fri Oct 15 11:27:23 2021 +0200 dt-bindings: gpio: zynq: Describe gpio-line-names Number of lines depends on compatible string from 58 to 174. That's why it is checked based on it. Signed-off-by: Michal Simek Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/4b9db94cdd8ca106feee53f76fab2a23721f7d2a.1634290039.git.michal.simek@xilinx.com Signed-off-by: Michal Simek .../devicetree/bindings/gpio/gpio-zynq.yaml | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 3314962bece53417d703a515e30730ad086ccc0a Author: Michal Simek Date: Fri Oct 15 11:17:46 2021 +0200 arm64: zynqmp: Fix comment about number of gpio line names ZynqMP has 174 gpio lines connected to PS controller but DT is describing them from 0 to 173 not 174. Fixes: 7a4c31ee877a ("arm64: zynqmp: Add support for Xilinx Kria SOM board") Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/c3480ba47ac9761903485ebfac127f297053d4da.1634289461.git.michal.simek@xilinx.com Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0aec3958c88f855d5fec78c52a8b5b1fe6d98a52 Author: Michal Simek Date: Fri Oct 15 10:29:57 2021 +0200 dt-bindings: gpio: zynq: Add power-domains Describe optional power-domain property to fix dts_check warnings. The similar change was done by commit 8c0aa567146b ("dt-bindings: gpio: fsl-imx-gpio: Add power-domains"). Signed-off-by: Michal Simek Acked-by: Rob Herring Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/655523d7bf9658eb0b8e49a06c8b79a04052e5d5.1634286595.git.michal.simek@xilinx.com Signed-off-by: Michal Simek Documentation/devicetree/bindings/gpio/gpio-zynq.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 7668048e5c697a9493ffc0e6001c322b2efe90ae Author: Michal Simek Date: Thu Oct 14 12:14:18 2021 +0200 dt-bindings: gpio: zynq: Add missing compatible strings "xlnx,zynqmp-gpio-1.0", "xlnx,versal-gpio-1.0" and "xlnx,pmc-gpio-1.0" compatible strings were not moved to yaml format. But they were in origin text file. Fixes: 45ca16072b70 ("dt-bindings: gpio: zynq: convert bindings to YAML") Signed-off-by: Michal Simek Reviewed-by: Linus Walleij Acked-by: Rob Herring Link: https://lore.kernel.org/r/72c973da5670b5ae81d050c582948894ee4174f8.1634206453.git.michal.simek@xilinx.com Signed-off-by: Michal Simek Documentation/devicetree/bindings/gpio/gpio-zynq.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0d10fe7591178713695d7d8d77284b2fc2e6629f Author: Uros Bizjak Date: Wed May 25 16:54:16 2022 +0200 iommu/amd: Use try_cmpxchg64 in alloc_pte and free_clear_pte Use try_cmpxchg64 instead of cmpxchg64 (*ptr, old, new) != old in alloc_pte and free_clear_pte. cmpxchg returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). Also, remove racy explicit assignment to pteval when cmpxchg fails, this is what try_cmpxchg does implicitly from *pte in an atomic way. Signed-off-by: Uros Bizjak Cc: Joerg Roedel Cc: Suravee Suthikulpanit Cc: Will Deacon Link: https://lore.kernel.org/r/20220525145416.10816-1-ubizjak@gmail.com Signed-off-by: Joerg Roedel drivers/iommu/amd/io_pgtable.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 21fd9be431adb880e55cf7b6b918e0696c0be643 Author: AngeloGioacchino Del Regno Date: Thu Jun 16 13:08:30 2022 +0200 iommu/mediatek: Cleanup pericfg lookup flow Since only the INFRA type IOMMU needs to modify register(s) in the pericfg iospace, it's safe to drop the pericfg_comp_str NULL check; also, directly assign the regmap handle to data->pericfg instead of to the infracfg variable to improve code readability. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20220616110830.26037-6-angelogioacchino.delregno@collabora.com Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 85763435d5b5ed91ce670d87862012a632b54014 Merge: c4fceb46add6 56878d49cc26 Author: Jakub Kicinski Date: Wed Jun 22 19:38:58 2022 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 40GbE Intel Wired LAN Driver Updates 2022-06-21 This series contains updates to i40e driver only. Mateusz adds support for using the speed option in ethtool. Minghao Chi removes unneeded synchronize_irq() calls. Bernard Zhao removes unneeded NULL check. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: intel/i40e: delete if NULL check before dev_kfree_skb i40e: Remove unnecessary synchronize_irq() before free_irq() i40e: Add support for ethtool -s speed ==================== Link: https://lore.kernel.org/r/20220621225930.632741-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 9676feccacdb0571791c88b23e3b7ac4e7c9c457 Author: Jian Shen Date: Wed Jun 22 21:50:02 2022 +0800 test_bpf: fix incorrect netdev features The prototype of .features is netdev_features_t, it should use NETIF_F_LLTX and NETIF_F_HW_VLAN_STAG_TX, not NETIF_F_LLTX_BIT and NETIF_F_HW_VLAN_STAG_TX_BIT. Fixes: cf204a718357 ("bpf, testing: Introduce 'gso_linear_no_head_frag' skb_segment test") Signed-off-by: Jian Shen Acked-by: John Fastabend Link: https://lore.kernel.org/r/20220622135002.8263-1-shenjian15@huawei.com Signed-off-by: Alexei Starovoitov lib/test_bpf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 73087489250def7cdda2dee5ba685bdeae73b8af Author: Dave Marchevsky Date: Mon Jun 20 15:25:54 2022 -0700 selftests/bpf: Add benchmark for local_storage get Add a benchmarks to demonstrate the performance cliff for local_storage get as the number of local_storage maps increases beyond current local_storage implementation's cache size. "sequential get" and "interleaved get" benchmarks are added, both of which do many bpf_task_storage_get calls on sets of task local_storage maps of various counts, while considering a single specific map to be 'important' and counting task_storage_gets to the important map separately in addition to normal 'hits' count of all gets. Goal here is to mimic scenario where a particular program using one map - the important one - is running on a system where many other local_storage maps exist and are accessed often. While "sequential get" benchmark does bpf_task_storage_get for map 0, 1, ..., {9, 99, 999} in order, "interleaved" benchmark interleaves 4 bpf_task_storage_gets for the important map for every 10 map gets. This is meant to highlight performance differences when important map is accessed far more frequently than non-important maps. A "hashmap control" benchmark is also included for easy comparison of standard bpf hashmap lookup vs local_storage get. The benchmark is similar to "sequential get", but creates and uses BPF_MAP_TYPE_HASH instead of local storage. Only one inner map is created - a hashmap meant to hold tid -> data mapping for all tasks. Size of the hashmap is hardcoded to my system's PID_MAX_LIMIT (4,194,304). The number of these keys which are actually fetched as part of the benchmark is configurable. Addition of this benchmark is inspired by conversation with Alexei in a previous patchset's thread [0], which highlighted the need for such a benchmark to motivate and validate improvements to local_storage implementation. My approach in that series focused on improving performance for explicitly-marked 'important' maps and was rejected with feedback to make more generally-applicable improvements while avoiding explicitly marking maps as important. Thus the benchmark reports both general and important-map-focused metrics, so effect of future work on both is clear. Regarding the benchmark results. On a powerful system (Skylake, 20 cores, 256gb ram): Hashmap Control =============== num keys: 10 hashmap (control) sequential get: hits throughput: 20.900 ± 0.334 M ops/s, hits latency: 47.847 ns/op, important_hits throughput: 20.900 ± 0.334 M ops/s num keys: 1000 hashmap (control) sequential get: hits throughput: 13.758 ± 0.219 M ops/s, hits latency: 72.683 ns/op, important_hits throughput: 13.758 ± 0.219 M ops/s num keys: 10000 hashmap (control) sequential get: hits throughput: 6.995 ± 0.034 M ops/s, hits latency: 142.959 ns/op, important_hits throughput: 6.995 ± 0.034 M ops/s num keys: 100000 hashmap (control) sequential get: hits throughput: 4.452 ± 0.371 M ops/s, hits latency: 224.635 ns/op, important_hits throughput: 4.452 ± 0.371 M ops/s num keys: 4194304 hashmap (control) sequential get: hits throughput: 3.043 ± 0.033 M ops/s, hits latency: 328.587 ns/op, important_hits throughput: 3.043 ± 0.033 M ops/s Local Storage ============= num_maps: 1 local_storage cache sequential get: hits throughput: 47.298 ± 0.180 M ops/s, hits latency: 21.142 ns/op, important_hits throughput: 47.298 ± 0.180 M ops/s local_storage cache interleaved get: hits throughput: 55.277 ± 0.888 M ops/s, hits latency: 18.091 ns/op, important_hits throughput: 55.277 ± 0.888 M ops/s num_maps: 10 local_storage cache sequential get: hits throughput: 40.240 ± 0.802 M ops/s, hits latency: 24.851 ns/op, important_hits throughput: 4.024 ± 0.080 M ops/s local_storage cache interleaved get: hits throughput: 48.701 ± 0.722 M ops/s, hits latency: 20.533 ns/op, important_hits throughput: 17.393 ± 0.258 M ops/s num_maps: 16 local_storage cache sequential get: hits throughput: 44.515 ± 0.708 M ops/s, hits latency: 22.464 ns/op, important_hits throughput: 2.782 ± 0.044 M ops/s local_storage cache interleaved get: hits throughput: 49.553 ± 2.260 M ops/s, hits latency: 20.181 ns/op, important_hits throughput: 15.767 ± 0.719 M ops/s num_maps: 17 local_storage cache sequential get: hits throughput: 38.778 ± 0.302 M ops/s, hits latency: 25.788 ns/op, important_hits throughput: 2.284 ± 0.018 M ops/s local_storage cache interleaved get: hits throughput: 43.848 ± 1.023 M ops/s, hits latency: 22.806 ns/op, important_hits throughput: 13.349 ± 0.311 M ops/s num_maps: 24 local_storage cache sequential get: hits throughput: 19.317 ± 0.568 M ops/s, hits latency: 51.769 ns/op, important_hits throughput: 0.806 ± 0.024 M ops/s local_storage cache interleaved get: hits throughput: 24.397 ± 0.272 M ops/s, hits latency: 40.989 ns/op, important_hits throughput: 6.863 ± 0.077 M ops/s num_maps: 32 local_storage cache sequential get: hits throughput: 13.333 ± 0.135 M ops/s, hits latency: 75.000 ns/op, important_hits throughput: 0.417 ± 0.004 M ops/s local_storage cache interleaved get: hits throughput: 16.898 ± 0.383 M ops/s, hits latency: 59.178 ns/op, important_hits throughput: 4.717 ± 0.107 M ops/s num_maps: 100 local_storage cache sequential get: hits throughput: 6.360 ± 0.107 M ops/s, hits latency: 157.233 ns/op, important_hits throughput: 0.064 ± 0.001 M ops/s local_storage cache interleaved get: hits throughput: 7.303 ± 0.362 M ops/s, hits latency: 136.930 ns/op, important_hits throughput: 1.907 ± 0.094 M ops/s num_maps: 1000 local_storage cache sequential get: hits throughput: 0.452 ± 0.010 M ops/s, hits latency: 2214.022 ns/op, important_hits throughput: 0.000 ± 0.000 M ops/s local_storage cache interleaved get: hits throughput: 0.542 ± 0.007 M ops/s, hits latency: 1843.341 ns/op, important_hits throughput: 0.136 ± 0.002 M ops/s Looking at the "sequential get" results, it's clear that as the number of task local_storage maps grows beyond the current cache size (16), there's a significant reduction in hits throughput. Note that current local_storage implementation assigns a cache_idx to maps as they are created. Since "sequential get" is creating maps 0..n in order and then doing bpf_task_storage_get calls in the same order, the benchmark is effectively ensuring that a map will not be in cache when the program tries to access it. For "interleaved get" results, important-map hits throughput is greatly increased as the important map is more likely to be in cache by virtue of being accessed far more frequently. Throughput still reduces as # maps increases, though. To get a sense of the overhead of the benchmark program, I commented out bpf_task_storage_get/bpf_map_lookup_elem in local_storage_bench.c and ran the benchmark on the same host as the 'real' run. Results: Hashmap Control =============== num keys: 10 hashmap (control) sequential get: hits throughput: 54.288 ± 0.655 M ops/s, hits latency: 18.420 ns/op, important_hits throughput: 54.288 ± 0.655 M ops/s num keys: 1000 hashmap (control) sequential get: hits throughput: 52.913 ± 0.519 M ops/s, hits latency: 18.899 ns/op, important_hits throughput: 52.913 ± 0.519 M ops/s num keys: 10000 hashmap (control) sequential get: hits throughput: 53.480 ± 1.235 M ops/s, hits latency: 18.699 ns/op, important_hits throughput: 53.480 ± 1.235 M ops/s num keys: 100000 hashmap (control) sequential get: hits throughput: 54.982 ± 1.902 M ops/s, hits latency: 18.188 ns/op, important_hits throughput: 54.982 ± 1.902 M ops/s num keys: 4194304 hashmap (control) sequential get: hits throughput: 50.858 ± 0.707 M ops/s, hits latency: 19.662 ns/op, important_hits throughput: 50.858 ± 0.707 M ops/s Local Storage ============= num_maps: 1 local_storage cache sequential get: hits throughput: 110.990 ± 4.828 M ops/s, hits latency: 9.010 ns/op, important_hits throughput: 110.990 ± 4.828 M ops/s local_storage cache interleaved get: hits throughput: 161.057 ± 4.090 M ops/s, hits latency: 6.209 ns/op, important_hits throughput: 161.057 ± 4.090 M ops/s num_maps: 10 local_storage cache sequential get: hits throughput: 112.930 ± 1.079 M ops/s, hits latency: 8.855 ns/op, important_hits throughput: 11.293 ± 0.108 M ops/s local_storage cache interleaved get: hits throughput: 115.841 ± 2.088 M ops/s, hits latency: 8.633 ns/op, important_hits throughput: 41.372 ± 0.746 M ops/s num_maps: 16 local_storage cache sequential get: hits throughput: 115.653 ± 0.416 M ops/s, hits latency: 8.647 ns/op, important_hits throughput: 7.228 ± 0.026 M ops/s local_storage cache interleaved get: hits throughput: 138.717 ± 1.649 M ops/s, hits latency: 7.209 ns/op, important_hits throughput: 44.137 ± 0.525 M ops/s num_maps: 17 local_storage cache sequential get: hits throughput: 112.020 ± 1.649 M ops/s, hits latency: 8.927 ns/op, important_hits throughput: 6.598 ± 0.097 M ops/s local_storage cache interleaved get: hits throughput: 128.089 ± 1.960 M ops/s, hits latency: 7.807 ns/op, important_hits throughput: 38.995 ± 0.597 M ops/s num_maps: 24 local_storage cache sequential get: hits throughput: 92.447 ± 5.170 M ops/s, hits latency: 10.817 ns/op, important_hits throughput: 3.855 ± 0.216 M ops/s local_storage cache interleaved get: hits throughput: 128.844 ± 2.808 M ops/s, hits latency: 7.761 ns/op, important_hits throughput: 36.245 ± 0.790 M ops/s num_maps: 32 local_storage cache sequential get: hits throughput: 102.042 ± 1.462 M ops/s, hits latency: 9.800 ns/op, important_hits throughput: 3.194 ± 0.046 M ops/s local_storage cache interleaved get: hits throughput: 126.577 ± 1.818 M ops/s, hits latency: 7.900 ns/op, important_hits throughput: 35.332 ± 0.507 M ops/s num_maps: 100 local_storage cache sequential get: hits throughput: 111.327 ± 1.401 M ops/s, hits latency: 8.983 ns/op, important_hits throughput: 1.113 ± 0.014 M ops/s local_storage cache interleaved get: hits throughput: 131.327 ± 1.339 M ops/s, hits latency: 7.615 ns/op, important_hits throughput: 34.302 ± 0.350 M ops/s num_maps: 1000 local_storage cache sequential get: hits throughput: 101.978 ± 0.563 M ops/s, hits latency: 9.806 ns/op, important_hits throughput: 0.102 ± 0.001 M ops/s local_storage cache interleaved get: hits throughput: 141.084 ± 1.098 M ops/s, hits latency: 7.088 ns/op, important_hits throughput: 35.430 ± 0.276 M ops/s Adjusting for overhead, latency numbers for "hashmap control" and "sequential get" are: hashmap_control_1k: ~53.8ns hashmap_control_10k: ~124.2ns hashmap_control_100k: ~206.5ns sequential_get_1: ~12.1ns sequential_get_10: ~16.0ns sequential_get_16: ~13.8ns sequential_get_17: ~16.8ns sequential_get_24: ~40.9ns sequential_get_32: ~65.2ns sequential_get_100: ~148.2ns sequential_get_1000: ~2204ns Clearly demonstrating a cliff. In the discussion for v1 of this patch, Alexei noted that local_storage was 2.5x faster than a large hashmap when initially implemented [1]. The benchmark results show that local_storage is 5-10x faster: a long-running BPF application putting some pid-specific info into a hashmap for each pid it sees will probably see on the order of 10-100k pids. Bench numbers for hashmaps of this size are ~10x slower than sequential_get_16, but as the number of local_storage maps grows far past local_storage cache size the performance advantage shrinks and eventually reverses. When running the benchmarks it may be necessary to bump 'open files' ulimit for a successful run. [0]: https://lore.kernel.org/all/20220420002143.1096548-1-davemarchevsky@fb.com [1]: https://lore.kernel.org/bpf/20220511173305.ftldpn23m4ski3d3@MBP-98dd607d3435.dhcp.thefacebook.com/ Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20220620222554.270578-1-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/Makefile | 4 +- tools/testing/selftests/bpf/bench.c | 55 ++++ tools/testing/selftests/bpf/bench.h | 4 + .../selftests/bpf/benchs/bench_local_storage.c | 287 +++++++++++++++++++++ .../bpf/benchs/run_bench_local_storage.sh | 24 ++ tools/testing/selftests/bpf/benchs/run_common.sh | 17 ++ .../selftests/bpf/progs/local_storage_bench.c | 104 ++++++++ 7 files changed, 494 insertions(+), 1 deletion(-) commit c4fceb46add65481ef0dfb79cad24c3c269b4cad Author: Eric Dumazet Date: Wed Jun 22 03:23:03 2022 +0000 raw: remove unused variables from raw6_icmp_error() saddr and daddr are set but not used. Fixes: ba44f8182ec2 ("raw: use more conventional iterators") Reported-by: kernel test robot Signed-off-by: Eric Dumazet Acked-by: Jonathan Lemon Link: https://lore.kernel.org/r/20220622032303.159394-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv6/raw.c | 3 --- 1 file changed, 3 deletions(-) commit 12cf1b89a66828719b2135891b65bd5d03eedea9 Author: Bhadram Varka Date: Tue Jun 21 09:10:27 2022 +0530 net: phy: Add support for AQR113C EPHY Add support multi-gigabit and single-port Ethernet PHY transceiver (AQR113C). Signed-off-by: Bhadram Varka Link: https://lore.kernel.org/r/20220621034027.56508-1-vbhadram@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/phy/aquantia_main.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit a8236dfd8104bc7ba67daec95e32e2c1e18440d1 Author: Russell King (Oracle) Date: Tue Jun 21 09:53:02 2022 +0100 net: pcs: lynx: use mdiodev accessors Use the recently introduced mdiodev accessors for the lynx PCS. Signed-off-by: Russell King (Oracle) Link: https://lore.kernel.org/r/E1o3Zd8-002yHI-G2@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/pcs/pcs-lynx.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) commit d4667f96f485af809f3f9383d9eadb2650355522 Author: Jiang Jian Date: Tue Jun 21 19:45:29 2022 +0800 isdn: mISDN: hfcsusb: drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: ./drivers/isdn/hardware/mISDN/hfcsusb.c line: 1560 /* set USB_SIZE_I to match the the wMaxPacketSize for ISO transfers */ changed to /* set USB_SIZE_I to match the wMaxPacketSize for ISO transfers */ Signed-off-by: Jiang Jian Link: https://lore.kernel.org/r/20220621114529.108079-1-jiangjian@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/isdn/hardware/mISDN/hfcsusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c0d97e4b6960a97112ad6966a9db5ec2800b6f9 Author: Jiang Jian Date: Tue Jun 21 16:50:01 2022 +0800 net: ipa: remove unexpected word "the" there is an unexpected word "the" in the comments that need to be removed Signed-off-by: Jiang Jian Reviewed-by: Alex Elder Link: https://lore.kernel.org/r/20220621085001.61320-1-jiangjian@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ipa/gsi_trans.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f0d2ef7f92dc0b36b9d33227a67da8dc3be32088 Author: Jiang Jian Date: Tue Jun 21 16:45:37 2022 +0800 cxgb4vf: remove unexpected word "the" there is an unexpected word "the" in the comments that need to be removed Signed-off-by: Jiang Jian Link: https://lore.kernel.org/r/20220621084537.58402-1-jiangjian@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d13a3205a7175d673d5080ddf155dc69aad6085c Author: Yu Zhe Date: Tue Jun 21 10:16:48 2022 +0800 amt: remove unnecessary (void*) conversions Remove unnecessary void* type castings. Signed-off-by: Yu Zhe Acked-by: Taehee Yoo Link: https://lore.kernel.org/r/20220621021648.2544-1-yuzhe@nfschina.com Signed-off-by: Jakub Kicinski drivers/net/amt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0efff5c0e5bc34656c8ba2d940ee0d1f02962524 Author: Jiang Jian Date: Tue Jun 21 15:00:32 2022 +0800 Input: cyapa_gen6 - aligned "*" each line Consider * alignment in comments Signed-off-by: Jiang Jian Link: https://lore.kernel.org/r/20220621070032.30072-1-jiangjian@cdjrlc.com Signed-off-by: Dmitry Torokhov drivers/input/mouse/cyapa_gen6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62c0aff64c8d6594357b6217db019552ea664b90 Author: Andy Shevchenko Date: Wed Jun 22 20:11:47 2022 +0300 clk: Remove never used devm_clk_*unregister() For the entire history of the devm_clk_*unregister() existence they were used only once (*) in 2015. Remove them. *) The commit 264e3b75de4e ("clk: s2mps11: Simplify s2mps11_clk_probe unwind paths") exactly supports the point of the change proposed here. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220622171147.85603-1-andriy.shevchenko@linux.intel.com Acked-by: Uwe Kleine-König Signed-off-by: Stephen Boyd drivers/clk/clk.c | 48 -------------------------------------------- include/linux/clk-provider.h | 2 -- 2 files changed, 50 deletions(-) commit 8b3d743fc9e2542822826890b482afabf0e7522a Author: Uwe Kleine-König Date: Mon Jun 20 19:18:15 2022 +0200 clk: Fix pointer casting to prevent oops in devm_clk_release() The release function is called with a pointer to the memory returned by devres_alloc(). I was confused about that by the code before the generalization that used a struct clk **ptr. Reported-by: Marek Szyprowski Fixes: abae8e57e49a ("clk: generalize devm_clk_get() a bit") Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220620171815.114212-1-u.kleine-koenig@pengutronix.de Tested-by: Marek Szyprowski Tested-by: Linux Kernel Functional Testing Signed-off-by: Stephen Boyd drivers/clk/clk-devres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ce07d94c9f80e1b33f5f6bc2c5a27f6cc56a6dc Author: Lucas De Marchi Date: Fri Jun 17 16:05:59 2022 -0700 drm/i915/gt: Re-do the intel-gtt split Re-do what was attempted in commit 7a5c922377b4 ("drm/i915/gt: Split intel-gtt functions by arch"). The goal of that commit was to split the handlers for older hardware that depend on intel-gtt.ko so i915 can be built for non-x86 archs, after some more patches. Other archs do not need intel-gtt.ko. Main issue with the previous approach: it moved all the hooks, including the gen8, which is used by all platforms gen8 and newer. Re-do the split moving only the handlers for gen < 6, which are the only ones calling out to the separate module. While at it do some minor cleanups: - Rename the prefix s/gen5_/gmch_/ to be more accurate what platforms are covered by intel_ggtt_gmch.c - Remove dead code for gen12 out of needs_idle_maps() - Remove TODO comment leftover - Re-order if/else ladder in ggtt_probe_hw() to keep newest platforms first v2: Add minor cleanups (Matt Roper) Signed-off-by: Lucas De Marchi Acked-by: Tvrtko Ursulin Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220617230559.2109427-2-lucas.demarchi@intel.com drivers/gpu/drm/i915/Makefile | 2 +- drivers/gpu/drm/i915/gt/intel_ggtt.c | 561 ++++++++++++++++++++++++- drivers/gpu/drm/i915/gt/intel_ggtt_gmch.c | 132 ++++++ drivers/gpu/drm/i915/gt/intel_ggtt_gmch.h | 27 ++ drivers/gpu/drm/i915/gt/intel_gt.c | 5 +- drivers/gpu/drm/i915/gt/intel_gt.h | 9 - drivers/gpu/drm/i915/gt/intel_gt_gmch.c | 654 ------------------------------ drivers/gpu/drm/i915/gt/intel_gt_gmch.h | 46 --- drivers/gpu/drm/i915/gt/intel_gtt.h | 12 +- 9 files changed, 714 insertions(+), 734 deletions(-) commit 64e06652e348f0725368853688d3c15784549fd2 Author: Lucas De Marchi Date: Fri Jun 17 16:05:58 2022 -0700 agp/intel: Rename intel-gtt symbols Exporting the symbols like intel_gtt_* creates some confusion inside i915 that has symbols named similarly. In an attempt to isolate platforms needing intel-gtt.ko, commit 7a5c922377b4 ("drm/i915/gt: Split intel-gtt functions by arch") moved way too much inside gt/intel_gt_gmch.c, even the functions that don't callout to this module. Rename the symbols to make the separation clear. Signed-off-by: Lucas De Marchi Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220617230559.2109427-1-lucas.demarchi@intel.com drivers/char/agp/intel-gtt.c | 58 ++++++++++++++++----------------- drivers/gpu/drm/i915/gt/intel_gt_gmch.c | 16 ++++----- include/drm/intel-gtt.h | 24 +++++++------- 3 files changed, 49 insertions(+), 49 deletions(-) commit 981facf94a18f1b8d4989087ba6d7cedae1929ec Author: Jiang Jian Date: Wed Jun 22 14:21:00 2022 +0800 Input: gpio_mouse - fix typos in comments Drop a redundant word 'the' in the comments of function gpio_mouse_scan. Signed-off-by: Jiang Jian Link: https://lore.kernel.org/r/20220622062100.19490-1-jiangjian@cdjrlc.com Signed-off-by: Dmitry Torokhov drivers/input/mouse/gpio_mouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f12d07d6e9f22bbe65d158de1435ec515acfb50a Author: Ruijing Dong Date: Wed Jun 22 10:10:11 2022 -0400 drm/amdgpu/vcn: fix no previous prototype warning Declare 'static', as the function is not intended to be used outside of this translation unit. Fixes: 4ed49c954e35 ("drm/amdgpu/vcn: add unified queue ib test") Reported-by: kernel test robot Reviewed-by: James Zhu Signed-off-by: Ruijing Dong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ceb180361e3851007547c55035cd1de03f108f75 Author: Darren Powell Date: Wed May 11 01:07:04 2022 -0400 amdgpu/pm: Fix possible array out-of-bounds if SCLK levels != 2 [v2] simplified fix after Lijo's feedback removed clocks.num_levels from calculation of loop count removed unsafe accesses to shim table freq_values retained corner case output only min,now if clocks.num_levels == 1 && now > min [v1] added a check to populate and use SCLK shim table freq_values only if using dpm_level == AMD_DPM_FORCED_LEVEL_MANUAL or AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM removed clocks.num_levels from calculation of shim table size removed unsafe accesses to shim table freq_values output gfx_table values if using other dpm levels added check for freq_match when using freq_values for when now == min_clk == Test == LOGFILE=aldebaran-sclk.test.log AMDGPU_PCI_ADDR=`lspci -nn | grep "VGA\|Display" | cut -d " " -f 1` AMDGPU_HWMON=`ls -la /sys/class/hwmon | grep $AMDGPU_PCI_ADDR | awk '{print $9}'` HWMON_DIR=/sys/class/hwmon/${AMDGPU_HWMON} lspci -nn | grep "VGA\|Display" > $LOGFILE FILES="pp_od_clk_voltage pp_dpm_sclk" for f in $FILES do echo === $f === >> $LOGFILE cat $HWMON_DIR/device/$f >> $LOGFILE done cat $LOGFILE Signed-off-by: Darren Powell Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 34 ++++++++-------------- 1 file changed, 12 insertions(+), 22 deletions(-) commit 543faf57ee0ef6feb1ef60122c0abb9097083ded Author: Darren Powell Date: Fri Apr 29 21:20:52 2022 -0400 amdgpu/pm: Fix incorrect variable for size of clocks array [v2] No Changes, added RB [v1] Size of pp_clock_levels_with_latency is PP_MAX_CLOCK_LEVELS, not MAX_NUM_CLOCKS. Both are currently defined as 16, modifying in case one value is modified in future Changed code in both arcturus and aldabaran. Also removed unneeded var count, and used min_t function Signed-off-by: Darren Powell Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 9 +++++---- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) commit ab8529b0cdb271d9b222cbbddb2641f3fca5df8f Author: Philip Yang Date: Fri Jun 10 20:15:29 2022 -0400 drm/amdkfd: Free queue after unmap queue success After queue unmap or remove from MES successfully, free queue sysfs entries, doorbell and remove from queue list. Otherwise, application may destroy queue again, cause below kernel warning or crash backtrace. For outstanding queues, either application forget to destroy or failed to destroy, kfd_process_notifier_release will remove queue sysfs entries, kfd_process_wq_release will free queue doorbell. v2: decrement_queue_count for MES queue refcount_t: underflow; use-after-free. WARNING: CPU: 7 PID: 3053 at lib/refcount.c:28 Call Trace: kobject_put+0xd6/0x1a0 kfd_procfs_del_queue+0x27/0x30 [amdgpu] pqm_destroy_queue+0xeb/0x240 [amdgpu] kfd_ioctl_destroy_queue+0x32/0x70 [amdgpu] kfd_ioctl+0x27d/0x500 [amdgpu] do_syscall_64+0x35/0x80 WARNING: CPU: 2 PID: 3053 at drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c:400 Call Trace: deallocate_doorbell.isra.0+0x39/0x40 [amdgpu] destroy_queue_cpsch+0xb3/0x270 [amdgpu] pqm_destroy_queue+0x108/0x240 [amdgpu] kfd_ioctl_destroy_queue+0x32/0x70 [amdgpu] kfd_ioctl+0x27d/0x500 [amdgpu] general protection fault, probably for non-canonical address 0xdead000000000108: Call Trace: pqm_destroy_queue+0xf0/0x200 [amdgpu] kfd_ioctl_destroy_queue+0x2f/0x60 [amdgpu] kfd_ioctl+0x19b/0x600 [amdgpu] Signed-off-by: Philip Yang Reviewed-by: Graham Sider Signed-off-by: Alex Deucher .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 28 +++++++++++++--------- .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 2 +- 2 files changed, 18 insertions(+), 12 deletions(-) commit f4f9b827d76d2fa23c2a2359b4e9fb417deec61a Author: Philip Yang Date: Wed Jun 15 16:26:35 2022 -0400 drm/amdkfd: Add queue to MES if it becomes active We remove the user queue from MES scheduler to update queue properties. If the queue becomes active after updating, add the user queue to MES scheduler, to be able to handle command packet submission. v2: don't break pqm_set_gws Signed-off-by: Philip Yang Reviewed-by: Graham Sider Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2325d4dd7321cd569f996c5d091f4f83efb25693 Author: Sean Christopherson Date: Wed Jun 8 22:45:16 2022 +0000 KVM: selftests: Add MONITOR/MWAIT quirk test Add a test to verify the "MONITOR/MWAIT never fault" quirk, and as a bonus, also verify the related "MISC_ENABLES ignores ENABLE_MWAIT" quirk. If the "never fault" quirk is enabled, MONITOR/MWAIT should always be emulated as NOPs, even if they're reported as disabled in guest CPUID. Use the MISC_ENABLES quirk to coerce KVM into toggling the MWAIT CPUID enable, as KVM now disallows manually toggling CPUID bits after running the vCPU. Signed-off-by: Sean Christopherson Message-Id: <20220608224516.3788274-6-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/.gitignore | 1 + tools/testing/selftests/kvm/Makefile | 1 + .../selftests/kvm/x86_64/monitor_mwait_test | Bin 1485656 -> 0 bytes .../selftests/kvm/x86_64/monitor_mwait_test.c | 137 +++++++++++++++++++++ 4 files changed, 139 insertions(+) commit e5a3cbe8b45b0a436a39cc969b7bcc8353248018 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:21 2022 -0700 ARM: dts: rockchip: correct gpio-keys properties on rk3288-tinker gpio-keys children do not use unit addresses. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-28-krzysztof.kozlowski@linaro.org Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-tinker.dtsi | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 271e2c92285075a890c58cba9ad5979a8959f6ff Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:20 2022 -0700 ARM: dts: rockchip: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-27-krzysztof.kozlowski@linaro.org Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3066a-bqcurie2.dts | 4 ++-- arch/arm/boot/dts/rk3066a-rayeager.dts | 2 +- arch/arm/boot/dts/rk3188-bqedison2qc.dts | 4 ++-- arch/arm/boot/dts/rk3188-px3-evb.dts | 2 +- arch/arm/boot/dts/rk3188-radxarock.dts | 2 +- arch/arm/boot/dts/rk3229-evb.dts | 2 +- arch/arm/boot/dts/rk3288-evb.dtsi | 2 +- arch/arm/boot/dts/rk3288-firefly-reload.dts | 2 +- arch/arm/boot/dts/rk3288-firefly.dtsi | 2 +- arch/arm/boot/dts/rk3288-phycore-rdk.dts | 4 ++-- arch/arm/boot/dts/rk3288-popmetal.dts | 2 +- arch/arm/boot/dts/rk3288-r89.dts | 2 +- arch/arm/boot/dts/rk3288-rock2-square.dts | 2 +- arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi | 2 +- arch/arm/boot/dts/rk3288-veyron-minnie.dts | 4 ++-- arch/arm/boot/dts/rk3288-veyron-pinky.dts | 2 +- arch/arm/boot/dts/rk3288-veyron.dtsi | 2 +- 17 files changed, 21 insertions(+), 21 deletions(-) commit 517ed0ffd3cc691bef747288d51d01d2705b2251 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:19 2022 -0700 arm64: dts: rockchip: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-26-krzysztof.kozlowski@linaro.org Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3308-evb.dts | 2 +- arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts | 32 +++++++++++----------- arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 2 +- arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi | 2 +- arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 2 +- .../boot/dts/rockchip/rk3368-orion-r68-meta.dts | 2 +- arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts | 2 +- arch/arm64/boot/dts/rockchip/rk3368-r88.dts | 2 +- arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 2 +- .../boot/dts/rockchip/rk3399-gru-chromebook.dtsi | 2 +- arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts | 2 +- .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi | 2 +- .../boot/dts/rockchip/rk3399-khadas-edge.dtsi | 2 +- arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts | 4 +-- arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi | 2 +- arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts | 2 +- .../boot/dts/rockchip/rk3399-pinebook-pro.dts | 4 +-- arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 2 +- arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 2 +- arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 2 +- arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi | 2 +- 21 files changed, 38 insertions(+), 38 deletions(-) commit 61afafe8b938bc74841cf4b1a73dd08b9d287c5a Author: Miaoqian Lin Date: Thu May 12 08:55:58 2022 +0400 remoteproc: imx_rproc: Fix refcount leak in imx_rproc_addr_init of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not needed anymore. This function has two paths missing of_node_put(). Fixes: 6e962bfe56b9 ("remoteproc: imx_rproc: add missing of_node_put") Fixes: a0ff4aa6f010 ("remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220512045558.7142-1-linmq006@gmail.com Signed-off-by: Mathieu Poirier drivers/remoteproc/imx_rproc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit bb356ddb78b257f0807affb86306c5002f803024 Author: Maciej W. Rozycki Date: Wed Apr 27 23:15:47 2022 +0100 RISC-V: PCI: Avoid handing out address 0 to devices For RISC-V platforms we permit assigning addresses from 0 to PCI devices, both in the memory and the I/O bus space, and we happily do so if there is no conflict, e.g.: pci 0000:07:00.0: BAR 0: assigned [io 0x0000-0x0007] pci 0000:07:00.1: BAR 0: assigned [io 0x0008-0x000f] pci 0000:06:01.0: PCI bridge to [bus 07] pci 0000:06:01.0: bridge window [io 0x0000-0x0fff] (with the SiFive HiFive Unmatched RISC-V board and a dual serial port option card based on the OxSemi OXPCIe952 device wired for the legacy UART mode). Address 0 is treated specially however in many places, for example in `pci_iomap_range' and `pci_iomap_wc_range' we require that the start address is non-zero, and even if we let such an address through, then individual device drivers could reject a request to handle a device at such an address, such as in `uart_configure_port'. Consequently given devices configured as shown above only one is actually usable: Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled serial 0000:07:00.0: enabling device (0000 -> 0001) serial: probe of 0000:07:00.0 failed with error -12 serial 0000:07:00.1: enabling device (0000 -> 0001) serial 0000:07:00.1: detected caps 00000700 should be 00000500 0000:07:00.1: ttyS0 at I/O 0x8 (irq = 39, base_baud = 15625000) is a 16C950/954 Therefore avoid handing out address 0, by bumping the lowest address available to PCI via PCIBIOS_MIN_IO and PCIBIOS_MIN_MEM up by 4 and 16 respectively, which is the minimum allocation size for I/O and memory BARs. With this in place the system in question we have: pci 0000:07:00.0: BAR 0: assigned [io 0x1000-0x1007] pci 0000:07:00.1: BAR 0: assigned [io 0x1008-0x100f] pci 0000:06:01.0: PCI bridge to [bus 07] pci 0000:06:01.0: bridge window [io 0x1000-0x1fff] and then devices work correctly: Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled serial 0000:07:00.0: enabling device (0000 -> 0001) serial 0000:07:00.0: detected caps 00000700 should be 00000500 0000:07:00.0: ttyS0 at I/O 0x1000 (irq = 38, base_baud = 15625000) is a 16C950/954 serial 0000:07:00.1: enabling device (0000 -> 0001) serial 0000:07:00.1: detected caps 00000700 should be 00000500 0000:07:00.1: ttyS1 at I/O 0x1008 (irq = 39, base_baud = 15625000) is a 16C950/954 Especially I/O space ranges are particularly valuable, because bridges only decode bits from 12 up and consequently where 16-bit addressing is in effect, as few as 16 separate ranges can be assigned to individual buses only, however a generic change to avoid handing out address 0 only has turned out controversial as per the discussion referred via the link below. Conversely sorting this out in platform code has been standard practice since forever to avoid a clash with legacy devices subtractively decoded by the southbridge where present. This can be revised should a generic solution be adopted sometime. Signed-off-by: Maciej W. Rozycki Link: https://lore.kernel.org/r/alpine.DEB.2.21.2202260044180.25061@angie.orcam.me.uk Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/pci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 55e77abab2eebabf99820c2b2b3f6cdce0adbcf3 Merge: 13d272d51bc1 d92c3d13e765 Author: Mark Brown Date: Wed Jun 22 17:40:22 2022 +0100 ASoC: rockchip: i2s: switch BCLK to GPIO Merge series from Judy Hsiao : The patches series is to fix the unexpected large DC output voltage of Max98357a that burns the speakers on the rockchip platform when BCLK and SD_MODE are ON but LRCLK is OFF. commit 13d272d51bc1b8ca519ec2cecac102bda3530b88 Merge: c3b5fd7fbb69 acaeb8c62fd1 Author: Mark Brown Date: Wed Jun 22 17:32:34 2022 +0100 Add MT8186 ADSP dt-binding Merge series from Tinghan Shen : Some updates to the DT bindings to make things less surprising for users. commit b7ce716254315dffcfce60e149ddd022c8a60345 Author: Slark Xiao Date: Wed Jun 22 11:25:44 2022 +0800 bus: mhi: host: pci_generic: Add Cinterion MV31-W with new baseline Cinterion MV31-W modem with a new baseline (firmware) is sold as a separate product with different device ID. So add support for the same reusing the config. Signed-off-by: Slark Xiao Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20220622032544.17713-1-slark_xiao@163.com Signed-off-by: Manivannan Sadhasivam drivers/bus/mhi/host/pci_generic.c | 3 +++ 1 file changed, 3 insertions(+) commit 2af89ebacf299b7fba5f3087d35e8a286ec33706 Author: Suzuki K Poulose Date: Tue Jun 14 22:40:24 2022 +0100 coresight: Clear the connection field properly coresight devices track their connections (output connections) and hold a reference to the fwnode. When a device goes away, we walk through the devices on the coresight bus and make sure that the references are dropped. This happens both ways: a) For all output connections from the device, drop the reference to the target device via coresight_release_platform_data() b) Iterate over all the devices on the coresight bus and drop the reference to fwnode if *this* device is the target of the output connection, via coresight_remove_conns()->coresight_remove_match(). However, the coresight_remove_match() doesn't clear the fwnode field, after dropping the reference, this causes use-after-free and additional refcount drops on the fwnode. e.g., if we have two devices, A and B, with a connection, A -> B. If we remove B first, B would clear the reference on B, from A via coresight_remove_match(). But when A is removed, it still has a connection with fwnode still pointing to B. Thus it tries to drops the reference in coresight_release_platform_data(), raising the bells like : [ 91.990153] ------------[ cut here ]------------ [ 91.990163] refcount_t: addition on 0; use-after-free. [ 91.990212] WARNING: CPU: 0 PID: 461 at lib/refcount.c:25 refcount_warn_saturate+0xa0/0x144 [ 91.990260] Modules linked in: coresight_funnel coresight_replicator coresight_etm4x(-) crct10dif_ce coresight ip_tables x_tables ipv6 [last unloaded: coresight_cpu_debug] [ 91.990398] CPU: 0 PID: 461 Comm: rmmod Tainted: G W T 5.19.0-rc2+ #53 [ 91.990418] Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Feb 1 2019 [ 91.990434] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 91.990454] pc : refcount_warn_saturate+0xa0/0x144 [ 91.990476] lr : refcount_warn_saturate+0xa0/0x144 [ 91.990496] sp : ffff80000c843640 [ 91.990509] x29: ffff80000c843640 x28: ffff800009957c28 x27: ffff80000c8439a8 [ 91.990560] x26: ffff00097eff1990 x25: ffff8000092b6ad8 x24: ffff00097eff19a8 [ 91.990610] x23: ffff80000c8439a8 x22: 0000000000000000 x21: ffff80000c8439c2 [ 91.990659] x20: 0000000000000000 x19: ffff00097eff1a10 x18: ffff80000ab99c40 [ 91.990708] x17: 0000000000000000 x16: 0000000000000000 x15: ffff80000abf6fa0 [ 91.990756] x14: 000000000000001d x13: 0a2e656572662d72 x12: 657466612d657375 [ 91.990805] x11: 203b30206e6f206e x10: 6f69746964646120 x9 : ffff8000081aba28 [ 91.990854] x8 : 206e6f206e6f6974 x7 : 69646461203a745f x6 : 746e756f63666572 [ 91.990903] x5 : ffff00097648ec58 x4 : 0000000000000000 x3 : 0000000000000027 [ 91.990952] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff00080260ba00 [ 91.991000] Call trace: [ 91.991012] refcount_warn_saturate+0xa0/0x144 [ 91.991034] kobject_get+0xac/0xb0 [ 91.991055] of_node_get+0x2c/0x40 [ 91.991076] of_fwnode_get+0x40/0x60 [ 91.991094] fwnode_handle_get+0x3c/0x60 [ 91.991116] fwnode_get_nth_parent+0xf4/0x110 [ 91.991137] fwnode_full_name_string+0x48/0xc0 [ 91.991158] device_node_string+0x41c/0x530 [ 91.991178] pointer+0x320/0x3ec [ 91.991198] vsnprintf+0x23c/0x750 [ 91.991217] vprintk_store+0x104/0x4b0 [ 91.991238] vprintk_emit+0x8c/0x360 [ 91.991257] vprintk_default+0x44/0x50 [ 91.991276] vprintk+0xcc/0xf0 [ 91.991295] _printk+0x68/0x90 [ 91.991315] of_node_release+0x13c/0x14c [ 91.991334] kobject_put+0x98/0x114 [ 91.991354] of_node_put+0x24/0x34 [ 91.991372] of_fwnode_put+0x40/0x5c [ 91.991390] fwnode_handle_put+0x38/0x50 [ 91.991411] coresight_release_platform_data+0x74/0xb0 [coresight] [ 91.991472] coresight_unregister+0x64/0xcc [coresight] [ 91.991525] etm4_remove_dev+0x64/0x78 [coresight_etm4x] [ 91.991563] etm4_remove_amba+0x1c/0x2c [coresight_etm4x] [ 91.991598] amba_remove+0x3c/0x19c Reproducible by: (Build all coresight components as modules): #!/bin/sh while true do for m in tmc stm cpu_debug etm4x replicator funnel do modprobe coresight_${m} done for m in tmc stm cpu_debug etm4x replicator funnel do rmmode coresight_${m} done done Cc: stable@vger.kernel.org Cc: Mathieu Poirier Cc: Mike Leach Cc: Leo Yan Signed-off-by: Suzuki K Poulose Fixes: 37ea1ffddffa ("coresight: Use fwnode handle instead of device names") Link: https://lore.kernel.org/r/20220614214024.3005275-1-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier drivers/hwtracing/coresight/coresight-core.c | 1 + 1 file changed, 1 insertion(+) commit 84e8bdee85a2660225a44592708d39fa0a6abcb9 Author: Allen-KH Cheng Date: Fri May 20 20:22:16 2022 +0800 dt-bindings: arm: Add compatible for MediaTek MT8186 This commit adds dt-binding documentation for the MediaTek MT8186 reference board. Signed-off-by: Allen-KH Cheng Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220520122217.30716-3-allen-kh.cheng@mediatek.com Signed-off-by: Matthias Brugger Documentation/devicetree/bindings/arm/mediatek.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 76260bd63800dbbc7552357094cfc483bcb5aad4 Author: Allen-KH Cheng Date: Fri May 20 20:22:15 2022 +0800 dt-bindings: arm: mediatek: Add mt8186 pericfg compatible Add mt8186 pericfg compatible to binding document. Signed-off-by: Allen-KH Cheng Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220520122217.30716-2-allen-kh.cheng@mediatek.com Signed-off-by: Matthias Brugger Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.yaml | 1 + 1 file changed, 1 insertion(+) commit 55fcff6c42c601825df0e843e59aaaf15ea9d150 Author: AngeloGioacchino Del Regno Date: Thu Jun 9 13:23:03 2022 +0200 arm64: dts: mediatek: mt6795: Specify interrupts for vGIC Add the maintenance interrupt for GIC-400. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220609112303.117928-11-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6795.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit b888886a45369b1f3db9f040c2d242dd317b309a Author: AngeloGioacchino Del Regno Date: Thu Jun 9 13:23:02 2022 +0200 arm64: dts: mediatek: mt6795: Add pinctrl controller node Add a node for the pinctrl controller found on MT6795 but without configuration for any pin, as that's expected to be done in the machine-specific devicetrees. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220609112303.117928-10-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6795.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 01931ee600365162860cf69899f819e3362cb900 Author: AngeloGioacchino Del Regno Date: Thu Jun 9 13:23:01 2022 +0200 arm64: dts: mediatek: mt6795: Add ARM CCI-400 node and assign to CPUs This SoC features an ARM CCI-400 IP: add the required node and assign the cci control ports to the CPU cores. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220609112303.117928-9-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6795.dtsi | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 4c400f1812f4ea8c2ebe0e49f526ff6bcd88a29a Author: AngeloGioacchino Del Regno Date: Thu Jun 9 13:23:00 2022 +0200 arm64: dts: mediatek: mt6795: Add general purpose timer node Add the timer node, enabling two GPTs, of which one will be used as sched_clock. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220609112303.117928-8-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6795.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 468deda82faf4d5d28155b0c6c7ea2d2c90624d4 Author: AngeloGioacchino Del Regno Date: Thu Jun 9 13:22:59 2022 +0200 arm64: dts: mediatek: mt6795: Remove incorrect fixed-clocks Remove the RTC and UART fixed clocks, as these were introduced to temporarily provide a dummy clock to devices: since the two 26M/32K fixed oscillators clocks (which do really exist in the SoC) have been added, there's no reason to keep the aforementioned (and now redundant) dummies in this devicetree. In order to remove the uart dummy clock, it was necessary to also reassign the clock of all UART nodes to clk26m. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220609112303.117928-7-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6795.dtsi | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit d9fc72d50b75a47e686b2375776cc1aa2e7b08d2 Author: AngeloGioacchino Del Regno Date: Thu Jun 9 13:22:58 2022 +0200 arm64: dts: mediatek: mt6795: Add fixed clocks for 32kHz and 26MHz XOs Add the 32kHz and 26MHz oscillators as fixed clocks in devicetree to provide a good initial clock spec, since this SoC features two always on oscillators running at the aforementioned frequencies. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220609112303.117928-6-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6795.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit ac4cf9a2e32cfd397eb616729e866b5414dcf024 Author: AngeloGioacchino Del Regno Date: Thu Jun 9 13:22:57 2022 +0200 arm64: dts: mediatek: mt6795: Add watchdog node to avoid timeouts At least on commercial devices like some smartphones, the bootloader will initialize the SoC watchdog and set it to reboot the board when it times out. The last pet that this watchdog is getting is right before booting the kernel and left it enabled as a protection against boot failure: this means that Linux is expected to initialize this device and pet as soon as possible, or it will bark and reset the AP. In order to prevent that, add the required watchdog node as default enabled: this will have no side effects on boards that are not performing the aforementioned watchdog setup before booting Linux. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220609112303.117928-5-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6795.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5fce1e6cc09748b3003f7a31699a3d3b36bfcb03 Author: AngeloGioacchino Del Regno Date: Thu Jun 9 13:22:56 2022 +0200 arm64: dts: mediatek: mt6795: Add Cortex A53 PMU nodes Add the required nodes to enable the PMU on this SoC. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220609112303.117928-4-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6795.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit f48d4867433342b188d89a9ac12bceb3a4eaf0a7 Author: AngeloGioacchino Del Regno Date: Thu Jun 9 13:22:55 2022 +0200 arm64: dts: mediatek: mt6795: Add cpu-map and L2 cache This SoC is HMP and has two clusters with four Cortex-A53 cores each: declare a cpu map and, while at it, also add the next-level-cache properties. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220609112303.117928-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6795.dtsi | 56 ++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 5397ed01d500ee7a14afbc9be053b6c4614b0d86 Author: AngeloGioacchino Del Regno Date: Thu Jun 9 13:22:54 2022 +0200 arm64: dts: mediatek: mt6795: Create soc bus node and move mmio devices MMIO devices should be inside of a soc bus node, as it's done for the vast majority of ARM64 devicetrees, and for almost all MTK devicetrees. Create a simple-bus soc node and move all devices with a MMIO address space in there. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220609112303.117928-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6795.dtsi | 105 ++++++++++++++++--------------- 1 file changed, 56 insertions(+), 49 deletions(-) commit 4a50cac0fb5b9c5a0954f6bdcd5ad4eb6fe4afcc Author: Krzysztof Kozlowski Date: Fri Jun 17 16:21:24 2022 -0700 arm64: dts: mediatek: mt7622-rfb1: remove wrong gpio-keys property gpio-keys (regular, not polling) does not use "poll-interval" property. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220617232124.7022-1-krzysztof.kozlowski@linaro.org Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 1 - 1 file changed, 1 deletion(-) commit 3f1804270f00c9363fcfecd1a35789513bf867f9 Author: AngeloGioacchino Del Regno Date: Thu Jun 16 13:08:29 2022 +0200 arm64: dts: mediatek: mt2712e: Add mediatek, infracfg phandle for IOMMU The IOMMU driver now looks for the "mediatek,infracfg" phandle as a new way to retrieve a syscon to that: even though the old way is retained, it has been deprecated and the driver will write a message in kmsg advertising to use the phandle way instead. For this reason, assign the right phandle to mediatek,infracfg in the iommu node. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Miles Chen Link: https://lore.kernel.org/r/20220616110830.26037-5-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 7b06e86e68859bdc4bf9c21f203dc206c2e437b1 Author: AngeloGioacchino Del Regno Date: Thu Jun 16 13:08:28 2022 +0200 arm64: dts: mediatek: mt8173: Add mediatek,infracfg phandle for IOMMU The IOMMU driver now looks for the "mediatek,infracfg" phandle as a new way to retrieve a syscon to that: even though the old way is retained, it has been deprecated and the driver will write a message in kmsg advertising to use the phandle way instead. For this reason, assign the right phandle to mediatek,infracfg in the iommu node. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Miles Chen Link: https://lore.kernel.org/r/20220616110830.26037-4-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8173.dtsi | 1 + 1 file changed, 1 insertion(+) commit 2208b284bee05deb4cc1443c9f22de7d60630d29 Author: Chunfeng Yun Date: Fri Jun 17 17:31:32 2022 +0800 arm64: dts: mediatek: mt8183: change efuse node name Use the fixed "efuse" name for efuse nodes according to its yaml file Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220617093132.22578-4-chunfeng.yun@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8183.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fda0541c8a5530569c2eb484320716c50232bb52 Author: Chunfeng Yun Date: Fri Jun 17 17:31:31 2022 +0800 arm64: dts: mediatek: mt8192: fix dtbs check warning of efuse Need also provide a specific compatible "mediatek,mt8192-efuse" at the same time when use the generic compatible "mediatek,efuse". Signed-off-by: Allen-KH Cheng Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220617093132.22578-3-chunfeng.yun@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8192.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e599740f7e423ee89fb027896cb2635dd43784f Author: Nícolas F. R. A. Prado Date: Fri Jun 17 19:31:50 2022 -0400 arm64: dts: mt8192: Fix idle-states entry-method The entry-method property of the idle-states node should be "psci" as described in the idle-states binding, since this is already the value of enable-method in the CPU nodes. Fix it to get rid of a dtbs_check warning. Fixes: 9260918d3a4f ("arm64: dts: mt8192: Add cpu-idle-states") Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220617233150.2466344-3-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8192.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 399e23ad51caaf62400a531c9268ad3c453c3d76 Author: Nícolas F. R. A. Prado Date: Fri Jun 17 19:31:49 2022 -0400 arm64: dts: mt8192: Fix idle-states nodes naming scheme Tweak the name of the idle-states subnodes so that they follow the binding pattern, getting rid of dtbs_check warnings. Only the usage of "-" in the name was necessary, but "off" was also exchanged for "sleep" since that seems to be a more common wording in other dts files. Fixes: 9260918d3a4f ("arm64: dts: mt8192: Add cpu-idle-states") Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220617233150.2466344-2-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8192.dtsi | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 009a3a52791f31c57d755a73f6bc66fbdd8bd76c Author: Thomas Zimmermann Date: Wed Jun 22 10:34:13 2022 +0200 drm/hyperv-drm: Include framebuffer and EDID headers Fix a number of compile errors by including the correct header files. Examples are shown below. ../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c: In function 'hyperv_blit_to_vram_rect': ../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:25:48: error: invalid use of undefined type 'struct drm_framebuffer' 25 | struct hyperv_drm_device *hv = to_hv(fb->dev); | ^~ ../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c: In function 'hyperv_connector_get_modes': ../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:59:17: error: implicit declaration of function 'drm_add_modes_noedid' [-Werror=implicit-function-declaration] 59 | count = drm_add_modes_noedid(connector, | ^~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:62:9: error: implicit declaration of function 'drm_set_preferred_mode'; did you mean 'drm_mm_reserve_node'? [-Werror=implicit-function-declaration] 62 | drm_set_preferred_mode(connector, hv->preferred_width, | ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Thomas Zimmermann Fixes: 76c56a5affeb ("drm/hyperv: Add DRM driver for hyperv synthetic video device") Fixes: 720cf96d8fec ("drm: Drop drm_framebuffer.h from drm_crtc.h") Fixes: 255490f9150d ("drm: Drop drm_edid.h from drm_crtc.h") Cc: Deepak Rawat Cc: Thomas Zimmermann Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: linux-hyperv@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: # v5.14+ Acked-by: Maxime Ripard Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220622083413.12573-1-tzimmermann@suse.de drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 2 ++ 1 file changed, 2 insertions(+) commit 44e36d7552760716525a8aba62a6bcbd48f3559d Author: AngeloGioacchino Del Regno Date: Mon Jun 20 12:24:54 2022 +0200 soc: mediatek: mutex: Use DDP_COMPONENT_DITHER0 mod index for MT8365 In commit 4e8988c634a1 ("soc: mediatek: add DDP_DOMPONENT_DITHER0 enum for mt8195 vdosys0") the enum mtk_ddp_comp_id was modified to add an index number to the DITHER component because some new SoCs have multiple dither blocks. As a result, all of the mutex mod arrays have been changed to use the new definition instead of the old one (even if that's retained): for consistency purposes, follow the same trend on the newly introduced MT8365 mutex mod array. This commit brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220620102454.131417-1-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-mutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 394b517585da9fbb2eea2f2103ff47d37321e976 Author: Fabien Parent Date: Mon May 30 22:50:38 2022 +0200 pwm: mediatek: Add MT8365 support Add support for PWM on MT8365. Signed-off-by: Fabien Parent Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-mediatek.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a5b87cdc1b73d685ea8c472b7187ceb399b1d90b Author: Fabio Estevam Date: Tue Jun 21 09:44:35 2022 -0300 arm64: dts: mediatek: Replace 'enable-sdio-wakeup' As explained in Documentation/devicetree/bindings/mmc/mmc-controller.yaml, the 'enable-sdio-wakeup' property is considered deprecated. Replace it with the 'wakeup-source' property instead. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20220621124435.121740-1-festevam@gmail.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 2 +- arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 2 +- arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 2 +- arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit fe00faee8060402a3d85aed95775e16838a6dad2 Author: Fabien Parent Date: Mon May 30 22:50:37 2022 +0200 dt-bindings: pwm: Add MT8365 SoC binding Add binding documentation for the MT8365 SoC. Signed-off-by: Fabien Parent Acked-by: Uwe Kleine-König Acked-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 2 ++ 1 file changed, 2 insertions(+) commit 7d748ffdee0dc244df3def1b2ec108bf095c0f9e Author: AngeloGioacchino Del Regno Date: Thu Jun 16 13:08:27 2022 +0200 iommu/mediatek: Lookup phandle to retrieve syscon to infracfg This driver will get support for more SoCs and the list of infracfg compatibles is expected to grow: in order to prevent getting this situation out of control and see a long list of compatible strings, add support to retrieve a handle to infracfg's regmap through a new "mediatek,infracfg" phandle. In order to keep retrocompatibility with older devicetrees, the old way is kept in place. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Miles Chen Reviewed-by: Yong Wu Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20220616110830.26037-3-angelogioacchino.delregno@collabora.com Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) commit d034dbbb9b2ac32aa06c104701fdf81ebdfea9a2 Author: AngeloGioacchino Del Regno Date: Thu Jun 16 13:08:26 2022 +0200 dt-bindings: iommu: mediatek: Add mediatek,infracfg phandle Add property "mediatek,infracfg" to let the mtk_iommu driver retrieve a phandle to the infracfg syscon instead of performing a per-soc compatible lookup in the entire devicetree and set it as a required property for MT2712 and MT8173. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20220616110830.26037-2-angelogioacchino.delregno@collabora.com Signed-off-by: Joerg Roedel .../devicetree/bindings/iommu/mediatek,iommu.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit ac9a5d522bb80be50ea84965699e1c8257d745ce Author: Yunfei Wang Date: Mon May 30 20:07:45 2022 +0800 iommu/dma: Fix race condition during iova_domain initialization When many devices share the same iova domain, iommu_dma_init_domain() may be called at the same time. The checking of iovad->start_pfn will all get false in iommu_dma_init_domain() and both enter init_iova_domain() to do iovad initialization. Fix this by protecting init_iova_domain() with iommu_dma_cookie->mutex. Exception backtrace: rb_insert_color(param1=0xFFFFFF80CD2BDB40, param3=1) + 64 init_iova_domain() + 180 iommu_setup_dma_ops() + 260 arch_setup_dma_ops() + 132 of_dma_configure_id() + 468 platform_dma_configure() + 32 really_probe() + 1168 driver_probe_device() + 268 __device_attach_driver() + 524 __device_attach() + 524 bus_probe_device() + 64 deferred_probe_work_func() + 260 process_one_work() + 580 worker_thread() + 1076 kthread() + 332 ret_from_fork() + 16 Signed-off-by: Ning Li Signed-off-by: Yunfei Wang Acked-by: Robin Murphy Reviewed-by: Miles Chen Link: https://lore.kernel.org/r/20220530120748.31733-1-yf.wang@mediatek.com Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 5c8dca97404bf23f6531456ae4d14c862f6871a3 Author: Uwe Kleine-König Date: Mon May 23 19:45:01 2022 +0200 pwm: Drop unused forward declaration from pwm.h The declaration was necessary until commit cc2d22477779 ("pwm: Drop per-chip dbg_show callback"). Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding include/linux/pwm.h | 2 -- 1 file changed, 2 deletions(-) commit ef2e35d90890932ee4546231c775326ffd7a3909 Author: Uwe Kleine-König Date: Mon May 23 19:45:00 2022 +0200 pwm: Reorder header file to get rid of struct pwm_capture forward declaration There is no cyclic dependency, so by reordering the forward declaration can be dropped. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding include/linux/pwm.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit f6bc65d3eebbfbd7c2204aa72e57cf08b8d35ffe Author: Julia Lawall Date: Sat May 21 13:10:32 2022 +0200 pwm: atmel-tcb: Fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-atmel-tcb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0829c35dc5346e90f428de61896362b51ab58296 Author: Uwe Kleine-König Date: Sat May 21 13:02:03 2022 +0200 pwm: Drop support for legacy drivers There are no drivers left providing the legacy callbacks. So drop support for these. If this commit breaks your out-of-tree pwm driver, look at e.g. commit ec00cd5e63f0 ("pwm: renesas-tpu: Implement .apply() callback") for an example of the needed conversion for your driver. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/core.c | 82 +---------------------------------------------------- include/linux/pwm.h | 12 -------- 2 files changed, 1 insertion(+), 93 deletions(-) commit 4bf7fda4dce22214c70c49960b1b6438e6260b67 Author: Robin Murphy Date: Thu Jun 9 16:12:10 2022 +0100 iommu/dma: Add config for PCI SAC address trick For devices stuck behind a conventional PCI bus, saving extra cycles at 33MHz is probably fairly significant. However since native PCI Express is now the norm for high-performance devices, the optimisation to always prefer 32-bit addresses for the sake of avoiding DAC is starting to look rather anachronistic. Technically 32-bit addresses do have shorter TLPs on PCIe, but unless the device is saturating its link bandwidth with small transfers it seems unlikely that the difference is appreciable. What definitely is appreciable, however, is that the IOVA allocator doesn't behave all that well once the 32-bit space starts getting full. As DMA working sets get bigger, this optimisation increasingly backfires and adds considerable overhead to the dma_map path for use-cases like high-bandwidth networking. We've increasingly bandaged the allocator in attempts to mitigate this, but it remains fundamentally at odds with other valid requirements to try as hard as possible to satisfy a request within the given limit; what we really need is to just avoid this odd notion of a speculative allocation when it isn't beneficial anyway. Unfortunately that's where things get awkward... Having been present on x86 for 15 years or so now, it turns out there are systems which fail to properly define the upper limit of usable IOVA space for certain devices and this trick was the only thing letting them work OK. I had a similar ulterior motive for a couple of early arm64 systems when originally adding it to iommu-dma, but those really should be fixed with proper firmware bindings by now. Let's be brave and default it to off in the hope that CI systems and developers will find and fix those bugs, but expect that desktop-focused distro configs are likely to want to turn it back on for maximum compatibility. Signed-off-by: Robin Murphy Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Link: https://lore.kernel.org/r/3f06994f9f370f9d35b2630ab75171ecd2065621.1654782107.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel drivers/iommu/Kconfig | 26 ++++++++++++++++++++++++++ drivers/iommu/dma-iommu.c | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) commit 822242e649ea9f1d9b5c43735445fff26209b215 Author: Ke Liu Date: Wed Jun 8 02:16:55 2022 +0000 iommu: Directly use ida_alloc()/free() Use ida_alloc()/ida_free() instead of deprecated ida_simple_get()/ida_simple_remove(). Signed-off-by: Ke Liu Reviewed-by: Jason Gunthorpe Signed-off-by: Michael S. Tsirkin Link: https://lore.kernel.org/r/20220608021655.1538087-1-liuke94@huawei.com Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c3b5fd7fbb698496461f280728b456d9927f22af Author: Chen-Yu Tsai Date: Wed Jun 22 02:57:47 2022 +0800 ASoC: rockchip: i2s: Fix crash on missing pinctrl Commit 44f362c2cc6d ("ASoC: rockchip: i2s: switch BCLK to GPIO") added pinctrl lookups, but did not skip the lookup if there was no pinctrl device tied to the I2S controller. As a result, the lookup was done on an invalid pointer in such cases, causing a kernel panic. Only do the subsequent pinctrl state lookups and switch if a pinctrl device was found. i2s_pinctrl_select_bclk_{on,off} already guard against missing pinctrl device or pinctrl state, so those two functions aren't touched. Fixes: 44f362c2cc6d ("ASoC: rockchip: i2s: switch BCLK to GPIO") Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220621185747.2782-1-wens@kernel.org Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 0deb003933052ac1a44b5f94b927484be6e34f86 Author: Uwe Kleine-König Date: Wed Jun 22 08:17:39 2022 +0200 ASoC: amd: acp: Fix error handling in .remove() Even in the presence of problems (here: rn_acp_deinit() might fail), it's important to unregister all resources acquired during .probe() because even if .remove() returns an error code, the device is removed. As .remove() is only called after .probe() returned success, platdata must be valid, so the first check in .remove() can just be dropped. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220622061739.225966-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown sound/soc/amd/acp/acp-renoir.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 1892a991886ace2c3450bec801df2cf4028a803a Author: Uwe Kleine-König Date: Tue Jun 21 16:58:34 2022 +0200 ASoC: core: Make snd_soc_unregister_card() return void The function snd_soc_unregister_card() returned 0 unconditionally and most callers don't care to check the return value. Make it return void and adapt the callers that didn't ignore the return value before. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220621145834.198519-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown include/sound/soc.h | 2 +- sound/soc/atmel/mikroe-proto.c | 4 +++- sound/soc/fsl/pcm030-audio-fabric.c | 5 ++--- sound/soc/soc-core.c | 4 +--- sound/soc/soc-topology-test.c | 4 +--- 5 files changed, 8 insertions(+), 11 deletions(-) commit acaeb8c62fd1b2b57be1523b8d5b1d64a1a9dc38 Author: Tinghan Shen Date: Wed Jun 22 14:22:45 2022 +0800 ASoC: SOF: mediatek: Align mt8186 clock names with dt-bindings Align clock names in mt8186 dsp driver with dt-bindings. Signed-off-by: Tinghan Shen Link: https://lore.kernel.org/r/20220622062245.21021-5-tinghan.shen@mediatek.com Signed-off-by: Mark Brown sound/soc/sof/mediatek/mt8186/mt8186-clk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 99370c4ea3d0cee8445f6a1104f25667e3fd47ba Author: Tinghan Shen Date: Wed Jun 22 14:22:44 2022 +0800 dt-bindings: dsp: mediatek: Add mt8186 dsp document This patch adds mt8186 dsp document. The dsp is used for Sound Open Firmware driver node. It includes registers, clocks, memory regions, and mailbox for dsp. Signed-off-by: Tinghan Shen Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220622062245.21021-4-tinghan.shen@mediatek.com Signed-off-by: Mark Brown .../bindings/dsp/mediatek,mt8186-dsp.yaml | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) commit 74bbdd632637628fef8f651bddc5d17aeb7eb46a Author: Tinghan Shen Date: Wed Jun 22 14:22:43 2022 +0800 firmware: mediatek: Use meaningful names for mbox Rename mbox according to actions instead of 'mbox0' and 'mbox1' Signed-off-by: Tinghan Shen Link: https://lore.kernel.org/r/20220622062245.21021-3-tinghan.shen@mediatek.com Signed-off-by: Mark Brown drivers/firmware/mtk-adsp-ipc.c | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) commit 009b21f392759ca7be91bc4be9d9534f6cee2878 Author: Tinghan Shen Date: Wed Jun 22 14:22:42 2022 +0800 dt-bindings: dsp: mediatek: Use meaningful names for mbox Rename mbox according to actions instead of 'mbox0' and 'mbox1'. The 8195 dsp node, which uses this binding, has not yet been added to the 8195 devicetree. Signed-off-by: Tinghan Shen Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220622062245.21021-2-tinghan.shen@mediatek.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/dsp/mediatek,mt8195-dsp.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6dd4142fb5a9d253301132061657b5108d59f673 Merge: ffd3018bf776 2f7ca90a0188 Author: David S. Miller Date: Wed Jun 22 12:59:43 2022 +0100 Merge branch 'af_unix-per-netns-socket-hash' Kuniyuki Iwashima says: ==================== af_unix: Introduce per-netns socket hash table. This series replaces unix_socket_table with a per-netns hash table and reduces lock contention and time on iterating over the list. Note the 3rd-6th patches can be a single patch, but for ease of review, they are split into small changes without breakage. Changes: v3: 6th: * Remove unix_table_locks from comments. * Remove missed spin_unlock(&unix_table_locks) in unix_lookup_by_ino() (kernel test robot) v2: https://lore.kernel.org/netdev/20220620185151.65294-1-kuniyu@amazon.com/ 3rd: * Update changelog * Remove holes from per-netns hash table structure * Use kvmalloc_array() instead of kmalloc() (Eric Dumazet) * Remove unnecessary parts in af_unix_init() (Eric Dumazet) * Move `err_sysctl` label into ifdef block (kernel test robot) * Remove struct netns_unix from struct net if CONFIG_UNIX is disabled 4th: * Use spin_lock_nested() (kernel test robot) v1: https://lore.kernel.org/netdev/20220616234714.4291-1-kuniyu@amazon.com/ ==================== Signed-off-by: David S. Miller commit 2f7ca90a0188b57a54d3b1159eb7874427a7e07a Author: Kuniyuki Iwashima Date: Tue Jun 21 10:19:13 2022 -0700 af_unix: Remove unix_table_locks. unix_table_locks are to protect the global hash table, unix_socket_table. The previous commit removed it, so let's clean up the unnecessary locks. Here is a test result on EC2 c5.9xlarge where 10 processes run concurrently in different netns and bind 100,000 sockets for each. without this series : 1m 38s with this series : 11s It is ~10x faster because the global hash table is split into 10 netns in this case. Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller include/net/af_unix.h | 1 - net/unix/af_unix.c | 42 ++++++++---------------------------------- net/unix/diag.c | 8 +------- 3 files changed, 9 insertions(+), 42 deletions(-) commit cf2f225e2653734e66e91c09e1cbe004bfd3d4a7 Author: Kuniyuki Iwashima Date: Tue Jun 21 10:19:12 2022 -0700 af_unix: Put a socket into a per-netns hash table. This commit replaces the global hash table with a per-netns one and removes the global one. We now link a socket in each netns's hash table so we can save some netns comparisons when iterating through a hash bucket. Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller include/net/af_unix.h | 1 - net/unix/af_unix.c | 50 ++++++++++++++++++++------------------------------ net/unix/diag.c | 9 +++------ 3 files changed, 23 insertions(+), 37 deletions(-) commit 79b05beaa5c340e1649dc7462e056ae33b916131 Author: Kuniyuki Iwashima Date: Tue Jun 21 10:19:11 2022 -0700 af_unix: Acquire/Release per-netns hash table's locks. This commit adds extra spin_lock/spin_unlock() for a per-netns hash table inside the existing ones for unix_table_locks. As of this commit, sockets are still linked in the global hash table. After putting sockets in a per-netns hash table and removing the old one in the next patch, we remove the global locks in the last patch. Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/unix/af_unix.c | 75 +++++++++++++++++++++++++++++++++++++----------------- net/unix/diag.c | 23 +++++++++++------ 2 files changed, 66 insertions(+), 32 deletions(-) commit b6e811383062f88212082714db849127fa95142c Author: Kuniyuki Iwashima Date: Tue Jun 21 10:19:10 2022 -0700 af_unix: Define a per-netns hash table. This commit adds a per netns hash table for AF_UNIX, which size is fixed as UNIX_HASH_SIZE for now. The first implementation defines a per-netns hash table as a single array of lock and list: struct unix_hashbucket { spinlock_t lock; struct hlist_head head; }; struct netns_unix { struct unix_hashbucket *hash; ... }; But, Eric pointed out memory cost that the structure has holes because of sizeof(spinlock_t), which is 4 (or more if LOCKDEP is enabled). [0] It could be expensive on a host with thousands of netns and few AF_UNIX sockets. For this reason, a per-netns hash table uses two dense arrays. struct unix_table { spinlock_t *locks; struct hlist_head *buckets; }; struct netns_unix { struct unix_table table; ... }; Note the length of the list has a significant impact rather than lock contention, so having shared locks can be an option. But, per-netns locks and lists still perform better than the global locks and per-netns lists. [1] Also, this patch adds a change so that struct netns_unix disappears from struct net if CONFIG_UNIX is disabled. [0]: https://lore.kernel.org/netdev/CANn89iLVxO5aqx16azNU7p7Z-nz5NrnM5QTqOzueVxEnkVTxyg@mail.gmail.com/ [1]: https://lore.kernel.org/netdev/20220617175215.1769-1-kuniyu@amazon.com/ Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller include/net/net_namespace.h | 2 ++ include/net/netns/unix.h | 6 ++++++ net/unix/af_unix.c | 38 ++++++++++++++++++++++++++++++++------ 3 files changed, 40 insertions(+), 6 deletions(-) commit f302d180c6d430ea99643b9b2b3407aedaa36703 Author: Kuniyuki Iwashima Date: Tue Jun 21 10:19:09 2022 -0700 af_unix: Include the whole hash table size in UNIX_HASH_SIZE. Currently, the size of AF_UNIX hash table is UNIX_HASH_SIZE * 2, the first half for bind()ed sockets and the second half for unbound ones. UNIX_HASH_SIZE * 2 is used to define the table and iterate over it. In some places, we use ARRAY_SIZE(unix_socket_table) instead of UNIX_HASH_SIZE * 2. However, we cannot use it anymore because we will allocate the hash table dynamically. Then, we would have to add UNIX_HASH_SIZE * 2 in many places, which would be troublesome. This patch adapts the UNIX_HASH_SIZE definition to include bound and unbound sockets and defines a new UNIX_HASH_MOD macro to ease calculations. Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller include/net/af_unix.h | 7 ++++--- net/unix/af_unix.c | 18 +++++++++--------- net/unix/diag.c | 6 ++---- 3 files changed, 15 insertions(+), 16 deletions(-) commit 340c3d337119ea177a98338be2e3bc62ee87ac80 Author: Kuniyuki Iwashima Date: Tue Jun 21 10:19:08 2022 -0700 af_unix: Clean up some sock_net() uses. Some functions define a net pointer only for one-shot use. Others call sock_net() redundantly even when a net pointer is available. Let's fix these and make the code simpler. Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/unix/af_unix.c | 33 ++++++++++++++------------------- net/unix/diag.c | 3 +-- 2 files changed, 15 insertions(+), 21 deletions(-) commit 82cd16902a51773cfc0ee05bbd1ab470db5181ab Author: Krzysztof Kozlowski Date: Mon Jun 20 19:57:16 2022 +0200 ARM: dts: exynos: add function and color to LED nodes in Odroid XU/XU3 Add common LED properties - the function and color - to LED nodes in Exynos5422 Odroid XU/XU3/XU3-Lite, so we can drop in some places deprecated label property. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220620175716.132143-9-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/exynos54xx-odroidxu-leds.dtsi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 99f6b77f74c88ac1bc4c81e089dd0cbbf882aea6 Author: Krzysztof Kozlowski Date: Mon Jun 20 19:57:15 2022 +0200 ARM: dts: exynos: add function and color to LED node in Odroid XU4 Add common LED properties - the function and color - to LED node in Exynos5422 Odroid XU4, so we can drop deprecated label property. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220620175716.132143-8-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/exynos5422-odroidxu4.dts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f0945faa4a1a23d288ca8b92abab10d5145f33a1 Author: Krzysztof Kozlowski Date: Mon Jun 20 19:57:14 2022 +0200 ARM: dts: exynos: add function and color to LED node in Odroid HC1 Add common LED properties - the function and color - to LED node in Exynos5422 Odroid HC1, so we can drop deprecated label property. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220620175716.132143-7-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/exynos5422-odroidhc1.dts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bcad13fca717a56cddb334eb131edba92c6b5494 Author: Krzysztof Kozlowski Date: Mon Jun 20 19:57:13 2022 +0200 ARM: dts: exynos: add function and color to LED nodes in Odroid X/X2 Add common LED properties - the function and color - to LED nodes in Exynos4412 Odroid X/X2, so we can drop in some places deprecated label property. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220620175716.132143-6-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/exynos4412-odroidx.dts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3e8368fdcee3c9072a41946f4a92517b5bfacb03 Author: Krzysztof Kozlowski Date: Mon Jun 20 19:57:12 2022 +0200 ARM: dts: exynos: add function and color to LED node in Odroid U3 Add common LED properties - the function and color - to LED node in Exynos4412 Odroid U3, so we can drop deprecated label property. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220620175716.132143-5-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/exynos4412-odroidu3.dts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a149eb5f1b118afe27a5b08d71c0abd2572be0a0 Author: Krzysztof Kozlowski Date: Mon Jun 20 19:57:11 2022 +0200 ARM: dts: exynos: add function and color to LED nodes in Itop Elite Add common LED properties - the function and color - to LED nodes in Exynos4412 Itop Elite, so we can drop in some places deprecated label property. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220620175716.132143-4-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/exynos4412-itop-elite.dts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ff4275fa0737f2312880d6fb0a4f582a73342465 Author: Krzysztof Kozlowski Date: Mon Jun 20 19:57:10 2022 +0200 ARM: dts: exynos: add function to LED nodes in Tiny4412 Add common LED property - the function - to LED nodes in Tiny4412. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220620175716.132143-3-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/exynos4412-tiny4412.dts | 3 +++ 1 file changed, 3 insertions(+) commit f64bbfca314663886575b6fde16a5ba9afcda0fb Author: Krzysztof Kozlowski Date: Mon Jun 20 19:57:09 2022 +0200 ARM: dts: exynos: add function to LED node in Origen 4210 Add common LED property - the function - to LED node in Origen 4210. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220620175716.132143-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/exynos4210-origen.dts | 2 ++ 1 file changed, 2 insertions(+) commit ebadc8a63645f7923dc63154ad8d290313f03101 Author: Krzysztof Kozlowski Date: Mon Jun 20 19:50:33 2022 +0200 ARM: dts: exynos: add function and color to aat1290 flash LED node in Galaxy S3 Add common LED properties - the function and color - to aat1290 flash LED node in Galaxy S3, so we can drop deprecated label property. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220620175033.130468-4-krzysztof.kozlowski@linaro.org Acked-by: Jacek Anaszewski arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit efbf2c262c89f78f99fd781c77b7305fac23c3c7 Author: Krzysztof Kozlowski Date: Mon Jun 20 19:50:32 2022 +0200 ARM: dts: exynos: align aat1290 flash LED node with bindings in Galaxy S3 The bindings expect aat1290 flash LED child node to be named "led". Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220620175033.130468-3-krzysztof.kozlowski@linaro.org Acked-by: Jacek Anaszewski arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffd3018bf7764f139e4378f303e6a97cf6b3687c Merge: a80d8fb70cc7 048fcbb71a0e Author: David S. Miller Date: Wed Jun 22 12:56:58 2022 +0100 Merge branch 'mlxsw-unified-bridge-conversion-part-2' Ido Schimmel says: ==================== mlxsw: Unified bridge conversion - part 2/6 This is the second part of the conversion of mlxsw to the unified bridge model. Part 1 was merged in commit 4336487e30c3 ("Merge branch 'mlxsw-unified-bridge-conversion-part-1'") which includes details about the new model and the motivation behind the conversion. This patchset does not begin the conversion, but rather prepares the code base for it. Patchset overview: Patch #1 removes an unnecessary field from one of the FID families. Patches #2-#7 make various improvements in the layer 2 multicast code, making it more receptive towards upcoming changes. Patches #8-#10 prepare the CONFIG_PROFILE command for the unified bridge model. This command will be used to enable the new model in the last patchset. Patches #11-#13 perform small changes in the FID code, preparing it for upcoming changes. ==================== Signed-off-by: David S. Miller commit 048fcbb71a0e4d8a30b7bd0a497cd032b25d1186 Author: Amit Cohen Date: Tue Jun 21 11:33:45 2022 +0300 mlxsw: spectrum_fid: Implement missing operations for rFID and dummy FID rFID and dummy FID do not support FID->VNI mapping. Currently, these families do not implement the vni_{set, clear}() operations. Instead, there is a check if these functions are implemented. Similarly, 'SFMR.nve_tunnel_flood_ptr' is not relevant for rFID and dummy FID, therefore, these families do not implement nve_flood_index_{set, clear}(). Align the behavior to other unsupported operations, implement the functions and just return an error or warn. Then, checks like '!ops->vni_set' can be removed. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 58 ++++++++++++++++++++-- 1 file changed, 54 insertions(+), 4 deletions(-) commit 784763e59225c3baf7d97fbcda5bc7bb0dc77380 Author: Amit Cohen Date: Tue Jun 21 11:33:44 2022 +0300 mlxsw: spectrum_fid: Use 'fid->fid_offset' when setting VNI The previous patch added 'fid_offset' field to FID structure. Now, this field can be used when VNI is set using SFMR register. Currently 'fid_offset' is set to zero, instead, use the new field which is now set to zero and in the future will be changed. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 25 ++++++++++++---------- 1 file changed, 14 insertions(+), 11 deletions(-) commit 736bf371d2d460c9ded1073e8490be1d294ee177 Author: Amit Cohen Date: Tue Jun 21 11:33:43 2022 +0300 mlxsw: spectrum_fid: Save 'fid_offset' as part of FID structure SFMR register contains a 'fid_offset' field which is used when flooding tables of type FID offset are used. Currently, the driver sets this field to zero, as flooding tables of type FID are used. Using unified bridge model, the driver will use FID offset flooding tables. As preparation, add 'fid_offset' to 'struct mlxsw_sp_fid'. Then, use this field instead of passing zero to the function that configures SFMR. Set the new field as part of 'ops->setup()', for that, implement this function for dummy FID and rFID. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 29 +++++++++++++++++----- 1 file changed, 23 insertions(+), 6 deletions(-) commit 6131d9630d986495fc660a64c0df5fd648569a1b Author: Amit Cohen Date: Tue Jun 21 11:33:42 2022 +0300 mlxsw: pci: Query resources before and after issuing 'CONFIG_PROFILE' command Currently, as part of mlxsw_pci_init(), resources are queried from firmware before issuing the 'CONFIG_PROFILE' command. There are resources whose size depend on the enablement of the unified bridge model that is performed via 'CONFIG_PROFILE' command. As a preparation for unified bridge model, add an additional query after issuing this command. Both queries are required as KVD sizes are read from firmware and then are configured as part of 'CONFIG_PROFILE' command. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/pci.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 89df3c6261f271c550f120b5ccf4d9c5132e870c Author: Amit Cohen Date: Tue Jun 21 11:33:41 2022 +0300 mlxsw: cmd: Increase 'config_profile.flood_mode' length Currently, the length of 'config_profile.flood_mode' is defined as 2 bits, while the correct length is 3 bits. As preparation for unified bridge model, which will use the whole field length, fix it and increase the field to the correct size. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70b34c77f1273f4940f1bc5c3b7d15ee8297073f Author: Amit Cohen Date: Tue Jun 21 11:33:40 2022 +0300 mlxsw: Add enumerator for 'config_profile.flood_mode' Currently magic constant is used for setting 'flood_mode' as part of config profile. As preparation for unified bridge model, which will require different 'flood_mode', add a dedicated enumerator for this field and use it as part of 'struct mlxsw_config_profile'. Add the relevant value for unified bridge model. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/cmd.h | 21 +++++++++++++++------ drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++-- 2 files changed, 17 insertions(+), 8 deletions(-) commit 0100f840750ceac7c5774b4afca3b145d5631340 Author: Amit Cohen Date: Tue Jun 21 11:33:39 2022 +0300 mlxsw: spectrum_switchdev: Handle error in mlxsw_sp_bridge_mdb_mc_enable_sync() The above mentioned function calls two functions which return values, but it ignores them. Check if the return value is an error, handle it in such case and return an error back to the caller. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 43 ++++++++++++++++------ 1 file changed, 31 insertions(+), 12 deletions(-) commit fd66f5184c28dd07ae7efeb2fa9a93c9c85ba66c Author: Amit Cohen Date: Tue Jun 21 11:33:38 2022 +0300 mlxsw: spectrum_switchdev: Convert mlxsw_sp_mc_write_mdb_entry() to return int The function returns 'false' upon failure and 'true' upon success. Convert it to the usual scheme of returning integer error codes and align the callers. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit c96a9919c79e61e791c561a9c9c2ce56371866a1 Author: Amit Cohen Date: Tue Jun 21 11:33:37 2022 +0300 mlxsw: spectrum_switchdev: Add error path in mlxsw_sp_port_mc_disabled_set() The above mentioned function just returns an error in case that mlxsw_sp_bridge_ports_flood_table_set() fails. That means that the previous configurations are not cleaned. Fix it by adding error path to clean the configurations in case of error. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit a6f43b1dad800d816d62dc478e68eb5230a9465c Author: Amit Cohen Date: Tue Jun 21 11:33:36 2022 +0300 mlxsw: spectrum_switchdev: Simplify mlxsw_sp_port_mc_disabled_set() The above mentioned function is called for each port in bridge when the multicast behavior is changed. Currently, it updates all the relevant MID entries only for the first call, but the update of flooding per port is done only for the port that it was called for it. To simplify this behavior, it is possible to handle flooding for all the ports in the first call, then, the other calls will do nothing. For that, new functions are required to set flooding for all ports, no 'struct mlxsw_sp_port' is required. This issue was found while extending this function for unified bridge model, the above mentioned change will ease the extending later. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 73 +++++++++++++++++++--- 1 file changed, 66 insertions(+), 7 deletions(-) commit 6e66d2e4b3a20655262569ec394f79a2eee87028 Author: Amit Cohen Date: Tue Jun 21 11:33:35 2022 +0300 mlxsw: spectrum_switchdev: Do not set 'multicast_enabled' twice The function mlxsw_sp_port_mc_disabled_set() sets 'bridge_device->multicast_enabled' twice. Remove the unnecessary setting. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 -- 1 file changed, 2 deletions(-) commit 21c795f8494a152dbff86c50fe216e610a77bb0f Author: Amit Cohen Date: Tue Jun 21 11:33:34 2022 +0300 mlxsw: spectrum_switchdev: Pass 'struct mlxsw_sp' to mlxsw_sp_bridge_mdb_mc_enable_sync() Currently the above mentioned function gets 'struct mlxsw_sp_port', while the only use of this structure is to get 'mlxsw_sp_port->mlxsw_sp'. Instead, pass 'struct mlxsw_sp'. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 22aae52076cd727f28f7dcdc362bf62c3658cf82 Author: Amit Cohen Date: Tue Jun 21 11:33:33 2022 +0300 mlxsw: Remove lag_vid_valid indication Currently 'struct mlxsw_sp_fid_family' has a field which indicates if 'lag_vid' is valid for use in SFD register. This is a leftover from using .1Q FIDs instead of emulating them using .1D FIDs. Currently when .1Q FIDs are emulated using .1D FIDs, this field is true for both families, so there is no reason to maintain it. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 - drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 8 -------- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 3 +-- 3 files changed, 1 insertion(+), 11 deletions(-) commit 644ed467c773ae7649cb54c9709aabc6f2984850 Merge: 6b183919f705 f69a10f84cb5 Author: Mark Brown Date: Wed Jun 22 12:14:20 2022 +0100 ASoC: Merge fixes Needed for new development. commit 4459a59807cfebd9f013175010fa4e53514ade61 Author: Rex-BC Chen Date: Tue May 3 17:38:56 2022 +0800 arm64: dts: mediatek: Add infra #reset-cells property for MT8195 We will use mediatek clock reset as infracfg_ao reset instead of ti-syscon. To support this, remove property of ti reset and add property of #reset-cells for mediatek clock reset. Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220503093856.22250-17-rex-bc.chen@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195.dtsi | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit a30cc07f9e321e5b9ed26b3f14ee9637fd39b753 Author: Rex-BC Chen Date: Tue May 3 17:38:55 2022 +0800 arm64: dts: mediatek: Add infra #reset-cells property for MT8192 To support reset of infra, we add property of #reset-cells. Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220503093856.22250-16-rex-bc.chen@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8192.dtsi | 1 + 1 file changed, 1 insertion(+) commit 0bf28fc40d89b1a3e00d1b79473bad4e9ca20ad1 Author: Dongli Zhang Date: Sat Jun 11 01:25:14 2022 -0700 swiotlb: panic if nslabs is too small Panic on purpose if nslabs is too small, in order to sync with the remap retry logic. In addition, print the number of bytes for tlb alloc failure. Signed-off-by: Dongli Zhang Signed-off-by: Christoph Hellwig kernel/dma/swiotlb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 04c14e8e38b06edf934e9bb0cc504afd94d593fb Author: Dongli Zhang Date: Sat Jun 11 01:25:13 2022 -0700 x86/swiotlb: fix param usage in boot-options.rst Fix the usage of swiotlb param in kernel doc. Signed-off-by: Dongli Zhang Signed-off-by: Christoph Hellwig Documentation/x86/x86_64/boot-options.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 466298c65678e7a2bd7bd268fd3776de73e96a4b Author: Dongli Zhang Date: Sat Jun 11 01:25:12 2022 -0700 swiotlb: remove a useless return in swiotlb_init Both swiotlb_init_remap() and swiotlb_init() have return type void. Signed-off-by: Dongli Zhang Signed-off-by: Christoph Hellwig kernel/dma/swiotlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a3c7d0841ae24d28a15bbf87ee7d08614cec957 Author: Dongli Zhang Date: Sat Jun 11 01:25:11 2022 -0700 swiotlb: remove the unused swiotlb_force declaration The 'swiotlb_force' is removed since commit c6af2aa9ffc9 ("swiotlb: make the swiotlb_init interface more useful"). Signed-off-by: Dongli Zhang Signed-off-by: Christoph Hellwig include/linux/swiotlb.h | 1 - 1 file changed, 1 deletion(-) commit 0dc987b699ce4266450d407d6d79d41eab88c5d0 Author: Juha-Pekka Heikkila Date: Fri Jun 10 15:12:03 2022 +0300 drm/i915/display: Add smem fallback allocation for dpt Add fallback smem allocation for dpt if stolen memory allocation failed. Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220610121205.29645-1-juhapekka.heikkila@gmail.com drivers/gpu/drm/i915/display/intel_dpt.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit d976521a995a817007ae3f471ac22b93b1bd39f7 Author: CQ Tang Date: Fri Jun 10 15:12:04 2022 +0300 drm/i915: extend i915_vma_pin_iomap() In the future display might try call this with a normal smem object, which doesn't require PIN_MAPPABLE underneath in order to CPU map the pages (unlike stolen). Extend i915_vma_pin_iomap() to directly use i915_gem_object_pin_map() for such cases. This change was suggested by Chris P Wilson, that we pin the smem with i915_gem_object_pin_map_unlocked(). v2 (jheikkil): Change i915_gem_object_pin_map_unlocked to i915_gem_object_pin_map Signed-off-by: CQ Tang Signed-off-by: Juha-Pekka Heikkila Cc: Chris Wilson Cc: Jari Tahvanainen Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld [mauld: tweak commit message, plus minor checkpatch fix] Link: https://patchwork.freedesktop.org/patch/msgid/20220610121205.29645-2-juhapekka.heikkila@gmail.com drivers/gpu/drm/i915/i915_vma.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) commit afd5cb3907eaf43e4ca88c162b92143551f0323e Author: Juha-Pekka Heikkila Date: Fri Jun 10 15:12:05 2022 +0300 drm/i915: don't leak lmem mapping in vma_evict Don't leak lmem mapping in vma_evict, move __i915_vma_iounmap outside i915_vma_is_map_and_fenceable. Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220610121205.29645-3-juhapekka.heikkila@gmail.com drivers/gpu/drm/i915/i915_vma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 33c39140cc298e0d4e36083cb9a665a837773a60 Author: Krzysztof Kozlowski Date: Sun May 29 12:49:27 2022 +0200 ARM: dts: ast2600-evb-a1: fix board compatible The AST2600 EVB A1 board should have dedicated compatible. Fixes: a72955180372 ("ARM: dts: aspeed: ast2600evb: Add dts file for A1 and A0") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220529104928.79636-6-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/aspeed-ast2600-evb-a1.dts | 1 + 1 file changed, 1 insertion(+) commit aa5e06208500a0db41473caebdee5a2e81d5a277 Author: Krzysztof Kozlowski Date: Sun May 29 12:49:26 2022 +0200 ARM: dts: ast2600-evb: fix board compatible The AST2600 EVB board should have dedicated compatible. Fixes: 2ca5646b5c2f ("ARM: dts: aspeed: Add AST2600 and EVB") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220529104928.79636-5-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/aspeed-ast2600-evb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30b276fca5c0644f3cb17bceb1bd6a626c670184 Author: Krzysztof Kozlowski Date: Sun May 29 12:49:25 2022 +0200 ARM: dts: ast2500-evb: fix board compatible The AST2500 EVB board should have dedicated compatible. Fixes: 02440622656d ("arm/dst: Add Aspeed ast2500 device tree") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220529104928.79636-4-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/aspeed-ast2500-evb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae8980247d5af8528145713e07f1338abc57a00d Author: David Wang Date: Tue May 31 09:10:59 2022 +0800 dt-bindings: arm: aspeed: document board compatibles Document jabil board compatible. Signed-off-by: David Wang Link: https://lore.kernel.org/r/20220531011100.882643-2-David_Wang6097@jabil.com Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/arm/aspeed/aspeed.yaml | 1 + 1 file changed, 1 insertion(+) commit f77024c8014766575db03c3c2d904299af43607e Author: Krzysztof Kozlowski Date: Sun May 29 12:49:23 2022 +0200 dt-bindings: arm: aspeed: document board compatibles Document all compatibles used in existing upstreamed Aspeed AST2400, AST2500 and AST2600 based boards. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220529104928.79636-2-krzysztof.kozlowski@linaro.org .../devicetree/bindings/arm/aspeed/aspeed.yaml | 83 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 84 insertions(+) commit e244a46a529a9a4c43ae3a2b4bf613e260ec8f81 Author: Maximilian Luz Date: Tue Jun 14 21:41:17 2022 +0200 platform/surface: aggregator: Reserve more event- and target-categories With the introduction of the Surface Laptop Studio, more event- and target categories have been added. Therefore, increase the number of reserved events and extend the enum of know target categories to accommodate this. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220614194117.4118897-1-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/surface/aggregator/trace.h | 80 +++++++++++++++------------ include/linux/surface_aggregator/serial_hub.h | 75 +++++++++++++------------ 2 files changed, 85 insertions(+), 70 deletions(-) commit 31a1e4a5c104d3b235d023ea754e22f43863d6c3 Author: Tetsuo Handa Date: Fri Jun 10 14:41:58 2022 +0900 platform/surface: avoid flush_scheduled_work() usage Use local wq in order to avoid flush_scheduled_work() usage. Signed-off-by: Tetsuo Handa Reviewed-by: Maximilian Luz Tested-by: Maximilian Luz Link: https://lore.kernel.org/r/63ec2d45-c67c-1134-f6d3-490c8ba67a01@I-love.SAKURA.ne.jp Signed-off-by: Hans de Goede drivers/platform/surface/surface_acpi_notify.c | 27 +++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) commit ef233eafe5adc54ddc39a1b6cc483dddc744bf97 Author: Shyam Sundar S K Date: Thu Jun 9 01:02:12 2022 +0530 platform/x86: Move AMD platform drivers to separate directory Currently, AMD supported platform drivers are grouped under generic "x86" folder structure. Move the current drivers (amd-pmc and amd_hsmp) to a separate directory. This would also mean the newer driver submissions to pdx86 subsystem in the future will also land in AMD specific directory. Reviewed-by: Naveen Krishna Chatradhi Tested-by: Suma Hegde Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20220608193212.2827257-1-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede MAINTAINERS | 4 ++-- drivers/platform/x86/Kconfig | 27 +-------------------- drivers/platform/x86/Makefile | 3 +-- drivers/platform/x86/amd/Kconfig | 31 +++++++++++++++++++++++++ drivers/platform/x86/amd/Makefile | 10 ++++++++ drivers/platform/x86/{amd_hsmp.c => amd/hsmp.c} | 0 drivers/platform/x86/{amd-pmc.c => amd/pmc.c} | 0 7 files changed, 45 insertions(+), 30 deletions(-) commit 5b54b4d4b46348265bf1ceb001473f42c71d8e4a Author: Stephen Kitt Date: Tue Jun 7 20:46:35 2022 +0200 platform/x86: thinkpad_acpi: Use backlight helper Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Cc: Henrique de Moraes Holschuh Cc: Hans de Goede Cc: Mark Gross Cc: ibm-acpi-devel@lists.sourceforge.net Cc: platform-driver-x86@vger.kernel.org Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20220607184635.1127913-5-steve@sk2.org Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/thinkpad_acpi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 537c7933c8e4dbc0064bf3e84d3a36d92ea66952 Author: Stephen Kitt Date: Tue Jun 7 20:46:34 2022 +0200 platform/x86: compal-laptop: Use backlight helper Instead of manually checking the power state in struct backlight_properties, use backlight_is_blank(). Signed-off-by: Stephen Kitt Cc: Cezary Jackiewicz Cc: Hans de Goede Cc: Mark Gross Cc: platform-driver-x86@vger.kernel.org Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20220607184635.1127913-4-steve@sk2.org Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/compal-laptop.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3096ab5b902a35a6dc2d154ab60bd6de7ac323ee Author: Stephen Kitt Date: Tue Jun 7 20:46:33 2022 +0200 platform/x86: apple-gmux: Use backlight helper Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Cc: Hans de Goede Cc: Mark Gross Cc: platform-driver-x86@vger.kernel.org Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20220607184635.1127913-3-steve@sk2.org Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/apple-gmux.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 441ffc52d640733adddcce7f9e50996ea59731f3 Author: Stephen Kitt Date: Tue Jun 7 20:46:32 2022 +0200 platform/x86: acer-wmi: Use backlight helper Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Cc: "Lee, Chun-Yi" Cc: Hans de Goede Cc: Mark Gross Cc: platform-driver-x86@vger.kernel.org Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20220607184635.1127913-2-steve@sk2.org Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/acer-wmi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 755b249250df1b612d982f3b702c831b26ecdf73 Author: Mark Pearson Date: Fri Jun 3 13:02:12 2022 -0400 platform/x86: thinkpad-acpi: Enable AMT by default on supported systems By default the ACPI platform profile starts in balanced mode. On supported systems AMT is supposed to be enabled in balanced mode by default. When checking the capabilities during initialization, set up AMT to be enabled if it's supported. Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20220603170212.164963-4-markpearson@lenovo.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/thinkpad_acpi.c | 5 +++++ 1 file changed, 5 insertions(+) commit 867eb713180c73335447a9bceb6c4c4c3e9d47c4 Author: Mark Pearson Date: Fri Jun 3 13:02:11 2022 -0400 platform/x86: thinkpad-acpi: Add support for hotkey 0x131a On some AMD platforms if you press FN+T it will toggle whether automatic mode transitions are active. Recognize this keycode and use it to toggle AMT. Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20220603170212.164963-3-markpearson@lenovo.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/thinkpad_acpi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 46dcbc61b739b0822855875e7dd8d8f471f50253 Author: Mark Pearson Date: Fri Jun 3 13:02:10 2022 -0400 platform/x86: thinkpad-acpi: Add support for automatic mode transitions Some AMD Thinkpads support automatic mode transitions. The actual transition logic doesn't live in the `thinkpad_acpi` driver. The events to activate this logic come from this driver though. Populate these events when switching PSC power modes. Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20220603170212.164963-2-markpearson@lenovo.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/thinkpad_acpi.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 6fe391dd5d87cb166bccc66dfb603e1f3e41db5a Author: Mark Pearson Date: Fri Jun 3 13:02:09 2022 -0400 platform/x86: thinkpad-acpi: profile capabilities as integer Currently the active mode (PSC/MMC) is stored in an enum and queried throughout the driver. Other driver changes will enumerate additional submodes that are relevant to be tracked, so instead track PSC/MMC in a single integer variable. Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20220603170212.164963-1-markpearson@lenovo.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/thinkpad_acpi.c | 45 +++++++++++++++--------------------- 1 file changed, 18 insertions(+), 27 deletions(-) commit 8821931e614d8ff2f58a4b06b3f2fecc66a462b8 Author: Chang Yu Date: Tue Jun 21 21:52:34 2022 -0700 staging: r8188eu: Fixed some blank line coding style issues Added blank lines after variable declarations as per checkpatch.pl Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Chang Yu Link: https://lore.kernel.org/r/cf4d4f7a58c9ba4510bed6748f78491c91e3e6f3.1655872968.git.marcus.yu.56@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 7 +++++++ 1 file changed, 7 insertions(+) commit c99c8bc93844c7eb2b167d26dce4a9d18be96f45 Author: Chang Yu Date: Tue Jun 21 21:52:33 2022 -0700 staging: r8188eu: Fixed comment style Fixed block comments style as per checkpatch.pl and kernel coding style guide. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Chang Yu Link: https://lore.kernel.org/r/fe45dd24a6ffcb4902a5efacaae63028f7c7a68f.1655872968.git.marcus.yu.56@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 3ff13c76b04046cafce36625c619abca73e627f0 Author: Chang Yu Date: Tue Jun 21 21:52:32 2022 -0700 staging: r8188eu: Fixed two whitespace coding style issues Replaced spaces with tabs as per checkpatch.pl Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Chang Yu Link: https://lore.kernel.org/r/68cb57799d9139740f94eed9080e2d08c522e74c.1655872968.git.marcus.yu.56@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dd875fb747998b704ab76a8bc8b24f25b1ec3370 Author: Chang Yu Date: Tue Jun 21 21:52:31 2022 -0700 staging: r8188eu: Fixed two brace coding style issues Removed two pairs of unnecessary curly braces as per checkpatch.pl Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Chang Yu Link: https://lore.kernel.org/r/f08a494f324cf5a3b5ed73aab6b3a432cb1da67b.1655872968.git.marcus.yu.56@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 04b3b6ae8be7603b22b0404f4ac81bd1f439be8b Author: Chang Yu Date: Tue Jun 21 21:52:30 2022 -0700 staging: r8188eu: Fixed a function declaration coding style issue Added an identifier name for function definition argument 'struct timer_list *' as per checkpatch.pl Note that for the same line checkpatch.pl will also complain "extern should be avoided in .c". I am not very familiar with the codebase so I decided not to move the declaration to a header file. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Chang Yu Link: https://lore.kernel.org/r/778c21724752f2de136d82b31c9ffc2bf35ced55.1655872968.git.marcus.yu.56@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ad9232a99e0a390b2959f3a8180a8ae5703d140 Merge: 263929afa4d6 9dbdac024d4d Author: Greg Kroah-Hartman Date: Wed Jun 22 11:29:07 2022 +0200 Merge branch 'staging-octeon' of gitolite.kernel.org:/pub/scm/linux/kernel/git/gregkh/staging into staging-next This merges the movement of the octeon-usb driver out of drivers/staging/ into drivers/usb. Signed-off-by: Greg Kroah-Hartman * 'staging-octeon' of gitolite.kernel.org:/pub/scm/linux/kernel/git/gregkh/staging: staging: octeon-usb: move driver out of staging commit 105f3fd2f789e001ba449d4020e168ea2b5b64aa Merge: 2c8845fe9342 9dbdac024d4d Author: Greg Kroah-Hartman Date: Wed Jun 22 11:28:02 2022 +0200 Merge branch 'staging-octeon' of gitolite.kernel.org:/pub/scm/linux/kernel/git/gregkh/staging into usb-next This merges the movement of the octeon-usb driver out of drivers/staging/ into drivers/usb. Signed-off-by: Greg Kroah-Hartman * 'staging-octeon' of gitolite.kernel.org:/pub/scm/linux/kernel/git/gregkh/staging: staging: octeon-usb: move driver out of staging commit 4745ca43104b422354f06dc814d3f13661f217af Author: Shreenidhi Shedi Date: Wed Jun 1 15:48:20 2022 +0530 x86/vmware: Use BIT() macro for shifting VMWARE_CMD_VCPU_RESERVED is bit 31 and that would mean undefined behavior when shifting an int but the kernel is built with -fno-strict-overflow which will wrap around using two's complement. Use the BIT() macro to improve readability and avoid any potential overflow confusion because it uses an unsigned long. [ bp: Clarify commit message. ] Signed-off-by: Shreenidhi Shedi Signed-off-by: Borislav Petkov Reviewed-by: Srivatsa S. Bhat (VMware) Link: https://lore.kernel.org/r/20220601101820.535031-1-sshedi@vmware.com arch/x86/kernel/cpu/vmware.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 62a4ddcb79e073465f21c5cf84d80a2f22820c39 Author: Jiang Jian Date: Tue Jun 21 21:51:40 2022 +0800 GPU: drm: drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: drivers/gpu/drm/drm_ioctl.c line: 86 * means the the unique name for the master node just opening is _not_ filled changed to * means the unique name for the master node just opening is _not_ filled Signed-off-by: Jiang Jian Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20220621135140.12200-1-jiangjian@cdjrlc.com drivers/gpu/drm/drm_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc6934d5ae007ad53c88c3e0b9685160a39ba896 Author: Jiang Jian Date: Tue Jun 21 21:44:01 2022 +0800 drm: panel-orientation-quirks: drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: drivers/gpu/drm/drm_panel_orientation_quirks.c line: 196 * GPD Pocket, note that the the DMI data is less generic then changed to * GPD Pocket, note that the DMI data is less generic then Signed-off-by: Jiang Jian Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20220621134401.10290-1-jiangjian@cdjrlc.com drivers/gpu/drm/drm_panel_orientation_quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e179024e4be8bdf00edc2d9a905215dbacf322b1 Author: Jiang Jian Date: Tue Jun 21 21:05:50 2022 +0800 drm/vc4: drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: drivers/gpu/drm/vc4/vc4_regs.h line: 267 /* Set when the the downstream tries to read from the display FIFO changed to /* Set when the downstream tries to read from the display FIFO Signed-off-by: Jiang Jian Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20220621130550.126915-1-jiangjian@cdjrlc.com drivers/gpu/drm/vc4/vc4_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cd6bb82ad96fda0021421fed8750a522dff2aa0 Author: Jiang Jian Date: Tue Jun 21 21:02:10 2022 +0800 drm/prime: drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: drivers/gpu/drm/drm_prime.c line: 842 * of the the buffer described by the provided sg_table. changed to * of the buffer described by the provided sg_table. Signed-off-by: Jiang Jian Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20220621130210.125461-1-jiangjian@cdjrlc.com drivers/gpu/drm/drm_prime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7828466cff6b38c2a8ea7cc43958e3abe04342c2 Author: Slark Xiao Date: Wed Jun 22 14:21:13 2022 +0800 USB: serial: use kmemdup instead of kmalloc + memcpy For code neat purpose, we can use kmemdup to replace kmalloc + memcpy. Signed-off-by: Slark Xiao Signed-off-by: Johan Hovold drivers/usb/serial/garmin_gps.c | 4 +--- drivers/usb/serial/opticon.c | 4 +--- drivers/usb/serial/sierra.c | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) commit 7482a65664c16cc88eb84d2b545a1fed887378a1 Author: katrinzhou Date: Tue Jun 21 13:49:26 2022 +0100 drm/i915/gem: add missing else Add missing else in set_proto_ctx_param() to fix coverity issue. Addresses-Coverity: ("Unused value") Fixes: d4433c7600f7 ("drm/i915/gem: Use the proto-context to handle create parameters (v5)") Suggested-by: Tvrtko Ursulin Signed-off-by: katrinzhou [tursulin: fixup alignment] Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220621124926.615884-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gem/i915_gem_context.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 14d6a086f6b91238873d3363f840a91b3aa062de Author: pengfuyuan Date: Thu Jun 16 15:08:03 2022 +0800 drm/i915: Fix spelling typo in comment Fix spelling typo in comment. Reported-by: k2ci Signed-off-by: pengfuyuan Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/tencent_7B226C4A9BC2B5EEB37B70C188B5015D290A@qq.com drivers/gpu/drm/i915/gem/i915_gem_tiling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c8845fe9342b8801185b4c1b9261c532901fafd Author: Amelie Delaunay Date: Tue Jun 21 17:23:50 2022 +0200 usb: dwc2: host: add TPL support The Target Peripheral List (TPL) is used to identify targeted devices during Embedded Host compliance testing. The user can add "tpl-support" in the device tree to enable it. Signed-off-by: Amelie Delaunay Signed-off-by: Fabrice Gasnier Acked-by: Minas Harutyunyan Link: https://lore.kernel.org/r/20220621152350.145745-5-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc2/hcd.c | 3 +++ 1 file changed, 3 insertions(+) commit a80d8fb70cc7864fd09e5e177627ee38d3a8fbdd Author: Oleksij Rempel Date: Mon Jun 20 13:56:01 2022 +0200 net: phy: dp83td510: add SQI support Convert MSE (mean-square error) values to SNR and split it SQI (Signal Quality Indicator) ranges. The used ranges are taken from "OPEN ALLIANCE - Advanced diagnostic features for 100BASE-T1 automotive Ethernet PHYs" specification. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20220620115601.2035452-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski drivers/net/phy/dp83td510.c | 49 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit b1f01b4bd7ad7f642d896cb9d6f82ec34043b612 Author: Lukas Wunner Date: Mon Jun 20 11:28:39 2022 +0200 net: phy: smsc: Deduplicate interrupt acknowledgement upon phy_init_hw() Since commit 4c0d2e96ba05 ("net: phy: consider that suspend2ram may cut off PHY power"), phy_init_hw() invokes both, the ->config_init() and ->config_intr() callbacks. In the SMSC PHY driver, the latter acknowledges stale interrupts, hence there's no longer a need to acknowledge them in the former as well. There are no other callers of ->config_init() besides phy_init_hw(). Drop the redundant code. Signed-off-by: Lukas Wunner Link: https://lore.kernel.org/r/0254edf48bddc96c6248c4414043a3699e94614a.1655716767.git.lukas@wunner.de Signed-off-by: Jakub Kicinski drivers/net/phy/smsc.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 00bcb550dc60f73d593d2dbb718c4f521c7d7be8 Author: Andy Shevchenko Date: Sat May 7 13:01:46 2022 +0300 powerpc/52xx: Get rid of of_node assignment Let GPIO library assign of_node from the parent device. This allows to move GPIO library and drivers to use fwnode APIs instead of being stuck with OF-only interfaces. Signed-off-by: Andy Shevchenko Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220507100147.5802-3-andriy.shevchenko@linux.intel.com arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit de06fba62af64144aca6f8a8bedbc848d2e5b440 Author: Andy Shevchenko Date: Sat May 7 13:01:45 2022 +0300 powerpc/mpc5xxx: Switch mpc5xxx_get_bus_frequency() to use fwnode Switch mpc5xxx_get_bus_frequency() to use fwnode in order to help cleaning up other parts of the kernel from OF specific code. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Chris Packham # for i2c-mpc Acked-by: Wolfram Sang # for the I2C part Acked-by: Mark Brown Acked-by: Marc Kleine-Budde # for mscan/mpc5xxx_can Acked-by: Damien Le Moal Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220507100147.5802-2-andriy.shevchenko@linux.intel.com arch/powerpc/include/asm/mpc5xxx.h | 9 +++++- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 2 +- arch/powerpc/sysdev/mpc5xxx_clocks.c | 41 +++++++++++++----------- drivers/ata/pata_mpc52xx.c | 2 +- drivers/i2c/busses/i2c-mpc.c | 7 ++-- drivers/net/can/mscan/mpc5xxx_can.c | 2 +- drivers/net/ethernet/freescale/fec_mpc52xx.c | 2 +- drivers/net/ethernet/freescale/fec_mpc52xx_phy.c | 3 +- drivers/net/ethernet/freescale/fs_enet/mii-fec.c | 4 +-- drivers/spi/spi-mpc52xx.c | 2 +- drivers/tty/serial/mpc52xx_uart.c | 4 +-- 11 files changed, 44 insertions(+), 34 deletions(-) commit 6d056b7254f9954522b7bb9947c8779a013d189f Author: Andy Shevchenko Date: Sat May 7 13:01:44 2022 +0300 powerpc/52xx: Remove dead code, i.e. mpc52xx_get_xtal_freq() It seems mpc52xx_get_xtal_freq() is not used anywhere. Remove dead code. Signed-off-by: Andy Shevchenko Reviewed-by: Wolfram Sang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220507100147.5802-1-andriy.shevchenko@linux.intel.com arch/powerpc/include/asm/mpc52xx.h | 1 - arch/powerpc/platforms/52xx/mpc52xx_common.c | 37 ---------------------------- 2 files changed, 38 deletions(-) commit 882c835b71e22ca82361dab3b60b85b557abd72f Author: Jiang Jian Date: Tue Jun 21 20:53:21 2022 +0800 cxl: drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: drivers/misc/cxl/cxl.h line: 1107 +/* check if the given pci_dev is on the the cxl vphb bus */ changed to +/* check if the given pci_dev is on the cxl vphb bus */ Signed-off-by: Jiang Jian Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220621125321.122280-1-jiangjian@cdjrlc.com drivers/misc/cxl/cxl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 772251742262bd651529a3cea3ee756b71e95a29 Author: Andy Gospodarek Date: Tue Jun 21 17:54:02 2022 +0000 samples/bpf: fixup some tools to be able to support xdp multibuffer This changes the section name for the bpf program embedded in these files to "xdp.frags" to allow the programs to be loaded on drivers that are using an MTU greater than PAGE_SIZE. Rather than directly accessing the buffers, the packet data is now accessed via xdp helper functions to provide an example for those who may need to write more complex programs. v2: remove new unnecessary variable Signed-off-by: Andy Gospodarek Acked-by: John Fastabend Acked-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/20220621175402.35327-1-gospo@broadcom.com Signed-off-by: Alexei Starovoitov samples/bpf/xdp1_kern.c | 11 ++++++++--- samples/bpf/xdp2_kern.c | 11 ++++++++--- samples/bpf/xdp_tx_iptunnel_kern.c | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) commit e34cc16a8042488efad86f121c94dcda5cd6f0c4 Author: Varun Prakash Date: Sun Jun 12 17:43:40 2022 +0530 scsi: MAINTAINERS: Update cxgb3i and cxgb4i maintainer Link: https://lore.kernel.org/r/20220612121340.6746-1-varun@chelsio.com Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 90c3ca3f247d1a95fc47232e9f0aef114becd605 Author: Tetsuo Handa Date: Thu Jun 9 22:26:48 2022 +0900 scsi: mpt3sas: Remove flush_scheduled_work() call It seems to me that mpt3sas driver is using dedicated workqueues and is not calling schedule{,_delayed}_work{,_on}(). Then, there will be no work to flush using flush_scheduled_work(). Link: https://lore.kernel.org/r/f3b97c7c-1094-4e46-20d8-4321716d6f3f@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 - 1 file changed, 1 deletion(-) commit cc06af0bbc21bcee40d57e3ee569d3a09741dafd Author: Changyuan Lyu Date: Tue Jun 21 18:11:25 2022 +0000 scsi: trace: Print driver_tag and scheduler_tag in SCSI trace Trace events like scsi_dispatch_cmd_start and scsi_dispatch_cmd_done are useful for tracking a command throughout its lifetime. But for some ATA passthrough commands, the information printed in current logs is not enough to identify and match them. For example, if two threads send SMART cmd to the same disk at the same time, their trace logs may look the same, which makes it hard to match scsi_dispatch_cmd_done and scsi_dispatch_cmd_start. Printing tags can help us solve the problem. Further, if a command failed for some reason and then is retried, its driver_tag will change. So scheduler_tag is also included such that we can track the retries of a command. Link: https://lore.kernel.org/r/20220621181125.3211399-1-changyuanl@google.com Reviewed-by: Vishakha Channapattan Reviewed-by: Jolly Shah Reviewed-by: Bart Van Assche Signed-off-by: Changyuan Lyu Signed-off-by: Martin K. Petersen include/trace/events/scsi.h | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) commit bc98b503b111b92d1f51005b393615eaf689231f Author: Jiang Jian Date: Wed Jun 22 00:26:31 2022 +0800 scsi: sym53c8xx_2: Remove redundant "with" Remove redundant "with" in comment Link: https://lore.kernel.org/r/20220621162631.25353-1-jiangjian@cdjrlc.com Signed-off-by: Jiang Jian Signed-off-by: Martin K. Petersen drivers/scsi/sym53c8xx_2/sym_hipd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e448c8508d74ac7d9654e9f7957fb8ffda376eb1 Author: Jiang Jian Date: Tue Jun 21 23:01:36 2022 +0800 scsi: snic: Remove redundant "on" Remove redundant "on" in comment. Link: https://lore.kernel.org/r/20220621150136.9264-1-jiangjian@cdjrlc.com Signed-off-by: Jiang Jian Signed-off-by: Martin K. Petersen drivers/scsi/snic/snic_fwint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82ede9c19839079e7953a47895729852a440080c Author: Wolfram Sang Date: Tue Jun 21 16:46:53 2022 +0200 scsi: ufs: core: Fix typos in error messages Should be "retries" instead of "retires". Link: https://lore.kernel.org/r/20220621144653.62630-1-wsa+renesas@sang-engineering.com Signed-off-by: Wolfram Sang Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ebd676ff3b3f9a2db8d23a91eb3216fef8ce4568 Author: Jiang Jian Date: Tue Jun 21 22:23:46 2022 +0800 scsi: aacraid: Remove redundant "the" Remove redundant "the" in comment. Link: https://lore.kernel.org/r/20220621142346.6429-1-jiangjian@cdjrlc.com Signed-off-by: Jiang Jian Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b73b14300e9fe759494bb8484782b9f334f3d1eb Author: Jiang Jian Date: Tue Jun 21 22:20:12 2022 +0800 scsi: target: Remove duplicate "the" Remove redundant "the" in comment". Link: https://lore.kernel.org/r/20220621142012.4622-1-jiangjian@cdjrlc.com Signed-off-by: Jiang Jian Signed-off-by: Martin K. Petersen drivers/target/target_core_alua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 950d2867c1fb87a90e2f42c35d548e22733d4e0e Author: Jiang Jian Date: Tue Jun 21 18:31:19 2022 +0800 scsi: message: fusion: Drop redundant "the" Redundant "the" in the comments can be dropped. Link: https://lore.kernel.org/r/20220621103119.91492-1-jiangjian@cdjrlc.com Signed-off-by: Jiang Jian Signed-off-by: Martin K. Petersen drivers/message/fusion/mptspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e1397bc6adde78be2edf409bbdb25343560da0fe Author: Jiang Jian Date: Tue Jun 21 15:24:05 2022 +0800 scsi: hisi_sas: Align comments Properly align comment lines in slot_index_alloc_quirk_v2_hw(). Link: https://lore.kernel.org/r/20220621072405.34394-1-jiangjian@cdjrlc.com Signed-off-by: Jiang Jian Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit efef34cb4545d55c9ac9ccd501a6ce562e737736 Author: Zhang Jiaming Date: Fri Jun 17 18:11:03 2022 +0800 scsi: mpt3sas: Fix whitespace and spelling mistake There is a spelling mistake in _base_sas_ioc_info(). Change 'cant' to 'can't'. Also fix up whitespace. Link: https://lore.kernel.org/r/20220617101103.3162-1-jiaming@nfschina.com Signed-off-by: Zhang Jiaming Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 13d2d3428768c63259b6bf1d0940fc0c5cc866d7 Author: Ren Yu Date: Fri Jun 17 16:15:57 2022 +0800 scsi: mpt3sas: Fix typo in comment Spelling mistake in comment: non-succesfull -> non-successful. Link: https://lore.kernel.org/r/20220617081557.9009-1-renyu@nfschina.com Signed-off-by: Ren Yu Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 873cdda193fc501d20e4cf644e4415c463091f4d Author: Bo Liu Date: Thu Jun 16 22:04:30 2022 -0400 scsi: core: bsg: Remove usage of the deprecated ida_simple_xxx() API Use ida_alloc_xxx()/ida_free() instead of ida_simple_get()/ida_simple_remove(). The latter is deprecated and more verbose. Link: https://lore.kernel.org/r/20220617020430.2300-1-liubo03@inspur.com Signed-off-by: Bo Liu Signed-off-by: Martin K. Petersen block/bsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6e637b723d8277cac4d347ea671ab798b70d8fc9 Author: Mike Christie Date: Thu Jun 16 17:45:57 2022 -0500 scsi: libiscsi: Improve conn_send_pdu API The conn_send_pdu API is evil in that it returns a pointer to an iscsi_task, but that task might have been freed already so you can't touch it. This patch splits the task allocation and transmission, so functions like iscsi_send_nopout() can access the task before its sent and do whatever bookkeeping is needed before it is sent. Link: https://lore.kernel.org/r/20220616224557.115234-10-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/libiscsi.c | 85 ++++++++++++++++++++++++++++++++++++------------- include/scsi/libiscsi.h | 3 -- 2 files changed, 62 insertions(+), 26 deletions(-) commit 6d626150d6d1c14f2f3d4f907fd0d4381f2c0d35 Author: Mike Christie Date: Thu Jun 16 17:45:56 2022 -0500 scsi: iscsi: Try to avoid taking back_lock in xmit path We need the back lock when freeing a task, so we hold it when calling __iscsi_put_task() from the completion path to make it easier and to avoid having to retake it in that path. For iscsi_put_task() we just grabbed it while also doing the decrement on the refcount but it's only really needed if the refcount is zero and we free the task. This modifies iscsi_put_task() to just take the lock when needed then has the xmit path use it. Normally we will then not take the back lock from the xmit path. It will only be rare cases where the network is so fast that we get a response right after we send the header/data. Link: https://lore.kernel.org/r/20220616224557.115234-9-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/libiscsi.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit e1c6a7ec14290a0e371b09300685638f9009f2ab Author: Mike Christie Date: Thu Jun 16 17:45:55 2022 -0500 scsi: iscsi: Remove iscsi_get_task back_lock requirement We currently require that the back_lock is held when calling the functions that manipulate the iscsi_task refcount. The only reason for this is to handle races where we are handling SCSI-ml EH callbacks and the cmd is completing at the same time the normal completion path is running, and we can't return from the EH callback until the driver has stopped accessing the cmd. Holding the back_lock while also accessing the task->state made it simple to check that a cmd is completing and also get/put a refcount at the same time, and at the time we were not as concerned about performance. The problem is that we don't want to take the back_lock from the xmit path for normal I/O since it causes contention with the completion path if the user has chosen to try and split those paths on different CPUs (in this case abusing the CPUs and ignoring caching improves perf for some uses). Begins to remove the back_lock requirement for iscsi_get/put_task by removing the requirement for the get path. Instead of always holding the back_lock we detect if something has done the last put and is about to call iscsi_free_task(). A subsequent commit will then allow iSCSI code to do the last put on a task and only grab the back_lock if the refcount is now zero and it's going to call iscsi_free_task(). Link: https://lore.kernel.org/r/20220616224557.115234-8-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 19 ++++++++- drivers/scsi/libiscsi.c | 95 ++++++++++++++++++++++++++++------------- drivers/scsi/libiscsi_tcp.c | 6 ++- include/scsi/libiscsi.h | 2 +- 4 files changed, 89 insertions(+), 33 deletions(-) commit 533ac412fdb4cbc8ce282b1ee1991e03b2717625 Author: Mike Christie Date: Thu Jun 16 17:45:54 2022 -0500 scsi: iscsi: Remove unneeded task state check Commit 5923d64b7ab6 ("scsi: libiscsi: Drop taskqueuelock") added an extra task->state because for commit 6f8830f5bbab ("scsi: libiscsi: add lock around task lists to fix list corruption regression") we didn't know why we ended up with cmds on the list and thought it might have been a bad target sending a response while we were still sending the cmd. We were never able to get a target to send us a response early, because it turns out the bug was just a race in libiscsi/libiscsi_tcp where: 1. iscsi_tcp_r2t_rsp() queues a r2t to tcp_task->r2tqueue. 2. iscsi_tcp_task_xmit() runs iscsi_tcp_get_curr_r2t() and sees we have a r2t. It dequeues it and iscsi_tcp_task_xmit() starts to process it. 3. iscsi_tcp_r2t_rsp() runs iscsi_requeue_task() and puts the task on the requeue list. 4. iscsi_tcp_task_xmit() sends the data for r2t. This is the final chunk of data, so the cmd is done. 5. target sends the response. 6. On a different CPU from #3, iscsi_complete_task() processes the response. Since there was no common lock for the list, the lists/tasks pointers are not fully in sync, so could end up with list corruption. Since it was just a race on our side, remove the extra check and fix up the comments. Link: https://lore.kernel.org/r/20220616224557.115234-7-michael.christie@oracle.com Reviewed-by: Wu Bo Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/libiscsi.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 9b89153680f65ba5d9229e8082a9eeed7adbd360 Author: Mike Christie Date: Thu Jun 16 17:45:53 2022 -0500 scsi: iscsi_tcp: Drop target_alloc use For software iSCSI, we do a session per host so there is no need to set the target's can_queue since it's the same as the host one. Setting it just results in extra atomic checks in the main I/O path. Link: https://lore.kernel.org/r/20220616224557.115234-6-michael.christie@oracle.com Reviewed-by: Lee Duncan Reviewed-by: Wu Bo Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/iscsi_tcp.c | 1 - 1 file changed, 1 deletion(-) commit f93a722fa7b33204e91cd49f72803629f18053f4 Author: Mike Christie Date: Thu Jun 16 17:45:52 2022 -0500 scsi: iscsi_tcp: Tell net when there's more data If we have more data, set the MSG_SENDPAGE_NOTLAST in case we go down the sendpage path. Link: https://lore.kernel.org/r/20220616224557.115234-5-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/iscsi_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1d269765ee29da56b32818b7a08054484ed89f2 Author: Mike Christie Date: Thu Jun 16 17:45:51 2022 -0500 scsi: iscsi: Run recv path from workqueue We don't always want to run the recv path from the network softirq because when we have to have multiple sessions sharing the same CPUs, some sessions can eat up the NAPI softirq budget and affect other sessions or users. Allow us to queue the recv handling to the iscsi workqueue so we can have the scheduler/wq code try to balance the work and CPU use across all sessions' worker threads. Note: It wasn't the original intent of the change but a nice side effect is that for some workloads/configs we get a nice performance boost. For a simple read heavy test: fio --direct=1 --filename=/dev/dm-0 --rw=randread --bs=256K --ioengine=libaio --iodepth=128 --numjobs=4 where the iscsi threads, fio jobs, and rps_cpus share CPUs we see a 32% throughput boost. We also see increases for small I/O IOPs tests but it's not as high. Link: https://lore.kernel.org/r/20220616224557.115234-4-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/iscsi_tcp.c | 65 ++++++++++++++++++++++++++++++++++++++---------- drivers/scsi/iscsi_tcp.h | 2 ++ 2 files changed, 54 insertions(+), 13 deletions(-) commit 8af809966c0b34cfacd8da9a412689b8e9910354 Author: Mike Christie Date: Thu Jun 16 17:45:50 2022 -0500 scsi: iscsi: Add recv workqueue helpers Add helpers to allow the drivers to run their recv paths from libiscsi's workqueue. Link: https://lore.kernel.org/r/20220616224557.115234-3-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/libiscsi.c | 29 +++++++++++++++++++++++++++-- include/scsi/libiscsi.h | 4 ++++ 2 files changed, 31 insertions(+), 2 deletions(-) commit 4b9f8ce4d5e823e42944c5a0a4842b0f936365ad Author: Mike Christie Date: Thu Jun 16 17:45:49 2022 -0500 scsi: iscsi: Rename iscsi_conn_queue_work() Rename iscsi_conn_queue_work() to iscsi_conn_queue_xmit() to reflect that it handles queueing of xmits only. Link: https://lore.kernel.org/r/20220616224557.115234-2-michael.christie@oracle.com Reviewed-by: Lee Duncan Reviewed-by: Wu Bo Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/cxgbi/libcxgbi.c | 2 +- drivers/scsi/iscsi_tcp.c | 2 +- drivers/scsi/libiscsi.c | 12 ++++++------ include/scsi/libiscsi.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) commit 31500e902759322ba3c64b60dabae2704e738df8 Author: Mike Christie Date: Thu Jun 16 17:27:38 2022 -0500 scsi: iscsi: Fix session removal on shutdown When the system is shutting down, iscsid is not running so we will not get a response to the ISCSI_ERR_INVALID_HOST error event. The system shutdown will then hang waiting on userspace to remove the session. This has libiscsi force the destruction of the session from the kernel when iscsi_host_remove() is called from a driver's shutdown callout. This fixes a regression added in qedi boot with commit d1f2ce77638d ("scsi: qedi: Fix host removal with running sessions") which made qedi use the common session removal function that waits on userspace instead of rolling its own kernel based removal. Link: https://lore.kernel.org/r/20220616222738.5722-7-michael.christie@oracle.com Fixes: d1f2ce77638d ("scsi: qedi: Fix host removal with running sessions") Tested-by: Nilesh Javali Reviewed-by: Lee Duncan Reviewed-by: Nilesh Javali Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/infiniband/ulp/iser/iscsi_iser.c | 4 ++-- drivers/scsi/be2iscsi/be_main.c | 2 +- drivers/scsi/bnx2i/bnx2i_iscsi.c | 2 +- drivers/scsi/cxgbi/libcxgbi.c | 2 +- drivers/scsi/iscsi_tcp.c | 4 ++-- drivers/scsi/libiscsi.c | 9 +++++++-- drivers/scsi/qedi/qedi_main.c | 9 ++++++--- include/scsi/libiscsi.h | 2 +- 8 files changed, 21 insertions(+), 13 deletions(-) commit 7bf01eb0d4f9b31c41aebb431169e7ce22a65ff7 Author: Mike Christie Date: Thu Jun 16 17:27:37 2022 -0500 scsi: qedi: Use QEDI_MODE_NORMAL for error handling When handling errors that lead to host removal use QEDI_MODE_NORMAL. There is currently no difference in behavior between NORMAL and SHUTDOWN, but in a subsequent commit we will want to know when we are called from the pci_driver shutdown callout vs remove/err_handler so we know when userspace is up. Link: https://lore.kernel.org/r/20220616222738.5722-6-michael.christie@oracle.com Tested-by: Nilesh Javali Reviewed-by: Lee Duncan Reviewed-by: Nilesh Javali Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb42856bfd54fda1cbc7c470fcf5db1596938f4f Author: Mike Christie Date: Thu Jun 16 17:27:36 2022 -0500 scsi: iscsi: Add helper to remove a session from the kernel During qedi shutdown we need to stop the iSCSI layer from sending new nops as pings and from responding to target ones and make sure there is no running connection cleanups. Commit d1f2ce77638d ("scsi: qedi: Fix host removal with running sessions") converted the driver to use the libicsi helper to drive session removal, so the above issues could be handled. The problem is that during system shutdown iscsid will not be running so when we try to remove the root session we will hang waiting for userspace to reply. Add a helper that will drive the destruction of sessions like these during system shutdown. Link: https://lore.kernel.org/r/20220616222738.5722-5-michael.christie@oracle.com Tested-by: Nilesh Javali Reviewed-by: Nilesh Javali Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_iscsi.c | 49 +++++++++++++++++++++++++++++++++++++ include/scsi/scsi_transport_iscsi.h | 1 + 2 files changed, 50 insertions(+) commit da2f132d00d93ba015286b5e8fdcd85cf0346339 Author: Mike Christie Date: Thu Jun 16 17:27:35 2022 -0500 scsi: iscsi: Clean up bound endpoints during shutdown In the next patch we allow drivers to drive session removal during shutdown. In this case iscsid will not be running, so we need to detect bound endpoints and disconnect them. This moves the bound ep check so we now always check. Link: https://lore.kernel.org/r/20220616222738.5722-4-michael.christie@oracle.com Tested-by: Nilesh Javali Reviewed-by: Nilesh Javali Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_iscsi.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 3328333b47f4163504267440ec0a36087a407a5f Author: Mike Christie Date: Thu Jun 16 17:27:34 2022 -0500 scsi: iscsi: Allow iscsi_if_stop_conn() to be called from kernel iscsi_if_stop_conn() is only called from the userspace interface but in a subsequent commit we will want to call it from the kernel interface to allow drivers like qedi to remove sessions from inside the kernel during shutdown. This removes the iscsi_uevent code from iscsi_if_stop_conn() so we can call it in a new helper. Link: https://lore.kernel.org/r/20220616222738.5722-3-michael.christie@oracle.com Tested-by: Nilesh Javali Reviewed-by: Nilesh Javali Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_iscsi.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit c577ab7ba5f3bf9062db8a58b6e89d4fe370447e Author: Mike Christie Date: Thu Jun 16 17:27:33 2022 -0500 scsi: iscsi: Fix HW conn removal use after free If qla4xxx doesn't remove the connection before the session, the iSCSI class tries to remove the connection for it. We were doing a iscsi_put_conn() in the iter function which is not needed and will result in a use after free because iscsi_remove_conn() will free the connection. Link: https://lore.kernel.org/r/20220616222738.5722-2-michael.christie@oracle.com Tested-by: Nilesh Javali Reviewed-by: Lee Duncan Reviewed-by: Nilesh Javali Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_iscsi.c | 2 -- 1 file changed, 2 deletions(-) commit f54912b228a8df6c0133e31bc75628677bb8c6e5 Author: Ren Zhijie Date: Sun Jun 19 19:54:32 2022 +0800 scsi: ufs: ufs-mediatek: Fix build error and type mismatch If CONFIG_PM_SLEEP is not set. make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-, will fail: drivers/ufs/host/ufs-mediatek.c: In function ‘ufs_mtk_vreg_fix_vcc’: drivers/ufs/host/ufs-mediatek.c:688:46: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘long unsigned int’ [-Wformat=] snprintf(vcc_name, MAX_VCC_NAME, "vcc-opt%u", res.a1); ~^ ~~~~~~ %lu drivers/ufs/host/ufs-mediatek.c: In function ‘ufs_mtk_system_suspend’: drivers/ufs/host/ufs-mediatek.c:1371:8: error: implicit declaration of function ‘ufshcd_system_suspend’; did you mean ‘ufs_mtk_system_suspend’? [-Werror=implicit-function-declaration] ret = ufshcd_system_suspend(dev); ^~~~~~~~~~~~~~~~~~~~~ ufs_mtk_system_suspend drivers/ufs/host/ufs-mediatek.c: In function ‘ufs_mtk_system_resume’: drivers/ufs/host/ufs-mediatek.c:1386:9: error: implicit declaration of function ‘ufshcd_system_resume’; did you mean ‘ufs_mtk_system_resume’? [-Werror=implicit-function-declaration] return ufshcd_system_resume(dev); ^~~~~~~~~~~~~~~~~~~~ ufs_mtk_system_resume cc1: some warnings being treated as errors The declaration of func "ufshcd_system_suspend()" depends on CONFIG_PM_SLEEP, so the function wrapper ufs_mtk_system_suspend() should wrapped by CONFIG_PM_SLEEP too. Link: https://lore.kernel.org/r/20220619115432.205504-1-renzhijie2@huawei.com Fixes: 3fd23b8dfb54 ("scsi: ufs: ufs-mediatek: Fix the timing of configuring device regulators") Reported-by: Hulk Robot Reviewed-by: Stanley Chu Signed-off-by: Ren Zhijie Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0a2af0bd6e48775646dea5f3524a52a74afae7e0 Merge: 0f95ee9a0c57 e4a8864f74e9 Author: Dave Airlie Date: Wed Jun 22 10:32:55 2022 +1000 Merge tag 'drm-misc-next-2022-06-17' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.20: UAPI Changes: Cross-subsystem Changes: * dma-buf: Add sync-file API; Set DMA mask for udmabuf devices * fbcon: Cleanups * fbdev: Disable firmware-device registration when first native driver loads * iosys-map: Documentation fixes Core Changes: * edid: Use struct drm_edid in more places * gem-cma-helper: Improve documentation * of: Add data-lane helpers and convert drivers * syncobj: Fixes Driver Changes: * amdgpu: Build fixes * ast: Support multiple outputs * bochs: Include * bridge: adv7511: I2C fixes; anx7625: Fix error handling; lt6505: Kconfig fixes * display/dp: Documentation fixes * display/dp-mst: Read extended DPCD capabilities during system resume * logicvc: Add new driver * magag200: Build fixes * nouveau: Cleanups * panel: Add backlight support; nt36672a: DT backlight support * qxl: Cleanups * sun4i: HDMI PHY cleanups * vc4: Add support for BCM2711 * virt-gpu: Avoid NULL dereference; Fix error checks; Cleanups * vkms: Allocate output buffer with vmalloc(); Fixes Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YqwriEhn0l4uO+Gn@linux-uq9g commit 0ffc781a19ed3030c792ad1a0e44e6e047bb9adc Author: Frederic Weisbecker Date: Wed Jun 8 16:40:20 2022 +0200 context_tracking: Rename __context_tracking_enter/exit() to __ct_user_enter/exit() The context tracking namespace is going to expand and some new functions will require even longer names. Start shrinking the context_tracking prefix to "ct" as is already the case for some existing macros, this will make the introduction of new functions easier. Acked-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne include/linux/context_tracking.h | 12 ++++++------ kernel/context_tracking.c | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) commit 7bf336fb8dac718febb7bf4fe79e1be0c5e4a631 Author: Zqiang Date: Sun Jun 12 10:02:25 2022 +0800 refscale: Convert test_lock spinlock to raw_spinlock In kernels built with CONFIG_PREEMPT_RT=y, spinlocks are replaced by rt_mutex, which can sleep. This means that acquiring a non-raw spinlock in a critical section where preemption is disabled can trigger the following BUG: BUG: scheduling while atomic: ref_scale_reade/76/0x00000002 Preemption disabled at: ref_lock_section+0x16/0x80 Call Trace: dump_stack_lvl+0x5b/0x82 dump_stack+0x10/0x12 __schedule_bug.cold+0x9c/0xad __schedule+0x839/0xc00 schedule_rtlock+0x22/0x40 rtlock_slowlock_locked+0x460/0x1350 rt_spin_lock+0x61/0xe0 ref_lock_section+0x29/0x80 rcu_scale_one_reader+0x52/0x60 ref_scale_reader+0x28d/0x490 kthread+0x128/0x150 ret_from_fork+0x22/0x30 This commit therefore converts spinlock to raw_spinlock. Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney kernel/rcu/refscale.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 1a5ca5e09811dec9472f50b98eeb3e3b2442d050 Author: Li Qiong Date: Sun Jun 12 14:48:25 2022 +0800 rcutorture: Handle failure of memory allocation functions This commit adds warnings for allocation failure during the mem_dump_obj() tests. It also terminates these tests upon such failure. Signed-off-by: Li Qiong Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3002153a91a9732a6d1d0bb95138593c7da15743 Author: Frederic Weisbecker Date: Fri Jun 10 15:03:57 2022 +0200 rcutorture: Fix ksoftirqd boosting timing and iteration The RCU priority boosting can fail in two situations: 1) If (nr_cpus= > maxcpus=), which means if the total number of CPUs is higher than those brought online at boot, then torture_onoff() may later bring up CPUs that weren't online on boot. Now since rcutorture initialization only boosts the ksoftirqds of the CPUs that have been set online on boot, the CPUs later set online by torture_onoff won't benefit from the boost, making RCU priority boosting fail. 2) The ksoftirqd kthreads are boosted after the creation of rcu_torture_boost() kthreads, which opens a window large enough for these rcu_torture_boost() kthreads to wait (despite running at FIFO priority) for ksoftirqds that are still running at SCHED_NORMAL priority. The issues can trigger for example with: ./kvm.sh --configs TREE01 --kconfig "CONFIG_RCU_BOOST=y" [ 34.968561] rcu-torture: !!! [ 34.968627] ------------[ cut here ]------------ [ 35.014054] WARNING: CPU: 4 PID: 114 at kernel/rcu/rcutorture.c:1979 rcu_torture_stats_print+0x5ad/0x610 [ 35.052043] Modules linked in: [ 35.069138] CPU: 4 PID: 114 Comm: rcu_torture_sta Not tainted 5.18.0-rc1 #1 [ 35.096424] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.14.0-0-g155821a-rebuilt.opensuse.org 04/01/2014 [ 35.154570] RIP: 0010:rcu_torture_stats_print+0x5ad/0x610 [ 35.198527] Code: 63 1b 02 00 74 02 0f 0b 48 83 3d 35 63 1b 02 00 74 02 0f 0b 48 83 3d 21 63 1b 02 00 74 02 0f 0b 48 83 3d 0d 63 1b 02 00 74 02 <0f> 0b 83 eb 01 0f 8e ba fc ff ff 0f 0b e9 b3 fc ff f82 [ 37.251049] RSP: 0000:ffffa92a0050bdf8 EFLAGS: 00010202 [ 37.277320] rcu: De-offloading 8 [ 37.290367] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000001 [ 37.290387] RDX: 0000000000000000 RSI: 00000000ffffbfff RDI: 00000000ffffffff [ 37.290398] RBP: 000000000000007b R08: 0000000000000000 R09: c0000000ffffbfff [ 37.290407] R10: 000000000000002a R11: ffffa92a0050bc18 R12: ffffa92a0050be20 [ 37.290417] R13: ffffa92a0050be78 R14: 0000000000000000 R15: 000000000001bea0 [ 37.290427] FS: 0000000000000000(0000) GS:ffff96045eb00000(0000) knlGS:0000000000000000 [ 37.290448] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 37.290460] CR2: 0000000000000000 CR3: 000000001dc0c000 CR4: 00000000000006e0 [ 37.290470] Call Trace: [ 37.295049] [ 37.295065] ? preempt_count_add+0x63/0x90 [ 37.295095] ? _raw_spin_lock_irqsave+0x12/0x40 [ 37.295125] ? rcu_torture_stats_print+0x610/0x610 [ 37.295143] rcu_torture_stats+0x29/0x70 [ 37.295160] kthread+0xe3/0x110 [ 37.295176] ? kthread_complete_and_exit+0x20/0x20 [ 37.295193] ret_from_fork+0x22/0x30 [ 37.295218] Fix this with boosting the ksoftirqds kthreads from the boosting hotplug callback itself and before the boosting kthreads are created. Fixes: ea6d962e80b6 ("rcutorture: Judge RCU priority boosting on grace periods, not callbacks") Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit 148df92fb14e5aab1c84b8ca4d2181e7b117290d Author: Paul E. McKenney Date: Thu Jun 2 19:53:52 2022 -0700 torture: Create kvm-check-branches.sh output in proper location Currently, kvm-check-branches.sh causes each kvm.sh invocation create a separate date-stamped directory, then after that invocation completes, moves it into the *-group/NNNN directory. This works, but makes it more difficult to monitor an ongoing run. This commit therefore uses the kvm.sh --datestamp argument to make kvm.sh put the output in the right place to start with, and also dispenses with the additional level of datestamping. (Those wanting datestamps can find them in the log files.) Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/kvm-check-branches.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 92366810644d5675043c792abb70eaf974a77384 Author: Zqiang Date: Sat May 21 14:56:26 2022 +0800 rcuscale: Fix smp_processor_id()-in-preemptible warnings Systems built with CONFIG_DEBUG_PREEMPT=y can trigger the following BUG while running the rcuscale performance test: BUG: using smp_processor_id() in preemptible [00000000] code: rcu_scale_write/69 CPU: 0 PID: 66 Comm: rcu_scale_write Not tainted 5.18.0-rc7-next-20220517-yoctodev-standard+ caller is debug_smp_processor_id+0x17/0x20 Call Trace: dump_stack_lvl+0x49/0x5e dump_stack+0x10/0x12 check_preemption_disabled+0xdf/0xf0 debug_smp_processor_id+0x17/0x20 rcu_scale_writer+0x2b5/0x580 kthread+0x177/0x1b0 ret_from_fork+0x22/0x30 Reproduction method: runqemu kvm slirp nographic qemuparams="-m 4096 -smp 8" bootparams="isolcpus=2,3 nohz_full=2,3 rcu_nocbs=2,3 rcutree.dump_tree=1 rcuscale.shutdown=false rcuscale.gp_async=true" -d The problem is that the rcu_scale_writer() kthreads fail to set the PF_NO_SETAFFINITY flags, which causes is_percpu_thread() to assume that the kthread's affinity might change at any time, thus the BUG noted above. This commit therefore causes rcu_scale_writer() to set PF_NO_SETAFFINITY in its kthread's ->flags field, thus preventing this BUG. Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney kernel/rcu/rcuscale.c | 1 + 1 file changed, 1 insertion(+) commit 8c0666d320f2fff6bc7cf76422bfbe90c20f53cc Author: Paul E. McKenney Date: Fri May 20 13:18:16 2022 -0700 rcutorture: Make failure indication note reader-batch overflow The loop scanning the pipesummary[] array currently skips the last element, which means that the diagnostics ignore those rarest of situations, namely where some readers persist across more than ten grace periods, but all other readers avoid spanning a full grace period. This commit therefore adjusts the scan to include the last element of this array. Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c92d7501699a5deb72a579f808500db5bb6f92a Author: Paul E. McKenney Date: Tue May 17 13:22:28 2022 -0700 torture: Adjust to again produce debugging information A recent change to the DEBUG_INFO Kconfig option means that simply adding CONFIG_DEBUG_INFO=y to the .config file and running "make oldconfig" no longer works. It is instead necessary to add CONFIG_DEBUG_INFO_NONE=n and (for example) CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y. This combination will then result in CONFIG_DEBUG_INFO being selected. This commit therefore updates the Kconfig options produced in response to the kvm.sh --gdb, --kasan, and --kcsan Kconfig options. Fixes: f9b3cd245784 ("Kconfig.debug: make DEBUG_INFO selectable from a choice") Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/kvm.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 98ea20328786372cbbc90c601be168f5fe1f8845 Author: Zqiang Date: Wed Apr 27 15:15:20 2022 +0800 rcutorture: Fix memory leak in rcu_test_debug_objects() The kernel memory leak detector located the following: unreferenced object 0xffff95d941135b50 (size 16): comm "swapper/0", pid 1, jiffies 4294667610 (age 1367.451s) hex dump (first 16 bytes): f0 c6 c2 bd d9 95 ff ff 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000bc81d9b1>] kmem_cache_alloc_trace+0x2f6/0x500 [<00000000d28be229>] rcu_torture_init+0x1235/0x1354 [<0000000032c3acd9>] do_one_initcall+0x51/0x210 [<000000003c117727>] kernel_init_freeable+0x205/0x259 [<000000003961f965>] kernel_init+0x1a/0x120 [<000000001998f890>] ret_from_fork+0x22/0x30 This is caused by the rcu_test_debug_objects() function allocating an rcu_head structure, then failing to free it. This commit therefore adds the needed kfree() after the last use of this structure. Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 1 + 1 file changed, 1 insertion(+) commit d984114ec23818670c8873939eac81ba6e104ff5 Author: Paul E. McKenney Date: Wed Apr 27 11:46:02 2022 -0700 rcutorture: Simplify rcu_torture_read_exit_child() loop The existing loop has an implicit manual loop that obscures the flow and requires an extra control variable. This commit makes this implicit loop explicit, thus saving several lines of code. Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 47 ++++++++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 27 deletions(-) commit 14c0017c19ead104511dbcf6a59b83b2456d09af Author: Anna-Maria Behnsen Date: Mon Apr 11 17:19:03 2022 +0200 rcu/torture: Change order of warning and trace dump Dumping a big ftrace buffer could lead to a RCU stall. So there is the ftrace buffer and the stall information which needs to be printed. When there is additionally a WARN_ON() which describes the reason for the ftrace buffer dump and the WARN_ON() is executed _after_ ftrace buffer dump, the information get lost in the middle of the RCU stall information. Therefore print WARN_ON() message before dumping the ftrace buffer in rcu_torture_writer(). [ paulmck: Add tracing_off() to avoid cruft from WARN(). ] Signed-off-by: Anna-Maria Behnsen Reviewed-by: Benedikt Spranger Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e72ee5e1a866b85cb6c3d4c80a1125976020a7e8 Author: Waiman Long Date: Tue Jun 14 08:06:20 2022 -0400 rcu-tasks: Use delayed_work to delay rcu_tasks_verify_self_tests() Commit 2585014188d5 ("rcu-tasks: Be more patient for RCU Tasks boot-time testing") fixes false positive rcu_tasks verification check failure by repeating the test once every second until timeout using schedule_timeout_uninterruptible(). Since rcu_tasks_verify_selft_tests() is called from do_initcalls() as a late_initcall, this has the undesirable side effect of delaying other late_initcall's queued after it by a second or more. Fix this by instead using delayed_work to repeat the verification check. Fixes: 2585014188d5 ("rcu-tasks: Be more patient for RCU Tasks boot-time testing") Signed-off-by: Waiman Long Signed-off-by: Paul E. McKenney kernel/rcu/tasks.h | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) commit 1cf1144e8473e8c3180ac8b91309e29b6acfd95f Author: Paul E. McKenney Date: Tue Jun 7 15:23:52 2022 -0700 rcu-tasks: Be more patient for RCU Tasks boot-time testing The RCU-Tasks family of grace-period primitives can take some time to complete, and the amount of time can depend on the exact hardware and software configuration. Some configurations boot up fast enough that the RCU-Tasks verification process gets false-positive failures. This commit therefore allows up to 30 seconds for the grace periods to complete, with this value adjustable downwards using the rcupdate.rcu_task_stall_timeout kernel boot parameter. Reported-by: Matthew Wilcox Reported-by: Zhouyi Zhou Signed-off-by: Paul E. McKenney Tested-by: Zhouyi Zhou Tested-by: Mark Rutland kernel/rcu/tasks.h | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit eea3423b162d5d5cdc08af23e8ee2c2d1134fd07 Author: Paul E. McKenney Date: Mon Jun 6 21:30:38 2022 -0700 rcu-tasks: Update comments This commit updates comments to reflect the changes in the series of commits that eliminated the full task-list scan. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 71 +++++++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 38 deletions(-) commit 56096ecd5b04148b6d292e3847c23d4a2a454e94 Author: Paul E. McKenney Date: Tue Jun 7 17:25:03 2022 -0700 rcu-tasks: Disable and enable CPU hotplug in same function The rcu_tasks_trace_pregp_step() function invokes cpus_read_lock() to disable CPU hotplug, and a later call to the rcu_tasks_trace_postscan() function invokes cpus_read_unlock() to re-enable it. This was absolutely necessary in the past in order to protect the intervening scan of the full tasks list, but there is no longer such a scan. This commit therefore improves readability by moving the cpus_read_unlock() call to the end of the rcu_tasks_trace_pregp_step() function. This commit is a pure code-motion commit without any (intended) change in functionality. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e386b6725798eec07facedf4d4bb710c079fd25c Author: Paul E. McKenney Date: Thu Jun 2 17:30:01 2022 -0700 rcu-tasks: Eliminate RCU Tasks Trace IPIs to online CPUs Currently, the RCU Tasks Trace grace-period kthread IPIs each online CPU using smp_call_function_single() in order to track any tasks currently in RCU Tasks Trace read-side critical sections during which the corresponding task has neither blocked nor been preempted. These IPIs are annoying and are also not strictly necessary because any task that blocks or is preempted within its current RCU Tasks Trace read-side critical section will be tracked on one of the per-CPU rcu_tasks_percpu structure's ->rtp_blkd_tasks list. So the only time that this is a problem is if one of the CPUs runs through a long-duration RCU Tasks Trace read-side critical section without a context switch. Note that the task_call_func() function cannot help here because there is no safe way to identify the target task. Of course, the task_call_func() function will be very useful later, when processing the list of tasks, but it needs to know the task. This commit therefore creates a cpu_curr_snapshot() function that returns a pointer the task_struct structure of some task that happened to be running on the specified CPU more or less during the time that the cpu_curr_snapshot() function was executing. If there was no context switch during this time, this function will return a pointer to the task_struct structure of the task that was running throughout. If there was a context switch, then the outgoing task will be taken care of by RCU's context-switch hook, and the incoming task was either already taken care during some previous context switch, or it is not currently within an RCU Tasks Trace read-side critical section. And in this latter case, the grace period already started, so there is no need to wait on this task. This new cpu_curr_snapshot() function is invoked on each CPU early in the RCU Tasks Trace grace-period processing, and the resulting tasks are queued for later quiescent-state inspection. Signed-off-by: Paul E. McKenney Cc: Peter Zijlstra Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh include/linux/sched.h | 1 + kernel/rcu/tasks.h | 24 +++++++----------------- kernel/sched/core.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 17 deletions(-) commit ffcc21a315e1ebafad51b318e8ac0cb884df0cdc Author: Paul E. McKenney Date: Wed Jun 1 21:26:57 2022 -0700 rcu-tasks: Maintain a count of tasks blocking RCU Tasks Trace grace period This commit maintains a new n_trc_holdouts counter that tracks the number of tasks blocking the RCU Tasks grace period. This counter is useful for debugging, and its value has been added to a diagostic message. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 1a4a8153e0df1705397aa3ff561dd8fdc2e6fc23 Author: Paul E. McKenney Date: Fri May 20 10:21:00 2022 -0700 rcu-tasks: Stop RCU Tasks Trace from scanning full tasks list This commit takes off the training wheels and relies only on scanning currently running tasks and tasks that have blocked or been preempted within their current RCU Tasks Trace read-side critical section. Before this commit, the time complexity of an RCU Tasks Trace grace period is O(T), where T is the number of tasks. After this commit, this time complexity is O(C+B), where C is the number of CPUs and B is the number of tasks that have blocked (or been preempted) at least once during their current RCU Tasks Trace read-side critical sections. Of course, if all tasks have blocked (or been preempted) at least once during their current RCU Tasks Trace read-side critical sections, this is still O(T), but current expectations are that RCU Tasks Trace read-side critical section will be short and that there will normally not be large numbers of tasks blocked within such a critical section. Dave Marchevsky kindly measured the effects of this commit on the RCU Tasks Trace grace-period latency and the rcu_tasks_trace_kthread task's CPU consumption per RCU Tasks Trace grace period over the course of a fixed test, all in milliseconds: Before After GP latency 22.3 ms stddev > 0.1 17.0 ms stddev < 0.1 GP CPU 2.3 ms stddev 0.3 1.1 ms stddev 0.2 This was on a system with 15,000 tasks, so it is reasonable to expect much larger savings on the systems on which this issue was first noted, given that they sport well in excess of 100,000 tasks. CPU consumption was measured using profiling techniques. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh Tested-by: Dave Marchevsky kernel/rcu/tasks.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit eec53143b7fe1ccaace434e03b5959c9117bf9c5 Author: Aurabindo Pillai Date: Tue Jun 21 11:23:40 2022 -0400 drm/amd/display: fix incorrect comparison in DML [Why&How] GCC 12 catches the following incorrect comparison in the if arm drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/dml/dcn32/display_mode_vba_32.c: In function ‘dml32_ModeSupportAndSystemConfigurationFull’: drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/dml/dcn32/display_mode_vba_32.c:3740:33: error: the comparison will always evaluate as ‘true’ for the address of ‘USRRetrainingSupport’ will never be NULL [-Werror=address] 3740 | || &mode_lib->vba.USRRetrainingSupport[i][j])) { | ^~ In file included from ./drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/dml/display_mode_lib.h:32, from ./drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/dc.h:45, from drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/dml/dcn32/display_mode_vba_32.c:30: ./drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/dml/display_mode_vba.h:1175:14: note: ‘USRRetrainingSupport’ declared here 1175 | bool USRRetrainingSupport[DC__VOLTAGE_STATES][2]; | Fix this by remove preceding & so that value is compared instead of address Fixes: dda4fb85e433 ("drm/amd/display: DML changes for DCN32/321") Acked-by: Alex Deucher Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c85c623ab406188da7969180e53c4b61e8a982e0 Author: Aurabindo Pillai Date: Tue Jun 21 11:23:39 2022 -0400 drm/amd/display: fix array index in DML [Why&How] When the a 3d array is used by indexing with only one dimension in an if condition, the addresses get compared instead of the intended value stored in the array. GCC 12.1 caught this error: drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/dml/dcn32/display_mode_vba_32.c: In function ‘DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation’: drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/dml/dcn32/display_mode_vba_32.c:1007:45: error: the comparison will always evaluate as ‘true’ for the address of ‘use_one_row_for_frame_flip’ will never be NULL [-Werror=address] 1007 | if (v->use_one_row_for_frame_flip[k]) { | ^ In file included from ./drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/dml/display_mode_lib.h:32, from ./drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/dc.h:45, from drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/dml/dcn32/display_mode_vba_32.c:30: ./drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/dml/display_mode_vba.h:605:14: note: ‘use_one_row_for_frame_flip’ declared here 605 | bool use_one_row_for_frame_flip[DC__VOLTAGE_STATES][2][DC__NUM_DPP__MAX]; | Fix this by explicitly specifying the last two indices. Fixes: dda4fb85e433 ("drm/amd/display: DML changes for DCN32/321") Acked-by: Alex Deucher Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd6ae969cfa2b12c6082eb83bdfa648b15d9b3c7 Author: Jiang Jian Date: Tue Jun 21 21:10:41 2022 +0800 drm/amdgpu: vm - drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c line: 57 * the kernel tells the the ring what VMID to use for that command changed to * the kernel tells the ring what VMID to use for that command Signed-off-by: Jiang Jian Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 163d4cd26a18db7db68a98b4d1ca95d542ca72af Author: Alex Deucher Date: Thu Jun 16 16:52:01 2022 -0400 drm/amdgpu: fix adev variable used in amdgpu_device_gpu_recover() Use the correct adev variable for the drm_fb_helper in amdgpu_device_gpu_recover(). Noticed by inspection. Fixes: 087451f372bf ("drm/amdgpu: use generic fb helpers instead of setting up AMD own's.") Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb4b7a23ff85740ed9e0a3aa4c3c0195654a89d5 Author: Hans de Goede Date: Mon Jun 20 11:43:36 2022 +0200 drm/radeon: Drop CONFIG_BACKLIGHT_CLASS_DEVICE ifdefs The DRM_RADEON Kconfig code contains: select BACKLIGHT_CLASS_DEVICE So the condition these ifdefs test for is always true, drop them. Signed-off-by: Hans de Goede Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/atombios_encoders.c | 14 -------------- drivers/gpu/drm/radeon/radeon_acpi.c | 2 -- drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 15 --------------- drivers/gpu/drm/radeon/radeon_mode.h | 4 ---- 4 files changed, 35 deletions(-) commit efb4fd107cfd9748f777a4e9015d803d3c9db68b Author: Yifan Zhang Date: Mon Jun 20 16:24:58 2022 +0800 drm/amdkfd: correct sdma queue number of sdma 6.0.1 sdma 6.0.1 has 8 queues instead of 2. Fixes: 26776a7031c423 ("drm/amdkfd: add GC 11.0.1 KFD support") Signed-off-by: Yifan Zhang Acked-by: Alex Deucher Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83a3439ddb28e15afa66f52650cf3c1486ae6515 Author: Hans de Goede Date: Mon Jun 20 11:43:35 2022 +0200 drm/amdgpu: Drop CONFIG_BACKLIGHT_CLASS_DEVICE ifdefs The DRM_AMDGPU Kconfig code contains: select BACKLIGHT_CLASS_DEVICE So the condition these ifdefs test for is always true, drop them. Signed-off-by: Hans de Goede Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 6 ------ drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 4 ---- drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 14 -------------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 +-------------- 4 files changed, 1 insertion(+), 38 deletions(-) commit 43af2220b3302bc04d72bdf07970ebc0fc46155b Author: Joshua Ashton Date: Thu Jun 16 01:21:27 2022 +0000 amd/display/dc: Fix COLOR_ENCODING and COLOR_RANGE doing nothing for DCN20+ For DCN20 and above, the code that actually hooks up the provided input_color_space got lost at some point. Fixes COLOR_ENCODING and COLOR_RANGE doing nothing on DCN20+. Tested using Steam Remote Play Together + gamescope. Update other DCNs the same wasy DCN1.x was updates in commit a1e07ba89d49 ("drm/amd/display: Use plane->color_space for dpp if specified") Fixes: a1e07ba89d49 ("drm/amd/display: Use plane->color_space for dpp if specified") Signed-off-by: Joshua Ashton Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c | 3 +++ drivers/gpu/drm/amd/display/dc/dcn201/dcn201_dpp.c | 3 +++ drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c | 3 +++ 3 files changed, 9 insertions(+) commit dc597268225b2e39bca0bc0c5394e3e6266be2e3 Author: Aric Cyr Date: Sun Jun 12 20:06:32 2022 -0400 drm/amd/display: 3.2.191 This DC patchset brings improvements in multiple areas. In summary, we highlight: - Remove unnecessary code; - Small fixes (compilation warnings, typos, etc); - Improvements in the DPMS code; - Fix eDP issues - Improvements in the MST code Tested-by: Daniel Wheeler Acked-by: Rodrigo Siqueira Signed-off-by: Aric Cyr Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b2db1f9dbfbc61116fec83a51d16fd0cf49b61b Author: Rodrigo Siqueira Date: Tue Jun 14 10:18:27 2022 -0400 drm/amd/display: Drop duplicate define We already have DALSMC_MSG_TransferTableDram2Smu in the file dalsmc.h; for this reason, we don't need this definition in the smu msg file. Tested-by: Daniel Wheeler Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.c | 2 -- 1 file changed, 2 deletions(-) commit 2d7a1ef85d013699ef60068a9f37ab56ffb33c32 Author: Rodrigo Siqueira Date: Tue Jun 14 10:11:47 2022 -0400 drm/amd/display: Update hook dcn32_funcs In DCN32 clk hook functions, we are using the wrong reference for get_dp_ref_clk_frequency and missing the get_dtb_ref_clk_frequency reference. This commit adds those references. Tested-by: Daniel Wheeler Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit aeb73c608c5b7fa6fad6d98694323e7629e93cce Author: Chaitanya Dhere Date: Thu Apr 14 13:24:11 2022 -0400 drm/amd/display: Implement a pme workaround function [Why] For DCN32 we do not have a pme workaround function defined that sends a BacoAudio message. Default code had uses the DCN30 function for pme workaround. PMFW headers are inconsistent with their message ID definitions which cause ID's to clash leading to inconsistent system behaviour. There is a clash with FCLK message due to inconsitent PMFW headers. [How] Implement a new BacoAudio function to workaround the problem of inconsistent PMFW headers in order to avoid BacoAudio message clasing with FCLK Enable message. Tested-by: Daniel Wheeler Acked-by: Rodrigo Siqueira Signed-off-by: Chaitanya Dhere Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 +- .../gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.c | 8 ++++++++ .../gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) commit 3e838f7ccf64b0e33a2f6d1c66158cc5ab04c86f Author: Rodrigo Siqueira Date: Tue Jun 14 09:51:08 2022 -0400 drm/amd/display: Get VCO frequency from registers Add support to get VCO frequency from registers. Tested-by: Daniel Wheeler Reviewed-by: Aurabindo Jayamohanan Pillai Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 94 +++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 3 + 2 files changed, 96 insertions(+), 1 deletion(-) commit 32e8ab05ed81c995b92f12b590c12ef951ca1129 Author: Alvin Lee Date: Wed May 25 13:34:07 2022 -0400 drm/amd/display: Update SW state correctly for FCLK FCLK not supported for DCN321, but still need to update the software state accordingly to prevent unneeded full updates in driver Tested-by: Daniel Wheeler Acked-by: Rodrigo Siqueira Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a3a885878e74d3d81e4742f8dd84faa27c8863ad Author: George Shen Date: Fri May 20 11:55:10 2022 -0400 drm/amd/display: Fix divide-by-zero in DPPCLK and DISPCLK calculation [Why] Certain use cases will pass in zero in the new_clocks parameter for all clocks. This results in a divide-by-zero error when attempting to round up the new clock. When new_clocks are zero, no rounding is required, so we can skip it. [How] Guard the division calculation with a check to make sure clocks are not zero. Tested-by: Daniel Wheeler Acked-by: Rodrigo Siqueira Signed-off-by: George Shen Signed-off-by: Alex Deucher .../drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 04e6931a76e592e66e1014ffe4d13303ccac5d8b Author: Alvin Lee Date: Fri May 6 15:57:09 2022 -0400 drm/amd/display: Update DPPCLK programming sequence [Description] - When lowering DPPCLK, we want to program the DPP DTO before updating the DPP refclk. - Also update DPPCLK to the exact frequency that will be set after clock divider has been programmed. This will prevent rounding errors when making the request to PMFW (we need DPP DTO to match exactly with the exact DPP refclk). Tested-by: Daniel Wheeler Acked-by: Rodrigo Siqueira Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher .../amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 25 +++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 074efb5cadcb3c9e40d536a730318bfab3384cad Author: Rodrigo Siqueira Date: Tue Jun 14 09:04:53 2022 -0400 drm/amd/display: Check minimum disp_clk and dpp_clk debug option Our debug struct has the min_disp_clk_khz and min_dpp_clk_khz options, which we ignore in the DCN32. This commit introduces those checks and the necessary calculation. Tested-by: Daniel Wheeler Reviewed-by: Aurabindo Jayamohanan Pillai Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit a30e8c13e7affd6fe379c6bf213133b0f917d1bf Author: Dmytro Laktyushkin Date: Tue Jun 15 15:11:31 2021 -0400 drm/amd/display: Fix in dp link-training when updating payload allocation table [Why & How] Check if aux is not accessible before updating payload allocation table. Tested-by: Daniel Wheeler Acked-by: Alan Liu Signed-off-by: Dmytro Laktyushkin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 990cad0e4a9df4202cd482c192608caf6408e4b3 Author: Wenjing Liu Date: Fri Mar 25 16:12:14 2022 -0400 drm/amd/display: extract update stream allocation to link_hwss [Why & How] Extract update stream allocation table into link hwss as part of the link hwss refactor work. Tested-by: Daniel Wheeler Reviewed-by: George Shen Acked-by: Alan Liu Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 10 +++++++--- drivers/gpu/drm/amd/display/dc/inc/link_hwss.h | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) commit 20cb72174ddcc86596286784416adb947195e45c Author: George Shen Date: Fri Feb 11 14:13:01 2022 -0500 drm/amd/display: Remove unused vendor specific w/a [Why & How] Old vendor specific w/a are no longer needed and unused. Clean up codebase by removing them. Tested-by: Daniel Wheeler Reviewed-by: Wenjing Liu Acked-by: Alan Liu Signed-off-by: George Shen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 133 +---------------------- drivers/gpu/drm/amd/display/dc/dc.h | 1 - 2 files changed, 4 insertions(+), 130 deletions(-) commit 0bbd1c7de319ca5a08359e5fc901a0317bf5c0d6 Author: George Shen Date: Mon Jan 31 14:31:14 2022 -0500 drm/amd/display: Handle downstream LTTPR with fixed VS sequence [Why] Several issues were discovered that caused link training to fail when an LTTPR device is connected downstream for the fixed VS sequence. [How] The following were added: - workaround to configure AUX timeout for fixed VS sequence - additional delay before disabling fixed VS intercept - detection of fixed VS deadlock state and performing DPCD sequence to recover Tested-by: Daniel Wheeler Reviewed-by: Meenakshikumar Somasundaram Acked-by: Alan Liu Signed-off-by: George Shen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 43 +++++++++++++++++++--- drivers/gpu/drm/amd/display/dc/dc.h | 2 + .../gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 1 - 3 files changed, 40 insertions(+), 6 deletions(-) commit a3e731260b9325e2e87baf54f07619c6cb83931b Author: George Shen Date: Thu Oct 7 15:59:44 2021 -0400 drm/amd/display: Fix typo in override_lane_settings [Why] The function currently skips overriding the drive settings of the first lane. [How] Change for loop to start at 0 instead of 1. Tested-by: Daniel Wheeler Reviewed-by: Wenjing Liu Acked-by: Alan Liu Signed-off-by: George Shen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6bad8e4a0ec8a950d10d91cb1846f3ef3e1f4ae0 Author: Aric Cyr Date: Sat Oct 2 09:44:08 2021 -0400 drm/amd/display: Change initializer to single brace [Why & How] Change struct initializer from multiple brace to single brace. Tested-by: Daniel Wheeler Acked-by: Alan Liu Signed-off-by: Aric Cyr Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++-- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 6 ++--- drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c | 28 +++++++++++----------- 3 files changed, 19 insertions(+), 19 deletions(-) commit 2b96b036a6a5767b84f87edc2c0a1c70c91ebac0 Author: Wenjing Liu Date: Sat Sep 11 23:06:31 2021 -0400 drm/amd/display: rename lane_settings to hw_lane_settings [why] This is one of the major steps to decouple hw lane settings from dpcd lane settings. Tested-by: Daniel Wheeler Reviewed-by: Jun Lei Acked-by: Alan Liu Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 10 +++++----- drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c | 10 +++++----- drivers/gpu/drm/amd/display/include/link_service_types.h | 1 - 4 files changed, 14 insertions(+), 15 deletions(-) commit 95133f41b090b09ba9163b4469cda1d5ee230cd3 Author: George Shen Date: Wed Oct 6 15:47:37 2021 -0400 drm/amd/display: Fix in overriding DP drive settings [Why & How] Check always_match_dpcd_with_hw_lane_settings bit before overriding the DP drive settings Tested-by: Daniel Wheeler Reviewed-by: Wenjing Liu Acked-by: Alan Liu Signed-off-by: George Shen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f18368b686a86477a79bc240a3a1c655d88a2348 Author: Wenjing Liu Date: Tue Oct 6 16:22:40 2020 -0400 drm/amd/display: Enrich the log in MST payload update [Why & How] Enrich the log to provide more informatio in MST payload update. Tested-by: Daniel Wheeler Reviewed-by: Ariel Bernstein Acked-by: Alan Liu Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 98dd398aa3e021896adb7f2b1d0f6b2d3784610c Author: JinZe.Xu Date: Tue Jul 21 17:52:41 2020 +0800 drm/amd/display: Change HDMI judgement condition. [Why & How] Use dc_is_hdmi_signal to determine signal type. Tested-by: Daniel Wheeler Acked-by: Alan Liu Signed-off-by: JinZe.Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f173fbe5b042e1c87593e3b06e85cae0094dd867 Author: Qingqing Zhuo Date: Fri Jun 10 10:43:53 2022 -0400 drm/amd/display: Fix DC warning at driver load [Why] Wrong index was checked for dcfclk_mhz, causing false warning. [How] Fix the assertion index. Tested-by: Daniel Wheeler Reviewed-by: Dmytro Laktyushkin Acked-by: Rodrigo Siqueira Signed-off-by: Qingqing Zhuo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b33b5ffcf68de3a43e7dddc91c5dc86e6ed8587 Author: Saaem Rizvi Date: Thu Jun 9 15:34:43 2022 -0400 drm/amd/display: Add SMU logging code [WHY] Logging for SMU response value after the wait allows us to know immediately what the response value was. Makes it easier to debug should the value be anything other than OK. [HOW] Using the the already available DC SMU logging functions. Tested-by: Daniel Wheeler Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Signed-off-by: Saaem Rizvi Signed-off-by: Alex Deucher .../drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c | 12 ++++++++++++ drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/dcn301_smu.c | 12 ++++++++++++ drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c | 8 ++++++++ drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_smu.c | 8 ++++++++ drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.c | 8 ++++++++ 5 files changed, 48 insertions(+) commit 3ab55e3a1ebc22c1e0b7c72261a8c9fe78a3a09a Author: Sung Joon Kim Date: Tue Jun 7 14:15:06 2022 -0400 drm/amd/display: Turn off internal backlight when plugging external monitor [why] For VG, we want to turn off power/backlight of the intenral panel when plugging in external monitor and going to "external monitor only" mode. [how] For turning off power of the internal panel, ignore the config flag whic bypasses power sequencing for eDP panels. Tested-by: Daniel Wheeler Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Signed-off-by: Sung Joon Kim Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 06f2f7772dc7ff2e3734e654cb2d0b588076860d Author: Sung Joon Kim Date: Tue Jun 7 11:36:29 2022 -0400 drm/amd/display: Fix eDP not light up on resume [why] Only on VG, if external display is disconnected during S3 suspend, the internal panel doesn't light up on resume because we set the power state using an unsupported DPCD register SET_POWER. To check the register is supported, we need to check SET_POWER_CAPABLE first which is eDP-specific DPCD register field. [how] Check the SET_POWER_CAPABLE register field and decide the control of the eDP power state based on the read register value. Tested-by: Daniel Wheeler Reviewed-by: Agustin Gutierrez Acked-by: Rodrigo Siqueira Signed-off-by: Sung Joon Kim Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 +++++- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 7 +++++++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) commit f04d275d94e164d24516c32437c988a323018f63 Author: hersen wu Date: Sun May 29 12:12:32 2022 -0400 drm/amd/display: add mst port output bw check [Why] when connect one 4k@144hz dp to dsc mst hub, 4k@144hz mode is in valid mode list. but some mst hub port output bandwidth does not support 4k@144hz. [How] add mst port output bandwidth checks, include full_pbn, branch max throughput mps. Tested-by: Daniel Wheeler Reviewed-by: Jerry Zuo Acked-by: Rodrigo Siqueira Signed-off-by: hersen wu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 +++-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 3 +- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 36 ++++++++++++++++++++++ .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.h | 4 +++ 4 files changed, 48 insertions(+), 3 deletions(-) commit ec457f8378901d673b841e81d289b0165286db7f Author: Ian Chen Date: Mon May 16 15:35:34 2022 +0800 drm/amd/display: Drop unnecessary detect link code Delete unnecessary codes in detect_link_and_local_sink. We already have correct stop logic in dc_link_detect. Tested-by: Daniel Wheeler Reviewed-by: Wenjing Liu Acked-by: Rodrigo Siqueira Signed-off-by: Ian Chen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 5 ----- 1 file changed, 5 deletions(-) commit 4d31819a3746b1f33a915546a4b1aa19374d1544 Author: Wayne Lin Date: Tue May 31 18:14:41 2022 +0800 drm/amd/display: Take emulated dc_sink into account for HDCP [Why] While updating the config of hdcp, we use the sink_singal type of the dc_sink to decide the HDCP operation mode. However, it doesn't consider the case when the sink is a emulated one. [How] Take dc_em_sink into account while updating HDCP config. Tested-by: Daniel Wheeler Reviewed-by: Aurabindo Jayamohanan Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Wayne Lin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 84a8b3908285d007db49532fd4b51d4b183d1242 Author: Wayne Lin Date: Tue Apr 12 21:18:00 2022 +0800 drm/amd/display: Release remote dc_sink under mst scenario [Why] Observe that we have several problems while releasing remote dc_sink under mst cases. - When unplug mst branch device from the source, we now try to free all remote dc_sinks in dm_helpers_dp_mst_stop_top_mgr(). However, there are bugs while we're releasing dc_sinks here. First of all, link->remote_sinks[] array get shuffled within dc_link_remove_remote_sink(). As the result, increasing the array index within the releasing loop is wrong. Secondly, it tries to call dc_sink_release() to release the dc_sink of the same aconnector every time in the loop. Which can't release dc_sink of all aconnector in the mst topology. - There is no code path for us to release remote dc_sink for disconnected sst monitor which unplug event is notified by CSN sideband message. Which means we'll use stale dc_sink data to represent later on connected monitor. Also, has chance to break the maximum remote dc_sink number constraint. [How] Distinguish unplug event of mst scenario into 2 cases. * Unplug sst/legacy stream sink off the mst topology - Release related remote dc_sink in detec_ctx(). * Unplug mst branch device off the mst topology - Release related remote dc_sink in early_unregister() Tested-by: Daniel Wheeler Reviewed-by: Aurabindo Jayamohanan Pillai Acked-by: Rodrigo Siqueira Acked-by: Lyude Paul Signed-off-by: Wayne Lin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++-- .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 18 +----------- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 34 ++++++++++++++++++++-- 3 files changed, 35 insertions(+), 22 deletions(-) commit 052eaf6af846e59073a842e9b9517ba9d3f76d4a Author: Wayne Lin Date: Wed Apr 13 15:53:29 2022 +0800 drm/amd/display: Revert "drm/amd/display: turn DPMS off on connector unplug" This reverts commit 3c4d55c9b9becedd8d31a7c96783a364533713ab. Revert the commit because: - It's incomplete of the function dm_set_dpms_off() for mst case. For stream sinks whithin the same mst topology, they share the same dc_link. dm_set_dpms_off() tries to update one mst stream only which is incomplete. - Setting dpms off should be triggered by usermode. Besdies, it seems usermode does release relevant resource for mst & non-mst case when unplug connecotr now. Tested-by: Daniel Wheeler Reviewed-by: Aurabindo Jayamohanan Pillai Acked-by: Rodrigo Siqueira Acked-by: Lyude Paul Signed-off-by: Wayne Lin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 31 ----------------------- drivers/gpu/drm/amd/display/dc/core/dc.c | 13 ---------- drivers/gpu/drm/amd/display/dc/dc_stream.h | 1 - 3 files changed, 45 deletions(-) commit 10a36226157035e84aaa58e1699a32b3de2755af Author: Wayne Lin Date: Wed Apr 13 15:52:48 2022 +0800 drm/amd/display: Revert "drm/amd/display: Add flag to detect dpms force off during HPD" This reverts commit 035f54969bb2c1a5ced52f43e4ef393e0c0f6bfa. The reverted commit was trying to fix side effect brought by commit 3c4d55c9b9be ("drm/amd/display: turn DPMS off on connector unplug") However, * This reverted commit will have mst case never call dm_set_dpms_off() which conflicts the idea of original commit 3c4d55c9b9be ("drm/amd/display: turn DPMS off on connector unplug") That's due to dm_crtc_state is always null since the input parameter aconnector is the root device (source) of mst topology. It's not an end stream sink within the mst topology. * Setting dpms off should be triggered by usermode. Besdies, it seems usermode does release relevant resource for mst & non-mst case when unplug connecotr now. Which means we no longer need both commits now: commit 3c4d55c9b9be ("drm/amd/display: turn DPMS off on connector unplug") commit 035f54969bb2 ("drm/amd/display: Add flag to detect dpms force off during HPD") Tested-by: Daniel Wheeler Reviewed-by: Aurabindo Jayamohanan Pillai Acked-by: Rodrigo Siqueira Acked-by: Lyude Paul Signed-off-by: Wayne Lin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 19 ++++++------------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 -- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 15 +++++---------- 3 files changed, 11 insertions(+), 25 deletions(-) commit 4dd905fd9429626937107ca13770aa836c8a7e6e Author: Mario Limonciello Date: Wed Jun 15 17:30:05 2022 -0500 drm/amd: Revert "drm/amd/display: keep eDP Vdd on when eDP stream is already enabled" A variety of Lenovo machines with Rembrandt APUs and OLED panels have stopped showing the display at login. This behavior clears up after leaving it idle and moving the mouse or touching keyboard. It was bisected to be caused by commit 559e2655220d ("drm/amd/display: keep eDP Vdd on when eDP stream is already enabled"). Revert this commit to fix the issue. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2047 Reported-by: Aaron Ma Fixes: 559e2655220d ("drm/amd/display: keep eDP Vdd on when eDP stream is already enabled") Signed-off-by: Mario Limonciello Tested-by: Mark Pearson Acked-by: Alex Deucher Signed-off-by: Alex Deucher .../amd/display/dc/dce110/dce110_hw_sequencer.c | 24 ++-------------------- 1 file changed, 2 insertions(+), 22 deletions(-) commit 5d763a9955f0fbf2681a2f1fa87c416056bd0c89 Author: Cruise Hung Date: Mon Jun 6 22:12:39 2022 +0800 drm/amd/display: Remove compiler warning Tested-by: Daniel Wheeler Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Cruise Hung Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/include/fixed31_32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0081bc072837b66587904e6988aea1e0845b0294 Author: Yifan Zhang Date: Mon Jun 20 19:32:33 2022 +0800 drm/amdgpu: add LSDMA block for LSDMA v6.0.1 This patch adds LSDMA ip block for LSDMA v6.0.1. Signed-off-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) commit 262236b4f5a7d2fe31ed31d34669a9ea4f1c3272 Author: Aurabindo Pillai Date: Thu Jun 16 16:44:55 2022 -0400 drm/amd/display: add missing reg defs for DCN3x HUBBUB [Why&How] The omitted register definition caused call traces like: [ 3.811215] WARNING: CPU: 7 PID: 794 at drivers/gpu/drm/amd/amdgpu/../display/dc/dc_helper.c:120 set_reg_field_values.constprop.0+0xc7/0xe0 [amdgpu] [ 3.811406] Modules linked in: amdgpu(+) drm_ttm_helper ttm iommu_v2 gpu_sched drm_kms_helper cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea drm i2c_piix4 drm_panel_orientation_quirks [ 3.811419] CPU: 7 PID: 794 Comm: systemd-udevd Not tainted 5.16.0-kfd+ #132 [ 3.811422] Hardware name: System manufacturer System Product Name/ROG STRIX B450-F GAMING, BIOS 3003 12/09/2019 [ 3.811425] RIP: 0010:set_reg_field_values.constprop.0+0xc7/0xe0 [amdgpu] [ 3.811615] Code: 08 49 89 51 08 8b 08 48 8d 42 08 49 89 41 08 44 8b 02 48 8d 50 08 0f b6 c9 49 89 51 08 8b 00 45 85 c0 75 b3 0f 0b eb af 5d c3 <0f> 0b e9 48 ff ff ff 49 8b 51 08 eb d0 49 8b 41 08 eb d5 66 0f 1f [ 3.811619] RSP: 0018:ffffb8c1c04cf640 EFLAGS: 00010246 [ 3.811621] RAX: 0000000000000000 RBX: ffff96f2100d8800 RCX: 0000000000000000 [ 3.811623] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffffb8c1c04cf650 [ 3.811625] RBP: ffffb8c1c04cf640 R08: 000000000000047f R09: ffffb8c1c04cf658 [ 3.811627] R10: ffff96f5161ff000 R11: ffff96f5161ff000 R12: ffff96f204afb9c0 [ 3.811629] R13: 0000000000000000 R14: ffff96f202b94c00 R15: ffffb8c1c04cf718 [ 3.811631] FS: 00007fe07c2e2880(0000) GS:ffff96f5059c0000(0000) knlGS:0000000000000000 [ 3.811634] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3.811636] CR2: 0000559634ab57b8 CR3: 0000000120674000 CR4: 00000000003506e0 [ 3.811637] Call Trace: [ 3.811640] [ 3.811642] generic_reg_update_ex+0x69/0x200 [amdgpu] [ 3.811831] ? _printk+0x58/0x6f [ 3.811836] dcn32_init_crb+0x18f/0x1b0 [amdgpu] [ 3.812031] dcn32_init_hw+0x379/0x6a0 [amdgpu] [ 3.812223] dc_hardware_init+0xba/0x100 [amdgpu] [ 3.812415] amdgpu_dm_init.isra.0.cold+0x166/0x1867 [amdgpu] [ 3.812616] ? dev_vprintk_emit+0x139/0x15d [ 3.812621] ? dev_printk_emit+0x4e/0x65 [ 3.812624] dm_hw_init+0x12/0x30 [amdgpu] [ 3.812820] amdgpu_device_init.cold+0x130d/0x178c [amdgpu] [ 3.813017] ? pci_read_config_word+0x25/0x40 [ 3.813021] amdgpu_driver_load_kms+0x1a/0x130 [amdgpu] [ 3.813178] amdgpu_pci_probe+0x130/0x330 [amdgpu] Fixes: 4f29f9cf092b ("drm/amd: add register headers for DCN32/321") Signed-off-by: Aurabindo Pillai Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubbub.h | 2 ++ drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_2_0_offset.h | 2 ++ drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_2_0_sh_mask.h | 3 +++ drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_2_1_offset.h | 2 ++ drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_2_1_sh_mask.h | 4 ++++ 5 files changed, 13 insertions(+) commit 1320d6c7b0deb7219701a55397e93e6c73d00366 Author: Mario Limonciello Date: Mon Jun 13 23:53:52 2022 -0500 drm/amd: Don't show warning on reading vbios values for SMU13 3.1 Some APUs with SMU13 are showing the following message: `amdgpu 0000:63:00.0: amdgpu: Unexpected and unhandled version: 3.1` This warning isn't relevant for smu info 3.1, as no bootup information is present in the table. Fixes: 593a54f18031 ("drm/amd/pm: correct the way for retrieving bootup clocks") Signed-off-by: Mario Limonciello Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 2 ++ 1 file changed, 2 insertions(+) commit 51c45e450fc8529495bc85c2d8e309816cdcf959 Author: Yang Wang Date: Fri Jun 10 11:48:04 2022 +0800 drm/amd/pm: skip to set mp1 unload state in special case set mp1 unload state will cause the SMC FW can't accept any SMU message, skip to set mp1 unload state to avoid following case fail: - runtime pm case. - gpu reset case. Fixes: 72aeb6ee0c78 ("drm/amd/pm: fix driver reload SMC firmware fail issue for smu13") Signed-off-by: Yang Wang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 8748de873fedf4d55bdd99bbb738ee7ddf329792 Author: Jack Xiao Date: Wed Apr 20 13:08:28 2022 +0800 drm/amdgpu/gmc11: avoid cpu accessing registers to flush VM Due to gfxoff on, cpu accessing registers is not expected. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 51 +++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) commit 6626c5a4ea2ef1bba3e02f75f797523e168fe28e Author: Stanley.Yang Date: Wed Jun 15 23:34:53 2022 +0800 drm/amdgpu/pm: adjust EccInfo_t struct The EccInfo_t struct in driver_if.h is as below in official release verion 68.55.0 typedef struct { uint64_t mca_umc_status; uint64_t mca_umc_addr; uint16_t ce_count_lo_chip; uint16_t ce_count_hi_chip; uint32_t eccPadding; uint64_t mca_ceumc_addr; } EccInfo_t; It's different from the debug version druing develop print correctable error address, so adjust EccInfo_t struct. Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_aldebaran.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f7ba887f606b1895dabf718547cf7397924f0d3a Author: Alex Deucher Date: Thu May 19 10:21:08 2022 -0400 drm/amdgpu: Adjust logic around GTT size (v3) Certain GL unit tests for large textures can cause problems with the OOM killer since there is no way to link this memory to a process. This was originally mitigated (but not necessarily eliminated) by limiting the GTT size. The problem is this limit is often too low for many modern games so just make the limit 1/2 of system memory. The OOM accounting needs to be addressed, but we shouldn't prevent common 3D applications from being usable just to potentially mitigate that corner case. Set default GTT size to max(3G, 1/2 of system ram) by default. v2: drop previous logic and default to 3/4 of ram v3: default to half of ram to align with ttm v4: fix spelling in comment (Kent) Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1942 Reviewed-by: Marek Olšák Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 1f43b8903f3aae4a26a603c36f6d5dd25d6edb51 Author: Alex Deucher Date: Wed Jun 15 12:02:08 2022 -0400 drm/radeon: fix incorrrect SPDX-License-Identifiers radeon is MIT. This were incorrectly changed in commit b24413180f56 ("License cleanup: add SPDX GPL-2.0 license identifier to files with no license") and commit d198b34f3855 (".gitignore: add SPDX License Identifier") and: commit ec8f24b7faaf ("treewide: Add SPDX license identifier - Makefile/Kconfig") Fixes: d198b34f3855 (".gitignore: add SPDX License Identifier") Fixes: ec8f24b7faaf ("treewide: Add SPDX license identifier - Makefile/Kconfig") Fixes: b24413180f56 ("License cleanup: add SPDX GPL-2.0 license identifier to files with no license") Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2053 Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/.gitignore | 2 +- drivers/gpu/drm/radeon/Kconfig | 2 +- drivers/gpu/drm/radeon/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit b3e73cbf17a95a85e3a943d7500e9e477d6ab9c3 Author: Graham Sider Date: Wed May 18 14:44:01 2022 -0400 drm/amdgpu: Remove break for VMID loop TLB flush on MES Loop through all VMIDs for gmc_v10_0_flush_gpu_tlb_pasid and gmc_v11_0_flush_gpu_tlb_pasid (only if using MES for gmc_v10). This is required for MES due to use_different_vmid_compute causing SDMA queues to be assigned different VMIDs than compute for the same PASID. Signed-off-by: Graham Sider Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) commit e751e4be1eec4d427d91583f31ce56ccb5286a27 Author: Ruijing Dong Date: Tue Jun 14 22:42:54 2022 -0400 drm/amdgpu/vcn: adjust unified queue code format Fixed some errors and warnings found by checkpatch.pl. Acked-by: Christian König Signed-off-by: Ruijing Dong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 12 ++++++------ drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) commit bb4f196b47b6554ba89f02ec60246f0c643a4bf8 Author: Ruijing Dong Date: Tue May 31 14:20:42 2022 -0400 drm/amdgpu/vcn: support unified queue only in vcn4 - remove multiple queue support - add unified queue related functions Acked-by: Leo Liu Signed-off-by: Ruijing Dong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 563 +++++++++------------------------- 1 file changed, 140 insertions(+), 423 deletions(-) commit 4ed49c954e35559cb4a34ba049a15f54ec7fccf6 Author: Ruijing Dong Date: Tue May 31 14:18:25 2022 -0400 drm/amdgpu/vcn: add unified queue ib test - add unified queue headers - add unified queue ib tests Acked-by: Leo Liu Signed-off-by: Ruijing Dong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 102 +++++++++++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 1 + 2 files changed, 100 insertions(+), 3 deletions(-) commit 56878d49cc26c6587b35515fe621087e26e75e64 Author: Bernard Zhao Date: Tue May 10 23:54:51 2022 -0700 intel/i40e: delete if NULL check before dev_kfree_skb dev_kfree_skb check if the input parameter NULL and do the right thing, there is no need to check again. This change is to cleanup the code a bit. Signed-off-by: Bernard Zhao Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e_txrx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3e0fcb782a9ff02afcf426b5c84fbeccbdb50fae Author: Minghao Chi Date: Wed May 18 14:31:11 2022 -0700 i40e: Remove unnecessary synchronize_irq() before free_irq() Calling synchronize_irq() right before free_irq() is quite useless. On one hand the IRQ can easily fire again before free_irq() is entered, on the other hand free_irq() itself calls synchronize_irq() internally (in a race condition free way), before any state associated with the IRQ is freed. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e_main.c | 2 -- 1 file changed, 2 deletions(-) commit 7f72d923149c6355285fbd315c3d81e50993cc31 Author: Mateusz Palczewski Date: Wed May 11 12:21:28 2022 +0200 i40e: Add support for ethtool -s speed Add ability to change speed through ethtool -s speed Driver advertises all link modes that support requested speed. Autoneg must be set off e.g.: ethtool -s autoneg off speed . Add helper function that translate speed in Mb to enum i40e_aq_link_speed and compare it to supported speeds from given ethtool_link_ksettings. Add in i40e_set_link_ksettings hold for requested speed and set copy_ks.base.speed to safe_ks.base.speed to be sure that user is not changing unsupported setting. In i40e_speed_to_link_speed compare requested speed with supported speeds. Set speed to requested speed. Signed-off-by: Norbert Zulinski Signed-off-by: Mateusz Palczewski Tested-by: Dave Switzer Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 90 ++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) commit 53bee458b8ad35a1fb6cf552d3d25dae910cc820 Author: Jonathan Cameron Date: Sat Jun 4 16:53:05 2022 +0100 iio: chemical: sps30: Move symbol exports into IIO_SPS30 namespace Avoid unnecessary pollution of the global symbol namespace by moving library functions in to a specific namespace and import that into the drivers that make use of the functions. For more info: https://lwn.net/Articles/760045/ Signed-off-by: Jonathan Cameron Cc: Tomasz Duszynski Link: https://lore.kernel.org/r/20220220173701.502331-4-jic23@kernel.org Reviewed-By: Joe Simmons-Talbott Link: https://lore.kernel.org/r/20220604155306.422937-4-jic23@kernel.org Signed-off-by: Jonathan Cameron drivers/iio/chemical/sps30.c | 2 +- drivers/iio/chemical/sps30_i2c.c | 1 + drivers/iio/chemical/sps30_serial.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 0f26b9db8dfde33184f8afa79845da267bd6cf9f Author: Jonathan Cameron Date: Sat Jun 4 16:53:04 2022 +0100 iio: pressure: bmp280: Move symbol exports to IIO_BMP280 namespace Avoid unnecessary pollution of the global symbol namespace by moving library functions in to a specific namespace and import that into the drivers that make use of the functions. For more info: https://lwn.net/Articles/760045/ Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220220173701.502331-3-jic23@kernel.org Reviewed-By: Joe Simmons-Talbott Link: https://lore.kernel.org/r/20220604155306.422937-3-jic23@kernel.org Signed-off-by: Jonathan Cameron drivers/iio/pressure/bmp280-core.c | 2 +- drivers/iio/pressure/bmp280-i2c.c | 1 + drivers/iio/pressure/bmp280-regmap.c | 4 ++-- drivers/iio/pressure/bmp280-spi.c | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) commit 2a8efd8b2941027e9994bdddd12af56226464006 Author: Jonathan Cameron Date: Sat Jun 4 16:53:03 2022 +0100 iio: imu: bmi160: Move exported symbols to IIO_BMI160 namespace Avoid unnecessary pollution of the global symbol namespace by moving library functions in to a specific namespace and import that into the drivers that make use of the functions. For more info: https://lwn.net/Articles/760045/ Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220220173701.502331-2-jic23@kernel.org Reviewed-By: Joe Simmons-Talbott Link: https://lore.kernel.org/r/20220604155306.422937-2-jic23@kernel.org Signed-off-by: Jonathan Cameron drivers/iio/imu/bmi160/bmi160_core.c | 6 +++--- drivers/iio/imu/bmi160/bmi160_i2c.c | 1 + drivers/iio/imu/bmi160/bmi160_spi.c | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) commit 7c021558929f7c80ed07e83a91d0905c31e8cd9a Author: Jiang Jian Date: Tue Jun 21 21:39:20 2022 +0800 drm/nouveau/mmu: drop unexpected word "the" in the comments there is an unexpected word "the" in the comments that need to be dropped file: drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c line: 1051 * have the the deepest nesting of page tables. changed to * have the deepest nesting of page tables. Signed-off-by: Jiang Jian Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220621133920.8112-1-jiangjian@cdjrlc.com drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a52ed4866d2b90dd5e4ae9dabd453f3ed8fa3cbc Author: Duoming Zhou Date: Tue Jun 7 11:26:26 2022 +0800 mwifiex: fix sleep in atomic context bugs caused by dev_coredumpv There are sleep in atomic context bugs when uploading device dump data in mwifiex. The root cause is that dev_coredumpv could not be used in atomic contexts, because it calls dev_set_name which include operations that may sleep. The call tree shows execution paths that could lead to bugs: (Interrupt context) fw_dump_timer_fn mwifiex_upload_device_dump dev_coredumpv(..., GFP_KERNEL) dev_coredumpm() kzalloc(sizeof(*devcd), gfp); //may sleep dev_set_name kobject_set_name_vargs kvasprintf_const(GFP_KERNEL, ...); //may sleep kstrdup(s, GFP_KERNEL); //may sleep The corresponding fail log is shown below: [ 135.275938] usb 1-1: == mwifiex dump information to /sys/class/devcoredump start [ 135.281029] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:265 ... [ 135.293613] Call Trace: [ 135.293613] [ 135.293613] dump_stack_lvl+0x57/0x7d [ 135.293613] __might_resched.cold+0x138/0x173 [ 135.293613] ? dev_coredumpm+0xca/0x2e0 [ 135.293613] kmem_cache_alloc_trace+0x189/0x1f0 [ 135.293613] ? devcd_match_failing+0x30/0x30 [ 135.293613] dev_coredumpm+0xca/0x2e0 [ 135.293613] ? devcd_freev+0x10/0x10 [ 135.293613] dev_coredumpv+0x1c/0x20 [ 135.293613] ? devcd_match_failing+0x30/0x30 [ 135.293613] mwifiex_upload_device_dump+0x65/0xb0 [ 135.293613] ? mwifiex_dnld_fw+0x1b0/0x1b0 [ 135.293613] call_timer_fn+0x122/0x3d0 [ 135.293613] ? msleep_interruptible+0xb0/0xb0 [ 135.293613] ? lock_downgrade+0x3c0/0x3c0 [ 135.293613] ? __next_timer_interrupt+0x13c/0x160 [ 135.293613] ? lockdep_hardirqs_on_prepare+0xe/0x220 [ 135.293613] ? mwifiex_dnld_fw+0x1b0/0x1b0 [ 135.293613] __run_timers.part.0+0x3f8/0x540 [ 135.293613] ? call_timer_fn+0x3d0/0x3d0 [ 135.293613] ? arch_restore_msi_irqs+0x10/0x10 [ 135.293613] ? lapic_next_event+0x31/0x40 [ 135.293613] run_timer_softirq+0x4f/0xb0 [ 135.293613] __do_softirq+0x1c2/0x651 ... [ 135.293613] RIP: 0010:default_idle+0xb/0x10 [ 135.293613] RSP: 0018:ffff888006317e68 EFLAGS: 00000246 [ 135.293613] RAX: ffffffff82ad8d10 RBX: ffff888006301cc0 RCX: ffffffff82ac90e1 [ 135.293613] RDX: ffffed100d9ff1b4 RSI: ffffffff831ad140 RDI: ffffffff82ad8f20 [ 135.293613] RBP: 0000000000000003 R08: 0000000000000000 R09: ffff88806cff8d9b [ 135.293613] R10: ffffed100d9ff1b3 R11: 0000000000000001 R12: ffffffff84593410 [ 135.293613] R13: 0000000000000000 R14: 0000000000000000 R15: 1ffff11000c62fd2 ... [ 135.389205] usb 1-1: == mwifiex dump information to /sys/class/devcoredump end This patch uses delayed work to replace timer and moves the operations that may sleep into a delayed work in order to mitigate bugs, it was tested on Marvell 88W8801 chip whose port is usb and the firmware is usb8801_uapsta.bin. The following is the result after using delayed work to replace timer. [ 134.936453] usb 1-1: == mwifiex dump information to /sys/class/devcoredump start [ 135.043344] usb 1-1: == mwifiex dump information to /sys/class/devcoredump end As we can see, there is no bug now. Fixes: f5ecd02a8b20 ("mwifiex: device dump support for usb interface") Reviewed-by: Brian Norris Signed-off-by: Duoming Zhou Link: https://lore.kernel.org/r/b63b77fc84ed3e8a6bef02378e17c7c71a0bc3be.1654569290.git.duoming@zju.edu.cn Signed-off-by: Greg Kroah-Hartman drivers/net/wireless/marvell/mwifiex/init.c | 9 +++++---- drivers/net/wireless/marvell/mwifiex/main.h | 3 ++- drivers/net/wireless/marvell/mwifiex/sta_event.c | 6 +++--- 3 files changed, 10 insertions(+), 8 deletions(-) commit 77515ebaf01920e2db49e04672ef669a7c2907f2 Author: Duoming Zhou Date: Tue Jun 7 11:26:25 2022 +0800 devcoredump: remove the useless gfp_t parameter in dev_coredumpv and dev_coredumpm The dev_coredumpv() and dev_coredumpm() could not be used in atomic context, because they call kvasprintf_const() and kstrdup() with GFP_KERNEL parameter. The process is shown below: dev_coredumpv(.., gfp_t gfp) dev_coredumpm(.., gfp_t gfp) dev_set_name kobject_set_name_vargs kvasprintf_const(GFP_KERNEL, ...); //may sleep kstrdup(s, GFP_KERNEL); //may sleep This patch removes gfp_t parameter of dev_coredumpv() and dev_coredumpm() and changes the gfp_t parameter of kzalloc() in dev_coredumpm() to GFP_KERNEL in order to show they could not be used in atomic context. Fixes: 833c95456a70 ("device coredump: add new device coredump class") Reviewed-by: Brian Norris Reviewed-by: Johannes Berg Signed-off-by: Duoming Zhou Link: https://lore.kernel.org/r/df72af3b1862bac7d8e793d1f3931857d3779dfd.1654569290.git.duoming@zju.edu.cn Signed-off-by: Greg Kroah-Hartman drivers/base/devcoredump.c | 16 ++++++---------- drivers/bluetooth/btmrvl_sdio.c | 2 +- drivers/bluetooth/hci_qca.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_dump.c | 2 +- drivers/gpu/drm/msm/disp/msm_disp_snapshot.c | 4 ++-- drivers/gpu/drm/msm/msm_gpu.c | 4 ++-- drivers/media/platform/qcom/venus/core.c | 2 +- drivers/net/can/spi/mcp251xfd/mcp251xfd-dump.c | 2 +- drivers/net/wireless/ath/ath10k/coredump.c | 2 +- drivers/net/wireless/ath/wil6210/wil_crash_dump.c | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c | 2 +- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 6 ++---- drivers/net/wireless/marvell/mwifiex/main.c | 3 +-- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 3 +-- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 3 +-- drivers/net/wireless/realtek/rtw88/main.c | 2 +- drivers/net/wireless/realtek/rtw89/ser.c | 2 +- drivers/remoteproc/qcom_q6v5_mss.c | 2 +- drivers/remoteproc/remoteproc_coredump.c | 8 ++++---- include/drm/drm_print.h | 2 +- include/linux/devcoredump.h | 13 ++++++------- sound/soc/intel/avs/apl.c | 2 +- sound/soc/intel/avs/skl.c | 2 +- sound/soc/intel/catpt/dsp.c | 2 +- 24 files changed, 40 insertions(+), 50 deletions(-) commit 87a3451e346be3f9a5d8943ae094888044314631 Author: Lyude Paul Date: Thu Jun 2 16:17:57 2022 -0400 drm/dp_mst: Get rid of old comment in drm_atomic_get_mst_topology_state docs We don't actually care about connection_mutex here anymore, so let's get rid of the comment mentioning it in this function's kdocs. Signed-off-by: Lyude Paul Reviewed-by: Wayne Lin Link: https://patchwork.freedesktop.org/patch/msgid/20220602201757.30431-4-lyude@redhat.com drivers/gpu/drm/display/drm_dp_mst_topology.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e21c3adc6fba27a5dfe3fa5e83d947ad56cb27ee Author: Lyude Paul Date: Thu Jun 2 16:17:55 2022 -0400 drm/display/dp_mst: Don't validate port refs in drm_dp_check_and_send_link_address() Drive-by cleanup, we don't need to validate the port references here as we already previously went through the effort of refactoring things such that we're guaranteed to be able to access ->mstb and ->port safely from drm_dp_check_and_send_link_address(), since the only two places in the codebase that drop an MST reference in such a way that it would remove it from the topology are both protected under probe_lock. Thanks for that, past Lyude! Signed-off-by: Lyude Paul Reviewed-by: Wayne Lin Link: https://patchwork.freedesktop.org/patch/msgid/20220602201757.30431-2-lyude@redhat.com drivers/gpu/drm/display/drm_dp_mst_topology.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit e1b7234b4a3f5fa716a84b081cd0d0245674f761 Author: Jiang Jian Date: Wed Jun 22 03:00:55 2022 +0800 drm/display: Remove duplicate 'the' in two places. there is an unexpected word "the" in the comments that need to be dropped file: drivers/gpu/drm/display/drm_dp_helper.c line: 1600 * Doesn't account the the "MOT" bit, and instead assumes each changed to * Doesn't account the "MOT" bit, and instead assumes eac Signed-off-by: Jiang Jian Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220621190055.8323-1-jiangjian@cdjrlc.com drivers/gpu/drm/display/drm_dp_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89f7f29140da767f4675efbbe7892f38786451ec Author: Paul E. McKenney Date: Wed Apr 27 09:24:31 2022 -0700 doc: Document rcutree.nocb_nobypass_lim_per_jiffy kernel parameter This commit provides documentation for the kernel parameter controlling RCU's handling of callback floods on offloaded (rcu_nocbs) CPUs. This parameter might be obscure, but it is always there when you need it. Reported-by: Frederic Weisbecker Reported-by: Uladzislau Rezki Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay Documentation/admin-guide/kernel-parameters.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 71de1e34f1dfc31ab3cb052cdd7038950aae06e7 Author: Paul E. McKenney Date: Wed Apr 20 08:59:46 2022 -0700 doc: Document the rcutree.rcu_divisor kernel boot parameter This commit adds kernel-parameters.txt documentation for the rcutree.rcu_divisor kernel boot parameter, which controls the softirq callback-invocation batch limit. Cc: Eric Dumazet Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay Documentation/admin-guide/kernel-parameters.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit cb506e130e02da24d98103d83b8de859e26d1860 Author: Paul E. McKenney Date: Sun Apr 17 20:43:13 2022 -0700 rcutorture: Update rcutorture.fwd_progress help text This commit updates the rcutorture.fwd_progress help text to say that it is the number of forward-progress kthreads to spawn rather than the old enable/disable functionality. While in the area, make the list of torture-test parameters easier to read by taking advantage of 100 columns. Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay kernel/rcu/rcutorture.c | 53 +++++++++++++++++-------------------------------- 1 file changed, 18 insertions(+), 35 deletions(-) commit fc98eb494c4be6aed076c1ad21d46d5950415ca0 Author: Vinay Belgaumkar Date: Fri Jun 17 14:20:32 2022 -0700 drm/i915: Add global forcewake request to drpc We have seen multiple RC6 issues where it is useful to know which global forcewake bits are set. Add this to the 'drpc' debugfs output. v2: Review comments (Ashutosh) Reviewed-by: Ashutosh Dixit Signed-off-by: Vinay Belgaumkar Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20220617212032.34577-1-vinay.belgaumkar@intel.com drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d4609a5d8c70d21b4a3f801cf896a3c16c613fe1 Author: Jakub Sitnicki Date: Fri Jun 17 12:57:35 2022 +0200 bpf, arm64: Keep tail call count across bpf2bpf calls Today doing a BPF tail call after a BPF to BPF call, that is from a subprogram, is allowed only by the x86-64 BPF JIT. Mixing these features requires support from JIT. Tail call count has to be tracked through BPF to BPF calls, as well as through BPF tail calls to prevent unbounded chains of tail calls. arm64 BPF JIT stores the tail call count (TCC) in a dedicated register (X26). This makes it easier to support bpf2bpf calls mixed with tail calls than on x86 platform. In order to keep the tail call count in tact throughout bpf2bpf calls, all we need to do is tweak the program prologue generator. When emitting prologue for a subprogram, we skip the block that initializes the tail call count and emits a jump pad for the tail call. With this change, a sample execution flow where a bpf2bpf call is followed by a tail call would look like so: int entry(struct __sk_buff *skb): 0xffffffc0090151d4: paciasp 0xffffffc0090151d8: stp x29, x30, [sp, #-16]! 0xffffffc0090151dc: mov x29, sp 0xffffffc0090151e0: stp x19, x20, [sp, #-16]! 0xffffffc0090151e4: stp x21, x22, [sp, #-16]! 0xffffffc0090151e8: stp x25, x26, [sp, #-16]! 0xffffffc0090151ec: stp x27, x28, [sp, #-16]! 0xffffffc0090151f0: mov x25, sp 0xffffffc0090151f4: mov x26, #0x0 // <- init TCC only 0xffffffc0090151f8: bti j // in main prog 0xffffffc0090151fc: sub x27, x25, #0x0 0xffffffc009015200: sub sp, sp, #0x10 0xffffffc009015204: mov w1, #0x0 0xffffffc009015208: mov x10, #0xffffffffffffffff 0xffffffc00901520c: strb w1, [x25, x10] 0xffffffc009015210: mov x10, #0xffffffffffffd25c 0xffffffc009015214: movk x10, #0x902, lsl #16 0xffffffc009015218: movk x10, #0xffc0, lsl #32 0xffffffc00901521c: blr x10 -------------------. // bpf2bpf call 0xffffffc009015220: add x7, x0, #0x0 <-------------. 0xffffffc009015224: add sp, sp, #0x10 | | 0xffffffc009015228: ldp x27, x28, [sp], #16 | | 0xffffffc00901522c: ldp x25, x26, [sp], #16 | | 0xffffffc009015230: ldp x21, x22, [sp], #16 | | 0xffffffc009015234: ldp x19, x20, [sp], #16 | | 0xffffffc009015238: ldp x29, x30, [sp], #16 | | 0xffffffc00901523c: add x0, x7, #0x0 | | 0xffffffc009015240: autiasp | | 0xffffffc009015244: ret | | | | int subprog_tail(struct __sk_buff *skb): | | 0xffffffc00902d25c: paciasp <----------------------' | 0xffffffc00902d260: stp x29, x30, [sp, #-16]! | 0xffffffc00902d264: mov x29, sp | 0xffffffc00902d268: stp x19, x20, [sp, #-16]! | 0xffffffc00902d26c: stp x21, x22, [sp, #-16]! | 0xffffffc00902d270: stp x25, x26, [sp, #-16]! | 0xffffffc00902d274: stp x27, x28, [sp, #-16]! | 0xffffffc00902d278: mov x25, sp | 0xffffffc00902d27c: sub x27, x25, #0x0 | 0xffffffc00902d280: sub sp, sp, #0x10 | // <- end of prologue, notice: 0xffffffc00902d284: add x19, x0, #0x0 | // 1) TCC not touched, and 0xffffffc00902d288: mov w0, #0x1 | // 2) no tail call jump pad 0xffffffc00902d28c: mov x10, #0xfffffffffffffffc | 0xffffffc00902d290: str w0, [x25, x10] | 0xffffffc00902d294: mov x20, #0xffffff80ffffffff | 0xffffffc00902d298: movk x20, #0xc033, lsl #16 | 0xffffffc00902d29c: movk x20, #0x4e00 | 0xffffffc00902d2a0: add x0, x19, #0x0 | 0xffffffc00902d2a4: add x1, x20, #0x0 | 0xffffffc00902d2a8: mov x2, #0x0 | 0xffffffc00902d2ac: mov w10, #0x24 | 0xffffffc00902d2b0: ldr w10, [x1, x10] | 0xffffffc00902d2b4: add w2, w2, #0x0 | 0xffffffc00902d2b8: cmp w2, w10 | 0xffffffc00902d2bc: b.cs 0xffffffc00902d2f8 | 0xffffffc00902d2c0: mov w10, #0x21 | 0xffffffc00902d2c4: cmp x26, x10 | // TCC >= MAX_TAIL_CALL_CNT? 0xffffffc00902d2c8: b.cs 0xffffffc00902d2f8 | 0xffffffc00902d2cc: add x26, x26, #0x1 | // TCC++ 0xffffffc00902d2d0: mov w10, #0x110 | 0xffffffc00902d2d4: add x10, x1, x10 | 0xffffffc00902d2d8: lsl x11, x2, #3 | 0xffffffc00902d2dc: ldr x11, [x10, x11] | 0xffffffc00902d2e0: cbz x11, 0xffffffc00902d2f8 | 0xffffffc00902d2e4: mov w10, #0x30 | 0xffffffc00902d2e8: ldr x10, [x11, x10] | 0xffffffc00902d2ec: add x10, x10, #0x24 | 0xffffffc00902d2f0: add sp, sp, #0x10 | // <- destroy just current 0xffffffc00902d2f4: br x10 ---------------------. | // BPF stack frame 0xffffffc00902d2f8: mov x10, #0xfffffffffffffffc | | // before the tail call 0xffffffc00902d2fc: ldr w7, [x25, x10] | | 0xffffffc00902d300: add sp, sp, #0x10 | | 0xffffffc00902d304: ldp x27, x28, [sp], #16 | | 0xffffffc00902d308: ldp x25, x26, [sp], #16 | | 0xffffffc00902d30c: ldp x21, x22, [sp], #16 | | 0xffffffc00902d310: ldp x19, x20, [sp], #16 | | 0xffffffc00902d314: ldp x29, x30, [sp], #16 | | 0xffffffc00902d318: add x0, x7, #0x0 | | 0xffffffc00902d31c: autiasp | | 0xffffffc00902d320: ret | | | | int classifier_0(struct __sk_buff *skb): | | 0xffffffc008ff5874: paciasp | | 0xffffffc008ff5878: stp x29, x30, [sp, #-16]! | | 0xffffffc008ff587c: mov x29, sp | | 0xffffffc008ff5880: stp x19, x20, [sp, #-16]! | | 0xffffffc008ff5884: stp x21, x22, [sp, #-16]! | | 0xffffffc008ff5888: stp x25, x26, [sp, #-16]! | | 0xffffffc008ff588c: stp x27, x28, [sp, #-16]! | | 0xffffffc008ff5890: mov x25, sp | | 0xffffffc008ff5894: mov x26, #0x0 | | 0xffffffc008ff5898: bti j <----------------------' | 0xffffffc008ff589c: sub x27, x25, #0x0 | 0xffffffc008ff58a0: sub sp, sp, #0x0 | 0xffffffc008ff58a4: mov x0, #0xffffffc0ffffffff | 0xffffffc008ff58a8: movk x0, #0x8fc, lsl #16 | 0xffffffc008ff58ac: movk x0, #0x6000 | 0xffffffc008ff58b0: mov w1, #0x1 | 0xffffffc008ff58b4: str w1, [x0] | 0xffffffc008ff58b8: mov w7, #0x0 | 0xffffffc008ff58bc: mov sp, sp | 0xffffffc008ff58c0: ldp x27, x28, [sp], #16 | 0xffffffc008ff58c4: ldp x25, x26, [sp], #16 | 0xffffffc008ff58c8: ldp x21, x22, [sp], #16 | 0xffffffc008ff58cc: ldp x19, x20, [sp], #16 | 0xffffffc008ff58d0: ldp x29, x30, [sp], #16 | 0xffffffc008ff58d4: add x0, x7, #0x0 | 0xffffffc008ff58d8: autiasp | 0xffffffc008ff58dc: ret -------------------------------' Signed-off-by: Jakub Sitnicki Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220617105735.733938-3-jakub@cloudflare.com arch/arm64/net/bpf_jit_comp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 95acd8817e66d031d2e6ee7def3f1e1874819317 Author: Tony Ambardar Date: Fri Jun 17 12:57:34 2022 +0200 bpf, x64: Add predicate for bpf2bpf with tailcalls support in JIT The BPF core/verifier is hard-coded to permit mixing bpf2bpf and tail calls for only x86-64. Change the logic to instead rely on a new weak function 'bool bpf_jit_supports_subprog_tailcalls(void)', which a capable JIT backend can override. Update the x86-64 eBPF JIT to reflect this. Signed-off-by: Tony Ambardar [jakub: drop MIPS bits and tweak patch subject] Signed-off-by: Jakub Sitnicki Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220617105735.733938-2-jakub@cloudflare.com arch/x86/net/bpf_jit_comp.c | 6 ++++++ include/linux/filter.h | 1 + kernel/bpf/core.c | 6 ++++++ kernel/bpf/verifier.c | 3 ++- 4 files changed, 15 insertions(+), 1 deletion(-) commit 54bd6c9a3b7b1ccb34a4d6ab64c4c53469c6aacd Author: Fabrice Gasnier Date: Tue Jun 21 17:23:49 2022 +0200 dt-bindings: usb: dwc2: document TPL support The target peripheral list (TPL) is used to identify targeted devices during Embedded Host compliance testing. The user can add "tpl-support" in the device tree to enable it. Document TPL support as described in usb-hcd.yaml. Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20220621152350.145745-4-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/dwc2.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 401e9d73225a3a382d475de2234500f038434664 Author: Amelie Delaunay Date: Tue Jun 21 17:23:48 2022 +0200 usb: host: ehci-platform: add TPL support The Target Peripheral List (TPL) is used to identify targeted devices during Embedded Host compliance testing. The user can add "tpl-support" in the device tree to enable it. Acked-by: Alan Stern Signed-off-by: Amelie Delaunay Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20220621152350.145745-3-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-platform.c | 2 ++ 1 file changed, 2 insertions(+) commit 281aec87d09b6eb343632e1d6a5a4587569c1ac1 Author: Amelie Delaunay Date: Tue Jun 21 17:23:47 2022 +0200 usb: host: ohci-platform: add TPL support The Target Peripheral List (TPL) is used to identify targeted devices during Embedded Host compliance testing. The user can add "tpl-support" in the device tree to enable it. Acked-by: Alan Stern Signed-off-by: Amelie Delaunay Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20220621152350.145745-2-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-platform.c | 3 +++ 1 file changed, 3 insertions(+) commit f5aa7d46b0eec280ac022664f3e8b6bc9f4ee099 Author: Douglas Anderson Date: Tue Jun 14 14:54:18 2022 -0700 drm/bridge: parade-ps8640: Provide wait_hpd_asserted() in struct drm_dp_aux This implements the callback added by the patch ("drm/dp: Add wait_hpd_asserted() callback to struct drm_dp_aux"). With this change and all the two "DP AUX Endpoint" drivers changed to use wait_hpd_asserted(), we no longer need to have an long delay in the AUX transfer function. It's up to the panel code to make sure that the panel is powered now. If someone tried to call the aux transfer function without making sure the panel is powered we'll just get a normal transfer failure. We'll still keep the wait for HPD in the pre_enable() function. Though it's probably not actually needed there, this driver is used in the old mode (pre-DP AUX Endpoints) and it may be important for those cases. If nothing else, it shouldn't cause any big problems. NOTE: When handling the timeout for HPD we start the timer _after_ we've runtime resumed the device. This is definitely important for the panel on my homestar which comes up 170 ms after we start timing (the panel specifies 200 ms max). It's a little unclear how much of this extra time is due to some internal state machine in the parade firmware vs. debouncing but it seems to work for the two test cases I have to do it this way. Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20220614145327.v4.4.Ie827321ce263be52fdb8c1276f6f8cc00d78029f@changeid drivers/gpu/drm/bridge/parade-ps8640.c | 39 ++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 13 deletions(-) commit 3b5765df375c90d46316822131acdd5cfb1c5869 Author: Douglas Anderson Date: Tue Jun 14 14:54:17 2022 -0700 drm/panel: atna33xc20: Take advantage of wait_hpd_asserted() in struct drm_dp_aux Let's add support for being able to read the HPD pin even if it's hooked directly to the controller. This will let us take away the waiting in the AUX transfer functions of the eDP controller drivers. Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20220614145327.v4.3.I9ee239f6b95b944c8fa030f300ad222a7af9899d@changeid drivers/gpu/drm/panel/panel-samsung-atna33xc20.c | 51 ++++++++++++++++++------ 1 file changed, 38 insertions(+), 13 deletions(-) commit 2327b13d6c4758926e57b5b6c3094302ae3b5e9b Author: Douglas Anderson Date: Tue Jun 14 14:54:16 2022 -0700 drm/panel-edp: Take advantage of wait_hpd_asserted() in struct drm_dp_aux Let's add support for being able to read the HPD pin even if it's hooked directly to the controller. This will allow us to get more accurate delays also lets us take away the waiting in the AUX transfer functions of the eDP controller drivers. Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20220614145327.v4.2.Icea616f57331fbaa3d48c529f300c9a8ebd37fb5@changeid drivers/gpu/drm/panel/panel-edp.c | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) commit 841d742f094e00e514627bde65d7822e98fb3e4c Author: Douglas Anderson Date: Tue Jun 14 14:54:15 2022 -0700 drm/dp: Add wait_hpd_asserted() callback to struct drm_dp_aux Sometimes it's useful for users of the DP AUX bus (like panels) to be able to poll HPD. Let's add a callback that allows DP AUX busses drivers to provide this. Suggested-by: Dmitry Baryshkov Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20220614145327.v4.1.Icf57bb12233a47727013c6ab69eebf803e22ebc1@changeid include/drm/display/drm_dp_helper.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 15b9ca1641f0c3cd74885280331e9172c62a125e Author: Hsin-Yi Wang Date: Thu Jun 9 15:27:23 2022 +0800 drm: Config orientation property if panel provides it Panel orientation property should be set before drm_dev_register(). Some drm driver calls drm_dev_register() in .bind(). However, most panels sets orientation property relatively late, mostly in .get_modes() callback, since this is when they are able to get the connector and binds the orientation property to it, though the value should be known when the panel is probed. In drm_bridge_connector_init(), if a bridge is a panel bridge, use it to set the connector's panel orientation property. Suggested-by: Douglas Anderson Signed-off-by: Hsin-Yi Wang Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd [dianders: fixed space vs. tab indentation] Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20220609072722.3488207-9-hsinyi@chromium.org drivers/gpu/drm/bridge/panel.c | 34 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/drm_bridge_connector.c | 8 +++++++- include/drm/drm_bridge.h | 14 ++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) commit a64af136771a7c50818fdc23ad4ce140ed7b66c8 Author: Hsin-Yi Wang Date: Thu Jun 9 15:27:21 2022 +0800 drm/panel: elida-kd35t133: Implement .get_orientation callback To return the orientation property to drm/kms driver. Signed-off-by: Hsin-Yi Wang Reviewed-by: Hans de Goede Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd [dianders: fixed space vs. tab indentation] Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20220609072722.3488207-8-hsinyi@chromium.org drivers/gpu/drm/panel/panel-elida-kd35t133.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit db9b4ffbfa82201fd7e18f6e434469f3648a8bcb Author: Hsin-Yi Wang Date: Thu Jun 9 15:27:20 2022 +0800 drm/panel: ili9881c: Implement .get_orientation callback To return the orientation property to drm/kms driver. Signed-off-by: Hsin-Yi Wang Reviewed-by: Hans de Goede Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd [dianders: fixed space vs. tab indentation] Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20220609072722.3488207-7-hsinyi@chromium.org drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit a960e35ac0111b793dd07f3ce6dc3e1981f91679 Author: Hsin-Yi Wang Date: Thu Jun 9 15:27:19 2022 +0800 drm/panel: panel-simple: Implement .get_orientation callback To return the orientation property to drm/kms driver. Signed-off-by: Hsin-Yi Wang Reviewed-by: Hans de Goede Reviewed-by: Douglas Anderson Reviewed-by: Sam Ravnborg Reviewed-by: Stephen Boyd [dianders: fixed space vs. tab indentation and double blank line] Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20220609072722.3488207-6-hsinyi@chromium.org drivers/gpu/drm/panel/panel-simple.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit c0398df2a195fa21122e566f54c1f78aad22ec47 Author: Hsin-Yi Wang Date: Thu Jun 9 15:27:18 2022 +0800 drm/panel: lvds: Implement .get_orientation callback To return the orientation property to drm/kms driver. Signed-off-by: Hsin-Yi Wang Reviewed-by: Hans de Goede Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd [dianders: fixed space vs. tab indentation] Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20220609072722.3488207-5-hsinyi@chromium.org drivers/gpu/drm/panel/panel-lvds.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 47bef230225b8d295255d88e130edc0b45ddbaf0 Author: Hsin-Yi Wang Date: Thu Jun 9 15:27:17 2022 +0800 drm/panel: panel-edp: Implement .get_orientation callback To return the orientation property to drm/kms driver. Signed-off-by: Hsin-Yi Wang Reviewed-by: Hans de Goede Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd [dianders: fixed space vs. tab indentation] Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20220609072722.3488207-4-hsinyi@chromium.org drivers/gpu/drm/panel/panel-edp.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 3fa214eea43a07c239bba54426399d7d175d0454 Author: Hsin-Yi Wang Date: Thu Jun 9 15:27:16 2022 +0800 drm/panel: boe-tv101wum-nl6: Implement .get_orientation callback To return the orientation property to drm/kms driver. Signed-off-by: Hsin-Yi Wang Reviewed-by: Hans de Goede Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20220609072722.3488207-3-hsinyi@chromium.org drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5e41b01a780893507a0508f16b9c4fa7f7a48557 Author: Hsin-Yi Wang Date: Thu Jun 9 15:27:15 2022 +0800 drm/panel: Add an API to allow drm to set orientation from panel Panels usually call drm_connector_set_panel_orientation(), which is later than drm/kms driver calling drm_dev_register(). This leads to a WARN(). The orientation property is known earlier. For example, some panels parse the property through device tree during probe. Add an API to return the property from panel to drm/kms driver, so the drivers are able to call drm_connector_set_orientation_from_panel() before drm_dev_register(). Suggested-by: Hans de Goede Signed-off-by: Hsin-Yi Wang Reviewed-by: Hans de Goede Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd [dianders: removed space before tab] Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20220609072722.3488207-2-hsinyi@chromium.org drivers/gpu/drm/drm_connector.c | 31 +++++++++++++++++++++++++++++++ include/drm/drm_connector.h | 4 ++++ include/drm/drm_panel.h | 9 +++++++++ 3 files changed, 44 insertions(+) commit b65bb2c148913c4020d06c9798e5e1bc18105f4f Author: Andy Shevchenko Date: Wed Jun 1 20:10:13 2022 +0300 gpio: pch: Change PCI device macros Use PCI_DEVICE_DATA macro. No functional changes are expected. Signed-off-by: Andy Shevchenko drivers/gpio/gpio-pch.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit d3bb436deb78478bde129a322ca2f6e75716f4de Author: Andy Shevchenko Date: Mon May 9 20:21:29 2022 +0300 gpio: pch: Use dev_err_probe() Simplify the error path in ->probe() a bit by using dev_err_probe(). While at it, correct the messages since the called function were changed in the past. Signed-off-by: Andy Shevchenko drivers/gpio/gpio-pch.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit d92c3d13e7650a324edcfb4ed934baaecd287bbf Author: Judy Hsiao Date: Sun Jun 19 09:53:24 2022 +0000 ASoC: dt-bindings: rockchip: Document pinctrl-names for i2s This patch documents pinctrl-names for i2s. Signed-off-by: Judy Hsiao Link: https://lore.kernel.org/r/20220619095324.492678-4-judyhsiao@chromium.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rockchip-i2s.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 8c77cf26a82e751ce827614664faf40243058d5d Author: Judy Hsiao Date: Sun Jun 19 09:53:22 2022 +0000 ASoC: rockchip: i2s: switch BCLK to GPIO We discoverd that the state of BCLK on, LRCLK off and SD_MODE on may cause the speaker melting issue. Removing LRCLK while BCLK is present can cause unexpected output behavior including a large DC output voltage as described in the Max98357a datasheet. In order to: 1. prevent BCLK from turning on by other component. 2. keep BCLK and LRCLK being present at the same time This patch switches BCLK to GPIO func before LRCLK output, and configures BCLK func back during LRCLK is output. Without this fix, BCLK is turned on 11 ms earlier than LRCK by the da7219. With this fix, BCLK is turned on only 0.4 ms earlier than LRCK by the rockchip codec. Signed-off-by: Judy Hsiao Reviewed-by: Brian Norris Link: https://lore.kernel.org/r/20220619095324.492678-2-judyhsiao@chromium.org Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 169 +++++++++++++++++++++++++++----------- 1 file changed, 123 insertions(+), 46 deletions(-) commit 9dbdac024d4d9f3fc234399cb8c1f1cc6d2bcb2d Author: Artur Bujdoso Date: Tue May 24 18:25:40 2022 +0200 staging: octeon-usb: move driver out of staging The Octeon usb driver has been in staging for a long time and used in Ubiquiti routers for a while now. It's been built and then tested on real hardware with several usb devices and it is proven to be stable and ready to be moved to its proper place in the kernel tree. Move it to drivers/usb/host and adjust its Makefile, Kconfig and defconfig dependencies. Many thanks to the developers who made it happen. Signed-off-by: Artur Bujdoso Link: https://lore.kernel.org/r/Yo0HBIlSXOBM+//9@crux Signed-off-by: Greg Kroah-Hartman arch/mips/configs/cavium_octeon_defconfig | 2 +- drivers/staging/Kconfig | 2 -- drivers/staging/Makefile | 1 - drivers/staging/octeon-usb/Kconfig | 11 ----------- drivers/staging/octeon-usb/Makefile | 2 -- drivers/staging/octeon-usb/TODO | 8 -------- drivers/usb/host/Kconfig | 10 ++++++++++ drivers/usb/host/Makefile | 1 + drivers/{staging/octeon-usb => usb/host}/octeon-hcd.c | 0 drivers/{staging/octeon-usb => usb/host}/octeon-hcd.h | 0 10 files changed, 12 insertions(+), 25 deletions(-) commit 18171cfc3c236a1587dcad9adc27c6e781af4438 Author: Alexander Stein Date: Tue Jun 14 14:05:22 2022 +0200 usb: chipidea: ci_hdrc_imx: use dev_err_probe() Use dev_err_probe() to simplify handling errors in ci_hdrc_imx_probe() Acked-by: Peter Chen Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20220614120522.1469957-1-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/ci_hdrc_imx.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) commit 8709115180c612bd8e6686a7b6c6fe94e5b51cdc Author: Michael Grzeschik Date: Thu Jun 16 21:44:59 2022 +0200 usb: chipidea: udc: implement get_frame The chipidea udc core is capable of reading the current frame index from hardware. This patch adds the get_frame callback to the driver. Acked-by: Peter Chen Signed-off-by: Michael Grzeschik Link: https://lore.kernel.org/r/20220616194459.2981519-1-m.grzeschik@pengutronix.de Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/ci.h | 1 + drivers/usb/chipidea/core.c | 2 ++ drivers/usb/chipidea/udc.c | 14 ++++++++++++++ 3 files changed, 17 insertions(+) commit 5c586db8465274ce5db64171d42a099ce89ec905 Author: Hyunwoo Kim Date: Mon Jun 20 23:42:42 2022 -0700 usb: host: ehci-q: Fix ehci_submit_single_step_set_feature annotation typo I found the "argument" typo. It seems that "argument" is more correct than "arguement". Signed-off-by: Hyunwoo Kim Link: https://lore.kernel.org/r/20220621064242.GA698757@ubuntu Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-q.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 274a12ea4007bf62a3abdc5600f85cd4de678169 Author: Xiang wangx Date: Mon Jun 20 18:42:43 2022 +0800 USB: storage: Fix typo in comment Delete the redundant word 'the'. Signed-off-by: Xiang wangx Link: https://lore.kernel.org/r/20220620104243.4979-1-wangxiang@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d34b0717c058f1d4a80342501d1711b8ac539c6 Author: Xiang wangx Date: Mon Jun 20 18:15:56 2022 +0800 USB: ohci-sm501: Fix typo in comment Delete the redundant word 'the'. Signed-off-by: Xiang wangx Link: https://lore.kernel.org/r/20220620101556.2290-1-wangxiang@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-sm501.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 196a58bdec7c324d6d862cba19069b77ddd48b90 Author: Sergey Shtylyov Date: Sat Jun 18 15:06:16 2022 +0300 usb: musb: core: drop redundant checks In musb_{save|restore}_context() the expression '&musb->endpoints[i]' just cannot be NULL, so the checks have no sense at all -- after dropping them, the local variables 'hw_ep' are no longer necessary, so drop them as well. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/3f8f60d9-f1b5-6b2c-1222-39b156151a22@omp.ru Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 9d6d5303c39b8bc182475b22f45504106a07f086 Author: Liang He Date: Sat Jun 18 10:32:05 2022 +0800 usb: renesas: Fix refcount leak bug In usbhs_rza1_hardware_init(), of_find_node_by_name() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220618023205.4056548-1-windhl@126.com Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/rza.c | 4 ++++ 1 file changed, 4 insertions(+) commit 40a959d7042bb7711e404ad2318b30e9f92c6b9b Author: Liang He Date: Fri Jun 17 11:46:37 2022 +0800 usb: host: ohci-ppc-of: Fix refcount leak bug In ohci_hcd_ppc_of_probe(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Acked-by: Alan Stern Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220617034637.4003115-1-windhl@126.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-ppc-of.c | 1 + 1 file changed, 1 insertion(+) commit a37599ebfb656c2af4ca119de556eba29b6926d6 Author: Prashant Malani Date: Wed Jun 15 17:20:18 2022 +0000 usb: typec: mux: Add CONFIG guards for functions There are some drivers that can use the Type C mux API, but don't have to. Introduce CONFIG guards for the mux functions so that drivers can include the header file and not run into compilation errors on systems which don't have CONFIG_TYPEC enabled. When CONFIG_TYPEC is not enabled, the Type C mux functions will be stub versions of the original calls. Reported-by: kernel test robot Reviewed-by: Nícolas F. R. A. Prado Reviewed-by: Heikki Krogerus Reviewed-by: AngeloGioacchino Del Regno Tested-by: Nícolas F. R. A. Prado Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20220615172129.1314056-3-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman include/linux/usb/typec_mux.h | 44 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) commit 144a96f7f96e412c3367f51cf2c57f52e3f1110d Author: Prashant Malani Date: Wed Jun 15 17:20:17 2022 +0000 usb: typec: mux: Allow muxes to specify mode-switch Loosen the typec_mux_match() requirements so that searches where an alt mode is not specified, but the target mux device lists the "mode-switch" property, return a success. This is helpful in Type C port drivers which would like to get a pointer to the mux switch associated with a Type C port, but don't want to specify a particular alt mode. Signed-off-by: Prashant Malani Reviewed-by: Heikki Krogerus Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220615172129.1314056-2-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/mux.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d9be8d5c5b032e5383ff5c404ff4155e9c705429 Author: Sandeep Maheswaram Date: Mon Jun 13 10:00:54 2022 +0530 usb: dwc3: qcom: Keep power domain on to retain controller status If dwc3 is wakeup capable, keep the power domain always ON so that wakeup from system suspend can be supported. Otherwise, keep the power domain ON only during runtime suspend to support wakeup from runtime suspend. Reviewed-by: Pavankumar Kondeti Signed-off-by: Sandeep Maheswaram Signed-off-by: Krishna Kurapati Link: https://lore.kernel.org/r/1655094654-24052-6-git-send-email-quic_kriskura@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/dwc3-qcom.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit 6895ea55c385c9afdd2aec1eef27ec24917a112f Author: Sandeep Maheswaram Date: Mon Jun 13 10:00:53 2022 +0530 usb: dwc3: qcom: Configure wakeup interrupts during suspend Configure DP/DM line interrupts based on the USB2 device attached to the root hub port. When HS/FS device is connected, configure the DP line as falling edge to detect both disconnect and remote wakeup scenarios. When LS device is connected, configure DM line as falling edge to detect both disconnect and remote wakeup. When no device is connected, configure both DP and DM lines as rising edge to detect HS/HS/LS device connect scenario. Reviewed-by: Pavankumar Kondeti Reviewed-by: Matthias Kaehlcke Signed-off-by: Sandeep Maheswaram Signed-off-by: Krishna Kurapati Link: https://lore.kernel.org/r/1655094654-24052-5-git-send-email-quic_kriskura@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/dwc3-qcom.c | 72 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 62 insertions(+), 10 deletions(-) commit 360e8230516de94d74d30c64f0cdcf228b8e8b67 Author: Sandeep Maheswaram Date: Mon Jun 13 10:00:52 2022 +0530 usb: dwc3: qcom: Add helper functions to enable,disable wake irqs Adding helper functions to enable,disable wake irqs to make the code simple and readable. Reviewed-by: Matthias Kaehlcke Reviewed-by: Pavankumar Kondeti Signed-off-by: Sandeep Maheswaram Signed-off-by: Krishna Kurapati Link: https://lore.kernel.org/r/1655094654-24052-4-git-send-email-quic_kriskura@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/dwc3-qcom.c | 58 ++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 32 deletions(-) commit 649f5c842ba3acfe6a06a36229759f328e98508a Author: Sandeep Maheswaram Date: Mon Jun 13 10:00:51 2022 +0530 usb: dwc3: core: Host wake up support from system suspend Check wakeup-source property for dwc3 core node to set the wakeup capability. Drop the device_init_wakeup call from runtime suspend and resume. If the dwc3 is wakeup capable, don't power down the USB PHY(s). The glue drivers are expected to take care of configuring the additional wakeup settings if needed based on the dwc3 wakeup capability status. In some SOC designs, powering off the PHY is resulting in higher leakage, so this patch save power on such boards. Reviewed-by: Pavankumar Kondeti Signed-off-by: Sandeep Maheswaram Signed-off-by: Krishna Kurapati Link: https://lore.kernel.org/r/1655094654-24052-3-git-send-email-quic_kriskura@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 098c4d43b91a269e89f60331a26a3f3b914677ed Author: Sandeep Maheswaram Date: Mon Jun 13 10:00:50 2022 +0530 dt-bindings: usb: dwc3: Add wakeup-source property support Added support for wakeup-source property. This property can be used to check and power down the phy during system suspend if wake up is not supported. Reviewed-by: Matthias Kaehlcke Acked-by: Krzysztof Kozlowski Signed-off-by: Sandeep Maheswaram Signed-off-by: Krishna Kurapati Link: https://lore.kernel.org/r/1655094654-24052-2-git-send-email-quic_kriskura@quicinc.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit afbd04e66e5d16ca3c7ea2e3c56eca25558eacf3 Author: Thinh Nguyen Date: Wed Jun 15 17:24:32 2022 -0700 usb: dwc3: core: Deprecate GCTL.CORESOFTRESET Synopsys IP DWC_usb32 and DWC_usb31 version 1.90a and above deprecated GCTL.CORESOFTRESET. The DRD mode switching flow is updated to remove the GCTL soft reset. Add version checks to prevent using deprecated setting in mode switching flow. Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/9df529fde6e55f5508321b6bc26e92848044ef2b.1655338967.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4a691b8c157a339e35ec71e432edf17a358215e7 Author: Conor Dooley Date: Mon Jun 13 12:46:43 2022 +0100 MAINTAINERS: add musb to PolarFire SoC entry Add the newly introduced musb driver to the existing PolarFire SoC entry. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220613114642.1615292-3-conor.dooley@microchip.com Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 7a96b6ea90a439f73e42b640eef2386c2c644570 Author: Conor Dooley Date: Mon Jun 13 12:46:42 2022 +0100 usb: musb: Add support for PolarFire SoC's musb controller Add support for Microchips's PolarFire SoC's musb controller in host, peripheral and otg mode. Tested-by: Valentina Fernandez Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220613114642.1615292-2-conor.dooley@microchip.com Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/Kconfig | 13 ++- drivers/usb/musb/Makefile | 1 + drivers/usb/musb/mpfs.c | 265 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 278 insertions(+), 1 deletion(-) commit 44830e11ae9e56120e9d8edba447d0d0c44bfbbc Author: Jiapeng Chong Date: Thu Jun 16 17:04:10 2022 +0800 usb: gadget: Remove unnecessary print function dev_err() The print function dev_err() is redundant because platform_get_irq() already prints an error. This was found by coccicheck: ./drivers/usb/gadget/udc/aspeed_udc.c:1546:2-9: line 1546 is redundant because platform_get_irq() already prints an error. Acked-by: Neal Liu Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20220616090410.128483-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/aspeed_udc.c | 1 - 1 file changed, 1 deletion(-) commit e2900f7466ddf013686520f2d23c3a9d50a6a516 Author: Colin Ian King Date: Wed Jun 15 08:35:18 2022 +0100 usb: gadget: ast2600: Fix a couple of spelling mistakes There are a couple of spelling mistakes, one in a dev_warn message and another in a SETUP_DBG message. Fix these and remove an extraneous white space too. Acked-by: Neal Liu Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20220615073518.192827-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/aspeed_udc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c09b1f372e746aeeb61ef8ffe0fea3970fd9273e Author: Dan Carpenter Date: Sat Jun 18 11:54:20 2022 +0300 usb: gadget: aspeed_udc: cleanup loop in ast_dma_descriptor_setup() The "chunk >= 0" condition does not work because count is a u32. Also, really we shouldn't enter the loop when "chunk" is zero. Once that condition is fixed then there is no need for the "last" variable. I reversed the "if (chunk <= ep->chunk_max)" as well. The new loop is much simpler. Fixes: 055276c13205 ("usb: gadget: add Aspeed ast2600 udc driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Yq2SvM2bbrtSd1H9@kili Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/aspeed_udc.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 3d393f0303b5120aa8c98a8ee70535ea9604ef20 Author: Zheng Bin Date: Thu Jun 16 21:35:08 2022 +0800 usb: gadget: aspeed_udc: fix missing spin_unlock_irqrestore in ast_udc_ep_queue ast_udc_ep_queue misses spin_unlock_irqrestore in an error path, this patch fixes that. Fixes: 055276c13205 ("usb: gadget: add Aspeed ast2600 udc driver") Reviewed-by: Neal Liu Signed-off-by: Zheng Bin Link: https://lore.kernel.org/r/20220616133508.3655864-1-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/aspeed_udc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 485394c63f47df18eb7498608d5fc9041c19ec13 Author: Lukas Bulwahn Date: Wed Jun 15 21:44:09 2022 +0200 MAINTAINERS: Repair file entry in ASPEED USB UDC DRIVER Commit 055276c13205 ("usb: gadget: add Aspeed ast2600 udc driver") adds the section ASPEED USB UDC DRIVER with a file entry to aspeed,udc.yaml, but then, commit 0dde9a46a2cf ("dt-bindings: usb: add documentation for aspeed udc") actually adds a device tree binding aspeed,ast2600-udc.yaml. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Repair the reference to the actually added file in ASPEED USB UDC DRIVER. Acked-by: Neal Liu Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220615194409.11875-1-lukas.bulwahn@gmail.com Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8720bd951b8e8515ffd995c7631790fdabaa9265 Merge: 00bb2920cf6a 1fe94f542e66 Author: Paolo Abeni Date: Tue Jun 21 15:26:47 2022 +0200 Merge branch 'net-dsa-microchip-common-spi-probe-for-the-ksz-series-switches-part-1' Arun Ramadoss says: ==================== net: dsa: microchip: common spi probe for the ksz series switches - part 1 This patch series aims to refactor the ksz_switch_register routine to have the common flow for the ksz series switch. At present ksz8795.c & ksz9477.c have its own dsa_switch_ops and switch detect functionality. In ksz_switch_register, ksz_dev_ops is assigned based on the function parameter passed by the individual ksz8/ksz9477 switch register function. And then switch detect is performed based on the ksz_dev_ops.detect hook. This patch modifies the ksz_switch_register such a way that switch detect is performed first, based on the chip ksz_dev_ops is assigned to ksz_device structure. It ensures the common flow for the existing as well as LAN937x switches. In the next series of patch, it will move ksz_dsa_ops and dsa_switch_ops from ksz8795.c and ksz9477.c to ksz_common.c and have the common spi probe all the ksz based switches. Changes in v1 - Splitted the patch series into two. - Replaced all occurrence of REG_PORT_STATUS_0 and PORT_FIBER_MODE to KSZ8_PORT_STATUS_0 and KSZ8_PORT_FIBER_MODE. - Separated the tag protocol and phy read/write patch into two. - Assigned the DSA_TAG_PROTO_NONE as the default value for get_tag_protocol hook. - Reduced the indentation level by using the if(!dev->dev_ops->mirror_add). - Added the stp_ctrl_reg as a member in ksz_chip_data and removed the member in ksz_dev_ops. - Removed the r_dyn_mac_table, r_sta_mac_table and w_sta_mac_table from the ksz_dev_ops since it is used only in the ksz8795.c. Changes in RFC v2 - Fixed the compilation issue. - Reduced the patch set to 15. ==================== Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220617084255.19376-1-arun.ramadoss@microchip.com Signed-off-by: Paolo Abeni commit 1fe94f542e66b5de526233762ed528e7d3b66ff9 Author: Arun Ramadoss Date: Fri Jun 17 14:12:55 2022 +0530 net: dsa: microchip: move get_phy_flags & mtu to ksz_common This patch assigns the get_phy_flags & mtu hook of ksz8795 and ksz9477 in dsa_switch_ops to ksz_common. For get_phy_flags hooks,checks whether the chip is ksz8863/kss8793 then it returns error for port1. Signed-off-by: Arun Ramadoss Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz8795.c | 14 +----------- drivers/net/dsa/microchip/ksz9477.c | 11 +++++----- drivers/net/dsa/microchip/ksz_common.c | 40 ++++++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 5 +++++ 4 files changed, 52 insertions(+), 18 deletions(-) commit e587be759e6e4f5a257d1f2bd7f2883a6397a6e8 Author: Arun Ramadoss Date: Fri Jun 17 14:12:54 2022 +0530 net: dsa: microchip: update fdb add/del/dump in ksz_common This patch makes the dsa_switch_hook for fdbs to use ksz_common.c file. And from ksz_common, individual switches fdb functions are called using the dev->dev_ops. And removed the r_dyn_mac_table, r_sta_mac_table and w_sta_mac_table from ksz_dev_ops as it is used only in ksz8795.c Signed-off-by: Arun Ramadoss Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz8795.c | 40 +++++++++++++++++++++----- drivers/net/dsa/microchip/ksz9477.c | 28 +++++++++---------- drivers/net/dsa/microchip/ksz_common.c | 51 +++++++++++++++++++--------------- drivers/net/dsa/microchip/ksz_common.h | 17 +++++++----- 4 files changed, 85 insertions(+), 51 deletions(-) commit 980c7d171d3a6e777715ca968f97090448d6ff1d Author: Arun Ramadoss Date: Fri Jun 17 14:12:53 2022 +0530 net: dsa: microchip: update the ksz_port_mdb_add/del ksz_mdb_add/del in ksz_common.c is specific for the ksz8795.c file. The ksz9477 has its separate ksz9477_port_mdb_add/del functions. This patch moves the ksz8795 specific mdb functionality from ksz_common to ksz8795. And this dsa_switch_ops hooks for ksz8795/ksz9477 are invoked through the ksz_port_mdb_add/del. Signed-off-by: Arun Ramadoss Reviewed-by: Vladimir Oltean Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz8795.c | 76 ++++++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz9477.c | 20 ++++----- drivers/net/dsa/microchip/ksz_common.c | 64 +++------------------------- drivers/net/dsa/microchip/ksz_common.h | 6 +++ 4 files changed, 98 insertions(+), 68 deletions(-) commit 7012033ce10e0968e6cb82709aa0ed7f2080b61e Author: Arun Ramadoss Date: Fri Jun 17 14:12:52 2022 +0530 net: dsa: microchip: update the ksz_phylink_get_caps This patch assigns the phylink_get_caps in ksz8795 and ksz9477 to ksz_phylink_get_caps. And update their mac_capabilities in the respective ksz_dev_ops. Signed-off-by: Arun Ramadoss Reviewed-by: Vladimir Oltean Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz8795.c | 9 +++------ drivers/net/dsa/microchip/ksz9477.c | 7 +++---- drivers/net/dsa/microchip/ksz_common.c | 3 +++ drivers/net/dsa/microchip/ksz_common.h | 2 ++ 4 files changed, 11 insertions(+), 10 deletions(-) commit e593df51ffe8ad7d29c8bd6cd2bd614ad1f88005 Author: Arun Ramadoss Date: Fri Jun 17 14:12:51 2022 +0530 net: dsa: microchip: get P_STP_CTRL in ksz_port_stp_state by ksz_dev_ops At present, P_STP_CTRL register value is passed as parameter to ksz_port_stp_state from the individual dsa_switch_ops hooks. This patch update the function to retrieve the register value through the ksz_chip_data member. And add the static to ksz_update_port_member since it is not called outside the ksz_common. Signed-off-by: Arun Ramadoss Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz8795.c | 9 ++------- drivers/net/dsa/microchip/ksz9477.c | 10 ++-------- drivers/net/dsa/microchip/ksz_common.c | 22 ++++++++++++++++++---- drivers/net/dsa/microchip/ksz_common.h | 5 ++--- 4 files changed, 24 insertions(+), 22 deletions(-) commit 00a298bbc23876288b1cd04c38752d8e7ed53ae2 Author: Arun Ramadoss Date: Fri Jun 17 14:12:50 2022 +0530 net: dsa: microchip: move the port mirror to ksz_common This patch updates the common port mirror add/del dsa_switch_ops in ksz_common.c. The individual switches implementation is executed based on the ksz_dev_ops function pointers. Signed-off-by: Arun Ramadoss Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz8795.c | 13 ++++++------- drivers/net/dsa/microchip/ksz9477.c | 12 ++++++------ drivers/net/dsa/microchip/ksz_common.c | 23 +++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 10 ++++++++++ 4 files changed, 45 insertions(+), 13 deletions(-) commit f0d997e31bb307c7aa046c4992c568547fd25195 Author: Arun Ramadoss Date: Fri Jun 17 14:12:49 2022 +0530 net: dsa: microchip: move vlan functionality to ksz_common This patch moves the vlan dsa_switch_ops such as vlan_add, vlan_del and vlan_filtering from the individual files ksz8795.c, ksz9477.c to ksz_common.c file. Signed-off-by: Arun Ramadoss Reviewed-by: Vladimir Oltean Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz8795.c | 19 +++++++++-------- drivers/net/dsa/microchip/ksz9477.c | 19 +++++++++-------- drivers/net/dsa/microchip/ksz_common.c | 37 ++++++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 14 +++++++++++++ 4 files changed, 69 insertions(+), 20 deletions(-) commit 930e579083d72ad57acd667e368e3c65332da65d Author: Arun Ramadoss Date: Fri Jun 17 14:12:48 2022 +0530 net: dsa: microchip: ksz9477: use ksz_read_phy16 & ksz_write_phy16 ksz8795 and ksz9477 implementation on phy read/write hooks are different. This patch modifies the ksz9477 implementation same as ksz8795 by updating the ksz9477_dev_ops structure. Signed-off-by: Arun Ramadoss Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz9477.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit 534a0431e9e68959e2c0d71c141d5b911d66ad7c Author: Arun Ramadoss Date: Fri Jun 17 14:12:47 2022 +0530 net: dsa: microchip: move tag_protocol to ksz_common This patch move the dsa hook get_tag_protocol to ksz_common file. And the tag_protocol is returned based on the dev->chip_id. Signed-off-by: Arun Ramadoss Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz8795.c | 13 +------------ drivers/net/dsa/microchip/ksz9477.c | 14 +------------- drivers/net/dsa/microchip/ksz_common.c | 24 ++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 2 ++ 4 files changed, 28 insertions(+), 25 deletions(-) commit 91a98917a8839923d404a77c21646ca5fc9e330a Author: Arun Ramadoss Date: Fri Jun 17 14:12:46 2022 +0530 net: dsa: microchip: move switch chip_id detection to ksz_common KSZ87xx and KSZ88xx have chip_id representation at reg location 0. And KSZ9477 compatible switch and LAN937x switch have same chip_id detection at location 0x01 and 0x02. To have the common switch detect functionality for ksz switches, ksz_switch_detect function is introduced. Signed-off-by: Arun Ramadoss Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz8795.c | 48 +------------------- drivers/net/dsa/microchip/ksz8795_reg.h | 16 ------- drivers/net/dsa/microchip/ksz9477.c | 21 --------- drivers/net/dsa/microchip/ksz9477_reg.h | 1 - drivers/net/dsa/microchip/ksz_common.c | 78 +++++++++++++++++++++++++++++++-- drivers/net/dsa/microchip/ksz_common.h | 19 +++++++- 6 files changed, 93 insertions(+), 90 deletions(-) commit 27faa0aa85f6696d411bbbebaed9f0f723c2a175 Author: Arun Ramadoss Date: Fri Jun 17 14:12:45 2022 +0530 net: dsa: microchip: ksz9477: cleanup the ksz9477_switch_detect The ksz9477_switch_detect performs the detecting the chip id from the location 0x00 and also check gigabit compatibility check & number of ports based on the register global_options0. To prepare the common ksz switch detect function, routine other than chip id read is moved to ksz9477_switch_init. Signed-off-by: Arun Ramadoss Reviewed-by: Vladimir Oltean Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz9477.c | 48 +++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 26 deletions(-) commit 178329d4d635fb1848cc7ca1803dee5a634cde0d Author: Yonglin Tan Date: Mon May 16 14:38:29 2022 +0800 bus: mhi: host: pci_generic: Add support for Quectel EM120 FCCL modem The product's enumeration align with previous Quectel EM120R-GL, so the EM120 FCCL would use the same config as Quectel EM120R-GL. Signed-off-by: Yonglin Tan Reviewed-by: Manivannan Sadhasivam Reviewed-by: Loic Poulain Link: https://lore.kernel.org/r/MEYP282MB2374837FFCB18B12BFDEDE80FDCF9@MEYP282MB2374.AUSP282.PROD.OUTLOOK.COM [mani: added pci_generic prefix to subject and aligned the commit message] Signed-off-by: Manivannan Sadhasivam drivers/bus/mhi/host/pci_generic.c | 2 ++ 1 file changed, 2 insertions(+) commit 0b1bd1e356643319809903034ffd2e6b5834271e Author: Rafael J. Wysocki Date: Mon Jun 13 20:30:19 2022 +0200 platform/x86/thinkpad_acpi: Use acpi_dev_for_each_child() Instead of walking the list of children of an ACPI device directly, use acpi_dev_for_each_child() to carry out an action for all of the given ACPI device's children. This will help to eliminate the children list head from struct acpi_device as it is redundant and it is used in questionable ways in some places (in particular, locking is needed for walking the list pointed to it safely, but it is often missing). Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko Reviewed-by: Hans de Goede drivers/platform/x86/thinkpad_acpi.c | 53 ++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 26 deletions(-) commit a976a2ac7708c63257d42707c8423047136797a0 Author: Rafael J. Wysocki Date: Tue Jun 21 14:34:28 2022 +0200 ACPI: scan: Walk ACPI device's children using driver core Instead of walking the list of children of an ACPI device directly, use acpi_dev_for_each_child() or acpi_dev_for_each_child_reverse() to carry out an action for all of the given ACPI device's children. This will help to eliminate the children list head from struct acpi_device as it is redundant and it is used in questionable ways in some places (in particular, locking is needed for walking the list pointed to it safely, but it is often missing). Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko drivers/acpi/scan.c | 59 ++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 30 deletions(-) commit 6b183919f7051294dc5fc331bb608d5d7f29f5da Author: Charles Keepax Date: Tue Jun 21 11:20:41 2022 +0100 ASoC: core: Add new SOC_DOUBLE_SX_TLV macro Currently macros only exist for SX style (implicit sign bit 2's compliment) volume controls where the volumes for left and right are in separate registers. Some future Cirrus devices will have both volumes in the same register, as such add a new macro to support this. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220621102041.1713504-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown include/sound/soc.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit f69a10f84cb5ff0b1c6aef0e19e866bbe53ec7ea Author: Shuming Fan Date: Tue Jun 21 17:07:19 2022 +0800 ASoC: rt711-sdca: fix kernel NULL pointer dereference when IO error The initial settings will be written before the codec probe function. But, the rt711->component doesn't be assigned yet. If IO error happened during initial settings operations, it will cause the kernel panic. This patch changed component->dev to slave->dev to fix this issue. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20220621090719.30558-1-shumingf@realtek.com Signed-off-by: Mark Brown sound/soc/codecs/rt711-sdca.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 87912e97a1678d62877aab353ecfd201bc92b372 Author: Charles Keepax Date: Tue Jun 21 11:20:40 2022 +0100 ASoC: cs35l41: Correct some control names Various boolean controls on cs35l41 are missing the required "Switch" in the name, add these. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220621102041.1713504-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cs35l41.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 630cc5983740d784a1a6458f9dc2112c43fe0931 Author: Charles Keepax Date: Tue Jun 21 11:20:39 2022 +0100 ASoC: wm5110: Fix DRE control The DRE controls on wm5110 should return a value of 1 if the DRE state is actually changed, update to fix this. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220621102041.1713504-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/wm5110.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 81d74ddae83fbd85c9006835f36c362114127a7a Author: Charles Keepax Date: Tue Jun 21 11:20:38 2022 +0100 ASoC: wm_adsp: Fix event for preloader The preloader controls on ADSP should return a value of 1 if the preloader value was changed, update to correct this. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220621102041.1713504-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb84efa28a48e30b87fa1122e8aab8016c7347cd Author: Thomas Zimmermann Date: Fri Jun 17 14:10:27 2022 +0200 drm/aperture: Run fbdev removal before internal helpers Always run fbdev removal first to remove simpledrm via sysfb_disable(). This clears the internal state. The later call to drm_aperture_detach_drivers() then does nothing. Otherwise, with drm_aperture_detach_drivers() running first, the call to sysfb_disable() uses inconsistent state. Example backtrace show below: [ 11.663422] ================================================================== [ 11.663426] BUG: KASAN: use-after-free in device_del+0x79/0x5f0 [ 11.663435] Read of size 8 at addr ffff888108185050 by task systemd-udevd/311 [ 11.663440] CPU: 0 PID: 311 Comm: systemd-udevd Tainted: G E 5 .19.0-rc2-1-default+ #1689 [ 11.663445] Hardware name: HP ProLiant DL120 G7, BIOS J01 04/21/2011 [ 11.663447] Call Trace: [ 11.663449] [ 11.663451] ? device_del+0x79/0x5f0 [ 11.663456] dump_stack_lvl+0x5b/0x73 [ 11.663462] print_address_description.constprop.0+0x1f/0x1b0 [ 11.663468] ? device_del+0x79/0x5f0 [ 11.663471] ? device_del+0x79/0x5f0 [ 11.663475] print_report.cold+0x3c/0x21c [ 11.663481] ? lock_acquired+0x87/0x1e0 [ 11.663484] ? lock_acquired+0x87/0x1e0 [ 11.663489] ? device_del+0x79/0x5f0 [ 11.663492] kasan_report+0xbf/0xf0 [ 11.663498] ? device_del+0x79/0x5f0 [ 11.663503] device_del+0x79/0x5f0 [ 11.663509] ? device_remove_attrs+0x170/0x170 [ 11.663514] ? lock_is_held_type+0xe8/0x140 [ 11.663523] platform_device_del.part.0+0x19/0xe0 [ 11.663530] platform_device_unregister+0x1c/0x30 [ 11.663535] sysfb_disable+0x2d/0x70 [ 11.663540] remove_conflicting_framebuffers+0x1c/0xf0 [ 11.663546] remove_conflicting_pci_framebuffers+0x130/0x1a0 [ 11.663554] drm_aperture_remove_conflicting_pci_framebuffers+0x86/0xb0 [ 11.663561] ? mgag200_pci_remove+0x30/0x30 [mgag200] [ 11.663578] mgag200_pci_probe+0x2d/0x140 [mgag200] Reported-by: Zack Rusin Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Reviewed-by: Zack Rusin Fixes: 873eb3b11860 ("fbdev: Disable sysfb device registration when removing conflicting FBs") Cc: Javier Martinez Canillas Cc: Daniel Vetter Cc: Daniel Vetter Cc: Sam Ravnborg Cc: Helge Deller Cc: Thomas Zimmermann Cc: Alex Deucher Cc: Zhen Lei Cc: Changcheng Deng Link: https://patchwork.freedesktop.org/patch/msgid/20220617121027.30273-1-tzimmermann@suse.de drivers/gpu/drm/drm_aperture.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 00bb2920cf6a6ed14100822f0e7feaf5e53a9795 Author: Yu Xiao Date: Mon Jun 20 12:39:12 2022 +0200 nfp: compose firmware file name with new hwinfo "nffw.partno" During initialization of the NFP driver, a file name for loading application firmware is composed using the NIC's AMDA information and port type (count and speed). E.g.: "nic_AMDA0145-1012_2x10.nffw". In practice there may be many variants for each NIC type, and many of the variants relate to assembly components which do not concern the driver and application firmware implementation. Yet the current scheme leads to a different application firmware file name for each variant, because they have different AMDA information. To reduce proliferation of content-duplicated application firmware images or symlinks, the NIC's management firmware will only expose differences between variants that need different application firmware via a newly introduced hwinfo, "nffw.partno". Use of the existing hwinfo, "assembly.partno", is maintained in order to support for NICs with management firmware that does not expose "nffw.partno". Signed-off-by: Yu Xiao Signed-off-by: Simon Horman Reviewed-by: Jakub Kicinski Link: https://lore.kernel.org/r/20220620103912.46164-1-simon.horman@corigine.com Signed-off-by: Paolo Abeni drivers/net/ethernet/netronome/nfp/nfp_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c02b60cb25289289cb7c1d0307d15a526b9e6669 Author: Hector Martin Date: Thu Jun 2 19:42:12 2022 +0200 arm64: dts: apple: Re-parent ANS2 power domains Turns out that the APCIE_ST*_SYS domains do hard-depend on ANS2, so without this they refuse to power up. Reviewed-by: Sven Peter Signed-off-by: Sven Peter Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/t8103-pmgr.dtsi | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit af185d8c76333daa877678e0166a7b45e63bf3c4 Author: Eric Dumazet Date: Mon Jun 20 03:05:09 2022 -0700 raw: complete rcu conversion raw_diag_dump() can use rcu_read_lock() instead of read_lock() Now the hashinfo lock is only used from process context, in write mode only, we can convert it to a spinlock, and we do not need to block BH anymore. Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20220620100509.3493504-1-eric.dumazet@gmail.com Signed-off-by: Paolo Abeni include/net/raw.h | 4 ++-- net/ipv4/raw.c | 8 ++++---- net/ipv4/raw_diag.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) commit f9aefd6b2aa38b9787d2705f0f1161dfd23cdb8f Author: Eric Dumazet Date: Mon Jun 20 02:30:17 2022 -0700 net: warn if mac header was not set Make sure skb_mac_header(), skb_mac_offset() and skb_mac_header_len() uses are not fooled if the mac header has not been set. These checks are enabled if CONFIG_DEBUG_NET=y This commit will likely expose existing bugs in linux networking stacks. Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20220620093017.3366713-1-eric.dumazet@gmail.com Signed-off-by: Paolo Abeni include/linux/skbuff.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit fb119dcb97f43cf2a6164094209a08e7e6cd6f08 Author: Thinh Nguyen Date: Tue Jun 14 18:07:25 2022 -0700 Revert "usb: dwc3: Remove the checks of -ENOSYS" This reverts commit df22ecc41b54def624735b83784857e708bd1502. If CONFIG_GENERIC_PHY is not enabled, then the devm_phy_get() returns -ENOSYS. Don't remove this check. Fixes: df22ecc41b54 ("usb: dwc3: Remove the checks of -ENOSYS") Cc: Kushagra Verma Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/eb1df7ef954b5af093c0528982db52a41df18615.1655255152.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 395d10ae4d29e829847cf40b3b658fd41bf7a729 Author: Ville Syrjälä Date: Tue Jun 21 10:56:48 2022 +0300 drm/xlnx: Fix build failure due to missing include Dropping drm_blend.h from drm_crtc.h broke the xlnx driver. Make it build again by including drm_blend.h from the driver directly. My .config was missing some required dependencies so I never build tested it :/ Cc: Hyun Kwon Cc: Laurent Pinchart Reported-by: Stephen Rothwell Fixes: 90bb087f6674 ("drm: Drop drm_blend.h from drm_crtc.h") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220621075648.7717-1-ville.syrjala@linux.intel.com Reviewed-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 1 + 1 file changed, 1 insertion(+) commit 152520cb5fdb6929ac7e91fd00d820baac2143fe Merge: a111daf0c53a 2df84a757d87 Author: Greg Kroah-Hartman Date: Tue Jun 21 09:45:27 2022 +0200 Merge tag 'fpga-for-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-next Xu writes: Here is the first set of FPGA changes for 5.20-rc1 FPGA static firmware loader - Russ's change to add support for Intel MAX10 BMC Secure Update driver which instantiates the new Firmware Upload functionality (merged on last cycle) of the Firmware Loader. DFL - keliu's change to use ida_alloc()/ida_free() instead of deprecated ida_simple_get()/ida_simple_remove() ALTERA - Marco's change to fix a "comparison with less than zero" warning All patches have been reviewed on the mailing list, and have been in the last linux-next releases (as part of our for-next branch). Signed-off-by: Xu Yilun * tag 'fpga-for-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga: fpga: altera-pr-ip: fix unsigned comparison with less than zero fpga: Directly use ida_alloc()/free() fpga: m10bmc-sec: add max10 secure update functions fpga: m10bmc-sec: expose max10 canceled keys in sysfs fpga: m10bmc-sec: expose max10 flash update count fpga: m10bmc-sec: create max10 bmc secure update mfd: intel-m10-bmc: Rename n3000bmc-secure driver commit 263929afa4d674b2f1ab92801ff29a133171f757 Author: Nam Cao Date: Mon Jun 20 19:19:34 2022 +0200 staging: r8188eu: remove basic_types.h Remove file basic_types.h because the content of this file is not used anywhere. Acked-by: Larry Finger Signed-off-by: Nam Cao Link: https://lore.kernel.org/r/1b8200420a2a1b7276f49eb3c2768ef39d641713.1655745123.git.namcaov@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/basic_types.h | 19 ------------------- drivers/staging/r8188eu/include/osdep_service.h | 1 - 2 files changed, 20 deletions(-) commit 908b130df51e04f317d5413f5bf31ebbf1a9e205 Author: Nam Cao Date: Mon Jun 20 19:19:33 2022 +0200 staging: r8188eu: replace N_BYTE_ALIGMENT with ALIGN Replace the macro N_BYTE_ALIGMENT (defined in this driver) with ALIGN because they do the same thing. Acked-by: Larry Finger Signed-off-by: Nam Cao Link: https://lore.kernel.org/r/28087b76483f10dca1e1c3bdcba5e4b08eecd544.1655745123.git.namcaov@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 2 +- drivers/staging/r8188eu/core/rtw_xmit.c | 6 +++--- drivers/staging/r8188eu/hal/rtl8188eu_recv.c | 2 +- drivers/staging/r8188eu/os_dep/xmit_linux.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit 683a4647a7a3044868cfdc14c117525091b9fa0c Author: Ping-Ke Shih Date: Mon Jun 13 14:51:44 2022 +0800 wifi: rtw89: 8852a: rfk: fix div 0 exception The DPK is a kind of RF calibration whose algorithm is to fine tune parameters and calibrate, and check the result. If the result isn't good enough, it could adjust parameters and try again. This issue is to read and show the result, but it could be a negative calibration result that causes divisor 0 and core dump. So, fix it by phy_div() that does division only if divisor isn't zero; otherwise, zero is adopted. divide error: 0000 [#1] PREEMPT SMP NOPTI CPU: 1 PID: 728 Comm: wpa_supplicant Not tainted 5.10.114-16019-g462a1661811a #1 RIP: 0010:rtw8852a_dpk+0x14ae/0x288f [rtw89_core] RSP: 0018:ffffa9bb412a7520 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 00000000000180fc RDI: ffffa141d01023c0 RBP: ffffa9bb412a76a0 R08: 0000000000001319 R09: 00000000ffffff92 R10: ffffffffc0292de3 R11: ffffffffc00d2f51 R12: 0000000000000000 R13: ffffa141d01023c0 R14: ffffffffc0290250 R15: ffffa141d0102638 FS: 00007fa99f5c2740(0000) GS:ffffa142e5e80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000013e8e010 CR3: 0000000110d2c000 CR4: 0000000000750ee0 PKRU: 55555554 Call Trace: rtw89_core_sta_add+0x95/0x9c [rtw89_core ] rtw89_ops_sta_state+0x5d/0x108 [rtw89_core ] drv_sta_state+0x115/0x66f [mac80211 ] sta_info_insert_rcu+0x45c/0x713 [mac80211 ] sta_info_insert+0xf/0x1b [mac80211 ] ieee80211_prep_connection+0x9d6/0xb0c [mac80211 ] ieee80211_mgd_auth+0x2aa/0x352 [mac80211 ] cfg80211_mlme_auth+0x160/0x1f6 [cfg80211 ] nl80211_authenticate+0x2e5/0x306 [cfg80211 ] genl_rcv_msg+0x371/0x3a1 ? nl80211_stop_sched_scan+0xe5/0xe5 [cfg80211 ] ? genl_rcv+0x36/0x36 netlink_rcv_skb+0x8a/0xf9 genl_rcv+0x28/0x36 netlink_unicast+0x27b/0x3a0 netlink_sendmsg+0x2aa/0x469 sock_sendmsg_nosec+0x49/0x4d ____sys_sendmsg+0xe5/0x213 __sys_sendmsg+0xec/0x157 ? syscall_enter_from_user_mode+0xd7/0x116 do_syscall_64+0x43/0x55 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fa99f6e689b Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver") Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220613065144.15647-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852a_rfk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 47324ab67af7f8e128688c13bd05a23c496bf661 Author: Po-Hao Huang Date: Fri Jun 10 15:26:10 2022 +0800 wifi: rtw89: disable invalid phy reports for all ICs Previously we only disable invalid reports for 52A, since we plan to support more ICs in the future, enable settings for those as well. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220610072610.27095-12-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/phy.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 37c6abc374d1f1e0dd2e9fcc5a789886a63c894a Author: Ping-Ke Shih Date: Fri Jun 10 15:26:09 2022 +0800 wifi: rtw89: pci: fix PCI doesn't reclaim TX BD properly TX BD (TX ring index) and TX WD (WiFi descriptor buffer) are freed asynchronously. With burst packets, we free TX WD, but the corresponding TX BD couldn't be freed yet. Then, TX can possibly get stuck due to no more TX BD. To avoid this, ignore reclaiming TX BD only if TX WD is no free space, because at this moment TX BD must have some spaces. Otherwise, we reclaim TX BD to resolve TX stuck issue. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220610072610.27095-11-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/pci.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit c4756d5de72e549fdaa32a1fab12ae776fca5be7 Author: Ping-Ke Shih Date: Fri Jun 10 15:26:08 2022 +0800 wifi: rtw89: fix long RX latency in low power mode In low power mode, regular IO is power off, so we don't schedule napi to poll RX and TX completion. Therefore, calling ieee80211_rx_napi() with napi instance causes long RX latency. To fix this, use NULL as argument, and then it can use netif_receive_skb_list() to receive. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220610072610.27095-10-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 9a3a593cba9a6743022ab742c01b06280e8a288a Author: Ping-Ke Shih Date: Fri Jun 10 15:26:07 2022 +0800 wifi: rtw89: drop invalid TX rate report of legacy rate Somehow, firmware could report invalid TX rate, and we consider the invalid rate as 0 that will make a wrong decision. So, drop invalid reports, and also suppress the warning message. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220610072610.27095-9-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 9 +++++---- drivers/net/wireless/realtek/rtw89/core.h | 2 +- drivers/net/wireless/realtek/rtw89/phy.c | 14 +++++++++++--- 3 files changed, 17 insertions(+), 8 deletions(-) commit ad663693c1bf148bdc84a29bcebfe9eb4dc812c4 Author: Ping-Ke Shih Date: Fri Jun 10 15:26:06 2022 +0800 wifi: rtw89: add UNEXP debug mask to keep monitor messages unexpected to happen frequently Some warning messages could bother users. With proper handling, these situations don't really affect usage, but we still need to keep monitor these messages. If they happen frequently, we must review driver or hardware design to clarify. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220610072610.27095-8-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 2 +- drivers/net/wireless/realtek/rtw89/debug.h | 2 ++ drivers/net/wireless/realtek/rtw89/pci.c | 7 ++++--- 3 files changed, 7 insertions(+), 4 deletions(-) commit 679955d5431344aef2faea0f4562d459894bbc13 Author: Kuan-Chung Chen Date: Fri Jun 10 15:26:05 2022 +0800 wifi: rtw89: enable VO TX AMPDU To improve VO throughput, we enable VO TX AMPDU. We measure the latency of enable or disable VO TX AMPDU. The experimental results show that the difference between the two is insignificant only 300µs, so the little impact can be ignored for user experience. Moreover, we found some APs will have a group key handshake timeout issue when the EAPOL's TID is already setup BA session. Therefore, when transmitting EAPOL, if EAPOL's TID BA session is already setup, we need to delete it. Signed-off-by: Kuan-Chung Chen Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220610072610.27095-7-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 92 +++++++++++++++++++++++++++++-- drivers/net/wireless/realtek/rtw89/core.h | 7 ++- 2 files changed, 92 insertions(+), 7 deletions(-) commit 29363fb666bc8deee5acf27a3966f14ff63189d6 Author: Kuan-Chung Chen Date: Fri Jun 10 15:26:04 2022 +0800 wifi: rtw89: fix potential TX stuck The potential TX stuck occurs when there are lots of packets to be transmitted and the boundary of the tx_resource is hit. Add this patch to avoid the TX stuck when burst traffic. Signed-off-by: Kuan-Chung Chen Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220610072610.27095-6-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6a5a783a71cf47ad65ddf8904a71b43d303f2668 Author: Ping-Ke Shih Date: Fri Jun 10 15:26:03 2022 +0800 wifi: rtw89: support TDLS Since we can allocate MAC ID, BSSID and address CAM to TDLS peer, declare we can support TDLS now. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220610072610.27095-5-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 2 ++ 1 file changed, 2 insertions(+) commit 39913cc88540e5bae07addd23ab3cc9459dfaea6 Author: Ping-Ke Shih Date: Fri Jun 10 15:26:02 2022 +0800 wifi: rtw89: allocate BSSID CAM per TDLS peer In STA mode, if peer is TDLS. Allocate a BSSID CAM entry with peer's address to match address properly, and then hardware can ACK peer's packets and receive packets to driver. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220610072610.27095-4-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/cam.c | 5 +++-- drivers/net/wireless/realtek/rtw89/cam.h | 3 ++- drivers/net/wireless/realtek/rtw89/core.c | 13 ++++++++++++- drivers/net/wireless/realtek/rtw89/core.h | 14 ++++++++++++++ drivers/net/wireless/realtek/rtw89/debug.c | 3 ++- drivers/net/wireless/realtek/rtw89/fw.c | 2 +- drivers/net/wireless/realtek/rtw89/ser.c | 2 ++ 7 files changed, 36 insertions(+), 6 deletions(-) commit 445b6bc362f9aadef443b094625ef93087c7f755 Author: Ping-Ke Shih Date: Fri Jun 10 15:26:01 2022 +0800 wifi: rtw89: separate BSSID CAM operations Normally, we allocate a BSSID CAM to a vif. By hardware design, we must allocate a BSSID CAM to each TDLS peer, so separate BSSID CAM operations that will be used by later patches. This patch doesn't change logic at all. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220610072610.27095-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/cam.c | 24 ++++++++++++++++-------- drivers/net/wireless/realtek/rtw89/cam.h | 6 ++++++ 2 files changed, 22 insertions(+), 8 deletions(-) commit 7312100d4e6400045486a07d2c0ebd0a6172f920 Author: Ping-Ke Shih Date: Fri Jun 10 15:26:00 2022 +0800 wifi: rtw89: allocate address CAM and MAC ID to TDLS peer Normally, we only allocate an address CAM and single one MAC ID to AP in STA mode. To support TDLS, we handle TDLS peers like AP handles stations. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220610072610.27095-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 18 +++++++++--------- drivers/net/wireless/realtek/rtw89/core.h | 10 +++++++--- drivers/net/wireless/realtek/rtw89/mac80211.c | 2 +- drivers/net/wireless/realtek/rtw89/ser.c | 13 +++++++------ 4 files changed, 24 insertions(+), 19 deletions(-) commit a8eb8e6f7159c7c20c0ddac428bde3d110890aa7 Author: Alexey Kodanev Date: Wed Jun 8 20:16:14 2022 +0300 wifi: iwlegacy: 4965: fix potential off-by-one overflow in il4965_rs_fill_link_cmd() As a result of the execution of the inner while loop, the value of 'idx' can be equal to LINK_QUAL_MAX_RETRY_NUM. However, this is not checked after the loop and 'idx' is used to write the LINK_QUAL_MAX_RETRY_NUM size array 'lq_cmd->rs_table[idx]' below in the outer loop. The fix is to check the new value of 'idx' inside the nested loop, and break both loops if index equals the size. Checking it at the start is now pointless, so let's remove it. Detected using the static analysis tool - Svace. Fixes: be663ab67077 ("iwlwifi: split the drivers for agn and legacy devices 3945/4965") Signed-off-by: Alexey Kodanev Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220608171614.28891-1-aleksei.kodanev@bell-sw.com drivers/net/wireless/intel/iwlegacy/4965-rs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 57a2d0c1b27dd0a92d4d22818176e7f53eed3104 Author: Sven Peter Date: Thu Jun 2 19:31:44 2022 +0200 MAINTAINERS: add ARM/APPLE MACHINE mailing list Signed-off-by: Sven Peter Reviewed-by: Alyssa Rosenzweig Signed-off-by: Hector Martin MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit ef54ccb61616d8293bc68220d88a8e74271141b5 Author: Xiu Jianfeng Date: Fri Jun 17 17:44:12 2022 +0800 selinux: selinux_add_opt() callers free memory The selinux_add_opt() function may need to allocate memory for the mount options if none has already been allocated, but there is no need to free that memory on error as the callers handle that. Drop the existing kfree() on error to help increase consistency in the selinux_add_opt() error handling. This patch also changes selinux_add_opt() to return -EINVAL when the mount option value, @s, is NULL. It currently return -ENOMEM. Link: https://lore.kernel.org/lkml/20220611090550.135674-1-xiujianfeng@huawei.com/T/ Suggested-by: Paul Moore Signed-off-by: Xiu Jianfeng [PM: fix subject, rework commit description language] Signed-off-by: Paul Moore security/selinux/hooks.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit b40b414ec8d971be0b2f6485c3a039b0fa7f078c Merge: aca80dd95e20 0e1bf9ed2000 Author: Alexei Starovoitov Date: Mon Jun 20 17:40:52 2022 -0700 Merge branch 'bpf_loop inlining' Eduard Zingerman says: ==================== Hi Everyone, This is the next iteration of the patch. It includes changes suggested by Song, Joanne and Alexei. Please find updated intro message and change log below. This patch implements inlining of calls to bpf_loop helper function when bpf_loop's callback is statically known. E.g. the rewrite does the following transformation during BPF program processing: bpf_loop(10, foo, NULL, 0); -> for (int i = 0; i < 10; ++i) foo(i, NULL); The transformation leads to measurable latency change for simple loops. Measurements using `benchs/run_bench_bpf_loop.sh` inside QEMU / KVM on i7-4710HQ CPU show a drop in latency from 14 ns/op to 2 ns/op. The change is split in five parts: * Update to test_verifier.c to specify expected and unexpected instruction sequences. This allows to check BPF program rewrites applied by e.g. do_mix_fixups function. * Update to test_verifier.c to specify BTF function infos and types per test case. This is necessary for tests that load sub-program addresses to a variable because of the checks applied by check_ld_imm function. * The update to verifier.c that tracks state of the parameters for each bpf_loop call in a program and decides whether it could be replaced by a loop. * A set of test cases for `test_verifier` that use capabilities added by the first two patches to verify instructions produced by inlining logic. * Two test cases for `test_prog` to check that possible corner cases behave as expected. Additional details are available in commit messages for each patch. Changes since v7: - Call to `mark_chain_precision` is added in `loop_flag_is_zero` to avoid potential issues with state pruning and precision tracking. - `flags non-zero` test_verifier test case is updated to have two execution paths reaching `bpf_loop` call, one with flags = 0, another with flags = 1. Potentially this test case should be able to show that call to `mark_chain_precision` is necessary in `loop_flag_is_zero` but not at the moment. Please refer to discussion for [PATCH bpf-next v7 3/5] for additional details. - `stack_depth_extra` computation is updated to guarantee that R6, R7 and R8 offsets are always aligned on 8 byte boundary. - `stack locations for loop vars` test_verifier test case updated to show that R6, R7, R8 offsets are indeed aligned when function stack depth is not a multiple of 8. - I removed Song Liu's ACK from commit message for [PATCH bpf-next v8 4/5] because I updated the patch. (Please let me know if I had to keep the ACK tag). Changes since v6: - Return value of the `optimize_bpf_loop` function is no longer ignored. This is necessary to properly propagate -ENOMEM error. Changes since v5: - Added function `loop_flag_is_zero` to skip a few checks in `update_loop_inline_state` when loop instruction is not fit for inline. Changes since v4: - Added missing `static` modifier for `update_loop_inline_state` and `inline_bpf_loop` functions. - `update_loop_inline_state` updated for better readability. - Fields `initialized` and `fit_for_inline` of `struct bpf_loop_inline_state` are changed back from `bool` to bitfields. - Acks from Song Liu added to comments for patches 1/5, 2/5, 4/5, 5/5. Changes since v3: - Function `adjust_stack_depth_for_loop_inlining` is replaced by function `optimize_bpf_loop`. Function `optimize_bpf_loop` is responsible for both stack depth adjustment and call instruction replacement. - Changes in `do_misc_fixups` are reverted. - Changes in `adjust_subprog_starts_after_remove` are reverted and function `adjust_loop_inline_subprogno` is removed. This is possible because call to `optimize_bpf_loop` is placed before the dead code removal in `opt_remove_dead_code` (in contrast to the position of `do_misc_fixups` where inlining was done in v3). - Field `bpf_insn_aux_data.loop_inline_state` is now a part of anonymous union at the start of the `bpf_insn_aux_data`. - Data structure `bpf_loop_inline_state` is simplified to use single flag field `fit_for_inline` instead of separate fields `flags_is_zero` & `callback_is_constant`. - Macro definition `BPF_MAX_LOOPS` is moved from `include/linux/bpf_verifier.h` to `include/linux/bpf.h` to avoid include of `include/linux/bpf_verifier.h` in `bpf_iter.c`. - `inline_bpf_loop` changed back to use array initialization and hard coded offsets as in v2. - Style / formatting updates. Changes since v2: - fix for `stack_check` test case in `test_progs-no_alu32`, all tests are passing now; - v2 3/3 patch is split in three parts: - kernel changes - test_verifier changes - test_prog changes - updated `inline_bpf_loop` in `verifier.c` to calculate each offset used in instructions to avoid "magic" numbers; - removed newline handling logic in `fail_log` branch of `do_single_test` in `test_verifier.c` to simplify the patch set; - styling fixes suggested in review for v2 of this patch set. Changes since v1: - allow to use SKIP_INSNS in instruction pattern specification in test_verifier tests; - fix for a bug in spill offset assignement for loop vars when bpf_loop is located in a non-main function. ==================== Signed-off-by: Alexei Starovoitov commit 0e1bf9ed2000c16fa8e0703e255a23d64a4adb27 Author: Eduard Zingerman Date: Tue Jun 21 02:53:44 2022 +0300 selftests/bpf: BPF test_prog selftests for bpf_loop inlining Two new test BPF programs for test_prog selftests checking bpf_loop behavior. Both are corner cases for bpf_loop inlinig transformation: - check that bpf_loop behaves correctly when callback function is not a compile time constant - check that local function variables are not affected by allocating additional stack storage for registers spilled by loop inlining Signed-off-by: Eduard Zingerman Acked-by: Song Liu Link: https://lore.kernel.org/r/20220620235344.569325-6-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/bpf_loop.c | 62 ++++++++++++ tools/testing/selftests/bpf/progs/bpf_loop.c | 114 ++++++++++++++++++++++ 2 files changed, 176 insertions(+) commit f8acfdd04410d26b096a7082444cdc402df10f89 Author: Eduard Zingerman Date: Tue Jun 21 02:53:43 2022 +0300 selftests/bpf: BPF test_verifier selftests for bpf_loop inlining A number of test cases for BPF selftests test_verifier to check how bpf_loop inline transformation rewrites the BPF program. The following cases are covered: - happy path - no-rewrite when flags is non-zero - no-rewrite when callback is non-constant - subprogno in insn_aux is updated correctly when dead sub-programs are removed - check that correct stack offsets are assigned for spilling of R6-R8 registers Signed-off-by: Eduard Zingerman Acked-by: Song Liu Link: https://lore.kernel.org/r/20220620235344.569325-5-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov .../selftests/bpf/verifier/bpf_loop_inline.c | 252 +++++++++++++++++++++ 1 file changed, 252 insertions(+) commit 1ade23711971b0eececf0d7fedc29d3c1d2fce01 Author: Eduard Zingerman Date: Tue Jun 21 02:53:42 2022 +0300 bpf: Inline calls to bpf_loop when callback is known Calls to `bpf_loop` are replaced with direct loops to avoid indirection. E.g. the following: bpf_loop(10, foo, NULL, 0); Is replaced by equivalent of the following: for (int i = 0; i < 10; ++i) foo(i, NULL); This transformation could be applied when: - callback is known and does not change during program execution; - flags passed to `bpf_loop` are always zero. Inlining logic works as follows: - During execution simulation function `update_loop_inline_state` tracks the following information for each `bpf_loop` call instruction: - is callback known and constant? - are flags constant and zero? - Function `optimize_bpf_loop` increases stack depth for functions where `bpf_loop` calls can be inlined and invokes `inline_bpf_loop` to apply the inlining. The additional stack space is used to spill registers R6, R7 and R8. These registers are used as loop counter, loop maximal bound and callback context parameter; Measurements using `benchs/run_bench_bpf_loop.sh` inside QEMU / KVM on i7-4710HQ CPU show a drop in latency from 14 ns/op to 2 ns/op. Signed-off-by: Eduard Zingerman Acked-by: Song Liu Link: https://lore.kernel.org/r/20220620235344.569325-4-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 3 + include/linux/bpf_verifier.h | 12 +++ kernel/bpf/bpf_iter.c | 9 ++- kernel/bpf/verifier.c | 180 +++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 195 insertions(+), 9 deletions(-) commit 7a42008ca5c700819e4b3003025e5e1695fd1f86 Author: Eduard Zingerman Date: Tue Jun 21 02:53:41 2022 +0300 selftests/bpf: allow BTF specs and func infos in test_verifier tests The BTF and func_info specification for test_verifier tests follows the same notation as in prog_tests/btf.c tests. E.g.: ... .func_info = { { 0, 6 }, { 8, 7 } }, .func_info_cnt = 2, .btf_strings = "\0int\0", .btf_types = { BTF_TYPE_INT_ENC(1, BTF_INT_SIGNED, 0, 32, 4), BTF_PTR_ENC(1), }, ... The BTF specification is loaded only when specified. Signed-off-by: Eduard Zingerman Acked-by: Song Liu Link: https://lore.kernel.org/r/20220620235344.569325-3-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/btf.c | 1 - tools/testing/selftests/bpf/test_btf.h | 2 + tools/testing/selftests/bpf/test_verifier.c | 94 +++++++++++++++++++++++----- 3 files changed, 79 insertions(+), 18 deletions(-) commit 933ff53191eb7a8492370bad6339a1ca6da2d939 Author: Eduard Zingerman Date: Tue Jun 21 02:53:40 2022 +0300 selftests/bpf: specify expected instructions in test_verifier tests Allows to specify expected and unexpected instruction sequences in test_verifier test cases. The instructions are requested from kernel after BPF program loading, thus allowing to check some of the transformations applied by BPF verifier. - `expected_insn` field specifies a sequence of instructions expected to be found in the program; - `unexpected_insn` field specifies a sequence of instructions that are not expected to be found in the program; - `INSN_OFF_MASK` and `INSN_IMM_MASK` values could be used to mask `off` and `imm` fields. - `SKIP_INSNS` could be used to specify that some instructions in the (un)expected pattern are not important (behavior similar to usage of `\t` in `errstr` field). The intended usage is as follows: { "inline simple bpf_loop call", .insns = { /* main */ BPF_ALU64_IMM(BPF_MOV, BPF_REG_1, 1), BPF_RAW_INSN(BPF_LD | BPF_IMM | BPF_DW, BPF_REG_2, BPF_PSEUDO_FUNC, 0, 6), ... BPF_EXIT_INSN(), /* callback */ BPF_ALU64_IMM(BPF_MOV, BPF_REG_0, 1), BPF_EXIT_INSN(), }, .expected_insns = { BPF_ALU64_IMM(BPF_MOV, BPF_REG_1, 1), SKIP_INSNS(), BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, BPF_PSEUDO_CALL, 8, 1) }, .unexpected_insns = { BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, INSN_OFF_MASK, INSN_IMM_MASK), }, .prog_type = BPF_PROG_TYPE_TRACEPOINT, .result = ACCEPT, .runs = 0, }, Here it is expected that move of 1 to register 1 would remain in place and helper function call instruction would be replaced by a relative call instruction. Signed-off-by: Eduard Zingerman Acked-by: Song Liu Link: https://lore.kernel.org/r/20220620235344.569325-2-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/test_verifier.c | 234 ++++++++++++++++++++++++++++ 1 file changed, 234 insertions(+) commit aca80dd95e20f1fa0daa212afc83c9fa0ad239e5 Author: Delyan Kratunov Date: Mon Jun 20 21:47:55 2022 +0000 uprobe: gate bpf call behind BPF_EVENTS The call into bpf from uprobes needs to be gated now that it doesn't use the trace_events.h helpers. Randy found this as a randconfig build failure on linux-next [1]. [1]: https://lore.kernel.org/linux-next/2de99180-7d55-2fdf-134d-33198c27cc58@infradead.org/ Reported-by: Randy Dunlap Signed-off-by: Delyan Kratunov Tested-by: Randy Dunlap Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/cb8bfbbcde87ed5d811227a393ef4925f2aadb7b.camel@fb.com Signed-off-by: Alexei Starovoitov kernel/trace/trace_uprobe.c | 2 ++ 1 file changed, 2 insertions(+) commit 935327a73553001f8d81375c76985d05f604507f Author: Christian Lamparter Date: Sat Jun 18 00:00:29 2022 +0200 ARM: dts: BCM5301X: Add DT for Meraki MR26 Meraki MR26 is an EOL wireless access point featuring a PoE ethernet port and two dual-band 3x3 MIMO 802.11n radios and 1x1 dual-band WIFI dedicated to scanning. Thank you Amir for the unit and PSU. Hardware info: SOC : Broadcom BCM53015A1KFEBG (dual-core Cortex-A9 CPU at 800 MHz) RAM : SK Hynix Inc. H5TQ1G63EFR, 1 GBit DDR3 SDRAM = 128 MiB NAND : Spansion S34ML01G100TF100, 1 GBit SLC NAND Flash = 128 MiB ETH : 1 GBit Ethernet Port - PoE (TPS23754 PoE Interface) WIFI0 : Broadcom BCM43431KMLG, BCM43431 802.11 abgn (3x3:3) WIFI1 : Broadcom BCM43431KMLG, BCM43431 802.11 abgn (3x3:3) WIFI2 : Broadcom BCM43428 "Air Marshal" 802.11 abgn (1x1:1) BUTTON: One reset key behind a small hole next to the Ethernet Port LEDS : One amber (fault), one white (indicator) LED, separate RGB-LED MISC : Atmel AT24C64 8KiB EEPROM i2c : Ti INA219 26V, 12-bit, i2c output current/voltage/power monitor SERIAL: WARNING: The serial port needs a TTL/RS-232 3V3 level converter! The Serial setting is 115200-8-N-1. The board has a populated right angle 1x4 0.1" pinheader. The pinout is: VCC (next to J3, has the pin 1 indicator), RX, TX, GND. Odd stuff: - uboot does not support lzma compression, but gzip'd uImage/DTB work. - uboot claims to support FIT, but fails to pass the DTB to the kernel. Appending the dtb after the kernel image works. - RGB-controller is supported through an external userspace program. - The ubi partition contains a "board-config" volume. It stores the MAC Address (0x66 in binary) and Serial No. (0x7c alpha-numerical). - SoC's temperature sensor always reports that it is on fire. This causes the system to immediately shutdown! Looking at reported "418 degree Celsius" suggests that this sensor is not working. WIFI: b43 is able to initialize all three WIFIs @ 802.11bg. | b43-phy0: Broadcom 43431 WLAN found (core revision 29) | bcma-pci-bridge 0000:01:00.0: bus1: Switched to core: 0x812 | b43-phy0: Found PHY: Analog 9, Type 7 (HT), Revision 1 | b43-phy0: Found Radio: Manuf 0x17F, ID 0x2059, Revision 0, Version 1 | b43-phy0 warning: 5 GHz band is unsupported on this PHY | b43-phy1: Broadcom 43431 WLAN found (core revision 29) | bcma-pci-bridge 0001:01:00.0: bus2: Switched to core: 0x812 | b43-phy1: Found PHY: Analog 9, Type 7 (HT), Revision 1 | b43-phy1: Found Radio: Manuf 0x17F, ID 0x2059, Revision 0, Version 1 | b43-phy1 warning: 5 GHz band is unsupported on this PHY | b43-phy2: Broadcom 43228 WLAN found (core revision 30) | bcma-pci-bridge 0002:01:00.0: bus3: Switched to core: 0x812 | b43-phy2: Found PHY: Analog 9, Type 4 (N), Revision 16 | b43-phy2: Found Radio: Manuf 0x17F, ID 0x2057, Revision 9, Version 1 | Broadcom 43xx driver loaded [ Features: NL ] Signed-off-by: Christian Lamparter Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm53015-meraki-mr26.dts | 166 +++++++++++++++++++++++++++++ 2 files changed, 167 insertions(+) commit 2f6a83dddbe25aadda22312ed1174d5112f43103 Author: Christian Lamparter Date: Sat Jun 18 00:00:28 2022 +0200 dt-bindings: ARM: add bindings for the Meraki MR26 mark the Meraki MR26 and its SoC (BCM53015) as supported in the bindings documentation file. "BCM53011 and BCM53015 with dual-core Cortex-A9 CPU at 800 MHz, 256KB L2 cache, 16-bit DDR2 interface, USB3, integrated switch, GPHYs and packet accelerator" Signed-off-by: Christian Lamparter Acked-by: Rob Herring Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit f16a716621a6edf4eef2ba1409594f5c780ea09b Author: Alex Deucher Date: Thu Jun 16 16:35:38 2022 -0400 drm/amdgpu/display: drop set but unused variable Fixes this warning: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9143:27: warning: variable 'abo' set but not used [-Wunused-but-set-variable] Fixes: 047de3f17a83 ("drm/amdgpu: switch DM to atomic fence helpers v2") Reviewed-by: Christian König Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20220616203538.649041-1-alexander.deucher@amd.com drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- 1 file changed, 2 deletions(-) commit 7c1e1c5e0eb66bcbbedde92eb2bd988016cf2716 Author: Ville Syrjälä Date: Mon Jun 13 23:03:13 2022 +0300 drm: Drop drm_connector.h from drm_crtc.h drm_crtc.h has no need for drm_connector.h, so don't include it. Avoids useless rebuilds of the entire universe when touching drm_connector.h. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220613200317.11305-5-ville.syrjala@linux.intel.com Acked-by: Jani Nikula include/drm/drm_crtc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90bb087f66745ca48f6f5e43df99a1212d89e712 Author: Ville Syrjälä Date: Mon Jun 13 23:03:12 2022 +0300 drm: Drop drm_blend.h from drm_crtc.h drm_crtc.h has no need for drm_blend.h, so don't include it. Avoids useless rebuilds of the entire universe when touching drm_blend.h. Quite a few placs do currently depend on drm_blend.h without actually including it directly. All of those need to be fixed up. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220613200317.11305-4-ville.syrjala@linux.intel.com Acked-by: Sam Ravnborg Acked-by: Jani Nikula drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c | 1 + drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 1 + drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 1 + drivers/gpu/drm/arm/malidp_planes.c | 1 + drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 1 + drivers/gpu/drm/drm_atomic.c | 1 + drivers/gpu/drm/drm_atomic_helper.c | 1 + drivers/gpu/drm/drm_atomic_state_helper.c | 1 + drivers/gpu/drm/drm_crtc.c | 1 + drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 1 + drivers/gpu/drm/exynos/exynos_drm_fimd.c | 1 + drivers/gpu/drm/exynos/exynos_drm_ipp.c | 1 + drivers/gpu/drm/exynos/exynos_drm_plane.c | 1 + drivers/gpu/drm/exynos/exynos_drm_scaler.c | 1 + drivers/gpu/drm/exynos/exynos_mixer.c | 1 + drivers/gpu/drm/gud/gud_drv.c | 1 + drivers/gpu/drm/i915/display/i9xx_plane.c | 1 + drivers/gpu/drm/i915/display/intel_cursor.c | 1 + drivers/gpu/drm/i915/display/intel_fb.c | 1 + drivers/gpu/drm/i915/display/intel_fbc.c | 1 + drivers/gpu/drm/i915/display/intel_sprite.c | 1 + drivers/gpu/drm/i915/display/skl_universal_plane.c | 1 + drivers/gpu/drm/i915/intel_pm.c | 1 + drivers/gpu/drm/imx/dcss/dcss-plane.c | 1 + drivers/gpu/drm/imx/ipuv3-plane.c | 1 + drivers/gpu/drm/kmb/kmb_plane.c | 1 + drivers/gpu/drm/logicvc/logicvc_layer.c | 1 + drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 1 + drivers/gpu/drm/mediatek/mtk_drm_plane.c | 1 + drivers/gpu/drm/meson/meson_overlay.c | 1 + drivers/gpu/drm/meson/meson_plane.c | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 1 + drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 1 + drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 1 + drivers/gpu/drm/nouveau/dispnv50/wndw.c | 1 + drivers/gpu/drm/omapdrm/omap_fb.c | 1 + drivers/gpu/drm/omapdrm/omap_plane.c | 1 + drivers/gpu/drm/rcar-du/rcar_du_plane.c | 1 + drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 1 + drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 1 + drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 1 + drivers/gpu/drm/sprd/sprd_dpu.c | 1 + drivers/gpu/drm/sti/sti_plane.c | 1 + drivers/gpu/drm/stm/ltdc.c | 1 + drivers/gpu/drm/sun4i/sun4i_backend.c | 1 + drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 1 + drivers/gpu/drm/sun4i/sun4i_layer.c | 1 + drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 1 + drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 1 + drivers/gpu/drm/tegra/dc.c | 1 + drivers/gpu/drm/tegra/hub.c | 1 + drivers/gpu/drm/tidss/tidss_dispc.c | 1 + drivers/gpu/drm/tidss/tidss_plane.c | 1 + drivers/gpu/drm/vc4/vc4_plane.c | 1 + include/drm/drm_crtc.h | 1 - 57 files changed, 56 insertions(+), 1 deletion(-) commit 720cf96d8fecde29b72e1101f8a567a0ce99594f Author: Ville Syrjälä Date: Tue Jun 14 12:54:49 2022 +0300 drm: Drop drm_framebuffer.h from drm_crtc.h drm_crtc.h has no need for drm_frambuffer.h, so don't include it. Avoids useless rebuilds of the entire universe when touching drm_framebuffer.h. Quite a few placs do currently depend on drm_framebuffer.h without actually including it directly. All of those need to be fixed up. v2: Fix up msm some more v2: Deal with ingenic and shmobile as well Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220614095449.29311-1-ville.syrjala@linux.intel.com Acked-by: Sam Ravnborg Acked-by: Jani Nikula drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 1 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_trace.h | 1 + drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c | 1 + drivers/gpu/drm/arm/hdlcd_crtc.c | 1 + drivers/gpu/drm/arm/malidp_crtc.c | 1 + drivers/gpu/drm/arm/malidp_mw.c | 1 + drivers/gpu/drm/arm/malidp_planes.c | 1 + drivers/gpu/drm/armada/armada_fb.h | 2 ++ drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c | 1 + drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 1 + drivers/gpu/drm/drm_atomic.c | 1 + drivers/gpu/drm/drm_atomic_helper.c | 1 + drivers/gpu/drm/drm_atomic_state_helper.c | 1 + drivers/gpu/drm/drm_atomic_uapi.c | 1 + drivers/gpu/drm/drm_crtc.c | 1 + drivers/gpu/drm/drm_crtc_helper.c | 1 + drivers/gpu/drm/drm_damage_helper.c | 1 + drivers/gpu/drm/drm_fb_helper.c | 1 + drivers/gpu/drm/drm_gem_atomic_helper.c | 1 + drivers/gpu/drm/drm_mipi_dbi.c | 1 + drivers/gpu/drm/drm_mode_config.c | 1 + drivers/gpu/drm/drm_modeset_helper.c | 1 + drivers/gpu/drm/drm_writeback.c | 1 + drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 1 + drivers/gpu/drm/exynos/exynos7_drm_decon.c | 1 + drivers/gpu/drm/exynos/exynos_drm_fb.c | 1 + drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 1 + drivers/gpu/drm/exynos/exynos_drm_fimd.c | 1 + drivers/gpu/drm/exynos/exynos_drm_plane.c | 1 + drivers/gpu/drm/exynos/exynos_drm_vidi.c | 1 + drivers/gpu/drm/exynos/exynos_mixer.c | 1 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 1 + drivers/gpu/drm/gma500/framebuffer.c | 1 + drivers/gpu/drm/gma500/gma_display.c | 1 + drivers/gpu/drm/gma500/oaktrail_crtc.c | 1 + drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 1 + drivers/gpu/drm/i915/display/intel_display_types.h | 1 + drivers/gpu/drm/imx/dcss/dcss-plane.c | 1 + drivers/gpu/drm/imx/ipuv3-plane.c | 1 + drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 1 + drivers/gpu/drm/ingenic/ingenic-ipu.c | 1 + drivers/gpu/drm/kmb/kmb_plane.c | 1 + drivers/gpu/drm/logicvc/logicvc_layer.c | 1 + drivers/gpu/drm/mcde/mcde_display.c | 1 + drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 1 + drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 2 ++ drivers/gpu/drm/mediatek/mtk_drm_plane.c | 1 + drivers/gpu/drm/meson/meson_overlay.c | 1 + drivers/gpu/drm/meson/meson_plane.c | 1 + drivers/gpu/drm/mgag200/mgag200_mode.c | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 2 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 1 + drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c | 1 + drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 1 + drivers/gpu/drm/msm/disp/mdp_format.c | 2 ++ drivers/gpu/drm/msm/msm_debugfs.c | 1 + drivers/gpu/drm/msm/msm_fb.c | 1 + drivers/gpu/drm/msm/msm_fbdev.c | 1 + drivers/gpu/drm/mxsfb/mxsfb_kms.c | 1 + drivers/gpu/drm/omapdrm/omap_debugfs.c | 1 + drivers/gpu/drm/omapdrm/omap_fb.c | 1 + drivers/gpu/drm/omapdrm/omap_fbdev.c | 1 + drivers/gpu/drm/omapdrm/omap_plane.c | 1 + drivers/gpu/drm/pl111/pl111_display.c | 1 + drivers/gpu/drm/pl111/pl111_drv.c | 1 + drivers/gpu/drm/pl111/pl111_versatile.c | 2 ++ drivers/gpu/drm/qxl/qxl_display.c | 1 + drivers/gpu/drm/qxl/qxl_draw.c | 1 + drivers/gpu/drm/radeon/atombios_crtc.c | 1 + drivers/gpu/drm/radeon/evergreen.c | 1 + drivers/gpu/drm/radeon/r100.c | 1 + drivers/gpu/drm/radeon/radeon_device.c | 1 + drivers/gpu/drm/radeon/radeon_display.c | 1 + drivers/gpu/drm/radeon/radeon_fb.c | 1 + drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 1 + drivers/gpu/drm/radeon/rs600.c | 1 + drivers/gpu/drm/radeon/rv770.c | 1 + drivers/gpu/drm/rcar-du/rcar_du_kms.c | 1 + drivers/gpu/drm/rcar-du/rcar_du_plane.c | 1 + drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 1 + drivers/gpu/drm/rcar-du/rcar_du_writeback.c | 1 + drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 1 + drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 1 + drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 1 + drivers/gpu/drm/selftests/test-drm_damage_helper.c | 1 + drivers/gpu/drm/selftests/test-drm_plane_helper.c | 1 + drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 1 + drivers/gpu/drm/shmobile/shmob_drm_kms.c | 1 + drivers/gpu/drm/shmobile/shmob_drm_plane.c | 1 + drivers/gpu/drm/solomon/ssd130x.c | 1 + drivers/gpu/drm/sprd/sprd_dpu.c | 1 + drivers/gpu/drm/sti/sti_cursor.c | 1 + drivers/gpu/drm/sti/sti_gdp.c | 1 + drivers/gpu/drm/sti/sti_hqvdp.c | 1 + drivers/gpu/drm/sti/sti_plane.c | 1 + drivers/gpu/drm/stm/ltdc.c | 1 + drivers/gpu/drm/sun4i/sun4i_backend.c | 1 + drivers/gpu/drm/sun4i/sun8i_mixer.c | 1 + drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 1 + drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 1 + drivers/gpu/drm/tegra/dc.c | 1 + drivers/gpu/drm/tegra/drm.c | 1 + drivers/gpu/drm/tegra/fb.c | 1 + drivers/gpu/drm/tegra/hub.c | 1 + drivers/gpu/drm/tegra/plane.c | 1 + drivers/gpu/drm/tidss/tidss_dispc.c | 1 + drivers/gpu/drm/tidss/tidss_plane.c | 1 + drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 1 + drivers/gpu/drm/tilcdc/tilcdc_plane.c | 1 + drivers/gpu/drm/tiny/arcpgu.c | 1 + drivers/gpu/drm/tiny/bochs.c | 1 + drivers/gpu/drm/tiny/cirrus.c | 1 + drivers/gpu/drm/tiny/gm12u320.c | 1 + drivers/gpu/drm/tiny/ili9225.c | 1 + drivers/gpu/drm/tiny/repaper.c | 1 + drivers/gpu/drm/tiny/st7586.c | 1 + drivers/gpu/drm/tve200/tve200_display.c | 1 + drivers/gpu/drm/vboxvideo/vbox_mode.c | 1 + drivers/gpu/drm/vc4/vc4_bo.c | 2 ++ drivers/gpu/drm/vc4/vc4_crtc.c | 1 + drivers/gpu/drm/vc4/vc4_kms.c | 1 + drivers/gpu/drm/vc4/vc4_plane.c | 1 + drivers/gpu/drm/vc4/vc4_txp.c | 1 + drivers/gpu/drm/virtio/virtgpu_drv.h | 1 + drivers/gpu/drm/vkms/vkms_drv.h | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 1 + drivers/gpu/drm/xen/xen_drm_front_conn.c | 1 + drivers/gpu/drm/xen/xen_drm_front_kms.c | 1 + include/drm/drm_crtc.h | 2 +- 132 files changed, 138 insertions(+), 1 deletion(-) commit 255490f9150da7c6dabe468f3a877b92fd0f02c1 Author: Ville Syrjälä Date: Tue Jun 14 12:02:45 2022 +0300 drm: Drop drm_edid.h from drm_crtc.h drm_crtc.h has no need for drm_edid.h, so don't include it. Avoids useless rebuilds of the entire universe when touching drm_edid.h. Quite a few placs do currently depend on drm_edid.h without actually including it directly. All of those need to be fixed up. v2: Fix up i915 and msm some more v3: Fix alphabetical ordering (Sam) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220614090245.30283-1-ville.syrjala@linux.intel.com Acked-by: Sam Ravnborg Acked-by: Jani Nikula drivers/gpu/drm/arm/malidp_mw.c | 1 + drivers/gpu/drm/aspeed/aspeed_gfx_out.c | 1 + drivers/gpu/drm/ast/ast_mode.c | 1 + drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 + drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 1 + drivers/gpu/drm/bridge/lontium-lt8912b.c | 1 + drivers/gpu/drm/bridge/parade-ps8640.c | 1 + drivers/gpu/drm/bridge/simple-bridge.c | 1 + drivers/gpu/drm/bridge/ti-tfp410.c | 1 + drivers/gpu/drm/display/drm_dp_helper.c | 1 + drivers/gpu/drm/display/drm_dp_mst_topology.c | 1 + drivers/gpu/drm/drm_client_modeset.c | 1 + drivers/gpu/drm/drm_kms_helper_common.c | 1 + drivers/gpu/drm/drm_modes.c | 1 + drivers/gpu/drm/exynos/exynos_mixer.c | 1 + drivers/gpu/drm/gma500/cdv_intel_dp.c | 1 + drivers/gpu/drm/gma500/oaktrail_hdmi.c | 1 + drivers/gpu/drm/gma500/oaktrail_lvds.c | 1 + drivers/gpu/drm/gma500/psb_intel_modes.c | 2 ++ drivers/gpu/drm/gud/gud_connector.c | 1 + drivers/gpu/drm/i915/display/intel_bios.c | 1 + drivers/gpu/drm/i915/display/intel_dp.c | 1 + drivers/gpu/drm/i915/display/intel_lspcon.c | 1 + drivers/gpu/drm/i915/display/intel_opregion.c | 2 ++ drivers/gpu/drm/imx/imx-ldb.c | 1 + drivers/gpu/drm/imx/imx-tve.c | 1 + drivers/gpu/drm/imx/parallel-display.c | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c | 2 ++ drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 1 + drivers/gpu/drm/omapdrm/dss/hdmi4.c | 1 + drivers/gpu/drm/omapdrm/dss/hdmi5.c | 1 + drivers/gpu/drm/panel/panel-edp.c | 1 + drivers/gpu/drm/panel/panel-simple.c | 1 + drivers/gpu/drm/qxl/qxl_display.c | 1 + drivers/gpu/drm/rcar-du/rcar_du_writeback.c | 1 + drivers/gpu/drm/rockchip/rk3066_hdmi.c | 1 + drivers/gpu/drm/solomon/ssd130x.c | 1 + drivers/gpu/drm/stm/ltdc.c | 1 + drivers/gpu/drm/tiny/arcpgu.c | 1 + drivers/gpu/drm/tiny/bochs.c | 1 + drivers/gpu/drm/tiny/cirrus.c | 1 + drivers/gpu/drm/tiny/gm12u320.c | 1 + drivers/gpu/drm/udl/udl_connector.c | 1 + drivers/gpu/drm/vboxvideo/vbox_mode.c | 1 + drivers/gpu/drm/virtio/virtgpu_display.c | 1 + drivers/gpu/drm/virtio/virtgpu_vq.c | 2 ++ drivers/gpu/drm/vkms/vkms_output.c | 1 + drivers/gpu/drm/vkms/vkms_writeback.c | 1 + include/drm/drm_crtc.h | 1 - 49 files changed, 52 insertions(+), 1 deletion(-) commit 805245071240ae480503af29c7e31d2d7ff5c7f8 Author: Alexander Stein Date: Tue Jun 14 11:58:35 2022 +0200 drm/bridge: ti-sn65dsi83: Allow GPIO operations to sleep There is no need to require non-sleeping GPIO access. Silence the WARN_ON() if GPIO is using e.g. I2C expanders. Signed-off-by: Alexander Stein Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220614095835.1398708-2-alexander.stein@ew.tq-group.com Reviewed-by: Robert Foss drivers/gpu/drm/bridge/ti-sn65dsi83.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 03e22ba090aa42dc029c25dbd58fa4b941c87ec3 Author: Alexander Stein Date: Tue Jun 14 11:58:34 2022 +0200 drm/bridge: ti-sn65dsi83: add more dev_err_probe Add more warning/debug messages during probe. E.g. a single -EPROBE_DEFER might have several causes, these messages help finding the origin. Signed-off-by: Alexander Stein Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220614095835.1398708-1-alexander.stein@ew.tq-group.com Reviewed-by: Robert Foss drivers/gpu/drm/bridge/ti-sn65dsi83.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 993a87917c2af59efb0ee1ce43c878ca8790ba1c Author: Jiri Vanek Date: Thu Jun 16 00:22:21 2022 +0200 drm/bridge/tc358775: Fix DSI clock division for vsync delay calculation Use the same PCLK divide option (divide DSI clock to generate pixel clock) which is set to LVDS Configuration Register (LVCFG) also for a VSync delay calculation. Without this change an auxiliary variable could underflow during the calculation for some dual-link LVDS panels and then calculated VSync delay is wrong. This leads to a shifted picture on a panel. Tested-by: Jiri Vanek Signed-off-by: Jiri Vanek Reviewed-by: Vinay Simha BN Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220615222221.1501-3-jirivanek1@gmail.com drivers/gpu/drm/bridge/tc358775.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89fc846675537f9f6ef62271e9d60556c873d65e Author: Jiri Vanek Date: Thu Jun 16 00:22:20 2022 +0200 drm/bridge/tc358775: Return before displaying inappropriate error message Function for reading from i2c device register displays error message even if reading ends correctly. Add return to avoid falling through into the fail label. Signed-off-by: Jiri Vanek Reviewed-by: Vinay Simha BN Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220615222221.1501-2-jirivanek1@gmail.com drivers/gpu/drm/bridge/tc358775.c | 1 + 1 file changed, 1 insertion(+) commit 6456dc208e8a5803019c7fa979023c3dcea612bb Author: Liu Ying Date: Sat Jun 11 22:14:21 2022 +0800 MAINTAINERS: add maintainer for DRM bridge drivers for i.MX SoCs Add myself as the maintainer of DRM bridge drivers for i.MX SoCs. Reviewed-by: Robert Foss Signed-off-by: Liu Ying Acked-by: Sakari Ailus Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-15-victor.liu@nxp.com MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 95b9cd1f754793cc8f328e7d30f79c4e7de29fbf Author: Liu Ying Date: Sat Jun 11 22:14:20 2022 +0800 dt-bindings: mfd: Add i.MX8qm/qxp Control and Status Registers module binding This patch adds bindings for i.MX8qm/qxp Control and Status Registers module. Reviewed-by: Rob Herring Signed-off-by: Liu Ying Acked-by: Sakari Ailus Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-14-victor.liu@nxp.com .../devicetree/bindings/mfd/fsl,imx8qxp-csr.yaml | 192 +++++++++++++++++++++ 1 file changed, 192 insertions(+) commit e60c4354840b2fe8e1c4df3fdc5c17039824ff96 Author: Liu Ying Date: Sat Jun 11 22:14:19 2022 +0800 drm/bridge: imx: Add LDB support for i.MX8qm This patch adds a drm bridge driver for i.MX8qm LVDS display bridge(LDB) which is officially named as pixel mapper. The LDB has two channels. Each of them supports up to 30bpp parallel input color format and can map the input to VESA or JEIDA standards. The two channels can be used simultaneously, either in dual mode or split mode. In dual mode, the two channels output identical data. In split mode, channel0 outputs odd pixels and channel1 outputs even pixels. This patch supports the LDB single mode and split mode. Tested-by: Marcel Ziswiler # Colibri iMX8X, LT170410-2WHC, LP156WF1 Reviewed-by: Robert Foss Signed-off-by: Liu Ying Acked-by: Sakari Ailus Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-13-victor.liu@nxp.com drivers/gpu/drm/bridge/imx/Kconfig | 9 + drivers/gpu/drm/bridge/imx/Makefile | 3 + drivers/gpu/drm/bridge/imx/imx8qm-ldb-drv.c | 587 ++++++++++++++++++++++++++++ 3 files changed, 599 insertions(+) commit 3818715f62b42b5c0bcf456ded3f59ed3908cd6f Author: Liu Ying Date: Sat Jun 11 22:14:18 2022 +0800 drm/bridge: imx: Add LDB support for i.MX8qxp This patch adds a drm bridge driver for i.MX8qxp LVDS display bridge(LDB) which is officially named as pixel mapper. The LDB has two channels. Each of them supports up to 24bpp parallel input color format and can map the input to VESA or JEIDA standards. The two channels cannot be used simultaneously, that is to say, the user should pick one of them to use. Two LDB channels from two LDB instances can work together in LDB split mode to support a dual link LVDS display. The channel indexes have to be different. Channel0 outputs odd pixels and channel1 outputs even pixels. This patch supports the LDB single mode and split mode. Tested-by: Marcel Ziswiler # Colibri iMX8X, LT170410-2WHC, LP156WF1 Reviewed-by: Robert Foss Signed-off-by: Liu Ying Acked-by: Sakari Ailus Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-12-victor.liu@nxp.com drivers/gpu/drm/bridge/imx/Kconfig | 9 + drivers/gpu/drm/bridge/imx/Makefile | 3 + drivers/gpu/drm/bridge/imx/imx8qxp-ldb-drv.c | 722 +++++++++++++++++++++++++++ 3 files changed, 734 insertions(+) commit 48ed447c698b97ac6150e516139982d88231175d Author: Liu Ying Date: Sat Jun 11 22:14:17 2022 +0800 dt-bindings: display: bridge: Add i.MX8qm/qxp LVDS display bridge binding This patch adds bindings for i.MX8qm/qxp LVDS display bridge(LDB). Reviewed-by: Rob Herring Signed-off-by: Liu Ying Acked-by: Sakari Ailus Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-11-victor.liu@nxp.com .../bindings/display/bridge/fsl,imx8qxp-ldb.yaml | 173 +++++++++++++++++++++ 1 file changed, 173 insertions(+) commit 1039fb60463cfeb1fa39c6c48b5c3afcf5b89948 Author: Liu Ying Date: Sat Jun 11 22:14:16 2022 +0800 drm/bridge: imx: Add LDB driver helper support This patch adds a helper to support LDB drm bridge drivers for i.MX SoCs. Helper functions supported by this helper should implement common logics for all LDB modules embedded in i.MX SoCs. Tested-by: Marcel Ziswiler # Colibri iMX8X, LT170410-2WHC, LP156WF1 Reviewed-by: Robert Foss Signed-off-by: Liu Ying Acked-by: Sakari Ailus Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-10-victor.liu@nxp.com drivers/gpu/drm/bridge/imx/imx-ldb-helper.c | 220 ++++++++++++++++++++++++++++ drivers/gpu/drm/bridge/imx/imx-ldb-helper.h | 96 ++++++++++++ 2 files changed, 316 insertions(+) commit 96988a526c97cfbe6664e637640dca9406b0b928 Author: Liu Ying Date: Sat Jun 11 22:14:15 2022 +0800 drm/bridge: imx: Add i.MX8qxp pixel link to DPI support This patch adds a drm bridge driver for i.MX8qxp pixel link to display pixel interface(PXL2DPI). The PXL2DPI interfaces the pixel link 36-bit data output and the DSI controller’s MIPI-DPI 24-bit data input, and inputs of LVDS Display Bridge(LDB) module used in LVDS mode, to remap the pixel color codings between those modules. The PXL2DPI is purely combinatorial. Tested-by: Marcel Ziswiler # Colibri iMX8X, LT170410-2WHC, LP156WF1 Reviewed-by: Robert Foss Signed-off-by: Liu Ying Acked-by: Sakari Ailus Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-9-victor.liu@nxp.com drivers/gpu/drm/bridge/imx/Kconfig | 8 + drivers/gpu/drm/bridge/imx/Makefile | 1 + drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c | 487 +++++++++++++++++++++++++++ 3 files changed, 496 insertions(+) commit 3e859cc71167cc3f2442eb1fb4e29a2c9c84b839 Author: Liu Ying Date: Sat Jun 11 22:14:14 2022 +0800 dt-bindings: display: bridge: Add i.MX8qxp pixel link to DPI binding This patch adds bindings for i.MX8qxp pixel link to DPI(PXL2DPI). Reviewed-by: Rob Herring Signed-off-by: Liu Ying Acked-by: Sakari Ailus Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-8-victor.liu@nxp.com .../display/bridge/fsl,imx8qxp-pxl2dpi.yaml | 108 +++++++++++++++++++++ 1 file changed, 108 insertions(+) commit 1ec17c26bc06289d368e2523c0e95b5038c6eeb5 Author: Liu Ying Date: Sat Jun 11 22:14:13 2022 +0800 drm/bridge: imx: Add i.MX8qm/qxp display pixel link support This patch adds a drm bridge driver for i.MX8qm/qxp display pixel link. The pixel link forms a standard asynchronous linkage between pixel sources(display controller or camera module) and pixel consumers(imaging or displays). It consists of two distinct functions, a pixel transfer function and a control interface. Reviewed-by: Robert Foss Tested-by: Marcel Ziswiler # Colibri iMX8X, LT170410-2WHC, LP156WF1 Signed-off-by: Liu Ying Acked-by: Sakari Ailus Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-7-victor.liu@nxp.com drivers/gpu/drm/bridge/imx/Kconfig | 9 + drivers/gpu/drm/bridge/imx/Makefile | 1 + drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c | 429 ++++++++++++++++++++++++ 3 files changed, 439 insertions(+) commit 2e7bee681637cf7c4f1005d8e9992a05f287a6ed Author: Liu Ying Date: Sat Jun 11 22:14:12 2022 +0800 dt-bindings: display: bridge: Add i.MX8qm/qxp display pixel link binding This patch adds bindings for i.MX8qm/qxp display pixel link. Signed-off-by: Liu Ying Acked-by: Sakari Ailus Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-6-victor.liu@nxp.com .../display/bridge/fsl,imx8qxp-pixel-link.yaml | 144 +++++++++++++++++++++ 1 file changed, 144 insertions(+) commit 93e163a9e0392aca7d720491100d810bfc3112b0 Author: Liu Ying Date: Sat Jun 11 22:14:11 2022 +0800 drm/bridge: imx: Add i.MX8qm/qxp pixel combiner support This patch adds a drm bridge driver for i.MX8qm/qxp pixel combiner. The pixel combiner takes two output streams from a single display controller and manipulates the two streams to support a number of modes(bypass, pixel combine, YUV444 to YUV422, split_RGB) configured as either one screen, two screens, or virtual screens. The pixel combiner is also responsible for generating some of the control signals for the pixel link output channel. For now, the driver only supports the bypass mode. Reviewed-by: Robert Foss Tested-by: Marcel Ziswiler # Colibri iMX8X, LT170410-2WHC, LP156WF1 Signed-off-by: Liu Ying Acked-by: Sakari Ailus Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-5-victor.liu@nxp.com drivers/gpu/drm/bridge/Kconfig | 2 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/imx/Kconfig | 8 + drivers/gpu/drm/bridge/imx/Makefile | 1 + .../gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c | 448 +++++++++++++++++++++ 5 files changed, 460 insertions(+) commit 1db8125eb8066f64b2aa7b85941c9da31c77b8f8 Author: Liu Ying Date: Sat Jun 11 22:14:10 2022 +0800 dt-bindings: display: bridge: Add i.MX8qm/qxp pixel combiner binding This patch adds bindings for i.MX8qm/qxp pixel combiner. Reviewed-by: Rob Herring Signed-off-by: Liu Ying Acked-by: Sakari Ailus Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-4-victor.liu@nxp.com .../display/bridge/fsl,imx8qxp-pixel-combiner.yaml | 144 +++++++++++++++++++++ 1 file changed, 144 insertions(+) commit 5771fb9a8f7907d991a8bc38b619535a410354d6 Author: Liu Ying Date: Sat Jun 11 22:14:09 2022 +0800 media: docs: Add some RGB bus formats for i.MX8qm/qxp pixel combiner This patch adds documentations for RGB666_1X30_CPADLO, RGB888_1X30_CPADLO, RGB666_1X36_CPADLO and RGB888_1X36_CPADLO bus formats used by i.MX8qm/qxp pixel combiner. The RGB pixels with padding low per component are transmitted on a 30-bit input bus(10-bit per component) from a display controller or a 36-bit output bus(12-bit per component) to a pixel link. Reviewed-by: Robert Foss Reviewed-by: Laurent Pinchart Signed-off-by: Liu Ying Acked-by: Sakari Ailus Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-3-victor.liu@nxp.com .../userspace-api/media/v4l/subdev-formats.rst | 156 +++++++++++++++++++++ 1 file changed, 156 insertions(+) commit e6445be4f549a0342cd9b8672b82e3b1d85d017f Author: Liu Ying Date: Sat Jun 11 22:14:08 2022 +0800 media: uapi: Add some RGB bus formats for i.MX8qm/qxp pixel combiner This patch adds RGB666_1X30_CPADLO, RGB888_1X30_CPADLO, RGB666_1X36_CPADLO and RGB888_1X36_CPADLO bus formats used by i.MX8qm/qxp pixel combiner. The RGB pixels with padding low per component are transmitted on a 30-bit input bus(10-bit per component) from a display controller or a 36-bit output bus(12-bit per component) to a pixel link. Reviewed-by: Robert Foss Reviewed-by: Laurent Pinchart Signed-off-by: Liu Ying Acked-by: Sakari Ailus Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-2-victor.liu@nxp.com include/uapi/linux/media-bus-format.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b708b36afd5b5f32f7cd49b3bd4ab524698c3627 Author: Xin Ji Date: Fri Apr 22 16:47:18 2022 +0800 drm/bridge: anx7625: Use DPI bus type As V4L2_FWNODE_BUS_TYPE_PARALLEL not properly descript for DPI interface, this patch use new defined V4L2_FWNODE_BUS_TYPE_DPI for it. Fixes: fd0310b6fe7d ("drm/bridge: anx7625: add MIPI DPI input feature") Signed-off-by: Xin Ji Tested-by: Chen-Yu Tsai Acked-by: Robert Foss Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220422084720.959271-4-xji@analogixsemi.com drivers/gpu/drm/bridge/analogix/anx7625.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0a61ef9cc30d10858aac405d75f44844163463cf Author: Xin Ji Date: Fri Apr 22 16:47:17 2022 +0800 dt-bindings:drm/bridge:anx7625: add port@0 property Add 'bus-type' and 'data-lanes' define, bus-type 7 for MIPI DPI input, others for DSI input. Signed-off-by: Xin Ji Reviewed-by: Rob Herring Reviewed-by: Robert Foss Acked-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220422084720.959271-3-xji@analogixsemi.com .../bindings/display/bridge/analogix,anx7625.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit ff32e59947c87b01dc25a8b5763d609c1a8f56eb Author: Rafael J. Wysocki Date: Mon Jun 13 20:26:47 2022 +0200 ACPI: bus: Introduce acpi_dev_for_each_child_reverse() Make it possible to walk the children of an ACPI device in the revese order by defining acpi_dev_for_each_child_reverse() in analogy with acpi_dev_for_each_child(). Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko drivers/acpi/bus.c | 12 ++++++++++++ include/acpi/acpi_bus.h | 3 +++ 2 files changed, 15 insertions(+) commit 0ea3ef240c49113cefbaab1f3dbf5b7f46837fc0 Author: Rafael J. Wysocki Date: Mon Jun 13 20:26:28 2022 +0200 ACPI: video: Use acpi_dev_for_each_child() Instead of walking the list of children of an ACPI device directly, use acpi_dev_for_each_child() to carry out an action for all of the given ACPI device's children. This will help to eliminate the children list head from struct acpi_device as it is redundant and it is used in questionable ways in some places (in particular, locking is needed for walking the list pointed to it safely, but it is often missing). Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko drivers/acpi/acpi_video.c | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) commit f8128c390e58928b16f197416d417cfa4c65f610 Author: Rafael J. Wysocki Date: Mon Jun 13 20:26:03 2022 +0200 ACPI: bus: Export acpi_dev_for_each_child() to modules Some pieces of modular code can benefit from using acpi_dev_for_each_child(), so export it to modules. Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko drivers/acpi/bus.c | 1 + 1 file changed, 1 insertion(+) commit fa98b3985a4a6de6d40b2469b30a3452575f6acf Author: Rafael J. Wysocki Date: Mon Jun 13 20:16:30 2022 +0200 ACPI: property: Use acpi_dev_for_each_child() for child lookup Instead of using the list of children of an ACPI device directly, use acpi_dev_for_each_child() to find the next child of a given ACPI device. This will help to eliminate the children list head from struct acpi_device as it is redundant and it is used in questionable ways in some places (in particular, locking is needed for walking the list pointed to it safely, but it is often missing). Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko drivers/acpi/property.c | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) commit abda0af4cd3b4703649ca78abf8d283f279a3f90 Author: Rafael J. Wysocki Date: Mon Jun 13 20:15:26 2022 +0200 ACPI: container: Use acpi_dev_for_each_child() Instead of walking the list of children of an ACPI device directly, use acpi_dev_for_each_child() to carry out an action for all of the given ACPI device's children. This will help to eliminate the children list head from struct acpi_device as it is redundant and it is used in questionable ways in some places (in particular, locking is needed for walking the list pointed to it safely, but it is often missing). Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko drivers/acpi/container.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit bf5fb8ae8248c30422e50a30c73e88a4590ed74e Author: Rafael J. Wysocki Date: Mon Jun 13 20:39:37 2022 +0200 USB: ACPI: Replace usb_acpi_find_port() with acpi_find_child_by_adr() Instead of walking the list of children of an ACPI device directly in order to find the child matching a given bus address, use acpi_find_child_by_adr() for this purpose. Also notice that if acpi_find_child_by_adr() doesn't find a matching child, acpi_find_child_device() will not find it too, so directly replace usb_acpi_find_port() in usb_acpi_get_companion_for_port() with acpi_find_child_by_adr() and drop it entirely. Apart from simplifying the code, this will help to eliminate the children list head from struct acpi_device as it is redundant and it is used in questionable ways in some places (in particular, locking is needed for walking the list pointed to it safely, but it is often missing). Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko Reviewed-by: Heikki Krogerus drivers/usb/core/usb-acpi.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit a73a204b44586c07876f18e329be3fcb713af29b Author: Rafael J. Wysocki Date: Mon Jun 20 20:32:26 2022 +0200 thunderbolt: ACPI: Replace tb_acpi_find_port() with acpi_find_child_by_adr() Use acpi_find_child_by_adr() to find the child matching a given bus address instead of tb_acpi_find_port() that walks the list of children of an ACPI device directly for this purpose and drop the latter. Apart from simplifying the code, this will help to eliminate the children list head from struct acpi_device as it is redundant and it is used in questionable ways in some places (in particular, locking is needed for walking the list pointed to it safely, but it is often missing). Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko Acked-by: Mika Westerberg Reviewed-by: Heikki Krogerus drivers/thunderbolt/acpi.c | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) commit 2f6fe93fede802acfe010752db461ccd34745745 Author: Rafael J. Wysocki Date: Mon Jun 13 20:10:03 2022 +0200 ACPI: glue: Introduce acpi_find_child_by_adr() Rearrange the ACPI device lookup code used internally by acpi_find_child_device() so it can avoid extra checks after finding one object with a matching _ADR and use it for defining acpi_find_child_by_adr() that will allow the callers to find a given ACPI device's child matching a given bus address without doing any other checks in check_one_child(). Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko drivers/acpi/glue.c | 28 ++++++++++++++++++++++++---- include/acpi/acpi_bus.h | 2 ++ 2 files changed, 26 insertions(+), 4 deletions(-) commit f5122be80daad8e53e6876add5ccbf9db7ca809c Author: Rafael J. Wysocki Date: Mon Jun 13 20:06:18 2022 +0200 ACPI: glue: Introduce acpi_dev_has_children() Define acpi_dev_has_children() as a wrapper around acpi_dev_for_each_child() and use it to check if the given ACPI device has any children instead of checking the children list head in struct acpi_device. This will help to eliminate the children list head from struct acpi_device as it is redundant and it is used in questionable ways in some places (in particular, locking is needed for walking the list pointed to it safely, but it is often missing). Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko drivers/acpi/glue.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit d21b57003041a5a5d28933fd2dfd1c5183fb23af Author: Rafael J. Wysocki Date: Mon Jun 13 20:05:17 2022 +0200 ACPI: glue: Use acpi_dev_for_each_child() Instead of walking the list of children of an ACPI device directly, use acpi_dev_for_each_child() to carry out an action for all of the given ACPI device's children. This will help to eliminate the children list head from struct acpi_device as it is redundant and it is used in questionable ways in some places (in particular, locking is needed for walking the list pointed to it safely, but it is often missing). Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko drivers/acpi/glue.c | 101 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 62 insertions(+), 39 deletions(-) commit 0ac1311a77affa81931468658f3c0ada27711af0 Author: Samuel Holland Date: Sun Apr 10 23:40:01 2022 -0500 dt-bindings: clock: Add compatible for D1 DE2 clocks Allwinner D1 contains a display engine 2.0. Its clock controller matches the layout of the H5 DE2 clocks (2 mixers, no rotation engine, and separate resets), so use that compatible as a fallback. Signed-off-by: Samuel Holland Acked-by: Jernej Skrabec Acked-by: Krzysztof Kozlowski Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220411044002.37579-1-samuel@sholland.org .../devicetree/bindings/clock/allwinner,sun8i-a83t-de2-clk.yaml | 3 +++ 1 file changed, 3 insertions(+) commit f67671baadf6dbae8eca46cb95e85b762e462b2b Author: Frederic Weisbecker Date: Wed Jun 8 16:40:19 2022 +0200 context_tracking: Add a note about noinstr VS unsafe context tracking functions Some context tracking functions enter or exit into/from RCU idle mode while using trace-able and lockdep-aware IRQs (un-)masking. As a result those functions can't get tagged as noinstr. This is unlikely to be fixed since these are obsolete APIs. Drop a note about this matter. [ paulmck: Apply Peter Zijlstra feedback. ] Reported-by: Peter Zijlstra Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne kernel/context_tracking.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 6434cf630086eea2d091f122f5802582a05d9d1c Author: Animesh Manna Date: Mon Jun 20 12:21:38 2022 +0530 drm/i915/bios: calculate panel type as per child device index in VBT Each LFP may have different panel type which is stored in LFP data data block. Based on the child device index respective panel-type/ panel-type2 field will be used. v1: Initial rfc verion. v2: Based on review comments from Jani, - Used panel-type instead addition panel-index variable. - DEVICE_HANDLE_* name changed and placed before DEVICE_TYPE_* macro. v3: - passing intel_bios_encoder_data as argument of intel_bios_init_panel(). Passing NULL to indicate encoder is not initialized yet for dsi as current focus is to enable dual EDP. [Jani] v4: - encoder->devdata used which is initialized before from vbt structure. [Jani] Signed-off-by: Animesh Manna Reviewed-by: Jani Nikula Acked-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220620065138.5126-1-animesh.manna@intel.com drivers/gpu/drm/i915/display/icl_dsi.c | 2 +- drivers/gpu/drm/i915/display/intel_bios.c | 16 ++++++++++++++-- drivers/gpu/drm/i915/display/intel_bios.h | 1 + drivers/gpu/drm/i915/display/intel_dp.c | 3 ++- drivers/gpu/drm/i915/display/intel_lvds.c | 2 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 2 +- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 4 ++++ drivers/gpu/drm/i915/display/vlv_dsi.c | 2 +- 8 files changed, 25 insertions(+), 7 deletions(-) commit 4f8126f3a665456b68ae923cd7a7e9b9eb98547d Author: Willy Tarreau Date: Sat May 28 17:45:46 2022 +0200 tools/nolibc: add a help target to list supported targets The "help" target simply presents the list of supported targets and the current set of variables being used to build the sysroot. Since the help in tools/ suggests to use "install", which is supported by most tools while such a target is not really relevant here, an "install" target was also added, redirecting to "help". Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney tools/include/nolibc/Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit fe20cad47e6c79febd323c8db0a1f85896acbcdd Author: Willy Tarreau Date: Sat May 28 17:45:45 2022 +0200 tools/nolibc: make the default target build the headers The help in "make -C tools" enumerates nolibc as a valid target so we must at least make it do something. Let's make it do the equivalent of "make headers" in that it will prepare a sysroot with the arch's headers, but will not install the kernel's headers. This is the minimum some tools will need when built with a full-blown toolchain anyway. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney tools/Makefile | 3 +++ tools/include/nolibc/Makefile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit 6a3ad243b29be01d0c30f8c3b35a1149e1a0139a Author: Willy Tarreau Date: Sat May 28 17:45:44 2022 +0200 tools/nolibc: fix the makefile to also work as "make -C tools ..." As reported by Linus, the nolibc's makefile is currently broken when invoked as per the documented method (make -C tools nolibc_), because it now relies on the ARCH and OUTPUT variables that are not set in this case. This patch addresses this by sourcing subarch.include, and by presetting OUTPUT to the current directory if not set. This is sufficient to make the commands work both as a standalone target and as a tools/ sub-target. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney tools/include/nolibc/Makefile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 4f2c9703a128d21db7d0bf2ea14c5fe50d0dfe7e Author: Alviro Iskandar Setiawan Date: Fri May 20 00:21:16 2022 +0700 tools/nolibc/stdio: Add format attribute to enable printf warnings When we use printf and fprintf functions from the nolibc, we don't get any warning from the compiler if we have the wrong arguments. For example, the following calls will compile silently: ``` printf("%s %s\n", "aaa"); fprintf(stdout, "%s %s\n", "xxx", 1); ``` (Note the wrong arguments). Those calls are undefined behavior. The compiler can help us warn about the above mistakes by adding a `printf` format attribute to those functions declaration. This patch adds it, and now it yields these warnings for those mistakes: ``` warning: format `%s` expects a matching `char *` argument [-Wformat=] warning: format `%s` expects argument of type `char *`, but argument 4 has type `int` [-Wformat=] ``` [ ammarfaizi2: Simplify the attribute placement. ] Signed-off-by: Alviro Iskandar Setiawan Signed-off-by: Ammar Faizi Acked-by: Willy Tarreau Signed-off-by: Paul E. McKenney tools/include/nolibc/stdio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1ef150cf40be986747c3fa0c0e75acaec412e85e Author: Ammar Faizi Date: Fri May 20 00:21:15 2022 +0700 tools/nolibc/stdlib: Support overflow checking for older compiler versions Previously, we used __builtin_mul_overflow() to check for overflow in the multiplication operation in the calloc() function. However, older compiler versions don't support this built-in. This patch changes the overflow checking mechanism to make it work on any compiler version by using a division method to check for overflow. No functional change intended. While in there, remove the unused variable `void *orig`. Link: https://lore.kernel.org/lkml/20220330024114.GA18892@1wt.eu Suggested-by: Willy Tarreau Cc: Alviro Iskandar Setiawan Signed-off-by: Ammar Faizi Acked-by: Willy Tarreau Reviewed-by: Alviro Iskandar Setiawan Signed-off-by: Paul E. McKenney tools/include/nolibc/stdlib.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 5f8a62af527ad8a615d68889d816b72c3f5f227f Author: Frederic Weisbecker Date: Wed Jun 8 16:40:18 2022 +0200 context_tracking: Remove unused context_tracking_in_user() This function is not used and CT_WARN_ON() coupled with ct_state() is the preferred way to assert context tracking state values. Reported-by: Nicolas Saenz Julienne Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney include/linux/context_tracking_state.h | 5 ----- 1 file changed, 5 deletions(-) commit ed4ae5eff4b38797607cbdd80da394149110fb37 Author: Paul E. McKenney Date: Tue May 17 21:00:04 2022 -0700 rcu: Apply noinstr to rcu_idle_enter() and rcu_idle_exit() This commit applies the "noinstr" tag to the rcu_idle_enter() and rcu_idle_exit() functions, which are invoked from portions of the idle loop that cannot be instrumented. These tags require reworking the rcu_eqs_enter() and rcu_eqs_exit() functions that these two functions invoke in order to cause them to use normal assertions rather than lockdep. In addition, within rcu_idle_exit(), the raw versions of local_irq_save() and local_irq_restore() are used, again to avoid issues with lockdep in uninstrumented code. This patch is based in part on an earlier patch by Jiri Olsa, discussions with Peter Zijlstra and Frederic Weisbecker, earlier changes by Thomas Gleixner, and off-list discussions with Yonghong Song. Link: https://lore.kernel.org/lkml/20220515203653.4039075-1-jolsa@kernel.org/ Reported-by: Jiri Olsa Reported-by: Alexei Starovoitov Reported-by: Andrii Nakryiko Signed-off-by: Paul E. McKenney Reviewed-by: Yonghong Song kernel/rcu/tree.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 245a62982502255314b63dd2c4daaedd1cd595a6 Author: Zqiang Date: Mon Apr 25 09:04:04 2022 +0800 rcu: Dump rcuc kthread status for CPUs not reporting quiescent state If the rcutree.use_softirq kernel boot parameter is disabled, then it is possible that a RCU CPU stall is due to the rcuc kthreads being starved of CPU time. There is currently no easy way to infer this from the RCU CPU stall warning output. This commit therefore adds a string of the form " rcuc=%ld jiffies(starved)" to a given CPU's output if the corresponding rcuc kthread has been starved for more than two seconds. [ paulmck: Eliminate extraneous space characters. ] Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney kernel/rcu/tree_stall.h | 49 +++++++++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 28 deletions(-) commit 47fa33cc54615161ec5192389e55f3b95274f56f Author: Jani Nikula Date: Fri Jun 17 12:48:17 2022 +0300 drm/i915/display: convert modeset setup to struct drm_i915_private *i915 Pass struct drm_i915_private * instead of struct drm_device *, and rename dev_priv to i915. v2: Rebase Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220617094817.3466584-2-jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display.c | 4 +- drivers/gpu/drm/i915/display/intel_modeset_setup.c | 194 ++++++++++----------- drivers/gpu/drm/i915/display/intel_modeset_setup.h | 4 +- 3 files changed, 100 insertions(+), 102 deletions(-) commit 2c7676b6b1f57713f55e738f803ecaf91dfc399f Author: Jani Nikula Date: Fri Jun 17 12:48:16 2022 +0300 drm/i915/display: split out hw state readout and sanitize Split out the modeset hardware state readout and sanitize, or state setup, to a separate file. Do some drive-by checkpatch fixes while at it. v2: Rebase Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220617094817.3466584-1-jani.nikula@intel.com drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_display.c | 739 +-------------------- drivers/gpu/drm/i915/display/intel_display.h | 12 + drivers/gpu/drm/i915/display/intel_modeset_setup.c | 736 ++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_modeset_setup.h | 15 + 5 files changed, 778 insertions(+), 725 deletions(-) commit cc5851c6be864c5772944e32df3da322fe3ad415 Author: Sean Christopherson Date: Wed Jun 8 22:45:15 2022 +0000 KVM: selftests: Use exception fixup for #UD/#GP Hyper-V MSR/hcall tests Use exception fixup to verify VMCALL/RDMSR/WRMSR fault as expected in the Hyper-V Features test. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220608224516.3788274-5-seanjc@google.com> Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/x86_64/hyperv_features.c | 115 ++++++--------------- 1 file changed, 32 insertions(+), 83 deletions(-) commit ab69d3c8b99435ebd2ac4a241a5d931024c83c02 Author: Paul E. McKenney Date: Tue Apr 12 15:17:37 2022 -0700 torture: Make kvm-remote.sh announce which system is being waited on If a remote system fails in certain ways, for example, if it is rebooted without removing the contents of the /tmp directory, its remote.run file never will be removed and the kvm-remote.sh script will loop waiting forever. The manual workaround for this (hopefully!) rare event is to manually remove the file, which will cause the results up to the reboot to be collected and evaluated. Unfortunately, to work out which system is holding things up, the user must refer to the name of the last system whose results were collected, then look up the name of the next system in sequence, then manually remove the remote.run file. Even more unfortunately, this procedure can be fooled in runs where each system handles more than one batch should a given system take longer than expected, causing the systems to be handled out of order. This commit therefore causes kvm-remote.sh to print out the name of the system it will wait on next, allowing the user to refer directly to that name. Making the kvm-remote.sh script automatically handle unscheduled termination of the qemu processes is left as future work. Quite possibly deep future work. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/kvm-remote.sh | 1 + 1 file changed, 1 insertion(+) commit 955a0192082023bf08f1be279182090264cb2557 Author: Paul E. McKenney Date: Wed May 18 17:19:27 2022 -0700 rcu-tasks: Stop RCU Tasks Trace from scanning idle tasks Now that RCU scans both running tasks and tasks that have blocked within their current RCU Tasks Trace read-side critical section, there is no need for it to scan the idle tasks. After all, an idle loop should not be remain within an RCU Tasks Trace read-side critical section across exit from idle, and from a BPF viewpoint, functions invoked from the idle loop should not sleep. So only running idle tasks can be within RCU Tasks Trace read-side critical sections. This commit therefore removes the scan of the idle tasks from the rcu_tasks_trace_postscan() function. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit dc7d54b45170e1e3ced9f86718aa4274fd727790 Author: Paul E. McKenney Date: Wed May 18 17:19:27 2022 -0700 rcu-tasks: Pull in tasks blocked within RCU Tasks Trace readers This commit scans each CPU's ->rtp_blkd_tasks list, adding them to the list of holdout tasks. This will cause the current RCU Tasks Trace grace period to wait until these tasks exit their RCU Tasks Trace read-side critical sections. This commit will enable later work omitting the scan of the full task list. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 7460ade1fc6e3f62d5c0006c972755f0aefd41b2 Author: Paul E. McKenney Date: Wed May 18 16:06:55 2022 -0700 rcu-tasks: Scan running tasks for RCU Tasks Trace readers A running task might be within an RCU Tasks Trace read-side critical section for any length of time, but will not be placed on any of the per-CPU rcu_tasks_percpu structure's ->rtp_blkd_tasks lists. Therefore any RCU Tasks Trace grace-period processing that does not scan the full task list must interact with the running tasks. This commit therefore causes the rcu_tasks_trace_pregp_step() function to IPI each CPU in order to place the corresponding task on the holdouts list and to record whether or not it was in an RCU Tasks Trace read-side critical section. Yes, it is possible to avoid adding it to that list if it is not a reader, but that would prevent the system from remembering that this task was in a quiescent state. Which is why the running tasks are unconditionally added to the holdout list. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 51 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 11 deletions(-) commit 19415004d5221ba59be6ef566fdbb52c44808f7e Author: Paul E. McKenney Date: Tue May 17 17:38:02 2022 -0700 rcu-tasks: Avoid rcu_tasks_trace_pertask() duplicate list additions This commit adds checks within rcu_tasks_trace_pertask() to avoid duplicate (and destructive) additions to the holdouts list. These checks will be required later due to the possibility of a given task having blocked while in an RCU Tasks Trace read-side critical section, but now running on a CPU. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 1fa98e2e40e5a46fa528b6ab256ba00dfb319dde Author: Paul E. McKenney Date: Tue May 17 17:11:37 2022 -0700 rcu-tasks: Move rcu_tasks_trace_pertask() before rcu_tasks_trace_pregp_step() This is a code-motion-only commit that moves rcu_tasks_trace_pertask() to precede rcu_tasks_trace_pregp_step(), so that the latter will be able to invoke the other without forward references. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 387c0ad702296c4eb7b95322c8af0e4391bf146f Author: Paul E. McKenney Date: Tue May 17 16:47:40 2022 -0700 rcu-tasks: Add blocked-task indicator to RCU Tasks Trace stall warnings This commit adds a "B" indicator to the RCU Tasks Trace CPU stall warning when the task has blocked within its current read-side critical section. This serves as a debugging aid. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0bcb386857376224b5fd3f38b6e3173ec74d8d36 Author: Paul E. McKenney Date: Tue May 17 15:01:14 2022 -0700 rcu-tasks: Untrack blocked RCU Tasks Trace at reader end This commit causes rcu_read_unlock_trace() to check for the current task being on a per-CPU list within the rcu_tasks_percpu structure, and removes it from that list if so. This has the effect of curtailing tracking of a task that blocked within an RCU Tasks Trace read-side critical section once it exits that critical section. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 0356d4e66214569de674ab2684f2e0b440a466ab Author: Paul E. McKenney Date: Tue May 17 11:30:32 2022 -0700 rcu-tasks: Track blocked RCU Tasks Trace readers This commit places any task that has ever blocked within its current RCU Tasks Trace read-side critical section on a per-CPU list within the rcu_tasks_percpu structure. Tasks are removed from this list when they exit by the exit_tasks_rcu_finish_trace() function. The purpose of this commit is to provide the information needed to eliminate the current scan of the full task list. This commit offsets the INT_MIN value for ->trc_reader_nesting with the new nesting level in order to avoid queueing tasks that are exiting their read-side critical sections. [ paulmck: Apply kernel test robot feedback. ] [ paulmck: Apply feedback from syzbot+9bb26e7c5e8e4fa7e641@syzkaller.appspotmail.com ] Signed-off-by: Paul E. McKenney Tested-by: syzbot Tested-by: "Zhang, Qiang1" Cc: Peter Zijlstra Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh include/linux/rcupdate.h | 11 +++++++++-- include/linux/rcupdate_trace.h | 2 +- kernel/rcu/tasks.h | 22 +++++++++++++++++++++- 3 files changed, 31 insertions(+), 4 deletions(-) commit 434c9eefb959c36331a93617ea95df903469b99f Author: Paul E. McKenney Date: Mon May 16 17:56:16 2022 -0700 rcu-tasks: Add data structures for lightweight grace periods This commit adds fields to task_struct and to rcu_tasks_percpu that will be used to avoid the task-list scan for RCU Tasks Trace grace periods, and also initializes these fields. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh include/linux/sched.h | 2 ++ init/init_task.c | 1 + kernel/fork.c | 1 + kernel/rcu/tasks.h | 4 ++++ 4 files changed, 8 insertions(+) commit f90f19da88bfe32dd1fdfd104de4c0526a3be701 Author: Paul E. McKenney Date: Wed May 25 09:49:26 2022 -0700 rcu-tasks: Make RCU Tasks Trace stall warning handle idle offline tasks When a CPU is offline, its idle task can appear to be running, but it cannot be doing anything while CPU-hotplug operations are excluded. This commit takes advantage of that fact by making trc_check_slow_task() check for task_curr(t) && cpu_online(task_cpu(t)), and recording full information in that case. Signed-off-by: Paul E. McKenney Cc: Peter Zijlstra Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be15a16486dd6513ad801ea320eb21e10eec2b55 Author: Paul E. McKenney Date: Wed May 25 09:20:59 2022 -0700 rcu-tasks: Make RCU Tasks Trace stall warnings print full .b.need_qs field Currently, the RCU Tasks Trace CPU stall warning simply indicates whether or not the .b.need_qs field is zero. This commit shows the three permitted values and flags other values with either "!" or "?". This is a debugging aid. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c8c03ad9d7cd694b88ab8db4199b4e4d3c6cc5aa Author: Paul E. McKenney Date: Tue May 24 20:36:08 2022 -0700 rcu-tasks: Flag offline CPUs in RCU Tasks Trace stall warnings This commit tags offline CPUs with "(offline)" in RCU Tasks Trace CPU stall warnings. This is a debugging aid. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9f3eb5fb8e468d3c3a6073d0c816405fa73c8038 Author: Paul E. McKenney Date: Tue May 24 16:05:15 2022 -0700 rcu-tasks: Add slow-IPI indicator to RCU Tasks Trace stall warnings This commit adds a "I" indicator to the RCU Tasks Trace CPU stall warning when an IPI directed to a task has thus far failed to arrive. This serves as a debugging aid. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0968e8920b5b11b7a33982890ad9150e09e1cb1f Author: Paul E. McKenney Date: Tue May 31 21:38:15 2022 -0700 rcu-tasks: Simplify trc_inspect_reader() QS logic Currently, trc_inspect_reader() does one check for nesting less than or equal to zero, then sorts out the distinctions within this single "if" statement. This commit simplifies the logic by providing one "if" statement for quiescent states (nesting of zero) and another "if" statement for transitioning from one nesting level to another or the outermost rcu_read_unlock_trace() (negative nesting). Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 6a694411977a6d57ff76a896a745c2f717372dac Author: Paul E. McKenney Date: Tue May 24 20:33:17 2022 -0700 rcu-tasks: Make rcu_note_context_switch() unconditionally call rcu_tasks_qs() This commit makes rcu_note_context_switch() unconditionally invoke the rcu_tasks_qs() function, as opposed to doing so only when RCU (as opposed to RCU Tasks Trace) urgently needs a grace period to end. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tree_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d4c90d755d5703d5a74fac0870c0a697250ec33 Author: Paul E. McKenney Date: Tue May 24 18:19:17 2022 -0700 rcu-tasks: RCU Tasks Trace grace-period kthread has implicit QS Because the task driving the grace-period kthread is in quiescent state throughout, this commit excludes it from the list of tasks from which a quiescent state is needed. This does mean that attaching a sleepable BPF program to function in kernel/rcu/tasks.h is a bad idea, by the way. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 897ba84dc5aa7a5518e19da180d2985790723d30 Author: Paul E. McKenney Date: Tue May 24 18:02:40 2022 -0700 rcu-tasks: Handle idle tasks for recently offlined CPUs This commit identifies idle tasks for recently offlined CPUs as residing in a quiescent state. This is safe only because CPU-hotplug operations are excluded during these checks. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 5c9a9ca44fda41c5e82f50efced5297a9c19760d Author: Paul E. McKenney Date: Tue May 24 16:59:52 2022 -0700 rcu-tasks: Idle tasks on offline CPUs are in quiescent states Any idle task corresponding to an offline CPU is in an RCU Tasks Trace quiescent state. This commit causes rcu_tasks_trace_postscan() to ignore idle tasks for offline CPUs, which it can do safely due to CPU-hotplug operations being disabled. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ff86b4c443cc93bf3a9b624e3385e4114388e85 Author: Paul E. McKenney Date: Thu May 26 16:12:51 2022 -0700 rcu-tasks: Make trc_read_check_handler() fetch ->trc_reader_nesting only once This commit replaces the pair of READ_ONCE(t->trc_reader_nesting) calls with a single such call and a local variable. This makes the code's intent more clear. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 550611269b153dc17b44fa2d692c30f628d1c65c Author: Paul E. McKenney Date: Wed May 25 13:37:36 2022 -0700 rcu-tasks: Remove rcu_tasks_trace_postgp() wait for counter Now that tasks are not removed from the list until they have responded to any needed request for a quiescent state, it is no longer necessary to wait for the trc_n_readers_need_end counter to go to zero. This commit therefore removes that waiting code. It is therefore also no longer necessary for rcu_tasks_trace_postgp() to do the final decrement of this counter, so that code is also removed. This in turn means that trc_n_readers_need_end counter itself can be removed, as can the rcu_tasks_trace_iw irq_work structure and the rcu_read_unlock_iw() function. [ paulmck: Apply feedback from Zqiang. ] Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh kernel/rcu/tasks.h | 62 +++--------------------------------------------------- 1 file changed, 3 insertions(+), 59 deletions(-) commit 3847b64570b1753e9863a4106aec03f4d68e7b17 Author: Paul E. McKenney Date: Mon May 23 20:50:11 2022 -0700 rcu-tasks: Merge state into .b.need_qs and atomically update This commit gets rid of the task_struct structure's ->trc_reader_checked field, making it instead be a bit within the task_struct structure's existing ->trc_reader_special.b.need_qs field. This commit also atomically loads, stores, and checks the resulting combination of the reader-checked and need-quiescent state flags. This will in turn allow significant simplification of the rcu_tasks_trace_postgp() function as well as elimination of the trc_n_readers_need_end counter in later commits. These changes will in turn simplify later elimination of the RCU Tasks Trace scan of the task list, which will make RCU Tasks Trace grace periods less CPU-intensive. [ paulmck: Apply kernel test robot feedback. ] Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh include/linux/rcupdate.h | 18 +++++---- include/linux/sched.h | 1 - kernel/rcu/tasks.h | 103 ++++++++++++++++++++++++++++++++--------------- 3 files changed, 82 insertions(+), 40 deletions(-) commit 4a8cc433b8bf3106cf7b1173a936c62d77b40b40 Author: Paul E. McKenney Date: Tue Apr 19 15:41:38 2022 -0700 rcu-tasks: Drive synchronous grace periods from calling task This commit causes synchronous grace periods to be driven from the task invoking synchronize_rcu_*(), allowing these functions to be invoked from the mid-boot dead zone extending from when the scheduler was initialized to to point that the various RCU tasks grace-period kthreads are spawned. This change will allow the self-tests to run in a consistent manner. Reported-by: Matthew Wilcox Reported-by: Zhouyi Zhou Signed-off-by: Paul E. McKenney kernel/rcu/tasks.h | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 68cb47204db478302a37adb2aaa26a05882dbaa1 Author: Paul E. McKenney Date: Tue Apr 19 11:06:03 2022 -0700 rcu-tasks: Move synchronize_rcu_tasks_generic() down This is strictly a code-motion commit that moves the synchronize_rcu_tasks_generic() down to where it can invoke rcu_tasks_one_gp() without the need for a forward declaration. Signed-off-by: Paul E. McKenney kernel/rcu/tasks.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit d96225fd09ffb3a6424cebe01c8b1e1bddc30f07 Author: Paul E. McKenney Date: Tue Apr 19 10:47:28 2022 -0700 rcu-tasks: Split rcu_tasks_one_gp() from rcu_tasks_kthread() This commit abstracts most of the rcu_tasks_kthread() function's loop body into a new rcu_tasks_one_gp() function. It also introduces a new ->tasks_gp_mutex to synchronize concurrent calls to this new rcu_tasks_one_gp() function. This commit is preparation for allowing RCU tasks grace periods to be driven by the calling task during the mid-boot dead zone. Signed-off-by: Paul E. McKenney kernel/rcu/tasks.h | 58 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 22 deletions(-) commit 4cf0585c4d663654fefa0b359f1908b5cd72802b Author: Paul E. McKenney Date: Mon Dec 6 16:19:40 2021 -0800 rcu-tasks: Check for abandoned callbacks This commit adds a debugging scan for callbacks that got lost during a callback-queueing transition. Signed-off-by: Paul E. McKenney kernel/rcu/tasks.h | 5 +++++ 1 file changed, 5 insertions(+) commit d0eac20f9909de044fbeb958960b08ff235cf8a2 Author: Paul E. McKenney Date: Wed Apr 13 16:14:02 2022 -0700 rcutorture: Validate get_completed_synchronize_rcu() This commit verifies that the RCU grace-period state cookie returned from get_completed_synchronize_rcu() causes poll_state_synchronize_rcu() to return true, as required. This commit is in preparation for polled expedited grace periods. Link: https://lore.kernel.org/all/20220121142454.1994916-1-bfoster@redhat.com/ Link: https://docs.google.com/document/d/1RNKWW9jQyfjxw2E8dsXVTdvZYh0HnYeSHDKog9jhdN8/edit?usp=sharing Cc: Brian Foster Cc: Dave Chinner Cc: Al Viro Cc: Ian Kent Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 414c12385d4741e35d88670c6cc2f40a77809734 Author: Paul E. McKenney Date: Wed Apr 13 15:17:25 2022 -0700 rcu: Provide a get_completed_synchronize_rcu() function It is currently up to the caller to handle stale return values from get_state_synchronize_rcu(). If poll_state_synchronize_rcu() returned true once, a grace period has elapsed, regardless of the fact that counter wrap might cause some future poll_state_synchronize_rcu() invocation to return false. For example, the caller might store a separate flag that indicates whether some previous call to poll_state_synchronize_rcu() determined that the relevant grace period had already ended. This approach works, but it requires extra storage and is easy to get wrong. This commit therefore introduces a get_completed_synchronize_rcu() that returns a cookie that causes poll_state_synchronize_rcu() to always return true. This already-completed cookie can be stored in place of the cookie that previously caused poll_state_synchronize_rcu() to return true. It can also be used to flag a given structure as not having been exposed to readers, and thus not requiring a grace period to elapse. This commit is in preparation for polled expedited grace periods. Link: https://lore.kernel.org/all/20220121142454.1994916-1-bfoster@redhat.com/ Link: https://docs.google.com/document/d/1RNKWW9jQyfjxw2E8dsXVTdvZYh0HnYeSHDKog9jhdN8/edit?usp=sharing Cc: Brian Foster Cc: Dave Chinner Cc: Al Viro Cc: Ian Kent Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 1 + kernel/rcu/rcu.h | 3 +++ kernel/rcu/tiny.c | 4 ++-- kernel/rcu/tree.c | 3 ++- kernel/rcu/update.c | 13 +++++++++++++ 5 files changed, 21 insertions(+), 3 deletions(-) commit 2403e8044f222e7c816fb2416661f5f469662973 Author: Paul E. McKenney Date: Mon Mar 21 18:41:46 2022 -0700 rcu: Make normal polling GP be more precise about sequence numbers Currently, poll_state_synchronize_rcu() uses rcu_seq_done() to check whether the specified grace period has completed. However, rcu_seq_done() does a simple comparison that reserves have of the sequence-number space for uncompleted grace periods. This has the unfortunate side-effect of not handling sequence-number wrap gracefully. Of course, one can argue that if someone has already waited for half of the full range of grace periods, they can wait for the other half, but why wait at all in this case? This commit therefore creates a rcu_seq_done_exact() that counts as uncompleted only the two grace periods during which the sequence number might have been handed out, while still being uncompleted. This way, if sequence-number wrap happens to hit that range, at most two additional grace periods need be waited for. This commit is in preparation for polled expedited grace periods. Link: https://lore.kernel.org/all/20220121142454.1994916-1-bfoster@redhat.com/ Link: https://docs.google.com/document/d/1RNKWW9jQyfjxw2E8dsXVTdvZYh0HnYeSHDKog9jhdN8/edit?usp=sharing Cc: Brian Foster Cc: Dave Chinner Cc: Al Viro Cc: Ian Kent Signed-off-by: Paul E. McKenney kernel/rcu/rcu.h | 12 ++++++++++++ kernel/rcu/tree.c | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) commit 2b1333b80885b896807ffb6ccf4bc21d29aa65e0 Merge: cad564ca557f 0f95ee9a0c57 Author: Thomas Zimmermann Date: Mon Jun 20 18:21:25 2022 +0200 Merge drm/drm-next into drm-misc-next Backmerging to get new regmap APIs of v5.19-rc1. Signed-off-by: Thomas Zimmermann commit d5929835080a60f9119d024fa42f315913942f76 Author: Jason A. Donenfeld Date: Mon Jun 13 12:22:41 2022 +0200 drm/i915/display: Re-add check for low voltage sku for max dp source rate This reverts commit 73867c8709b5 ("drm/i915/display: Remove check for low voltage sku for max dp source rate"), which, on an i7-11850H iGPU with a Thinkpad X1 Extreme Gen 4, attached to a LG LP160UQ1-SPB1 embedded panel, causes wild flickering glitching technicolor pyrotechnics on resumption from suspend. The display shows strobing colors in an utter disaster explosion of pantone, as though bombs were dropped on the leprechauns at the base of the rainbow. Rebooting the machine fixes the issue, presumably because the display is initialized by firmware rather than by i915. Otherwise, the GPU appears to work fine. Bisection traced it back to this commit, which makes sense given the issues. Note: This re-opens, and puts back to the drawing board, https://gitlab.freedesktop.org/drm/intel/-/issues/5272 which was fixed by the regressing commit. Fixes: 73867c8709b5 ("drm/i915/display: Remove check for low voltage sku for max dp source rate") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6205 Cc: Ankit Nautiyal Cc: Imre Deak Cc: Jani Nikula Cc: Uma Shankar Cc: Animesh Manna Cc: Jani Saarinen Signed-off-by: Jason A. Donenfeld Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220613102241.9236-1-Jason@zx2c4.com drivers/gpu/drm/i915/display/intel_dp.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) commit 229e73d46994f15314f58b2d39bf952111d89193 Author: Johan Hovold Date: Mon Jun 20 16:07:23 2022 +0200 x86/pmem: Fix platform-device leak in error path Make sure to free the platform device in the unlikely event that registration fails. Fixes: 7a67832c7e44 ("libnvdimm, e820: make CONFIG_X86_PMEM_LEGACY a tristate option") Signed-off-by: Johan Hovold Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20220620140723.9810-1-johan@kernel.org arch/x86/kernel/pmem.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 9f88d062c3db13164a0d2007b88e1e430f523a06 Author: Sean Christopherson Date: Wed Jun 8 22:45:14 2022 +0000 KVM: selftests: Mostly fix broken Hyper-V Features test Explicitly do all setup at every stage of the Hyper-V Features test, e.g. set the MSR/hypercall, enable capabilities, etc... Now that the VM is recreated for every stage, values that are written into the VM's address space, i.e. shared with the guest, are reset between sub-tests, as are any capabilities, etc... Fix the hypercall params as well, which were broken in the same rework. The "hcall" struct/pointer needs to point at the hcall_params object, not the set of hypercall pages. The goofs were hidden by the test's dubious behavior of using '0' to signal "done", i.e. the MSR test ran exactly one sub-test, and the hypercall test was a gigantic nop. Fixes: 6c1186430a80 ("KVM: selftests: Avoid KVM_SET_CPUID2 after KVM_RUN in hyperv_features test") Signed-off-by: Sean Christopherson Message-Id: <20220608224516.3788274-4-seanjc@google.com> Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/x86_64/hyperv_features.c | 142 ++++++++++++--------- 1 file changed, 81 insertions(+), 61 deletions(-) commit 3b23054cd3f5106aed31ccf71a7bc14518a768eb Author: Sean Christopherson Date: Wed Jun 8 22:45:13 2022 +0000 KVM: selftests: Add x86-64 support for exception fixup Add x86-64 support for exception fixup on single instructions, without forcing tests to install their own fault handlers. Use registers r9-r11 to flag the instruction as "safe" and pass fixup/vector information, i.e. introduce yet another flavor of fixup (versus the kernel's in-memory tables and KUT's per-CPU area) to take advantage of KVM sefltests being 64-bit only. Using only registers avoids the need to allocate fixup tables, ensure FS or GS base is valid for the guest, ensure memory is mapped into the guest, etc..., and also reduces the potential for recursive faults due to accessing memory. Providing exception fixup trivializes tests that just want to verify that an instruction faults, e.g. no need to track start/end using global labels, no need to install a dedicated handler, etc... Deliberately do not support #DE in exception fixup so that the fixup glue doesn't need to account for a fault with vector == 0, i.e. the vector can also indicate that a fault occurred. KVM injects #DE only for esoteric emulation scenarios, i.e. there's very, very little value in testing #DE. Force any test that wants to generate #DEs to install its own handler(s). Use kvm_pv_test as a guinea pig for the new fixup, as it has a very straightforward use case of wanting to verify that RDMSR and WRMSR fault. Signed-off-by: Sean Christopherson Message-Id: <20220608224516.3788274-3-seanjc@google.com> Signed-off-by: Paolo Bonzini .../selftests/kvm/include/x86_64/processor.h | 74 ++++++++++++++++++++++ tools/testing/selftests/kvm/lib/x86_64/processor.c | 17 +++++ tools/testing/selftests/kvm/x86_64/kvm_pv_test.c | 74 ++++------------------ 3 files changed, 102 insertions(+), 63 deletions(-) commit bfbcc81bb82cbbad8bf4e40cea274f42b50674e2 Author: Sean Christopherson Date: Wed Jun 8 22:45:12 2022 +0000 KVM: x86: Add a quirk for KVM's "MONITOR/MWAIT are NOPs!" behavior Add a quirk for KVM's behavior of emulating intercepted MONITOR/MWAIT instructions a NOPs regardless of whether or not they are supported in guest CPUID. KVM's current behavior was likely motiviated by a certain fruity operating system that expects MONITOR/MWAIT to be supported unconditionally and blindly executes MONITOR/MWAIT without first checking CPUID. And because KVM does NOT advertise MONITOR/MWAIT to userspace, that's effectively the default setup for any VMM that regurgitates KVM_GET_SUPPORTED_CPUID to KVM_SET_CPUID2. Note, this quirk interacts with KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT. The behavior is actually desirable, as userspace VMMs that want to unconditionally hide MONITOR/MWAIT from the guest can leave the MISC_ENABLE quirk enabled. Signed-off-by: Sean Christopherson Message-Id: <20220608224516.3788274-2-seanjc@google.com> Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 13 +++++++++++++ arch/x86/include/asm/kvm_host.h | 3 ++- arch/x86/include/uapi/asm/kvm.h | 1 + arch/x86/kvm/x86.c | 30 +++++++++++++++++++----------- 4 files changed, 35 insertions(+), 12 deletions(-) commit ff81a90f45ce6b818167c590f7625b3b573defc9 Author: Sean Christopherson Date: Sat Jun 11 00:57:55 2022 +0000 KVM: x86: Ignore benign host writes to "unsupported" F15H_PERF_CTL MSRs Ignore host userspace writes of '0' to F15H_PERF_CTL MSRs KVM reports in the MSR-to-save list, but the MSRs are ultimately unsupported. All MSRs in said list must be writable by userspace, e.g. if userspace sends the list back at KVM without filtering out the MSRs it doesn't need. Note, reads of said MSRs already have the desired behavior. Signed-off-by: Sean Christopherson Message-Id: <20220611005755.753273-8-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 1 + 1 file changed, 1 insertion(+) commit 157fc497b54fd1dfcdedbca6199adca4bf5ee6ff Author: Sean Christopherson Date: Sat Jun 11 00:57:54 2022 +0000 KVM: x86: Ignore benign host accesses to "unsupported" PEBS and BTS MSRs Ignore host userspace reads and writes of '0' to PEBS and BTS MSRs that KVM reports in the MSR-to-save list, but the MSRs are ultimately unsupported. All MSRs in said list must be writable by userspace, e.g. if userspace sends the list back at KVM without filtering out the MSRs it doesn't need. Fixes: 8183a538cd95 ("KVM: x86/pmu: Add IA32_DS_AREA MSR emulation to support guest DS") Fixes: 902caeb6841a ("KVM: x86/pmu: Add PEBS_DATA_CFG MSR emulation to support adaptive PEBS") Fixes: c59a1f106f5c ("KVM: x86/pmu: Add IA32_PEBS_ENABLE MSR emulation for extended PEBS") Signed-off-by: Sean Christopherson Message-Id: <20220611005755.753273-7-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 3f7999b988bde6c50cb7b20d6c742d6512d1f0bd Author: Sean Christopherson Date: Sat Jun 11 00:57:53 2022 +0000 KVM: VMX: Use vcpu_get_perf_capabilities() to get guest-visible value Use vcpu_get_perf_capabilities() when querying MSR_IA32_PERF_CAPABILITIES from the guest's perspective, e.g. to update the vPMU and to determine which MSRs exist. If userspace ignores MSR_IA32_PERF_CAPABILITIES but clear X86_FEATURE_PDCM, the guest should see '0'. Fixes: 902caeb6841a ("KVM: x86/pmu: Add PEBS_DATA_CFG MSR emulation to support adaptive PEBS") Fixes: c59a1f106f5c ("KVM: x86/pmu: Add IA32_PEBS_ENABLE MSR emulation for extended PEBS") Signed-off-by: Sean Christopherson Message-Id: <20220611005755.753273-6-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/pmu_intel.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 545feb96c052809dab5ec04b95f976acca9f9364 Author: Sean Christopherson Date: Sat Jun 11 00:57:52 2022 +0000 Revert "KVM: x86: always allow host-initiated writes to PMU MSRs" Revert the hack to allow host-initiated accesses to all "PMU" MSRs, as intel_is_valid_msr() returns true for _all_ MSRs, regardless of whether or not it has a snowball's chance in hell of actually being a PMU MSR. That mostly gets papered over by the actual get/set helpers only handling MSRs that they knows about, except there's the minor detail that kvm_pmu_{g,s}et_msr() eat reads and writes when the PMU is disabled. I.e. KVM will happy allow reads and writes to _any_ MSR if the PMU is disabled, either via module param or capability. This reverts commit d1c88a4020567ba4da52f778bcd9619d87e4ea75. Fixes: d1c88a402056 ("KVM: x86: always allow host-initiated writes to PMU MSRs") Signed-off-by: Sean Christopherson Message-Id: <20220611005755.753273-5-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 4 ++-- arch/x86/kvm/pmu.h | 4 ++-- arch/x86/kvm/svm/pmu.c | 2 +- arch/x86/kvm/vmx/pmu_intel.c | 27 ++++++++++----------------- arch/x86/kvm/x86.c | 10 +++++----- 5 files changed, 20 insertions(+), 27 deletions(-) commit 5d4283df5a0fc8299fba9443c33d219939eccc2d Author: Sean Christopherson Date: Sat Jun 11 00:57:51 2022 +0000 Revert "KVM: x86/pmu: Accept 0 for absent PMU MSRs when host-initiated if !enable_pmu" Eating reads and writes to all "PMU" MSRs when there is no PMU is wildly broken as it results in allowing accesses to _any_ MSR on Intel CPUs as intel_is_valid_msr() returns true for all host_initiated accesses. A revert of commit d1c88a402056 ("KVM: x86: always allow host-initiated writes to PMU MSRs") will soon follow. This reverts commit 8e6a58e28b34e8d247e772159b8fa8f6bae39192. Signed-off-by: Sean Christopherson Message-Id: <20220611005755.753273-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 8 -------- arch/x86/kvm/svm/pmu.c | 11 +---------- 2 files changed, 1 insertion(+), 18 deletions(-) commit 0f4a7185270c4879fa40b33d7e07b6ac38353b34 Author: Sean Christopherson Date: Sat Jun 11 00:57:50 2022 +0000 KVM: VMX: Give host userspace full control of MSR_IA32_PERF_CAPABILITIES Do not clear manipulate MSR_IA32_PERF_CAPABILITIES in intel_pmu_refresh(), i.e. give userspace full control over capability/read-only MSRs. KVM is not a babysitter, it is userspace's responsiblity to provide a valid and coherent vCPU model. Attempting to "help" the guest by forcing a consistent model creates edge cases, and ironicially leads to inconsistent behavior. Example #1: KVM doesn't do intel_pmu_refresh() when userspace writes the MSR. Example #2: KVM doesn't clear the bits when the PMU is disabled, or when there's no architectural PMU. Signed-off-by: Sean Christopherson Message-Id: <20220611005755.753273-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/pmu_intel.c | 2 -- 1 file changed, 2 deletions(-) commit 9fc222967a39d6be96dabb942cc94e4f07ca049c Author: Sean Christopherson Date: Sat Jun 11 00:57:49 2022 +0000 KVM: x86: Give host userspace full control of MSR_IA32_MISC_ENABLES Give userspace full control of the read-only bits in MISC_ENABLES, i.e. do not modify bits on PMU refresh and do not preserve existing bits when userspace writes MISC_ENABLES. With a few exceptions where KVM doesn't expose the necessary controls to userspace _and_ there is a clear cut association with CPUID, e.g. reserved CR4 bits, KVM does not own the vCPU and should not manipulate the vCPU model on behalf of "dummy user space". The argument that KVM is doing userspace a favor because "the order of setting vPMU capabilities and MSR_IA32_MISC_ENABLE is not strictly guaranteed" is specious, as attempting to configure MSRs on behalf of userspace inevitably leads to edge cases precisely because KVM does not prescribe a specific order of initialization. Example #1: intel_pmu_refresh() consumes and modifies the vCPU's MSR_IA32_PERF_CAPABILITIES, and so assumes userspace initializes config MSRs before setting the guest CPUID model. If userspace sets CPUID first, then KVM will mark PEBS as available when arch.perf_capabilities is initialized with a non-zero PEBS format, thus creating a bad vCPU model if userspace later disables PEBS by writing PERF_CAPABILITIES. Example #2: intel_pmu_refresh() does not clear PERF_CAP_PEBS_MASK in MSR_IA32_PERF_CAPABILITIES if there is no vPMU, making KVM inconsistent in its desire to be consistent. Example #3: intel_pmu_refresh() does not clear MSR_IA32_MISC_ENABLE_EMON if KVM_SET_CPUID2 is called multiple times, first with a vPMU, then without a vPMU. While slightly contrived, it's plausible a VMM could reflect KVM's default vCPU and then operate on KVM's copy of CPUID to later clear the vPMU settings, e.g. see KVM's selftests. Example #4: Enumerating an Intel vCPU on an AMD host will not call into intel_pmu_refresh() at any point, and so the BTS and PEBS "unavailable" bits will be left clear, without any way for userspace to set them. Keep the "R" behavior of the bit 7, "EMON available", for the guest. Unlike the BTS and PEBS bits, which are fully "RO", the EMON bit can be written with a different value, but that new value is ignored. Cc: Like Xu Signed-off-by: Sean Christopherson Reported-by: kernel test robot Message-Id: <20220611005755.753273-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/pmu_intel.c | 5 ----- arch/x86/kvm/x86.c | 24 +++++++++++------------- 2 files changed, 11 insertions(+), 18 deletions(-) commit 1a9451bef2058c6343c45d467443c9a5bfc69917 Merge: ad9894ac6cc1 1db43c8ad90c Author: Mark Brown Date: Mon Jun 20 16:39:31 2022 +0100 remap: Some fixes for bulk read/write callbacks in regmap_config support Merge series from Javier Martinez Canillas : This series contains fixes for a few issues found while testing the recent support for drivers to define bulk read/write callbacks in regmap_config. I tested this with drivers/gpu/drm/solomon/ssd130x-spi.c, by converting it to use this new API instead of defining its own regmap bus for bulk write. Patch #1 and patch #2 are fixes for regresions introduced by that commit and patch #3 adds regmap_config provided bulk write support to functions regmap_noinc_write() and regmap_bulk_write(), that were missed. commit ced37411d7f597129fecc0c3ca2324f44e33f4c8 Author: David Virag Date: Thu Jun 2 01:37:43 2022 +0200 arm64: dts: exynos: Add internal eMMC support to jackpotlte Add the nodes relevant to provide clocks for Exynos7885 eMMC and to support eMMC. eMMC is the internal storage used in the Samsung Galaxy A8 (2018) (jackpotlte), and all other known devices using the Exynos7885 SoC. Signed-off-by: David Virag Link: https://lore.kernel.org/r/20220601233743.56317-6-virag.david003@gmail.com Signed-off-by: Krzysztof Kozlowski .../boot/dts/exynos/exynos7885-jackpotlte.dts | 20 ++++++++++++++ arch/arm64/boot/dts/exynos/exynos7885.dtsi | 32 ++++++++++++++++++++++ 2 files changed, 52 insertions(+) commit bcc94f9a2581a035befd86cde7c4b80855203fec Author: XueBing Chen Date: Fri Jun 17 17:57:21 2022 +0800 m68k: sun3: Use __func__ to get function's name in an output message Prefer using '"%s...", __func__' to get current function's name in an output message. Signed-off-by: XueBing Chen Link: https://lore.kernel.org/r/3461c09c.be8.1817118854e.Coremail.chenxuebing@jari.cn Signed-off-by: Geert Uytterhoeven arch/m68k/sun3/mmu_emu.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit c4738fa76cba0ed81aab86a78e00506a89ae211c Author: Xiang wangx Date: Fri Jun 10 16:39:24 2022 +0800 m68k: mac: Fix typos in comments Delete the redundant word 'an'. The second "and" should not be deleted, but replaced by "an". Signed-off-by: Xiang wangx Link: https://lore.kernel.org/r/20220610083924.32877-1-wangxiang@cdjrlc.com Signed-off-by: Geert Uytterhoeven arch/m68k/mac/iop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit efae7404e16a897fba089f83e132229e96825d83 Author: Laurent Vivier Date: Tue May 31 19:45:14 2022 +0200 m68k: virt: Kconfig minor fixes Select VIRTIO_MENU as it is needed by VIRTIO_MMIO. Add an ending period at the end of the virt machine help message. Reported-by: Randy Dunlap Signed-off-by: Laurent Vivier Tested-by: Randy Dunlap Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20220531174514.1586248-1-laurent@vivier.eu Signed-off-by: Geert Uytterhoeven arch/m68k/Kconfig.machine | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e068c0776b0bbd3fc5a283b0e0eaa1cbb9ef0e3d Author: Maxim Mikityanskiy Date: Mon Jun 20 13:49:39 2022 +0300 selftests/bpf: Enable config options needed for xdp_synproxy test This commit adds the kernel config options needed to run the recently added xdp_synproxy test. Users without these options will hit errors like this: test_synproxy:FAIL:iptables -t raw -I PREROUTING -i tmp1 -p tcp -m tcp --syn --dport 8080 -j CT --notrack unexpected error: 256 (errno 22) Suggested-by: Alexei Starovoitov Signed-off-by: Maxim Mikityanskiy Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220620104939.4094104-1-maximmi@nvidia.com tools/testing/selftests/bpf/config | 6 ++++++ 1 file changed, 6 insertions(+) commit 43312915b5ba20741617dd2119e835205fa8580c Author: Cong Wang Date: Wed Jun 15 09:20:14 2022 -0700 skmsg: Get rid of unncessary memset() We always allocate skmsg with kzalloc(), so there is no need to call memset(0) on it, the only thing we need from sk_msg_init() is sg_init_marker(). So introduce a new helper which is just kzalloc()+sg_init_marker(), this saves an unncessary memset(0) for skmsg on fast path. Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Reviewed-by: John Fastabend Link: https://lore.kernel.org/bpf/20220615162014.89193-5-xiyou.wangcong@gmail.com net/core/skmsg.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 57452d767feaeab405de3bff0d240c3ac84bfe0d Author: Cong Wang Date: Wed Jun 15 09:20:13 2022 -0700 skmsg: Get rid of skb_clone() With ->read_skb() now we have an entire skb dequeued from receive queue, now we just need to grab an addtional refcnt before passing its ownership to recv actors. And we should not touch them any more, particularly for skb->sk. Fortunately, skb->sk is already set for most of the protocols except UDP where skb->sk has been stolen, so we have to fix it up for UDP case. Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Reviewed-by: John Fastabend Link: https://lore.kernel.org/bpf/20220615162014.89193-4-xiyou.wangcong@gmail.com net/core/skmsg.c | 7 +------ net/ipv4/udp.c | 1 + 2 files changed, 2 insertions(+), 6 deletions(-) commit 965b57b469a589d64d81b1688b38dcb537011bb0 Author: Cong Wang Date: Wed Jun 15 09:20:12 2022 -0700 net: Introduce a new proto_ops ->read_skb() Currently both splice() and sockmap use ->read_sock() to read skb from receive queue, but for sockmap we only read one entire skb at a time, so ->read_sock() is too conservative to use. Introduce a new proto_ops ->read_skb() which supports this sematic, with this we can finally pass the ownership of skb to recv actors. For non-TCP protocols, all ->read_sock() can be simply converted to ->read_skb(). Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Reviewed-by: John Fastabend Link: https://lore.kernel.org/bpf/20220615162014.89193-3-xiyou.wangcong@gmail.com include/linux/net.h | 4 ++++ include/net/tcp.h | 3 +-- include/net/udp.h | 3 +-- net/core/skmsg.c | 20 +++++--------------- net/ipv4/af_inet.c | 3 ++- net/ipv4/tcp.c | 9 +++------ net/ipv4/udp.c | 10 ++++------ net/ipv6/af_inet6.c | 3 ++- net/unix/af_unix.c | 23 +++++++++-------------- 9 files changed, 31 insertions(+), 47 deletions(-) commit 04919bed948dc22a0032a9da867b7dcb8aece4ca Author: Cong Wang Date: Wed Jun 15 09:20:11 2022 -0700 tcp: Introduce tcp_read_skb() This patch inroduces tcp_read_skb() based on tcp_read_sock(), a preparation for the next patch which actually introduces a new sock ops. TCP is special here, because it has tcp_read_sock() which is mainly used by splice(). tcp_read_sock() supports partial read and arbitrary offset, neither of them is needed for sockmap. Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Reviewed-by: Eric Dumazet Reviewed-by: John Fastabend Link: https://lore.kernel.org/bpf/20220615162014.89193-2-xiyou.wangcong@gmail.com include/net/tcp.h | 2 ++ net/ipv4/tcp.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) commit e756e932a3a16418cd8bad757b028bfb337b4a51 Author: David Virag Date: Thu Jun 2 01:37:40 2022 +0200 dt-bindings: clock: Add indices for Exynos7885 TREX clocks TREX D Core and P core clocks seem to be related to the BTS (Bus Traffic Shaper) inside the Exynos7885 SoC, and are needed for the SoC to function correctly. Add indices for these clocks. Signed-off-by: David Virag Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220601233743.56317-3-virag.david003@gmail.com Signed-off-by: Krzysztof Kozlowski include/dt-bindings/clock/exynos7885.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit cd268e309c29e9a8b15a47f684d848c1d57fe150 Author: David Virag Date: Thu Jun 2 01:37:39 2022 +0200 dt-bindings: clock: Add bindings for Exynos7885 CMU_FSYS CMU_FSYS clock domain provides clocks for MMC (MMC_CARD, MMC_EMBD, MMC_SDIO), and USB30DRD. Add clock indices and bindings documentation for CMU_FSYS domain. Signed-off-by: David Virag Reviewed-by: Sylwester Nawrocki Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220601233743.56317-2-virag.david003@gmail.com Signed-off-by: Krzysztof Kozlowski .../bindings/clock/samsung,exynos7885-clock.yaml | 27 +++++++++++++++++++ include/dt-bindings/clock/exynos7885.h | 31 +++++++++++++++++++++- 2 files changed, 57 insertions(+), 1 deletion(-) commit 26f30e3ee1bf120af1bde22d890e46a0c8dbeca0 Author: Mark Brown Date: Wed Jun 15 18:41:38 2022 +0100 spi: topcliff-pch: Use core message validation The topcliff-pch driver requires TX and RX buffers on all transfers, open coding checks for this. Remove those open coded checks and instead rely on the core functionality, which has the added bonus that it will fix up any transfers submitted by drivers as needed rather than erroring out. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220615174138.4060912-1-broonie@kernel.org drivers/spi/spi-topcliff-pch.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) commit 487b87717b8538a9f2d13853fe6971735ceb795d Author: Andy Shevchenko Date: Mon Jun 20 14:28:47 2022 +0300 pinctrl: intel: Drop no more used members of struct intel_pingroup There are no more used members in the struct intel_pingroup, drop them. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-intel.h | 9 --------- 1 file changed, 9 deletions(-) commit 4426be364f3777db2e445676737614fbb937c140 Author: Andy Shevchenko Date: Mon Jun 20 14:28:48 2022 +0300 pinctrl: intel: Switch to to embedded struct pingroup Since struct intel_pingroup got a new member, switch the driver to use it. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-intel.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 98c23f607cdfabb449cd1e60109fb89f3b90ad4a Author: Andy Shevchenko Date: Mon Jun 20 14:28:48 2022 +0300 pinctrl: merrifield: Switch to to embedded struct pingroup Since struct intel_pingroup got a new member, switch the driver to use it. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-merrifield.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a7f9757cec9189b7473c69de8ff1b85db86449db Author: Andy Shevchenko Date: Mon Jun 20 14:28:48 2022 +0300 pinctrl: lynxpoint: Switch to to embedded struct pingroup Since struct intel_pingroup got a new member, switch the driver to use it. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-lynxpoint.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2c292a78eabac7187cfdd9a75ad0d3fe595f0188 Author: Andy Shevchenko Date: Mon Jun 20 14:28:48 2022 +0300 pinctrl: cherryview: Switch to to embedded struct pingroup Since struct intel_pingroup got a new member, switch the driver to use it. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-cherryview.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 770f53d43ac966825a484223a011d2e2cc64bc9e Author: Andy Shevchenko Date: Mon Jun 20 14:28:48 2022 +0300 pinctrl: baytrail: Switch to to embedded struct pingroup Since struct intel_pingroup got a new member, switch the driver to use it. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-baytrail.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 277b95a9338351e30141d68698ea730bf28cf839 Author: Andy Shevchenko Date: Mon Jun 20 12:06:07 2022 +0300 pinctrl: intel: Embed struct pingroup into struct intel_pingroup Add a new member to the struct intel_pingroup to cover generic pin control group parameters. The idea is to convert all users (one-by-one) to it and drop old members later on. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-intel.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 6a6eff73a9542141624ad4b27ddbc13f9f3f7103 Author: Luca Weiss Date: Wed May 25 16:44:00 2022 +0200 interconnect: qcom: Add SM6350 driver support Add a driver that handles the different NoCs found on SM6350, generated from the downstream dtb. We're exluding ALC, IP0 and all _display nodes. ALC will not be voted from the kernel[1] and IP0 is handled by the clk-rpmh driver[2]. [1] https://lore.kernel.org/linux-arm-msm/1e79c73f22c8891dc9f868babd940fca@codeaurora.org/ [2] https://lore.kernel.org/linux-arm-msm/20220412220033.1273607-1-swboyd@chromium.org/ Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20220525144404.200390-5-luca.weiss@fairphone.com Signed-off-by: Georgi Djakov drivers/interconnect/qcom/Kconfig | 9 + drivers/interconnect/qcom/Makefile | 2 + drivers/interconnect/qcom/sm6350.c | 493 +++++++++++++++++++++++++++++++++++++ drivers/interconnect/qcom/sm6350.h | 139 +++++++++++ 4 files changed, 643 insertions(+) commit 394fb16954793d387e375b645d44fcfd8602bfda Author: Luca Weiss Date: Wed May 25 16:43:59 2022 +0200 dt-bindings: interconnect: Add Qualcomm SM6350 NoC support Add bindings for Qualcomm SM6350 Network-On-Chip interconnect devices. As SM6350 has two pairs of NoCs sharing the same reg, allow this in the binding documentation, as was done for qcm2290. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220525144404.200390-4-luca.weiss@fairphone.com Signed-off-by: Georgi Djakov .../bindings/interconnect/qcom,sm6350-rpmh.yaml | 82 ++++++++++++ include/dt-bindings/interconnect/qcom,sm6350.h | 148 +++++++++++++++++++++ 2 files changed, 230 insertions(+) commit 23c136bb3f916da4252c79dd4dce07ecbe8ea06e Author: Luca Weiss Date: Wed May 25 16:43:58 2022 +0200 dt-bindings: interconnect: qcom: Split out rpmh-common bindings In preparation for the platforms, split out common definitions used in rpmh-based interconnects. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220525144404.200390-3-luca.weiss@fairphone.com Signed-off-by: Georgi Djakov .../bindings/interconnect/qcom,rpmh-common.yaml | 43 ++++++++++++++++++++++ .../bindings/interconnect/qcom,rpmh.yaml | 22 +++-------- 2 files changed, 48 insertions(+), 17 deletions(-) commit 57eb14779dfd8fa550a5d78f3e971dbf988cd383 Author: Luca Weiss Date: Wed May 25 16:43:57 2022 +0200 interconnect: qcom: icc-rpmh: Support child NoC device probe As per e39bf2972c6e ("interconnect: icc-rpm: Support child NoC device probe") also update the rpmh interconnect driver to support probing NoCs that are modelled as child devices of a different NoC. As the driver doesn't yet use the 'reg' property, no change is done for that. Downstream DT reference: https://android.googlesource.com/kernel/msm-extra/devicetree/+/refs/tags/android-11.0.0_r0.56/qcom/lagoon-bus.dtsi Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20220525144404.200390-2-luca.weiss@fairphone.com Signed-off-by: Georgi Djakov drivers/interconnect/qcom/icc-rpmh.c | 4 ++++ 1 file changed, 4 insertions(+) commit 91503e5a3b5aee6ac7240d1f03abe69253c14de9 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:28 2022 -0700 ARM: dts: animeo: correct gpio-keys properties gpio-keys children do not use unit addresses. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-35-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/animeo_ip.dts | 2 -- 1 file changed, 2 deletions(-) commit 523b53bb750d91148222297c3857bbde7c7483a8 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:27 2022 -0700 ARM: dts: animeo: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-34-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/animeo_ip.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 717b3096da2ea205c6f31b4c2cd4485671d6ac79 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:03 2022 -0700 arm64: dts: hisilicon: correct gpio-keys properties gpio-keys children do not use unit addresses. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-10-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/hisilicon/hip05-d02.dts | 2 -- 1 file changed, 2 deletions(-) commit 111b4da2c2fc2551ecfe466616089e1223dc7ac1 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:02 2022 -0700 arm64: dts: hisilicon: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-9-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 2 +- arch/arm64/boot/dts/hisilicon/hip05-d02.dts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit ea559c81b61603d4044df6f826f10a832c42c98c Author: Krzysztof Kozlowski Date: Wed Jun 15 17:52:59 2022 -0700 arm64: dts: broadcom: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-6-krzysztof.kozlowski@linaro.org .../boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts | 8 ++++---- arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit 2453119fe6eed92ae88baac14ed28425a2b9f95e Author: Krzysztof Kozlowski Date: Wed Jun 15 17:52:58 2022 -0700 arm64: dts: apm: correct gpio-keys properties gpio-keys children do not use unit addresses. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-5-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/apm/apm-merlin.dts | 2 +- arch/arm64/boot/dts/apm/apm-mustang.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2b5960a0e33b5449712abc9a1b144d7ac874e47c Author: Damien Le Moal Date: Mon Jun 20 09:50:27 2022 +0900 ata: pata_macio: Fix compilation warning Change the debug print format for the PIO, MWDMA and UDMA masks from long to int to match the new type used for these fields in struct ata_port_info. Fixes: f0a6d77b351c ("ata: make transfer mode masks *unsigned int*") Signed-off-by: Damien Le Moal drivers/ata/pata_macio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efbabc11650040c64884ff3019b88c7bcc0ceb1d Author: Veerendranath Jakkam Date: Wed Jun 8 14:46:37 2022 +0530 cfg80211: Indicate MLO connection info in connect and roam callbacks The MLO links used for connection with an MLD AP are decided by the driver in case of SME offloaded to driver. Add support for the drivers to indicate the information of links used for MLO connection in connect and roam callbacks, update the connected links information in wdev from connect/roam result sent by driver. Also, send the connected links information to userspace. Add a netlink flag attribute to indicate that userspace supports handling of MLO connection. Drivers must not do MLO connection when this flag is not set. This is to maintain backwards compatibility with older supplicant versions which doesn't have support for MLO connection. Signed-off-by: Veerendranath Jakkam Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath6kl/cfg80211.c | 2 +- drivers/net/wireless/ath/wil6210/wmi.c | 4 +- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 6 +- drivers/net/wireless/rndis_wlan.c | 5 +- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 4 +- drivers/staging/wlan-ng/cfg80211.c | 2 +- include/net/cfg80211.h | 84 +++-- include/uapi/linux/nl80211.h | 6 + net/wireless/mlme.c | 4 +- net/wireless/nl80211.c | 120 ++++++- net/wireless/sme.c | 391 +++++++++++++++------ 11 files changed, 480 insertions(+), 148 deletions(-) commit 245e5ebc6afaa2520439637d0ade8fd9db158610 Author: Shaul Triebitz Date: Tue Jun 14 12:26:39 2022 +0300 wifi: mac80211_hwsim: print the link id Print the link ID in link_info_changed function. Signed-off-by: Shaul Triebitz Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2fd0c671ece4083b467dd94614acccde779ea25f Author: Johannes Berg Date: Wed Jun 8 14:23:39 2022 +0200 wifi: mac80211_hwsim: support creating MLO-capable radios Add initial support to hwsim for creating MLO-capable radios dynamically (and statically via module parameter, but that's not really recommended.) Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 97 +++++++++++++++++++++++++++-------- drivers/net/wireless/mac80211_hwsim.h | 5 +- 2 files changed, 81 insertions(+), 21 deletions(-) commit dd374f84baecd76cbd12fc543c763ff78338d4ad Author: Johannes Berg Date: Mon Jun 13 16:52:02 2022 +0200 wifi: nl80211: expose link ID for associated BSSes When retrieving scan data, expose not just whether or not the interface (possibly an MLD) is associated to the BSS or not, but also on which link ID if it is an MLD. Signed-off-by: Johannes Berg net/wireless/nl80211.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ce08cd344a0027076b2f46b9e8988d08f6641252 Author: Johannes Berg Date: Mon Jun 13 16:51:27 2022 +0200 wifi: nl80211: expose link information for interfaces When getting/dumping an interface, expose information about valid links. Signed-off-by: Johannes Berg net/wireless/nl80211.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit e57f8a489c294d83cc4e2c9cba1432f99fbf7fdd Author: Shaul Triebitz Date: Mon Jun 6 20:03:17 2022 +0300 wifi: mac80211_hwsim: send a beacon per link Add to hwsim a link_data structure. For now, move the beacon interval and beacon timer to the link_data structure (making them per link). Set a beacon timer for each link and transmit a per link beacon (pass the link_id to ieee80211_beacon_get). Signed-off-by: Shaul Triebitz Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 90 +++++++++++++++++++++++------------ 1 file changed, 59 insertions(+), 31 deletions(-) commit 630c7e4621763220d23789fbb036e0cf227e0b22 Author: Johannes Berg Date: Wed Jun 15 11:50:00 2022 +0200 wifi: mac80211: set STA deflink addresses We should set the STA deflink addresses in case no link is really added. Fixes: 046d2e7c50e3 ("mac80211: prepare sta handling for MLO support") Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 2 ++ 1 file changed, 2 insertions(+) commit ba6ddab94fc63813ad582c55dd95ed596420d101 Author: Johannes Berg Date: Tue Jun 14 13:07:42 2022 +0200 wifi: mac80211: maintain link-sta hash table Maintain a hash table of link-sta addresses so we can find them for management frames etc. where addresses haven't been replaced by the drivers to the MLD address yet. Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 1 + net/mac80211/sta_info.c | 84 ++++++++++++++++++++++++++++++++++++++++++---- net/mac80211/sta_info.h | 14 +++++++- 3 files changed, 92 insertions(+), 7 deletions(-) commit c71420db653aba30a234d1e4cf86dde376e604fa Author: Johannes Berg Date: Wed Jun 15 09:20:45 2022 +0200 wifi: mac80211: RCU-ify link STA pointers We need to be able to access these in a race-free way under traffic while adding/removing them, so RCU-ify the pointers. This requires passing a link_sta to a lot of functions so we don't have to do the RCU handling everywhere. Signed-off-by: Johannes Berg include/net/mac80211.h | 2 +- net/mac80211/cfg.c | 12 ++-- net/mac80211/chan.c | 25 +++++--- net/mac80211/eht.c | 13 ++--- net/mac80211/he.c | 17 +++--- net/mac80211/ht.c | 14 ++--- net/mac80211/ibss.c | 5 +- net/mac80211/ieee80211_i.h | 30 +++++----- net/mac80211/iface.c | 3 +- net/mac80211/mesh_plink.c | 8 ++- net/mac80211/mlme.c | 12 ++-- net/mac80211/rate.c | 2 +- net/mac80211/rx.c | 6 +- net/mac80211/sta_info.c | 28 +++++---- net/mac80211/sta_info.h | 5 +- net/mac80211/tdls.c | 5 +- net/mac80211/vht.c | 139 ++++++++++++++++++++++++--------------------- 17 files changed, 180 insertions(+), 146 deletions(-) commit ce6893e917862cae669af52a440d086f416c4cc6 Author: Johannes Berg Date: Tue Jun 14 13:22:49 2022 +0200 wifi: mac80211: ethtool: use deflink for now Hardcoding link[0] is more confusing than using deflink, so use deflink for now, which requires making the macro a bit safer. Signed-off-by: Johannes Berg net/mac80211/ethtool.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 7e60096f6733350ccb9f55c8084cb421e1934f81 Author: Johannes Berg Date: Tue Jun 14 12:07:11 2022 +0200 wifi: mac80211: move ieee80211_bssid_match() function This is only used in rx.c, so move it into the file. Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 6 ------ net/mac80211/rx.c | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) commit 6e8912a503759bb8f1f01c5b761d0d45815fa6de Author: Shaul Triebitz Date: Mon Jun 6 14:25:54 2022 +0300 wifi: mac80211: return a beacon for a specific link Pass the link id through to the get_beacon and return the beacon for a specific link id. Signed-off-by: Shaul Triebitz Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath10k/mac.c | 2 +- drivers/net/wireless/ath/ath10k/wmi.c | 2 +- drivers/net/wireless/ath/ath11k/mac.c | 2 +- drivers/net/wireless/ath/ath5k/base.c | 2 +- drivers/net/wireless/ath/ath9k/beacon.c | 2 +- drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | 2 +- drivers/net/wireless/ath/carl9170/tx.c | 2 +- drivers/net/wireless/ath/wcn36xx/main.c | 2 +- drivers/net/wireless/broadcom/b43/main.c | 2 +- drivers/net/wireless/broadcom/b43legacy/main.c | 2 +- .../broadcom/brcm80211/brcmsmac/mac80211_if.c | 4 +- drivers/net/wireless/intel/iwlegacy/common.c | 2 +- drivers/net/wireless/intel/iwlwifi/dvm/main.c | 4 +- drivers/net/wireless/intel/iwlwifi/dvm/rxon.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 2 +- drivers/net/wireless/intersil/p54/main.c | 2 +- drivers/net/wireless/mac80211_hwsim.c | 2 +- drivers/net/wireless/marvell/libertas_tf/main.c | 4 +- drivers/net/wireless/marvell/mwl8k.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7603/beacon.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 4 +- .../net/wireless/mediatek/mt76/mt76x02_beacon.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 2 +- drivers/net/wireless/purelifi/plfxlc/mac.c | 4 +- drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 2 +- drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c | 2 +- drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 2 +- drivers/net/wireless/realtek/rtlwifi/core.c | 2 +- drivers/net/wireless/realtek/rtlwifi/pci.c | 2 +- drivers/net/wireless/realtek/rtw88/fw.c | 2 +- drivers/net/wireless/realtek/rtw89/fw.c | 3 +- drivers/net/wireless/rsi/rsi_91x_hal.c | 2 +- drivers/net/wireless/silabs/wfx/sta.c | 6 +- drivers/net/wireless/st/cw1200/sta.c | 4 +- drivers/net/wireless/ti/wl1251/main.c | 2 +- drivers/net/wireless/ti/wlcore/main.c | 4 +- drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 9 +-- drivers/staging/vt6655/rxtx.c | 2 +- drivers/staging/vt6656/rxtx.c | 2 +- include/net/mac80211.h | 14 ++-- net/mac80211/tx.c | 75 +++++++++++++--------- 43 files changed, 109 insertions(+), 88 deletions(-) commit ae7ba17b49b6707e62f31643dda25592c29482f8 Author: Shaul Triebitz Date: Thu Jun 2 15:08:16 2022 +0300 wifi: mac80211: pass the link id in start/stop ap In start_ap and stop_ap mac80211 callbacks pass the link_id to the drivers. Signed-off-by: Shaul Triebitz Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 40 +++++++++++++++++++---- drivers/net/wireless/realtek/rtw88/mac80211.c | 3 +- drivers/net/wireless/realtek/rtw89/mac80211.c | 6 ++-- drivers/net/wireless/silabs/wfx/sta.c | 6 ++-- drivers/net/wireless/silabs/wfx/sta.h | 6 ++-- include/net/mac80211.h | 6 ++-- net/mac80211/cfg.c | 4 +-- net/mac80211/driver-ops.h | 15 +++++---- net/mac80211/trace.h | 36 ++++++++++++++++---- net/mac80211/util.c | 2 +- 10 files changed, 93 insertions(+), 31 deletions(-) commit d9f83f22a7913149fc8687b1cc54a28505d25990 Author: Shaul Triebitz Date: Wed Jun 1 12:55:14 2022 +0300 wifi: mac80211: use link in start/stop ap Use link and link_conf according to the link_id provided by cfg in start_ap/stop_ap and change_beacon. Also use them in the functions called by them. Note that for a non MLD device, the link_id is 0, and link[0] and link_conf[0] equal to deflink and bss_conf respectively (what was there before). Also, call vif_info_change for BSS related changes (SSID), and link_info_change for LINK related changes (instead of the legacy bss_info_change). Signed-off-by: Shaul Triebitz Signed-off-by: Johannes Berg net/mac80211/cfg.c | 217 ++++++++++++++++++++++++++++------------------------- 1 file changed, 115 insertions(+), 102 deletions(-) commit 0d8c4a3c8688bd0bbc67b8a24b4e7a7344272c93 Author: Johannes Berg Date: Fri Jun 10 11:21:21 2022 +0200 wifi: mac80211: implement add/del interface link callbacks When a link is added or removed via nl80211, these are called. Implement them so we don't have to check in all the different per-link commands whether we've already created the necessary datastructures. Signed-off-by: Johannes Berg net/mac80211/cfg.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit f2a0290b2df2b0e65ab78b71c4a15e732afd4458 Author: Johannes Berg Date: Fri Jun 10 11:07:55 2022 +0200 wifi: cfg80211: add optional link add/remove callbacks Add some optional callbacks for link add/remove so that drivers can react here. Initially, I thought it would be sufficient to just create the link in start_ap etc., but it turns out that's not so simple, since there are quite a few callbacks that can be called: if they're erroneously without start_ap, things might crash. Thus it might be easier for drivers to allocate all the necessary data structures immediately, to not have to worry about it in each callback, since cfg80211 checks that the link ID is valid (has been added.) Signed-off-by: Johannes Berg include/net/cfg80211.h | 12 ++++++++++++ net/wireless/nl80211.c | 14 +++++++++++++- net/wireless/rdev-ops.h | 26 ++++++++++++++++++++++++++ net/wireless/trace.h | 20 +++++++++++++++++++- 4 files changed, 70 insertions(+), 2 deletions(-) commit c8a11ed5539f6df98d06259b5177975162b88510 Author: Johannes Berg Date: Fri Jun 10 10:50:18 2022 +0200 wifi: cfg80211: sort trace.h We wanted to have this sorted by direction (to/from driver), but didn't maintain that well. Sort the file now. Signed-off-by: Johannes Berg net/wireless/trace.h | 274 +++++++++++++++++++++++++-------------------------- 1 file changed, 137 insertions(+), 137 deletions(-) commit cb71f1d136a635decf43c3b502ee34fb05640fcd Author: Johannes Berg Date: Tue May 31 23:20:08 2022 +0200 wifi: mac80211: add sta link addition/removal Add the necessary infrastructure, including a new driver method, to add/remove links to/from a station. To do this, refactor the link alloc/free a bit, splitting that so we can do it without linking them, to handle failures better. Note that a station entry must be created representing an MLD or a non-MLD STA, it cannot change between the two. When representing an MLD, the 'deflink' is used for the first link, which might be removed later, in which case the memory isn't reused. Signed-off-by: Johannes Berg include/net/mac80211.h | 13 +++- net/mac80211/cfg.c | 2 +- net/mac80211/driver-ops.h | 21 +++++++ net/mac80211/ibss.c | 4 +- net/mac80211/mesh_plink.c | 2 +- net/mac80211/mlme.c | 2 +- net/mac80211/ocb.c | 2 +- net/mac80211/sta_info.c | 156 +++++++++++++++++++++++++++++++++++++++------- net/mac80211/sta_info.h | 8 ++- net/mac80211/trace.h | 31 +++++++++ 10 files changed, 206 insertions(+), 35 deletions(-) commit 69d41b5a9c9d8d24c0faeb376fc2f52fc810d855 Author: Johannes Berg Date: Thu Jun 9 22:05:07 2022 +0200 wifi: mac80211: add MLO link ID to TX frame metadata Take a few bits out of the control.flags to add the link ID to TX frame metadata, so drivers don't need to look it up by the address themselves. Implement that lookup where it's needed, for internal frame TX, and set it to "unspecified" for data transmissions. Signed-off-by: Johannes Berg include/net/mac80211.h | 7 +++++++ net/mac80211/tx.c | 34 ++++++++++++++++++++++++++++++++-- 2 files changed, 39 insertions(+), 2 deletions(-) commit eef25a6679adb3cc73b611cf6c78386f54df0e0f Author: Johannes Berg Date: Wed Jun 1 15:59:31 2022 +0200 wifi: mac80211: remove band from TX info in MLO If the interface is an MLD, then we don't know which band the frame will be transmitted on, and we don't know how to look up the band. Set the band information to zero in that case, the driver cannot rely on it anyway. No longer inline ieee80211_tx_skb_tid() since it's even bigger now. Signed-off-by: Johannes Berg include/net/mac80211.h | 4 ++- net/mac80211/ieee80211_i.h | 19 ++-------- net/mac80211/tx.c | 89 +++++++++++++++++++++++++++++++++++----------- 3 files changed, 73 insertions(+), 39 deletions(-) commit d8787ec6b4ef1857b827699eca6f5978d0aecd74 Author: Johannes Berg Date: Tue May 31 23:20:08 2022 +0200 wifi: mac80211: add vif link addition/removal Add the necessary infrastructure, including a new driver method, to add/remove links to/from an interface. Also add the missing link address to bss_conf (which we use as link_conf too), and fill it, in station mode for now just randomly, in AP mode we get the address from cfg80211 since the link must be created with an address first. Signed-off-by: Johannes Berg include/net/mac80211.h | 15 +++++ net/mac80211/driver-ops.h | 21 +++++++ net/mac80211/ieee80211_i.h | 3 + net/mac80211/iface.c | 134 ++++++++++++++++++++++++++++++++++++++++++++- net/mac80211/trace.h | 27 +++++++++ 5 files changed, 197 insertions(+), 3 deletions(-) commit d648c23024bd01333acd2fd5e34bcde0ffb66b16 Author: Johannes Berg Date: Tue May 31 19:48:33 2022 +0200 wifi: nl80211: support MLO in auth/assoc For authentication, we need the BSS, the link_id and the AP MLD address to create the link and station, (for now) the driver assigns a link address and sends the frame, the MLD address needs to be the address of the interface. For association, pass the list of BSSes that were selected for the MLO connection, along with extra per-STA profile elements, the AP MLD address and the link ID on which the association request should be sent. Note that for now we don't have a proper way to pass the link address(es) and so the driver/mac80211 will select one, but depending on how that selection works it means that assoc w/o auth data still being around (mac80211 implementation detail) the association won't necessarily work - so this will need to be extended in the future to sort out the link addressing. Signed-off-by: Johannes Berg include/net/cfg80211.h | 31 +++++++++++++++ include/uapi/linux/nl80211.h | 3 ++ net/wireless/mlme.c | 30 +++++++++++++-- net/wireless/nl80211.c | 91 ++++++++++++++++++++++++++++++++++++++++++-- net/wireless/sme.c | 2 + 5 files changed, 151 insertions(+), 6 deletions(-) commit a503a9535eb83afcbdcba7696b4bc7a1e17f93f2 Author: Johannes Berg Date: Wed Jun 8 14:18:17 2022 +0200 wifi: mac80211: ignore IEEE80211_CONF_CHANGE_SMPS in chanctx mode When channel contexts are used, IEEE80211_CONF_CHANGE_SMPS doesn't make sense and doesn't apply (which is documented). Mask it in this case. Signed-off-by: Johannes Berg net/mac80211/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7a52107e441effadd850a7bf155c4719205ad6d7 Author: Shaul Triebitz Date: Mon Jun 6 15:51:45 2022 +0300 wifi: mac80211_hwsim: split bss_info_changed to vif/link info_changed Replace the bss_info_changed callback with vif_cfg_changed and link_info_changed callbacks (for vif changes and link changes). Signed-off-by: Shaul Triebitz Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit 325839da9581ee3e881e9c318cbebbdd680cb101 Author: Johannes Berg Date: Wed Jun 1 22:42:28 2022 +0200 wifi: cfg80211: simplify cfg80211_mlme_auth() prototype This function has far too many parameters now, move out the BSS lookup and pass the request struct instead. Signed-off-by: Johannes Berg net/wireless/core.h | 8 +------- net/wireless/mlme.c | 41 ++++++++++------------------------------- net/wireless/nl80211.c | 32 ++++++++++++++++++++++---------- net/wireless/sme.c | 20 +++++++++++++------- 4 files changed, 46 insertions(+), 55 deletions(-) commit 0f48b8b88aa9ed7b65d7cb55dbc57ec914ddada1 Author: Johannes Berg Date: Tue May 31 14:03:38 2022 +0200 wifi: ieee80211: add definitions for multi-link element Add the definitions necessary to build and parse some of the multi-link element, the per-STA profile isn't fully included. Signed-off-by: Johannes Berg include/linux/ieee80211.h | 222 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 222 insertions(+) commit 9ecff10e82a59541d407495c5ad170c6d19e0a98 Author: Johannes Berg Date: Tue May 31 18:31:19 2022 +0200 wifi: nl80211: refactor BSS lookup in nl80211_associate() For MLO we'll need to do this multiple times, so refactor this. For now keep the disconnect_bssid, but we'll need to figure out how to handle that with MLD. Signed-off-by: Johannes Berg net/wireless/nl80211.c | 59 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 21 deletions(-) commit 0f7594489a8ab154edb899e84f877def0b48fbd0 Author: Johannes Berg Date: Tue May 31 18:00:00 2022 +0200 wifi: cfg80211: mlme: get BSS entry outside cfg80211_mlme_assoc() Today it makes more sense to pass the necessary parameters to look up the BSS entry to cfg80211_mlme_assoc(), but with MLO we will need to look up multiple, and that gets awkward. Pull the lookup code into the callers so we can change it better. Signed-off-by: Johannes Berg net/wireless/core.h | 3 --- net/wireless/mlme.c | 17 ++++------------- net/wireless/nl80211.c | 14 +++++++++++--- net/wireless/sme.c | 15 ++++++++++++--- 4 files changed, 27 insertions(+), 22 deletions(-) commit 27f852de7e5c70f9172de6120e12d6c498069006 Author: Johannes Berg Date: Wed Jun 1 14:25:44 2022 +0200 wifi: mac80211: tx: simplify chanctx_conf handling In ieee80211_build_hdr() we do the same thing for all interface types except for AP_VLAN, but we can simplify the code by pulling the common thing in front of the switch and overriding it for AP_VLAN. This will also simplify the code for MLD here later. Signed-off-by: Johannes Berg net/mac80211/tx.c | 45 +++++++++------------------------------------ 1 file changed, 9 insertions(+), 36 deletions(-) commit e5c0ee01fedf2df42426ac4b3c45b4c5cd49de4a Author: Johannes Berg Date: Wed Jun 1 14:16:00 2022 +0200 wifi: mac80211: status: look up band only where needed For MLD, we might eventually not really know the band on status, but some code assumes it's there. Move the sband lookup deep to the code that actually needs it, to make it clear where exactly it's needed and for what purposes. For rate control, at least initially we won't support it in MLO, so that won't be an issue. For TX monitoring, we may have to elide the rate and/or rely on ieee80211_tx_status_ext() for rate information. This also simplifies the function prototypes. Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 1 - net/mac80211/rate.c | 4 +++- net/mac80211/rate.h | 1 - net/mac80211/status.c | 22 +++++++++------------- net/mac80211/tx.c | 8 +------- 5 files changed, 13 insertions(+), 23 deletions(-) commit 37a7d0dae3111c431b81959ca13cf5effdf9e929 Author: Johannes Berg Date: Tue May 31 23:06:19 2022 +0200 wifi: mac80211: sort trace.h file This used to be sorted by driver methods, APIs and internal functions, but got added to in the wrong sections. Fix that by ordering the file properly again. Signed-off-by: Johannes Berg net/mac80211/trace.h | 916 +++++++++++++++++++++++++-------------------------- 1 file changed, 458 insertions(+), 458 deletions(-) commit 7ffc4b29d8b559764f763f32f6ae8f14c3919143 Author: Johannes Berg Date: Tue May 31 00:02:33 2022 +0200 wifi: mac80211: correct link config data in tracing We need to no longer use bss_conf here, but the per-link data. Signed-off-by: Johannes Berg net/mac80211/trace.h | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) commit 40a27ea07949a022a083de28da99f8f472242e2e Author: Johannes Berg Date: Mon May 30 23:52:41 2022 +0200 wifi: mac80211: make ieee80211_he_cap_ie_to_sta_he_cap() MLO-aware Add the link_id parameter and adjust the code accordingly. Signed-off-by: Johannes Berg net/mac80211/cfg.c | 2 +- net/mac80211/he.c | 16 +++++++++------- net/mac80211/ieee80211_i.h | 2 +- net/mac80211/mesh_plink.c | 2 +- net/mac80211/mlme.c | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) commit e9aac179ad4526afa3190856b71aa41decb6dc6a Author: Johannes Berg Date: Mon May 30 23:45:04 2022 +0200 wifi: mac80211: make some SMPS code MLD-aware Start making some SMPS related code MLD-aware. This isn't really done yet, but again cuts down our 'deflink' reliance. Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/dvm/lib.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 2 +- drivers/net/wireless/realtek/rtw88/main.c | 4 ++-- include/net/mac80211.h | 3 ++- net/mac80211/cfg.c | 19 +++++++++++------ net/mac80211/debugfs_netdev.c | 2 +- net/mac80211/ht.c | 29 ++++++++++++++------------ net/mac80211/ieee80211_i.h | 4 +++- net/mac80211/iface.c | 2 +- net/mac80211/mlme.c | 2 +- net/mac80211/util.c | 5 +++-- 11 files changed, 45 insertions(+), 31 deletions(-) commit 6b41f832a26e41d82b751afc4bfc3ce8034d68d0 Author: Johannes Berg Date: Mon May 30 23:34:04 2022 +0200 wifi: mac80211: HT: make ieee80211_ht_cap_ie_to_sta_ht_cap() MLO-aware Update ieee80211_ht_cap_ie_to_sta_ht_cap() to handle per-link data. Signed-off-by: Johannes Berg net/mac80211/cfg.c | 2 +- net/mac80211/ht.c | 13 +++++++------ net/mac80211/ibss.c | 2 +- net/mac80211/ieee80211_i.h | 2 +- net/mac80211/mesh_plink.c | 2 +- net/mac80211/mlme.c | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) commit 2b4ad30946d3117819d9a78d58a99b7c3de3ee91 Author: Johannes Berg Date: Mon May 30 23:22:19 2022 +0200 wifi: mac80211: add link_id to eht.c code for MLO Update the code in eht.c and add the link_id parameter where necessary. Signed-off-by: Johannes Berg net/mac80211/cfg.c | 2 +- net/mac80211/eht.c | 12 ++++++++---- net/mac80211/ieee80211_i.h | 3 ++- net/mac80211/mlme.c | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) commit afe0d181905ed03c2379fcb81d423704f59f8788 Author: Johannes Berg Date: Mon May 30 23:22:19 2022 +0200 wifi: mac80211: add link_id to vht.c code for MLO Update the code in vht.c and add the link_id parameter where necessary. Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- include/net/mac80211.h | 3 +- net/mac80211/cfg.c | 5 +- net/mac80211/ibss.c | 2 +- net/mac80211/ieee80211_i.h | 18 ++-- net/mac80211/iface.c | 6 +- net/mac80211/mesh_plink.c | 2 +- net/mac80211/mlme.c | 6 +- net/mac80211/rate.c | 2 +- net/mac80211/rx.c | 2 +- net/mac80211/tdls.c | 2 +- net/mac80211/vht.c | 122 ++++++++++++---------- 12 files changed, 92 insertions(+), 80 deletions(-) commit 4b41b2ef9e0d044528062eddbf34589da95c01bc Author: Johannes Berg Date: Mon May 30 23:01:50 2022 +0200 wifi: mac80211: refactor some link setup code We don't need to setup lists and work structs every time we switch the interface type, factor that out into a new ieee80211_link_init() function and use it. Signed-off-by: Johannes Berg net/mac80211/iface.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit 762623a6a422198c6b39ea099cc8f80bae1767e9 Author: Johannes Berg Date: Mon May 30 22:52:14 2022 +0200 wifi: mac80211: validate some driver features for MLO If MLO is enabled by the driver then validate a set of capabilities that mac80211 will initially not support in MLO. This might change if features are implemented. Signed-off-by: Johannes Berg net/mac80211/main.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit ec7a04073d3b31c03a9ad00e0709ffd78b5cfd1b Author: Johannes Berg Date: Mon May 30 22:36:30 2022 +0200 wifi: mac80211: use IEEE80211_MLD_MAX_NUM_LINKS Remove MAX_STA_LINKS and use IEEE80211_MLD_MAX_NUM_LINKS instead to unify between the station and other data structures. Signed-off-by: Johannes Berg include/net/mac80211.h | 4 +--- net/mac80211/sta_info.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) commit 246b39e4a1ba5ad77edfb2f28d147abc5e2bb0a7 Author: Johannes Berg Date: Mon May 30 21:31:37 2022 +0200 wifi: mac80211: refactor some sta_info link handling Refactor the code a bit to initialize a link belonging to a station, and (later) free all allocated links. Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 79 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 23 deletions(-) commit 2a5ccbeec0f226c3a1099aac74069d89ea119e01 Author: Johannes Berg Date: Mon May 30 21:28:31 2022 +0200 wifi: mac80211: remove sta_info_tx_streams() The function is unused since commit 52b4810bed83 ("mac80211: Remove support for changing AP SMPS mode") so we can just remove it. Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 35 ----------------------------------- net/mac80211/sta_info.h | 1 - 2 files changed, 36 deletions(-) commit b4f85443c17c7edb49c82fc1d28d26860c8c850d Author: Johannes Berg Date: Mon May 30 18:35:23 2022 +0200 wifi: mac80211: make channel context code MLO-aware Make the channel context code MLO aware, along with some functions that it uses, so that the chan.c file is now MLD-clean and no longer uses deflink/bss_conf/etc. Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath10k/mac.c | 2 + drivers/net/wireless/ath/ath11k/mac.c | 2 + drivers/net/wireless/ath/ath9k/main.c | 2 + drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 + drivers/net/wireless/mac80211_hwsim.c | 2 + drivers/net/wireless/silabs/wfx/sta.c | 2 + drivers/net/wireless/silabs/wfx/sta.h | 2 + drivers/net/wireless/ti/wlcore/main.c | 2 + include/net/mac80211.h | 4 + net/mac80211/cfg.c | 52 +- net/mac80211/chan.c | 642 +++++++++++++--------- net/mac80211/debug.h | 14 + net/mac80211/driver-ops.h | 8 +- net/mac80211/eht.c | 4 +- net/mac80211/he.c | 6 +- net/mac80211/ibss.c | 8 +- net/mac80211/ieee80211_i.h | 51 +- net/mac80211/iface.c | 15 +- net/mac80211/mesh_plink.c | 4 +- net/mac80211/mlme.c | 28 +- net/mac80211/ocb.c | 6 +- net/mac80211/rate.c | 8 +- net/mac80211/rate.h | 7 +- net/mac80211/rx.c | 8 +- net/mac80211/tdls.c | 4 +- net/mac80211/trace.h | 17 +- net/mac80211/util.c | 39 +- net/mac80211/vht.c | 36 +- 28 files changed, 586 insertions(+), 391 deletions(-) commit 7fc83a2ba2d54780690d871d03d0d8e75868a803 Author: Johannes Berg Date: Mon May 30 14:18:09 2022 +0200 wifi: mac80211: pass link ID where already present In a few cases we already have the link ID in the APIs, pass it already even if it cannot be non-zero yet. Signed-off-by: Johannes Berg net/mac80211/cfg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8e14130d3faf7b6b0fc57b530bb601cd9d6a1dab Author: Johannes Berg Date: Mon May 30 13:09:28 2022 +0200 wifi: mac80211: add per-link configuration pointer Add pointers so we can start using link_id throughout the code, even if for now only link ID 0 is valid, pointing to the "built-in" bss_conf, which is used by drivers that are not aware of MLD. Signed-off-by: Johannes Berg include/net/mac80211.h | 3 +++ net/mac80211/ieee80211_i.h | 1 + net/mac80211/iface.c | 23 +++++++++++++++++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) commit 7b7090b4c6a906cc7c3e2a460335f705b93f4506 Author: Johannes Berg Date: Tue May 24 10:55:56 2022 +0200 wifi: mac80211: split bss_info_changed method Split the bss_info_changed method to vif_cfg_changed and link_info_changed, with the latter getting a link ID. Also change the 'changed' parameter to u64 already, we know we need that. Signed-off-by: Johannes Berg drivers/net/wireless/admtek/adm8211.c | 2 +- drivers/net/wireless/ath/ar5523/ar5523.c | 2 +- drivers/net/wireless/ath/ath10k/mac.c | 2 +- drivers/net/wireless/ath/ath11k/mac.c | 2 +- drivers/net/wireless/ath/ath5k/mac80211-ops.c | 2 +- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 2 +- drivers/net/wireless/ath/ath9k/main.c | 2 +- drivers/net/wireless/ath/carl9170/main.c | 2 +- drivers/net/wireless/ath/wcn36xx/main.c | 4 +- drivers/net/wireless/atmel/at76c50x-usb.c | 2 +- drivers/net/wireless/broadcom/b43/main.c | 4 +- drivers/net/wireless/broadcom/b43legacy/main.c | 2 +- .../broadcom/brcm80211/brcmsmac/mac80211_if.c | 2 +- drivers/net/wireless/intel/iwlegacy/common.c | 6 +- drivers/net/wireless/intel/iwlegacy/common.h | 2 +- drivers/net/wireless/intel/iwlwifi/dvm/agn.h | 2 +- drivers/net/wireless/intel/iwlwifi/dvm/rxon.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 6 +- drivers/net/wireless/intersil/p54/main.c | 2 +- drivers/net/wireless/mac80211_hwsim.c | 4 +- drivers/net/wireless/marvell/libertas_tf/main.c | 2 +- drivers/net/wireless/marvell/mwl8k.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7603/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x02.h | 2 +- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 2 +- drivers/net/wireless/mediatek/mt7601u/main.c | 2 +- drivers/net/wireless/purelifi/plfxlc/mac.c | 4 +- drivers/net/wireless/ralink/rt2x00/rt2x00.h | 2 +- drivers/net/wireless/ralink/rt2x00/rt2x00mac.c | 2 +- drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c | 2 +- drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 2 +- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +- drivers/net/wireless/realtek/rtlwifi/core.c | 2 +- drivers/net/wireless/realtek/rtw88/mac80211.c | 2 +- drivers/net/wireless/realtek/rtw89/mac80211.c | 2 +- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 2 +- drivers/net/wireless/silabs/wfx/sta.c | 2 +- drivers/net/wireless/silabs/wfx/sta.h | 2 +- drivers/net/wireless/st/cw1200/sta.c | 4 +- drivers/net/wireless/st/cw1200/sta.h | 2 +- drivers/net/wireless/ti/wl1251/main.c | 2 +- drivers/net/wireless/ti/wlcore/main.c | 2 +- drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 4 +- drivers/staging/vt6655/device_main.c | 2 +- drivers/staging/vt6656/main_usb.c | 2 +- include/net/mac80211.h | 28 ++++- net/mac80211/cfg.c | 31 ++--- net/mac80211/chan.c | 9 +- net/mac80211/driver-ops.h | 35 ++++-- net/mac80211/ibss.c | 2 +- net/mac80211/ieee80211_i.h | 6 +- net/mac80211/iface.c | 5 +- net/mac80211/main.c | 84 ++++++++++++- net/mac80211/mesh.c | 6 +- net/mac80211/mlme.c | 16 +-- net/mac80211/offchannel.c | 8 +- net/mac80211/sta_info.c | 2 +- net/mac80211/tdls.c | 2 +- net/mac80211/trace.h | 138 +++++++++++++-------- net/mac80211/util.c | 4 +- net/mac80211/vht.c | 2 +- 64 files changed, 324 insertions(+), 170 deletions(-) commit bfd8403adddd09f32033a14bf25be398291e7881 Author: Johannes Berg Date: Mon May 16 15:00:15 2022 +0200 wifi: mac80211: reorg some iface data structs for MLD Start reorganizing interface related data structures toward MLD. The most complex part here is for the keys, since we have to split the various kinds of GTKs off to the link but still need to use (for WEP) the other keys as a fallback even for multicast frames. Signed-off-by: Johannes Berg net/mac80211/agg-rx.c | 4 +- net/mac80211/agg-tx.c | 2 +- net/mac80211/cfg.c | 165 +++++++++++----------- net/mac80211/chan.c | 95 ++++++------- net/mac80211/debugfs_key.c | 10 +- net/mac80211/debugfs_netdev.c | 12 +- net/mac80211/ethtool.c | 2 +- net/mac80211/ht.c | 15 +- net/mac80211/ibss.c | 10 +- net/mac80211/ieee80211_i.h | 173 ++++++++++++----------- net/mac80211/iface.c | 44 +++--- net/mac80211/key.c | 38 ++++-- net/mac80211/mlme.c | 310 +++++++++++++++++++++--------------------- net/mac80211/ocb.c | 4 +- net/mac80211/offchannel.c | 6 +- net/mac80211/rx.c | 25 ++-- net/mac80211/sta_info.c | 5 +- net/mac80211/status.c | 2 +- net/mac80211/tdls.c | 12 +- net/mac80211/tx.c | 61 ++++----- net/mac80211/util.c | 22 ++- net/mac80211/wme.c | 3 +- 22 files changed, 534 insertions(+), 486 deletions(-) commit f276e20b182dbfc069d192fda259d85feea71143 Author: Johannes Berg Date: Tue May 10 17:05:04 2022 +0200 wifi: mac80211: move interface config to new struct We'll use bss_conf for per-link configuration later, so move out all the non-link-specific data out into a new struct ieee80211_vif_cfg used in the vif. Some adjustments were done with the following spatch: @@ expression sdata; struct ieee80211_vif *vifp; identifier var = { assoc, ibss_joined, aid, arp_addr_list, arp_addr_cnt, ssid, ssid_len, s1g, ibss_creator }; @@ ( -sdata->vif.bss_conf.var +sdata->vif.cfg.var | -vifp->bss_conf.var +vifp->cfg.var ) @bss_conf@ struct ieee80211_bss_conf *bss_conf; identifier var = { assoc, ibss_joined, aid, arp_addr_list, arp_addr_cnt, ssid, ssid_len, s1g, ibss_creator }; @@ -bss_conf->var +vif_cfg->var (though more manual fixups were needed, e.g. replacing "vif_cfg->" by "vif->cfg." in many files.) Signed-off-by: Johannes Berg drivers/net/wireless/ath/ar5523/ar5523.c | 10 ++-- drivers/net/wireless/ath/ath10k/mac.c | 29 +++++----- drivers/net/wireless/ath/ath11k/mac.c | 22 ++++---- drivers/net/wireless/ath/ath5k/mac80211-ops.c | 12 ++-- drivers/net/wireless/ath/ath9k/beacon.c | 11 ++-- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 16 +++--- drivers/net/wireless/ath/ath9k/main.c | 8 +-- drivers/net/wireless/ath/carl9170/main.c | 2 +- drivers/net/wireless/ath/wcn36xx/main.c | 16 +++--- drivers/net/wireless/ath/wcn36xx/smd.c | 2 +- .../broadcom/brcm80211/brcmsmac/mac80211_if.c | 12 ++-- drivers/net/wireless/intel/iwlegacy/3945-mac.c | 6 +- drivers/net/wireless/intel/iwlegacy/4965.c | 6 +- drivers/net/wireless/intel/iwlegacy/common.c | 10 ++-- drivers/net/wireless/intel/iwlwifi/dvm/rxon.c | 22 ++++---- drivers/net/wireless/intel/iwlwifi/mvm/coex.c | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 2 +- .../net/wireless/intel/iwlwifi/mvm/ftm-initiator.c | 12 ++-- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 12 ++-- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 28 ++++----- .../net/wireless/intel/iwlwifi/mvm/offloading.c | 6 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/power.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/quota.c | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/sf.c | 6 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 2 +- .../net/wireless/intel/iwlwifi/mvm/time-event.c | 8 +-- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 4 +- drivers/net/wireless/intersil/p54/main.c | 4 +- drivers/net/wireless/mac80211_hwsim.c | 6 +- drivers/net/wireless/marvell/mwl8k.c | 10 ++-- drivers/net/wireless/mediatek/mt76/mt7603/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 2 +- .../net/wireless/mediatek/mt76/mt76_connac_mcu.c | 10 ++-- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 2 +- drivers/net/wireless/mediatek/mt7601u/phy.c | 9 ++- drivers/net/wireless/ralink/rt2x00/rt2x00config.c | 4 +- drivers/net/wireless/ralink/rt2x00/rt2x00mac.c | 2 +- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 10 ++-- drivers/net/wireless/realtek/rtlwifi/core.c | 4 +- drivers/net/wireless/realtek/rtw88/bf.c | 2 +- drivers/net/wireless/realtek/rtw88/mac80211.c | 4 +- drivers/net/wireless/realtek/rtw88/main.c | 13 +++-- drivers/net/wireless/realtek/rtw89/cam.c | 2 +- drivers/net/wireless/realtek/rtw89/core.c | 2 +- drivers/net/wireless/realtek/rtw89/core.h | 2 +- drivers/net/wireless/realtek/rtw89/mac80211.c | 2 +- drivers/net/wireless/realtek/rtw89/phy.c | 4 +- drivers/net/wireless/rsi/rsi_91x_core.c | 3 +- drivers/net/wireless/rsi/rsi_91x_hal.c | 7 +-- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 31 +++++----- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 3 +- drivers/net/wireless/silabs/wfx/hif_tx.c | 12 ++-- drivers/net/wireless/silabs/wfx/sta.c | 24 ++++---- drivers/net/wireless/st/cw1200/sta.c | 36 ++++++------ drivers/net/wireless/st/cw1200/txrx.c | 4 +- drivers/net/wireless/ti/wl1251/main.c | 8 +-- drivers/net/wireless/ti/wlcore/cmd.c | 4 +- drivers/net/wireless/ti/wlcore/main.c | 37 ++++++------ drivers/staging/vt6655/device_main.c | 6 +- drivers/staging/vt6656/main_usb.c | 4 +- include/net/mac80211.h | 66 +++++++++++++--------- net/mac80211/cfg.c | 10 ++-- net/mac80211/chan.c | 2 +- net/mac80211/debugfs_netdev.c | 6 +- net/mac80211/ibss.c | 26 ++++----- net/mac80211/iface.c | 2 +- net/mac80211/main.c | 10 ++-- net/mac80211/mlme.c | 26 +++++---- net/mac80211/offchannel.c | 2 +- net/mac80211/scan.c | 2 +- net/mac80211/tdls.c | 4 +- net/mac80211/trace.h | 49 +++++++++------- net/mac80211/tx.c | 2 +- net/mac80211/util.c | 2 +- 79 files changed, 402 insertions(+), 368 deletions(-) commit d0a9123ef548def5c8880e83e5df948eb5b55c62 Author: Johannes Berg Date: Tue May 10 13:26:44 2022 +0200 wifi: mac80211: move some future per-link data to bss_conf To add MLD, reuse the bss_conf structure later for per-link information, so move some things into it that are per link. Most transformations were done with the following spatch: @@ expression sdata; identifier var = { chanctx_conf, mu_mimo_owner, csa_active, color_change_active, color_change_color }; @@ -sdata->vif.var +sdata->vif.bss_conf.var @@ struct ieee80211_vif *vif; identifier var = { chanctx_conf, mu_mimo_owner, csa_active, color_change_active, color_change_color }; @@ -vif->var +vif->bss_conf.var Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath10k/htt_rx.c | 2 +- drivers/net/wireless/ath/ath10k/mac.c | 8 ++--- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 2 +- drivers/net/wireless/ath/ath10k/wmi.c | 2 +- drivers/net/wireless/ath/ath11k/mac.c | 12 +++---- drivers/net/wireless/ath/ath11k/wmi.c | 4 +-- drivers/net/wireless/ath/ath9k/beacon.c | 2 +- drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/coex.c | 6 ++-- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 2 +- .../net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 4 +-- .../net/wireless/intel/iwlwifi/mvm/ftm-responder.c | 4 +-- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 10 +++--- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 10 +++--- drivers/net/wireless/intel/iwlwifi/mvm/power.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/tdls.c | 4 +-- .../net/wireless/intel/iwlwifi/mvm/time-event.c | 4 +-- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 2 +- drivers/net/wireless/mac80211_hwsim.c | 22 +++++++----- drivers/net/wireless/mediatek/mt76/mac80211.c | 4 +-- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 10 +++--- drivers/net/wireless/ti/wlcore/main.c | 2 +- include/net/mac80211.h | 40 ++++++++++----------- net/mac80211/airtime.c | 4 +-- net/mac80211/cfg.c | 40 ++++++++++----------- net/mac80211/chan.c | 39 ++++++++++---------- net/mac80211/driver-ops.h | 2 +- net/mac80211/ethtool.c | 4 +-- net/mac80211/ibss.c | 10 +++--- net/mac80211/ieee80211_i.h | 6 ++-- net/mac80211/iface.c | 8 ++--- net/mac80211/main.c | 4 +-- net/mac80211/mesh.c | 14 ++++---- net/mac80211/mlme.c | 42 +++++++++++----------- net/mac80211/ocb.c | 3 +- net/mac80211/offchannel.c | 6 ++-- net/mac80211/rate.c | 5 +-- net/mac80211/rx.c | 2 +- net/mac80211/sta_info.c | 2 +- net/mac80211/tdls.c | 6 ++-- net/mac80211/tx.c | 28 +++++++-------- net/mac80211/util.c | 16 ++++----- net/mac80211/vht.c | 6 ++-- 45 files changed, 209 insertions(+), 202 deletions(-) commit 7b0a0e3c3a88260b6fcb017e49f198463aa62ed1 Author: Johannes Berg Date: Thu Apr 14 16:50:57 2022 +0200 wifi: cfg80211: do some rework towards MLO link APIs In order to support multi-link operation with multiple links, start adding some APIs. The notable addition here is to have the link ID in a new nl80211 attribute, that will be used to differentiate the links in many nl80211 operations. So far, this patch adds the netlink NL80211_ATTR_MLO_LINK_ID attribute (as well as the NL80211_ATTR_MLO_LINKS attribute) and plugs it through the system in some places, checking the validity etc. along with other infrastructure needed for it. For now, I've decided to include only the over-the-air link ID in the API. I know we discussed that we eventually need to have to have other ways of identifying a link, but for local AP mode and auth/assoc commands as well as set_key etc. we'll use the OTA ID. Also included in this patch is some refactoring of the data structures in struct wireless_dev, splitting for the first time the data into type dependent pieces, to make reasoning about these things easier. Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath6kl/cfg80211.c | 6 +- drivers/net/wireless/ath/wil6210/cfg80211.c | 9 +- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 4 +- drivers/net/wireless/marvell/libertas/mesh.c | 10 +- drivers/net/wireless/marvell/mwifiex/11h.c | 2 +- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 18 +- drivers/net/wireless/microchip/wilc1000/cfg80211.c | 3 +- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 14 +- drivers/net/wireless/quantenna/qtnfmac/commands.c | 2 +- drivers/net/wireless/quantenna/qtnfmac/event.c | 15 +- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 4 +- include/linux/ieee80211.h | 3 + include/net/cfg80211.h | 99 +++- include/uapi/linux/nl80211.h | 28 + net/mac80211/cfg.c | 8 +- net/mac80211/mlme.c | 2 +- net/wireless/ap.c | 46 +- net/wireless/chan.c | 196 +++++-- net/wireless/core.c | 28 +- net/wireless/core.h | 13 +- net/wireless/ibss.c | 57 +- net/wireless/mesh.c | 31 +- net/wireless/mlme.c | 74 +-- net/wireless/nl80211.c | 623 +++++++++++++++------ net/wireless/ocb.c | 5 +- net/wireless/rdev-ops.h | 32 +- net/wireless/reg.c | 139 +++-- net/wireless/scan.c | 8 +- net/wireless/sme.c | 102 ++-- net/wireless/trace.h | 86 ++- net/wireless/util.c | 44 +- net/wireless/wext-compat.c | 48 +- net/wireless/wext-sme.c | 29 +- 33 files changed, 1255 insertions(+), 533 deletions(-) commit 92ea8df110b8ca92f9664ec7bd76dea109115348 Author: Johannes Berg Date: Thu May 19 17:57:53 2022 +0200 wifi: mac80211: reject WEP or pairwise keys with key ID > 3 We don't really care too much right now since our data structures are set up to not have a problem with this, but clearly it's wrong to accept WEP and pairwise keys with key ID > 3. However, with MLD we need to split into per-link (GTK, IGTK, BIGTK) and per interface/MLD (including WEP) keys so make sure this is not a problem. Signed-off-by: Johannes Berg net/mac80211/key.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 98e152c19b66cfe44e1924d2554626a25758f1ea Author: Ard Biesheuvel Date: Fri Jun 17 18:12:06 2022 +0200 brcmfmac: Switch to appropriate helper to load EFI variable contents Avoid abusing the efivar layer by invoking it with locally constructed efivar_entry instances, and instead, just call the EFI routines directly if available. Acked-by: Kalle Valo Signed-off-by: Ard Biesheuvel .../broadcom/brcm80211/brcmfmac/firmware.c | 25 +++++++--------------- 1 file changed, 8 insertions(+), 17 deletions(-) commit 0c4bad7f47c4e5ff82c82fbdd4f4ab3105b98fc9 Author: Ard Biesheuvel Date: Fri Jun 17 19:00:06 2022 +0200 iwlwifi: Switch to proper EFI variable store interface Using half of the efivar API with locally baked efivar_entry instances is not the right way to use this API, and these uses impede planned work on the efivar layer itself. So switch to direct EFI variable store accesses: we don't need the efivar layer anyway. Acked-by: Kalle Valo Signed-off-by: Ard Biesheuvel drivers/net/wireless/intel/iwlwifi/fw/uefi.c | 96 ++++++++++------------------ 1 file changed, 32 insertions(+), 64 deletions(-) commit 38d4f74bc14847491d07bd745dc4a2c274f4987d Author: Ard Biesheuvel Date: Mon Jun 20 12:03:50 2022 +0200 media: atomisp_gmin_platform: stop abusing efivar API As the code comment already suggests, using the efivar API in this way is not how it is intended, and so let's switch to the right one, which is simply to call efi.get_variable() directly after checking whether or not the GetVariable() runtime service is supported. Acked-by: Greg Kroah-Hartman Signed-off-by: Ard Biesheuvel .../media/atomisp/pci/atomisp_gmin_platform.c | 27 +++++----------------- 1 file changed, 6 insertions(+), 21 deletions(-) commit 416581e486798cbe3e2b3306faee7d7e9bf3c3d4 Author: Ard Biesheuvel Date: Mon Jun 20 11:35:37 2022 +0200 efi: efibc: avoid efivar API for setting variables Avoid abusing the efivar API by passing locally instantiated efivar_entry structs into efivar_set_entry_safe(), rather than using the API as intended. Instead, just call efi.set_variable() directly. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/Kconfig | 1 + drivers/firmware/efi/efibc.c | 76 +++++++++++++++++--------------------------- 2 files changed, 30 insertions(+), 47 deletions(-) commit 3881ee0b1edce0ece72d24b7c74f46b73bd6dcba Author: Ard Biesheuvel Date: Fri Jun 17 10:34:48 2022 +0200 efi: avoid efivars layer when loading SSDTs from variables The efivars intermediate variable access layer provides an abstraction that permits the EFI variable store to be replaced by something else that implements a compatible interface, and caches all variables in the variable store for fast access via the efivarfs pseudo-filesystem. The SSDT override feature does not take advantage of either feature, as it is only used when the generic EFI implementation of efivars is used, and it traverses all variables only once to find the ones it is interested in, and frees all data structures that the efivars layer keeps right after. So in this case, let's just call EFI's code directly, using the function pointers in struct efi. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/efi.c | 103 ++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 62 deletions(-) commit 289a3ec0b5b9a2de6fc75633aa81f017792ecc99 Author: Sascha Hauer Date: Fri Jun 17 14:01:33 2022 +0200 ASoC: fsl_asrc_dma: Use dmaengine_terminate_async() dmaengine_terminate_all() is deprecated and should no longer be used. Use dmaengine_terminate_async() instead. This involves no functional change since both functions do the same. After dmaengine_terminate_async() dmaengine_synchronize() must be called to make sure the channel has really stopped before the underlying memory is freed. This is done implicitly by dma_release_channel() called from the .hw_free hook. Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20220617120133.4011846-1-s.hauer@pengutronix.de Signed-off-by: Mark Brown sound/soc/fsl/fsl_asrc_dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ad9894ac6cc1c1f7c36451d508d69f6ba677834a Author: Srinivas Kandagatla Date: Fri Jun 17 14:02:30 2022 -0700 MAINTAINERS: update ASoC Qualcomm maintainer email-id Update Banajit's email address from codeaurora.org to quicinc.com, as codeaurora.org is not in use anymore. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220617210230.7685-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44f362c2cc6dd0c5e3cb499c4fb4ed45b63a6196 Author: Judy Hsiao Date: Wed Jun 15 04:56:43 2022 +0000 ASoC: rockchip: i2s: switch BCLK to GPIO We discoverd that the state of BCLK on, LRCLK off and SD_MODE on may cause the speaker melting issue. Removing LRCLK while BCLK is present can cause unexpected output behavior including a large DC output voltage as described in the Max98357a datasheet. In order to: 1. prevent BCLK from turning on by other component. 2. keep BCLK and LRCLK being present at the same time This patch switches BCLK to GPIO func before LRCLK output, and configures BCLK func back during LRCLK is output. Without this fix, BCLK is turned on 11 ms earlier than LRCK by the da7219. With this fix, BCLK is turned on only 0.4 ms earlier than LRCK by the rockchip codec. Signed-off-by: Judy Hsiao Link: https://lore.kernel.org/r/20220615045643.3137287-1-judyhsiao@chromium.org Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 160 ++++++++++++++++++++++++++++++-------- 1 file changed, 129 insertions(+), 31 deletions(-) commit 1db43c8ad90ce07311a3ef9af7ace758d79224f9 Author: Javier Martinez Canillas Date: Thu Jun 16 09:34:35 2022 +0200 regmap: Wire up regmap_config provided bulk write in missed functions There are some functions that were missed by commit d77e74561368 ("regmap: Add bulk read/write callbacks into regmap_config") when support to define bulk read/write callbacks in regmap_config was introduced. The regmap_bulk_write() and regmap_noinc_write() functions weren't changed to use the added map->write instead of the map->bus->write handler. Also, the regmap_can_raw_write() was not modified to take map->write into account. So will only return true if a bus with a .write callback is set. Fixes: d77e74561368 ("regmap: Add bulk read/write callbacks into regmap_config") Signed-off-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20220616073435.1988219-4-javierm@redhat.com Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit f6e5c3850d1174bf3ca53457d64e6665f48c9041 Author: Javier Martinez Canillas Date: Thu Jun 16 09:34:34 2022 +0200 regmap: Make regmap_noinc_read() return -ENOTSUPP if map->read isn't set Before adding support to define bulk read/write callbacks in regmap_config by the commit d77e74561368 ("regmap: Add bulk read/write callbacks into regmap_config"), the regmap_noinc_read() function returned an errno early a map->bus->read callback wasn't set. But that commit dropped the check and now a call to _regmap_raw_read() is attempted even when bulk read operations are not supported. That function checks for map->read anyways but there's no point to continue if the read can't succeed. Also is a fragile assumption to make so is better to make it fail earlier. Fixes: d77e74561368 ("regmap: Add bulk read/write callbacks into regmap_config") Signed-off-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20220616073435.1988219-3-javierm@redhat.com Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 3 +++ 1 file changed, 3 insertions(+) commit 5ac01e023a1b0492e159ad2f6734e0a350c1b6b6 Author: Javier Martinez Canillas Date: Thu Jun 16 09:34:33 2022 +0200 regmap: Re-introduce bulk read support check in regmap_bulk_read() Support for drivers to define bulk read/write callbacks in regmap_config was introduced by the commit d77e74561368 ("regmap: Add bulk read/write callbacks into regmap_config"), but this commit wrongly dropped a check in regmap_bulk_read() to determine whether bulk reads can be done or not. Before that commit, it was checked if map->bus was set. Now has to check if a map->read callback has been set. Fixes: d77e74561368 ("regmap: Add bulk read/write callbacks into regmap_config") Signed-off-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20220616073435.1988219-2-javierm@redhat.com Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e20918f6d11253d62b110e8d16b17cc9bf82d832 Author: Dongliang Mu Date: Tue Jun 14 21:34:58 2022 +0800 x86: kvm: remove NULL check before kfree kfree can handle NULL pointer as its argument. According to coccinelle isnullfree check, remove NULL check before kfree operation. Signed-off-by: Dongliang Mu Message-Id: <20220614133458.147314-1-dzm91@hust.edu.cn> Signed-off-by: Paolo Bonzini arch/x86/kernel/kvm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 943dfea8f166d62657057170dbe8667ec96247ca Author: Sean Christopherson Date: Fri Apr 29 01:04:07 2022 +0000 KVM: Do not zero initialize 'pfn' in hva_to_pfn() Drop the unnecessary initialization of the local 'pfn' variable in hva_to_pfn(). First and foremost, '0' is not an invalid pfn, it's a perfectly valid pfn on most architectures. I.e. if hva_to_pfn() were to return an "uninitializd" pfn, it would actually be interpeted as a legal pfn by most callers. Second, hva_to_pfn() can't return an uninitialized pfn as hva_to_pfn() explicitly sets pfn to an error value (or returns an error value directly) if a helper returns failure, and all helpers set the pfn on success. The zeroing of 'pfn' was introduced by commit 2fc843117d64 ("KVM: reorganize hva_to_pfn"), probably to avoid "uninitialized variable" warnings on statements that return pfn. However, no compiler seems to produce them, making the initialization unnecessary. Signed-off-by: Sean Christopherson Message-Id: <20220429010416.2788472-2-seanjc@google.com> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d49f08c2e08c1f0de1bb0f2e1307ec969451729 Author: Sean Christopherson Date: Fri Apr 29 01:04:16 2022 +0000 KVM: x86/mmu: Shove refcounted page dependency into host_pfn_mapping_level() Move the check that restricts mapping huge pages into the guest to pfns that are backed by refcounted 'struct page' memory into the helper that actually "requires" a 'struct page', host_pfn_mapping_level(). In addition to deduplicating code, moving the check to the helper eliminates the subtle requirement that the caller check that the incoming pfn is backed by a refcounted struct page, and as an added bonus avoids an extra pfn_to_page() lookup. Note, the is_error_noslot_pfn() check in kvm_mmu_hugepage_adjust() needs to stay where it is, as it guards against dereferencing a NULL memslot in the kvm_slot_dirty_track_enabled() that follows. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220429010416.2788472-11-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 14 +++++++++++--- arch/x86/kvm/mmu/tdp_mmu.c | 4 ---- 2 files changed, 11 insertions(+), 7 deletions(-) commit b14b2690c50e02145bb867dfcde8845eb17aa8a4 Author: Sean Christopherson Date: Fri Apr 29 01:04:15 2022 +0000 KVM: Rename/refactor kvm_is_reserved_pfn() to kvm_pfn_to_refcounted_page() Rename and refactor kvm_is_reserved_pfn() to kvm_pfn_to_refcounted_page() to better reflect what KVM is actually checking, and to eliminate extra pfn_to_page() lookups. The kvm_release_pfn_*() an kvm_try_get_pfn() helpers in particular benefit from "refouncted" nomenclature, as it's not all that obvious why KVM needs to get/put refcounts for some PG_reserved pages (ZERO_PAGE and ZONE_DEVICE). Add a comment to call out that the list of exceptions to PG_reserved is all but guaranteed to be incomplete. The list has mostly been compiled by people throwing noodles at KVM and finding out they stick a little too well, e.g. the ZERO_PAGE's refcount overflowed and ZONE_DEVICE pages didn't get freed. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220429010416.2788472-10-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 15 ++++++----- arch/x86/kvm/mmu/tdp_mmu.c | 2 +- include/linux/kvm_host.h | 2 +- virt/kvm/kvm_main.c | 66 ++++++++++++++++++++++++++++++++++++---------- 4 files changed, 63 insertions(+), 22 deletions(-) commit 284dc49307738d2a897fd375431f741213cd0f27 Author: Sean Christopherson Date: Fri Apr 29 01:04:14 2022 +0000 KVM: Take a 'struct page', not a pfn in kvm_is_zone_device_page() Operate on a 'struct page' instead of a pfn when checking if a page is a ZONE_DEVICE page, and rename the helper accordingly. Generally speaking, KVM doesn't actually care about ZONE_DEVICE memory, i.e. shouldn't do anything special for ZONE_DEVICE memory. Rather, KVM wants to treat ZONE_DEVICE memory like regular memory, and the need to identify ZONE_DEVICE memory only arises as an exception to PG_reserved pages. In other words, KVM should only ever check for ZONE_DEVICE memory after KVM has already verified that there is a struct page associated with the pfn. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220429010416.2788472-9-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 5 +++-- include/linux/kvm_host.h | 2 +- virt/kvm/kvm_main.c | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) commit b1624f99aa8fedafcabf1b92fa51ed88dde14acb Author: Sean Christopherson Date: Fri Apr 29 01:04:13 2022 +0000 KVM: Remove kvm_vcpu_gfn_to_page() and kvm_vcpu_gpa_to_page() Drop helpers to convert a gfn/gpa to a 'struct page' in the context of a vCPU. KVM doesn't require that guests be backed by 'struct page' memory, thus any use of helpers that assume 'struct page' is bound to be flawed, as was the case for the recently removed last user in x86's nested VMX. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220429010416.2788472-8-seanjc@google.com> Signed-off-by: Paolo Bonzini include/linux/kvm_host.h | 7 ------- virt/kvm/kvm_main.c | 31 +++++++++++-------------------- 2 files changed, 11 insertions(+), 27 deletions(-) commit 6573a6910ce46ece35c1aa4bd38b70884553cd21 Author: Sean Christopherson Date: Fri Apr 29 01:04:12 2022 +0000 KVM: Don't WARN if kvm_pfn_to_page() encounters a "reserved" pfn Drop a WARN_ON() if kvm_pfn_to_page() encounters a "reserved" pfn, which in this context means a struct page that has PG_reserved but is not a/the ZERO_PAGE and is not a ZONE_DEVICE page. The usage, via gfn_to_page(), in x86 is safe as gfn_to_page() is used only to retrieve a page from KVM-controlled memslot, but the usage in PPC and s390 operates on arbitrary gfns and thus memslots that can be backed by incompatible memory. Signed-off-by: Sean Christopherson Message-Id: <20220429010416.2788472-7-seanjc@google.com> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit fe1911aa443ed774df46607970bed58d9769db41 Author: Sean Christopherson Date: Fri Apr 29 01:04:11 2022 +0000 KVM: nVMX: Use kvm_vcpu_map() to get/pin vmcs12's APIC-access page Use kvm_vcpu_map() to get/pin the backing for vmcs12's APIC-access page, there's no reason it has to be restricted to 'struct page' backing. The APIC-access page actually doesn't need to be backed by anything, which is ironically why it got left behind by the series which introduced kvm_vcpu_map()[1]; the plan was to shove a dummy pfn into vmcs02[2], but that code never got merged. Switching the APIC-access page to kvm_vcpu_map() doesn't preclude using a magic pfn in the future, and will allow a future patch to drop kvm_vcpu_gpa_to_page(). [1] https://lore.kernel.org/all/1547026933-31226-1-git-send-email-karahmed@amazon.de [2] https://lore.kernel.org/lkml/1543845551-4403-1-git-send-email-karahmed@amazon.de Signed-off-by: Sean Christopherson Message-Id: <20220429010416.2788472-6-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 39 ++++++++++++--------------------------- arch/x86/kvm/vmx/vmx.h | 2 +- 2 files changed, 13 insertions(+), 28 deletions(-) commit 8e1c69149f27189cff93a0cfe9402e576d89ce29 Author: Sean Christopherson Date: Fri Apr 29 01:04:10 2022 +0000 KVM: Avoid pfn_to_page() and vice versa when releasing pages Invert the order of KVM's page/pfn release helpers so that the "inner" helper operates on a page instead of a pfn. As pointed out by Linus[*], converting between struct page and a pfn isn't necessarily cheap, and that's not even counting the overhead of is_error_noslot_pfn() and kvm_is_reserved_pfn(). Even if the checks were dirt cheap, there's no reason to convert from a page to a pfn and back to a page, just to mark the page dirty/accessed or to put a reference to the page. Opportunistically drop a stale declaration of kvm_set_page_accessed() from kvm_host.h (there was no implementation). No functional change intended. [*] https://lore.kernel.org/all/CAHk-=wifQimj2d6npq-wCi5onYPjzQg4vyO4tFcPJJZr268cRw@mail.gmail.com Signed-off-by: Sean Christopherson Message-Id: <20220429010416.2788472-5-seanjc@google.com> Signed-off-by: Paolo Bonzini include/linux/kvm_host.h | 1 - virt/kvm/kvm_main.c | 64 ++++++++++++++++++++++++++++++++---------------- 2 files changed, 43 insertions(+), 22 deletions(-) commit a1040b0d42acf69bb4f6dbdc54c2dcd78eea1de5 Author: Sean Christopherson Date: Fri Apr 29 01:04:09 2022 +0000 KVM: Don't set Accessed/Dirty bits for ZERO_PAGE Don't set Accessed/Dirty bits for a struct page with PG_reserved set, i.e. don't set A/D bits for the ZERO_PAGE. The ZERO_PAGE (or pages depending on the architecture) should obviously never be written, and similarly there's no point in marking it accessed as the page will never be swapped out or reclaimed. The comment in page-flags.h is quite clear that PG_reserved pages should be managed only by their owner, and strictly following that mandate also simplifies KVM's logic. Fixes: 7df003c85218 ("KVM: fix overflow of zero page refcount with ksm running") Signed-off-by: Sean Christopherson Message-Id: <20220429010416.2788472-4-seanjc@google.com> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 28b85ae06f64bf1c1adea68a2fbb31dc40cc060e Author: Sean Christopherson Date: Fri Apr 29 01:04:08 2022 +0000 KVM: Drop bogus "pfn != 0" guard from kvm_release_pfn() Remove a check from kvm_release_pfn() to bail if the provided @pfn is zero. Zero is a perfectly valid pfn on most architectures, and should not be used to indicate an error or an invalid pfn. The bogus check was added by commit 917248144db5 ("x86/kvm: Cache gfn to pfn translation"), which also did the bad thing of zeroing the pfn and gfn to mark a cache invalid. Thankfully, that bad behavior was axed by commit 357a18ad230f ("KVM: Kill kvm_map_gfn() / kvm_unmap_gfn() and gfn_to_pfn_cache"). Signed-off-by: Sean Christopherson Message-Id: <20220429010416.2788472-3-seanjc@google.com> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 3 --- 1 file changed, 3 deletions(-) commit 70e41c31bc7776b262cd9f524df3dfc2b5869a0a Author: Sean Christopherson Date: Tue Jun 14 23:33:28 2022 +0000 KVM: x86/mmu: Use common logic for computing the 32/64-bit base PA mask Use common logic for computing PT_BASE_ADDR_MASK for 32-bit, 64-bit, and EPT paging. Both PAGE_MASK and the new-common logic are supsersets of what is actually needed for 32-bit paging. PAGE_MASK sets bits 63:12 and the former GUEST_PT64_BASE_ADDR_MASK sets bits 51:12, so regardless of which value is used, the result will always be bits 31:12. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220614233328.3896033-9-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 2 -- arch/x86/kvm/mmu/paging.h | 9 --------- arch/x86/kvm/mmu/paging_tmpl.h | 4 +--- 3 files changed, 1 insertion(+), 14 deletions(-) commit f7384b8866b0b07f249130aa8b63135687626c5c Author: Sean Christopherson Date: Tue Jun 14 23:33:27 2022 +0000 KVM: x86/mmu: Truncate paging32's PT_BASE_ADDR_MASK to 32 bits Truncate paging32's PT_BASE_ADDR_MASK to a pt_element_t, i.e. to 32 bits. Ignoring PSE huge pages, the mask is only used in conjunction with gPTEs, which are 32 bits, and so the address is limited to bits 31:12. PSE huge pages encoded PA bits 39:32 in PTE bits 20:13, i.e. need custom logic to handle their funky encoding regardless of PT_BASE_ADDR_MASK. Note, PT_LVL_OFFSET_MASK is somewhat confusing in that it computes the offset of the _gfn_, not of the gpa, i.e. not having bits 63:32 set in PT_BASE_ADDR_MASK is again correct. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220614233328.3896033-8-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/paging_tmpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6b8ea6d43640ebfd1aeaa1faf1016d0bff7b8a0 Author: Paolo Bonzini Date: Wed Jun 15 10:15:56 2022 -0400 KVM: x86/mmu: Use common macros to compute 32/64-bit paging masks Dedup the code for generating (most of) the per-type PT_* masks in paging_tmpl.h. The relevant macros only vary based on the number of bits per level, and that smidge of info is already provided in a common form as PT_LEVEL_BITS. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220614233328.3896033-7-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/paging.h | 23 ----------------------- arch/x86/kvm/mmu/paging_tmpl.h | 25 +++++++++++-------------- 2 files changed, 11 insertions(+), 37 deletions(-) commit 2ca3129e8045b18eb15431b485d40c028fe8fb00 Author: Sean Christopherson Date: Tue Jun 14 23:33:25 2022 +0000 KVM: x86/mmu: Use separate namespaces for guest PTEs and shadow PTEs Separate the macros for KVM's shadow PTEs (SPTE) from guest 64-bit PTEs (PT64). SPTE and PT64 are _mostly_ the same, but the few differences are quite critical, e.g. *_BASE_ADDR_MASK must differentiate between host and guest physical address spaces, and SPTE_PERM_MASK (was PT64_PERM_MASK) is very much specific to SPTEs. Opportunistically (and temporarily) move most guest macros into paging.h to clearly associate them with shadow paging, and to ensure that they're not used as of this commit. A future patch will eliminate them entirely. Sadly, PT32_LEVEL_BITS is left behind in mmu_internal.h because it's needed for the quadrant calculation in kvm_mmu_get_page(). The quadrant calculation is hot enough (when using shadow paging with 32-bit guests) that adding a per-context helper is undesirable, and burying the computation in paging_tmpl.h with a forward declaration isn't exactly an improvement. Signed-off-by: Sean Christopherson Message-Id: <20220614233328.3896033-6-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.h | 5 ---- arch/x86/kvm/mmu/mmu.c | 60 ++++++++++++++++++++++-------------------- arch/x86/kvm/mmu/paging.h | 17 ++++++++++++ arch/x86/kvm/mmu/paging_tmpl.h | 6 ++--- arch/x86/kvm/mmu/spte.c | 2 +- arch/x86/kvm/mmu/spte.h | 27 +++++++++---------- arch/x86/kvm/mmu/tdp_iter.c | 6 ++--- arch/x86/kvm/mmu/tdp_mmu.c | 6 ++--- 8 files changed, 70 insertions(+), 59 deletions(-) commit 42c88ff893f06b6ab4eaeb2c37e513edf8c1943b Author: Sean Christopherson Date: Tue Jun 14 23:33:24 2022 +0000 KVM: x86/mmu: Dedup macros for computing various page table masks Provide common helper macros to generate various masks, shifts, etc... for 32-bit vs. 64-bit page tables. Only the inputs differ, the actual calculations are identical. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220614233328.3896033-5-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.h | 4 ++-- arch/x86/kvm/mmu/mmu.c | 14 +++++--------- arch/x86/kvm/mmu/mmu_internal.h | 14 ++++++++++++++ arch/x86/kvm/mmu/paging.h | 9 +++++---- arch/x86/kvm/mmu/spte.h | 7 +++---- 5 files changed, 29 insertions(+), 19 deletions(-) commit b3fcdb04a98035f55f7ba9e3c87d3c4eb2f95b4b Author: Sean Christopherson Date: Tue Jun 14 23:33:23 2022 +0000 KVM: x86/mmu: Bury 32-bit PSE paging helpers in paging_tmpl.h Move a handful of one-off macros and helpers for 32-bit PSE paging into paging_tmpl.h and hide them behind "PTTYPE == 32". Under no circumstance should anything but 32-bit shadow paging care about PSE paging. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220614233328.3896033-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.h | 5 ----- arch/x86/kvm/mmu/mmu.c | 7 ------- arch/x86/kvm/mmu/paging_tmpl.h | 18 +++++++++++++++++- 3 files changed, 17 insertions(+), 13 deletions(-) commit 1ae20e0b975caf8ff51511a89cce5e28ec3e4d70 Author: Sean Christopherson Date: Tue Jun 14 23:33:22 2022 +0000 KVM: VMX: Refactor 32-bit PSE PT creation to avoid using MMU macro Compute the number of PTEs to be filled for the 32-bit PSE page tables using the page size and the size of each entry. While using the MMU's PT32_ENT_PER_PAGE macro is arguably better in isolation, removing VMX's usage will allow a future namespacing cleanup to move the guest page table macros into paging_tmpl.h, out of the reach of code that isn't directly related to shadow paging. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220614233328.3896033-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8e1b9626746209c980ce3fbf9ec3fc86910873d Author: Sean Christopherson Date: Tue Jun 14 23:05:48 2022 +0000 KVM: x86: Use lapic_in_kernel() to query in-kernel APIC in APICv helper Use lapic_in_kernel() in kvm_vcpu_apicv_active() to take advantage of the kvm_has_noapic_vcpu static branch. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220614230548.3852141-6-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce0a58f4756c14d7646cfdf279dbaada9d7712a0 Author: Sean Christopherson Date: Tue Jun 14 23:05:47 2022 +0000 KVM: x86: Move "apicv_active" into "struct kvm_lapic" Move the per-vCPU apicv_active flag into KVM's local APIC instance. APICv is fully dependent on an in-kernel local APIC, but that's not at all clear when reading the current code due to the flag being stored in the generic kvm_vcpu_arch struct. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220614230548.3852141-5-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 - arch/x86/kvm/lapic.c | 30 ++++++++++-------------------- arch/x86/kvm/lapic.h | 3 ++- arch/x86/kvm/svm/svm.c | 5 +++-- arch/x86/kvm/vmx/vmx.c | 3 ++- arch/x86/kvm/x86.c | 11 ++++++----- 6 files changed, 23 insertions(+), 30 deletions(-) commit ae801e1303e939ad5ebd9f390bdcc57275ada33b Author: Sean Christopherson Date: Tue Jun 14 23:05:46 2022 +0000 KVM: x86: Check for in-kernel xAPIC when querying APICv for directed yield Use kvm_vcpu_apicv_active() to check if APICv is active when seeing if a vCPU is a candidate for directed yield due to a pending ACPIv interrupt. This will allow moving apicv_active into kvm_lapic without introducing a potential NULL pointer deref (kvm_vcpu_apicv_active() effectively adds a pre-check on the vCPU having an in-kernel APIC). No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220614230548.3852141-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d39850f57d2102c6b46feb21237bc23bc42de4f7 Author: Sean Christopherson Date: Tue Jun 14 23:05:45 2022 +0000 KVM: x86: Drop @vcpu parameter from kvm_x86_ops.hwapic_isr_update() Drop the unused @vcpu parameter from hwapic_isr_update(). AMD/AVIC is unlikely to implement the helper, and VMX/APICv doesn't need the vCPU as it operates on the current VMCS. The result is somewhat odd, but allows for a decent amount of (future) cleanup in the APIC code. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220614230548.3852141-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/lapic.c | 8 ++++---- arch/x86/kvm/vmx/vmx.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit ec1d7e6ab9ff15d9ff7b3628a4320907544675e1 Author: Sean Christopherson Date: Tue Jun 14 23:05:44 2022 +0000 KVM: SVM: Drop unused AVIC / kvm_x86_ops declarations Drop a handful of unused AVIC function declarations whose implementations were removed during the conversion to optional static calls. No functional change intended. Fixes: abb6d479e226 ("KVM: x86: make several APIC virtualization callbacks optional") Signed-off-by: Sean Christopherson Message-Id: <20220614230548.3852141-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/svm.h | 4 ---- 1 file changed, 4 deletions(-) commit 913d6c9b8fe48f0836c00e359fb1ea39089d25e9 Author: Sean Christopherson Date: Tue Jun 14 21:58:31 2022 +0000 KVM: nVMX: Update vmcs12 on BNDCFGS write, not at vmcs02=>vmcs12 sync Update vmcs12->guest_bndcfgs on intercepted writes to BNDCFGS from L2 instead of waiting until vmcs02 is synchronized to vmcs12. KVM always intercepts BNDCFGS accesses, so the only way the value in vmcs02 can change is via KVM's explicit VMWRITE during emulation. Signed-off-by: Sean Christopherson Message-Id: <20220614215831.3762138-6-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 3 --- arch/x86/kvm/vmx/vmx.c | 6 ++++++ 2 files changed, 6 insertions(+), 3 deletions(-) commit 308a4fffeb361af90f17837c1bcace3139d1f677 Author: Sean Christopherson Date: Tue Jun 14 21:58:30 2022 +0000 KVM: nVMX: Save BNDCFGS to vmcs12 iff relevant controls are exposed to L1 Save BNDCFGS to vmcs12 (from vmcs02) if and only if at least of one of the load-on-entry or clear-on-exit fields for BNDCFGS is enumerated as an allowed-1 bit in vmcs12. Skipping the field avoids an unnecessary VMREAD when MPX is supported but not exposed to L1. Per Intel's SDM: If the processor supports either the 1-setting of the "load IA32_BNDCFGS" VM-entry control or that of the "clear IA32_BNDCFGS" VM-exit control, the contents of the IA32_BNDCFGS MSR are saved into the corresponding field. Signed-off-by: Sean Christopherson Message-Id: <20220614215831.3762138-5-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5d76b1f8c79309c0b60c8db5f16774f1691945a7 Author: Sean Christopherson Date: Tue Jun 14 21:58:29 2022 +0000 KVM: nVMX: Rename nested.vmcs01_* fields to nested.pre_vmenter_* Rename the fields in struct nested_vmx used to snapshot pre-VM-Enter values to reflect that they can hold L2's values when restoring nested state, e.g. if userspace restores MSRs before nested state. As crazy as it seems, restoring MSRs before nested state actually works (because KVM goes out if it's way to make it work), even though the initial MSR writes will hit vmcs01 despite holding L2 values. Add a related comment to vmx_enter_smm() to call out that using the common VM-Exit and VM-Enter helpers to emulate SMI and RSM is wrong and broken. The few MSRs that have snapshots _could_ be fixed by taking a snapshot prior to the forced VM-Exit instead of at forced VM-Enter, but that's just the tip of the iceberg as the rather long list of MSRs that aren't snapshotted (hello, VM-Exit MSR load list) can't be handled this way. Signed-off-by: Sean Christopherson Message-Id: <20220614215831.3762138-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 8 ++++---- arch/x86/kvm/vmx/vmx.c | 7 +++++++ arch/x86/kvm/vmx/vmx.h | 15 ++++++++++++--- 3 files changed, 23 insertions(+), 7 deletions(-) commit 764643a6be07445308e492a528197044c801b3ba Author: Sean Christopherson Date: Tue Jun 14 21:58:28 2022 +0000 KVM: nVMX: Snapshot pre-VM-Enter DEBUGCTL for !nested_run_pending case If a nested run isn't pending, snapshot vmcs01.GUEST_IA32_DEBUGCTL irrespective of whether or not VM_ENTRY_LOAD_DEBUG_CONTROLS is set in vmcs12. When restoring nested state, e.g. after migration, without a nested run pending, prepare_vmcs02() will propagate nested.vmcs01_debugctl to vmcs02, i.e. will load garbage/zeros into vmcs02.GUEST_IA32_DEBUGCTL. If userspace restores nested state before MSRs, then loading garbage is a non-issue as loading DEBUGCTL will also update vmcs02. But if usersepace restores MSRs first, then KVM is responsible for propagating L2's value, which is actually thrown into vmcs01, into vmcs02. Restoring L2 MSRs into vmcs01, i.e. loading all MSRs before nested state is all kinds of bizarre and ideally would not be supported. Sadly, some VMMs do exactly that and rely on KVM to make things work. Note, there's still a lurking SMM bug, as propagating vmcs01's DEBUGCTL to vmcs02 across RSM may corrupt L2's DEBUGCTL. But KVM's entire VMX+SMM emulation is flawed as SMI+RSM should not toouch _any_ VMCS when use the "default treatment of SMIs", i.e. when not using an SMI Transfer Monitor. Link: https://lore.kernel.org/all/Yobt1XwOfb5M6Dfa@google.com Fixes: 8fcc4b5923af ("kvm: nVMX: Introduce KVM_CAP_NESTED_STATE") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20220614215831.3762138-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fa578398a0ba2c079fa1170da21fa5baae0cedb2 Author: Sean Christopherson Date: Tue Jun 14 21:58:27 2022 +0000 KVM: nVMX: Snapshot pre-VM-Enter BNDCFGS for !nested_run_pending case If a nested run isn't pending, snapshot vmcs01.GUEST_BNDCFGS irrespective of whether or not VM_ENTRY_LOAD_BNDCFGS is set in vmcs12. When restoring nested state, e.g. after migration, without a nested run pending, prepare_vmcs02() will propagate nested.vmcs01_guest_bndcfgs to vmcs02, i.e. will load garbage/zeros into vmcs02.GUEST_BNDCFGS. If userspace restores nested state before MSRs, then loading garbage is a non-issue as loading BNDCFGS will also update vmcs02. But if usersepace restores MSRs first, then KVM is responsible for propagating L2's value, which is actually thrown into vmcs01, into vmcs02. Restoring L2 MSRs into vmcs01, i.e. loading all MSRs before nested state is all kinds of bizarre and ideally would not be supported. Sadly, some VMMs do exactly that and rely on KVM to make things work. Note, there's still a lurking SMM bug, as propagating vmcs01.GUEST_BNDFGS to vmcs02 across RSM may corrupt L2's BNDCFGS. But KVM's entire VMX+SMM emulation is flawed as SMI+RSM should not toouch _any_ VMCS when use the "default treatment of SMIs", i.e. when not using an SMI Transfer Monitor. Link: https://lore.kernel.org/all/Yobt1XwOfb5M6Dfa@google.com Fixes: 62cf9bd8118c ("KVM: nVMX: Fix emulation of VM_ENTRY_LOAD_BNDCFGS") Cc: stable@vger.kernel.org Cc: Lei Wang Signed-off-by: Sean Christopherson Message-Id: <20220614215831.3762138-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cad564ca557f8d3bb3b1fa965d9a2b3f6490ec69 Author: Helge Deller Date: Thu Jun 2 22:06:28 2022 +0200 fbcon: Fix boundary checks for fbcon=vc:n1-n2 parameters The user may use the fbcon=vc:- option to tell fbcon to take over the given range (n1...n2) of consoles. The value for n1 and n2 needs to be a positive number and up to (MAX_NR_CONSOLES - 1). The given values were not fully checked against those boundaries yet. To fix the issue, convert first_fb_vc and last_fb_vc to unsigned integers and check them against the upper boundary, and make sure that first_fb_vc is smaller than last_fb_vc. Cc: stable@vger.kernel.org # v4.19+ Reviewed-by: Daniel Vetter Signed-off-by: Helge Deller Link: https://patchwork.freedesktop.org/patch/msgid/YpkYRMojilrtZIgM@p100 drivers/video/fbdev/core/fbcon.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3866cba87dcd0162fb41e9b3b653d0af68fad5ec Author: Helge Deller Date: Thu Jun 2 22:08:38 2022 +0200 fbcon: Fix accelerated fbdev scrolling while logo is still shown There is no need to directly skip over to the SCROLL_REDRAW case while the logo is still shown. When using DRM, this change has no effect because the code will reach the SCROLL_REDRAW case immediately anyway. But if you run an accelerated fbdev driver and have FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION enabled, console scrolling is slowed down by factors so that it feels as if you use a 9600 baud terminal. So, drop those unnecessary checks and speed up fbdev console acceleration during bootup. Cc: stable@vger.kernel.org # v5.10+ Acked-by: Daniel Vetter Signed-off-by: Helge Deller Link: https://patchwork.freedesktop.org/patch/msgid/YpkYxk7wsBPx3po+@p100 drivers/video/fbdev/core/fbcon.c | 4 ---- 1 file changed, 4 deletions(-) commit d7af63abde74b43e7739bad2c68055667b7f53a0 Author: Xiang wangx Date: Tue Jun 14 01:28:18 2022 +0800 wcn36xx: Fix typo in comment Delete the redundant word 'the'. Signed-off-by: Xiang wangx Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220613172818.7491-1-wangxiang@cdjrlc.com drivers/net/wireless/ath/wcn36xx/hal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 62ebaf2f9261cd2367ae928a39343fcdbfe9f877 Author: Tetsuo Handa Date: Mon Jun 13 22:21:48 2022 +0900 ath6kl: avoid flush_scheduled_work() usage As per commit c4f135d643823a86 ("workqueue: Wrap flush_workqueue() using a macro") says, use per "struct ath6kl_usb" workqueue. This is a blind conversion, and is only compile tested. Signed-off-by: Tetsuo Handa Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/f78ddbdc-8989-a1a7-2234-ce9ec3894625@I-love.SAKURA.ne.jp drivers/net/wireless/ath/ath6kl/usb.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit d7fc76039b74ad37b7056d5607b05d7cb31a5404 Author: Pavel Skripkin Date: Mon Jun 13 21:44:07 2022 +0300 ath9k: htc: clean up statistics macros I've changed *STAT_* macros a bit in previous patch and I seems like they become really unreadable. Align these macros definitions to make code cleaner and fix folllowing checkpatch warning ERROR: Macros with complex values should be enclosed in parentheses Also, statistics macros now accept an hif_dev as argument, since macros that depend on having a local variable with a magic name don't abide by the coding style. No functional change Suggested-by: Jeff Johnson Signed-off-by: Pavel Skripkin Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/ebb2306d06a496cd1b032155ae52fdc5fa8cc2c5.1655145743.git.paskripkin@gmail.com drivers/net/wireless/ath/ath9k/hif_usb.c | 26 +++++++++++----------- drivers/net/wireless/ath/ath9k/htc.h | 32 +++++++++++++++------------ drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 10 ++++----- 3 files changed, 36 insertions(+), 32 deletions(-) commit 0ac4827f78c7ffe8eef074bc010e7e34bc22f533 Author: Pavel Skripkin Date: Mon Jun 13 21:43:59 2022 +0300 ath9k: fix use-after-free in ath9k_hif_usb_rx_cb Syzbot reported use-after-free Read in ath9k_hif_usb_rx_cb() [0]. The problem was in incorrect htc_handle->drv_priv initialization. Probable call trace which can trigger use-after-free: ath9k_htc_probe_device() /* htc_handle->drv_priv = priv; */ ath9k_htc_wait_for_target() <--- Failed ieee80211_free_hw() <--- priv pointer is freed ... ath9k_hif_usb_rx_cb() ath9k_hif_usb_rx_stream() RX_STAT_INC() <--- htc_handle->drv_priv access In order to not add fancy protection for drv_priv we can move htc_handle->drv_priv initialization at the end of the ath9k_htc_probe_device() and add helper macro to make all *_STAT_* macros NULL safe, since syzbot has reported related NULL deref in that macros [1] Link: https://syzkaller.appspot.com/bug?id=6ead44e37afb6866ac0c7dd121b4ce07cb665f60 [0] Link: https://syzkaller.appspot.com/bug?id=b8101ffcec107c0567a0cd8acbbacec91e9ee8de [1] Fixes: fb9987d0f748 ("ath9k_htc: Support for AR9271 chipset.") Reported-and-tested-by: syzbot+03110230a11411024147@syzkaller.appspotmail.com Reported-and-tested-by: syzbot+c6dde1f690b60e0b9fbe@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/d57bbedc857950659bfacac0ab48790c1eda00c8.1655145743.git.paskripkin@gmail.com drivers/net/wireless/ath/ath9k/htc.h | 10 +++++----- drivers/net/wireless/ath/ath9k/htc_drv_init.c | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) commit 945a9a8e448b65bec055d37eba58f711b39f66f0 Author: Dongliang Mu Date: Thu Jun 9 08:35:28 2022 +0100 media: pvrusb2: fix memory leak in pvr_probe The error handling code in pvr2_hdw_create forgets to unregister the v4l2 device. When pvr2_hdw_create returns back to pvr2_context_create, it calls pvr2_context_destroy to destroy context, but mp->hdw is NULL, which leads to that pvr2_hdw_destroy directly returns. Fix this by adding v4l2_device_unregister to decrease the refcount of usb interface. Reported-by: syzbot+77b432d57c4791183ed4@syzkaller.appspotmail.com Signed-off-by: Dongliang Mu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 1 + 1 file changed, 1 insertion(+) commit 5b9b598453d3ae5fa66d7ab591008373a89b91a0 Author: Niklas Söderlund Date: Wed Jun 8 21:46:57 2022 +0100 media: rcar-vin: Fix channel routing for Ebisu When converting to full Virtual Channel routing an error crept into the routing table for Ebisu (r8a77990). The routing information is used at probe time preventing rcar-vin from probing correctly on this SoC, solve by correcting the routing table. Fixes: 3e52419ec04f9769 ("media: rcar-{csi2,vin}: Move to full Virtual Channel routing per CSI-2 IP") Reported-by: Geert Uytterhoeven Signed-off-by: Niklas Söderlund Tested-by: Geert Uytterhoeven Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/renesas/rcar-vin/rcar-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 377301bfb6f0dffbf1f8f7ae009c88c2301f9812 Author: Justin Green Date: Mon Jun 6 18:24:11 2022 +0100 media: mediatek/vcodec: Enable incoherent buffer allocation Set allow_cache_hints to 1 for the vb2_queue source and destination queues in the mediatek vcodec V4L2 driver. This allows us to allocate buffers with the V4L2_MEMORY_FLAG_NON_COHERENT set. On Mediatek SoCs, this enables caching for this memory, which vastly improves performance when being read from CPU. Read performance for these buffers is in turn important for detiling MM21 video frames in userspace software, such as libyuv or gstreamer. This change should be safe from race conditions since videobuf2 already invalidates or flushes the appropriate cache lines in its prepare() and finish() methods. Tested on a MT8183 SoC. Resulted in both correct detiling and a 10X speedup. Signed-off-by: Justin Green Suggested-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c | 2 ++ 1 file changed, 2 insertions(+) commit 54b4d1911ef7e8616e76804c8b562b9803612cee Author: Ziyang Xuan Date: Mon Jun 6 14:10:42 2022 +0100 media: amphion: delete unnecessary NULL check vfree(NULL) is safe. NULL check before vfree() is not needed. Delete them to simplify the code. Generated by coccinelle script: scripts/coccinelle/free/ifnullfree.cocci Signed-off-by: Ziyang Xuan Reviewed-by: ming_qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/amphion/vdec.c | 3 +-- drivers/media/platform/amphion/venc.c | 3 +-- drivers/media/platform/amphion/vpu_cmds.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) commit 4911c5acf9351c4caf692895c7cf6a4fa46c26b0 Author: Ming Qian Date: Mon May 30 08:50:02 2022 +0100 media: imx-jpeg: Implement drain using v4l2-mem2mem helpers v4l2 m2m has supplied some helper function to handle drain, so the driver can use the helper function directly. Fixes: d8ebe298d008c ("media: imx-jpeg: Set V4L2_BUF_FLAG_LAST at eos") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 155 ++++++++++++------------- drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h | 2 - 2 files changed, 73 insertions(+), 84 deletions(-) commit 9e7aa76cdb02923ee23a0ddd48f38bdc3512f92b Author: Ming Qian Date: Mon May 30 08:49:19 2022 +0100 media: imx-jpeg: Align upwards buffer size The hardware can support any image size WxH, with arbitrary W (image width) and H (image height) dimensions. Align upwards buffer size for both encoder and decoder. and leave the picture resolution unchanged. For decoder, the risk of memory out of bounds can be avoided. For both encoder and decoder, the driver will lift the limitation of resolution alignment. For example, the decoder can support jpeg whose resolution is 227x149 the encoder can support nv12 1080P, won't change it to 1920x1072. Fixes: 2db16c6ed72ce ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 88 +++++++++++--------------- 1 file changed, 37 insertions(+), 51 deletions(-) commit 6285cdea19daf764bf00f662a59fc83ef67345cf Author: Ming Qian Date: Mon May 30 08:48:37 2022 +0100 media: imx-jpeg: Leave a blank space before the configuration data There is a hardware bug that it will load the first 128 bytes of configuration data twice, it will led to some configure error. so shift the configuration data 128 bytes, and make the first 128 bytes all zero, then hardware will load the 128 zero twice, and ignore them as garbage. then the configuration data can be loaded correctly Fixes: 2db16c6ed72ce ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") Signed-off-by: Ming Qian Reviewed-by: Mirela Rabulea Reviewed-by: Tommaso Merciai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 5a601f89e846c1b6005ab274d039e5036fc22015 Author: Ming Qian Date: Mon May 30 08:47:31 2022 +0100 media: imx-jpeg: Correct some definition according specification the register CAST_NOMFRSIZE_LO should be equal to CAST_STATUS16 the register CAST_NOMFRSIZE_HI should be equal to CAST_STATUS17 the register CAST_OFBSIZE_LO should be equal to CAST_STATUS18 the register CAST_OFBSIZE_HI should be equal to CAST_STATUS19 Fixes: 2db16c6ed72ce ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") Signed-off-by: Ming Qian Reviewed-by: Mirela Rabulea Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8cc7b3d329f76bd359860b8caef2c36157ceeb16 Author: Chengguang Xu Date: Sun May 29 16:34:56 2022 +0100 media: platform: fix missing/incorrect resource cleanup in error case In error case of s5p_mfc_power_on() we should call clk_disable_unprepare() for the clocks(from pm->clocks[0] to pm->clocks[i-1]). Signed-off-by: Chengguang Xu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/samsung/s5p-mfc/s5p_mfc_pm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5455491bf13f6f7d5e337aada51bbfa43842df93 Author: Kees Cook Date: Fri May 27 22:29:53 2022 +0100 media: amphion: 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][3]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays [3] https://github.com/KSPP/linux/issues/78 Fixes: 9f599f351e86 ("media: amphion: add vpu core driver") Cc: Ming Qian Cc: Shijie Qin Cc: Zhou Peng Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Reviewed-by: ming_qian Reviewed-by: Tommaso Merciai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/amphion/vpu_dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 300065f966d30baa59a13849753305aac8c320c3 Author: Benjamin Gaignard Date: Tue May 24 12:59:45 2022 +0100 media: Hantro: Correct G2 init qp field Documentation said that g2 init_qp field use bits 24 to 30 of the 8th register. Change the field mask to be able to set 7 bits and not only 6 of them. Conformance test INITQP_B_Main10_Sony_1 decoding is OK with this patch. Fixes: cb5dd5a0fa518 ("media: hantro: Introduce G2/HEVC decoder") Signed-off-by: Benjamin Gaignard Reviewed-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro_g2_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b0f690de13625c80367bf56fe3ed5eaa5b33b27 Author: Haowen Bai Date: Tue May 24 04:42:21 2022 +0100 media: mediatek: vcodec: Use kmemdup rather than kmalloc/memcpy kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Haowen Bai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5c2111c29689239c31e82ee1fe287f03be94a68c Author: Eugen Hristev Date: Mon May 23 15:17:05 2022 +0100 media: atmel: atmel-isc-base: move cropping settings outside start_dma The cropping configuration of the Parallel Front Engine (PFE) can be done just once when the streaming starts. The ISC configuration is in place and will not be changed while streaming. It is not effective to keep rewriting the crop registers configuration everytime start_dma is called, as this can be called for each queued buffer. Thus we can configure the cropping at start_streaming time. This change moves the code to a dedicated function. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc-base.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 7e89476b59ca0e00cb5499267edec3f62e8ef67d Author: Vladimir Zapolskiy Date: Mon May 23 13:25:13 2022 +0100 media: camss: Move and unexport functions specific to ISPIF Common exported functions msm_vfe_get_vfe_id() and msm_vfe_get_vfe_line_id() do not have any users outside of camss-ispif.c, move them to the latter object and staticize. The change is supposed to be a non-functional one. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss/camss-ispif.c | 39 +++++++++++++++++++++++-- drivers/media/platform/qcom/camss/camss-vfe.c | 34 --------------------- drivers/media/platform/qcom/camss/camss-vfe.h | 3 -- 3 files changed, 37 insertions(+), 39 deletions(-) commit a3a2efca36a3a1ddba229a7be7991e8b5de4ac35 Author: Ming Qian Date: Thu Jun 9 10:27:59 2022 +0100 media: amphion: return error if format is unsupported by vpu return error if format is unsupported by vpu, otherwise the vpu will be stalled at decoding Fixes: 3cd084519c6f9 ("media: amphion: add vpu v4l2 m2m support") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/amphion/vpu_malone.c | 2 ++ drivers/media/platform/amphion/vpu_v4l2.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit b99bea15156332be806a24ba1192948244e3976a Author: Julia Lawall Date: Sat May 21 12:11:05 2022 +0100 media: staging: atomisp: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/ov5693/ov5693.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af917b01ded389d6cd32237b376995bcb7c88f45 Author: Julia Lawall Date: Sat May 21 12:10:51 2022 +0100 media: platform: exynos4-is: fix typos in comments Spelling mistakes (triple letters) in comments. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/samsung/exynos4-is/fimc-is-errno.h | 2 +- drivers/media/platform/samsung/exynos4-is/mipi-csis.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 04870d78090544d72ac1fa5f9125439db65bdf3a Author: Julia Lawall Date: Sat May 21 12:10:40 2022 +0100 media: mediatek: vcodec: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e795aa7f7e2e412777408790db09d48d6ad171c3 Author: Julia Lawall Date: Sat May 21 12:10:28 2022 +0100 media: platform: exynos-gsc: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/samsung/exynos-gsc/gsc-core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb730334e0f759d00f72168fbc555e5a95e35210 Author: Zheyu Ma Date: Sat May 21 07:24:01 2022 +0100 media: tw686x: Register the irq at the end of probe We got the following warning when booting the kernel: [ 3.243674] INFO: trying to register non-static key. [ 3.243922] The code is fine but needs lockdep annotation, or maybe [ 3.244230] you didn't initialize this object before use? [ 3.245642] Call Trace: [ 3.247836] lock_acquire+0xff/0x2d0 [ 3.248727] tw686x_audio_irq+0x1a5/0xcc0 [tw686x] [ 3.249211] tw686x_irq+0x1f9/0x480 [tw686x] The lock 'vc->qlock' will be initialized in tw686x_video_init(), but the driver registers the irq before calling the tw686x_video_init(), and we got the warning. Fix this by registering the irq at the end of probe Fixes: 704a84ccdbf1 ("[media] media: Support Intersil/Techwell TW686x-based video capture cards") Signed-off-by: Zheyu Ma Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw686x/tw686x-core.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit d3741027e5787daf5f19bce99b291f3e296b8894 Author: Zheyu Ma Date: Sat May 21 06:55:17 2022 +0100 media: tw5864: Convert to use managed functions pcim* and devm* When removing the module, we will get the follow flaw: [ 69.323999] remove_proc_entry: removing non-empty directory 'irq/21', leaking at least 'tw5864' [ 69.324449] WARNING: CPU: 0 PID: 395 at fs/proc/generic.c:717 remove_proc_entry+0x389/0x3f0 [ 69.326909] RIP: 0010:remove_proc_entry+0x389/0x3f0 [ 69.331089] Call Trace: [ 69.331215] [ 69.331327] unregister_irq_proc+0x14c/0x170 [ 69.332579] tw5864_finidev+0x12a/0x190 [tw5864] [ 69.332811] pci_device_remove+0x92/0x240 Fix this by using managed functions, this makes the error handling more simpler. Signed-off-by: Zheyu Ma Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw5864/tw5864-core.c | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) commit a1a9b71ebd6582c94090ee5b70fb3eabf7088f22 Author: Scott Chao Date: Fri May 20 12:08:31 2022 +0100 media: platform: cros-ec: Add moli to the match table The Google Moli device uses the same approach as the Google Brask which enables the HDMI CEC via the cros-ec-cec driver. Signed-off-by: Scott Chao Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 2 ++ 1 file changed, 2 insertions(+) commit e3b9e50af7db7393b82e4c182c64ae32dbf28f83 Author: Linus Walleij Date: Thu May 19 22:39:06 2022 +0100 media: platform: omap: Pass a pointer to virt_to_page() A pointer into virtual memory is represented by a (void *) not an u32, so the compiler warns: drivers/media/platform/ti/omap/omap_voutlib.c:317:54: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion] Fix this with an explicit cast. Cc: Vaibhav Hiremath Cc: Archit Taneja Cc: Tomi Valkeinen Signed-off-by: Linus Walleij Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/ti/omap/omap_voutlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ded5c4faf0d211e955cd80e6420a42c1e5e48f76 Author: Ming Qian Date: Thu May 19 09:43:46 2022 +0100 media: amphion: vdec check format in enum_fmt vdec check the pixel format is supported by vpu, or is it disabled. And don't report it if the result is false Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/amphion/vpu_malone.c | 16 ++++++++++++++++ drivers/media/platform/amphion/vpu_malone.h | 1 + drivers/media/platform/amphion/vpu_rpc.c | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) commit cf295629e3d6da8358a32950a6a96c47f17f1797 Author: Vladimir Zapolskiy Date: Thu May 19 06:14:15 2022 +0100 media: camss: Allocate camss struct as a managed device resource The change simplifies driver's probe and remove functions, no functional change is intended. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss/camss.c | 33 ++++++++++--------------------- 1 file changed, 10 insertions(+), 23 deletions(-) commit 135ad96cb4d6bd6dace030846fe5c7ea890411ab Author: Benjamin Gaignard Date: Wed May 18 09:53:49 2022 +0100 media: hantro: Be more accurate on pixel formats step_width constraints On Hantro G2 decoder on IMX8MQ strides requirements aren't the same for NV12_4L4 and NV12 pixel formats. The first one use a 4 bytes padding while the last one needs 16 bytes. To be sure to provide the correct stride in all cases we need: - to relax the constraints on codec formats so set step_width to 4 - use capture queue format and not the output queue format when applying the pixel format constraints. - put the correct step_width constraints on each pixel format. Move HEVC SPS validation in hantro_hevc.c to be able to perform it when setting sps control and when starting to decode the bitstream. Add a new test in HEVC SPS validation function to check if resolution is still matching the hardware constraints. With this SAODBLK_A_MainConcept_4 and SAODBLK_B_MainConcept_4 conformance tests files are correctly decoded with both NV12 and NV12_4L4 pixel formats. These two files have a resolution of 1016x760. Add defines for the various used resolutions. For other variants than Hantro G2 on IMX8M keep the same step_width to avoid regressions. Fluster HEVC test score is now 128/147 vs 126/147 with the both pixel formats as decoder output. Fluster VP9 test score stay at 147/303. [hverkuil: fix trivial checkpatch warnings] Signed-off-by: Benjamin Gaignard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro_drv.c | 12 +-- drivers/staging/media/hantro/hantro_hevc.c | 30 +++++++ drivers/staging/media/hantro/hantro_hw.h | 14 ++++ drivers/staging/media/hantro/hantro_v4l2.c | 2 +- drivers/staging/media/hantro/imx8m_vpu_hw.c | 80 +++++++++++++------ drivers/staging/media/hantro/rockchip_vpu_hw.c | 104 ++++++++++++++++--------- drivers/staging/media/hantro/sama5d4_vdec_hw.c | 40 +++++++--- drivers/staging/media/hantro/sunxi_vpu_hw.c | 24 +++++- 8 files changed, 223 insertions(+), 83 deletions(-) commit ca9dc8d06ab64543a6a31adac5003349c5671218 Author: Oliver Neukum Date: Wed May 18 09:10:45 2022 +0100 media: airspy: respect the DMA coherency rules If we want to avoid memory corruption on incoherent architectures, buffers for DMA must not reside - on the stack - embedded within other structures Allocate them separately. v2: fix uninitialized return value Signed-off-by: Oliver Neukum Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/airspy/airspy.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 6a0d6733098965b8b58e8008e0fe1333d4f24953 Author: kyrie wu Date: Wed Jun 8 07:07:55 2022 +0100 media: media: jpegenc: set bit mask for jpegenc set jpeg encode DMA bit mask to support 34bits iova space(16GB) that the mt8186 iommu HW support. Whole the iova range separate to 0~4G/4G~8G/8G~12G/12G~16G, regarding which iova range jpgenc actually locate, it depends on the dma-ranges property of vdec dtsi node. Signed-off-by: kyrie wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c | 3 +++ 1 file changed, 3 insertions(+) commit ad834fa85f116a003b51255f6802383cc57fd620 Author: kyrie wu Date: Wed Jun 8 07:07:54 2022 +0100 media: media: jpegenc: add mediatek,mt8186-jpgenc compatible Add mediatek,mt8186-jpgenc compatible to binding document. MT8186 iommu support 0~16GB iova. We separate it to four banks: 0~4G; 4G~8G; 8G~12G; 12G~16G. The "dma-ranges" could be used to adjust the bank we locate. If we don't set this property. The default range always is 0~4G. Signed-off-by: kyrie wu Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit cd54ff938091d890edf78e6555ec30c63dcd2eb5 Author: keliu Date: Fri May 27 11:30:17 2022 +0100 media: rc: Directly use ida_free() Use ida_alloc() and ida_free() instead of the deprecated ida_simple_get() and ida_simple_remove(). Signed-off-by: keliu Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 6 +++--- drivers/media/rc/rc-main.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 07456325a3c176d69e917cb0aa8cab846d9a6977 Author: Oliver Neukum Date: Thu May 12 14:41:41 2022 +0100 media: ttusbir: avoid unnecessary usb_unlink_urb() While the completion handler is running, usb_unlink_urb() on yourself is a NOP. Remove it. Signed-off-by: Oliver Neukum Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ttusbir.c | 2 -- 1 file changed, 2 deletions(-) commit d040f0e78af59b81a996e0cbec23d5af9ccfd228 Author: Oliver Neukum Date: Thu May 12 14:41:40 2022 +0100 media: ttusbir: NOIO during resume During resume we must assume tat devices are not ready for block IO. Use GFP_NOIO. Signed-off-by: Oliver Neukum Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ttusbir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cb5cadf171f209f1b679dfa05a0109d3bb88c90 Author: Oliver Neukum Date: Thu May 12 14:38:58 2022 +0100 media: xbox_remote: xbox_remote_initialize() cannot fail It cannot fail. Make it void. Signed-off-by: Oliver Neukum Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/xbox_remote.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 6f2f124a1aa32e8f6c96ba125d12e601266d02e6 Author: Oliver Neukum Date: Thu May 12 14:22:35 2022 +0100 media: streamzap: avoid unnecessary GFP_ATOMIC During resume() GFP_NOIO is enough. Signed-off-by: Oliver Neukum Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/streamzap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 407cba97c442a2b916b36fe96fc0ef13ca95a7b6 Author: Oliver Neukum Date: Thu May 12 14:16:05 2022 +0100 media: redrat3: no unnecessary GFP_ATOMIC During resume() GFP_NOIO will do. No need for GFP_ATOMIC Signed-off-by: Oliver Neukum Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/redrat3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8332f75a5bd456ccc24d3ef7fb676ecae54a9cb8 Author: Oliver Neukum Date: Thu May 12 14:03:21 2022 +0100 media: imon_raw: respect DMA coherency No buffer can be embedded inside a descriptor, not even a simple be64. Use a separate kmalloc() Signed-off-by: Oliver Neukum Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/imon_raw.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 0189ef82722894bc8c9361f90f18577977d58ef4 Author: Oliver Neukum Date: Thu May 12 13:50:00 2022 +0100 media: iguanair: no superfluous usb_unlink_urb() Unlinking yourself while the completion handler is running is a NOP. Drop it. Signed-off-by: Oliver Neukum Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/iguanair.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 5e4029056263f65a157eaee75c9306cd8254f567 Author: Oliver Neukum Date: Thu May 12 13:38:49 2022 +0100 media: igorplugusb: remove superfluous usb_unlink_urb() Calling that on yourself while the completion handler is running is a NOP. Remove it. Signed-off-by: Oliver Neukum Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/igorplugusb.c | 1 - 1 file changed, 1 deletion(-) commit 2a7745949386e275ced3b38410e9f174447949df Author: Oliver Neukum Date: Thu May 12 13:38:48 2022 +0100 media: igorplugusb: break cyclical race on disconnect The driver uses a timer, that may submit the URB and the URB may start the timer. No simple order of killing can break te cycle. Poison the URB before killing the timer. Signed-off-by: Oliver Neukum Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/igorplugusb.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 522f1d7d95fea3238c777148d95c1d793afa40c2 Author: Oliver Neukum Date: Thu May 12 13:38:47 2022 +0100 media: igorplugusb: prevent use after free in probe error The timer uses the URB. Free it only after the timer has been stopped. Signed-off-by: Oliver Neukum Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/igorplugusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b3f820b905c931a969d7d7cfb30f1ab1b071c425 Author: Oliver Neukum Date: Thu May 12 13:38:46 2022 +0100 media: igorplugusb: respect DMA coherency The coherency rules mean that you cannot embed a buffer inside a descriptor. kmalloc() separately. Signed-off-by: Oliver Neukum Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/igorplugusb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5b044a130017ad164f118b799321b7446e4c638c Author: Yunfei Dong Date: Wed May 18 13:30:04 2022 +0100 media: mediatek: vcodec: Add to support H264 inner racing mode In order to reduce decoder latency, enable H264 inner racing mode. Send lat trans buffer information to core when trigger lat to work, need not to wait until lat decode done. Signed-off-by: Yunfei Dong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../platform/mediatek/vcodec/mtk_vcodec_dec_drv.c | 4 +++ .../platform/mediatek/vcodec/mtk_vcodec_dec_pm.c | 34 ++++++++++++++++++++++ .../platform/mediatek/vcodec/mtk_vcodec_drv.h | 11 +++++++ .../mediatek/vcodec/vdec/vdec_h264_req_multi_if.c | 25 ++++++++++++---- 4 files changed, 69 insertions(+), 5 deletions(-) commit 9223415d47e1efe939fcc791870db8ce5bb6cc03 Author: Yunfei Dong Date: Wed May 18 13:30:03 2022 +0100 media: mediatek: vcodec: prevent kernel crash when scp ipi timeout When SCP timeout during playing video, kernel crashes with following message. It's caused by accessing NULL pointer in vpu_dec_ipi_handler. This patch doesn't solve the root cause of NULL pointer, but merely prevent kernel crashed when encounter the NULL pointer. After applied this patch, kernel keeps alive, only the video player turns to green screen. [67242.065474] pc : vpu_dec_ipi_handler+0xa0/0xb20 [mtk_vcodec_dec] [67242.065485] [MTK_V4L2] level=0 fops_vcodec_open(),334: 18000000.vcodec_dec decoder [135] [67242.065523] lr : scp_ipi_handler+0x11c/0x244 [mtk_scp] [67242.065540] sp : ffffffbb4207fb10 [67242.065557] x29: ffffffbb4207fb30 x28: ffffffd00a1d5000 [67242.065592] x27: 1ffffffa0143aa24 x26: 0000000000000000 [67242.065625] x25: dfffffd000000000 x24: ffffffd0168bfdb0 [67242.065659] x23: 1ffffff76840ff74 x22: ffffffbb41fa8a88 [67242.065692] x21: ffffffbb4207fb9c x20: ffffffbb4207fba0 [67242.065725] x19: ffffffbb4207fb98 x18: 0000000000000000 [67242.065758] x17: 0000000000000000 x16: ffffffd042022094 [67242.065791] x15: 1ffffff77ed4b71a x14: 1ffffff77ed4b719 [67242.065824] x13: 0000000000000000 x12: 0000000000000000 [67242.065857] x11: 0000000000000000 x10: dfffffd000000001 [67242.065890] x9 : 0000000000000000 x8 : 0000000000000002 [67242.065923] x7 : 0000000000000000 x6 : 000000000000003f [67242.065956] x5 : 0000000000000040 x4 : ffffffffffffffe0 [67242.065989] x3 : ffffffd043b841b8 x2 : 0000000000000000 [67242.066021] x1 : 0000000000000010 x0 : 0000000000000010 [67242.066055] Call trace: [67242.066092] vpu_dec_ipi_handler+0xa0/0xb20 [mtk_vcodec_dec 12220d230d83a7426fc38c56b3e7bc6066955bae] [67242.066119] scp_ipi_handler+0x11c/0x244 [mtk_scp 8fb69c2ef141dd3192518b952b65aba35627b8bf] [67242.066145] mt8192_scp_irq_handler+0x70/0x128 [mtk_scp 8fb69c2ef141dd3192518b952b65aba35627b8bf] [67242.066172] scp_irq_handler+0xa0/0x114 [mtk_scp 8fb69c2ef141dd3192518b952b65aba35627b8bf] [67242.066200] irq_thread_fn+0x84/0xf8 [67242.066220] irq_thread+0x170/0x1ec [67242.066242] kthread+0x2f8/0x3b8 [67242.066264] ret_from_fork+0x10/0x30 [67242.066292] Code: 38f96908 35003628 91004340 d343fc08 (38f96908) Signed-off-by: Tinghan Shen Signed-off-by: Yunfei Dong Reviewed-by: Macpaul Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7501edef6b1f554c7565cb8491236665f80e8a30 Author: Yunfei Dong Date: Wed May 18 13:30:02 2022 +0100 media: mediatek: vcodec: Different codec using different capture format Vp8 need to use MM21, but vp9 and h264 need to use HyFbc mode for mt8195. Vp8/vp9/h264 use the same MM21 format for mt8192. Signed-off-by: Yunfei Dong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../platform/mediatek/vcodec/mtk_vcodec_dec.c | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 02bbf16aee6eb2939991a165b88d4e0bb3d8440c Author: Yunfei Dong Date: Wed May 18 13:30:01 2022 +0100 media: mediatek: vcodec: Adds compatible for mt8195 Adds compatible for mt8195 platform. Signed-off-by: Yunfei Dong Reviewed-by: Macpaul Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6c41991b023c24115e476c9f9c8c72b563d173c7 Author: Yunfei Dong Date: Wed May 18 13:30:00 2022 +0100 media: dt-bindings: media: mediatek: vcodec: Adds decoder dt-bindings for mt8195 Adds decoder dt-bindings for mt8195. Signed-off-by: Yunfei Dong Reviewed-by: Macpaul Lin Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml | 1 + 1 file changed, 1 insertion(+) commit d9e1799a6491f58c8b3b41e7a435d347648f44b3 Author: Yunfei Dong Date: Wed May 18 13:29:59 2022 +0100 media: mediatek: vcodec: Add to support lat soc hardware Add lat soc compatible and to support lat soc power/clk helper. Signed-off-by: Yunfei Dong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c | 12 +++++++++--- .../media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.h | 2 ++ .../media/platform/mediatek/vcodec/mtk_vcodec_dec_pm.c | 16 ++++++++++++++++ drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h | 1 + 4 files changed, 28 insertions(+), 3 deletions(-) commit 3fbf1eac01b5292023235dfd17b180a3c253d6cc Author: Yunfei Dong Date: Wed May 18 13:29:58 2022 +0100 media: dt-bindings: media: mediatek: vcodec: Adds decoder dt-bindings for lat soc Adds decoder dt-bindings for compatible "mediatek,mtk-vcodec-lat-soc". Signed-off-by: Yunfei Dong Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/mediatek,vcodec-subdev-decoder.yaml | 51 +++++++++++++++------- 1 file changed, 35 insertions(+), 16 deletions(-) commit b0f407c19648ae9110c932c91d6e1b9381ec0aeb Author: Yunfei Dong Date: Fri May 13 10:24:53 2022 +0100 media: mediatek: vcodec: add vp9 decoder driver for mt8186 Add vp9 single core decode driver to support mt8186. [hverkuil: fix 3 small checkpatch warnings] Signed-off-by: Mingjia Zhang Signed-off-by: Xiaoyong Lu Signed-off-by: Yunfei Dong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c | 197 ++++++++++++++++++++- .../media/platform/mediatek/vcodec/vdec_drv_if.c | 2 +- 2 files changed, 195 insertions(+), 4 deletions(-) commit d7365ae8ea9f49da2841872176efdb609f3426b6 Author: Hans Verkuil Date: Mon May 23 08:24:12 2022 +0100 media: vivid.rst: document HDMI Video Guard Band control Document this new vivid test control. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/admin-guide/media/vivid.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 5374d8fb75f313294c7d97e85c22bead34d63f2b Author: Benjamin Gaignard Date: Thu May 19 08:11:46 2022 +0100 media: Add P010 video format P010 is a YUV format with 10-bits per component with interleaved UV. Signed-off-by: Benjamin Gaignard Acked-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../userspace-api/media/v4l/pixfmt-yuv-planar.rst | 54 ++++++++++++++++++++++ drivers/media/v4l2-core/v4l2-common.c | 1 + drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/videodev2.h | 1 + 4 files changed, 57 insertions(+) commit a23196c7a9cbdea12330a7d7255cc9f16ef085f7 Author: Ming Qian Date: Thu May 19 02:43:48 2022 +0100 media: imx-jpeg: Encoder support to set jpeg quality Implement V4L2_CID_JPEG_COMPRESSION_QUALITY to set jpeg quality Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.c | 11 ++-- drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h | 1 + drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 62 +++++++++++++++++++++++ drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h | 2 + 4 files changed, 73 insertions(+), 3 deletions(-) commit 5fe1d61a98e29bb2128d77355d2122826b881cb8 Author: Guo Zhengkui Date: Wed May 18 13:08:36 2022 +0100 media: platform: samsung: s5p-jpeg: replace ternary operator with max() Fix the following coccicheck warning: drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c:1712:24-25: WARNING opportunity for max() max() macro is defined in include/linux/minmax.h. It avoids multiple evaluations of the arguments when non-constant and performs strict type-checking. Signed-off-by: Guo Zhengkui Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db9edaaff137699d4bc5dc3328afa748fb8f5c93 Author: Benjamin Marty Date: Thu May 12 13:02:10 2022 +0100 media: i2c: adv7180: fix reserved bit in Video Selection 2 This bit is marked as reserved in the ADV Hardware Reference Manual. Resetting this bit seems to cause increased video noise. Setting this bit according to the Hardware Reference Manual reduces the video noise immediately. Signed-off-by: Benjamin Marty Reviewed-by: Dave Stevenson Reviewed-by: Kieran Bingham Tested-by: Dave Stevenson Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7180.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 56280c64ecacc971734fad4618b33061fc40b6d7 Author: Hans Verkuil Date: Wed May 18 10:20:43 2022 +0100 media: stkwebcam: deprecate driver, move to staging This is a very old driver for very old hardware and it is one of the very few remaining that does not use the vb2 framework (or even the older videobuf framework), so deprecate this driver and move it to staging with the intent to removing it altogether by the end of 2022. If someone wants to keep this driver, then it has to be converted to use vb2. Reviewed-by: Ricardo Ribalda Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/Kconfig | 1 - drivers/media/usb/Makefile | 1 - drivers/staging/media/Kconfig | 12 +++++++----- drivers/staging/media/Makefile | 1 + drivers/{media/usb => staging/media}/stkwebcam/Kconfig | 8 ++++++-- drivers/{media/usb => staging/media}/stkwebcam/Makefile | 2 +- drivers/staging/media/stkwebcam/TODO | 12 ++++++++++++ drivers/{media/usb => staging/media}/stkwebcam/stk-sensor.c | 0 drivers/{media/usb => staging/media}/stkwebcam/stk-webcam.c | 0 drivers/{media/usb => staging/media}/stkwebcam/stk-webcam.h | 0 10 files changed, 27 insertions(+), 10 deletions(-) commit aa911fcc772e38441f3331ccf442ada898ccbf8c Author: Colin Ian King Date: Wed May 18 09:32:19 2022 +0100 media: platform: exynos-gsc: remove redundant initializations of f_chk_len and f_chk_addr The variables f_chk_len and f_chk_addr are being initialized to zero and then being re-assigned in the next statement. The initializations are redundant and can be removed. Also initialize s_chk_addr and s_chk_len at the declaration statement. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/samsung/exynos-gsc/gsc-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9059ca921bd3e81ad554c1baa4c08e90b12767fe Author: Ming Qian Date: Tue May 17 09:01:16 2022 +0100 media: amphion: support for reloading module As there is no interface to power off vpu core. So it need to boot from cold on first load. but on the second load, driver need to restore the status instead of booting. Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/amphion/vpu_core.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit f4334c51b1df7182ef68f8aa1c3adfecb6219d73 Author: Yang Li Date: Tue May 17 01:33:17 2022 +0100 media: atmel: atmel-isc-base: remove unneeded semicolon Eliminate the following coccicheck warning: ./drivers/media/platform/atmel/atmel-isc-base.c:1469:2-3: Unneeded semicolon Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97185c4585678af316873d4e9725af9dc3796d9e Author: Wan Jiabing Date: Mon May 16 14:13:30 2022 +0100 media: st-delta: Remove unneeded NULL check in delta-v4l2 clk_prepare_enable() already checks NULL by using !clk. clk_disable_unprepare() already checks NULL by using IS_ERR_OR_NULL. Remove unneeded NULL checks before them. Signed-off-by: Wan Jiabing Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/st/sti/delta/delta-v4l2.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit 6aaf006c67798ac693eb24940953ab2e1b4d5577 Author: Jorge Maidana Date: Fri May 13 19:29:22 2022 +0100 media: usbtv: Add PAL-Nc standard Add PAL-Nc support to usbtv, the corresponding register value "0x00fe" comes from the Windows driver "Active Development Co., Ltd. v2.1.1.2". Signed-off-by: Jorge Maidana Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/usbtv/usbtv-video.c | 5 ++++- drivers/media/usb/usbtv/usbtv.h | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 6f0c460fbd7ce67e08ba4c3e1b32e13f842aa800 Author: Jorge Maidana Date: Fri May 13 19:29:21 2022 +0100 media: cx88: Fix PAL-Nc standard * Fix PAL-Nc horizontal parameters according to DScaler: https://github.com/JohnAdders/DScaler/blob/f7d92b76678e/DScaler/TVFormats.cpp#L88-L94 * Add PAL-Nc TV audio support. * Tested with CVBS and RF on a Pinnacle PCTV HD 800i. Signed-off-by: Jorge Maidana Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx88/cx88-core.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit aabcc21d0bd21a040c60b8cd869773644e4cc204 Author: Hans Verkuil Date: Fri May 13 13:53:07 2022 +0100 media: vivid: add HDMI Video Guard Band control Add a vivid control to insert the HDMI Video Guard Band in the image. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/test-drivers/vivid/vivid-ctrls.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 5a531791edb249e41e00cf1cc580dbb09e2157ae Author: Hans Verkuil Date: Fri May 13 13:53:06 2022 +0100 media: v4l2-tpg: add HDMI Video Guard Band test pattern This inserts 4 pixels of the RGB color 0xab55ab at the left hand side of the image. This is only done for 3 or 4 byte RGB pixel formats. The HDMI TMDS encoding of this pixel value equals the Video Guard Band value as defined by HDMI (see section 5.2.2.1 in the HDMI 1.3 Specification) that preceeds the first actual pixel of a video line. If an HDMI receiver doesn't handle this correctly, then it might keep skipping these Video Guard Band patterns and end up with a shorter video line. So this is a nice pattern to test with. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 38 +++++++++++++++++++++++++++ include/media/tpg/v4l2-tpg.h | 16 +++++++++++ 2 files changed, 54 insertions(+) commit 691c3db0dc7616b3cc4ff0f52f956c9afa71b1cd Author: Hans Verkuil Date: Fri May 13 08:54:43 2022 +0100 media: cec-adap.c: log when claiming LA fails unexpectedly If there is a hardware problem such as someone pulling the CEC line low continuously, then the POLL message will fail with an error other than OK, NACK, ABORTED or TIMEOUT. Log the tx_status value in that case to help debug this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/core/cec-adap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b9629c550f01f9864fa644b2ba6dae9c9a2be98d Author: Hans Verkuil Date: Thu May 12 10:36:20 2022 +0100 media: adv7604: try all infoframe types When logging the infoframes the adv7604 driver stopped reading infoframes at the first missing infoframe type. Instead it should try all supported infoframe types. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7604.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6b1814e2698968a223af4f363dcb32fb2c74e265 Author: Vladimir Zapolskiy Date: Thu May 12 09:23:18 2022 +0100 media: camss: Allocate power domain resources dynamically To simplify the driver's maintenance it makes sense to escape from hardcoded numbers of power domain resources per platform and statical allocation of the resources. For instance on a QCOM SM8450 platform the number of CAMSS power domains shall be bumped up to 6, also notably CAMSS on MSM8916 has only one power domain, however it expects to get 2, and thus it should result in a runtime error on driver probe. The change fixes an issue mentioned above and gives more flexibility to support more platforms in future. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss/camss.c | 38 +++++++++++++++++-------------- drivers/media/platform/qcom/camss/camss.h | 7 +++--- 2 files changed, 24 insertions(+), 21 deletions(-) commit bb45f5433f23cf103ba29c9692ee553e061f2cb4 Author: Yang Yingliang Date: Wed May 11 07:55:48 2022 +0100 media: davinci: vpif: add missing of_node_put() in vpif_probe() of_graph_get_next_endpoint() returns an 'endpoint' node pointer with refcount incremented. The refcount should be decremented before returning from vpif_probe(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/ti/davinci/vpif.c | 1 + 1 file changed, 1 insertion(+) commit 31b980c06900796070cbbe036483aca4acbdc04f Author: Zheyu Ma Date: Tue May 10 14:41:46 2022 +0100 media: TDA1997x: Fix the error handling in tda1997x_probe() The driver should disable the regulator when failing to probe. Signed-off-by: Zheyu Ma Acked-by: Tim Harvey Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tda1997x.c | 1 + 1 file changed, 1 insertion(+) commit 73ed516abc4e901f4450ff08fe05b3db06227318 Author: Krzysztof Kozlowski Date: Mon May 9 15:47:11 2022 +0100 media: dt-bindings: qcom,sdm660-camss: document interconnects Document the interconnect properties used in the Qualcomm CAMSS on SDM660: sdm630-sony-xperia-nile-discovery.dtb: camss@ca00000: 'interconnect-names', 'interconnects' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/qcom,sdm660-camss.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 4c25384d136642d72098e36201ca988533e73065 Author: Yang Yingliang Date: Mon May 9 15:04:59 2022 +0100 media: camss: csid: fix wrong size passed to devm_kmalloc_array() 'supplies' is a pointer, the real size of struct regulator_bulk_data should be pass to devm_kmalloc_array(). Fixes: 0d8140179715 ("media: camss: Add regulator_bulk support") Signed-off-by: Yang Yingliang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss/camss-csid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c984fcb1fadfbc77fe9c760f68522928a43d5677 Author: Ian Cowan Date: Fri May 6 06:28:56 2022 +0100 media: staging: media: zoran: replace dprintk with new debugging macros This replaces all of the dprintk macro calls with the zrdev_dbg, zrdev_info, or zrdev_err calls as appropriate. This allows for the removal of the dprintk macro from each file it is defined in, along with the removal of module params that track the debugging level. In the case that the debugging level was used in a comparison, this has been replaced with checking the console level debugging and making a decision from there. If the console debugging level is at least the KERN_ debugging level equivalent, then the comparison will evaluate as true. There are a few instances where pr_debug must be used over the zrdev_dbg. These occur in the module cleanup functions because there should be no devices defined once we get here, so we don't have a device to pass to zrdev_dbg. Signed-off-by: Ian Cowan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/zoran/videocodec.c | 70 ++++++++-------- drivers/staging/media/zoran/zr36016.c | 64 +++++++------- drivers/staging/media/zoran/zr36050.c | 139 +++++++++++++++---------------- drivers/staging/media/zoran/zr36060.c | 78 ++++++++--------- 4 files changed, 170 insertions(+), 181 deletions(-) commit 5ad5c9fcafa2299f1f650851fc8800229b8f259a Author: Ian Cowan Date: Fri May 6 06:28:37 2022 +0100 media: staging: media: zoran: replace all pr_err with zrdev_err as appropriate This replaces all of the pr_err calls to the preferred zrdev_err macro that calls the dev_err macro. There are a few locations where the pr_err is left because a zoran struct cannot be created. This is the result of error handling for another struct's existence that is required to create a zoran struct. Signed-off-by: Ian Cowan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/zoran/videocodec.c | 25 +++++++++++++++++-------- drivers/staging/media/zoran/zr36016.c | 27 ++++++++++++++++++--------- drivers/staging/media/zoran/zr36050.c | 5 +++-- drivers/staging/media/zoran/zr36060.c | 19 +++++++++++++------ 4 files changed, 51 insertions(+), 25 deletions(-) commit cc86485849f9df574bef0d8cc82f264358fbfece Author: Ian Cowan Date: Fri May 6 06:28:19 2022 +0100 media: staging: media: zoran: setup videocodec header for debugging macros This adds inline functions in the videocodec header file to convert the videocodec and videocodec_master structs to their respective contained zoran struct. This will be used to pass the zoran struct to the zrdev_XXX() macros defined in the zoran header. In the zoran header, the new include is added to ensure all variables can be completely defined with the zoran and videocodec includes where they are located. Signed-off-by: Ian Cowan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/zoran/videocodec.h | 15 +++++++++++++++ drivers/staging/media/zoran/zoran.h | 1 + 2 files changed, 16 insertions(+) commit f3805c32ddd18ed494e8ab300fca7de208577682 Author: Ian Cowan Date: Fri May 6 06:28:00 2022 +0100 media: staging: media: zoran: add logging macros This adds the zrdev_dbg() (pointing to pci_dbg()), zrdev_err() (pointing to pci_err()), and zrdev_info() (pointing to pci_info()) macros to the zoran drivers. These are the preferred method for debugging and this will allow to extract the device from the zoran struct to make the call. Signed-off-by: Ian Cowan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/zoran/zoran.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b2bae4b8e637dd751d27918a6b27bd5abcd08859 Author: Eugen Hristev Date: Tue May 3 12:12:16 2022 +0100 media: atmel: atmel-sama7g5-isc: fix warning in configs without OF All warnings (new ones prefixed by >>): >> drivers/media/platform/atmel/atmel-sama7g5-isc.c:610:34: warning: unused variable 'microchip_xisc_of_match' [-Wunused-const-variable] static const struct of_device_id microchip_xisc_of_match[] = { ^ 13 warnings generated. vim +/microchip_xisc_of_match +610 drivers/media/platform/atmel/atmel-sama7g5-isc.c 609 > 610 static const struct of_device_id microchip_xisc_of_match[] = { 611 { .compatible = "microchip,sama7g5-isc" }, 612 { } 613 }; 614 MODULE_DEVICE_TABLE(of, microchip_xisc_of_match); 615 Fixed warning by guarding the atmel_isc_of_match by CONFIG_OF. Reported-by: kernel test robot Fixes: c9aa973884a1 ("media: atmel: atmel-isc: add microchip-xisc driver") Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-sama7g5-isc.c | 2 ++ 1 file changed, 2 insertions(+) commit 39ad84e911c5c0e1593f3652325d279692817188 Author: Ming Qian Date: Wed Apr 27 10:25:58 2022 +0100 media: imx-jpeg: Don't fill the description field in struct v4l2_fmtdesc The core will fill this in v4l_fill_fmtdesc(), ensuring consistent format description names. Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 2 -- 1 file changed, 2 deletions(-) commit 4336487e30c37a2e82a1fed2370d3134cc5b6505 Merge: a56b158a5078 b3820922651a Author: David S. Miller Date: Mon Jun 20 10:03:34 2022 +0100 Merge branch 'mlxsw-unified-bridge-conversion-part-1' Ido Schimmel says: ==================== mlxsw: Unified bridge conversion - part 1/6 This set starts converting mlxsw to the unified bridge model and mainly adds new device registers and extends existing ones that will be used in follow-up patchsets. High-level summary ================== The unified bridge model is a new way of managing low-level device objects such as filtering identifiers (FIDs). The conversion moves a lot of logic out of the device's firmware towards the driver, but its main selling point is that it allows to overcome various scalability issues related to the amount of entries that need to be programmed to the device. The only (intended) user visible changes of the conversion are improvement in resource utilization and ability to support more router interfaces (RIFs) in Spectrum-{2,3}. Details ======= Commit 50853808ff4a ("Merge branch 'mlxsw-Prepare-for-VLAN-aware-bridge-w-VxLAN'") converted mlxsw to emulate 802.1Q FIDs (represent VLANs in a VLAN-aware bridge) using 802.1D FIDs (represent VLAN-unaware bridges). This was necessary because at that time VNI could not be assigned to 802.1Q FIDs, which effectively meant that mlxsw could not support VXLAN with VLAN-aware bridges. The downside of this approach is that multiple {Port,VID}->FID entries are required in order to classify incoming traffic to a FID, as opposed to a single VID->FID entry that can be used with actual 802.1Q FIDs. For example, if 10 ports are members in the same VLAN-aware bridge and the same 100 VLANs are configured on each port, then only 100 VID->FID entries are required with 802.1Q FIDs, whereas 1000 {Port,VID}->FID entries are required with emulated 802.1Q FIDs. The above limitation is the result of various assumptions that were made in the design of the API that was exposed to software. In the unified bridge model the API is much more "raw" and therefore avoids these assumptions, allowing software to configure the device in a more efficient manner. ==================== Signed-off-by: David S. Miller commit b3820922651a678ef50b2247fb80dcd01c82534e Author: Amit Cohen Date: Sun Jun 19 13:29:21 2022 +0300 mlxsw: reg: Add support for VLAN RIF as part of RITR register Router interfaces (RIFs) constructed on top of VLAN-aware bridges are of "VLAN" type, whereas RIFs constructed on top of VLAN-unaware bridges of "FID" type. In other words, the RIF type is derived from the underlying FID type. VLAN RIFs are used on top of 802.1Q FIDs, whereas FID RIFs are used on top of 802.1D FIDs. Currently 802.1Q FIDs are emulated using 802.1D FIDs, and therefore VLAN RIFs are emulated using FID RIFs. As part of converting the driver to use unified bridge, 802.1Q FIDs and VLAN RIFs will be used. Add the relevant fields to RITR register, add pack() function for VLAN RIF and rename one field to fit the internal name. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit 1b1c198c306c4a0c2bbfc095efd158f1bc368a8a Author: Amit Cohen Date: Sun Jun 19 13:29:20 2022 +0300 mlxsw: Add support for egress FID classification after decapsulation As preparation for unified bridge model, add support for VNI->FID mapping via SVFA register. When performing VXLAN encapsulation, the VXLAN header needs to contain a VNI. This VNI is derived from the FID classification performed on ingress, through which the ingress RIF is also determined. Similarly, when performing VXLAN decapsulation, the FID of the packet needs to be determined. This FID is derived from VNI classification performed during decapsulation. In the old model, both entries (i.e., FID->VNI and VNI->FID) were configured via SFMR.vni. In the new model, where ingress is separated from egress, ingress configuration (VNI->FID) is performed via SVFA, while SFMR only configures egress (FID->VNI). Add 'vni' field to SVFA, add new mapping table - VNI to FID, add new pack() function for VNI mapping and edit the comment in SFMR. Signed-off-by: Amit Cohen Reviewed-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 49 ++++++++++++++++++---- drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 4 +- 2 files changed, 44 insertions(+), 9 deletions(-) commit ad9592c061e319ec9ac2ea44bc5548e06937b376 Author: Amit Cohen Date: Sun Jun 19 13:29:19 2022 +0300 mlxsw: reg: Add egress FID field to RITR register RITR configures the router interface table. As preparation for unified bridge model, add egress FID field to RITR. After routing, a packet has to perform a layer-2 lookup using the destination MAC it got from the routing and a FID. In the new model, the egress FID is configured by RITR for both sub-port and FID RIFs. Add 'efid' field to sub-port router interface and update FID router interface related comment. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 27f0b6ce06d7a919f05c3a21e47249278f2b33c0 Author: Amit Cohen Date: Sun Jun 19 13:29:18 2022 +0300 mlxsw: reg: Add Router Egress Interface to VID Register The REIV maps {egress router interface (eRIF), egress_port} -> {vlan ID}. As preparation for unified bridge model, add REIV register for future use. In the past, firmware would take care of the above mentioned mapping, but in the new model this should be done by software using REIV register. REIV register supports a simultaneous update of 256 ports using 'port_page' field. When 'port_page'=0 the records represent ports 0-255, when 'port_page'=1 the records represent ports 256-511 and so on. The register is reserved while using the legacy model. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 59 +++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 48bca94fff12b869c4e124b1201fb908c7c16e29 Author: Amit Cohen Date: Sun Jun 19 13:29:17 2022 +0300 mlxsw: reg: Replace MID related fields in SFGC register SFGC register maps {packet type, bridge type} -> {MID base, table type}. As preparation for unified bridge model, remove 'mid' field and add 'mid_base' field. The MID index (index to PGT table which maps MID to local port list and SMPE index) is a result of 'mid_base' + 'fid_offset'. Using the legacy bridge model, firmware configures 'mid_base'. However, using the new model, software is responsible to configure it via SFGC register. The 'mid_base' is configured per {packet type, bridge type}, for example, for {Unicast, .1Q}, {Broadcast, .1D}. Add the field 'mid_base' to SFGC register and increase the length of the register accordingly. Remove the field 'mid' as currently it is ignored by the device, its use is an old leftover. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/port.h | 2 -- drivers/net/ethernet/mellanox/mlxsw/reg.h | 17 +++++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) commit 94536249b8d8e7434d79e5a8373986818d7d512b Author: Amit Cohen Date: Sun Jun 19 13:29:16 2022 +0300 mlxsw: reg: Add flood related field to SFMR register SFMR register creates and configures FIDs. As preparation for unified bridge model, add a required field for future use. The PGT (Port Group) table maps multicast ID (MID) to {local port list, SMPE index} on Spectrum-1 and to {local port list} on the other ASICs. In the legacy model, software did not interact with this table directly. Instead, it was accessed by firmware in response to registers such as SFTR and SMID. In the new model, the SFTR register is deprecated and software has full control over the PGT table using the SMID register. The configuration of MDB entries (using SFD) is unchanged, but flooding configuration is completely different. SFGC register maps {packet type, bridge type} -> {MID base, table type}, then with FID and FID-offset which are configured via SFMR, the MID index is obtained. Add the field 'flood_bridge_type' to SFMR, software can separate between 802.1q FIDs and vFIDs using two types which are supported. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 485c281cadf784b4b4182f0854858cfd2fe87d34 Author: Amit Cohen Date: Sun Jun 19 13:29:15 2022 +0300 mlxsw: reg: Add VID related fields to SFD register SFD register configures FDB table. As preparation for unified bridge model, add some required fields for future use. In the new model, firmware no longer configures the egress VID, this responsibility is moved to software. For layer 2 this means that software needs to determine the egress VID for both unicast and multicast. For unicast FDB records and unicast LAG FDB records, the VID needs to be set via new fields in SFD - 'set_vid' and 'vid'. Add the two mentioned fields for future use. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 37 ++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) commit 92e4e543b1287c19b83b0a4845c10ef7f2aec937 Author: Amit Cohen Date: Sun Jun 19 13:29:14 2022 +0300 mlxsw: reg: Add SMPE related fields to SFMR register SFMR register creates and configures FIDs. As preparation unified bridge model, add some required fields for future use. The device includes two main tables to support layer 2 multicast (i.e., MDB and flooding). These are the PGT (Port Group Table) and the MPE (Multicast Port Egress) table. - PGT is {MID -> (bitmap of local_port, SPME index)} - MPE is {(Local port, SMPE index) -> eVID} In Spectrum-2 and later ASICs, the SMPE index is an attribute of the FID and programmed via new fields in SFMR register - 'smpe_valid' and 'smpe'. Add the two mentioned fields for future use and increase the length of the register accordingly. Signed-off-by: Amit Cohen Reviewed-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 894b98d50b6415ef4ff8cdbc9725e249f9d8fd24 Author: Amit Cohen Date: Sun Jun 19 13:29:13 2022 +0300 mlxsw: Add SMPE related fields to SMID2 register SMID register maps multicast ID (MID) into a list of local ports. As preparation for unified bridge model, add some required fields for future use. The device includes two main tables to support layer 2 multicast (i.e., MDB and flooding). These are the PGT (Port Group Table) and the MPE (Multicast Port Egress) table. - PGT is {MID -> (bitmap of local_port, SPME index)} - MPE is {(Local port, SMPE index) -> eVID} In Spectrum-1, both indexes into the MPE table (local port and SMPE) are derived from the PGT table. Therefore, the SMPE index needs to be programmed as part of the PGT entry via new fields in SMID - 'smpe_valid' and 'smpe'. Add the two mentioned fields for future use and align the callers of mlxsw_reg_smid2_pack() to pass zeros for SMPE fields. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 21 ++++++++++++++++++++- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 7 ++++--- 2 files changed, 24 insertions(+), 4 deletions(-) commit e0f071c5b8e123e13f3c3ccf4285cbab44394481 Author: Amit Cohen Date: Sun Jun 19 13:29:12 2022 +0300 mlxsw: reg: Add Switch Multicast Port to Egress VID Register The SMPE register maps {egress_port, SMPE index} -> VID. The device includes two main tables to support layer 2 multicast (i.e., MDB and flooding). These are the PGT (Port Group Table) and the MPE (Multicast Port Egress) table. - PGT is {MID -> (bitmap of local_port, SPME index)} - MPE is {(Local port, SMPE index) -> eVID} In Spectrum-1, the index into the MPE table - called switch multicast to port egress VID (SMPE) - is derived from the PGT entry, whereas in Spectrum-2 and later ASICs it is derived from the FID. In the legacy model, software did not interact with this table as it was completely hidden in firmware. In the new model, software needs to populate the table itself in order to map from {Local port, SMPE index} to an egress VID. This is done using the SMPE register. Add the register for future use. Signed-off-by: Amit Cohen Reviewed-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit dd326565c59e8f675a1e7e795dee9eae1f8956bc Author: Amit Cohen Date: Sun Jun 19 13:29:11 2022 +0300 mlxsw: reg: Add ingress RIF related fields to SVFA register SVFA register controls the VID to FID mapping and {Port, VID} to FID mapping for virtualized ports. As preparation for unified bridge model, add some required fields for future use. On ingress, after ingress ACL, a packet needs to be classified to a FID. The key for this lookup can be one of: 1. VID. When port is not in virtual mode. 2. {RQ, VID}. When port is in virtual mode. 3. FID. When FID was set by ingress ACL. Since RITR no longer performs ingress configuration, the ingress RIF for the first two entry types needs to be set via new fields in SVFA - 'irif_v' and 'irif'. Add the two mentioned fields for future use and increase the length of the register accordingly. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit e459466a26bbfb1745e0227e0dc4015894f4d277 Author: Amit Cohen Date: Sun Jun 19 13:29:10 2022 +0300 mlxsw: reg: Add ingress RIF related fields to SFMR register SFMR register creates and configures FIDs. As preparation for unified bridge model, add some required fields for future use. On ingress, after ingress ACL, a packet needs to be classified to a FID. The key for this lookup can be one of: 1. VID. When port is not in virtual mode. 2. {RQ, VID}. When port is in virtual mode. 3. FID. When FID was set by ingress ACL. For example, via VR_AND_FID_ACTION. Since RITR no longer performs ingress configuration, the ingress RIF for the last entry type needs to be set via new fields in SFMR - 'irif_v' and 'irif'. Add the two mentioned fields for future use. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 02d23c9544eae073d101e1c7e94c6de36a7891e2 Author: Amit Cohen Date: Sun Jun 19 13:29:09 2022 +0300 mlxsw: reg: Add 'flood_rsp' field to SFMR register SFMR register creates and configures FIDs. As preparation for unified bridge model, add a field for future use. In the new model, RITR no longer configures the rFID used for sub-port RIFs and it has to be created by software via SFMR. Such FIDs need to be created with special flood indication using 'flood_rsp' field. When set, this bit instructs the device to manage the flooding entries for this FID in a reserved part of the port group table (PGT). Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 2ef6efa79fecd5e3457b324155d35524d95f2b6b Author: Thomas Hellström Date: Fri Jun 17 17:28:55 2022 +0200 drm/i915: Improve on suspend / resume time with VT-d enabled When DMAR / VT-d is enabled, the display engine uses overfetching, presumably to deal with the increased latency. To avoid display engine errors and DMAR faults, as a workaround the GGTT is populated with scatch PTEs when VT-d is enabled. However starting with gen10, Write-combined writing of scratch PTES is no longer possible and as a result, populating the full GGTT with scratch PTEs like on resume becomes very slow as uncached access is needed. Therefore, on integrated GPUs utilize the fact that the PTEs are stored in stolen memory which retain content across S3 suspend. Don't clear the PTEs on suspend and resume. This improves on resume time with around 100 ms. While 100+ms might appear like a short time it's 10% to 20% of total resume time and important in some applications. One notable exception is Intel Rapid Start Technology which may cause stolen memory to be lost across what the OS percieves as S3 suspend. If IRST is enabled or if we can't detect whether IRST is enabled, retain the old workaround, clearing and re-instating PTEs. As an additional measure, if we detect that the last ggtt pte was lost during suspend, print a warning and re-populate the GGTT ptes On discrete GPUs, the display engine scans out from LMEM which isn't subject to DMAR, and presumably the workaround is therefore not needed, but that needs to be verified and disabling the workaround for dGPU, if possible, will be deferred to a follow-up patch. v2: - Rely on retained ptes to also speed up suspend and resume re-binding. - Re-build GGTT ptes if Intel rst is enabled. v3: - Re-build GGTT ptes also if we can't detect whether Intel rst is enabled, and if the guard page PTE and end of GGTT was lost. v4: - Fix some kerneldoc issues (Matthew Auld), rebase. Signed-off-by: Thomas Hellström Acked-by: Daniel Vetter Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220617152856.249295-1-thomas.hellstrom@linux.intel.com drivers/gpu/drm/i915/gt/intel_ggtt.c | 56 ++++++++++++++++++++++++++++++++---- drivers/gpu/drm/i915/gt/intel_gtt.h | 24 ++++++++++++++++ drivers/gpu/drm/i915/i915_driver.c | 16 +++++++++++ 3 files changed, 90 insertions(+), 6 deletions(-) commit a56b158a5078b8120d3d72fc9fd44efed5123b12 Author: Ronak Doshi Date: Sun Jun 19 17:10:13 2022 -0700 vmxnet3: disable overlay offloads if UPT device does not support 'Commit 6f91f4ba046e ("vmxnet3: add support for capability registers")' added support for capability registers. These registers are used to advertize capabilities of the device. The patch updated the dev_caps to disable outer checksum offload if PTCR register does not support it. However, it missed to update other overlay offloads. This patch fixes this issue. Fixes: 6f91f4ba046e ("vmxnet3: add support for capability registers") Signed-off-by: Ronak Doshi Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_drv.c | 9 ++++++++- drivers/net/vmxnet3/vmxnet3_ethtool.c | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) commit 6f9d70466c89377451033fa2cf55c8cb3ece7cd2 Merge: 9776fe0f424b f289c02bf41b Author: David S. Miller Date: Mon Jun 20 09:10:13 2022 +0100 Merge branch 'raw-rcu-fixes' Kuniyuki Iwashima says: ==================== raw: Fix nits of RCU conversion series. The first patch fixes a build error by commit ba44f8182ec2 ("raw: use more conventional iterators"), but it does not land in the net tree, so this series is targeted to net-next. The second patch replaces some hlist functions with sk's helper macros. ==================== Signed-off-by: David S. Miller commit f289c02bf41b55fbfccf21d72c4ac44cd4a7a107 Author: Kuniyuki Iwashima Date: Sun Jun 19 16:29:27 2022 -0700 raw: Use helpers for the hlist_nulls variant. hlist_nulls_add_head_rcu() and hlist_nulls_for_each_entry() have dedicated macros for sk. Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/ipv4/raw.c | 8 ++++---- net/ipv4/raw_diag.c | 4 ++-- net/ipv6/raw.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) commit 5da39e31b1b0eb62b8ed369ad9615da850239e9e Author: Kuniyuki Iwashima Date: Sun Jun 19 16:29:26 2022 -0700 raw: Fix mixed declarations error in raw_icmp_error(). The trailing semicolon causes a compiler error, so let's remove it. net/ipv4/raw.c: In function ‘raw_icmp_error’: net/ipv4/raw.c:266:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] 266 | struct hlist_nulls_head *hlist; | ^~~~~~ Fixes: ba44f8182ec2 ("raw: use more conventional iterators") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/ipv4/raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4175971d0effb00f01c48a2990f51c1f1503be98 Author: Chang Yu Date: Sun Jun 19 12:42:31 2022 -0700 Staging: r8188eu: core: rtw_xmit: Fixed a coding style issue Moved the constant ETH_P_IP to the right hand side of the comparison as per checkpatch.pl Signed-off-by: Chang Yu Link: https://lore.kernel.org/r/e938a8ac0ff3a9d777754a081c7a08026aaae253.1655666628.git.marcus.yu.56@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_xmit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34a033fe34766920c36bae15ff7e154ac234abc6 Author: Chang Yu Date: Sun Jun 19 12:42:30 2022 -0700 Staging: r8188eu: core: rtw_xmit: Fixed a brace coding style issue Removed superfluous brackets around a if clause as per checkpatch.pl Signed-off-by: Chang Yu Link: https://lore.kernel.org/r/ff6f2ecb22c3d295ceae0dab593bedfc6eac9e32.1655666628.git.marcus.yu.56@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_xmit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit afc0eba8b3e5668f891f9fcd835ddb47281033bd Author: Chang Yu Date: Sun Jun 19 12:42:29 2022 -0700 Staging: r8188eu: core: rtw_xmit: Fixed some spelling errors in the comments Fixed the spelling of "broadcast" and "update" in the comments. Signed-off-by: Chang Yu Link: https://lore.kernel.org/r/8d2f49631551b53ad970c9165cceb845c4d60b75.1655666628.git.marcus.yu.56@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_xmit.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4c813e791b149c785f03180c161d14eb800527bd Author: Chang Yu Date: Sun Jun 19 12:42:28 2022 -0700 Staging: r8188eu: core: rtw_xmit: Fixed two indentation coding style issues. Fixed two indentation issues. Signed-off-by: Chang Yu Link: https://lore.kernel.org/r/6b0e3efe83bf06ea60cdbe27f31f6f3aa1058f01.1655666628.git.marcus.yu.56@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_xmit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9832187bf9423ba2b3e3932e67cf7517a60c338f Author: Chang Yu Date: Sun Jun 19 12:42:27 2022 -0700 Staging: r8188eu: core: rtw_xmit: Fixed some whitespace coding style issues Removed superfluous blank lines and added blank lines after variable declarations as per checkpath.pl Signed-off-by: Chang Yu Link: https://lore.kernel.org/r/841716cec5032ad706fbee8677e1b67aec8ad736.1655666628.git.marcus.yu.56@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_xmit.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit aa64e956f4bde5f41c8302d990f8b4222e035c8d Author: Daniel Watson Date: Sun Jun 19 22:45:29 2022 -0700 staging: rtl8723bs: remove trailing whitespace remove trailing whitespace found by checkpatch Signed-off-by: Daniel Watson Link: https://lore.kernel.org/r/20220620054529.4019-1-ozzloy@challenge-bot.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0c718411cbb259d47d9d824d173b6770e7a3ee5 Author: Stefan Wahren Date: Sat Jun 18 11:00:02 2022 +0200 staging: vchiq: provide testing instructions This small document should to help kernel developer to test their changes on the VCHIQ driver. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20220618090002.20663-1-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/TESTING | 82 +++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit 6e9e4acd8a0611193fa9fabf4dd53c48c0122b2a Author: Arne Petersen Date: Sat Jun 18 10:32:57 2022 +0200 staging: sm750fb: fix CamelCase function parameter Change function parameter in header file from powerMode to mode, now identical to c file function declaration. Issue found by checkpatch. Signed-off-by: Arne Petersen Link: https://lore.kernel.org/r/Yq2NufHtWbuXCjWE@ubuntu Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_power.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 012e6068801ced67856ffa867e9093733f56b2f4 Author: Daniel Watson Date: Wed Jun 15 10:17:03 2022 -0700 staging: r8188eu: call rtw_IOL_append_WRF_cmd directly Call rtw_IOL_append_WRF_cmd directly, instead of using wrapper macro. Delete wrapper macro, which is not needed. Signed-off-by: Daniel Watson Link: https://lore.kernel.org/r/4f26e0dd99e32738d7019ebcf680e7c73ed8ac8a.1655312169.git.ozzloy@challenge-bot.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_iol.c | 2 +- drivers/staging/r8188eu/include/rtw_iol.h | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) commit 892ba0393f5ae295e1a8c36f9fb5ca157f95cc28 Author: Daniel Watson Date: Wed Jun 15 10:17:02 2022 -0700 staging: r8188eu: call rtw_IOL_append_WD_cmd directly Call rtw_IOL_append_WD_cmd directly, instead of using wrapper macro. Delete wrapper macro, which is not needed. Signed-off-by: Daniel Watson Link: https://lore.kernel.org/r/005bbee3575555135be26be9b80a9ceb35d6069f.1655312169.git.ozzloy@challenge-bot.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_iol.c | 2 +- drivers/staging/r8188eu/include/rtw_iol.h | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) commit 75997163e013779ca616642b01bc44de313d067a Author: Daniel Watson Date: Wed Jun 15 10:17:01 2022 -0700 staging: r8188eu: call rtw_IOL_append_WW_cmd directly Call rtw_IOL_append_WW_cmd directly, instead of using wrapper macro. Delete wrapper macro, which is not needed. Signed-off-by: Daniel Watson Link: https://lore.kernel.org/r/ca53fca1d5557684a4f6430ecd88aef481238ada.1655312169.git.ozzloy@challenge-bot.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_iol.c | 2 +- drivers/staging/r8188eu/include/rtw_iol.h | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) commit 43bf6b646d0a3f1419468a22e12d1fd46b47441e Author: Daniel Watson Date: Wed Jun 15 10:17:00 2022 -0700 staging: r8188eu: call rtw_IOL_append_WB_cmd directly Call rtw_IOL_append_WB_cmd directly, instead of using wrapper macro. Delete wrapper macro, which is not needed. Signed-off-by: Daniel Watson Link: https://lore.kernel.org/r/e0002dcce35e78a4c7308515f68e473cad2f290b.1655312169.git.ozzloy@challenge-bot.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_iol.c | 2 +- drivers/staging/r8188eu/include/rtw_iol.h | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) commit 97319bf5ca2af392b5719a614ca4dbf28dcfd150 Author: Nam Cao Date: Tue Jun 14 17:58:45 2022 +0200 staging: r8188eu: remove unused macros Remove LE_BITS_TO_1BYTE and relevant macros because they are not used anywhere. Reviewed-by: Dan Carpenter Signed-off-by: Nam Cao Link: https://lore.kernel.org/r/a7f700c0688a16bb697fb693894f4c16594fd483.1655220367.git.namcaov@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/basic_types.h | 31 --------------------------- 1 file changed, 31 deletions(-) commit d3bf108493f20a803b04fd7620f56dabeed47089 Author: Nam Cao Date: Tue Jun 14 17:58:44 2022 +0200 staging: r8188eu: replace confusing macros The macro GET_TX_REPORT_TYPE1_RERTY_0 and similar macros are not obvious on what they are doing. Replace them with clearer codes. Reviewed-by: Dan Carpenter Signed-off-by: Nam Cao Link: https://lore.kernel.org/r/e697e47aad21362f68d148d2351e6d49f4fa9eaf.1655220367.git.namcaov@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/Hal8188ERateAdaptive.c | 12 ++++++------ drivers/staging/r8188eu/include/Hal8188ERateAdaptive.h | 13 ------------- 2 files changed, 6 insertions(+), 19 deletions(-) commit 488ca2cb93453e4ef27162fc61c1b525ef04bc47 Author: Dongliang Mu Date: Tue Jun 14 21:32:29 2022 +0800 staging: r8188eu: remove NULL check before vfree vfree can handle NULL pointer as its argument. According to coccinelle isnullfree check, remove NULL check before vfree operation. Signed-off-by: Dongliang Mu Link: https://lore.kernel.org/r/20220614133239.147076-1-dzm91@hust.edu.cn Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/os_dep/usb_intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22fe2b36493f195b3f705043877f6c1456f1fd90 Merge: 235a6d80f021 a111daf0c53a Author: Greg Kroah-Hartman Date: Mon Jun 20 09:41:33 2022 +0200 Merge v5.19-rc3 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 3809db6430bf6a725d234e6eec9a6f6be6b8c1ea Author: Takashi Iwai Date: Fri Jun 17 16:40:51 2022 +0200 ALSA: rawmidi: Take buffer refcount while draining output Although snd_rawmidi_drain_output() may take some long time, it has no protection and intrusive operations like the buffer resize may happen meanwhile. For making the operation a bit more robust, this patch takes the buffer refcount for blocking the buffer resize. Also, as this function is exported, in theory, it might be called asynchronously from the stream open/close state. For avoiding the missing refcount, now the close call checks the buffer refcount, too. Link: https://lore.kernel.org/r/20220617144051.18985-6-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/rawmidi.c | 45 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) commit 463a20fd3481de33c2746f050b4e3f2e6db8017f Author: Takashi Iwai Date: Fri Jun 17 16:40:50 2022 +0200 ALSA: rawmidi: Check stream state at exported functions The rawmidi interface provides some exported functions to be called from outside, and currently there is no state check for those calls whether the stream is properly opened and running. Although such an invalid call shouldn't happen, but who knows. This patch adds the proper rawmidi stream state checks with spinlocks for avoiding unexpected accesses when such exported functions are called in an invalid state. After this patch, with the substream->opened and substream->runtime are always tied and guaranteed to be set under substream->lock. Link: https://lore.kernel.org/r/20220617144051.18985-5-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/rawmidi.c | 56 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 18 deletions(-) commit 94b98194b62e3fe3f27129d8e4b1f3fd7c5e972b Author: Takashi Iwai Date: Fri Jun 17 16:40:49 2022 +0200 ALSA: rawmidi: Take open_mutex around parameter changes The input/output parameter changes are pretty intrusive, possibly involving with the buffer resizing operation. Hence those should be performed exclusively; otherwise some ugly race could happen. This patch puts the existing open_mutex for snd_rawmidi_input_params() and *_output_params() for protecting the concurrent calls. Since those are exported, it's also meant for hardening from the external calls, too. Link: https://lore.kernel.org/r/20220617144051.18985-4-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/rawmidi.c | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) commit f1d40433352e5d4babd59c0dd50b5f9414073ddb Author: Takashi Iwai Date: Fri Jun 17 16:40:48 2022 +0200 ALSA: rawmidi: Move lock to snd_rawmidi_substream Having a lock in snd_rawmidi_runtime can be a problem especially when a substream is accessed from the outside, as the runtime creation might be racy with the external calls. As a first step for hardening, move the spinlock from snd_rawmidi_runtime to snd_rawmidi_substream. This patch just replaces the lock calls, no real functional change is put yet. Link: https://lore.kernel.org/r/20220617144051.18985-3-tiwai@suse.de Signed-off-by: Takashi Iwai include/sound/rawmidi.h | 2 +- sound/core/rawmidi.c | 131 +++++++++++++++++++++++------------------------- 2 files changed, 65 insertions(+), 68 deletions(-) commit cd76175a2b204911a3cddef36b99e56945b6938c Author: Takashi Iwai Date: Fri Jun 17 16:40:47 2022 +0200 ALSA: rawmidi: Make internal functions local static __snd_rawmidi_transmit_peek() and __snd_rawmidi_transmit_ack() are never called from the outside. Let's make them local static and unexport them. Link: https://lore.kernel.org/r/20220617144051.18985-2-tiwai@suse.de Signed-off-by: Takashi Iwai include/sound/rawmidi.h | 4 ---- sound/core/rawmidi.c | 13 ++++++------- 2 files changed, 6 insertions(+), 11 deletions(-) commit df36f3e3fbb76d30d623a1623e31e3ce9c2fa750 Merge: 65534736d9a5 a111daf0c53a Author: Greg Kroah-Hartman Date: Mon Jun 20 09:32:47 2022 +0200 Merge tag 'v5.19-rc3' into tty-next We need the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit e8f4118f4297f93e82ebcf4dd1eb6e48fead592e Merge: de9257ae1d3b a111daf0c53a Author: Greg Kroah-Hartman Date: Mon Jun 20 08:59:23 2022 +0200 Merge 5.19-rc3 into staging-next This resolves the merge issue with: drivers/staging/r8188eu/os_dep/ioctl_linux.c Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman commit 7dc3ba0a071892ea212f90f63738fd9f81b1f638 Author: Christophe Leroy Date: Sat Jun 11 18:55:16 2022 +0200 powerpc: Move prom_init() out of asm-prototypes.h This is the end of the work started with commit 76222808fc25 ("powerpc: Move C prototypes out of asm-prototypes.h") Now that asm/machdep.h doesn't include asm/setup.h anymore, there are no conflicts anymore with the function prom_init() defined in drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.o So we can move it to asm/setup.h Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e111e4f0addb0fa810d5f6a71d3b8e62c0b53492.1654966508.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/asm-prototypes.h | 6 ------ arch/powerpc/include/asm/setup.h | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) commit 113fe88eed53af08800f54a03e463636105831e0 Author: Christophe Leroy Date: Sat Jun 11 18:55:15 2022 +0200 powerpc: Don't include asm/setup.h in asm/machdep.h asm/machdep.h doesn't need asm/setup.h Remove it. Add it directly in files that needs it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/3b1dfb19a2c3265fb4abc2bfc7b6eae9261a998b.1654966508.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/machdep.h | 2 -- arch/powerpc/kernel/pci-common.c | 1 + arch/powerpc/kernel/prom.c | 2 +- arch/powerpc/kernel/prom_init.c | 2 +- arch/powerpc/kexec/core.c | 1 + arch/powerpc/kvm/powerpc.c | 1 + arch/powerpc/mm/mem.c | 1 + arch/powerpc/platforms/pseries/kexec.c | 2 +- arch/powerpc/platforms/pseries/lpar.c | 2 +- arch/powerpc/platforms/pseries/setup.c | 1 + arch/powerpc/sysdev/fsl_pci.c | 1 + drivers/scsi/mesh.c | 2 +- 12 files changed, 11 insertions(+), 7 deletions(-) commit ea0fb37ba036924f175046ce3e544c613cd32ee5 Author: Max Krummenacher Date: Wed Jun 15 13:50:06 2022 +0200 ARM: dts: imx6q-apalis: Cleanup - Sort nodes and properties alphabetical - End all pinctrl node names in grp and avoid using dashes - Change the pmic's node name to pmic@8 per binding requirement - Add sound-dai-cells to the codec node per binding requirement Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-apalis-eval.dts | 20 +-- arch/arm/boot/dts/imx6q-apalis-ixora.dts | 15 +-- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 217 ++++++++++++++++--------------- 3 files changed, 126 insertions(+), 126 deletions(-) commit 8e4724c93c76c46872e47ca32f0225ad6b0c5ce3 Author: Max Krummenacher Date: Wed Jun 15 13:50:05 2022 +0200 ARM: dts: imx6q-apalis: backlight pwm: Adapt brightness steps Adapt the brightness steps as the backlight doesn't light up for very low duty cycles. Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-apalis.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e366f7f7fcf6c98298644f45c7fe6660c3e30ffc Author: Max Krummenacher Date: Wed Jun 15 13:50:04 2022 +0200 ARM: dts: imx6q-apalis: backlight pwm: Simplify inverted backlight Set #pwm-cells to the default 3 to gain access to the parameter which allows inverting the PWM signal. This is useful to specify a backlight which has its highest brightness at 0. With the change to use the PWM with inverted polarity the PWM signal is inverted to how it was before this patch. This changes the meaning of the values in the brightness-levels property. I.e. the duty-cycle changes from x/255 to (255-x)/255. Keeping the brightness-levels will then have a big brightness jump from 0 to 127 duty cycle, the other 6 steps will then be barely noticeable. Change the brightness-levels to provide the same brightness-levels as before. Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-apalis.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1868abc13d3dffd31479867b1b11def92baa9f0d Author: Max Krummenacher Date: Wed Jun 15 13:50:03 2022 +0200 ARM: dts: imx6q-apalis: Add support for Toradex Ixora V1.2 carrier boards The Ixora V1.2 carrier board adds SW relevant new features compared to the V1.1 version. - An I2C EEPROM is added. - The SD card slot got a switchable 3.3V supply. - Pull ups on the SD card signals are not assembled to faciliate 1.8V speed modes. - The CAN transceivers got a switchable 3.3V supply. Add a new device tree and, as the differences are so small rework the device tree for V1.1 to include the V1.2 device tree and adjust as needed. Drop adding the toradex,apalis_imx6q-ixora to the dtb compatible to adhere to the binding yaml document. Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts | 178 ++--------------- arch/arm/boot/dts/imx6q-apalis-ixora-v1.2.dts | 276 ++++++++++++++++++++++++++ 3 files changed, 289 insertions(+), 166 deletions(-) commit 6a1155449899732e80cd2d8ef2e430e6562b41c5 Author: Denys Drozdov Date: Wed Jun 15 13:50:02 2022 +0200 ARM: dts: imx6q-apalis: Clean-up sd card support Configure SOM DTSI to 8-bit, card detect in the SoM dtsi as this is the Apalis family default functionality. Limit the interface to 4-bit only on the Ixora V1.1 carrier boards. Signed-off-by: Denys Drozdov Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-apalis-eval.dts | 3 --- arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts | 1 - arch/arm/boot/dts/imx6qdl-apalis.dtsi | 3 ++- 3 files changed, 2 insertions(+), 5 deletions(-) commit 9560fc59425cfe43381739da9eae52ffee28116f Author: Oleksandr Suvorov Date: Wed Jun 15 13:50:01 2022 +0200 ARM: dts: imx6q-apalis: Add adv7280 video input The Apalis iMX6 modules allow connecting a parallel video input. Add support for our ADV7280 video input module but have it disabled. This allows to enable it in an overlay per the current system configuration. Signed-off-by: Oleksandr Suvorov Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-apalis.dtsi | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit b656eb41be70e205916a1d0a80ee412690336b9d Author: Oleksandr Suvorov Date: Wed Jun 15 13:50:00 2022 +0200 ARM: dts: imx6q-apalis: Add ov5640 mipi csi camera The Apalis iMX6 modules allow connecting a mipi-csi video input. Add support for our OV5640 camera module but have it disabled. This allows to enable it in an overlay per the current system configuration. Signed-off-by: Oleksandr Suvorov Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-apalis.dtsi | 67 ++++++++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) commit 30b847665e41d330ad0cec2bf42819875e2124eb Author: Oleksandr Suvorov Date: Wed Jun 15 13:49:59 2022 +0200 ARM: dts: imx6q-apalis: Disable stmpe touchscreen Unify its label with other toradex SoM dtbs. This allows to enable it in an overlay per the current system configuration. Signed-off-by: Oleksandr Suvorov Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-apalis.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6429a399ae6f9396a214ca1fda8642798fcabb7a Author: Max Krummenacher Date: Wed Jun 15 13:49:58 2022 +0200 ARM: dts: imx6q-apalis: Disable HDMI This allows to enable it in an overlay per the current system configuration. Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-apalis-eval.dts | 4 ---- arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts | 4 ---- arch/arm/boot/dts/imx6q-apalis-ixora.dts | 4 ---- 3 files changed, 12 deletions(-) commit a9b9f1c6de0db9623dbfd0df44e07ad68ed24ffb Author: Oleksandr Suvorov Date: Wed Jun 15 13:49:57 2022 +0200 ARM: dts: imx6q-apalis: Add LVDS panel support Add LVDS panel and endpoint linkage support but keep the inherited disabled state. This allows to enable it in an overlay per the current system configuration. Signed-off-by: Oleksandr Suvorov Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-apalis-eval.dts | 4 --- arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts | 4 --- arch/arm/boot/dts/imx6q-apalis-ixora.dts | 4 --- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 36 +++++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 12 deletions(-) commit 1347e20118d58926672e969e608485e9876427db Author: Max Krummenacher Date: Wed Jun 15 13:49:56 2022 +0200 ARM: dts: imx6q-apalis: move gpio-keys to SoM dtsi Move gpio-keys to module-level device tree given it is standard Apalis functionality. Sort properties alphabetical. Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-apalis-eval.dts | 14 -------------- arch/arm/boot/dts/imx6q-apalis-ixora.dts | 14 -------------- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 14 ++++++++++++++ 3 files changed, 14 insertions(+), 28 deletions(-) commit 2c119c4d9cdf208f94aaa8e1b4af7981d9a4b532 Author: Max Krummenacher Date: Wed Jun 15 13:49:55 2022 +0200 ARM: dts: imx6q-apalis: Move Atmel MXT touch ctrl to SoM dtsi Reduces code duplication. While at it drop the comments which do not apply on Apalis iMX6 but add the correct SoM pin names. Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-apalis-eval.dts | 13 ------------- arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts | 13 ------------- arch/arm/boot/dts/imx6q-apalis-ixora.dts | 13 ------------- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 11 +++++++++++ 4 files changed, 11 insertions(+), 39 deletions(-) commit 1c5fa82860d84327ae0355016852928f300745a9 Author: Oleksandr Suvorov Date: Wed Jun 15 13:49:54 2022 +0200 ARM: dts: imx6q-apalis: Move pinmux groups to SoM dtsi GPIO pinmux groups are declared on the module level. Move muxing them to the same level. It also reduces code duplication. Signed-off-by: Oleksandr Suvorov Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-apalis-eval.dts | 12 ------------ arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts | 10 ---------- arch/arm/boot/dts/imx6q-apalis-ixora.dts | 8 -------- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 8 ++++++++ 4 files changed, 8 insertions(+), 30 deletions(-) commit 36d46dff9d5a7b206db8f0560e5802488a438ac5 Author: Oleksandr Suvorov Date: Wed Jun 15 13:49:53 2022 +0200 ARM: dts: imx6q-apalis: Move parallel rgb interface to SoM dtsi Move all Parallel RGB-related nodes to the module level and disable it by default. This allows to enable it in an overlay per the current system configuration. Update SPDX-License spelling to latest convention. Update Copyright year. Signed-off-by: Oleksandr Suvorov Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-apalis-eval.dts | 57 +-------------------------- arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts | 55 +------------------------- arch/arm/boot/dts/imx6q-apalis-ixora.dts | 55 +------------------------- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 52 ++++++++++++++++++++++-- 4 files changed, 55 insertions(+), 164 deletions(-) commit 4eb56e26f92e9071a267ff71a373f33235fe9b48 Author: Max Krummenacher Date: Wed Jun 15 13:49:52 2022 +0200 ARM: dts: imx6q-apalis: Command pmic to standby for poweroff The Apalis iMX6 HW doesn't allow to use the PWR_ON_REQ signal for poweroff. Use the fsl,pmic-stby-poweroff property to command the PMIC into a low power mode in poweroff. Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-apalis.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 966b48d983daa15ae4af56b24ae5ec6ec5eae0d7 Author: Max Krummenacher Date: Wed Jun 15 13:49:51 2022 +0200 ARM: dts: imx6q-apalis: Add gpio-line-names Add GPIO line names on module level. Those are all GPIOs which a user might use on his custom carrier board. If more meaningful names are available on the carrier board, the user can overwrite the line names in the carrier board level device tree. Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-apalis.dtsi | 193 ++++++++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) commit 9c0919acb3fa7c1a24e384ff912f2d88f060c373 Author: Max Krummenacher Date: Wed Jun 15 13:49:50 2022 +0200 Revert "ARM: dts: imx6qdl-apalis: Avoid underscore in node name" The STMPE MFD device binding requires the child node to have a fixed name, i.e. with '_', not '-'. Otherwise the stmpe_adc, stmpe_touchscreen drivers will not be probed. Fixes: 56086b5e804f ("ARM: dts: imx6qdl-apalis: Avoid underscore in node name") Reviewed-by: Ahmad Fatoum Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-apalis.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 560c73ac973407e4622d1a589010303e07fa0e1e Author: Max Krummenacher Date: Wed Jun 15 13:49:49 2022 +0200 dt-bindings: arm: fsl: Add carrier for toradex,apalis-imx6q Add binding for the Ixora V1.2 carrier board our Apalis iMX6D/Q may be mated with. Acked-by: Rob Herring Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.yaml | 1 + 1 file changed, 1 insertion(+) commit f5f1e907718beb8a1c86247bc634997dddfa90c1 Author: Uwe Kleine-König Date: Fri Jun 17 19:32:54 2022 +0200 arm64: freescale/imx8mp-evk.dts: reorder nodes alphabetically The nodes after the root nodes are supposed to be ordered alphabetically. There is however an expection for &pinctrl that some consider to be good placed at the end of the file. So only move flexcan1 and flexcan2 to their proper place. Signed-off-by: Uwe Kleine-König Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 825bd2351122f127ebbaa719a46b2a104a4e3045 Author: Fabio Estevam Date: Tue Jun 14 13:39:44 2022 -0300 arm64: dts: imx8mq: Pass a label to the AIPS nodes Pass a label to the AIPS nodes to make it easier to reference it from other devicetree files. The other i.MX8M dtsi files already describe labels for the AIPS nodes. Make it available for imx8mq for consistency. U-Boot, for example usually needs to access the AIPS node to pass U-Boot-specific properties. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mq.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fcdef92ba63975db537b7ac887961bdda54dfe12 Author: Fabio Estevam Date: Tue Jun 14 13:39:43 2022 -0300 arm64: dts: imx8m: Pass a label to the soc node Pass a label to the 'soc' node to make it easier to reference it from other devicetree files. U-Boot, for example usually needs to access the AIPS node to pass U-Boot-specific properties. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mn.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit e56d3274770e07f9542a1a129fdf0979ec87f4b1 Author: Fabio Estevam Date: Tue Jun 14 13:22:34 2022 -0300 ARM: dts: imx: Pass a label to the AIPS nodes Pass a label to the AIPS nodes to make it easier to reference it from other devicetree files. Some i.MX dtsi files already describe labels for the AIPS nodes. Make it available for all SoCs for consistency. U-Boot, for example usually needs to access the AIPS node to pass U-Boot-specific properties. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx27.dtsi | 4 ++-- arch/arm/boot/dts/imx31.dtsi | 2 +- arch/arm/boot/dts/imx50.dtsi | 4 ++-- arch/arm/boot/dts/imx51.dtsi | 4 ++-- arch/arm/boot/dts/imx53.dtsi | 4 ++-- arch/arm/boot/dts/imx6q.dtsi | 2 +- arch/arm/boot/dts/imx6qdl.dtsi | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) commit 8e82a523151164e495f04f50c1af70f2d9adacf0 Author: Fabio Estevam Date: Tue Jun 14 13:22:33 2022 -0300 ARM: dts: imx: Pass a label to the soc node Pass a label to the 'soc' node to make it easier to reference it from other devicetree files. U-Boot, for example usually needs to access the AIPS node to pass U-Boot-specific properties. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx25.dtsi | 2 +- arch/arm/boot/dts/imx27.dtsi | 2 +- arch/arm/boot/dts/imx31.dtsi | 2 +- arch/arm/boot/dts/imx50.dtsi | 2 +- arch/arm/boot/dts/imx51.dtsi | 2 +- arch/arm/boot/dts/imx53.dtsi | 2 +- arch/arm/boot/dts/imx6dl.dtsi | 2 +- arch/arm/boot/dts/imx6q.dtsi | 2 +- arch/arm/boot/dts/imx6qdl.dtsi | 2 +- arch/arm/boot/dts/imx6sx.dtsi | 2 +- arch/arm/boot/dts/imx6ul.dtsi | 2 +- arch/arm/boot/dts/imx6ull.dtsi | 2 +- arch/arm/boot/dts/imx7d.dtsi | 2 +- arch/arm/boot/dts/imx7s.dtsi | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) commit 4bd07304c8d2e51304a451c03ef267a834a944d5 Author: Fabio Estevam Date: Thu Jun 16 14:08:00 2022 -0300 dt-bindings: arm: fsl: Decrease the line length Decrease the line length of the toradex colibri boards to fix the following build warning: ./Documentation/devicetree/bindings/arm/fsl.yaml:684:111: [warning] line too long (111 > 110 characters) (line-length) The description already contains the SoM name, do not repeat it in every single line. Reported-by: Rob Herring Signed-off-by: Fabio Estevam Reviewed-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.yaml | 32 +++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 9794c30841681975e5f49464f98c0088c0e3945d Author: Marek Vasut Date: Mon Jun 13 16:58:25 2022 +0200 dt-bindings: arm: Add DH electronics i.MX8M Plus DHCOM and PDK2 Add DT compatible string for DH electronics i.MX8M Plus DHCOM and PDK2 into YAML DT binding document. This system is a general purpose SoM and evaluation board. Acked-by: Rob Herring Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Rob Herring Cc: Shawn Guo Cc: NXP Linux Team Cc: devicetree@vger.kernel.org To: linux-arm-kernel@lists.infradead.org Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 5f1387b8a4c5486b1bc6bab116b15c75423610ac Author: Marcel Ziswiler Date: Mon May 16 16:12:37 2022 +0200 dt-bindings: arm: fsl: add toradex,colibri-imx7s/d/d-emmc-iris/-v2 Based on toradex,colibri-imx7s, toradex,colibri-imx7d and toradex,colibri-imx7d-emmc module device trees add iris and iris-v2 for carrier board dts. Signed-off-by: Marcel Ziswiler Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 90ea76423fec63e102b6ec174a2159fb0ba9b9ed Author: Peng Fan Date: Tue May 10 20:40:47 2022 +0800 dt-bindings: arm: fsl: add imx93 11x11 evk board Add the board imx93-11x11-evk in the binding docuemnt. Reviewed-by: Dong Aisheng Acked-by: Krzysztof Kozlowski Signed-off-by: Peng Fan Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit a500c4a572ac49d3b0069bce95719750d7f656c8 Author: Marcel Ziswiler Date: Fri May 6 16:57:20 2022 +0200 dt-bindings: arm: fsl: correct 1g vs. 1gb in toradex,colibri-imx6ull-* Correct 1G vs. 1GB typo. Signed-off-by: Marcel Ziswiler Acked-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9635b7134c292db0b6b4d278c88d21035dad4000 Author: Tim Harvey Date: Mon Jun 13 12:08:18 2022 -0700 arm64: dts: imx8mm-venice-gw7902: fix UART1 CTS Configure the correct GPIO for UART1 CTS. Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e06233f9372c396191327790bd38999730869e01 Author: Sergey Shtylyov Date: Sat Jun 18 23:38:10 2022 +0300 ata: libata-eh: fix sloppy result type of ata_internal_cmd_timeout() ata_internal_cmd_timeout() returns *unsigned long* timeout in ms, however ata_exec_internal_sg() passes that timeout to msecs_to_jiffies() that takes just *unsigned int*. Change ata_internal_cmd_timeout()'s result type to *unsigned int* as well, also updating the *struct* ata_eh_cmd_timeout_ent and the command timeout tables -- all timeouts fit into *unsigned int* but we have to change ULONG_MAX to UINT_MAX... Signed-off-by: Sergey Shtylyov Signed-off-by: Damien Le Moal drivers/ata/libata-eh.c | 22 +++++++++++----------- drivers/ata/libata.h | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) commit 61176eed36d3a91305df6417be74755703a7db27 Author: Sergey Shtylyov Date: Wed Jun 15 22:38:21 2022 +0300 ata: libata-core: fix sloppy parameter type in ata_exec_internal[_sg]() Make the 'timeout' parameter to ata_exec_internal_sg() *unsigned int* as msecs_to_jiffies() that it calls takes just *unsigned int* for the time in milliseconds. Then follow the suit with ata_exec_internal(), its only caller; also fix up ata_dev_set_feature(), the only ata_exec_internal()'s caller that explicitly passes *unsigned long* variable for timeout... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: Sergey Shtylyov Signed-off-by: Damien Le Moal drivers/ata/libata-core.c | 6 +++--- drivers/ata/libata.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 2e0aee8f0a22c60a1ae0876f7233e70ad9d026b8 Author: Sergey Shtylyov Date: Thu Jun 16 23:51:49 2022 +0300 ata: make ata_port::fastdrain_cnt *unsigned int* *unsigned long* ata_port::fastdrain_cnt (64-bit value in a 64-bit kernel) is always assigned from the 32-bit *unsigned int* variables, thus could also be made just *unsigned int*... Signed-off-by: Sergey Shtylyov Signed-off-by: Damien Le Moal include/linux/libata.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit afae461a3bfa314c0432ab6871ca91a167fcb8be Author: Sergey Shtylyov Date: Thu Jun 16 23:51:48 2022 +0300 ata: libata-eh: fix sloppy result type of ata_eh_nr_in_flight() ata_eh_nr_in_flight() counts the # of the active tagged commands and thus cannot return a negative value but the result type is nevertheless int. Switching it to unsigned int (along with the local variables receiving the function's result) helps avoiding the sign extension instructions when comparing with or assigning to unsigned long ata_port::fastdrain_cnt and thus results in a more compact 64-bit code. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. [Damien] Fixed commit message. Signed-off-by: Sergey Shtylyov Signed-off-by: Damien Le Moal drivers/ata/libata-eh.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 88cb99daa2b57360d295f2e8642edb740a9bca71 Author: Sebastian Andrzej Siewior Date: Wed May 11 13:06:09 2022 +0200 iio: adc: stm32-adc: Use generic_handle_domain_irq() The call chain generic_handle_irq(irq_find_mapping(domain, x)); could be replaced with generic_handle_domain_irq(domain, x); which looks up the struct irq_desc for the interrupt and handles it with handle_irq_desc(). This is a slight optimisation given that the driver invokes only one function and the struct irq_desc is used directly instead being looked up via irq_to_desc(). Use generic_handle_domain_irq(). Signed-off-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/r/YnuYoQIzJoFIyEJY@linutronix.de Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9776fe0f424b7d11af953b52322961845e2b5763 Author: Xiang wangx Date: Sat Jun 18 21:22:41 2022 +0800 sfc/siena: Fix typo in comment Delete the redundant word 'and'. Signed-off-by: Xiang wangx Signed-off-by: David S. Miller drivers/net/ethernet/sfc/siena/mcdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd33c5932e5547364146bab2314a2f39f2559a6d Author: Xiang wangx Date: Sat Jun 18 21:19:14 2022 +0800 sfc: Fix typo in comment Delete the redundant word 'and'. Signed-off-by: Xiang wangx Signed-off-by: David S. Miller drivers/net/ethernet/sfc/mcdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a278bfb242982b91db7b742852b0d33c3168a479 Author: Xiang wangx Date: Sat Jun 18 21:16:26 2022 +0800 net: emac: Fix typo in a comment Delete the redundant word 'and'. Signed-off-by: Xiang wangx Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41a36d4e5a1402306e8792cffc61621021a22574 Author: Simon Horman Date: Sun Jun 19 10:15:30 2022 +0200 Revert "nfp: update nfp_X logging definitions" This reverts commit 9386ebccfc59 ("nfp: update nfp_X logging definitions") The reverted patch was intended to improve logging for the NFP driver by including information such as the source code file and number in log messages. Unfortunately our experience is that this has not improved things as we had hoped. The resulting logs are inconsistent with (most) other kernel log messages. And rely on knowledge of the source code version in order for the extra information to be useful. Thus, revert the change. We acknowledge that Jakub Kicinski foresaw this problem. Signed-off-by: Simon Horman Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h | 26 +++++----------------- 1 file changed, 6 insertions(+), 20 deletions(-) commit 5fc217a3c9a87a99e22d9be085c3ab8370ab7271 Merge: 5d1d527cd905 449b7a15200a Author: David S. Miller Date: Sun Jun 19 10:38:27 2022 +0100 Merge branch 'mii_bmcr_encode_fixed' Russell King says: ==================== net: introduce mii_bmcr_encode_fixed() While converting the mv88e6xxx driver to phylink pcs, it has been noticed that we've started to have repeated cases where we convert a speed and duplex to a BMCR value. Rather than open coding this in multiple locations, let's provide a helper for this - in linux/mii.h. This helper not only takes care of the standard 10, 100 and 1000Mbps encodings, but also includes 2500Mbps (which is the same as 1000Mbps) for those users who require that encoding as well. Unknown speeds will be encoded to 10Mbps, and non-full duplexes will be encoded as half duplex. This series converts the existing users to the new helper, and the mv88e6xxx conversion will add further users in the 6352 and 639x PCS code. ==================== Signed-off-by: David S. Miller commit 449b7a15200a15af8affefdd80ac567c40898dce Author: Russell King (Oracle) Date: Sat Jun 18 11:28:47 2022 +0100 net: pcs: pcs-xpcs: use mii_bmcr_encode_fixed() Use the newly introduced mii_bmcr_encode_fixed() for the xpcs driver. Signed-off-by: Russell King (Oracle) Signed-off-by: David S. Miller drivers/net/pcs/pcs-xpcs.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit e62dbaff4bc2540393cfc31a7438ed833da7c43c Author: Russell King (Oracle) Date: Sat Jun 18 11:28:42 2022 +0100 net: phy: marvell: use mii_bmcr_encode_fixed() Make use of the newly introduced mii_bmcr_encode_fixed() to get the BMCR value when setting loopback mode for the 88e1510. Signed-off-by: Russell King (Oracle) Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit f28a602b285eab953879688f030f53b966a63f50 Author: Russell King (Oracle) Date: Sat Jun 18 11:28:37 2022 +0100 net: phy: use mii_bmcr_encode_fixed() phylib can make use of the newly introduced mii_bmcr_encode_fixed() macro, so let's convert it over. Signed-off-by: Russell King (Oracle) Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit bdb6cfe7512f7a214815a3092f0be50963dcacbc Author: Russell King (Oracle) Date: Sat Jun 18 11:28:32 2022 +0100 net: mii: add mii_bmcr_encode_fixed() Add a function to encode a fixed speed/duplex to a BMCR value. Signed-off-by: Russell King (Oracle) Signed-off-by: David S. Miller include/linux/mii.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 5d1d527cd905752c6486421eeb27592849da17ab Merge: 8670dc33f48b 0daf07e52709 Author: David S. Miller Date: Sun Jun 19 10:00:02 2022 +0100 Merge branch 'raw-RCU-conversion' Eric Dumazet says: ==================== raw: RCU conversion Using rwlock in networking code is extremely risky. writers can starve if enough readers are constantly grabing the rwlock. I thought rwlock were at fault and sent this patch: https://lkml.org/lkml/2022/6/17/272 But Peter and Linus essentially told me rwlock had to be unfair. We need to get rid of rwlock in networking stacks. Without this conversion, following script triggers soft lockups: for i in {1..48} do ping -f -n -q 127.0.0.1 & sleep 0.1 done Next step will be to convert ping sockets to RCU as well. ==================== Signed-off-by: David S. Miller commit 0daf07e527095e64ee8927ce297ab626643e9f51 Author: Eric Dumazet Date: Fri Jun 17 20:47:05 2022 -0700 raw: convert raw sockets to RCU Using rwlock in networking code is extremely risky. writers can starve if enough readers are constantly grabing the rwlock. I thought rwlock were at fault and sent this patch: https://lkml.org/lkml/2022/6/17/272 But Peter and Linus essentially told me rwlock had to be unfair. We need to get rid of rwlock in networking code. Without this fix, following script triggers soft lockups: for i in {1..48} do ping -f -n -q 127.0.0.1 & sleep 0.1 done Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/raw.h | 11 ++++++- include/net/rawv6.h | 1 + net/ipv4/af_inet.c | 2 ++ net/ipv4/raw.c | 83 ++++++++++++++++++++++++----------------------------- net/ipv4/raw_diag.c | 22 ++++++++------ net/ipv6/af_inet6.c | 3 ++ net/ipv6/raw.c | 28 +++++++++--------- 7 files changed, 80 insertions(+), 70 deletions(-) commit ba44f8182ec299c5d1c8a72fc0fde4ec127b5a6d Author: Eric Dumazet Date: Fri Jun 17 20:47:04 2022 -0700 raw: use more conventional iterators In order to prepare the following patch, I change raw v4 & v6 code to use more conventional iterators. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/raw.h | 5 +-- include/net/rawv6.h | 6 +-- net/ipv4/raw.c | 93 +++++++++++++++++----------------------------- net/ipv4/raw_diag.c | 33 ++++++++--------- net/ipv6/raw.c | 105 +++++++++++++++++++--------------------------------- 5 files changed, 92 insertions(+), 150 deletions(-) commit 8d6712695bc8e1433098e73fab85598d5d79c3fd Author: Marek Vasut Date: Mon Jun 13 16:58:26 2022 +0200 arm64: dts: imx8mp: Add support for DH electronics i.MX8M Plus DHCOM and PDK2 Add support for DH electronics i.MX8M Plus DHCOM SoM on PDK2 carrier board. Currently supported are serial console, EQoS and FEC ethernets, eMMC, SD, SPI NOR, CAN. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Shawn Guo Cc: NXP Linux Team To: linux-arm-kernel@lists.infradead.org Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/Makefile | 1 + .../arm64/boot/dts/freescale/imx8mp-dhcom-pdk2.dts | 163 ++++ .../arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi | 1030 ++++++++++++++++++++ 3 files changed, 1194 insertions(+) commit 8670dc33f48bab4d7bb4b8d0232f17f4dae419ec Author: Xiaoliang Yang Date: Fri Jun 17 11:24:23 2022 +0800 net: dsa: felix: update base time of time-aware shaper when adjusting PTP time When adjusting the PTP clock, the base time of the TAS configuration will become unreliable. We need reset the TAS configuration by using a new base time. For example, if the driver gets a base time 0 of Qbv configuration from user, and current time is 20000. The driver will set the TAS base time to be 20000. After the PTP clock adjustment, the current time becomes 10000. If the TAS base time is still 20000, it will be a future time, and TAS entry list will stop running. Another example, if the current time becomes to be 10000000 after PTP clock adjust, a large time offset can cause the hardware to hang. This patch introduces a tas_clock_adjust() function to reset the TAS module by using a new base time after the PTP clock adjustment. This can avoid issues above. Due to PTP clock adjustment can occur at any time, it may conflict with the TAS configuration. We introduce a new TAS lock to serialize the access to the TAS registers. Signed-off-by: Xiaoliang Yang Signed-off-by: David S. Miller drivers/net/dsa/ocelot/felix_vsc9959.c | 83 +++++++++++++++++++++++++++++++--- drivers/net/ethernet/mscc/ocelot.c | 1 + drivers/net/ethernet/mscc/ocelot_ptp.c | 8 ++++ include/soc/mscc/ocelot.h | 7 +++ 4 files changed, 93 insertions(+), 6 deletions(-) commit 0c6cf86e1ab433b2d421880fdd9c6e954f404948 Author: Alexander Stein Date: Mon Jun 13 14:33:57 2022 +0200 ARM: dts: imx6ul: fix qspi node compatible imx6ul is not compatible to imx6sx, both have different erratas. Fixes the dt_binding_check warning: spi@21e0000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,imx6ul-qspi', 'fsl,imx6sx-qspi'] is too long Additional items are not allowed ('fsl,imx6sx-qspi' was unexpected) 'fsl,imx6ul-qspi' is not one of ['fsl,ls1043a-qspi'] 'fsl,imx6ul-qspi' is not one of ['fsl,imx8mq-qspi'] 'fsl,ls1021a-qspi' was expected 'fsl,imx7d-qspi' was expected Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a884d17ca324531634cce82e9f64c0302bdf7de Author: Alexander Stein Date: Mon Jun 13 14:33:56 2022 +0200 ARM: dts: imx6ul: fix lcdif node compatible In yaml binding "fsl,imx6ul-lcdif" is listed as compatible to imx6sx-lcdif, but not imx28-lcdif. Change the list accordingly. Fixes the dt_binding_check warning: lcdif@21c8000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,imx6ul-lcdif', 'fsl,imx28-lcdif'] is too long Additional items are not allowed ('fsl,imx28-lcdif' was unexpected) 'fsl,imx6ul-lcdif' is not one of ['fsl,imx23-lcdif', 'fsl,imx28-lcdif', 'fsl,imx6sx-lcdif'] 'fsl,imx6sx-lcdif' was expected Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0aca931a2c7c29c88ebf37f9c3cd045e083483d Author: Alexander Stein Date: Mon Jun 13 14:33:55 2022 +0200 ARM: dts: imx6ul: fix csi node compatible "fsl,imx6ul-csi" was never listed as compatible to "fsl,imx7-csi", neither in yaml bindings, nor previous txt binding. Remove the imx7 part. Fixes the dt schema check warning: csi@21c4000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,imx6ul-csi', 'fsl,imx7-csi'] is too long Additional items are not allowed ('fsl,imx7-csi' was unexpected) 'fsl,imx8mm-csi' was expected Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d15e0c9a515494af2e3199741cdac7002928a0e Author: Alexander Stein Date: Mon Jun 13 14:33:53 2022 +0200 ARM: dts: imx6ul: fix keypad compatible According to binding, the compatible shall only contain imx6ul and imx21 compatibles. Fixes the dt_binding_check warning: keypad@20b8000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,imx6ul-kpp', 'fsl,imx6q-kpp', 'fsl,imx21-kpp'] is too long Additional items are not allowed ('fsl,imx6q-kpp', 'fsl,imx21-kpp' were unexpected) Additional items are not allowed ('fsl,imx21-kpp' was unexpected) 'fsl,imx21-kpp' was expected Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edb67843983bbdf61b4c8c3c50618003d38bb4ae Author: Alexander Stein Date: Mon Jun 13 14:33:52 2022 +0200 ARM: dts: imx6ul: change operating-points to uint32-matrix operating-points is a uint32-matrix as per opp-v1.yaml. Change it accordingly. While at it, change fsl,soc-operating-points as well, although there is no bindings file (yet). But they should have the same format. Fixes the dt_binding_check warning: cpu@0: operating-points:0: [696000, 1275000, 528000, 1175000, 396000, 1025000, 198000, 950000] is too long cpu@0: operating-points:0: Additional items are not allowed (528000, 1175000, 396000, 1025000, 198000, 950000 were unexpected) Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 5655699cf5cff9f4c4ee703792156bdd05d1addf Author: Alexander Stein Date: Mon Jun 13 14:33:51 2022 +0200 ARM: dts: imx6ul: add missing properties for sram All 3 properties are required by sram.yaml. Fixes the dtbs_check warning: sram@900000: '#address-cells' is a required property sram@900000: '#size-cells' is a required property sram@900000: 'ranges' is a required property Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit c205035e3adb4c50234c9263f7cf3bbff76b3c72 Author: Christian Marangi Date: Fri Jun 17 00:15:54 2022 +0200 net: ethernet: stmmac: remove select QCOM_SOCINFO and make it optional QCOM_SOCINFO depends on QCOM_SMEM but is not selected, this cause some problems with QCOM_SOCINFO getting selected with the dependency of QCOM_SMEM not met. To fix this remove the select in Kconfig and add additional info in the DWMAC_IPQ806X config description. Reported-by: kernel test robot Fixes: 9ec092d2feb6 ("net: ethernet: stmmac: add missing sgmii configure for ipq806x") Signed-off-by: Christian Marangi Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 82cb850653e8da1c62d02b9d3803881ec630e941 Author: Krzysztof Kozlowski Date: Thu Jun 9 13:39:33 2022 +0200 arm64: dts: freescale: align led node names with dtschema The node names should be generic and DT schema expects certain pattern with 'led'. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1088a-ten64.dts | 6 +++--- arch/arm64/boot/dts/freescale/imx8mm-mx8menlo.dts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit b803d15e89f9f9dcbb87f5f98f175c34da4f7961 Author: Krzysztof Kozlowski Date: Thu Jun 9 13:39:32 2022 +0200 arm64: dts: freescale: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1088a-ten64.dts | 4 ++-- arch/arm64/boot/dts/freescale/imx8mm-var-som-symphony.dts | 6 +++--- arch/arm64/boot/dts/freescale/imx8mm-venice-gw700x.dtsi | 8 ++++---- arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dts | 8 ++++---- arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dts | 8 ++++---- arch/arm64/boot/dts/freescale/imx8mm-venice-gw7903.dts | 6 +++--- arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dts | 6 +++--- arch/arm64/boot/dts/freescale/imx8mn-venice-gw7902.dts | 8 ++++---- arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 6 +++--- arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 4 ++-- arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts | 2 +- arch/arm64/boot/dts/freescale/imx8qxp-colibri-eval-v3.dtsi | 2 +- arch/arm64/boot/dts/freescale/mba8mx.dtsi | 6 +++--- 15 files changed, 39 insertions(+), 39 deletions(-) commit 43b240d41b5173eaebb825f19c423b4278435d2c Author: Martin Kepplinger Date: Thu Jun 9 13:17:07 2022 +0200 soc: imx: gpcv2: print errno for regulator errors Make debugging of power management issues easier by printing the reason why a regulator fails to be enabled or disabled. Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo drivers/soc/imx/gpcv2.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit dc9c1ceb555ff661e6fc1081434600771f29657c Author: Fabio Estevam Date: Wed Jun 8 14:02:23 2022 -0300 arm64: dts: imx8m: Disable job ring 0 nodes Now that the JR0 reservation is done in both upstream (v2.7) and downstream (NXP lf_v2.4) TF-A versions, the kernel fails to initialize the job ring 0: # dmesg | grep jr caam_jr 30901000.jr: failed to flush job ring 0 caam_jr: probe of 30901000.jr failed with error -5 Disable the sec_jr0 nodes by default to avoid the caam_jr probe error. Suggested-by: Andrey Zhizhikin Signed-off-by: Fabio Estevam Reviewed-by: Andrey Zhizhikin Reviewed-by: Gaurav Jain Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8mn.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8mp.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8mq.dtsi | 1 + 4 files changed, 4 insertions(+) commit 518d5f16a4be317cf902ca0f891140bb68aff3fd Author: Abel Vesa Date: Tue Jun 7 13:52:55 2022 +0300 arm64: dts: freescale: imx8qxp: Fix thermal zone name for cpu0 The proper name is cpu0-thermal, not cpu-thermal0, so change it to that. Signed-off-by: Abel Vesa Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce23644c5aa2742acaa385eee119cd8c924857f6 Author: Andreas Kemnade Date: Sat Jun 4 17:57:48 2022 +0200 ARM: dts: imx6: fix node names for ebook reader keys Node names are supposed to start with key- Signed-off-by: Andreas Kemnade Signed-off-by: Shawn Guo arch/arm/boot/dts/e60k02.dtsi | 4 ++-- arch/arm/boot/dts/e70k02.dtsi | 8 ++++---- arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) commit 82cc47fd88d5221e9daa7af0b20474ea99369f71 Author: Andreas Kemnade Date: Sat Jun 4 17:57:05 2022 +0200 ARM: dts: imx6sl-tolino-shine2hd: fix led node name. Node name is supposed to be led or led-x Signed-off-by: Andreas Kemnade Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9fc792e596f17a1440dfeffb52e6786d6e53d90b Author: Martin Kaiser Date: Thu Jun 2 10:03:42 2022 +0200 ARM: imx25: support silicon revision 1.2 Update the mx25_read_cpu_rev function to recognize silicon revision 1.2 for imx25 chipsets. Silicon revision 1.2 is mentioned in the errata document at https://www.nxp.com/docs/en/errata/IMX25CE.pdf. The imx25 chips on my test boards show revision 1.2 as well. Signed-off-by: Martin Kaiser Signed-off-by: Shawn Guo arch/arm/mach-imx/cpu-imx25.c | 2 ++ 1 file changed, 2 insertions(+) commit 20d728a282393bb53ee473e7809460b464cee199 Author: Fabio Estevam Date: Wed Jun 1 10:19:28 2022 -0300 arm64: dts: mba8mx: Remove unneeded comments The bootargs line is already commented out and the comment of UART4 does not apply, as uart4 node is not described. Remove both comments to make the dtsi cleaner. Signed-off-by: Fabio Estevam Reviewed-by: Alexander Stein Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/mba8mx.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 4c2f2775abce79bfdf34c6d6f9329493d2c96981 Author: Ulrich Ölmann Date: Tue May 17 09:18:14 2022 +0200 ARM: dts: imx6: skov: add pwm-regulator to control the panel's VCOM Skov's i.MX6 based boards come in different flavors which have different panels attached. For optimal contrast experience each panel type needs an individual common voltage (VCOM) to drive its TFT backplane. The latter is generated by an LCD bias supply IC controlled by a pwm as input signal. Introduce a pwm- regulator to describe this hardware property and parameterize it appropriately for the different boards. Signed-off-by: Ulrich Ölmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dts | 6 ++++++ arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi | 10 ++++++++++ 2 files changed, 16 insertions(+) commit 82c89365733e28f39ef4a4d479c124f9f1e63671 Author: Luca Weiss Date: Tue Jun 14 13:20:50 2022 +0200 proximity: vl53l0x: Make VDD regulator actually optional Contrary to what the naming might suggest, devm_regulator_get_optional returns -ENODEV in case the regulator is not found which will trigger probe error in this driver. Use devm_regulator_get instead which will return a dummy regulator that we can just use as if it was a proper regulator. Fixes: d3d6dba56dab ("proximity: vl53l0x: Handle the VDD regulator") Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20220614112049.302278-1-luca.weiss@fairphone.com Signed-off-by: Jonathan Cameron drivers/iio/proximity/vl53l0x-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b685f435769bec6fe766da3c911a51b3afa9993 Author: Lukas Bulwahn Date: Mon Jun 13 13:50:45 2022 +0200 MAINTAINERS: add include/dt-bindings/iio to IIO SUBSYSTEM AND DRIVERS Maintainers of the directory Documentation/devicetree/bindings/iio are also the maintainers of the corresponding directory include/dt-bindings/iio. Add the file entry for include/dt-bindings/iio to the appropriate section in MAINTAINERS. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220613115045.24326-1-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Cameron MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 4e1c59f3ffd50a3b786051cdc1cb5cdfaaed29d3 Author: Marek Vasut Date: Thu Jun 16 01:34:11 2022 +0200 dt-bindings: iio/accel: Fix adi,adxl345/6 example I2C address Align the example node address and reg content to be 0x2a for both. Signed-off-by: Marek Vasut Cc: Alexandru Ardelean Cc: Hartmut Knaack Cc: Jonathan Cameron Cc: Lars-Peter Clausen Cc: Michael Hennerich Cc: Peter Meerwald-Stadler Cc: Rob Herring Cc: linux-iio@vger.kernel.org Cc: devicetree@vger.kernel.org Link: https://lore.kernel.org/r/20220615233411.90621-1-marex@denx.de Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f467484730c94311b651ca819abb61899d10fe8 Author: Xiang wangx Date: Thu Jun 16 22:15:22 2022 +0800 iio: gyro: bmg160: Fix typo in comment Delete the redundant word 'in'. Signed-off-by: Xiang wangx Link: https://lore.kernel.org/r/20220616141522.2238-1-wangxiang@cdjrlc.com Signed-off-by: Jonathan Cameron drivers/iio/gyro/bmg160_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7108bcb34661a81cdcadf3f6118e025a0e14b4c Author: Andy Shevchenko Date: Fri Jun 17 01:00:23 2022 +0300 iio: dac: stm32-dac: Replace open coded str_enable_disable() Replace open coded str_enable_disable() in error message in stm32_dac_set_enable_state(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220616220023.9894-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/dac/stm32-dac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 072c7d3438888ca424e9d44e11f5d870749ba052 Author: Andy Shevchenko Date: Thu Jun 16 17:24:51 2022 +0300 iio: accel: mma7660: Drop wrong use of ACPI_PTR() ACPI_PTR() is more harmful than helpful. For example, in this case if CONFIG_ACPI=n, the ID table left unused which is not what we want. Instead of making linker to drop a section, drop ACPI_PTR(). As a side effect this makes driver ACPI and OF clean. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220616142451.10322-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/accel/mma7660.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dbacf752cde2c0e719ce97783b579a45a9730833 Author: Tetsuo Handa Date: Mon Jun 13 00:04:00 2022 +0900 iio:light:tsl2563: Replace cancel_delayed_work() with cancel_delayed_work_sync(). Since cancel_delayed_work(&chip->poweroff_work) does not guarantee that tsl2563_poweroff_work() is not running, tsl2563_set_power(chip, 0) can be called from tsl2563_poweroff_work() after tsl2563_get_power(chip) and tsl2563_set_power(chip, 1) are called. Use _sync version in order to make sure that tsl2563_poweroff_work() is no longer running. Signed-off-by: Tetsuo Handa Link: https://lore.kernel.org/r/041b6745-f784-ff3f-9836-3f4397d35d94@I-love.SAKURA.ne.jp Signed-off-by: Jonathan Cameron drivers/iio/light/tsl2563.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 76faa32077b0340382881b66ce6beaefd9d9da97 Author: Tetsuo Handa Date: Sun Jun 12 23:52:59 2022 +0900 iio: light: tsl2563: Replace flush_scheduled_work() with cancel_delayed_work_sync(). Commit 9e61d901155bcd4e ("iio: light: tsl2563: Remove flush_scheduled_work") replaced cancel_delayed_work() + flush_scheduled_work() with cancel_delayed_work_sync() for only tsl2563_probe() side. Do the same thing for tsl2563_remove() side, which was added by commit 388be4883952872b ("staging:iio: tsl2563 abi fixes and interrupt handling"). Signed-off-by: Tetsuo Handa Link: https://lore.kernel.org/r/3381176e-2f86-24ba-a8ba-c4ce8f416086@I-love.SAKURA.ne.jp Signed-off-by: Jonathan Cameron drivers/iio/light/tsl2563.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4a08069461ac9822855116d24fbf11d5fb223cd1 Author: Dmitry Rokosov Date: Tue Jun 7 18:39:18 2022 +0000 iio: trigger: warn about non-registered iio trigger getting attempt As a part of patch series about wrong trigger register() and get() calls order in the some IIO drivers trigger initialization path: https://lore.kernel.org/all/20220524181150.9240-1-ddrokosov@sberdevices.ru/ runtime WARN_ONCE() is added to alarm IIO driver authors who make such a mistake. When an IIO driver allocates a new IIO trigger, it should register it before calling the get() operation. In other words, each IIO driver must abide by IIO trigger alloc()/register()/get() calls order. Signed-off-by: Dmitry Rokosov Link: https://lore.kernel.org/r/20220607183907.20017-1-ddrokosov@sberdevices.ru Signed-off-by: Jonathan Cameron drivers/iio/industrialio-trigger.c | 2 ++ include/linux/iio/trigger.h | 5 +++++ 2 files changed, 7 insertions(+) commit 0691cd473715b293cf7295743c31536f75b4a849 Merge: 9cf0b6185994 72c7df8505cb Author: Jonathan Cameron Date: Sat Jun 18 14:15:52 2022 +0100 Merge branch 'immutable-qcom-spmi-rradc' into togreg Immutable branch used to allow changes to SPMI and MFD subsystems needed by this driver to be pulled into those trees as well if relevant. commit 72c7df8505cbb6da8bb23bdd29e70ce5f30add88 Author: Caleb Connolly Date: Fri Apr 29 23:09:00 2022 +0100 iio: adc: qcom-spmi-rradc: introduce round robin adc The Round Robin ADC is responsible for reading data about the rate of charge from the USB or DC input ports, it can also read the battery ID (resistence), skin temperature and the die temperature of the pmic. It is found on the PMI8998 and PM660 Qualcomm PMICs. Signed-off-by: Caleb Connolly Link: https://lore.kernel.org/r/20220429220904.137297-6-caleb.connolly@linaro.org Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 12 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/qcom-spmi-rradc.c | 1022 +++++++++++++++++++++++++++++++++++++ 3 files changed, 1035 insertions(+) commit 7ea58c951ab3867e5d5ffc5033c326d366f3bdbb Author: Caleb Connolly Date: Fri Apr 29 23:08:59 2022 +0100 dt-bindings: iio: adc: document qcom-spmi-rradc Add dt-binding docs for the Qualcomm SPMI RRADC found in PMICs like PMI8998 and PMI8994 Signed-off-by: Caleb Connolly Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220429220904.137297-5-caleb.connolly@linaro.org Signed-off-by: Jonathan Cameron .../bindings/iio/adc/qcom,spmi-rradc.yaml | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit d23c3c085a95fddae5143823b7d5a81419e6f497 Author: Caleb Connolly Date: Fri Apr 29 23:08:58 2022 +0100 mfd: qcom-spmi-pmic: read fab id on supported PMICs The PMI8998 and PM660 expose the fab_id, this is needed by drivers like the RRADC to calibrate ADC values. Signed-off-by: Caleb Connolly Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov Acked-by: Lee Jones Link: https://lore.kernel.org/r/20220429220904.137297-4-caleb.connolly@linaro.org Signed-off-by: Jonathan Cameron drivers/mfd/qcom-spmi-pmic.c | 7 +++++++ include/soc/qcom/qcom-spmi-pmic.h | 1 + 2 files changed, 8 insertions(+) commit e9c11c6e3a0e93903f5a13f8d2f97ae1bba512e1 Author: Caleb Connolly Date: Fri Apr 29 23:08:57 2022 +0100 mfd: qcom-spmi-pmic: expose the PMIC revid information to clients Some PMIC functions such as the RRADC need to be aware of the PMIC chip revision information to implement errata or otherwise adjust behaviour, export the PMIC information to enable this. This is specifically required to enable the RRADC to adjust coefficients based on which chip fab the PMIC was produced in, this can vary per unique device and therefore has to be read at runtime. Signed-off-by: Caleb Connolly Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov Acked-by: Lee Jones Link: https://lore.kernel.org/r/20220429220904.137297-3-caleb.connolly@linaro.org Signed-off-by: Jonathan Cameron drivers/mfd/qcom-spmi-pmic.c | 265 +++++++++++++++++++++++++------------- include/soc/qcom/qcom-spmi-pmic.h | 60 +++++++++ 2 files changed, 235 insertions(+), 90 deletions(-) commit 9a2139c2912ea64e288749c21452930dc752d4fd Author: Caleb Connolly Date: Fri Apr 29 23:08:56 2022 +0100 spmi: add a helper to look up an SPMI device from a device node The helper function spmi_device_from_of() takes a device node and returns the SPMI device associated with it. This is like of_find_device_by_node but for SPMI devices. Signed-off-by: Caleb Connolly Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20220429220904.137297-2-caleb.connolly@linaro.org Signed-off-by: Jonathan Cameron drivers/spmi/spmi.c | 17 +++++++++++++++++ include/linux/spmi.h | 3 +++ 2 files changed, 20 insertions(+) commit dbca1596bbb08318f5e3b3b99f8ca0a0d3830a65 Author: Eric Dumazet Date: Fri Jun 17 21:04:15 2022 -0700 ping: convert to RCU lookups, get rid of rwlock Using rwlock in networking code is extremely risky. writers can starve if enough readers are constantly grabing the rwlock. I thought rwlock were at fault and sent this patch: https://lkml.org/lkml/2022/6/17/272 But Peter and Linus essentially told me rwlock had to be unfair. We need to get rid of rwlock in networking code. Fixes: c319b4d76b9e ("net: ipv4: add IPPROTO_ICMP socket kind") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ping.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit f0623340fd2cab724e3c54ac026d1414325f375d Author: Peter Lafreniere Date: Thu Jun 16 11:23:33 2022 -0400 ax25: use GFP_KERNEL in ax25_dev_device_up() ax25_dev_device_up() is only called during device setup, which is done in user context. In addition, ax25_dev_device_up() unconditionally calls ax25_register_dev_sysctl(), which already allocates with GFP_KERNEL. Since it is allowed to sleep in this function, here we change ax25_dev_device_up() to use GFP_KERNEL to reduce unnecessary out-of-memory errors. Reported-by: Dan Carpenter Signed-off-by: Peter Lafreniere Link: https://lore.kernel.org/r/20220616152333.9812-1-pjlafren@mtu.edu Signed-off-by: Jakub Kicinski net/ax25/ax25_dev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f691b4d87edfd3fb37ad589d38cf858f47c6e050 Author: Xiang wangx Date: Fri Jun 17 00:41:55 2022 +0800 atm: iphase: Fix typo in comment Delete the redundant word 'the'. Signed-off-by: Xiang wangx Link: https://lore.kernel.org/r/20220616164155.11686-1-wangxiang@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/atm/iphase.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 959edef6589da6ca1fc5454137fa44630c804fa7 Author: Xiang wangx Date: Thu Jun 16 22:26:24 2022 +0800 ppp: Fix typo in comment Delete the redundant word 'the'. Signed-off-by: Xiang wangx Link: https://lore.kernel.org/r/20220616142624.3397-1-wangxiang@cdjrlc.com Signed-off-by: Jakub Kicinski drivers/net/ppp/ppp_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 382f99c442b36b4bb76b2fbeabde99b54583085f Author: Yinjun Zhang Date: Thu Jun 16 15:33:57 2022 +0200 nfp: add support for .get_pauseparam() Show correct pause frame parameters for nfp. These parameters cannot be configured, so .set_pauseparam() is not implemented. With this change: #ethtool --show-pause enp1s0np0 Pause parameters for enp1s0np0: Autonegotiate: off RX: on TX: on Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20220616133358.135305-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 7a49f2193063b7db60a964fc26774275a4c964cd Author: Oleksij Rempel Date: Thu Jun 16 13:25:50 2022 +0200 net: dsa: ar9331: fix potential dead lock on mdio access Rework MDIO locking to avoid potential circular locking: WARNING: possible circular locking dependency detected 5.19.0-rc1-ar9331-00017-g3ab364c7c48c #5 Not tainted ------------------------------------------------------ kworker/u2:4/68 is trying to acquire lock: 81f3c83c (ar9331:1005:(&ar9331_mdio_regmap_config)->lock){+.+.}-{4:4}, at: regmap_write+0x50/0x8c but task is already holding lock: 81f60494 (&bus->mdio_lock){+.+.}-{4:4}, at: mdiobus_read+0x40/0x78 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&bus->mdio_lock){+.+.}-{4:4}: lock_acquire+0x2d4/0x360 __mutex_lock+0xf8/0x384 mutex_lock_nested+0x2c/0x38 mdiobus_write+0x44/0x80 ar9331_sw_bus_write+0x50/0xe4 _regmap_raw_write_impl+0x604/0x724 _regmap_bus_raw_write+0x9c/0xb4 _regmap_write+0xdc/0x1a0 _regmap_update_bits+0xf4/0x118 _regmap_select_page+0x108/0x138 _regmap_raw_read+0x25c/0x288 _regmap_bus_read+0x60/0x98 _regmap_read+0xd4/0x1b0 _regmap_update_bits+0xc4/0x118 regmap_update_bits_base+0x64/0x8c ar9331_sw_irq_bus_sync_unlock+0x40/0x6c __irq_set_handler+0x7c/0xac ar9331_sw_irq_map+0x48/0x7c irq_domain_associate+0x174/0x208 irq_create_mapping_affinity+0x1a8/0x230 ar9331_sw_probe+0x22c/0x388 mdio_probe+0x44/0x70 really_probe+0x200/0x424 __driver_probe_device+0x290/0x298 driver_probe_device+0x54/0xe4 __device_attach_driver+0xe4/0x130 bus_for_each_drv+0xb4/0xd8 __device_attach+0x104/0x1a4 bus_probe_device+0x48/0xc4 device_add+0x600/0x800 mdio_device_register+0x68/0xa0 of_mdiobus_register+0x2bc/0x3c4 ag71xx_probe+0x6e4/0x984 platform_probe+0x78/0xd0 really_probe+0x200/0x424 __driver_probe_device+0x290/0x298 driver_probe_device+0x54/0xe4 __driver_attach+0x17c/0x190 bus_for_each_dev+0x8c/0xd0 bus_add_driver+0x110/0x228 driver_register+0xe4/0x12c do_one_initcall+0x104/0x2a0 kernel_init_freeable+0x250/0x288 kernel_init+0x34/0x130 ret_from_kernel_thread+0x14/0x1c -> #0 (ar9331:1005:(&ar9331_mdio_regmap_config)->lock){+.+.}-{4:4}: check_noncircular+0x88/0xc0 __lock_acquire+0x10bc/0x18bc lock_acquire+0x2d4/0x360 __mutex_lock+0xf8/0x384 mutex_lock_nested+0x2c/0x38 regmap_write+0x50/0x8c ar9331_sw_mbus_read+0x74/0x1b8 __mdiobus_read+0x90/0xec mdiobus_read+0x50/0x78 get_phy_device+0xa0/0x18c fwnode_mdiobus_register_phy+0x120/0x1d4 of_mdiobus_register+0x244/0x3c4 devm_of_mdiobus_register+0xe8/0x100 ar9331_sw_setup+0x16c/0x3a0 dsa_register_switch+0x7dc/0xcc0 ar9331_sw_probe+0x370/0x388 mdio_probe+0x44/0x70 really_probe+0x200/0x424 __driver_probe_device+0x290/0x298 driver_probe_device+0x54/0xe4 __device_attach_driver+0xe4/0x130 bus_for_each_drv+0xb4/0xd8 __device_attach+0x104/0x1a4 bus_probe_device+0x48/0xc4 deferred_probe_work_func+0xf0/0x10c process_one_work+0x314/0x4d4 worker_thread+0x2a4/0x354 kthread+0x134/0x13c ret_from_kernel_thread+0x14/0x1c other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&bus->mdio_lock); lock(ar9331:1005:(&ar9331_mdio_regmap_config)->lock); lock(&bus->mdio_lock); lock(ar9331:1005:(&ar9331_mdio_regmap_config)->lock); *** DEADLOCK *** 5 locks held by kworker/u2:4/68: #0: 81c04eb4 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x1e4/0x4d4 #1: 81f0de78 (deferred_probe_work){+.+.}-{0:0}, at: process_one_work+0x1e4/0x4d4 #2: 81f0a880 (&dev->mutex){....}-{4:4}, at: __device_attach+0x40/0x1a4 #3: 80c8aee0 (dsa2_mutex){+.+.}-{4:4}, at: dsa_register_switch+0x5c/0xcc0 #4: 81f60494 (&bus->mdio_lock){+.+.}-{4:4}, at: mdiobus_read+0x40/0x78 stack backtrace: CPU: 0 PID: 68 Comm: kworker/u2:4 Not tainted 5.19.0-rc1-ar9331-00017-g3ab364c7c48c #5 Workqueue: events_unbound deferred_probe_work_func Stack : 00000056 800d4638 81f0d64c 00000004 00000018 00000000 80a20000 80a20000 80937590 81ef3858 81f0d760 3913578a 00000005 8045e824 81f0d600 a8db84cc 00000000 00000000 80937590 00000a44 00000000 00000002 00000001 ffffffff 81f0d6a4 80982d7c 0000000f 20202020 80a20000 00000001 80937590 81ef3858 81f0d760 3913578a 00000005 00000005 00000000 03bd0000 00000000 80e00000 ... Call Trace: [<80069db0>] show_stack+0x94/0x130 [<8045e824>] dump_stack_lvl+0x54/0x8c [<800c7fac>] check_noncircular+0x88/0xc0 [<800ca068>] __lock_acquire+0x10bc/0x18bc [<800cb478>] lock_acquire+0x2d4/0x360 [<807b84c4>] __mutex_lock+0xf8/0x384 [<807b877c>] mutex_lock_nested+0x2c/0x38 [<804ea640>] regmap_write+0x50/0x8c [<80501e38>] ar9331_sw_mbus_read+0x74/0x1b8 [<804fe9a0>] __mdiobus_read+0x90/0xec [<804feac4>] mdiobus_read+0x50/0x78 [<804fcf74>] get_phy_device+0xa0/0x18c [<804ffeb4>] fwnode_mdiobus_register_phy+0x120/0x1d4 [<805004f0>] of_mdiobus_register+0x244/0x3c4 [<804f0c50>] devm_of_mdiobus_register+0xe8/0x100 [<805017a0>] ar9331_sw_setup+0x16c/0x3a0 [<807355c8>] dsa_register_switch+0x7dc/0xcc0 [<80501468>] ar9331_sw_probe+0x370/0x388 [<804ff0c0>] mdio_probe+0x44/0x70 [<804d1848>] really_probe+0x200/0x424 [<804d1cfc>] __driver_probe_device+0x290/0x298 [<804d1d58>] driver_probe_device+0x54/0xe4 [<804d2298>] __device_attach_driver+0xe4/0x130 [<804cf048>] bus_for_each_drv+0xb4/0xd8 [<804d200c>] __device_attach+0x104/0x1a4 [<804d026c>] bus_probe_device+0x48/0xc4 [<804d108c>] deferred_probe_work_func+0xf0/0x10c [<800a0ffc>] process_one_work+0x314/0x4d4 [<800a17fc>] worker_thread+0x2a4/0x354 [<800a9a54>] kthread+0x134/0x13c [<8006306c>] ret_from_kernel_thread+0x14/0x1c [ Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20220616112550.877118-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski drivers/net/dsa/qca/ar9331.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 9fb424c4c29df0d7f39b686d4037cbc7e06ed7b5 Merge: 4875d94c69d5 f5be22c64bd6 Author: Jakub Kicinski Date: Fri Jun 17 19:35:17 2022 -0700 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2022-06-17 We've added 72 non-merge commits during the last 15 day(s) which contain a total of 92 files changed, 4582 insertions(+), 834 deletions(-). The main changes are: 1) Add 64 bit enum value support to BTF, from Yonghong Song. 2) Implement support for sleepable BPF uprobe programs, from Delyan Kratunov. 3) Add new BPF helpers to issue and check TCP SYN cookies without binding to a socket especially useful in synproxy scenarios, from Maxim Mikityanskiy. 4) Fix libbpf's internal USDT address translation logic for shared libraries as well as uprobe's symbol file offset calculation, from Andrii Nakryiko. 5) Extend libbpf to provide an API for textual representation of the various map/prog/attach/link types and use it in bpftool, from Daniel Müller. 6) Provide BTF line info for RV64 and RV32 JITs, and fix a put_user bug in the core seen in 32 bit when storing BPF function addresses, from Pu Lehui. 7) Fix libbpf's BTF pointer size guessing by adding a list of various aliases for 'long' types, from Douglas Raillard. 8) Fix bpftool to readd setting rlimit since probing for memcg-based accounting has been unreliable and caused a regression on COS, from Quentin Monnet. 9) Fix UAF in BPF cgroup's effective program computation triggered upon BPF link detachment, from Tadeusz Struk. 10) Fix bpftool build bootstrapping during cross compilation which was pointing to the wrong AR process, from Shahab Vahedi. 11) Fix logic bug in libbpf's is_pow_of_2 implementation, from Yuze Chi. 12) BPF hash map optimization to avoid grabbing spinlocks of all CPUs when there is no free element. Also add a benchmark as reproducer, from Feng Zhou. 13) Fix bpftool's codegen to bail out when there's no BTF, from Michael Mullin. 14) Various minor cleanup and improvements all over the place. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (72 commits) bpf: Fix bpf_skc_lookup comment wrt. return type bpf: Fix non-static bpf_func_proto struct definitions selftests/bpf: Don't force lld on non-x86 architectures selftests/bpf: Add selftests for raw syncookie helpers in TC mode bpf: Allow the new syncookie helpers to work with SKBs selftests/bpf: Add selftests for raw syncookie helpers bpf: Add helpers to issue and check SYN cookies in XDP bpf: Allow helpers to accept pointers with a fixed size bpf: Fix documentation of th_len in bpf_tcp_{gen,check}_syncookie selftests/bpf: add tests for sleepable (uk)probes libbpf: add support for sleepable uprobe programs bpf: allow sleepable uprobe programs to attach bpf: implement sleepable uprobes by chaining gps bpf: move bpf_prog to bpf.h libbpf: Fix internal USDT address translation logic for shared libraries samples/bpf: Check detach prog exist or not in xdp_fwd selftests/bpf: Avoid skipping certain subtests selftests/bpf: Fix test_varlen verification failure with latest llvm bpftool: Do not check return value from libbpf_set_strict_mode() Revert "bpftool: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK" ... ==================== Link: https://lore.kernel.org/r/20220617220836.7373-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit b710673e2ddef96ccf74185e72e379520d7984fd Author: Yang Li Date: Thu May 5 06:51:25 2022 +0800 soc: ti: wkup_m3_ipc: Remove unneeded semicolon Eliminate the following coccicheck warning: ./drivers/soc/ti/wkup_m3_ipc.c:691:2-3: Unneeded semicolon Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20220504225125.45830-1-yang.lee@linux.alibaba.com drivers/soc/ti/wkup_m3_ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ea73bf02225ad433e7cfbf8427b08aa8c593775 Author: Krzysztof Kozlowski Date: Thu May 26 22:41:38 2022 +0200 ARM: dts: keystone: Adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20220526204139.831895-3-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/keystone-k2e-netcp.dtsi | 26 +++++++++++++------------- arch/arm/boot/dts/keystone-k2e.dtsi | 6 +++--- arch/arm/boot/dts/keystone-k2g-netcp.dtsi | 2 +- arch/arm/boot/dts/keystone-k2g.dtsi | 18 +++++++++--------- arch/arm/boot/dts/keystone-k2hk-netcp.dtsi | 12 ++++++------ arch/arm/boot/dts/keystone-k2hk.dtsi | 4 ++-- arch/arm/boot/dts/keystone-k2l-netcp.dtsi | 18 +++++++++--------- arch/arm/boot/dts/keystone-k2l.dtsi | 8 ++++---- arch/arm/boot/dts/keystone.dtsi | 18 +++++++++--------- 9 files changed, 56 insertions(+), 56 deletions(-) commit 85423386c9763fb20159892631eccc481a2d9b71 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:22 2022 -0700 arm64: dts: ti: Align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20220616005333.18491-29-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 4 ++-- arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 5888f1ed173e78fb06ebd2aae61061166dd6b359 Author: Krzysztof Kozlowski Date: Thu May 26 22:41:36 2022 +0200 arm64: dts: ti: Adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20220526204139.831895-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 4 ++-- arch/arm64/boot/dts/ti/k3-am625-sk.dts | 2 +- arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 4 ++-- arch/arm64/boot/dts/ti/k3-am642-evm.dts | 2 +- arch/arm64/boot/dts/ti/k3-am642-sk.dts | 2 +- arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi | 4 ++-- arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 14 +++++++------- arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi | 4 ++-- arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 4 ++-- arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi | 4 ++-- arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 4 ++-- arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 4 ++-- arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi | 4 ++-- 13 files changed, 28 insertions(+), 28 deletions(-) commit 87a36978b27a32484423b9b0765c57939e162237 Merge: 6c9e9046e1ff 011e397f5c9c Author: Mark Brown Date: Sat Jun 18 01:46:19 2022 +0100 ASoC: SOF/soundwire: use resume_and_get on component probe Merge series from Pierre-Louis Bossart : While testing driver bind/unbind sequences, I stumbled on a corner case where the SoundWire bus can be suspended before the ASoC card registration happens. During the registration, register accesses would then lead to timeouts. This does not happen in regular usages where the card registration happens within the 3-second time window before suspend. Adding a simple pm_runtime_resume_and_get() on component probe solves the issue, but experiments showed it was too invasive to add at the ASoC core level, with multiple regressions reported by our CI. This patchset limits the additional resume to the SOF and SoundWire codec drivers. An additional patch for the soundwire/intel component will be sent separately. commit 57b06e9711a5ed5accd04b301da0f27f04aa21d3 Merge: a37a9224d050 58ecb11eab44 Author: Mark Brown Date: Sat Jun 18 00:18:16 2022 +0100 ASoC: SOF: Intel: fix resume from hibernate Merge series from Pierre-Louis Bossart : The enablement of IMR-based DSP boot helped reduce resume latency, but unfortunately the context is not saved in S4 and S5 which leads to multiple reports of boot failures. This patchset forces a full firmware reload/reboot when resuming from S4/S5 and restores functionality. commit 9a073d4fbb182be8ee9d1539ed0484800f3fc832 Author: Liang He Date: Wed Jun 15 22:02:31 2022 +0800 soc: bcm: brcmstb: biuctrl: Add missing of_node_put() In brcmstb_biuctrl_init(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() in each fail path or when it is not used anymore. Signed-off-by: Liang He Signed-off-by: Florian Fainelli drivers/soc/bcm/brcmstb/biuctrl.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit cfda05c1ddb8b375562b54dc86276cdc42d48297 Author: Rob Herring Date: Mon Jun 13 11:18:08 2022 -0600 dt-bindings: vexpress-sysreg: Allow for no child nodes It is valid for arm,vexpress-sysreg to have no child nodes when either the deprecated binding without child nodes is used or a platform has no GPIOs. If there are no child nodes, then "#address-cells" and "#size-cells" should not be required. However, "reg" should be present in all cases, so let's add it now. Cc: Andre Przywara Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220613171809.3928949-2-robh@kernel.org Documentation/devicetree/bindings/arm/vexpress-sysreg.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 67fcaf28772027350e7aa60006b620c1d4b0be6e Author: Rob Herring Date: Mon Jun 13 11:18:07 2022 -0600 dt-bindings: vexpress-sysreg: Add deprecated GPIO provider properties While the current binding expects a child GPIO node, the old style binding with GPIO provider properties in the parent vexpress-sysreg node is still in use. Add the GPIO provider properties as deprecated. Cc: Andre Przywara Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220613171809.3928949-1-robh@kernel.org Documentation/devicetree/bindings/arm/vexpress-sysreg.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit bb9a3cc77aa153650d2c431c5be27ec78fadf401 Author: Rob Herring Date: Mon Jun 13 08:55:54 2022 -0600 dt-bindings: perf: Convert Arm CCN to DT schema Convert the Arm CCN performance monitors binding to DT schema format. Signed-off-by: Rob Herring Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20220613145554.3727354-1-robh@kernel.org .../devicetree/bindings/perf/arm,ccn.yaml | 40 ++++++++++++++++++++++ Documentation/devicetree/bindings/perf/arm-ccn.txt | 23 ------------- 2 files changed, 40 insertions(+), 23 deletions(-) commit e291506242b134ce81817865ecb15955fd1e5d0e Author: Rob Herring Date: Mon Jun 13 08:57:09 2022 -0600 dt-bindings: display: Add Arm virtual platforms display 'arm,rtsm-display' is a panel for Arm, Ltd. virtual platforms (e.g. FVP). The binding has been in use for a long time, but was never documented. Some users and an example have a 'panel-dpi' compatible, but that's not needed without a 'panel-timing' node which none of the users have since commit 928faf5e3e8d ("arm64: dts: fvp: Remove panel timings"). The example does have a 'panel-timing' node, but it should not for the same reasons the node was removed in the dts files. So update the example in arm,pl11x.yaml to match the schema. Cc: Linus Walleij Cc: Robin Murphy Cc: Andre Przywara Signed-off-by: Rob Herring Acked-by: Sam Ravnborg Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20220613145709.3729053-1-robh@kernel.org .../devicetree/bindings/display/arm,pl11x.yaml | 15 +----------- .../bindings/display/panel/arm,rtsm-display.yaml | 27 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 14 deletions(-) commit 011e397f5c9c96e533d4a244af84e74c9caefb83 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:08:25 2022 -0500 ASoC: codecs: soundwire: call pm_runtime_resume() in component probe Make sure that the bus and codecs are pm_runtime active when the card is registered/created. This avoid timeouts when accessing registers. BugLink: https://github.com/thesofproject/linux/issues/3651 BugLink: https://github.com/thesofproject/linux/issues/3650 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220616210825.132093-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/max98373.c | 14 +++++++++++++- sound/soc/codecs/rt1308-sdw.c | 12 ++++++++++++ sound/soc/codecs/rt1316-sdw.c | 12 ++++++++++++ sound/soc/codecs/rt700.c | 5 +++++ sound/soc/codecs/rt711-sdca.c | 5 +++++ sound/soc/codecs/rt711.c | 5 +++++ sound/soc/codecs/rt715-sdca.c | 12 ++++++++++++ sound/soc/codecs/rt715.c | 12 ++++++++++++ 8 files changed, 76 insertions(+), 1 deletion(-) commit 4ea3bfd13a2484b5f1c19f60b1dc7494f261f0a4 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:08:24 2022 -0500 ASoC: SOF: pcm: use pm_resume_and_get() on component probe Before initiating IPC and/or bus transactions when loading the topology during a component probe, which happens on card registration/creation, make sure the device for the SOF driver is pm_runtime active. The SOF probe is not necessarily followed by the component probe, such a timing assumption can be broken in driver bind/unbind tests. This can be artifially shown if the module for the machine driver is 'blacklisted' and the SOF device becomes pm_runtime_suspended before manually calling modprobe to register the card. In an initial experiment, pm_resume_and_get() was called from soc-component.c, since the current ASoC component model is arguably missing dependencies between component status and device status. However this approach proved too invasive and breaks all existing HDMI playback solutions on Intel platforms. While this will result in duplication of code, generating pm_runtime transitions only if strictly required for a given component makes more sense overall. This patch adds the pm_runtime resume transition for SOF only. BugLink: https://github.com/thesofproject/linux/issues/3651 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220616210825.132093-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/pcm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6c9e9046e1ff356bda66661213735d33c6cfea53 Author: Fei Shao Date: Fri Jun 17 19:10:04 2022 +0800 ASoC: mediatek: mt8186: Fix mutex double unlock in GPIO request The lockdep mechanism revealed an unbalanced unlocking on MT8186: [ 2.993966] WARNING: bad unlock balance detected! [ 2.993978] ------------------------------------- [ 2.993983] kworker/u16:1/10 is trying to release lock (gpio_request_mutex) at: [ 2.993994] [] mt8186_afe_gpio_request+0xf8/0x210 [ 2.994012] but there are no more locks to release! The cause is that the mutex will be double unlocked if dai is unknown during GPIO selection, and this patch fixes it. Fixes: cfa9a966f12a ("ASoC: mediatek: mt8186: support gpio control in platform driver") Signed-off-by: Fei Shao Link: https://lore.kernel.org/r/20220617111003.2014395-1-fshao@chromium.org Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-afe-gpio.c | 1 - 1 file changed, 1 deletion(-) commit 442302003bd2b151e12d52b0af9a7dac131bf931 Author: Stefan Binding Date: Fri Jun 17 16:36:06 2022 +0100 ASoC: ops: Fix integer detection for when max possible values > 1 The standard snd_soc_info_volsw() allows a two value control to be defined as an integer control only if the control name ends in "Volume". It achieves this by creating a substring if it contains " Volume", and ensuring this exists at the end of the name. The volume substring is then used to decide whether the type is a SNDRV_CTL_ELEM_TYPE_INTEGER or SNDRV_CTL_ELEM_TYPE_BOOLEAN. However this volume substring is only computed for a two value control. This means for controls where there are more than two possible values, the substring is never created, so in this case the substring remains NULL, and the condition yields SNDRV_CTL_ELEM_TYPE_BOOLEAN, even though there are more than 2 possible values. If there are more than 2 possible values for the control, then it should always be an integer control. Fixes: aa2a4b897132 ("ASoC: ops: Fix boolean/integer detection for simple controls") Signed-off-by: Stefan Binding Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20220617153606.2619457-1-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/soc-ops.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit bc3753aed81f6b4a81f3e8bbb32b90f9a8c7cca3 Author: Sjoerd Simons Date: Tue Jun 14 08:48:57 2022 +0200 arm64: dts: rockchip: rock-pi-s add more peripherals This enables the following peripherals: * Onboard ethernet support * Bluetooth * USB 2 port * OTG port via type-c connector * Hardware watchog Also add aliases for the mmc devices and the ethernet interface Signed-off-by: Sjoerd Simons Link: https://lore.kernel.org/r/20220614064858.1445817-4-sjoerd@collabora.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts | 52 +++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 2e04c25b13206aabb5ffa38632d638c340e5857c Author: Akash Gajjar Date: Tue Jun 14 08:48:56 2022 +0200 arm64: dts: rockchip: add ROCK Pi S DTS support ROCK Pi S is RK3308 based SBC from radxa.com. ROCK Pi S has a, - 256MB/512MB DDR3 RAM - SD, NAND flash (optional on board 1/2/4/8Gb) - 100MB ethernet, PoE (optional) - Onboard 802.11 b/g/n wifi + Bluetooth 4.0 Module - USB2.0 Type-A HOST x1 - USB3.0 Type-C OTG x1 - 26-pin expansion header - USB Type-C DC 5V Power Supply This patch enables - Console - NAND Flash - SD Card Signed-off-by: Akash Gajjar [sjoerd: Sort dt nodes, drop properties duplicated from dtsi] Signed-off-by: Sjoerd Simons Link: https://lore.kernel.org/r/20220614064858.1445817-3-sjoerd@collabora.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/Makefile | 1 + arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts | 201 ++++++++++++++++++++++ 2 files changed, 202 insertions(+) commit 5a86111e9defa367499c932c8e23b03897a97a2b Author: Sjoerd Simons Date: Tue Jun 14 08:48:55 2022 +0200 dt-bindings: arm: rockchip: Add Radxa ROCK Pi S Add entry for the Radxa ROCK Pi S board Signed-off-by: Sjoerd Simons Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220614064858.1445817-2-sjoerd@collabora.com Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit f5be22c64bd6ee6c1cb0b34f4ff748d43879cd4c Author: Tobias Klauser Date: Fri Jun 17 17:21:21 2022 +0200 bpf: Fix bpf_skc_lookup comment wrt. return type The function no longer returns 'unsigned long' as of commit edbf8c01de5a ("bpf: add skc_lookup_tcp helper"). Signed-off-by: Tobias Klauser Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220617152121.29617-1-tklauser@distanz.ch net/core/filter.c | 2 -- 1 file changed, 2 deletions(-) commit ba46bd04a4218defa2b35d84983e915e166f1572 Merge: 8b409f754b14 c3ce12b27e56 Author: Mark Brown Date: Fri Jun 17 17:29:00 2022 +0100 ASoC: Intel: Chromebooks: remap jack pins Merge series from Pierre-Louis Bossart : This patchset adds the missing jack pin remapping needed by upstream UCM on Chromebooks, suggested by Jaroslav Kysela [1]. These patches were succesfully tested on GeminiLake and JasperLake platforms, and generalized to other Chromebooks. [1] https://mailman.alsa-project.org/pipermail/sound-open-firmware/2022-June/004468.html commit 8b409f754b148491792251df290b15c78b6814f3 Merge: bdb94f002eb9 7c619b306285 Author: Mark Brown Date: Fri Jun 17 17:28:35 2022 +0100 ASoC: minor kernel-doc corrections Merge series from Pierre-Louis Bossart : Remove warnings with make W=1 commit f759942b72a9ad309282b2fedcebcee3c4c58e24 Author: Konstantin Komarov Date: Mon Jun 6 18:57:21 2022 +0300 fs/ntfs3: Add missing error check We must check return value of log_read_rst Signed-off-by: Konstantin Komarov fs/ntfs3/fslog.c | 2 ++ 1 file changed, 2 insertions(+) commit bdb94f002eb915a11333b396092870583919754f Merge: 7adadfb06b98 d2d19cb6ed13 Author: Mark Brown Date: Fri Jun 17 17:00:41 2022 +0100 ASoC: SOF/Intel: remove __func__ from dev_dbg() Merge series from Pierre-Louis Bossart : Cleanups suggested by Greg KH during SoundWire reviews, since the __func__ information can be added with the dyndbg kernel parameter [1]. The first two patches change the error level in cases where the use of dev_dbg() was inconsistent with an aborted programming sequence. [1] https://lore.kernel.org/alsa-devel/20220610023537.27223-2-yung-chuan.liao@linux.intel.com/ commit f94ba7039fb49c0297d4deeeef3a07c756bc0168 Merge: a4c0094fcf76 a22c8e8834bc Author: Sebastian Reichel Date: Fri Jun 17 17:28:30 2022 +0200 Merge tag 'at91-reset-sama7g5-signed' into psy-next This adds reset controller support for SAMA7G5 SoCs. Compared with previous version the reset controller embedded on SAMA7G5 is able to reset individual on SoC devices (e.g. USB PHY controllers). Signed-off-by: Sebastian Reichel commit a22c8e8834bcc55e44d0bae738f0915df7e6f573 Author: Claudiu Beznea Date: Fri Jun 10 12:24:13 2022 +0300 power: reset: at91-reset: add support for SAMA7G5 Add support for SAMA7G5 including reset_controller_dev support for 3 lines (which are USB PHYs). Signed-off-by: Claudiu Beznea Signed-off-by: Sebastian Reichel drivers/power/reset/at91-reset.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 5f37c797a4df2a3a5b6406af48cc565020c01d98 Author: Claudiu Beznea Date: Fri Jun 10 12:24:12 2022 +0300 power: reset: at91-reset: add reset_controller_dev support SAMA7G5 reset controller has 5 extra lines that goes to different devices (3 lines to USB PHYs, 1 line to DDR controller, 1 line to DDR PHY controller). These reset lines could be requested by different controller drivers (e.g. USB PHY driver) and these controllers' drivers could assert/deassert these lines when necessary. Thus add support for reset_controller_dev which brings this functionality. Signed-off-by: Claudiu Beznea Reviewed-by: Philipp Zabel Signed-off-by: Sebastian Reichel drivers/power/reset/at91-reset.c | 106 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 102 insertions(+), 4 deletions(-) commit e17ad25bc31a3565c1adab924316d72935eef4a2 Author: Claudiu Beznea Date: Fri Jun 10 12:24:11 2022 +0300 power: reset: at91-reset: add at91_reset_data Add struct at91_reset_data to keep per platform related information. This is a prerequisite for adding reset_controller_dev support. Signed-off-by: Claudiu Beznea Signed-off-by: Sebastian Reichel drivers/power/reset/at91-reset.c | 45 ++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 11 deletions(-) commit cd4ed0ab802b5aa171015dae40ac2418e1f7f720 Author: Claudiu Beznea Date: Fri Jun 10 12:24:10 2022 +0300 power: reset: at91-reset: document structures and enums Document structures and enums. Signed-off-by: Claudiu Beznea Signed-off-by: Sebastian Reichel drivers/power/reset/at91-reset.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 5994f58977e0123d5cb77617b3cc4676325028dd Author: Claudiu Beznea Date: Fri Jun 10 12:24:09 2022 +0300 dt-bindings: reset: add sama7g5 definitions Add reset bindings for SAMA7G5. At the moment only USB PHYs are included. Signed-off-by: Claudiu Beznea Acked-by: Philipp Zabel Acked-by: Rob Herring Signed-off-by: Sebastian Reichel include/dt-bindings/reset/sama7g5-reset.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a261ba4138b55d4ccf98d7bd08062d134cbd02d8 Author: Claudiu Beznea Date: Fri Jun 10 12:24:08 2022 +0300 dt-bindings: reset: atmel,at91sam9260-reset: add sama7g5 bindings Add documentation for SAMA7G5 reset controller. Compared with previous versions of reset controllers this one contains support for resetting in SoC devices (e.g. USB PHYs). Signed-off-by: Claudiu Beznea Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel .../bindings/reset/atmel,at91sam9260-reset.yaml | 23 ++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit e9405be8f9c204ea7e103b37821efea8aba5a79a Author: Claudiu Beznea Date: Fri Jun 10 12:24:07 2022 +0300 dt-bindings: reset: convert Atmel/Microchip reset controller to YAML Convert Atmel/Microchip reset controller to YAML. Signed-off-by: Claudiu Beznea Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel .../devicetree/bindings/arm/atmel-sysregs.txt | 15 ------- .../bindings/reset/atmel,at91sam9260-reset.yaml | 49 ++++++++++++++++++++++ 2 files changed, 49 insertions(+), 15 deletions(-) commit 34b9715b7caee2e2b7d74bb4230f2be2c2765c0a Author: Xiang Wangx Date: Fri Jun 17 00:38:30 2022 +0800 thunderbolt: Fix typo in comment Delete the redundant word 'the'. Signed-off-by: Xiang Wangx Signed-off-by: Mika Westerberg drivers/thunderbolt/ctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3fe6c7f53eaa62e3700d8ae076e9c42a1d855242 Author: Matt Roper Date: Tue Jun 14 17:10:19 2022 -0700 drm/i915/gt: Cleanup interface for MCR operations Let's replace the assortment of intel_gt_* and intel_uncore_* functions that operate on MCR registers with a cleaner set of interfaces: * intel_gt_mcr_read -- unicast read from specific instance * intel_gt_mcr_read_any[_fw] -- unicast read from any non-terminated instance * intel_gt_mcr_unicast_write -- unicast write to specific instance * intel_gt_mcr_multicast_write[_fw] -- multicast write to all instances We'll also replace the historic "slice" and "subslice" terminology with "group" and "instance" to match the documentation for more recent platforms; these days MCR steering applies to more types of replication than just slice/subslice. v2: - Reference the new kerneldoc from i915.rst. (Jani) - Tweak the wording of the documentation for a couple functions to clarify the difference between "_fw" and non-"_fw" forms. v3: - s/read/write/ to fix copy-paste mistake in a couple comments. (Harish) Signed-off-by: Matt Roper Acked-by: Jani Nikula Reviewed-by: Harish Chegondi Link: https://patchwork.freedesktop.org/patch/msgid/20220615001019.1821989-3-matthew.d.roper@intel.com Documentation/gpu/i915.rst | 12 ++ drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 2 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 33 ++-- drivers/gpu/drm/i915/gt/intel_gt_debugfs.c | 2 +- drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 239 +++++++++++++++++----------- drivers/gpu/drm/i915/gt/intel_gt_mcr.h | 43 +++-- drivers/gpu/drm/i915/gt/intel_region_lmem.c | 4 +- drivers/gpu/drm/i915/gt/intel_workarounds.c | 8 +- drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 2 +- 9 files changed, 200 insertions(+), 145 deletions(-) commit a4c0094fcf7628f31bf82a7b25e7f51ee5a22324 Author: Asmaa Mnebhi Date: Tue Jun 14 10:19:11 2022 -0400 power: reset: pwr-mlxbf: add BlueField SoC power control driver This driver supports handling 2 BlueField power states controlled by GPIO interrupts: 1) chip reset and 2) low power mode Signed-off-by: Asmaa Mnebhi Signed-off-by: Sebastian Reichel drivers/power/reset/Kconfig | 6 +++ drivers/power/reset/Makefile | 1 + drivers/power/reset/pwr-mlxbf.c | 97 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+) commit e7858254f9af9ad4f1570d781666e3af4c298a88 Author: Matt Roper Date: Tue Jun 14 17:10:18 2022 -0700 drm/i915/gt: Move multicast register handling to a dedicated file Handling of multicast/replicated registers is spread across intel_gt.c and intel_uncore.c today. As multicast handling and the related steering logic gets more complicated with the addition of new platforms and new rules it makes sense to centralize it all in one place. For now the existing functions have been moved to the new .c/.h as-is. Function renames and updates to operate in a more consistent manner will be done in subsequent patches. Signed-off-by: Matt Roper Acked-by: Jani Nikula Reviewed-by: Harish Chegondi Link: https://patchwork.freedesktop.org/patch/msgid/20220615001019.1821989-2-matthew.d.roper@intel.com drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 1 + drivers/gpu/drm/i915/gt/intel_engine_cs.c | 3 +- drivers/gpu/drm/i915/gt/intel_gt.c | 297 +----------------- drivers/gpu/drm/i915/gt/intel_gt.h | 15 - drivers/gpu/drm/i915/gt/intel_gt_debugfs.c | 1 + drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 448 ++++++++++++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_gt_mcr.h | 37 +++ drivers/gpu/drm/i915/gt/intel_region_lmem.c | 1 + drivers/gpu/drm/i915/gt/intel_workarounds.c | 1 + drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 2 - drivers/gpu/drm/i915/intel_uncore.c | 112 ------- drivers/gpu/drm/i915/intel_uncore.h | 8 - 14 files changed, 495 insertions(+), 433 deletions(-) commit dc368e1c658e4f478a45e8d1d5b0c8392ca87506 Author: Joanne Koong Date: Thu Jun 16 15:54:07 2022 -0700 bpf: Fix non-static bpf_func_proto struct definitions This patch does two things: 1) Marks the dynptr bpf_func_proto structs that were added in [1] as static, as pointed out by the kernel test robot in [2]. 2) There are some bpf_func_proto structs marked as extern which can instead be statically defined. [1] https://lore.kernel.org/bpf/20220523210712.3641569-1-joannelkoong@gmail.com/ [2] https://lore.kernel.org/bpf/62ab89f2.Pko7sI08RAKdF8R6%25lkp@intel.com/ Reported-by: kernel test robot Signed-off-by: Joanne Koong Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220616225407.1878436-1-joannelkoong@gmail.com include/linux/bpf.h | 3 --- kernel/bpf/helpers.c | 12 ++++++------ kernel/bpf/syscall.c | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) commit 0be021f900d332d2610900fb22e0408023bbd078 Author: Moudy Ho Date: Fri Jun 10 14:34:22 2022 +0800 arm64: dts: mt8183: add GCE client property for Mediatek MUTEX In order to allow modules with latency requirements such as MDP3 to set registers through CMDQ, add the relevant dts property. Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Link: https://lore.kernel.org/r/20220610063424.7800-6-moudy.ho@mediatek.com [mb: fix commit subject] Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8183.dtsi | 1 + 1 file changed, 1 insertion(+) commit e5758850c2ea448dd750a280d128a3590d68b899 Author: Moudy Ho Date: Fri Jun 10 14:34:23 2022 +0800 soc: mediatek: mutex: add functions that operate registers by CMDQ Due to HW limitations, MDP3 is necessary to enable MUTEX in each frame for SOF triggering and cooperate with CMDQ control to reduce the amount of interrupts generated(also, reduce frame latency). In response to the above situation, a new interface "mtk_mutex_enable_by_cmdq" has been added to achieve the purpose. Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Reviewed-by: CK Hu Link: https://lore.kernel.org/r/20220610063424.7800-7-moudy.ho@mediatek.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-mutex.c | 45 +++++++++++++++++++++++++++++++++- include/linux/soc/mediatek/mtk-mutex.h | 2 ++ 2 files changed, 46 insertions(+), 1 deletion(-) commit e3b6b5a9cf9f6fda0396be63b72b92724cdf202f Author: Moudy Ho Date: Fri Jun 10 14:34:21 2022 +0800 dt-bindings: soc: mediatek: add gce-client-reg for MUTEX In order to allow modules with latency requirements such as MDP3 to set registers through CMDQ, add the relevant GCE property. Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220610063424.7800-5-moudy.ho@mediatek.com Signed-off-by: Matthias Brugger .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 59bf87eefa40322b455a1859ce2c5a17c913e9fc Author: Moudy Ho Date: Fri Jun 10 14:34:20 2022 +0800 dt-bindings: soc: mediatek: move out common module from display folder In order to share the same hardware information with MDP3, change the MUTEX dt-binding to the path "soc/mediatek". Signed-off-by: Moudy Ho Acked-by: Rob Herring Acked-by: Chun-Kuang Hu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220610063424.7800-4-moudy.ho@mediatek.com Signed-off-by: Matthias Brugger .../devicetree/bindings/{display => soc}/mediatek/mediatek,mutex.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c9f8d1e01af64dcc36cea0ff5a49fc625bc815a Author: Moudy Ho Date: Fri Jun 10 14:34:19 2022 +0800 soc: mediatek: mutex: add 8183 MUTEX MOD settings for MDP For the purpose of module independence, related settings should be moved from MDP to the corresponding driver. This patch adds 8183 MUTEX MOD settings for MDP. Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Reviewed-by: CK Hu Link: https://lore.kernel.org/r/20220610063424.7800-3-moudy.ho@mediatek.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-mutex.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit d0804085c5a7feb557bd3219777b51f5598dfdc6 Author: Moudy Ho Date: Fri Jun 10 14:34:18 2022 +0800 soc: mediatek: mutex: add common interface for modules setting In order to allow multiple modules to operate MUTEX hardware through a common interfrace, two flexible indexes "mtk_mutex_mod_index" and "mtk_mutex_sof_index" need to be added to replace original component ID so that like DDP and MDP can add their own MOD table or SOF settings independently. In addition, 2 generic interface "mtk_mutex_write_mod" and "mtk_mutex_write_sof" have been added, which is expected to replace the "mtk_mutex_add_comp" and "mtk_mutex_remove_comp" pair originally dedicated to DDP in the future. Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Reviewed-by: CK Hu Link: https://lore.kernel.org/r/20220610063424.7800-2-moudy.ho@mediatek.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-mutex.c | 53 ++++++++++++++++++++++++++++++++++ include/linux/soc/mediatek/mtk-mutex.h | 25 ++++++++++++++++ 2 files changed, 78 insertions(+) commit 72be1e7a447add1536653592b317e93aed46588d Author: Chunfeng Yun Date: Fri Jun 17 17:58:41 2022 +0800 soc: mediatek: pm-domains: Add support always on flag There is a t-phy shared by PCIe and USB3 on mt8195, if the t-phy is used by PCIe, when power off its mtcmos, need software reset it (workaround way, usually hardware do it, but has an issue on mt8195), but it has side effect to USB2 phy(works with USB3 phy to support USB3.2 Gen1), so add support GENPD_FLAG_ALWAYS_ON flag, and make its power always on. Another reason is that USB3.2 Gen1/2 need keep power always on when support runtime-pm due to hardware limitation until now. Signed-off-by: Chunfeng Yun Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220617095841.23031-1-chunfeng.yun@mediatek.com [mb: smaller nit fixes on commit message] Signed-off-by: Matthias Brugger drivers/soc/mediatek/mt8195-pm-domains.h | 2 +- drivers/soc/mediatek/mtk-pm-domains.c | 3 +++ drivers/soc/mediatek/mtk-pm-domains.h | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) commit 4da8b5e9f24a8036660f7a09553c0ddc5db4839a Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:11 2022 -0700 ARM: dts: mediatek: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-18-krzysztof.kozlowski@linaro.org Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt7623a-rfb-emmc.dts | 4 ++-- arch/arm/boot/dts/mt7623a-rfb-nand.dts | 4 ++-- arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 4 ++-- arch/arm/boot/dts/mt7623n-rfb-emmc.dts | 4 ++-- arch/arm/boot/dts/mt7629-rfb.dts | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) commit 4875d94c69d5a4836c4225b51429d277c297aae8 Author: Hoang Le Date: Fri Jun 17 08:47:51 2022 +0700 tipc: cleanup unused function tipc_dest_list_len() is not being called anywhere. Clean it up. Acked-by: Jon Maloy Signed-off-by: Hoang Le Signed-off-by: David S. Miller net/tipc/name_table.c | 11 ----------- net/tipc/name_table.h | 1 - 2 files changed, 12 deletions(-) commit 7db5dfd3f9f1db303e1392826e9d173642d83a90 Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:09 2022 -0700 arm64: dts: mediatek: mt7622-bananapi-bpi-r64: align led node names with dtschema The node names should be generic and DT schema expects certain pattern with 'led'. Use generic color properties instead of the node name. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-16-krzysztof.kozlowski@linaro.org Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 335d1603669ff10473c27dd7a25deca62e8250ca Author: Krzysztof Kozlowski Date: Wed Jun 15 17:53:08 2022 -0700 arm64: dts: mediatek: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220616005333.18491-15-krzysztof.kozlowski@linaro.org Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts | 4 ++-- arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 4 ++-- arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dts | 6 +++--- arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 10 +++++----- arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi.dtsi | 4 ++-- arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu.dtsi | 2 +- arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 2 +- arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) commit 46e31db55da8e9661894e76086159ca28c348c5c Author: Oleksij Rempel Date: Fri Jun 17 09:16:07 2022 +0200 net: macb: fix negative max_mtu size for sama5d3 JML register on probe will return zero . This register is configured later on macb_init_hw() which is called on open. Since we have zero, after header and FCS length subtraction we will get negative max_mtu size. This issue was affecting DSA drivers with MTU support (for example KSZ9477). Signed-off-by: Oleksij Rempel Reviewed-by: Claudiu Beznea Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2c0ab32b73cfe39a609192f338464e948fc39117 Author: Kees Cook Date: Wed Jun 15 22:23:12 2022 -0700 hinic: Replace memcpy() with direct assignment Under CONFIG_FORTIFY_SOURCE=y and CONFIG_UBSAN_BOUNDS=y, Clang is bugged here for calculating the size of the destination buffer (0x10 instead of 0x14). This copy is a fixed size (sizeof(struct fw_section_info_st)), with the source and dest being struct fw_section_info_st, so the memcpy should be safe, assuming the index is within bounds, which is UBSAN_BOUNDS's responsibility to figure out. Avoid the whole thing and just do a direct assignment. This results in no change to the executable code. Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Tom Rix Cc: Leon Romanovsky Cc: Jiri Pirko Cc: Vladimir Oltean Cc: Simon Horman Cc: netdev@vger.kernel.org Cc: llvm@lists.linux.dev Link: https://github.com/ClangBuiltLinux/linux/issues/1592 Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Tested-by: Nathan Chancellor # build Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_devlink.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 38077cb39b42edc5cf22500af94335827b171af9 Author: Fabien Parent Date: Mon May 30 22:14:34 2022 +0200 soc: mediatek: mt8365-mmsys: add DPI/HDMI display path Right now only the DSI path connections are described in the mt8365 mmsys driver. The external path will be DPI/HDMI. This commit adds the connections for DPI/HDMI. Signed-off-by: Fabien Parent Reviewed-by: CK Hu Link: https://lore.kernel.org/r/20220530201436.902505-5-fparent@baylibre.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mt8365-mmsys.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 141311b856d8ab8ef5903e24d66c3a17d4ee31ae Author: Fabien Parent Date: Mon May 30 22:14:33 2022 +0200 soc: mediatek: mutex: add MT8365 support Add mutex support for MT8365 SoC. Signed-off-by: Fabien Parent Reviewed-by: CK Hu Link: https://lore.kernel.org/r/20220530201436.902505-4-fparent@baylibre.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-mutex.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 225b0ed27e6ac523e5e98e7395392446859c7f20 Author: Oleksij Rempel Date: Thu Jun 16 13:37:24 2022 +0200 net: ag71xx: fix discards 'const' qualifier warning Current kernel will compile this driver with warnings. This patch will fix it. drivers/net/ethernet/atheros/ag71xx.c: In function 'ag71xx_fast_reset': drivers/net/ethernet/atheros/ag71xx.c:996:31: warning: passing argument 2 of 'ag71xx_hw_set _macaddr' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 996 | ag71xx_hw_set_macaddr(ag, dev->dev_addr); | ~~~^~~~~~~~~~ drivers/net/ethernet/atheros/ag71xx.c:951:69: note: expected 'unsigned char *' but argument is of type 'const unsigned char *' 951 | static void ag71xx_hw_set_macaddr(struct ag71xx *ag, unsigned char *mac) | ~~~~~~~~~~~~~~~^~~ drivers/net/ethernet/atheros/ag71xx.c: In function 'ag71xx_open': drivers/net/ethernet/atheros/ag71xx.c:1441:32: warning: passing argument 2 of 'ag71xx_hw_se t_macaddr' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 1441 | ag71xx_hw_set_macaddr(ag, ndev->dev_addr); | ~~~~^~~~~~~~~~ drivers/net/ethernet/atheros/ag71xx.c:951:69: note: expected 'unsigned char *' but argument is of type 'const unsigned char *' 951 | static void ag71xx_hw_set_macaddr(struct ag71xx *ag, unsigned char *mac) | ~~~~~~~~~~~~~~~^~~ Fixes: adeef3e32146 ("net: constify netdev->dev_addr") Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller drivers/net/ethernet/atheros/ag71xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd8b330ce1bb79ba00047435cc213b14f886bf1f Author: David S. Miller Date: Fri Jun 17 10:57:22 2022 +0100 tcp: fix build... Remove accidental dup of tcp_wmem_schedule. Signed-off-by: David S. Miller net/ipv4/tcp.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 47cfd061924061ccd91b828f28a08ec62ffdd6b8 Merge: 982c3e2948d6 ab21cf920928 Author: David S. Miller Date: Fri Jun 17 10:55:35 2022 +0100 Merge branch 'pcs-xpcs-stmmac-add-1000BASE-X-AN-for-network-switch' Ong Boon Leong says: ==================== pcs-xpcs, stmmac: add 1000BASE-X AN for network switch Thanks for v4 review feedback in [1] and [2]. I have changed the v5 implementation as follow. v5 changes: 1/5 - No change from v4. 2/5 - No change from v4. 3/5 - [Fix] make xpcs_modify_changed() static and use mdiodev_modify_changed() for cleaner code as suggested by Russell King. 4/5 - [Fix] Use fwnode_get_phy_mode() as recommended by Andrew Lunn. 5/5 - [Fix] Make fwnode = of_fwnode_handle(priv->plat->phylink_node) order after priv = netdev_priv(dev). v4 changes: 1/5 - Squash v3:1/7 & 2/7 patches into v4:1/6 so that it passes build. 2/5 - [No change] same as v3:3/7 3/5 - [Fix] Fix issues identified by Russell in [1] 4/5 - [Fix] Drop v3:5/7 patch per input by Russell in [2] and make dwmac-intel clear the ovr_an_inband flag if fixed-link is used in ACPI _DSD. 5/5 - [No change] same as v3:7/7 For the steps to setup ACPI _DSD and checking, they are the same as in [3] Reference: [1] https://patchwork.kernel.org/comment/24894239/ [2] https://patchwork.kernel.org/comment/24895330/ [3] https://patchwork.kernel.org/project/netdevbpf/cover/20220610033610.114084-1-boon.leong.ong@intel.com/ ==================== Signed-off-by: David S. Miller commit ab21cf920928a791aa70b8665b395294da17667c Author: Ong Boon Leong Date: Wed Jun 15 16:39:08 2022 +0800 net: stmmac: make mdio register skips PHY scanning for fixed-link stmmac_mdio_register() lacks fixed-link consideration and only skip PHY scanning if it has done DT style PHY discovery. So, for DT or ACPI _DSD setting of fixed-link, the PHY scanning should not happen. v2: fix incorrect order related to fwnode that is not caught in non-DT platform. Tested-by: Emilio Riva Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 12 +++++++----- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 5 deletions(-) commit 72edaf39fc6511b9b30615027cdfafc6d330dd9c Author: Ong Boon Leong Date: Wed Jun 15 16:39:07 2022 +0800 stmmac: intel: add phy-mode and fixed-link ACPI _DSD setting support Currently, phy_interface for TSN controller instance is set based on its PCI Device ID. For SGMII PHY interface, phy_interface default to PHY_INTERFACE_MODE_SGMII. As C37 AN supports both SGMII and 1000BASE-X mode, we add support for 'phy-mode' ACPI _DSD for port-specific and customer platform specific customization. v3: use fwnode_get_phy_mode() as suggested by Andrew Lunn in https://patchwork.kernel.org/comment/24895330/ v2: For platform that sets 'fixed-link' using ACPI _DSD, we will unset xpcs_an_inband within stmmac. Thanks to Russell King for his comment in https://patchwork.kernel.org/comment/24890222/ v1: Thanks to Andrew Lunn's guidance in https://patchwork.kernel.org/comment/24827101/ Tested-by: Emilio Riva Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit b47aec885bcd672ebca2108a8b7e9ce3e3982775 Author: Ong Boon Leong Date: Wed Jun 15 16:39:06 2022 +0800 net: pcs: xpcs: add CL37 1000BASE-X AN support For CL37 1000BASE-X AN, DW xPCS does not support C22 method but offers C45 vendor-specific MII MMD for programming. We also add the ability to disable Autoneg (through ethtool for certain network switch that supports 1000BASE-X (1000Mbps and Full-Duplex) but not Autoneg capability. v4: Fixes to comment from Russell King. Thanks! https://patchwork.kernel.org/comment/24894239/ Make xpcs_modify_changed() as private, change to use mdiodev_modify_changed() for cleaner code. v3: Fixes to issues spotted by Russell King. Thanks! https://patchwork.kernel.org/comment/24890210/ Use phylink_mii_c22_pcs_decode_state(), remove unnecessary interrupt clearing and skip speed & duplex setting if AN is enabled. v2: Fixes to issues spotted by Russell King in v1. Thanks! https://patchwork.kernel.org/comment/24826650/ Use phylink_mii_c22_pcs_encode_advertisement() and implement C45 MII ADV handling since IP only support C45 access. Tested-by: Emilio Riva Signed-off-by: Ong Boon Leong Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller drivers/net/pcs/pcs-xpcs.c | 170 +++++++++++++++++++++++++++++++++++++++++++ drivers/net/pcs/pcs-xpcs.h | 1 - include/linux/pcs/pcs-xpcs.h | 1 + 3 files changed, 171 insertions(+), 1 deletion(-) commit c82386310d957260948828b4236acc5bda819352 Author: Ong Boon Leong Date: Wed Jun 15 16:39:05 2022 +0800 stmmac: intel: prepare to support 1000BASE-X phy interface setting Currently, intel_speed_mode_2500() redundantly fix-up phy_interface to PHY_INTERFACE_MODE_SGMII if the underlying controller is in 1000Mbps SGMII mode. The value of phy_interface has been initialized earlier. This patch removes such redundancy to prepare for setting 1000BASE-X mode for certain hardware platform configuration. Also update the intel_mgbe_common_data() to include 1000BASE-X setup. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fa9c562f9735d24c3253747eb21f3f0c0f6de48e Author: Ong Boon Leong Date: Wed Jun 15 16:39:04 2022 +0800 net: make xpcs_do_config to accept advertising for pcs-xpcs and sja1105 xpcs_config() has 'advertising' input that is required for C37 1000BASE-X AN in later patch series. So, we prepare xpcs_do_config() for it. For sja1105, xpcs_do_config() is used for xpcs configuration without depending on advertising input, so set to NULL. Reported-by: kernel test robot Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 2 +- drivers/net/pcs/pcs-xpcs.c | 6 +++--- include/linux/pcs/pcs-xpcs.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 7adadfb06b9839fa7d9de0cde7ad57a3be3665f0 Author: Peter Ujfalusi Date: Thu Jun 16 18:35:21 2022 +0300 ASoC: twl4030: Drop legacy, non DT boot support Legacy or non DT boot is no longer possible on systems where the tw4030/5030 is used. Drop the support for handling legacy pdata and replace it with a local board_params struct to allow further cleanups on the mfd side. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20220616153521.29701-1-peter.ujfalusi@gmail.com Signed-off-by: Mark Brown sound/soc/codecs/twl4030.c | 101 ++++++++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 47 deletions(-) commit d2d19cb6ed13eb54dd6c958f3808a23820c3ebba Author: Pierre-Louis Bossart Date: Thu Jun 16 16:53:51 2022 -0500 ASoC: Intel: boards: sof_sdw: remove use of __func__ in dev_dbg The module and function information can be added with 'modprobe foo dyndbg=+pmf' Suggested-by: Greg KH Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616215351.135643-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46bc6bc3a6a3af5306e8e3320a083cf3c32350d4 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:53:50 2022 -0500 ASoC: Intel: boards: hda: remove use of __func__ in dev_dbg The module and function information can be added with 'modprobe foo dyndbg=+pmf' Suggested-by: Greg KH Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616215351.135643-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/hda_dsp_common.c | 4 ++-- sound/soc/intel/boards/skl_hda_dsp_generic.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit b3ec3eb2baaad057631ab7e09c38ab3ad5c7a42b Author: Pierre-Louis Bossart Date: Thu Jun 16 16:53:49 2022 -0500 ASoC: SOF: ipc4: remove use of __func__ in dev_dbg The module and function information can be added with 'modprobe foo dyndbg=+pmf' Suggested-by: Greg KH Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616215351.135643-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 298e3aba1b56d19dcb70e10ffe93057d1ddd18f6 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:53:48 2022 -0500 ASoC: SOF: sof-client: remove use of __func__ in dev_dbg The module and function information can be added with 'modprobe foo dyndbg=+pmf' Suggested-by: Greg KH Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616215351.135643-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/sof-client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3809264b53906b8b666b93831ecc23a00e119b68 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:53:47 2022 -0500 ASoC: SOF: ipc4-topology remove use of __func__ in dev_dbg The module and function information can be added with 'modprobe foo dyndbg=+pmf' Suggested-by: Greg KH Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616215351.135643-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit f132dc020270976fe83c86f8c826890873023980 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:53:46 2022 -0500 ASoC: SOF: ipc3-topology: remove use of __func__ in dev_dbg The module and function information can be added with 'modprobe foo dyndbg=+pmf' Suggested-by: Greg KH Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616215351.135643-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc3-topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e16809a74f09b2c2e066b3d7cf1d87be2a75911e Author: Pierre-Louis Bossart Date: Thu Jun 16 16:53:45 2022 -0500 ASoC: SOF: ipc3-loader: remove use of __func__ in dev_dbg The module and function information can be added with 'modprobe foo dyndbg=+pmf' Suggested-by: Greg KH Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616215351.135643-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc3-loader.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 9fd8fcd03451ea3f04af9a419748248d3fa8fb59 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:53:44 2022 -0500 ASoC: SOF: ipc3-dtrace: remove use of __func__ in dev_dbg The module and function information can be added with 'modprobe foo dyndbg=+pmf' Suggested-by: Greg KH Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616215351.135643-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc3-dtrace.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b837870fe17f21cf80b15d143c9ea0bc6b342741 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:53:43 2022 -0500 ASoC: SOF: Intel: mtl: remove use of __func__ in dev_dbg The module and function information can be added with 'modprobe foo dyndbg=+pmf' Suggested-by: Greg KH Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616215351.135643-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/mtl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8bf064f8e439d9b92a023a54adc657f920f4e1a8 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:53:42 2022 -0500 ASoC: SOF: Intel: hda-stream: remove use of __func__ in dev_dbg The module and function information can be added with 'modprobe foo dyndbg=+pmf' Suggested-by: Greg KH Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616215351.135643-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 18701bb1370cb6b34a8f3ad820045930138083dc Author: Pierre-Louis Bossart Date: Thu Jun 16 16:53:41 2022 -0500 ASoC: SOF: Intel: hda-dai: remove use of __func__ in dev_dbg The module and function information can be added with 'modprobe foo dyndbg=+pmf' Suggested-by: Greg KH Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616215351.135643-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dai.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3abc88730a0e45247296a561a12e811b5d2d2236 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:53:40 2022 -0500 ASoC: SOF: Intel: hda-stream: report error on stream not opened We report -ENODEV but only use dev_dbg, this is inconsistent. dev_err() makes sense here. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616215351.135643-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d5e37b0f343af70a7e824641f264fb140bbead5 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:53:39 2022 -0500 ASoC: SOF: Intel: hda-dsp: report error on power-up/down dev_dbg() is not good-enough since the flow returns an error. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616215351.135643-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c3ce12b27e562bf3a255bc9f3096dacea2194dd8 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:40:55 2022 -0500 ASoC: Intel: sof_rt5682: remap jack pins The card did not map jack pins to controls, which prevents PulseAudio/PipeWire from dealing with jack detection. It's likely that jack detection was only tested with the CRAS server and extensions of UCM. Suggested-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616214055.134943-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_rt5682.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 2a172d2f06c155ea7c9b34f47febdfe9b9bbe1c2 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:40:54 2022 -0500 ASoC: Intel: sof_nau8825: remap jack pins The card did not map jack pins to controls, which prevents PulseAudio/PipeWire from dealing with jack detection. It's likely that jack detection was only tested with the CRAS server and extensions of UCM. Suggested-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616214055.134943-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_nau8825.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 2913bb1f6830251416659dbb04c392bbc9592f14 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:40:53 2022 -0500 ASoC: Intel: sof_da7219_max98373: remap jack pins The card did not map jack pins to controls, which prevents PulseAudio/PipeWire from dealing with jack detection. It's likely that jack detection was only tested with the CRAS server and extensions of UCM. Suggested-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616214055.134943-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_da7219_max98373.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 7459c8940a506280908f8b5e9e4227784a0b6569 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:40:52 2022 -0500 ASoC: Intel: sof_cs42l42: remap jack pins The card did not map jack pins to controls, which prevents PulseAudio/PipeWire from dealing with jack detection. It's likely that jack detection was only tested with the CRAS server and extensions of UCM. Suggested-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616214055.134943-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_cs42l42.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 77a036e8b074a679c0177f61c9d3b8e942673141 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:40:51 2022 -0500 ASoC: Intel: cml_rt1011_rt5682: remap jack pins The card did not map jack pins to controls, which prevents PulseAudio/PipeWire from dealing with jack detection. It's likely that jack detection was only tested with the CRAS server and extensions of UCM. Suggested-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616214055.134943-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/cml_rt1011_rt5682.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 4c3a68e9026ad7d3aa61278ce5702407d91d5dd9 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:40:50 2022 -0500 ASoC: Intel: glk_rt5682_max98357a: remap jack pins The card did not map jack pins to controls, which prevents PulseAudio/PipeWire from dealing with jack detection. It's likely that jack detection was only tested with the CRAS server and extensions of UCM. Suggested-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616214055.134943-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/glk_rt5682_max98357a.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit bbdd4ea2190b4712c0cd9989a5e402c7f99fc122 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:40:49 2022 -0500 ASoC: Intel: bxt_da7219_max98357a: remap jack pins The card did not map jack pins to controls, which prevents PulseAudio/PipeWire from dealing with jack detection. It's likely that jack detection was only tested with the CRAS server and extensions of UCM. Suggested-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616214055.134943-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_da7219_max98357a.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit c0703be996c343b4d1036b6ba258133d88b7932b Author: Pierre-Louis Bossart Date: Thu Jun 16 16:40:48 2022 -0500 ASoC: Intel: kbl_rt5663_rt5514_max98927: remap jack pins The card did not map jack pins to controls, which prevents PulseAudio/PipeWire from dealing with jack detection. It's likely that jack detection was only tested with the CRAS server and extensions of UCM. Suggested-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616214055.134943-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit b9f53b9fc14e26ef3b3c33160afb094ad7ae192b Author: Pierre-Louis Bossart Date: Thu Jun 16 16:40:47 2022 -0500 ASoC: Intel: kbl_da7219_max98927: remap jack pins The card did not map jack pins to controls, which prevents PulseAudio/PipeWire from dealing with jack detection. It's likely that jack detection was only tested with the CRAS server and extensions of UCM. Suggested-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616214055.134943-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_da7219_max98927.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit c2065d43ae8546668f8f187138eda8a18f7625fd Author: Pierre-Louis Bossart Date: Thu Jun 16 16:40:46 2022 -0500 ASoC: Intel: kbl_da7219_max98357a: remap jack pins The card did not map jack pins to controls, which prevents PulseAudio/PipeWire from dealing with jack detection. It's likely that jack detection was only tested with the CRAS server and extensions of UCM. Suggested-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616214055.134943-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_da7219_max98357a.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit decdbf3dd7ec3e3522548f50e22d81558d151118 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:40:45 2022 -0500 ASoC: Intel: kbl_rt5663_max98927: remap jack pins The card did not map jack pins to controls, which prevents PulseAudio/PipeWire from dealing with jack detection. It's likely that jack detection was only tested with the CRAS server and extensions of UCM. Suggested-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616214055.134943-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5663_max98927.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 4864ef4a67edfbf802ba36c921c5e9f66e1530bf Author: Pierre-Louis Bossart Date: Thu Jun 16 16:40:44 2022 -0500 ASoC: Intel: skl_nau88l25_ssm4567: remap jack pins The card did not map jack pins to controls, which prevents PulseAudio/PipeWire from dealing with jack detection. It's likely that jack detection was only tested with the CRAS server and extensions of UCM. Suggested-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616214055.134943-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit e33ea0685a219543f3e23d88186bc6c3259b3ff4 Author: Pierre-Louis Bossart Date: Thu Jun 16 16:40:43 2022 -0500 ASoC: Intel: skl_nau88l25_max98357a: remap jack pins The card did not map jack pins to controls, which prevents PulseAudio/PipeWire from dealing with jack detection. It's likely that jack detection was only tested with the CRAS server and extensions of UCM. Suggested-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220616214055.134943-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/skl_nau88l25_max98357a.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 7c619b306285588725573d975fd44607d13438cf Author: Pierre-Louis Bossart Date: Thu Jun 16 17:08:02 2022 -0500 ASoC: sunxi: sun4i-i2s: update kernel-doc Remove warnings sound/soc/sunxi/sun4i-i2s.c:205: warning: Function parameter or member 'num_din_pins' not described in 'sun4i_i2s_quirks' sound/soc/sunxi/sun4i-i2s.c:205: warning: Function parameter or member 'num_dout_pins' not described in 'sun4i_i2s_quirks' Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220616220802.136282-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-i2s.c | 2 ++ 1 file changed, 2 insertions(+) commit e1ab67be68e900a6585277ca442ca7f67dffb3bd Author: Pierre-Louis Bossart Date: Thu Jun 16 17:08:01 2022 -0500 ASoC: cs4270: update kernel-doc Remove warning sound/soc/codecs/cs4270.c:672: warning: Excess function parameter 'id' description in 'cs4270_i2c_probe' Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220616220802.136282-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/cs4270.c | 1 - 1 file changed, 1 deletion(-) commit a37a9224d0500f0cf5bf13cb225163c21b29e0f6 Author: Peter Ujfalusi Date: Thu Jun 16 15:19:53 2022 -0500 ASoC: SOF: Intel: hda: Fix compressed stream position tracking Commit 288fad2f71fa ("ASoC: SOF: Intel: hda: add quirks for HDAudio DMA position information") modified the PCM path only, but left the compressed data patch using an obsolete option. Move the functionality in a helper that can be called for both PCM and compressed data. Reviewed-by: Ranjani Sridharan Fixes: 288fad2f71fa ("ASoC: SOF: Intel: hda: add quirks for HDAudio DMA position information") Signed-off-by: Peter Ujfalusi Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220616201953.130876-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-pcm.c | 74 +------------------------------ sound/soc/sof/intel/hda-stream.c | 94 ++++++++++++++++++++++++++++++++++++++-- sound/soc/sof/intel/hda.h | 3 ++ 3 files changed, 94 insertions(+), 77 deletions(-) commit 58ecb11eab44dd5d64e35664ac4d62fecb6328f4 Author: Pierre-Louis Bossart Date: Thu Jun 16 15:18:18 2022 -0500 ASoC: SOF: Intel: disable IMR boot when resuming from ACPI S4 and S5 states The IMR was assumed to be preserved when suspending to S4 and S5 states, but community reports invalidate that assumption, the hardware seems to be powered off and the IMR memory content cleared. Make sure regular boot with firmware download is used for S4 and S5. BugLink: https://github.com/thesofproject/sof/issues/5892 Fixes: 5fb5f51185126 ("ASoC: SOF: Intel: hda-loader: add IMR restore support") Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220616201818.130802-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-loader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7a5974e035a6d496797547e4b469bc88938343c2 Author: Pierre-Louis Bossart Date: Thu Jun 16 15:18:17 2022 -0500 ASoC: SOF: pm: add definitions for S4 and S5 states We currently don't have a means to differentiate between S3, S4 and S5. Add definitions so that we have select different code paths depending on the target state in follow-up patches. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220616201818.130802-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/pm.c | 9 +++++++++ sound/soc/sof/sof-priv.h | 2 ++ 2 files changed, 11 insertions(+) commit 6639990dbb25257eeb3df4d03e38e7d26c2484ab Author: Pierre-Louis Bossart Date: Thu Jun 16 15:18:16 2022 -0500 ASoC: SOF: pm: add explicit behavior for ACPI S1 and S2 The existing code only deals with S0 and S3, let's start adding S1 and S2. No functional change. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220616201818.130802-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/pm.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 982c3e2948d6a30d34f186e3b7d592a33147719b Merge: e42134b57e20 ed62af45467a Author: David S. Miller Date: Fri Jun 17 10:31:34 2022 +0100 Merge branch 'mlxsw-L3-HW-stats-improvements' Ido Schimmel says: ==================== mlxsw: L3 HW stats improvements While testing L3 HW stats [1] on top of mlxsw, two issues were found: 1. Stats cannot be enabled for more than 205 netdevs. This was fixed in commit 4b7a632ac4e7 ("mlxsw: spectrum_cnt: Reorder counter pools"). 2. ARP packets are counted as errors. Patch #1 takes care of that. See the commit message for details. The goal of the majority of the rest of the patches is to add selftests that would have discovered that only about 205 netdevs can have L3 HW stats supported, despite the HW supporting much more. The obvious place to plug this in is the scale test framework. The scale tests are currently testing two things: that some number of instances of a given resource can actually be created; and that when an attempt is made to create more than the supported amount, the failures are noted and handled gracefully. However the ability to allocate the resource does not mean that the resource actually works when passing traffic. For that, make it possible for a given scale to also test traffic. To that end, this patchset adds traffic tests. The goal of these is to run traffic and observe whether a sample of the allocated resource instances actually perform their task. Traffic tests are only run on the positive leg of the scale test (no point trying to pass traffic when the expected outcome is that the resource will not be allocated). They are opt-in, if a given test does not expose it, it is not run. The patchset proceeds as follows: - Patches #2 and #3 add to "devlink resource" support for number of allocated RIFs, and the capacity. This is necessary, because when evaluating how many L3 HW stats instances it should be possible to allocate, the limiting resource on Spectrum-2 and above currently is not the counters themselves, but actually the RIFs. - Patch #6 adds support for invocation of a traffic test, if a given scale tests exposes it. - Patch #7 adds support for skipping a given scale test. Because on Spectrum-2 and above, the limiting factor to L3 HW stats instances is actually the number of RIFs, there is no point in running the failing leg of a scale tests, because it would test exhaustion of RIFs, not of RIF counters. - With patch #8, the scale tests drivers pass the target number to the cleanup function of a scale test. - In patch #9, add a traffic test to the tc_flower selftests. This makes sure that the flow counters installed with the ACLs actually do count as they are supposed to. - In patch #10, add a new scale selftest for RIF counter scale, including a traffic test. - In patch #11, the scale target for the tc_flower selftest is dynamically set instead of being hard coded. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca0a53dcec9495d1dc5bbc369c810c520d728373 ==================== Signed-off-by: David S. Miller commit ed62af45467a6786cbdeef42a7b4e7ced374f593 Author: Ido Schimmel Date: Thu Jun 16 13:42:45 2022 +0300 selftests: spectrum-2: tc_flower_scale: Dynamically set scale target Instead of hard coding the scale target in the test, dynamically set it based on the maximum number of flow counters and their current occupancy. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller .../drivers/net/mlxsw/spectrum-2/tc_flower_scale.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit be00853bfd2e704893916bc349e7ab1d50615cb4 Author: Petr Machata Date: Thu Jun 16 13:42:44 2022 +0300 selftests: mlxsw: Add a RIF counter scale test This tests creates as many RIFs as possible, ideally more than there can be RIF counters (though that is currently only possible on Spectrum-1). It then tries to enable L3 HW stats on each of the RIFs. It also contains the traffic test, which tries to run traffic through a log2 of those counters and checks that the traffic is shown in the counter values. Like with tc_flower traffic test, take a log2 subset of rules. The logic behind picking log2 rules is that then every bit of the instantiated item's number is exercised. This should catch issues whether they happen at the high end, low end, or somewhere in between. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../drivers/net/mlxsw/rif_counter_scale.sh | 107 +++++++++++++++++++++ .../drivers/net/mlxsw/spectrum-2/resource_scale.sh | 11 ++- .../net/mlxsw/spectrum-2/rif_counter_scale.sh | 1 + .../drivers/net/mlxsw/spectrum/resource_scale.sh | 11 ++- .../net/mlxsw/spectrum/rif_counter_scale.sh | 34 +++++++ 5 files changed, 162 insertions(+), 2 deletions(-) commit dd5d20e17c960dc5c8b8c585dfae79cf39660867 Author: Petr Machata Date: Thu Jun 16 13:42:43 2022 +0300 selftests: mlxsw: tc_flower_scale: Add a traffic test Add a test that checks that the created filters do actually trigger on matching traffic. Exercising all the rules would be a very lengthy process. Instead, take a log2 subset of rules. The logic behind picking log2 rules is that then every bit of the instantiated item's number is exercised. This should catch issues whether they happen at the high end, low end, or somewhere in between. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../selftests/drivers/net/mlxsw/tc_flower_scale.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 35d5829e86c29892136ca96bd4d809d4429f1510 Author: Petr Machata Date: Thu Jun 16 13:42:42 2022 +0300 selftests: mlxsw: resource_scale: Pass target count to cleanup The scale tests are verifying behavior of mlxsw when number of instances of some resource reaches the ASIC capacity. The number of instances is referred to as "target" number. No scale tests so far needed to know this target number to clean up. E.g. the tc_flower simply removes the clsact qdisc that all the tested filters are hooked onto, and that takes care of collecting all the filters. However, for the RIF counter test, which is being added in a future patch, VLAN netdevices are created. These are created as part of the test, but of course the cleanup needs to undo them again. For that it needs to know how many there were. To support this usage, pass the target number to the cleanup callback. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh | 2 +- tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8cad339db339a39cb82b1188e4be4070a433abac Author: Petr Machata Date: Thu Jun 16 13:42:41 2022 +0300 selftests: mlxsw: resource_scale: Allow skipping a test The scale tests are currently testing two things: that some number of instances of a given resource can actually be created; and that when an attempt is made to create more than the supported amount, the failures are noted and handled gracefully. Sometimes the scale test depends on more than one resource. In particular, a following patch will add a RIF counter scale test, which depends on the number of RIF counters that can be bound, and also on the number of RIFs that can be created. When the test is limited by the auxiliary resource and not by the primary one, there's no point trying to run the overflow test, because it would be testing exhaustion of the wrong resource. To support this use case, when the $test_get_target yields 0, skip the test instead. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh | 5 +++++ tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh | 4 ++++ 2 files changed, 9 insertions(+) commit 3128b9f51ee7ec7d091496379247489aab3007bb Author: Petr Machata Date: Thu Jun 16 13:42:40 2022 +0300 selftests: mlxsw: resource_scale: Introduce traffic tests The scale tests are currently testing two things: that some number of instances of a given resource can actually be created; and that when an attempt is made to create more than the supported amount, the failures are noted and handled gracefully. However the ability to allocate the resource does not mean that the resource actually works when passing traffic. For that, make it possible for a given scale to also test traffic. Traffic test is only run on the positive leg of the scale test (no point trying to pass traffic when the expected outcome is that the resource will not be allocated). Traffic tests are opt-in, if a given test does not expose it, it is not run. To this end, delay the test cleanup until after the traffic test is run. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh | 12 ++++++++++-- .../selftests/drivers/net/mlxsw/spectrum/resource_scale.sh | 11 ++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) commit d3ffeb2dba633b99ef2602019f61a97e0163a756 Author: Ido Schimmel Date: Thu Jun 16 13:42:39 2022 +0300 selftests: mlxsw: resource_scale: Update scale target after test setup The scale of each resource is tested in the following manner: 1. The scale target is queried. 2. The test setup is prepared. 3. The test is invoked. In some cases, the occupancy of a resource changes as part of the second step, requiring the test to return a scale target that takes this change into account. Make this more robust by re-querying the scale target after the second step. Another possible solution is to swap the first and second steps, but when a test needs to be skipped (i.e., scale target is zero), the setup would have been in vain. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh | 3 +++ tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh | 3 +++ 2 files changed, 6 insertions(+) commit e386a527fc0893dc905464890eddfeb2cbeb44f4 Author: Amit Cohen Date: Thu Jun 16 13:42:38 2022 +0300 selftests: mirror_gre_bridge_1q_lag: Enslave port to bridge before other configurations Using mlxsw driver, the configurations are offloaded just in case that there is a physical port which is enslaved to the virtual device (e.g., to a bridge). In 'mirror_gre_bridge_1q_lag' test, the bridge gets an address and route before there are ports in the bridge. It means that these configurations are not offloaded. Till now the test passes with mlxsw driver even that the RIF of the bridge is not in the hardware, because the ARP packets are trapped in layer 2 and also mirrored, so there is no real need of the RIF in hardware. The previous patch changed the traps 'ARP_REQUEST' and 'ARP_RESPONSE' to be done at layer 3 instead of layer 2. With this change the ARP packets are not trapped during the test, as the RIF is not in the hardware because of the order of configurations. Reorder the configurations to make them to be offloaded, then the test will pass with the change of the traps. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q_lag.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 4ec2feb26cc366e0667224cadaea1da23e95981b Author: Petr Machata Date: Thu Jun 16 13:42:37 2022 +0300 mlxsw: Add a resource describing number of RIFs The Spectrum ASIC has a limit on how many L3 devices (called RIFs) can be created. The limit depends on the ASIC and FW revision, and mlxsw reads it from the FW. In order to communicate both the number of RIFs that there can be, and how many are taken now (i.e. occupancy), introduce a corresponding devlink resource. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 29 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 12 +++++++++ 3 files changed, 42 insertions(+) commit b9840fe035acd4b91f30fb322328c5c196d12ab6 Author: Petr Machata Date: Thu Jun 16 13:42:36 2022 +0300 mlxsw: Keep track of number of allocated RIFs In order to expose number of RIFs as a resource, it is going to be handy to have the number of currently-allocated RIFs as a single number. Introduce such. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 6 ++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h | 1 + 2 files changed, 7 insertions(+) commit 4b1cc357f84347dbc9584aa2f5dae02df7524dfc Author: Amit Cohen Date: Thu Jun 16 13:42:35 2022 +0300 mlxsw: Trap ARP packets at layer 3 instead of layer 2 Currently, the traps 'ARP_REQUEST' and 'ARP_RESPONSE' occur at layer 2. To allow the packets to be flooded, they are configured with the action 'MIRROR_TO_CPU' which means that the CPU receives a replica of the packet. Today, Spectrum ASICs also support trapping ARP packets at layer 3. This behavior is better, then the packets can just be trapped and there is no need to mirror them. An additional motivation is that using the traps at layer 2, the ARP packets are dropped in the router as they do not have an IP header, then they are counted as error packets, which might confuse users. Add the relevant traps for layer 3 and use them instead of the existing traps. There is no visible change to user space. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c | 8 ++++---- drivers/net/ethernet/mellanox/mlxsw/trap.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit bffa1fc065893a14703545efba7d69bb4082b18a Author: Kai Ye Date: Sat Jun 11 15:38:08 2022 +0800 crypto: hisilicon/sec - only HW V2 needs to change the BD err detection The base register address of V2 and V3 are different. HW V3 not needs to change the BD err detection. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu drivers/crypto/hisilicon/sec2/sec_main.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit d61a7b3decf7f0cf4121a7204303deefd2c7151b Author: Alexey Khoroshilov Date: Fri Jun 10 21:27:15 2022 +0300 crypto: sun8i-ss - fix infinite loop in sun8i_ss_setup_ivs() There is no i decrement in while (i >= 0) loop. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Alexey Khoroshilov Fixes: 359e893e8af4 ("crypto: sun8i-ss - rework handling of IV") Acked-by: Corentin Labbe Tested-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 1 + 1 file changed, 1 insertion(+) commit d64de9773c18409d2161228242968ff3ebe3707e Author: Weili Qian Date: Thu Jun 9 20:31:19 2022 +0800 crypto: hisilicon/qm - modify event irq processing When the driver receives an event interrupt, the driver will enable the event interrupt after handling all completed tasks on the function, tasks on the function are parsed through only one thread. If the task's user callback takes time, other tasks on the function will be blocked. Therefore, the event irq processing is modified as follows: 1. Obtain the ID of the queue that completes the task. 2. Enable event interrupt. 3. Parse the completed tasks in the queue and call the user callback. Enabling event interrupt in advance can quickly report pending event interrupts and process tasks in multiple threads. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu drivers/crypto/hisilicon/qm.c | 142 +++++++++++++++++++++++++++--------------- include/linux/hisi_acc_qm.h | 8 ++- 2 files changed, 99 insertions(+), 51 deletions(-) commit 3099fc9c2b3aaace80947d07d13b40da2dd79fd4 Author: Weili Qian Date: Thu Jun 9 20:31:18 2022 +0800 crypto: hisilicon/qm - move alloc qm->wq to qm.c Before stopping the function, the driver needs to flush all the remaining work about event irq. Therefore, accelerator drivers use a private workqueue(qm->wq) to handle event irq instead of the system workqueue. This patch moves alloc workqueue from sec_main.c and zip_main.c to qm.c. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu drivers/crypto/hisilicon/qm.c | 35 +++++++++++++++++++++++--------- drivers/crypto/hisilicon/sec2/sec_main.c | 24 +--------------------- drivers/crypto/hisilicon/zip/zip_main.c | 17 +--------------- 3 files changed, 27 insertions(+), 49 deletions(-) commit bf081d6fa8e90aefe991e34a29eff7aa22deb3ff Author: Weili Qian Date: Thu Jun 9 20:31:17 2022 +0800 crypto: hisilicon/qm - add functions for releasing resources The resources allocated by hisi_qm_memory_init() are released by hisi_qm_uninit(). Add hisi_qm_memory_uninit() to release resources, no functional change. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu drivers/crypto/hisilicon/qm.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 00856e5391fbfbe00bf641a39f1bf8d1a144367a Author: Weili Qian Date: Thu Jun 9 19:18:19 2022 +0800 crypto: hisilicon/trng - fix local variable type The return value of 'readl_poll_timeout' is '0' or '-ETIMEDOUT'. Therefore, change the local variable 'ret' type from 'u32' to 'int'. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu drivers/crypto/hisilicon/trng/trng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce6330f74b08c8cbb2e3c04bd31cbace3de20660 Author: Zhou Wang Date: Thu Jun 9 02:56:39 2022 +0000 MAINTAINERS: update HiSilicon ZIP and QM maintainers This patch splits QM and ZIP in MAINTAINERS, then add Weili Qian for QM driver and Yang Shen for ZIP driver. This patch adds missing Kconfig and Makefile files as well. Signed-off-by: Zhou Wang Signed-off-by: Herbert Xu MAINTAINERS | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit e42134b57e20343e3c6db0a60af85f26d11a4dff Merge: e8b03391b6a7 f54755f6a11a Author: David S. Miller Date: Fri Jun 17 10:11:04 2022 +0100 Merge branch 'tcp-mem-pressure-fixes' Eric Dumazet says: ==================== tcp: final (?) round of mem pressure fixes While working on prior patch series (e10b02ee5b6c "Merge branch 'net-reduce-tcp_memory_allocated-inflation'"), I found that we could still have frozen TCP flows under memory pressure. I thought we had solved this in 2015, but the fix was not complete. v2: deal with zerocopy tx paths. ==================== Signed-off-by: David S. Miller commit f54755f6a11accb2db5ef17f8f75aad0875aefdc Author: Eric Dumazet Date: Tue Jun 14 10:17:34 2022 -0700 tcp: fix possible freeze in tx path under memory pressure Blamed commit only dealt with applications issuing small writes. Issue here is that we allow to force memory schedule for the sk_buff allocation, but we have no guarantee that sendmsg() is able to copy some payload in it. In this patch, I make sure the socket can use up to tcp_wmem[0] bytes. For example, if we consider tcp_wmem[0] = 4096 (default on x86), and initial skb->truesize being 1280, tcp_sendmsg() is able to copy up to 2816 bytes under memory pressure. Before this patch a sendmsg() sending more than 2816 bytes would either block forever (if persistent memory pressure), or return -EAGAIN. For bigger MTU networks, it is advised to increase tcp_wmem[0] to avoid sending too small packets. v2: deal with zero copy paths. Fixes: 8e4d980ac215 ("tcp: fix behavior for epoll edge trigger") Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Reviewed-by: Wei Wang Reviewed-by: Shakeel Butt Signed-off-by: David S. Miller net/ipv4/tcp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit c4218e8cb97104b316e3e22286e15a064721effc Author: Krzysztof Kozlowski Date: Thu May 26 22:44:02 2022 +0200 ARM: dts: mediatek: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526204402.832393-2-krzysztof.kozlowski@linaro.org Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt2701.dtsi | 8 ++++---- arch/arm/boot/dts/mt7623.dtsi | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) commit 2e9cf55405c88f132558cc37af194a7e97d2a464 Author: Krzysztof Kozlowski Date: Thu May 26 22:44:01 2022 +0200 arm64: dts: mediatek: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526204402.832393-1-krzysztof.kozlowski@linaro.org Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt2712-evb.dts | 2 +- arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts | 8 ++++---- arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 8 ++++---- arch/arm64/boot/dts/mediatek/mt7622.dtsi | 10 +++++----- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 4 ++-- arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 12 ++++++------ arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 12 ++++++------ arch/arm64/boot/dts/mediatek/mt8173.dtsi | 8 ++++---- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 8 ++++---- arch/arm64/boot/dts/mediatek/mt8195-evb.dts | 8 ++++---- 10 files changed, 40 insertions(+), 40 deletions(-) commit 849b425cd091e1804af964b771761cfbefbafb43 Author: Eric Dumazet Date: Tue Jun 14 10:17:34 2022 -0700 tcp: fix possible freeze in tx path under memory pressure Blamed commit only dealt with applications issuing small writes. Issue here is that we allow to force memory schedule for the sk_buff allocation, but we have no guarantee that sendmsg() is able to copy some payload in it. In this patch, I make sure the socket can use up to tcp_wmem[0] bytes. For example, if we consider tcp_wmem[0] = 4096 (default on x86), and initial skb->truesize being 1280, tcp_sendmsg() is able to copy up to 2816 bytes under memory pressure. Before this patch a sendmsg() sending more than 2816 bytes would either block forever (if persistent memory pressure), or return -EAGAIN. For bigger MTU networks, it is advised to increase tcp_wmem[0] to avoid sending too small packets. v2: deal with zero copy paths. Fixes: 8e4d980ac215 ("tcp: fix behavior for epoll edge trigger") Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Reviewed-by: Wei Wang Reviewed-by: Shakeel Butt Signed-off-by: David S. Miller net/ipv4/tcp.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) commit c4ee118561a0f74442439b7b5b486db1ac1ddfeb Author: Eric Dumazet Date: Tue Jun 14 10:17:33 2022 -0700 tcp: fix over estimation in sk_forced_mem_schedule() sk_forced_mem_schedule() has a bug similar to ones fixed in commit 7c80b038d23e ("net: fix sk_wmem_schedule() and sk_rmem_schedule() errors") While this bug has little chance to trigger in old kernels, we need to fix it before the following patch. Fixes: d83769a580f1 ("tcp: fix possible deadlock in tcp_send_fin()") Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Reviewed-by: Shakeel Butt Reviewed-by: Wei Wang Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c5dc92006d50fb55a916755206cbac1022373134 Author: Jani Nikula Date: Thu Jun 16 12:48:20 2022 +0300 drm/i915/display: some struct drm_i915_private *i915 conversions Prefer struct drm_i915_private *i915 over struct drm_device or dev_priv. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1bb84c4fffde5025ddc411148d529381a587e1e1.1655372759.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display.c | 60 ++++++++++++++-------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit 319ff09312934b08b532e605042dd59f41b74458 Author: Jani Nikula Date: Thu Jun 16 12:48:18 2022 +0300 drm/i915/display: rename dev_priv -> i915 in crtc state dump Rename dev_priv to i915 in crtc state dumping code. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/3c1dafd45757d2de2e3f8404674168f2b1241170.1655372759.git.jani.nikula@intel.com .../gpu/drm/i915/display/intel_crtc_state_dump.c | 80 +++++++++++----------- 1 file changed, 40 insertions(+), 40 deletions(-) commit ac1b49be7fa8cddcc194ce66aa453e2b2cff5831 Author: Jani Nikula Date: Thu Jun 16 12:48:17 2022 +0300 drm/i915/display: change who adds [] around crtc state dump context string Add the brackets [] around crtc state dump context string in intel_crtc_state_dump() so the callers don't have to. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/c7d671279fb7d99eaf882bcb88c5c1d653755fb1.1655372759.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_crtc_state_dump.c | 2 +- drivers/gpu/drm/i915/display/intel_display.c | 6 +++--- drivers/gpu/drm/i915/display/intel_modeset_verify.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 77d30613087c7182747a088eb13a547466725dd0 Author: Chunfeng Yun Date: Fri Jun 17 15:23:44 2022 +0800 arm64: dts: mediatek: mt8195: enable usb remote wakeup Enable USB remote wakeup of all four xHCI controller Reviewed-by: AngeloGioacchino Del Regno Tested-by: Macpaul Lin Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220617072344.21461-2-chunfeng.yun@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit ab43a84c9863b65dc20373d5aca4e4d012aa852e Author: Chunfeng Yun Date: Fri Jun 17 15:23:43 2022 +0800 arm64: dts: mediatek: mt8195: add efuse node and cells Add efuse node and cells used by t-phy to fix the bit shift issue Reviewed-by: AngeloGioacchino Del Regno Tested-by: Macpaul Lin Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220617072344.21461-1-chunfeng.yun@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195.dtsi | 55 ++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 3e29d3b318533ad031396a40322e0ae1aaece943 Author: Jani Nikula Date: Thu Jun 16 12:48:16 2022 +0300 drm/i915/display: split out crtc state dump to a separate file Declutter intel_display.c by splitting out crtc state dumping to a separate file. v2: intel_pipe_config_dump -> intel_crtc_state_dump Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/f72a5626473692910263671af91e02251ed87eea.1655372759.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile | 1 + .../gpu/drm/i915/display/intel_crtc_state_dump.c | 314 ++++++++++++++++++++ .../gpu/drm/i915/display/intel_crtc_state_dump.h | 16 ++ drivers/gpu/drm/i915/display/intel_display.c | 315 +-------------------- drivers/gpu/drm/i915/display/intel_display.h | 3 - .../gpu/drm/i915/display/intel_modeset_verify.c | 5 +- 6 files changed, 340 insertions(+), 314 deletions(-) commit df17ff62b626554c6048bf435a87c5fe1981e8a8 Author: Jani Nikula Date: Thu Jun 16 12:48:15 2022 +0300 drm/i915/display: split out modeset verification code Add new file intel_modeset_verify.c for high level modeset verification code to declutter intel_display.h. The new file is supposed to be about crtc/encoder/connector verification; the state verification for very specific functionality such as plls or wm should be placed next to the code it verifies. Fix some minor checkpatch issues while at it. v2: Rebase Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/b9b47c14316a9edb772a8b8f934eabe7e928dd76.1655372759.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_display.c | 243 +------------------- drivers/gpu/drm/i915/display/intel_display.h | 9 + .../gpu/drm/i915/display/intel_modeset_verify.c | 245 +++++++++++++++++++++ .../gpu/drm/i915/display/intel_modeset_verify.h | 21 ++ 5 files changed, 284 insertions(+), 235 deletions(-) commit 781c336a6caa67c68fe3a25b108d1dc38b0e7cc0 Author: Jani Nikula Date: Thu Jun 16 12:48:14 2022 +0300 drm/i915/mpllb: move mpllb state check to intel_snps_phy.c Keep the mpllb implementation details together in intel_snps_phy.c. Also declutter intel_display.c. v2: intel_mpllb_verify_state -> void intel_mpllb_state_verify (Ville) Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/e7340bb0e399aeb2676c4820461187eeb1d4db15.1655372759.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display.c | 46 +-------------------------- drivers/gpu/drm/i915/display/intel_snps_phy.c | 43 +++++++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_snps_phy.h | 5 ++- 3 files changed, 48 insertions(+), 46 deletions(-) commit 109406c92f971e739af04b278ef75dd0fee68a40 Author: Jani Nikula Date: Thu Jun 16 12:48:13 2022 +0300 drm/i915/mpllb: use I915_STATE_WARN() for state mismatch warnings The pipe_config_mismatch() function is primarily for logging comparison results. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/167e54e13a9a41c944910a274e79cbfd39d963b1.1655372759.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit f0978e92c2f7e9a38fa05d30a3e901d16a30698a Author: Jani Nikula Date: Thu Jun 16 12:48:12 2022 +0300 drm/i915/dpll: move shared dpll state verification to intel_dpll_mgr.c Keep the shared dpll implementation details together by moving the dpll state verification to intel_dpll_mgr.c. Also declutter intel_display.c. v2: intel_shared_dpll_verify_state -> intel_shared_dpll_state_verify (Ville) Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/85b02186f1269dd374d11db35900130547a5f2c6.1655372759.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display.c | 94 +-------------------------- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 88 +++++++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_dpll_mgr.h | 5 ++ 3 files changed, 95 insertions(+), 92 deletions(-) commit 88436dec47a89d944e834e27d83a5dfd49d032cd Author: Jani Nikula Date: Thu Jun 16 12:48:11 2022 +0300 drm/i915/wm: move wm state verification to intel_pm.c By moving wm state verification to intel_pm.c, we can make a bunch of functions static, hiding the wm details better. Also declutter intel_display.c. v2: intel_wm_state_verify -> intel_wm_verify_state (Ville) Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/2a7e3141e87181c07eaddcd9c352b8810550b0ce.1655372759.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display.c | 122 +---------------------- drivers/gpu/drm/i915/intel_pm.c | 138 +++++++++++++++++++++++++-- drivers/gpu/drm/i915/intel_pm.h | 14 +-- 3 files changed, 132 insertions(+), 142 deletions(-) commit 41131266c8ce50eaf767a818a4a763bd3eb2a75b Author: Roger Lu Date: Mon May 16 08:43:06 2022 +0800 arm64: dts: mt8183: add svs device information Add compatible/reg/irq/clock/efuse setting in svs node. Signed-off-by: Roger Lu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Kevin Hilman Link: https://lore.kernel.org/r/20220516004311.18358-3-roger.lu@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8183.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 0bbb09b2af9dd24377341899538d3e452c4f7936 Author: Roger Lu Date: Mon May 16 08:43:11 2022 +0800 soc: mediatek: SVS: add mt8192 SVS GPU driver mt8192 SVS GPU uses 2-line (high/low bank) HW architecture to provide bank voltages. High bank helps update higher frequency's voltage and low bank helps update lower frequency's voltage. Signed-off-by: Roger Lu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Kevin Hilman Link: https://lore.kernel.org/r/20220516004311.18358-8-roger.lu@mediatek.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-svs.c | 473 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 468 insertions(+), 5 deletions(-) commit 5ed6605f9040a9a9421a66ce1693539757d54c06 Author: Roger Lu Date: Mon May 16 08:43:10 2022 +0800 dt-bindings: soc: mediatek: add mt8192 svs dt-bindings Add mt8192 svs compatible/resets in dt-bindings. Signed-off-by: Roger Lu Reviewed-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Kevin Hilman Link: https://lore.kernel.org/r/20220516004311.18358-7-roger.lu@mediatek.com Signed-off-by: Matthias Brugger Documentation/devicetree/bindings/soc/mediatek/mtk-svs.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) commit 13f1bbcfb5822fcaacfc652017b57b79ffcacefa Author: Roger Lu Date: Mon May 16 08:43:09 2022 +0800 soc: mediatek: SVS: add debug commands The purpose of SVS is to help find the suitable voltages for DVFS. Therefore, if SVS bank voltages are concerned to be wrong, we can show/disable SVS bank voltages by this patch. Signed-off-by: Roger Lu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Kevin Hilman Link: https://lore.kernel.org/r/20220516004311.18358-6-roger.lu@mediatek.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-svs.c | 275 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 275 insertions(+) commit 6c69271926e9aca9254bf844b976958dfa0089c7 Author: Roger Lu Date: Mon May 16 08:43:08 2022 +0800 soc: mediatek: SVS: add monitor mode SVS monitor mode is based on different thermal temperature to provide suitable SVS bank voltages. Signed-off-by: Roger Lu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Kevin Hilman Link: https://lore.kernel.org/r/20220516004311.18358-5-roger.lu@mediatek.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-svs.c | 256 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 250 insertions(+), 6 deletions(-) commit 681a02e9500073cd8b9c25a04f06166254b5a879 Author: Roger Lu Date: Mon May 16 08:43:07 2022 +0800 soc: mediatek: SVS: introduce MTK SVS engine The Smart Voltage Scaling(SVS) engine is a piece of hardware which calculates suitable SVS bank voltages to OPP voltage table. Then, DVFS driver could apply those SVS bank voltages to PMIC/Buck when receiving OPP_EVENT_ADJUST_VOLTAGE. Signed-off-by: Roger Lu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Kevin Hilman Link: https://lore.kernel.org/r/20220516004311.18358-4-roger.lu@mediatek.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/Kconfig | 10 + drivers/soc/mediatek/Makefile | 1 + drivers/soc/mediatek/mtk-svs.c | 1417 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1428 insertions(+) commit d969f2171eaf1ee8a28f57e41664c5f488e43890 Author: Roger Lu Date: Mon May 16 08:43:05 2022 +0800 dt-bindings: soc: mediatek: add mtk svs dt-bindings Document the binding for enabling mtk svs on MediaTek SoC. Signed-off-by: Roger Lu Reviewed-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Kevin Hilman Link: https://lore.kernel.org/r/20220516004311.18358-2-roger.lu@mediatek.com Signed-off-by: Matthias Brugger .../devicetree/bindings/soc/mediatek/mtk-svs.yaml | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit 08c79c9cd67fffd0d5538ddbd3a97b0a865b5eb5 Author: Andrii Nakryiko Date: Thu Jun 16 21:55:12 2022 -0700 selftests/bpf: Don't force lld on non-x86 architectures LLVM's lld linker doesn't have a universal architecture support (e.g., it definitely doesn't work on s390x), so be safe and force lld for urandom_read and liburandom_read.so only on x86 architectures. This should fix s390x CI runs. Fixes: 3e6fe5ce4d48 ("libbpf: Fix internal USDT address translation logic for shared libraries") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220617045512.1339795-1-andrii@kernel.org tools/testing/selftests/bpf/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 9f1b1d0b2242171b2891a0398def233801601c14 Author: Tvrtko Ursulin Date: Thu Jun 16 15:00:56 2022 +0100 drm/i915/fdinfo: Don't show engine classes not present Stop displaying engine classes with no engines - it is not a huge problem if they are shown, since the values will correctly be all zeroes, but it does count as misleading. Signed-off-by: Tvrtko Ursulin Fixes: 055634e4b62f ("drm/i915: Expose client engine utilisation via fdinfo") Cc: Umesh Nerlige Ramappa Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20220616140056.559074-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drm_client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 45c64ecf97ee370bbdbd8eed7aed9c8ff5d1b0dd Author: Tvrtko Ursulin Date: Fri May 27 08:24:52 2022 +0100 drm/i915: Improve user experience and driver robustness under SIGINT or similar We have long standing customer complaints that pressing Ctrl-C (or to the effect of) causes engine resets with otherwise well behaving programs. Not only is logging engine resets during normal operation not desirable since it creates support incidents, but more fundamentally we should avoid going the engine reset path when we can since any engine reset introduces a chance of harming an innocent context. Reason for this undesirable behaviour is that the driver currently does not distinguish between banned contexts and non-persistent contexts which have been closed. To fix this we add the distinction between the two reasons for revoking contexts, which then allows the strict timeout only be applied to banned, while innocent contexts (well behaving) can preempt cleanly and exit without triggering the engine reset path. Note that the added context exiting category applies both to closed non- persistent context, and any exiting context when hangcheck has been disabled by the user. At the same time we rename the backend operation from 'ban' to 'revoke' which more accurately describes the actual semantics. (There is no ban at the backend level since banning is a concept driven by the scheduling frontend. Backends are simply able to revoke a running context so that is the more appropriate name chosen.) Signed-off-by: Tvrtko Ursulin Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20220527072452.2225610-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gem/i915_gem_context.c | 23 +++++++++++++------- drivers/gpu/drm/i915/gt/intel_context.c | 24 +++++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_context.h | 25 ++++++++++++++++------ drivers/gpu/drm/i915/gt/intel_context_types.h | 4 +++- .../gpu/drm/i915/gt/intel_execlists_submission.c | 6 +++--- drivers/gpu/drm/i915/gt/intel_ring_submission.c | 7 +++--- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 15 +++++++------ drivers/gpu/drm/i915/i915_request.c | 2 +- 8 files changed, 77 insertions(+), 29 deletions(-) commit 3c7742a45c170430001c5a1767d9dd76686dc14d Author: Geert Uytterhoeven Date: Wed Jun 15 16:01:10 2022 +0200 ARM: dts: rza2mevb: Fix LED node names "make dtbs_check": arch/arm/boot/dts/r7s9210-rza2mevb.dtb: leds: 'green', 'red' do not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/leds/leds-gpio.yaml Fix this by prefixing the LED node names with "led-". Signed-off-by: Geert Uytterhoeven Reviewed-by: Kieran Bingham Link: https://lore.kernel.org/r/f6e2883c16803b5d90a26c38d8e61ad15096089c.1655301593.git.geert+renesas@glider.be arch/arm/boot/dts/r7s9210-rza2mevb.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 62e8a53431145e06e503b71625a34eaa87b72b2c Author: Geert Uytterhoeven Date: Wed Jun 15 16:04:26 2022 +0200 arm64: dts: renesas: Fix thermal-sensors on single-zone sensors "make dtbs_check": arch/arm64/boot/dts/renesas/r8a774c0-cat874.dtb: thermal-zones: cpu-thermal:thermal-sensors: [[74], [0]] is too long arch/arm64/boot/dts/renesas/r8a774c0-ek874.dtb: thermal-zones: cpu-thermal:thermal-sensors: [[79], [0]] is too long arch/arm64/boot/dts/renesas/r8a774c0-ek874-idk-2121wr.dtb: thermal-zones: cpu-thermal:thermal-sensors: [[82], [0]] is too long arch/arm64/boot/dts/renesas/r8a774c0-ek874-mipi-2.1.dtb: thermal-zones: cpu-thermal:thermal-sensors: [[87], [0]] is too long arch/arm64/boot/dts/renesas/r8a77990-ebisu.dtb: thermal-zones: cpu-thermal:thermal-sensors: [[105], [0]] is too long From schema: Documentation/devicetree/bindings/thermal/thermal-zones.yaml Indeed, the thermal sensors on R-Car E3 and RZ/G2E support only a single zone, hence #thermal-sensor-cells = <0>. Fix this by dropping the bogus zero cell from the thermal sensor specifiers. Fixes: 8fa7d18f9ee2dc20 ("arm64: dts: renesas: r8a77990: Create thermal zone to support IPA") Fixes: 8438bfda9d768157 ("arm64: dts: renesas: r8a774c0: Create thermal zone to support IPA") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/28b812fdd1fc3698311fac984ab8b91d3d655c1c.1655301684.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a774c0.dtsi | 2 +- arch/arm64/boot/dts/renesas/r8a77990.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1614c8624a48b9c9161b2071e9e727bf5a1817ef Author: Wolfram Sang Date: Tue Jun 14 21:30:05 2022 +0200 arm64: dts: renesas: spider-cpu: Enable SCIF0 on second connector The schematics label it as SCIF0 debug port. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20220614193005.2652-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a779f0-spider-cpu.dtsi | 13 +++++++++++++ arch/arm64/boot/dts/renesas/r8a779f0-spider.dts | 1 + 2 files changed, 14 insertions(+) commit 40753144256b63b4e3fb9d80874605dda16ad713 Author: Linh Phung Date: Tue Jun 14 11:52:42 2022 +0200 arm64: dts: renesas: r8a779f0: Add SCIF nodes Extracted from a bigger patch in the BSP, rebased, reg length corrected, and DMA properties added. Signed-off-by: Linh Phung Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20220614095242.8264-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 01a787f78bfd156d61b1844155f1dc4910e446c0 Author: Linh Phung Date: Tue Jun 14 11:51:09 2022 +0200 arm64: dts: renesas: r8a779f0: Add HSCIF nodes Extracted from a bigger patch in the BSP, rebased and DMA properties added. Signed-off-by: Linh Phung Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20220614095109.8175-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 68 +++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit c62872a6893ffdc38890b00d98d6bab2fce81d2f Author: Wolfram Sang Date: Mon Jun 13 15:49:12 2022 +0200 arm64: dts: renesas: r8a779f0: Add DMA properties to SCIF3 Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20220613134914.18655-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 86aefa0d8dfa6dd488e2810461f714dd2794b0ee Author: Niklas Söderlund Date: Wed Jun 8 19:57:28 2022 +0200 arm64: dts: renesas: Add missing space after remote-endpoint Add the missing space after remote-endpoint in r8a774c0.dtsi and r8a77990.dtsi before the typo spreads to other files. Signed-off-by: Niklas Söderlund Link: https://lore.kernel.org/r/20220608175728.1012550-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a774c0.dtsi | 4 ++-- arch/arm64/boot/dts/renesas/r8a77990.dtsi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 52271d32348e22e5a7ce4fc80015ffb06a4ebf20 Author: Biju Das Date: Wed Jun 8 18:30:25 2022 +0100 arm64: dts: renesas: rzg2ul-smarc-som: Enable ADC on SMARC platform Enable the ADC found on RZ/G2UL SMARC SoM. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20220608173025.22792-3-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/rzg2ul-smarc-som.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit ea25b1836f57e91e2432b315727fc3f3b8c92872 Author: Biju Das Date: Wed Jun 8 18:30:24 2022 +0100 arm64: dts: renesas: rzg2ul-smarc: Enable RSPI1 on carrier board RSPI1 (SPI1) interface is available on PMOD0 connector (J1) on the carrier board. This patch adds pinmux and spi1 nodes to the carrier board dtsi file and drops deleting pinctl* properties from board DTS file. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20220608173025.22792-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r9a07g043u11-smarc.dts | 6 ------ arch/arm64/boot/dts/renesas/rzg2ul-smarc-som.dtsi | 7 +++++++ arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi | 6 ++++++ 3 files changed, 13 insertions(+), 6 deletions(-) commit e5fba0bc8240eb3f255e1f2cd5c74ecd29363791 Author: Geert Uytterhoeven Date: Wed Jun 8 17:40:22 2022 +0200 arm64: dts: renesas: r8a779f0: Add CPU core clocks Describe the clocks for the eight Cortex-A55 CPU cores. CA55 Sub-System 0 (first 2 clusters / CPU cores 0-3) is clocked by Z0φ. CA55 Sub-System 1 (last 2 clusters / CPU cores 4-7) is clocked by Z1φ. For now no operating points are defined. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/c502087f9affa86dd665def0d990d277a51cc75c.1654701480.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9bc7cd07aadedaa388636fe15966bea5e3f91ea7 Author: Tho Vu Date: Wed Jun 8 17:40:21 2022 +0200 arm64: dts: renesas: r8a779f0: Add CPUIdle support Support CPUIdle for ARM Cortex-A55 on R-Car S4-8. Signed-off-by: Tho Vu Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/5310792ce4c06515a5373ff44ceb9b925f007489.1654701480.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 2dcb78d2266c0a8790cc92af3cd08dadee3d7c27 Author: Geert Uytterhoeven Date: Wed Jun 8 17:40:20 2022 +0200 arm64: dts: renesas: r8a779f0: Add secondary CA55 CPU cores Complete the description of the Cortex-A55 CPU cores and L3 cache controllers on the Renesas R-Car S4-8 (R8A779F0) SoC, including CPU topology and PSCI support for enabling CPU cores. R-Car S4-8 has 8 Cortex-A55 cores, grouped in 4 clusters. Based on patches in the BSP by Takeshi Kihara. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/d6af5975090d5830cb053b52400439bd1cbe8fc7.1654701480.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 138 ++++++++++++++++++++++++++++-- 1 file changed, 133 insertions(+), 5 deletions(-) commit ffeca49a8ba9aa39439d30b7bb51f453706b6a0d Author: Geert Uytterhoeven Date: Wed Jun 8 17:40:19 2022 +0200 arm64: dts: renesas: r8a779f0: Add L3 cache controller Describe the cache configuration for the first Cortex-A55 CPU core on the Renesas R-Car S4-8 (R8A779F0) SoC. Extracted from a larger patch in the BSP by LUU HOAI. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/a63715ce1d2d2fcc7ab987f7a1b40847965e8d6a.1654701480.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 06279f82da68882b83524385834eeacf1993724f Author: Geert Uytterhoeven Date: Wed Jun 8 17:17:42 2022 +0200 arm64: dts: renesas: r8a779a0: Add CPU0 core clock Describe the clock for the first Cortex-A76 CPU core. For now no operating points are defined. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/3ace4eea4ff1cdc0f7b8ea7d0433c1063d795785.1654701400.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 1 + 1 file changed, 1 insertion(+) commit 650fd1d058a161a953f4034acae32471d4b94493 Author: Geert Uytterhoeven Date: Wed Jun 8 17:16:25 2022 +0200 arm64: dts: renesas: r8a779a0: Update to R-Car Gen4 compatible values Despite the name, R-Car V3U is the first member of the R-Car Gen4 family. Hence update the compatible properties in various device nodes to include family-specific compatible values for R-Car Gen4: - GPIO. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/b477eea0fc33a055d1b1874847e26614f68f5da0.1654701299.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 4d6119f06ce14756777c4bb098fb4ad99a0a5d46 Author: Sergey Shtylyov Date: Wed Jun 15 22:38:20 2022 +0300 ata: libata-core: make ata_exec_internal_sg() *static* ata_exec_internal_sg() is only called by ata_exec_internal() further in the same file, so we can make it *static* and remove its prototype from drivers/ata/libata.h... Suggested-by: Damien Le Moal Signed-off-by: Sergey Shtylyov Signed-off-by: Damien Le Moal drivers/ata/libata-core.c | 8 ++++---- drivers/ata/libata.h | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) commit d18529a4c12f66d83daac78045ea54063bd43257 Author: Liang He Date: Thu Jun 16 22:49:15 2022 +0800 soc: amlogic: Fix refcount leak in meson-secure-pwrc.c In meson_secure_pwrc_probe(), there is a refcount leak in one fail path. Signed-off-by: Liang He Acked-by: Martin Blumenstingl Fixes: b3dde5013e13 ("soc: amlogic: Add support for Secure power domains controller") Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20220616144915.3988071-1-windhl@126.com drivers/soc/amlogic/meson-secure-pwrc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9e8322dcf5f677cfc65d982546fb3aa6fa8b399a Author: Clément Léger Date: Wed Jun 8 11:08:50 2022 +0200 ARM: dts: r9a06g032-rzn1d400-db: Enable rtc0 The RZ/N1D-DB board does have a battery to power the RTC. Enable the RTC device on this board. Signed-off-by: Clément Léger Link: https://lore.kernel.org/r/20220608090850.92735-1-clement.leger@bootlin.com Signed-off-by: Geert Uytterhoeven arch/arm/boot/dts/r9a06g032-rzn1d400-db.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 290cedeca6fa315c54e056b7bdd3fdd99e5303eb Author: Wolfram Sang Date: Sat Jun 4 01:29:40 2022 +0200 arm64: dts: renesas: rzg2l-smarc: Use proper bool operator When checking for defined macros, we want the boolean AND not the binary one. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20220603232940.21736-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/rzg2lc-smarc.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5235d551779d2850d95ff1de762c69187fdf8dd5 Author: Yoshihiro Shimoda Date: Fri Jun 3 20:05:23 2022 +0900 arm64: dts: renesas: r8a779f0: Add UFS node Add UFS node for R-Car S4-8 (r8a779f0). Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20220603110524.1997825-7-yoshihiro.shimoda.uh@renesas.com [geert: Move ufs30-clk to preserve sort order] Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 3a9747f0512409d366692caf5f05d5f0f5ab9d15 Author: Yoshihiro Shimoda Date: Mon May 30 11:46:26 2022 +0900 arm64: dts: renesas: r8a779f0: Add iommus to DMAC nodes Add iommus properties to the DMAC nodes for r8a779f0. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20220530024626.1870277-3-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit fd869e63b6ba16caf010cce5932bfd33dd680daa Author: Yoshihiro Shimoda Date: Mon May 30 11:46:25 2022 +0900 arm64: dts: renesas: r8a779f0: Add IPMMU nodes Add IPMMU nodes for r8a779f0. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20220530024626.1870277-2-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 76f9a56152026c91adc33a6c1e49e8f5c0b80720 Author: Krzysztof Kozlowski Date: Thu May 26 22:42:31 2022 +0200 arm64: dts: renesas: Adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526204231.832090-1-krzysztof.kozlowski@linaro.org Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/draak.dtsi | 2 +- arch/arm64/boot/dts/renesas/ebisu.dtsi | 2 +- arch/arm64/boot/dts/renesas/salvator-common.dtsi | 2 +- arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 14 +++++++------- arch/arm64/boot/dts/renesas/ulcb.dtsi | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) commit 5a3ad6f466fe7a187cbf4889d80a48606181c367 Author: Linh Phung Date: Wed May 25 17:13:55 2022 +0200 arm64: dts: renesas: r8a779f0: Add thermal support Add support for 3 TSC nodes of thermal. The 4th node is for the control domain and not for Linux. Signed-off-by: Linh Phung [wsa: rebased, fixed resource size, removed unused 4th node breaking probe] Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20220525151355.24175-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 56 +++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit f0a6d77b351c18c122fc1638ac9e58f5e0346f64 Author: Sergey Shtylyov Date: Tue Jun 14 22:51:47 2022 +0300 ata: make transfer mode masks *unsigned int* The packed transfer mode masks and also the {pio|mwdma|udma}_mask fields of *struct*s ata_device and ata_port_info are declared as *unsigned long* (which is a 64-bit type on 64-bit architectures) but actually the packed masks occupy only 20 bits (7 PIO modes, 5 MWDMA modes, and 8 UDMA modes) and the PIO/MWDMA/UDMA masks easily fit into just 8 bits each, so we can safely use (always 32-bit) *unsigned int* variables instead. This saves 745 bytes of object code in libata-core.o alone, not to mention LLDDs... Signed-off-by: Sergey Shtylyov Signed-off-by: Damien Le Moal drivers/ata/libata-acpi.c | 8 +++---- drivers/ata/libata-core.c | 38 ++++++++++++++++---------------- drivers/ata/pata_acpi.c | 2 +- drivers/ata/pata_ali.c | 2 +- drivers/ata/pata_amd.c | 14 ++++++------ drivers/ata/pata_hpt366.c | 2 +- drivers/ata/pata_hpt37x.c | 6 +++--- drivers/ata/pata_hpt3x2n.c | 2 +- drivers/ata/pata_pdc2027x.c | 4 ++-- drivers/ata/pata_serverworks.c | 4 ++-- drivers/ata/pata_sis.c | 2 +- drivers/ata/pata_via.c | 2 +- include/linux/libata.h | 49 +++++++++++++++++++++--------------------- 13 files changed, 67 insertions(+), 68 deletions(-) commit 774fecc7ece1d5b7c604402ac2daede14825a467 Author: Geert Uytterhoeven Date: Mon May 2 14:40:57 2022 +0200 dt-bindings: soc: renesas: Move renesas,prr from arm to soc The Renesas Product Register DT binding is not a top-level DT binding, hence it does not belong under Documentation/devicetree/bindings/arm/. Move it to Documentation/devicetree/bindings/soc/renesas/. While at it, change the license from GPL-2.0 (only) to GPL-2.0-only OR BSD-2-Clause, to match common practices. Signed-off-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski Acked-by: Simon Horman Link: https://lore.kernel.org/r/5f124fc332b4b866f5238ada7ac000f4639c88c3.1651495078.git.geert+renesas@glider.be .../devicetree/bindings/{arm => soc/renesas}/renesas,prr.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 080bcd8d5997b1a615e17cab02bd9d16d1d4fbf3 Author: Wolfram Sang Date: Tue Jun 14 11:49:37 2022 +0200 clk: renesas: r8a779f0: Add HSCIF clocks Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20220614094937.8104-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a779f0-cpg-mssr.c | 4 ++++ 1 file changed, 4 insertions(+) commit b7f64eaee5a345fe0c454f939252b46a26b47434 Author: Yoshihiro Shimoda Date: Mon Jun 13 20:56:27 2022 +0900 clk: renesas: r8a779f0: Add PCIe clocks Add the module clocks used by the PCIe controllers on the Renesas R-Car S4-8 (R8A779F0) SoC. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20220613115627.2831257-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a779f0-cpg-mssr.c | 2 ++ 1 file changed, 2 insertions(+) commit d5c10876c76f6110a968c4afa065ef09a8630868 Author: Geert Uytterhoeven Date: Wed Jun 8 15:46:32 2022 +0200 clk: renesas: r8a779f0: Add Z0 and Z1 clock support Add support for the Z0 and Z1 (Cortex-A55 Sub-System 0 (CPU 0-3) and Sub-System 1 (CPU 4-7)) clocks on R-Car S4-8, based on the existing support for Z clocks on R-Car Gen4. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/43009e25be1223a717e00c392cb2d416f5d47032.1654695893.git.geert+renesas@glider.be drivers/clk/renesas/r8a779f0-cpg-mssr.c | 2 ++ 1 file changed, 2 insertions(+) commit 5278cc93a97f7b7b9e69632e52503e956153d944 Author: Christian Marangi Date: Thu Jun 16 02:18:35 2022 +0200 dt-bindings: mtd: qcom_nandc: document qcom,boot-partitions binding Document new qcom,boot-partition binding used to apply special read/write layout to boot partitions. QCOM apply a special layout where spare data is not protected by ECC for some special pages (used for boot partition). Add Documentation on how to declare these special pages. Signed-off-by: Christian Marangi Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220616001835.24393-4-ansuelsmth@gmail.com .../devicetree/bindings/mtd/qcom,nandc.yaml | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 862bdedd7f4b8aebf00fdb422062e64896e97809 Author: Christian Marangi Date: Thu Jun 16 02:18:34 2022 +0200 mtd: nand: raw: qcom_nandc: add support for unprotected spare data pages IPQ8064 nand have special pages where a different layout scheme is used. These special page are used by boot partition and on reading them lots of warning are reported about wrong ECC data and if written to results in broken data and not bootable device. The layout scheme used by these special page consist in using 512 bytes as the codeword size (even for the last codeword) while writing to CFG0 register. This forces the NAND controller to unprotect the 4 bytes of spare data. Since the kernel is unaware of this different layout for these special page, it does try to protect the spare data too during read/write and warn about CRC errors. Add support for this by permitting the user to declare these special pages in dts by declaring offset and size of the partition. The driver internally will convert these value to nand pages. On user read/write the page is checked and if it's a boot page the correct layout is used. Signed-off-by: Christian Marangi Reviewed-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220616001835.24393-3-ansuelsmth@gmail.com drivers/mtd/nand/raw/qcom_nandc.c | 199 +++++++++++++++++++++++++++++++++++++- 1 file changed, 194 insertions(+), 5 deletions(-) commit b360514edb4743cbf86fc377699c75e98b1264c7 Author: Christian Marangi Date: Thu Jun 16 02:18:33 2022 +0200 mtd: nand: raw: qcom_nandc: reorder qcom_nand_host struct Reorder structs in nandc driver to save holes. Signed-off-by: Christian Marangi Reviewed-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220616001835.24393-2-ansuelsmth@gmail.com drivers/mtd/nand/raw/qcom_nandc.c | 107 ++++++++++++++++++++++---------------- 1 file changed, 62 insertions(+), 45 deletions(-) commit 278811d5a7b2af4e737c88ab3137d3ccc0732ac1 Author: Yang Yingliang Date: Fri Jun 17 09:40:08 2022 +0800 mtd: parsers: scpart: add missing of_node_put() in scpart_parse() of_get_child_by_name() will increase the refcount of 'ofpart_node', so add of_node_put() after using it to avoid refcount leak. Fixes: 9b78ef0c7997 ("mtd: parsers: add support for Sercomm partitions") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220617014008.851583-1-yangyingliang@huawei.com drivers/mtd/parsers/scpart.c | 1 + 1 file changed, 1 insertion(+) commit 4429bdc40826a5515fa9d86eb00157e60bfbe658 Merge: 88bf18581375 784d5dc0efc2 Author: Alexei Starovoitov Date: Thu Jun 16 21:20:30 2022 -0700 Merge branch 'New BPF helpers to accelerate synproxy' Maxim Mikityanskiy says: ==================== The first patch of this series is a documentation fix. The second patch allows BPF helpers to accept memory regions of fixed size without doing runtime size checks. The two next patches add new functionality that allows XDP to accelerate iptables synproxy. v1 of this series [1] used to include a patch that exposed conntrack lookup to BPF using stable helpers. It was superseded by series [2] by Kumar Kartikeya Dwivedi, which implements this functionality using unstable helpers. The third patch adds new helpers to issue and check SYN cookies without binding to a socket, which is useful in the synproxy scenario. The fourth patch adds a selftest, which includes an XDP program and a userspace control application. The XDP program uses socketless SYN cookie helpers and queries conntrack status instead of socket status. The userspace control application allows to tune parameters of the XDP program. This program also serves as a minimal example of usage of the new functionality. The last two patches expose the new helpers to TC BPF and extend the selftest. The draft of the new functionality was presented on Netdev 0x15 [3]. v2 changes: Split into two series, submitted bugfixes to bpf, dropped the conntrack patches, implemented the timestamp cookie in BPF using bpf_loop, dropped the timestamp cookie patch. v3 changes: Moved some patches from bpf to bpf-next, dropped the patch that changed error codes, split the new helpers into IPv4/IPv6, added verifier functionality to accept memory regions of fixed size. v4 changes: Converted the selftest to the test_progs runner. Replaced some deprecated functions in xdp_synproxy userspace helper. v5 changes: Fixed a bug in the selftest. Added questionable functionality to support new helpers in TC BPF, added selftests for it. v6 changes: Wrap the new helpers themselves into #ifdef CONFIG_SYN_COOKIES, replaced fclose with pclose and fixed the MSS for IPv6 in the selftest. v7 changes: Fixed the off-by-one error in indices, changed the section name to "xdp", added missing kernel config options to vmtest in CI. v8 changes: Properly rebased, dropped the first patch (the same change was applied by someone else), updated the cover letter. v9 changes: Fixed selftests for no_alu32. v10 changes: Selftests for s390x were blacklisted due to lack of support of kfunc, rebased the series, split selftests to separate commits, created ARG_PTR_TO_FIXED_SIZE_MEM and packed arg_size, addressed the rest of comments. [1]: https://lore.kernel.org/bpf/20211020095815.GJ28644@breakpoint.cc/t/ [2]: https://lore.kernel.org/bpf/20220114163953.1455836-1-memxor@gmail.com/ [3]: https://netdevconf.info/0x15/session.html?Accelerating-synproxy-with-XDP ==================== Signed-off-by: Alexei Starovoitov commit 784d5dc0efc28bd0a52ccfedb707eba71d8bc8af Author: Maxim Mikityanskiy Date: Wed Jun 15 16:48:47 2022 +0300 selftests/bpf: Add selftests for raw syncookie helpers in TC mode This commit extends selftests for the new BPF helpers bpf_tcp_raw_{gen,check}_syncookie_ipv{4,6} to also test the TC BPF functionality added in the previous commit. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Link: https://lore.kernel.org/r/20220615134847.3753567-7-maximmi@nvidia.com Signed-off-by: Alexei Starovoitov .../selftests/bpf/prog_tests/xdp_synproxy.c | 55 ++++++-- .../selftests/bpf/progs/xdp_synproxy_kern.c | 142 +++++++++++++++------ tools/testing/selftests/bpf/xdp_synproxy.c | 96 ++++++++++---- 3 files changed, 224 insertions(+), 69 deletions(-) commit 9a4cf073866c414199be52bdac1afe6f72ecb8e1 Author: Maxim Mikityanskiy Date: Wed Jun 15 16:48:46 2022 +0300 bpf: Allow the new syncookie helpers to work with SKBs This commit allows the new BPF helpers to work in SKB context (in TC BPF programs): bpf_tcp_raw_{gen,check}_syncookie_ipv{4,6}. Using these helpers in TC BPF programs is not recommended, because it's unlikely that the BPF program will provide any substantional speedup compared to regular SYN cookies or synproxy, after the SKB is already created. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Link: https://lore.kernel.org/r/20220615134847.3753567-6-maximmi@nvidia.com Signed-off-by: Alexei Starovoitov net/core/filter.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit fb5cd0ce70d43b9bf589aa05aaa067350c3d3b26 Author: Maxim Mikityanskiy Date: Wed Jun 15 16:48:45 2022 +0300 selftests/bpf: Add selftests for raw syncookie helpers This commit adds selftests for the new BPF helpers: bpf_tcp_raw_{gen,check}_syncookie_ipv{4,6}. xdp_synproxy_kern.c is a BPF program that generates SYN cookies on allowed TCP ports and sends SYNACKs to clients, accelerating synproxy iptables module. xdp_synproxy.c is a userspace control application that allows to configure the following options in runtime: list of allowed ports, MSS, window scale, TTL. A selftest is added to prog_tests that leverages the above programs to test the functionality of the new helpers. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Link: https://lore.kernel.org/r/20220615134847.3753567-5-maximmi@nvidia.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/.gitignore | 1 + tools/testing/selftests/bpf/Makefile | 3 +- .../selftests/bpf/prog_tests/xdp_synproxy.c | 146 ++++ .../selftests/bpf/progs/xdp_synproxy_kern.c | 763 +++++++++++++++++++++ tools/testing/selftests/bpf/xdp_synproxy.c | 418 +++++++++++ 5 files changed, 1330 insertions(+), 1 deletion(-) commit 33bf9885040c399cf6a95bd33216644126728e14 Author: Maxim Mikityanskiy Date: Wed Jun 15 16:48:44 2022 +0300 bpf: Add helpers to issue and check SYN cookies in XDP The new helpers bpf_tcp_raw_{gen,check}_syncookie_ipv{4,6} allow an XDP program to generate SYN cookies in response to TCP SYN packets and to check those cookies upon receiving the first ACK packet (the final packet of the TCP handshake). Unlike bpf_tcp_{gen,check}_syncookie these new helpers don't need a listening socket on the local machine, which allows to use them together with synproxy to accelerate SYN cookie generation. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Link: https://lore.kernel.org/r/20220615134847.3753567-4-maximmi@nvidia.com Signed-off-by: Alexei Starovoitov include/net/tcp.h | 1 + include/uapi/linux/bpf.h | 78 +++++++++++++++++++++++++++ net/core/filter.c | 118 +++++++++++++++++++++++++++++++++++++++++ net/ipv4/tcp_input.c | 3 +- scripts/bpf_doc.py | 4 ++ tools/include/uapi/linux/bpf.h | 78 +++++++++++++++++++++++++++ 6 files changed, 281 insertions(+), 1 deletion(-) commit 508362ac66b0478affb4e52cb8da98478312d72d Author: Maxim Mikityanskiy Date: Wed Jun 15 16:48:43 2022 +0300 bpf: Allow helpers to accept pointers with a fixed size Before this commit, the BPF verifier required ARG_PTR_TO_MEM arguments to be followed by ARG_CONST_SIZE holding the size of the memory region. The helpers had to check that size in runtime. There are cases where the size expected by a helper is a compile-time constant. Checking it in runtime is an unnecessary overhead and waste of BPF registers. This commit allows helpers to accept pointers to memory without the corresponding ARG_CONST_SIZE, given that they define the memory region size in struct bpf_func_proto and use ARG_PTR_TO_FIXED_SIZE_MEM type. arg_size is unionized with arg_btf_id to reduce the kernel image size, and it's valid because they are used by different argument types. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Link: https://lore.kernel.org/r/20220615134847.3753567-3-maximmi@nvidia.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 13 +++++++++++++ kernel/bpf/verifier.c | 43 ++++++++++++++++++++++++++++++++----------- 2 files changed, 45 insertions(+), 11 deletions(-) commit ac80287a6af9fc3f3d189d6d1f523889a0a9e1bc Author: Maxim Mikityanskiy Date: Wed Jun 15 16:48:42 2022 +0300 bpf: Fix documentation of th_len in bpf_tcp_{gen,check}_syncookie bpf_tcp_gen_syncookie expects the full length of the TCP header (with all options), and bpf_tcp_check_syncookie accepts lengths bigger than sizeof(struct tcphdr). Fix the documentation that says these lengths should be exactly sizeof(struct tcphdr). While at it, fix a typo in the name of struct ipv6hdr. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Link: https://lore.kernel.org/r/20220615134847.3753567-2-maximmi@nvidia.com Signed-off-by: Alexei Starovoitov include/uapi/linux/bpf.h | 10 ++++++---- tools/include/uapi/linux/bpf.h | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) commit e8b03391b6a7353368d0d2d6ed2b5f03e0c6112f Merge: f0502724367a 311abcdddc00 Author: Jakub Kicinski Date: Thu Jun 16 20:45:51 2022 -0700 Merge branch 'net-lan743x-pci11010-pci11414-devices-enhancements' Raju Lakkaraju says: ==================== net: lan743x: PCI11010 / PCI11414 devices Enhancements This patch series continues with the addition of supported features for the Ethernet function of the PCI11010 / PCI11414 devices to the LAN743x driver. ==================== Link: https://lore.kernel.org/r/20220616041226.26996-1-Raju.Lakkaraju@microchip.com Signed-off-by: Jakub Kicinski commit 311abcdddc00aa733211fb3e92815155066896e1 Author: Raju Lakkaraju Date: Thu Jun 16 09:42:26 2022 +0530 net: phy: add support to get Master-Slave configuration Add support to Master-Slave configuration and state Signed-off-by: Raju Lakkaraju Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski drivers/net/phy/mxl-gpy.c | 3 +++ 1 file changed, 3 insertions(+) commit 46b777ad9a8c269113634cee6a380bc4e53f3964 Author: Raju Lakkaraju Date: Thu Jun 16 09:42:25 2022 +0530 net: lan743x: Add support to SGMII 1G and 2.5G Add SGMII access read and write functions Add support to SGMII 1G and 2.5G for PCI11010/PCI11414 chips Signed-off-by: Raju Lakkaraju Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/lan743x_ethtool.c | 6 +- drivers/net/ethernet/microchip/lan743x_main.c | 349 ++++++++++++++++++++++- drivers/net/ethernet/microchip/lan743x_main.h | 96 +++++++ 3 files changed, 442 insertions(+), 9 deletions(-) commit 6b3768ac8e2b3e3594f6851a073f2a11cfb82719 Author: Raju Lakkaraju Date: Thu Jun 16 09:42:24 2022 +0530 net: lan743x: Add support to Secure-ON WOL Add support to Magic Packet Detection with Secure-ON for PCI11010/PCI11414 chips Signed-off-by: Raju Lakkaraju Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/lan743x_ethtool.c | 12 ++++++++++ drivers/net/ethernet/microchip/lan743x_main.c | 29 ++++++++++++++++++++++++ drivers/net/ethernet/microchip/lan743x_main.h | 10 ++++++++ 3 files changed, 51 insertions(+) commit 9aeb87d2b5a18ff21cfe249dd3f3d53066888c6b Author: Raju Lakkaraju Date: Thu Jun 16 09:42:23 2022 +0530 net: lan743x: Add support to LAN743x register dump Add support to LAN743x common register dump Signed-off-by: Raju Lakkaraju Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/lan743x_ethtool.c | 45 ++++++++++++++++++++++++ drivers/net/ethernet/microchip/lan743x_ethtool.h | 26 ++++++++++++++ 2 files changed, 71 insertions(+) commit f0502724367aa8131465c6f0a82d9549e1cedbd7 Merge: 821c7733d26c a48b6e44a9e7 Author: Jakub Kicinski Date: Thu Jun 16 20:44:51 2022 -0700 Merge branch 'net-dsa-realtek-rtl8365mb-improve-handling-of-phy-modes' Alvin Šipraga says: ==================== net: dsa: realtek: rtl8365mb: improve handling of PHY modes This series introduces some minor cleanup of the driver and improves the handling of PHY interface modes to break the assumption that CPU ports are always over an external interface, and the assumption that user ports are always using an internal PHY. ==================== Link: https://lore.kernel.org/r/20220615225116.432283-1-alvin@pqrs.dk Signed-off-by: Jakub Kicinski commit a48b6e44a9e73cbeef96145b539a84856e10500c Author: Alvin Šipraga Date: Thu Jun 16 00:51:15 2022 +0200 net: dsa: realtek: rtl8365mb: handle PHY interface modes correctly Realtek switches in the rtl8365mb family always have at least one port with a so-called external interface, supporting PHY interface modes such as RGMII or SGMII. The purpose of this patch is to improve the driver's handling of these ports. A new struct rtl8365mb_chip_info is introduced together with a static array of such structs. An instance of this struct is added for each supported switch, distinguished by its chip ID and version. Embedded in each chip_info struct is an array of struct rtl8365mb_extint, describing the external interfaces available. This is more specific than the old rtl8365mb_extint_port_map, which was only valid for switches with up to 6 ports. The struct rtl8365mb_extint also contains a bitmask of supported PHY interface modes, which allows the driver to distinguish which ports support RGMII. This corrects a previous mistake in the driver whereby it was assumed that any port with an external interface supports RGMII. This is not actually the case: for example, the RTL8367S has two external interfaces, only the second of which supports RGMII. The first supports only SGMII and HSGMII. This new design will make it easier to add support for other interface modes. Finally, rtl8365mb_phylink_get_caps() is fixed up to return supported capabilities based on the external interface properties described above. This addresses Vladimir's point in the linked thread that the capabilities are not actually a function of the DSA port type: Although most typical applications will treat the ports with internal PHY as user ports, there is no actual hardware limitation preventing one from using them as a CPU port. Equally, ports with external interface(s) may well be treated as user ports, even though it is typical to use those ports as CPU ports. Link: https://lore.kernel.org/netdev/20220510192301.5djdt3ghoavxulhl@bang-olufsen.dk/ Signed-off-by: Alvin Šipraga Acked-by: Russell King (Oracle) Acked-by: Luiz Angelo Daros de Luca Signed-off-by: Jakub Kicinski drivers/net/dsa/realtek/rtl8365mb.c | 281 ++++++++++++++++++++++-------------- 1 file changed, 174 insertions(+), 107 deletions(-) commit b3456030f54bc173f3769ea7d2e830f014174272 Author: Alvin Šipraga Date: Thu Jun 16 00:51:14 2022 +0200 net: dsa: realtek: rtl8365mb: remove learn_limit_max private data member The variable is just assigned the value of a macro, so it can be removed. Signed-off-by: Alvin Šipraga Signed-off-by: Jakub Kicinski drivers/net/dsa/realtek/rtl8365mb.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit ca5ecd4246d49ae4172cbf0ec4ef64c042d677b5 Author: Alvin Šipraga Date: Thu Jun 16 00:51:13 2022 +0200 net: dsa: realtek: rtl8365mb: correct the max number of ports The maximum number of ports is actually 11, according to two observations: 1. The highest port ID used in the vendor driver is 10. Since port IDs are indexed from 0, and since DSA follows the same numbering system, this means up to 11 ports are to be presumed. 2. The registers with port mask fields always amount to a maximum port mask of 0x7FF, corresponding to a maximum 11 ports. In view of this, I also deleted the comment. Signed-off-by: Alvin Šipraga Reviewed-by: Luiz Angelo Daros de Luca Signed-off-by: Jakub Kicinski drivers/net/dsa/realtek/rtl8365mb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b325159d00442b9bd8ed30095a30ba31c5e8788e Author: Alvin Šipraga Date: Thu Jun 16 00:51:12 2022 +0200 net: dsa: realtek: rtl8365mb: remove port_mask private data member There is no real need for this variable: the line change interrupt mask is sufficiently masked out when getting linkup_ind and linkdown_ind in the interrupt handler. Signed-off-by: Alvin Šipraga Signed-off-by: Jakub Kicinski drivers/net/dsa/realtek/rtl8365mb.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 5eb1a2384066ea11b49065ababd2277f9de7adde Author: Alvin Šipraga Date: Thu Jun 16 00:51:11 2022 +0200 net: dsa: realtek: rtl8365mb: rename macro RTL8367RB -> RTL8367RB_VB The official name of this switch is RTL8367RB-VB, not RTL8367RB. There is also an RTL8367RB-VC which is rather different. Change the name of the CHIP_ID/_VER macros for reasons of consistency. Signed-off-by: Alvin Šipraga Reviewed-by: Luiz Angelo Daros de Luca Signed-off-by: Jakub Kicinski drivers/net/dsa/realtek/rtl8365mb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 821c7733d26cbbd6f09124e972c05275e6bcd841 Merge: 6c0d09d9374c 81765eeac1b0 Author: Jakub Kicinski Date: Thu Jun 16 20:44:07 2022 -0700 Merge branch 'net-ipa-more-multi-channel-event-ring-work' Alex Elder says: ==================== net: ipa: more multi-channel event ring work This series makes a little more progress toward supporting multiple channels with a single event ring. The first removes the assumption that consecutive events are associated with the same RX channel. The second derives the channel associated with an event from the event itself, and the next does a small cleanup enabled by that. The fourth causes updates to occur for every event processed (rather once). And the final patch does a little more rework to make TX completion have more in common with RX completion. ==================== Link: https://lore.kernel.org/r/20220615165929.5924-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 81765eeac1b050bdbf360f00b757d15f25613b63 Author: Alex Elder Date: Wed Jun 15 11:59:29 2022 -0500 net: ipa: move more code out of gsi_channel_update() Move the processing done for TX channels in gsi_channel_update() into gsi_evt_ring_rx_update(). The called function is called for both RX and TX channels, so rename it to be gsi_evt_ring_update(). As a result, this code no longer assumes events in an event ring are associated with just one channel. Because all events in a ring are handled in that function, we can move the call to gsi_trans_move_complete() there, and can ring the event ring doorbell there as well after all new events in the ring have been processed. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/gsi.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) commit 9f1c3ad65406b3ee9e03884bd1d8c6973a76b3eb Author: Alex Elder Date: Wed Jun 15 11:59:28 2022 -0500 net: ipa: call gsi_evt_ring_rx_update() unconditionally When an RX transaction completes, we update the trans->len field to contain the actual number of bytes received. This is done in a loop in gsi_evt_ring_rx_update(). Change that function so it checks the data transfer direction recorded in the transaction, and only updates trans->len for RX transfers. Then call it unconditionally. This means events for TX endpoints will run through the loop without otherwise doing anything, but this will change shortly. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/gsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2f48fb0edc0d9521e4b072f69baa5dfa1dba6f8c Author: Alex Elder Date: Wed Jun 15 11:59:27 2022 -0500 net: ipa: pass GSI pointer to gsi_evt_ring_rx_update() The only reason the event ring's channel pointer is needed in gsi_evt_ring_rx_update() is so we can get at its GSI pointer. We can pass the GSI pointer as an argument, along with the event ring ID, and thereby avoid using the event ring channel pointer. This is another step toward no longer assuming an event ring services a single channel. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/gsi.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 8eec783195859e257164b81299bed1ab723b6c25 Author: Alex Elder Date: Wed Jun 15 11:59:26 2022 -0500 net: ipa: don't pass channel when mapping transaction Change gsi_channel_trans_map() so it derives the channel used from the transaction. Pass the index of the *first* TRE used by the transaction, and have the called function account for the fact that the last one used is what's important. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/gsi_trans.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit dd5a046cbbedbe9198bc9070516313a5f6002b8c Author: Alex Elder Date: Wed Jun 15 11:59:25 2022 -0500 net: ipa: don't assume one channel per event ring In gsi_evt_ring_rx_update(), use gsi_event_trans() repeatedly to find the transaction associated with an event, rather than assuming consecutive events are associated with the same channel. This removes the only caller of gsi_trans_pool_next(), so get rid of it. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/gsi.c | 14 ++++++-------- drivers/net/ipa/gsi_private.h | 3 --- drivers/net/ipa/gsi_trans.c | 16 ---------------- 3 files changed, 6 insertions(+), 27 deletions(-) commit 6c0d09d9374c025f503d33bcef5f656e3f1dd349 Merge: 9cbc9911260f 5c2d0a6a0701 Author: Jakub Kicinski Date: Thu Jun 16 20:29:07 2022 -0700 Merge branch 'dt-bindings-dp83867-add-binding-for-io_impedance_ctrl-nvmem-cell' Rasmus Villemoes says: ==================== dt-bindings: dp83867: add binding for io_impedance_ctrl nvmem cell We have a board where measurements indicate that the current three options - leaving IO_IMPEDANCE_CTRL at the reset value (which is factory calibrated to a value corresponding to approximately 50 ohms) or using one of the two boolean properties to set it to the min/max value - are too coarse. This series adds a device tree binding for an nvmem cell which can be populated during production with a suitable value calibrated for each board, and corresponding support in the driver. The second patch adds a trivial phy wrapper for dev_err_probe(), used in the third. ==================== Link: https://lore.kernel.org/r/20220614084612.325229-1-linux@rasmusvillemoes.dk Signed-off-by: Jakub Kicinski commit 5c2d0a6a0701ba86a4bb0bf1876266c751e328bd Author: Rasmus Villemoes Date: Tue Jun 14 10:46:12 2022 +0200 net: phy: dp83867: implement support for io_impedance_ctrl nvmem cell We have a board where measurements indicate that the current three options - leaving IO_IMPEDANCE_CTRL at the (factory calibrated) reset value or using one of the two boolean properties to set it to the min/max value - are too coarse. Implement support for the newly added binding allowing device tree to specify an nvmem cell containing an appropriate value for this specific board. Signed-off-by: Rasmus Villemoes Signed-off-by: Jakub Kicinski drivers/net/phy/dp83867.c | 55 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 6 deletions(-) commit a793679827a87b01f9d973ea30b923cd5a3ff2c5 Author: Rasmus Villemoes Date: Tue Jun 14 10:46:11 2022 +0200 linux/phy.h: add phydev_err_probe() wrapper for dev_err_probe() The dev_err_probe() function is quite useful to avoid boilerplate related to -EPROBE_DEFER handling. Add a phydev_err_probe() helper to simplify making use of that from phy drivers which otherwise use the phydev_* helpers. Signed-off-by: Rasmus Villemoes Signed-off-by: Jakub Kicinski include/linux/phy.h | 3 +++ 1 file changed, 3 insertions(+) commit ab1e9de84aff0ca897dee5e4d6692ff46788697b Author: Rasmus Villemoes Date: Tue Jun 14 10:46:10 2022 +0200 dt-bindings: dp83867: add binding for io_impedance_ctrl nvmem cell We have a board where measurements indicate that the current three options - leaving IO_IMPEDANCE_CTRL at the reset value (which is factory calibrated to a value corresponding to approximately 50 ohms) or using one of the two boolean properties to set it to the min/max value - are too coarse. There is no fixed mapping from register values to values in the range 35-70 ohms; it varies from chip to chip, and even that target range is approximate. So add a DT binding for an nvmem cell which can be populated during production with a value suitable for each specific board. Reviewed-by: Rob Herring Reviewed-by: Andrew Lunn Signed-off-by: Rasmus Villemoes Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/ti,dp83867.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 9cbc9911260f24cd3ce2bfb3bcdf4792366a5745 Merge: 5dcb50c009c9 48a23ec6ff2b Author: Jakub Kicinski Date: Thu Jun 16 20:13:52 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net No conflicts. Signed-off-by: Jakub Kicinski commit 00c9d5632277b21ba8802e26c27254cd9d0dfa13 Author: wuchi Date: Sun Jun 12 13:20:15 2022 +0800 lib/error-inject: convert to DEFINE_SEQ_ATTRIBUTE Use DEFINE_SEQ_ATTRIBUTE helper macro to simplify the code. Link: https://lkml.kernel.org/r/20220612052015.23283-1-wuchi.zero@gmail.com Signed-off-by: wuchi Cc: Masami Hiramatsu (Google) Cc: Martin KaFai Lau Cc: Song Liu Cc: Yonghong Song Cc: John Fastabend Cc: KP Singh Signed-off-by: Andrew Morton lib/error-inject.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit f858e23a29740757fe1ca602cb1f57845034b1c5 Author: Antonio Borneo Date: Mon Jun 13 12:00:55 2022 +0200 checkpatch: fix incorrect camelcase detection on numeric constant The code fragment below int foo(int *array, int index) { return array[index & 0xFF]; } triggers an incorrect camelcase detection by checking a substring of the hex constant: CHECK: Avoid CamelCase: #3: FILE: test.c:3: + return array[index & 0xFF]; This is caused by passing the whole string "array[index & 0xFF]" to the inner loop that iterates over a "$Ident" match. The numeric constant is not a $Ident as it doesn't start with [A-Za-z_] and should be excluded from the match. Similar issue can be detected with other constants like "1uL", "0xffffU". Force the match to start at word boundary so the $Ident will be properly checked starting from its first char and the constants will be filtered-out. Link: https://lkml.kernel.org/r/20220613100055.77821-1-borneo.antonio@gmail.com Signed-off-by: Antonio Borneo Cc: Joe Perches Cc: Andy Whitcroft Cc: Dwaipayan Ray Cc: Lukas Bulwahn Signed-off-by: Andrew Morton scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd7c9be330d87732766a95cfd7a6de38bf7a39c3 Author: Javier Martinez Canillas Date: Fri Jun 10 09:57:21 2022 +0200 selftests/filesystems: add a vfat RENAME_EXCHANGE test Add a test for the renameat2 RENAME_EXCHANGE support in vfat, but split it in a tool that just does the rename exchange and a script that is run by the kselftests framework on `make TARGETS="filesystems/fat" kselftest`. That way the script can be easily extended to test other file operations. The script creates a 1 MiB disk image, that is then formated with a vfat filesystem and mounted using a loop device. That way all file operations are done on an ephemeral filesystem. Link: https://lkml.kernel.org/r/20220610075721.1182745-5-javierm@redhat.com Signed-off-by: Javier Martinez Canillas Acked-by: Muhammad Usama Anjum Acked-by: OGAWA Hirofumi Cc: Alexander Larsson Cc: Christian Kellner Cc: Chung-Chiang Cheng Cc: Colin Walters Cc: Lennart Poettering Cc: Peter Jones Signed-off-by: Andrew Morton MAINTAINERS | 1 + tools/testing/selftests/Makefile | 1 + tools/testing/selftests/filesystems/fat/.gitignore | 2 + tools/testing/selftests/filesystems/fat/Makefile | 7 ++ tools/testing/selftests/filesystems/fat/config | 2 + .../selftests/filesystems/fat/rename_exchange.c | 37 ++++++++++ .../selftests/filesystems/fat/run_fat_tests.sh | 82 ++++++++++++++++++++++ 7 files changed, 132 insertions(+) commit da87e1725ae2136baeb9aac04c572c283afc917f Author: Javier Martinez Canillas Date: Fri Jun 10 09:57:20 2022 +0200 fat: add renameat2 RENAME_EXCHANGE flag support The renameat2 RENAME_EXCHANGE flag allows to atomically exchange two paths but is currently not supported by the Linux vfat filesystem driver. Add a vfat_rename_exchange() helper function that implements this support. The super block lock is acquired during the operation to ensure atomicity, and in the error path actions made are reversed also with the mutex held. It makes the operation as transactional as possible, within the limitation impossed by vfat due not having a journal with logs to replay. Link: https://lkml.kernel.org/r/20220610075721.1182745-4-javierm@redhat.com Signed-off-by: Javier Martinez Canillas Acked-by: OGAWA Hirofumi Cc: Alexander Larsson Cc: Christian Kellner Cc: Chung-Chiang Cheng Cc: Colin Walters Cc: Lennart Poettering Cc: Muhammad Usama Anjum Cc: Peter Jones Signed-off-by: Andrew Morton fs/fat/namei_vfat.c | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 122 insertions(+), 1 deletion(-) commit 204d03203a145b443cd8676dc12dbb47e1a3751f Author: OGAWA Hirofumi Date: Fri Jun 10 09:57:19 2022 +0200 fat: factor out reusable code in vfat_rename() as helper functions The vfat_rename() function is quite big and there are code blocks that can be moved into helper functions. This not only simplify the implementation of that function but also allows these helpers to be reused. For example, the helpers can be used by the handler of the RENAME_EXCHANGE flag once this is implemented in a subsequent patch. Link: https://lkml.kernel.org/r/20220610075721.1182745-3-javierm@redhat.com Signed-off-by: OGAWA Hirofumi Signed-off-by: Javier Martinez Canillas Acked-by: OGAWA Hirofumi Cc: Alexander Larsson Cc: Christian Kellner Cc: Chung-Chiang Cheng Cc: Colin Walters Cc: Lennart Poettering Cc: Muhammad Usama Anjum Cc: Peter Jones Signed-off-by: Andrew Morton fs/fat/namei_vfat.c | 89 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 57 insertions(+), 32 deletions(-) commit 019a0c9e377c9f7bd477a0742706d93cdddaee4d Author: Javier Martinez Canillas Date: Fri Jun 10 09:57:18 2022 +0200 fat: add a vfat_rename2() and make existing .rename callback a helper Patch series "fat: add support for the renameat2 RENAME_EXCHANGE flag", v6. The series adds support for the renameat2 system call RENAME_EXCHANGE flag (which allows to atomically replace two paths) to the vfat filesystem code. There are many use cases for this, but we are particularly interested in making possible for vfat filesystems to be part of OSTree [0] deployments. Currently OSTree relies on symbolic links to make the deployment updates an atomic transactional operation. But RENAME_EXCHANGE could be used [1] to achieve a similar level of robustness when using a vfat filesystem. Patch #1 is just a preparatory patch to introduce the RENAME_EXCHANGE support, patch #2 moves some code blocks in vfat_rename() to a set of helper functions, that can be reused by tvfat_rename_exchange() that's added by patch #3 and finally patch #4 adds some kselftests to test it. This patch (of 4): Currently vfat only supports the RENAME_NOREPLACE flag which is handled by the virtual file system layer but doesn't support the RENAME_EXCHANGE flag. Add a vfat_rename2() function to be used as the .rename callback and move the current vfat_rename() handler to a helper. This is in preparation for implementing the RENAME_NOREPLACE flag using a different helper function. Link: https://lkml.kernel.org/r/20220610075721.1182745-1-javierm@redhat.com Link: https://lkml.kernel.org/r/20220610075721.1182745-2-javierm@redhat.com Signed-off-by: Javier Martinez Canillas Acked-by: OGAWA Hirofumi Cc: Christian Kellner Cc: Peter Jones Cc: Chung-Chiang Cheng Cc: Lennart Poettering Cc: Alexander Larsson Cc: Colin Walters Cc: Muhammad Usama Anjum Signed-off-by: Andrew Morton fs/fat/namei_vfat.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 1bb1a07afad97303f14b8d1b319b03f1f01a0091 Author: Phillip Lougher Date: Sat Jun 11 04:21:33 2022 +0100 squashfs: don't use intermediate buffer if pages missing Now that the "page actor" can handle missing pages, we don't have to fall back to using an intermediate buffer in Squashfs_readpage_block() if all the pages necessary can't be obtained. Link: https://lkml.kernel.org/r/20220611032133.5743-3-phillip@squashfs.org.uk Signed-off-by: Phillip Lougher Cc: Hsin-Yi Wang Cc: Matthew Wilcox (Oracle) Cc: Xiongwei Song Signed-off-by: Andrew Morton fs/squashfs/file_direct.c | 75 ++++++++--------------------------------------- 1 file changed, 12 insertions(+), 63 deletions(-) commit f268eedddf3595e85f8883dc50aed29654785696 Author: Phillip Lougher Date: Sat Jun 11 04:21:32 2022 +0100 squashfs: extend "page actor" to handle missing pages Patch series "Squashfs: handle missing pages decompressing into page cache". This patchset enables Squashfs to handle missing pages when directly decompressing datablocks into the page cache. Previously if the full set of pages needed was not available, Squashfs would have to fall back to using an intermediate buffer (the older method), which is slower, involving a memcopy, and it introduces contention on a shared buffer. The first patch extends the "page actor" code to handle missing pages. The second patch updates Squashfs_readpage_block() to use the new functionality, and removes the code that falls back to using an intermediate buffer. This patchset is independent of the readahead work, and it is standalone. It can be merged on its own. But the readahead patch for efficiency also needs this patch-set. This patch (of 2): This patch extends the "page actor" code to handle missing pages. Previously if the full set of pages needed to decompress a Squashfs datablock was unavailable, this would cause decompression to fail on the missing pages. In this case direct decompression into the page cache could not be achieved and the code would fall back to using the older intermediate buffer method. With this patch, direct decompression into the page cache can be achieved with missing pages. For "multi-shot" decompressors (zlib, xz, zstd), the page actor will allocate a temporary buffer which is passed to the decompressor, and then freed by the page actor. For "single shot" decompressors (lz4, lzo) which decompress into a contiguous "bounce buffer", and which is then copied into the page cache, it would be pointless to allocate a temporary buffer, memcpy into it, and then free it. For these decompressors -ENOMEM is returned, which signifies that the memcpy for that page should be skipped. This also happens if the data block is uncompressed. Link: https://lkml.kernel.org/r/20220611032133.5743-1-phillip@squashfs.org.uk Link: https://lkml.kernel.org/r/20220611032133.5743-2-phillip@squashfs.org.uk Signed-off-by: Phillip Lougher Cc: Matthew Wilcox (Oracle) Cc: Hsin-Yi Wang Cc: Xiongwei Song Signed-off-by: Andrew Morton fs/squashfs/block.c | 10 ++++++--- fs/squashfs/decompressor.h | 1 + fs/squashfs/file_direct.c | 21 +++++++++--------- fs/squashfs/lz4_wrapper.c | 7 ++++-- fs/squashfs/lzo_wrapper.c | 7 ++++-- fs/squashfs/page_actor.c | 55 +++++++++++++++++++++++++++++++++++++++------- fs/squashfs/page_actor.h | 21 +++++++++++++++--- fs/squashfs/xz_wrapper.c | 11 +++++++++- fs/squashfs/zlib_wrapper.c | 12 +++++++++- fs/squashfs/zstd_wrapper.c | 12 +++++++++- 10 files changed, 126 insertions(+), 31 deletions(-) commit 0aed4724a8392f2567f83c9c4b9decf447d752a2 Author: cxbing Date: Thu Jun 9 07:44:59 2022 -0700 delayacct: remove some unused variables Drop the unused variables *done* and *count*. Link: https://lkml.kernel.org/r/20220609144459.86379-1-zhangkkoo@126.com Signed-off-by: cxbing Signed-off-by: Andrew Morton tools/accounting/getdelays.c | 4 ---- 1 file changed, 4 deletions(-) commit f4da7afe07523ff8930c4466b09a15db18508cd4 Author: Pasha Tatashin Date: Fri May 27 02:55:35 2022 +0000 kexec_file: increase maximum file size to 4G In some case initrd can be large. For example, it could be a netboot image loaded by u-root, that is kexec'ing into it. The maximum size of initrd is arbitrary set to 2G. Also, the limit is not very obvious because it is hidden behind a generic INT_MAX macro. Theoretically, we could make it LONG_MAX, but it is safer to keep it sane, and just increase it to 4G. Increase the size to 4G, and make it obvious by having a new macro that specifies the maximum file size supported by kexec_file_load() syscall: KEXEC_FILE_SIZE_MAX. Link: https://lkml.kernel.org/r/20220527025535.3953665-3-pasha.tatashin@soleen.com Signed-off-by: Pasha Tatashin Cc: Sasha Levin Cc: "Eric W. Biederman" Cc: Greg Thelen Cc: Al Viro Cc: Baoquan He Signed-off-by: Andrew Morton kernel/kexec_file.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit dabba87229411a5e9d20ac03ffc36463c53ae672 Author: Pasha Tatashin Date: Fri May 27 02:55:34 2022 +0000 fs/kernel_read_file: allow to read files up-to ssize_t Patch series "Allow to kexec with initramfs larger than 2G", v2. Currently, the largest initramfs that is supported by kexec_file_load() syscall is 2G. This is because kernel_read_file() returns int, and is limited to INT_MAX or 2G. On the other hand, there are kexec based boot loaders (i.e. u-root), that may need to boot netboot images that might be larger than 2G. The first patch changes the return type from int to ssize_t in kernel_read_file* functions. The second patch increases the maximum initramfs file size to 4G. Tested: verified that can kexec_file_load() works with 4G initramfs on x86_64. This patch (of 2): Currently, the maximum file size that is supported is 2G. This may be too small in some cases. For example, kexec_file_load() system call loads initramfs. In some netboot cases initramfs can be rather large. Allow to use up-to ssize_t bytes. The callers still can limit the maximum file size via buf_size. Link: https://lkml.kernel.org/r/20220527025535.3953665-1-pasha.tatashin@soleen.com Link: https://lkml.kernel.org/r/20220527025535.3953665-2-pasha.tatashin@soleen.com Signed-off-by: Pasha Tatashin Cc: Al Viro Cc: Baoquan He Cc: "Eric W. Biederman" Cc: Greg Thelen Cc: Sasha Levin Signed-off-by: Andrew Morton fs/kernel_read_file.c | 38 +++++++++++++++++++------------------- include/linux/kernel_read_file.h | 32 ++++++++++++++++---------------- include/linux/limits.h | 1 + 3 files changed, 36 insertions(+), 35 deletions(-) commit d30dfd490f7dc4cb6a7c11a647bd1ff7a22139e7 Author: Justin Stitt Date: Wed Jun 8 15:35:39 2022 -0700 include/uapi/linux/swab.h: move explicit cast outside ternary A cast inside __builtin_constant_p doesn't do anything since it should evaluate as constant at compile time irrespective of this cast. Instead, I moved this cast outside the ternary to ensure the return type is as expected. Additionally, if __HAVE_BUILTIN_BSWAP16__ was not defined then __swab16 is actually returning an `int` not a `u16` due to integer promotion. As Al Viro notes: You *can't* get smaller-than-int out of ? :, same as you can't get it out of addition, etc. This also fixes some clang -Wformat warnings involving default argument promotion. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Link: https://lkml.kernel.org/r/20220608223539.470472-1-justinstitt@google.com Signed-off-by: Justin Stitt Suggested-by: Al Viro Suggested-by: Nathan Chancellor Reviewed-by: Nathan Chancellor Suggested-by: Nick Desaulniers Signed-off-by: Andrew Morton include/uapi/linux/swab.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c0af32fdc625c0e7f03465a813b04cbfb5419a1e Author: wuchi Date: Tue Jun 7 21:35:56 2022 +0800 lib/btree: simplify btree_{lookup|update} btree_{lookup|update} both need to look up node by key, using the common parts(add function btree_lookup_node) to simplify code. Link: https://lkml.kernel.org/r/20220607133556.34732-1-wuchi.zero@gmail.com Signed-off-by: wuchi Cc: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Signed-off-by: Andrew Morton lib/btree.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) commit 9776e3861e0e30330f6c8ca9c30348f336d24b1c Author: Luc Van Oostenryck Date: Sun Jun 5 18:07:38 2022 +0200 ia64: fix sparse warnings with cmpxchg() & xchg() On IA64, new sparse's warnings where issued after fixing some __rcu annotations in kernel/bpf/. These new warnings are false positives and appear on IA64 because on this architecture, the macros for cmpxchg() and xchg() make casts that ignore sparse annotations. This patch contains the minimal patch to fix this issue: adding a missing cast and some missing '__force'. Link: https://lore.kernel.org/r/20220601120013.bq5a3ynbkc3hngm5@mail Link: https://lkml.kernel.org/r/20220605160738.79736-1-luc.vanoostenryck@gmail.com Signed-off-by: Luc Van Oostenryck Reported-by: kernel test robot Acked-by: Paul E. McKenney Acked-by: Toke Høiland-Jørgensen Cc: Arnd Bergmann Signed-off-by: Andrew Morton arch/ia64/include/uapi/asm/cmpxchg.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 4815a36009044ba69a9b8d781943ec6505c451a2 Author: Andy Shevchenko Date: Fri Jun 3 20:10:12 2022 +0300 include/linux/rbtree.h: replace kernel.h with the necessary inclusions When kernel.h is used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved. Replace kernel.h inclusion with the list of what is really being used. Link: https://lkml.kernel.org/r/20220603171012.48880-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Matthew Wilcox Signed-off-by: Andrew Morton include/linux/rbtree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a91befde350375b1ff954635acdde14dc92cd9a8 Author: wuchi Date: Sat Jun 4 21:15:02 2022 +0800 lib/flex_proportions.c: remove local_irq_ops in fprop_new_period() commit e78d4833c03e28> "lib: Fix possible deadlock in flexible proportion code" adds the local_irq_ops because percpu_counter_{sum |add} ops'lock can cause deadlock by interrupts. Now percpu_counter _{sum|add} ops use raw_spin_(un)lock_irq*, so revert the commit and resolve the conflict. Link: https://lkml.kernel.org/r/20220604131502.5190-1-wuchi.zero@gmail.com Signed-off-by: wuchi Reviewed-by: Jan Kara Cc: Christoph Hellwig Signed-off-by: Andrew Morton lib/flex_proportions.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 0cc011c576aaa4de505046f7a6c90933d7c749a9 Author: Guenter Roeck Date: Tue May 31 15:29:51 2022 -0700 lib/list_debug.c: Detect uninitialized lists In some circumstances, attempts are made to add entries to or to remove entries from an uninitialized list. A prime example is amdgpu_bo_vm_destroy(): It is indirectly called from ttm_bo_init_reserved() if that function fails, and tries to remove an entry from a list. However, that list is only initialized in amdgpu_bo_create_vm() after the call to ttm_bo_init_reserved() returned success. This results in crashes such as BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 1 PID: 1479 Comm: chrome Not tainted 5.10.110-15768-g29a72e65dae5 Hardware name: Google Grunt/Grunt, BIOS Google_Grunt.11031.149.0 07/15/2020 RIP: 0010:__list_del_entry_valid+0x26/0x7d ... Call Trace: amdgpu_bo_vm_destroy+0x48/0x8b ttm_bo_init_reserved+0x1d7/0x1e0 amdgpu_bo_create+0x212/0x476 ? amdgpu_bo_user_destroy+0x23/0x23 ? kmem_cache_alloc+0x60/0x271 amdgpu_bo_create_vm+0x40/0x7d amdgpu_vm_pt_create+0xe8/0x24b ... Check if the list's prev and next pointers are NULL to catch such problems. Link: https://lkml.kernel.org/r/20220531222951.92073-1-linux@roeck-us.net Signed-off-by: Guenter Roeck Cc: Steven Rostedt Signed-off-by: Andrew Morton lib/list_debug.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 53fd5ffbb5197b8cc2d73d2bbc0f688afd45736c Author: Junxiao Bi Date: Tue Jun 7 10:12:26 2022 -0700 ocfs2: kill EBUSY from dlmfs_evict_inode When unlinking a dlmfs, first it will invoke dlmfs_unlink(), and then invoke dlmfs_evict_inode(), user_dlm_destroy_lock() is invoked in both places, the second one from dlmfs_evict_inode() will get EBUSY error because USER_LOCK_IN_TEARDOWN is already set in lockres. This doesn't affect any function, just the error log is annoying. Link: https://lkml.kernel.org/r/20220607171226.86672-1-junxiao.bi@oracle.com Signed-off-by: Junxiao Bi 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 fs/ocfs2/dlmfs/dlmfs.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 0fe6ee8f123a4dfb529a5aff07536bb481f34043 Author: Chen Zhongjin Date: Tue May 31 09:28:54 2022 +0800 profiling: fix shift too large makes kernel panic 2d186afd04d6 ("profiling: fix shift-out-of-bounds bugs") limits shift value by [0, BITS_PER_LONG -1], which means [0, 63]. However, syzbot found that the max shift value should be the bit number of (_etext - _stext). If shift is outside of this, the "buffer_bytes" will be zero and will cause kzalloc(0). Then the kernel panics due to dereferencing the returned pointer 16. This can be easily reproduced by passing a large number like 60 to enable profiling and then run readprofile. LOGS: BUG: kernel NULL pointer dereference, address: 0000000000000010 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 6148067 P4D 6148067 PUD 6142067 PMD 0 PREEMPT SMP CPU: 4 PID: 184 Comm: readprofile Not tainted 5.18.0+ #162 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.15.0-0-g2dd4b9b3f840-prebuilt.qemu.org 04/01/2014 RIP: 0010:read_profile+0x104/0x220 RSP: 0018:ffffc900006fbe80 EFLAGS: 00000202 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff888006150000 RSI: 0000000000000001 RDI: ffffffff82aba4a0 RBP: 000000000188bb60 R08: 0000000000000010 R09: ffff888006151000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff82aba4a0 R13: 0000000000000000 R14: ffffc900006fbf08 R15: 0000000000020c30 FS: 000000000188a8c0(0000) GS:ffff88803ed00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000010 CR3: 0000000006144000 CR4: 00000000000006e0 Call Trace: proc_reg_read+0x56/0x70 vfs_read+0x9a/0x1b0 ksys_read+0xa1/0xe0 ? fpregs_assert_state_consistent+0x1e/0x40 do_syscall_64+0x3a/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x4d4b4e RSP: 002b:00007ffebb668d58 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 000000000188a8a0 RCX: 00000000004d4b4e RDX: 0000000000000400 RSI: 000000000188bb60 RDI: 0000000000000003 RBP: 0000000000000003 R08: 000000000000006e R09: 0000000000000000 R10: 0000000000000041 R11: 0000000000000246 R12: 000000000188bb60 R13: 0000000000000400 R14: 0000000000000000 R15: 000000000188bb60 Modules linked in: CR2: 0000000000000010 Killed ---[ end trace 0000000000000000 ]--- Check prof_len in profile_init() to prevent it be zero. Link: https://lkml.kernel.org/r/20220531012854.229439-1-chenzhongjin@huawei.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Chen Zhongjin Signed-off-by: Andrew Morton kernel/profile.c | 7 +++++++ 1 file changed, 7 insertions(+) commit dcea7964764aad41c2994084a4c0292371b14e36 Author: Joe Perches Date: Wed May 25 12:03:17 2022 -0700 checkpatch: add XA_STATE and XA_STATE_ORDER to the macro declaration list XA_STATE() and XA_STATE_ORDER macro uses are declarations. Add them to the declaration macro list to avoid suggesting a blank line after declarations when used. Link: https://lkml.kernel.org/r/144314f4bf2c58cf2336028a75a5127e848abd81.camel@perches.com Signed-off-by: Joe Perches Reported-by: David Howells Cc: Matthew Wilcox Signed-off-by: Andrew Morton scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6edda04ccc7cfb281d139e352dbd5dd933bd2751 Author: Waiman Long Date: Tue Jun 14 18:03:59 2022 -0400 mm/kmemleak: prevent soft lockup in first object iteration loop of kmemleak_scan() The first RCU-based object iteration loop has to modify the object count. So we cannot skip taking the object lock. One way to avoid soft lockup is to insert occasional cond_resched() call into the loop. This cannot be done while holding the RCU read lock which is to protect objects from being freed. However, taking a reference to the object will prevent it from being freed. We can then do a cond_resched() call after every 64k objects safely. Link: https://lkml.kernel.org/r/20220614220359.59282-4-longman@redhat.com Signed-off-by: Waiman Long Reviewed-by: Catalin Marinas Cc: Muchun Song Signed-off-by: Andrew Morton mm/kmemleak.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit 64977918c2381aaadd544535708294213cc964f6 Author: Waiman Long Date: Tue Jun 14 18:03:58 2022 -0400 mm/kmemleak: skip unlikely objects in kmemleak_scan() without taking lock There are 3 RCU-based object iteration loops in kmemleak_scan(). Because of the need to take RCU read lock, we can't insert cond_resched() into the loop like other parts of the function. As there can be millions of objects to be scanned, it takes a while to iterate all of them. The kmemleak functionality is usually enabled in a debug kernel which is much slower than a non-debug kernel. With sufficient number of kmemleak objects, the time to iterate them all may exceed 22s causing soft lockup. watchdog: BUG: soft lockup - CPU#3 stuck for 22s! [kmemleak:625] In this particular bug report, the soft lockup happen in the 2nd iteration loop. In the 2nd and 3rd loops, most of the objects are checked and then skipped under the object lock. Only a selected fews are modified. Those objects certainly need lock protection. However, the lock/unlock operation is slow especially with interrupt disabling and enabling included. We can actually do some basic check like color_white() without taking the lock and skip the object accordingly. Of course, this kind of check is racy and may miss objects that are being modified concurrently. The cost of missed objects, however, is just that they will be discovered in the next scan instead. The advantage of doing so is that iteration can be done much faster especially with LOCKDEP enabled in a debug kernel. With a debug kernel running on a 2-socket 96-thread x86-64 system (HZ=1000), the 2nd and 3rd iteration loops speedup with this patch on the first kmemleak_scan() call after bootup is shown in the table below. Before patch After patch Loop # # of objects Elapsed time # of objects Elapsed time ------ ------------ ------------ ------------ ------------ 2 2,599,850 2.392s 2,596,364 0.266s 3 2,600,176 2.171s 2,597,061 0.260s This patch reduces loop iteration times by about 88%. This will greatly reduce the chance of a soft lockup happening in the 2nd or 3rd iteration loops. Even though the first loop runs a little bit faster, it can still be problematic if many kmemleak objects are there. As the object count has to be modified in every object, we cannot avoid taking the object lock. So other way to prevent soft lockup will be needed. Link: https://lkml.kernel.org/r/20220614220359.59282-3-longman@redhat.com Signed-off-by: Waiman Long Reviewed-by: Catalin Marinas Cc: Muchun Song Signed-off-by: Andrew Morton mm/kmemleak.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 00c155066eca8bcfc9b255db017119b84eea6909 Author: Waiman Long Date: Tue Jun 14 18:03:57 2022 -0400 mm/kmemleak: use _irq lock/unlock variants in kmemleak_scan/_clear() Patch series "mm/kmemleak: Avoid soft lockup in kmemleak_scan()", v2. There are 3 RCU-based object iteration loops in kmemleak_scan(). Because of the need to take RCU read lock, we can't insert cond_resched() into the loop like other parts of the function. As there can be millions of objects to be scanned, it takes a while to iterate all of them. The kmemleak functionality is usually enabled in a debug kernel which is much slower than a non-debug kernel. With sufficient number of kmemleak objects, the time to iterate them all may exceed 22s causing soft lockup. watchdog: BUG: soft lockup - CPU#3 stuck for 22s! [kmemleak:625] This patch series make changes to the 3 object iteration loops in kmemleak_scan() to prevent them from causing soft lockup. This patch (of 3): kmemleak_scan() is called only from the kmemleak scan thread or from write to the kmemleak debugfs file. Both are in task context and so we can directly use the simpler _irq() lock/unlock calls instead of the more complex _irqsave/_irqrestore variants. Similarly, kmemleak_clear() is called only from write to the kmemleak debugfs file. The same change can be applied. Link: https://lkml.kernel.org/r/20220614220359.59282-1-longman@redhat.com Link: https://lkml.kernel.org/r/20220614220359.59282-2-longman@redhat.com Signed-off-by: Waiman Long Reviewed-by: Muchun Song Reviewed-by: Catalin Marinas Signed-off-by: Andrew Morton mm/kmemleak.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 55896f935a60b919ce699d11754061f6df936a7d Author: Gautam Menghani Date: Sun Jun 12 11:23:20 2022 -0700 mm/sparse-vmemmap.c: remove unwanted initialization in vmemmap_populate_compound_pages() Remove unnecessary initialization for the variable 'next'. This fixes the clang scan warning: Value stored to 'next' during its initialization is never read [deadcode.DeadStores] Link: https://lkml.kernel.org/r/20220612182320.160651-1-gautammenghani201@gmail.com Signed-off-by: Gautam Menghani Reviewed-by: David Hildenbrand Reviewed-by: Muchun Song Reviewed-by: Joao Martins Reviewed-by: Oscar Salvador Signed-off-by: Andrew Morton mm/sparse-vmemmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b623d434f00868c3ec76ec6e6bbd85e9e6c06457 Author: Joel Savitz Date: Thu Jun 9 16:32:17 2022 -0400 selftests: make use of GUP_TEST_FILE macro Commit 17de1e559cf1 ("selftests: clarify common error when running gup_test") had most of its hunks dropped due to a conflict with another patch accepted into Linux around the same time that implemented the same behavior as a subset of other changes. However, the remaining hunk defines the GUP_TEST_FILE macro without making use of it. This patch makes use of the macro in the two relevant places. Furthermore, the above mentioned commit's log message erroneously describes the changes that were dropped from the patch. This patch corrects the record. Link: https://lkml.kernel.org/r/20220609203217.3206247-1-jsavitz@redhat.com Fixes: 17de1e559cf1 ("selftests: clarify common error when running gup_test") Signed-off-by: Joel Savitz Reviewed-by: Shuah Khan Acked-by: Nico Pache Signed-off-by: Andrew Morton tools/testing/selftests/vm/gup_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c5de43634c572b0cec0b32eecf24a17c649711c1 Author: Xiang wangx Date: Fri Jun 10 15:12:44 2022 +0800 userfaultfd/selftests: fix typo in comment Delete the redundant word 'in'. Link: https://lkml.kernel.org/r/20220610071244.59679-1-wangxiang@cdjrlc.com Signed-off-by: Xiang wangx Signed-off-by: Andrew Morton tools/testing/selftests/vm/userfaultfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d0403d20f6c281cb3d14c5f1db5317caeec48e9 Author: Vasily Averin Date: Fri Jun 3 07:19:43 2022 +0300 net: set proper memcg for net_init hooks allocations __register_pernet_operations() executes init hook of registered pernet_operation structure in all existing net namespaces. Typically, these hooks are called by a process associated with the specified net namespace, and all __GFP_ACCOUNT marked allocation are accounted for corresponding container/memcg. However __register_pernet_operations() calls the hooks in the same context, and as a result all marked allocations are accounted to one memcg for all processed net namespaces. This patch adjusts active memcg for each net namespace and helps to account memory allocated inside ops_init() into the proper memcg. Link: https://lkml.kernel.org/r/f9394752-e272-9bf9-645f-a18c56d1c4ec@openvz.org Signed-off-by: Vasily Averin Acked-by: Roman Gushchin Acked-by: Shakeel Butt Cc: Michal Koutný Cc: Vlastimil Babka Cc: Michal Hocko Cc: Florian Westphal Cc: David S. Miller Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Eric Dumazet Cc: Johannes Weiner Cc: Kefeng Wang Cc: Linux Kernel Functional Testing Cc: Muchun Song Cc: Naresh Kamboju Cc: Qian Cai Signed-off-by: Andrew Morton include/linux/memcontrol.h | 47 +++++++++++++++++++++++++++++++++++++++++++++- net/core/net_namespace.c | 7 +++++++ 2 files changed, 53 insertions(+), 1 deletion(-) commit fc4db90fe71e640e3fe88df346f7cf653b75315d Author: Roman Gushchin Date: Fri Jun 10 11:03:10 2022 -0700 mm: kmem: make mem_cgroup_from_obj() vmalloc()-safe Currently mem_cgroup_from_obj() is not working properly with objects allocated using vmalloc(). It creates problems in some cases, when it's called for static objects belonging to modules or generally allocated using vmalloc(). This patch makes mem_cgroup_from_obj() safe to be called on objects allocated using vmalloc(). It also introduces mem_cgroup_from_slab_obj(), which is a faster version to use in places when we know the object is either a slab object or a generic slab page (e.g. when adding an object to a lru list). Link: https://lkml.kernel.org/r/20220610180310.1725111-1-roman.gushchin@linux.dev Suggested-by: Kefeng Wang Signed-off-by: Roman Gushchin Tested-by: Linux Kernel Functional Testing Acked-by: Shakeel Butt Tested-by: Vasily Averin Acked-by: Michal Hocko Acked-by: Muchun Song Cc: Johannes Weiner Cc: Naresh Kamboju Cc: Qian Cai Cc: Kefeng Wang Cc: David S. Miller Cc: Eric Dumazet Cc: Florian Westphal Cc: Jakub Kicinski Cc: Michal Koutný Cc: Paolo Abeni Cc: Vlastimil Babka Signed-off-by: Andrew Morton include/linux/memcontrol.h | 6 ++++ mm/list_lru.c | 2 +- mm/memcontrol.c | 71 ++++++++++++++++++++++++++++++++-------------- 3 files changed, 57 insertions(+), 22 deletions(-) commit 1e57ffb6e3fd9583268c6462c4e3853575b21701 Author: Miaohe Lin Date: Thu Jun 9 20:13:05 2022 +0800 mm/memremap: fix memunmap_pages() race with get_dev_pagemap() Think about the below scene: CPU1 CPU2 memunmap_pages percpu_ref_exit __percpu_ref_exit free_percpu(percpu_count); /* percpu_count is freed here! */ get_dev_pagemap xa_load(&pgmap_array, PHYS_PFN(phys)) /* pgmap still in the pgmap_array */ percpu_ref_tryget_live(&pgmap->ref) if __ref_is_percpu /* __PERCPU_REF_ATOMIC_DEAD not set yet */ this_cpu_inc(*percpu_count) /* access freed percpu_count here! */ ref->percpu_count_ptr = __PERCPU_REF_ATOMIC_DEAD; /* too late... */ pageunmap_range To fix the issue, do percpu_ref_exit() after pgmap_array is emptied. So we won't do percpu_ref_tryget_live() against a being freed percpu_ref. Link: https://lkml.kernel.org/r/20220609121305.2508-1-linmiaohe@huawei.com Fixes: b7b3c01b1915 ("mm/memremap_pages: support multiple ranges per invocation") Signed-off-by: Miaohe Lin Cc: Dan Williams Signed-off-by: Andrew Morton mm/memremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84c326299191042a719655d3327538fc52aa8473 Author: Patrick Wang Date: Sat Jun 11 11:55:51 2022 +0800 mm: kmemleak: check physical address when scan Check the physical address of objects for its boundary when scan instead of in kmemleak_*_phys(). Link: https://lkml.kernel.org/r/20220611035551.1823303-5-patrick.wang.shcn@gmail.com Fixes: 23c2d497de21 ("mm: kmemleak: take a full lowmem check in kmemleak_*_phys()") Signed-off-by: Patrick Wang Suggested-by: Catalin Marinas Reviewed-by: Catalin Marinas Cc: Yee Lee Signed-off-by: Andrew Morton mm/kmemleak.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 0c24e061196c21d53328d60f4ad0e5a2b3183343 Author: Patrick Wang Date: Sat Jun 11 11:55:50 2022 +0800 mm: kmemleak: add rbtree and store physical address for objects allocated with PA Add object_phys_tree_root to store the objects allocated with physical address. Distinguish it from object_tree_root by OBJECT_PHYS flag or function argument. The physical address is stored directly in those objects. Link: https://lkml.kernel.org/r/20220611035551.1823303-4-patrick.wang.shcn@gmail.com Signed-off-by: Patrick Wang Suggested-by: Catalin Marinas Reviewed-by: Catalin Marinas Cc: Yee Lee Signed-off-by: Andrew Morton mm/kmemleak.c | 133 +++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 91 insertions(+), 42 deletions(-) commit 8e0c4ab36c61c514a9c1caaf5707d1f55ab5f6df Author: Patrick Wang Date: Sat Jun 11 11:55:49 2022 +0800 mm: kmemleak: add OBJECT_PHYS flag for objects allocated with physical address Add OBJECT_PHYS flag for object. This flag is used to identify the objects allocated with physical address. The create_object_phys() function is added as well to set that flag and is used by kmemleak_alloc_phys(). Link: https://lkml.kernel.org/r/20220611035551.1823303-3-patrick.wang.shcn@gmail.com Signed-off-by: Patrick Wang Suggested-by: Catalin Marinas Reviewed-by: Catalin Marinas Cc: Yee Lee Signed-off-by: Andrew Morton mm/kmemleak.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) commit c200d90049dbe08fa8b016f74b713fddefca0479 Author: Patrick Wang Date: Sat Jun 11 11:55:48 2022 +0800 mm: kmemleak: remove kmemleak_not_leak_phys() and the min_count argument to kmemleak_alloc_phys() Patch series "mm: kmemleak: store objects allocated with physical address separately and check when scan", v4. The kmemleak_*_phys() interface uses "min_low_pfn" and "max_low_pfn" to check address. But on some architectures, kmemleak_*_phys() is called before those two variables initialized. The following steps will be taken: 1) Add OBJECT_PHYS flag and rbtree for the objects allocated with physical address 2) Store physical address in objects if allocated with OBJECT_PHYS 3) Check the boundary when scan instead of in kmemleak_*_phys() This patch set will solve: https://lore.kernel.org/r/20220527032504.30341-1-yee.lee@mediatek.com https://lore.kernel.org/r/9dd08bb5-f39e-53d8-f88d-bec598a08c93@gmail.com v3: https://lore.kernel.org/r/20220609124950.1694394-1-patrick.wang.shcn@gmail.com v2: https://lore.kernel.org/r/20220603035415.1243913-1-patrick.wang.shcn@gmail.com v1: https://lore.kernel.org/r/20220531150823.1004101-1-patrick.wang.shcn@gmail.com This patch (of 4): Remove the unused kmemleak_not_leak_phys() function. And remove the min_count argument to kmemleak_alloc_phys() function, assume it's 0. Link: https://lkml.kernel.org/r/20220611035551.1823303-1-patrick.wang.shcn@gmail.com Link: https://lkml.kernel.org/r/20220611035551.1823303-2-patrick.wang.shcn@gmail.com Signed-off-by: Patrick Wang Suggested-by: Catalin Marinas Reviewed-by: Catalin Marinas Cc: Yee Lee Signed-off-by: Andrew Morton Documentation/dev-tools/kmemleak.rst | 1 - drivers/of/fdt.c | 2 +- include/linux/kmemleak.h | 8 ++------ mm/kmemleak.c | 20 +++----------------- mm/memblock.c | 14 +++++++------- tools/testing/memblock/linux/kmemleak.h | 2 +- 6 files changed, 14 insertions(+), 33 deletions(-) commit ed913b055a74b723976f8e885a3395162a0371e6 Author: Miaohe Lin Date: Thu Jun 9 21:08:35 2022 +0800 lib/test_hmm: avoid accessing uninitialized pages If make_device_exclusive_range() fails or returns pages marked for exclusive access less than required, remaining fields of pages will left uninitialized. So dmirror_atomic_map() will access those yet uninitialized fields of pages. To fix it, do dmirror_atomic_map() iff all pages are marked for exclusive access (we will break if mapped is less than required anyway) so we won't access those uninitialized fields of pages. Link: https://lkml.kernel.org/r/20220609130835.35110-1-linmiaohe@huawei.com Fixes: b659baea7546 ("mm: selftests for exclusive device memory") Signed-off-by: Miaohe Lin Cc: Jerome Glisse Cc: Alistair Popple Cc: Jason Gunthorpe Cc: Ralph Campbell Signed-off-by: Andrew Morton lib/test_hmm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 23689037e0986724e3bdc41bb2ee6fa1b497b8f9 Author: Miaohe Lin Date: Tue Jun 7 22:36:21 2022 +0800 mm/memremap: fix wrong function name above memremap_pages() Fix the wrong function name dev_memremap_pages above memremap_pages() to avoid confusion. Minor readability improvement. Link: https://lkml.kernel.org/r/20220607143621.58989-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton mm/memremap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21bfe8db0a4223c16d4f863ef4250dce5ffd08bb Author: Daniel Vetter Date: Sun Jun 5 17:25:39 2022 +0200 mm/mempool: use might_alloc() mempool are generally used for GFP_NOIO, so this wont benefit all that much because might_alloc currently only checks GFP_NOFS. But it does validate against mmu notifier pte zapping, some might catch some drivers doing really silly things, plus it's a bit more meaningful in what we're checking for here. Link: https://lkml.kernel.org/r/20220605152539.3196045-3-daniel.vetter@ffwll.ch Signed-off-by: Daniel Vetter Reviewed-by: Vlastimil Babka Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Cc: Roman Gushchin Signed-off-by: Andrew Morton mm/mempool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3967244430eb91698ac8dca7db8bd0871251305 Author: Daniel Vetter Date: Sun Jun 5 17:25:38 2022 +0200 mm/slab: delete cache_alloc_debugcheck_before() It only does a might_sleep_if(GFP_RECLAIM) check, which is already covered by the might_alloc() in slab_pre_alloc_hook(). And all callers of cache_alloc_debugcheck_before() call that beforehand already. Link: https://lkml.kernel.org/r/20220605152539.3196045-2-daniel.vetter@ffwll.ch Signed-off-by: Daniel Vetter Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vlastimil Babka Cc: Roman Gushchin Signed-off-by: Andrew Morton mm/slab.c | 10 ---------- 1 file changed, 10 deletions(-) commit 446ec83805ddaab5b8734d30ba4ae8c56739a9b4 Author: Daniel Vetter Date: Sun Jun 5 17:25:37 2022 +0200 mm/page_alloc: use might_alloc() ... instead of open coding it. Completely equivalent code, just a notch more meaningful when reading. Link: https://lkml.kernel.org/r/20220605152539.3196045-1-daniel.vetter@ffwll.ch Signed-off-by: Daniel Vetter Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Cc: Roman Gushchin Signed-off-by: Andrew Morton mm/page_alloc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 9384d79249d04b03572abb7e551a35d99c9268c0 Author: Fabio M. De Francesco Date: Mon Jun 6 16:15:33 2022 +0200 mm/highmem: delete memmove_page() Matthew Wilcox reported that, while he was looking at memmove_page(), he realized that it can't actually work. The reasons are hidden in its implementation, which makes use of memmove() on logical addresses provided by kmap_local_page(). memmove() does the wrong thing when it tests "if (dest <= src)". Therefore, delete memmove_page(). No need to change any other code because we have no call sites of memmove_page() across the whole kernel. Link: https://lkml.kernel.org/r/20220606141533.555-1-fmdefrancesco@gmail.com Signed-off-by: Fabio M. De Francesco Reported-by: Matthew Wilcox Reviewed-by: Baoquan He Reviewed-by: Ira Weiny Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton include/linux/highmem.h | 13 ------------- 1 file changed, 13 deletions(-) commit 673520f8da64f16077c1ecb190cbb38aa939fb41 Author: Qi Zheng Date: Sat Jun 4 16:22:09 2022 +0800 mm: memcontrol: add {pgscan,pgsteal}_{kswapd,direct} items in memory.stat of cgroup v2 There are already statistics of {pgscan,pgsteal}_kswapd and {pgscan,pgsteal}_direct of memcg event here, but now only the sum of the two is displayed in memory.stat of cgroup v2. In order to obtain more accurate information during monitoring and debugging, and to align with the display in /proc/vmstat, it better to display {pgscan,pgsteal}_kswapd and {pgscan,pgsteal}_direct separately. Also, for forward compatibility, we still display pgscan and pgsteal items so that it won't break existing applications. [zhengqi.arch@bytedance.com: add comment for memcg_vm_event_stat (suggested by Michal)] Link: https://lkml.kernel.org/r/20220606154028.55030-1-zhengqi.arch@bytedance.com [zhengqi.arch@bytedance.com: fix the doc, thanks to Johannes] Link: https://lkml.kernel.org/r/20220607064803.79363-1-zhengqi.arch@bytedance.com Link: https://lkml.kernel.org/r/20220604082209.55174-1-zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Acked-by: Johannes Weiner Acked-by: Roman Gushchin Acked-by: Muchun Song Acked-by: Shakeel Butt Acked-by: Michal Hocko Cc: Muchun Song Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/admin-guide/cgroup-v2.rst | 24 ++++++++++---- mm/memcontrol.c | 55 ++++++++++++++++----------------- 2 files changed, 45 insertions(+), 34 deletions(-) commit 153090f2c6d595c9636c582ed4b6c4dac1739a41 Author: Baoquan He Date: Tue Jun 7 18:59:58 2022 +0800 mm/vmalloc: add code comment for find_vmap_area_exceed_addr() Its behaviour is like find_vma() which finds an area above the specified address, add comment to make it easier to understand. And also fix two places of grammer mistake/typo. Link: https://lkml.kernel.org/r/20220607105958.382076-5-bhe@redhat.com Signed-off-by: Baoquan He Reviewed-by: Uladzislau Rezki (Sony) Cc: Christoph Hellwig Signed-off-by: Andrew Morton mm/vmalloc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit baa468a648b489e35475c8de9dd1d77f0a687b4d Author: Baoquan He Date: Tue Jun 7 18:59:57 2022 +0800 mm/vmalloc: fix typo in local variable name In __purge_vmap_area_lazy(), rename local_pure_list to local_purge_list. Link: https://lkml.kernel.org/r/20220607105958.382076-4-bhe@redhat.com Signed-off-by: Baoquan He Reviewed-by: Uladzislau Rezki (Sony) Cc: Christoph Hellwig Signed-off-by: Andrew Morton mm/vmalloc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 753df96be5d3a21cd70d8ab4f7464a868e1d2cb4 Author: Baoquan He Date: Tue Jun 7 18:59:56 2022 +0800 mm/vmalloc: remove the redundant boundary check In find_va_links(), when traversing the vmap_area tree, the comparing to check if the passed in 'va' is above or below 'tmp_va' is redundant, assuming both 'va' and 'tmp_va' has ->va_start <= ->va_end. Here, to simplify the checking as code change. Link: https://lkml.kernel.org/r/20220607105958.382076-3-bhe@redhat.com Signed-off-by: Baoquan He Reviewed-by: Uladzislau Rezki (Sony) Cc: Christoph Hellwig Signed-off-by: Andrew Morton mm/vmalloc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1b23ff80b399ae4561bbfd45f7c9c98f62797304 Author: Baoquan He Date: Tue Jun 7 18:59:55 2022 +0800 mm/vmalloc: invoke classify_va_fit_type() in adjust_va_to_fit_type() Patch series "Cleanup patches of vmalloc", v2. Some cleanup patches found when reading vmalloc code. This patch (of 4): adjust_va_to_fit_type() checks all values of passed in fit type, including NOTHING_FIT in the else branch. However, the check of NOTHING_FIT has been done inside adjust_va_to_fit_type() and before it's called in all call sites. In fact, both of these functions are coupled tightly, since classify_va_fit_type() is doing the preparation work for adjust_va_to_fit_type(). So putting invocation of classify_va_fit_type() inside adjust_va_to_fit_type() can simplify code logic and the redundant check of NOTHING_FIT issue will go away. Link: https://lkml.kernel.org/r/20220607105958.382076-1-bhe@redhat.com Link: https://lkml.kernel.org/r/20220607105958.382076-2-bhe@redhat.com Signed-off-by: Baoquan He Suggested-by: Uladzislau Rezki (Sony) Reviewed-by: Uladzislau Rezki (Sony) Cc: Christoph Hellwig Signed-off-by: Andrew Morton mm/vmalloc.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) commit bcc728eb4f446073e0160671d7d0059a4e9aa300 Author: Chengming Zhou Date: Tue May 31 10:04:21 2022 +0800 mm/damon: remove obsolete comments of kdamond_stop Since commit 0f91d13366a4 ("mm/damon: simplify stop mechanism") delete kdamond_stop and change to use kthread stop mechanism, these obsolete comments should be removed accordingly. Link: https://lkml.kernel.org/r/20220531020421.46849-1-zhouchengming@bytedance.com Signed-off-by: Chengming Zhou Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton include/linux/damon.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 943189db4f3ed1445dd630dc0b96e115357c4330 Author: Anshuman Khandual Date: Tue May 31 14:34:41 2022 +0530 mm/memory_hotplug: drop 'reason' argument from check_pfn_span() In check_pfn_span(), a 'reason' string is being used to recreate the caller function name, while printing the warning message. It is really unnecessary as the warning message could just be printed inside the caller depending on the return code. Currently there are just two callers for check_pfn_span() i.e __add_pages() and __remove_pages(). Let's clean this up. Link: https://lkml.kernel.org/r/20220531090441.170650-1-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Oscar Salvador Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton mm/memory_hotplug.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 833de10ff58e230fba523ad618e17c93d33b6fa3 Author: Miaohe Lin Date: Mon May 30 19:58:41 2022 +0800 mm/shmem.c: clean up comment of shmem_swapin_folio shmem_swapin_folio has changed to use folio but comment still mentions page. Update the relevant comment accordingly as suggested by Naoya. Link: https://lkml.kernel.org/r/20220530115841.4348-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Suggested-by: Naoya Horiguchi Cc: Hugh Dickins Cc: Matthew Wilcox Signed-off-by: Andrew Morton mm/shmem.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d92725256b4f22d084b813b37ddc394da79aacab Author: Peter Xu Date: Mon May 30 14:34:50 2022 -0400 mm: avoid unnecessary page fault retires on shared memory types I observed that for each of the shared file-backed page faults, we're very likely to retry one more time for the 1st write fault upon no page. It's because we'll need to release the mmap lock for dirty rate limit purpose with balance_dirty_pages_ratelimited() (in fault_dirty_shared_page()). Then after that throttling we return VM_FAULT_RETRY. We did that probably because VM_FAULT_RETRY is the only way we can return to the fault handler at that time telling it we've released the mmap lock. However that's not ideal because it's very likely the fault does not need to be retried at all since the pgtable was well installed before the throttling, so the next continuous fault (including taking mmap read lock, walk the pgtable, etc.) could be in most cases unnecessary. It's not only slowing down page faults for shared file-backed, but also add more mmap lock contention which is in most cases not needed at all. To observe this, one could try to write to some shmem page and look at "pgfault" value in /proc/vmstat, then we should expect 2 counts for each shmem write simply because we retried, and vm event "pgfault" will capture that. To make it more efficient, add a new VM_FAULT_COMPLETED return code just to show that we've completed the whole fault and released the lock. It's also a hint that we should very possibly not need another fault immediately on this page because we've just completed it. This patch provides a ~12% perf boost on my aarch64 test VM with a simple program sequentially dirtying 400MB shmem file being mmap()ed and these are the time it needs: Before: 650.980 ms (+-1.94%) After: 569.396 ms (+-1.38%) I believe it could help more than that. We need some special care on GUP and the s390 pgfault handler (for gmap code before returning from pgfault), the rest changes in the page fault handlers should be relatively straightforward. Another thing to mention is that mm_account_fault() does take this new fault as a generic fault to be accounted, unlike VM_FAULT_RETRY. I explicitly didn't touch hmm_vma_fault() and break_ksm() because they do not handle VM_FAULT_RETRY even with existing code, so I'm literally keeping them as-is. Link: https://lkml.kernel.org/r/20220530183450.42886-1-peterx@redhat.com Signed-off-by: Peter Xu Acked-by: Geert Uytterhoeven Acked-by: Peter Zijlstra (Intel) Acked-by: Johannes Weiner Acked-by: Vineet Gupta Acked-by: Guo Ren Acked-by: Max Filippov Acked-by: Christian Borntraeger Acked-by: Michael Ellerman (powerpc) Acked-by: Catalin Marinas Reviewed-by: Alistair Popple Reviewed-by: Ingo Molnar Acked-by: Russell King (Oracle) [arm part] Acked-by: Heiko Carstens Cc: Vasily Gorbik Cc: Stafford Horne Cc: David S. Miller Cc: Johannes Berg Cc: Brian Cain Cc: Richard Henderson Cc: Richard Weinberger Cc: Benjamin Herrenschmidt Cc: Thomas Gleixner Cc: Janosch Frank Cc: Albert Ou Cc: Anton Ivanov Cc: Dave Hansen Cc: Borislav Petkov Cc: Sven Schnelle Cc: Andrea Arcangeli Cc: James Bottomley Cc: Al Viro Cc: Alexander Gordeev Cc: Jonas Bonn Cc: Will Deacon Cc: Vlastimil Babka Cc: Michal Simek Cc: Matt Turner Cc: Paul Mackerras Cc: David Hildenbrand Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Stefan Kristiansson Cc: Paul Walmsley Cc: Ivan Kokshaysky Cc: Chris Zankel Cc: Hugh Dickins Cc: Dinh Nguyen Cc: Rich Felker Cc: H. Peter Anvin Cc: Andy Lutomirski Cc: Thomas Bogendoerfer Cc: Helge Deller Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/alpha/mm/fault.c | 4 ++++ arch/arc/mm/fault.c | 4 ++++ arch/arm/mm/fault.c | 4 ++++ arch/arm64/mm/fault.c | 4 ++++ arch/csky/mm/fault.c | 4 ++++ arch/hexagon/mm/vm_fault.c | 4 ++++ arch/ia64/mm/fault.c | 4 ++++ arch/m68k/mm/fault.c | 4 ++++ arch/microblaze/mm/fault.c | 4 ++++ arch/mips/mm/fault.c | 4 ++++ arch/nios2/mm/fault.c | 4 ++++ arch/openrisc/mm/fault.c | 4 ++++ arch/parisc/mm/fault.c | 4 ++++ arch/powerpc/mm/copro_fault.c | 5 +++++ arch/powerpc/mm/fault.c | 5 +++++ arch/riscv/mm/fault.c | 4 ++++ arch/s390/mm/fault.c | 12 ++++++++++++ arch/sh/mm/fault.c | 4 ++++ arch/sparc/mm/fault_32.c | 4 ++++ arch/sparc/mm/fault_64.c | 5 +++++ arch/um/kernel/trap.c | 4 ++++ arch/x86/mm/fault.c | 4 ++++ arch/xtensa/mm/fault.c | 4 ++++ include/linux/mm_types.h | 2 ++ mm/gup.c | 34 +++++++++++++++++++++++++++++++++- mm/memory.c | 2 +- 26 files changed, 139 insertions(+), 2 deletions(-) commit 4f5ceb8851f0081af54313abbf56de1615911faf Author: Yuanzheng Song Date: Sat May 28 06:31:17 2022 +0000 tools/vm/slabinfo: use alphabetic order when two values are equal When the number of partial slabs in each cache is the same (e.g., the value are 0), the results of the `slabinfo -X -N5` and `slabinfo -P -N5` are different. / # slabinfo -X -N5 ... Slabs sorted by number of partial slabs --------------------------------------- Name Objects Objsize Space Slabs/Part/Cpu O/S O %Fr %Ef Flg inode_cache 15180 392 6217728 758/0/1 20 1 0 95 a kernfs_node_cache 22494 88 2002944 488/0/1 46 0 0 98 shmem_inode_cache 663 464 319488 38/0/1 17 1 0 96 biovec-max 50 3072 163840 4/0/1 10 3 0 93 A dentry 19050 136 2600960 633/0/2 30 0 0 99 a / # slabinfo -P -N5 Name Objects Objsize Space Slabs/Part/Cpu O/S O %Fr %Ef Flg bdev_cache 32 984 32.7K 1/0/1 16 2 0 96 Aa ext4_inode_cache 42 752 32.7K 1/0/1 21 2 0 96 a dentry 19050 136 2.6M 633/0/2 30 0 0 99 a TCPv6 17 1840 32.7K 0/0/1 17 3 0 95 A RAWv6 18 856 16.3K 0/0/1 18 2 0 94 A This problem is caused by the sort_slabs(). So let's use alphabetic order when two values are equal in the sort_slabs(). By the way, the content of the `slabinfo -h` is not aligned because the `-P|--partial Sort by number of partial slabs` uses tabs instead of spaces. So let's use spaces instead of tabs to fix it. Link: https://lkml.kernel.org/r/20220528063117.935158-1-songyuanzheng@huawei.com Fixes: 1106b205a3fe ("tools/vm/slabinfo: add partial slab listing to -X") Signed-off-by: Yuanzheng Song Cc: "Tobin C. Harding" Signed-off-by: Andrew Morton tools/vm/slabinfo.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) commit 0b82ade6c042907e4f24bbe826958a896d24700d Author: Fanjun Kong Date: Thu May 26 22:02:57 2022 +0800 mm: use PAGE_ALIGNED instead of IS_ALIGNED already provides the PAGE_ALIGNED macro. Let's use this macro instead of IS_ALIGNED and passing PAGE_SIZE directly. Link: https://lkml.kernel.org/r/20220526140257.1568744-1-bh1scw@gmail.com Signed-off-by: Fanjun Kong Acked-by: Muchun Song Reviewed-by: Miaohe Lin Signed-off-by: Andrew Morton mm/sparse-vmemmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cd16dd03737c30608b78d235b17b3ab935ed18db Author: Peter Xu Date: Wed May 25 15:52:20 2022 -0400 mm/x86: remove dead code for hugetlbpage.c It seems to exist since the old times and never used once. Remove them. Link: https://lkml.kernel.org/r/20220525195220.10241-1-peterx@redhat.com Signed-off-by: Peter Xu Acked-by: Muchun Song Signed-off-by: Andrew Morton arch/x86/mm/hugetlbpage.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) commit 88bf18581375aa9b891e390aaf134b30d94232b3 Merge: 3e6fe5ce4d48 cb3f4a4a462b Author: Alexei Starovoitov Date: Thu Jun 16 19:27:30 2022 -0700 Merge branch 'sleepable uprobe support' Delyan Kratunov says: ==================== This series implements support for sleepable uprobe programs. Key work is in patches 2 and 3, the rest is plumbing and tests. The main observation is that the only obstacle in the way of sleepable uprobe programs is not the uprobe infrastructure, which already runs in a user-like context, but the rcu usage around bpf_prog_array. Details are in patch 2 but the tl;dr is that we chain trace_tasks and normal rcu grace periods when releasing to array to accommodate users of either rcu type. This introduces latency for non-sleepable users (kprobe, tp) but that's deemed acceptable, given recent benchmarks by Andrii [1]. We're a couple of orders of magnitude under the rate of bpf_prog_array churn that would raise flags (~1MM/s per Paul). [1]: https://lore.kernel.org/bpf/CAEf4BzbpjN6ca7D9KOTiFPOoBYkciYvTz0UJNp5c-_3ptm=Mrg@mail.gmail.com/ v3 -> v4: * Fix kdoc and inline issues * Rebase v2 -> v3: * Inline uprobe_call_bpf into trace_uprobe.c, it's just a bpf_prog_run_array_sleepable call now. * Do not disable preemption for uprobe non-sleepable programs. * Add acks. v1 -> v2: * Fix lockdep annotations in bpf_prog_run_array_sleepable * Chain rcu grace periods only for perf_event-attached programs. This limits the additional latency on the free path to use cases where we know it won't be a problem. * Add tests calling helpers only available in sleepable programs. * Remove kprobe.s support from libbpf. ==================== Signed-off-by: Alexei Starovoitov commit cb3f4a4a462b46eb5487ad806d58e34824c49044 Author: Delyan Kratunov Date: Tue Jun 14 23:10:44 2022 +0000 selftests/bpf: add tests for sleepable (uk)probes Add tests that ensure sleepable uprobe programs work correctly. Add tests that ensure sleepable kprobe programs cannot attach. Also add tests that attach both sleepable and non-sleepable uprobe programs to the same location (i.e. same bpf_prog_array). Acked-by: Andrii Nakryiko Signed-off-by: Delyan Kratunov Link: https://lore.kernel.org/r/c744e5bb7a5c0703f05444dc41f2522ba3579a48.1655248076.git.delyank@fb.com Signed-off-by: Alexei Starovoitov .../selftests/bpf/prog_tests/attach_probe.c | 49 +++++++++++++++++- .../selftests/bpf/progs/test_attach_probe.c | 60 ++++++++++++++++++++++ 2 files changed, 108 insertions(+), 1 deletion(-) commit c4cac71fc8a55cebd9abf30a3b287063be34b512 Author: Delyan Kratunov Date: Tue Jun 14 23:10:47 2022 +0000 libbpf: add support for sleepable uprobe programs Add section mappings for u(ret)probe.s programs. Acked-by: Andrii Nakryiko Signed-off-by: Delyan Kratunov Link: https://lore.kernel.org/r/aedbc3b74f3523f00010a7b0df8f3388cca59f16.1655248076.git.delyank@fb.com Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 64ad7556c75ea102eec2f5bcd60fe2d66ce70308 Author: Delyan Kratunov Date: Tue Jun 14 23:10:43 2022 +0000 bpf: allow sleepable uprobe programs to attach uprobe and kprobe programs have the same program type, KPROBE, which is currently not allowed to load sleepable programs. To avoid adding a new UPROBE type, instead allow sleepable KPROBE programs to load and defer the is-it-actually-a-uprobe-program check to attachment time, where there's already validation of the corresponding perf_event. A corollary of this patch is that you can now load a sleepable kprobe program but cannot attach it. Acked-by: Andrii Nakryiko Signed-off-by: Delyan Kratunov Link: https://lore.kernel.org/r/fcd44a7cd204f372f6bb03ef794e829adeaef299.1655248076.git.delyank@fb.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 4 ++-- kernel/events/core.c | 16 ++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) commit 8c7dcb84e3b744b2b70baa7a44a9b1881c33a9c9 Author: Delyan Kratunov Date: Tue Jun 14 23:10:46 2022 +0000 bpf: implement sleepable uprobes by chaining gps uprobes work by raising a trap, setting a task flag from within the interrupt handler, and processing the actual work for the uprobe on the way back to userspace. As a result, uprobe handlers already execute in a might_fault/_sleep context. The primary obstacle to sleepable bpf uprobe programs is therefore on the bpf side. Namely, the bpf_prog_array attached to the uprobe is protected by normal rcu. In order for uprobe bpf programs to become sleepable, it has to be protected by the tasks_trace rcu flavor instead (and kfree() called after a corresponding grace period). Therefore, the free path for bpf_prog_array now chains a tasks_trace and normal grace periods one after the other. Users who iterate under tasks_trace read section would be safe, as would users who iterate under normal read sections (from non-sleepable locations). The downside is that the tasks_trace latency affects all perf_event-attached bpf programs (and not just uprobe ones). This is deemed safe given the possible attach rates for kprobe/uprobe/tp programs. Separately, non-sleepable programs need access to dynamically sized rcu-protected maps, so bpf_run_prog_array_sleepables now conditionally takes an rcu read section, in addition to the overarching tasks_trace section. Signed-off-by: Delyan Kratunov Link: https://lore.kernel.org/r/ce844d62a2fd0443b08c5ab02e95bc7149f9aeb1.1655248076.git.delyank@fb.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 52 +++++++++++++++++++++++++++++++++++++++++++++ kernel/bpf/core.c | 15 +++++++++++++ kernel/trace/bpf_trace.c | 4 ++-- kernel/trace/trace_uprobe.c | 5 ++--- 4 files changed, 71 insertions(+), 5 deletions(-) commit d687f621c518d791b5fffde8add3112d869b0b1b Author: Delyan Kratunov Date: Tue Jun 14 23:10:42 2022 +0000 bpf: move bpf_prog to bpf.h In order to add a version of bpf_prog_run_array which accesses the bpf_prog->aux member, bpf_prog needs to be more than a forward declaration inside bpf.h. Given that filter.h already includes bpf.h, this merely reorders the type declarations for filter.h users. bpf.h users now have access to bpf_prog internals. Signed-off-by: Delyan Kratunov Link: https://lore.kernel.org/r/3ed7824e3948f22d84583649ccac0ff0d38b6b58.1655248076.git.delyank@fb.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 36 ++++++++++++++++++++++++++++++++++++ include/linux/filter.h | 34 ---------------------------------- 2 files changed, 36 insertions(+), 34 deletions(-) commit 6a33ed506416a74aea3071a72192fb06a3cc82df Author: Max Gurtovoy Date: Thu Jun 16 11:02:10 2022 +0300 scsi: iscsi: Make iscsi_unregister_transport() return void This function always returns 0. We can make it return void to simplify the code. Also, no caller ever checks the return value of this function. Link: https://lore.kernel.org/r/20220616080210.18531-1-mgurtovoy@nvidia.com Reviewed-by: Mike Christie Signed-off-by: Max Gurtovoy Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_iscsi.c | 4 +--- include/scsi/scsi_transport_iscsi.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) commit cb142b6d2f60ef7f676acf2dc84257ed05dfd7bd Author: Stanley Chu Date: Thu Jun 16 13:37:25 2022 +0800 scsi: ufs: ufs-mediatek: Disable unused VCCQx power rails Some MediaTek UFS platforms support different VCCQx power rails, for example, both 1.2v and 1.8v VCCQx, in a single kernel image. To optimize the system power consumption, provide a way to disable and release the unused power rail during the device probing. Link: https://lore.kernel.org/r/20220616053725.5681-12-stanley.chu@mediatek.com Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit ece418d0291117e3fc700f10e7fa9187010e38a0 Author: Stanley Chu Date: Thu Jun 16 13:37:24 2022 +0800 scsi: ufs: ufs-mediatek: Support multiple VCC sources Support multiple VCC sources in MediaTek UFS platforms. Two options are provided and distinguished by specific device tree attributes as below examples, [Option 1: By numbering] mediatek,ufs-vcc-by-num; vcc-opt1-supply = <&mt6373_vbuck4_ufs>; vcc-opt2-supply = <&mt6363_vemc>; [Option 2: By UFS version] mediatek,ufs-vcc-by-ver; vcc-ufs3-supply = <&mt6373_vbuck4_ufs>; Link: https://lore.kernel.org/r/20220616053725.5681-11-stanley.chu@mediatek.com Signed-off-by: Alice Chao Signed-off-by: Peter Wang Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 46 ++++++++++++++++++++++++++++++++++++++++- drivers/ufs/host/ufs-mediatek.h | 14 +++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) commit 1d6f9decb60a23cde2e0fbe0f89d5fc6d462ddd5 Author: Stanley Chu Date: Thu Jun 16 13:37:23 2022 +0800 scsi: ufs: Export regulator functions Export below regulator functions to allow vendors to customize regulator configuration in their own platforms. int ufshcd_populate_vreg(struct device *dev, const char *name, struct ufs_vreg **out_vreg); int ufshcd_get_vreg(struct device *dev, struct ufs_vreg *vreg); Link: https://lore.kernel.org/r/20220616053725.5681-10-stanley.chu@mediatek.com Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 3 ++- drivers/ufs/host/ufshcd-pltfrm.c | 5 +++-- drivers/ufs/host/ufshcd-pltfrm.h | 2 ++ include/ufs/ufshcd.h | 2 ++ 4 files changed, 9 insertions(+), 3 deletions(-) commit 42b1928360a32e28296c2188742c907f83b9824a Author: Stanley Chu Date: Thu Jun 16 13:37:22 2022 +0800 scsi: ufs: ufs-mediatek: Support low-power mode for parents of VCCQx Provide the facility to configure parents of VCCQx power rails as low-power or full-power mode in MediaTek UFS platforms. Link: https://lore.kernel.org/r/20220616053725.5681-9-stanley.chu@mediatek.com Signed-off-by: Alice Chao Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 46 +++++++++++++++++++++++++++++------------ drivers/ufs/host/ufs-mediatek.h | 4 ++++ 2 files changed, 37 insertions(+), 13 deletions(-) commit bc602ae977f3e6d47cd4c9c7aebc431019206712 Author: Stanley Chu Date: Thu Jun 16 13:37:21 2022 +0800 scsi: ufs: ufs-mediatek: Support flexible parameters for SMC calls Provide flexible number of parameters for UFS SMC calls to be used in a subsequent commit. Link: https://lore.kernel.org/r/20220616053725.5681-8-stanley.chu@mediatek.com Signed-off-by: Alice Chao Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 16 ---------------- drivers/ufs/host/ufs-mediatek.h | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 16 deletions(-) commit 0836cc252a5206d7308b91030f7eac186fa73c35 Author: Peter Wang Date: Thu Jun 16 13:37:20 2022 +0800 scsi: ufs: ufs-mediatek: Support low-power mode for VCCQ Allow VCCQ to enter low-power mode, and also remove the restriction of VCC because VCCQ/VCCQ2 can be changed to low-power mode even if VCC stays on while the device is not in active power mode. Link: https://lore.kernel.org/r/20220616053725.5681-7-stanley.chu@mediatek.com Reviewed-by: Stanley Chu Signed-off-by: Peter Wang Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 005ffdf09cd3a3b96c071f5439e5ad389158e5a6 Author: Po-Wen Kao Date: Thu Jun 16 13:37:19 2022 +0800 scsi: ufs: ufs-mediatek: Prevent device regulators setting LPM incorrectly Device regulatrs are allowed to enter low-power mode if neither device is not in active mode, nor VCC does not keep on. Fix this by adding conditions before LPM decision. Link: https://lore.kernel.org/r/20220616053725.5681-6-stanley.chu@mediatek.com Reviewed-by: Stanley Chu Signed-off-by: Po-Wen Kao Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 3fd23b8dfb54d9b74eba6dfdd3225db3ac116785 Author: Po-Wen Kao Date: Thu Jun 16 13:37:18 2022 +0800 scsi: ufs: ufs-mediatek: Fix the timing of configuring device regulators Currently the LPM configurations of device regulators may not work since VCC is not disabled yet while ufs_mtk_vreg_set_lpm() is executed. Fix this by changing the timing of invoking ufs_mtk_vreg_set_lpm(). Link: https://lore.kernel.org/r/20220616053725.5681-5-stanley.chu@mediatek.com Reviewed-by: Stanley Chu Signed-off-by: Po-Wen Kao Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 58 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 53 insertions(+), 5 deletions(-) commit 3f9b6cec12e2d2b3bdf69d47979b7877985c55e0 Author: CC Chou Date: Thu Jun 16 13:37:17 2022 +0800 scsi: ufs: ufs-mediatek: Introduce workaround for power mode change Some MediaTek SoC chips need special flow for power mode change, especially for chips supporting HS-G5. Enable the workaround by setting the host-specific capability. Link: https://lore.kernel.org/r/20220616053725.5681-4-stanley.chu@mediatek.com Reviewed-by: Stanley Chu Signed-off-by: CC Chou Signed-off-by: Eddie Huang Signed-off-by: Dennis Yu Signed-off-by: Peter Wang Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 60 +++++++++++++++++++++++++++++++++++++++-- drivers/ufs/host/ufs-mediatek.h | 1 + include/ufs/unipro.h | 1 + 3 files changed, 60 insertions(+), 2 deletions(-) commit d81c4c6f71704348f7ea3191672ac98435831db9 Author: Stanley Chu Date: Thu Jun 16 13:37:16 2022 +0800 scsi: ufs: Fix ADAPT logic for HS-G5 ADAPT now is added not only for HS Gear4 mode but also higher gears. Fix the logic for higher gears. Link: https://lore.kernel.org/r/20220616053725.5681-3-stanley.chu@mediatek.com Reviewed-by: Bart Van Assche Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc53683b45b053d94a660c417fd3d63cabc43b6f Author: Stanley Chu Date: Thu Jun 16 13:37:15 2022 +0800 scsi: ufs: Export ufshcd_uic_change_pwr_mode() Export ufshcd_uic_change_pwr_mode() to allow vendors to use it for SoC-specific power mode change design limitations. Link: https://lore.kernel.org/r/20220616053725.5681-2-stanley.chu@mediatek.com Reviewed-by: Bart Van Assche Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 3 ++- include/ufs/ufshcd.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 4de0d18da901bd271d9e4f13415c4a6eedee0591 Author: Nilesh Javali Date: Wed Jun 15 22:35:08 2022 -0700 scsi: qla2xxx: Update version to 10.02.07.700-k Link: https://lore.kernel.org/r/20220616053508.27186-12-njavali@marvell.com Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f260694e6463b63ae550aad25ddefe94cb1904da Author: Quinn Tran Date: Wed Jun 15 22:35:07 2022 -0700 scsi: qla2xxx: Fix erroneous mailbox timeout after PCI error injection Clear wait for mailbox interrupt flag to prevent stale mailbox: Feb 22 05:22:56 ltcden4-lp7 kernel: qla2xxx [0135:90:00.1]-500a:4: LOOP UP detected (16 Gbps). Feb 22 05:22:59 ltcden4-lp7 kernel: qla2xxx [0135:90:00.1]-d04c:4: MBX Command timeout for cmd 69, ... To fix the issue, driver needs to clear the MBX_INTR_WAIT flag on purging the mailbox. When the stale mailbox completion does arrive, it will be dropped. Link: https://lore.kernel.org/r/20220616053508.27186-11-njavali@marvell.com Fixes: b6faaaf796d7 ("scsi: qla2xxx: Serialize mailbox request") Cc: Naresh Bannoth Cc: Kyle Mahlkuch Cc: stable@vger.kernel.org Reported-by: Naresh Bannoth Tested-by: Naresh Bannoth Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_mbx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2416ccd3815ba1613e10a6da0a24ef21acfe5633 Author: Arun Easi Date: Wed Jun 15 22:35:06 2022 -0700 scsi: qla2xxx: Fix losing FCP-2 targets on long port disable with I/Os FCP-2 devices were not coming back online once they were lost, login retries exhausted, and then came back up. Fix this by accepting RSCN when the device is not online. Link: https://lore.kernel.org/r/20220616053508.27186-10-njavali@marvell.com Fixes: 44c57f205876 ("scsi: qla2xxx: Changes to support FCP2 Target") Cc: stable@vger.kernel.org Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit f12d2d130efc49464ef0666789bfeb9073162743 Author: Arun Easi Date: Wed Jun 15 22:35:05 2022 -0700 scsi: qla2xxx: Add debug prints in the device remove path Add a debug print in the devloss callback. Link: https://lore.kernel.org/r/20220616053508.27186-9-njavali@marvell.com Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_attr.c | 3 +++ drivers/scsi/qla2xxx/qla_def.h | 6 ++++++ 2 files changed, 9 insertions(+) commit 118b0c863c8f5629cc5271fc24d72d926e0715d9 Author: Arun Easi Date: Wed Jun 15 22:35:04 2022 -0700 scsi: qla2xxx: Fix losing target when it reappears during delete FC target disappeared during port perturbation tests due to a race that tramples target state. Fix the issue by adding state checks before proceeding. Link: https://lore.kernel.org/r/20220616053508.27186-8-njavali@marvell.com Fixes: 44c57f205876 ("scsi: qla2xxx: Changes to support FCP2 Target") Cc: stable@vger.kernel.org Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_attr.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit 58d1c124cd79ea686b512043c5bd515590b2ed95 Author: Arun Easi Date: Wed Jun 15 22:35:03 2022 -0700 scsi: qla2xxx: Fix losing FCP-2 targets during port perturbation tests When a mix of FCP-2 (tape) and non-FCP-2 targets are present, FCP-2 target state was incorrectly transitioned when both of the targets were gone. Fix this by ignoring state transition for FCP-2 targets. Link: https://lore.kernel.org/r/20220616053508.27186-7-njavali@marvell.com Fixes: 44c57f205876 ("scsi: qla2xxx: Changes to support FCP2 Target") Cc: stable@vger.kernel.org Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_gs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c39587bc0abaf16593f7abcdf8aeec3c038c7d52 Author: Arun Easi Date: Wed Jun 15 22:35:02 2022 -0700 scsi: qla2xxx: Fix crash due to stale SRB access around I/O timeouts Ensure SRB is returned during I/O timeout error escalation. If that is not possible fail the escalation path. Following crash stack was seen: BUG: unable to handle kernel paging request at 0000002f56aa90f8 IP: qla_chk_edif_rx_sa_delete_pending+0x14/0x30 [qla2xxx] Call Trace: ? qla2x00_status_entry+0x19f/0x1c50 [qla2xxx] ? qla2x00_start_sp+0x116/0x1170 [qla2xxx] ? dma_pool_alloc+0x1d6/0x210 ? mempool_alloc+0x54/0x130 ? qla24xx_process_response_queue+0x548/0x12b0 [qla2xxx] ? qla_do_work+0x2d/0x40 [qla2xxx] ? process_one_work+0x14c/0x390 Link: https://lore.kernel.org/r/20220616053508.27186-6-njavali@marvell.com Fixes: d74595278f4a ("scsi: qla2xxx: Add multiple queue pair functionality.") Cc: stable@vger.kernel.org Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) commit 5304673bdb1635e27555bd636fd5d6956f1cd552 Author: Quinn Tran Date: Wed Jun 15 22:35:01 2022 -0700 scsi: qla2xxx: Turn off multi-queue for 8G adapters For 8G adapters, multi-queue was enabled accidentally. Make sure multi-queue is not enabled. Link: https://lore.kernel.org/r/20220616053508.27186-5-njavali@marvell.com Cc: stable@vger.kernel.org Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 4 ++-- drivers/scsi/qla2xxx/qla_isr.c | 16 ++++++---------- 2 files changed, 8 insertions(+), 12 deletions(-) commit d3117c83ba316b3200d9f2fe900f2b9a5525a25c Author: Quinn Tran Date: Wed Jun 15 22:35:00 2022 -0700 scsi: qla2xxx: Wind down adapter after PCIe error Put adapter into a wind down state if OS does not make any attempt to recover the adapter after PCIe error. Link: https://lore.kernel.org/r/20220616053508.27186-4-njavali@marvell.com Cc: stable@vger.kernel.org Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_bsg.c | 10 ++++++++- drivers/scsi/qla2xxx/qla_def.h | 4 ++++ drivers/scsi/qla2xxx/qla_init.c | 20 +++++++++++++++++ drivers/scsi/qla2xxx/qla_os.c | 48 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 81 insertions(+), 1 deletion(-) commit 476da8faa336f104cb5183ff51615335d1ff5d1f Author: Bikash Hazarika Date: Wed Jun 15 22:34:59 2022 -0700 scsi: qla2xxx: Add a new v2 dport diagnostic feature FW requires minimum 72 bytes buffer size for D_port result. Buffer size 1024 is mentioned in the FW spec so buffer size is increased to 1024. Rewrite the logic to handle START/RESTART command from SDMAPI. Link: https://lore.kernel.org/r/20220616053508.27186-3-njavali@marvell.com Signed-off-by: Bikash Hazarika Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_bsg.c | 86 +++++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_bsg.h | 15 +++++++ drivers/scsi/qla2xxx/qla_def.h | 10 +++++ drivers/scsi/qla2xxx/qla_gbl.h | 4 ++ drivers/scsi/qla2xxx/qla_init.c | 3 ++ drivers/scsi/qla2xxx/qla_isr.c | 3 ++ drivers/scsi/qla2xxx/qla_mbx.c | 48 +++++++++++++++++++++++ 7 files changed, 169 insertions(+) commit bff4873c709085e09d0ffae0c25b8e65256e3205 Author: Arun Easi Date: Wed Jun 15 22:34:58 2022 -0700 scsi: qla2xxx: Fix excessive I/O error messages by default Disable printing I/O error messages by default. The messages will be printed only when logging was enabled. Link: https://lore.kernel.org/r/20220616053508.27186-2-njavali@marvell.com Fixes: 8e2d81c6b5be ("scsi: qla2xxx: Fix excessive messages during device logout") Cc: stable@vger.kernel.org Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_isr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65080c51fde468465e3547d72e4a593b1361c0f4 Author: Dmitry Bogdanov Date: Tue Jun 7 16:19:53 2022 +0300 scsi: iscsi: Prefer xmit of DataOut over new commands iscsi_data_xmit() (TX worker) is iterating over the queue of new SCSI commands concurrently with the queue being replenished. Only after the queue is emptied will we start sending pending DataOut PDUs. That leads to DataOut timeout on the target side and to connection reinstatement. Give priority to pending DataOut commands over new commands. Link: https://lore.kernel.org/r/20220607131953.11584-1-d.bogdanov@yadro.com Reviewed-by: Konstantin Shelekhin Reviewed-by: Mike Christie Signed-off-by: Dmitry Bogdanov Signed-off-by: Martin K. Petersen drivers/scsi/libiscsi.c | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) commit c0d93b12f31c31748ca5d3349777c70f1e2a8228 Author: Alim Akhtar Date: Wed Jun 15 17:42:04 2022 +0530 scsi: ufs: Rearrange addresses in increasing order Rearrange all the unipro and mphy addresses in their increasing order. Link: https://lore.kernel.org/r/20220615121204.16642-3-alim.akhtar@samsung.com Reviewed-by: Chanho Park Signed-off-by: Alim Akhtar Signed-off-by: Martin K. Petersen include/ufs/unipro.h | 102 +++++++++++++++++++++++++-------------------------- 1 file changed, 51 insertions(+), 51 deletions(-) commit cb2bf7c6e544d2df3a683d6012ac15a5276ef911 Author: Alim Akhtar Date: Wed Jun 15 17:42:03 2022 +0530 scsi: ufs: host: ufs-exynos: Use already existing definition UFS core already uses RX_MIN_ACTIVATETIME_CAPABILITY macro, let's use the same in driver as well instead of having a different macro name for the same offset. Link: https://lore.kernel.org/r/20220615121204.16642-2-alim.akhtar@samsung.com Reviewed-by: Chanho Park Signed-off-by: Alim Akhtar Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-exynos.c | 5 +++-- include/ufs/unipro.h | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) commit 6c6806abd5bbb0e0ed4797cf1ef0c7ff1962ebac Author: Alim Akhtar Date: Wed Jun 15 17:42:02 2022 +0530 scsi: ufs: host: ufs-exynos: Remove unused defines Remove #defines as those are not used anywhere in the driver file. Link: https://lore.kernel.org/r/20220615121204.16642-1-alim.akhtar@samsung.com Reviewed-by: Chanho Park Signed-off-by: Alim Akhtar Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-exynos.c | 10 ---------- 1 file changed, 10 deletions(-) commit 42f22fe36d51a621a065352898e369bd7983107f Author: John Garry Date: Sat Jun 11 00:46:42 2022 +0800 scsi: pm8001: Expose hardware queues for pm80xx In commit 05c6c029a44d ("scsi: pm80xx: Increase number of supported queues"), support for 80xx chip was improved by enabling multiple HW queues. In this, like other SCSI MQ HBA drivers at the time, the HW queues were not exposed to upper layer, and instead the driver managed the queues internally. However, this management duplicates blk-mq code. In addition, the HW queue management is sub-optimal for a system where the number of CPUs exceeds the HW queues - this is because queues are selected in a round-robin fashion, when it would be better to make adjacent CPUs submit on the same queue. And finally, the affinity of the completion queue interrupts is not set to mirror the cpu<->HQ queue mapping, which is suboptimal. As such, for when MSIX is supported, expose HW queues to upper layer. We always use queue index #0 for "internal" commands, i.e. anything which does not come from the block layer, so omit this from the affinity spreading. Link: https://lore.kernel.org/r/1654879602-33497-5-git-send-email-john.garry@huawei.com Tested-by: Damien Le Moal Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_init.c | 50 ++++++++++++++++++++++++++++++--------- drivers/scsi/pm8001/pm8001_sas.h | 2 ++ drivers/scsi/pm8001/pm80xx_hwi.c | 35 +++++++++++++++++++++------ 3 files changed, 69 insertions(+), 18 deletions(-) commit 940f5efa63161642b32b8dd82c17089b8ada7cbb Author: John Garry Date: Sat Jun 11 00:46:41 2022 +0800 scsi: pm8001: Use non-atomic bitmap ops for tag alloc + free In pm8001_tag_alloc() we don't require atomic set_bit() as we are already in atomic context. In pm8001_tag_free() we should use the same host spinlock to protect clearing the tag (and then don't require the atomic clear_bit()). Link: https://lore.kernel.org/r/1654879602-33497-4-git-send-email-john.garry@huawei.com Tested-by: Damien Le Moal Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_sas.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 98132d842d4d1ca64c829eb968ff1df53b37aead Author: John Garry Date: Sat Jun 11 00:46:40 2022 +0800 scsi: pm8001: Set up tags before using them The current code is buggy in that the tags are set up after they are needed in pm80xx_chip_init() -> pm80xx_set_sas_protocol_timer_config(). The tag depth is earlier read in pm80xx_chip_init() -> read_main_config_table(). Add a post init callback to do the pm80xx work which needs to be done after reading the tags. I don't see a better way to do this. Link: https://lore.kernel.org/r/1654879602-33497-3-git-send-email-john.garry@huawei.com Tested-by: Damien Le Moal Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_hwi.c | 5 +++++ drivers/scsi/pm8001/pm8001_init.c | 18 +++++++++--------- drivers/scsi/pm8001/pm8001_sas.h | 1 + drivers/scsi/pm8001/pm80xx_hwi.c | 11 +++++++++-- 4 files changed, 24 insertions(+), 11 deletions(-) commit 35a7e9dbff9a25b1fd03a0a93dd1b69459e0c14e Author: John Garry Date: Sat Jun 11 00:46:39 2022 +0800 scsi: pm8001: Rework shost initial values Some values in pm8001_prep_sas_ha_init() are set the same as they would be set in scsi_host_alloc(), or could be in the sht (which would be better), or later just overwritten, so rework the following: - cmd_per_lun can be set in the sht - max_lun and max_channel are as scsi_host_alloc() (so no need to set) - can_queue is later overwritten (so don't set in pm8001_prep_sas_ha_init()) Link: https://lore.kernel.org/r/1654879602-33497-2-git-send-email-john.garry@huawei.com Tested-by: Damien Le Moal Acked-by: Jack Wang Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_init.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit dcad25cb2500d2fe1f9a9222ecb316f431e2e1c9 Author: Krzysztof Kozlowski Date: Mon Jun 13 12:14:29 2022 +0200 scsi: ufs: exynos: Constify driver data Constify the drv data because it should not be modified (used by multiple devices). Link: https://lore.kernel.org/r/20220613101429.114449-1-krzysztof.kozlowski@linaro.org Reviewed-by: Chanho Park Signed-off-by: Krzysztof Kozlowski Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-exynos.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit e733f8a894e606023ebbf9f31683c66d9e84e794 Author: Xiu Jianfeng Date: Mon Jun 13 10:18:51 2022 +0800 scsi: lpfc: Use memset_startat() helper in lpfc_nvmet_xmt_fcp_op_cmp() Use memset_startat() helper to simplify the code, no functional changes. Link: https://lore.kernel.org/r/20220613021851.59699-1-xiujianfeng@huawei.com Reviewed-by: James Smart Signed-off-by: Xiu Jianfeng Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 35bf020bd8ab41849871645d8fa83c86cddfe7eb Author: Yang Li Date: Mon Jun 13 09:43:21 2022 +0800 scsi: target: iscsi: Fix NULL pointer dereference in iscsi_conn_auth_required() Fix following coccicheck error: ./drivers/target/iscsi/iscsi_target_nego.c:831:13-26: ERROR: se_nacl is NULL but dereferenced. Link: https://lore.kernel.org/r/20220613014321.107045-1-yang.lee@linux.alibaba.com Fixes: a75fcb0912a5 ("scsi: target: iscsi: Extract auth functions") Reported-by: Abaci Robot Reviewed-by: Mike Christie Signed-off-by: Yang Li Signed-off-by: Martin K. Petersen drivers/target/iscsi/iscsi_target_nego.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 18b3eb79b1cfc41cf4aeb5f789d27fa2e82b835f Author: Lukas Bulwahn Date: Mon Jun 13 14:26:21 2022 +0200 MAINTAINERS: add include/dt-bindings/phy to GENERIC PHY FRAMEWORK Maintainers of the directory Documentation/devicetree/bindings/phy are also the maintainers of the corresponding directory include/dt-bindings/phy. Add the file entry for include/dt-bindings/phy to the appropriate section in MAINTAINERS. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220613122621.18397-1-lukas.bulwahn@gmail.com Signed-off-by: Vinod Koul MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 5bef2838f1a058c1198aac47d08f7e74f3708017 Author: Dmitry Baryshkov Date: Fri Jun 10 21:55:42 2022 +0300 phy: qcom-qmp: fix PCIe PHY support Replace init/exit ops with power_on/power_off which should be used for the PCIe PHYs to fix PHY initialization. Fixes: da07a06b905f ("phy: qcom-qmp-pcie: drop support for non-PCIe PHY types") Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220610185542.3662484-3-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fbbf71f3740939c44dfb5411e2daf3bf0d8e8f41 Author: Dmitry Baryshkov Date: Fri Jun 10 21:55:41 2022 +0300 phy: qcom-qmp: fix msm8996 PCIe PHY support Replace init/exit ops with power_on/power_off which should be used for the PCIe PHYs to fix PHY initialization. Fixes: f575ac2d64e7 ("phy: qcom-qmp-pcie-msm8996: drop support for non-PCIe PHY types") Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220610185542.3662484-2-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4daa43e92eaeb2c1df3ad8274b81601305875ced Author: Roger Quadros Date: Thu May 26 09:41:21 2022 +0300 phy: ti: phy-j721e-wiz: use OF data for device specific data Move device specific data into OF data structure so it is easier to maintain and we can get rid of if statements. Signed-off-by: Roger Quadros Reviewed-by: Matt Ranostay Link: https://lore.kernel.org/r/20220526064121.27625-1-rogerq@kernel.org Signed-off-by: Vinod Koul drivers/phy/ti/phy-j721e-wiz.c | 75 ++++++++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 25 deletions(-) commit 5cda442dc032d8b17babdc304a38db3ce4a58ca8 Author: Geert Uytterhoeven Date: Mon May 9 14:53:34 2022 +0200 dt-bindings: phy: renesas: usb3-phy: Spelling s/funcional/functional/ Fix a misspelling of the word "functional". Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/3da9bd360e1c83007af0e0e90fa4e6c2b50fdab3.1652100633.git.geert+renesas@glider.be Signed-off-by: Vinod Koul Documentation/devicetree/bindings/phy/renesas,usb3-phy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1b2d06de11209771c8d8cfb68a5e48d4ef6146f Author: Alim Akhtar Date: Fri Jun 10 16:11:16 2022 +0530 phy: samsung-ufs: add support for FSD ufs phy driver Adds support for Tesla Full Self-Driving (FSD) ufs phy driver. This SoC has different cdr lock status offset. Signed-off-by: Bharat Uppal Signed-off-by: Alim Akhtar Reviewed-by: Chanho Park Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220610104119.66401-4-alim.akhtar@samsung.com Signed-off-by: Vinod Koul drivers/phy/samsung/Makefile | 1 + drivers/phy/samsung/phy-fsd-ufs.c | 58 +++++++++++++++++++++++++++++++++++ drivers/phy/samsung/phy-samsung-ufs.c | 3 ++ drivers/phy/samsung/phy-samsung-ufs.h | 1 + 4 files changed, 63 insertions(+) commit e313216b52813a9c51cad0bf406b60d3248b268f Author: Alim Akhtar Date: Fri Jun 10 16:11:15 2022 +0530 phy: samsung-ufs: move cdr offset to drvdata Move CDR lock offset to drv data so that it can be extended for other SoCs which are having CDR lock at different register offset. Signed-off-by: Bharat Uppal Signed-off-by: Alim Akhtar Reviewed-by: Chanho Park Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220610104119.66401-3-alim.akhtar@samsung.com Signed-off-by: Vinod Koul drivers/phy/samsung/phy-exynos7-ufs.c | 3 +++ drivers/phy/samsung/phy-exynosautov9-ufs.c | 2 ++ drivers/phy/samsung/phy-samsung-ufs.c | 4 +++- drivers/phy/samsung/phy-samsung-ufs.h | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) commit 63f4676dd879d72f33e5f1ea1bc166411af2cbea Author: Alim Akhtar Date: Fri Jun 10 16:11:14 2022 +0530 dt-bindings: phy: Add FSD UFS PHY bindings Add tesla,fsd-ufs-phy compatible for Tesla Full Self-Driving (FSD) SoC. Signed-off-by: Bharat Uppal Signed-off-by: Alim Akhtar Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220610104119.66401-2-alim.akhtar@samsung.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml | 1 + 1 file changed, 1 insertion(+) commit c667d9c630cc19a0c99bb3e98e7067923bbffc42 Author: Douglas Anderson Date: Mon Apr 25 14:06:43 2022 -0700 dt-bindings: phy: List supplies for qcom,edp-phy We're supposed to list the supplies in the dt bindings but there are none in the eDP PHY bindings. Looking at the driver in Linux, I can see that there seem to be two relevant supplies: "vdda-phy" and "vdda-pll". Let's add those to the bindings. NOTE: from looking at the Qualcomm datasheet for sc7280, it's not immediately clear how to figure out how to fill in these supplies. The only two eDP related supplies are simply described as "power for eDP 0.9V circuits" and "power for eDP 1.2V circuits". From guessing and from comparing how a similar PHY is hooked up on other similar Qualcomm boards, I'll make the educated guess that the 1.2V supply goes to "vdda-phy" and the 0.9V supply goes to "vdda-pll" and I'll use that in the example here. Signed-off-by: Douglas Anderson Reviewed-by: Sankeerth Billakanti Link: https://lore.kernel.org/r/20220425140619.2.Iae013f0ff4599294189f3a6e91376fad137bbabf@changeid Signed-off-by: Vinod Koul Documentation/devicetree/bindings/phy/qcom,edp-phy.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit e4a8864f74e9e9e4a7eb93952a4cfa35c165c930 Author: Lucas De Marchi Date: Fri Jun 10 16:21:30 2022 -0700 iosys-map: Fix typo in documentation It's one argument, vaddr_iomem, not 2 (vaddr and _iomem). Signed-off-by: Lucas De Marchi Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20220610232130.2865479-3-lucas.demarchi@intel.com include/linux/iosys-map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e6fe5ce4d4860c3a111c246fddc6f31492f4fb0 Author: Andrii Nakryiko Date: Wed Jun 15 22:55:43 2022 -0700 libbpf: Fix internal USDT address translation logic for shared libraries Perform the same virtual address to file offset translation that libbpf is doing for executable ELF binaries also for shared libraries. Currently libbpf is making a simplifying and sometimes wrong assumption that for shared libraries relative virtual addresses inside ELF are always equal to file offsets. Unfortunately, this is not always the case with LLVM's lld linker, which now by default generates quite more complicated ELF segments layout. E.g., for liburandom_read.so from selftests/bpf, here's an excerpt from readelf output listing ELF segments (a.k.a. program headers): Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0x0000000000000040 0x0000000000000040 0x0001f8 0x0001f8 R 0x8 LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x0005e4 0x0005e4 R 0x1000 LOAD 0x0005f0 0x00000000000015f0 0x00000000000015f0 0x000160 0x000160 R E 0x1000 LOAD 0x000750 0x0000000000002750 0x0000000000002750 0x000210 0x000210 RW 0x1000 LOAD 0x000960 0x0000000000003960 0x0000000000003960 0x000028 0x000029 RW 0x1000 Compare that to what is generated by GNU ld (or LLVM lld's with extra -znoseparate-code argument which disables this cleverness in the name of file size reduction): Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x000550 0x000550 R 0x1000 LOAD 0x001000 0x0000000000001000 0x0000000000001000 0x000131 0x000131 R E 0x1000 LOAD 0x002000 0x0000000000002000 0x0000000000002000 0x0000ac 0x0000ac R 0x1000 LOAD 0x002dc0 0x0000000000003dc0 0x0000000000003dc0 0x000262 0x000268 RW 0x1000 You can see from the first example above that for executable (Flg == "R E") PT_LOAD segment (LOAD #2), Offset doesn't match VirtAddr columns. And it does in the second case (GNU ld output). This is important because all the addresses, including USDT specs, operate in a virtual address space, while kernel is expecting file offsets when performing uprobe attach. So such mismatches have to be properly taken care of and compensated by libbpf, which is what this patch is fixing. Also patch clarifies few function and variable names, as well as updates comments to reflect this important distinction (virtaddr vs file offset) and to ephasize that shared libraries are not all that different from executables in this regard. This patch also changes selftests/bpf Makefile to force urand_read and liburand_read.so to be built with Clang and LLVM's lld (and explicitly request this ELF file size optimization through -znoseparate-code linker parameter) to validate libbpf logic and ensure regressions don't happen in the future. I've bundled these selftests changes together with libbpf changes to keep the above description tied with both libbpf and selftests changes. Fixes: 74cc6311cec9 ("libbpf: Add USDT notes parsing and resolution logic") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220616055543.3285835-1-andrii@kernel.org tools/lib/bpf/usdt.c | 123 ++++++++++++++++++----------------- tools/testing/selftests/bpf/Makefile | 14 ++-- 2 files changed, 72 insertions(+), 65 deletions(-) commit 73448ae6204faa636292ae0d7ba8b2f6eb48179d Merge: 89793a61d8e7 1771c8c9e65a Author: Palmer Dabbelt Date: Thu Jun 16 15:50:37 2022 -0700 RISC-V: Some Svpbmt fixes and cleanups Some additionals comments and notes from autobuilders received after the series got applied, warranted some changes. * 'riscv-svpbmt' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/palmer/linux: riscv: remove usage of function-pointers from cpufeatures and t-head errata riscv: make patch-function pointer more generic in cpu_manufacturer_info struct riscv: Improve description for RISCV_ISA_SVPBMT Kconfig symbol riscv: drop cpufeature_apply_feature tracking variable riscv: fix dependency for t-head errata commit 1771c8c9e65a20128f93df107353a5f4cb91546a Author: Heiko Stuebner Date: Thu May 26 22:56:46 2022 +0200 riscv: remove usage of function-pointers from cpufeatures and t-head errata Having a list of alternatives to check with a per-entry function pointer to a check function is nice style-wise. But in case of early-alternatives it can clash with the non-relocated kernel and the function pointer in the list pointing to a completely wrong location. This isn't an issue with one or two list entries, as in that case the compiler seems to unroll the loop and even usage of the list structure and then only does relative jumps into the check functions based on this. When adding a third entry to either list though, the issue that was hiding there from the beginning is triggered resulting a jump to a memory address that isn't part of the kernel at all. The list of features/erratas only contained an unused name and the pointer to the check function, so an easy solution for the problem is to just unroll the loop in code, dismantle the whole list structure and just call the relevant check functions one by one ourself. For the T-Head errata this includes moving the stage-check inside the check functions. The issue is only relevant for things that might be called for early- alternatives (T-Head and possible future main extensions), so the SiFive erratas were not affected from the beginning, as they got an early return for early-alternatives in the original patchset. Signed-off-by: Heiko Stuebner Tested-by: Samuel Holland Link: https://lore.kernel.org/r/20220526205646.258337-6-heiko@sntech.de Signed-off-by: Palmer Dabbelt arch/riscv/errata/thead/errata.c | 38 ++++++++++++-------------------------- arch/riscv/kernel/cpufeature.c | 32 ++++++++++---------------------- 2 files changed, 22 insertions(+), 48 deletions(-) commit b684001a5eb79d9bf36f655547bc226dedc8bc03 Author: Heiko Stuebner Date: Thu May 26 22:56:44 2022 +0200 riscv: make patch-function pointer more generic in cpu_manufacturer_info struct During review the naming of the function-pointer was called confusing as the vendor id is just one of three inputs for the patching and indeed it serves no real purpose, as with recent changes the function pointer is not a static global element anymore, so drop the "vendor_" prefix. Suggested-by: Christoph Hellwig Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20220526205646.258337-4-heiko@sntech.de Signed-off-by: Palmer Dabbelt arch/riscv/kernel/alternative.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 8ee53c702f23d511b7f635a4eabbb85384149f8c Author: pengfuyuan Date: Thu Jun 16 15:01:01 2022 +0800 drm/nouveau: Fix spelling typo in comments Fix spelling typo in comments. Reported-by: k2ci Signed-off-by: pengfuyuan Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/tencent_C15AFFD9BBB862C56280A415C336F94C3909@qq.com drivers/gpu/drm/nouveau/include/nvhw/drf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 09f4933a4fd9ebe333726dd139bd330843d40f28 Author: Krzysztof Kozlowski Date: Thu May 26 22:41:08 2022 +0200 arm64: dts: microchip: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526204110.831805-1-krzysztof.kozlowski@linaro.org .../boot/dts/microchip/sparx5_pcb134_board.dtsi | 200 ++++++++++----------- .../boot/dts/microchip/sparx5_pcb135_board.dtsi | 48 ++--- 2 files changed, 124 insertions(+), 124 deletions(-) commit f028328f60bd33cbdc4b65dac2efa98ed6ca26b7 Author: Krzysztof Kozlowski Date: Thu May 26 22:41:52 2022 +0200 arm64: dts: sprd: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Orson Zhai Link: https://lore.kernel.org/r/20220526204152.831948-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/sprd/sc9836.dtsi | 10 +++++----- arch/arm64/boot/dts/sprd/sc9863a.dtsi | 4 ++-- arch/arm64/boot/dts/sprd/whale2.dtsi | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) commit 11357f103f2e641e2744d527886ff248dbef13d8 Author: Krzysztof Kozlowski Date: Thu May 26 22:44:53 2022 +0200 arm64: dts: hisilicon: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526204453.832681-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 12 ++++++------ arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 8 ++++---- arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 2 +- arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 12 ++++++------ arch/arm64/boot/dts/hisilicon/hip06.dtsi | 6 +++--- arch/arm64/boot/dts/hisilicon/hip07.dtsi | 6 +++--- 6 files changed, 23 insertions(+), 23 deletions(-) commit 8c1be9336e9ae3e5e421f04143cf5967f5436364 Author: Krzysztof Kozlowski Date: Thu May 26 22:45:24 2022 +0200 arm64: dts: marvell: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526204525.832847-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts | 4 ++-- arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi | 2 +- arch/arm64/boot/dts/marvell/armada-8040-puzzle-m801.dts | 4 ++-- arch/arm64/boot/dts/marvell/cn9130-db.dtsi | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit b88d11f84da6dd41dbbd4e20a889182aba634b95 Author: Krzysztof Kozlowski Date: Thu May 26 22:46:06 2022 +0200 arm64: dts: lg: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526204606.833054-5-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/lg/lg1312.dtsi | 38 +++++++++++++++++++------------------- arch/arm64/boot/dts/lg/lg1313.dtsi | 38 +++++++++++++++++++------------------- 2 files changed, 38 insertions(+), 38 deletions(-) commit d57cc3b903db4524c556325008071a7223690083 Author: Krzysztof Kozlowski Date: Thu May 26 22:46:04 2022 +0200 arm64: dts: apm: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526204606.833054-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/apm/apm-shadowcat.dtsi | 2 +- arch/arm64/boot/dts/apm/apm-storm.dtsi | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit dec1c62e91ba268ab2a6e339d4d7a59287d5eba1 Author: Krzysztof Kozlowski Date: Thu May 26 22:46:03 2022 +0200 arm64: dts: amd: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526204606.833054-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/amd/amd-overdrive-rev-b0.dts | 4 ++-- arch/arm64/boot/dts/amd/amd-overdrive-rev-b1.dts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit b03f15ee9881310cacfab1db0967598f88bfbb4d Author: Krzysztof Kozlowski Date: Thu May 26 22:37:14 2022 +0200 ARM: dts: sd: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526203714.831177-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/sd5203.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53f2ade4b0a36a38c3c29134586857d6db6f6dcb Author: Krzysztof Kozlowski Date: Thu May 26 22:36:31 2022 +0200 ARM: dts: sti: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20220526203632.831039-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/stih407-family.dtsi | 174 +++++++++++++++++----------------- arch/arm/boot/dts/stih407.dtsi | 4 +- arch/arm/boot/dts/stih410.dtsi | 4 +- arch/arm/boot/dts/stihxxx-b2120.dtsi | 8 +- 4 files changed, 95 insertions(+), 95 deletions(-) commit 282a4b9ee9ec8cf8c5e516d127b065318a376289 Author: Krzysztof Kozlowski Date: Thu May 26 22:36:56 2022 +0200 ARM: dts: ste: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526203656.831126-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/ste-ab8500.dtsi | 6 +++--- arch/arm/boot/dts/ste-hrefv60plus.dtsi | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit f30528c6b08a4e4b8e6a36ef10c1e7bc918bf6f0 Author: Krzysztof Kozlowski Date: Thu May 26 22:37:24 2022 +0200 ARM: dts: nuvoton: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526203724.831215-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 2 +- arch/arm/boot/dts/nuvoton-npcm750.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 468aaf56bd5fbd65686320121a6bcf6970ec3b10 Author: Krzysztof Kozlowski Date: Thu May 26 22:37:32 2022 +0200 ARM: dts: lpc: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526203732.831250-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/lpc18xx.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f2ff3feab43d81e1627b02b8a0ad9938dcbdc99 Author: Krzysztof Kozlowski Date: Thu May 26 22:37:58 2022 +0200 ARM: dts: ecx: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526203758.831301-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/ecx-common.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b3b0f459c2490e63106a86a3dfd3610d16184bfa Author: Krzysztof Kozlowski Date: Thu May 26 22:38:10 2022 +0200 ARM: dts: alpine: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526203810.831352-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/alpine.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 194f47c31ab6c37e4557eb60b382704296c10925 Author: Krzysztof Kozlowski Date: Thu May 26 22:38:15 2022 +0200 ARM: dts: spear: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20220526203815.831383-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/spear1310-evb.dts | 2 +- arch/arm/boot/dts/spear1340-evb.dts | 2 +- arch/arm/boot/dts/spear1340.dtsi | 2 +- arch/arm/boot/dts/spear300-evb.dts | 2 +- arch/arm/boot/dts/spear310-evb.dts | 2 +- arch/arm/boot/dts/spear320-evb.dts | 2 +- arch/arm/boot/dts/spear320-hmi.dts | 2 +- arch/arm/boot/dts/spear320.dtsi | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) commit 06e00a512d0a09760bef10621d4cdefc26777fad Author: Krzysztof Kozlowski Date: Thu May 26 22:41:00 2022 +0200 ARM: dts: axm: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526204100.831742-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/axm5516-cpus.dtsi | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit bc5187b427ddbfefd533178c7af6af9fa3a0490d Author: Krzysztof Kozlowski Date: Thu May 26 22:41:09 2022 +0200 ARM: dts: at91: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526204110.831805-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/at91-kizbox3-hs.dts | 2 +- arch/arm/boot/dts/at91-sam9x60ek.dts | 2 +- arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 2 +- arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 4 ++-- arch/arm/boot/dts/at91-sama5d27_wlsom1_ek.dts | 2 +- arch/arm/boot/dts/at91-sama5d2_icp.dts | 4 ++-- arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 6 +++--- arch/arm/boot/dts/at91-sama5d2_xplained.dts | 6 +++--- arch/arm/boot/dts/sam9x60.dtsi | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) commit 94d0a03297615cad2d40b0f02ceab902a7339062 Author: Krzysztof Kozlowski Date: Thu May 26 22:41:27 2022 +0200 ARM: dts: aspeed: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526204127.831853-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/aspeed-bmc-portwell-neptune.dts | 6 +++--- arch/arm/boot/dts/aspeed-bmc-quanta-s6q.dts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 4580f60b2337aa9f1da5a493adc5d609fe126185 Author: Krzysztof Kozlowski Date: Thu May 26 22:45:25 2022 +0200 ARM: dts: pxa: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526204525.832847-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/pxa300-raumfeld-common.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d36bdd77b9e6aa7f5cb7b0f11ebbab8e5febf10b Author: Ville Syrjälä Date: Mon Jun 13 23:14:39 2022 +0300 drm/i915: Implement w/a 22010492432 for adl-s adl-s needs the combo PLL DCO fraction w/a as well. Gets us slightly more accurate clock out of the PLL. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220613201439.23341-1-ville.syrjala@linux.intel.com Reviewed-by: Matt Roper drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4c72c06c367758a14f227c847f9d623f1994ecf Author: Xu Wang Date: Fri Dec 27 09:34:32 2019 +0000 i2c: Fix a potential use after free Free the adap structure only after we are done using it. This patch just moves the put_device() down a bit to avoid the use after free. Fixes: 611e12ea0f12 ("i2c: core: manage i2c bus device refcount in i2c_[get|put]_adapter") Signed-off-by: Xu Wang [wsa: added comment to the code, added Fixes tag] Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e210a89f5b07680fe21d21e846e6817346c5ba3b Author: Lin Feng Date: Thu Jun 16 18:38:30 2022 +0800 cgroup.c: add helper __cset_cgroup_from_root to cleanup duplicated codes No funtionality change, but save us some lines. Signed-off-by: Lin Feng Acked-by: Mukesh Ojha Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 58 +++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 31 deletions(-) commit 89793a61d8e7fcd6c161180d692201fcf2b2b48d Merge: f2906aa86338 5d0fbbbe1d87 Author: Palmer Dabbelt Date: Thu Jun 16 12:28:34 2022 -0700 RISC-V: Use the extension probing code to enable the FPU This pull the static key management code for the FPU into the generic ISA extension probing code, so it can be used by other extensions that need static keys. * 'riscv-static_key' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/palmer/linux: riscv: switch has_fpu() to the unified static key mechanism riscv: introduce unified static key mechanism for ISA extensions commit 7a710a8bc909313951eb9252d8419924c771d7c2 Author: Imre Deak Date: Tue Jun 14 12:45:37 2022 +0300 drm/dp/mst: Read the extended DPCD capabilities during system resume The WD22TB4 Thunderbolt dock at least will revert its DP_MAX_LINK_RATE from HBR3 to HBR2 after system suspend/resume if the DP_DP13_DPCD_REV registers are not read subsequently also as required. Fix this by reading DP_DP13_DPCD_REV registers as well, matching what is done during connector detection. While at it also fix up the same call in drm_dp_mst_dump_topology(). Cc: Lyude Paul Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5292 Signed-off-by: Imre Deak Reviewed-by: Jani Nikula Cc: # v5.14+ Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220614094537.885472-1-imre.deak@intel.com drivers/gpu/drm/display/drm_dp_mst_topology.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit ee774c40fa32e3b2642bb2533bc54662ea8445c2 Author: Wolfram Sang Date: Wed Jun 15 23:07:19 2022 +0200 dt-bindings: efm32: remove bindings for deleted platform Commit cc6111375cec ("ARM: drop efm32 platform") removed the platform, so no need to still carry the bindings. Signed-off-by: Wolfram Sang Acked-by: Mark Brown Acked-by: Stephen Boyd Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220615210720.6363-1-wsa@kernel.org .../devicetree/bindings/clock/efm32-clock.txt | 11 ------ .../devicetree/bindings/i2c/i2c-efm32.txt | 33 ----------------- .../devicetree/bindings/serial/efm32-uart.txt | 20 ---------- .../devicetree/bindings/spi/efm32-spi.txt | 39 -------------------- include/dt-bindings/clock/efm32-cmu.h | 43 ---------------------- 5 files changed, 146 deletions(-) commit b624c4d03760084988f4814b879b08c8c4d8169e Author: Wolfram Sang Date: Wed Jun 15 23:16:19 2022 +0200 dt-bindings: hwmon: move ibm,p8-occ bindings to proper folder It accidently ended up in i2c, but it should be in the hwmon folder. Signed-off-by: Wolfram Sang Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220615211619.6742-1-wsa@kernel.org Documentation/devicetree/bindings/{i2c => hwmon}/ibm,p8-occ-hwmon.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) commit 668c01baa7106bffec8d9ebc076609fc86bb208d Author: Stanislav Jakubek Date: Sat Jun 11 20:07:03 2022 +0200 dt-bindings: interrupt-controller: Convert rda,8810pl-intc to YAML Convert RDA Micro interrupt controller bindings to DT schema format. Signed-off-by: Stanislav Jakubek Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220611180703.GA24988@standask-GA-A55M-S2HP .../interrupt-controller/rda,8810pl-intc.txt | 61 ---------------------- .../interrupt-controller/rda,8810pl-intc.yaml | 43 +++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 44 insertions(+), 62 deletions(-) commit 5d0fbbbe1d8742bfef7a1123f5c9577396765aa3 Author: Jisheng Zhang Date: Sun May 22 23:35:43 2022 +0800 riscv: switch has_fpu() to the unified static key mechanism This is to use the unified static key mechanism instead of putting static key related here and there. Signed-off-by: Jisheng Zhang Reviewed-by: Atish Patra Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20220522153543.2656-3-jszhang@kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/switch_to.h | 4 ++-- arch/riscv/kernel/cpufeature.c | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) commit c360cbec351103f4539b2bf68e42c35d252849ab Author: Jisheng Zhang Date: Sun May 22 23:35:42 2022 +0800 riscv: introduce unified static key mechanism for ISA extensions Currently, riscv has several extensions which may not be supported on all riscv platforms, for example, FPU and so on. To support unified kernel Image style, we need to check whether the feature is supported or not. If the check sits at hot code path, then performance will be impacted a lot. static key can be used to solve the issue. In the past, FPU support has been converted to use static key mechanism. I believe we will have similar cases in the future. This patch tries to add an unified mechanism to use static keys for some ISA extensions by implementing an array of default-false static keys and enabling them when detected. Signed-off-by: Jisheng Zhang Reviewed-by: Atish Patra Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20220522153543.2656-2-jszhang@kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/hwcap.h | 25 +++++++++++++++++++++++++ arch/riscv/kernel/cpufeature.c | 7 +++++++ 2 files changed, 32 insertions(+) commit 686141bc02f2d1b668a12d32b5e02c7987228aff Merge: 1a685940e620 cdcdce948d64 Author: Leon Romanovsky Date: Thu Jun 16 20:09:11 2022 +0300 Merge branch 'mlx5-next' into wip/leon-for-next This merge commit includes shared updates to net-next and rdma-next for upcoming mlx5 features. 1) Updated HW bits and definitions for upcoming features 1.1) vport debug counters 1.2) flow meter 1.3) Execute ASO action for flow entry 1.4) enhanced CQE compression 2) Add ICM header-modify-pattern RDMA API Leon Says ========= SW steering manipulates packet's header using "modifying header" actions. Many of these actions do the same operation, but use different data each time. Currently we create and keep every one of these actions, which use expensive and limited resources. Now we introduce a new mechanism - pattern and argument, which splits a modifying action into two parts: 1. action pattern: contains the operations to be applied on packet's header, mainly set/add/copy of fields in the packet 2. action data/argument: contains the data to be used by each operation in the pattern. This way we reuse same patterns with different arguments to create new modifying actions, and since many actions share the same operations, we end up creating a small number of patterns that we keep in a dedicated cache. These modify header patterns are implemented as new type of ICM memory, so the following kernel patch series add the support for this new ICM type. ========== Link: https://lore.kernel.org/all/20220614184028.51548-1-saeed@kernel.org Signed-off-by: Leon Romanovsky commit 1a685940e6200e9def6e34bbaa19dd31dc5aeaf8 Author: Dongliang Mu Date: Thu Jun 9 15:06:56 2022 +0800 RDMA/rxe: fix xa_alloc_cycle() error return value check again Currently rxe_alloc checks ret to indicate error, but 1 is also a valid return and just indicates that the allocation succeeded with a wrap. Fix this by modifying the check to be < 0. Link: https://lore.kernel.org/r/20220609070656.1446121-1-dzm91@hust.edu.cn Fixes: 3225717f6dfa ("RDMA/rxe: Replace red-black trees by xarrays") Signed-off-by: Dongliang Mu Reviewed-by: Bob Pearson Signed-off-by: Leon Romanovsky drivers/infiniband/sw/rxe/rxe_pool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5a0e4529d9aee8ce348f628ad476c9ddb6cf457d Author: Frank Li Date: Tue May 24 10:21:52 2022 -0500 dmaengine: dw-edma: Remove unused irq field in struct dw_edma_chip The "irq" field of struct dw_edma_chip was never used. Remove it. Link: https://lore.kernel.org/r/20220524152159.2370739-2-Frank.Li@nxp.com Tested-by: Serge Semin Tested-by: Manivannan Sadhasivam Signed-off-by: Frank Li Signed-off-by: Bjorn Helgaas Reviewed-by: Serge Semin Reviewed-by: Manivannan Sadhasivam Acked-By: Vinod Koul drivers/dma/dw-edma/dw-edma-pcie.c | 1 - include/linux/dma/edma.h | 2 -- 2 files changed, 3 deletions(-) commit f7a03501b090f8c5f9ecb08420cda0b168667004 Author: Alexey Khoroshilov Date: Mon Jun 13 01:23:58 2022 +0300 dmaengine: stm32-mdma: Remove dead code in stm32_mdma_irq_handler() Local variable chan is initialized by an address of element of chan array that is part of stm32_mdma_device struct, so it does not make sense to compare chan with NULL. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Alexey Khoroshilov Fixes: a4ffb13c8946 ("dmaengine: Add STM32 MDMA driver") Reviewed-by: Amelie Delaunay Link: https://lore.kernel.org/r/1655072638-9103-1-git-send-email-khoroshilov@ispras.ru Signed-off-by: Vinod Koul drivers/dma/stm32-mdma.c | 5 ----- 1 file changed, 5 deletions(-) commit 5dc8638872ef0deeae1371a9e2d551920870f76a Author: Dave Jiang Date: Wed Jun 15 16:26:51 2022 -0700 MAINTAINERS: idxd driver maintainer update Add Fenghua as maintainer of the idxd driver. Signed-off-by: Fenghua Yu Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/20220615232651.177098-1-fenghua.yu@intel.com Signed-off-by: Vinod Koul MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ce4b461ba2c1247e0508995ff250f156b5310441 Author: Geert Uytterhoeven Date: Thu Jun 16 16:13:12 2022 +0200 dmaengine: apple-admac: Use {low,upp}er_32_bits() to split 64-bit address If CONFIG_PHYS_ADDR_T_64BIT is not set: drivers/dma/apple-admac.c: In function ‘admac_cyclic_write_one_desc’: drivers/dma/apple-admac.c:213:22: error: right shift count >= width of type [-Werror=shift-count-overflow] 213 | writel_relaxed(addr >> 32, ad->base + REG_DESC_WRITE(channo)); | ^~ Fix this by using the {low,upp}er_32_bits() helper macros to obtain the address parts. Reported-by: noreply@ellerman.id.au Fixes: b127315d9a78c011 ("dmaengine: apple-admac: Add Apple ADMAC driver") Acked-by: Martin Povišer Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20220616141312.1953819-1-geert@linux-m68k.org Signed-off-by: Vinod Koul drivers/dma/apple-admac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 81ce6f3dbbdce2785bba6e0b3c540793725c218d Author: Lukas Bulwahn Date: Mon Jun 13 13:03:26 2022 +0200 MAINTAINERS: add include/dt-bindings/dma to DMA GENERIC OFFLOAD ENGINE SUBSYSTEM Maintainers of the directory Documentation/devicetree/bindings/dma are also the maintainers of the corresponding directory include/dt-bindings/dma. Add the file entry for include/dt-bindings/dma to the appropriate section in MAINTAINERS. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220613110326.18126-1-lukas.bulwahn@gmail.com Signed-off-by: Vinod Koul MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 62c427ca0745d54c7b715923633ced3e34453722 Author: Rob Herring Date: Tue Jun 14 09:25:03 2022 -0600 dt-bindings: dma: apple,admac: Fix example interrupt parsing Commit 873971f8fb08 ("dt-bindings: dma: Add Apple ADMAC") has a warning in its example: Documentation/devicetree/bindings/dma/apple,admac.example.dtb: dma-controller@238200000: interrupts-extended: [[0], [4294967295, 0, 626, 4, 0, 0]] is too short From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/dma/apple,admac.yaml The problem is the number of interrupt cells can't be guessed when there are empty '0' entries. So the example must have a valid interrupt controller defining the number of interrupt cells. Fixes: 873971f8fb08 ("dt-bindings: dma: Add Apple ADMAC") Signed-off-by: Rob Herring Acked-by: Martin Povišer Link: https://lore.kernel.org/r/20220614152503.1410755-1-robh@kernel.org Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/apple,admac.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit 3f8ccf5f1a8c349364055b73caf1bb0314229976 Author: Nagasuresh Relli Date: Thu Jun 16 12:12:51 2022 +0530 riscv: dts: microchip: remove spi-max-frequency property Remove the spi-max-frequency property from the spi0 controller node as it is supposed to be a per SPI peripheral device property. Reported-by: Rob Herring Link: https://lore.kernel.org/lkml/20220526014141.2872567-1-robh@kernel.org/ Signed-off-by: Nagasuresh Relli Signed-off-by: Conor Dooley arch/riscv/boot/dts/microchip/mpfs.dtsi | 1 - 1 file changed, 1 deletion(-) commit c196175acdd3ab06114bde2955971bc7282f2b85 Author: Peng Fan Date: Thu Jun 9 21:29:02 2022 +0800 clk: imx: clk-fracn-gppll: Add more freq config for video pll Add the [484,498,445.3]MHz frequency support that will be used by video subsystem on imx93. Signed-off-by: Jacky Bai Signed-off-by: Peng Fan Reviewed-by: Ye Li Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20220609132902.3504651-8-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa drivers/clk/imx/clk-fracn-gppll.c | 3 +++ 1 file changed, 3 insertions(+) commit f300cb7fccf69ba1835b983c76d70deb818ad194 Author: Peng Fan Date: Thu Jun 9 21:29:01 2022 +0800 clk: imx: clk-fracn-gppll: correct rdiv According to Reference Manual: 000b - Divide by 1 001b - Divide by 1 010b - Divide by 2 011b - Divide by 3 100b - Divide by 4 101b - Divide by 5 110b - Divide by 6 111b - Divide by 7 So only need increase rdiv by 1 when the register value is 0. Fixes: 1b26cb8a77a4 ("clk: imx: support fracn gppll") Signed-off-by: Peng Fan Reviewed-by: Jacky Bai Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20220609132902.3504651-7-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa drivers/clk/imx/clk-fracn-gppll.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5ebaf9f7da5bb2dc56d394eabfcbe46dc6b1ea8d Author: Liu Ying Date: Thu Jun 9 21:29:00 2022 +0800 clk: imx: clk-fracn-gppll: Return rate in rate table properly in ->recalc_rate() The PLL parameters in rate table should be directly compared with those read from PLL registers instead of the cooked ones. Fixes: 1b26cb8a77a4 ("clk: imx: support fracn gppll") Cc: Abel Vesa Cc: Michael Turquette Cc: Stephen Boyd Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: Peng Fan Signed-off-by: Liu Ying Reviewed-by: Peng Fan Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20220609132902.3504651-6-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa drivers/clk/imx/clk-fracn-gppll.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 044034efbeea05f65c09d2ba15ceeab53b60e947 Author: Peng Fan Date: Thu Jun 9 21:28:59 2022 +0800 clk: imx: clk-fracn-gppll: fix mfd value According to spec: A value of 0 is disallowed and should not be programmed in this register Fix to 1. Fixes: 1b26cb8a77a4 ("clk: imx: support fracn gppll") Signed-off-by: Peng Fan Reviewed-by: Jacky Bai Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20220609132902.3504651-5-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa drivers/clk/imx/clk-fracn-gppll.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ebb4f1eb9360036be5ea70de82c5703ca0e64d43 Author: Jacky Bai Date: Thu Jun 9 21:28:58 2022 +0800 clk: imx93: Correct the edma1's parent clock For EDMA1 in AONMIX, its parent clock should be from cm33_root, so Correct it. Fixes: 24defbe194b65("clk: imx: add i.MX93 clk") Signed-off-by: Jacky Bai Signed-off-by: Peng Fan Reviewed-by: Peng Fan Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20220609132902.3504651-4-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa drivers/clk/imx/clk-imx93.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e3c837a663e9a12c4afabb3279d18cb5110a8f4 Author: Peng Fan Date: Thu Jun 9 21:28:57 2022 +0800 clk: imx93: correct nic_media parent NIC_MEDIA sources from media_axi_root, not media_apb_root. Fixes: 24defbe194b6 ("clk: imx: add i.MX93 clk") Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20220609132902.3504651-3-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa drivers/clk/imx/clk-imx93.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18d6d8fe4f24938985844d52c481b86fcce9d102 Author: Haibo Chen Date: Thu Jun 9 21:28:56 2022 +0800 clk: imx93: use adc_root as the parent clock of adc1 When debug, find after system boot up, all adc register operation will trigger system hang, this is because the internal adc ipg clock is gate off. In dts, only reference the IMX93_CLK_ADC1_GATE, which is adc1, no one touch the adc_root, so adc_root will be gate off automatically after system boot up. Fixes: 24defbe194b6 ("clk: imx: add i.MX93 clk") Signed-off-by: Haibo Chen Signed-off-by: Jacky Bai Signed-off-by: Peng Fan Reviewed-by: Peng Fan Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20220609132902.3504651-2-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa drivers/clk/imx/clk-imx93.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a50cc4955623685402ed6deeffad7df93591a416 Author: Ville Syrjälä Date: Wed Jun 15 18:14:45 2022 +0300 drm/i915/bios: Introduce panel_bits() and panel_bool() Abstract the bit extraction from the VBT per-panel bitfields slightly. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220615151445.8531-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_bios.c | 31 ++++++++++++++++++--------- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 3 --- 2 files changed, 21 insertions(+), 13 deletions(-) commit 5c9016b2ddb375662aff802d25c96f5483a4e024 Author: Ville Syrjälä Date: Wed Jun 15 18:14:44 2022 +0300 drm/i915/bios: Don't parse the DPS panel type when the VBT does not have it Older VBTs don't have all the stuff we've defined for the LVDS options block (40). In particular we're currently parsing the DPS panel type bits even though they may not exist, which could mean we end up flagging the machine as supporting static DRRS when the VBT declared no such thing. We don't actually have a clear idea which VBT versions have which bits so we rely on the block size instead. Here's a quick list from my VBT stash: mgm version 108 -> 4 bytes alv version 120 -> 4 bytes cst version 134 -> 14 bytes pnv version 144 -> 14 bytes cl version 142 -> 16 bytes ctg version 155 -> 24 bytes Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220615151445.8531-2-ville.syrjala@linux.intel.com Acked-by: Jani Nikula drivers/gpu/drm/i915/display/intel_bios.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0256ea13d169e9ef00ef1b1c9df395b1d6bad6f6 Author: Ville Syrjälä Date: Wed Jun 15 18:14:43 2022 +0300 drm/i915/bios: Move panel_type stuff out of parse_panel_options() Parsing the panel_type is a bit special and should be done before we parse anything else potentially panel-specific from the VBT. So move it out from parse_panel_options(). It doesn't neet to be there anyway since it'll do its own LVDS options block lookup. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220615151445.8531-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_bios.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit bf9719f8c89addcf1947ce2b29cea29ea9d8f875 Author: Ville Syrjälä Date: Thu Jun 16 12:55:30 2022 +0300 drm/i915: Remove bogus LPT iCLKIP WARN The WARN shouldn't have been added yet. For the moment the clock that gets passed here is just what the user has requested (via the modeline) and may not be exactly what iCLKIP can generate. Later on the plan is to change things so that we already get passed the exact clock here, at which point the WARN should be reintroduced. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6246 Fixes: 97708335b04d ("drm/i915: Introduce struct iclkip_params") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220616095530.15024-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_pch_refclk.c | 1 - 1 file changed, 1 deletion(-) commit 651d4a0fc4c5c6a2d20c95ef814f0d4381f71d55 Author: Ville Syrjälä Date: Wed Jun 15 20:48:51 2022 +0300 drm/i915: Sanitize underrun reporting before turning off any pipes Make sure FIFO underrun reporting is flagged as disabled very early during the state readout so that we don't get any spurious FIFO underruns reports from intel_crtc_disable_noatomic(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220615174851.20658-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b8fec4400923eb91f995d7dbe97411b8991ea559 Author: Ville Syrjälä Date: Wed Jun 15 20:48:50 2022 +0300 drm/i915: Extract intel_sanitize_fifo_underrun_reporting() Pull the underrun status sanitation into its own helper. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220615174851.20658-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display.c | 65 ++++++++++++++++------------ 1 file changed, 37 insertions(+), 28 deletions(-) commit d6346ae0779ef9a41562f5357ac28aa6a69b1c81 Author: Jouni Högander Date: Fri Jun 10 11:54:29 2022 +0300 drm/i915: Do not start connector polling on headless sku Connector polling is waking up the polled device. Polling is unnecessary if our device is known to not have display. Fix this and save some power by disabling starting connector polling when we are having headless sku. Use information from opregion. v2: Move headless sku check into INTEL_DISPLAY_ENABLED macro Signed-off-by: Jouni Högander Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220610085429.52935-4-jouni.hogander@intel.com drivers/gpu/drm/i915/i915_drv.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 04770b082e2a207804c633fbfd5efec28cbc5673 Author: Jouni Högander Date: Fri Jun 10 11:54:28 2022 +0300 drm/i915: Do not start connector polling if display is disabled Currently we are starting connector polling if display is disabled using disable_display module parameter. Polling is just returning always "not connected" state. This can be optimized by not starting polling at all. Signed-off-by: Jouni Högander Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220610085429.52935-3-jouni.hogander@intel.com drivers/gpu/drm/i915/display/intel_hotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eb2983c09f4e053f2c3362763f5e1073b5e4cd7d Author: Jouni Högander Date: Fri Jun 10 11:54:27 2022 +0300 drm/i915/opregion: add function to check if headless sku Export headless sku bit (bit 13) from opregion->header->pcon as an interface to check if our device is headless configuration. This is mainly targeted for hybrid gfx systems. E.g. when display is not supposed to be connected discrete graphics card it's opregion can inform this is headless graphics card. v3: Dummy version is now static inline function v2: Check also opregion version Bspec: 53441 Reviewed-by: Jani Nikula Signed-off-by: Jouni Högander Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220610085429.52935-2-jouni.hogander@intel.com drivers/gpu/drm/i915/display/intel_opregion.c | 14 ++++++++++++++ drivers/gpu/drm/i915/display/intel_opregion.h | 7 +++++++ 2 files changed, 21 insertions(+) commit 5dcb50c009c9f8ec1cfca6a81a05c0060a5bbf68 Merge: 8bca458990dd 7a8938cd024d Author: Paolo Abeni Date: Thu Jun 16 10:40:29 2022 +0200 Merge branch 'net-mana-add-pf-and-xdp_redirect-support' Haiyang Zhang says: ==================== net: mana: Add PF and XDP_REDIRECT support The patch set adds PF and XDP_REDIRECT support. ==================== Link: https://lore.kernel.org/r/1655238535-19257-1-git-send-email-haiyangz@microsoft.com Signed-off-by: Paolo Abeni commit 7a8938cd024d383c12bb1e08025db6ea3d551103 Author: Haiyang Zhang Date: Tue Jun 14 13:28:55 2022 -0700 net: mana: Add support of XDP_REDIRECT action Add a handler of the XDP_REDIRECT return code from a XDP program. The packets will be flushed at the end of each RX/CQ NAPI poll cycle. ndo_xdp_xmit() is implemented by sharing the code in mana_xdp_tx(). Ethtool per queue counters are added for XDP redirect and xmit operations. Signed-off-by: Haiyang Zhang Signed-off-by: Paolo Abeni drivers/net/ethernet/microsoft/mana/mana.h | 6 ++ drivers/net/ethernet/microsoft/mana/mana_bpf.c | 64 ++++++++++++++++++++++ drivers/net/ethernet/microsoft/mana/mana_en.c | 13 ++++- drivers/net/ethernet/microsoft/mana/mana_ethtool.c | 12 +++- 4 files changed, 93 insertions(+), 2 deletions(-) commit 1566e7d6206fed959258a17c694834a4b801a3b5 Author: Dexuan Cui Date: Tue Jun 14 13:28:54 2022 -0700 net: mana: Add the Linux MANA PF driver This minimal PF driver runs on bare metal. Currently Ethernet TX/RX works. SR-IOV management is not supported yet. Signed-off-by: Dexuan Cui Co-developed-by: Haiyang Zhang Signed-off-by: Haiyang Zhang Signed-off-by: Paolo Abeni drivers/net/ethernet/microsoft/mana/gdma.h | 10 ++ drivers/net/ethernet/microsoft/mana/gdma_main.c | 39 ++++++- drivers/net/ethernet/microsoft/mana/hw_channel.c | 18 ++- drivers/net/ethernet/microsoft/mana/hw_channel.h | 5 + drivers/net/ethernet/microsoft/mana/mana.h | 64 +++++++++++ drivers/net/ethernet/microsoft/mana/mana_en.c | 135 +++++++++++++++++++++++ 6 files changed, 267 insertions(+), 4 deletions(-) commit 2081ad1467469b649fc9f9226b235977a7bf9402 Author: Conor Dooley Date: Wed Jun 15 15:20:29 2022 +0100 spi: microchip-core: fix passing zero to PTR_ERR warning It is possible that the error case for devm_clk_get() returns NULL, in which case zero will be passed to PTR_ERR() as shown by the Smatch static checker warning: drivers/spi/spi-microchip-core.c:557 mchp_corespi_probe() warn: passing zero to 'PTR_ERR' Remove the NULL check and carry on with a dummy clock in case of an error. To avoid a potential div zero, abort calculating clkgen if clk_get_rate(spi->clk) is zero. Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers") Reported-by: Dan Carpenter Link: https://lore.kernel.org/linux-spi/20220615091633.GI2168@kadam/ Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220615142028.2991915-1-conor.dooley@microchip.com Signed-off-by: Mark Brown drivers/spi/spi-microchip-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2964e31cdda03fdff3b7c2f4f043e788e607987f Author: Peter Ujfalusi Date: Thu Jun 16 08:49:10 2022 +0300 ASoC: SOF: Intel: IPC4: enable IMR boot IPC4 based firmwares have unconditional support for IMR boot. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220616054910.16690-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-loader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1ec0c91f6d6b21703c17d5e89f32d52feac5887e Author: Colin Ian King Date: Tue Jun 14 19:38:09 2022 +0100 ASoC: Intel: Skylake: remove redundant re-assignments to pointer array There are two occurrences where the pointer array is being assigned a value that is never read, the pointer gets updated in the next iteration of a loop. These assignments are redundant and can be removed. Cleans up clang scan-build warnings: sound/soc/intel/skylake/skl-topology.c:2953:3: warning: Value stored to 'array' is never read [deadcode.DeadStores] sound/soc/intel/skylake/skl-topology.c:3602:3: warning: Value stored to 'array' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220614183809.163531-1-colin.i.king@gmail.com Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 6 ------ 1 file changed, 6 deletions(-) commit 7acf970a6fbb3c10bb5979d0dc3ed42b161daf15 Author: Dan Carpenter Date: Thu Jun 16 07:31:09 2022 +0300 ASoC: SOF: ipc4-topology: Fix error code in sof_ipc4_volume_put() The sof_ipc4_volume_put() function returns type bool so returning -ENOENT means returning true. Return false instead. Fixes: 955e84fc0b6d ("ASoC: SOF: ipc4-topology: Add control IO ops") Signed-off-by: Dan Carpenter Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/YqqyDU5BhOzpRjco@kili Signed-off-by: Mark Brown sound/soc/sof/ipc4-control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bca458990dd8c6d001b2fb52063aa18e8ca7444 Author: Christian Marangi Date: Tue Jun 14 13:22:28 2022 +0200 net: ethernet: stmmac: reset force speed bit for ipq806x Some bootloader may set the force speed regs even if the actual interface should use autonegotiation between PCS and PHY. This cause the complete malfuction of the interface. To fix this correctly reset the force speed regs if a fixed-link is not defined in the DTS. With a fixed-link node correctly configure the forced speed regs to handle any misconfiguration by the bootloader. Reported-by: Mark Mentovai Co-developed-by: Mark Mentovai Signed-off-by: Mark Mentovai Signed-off-by: Christian 'Ansuel' Marangi Link: https://lore.kernel.org/r/20220614112228.1998-2-ansuelsmth@gmail.com Signed-off-by: Paolo Abeni .../net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit 9ec092d2feb69045dd289845024301fb91c064ee Author: Christian Marangi Date: Tue Jun 14 13:22:27 2022 +0200 net: ethernet: stmmac: add missing sgmii configure for ipq806x The different gmacid require different configuration based on the soc and on the gmac id. Add these missing configuration taken from the original driver. Signed-off-by: Christian 'Ansuel' Marangi Link: https://lore.kernel.org/r/20220614112228.1998-1-ansuelsmth@gmail.com Signed-off-by: Paolo Abeni drivers/net/ethernet/stmicro/stmmac/Kconfig | 1 + .../net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 93 ++++++++++++++++++---- 2 files changed, 78 insertions(+), 16 deletions(-) commit 255584b138343d4a28c6d25bd82d04b09460d672 Author: Tony Lindgren Date: Wed Jun 15 09:43:06 2022 +0300 clk: ti: Stop using legacy clkctrl names for omap4 and 5 With the addition of clock-output-names, we can now unify the internal clock naming for omap4 and 5 to follow the other TI SoCs. We are still using legacy clkctrl names for omap4 and 5 based on the clock manager name which is wrong. Instead, we want to use the clkctrl clock based naming. We must now also drop the legacy TI_CLK_CLKCTRL_COMPAT quirk for the clkctrl clock. This change will allow further devicetree warning cleanup as already done for am3/4 and dra7. Cc: linux-clk@vger.kernel.org Cc: Stephen Boyd Cc: Tero Kristo Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20220615064306.22254-1-tony@atomide.com Signed-off-by: Stephen Boyd drivers/clk/ti/clk-44xx.c | 210 +++++++++++++++++++++++----------------------- drivers/clk/ti/clk-54xx.c | 160 +++++++++++++++++------------------ drivers/clk/ti/clkctrl.c | 4 - 3 files changed, 185 insertions(+), 189 deletions(-) commit 6da623684cdbe4532c55ed7f18b9b46badb730cd Author: Samuel Holland Date: Tue Jun 14 23:55:43 2022 -0500 drm/sun4i: sun8i-hdmi-phy: Group PHY ops functions by generation Now that the PHY ops are separated, sort them topologically, with the common sun8i_hdmi_phy_set_polarity helper at the top. No function contents are changed in this commit. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20220615045543.62813-7-samuel@sholland.org drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 67 ++++++++++++++++------------------ 1 file changed, 32 insertions(+), 35 deletions(-) commit ef2731e48b51857840f59d168d18d2f1e862b1b7 Author: Samuel Holland Date: Tue Jun 14 23:55:42 2022 -0500 drm/sun4i: sun8i-hdmi-phy: Separate A83T and H3 PHY ops Since the driver already needs to support multiple sets of ops, we can drop the mid-layer used by the A83T and H3 PHYs. They share only a small amount of code; factor this out as sun8i_hdmi_phy_set_polarity. For clarity, this commit keeps the existing function order. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20220615045543.62813-6-samuel@sholland.org drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h | 5 -- drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 89 ++++++++++++++++++---------------- 2 files changed, 46 insertions(+), 48 deletions(-) commit cdf3e5e15aa5dffcf39aa1f00ec3219510f10a22 Author: Samuel Holland Date: Tue Jun 14 23:55:41 2022 -0500 drm/sun4i: sun8i-hdmi-phy: Support multiple custom PHY ops The D1 SoC comes with a new custom HDMI PHY, which does not share any registers with the existing custom PHY. So it needs a new set of ops. Instead of providing a flag in the variant structure, provide the ops themselves. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20220615045543.62813-5-samuel@sholland.org drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h | 2 +- drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit 94c25fb1dfc38ab1c7f216a554621c9ad8bb4ecf Author: Samuel Holland Date: Tue Jun 14 23:55:40 2022 -0500 drm/sun4i: sun8i-hdmi-phy: Used device-managed clocks/resets Now that the HDMI PHY is using a platform driver, it can use device- managed resources. Use these, as well as the dev_err_probe helper, to simplify the probe function and get rid of the remove function. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20220615045543.62813-4-samuel@sholland.org drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 90 ++++++++++------------------------ 1 file changed, 26 insertions(+), 64 deletions(-) commit 719216eb51e9eaf4c8198d3a6704154477730e4a Author: Samuel Holland Date: Tue Jun 14 23:55:39 2022 -0500 drm/sun4i: sun8i-hdmi-phy: Use devm_platform_ioremap_resource The struct resource is not used for anything else, so we can simplify the code a bit by using the helper function. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20220615045543.62813-3-samuel@sholland.org drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 1a395a5604d8e2231d52108ced3d8ea0259ca607 Author: Samuel Holland Date: Tue Jun 14 23:55:38 2022 -0500 drm/sun4i: sun8i-hdmi-phy: Use of_device_get_match_data Now that the HDMI PHY is using a platform driver, we can use the usual helper function for getting the variant structure. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20220615045543.62813-2-samuel@sholland.org drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h | 2 +- drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) commit d56e336e8444970964b6e8d1bd4536f505256c41 Author: Robin Murphy Date: Wed Jun 8 12:46:33 2022 +0100 RDMA/usnic: Use device_iommu_capable() Use the new interface to check the capability for our device specifically. Link: https://lore.kernel.org/r/96ffe7050da0aa0ad6bce4705c3532f3ecaf32e3.1654688682.git.robin.murphy@arm.com Signed-off-by: Robin Murphy Signed-off-by: Leon Romanovsky drivers/infiniband/hw/usnic/usnic_uiom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 925d046e7e52c71c3531199ce137e141807ef740 Author: Patrisious Haddad Date: Tue Jun 7 14:32:44 2022 +0300 RDMA/core: Add a netevent notifier to cma Add a netevent callback for cma, mainly to catch NETEVENT_NEIGH_UPDATE. Previously, when a system with failover MAC mechanism change its MAC address during a CM connection attempt, the RDMA-CM would take a lot of time till it disconnects and timesout due to the incorrect MAC address. Now when we get a NETEVENT_NEIGH_UPDATE we check if it is due to a failover MAC change and if so, we instantly destroy the CM and notify the user in order to spare the unnecessary waiting for the timeout. Link: https://lore.kernel.org/r/bb255c9e301cd50b905663b8e73f7f5133d0e4c5.1654601342.git.leonro@nvidia.com Signed-off-by: Patrisious Haddad Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky drivers/infiniband/core/cma.c | 81 +++++++++++++++++++++++++++++++++++++++++++ include/rdma/rdma_cm.h | 1 + 2 files changed, 82 insertions(+) commit fc008bdbf1cd02e36bbfe53ea006b258335d908e Author: Patrisious Haddad Date: Tue Jun 7 14:32:43 2022 +0300 RDMA/core: Add an rb_tree that stores cm_ids sorted by ifindex and remote IP Add to the cma, a tree that keeps track of all rdma_id_private channels that were created while in RoCE mode. The IDs are sorted first according to their netdevice ifindex then their destination IP. And for IDs with matching IP they would be at the same node in the tree, since the tree data is a list of all ids with matching destination IP. The tree allows fast and efficient lookup of ids using an ifindex and IP address which is useful for identifying relevant net_events promptly. Link: https://lore.kernel.org/r/2fac52c86cc918c634ab24b3867d4aed992f54ec.1654601342.git.leonro@nvidia.com Signed-off-by: Patrisious Haddad Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky drivers/infiniband/core/cma.c | 149 ++++++++++++++++++++++++++++++++++--- drivers/infiniband/core/cma_priv.h | 1 + 2 files changed, 138 insertions(+), 12 deletions(-) commit cfbc80e34e3a905f5e89e7c0bc133a9507b05a28 Author: David Thompson Date: Tue Jun 14 17:26:02 2022 -0400 mlxbf_gige: remove own module name define and use KBUILD_MODNAME instead This patch adds use of KBUILD_MODNAME as defined by the build system, replacing the definition and use of a custom-defined name. Signed-off-by: David Thompson Signed-off-by: Asmaa Mnebhi Link: https://lore.kernel.org/r/20220614212602.28061-1-davthompson@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c0c87382c1a6985cd12a49a62a893361e5fd1b8f Author: Alex Deucher Date: Wed Jun 15 17:00:19 2022 -0400 drm/amdgpu/display: fix build when CONFIG_DEBUG_FS is not set amdgpu_dm_crtc_late_register() is only used when CONFIG_DEBUG_FS is enabled so make it dependent on that. Fixes: 4cd79f614b50 ("drm/amd/display: Move connector debugfs to drm") Cc: Bhanuprakash Modem Cc: Harry Wentland Cc: Arun R Murthy Cc: Jani Nikula Reported-by: Randy Dunlap Reported-by: Nathan Chancellor Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Tested-by: Nathan Chancellor # build Link: https://lists.freedesktop.org/archives/dri-devel/2022-June/359496.html Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20220615210019.28943-1-alexander.deucher@amd.com drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 68bde8b2e3112d2f1ac52cbf078905f902950146 Author: Uwe Kleine-König Date: Fri May 20 09:57:37 2022 +0200 clk: meson: axg-audio: Don't duplicate devm_clk_get_enabled() The clk API just got a function with a slightly different name and the same functionality. Remove the duplication. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220520075737.758761-5-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd drivers/clk/meson/axg-audio.c | 36 ++++-------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) commit 7ef9651e9792b08eb310c6beb202cbc947f43cab Author: Uwe Kleine-König Date: Fri May 20 09:57:36 2022 +0200 clk: Provide new devm_clk helpers for prepared and enabled clocks When a driver keeps a clock prepared (or enabled) during the whole lifetime of the driver, these helpers allow to simplify the drivers. Reviewed-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220520075737.758761-4-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd drivers/clk/clk-devres.c | 27 ++++++++++++ include/linux/clk.h | 109 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+) commit abae8e57e49aa75f6db76aa866c775721523908f Author: Uwe Kleine-König Date: Fri May 20 09:57:35 2022 +0200 clk: generalize devm_clk_get() a bit Allow to add an exit hook to devm managed clocks. Also use clk_get_optional() in devm_clk_get_optional instead of open coding it. The generalisation will be used in the next commit to add some more devm_clk helpers. Reviewed-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220520075737.758761-3-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd drivers/clk/clk-devres.c | 66 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 17 deletions(-) commit af89cd45603483135bdd238fcb3fa871155a0ae1 Author: Uwe Kleine-König Date: Fri May 20 09:57:34 2022 +0200 clk: Improve documentation for devm_clk_get() and its optional variant Make use of "Context:" and "Return:". Mention that the clk is not to be expected to be prepared, previously only not being enabled was mentioned which probably dates from the times when the concept of clk preparation wasn't invented yet. Also describe devm_clk_get_optional() fully instead of just referencing devm_clk_get(). Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220520075737.758761-2-u.kleine-koenig@pengutronix.de Reviewed-by: Russell King (Oracle) Signed-off-by: Stephen Boyd include/linux/clk.h | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 8b86f733c0e512f92e43a9db1559498ef64d244e Author: Krzysztof Kozlowski Date: Thu Jun 9 13:40:47 2022 +0200 ARM: dts: s5pv210: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220609114047.380793-9-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/s5pv210-fascinate4g.dts | 6 +++--- arch/arm/boot/dts/s5pv210-galaxys.dts | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) commit 97a9495efbdc5184930a75d36ca845d578e3ee1b Author: Krzysztof Kozlowski Date: Thu Jun 9 13:40:46 2022 +0200 ARM: dts: exynos: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220609114047.380793-8-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/exynos4210-i9100.dts | 8 ++++---- arch/arm/boot/dts/exynos4210-origen.dts | 10 +++++----- arch/arm/boot/dts/exynos4412-itop-elite.dts | 10 +++++----- arch/arm/boot/dts/exynos5250-arndale.dts | 12 ++++++------ arch/arm/boot/dts/exynos5250-snow-common.dtsi | 2 +- arch/arm/boot/dts/exynos5250-spring.dts | 2 +- arch/arm/boot/dts/exynos5420-arndale-octa.dts | 2 +- arch/arm/boot/dts/exynos5420-peach-pit.dts | 2 +- arch/arm/boot/dts/exynos5800-peach-pi.dts | 2 +- 9 files changed, 25 insertions(+), 25 deletions(-) commit de5bb43826dd5326ade7158fc45bca0b9c0d927d Author: Zhengchao Shao Date: Mon Jun 6 08:54:25 2022 +0800 samples/bpf: Check detach prog exist or not in xdp_fwd Before detach the prog, we should check detach prog exist or not. Signed-off-by: Zhengchao Shao Signed-off-by: Andrii Nakryiko Reviewed-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20220606005425.261967-1-shaozhengchao@huawei.com samples/bpf/xdp_fwd_user.c | 55 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 6 deletions(-) commit 3b3ec201f381d6cbd6caaa8bf6c37b74f2288bbc Author: Rex-BC Chen Date: Mon May 23 17:33:46 2022 +0800 clk: mediatek: reset: Add infra_ao reset support for MT8186 The infra_ao reset is needed for MT8186. - Add mtk_clk_rst_desc for MT8186. - Add register reset controller function for MT8186 infra_ao. - Add infra_ao_idx_map for MT8186. Signed-off-by: Rex-BC Chen Reviewed-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220523093346.28493-20-rex-bc.chen@mediatek.com Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt8186-infra_ao.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 2336db647f3140b2f24379d117a120c544e8760c Author: Rex-BC Chen Date: Mon May 23 17:33:45 2022 +0800 dt-bindings: arm: mediatek: Add #reset-cells property for MT8186 We will use the infra_ao reset which is defined in mt8186-sys-clock. The value of reset-cells is 1. Signed-off-by: Rex-BC Chen Acked-by: Rob Herring Reviewed-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220523093346.28493-19-rex-bc.chen@mediatek.com Signed-off-by: Stephen Boyd .../devicetree/bindings/arm/mediatek/mediatek,mt8186-sys-clock.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 5ea61b478f30c7083fc9048934220f20a3089782 Author: Rex-BC Chen Date: Mon May 23 17:33:44 2022 +0800 dt-bindings: reset: mediatek: Add infra_ao reset index for MT8186 To support reset of infra_ao, add the index of infra_ao reset of thermal/svs for MT8186. Signed-off-by: Rex-BC Chen Acked-by: Rob Herring Reviewed-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220523093346.28493-18-rex-bc.chen@mediatek.com Signed-off-by: Stephen Boyd include/dt-bindings/reset/mt8186-resets.h | 5 +++++ 1 file changed, 5 insertions(+) commit a0bc8ae5a0d7c79e376f400d989698194c6af7a1 Author: Rex-BC Chen Date: Mon May 23 17:33:41 2022 +0800 clk: mediatek: reset: Add infra_ao reset support for MT8192/MT8195 The infra_ao reset is needed for MT8192 and MT8195. - Add mtk_clk_rst_desc for MT8192 and MT8195 - Add register reset controller function for MT8192 infra_ao. - Move definition of infra reset from cl-mt8183.c to reset.h because it's the same definition with MT8192 and MT8195. - Add new definition of infra reset_4 for MT8192 and MT8195. - Add infra_ao_idx_map for MT8192 and MT8195. Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado [Nícolas: Test for MT8192] Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220523093346.28493-15-rex-bc.chen@mediatek.com Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt8183.c | 6 ------ drivers/clk/mediatek/clk-mt8192.c | 29 +++++++++++++++++++++++++++++ drivers/clk/mediatek/clk-mt8195-infra_ao.c | 24 ++++++++++++++++++++++++ drivers/clk/mediatek/reset.h | 7 +++++++ 4 files changed, 60 insertions(+), 6 deletions(-) commit fb91526b5fb04133799bc708661b467226caa032 Author: Rex-BC Chen Date: Mon May 23 17:33:40 2022 +0800 dt-bindings: reset: mediatek: Add infra_ao reset index for MT8192/MT8195 To support reset of infra_ao, add the index of infra_ao reset of thermal/svs/pcei for MT8192 and thermal/svs for MT8195. Signed-off-by: Rex-BC Chen Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado [Nícolas: Test for MT8192] Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220523093346.28493-14-rex-bc.chen@mediatek.com Signed-off-by: Stephen Boyd include/dt-bindings/reset/mt8192-resets.h | 8 ++++++++ include/dt-bindings/reset/mt8195-resets.h | 6 ++++++ 2 files changed, 14 insertions(+) commit 4d352eb91a42bf62a6560d7926bc5cdc98d010eb Author: Rex-BC Chen Date: Mon May 23 17:33:39 2022 +0800 dt-bindings: arm: mediatek: Add #reset-cells property for MT8192/MT8195 We will use the infra_ao reset which is defined in mt8192-sys-clock and mt8195-sys-clock. The value of reset-cells is 1. Signed-off-by: Rex-BC Chen Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220523093346.28493-13-rex-bc.chen@mediatek.com Signed-off-by: Stephen Boyd .../devicetree/bindings/arm/mediatek/mediatek,mt8192-sys-clock.yaml | 3 +++ .../devicetree/bindings/arm/mediatek/mediatek,mt8195-sys-clock.yaml | 3 +++ 2 files changed, 6 insertions(+) commit b27a604a5793100e17b4979df08fcc238cac4c9c Author: Rex-BC Chen Date: Mon May 23 17:33:38 2022 +0800 clk: mediatek: reset: Add reset support for simple probe - Add a pointer of "mtk_clk_rst_desc" to "mtk_clk_desc". - Add register reset with device function in mtk_clk_simple_probe(). Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220523093346.28493-12-rex-bc.chen@mediatek.com Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mtk.c | 7 +++++++ drivers/clk/mediatek/clk-mtk.h | 1 + 2 files changed, 8 insertions(+) commit 761bc64003e38119ce4687424ef56de3976fe26c Author: Rex-BC Chen Date: Mon May 23 17:33:37 2022 +0800 clk: mediatek: reset: Add new register reset function with device Using device to register reset controller is a better implementation in current drivers. Howerver, some clock drviers of MediaTek only provide device_node. Therefore, we still remain the register reset function with device_node and add a new function with device to register reset controller. Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220523093346.28493-11-rex-bc.chen@mediatek.com Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt2701-eth.c | 2 +- drivers/clk/mediatek/clk-mt2701-g3d.c | 2 +- drivers/clk/mediatek/clk-mt2701-hif.c | 2 +- drivers/clk/mediatek/clk-mt2701.c | 4 +-- drivers/clk/mediatek/clk-mt2712.c | 4 +-- drivers/clk/mediatek/clk-mt7622-eth.c | 2 +- drivers/clk/mediatek/clk-mt7622-hif.c | 4 +-- drivers/clk/mediatek/clk-mt7622.c | 4 +-- drivers/clk/mediatek/clk-mt7629-eth.c | 2 +- drivers/clk/mediatek/clk-mt7629-hif.c | 4 +-- drivers/clk/mediatek/clk-mt8183.c | 2 +- drivers/clk/mediatek/reset.c | 60 +++++++++++++++++++++++++++++++++++ drivers/clk/mediatek/reset.h | 10 ++++++ 13 files changed, 86 insertions(+), 16 deletions(-) commit 7d10ae3797e1aea48d7635685d3b9c3bdf2bc56e Author: Rex-BC Chen Date: Mon May 23 17:33:36 2022 +0800 clk: mediatek: reset: Change return type for clock reset register function To deal with error handling, we change the function return type from void to int for mtk_clk_register_rst_ctrl(). Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220523093346.28493-10-rex-bc.chen@mediatek.com Signed-off-by: Stephen Boyd drivers/clk/mediatek/reset.c | 15 +++++++++------ drivers/clk/mediatek/reset.h | 6 ++++-- 2 files changed, 13 insertions(+), 8 deletions(-) commit 322989ddf7c478a9cbbb51da0d4b51825a47735d Author: Rex-BC Chen Date: Mon May 23 17:33:35 2022 +0800 clk: mediatek: reset: Support inuput argument index mode There is a large number of mediatek infra reset bits, but we do not use all of them. In addition, the proper input argement of reset controller soulde be index. Therefore, to be compatible with previous drivers and usage, we add description variables to store the ids which can mapping to index. To use this mode, we need to put the id in rst_idx_map to map from index to ids. For example, if we want to input index 1 (this index is used to set bank 1 bit 14) for svs, we need to declare the reset controller like this: In drivers: static u16 rst_ofs[] = { 0x120, 0x130, 0x140, 0x150, 0x730, }; static u16 rst_idx_map[] = { 0 * 32 + 0, 1 * 32 + 14, .... }; static const struct mtk_clk_rst_desc clk_rst_desc = { .version = MTK_RST_SET_CLR, .rst_bank_ofs = rst_ofs, .rst_bank_nr = ARRAY_SIZE(rst_ofs), .rst_idx_map = rst_idx_map, .rst_idx_map_nr = ARRAY_SIZE(rst_idx_map), }; In dts: svs: { ... resets = <&infra 1>; ... }; Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220523093346.28493-9-rex-bc.chen@mediatek.com Signed-off-by: Stephen Boyd drivers/clk/mediatek/reset.c | 21 ++++++++++++++++++++- drivers/clk/mediatek/reset.h | 5 +++++ 2 files changed, 25 insertions(+), 1 deletion(-) commit 723e367114dec95abe8bba4118c4c7c3542a463f Author: Rex-BC Chen Date: Mon May 23 17:33:34 2022 +0800 clk: mediatek: reset: Support nonsequence base offsets of reset registers The bank offsets are not serial for all reset registers. For example, there are five infra reset banks for MT8192: 0x120, 0x130, 0x140, 0x150 and 0x730. To support this, - Change reg_ofs to rst_bank_ofs which is a pointer to base offsets of the reset register. - Add a new define RST_NR_PER_BANK to define reset number for each reset bank. Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220523093346.28493-8-rex-bc.chen@mediatek.com Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt2701-eth.c | 6 ++++-- drivers/clk/mediatek/clk-mt2701-g3d.c | 6 ++++-- drivers/clk/mediatek/clk-mt2701-hif.c | 6 ++++-- drivers/clk/mediatek/clk-mt2701.c | 11 +++++++---- drivers/clk/mediatek/clk-mt2712.c | 11 +++++++---- drivers/clk/mediatek/clk-mt7622-eth.c | 6 ++++-- drivers/clk/mediatek/clk-mt7622-hif.c | 6 ++++-- drivers/clk/mediatek/clk-mt7622.c | 11 +++++++---- drivers/clk/mediatek/clk-mt7629-eth.c | 6 ++++-- drivers/clk/mediatek/clk-mt7629-hif.c | 6 ++++-- drivers/clk/mediatek/clk-mt8135.c | 11 +++++++---- drivers/clk/mediatek/clk-mt8173.c | 11 +++++++---- drivers/clk/mediatek/clk-mt8183.c | 14 ++++++++++++-- drivers/clk/mediatek/reset.c | 11 ++++++----- drivers/clk/mediatek/reset.h | 6 ++++-- 15 files changed, 85 insertions(+), 43 deletions(-) commit 2d2a2900588cabe2ff3abd552d1683e5f1ce398b Author: Rex-BC Chen Date: Mon May 23 17:33:33 2022 +0800 clk: mediatek: reset: Revise structure to control reset register To declare the reset data easier, we add a strucure to do this instead of using many input variables to mtk_register_reset_controller(). - Add mtk_clk_rst_desc to define the reset description when registering the reset controller. - Rename "mtk_reset" to "mtk_clk_rst_data". We use it to store data of reset controller. - Document mtk_clk_rst_desc and mtk_clk_rst_data. - Modify the documentation of mtk_register_reset_controller. - Extract container_of in update functions to to_mtk_clk_rst_data(). Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220523093346.28493-7-rex-bc.chen@mediatek.com Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt2701-eth.c | 8 +++++++- drivers/clk/mediatek/clk-mt2701-g3d.c | 8 +++++++- drivers/clk/mediatek/clk-mt2701-hif.c | 8 +++++++- drivers/clk/mediatek/clk-mt2701.c | 19 +++++++++++++++++-- drivers/clk/mediatek/clk-mt2712.c | 19 +++++++++++++++++-- drivers/clk/mediatek/clk-mt7622-eth.c | 8 +++++++- drivers/clk/mediatek/clk-mt7622-hif.c | 10 ++++++++-- drivers/clk/mediatek/clk-mt7622.c | 19 +++++++++++++++++-- drivers/clk/mediatek/clk-mt7629-eth.c | 8 +++++++- drivers/clk/mediatek/clk-mt7629-hif.c | 10 ++++++++-- drivers/clk/mediatek/clk-mt8135.c | 19 +++++++++++++++++-- drivers/clk/mediatek/clk-mt8173.c | 19 +++++++++++++++++-- drivers/clk/mediatek/clk-mt8183.c | 9 +++++++-- drivers/clk/mediatek/reset.c | 33 +++++++++++++++++++++------------ drivers/clk/mediatek/reset.h | 29 ++++++++++++++++++++++------- 15 files changed, 186 insertions(+), 40 deletions(-) commit 370bf62869695003c2994d3d98769ccde6b26083 Author: Rex-BC Chen Date: Mon May 23 17:33:32 2022 +0800 clk: mediatek: reset: Merge and revise reset register function There are two versions for clock reset register control for MediaTek SoCs. The old hardware is one bit per reset control, and does not have separate registers for bit set, clear and read-back operations. This matches the scheme supported by the simple reset driver. However, because we need to use different data structure from reset_simple_data, we can not use the operation of simple reset driver. For this reason, we keep the original functions and name this version as "MTK_RST_SIMPLE". In this patch: - Add a version enumeration to separate different reset hardware. - Merge the reset register function of simple and set_clr into one function "mtk_register_reset_controller". - Rename input variable "num_regs" to "rst_bank_nr" to avoid confusion. This variable is used to define the quantity of reset bank. - Document mtk_reset_version and mtk_register_reset_controller. Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220523093346.28493-6-rex-bc.chen@mediatek.com Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt2701-eth.c | 2 +- drivers/clk/mediatek/clk-mt2701-g3d.c | 2 +- drivers/clk/mediatek/clk-mt2701-hif.c | 2 +- drivers/clk/mediatek/clk-mt2701.c | 4 ++-- drivers/clk/mediatek/clk-mt2712.c | 4 ++-- drivers/clk/mediatek/clk-mt7622-eth.c | 2 +- drivers/clk/mediatek/clk-mt7622-hif.c | 4 ++-- drivers/clk/mediatek/clk-mt7622.c | 4 ++-- drivers/clk/mediatek/clk-mt7629-eth.c | 2 +- drivers/clk/mediatek/clk-mt7629-hif.c | 4 ++-- drivers/clk/mediatek/clk-mt8135.c | 4 ++-- drivers/clk/mediatek/clk-mt8173.c | 4 ++-- drivers/clk/mediatek/clk-mt8183.c | 3 ++- drivers/clk/mediatek/reset.c | 41 ++++++++++++++++------------------- drivers/clk/mediatek/reset.h | 25 +++++++++++++++++---- 15 files changed, 61 insertions(+), 46 deletions(-) commit 114257572a0e0d93f770894b9824793901d1fae7 Author: Rex-BC Chen Date: Mon May 23 17:33:31 2022 +0800 clk: mediatek: reset: Extract common drivers to update function To make drivers more clear and readable, we extract common code within assert and deassert to mtk_reset_update_set_clr() and mtk_reset_update(). Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220523093346.28493-5-rex-bc.chen@mediatek.com Signed-off-by: Stephen Boyd drivers/clk/mediatek/reset.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) commit 086bcb50b4350eb959812290f5a8676ae940ab70 Author: Rex-BC Chen Date: Mon May 23 17:33:30 2022 +0800 clk: mediatek: reset: Refine and reorder functions in reset.c To make drivers more readable, we modify the indentation of the drivers and reorder the location of functions. Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220523093346.28493-4-rex-bc.chen@mediatek.com Signed-off-by: Stephen Boyd drivers/clk/mediatek/reset.c | 68 +++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 32 deletions(-) commit edabcf71d100fd433a0fc2d0c97057c446c33b2a Author: Rex-BC Chen Date: Mon May 23 17:33:29 2022 +0800 clk: mediatek: reset: Fix written reset bit offset Original assert/deassert bit is BIT(0), but it's more resonable to modify them to BIT(id % 32) which is based on id. This patch will not influence any previous driver because the reset is only used for thermal. The id (MT8183_INFRACFG_AO_THERM_SW_RST) is 0. Fixes: 64ebb57a3df6 ("clk: reset: Modify reset-controller driver") Signed-off-by: Rex-BC Chen Reviewed-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220523093346.28493-3-rex-bc.chen@mediatek.com Signed-off-by: Stephen Boyd drivers/clk/mediatek/reset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b348c26c28a96d15f832974c5b54a3d6bbe4e7d8 Author: Rex-BC Chen Date: Mon May 23 17:33:28 2022 +0800 clk: mediatek: reset: Add reset.h Add a new file "reset.h" to place some definitions for clock reset. Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220523093346.28493-2-rex-bc.chen@mediatek.com Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mtk.h | 8 ++------ drivers/clk/mediatek/reset.c | 9 +-------- drivers/clk/mediatek/reset.h | 24 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 14 deletions(-) commit 9cf0b618599487f456ef5596dd30b5c162291e3c Author: Joe Simmons-Talbott Date: Wed Jun 1 14:54:14 2022 -0400 iio: Use octal permissions and DEVICE_ATTR_{RO,RW}. As reported by checkpatch.pl. Where possible use DEVICE_ATTR_RO(), DEVICE_ATTR_RW(), and __ATTR_RO(). Change function names to be _show() for read and _store() for write. Suggested-by: Joe Perches Suggested-by: Andy Shevchenko Signed-off-by: Joe Simmons-Talbott Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220601185414.251571-1-joetalbott@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/industrialio-buffer.c | 56 ++++++++++++++------------------------ drivers/iio/industrialio-core.c | 33 ++++++++++------------ drivers/iio/industrialio-trigger.c | 29 ++++++++------------ 3 files changed, 48 insertions(+), 70 deletions(-) commit 79b584ed12a08392baa4c498be1396c504b1e071 Author: Andy Shevchenko Date: Fri Jun 3 13:00:04 2022 +0300 iio: adc: meson_saradc: Use regmap_read_poll_timeout() for busy wait Simplify busy wait stages by using regmap_read_poll_timeout(). Signed-off-by: Andy Shevchenko Reviewed-by: Martin Blumenstingl Tested-by: Martin Blumenstingl # GXM VIM2 Link: https://lore.kernel.org/r/20220603100004.70336-6-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/adc/meson_saradc.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) commit 22c26db48c19a48c1ee6919e70feda314e596c10 Author: Andy Shevchenko Date: Fri Jun 3 13:00:03 2022 +0300 iio: adc: meson_saradc: Use temporary variable for struct device Use temporary variable for struct device to make code neater. Signed-off-by: Andy Shevchenko Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20220603100004.70336-5-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/adc/meson_saradc.c | 53 ++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 31 deletions(-) commit 6531f3a41fe890fd633dd132cd69878b4d699fcc Author: Andy Shevchenko Date: Fri Jun 3 13:00:02 2022 +0300 iio: adc: meson_saradc: Use devm_clk_get_optional() Replace open coded variants of devm_clk_get_optional(). Signed-off-by: Andy Shevchenko Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20220603100004.70336-4-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/adc/meson_saradc.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit 2d27a021395e200b13d55ad29c34ec62a8ba1c60 Author: Andy Shevchenko Date: Fri Jun 3 13:00:01 2022 +0300 iio: adc: meson_saradc: Convert to use dev_err_probe() It's fine to call dev_err_probe() in ->probe() when error code is known. Convert the driver to use dev_err_probe(). Signed-off-by: Andy Shevchenko Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20220603100004.70336-3-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/adc/meson_saradc.c | 52 +++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 33 deletions(-) commit d43c7006e49580bae62a05301a689477ad9e6c31 Author: Andy Shevchenko Date: Fri Jun 3 13:00:00 2022 +0300 iio: adc: meson_saradc: Align messages to be with physical device prefix Align messages to be printed with the physical device prefix as it's done everywhere else in this driver. Signed-off-by: Andy Shevchenko Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20220603100004.70336-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/adc/meson_saradc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit ec25bb6e84a090da9c5c397c8af962dcb2e1c664 Author: Andy Shevchenko Date: Fri Jun 3 12:59:59 2022 +0300 iio: adc: meson_saradc: Don't attach managed resource to IIO device object It feels wrong and actually inconsistent to attach managed resources to the IIO device object, which is child of the physical device object. The rest of the ->probe() calls do that against physical device. Resolve this by reassigning managed resources to the physical device object. Suggested-by: Lars-Peter Clausen Signed-off-by: Andy Shevchenko Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20220603100004.70336-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/adc/meson_saradc.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 5a3ec28adafd2d1055162e52d2cb4d37a8391615 Author: Andy Shevchenko Date: Mon May 30 21:09:10 2022 +0300 iio: adc: sc27xx_adc: Re-use generic struct u32_fract Instead of a pair of u32 re-use generic struct u32_fract. No functional changes intended. Signed-off-by: Andy Shevchenko Acked-by: Cixi Geng Link: https://lore.kernel.org/r/20220530180910.2533-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/adc/sc27xx_adc.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 754d013433bc7cf4677223ccd8dcbeb2a09c9982 Author: Paul Cercueil Date: Mon Jan 17 10:25:12 2022 +0000 iio: at91-sama5d2: Limit requested watermark value to hwfifo size Instead of returning an error if the watermark value is too high, which the core will silently ignore anyway, limit the value to the hardware FIFO size; a lower-than-requested value is still better than using the default, which is usually 1. Cc: Eugen Hristev Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20220117102512.31725-2-paul@crapouillou.net Signed-off-by: Jonathan Cameron drivers/iio/adc/at91-sama5d2_adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e5b4cd2e9c0b1bd426bda633677eb870327faf5 Author: Paul Cercueil Date: Mon Jan 17 10:25:11 2022 +0000 iio: imu: st_lsm6dsx: Limit requested watermark value to hwfifo size Instead of returning an error if the watermark value is too high, which the core will silently ignore anyway, limit the value to the hardware FIFO size; a lower-than-requested value is still better than using the default, which is usually 1. Cc: Lorenzo Bianconi Signed-off-by: Paul Cercueil Acked-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/20220117102512.31725-1-paul@crapouillou.net Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2b059449b5a3d24cc3ce760f90a15a0e3052af25 Author: Jonathan Cameron Date: Sat Jun 4 17:12:23 2022 +0100 iio: imu: lsm6dsx: Move exported symbols to the IIO_LSM6DSX namespace Avoid unnecessary pollution of the global symbol namespace by moving library functions in to a specific namespace and import that into the drivers that make use of the functions. For more info: https://lwn.net/Articles/760045/ Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220220181522.541718-9-jic23@kernel.org Acked-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/20220604161223.461847-6-jic23@kernel.org drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 6 +++--- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 1 + drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.c | 1 + drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) commit acc416ff7d405d9d3a8c90b3a78a0fb87f2979eb Author: Jonathan Cameron Date: Sat Jun 4 17:12:22 2022 +0100 iio: imu: lsm6dsx: Use new pm_sleep_ptr() and EXPORT_SIMPLE_DEV_PM_OPS() These new functions move the burden of removing unused code when CONFIG_PM_SLEEP is not defined onto the compiler rather than requiring the use of CONFIG_PM guards and similar. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220220181522.541718-8-jic23@kernel.org Acked-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/20220604161223.461847-5-jic23@kernel.org drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 10 ++++------ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) commit 1300ab3927184bf871a5c6b3ceb30454a4498800 Author: Jonathan Cameron Date: Sat Jun 4 17:12:21 2022 +0100 iio: humidity: hts221: Move symbol exports into IIO_HTS221 namespace Avoid unnecessary pollution of the global symbol namespace by moving library functions in to a specific namespace and import that into the drivers that make use of the functions. For more info: https://lwn.net/Articles/760045/ Signed-off-by: Jonathan Cameron Cc: Lorenzo Bianconi Link: https://lore.kernel.org/r/20220220181522.541718-7-jic23@kernel.org Acked-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/20220604161223.461847-4-jic23@kernel.org drivers/iio/humidity/hts221_core.c | 5 +++-- drivers/iio/humidity/hts221_i2c.c | 1 + drivers/iio/humidity/hts221_spi.c | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) commit 2129f25de5821677728689cabf01d74bc9c042cc Author: Jonathan Cameron Date: Sat Jun 4 17:12:20 2022 +0100 iio: humidity: hts221: Use EXPORT_SIMPLE_DEV_PM_OPS() to allow compiler to remove dead code. If CONFIG_PM_SLEEP is not defined using EXPORT_SIMPLE_DEV_PM_OPS() in conjunction with pm_sleep_ptr() allows the compiler to remove the unused code and data. This removes the need for __maybe_unused markings etc. Signed-off-by: Jonathan Cameron Cc: Lorenzo Bianconi Link: https://lore.kernel.org/r/20220220181522.541718-6-jic23@kernel.org Acked-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/20220604161223.461847-3-jic23@kernel.org drivers/iio/humidity/hts221_core.c | 9 +++------ drivers/iio/humidity/hts221_i2c.c | 2 +- drivers/iio/humidity/hts221_spi.c | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) commit cb490b10c3fdd3d700e379d8be8b8d7e4662cff2 Author: Jonathan Cameron Date: Sat Jun 4 17:12:19 2022 +0100 iio:accel:kxsd9: Switch from CONFIG_PM guards to pm_ptr() etc Letting the compiler remove these functions when the kernel is built without CONFIG_PM support is simpler and less error prone than the use of #ifdef based config guards. Removing instances of this approach from IIO also stops them being copied into new drivers. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220220181522.541718-5-jic23@kernel.org Link: https://lore.kernel.org/r/20220604161223.461847-2-jic23@kernel.org drivers/iio/accel/kxsd9-i2c.c | 2 +- drivers/iio/accel/kxsd9-spi.c | 2 +- drivers/iio/accel/kxsd9.c | 11 ++--------- 3 files changed, 4 insertions(+), 11 deletions(-) commit 10f09307199da274584b8170a41228ca6dfed6d3 Author: Nuno Sá Date: Fri Jun 10 10:45:30 2022 +0200 iio: core: drop of.h from iio.h There is no reason to include OF as we only need to forward declare 'of_phandle_args'. Previously, some drivers were actually relying on this for some headers (those were already fixed). Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-20-nuno.sa@analog.com Signed-off-by: Jonathan Cameron include/linux/iio/iio.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bf49a46b6d8b87c5b9c28692d1c66d911b1b73a2 Author: Andy Shevchenko Date: Wed Jun 15 15:08:03 2022 +0300 iio: adc: intel_mrfld_adc: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Andy Shevchenko Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20220615120803.41350-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/adc/intel_mrfld_adc.c | 1 + 1 file changed, 1 insertion(+) commit 4dc1372ffb82c5f08ada7b9cb75a04dcfe49cd96 Author: Yicong Yang Date: Fri Jun 10 15:51:06 2022 +0800 i2c: hisi: use HZ_PER_KHZ macro in units.h HZ macros has been centralized in units.h since [1]. Use it to avoid duplicated definition. [1] commit e2c77032fcbe ("units: add the HZ macros") Signed-off-by: Yicong Yang Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-hisi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 28fc842e14729df641326b4deb3aa275ca648fce Author: Jianjun Wang Date: Tue Mar 29 11:07:15 2022 +0800 PCI: mediatek-gen3: Print LTSSM state when PCIe link down Print current LTSSM state when PCIe link down instead of the register value to make it easier to get the link status. Link: https://lore.kernel.org/r/20220329030715.7975-1-jianjun.wang@mediatek.com Signed-off-by: Jianjun Wang Signed-off-by: Bjorn Helgaas Reviewed-by: AngeloGioacchino Del Regno drivers/pci/controller/pcie-mediatek-gen3.c | 41 ++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) commit 4c0ad47b8da5898115fc17c5bb0e538348531a39 Author: Matti Lehtimäki Date: Sun May 22 18:27:58 2022 +0200 i2c: qcom-cci: add msm8974 compatible MSM8974 CCI is the same as MSM8916 except it has two masters. Signed-off-by: Matti Lehtimäki Signed-off-by: Luca Weiss Reviewed-by: Loic Poulain Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qcom-cci.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 3fe012f482b2beaefe158c2288afce5f5919301b Author: Luca Weiss Date: Sun May 22 18:27:57 2022 +0200 dt-bindings: i2c: qcom-cci: add QCOM MSM8974 compatible Add the compatible for the CCI found in MSM8974 which supports two I2C masters. Signed-off-by: Luca Weiss Acked-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-qcom-cci.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 1556c3b4c7ed2c8f17f200d53897251fc68b7377 Author: Matt Roper Date: Mon Jun 13 09:53:14 2022 -0700 drm/i915/pvc: Add recommended MMIO setting As with past platforms, the bspec's performance tuning guide provides recommended MMIO settings. Although not technically "workarounds" we apply these through the workaround framework to ensure that they're re-applied at the proper times (e.g., on engine resets) and that any conflicts with real workarounds are flagged. Bspec: 72161 Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20220613165314.862029-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 5 +++++ drivers/gpu/drm/i915/gt/intel_workarounds.c | 9 +++++++++ 2 files changed, 14 insertions(+) commit f7a20d9079c71c2299ff5c007614d6a04fecf7a0 Author: William Zhang Date: Thu Jun 9 17:15:34 2022 -0700 MAINTAINERS: Add BCM6813 to bcmbca arch entry Add BCM6813 related files to BCMBCA ARCH maintainer list entry Signed-off-by: William Zhang Signed-off-by: Florian Fainelli MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit eab6bb0994b806525fc5e362e8b865f61c4a9e20 Author: William Zhang Date: Thu Jun 9 17:15:33 2022 -0700 arm64: dts: Add DTS files for bcmbca SoC BCM6813 Add DTS for ARMv8 based broadband SoC BCM6813. bcm6813.dtsi is the SoC description DTS header and bcm96813.dts is a simple DTS file for Broadcom BCM96813 Reference board that only enable the UART port. Signed-off-by: William Zhang Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 3 +- arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi | 128 +++++++++++++++++++++++ arch/arm64/boot/dts/broadcom/bcmbca/bcm96813.dts | 30 ++++++ 3 files changed, 160 insertions(+), 1 deletion(-) commit c5eb8a89f5617474458df2cc43f2ee2fde312c92 Author: William Zhang Date: Thu Jun 9 17:15:32 2022 -0700 dt-bindings: arm64: Add BCM6813 SoC Add BCM6813 SoC device tree description to bcmbca binding document. Signed-off-by: William Zhang Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 0f95ee9a0c579ebed0309657f6918673927189f2 Merge: b13baccc3850 dfa687bffc8a Author: Daniel Vetter Date: Wed Jun 15 19:12:17 2022 +0200 Merge tag 'drm-misc-next-2022-06-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.20: UAPI Changes: * connector: export bpc limits in debugfs * dma-buf: Print buffer name in debugfs Cross-subsystem Changes: * dma-buf: Improve dma-fence handling; Cleanups * fbdev: Device-unregistering fixes Core Changes: * client: Only use driver-validated modes to avoid blank screen * dp-aux: Make probing more reliable; Small fixes * edit: CEA data-block iterators; Introduce struct drm_edid; Many cleanups * gem: Don't use framebuffer format's non-exising color planes * probe-helper: Use 640x480 as DisplayPort fallback; Refactoring * scheduler: Don't kill jobs in interrupt context Driver Changes: * amdgpu: Use atomic fence helpers in DM; Fix VRAM address calculation; Export CRTC bpc settings via debugfs * bridge: Add TI-DLPC3433; anx7625: Fixes; fy07024di26a30d: Optional GPIO reset; icn6211: Cleanups; ldb: Add reg and reg-name properties to bindings, Kconfig fixes; lt9611: Fix display sensing; lt9611uxc: Fixes; nwl-dsi: Fixes; ps8640: Cleanups; st7735r: Fixes; tc358767: DSI/DPI refactoring and DSI-to-eDP support, Fixes; ti-sn65dsi83: Fixes; * gma500: Cleanup connector I2C handling * hyperv: Unify VRAM allocation of Gen1 and Gen2 * i915: export CRTC bpc settings via debugfs * meson: Support YUV422 output; Refcount fixes * mgag200: Support damage clipping; Support gamma handling; Protect concurrent HW access; Fixes to connector; Store model-specific limits in device-info structure; Cleanups * nouveau: Fixes and Cleanups * panel: Kconfig fixes * panfrost: Valhall support * r128: Fix bit-shift overflow * rockchip: Locking fixes in error path; Minor cleanups * ssd130x: Fix built-in linkage * ttm: Cleanups * udl; Always advertize VGA connector * fbdev/vesa: Support COMPILE_TEST Signed-off-by: Daniel Vetter From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YqBtumw05JZDEZE2@linux-uq9g commit 6735988b140b558044107f96e62c231d8a8c7b9b Merge: bf29a87cc65a b23662406b1b Author: Mark Brown Date: Wed Jun 15 18:05:36 2022 +0100 ASoC: Add regmap_field helpers for simple bit operations Merge series from Li Chen This series proposes to add simple bit operations for setting, clearing and testing specific bits with regmap_field and uses them in one of the sunxi drivers. commit 26968e614adb7e0c0ff3e36629669135ef690a57 Merge: 72607f372c9c f67be8b7ee90 Author: Mark Brown Date: Wed Jun 15 18:03:19 2022 +0100 Merge tag 'regmap-field-bit-helpers' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into regmap-5.20 regmap: Add regmap_field helpers for simple bit operations Add simple bit operations for setting, clearing and testing specific bits with regmap_field. commit 08a4aeb2c23f3cc8866e509cae4707d1cc1ed72f Author: Felix Fietkau Date: Wed Jun 15 14:53:35 2022 +0200 ARM: dts: Add PCIe support for Airoha EN7523 This uses the MediaTek MT7622 PCIe driver, since the PCIe IP block is nearly identical to the one in MT7622 Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20220615125335.96089-3-nbd@nbd.name Signed-off-by: Matthias Brugger arch/arm/boot/dts/en7523-evb.dts | 8 ++++++ arch/arm/boot/dts/en7523.dtsi | 58 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) commit abf0ba5a34eae0d7359228f4319a6659676fbd0a Author: Zheng Bin Date: Mon Jun 13 23:06:53 2022 +0800 drm/bridge: it6505: Add missing CRYPTO_HASH dependency The driver uses crypto hash functions so it needs to select CRYPTO_HASH. This fixes build errors: drivers/gpu/drm/bridge/ite-it6505.o: in function `it6505_hdcp_wait_ksv_list': ite-it6505.c:(.text+0x4c26): undefined reference to `crypto_alloc_shash' ite-it6505.c:(.text+0x4c6d): undefined reference to `crypto_shash_digest' ite-it6505.c:(.text+0x4c7d): undefined reference to `crypto_destroy_tfm' ite-it6505.c:(.text+0x4d69): undefined reference to `crypto_destroy_tfm' Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver") Signed-off-by: Zheng Bin Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220613150653.1310029-1-zhengbin13@huawei.com drivers/gpu/drm/bridge/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 3f49f7591e7150c502aa8d04354941ec2394153f Author: Nícolas F. R. A. Prado Date: Mon Jun 13 12:37:05 2022 -0400 drm/bridge: anx7625: Zero error variable when panel bridge not present While parsing the DT, the anx7625 driver checks for the presence of a panel bridge on endpoint 1. If it is missing, pdata->panel_bridge stores the error pointer and the function returns successfully without first cleaning that variable. This is an issue since other functions later check for the presence of a panel bridge by testing the trueness of that variable. In order to ensure proper behavior, zero out pdata->panel_bridge before returning when no panel bridge is found. Fixes: 9e82ea0fb1df ("drm/bridge: anx7625: switch to devm_drm_of_get_bridge") Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220613163705.1531721-1-nfraprado@collabora.com drivers/gpu/drm/bridge/analogix/anx7625.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit db01ea882bf601252dad57242655da17fd9ad2f5 Author: Liu Zixian Date: Tue Jun 14 19:48:05 2022 +0800 efi: Correct comment on efi_memmap_alloc Returning zero means success now. Signed-off-by: Liu Zixian Signed-off-by: Ard Biesheuvel drivers/firmware/efi/memmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6f1de1da8156572e07287814bd6eb0ea3d90e495 Author: Sai Prakash Ranjan Date: Wed May 18 22:14:18 2022 +0530 soc: qcom: geni: Disable MMIO tracing for GENI SE Disable MMIO tracing for GENI SE driver to prevent excessive logging. Any access over serial console would involve a lot of TX and RX register accesses (and few others), so these MMIO read/write trace events in these drivers cause a lot of unwanted noise because of the high frequency of such operations and it is not very useful tracing these events for such drivers. Given we want to enable these trace events on development devices (maybe not production devices) where performance also really matters so that we don't regress other components by wasting CPU cycles and memory collecting these traces, it makes more sense to disable these traces from such drivers. Also another reason to disable these traces would be to prevent recursive tracing when we display the trace buffer containing these MMIO trace events since writing onto serial console would further record MMIO traces. Signed-off-by: Sai Prakash Ranjan Cc: Bjorn Andersson Signed-off-by: Arnd Bergmann drivers/soc/qcom/qcom-geni-se.c | 3 +++ 1 file changed, 3 insertions(+) commit 60457d5e158dd7dbd729c79809cd2c22fc676e2b Author: Sai Prakash Ranjan Date: Wed May 18 22:14:17 2022 +0530 serial: qcom_geni_serial: Disable MMIO tracing for geni serial Disable MMIO tracing for geni serial driver to prevent excessive logging. Any access over serial console would involve a lot of TX and RX register accesses (and few others), so these MMIO read/write trace events in these drivers cause a lot of unwanted noise because of the high frequency of such operations and it is not very useful tracing these events for such drivers. Given we want to enable these trace events on development devices (maybe not production devices) where performance also really matters so that we don't regress other components by wasting CPU cycles and memory collecting these traces, it makes more sense to disable these traces from such drivers. Also another reason to disable these traces would be to prevent recursive tracing when we display the trace buffer containing these MMIO trace events since writing onto serial console would further record MMIO traces. Signed-off-by: Sai Prakash Ranjan Cc: Bjorn Andersson Signed-off-by: Arnd Bergmann drivers/tty/serial/qcom_geni_serial.c | 3 +++ 1 file changed, 3 insertions(+) commit 210031971cdd25a2a2b70c190de98c237db0731f Author: Sai Prakash Ranjan Date: Wed May 18 22:14:16 2022 +0530 asm-generic/io: Add logging support for MMIO accessors Add logging support for MMIO high level accessors such as read{b,w,l,q} and their relaxed versions to aid in debugging unexpected crashes/hangs caused by the corresponding MMIO operation. Signed-off-by: Sai Prakash Ranjan Signed-off-by: Arnd Bergmann include/asm-generic/io.h | 91 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 87 insertions(+), 4 deletions(-) commit 451f2f1c908ba6225e2de82c53eae399f9d342c0 Author: Sai Prakash Ranjan Date: Wed May 18 22:14:15 2022 +0530 KVM: arm64: Add a flag to disable MMIO trace for nVHE KVM Add a generic flag (__DISABLE_TRACE_MMIO__) to disable MMIO tracing in nVHE KVM as the tracepoint and MMIO logging symbols should not be visible at nVHE KVM as there is no way to execute them. It can also be used to disable MMIO tracing for specific drivers. Signed-off-by: Sai Prakash Ranjan Signed-off-by: Arnd Bergmann arch/arm64/kvm/hyp/nvhe/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit d593d64f043add170d8ea9cf698449637917dcf9 Author: Prasad Sodagudi Date: Wed May 18 22:14:14 2022 +0530 lib: Add register read/write tracing support Generic MMIO read/write i.e., __raw_{read,write}{b,l,w,q} accessors are typically used to read/write from/to memory mapped registers and can cause hangs or some undefined behaviour in following few cases, * If the access to the register space is unclocked, for example: if there is an access to multimedia(MM) block registers without MM clocks. * If the register space is protected and not set to be accessible from non-secure world, for example: only EL3 (EL: Exception level) access is allowed and any EL2/EL1 access is forbidden. * If xPU(memory/register protection units) is controlling access to certain memory/register space for specific clients. and more... Such cases usually results in instant reboot/SErrors/NOC or interconnect hangs and tracing these register accesses can be very helpful to debug such issues during initial development stages and also in later stages. So use ftrace trace events to log such MMIO register accesses which provides rich feature set such as early enablement of trace events, filtering capability, dumping ftrace logs on console and many more. Sample output: rwmmio_write: __qcom_geni_serial_console_write+0x160/0x1e0 width=32 val=0xa0d5d addr=0xfffffbfffdbff700 rwmmio_post_write: __qcom_geni_serial_console_write+0x160/0x1e0 width=32 val=0xa0d5d addr=0xfffffbfffdbff700 rwmmio_read: qcom_geni_serial_poll_bit+0x94/0x138 width=32 addr=0xfffffbfffdbff610 rwmmio_post_read: qcom_geni_serial_poll_bit+0x94/0x138 width=32 val=0x0 addr=0xfffffbfffdbff610 Co-developed-by: Sai Prakash Ranjan Signed-off-by: Prasad Sodagudi Signed-off-by: Sai Prakash Ranjan Acked-by: Steven Rostedt (Google) Signed-off-by: Arnd Bergmann arch/Kconfig | 3 ++ arch/arm64/Kconfig | 1 + include/trace/events/rwmmio.h | 97 +++++++++++++++++++++++++++++++++++++++++++ lib/Kconfig | 7 ++++ lib/Makefile | 2 + lib/trace_readwrite.c | 47 +++++++++++++++++++++ 6 files changed, 157 insertions(+) commit 98692f52c588225034cbff458622c2c06dfcb544 Author: Sai Prakash Ranjan Date: Wed May 18 22:14:13 2022 +0530 drm/meson: Fix overflow implicit truncation warnings Fix -Woverflow warnings for drm/meson driver which is a result of moving arm64 custom MMIO accessor macros to asm-generic function implementations giving a bonus type-checking now and uncovering these overflow warnings. drivers/gpu/drm/meson/meson_viu.c: In function ‘meson_viu_init’: drivers/gpu/drm/meson/meson_registers.h:1826:48: error: large integer implicitly truncated to unsigned type [-Werror=overflow] #define VIU_OSD_BLEND_REORDER(dest, src) ((src) << (dest * 4)) ^ drivers/gpu/drm/meson/meson_viu.c:472:18: note: in expansion of macro ‘VIU_OSD_BLEND_REORDER’ writel_relaxed(VIU_OSD_BLEND_REORDER(0, 1) | ^~~~~~~~~~~~~~~~~~~~~ Reported-by: kernel test robot Signed-off-by: Sai Prakash Ranjan Reviewed-by: Arnd Bergmann Cc: Arnd Bergmann Cc: Neil Armstrong Signed-off-by: Arnd Bergmann drivers/gpu/drm/meson/meson_viu.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 443685992bda9bb4f8b17fc02c9f6c60e62b1461 Author: Sai Prakash Ranjan Date: Wed May 18 22:14:12 2022 +0530 irqchip/tegra: Fix overflow implicit truncation warnings Fix -Woverflow warnings for tegra irqchip driver which is a result of moving arm64 custom MMIO accessor macros to asm-generic function implementations giving a bonus type-checking now and uncovering these overflow warnings. drivers/irqchip/irq-tegra.c: In function ‘tegra_ictlr_suspend’: drivers/irqchip/irq-tegra.c:151:18: warning: large integer implicitly truncated to unsigned type [-Woverflow] writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR); ^ Suggested-by: Marc Zyngier Signed-off-by: Sai Prakash Ranjan Reviewed-by: Arnd Bergmann Cc: Marc Zyngier Signed-off-by: Arnd Bergmann drivers/irqchip/irq-tegra.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 018b741ea2a6f9138314c9b7333a2a3971006907 Author: Sai Prakash Ranjan Date: Wed May 18 22:14:11 2022 +0530 coresight: etm4x: Use asm-generic IO memory barriers Per discussion in [1], it was decided to move to using architecture independent/asm-generic IO memory barriers to have just one set of them and deprecate use of arm64 specific IO memory barriers in driver code. So replace current usage of __io_rmb()/__iowmb() in drivers to __io_ar()/__io_bw(). [1] https://lore.kernel.org/lkml/CAK8P3a0L2tLeF1Q0+0ijUxhGNaw+Z0fyPC1oW6_ELQfn0=i4iw@mail.gmail.com/ Signed-off-by: Sai Prakash Ranjan Reviewed-by: Arnd Bergmann Reviewed-by: Suzuki K Poulose Cc: Mathieu Poirier Cc: Suzuki K Poulose Signed-off-by: Arnd Bergmann drivers/hwtracing/coresight/coresight-etm4x-core.c | 8 ++++---- drivers/hwtracing/coresight/coresight-etm4x.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit 548927e0312194167f7ee5de47d50c2036088cce Author: Sai Prakash Ranjan Date: Wed May 18 22:14:10 2022 +0530 arm64: io: Use asm-generic high level MMIO accessors Remove custom arm64 MMIO accessors read{b,w,l,q} and their relaxed versions in support to use asm-generic defined accessors. Also define one set of IO barriers (ar/bw version) used by asm-generic code to override the arm64 specific variants. Suggested-by: Arnd Bergmann Signed-off-by: Sai Prakash Ranjan Reviewed-by: Arnd Bergmann Acked-by: Catalin Marinas Signed-off-by: Arnd Bergmann arch/arm64/include/asm/io.h | 41 ++++++++--------------------------------- 1 file changed, 8 insertions(+), 33 deletions(-) commit f2c5092190f21e02d384f750bcc473554f3aa3f8 Author: Sebastian Andrzej Siewior Date: Tue Jun 14 20:18:14 2022 +0200 arch/*: Disable softirq stacks on PREEMPT_RT. PREEMPT_RT preempts softirqs and the current implementation avoids do_softirq_own_stack() and only uses __do_softirq(). Disable the unused softirqs stacks on PREEMPT_RT to save some memory and ensure that do_softirq_own_stack() is not used bwcause it is not expected. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Arnd Bergmann arch/arm/kernel/irq.c | 3 ++- arch/parisc/kernel/irq.c | 2 ++ arch/powerpc/kernel/irq.c | 4 ++++ arch/s390/include/asm/softirq_stack.h | 3 ++- arch/sh/kernel/irq.c | 2 ++ arch/sparc/kernel/irq_64.c | 2 ++ include/asm-generic/softirq_stack.h | 2 +- 7 files changed, 15 insertions(+), 3 deletions(-) commit b3b76fc86f0fb4d98918f48c784138bfa950dff6 Author: Felix Fietkau Date: Wed Jun 15 14:53:34 2022 +0200 PCI: mediatek: Allow building for ARCH_AIROHA Allow selecting the pcie-mediatek driver if ARCH_AIROHA is set, because the Airoha EN7523 SoC uses the same controller as MT7622. The driver itself is not modified. The PCIe controller DT node should use mediatek,mt7622-pcie after airoha,en7523-pcie. Link: https://lore.kernel.org/r/20220615125335.96089-2-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Bjorn Helgaas Acked-by: Lorenzo Pieralisi drivers/pci/controller/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c568d63b9155191e1fb42fe55e346e1248ed111b Author: John Crispin Date: Wed Jun 15 14:53:33 2022 +0200 dt-bindings: PCI: mediatek: Add Airoha EN7532 support Add a binding for Airoha EN7532, an ARM-based platform SoC integrating the same PCIe IP as MT7622. Link: https://lore.kernel.org/r/20220615125335.96089-1-nbd@nbd.name Signed-off-by: John Crispin Signed-off-by: Felix Fietkau Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring Documentation/devicetree/bindings/pci/mediatek-pcie.txt | 1 + 1 file changed, 1 insertion(+) commit be753a1fd77b8cca08f9c2e7c650057bf8933599 Merge: ba79c5e45eec 72440158f70f Author: Andy Shevchenko Date: Wed Jun 15 18:06:56 2022 +0300 Merge branch 'ib-v5.20-amd-pinctrl' Merge branch 'ib-v5.20-amd-pinctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git to develop Intel pin control driver changes based on provided new data structure. Signed-off-by: Andy Shevchenko commit 6342140db6609a0c7d34f68c52b2947468e0e630 Author: Andrei Vagin Date: Sun Jun 12 23:07:23 2022 -0700 selftests/timens: add a test for vfork+exit * check that a child process is in parent's time namespace after vfork. * check that a child process is in the target namespace after exec. Output on success: $ ./vfork_exec 1..1 ok 1 exec Signed-off-by: Andrei Vagin Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220613060723.197407-2-avagin@gmail.com tools/testing/selftests/timens/Makefile | 2 +- tools/testing/selftests/timens/vfork_exec.c | 90 +++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 1 deletion(-) commit 133e2d3e81de5d9706cab2dd1d52d231c27382e5 Author: Andrei Vagin Date: Sun Jun 12 23:07:22 2022 -0700 fs/exec: allow to unshare a time namespace on vfork+exec Right now, a new process can't be forked in another time namespace if it shares mm with its parent. It is prohibited, because each time namespace has its own vvar page that is mapped into a process address space. When a process calls exec, it gets a new mm and so it could be "legal" to switch time namespace in that case. This was not implemented and now if we want to do this, we need to add another clone flag to not break backward compatibility. We don't have any user requests to switch times on exec except the vfork+exec combination, so there is no reason to add a new clone flag. As for vfork+exec, this should be safe to allow switching timens with the current clone flag. Right now, vfork (CLONE_VFORK | CLONE_VM) fails if a child is forked into another time namespace. With this change, vfork creates a new process in parent's timens, and the following exec does the actual switch to the target time namespace. Suggested-by: Florian Weimer Signed-off-by: Andrei Vagin Acked-by: Christian Brauner (Microsoft) Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220613060723.197407-1-avagin@gmail.com fs/exec.c | 7 +++++++ kernel/fork.c | 5 ++++- kernel/nsproxy.c | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) commit 2b59af8cd4de6dd9e667af2d045488c29226655b Author: Teh Wen Ping Date: Thu Jun 9 10:55:00 2022 +0800 arm64: dts: Add support for Stratix 10 Software Virtual Platform Add Stratix 10 Software Virtual Platform device tree Acked-by: Krzysztof Kozlowski Signed-off-by: Teh Wen Ping Signed-off-by: Dinh Nguyen arch/arm64/Kconfig.platforms | 3 +- arch/arm64/boot/dts/altera/Makefile | 3 +- .../boot/dts/altera/socfpga_stratix10_swvp.dts | 117 +++++++++++++++++++++ 3 files changed, 121 insertions(+), 2 deletions(-) commit 9194a384083b2f368f51bd7505740c56ffa990ae Author: Teh Wen Ping Date: Thu Jun 9 10:56:47 2022 +0800 dt-bindings: altera: document Stratix 10 SWVP compatibles Add compatible strings for Stratix 10 Software Virtual Platform Acked-by: Krzysztof Kozlowski Signed-off-by: Teh Wen Ping Signed-off-by: Dinh Nguyen Documentation/devicetree/bindings/arm/altera.yaml | 1 + 1 file changed, 1 insertion(+) commit 842fec058171db8f58a6073502a625372dddd96a Author: Thomas Schneider Date: Sat Jun 11 03:03:59 2022 +0200 HID: nintendo: Set phys property of input device based on HID phys While the MAC address the uniq identifier is set to (cf. commit 1425247383c5 ("HID: nintendo: set controller uniq to MAC")) is certainly unique, the physical location can be more helpful in user interfaces. The underlying hid_device already provides a suitable value, so we can simply reuse this here. Signed-off-by: Thomas Schneider Signed-off-by: Jiri Kosina drivers/hid/hid-nintendo.c | 2 ++ 1 file changed, 2 insertions(+) commit 0e9e3132fe51106a8cda96c4a120d50b0cacec69 Author: Krzysztof Kozlowski Date: Tue Jun 7 14:13:35 2022 +0200 dt-bindings: pinctrl: sunplus,sp7021-pinctrl: reference generic schema Reference generic pin controller schema to enforce proper root node name. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220607121335.131497-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4b32e054335ea0ce50967f63a7bfd4db058b14b9 Author: Miaoqian Lin Date: Tue Jun 7 15:16:01 2022 +0400 pinctrl: nomadik: Fix refcount leak in nmk_pinctrl_dt_subnode_to_map of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak." Fixes: c2f6d059abfc ("pinctrl: nomadik: refactor DT parser to take two paths") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220607111602.57355-1-linmq006@gmail.com Signed-off-by: Linus Walleij drivers/pinctrl/nomadik/pinctrl-nomadik.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2ed2c3814951e7cff982b26c81917e6bbb10f3ae Merge: f152a48a15dc 72440158f70f Author: Linus Walleij Date: Wed Jun 15 15:54:49 2022 +0200 Merge branch 'ib-v5.20-amd-pinctrl' into devel commit f152a48a15dccb2a951ef4c9f982d69a52693309 Author: Samuel Holland Date: Tue May 31 00:36:23 2022 -0500 dt-bindings: pinctrl: sunxi: Disallow the resets property None of the sunxi pin controllers have a module reset line. This is confirmed by documentation (A80) as well as experimentation (A33). Since the property is not applicable to any variant of the hardware, let's remove it from the binding. Signed-off-by: Samuel Holland Acked-by: Rob Herring Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220531053623.43851-4-samuel@sholland.org Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml | 3 --- 1 file changed, 3 deletions(-) commit daf4cfddbce6388157cf9e6ade4cd8f08e0f8126 Author: Samuel Holland Date: Tue May 31 00:36:22 2022 -0500 ARM: dts: sunxi: Drop resets from r_pio nodes None of the sunxi pin controllers have a module reset line. This is confirmed by documentation (A80) as well as experimentation (A33). Let's remove the inaccurate properties. Signed-off-by: Samuel Holland Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220531053623.43851-3-samuel@sholland.org Signed-off-by: Linus Walleij arch/arm/boot/dts/sun6i-a31.dtsi | 1 - arch/arm/boot/dts/sun8i-a23-a33.dtsi | 1 - arch/arm/boot/dts/sun9i-a80.dtsi | 1 - 3 files changed, 3 deletions(-) commit 59c150252786fe428aa541e24e9bef8c6dc4deb4 Author: Samuel Holland Date: Tue May 31 00:36:21 2022 -0500 pinctrl: sunxi: Remove reset controller consumers None of the sunxi pin controllers have a module reset line. All of the SoC documentation, where available, agrees. The bits that would be used for the PIO reset (i.e. matching the order of the clock gate bits) are always reserved, both in the CCU and in the PRCM. And experiments on several SoCs, including the A33, confirm that those reserved bits indeed have no effect. Let's remove this superfluous code and dependency, and also remove the include statement that was copied to the other r_pio drivers. Signed-off-by: Samuel Holland Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220531053623.43851-2-samuel@sholland.org Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/Kconfig | 3 --- drivers/pinctrl/sunxi/pinctrl-sun50i-a64-r.c | 1 - drivers/pinctrl/sunxi/pinctrl-sun50i-h6-r.c | 1 - drivers/pinctrl/sunxi/pinctrl-sun50i-h616-r.c | 1 - drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c | 22 +--------------------- drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c | 25 +------------------------ drivers/pinctrl/sunxi/pinctrl-sun8i-a83t-r.c | 1 - drivers/pinctrl/sunxi/pinctrl-sun9i-a80-r.c | 1 - 8 files changed, 2 insertions(+), 53 deletions(-) commit 353d2ef77f2be4c1b9b3c70f1637a9986f07b997 Author: Nícolas F. R. A. Prado Date: Wed May 25 11:57:14 2022 -0400 dt-bindings: pinctrl: mt8192: Use generic bias instead of pull-*-adv Commit cafe19db7751 ("pinctrl: mediatek: Backward compatible to previous Mediatek's bias-pull usage") allowed the bias-pull-up and bias-pull-down properties to be used for setting PUPD/R1/R0 type bias on mtk-paris based SoC's, which was previously only supported by the custom mediatek,pull-up-adv and mediatek,pull-down-adv properties. Since the bias-pull-{up,down} properties already have defines associated thus being more descriptive and is more universal on MediaTek platforms, and given that there are no mediatek,pull-{up,down}-adv users on mt8192 yet, remove the custom adv properties in favor of the generic ones. Note that only mediatek,pull-up-adv was merged in the binding, but not its down counterpart. Fixes: edbacb36ea50 ("dt-bindings: pinctrl: mt8192: Add mediatek,pull-up-adv property") Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220525155714.1837360-3-nfraprado@collabora.com Signed-off-by: Linus Walleij .../bindings/pinctrl/pinctrl-mt8192.yaml | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) commit b52e695324bb44728053a414f17d25a5959ecb9d Author: Nícolas F. R. A. Prado Date: Wed May 25 11:57:13 2022 -0400 dt-bindings: pinctrl: mt8192: Add drive-strength-microamp Commit e5fabbe43f3f ("pinctrl: mediatek: paris: Support generic PIN_CONFIG_DRIVE_STRENGTH_UA") added support for using drive-strength-microamp instead of mediatek,drive-strength-adv. Since there aren't any users of mediatek,drive-strength-adv on mt8192 yet, remove this property and add drive-strength-microamp in its place, which has a clearer meaning. Fixes: 4ac68333ff6d ("dt-bindings: pinctrl: mt8192: Add mediatek,drive-strength-adv property") Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220525155714.1837360-2-nfraprado@collabora.com Signed-off-by: Linus Walleij .../bindings/pinctrl/pinctrl-mt8192.yaml | 27 ++-------------------- 1 file changed, 2 insertions(+), 25 deletions(-) commit 72440158f70f2c61e6e5b22b7409d48de62cc914 Author: Basavaraj Natikar Date: Wed Jun 1 20:59:00 2022 +0530 pinctrl: amd: Implement pinmux functionality Provide pinmux functionality by implementing pinmux_ops. Signed-off-by: Basavaraj Natikar Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220601152900.1012813-7-Basavaraj.Natikar@amd.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 78 +++ drivers/pinctrl/pinctrl-amd.h | 1326 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 1403 insertions(+), 1 deletion(-) commit 79bb5c7fe84b3eb35a4af77f4a2d24b2b08afa81 Author: Basavaraj Natikar Date: Wed Jun 1 20:58:59 2022 +0530 pinctrl: amd: Add amd_get_iomux_res function Presently there is no way to change pinmux configuration run time. Hence add a function to get IOMUX resource which can be used to configure IOMUX GPIO pins run time. Signed-off-by: Basavaraj Natikar Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220601152900.1012813-6-Basavaraj.Natikar@amd.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 25 +++++++++++++++++++++++++ drivers/pinctrl/pinctrl-amd.h | 1 + 2 files changed, 26 insertions(+) commit a1e9bb597a7b4dc0f194b2de03882e9703a118c6 Author: Basavaraj Natikar Date: Wed Jun 1 20:58:58 2022 +0530 pinctrl: amd: Define and use AMD_PINS macro AMD pingroup can be extended to support multi-function pins. Hence define and use a macro "AMD_PINS" to represent larger number of pins. Signed-off-by: Basavaraj Natikar Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220601152900.1012813-5-Basavaraj.Natikar@amd.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.h | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit 1dce3078196195fa56260d4a7830c2f918315008 Author: Basavaraj Natikar Date: Wed Jun 1 20:58:57 2022 +0530 pinctrl: amd: Use PINCTRL_PINGROUP to manage pingroups AMD pingroup can be extended to support multi-function pins. Hence use PINCTRL_PINGROUP to manage and represent larger number of pingroups inline. Signed-off-by: Basavaraj Natikar Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220601152900.1012813-4-Basavaraj.Natikar@amd.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.h | 36 ++++++------------------------------ 1 file changed, 6 insertions(+), 30 deletions(-) commit 8a962b08e1fa272e1aa288840ac0d2c1bdf9d261 Author: Basavaraj Natikar Date: Wed Jun 1 20:58:56 2022 +0530 pinctrl: amd: Remove amd_pingroup and use pingroup Remove 'struct amd_pingroup' and instead use 'struct pingroup'. Signed-off-by: Basavaraj Natikar Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220601152900.1012813-3-Basavaraj.Natikar@amd.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 003cbe046171596809c2f37dc07e69df1b4d9f95 Author: Basavaraj Natikar Date: Wed Jun 1 20:58:55 2022 +0530 pinctrl: Add pingroup and define PINCTRL_PINGROUP Add 'struct pingroup' to represent pingroup and 'PINCTRL_PINGROUP' macro for inline use. Both are used to manage and represent larger number of pingroups. Signed-off-by: Basavaraj Natikar Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220601152900.1012813-2-Basavaraj.Natikar@amd.com Signed-off-by: Linus Walleij include/linux/pinctrl/pinctrl.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 0cb1fc0988e32bda84c2b7218e0c761af1430baf Author: José Expósito Date: Sat Jun 11 13:39:14 2022 +0200 HID: uclogic: Add support for XP-PEN Deco L The XP-PEN Deco L (UGEE) needs to be initialized by sending a buffer of magic data, discovered by sniffing the Windows driver traffic. In order to differentiate UGEE tablets that need this kind of initialization from the previous ones, name them v2 internally and create an entry point for them. After initialization, the template report descriptors can be discovered by parsing a string descriptor, similar to the one exposed by HUION v1 devices. Add all the required elements to support the device. Signed-off-by: José Expósito Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/hid-uclogic-core.c | 2 + drivers/hid/hid-uclogic-params.c | 197 +++++++++++++++++++++++++++++++++++++++ drivers/hid/hid-uclogic-rdesc.c | 102 ++++++++++++++++++++ drivers/hid/hid-uclogic-rdesc.h | 8 ++ 5 files changed, 310 insertions(+) commit 867c8925442579f7c4a8901f02a54fb07e99c2be Author: José Expósito Date: Sat Jun 11 13:39:13 2022 +0200 HID: uclogic: Allow to generate frame templates Add a new template placeholder to allow configuring the number of buttons in the drawing tablet frame and update the KUnit tests to cover the new case. Signed-off-by: José Expósito Signed-off-by: Jiri Kosina drivers/hid/hid-uclogic-rdesc-test.c | 36 ++++++++++++++++++++++++++++++++++++ drivers/hid/hid-uclogic-rdesc.c | 14 +++++++++++--- drivers/hid/hid-uclogic-rdesc.h | 6 ++++++ 3 files changed, 53 insertions(+), 3 deletions(-) commit 2d167aaba3864cf8f46b8364aa33e780de1da8f4 Author: José Expósito Date: Sat Jun 11 13:39:12 2022 +0200 HID: uclogic: Add KUnit tests for uclogic_rdesc_template_apply() The uclogic_rdesc_template_apply() function is used by the driver to generate HID descriptors from templates. In order to avoid regressions in future patches, add KUnit tests to test the function. To run the tests: $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/hid \ --kconfig_add CONFIG_VIRTIO_UML=y \ --kconfig_add CONFIG_UML_PCI_OVER_VIRTIO=y Signed-off-by: José Expósito Signed-off-by: Jiri Kosina drivers/hid/.kunitconfig | 5 + drivers/hid/Kconfig | 16 +++ drivers/hid/Makefile | 3 + drivers/hid/hid-uclogic-rdesc-test.c | 183 +++++++++++++++++++++++++++++++++++ 4 files changed, 207 insertions(+) commit 76e645be7ebecbf39ab2edd949ea7f1757f58900 Author: José Expósito Date: Sat Jun 11 13:39:11 2022 +0200 HID: uclogic: Make template placeholder IDs generic Up until now, the report descriptor template parameter IDs were only used with pen report descriptors and they were named accordingly. Rename the enum and the total number of IDs to make them interface agnostic. Refactor, no functional changes. Signed-off-by: José Expósito Signed-off-by: Jiri Kosina drivers/hid/hid-uclogic-params.c | 4 ++-- drivers/hid/hid-uclogic-rdesc.c | 14 +++++++------- drivers/hid/hid-uclogic-rdesc.h | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) commit c435f61d0eb334dc8367164a125aea45d9dd9508 Author: Rodrigo Siqueira Date: Thu May 19 13:51:42 2022 -0400 drm/amd/display: Drop unnecessary guard from DC resource Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 -- 1 file changed, 2 deletions(-) commit 8092a0eed4080a33a4c8681f4231c40c0bb7cb5c Merge: fbb89d02e33a cc2609eda698 Author: Kalle Valo Date: Wed Jun 15 15:57:20 2022 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.20. Major changes: ath10k * 802.3 frame format support commit bf29a87cc65aa3fd138af8b04cd6bb12e51cdb2b Merge: 4edf738d4c79 064520e8aeaa Author: Mark Brown Date: Wed Jun 15 13:41:28 2022 +0100 ASoC: SOF: Intel: Add support for MeteorLake Merge series from Bard Liao : Add platform abstraction for the Meteor Lake platform. This platform has significant differences compared to the TGL/ADL generation: it relies on new hardware using the code name 'ACE' and only supports the INTEL_IPC4 protocol and firmware architecture based on the Zephyr RTOS commit 2db2f46fdfc25691f3e90224e78bc5b2fc23dcd7 Author: Uros Bizjak Date: Fri May 20 16:46:35 2022 +0200 KVM: x86/mmu: Use try_cmpxchg64 in fast_pf_fix_direct_spte Use try_cmpxchg64 instead of cmpxchg64 (*ptr, old, new) != old in fast_pf_fix_direct_spte. cmpxchg returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). Signed-off-by: Uros Bizjak Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Vitaly Kuznetsov Cc: Wanpeng Li Cc: Jim Mattson Cc: Joerg Roedel Message-Id: <20220520144635.63134-1-ubizjak@gmail.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ac304de73b37b66793d6cc1ad3a03886aa79791 Author: Uros Bizjak Date: Fri May 20 16:37:37 2022 +0200 KVM: VMX: Use try_cmpxchg64 in pi_try_set_control Use try_cmpxchg64 instead of cmpxchg64 (*ptr, old, new) != old in pi_try_set_control. cmpxchg returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg): b9: 88 44 24 60 mov %al,0x60(%rsp) bd: 48 89 c8 mov %rcx,%rax c0: c6 44 24 62 f2 movb $0xf2,0x62(%rsp) c5: 48 8b 74 24 60 mov 0x60(%rsp),%rsi ca: f0 49 0f b1 34 24 lock cmpxchg %rsi,(%r12) d0: 48 39 c1 cmp %rax,%rcx d3: 75 cf jne a4 patched: c1: 88 54 24 60 mov %dl,0x60(%rsp) c5: c6 44 24 62 f2 movb $0xf2,0x62(%rsp) ca: 48 8b 54 24 60 mov 0x60(%rsp),%rdx cf: f0 48 0f b1 13 lock cmpxchg %rdx,(%rbx) d4: 75 d5 jne ab Signed-off-by: Uros Bizjak Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Vitaly Kuznetsov Cc: Wanpeng Li Cc: Jim Mattson Cc: Joerg Roedel Reported-by: kernel test robot Message-Id: <20220520143737.62513-1-ubizjak@gmail.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/posted_intr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aee98a6838d52d5cca14610d228893e9208f4ed1 Author: Uros Bizjak Date: Wed May 18 15:51:11 2022 +0200 KVM: x86/mmu: Use try_cmpxchg64 in tdp_mmu_set_spte_atomic Use try_cmpxchg64 instead of cmpxchg64 (*ptr, old, new) != old in tdp_mmu_set_spte_atomic. cmpxchg returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). Also, remove explicit assignment to iter->old_spte when cmpxchg fails, this is what try_cmpxchg does implicitly. Cc: Paolo Bonzini Cc: Sean Christopherson Signed-off-by: Uros Bizjak Reviewed-by: David Matlack Message-Id: <20220518135111.3535-1-ubizjak@gmail.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/tdp_mmu.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit d895f28ed6da96d7b922bd79977e2b732b103a99 Author: Sean Christopherson Date: Fri Jun 10 21:41:40 2022 +0000 KVM: VMX: Skip filter updates for MSRs that KVM is already intercepting When handling userspace MSR filter updates, recompute interception for possible passthrough MSRs if and only if KVM wants to disabled interception. If KVM wants to intercept accesses, i.e. the associated bit is set in vmx->shadow_msr_intercept, then there's no need to set the intercept again as KVM will intercept the MSR regardless of userspace's wants. No functional change intended, the call to vmx_enable_intercept_for_msr() really is just a gigantic nop. Suggested-by: Aaron Lewis Signed-off-by: Sean Christopherson Message-Id: <20220610214140.612025-1-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 007a369fba3c120d9a343bb2e8f04cf64c988183 Author: Sean Christopherson Date: Mon Jun 13 22:57:16 2022 +0000 KVM: x86/mmu: Drop unused CMPXCHG macro from paging_tmpl.h Drop the CMPXCHG macro from paging_tmpl.h, it's no longer used now that KVM uses a common uaccess helper to do 8-byte CMPXCHG. Fixes: f122dfe44768 ("KVM: x86: Use __try_cmpxchg_user() to update guest PTE A/D bits") Signed-off-by: Sean Christopherson Message-Id: <20220613225723.2734132-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/paging_tmpl.h | 6 ------ 1 file changed, 6 deletions(-) commit 78c7d9001be704b7d13083333354c6ddf6e32fce Author: Lai Jiangshan Date: Sun Jun 5 14:34:17 2022 +0800 KVM: X86/SVM: Use root_level in svm_load_mmu_pgd() Use root_level in svm_load_mmu_pg() rather that looking up the root level in vcpu->arch.mmu->root_role.level. svm_load_mmu_pgd() has only one caller, kvm_mmu_load_pgd(), which always passes vcpu->arch.mmu->root_role.level as root_level. Signed-off-by: Lai Jiangshan Message-Id: <20220605063417.308311-7-jiangshanlai@gmail.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 024c3c3304ca36c23ee400b507fb59ae2e2db7fa Author: Lai Jiangshan Date: Sun Jun 5 14:34:16 2022 +0800 KVM: X86/MMU: Remove useless mmu_topup_memory_caches() in kvm_mmu_pte_write() Since the commit c5e2184d1544("KVM: x86/mmu: Remove the defunct update_pte() paging hook"), kvm_mmu_pte_write() no longer uses the rmap cache. So remove mmu_topup_memory_caches() in it. Cc: Sean Christopherson Signed-off-by: Lai Jiangshan Message-Id: <20220605063417.308311-6-jiangshanlai@gmail.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 7 ------- 1 file changed, 7 deletions(-) commit f24b44e48d267092dd79dba1288dc73ac414447e Author: Lai Jiangshan Date: Sun Jun 5 14:34:15 2022 +0800 KVM: Rename ack_flush() to ack_kick() Make it use the same verb as in kvm_kick_many_cpus(). Signed-off-by: Lai Jiangshan Message-Id: <20220605063417.308311-5-jiangshanlai@gmail.com> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fc10020ac9ece7aacea87753beafc0fbd49e8c58 Author: Lai Jiangshan Date: Sun Jun 5 14:34:13 2022 +0800 KVM: X86/MMU: Remove unused PT32_DIR_BASE_ADDR_MASK from mmu.c It is unused. Signed-off-by: Lai Jiangshan Message-Id: <20220605063417.308311-3-jiangshanlai@gmail.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 2 -- 1 file changed, 2 deletions(-) commit 37f80a7c9987ff5f0a1e023dbbda2ad6b47431f7 Author: Janis Schoetterl-Glausch Date: Tue Jun 14 18:26:35 2022 +0200 KVM: s390: selftests: Fix memop extension capability check Fix the inverted logic of the memop extension capability check. Fixes: 97da92c0ff92 ("KVM: s390: selftests: Use TAP interface in the memop test") Signed-off-by: Janis Schoetterl-Glausch Message-Id: <20220614162635.3445019-1-scgl@linux.ibm.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/s390x/memop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5380f6d7586ea3ef3a55d8cf19ceffacea31392 Author: Sean Christopherson Date: Mon Jun 13 21:42:37 2022 +0000 KVM: SVM: Hide SEV migration lockdep goo behind CONFIG_PROVE_LOCKING Wrap the manipulation of @role and the manual mutex_{release,acquire}() invocations in CONFIG_PROVE_LOCKING=y to squash a clang-15 warning. When building with -Wunused-but-set-parameter and CONFIG_DEBUG_LOCK_ALLOC=n, clang-15 seees there's no usage of @role in mutex_lock_killable_nested() and yells. PROVE_LOCKING selects DEBUG_LOCK_ALLOC, and the only reason KVM manipulates @role is to make PROVE_LOCKING happy. To avoid true ugliness, use "i" and "j" to detect the first pass in the loops; the "idx" field that's used by kvm_for_each_vcpu() is guaranteed to be '0' on the first pass as it's simply the first entry in the vCPUs XArray, which is fully KVM controlled. kvm_for_each_vcpu() passes '0' for xa_for_each_range()'s "start", and xa_for_each_range() will not enter the loop if there's no entry at '0'. Fixes: 0c2c7c069285 ("KVM: SEV: Mark nested locking of vcpu->lock") Reported-by: kernel test robot Cc: Peter Gonda Signed-off-by: Sean Christopherson Message-Id: <20220613214237.2538266-1-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/sev.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 5bdae49fc2f689b5f896b54bd9230425d3643dab Author: Paolo Bonzini Date: Wed Jun 15 08:03:53 2022 -0400 KVM: SEV: fix misplaced closing parenthesis This caused a warning on 32-bit systems, but undoubtedly would have acted funny on 64-bit as well. The fix was applied directly on merge in 5.19, see commit 24625f7d91fb ("Merge tag for-linus of git://git.kernel.org/pub/scm/virt/kvm/kvm"). Fixes: 3743c2f02517 ("KVM: x86: inhibit APICv/AVIC on changes to APIC ID or APIC base") Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/avic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fbb89d02e33a8c8f522d75882f5f19c65b722b46 Author: Casper Andersson Date: Tue Jun 14 11:25:32 2022 +0200 net: sparx5: Allow mdb entries to both CPU and ports Allow mdb entries to be forwarded to CPU and be switched at the same time. Only remove entry when no port and the CPU isn't part of the group anymore. Signed-off-by: Casper Andersson Acked-by: Steen Hegelund Signed-off-by: David S. Miller .../ethernet/microchip/sparx5/sparx5_switchdev.c | 55 ++++++++++++++-------- 1 file changed, 35 insertions(+), 20 deletions(-) commit 1cb67e25f9a844425f85e592c7ffb8428800a796 Author: Shaoqin Huang Date: Tue Jun 14 16:41:19 2022 -0600 KVM: selftests: Remove the mismatched parameter comments There are some parameter being removed in function but the parameter comments still exist, so remove them. Signed-off-by: Shaoqin Huang Message-Id: <20220614224126.211054-1-shaoqin.huang@intel.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/kvm_util.c | 3 --- 1 file changed, 3 deletions(-) commit c63c615e22ebb4cd29f4e7352c82ca1a7e76e00a Author: Sieng Piaw Liew Date: Wed Jun 15 14:09:22 2022 +0800 bcm63xx_enet: switch to napi_build_skb() to reuse skbuff_heads napi_build_skb() reuses NAPI skbuff_head cache in order to save some cycles on freeing/allocating skbuff_heads on every new Rx or completed Tx. Use napi_consume_skb() to feed the cache with skbuff_heads of completed Tx so it's never empty. Signed-off-by: Sieng Piaw Liew Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcm63xx_enet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 49ae83fc4fd027a4b4cf56bd2c94c7814ec4baff Author: Sieng Piaw Liew Date: Wed Jun 15 11:24:26 2022 +0800 net: don't check skb_count twice NAPI cache skb_count is being checked twice without condition. Change to checking the second time only if the first check is run. Signed-off-by: Sieng Piaw Liew Signed-off-by: David S. Miller net/core/skbuff.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 62257638170eee07926c9df5a4c9059ec69a3734 Author: Dan Carpenter Date: Wed Jun 15 11:19:44 2022 +0300 ASoC: SOF: mediatek: Fix error code in probe This should return PTR_ERR() instead of IS_ERR(). Fixes: e0100bfd383c ("ASoC: SOF: mediatek: Add mt8186 ipc support") Signed-off-by: Dan Carpenter Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/YqmWIK8sTj578OJP@kili Signed-off-by: Mark Brown sound/soc/sof/mediatek/mt8186/mt8186.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b23662406b1b225847b964e4549a5718c45f20d6 Author: Li Chen Date: Sun May 22 20:27:59 2022 -0700 ASoC: sunxi: Use {regmap/regmap_field}_{set/clear}_bits helpers Appropriately change calls to {regmap/regmap_field}_update_bits() with {regmap/regmap_field}_set_bits() and {regmap/regmap_field}_clear_bits() for improved readability. Signed-off-by: Li Chen Link: https://lore.kernel.org/r/180eef50e96.cb7c34db60740.8898768158778553647@zohomail.com Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-codec.c | 78 +++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 48 deletions(-) commit f67be8b7ee90c292948c3ec6395673963cccaee6 Author: Li Chen Date: Sun May 22 20:26:58 2022 -0700 regmap: provide regmap_field helpers for simple bit operations We have set/clear/test operations for regmap, but not for regmap_field yet. So let's introduce regmap_field helpers too. In many instances regmap_field_update_bits() is used for simple bit setting and clearing. In these cases the last argument is redundant and we can hide it with a static inline function. This adds three new helpers for simple bit operations: set_bits, clear_bits and test_bits (the last one defined as a regular function). Signed-off-by: Li Chen Link: https://lore.kernel.org/r/180eef422c3.deae9cd960729.8518395646822099769@zohomail.com Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 22 ++++++++++++++++++++++ include/linux/regmap.h | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) commit 902c2d91582c7ff0cb5f57ffb3766656f9b910c6 Author: Ma Wupeng Date: Tue Jun 14 17:21:56 2022 +0800 memblock: Disable mirror feature if kernelcore is not specified If system have some mirrored memory and mirrored feature is not specified in boot parameter, the basic mirrored feature will be enabled and this will lead to the following situations: - memblock memory allocation prefers mirrored region. This may have some unexpected influence on numa affinity. - contiguous memory will be split into several parts if parts of them is mirrored memory via memblock_mark_mirror(). To fix this, variable mirrored_kernelcore will be checked in memblock_mark_mirror(). Mark mirrored memory with flag MEMBLOCK_MIRROR iff kernelcore=mirror is added in the kernel parameters. Signed-off-by: Ma Wupeng Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220614092156.1972846-6-mawupeng1@huawei.com Acked-by: Mike Rapoport Signed-off-by: Ard Biesheuvel mm/internal.h | 2 ++ mm/memblock.c | 3 +++ mm/page_alloc.c | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) commit c0b978fedff685c9fdf91a46a6f026ac49d99591 Author: Ma Wupeng Date: Tue Jun 14 17:21:55 2022 +0800 arm64: mm: Only remove nomap flag for initrd Commit 177e15f0c144 ("arm64: add the initrd region to the linear mapping explicitly") remove all the flags of the memory used by initrd. This is fine since MEMBLOCK_MIRROR is not used in arm64. However with mirrored feature introduced to arm64, this will clear the mirrored flag used by initrd, which will lead to error log printed by find_zone_movable_pfns_for_nodes() if the lower 4G range has some non-mirrored memory. To solve this problem, only MEMBLOCK_NOMAP flag will be removed via memblock_clear_nomap(). Signed-off-by: Ma Wupeng Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20220614092156.1972846-5-mawupeng1@huawei.com Acked-by: Mike Rapoport Acked-by: Catalin Marinas Signed-off-by: Ard Biesheuvel arch/arm64/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abd62377c0064302df680ab33f4c05290ba24af8 Author: Ma Wupeng Date: Tue Jun 14 17:21:54 2022 +0800 mm: Limit warning message in vmemmap_verify() to once For a system only have limited mirrored memory or some numa node without mirrored memory, the per node vmemmap page_structs prefer to allocate memory from mirrored region, which will lead to vmemmap_verify() in vmemmap_populate_basepages() report lots of warning message. This patch change the frequency of "potential offnode page_structs" warning messages to only once to avoid a very long print during bootup. Signed-off-by: Ma Wupeng Acked-by: David Hildenbrand Link: https://lore.kernel.org/r/20220614092156.1972846-4-mawupeng1@huawei.com Acked-by: Mike Rapoport Signed-off-by: Ard Biesheuvel mm/sparse-vmemmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14d9a675fd0d414b7ca3d47d2ff70fbda4f6cfc2 Author: Ma Wupeng Date: Tue Jun 14 17:21:53 2022 +0800 mm: Ratelimited mirrored memory related warning messages If system has mirrored memory, memblock will try to allocate mirrored memory firstly and fallback to non-mirrored memory when fails, but if with limited mirrored memory or some numa node without mirrored memory, lots of warning message about memblock allocation will occur. This patch ratelimit the warning message to avoid a very long print during bootup. Signed-off-by: Ma Wupeng Reviewed-by: David Hildenbrand Acked-by: Mike Rapoport Reviewed-by: Anshuman Khandual Reviewed-by: Kefeng Wang Link: https://lore.kernel.org/r/20220614092156.1972846-3-mawupeng1@huawei.com Acked-by: Mike Rapoport Signed-off-by: Ard Biesheuvel mm/memblock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6365a1935c5151455812e96d8de434c551dc0d98 Author: Ma Wupeng Date: Tue Jun 14 17:21:52 2022 +0800 efi: Make code to find mirrored memory ranges generic Commit b05b9f5f9dcf ("x86, mirror: x86 enabling - find mirrored memory ranges") introduce the efi_find_mirror() function on x86. In order to reuse the API we make it public. Arm64 can support mirrored memory too, so function efi_find_mirror() is added to efi_init() to this support for arm64. Since efi_init() is shared by ARM, arm64 and riscv, this patch will bring mirror memory support for these architectures, but this support is only tested in arm64. Signed-off-by: Ma Wupeng Link: https://lore.kernel.org/r/20220614092156.1972846-2-mawupeng1@huawei.com [ardb: fix subject to better reflect the payload] Acked-by: Mike Rapoport Signed-off-by: Ard Biesheuvel arch/x86/include/asm/efi.h | 4 ---- arch/x86/platform/efi/efi.c | 23 ----------------------- drivers/firmware/efi/efi-init.c | 1 + drivers/firmware/efi/efi.c | 23 +++++++++++++++++++++++ include/linux/efi.h | 3 +++ 5 files changed, 27 insertions(+), 27 deletions(-) commit 064520e8aeaa2569f6504a50a37ac801b73656bc Author: Bard Liao Date: Wed Jun 15 16:43:48 2022 +0800 ASoC: SOF: Intel: Add support for MeteorLake (MTL) Add platform abstraction for the Meteor Lake platform. This platform has significant differences compared to the TGL/ADL generation: it relies on new hardware using the code name 'ACE' and only supports the INTEL_IPC4 protocol and firmware architecture based on the Zephyr RTOS Co-developed-by: Ranjani Sridharan Signed-off-by: Ranjani Sridharan Signed-off-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20220615084348.3489-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown include/linux/soundwire/sdw_intel.h | 2 + sound/soc/sof/intel/Kconfig | 16 + sound/soc/sof/intel/Makefile | 4 +- sound/soc/sof/intel/hda.h | 3 + sound/soc/sof/intel/mtl.c | 800 ++++++++++++++++++++++++++++++++++++ sound/soc/sof/intel/mtl.h | 76 ++++ sound/soc/sof/intel/pci-mtl.c | 71 ++++ sound/soc/sof/intel/shim.h | 1 + 8 files changed, 972 insertions(+), 1 deletion(-) commit ab222a4aaecfafece1516c775143e1cb9eb31612 Author: Bard Liao Date: Wed Jun 15 16:43:47 2022 +0800 ASoC: SOC: Intel: introduce cl_init callback The code loader init sequences are different between versions of Intel platforms. Have a cl_init callback allows us to reuse the common code. No function changed. Signed-off-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220615084348.3489-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/apl.c | 1 + sound/soc/sof/intel/cnl.c | 2 ++ sound/soc/sof/intel/hda-loader.c | 15 ++++++++++++--- sound/soc/sof/intel/hda.h | 1 + sound/soc/sof/intel/icl.c | 1 + sound/soc/sof/intel/shim.h | 1 + sound/soc/sof/intel/tgl.c | 4 ++++ 7 files changed, 22 insertions(+), 3 deletions(-) commit 2aa4abed37927b9bc5db60dd5d440a7a47435a92 Author: Casper Andersson Date: Tue Jun 14 08:32:23 2022 +0200 net: bridge: allow add/remove permanent mdb entries on disabled ports Adding mdb entries on disabled ports allows you to do setup before accepting any traffic, avoiding any time where the port is not in the multicast group. Signed-off-by: Casper Andersson Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_mdb.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit fe63ec97e394aaff1d5af1da7f052e785470162c Author: Lorenzo Bianconi Date: Mon Jun 13 09:51:50 2022 -0700 i40e: add xdp frags support to ndo_xdp_xmit Add the capability to map non-linear xdp frames in XDP_TX and ndo_xdp_xmit callback. Tested-by: Sarkar Tirthendu Signed-off-by: Lorenzo Bianconi Tested-by: George Kuruvinakunnel Signed-off-by: Tony Nguyen Signed-off-by: David S. Miller drivers/net/ethernet/intel/i40e/i40e_txrx.c | 87 ++++++++++++++++++++--------- 1 file changed, 62 insertions(+), 25 deletions(-) commit 55eb9a6c8bf3e2099863118ef53e02d9f44f85a8 Author: Joe Lawrence Date: Thu Jun 2 16:32:33 2022 -0400 selftests/livepatch: better synchronize test_klp_callbacks_busy The test_klp_callbacks_busy module conditionally blocks a future livepatch transition by busy waiting inside its workqueue function, busymod_work_func(). After scheduling this work, a test livepatch is loaded, introducing the transition under test. Both events are marked in the kernel log for later verification, but there is no synchronization to ensure that busymod_work_func() logs its function entry message before subsequent selftest commands log their own messages. This can lead to a rare test failure due to unexpected ordering like: --- expected +++ result @@ -1,7 +1,7 @@ % modprobe test_klp_callbacks_busy block_transition=Y test_klp_callbacks_busy: test_klp_callbacks_busy_init -test_klp_callbacks_busy: busymod_work_func enter % modprobe test_klp_callbacks_demo +test_klp_callbacks_busy: busymod_work_func enter livepatch: enabling patch 'test_klp_callbacks_demo' livepatch: 'test_klp_callbacks_demo': initializing patching transition test_klp_callbacks_demo: pre_patch_callback: vmlinux Force the module init function to wait until busymod_work_func() has started (and logged its message), before exiting to the next selftest steps. Fixes: 547840bd5ae5 ("selftests/livepatch: simplify test-klp-callbacks busy target tests") Signed-off-by: Joe Lawrence Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20220602203233.979681-1-joe.lawrence@redhat.com lib/livepatch/test_klp_callbacks_busy.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9794ef5a68430946da2dfe7342be53b50bce9a41 Author: Ivan Bornyakov Date: Sun Jun 12 21:19:34 2022 +0300 net: phy: marvell-88x2222: set proper phydev->port phydev->port was not set and always reported as PORT_TP. Set phydev->port according to inserted SFP module. Signed-off-by: Ivan Bornyakov Signed-off-by: David S. Miller drivers/net/phy/marvell-88x2222.c | 2 ++ 1 file changed, 2 insertions(+) commit 4edf738d4c7989c315e37d4d61e34c94557b6ed2 Author: Sameer Pujar Date: Wed Jun 15 10:08:34 2022 +0530 ASoC: tegra: Fix MBDRC bypass mode check MBDRC supports different modes of operation. There is no configuration required for bypass mode. The hw_params() call does not filter bypass mode correctly and it leads to following Smatch static checker warning: sound/soc/tegra/tegra210_mbdrc.c:778 tegra210_mbdrc_hw_params() warn: bitwise AND condition is false here Fix this condition by using proper mode mask and just return for bypass mode. Reported-by: Dan Carpenter Fixes: 7358a803c778 ("ASoC: tegra: Add Tegra210 based OPE driver") Signed-off-by: Sameer Pujar Link: https://lore.kernel.org/r/1655267914-24702-1-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown sound/soc/tegra/tegra210_mbdrc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5983a8a4a4dc13b5f192212a5e744eb303cd65c2 Author: Sameer Pujar Date: Wed Jun 15 13:34:37 2022 +0530 ASoC: tegra: Fix clock DAI format on Tegra210 I2S reset failures are seen on Tegra210 and later platforms. This indicates absence of I2S bit clock, which is required to perform the reset operation. Following failures are seen with I2S based tests on Tegra210 and later: tegra210-i2s 2901100.i2s: timeout: failed to reset I2S for playback tegra210-i2s 2901100.i2s: ASoC: PRE_PMU: I2S2 RX event failed: -110 tegra210-i2s 2901100.i2s: timeout: failed to reset I2S for capture tegra210-i2s 2901100.i2s: ASoC: PRE_PMU: I2S2 TX event failed: -110 The commit d92ad6633fa7 ("ASoC: tegra: Update to use set_fmt_new callback") regressed I2S functionality on Tegra platforms. Basically it flipped clock provider and consumer DAI formats. This configures Tegra I2S in consumer mode by default now and there is none to provide bit clock during loopback tests. The external codec based tests also fail because both Tegra I2S and codec I2S get configured in consumer mode. ASoC core flips the DAI format before calling set_fmt() for CPU DAIs. This is negated in above commit. Fix this by swapping SND_SOC_DAIFMT_BC_FC and SND_SOC_DAIFMT_BP_FP switch cases. Fixes: d92ad6633fa7 ("ASoC: tegra: Update to use set_fmt_new callback") Signed-off-by: Sameer Pujar Cc: Charles Keepax Link: https://lore.kernel.org/r/1655280277-4701-1-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown sound/soc/tegra/tegra210_i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3a51e969fa90da2a904597249a772224243ab4b5 Author: Radhey Shyam Pandey Date: Thu Jun 9 22:23:35 2022 +0530 dt-bindings: net: xilinx: document xilinx emaclite driver binding Add basic description for the xilinx emaclite driver DT bindings. Signed-off-by: Radhey Shyam Pandey Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller .../devicetree/bindings/net/xlnx,emaclite.yaml | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit e91b3b618494ad39d7f48c07185beec2d323b95f Merge: 5cb3ab50a39f c5bddecbb97b Author: David S. Miller Date: Wed Jun 15 09:07:58 2022 +0100 Merge branch 'ipa-simplify-completion-stats' Alex Elder says: ==================== net: ipa: simplify completion statistics The first patch in this series makes the name used for variables representing a TRE ring be consistent everywhere. The second renames two structure fields to better represent their purpose. The last four rework a little code that manages some tranaction and byte transfer statistics maintained mainly for TX endpoints. For the most part this series is refactoring. The last one also includes the first step toward no longer assuming an event ring is dedicated to a single channel. ==================== Signed-off-by: David S. Miller commit c5bddecbb97bcf0400354dc954cdbd89276e0ddb Author: Alex Elder Date: Mon Jun 13 12:17:59 2022 -0500 net: ipa: rework gsi_channel_tx_update() Rename gsi_channel_tx_update() to be gsi_trans_tx_completed(), and pass it just the transaction pointer, deriving the channel from the transaction. Update the comments above the function to provide a more concise description of how statistics for TX endpoints are maintained and used. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/gsi.c | 50 +++++++++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 27 deletions(-) commit dbad2fa71914a6a1a41bcba8bdc3e9213a982f82 Author: Alex Elder Date: Mon Jun 13 12:17:58 2022 -0500 net: ipa: stop counting total RX bytes and transactions In gsi_evt_ring_rx_update(), we update each transaction so its len field reflects the actual number of bytes received. In the process, the total number of transactions and bytes processed on the channel are summed, and added to a running total for the channel. But we don't actually use those running totals for RX endpoints. They're maintained for TX channels to support CoDel when they are associated with a "real" network device. So stop maintaining these totals for RX endpoints, and update the comment where the fields are defined to make it clear they're only valid for TX channels. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/gsi.c | 8 -------- drivers/net/ipa/gsi.h | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) commit 65d39497fab609f9b454d76b744fd463a441fecf Author: Alex Elder Date: Mon Jun 13 12:17:57 2022 -0500 net: ipa: simplify TX completion statistics When a TX request is issued, its channel's accumulated byte and transaction counts are recorded. This currently does *not* take into account the transaction being committed. Later, when the transaction completes, the number of bytes and transactions that have completed since the transaction was committed are reported to the network stack. The transaction and its byte count are accounted for at that time. Instead, record the transaction and its bytes in the counts recorded at commit time. This avoids the need to do so when the transaction completes, and provides a (small) simplification of that code. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/gsi.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 4e0f28e9ee4b6d690ba6d617e5d0524327d0d610 Author: Alex Elder Date: Mon Jun 13 12:17:56 2022 -0500 net: ipa: introduce gsi_trans_tx_committed() Create a new function that encapsulates recording information needed for TX channel statistics when a transaction is committed. Record the accumulated length in the transaction before the call (for both RX and TX), so it can be used when updating TX statistics. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/gsi.c | 11 +++++++++++ drivers/net/ipa/gsi_private.h | 9 +++++++++ drivers/net/ipa/gsi_trans.c | 11 +++-------- drivers/net/ipa/gsi_trans.h | 7 ++++--- 4 files changed, 27 insertions(+), 11 deletions(-) commit 3eeabea6c895ee9f3f155fede65904d9bd54238a Author: Alex Elder Date: Mon Jun 13 12:17:55 2022 -0500 net: ipa: rename two transaction fields There are two fields in a GSI transaction that keep track of TRE counts. The first represents the number of TREs reserved for the transaction in the TRE ring; that's currently named "tre_count". The second is the number of TREs that are actually *used* by the transaction at the time it is committed. Rename the "tre_count" field to be "rsvd_count", to make its meaning a little more specific. The "_count" is present in the name mainly to avoid interpreting it as a reserved (not-to-be-used) field. This name also distinguishes it from the "tre_count" field associated with a channel. Rename the "used" field to be "used_count", to match the convention used for reserved TREs. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/gsi_trans.c | 41 +++++++++++++++++++++-------------------- drivers/net/ipa/gsi_trans.h | 8 ++++---- 2 files changed, 25 insertions(+), 24 deletions(-) commit 2295947bdaa6c34a019793ec5f49517b8b7942b3 Author: Alex Elder Date: Mon Jun 13 12:17:54 2022 -0500 net: ipa: use "tre_ring" for all TRE ring local variables All local variables that represent event rings are named "ring". All but two functions that represent a channel's TRE ring with a local variable use the name "tre_ring". For consistency, use that name in the two functions that don't fit the pattern. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/gsi_trans.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 8d2ba05b099aedfcece0326a5bbb2e7cc33261ae Author: Jani Nikula Date: Fri Jun 10 17:10:27 2022 +0300 drm/i915/bios: split ddi port parsing and debug printing Split ddi port parsing and debug printing to clarify the functional parts of parse_ddi_port(), which are quite small nowadays. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/34e0dd92b7f7e9076df1f01b542347e599ec6653.1654870175.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_bios.c | 65 ++++++++++++++++++------------- 1 file changed, 37 insertions(+), 28 deletions(-) commit c78783f3227f41053e9a44f536d13f05383b875a Author: Jani Nikula Date: Fri Jun 10 17:10:26 2022 +0300 drm/i915/bios: no need to pass i915 to parse_ddi_port() i915 is available via devdata, grab it there instead of passing. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/45c97c93bb9262c08aefa7b4bfe31f3f3481c998.1654870175.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_bios.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 869968225718ec7d77c418e2f6be996206d0428e Author: Jani Nikula Date: Fri Jun 10 17:10:25 2022 +0300 drm/i915/bios: use dvi and hdmi support helpers Improve clarity by using the helpers we have. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/3a0b52593f19a465dc0dd898db5f6bf13537d734.1654870175.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_bios.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f777316e52e14059a6a1df45cbf39a93ac49a593 Merge: 56ec3e755bd1 f5e829f92a49 Author: Takashi Iwai Date: Wed Jun 15 07:47:44 2022 +0200 Merge branch 'topic/ctl-enhancements' into for-next Pull ALSA control enhancement patches. One is the faster lookup of control elements, and another is to introduce the input data validation. Signed-off-by: Takashi Iwai commit f5e829f92a494a0b66d309497bab4e9d10d4ce3e Author: Takashi Iwai Date: Thu Jun 9 14:02:19 2022 +0200 ALSA: control: Add input validation This patch adds a new feature to enable the validation of input data to control elements in the ALSA core side. When CONFIG_SND_CTL_INPUT_VALIDATION is set, ALSA core verifies whether the each input value via control API is in the defined ranges, also checks whether it's aligned to the defined steps. If an invalid value is detected, ALSA core returns -EINVAL error immediately without passing further to the driver's callback. So this is a kind of hardening for (badly written) drivers that have no proper error checks, at the cost of a slight performance overhead. Technically seen, this reuses a part of the existing validation code for CONFIG_SND_CTL_DEBUG case with a slight modification to suppress error prints for the input validation. Link: https://lore.kernel.org/r/20220609120219.3937-5-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/Kconfig | 10 ++++++++ sound/core/control.c | 69 +++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 59 insertions(+), 20 deletions(-) commit 4e54316ad2485dedf8570fc2afa6fa6ce32db207 Author: Takashi Iwai Date: Thu Jun 9 14:02:18 2022 +0200 ALSA: control: Drop superfluous ifdef CONFIG_SND_CTL_DEBUG Compilers should be smart enough to optimize out the dead functions, so we don't need to define ugly dummy functions with ifdef. Link: https://lore.kernel.org/r/20220609120219.3937-4-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/control.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 1b7ec5143c34f167266fa21245d99bacb4db4aa6 Author: Takashi Iwai Date: Thu Jun 9 14:02:17 2022 +0200 ALSA: control: Rename CONFIG_SND_CTL_VALIDATION to CONFIG_SND_CTL_DEBUG The purpose of CONFIG_SND_CTL_VALIDATION is rather to enable the debugging feature for the control API. The validation is only a part of it. Let's rename it to be more explicit and intuitive. While we're at it, let's advertise, give more comment to recommend this feature for development in the kconfig help text. Link: https://lore.kernel.org/r/20220609120219.3937-3-tiwai@suse.de Signed-off-by: Takashi Iwai include/sound/control.h | 2 +- sound/core/Kconfig | 17 +++++++++++------ sound/core/control.c | 4 ++-- 3 files changed, 14 insertions(+), 9 deletions(-) commit 2c7463d070c4e49ff850322d4f0321e97b0b6740 Author: Takashi Iwai Date: Thu Jun 9 14:02:16 2022 +0200 ASoC: topology: Drop superfluous check of CONFIG_SND_CTL_VALIDATION The compiler must be clever enough to optimize out for the no-op when CONFIG_SND_CTL_VALIDATION is disabled. Let's drop the superfluous check. Link: https://lore.kernel.org/r/20220609120219.3937-2-tiwai@suse.de Signed-off-by: Takashi Iwai sound/soc/soc-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c27e1efb61c545f36c450ef60862df9251d239a4 Author: Takashi Iwai Date: Fri Jun 10 08:45:37 2022 +0200 ALSA: control: Use xarray for faster lookups The control elements are managed in a single linked list and we traverse the whole list for matching each numid or ctl id per every inquiry of a control element. This is OK-ish for a small number of elements but obviously it doesn't scale. Especially the matching with the ctl id takes time because it checks each field of the snd_ctl_id element, e.g. the name string is matched with strcmp(). This patch adds the hash tables with Xarray for improving the lookup speed of a control element. There are two xarray tables added to the card; one for numid and another for ctl id. For the numid, we use the numid as the index, while for the ctl id, we calculate a hash key. The lookup is done via a single xa_load() execution. As long as the given control element is found on the Xarray table, that's fine, we can give back a quick lookup result. The problem is when no entry hits on the table, and for this case, we have a slight optimization. Namely, the driver checks whether we had a collision on Xarray table, and do a fallback search (linear lookup of the full entries) only if a hash key collision happened beforehand. So, in theory, the inquiry for a non-existing element might take still time even with this patch in a worst case, but this must be pretty rare. The feature is enabled via CONFIG_SND_CTL_FAST_LOOKUP, which is turned on as default. For simplicity, the option can be turned off only when CONFIG_EXPERT is set ("You are expert? Then you manage 1000 knobs"). Link: https://lore.kernel.org/r/20211028130027.18764-1-tiwai@suse.de Link: https://lore.kernel.org/r/20220609180504.775-1-tiwai@suse.de Link: https://lore.kernel.org/all/cover.1653813866.git.quic_rbankapu@quicinc.com/ Link: https://lore.kernel.org/r/20220610064537.18660-1-tiwai@suse.de Signed-off-by: Takashi Iwai include/sound/core.h | 6 ++ sound/core/Kconfig | 10 +++ sound/core/control.c | 180 ++++++++++++++++++++++++++++++++++++++++++--------- sound/core/init.c | 4 ++ 4 files changed, 168 insertions(+), 32 deletions(-) commit 5cb3ab50a39f365eb7d78a2b11711d6861477734 Merge: 68d5428931c6 c1804463e5c6 Author: Jakub Kicinski Date: Tue Jun 14 22:35:18 2022 -0700 Merge branch 'support-mt7531-on-bpi-r2-pro' Frank Wunderlich says: ==================== Support mt7531 on BPI-R2 Pro This Series add Support for the mt7531 switch on Bananapi R2 Pro board. This board uses port5 of the switch to conect to the gmac0 of the rk3568 SoC. Currently CPU-Port is hardcoded in the mt7530 driver to port 6. Compared to v1 the reset-Patch was dropped as it was not needed and CPU-Port-changes are completely rewriten based on suggestions/code from Vladimir Oltean (many thanks to this). In DTS Patch i only dropped the status-property that was not needed/ignored by driver. Due to the Changes i also made a regression test on mt7623 bpi-r2 (mt7623 soc + mt7530) and bpi-r64 (mt7622 soc + mt7531) with cpu- port 6. Tests were done directly (ipv4 config on dsa user port) and with vlan-aware bridge including vlan that was tagged outgoing on dsa user port. ==================== Link: https://lore.kernel.org/r/20220610170541.8643-1-linux@fw-web.de Signed-off-by: Jakub Kicinski commit c1804463e5c6a2bf5ab3e278b9d360c25fa49af2 Author: Frank Wunderlich Date: Fri Jun 10 19:05:41 2022 +0200 arm64: dts: rockchip: Add mt7531 dsa node to BPI-R2-Pro board Add Device Tree node for mt7531 switch connected to gmac0. Signed-off-by: Frank Wunderlich Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit ae07485d7a1d8dbabf5211043f21987a268c898b Author: Frank Wunderlich Date: Fri Jun 10 19:05:40 2022 +0200 dt-bindings: net: dsa: make reset optional and add rgmii-mode to mt7531 A board may have no independent reset-line, so reset cannot be used inside switch driver. E.g. on Bananapi-R2 Pro switch and gmac are connected to same reset-line. Resets should be acquired only to 1 device/driver. This prevents reset to be bound to switch-driver if reset is already used for gmac. If reset is only used by switch driver it resets the switch *and* the gmac after the mdio bus comes up resulting in mdio bus goes down. It takes some time until all is up again, switch driver tries to read from mdio, will fail and defer the probe. On next try the reset does the same again. Make reset optional for such boards. Allow port 5 as cpu-port and phy-mode rgmii for mt7531. - MT7530 supports RGMII on port 5 and RGMII/TRGMII on port 6. - MT7531 supports on port 5 RGMII and SGMII (dual-sgmii) and SGMII on port 6. Signed-off-by: Frank Wunderlich Reviewed-by: Rob Herring Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 1f9a6abecf538cc73635f6082677a2f4dc9c89a4 Author: Frank Wunderlich Date: Fri Jun 10 19:05:39 2022 +0200 net: dsa: mt7530: get cpu-port via dp->cpu_dp instead of constant Replace last occurences of hardcoded cpu-port by cpu_dp member of dsa_port struct. Now the constant can be dropped. Suggested-by: Vladimir Oltean Signed-off-by: Frank Wunderlich Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski drivers/net/dsa/mt7530.c | 27 ++++++++++++++++++++------- drivers/net/dsa/mt7530.h | 1 - 2 files changed, 20 insertions(+), 8 deletions(-) commit 6e19bc26cccdd34739b8c42aba2758777d18b211 Author: Frank Wunderlich Date: Fri Jun 10 19:05:38 2022 +0200 net: dsa: mt7530: rework mt753[01]_setup Enumerate available cpu-ports instead of using hardcoded constant. Suggested-by: Vladimir Oltean Signed-off-by: Frank Wunderlich Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski drivers/net/dsa/mt7530.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit a9c317417c27f28e10031133c6cba2441c670ebc Author: Frank Wunderlich Date: Fri Jun 10 19:05:37 2022 +0200 net: dsa: mt7530: rework mt7530_hw_vlan_{add,del} Rework vlan_add/vlan_del functions in preparation for dynamic cpu port. Currently BIT(MT7530_CPU_PORT) is added to new_members, even though mt7530_port_vlan_add() will be called on the CPU port too. Let DSA core decide when to call port_vlan_add for the CPU port, rather than doing it implicitly. We can do autonomous forwarding in a certain VLAN, but not add br0 to that VLAN and avoid flooding the CPU with those packets, if software knows it doesn't need to process them. Suggested-by: Vladimir Oltean Signed-off-by: Frank Wunderlich Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski drivers/net/dsa/mt7530.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) commit e0dda311974114c283a52ebacf5e75683c07f89a Author: Frank Wunderlich Date: Fri Jun 10 19:05:36 2022 +0200 dt-bindings: net: dsa: convert binding for mediatek switches Convert txt binding to yaml binding for Mediatek switches. Signed-off-by: Frank Wunderlich Reviewed-by: Rob Herring Signed-off-by: Jakub Kicinski .../bindings/net/dsa/mediatek,mt7530.yaml | 406 +++++++++++++++++++++ .../devicetree/bindings/net/dsa/mt7530.txt | 327 ----------------- 2 files changed, 406 insertions(+), 327 deletions(-) commit 68d5428931c67279a0b065e214624684b09efdf8 Merge: 6ac6dc746d70 87c0a3c6766e Author: Jakub Kicinski Date: Tue Jun 14 21:51:07 2022 -0700 Merge branch 'mlxsw-remove-xm-support' Ido Schimmel says: ==================== mlxsw: Remove XM support The XM was supposed to be an external device connected to the Spectrum-{2,3} ASICs using dedicated Ethernet ports. Its purpose was to increase the number of routes that can be offloaded to hardware. This was 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. Testing was done over an emulator and dedicated setups in the lab, but the product was discontinued before shipping to customers. Therefore, in order to remove dead code and reduce complexity of the code base, revert the three patchsets that added XM support. ==================== Link: https://lore.kernel.org/r/20220613132116.2021055-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit 87c0a3c6766ecda4bccd04a9f904551222d37de8 Author: Petr Machata Date: Mon Jun 13 16:21:16 2022 +0300 mlxsw: Revert "Prepare for XM implementation - LPM trees" This reverts commit 923ba95ea22d ("Merge branch 'mlxsw-spectrum-prepare-for-xm-implementation-lpm-trees'"). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/reg.h | 83 ----------------- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 100 +++++++-------------- .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 11 --- 3 files changed, 31 insertions(+), 163 deletions(-) commit 725ff53204435655d666d6c366fe71a251054afc Author: Petr Machata Date: Mon Jun 13 16:21:15 2022 +0300 mlxsw: Revert "Prepare for XM implementation - prefix insertion and removal" This reverts commit e7086213f7b4 ("Merge branch 'mlxsw-spectrum-prepare-for-xm-implementation-prefix-insertion-and-removal'"). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/reg.h | 8 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 736 ++++++--------------- .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 54 -- 3 files changed, 209 insertions(+), 589 deletions(-) commit 6a4b02b8fa402e85b7da9c380c90395b7129f6c0 Author: Petr Machata Date: Mon Jun 13 16:21:14 2022 +0300 mlxsw: Revert "Introduce initial XM router support" This reverts commit 75c2a8fe8e39 ("Merge branch 'mlxsw-introduce-initial-xm-router-support'"). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/Makefile | 1 - drivers/net/ethernet/mellanox/mlxsw/cmd.h | 30 - drivers/net/ethernet/mellanox/mlxsw/core.c | 12 - drivers/net/ethernet/mellanox/mlxsw/core.h | 12 +- drivers/net/ethernet/mellanox/mlxsw/minimal.c | 3 +- drivers/net/ethernet/mellanox/mlxsw/pci.c | 33 +- drivers/net/ethernet/mellanox/mlxsw/reg.h | 585 +-------------- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 5 - .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 23 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 10 - .../ethernet/mellanox/mlxsw/spectrum_router_xm.c | 812 --------------------- 11 files changed, 8 insertions(+), 1518 deletions(-) commit 6ac6dc746d70ef9b4ac835d98ac1baf63a810c57 Merge: 7e5e8ec7dbd8 cdcdce948d64 Author: Jakub Kicinski Date: Tue Jun 14 19:09:39 2022 -0700 Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Saeed Mahameed says: ==================== mlx5-next: updates 2022-06-14 1) Updated HW bits and definitions for upcoming features 1.1) vport debug counters 1.2) flow meter 1.3) Execute ASO action for flow entry 1.4) enhanced CQE compression 2) Add ICM header-modify-pattern RDMA API Leon Says ========= SW steering manipulates packet's header using "modifying header" actions. Many of these actions do the same operation, but use different data each time. Currently we create and keep every one of these actions, which use expensive and limited resources. Now we introduce a new mechanism - pattern and argument, which splits a modifying action into two parts: 1. action pattern: contains the operations to be applied on packet's header, mainly set/add/copy of fields in the packet 2. action data/argument: contains the data to be used by each operation in the pattern. This way we reuse same patterns with different arguments to create new modifying actions, and since many actions share the same operations, we end up creating a small number of patterns that we keep in a dedicated cache. These modify header patterns are implemented as new type of ICM memory, so the following kernel patch series add the support for this new ICM type. ========== * 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux: net/mlx5: Add bits and fields to support enhanced CQE compression net/mlx5: Remove not used MLX5_CAP_BITS_RW_MASK net/mlx5: group fdb cleanup to single function net/mlx5: Add support EXECUTE_ASO action for flow entry net/mlx5: Add HW definitions of vport debug counters net/mlx5: Add IFC bits and enums for flow meter RDMA/mlx5: Support handling of modify-header pattern ICM area net/mlx5: Manage ICM of type modify-header pattern net/mlx5: Introduce header-modify-pattern ICM properties ==================== Link: https://lore.kernel.org/r/20220614184028.51548-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 15ec76fb29be31df2bccb30fc09875274cba2776 Author: Xiu Jianfeng Date: Tue Jun 14 10:14:49 2022 +0800 selinux: Add boundary check in put_entry() Just like next_entry(), boundary check is necessary to prevent memory out-of-bound access. Signed-off-by: Xiu Jianfeng Signed-off-by: Paul Moore security/selinux/ss/policydb.h | 2 ++ 1 file changed, 2 insertions(+) commit 2595fe04a44d8ac7a56db27dbd1c54698d97fc0b Author: Alex Deucher Date: Fri Jun 10 11:17:59 2022 -0400 drm/amdgpu/display: make FP handling in Makefiles consistent Use the same pattern as the DML Makefile and while we are here add a missing x86 guard around the msse flags for DCN3.2.x. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile | 3 +-- drivers/gpu/drm/amd/display/dc/dcn201/Makefile | 1 - drivers/gpu/drm/amd/display/dc/dcn30/Makefile | 6 ++---- drivers/gpu/drm/amd/display/dc/dcn302/Makefile | 8 +++++++- drivers/gpu/drm/amd/display/dc/dcn32/Makefile | 5 +++-- drivers/gpu/drm/amd/display/dc/dcn321/Makefile | 5 +++-- 6 files changed, 16 insertions(+), 12 deletions(-) commit 4e1db0119c64fd81509005a961790d263e99b21b Author: Alex Deucher Date: Tue Jun 14 09:57:26 2022 -0400 Revert "drm/amdgpu/display: Protect some functions with CONFIG_DRM_AMD_DC_DCN" This reverts commit d8e4fb9112e88d8d87ffbc38fa511e7118042d4f. This is no longer necessary as newer patches require these functions without CONFIG_DRM_AMD_DC_DCN. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ---- 1 file changed, 4 deletions(-) commit 914da384ae9a77079314f07022c18063c7e77778 Author: Alex Deucher Date: Fri Jun 10 11:38:05 2022 -0400 drm/amdkfd: fix warning when CONFIG_HSA_AMD_P2P is not set drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1542:11: warning: variable 'i' set but not used [-Wunused-but-set-variable] Reviewed-by: Felix Kuehling Acked-by: Christian König Reported-by: kernel test robot Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 68ad7f90c790a178f47ef08408d97a81cbb71b37 Author: Yifan Zhang Date: Sun Jun 12 12:12:34 2022 +0800 drm/amdgpu: remove redundant enable_mes and enable_mes_kiq enable_mes and enable_mes_kiq are set in both device init and MES IP init. Leave the ones in MES IP init, since it is a more accurate way to judge from GC IP version. Signed-off-by: Yifan Zhang Acked-by: Alex Deucher Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 -------- 1 file changed, 8 deletions(-) commit ba8b460445f8d19d530646729c29319c278dbb38 Author: Joshua Aberback Date: Thu May 28 11:11:34 2020 -0400 drm/amd/display: Blank for uclk OC in dm instead of dc [Why] All displays need to be blanked during the uclk OC interface so that we can guarantee pstate switching support. If the display config doesn't support pstate switching, only using core_link_disable_stream will not enable it as the front-end is untouched. We need to go through the full plane removal sequence to properly program the pipe to allow pstate switching. [How] - guard clk_mgr functions with non-NULL checks Acked-by: Alan Liu Signed-off-by: Joshua Aberback Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 34 +++++++++++--------------------- drivers/gpu/drm/amd/display/dc/dc.h | 10 ++-------- 2 files changed, 14 insertions(+), 30 deletions(-) commit ac78fa502afa539cce3a285e50d7fefaf4d2115e Author: Martin Leung Date: Wed Oct 30 14:19:30 2019 -0400 drm/amd/display: Add null check to dc_submit_i2c_oem [why] dc_submit_i2c_oem could be called with ddc null [how] add null check and fail the call instead Acked-by: Alan Liu Signed-off-by: Martin Leung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit ac31a24d9188a9599dfbce7664cb11e6292873a5 Author: Charlene Liu Date: Fri Apr 3 21:06:53 2020 -0400 drm/amd/display: FVA timing adjustment [why] need to add timing adjustment for fva. [how] add hook to optc and hwseq. Acked-by: Alan Liu Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 1 + 1 file changed, 1 insertion(+) commit ebfb15262af3bec6c3cc263ce04164e44eea4b30 Author: Harry VanZyllDeJong Date: Mon May 10 19:30:24 2021 -0400 drm/amd/display: Add vrr_active_variable to dc_stream_update [WHY] The display driver on some OSes need to track it in order to perform memory clock switching decisions. [HOW] Propagate the vrr active state to dirty bit so that on mode set it disables dynamic memory clock switching. Acked-by: Alan Liu Signed-off-by: Harry VanZyllDeJong Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++ drivers/gpu/drm/amd/display/dc/dc_stream.h | 1 + drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 2 +- drivers/gpu/drm/amd/display/modules/inc/mod_freesync.h | 3 +-- 4 files changed, 6 insertions(+), 3 deletions(-) commit 3de58f22f544ec9c692993fb1f3bc77163d3d5d8 Author: Felipe Clark Date: Fri Mar 26 15:01:20 2021 -0400 drm/amd/display: Pass vrr mode to dcn [WHY] New features will require knowing the vrr mode for their enablement. [HOW] Pass the state via a member of dc_stream. Acked-by: Alan Liu Signed-off-by: Felipe Clark Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_stream.h | 1 + 1 file changed, 1 insertion(+) commit 9a4c9de4838fd8ccfcfcfdcd7bd472dddd11f264 Author: Ahmad Othman Date: Thu Aug 1 15:05:04 2019 -0400 drm/amd/display: Adding VTEM to dc [Why] Video Timing Extended Metadata packet (VTEM) is required for features like VRR and FVA [How] Adding support for VTEM transmission to stream encoders in DCN20 and DCN30 as part of FVA support Acked-by: Alan Liu Signed-off-by: Ahmad Othman Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 6 +++++- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 14 +++++++++++++- drivers/gpu/drm/amd/display/dc/dc_stream.h | 2 ++ .../gpu/drm/amd/display/dc/dcn20/dcn20_stream_encoder.c | 1 + .../drm/amd/display/dc/dcn30/dcn30_dio_stream_encoder.c | 1 + drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 1 + 6 files changed, 23 insertions(+), 2 deletions(-) commit 28fdd0c32daf9a50a606530d54784fcfa29d88b7 Author: Nicholas Kazlauskas Date: Tue May 14 09:19:01 2019 -0400 drm/amd/display: Copy hfvsif_infopacket when stream update [Why & How] Miss to copy hfvsif_infopacket when copying stream updates. Check and copy it. Acked-by: Alan Liu Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++ 1 file changed, 3 insertions(+) commit 2bbb54bbacd674c692306351d1be5a9b5e61a1e4 Author: Ahmad Othman Date: Mon Feb 4 16:11:44 2019 -0500 drm/amd/display: Add support for HF-VSIF [Why] - Currently there is no support for HF-VSIF - The current support of VSIF is limited to H14b infoframe [How] - refactor VSIF - Added new builder for HF-VSIF - Added the HF-VSIF packet to DisplayTarget - Updates DC to apply HF-VSIF updates when updating streams Acked-by: Alan Liu Signed-off-by: Ahmad Othman Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 3 ++- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 11 +++++++++++ drivers/gpu/drm/amd/display/dc/dc_stream.h | 2 ++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c | 8 +++++--- 4 files changed, 20 insertions(+), 4 deletions(-) commit c2fbe663ec4f991832d67f936d3941f781884156 Author: Felipe Clark Date: Sun Mar 7 13:27:30 2021 -0500 drm/amd/display: Firmware assisted MCLK switch and FS [WHY] Memory clock switching has great potential for power savings. [HOW] The driver code was modified to notify the DMCUB firmware that it should stretch the vertical blank of frames when a memory clock switch is about to start so that no blackouts happen on the screen due to unavailability of the frame buffer. The driver logic to determine when such firmware assisted strategy can be initiated is also implemented and consists on checking prerequisites of the feature. Acked-by: Alan Liu Signed-off-by: Felipe Clark Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 8 ++++--- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 2 ++ drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 5 +++- drivers/gpu/drm/amd/display/dc/dc_stream.h | 3 ++- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 - drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 1 - drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 28 +++++++++++++--------- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.h | 11 ++++++--- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_init.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.c | 1 + .../gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 1 + .../drm/amd/display/dc/inc/hw_sequencer_private.h | 1 + .../drm/amd/display/modules/freesync/freesync.c | 5 ++++ .../gpu/drm/amd/display/modules/inc/mod_freesync.h | 4 ++++ 14 files changed, 51 insertions(+), 22 deletions(-) commit a34136a3b3526369e1b3e678590e3760e7653f0f Author: Ian Chen Date: Mon May 10 12:17:26 2021 +0800 drm/amd/display: DAL ACR, dc part, fix missing dcn30 [Why] - missing in dcn30 function - Fix a divide by 0 when ACR trigger [How] - Add IS_SMU_TIMEOUT() to dcn30_smu_send_msg_with_param - Add zero check in dcn20_update_clocks_update_dentist Acked-by: Alan Liu Signed-off-by: Ian Chen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 22 +++++++++++++++------- .../dc/clk_mgr/dcn30/dcn30_clk_mgr_smu_msg.c | 11 ++++++++++- 2 files changed, 25 insertions(+), 8 deletions(-) commit f69e98a91a01fd7c5755dd710e94a17d6e9f583f Author: Samson Tam Date: Tue Mar 9 17:23:10 2021 -0500 drm/amd/display: Fix comments [Why & how] Fix format and typo of comments. Acked-by: Alan Liu Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 1 - drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 ++++++-- .../amd/display/dc/gpio/dcn20/hw_translate_dcn20.c | 17 ++++++++++------- .../amd/display/dc/gpio/dcn21/hw_translate_dcn21.c | 17 ++++++++++------- .../amd/display/dc/gpio/dcn30/hw_translate_dcn30.c | 19 +++++++++++-------- 5 files changed, 37 insertions(+), 25 deletions(-) commit 85ee819fd08eff7617c186775fd958e6258216db Author: Oliver Logush Date: Fri Aug 13 13:44:56 2021 -0400 drm/amd/display: Drop unused privacy_mask setters and getters [Why and How] dwbc_funcs.set/get_privacy_mask isn't being used anymore, drop it Reviewed-by: Charlene Liu Acked-by: Alan Liu Signed-off-by: Oliver Logush Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h | 6 ------ 1 file changed, 6 deletions(-) commit 5f034aef8479ac80e8732958dcb66b8eda650659 Author: Aric Cyr Date: Sun Jun 5 22:50:30 2022 -0400 drm/amd/display: 3.2.190 This version brings along the following: - DP fixes - Exiting idle optimizations on mouse updates Acked-by: Hamza Mahfooz Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f51d22b0d04aa33e94d663fb63aa61e4da168523 Author: Qingqing Zhuo Date: Fri Jun 3 14:44:58 2022 -0400 drm/amd/display: update topology_update_input_v3 struct [Why] DIO parameters were missing in topology_update_intput_v3 struct. [How] Add DIO parameters in v3 struct and update in functions perspectively. Reviewed-by: Bhawanpreet Lakha Acked-by: Hamza Mahfooz Signed-off-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 2 ++ drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c | 4 ++++ drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.h | 11 +++++++++++ 3 files changed, 17 insertions(+) commit a141d2083b462505727e14d98db5fc3cd43d59c6 Author: Alvin Lee Date: Fri Jun 3 16:39:48 2022 -0400 drm/amd/display: Add debug option for exiting idle optimizations on cursor updates [Description] - Have option to exit idle opt on cursor updates for debug and optimizations purposes Reviewed-by: Samson Tam Acked-by: Hamza Mahfooz Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 5 +++-- drivers/gpu/drm/amd/display/dc/dc.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) commit 71be4b16d39ac8b25a8a04eda66cb65581e1a03c Author: hersen wu Date: Sun May 29 10:54:30 2022 -0400 drm/amd/display: dsc validate fail not pass to atomic check [Why] when 4k@144hz dp connect to dp1.4 dsc mst hub, requested bandwidth exceeds caps of dsc hub. but dsc bw valid functions, increase_dsc_bpp, try_disable_dsc, pre_validate_dsc, compute_mst_dsc_configs_for_state, do not return false to atomic check. this cause user mode initiate mode set to kernel, then cause kernel assert, system hang. [How] dsc bandwidth valid functions return pass or fail to atomic check. Reviewed-by: Wayne Lin Reviewed-by: Rodrigo Siqueira Acked-by: Hamza Mahfooz Signed-off-by: hersen wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 43 +++++++++++++++------- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.h | 2 +- 3 files changed, 35 insertions(+), 16 deletions(-) commit b840b64bc8ed3fc46f6d6aa7f97c43862a33bea5 Author: Shah Dharati Date: Tue May 31 09:58:12 2022 -0400 drm/amd/display: Fix monitor flash issue [Why & How] For a some specific monitors, when connected on boot or hot plug, monitor flash for 1/2 seconds can happen during first HDCP query operation. Ading some delay in the init sequence for these monitors fixes the issue, so it is implemented as monitor specific patch. Co-authored-by: Shah Dharati Reviewed-by: Hansen Dsouza Reviewed-by: Nicholas Kazlauskas Acked-by: Hamza Mahfooz Signed-off-by: Shah Dharati Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/hdcp/hdcp2_transition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c443514a7d6d648bc497efbe502e2a49738b94de Author: Wenjing Liu Date: Thu May 26 15:52:42 2022 -0400 drm/amd/display: lower lane count first when CR done partially fails in EQ [why] According to DP specs, in EQ DONE phase of link training, we should lower lane count when at least one CR DONE bit is set to 1, while lower link rate when all CR DONE bits are 0s. However in our code, we will treat both cases as latter. This is not exactly correct based on the specs expectation. [how] Check lane0 CR DONE bit when it is still set but CR DONE fails, we treat it as a partial CR DONE failure in EQ DONE phase, we will follow the same fallback flow as when ED DONE fails in EQ DONE phase. Reviewed-by: George Shen Acked-by: Hamza Mahfooz Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 13 +++++++------ drivers/gpu/drm/amd/display/include/link_service_types.h | 2 ++ 2 files changed, 9 insertions(+), 6 deletions(-) commit 9731dd4cadc53251ef80b3655c8d841fed52fa3d Author: Daniel Phillips Date: Mon May 30 11:21:22 2022 -0400 drm/amdkfd: Add available memory ioctl Add a new KFD ioctl to return the largest possible memory size that can be allocated as a buffer object using kfd_ioctl_alloc_memory_of_gpu. It attempts to use exactly the same accept/reject criteria as that function so that allocating a new buffer object of the size returned by this new ioctl is guaranteed to succeed, barring races with other allocating tasks. This IOCTL will be used by libhsakmt: https://www.mail-archive.com/amd-gfx@lists.freedesktop.org/msg75743.html Signed-off-by: Daniel Phillips Signed-off-by: David Yat Sin Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 38 +++++++++++++++++++++--- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 34 +++++++++++++++++++++ include/uapi/linux/kfd_ioctl.h | 14 +++++++-- 4 files changed, 81 insertions(+), 6 deletions(-) commit 1a65327a84db5b9081a51ccb1c562083f59bfcec Author: Chengming Gui Date: Mon Jun 13 14:52:54 2022 +0800 Revert "drm/amdgpu/gmc11: enable AGP aperture" This reverts commit 2cfe34e18970d26bff73c63f16c76dae22138d19. Enable AGP aperture cause SDMA page fault for gfx11.0.2, so temp disable AGP aperture until SDMA FW resolved this. Reviewed-by: Hawking Zhang Signed-off-by: Jack Gui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0.c | 7 +++---- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 1 - drivers/gpu/drm/amd/amdgpu/mmhub_v3_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_2.c | 6 +++--- 4 files changed, 9 insertions(+), 11 deletions(-) commit 272308add589bd46ddb5899685e25fc9f6a58b1e Author: Evan Quan Date: Tue Jun 7 14:40:24 2022 +0800 drm/amd/pm: enable MACO support for SMU 13.0.0 Enable BAMACO reset support for SMU 13.0.0. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 3 +- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 3 ++ .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 52 +--------------------- 3 files changed, 7 insertions(+), 51 deletions(-) commit d11737f26ffeae88350b835caa37c7449da22550 Author: Evan Quan Date: Mon Jun 6 11:21:07 2022 +0800 drm/amd/pm: enable UCLK DS feature for SMU 13.0.0 The feature is ready with latest PMFW and IFWI. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 ++ 1 file changed, 2 insertions(+) commit d6aa8424bcac64b2608452589c9a09984251c01c Author: Aurabindo Pillai Date: Fri Jun 10 13:13:31 2022 -0400 drm/amd/display: dml: move some variables to heap [Why&How] To reduce stack usage, move some variables into heap in the DML function dml32_ModeSupportAndSystemConfigurationFull() Fixes: dda4fb85e433 ("drm/amd/display: DML changes for DCN32/321") Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher .../drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 17 +++++++---------- drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h | 3 +++ 2 files changed, 10 insertions(+), 10 deletions(-) commit 1f474c8742fd53a048cc8cc4b20e20b2614397eb Author: Leo Li Date: Wed Jun 8 12:17:44 2022 -0400 drm/amd/display: Use pre-allocated temp struct for bounding box update [Why] There is a theoretical problem in prior patches for reducing the stack size of *update_bw_bounding_box() functions. By modifying the soc.clock_limits[n] struct directly, this can cause unintended behavior as the for loop attempts to swap rows in clock_limits[n]. A temporary struct is still required to make sure we stay functinoally equivalent. [How] Add a temporary clock_limits table to the SOC struct, and use it when swapping rows. Signed-off-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 33 ++++++----- .../gpu/drm/amd/display/dc/dml/dcn301/dcn301_fpu.c | 36 +++++++----- .../gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 64 +++++++++++++--------- .../drm/amd/display/dc/dml/display_mode_structs.h | 5 ++ 4 files changed, 82 insertions(+), 56 deletions(-) commit ea937ad6e925994b94d17555e4c2f2f9a99234e1 Author: Michel Dänzer Date: Fri Jun 10 15:54:26 2022 +0200 drm/amdgpu: Fix GTT size reporting in amdgpu_ioctl The commit below changed the TTM manager size unit from pages to bytes, but failed to adjust the corresponding calculations in amdgpu_ioctl. Fixes: dfa714b88eb0 ("drm/amdgpu: remove GTT accounting v2") Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1930 Bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6642 Tested-by: Martin Roukala Tested-by: Mike Lothian Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 -- 1 file changed, 2 deletions(-) commit 526e6ca5d1d5fd22c79033cf5a8eb07d98a11274 Author: Tim Huang Date: Mon Jun 6 16:27:06 2022 +0800 drm/amdgpu/pm: remove the repeated EnableGfxImu message sending The EnableGfxImu message will be issued in the set_gfx_power_up_by_imu. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit d52ea3dc65a9d504afa7a03ff24e17866670bdac Author: Tim Huang Date: Wed Jun 1 18:12:08 2022 +0800 drm/amdgpu/pm: correct the firmware flag address for SMU IP v13.0.4 For SMU IP v13.0.4, the smnMP1_FIRMWARE_FLAGS address is different, we need this to correct the reading address. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 1 + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) commit 5089c4a8ebea3c3ad9eedf038dad7098ebc06131 Author: Aurabindo Pillai Date: Tue Jun 7 22:43:42 2022 -0400 drm/amd/display: ignore modifiers when checking for format support [Why&How] There are cases where swizzle modes are set but modifiers arent. For such a userspace, we need not check modifiers while checking compatibilty in the drm hook for checking plane format. Ignore checking modifiers but check the DCN generation for the supported swizzle mode. v2: squash in unused variable removal (Alex) Signed-off-by: Aurabindo Pillai Reviewed-by: Marek Olšák Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 53 ++++++++++++++++++++--- 1 file changed, 46 insertions(+), 7 deletions(-) commit f2a5002541d0698509d4f3adfbfcc55a9c1e2dd1 Author: Yifan Zhang Date: Thu Jun 9 17:03:48 2022 +0800 drm/amd: disable GPA mode in backdoor load GPA mode should be disabled in direct load. Signed-off-by: Yifan Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 +++ 1 file changed, 3 insertions(+) commit 438eac25d033a1701d839bad16c6ad78f683a293 Author: Yifan Zhang Date: Wed Jun 8 18:29:33 2022 +0800 drm/amdgpu/discovery: enable vcn/jpeg v4_0_2 Enable vcn/jpeg 4_0_2. Signed-off-by: Yifan Zhang Reviewed-by: Alex Deucher Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) commit 72aeb6ee0c78fafc476c02d1b19b5b38defcb57f Author: Yang Wang Date: Thu Jun 9 19:20:47 2022 +0800 drm/amd/pm: fix driver reload SMC firmware fail issue for smu13 issue calltrace: [ 402.773695] [drm] failed to load ucode SMC(0x2C) [ 402.773754] [drm] psp gfx command LOAD_IP_FW(0x6) failed and response status is (0x0) [ 402.773762] [drm:psp_load_smu_fw [amdgpu]] *ERROR* PSP load smu failed! [ 402.966758] [drm:psp_v13_0_ring_destroy [amdgpu]] *ERROR* Fail to stop psp ring [ 402.966949] [drm:psp_hw_init [amdgpu]] *ERROR* PSP firmware loading failed [ 402.967116] [drm:amdgpu_device_fw_loading [amdgpu]] *ERROR* hw_init of IP block failed -22 [ 402.967252] amdgpu 0000:03:00.0: amdgpu: amdgpu_device_ip_init failed [ 402.967255] amdgpu 0000:03:00.0: amdgpu: Fatal error during GPU init if not reset mp1 state during kernel driver unload, it will cause psp load pmfw fail at the second time. add PPSMC_MSG_PrepareMp1ForUnload support for smu_v13_0_0/smu_v13_0_7 Signed-off-by: Yang Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 7 +++++++ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 ++ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 2 ++ 3 files changed, 11 insertions(+) commit 3831cd1f9ff627734096f22d8e37f72a5cabf92e Author: Yonghong Song Date: Mon Jun 13 22:55:26 2022 -0700 selftests/bpf: Avoid skipping certain subtests Commit 704c91e59fe0 ('selftests/bpf: Test "bpftool gen min_core_btf"') added a test test_core_btfgen to test core relocation with btf generated with 'bpftool gen min_core_btf'. Currently, among 76 subtests, 25 are skipped. ... #46/69 core_reloc_btfgen/enumval:OK #46/70 core_reloc_btfgen/enumval___diff:OK #46/71 core_reloc_btfgen/enumval___val3_missing:OK #46/72 core_reloc_btfgen/enumval___err_missing:SKIP #46/73 core_reloc_btfgen/enum64val:OK #46/74 core_reloc_btfgen/enum64val___diff:OK #46/75 core_reloc_btfgen/enum64val___val3_missing:OK #46/76 core_reloc_btfgen/enum64val___err_missing:SKIP ... #46 core_reloc_btfgen:SKIP Summary: 1/51 PASSED, 25 SKIPPED, 0 FAILED Alexei found that in the above core_reloc_btfgen/enum64val___err_missing should not be skipped. Currently, the core_reloc tests have some negative tests. In Commit 704c91e59fe0, for core_reloc_btfgen, all negative tests are skipped with the following condition if (!test_case->btf_src_file || test_case->fails) { test__skip(); continue; } This is too conservative. Negative tests do not fail mkstemp() and run_btfgen() should not be skipped. There are a few negative tests indeed failing run_btfgen() and this patch added 'run_btfgen_fails' to mark these tests so that they can be skipped for btfgen tests. With this, we have ... #46/69 core_reloc_btfgen/enumval:OK #46/70 core_reloc_btfgen/enumval___diff:OK #46/71 core_reloc_btfgen/enumval___val3_missing:OK #46/72 core_reloc_btfgen/enumval___err_missing:OK #46/73 core_reloc_btfgen/enum64val:OK #46/74 core_reloc_btfgen/enum64val___diff:OK #46/75 core_reloc_btfgen/enum64val___val3_missing:OK #46/76 core_reloc_btfgen/enum64val___err_missing:OK ... Summary: 1/62 PASSED, 14 SKIPPED, 0 FAILED Totally 14 subtests are skipped instead of 25. Reported-by: Alexei Starovoitov Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220614055526.628299-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/core_reloc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 96752e1ec0e0d763ccb05dfd0b6efe43a1a74f1f Author: Yonghong Song Date: Mon Jun 13 16:34:49 2022 -0700 selftests/bpf: Fix test_varlen verification failure with latest llvm With latest llvm15, test_varlen failed with the following verifier log: 17: (85) call bpf_probe_read_kernel_str#115 ; R0_w=scalar(smin=-4095,smax=256) 18: (bf) r1 = r0 ; R0_w=scalar(id=1,smin=-4095,smax=256) R1_w=scalar(id=1,smin=-4095,smax=256) 19: (67) r1 <<= 32 ; R1_w=scalar(smax=1099511627776,umax=18446744069414584320,var_off=(0x0; 0xffffffff00000000),s32_min=0,s32_max=0,u32_max=) 20: (bf) r2 = r1 ; R1_w=scalar(id=2,smax=1099511627776,umax=18446744069414584320,var_off=(0x0; 0xffffffff00000000),s32_min=0,s32_max=0,u32) 21: (c7) r2 s>>= 32 ; R2=scalar(smin=-2147483648,smax=256) ; if (len >= 0) { 22: (c5) if r2 s< 0x0 goto pc+7 ; R2=scalar(umax=256,var_off=(0x0; 0x1ff)) ; payload4_len1 = len; 23: (18) r2 = 0xffffc90000167418 ; R2_w=map_value(off=1048,ks=4,vs=1572,imm=0) 25: (63) *(u32 *)(r2 +0) = r0 ; R0=scalar(id=1,smin=-4095,smax=256) R2_w=map_value(off=1048,ks=4,vs=1572,imm=0) 26: (77) r1 >>= 32 ; R1_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) ; payload += len; 27: (18) r6 = 0xffffc90000167424 ; R6_w=map_value(off=1060,ks=4,vs=1572,imm=0) 29: (0f) r6 += r1 ; R1_w=Pscalar(umax=4294967295,var_off=(0x0; 0xffffffff)) R6_w=map_value(off=1060,ks=4,vs=1572,umax=4294967295,var_off=(0) ; len = bpf_probe_read_kernel_str(payload, MAX_LEN, &buf_in2[0]); 30: (bf) r1 = r6 ; R1_w=map_value(off=1060,ks=4,vs=1572,umax=4294967295,var_off=(0x0; 0xffffffff)) R6_w=map_value(off=1060,ks=4,vs=1572,um) 31: (b7) r2 = 256 ; R2_w=256 32: (18) r3 = 0xffffc90000164100 ; R3_w=map_value(off=256,ks=4,vs=1056,imm=0) 34: (85) call bpf_probe_read_kernel_str#115 R1 unbounded memory access, make sure to bounds check any such access processed 27 insns (limit 1000000) max_states_per_insn 0 total_states 2 peak_states 2 mark_read 1 -- END PROG LOAD LOG -- libbpf: failed to load program 'handler32_signed' The failure is due to 20: (bf) r2 = r1 ; R1_w=scalar(id=2,smax=1099511627776,umax=18446744069414584320,var_off=(0x0; 0xffffffff00000000),s32_min=0,s32_max=0,u32) 21: (c7) r2 s>>= 32 ; R2=scalar(smin=-2147483648,smax=256) 22: (c5) if r2 s< 0x0 goto pc+7 ; R2=scalar(umax=256,var_off=(0x0; 0x1ff)) 26: (77) r1 >>= 32 ; R1_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) 29: (0f) r6 += r1 ; R1_w=Pscalar(umax=4294967295,var_off=(0x0; 0xffffffff)) R6_w=map_value(off=1060,ks=4,vs=1572,umax=4294967295,var_off=(0) where r1 has conservative value range compared to r2 and r1 is used later. In llvm, commit [1] triggered the above code generation and caused verification failure. It may take a while for llvm to address this issue. In the main time, let us change the variable 'len' type to 'long' and adjust condition properly. Tested with llvm14 and latest llvm15, both worked fine. [1] https://reviews.llvm.org/D126647 Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220613233449.2860753-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/progs/test_varlen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2d1ea19f179be04f303be96129afa62545d3121e Author: Xiang wangx Date: Wed Jun 8 21:04:06 2022 +0800 remoteproc: omap_remoteproc: Fix typo in comment Delete the redundant word 'The'. Delete the redundant word 'to'. Signed-off-by: Xiang wangx Link: https://lore.kernel.org/r/20220608130406.46005-1-wangxiang@cdjrlc.com Signed-off-by: Mathieu Poirier drivers/remoteproc/omap_remoteproc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fa220c05d282e7479abe08b54e3bdffd06c25e97 Author: Miaoqian Lin Date: Sun Jun 5 12:33:34 2022 +0400 remoteproc: k3-r5: Fix refcount leak in k3_r5_cluster_of_init Every iteration of for_each_available_child_of_node() decrements the reference count of the previous node. When breaking early from a for_each_available_child_of_node() loop, we need to explicitly call of_node_put() on the child node. Add missing of_node_put() to avoid refcount leak. Fixes: 6dedbd1d5443 ("remoteproc: k3-r5: Add a remoteproc driver for R5F subsystem") Signed-off-by: Miaoqian Lin Acked-by: Suman Anna Link: https://lore.kernel.org/r/20220605083334.23942-1-linmq006@gmail.com Signed-off-by: Mathieu Poirier drivers/remoteproc/ti_k3_r5_remoteproc.c | 2 ++ 1 file changed, 2 insertions(+) commit 353d9214682e65c55cdffad8c82139a3321c5f13 Author: AngeloGioacchino Del Regno Date: Wed May 25 11:12:01 2022 +0200 rpmsg: mtk_rpmsg: Fix circular locking dependency During execution of the worker that's used to register rpmsg devices we are safely locking the channels mutex but, when creating a new endpoint for such devices, we are registering a IPI on the SCP, which then makes the SCP to trigger an interrupt, lock its own mutex and in turn register more subdevices. This creates a circular locking dependency situation, as the mtk_rpmsg channels_lock will then depend on the SCP IPI lock. [ 15.447736] ====================================================== [ 15.460158] WARNING: possible circular locking dependency detected [ 15.460161] 5.17.0-next-20220324+ #399 Not tainted [ 15.460165] ------------------------------------------------------ [ 15.460166] kworker/0:3/155 is trying to acquire lock: [ 15.460170] ffff5b4d0eaf1308 (&scp->ipi_desc[i].lock){+.+.}-{4:4}, at: scp_ipi_lock+0x34/0x50 [mtk_scp_ipi] [ 15.504958] [] but task is already holding lock: [ 15.504960] ffff5b4d0e8f1918 (&mtk_subdev->channels_lock){+.+.}-{4:4}, at: mtk_register_device_work_function+0x50/0x1cc [mtk_rpmsg] [ 15.504978] [] which lock already depends on the new lock. [ 15.504980] [] the existing dependency chain (in reverse order) is: [ 15.504982] [] -> #1 (&mtk_subdev->channels_lock){+.+.}-{4:4}: [ 15.504990] lock_acquire+0x68/0x84 [ 15.504999] __mutex_lock+0xa4/0x3e0 [ 15.505007] mutex_lock_nested+0x40/0x70 [ 15.505012] mtk_rpmsg_ns_cb+0xe4/0x134 [mtk_rpmsg] [ 15.641684] mtk_rpmsg_ipi_handler+0x38/0x64 [mtk_rpmsg] [ 15.641693] scp_ipi_handler+0xbc/0x180 [mtk_scp] [ 15.663905] mt8192_scp_irq_handler+0x44/0xa4 [mtk_scp] [ 15.663915] scp_irq_handler+0x6c/0xa0 [mtk_scp] [ 15.685779] irq_thread_fn+0x34/0xa0 [ 15.685785] irq_thread+0x18c/0x240 [ 15.685789] kthread+0x104/0x110 [ 15.709579] ret_from_fork+0x10/0x20 [ 15.709586] [] -> #0 (&scp->ipi_desc[i].lock){+.+.}-{4:4}: [ 15.731271] __lock_acquire+0x11e4/0x1910 [ 15.740367] lock_acquire.part.0+0xd8/0x220 [ 15.749813] lock_acquire+0x68/0x84 [ 15.757861] __mutex_lock+0xa4/0x3e0 [ 15.766084] mutex_lock_nested+0x40/0x70 [ 15.775006] scp_ipi_lock+0x34/0x50 [mtk_scp_ipi] [ 15.785503] scp_ipi_register+0x40/0xa4 [mtk_scp_ipi] [ 15.796697] scp_register_ipi+0x1c/0x30 [mtk_scp] [ 15.807194] mtk_rpmsg_create_ept+0xa0/0x108 [mtk_rpmsg] [ 15.818912] rpmsg_create_ept+0x44/0x60 [ 15.827660] cros_ec_rpmsg_probe+0x15c/0x1f0 [ 15.837282] rpmsg_dev_probe+0x128/0x1d0 [ 15.846203] really_probe.part.0+0xa4/0x2a0 [ 15.855649] __driver_probe_device+0xa0/0x150 [ 15.865443] driver_probe_device+0x48/0x150 [ 15.877157] __device_attach_driver+0xc0/0x12c [ 15.889359] bus_for_each_drv+0x80/0xe0 [ 15.900330] __device_attach+0xe4/0x190 [ 15.911303] device_initial_probe+0x1c/0x2c [ 15.922969] bus_probe_device+0xa8/0xb0 [ 15.933927] device_add+0x3a8/0x8a0 [ 15.944193] device_register+0x28/0x40 [ 15.954970] rpmsg_register_device+0x5c/0xa0 [ 15.966782] mtk_register_device_work_function+0x148/0x1cc [mtk_rpmsg] [ 15.983146] process_one_work+0x294/0x664 [ 15.994458] worker_thread+0x7c/0x45c [ 16.005069] kthread+0x104/0x110 [ 16.014789] ret_from_fork+0x10/0x20 [ 16.025201] [] other info that might help us debug this: [ 16.047769] Possible unsafe locking scenario: [ 16.063942] CPU0 CPU1 [ 16.075166] ---- ---- [ 16.086376] lock(&mtk_subdev->channels_lock); [ 16.097592] lock(&scp->ipi_desc[i].lock); [ 16.113188] lock(&mtk_subdev->channels_lock); [ 16.129482] lock(&scp->ipi_desc[i].lock); [ 16.140020] [] *** DEADLOCK *** [ 16.158282] 4 locks held by kworker/0:3/155: [ 16.168978] #0: ffff5b4d00008748 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x1fc/0x664 [ 16.190017] #1: ffff80000953bdc8 ((work_completion)(&mtk_subdev->register_work)){+.+.}-{0:0}, at: process_one_work+0x1fc/0x664 [ 16.215269] #2: ffff5b4d0e8f1918 (&mtk_subdev->channels_lock){+.+.}-{4:4}, at: mtk_register_device_work_function+0x50/0x1cc [mtk_rpmsg] [ 16.242131] #3: ffff5b4d05964190 (&dev->mutex){....}-{4:4}, at: __device_attach+0x44/0x190 To solve this, simply unlock the channels_lock mutex before calling mtk_rpmsg_register_device() and relock it right after, as safety is still ensured by the locking mechanism that happens right after through SCP. Fixes: 7017996951fd ("rpmsg: add rpmsg support for mt8183 SCP.") Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220525091201.14210-1-angelogioacchino.delregno@collabora.com Signed-off-by: Mathieu Poirier drivers/rpmsg/mtk_rpmsg.c | 2 ++ 1 file changed, 2 insertions(+) commit 9affc1b87ecba31458567359b5a28b0b08920a24 Author: Matt Roper Date: Fri Jun 10 16:08:01 2022 -0700 drm/i915/pvc: Adjust EU per SS according to HAS_ONE_EU_PER_FUSE_BIT() If we're treating each bit in the EU fuse register as a single EU instead of a pair of EUs, then that also cuts the number of potential EUs per subslice in half. Fixes: 5ac342ef84d7 ("drm/i915/pvc: Add SSEU changes") Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20220610230801.459577-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_sseu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abe13e9a561d6b3e82b21362c0d6dd3ecd8a5b13 Author: Shengjiu Wang Date: Sat May 21 11:35:05 2022 +0800 rpmsg: char: Add mutex protection for rpmsg_eptdev_open() There is no mutex protection for rpmsg_eptdev_open(), especially for eptdev->ept read and write operation. It may cause issues when multiple instances call rpmsg_eptdev_open() in parallel,the return state may be success or EBUSY. Fixes: 964e8bedd5a1 ("rpmsg: char: Return an error if device already open") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1653104105-16779-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mathieu Poirier drivers/rpmsg/rpmsg_char.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 393421f1854105922b99cfd90ad1169d7305dd8e Author: Krzysztof Kozlowski Date: Thu Jun 9 13:39:08 2022 +0200 ARM: dts: allwinner: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Acked-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220609113911.380368-5-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts | 40 +++++++++++----------- arch/arm/boot/dts/sun4i-a10-pcduino.dts | 6 ++-- arch/arm/boot/dts/sun7i-a20-pcduino3.dts | 6 ++-- .../boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts | 4 +-- arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 4 +-- arch/arm/boot/dts/sun8i-h3-mapleboard-mp130.dts | 6 ++-- arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts | 4 +-- arch/arm/boot/dts/sun8i-h3-nanopi.dtsi | 4 +-- arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 6 ++-- arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts | 4 +-- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 4 +-- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 4 +-- arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi | 4 +-- arch/arm/boot/dts/sunxi-libretech-all-h3-cc.dtsi | 4 +-- 14 files changed, 50 insertions(+), 50 deletions(-) commit a0bdaf59dc9218d91e0ee18f1e89ac64486a974d Author: Krzysztof Kozlowski Date: Thu Jun 9 13:39:07 2022 +0200 arm64: dts: allwinner: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Acked-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220609113911.380368-4-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 4 ++-- arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts | 4 ++-- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 4 ++-- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) commit 93270357daa949e4bed375b40d0a100ce04f3399 Author: Quentin Monnet Date: Fri Jun 10 12:26:48 2022 +0100 bpftool: Do not check return value from libbpf_set_strict_mode() The function always returns 0, so we don't need to check whether the return value is 0 or not. This change was first introduced in commit a777e18f1bcd ("bpftool: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK"), but later reverted to restore the unconditional rlimit bump in bpftool. Let's re-add it. Co-developed-by: Yafang Shao Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220610112648.29695-3-quentin@isovalent.com tools/bpf/bpftool/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 6b4384ff108874cf336fe2fb1633313c2c7620bf Author: Quentin Monnet Date: Fri Jun 10 12:26:47 2022 +0100 Revert "bpftool: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK" This reverts commit a777e18f1bcd32528ff5dfd10a6629b655b05eb8. In commit a777e18f1bcd ("bpftool: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK"), we removed the rlimit bump in bpftool, because the kernel has switched to memcg-based memory accounting. Thanks to the LIBBPF_STRICT_AUTO_RLIMIT_MEMLOCK, we attempted to keep compatibility with other systems and ask libbpf to raise the limit for us if necessary. How do we know if memcg-based accounting is supported? There is a probe in libbpf to check this. But this probe currently relies on the availability of a given BPF helper, bpf_ktime_get_coarse_ns(), which landed in the same kernel version as the memory accounting change. This works in the generic case, but it may fail, for example, if the helper function has been backported to an older kernel. This has been observed for Google Cloud's Container-Optimized OS (COS), where the helper is available but rlimit is still in use. The probe succeeds, the rlimit is not raised, and probing features with bpftool, for example, fails. A patch was submitted [0] to update this probe in libbpf, based on what the cilium/ebpf Go library does [1]. It would lower the soft rlimit to 0, attempt to load a BPF object, and reset the rlimit. But it may induce some hard-to-debug flakiness if another process starts, or the current application is killed, while the rlimit is reduced, and the approach was discarded. As a workaround to ensure that the rlimit bump does not depend on the availability of a given helper, we restore the unconditional rlimit bump in bpftool for now. [0] https://lore.kernel.org/bpf/20220609143614.97837-1-quentin@isovalent.com/ [1] https://github.com/cilium/ebpf/blob/v0.9.0/rlimit/rlimit.go#L39 Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Cc: Yafang Shao Cc: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20220610112648.29695-2-quentin@isovalent.com tools/bpf/bpftool/common.c | 8 ++++++++ tools/bpf/bpftool/feature.c | 2 ++ tools/bpf/bpftool/main.c | 6 +++--- tools/bpf/bpftool/main.h | 2 ++ tools/bpf/bpftool/map.c | 2 ++ tools/bpf/bpftool/pids.c | 1 + tools/bpf/bpftool/prog.c | 3 +++ tools/bpf/bpftool/struct_ops.c | 2 ++ 8 files changed, 23 insertions(+), 3 deletions(-) commit 544a8d75f3d6e60e160cd92dc56321484598a993 Author: Chris Morgan Date: Wed Mar 30 12:16:57 2022 -0500 i2c: mv64xxx: Add atomic_xfer method to driver Add an atomic_xfer method to the driver so that it behaves correctly when controlling a PMIC that is responsible for device shutdown. The atomic_xfer method added is similar to the one from the i2c-rk3x driver. When running an atomic_xfer a bool flag in the driver data is set, the interrupt is not unmasked on transfer start, and the IRQ handler is manually invoked while waiting for pending transfers to complete. Signed-off-by: Chris Morgan Acked-by: Gregory CLEMENT Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mv64xxx.c | 52 +++++++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 6 deletions(-) commit 09b343038e3470e4d0da45f0ee09fb42107e5314 Author: Chris Morgan Date: Fri Mar 25 13:06:25 2022 -0500 i2c: mv64xxx: Remove shutdown method from driver When I attempt to shut down (or reboot) my R8 based NTC CHIP with this i2c driver I get the following error: "i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0". Reboots are successful but shutdowns freeze. If I comment out the shutdown routine the device both reboots and shuts down successfully without receiving this error (however it does receive a warning of missing atomic_xfer). It appears that very few i2c drivers have a shutdown method, I assume because these devices are often used to communicate with PMICs (such as in my case with the R8 based NTC CHIP). I'm proposing we simply remove this method so long as it doesn't cause trouble for others downstream. I'll work on an atomic_xfer method and submit that in a different patch. Signed-off-by: Chris Morgan Acked-by: Gregory CLEMENT Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mv64xxx.c | 9 --------- 1 file changed, 9 deletions(-) commit e749e4fc900a579720bea9de05174e78f80802b1 Author: Shubhrajyoti Datta Date: Tue Jun 14 11:48:55 2022 +0530 i2c: xiic: Fix the type check for xiic_wakeup Fix the coverity warning mixed_enum_type: enumerated type mixed with another type We are passing an enum in the xiic_wakeup lets change the function parameters to reflect that. Signed-off-by: Shubhrajyoti Datta Acked-by: Michal Simek [wsa: fixed $subject with proper prefix] Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-xiic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fc386ba7211d514f2c20285cb6b9b502618634e0 Author: YueHaibing Date: Sat Jun 11 12:09:04 2022 +0800 bpf, arm: Remove unused function emit_a32_alu_r() Since commit b18bea2a45b1 ("ARM: net: bpf: improve 64-bit ALU implementation") this is unused anymore, so can remove it. Signed-off-by: YueHaibing Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220611040904.8976-1-yuehaibing@huawei.com arch/arm/net/bpf_jit_32.c | 16 ---------------- 1 file changed, 16 deletions(-) commit d6513a34926f4f4b331be115819702ca2a4682fb Author: Linus Walleij Date: Thu May 26 23:36:21 2022 +0200 dt-bindings: timer: Add Nomadik MTU binding The Nomadik MTU timer has been used in devicetrees forever but somehow we missed to add a binding for it. Fix it by simply adding it. Cc: Lee Jones Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220526213621.373727-1-linus.walleij@linaro.org Signed-off-by: Daniel Lezcano .../devicetree/bindings/timer/st,nomadik-mtu.yaml | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 9393cb13fa5d4c1ef2f1c3086af1c2cc03389bad Author: Sean Christopherson Date: Mon Jun 13 16:19:42 2022 +0000 KVM: selftests: Use kvm_has_cap(), not kvm_check_cap(), where possible Replace calls to kvm_check_cap() that treat its return as a boolean with calls to kvm_has_cap(). Several instances of kvm_check_cap() were missed when kvm_has_cap() was introduced. Reported-by: Andrew Jones Fixes: 3ea9b809650b ("KVM: selftests: Add kvm_has_cap() to provide syntactic sugar") Signed-off-by: Sean Christopherson Message-Id: <20220613161942.1586791-5-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/psci_test.c | 2 +- tools/testing/selftests/kvm/lib/x86_64/processor.c | 4 ++-- tools/testing/selftests/kvm/s390x/sync_regs_test.c | 2 +- tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c | 2 +- tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c | 6 +++--- tools/testing/selftests/kvm/x86_64/smm_test.c | 2 +- tools/testing/selftests/kvm/x86_64/state_test.c | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) commit 96f113c40d2882ac9b5e4fcac9e48c32eb030aa3 Author: Sean Christopherson Date: Mon Jun 13 16:19:41 2022 +0000 KVM: selftests: Drop a duplicate TEST_ASSERT() in vm_nr_pages_required() Remove a duplicate TEST_ASSERT() on the number of runnable vCPUs in vm_nr_pages_required() that snuck in during a rebase gone bad. Reported-by: Andrew Jones Fixes: 6e1d13bf3815 ("KVM: selftests: Move per-VM/per-vCPU nr pages calculation to __vm_create()") Signed-off-by: Sean Christopherson Message-Id: <20220613161942.1586791-4-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/kvm_util.c | 4 ---- 1 file changed, 4 deletions(-) commit ad125f309850b9cf2ba4f39729c5cc827595fac4 Author: Sean Christopherson Date: Mon Jun 13 16:19:40 2022 +0000 KVM: selftests: Call a dummy helper in VM/vCPU ioctls() to enforce type Replace the goofy static_assert on the size of the @vm/@vcpu parameters with a call to a dummy helper, i.e. let the compiler naturally complain about an incompatible type instead of homebrewing a poor replacement. Reported-by: Andrew Jones Fixes: fcba483e8246 ("KVM: selftests: Sanity check input to ioctls() at build time") Signed-off-by: Sean Christopherson Message-Id: <20220613161942.1586791-3-seanjc@google.com> Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 57 ++++++++++++---------- 1 file changed, 31 insertions(+), 26 deletions(-) commit 4f48e2e737451365bc81c3b6283036a9079bcc24 Author: Sean Christopherson Date: Mon Jun 13 16:19:39 2022 +0000 KVM: selftests: Add a missing apostrophe in comment to show ownership Add an apostrophe in a comment about it being the caller's, not callers, responsibility to free an object. Reported-by: Andrew Jones Fixes: 768e9a61856b ("KVM: selftests: Purge vm+vcpu_id == vcpu silliness") Signed-off-by: Sean Christopherson Message-Id: <20220613161942.1586791-2-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/kvm_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3b7c6a6e80d8347a4a5a13a25fa314800f2cbbe Author: Andrew Jones Date: Tue Jun 14 10:10:41 2022 +0200 KVM: selftests: kvm_binary_stats_test: Fix index expressions kvm_binary_stats_test accepts two arguments, the number of vms and number of vcpus. If these inputs are not equal then the test would likely crash for one reason or another due to using miscalculated indices for the vcpus array. Fix the index expressions by swapping the use of i and j. Signed-off-by: Andrew Jones Message-Id: <20220614081041.2571511-1-drjones@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/kvm_binary_stats_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 85d616dd19ac93a7a77b2b43f21f83233774fe27 Author: Krzysztof Kozlowski Date: Thu May 26 22:46:02 2022 +0200 arm64: dts: altera: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03b7500f5c3485f58b4485730f7e2ece0b73e0b6 Author: William Zhang Date: Thu Jun 9 17:21:12 2022 -0700 ARM: dts: Add DTS files for bcmbca SoC BCM63148 Add DTS for ARMv7 based broadband SoC BCM63148. bcm63148.dtsi is the SoC description DTS header and bcm963148.dts is a simple DTS file for Broadcom BCM963148 Reference board that only enable the UART port. Signed-off-by: William Zhang Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm63148.dtsi | 103 ++++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/bcm963148.dts | 30 ++++++++++++ 3 files changed, 134 insertions(+) commit fa8f66983e80d430cdbeefaf5b6ad19fd83af5b1 Author: William Zhang Date: Thu Jun 9 17:21:11 2022 -0700 dt-bindings: arm: Add BCM63148 SoC Add BCM63148 SoC device tree description to bcmbca binding document. Signed-off-by: William Zhang Acked-by: Rob Herring Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 6d57056e100651ba111e33acb10617a3a522c0dd Author: William Zhang Date: Wed Jun 8 11:04:35 2022 -0700 dt-bindings: arm64: Add BCM6856 SoC Add BCM6856 SoC device tree description to bcmbca binding document. Signed-off-by: William Zhang Acked-by: Rob Herring Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 8a44db52235e861c1aa61ef97fe2ddb9c96ef165 Author: William Zhang Date: Wed Jun 8 11:00:58 2022 -0700 dt-bindings: arm64: Add BCM63146 SoC Add BCM63146 SoC device tree description to bcmbca binding document. Signed-off-by: William Zhang Acked-by: Rob Herring Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit d634a6969c03803a945fdc2bccbe7d813420e569 Author: Krzysztof Kozlowski Date: Thu Jun 9 13:39:31 2022 +0200 ARM: dts: broadcom: correct gpio-keys properties gpio-keys children do not use unit addresses. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts | 2 -- arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts | 2 -- arch/arm/boot/dts/bcm4709-linksys-ea9200.dts | 2 -- arch/arm/boot/dts/bcm4709-netgear-r7000.dts | 2 -- arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 2 -- arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts | 2 -- arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts | 2 -- arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 2 -- 8 files changed, 16 deletions(-) commit c5aec5611aec8fb1ca68f68e41acaefccfc93c16 Author: Krzysztof Kozlowski Date: Thu Jun 9 13:39:30 2022 +0200 ARM: dts: broadcom: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts | 6 +++--- arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts | 8 ++++---- arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi | 10 +++++----- arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts | 10 +++++----- arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts | 4 ++-- arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts | 4 ++-- arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts | 2 +- arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts | 2 +- arch/arm/boot/dts/bcm4708-netgear-r6250.dts | 6 +++--- arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts | 6 +++--- arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 6 +++--- arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 4 ++-- arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 8 ++++---- arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts | 2 +- arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts | 2 +- arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 2 +- arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts | 4 ++-- arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts | 4 ++-- arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts | 12 ++++++------ arch/arm/boot/dts/bcm4709-linksys-ea9200.dts | 4 ++-- arch/arm/boot/dts/bcm4709-netgear-r7000.dts | 6 +++--- arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 8 ++++---- arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts | 4 ++-- arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 8 ++++---- arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 6 +++--- arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 6 +++--- arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts | 2 +- arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts | 2 +- arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts | 2 +- arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts | 2 +- arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts | 2 +- arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts | 2 +- arch/arm/boot/dts/bcm47094-netgear-r8500.dts | 8 ++++---- arch/arm/boot/dts/bcm47094-phicomm-k3.dts | 2 +- arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts | 2 +- arch/arm/boot/dts/bcm47189-luxul-xap-810.dts | 2 +- arch/arm/boot/dts/bcm47189-tenda-ac9.dts | 6 +++--- arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 2 +- arch/arm/boot/dts/bcm911360_entphn.dts | 4 ++-- arch/arm/boot/dts/bcm947189acdbmr.dts | 4 ++-- arch/arm/boot/dts/bcm953012er.dts | 4 ++-- arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi | 2 +- arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi | 2 +- 43 files changed, 97 insertions(+), 97 deletions(-) commit 2b0a95390568714c21581251097e2cba723d0837 Author: William Zhang Date: Wed Jun 8 10:56:28 2022 -0700 ARM: dts: Add DTS files for bcmbca SoC BCM6756 Add DTS for ARMv7 based broadband SoC BCM6756. bcm6756.dtsi is the SoC description DTS header and bcm96756.dts is a simple DTS file for Broadcom BCM96756 Reference board that only enable the UART port. Signed-off-by: William Zhang Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm6756.dtsi | 130 +++++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/bcm96756.dts | 30 ++++++++++ 3 files changed, 161 insertions(+) commit ecb84c329dda689099982ccadee60766e8cabe5d Author: William Zhang Date: Wed Jun 8 10:56:27 2022 -0700 dt-bindings: arm: Add BCM6756 SoC Add BCM6756 SoC device tree description to bcmbca binding document. Signed-off-by: William Zhang Acked-by: Rob Herring Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 66ae6aed733746483eec7bdcafd332e247e38649 Author: William Zhang Date: Tue Jun 7 10:26:45 2022 -0700 ARM: dts: Add DTS files for bcmbca SoC BCM6855 Add DTS for ARMv7 based broadband SoC BCM6855. bcm6855.dtsi is the SoC description DTS header and bcm96855.dts is a simple DTS file for Broadcom BCM96855 Reference board that only enable the UART port. Signed-off-by: William Zhang Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm6855.dtsi | 120 +++++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/bcm96855.dts | 30 +++++++++++ 3 files changed, 151 insertions(+) commit a2a4ee550704901aa148b57a55cb73cc1e8ae9b1 Author: Niravkumar L Rabara Date: Mon May 30 15:25:30 2022 +0800 arm64: dts: intel: socfpga_agilex: use defined GIC interrupt type for ECC Use defined GIC interrupt type instead of hard-coded numbers for ECC (Error Correction Code) memory, which creates edac sysfs interface. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Niravkumar L Rabara Signed-off-by: Dinh Nguyen arch/arm64/boot/dts/intel/socfpga_agilex.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit cd271f0468037dcfc863e341b85746c3e3684f76 Author: Paweł Anikiel Date: Fri Jun 3 11:23:54 2022 +0200 dt-bindings: altera: Add Chameleon v3 board Add Mercury+ AA1 boards category, together with the Chameleon v3 board. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Paweł Anikiel Signed-off-by: Dinh Nguyen Documentation/devicetree/bindings/arm/altera.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 15596df74e589fa68347928b152ed208eb1b41b1 Author: Paweł Anikiel Date: Fri Jun 3 11:23:53 2022 +0200 ARM: dts: socfpga: Add Google Chameleon v3 devicetree Add devicetree for the Google Chameleon v3 board. Signed-off-by: Paweł Anikiel Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/socfpga_arria10_chameleonv3.dts | 90 +++++++++++++++++++++++ 2 files changed, 91 insertions(+) commit 162552fa8844586332cbc8d65c1b30e6e2f90f5a Author: Paweł Anikiel Date: Fri Jun 3 11:23:52 2022 +0200 ARM: dts: socfpga: Add atsha204a node to Mercury+ AA1 dts Add atsha204a node to Mercury+ AA1 dts Signed-off-by: Paweł Anikiel Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_arria10_mercury_aa1.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit cfdb455d1a54b257c5f2740738055f746efe9dea Author: Paweł Anikiel Date: Fri Jun 3 11:23:51 2022 +0200 ARM: dts: socfpga: Move sdmmc-ecc node to Arria 10 dts The ecc manager is a part of the Arria 10 SoC, move it to the correct dts. Signed-off-by: Paweł Anikiel Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_arria10.dtsi | 10 ++++++++++ arch/arm/boot/dts/socfpga_arria10_mercury_aa1.dtsi | 12 ------------ 2 files changed, 10 insertions(+), 12 deletions(-) commit 7e0ed53b074ce8331b5fd7941408fe0c0ca784b1 Author: Paweł Anikiel Date: Fri Jun 3 11:23:50 2022 +0200 ARM: dts: socfpga: Change Mercury+ AA1 dts to dtsi The Mercury+ AA1 is not a standalone board, rather it's a module with an Arria 10 SoC. Remove status = "okay" and i2c aliases, as they are routed to the base board and should be enabled from there. Signed-off-by: Paweł Anikiel Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen arch/arm/boot/dts/Makefile | 1 - ...ry_aa1.dts => socfpga_arria10_mercury_aa1.dtsi} | 28 ---------------------- 2 files changed, 29 deletions(-) commit c49a44b39b313a4191ca2f06316c547ee673264e Author: Yonghong Song Date: Sun Jun 12 22:43:14 2022 -0700 libbpf: Fix an unsigned < 0 bug Andrii reported a bug with the following information: 2859 if (enum64_placeholder_id == 0) { 2860 enum64_placeholder_id = btf__add_int(btf, "enum64_placeholder", 1, 0); >>> CID 394804: Control flow issues (NO_EFFECT) >>> This less-than-zero comparison of an unsigned value is never true. "enum64_placeholder_id < 0U". 2861 if (enum64_placeholder_id < 0) 2862 return enum64_placeholder_id; 2863 ... Here enum64_placeholder_id declared as '__u32' so enum64_placeholder_id < 0 is always false. Declare enum64_placeholder_id as 'int' in order to capture the potential error properly. Fixes: f2a625889bb8 ("libbpf: Add enum64 sanitization") Reported-by: Andrii Nakryiko Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220613054314.1251905-1-yhs@fb.com tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6dbdc9f35360d4ef4704462c265f63b32fcb5354 Author: Hongyi Lu Date: Mon Jun 13 21:16:33 2022 +0000 bpf: Fix spelling in bpf_verifier.h Minor spelling fix spotted in bpf_verifier.h. Spelling is no big deal, but it is still an improvement when reading through the code. Signed-off-by: Hongyi Lu Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220613211633.58647-1-jwnhy0@gmail.com include/linux/bpf_verifier.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a5b7d8d541684925dc98646ba5016cbcc017855 Author: keliu Date: Fri May 27 07:34:45 2022 +0000 thermal: Directly use ida_alloc()/free() Use ida_alloc()/ida_free() instead of deprecated ida_simple_get()/ida_simple_remove() as recommended. Signed-off-by: keliu Signed-off-by: Rafael J. Wysocki drivers/thermal/thermal_core.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit d52b095b6cb4dca3bdbc144e7098abdbbd45e9bc Author: Dan Carpenter Date: Tue Jun 14 15:09:17 2022 +0300 spi: core: Fix error code in spi_register_controller() Return -ENOMEM if the allocation fails. Don't return success. Fixes: 6598b91b5ac3 ("spi: spi.c: Convert statistics to per-cpu u64_stats_t") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Yqh6bdNYO2XNhPBa@kili Signed-off-by: Mark Brown drivers/spi/spi.c | 1 + 1 file changed, 1 insertion(+) commit d919630fe77904931277e663c902582ea6f4e4cf Author: Charles Keepax Date: Tue Jun 14 14:10:22 2022 +0100 ASoC: cs35l45: Add endianness flag in snd_soc_component_driver The endianness flag is used on the CODEC side to specify an ambivalence to endian, typically because it is lost over the hardware link. This device receives audio over an I2S DAI and as such should have endianness applied. Fixes: 0d463d016000 ("ASoC: cs35l45: Add driver for Cirrus Logic CS35L45 Smart Amp") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220614131022.778057-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cs35l45.c | 2 ++ 1 file changed, 2 insertions(+) commit aa2a4b897132169fbc6d32932644b95875cf9c7f Author: Mark Brown Date: Sat Jun 4 11:54:07 2022 +0100 ASoC: ops: Fix boolean/integer detection for simple controls The standard snd_soc_info_volsw() detects if a control is a volume control and needs to be reported as an integer even if it only has two values by looking for the string " Volume" in the control name. This results in false positives if the control has a name like "HP Volume Ramp Switch" since any " Volume" is matched, not just a trailing one. Fix this by making sure that we only match at the end of the control name. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220604105407.4055294-1-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/soc-ops.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 0da11bf0cab9029db8b85e48d962ff05c00a4faa Author: Eiichi Tsukata Date: Fri May 27 00:53:45 2022 +0000 cpuidle: haltpoll: Add trace points for guest_halt_poll_ns grow/shrink Add trace points as are implemented in KVM host halt polling. This helps tune guest halt polling params. Signed-off-by: Eiichi Tsukata Acked-by: Marcelo Tosatti Signed-off-by: Rafael J. Wysocki drivers/cpuidle/governors/haltpoll.c | 3 +++ include/trace/events/power.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) commit 9ab9b9d3fb9231cdcfda8e0fb3d9c24a2f95ed26 Author: Viresh Kumar Date: Thu May 26 17:21:21 2022 +0530 cpufreq: Drop unnecessary cpus locking from store() This change was introduced long back by commit 4f750c930822 ("cpufreq: Synchronize the cpufreq store_*() routines with CPU hotplug"). Since then, both cpufreq and hotplug core have been reworked and have much better locking in place. The race mentioned in commit 4f750c930822 isn't possible anymore. Drop the unnecessary locking. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 336e51283ae376835b30b9edfcddd8e7b7615798 Author: Viresh Kumar Date: Thu May 26 17:21:19 2022 +0530 cpufreq: Optimize cpufreq_show_cpus() Instead of specially adding a space for each CPU, except the first one, lets add space for each of them and remove it at the end. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit f93d3a779272a319f767a85a9062ebf69ecf5311 Author: Nuno Sá Date: Fri Jun 10 10:45:29 2022 +0200 iio: trigger: stm32-lptimer-trigger: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-19-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/trigger/stm32-lptimer-trigger.c | 1 + 1 file changed, 1 insertion(+) commit ca27395f1b9511830a3a5c65a1ad444c2923cbc2 Author: Nuno Sá Date: Fri Jun 10 10:45:28 2022 +0200 iio: pressure: cros_ec_baro: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-18-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/pressure/cros_ec_baro.c | 1 + 1 file changed, 1 insertion(+) commit ca07e6bb4e5a3d544ff8fba7d7ad05462c6715c3 Author: Nuno Sá Date: Fri Jun 10 10:45:27 2022 +0200 iio: light: cros_ec_light_prox: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-17-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/light/cros_ec_light_prox.c | 1 + 1 file changed, 1 insertion(+) commit 93018249a7315de5ab251751228a59f087a31d6c Author: Nuno Sá Date: Fri Jun 10 10:45:26 2022 +0200 iio: humidity: hts221_buffer: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-16-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/humidity/hts221_buffer.c | 1 + 1 file changed, 1 insertion(+) commit 55ae407ae946b6766a50420f64c0a4021388b22d Author: Nuno Sá Date: Fri Jun 10 10:45:25 2022 +0200 iio: dac: vf610_dac: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-15-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/dac/vf610_dac.c | 1 + 1 file changed, 1 insertion(+) commit 2a53b91c23f2afbacdd9cc05a98613a09d431b9b Author: Nuno Sá Date: Fri Jun 10 10:45:24 2022 +0200 iio: dac: stm32-dac: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-14-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/dac/stm32-dac.c | 2 ++ 1 file changed, 2 insertions(+) commit 1f0350557b395054b8f32ffba8b5c8709f762f6b Author: Nuno Sá Date: Fri Jun 10 10:45:23 2022 +0200 iio: common: cros_ec_sensors: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-13-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c | 1 + 1 file changed, 1 insertion(+) commit fb68441019dc649ccc69ee7744ac719fc4bac4c6 Author: Nuno Sá Date: Fri Jun 10 10:45:22 2022 +0200 iio: common: cros_ec_lid_angle: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-12-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/common/cros_ec_sensors/cros_ec_lid_angle.c | 1 + 1 file changed, 1 insertion(+) commit d428e68a26cf0ba92f92a2db063e5f2e32cf8e92 Author: Nuno Sá Date: Fri Jun 10 10:45:21 2022 +0200 iio: adc: rzg2l_adc: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-11-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/rzg2l_adc.c | 1 + 1 file changed, 1 insertion(+) commit 074d68c1c0123e5f6c849f41c9af3026dc6c7b6d Author: Nuno Sá Date: Fri Jun 10 10:45:20 2022 +0200 iio: adc: npcm_adc: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-10-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/npcm_adc.c | 1 + 1 file changed, 1 insertion(+) commit e335cd347e6eb9cae6180a120e7c34ed70ccbede Author: Nuno Sá Date: Fri Jun 10 10:45:19 2022 +0200 iio: adc: mt6360-adc: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-9-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/mt6360-adc.c | 1 + 1 file changed, 1 insertion(+) commit 1fd4c0cd789d912ad18b05996e908301444383ed Author: Nuno Sá Date: Fri Jun 10 10:45:18 2022 +0200 iio: adc: mp2629_adc: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-8-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/mp2629_adc.c | 1 + 1 file changed, 1 insertion(+) commit 4738b57a6c123167f1af73bbe2fb762dde6ad001 Author: Nuno Sá Date: Fri Jun 10 10:45:17 2022 +0200 iio: adc: ingenic-adc: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-7-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/ingenic-adc.c | 2 ++ 1 file changed, 2 insertions(+) commit c2bb705f45c610c956e80ef5255462ece072ebf9 Author: Nuno Sá Date: Fri Jun 10 10:45:16 2022 +0200 iio: adc: imx8qxp-adc: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-6-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/imx8qxp-adc.c | 1 + 1 file changed, 1 insertion(+) commit 848d190104086168ae8f5da605aa6171558b8f72 Author: Nuno Sá Date: Fri Jun 10 10:45:15 2022 +0200 iio: adc: imx7d_adc: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-5-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/imx7d_adc.c | 1 + 1 file changed, 1 insertion(+) commit 34de6b50ddb6d2ad73fb70e156e5586266d5eef0 Author: Nuno Sá Date: Fri Jun 10 10:45:14 2022 +0200 iio: adc: berlin2-adc: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-4-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/berlin2-adc.c | 2 ++ 1 file changed, 2 insertions(+) commit f3823017e16dffa88de64d542f30f9afbecc0527 Author: Nuno Sá Date: Fri Jun 10 10:45:13 2022 +0200 iio: adc: ad7606_par: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-3-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7606_par.c | 1 + 1 file changed, 1 insertion(+) commit ae3babe1c4663c67041243c0cc01ed109a45d74c Author: Nuno Sá Date: Fri Jun 10 10:45:12 2022 +0200 iio: adc: ad7606: explicitly add proper header files Do not trust the fact that iio.h includes of.h which in turn includes all the headers we are relying on. The ultimate goal is to actually drop of.h from iio.h. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610084545.547700-2-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7606.c | 1 + 1 file changed, 1 insertion(+) commit 10897f34309b3c7bc14698407436c82d11c07f47 Author: Jonathan Cameron Date: Sun May 8 18:57:12 2022 +0100 iio: temp: maxim_thermocouple: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition Fixes: 1f25ca11d84a ("iio: temperature: add support for Maxim thermocouple chips") Signed-off-by: Jonathan Cameron Cc: Matt Ranostay Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-93-jic23@kernel.org drivers/iio/temperature/maxim_thermocouple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecdef5b8317cdf18acb46223e087f04a226fa619 Author: Jonathan Cameron Date: Sun May 8 18:57:11 2022 +0100 iio: temp: max31865: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition Fixes: e112dc4e18ea ("iio: temperature: Add MAX31865 RTD Support") Signed-off-by: Jonathan Cameron Cc: Navin Sankar Velliangiri Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-92-jic23@kernel.org drivers/iio/temperature/max31865.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 732f2cb2fbb51bd5bc03a114bd102ab3b2f537fe Author: Jonathan Cameron Date: Sun May 8 18:57:10 2022 +0100 iio: temp: ltc2983: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: f110f3188e56 ("iio: temperature: Add support for LTC2983") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-91-jic23@kernel.org drivers/iio/temperature/ltc2983.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit faa05ecb1349070d874810e161b653c2220e0006 Author: Jonathan Cameron Date: Sun May 8 18:57:09 2022 +0100 iio: resolver: ad2s90: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes tag is probably not where the issue was first introduced, but is likely to be far beyond the point where anyone considers backporting this fix. Fixes: 58f08b0af857 ("staging:iio:resolver:ad2s90 general cleanup") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-90-jic23@kernel.org drivers/iio/resolver/ad2s90.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37882314d3bdc2ae775ebb9fa8ed7a94cd1aad61 Author: Jonathan Cameron Date: Sun May 8 18:57:08 2022 +0100 iio: resolver: ad2s1200: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes tag is probably not where the issue was first introduced, but is likely to be as far as anyone considers backporting this fix. Fixes: 0bd3d338f61b ("staging: iio: ad2s1200: Improve readability with be16_to_cpup") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-89-jic23@kernel.org drivers/iio/resolver/ad2s1200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e558a79b6d66c6678049eadeb321f6203764c10d Author: Jonathan Cameron Date: Sun May 8 18:57:07 2022 +0100 iio: proximity: vcnl3020: Drop unnecessary alignment requirement for i2c device I2C does not by default use buffers directly for DMA so there is no need to ensure they are DMA safe. Signed-off-by: Jonathan Cameron Cc: Ivan Mikhaylov Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-88-jic23@kernel.org drivers/iio/proximity/vcnl3020.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2386c0f8c5b740873a4b9126c3706601b127fe22 Author: Jonathan Cameron Date: Sun May 8 18:57:06 2022 +0100 iio: proximity: as3935: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 24ddb0e4bba4 ("iio: Add AS3935 lightning sensor support") Signed-off-by: Jonathan Cameron Cc: Matt Ranostay Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-87-jic23@kernel.org drivers/iio/proximity/as3935.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e76330db5e80725efd3e94b735ee1b43e307196f Author: Jonathan Cameron Date: Sun May 8 18:57:05 2022 +0100 iio: pressure: dlhl60d: Drop unnecessary alignment forcing. I2C doesn't use the buffers directly for DMA so there is no need to enforce alignment. Signed-off-by: Jonathan Cameron Cc: Tomislav Denis Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-86-jic23@kernel.org drivers/iio/pressure/dlhl60d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4842e5de6f39ebf2c0f6da9e6a0cb751c7108507 Author: Jonathan Cameron Date: Sun May 8 18:57:04 2022 +0100 iio: potentiometer: mcp4131: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 22d199a53910 ("iio: potentiometer: add driver for Microchip MCP413X/414X/415X/416X/423X/424X/425X/426X") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-85-jic23@kernel.org drivers/iio/potentiometer/mcp4131.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5f78f4d2168ba21324095b0d46d4353c2eace4d Author: Jonathan Cameron Date: Sun May 8 18:57:03 2022 +0100 iio: potentiometer: mcp41010: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 092cb71a604e ("iio: potentiometer: Add driver for Microchip MCP41xxx/42xxx") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-84-jic23@kernel.org drivers/iio/potentiometer/mcp41010.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec1ac1c0e7a14657d729159ccfbea72f434bdaf1 Author: Jonathan Cameron Date: Sun May 8 18:57:02 2022 +0100 iio: potentiometer: max5481: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: df1fd2de118e ("iio: max5481: Add support for Maxim digital potentiometers") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-83-jic23@kernel.org drivers/iio/potentiometer/max5481.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da803652534271dbb4af0802bd678c759e27e6de Author: Jonathan Cameron Date: Sun May 8 18:57:01 2022 +0100 iio: potentiometer: ad5272: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 79e8a32d2aa9 ("iio: ad5272: Add support for Analog Devices digital potentiometers") Signed-off-by: Jonathan Cameron Reviewed-by: Phil Reid Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-82-jic23@kernel.org drivers/iio/potentiometer/ad5272.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5841c38cb2f7e54b0787b3e0326a6b21b89ea3e Author: Jonathan Cameron Date: Sun May 8 18:57:00 2022 +0100 iio: potentiometer: ad5110: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: d03a74bfacce ("iio: potentiometer: Add driver support for AD5110") Signed-off-by: Jonathan Cameron Cc: Mugilraj Dhavachelvan Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-81-jic23@kernel.org drivers/iio/potentiometer/ad5110.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 54e03562bb960e78af050d2e550c28d77642ee44 Author: Jonathan Cameron Date: Sun May 8 18:56:59 2022 +0100 iio: imu: mpu6050: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 6b0cc5dce072 ("iio:imu:inv_mpu6050 Fix dma and ts alignment and data leak issues.") Signed-off-by: Jonathan Cameron Acked-by: Jean-Baptiste Maneyrol Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-80-jic23@kernel.org drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0aa05065a0c1d1bffa10923dbc36f7193babbb7 Author: Jonathan Cameron Date: Sun May 8 18:56:58 2022 +0100 iio: imu: inv_icm42600: Fix alignment for DMA safety in buffer code. Second fix for this driver due to different introducing patches. ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 7f85e42a6c54 ("iio: imu: inv_icm42600: add buffer support in iio devices") Signed-off-by: Jonathan Cameron Cc: Jean-Baptiste Maneyrol Acked-by: Jean-Baptiste Maneyrol Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-79-jic23@kernel.org drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 848847702bd10bf0bf547e38adc44c14e9742784 Author: Jonathan Cameron Date: Sun May 8 18:56:57 2022 +0100 iio: imu: inv_icm42600: Fix alignment for DMA safety Partial fix for this driver as a second instance was introduced in a later patch. ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: a095fadb443b ("iio: imu: inv_icm42600: add gyroscope IIO device") Signed-off-by: Jonathan Cameron Acked-by: Jean-Baptiste Maneyrol Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-78-jic23@kernel.org drivers/iio/imu/inv_icm42600/inv_icm42600.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9a8417a13ed9c81383662fca8a4b89f84d31e78 Author: Jonathan Cameron Date: Sun May 8 18:56:56 2022 +0100 iio: imu: fxos8700: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 84e5ddd5c46e ("iio: imu: Add support for the FXOS8700 IMU") Signed-off-by: Jonathan Cameron Cc: Robert Jones Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-77-jic23@kernel.org drivers/iio/imu/fxos8700_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3aafe923987cb4a15e16f03c6185ed4b6a78ca00 Author: Jonathan Cameron Date: Sun May 8 18:56:55 2022 +0100 iio: gyro: fxas210002c: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Updated the comment to 'may' require. Fixes: a0701b6263ae ("iio: gyro: add core driver for fxas21002c") Signed-off-by: Jonathan Cameron Reviewed-by: Rui Miguel Silva Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-76-jic23@kernel.org drivers/iio/gyro/fxas21002c_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 966d2f4ee7f6e189df47abf67223266ad31e201f Author: Jonathan Cameron Date: Sun May 8 18:56:54 2022 +0100 iio: gyro: adxrs450: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes tag is inaccurate but unlikely anyone will be interested in backporting beyond that point. Fixes: 53ac8500ba9b ("staging:iio:adxrs450: Move header file contents to main file") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-75-jic23@kernel.org drivers/iio/gyro/adxrs450.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff3211b2ba9afac80ceb795d148831dd879b30b7 Author: Jonathan Cameron Date: Sun May 8 18:56:53 2022 +0100 iio: gyro: adis16130: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 8e67875141b2 ("staging:iio:gyro: adis16130 cleanup, move to abi and bug fixes.") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-74-jic23@kernel.org drivers/iio/gyro/adis16130.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae6eeb534924ecc2afd5a394964fd6de0ca54d39 Author: Jonathan Cameron Date: Sun May 8 18:56:52 2022 +0100 iio: gyro: adis16080: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes tag is inaccurate but unlikely anyone will backport this beyond that point so I haven't chased the history futher than 2013. Fixes: 3c80372dae17 ("staging:iio:adis16080: be16 cleanups") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-73-jic23@kernel.org drivers/iio/gyro/adis16080.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a5b11884cb72780cb824cac8aab47094654a84f Author: Jonathan Cameron Date: Sun May 8 18:56:51 2022 +0100 iio: frequency: adrf6780: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 63aaf6d06d87 ("iio: frequency: adrf6780: add support for ADRF6780") Signed-off-by: Jonathan Cameron Cc: Antoniu Miclaus Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-72-jic23@kernel.org drivers/iio/frequency/adrf6780.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f890aaac771bd015c348eddb967b4027e88344c0 Author: Jonathan Cameron Date: Sun May 8 18:56:50 2022 +0100 iio: frequency: admv4420: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: b59c04155901 ("iio: frequency: admv4420.c: Add support for ADMV4420") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-71-jic23@kernel.org drivers/iio/frequency/admv4420.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3e38a557a54df0edea791d7eb623515bb86e39a Author: Jonathan Cameron Date: Sun May 8 18:56:49 2022 +0100 iio: frequency: admv1014: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: f4eb9ac7842f ("iio: frequency: admv1014: add support for ADMV1014") Signed-off-by: Jonathan Cameron Cc: Antoniu Miclaus Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-70-jic23@kernel.org drivers/iio/frequency/admv1014.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3f3f8d264b9be0cb3e50e89e3f8789a948a43bb Author: Jonathan Cameron Date: Sun May 8 18:56:48 2022 +0100 iio: frequency: admv1013: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: da35a7b526d9 ("iio: frequency: admv1013: add support for ADMV1013") Signed-off-by: Jonathan Cameron Cc: Antoniu Miclaus Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-69-jic23@kernel.org drivers/iio/frequency/admv1013.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0bb5675befe666eeed71ad808426cf2ec1c9a714 Author: Jonathan Cameron Date: Sun May 8 18:56:47 2022 +0100 iio: frequency: adf4371: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 7f699bd14913 ("iio: frequency: adf4371: Add support for ADF4371 PLL") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-68-jic23@kernel.org drivers/iio/frequency/adf4371.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 389b8972eb2a614cb3189e5fa55b1b7f66142c71 Author: Jonathan Cameron Date: Sun May 8 18:56:46 2022 +0100 iio: frequency: adf4350: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Updated help text to 'may' require buffers to be in their own cacheline. Fixes: e31166f0fd48 ("iio: frequency: New driver for Analog Devices ADF4350/ADF4351 Wideband Synthesizers") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-67-jic23@kernel.org drivers/iio/frequency/adf4350.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8ff2eb625c353b1491d9f89f1dfd52e7aef5734c Author: Jonathan Cameron Date: Sun May 8 18:56:45 2022 +0100 iio: frequency: ad9523: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Updated help text to 'may' require buffers to be in their own cacheline. Fixes: cd1678f96329 ("iio: frequency: New driver for AD9523 SPI Low Jitter Clock Generator") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-66-jic23@kernel.org drivers/iio/frequency/ad9523.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b9ac08b3282a95fcefb057c2886028a6807725d8 Author: Jonathan Cameron Date: Sun May 8 18:56:44 2022 +0100 iio: dac: ti-dac7612: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Updated help text to 'may' require buffers to be in their own cacheline. Fixes: 977724d20584 ("iio:dac:ti-dac7612: Add driver for Texas Instruments DAC7612") Signed-off-by: Jonathan Cameron Cc: Ricardo Ribalda Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-65-jic23@kernel.org drivers/iio/dac/ti-dac7612.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3637c49ed54632d7c221af718d2d7b1d381d4b6e Author: Jonathan Cameron Date: Sun May 8 18:56:43 2022 +0100 iio: dac: ti-dac7311: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 7a02ef7907d8 ("iio:dac:ti-dac7311 Add driver for Texas Instrument DAC7311") Signed-off-by: Jonathan Cameron Cc: Charles-Antoine Couret Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-64-jic23@kernel.org drivers/iio/dac/ti-dac7311.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58e22371539e01c742be5c30295f591a6a17e348 Author: Jonathan Cameron Date: Sun May 8 18:56:42 2022 +0100 iio: dac: ti-dac5571: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: df38a4a72a3b ("iio: dac: add TI DAC5571 family support") Signed-off-by: Jonathan Cameron Cc: Sean Nyekjaer Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-63-jic23@kernel.org drivers/iio/dac/ti-dac5571.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03a0cc77f164e4e59b970d50c6e9a6caf06dae80 Author: Jonathan Cameron Date: Sun May 8 18:56:41 2022 +0100 iio: dac: ti-dac082s085: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 61011264c1af ("iio: dac: Add Texas Instruments 8/10/12-bit 2/4-channel DAC driver") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-62-jic23@kernel.org drivers/iio/dac/ti-dac082s085.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e66bf04797f1f95a2402414c00e64d00f63d31ec Author: Jonathan Cameron Date: Sun May 8 18:56:40 2022 +0100 iio: dac: mcp4922: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 1b791fadf3a1 ("iio: dac: mcp4902/mcp4912/mcp4922 dac driver") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Acked-by: Michael Welling Link: https://lore.kernel.org/r/20220508175712.647246-61-jic23@kernel.org drivers/iio/dac/mcp4922.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2030708377a219b548a9a36da57d3852382baf1d Author: Jonathan Cameron Date: Sun May 8 18:56:39 2022 +0100 iio: dac: ltc2688: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: 832cb9eeb931 ("iio: dac: add support for ltc2688") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-60-jic23@kernel.org drivers/iio/dac/ltc2688.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1c20292c6b60cfc60a5e652174b8063e5cc03fec Author: Jonathan Cameron Date: Sun May 8 18:56:38 2022 +0100 iio: dac: ad8801: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 7f270bc9a2d9 ("iio: dac: AD8801: add Analog Devices AD8801/AD8803 support") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-59-jic23@kernel.org drivers/iio/dac/ad8801.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69e51448ddfb9062efdf83e2d3179498e0aeb293 Author: Jonathan Cameron Date: Sun May 8 18:56:37 2022 +0100 iio: dac: ad7303: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: f83478240e74 ("iio:dac: Add support for the AD7303") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-58-jic23@kernel.org drivers/iio/dac/ad7303.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8482468b30bdb16d4a764f995d7a63d94fa0cf40 Author: Jonathan Cameron Date: Sun May 8 18:56:36 2022 +0100 iio: dac: ad7293: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 0bb12606c05f ("iio:dac:ad7293: add support for AD7293") Signed-off-by: Jonathan Cameron Cc: Antoniu Miclaus Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-57-jic23@kernel.org drivers/iio/dac/ad7293.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2d5e9de77c8774a5a6cff59d928f2fa38cbc642 Author: Jonathan Cameron Date: Sun May 8 18:56:35 2022 +0100 iio: dac: ad5791: Fix alignment for DMA saftey ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 791bb52a0cd2 ("iio:ad5791: Do not store transfer buffers on the stack") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-56-jic23@kernel.org drivers/iio/dac/ad5791.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27f2261d16d01858b8e5baca5a1a515b040429c4 Author: Jonathan Cameron Date: Sun May 8 18:56:34 2022 +0100 iio: dac: ad5770r: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: cbbb819837f6 ("iio: dac: ad5770r: Add AD5770R support") Signed-off-by: Jonathan Cameron Cc: Alexandru Tachici Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-55-jic23@kernel.org drivers/iio/dac/ad5770r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c32be7f035ae430ba9c142b03ceb9f935b09ed6b Author: Jonathan Cameron Date: Sun May 8 18:56:33 2022 +0100 iio: dac: ad5766: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: fd9373e41b9b ("iio: dac: ad5766: add driver support for AD5766") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-54-jic23@kernel.org drivers/iio/dac/ad5766.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b378722a3e9bb51318c0de7eeb4d71f2fcd6987f Author: Jonathan Cameron Date: Sun May 8 18:56:32 2022 +0100 iio: dac: ad5764: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: 68b14d7ea956 ("staging:iio:dac: Add AD5764 driver") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-53-jic23@kernel.org drivers/iio/dac/ad5764.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7d12a61187aed57863c41032acbc1fae516d6e49 Author: Jonathan Cameron Date: Sun May 8 18:56:31 2022 +0100 iio: dac: ad5761: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: 131497acd88a ("iio: add ad5761 DAC driver") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-52-jic23@kernel.org drivers/iio/dac/ad5761.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d0c167ceff2d833ee493dd58164dc87bd36e48aa Author: Jonathan Cameron Date: Sun May 8 18:56:30 2022 +0100 iio: dac: ad5755: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: c499d029d805 ("iio:dac: Add ad5755 driver") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-51-jic23@kernel.org drivers/iio/dac/ad5755.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 444e38927d9af093de7cdc6afbb7afdc3485da2d Author: Jonathan Cameron Date: Sun May 8 18:56:29 2022 +0100 iio: dac: ad5686: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: 0357e488b825 ("iio:dac:ad5686: Refactor the driver") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-50-jic23@kernel.org drivers/iio/dac/ad5686.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4a4a79c06caeec47003bcbee1cf3094479f26e24 Author: Jonathan Cameron Date: Sun May 8 18:56:28 2022 +0100 iio: dac: ad5592r: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 56ca9db862bf ("iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs") Signed-off-by: Jonathan Cameron Cc: Paul Cercueil Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-49-jic23@kernel.org drivers/iio/dac/ad5592r-base.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 00b9737caa5aaed5cf45a7c7498edf5957efa3b2 Author: Jonathan Cameron Date: Sun May 8 18:56:27 2022 +0100 iio: dac: ad5504: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 0dbe59c7a788 ("iio:ad5504: Do not store transfer buffers on the stack") Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-48-jic23@kernel.org drivers/iio/dac/ad5504.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 678d536bb454e3bbedcaa68208550ac9dc1cc066 Author: Jonathan Cameron Date: Sun May 8 18:56:26 2022 +0100 iio: dac: ad5449: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: 8341dc04dfb3 ("iio:dac: Add support for the ad5449") Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-47-jic23@kernel.org drivers/iio/dac/ad5449.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d2b240d3d31c66df4d2da54c75ff8e27a0e006c3 Author: Jonathan Cameron Date: Sun May 8 18:56:25 2022 +0100 iio: dac: ad5421: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: 5691b23489db ("staging:iio:dac: Add AD5421 driver") Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-46-jic23@kernel.org drivers/iio/dac/ad5421.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 94ec314e1bd686b669c24385ce2dbc967eb74147 Author: Jonathan Cameron Date: Sun May 8 18:56:24 2022 +0100 iio: dac: ad5360: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: a3e2940c24d3 ("staging:iio:dac: Add AD5360 driver") Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-45-jic23@kernel.org drivers/iio/dac/ad5360.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8779b88c214fa0f8fdfb9c54a124f468884d356a Author: Jonathan Cameron Date: Sun May 8 18:56:23 2022 +0100 iio: dac: ad5064: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: 6a17a0768f77 ("iio:dac:ad5064: Add support for the ad5629r and ad5669r") Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-44-jic23@kernel.org drivers/iio/dac/ad5064.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 314d2b1978bb3d20b1ec239f4e28c394da493f36 Author: Jonathan Cameron Date: Sun May 8 18:56:22 2022 +0100 iio: common: ssp: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 50dd64d57eee ("iio: common: ssp_sensors: Add sensorhub driver") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-43-jic23@kernel.org drivers/iio/common/ssp_sensors/ssp.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 026bffa458d029a5f15ac3f82a9bb0f64aca403d Author: Jonathan Cameron Date: Sun May 8 18:56:21 2022 +0100 iio: amplifiers: ad8366: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: e71d42e03c60 ("iio: amplifiers: New driver for AD8366 Dual-Digital Variable Gain Amplifier") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-42-jic23@kernel.org drivers/iio/amplifiers/ad8366.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 00eb2b8a077062557772234019ecd6045b8b6298 Author: Jonathan Cameron Date: Sun May 8 18:56:20 2022 +0100 iio: addac: ad74413r: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: fea251b6a5db ("iio: addac: add AD74413R driver") Signed-off-by: Jonathan Cameron Cc: Cosmin Tanislav Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-41-jic23@kernel.org drivers/iio/addac/ad74413r.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 62fa19bf484bfeb52c56b7c6d6a6b1222c597f9c Author: Jonathan Cameron Date: Sun May 8 18:56:19 2022 +0100 iio: adc: ti-tlc4541: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: ac2bec9d587c ("iio: adc: tlc4541: add support for TI tlc4541 adc") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-40-jic23@kernel.org drivers/iio/adc/ti-tlc4541.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a2105d87eb8eb03591515df10102e04a1c9e0e46 Author: Jonathan Cameron Date: Sun May 8 18:56:18 2022 +0100 iio: adc: ti-ads8688: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 3e87e7838328 ("iio: adc: Add TI ADS8688") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-39-jic23@kernel.org drivers/iio/adc/ti-ads8688.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8966b11e5a14aaabc747ee97a7942fd50a681402 Author: Jonathan Cameron Date: Sun May 8 18:56:17 2022 +0100 iio: adc: ti-ads8344: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 8dd2d7c0fed7 ("iio: adc: Add driver for the TI ADS8344 A/DC chips") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-38-jic23@kernel.org drivers/iio/adc/ti-ads8344.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd54ba8b2469f6ae665c529623a9454ce5293ca8 Author: Jonathan Cameron Date: Sun May 8 18:56:16 2022 +0100 iio: adc: ti-ads7950: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: 902c4b2446d4 ("iio: adc: New driver for TI ADS7950 chips") Signed-off-by: Jonathan Cameron Acked-by: David Lechner Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-37-jic23@kernel.org drivers/iio/adc/ti-ads7950.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 55afdd050c063ae4b8dbd566107a030c00d005fd Author: Jonathan Cameron Date: Sun May 8 18:56:15 2022 +0100 iio: adc: ti-ads131e08: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: d935eddd2799 ("iio: adc: Add driver for Texas Instruments ADS131E0x ADC family") Signed-off-by: Jonathan Cameron Cc: Tomislav Denis Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-36-jic23@kernel.org drivers/iio/adc/ti-ads131e08.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7df19bd26cc0b85ff997cc9e2aaea712836b5460 Author: Jonathan Cameron Date: Sun May 8 18:56:14 2022 +0100 iio: adc: ti-ads124s08: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: e717f8c6dfec ("iio: adc: Add the TI ads124s08 ADC code") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-35-jic23@kernel.org drivers/iio/adc/ti-ads124s08.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a828f204a110dc9f253c4cf3c1103d00a0681da Author: Jonathan Cameron Date: Sun May 8 18:56:13 2022 +0100 iio: adc: ti-adc161s626: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 4d671b71beef ("iio: adc: ti-adc161s626: add support for TI 1-channel differential ADCs") Signed-off-by: Jonathan Cameron Cc: Matt Ranostay Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-34-jic23@kernel.org drivers/iio/adc/ti-adc161s626.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23c81e7a7e5204a08b553d07362d3082926663b8 Author: Jonathan Cameron Date: Sun May 8 18:56:12 2022 +0100 iio: adc: ti-adc128s052: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 913b86468674 ("iio: adc: Add TI ADC128S052") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-33-jic23@kernel.org drivers/iio/adc/ti-adc128s052.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76890c3bce6003caf53b283c49a210280cb8ea33 Author: Jonathan Cameron Date: Sun May 8 18:56:11 2022 +0100 iio: adc: ti-adc12138: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 50a6edb1b6e0 ("iio: adc: add ADC12130/ADC12132/ADC12138 ADC driver") Signed-off-by: Jonathan Cameron Cc: Akinobu Mita Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-32-jic23@kernel.org drivers/iio/adc/ti-adc12138.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6909fe17888b66ea53ebb15640f82b97daa587a0 Author: Jonathan Cameron Date: Sun May 8 18:56:10 2022 +0100 iio: adc: ti-adc108s102: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Dual fixes tags as two cases that were introduced in different patches. One of those patches is a fix however and likely to have been backported to stable kernels. Note the second alignment marking is likely to be unnecessary, but is left for now to keep this fix simple. Fixes: 3691e5a69449 ("iio: adc: add driver for the ti-adc084s021 chip") Fixes: cbe5c6977604 ("iio: adc: ti-adc108s102: Fix alignment of buffer pushed to iio buffers.") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-31-jic23@kernel.org drivers/iio/adc/ti-adc108s102.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bb102fd600d1d6c0020a4514197c0604c4a218d9 Author: Jonathan Cameron Date: Sun May 8 18:56:09 2022 +0100 iio: adc: ti-adc084s021: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: 3691e5a69449 ("iio: adc: add driver for the ti-adc084s021 chip") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Acked-by: Mårten Lindahl Link: https://lore.kernel.org/r/20220508175712.647246-30-jic23@kernel.org drivers/iio/adc/ti-adc084s021.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1e6bb81c23a84a078736a0f2a52bd765863e94ed Author: Jonathan Cameron Date: Sun May 8 18:56:08 2022 +0100 iio: adc: ti-adc0832: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: efc945fb729c ("iio: adc: add support for ADC0831/ADC0832/ADC0834/ADC0838 chips") Signed-off-by: Jonathan Cameron Cc: Akinobu Mita Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-29-jic23@kernel.org drivers/iio/adc/ti-adc0832.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e770f78036ce4327caf285873f4b20564a8b4f0f Author: Jonathan Cameron Date: Sun May 8 18:56:07 2022 +0100 iio: adc: mcp320x: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Worth noting the fixes tag refers to the same issue being observed on a platform that probably had only 64 byte cachelines. Fixes: 0e81bc99a082 ("iio: mcp320x: Fix occasional incorrect readings") Signed-off-by: Jonathan Cameron Cc: Michael Welling Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-28-jic23@kernel.org drivers/iio/adc/mcp320x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d7019e43ee67a48cef63f8f23f002233064d390 Author: Jonathan Cameron Date: Sun May 8 18:56:06 2022 +0100 iio: adc: max1241: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 8a80a71d9020 ("iio: adc: Add MAX1241 driver") Signed-off-by: Jonathan Cameron Acked-by: Alexandru Lazar Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-27-jic23@kernel.org drivers/iio/adc/max1241.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f746ab0bac5b335b09143dcd01db6f9f26d0c9ec Author: Jonathan Cameron Date: Sun May 8 18:56:05 2022 +0100 iio: adc: max1118: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: a9e9c7153e96 ("iio: adc: add max1117/max1118/max1119 ADC driver") Signed-off-by: Jonathan Cameron Cc: Akinobu Mita Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-26-jic23@kernel.org drivers/iio/adc/max1118.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51f30d63145cc84cb8a8e0ec96f9a8b73e6b5448 Author: Jonathan Cameron Date: Sun May 8 18:56:04 2022 +0100 iio: adc: max11100: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: a8e7e88df9ec ("iio: adc: Add Maxim MAX11100 driver") Signed-off-by: Jonathan Cameron Acked-by: Jacopo Mondi Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-25-jic23@kernel.org drivers/iio/adc/max11100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e754fb7e7a05e3838c9aa044b4114869dd0d1e17 Author: Jonathan Cameron Date: Sun May 8 18:56:03 2022 +0100 iio: adc: max1027: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: fc167f624833 ("iio: add support of the max1027") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-24-jic23@kernel.org drivers/iio/adc/max1027.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ebf401d555ee1e75e779b865d38e171db0aa1f2 Author: Jonathan Cameron Date: Sun May 8 18:56:02 2022 +0100 iio: adc: ltc2497: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: bc82222fcca1 ("iio:adc: Driver for Linear Technology LTC2497 ADC") Signed-off-by: Jonathan Cameron Cc: Michael Hennerich Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-23-jic23@kernel.org drivers/iio/adc/ltc2497.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1673b7ca2dc1fb3b8d7c94a112496c02d34ae449 Author: Jonathan Cameron Date: Sun May 8 18:56:01 2022 +0100 iio: adc: ltc2496: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes: e4c5c4dfaa88 ("iio: adc: new driver to support Linear technology's ltc2496") Signed-off-by: Jonathan Cameron Cc: Uwe Kleine-König Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-22-jic23@kernel.org drivers/iio/adc/ltc2496.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 48e4ae96b0b10f93de23b86fd34e573c44e95ab3 Author: Jonathan Cameron Date: Sun May 8 18:56:00 2022 +0100 iio: adc: hi8435: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 72aa29ce0a59 ("iio: adc: hi8435: Holt HI-8435 threshold detector") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-21-jic23@kernel.org drivers/iio/adc/hi8435.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c6c7eff7d4a53efd4d0818f8664259a1862665a Author: Jonathan Cameron Date: Sun May 8 18:55:59 2022 +0100 iio: adc: ad7949: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Note the fixes tag predates some changes to this line of code so automated application of this fix may fail. Fixes: 7f40e0614317 ("iio:adc:ad7949: Add AD7949 ADC driver family") Signed-off-by: Jonathan Cameron Cc: Charles-Antoine Couret Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-20-jic23@kernel.org drivers/iio/adc/ad7949.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 908af45d7057345bc910940a9340f7a1d8935875 Author: Jonathan Cameron Date: Sun May 8 18:55:58 2022 +0100 iio: adc: ad7923: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Note that some other fixes have applied to this line of code that may complicate automated backporting. Signed-off-by: Jonathan Cameron Fixes: 0eac259db28f ("IIO ADC support for AD7923") Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-19-jic23@kernel.org drivers/iio/adc/ad7923.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b330ea6bc52468e183ced79189ff064f36c64aa7 Author: Jonathan Cameron Date: Sun May 8 18:55:57 2022 +0100 iio: adc: ad7887: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to include 'may'. Fixes tag is clearly not where this was introduced but it is very unlikely anyone will back port it past that point. Fixes: 65dd3d3d7a9b ("staging:iio:ad7887: Squash everything into one file") Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-18-jic23@kernel.org drivers/iio/adc/ad7887.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 211f810f8fae05c1f78e531b2b113ea1ab3d1ce7 Author: Jonathan Cameron Date: Sun May 8 18:55:56 2022 +0100 iio: adc: ad7768-1: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to reflect that separate cachelines 'may' be required. Fixes: a5f8c7da3dbe ("iio: adc: Add AD7768-1 ADC basic support") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-17-jic23@kernel.org drivers/iio/adc/ad7768-1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 009ae227a1dace2d4d27c804e5bd65907e1d0557 Author: Jonathan Cameron Date: Sun May 8 18:55:55 2022 +0100 iio: adc: ad7766: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to reflect the fact DMA safety 'may' require separate cachelines. Fixes: aa16c6bd0e09 ("iio:adc: Add support for AD7766/AD7767") Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-16-jic23@kernel.org drivers/iio/adc/ad7766.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6268c6eebb13f228d418f9adaca848b3ed5b3cf9 Author: Jonathan Cameron Date: Sun May 8 18:55:54 2022 +0100 iio: adc: ad7606: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_ALIGN definition. Update the comment to reflect the fact DMA safety 'may' require separate cachelines. Fixes: 7989b4bb23fe ("iio: adc: ad7616: Add support for AD7616 ADC") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-15-jic23@kernel.org drivers/iio/adc/ad7606.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 58b74555afc8affe4ae4f57d396349158433fc80 Author: Jonathan Cameron Date: Sun May 8 18:55:53 2022 +0100 iio: adc: ad7476: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to reflect that DMA safety 'may' require separate cachelines. Fixes tag is unlikely to be the actual introdution of the problem but is far enough back to cover any likely backporting. Fixes: 7a28fe3c93d6 ("staging:iio:ad7476: Squash driver into a single file.") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-14-jic23@kernel.org drivers/iio/adc/ad7476.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 585c9772f883da3ac425e2e8277b2aaceb201f38 Author: Jonathan Cameron Date: Sun May 8 18:55:52 2022 +0100 iio: adc: ad7298: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: be7fd3b86ad2 ("iio:adc:ad7298 make the tx and rx buffers __be16") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-13-jic23@kernel.org drivers/iio/adc/ad7298.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98295a206d04633bae31f279de11ff7d04724bce Author: Jonathan Cameron Date: Sun May 8 18:55:51 2022 +0100 iio: adc: ad7292: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 506d2e317a0a ("iio: adc: Add driver support for AD7292") Signed-off-by: Jonathan Cameron Acked-by: Marcelo Schmitt Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-12-jic23@kernel.org drivers/iio/adc/ad7292.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e2008429588b857bbc13d048b67b931a8d84816 Author: Jonathan Cameron Date: Sun May 8 18:55:50 2022 +0100 iio: adc: ad7280a: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 003f1d48de52 ("staging:iio:adc:ad7280a: Split buff[2] into tx and rx parts") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-11-jic23@kernel.org drivers/iio/adc/ad7280a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b990cdfe7536a8da7e134d516350402981300016 Author: Jonathan Cameron Date: Sun May 8 18:55:49 2022 +0100 iio: adc: ad7266: Fix alignment for DMA safety ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Update the comment to reflect that DMA safety 'may' require separate cachelines. Fixes: 54e018da3141 ("iio:ad7266: Mark transfer buffer as __be16") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-10-jic23@kernel.org drivers/iio/adc/ad7266.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b1d3a806630dbbf3b4d75a2e850adccf4f4439e7 Author: Jonathan Cameron Date: Sun May 8 18:55:48 2022 +0100 iio: accel: sca3300: Fix alignment for DMA safety ____cacheline_aligned is insufficient guarantee for non-coherent DMA. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 9cc9806e22178 ("iio: accel: Add driver for Murata SCA3300 accelerometer") Signed-off-by: Jonathan Cameron Reviewed-by: Tomas Melin Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-9-jic23@kernel.org drivers/iio/accel/sca3300.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a263456f0e27ec2f00d25119757f4d4bd656b2e9 Author: Jonathan Cameron Date: Sun May 8 18:55:47 2022 +0100 iio: accel: sca3000: Fix alignment for DMA safety ____cacheline_aligned is insufficient guarantee for non-coherent DMA. Switch to the updated IIO_DMA_MINALIGN definition. The second alignment marking is left in place to avoid doing more than the simple fix in this patch. Fixes: ced5c03d360ae ("staging:iio:accel:sca3000 merge files into one.") Fixes: 152a6a884ae13 ("staging:iio:accel:sca3000 move to hybrid hard / soft buffer design.") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-8-jic23@kernel.org drivers/iio/accel/sca3000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a794b34083820ff4131bf43245aeb7030fecf038 Author: Jonathan Cameron Date: Sun May 8 18:55:46 2022 +0100 iio: accel: bmi088: Fix alignment for DMA safety ____cacheline_aligned is insufficient guarantee for non-coherent DMA. Switch to the updated IIO_DMA_MINALIGN definition. Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-7-jic23@kernel.org drivers/iio/accel/bmi088-accel-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38e71240e2ff97184cdcdaf877cf62d3f16678e2 Author: Jonathan Cameron Date: Sun May 8 18:55:45 2022 +0100 iio: accel: bma220: Fix alignment for DMA safety ____cacheline_aligned is insufficient guarantee for non-coherent DMA. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: bf2a5600a3ebc ("iio: accel: Add support for Bosch BMA220") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-6-jic23@kernel.org drivers/iio/accel/bma220_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e1f956a804df9074fb5de557563d153ae25252e7 Author: Jonathan Cameron Date: Sun May 8 18:55:44 2022 +0100 iio: accel: adxl367: Fix alignment for DMA safety ____cacheline_aligned is insufficient guarantee for non-coherent DMA. Switch to the updated IIO_DMA_MINALIGN definition. Update comment to reflect that DMA safety may require separate cachelines. Fixes: cbab791c5e2a5 ("iio: accel: add ADXL367 driver") Signed-off-by: Jonathan Cameron Cc: Cosmin Tanislav Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-5-jic23@kernel.org drivers/iio/accel/adxl367.c | 2 +- drivers/iio/accel/adxl367_spi.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) commit 46403dcf3a7cbd24b86f809fd79962f4d6b137c5 Author: Jonathan Cameron Date: Sun May 8 18:55:43 2022 +0100 iio: accel: adxl355: Fix alignment for DMA safety ____cacheline_aligned is insufficient guarantee for non-coherent DMA. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 327a0eaf19d53 ("iio: accel: adxl355: Add triggered buffer support") Signed-off-by: Jonathan Cameron Cc: Puranjay Mohan Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-4-jic23@kernel.org drivers/iio/accel/adxl355_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f68a0445ee86e48dafbfdea50163ad6fc6dba268 Author: Jonathan Cameron Date: Sun May 8 18:55:42 2022 +0100 iio: accel: adxl313: Fix alignment for DMA safety ____cacheline_aligned is insufficient guarantee for non-coherent DMA. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 636d44633039 ("iio: accel: Add driver support for ADXL313") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-3-jic23@kernel.org drivers/iio/accel/adxl313_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12c4efe3509b8018e76ea3ebda8227cb53bf5887 Author: Jonathan Cameron Date: Sun May 8 18:55:41 2022 +0100 iio: core: Fix IIO_ALIGN and rename as it was not sufficiently large Discussion of the series: https://lore.kernel.org/all/20220405135758.774016-1-catalin.marinas@arm.com/ mm, arm64: Reduce ARCH_KMALLOC_MINALIGN brought to my attention that our current IIO usage of L1CACHE_ALIGN is insufficient as their are Arm platforms out their with non coherent DMA and larger cache lines at at higher levels of their cache hierarchy. Rename the define to make it's purpose more explicit. It will be used much more widely going forwards (to replace incorrect ____cacheline_aligned markings. Note this patch will greatly reduce the padding on some architectures that have smaller requirements for DMA safe buffers. The history of changing values of ARCH_KMALLOC_MINALIGN via ARCH_DMA_MINALIGN on arm64 is rather complex. I'm not tagging this as fixing a particular patch from that route as it's not clear what to tag. Most recently a change to bring them back inline was reverted because of some Qualcomm Kryo cores with an L2 cache with 128-byte lines sitting above the point of coherency. c1132702c71f Revert "arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES)" That reverts: 65688d2a05de arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES) which refers to the change originally being motivated by Thunder x1 performance rather than correctness. Fixes: 6f7c8ee585e9d ("staging:iio: Add ability to allocate private data space to iio_allocate_device") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-2-jic23@kernel.org drivers/iio/accel/bma400_core.c | 2 +- drivers/iio/adc/adi-axi-adc.c | 7 ++++--- drivers/iio/industrialio-core.c | 4 ++-- include/linux/iio/iio.h | 10 ++++++++-- 4 files changed, 15 insertions(+), 8 deletions(-) commit 68d07a7bc36be54b92deaed71a090740282ec300 Author: Stephen Boyd Date: Tue May 3 12:39:37 2022 -0700 iio: sx9324: Add setting for CS idle mode Based on device tree setting, set the CS idle mode. Reviewed-by: Gwendal Grignou Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20220503193937.3794477-3-swboyd@chromium.org Signed-off-by: Jonathan Cameron drivers/iio/proximity/sx9324.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit f24333103e844d479161f8d58d59afa2ceac729b Author: Stephen Boyd Date: Tue May 3 12:39:36 2022 -0700 dt-bindings: iio: sx9324: Add CS idle/sleep mode We need to configure the sleep and idle mode of the CS pins for this device. Add a DT property to do this so pins are in a proper state during sleep (either hi-z, grounded, or pulled up to vdd). Reviewed-by: Gwendal Grignou Signed-off-by: Stephen Boyd Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220503193937.3794477-2-swboyd@chromium.org Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/proximity/semtech,sx9324.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) commit bc76ea59bb43245037d248d9d5b26edda93a9776 Author: Gwendal Grignou Date: Fri Apr 29 15:01:44 2022 -0700 iio: sx9360: Add pre-charge resistor setting Add ability to set the precharge internal resistance from the device tree. Signed-off-by: Gwendal Grignou Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20220429220144.1476049-11-gwendal@chromium.org Signed-off-by: Jonathan Cameron drivers/iio/proximity/sx9360.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 4f3b42b801552edeba7ba3bbbde5ed21bc06351d Author: Gwendal Grignou Date: Fri Apr 29 15:01:43 2022 -0700 dt-bindings: iio: sx9360: Add precharge resistor setting Allow configure the resistance used during precharge. Signed-off-by: Gwendal Grignou Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220429220144.1476049-10-gwendal@chromium.org Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/proximity/semtech,sx9360.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) commit 71783b07aa0b3a17be3dc4599e81426ad6dd6555 Author: Gwendal Grignou Date: Fri Apr 29 15:01:42 2022 -0700 iio: sx9324: Add Setting for internal analog gain Based on device tree setting, set the internal analog gain. Signed-off-by: Gwendal Grignou Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20220429220144.1476049-9-gwendal@chromium.org Signed-off-by: Jonathan Cameron drivers/iio/proximity/sx9324.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 67ac843324a569810dc6736e26bfdc362cdc8e24 Author: Gwendal Grignou Date: Fri Apr 29 15:01:41 2022 -0700 dt-bindings: iio: sx9324: Add input analog gain Allow setting the configure the input analog gain. Signed-off-by: Gwendal Grignou Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220429220144.1476049-8-gwendal@chromium.org Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/proximity/semtech,sx9324.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 841a329b5faa19a5096b38ea3c442d4db0a8f4f6 Author: Gwendal Grignou Date: Fri Apr 29 15:01:40 2022 -0700 iio: sx9324: Add Setting for internal compensation resistor Based on device tree setting, set the internal compensation resistor. Signed-off-by: Gwendal Grignou Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20220429220144.1476049-7-gwendal@chromium.org Signed-off-by: Jonathan Cameron drivers/iio/proximity/sx9324.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit f337f41f5d00f41b976d39581eeb5520c88c5ce5 Author: Gwendal Grignou Date: Fri Apr 29 15:01:39 2022 -0700 dt-bindings: iio: sx9324: Add internal compensation resistor setting Allow setting the internal resistor used for compensation. Signed-off-by: Gwendal Grignou Reviewed-by: Stephen Boyd Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220429220144.1476049-6-gwendal@chromium.org Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/proximity/semtech,sx9324.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d2fb946019d59b1b5913e3fd12a4c57d84a7a7ea Author: Gwendal Grignou Date: Fri Apr 29 15:01:38 2022 -0700 iio: sx9324: Add precharge internal resistance setting Add ability to set the precharge internal resistance from the device tree. Signed-off-by: Gwendal Grignou Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20220429220144.1476049-5-gwendal@chromium.org Signed-off-by: Jonathan Cameron drivers/iio/proximity/sx9324.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 057e45db96fc98d758915fe09aa52b6faaa17cc0 Author: Gwendal Grignou Date: Fri Apr 29 15:01:37 2022 -0700 dt-bindings: iio: sx9324: Add precharge resistor setting Allow configure the resistance used during precharge. Signed-off-by: Gwendal Grignou Reviewed-by: Stephen Boyd Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220429220144.1476049-4-gwendal@chromium.org Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/proximity/semtech,sx9324.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) commit 0b24034c7ffa20bcfb4fdfece1df770ec5b0a634 Author: Gwendal Grignou Date: Fri Apr 29 15:01:36 2022 -0700 iio: sx9324: Fix register field spelling Field for PROX_CTRL4 should contain PROX_CTRL4. Fixes: 4c18a890dff8d ("iio:proximity:sx9324: Add SX9324 support") Signed-off-by: Gwendal Grignou Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20220429220144.1476049-3-gwendal@chromium.org Signed-off-by: Jonathan Cameron drivers/iio/proximity/sx9324.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit feb0bd2bcab6a3970422c3baf0bdc77713e547f9 Author: Jonathan Cameron Date: Sun Feb 20 17:51:49 2022 +0000 iio: gyro: mpu3050: Use pm_ptr() and DEFINE_RUNTIME_DEV_PM_OPS() Using this approach as opposed to CONFIG_PM guards allows the compiler to remove the unused code instead of doing it manually. Signed-off-by: Jonathan Cameron Cc: Linus Walleij Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20220220175149.503495-3-jic23@kernel.org drivers/iio/gyro/mpu3050-core.c | 11 ++--------- drivers/iio/gyro/mpu3050-i2c.c | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) commit 3c5a15cc4bd7818d8ab149fe03e65d4ad452ed83 Author: Jonathan Cameron Date: Sun Feb 20 17:51:48 2022 +0000 iio: gyro: mpu3050: Drop unused symbol exports. This driver is built as a single module. There is an note in the makefile about SPI support being a reason to split the build in future. That support has never arrived so drop these symbol exports. Signed-off-by: Jonathan Cameron Cc: Linus Walleij Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20220220175149.503495-2-jic23@kernel.org drivers/iio/gyro/mpu3050-core.c | 3 --- 1 file changed, 3 deletions(-) commit 129d7c49c5a79920ee83c61823c7b344a6844031 Author: Jonathan Cameron Date: Sun Feb 20 17:37:00 2022 +0000 iio: adc: adi-axi: Move exported symbols into IIO_ADI_AXI namespace. Avoid unnecessary pollution of the global symbol namespace by moving library functions in to a specific namespace and import that into the drivers that make use of the functions. For more info: https://lwn.net/Articles/760045/ Signed-off-by: Jonathan Cameron Cc: Nuno Sá Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20220220173701.502331-5-jic23@kernel.org drivers/iio/adc/ad9467.c | 1 + drivers/iio/adc/adi-axi-adc.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 9822bb87cee12a9d1e3321b652ba537af1f174aa Author: Jonathan Cameron Date: Sun Feb 20 16:33:27 2022 +0000 iio: core: drop iio_get_time_res() This function was introduced with the ability to pick a clock. There are no upstream users so presumably it isn't as obviously useful as it seemed at the time. Hence drop it. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220220163327.424696-1-jic23@kernel.org drivers/iio/industrialio-core.c | 23 ----------------------- include/linux/iio/iio.h | 1 - 2 files changed, 24 deletions(-) commit ccb64316cf7e20a9468333f73e7f7c60de911604 Author: Cosmin Tanislav Date: Tue Jan 11 09:47:03 2022 +0200 iio: addac: ad74413r: for_each_set_bit_from -> for_each_set_bit The starting bit is always zero, it doesn't make much sense to use for_each_set_bit_from. Replace it with for_each_set_bit which doesn't start from a particular bit. Signed-off-by: Cosmin Tanislav Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220111074703.3677392-3-cosmin.tanislav@analog.com Signed-off-by: Jonathan Cameron drivers/iio/addac/ad74413r.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9e63be2acb34411ec00a34df666e169ce29a6904 Author: Xiang wangx Date: Sat Jun 4 12:05:41 2022 +0800 iio: accel: sca3000: Fix syntax errors in comments Delete the redundant word 'via'. Signed-off-by: Xiang wangx Link: https://lore.kernel.org/r/20220604040541.8470-1-wangxiang@cdjrlc.com Signed-off-by: Jonathan Cameron drivers/iio/accel/sca3000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38d5cd1e7ee0b3e96f39ed3a93cada1c71352c53 Author: LI Qingwu Date: Sun May 29 06:18:53 2022 +0000 iio: accel: sca3300: Add inclination channels Different from SCA3300, SCL3300 can output inclination angles. Angles are formed from acceleration with following equations: ANG_X = atan2(accx , sqrt(pow(accy , 2) + pow(accz , 2))) ANG_Y = atan2(accy , sqrt(pow(accx , 2) + pow(accz , 2))) ANG_Z = atan2(accz , sqrt(pow(accx , 2) + pow(accy , 2))) The commit adds the output of the raw value, scale and scale_available of angles. New interfaces: in_incli_scale in_incli_scale_available in_incli_x_raw in_incli_y_raw in_incli_z_raw Data converted by application of scale to degrees. Signed-off-by: LI Qingwu Reviewed-by: Tomas Melin Link: https://lore.kernel.org/r/20220529061853.3044893-6-Qing-wu.Li@leica-geosystems.com.cn Signed-off-by: Jonathan Cameron drivers/iio/accel/sca3300.c | 76 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 3 deletions(-) commit 24fb2d3c4620a43e0e876926b1835283871b3cfe Author: LI Qingwu Date: Sun May 29 06:18:52 2022 +0000 iio: accel: sca3300: Add support for SCL3300 Add support for Murata SCL3300, a 3-axis MEMS accelerometer. Same as SCA3300, it has the accelerometer and temperature output. Datasheet: www.murata.com/en-us/products/sensor/inclinometer/overview/lineup/scl3300 Signed-off-by: LI Qingwu Reviewed-by: Tomas Melin Link: https://lore.kernel.org/r/20220529061853.3044893-5-Qing-wu.Li@leica-geosystems.com.cn Signed-off-by: Jonathan Cameron drivers/iio/accel/sca3300.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit ad985d4d38d7ad8a83b0ff428ea51a2f41ce12e1 Author: LI Qingwu Date: Sun May 29 06:18:51 2022 +0000 iio: accel: sca3300: modified to support multi chips Prepare the way for multiple chips and additional channels: - Modify the driver to read the device ID and load the corresponding sensor information from the table to support multiple chips - Add prepares for the addition of extra channels - Prepare for handling the operation modes for multiple chips Signed-off-by: LI Qingwu Reviewed-by: Tomas Melin Link: https://lore.kernel.org/r/20220529061853.3044893-4-Qing-wu.Li@leica-geosystems.com.cn Signed-off-by: Jonathan Cameron drivers/iio/accel/sca3300.c | 197 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 156 insertions(+), 41 deletions(-) commit e59dd3aca976bbac914e27ef56cb1ecbc7c85597 Author: LI Qingwu Date: Sun May 29 06:18:50 2022 +0000 iio: accel: sca3300: add define for temp channel for reuse. Add define of SCA3300_TEMP_CHANNEL for reuse. Signed-off-by: LI Qingwu Reviewed-by: Tomas Melin Link: https://lore.kernel.org/r/20220529061853.3044893-3-Qing-wu.Li@leica-geosystems.com.cn Signed-off-by: Jonathan Cameron drivers/iio/accel/sca3300.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 2231b463e4a8ca1773d9ad407981bf6aeec670f9 Author: LI Qingwu Date: Sun May 29 06:18:49 2022 +0000 dt-bindings: iio: accel: sca3300: Document murata,scl3300 Add DT bindings for Murata scl3300 inclinometer. Reviewed-by: Rob Herring Signed-off-by: LI Qingwu Reviewed-by: Tomas Melin Link: https://lore.kernel.org/r/20220529061853.3044893-2-Qing-wu.Li@leica-geosystems.com.cn Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/accel/murata,sca3300.yaml | 1 + 1 file changed, 1 insertion(+) commit d34a1daf1a93b14d9bbab07e2f55336dec763407 Author: Andy Shevchenko Date: Wed Jun 1 00:39:22 2022 +0300 iio: adc: nau7802: Make use of device properties Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Add mod_devicetable.h include. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220531213922.72992-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/adc/nau7802.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d8600a189c71ece45f7c75f796ae43b6bfabb419 Author: Andy Shevchenko Date: Wed Jun 1 00:39:21 2022 +0300 iio: adc: nau7802: Convert driver to use ->probe_new() Use the ->probe_new() callback. The driver does not use const struct i2c_device_id * argument, so convert it to utilise the simplified I²C driver registration. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220531213922.72992-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/adc/nau7802.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 3cc6a67b73fdf2bb42f52aff7efe0f73496527a3 Author: Andy Shevchenko Date: Tue May 31 17:23:53 2022 +0300 iio: adc: vf610_adc: Make use of device properties Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Add mod_devicetable.h include. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220531142353.64925-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 1 - drivers/iio/adc/vf610_adc.c | 15 ++++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) commit 3b9b4357d5b241f4de08135c176b6da39fe82d6a Author: Andy Shevchenko Date: Tue May 31 16:53:20 2022 +0300 iio: dac: ad5592r: Get rid of OF specifics Use dev_fwnode() instead of direct OF node dereference when checking for regulator API error code. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220531135320.63096-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/dac/ad5592r-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7db52e252a2bf0074f513d2477f27248b7a96f96 Author: Andy Shevchenko Date: Wed Jun 1 00:22:18 2022 +0300 iio: adc: lpc18xx_adc: Switch from of headers to mod_devicetable.h There is nothing directly using of specific interfaces in this driver, so lets not include the headers. While at it, drop dependency to OF, which currently makes no sense. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220531212218.72189-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 2 +- drivers/iio/adc/lpc18xx_adc.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit a0bf153f26444aeb4511bf593c2d0cd6c5df204e Author: Krzysztof Kozlowski Date: Thu May 26 22:43:50 2022 +0200 arm64: dts: arm: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Link: https://lore.kernel.org/r/20220526204350.832361-1-krzysztof.kozlowski@linaro.org Acked-by: Liviu Dudau Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-base.dtsi | 44 +++++++++++++++---------------- arch/arm64/boot/dts/arm/juno-cs-r1r2.dtsi | 16 +++++------ 2 files changed, 30 insertions(+), 30 deletions(-) commit c9ae7b866f32043d23a34d00a5e6e8d86d2cf10e Author: Ville Syrjälä Date: Tue May 3 21:22:30 2022 +0300 drm/i915: Skip FDI vs. dotclock sanity check during readout The VBIOS/GOP may not program the FDI M/n vs. dotclock entirely consistently. Eg. on a SNB Thinkpad X220 LVDS I see dotclock of 69.286 MHz (the best the DPLL can do) vs. FDI M/N 69.3 MHz (matches what the EDID actually declares). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220503182242.18797-15-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display.c | 2 -- 1 file changed, 2 deletions(-) commit 97708335b04df3eef0e650b0601cdf6c5ab16dcd Author: Ville Syrjälä Date: Thu May 5 00:21:09 2022 +0300 drm/i915: Introduce struct iclkip_params Pull the various iCLKIP parameters into a struct. Later on we'll reuse this during the state computation to determine the exact dotclock the hardware will be generating for us. v2: Don't lose the phaseinc calculation v3: Drop the misplaced '#include ' from intel_crt.c (Jani) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220504212109.26369-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_pch_refclk.c | 92 +++++++++++++++---------- 1 file changed, 57 insertions(+), 35 deletions(-) commit 623411c293d180ed51f1c3b5753c5acf2c2a4077 Author: Ville Syrjälä Date: Wed May 4 15:33:50 2022 +0300 drm/i915: Extract intel_crtc_dotclock() Extract intel_crtc_dotclock() from ddi_dotclock_get(). We'll reuse this during state computation in order to determine the actual final dotclcok after the DPLL computation has been done (which may not give us the exact same port_clock that we fed in). v2: Add the prototype Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220504123350.13235-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_ddi.c | 18 ++++++++++++------ drivers/gpu/drm/i915/display/intel_display.h | 1 + 2 files changed, 13 insertions(+), 6 deletions(-) commit a150345aa758492e05d2934f318ce7c2566b1cfe Author: Bard Liao Date: Tue Jun 14 17:26:30 2022 +0800 ASoC: SOF: ipc4-topology: add SoundWire/ALH aggregation support Some SoundWire hardware topologies rely on different amplifiers or capture devices connected on different links. These devices need to be 'aggregated', remain synchronized and be handled as a single logical device. In the IPC3 solution, the aggregation for amplifiers was handled by a firmware 'demux' component. In the IPC4 solution, the demux component is not needed, the gateway component can handle multiple ALH/DMA transfers at the same time. This change makes the topology slightly more complicated in that only one ALH DAI will be connected in the topology with the gateway. The other DAIs that are part of the 'aggregated' dailink are not shown in the DAPM graph as connected to the gateway, but they will however be activated thanks to a feature in soc-dapm.c where events are forwarded to all DAIs in the dailink (see soc_dapm_stream_event). The topology also sets the same stream name for all widgets, dais and dailinks, so a search for the stream name helps identify cases where SoundWire/ALH aggregation is needed. Signed-off-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220614092630.20144-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 68 +++++++++++++++++++++++++++++++++++++++---- sound/soc/sof/ipc4-topology.h | 11 +++++++ 2 files changed, 74 insertions(+), 5 deletions(-) commit 30ac49841386f933339817771ec315a34a4c0edd Author: Mark Brown Date: Fri Jun 3 13:25:08 2022 +0200 ASoC: ops: Don't modify the driver's plaform_max when reading state Currently snd_soc_info_volsw() will set a platform_max based on the limit the control has if one is not already set. This isn't really great, we shouldn't be modifying the passed in driver data especially in a path like this which may not ever be executed or where we may execute other callbacks before this one. Instead make this function leave the data unchanged, and clarify things a bit by referring to max rather than platform_max within the function. platform_max is now applied as a limit after working out the natural maximum value for the control. This means that platform_max is no longer treated as a direct register value for controls were min is non-zero. The put() callbacks already validate on this basis, and there do not appear to be any in tree users that would be affected. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220603112508.3856519-1-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/soc-ops.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 14cc5849120051caf537f663ec620910503bb719 Merge: 7ed1f83bb4f0 da440af07fc3 Author: Mark Brown Date: Tue Jun 14 11:25:45 2022 +0100 ASoC: Merge fixes Required for more changes for the ops. commit 7ed1f83bb4f05fe460984ae49e98d1c1be38fb5f Author: Peter Ujfalusi Date: Tue Jun 14 10:56:17 2022 +0300 ASoC: SOF: Compile and runtime IPC version selection The new IPC4 version is only supported by Intel platforms, iMX, AMD and MediaTek only uses the standard SOF IPC. There is no need for these platforms to build kernel support for IPC4 as it is just dead code for them. SND_SOC_SOF_IPC3 and SND_SOC_SOF_INTEL_IPC4 is introduced to allow compile time selection and exclusion of IPC implementations. To avoid randconfig failures add also support for runtime selection of the IPC ops in ipc.c based on sdev->pdata->ipc_type Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220614075618.28605-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/Kconfig | 7 +++++++ sound/soc/sof/Makefile | 16 ++++++++++++---- sound/soc/sof/amd/Kconfig | 1 + sound/soc/sof/imx/Kconfig | 1 + sound/soc/sof/intel/Kconfig | 11 +++++++++++ sound/soc/sof/ipc.c | 24 ++++++++++++++++++------ sound/soc/sof/mediatek/Kconfig | 1 + 7 files changed, 51 insertions(+), 10 deletions(-) commit 689614ce48b0310b50d8d6c9a64f8a98cfc6f195 Author: Ajit Kumar Pandey Date: Tue Jun 14 10:52:51 2022 +0300 ASoC: SOF: topology: add code to parse config params for ACPDMIC dai Add sof_ipc_dai_acpdmic_params and tokens to parse dmic channels and rate params from topology file Signed-off-by: Ajit Kumar Pandey Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20220614075251.21499-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown include/sound/sof/dai-amd.h | 7 +++++++ include/sound/sof/dai.h | 2 +- include/uapi/sound/sof/tokens.h | 4 ++++ sound/soc/sof/ipc3-pcm.c | 8 ++++---- sound/soc/sof/ipc3-topology.c | 25 +++++++++++++++++++------ sound/soc/sof/sof-audio.h | 1 + sound/soc/sof/topology.c | 4 ++++ 7 files changed, 40 insertions(+), 11 deletions(-) commit 33597c6257bfe2a84f7950481118ef9783f42f49 Author: Krzysztof Kozlowski Date: Thu May 26 22:42:56 2022 +0200 arm64: dts: fsl: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 8 ++++---- arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 16 ++++++++-------- arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 10 +++++----- arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 10 +++++----- arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 8 ++++---- arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 10 +++++----- arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts | 4 ++-- arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 8 ++++---- arch/arm64/boot/dts/freescale/fsl-lx2162a-qds.dts | 4 ++-- arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi | 10 +++++----- .../boot/dts/freescale/imx8mm-beacon-baseboard.dtsi | 4 ++-- arch/arm64/boot/dts/freescale/imx8mm-icore-mx8mm.dtsi | 12 ++++++------ arch/arm64/boot/dts/freescale/imx8mm-venice-gw700x.dtsi | 16 ++++++++-------- arch/arm64/boot/dts/freescale/imx8mm.dtsi | 8 ++++---- .../boot/dts/freescale/imx8mn-beacon-baseboard.dtsi | 4 ++-- arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mn.dtsi | 10 +++++----- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 8 ++++---- arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts | 4 ++-- arch/arm64/boot/dts/freescale/imx8mq-zii-ultra.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 4 ++-- .../boot/dts/freescale/imx8qxp-colibri-eval-v3.dtsi | 6 +++--- arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 6 +++--- 24 files changed, 88 insertions(+), 88 deletions(-) commit 4a154e5ab9a2d7e8a0bf8ec3f031ce428ef79917 Author: Peng Fan Date: Thu May 26 11:54:49 2022 +0800 arm64: dts: fsl-ls10xx: use generic dma node name dma-controller is preferred for dma node. Signed-off-by: Peng Fan Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit e56fdc60ac8fb65636ca69bc88fa5319b4cdb8c5 Author: Lucas Stach Date: Wed May 25 12:35:20 2022 +0200 arm64: dts: imx8mp-evk: add regulator supply to CPU nodes This supply is used by cpufreq to scale the voltage applied to the ARM voltage domain of the SoC when switching between the different operating points. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit fd207b47278277dc7647e1d308db71ed2f4a12e5 Author: Marek Vasut Date: Mon May 23 14:32:23 2022 +0200 arm64: dts: imx8mm: Add SNVS LPGPR Add SNVS LPGPR bindings to MX8M Mini, the LPGPR is used to store boot counter. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Marcel Ziswiler Cc: Peng Fan Cc: Rob Herring Cc: Shawn Guo Cc: NXP Linux Team Cc: devicetree@vger.kernel.org To: linux-arm-kernel@lists.infradead.org Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 8c91374b1a5fa3b04063761f9b7eeb1e80963d67 Author: Krzysztof Kozlowski Date: Sat May 21 18:46:38 2022 +0200 arm64: dts: fsl: ls1012a: fix Micron SPI NOR compatible The proper compatible for Micron n25q128a11 SPI NOR flash should include vendor-prefix. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 235a6d80f021d9c3bb5652fb6b19d092a7339248 Author: Greg Kroah-Hartman Date: Tue Jun 14 11:27:16 2022 +0200 Revert "ARM: dts: aspeed: Add USB2.0 device controller node" This reverts commit 2cee50bf459051d1b41d0deee25e930a788cb94e. It was already applied, and with this duplicate there is now build problems. Reported-by: Stephen Rothwell Reported-by: Bagas Sanjaya Signed-off-by: Greg Kroah-Hartman arch/arm/boot/dts/aspeed-g6.dtsi | 10 ---------- 1 file changed, 10 deletions(-) commit 7e5e8ec7dbd8504fdd04b5f6c9b6a207e54c4c6c Author: Jakub Kicinski Date: Fri Jun 10 11:02:12 2022 -0700 docs: tls: document the TLS_TX_ZEROCOPY_RO Add missing documentation for the TLS_TX_ZEROCOPY_RO opt-in. Signed-off-by: Jakub Kicinski Acked-by: Maxim Mikityanskiy Link: https://lore.kernel.org/r/20220610180212.110590-1-kuba@kernel.org Signed-off-by: Paolo Abeni Documentation/networking/tls.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 5eb8deb4af56b120c152066ff43a0867267b264b Author: Sergey Shtylyov Date: Fri Jun 10 00:06:54 2022 +0300 ata: libata-core: get rid of *else* branches in ata_id_n_sectors() Using *else* after *return* doesn't make much sense -- getting rid of such *else* branches reduces the indentation levels and thus reduces # of LoC... Signed-off-by: Sergey Shtylyov Signed-off-by: Damien Le Moal drivers/ata/libata-core.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit d38dc01a4e68133e11ae74af7585d2c4bbd5803d Author: Conor Dooley Date: Tue Jun 14 07:58:10 2022 +0100 spi: microchip-core: fix potentially incorrect return from probe If platform_get_irqi() returns 0, the error case will be triggered but probe() will return 0 rather than an error. Ape the other drivers using this pattern and return -ENXIO. Reported-by: Yang Li Link: https://lore.kernel.org/linux-spi/20220609055533.95866-2-yang.lee@linux.alibaba.com/ Signed-off-by: Conor Dooley Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers") Link: https://lore.kernel.org/r/20220614065809.1969177-1-conor.dooley@microchip.com Signed-off-by: Mark Brown drivers/spi/spi-microchip-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74bb746407bf0d7c7d126c7731dbcd66d467619b Author: Stephen Boyd Date: Tue Jun 14 00:57:26 2022 -0700 platform/chrome: cros_ec: Always expose last resume result The last resume result exposing logic in cros_ec_sleep_event() incorrectly requires S0ix support, which doesn't work on ARM based systems where S0ix doesn't exist. That's because cros_ec_sleep_event() only reports the last resume result when the EC indicates the last sleep event was an S0ix resume. On ARM systems, the last sleep event is always S3 resume, but the EC can still detect sleep hang events in case some other part of the AP is blocking sleep. Always expose the last resume result if the EC supports it so that this works on all devices regardless of S0ix support. This fixes sleep hang detection on ARM based chromebooks like Trogdor. Cc: Rajat Jain Cc: Matthias Kaehlcke Cc: Hsin-Yi Wang Cc: Tzung-Bi Shih Reviewed-by: Guenter Roeck Reviewed-by: Evan Green Fixes: 7235560ac77a ("platform/chrome: Add support for v1 of host sleep event") Signed-off-by: Stephen Boyd Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220614075726.2729987-1-swboyd@chromium.org drivers/platform/chrome/cros_ec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f7309dbe628d5c8653d5f3649ef05a65c9b88daf Author: Pierre-Louis Bossart Date: Fri Jun 10 16:46:01 2022 -0500 ASoC: SOF: reduce default verbosity of IPC logs We currently log the initiation of an IPC as well at its success. [ 3906.106987] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0x80010000: GLB_DAI_MSG: CONFIG [ 3906.107189] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx succeeded: 0x80010000: GLB_DAI_MSG: CONFIG This is overkill in most cases, we already have a message thrown in case of errors and have tracepoints enabled to check for IPC duration. The only case where this might be useful is to check if there is an interleaved IPC RX. Add a flag and only print those logs if enabled. In addition, the DMA_POSITION_UPDATE for traces brings limited information in most cases and pollutes the logs for no good reason. [ 3906.322256] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG: DMA_POSITION [ 3906.322308] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG: DMA_POSITION [ 3906.822261] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG: DMA_POSITION [ 3906.822319] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG: DMA_POSITION [ 3907.822261] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG: DMA_POSITION [ 3907.822319] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG: DMA_POSITION [ 3908.822251] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG: DMA_POSITION [ 3908.822309] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG: DMA_POSITION This information is only helpful when debugging the trace support, not when using the trace. Add a flag to only print DMA position update logs if enabled. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220610214601.43005-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc3.c | 5 ++++- sound/soc/sof/sof-priv.h | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) commit 047c69a3a9b19f29e021c77a7e9ce79230a342ed Author: Shengjiu Wang Date: Fri Jun 10 13:47:22 2022 +0800 ASoC: fsl_mqs: Add support for i.MX93 platform Add i.MX93 compatible string and specific soc data Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1654840042-7069-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_mqs.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 81ae0635df7de58496def18b0b9333992630b9af Author: Shengjiu Wang Date: Fri Jun 10 13:47:21 2022 +0800 ASoC: dt-bindings: fsl,mqs: Add compatible string for i.MX93 platform Add compatible string "fsl,imx93-mqs" for i.MX93 platform Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1654840042-7069-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/fsl,mqs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 519d1130b66e000ce363ad82c0d61ae36a5392dc Author: Pierre-Louis Bossart Date: Fri Jun 10 16:45:04 2022 -0500 ASoC: SOF: Intel: hda-dai: enhance debug messages The same message was added twice for dai and link_dma, remove the latter one and add dai name and direction to better understand problematic sequences. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220610214504.42974-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dai.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 845a215558647acd4290dd773b9c0de62c123335 Author: Charles Keepax Date: Mon Jun 13 17:15:52 2022 +0100 ASoC: mediatek: mt8186: Use new direct clock defines Update this driver to the new direct clock producer/consumer defines. It appears this driver was added with the inversion taken account of but still uses the CODEC defines so no inversion of the producer/consumer is necessary. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220613161552.481337-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-dai-tdm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit beb89d1d49e9ae1188356d6e37581e5f0b5f62b4 Author: Charles Keepax Date: Mon Jun 13 17:15:51 2022 +0100 ASoC: sun8i-codec: Partial revert to fix clock specifiers Recent updates accidentally updated the clock producer/consumer specifiers on this device as part of refactoring the CPU side of the DAI links. However, this device sits on the CODEC side and shouldn't have been updated. Partially revert the changes keeping the switch to the new clock terminology but going back to the CODEC defines. Fixes: 7cc3965fde74 ("ASoC: sunxi: Update to use set_fmt_new callback") Reported-by: Samuel Holland Signed-off-by: Charles Keepax Reviewed-by: Samuel Holland Tested-by: Samuel Holland Link: https://lore.kernel.org/r/20220613161552.481337-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 203b2aff4786d16ef0cd1a6a9405043a99a5b3fb Author: Colin Ian King Date: Tue Jun 14 07:49:09 2022 +0100 platform/chrome: cros_ec_proto: Fix spelling mistake "unknwon" -> "unknown" There is a spelling mistake in a dev_dbg message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220614064909.47804-1-colin.i.king@gmail.com drivers/platform/chrome/cros_ec_proto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19d62f5eeaa0fd912cc179530084403f90a5535a Author: Marco Bonelli Date: Thu Jun 9 15:49:01 2022 +0200 ethtool: Fix and simplify ethtool_convert_link_mode_to_legacy_u32() Fix the implementation of ethtool_convert_link_mode_to_legacy_u32(), which is supposed to return false if src has bits higher than 31 set. The current implementation uses the complement of bitmap_fill(ext, 32) to test high bits of src, which is wrong as bitmap_fill() fills _with long granularity_, and sizeof(long) can be > 4. No users of this function currently check the return value, so the bug was dormant. Also remove the check for __ETHTOOL_LINK_MODE_MASK_NBITS > 32, as the enum ethtool_link_mode_bit_indices contains far beyond 32 values. Using find_next_bit() to test the src bitmask works regardless of this anyway. Signed-off-by: Marco Bonelli Link: https://lore.kernel.org/r/20220609134900.11201-1-marco@mebeim.net Signed-off-by: Jakub Kicinski net/ethtool/ioctl.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit bfa54812f0bc802819051b4084cd07a3d467ce79 Author: Rasmus Villemoes Date: Mon Jun 6 22:02:08 2022 +0200 net: phy: fixed_phy: set phy_mask before calling mdiobus_register() There's no point probing for phys on this artificial bus, so we can save a little bit of boot time by telling mdiobus_register() not to do that. This doesn't have any functional change, since, at this point, fixed_mdio_read() returns 0xffff for all addresses/registers, so mdiobus_scan() -> get_phy_device() -> get_phy_c22_id() will return -ENODEV, which is just ignored. Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20220606200208.1665417-1-linux@rasmusvillemoes.dk Signed-off-by: Jakub Kicinski drivers/net/phy/fixed_phy.c | 1 + 1 file changed, 1 insertion(+) commit 09c962fd4816f31ad428948c1dea3aea33f471e3 Author: Yoshihiro Shimoda Date: Fri Jun 3 20:05:22 2022 +0900 scsi: MAINTAINERS: Add maintainer for Renesas UFS driver Add maintainer for Renesas UFS driver. Link: https://lore.kernel.org/r/20220603110524.1997825-6-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Martin K. Petersen MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit d69520288efd4908c543cc7414fb5877015eda2a Author: Yoshihiro Shimoda Date: Fri Jun 3 20:05:21 2022 +0900 scsi: ufs: ufs-renesas: Add support for Renesas R-Car UFS controller Add support for Renesas R-Car UFS controller which needs vendor-specific initialization. Link: https://lore.kernel.org/r/20220603110524.1997825-5-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Martin K. Petersen drivers/ufs/host/Kconfig | 12 ++ drivers/ufs/host/Makefile | 1 + drivers/ufs/host/ufs-renesas.c | 412 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 425 insertions(+) commit 2f11bbc2c7f37e3a6151ac548b1c0679cc90ea83 Author: Yoshihiro Shimoda Date: Fri Jun 3 20:05:20 2022 +0900 scsi: ufs: core: Add UFSHCD_QUIRK_HIBERN_FASTAUTO Add UFSHCD_QUIRK_HIBERN_FASTAUTO quirk for host controllers which supports auto-hibernate the capability but only FASTAUTO mode. Link: https://lore.kernel.org/r/20220603110524.1997825-4-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 9 +++++++-- include/ufs/ufshcd.h | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) commit 6554400d6f66b9494a0c0f07712ab0a9d307eb01 Author: Yoshihiro Shimoda Date: Fri Jun 3 20:05:19 2022 +0900 scsi: ufs: core: Add UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS Add UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS for host controllers which do not support 64-bit addressing. Link: https://lore.kernel.org/r/20220603110524.1997825-3-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 2 ++ include/ufs/ufshcd.h | 6 ++++++ 2 files changed, 8 insertions(+) commit 7522c08d1e55a0305304611a9d1d5f0a3db210ec Author: Yoshihiro Shimoda Date: Fri Jun 3 20:05:18 2022 +0900 scsi: dt-bindings: ufs: Document Renesas R-Car UFS host controller Document Renesas R-Car UFS host controller for R-Car S4-8 (r8a779f0). Link: https://lore.kernel.org/r/20220603110524.1997825-2-yoshihiro.shimoda.uh@renesas.com Reviewed-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Yoshihiro Shimoda Signed-off-by: Martin K. Petersen .../devicetree/bindings/ufs/renesas,ufs.yaml | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 216f74e8059aa305a993da1c2d6e3ba2117979fa Author: Alim Akhtar Date: Fri Jun 10 16:11:19 2022 +0530 scsi: ufs: host: ufs-exynos: Add support for FSD UFS HCI Adds support of UFS HCI which is found in Tesla Full Self-Driving (FSD) SoC. Link: https://lore.kernel.org/r/20220610104119.66401-7-alim.akhtar@samsung.com Co-developed-by: Bharat Uppal Signed-off-by: Bharat Uppal Signed-off-by: Alim Akhtar Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-exynos.c | 140 ++++++++++++++++++++++++++++++++++++++++++ drivers/ufs/host/ufs-exynos.h | 1 + 2 files changed, 141 insertions(+) commit daa782a51ec83aee4a4235feeb60b1239c285d82 Author: Alim Akhtar Date: Fri Jun 10 16:11:18 2022 +0530 scsi: ufs: host: ufs-exynos: Add mphy apb clock mask Bit[3] of HCI_CLKSTOP_CTRL register is for enabling/disabling MPHY APB clock. Lets add it to CLK_STOP_MASK, so that the same can be controlled during clock masking/unmasking. Link: https://lore.kernel.org/r/20220610104119.66401-6-alim.akhtar@samsung.com Tested-by: Chanho Park Reviewed-by: Chanho Park Signed-off-by: Alim Akhtar Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-exynos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ea83df8e3bd065037589f2db56fcdc70eb37ae5a Author: Alim Akhtar Date: Fri Jun 10 16:11:17 2022 +0530 scsi: dt-bindings: ufs: exynos-ufs: Add FSD compatible Adds tesla,fsd-ufs compatible for Tesla FSD SoC. Link: https://lore.kernel.org/r/20220610104119.66401-5-alim.akhtar@samsung.com Acked-by: Krzysztof Kozlowski Co-developed-by: Bharat Uppal Signed-off-by: Bharat Uppal Signed-off-by: Alim Akhtar Signed-off-by: Martin K. Petersen Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml | 1 + 1 file changed, 1 insertion(+) commit bcdb6fd4f3e9ac1097698c8d8f56b70853b49873 Author: Pali Rohár Date: Tue May 24 15:28:27 2022 +0200 PCI: aardvark: Fix reporting Slot capabilities on emulated bridge Slot capabilities are currently not reported because emulated bridge does not report the PCI_EXP_FLAGS_SLOT flag. Set PCI_EXP_FLAGS_SLOT to let the kernel know that PCI_EXP_SLT* registers are supported. Move setting of PCI_EXP_SLTCTL register from "dynamic" pcie_conf_read function to static buffer as it is only statically filled the PCI_EXP_SLTSTA_PDS flag and dynamic read callback is not needed for this register. Set Presence State Bit to 1 since there is no support for unplugging the card and there is currently no platform able to detect presence of a card - in such a case the bit needs to be set to 1. Finally correctly set Physical Slot Number to 1 since there is only one port and zero value is reserved for ports within the same silicon as Root Port which is not our case for Aardvark HW. Link: https://lore.kernel.org/r/20220524132827.8837-3-kabel@kernel.org Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Signed-off-by: Bjorn Helgaas drivers/pci/controller/pci-aardvark.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) commit 1326b49636065a29b0aa3832ac963df2a9cece08 Author: Pali Rohár Date: Tue May 24 15:28:26 2022 +0200 PCI: aardvark: Add support for AER registers on emulated bridge Aardvark controller supports Advanced Error Reporting configuration registers. Export these registers on the emulated root bridge via new .read_ext() and .write_ext() methods. Note that in the Advanced Error Reporting Capability header the offset to the next Extended Capability header is set, but it is not documented in Armada 3700 Functional Specification. Since this change adds support only for Advanced Error Reporting, explicitly clear PCI_EXT_CAP_NEXT bits in AER capability header. Now the pcieport driver correctly detects AER support and allows PCIe AER driver to start receiving ERR interrupts. Kernel log now says: pcieport 0000:00:00.0: AER: enabled with IRQ 52 Link: https://lore.kernel.org/r/20220524132827.8837-2-kabel@kernel.org Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Signed-off-by: Bjorn Helgaas drivers/pci/controller/pci-aardvark.c | 79 +++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit 73de1befcc53a7c68b0c5e76b9b5ac41c517760f Author: Xiu Jianfeng Date: Mon Jun 13 21:59:53 2022 +0800 selinux: fix memleak in security_read_state_kernel() In this function, it directly returns the result of __security_read_policy without freeing the allocated memory in *data, cause memory leak issue, so free the memory if __security_read_policy failed. Signed-off-by: Xiu Jianfeng [PM: subject line tweak] Signed-off-by: Paul Moore security/selinux/ss/services.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit cdcdce948d64139aea1c6dfea4b04f5c8ad2784e Author: Ofer Levi Date: Wed Jun 8 13:04:52 2022 -0700 net/mlx5: Add bits and fields to support enhanced CQE compression Expose ifc bits and add needed structure fields and methods to support enhanced CQE compression feature. The enhanced CQE compression feature improves cpu utiliziation with better packet latency from nic to host. Signed-off-by: Ofer Levi Signed-off-by: Saeed Mahameed include/linux/mlx5/device.h | 16 +++++++++++++++- include/linux/mlx5/mlx5_ifc.h | 7 +++++-- 2 files changed, 20 insertions(+), 3 deletions(-) commit d107ba1f7c067b08eb4b8ca7c51187fb7c4d97f2 Author: Shay Drory Date: Wed Jun 8 13:04:51 2022 -0700 net/mlx5: Remove not used MLX5_CAP_BITS_RW_MASK Remove not used MLX5_CAP_BITS_RW_MASK. While at it, remove CAP_MASK, MLX5_CAP_OFF_CMDIF_CSUM and MLX5_DEV_CAP_FLAG_*, since MLX5_CAP_BITS_RW_MASK was their only user. Signed-off-by: Shay Drory Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 7 ------- include/linux/mlx5/device.h | 19 ------------------- 2 files changed, 26 deletions(-) commit 684f062c979dd11dd7c2b46c2def189859a29392 Author: Shay Drory Date: Wed Jun 8 13:04:50 2022 -0700 net/mlx5: group fdb cleanup to single function Currently, the allocation of fdb software objects are done is single function, oppose to the cleanup of them. Group the cleanup of fdb software objects to single function. Signed-off-by: Shay Drory Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 91707779a481aab9c7f1d7a5ea3033ce87dc4fd6 Author: Jianbo Liu Date: Wed Jun 8 13:04:49 2022 -0700 net/mlx5: Add support EXECUTE_ASO action for flow entry Attach flow meter to FTE with object id and index. Use metadata register C5 to store the packet color meter result. Signed-off-by: Jianbo Liu Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 33 ++++++++++++++++++++++++ include/linux/mlx5/fs.h | 14 ++++++++++ 2 files changed, 47 insertions(+) commit 3e94e61bd44d90070dcda53b647fdc826097ef26 Author: Saeed Mahameed Date: Wed Jun 8 13:04:48 2022 -0700 net/mlx5: Add HW definitions of vport debug counters total_q_under_processor_handle - number of queues in error state due to an async error or errored command. send_queue_priority_update_flow - number of QP/SQ priority/SL update events. cq_overrun - number of times CQ entered an error state due to an overflow. async_eq_overrun -number of time an EQ mapped to async events was overrun. comp_eq_overrun - number of time an EQ mapped to completion events was overrun. quota_exceeded_command - number of commands issued and failed due to quota exceeded. invalid_command - number of commands issued and failed dues to any reason other than quota exceeded. Signed-off-by: Saeed Mahameed Signed-off-by: Michael Guralnik Signed-off-by: Saeed Mahameed include/linux/mlx5/mlx5_ifc.h | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit f5d23ee137e51b4e5cd5d263b144d5e6719f6e52 Author: Jianbo Liu Date: Wed Jun 8 13:04:47 2022 -0700 net/mlx5: Add IFC bits and enums for flow meter Add/extend structure layouts and defines for flow meter. Signed-off-by: Jianbo Liu Reviewed-by: Ariel Levkovich Signed-off-by: Saeed Mahameed include/linux/mlx5/device.h | 1 + include/linux/mlx5/mlx5_ifc.h | 114 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 111 insertions(+), 4 deletions(-) commit a6492af3805ae3d9fe872545aa4797971b4e2a33 Author: Yevgeny Kliteynik Date: Tue Jun 7 15:47:45 2022 +0300 RDMA/mlx5: Support handling of modify-header pattern ICM area Add support for allocate/deallocate and registering MR of the new type of ICM area. Support exists only for devices that support sw_owner_v2. Signed-off-by: Yevgeny Kliteynik Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/dm.c | 53 ++++++++++++++++++++----------- drivers/infiniband/hw/mlx5/mr.c | 1 + include/uapi/rdma/mlx5_user_ioctl_verbs.h | 1 + 3 files changed, 37 insertions(+), 18 deletions(-) commit 667658364b2056f344a2769280b939a5e45610be Author: Yevgeny Kliteynik Date: Tue Jun 7 15:47:44 2022 +0300 net/mlx5: Manage ICM of type modify-header pattern Added support for managing new type of ICM for devices that support sw_owner_v2. Signed-off-by: Erez Shitrit Signed-off-by: Yevgeny Kliteynik Signed-off-by: Leon Romanovsky Acked-by: Saeed Mahameed Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/lib/dm.c | 42 ++++++++++++++++++++++++ include/linux/mlx5/driver.h | 1 + 2 files changed, 43 insertions(+) commit 795e10b450a88b2943a241a5eaa6e86ae4f47694 Author: Yevgeny Kliteynik Date: Tue Jun 7 15:47:43 2022 +0300 net/mlx5: Introduce header-modify-pattern ICM properties Added new fields for device memory capabilities, in order to support creation of ICM memory for modify header patterns. Signed-off-by: Erez Shitrit Signed-off-by: Yevgeny Kliteynik Signed-off-by: Leon Romanovsky Acked-by: Saeed Mahameed Signed-off-by: Saeed Mahameed include/linux/mlx5/mlx5_ifc.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 9e248d9e2b63e03791b8bdabb5f3f19e60d6c373 Author: William Zhang Date: Thu Jun 9 17:21:13 2022 -0700 MAINTAINERS: Add BCM63148 to bcmbca arch entry Add BCM63148 related files to BCMBCA ARCH maintainer list entry Signed-off-by: William Zhang Signed-off-by: Florian Fainelli MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 28b11e49ec4cd31a46f10abb3e0042d8c8ecf2c4 Author: William Zhang Date: Wed Jun 8 11:04:37 2022 -0700 MAINTAINERS: Add BCM6856 to bcmbca arch entry Add BCM6856 related files to BCMBCA ARCH maintainer list entry Signed-off-by: William Zhang Signed-off-by: Florian Fainelli MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 64eca7ad058cff861b48cdead8dee40dfc284e9e Author: William Zhang Date: Wed Jun 8 11:04:36 2022 -0700 arm64: dts: Add DTS files for bcmbca SoC BCM6856 Add DTS for ARMv8 based broadband SoC BCM6856. bcm6856.dtsi is the SoC description DTS header and bcm96856.dts is a simple DTS file for Broadcom BCM96956 Reference board that only enable the UART port. Signed-off-by: William Zhang Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 3 +- arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi | 103 +++++++++++++++++++++++ arch/arm64/boot/dts/broadcom/bcmbca/bcm96856.dts | 30 +++++++ 3 files changed, 135 insertions(+), 1 deletion(-) commit 82a58061ada60058ec00113c179380f945914709 Author: William Zhang Date: Wed Jun 8 11:00:59 2022 -0700 arm64: dts: Add DTS files for bcmbca SoC BCM63146 Add DTS for ARMv8 based broadband SoC BCM63146. bcm63146.dtsi is the SoC description DTS header and bcm963146.dts is a simple DTS file for Broadcom BCM963146 Reference board that only enable the UART port. Signed-off-by: William Zhang Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 3 +- arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi | 110 ++++++++++++++++++++++ arch/arm64/boot/dts/broadcom/bcmbca/bcm963146.dts | 30 ++++++ 3 files changed, 142 insertions(+), 1 deletion(-) commit ae13c29e57af75fa7d7f565a91d6636a0511678e Author: William Zhang Date: Wed Jun 8 11:01:00 2022 -0700 MAINTAINERS: Add BCM63146 to bcmbca arch entry Add BCM63146 related files to BCMBCA ARCH maintainer list entry Signed-off-by: William Zhang Signed-off-by: Florian Fainelli MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit d0ceb08048d3899cb3c3a07470b636e403676127 Author: Nicolas Saenz Julienne Date: Fri Jun 3 10:26:10 2022 +0100 arm64: defconfig: Enable DRM_V3D BCM2711, the SoC used on the Raspberry Pi 4 has a different GPU than its predecessors. Enable it. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Peter Robinson Reviewed-by: Stefan Wahren Reviewed-by: Javier Martinez Canillas Signed-off-by: Florian Fainelli arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 1b9dac68c636ba4b263e1178e7023f73741f20b9 Author: Samuel Holland Date: Mon Jun 6 20:24:38 2022 -0500 arm64: dts: allwinner: Use constants for RTC clock indexes The binding header provides descriptive names for the RTC clock indexes, since the indexes were arbitrarily chosen by the binding, not by the hardware. Let's use the names, so the meaning is clearer. Signed-off-by: Samuel Holland Acked-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220607012438.18183-2-samuel@sholland.org arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 4 ++-- arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 4 ++-- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 10 ++++++---- arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 4 ++-- arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts | 4 ++-- arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi | 2 +- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 12 +++++++----- 9 files changed, 24 insertions(+), 20 deletions(-) commit 8cce5702b6671be31405c08dacdc5b82ea704a63 Author: Samuel Holland Date: Mon Jun 6 20:24:37 2022 -0500 ARM: dts: sunxi: Use constants for RTC clock indexes The binding header provides descriptive names for the RTC clock indexes, since the indexes were arbitrarily chosen by the binding, not by the hardware. Let's use the names, so the meaning is clearer. Signed-off-by: Samuel Holland Acked-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220607012438.18183-1-samuel@sholland.org arch/arm/boot/dts/sun6i-a31.dtsi | 12 +++++++----- arch/arm/boot/dts/sun8i-a23-a33.dtsi | 8 +++++--- arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts | 4 ++-- arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 2 +- arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts | 4 ++-- arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts | 2 +- arch/arm/boot/dts/sun8i-h3-nanopi-r1.dts | 4 ++-- arch/arm/boot/dts/sun8i-r16-bananapi-m2m.dts | 4 ++-- arch/arm/boot/dts/sun8i-r40.dtsi | 8 +++++--- arch/arm/boot/dts/sun8i-v3s.dtsi | 6 ++++-- arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi | 4 ++-- arch/arm/boot/dts/sunxi-h3-h5-emlid-neutis.dtsi | 4 ++-- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 13 ++++++++----- 13 files changed, 43 insertions(+), 32 deletions(-) commit 8d6d51edcb79b0906288170df165c1b86e278218 Author: Randy Dunlap Date: Mon Feb 28 20:14:54 2022 -0800 docs: selinux: add '=' signs to kernel boot options Provide the full kernel boot option string (with ending '=' sign). They won't work without that and that is how other boot options are listed. If used without an '=' sign (as listed here), they cause an "Unknown parameters" message and are added to init's argument strings, polluting them. Unknown kernel command line parameters "enforcing checkreqprot BOOT_IMAGE=/boot/bzImage-517rc6", will be passed to user space. Run /sbin/init as init process with arguments: /sbin/init enforcing checkreqprot with environment: HOME=/ TERM=linux BOOT_IMAGE=/boot/bzImage-517rc6 Signed-off-by: Randy Dunlap Cc: Paul Moore Cc: Stephen Smalley Cc: Eric Paris Cc: selinux@vger.kernel.org Cc: Jonathan Corbet [PM: removed bogus 'Fixes' line] Signed-off-by: Paul Moore Documentation/admin-guide/kernel-parameters.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2bfe15c5261212130f1a71f32a300bcf426443d4 Author: Christian Göttsche Date: Tue Jan 25 15:33:04 2022 +0100 mm: create security context for memfd_secret inodes Create a security context for the inodes created by memfd_secret(2) via the LSM hook inode_init_security_anon to allow a fine grained control. As secret memory areas can affect hibernation and have a global shared limit access control might be desirable. Signed-off-by: Christian Göttsche Signed-off-by: Paul Moore mm/secretmem.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 546093206ba16623c18e344630dbfdd71a4327e0 Author: Xiu Jianfeng Date: Sat Jun 11 17:23:04 2022 +0800 audit: make is_audit_feature_set() static Currently nobody use is_audit_feature_set() outside this file, so make it static. Signed-off-by: Xiu Jianfeng Signed-off-by: Paul Moore include/linux/audit.h | 2 -- kernel/audit.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) commit 18489174e4fb98ad07fd387973a39e755ac01dee Author: Yong Zhi Date: Fri Jun 10 16:44:15 2022 -0500 ASoC: intel: sof_sdw: add RT711 SDCA card for MTL platform Enable on-board rt711 based sound card for MTL RVP. Reviewed-by: Bard Liao Signed-off-by: Yong Zhi Signed-off-by: Uday M Bhat Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220610214415.42942-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 8 ++++++ sound/soc/intel/common/soc-acpi-intel-mtl-match.c | 31 +++++++++++++++++++++++ 2 files changed, 39 insertions(+) commit da440af07fc3dd2b5a5138671eba51991dd1fac8 Author: Hans de Goede Date: Sun Jun 12 17:56:52 2022 +0200 ASoC: Intel: bytcr_wm5102: Fix GPIO related probe-ordering problem The "wlf,spkvdd-ena" GPIO needed by the bytcr_wm5102 driver is made available through a gpio-lookup table. This gpio-lookup table is registered by drivers/mfd/arizona-spi.c, which may get probed after the bytcr_wm5102 driver. If the gpio-lookup table has not registered yet then the gpiod_get() will return -ENOENT. Treat -ENOENT as -EPROBE_DEFER to still keep things working in this case. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220612155652.107310-1-hdegoede@redhat.com Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_wm5102.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 3729928137c74fe9079f51d8f0348ab588a247ae Author: Pierre-Louis Bossart Date: Fri Jun 10 16:43:13 2022 -0500 MAINTAINERS: update ASoC/Intel/SOF maintainers Keyon Jie was a key contributor to the Intel ASoC and SOF Intel drivers, but he's moved on to a different role within Intel. We wish him all the best in his new endeavors. Bard Liao, Kai Vehmanen, Ranjani Sridharan and Peter Ujfalusi have been involved in the Intel multi-maintainer team, it's time to update the MAINTAINERS entry to reflect their contributions and clarify their role. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220610214313.42903-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown MAINTAINERS | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 2adb5bb1b860705b9d4f3ac272f37b2d68649f7b Author: Juerg Haefliger Date: Tue May 17 16:08:37 2022 +0200 docs: Kconfig: Fix help text indentation The convention for help text indentation seems to be a single tab followed by two whitespaces. Do that. While at it, remove a stray empty line. Signed-off-by: Juerg Haefliger Link: https://lore.kernel.org/r/20220517140837.331298-1-juergh@canonical.com Signed-off-by: Jonathan Corbet Documentation/Kconfig | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit d5b1d57b425c53e1e7e743265bbd4c71093bbc12 Author: Wu XiangCheng Date: Wed May 18 11:16:28 2022 +0800 docs/zh_CN: Update translation of reporting-issues.rst to 5.18 Update zh_CN/admin-guide/reporting-issues.rst to newest English version commit 247097e2bbff4 ("docs: reporting-issues.rst: link new document about regressions") Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/YoRlDOUl/eg+h/Cc@bobwxc.mipc Signed-off-by: Jonathan Corbet .../zh_CN/admin-guide/reporting-issues.rst | 125 +++++++++++++-------- 1 file changed, 79 insertions(+), 46 deletions(-) commit 94bdaa7d9a9d778d893c670d494c06d8e007c1cd Author: Martin Liška Date: Mon May 23 14:18:06 2022 +0200 docs/arm64: elf_hwcaps: Unify HWCAP lists as description lists Add a series of blank lines to this document to get consistend rendering as an RST description list. Signed-off-by: Martin Liska Link: https://lore.kernel.org/r/d0e576ab-6121-b7d7-da5b-7750f05ca7f4@suse.cz Signed-off-by: Jonathan Corbet Documentation/arm64/elf_hwcaps.rst | 23 ----------------------- 1 file changed, 23 deletions(-) commit 35f2b9afc23b75e407caa70635851292056bff33 Merge: 41ecad2c3cce 4f37809f4cdf Author: Mark Brown Date: Mon Jun 13 18:23:40 2022 +0100 spi: tegra quad: Add Tegra Grace features Merge series from Krishna Yarlagadda : Add multiple chip select lines supported on Tegra 241 commit 0d4e57e5af39fef28de6c89b0b97741dedb4b72f Author: Javier Martinez Canillas Date: Fri Jun 10 10:54:50 2022 +0200 Revert "fbdev: vesafb: Allow to be built if COMPILE_TEST is enabled" This reverts commit fa0e256450f27a7d85f65c63f05e6897954a1d53. The kernel test robot reported that attempting to build the vesafb driver fails on some architectures, because these don't define a `struct screen_info`. This leads to linking errors, for example on parisc with allyesconfig: hppa-linux-ld: drivers/video/fbdev/vesafb.o: in function `vesafb_probe': >> (.text+0x738): undefined reference to `screen_info' >> hppa-linux-ld: (.text+0x73c): undefined reference to `screen_info' hppa-linux-ld: drivers/firmware/sysfb.o: in function `sysfb_init': >> (.init.text+0x28): undefined reference to `screen_info' >> hppa-linux-ld: (.init.text+0x30): undefined reference to `screen_info' hppa-linux-ld: (.init.text+0x78): undefined reference to `screen_info' The goal of commit fa0e256450f2 ("fbdev: vesafb: Allow to be built if COMPILE_TEST is enabled") was to have more build coverage for the driver but it wrongly assumed that all architectures would define a screen_info. Reported-by: kernel test robot Signed-off-by: Javier Martinez Canillas Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220610085450.1341880-1-javierm@redhat.com drivers/video/fbdev/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24f5263b3aed8567edc30ac9086858de5632c0dd Author: William Zhang Date: Wed Jun 8 10:56:29 2022 -0700 MAINTAINERS: Add BCM6756 to bcmbca arch entry Add BCM6756 related files to BCMBCA ARCH maintainer list entry Signed-off-by: William Zhang Signed-off-by: Florian Fainelli MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit b445d26f510f388d52bed7ced26338f565ba5d1b Author: William Zhang Date: Tue Jun 7 10:26:46 2022 -0700 MAINTAINERS: Add BCM6855 to bcmbca arch entry Add BCM6855 related files to BCMBCA ARCH maintainer list entry Signed-off-by: William Zhang Signed-off-by: Florian Fainelli MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 6062ecda5b427f2cf349a8a35674d17fc300e598 Merge: 9f1c8677724a a45a4d4390b7 Author: Mark Brown Date: Mon Jun 13 18:12:49 2022 +0100 ASoC: SOF: IPC4: Add topology, control and PCM ops Merge series from Ranjani Sridharan : This set of patches includes changes to add the topology, control and PCM ops for IPC4. It also includes a couple of patches to set the IPC4 BE DAI trigger ops for SSP/DMIC/HDA type DAI's. commit bd42ce0d2b9d0fd360d49f88f0c7af62c1f5d8ad Author: William Zhang Date: Tue Jun 7 10:26:44 2022 -0700 dt-bindings: arm: add BCM6855 SoC to device tree binding document Add BCM6855 SoC device tree description to bcmbca binding document. Signed-off-by: William Zhang Acked-by: Krzysztof Kozlowski Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 26f2a78b4a60ad1d16b00189600529424c068809 Author: Peter Robinson Date: Fri Jun 3 10:26:08 2022 +0100 ARM: dts: bcm2711: Enable V3D This adds the entry for V3D for bcm2711 (used in the Raspberry Pi 4) and the associated firmware clock entry. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Peter Robinson Reviewed-by: Javier Martinez Canillas Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm2711-rpi.dtsi | 4 ++++ arch/arm/boot/dts/bcm2711.dtsi | 11 +++++++++++ 2 files changed, 15 insertions(+) commit 8a3ed46ff5402c0750810885eba85468e055ad4e Author: William Zhang Date: Wed Jun 1 16:36:06 2022 -0700 ARM: dts: Update BCM47622 DTS file Fix a few issue in bcm47622.dtsi file: - Remove unnecessary cpu_on and cpu_off properties from psci node - Add the missing gic registers and interrupts property to gic node - Cosmetic changes Signed-off-by: William Zhang Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm47622.dtsi | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit de1a99ac0b64e9a2319c5a3d80d519a64d4e1adb Author: William Zhang Date: Wed May 25 10:51:23 2022 -0700 ARM: dts: Add DTS files for bcmbca SoC BCM6846 Add DTS for ARMv7 based broadband SoC BCM6846. bcm6846.dtsi is the SoC description DTS header and bcm96846.dts is a simple DTS file for Broadcom BCM96846 Reference board that only enable the UART port. Signed-off-by: William Zhang Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm6846.dtsi | 103 +++++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/bcm96846.dts | 30 ++++++++++++ 3 files changed, 134 insertions(+) commit 8da7e9fe8d32538e109669073033e9d4f26b1ce9 Author: Peter Robinson Date: Fri Jun 3 10:26:09 2022 +0100 ARM: configs: Enable DRM_V3D BCM2711, the SoC used on the Raspberry Pi 4 has a different 3D render GPU IP than its predecessors. Enable it it on multi v7 and bcm2835 configs. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Peter Robinson Reviewed-by: Stefan Wahren Reviewed-by: Javier Martinez Canillas Signed-off-by: Florian Fainelli arch/arm/configs/bcm2835_defconfig | 1 + arch/arm/configs/multi_v7_defconfig | 1 + 2 files changed, 2 insertions(+) commit df4bf98ec2d199ae32f215d083774ebb6424bf1f Author: Niklas Söderlund Date: Mon Jun 13 11:05:10 2022 +0200 scripts: kernel-doc: Always increment warnings counter Some warnings do not increment the warnings counter making the behavior of running kernel-doc with -Werror unlogical as some warnings will be generated but not treated as errors. Fix this by creating a helper function that always incrementing the warnings counter every time a warning is emitted. There is one location in get_sphinx_version() where a warning is not touched as it concerns the execution environment of the kernel-doc and not the documentation being processed. Incrementing the counter only have effect when running kernel-doc in either verbose mode (-v or environment variable KBUILD_VERBOSE) or when treating warnings as errors (-Werror or environment variable KDOC_WERROR). In both cases the number of warnings printed is printed to stderr and for the later the exit code of kernel-doc is non-zero if warnings where encountered. Simple test case to demo one of the warnings, $ cat test.c /** * foo() - Description */ int bar(); # Without this change $ ./scripts/kernel-doc -Werror -none test.c test.c:4: warning: expecting prototype for foo(). Prototype was for bar() instead # With this change $ ./scripts/kernel-doc -Werror -none test.c test.c:4: warning: expecting prototype for foo(). Prototype was for bar() instead 1 warnings as Errors Signed-off-by: Niklas Söderlund Link: https://lore.kernel.org/r/20220613090510.3088294-1-niklas.soderlund@corigine.com Signed-off-by: Jonathan Corbet scripts/kernel-doc | 82 +++++++++++++++++++++++------------------------------- 1 file changed, 35 insertions(+), 47 deletions(-) commit ec30c109391c5eac9b1d689a61e4bfed88148947 Author: Marc Kleine-Budde Date: Sat Jun 11 16:20:58 2022 +0200 can: netlink: allow configuring of fixed data bit rates without need for do_set_data_bittiming callback This patch is similar to 7e193a42c37c ("can: netlink: allow configuring of fixed bit rates without need for do_set_bittiming callback") but for data bit rates instead of bit rates. Usually CAN devices support configurable data bit rates. The limits are defined by struct can_priv::data_bittiming_const. Another way is to implement the struct can_priv::do_set_data_bittiming callback. If the bit rate is configured via netlink, the can_changelink() function checks that either can_priv::data_bittiming_const or struct can_priv::do_set_data_bittiming is implemented. In commit 431af779256c ("can: dev: add CAN interface API for fixed bitrates") an API for configuring bit rates on CAN interfaces that only support fixed bit rates was added. The supported bit rates are defined by struct can_priv::bitrate_const. However the above mentioned commit forgot to add the struct can_priv::data_bitrate_const to the check in can_changelink(). In order to avoid to implement a no-op can_priv::do_set_data_bittiming callback on devices with fixed data bit rates, extend the check in can_changelink() accordingly. Link: https://lore.kernel.org/all/20220613143633.4151884-1-mkl@pengutronix.de Fixes: 431af779256c ("can: dev: add CAN interface API for fixed bitrates") Acked-by: Max Staudt Signed-off-by: Marc Kleine-Budde drivers/net/can/dev/netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7518eefeb7ad55ca2126ebdd6369490b9dc5e7a8 Author: Maximilian Luz Date: Fri May 27 04:34:47 2022 +0200 platform/surface: aggregator_registry: Add support for keyboard cover on Surface Pro 8 Add support for the detachable keyboard cover on the Surface Pro 8. The keyboard cover on the Surface Pro 8 is, unlike the keyboard covers of earlier Surface Pro generations, handled via the Surface System Aggregator Module (SSAM). The keyboard and touchpad (as well as other HID input devices) of this cover are standard SSAM HID client devices (just like keyboard and touchpad on e.g. the Surface Laptop 3 and 4), however, some care needs to be taken as they can be physically detached (similarly to the Surface Book 3). Specifically, the respective SSAM client devices need to be removed when the keyboard cover has been detached and (re-)initialized when the keyboard cover has been (re-)attached. On the Surface Pro 8, detachment of the keyboard cover (and by extension its devices) is managed via the KIP subsystem. Therefore, said devices need to be registered under the KIP device hub, which in turn will remove and re-create/re-initialize those devices as needed. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220527023447.2460025-13-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede .../platform/surface/surface_aggregator_registry.c | 37 +++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) commit d420185489e52f414b18cef10487279a9a005b27 Author: Maximilian Luz Date: Fri May 27 04:34:46 2022 +0200 platform/surface: aggregator_registry: Add KIP device hub Add a Surface System Aggregator Module (SSAM) client device hub for hot-removable devices managed via the KIP subsystem. The KIP subsystem (full name unknown, abbreviation has been obtained through reverse engineering) is a subsystem that manages hot-removable SSAM client devices. Specifically, it manages HID input devices contained in the detachable keyboard cover of the Surface Pro 8 and Surface Pro X. The KIP subsystem handles a single group of devices (e.g. all devices contained in the keyboard cover) and cannot handle devices individually. Thus we model it as a client device hub, which (hot-)removes all devices contained under it once removal of the hub (e.g. keyboard cover) has been detected and (re-)adds all devices once the physical hub device has been (re-)attached. To do this, use the previously generified SSAM subsystem hub framework. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220527023447.2460025-12-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede .../platform/surface/surface_aggregator_registry.c | 103 ++++++++++++++++++++- 1 file changed, 101 insertions(+), 2 deletions(-) commit 58a4d884b50947c0ffb494f690b2d7a1422a45c7 Author: Maximilian Luz Date: Fri May 27 04:34:45 2022 +0200 platform/surface: aggregator_registry: Change device ID for base hub Use the target category of the (base) hub as instance id in the (virtual) hub device UID. This makes association of the hub with the respective subsystem easier. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220527023447.2460025-11-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/surface/surface_aggregator_registry.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1aa4c85bab7623469271d5a9cde3e3005b56fb7c Author: Maximilian Luz Date: Fri May 27 04:34:44 2022 +0200 platform/surface: aggregator_registry: Generify subsystem hub functionality The Surface System Aggregator Module (SSAM) has multiple subsystems that can manage detachable devices. At the moment, we only support the "base" (BAS/0x11) subsystem, which is used on the Surface Book 3 to manage devices (including keyboard, touchpad, and secondary battery) connected to the base of the device. The Surface Pro 8 has a new type-cover with keyboard and touchpad, which is managed via the KIP/0x0e subsystem. The general procedure is the same, but with slightly different events and setup. To make implementation of the KIP hub easier and prevent duplication, generify the parts of the base hub that we can use for the KIP hub (or any potential future subsystem hubs). This also switches over to use the newly introduced "hot-remove" functionality, which should prevent communication issues when devices have been detached. Lastly, also drop the undocumented and unused sysfs "state" attribute of the base hub. It has at best been useful for debugging. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220527023447.2460025-10-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede .../platform/surface/surface_aggregator_registry.c | 269 ++++++++++++--------- 1 file changed, 153 insertions(+), 116 deletions(-) commit 25e2ca7301bd3ca5a63a6be41d729eb42202bc21 Author: Maximilian Luz Date: Fri May 27 04:34:43 2022 +0200 platform/surface: aggregator: Add comment for KIP subsystem category The KIP subsystem (full name unknown, abbreviation has been obtained through reverse engineering) handles detachable peripherals such as the keyboard cover on the Surface Pro X and Surface Pro 8. It is currently not entirely clear what this subsystem entails, but at the very least it provides event notifications for when the keyboard cover on the Surface Pro X and Surface Pro 8 have been detached or re-attached, as well as the state that the keyboard cover is currently in (e.g. folded-back, folded laptop-like, closed, etc.). Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220527023447.2460025-9-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede include/linux/surface_aggregator/serial_hub.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c2c3a07086c910719dc7135f1d871d2c6c022fc Author: Maximilian Luz Date: Fri May 27 04:34:42 2022 +0200 HID: surface-hid: Add support for hot-removal Add support for hot-removal of SSAM HID client devices. Once a device has been hot-removed, further communication with it should be avoided as it may fail and time out. While the device will be removed as soon as we detect hot-removal, communication may still occur during teardown, especially when unregistering notifiers. While hot-removal is a surprise event that can happen at any time, try to avoid communication as much as possible once it has been detected to prevent timeouts that can slow down device removal and cause issues, e.g. when quickly re-attaching the device. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220527023447.2460025-8-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/hid/surface-hid/surface_hid_core.c | 38 +++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) commit b49ba26bec452d3065e09327fbda79d7120a9f9d Author: Maximilian Luz Date: Fri May 27 04:34:41 2022 +0200 power/supply: surface_battery: Use client device wrappers for notifier registration Use newly introduced client device wrapper functions for notifier registration and unregistration. Signed-off-by: Maximilian Luz Acked-by: Sebastian Reichel Link: https://lore.kernel.org/r/20220527023447.2460025-7-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/power/supply/surface_battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f80345b89cc5cb61c6c586e6800a66c45261fd74 Author: Maximilian Luz Date: Fri May 27 04:34:40 2022 +0200 power/supply: surface_charger: Use client device wrappers for notifier registration Use newly introduced client device wrapper functions for notifier registration and unregistration. Signed-off-by: Maximilian Luz Acked-by: Sebastian Reichel Link: https://lore.kernel.org/r/20220527023447.2460025-6-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/power/supply/surface_charger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 74bb2d0bc57a1123ef39206051b03d4003673d8c Author: Maximilian Luz Date: Fri May 27 04:34:39 2022 +0200 platform/surface: aggregator_registry: Use client device wrappers for notifier registration Use newly introduced client device wrapper functions for notifier registration and unregistration. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220527023447.2460025-5-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/surface/surface_aggregator_registry.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5c1e88b98c60e4074796e9a05d3c674479ab1919 Author: Maximilian Luz Date: Fri May 27 04:34:38 2022 +0200 platform/surface: aggregator: Allow notifiers to avoid communication on unregistering When SSAM client devices have been (physically) hot-removed, communication attempts with those devices may fail and time out. This can even extend to event notifiers, due to which timeouts may occur during device removal, slowing down that process. Add a parameter to the notifier unregister function that allows skipping communication with the EC to prevent this. Furthermore, add wrappers for registering and unregistering notifiers belonging to SSAM client devices that automatically check if the device has been marked as hot-removed and communication should be avoided. Note that non-SSAM client devices can generally not be hot-removed, so also add a convenience wrapper for those, defaulting to allow communication. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220527023447.2460025-4-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede .../driver-api/surface_aggregator/client.rst | 6 +- drivers/platform/surface/aggregator/controller.c | 53 +++++++++++------ include/linux/surface_aggregator/controller.h | 24 +++++++- include/linux/surface_aggregator/device.h | 66 ++++++++++++++++++++++ 4 files changed, 128 insertions(+), 21 deletions(-) commit dc0393c76f378f68961587fd4f32de29fb8f0c79 Author: Maximilian Luz Date: Fri May 27 04:34:37 2022 +0200 platform/surface: aggregator: Allow devices to be marked as hot-removed Some SSAM devices, notably the keyboard cover (keyboard and touchpad) on the Surface Pro 8, can be hot-removed. When this occurs, communication with the device may fail and time out. This timeout can unnecessarily block and slow down device removal and even cause issues when the devices are detached and re-attached quickly. Thus, communication should generally be avoided once hot-removal is detected. While we already remove a device as soon as we detect its (hot-)removal, the corresponding device driver may still attempt to communicate with the device during teardown. This is especially critical as communication failure may also extend to disabling of events, which is typically done at that stage. Add a flag to allow marking devices as hot-removed. This can then be used during client driver teardown to check if any communication attempts should be avoided. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220527023447.2460025-3-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede include/linux/surface_aggregator/device.h | 48 +++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) commit 0eb6584068642767baab17c2e4385a6b9c029caa Author: Maximilian Luz Date: Fri May 27 04:34:36 2022 +0200 platform/surface: aggregator: Allow is_ssam_device() to be used when CONFIG_SURFACE_AGGREGATOR_BUS is disabled In SSAM subsystem drivers that handle both ACPI and SSAM-native client devices, we may want to check whether we have a SSAM (native) client device. Further, we may want to do this even when instantiation thereof cannot happen due to CONFIG_SURFACE_AGGREGATOR_BUS=n. Currently, doing so causes an error due to an undefined reference error due to ssam_device_type being placed in the bus source unit. Therefore, if CONFIG_SURFACE_AGGREGATOR_BUS is not defined, simply let is_ssam_device() return false to prevent this error. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20220527023447.2460025-2-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede include/linux/surface_aggregator/device.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 53b93c0ff71ac6f97c1ab2ad84ee8b540f40cb95 Author: Marek Vasut Date: Sun Jun 12 16:33:49 2022 +0200 drm/msm: Fix convert to drm_of_get_data_lanes_count Add missing header file into dsi_host.c and encode data-lanes string directly into the warning message in the driver to avoid build issues detected by lkp. Fixes: 185443efa26a ("drm/msm: Convert to drm_of_get_data_lanes_count") Reported-by: kernel test robot Signed-off-by: Marek Vasut Cc: Abhinav Kumar Cc: Andrzej Hajda Cc: Dmitry Baryshkov Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Rob Clark Cc: Robert Foss Cc: Sam Ravnborg Cc: Sean Paul To: dri-devel@lists.freedesktop.org Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20220612143349.105766-1-marex@denx.de drivers/gpu/drm/msm/dp/dp_parser.c | 4 ++-- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit 41ecad2c3cce807abf32bff879cef5dfcacae363 Author: David Fries Date: Mon Jun 13 00:39:41 2022 -0500 spi: spidev_test: Warn when the mode is not the requested mode Print a warning if the device mode doesn't match the requested mode. The user doesn't enter the mode in hex so it isn't obvious when setting the mode succeeds that the mode isn't the requested mode. The kernel logs a message, it will be more visible if the test also prints a warning. I was testing --quad, which is unsupported, but doesn't cause the mode request to fail. Signed-off-by: David Fries Link: https://lore.kernel.org/r/YqbNnSGtWHe/GG7w@spacedout.fries.net Signed-off-by: Mark Brown tools/spi/spidev_test.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 845d3fd8a0aadf5dd97e6d345d3df4bf80099e69 Author: Colin Ian King Date: Sun Jun 12 21:34:28 2022 +0100 spi: s3c64xx: set pointers to null using NULL rather than 0 There are pointers being set to null using use. Use NULL instead. Signed-off-by: Colin Ian King Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20220612203428.2754823-1-colin.i.king@gmail.com Signed-off-by: Mark Brown drivers/spi/spi-s3c64xx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 116679aef2f92d535ea8049ef2a610bc73f94660 Author: Peng Wu Date: Sat Jun 11 02:11:17 2022 +0000 spi: micro: fix unreasonable clk_prepare_enable() on error in mchp_corespi_probe() Fix the unreasonable clk_prepare_enable() with clk_disable_unprepare() before return from mchp_corespi_probe() in the error handling case. Signed-off-by: Peng Wu Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20220611021117.40494-1-wupeng58@huawei.com Signed-off-by: Mark Brown drivers/spi/spi-microchip-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d91ac577daba6204800bbeadf720a0ae6a30a4a Author: Lukas Bulwahn Date: Fri Jun 10 12:51:54 2022 +0200 MAINTAINERS: Rectify entry for OPENCORES I2C BUS DRIVER Commit 8ad69f490516 ("dt-bindings: i2c: convert ocores binding to yaml") converts i2c-ocores.txt to opencores,i2c-ocores.yaml, but then adjust its reference in MAINTAINERS to a slightly wrong new filename. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Repair this file reference in OPENCORES I2C BUS DRIVER. Signed-off-by: Lukas Bulwahn Acked-by: Conor Dooley Acked-by: Peter Korsgaard Signed-off-by: Wolfram Sang MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65c1c99d96f160e3fead8c6ec67b669cbe62320f Author: Mark Brown Date: Fri Jun 3 14:25:26 2022 +0200 ASoC: wcd938x: Fix event generation for some controls Currently wcd938x_*_put() unconditionally report that the value of the control changed, resulting in spurious events being generated. Return 0 in that case instead as we should. There is still an issue in the compander control which is a bit more complex. Signed-off-by: Mark Brown Reported-by: kernel test robot Link: https://lore.kernel.org/r/20220603122526.3914942-1-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/wcd938x.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 9f1c8677724a0e6a6ac7a74d2b0192a584df859d Author: Mark Brown Date: Thu Jun 2 12:30:29 2022 +0200 ASoC: hdmi-codec: Update to modern DAI terminology As part of retiring the old defines used to specify DAI formats update the hdmi_codec driver to use the modern names, including the variables in the struct hdmi_codec_daifmt exported to the DRM drivers. In updating this I did note that the only use of this information in DRM drivers is to reject clock provider settings, thinking about what this hardware is doing I rather suspect that there might not be any hardware out there which needs the configuration so it may be worth considering just having hdmi-codec support only clock consumer. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602103029.3498791-1-broonie@kernel.org Signed-off-by: Mark Brown drivers/gpu/drm/bridge/sii902x.c | 5 +++-- drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmi.c | 8 ++++---- drivers/gpu/drm/i2c/tda998x_drv.c | 6 +++--- drivers/gpu/drm/sti/sti_hdmi.c | 8 ++++---- include/sound/hdmi-codec.h | 4 ++-- sound/soc/codecs/hdmi-codec.c | 18 +++++++++--------- 7 files changed, 26 insertions(+), 25 deletions(-) commit 9341351495789ad51317b32976d52984f169d2fb Merge: e909b43bddc0 38a71fc04895 Author: Marc Kleine-Budde Date: Mon Jun 13 15:55:27 2022 +0200 Merge branch 'document-polarfire-soc-can-controller' Conor Dooley says: ==================== When adding the dts for PolarFire SoC, the can controllers were omitted, so here they are... ==================== Link: https://lore.kernel.org/all/20220607065459.2035746-1-conor.dooley@microchip.com Signed-off-by: Marc Kleine-Budde commit 38a71fc048955c5c9d8bd14351d0f8cbcfef4f5b Author: Conor Dooley Date: Tue Jun 7 07:55:00 2022 +0100 riscv: dts: microchip: add mpfs's CAN controllers PolarFire SoC has a pair of CAN controllers, but as they were undocumented there were omitted from the device tree. Add them. Link: https://lore.kernel.org/all/20220607065459.2035746-3-conor.dooley@microchip.com Signed-off-by: Conor Dooley Signed-off-by: Marc Kleine-Budde arch/riscv/boot/dts/microchip/mpfs.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit c878d518d7b628bc40cacfc9cee4a3db91a6a9ac Author: Conor Dooley Date: Tue Jun 7 07:54:59 2022 +0100 dt-bindings: can: mpfs: document the mpfs CAN controller Add a binding for the CAN controller on PolarFire SoC (MPFS). A data sheet and a register map can be downloaded at: | https://www.microsemi.com/document-portal/doc_download/1245725-polarfire-soc-fpga-mss-technical-reference-manual | https://www.microsemi.com/document-portal/doc_download/1244581-polarfire-soc-register-map An alternative location for the register map is: | http://web.archive.org/web/20220403030214/https://www.microsemi.com/document-portal/doc_download/1244581-polarfire-soc-register-map Link: https://lore.kernel.org/all/20220607065459.2035746-2-conor.dooley@microchip.com Signed-off-by: Conor Dooley Reviewed-by: Rob Herring [mkl: add link to data sheet and register map] Signed-off-by: Marc Kleine-Budde .../bindings/net/can/microchip,mpfs-can.yaml | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit c04245328dd7e915e21ac6395ffd218616e22754 Author: Yajun Deng Date: Fri Jun 10 17:10:17 2022 +0800 net: make __sys_accept4_file() static __sys_accept4_file() isn't used outside of the file, make it static. As the same time, move file_flags and nofile parameters into __sys_accept4_file(). Signed-off-by: Yajun Deng Signed-off-by: David S. Miller include/linux/socket.h | 4 ---- net/socket.c | 15 ++++++--------- 2 files changed, 6 insertions(+), 13 deletions(-) commit 219160be496f7f9cd105c5708e37cf22ab4ce0c7 Author: Eric Dumazet Date: Fri Jun 10 20:30:16 2022 -0700 tcp: sk_forced_mem_schedule() optimization sk_memory_allocated_add() has three callers, and returns to them @memory_allocated. sk_forced_mem_schedule() is one of them, and ignores the returned value. Change sk_memory_allocated_add() to return void. Change sock_reserve_memory() and __sk_mem_raise_allocated() to call sk_memory_allocated(). This removes one cache line miss [1] for RPC workloads, as first skbs in TCP write queue and receive queue go through sk_forced_mem_schedule(). [1] Cache line holding tcp_memory_allocated. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Reviewed-by: Shakeel Butt Signed-off-by: David S. Miller include/net/sock.h | 3 +-- net/core/sock.c | 9 ++++++--- 2 files changed, 7 insertions(+), 5 deletions(-) commit 4066bf4ce3ae3e322fa0c3c6418e45d99ff086b8 Author: Parthiban Veerasooran Date: Mon Jun 13 14:42:07 2022 +0530 net: smsc95xx: add support for Microchip EVB-LAN8670-USB This patch adds support for Microchip's EVB-LAN8670-USB 10BASE-T1S ethernet device to the existing smsc95xx driver by adding the new USB VID/PID pairs. Signed-off-by: Parthiban Veerasooran Signed-off-by: David S. Miller drivers/net/usb/smsc95xx.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5f30671d8dc6b7a489435ce8c40a2036e3c16d04 Author: Yinjun Zhang Date: Mon Jun 13 11:58:31 2022 +0200 nfp: support 48-bit DMA addressing for NFP3800 48-bit DMA addressing is supported in NFP3800 HW and implemented in NFDK firmware, so enable this feature in driver now. Note that with this change, NFD3 firmware, which doesn't implement 48-bit DMA, cannot be used for NFP3800 any more. RX free list descriptor, used by both NFD3 and NFDK, is also modified to support 48-bit DMA. That's OK because the top bits is always get set to 0 when assigned with 40-bit address. Based on initial work of Jakub Kicinski . Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfd3/dp.c | 16 ++++++++++------ drivers/net/ethernet/netronome/nfp/nfd3/rings.c | 1 + drivers/net/ethernet/netronome/nfp/nfd3/xsk.c | 8 +++----- drivers/net/ethernet/netronome/nfp/nfdk/dp.c | 16 ++++++++-------- drivers/net/ethernet/netronome/nfp/nfdk/rings.c | 1 + drivers/net/ethernet/netronome/nfp/nfp_net.h | 20 ++++++++++---------- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 9 +++++++++ drivers/net/ethernet/netronome/nfp/nfp_net_dp.h | 2 ++ drivers/net/ethernet/netronome/nfp/nfp_net_xsk.c | 8 ++++++-- drivers/net/ethernet/netronome/nfp/nfpcore/nfp_dev.c | 4 ++-- 10 files changed, 52 insertions(+), 33 deletions(-) commit 4f37809f4cdf0cdb8d4431e779f56d1f0dec3fb5 Author: Krishna Yarlagadda Date: Tue Jun 7 17:16:59 2022 +0530 spi: dt-bindings: Add compatible for Tegra241 QSPI Add new compatible for Tegra241 QSPI controller which has multiple chip select lines. Signed-off-by: Krishna Yarlagadda Link: https://lore.kernel.org/r/20220607114659.54314-4-kyarlagadda@nvidia.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml | 1 + 1 file changed, 1 insertion(+) commit e23917822d3cb1f5270ab0d327da713cda72f8f2 Author: Krishna Yarlagadda Date: Tue Jun 7 17:16:58 2022 +0530 spi: dt-bindings: split peripheral prods Move peripheral properties for Tegra QSPI controller to nvidia,tegra210-quad-peripheral-props.yaml and add reference to spi-peripheral-props.yaml file. Signed-off-by: Krishna Yarlagadda Link: https://lore.kernel.org/r/20220607114659.54314-3-kyarlagadda@nvidia.com Signed-off-by: Mark Brown .../spi/nvidia,tegra210-quad-peripheral-props.yaml | 33 ++++++++++++++++++++++ .../bindings/spi/nvidia,tegra210-quad.yaml | 21 -------------- .../bindings/spi/spi-peripheral-props.yaml | 1 + 3 files changed, 34 insertions(+), 21 deletions(-) commit b76134178168b5104851b3c72d9b1092b7414ff9 Author: Krishna Yarlagadda Date: Tue Jun 7 17:16:57 2022 +0530 spi: tegra210-quad: Multi-cs support Tegra Grace and later chips can support upto 4 chip select lines for QUAD SPI. Added new compatible for Tegra Grace. Signed-off-by: Krishna Yarlagadda Link: https://lore.kernel.org/r/20220607114659.54314-2-kyarlagadda@nvidia.com Signed-off-by: Mark Brown drivers/spi/spi-tegra210-quad.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) commit 8c92d9221d47ea97534888e2975ecd54896718d8 Author: Stephen Kitt Date: Tue Jun 7 20:53:04 2022 +0200 regulator: rpi-panel-attiny: Use backlight helper backlight_properties.fb_blank is deprecated. The states it represents are handled by other properties; but instead of accessing those properties directly, drivers should use the helpers provided by backlight.h. Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Cc: Liam Girdwood Cc: Mark Brown Link: https://lore.kernel.org/r/20220607185304.1128962-1-steve@sk2.org Signed-off-by: Mark Brown drivers/regulator/rpi-panel-attiny-regulator.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 6bda28a2f7113b1c49eb05155ace02b75bccae7b Author: Mark Brown Date: Fri Jun 3 14:46:09 2022 +0200 ASoC: wcd9335: Fix spurious event generation The slimbus mux put operation unconditionally reports a change in value which means that spurious events are generated. Fix this by exiting early in that case. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220603124609.4024666-1-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/wcd9335.c | 3 +++ 1 file changed, 3 insertions(+) commit 7263fc6c71c3a88c17a1ce3565b7b6f378d13878 Author: Yassine Oudjana Date: Mon Jun 6 19:22:26 2022 +0400 ASoC: wcd9335: Remove RX channel from old list before adding it to a new one Currently in slim_rx_mux_put, an RX channel gets added to a new list even if it is already in one. This can mess up links and make either it, the new list head, or both, get linked to the wrong entries. This can cause an entry to link to itself which in turn ends up making list_for_each_entry in other functions loop infinitely. To avoid issues, always remove the RX channel from any list it's in before adding it to a new list. Signed-off-by: Yassine Oudjana Link: https://lore.kernel.org/r/20220606152226.149164-1-y.oudjana@protonmail.com Signed-off-by: Mark Brown sound/soc/codecs/wcd9335.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 11a1585f26f7adcc800bd392fe7c29806f88dbbf Merge: 27f2533bcc6e bcec9ecbaf60 Author: David S. Miller Date: Mon Jun 13 12:01:58 2022 +0100 Merge branch 'ipa-refactoring' Alex Elder says: ==================== net: ipa: simple refactoring This series contains some minor code improvements. The first patch verifies that the configuration is compatible with a recently-defined limit. The second and third rename two fields so they better reflect their use in the code. The next gets rid of an empty function by reworking its only caller. The last two begin to remove the assumption that an event ring is associated with a single channel. Eventually we'll support having multiple channels share an event ring but some more needs to be done before that can happen. ==================== Signed-off-by: David S. Miller commit bcec9ecbaf609a303182618ca0f8201ee90d9333 Author: Alex Elder Date: Fri Jun 10 10:46:15 2022 -0500 net: ipa: derive channel from transaction In gsi_channel_tx_queued(), we report when a transaction gets passed to hardware. Change that function so it takes transaction rather than a channel as its argument, and derive the channel from the transaction. Rename the function accordingly. Delete the header comments above the function definition; the ones above the declaration in "gsi_private.h" should suffice. In addition, the comments above gsi_channel_tx_update() do a fine job of explaining what's going on. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/gsi.c | 28 +++++++--------------------- drivers/net/ipa/gsi_private.h | 12 +++++------- drivers/net/ipa/gsi_trans.c | 2 +- 3 files changed, 13 insertions(+), 29 deletions(-) commit 7dd9558feddf9347a2f4b762433f0cc585fe70f1 Author: Alex Elder Date: Fri Jun 10 10:46:14 2022 -0500 net: ipa: determine channel from event Each event in an event ring describes the TRE whose completion caused the event. Currently, every event ring is dedicated to a single channel, so the channel is easily derived from the event ring. An event ring can actually be shared by more than one channel though, and to distinguish events for one channel from another, the event structure contains a field indicating which channel the event is associated with. In gsi_event_trans(), use the channel ID in an event to determine which channel the event is for. This makes the channel pointer now passed to that function irrelevant; pass the GSI pointer to that function instead. And although it shouldn't happen, warn if an event arrives that records a channel ID that's not in use, or if the event does not have a transaction associated with it. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/gsi.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 983a1a3081bb42651c44a777ed9af9ee2962de8d Author: Alex Elder Date: Fri Jun 10 10:46:13 2022 -0500 net: ipa: simplify endpoint transaction completion When a GSI transaction completes, ipa_endpoint_trans_complete() is eventually called. That handles TX and RX completions separately, but ipa_endpoint_tx_complete() is a no-op. Instead, have ipa_endpoint_trans_complete() return immediately for a TX transaction, and incorporate code from ipa_endpoint_rx_complete() to handle RX transactions. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/ipa_endpoint.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) commit 317595d2ce779dca1aaf2af5e9a627513f10f202 Author: Alex Elder Date: Fri Jun 10 10:46:12 2022 -0500 net: ipa: rename endpoint->trans_tre_max The trans_tre_max field of the IPA endpoint structure is only used to limit the number of fragments allowed for an SKB being prepared for transmission. Recognizing that, rename the field skb_frag_max, and reduce its value by 1. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/ipa_endpoint.c | 4 ++-- drivers/net/ipa/ipa_endpoint.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 88e03057e4df72ecf1f9d8e0424e209eef82beaf Author: Alex Elder Date: Fri Jun 10 10:46:11 2022 -0500 net: ipa: rename channel->tlv_count Each GSI channel has a TLV FIFO of a certain size, specified in the configuration data for an AP channel. That size dictates the maximum number of TREs that are allowed in a single transaction. The only way that value is used after initialization is as a limit on the number of TREs in a transaction; calling it "tlv_count" isn't helpful, and in fact gsi_channel_trans_tre_max() exists to sort of abstract it. Instead, rename the channel->tlv_count field trans_tre_max, and get rid of the helper function. Update a couple of comments as well. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/gsi.c | 14 +++----------- drivers/net/ipa/gsi.h | 11 +---------- drivers/net/ipa/gsi_trans.c | 8 ++------ drivers/net/ipa/ipa_cmd.c | 8 ++++---- drivers/net/ipa/ipa_endpoint.c | 2 +- 5 files changed, 11 insertions(+), 32 deletions(-) commit 92f78f81ac4d0fa9b44cf394893adf25d2a8131f Author: Alex Elder Date: Fri Jun 10 10:46:10 2022 -0500 net: ipa: verify command channel TLV count In commit 8797972afff3d ("net: ipa: remove command info pool"), the maximum number of IPA commands that would be sent in a single transaction was defined. That number can't exceed the size of the TLV FIFO on the command channel, and we can check that at runtime. To add this check, pass a new flag to gsi_channel_data_valid() to indicate the channel being checked is being used for IPA commands. Knowing that we can also verify the channel direction is correct. Use a new local variable that refers to the command-specific portion of the data being checked. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/gsi.c | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) commit ac165aab469895de059a4a191a2e04ddb5421d0e Author: Lukas Wunner Date: Fri Jun 10 09:40:50 2022 +0200 genirq/PM: Unexport {suspend,resume}_device_irqs() Ever since {suspend,resume}_device_irqs() were introduced in 2009 by commit 0a0c5168df27 ("PM: Introduce functions for suspending and resuming device interrupts"), they've been exported even though there are no module users and never will be: The functions are solely called by the PM core, which is always built-in. Unexport them. Signed-off-by: Lukas Wunner Signed-off-by: Thomas Gleixner Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/fad9b50609f9d9828ea14772dbd4d195713f1c4b.1654846687.git.lukas@wunner.de kernel/irq/pm.c | 2 -- 1 file changed, 2 deletions(-) commit fc9e01676cc4eae0a66a8b5ee60cda68537718b6 Author: Geert Uytterhoeven Date: Wed Jun 8 15:48:34 2022 +0200 dt-bindings: clock: renesas,rzg2l: Simplify header file references The bindings already uses to refer to the header files with DT binding definitions for core clocks. Use more wildcards to simplify more references to these files. Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/r/f274ad16010798dd4a45d2dca5f870da8acbb470.1654696009.git.geert+renesas@glider.be Documentation/devicetree/bindings/clock/renesas,rzg2l-cpg.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 980bcaf33988e201dfd09cd75b20eea691fb3a0e Author: Geert Uytterhoeven Date: Wed Jun 8 15:41:15 2022 +0200 clk: renesas: rza1: Remove struct rz_cpg The register block base pointer as stored in the reg member of the rz_cpg structure is only used during initialization. Hence move it to a local variable, and pass it as a parameter to rz_cpg_register_clock(). After this, the data member is the only remaining member of the rz_cpg structure, so the whole structure can be replaced by the data member. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/2380285576edaa4ad3dc5eca7e0ca418f068c6ef.1654694831.git.geert+renesas@glider.be drivers/clk/renesas/clk-rz.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) commit 444877983933d0efaf6788eabf2f750b1c175419 Author: Geert Uytterhoeven Date: Wed Jun 8 15:41:14 2022 +0200 clk: renesas: r8a7779: Remove struct r8a7779_cpg All but the data member of the r8a7779_cpg structure are unused, so the whole structure can be replaced by the single member used. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/eb94c0f6c54a4f3a7e0e07f12781333a700c0a05.1654694831.git.geert+renesas@glider.be drivers/clk/renesas/clk-r8a7779.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) commit 1cfeec24273874ffdc5459ef2f138ab61b7207a7 Author: Geert Uytterhoeven Date: Wed Jun 8 15:41:13 2022 +0200 clk: renesas: r8a7778: Remove struct r8a7778_cpg All but the data member of the r8a7778_cpg structure are unused, so the whole structure can be replaced by the single member used. Remove the mapping of the CPG registers, as no code uses the mapped registers. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/4123c1c40a901195f00a825d434553d2052829aa.1654694831.git.geert+renesas@glider.be drivers/clk/renesas/clk-r8a7778.c | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) commit 3849716ad32ed80dc27de06a5c377ee4b7378ac2 Author: Geert Uytterhoeven Date: Wed Jun 8 15:41:12 2022 +0200 clk: renesas: sh73a0: Remove sh73a0_cpg.reg The register block base pointer as stored in the reg member of the sh73a0_cpg structure is only used during initialization. Hence move it to a local variable, and pass it as a parameter to sh73a0_cpg_register_clock(). Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/5423e43d0cf518691965412fb510097d23ac5955.1654694831.git.geert+renesas@glider.be drivers/clk/renesas/clk-sh73a0.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit a00d077aaa17c873ae1f465c5564d5d88e14d8f7 Author: Geert Uytterhoeven Date: Wed Jun 8 15:41:11 2022 +0200 clk: renesas: r8a7740: Remove r8a7740_cpg.reg The register block base pointer as stored in the reg member of the r8a7740_cpg structure is only used during initialization. Hence move it to a local variable, and pass it as a parameter to r8a7740_cpg_register_clock(). Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/7ec676bcc36ef1eda02c2db328c527fc5fd44e99.1654694831.git.geert+renesas@glider.be drivers/clk/renesas/clk-r8a7740.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 65d012e415bb3592cd1c492195ff19088166198b Author: Geert Uytterhoeven Date: Wed Jun 8 15:41:10 2022 +0200 clk: renesas: r8a73a4: Remove r8a73a4_cpg.reg The register block base pointer as stored in the reg member of the r8a73a4_cpg structure is only used during initialization. Hence move it to a local variable, and pass it as a parameter to r8a73a4_cpg_register_clock(). Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/f835f3dfcf3bf754065e5002663952cc6341caac.1654694831.git.geert+renesas@glider.be drivers/clk/renesas/clk-r8a73a4.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 75fe45a000a70ea35e2071eb7f8b873648590982 Author: Wolfram Sang Date: Sat Jun 4 01:34:37 2022 +0200 clk: renesas: r8a779f0: Add SDHI0 clock Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20220603233437.21819-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a779f0-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit 4f5bc54d28ecd0739c99dc71ed93c2ebb5d9ba32 Author: Geert Uytterhoeven Date: Wed Jun 8 17:14:21 2022 +0200 soc: renesas: rcar-sysc: Optimize rcar_sysc_area struct sizes Reduce the sizes of the rcar_sysc_area and rcar_gen4_sysc_area structures: - parent is in the range [-1..32] or [-1..64], so s8 is sufficient, - flags needs just 3 bits (for now), so u8 is plenty. This reduces kernel size by: - 288 bytes for an R-Car Gen1+Gen2 kernel (arm32), - 1772 bytes for an R-Car Gen3+Gen4 kernel (arm64). Signed-off-by: Geert Uytterhoeven Tested-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/cbbc8f464743d636895c048de61aa610d75392de.1654701156.git.geert+renesas@glider.be drivers/soc/renesas/rcar-gen4-sysc.h | 4 ++-- drivers/soc/renesas/rcar-sysc.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit bccceabb92ce8eb78bbf2de08308e2cc2761a2e5 Author: Geert Uytterhoeven Date: Wed Jun 8 15:51:35 2022 +0200 soc: renesas: r8a779a0-sysc: Fix A2DP1 and A2CV[2357] PDR values The PDR values for the A2DP1 and A2CV[2357] power areas on R-Car V3U are incorrect (copied-and-pasted from A2DP0 and A2CV[0146]). Fix them. Reported-by: Renesas Vietnam via Yoshihiro Shimoda Fixes: 1b4298f000064cc2 ("soc: renesas: r8a779a0-sysc: Add r8a779a0 support") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/87bc2e70ba4082970cf8c65871beae4be3503189.1654696188.git.geert+renesas@glider.be drivers/soc/renesas/r8a779a0-sysc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 019fd800cf4a4514bbb502a52d376b01f02cc347 Author: Jani Nikula Date: Wed Jun 8 10:50:37 2022 +0300 drm/probe-helper: abstract .get_modes() connector helper call Abstract the .get_modes() connector helper call, including the override/firmware EDID fallback, for clarity. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/a4de51efc246e4f5bcbf7b84d66bb49aaf7fd974.1654674560.git.jani.nikula@intel.com drivers/gpu/drm/drm_probe_helper.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 6537f79a2aae65748d402d6c46e79d9e473d42a9 Author: Jani Nikula Date: Wed Jun 8 10:50:35 2022 +0300 drm/edid: add new interfaces around struct drm_edid Add new functions drm_edid_read(), drm_edid_read_ddc(), and drm_edid_read_custom() to replace drm_get_edid() and drm_do_get_edid() for reading the EDID. The transition is expected to happen over a fairly long time. Note that the new drm_edid_read*() functions do not do any of the connector updates anymore. The reading and parsing will be completely separated from each other. Add new functions drm_edid_alloc(), drm_edid_dup(), and drm_edid_free() for allocating and freeing drm_edid containers. Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/5a6532a94cad6a79424f6d1918dbe7b7d607ac03.1654674560.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 245 ++++++++++++++++++++++++++++++++++++++++----- include/drm/drm_edid.h | 9 ++ 2 files changed, 230 insertions(+), 24 deletions(-) commit 407d63b3af881d17c39f16cdd8416adb0e4658bc Author: Jani Nikula Date: Wed Jun 8 10:50:34 2022 +0300 drm/edid: keep track of alloc size in drm_do_get_edid() We'll want to return the allocated buffer size in the future. Keep track of it. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/8e4261d8c2947ea99240ea929f09a04878235f4e.1654674560.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit d9307f27efa531f034862bccf2985c5fa22c4b80 Author: Jani Nikula Date: Wed Jun 8 10:50:33 2022 +0300 drm/edid: add block count and data helper functions for drm_edid Add drm_edid based block count and data access helper functions that take the EDID allocated size into account. At the moment, the allocated size should always match the EDID size indicated by the extension count, but this will change in the future. Signed-off-by: Jani Nikula Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1a68c8667a88e7c451b001ad8bd86c8badb57fb8.1654674560.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) commit 11a8d095d86854bbc8697525f2c543de36bf5804 Author: Jani Nikula Date: Wed Jun 8 10:50:32 2022 +0300 drm/edid: abstract cea data block collection size Add a function to get the cea data block collection size. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/5339ab3249400a3c41001967e7ff2611b58e0425.1654674560.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit fc67615f4ecc3b66bd458840927272aa131eface Author: Jani Nikula Date: Wed Jun 8 10:50:31 2022 +0300 drm/edid: fix CTA data block collection size for CTA version 3 The CTA Data Block Collection is valid only for CTA extension version 3. In versions 1 and 2, it is a reserved block, which we ignore. The DTD start offset (byte 2, or d in CTA-861 spec), which determines the CTA Data Block Collection size, is specified slightly differently for different versions: Version 1: d = offset for the byte following the reserved data block. If no data is provided in the reserved data block, then d=4. If no DTDs are provided, then d=0 Version 2: d = offset for the byte following the reserved data block. If no data is provided in the reserved data block, then d=4. If d=0, then no detailed timing descriptors are provided, and no data is provided in the reserved data block. Version 3: d = offset for the byte following the data block collection. If no data is provided in the data block collection, then d=4. If d=0, then no detailed timing descriptors are provided, and no data is provided in the data block collection. Ever since commit 9e50b9d55e9c ("drm: edid: Add some bounds checking"), we've interpreted 0 to mean there are no DTDs but it's all Data Blocks. Per the spec, Data Blocks are only valid for version 3, where we should interpret 0 to mean there are no data blocks. Follow the spec (and hope the EDIDs follow it too). Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/2a4c94417f024cbafc5d4ca0a74e4617fc4325d1.1654674560.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 2 -- 1 file changed, 2 deletions(-) commit c7df8791cd258d81991188f79e85bf1f5ca34b46 Author: Rob Herring Date: Fri Jun 10 15:33:07 2022 -0600 arm64: dts: arm/juno: Drop erroneous 'mbox-name' property The 'mbox-name' property in the Juno mailbox node is undocumented and unused. It's the consumer side of the mailbox binding that have 'mbox-names' properties. Link: https://lore.kernel.org/r/20220610213308.2288094-1-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-scmi.dtsi | 1 - 1 file changed, 1 deletion(-) commit 7fc96d7162c0506a7a27bf8dfaaa3ba83509457f Author: Rob Herring Date: Fri Jun 10 14:40:57 2022 -0600 arm64: dts: arm/fvp-base-revc: Remove 'panel-dpi' compatible The rtsm-display panel timing node was removed in commit 928faf5e3e8d ("arm64: dts: fvp: Remove panel timings"). Without the node, 'panel-dpi' is not needed either. Link: https://lore.kernel.org/r/20220610204057.2203419-1-robh@kernel.org Cc: Robin Murphy Cc: Linus Walleij Signed-off-by: Rob Herring Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/fvp-base-revc.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e1ab5a8a3b51c9d819246987a4710a759c3cc67 Author: Geert Uytterhoeven Date: Fri Jun 10 11:58:44 2022 +0200 arm64: defconfig: Enable R8A779G0 SoC Enable the Renesas R-Car V4H (R8A779G0) SoC in the ARM64 defconfig. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/eb672fad7c9a340812079a07539d670f42f4ad41.1654855105.git.geert+renesas@glider.be arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 36e2da11254d17366cb2140d9f0d53756398daa4 Author: Geert Uytterhoeven Date: Fri Jun 10 11:58:11 2022 +0200 ARM: shmobile: defconfig: Refresh for v5.19-rc1 Refresh the defconfig for Renesas ARM systems: - Move CONFIG_SLAB=y (moved in commit 7b42f1041c98f5d7 ("mm: Kconfig: move swap and slab config options to the MM section")), - Enable CONFIG_RENESAS_RZN1WDT (RZN1D-DB), - Enable CONFIG_RTC_DRV_RZN1 (RZN1-DB). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/7ef31a41e1a15d0cedeb6cfc496ce70a78102e32.1654855000.git.geert+renesas@glider.be arch/arm/configs/shmobile_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 61a6737fcad8810258bdf1329f063b58ac27b230 Author: Wolfram Sang Date: Wed May 25 17:11:30 2022 +0200 clk: renesas: r8a779f0: Add thermal clock Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20220525151130.24103-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a779f0-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit f3dd3f674555bd9455c5ae7fafce0696bd9931b3 Author: Tianchen Ding Date: Thu Jun 9 07:34:12 2022 +0800 sched: Remove the limitation of WF_ON_CPU on wakelist if wakee cpu is idle Wakelist can help avoid cache bouncing and offload the overhead of waker cpu. So far, using wakelist within the same llc only happens on WF_ON_CPU, and this limitation could be removed to further improve wakeup performance. The commit 518cd6234178 ("sched: Only queue remote wakeups when crossing cache boundaries") disabled queuing tasks on wakelist when the cpus share llc. This is because, at that time, the scheduler must send IPIs to do ttwu_queue_wakelist. Nowadays, ttwu_queue_wakelist also supports TIF_POLLING, so this is not a problem now when the wakee cpu is in idle polling. Benefits: Queuing the task on idle cpu can help improving performance on waker cpu and utilization on wakee cpu, and further improve locality because the wakee cpu can handle its own rq. This patch helps improving rt on our real java workloads where wakeup happens frequently. Consider the normal condition (CPU0 and CPU1 share same llc) Before this patch: CPU0 CPU1 select_task_rq() idle rq_lock(CPU1->rq) enqueue_task(CPU1->rq) notify CPU1 (by sending IPI or CPU1 polling) resched() After this patch: CPU0 CPU1 select_task_rq() idle add to wakelist of CPU1 notify CPU1 (by sending IPI or CPU1 polling) rq_lock(CPU1->rq) enqueue_task(CPU1->rq) resched() We see CPU0 can finish its work earlier. It only needs to put task to wakelist and return. While CPU1 is idle, so let itself handle its own runqueue data. This patch brings no difference about IPI. This patch only takes effect when the wakee cpu is: 1) idle polling 2) idle not polling For 1), there will be no IPI with or without this patch. For 2), there will always be an IPI before or after this patch. Before this patch: waker cpu will enqueue task and check preempt. Since "idle" will be sure to be preempted, waker cpu must send a resched IPI. After this patch: waker cpu will put the task to the wakelist of wakee cpu, and send an IPI. Benchmark: We've tested schbench, unixbench, and hachbench on both x86 and arm64. On x86 (Intel Xeon Platinum 8269CY): schbench -m 2 -t 8 Latency percentiles (usec) before after 50.0000th: 8 6 75.0000th: 10 7 90.0000th: 11 8 95.0000th: 12 8 *99.0000th: 13 10 99.5000th: 15 11 99.9000th: 18 14 Unixbench with full threads (104) before after Dhrystone 2 using register variables 3011862938 3009935994 -0.06% Double-Precision Whetstone 617119.3 617298.5 0.03% Execl Throughput 27667.3 27627.3 -0.14% File Copy 1024 bufsize 2000 maxblocks 785871.4 784906.2 -0.12% File Copy 256 bufsize 500 maxblocks 210113.6 212635.4 1.20% File Copy 4096 bufsize 8000 maxblocks 2328862.2 2320529.1 -0.36% Pipe Throughput 145535622.8 145323033.2 -0.15% Pipe-based Context Switching 3221686.4 3583975.4 11.25% Process Creation 101347.1 103345.4 1.97% Shell Scripts (1 concurrent) 120193.5 123977.8 3.15% Shell Scripts (8 concurrent) 17233.4 17138.4 -0.55% System Call Overhead 5300604.8 5312213.6 0.22% hackbench -g 1 -l 100000 before after Time 3.246 2.251 On arm64 (Ampere Altra): schbench -m 2 -t 8 Latency percentiles (usec) before after 50.0000th: 14 10 75.0000th: 19 14 90.0000th: 22 16 95.0000th: 23 16 *99.0000th: 24 17 99.5000th: 24 17 99.9000th: 28 25 Unixbench with full threads (80) before after Dhrystone 2 using register variables 3536194249 3537019613 0.02% Double-Precision Whetstone 629383.6 629431.6 0.01% Execl Throughput 65920.5 65846.2 -0.11% File Copy 1024 bufsize 2000 maxblocks 1063722.8 1064026.8 0.03% File Copy 256 bufsize 500 maxblocks 322684.5 318724.5 -1.23% File Copy 4096 bufsize 8000 maxblocks 2348285.3 2328804.8 -0.83% Pipe Throughput 133542875.3 131619389.8 -1.44% Pipe-based Context Switching 3215356.1 3576945.1 11.25% Process Creation 108520.5 120184.6 10.75% Shell Scripts (1 concurrent) 122636.3 121888 -0.61% Shell Scripts (8 concurrent) 17462.1 17381.4 -0.46% System Call Overhead 4429998.9 4435006.7 0.11% hackbench -g 1 -l 100000 before after Time 4.217 2.916 Our patch has improvement on schbench, hackbench and Pipe-based Context Switching of unixbench when there exists idle cpus, and no obvious regression on other tests of unixbench. This can help improve rt in scenes where wakeup happens frequently. Signed-off-by: Tianchen Ding Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Link: https://lore.kernel.org/r/20220608233412.327341-3-dtcccc@linux.alibaba.com kernel/sched/core.c | 26 ++++++++++++++------------ kernel/sched/sched.h | 1 - 2 files changed, 14 insertions(+), 13 deletions(-) commit 28156108fecb1f808b21d216e8ea8f0d205a530c Author: Tianchen Ding Date: Thu Jun 9 07:34:11 2022 +0800 sched: Fix the check of nr_running at queue wakelist The commit 2ebb17717550 ("sched/core: Offload wakee task activation if it the wakee is descheduling") checked rq->nr_running <= 1 to avoid task stacking when WF_ON_CPU. Per the ordering of writes to p->on_rq and p->on_cpu, observing p->on_cpu (WF_ON_CPU) in ttwu_queue_cond() implies !p->on_rq, IOW p has gone through the deactivate_task() in __schedule(), thus p has been accounted out of rq->nr_running. As such, the task being the only runnable task on the rq implies reading rq->nr_running == 0 at that point. The benchmark result is in [1]. [1] https://lore.kernel.org/all/e34de686-4e85-bde1-9f3c-9bbc86b38627@linux.alibaba.com/ Suggested-by: Valentin Schneider Signed-off-by: Tianchen Ding Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Link: https://lore.kernel.org/r/20220608233412.327341-2-dtcccc@linux.alibaba.com kernel/sched/core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 792b9f65a568f48c50b3175536db9cde5a1edcc0 Author: Josh Don Date: Wed Jun 8 19:55:15 2022 -0700 sched: Allow newidle balancing to bail out of load_balance While doing newidle load balancing, it is possible for new tasks to arrive, such as with pending wakeups. newidle_balance() already accounts for this by exiting the sched_domain load_balance() iteration if it detects these cases. This is very important for minimizing wakeup latency. However, if we are already in load_balance(), we may stay there for a while before returning back to newidle_balance(). This is most exacerbated if we enter a 'goto redo' loop in the LBF_ALL_PINNED case. A very straightforward workaround to this is to adjust should_we_balance() to bail out if we're doing a CPU_NEWLY_IDLE balance and new tasks are detected. This was tested with the following reproduction: - two threads that take turns sleeping and waking each other up are affined to two cores - a large number of threads with 100% utilization are pinned to all other cores Without this patch, wakeup latency was ~120us for the pair of threads, almost entirely spent in load_balance(). With this patch, wakeup latency is ~6us. Signed-off-by: Josh Don Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20220609025515.2086253-1-joshdon@google.com kernel/sched/fair.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 2ed81e765417ec2526f901366167a13294ef09ce Author: Yajun Deng Date: Tue Jun 7 18:18:07 2022 +0800 sched/deadline: Use proc_douintvec_minmax() limit minimum value sysctl_sched_dl_period_max and sysctl_sched_dl_period_min are unsigned integer, but proc_dointvec() wouldn't return error even if we set a negative number. Use proc_douintvec_minmax() instead of proc_dointvec(). Add extra1 for sysctl_sched_dl_period_max and extra2 for sysctl_sched_dl_period_min. It's just an optimization for match data and proc_handler in struct ctl_table. The 'if (period < min || period > max)' in __checkparam_dl() will work fine even if there hasn't this patch. Signed-off-by: Yajun Deng Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Daniel Bristot de Oliveira Link: https://lore.kernel.org/r/20220607101807.249965-1-yajun.deng@linux.dev kernel/sched/deadline.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 51bf903b64bdde4e4c9009a9e2b4a589845d9d81 Author: Chengming Zhou Date: Wed Jun 1 10:18:48 2022 +0800 sched/fair: Optimize and simplify rq leaf_cfs_rq_list We notice the rq leaf_cfs_rq_list has two problems when do bugfix backports and some test profiling. 1. cfs_rqs under throttled subtree could be added to the list, and make their fully decayed ancestors on the list, even though not needed. 2. #1 also make the leaf_cfs_rq_list management complex and error prone, this is the list of related bugfix so far: commit 31bc6aeaab1d ("sched/fair: Optimize update_blocked_averages()") commit fe61468b2cbc ("sched/fair: Fix enqueue_task_fair warning") commit b34cb07dde7c ("sched/fair: Fix enqueue_task_fair() warning some more") commit 39f23ce07b93 ("sched/fair: Fix unthrottle_cfs_rq() for leaf_cfs_rq list") commit 0258bdfaff5b ("sched/fair: Fix unfairness caused by missing load decay") commit a7b359fc6a37 ("sched/fair: Correctly insert cfs_rq's to list on unthrottle") commit fdaba61ef8a2 ("sched/fair: Ensure that the CFS parent is added after unthrottling") commit 2630cde26711 ("sched/fair: Add ancestors of unthrottled undecayed cfs_rq") commit 31bc6aeaab1d ("sched/fair: Optimize update_blocked_averages()") delete every cfs_rq under throttled subtree from rq->leaf_cfs_rq_list, and delete the throttled_hierarchy() test in update_blocked_averages(), which optimized update_blocked_averages(). But those later bugfix add cfs_rqs under throttled subtree back to rq->leaf_cfs_rq_list again, with their fully decayed ancestors, for the integrity of rq->leaf_cfs_rq_list. This patch takes another method, skip all cfs_rqs under throttled hierarchy when list_add_leaf_cfs_rq(), to completely make cfs_rqs under throttled subtree off the leaf_cfs_rq_list. So we don't need to consider throttled related things in enqueue_entity(), unthrottle_cfs_rq() and enqueue_task_fair(), which simplify the code a lot. Also optimize update_blocked_averages() since cfs_rqs under throttled hierarchy and their ancestors won't be on the leaf_cfs_rq_list. Signed-off-by: Chengming Zhou Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/20220601021848.76943-1-zhouchengming@bytedance.com kernel/sched/fair.c | 92 ++++++++++++++++------------------------------------- 1 file changed, 28 insertions(+), 64 deletions(-) commit f5b2eeb49991047f8f64785e7a7857d6f219d574 Author: K Prateek Nayak Date: Thu Apr 7 16:42:22 2022 +0530 sched/fair: Consider CPU affinity when allowing NUMA imbalance in find_idlest_group() In the case of systems containing multiple LLCs per socket, like AMD Zen systems, users want to spread bandwidth hungry applications across multiple LLCs. Stream is one such representative workload where the best performance is obtained by limiting one stream thread per LLC. To ensure this, users are known to pin the tasks to a specify a subset of the CPUs consisting of one CPU per LLC while running such bandwidth hungry tasks. Suppose we kickstart a multi-threaded task like stream with 8 threads using taskset or numactl to run on a subset of CPUs on a 2 socket Zen3 server where each socket contains 128 CPUs (0-63,128-191 in one socket, 64-127,192-255 in another socket) Eg: numactl -C 0,16,32,48,64,80,96,112 ./stream8 Here each CPU in the list is from a different LLC and 4 of those LLCs are on one socket, while the other 4 are on another socket. Ideally we would prefer that each stream thread runs on a different CPU from the allowed list of CPUs. However, the current heuristics in find_idlest_group() do not allow this during the initial placement. Suppose the first socket (0-63,128-191) is our local group from which we are kickstarting the stream tasks. The first four stream threads will be placed in this socket. When it comes to placing the 5th thread, all the allowed CPUs are from the local group (0,16,32,48) would have been taken. However, the current scheduler code simply checks if the number of tasks in the local group is fewer than the allowed numa-imbalance threshold. This threshold was previously 25% of the NUMA domain span (in this case threshold = 32) but after the v6 of Mel's patchset "Adjust NUMA imbalance for multiple LLCs", got merged in sched-tip, Commit: e496132ebedd ("sched/fair: Adjust the allowed NUMA imbalance when SD_NUMA spans multiple LLCs") it is now equal to number of LLCs in the NUMA domain, for processors with multiple LLCs. (in this case threshold = 8). For this example, the number of tasks will always be within threshold and thus all the 8 stream threads will be woken up on the first socket thereby resulting in sub-optimal performance. The following sched_wakeup_new tracepoint output shows the initial placement of tasks in the current tip/sched/core on the Zen3 machine: stream-5313 [016] d..2. 627.005036: sched_wakeup_new: comm=stream pid=5315 prio=120 target_cpu=032 stream-5313 [016] d..2. 627.005086: sched_wakeup_new: comm=stream pid=5316 prio=120 target_cpu=048 stream-5313 [016] d..2. 627.005141: sched_wakeup_new: comm=stream pid=5317 prio=120 target_cpu=000 stream-5313 [016] d..2. 627.005183: sched_wakeup_new: comm=stream pid=5318 prio=120 target_cpu=016 stream-5313 [016] d..2. 627.005218: sched_wakeup_new: comm=stream pid=5319 prio=120 target_cpu=016 stream-5313 [016] d..2. 627.005256: sched_wakeup_new: comm=stream pid=5320 prio=120 target_cpu=016 stream-5313 [016] d..2. 627.005295: sched_wakeup_new: comm=stream pid=5321 prio=120 target_cpu=016 Once the first four threads are distributed among the allowed CPUs of socket one, the rest of the treads start piling on these same CPUs when clearly there are CPUs on the second socket that can be used. Following the initial pile up on a small number of CPUs, though the load-balancer eventually kicks in, it takes a while to get to {4}{4} and even {4}{4} isn't stable as we observe a bunch of ping ponging between {4}{4} to {5}{3} and back before a stable state is reached much later (1 Stream thread per allowed CPU) and no more migration is required. We can detect this piling and avoid it by checking if the number of allowed CPUs in the local group are fewer than the number of tasks running in the local group and use this information to spread the 5th task out into the next socket (after all, the goal in this slowpath is to find the idlest group and the idlest CPU during the initial placement!). The following sched_wakeup_new tracepoint output shows the initial placement of tasks after adding this fix on the Zen3 machine: stream-4485 [016] d..2. 230.784046: sched_wakeup_new: comm=stream pid=4487 prio=120 target_cpu=032 stream-4485 [016] d..2. 230.784123: sched_wakeup_new: comm=stream pid=4488 prio=120 target_cpu=048 stream-4485 [016] d..2. 230.784167: sched_wakeup_new: comm=stream pid=4489 prio=120 target_cpu=000 stream-4485 [016] d..2. 230.784222: sched_wakeup_new: comm=stream pid=4490 prio=120 target_cpu=112 stream-4485 [016] d..2. 230.784271: sched_wakeup_new: comm=stream pid=4491 prio=120 target_cpu=096 stream-4485 [016] d..2. 230.784322: sched_wakeup_new: comm=stream pid=4492 prio=120 target_cpu=080 stream-4485 [016] d..2. 230.784368: sched_wakeup_new: comm=stream pid=4493 prio=120 target_cpu=064 We see that threads are using all of the allowed CPUs and there is no pileup. No output is generated for tracepoint sched_migrate_task with this patch due to a perfect initial placement which removes the need for balancing later on - both across NUMA boundaries and within NUMA boundaries for stream. Following are the results from running 8 Stream threads with and without pinning on a dual socket Zen3 Machine (2 x 64C/128T): During the testing of this patch, the tip sched/core was at commit: 089c02ae2771 "ftrace: Use preemption model accessors for trace header printout" Pinning is done using: numactl -C 0,16,32,48,64,80,96,112 ./stream8 5.18.0-rc1 5.18.0-rc1 5.18.0-rc1 tip sched/core tip sched/core tip sched/core (no pinning) + pinning + this-patch + pinning Copy: 109364.74 (0.00 pct) 94220.50 (-13.84 pct) 158301.28 (44.74 pct) Scale: 109670.26 (0.00 pct) 90210.59 (-17.74 pct) 149525.64 (36.34 pct) Add: 129029.01 (0.00 pct) 101906.00 (-21.02 pct) 186658.17 (44.66 pct) Triad: 127260.05 (0.00 pct) 106051.36 (-16.66 pct) 184327.30 (44.84 pct) Pinning currently hurts the performance compared to unbound case on tip/sched/core. With the addition of this patch, we are able to outperform tip/sched/core by a good margin with pinning. Following are the results from running 16 Stream threads with and without pinning on a dual socket IceLake Machine (2 x 32C/64T): NUMA Topology of Intel Skylake machine: Node 1: 0,2,4,6 ... 126 (Even numbers) Node 2: 1,3,5,7 ... 127 (Odd numbers) Pinning is done using: numactl -C 0-15 ./stream16 5.18.0-rc1 5.18.0-rc1 5.18.0-rc1 tip sched/core tip sched/core tip sched/core (no pinning) +pinning + this-patch + pinning Copy: 85815.31 (0.00 pct) 149819.21 (74.58 pct) 156807.48 (82.72 pct) Scale: 64795.60 (0.00 pct) 97595.07 (50.61 pct) 99871.96 (54.13 pct) Add: 71340.68 (0.00 pct) 111549.10 (56.36 pct) 114598.33 (60.63 pct) Triad: 68890.97 (0.00 pct) 111635.16 (62.04 pct) 114589.24 (66.33 pct) In case of Icelake machine, with single LLC per socket, pinning across the two sockets reduces cache contention, thus showing great improvement in pinned case which is further benefited by this patch. Signed-off-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Reviewed-by: Srikar Dronamraju Acked-by: Mel Gorman Link: https://lkml.kernel.org/r/20220407111222.22649-1-kprateek.nayak@amd.com kernel/sched/fair.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 026b98a93bbdbefb37ab8008df84e38e2fedaf92 Author: Mel Gorman Date: Fri May 20 11:35:19 2022 +0100 sched/numa: Adjust imb_numa_nr to a better approximation of memory channels For a single LLC per node, a NUMA imbalance is allowed up until 25% of CPUs sharing a node could be active. One intent of the cut-off is to avoid an imbalance of memory channels but there is no topological information based on active memory channels. Furthermore, there can be differences between nodes depending on the number of populated DIMMs. A cut-off of 25% was arbitrary but generally worked. It does have a severe corner cases though when an parallel workload is using 25% of all available CPUs over-saturates memory channels. This can happen due to the initial forking of tasks that get pulled more to one node after early wakeups (e.g. a barrier synchronisation) that is not quickly corrected by the load balancer. The LB may fail to act quickly as the parallel tasks are considered to be poor migrate candidates due to locality or cache hotness. On a range of modern Intel CPUs, 12.5% appears to be a better cut-off assuming all memory channels are populated and is used as the new cut-off point. A minimum of 1 is specified to allow a communicating pair to remain local even for CPUs with low numbers of cores. For modern AMDs, there are multiple LLCs and are not affected. Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Tested-by: K Prateek Nayak Link: https://lore.kernel.org/r/20220520103519.1863-5-mgorman@techsingularity.net kernel/sched/topology.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit cb29a5c19d2d68afc641fb1949e1a1c565b582ea Author: Mel Gorman Date: Fri May 20 11:35:18 2022 +0100 sched/numa: Apply imbalance limitations consistently The imbalance limitations are applied inconsistently at fork time and at runtime. At fork, a new task can remain local until there are too many running tasks even if the degree of imbalance is larger than NUMA_IMBALANCE_MIN which is different to runtime. Secondly, the imbalance figure used during load balancing is different to the one used at NUMA placement. Load balancing uses the number of tasks that must move to restore imbalance where as NUMA balancing uses the total imbalance. In combination, it is possible for a parallel workload that uses a small number of CPUs without applying scheduler policies to have very variable run-to-run performance. [lkp@intel.com: Fix build breakage for arc-allyesconfig] Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Tested-by: K Prateek Nayak Link: https://lore.kernel.org/r/20220520103519.1863-4-mgorman@techsingularity.net kernel/sched/fair.c | 81 +++++++++++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 36 deletions(-) commit 13ede33150877d44756171e33570076882b17b0b Author: Mel Gorman Date: Fri May 20 11:35:17 2022 +0100 sched/numa: Do not swap tasks between nodes when spare capacity is available If a destination node has spare capacity but there is an imbalance then two tasks are selected for swapping. If the tasks have no numa group or are within the same NUMA group, it's simply shuffling tasks around without having any impact on the compute imbalance. Instead, it's just punishing one task to help another. Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Tested-by: K Prateek Nayak Link: https://lore.kernel.org/r/20220520103519.1863-3-mgorman@techsingularity.net kernel/sched/fair.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 70ce3ea9aa4ed901c8a90de667df5ef307766e71 Author: Mel Gorman Date: Fri May 20 11:35:16 2022 +0100 sched/numa: Initialise numa_migrate_retry On clone, numa_migrate_retry is inherited from the parent which means that the first NUMA placement of a task is non-deterministic. This affects when load balancing recognises numa tasks and whether to migrate "regular", "remote" or "all" tasks between NUMA scheduler domains. Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Tested-by: K Prateek Nayak Link: https://lore.kernel.org/r/20220520103519.1863-2-mgorman@techsingularity.net kernel/sched/fair.c | 1 + 1 file changed, 1 insertion(+) commit b7bfbbbf72fcf95c9a58d6ad0e905de539fba025 Author: Furkan Kardame Date: Sat Jun 11 20:08:52 2022 +0300 arm64: dts: meson: add gpio-fan control to GS-King-X GS-King-X has a single speed GPIO fan which is always-on by default. If we add controls for the fan and a trip point, the fan stays off most of the time, reducing background noise from the unit. Signed-off-by: Furkan Kardame Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20220611170852.19487-1-f.kardame@manjaro.org .../arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit f0fe9f3c7abcc946a676dfb295478c50312523c2 Author: Sandipan Das Date: Thu May 19 15:33:34 2022 +0530 perf/x86/amd/uncore: Add PerfMonV2 RDPMC assignments The current RDPMC assignment scheme maps four DF PMCs and six L3 PMCs from index 6 to 15. If AMD Performance Monitoring Version 2 (PerfMonV2) is supported, there may be additional DF counters available which are mapped starting from index 16 i.e. just after the L3 counters. Update the RDPMC assignments accordingly. Signed-off-by: Sandipan Das Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/1359379ef34da760f108b075ac138ab082caa3ba.1652954372.git.sandipan.das@amd.com arch/x86/events/amd/uncore.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit c390241a93260b377c84ad9e7cd5242adf667aac Author: Sandipan Das Date: Thu May 19 15:33:33 2022 +0530 perf/x86/amd/uncore: Add PerfMonV2 DF event format If AMD Performance Monitoring Version 2 (PerfMonV2) is supported, use bits 0-7, 32-37 as EventSelect and bits 8-15, 24-27 as UnitMask for Data Fabric (DF) events. Signed-off-by: Sandipan Das Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/ffc24d5a3375b1d6e457d88e83241114de5c1942.1652954372.git.sandipan.das@amd.com arch/x86/events/amd/uncore.c | 24 +++++++++++++++++------- arch/x86/include/asm/perf_event.h | 13 +++++++++++++ 2 files changed, 30 insertions(+), 7 deletions(-) commit 16b48c3f5ed85b8017526b1acacf5115461b489a Author: Sandipan Das Date: Thu May 19 15:33:32 2022 +0530 perf/x86/amd/uncore: Detect available DF counters If AMD Performance Monitoring Version 2 (PerfMonV2) is supported, use CPUID leaf 0x80000022 EBX to detect the number of Data Fabric (DF) PMCs. This offers more flexibility if the counts change in later processor families. Signed-off-by: Sandipan Das Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/bac7b2806561e03f2acc7fdc9db94f102df80e1d.1652954372.git.sandipan.das@amd.com arch/x86/events/amd/uncore.c | 10 ++++++++++ arch/x86/include/asm/perf_event.h | 3 +++ 2 files changed, 13 insertions(+) commit 847f3268bb644ee852732f8e3b5748e4319244b7 Author: Sandipan Das Date: Thu May 19 15:33:31 2022 +0530 perf/x86/amd/uncore: Use attr_update for format attributes Use the update_attrs attribute group introduced by commit f3a3a8257e5a ("perf/core: Add attr_groups_update into struct pmu") and the is_visible() callback to populate the family specifc attributes for uncore events. The changes apply to attributes that are unique to families such as slicemask for Family 17h and coreid for Family 19h. The addition of common attributes such as event and umask, whose formats change across families, remain unchanged. Signed-off-by: Sandipan Das Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/a5e4f4dd5c459199fc497e82b858ba09dc91c064.1652954372.git.sandipan.das@amd.com arch/x86/events/amd/uncore.c | 68 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 54 insertions(+), 14 deletions(-) commit 39621c5808f5dda75d03dc4b2d4d2b13a5a1c34b Author: Sandipan Das Date: Thu May 19 15:33:30 2022 +0530 perf/x86/amd/uncore: Use dynamic events array If AMD Performance Monitoring Version 2 (PerfMonV2) is supported, the number of available counters for a given uncore PMU may not be fixed across families and models and has to be determined at runtime. The per-cpu uncore PMU data currently uses a fixed-sized array for event information. Make it dynamic based on the number of available counters. Signed-off-by: Sandipan Das Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/21eea0cb6de9d14f78d52d1d62637ae02bc900f5.1652954372.git.sandipan.das@amd.com arch/x86/events/amd/uncore.c | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) commit e60b7cb089f216a26d478f5ad8f811a1de65f382 Author: Like Xu Date: Thu May 19 23:19:13 2022 +0800 x86/events/intel/ds: Enable large PEBS for PERF_SAMPLE_WEIGHT_TYPE All the information required by the PERF_SAMPLE_WEIGHT is available in the pebs record. Thus large PEBS could be enabled for PERF_SAMPLE_WEIGHT sample type to save PMIs overhead until other non-compatible flags such as PERF_SAMPLE_DATA_PAGE_SIZE (due to lack of munmap tracking) stop it. To cover new weight extension, add PERF_SAMPLE_WEIGHT_TYPE to the guardian LARGE_PEBS_FLAGS. Tested it with: $ perf mem record -c 1000 workload Before: Captured and wrote 0.126 MB perf.data (958 samples) [958 PMIs] After: Captured and wrote 0.313 MB perf.data (4859 samples) [3 PMIs] Reported-by: Yongchao Duan Signed-off-by: Like Xu Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20220519151913.80545-1-likexu@tencent.com arch/x86/events/perf_event.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit de0130355306ec54d6c4d0d2ae0485dfb5dd7f26 Author: Thomas Gleixner Date: Mon Jun 13 09:38:23 2022 +0200 x86/crypto: Remove stray comment terminator It seems the SPDX patch script managed to confuse itself. Fixes: 2eb72d6696c6 ("treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_179.RULE") Reported-by: kernel test robot Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman arch/x86/crypto/crc32-pclmul_asm.S | 2 -- 1 file changed, 2 deletions(-) commit f4e3a12bf2d1983b8f352b7719794c52be7e0990 Author: Yang Yingliang Date: Mon Jun 13 14:34:54 2022 +0800 drm/syncobj: add missing error return code in drm_syncobj_transfer_to_timeline() If dma_fence_unwrap_merge() fails, it should return error code in drm_syncobj_transfer_to_timeline() Fixes: ec8d985ff26f ("drm: use dma_fence_unwrap_merge() in drm_syncobj") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20220613063454.2609364-1-yangyingliang@huawei.com drivers/gpu/drm/drm_syncobj.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 79ad6a561958777d6d8ecfa66e51d09d35ec6450 Author: Sergey Shtylyov Date: Fri May 13 23:50:14 2022 +0300 ata: libata-core: fix sloppy typing in ata_id_n_sectors() The code multiplying the # of cylinders/heads/sectors in ata_id_n_sectors() to get a disk capacity implicitly uses the *int* type for that calculation and casting the result to 'u64' before returning ensues a sign extension. Explicitly casting the 'u16' typed multipliers to 'u32' results in avoiding a sign extension instruction and so in a more compact code... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: Sergey Shtylyov Signed-off-by: Damien Le Moal drivers/ata/libata-core.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 6cd379f75f424b874ea1f35e3c02fa4090246eaf Author: Sergey Shtylyov Date: Sun May 15 23:41:26 2022 +0300 ata: pata_hpt3x2n: pass base DPLL frequency to hpt3x2n_pci_clock() Currently, the base DPLL frequency is hardcoded in hpt3x2n_pci_clock(). Align with the updated 'pata_hpt37x' driver, where this frequency is a parameter to hpt37x_pci_clock(). While at it, also do the following to align with the 'pata_hpt37x' driver: - fix the 'freq' local variable's type; - remove the 'iobase' local variable; - extend the comment to the inl() call; - move the 'total' local variable's declaration. Signed-off-by: Sergey Shtylyov Signed-off-by: Damien Le Moal drivers/ata/pata_hpt3x2n.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 75b4d58cb5bd7401d537f149e2fa268beaa2c375 Author: Sergey Shtylyov Date: Sun May 15 23:41:25 2022 +0300 ata: pata_hpt37x: merge hpt374_read_freq() to hpt37x_pci_clock() With hpt374_read_freq() implemented as a separate function, there's some code duplication going on, not to mention that this function is named incorrectly: it returns the f_CNT register value saved by BIOS, not the PCI clock frequency. Folding hpt374_read_freq() into hpt37x_pci_clock() saves 20 bytes of object code with x86_64 gcc 10.3.1... Signed-off-by: Sergey Shtylyov Signed-off-by: Damien Le Moal drivers/ata/pata_hpt37x.c | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) commit 96c34ac4ec30f31941b55f6866a5cc7631b5e92f Author: Sergey Shtylyov Date: Sun May 15 23:41:24 2022 +0300 ata: pata_hpt37x: factor out hpt37x_pci_clock() Factor out the PCI clock frequency detection code into hpt37x_pci_clock(), so that this driver becomes more like 'pata_hpt3x2n'. Note that I decided to change the way HPT374 is identified to using the PCI device ID... Signed-off-by: Sergey Shtylyov Signed-off-by: Damien Le Moal drivers/ata/pata_hpt37x.c | 94 +++++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 43 deletions(-) commit 305f8db79d76ac3e047fe5004d2175b5835bb7fc Author: Sergey Shtylyov Date: Sun May 15 23:41:23 2022 +0300 ata: pata_hpt37x: move claculating PCI clock from hpt37x_clock_slot() hpt37x_init_one() incorrectly calls an averaged f_CNT register value 'freq' and hpt37x_clock_slot() takes that value as the 'freq' parameter -- rename the former variable to 'fcnt' and move the actual code calculating the PCI clock from hpt37x_clock_slot() to hpt37x_init_one(), along with adding the frequency clamping code, in preparation for the factoring out the PCI clock detection, so that this driver would become more like the 'pata_hpt3x2n' driver... Signed-off-by: Sergey Shtylyov Signed-off-by: Damien Le Moal drivers/ata/pata_hpt37x.c | 45 ++++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 17 deletions(-) commit 34a4d048d3cf11546864bc09ddab6c2e7b0f7e65 Author: Xiang wangx Date: Sat Jun 4 22:29:27 2022 +0800 ata: libata: Fix syntax errors in comments Delete the redundant word 'in'. Signed-off-by: Xiang wangx Signed-off-by: Damien Le Moal drivers/ata/libata-transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16490922a95f4f67eb9d918f94a4f5b5bdc9eb80 Author: Igor Torrente Date: Mon Apr 4 17:45:07 2022 -0300 drm: vkms: Alloc the compose frame using vzalloc Currently, the memory to the composition frame is being allocated using the kzmalloc. This comes with the limitation of maximum size of one page size(which in the x86_64 is 4Kb and 4MB for default and hugepage respectively). Somes test of igt (e.g. kms_plane@pixel-format) uses more than 4MB when testing some pixel formats like ARGB16161616 and the following error were showing up when running kms_plane@plane-panning-bottom-right*: [drm:vkms_composer_worker [vkms]] *ERROR* Cannot allocate memory for output frame. This problem is addessed by allocating the memory using kvzalloc that circunvents this limitation. V5: Improve the commit message and drop the debugging issues in VKMS TO-DO(Melissa Wen). Reviewed-by: Melissa Wen Signed-off-by: Igor Torrente Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20220404204515.42144-2-igormtorrente@gmail.com Documentation/gpu/vkms.rst | 6 ------ drivers/gpu/drm/vkms/vkms_composer.c | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-) commit 24f6fe3226c6f9f1b8406311a96b59c6e650b707 Author: Tales Lelo da Aparecida Date: Fri Apr 15 08:12:59 2022 -0300 drm/vkms: check plane_composer->map[0] before using it Fix a copypasta error. The caller of compose_plane() already checks primary_composer->map. In contrast, plane_composer->map is never verified here before handling. Fixes: 7938f4218168 ("dma-buf-map: Rename to iosys-map") Reviewed-by: André Almeida Signed-off-by: Tales Lelo da Aparecida Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20220415111300.61013-2-tales.aparecida@gmail.com drivers/gpu/drm/vkms/vkms_composer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5a068983cf41bfee2c15656e62f401c5f8b0437 Author: Peter Robinson Date: Fri Jun 3 10:26:07 2022 +0100 drm/v3d: Add support for bcm2711 Add compatible string and Kconfig options and help for bcm2711. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Peter Robinson Reviewed-by: Stefan Wahren Reviewed-by: Javier Martinez Canillas Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20220603092610.1909675-4-pbrobinson@gmail.com drivers/gpu/drm/v3d/Kconfig | 5 +++-- drivers/gpu/drm/v3d/v3d_drv.c | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) commit 90a64adb0876f3b6ec49819df99edffed982e4f2 Author: Peter Robinson Date: Fri Jun 3 10:26:06 2022 +0100 drm/v3d: Get rid of pm code Runtime PM doesn't seem to work correctly on this driver. On top of that, commit 8b6864e3e138 ("drm/v3d/v3d_drv: Remove unused static variable 'v3d_v3d_pm_ops'") hints that it most likely never did as the driver's PM ops were not hooked-up. So, in order to support regular operation with V3D on BCM2711 (Raspberry Pi 4), get rid of the PM code. PM will be reinstated once we figure out the underlying issues. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Peter Robinson Reviewed-by: Javier Martinez Canillas Acked-by: Melissa Wen Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20220603092610.1909675-3-pbrobinson@gmail.com drivers/gpu/drm/v3d/v3d_debugfs.c | 18 +----------------- drivers/gpu/drm/v3d/v3d_drv.c | 11 ----------- drivers/gpu/drm/v3d/v3d_gem.c | 12 +----------- 3 files changed, 2 insertions(+), 39 deletions(-) commit 9c63e253485cd78ae74da2fcce67e7a1746ed905 Author: Peter Robinson Date: Fri Jun 3 10:26:05 2022 +0100 dt-bindings: gpu: v3d: Add BCM2711's compatible BCM2711, Raspberry Pi 4's SoC, contains a V3D core. So add its specific compatible to the bindings. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Peter Robinson Reviewed-by: Stefan Wahren Reviewed-by: Javier Martinez Canillas Acked-by: Rob Herring Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20220603092610.1909675-2-pbrobinson@gmail.com Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml | 1 + 1 file changed, 1 insertion(+) commit d040e81bec407057b6dea9dadfe5e15b9845b010 Author: Niklas Söderlund Date: Mon Jun 13 00:31:57 2022 +0200 arm64: dts: rockchip: Add missing space around regulator-name on rk3368-orion-r68 Add the missing space around the regulator-name property before the typo spreads to other files. Signed-off-by: Niklas Söderlund Link: https://lore.kernel.org/r/20220612223201.2740248-3-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 473c93b5b94f63de30f35b2935616457cca5c4d8 Author: Marek Vasut Date: Sun Jun 12 15:21:52 2022 +0200 drm/bridge: rcar: Drop unused variables due to drm_of_get_data_lanes_count_ep The rcar_mipi_dsi_parse_dt() now contains two uninitialized variables due to conversion to common drm_of_get_data_lanes_count_ep() helper. Drop them. Fixes: d643daaf1694 ("drm/bridge: rcar: Convert to drm_of_get_data_lanes_count_ep") Reported-by: kernel test robot Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220612132152.91052-3-marex@denx.de drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c | 2 -- 1 file changed, 2 deletions(-) commit c750c4ce1ad69d3df68359abce70ee3d0064c97a Author: Marek Vasut Date: Sun Jun 12 15:21:51 2022 +0200 drm/bridge: tc358775: Fix drm_of_get_data_lanes_count_ep conversion Initialize dsi_lanes to -1, so that in case the endpoint is missing, probe would fail as it did before the conversion, instead of depending on uninitialized variable and thus undefined behavior. Fixes: 56426faa1492 ("drm/bridge: tc358775: Convert to drm_of_get_data_lanes_count_ep") Reported-by: kernel test robot Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220612132152.91052-2-marex@denx.de drivers/gpu/drm/bridge/tc358775.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb6b94db2f4a585d4a9b8e503d7377d2a23c1104 Author: Marek Vasut Date: Sun Jun 12 15:21:50 2022 +0200 drm: of: Mark empty drm_of_get_data_lanes_count and drm_of_get_data_lanes_ep static Mark empty implementations of drm_of_get_data_lanes_count and drm_of_get_data_lanes_ep as static inline, just like the rest of empty implementations of various functions in drm_of.h . Add missing comma to drm_of_get_data_lanes_count_ep() . Fixes: fc801750b197 ("drm: of: Add drm_of_get_data_lanes_count and drm_of_get_data_lanes_ep") Reported-by: kernel test robot Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220612132152.91052-1-marex@denx.de include/drm/drm_of.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 16bd48dc2b3b08d8b3160182b42e51eb2c274706 Author: Marek Vasut Date: Sun Jun 12 12:29:47 2022 +0200 drm/bridge: ti-sn65dsi83: Convert to drm_of_get_data_lanes_count Convert driver to use this new helper to standardize OF "data-lanes" parsing. Reviewed-by: Andrzej Hajda Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220612102947.13912-1-marex@denx.de drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc8adb13d844b44c147b4dced292c74a1ab5cb25 Author: Marek Vasut Date: Sun Jun 12 12:29:18 2022 +0200 drm/bridge: ti-sn65dsi83: Do not cache dsi_lanes and host twice The DSI lane count can be accessed via the dsi device pointer, make use of that. The DSI host pointer is only used in sn65dsi83_host_attach(), move the code around so that the host does not have to be cached in the driver private data. This simplifies the code further. No functional change. This has the added bonus that lt9211, tc358767, sn65dsi83 now use very similar *_mipi_dsi_host_attach() which is ripe for deduplication. Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220612102918.13874-1-marex@denx.de drivers/gpu/drm/bridge/ti-sn65dsi83.c | 64 ++++++++++++----------------------- 1 file changed, 22 insertions(+), 42 deletions(-) commit 50d88b1d1e7970ed900080bab4fe3f1477908d46 Author: Haowen Bai Date: Tue May 31 17:24:23 2022 +0800 platform/x86: system76_acpi: Use dev_get_drvdata Eliminate direct accesses to the driver_data field. Signed-off-by: Haowen Bai Link: https://lore.kernel.org/r/1653989063-20180-1-git-send-email-baihaowen@meizu.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/system76_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3cd8cc98d63492f6f69edd4486c9bd1fe29f91c3 Author: Hans de Goede Date: Tue May 3 16:02:07 2022 +0200 platform/x86: Drop the PMC_ATOM Kconfig option The def_bool y PMC_ATOM Kconfig option provides a couple of symbols used by the code enabled by the X86_INTEL_LPSS option and it registers some clocks. These clocks are only registered on Bay Trail, Cherry Trail and Brasswell Intel SoCs and kernels targeting these SoCs must always have the X86_INTEL_LPSS option enabled otherwise many things will not work. Building the PMC_ATOM code on kernels which are not targeting the mentioned SoCs and which do not have the X86_INTEL_LPSS enabled is not useful. This means that we can simplify things by replacing the PMC_ATOM Kconfig option in Makefiles with X86_INTEL_LPSS and then drop the option. Cc: Paul Gortmaker Signed-off-by: Hans de Goede Acked-by: Andy Shevchenko Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20220503140207.101218-2-hdegoede@redhat.com drivers/clk/x86/Makefile | 4 +--- drivers/platform/x86/Kconfig | 5 ----- drivers/platform/x86/Makefile | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) commit d643daaf1694b7565fbe3982b630e1c7b95f1600 Author: Marek Vasut Date: Tue May 24 03:05:22 2022 +0200 drm/bridge: rcar: Convert to drm_of_get_data_lanes_count_ep Convert driver to use this new helper to standardize OF "data-lanes" parsing. Reviewed-by: Andrzej Hajda Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-11-marex@denx.de drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 185443efa26a62b7d1401c89b83c89a1a2601350 Author: Marek Vasut Date: Tue May 24 03:05:21 2022 +0200 drm/msm: Convert to drm_of_get_data_lanes_count Convert driver to use this new helper to standardize OF "data-lanes" parsing. Reviewed-by: Andrzej Hajda Reviewed-by: Dmitry Baryshkov Signed-off-by: Marek Vasut Cc: Abhinav Kumar Cc: Andrzej Hajda Cc: Dmitry Baryshkov Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Rob Clark Cc: Robert Foss Cc: Sam Ravnborg Cc: Sean Paul To: dri-devel@lists.freedesktop.org Reviewed-by: Abhinav Kumar Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-10-marex@denx.de drivers/gpu/drm/msm/dp/dp_parser.c | 6 ++---- drivers/gpu/drm/msm/dsi/dsi_host.c | 7 +++---- 2 files changed, 5 insertions(+), 8 deletions(-) commit 254a8d0c0071255eb19a81a32ff8d5a0beef1e34 Author: Marek Vasut Date: Tue May 24 03:05:20 2022 +0200 drm/bridge: ti-sn65dsi86: Convert to drm_of_get_data_lanes_count Convert driver to use this new helper to standardize OF "data-lanes" parsing. Reviewed-by: Andrzej Hajda Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-9-marex@denx.de drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 56426faa1492289ff794620c4ed8c1847a420d0a Author: Marek Vasut Date: Tue May 24 03:05:18 2022 +0200 drm/bridge: tc358775: Convert to drm_of_get_data_lanes_count_ep Convert driver to use this new helper to standardize OF "data-lanes" parsing. Reviewed-by: Andrzej Hajda Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-7-marex@denx.de drivers/gpu/drm/bridge/tc358775.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit d8609fd1e0742ba3ad2e51bba9dd489dd03d8599 Author: Marek Vasut Date: Tue May 24 03:05:17 2022 +0200 drm/bridge: tc358767: Convert to drm_of_get_data_lanes_count Convert driver to use this new helper to standardize OF "data-lanes" parsing. Reviewed-by: Andrzej Hajda Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-6-marex@denx.de drivers/gpu/drm/bridge/tc358767.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5c57cbc390b166950c2e6c2f0c4edaeb0f47e97d Author: Marek Vasut Date: Tue May 24 03:05:16 2022 +0200 drm/bridge: lt9211: Convert to drm_of_get_data_lanes_count Convert driver to use this new helper to standardize OF "data-lanes" parsing. Reviewed-by: Andrzej Hajda Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-5-marex@denx.de drivers/gpu/drm/bridge/lontium-lt9211.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1db4b5264819a8e3aa62e38287bf1da2e1dc8894 Author: Marek Vasut Date: Tue May 24 03:05:15 2022 +0200 drm/bridge: lt8912: Convert to drm_of_get_data_lanes_count_ep Convert driver to use this new helper to standardize OF "data-lanes" parsing. Reviewed-by: Andrzej Hajda Signed-off-by: Marek Vasut Cc: Adrien Grassein Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-4-marex@denx.de drivers/gpu/drm/bridge/lontium-lt8912b.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 4af48f1d1d0a6f050ffcfe83e939c9455d51267f Author: Marek Vasut Date: Tue May 24 03:05:14 2022 +0200 drm/bridge: icn6211: Convert to drm_of_get_data_lanes_count_ep Convert driver to use this new helper to standardize OF "data-lanes" parsing. Reviewed-by: Andrzej Hajda Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Jagan Teki Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-3-marex@denx.de drivers/gpu/drm/bridge/chipone-icn6211.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 930e7cba1190a3251fcb01c8523ea9aed89d9a51 Author: Marek Vasut Date: Tue May 24 03:05:13 2022 +0200 drm/bridge: anx7625: Convert to drm_of_get_data_lanes_count Convert driver to use this new helper to standardize OF "data-lanes" parsing. Reviewed-by: Andrzej Hajda Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg Cc: Xin Ji To: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-2-marex@denx.de drivers/gpu/drm/bridge/analogix/anx7625.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fc801750b197d0f00c09e01e59a7dcd240fddcb5 Author: Marek Vasut Date: Tue May 24 03:05:12 2022 +0200 drm: of: Add drm_of_get_data_lanes_count and drm_of_get_data_lanes_ep Add helper function to count and sanitize DT "data-lanes" property and return either error or the data-lanes count. This is useful for both DSI and (e)DP "data-lanes" property. The later version of the function is an extra wrapper which handles the endpoint look up by regs, that's what majority of the drivers duplicate too, but not all of them. Reviewed-by: Andrzej Hajda Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-1-marex@denx.de drivers/gpu/drm/drm_of.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ include/drm/drm_of.h | 20 ++++++++++++++++ 2 files changed, 81 insertions(+) commit de9257ae1d3b0d8856955045d194e3ff4f278394 Author: Daniel Watson Date: Sat Jun 11 20:07:34 2022 -0700 staging: rtl8723bs: uninitialize static variable ensure static variable is not initialized, per checkpatch Signed-off-by: Daniel Watson Link: https://lore.kernel.org/r/20220612030734.31469-1-ozzloy@challenge-bot.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac663ae22f0277cfb52563594931160bbbb6ad60 Author: Nam Cao Date: Sun Jun 12 03:05:14 2022 +0200 staging: r8188eu: replace FIELD_OFFSET with offsetof This driver defines FIELD_OFFSET which does the same as offsetof. Replace this macro with offsetof. Signed-off-by: Nam Cao Link: https://lore.kernel.org/r/9443ef83f565eafe1e4f348412772d4ab966093a.1654994517.git.namcaov@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 ++-- drivers/staging/r8188eu/include/basic_types.h | 2 -- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) commit 0dde9a46a2cfa58c69b5667272c1a6edc8144505 Author: Neal Liu Date: Mon May 23 11:01:34 2022 +0800 dt-bindings: usb: add documentation for aspeed udc Add device tree binding documentation for the Aspeed USB2.0 Device Controller. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neal Liu Link: https://lore.kernel.org/r/20220523030134.2977116-4-neal_liu@aspeedtech.com Signed-off-by: Greg Kroah-Hartman .../bindings/usb/aspeed,ast2600-udc.yaml | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 2cee50bf459051d1b41d0deee25e930a788cb94e Author: Neal Liu Date: Mon May 23 11:01:33 2022 +0800 ARM: dts: aspeed: Add USB2.0 device controller node Add USB2.0 device controller(udc) node to device tree for AST2600. Acked-by: Krzysztof Kozlowski Signed-off-by: Neal Liu Link: https://lore.kernel.org/r/20220523030134.2977116-3-neal_liu@aspeedtech.com Signed-off-by: Greg Kroah-Hartman arch/arm/boot/dts/aspeed-g6.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 055276c1320564b0192b3af323b8cc67f9b665e1 Author: Neal Liu Date: Mon May 23 11:01:32 2022 +0800 usb: gadget: add Aspeed ast2600 udc driver Aspeed udc is compliant with USB2.0, supports USB High Speed and Full Speed, backward compatible with USB1.1. Supports independent DMA channel for each generic endpoint. Supports 32/256 stages descriptor mode for all generic endpoints. This driver supports full functionality including single/multiple stages descriptor mode, and exposes 1 UDC gadget driver. Signed-off-by: Neal Liu Link: https://lore.kernel.org/r/20220523030134.2977116-2-neal_liu@aspeedtech.com Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 7 + drivers/usb/gadget/udc/Kconfig | 13 + drivers/usb/gadget/udc/Makefile | 1 + drivers/usb/gadget/udc/aspeed_udc.c | 1596 +++++++++++++++++++++++++++++++++++ 4 files changed, 1617 insertions(+) commit e146caf303493c4f2458173d7f1598b76a9b1396 Author: Mathias Nyman Date: Fri May 6 19:18:07 2022 +0300 usb: Avoid extra usb SET_SEL requests when enabling link power management The host needs to tell the device the exit latencies using the SET_SEL request before device initiated link powermanagement can be enabled. The exit latency values do not change after enumeration, it's enough to set them once. So do like Windows 10 and issue the SET_SEL request once just before setting the configuration. This is also the sequence described in USB 3.2 specs "9.1.2 Bus enumeration". SET_SEL is issued once before the Set Configuration request, and won't be cleared by the Set Configuration, Set Interface or ClearFeature (STALL) requests. Only warm reset, hot reset, set Address 0 clears the exit latencies. See USB 3.2 section 9.4.14 Table 9-10 Device parameters and events Add udev->lpm_devinit_allow, and set it if SET_SEL was successful. If not set, then don't try to enable device initiated LPM We used to issue a SET_SEL request every time lpm is enabled for either U1 or U2 link states, meaning a SET_SEL was issued twice after every Set Configuration and Set Interface requests, easily accumulating to over 15 SET_SEL requets during a USB3 webcam enumeration. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20220506161807.3369439-1-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 60 ++++++++++++++++++-------------------------------- include/linux/usb.h | 2 ++ 2 files changed, 23 insertions(+), 39 deletions(-) commit 3085d1bd47f2bfdd0b34b8399011f2ed6292fe8c Author: Kushagra Verma Date: Fri May 20 17:40:47 2022 +0530 usb: dwc3: Fix typos in Kconfig Fixes the following 2 typos in Kconfig: 1. is -> as 2. progammed -> programmed Signed-off-by: Kushagra Verma Link: https://lore.kernel.org/r/HK0PR01MB280151A3B2CF6C3E4DC2F9CAF8D39@HK0PR01MB2801.apcprd01.prod.exchangelabs.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d1b39dd5819a0ea5e09fb2c7f7bcb2e127cdbd89 Author: Kushagra Verma Date: Fri May 20 17:40:46 2022 +0530 usb: dwc3: Fix a repeated word checkpatch warning Fixes a repeated word checkpatch warning in ep0.c by removing the repeated 'only' word. Signed-off-by: Kushagra Verma Link: https://lore.kernel.org/r/HK0PR01MB2801996E815208393170010FF8D39@HK0PR01MB2801.apcprd01.prod.exchangelabs.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/ep0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca80ca61863f70df1eb055bcccb302013d2d6308 Author: Kushagra Verma Date: Fri May 20 17:40:45 2022 +0530 usb: dwc3: Fix bare use of unsigned checkpatch warning Fixes the bare use of unsigned warning from checkpatch.pl in core.c by changing 'unsigned' to 'unsigned int'. Signed-off-by: Kushagra Verma Link: https://lore.kernel.org/r/HK0PR01MB280160BCA168FA9FE159F02AF8D39@HK0PR01MB2801.apcprd01.prod.exchangelabs.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8203d26905eee083fbe76ec449f32953aa729193 Author: Heikki Krogerus Date: Mon May 2 16:20:58 2022 +0300 usb: typec: tcpm: Register USB Power Delivery Capabilities Register both the port and partner USB Power Delivery Capabilities so they are exposed to the user space. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20220502132058.86236-4-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpm.c | 142 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 141 insertions(+), 1 deletion(-) commit a7cff92f0635c794e2198a69a7ff4ecfe0decab9 Author: Heikki Krogerus Date: Mon May 2 16:20:57 2022 +0300 usb: typec: USB Power Delivery helpers for ports and partners All the USB Type-C Connector Class devices are protected, so the drivers can not directly access them. This will adds a few helpers that can be used to link the ports and partners to the correct USB Power Delivery objects. For ports a new optional sysfs attribute file is also added that can be used to select the USB Power Delivery capabilities that the port will advertise to the partner. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20220502132058.86236-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-class-typec | 8 ++ drivers/usb/typec/class.c | 149 ++++++++++++++++++++++++++++ drivers/usb/typec/class.h | 4 + include/linux/usb/typec.h | 13 +++ 4 files changed, 174 insertions(+) commit 662a60102c122e44fdaf5c826f7f415eb57d48ad Author: Heikki Krogerus Date: Mon May 2 16:20:56 2022 +0300 usb: typec: Separate USB Power Delivery from USB Type-C Introducing a small device class for USB Power Delivery. The idea with it is that we do not mix any more USB Power Delivery information into the USB Type-C connectors only. This separation will make it possible to register USB Power Delivery devices also from other places, for example from USB Type-C Bridges (see USB Type-C Bridge Specification). The device class will not always deal with only the messages and objects that were negotiated with the partner, but instead messages and objects that can be used in the negotiation. That allows the USB PD devices to be shared and reconfigured. The ports can decide which objects are to be advertised to the partner before the contract is negotiated. It is also possible to allow the user space to make that decision if needed. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20220502132058.86236-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman .../ABI/testing/sysfs-class-usb_power_delivery | 240 +++++++ drivers/usb/typec/Makefile | 2 +- drivers/usb/typec/pd.c | 708 +++++++++++++++++++++ drivers/usb/typec/pd.h | 30 + include/linux/usb/pd.h | 38 ++ include/linux/usb/typec.h | 10 + 6 files changed, 1027 insertions(+), 1 deletion(-) commit f061f43d7418cb62b8d073e221ec75d3f5b89e17 Author: Michael Grzeschik Date: Tue Jun 7 13:45:22 2022 +0200 usb: hub: port: add sysfs entry to switch port power In some cases the port of an hub needs to be disabled or switched off and on again. E.g. when the connected device needs to be re-enumerated. Or it needs to be explicitly disabled while the rest of the usb tree stays working. For this purpose this patch adds an sysfs switch to enable/disable the port on any hub. In the case the hub is supporting power switching, the power line will be disabled to the connected device. When the port gets disabled, the associated device gets disconnected and removed from the logical usb tree. No further device will be enumerated on that port until the port gets enabled again. Reviewed-by: Alan Stern Signed-off-by: Michael Grzeschik Link: https://lore.kernel.org/r/20220607114522.3359148-1-m.grzeschik@pengutronix.de Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-bus-usb | 11 +++++ drivers/usb/core/hub.c | 39 ++++++++-------- drivers/usb/core/hub.h | 3 ++ drivers/usb/core/port.c | 83 +++++++++++++++++++++++++++++++++ 4 files changed, 117 insertions(+), 19 deletions(-) commit 71b81f1cac29297769ec81fe29a3fcc40bc2c31c Author: Baruch Siach Date: Mon May 30 07:23:33 2022 +0300 ARM: imx6ul: drop the adc num-channels property The mainline vf610_adc driver never used this property. Signed-off-by: Baruch Siach Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-kontron-n6x1x-s.dtsi | 1 - arch/arm/boot/dts/imx6ul-phytec-segin.dtsi | 5 ----- arch/arm/boot/dts/imx6ul.dtsi | 1 - arch/arm/boot/dts/imx6ull-colibri.dtsi | 1 - 4 files changed, 8 deletions(-) commit 1ee723ea39ba408f94c59bc764969009b4b784eb Author: Krzysztof Kozlowski Date: Thu May 26 22:42:57 2022 +0200 ARM: dts: fsl: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo arch/arm/boot/dts/imx51-ts4800.dts | 2 +- arch/arm/boot/dts/imx6dl-plym2m.dts | 2 +- arch/arm/boot/dts/imx6dl-prtvt7.dts | 2 +- arch/arm/boot/dts/imx6dl-victgo.dts | 2 +- arch/arm/boot/dts/imx6q-bosch-acc.dts | 2 +- arch/arm/boot/dts/imx6qdl-skov-cpu-revc.dtsi | 4 ++-- arch/arm/boot/dts/imx6ul-tqma6ul2l.dtsi | 2 +- arch/arm/boot/dts/imx6ull-tqma6ull2.dtsi | 2 +- arch/arm/boot/dts/imx6ull-tqma6ull2l.dtsi | 2 +- arch/arm/boot/dts/imx7d-sdb.dts | 2 +- arch/arm/boot/dts/imxrt1050.dtsi | 4 ++-- arch/arm/boot/dts/ls1021a-iot.dts | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) commit a39ad9443b67de7140ed7079a525aa10dd370e0b Author: Juerg Haefliger Date: Mon May 23 08:22:52 2022 +0200 ARM: imx: Kconfig: Fix indentation The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules. While at it, replace separator tabs with whitespaces. Signed-off-by: Juerg Haefliger Signed-off-by: Shawn Guo arch/arm/mach-imx/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7d188c521d9ec3650136e9b9c81c61b22a544ab3 Author: Douglas Anderson Date: Sat Jun 11 09:55:04 2022 -0700 drm: Fix htmldocs indentation warning w/ DP AUX power requirements Two blank lines are needed to make the rst valid. Fixes: 69ef4a192bba ("drm: Document the power requirements for DP AUX transfers") Reported-by: Stephen Rothwell Signed-off-by: Douglas Anderson Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220611095445.1.I534072d346b1ebbf0db565b714de9b65cbb24651@changeid include/drm/display/drm_dp_helper.h | 2 ++ 1 file changed, 2 insertions(+) commit d5e9aeda81616150532b24277da2498ee52a2045 Merge: fe92833524e3 89eda98428ce Author: Alexei Starovoitov Date: Sat Jun 11 14:25:35 2022 -0700 Merge branch 'Optimize performance of update hash-map when free is zero' Feng zhou says: ==================== From: Feng Zhou We encountered bad case on big system with 96 CPUs that alloc_htab_elem() would last for 1ms. The reason is that after the prealloc hashtab has no free elems, when trying to update, it will still grab spin_locks of all cpus. If there are multiple update users, the competition is very serious. 0001: Use head->first to check whether the free list is empty or not before taking the lock. 0002: Add benchmark to reproduce this worst case. Changelog: v5->v6: Addressed comments from Alexei Starovoitov. - Adjust the commit log. some details in here: https://lore.kernel.org/all/20220608021050.47279-1-zhoufeng.zf@bytedance.com/ v4->v5: Addressed comments from Alexei Starovoitov. - Use head->first. - Use cpu+max_entries. some details in here: https://lore.kernel.org/bpf/20220601084149.13097-1-zhoufeng.zf@bytedance.com/ v3->v4: Addressed comments from Daniel Borkmann. - Use READ_ONCE/WRITE_ONCE. some details in here: https://lore.kernel.org/all/20220530091340.53443-1-zhoufeng.zf@bytedance.com/ v2->v3: Addressed comments from Alexei Starovoitov, Andrii Nakryiko. - Adjust the way the benchmark is tested. - Adjust the code format. some details in here: https://lore.kernel.org/all/20220524075306.32306-1-zhoufeng.zf@bytedance.com/T/ v1->v2: Addressed comments from Alexei Starovoitov. - add a benchmark to reproduce the issue. - Adjust the code format that avoid adding indent. some details in here: https://lore.kernel.org/all/877ac441-045b-1844-6938-fcaee5eee7f2@bytedance.com/T/ ==================== Signed-off-by: Alexei Starovoitov commit 89eda98428ce10f8df110d60aa934aa5c5170686 Author: Feng Zhou Date: Fri Jun 10 10:33:08 2022 +0800 selftest/bpf/benchs: Add bpf_map benchmark Add benchmark for hash_map to reproduce the worst case that non-stop update when map's free is zero. Just like this: ./run_bench_bpf_hashmap_full_update.sh Setting up benchmark 'bpf-hashmap-ful-update'... Benchmark 'bpf-hashmap-ful-update' started. 1:hash_map_full_perf 555830 events per sec ... Signed-off-by: Feng Zhou Link: https://lore.kernel.org/r/20220610023308.93798-3-zhoufeng.zf@bytedance.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/Makefile | 4 +- tools/testing/selftests/bpf/bench.c | 2 + .../bpf/benchs/bench_bpf_hashmap_full_update.c | 96 ++++++++++++++++++++++ .../benchs/run_bench_bpf_hashmap_full_update.sh | 11 +++ .../bpf/progs/bpf_hashmap_full_update_bench.c | 40 +++++++++ 5 files changed, 152 insertions(+), 1 deletion(-) commit 54a9c3a42d92d2b0d4e0f64214ebbbfcf7fbfda8 Author: Feng Zhou Date: Fri Jun 10 10:33:07 2022 +0800 bpf: avoid grabbing spin_locks of all cpus when no free elems This patch use head->first in pcpu_freelist_head to check freelist having free or not. If having, grab spin_lock, or check next cpu's freelist. Before patch: hash_map performance ./map_perf_test 1 0:hash_map_perf pre-alloc 1043397 events per sec ... The average of the test results is around 1050000 events per sec. hash_map the worst: no free ./run_bench_bpf_hashmap_full_update.sh Setting up benchmark 'bpf-hashmap-ful-update'... Benchmark 'bpf-hashmap-ful-update' started. 1:hash_map_full_perf 15687 events per sec ... The average of the test results is around 16000 events per sec. ftrace trace: 0) | htab_map_update_elem() { 0) | __pcpu_freelist_pop() { 0) | _raw_spin_lock() 0) | _raw_spin_unlock() 0) | ... 0) + 25.188 us | } 0) + 28.439 us | } The test machine is 16C, trying to get spin_lock 17 times, in addition to 16c, there is an extralist. after patch: hash_map performance ./map_perf_test 1 0:hash_map_perf pre-alloc 1053298 events per sec ... The average of the test results is around 1050000 events per sec. hash_map worst: no free ./run_bench_bpf_hashmap_full_update.sh Setting up benchmark 'bpf-hashmap-ful-update'... Benchmark 'bpf-hashmap-ful-update' started. 1:hash_map_full_perf 555830 events per sec ... The average of the test results is around 550000 events per sec. ftrace trace: 0) | htab_map_update_elem() { 0) | alloc_htab_elem() { 0) 0.586 us | __pcpu_freelist_pop(); 0) 0.945 us | } 0) 8.669 us | } It can be seen that after adding this patch, the map performance is almost not degraded, and when free=0, first check head->first instead of directly acquiring spin_lock. Co-developed-by: Chengming Zhou Signed-off-by: Chengming Zhou Signed-off-by: Feng Zhou Link: https://lore.kernel.org/r/20220610023308.93798-2-zhoufeng.zf@bytedance.com Signed-off-by: Alexei Starovoitov kernel/bpf/percpu_freelist.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit e909b43bddc0ff5db59e633398e35a25b9b2f0c1 Merge: a9cf02c6a671 e0e0cc54000e Author: Marc Kleine-Budde Date: Sat Jun 11 22:46:10 2022 +0200 Merge branch 'can-etas_es58x-cleanups-on-struct-es58x_device' Vincent Mailhol says: ==================== This series contains two clean up patches toward struct es58x_device of the CAN etas_es58x driver. The first one removes the field rx_max_packet_size which value can actually be retrieved from the helper function usb_maxpacket(). The second one fixes the signedness of the TX and RX pipes. No functional changes. ==================== Link: https://lore.kernel.org/all/20220611162037.1507-1-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde commit e0e0cc54000e6f36a38c70778feb9d753cfb87e2 Author: Vincent Mailhol Date: Sun Jun 12 01:20:37 2022 +0900 can: etas_es58x: fix signedness of USB RX and TX pipes USB pipes are meant to be unsigned int (c.f. [1]). However, fields rx_pipe and tx_pipe of struct es58x_device are both signed integers. Change the type of those two fields from int to unsigned int. [1] https://elixir.bootlin.com/linux/v5.18/source/include/linux/usb.h#L1571 Link: https://lore.kernel.org/all/20220611162037.1507-3-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/etas_es58x/es58x_core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 173d349ba0b785305fde42a67ce66a63417e57da Author: Vincent Mailhol Date: Sun Jun 12 01:20:36 2022 +0900 can: etas_es58x: replace es58x_device::rx_max_packet_size by usb_maxpacket() The field rx_max_packet_size of struct es58x_device in nothing else than usb_endpoint_descriptor::wMaxPacketSize and can be easily retrieved using usb_maxpacket(). Also, rx_max_packet_size being used a single time, there is no merit to cache it locally. Remove es58x_device::rx_max_packet_size and rely on usb_maxpacket() instead. Link: https://lore.kernel.org/all/20220611162037.1507-2-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/etas_es58x/es58x_core.c | 5 ++--- drivers/net/can/usb/etas_es58x/es58x_core.h | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) commit a9cf02c6a671bc84a348cd5934627ff68d8d8d35 Author: Max Staudt Date: Sat Jun 11 19:11:55 2022 +0200 can: Break loopback loop on loopback documentation There are two sections called "Local Loopback of Sent Frames". One was meant to link to the other, but pointed at itself instead. Link: https://lore.kernel.org/all/20220611171155.9090-1-max@enpas.org Fixes: 7d5977394515 ("can: migrate documentation to restructured text") Signed-off-by: Max Staudt Signed-off-by: Marc Kleine-Budde Documentation/networking/can.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcba483e82462830dd368951c0df03a95676f34d Author: Sean Christopherson Date: Wed Jun 1 11:01:58 2022 -0700 KVM: selftests: Sanity check input to ioctls() at build time Add a static assert to the KVM/VM/vCPU ioctl() helpers to verify that the size of the argument provided matches the expected size of the IOCTL. Because ioctl() ultimately takes a "void *", it's all too easy to pass in garbage and not detect the error until runtime. E.g. while working on a CPUID rework, selftests happily compiled when vcpu_set_cpuid() unintentionally passed the cpuid() function as the parameter to ioctl() (a local "cpuid" parameter was removed, but its use was not replaced with "vcpu->cpuid" as intended). Tweak a variety of benign issues that aren't compatible with the sanity check, e.g. passing a non-pointer for ioctls(). Note, static_assert() requires a string on older versions of GCC. Feed it an empty string to make the compiler happy. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 59 ++++++++++++++++------ .../testing/selftests/kvm/lib/aarch64/processor.c | 2 +- tools/testing/selftests/kvm/lib/guest_modes.c | 2 +- tools/testing/selftests/kvm/lib/kvm_util.c | 29 +---------- .../selftests/kvm/lib/x86_64/perf_test_util.c | 6 +-- tools/testing/selftests/kvm/s390x/resets.c | 6 +-- .../selftests/kvm/x86_64/mmio_warning_test.c | 2 +- .../selftests/kvm/x86_64/pmu_event_filter_test.c | 2 +- .../testing/selftests/kvm/x86_64/xen_shinfo_test.c | 6 +-- 9 files changed, 58 insertions(+), 56 deletions(-) commit 5321270b2362a85a74c3d52c00c3c6730a228f0c Author: Sean Christopherson Date: Thu Jun 9 17:03:19 2022 -0700 KVM: selftests: Use TAP-friendly ksft_exit_skip() in __TEST_REQUIRE Use the TAP-friendly ksft_exit_skip() instead of KVM's custom print_skip() when skipping a test via __TEST_REQUIRE. KVM's "skipping test" has no known benefit, whereas some setups rely on TAP output. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/test_util.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 7ed397d107d461a53e350e5025d68ec3c4a8934d Author: Sean Christopherson Date: Fri May 27 16:24:02 2022 -0700 KVM: selftests: Add TEST_REQUIRE macros to reduce skipping copy+paste Add TEST_REQUIRE() and __TEST_REQUIRE() to replace the myriad open coded instances of selftests exiting with KSFT_SKIP after printing an informational message. In addition to reducing the amount of boilerplate code in selftests, the UPPERCASE macro names make it easier to visually identify a test's requirements. Convert usage that erroneously uses something other than print_skip() and/or "exits" with '0' or some other non-KSFT_SKIP value. Intentionally drop a kvm_vm_free() in aarch64/debug-exceptions.c as part of the conversion. All memory and file descriptors are freed on process exit, so the explicit free is superfluous. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/arch_timer.c | 11 +++------- .../selftests/kvm/aarch64/debug-exceptions.c | 7 ++---- tools/testing/selftests/kvm/aarch64/get-reg-list.c | 10 +++++---- tools/testing/selftests/kvm/aarch64/psci_test.c | 5 +---- .../selftests/kvm/aarch64/vcpu_width_config.c | 5 +---- tools/testing/selftests/kvm/aarch64/vgic_init.c | 10 +++------ tools/testing/selftests/kvm/aarch64/vgic_irq.c | 5 +---- .../selftests/kvm/access_tracking_perf_test.c | 11 +++------- tools/testing/selftests/kvm/include/test_util.h | 9 ++++++++ .../testing/selftests/kvm/kvm_binary_stats_test.c | 5 +---- tools/testing/selftests/kvm/kvm_create_max_vcpus.c | 6 ++---- tools/testing/selftests/kvm/lib/kvm_util.c | 10 ++------- tools/testing/selftests/kvm/lib/x86_64/processor.c | 8 +++---- tools/testing/selftests/kvm/lib/x86_64/svm.c | 5 +---- tools/testing/selftests/kvm/lib/x86_64/vmx.c | 5 +---- tools/testing/selftests/kvm/rseq_test.c | 13 +++++------ tools/testing/selftests/kvm/s390x/memop.c | 11 ++++------ tools/testing/selftests/kvm/s390x/sync_regs_test.c | 5 ++--- tools/testing/selftests/kvm/steal_time.c | 5 +---- .../selftests/kvm/system_counter_offset_test.c | 8 +++---- tools/testing/selftests/kvm/x86_64/amx_test.c | 23 +++++++------------- .../selftests/kvm/x86_64/cr4_cpuid_sync_test.c | 5 +---- tools/testing/selftests/kvm/x86_64/debug_regs.c | 5 +---- .../selftests/kvm/x86_64/emulator_error_test.c | 5 +---- tools/testing/selftests/kvm/x86_64/evmcs_test.c | 9 +++----- .../selftests/kvm/x86_64/fix_hypercall_test.c | 5 +---- .../selftests/kvm/x86_64/get_msr_index_features.c | 5 +---- tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | 5 +---- .../testing/selftests/kvm/x86_64/hyperv_svm_test.c | 6 ++---- .../testing/selftests/kvm/x86_64/kvm_clock_test.c | 6 +----- tools/testing/selftests/kvm/x86_64/kvm_pv_test.c | 5 +---- .../selftests/kvm/x86_64/mmio_warning_test.c | 10 ++------- tools/testing/selftests/kvm/x86_64/mmu_role_test.c | 10 ++------- .../selftests/kvm/x86_64/platform_info_test.c | 7 +----- .../selftests/kvm/x86_64/pmu_event_filter_test.c | 25 +++++----------------- .../testing/selftests/kvm/x86_64/set_boot_cpu_id.c | 5 +---- .../selftests/kvm/x86_64/sev_migrate_tests.c | 19 ++++++---------- .../testing/selftests/kvm/x86_64/sync_regs_test.c | 10 ++------- .../selftests/kvm/x86_64/triple_fault_event_test.c | 10 ++------- .../selftests/kvm/x86_64/tsc_scaling_sync.c | 5 +---- .../vmx_exception_with_invalid_guest_state.c | 6 ++---- .../kvm/x86_64/vmx_nested_tsc_scaling_test.c | 10 +-------- .../selftests/kvm/x86_64/vmx_pmu_caps_test.c | 23 +++++++------------- .../kvm/x86_64/vmx_preemption_timer_test.c | 5 +---- .../kvm/x86_64/vmx_set_nested_state_test.c | 5 +---- .../testing/selftests/kvm/x86_64/xen_shinfo_test.c | 5 +---- .../testing/selftests/kvm/x86_64/xen_vmcall_test.c | 8 +++---- tools/testing/selftests/kvm/x86_64/xss_msr_test.c | 13 ++++------- 48 files changed, 119 insertions(+), 290 deletions(-) commit 3ea9b809650b4eda5d4ae18ed7bb080e499af154 Author: Sean Christopherson Date: Fri May 27 15:13:03 2022 -0700 KVM: selftests: Add kvm_has_cap() to provide syntactic sugar Add kvm_has_cap() to wrap kvm_check_cap() and return a bool for the use cases where the caller only wants check if a capability is supported, i.e. doesn't care about the value beyond whether or not it's non-zero. The "check" terminology is somewhat ambiguous as the non-boolean return suggests that '0' might mean "success", i.e. suggests that the ioctl uses the 0/-errno pattern. Provide a wrapper instead of trying to find a new name for the raw helper; the "check" terminology is derived from the name of the ioctl, so using e.g. "get" isn't a clear win. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/get-reg-list.c | 2 +- tools/testing/selftests/kvm/aarch64/vcpu_width_config.c | 2 +- tools/testing/selftests/kvm/dirty_log_test.c | 4 ++-- tools/testing/selftests/kvm/include/kvm_util_base.h | 5 +++++ tools/testing/selftests/kvm/kvm_binary_stats_test.c | 2 +- tools/testing/selftests/kvm/lib/kvm_util.c | 4 ++-- tools/testing/selftests/kvm/lib/s390x/diag318_test_handler.c | 2 +- tools/testing/selftests/kvm/x86_64/debug_regs.c | 2 +- tools/testing/selftests/kvm/x86_64/emulator_error_test.c | 2 +- tools/testing/selftests/kvm/x86_64/evmcs_test.c | 4 ++-- tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | 6 +++--- tools/testing/selftests/kvm/x86_64/kvm_pv_test.c | 2 +- tools/testing/selftests/kvm/x86_64/set_boot_cpu_id.c | 2 +- tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c | 4 ++-- tools/testing/selftests/kvm/x86_64/triple_fault_event_test.c | 2 +- tools/testing/selftests/kvm/x86_64/tsc_scaling_sync.c | 2 +- tools/testing/selftests/kvm/x86_64/vmx_nested_tsc_scaling_test.c | 2 +- tools/testing/selftests/kvm/x86_64/vmx_preemption_timer_test.c | 2 +- tools/testing/selftests/kvm/x86_64/vmx_set_nested_state_test.c | 2 +- 19 files changed, 29 insertions(+), 24 deletions(-) commit d8ba3f14a50e4bc9745bb8f66a599c6be8ad0cda Author: Sean Christopherson Date: Fri May 27 15:09:52 2022 -0700 KVM: selftests: Return an 'unsigned int' from kvm_check_cap() Return an 'unsigned int' instead of a signed 'int' from kvm_check_cap(), to make it more obvious that kvm_check_cap() can never return a negative value due to its assertion that the return is ">= 0". Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/kvm_util_base.h | 2 +- tools/testing/selftests/kvm/kvm_binary_stats_test.c | 2 +- tools/testing/selftests/kvm/lib/kvm_util.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 032604529827cf889e470dc9b3ad18b2a40311b3 Author: Sean Christopherson Date: Tue May 3 15:26:02 2022 -0700 KVM: selftests: Drop DEFAULT_GUEST_PHY_PAGES, open code the magic number Remove DEFAULT_GUEST_PHY_PAGES and open code the magic number (with a comment) in vm_nr_pages_required(). Exposing DEFAULT_GUEST_PHY_PAGES to tests was a symptom of the VM creation APIs not cleanly supporting tests that create runnable vCPUs, but can't do so immediately. Now that tests don't have to manually compute the amount of memory needed for basic operation, make it harder for tests to do things that should be handled by the framework, i.e. force developers to improve the framework instead of hacking around flaws in individual tests. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/kvm_util_base.h | 1 - tools/testing/selftests/kvm/lib/kvm_util.c | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) commit 38081d28835c84e73ff414f23663d57946cc2234 Author: Sean Christopherson Date: Tue May 3 14:48:59 2022 -0700 KVM: selftests: Trust that MAXPHYADDR > memslot0 in vmx_apic_access_test Use vm->max_gfn to compute the highest gpa in vmx_apic_access_test, and blindly trust that the highest gfn/gpa will be well above the memory carved out for memslot0. The existing check is beyond paranoid; KVM doesn't support CPUs with host.MAXPHYADDR < 32, and the selftests are all kinds of hosed if memslot0 overlaps the local xAPIC, which resides above "lower" (below 4gb) DRAM. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/vmx_apic_access_test.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 6e1d13bf3815d6058620dd72135be292d9f44bc9 Author: Sean Christopherson Date: Tue May 3 09:52:48 2022 -0700 KVM: selftests: Move per-VM/per-vCPU nr pages calculation to __vm_create() Handle all memslot0 size adjustments in __vm_create(). Currently, the adjustments reside in __vm_create_with_vcpus(), which means tests that call vm_create() or __vm_create() directly are left to their own devices. Some tests just pass DEFAULT_GUEST_PHY_PAGES and don't bother with any adjustments, while others mimic the per-vCPU calculations. For vm_create(), and thus __vm_create(), take the number of vCPUs that will be runnable to calculate that number of per-vCPU pages needed for memslot0. To give readers a hint that neither vm_create() nor __vm_create() create vCPUs, name the parameter @nr_runnable_vcpus instead of @nr_vcpus. That also gives readers a hint as to why tests that create larger numbers of vCPUs but never actually run those vCPUs can skip straight to the vm_create_barebones() variant. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/psci_test.c | 2 +- tools/testing/selftests/kvm/aarch64/vgic_init.c | 4 +- tools/testing/selftests/kvm/dirty_log_test.c | 3 +- .../testing/selftests/kvm/hardware_disable_test.c | 2 +- .../testing/selftests/kvm/include/kvm_util_base.h | 9 ++-- tools/testing/selftests/kvm/lib/kvm_util.c | 57 ++++++++++++++-------- tools/testing/selftests/kvm/s390x/resets.c | 2 +- .../selftests/kvm/x86_64/pmu_event_filter_test.c | 2 +- .../testing/selftests/kvm/x86_64/set_boot_cpu_id.c | 5 +- .../selftests/kvm/x86_64/tsc_scaling_sync.c | 2 +- 10 files changed, 53 insertions(+), 35 deletions(-) commit acaf50ad6dcb69a9857ef6c9a42100f6270f5f03 Author: Sean Christopherson Date: Mon May 2 17:39:47 2022 -0700 KVM: selftests: Drop @num_percpu_pages from __vm_create_with_vcpus() Drop @num_percpu_pages from __vm_create_with_vcpus(), all callers pass '0' and there's unlikely to be a test that allocates just enough memory that it needs a per-CPU allocation, but not so much that it won't just do its own memory management. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/kvm_util_base.h | 4 ++-- tools/testing/selftests/kvm/kvm_page_table_test.c | 2 +- tools/testing/selftests/kvm/lib/kvm_util.c | 7 +++---- tools/testing/selftests/kvm/lib/perf_test_util.c | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) commit 3222d0264fb60a9aa359a58a059a7fb0d2b3c467 Author: Sean Christopherson Date: Mon May 2 17:25:17 2022 -0700 KVM: selftests: Drop @slot0_mem_pages from __vm_create_with_vcpus() All callers of __vm_create_with_vcpus() pass DEFAULT_GUEST_PHY_PAGES for @slot_mem_pages; drop the param and just hardcode the "default" as the base number of pages for slot0. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/kvm_util_base.h | 9 +++------ tools/testing/selftests/kvm/kvm_page_table_test.c | 5 ++--- tools/testing/selftests/kvm/lib/kvm_util.c | 21 +++++++-------------- tools/testing/selftests/kvm/lib/perf_test_util.c | 5 ++--- 4 files changed, 14 insertions(+), 26 deletions(-) commit 68c1b3e910c0451ed9a51093c603cc4898d643ce Author: Sean Christopherson Date: Wed Feb 16 16:51:20 2022 -0800 KVM: selftests: Open code and drop 'struct kvm_vm' accessors Drop a variety of 'struct kvm_vm' accessors that wrap a single variable now that tests can simply reference the variable directly. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/dirty_log_perf_test.c | 2 +- tools/testing/selftests/kvm/dirty_log_test.c | 9 ++++---- .../testing/selftests/kvm/include/kvm_util_base.h | 6 ------ tools/testing/selftests/kvm/kvm_page_table_test.c | 2 +- tools/testing/selftests/kvm/lib/kvm_util.c | 25 ---------------------- tools/testing/selftests/kvm/lib/perf_test_util.c | 2 +- .../testing/selftests/kvm/max_guest_memory_test.c | 11 +++++----- .../kvm/memslot_modification_stress_test.c | 2 +- tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | 2 +- 9 files changed, 14 insertions(+), 47 deletions(-) commit 96a96e1ad06f8fc380a69954f5511e950a5eeb23 Author: Sean Christopherson Date: Wed Feb 16 16:48:13 2022 -0800 KVM: selftests: Remove vcpu_state() helper Drop vcpu_state() now that all tests reference vcpu->run directly. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/kvm_util_base.h | 1 - tools/testing/selftests/kvm/lib/kvm_util.c | 19 +------------------ 2 files changed, 1 insertion(+), 19 deletions(-) commit fce542992b5d8baaf6f7a4d61a3273de3a2ff10b Author: Sean Christopherson Date: Wed Feb 16 16:46:46 2022 -0800 KVM: selftests: Drop vcpu_get(), rename vcpu_find() => vcpu_exists() Drop vcpu_get() and rename vcpu_find() to vcpu_exists() to make it that much harder for a test to give meaning to a vCPU ID. I.e. force tests to capture a vCPU when the vCPU is created. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 2 -- tools/testing/selftests/kvm/lib/kvm_util.c | 34 +++++++++------------- 2 files changed, 13 insertions(+), 23 deletions(-) commit 768e9a61856b75de08f5efa5813bb3e7f16ec271 Author: Sean Christopherson Date: Thu Jun 2 13:41:33 2022 -0700 KVM: selftests: Purge vm+vcpu_id == vcpu silliness Take a vCPU directly instead of a VM+vcpu pair in all vCPU-scoped helpers and ioctls. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/arch_timer.c | 10 +- .../selftests/kvm/aarch64/debug-exceptions.c | 8 +- tools/testing/selftests/kvm/aarch64/get-reg-list.c | 16 +- tools/testing/selftests/kvm/aarch64/hypercalls.c | 18 +- tools/testing/selftests/kvm/aarch64/psci_test.c | 16 +- .../selftests/kvm/aarch64/vcpu_width_config.c | 8 +- tools/testing/selftests/kvm/aarch64/vgic_init.c | 2 +- tools/testing/selftests/kvm/aarch64/vgic_irq.c | 8 +- .../selftests/kvm/access_tracking_perf_test.c | 4 +- tools/testing/selftests/kvm/demand_paging_test.c | 5 +- tools/testing/selftests/kvm/dirty_log_perf_test.c | 7 +- tools/testing/selftests/kvm/dirty_log_test.c | 10 +- .../testing/selftests/kvm/hardware_disable_test.c | 2 +- .../selftests/kvm/include/aarch64/processor.h | 4 +- .../testing/selftests/kvm/include/kvm_util_base.h | 216 ++++++++++----------- tools/testing/selftests/kvm/include/ucall_common.h | 2 +- tools/testing/selftests/kvm/include/x86_64/evmcs.h | 2 +- .../selftests/kvm/include/x86_64/processor.h | 77 ++++---- .../testing/selftests/kvm/kvm_binary_stats_test.c | 2 +- tools/testing/selftests/kvm/kvm_page_table_test.c | 7 +- .../testing/selftests/kvm/lib/aarch64/processor.c | 47 ++--- tools/testing/selftests/kvm/lib/aarch64/ucall.c | 8 +- tools/testing/selftests/kvm/lib/kvm_util.c | 162 ++++------------ tools/testing/selftests/kvm/lib/perf_test_util.c | 2 +- tools/testing/selftests/kvm/lib/riscv/processor.c | 94 +++++---- tools/testing/selftests/kvm/lib/riscv/ucall.c | 13 +- .../selftests/kvm/lib/s390x/diag318_test_handler.c | 2 +- tools/testing/selftests/kvm/lib/s390x/processor.c | 22 +-- tools/testing/selftests/kvm/lib/s390x/ucall.c | 8 +- tools/testing/selftests/kvm/lib/x86_64/processor.c | 143 +++++++------- tools/testing/selftests/kvm/lib/x86_64/ucall.c | 10 +- tools/testing/selftests/kvm/lib/x86_64/vmx.c | 4 +- .../testing/selftests/kvm/max_guest_memory_test.c | 20 +- .../kvm/memslot_modification_stress_test.c | 5 +- tools/testing/selftests/kvm/memslot_perf_test.c | 4 +- tools/testing/selftests/kvm/rseq_test.c | 4 +- tools/testing/selftests/kvm/s390x/memop.c | 8 +- tools/testing/selftests/kvm/s390x/resets.c | 28 +-- tools/testing/selftests/kvm/s390x/sync_regs_test.c | 22 +-- tools/testing/selftests/kvm/s390x/tprot.c | 4 +- .../testing/selftests/kvm/set_memory_region_test.c | 8 +- tools/testing/selftests/kvm/steal_time.c | 20 +- .../selftests/kvm/system_counter_offset_test.c | 13 +- tools/testing/selftests/kvm/x86_64/amx_test.c | 22 +-- tools/testing/selftests/kvm/x86_64/cpuid_test.c | 14 +- .../selftests/kvm/x86_64/cr4_cpuid_sync_test.c | 8 +- tools/testing/selftests/kvm/x86_64/debug_regs.c | 30 +-- .../selftests/kvm/x86_64/emulator_error_test.c | 20 +- tools/testing/selftests/kvm/x86_64/evmcs_test.c | 28 +-- .../selftests/kvm/x86_64/fix_hypercall_test.c | 6 +- tools/testing/selftests/kvm/x86_64/hyperv_clock.c | 14 +- tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | 8 +- .../testing/selftests/kvm/x86_64/hyperv_features.c | 28 +-- .../testing/selftests/kvm/x86_64/hyperv_svm_test.c | 8 +- .../testing/selftests/kvm/x86_64/kvm_clock_test.c | 6 +- tools/testing/selftests/kvm/x86_64/kvm_pv_test.c | 10 +- tools/testing/selftests/kvm/x86_64/mmu_role_test.c | 10 +- .../selftests/kvm/x86_64/platform_info_test.c | 14 +- .../selftests/kvm/x86_64/pmu_event_filter_test.c | 8 +- .../testing/selftests/kvm/x86_64/set_boot_cpu_id.c | 4 +- .../testing/selftests/kvm/x86_64/set_sregs_test.c | 16 +- tools/testing/selftests/kvm/x86_64/smm_test.c | 18 +- tools/testing/selftests/kvm/x86_64/state_test.c | 18 +- .../selftests/kvm/x86_64/svm_int_ctl_test.c | 8 +- .../kvm/x86_64/svm_nested_soft_inject_test.c | 10 +- .../testing/selftests/kvm/x86_64/svm_vmcall_test.c | 6 +- .../testing/selftests/kvm/x86_64/sync_regs_test.c | 36 ++-- .../selftests/kvm/x86_64/triple_fault_event_test.c | 16 +- tools/testing/selftests/kvm/x86_64/tsc_msrs_test.c | 14 +- .../selftests/kvm/x86_64/tsc_scaling_sync.c | 6 +- .../selftests/kvm/x86_64/userspace_io_test.c | 8 +- .../selftests/kvm/x86_64/userspace_msr_exit_test.c | 22 +-- .../selftests/kvm/x86_64/vmx_apic_access_test.c | 6 +- .../kvm/x86_64/vmx_close_while_nested_test.c | 6 +- .../selftests/kvm/x86_64/vmx_dirty_log_test.c | 6 +- .../vmx_exception_with_invalid_guest_state.c | 10 +- .../kvm/x86_64/vmx_invalid_nested_guest_state.c | 12 +- .../kvm/x86_64/vmx_nested_tsc_scaling_test.c | 11 +- .../selftests/kvm/x86_64/vmx_pmu_caps_test.c | 20 +- .../kvm/x86_64/vmx_preemption_timer_test.c | 18 +- .../kvm/x86_64/vmx_set_nested_state_test.c | 12 +- .../selftests/kvm/x86_64/vmx_tsc_adjust_test.c | 6 +- .../testing/selftests/kvm/x86_64/xapic_ipi_test.c | 10 +- .../selftests/kvm/x86_64/xapic_state_test.c | 42 ++-- .../testing/selftests/kvm/x86_64/xen_shinfo_test.c | 38 ++-- .../testing/selftests/kvm/x86_64/xen_vmcall_test.c | 6 +- tools/testing/selftests/kvm/x86_64/xss_msr_test.c | 6 +- 87 files changed, 791 insertions(+), 909 deletions(-) commit 5260db3eb8f96c0dc631b0f41035a5f1957d9a58 Author: Sean Christopherson Date: Wed Feb 16 13:53:23 2022 -0800 KVM: selftests: Require vCPU output array when creating VM with vCPUs Require the caller of __vm_create_with_vcpus() to provide a non-NULL array of vCPUs now that all callers do so. It's extremely unlikely a test will have a legitimate use case for creating a VM with vCPUs without wanting to do something with those vCPUs, and if there is such a use case, requiring that one-off test to provide a dummy array is a minor annoyance. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/kvm_util.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 64a1aacc89700f675c7648b0962519f57630b62a Author: Sean Christopherson Date: Wed Feb 16 16:44:34 2022 -0800 KVM: selftests: Remove vcpu_get() usage from dirty_log_test Grab the vCPU from vm_vcpu_add() directly instead of doing vcpu_get() after the fact. This will allow removing vcpu_get() entirely. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/dirty_log_test.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit df84cef531ca481cbc1dbce84eb13efc6623e4e1 Author: Sean Christopherson Date: Wed Feb 16 13:38:12 2022 -0800 KVM: selftests: Stop conflating vCPU index and ID in perf tests Track vCPUs by their 'struct kvm_vcpu' object, and stop assuming that a vCPU's ID is the same as its index when referencing a vCPU's metadata. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/access_tracking_perf_test.c | 81 ++++++++++---------- tools/testing/selftests/kvm/demand_paging_test.c | 36 +++++---- tools/testing/selftests/kvm/dirty_log_perf_test.c | 39 +++++----- .../testing/selftests/kvm/include/perf_test_util.h | 7 +- tools/testing/selftests/kvm/lib/perf_test_util.c | 88 ++++++++++++---------- .../selftests/kvm/lib/x86_64/perf_test_util.c | 8 +- .../kvm/memslot_modification_stress_test.c | 10 +-- 7 files changed, 138 insertions(+), 131 deletions(-) commit 376851f8953a28be237b0a99adef91f422fa8f19 Author: Sean Christopherson Date: Wed Apr 20 12:15:50 2022 -0700 KVM: selftests: Stop hardcoding vCPU IDs in vcpu_width_config In preparation for taking a vCPU pointer in vCPU-scoped functions, grab the vCPU(s) created by __vm_vcpu_add() and use the ID from the vCPU object instead of hardcoding the ID in ioctl() invocations. Rename init1/init2 => init0/init1 to avoid having odd/confusing code where vcpu0 consumes init1 and vcpu1 consumes init2. Note, this change could easily be done when the functions are converted in the future, and/or the vcpu{0,1} vs. init{1,2} discrepancy could be ignored, but then there would be no opportunity to poke fun at the 1-based counting scheme. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/aarch64/vcpu_width_config.c | 60 +++++++++++----------- 1 file changed, 31 insertions(+), 29 deletions(-) commit 3cc3eeb165a0afa91365fcf7fa284cd766d2f0bf Author: Sean Christopherson Date: Thu Feb 17 17:01:58 2022 -0800 KVM: selftests: Convert get-reg-list away from its "VCPU_ID" Track the vCPU's 'struct kvm_vcpu' object in get-reg-list instead of hardcoding '0' everywhere. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/get-reg-list.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit e813129a3dea6588e57ebfebae75cef6946a89d1 Author: Sean Christopherson Date: Wed Feb 16 16:16:32 2022 -0800 KVM: selftests: Convert kvm_binary_stats_test away from vCPU IDs Track vCPUs by their 'struct kvm_vcpu' object in kvm_binary_stats_test, not by their ID. The per-vCPU helpers will soon take a vCPU instead of a VM+vcpu_id pair. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/kvm_binary_stats_test.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 0f678e732099f1cd9b42461708374e14cc63847f Author: Sean Christopherson Date: Wed Feb 16 13:06:18 2022 -0800 KVM: selftests: Convert kvm_page_table_test away from reliance on vcpu_id Reference vCPUs by their 'struct kvm_vcpu' object in kvm_page_table_test instead of by their ID. This moves selftests one step closer towards taking a 'struct kvm_vcpu *' instead of VM+vcpu_id for vCPU helpers. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/kvm_page_table_test.c | 62 ++++++++--------------- 1 file changed, 21 insertions(+), 41 deletions(-) commit 5114c3e2f1b90ca5417c42d3eb17fcf5ac4dc724 Author: Sean Christopherson Date: Wed Feb 16 12:49:13 2022 -0800 KVM: selftests: Drop @vcpuids param from VM creators Drop the @vcpuids parameter from VM creators now that there are no users. Allowing tests to specify IDs was a gigantic mistake as it resulted in tests with arbitrary and ultimately meaningless IDs that differed only because the author used test X intead of test Y as the source for copy+paste (the de facto standard way to create a KVM selftest). Except for literally two tests, x86's set_boot_cpu_id and s390's resets, tests do not and should not care about the vCPU ID. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/kvm_util_base.h | 4 ++-- tools/testing/selftests/kvm/kvm_page_table_test.c | 2 +- tools/testing/selftests/kvm/lib/kvm_util.c | 8 +++----- tools/testing/selftests/kvm/lib/perf_test_util.c | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) commit 82ba83cbb76aa6480729f98d3fdeeb162a5cea30 Author: Sean Christopherson Date: Wed Feb 16 12:45:22 2022 -0800 KVM: selftests: Drop vm_create_default* helpers Drop all vm_create_default*() helpers, the "default" naming turned out to terrible as wasn't extensible (hard to have multiple defaults), was a lie (half the settings were default, half weren't), and failed to capture relationships between helpers, e.g. compared with the kernel's standard underscores pattern. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 23 ---------------------- tools/testing/selftests/kvm/lib/kvm_util.c | 23 ++++++---------------- 2 files changed, 6 insertions(+), 40 deletions(-) commit 3468fd7d883110e481dfb8c8c7b802dc252ab186 Author: Sean Christopherson Date: Tue Apr 19 11:35:28 2022 -0700 KVM: selftests: Use vm_create_with_vcpus() in max_guest_memory_test Use vm_create_with_vcpus() in max_guest_memory_test and reference vCPUs by their 'struct kvm_vcpu' object instead of their ID. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/max_guest_memory_test.c | 26 +++++++++++++--------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 46647c65e1e618cc75961ef4d887f90ba7e18431 Author: Sean Christopherson Date: Mon Apr 18 17:35:33 2022 -0700 KVM: selftests: Use vm_create() in tsc_scaling_sync Use vm_create() instead of vm_create_default_with_vcpus() in tsc_scaling_sync. The existing call doesn't create any vCPUs, and the guest_code() entry point is set when vm_vcpu_add_default() is invoked. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/tsc_scaling_sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a9d37efa2cf3e2ba551c660fe52496742cbfbc4 Author: Sean Christopherson Date: Thu Apr 21 08:34:06 2022 -0700 KVM: selftests: Convert tprot away from VCPU_ID Convert tprot to use vm_create_with_vcpus() and pass around a 'struct kvm_vcpu' object instead of passing around vCPU IDs. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==1. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/s390x/tprot.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 7cdcdfe50d8d68b7b9ba2e1b0345ff47fdda390f Author: Sean Christopherson Date: Wed Feb 16 12:40:18 2022 -0800 KVM: selftests: Convert s390x/diag318_test_handler away from VCPU_ID Convert diag318_test_handler to use vm_create_with_vcpus() and pass around a 'struct kvm_vcpu' object instead of passing around vCPU IDs. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==6. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/s390x/diag318_test_handler.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 5241904f2eb6289dd1e7f7c80f612016afcb00cd Author: Sean Christopherson Date: Wed Feb 16 12:39:34 2022 -0800 KVM: selftests: Convert memop away from VCPU_ID Pass around a 'struct kvm_vcpu' object instead of a vCPU ID in s390's memop test. Pass NULL for the vCPU instead of a magic '-1' ID to indicate that an ioctl/test should be done at VM scope. Rename "struct test_vcpu vcpu" to "struct test_info info" in order to avoid naming collisions (this is the bulk of the diff :-( ). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/s390x/memop.c | 82 ++++++++++++++++--------------- 1 file changed, 42 insertions(+), 40 deletions(-) commit 371dfb2e90d942fb651c324505bc4929447b081b Author: Sean Christopherson Date: Wed Feb 16 12:38:26 2022 -0800 KVM: selftests: Convert s390's "resets" test away from VCPU_ID Pass around a 'struct kvm_vcpu' object in the "resets" test instead of referencing the vCPU by the global VCPU_ID. Rename the #define for the vCPU's ID to ARBITRARY_NON_ZERO_VCPU_ID to make it more obvious that (a) the value matters but (b) is otherwise arbitrary. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/s390x/resets.c | 137 ++++++++++++++++------------- 1 file changed, 77 insertions(+), 60 deletions(-) commit e5b77cdef9e3023b8156d81e005c3b7f27a1eaa5 Author: Sean Christopherson Date: Wed Feb 16 12:20:41 2022 -0800 KVM: selftests: Convert sync_regs_test away from VCPU_ID Convert sync_regs_test to use vm_create_with_vcpus() and pass around a 'struct kvm_vcpu' object instead of passing around vCPU IDs. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==5. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/s390x/sync_regs_test.c | 59 +++++++++++----------- 1 file changed, 30 insertions(+), 29 deletions(-) commit ebca1b8056dae8593bb350178d2ea454b3e123ad Author: Sean Christopherson Date: Wed Feb 16 12:10:40 2022 -0800 KVM: selftests: Convert xapic_ipi_test away from *_VCPU_ID Convert vm_create_with_one_vcpu to use vm_create_with_vcpus() and pass around 'struct kvm_vcpu' objects instead of passing around vCPU IDs. Don't bother with macros for the HALTER versus SENDER indices, the vast majority of references don't differentiate between the vCPU roles, and the code that does either has a comment or an explicit reference to the role, e.g. to halter_guest_code() or sender_guest_code(). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/x86_64/xapic_ipi_test.c | 48 +++++++++------------- 1 file changed, 20 insertions(+), 28 deletions(-) commit 8a093ea0d104998c4755743cdc5df7349356ae81 Author: Sean Christopherson Date: Wed Jun 1 17:32:52 2022 -0700 KVM: selftests: Convert hypercalls test away from vm_create_default() Use a combination of vm_create(), vm_create_with_vcpus(), and vm_vcpu_add() to convert vgic_init from vm_create_default_with_vcpus(), and away from referncing vCPUs by ID. Thus continues the march toward total annihilation of "default" helpers. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/hypercalls.c | 51 +++++++++++------------- 1 file changed, 24 insertions(+), 27 deletions(-) commit f05427faedff746e08b2098195c15d8691bc5fbe Author: Sean Christopherson Date: Wed Jun 1 17:27:51 2022 -0700 KVM: selftests: Sync stage before VM is freed in hypercalls test Sync the next stage using the VM before said VM is potentially freed by the TEST_STAGE_HVC_IFACE_FEAT_DISABLED stage. Opportunistically take a double pointer in anticipation of also having to set the new vCPU pointer once the test stops hardcoding '0' everywhere. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/hypercalls.c | 27 ++++++++++++------------ 1 file changed, 13 insertions(+), 14 deletions(-) commit bfff0f60db89f425920580900ba242df3bd3c652 Author: Sean Christopherson Date: Wed Jun 1 17:16:11 2022 -0700 KVM: selftests: Consolidate KVM_{G,S}ET_ONE_REG helpers Rework vcpu_{g,s}et_reg() to provide the APIs that tests actually want to use, and drop the three "one-off" implementations that cropped up due to the poor API. Ignore the handful of direct KVM_{G,S}ET_ONE_REG calls that don't fit the APIs for one reason or another. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/aarch64/debug-exceptions.c | 2 +- tools/testing/selftests/kvm/aarch64/get-reg-list.c | 2 +- tools/testing/selftests/kvm/aarch64/hypercalls.c | 32 ++------- tools/testing/selftests/kvm/aarch64/psci_test.c | 6 +- .../selftests/kvm/include/aarch64/processor.h | 18 +---- .../testing/selftests/kvm/include/kvm_util_base.h | 28 ++++++-- .../selftests/kvm/include/riscv/processor.h | 20 ------ .../testing/selftests/kvm/lib/aarch64/processor.c | 28 ++++---- tools/testing/selftests/kvm/lib/riscv/processor.c | 84 +++++++++++----------- tools/testing/selftests/kvm/s390x/resets.c | 5 +- 10 files changed, 93 insertions(+), 132 deletions(-) commit 45f568084a7a86960d55cf70fd9bf06fbb29e792 Author: Sean Christopherson Date: Wed Feb 16 11:57:41 2022 -0800 KVM: selftests: Convert vgic_init away from vm_create_default_with_vcpus() Use a combination of vm_create(), vm_create_with_vcpus(), and vm_vcpu_add() to convert vgic_init from vm_create_default_with_vcpus(), and away from referncing vCPUs by ID. Thus continues the march toward total annihilation of "default" helpers. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/vgic_init.c | 82 +++++++++++++++---------- 1 file changed, 51 insertions(+), 31 deletions(-) commit f3443bed2989a27a4d5c69c01e80d873139b4178 Author: Sean Christopherson Date: Wed Jun 1 13:43:40 2022 -0700 KVM: selftests: Convert triple_fault_event_test away from VCPU_ID Convert triple_fault_event_test to use vm_create_with_one_vcpu() and pull the vCPU's ID from 'struct kvm_vcpu'. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/x86_64/triple_fault_event_test.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 08ce0888c1f440f6a19133de124feb7280171754 Author: Sean Christopherson Date: Wed Jun 1 13:41:09 2022 -0700 KVM: selftests: Convert svm_nested_soft_inject_test away from VCPU_ID Convert svm_nested_soft_inject_test to use vm_create_with_one_vcpu() and pull the vCPU's ID from 'struct kvm_vcpu'. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/x86_64/svm_nested_soft_inject_test.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 7a5e4ae3db643e4b14453c5f67e4670a83284644 Author: Sean Christopherson Date: Wed Feb 16 11:40:33 2022 -0800 KVM: selftests: Convert arch_timer away from VCPU_ID Convert arch_timer to use vm_create_with_vcpus() and pass around a 'struct kvm_vcpu' object instead of requiring that the index into the array of vCPUs for a given vCPU is also the ID of the vCPU Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/arch_timer.c | 62 +++++++++++------------- 1 file changed, 27 insertions(+), 35 deletions(-) commit 9980160482213a9334e864774f789336960568a3 Author: Sean Christopherson Date: Wed Feb 16 11:24:01 2022 -0800 KVM: selftests: Convert steal_time away from VCPU_ID Convert steal_time to use vm_create_with_vcpus() and pass around a 'struct kvm_vcpu' object instead of requiring that the index into the array of vCPUs for a given vCPU is also the ID of the vCPU. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/steal_time.c | 123 ++++++++++++++++--------------- 1 file changed, 62 insertions(+), 61 deletions(-) commit 0ffc70eab775b52432a76f26aada24c5b78ef0eb Author: Sean Christopherson Date: Wed Feb 16 11:19:18 2022 -0800 KVM: selftests: Add VM creation helper that "returns" vCPUs Add a VM creator that "returns" the created vCPUs by filling the provided array. This will allow converting multi-vCPU tests away from hardcoded vCPU IDs. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/kvm_util_base.h | 17 +++++++++++++---- tools/testing/selftests/kvm/kvm_page_table_test.c | 4 ++-- tools/testing/selftests/kvm/lib/kvm_util.c | 17 ++++++++++------- tools/testing/selftests/kvm/lib/perf_test_util.c | 5 +++-- 4 files changed, 28 insertions(+), 15 deletions(-) commit 0750388ca7110d332547f3669715442eac6a1254 Author: Sean Christopherson Date: Wed Feb 16 11:15:08 2022 -0800 KVM: selftests: Convert hardware_disable_test to pass around vCPU objects Pass around 'struct kvm_vcpu' objects in hardware_disable_test instead of the VM+vcpu_id (called "index" by the test). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/hardware_disable_test.c | 25 +++++++--------------- 1 file changed, 8 insertions(+), 17 deletions(-) commit b093da659f3d0ff291fcd6373090ba17cf183253 Author: Sean Christopherson Date: Wed Feb 16 11:11:50 2022 -0800 KVM: selftests: Convert psci_test away from VCPU_ID Pass around 'struct kvm_vcpu' objects in psci_test instead of relying on global VCPU_IDs. Ideally, the test wouldn't have to manually create vCPUs and thus care about vCPU IDs, but it's not the end of the world and avoiding that behavior isn't guaranteed to be a net positive (an attempt at macro shenanigans did not go very well). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/psci_test.c | 50 ++++++++++++------------- 1 file changed, 25 insertions(+), 25 deletions(-) commit 682b11a012b85c18310a6798fe2509c55bf6563e Author: Sean Christopherson Date: Wed Feb 16 11:07:09 2022 -0800 KVM: selftests: Convert set_boot_cpu_id away from global VCPU_IDs Rework set_boot_cpu_id to pass around 'struct kvm_vcpu' objects instead of relying on global VCPU_IDs. The test is still ugly, but that's unavoidable since the point of the test is to verify that KVM correctly assigns VCPU_ID==0 to be the BSP by default. This is literally one of two KVM selftests that legitimately needs to care about the exact vCPU IDs of the vCPUs it creates. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/x86_64/set_boot_cpu_id.c | 86 +++++++++------------- 1 file changed, 36 insertions(+), 50 deletions(-) commit f742d94ff4e5147e08b3bb7826f009eda7545124 Author: Sean Christopherson Date: Wed Feb 16 09:56:24 2022 -0800 KVM: selftests: Rename vm_vcpu_add* helpers to better show relationships Rename vm_vcpu_add() to __vm_vcpu_add(), and vm_vcpu_add_default() to vm_vcpu_add() to show the relationship between the newly minted vm_vcpu_add() and __vm_vcpu_add(). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/get-reg-list.c | 2 +- tools/testing/selftests/kvm/aarch64/psci_test.c | 4 ++-- tools/testing/selftests/kvm/aarch64/vcpu_width_config.c | 8 ++++---- tools/testing/selftests/kvm/aarch64/vgic_init.c | 10 +++++----- tools/testing/selftests/kvm/dirty_log_test.c | 2 +- tools/testing/selftests/kvm/hardware_disable_test.c | 2 +- tools/testing/selftests/kvm/include/aarch64/processor.h | 5 ++--- tools/testing/selftests/kvm/include/kvm_util_base.h | 7 +++---- tools/testing/selftests/kvm/kvm_binary_stats_test.c | 2 +- tools/testing/selftests/kvm/kvm_create_max_vcpus.c | 2 +- tools/testing/selftests/kvm/lib/aarch64/processor.c | 9 ++++----- tools/testing/selftests/kvm/lib/kvm_util.c | 6 +++--- tools/testing/selftests/kvm/lib/riscv/processor.c | 2 +- tools/testing/selftests/kvm/lib/s390x/processor.c | 2 +- tools/testing/selftests/kvm/lib/x86_64/processor.c | 2 +- tools/testing/selftests/kvm/set_memory_region_test.c | 2 +- tools/testing/selftests/kvm/steal_time.c | 2 +- tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c | 2 +- tools/testing/selftests/kvm/x86_64/set_boot_cpu_id.c | 4 ++-- tools/testing/selftests/kvm/x86_64/set_sregs_test.c | 2 +- tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c | 8 ++++---- tools/testing/selftests/kvm/x86_64/tsc_scaling_sync.c | 4 ++-- tools/testing/selftests/kvm/x86_64/xapic_ipi_test.c | 2 +- 23 files changed, 44 insertions(+), 47 deletions(-) commit 1422efd6bb75e4ae038432449bf9229d6be8e0b4 Author: Sean Christopherson Date: Wed Feb 16 09:37:11 2022 -0800 KVM: selftests: Return created vcpu from vm_vcpu_add_default() Return the created 'struct kvm_vcpu' object from vm_vcpu_add_default(), which cleans up a few tests and will eventually allow removing vcpu_get() entirely. Opportunistically rename @vcpuid to @vcpu_id to follow preferred kernel style. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/include/aarch64/processor.h | 5 +++-- tools/testing/selftests/kvm/include/kvm_util_base.h | 10 ++++++---- tools/testing/selftests/kvm/lib/aarch64/processor.c | 20 ++++++++++++-------- tools/testing/selftests/kvm/lib/riscv/processor.c | 20 ++++++++++++-------- tools/testing/selftests/kvm/lib/s390x/processor.c | 18 +++++++++++------- tools/testing/selftests/kvm/lib/x86_64/processor.c | 20 ++++++++++++-------- .../selftests/kvm/x86_64/pmu_event_filter_test.c | 4 +--- .../testing/selftests/kvm/x86_64/tsc_scaling_sync.c | 3 +-- 8 files changed, 58 insertions(+), 42 deletions(-) commit 9931be3fc62edad381de074ad0db576eefed7fee Author: Sean Christopherson Date: Wed Feb 16 09:30:39 2022 -0800 KVM: selftests: Add "arch" to common utils that have arch implementations Add "arch" into the name of utility functions that are declared in common code, but (surprise!) have arch-specific implementations. Shuffle code around so that all such helpers' declarations are bundled together. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 200 ++++++++++++--------- .../testing/selftests/kvm/lib/aarch64/processor.c | 12 +- tools/testing/selftests/kvm/lib/riscv/processor.c | 12 +- tools/testing/selftests/kvm/lib/s390x/processor.c | 12 +- tools/testing/selftests/kvm/lib/x86_64/processor.c | 12 +- 5 files changed, 141 insertions(+), 107 deletions(-) commit b8592448370b1235119a0a135e99277430c76d53 Author: Sean Christopherson Date: Wed Feb 16 09:08:00 2022 -0800 KVM: selftests: Move vm_is_unrestricted_guest() to x86-64 An "unrestricted guest" is an VMX-only concept, move the relevant helper to x86-64 code. Assume most readers can correctly convert underscores to spaces and oppurtunistically trim the function comment. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 2 -- .../selftests/kvm/include/x86_64/processor.h | 1 + tools/testing/selftests/kvm/lib/kvm_util.c | 33 ---------------------- tools/testing/selftests/kvm/lib/x86_64/processor.c | 21 ++++++++++++++ 4 files changed, 22 insertions(+), 35 deletions(-) commit 033899489062e69d06e1ef7c0795ad9ac9bd47c1 Author: Sean Christopherson Date: Wed Feb 16 09:02:27 2022 -0800 KVM: selftests: Make arm64's guest_get_vcpuid() declaration arm64-only Move the declaration of guest_get_vcpuid() to include/aarch64/processor.h, it is implemented and used only by arm64. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/aarch64/processor.h | 2 ++ tools/testing/selftests/kvm/include/kvm_util_base.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit fd04edc3560c1be3321c50da1bb504ebc002e676 Author: Sean Christopherson Date: Wed Feb 16 08:41:38 2022 -0800 KVM: selftests: Convert vgic_irq away from VCPU_ID Convert vgic_irq to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of passing around a vCPU ID (which is always the global VCPU_ID...). Opportunstically align the indentation for multiple functions' parameters. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/vgic_irq.c | 30 ++++++++++++---------- tools/testing/selftests/kvm/include/aarch64/vgic.h | 6 +++-- tools/testing/selftests/kvm/lib/aarch64/vgic.c | 10 ++++---- 3 files changed, 25 insertions(+), 21 deletions(-) commit afcda3dcb3787d100d6e9e3ee97ebf0ff3e67dbb Author: Sean Christopherson Date: Mon Apr 18 11:50:15 2022 -0700 KVM: selftests: Convert fix_hypercall_test away from VCPU_ID Convert fix_hypercall_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/x86_64/fix_hypercall_test.c | 34 ++++++++++------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit e5d86c7a032362b0051aaa75d8a1ee2291d16b42 Author: Sean Christopherson Date: Wed Feb 16 08:35:01 2022 -0800 KVM: selftests: Convert debug-exceptions away from VCPU_ID Convert debug-exceptions to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/debug-exceptions.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 20a7eb990ae8eeb33e072e97dfb05042603b0d81 Author: Sean Christopherson Date: Mon Apr 18 12:11:54 2022 -0700 KVM: selftests: Convert xapic_state_test away from hardcoded vCPU ID Convert xapic_state_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of the raw vCPU ID. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/x86_64/xapic_state_test.c | 48 +++++++++++----------- 1 file changed, 25 insertions(+), 23 deletions(-) commit ee7f7d9e988e137f20a34b8c02dd28dd5312e3f1 Author: Sean Christopherson Date: Mon Apr 18 11:28:21 2022 -0700 KVM: selftests: Track kvm_vcpu object in tsc_scaling_sync Track the added 'struct kvm_vcpu' object in tsc_scaling_sync instead of relying purely on the VM + vcpu_id combination. Ideally, the test wouldn't need to manually manage vCPUs, but the need to invoke a per-VM ioctl before creating vCPUs is not handled by the selftests framework, at least not yet... Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/tsc_scaling_sync.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 10f0b222ea7e0ab90e7c72a255ce8e4f284b12e3 Author: Sean Christopherson Date: Mon Apr 18 11:28:15 2022 -0700 KVM: selftests: Convert system_counter_offset_test away from VCPU_ID Convert system_counter_offset_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/system_counter_offset_test.c | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) commit d7828144d4651efc063d0889c9498176da2aed8c Author: Sean Christopherson Date: Tue Feb 15 17:44:50 2022 -0800 KVM: selftests: Convert set_memory_region_test away from VCPU_ID Convert set_memory_region_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/set_memory_region_test.c | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) commit c09aee348495af4cc15f823ff7256b77728d53c7 Author: Sean Christopherson Date: Tue Feb 15 17:40:19 2022 -0800 KVM: selftests: Convert dirty_log_test away from VCPU_ID Convert dirty_log_test to pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==5. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. The test still hardcodes usage of vcpu_id==0, but only for a few lines. That wart will be removed in the not-too-distant future. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/dirty_log_test.c | 59 ++++++++++++++-------------- 1 file changed, 30 insertions(+), 29 deletions(-) commit 0037727b3989c3fe1929c89a9a1dfe289ad86f58 Author: Sean Christopherson Date: Tue Feb 15 17:34:32 2022 -0800 KVM: selftests: Convert xen_shinfo_test away from VCPU_ID Convert xen_shinfo_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==5. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/x86_64/xen_shinfo_test.c | 62 +++++++++++----------- 1 file changed, 30 insertions(+), 32 deletions(-) commit 92897016697754a2709e42d56117824b0401c7dd Author: Sean Christopherson Date: Tue Feb 15 17:33:28 2022 -0800 KVM: selftests: Convert xen_vmcall_test away from VCPU_ID Convert xen_vmcall_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==5. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Opportunistically make the "vm" variable local, it is unused outside of main(). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/xen_vmcall_test.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 35b6cb825abdd15a6b2f3da22ffcfb076ecb75db Author: Sean Christopherson Date: Tue Feb 15 17:30:35 2022 -0800 KVM: selftests: Convert vmx_invalid_nested_guest_state away from VCPU_ID Convert vmx_invalid_nested_guest_state to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../kvm/x86_64/vmx_invalid_nested_guest_state.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit ada1bf4d653168ee209d7825ed3f19a8fe418d07 Author: Sean Christopherson Date: Tue Feb 15 17:15:15 2022 -0800 KVM: selftests: Convert userspace_io_test away from VCPU_ID Convert userspace_io_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==1. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Opportunistically use vcpu_run() instead of _vcpu_run() with an open coded assert that KVM_RUN succeeded. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/userspace_io_test.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 87f1b5b3c0cda3feed7de624285966dcf3a1c7ae Author: Sean Christopherson Date: Tue Feb 15 17:13:53 2022 -0800 KVM: selftests: Convert cpuid_test away from VCPU_ID Convert cpuid_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Opportunistically use vcpu_run() instead of _vcpu_run(), the test expects KVM_RUN to succeed. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/cpuid_test.c | 29 ++++++++++++------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 50630b80eb8f8779f301e12c1328e200b004df61 Author: Sean Christopherson Date: Tue Feb 15 17:12:37 2022 -0800 KVM: selftests: Convert cr4_cpuid_sync_test away from VCPU_ID Convert cr4_cpuid_sync_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==1. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Opportunistically use vcpu_run() instead of _vcpu_run() with an open coded assert that KVM_RUN succeeded. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 39839c1a68ce28ea38ca3f789c9981b0d7310def Author: Sean Christopherson Date: Tue Feb 15 17:11:25 2022 -0800 KVM: selftests: Convert amx_test away from VCPU_ID Convert amx_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID.o Opportunistically use vcpu_run() instead of _vcpu_run(), the test expects KVM_RUN to succeed. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/amx_test.c | 33 +++++++++++++-------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit 2571bcdb136a3daf59df677585f32b89615eea47 Author: Sean Christopherson Date: Tue Feb 15 17:09:25 2022 -0800 KVM: selftests: Add proper helper for advancing RIP in debug_regs Replace MOVE_RIP+SET_RIP with a proper helper, vcpu_skip_insn(), that is more descriptive, doesn't subtly access local variables, and provides type safety. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/debug_regs.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 28039449b83e21f741937e84d4fd6485ad4fb9f8 Author: Sean Christopherson Date: Tue Feb 15 17:06:02 2022 -0800 KVM: selftests: Convert debug_regs away from VCPU_ID Convert debug_regs to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Opportunstically drop the CLEAR_DEBUG/APPLY_DEBUG macros as they only obfuscate the code, e.g. operating on local variables not "passed" to the macro is all kinds of confusing. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/debug_regs.c | 53 ++++++++++++------------- 1 file changed, 25 insertions(+), 28 deletions(-) commit 42975c219975f5df0d686868e8b57698b2d09561 Author: Sean Christopherson Date: Tue Feb 15 17:02:44 2022 -0800 KVM: selftests: Convert emulator_error_test away from VCPU_ID Convert emulator_error_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==5. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Opportunistically use vcpu_run() instead of _vcpu_run() with an open coded assert that KVM_RUN succeeded. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/x86_64/emulator_error_test.c | 65 ++++++++++------------ 1 file changed, 28 insertions(+), 37 deletions(-) commit be0dff8610b15976151934d25f433391880f88a9 Author: Sean Christopherson Date: Tue Feb 15 16:57:49 2022 -0800 KVM: selftests: Convert evmcs_test away from VCPU_ID Convert evmcs_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==5. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Opportunistically use vcpu_run() instead of _vcpu_run(), the test expects KVM_RUN to succeed. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/evmcs_test.c | 52 ++++++++++++------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit a858163711751b1caba7415c473a0668de1ef2bf Author: Sean Christopherson Date: Tue Feb 15 16:54:04 2022 -0800 KVM: selftests: Convert hyperv_clock away from VCPU_ID Convert hyperv_clock to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Opportunistically use vcpu_run() instead of _vcpu_run() with an open coded assert that KVM_RUN succeeded. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/hyperv_clock.c | 25 +++++++++++------------ 1 file changed, 12 insertions(+), 13 deletions(-) commit d96b959600e540337fc489564dd93fc9a5ee9fe7 Author: Sean Christopherson Date: Tue Feb 15 16:50:11 2022 -0800 KVM: selftests: Convert hyperv_features away from VCPU_ID Convert hyperv_features to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Opportunistically use vcpu_run() instead of _vcpu_run() with an open coded assert that KVM_RUN succeeded. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/x86_64/hyperv_features.c | 51 +++++++++++----------- 1 file changed, 25 insertions(+), 26 deletions(-) commit a1918c0fbeea59ccc629d83e491e798fc657fe41 Author: Sean Christopherson Date: Tue Feb 15 16:47:48 2022 -0800 KVM: selftests: Convert hyperv_svm_test away from VCPU_ID Convert hyperv_svm_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==1. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Opportunistically use vcpu_run() instead of _vcpu_run(), the test expects KVM_RUN to succeed. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/hyperv_svm_test.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 5e7cb71570b99eec5e4bb76ea5184ded87497e3f Author: Sean Christopherson Date: Tue Feb 15 16:46:56 2022 -0800 KVM: selftests: Convert kvm_clock_test away from VCPU_ID Convert kvm_clock_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Opportunistically use vcpu_run() instead of _vcpu_run() with an open coded assert that KVM_RUN succeeded. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/x86_64/kvm_clock_test.c | 23 ++++++++++------------ 1 file changed, 10 insertions(+), 13 deletions(-) commit f7024348d7ea2bea0be3dd82703b15f3dac9590b Author: Sean Christopherson Date: Tue Feb 15 16:45:15 2022 -0800 KVM: selftests: Convert tsc_msrs_test away from VCPU_ID Convert tsc_msrs_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/tsc_msrs_test.c | 35 ++++++++++------------ 1 file changed, 16 insertions(+), 19 deletions(-) commit 709fd88491a819382c0f47e813628f2650497b4d Author: Sean Christopherson Date: Tue Feb 15 16:44:36 2022 -0800 KVM: selftests: Convert vmx_exception_with_invalid_guest_state away from VCPU_ID Convert vmx_exception_with_invalid_guest_state to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../vmx_exception_with_invalid_guest_state.c | 62 +++++++++++++--------- 1 file changed, 36 insertions(+), 26 deletions(-) commit b4694260299ac4312a5a2d94a47957c1b6d55d00 Author: Sean Christopherson Date: Tue Feb 15 16:38:01 2022 -0800 KVM: selftests: Convert userspace_msr_exit_test away from VCPU_ID Convert userspace_msr_exit_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==1. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Opportunistically use vcpu_run() instead of _vcpu_run() with an open coded assert that KVM_RUN succeeded. Fix minor coding style violations too. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/x86_64/userspace_msr_exit_test.c | 156 ++++++++++----------- 1 file changed, 72 insertions(+), 84 deletions(-) commit 21c602e671755765cde92dd5f07125c6ba8b8d03 Author: Sean Christopherson Date: Tue Feb 15 16:27:47 2022 -0800 KVM: selftests: Convert vmx_apic_access_test away from VCPU_ID Convert vmx_apic_access_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Opportunistically make the "vm" variable local, it is unused outside of main(). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/x86_64/vmx_apic_access_test.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 706aaa4fedd9b028a3238221a8aba499b74d8f93 Author: Sean Christopherson Date: Tue Feb 15 16:26:58 2022 -0800 KVM: selftests: Convert vmx_close_while_nested_test away from VCPU_ID Convert vmx_close_while_nested_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==5. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Opportunistically make the "vm" variable local, it is unused outside of main(). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/x86_64/vmx_close_while_nested_test.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit ec7b769a732052e6c8f73db35fd8ee35d1368a4b Author: Sean Christopherson Date: Tue Feb 15 16:26:03 2022 -0800 KVM: selftests: Convert vmx_dirty_log_test away from VCPU_ID Convert vmx_dirty_log_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==1. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/vmx_dirty_log_test.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit d31e15005dde30f5e25308ee01b6f518b5cadecb Author: Sean Christopherson Date: Tue Feb 15 16:24:50 2022 -0800 KVM: selftests: Convert set_sregs_test away from VCPU_ID Convert set_sregs_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==5. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/x86_64/set_sregs_test.c | 45 +++++++++++----------- 1 file changed, 22 insertions(+), 23 deletions(-) commit 6f96628f8290d2b634ba0dc5b83bd7201e099c52 Author: Sean Christopherson Date: Tue Feb 15 16:23:43 2022 -0800 KVM: selftests: Convert vmx_nested_tsc_scaling_test away from VCPU_ID Convert vmx_nested_tsc_scaling_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/x86_64/vmx_nested_tsc_scaling_test.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 1cc1a9f38da4d6ce650eed03721d470924559b0f Author: Sean Christopherson Date: Tue Feb 15 16:11:59 2022 -0800 KVM: selftests: Convert platform_info_test away from VCPU_ID Convert platform_info_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/x86_64/platform_info_test.c | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) commit f323dbce3ba126f7b1dfeb7042c3b3037155aac2 Author: Sean Christopherson Date: Tue Feb 15 16:10:04 2022 -0800 KVM: selftests: Convert kvm_pv_test away from VCPU_ID Convert kvm_pv_test to use vm_create_with_one_vcpu() and pass arounda 'struct kvm_vcpu' object instead of using a global VCPU_ID. Opportunistically use vcpu_run() instead of _vcpu_run() with an open coded assert that KVM_RUN succeeded. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/kvm_pv_test.c | 25 ++++++++++-------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 5c6e31b3bc4b526f872cca35a86169b3aa968259 Author: Sean Christopherson Date: Tue Feb 15 16:08:48 2022 -0800 KVM: selftests: Convert hyperv_cpuid away from VCPU_ID Convert hyperv_cpuid to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 0184323acbc460893025871ccfd1db04223a7477 Author: Sean Christopherson Date: Tue Feb 15 16:04:25 2022 -0800 KVM: selftests: Convert sync_regs_test away from VCPU_ID Convert sync_regs_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==5. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/x86_64/sync_regs_test.c | 52 +++++++++++----------- 1 file changed, 25 insertions(+), 27 deletions(-) commit 91520c5121561fd33eba8e381764ec64d2748eca Author: Sean Christopherson Date: Tue Feb 15 15:56:54 2022 -0800 KVM: selftests: Convert svm_vmcall_test away from VCPU_ID Convert svm_vmcall_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==5. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/svm_vmcall_test.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit cb4d9608af03ef289b57ceb925c6d8c2066d45d7 Author: Sean Christopherson Date: Tue Feb 15 15:55:26 2022 -0800 KVM: selftests: Convert svm_int_ctl_test away from VCPU_ID Convert svm_int_ctl_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Opportunistically make the "vm" variable a local function variable, there are no users outside of main(). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/x86_64/svm_int_ctl_test.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 90b13cdde1fa6b71b4d6f8a5f6298f9e54233e98 Author: Sean Christopherson Date: Tue Feb 15 15:53:16 2022 -0800 KVM: selftests: Convert state_test away from VCPU_ID Convert state_test to use vm_create_with_one_vcpu() and vm_recreate_with_one_vcpu(), and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==5. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Opportunistically use vcpu_run() instead of _vcpu_run(), the test expects KVM_RUN to succeed. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/state_test.c | 29 ++++++++++++------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 20092699759bd7f5861b9441eab5ea5c983c77a2 Author: Sean Christopherson Date: Tue Feb 15 15:51:19 2022 -0800 KVM: selftests: Convert smm_test away from VCPU_ID Convert smm_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==1. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Opportunistically use vcpu_run() instead of _vcpu_run(), the test expects KVM_RUN to succeed. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/smm_test.c | 37 +++++++++++++-------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit a2d5d774919ed48680d17b6b82458d184f6519dd Author: Sean Christopherson Date: Tue Feb 15 15:39:45 2022 -0800 KVM: selftests: Convert pmu_event_filter_test away from VCPU_ID Convert pmu_event_filter_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Rename run_vm_to_sync() to run_vcpu_to_sync() accordingly. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/x86_64/pmu_event_filter_test.c | 75 +++++++++++----------- 1 file changed, 39 insertions(+), 36 deletions(-) commit 5478431f984ec593684f0dbb212e2c141ec20320 Author: Sean Christopherson Date: Tue Feb 15 15:28:49 2022 -0800 KVM: selftests: Convert mmu_role_test away from VCPU_ID Convert mmu_role_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==1. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Opportunistically use vcpu_run() instead of _vcpu_run() plus an open coded assert that KVM_RUN succeeded. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/mmu_role_test.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 5581ed8762fc9400047521be23844a27cf884b08 Author: Sean Christopherson Date: Tue Feb 15 15:22:03 2022 -0800 KVM: selftests: Convert vmx_tsc_adjust_test away from VCPU_ID Convert vmx_tsc_adjust_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==5. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 4bc87470858db1a329ad94e36f398fec97b54095 Author: Sean Christopherson Date: Tue Feb 15 13:56:58 2022 -0800 KVM: selftests: Convert vmx_set_nested_state_test away from VCPU_ID Convert vmx_set_nested_state_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==5. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../kvm/x86_64/vmx_set_nested_state_test.c | 86 +++++++++++----------- 1 file changed, 43 insertions(+), 43 deletions(-) commit d8b5b5d1327175b0bd0d9c97434a307cded6b5dd Author: Sean Christopherson Date: Tue Feb 15 13:53:06 2022 -0800 KVM: selftests: Convert vmx_pmu_msrs_test away from VCPU_ID Convert vmx_pmu_msrs_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/x86_64/vmx_pmu_caps_test.c | 25 +++++++++++----------- 1 file changed, 12 insertions(+), 13 deletions(-) commit b1bc990406beab8690a20818e91d4ac522712bc7 Author: Sean Christopherson Date: Tue Feb 15 13:51:14 2022 -0800 KVM: selftests: Convert vmx_preemption_timer_test away from VCPU_ID Convert vmx_preemption_timer_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==5. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Opportunistically use vcpu_run() instead of _vcpu_run(), the test expects KVM_RUN to succeed. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../kvm/x86_64/vmx_preemption_timer_test.c | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 58606e6025536a9ff3216df9cb2c6b7b7a1594be Author: Sean Christopherson Date: Tue Feb 15 13:49:19 2022 -0800 KVM: selftests: Convert xss_msr_test away from VCPU_ID Convert xss_msr_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Note, this is a "functional" change in the sense that the test now creates a vCPU with vcpu_id==0 instead of vcpu_id==1. The non-zero VCPU_ID was 100% arbitrary and added little to no validation coverage. If testing non-zero vCPU IDs is desirable for generic tests, that can be done in the future by tweaking the VM creation helpers. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/xss_msr_test.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 2494a6d80fb58c303b542331d3218ecd70cccea3 Author: Sean Christopherson Date: Tue Feb 15 13:36:46 2022 -0800 KVM: selftests: Convert rseq_test away from VCPU_ID Convert rseq_test to use vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/rseq_test.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit e82e630ba965ad8a1278cf8bbe9759975a5a5109 Author: Sean Christopherson Date: Tue Feb 15 13:34:31 2022 -0800 KVM: selftests: Convert memslot_perf_test away from VCPU_ID Convert memslot_perf_test to use __vm_create_with_one_vcpu() and pass around a 'struct kvm_vcpu' object instead of using a global VCPU_ID. This is the first of many, many steps towards eliminating VCPU_ID from all KVM selftests, and towards eventually purging the VM+vcpu_id mess. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/memslot_perf_test.c | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit e3763d3aebea261ac3eef24e94dc85be91209d0b Author: Sean Christopherson Date: Tue Feb 15 16:16:45 2022 -0800 KVM: selftests: Return the created vCPU from vm_vcpu_add() Return the created vCPU from vm_vcpu_add() so that callers don't need to manually retrieve the vCPU that was just added. Opportunistically drop the "heavy" function comment, it adds a lot of lines of "code" but not much value, e.g. it's pretty obvious that @vm is a virtual machine... Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 2 +- tools/testing/selftests/kvm/lib/kvm_util.c | 27 ++++++++-------------- 2 files changed, 10 insertions(+), 19 deletions(-) commit 0cc64b08096c71ba139e25759597c5df80ae422a Author: Sean Christopherson Date: Tue Feb 15 15:24:21 2022 -0800 KVM: selftests: Rename 'struct vcpu' to 'struct kvm_vcpu' Rename 'struct vcpu' to 'struct kvm_vcpu' to align with 'struct kvm_vm' in the selftest, and to give readers a hint that the struct is specific to KVM. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 11 ++++--- tools/testing/selftests/kvm/lib/kvm_util.c | 36 ++++++++++------------ tools/testing/selftests/kvm/lib/s390x/processor.c | 2 +- 3 files changed, 24 insertions(+), 25 deletions(-) commit 1079c3d4e452a12f71f9ed076a37e5689f365153 Author: Sean Christopherson Date: Tue Feb 15 13:26:01 2022 -0800 KVM: selftests: Rename vcpu.state => vcpu.run Rename the "state" field of 'struct vcpu' to "run". KVM calls it "run", the struct name is "kvm_run", etc... Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 2 +- tools/testing/selftests/kvm/lib/kvm_util.c | 24 ++++++++-------------- tools/testing/selftests/kvm/lib/s390x/processor.c | 2 +- 3 files changed, 11 insertions(+), 17 deletions(-) commit 70ca149be61d9b09cc31c62e9fbe6faea4a79811 Author: Sean Christopherson Date: Mon Apr 18 10:08:40 2022 -0700 KVM: selftests: Rename xAPIC state test's vcpu struct Rename xapic_state_test's kvm_vcpu struct to xapic_vcpu to avoid a collision when the common 'struct vcpu' is renamed to 'struct kvm_vcpu' in a future patch. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/xapic_state_test.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3f44e7fdca4eaeed3728d0b898ace5258f9ed474 Author: Sean Christopherson Date: Tue Apr 19 14:21:38 2022 -0700 KVM: selftests: Make vm_create() a wrapper that specifies VM_MODE_DEFAULT Add ____vm_create() to be the innermost helper, and turn vm_create() into a wrapper the specifies VM_MODE_DEFAULT. Most of the vm_create() callers just want the default mode, or more accurately, don't care about the mode. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/psci_test.c | 2 +- tools/testing/selftests/kvm/dirty_log_test.c | 2 +- tools/testing/selftests/kvm/hardware_disable_test.c | 2 +- tools/testing/selftests/kvm/include/kvm_util_base.h | 18 +++++++++++++----- tools/testing/selftests/kvm/lib/kvm_util.c | 16 ++++++++-------- .../selftests/kvm/x86_64/pmu_event_filter_test.c | 2 +- tools/testing/selftests/kvm/x86_64/set_boot_cpu_id.c | 2 +- 7 files changed, 26 insertions(+), 18 deletions(-) commit cfe122db3ea6908d44f51c239fb1f1608e71522b Author: Sean Christopherson Date: Tue Apr 19 14:16:34 2022 -0700 KVM: selftests: Rename vm_create_without_vcpus() => vm_create() Rename vm_create_without_vcpus() to vm_create() so that it's not misconstrued as helper that creates a VM that can never have vCPUs, as opposed to a helper that "just" creates a VM without vCPUs added at time zero. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/psci_test.c | 2 +- tools/testing/selftests/kvm/dirty_log_test.c | 2 +- tools/testing/selftests/kvm/hardware_disable_test.c | 2 +- tools/testing/selftests/kvm/include/kvm_util_base.h | 2 +- tools/testing/selftests/kvm/lib/kvm_util.c | 4 ++-- tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c | 2 +- tools/testing/selftests/kvm/x86_64/set_boot_cpu_id.c | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) commit 95fb0460719721962997d344bf9d63812c1dab67 Author: Sean Christopherson Date: Mon Apr 18 16:26:06 2022 -0700 KVM: selftests: Rename vm_create() => vm_create_barebones(), drop param Rename vm_create() to vm_create_barebones() and drop the @phys_pages param. Pass '0' for the number of pages even though some callers pass 'DEFAULT_GUEST_PHY_PAGES', as the intent behind creating truly barebones VMs is purely to create a VM, i.e. there aren't vCPUs, there's no guest code loaded, etc..., and so there is nothing that will ever need or consume guest memory. Freeing up the name vm_create() will allow using the name for an inner helper to the other VM creators, which need a "full" VM. Opportunisticaly rewrite the function comment for addr_gpa2alias() to focus on what the _function_ does, not what its _sole caller_ does. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/get-reg-list.c | 2 +- .../selftests/kvm/aarch64/vcpu_width_config.c | 6 ++--- .../testing/selftests/kvm/include/kvm_util_base.h | 6 ++++- .../testing/selftests/kvm/kvm_binary_stats_test.c | 2 +- tools/testing/selftests/kvm/kvm_create_max_vcpus.c | 2 +- tools/testing/selftests/kvm/lib/kvm_util.c | 29 +++------------------- .../testing/selftests/kvm/set_memory_region_test.c | 4 +-- .../selftests/kvm/x86_64/max_vcpuid_cap_test.c | 2 +- .../testing/selftests/kvm/x86_64/set_sregs_test.c | 2 +- .../selftests/kvm/x86_64/sev_migrate_tests.c | 8 +++--- 10 files changed, 23 insertions(+), 40 deletions(-) commit eb0adbc03aafdb3dd0740eaaeb26051fd5e35c20 Author: Sean Christopherson Date: Thu Jun 9 10:19:01 2022 -0700 KVM: selftests: Avoid memory allocations when adding vCPU in get-reg-list Open code adding and doing setup for a vCPU in get-reg-list in order to avoid the stack allocation that comes with aarch64_vcpu_add_default(). get-reg-list doesn't need to run the vCPU, and so doesn't need the guest to be backed with memory. This will allow future cleanup to turn what is current vm_create() into a barebones helper. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/get-reg-list.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 47b1e0ec2e1460b25674ba947723052919da7e67 Author: Sean Christopherson Date: Mon Apr 18 13:16:39 2022 -0700 KVM: selftests: Use vm_create_without_vcpus() in psci_test Use vm_create_without_vcpus() instead of open coding a rough equivalent in psci_test. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/psci_test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3c16181b2652e4e99b478e2c0251aaa24a15e695 Author: Sean Christopherson Date: Mon Apr 18 13:16:32 2022 -0700 KVM: selftests: Use vm_create_without_vcpus() in hardware_disable_test Use vm_create_without_vcpus() instead of open coding a rough equivalent in hardware_disable_test. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/hardware_disable_test.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4acefa385c8233de756b450f87188ebadf3a3591 Author: Sean Christopherson Date: Mon Apr 18 13:02:55 2022 -0700 KVM: selftests: Use vm_create_without_vcpus() in dirty_log_test Use vm_create_without_vcpus() instead of open coding a rough equivalent. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/dirty_log_test.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit bb47ed8b71d06d7ede40374fd3064e2457eafb62 Author: Sean Christopherson Date: Mon Apr 18 13:00:58 2022 -0700 KVM: selftests: Use vm_create_without_vcpus() in set_boot_cpu_id Use vm_create_without_vcpus() in set_boot_cpu_id instead of open coding the equivlant now that the "without_vcpus" variant does vm_adjust_num_guest_pages(). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/set_boot_cpu_id.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 0c276ff22c7eb1a6ebf889b25d631f4cd358a482 Author: Sean Christopherson Date: Mon Apr 18 12:58:44 2022 -0700 KVM: selftests: Push vm_adjust_num_guest_pages() into "w/o vCPUs" helper Move the call to vm_adjust_num_guest_pages() from vm_create_with_vcpus() down into vm_create_without_vcpus(). This will allow a future patch to make the "w/o vCPUs" variant the common inner helper, e.g. so that the "with_vcpus" helper calls the "without_vcpus" helper, instead of having them be separate paths. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/kvm_util.c | 4 ++-- tools/testing/selftests/kvm/x86_64/monitor_mwait_test | Bin 0 -> 1485656 bytes 2 files changed, 2 insertions(+), 2 deletions(-) commit f17686aac61fb23c08efba56ee3f3ceb89572d08 Author: Sean Christopherson Date: Tue Feb 15 15:14:51 2022 -0800 KVM: selftests: Add vm_create_*() variants to expose/return 'struct vcpu' Add VM creation helpers to expose/return 'struct vcpu' so that tests don't have to hardcode a VCPU_ID or make assumptions about what vCPU ID is used by the framework just to retrieve a vCPU the test created. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/kvm_util_base.h | 16 ++++++++++++++++ tools/testing/selftests/kvm/lib/kvm_util.c | 18 ++++++++++++++++++ 2 files changed, 34 insertions(+) commit 6ebfef83f03f216b25b09a386bef16d05796cdaa Author: Sean Christopherson Date: Thu Jun 2 10:30:06 2022 -0700 KVM: selftest: Add proper helpers for x86-specific save/restore ioctls Add helpers for the various one-off helpers used by x86's vCPU state save/restore helpers, and convert the other open coded ioctl()s to use existing helpers. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/include/x86_64/processor.h | 54 +++++++++ tools/testing/selftests/kvm/lib/x86_64/processor.c | 130 +++++++-------------- 2 files changed, 93 insertions(+), 91 deletions(-) commit 877bd3997c508691b30054524353d574a3597cd9 Author: Sean Christopherson Date: Thu Jun 2 10:25:56 2022 -0700 KVM: selftests: Rename MP_STATE and GUEST_DEBUG helpers for consistency Move the get/set part of the MP_STATE and GUEST_DEBUG helpers to the end to align with the many other ioctl() wrappers/helpers. Note, this is not an endorsement of the predominant style, the goal is purely to provide consistency in the selftests. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/psci_test.c | 2 +- tools/testing/selftests/kvm/include/kvm_util_base.h | 9 +++++++-- tools/testing/selftests/kvm/lib/x86_64/processor.c | 2 +- tools/testing/selftests/kvm/x86_64/debug_regs.c | 2 +- tools/testing/selftests/kvm/x86_64/svm_nested_soft_inject_test.c | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) commit 2128e30b01867a4d5e41bbaba8e35bcca7537f3b Author: Sean Christopherson Date: Thu Jun 2 12:24:18 2022 -0700 KVM: selftests: Dedup MSR index list helpers, simplify dedicated test Consolidate the helper for retrieving the list of save/restore MSRs and the list of feature MSRs, and use the common helpers in the related get_msr_index_features test. Switching to the common helpers eliminates the testcase that KVM returns the same -E2BIG result if the input number of MSRs is '1' versus '0', but considered that testcase isn't very interesting, e.g. '0' and '1' are equally arbitrary, and certainly not worth the additional code. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/include/x86_64/processor.h | 1 + tools/testing/selftests/kvm/lib/x86_64/processor.c | 39 +++++-- .../selftests/kvm/x86_64/get_msr_index_features.c | 112 +++------------------ 3 files changed, 46 insertions(+), 106 deletions(-) commit 0ce74180f306981534d023199017a90b77a92004 Author: Sean Christopherson Date: Thu Jun 2 14:12:22 2022 -0700 KVM: selftests: Harden and comment XSS / KVM_SET_MSRS interaction Assert that KVM_SET_MSRS returns '0' or '1' when setting XSS to a non-zero value. The ioctl() itself should "succeed", its only the setting of the XSS MSR that should fail/fault. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/xss_msr_test.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c095cb609b3aa56fd24e2907556c24fef88b9180 Author: Sean Christopherson Date: Thu Jun 2 14:12:14 2022 -0700 KVM: selftests: Cache list of MSRs to save/restore Cache the list of MSRs to save restore, mostly to justify not freeing the list in the caller, which simplifies consumption of the list. Opportunistically move the XSS test's so called is_supported_msr() to common code as kvm_msr_is_in_save_restore_list(). The XSS is "supported" by KVM, it's simply not in the save/restore list because KVM doesn't yet allow a non-zero value. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../selftests/kvm/include/x86_64/processor.h | 4 +- tools/testing/selftests/kvm/lib/x86_64/processor.c | 81 ++++++++++------------ tools/testing/selftests/kvm/x86_64/xss_msr_test.c | 27 ++------ 3 files changed, 45 insertions(+), 67 deletions(-) commit a12c86c447f4bce6d2725c3fab426aba6630b376 Author: Sean Christopherson Date: Thu Jun 2 13:19:09 2022 -0700 KVM: selftests: Simplify KVM_ENABLE_CAP helper APIs Rework the KVM_ENABLE_CAP helpers to take the cap and arg0; literally every current user, and likely every future user, wants to set 0 or 1 arguments and nothing else. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/psci_test.c | 11 +------- tools/testing/selftests/kvm/dirty_log_perf_test.c | 9 +++---- tools/testing/selftests/kvm/dirty_log_test.c | 5 +--- .../testing/selftests/kvm/include/kvm_util_base.h | 18 ++++++++----- tools/testing/selftests/kvm/lib/kvm_util.c | 6 +---- tools/testing/selftests/kvm/lib/x86_64/vmx.c | 8 ++---- .../selftests/kvm/x86_64/emulator_error_test.c | 6 +---- .../selftests/kvm/x86_64/fix_hypercall_test.c | 6 ++--- .../testing/selftests/kvm/x86_64/hyperv_features.c | 16 +++-------- tools/testing/selftests/kvm/x86_64/kvm_pv_test.c | 5 +--- .../selftests/kvm/x86_64/max_vcpuid_cap_test.c | 12 +++------ .../selftests/kvm/x86_64/platform_info_test.c | 14 ++-------- .../selftests/kvm/x86_64/pmu_event_filter_test.c | 5 +--- .../selftests/kvm/x86_64/sev_migrate_tests.c | 14 ++-------- .../selftests/kvm/x86_64/triple_fault_event_test.c | 7 +---- .../selftests/kvm/x86_64/userspace_msr_exit_test.c | 31 ++++++++-------------- 16 files changed, 47 insertions(+), 126 deletions(-) commit ac71220934a9240864ec485932308866500b1e61 Author: Sean Christopherson Date: Thu Jun 2 12:55:59 2022 -0700 KVM: selftests: Consolidate KVM_ENABLE_CAP usage Add __vm_enable_cap() and use it for negative tests that expect KVM_ENABLE_CAP to fail. Opportunistically clean up the MAX_VCPU_ID test error messages. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 4 ++ tools/testing/selftests/kvm/lib/x86_64/vmx.c | 2 +- .../selftests/kvm/x86_64/max_vcpuid_cap_test.c | 19 +++--- .../selftests/kvm/x86_64/sev_migrate_tests.c | 78 +++++++++++----------- 4 files changed, 52 insertions(+), 51 deletions(-) commit c472df1ac318c1120f32cd4a70d202806be30c43 Author: Sean Christopherson Date: Tue Feb 15 15:14:29 2022 -0800 KVM: selftests: Add a VM backpointer to 'struct vcpu' Add a backpointer to 'struct vcpu' so that tests can get at the owning VM when passing around a vCPU object. Long term, this will be little more than a nice-to-have feature, but in the short term it is a critical step toward purging the VM+vcpu_id ioctl mess without introducing even more churn. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/kvm_util_base.h | 1 + tools/testing/selftests/kvm/lib/kvm_util.c | 1 + 2 files changed, 2 insertions(+) commit 114eef6e461a6a0810d6ed354b4ce7f3b74fe547 Author: Sean Christopherson Date: Thu Jun 9 13:20:53 2022 -0700 KVM: selftests: Dedup vgic_init's asserts and improve error messages Move the asserts for the many REDIST_REGS accesses into common helpers instead of copy+pasting the same, unhelpful asserts over and over. Not providing the actual (or expected) value makes it unnecessarily painful to debug failures, especially since test_assert() prints the errno unconditionally, e.g. on success, it may print a stale, misleading errno. Use kvm_device_attr_get() to handle the "success" check so that the "success" and "expected == actual" asserts are separated, which will make it far less likely that a user incorrectly assumes the ioctl() failed. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/vgic_init.c | 112 ++++++++++-------------- 1 file changed, 47 insertions(+), 65 deletions(-) commit 4091818426d98f4e7093808264caf86ad90287c8 Author: Sean Christopherson Date: Thu Jun 9 13:06:57 2022 -0700 KVM: selftests: Split get/set device_attr helpers Split the get/set device_attr helpers instead of using a boolean param to select between get and set. Duplicating upper level wrappers is a very, very small price to pay for improved readability, and having constant (at compile time) inputs will allow the selftests framework to sanity check ioctl() invocations. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/arch_timer.c | 8 +- tools/testing/selftests/kvm/aarch64/vgic_init.c | 246 ++++++++++----------- .../testing/selftests/kvm/include/kvm_util_base.h | 91 +++++--- tools/testing/selftests/kvm/lib/aarch64/vgic.c | 31 ++- tools/testing/selftests/kvm/lib/guest_modes.c | 4 +- tools/testing/selftests/kvm/lib/kvm_util.c | 58 +++-- .../selftests/kvm/system_counter_offset_test.c | 4 +- 7 files changed, 231 insertions(+), 211 deletions(-) commit d2752e2eb331cbbed6f51f901f2685654e1cafa7 Author: Sean Christopherson Date: Thu Feb 17 16:33:21 2022 -0800 KVM: selftests: Drop 'int' return from asserting *_has_device_attr() Drop 'int' returns from *_device_has_attr() helpers that assert the return is '0', there's no point in returning '0' and "requiring" the caller to perform a redundant assertion. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/vgic_init.c | 4 ++-- tools/testing/selftests/kvm/include/kvm_util_base.h | 20 +++++++++++++++++--- tools/testing/selftests/kvm/lib/kvm_util.c | 17 ----------------- 3 files changed, 19 insertions(+), 22 deletions(-) commit 9367504f77ebb47d09847993aae01f8a38d5b4f6 Author: Sean Christopherson Date: Wed Mar 2 19:49:16 2022 -0800 KVM: selftests: Rename KVM_HAS_DEVICE_ATTR helpers for consistency Rename kvm_device_check_attr() and its variants to kvm_has_device_attr() to be consistent with the ioctl names and with other helpers in the KVM selftests framework. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/vgic_init.c | 12 +++++------- tools/testing/selftests/kvm/include/kvm_util_base.h | 6 +++--- tools/testing/selftests/kvm/lib/kvm_util.c | 12 ++++++------ tools/testing/selftests/kvm/system_counter_offset_test.c | 2 +- 4 files changed, 15 insertions(+), 17 deletions(-) commit 279eacbefad5d163a20f8fcde2fd9362bc24f7c7 Author: Sean Christopherson Date: Thu Feb 17 12:21:33 2022 -0800 KVM: selftests: Multiplex return code and fd in __kvm_create_device() Multiplex the return value and fd (on success) in __kvm_create_device() to mimic common library helpers that return file descriptors, e.g. open(). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/vgic_init.c | 6 +++--- tools/testing/selftests/kvm/include/kvm_util_base.h | 2 +- tools/testing/selftests/kvm/lib/aarch64/vgic.c | 5 +++-- tools/testing/selftests/kvm/lib/kvm_util.c | 16 +++++++--------- 4 files changed, 14 insertions(+), 15 deletions(-) commit 98f94ce42ac672b2abdcf38cfc0e60fd52e04995 Author: Sean Christopherson Date: Thu Feb 17 12:16:20 2022 -0800 KVM: selftests: Move KVM_CREATE_DEVICE_TEST code to separate helper Move KVM_CREATE_DEVICE_TEST to its own helper, identifying "real" versus "test" device creation based on a hardcoded boolean buried in the middle of a param list is painful for readers. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/vgic_init.c | 10 +++++----- .../testing/selftests/kvm/include/kvm_util_base.h | 3 ++- tools/testing/selftests/kvm/lib/aarch64/vgic.c | 3 +-- tools/testing/selftests/kvm/lib/kvm_util.c | 23 ++++++++++++++++------ 4 files changed, 25 insertions(+), 14 deletions(-) commit f3165dc02212e8eaf5cb675f105aac89c6de431c Author: Sean Christopherson Date: Thu Feb 17 12:09:28 2022 -0800 KVM: selftests: Drop @test param from kvm_create_device() Remove the two calls that pass @test=true to kvm_create_device() and drop the @test param entirely. The two removed calls don't check the return value of kvm_create_device(), so other than verifying KVM doesn't explode, which is extremely unlikely given that the non-test variant was _just_ called, they are pointless and provide no validation coverage. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/vgic_init.c | 14 ++++++-------- tools/testing/selftests/kvm/include/kvm_util_base.h | 2 +- tools/testing/selftests/kvm/lib/kvm_util.c | 12 ++++-------- 3 files changed, 11 insertions(+), 17 deletions(-) commit a78593fd8717349852fa9a3f7292516edc5b50ea Author: Sean Christopherson Date: Thu Feb 17 10:57:06 2022 -0800 KVM: selftests: Use KVM_IOCTL_ERROR() for one-off arm64 ioctls Use the KVM_IOCTL_ERROR() macro to generate error messages for a handful of one-off arm64 ioctls. The calls in question are made without an associated struct kvm_vm/kvm_vcpu as they are used to configure those structs, i.e. can't be easily converted to e.g. vcpu_ioctl(). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/aarch64/processor.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b530eba14c7001882ab517c8408878ef2de97863 Author: Sean Christopherson Date: Tue Feb 15 13:21:19 2022 -0800 KVM: selftests: Get rid of kvm_util_internal.h Fold kvm_util_internal.h into kvm_util_base.h, i.e. make all KVM utility stuff "public". Hiding struct implementations from tests has been a massive failure, as it has led to pointless and poorly named wrappers, unnecessarily opaque code, etc... Not to mention that the approach was a complete failure as evidenced by the non-zero number of tests that were including kvm_util_internal.h. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 97 ++++++++++++++++++++-- .../testing/selftests/kvm/lib/aarch64/processor.c | 1 - tools/testing/selftests/kvm/lib/aarch64/ucall.c | 1 - tools/testing/selftests/kvm/lib/aarch64/vgic.c | 1 - tools/testing/selftests/kvm/lib/elf.c | 1 - tools/testing/selftests/kvm/lib/kvm_util.c | 1 - .../testing/selftests/kvm/lib/kvm_util_internal.h | 94 --------------------- tools/testing/selftests/kvm/lib/riscv/processor.c | 1 - tools/testing/selftests/kvm/lib/riscv/ucall.c | 1 - tools/testing/selftests/kvm/lib/s390x/processor.c | 1 - .../selftests/kvm/lib/x86_64/perf_test_util.c | 1 - tools/testing/selftests/kvm/lib/x86_64/processor.c | 1 - tools/testing/selftests/kvm/lib/x86_64/svm.c | 1 - tools/testing/selftests/kvm/lib/x86_64/vmx.c | 1 - .../selftests/kvm/x86_64/max_vcpuid_cap_test.c | 1 - .../selftests/kvm/x86_64/sev_migrate_tests.c | 1 - .../kvm/x86_64/svm_nested_soft_inject_test.c | 1 - 17 files changed, 90 insertions(+), 116 deletions(-) commit 1526c3a09ecc3e3fc08495fe4a7ff82167354ca2 Author: Frank Wunderlich Date: Mon Jun 6 19:08:03 2022 +0200 arm64: dts: rockchip: enable the gpu on BPI-R2-Pro Enable the GPU core on the Rockchip RK3568 BananaPi R2 Pro Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20220606170803.478082-6-linux@fw-web.de Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 870b4dada9a10d93d7904ec9bb32169acdee3eaa Author: Frank Wunderlich Date: Mon Jun 6 19:08:02 2022 +0200 arm64: dts: rockchip: configure thermal shutdown for BPI-R2-Pro Add thermal shutdown configuration for use of GPU. Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20220606170803.478082-5-linux@fw-web.de Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 2 ++ 1 file changed, 2 insertions(+) commit f48387c005fa91487cad072bd047b929edfb7947 Author: Frank Wunderlich Date: Mon Jun 6 19:08:01 2022 +0200 arm64: dts: rockchip: Enable HDMI audio on BPI R2 Pro This enables the i2s0 controller and the hdmi-sound node on the Bananapi R2 Pro single-board computer. Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20220606170803.478082-4-linux@fw-web.de Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit adecf85c9a853adc89c65c799a11a4a3dc1e4a22 Author: Frank Wunderlich Date: Mon Jun 6 19:08:00 2022 +0200 arm64: dts: rockchip: enable vop2 and hdmi tx on BPI-R2-Pro Enable the RK356x Video Output Processor (VOP) 2 on the BananaPi R2 Pro board. Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20220606170803.478082-3-linux@fw-web.de Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 2cda380102ff195b6f206660344bf59e47b72e3d Author: Frank Wunderlich Date: Mon Jun 6 19:07:59 2022 +0200 arm64: dts: rockchip: set display regulators to always-on on BPI-R2-Pro The gpu power supply needs to stay always on until the issues with power- domains not being regulator aware is resolved. Otherwise we run into issues where the gpu-regulator gets shut down and we start getting mmu faults. Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20220606170803.478082-2-linux@fw-web.de Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 3 +++ 1 file changed, 3 insertions(+) commit efaa0c1378ed800abd1abe0aa51ffd30002efdb4 Author: Frank Wunderlich Date: Wed Jun 8 18:11:49 2022 +0200 arm64: dts: rockchip: add RTC to BPI-R2 Pro Add devicetree node for hym8563 rtc to Bananapi R2 Pro board. Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20220608161150.58919-3-linux@fw-web.de Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 6914df1891c27f83e538dab3f5aadd2842e89a7f Merge: 7e193a42c37c a6d190f8c767 Author: Marc Kleine-Budde Date: Sat Jun 11 17:11:34 2022 +0200 Merge branch 'can-refactoring-of-can-dev-module-and-of-Kbuild' Vincent Mailhol says ==================== Aside of calc_bittiming.o which can be configured with CAN_CALC_BITTIMING, all objects from drivers/net/can/dev/ get linked unconditionally to can-dev.o even if not needed by the user. This series first goal it to split the can-dev modules so that the only the needed features get built in during compilation. Additionally, the CAN Device Drivers menu is moved from the "Networking support" category to the "Device Drivers" category (where all drivers are supposed to be). * menu before this series * CAN bus subsystem support symbol: CONFIG_CAN | +-> CAN Device Drivers (no symbol) | +-> software/virtual CAN device drivers | (at time of writing: slcan, vcan, vxcan) | +-> Platform CAN drivers with Netlink support symbol: CONFIG_CAN_DEV | +-> CAN bit-timing calculation (optional for hardware drivers) | symbol: CONFIG_CAN_CALC_BITTIMING | +-> All other CAN devices drivers * menu after this series * Network device support symbol: CONFIG_NETDEVICES | +-> CAN Device Drivers symbol: CONFIG_CAN_DEV | +-> software/virtual CAN device drivers | (at time of writing: slcan, vcan, vxcan) | +-> CAN device drivers with Netlink support symbol: CONFIG_CAN_NETLINK (matches previous CONFIG_CAN_DEV) | +-> CAN bit-timing calculation (optional for all drivers) | symbol: CONFIG_CAN_CALC_BITTIMING | +-> All other CAN devices drivers (some may select CONFIG_CAN_RX_OFFLOAD) | +-> CAN rx offload (automatically selected by some drivers) (hidden symbol: CONFIG_CAN_RX_OFFLOAD) Patches 1 to 5 of this series do above modification. The last two patches add a check toward CAN_CTRLMODE_LISTENONLY in can_dropped_invalid_skb() to discard tx skb (such skb can potentially reach the driver if injected via the packet socket). In more details, patch 6 moves can_dropped_invalid_skb() from skb.h to skb.o and patch 7 is the actual change. Those last two patches are actually connected to the first five ones: because slcan and v(x)can requires can_dropped_invalid_skb(), it was necessary to add those three devices to the scope of can-dev before moving the function to skb.o. This design results from the lengthy discussion in [1]. [1] https://lore.kernel.org/linux-can/20220514141650.1109542-1-mailhol.vincent@wanadoo.fr/ ** Changelog ** v5 -> v6: * fix typo in patch #1's title: Kbuild -> Kconfig. * make CONFIG_RX_CAN an hidden config symbol and modify the diagram in the cover letter accordingly. @Oliver, with CONFIG_CAN_RX_OFFLOAD now being an hidden config, that option fully depends on the drivers. So contrary to your suggestion, I put CONFIG_CAN_RX_OFFLOAD below the device drivers in the diagram. * fix typo in cover letter: CONFIG_CAN_BITTIMING -> CONFIG_CAN_CALC_BITTIMING. v4 -> v5: * m_can is also requires RX offload. Add the "select CAN_RX_OFFLOAD" to its Makefile. * Reorder the lines of drivers/net/can/dev/Makefile. * Remove duplicated rx-offload.o target in drivers/net/can/dev/Makefile * Remove the Nota Bene in the cover letter. v3 -> v4: * Five additional patches added to split can-dev module and refactor Kbuild. c.f. below (lengthy) thread: https://lore.kernel.org/linux-can/20220514141650.1109542-1-mailhol.vincent@wanadoo.fr/ v2 -> v3: * Apply can_dropped_invalid_skb() to slcan. * Make vcan, vxcan and slcan dependent of CONFIG_CAN_DEV by modifying Kbuild. * fix small typos. v1 -> v2: * move can_dropped_invalid_skb() to skb.c instead of dev.h * also move can_skb_headroom_valid() to skb.c ==================== Link: https://lore.kernel.org/all/20220610143009.323579-1-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde commit a6d190f8c7670068d8c154ef8477eca07b5e3574 Author: Vincent Mailhol Date: Fri Jun 10 23:30:09 2022 +0900 can: skb: drop tx skb if in listen only mode Frames can be directly injected to a can driver via the packet socket. By doing so, it is possible to reach the net_device_ops::ndo_start_xmit function even if the driver is configured in listen only mode. Add a check in can_dropped_invalid_skb() to discard the skb if CAN_CTRLMODE_LISTENONLY is set. Link: https://lore.kernel.org/all/20220610143009.323579-8-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Acked-by: Max Staudt Tested-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde drivers/net/can/dev/skb.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit ccd8a9351f7b44bc1c0c8e4d39c0d6593b106fc4 Author: Vincent Mailhol Date: Fri Jun 10 23:30:08 2022 +0900 can: skb: move can_dropped_invalid_skb() and can_skb_headroom_valid() to skb.c The functions can_dropped_invalid_skb() and can_skb_headroom_valid() grew a lot over the years to a point which it does not make much sense to have them defined as static inline in header files. Move those two functions to the .c counterpart of skb.h. can_skb_headroom_valid()'s only caller being can_dropped_invalid_skb(), the declaration is removed from the header. Only can_dropped_invalid_skb() gets its symbol exported. While doing so, do a small cleanup: add brackets around the else block in can_dropped_invalid_skb(). Link: https://lore.kernel.org/all/20220610143009.323579-7-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Reported-by: kernel test robot Acked-by: Max Staudt Tested-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde drivers/net/can/dev/skb.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++ include/linux/can/skb.h | 59 +---------------------------------------------- 2 files changed, 59 insertions(+), 58 deletions(-) commit d7786af59860a113d62150c4328674e896da7810 Author: Vincent Mailhol Date: Fri Jun 10 23:30:07 2022 +0900 net: Kconfig: move the CAN device menu to the "Device Drivers" section The devices are meant to be under the "Device Drivers" category of the menuconfig. The CAN subsystem is currently one of the rare exception with all of its devices under the "Networking support" category. The CAN_DEV menuentry gets moved to fix this discrepancy. The CAN menu is added just before MCTP in order to be consistent with the current order under the "Networking support" menu. A dependency on CAN is added to CAN_DEV so that the CAN devices only show up if the CAN subsystem is enabled. Link: https://lore.kernel.org/all/20220610143009.323579-6-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Acked-by: Max Staudt Tested-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde drivers/net/Kconfig | 2 ++ drivers/net/can/Kconfig | 1 + net/can/Kconfig | 5 ++--- 3 files changed, 5 insertions(+), 3 deletions(-) commit bfe0092dc237963b035d8404ecd61d60f0ef1a5d Author: Vincent Mailhol Date: Fri Jun 10 23:30:06 2022 +0900 can: Kconfig: add CONFIG_CAN_RX_OFFLOAD Only a few drivers rely on the CAN rx offload framework (as of the writing of this patch, only four: flexcan, m_can, mcp251xfd and ti_hecc). Split it out of can-dev and add a new config symbol: CAN_RX_OFFLOAD. The drivers relying on CAN rx offload are in different sub folders. Make CAN_RX_OFFLOAD an hidden option and tag all the drivers depending on that feature with "select CAN_RX_OFFLOAD" so that the option gets automatically enabled if and only if one of those drivers is chosen. Link: https://lore.kernel.org/all/20220610143009.323579-5-mailhol.vincent@wanadoo.fr Suggested-by: Geert Uytterhoeven Suggested-by: Jakub Kicinski Signed-off-by: Vincent Mailhol Acked-by: Max Staudt Tested-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde drivers/net/can/Kconfig | 5 +++++ drivers/net/can/dev/Makefile | 2 +- drivers/net/can/m_can/Kconfig | 1 + drivers/net/can/spi/mcp251xfd/Kconfig | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) commit 0c7e115138830af77d480ee9185bbdc23c6e73a4 Author: Vincent Mailhol Date: Fri Jun 10 23:30:05 2022 +0900 can: bittiming: move bittiming calculation functions to calc_bittiming.c The canonical way to select or deselect an object during compilation is to use this pattern in the relevant Makefile: bar-$(CONFIG_FOO) := foo.o bittiming.c instead uses some #ifdef CONFIG_CAN_CALC_BITTIMG. Create a new file named calc_bittiming.c with all the functions which are conditionally compiled with CONFIG_CAN_CALC_BITTIMG and modify the Makefile according to above pattern. Link: https://lore.kernel.org/all/20220610143009.323579-4-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Acked-by: Max Staudt Tested-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde drivers/net/can/Kconfig | 4 + drivers/net/can/dev/Makefile | 1 + drivers/net/can/dev/bittiming.c | 197 ---------------------------------- drivers/net/can/dev/calc_bittiming.c | 202 +++++++++++++++++++++++++++++++++++ 4 files changed, 207 insertions(+), 197 deletions(-) commit 6a5286442fb64a2d512e4059004441e59c786ebc Author: Vincent Mailhol Date: Fri Jun 10 23:30:04 2022 +0900 can: Kconfig: turn menu "CAN Device Drivers" into a menuconfig using CAN_DEV In the next patches, the software/virtual drivers (slcan, v(x)can) will depend on drivers/net/can/dev/skb.o. This patch changes the scope of the can-dev module to include the above mentioned drivers. To do so, we reuse the menu "CAN Device Drivers" and turn it into a configmenu using the config symbol CAN_DEV (which we released in previous patch). Also, add a description to this new CAN_DEV menuconfig. The symbol CAN_DEV now only triggers the build of skb.o. For this reasons, all the macros from linux/module.h are deported from drivers/net/can/dev/dev.c to drivers/net/can/dev/skb.c. Finally, drivers/net/can/dev/Makefile is adjusted accordingly. Link: https://lore.kernel.org/all/20220610143009.323579-3-mailhol.vincent@wanadoo.fr Suggested-by: Oliver Hartkopp Signed-off-by: Vincent Mailhol Acked-by: Max Staudt Tested-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde drivers/net/can/Kconfig | 29 ++++++++++++++++++++++++++--- drivers/net/can/dev/Makefile | 16 +++++++++------- drivers/net/can/dev/dev.c | 9 +-------- drivers/net/can/dev/skb.c | 7 +++++++ 4 files changed, 43 insertions(+), 18 deletions(-) commit df6ad5dd838e0fa543ca28ca6154901fa65a9443 Author: Vincent Mailhol Date: Fri Jun 10 23:30:03 2022 +0900 can: Kconfig: rename config symbol CAN_DEV into CAN_NETLINK In the next patches, the scope of the can-dev module will grow to engloble the software/virtual drivers (slcan, v(x)can). To this extent, release CAN_DEV by renaming it into CAN_NETLINK. The config symbol CAN_DEV will be reused to cover this extended scope. The rationale for the name CAN_NETLINK is that netlink is the predominant feature added here. The current description only mentions platform drivers despite the fact that this symbol is also required by "normal" devices (e.g. USB or PCI) which do not fall under the platform devices category. The description is updated accordingly to fix this gap. Link: https://lore.kernel.org/all/20220610143009.323579-2-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Acked-by: Max Staudt Tested-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde drivers/net/can/Kconfig | 18 +++++++++++------- drivers/net/can/dev/Makefile | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) commit 4188962d993ef3633a61f66ba5afe9e43088f3c5 Author: Nicolas Frattaroli Date: Sat Jun 11 08:53:00 2022 +0200 arm64: dts: rockchip: Enable HDMI audio on Quartz64 A This enables the i2s0 controller and the hdmi-sound node on the PINE64 Quartz64 Model A single-board computer. Tested-by: Peter Geis Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20220611065300.885212-3-frattaroli.nicolas@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 697ee8546e241bd5fc175c0cfd5d8b0c8ce39697 Author: Nicolas Frattaroli Date: Sat Jun 11 08:52:59 2022 +0200 arm64: dts: rockchip: Add HDMI audio nodes to rk356x This adds the i2s0 node and an hdmi-sound sound device to the rk356x device tree. On the rk356[68], the i2s0 controller is connected to HDMI audio. Tested-by: Michael Riesch Tested-by: Peter Geis Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20220611065300.885212-2-frattaroli.nicolas@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk356x.dtsi | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 7e193a42c37cf40eba8ac5af2d5e8eeb8b9506f9 Author: Marc Kleine-Budde Date: Sat Jun 11 16:20:58 2022 +0200 can: netlink: allow configuring of fixed bit rates without need for do_set_bittiming callback Usually CAN devices support configurable bit rates. The limits are defined by struct can_priv::bittiming_const. Another way is to implement the struct can_priv::do_set_bittiming callback. If the bit rate is configured via netlink, the can_changelink() function checks that either can_priv::bittiming_const or struct can_priv::do_set_bittiming is implemented. In commit 431af779256c ("can: dev: add CAN interface API for fixed bitrates") an API for configuring bit rates on CAN interfaces that only support fixed bit rates was added. The supported bit rates are defined by struct can_priv::bitrate_const. However the above mentioned commit forgot to add the struct can_priv::bitrate_const to the check in can_changelink(). In order to avoid to implement a no-op can_priv::do_set_bittiming callback on devices with fixed bit rates, extend the check in can_changelink() accordingly. Link: https://lore.kernel.org/all/20220611144248.3924903-1-mkl@pengutronix.de Fixes: 431af779256c ("can: dev: add CAN interface API for fixed bitrates") Reported-by: Max Staudt Signed-off-by: Marc Kleine-Budde drivers/net/can/dev/netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c38fb531675654f29f039d1b9bdd0c5b7992913e Author: Marc Kleine-Budde Date: Thu Jun 9 13:10:53 2022 +0200 can: m_can: fix typo prescalar -> prescaler This patch fixes the typo prescalar -> prescaler. Link: https://lore.kernel.org/all/20220610112037.3857192-1-mkl@pengutronix.de Reviewed-by: Chandrasekar Ramakrishnan Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b9b352e12c594bc409afb8f893d2ed3d41ab3e2d Author: Marc Kleine-Budde Date: Thu Jun 9 13:10:53 2022 +0200 can: xilinx_can: fix typo prescalar -> prescaler This patch fixes the typo prescalar -> prescaler. Link: https://lore.kernel.org/all/20220609111424.3819039-1-mkl@pengutronix.de Reported-by: Vincent MAILHOL Cc: Srinivas Neeli Cc: Appana Durga Kedareswara rao Cc: Naga Sureshkumar Relli Signed-off-by: Marc Kleine-Budde drivers/net/can/xilinx_can.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1010a8fa96086d746251954e709f9fad751b1f0a Author: Srinivas Neeli Date: Thu Jun 9 16:01:57 2022 +0530 can: xilinx_can: add Transmitter Delay Compensation (TDC) feature support This patch adds Transmitter Delay Compensation (TDC) feature support. In the case of higher measured loop delay with higher bit rates, bit stuff errors are observed. Enabling the TDC feature in CAN-FD controllers will compensate for the measured loop delay in the receive path. Link: https://lore.kernel.org/all/20220609103157.1425730-1-srinivas.neeli@xilinx.com Signed-off-by: Srinivas Neeli Reviewed-by: Vincent Mailhol [mkl: fix indention] Signed-off-by: Marc Kleine-Budde drivers/net/can/xilinx_can.c | 66 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 61 insertions(+), 5 deletions(-) commit b938cafdde4e2dac94154bd2a345f2baa68919dc Author: Sean Christopherson Date: Wed Feb 16 09:14:17 2022 -0800 KVM: selftests: Make x86-64's register dump helpers static Make regs_dump() and sregs_dump() static, they're only implemented by x86 and only used internally. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/lib/kvm_util_internal.h | 34 -------------------- tools/testing/selftests/kvm/lib/x86_64/processor.c | 36 ++-------------------- 2 files changed, 2 insertions(+), 68 deletions(-) commit f17cf5674a1e70c142cb3acb5eb7667560e62012 Author: Sean Christopherson Date: Wed May 4 09:44:49 2022 -0700 KVM: selftests: Use __KVM_SYSCALL_ERROR() to handle non-KVM syscall errors Use __KVM_SYSCALL_ERROR() to report and pretty print non-KVM syscall and ioctl errors, e.g. for mmap(), munmap(), uffd ioctls, etc... Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/vgic_irq.c | 5 ++-- tools/testing/selftests/kvm/demand_paging_test.c | 12 ++++----- tools/testing/selftests/kvm/lib/kvm_util.c | 34 ++++++++++-------------- 3 files changed, 22 insertions(+), 29 deletions(-) commit f9725f89dc5027c7d94f8fdfbac8bbad846a0891 Author: Sean Christopherson Date: Tue Feb 15 12:39:12 2022 -0800 KVM: selftests: Use kvm_ioctl() helpers Use the recently introduced KVM-specific ioctl() helpers instead of open coding calls to ioctl() just to pretty print the ioctl name. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/lib/aarch64/processor.c | 4 +-- tools/testing/selftests/kvm/lib/guest_modes.c | 2 +- tools/testing/selftests/kvm/lib/kvm_util.c | 13 ++++----- tools/testing/selftests/kvm/lib/x86_64/processor.c | 34 +++++++--------------- .../selftests/kvm/x86_64/get_msr_index_features.c | 16 +++------- .../selftests/kvm/x86_64/mmio_warning_test.c | 6 ++-- 6 files changed, 26 insertions(+), 49 deletions(-) commit 2de1b7b127da0e87d278af172fa37ebfe04c8675 Author: Sean Christopherson Date: Thu Feb 17 10:21:36 2022 -0800 KVM: selftests: Make kvm_ioctl() a wrapper to pretty print ioctl name Make kvm_ioctl() a macro wrapper and print the _name_ of the ioctl on failure instead of the number. Deliberately do not use __stringify(), as that will expand the ioctl all the way down to its numerical sequence, again the intent is to print the name of the macro. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 16 +++++++++-- tools/testing/selftests/kvm/lib/kvm_util.c | 31 ++++------------------ tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | 2 +- 3 files changed, 20 insertions(+), 29 deletions(-) commit 10825b55b9d5a402294095a3d5fc9d0ea39cc282 Author: Sean Christopherson Date: Tue Feb 15 12:09:56 2022 -0800 KVM: sefltests: Use vm_ioctl() and __vm_ioctl() helpers Use the recently introduced VM-specific ioctl() helpers instead of open coding calls to ioctl() just to pretty print the ioctl name. Keep a few open coded assertions that provide additional info. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 60 +++++++++-- .../testing/selftests/kvm/kvm_binary_stats_test.c | 6 +- tools/testing/selftests/kvm/lib/aarch64/vgic.c | 6 +- tools/testing/selftests/kvm/lib/kvm_util.c | 116 +++------------------ .../testing/selftests/kvm/set_memory_region_test.c | 3 +- .../selftests/kvm/x86_64/pmu_event_filter_test.c | 2 +- 6 files changed, 67 insertions(+), 126 deletions(-) commit 71ab5a6fea49875290e6ca035ff1d3e3ef3813f7 Author: Sean Christopherson Date: Tue Feb 15 12:06:02 2022 -0800 KVM: selftests: Make vm_ioctl() a wrapper to pretty print ioctl name Make vm_ioctl() a macro wrapper and print the _name_ of the ioctl on failure instead of the number. Deliberately do not use __stringify(), as that will expand the ioctl all the way down to its numerical sequence. Again the intent is to print the name of the macro. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 38 ++++++++++++---------- tools/testing/selftests/kvm/lib/kvm_util.c | 26 ++++----------- 2 files changed, 27 insertions(+), 37 deletions(-) commit 47a7c924b62de4b9d1752c1f5bc111c847229799 Author: Sean Christopherson Date: Tue Feb 15 11:31:16 2022 -0800 KVM: selftests: Add vcpu_get() to retrieve and assert on vCPU existence Add vcpu_get() to wrap vcpu_find() and deduplicate a pile of code that asserts the requested vCPU exists. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/kvm_util.c | 56 +++++++--------------- .../testing/selftests/kvm/lib/kvm_util_internal.h | 2 +- tools/testing/selftests/kvm/lib/s390x/processor.c | 5 +- tools/testing/selftests/kvm/lib/x86_64/processor.c | 4 +- 4 files changed, 20 insertions(+), 47 deletions(-) commit 21c6ee2b3ac25b36cba22a2c725382ff7706dc95 Author: Sean Christopherson Date: Tue Feb 15 11:24:01 2022 -0800 KVM: selftests: Remove vcpu_get_fd() Drop vcpu_get_fd(), it no longer has any users, and really should not exist as the framework has failed if tests need to manually operate on a vCPU fd. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/kvm_util_base.h | 1 - tools/testing/selftests/kvm/lib/kvm_util.c | 9 --------- 2 files changed, 10 deletions(-) commit caf12f3b1d629c06634b059acc7b18d05bb5fb94 Author: Sean Christopherson Date: Tue Feb 15 11:23:34 2022 -0800 KVM: selftests: Use vcpu_access_device_attr() in arm64 code Use vcpu_access_device_attr() in arm's arch_timer test instead of manually retrieving the vCPU's fd. This will allow dropping vcpu_get_fd() in a future patch. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/arch_timer.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 38d4a385a345d807652f748822630f309786b658 Author: Sean Christopherson Date: Tue Feb 15 11:49:42 2022 -0800 KVM: selftests: Add __vcpu_run() helper Add __vcpu_run() so that tests that want to avoid asserts on KVM_RUN failures don't need to open code the ioctl() call. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/vgic_init.c | 6 ++---- tools/testing/selftests/kvm/dirty_log_test.c | 6 ++---- tools/testing/selftests/kvm/include/kvm_util_base.h | 6 ++++++ tools/testing/selftests/kvm/lib/kvm_util.c | 6 ++---- 4 files changed, 12 insertions(+), 12 deletions(-) commit ffb7c77fd5039a01b2534465a2cdf7514f7fc9df Author: Sean Christopherson Date: Tue Feb 15 11:05:21 2022 -0800 KVM: sefltests: Use vcpu_ioctl() and __vcpu_ioctl() helpers Use the recently introduced vCPU-specific ioctl() helpers instead of open coding calls to ioctl() just to pretty print the ioctl name. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 142 +++++++--- .../selftests/kvm/include/x86_64/processor.h | 28 +- .../testing/selftests/kvm/kvm_binary_stats_test.c | 6 +- tools/testing/selftests/kvm/lib/kvm_util.c | 286 +-------------------- tools/testing/selftests/kvm/lib/x86_64/processor.c | 112 +------- 5 files changed, 135 insertions(+), 439 deletions(-) commit 1d438b3bc25e7ea2e7af95b9c07d88a287346df1 Author: Sean Christopherson Date: Tue Feb 15 10:08:45 2022 -0800 KVM: selftests: Split vcpu_set_nested_state() into two helpers Split vcpu_nested_state_set() into a wrapper that asserts, and an inner helper that does not. Passing a bool is all kinds of awful as it's unintuitive for readers and requires returning an 'int' from a function that for most users can never return anything other than "success". Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/kvm_util_base.h | 6 ++++-- tools/testing/selftests/kvm/lib/kvm_util.c | 20 ++++++++++---------- .../selftests/kvm/x86_64/vmx_set_nested_state_test.c | 4 ++-- 3 files changed, 16 insertions(+), 14 deletions(-) commit 2ab2c307c734266e3c3e89d14d39c3b2327cb750 Author: Sean Christopherson Date: Mon Feb 14 17:20:17 2022 -0800 KVM: selftests: Drop @mode from common vm_create() helper Drop @mode from vm_create() and have it use VM_MODE_DEFAULT. Add and use an inner helper, __vm_create(), to service the handful of tests that want something other than VM_MODE_DEFAULT. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/get-reg-list.c | 2 +- tools/testing/selftests/kvm/aarch64/psci_test.c | 2 +- .../selftests/kvm/aarch64/vcpu_width_config.c | 6 ++-- tools/testing/selftests/kvm/dirty_log_test.c | 2 +- .../testing/selftests/kvm/hardware_disable_test.c | 2 +- .../testing/selftests/kvm/include/kvm_util_base.h | 3 +- .../testing/selftests/kvm/kvm_binary_stats_test.c | 3 +- tools/testing/selftests/kvm/kvm_create_max_vcpus.c | 2 +- tools/testing/selftests/kvm/lib/kvm_util.c | 42 +++++++++++----------- .../testing/selftests/kvm/set_memory_region_test.c | 4 +-- .../selftests/kvm/x86_64/max_vcpuid_cap_test.c | 2 +- .../testing/selftests/kvm/x86_64/set_boot_cpu_id.c | 2 +- .../testing/selftests/kvm/x86_64/set_sregs_test.c | 2 +- .../selftests/kvm/x86_64/sev_migrate_tests.c | 8 ++--- 14 files changed, 42 insertions(+), 40 deletions(-) commit 02e04c15caeeb64a45d350a8fdeb32620b64a02d Author: Sean Christopherson Date: Tue Feb 15 10:15:00 2022 -0800 KVM: selftests: Make vcpu_ioctl() a wrapper to pretty print ioctl name Make vcpu_ioctl() a macro wrapper and pretty the _name_ of the ioctl on failure instead of the number. Add inner macros to allow handling cases where the name of the ioctl needs to be resolved higher up the stack, and to allow using the formatting for non-ioctl syscalls without being technically wrong. Deliberately do not use __stringify(), as that will expand the ioctl all the way down to its numerical sequence, again the intent is to print the name of the macro. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/kvm_util_base.h | 13 +++++++-- tools/testing/selftests/kvm/lib/kvm_util.c | 31 ++++++---------------- 2 files changed, 19 insertions(+), 25 deletions(-) commit 2b38a7398f20dbbfa88689819b21967489d284f5 Author: Sean Christopherson Date: Tue Feb 15 10:27:55 2022 -0800 KVM: selftests: Add another underscore to inner ioctl() helpers Add a second underscore to inner ioctl() helpers to better align with commonly accepted kernel coding style, and to allow using a single underscore variant in the future for macro shenanigans. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/get-reg-list.c | 6 +++--- tools/testing/selftests/kvm/aarch64/hypercalls.c | 2 +- .../selftests/kvm/aarch64/vcpu_width_config.c | 8 ++++---- tools/testing/selftests/kvm/aarch64/vgic_init.c | 2 +- .../testing/selftests/kvm/include/kvm_util_base.h | 8 ++++---- tools/testing/selftests/kvm/lib/kvm_util.c | 24 +++++++++++----------- tools/testing/selftests/kvm/lib/riscv/processor.c | 2 +- tools/testing/selftests/kvm/s390x/memop.c | 4 ++-- tools/testing/selftests/kvm/s390x/resets.c | 4 ++-- tools/testing/selftests/kvm/steal_time.c | 6 +++--- tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | 4 ++-- .../testing/selftests/kvm/x86_64/set_boot_cpu_id.c | 6 +++--- .../kvm/x86_64/vmx_nested_tsc_scaling_test.c | 2 +- 13 files changed, 39 insertions(+), 39 deletions(-) commit ccc82ba6bea45189a516c97480b2b70406832f35 Author: Sean Christopherson Date: Mon Feb 14 17:12:38 2022 -0800 KVM: selftests: Always open VM file descriptors with O_RDWR Drop the @perm param from vm_create() and always open VM file descriptors with O_RDWR. There's no legitimate use case for other permissions, and if a selftest wants to do oddball negative testing it can open code the necessary bits instead of forcing a bunch of tests to provide useless information. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/get-reg-list.c | 2 +- tools/testing/selftests/kvm/aarch64/psci_test.c | 2 +- .../selftests/kvm/aarch64/vcpu_width_config.c | 6 +++--- tools/testing/selftests/kvm/dirty_log_test.c | 2 +- tools/testing/selftests/kvm/hardware_disable_test.c | 2 +- tools/testing/selftests/kvm/include/kvm_util_base.h | 4 ++-- tools/testing/selftests/kvm/kvm_binary_stats_test.c | 2 +- tools/testing/selftests/kvm/kvm_create_max_vcpus.c | 2 +- tools/testing/selftests/kvm/lib/kvm_util.c | 20 +++++++++----------- tools/testing/selftests/kvm/set_memory_region_test.c | 4 ++-- tools/testing/selftests/kvm/x86_64/amx_test.c | 2 +- tools/testing/selftests/kvm/x86_64/evmcs_test.c | 2 +- .../selftests/kvm/x86_64/max_vcpuid_cap_test.c | 2 +- tools/testing/selftests/kvm/x86_64/set_boot_cpu_id.c | 2 +- tools/testing/selftests/kvm/x86_64/set_sregs_test.c | 2 +- .../testing/selftests/kvm/x86_64/sev_migrate_tests.c | 8 ++++---- tools/testing/selftests/kvm/x86_64/smm_test.c | 2 +- tools/testing/selftests/kvm/x86_64/state_test.c | 2 +- .../selftests/kvm/x86_64/vmx_preemption_timer_test.c | 2 +- 19 files changed, 34 insertions(+), 36 deletions(-) commit d379749fdab68d0eee05e149a25f8ef45d2f19bc Author: Sean Christopherson Date: Mon May 2 15:25:35 2022 -0700 KVM: selftests: Drop stale declarations from kvm_util_base.h Drop declarations for allocate_kvm_dirty_log() and vm_create_device(), which no longer have implementations. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/kvm_util_base.h | 5 ----- 1 file changed, 5 deletions(-) commit ff624e57d8dfb6c66ff8118aca7bad61d75428f0 Author: Sean Christopherson Date: Wed Feb 16 11:47:05 2022 -0800 KVM: selftests: Fix typo in vgic_init test When iterating over vCPUs, invoke access_v3_redist_reg() on the "current" vCPU instead of vCPU0, which is presumably what was intended by iterating over all vCPUs. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/vgic_init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1ca378f65378864b33a0356478252bd49bf6ef86 Author: Sean Christopherson Date: Wed Feb 23 14:52:12 2022 -0800 KVM: selftests: Fix buggy-but-benign check in test_v3_new_redist_regions() Update 'ret' with the return value of _kvm_device_access() prior to asserting that ret is non-zero. In the current code base, the flaw is benign as 'ret' is guaranteed to be -EBUSY from the previous run_vcpu(), which also means that errno==EBUSY prior to _kvm_device_access(), thus the "errno == EFAULT" part of the assert means that a false negative is impossible (unless the kernel is being truly mean and spuriously setting errno=EFAULT while returning success). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/vgic_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8deb03e75f6048b33b80025b6475c92975670c5b Author: Sean Christopherson Date: Wed Jun 1 12:16:53 2022 -0700 KVM: Fix references to non-existent KVM_CAP_TRIPLE_FAULT_EVENT The x86-only KVM_CAP_TRIPLE_FAULT_EVENT was (appropriately) renamed to KVM_CAP_X86_TRIPLE_FAULT_EVENT when the patches were applied, but the docs and selftests got left behind. Fix them. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 4 ++-- tools/testing/selftests/kvm/x86_64/triple_fault_event_test.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit dff9a198b052b5aff19456d80cc337fb885c59d2 Author: Andy Shevchenko Date: Mon May 30 21:13:13 2022 +0300 iio: adc: envelope-detector: Drop dependency on OF Nothing in this driver depends on OF so drop the dependency to remove the false impression such a dependency exists. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220530181313.2789-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 0fd268736c21d0fbd7ab09a166800eb20836c8c1 Author: Andy Shevchenko Date: Mon May 30 21:17:06 2022 +0300 iio: adc: sd_adc_modulator: Drop dependency on OF Nothing in this driver depends on OF so drop the dependency to remove the false impression such a dependency exists. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220530181706.3045-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 319dbcd84fd2676afb2bcfee575fbc1fce474ec3 Author: keliu Date: Fri May 27 09:17:39 2022 +0000 iio: Directly use ida_alloc()/free() Use ida_alloc()/ida_free() instead of deprecated ida_simple_get()/ida_simple_remove() . Signed-off-by: keliu Link: https://lore.kernel.org/r/20220527091739.2949426-1-liuke94@huawei.com Signed-off-by: Jonathan Cameron drivers/iio/industrialio-core.c | 6 +++--- drivers/iio/industrialio-trigger.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 1e800c060cf416f21ede7ca0297c1c76a86bbadc Author: LI Qingwu Date: Thu May 26 13:33:59 2022 +0000 dt-bindings: iio: accel: Add bmi085 and bmi090l bindings Adds the device-tree bindings for the Bosch BMI085 and BMI090L IMU, the accelerometer part. Datasheet: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmi085-ds001.pdf Datasheet: https://media.digikey.com/pdf/Data%20Sheets/Bosch/BST-BMI090L-DS000-00.pdf Signed-off-by: LI Qingwu Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220526133359.2261928-7-Qing-wu.Li@leica-geosystems.com.cn Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 57387d3c09c2a56fd6f53f2b14662a9ad6a93fed Author: LI Qingwu Date: Thu May 26 13:33:58 2022 +0000 iio: accel: bmi088: Add support for bmi090l accel Add supports for BMI090L, it's a high-performance Inertial Measurement Unit, with an accelerometer and gyroscope. The commit adds the accelerometer driver for the SPI interface. The gyroscope part is already supported by the BMG160 driver. Same as BMI088, BMI090L have the range of +/-3, 6, 12, and 24g. Reviewed-by: Alexandru Ardelean Signed-off-by: LI Qingwu Link: https://lore.kernel.org/r/20220526133359.2261928-6-Qing-wu.Li@leica-geosystems.com.cn Signed-off-by: Jonathan Cameron drivers/iio/accel/bmi088-accel-core.c | 7 +++++++ drivers/iio/accel/bmi088-accel-spi.c | 2 ++ drivers/iio/accel/bmi088-accel.h | 1 + 3 files changed, 10 insertions(+) commit 7a61456c83b368436ebd9e4ffe8c98d4062d3e73 Author: LI Qingwu Date: Thu May 26 13:33:57 2022 +0000 iio: accel: bmi088: Add support for bmi085 accel Add supports for BMI085, an Inertial Measurement Unit, with an accelerometer and gyroscope. The commit adds the accelerometer driver for the SPI interface. The gyroscope part is already supported by the BMG160 driver. Unlike BMI088, the BMI085 accelerometer ranges are +/-2, 4, 6, and 8g, the scales are calculated as 9.8/32768*pow(2,reg41+1). Reviewed-by: Alexandru Ardelean Signed-off-by: LI Qingwu Link: https://lore.kernel.org/r/20220526133359.2261928-5-Qing-wu.Li@leica-geosystems.com.cn Signed-off-by: Jonathan Cameron drivers/iio/accel/bmi088-accel-core.c | 7 +++++++ drivers/iio/accel/bmi088-accel-spi.c | 2 ++ drivers/iio/accel/bmi088-accel.h | 1 + 3 files changed, 10 insertions(+) commit 67ac266db853d9f1c20b94a411c0a3abfd90a589 Author: LI Qingwu Date: Thu May 26 13:33:56 2022 +0000 iio: accel: bmi088: modified the device name iio: accel: bmi088: modified the device name It is possible to have multiple sensors connected on the same platform. For support of different sensors, making it possible to obtain the device name by reading the chip id. If the device was found in the table but the device tree binding is different, the driver will carry on with a warning. If no matching device was found, the driver load the binding chip info. Tested case, test with bmi085 and bmi090 patches applied: connect 3 bmi090l to the system, and set device tree compatible: spi2.0: compatible = "bosch,bmi090l-accel"; spi2.2: compatible = "bosch,bmi088-accel"; spi2.4: compatible = "bosch,bmi085-accel"; Get a warning for the mismatched devices: bmi088_accel_spi spi2.2: unexpected chip id 0x1A bmi088_accel_spi spi2.4: unexpected chip id 0x1A Get the real present device name: /sys/bus/iio/devices/iio:device1/name:bmi090l-accel /sys/bus/iio/devices/iio:device3/name:bmi090l-accel /sys/bus/iio/devices/iio:device5/name:bmi090l-accel Signed-off-by: LI Qingwu Link: https://lore.kernel.org/r/20220526133359.2261928-4-Qing-wu.Li@leica-geosystems.com.cn Signed-off-by: Jonathan Cameron drivers/iio/accel/bmi088-accel-core.c | 35 ++++++++++++++++++++--------------- drivers/iio/accel/bmi088-accel-spi.c | 13 ++++++++++--- drivers/iio/accel/bmi088-accel.h | 7 ++++++- 3 files changed, 36 insertions(+), 19 deletions(-) commit 48d07b3be84eb1ea321df1fc3fd722e7751d7376 Author: LI Qingwu Date: Thu May 26 13:33:55 2022 +0000 iio: accel: bmi088: Make it possible to config scales The sensor can set the scales by writing the range register 0x41, The current driver has no interface to configure it. The commit adds the interface for config the scales. Reviewed-by: Alexandru Ardelean Signed-off-by: LI Qingwu Link: https://lore.kernel.org/r/20220526133359.2261928-3-Qing-wu.Li@leica-geosystems.com.cn Signed-off-by: Jonathan Cameron drivers/iio/accel/bmi088-accel-core.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit 733147729a9103f337569e07706f208535f3c707 Author: LI Qingwu Date: Thu May 26 13:33:54 2022 +0000 iio: accel: bmi088: Modified the scale calculate The units after application of scale are 100*m/s^2, The scale calculation is only for the device with the range of 3, 6, 12, and 24g, but some other chips have a range of 2, 4, 6, and 8g. Modified the scales from formula to a list, the scales in the list are calculated as 9.8/32768*pow(2,reg41+1)*1.5, refer to datasheet 5.3.4. The new units after the application of scale are m/s^2. Reviewed-by: Alexandru Ardelean Signed-off-by: LI Qingwu Link: https://lore.kernel.org/r/20220526133359.2261928-2-Qing-wu.Li@leica-geosystems.com.cn Signed-off-by: Jonathan Cameron drivers/iio/accel/bmi088-accel-core.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit f0ca36b031f634214b39648b1b6a9b9a33998144 Author: Alexandru Tachici Date: Thu May 26 16:46:02 2022 +0300 dt-bindings: iio: imu: adis16480: update maintainers Update bindings maintainerns section. Signed-off-by: Alexandru Tachici Acked-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20220526134603.75216-6-alexandru.tachici@analog.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/imu/adi,adis16480.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 065cd7e72e7f58d7c643ef143b2470e033a17ff6 Author: Alexandru Tachici Date: Thu May 26 16:46:01 2022 +0300 dt-bindings: iio: dac: AD5770R: update maintainers Update bindings maintainerns section. Signed-off-by: Alexandru Tachici Acked-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20220526134603.75216-5-alexandru.tachici@analog.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/dac/adi,ad5770r.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3cce981b60b23920d8f10ab7ba92048e2a9f4089 Author: Alexandru Tachici Date: Thu May 26 16:46:00 2022 +0300 dt-bindings: iio: adc: axi-adc: update maintainers Update bindings maintainerns section. Signed-off-by: Alexandru Tachici Acked-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20220526134603.75216-4-alexandru.tachici@analog.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/adi,axi-adc.yaml | 1 - 1 file changed, 1 deletion(-) commit 08f98a40823bd0a436f48315496aec18e0414f73 Author: Alexandru Tachici Date: Thu May 26 16:45:59 2022 +0300 dt-bindings: iio: adc: AD9467: update maintainers Update bindings maintainerns section. Signed-off-by: Alexandru Tachici Acked-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20220526134603.75216-3-alexandru.tachici@analog.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/adi,ad9467.yaml | 1 - 1 file changed, 1 deletion(-) commit 6be0d1fcb591822d236e84a45fe85ab4cecbd68d Author: Alexandru Tachici Date: Thu May 26 16:45:58 2022 +0300 dt-bindings: iio: accel: ADIS16240: update maintainers Update bindings maintainerns section. Signed-off-by: Alexandru Tachici Acked-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20220526134603.75216-2-alexandru.tachici@analog.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8941aab845747b0f3b96e6aacc13828cf65a7eb Author: Markuss Broks Date: Mon May 23 20:53:43 2022 +0300 proximity: vl53l0x: Handle the reset GPIO Handle the GPIO connected to the XSHUT/RST_N pin of VL53L0X. Signed-off-by: Markuss Broks Link: https://lore.kernel.org/r/20220523175344.5845-5-markuss.broks@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/proximity/vl53l0x-i2c.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit d3d6dba56dab4cd2fce41ba60ecd7044576750cf Author: Markuss Broks Date: Mon May 23 20:53:42 2022 +0300 proximity: vl53l0x: Handle the VDD regulator Handle the regulator supplying the VDD pin of VL53L0X. Signed-off-by: Markuss Broks Link: https://lore.kernel.org/r/20220523175344.5845-4-markuss.broks@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/proximity/vl53l0x-i2c.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 76d1eb09eb9e962b43c9cc45cae1799bf5fb210e Author: Markuss Broks Date: Mon May 23 20:53:41 2022 +0300 proximity: vl53l0x: Prefer pre-initialized interrupt flags On some boards interrupt type might be different than falling edge, like hardcoded in driver. Leave interrupt flags as they were pre-configured from the device-tree. If they're not provided, default to falling edge interrupts. Signed-off-by: Markuss Broks Link: https://lore.kernel.org/r/20220523175344.5845-3-markuss.broks@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/proximity/vl53l0x-i2c.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2b9208963b81f6671b9b4cfa9dd92314317de156 Author: Markuss Broks Date: Mon May 23 20:53:40 2022 +0300 dt-bindings: proximity: vl53l0x: Document optional supply and GPIO properties Add the optional properties for the VL53L0X ToF sensor to the device-tree binding. Acked-by: Krzysztof Kozlowski Signed-off-by: Markuss Broks Link: https://lore.kernel.org/r/20220523175344.5845-2-markuss.broks@gmail.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/proximity/st,vl53l0x.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit 574e60b3d79fbf4bd13027750b4d5a75814cfc37 Author: Li Zhengyu Date: Mon May 23 20:27:55 2022 +0800 iio: srf08: Remove redundant if statement (!val) has been checked outside the loop, remove redundant (val &&) from loop. Signed-off-by: Li Zhengyu Acked-by: Andreas Klinger Link: https://lore.kernel.org/r/20220523122755.90638-1-lizhengyu3@huawei.com Signed-off-by: Jonathan Cameron drivers/iio/proximity/srf08.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5daaa470bbddcb0e435f3210266bd81573a8a5c Author: Peter Rosin Date: Mon Apr 25 22:47:08 2022 +0200 iio: dac: ti-dac5571: add support for ti,dac121c081 It fits right in as a single 12-bit DAC. Reviewed-by: Sean Nyekjaer Signed-off-by: Peter Rosin Link: https://lore.kernel.org/r/a09a49a5-3d01-21f7-02ed-b191d70e7609@axentia.se Signed-off-by: Jonathan Cameron drivers/iio/dac/Kconfig | 2 +- drivers/iio/dac/ti-dac5571.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 9b7f05926be0c06e7d71e08abf9a882399ce7e97 Author: Peter Rosin Date: Mon Apr 25 22:46:58 2022 +0200 dt-bindings: iio: ti-dac5571: Add ti,dac121c081 It works much the same as ti,dac7571, so it fits in the "family" even if the name is a little bit different. Reviewed-by: Sean Nyekjaer Acked-by: Rob Herring Signed-off-by: Peter Rosin Link: https://lore.kernel.org/r/a230b7a8-4146-9483-48ee-0bebdd945731@axentia.se Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/dac/ti,dac5571.yaml | 1 + 1 file changed, 1 insertion(+) commit 0bd0bb1fc1e4430dff6856b59ddd63c72780d9be Author: Cosmin Tanislav Date: Sat May 14 21:20:10 2022 +0300 iio: accel: adxl367: do not update FIFO watermark on scan mode update Currently, the driver updates the FIFO watermark inside both update_scan_mode() and hwfifo_set_watermark(). Inside the IIO core, hwfifo_set_watermark() is called immediately after update_scan_mode(), making the first call to set_fifo_samples() redundant. Remove the first call to set_fifo_samples(), and merge the set_fifo_samples() function into the set_fifo_watermark() function. Also, since fifo_set_size is always set inside of update_scan_mode(), and it cannot be set to 0, remove the zero check from set_fifo_samples(). Signed-off-by: Cosmin Tanislav Link: https://lore.kernel.org/r/20220514182010.152784-1-cosmin.tanislav@analog.com Signed-off-by: Jonathan Cameron drivers/iio/accel/adxl367.c | 46 +++++++++------------------------------------ 1 file changed, 9 insertions(+), 37 deletions(-) commit d04d46dd82ad10bdc3c9ce6a513e1fa1336719c4 Author: Uwe Kleine-König Date: Sat May 14 15:32:50 2022 +0200 iio:magnetometer:mbc150: Make bmc150_magn_remove() return void bmc150_magn_remove() always returns zero. Make it return no value which makes it easier to see in the callers that there is no error to handle. Also the return value of i2c driver remove callbacks is ignored anyway. This prepares making i2c remove callbacks return void, too. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220514133250.307955-1-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/bmc150_magn.c | 3 +-- drivers/iio/magnetometer/bmc150_magn.h | 2 +- drivers/iio/magnetometer/bmc150_magn_i2c.c | 4 +++- 3 files changed, 5 insertions(+), 4 deletions(-) commit 70db0e93f7e71d0f9c83f48b048b8b15b1ce80ca Author: Julia Lawall Date: Sat May 21 13:11:18 2022 +0200 iio: chemical: bme680: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-68-Julia.Lawall@inria.fr Signed-off-by: Jonathan Cameron drivers/iio/chemical/bme680_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4b9367794323843fcdd2ceecd31ed59864c2bec Author: Julia Lawall Date: Sat May 21 13:11:04 2022 +0200 iio: proximity: ping: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-54-Julia.Lawall@inria.fr Signed-off-by: Jonathan Cameron drivers/iio/proximity/ping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7576bc05b36025b875084a725276941125c576b4 Author: Uwe Kleine-König Date: Sun May 15 17:59:29 2022 +0200 iio:light:vcnl4035: Improve error reporting for problems during .remove() Returning an error value in an i2c remove callback results in a generic error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. So instead of triggering the generic i2c error message, emit a more helpful message if a problem occurs and return 0 to suppress the generic message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220515155929.338656-9-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/light/vcnl4035.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit ab91da2f25746c2c30117d9ce93a7960ccd2f2cf Author: Uwe Kleine-König Date: Sun May 15 17:59:28 2022 +0200 iio:light:vcnl4000: Improve error reporting for problems during .remove() Returning an error value in an i2c remove callback results in a generic error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. So instead of triggering the generic i2c error message, emit a more helpful message if a problem occurs and return 0 to suppress the generic message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220515155929.338656-8-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/light/vcnl4000.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 5049646718d768caebc503a654d0e5f8950ddd14 Author: Uwe Kleine-König Date: Sun May 15 17:59:27 2022 +0200 iio:light:us5182d: Improve error reporting for problems during .remove() Returning an error value in an i2c remove callback results in a generic error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. So instead of triggering the generic i2c error message, emit a more helpful message if a problem occurs and return 0 to suppress the generic message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220515155929.338656-7-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/light/us5182d.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit be9f6004be88693575009d81e00a043e8c60bcb8 Author: Uwe Kleine-König Date: Sun May 15 17:59:26 2022 +0200 iio:light:pa12203001: Improve error reporting for problems during .remove() Returning an error value in an i2c remove callback results in a generic error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. So instead of triggering the generic i2c error message, emit a more helpful message if a problem occurs and return 0 to suppress the generic message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220515155929.338656-6-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/light/pa12203001.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 730cd2f54ebadeee7f7a13ffd260e1e73d55be2f Author: Uwe Kleine-König Date: Sun May 15 17:59:25 2022 +0200 iio:chemical:ccs811: Improve error reporting for problems during .remove() Returning an error value in an i2c remove callback results in a generic error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. So instead of triggering the generic i2c error message, emit a more helpful message if a problem occurs and return 0 to suppress the generic message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220515155929.338656-5-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/chemical/ccs811.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit a76209246d9fa6e4026683af41bccad86a2eec85 Author: Uwe Kleine-König Date: Sun May 15 17:59:24 2022 +0200 iio:chemical:atlas: Improve error reporting for problems during .remove() Returning an error value in an i2c remove callback results in a generic error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. So instead of triggering the generic i2c error message, emit a more helpful message if a problem occurs and return 0 to suppress the generic message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220515155929.338656-4-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/chemical/atlas-sensor.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 8f760ce7affd55c3058ac40cb1ba4346514cf602 Author: Uwe Kleine-König Date: Sun May 15 17:59:23 2022 +0200 iio:adc:ti-ads1015: Improve error reporting for problems during .remove() Returning an error value in an i2c remove callback results in a generic error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. So instead of triggering the generic i2c error message, emit a more helpful message if a problem occurs and return 0 to suppress the generic message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220515155929.338656-3-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/adc/ti-ads1015.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit ffa952e95d8c56cd1e06bc21e3b0baf8d212fef8 Author: Uwe Kleine-König Date: Sun May 15 17:59:22 2022 +0200 iio:adc:ina2xx: Improve error reporting for problems during .remove() Returning an error value in an i2c remove callback results in a generic error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. So instead of triggering the generic i2c error message, emit a more helpful message if a problem occurs and return 0 to suppress the generic message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220515155929.338656-2-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/adc/ina2xx-adc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 78f32011b24021bb96accc2a57791ce727cc166a Author: Biju Das Date: Sun May 15 07:03:36 2022 +0100 iio: adc: rzg2l_adc: Remove unnecessary channel check from rzg2l_adc_read_label() Remove unnecessary channel check from rzg2l_adc_read_label(), as the channel error handling is already done in probe(). Therefore no need to validate at runtime. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20220515060337.16513-3-biju.das.jz@bp.renesas.com Signed-off-by: Jonathan Cameron drivers/iio/adc/rzg2l_adc.c | 3 --- 1 file changed, 3 deletions(-) commit 153415feda2eec936e29be6d1e7f74375c5d6d0d Author: Biju Das Date: Sun May 15 07:03:35 2022 +0100 dt-bindings: iio: adc: Document Renesas RZ/G2UL ADC Document Renesas RZ/G2UL ADC bindings. RZ/G2UL ADC is almost identical to RZ/G2L, but it has 2 analog input channels compared to 8 channels on the RZ/G2L. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220515060337.16513-2-biju.das.jz@bp.renesas.com Signed-off-by: Jonathan Cameron .../bindings/iio/adc/renesas,rzg2l-adc.yaml | 28 ++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) commit c5a37ad0fccc95121d77c577ea5e635a867c99b9 Author: William Breathitt Gray Date: Tue May 10 13:31:00 2022 -0400 iio: dac: cio-dac: Utilize iomap interface This driver doesn't need to access I/O ports directly via inb()/outb() and friends. This patch abstracts such access by calling ioport_map() to enable the use of more typical ioread8()/iowrite8() I/O memory accessor calls. Suggested-by: David Laight Signed-off-by: William Breathitt Gray Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/c973ce9a326131552caf762381edf8e90be43cc5.1652201921.git.william.gray@linaro.org Signed-off-by: Jonathan Cameron drivers/iio/dac/cio-dac.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 73b8390cc27e096ab157be261ccc4eaaa6db87af Author: William Breathitt Gray Date: Tue May 10 13:30:59 2022 -0400 iio: adc: stx104: Utilize iomap interface This driver doesn't need to access I/O ports directly via inb()/outb() and friends. This patch abstracts such access by calling ioport_map() to enable the use of more typical ioread8()/iowrite8() I/O memory accessor calls. Suggested-by: David Laight Signed-off-by: William Breathitt Gray Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/64673797df382c52fc32fce24348b25a0b05e73a.1652201921.git.william.gray@linaro.org Signed-off-by: Jonathan Cameron drivers/iio/adc/stx104.c | 56 +++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 27 deletions(-) commit 48d1ae774099640a4ee8e96a02b7721b479a7e6f Author: Uwe Kleine-König Date: Sat May 14 15:04:32 2022 +0200 iio: health: afe4404: Remove duplicated error reporting in .remove() Returning an error value in an i2c remove callback results in an error message being emitted by the i2c core, but otherwise it doesn't make a difference. As afe4404_remove() already emits an error message on failure and the additional error message by the i2c core doesn't add any useful information, change the return value to zero to suppress this message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220514130432.304674-1-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/health/afe4404.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7cbb6681d7e5b88688234ad370e027a9346ff7a9 Author: Gwendal Grignou Date: Wed Apr 27 12:08:04 2022 -0700 iio: common: cros_ec_sensors: Add label attribute When sensor location is known, populate iio sysfs "label" attribute: * "accel-base" : the sensor is in the base of the convertible (2-1) device. * "accel-display" : the sensor is in the lid/display plane of the device. * "accel-camera" : the sensor is in the swivel camera subassembly. The non-standard |location| attribute is removed, the field |loc| in cros_ec_sensors_core_state is removed. It apply to standalone accelerometer as well as IMU (accelerometer + gyroscope) and sensors where the location is known (light). Signed-off-by: Gwendal Grignou Link: https://lore.kernel.org/r/20220427190804.961697-3-gwendal@chromium.org Signed-off-by: Jonathan Cameron drivers/iio/accel/cros_ec_accel_legacy.c | 2 +- .../common/cros_ec_sensors/cros_ec_sensors_core.c | 30 +++++++--------------- drivers/iio/light/cros_ec_light_prox.c | 2 -- drivers/iio/pressure/cros_ec_baro.c | 2 -- include/linux/iio/common/cros_ec_sensors_core.h | 2 -- 5 files changed, 10 insertions(+), 28 deletions(-) commit cc0bb2f106cb6293997e9114caa7887d91d22b26 Author: Gwendal Grignou Date: Wed Apr 27 12:08:03 2022 -0700 iio: ABI: Add a new location label Add "accel-camera" when an IMU is location near the camera in a swivel sub-assembly. These IMU are used for AR applications. Signed-off-by: Gwendal Grignou Link: https://lore.kernel.org/r/20220427190804.961697-2-gwendal@chromium.org Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio | 5 +++++ 1 file changed, 5 insertions(+) commit 39f0b95619d39695d0179dc5e74bdfa890f22e23 Author: Andy Shevchenko Date: Sat May 7 20:34:40 2022 +0300 iio: imu: st_lsm6dsx: Switch from of headers to mod_devicetable.h There is nothing directly using of specific interfaces in this driver, so lets not include the headers. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220507173440.29053-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3cf122c20bf835b53e8d2074611d68b7822be782 Author: Jagath Jog J Date: Thu May 5 19:00:19 2022 +0530 iio: accel: bma400: Add support for activity and inactivity events Add support for activity and inactivity events for all axis based on the threshold, duration and hysteresis value set from the userspace. INT1 pin is used to interrupt and event is pushed to userspace. Signed-off-by: Jagath Jog J Link: https://lore.kernel.org/r/20220505133021.22362-9-jagathjog1996@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/accel/bma400.h | 11 ++ drivers/iio/accel/bma400_core.c | 232 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 242 insertions(+), 1 deletion(-) commit 00ee658ff58177fccfc4d80e611f31884f8a16c4 Author: Jagath Jog J Date: Thu May 5 19:00:18 2022 +0530 iio: accel: bma400: Add activity recognition support Add support for activity recognition like STILL, WALKING, RUNNING and these events are pushed to the userspace whenever the STEP interrupt occurs. Signed-off-by: Jagath Jog J Link: https://lore.kernel.org/r/20220505133021.22362-8-jagathjog1996@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/accel/bma400_core.c | 85 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) commit d024af5b3970b9a9e7ae01629edf2e36827462e4 Author: Jagath Jog J Date: Thu May 5 19:00:17 2022 +0530 iio: accel: bma400: Add step change event Added support for event when there is a detection of step change. INT1 pin is used to interrupt and event is pushed to userspace. Signed-off-by: Jagath Jog J Link: https://lore.kernel.org/r/20220505133021.22362-7-jagathjog1996@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/accel/bma400.h | 2 ++ drivers/iio/accel/bma400_core.c | 76 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) commit d221de60eee374f00ede8a182ae4b3db7427c19c Author: Jagath Jog J Date: Thu May 5 19:00:16 2022 +0530 iio: accel: bma400: Add separate channel for step counter Added channel for step counter which can be enable or disable through the sysfs interface. Signed-off-by: Jagath Jog J Link: https://lore.kernel.org/r/20220505133021.22362-6-jagathjog1996@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/accel/bma400.h | 2 ++ drivers/iio/accel/bma400_core.c | 69 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 67 insertions(+), 4 deletions(-) commit ffe0ab6a96988daa8b316290c15e1c7bbb9d4211 Author: Jagath Jog J Date: Thu May 5 19:00:15 2022 +0530 iio: accel: bma400: Add triggered buffer support Added trigger buffer support to read continuous acceleration and temperature data from device with data ready interrupt which is mapped to INT1 pin. Signed-off-by: Jagath Jog J Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220505133021.22362-5-jagathjog1996@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/accel/Kconfig | 2 + drivers/iio/accel/bma400.h | 10 ++- drivers/iio/accel/bma400_core.c | 177 ++++++++++++++++++++++++++++++++++++++-- drivers/iio/accel/bma400_i2c.c | 2 +- drivers/iio/accel/bma400_spi.c | 2 +- 5 files changed, 185 insertions(+), 8 deletions(-) commit 12c99f859fd3da5fc8f8491826e7023001f54821 Author: Jagath Jog J Date: Thu May 5 19:00:14 2022 +0530 iio: accel: bma400: conversion to device-managed function This is a conversion to device-managed by using devm_iio_device_register() inside probe function. Previously the bma400 was not put into power down mode in some error paths in probe where it now is, but that should cause no harm. The dev_set_drvdata() call, bma400_remove() function and hooks in the I2C and SPI driver struct is removed as devm_iio_device_register() function is used to automatically unregister on driver detach. Signed-off-by: Jagath Jog J Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220505133021.22362-4-jagathjog1996@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/accel/bma400.h | 2 -- drivers/iio/accel/bma400_core.c | 77 ++++++++++++++++++++--------------------- drivers/iio/accel/bma400_i2c.c | 8 ----- drivers/iio/accel/bma400_spi.c | 6 ---- 4 files changed, 38 insertions(+), 55 deletions(-) commit 1bd2dc6ea863690aee5c45ebf09c9194c7a42c0d Author: Jagath Jog J Date: Thu May 5 19:00:13 2022 +0530 iio: accel: bma400: Reordering of header files Reordering of header files and removing the iio/sysfs.h since custom attributes are not being used in the driver. Signed-off-by: Jagath Jog J Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220505133021.22362-3-jagathjog1996@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/accel/bma400_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 747c7cf1592e226d40543231b26502b332d0ea2f Author: Jagath Jog J Date: Thu May 5 19:00:12 2022 +0530 iio: accel: bma400: Fix the scale min and max macro values Changing the scale macro values to match the bma400 sensitivity for 1 LSB of all the available ranges. Fixes: 465c811f1f20 ("iio: accel: Add driver for the BMA400") Signed-off-by: Jagath Jog J Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220505133021.22362-2-jagathjog1996@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/accel/bma400.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit 8dc0a72795e49abcda576ecb18072d1b91082711 Author: Uwe Kleine-König Date: Sat Apr 30 10:16:07 2022 +0200 iio:light:tsl2583: Remove duplicated error reporting in .remove() Returning an error value in an i2c remove callback results in an error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. As tsl2583_set_power_state() already emits an error message on failure and the additional error message by the i2c core doesn't add any useful information, change the return value to zero to suppress this message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220430081607.15078-10-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/light/tsl2583.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 58a6df5580bbfda6638325dcbc70614778f93067 Author: Uwe Kleine-König Date: Sat Apr 30 10:16:06 2022 +0200 iio:light:stk3310: Remove duplicated error reporting in .remove() Returning an error value in an i2c remove callback results in an error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. As stk3310_set_state() already emits an error message on failure and the additional error message by the i2c core doesn't add any useful information, change the return value to zero to suppress this message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220430081607.15078-9-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/light/stk3310.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 44ceb791182a555e1246eb825c0d2926ce758d20 Author: Uwe Kleine-König Date: Sat Apr 30 10:16:05 2022 +0200 iio:light:opt3001: Remove duplicated error reporting in .remove() Returning an error value in an i2c remove callback results in an error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. As opt3001_remove() already emits an error message on failure and the additional error message by the i2c core doesn't add any useful information, change the return value to zero to suppress this message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220430081607.15078-8-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/light/opt3001.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f0e34d262567ad027079e316a8497df3942ff3f9 Author: Uwe Kleine-König Date: Sat Apr 30 10:16:04 2022 +0200 iio:light:jsa1212: Remove duplicated error reporting in .remove() Returning an error value in an i2c remove callback results in an error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. As jsa1212_power_off() already emits an error message on failure and the additional error message by the i2c core doesn't add any useful information, change the return value to zero to suppress this message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220430081607.15078-7-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/light/jsa1212.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8d3d6baa4990c0d90672d3e97d2b3473feac8136 Author: Uwe Kleine-König Date: Sat Apr 30 10:16:03 2022 +0200 iio:light:isl29028: Remove duplicated error reporting in .remove() Returning an error value in an i2c remove callback results in an error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. As isl29028_clear_configure_ret() already emits an error message on failure and the additional error message by the i2c core doesn't add any useful information, change the return value to zero to suppress this message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220430081607.15078-6-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/light/isl29028.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5004e24a466ca32bf0d218bd7adb96cb2ef30450 Author: Uwe Kleine-König Date: Sat Apr 30 10:16:02 2022 +0200 iio:light:bh1780: Remove duplicated error reporting in .remove() Returning an error value in an i2c remove callback results in an error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. As bh1780_remove() already emits an error message on failure and the additional error message by the i2c core doesn't add any useful information, change the return value to zero to suppress this message. While at it, add the error code to the remaining error message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20220430081607.15078-5-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/light/bh1780.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 1db6926d611df76be068ba23abedfc410b29194c Author: Uwe Kleine-König Date: Sat Apr 30 10:16:01 2022 +0200 iio:accel:stk8ba50: Remove duplicated error reporting in .remove() Returning an error value in an i2c remove callback results in an error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. As stk8ba50_set_mode() already emits an error message on failure and the additional error message by the i2c core doesn't add any useful information, change the return value to zero to suppress this message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220430081607.15078-4-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/accel/stk8ba50.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1aec857d50ce3783f9a410908c0a226de02e4902 Author: Uwe Kleine-König Date: Sat Apr 30 10:16:00 2022 +0200 iio:accel:stk8312: Remove duplicated error reporting in .remove() Returning an error value in an i2c remove callback results in an error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. As stk8312_set_mode() already emits an error message on failure and the additional error message by the i2c core doesn't add any useful information, change the return value to zero to suppress this message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220430081607.15078-3-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/accel/stk8312.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit aae59bdf2585dafffc0bf71af729fe641fc2a771 Author: Uwe Kleine-König Date: Sat Apr 30 10:15:59 2022 +0200 iio:accel:mc3230: Remove duplicated error reporting in .remove() Returning an error value in an i2c remove callback results in an error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. As mc3230_set_opcon() already emits an error message on failure and the additional error message by the i2c core doesn't add any useful information, change the return value to zero to suppress this message. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220430081607.15078-2-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/accel/mc3230.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cffc293dd92e429a9857cb5565cdfc526e25fb08 Author: Andy Shevchenko Date: Wed May 4 14:35:57 2022 +0300 iio: proximity: srf04: Make use of device properties Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220504113557.59048-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/proximity/srf04.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit bf5ff730dcc2540d39ed572f551f79524c4d7eb8 Author: Andy Shevchenko Date: Wed Apr 13 21:56:56 2022 +0300 iio: trigger: stm32-lptimer-trigger: Make use of device properties Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Signed-off-by: Andy Shevchenko Reviewed-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20220413185656.21994-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/trigger/stm32-lptimer-trigger.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 74442c80d41df5d7e5059744d2e41e7341f4411b Author: Simon Holesch Date: Tue May 17 15:53:42 2022 +0200 ARM: dts: imx6ulz-bsh-smm-m2: Support proper board power off Supports initiating poweroff on SNVS_PMIC_ON_REQ signal. Signed-off-by: Simon Holesch Signed-off-by: Michael Trimarchi Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ulz-bsh-smm-m2.dts | 4 ++++ 1 file changed, 4 insertions(+) commit a180e4f09dd95ae3eee01e7046ca693be206e8ed Author: Marcel Ziswiler Date: Mon May 16 16:13:13 2022 +0200 ARM: dts: imx7-colibri: add support for Toradex Iris carrier boards Add support for Toradex Iris, small form-factor Pico-ITX Colibri Arm Computer Module family Carrier Board. Additional details available at https://www.toradex.com/products/carrier-board/iris-carrier-board Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 6 ++ arch/arm/boot/dts/imx7-colibri-iris-v2.dtsi | 112 +++++++++++++++++++++++ arch/arm/boot/dts/imx7-colibri-iris.dtsi | 108 ++++++++++++++++++++++ arch/arm/boot/dts/imx7d-colibri-emmc-iris-v2.dts | 21 +++++ arch/arm/boot/dts/imx7d-colibri-emmc-iris.dts | 21 +++++ arch/arm/boot/dts/imx7d-colibri-iris-v2.dts | 83 +++++++++++++++++ arch/arm/boot/dts/imx7d-colibri-iris.dts | 56 ++++++++++++ arch/arm/boot/dts/imx7s-colibri-iris-v2.dts | 78 ++++++++++++++++ arch/arm/boot/dts/imx7s-colibri-iris.dts | 51 +++++++++++ 9 files changed, 536 insertions(+) commit f78ad7406289b606d4a9f27122acb97775f32b15 Author: Marcel Ziswiler Date: Mon May 16 16:12:05 2022 +0200 ARM: dts: imx7-colibri: clean-up iomuxc pinctrl group naming Clean-up iomuxc pinctrl group naming. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri.dtsi | 70 ++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit 23acdfa0e2310404788226c37c97a279dd3f9e94 Author: Marcel Ziswiler Date: Mon May 16 16:11:32 2022 +0200 ARM: dts: imx7-colibri: set regulator-name properties Migrate comments to proper regulator-name properties. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri.dtsi | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit 4a0e8e15a390128d50336dad0e18eea571778c9b Author: Marcel Ziswiler Date: Mon May 16 16:11:20 2022 +0200 ARM: dts: imx7-colibri: remove leading zero from reg address Remove the unnecessary leading zero from the reg address. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5491ddafe381d8e1087921e120859c1bad82e10b Author: Marcel Ziswiler Date: Mon May 16 16:09:38 2022 +0200 ARM: dts: imx7-colibri: clean-up device enabling/disabling Disable most nodes on module-level to be enabled on carrier board-level. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 1 - arch/arm/boot/dts/imx7-colibri.dtsi | 5 ----- 2 files changed, 6 deletions(-) commit 18511d12b1a646cd33683f1efec125acd94bf3ee Author: Marcel Ziswiler Date: Mon May 16 15:47:28 2022 +0200 ARM: dts: imx7-colibri: alphabetical re-order Alphabetically re-order device tree iomuxc pinctrl pads, nodes and properties. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 6 +- arch/arm/boot/dts/imx7-colibri.dtsi | 368 ++++++++++++++-------------- 2 files changed, 186 insertions(+), 188 deletions(-) commit 12c8aa9b8d41c91cfd8c1e9dd96c0d0f563ee75d Author: Marcel Ziswiler Date: Mon May 16 15:47:27 2022 +0200 ARM: dts: imx7-colibri: add clarifying comments - Add clarifying comments. - Remove spurious new line. - Add required new line. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri-aster.dtsi | 11 ++ arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 15 +++ arch/arm/boot/dts/imx7-colibri.dtsi | 140 +++++++++++++---------- arch/arm/boot/dts/imx7d-colibri-aster.dts | 2 +- arch/arm/boot/dts/imx7d-colibri-emmc-aster.dts | 1 + arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dts | 1 + arch/arm/boot/dts/imx7d-colibri-emmc.dtsi | 2 + arch/arm/boot/dts/imx7d-colibri-eval-v3.dts | 5 + arch/arm/boot/dts/imx7d-colibri.dtsi | 2 + arch/arm/boot/dts/imx7s-colibri-eval-v3.dts | 4 + arch/arm/boot/dts/imx7s-colibri.dtsi | 1 + 11 files changed, 121 insertions(+), 63 deletions(-) commit 9b1617f948ada2e98e559ef6addc9fdf1af05a4f Author: Marcel Ziswiler Date: Mon May 16 15:47:26 2022 +0200 ARM: dts: imx7-colibri-aster: add ssp aka spi cs aka ss pins Add Colibri SSP aka SPI chip select (CS) aka slave select (SS) pins as either used on Arduino UNO compatible header X18 or Raspberry Pi compatible header X20. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri-aster.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 145c4d0a23e0c78a1afb9f321264665809a4420b Author: Marcel Ziswiler Date: Mon May 16 15:47:25 2022 +0200 ARM: dts: imx7-colibri: disable adc2 ADC2 is not available as it conflicts with the AD7879 resistive touchscreen. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri-aster.dtsi | 8 -------- arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 4 ---- arch/arm/boot/dts/imx7-colibri.dtsi | 3 ++- 3 files changed, 2 insertions(+), 13 deletions(-) commit 32f054fef145878c5331f9dd343014970a15ebfa Author: Marcel Ziswiler Date: Mon May 16 15:47:24 2022 +0200 ARM: dts: imx7-colibri-eval-v3: correct can controller comment Correct CAN controller comment. It is a MCP2515 rather than a mpc258x. Fixes: 66d59b678a87 ("ARM: dts: imx7-colibri: add MCP2515 CAN controller") Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba28db60d34271e8a3cf4d7158d71607e8b1e57f Author: Marcel Ziswiler Date: Mon May 16 15:47:23 2022 +0200 ARM: dts: imx7d-colibri-emmc: add cpu1 supply Each cpu-core is supposed to list its supply separately, add supply for cpu1. Fixes: 2d7401f8632f ("ARM: dts: imx7d: Add cpu1 supply") Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-colibri-emmc.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 5a0e80341496e44e1e1a73487a17aaa25ef07e6a Author: Marcel Ziswiler Date: Mon May 16 15:47:22 2022 +0200 ARM: dts: imx7-colibri: move rtc node Move I2C RTC to module-level to be enabled on carrier board-level. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri-aster.dtsi | 11 +++++------ arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 11 +++++------ arch/arm/boot/dts/imx7-colibri.dtsi | 7 +++++++ 3 files changed, 17 insertions(+), 12 deletions(-) commit 0c1356e084496ee1f288eda286acac6ec991d913 Author: Marcel Ziswiler Date: Mon May 16 15:47:21 2022 +0200 ARM: dts: imx7-colibri: clean-up usdhc1 and add sleep config Adding no-1-8-v property to usdhc1 to disable +1.8V signaling (UHS-I) mode on SoM dtsi level. Clean up no-1-8-v from Aster carrier board dtsi, which is using defaults from SoM dtsi and is not UHS-I capable. A carrier board may have a MMC/SD card slot with a switchable power supply. Add a pinctrl sleep used when the card power is off to avoid backfeeding to the card and add the "sleep" pinctrl to the usdhc1 controller. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri-aster.dtsi | 5 +- arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 3 -- arch/arm/boot/dts/imx7-colibri.dtsi | 75 +++++++++++++++++++---------- 3 files changed, 51 insertions(+), 32 deletions(-) commit fe20bfa51c055e50f6abd1189397cfb3c425b402 Author: Oleksandr Suvorov Date: Mon May 16 15:47:20 2022 +0200 ARM: dts: imx7-colibri: add delay for on-module phy supply There is a significant time required for PHY Micrel KSZ8041 to power up. Add a delay on start-up/wake-up before the FEC starts communicating with the PHY. LDO1 takes 6 ms, R39 + C44 takes ~100ms, the KSZ8041 datasheet asks for ~11 ms before starting any programming on the MIIM. Counting that, add a 200 ms delay to be sure the PHY is ready for programming. Also, add the same off delay time to give the capacitor time to discharge in order to properly reset. Signed-off-by: Oleksandr Suvorov Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri.dtsi | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 59cb7dfd9b1c8d80d5ee69d18ba5476130242b13 Author: Marcel Ziswiler Date: Mon May 16 15:47:19 2022 +0200 ARM: dts: imx7-colibri: move regulators Move regulators to module-level device tree given they are standard Colibri functionalities. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri-aster.dtsi | 27 ---------------- arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 25 --------------- arch/arm/boot/dts/imx7-colibri.dtsi | 39 ++++++++++++++++++++---- arch/arm/boot/dts/imx7d-colibri-aster.dts | 1 - arch/arm/boot/dts/imx7d-colibri-emmc-aster.dts | 1 - arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dts | 1 - arch/arm/boot/dts/imx7d-colibri-emmc.dtsi | 1 + arch/arm/boot/dts/imx7d-colibri-eval-v3.dts | 1 - arch/arm/boot/dts/imx7d-colibri.dtsi | 1 + 9 files changed, 35 insertions(+), 62 deletions(-) commit c37e0d58f2482eb9ab6f871f2c02c9983a22f60b Author: Max Krummenacher Date: Mon May 16 15:47:18 2022 +0200 ARM: dts: imx7-colibri: add ethernet aliases Add Ethernet aliases which is required to properly pass MAC address from bootloader. Signed-off-by: Max Krummenacher Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-colibri-emmc.dtsi | 6 ++++++ arch/arm/boot/dts/imx7d-colibri.dtsi | 6 ++++++ 2 files changed, 12 insertions(+) commit 0ef1969ea5699b00394e1a8c8c7f927b2d0bc5bb Author: Marcel Ziswiler Date: Mon May 16 15:47:17 2022 +0200 ARM: dts: imx7-colibri: move aliases, chosen, extcon and gpio-keys Move aliases, chosen, extcon and gpio-keys to module-level device tree given they are standard Colibri functionalities. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri-aster.dtsi | 18 ---------------- arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 31 ---------------------------- arch/arm/boot/dts/imx7-colibri.dtsi | 32 +++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 49 deletions(-) commit fd5d2974652c96935d94301af6eaf6b3585ab330 Author: Oleksandr Suvorov Date: Mon May 16 15:47:16 2022 +0200 ARM: dts: imx7-colibri: improve wake-up with gpio key The pin GPIO1_IO01 externally pulls down, it is required to sequentially connect this pin (signal WAKE_MICO#) to +3v3 and then disconnect it to trigger a wakeup interrupt. Adding the flag GPIO_PULL_DOWN allows the system to be woken up just connecting the pin GPIO1_IO01 to +3v3. Signed-off-by: Oleksandr Suvorov Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri-aster.dtsi | 2 +- arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit cfa7a1e150b991f925d1deda6a6a0d96b0520fbc Author: Oleksandr Suvorov Date: Mon May 16 15:47:15 2022 +0200 ARM: dts: imx7-colibri: improve licensing and compatible strings Migrate to the latest SPDX license identifier, update copyright period and improve compatible strings. Signed-off-by: Oleksandr Suvorov Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri-aster.dtsi | 5 ++--- arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 4 ++-- arch/arm/boot/dts/imx7-colibri.dtsi | 4 ++-- arch/arm/boot/dts/imx7d-colibri-aster.dts | 7 ++++--- arch/arm/boot/dts/imx7d-colibri-emmc-aster.dts | 8 +++++--- arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dts | 8 +++++--- arch/arm/boot/dts/imx7d-colibri-emmc.dtsi | 4 ++-- arch/arm/boot/dts/imx7d-colibri-eval-v3.dts | 7 ++++--- arch/arm/boot/dts/imx7d-colibri.dtsi | 4 ++-- arch/arm/boot/dts/imx7s-colibri-aster.dts | 7 ++++--- arch/arm/boot/dts/imx7s-colibri-eval-v3.dts | 7 ++++--- arch/arm/boot/dts/imx7s-colibri.dtsi | 4 ++-- 12 files changed, 38 insertions(+), 31 deletions(-) commit 136f88458d829987548b3321e7122e05acd78dd9 Author: Philippe Schenker Date: Mon May 16 15:47:14 2022 +0200 ARM: dts: imx7-colibri: add usb dual-role switching using extcon Add USB dual-role switching using extcon. Signed-off-by: Philippe Schenker Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 8 ++++++++ arch/arm/boot/dts/imx7-colibri.dtsi | 5 ++--- 2 files changed, 10 insertions(+), 3 deletions(-) commit 417092d5e7c0675c87decd77f142afb7a694874f Author: Stefan Agner Date: Mon May 16 15:47:13 2022 +0200 ARM: dts: imx7-colibri: set lcdif clock source to video pll Use the video PLL as clock source to assure proper pixel clock generation. Signed-off-by: Stefan Agner Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit b40549e9a07425b5633745de70edbe394898fb01 Author: Marcel Ziswiler Date: Mon May 16 15:47:12 2022 +0200 ARM: dts: imx7-colibri: add mdio phy node Add the MDIO bus with the respective PHY to allow for making changes to that easier. While at it also alphabetically re-order properties and improve indentation. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri.dtsi | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) commit dbeb8e72cc51536a70313e6d523dcb1429b40477 Author: Marcel Ziswiler Date: Mon May 16 15:47:11 2022 +0200 ARM: dts: imx7-colibri: overhaul display/touch functionality Rename display interface to match other modules to make it easier to use device tree overlays. The parallel RGB interface (lcdif) and all related stuff turn on in a device tree overlay. Keep them disabled in the main devicetree. As these subsystems are provided by module and not a part of boards, move their definitions into the module-level devicetree. Disable ad7879 touchscreen which turns on in a devic tree overlay. Remains it disabled in the main devicetree. Move Atmel MXT capacitive touch controller device tree nodes from carrier board to module level and add iomux pinctl groups for both the Capacitive Touch Adapter (using SODIMM 28/30) and the capacitive touch connector as found on later carrier boards (using SODIMM 106/107). Keep touchscreen and display nodes enabled for NAND based i.MX 7 modules, since device tree overlays are not yet supported. For the Colibri Evaluation Board keep the Capacitive Touch Adapter node disabled and PWM2, PWM3 enabled instead. For eMMC based modules keep nodes disabled to work in conjunction with device tree overlays. Add the iomuxc pinctrl group for the LVDS transceiver related signals to use it in a device tree overlay. While at it also alphabetically re=order them properties. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri-aster.dtsi | 53 ---------------- arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 66 ++++---------------- arch/arm/boot/dts/imx7-colibri.dtsi | 95 ++++++++++++++++++++++++----- arch/arm/boot/dts/imx7d-colibri-aster.dts | 20 ++++++ arch/arm/boot/dts/imx7d-colibri-eval-v3.dts | 32 ++++++++++ arch/arm/boot/dts/imx7s-colibri-aster.dts | 20 ++++++ arch/arm/boot/dts/imx7s-colibri-eval-v3.dts | 32 ++++++++++ 7 files changed, 197 insertions(+), 121 deletions(-) commit 1c231f0b81cbd461e50ad388fed261d81b8c22e3 Author: Max Krummenacher Date: Fri May 13 12:26:15 2022 +0200 ARM: dts: imx6qdl-colibri: backlight pwm: Adapt brightness steps Adapt the brightness steps as the backlight doesn't light up for very low duty cycles. Reviewed-by: Fabio Estevam Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-colibri.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14092ffbd7fd1d3aa4ea8006c747f225e9147dd6 Author: Max Krummenacher Date: Fri May 13 12:26:14 2022 +0200 ARM: dts: imx6qdl-colibri: backlight pwm: Simplify inverted backlight Set #pwm-cells to the default 3 to gain access to the parameter which allows inverting the PWM signal. This is useful to specify a backlight which has its highest brightness at 0. With the change to use the PWM with inverted polarity the PWM signal is inverted to how it was before this patch. This changes the meaning of the values in the brightness-levels property. I.e. the duty-cycle changes from x/255 to (255-x)/255. Keeping the brightness-levels will then have a big brightness jump from 0 to 127 duty cycle, the other 6 steps will then be barely noticeable. Change the brightness-levels to provide the same brightness-levels as before. Signed-off-by: Max Krummenacher Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-colibri.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c77c5b25c1353d5db4a7d2213fe12e54ab3a05dd Author: Max Krummenacher Date: Fri May 13 12:26:13 2022 +0200 ARM: dts: imx6qdl-colibri: Mux mclk for sgtl5000 with the codec node Move the pin muxing for MCLK used by the codec to the codec node instead of placing it inside the audmux pinctrl group. While no negative effects have been observed this should make sure that MCLK is provided when the codec driver is probed. Follows commit fa51e1dc4b91 ("ARM: dts: imx6qdl-apalis: Fix sgtl5000 detection issue") Reviewed-by: Fabio Estevam Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-colibri.dtsi | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 27f2533bcc6e909b85d3c1b738fa1f203ed8a835 Author: Yinjun Zhang Date: Thu Jun 9 10:01:36 2022 +0200 nfp: flower: support to offload pedit of IPv6 flowinto fields Previously the traffic class field is ignored while firmware has already supported to pedit flowinfo fields, including traffic class and flow label, now add it back. Signed-off-by: Yinjun Zhang Link: https://lore.kernel.org/r/20220609080136.151830-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/netronome/nfp/flower/action.c | 6 +++--- drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) commit 10e11aa241b688147e1b8ac908824fc058585154 Author: Bin Chen Date: Thu Jun 9 10:47:17 2022 +0200 ethernet: Remove vf rate limit check for drivers The commit a14857c27a50 ("rtnetlink: verify rate parameters for calls to ndo_set_vf_rate") has been merged to master, so we can to remove the now-duplicate checks in drivers. Signed-off-by: Bin Chen Signed-off-by: Baowen Zheng Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20220609084717.155154-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 2 +- drivers/net/ethernet/huawei/hinic/hinic_sriov.c | 6 ------ drivers/net/ethernet/intel/ice/ice_sriov.c | 10 ---------- drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c | 6 ++---- 4 files changed, 3 insertions(+), 21 deletions(-) commit 68c51dd9926ec79a54372f914b89ffdd659f8abe Merge: e10b02ee5b6c 138f9f50eb18 Author: Jakub Kicinski Date: Fri Jun 10 22:07:31 2022 -0700 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 10GbE Intel Wired LAN Driver Updates 2022-06-09 Maximilian Heyne adds reporting of VF statistics on ixgbe via iproute2 interface. Kai-Heng Feng removes duplicate defines from igb. Jiaqing Zhao fixes typos in e1000, ixgb, and ixgbe drivers. Julia Lawall fixes typos for fm10k, ixgbe, and ice drivers. * '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: drivers/net/ethernet/intel: fix typos in comments ixgbe: Fix typos in comments ixgb: Fix typos in comments e1000: Fix typos in comments igb: Remove duplicate defines drivers, ixgbe: export vf statistics ==================== Link: https://lore.kernel.org/r/20220609171257.2727150-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit e10b02ee5b6c95872064cf0a8e65f31951a31967 Merge: 5c281b4e529c 0f2c2693988a Author: Jakub Kicinski Date: Fri Jun 10 16:21:39 2022 -0700 Merge branch 'net-reduce-tcp_memory_allocated-inflation' Eric Dumazet says: ==================== net: reduce tcp_memory_allocated inflation Hosts with a lot of sockets tend to hit so called TCP memory pressure, leading to very bad TCP performance and/or OOM. The problem is that some TCP sockets can hold up to 2MB of 'forward allocations' in their per-socket cache (sk->sk_forward_alloc), and there is no mechanism to make them relinquish their share under mem pressure. Only under some potentially rare events their share is reclaimed, one socket at a time. In this series, I implemented a per-cpu cache instead of a per-socket one. Each CPU has a +1/-1 MB (256 pages on x86) forward alloc cache, in order to not dirty tcp_memory_allocated shared cache line too often. We keep sk->sk_forward_alloc values as small as possible, to meet memcg page granularity constraint. Note that memcg already has a per-cpu cache, although MEMCG_CHARGE_BATCH is defined to 32 pages, which seems a bit small. Note that while this cover letter mentions TCP, this work is generic and supports TCP, UDP, DECNET, SCTP. ==================== Link: https://lore.kernel.org/r/20220609063412.2205738-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit 0f2c2693988aeeb4c83a581fe58a28d526eecd39 Author: Eric Dumazet Date: Wed Jun 8 23:34:12 2022 -0700 net: unexport __sk_mem_{raise|reduce}_allocated These two helpers are only used from core networking. Signed-off-by: Eric Dumazet Reviewed-by: Shakeel Butt Acked-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski net/core/sock.c | 2 -- 1 file changed, 2 deletions(-) commit 4890b686f4088c90432149bd6de567e621266fa2 Author: Eric Dumazet Date: Wed Jun 8 23:34:11 2022 -0700 net: keep sk->sk_forward_alloc as small as possible Currently, tcp_memory_allocated can hit tcp_mem[] limits quite fast. Each TCP socket can forward allocate up to 2 MB of memory, even after flow became less active. 10,000 sockets can have reserved 20 GB of memory, and we have no shrinker in place to reclaim that. Instead of trying to reclaim the extra allocations in some places, just keep sk->sk_forward_alloc values as small as possible. This should not impact performance too much now we have per-cpu reserves: Changes to tcp_memory_allocated should not be too frequent. For sockets not using SO_RESERVE_MEM: - idle sockets (no packets in tx/rx queues) have zero forward alloc. - non idle sockets have a forward alloc smaller than one page. Note: - Removal of SK_RECLAIM_CHUNK and SK_RECLAIM_THRESHOLD is left to MPTCP maintainers as a follow up. Signed-off-by: Eric Dumazet Reviewed-by: Shakeel Butt Acked-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski include/net/sock.h | 29 ++--------------------------- net/core/datagram.c | 3 --- net/ipv4/tcp.c | 7 ------- net/ipv4/tcp_input.c | 4 ---- net/ipv4/tcp_timer.c | 19 ++++--------------- net/iucv/af_iucv.c | 2 -- net/mptcp/protocol.c | 2 +- net/sctp/sm_statefuns.c | 2 -- net/sctp/socket.c | 5 ----- net/sctp/stream_interleave.c | 2 -- net/sctp/ulpqueue.c | 4 ---- 11 files changed, 7 insertions(+), 72 deletions(-) commit 7c80b038d23e1f4c7fcc311f43f83b8c60e7fb80 Author: Eric Dumazet Date: Wed Jun 8 23:34:10 2022 -0700 net: fix sk_wmem_schedule() and sk_rmem_schedule() errors If sk->sk_forward_alloc is 150000, and we need to schedule 150001 bytes, we want to allocate 1 byte more (rounded up to one page), instead of 150001 :/ Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reviewed-by: Shakeel Butt Acked-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski include/net/sock.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 3cd3399dd7a84ada85cb839989cdf7310e302c7d Author: Eric Dumazet Date: Wed Jun 8 23:34:09 2022 -0700 net: implement per-cpu reserves for memory_allocated We plan keeping sk->sk_forward_alloc as small as possible in future patches. This means we are going to call sk_memory_allocated_add() and sk_memory_allocated_sub() more often. Implement a per-cpu cache of +1/-1 MB, to reduce number of changes to sk->sk_prot->memory_allocated, which would otherwise be cause of false sharing. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Reviewed-by: Shakeel Butt Signed-off-by: Jakub Kicinski include/net/sock.h | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) commit 0defbb0af775ef037913786048d099bbe8b9a2c2 Author: Eric Dumazet Date: Wed Jun 8 23:34:08 2022 -0700 net: add per_cpu_fw_alloc field to struct proto Each protocol having a ->memory_allocated pointer gets a corresponding per-cpu reserve, that following patches will use. Instead of having reserved bytes per socket, we want to have per-cpu reserves. Signed-off-by: Eric Dumazet Reviewed-by: Shakeel Butt Acked-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski include/net/sock.h | 1 + include/net/tcp.h | 2 ++ include/net/udp.h | 1 + net/core/sock.c | 4 ++++ net/decnet/af_decnet.c | 4 ++++ net/ipv4/tcp.c | 2 ++ net/ipv4/tcp_ipv4.c | 3 +++ net/ipv4/udp.c | 4 ++++ net/ipv4/udplite.c | 3 +++ net/ipv6/tcp_ipv6.c | 3 +++ net/ipv6/udp.c | 3 +++ net/ipv6/udplite.c | 3 +++ net/mptcp/protocol.c | 3 +++ net/sctp/socket.c | 7 +++++++ 14 files changed, 43 insertions(+) commit 100fdd1faf50557558e2911af4be32e515cb8036 Author: Eric Dumazet Date: Wed Jun 8 23:34:07 2022 -0700 net: remove SK_MEM_QUANTUM and SK_MEM_QUANTUM_SHIFT Due to memcg interface, SK_MEM_QUANTUM is effectively PAGE_SIZE. This might change in the future, but it seems better to avoid the confusion. Signed-off-by: Eric Dumazet Reviewed-by: Shakeel Butt Acked-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski include/net/sock.h | 8 +++----- net/core/sock.c | 16 ++++++++-------- net/ipv4/tcp.c | 4 ++-- net/ipv4/tcp_input.c | 2 +- net/ipv4/tcp_output.c | 2 +- net/ipv4/udp.c | 10 +++++----- net/mptcp/protocol.c | 8 ++++---- net/sctp/protocol.c | 4 ++-- 8 files changed, 26 insertions(+), 28 deletions(-) commit e70f3c701276a8825414dc650c4f76141a8704b4 Author: Eric Dumazet Date: Wed Jun 8 23:34:06 2022 -0700 Revert "net: set SK_MEM_QUANTUM to 4096" This reverts commit bd68a2a854ad5a85f0c8d0a9c8048ca3f6391efb. This change broke memcg on arches with PAGE_SIZE != 4096 Later, commit 2bb2f5fb21b04 ("net: add new socket option SO_RESERVE_MEM") also assumed PAGE_SIZE==SK_MEM_QUANTUM Following patches in the series will greatly reduce the over allocations problem. Signed-off-by: Eric Dumazet Reviewed-by: Shakeel Butt Acked-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski include/net/sock.h | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 5c281b4e529cd5a73b32ac561d79f448d18dda6f Merge: b97dcb85750b aa3398fb4b3f Author: Jakub Kicinski Date: Fri Jun 10 15:55:32 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net No conflicts. Signed-off-by: Jakub Kicinski commit 164f4064ca81eefcea29f7f5dcf394f92be1d0c0 Author: Al Viro Date: Sun May 22 11:38:11 2022 -0400 keep iocb_flags() result cached in struct file * calculate at the time we set FMODE_OPENED (do_dentry_open() for normal opens, alloc_file() for pipe()/socket()/etc.) * update when handling F_SETFL * keep in a new field - file->f_iocb_flags; since that thing is needed only before the refcount reaches zero, we can put it into the same anon union where ->f_rcuhead and ->f_llist live - those are used only after refcount reaches zero. Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Al Viro drivers/nvme/target/io-cmd-file.c | 2 +- fs/aio.c | 2 +- fs/fcntl.c | 1 + fs/file_table.c | 1 + fs/io_uring.c | 2 +- fs/open.c | 1 + include/linux/fs.h | 5 ++--- 7 files changed, 8 insertions(+), 6 deletions(-) commit 91b94c5d6ae55d1161633047ffeea644b110b35f Author: Al Viro Date: Sun May 22 09:39:27 2022 -0400 iocb: delay evaluation of IS_SYNC(...) until we want to check IOCB_DSYNC New helper to be used instead of direct checks for IOCB_DSYNC: iocb_is_dsync(iocb). Checks converted, which allows to avoid the IS_SYNC(iocb->ki_filp->f_mapping->host) part (4 cache lines) from iocb_flags() - it's checked in iocb_is_dsync() instead Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Al Viro block/fops.c | 2 +- fs/btrfs/file.c | 2 +- fs/direct-io.c | 2 +- fs/fuse/file.c | 2 +- fs/iomap/direct-io.c | 3 +-- fs/zonefs/super.c | 2 +- include/linux/fs.h | 10 ++++++++-- 7 files changed, 14 insertions(+), 9 deletions(-) commit e87f2c26c8085dac59978dee1beeb05cef31a9dd Author: Al Viro Date: Sun May 22 09:28:12 2022 -0400 struct file: use anonymous union member for rcuhead and llist Once upon a time we couldn't afford anon unions; these days minimal gcc version had been raised enough to take care of that. Reviewed-by: Jan Kara Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Al Viro fs/file_table.c | 16 ++++++++-------- include/linux/fs.h | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) commit eacdf4eaca632438c8453294727b94d7c5745c62 Author: Al Viro Date: Tue Jun 7 16:10:01 2022 -0400 btrfs: use IOMAP_DIO_NOSYNC ... instead of messing with iocb flags Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Al Viro fs/btrfs/file.c | 17 ----------------- fs/btrfs/inode.c | 3 ++- 2 files changed, 2 insertions(+), 18 deletions(-) commit 36518b6b4da7e8d4387bc19ad21e772f1060e9d7 Author: Al Viro Date: Tue Jun 7 16:04:03 2022 -0400 teach iomap_dio_rw() to suppress dsync New flag, equivalent to removal of IOCB_DSYNC from iocb flags. This mimics what btrfs is doing (and that's what btrfs will switch to). However, I'm not at all sure that we want to suppress REQ_FUA for those - all btrfs hack really cares about is suppression of generic_write_sync(). For now let's keep the existing behaviour, but I really want to hear more detailed arguments pro or contra. [folded brain fix from willy] Suggested-by: Christoph Hellwig Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Al Viro fs/iomap/direct-io.c | 20 +++++++++++--------- include/linux/iomap.h | 6 ++++++ 2 files changed, 17 insertions(+), 9 deletions(-) commit 9691e4f9ba6c7dc6af07b8a4feba6279d76f0003 Author: Jonas Lindner Date: Thu Jun 9 00:36:16 2022 +0200 selinux: fix typos in comments Signed-off-by: Jonas Lindner [PM: fixed duplicated subject line] Signed-off-by: Paul Moore security/selinux/hooks.c | 4 ++-- security/selinux/include/audit.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 7fc83cd079bba8b96b0f46e31f26c8f31c814146 Author: Kenneth Feng Date: Wed Jun 1 09:20:28 2022 +0800 drm/amd/pm: support BAMACO reset on smu_v13_0_7 support BAMACO reset on smu_v13_0_7, take BAMACO as a subset of BACO for the low latency, and it only happens on specific platforms. Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 1 + .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 57 +++++++++++++++++++++- 2 files changed, 56 insertions(+), 2 deletions(-) commit 5d6ec040ab44d23953a2efebfe02e41337952be7 Author: Kenneth Feng Date: Wed Jun 8 16:59:52 2022 +0800 drm/amd/pm: enable gfxoff on smu_v13_0_7 enable gfxoff on smu_v13_0_7 Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 3 +++ 1 file changed, 3 insertions(+) commit e3c60b4ef42d4db5b8d1434fa1741abd7f2fc850 Author: Kenneth Feng Date: Wed Jun 8 16:40:14 2022 +0800 drm/amd/pm: update the driver if header for smu_v13_0_7 update the driver if header for smu_v13_0_7 Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h | 62 +++++++++++++++------- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- 2 files changed, 45 insertions(+), 19 deletions(-) commit 247c7b0dac3cf1141b8bf5520adf2fac1a797aa9 Author: Andrey Grodzovsky Date: Tue May 17 14:56:34 2022 -0400 drm/amdgpu: Stop any pending reset if another in progress. We skip rest requests if another one is already in progress. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit cf727044144d47c3e8482b9a7775bd3f04a87341 Author: Andrey Grodzovsky Date: Tue May 17 14:27:49 2022 -0400 drm/amdgpu: Rename amdgpu_device_gpu_recover_imp back to amdgpu_device_gpu_recover We removed the wrapper that was queueing the recover function into reset domain queue who was using this name. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +- drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 2 +- drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 2 +- drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) commit b5fd0cf3ea377a7332721df8a8c8e7715f93c8d4 Author: Andrey Grodzovsky Date: Tue May 17 14:25:20 2022 -0400 drm/amdgpu: Add work_struct for GPU reset from kfd. We need to have a work_struct to cancel this reset if another already in progress. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 15 ++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 31 ------------------------------ 3 files changed, 15 insertions(+), 32 deletions(-) commit 2f83658ffc8c259f05e79dc632e34b26bb8b75c5 Author: Andrey Grodzovsky Date: Tue May 17 14:14:19 2022 -0400 drm/amdgpu: Add work_struct for GPU reset from debugfs We need to have a work_struct to cancel this reset if another already in progress. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) commit 25a2b22e4148b1ac91960e13f4f5de020ed04d05 Author: Andrey Grodzovsky Date: Tue May 17 12:09:27 2022 -0400 drm/admgpu: Serialize RAS recovery work directly into reset domain queue. Save the extra usless work schedule. Signed-off-by: Andrey Grodzovsky Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ab9a0b1f3661157d144fb744f3a197563e8e0ff4 Author: Andrey Grodzovsky Date: Tue May 17 11:17:35 2022 -0400 drm/amdgpu: Cache result of last reset at reset domain level. Will be read by executors of async reset like debugfs. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) commit 73b4b53276a1d6290cd4f47dbbc885b6e6e59ac6 Author: Andrey Grodzovsky Date: Thu May 19 09:47:28 2022 -0400 Revert "workqueue: remove unused cancel_work()" This reverts commit 6417250d3f894e66a68ba1cd93676143f2376a6f. amdpgu need this function in order to prematurly stop pending reset works when another reset work already in progress. Acked-by: Tejun Heo Signed-off-by: Andrey Grodzovsky Reviewed-by: Lai Jiangshan Reviewed-by: Christian König Signed-off-by: Alex Deucher include/linux/workqueue.h | 1 + kernel/workqueue.c | 9 +++++++++ 2 files changed, 10 insertions(+) commit 4c59b571fce6cedefc1c8e5158f7548f05c05ed6 Author: Ramesh Errabolu Date: Mon Jun 6 06:04:37 2022 -0500 drm/amdkfd: Remove field io_link_count from struct kfd_topology_device The field is redundant and does not serve any functional role Signed-off-by: Ramesh Errabolu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 -- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 1 - drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 1 - 3 files changed, 4 deletions(-) commit 7aade9ceeb88d8ca674141d2c245f0107032afb1 Author: Chandan Vurdigere Nataraj Date: Tue Jun 7 13:47:29 2022 +0530 drm/amdgpu/display: Fix compilation issues [Why] Getting below build errors: drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:1419:3: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough] default: ^ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:1535:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough] default: ^ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:3276:20: error: variable 'v1_5' is uninitialized when used here [-Werror,-Wuninitialized] for (i = 0; i < v1_5->number_of_path; ++i) ^~~~ [How] Fix compilation issues Signed-off-by: Chandan Vurdigere Nataraj Reviewed-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ce19bbe46fcfb88e75a6c7f691df4753a72daa81 Author: Chandan Vurdigere Nataraj Date: Tue Jun 7 14:58:57 2022 +0530 drm/amdgpu/display: Remove unnecessary typecasts and fix build issues [Why] Getting below errors: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c:1414:5: error: implicit conversion from enumeration type 'enum scan_direction_class' to different enumeration type 'enum dm_rotation_angle' [-Werror,-Wenum-conversion] mode_lib->vba.SourceScan[k], ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c:1744:22: error: implicit conversion from enumeration type 'enum scan_direction_class' to different enumeration type 'enum dm_rotation_angle' [-Werror,-Wenum-conversion] && (!(!IsVertical(mode_lib->vba.SourceScan[k])) || mode_lib->vba.DCCEnable[k] == true)) { ~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated. drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_util_32.c:5484:18: error: implicit conversion from enumeration type 'RequestType' to different enumeration type 'enum RequestType' [-Werror,-Wenum-conversion] RequestLuma = REQ_256Bytes; ~ ^~~~~~~~~~~~ 18 errors of similar kind [How] 1. Add typecast at relevant places 2. Move the enum RequestType definition ahead of declarations Signed-off-by: Chandan Vurdigere Nataraj Reviewed-by: Leo Li Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 5 +++-- .../dc/dml/dcn32/display_mode_vba_util_32.c | 25 +++++++++++----------- 2 files changed, 15 insertions(+), 15 deletions(-) commit 55e1c007e1bd3b30efac683f6d7eba6d4a13928d Merge: 25ebeeebcb54 63b9069653a7 Author: Mark Brown Date: Fri Jun 10 18:28:20 2022 +0100 ASoC: SOF: Add support ctx_save with IPC4 Merge series from Peter Ujfalusi : The context save functionality with IPC4 is triggered by sending a message to the firmware about the pending power down of the primary core by the host. In order to have this functionality implemented in a clean way we need to introduce a new IPC level PM ops for core state management and use that instead of open coding IPC messages here and there. The first patch updates the ctx store/ctx_restore documentation to clarify that they are optional. commit 3dafe0648ddd9c40666069e90b8a8a6162c452aa Author: Damien Le Moal Date: Thu Jun 9 11:24:56 2022 +0900 scsi: libsas: Introduce struct smp_rps_resp Similarly to sas report general and discovery responses, define the structure struct smp_rps_resp to handle SATA PHY report responses using a structure with a size that is exactly equal to the sas defined response size. With this change, struct smp_resp becomes unused and is removed. Link: https://lore.kernel.org/r/20220609022456.409087-4-damien.lemoal@opensource.wdc.com Reviewed-by: John Garry Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen drivers/scsi/aic94xx/aic94xx_dev.c | 2 +- drivers/scsi/libsas/sas_expander.c | 4 ++-- drivers/scsi/libsas/sas_internal.h | 2 +- include/scsi/libsas.h | 2 +- include/scsi/sas.h | 8 ++------ 5 files changed, 7 insertions(+), 11 deletions(-) commit 44f2bfe9ef082f76184d4a048c995729d14ec45d Author: Damien Le Moal Date: Thu Jun 9 11:24:55 2022 +0900 scsi: libsas: Introduce struct smp_rg_resp When compiling with gcc 12, several warnings are thrown by gcc when compiling drivers/scsi/libsas/sas_expander.c, e.g.: In function ‘sas_get_ex_change_count’, inlined from ‘sas_find_bcast_dev’ at drivers/scsi/libsas/sas_expander.c:1816:8: drivers/scsi/libsas/sas_expander.c:1781:20: warning: array subscript ‘struct smp_resp[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Warray-bounds] 1781 | if (rg_resp->result != SMP_RESP_FUNC_ACC) { | ~~~~~~~^~~~~~~~ This is due to the use of the struct smp_resp to aggregate all possible response types using a union but allocating a response buffer with a size exactly equal to the size of the response type needed. This leads to access to fields of struct smp_resp from an allocated memory area that is smaller than the size of struct smp_resp. Fix this by defining struct smp_rg_resp for sas report general responses. Link: https://lore.kernel.org/r/20220609022456.409087-3-damien.lemoal@opensource.wdc.com Reviewed-by: John Garry Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_expander.c | 31 +++++++++++++------------------ include/scsi/sas.h | 8 ++++++++ 2 files changed, 21 insertions(+), 18 deletions(-) commit c3752f44604f3bc4f3ce6e169fa32d16943ff70b Author: Damien Le Moal Date: Thu Jun 9 11:24:54 2022 +0900 scsi: libsas: Introduce struct smp_disc_resp When compiling with gcc 12, several warnings are thrown by gcc when compiling drivers/scsi/libsas/sas_expander.c, e.g.: In function ‘sas_get_phy_change_count’, inlined from ‘sas_find_bcast_phy.constprop’ at drivers/scsi/libsas/sas_expander.c:1737:9: drivers/scsi/libsas/sas_expander.c:1697:39: warning: array subscript ‘struct smp_resp[0]’ is partly outside array bounds of ‘unsigned char[56]’ [-Warray-bounds] 1697 | *pcc = disc_resp->disc.change_count; | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~ This is due to the use of the struct smp_resp to aggregate all possible response types using a union but allocating a response buffer with a size exactly equal to the size of the response type needed. This leads to access to fields of struct smp_resp from an allocated memory area that is smaller than the size of struct smp_resp. Fix this by defining struct smp_disc_resp for sas discovery operations. Since this structure and the generic struct smp_resp are identical for the little endian and big endian archs, move the definition of these structures at the end of include/scsi/sas.h to avoid repeating their definition. Link: https://lore.kernel.org/r/20220609022456.409087-2-damien.lemoal@opensource.wdc.com Reviewed-by: John Garry Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_expander.c | 32 ++++++++++++++------------------ include/scsi/sas.h | 28 ++++++++++++---------------- 2 files changed, 26 insertions(+), 34 deletions(-) commit 0f4d7d556125019287833e8b312b3b6f0a10e58a Author: Nilesh Javali Date: Wed Jun 8 04:58:49 2022 -0700 scsi: qla2xxx: Update version to 10.02.07.600-k Link: https://lore.kernel.org/r/20220608115849.16693-11-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bcf536072f7475c65f21fd1681e94f99c04f9d15 Author: Quinn Tran Date: Wed Jun 8 04:58:48 2022 -0700 scsi: qla2xxx: edif: Fix slow session teardown User experience slow recovery when target device went through a stop/start of the authentication application (app_stop/app_start). Between the period of app_stop and app_start on the target device, target device choose to send ELS Reject for any receive AUTH ELS command. At this time, authentication application does not do ELS reject if it encounters error. Therefore, AUTH ELS reject signify authentication application is not running. If driver passes up the AUTH ELS Reject to the authentication application, then it would result in authentication application retrying/resending the same AUTH ELS command again + delay. As a work around, driver should trigger a session tear down where it tells the local authentication application to also tear down. At the next relogin, both sides are then synchronized. Link: https://lore.kernel.org/r/20220608115849.16693-10-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_isr.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) commit 37be3f9d6993a721bc019f03c97ea0fe66319997 Author: Quinn Tran Date: Wed Jun 8 04:58:47 2022 -0700 scsi: qla2xxx: edif: Reduce N2N thrashing at app_start time For N2N + remote WWPN is bigger than local adapter, remote adapter will login to local adapter while authentication application is not running. When authentication application starts, the current session in FW needs to to be invalidated. Make sure the old session is torn down before triggering a relogin. Link: https://lore.kernel.org/r/20220608115849.16693-9-njavali@marvell.com Fixes: 4de067e5df12 ("scsi: qla2xxx: edif: Add N2N support for EDIF") Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_edif.c | 47 +++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 13 deletions(-) commit ec538eb838f334453b10e7e9b260f0c358018a37 Author: Quinn Tran Date: Wed Jun 8 04:58:46 2022 -0700 scsi: qla2xxx: edif: Fix no logout on delete for N2N The driver failed to send implicit logout on session delete. For edif, this failed to flush any lingering SA index in FW. Set a flag to turn on implicit logout early in the session recovery to make sure the logout will go out in case of error. Link: https://lore.kernel.org/r/20220608115849.16693-8-njavali@marvell.com Fixes: 4de067e5df12 ("scsi: qla2xxx: edif: Add N2N support for EDIF") Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_iocb.c | 3 +++ 1 file changed, 3 insertions(+) commit a8fdfb0b39c2b31722c70bdf2272b949d5af4b7b Author: Quinn Tran Date: Wed Jun 8 04:58:45 2022 -0700 scsi: qla2xxx: edif: Fix session thrash Current code prematurely sends out PRLI before authentication application has given the OK to do so. This causes PRLI failure and session teardown. Prevents PRLI from going out before authentication app gives the OK. Link: https://lore.kernel.org/r/20220608115849.16693-7-njavali@marvell.com Fixes: 91f6f5fbe87b ("scsi: qla2xxx: edif: Reduce connection thrash") Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_edif.c | 2 +- drivers/scsi/qla2xxx/qla_edif.h | 4 ++++ drivers/scsi/qla2xxx/qla_init.c | 10 +++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) commit d7e2e4a68fc047a025afcd200e6b7e1fbc8b1999 Author: Quinn Tran Date: Wed Jun 8 04:58:44 2022 -0700 scsi: qla2xxx: edif: Tear down session if keys have been removed If all keys for a session have been deleted, trigger a session teardown. Link: https://lore.kernel.org/r/20220608115849.16693-6-njavali@marvell.com Fixes: dd30706e73b7 ("scsi: qla2xxx: edif: Add key update") Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 5 +++++ drivers/scsi/qla2xxx/qla_isr.c | 1 + 2 files changed, 6 insertions(+) commit 24c796098f5395477f7f7ebf8e24f3f08a139f71 Author: Quinn Tran Date: Wed Jun 8 04:58:43 2022 -0700 scsi: qla2xxx: edif: Fix no login after app start The scenario is this: User loaded driver but has not started authentication app. All sessions to secure device will exhaust all login attempts, fail, and in stay in deleted state. Then some time later the app is started. The driver will replenish the login retry count, trigger delete to prepare for secure login. After deletion, relogin is triggered. For the session that is already deleted, the delete trigger is a no-op. If none of the sessions trigger a relogin, no progress is made. Add a relogin trigger. Link: https://lore.kernel.org/r/20220608115849.16693-5-njavali@marvell.com Fixes: 7ebb336e45ef ("scsi: qla2xxx: edif: Add start + stop bsgs") Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_edif.c | 1 + 1 file changed, 1 insertion(+) commit 0dbfce5255fe8d069a1a3b712a25b263264cfa58 Author: Quinn Tran Date: Wed Jun 8 04:58:42 2022 -0700 scsi: qla2xxx: edif: Reduce disruption due to multiple app start Multiple app start can trigger a session bounce. Make driver skip over session teardown if app start is seen more than once. Link: https://lore.kernel.org/r/20220608115849.16693-4-njavali@marvell.com Fixes: 7ebb336e45ef ("scsi: qla2xxx: edif: Add start + stop bsgs") Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_edif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2b659ed67a12f39f56d8dcad9b5d5a74d67c01b3 Author: Quinn Tran Date: Wed Jun 8 04:58:41 2022 -0700 scsi: qla2xxx: edif: Send LOGO for unexpected IKE message If the session is down and the local port continues to receive AUTH ELS messages, the driver needs to send back LOGO so that the remote device knows to tear down its session. Terminate and clean up the AUTH ELS exchange followed by a passthrough LOGO. Link: https://lore.kernel.org/r/20220608115849.16693-3-njavali@marvell.com Fixes: 225479296c4f ("scsi: qla2xxx: edif: Reject AUTH ELS on session down") Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_edif.c | 19 +++++++++++++++++-- drivers/scsi/qla2xxx/qla_fw.h | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) commit 63ab6cb582fad3757a03f466db671729b97f2df8 Author: Quinn Tran Date: Wed Jun 8 04:58:40 2022 -0700 scsi: qla2xxx: edif: Fix I/O timeout due to over-subscription The current edif code does not keep track of FW IOCB resources. This led to IOCB queue full on error recovery (I/O timeout). Make use of the existing code that tracks IOCB resources to prevent over-subscription. Link: https://lore.kernel.org/r/20220608115849.16693-2-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_edif.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6548c884a595391fab172faeae39e2b329b848f3 Author: Srinivas Kandagatla Date: Fri Jun 10 15:48:18 2022 +0100 ASoC: qdsp6: q6apm-dai: unprepare stream if its already prepared prepare callback can be called multiple times, so unprepare the stream if its already prepared. Without this DSP is not happy to setting the params on a already prepared graph. Fixes: 9b4fe0f1cd79 ("ASoC: qdsp6: audioreach: add q6apm-dai support") Reported-by: Srinivasa Rao Mandadapu Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220610144818.511797-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/qcom/qdsp6/q6apm-dai.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 81eef68f3bb78f5b3dc29032ffd804a4a2d7aaf0 Author: Amadeusz Sławiński Date: Fri Jun 10 14:44:20 2022 +0200 ASoC: Remove unused hw_write_t type Commit 81da8a0b7975 ("ASoC: remove codec hw_write/control_data") removed use of hw_write_t in struct snd_soc_codec, but it left type definition. Fully clean it up. Fixes: 81da8a0b7975 ("ASoC: remove codec hw_write/control_data") Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220610124420.4160986-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown include/sound/soc.h | 2 -- 1 file changed, 2 deletions(-) commit 46c80e72c16adff20f61240f887c4842e80cb6ec Author: Amadeusz Sławiński Date: Fri Jun 10 14:42:57 2022 +0200 ASoC: Intel: avs: Fix parsing UUIDs in topology Use correct type for parsing UUIDs, this eliminates warning present, when compiling with W=1. Fixes: 34ae2cd53673 ("ASoC: Intel: avs: Add topology parsing infrastructure") Reported-by: Pierre-Louis Bossart Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220610124257.4160658-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 41d97397d08c83ebbac7a48ce31f6e2f5cc4de79 Author: Krzysztof Kozlowski Date: Thu May 26 22:42:16 2022 +0200 arm64: dts: rockchip: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526204218.832029-1-krzysztof.kozlowski@linaro.org Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/px30.dtsi | 2 +- arch/arm64/boot/dts/rockchip/rk3368.dtsi | 6 +++--- arch/arm64/boot/dts/rockchip/rk3399-evb.dts | 2 +- arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 2 +- arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts | 2 +- arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) commit 4b076db78db48c67263ebde810a4475d9503713c Author: Krzysztof Kozlowski Date: Thu May 26 22:42:17 2022 +0200 ARM: dts: rockchip: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220526204218.832029-2-krzysztof.kozlowski@linaro.org Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron-broadcom-bluetooth.dtsi | 10 +++++----- arch/arm/boot/dts/rv1108-elgin-r1.dts | 14 +++++++------- arch/arm/boot/dts/rv1108-evb.dts | 14 +++++++------- arch/arm/boot/dts/rv1108.dtsi | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-) commit 25ebeeebcb5493b42b6d43e4f4c49823782b83af Merge: c5d41ca7b256 1e90de2c9a40 Author: Mark Brown Date: Fri Jun 10 17:21:29 2022 +0100 ASoC: SOF: ipc3-dtrace: Handle race during initialization Merge series from Peter Ujfalusi : This series handles the race which can result missing the first position update after the trace is enabled. In short: the firmware might send the position update (if we have enough trace data generated) after the dma-trace is enabled by the TRACE_DMA_PARAMS_EXT message. Depending on scheduling, load, preemption on Linux side we have seen that occasionally this first position update got missed and we missed reading it out. A new state and more strict handling of host_offset can overcome this issue, making the dtrace more reliable. commit 926034353d3c67db1ffeab47dcb7f6bdac02a263 Author: Dan Carpenter Date: Mon May 9 12:03:00 2022 +0300 fs/ntfs3: Don't clear upper bits accidentally in log_replay() The "vcn" variable is a 64 bit. The "log->clst_per_page" variable is a u32. This means that the mask accidentally clears out the high 32 bits when it was only supposed to clear some low bits. Fix this by adding a cast to u64. Fixes: b46acd6a6a62 ("fs/ntfs3: Add NTFS journal") Signed-off-by: Dan Carpenter Reviewed-by: Namjae Jeon Signed-off-by: Konstantin Komarov fs/ntfs3/fslog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c349fad389c5916facead610d454250f67cfb20b Merge: 67b9d64139e1 af7c2d4145b5 Author: Mark Brown Date: Fri Jun 10 16:57:39 2022 +0100 spi: atmel-quadspi: add runtime pm support Merge series from Claudiu Beznea : The following series adds runtime PM support for atmel-quadspi driver. clk_disable()/clk_enable() is called on proper runtime_suspend()/runtime_resume() ops. Along with it 2 minor cleanups were added (patches 2/3, 3/3). commit c5d41ca7b2567f55c5448da00cf5013b98ba14db Merge: 1149ebb6ffc5 2fbe0953732e Author: Mark Brown Date: Fri Jun 10 16:57:37 2022 +0100 ASoC: codecs: qualcomm move gain to S8_TLV Merge series from Srinivas Kandagatla : Move all the digital and IIR gains form using SX_TLV to S8_TLV, these gains are actually 8 bit gains with 7th signed bit and ranges from -84dB to +40dB Tested on DB410c with Headset playback commit b97dcb85750b7e8bc5aaed5403ddf4b0552c7993 Merge: 7defbc9aed2b 1449c24e71a3 Author: Jakub Kicinski Date: Fri Jun 10 08:57:33 2022 -0700 Merge tag 'wireless-next-2022-06-10' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Johannes Berg says: ==================== wireless-next patches for v5.20 Here's a first set of patches for v5.20. This is just a queue flush, before we get things back from net-next that are causing conflicts, and then can start merging a lot of MLO (multi-link operation, part of 802.11be) code. Lots of cleanups all over. The only notable change is perhaps wilc1000 being the first driver to disable WEP (while enabling WPA3). * tag 'wireless-next-2022-06-10' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (29 commits) wifi: mac80211_hwsim: Directly use ida_alloc()/free() wifi: mac80211: refactor some key code wifi: mac80211: remove cipher scheme support wifi: nl80211: fix typo in comment wifi: virt_wifi: fix typo in comment rtw89: add new state to CFO state machine for UL-OFDMA rtw89: 8852c: add trigger frame counter ieee80211: add trigger frame definition wifi: wfx: Remove redundant NULL check before release_firmware() call wifi: rtw89: support MULTI_BSSID and correct BSSID mask of H2C wifi: ray_cs: Drop useless status variable in parse_addr() wifi: ray_cs: Utilize strnlen() in parse_addr() wifi: rtw88: use %*ph to print small buffer wifi: wilc1000: add IGTK support wifi: wilc1000: add WPA3 SAE support wifi: wilc1000: remove WEP security support wifi: wilc1000: use correct sequence of RESET for chip Power-UP/Down wifi: rtlwifi: fix error codes in rtl_debugfs_set_write_h2c() wifi: rtw88: Fix Sparse warning for rtw8821c_hw_spec wifi: rtw88: Fix Sparse warning for rtw8723d_hw_spec ... ==================== Link: https://lore.kernel.org/r/20220610142838.330862-1-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit 1149ebb6ffc5f5556309c6703caf05af81496132 Merge: c7b6c95c3ef3 1eb73102da28 Author: Mark Brown Date: Fri Jun 10 16:57:35 2022 +0100 ASoC: codecs: Series of fixes for realtek codecs used on RVPs Merge series from Amadeusz Sławiński : Our tests platforms do use realtek codecs, while implementing avs driver and machine boards for it, we identified quite a lot of problems with those codec drivers. commit 7defbc9aed2b1fdf21586b78e085c468fd95a2d1 Merge: 6cbd05b2d07a 9a7a1be6b618 Author: Jakub Kicinski Date: Fri Jun 10 08:36:08 2022 -0700 Merge branch 'ptp_ocp-set-of-small-cleanups' Andy Shevchenko says: ==================== ptp_ocp: set of small cleanups The set of (independent) cleanups against ptp_ocp driver. Each patch has its own description, no need to repeat it here. ==================== Link: https://lore.kernel.org/r/20220608120358.81147-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jakub Kicinski commit 9a7a1be6b618fb1c73f497c7f465dd355dca0b13 Author: Andy Shevchenko Date: Wed Jun 8 15:03:58 2022 +0300 ptp_ocp: replace kzalloc(x*y) by kcalloc(y, x) While here it may be no difference, the kcalloc() has some checks against overflow and it's logically correct to call it for an array. Signed-off-by: Andy Shevchenko Acked-by: Vadim Fedorenko Signed-off-by: Jakub Kicinski drivers/ptp/ptp_ocp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0fb0bf7a8c751b39b63456b04a74dee3ecfd2204 Author: Andy Shevchenko Date: Wed Jun 8 15:03:57 2022 +0300 ptp_ocp: do not call pci_set_drvdata(pdev, NULL) Cleaning up driver data is actually already handled by driver core, so there is no need to do it manually. Signed-off-by: Andy Shevchenko Acked-by: Vadim Fedorenko Signed-off-by: Jakub Kicinski drivers/ptp/ptp_ocp.c | 2 -- 1 file changed, 2 deletions(-) commit 3a544ebf9f99b612442064c792f34de5bad3cb31 Author: Andy Shevchenko Date: Wed Jun 8 15:03:56 2022 +0300 ptp_ocp: drop duplicate NULL check in ptp_ocp_detach() Since platform_device_unregister() is NULL-aware, we don't need to duplicate this check. Remove it and fold the rest of the code. Signed-off-by: Andy Shevchenko Acked-by: Vadim Fedorenko Signed-off-by: Jakub Kicinski drivers/ptp/ptp_ocp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1132bb29993e0245515a3a519c1ff7f032ab4f7c Author: Andy Shevchenko Date: Wed Jun 8 15:03:55 2022 +0300 ptp_ocp: use bits.h macros for all masks Currently we are using BIT(), but GENMASK(). Make use of the latter one as well (far less error-prone, far more concise). Signed-off-by: Andy Shevchenko Acked-by: Vadim Fedorenko Signed-off-by: Jakub Kicinski drivers/ptp/ptp_ocp.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 46d2398c3bc0afaf736c38ccc87cb0e93aa9f29a Author: Subramanian Mohan Date: Tue May 31 18:56:17 2022 +0530 PCI: vmd: Use devm_kasprintf() instead of simple kasprintf() Use devm_kasprintf() instead of simple kasprintf() to free allocated memory automatically when the device is freed. Suggested-by: Srikanth Thokala Link: https://lore.kernel.org/r/20220531132617.20517-1-subramanian.mohan@intel.com Signed-off-by: Subramanian Mohan Signed-off-by: Bjorn Helgaas Acked-by: Nirmal Patel drivers/pci/controller/vmd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1449c24e71a343a033af8de0842d1edb8a37926a Author: Ke Liu Date: Sat May 28 09:31:40 2022 +0000 wifi: mac80211_hwsim: Directly use ida_alloc()/free() Use ida_alloc()/ida_free() instead of deprecated ida_simple_get()/ida_simple_remove(). Signed-off-by: Ke Liu Link: https://lore.kernel.org/r/20220528093140.1573816-1-liuke94@huawei.com Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8cbf0c2ab6dfd61066a6ce49d9d37d3d25b2d05f Author: Johannes Berg Date: Thu May 19 23:27:22 2022 +0200 wifi: mac80211: refactor some key code There's some pretty close code here, with the exception of RCU dereference vs. protected dereference. Refactor this to just return a pointer and then do the deref in the caller later. Change-Id: Ide5315e2792da6ac66eaf852293306a3ac71ced9 Signed-off-by: Johannes Berg net/mac80211/cfg.c | 72 +++++++++++++++++++++++++++++------------------------- net/mac80211/key.h | 2 ++ 2 files changed, 41 insertions(+), 33 deletions(-) commit c21b0837983d3b00c4f73927dae8441bf478087f Author: Andy Shevchenko Date: Fri Jun 10 15:02:19 2022 +0300 spi: Use device_find_any_child() instead of custom approach We have already a helper to get the first child device, use it and drop custom approach. Reviewed-by: Rafael J. Wysocki Acked-by: Mark Brown Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610120219.18988-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/spi/spi.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 82b070beae1ef55b0049768c8dc91d87565bb191 Author: Andy Shevchenko Date: Fri Jun 10 15:02:18 2022 +0300 driver core: Introduce device_find_any_child() helper There are several places in the kernel where this kind of functionality is being used. Provide a generic helper for such cases. Reviewed-by: Rafael J. Wysocki Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220610120219.18988-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/base/core.c | 20 ++++++++++++++++++++ include/linux/device.h | 2 ++ 2 files changed, 22 insertions(+) commit d38ea9579ce34dfe22378788e99f26eab31ea064 Author: Sean Christopherson Date: Thu May 26 21:08:17 2022 +0000 KVM: x86: Bug the VM on an out-of-bounds data read Bug the VM and terminate emulation if an out-of-bounds read into the emulator's data cache occurs. Knowingly contuining on all but guarantees that KVM will overwrite random kernel data, which is far, far worse than killing the VM. Signed-off-by: Sean Christopherson Reviewed-by: Kees Cook Reviewed-by: Vitaly Kuznetsov Message-Id: <20220526210817.3428868-9-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 49a1431d3bea4092082b0082cd9f58f3ccdf57f4 Author: Sean Christopherson Date: Thu May 26 21:08:16 2022 +0000 KVM: x86: Bug the VM if the emulator generates a bogus exception vector Bug the VM if KVM's emulator attempts to inject a bogus exception vector. The guest is likely doomed even if KVM continues on, and propagating a bad vector to the rest of KVM runs the risk of breaking other assumptions in KVM and thus triggering a more egregious bug. All existing users of emulate_exception() have hardcoded vector numbers (__load_segment_descriptor() uses a few different vectors, but they're all hardcoded), and future users are likely to follow suit, i.e. the change to emulate_exception() is a glorified nop. As for the ctxt->exception.vector check in x86_emulate_insn(), the few known times the WARN has been triggered in the past is when the field was not set when synthesizing a fault, i.e. for all intents and purposes the check protects against consumption of uninitialized data. Signed-off-by: Sean Christopherson Reviewed-by: Kees Cook Reviewed-by: Vitaly Kuznetsov Message-Id: <20220526210817.3428868-8-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1cca2f8c501fa01e6c0d2aefbf97f8c3c89c0186 Author: Sean Christopherson Date: Thu May 26 21:08:15 2022 +0000 KVM: x86: Bug the VM if the emulator accesses a non-existent GPR Bug the VM, i.e. kill it, if the emulator accesses a non-existent GPR, i.e. generates an out-of-bounds GPR index. Continuing on all but gaurantees some form of data corruption in the guest, e.g. even if KVM were to redirect to a dummy register, KVM would be incorrectly read zeros and drop writes. Note, bugging the VM doesn't completely prevent data corruption, e.g. the current round of emulation will complete before the vCPU bails out to userspace. But, the very act of killing the guest can also cause data corruption, e.g. due to lack of file writeback before termination, so taking on additional complexity to cleanly bail out of the emulator isn't justified, the goal is purely to stem the bleeding and alert userspace that something has gone horribly wrong, i.e. to avoid _silent_ data corruption. Signed-off-by: Sean Christopherson Reviewed-by: Kees Cook Reviewed-by: Vitaly Kuznetsov Message-Id: <20220526210817.3428868-7-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 4 ++-- arch/x86/kvm/kvm_emulate.h | 10 ++++++++++ arch/x86/kvm/x86.c | 9 +++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) commit b443183a25ab61840a12de92f8822849e017b9c8 Author: Sean Christopherson Date: Thu May 26 21:08:14 2022 +0000 KVM: x86: Reduce the number of emulator GPRs to '8' for 32-bit KVM Reduce the number of GPRs emulated by 32-bit KVM from 16 to 8. KVM does not support emulating 64-bit mode on 32-bit host kernels, and so should never generate accesses to R8-15. Opportunistically use NR_EMULATOR_GPRS in rsm_load_state_{32,64}() now that it is precise and accurate for both flavors. Wrap the definition with full #ifdef ugliness; sadly, IS_ENABLED() doesn't guarantee a compile-time constant as far as BUILD_BUG_ON() is concerned. Signed-off-by: Sean Christopherson Reviewed-by: Kees Cook Message-Id: <20220526210817.3428868-6-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 4 ++-- arch/x86/kvm/kvm_emulate.h | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) commit 0cbc60d44c35b1070eb4070b499164d27d050576 Author: Sean Christopherson Date: Thu May 26 21:08:13 2022 +0000 KVM: x86: Use 16-bit fields to track dirty/valid emulator GPRs Use a u16 instead of a u32 to track the dirty/valid status of GPRs in the emulator. Unlike struct kvm_vcpu_arch, x86_emulate_ctxt tracks only the "true" GPRs, i.e. doesn't include RIP in its array, and so only needs to track 16 registers. Note, maxing out at 16 GPRs is a fundamental property of x86-64 and will not change barring a massive architecture update. Legacy x86 ModRM and SIB encodings use 3 bits for GPRs, i.e. support 8 registers. x86-64 uses a single bit in the REX prefix for each possible reference type to double the number of supported GPRs to 16 registers (4 bits). Reviewed-by: Kees Cook Signed-off-by: Sean Christopherson Message-Id: <20220526210817.3428868-5-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 3 +++ arch/x86/kvm/kvm_emulate.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit a5ba67b42f07952ec45755bbdd66d7c6e49f555c Author: Sean Christopherson Date: Thu May 26 21:08:12 2022 +0000 KVM: x86: Omit VCPU_REGS_RIP from emulator's _regs array Omit RIP from the emulator's _regs array, which is used only for GPRs, i.e. registers that can be referenced via ModRM and/or SIB bytes. The emulator uses the dedicated _eip field for RIP, and manually reads from _eip to handle RIP-relative addressing. To avoid an even bigger, slightly more dangerous change, hardcode the number of GPRs to 16 for the time being even though 32-bit KVM's emulator technically should only have 8 GPRs. Add a TODO to address that in a future commit. See also the comments above the read_gpr() and write_gpr() declarations, and obviously the handling in writeback_registers(). No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Kees Cook Message-Id: <20220526210817.3428868-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 10 +++++----- arch/x86/kvm/kvm_emulate.h | 13 ++++++++++++- 2 files changed, 17 insertions(+), 6 deletions(-) commit dfe21e6bc05af433308bc1842da28a8fe28faaa4 Author: Sean Christopherson Date: Thu May 26 21:08:11 2022 +0000 KVM: x86: Harden _regs accesses to guard against buggy input WARN and truncate the incoming GPR number/index when reading/writing GPRs in the emulator to guard against KVM bugs, e.g. to avoid out-of-bounds accesses to ctxt->_regs[] if KVM generates a bogus index. Truncate the index instead of returning e.g. zero, as reg_write() returns a pointer to the register, i.e. returning zero would result in a NULL pointer dereference. KVM could also force the index to any arbitrary GPR, but that's no better or worse, just different. Open code the restriction to 16 registers; RIP is handled via _eip and should never be accessed through reg_read() or reg_write(). See the comments above the declarations of reg_read() and reg_write(), and the behavior of writeback_registers(). The horrific open coded mess will be cleaned up in a future commit. There are no such bugs known to exist in the emulator, but determining that KVM is bug-free is not at all simple and requires a deep dive into the emulator. The code is so convoluted that GCC-12 with the recently enable -Warray-bounds spits out a false-positive due to a GCC bug: arch/x86/kvm/emulate.c:254:27: warning: array subscript 32 is above array bounds of 'long unsigned int[17]' [-Warray-bounds] 254 | return ctxt->_regs[nr]; | ~~~~~~~~~~~^~~~ In file included from arch/x86/kvm/emulate.c:23: arch/x86/kvm/kvm_emulate.h: In function 'reg_rmw': arch/x86/kvm/kvm_emulate.h:366:23: note: while referencing '_regs' 366 | unsigned long _regs[NR_VCPU_REGS]; | ^~~~~ Link: https://lore.kernel.org/all/YofQlBrlx18J7h9Y@google.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=216026 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105679 Reported-and-tested-by: Robert Dinse Reported-by: Kees Cook Reviewed-by: Kees Cook Signed-off-by: Sean Christopherson Message-Id: <20220526210817.3428868-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 61d9c412d0416aa1f7914a732d424a9e8ff24c36 Author: Sean Christopherson Date: Thu May 26 21:08:10 2022 +0000 KVM: x86: Grab regs_dirty in local 'unsigned long' Capture ctxt->regs_dirty in a local 'unsigned long' instead of casting it to an 'unsigned long *' for use in for_each_set_bit(). The bitops helpers really do read the entire 'unsigned long', even though the walking of the read value is capped at the specified size. I.e. 64-bit KVM is reading memory beyond ctxt->regs_dirty, which is a u32 and thus 4 bytes, whereas an unsigned long is 8 bytes. Functionally it's not an issue because regs_dirty is in the middle of x86_emulate_ctxt, i.e. KVM is just reading its own memory, but relying on that coincidence is gross and unsafe. Reviewed-by: Vitaly Kuznetsov Reviewed-by: Kees Cook Signed-off-by: Sean Christopherson Message-Id: <20220526210817.3428868-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9cbffc7a59561be950ecc675d19a3d2b45202b2b Author: Saravana Kannan Date: Wed Jun 1 00:07:05 2022 -0700 driver core: Delete driver_deferred_probe_check_state() The function is no longer used. So delete it. Tested-by: Geert Uytterhoeven Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20220601070707.3946847-10-saravanak@google.com Signed-off-by: Greg Kroah-Hartman drivers/base/dd.c | 30 ------------------------------ include/linux/device/driver.h | 1 - 2 files changed, 31 deletions(-) commit b09796d528bbf06e3e10a4a8f78038719da7ebc6 Author: Saravana Kannan Date: Wed Jun 1 00:07:04 2022 -0700 iommu/of: Delete usage of driver_deferred_probe_check_state() Now that fw_devlink=on and fw_devlink.strict=1 by default and fw_devlink supports iommu DT properties, the execution will never get to the point where driver_deferred_probe_check_state() is called before the supplier has probed successfully or before deferred probe timeout has expired. So, delete the call and replace it with -ENODEV. Tested-by: Geert Uytterhoeven Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20220601070707.3946847-9-saravanak@google.com Signed-off-by: Greg Kroah-Hartman drivers/iommu/of_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71066545b48e4259f89481199a0bbc7c35457738 Author: Saravana Kannan Date: Wed Jun 1 00:07:03 2022 -0700 driver core: Set fw_devlink.strict=1 by default Now that deferred_probe_timeout is non-zero by default, fw_devlink will never permanently block the probing of devices. It'll try its best to probe the devices in the right order and then finally let devices probe even if their suppliers don't have any drivers. Tested-by: Geert Uytterhoeven Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20220601070707.3946847-8-saravanak@google.com Signed-off-by: Greg Kroah-Hartman drivers/base/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f516d01b9df2782b9399c44fa1d21c3d09211f8a Author: Saravana Kannan Date: Wed Jun 1 00:07:02 2022 -0700 Revert "driver core: Set default deferred_probe_timeout back to 0." This reverts commit 11f7e7ef553b6b93ac1aa74a3c2011b9cc8aeb61. Let's take another shot at getting deferred_probe_timeout=10 to work. Tested-by: Geert Uytterhoeven Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20220601070707.3946847-7-saravanak@google.com Signed-off-by: Greg Kroah-Hartman drivers/base/dd.c | 5 +++++ 1 file changed, 5 insertions(+) commit dd429036e778a3d789e6f6df6d1684764048fb50 Author: Saravana Kannan Date: Wed Jun 1 00:07:01 2022 -0700 net: ipconfig: Relax fw_devlink if we need to mount a network rootfs If there are network devices that could probe without some of their suppliers probing and those network devices are needed to mount a network rootfs, then fw_devlink=on might break that usecase by blocking the network devices from probing by the time IP auto config starts. So, if no network devices are available when IP auto config is enabled and we have a network rootfs, make sure fw_devlink doesn't block the probing of any device that has a driver and then retry finding a network device. Tested-by: Geert Uytterhoeven Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20220601070707.3946847-6-saravanak@google.com Signed-off-by: Greg Kroah-Hartman net/ipv4/ipconfig.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2f8c3ae8288e4a4018330ed5c4e758b878d9c555 Author: Saravana Kannan Date: Wed Jun 1 00:07:00 2022 -0700 driver core: Add wait_for_init_devices_probe helper function Some devices might need to be probed and bound successfully before the kernel boot sequence can finish and move on to init/userspace. For example, a network interface might need to be bound to be able to mount a NFS rootfs. With fw_devlink=on by default, some of these devices might be blocked from probing because they are waiting on a optional supplier that doesn't have a driver. While fw_devlink will eventually identify such devices and unblock the probing automatically, it might be too late by the time it unblocks the probing of devices. For example, the IP4 autoconfig might timeout before fw_devlink unblocks probing of the network interface. This function is available to temporarily try and probe all devices that have a driver even if some of their suppliers haven't been added or don't have drivers. The drivers can then decide which of the suppliers are optional vs mandatory and probe the device if possible. By the time this function returns, all such "best effort" probes are guaranteed to be completed. If a device successfully probes in this mode, we delete all fw_devlink discovered dependencies of that device where the supplier hasn't yet probed successfully because they have to be optional dependencies. This also means that some devices that aren't needed for init and could have waited for their optional supplier to probe (when the supplier's module is loaded later on) would end up probing prematurely with limited functionality. So call this function only when boot would fail without it. Tested-by: Geert Uytterhoeven Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20220601070707.3946847-5-saravanak@google.com Signed-off-by: Greg Kroah-Hartman drivers/base/base.h | 1 + drivers/base/core.c | 100 +++++++++++++++++++++++++++++++++++++++--- drivers/base/dd.c | 19 +++++--- include/linux/device/driver.h | 1 + 4 files changed, 110 insertions(+), 11 deletions(-) commit f8217275b57aa48d98cc42051c2aac34152718d6 Author: Saravana Kannan Date: Wed Jun 1 00:06:59 2022 -0700 net: mdio: Delete usage of driver_deferred_probe_check_state() Now that fw_devlink=on by default and fw_devlink supports interrupt properties, the execution will never get to the point where driver_deferred_probe_check_state() is called before the supplier has probed successfully or before deferred probe timeout has expired. So, delete the call and replace it with -ENODEV. Tested-by: Geert Uytterhoeven Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20220601070707.3946847-4-saravanak@google.com Signed-off-by: Greg Kroah-Hartman drivers/net/mdio/fwnode_mdio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 24a026f85241a01bbcfe1b263caeeaa9a79bab40 Author: Saravana Kannan Date: Wed Jun 1 00:06:58 2022 -0700 pinctrl: devicetree: Delete usage of driver_deferred_probe_check_state() Now that fw_devlink=on by default and fw_devlink supports "pinctrl-[0-8]" property, the execution will never get to the point where driver_deferred_probe_check_state() is called before the supplier has probed successfully or before deferred probe timeout has expired. So, delete the call and replace it with -ENODEV. Tested-by: Geert Uytterhoeven Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20220601070707.3946847-3-saravanak@google.com Signed-off-by: Greg Kroah-Hartman drivers/pinctrl/devicetree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a46079a96451cfb15e4f5f01f73f7ba24ef851a Author: Saravana Kannan Date: Wed Jun 1 00:06:57 2022 -0700 PM: domains: Delete usage of driver_deferred_probe_check_state() Now that fw_devlink=on by default and fw_devlink supports "power-domains" property, the execution will never get to the point where driver_deferred_probe_check_state() is called before the supplier has probed successfully or before deferred probe timeout has expired. So, delete the call and replace it with -ENODEV. Tested-by: Geert Uytterhoeven Reviewed-by: Ulf Hansson Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20220601070707.3946847-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman drivers/base/power/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9357195c5770029f0c65a5b76756dea5b767ff0 Author: Vladimir Zapolskiy Date: Fri Jun 10 13:07:00 2022 +0300 dmaengine: dw-edma: remove a macro conditional with similar branches After adding commit 8fc5133d6d4d ("dmaengine: dw-edma: Fix unaligned 64bit access") two branches under macro conditional become identical, thus the code can be simplified without any functional change. Signed-off-by: Vladimir Zapolskiy Acked-by: Herve Codina Link: https://lore.kernel.org/r/20220610100700.2295522-1-vladimir.zapolskiy@linaro.org Signed-off-by: Vinod Koul drivers/dma/dw-edma/dw-edma-v0-core.c | 8 -------- 1 file changed, 8 deletions(-) commit 35ba63b8f6d07d353159505423cfca5a4378a11c Author: Arnd Bergmann Date: Mon Jun 6 10:41:05 2022 +0200 vme: move back to staging The VME subsystem graduated from staging into a top-level subsystem in 2012, with commit db3b9e990e75 ("Staging: VME: move VME drivers out of staging") stating: The VME device drivers have not moved out yet due to some API questions they are still working through, that should happen soon, hopefully. However, this never happened: maintenance of drivers/vme effectively stopped in 2017, with all subsequent changes being treewide cleanups. No hardware driver remains in staging, only the limited user-level access, and I just removed one of the two bridge drivers and the only remaining board. drivers/staging/vme/devices/ was recently moved to drivers/staging/vme_user/, but as the vme_user driver is the only one remaining for this subsystem, it is easier to just move the remaining three source files into this directory rather than keeping the original hierarchy. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20220606084109.4108188-3-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/vme.rst | 4 ++-- MAINTAINERS | 4 +--- drivers/Kconfig | 2 -- drivers/Makefile | 1 - drivers/staging/vme_user/Kconfig | 27 ++++++++++++++++++++++ drivers/staging/vme_user/Makefile | 3 +++ drivers/{vme => staging/vme_user}/vme.c | 2 +- {include/linux => drivers/staging/vme_user}/vme.h | 0 drivers/{vme => staging/vme_user}/vme_bridge.h | 2 +- .../{vme/bridges => staging/vme_user}/vme_fake.c | 4 ++-- .../{vme/bridges => staging/vme_user}/vme_tsi148.c | 4 ++-- .../{vme/bridges => staging/vme_user}/vme_tsi148.h | 0 drivers/staging/vme_user/vme_user.c | 2 +- drivers/vme/Kconfig | 16 ------------- drivers/vme/Makefile | 7 ------ drivers/vme/bridges/Kconfig | 17 -------------- drivers/vme/bridges/Makefile | 3 --- 17 files changed, 40 insertions(+), 58 deletions(-) commit 3493536142000805c1492a0d9d5b6c03a725711d Author: Arnd Bergmann Date: Mon Jun 6 10:41:04 2022 +0200 vme: remove ca91cx42 Universe-II support This is one of four remaining drivers using the ancient virt_to_bus() interface instead of the dma-mapping interface, making it incompatible with most modern machines. As nobody has cleaned this up, there is a high chance that this driver has no actual users. The chip was introduced in 1997 and only supports 32-bit legacy PCI. It was replaced by TSI148 in 2004, but that chip has since been discontinued, while a version of the older Universe II remains in production after 25 years. The vme_vmivme7805 board uses Universe-II, so this also gets removed in the process, but PCI add-on cards based on TSI148 can still work in theory. If there are users of the Universe-II driver after all, it is of course possible to revert this patch and fix it to use the dma-mapping interface like the tsi148 driver does. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20220606084109.4108188-2-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/vme/Kconfig | 2 - drivers/vme/Makefile | 1 - drivers/vme/boards/Kconfig | 10 - drivers/vme/boards/Makefile | 6 - drivers/vme/boards/vme_vmivme7805.c | 106 -- drivers/vme/boards/vme_vmivme7805.h | 33 - drivers/vme/bridges/Kconfig | 7 - drivers/vme/bridges/Makefile | 1 - drivers/vme/bridges/vme_ca91cx42.c | 1928 ----------------------------------- drivers/vme/bridges/vme_ca91cx42.h | 579 ----------- 10 files changed, 2673 deletions(-) commit 23a5f0af6ff43195c6fd15d8ae59d019836a6046 Author: Johannes Berg Date: Wed Feb 9 13:14:26 2022 +0100 wifi: mac80211: remove cipher scheme support The only driver using this was iwlwifi, where we just removed the support because it was never really used. Remove the code from mac80211 as well. Change-Id: I1667417a5932315ee9d81f5c233c56a354923f09 Signed-off-by: Johannes Berg include/net/mac80211.h | 35 ------------ net/mac80211/cfg.c | 26 +-------- net/mac80211/ieee80211_i.h | 11 +--- net/mac80211/iface.c | 7 +-- net/mac80211/key.c | 22 +------- net/mac80211/key.h | 7 +-- net/mac80211/main.c | 69 ++--------------------- net/mac80211/mesh_hwmp.c | 6 +- net/mac80211/mlme.c | 6 +- net/mac80211/rx.c | 49 ++++------------- net/mac80211/sta_info.h | 4 +- net/mac80211/tx.c | 21 ++----- net/mac80211/util.c | 70 +----------------------- net/mac80211/wpa.c | 133 +-------------------------------------------- net/mac80211/wpa.h | 5 +- 15 files changed, 39 insertions(+), 432 deletions(-) commit 17472bc2c3d00e4ed72c3c7b9af0697edea02fff Author: Julia Lawall Date: Sat May 21 13:11:27 2022 +0200 wifi: nl80211: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-77-Julia.Lawall@inria.fr Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bee7546f0f1b4796a58b6ccc9578f0945f0c95b Author: Julia Lawall Date: Sat May 21 13:10:18 2022 +0200 wifi: virt_wifi: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-8-Julia.Lawall@inria.fr Signed-off-by: Johannes Berg drivers/net/wireless/virt_wifi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce3f3ccc90b8207946a4eea45c4bd539e35cbe2c Author: Thomas Gleixner Date: Tue Jun 7 16:11:39 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_406.RULE Based on the normalized pattern: this file is licensed under the term of the gnu general public license version 2 the program licensed as is without any warranty of any kind whether express or implied extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/dma/ppc4xx/dma.h | 5 +---- drivers/dma/ppc4xx/xor.h | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) commit 577b61cee5b2d91a50b633768d4a5a75fa5e36b6 Author: Thomas Gleixner Date: Tue Jun 7 16:11:37 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_398.RULE Based on the normalized pattern: this file is licensed under the terms of the gnu general public license version 2 this program as licensed as is without any warranty of any kind whether express or implied extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman arch/powerpc/kernel/kgdb.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 828c91f7937f62b0c60c86af63772c4161962e6a Author: Thomas Gleixner Date: Tue Jun 7 16:11:36 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_391.RULE Based on the normalized pattern: this software file (the file ) is distributed by nxp under the terms of the gnu general public license version 2 june 1991 (the license ) you may use redistribute and/or modify this file in accordance with the terms and conditions of the license a copy of which is available by writing to the free software foundation inc 51 franklin street fifth floor boston ma 02110-1301 usa or on the worldwide web at http://www gnu org/licenses/old-licenses/gpl-2 0 txt the file is distributed as-is without warranty of any kind and the implied warranties of merchantability or fitness for a particular purpose are expressly disclaimed the license provides additional details about this warranty disclaimer extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/net/wireless/marvell/mwifiex/11ac.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/11ac.h | 14 +------------- drivers/net/wireless/marvell/mwifiex/11h.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/11n.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/11n.h | 14 +------------- drivers/net/wireless/marvell/mwifiex/11n_aggr.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/11n_aggr.h | 14 +------------- drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/11n_rxreorder.h | 14 +------------- drivers/net/wireless/marvell/mwifiex/Makefile | 13 +------------ drivers/net/wireless/marvell/mwifiex/cfg80211.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/cfg80211.h | 14 +------------- drivers/net/wireless/marvell/mwifiex/cfp.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/cmdevt.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/debugfs.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/decl.h | 14 +------------- drivers/net/wireless/marvell/mwifiex/ethtool.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/fw.h | 14 +------------- drivers/net/wireless/marvell/mwifiex/ie.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/init.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/ioctl.h | 14 +------------- drivers/net/wireless/marvell/mwifiex/join.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/main.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/main.h | 14 +------------- drivers/net/wireless/marvell/mwifiex/pcie.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/pcie.h | 14 +------------- drivers/net/wireless/marvell/mwifiex/pcie_quirks.c | 18 ++---------------- drivers/net/wireless/marvell/mwifiex/pcie_quirks.h | 18 ++---------------- drivers/net/wireless/marvell/mwifiex/scan.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/sdio.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/sdio.h | 14 +------------- drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/sta_event.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/sta_rx.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/sta_tx.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/txrx.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/uap_cmd.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/uap_event.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/uap_txrx.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/usb.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/usb.h | 14 +------------- drivers/net/wireless/marvell/mwifiex/util.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/util.h | 14 +------------- drivers/net/wireless/marvell/mwifiex/wmm.c | 14 +------------- drivers/net/wireless/marvell/mwifiex/wmm.h | 14 +------------- 47 files changed, 49 insertions(+), 616 deletions(-) commit 99c926cecdfd1200e1af4c5d7ade4fe4f4219116 Author: Thomas Gleixner Date: Tue Jun 7 16:11:35 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_390.RULE Based on the normalized pattern: this software file (the file ) is distributed by marvell international ltd under the terms of the gnu general public license version 2 june 1991 (the license ) you may use redistribute and/or modify this file in accordance with the terms and conditions of the license a copy of which is available by writing to the free software foundation inc 51 franklin street fifth floor boston ma 02110-1301 usa or on the worldwide web at http://www gnu org/licenses/old-licenses/gpl-2 0 txt the file is distributed as-is without warranty of any kind and the implied warranties of merchantability or fitness for a particular purpose are expressly disclaimed the license provides additional details about this warranty disclaimer extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/bluetooth/btmrvl_debugfs.c | 15 +-------------- drivers/bluetooth/btmrvl_drv.h | 16 +--------------- drivers/bluetooth/btmrvl_main.c | 15 +-------------- drivers/bluetooth/btmrvl_sdio.c | 15 +-------------- drivers/bluetooth/btmrvl_sdio.h | 16 +--------------- 5 files changed, 5 insertions(+), 72 deletions(-) commit fa82cce7a6bbb35ecf7fe66231c7076052cf66d5 Author: Thomas Gleixner Date: Tue Jun 7 16:11:34 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_385.RULE Based on the normalized pattern: licensed under the gpl v2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman arch/sparc/vdso/vdso2c.c | 2 +- arch/x86/entry/vdso/vdso2c.c | 2 +- scripts/gcc-plugins/latent_entropy_plugin.c | 2 +- scripts/gcc-plugins/stackleak_plugin.c | 2 +- scripts/gcc-plugins/structleak_plugin.c | 2 +- tools/power/cpupower/debug/i386/dump_psb.c | 6 ++---- 6 files changed, 7 insertions(+), 9 deletions(-) commit 5a729246e57eac410e4a13f5aba66ae2dc552632 Author: Thomas Gleixner Date: Tue Jun 7 16:11:32 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE Based on the normalized pattern: this program is free software you can redistribute it and/or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed as is without any warranty of any kind whether express or implied without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman arch/arm/mach-omap1/timer.c | 10 +--------- arch/arm/mach-omap2/display.c | 10 +--------- arch/arm/mach-omap2/omap_opp_data.h | 10 +--------- arch/arm/mach-omap2/opp3xxx_data.c | 10 +--------- arch/arm/mach-omap2/opp4xxx_data.c | 10 +--------- arch/arm/mach-versatile/spc.c | 10 +--------- drivers/bus/omap_l3_noc.c | 10 +--------- drivers/bus/omap_l3_noc.h | 10 +--------- drivers/clk/keystone/sci-clk.c | 10 +--------- drivers/clk/ti/apll.c | 10 +--------- drivers/clk/ti/autoidle.c | 10 +--------- drivers/clk/ti/clk-dra7-atl.c | 10 +--------- drivers/clk/ti/clk.c | 10 +--------- drivers/clk/ti/clkctrl.c | 10 +--------- drivers/clk/ti/clkt_dflt.c | 10 +--------- drivers/clk/ti/clockdomain.c | 10 +--------- drivers/clk/ti/composite.c | 10 +--------- drivers/clk/ti/divider.c | 10 +--------- drivers/clk/ti/dpll.c | 10 +--------- drivers/clk/ti/fixed-factor.c | 10 +--------- drivers/clk/ti/gate.c | 10 +--------- drivers/clk/ti/interface.c | 10 +--------- drivers/clk/ti/mux.c | 10 +--------- drivers/cpufreq/scpi-cpufreq.c | 10 +--------- drivers/input/misc/palmas-pwrbutton.c | 10 +--------- drivers/input/misc/tps65218-pwrbutton.c | 10 +--------- drivers/misc/sram-exec.c | 10 +--------- drivers/power/supply/cpcap-battery.c | 10 +--------- drivers/regulator/ti-abb-regulator.c | 10 +--------- drivers/reset/reset-ti-sci.c | 10 +--------- drivers/reset/reset-ti-syscon.c | 10 +--------- drivers/thermal/hisi_thermal.c | 10 +--------- include/dt-bindings/clock/ti-dra7-atl.h | 10 +--------- include/dt-bindings/pinctrl/hisi.h | 10 +--------- include/dt-bindings/pinctrl/keystone.h | 10 +--------- include/linux/clk/ti.h | 10 +--------- include/linux/pm_wakeirq.h | 14 ++------------ include/linux/soc/ti/ti-msgmgr.h | 10 +--------- 38 files changed, 39 insertions(+), 345 deletions(-) commit abd462747539bbc630e50e8be59e3aebca63441d Author: Thomas Gleixner Date: Tue Jun 7 16:11:31 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_319.RULE Based on the normalized pattern: this program is free software you can redistribute it and/or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed as is without any warranty of any kind whether expressed or implied without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license version 2 for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/gpio/gpio-lp873x.c | 10 +--------- drivers/gpio/gpio-lp87565.c | 10 +--------- drivers/gpio/gpio-pisosr.c | 10 +--------- drivers/gpio/gpio-tpic2810.c | 10 +--------- drivers/mfd/tps65086.c | 10 +--------- drivers/mfd/tps65218.c | 10 +--------- drivers/mfd/tps65912-core.c | 10 +--------- drivers/mfd/tps65912-i2c.c | 10 +--------- drivers/mfd/tps65912-spi.c | 10 +--------- drivers/regulator/lp873x-regulator.c | 10 +--------- drivers/regulator/tps65086-regulator.c | 10 +--------- drivers/regulator/tps65218-regulator.c | 10 +--------- drivers/regulator/tps65912-regulator.c | 10 +--------- include/linux/mfd/tps65086.h | 10 +--------- include/linux/mfd/tps65218.h | 10 +--------- include/linux/mfd/tps65912.h | 10 +--------- 16 files changed, 16 insertions(+), 144 deletions(-) commit e634cf4e44d9770bfcb059e45ad6b9ba6a1e0bdc Author: Thomas Gleixner Date: Tue Jun 7 16:11:30 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_318.RULE Based on the normalized pattern: this program is free software you can redistribute it and/or modify it under the terms of the gnu general public license as published by the free software foundation version 2 this program is distributed as is without any warranty of any kind whether express or implied without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 59 temple place suite 330 boston ma 02111-1307 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/pinctrl/pinctrl-as3722.c | 15 +-------------- drivers/pinctrl/pinctrl-palmas.c | 15 +-------------- drivers/pinctrl/pinctrl-utils.c | 15 +-------------- drivers/pinctrl/pinctrl-utils.h | 15 +-------------- drivers/regulator/max8973-regulator.c | 15 +-------------- drivers/regulator/tps51632-regulator.c | 15 +-------------- drivers/regulator/tps62360-regulator.c | 15 +-------------- 7 files changed, 7 insertions(+), 98 deletions(-) commit 336371516a42a9edf2d4fd968212b699e831cc55 Author: Thomas Gleixner Date: Tue Jun 7 16:11:29 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_298.RULE Based on the normalized pattern: this package is free software you can redistribute it and/or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this package is provided as is and without any express or implied warranties including without limitation the implied warranties of merchantibility and fitness for a particular purpose extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman arch/arm/mach-omap1/board-sx1.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit a601378552a08e4812e4363a93cb736c9001556e Author: Thomas Gleixner Date: Tue Jun 7 16:11:27 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_292.RULE Based on the normalized pattern: this program is free software you can redistribute it and/or modify it under the terms of the gnu general public license version 2 as published by the free software foundation you should have received a copy of the gnu general public license along with this program if not see this software is provided as is and without any express or implied warranties including without limitation the implied warranties of merchantability and fitness for a particular purpose extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/net/ethernet/chelsio/cxgb/common.h | 11 +---------- drivers/net/ethernet/chelsio/cxgb/cphy.h | 11 +---------- drivers/net/ethernet/chelsio/cxgb/cpl5_cmd.h | 12 +----------- drivers/net/ethernet/chelsio/cxgb/elmer0.h | 12 +----------- drivers/net/ethernet/chelsio/cxgb/espi.c | 11 +---------- drivers/net/ethernet/chelsio/cxgb/espi.h | 11 +---------- drivers/net/ethernet/chelsio/cxgb/gmac.h | 11 +---------- drivers/net/ethernet/chelsio/cxgb/mv88x201x.c | 11 +---------- drivers/net/ethernet/chelsio/cxgb/pm3393.c | 11 +---------- drivers/net/ethernet/chelsio/cxgb/regs.h | 11 +---------- drivers/net/ethernet/chelsio/cxgb/sge.c | 11 +---------- drivers/net/ethernet/chelsio/cxgb/sge.h | 11 +---------- drivers/net/ethernet/chelsio/cxgb/subr.c | 11 +---------- drivers/net/ethernet/chelsio/cxgb/suni1x10gexp_regs.h | 12 +----------- 14 files changed, 14 insertions(+), 143 deletions(-) commit 2eb72d6696c685369fca7cd63cb4b76d1be099e0 Author: Thomas Gleixner Date: Tue Jun 7 16:11:26 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_179.RULE Based on the normalized pattern: gpl header start do not alter or remove copyright notices or this file header this program is free software you can redistribute it and/or modify it under the terms of the gnu general public license version 2 only as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license version 2 for more details (a copy is included in the license file that accompanied this code) you should have received a copy of the gnu general public license version 2 along with this program if not see http://www gnu org/licenses please visit http://www xyratex com/contact if you need additional information or have any questions gpl header end extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman arch/x86/crypto/crc32-pclmul_asm.S | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) commit dfb99b050e4bc5bfb74973761752395d82644e48 Author: Thomas Gleixner Date: Tue Jun 7 16:11:25 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) Based on the normalized pattern: this program is free software you may redistribute it and/or modify it under the terms of the gnu general public license as published by the free software foundation version 2 of the license the software is provided as is without warranty of any kind express or implied including but not limited to the warranties of merchantability fitness for a particular purpose and noninfringement in no event shall the authors or copyright holders be liable for any claim damages or other liability whether in an action of contract tort or otherwise arising from out of or in connection with the software or the use or other dealings in the software extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/scsi/snic/snic_attrs.c | 18 ++---------------- drivers/scsi/snic/snic_ctl.c | 18 ++---------------- drivers/scsi/snic/snic_debugfs.c | 18 ++---------------- drivers/scsi/snic/snic_disc.c | 18 ++---------------- drivers/scsi/snic/snic_disc.h | 18 ++---------------- drivers/scsi/snic/snic_fwint.h | 18 ++---------------- drivers/scsi/snic/snic_io.c | 18 ++---------------- drivers/scsi/snic/snic_io.h | 18 ++---------------- drivers/scsi/snic/snic_isr.c | 18 ++---------------- drivers/scsi/snic/snic_main.c | 18 ++---------------- drivers/scsi/snic/snic_res.c | 18 ++---------------- drivers/scsi/snic/snic_res.h | 18 ++---------------- drivers/scsi/snic/snic_scsi.c | 18 ++---------------- drivers/scsi/snic/snic_stats.h | 18 ++---------------- drivers/scsi/snic/snic_trc.c | 18 ++---------------- drivers/scsi/snic/snic_trc.h | 18 ++---------------- drivers/scsi/snic/vnic_cq.c | 18 ++---------------- drivers/scsi/snic/vnic_cq.h | 18 ++---------------- drivers/scsi/snic/vnic_cq_fw.h | 18 ++---------------- drivers/scsi/snic/vnic_dev.c | 18 ++---------------- drivers/scsi/snic/vnic_dev.h | 18 ++---------------- drivers/scsi/snic/vnic_devcmd.h | 18 ++---------------- drivers/scsi/snic/vnic_intr.c | 18 ++---------------- drivers/scsi/snic/vnic_intr.h | 18 ++---------------- drivers/scsi/snic/vnic_resource.h | 18 ++---------------- drivers/scsi/snic/vnic_snic.h | 18 ++---------------- drivers/scsi/snic/vnic_stats.h | 18 ++---------------- drivers/scsi/snic/vnic_wq.c | 18 ++---------------- drivers/scsi/snic/vnic_wq.h | 18 ++---------------- drivers/scsi/snic/wq_enet_desc.h | 18 ++---------------- include/media/i2c/ov2659.h | 14 +------------- samples/v4l/v4l2-pci-skeleton.c | 14 +------------- 32 files changed, 62 insertions(+), 506 deletions(-) commit e6550b3ee1f4bd41d3c8011218d8bee717dc8a5a Author: Thomas Gleixner Date: Tue Jun 7 16:11:24 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 1) Based on the normalized pattern: this program is free software you may redistribute it and/or modify it under the terms of the gnu general public license as published by the free software foundation version 2 of the license the software is provided as is without warranty of any kind express or implied including but not limited to the warranties of merchantability fitness for a particular purpose and noninfringement in no event shall the authors or copyright holders be liable for any claim damages or other liability whether in an action of contract tort or otherwise arising from out of or in connection with the software or the use or other dealings in the software extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/net/ethernet/cisco/enic/cq_desc.h | 15 +-------------- drivers/net/ethernet/cisco/enic/cq_enet_desc.h | 15 +-------------- drivers/net/ethernet/cisco/enic/enic.h | 15 +-------------- drivers/net/ethernet/cisco/enic/enic_api.c | 19 ++----------------- drivers/net/ethernet/cisco/enic/enic_api.h | 19 ++----------------- drivers/net/ethernet/cisco/enic/enic_dev.c | 19 ++----------------- drivers/net/ethernet/cisco/enic/enic_dev.h | 19 ++----------------- drivers/net/ethernet/cisco/enic/enic_ethtool.c | 19 ++----------------- drivers/net/ethernet/cisco/enic/enic_pp.c | 19 ++----------------- drivers/net/ethernet/cisco/enic/enic_pp.h | 19 ++----------------- drivers/net/ethernet/cisco/enic/enic_res.c | 15 +-------------- drivers/net/ethernet/cisco/enic/enic_res.h | 15 +-------------- drivers/net/ethernet/cisco/enic/rq_enet_desc.h | 15 +-------------- drivers/net/ethernet/cisco/enic/vnic_cq.c | 15 +-------------- drivers/net/ethernet/cisco/enic/vnic_cq.h | 15 +-------------- drivers/net/ethernet/cisco/enic/vnic_dev.c | 15 +-------------- drivers/net/ethernet/cisco/enic/vnic_dev.h | 15 +-------------- drivers/net/ethernet/cisco/enic/vnic_devcmd.h | 15 +-------------- drivers/net/ethernet/cisco/enic/vnic_enet.h | 15 +-------------- drivers/net/ethernet/cisco/enic/vnic_intr.c | 15 +-------------- drivers/net/ethernet/cisco/enic/vnic_intr.h | 15 +-------------- drivers/net/ethernet/cisco/enic/vnic_nic.h | 15 +-------------- drivers/net/ethernet/cisco/enic/vnic_resource.h | 15 +-------------- drivers/net/ethernet/cisco/enic/vnic_rq.c | 16 +--------------- drivers/net/ethernet/cisco/enic/vnic_rq.h | 15 +-------------- drivers/net/ethernet/cisco/enic/vnic_rss.h | 14 +------------- drivers/net/ethernet/cisco/enic/vnic_stats.h | 15 +-------------- drivers/net/ethernet/cisco/enic/vnic_vic.c | 19 ++----------------- drivers/net/ethernet/cisco/enic/vnic_vic.h | 19 ++----------------- drivers/net/ethernet/cisco/enic/vnic_wq.c | 15 +-------------- drivers/net/ethernet/cisco/enic/vnic_wq.h | 15 +-------------- drivers/net/ethernet/cisco/enic/wq_enet_desc.h | 15 +-------------- drivers/scsi/fnic/cq_desc.h | 14 +------------- drivers/scsi/fnic/cq_enet_desc.h | 14 +------------- drivers/scsi/fnic/cq_exch_desc.h | 14 +------------- drivers/scsi/fnic/fcpio.h | 14 +------------- drivers/scsi/fnic/fnic.h | 14 +------------- drivers/scsi/fnic/fnic_attrs.c | 14 +------------- drivers/scsi/fnic/fnic_debugfs.c | 18 ++---------------- drivers/scsi/fnic/fnic_fcs.c | 14 +------------- drivers/scsi/fnic/fnic_fip.h | 14 +------------- drivers/scsi/fnic/fnic_io.h | 14 +------------- drivers/scsi/fnic/fnic_isr.c | 15 +-------------- drivers/scsi/fnic/fnic_main.c | 15 +-------------- drivers/scsi/fnic/fnic_res.c | 14 +------------- drivers/scsi/fnic/fnic_res.h | 14 +------------- drivers/scsi/fnic/fnic_scsi.c | 14 +------------- drivers/scsi/fnic/fnic_stats.h | 18 ++---------------- drivers/scsi/fnic/fnic_trace.c | 18 ++---------------- drivers/scsi/fnic/fnic_trace.h | 18 ++---------------- drivers/scsi/fnic/rq_enet_desc.h | 14 +------------- drivers/scsi/fnic/vnic_cq.c | 14 +------------- drivers/scsi/fnic/vnic_cq.h | 14 +------------- drivers/scsi/fnic/vnic_cq_copy.h | 14 +------------- drivers/scsi/fnic/vnic_dev.c | 14 +------------- drivers/scsi/fnic/vnic_dev.h | 14 +------------- drivers/scsi/fnic/vnic_devcmd.h | 14 +------------- drivers/scsi/fnic/vnic_intr.c | 14 +------------- drivers/scsi/fnic/vnic_intr.h | 14 +------------- drivers/scsi/fnic/vnic_nic.h | 14 +------------- drivers/scsi/fnic/vnic_resource.h | 14 +------------- drivers/scsi/fnic/vnic_rq.c | 15 +-------------- drivers/scsi/fnic/vnic_rq.h | 14 +------------- drivers/scsi/fnic/vnic_scsi.h | 14 +------------- drivers/scsi/fnic/vnic_stats.h | 14 +------------- drivers/scsi/fnic/vnic_wq.c | 14 +------------- drivers/scsi/fnic/vnic_wq.h | 14 +------------- drivers/scsi/fnic/vnic_wq_copy.c | 15 +-------------- drivers/scsi/fnic/vnic_wq_copy.h | 14 +------------- drivers/scsi/fnic/wq_enet_desc.h | 14 +------------- drivers/scsi/snic/cq_desc.h | 18 ++---------------- drivers/scsi/snic/cq_enet_desc.h | 18 ++---------------- drivers/scsi/snic/snic.h | 18 ++---------------- 73 files changed, 89 insertions(+), 1033 deletions(-) commit 1f88a7433f1b8aa941880f395783148f8bc9bd3c Author: Thomas Gleixner Date: Tue Jun 7 16:11:23 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_160.RULE Based on the normalized pattern: the code contained herein is licensed under the gnu general public license you may obtain a copy of the gnu general public license version 2 at the following locations: http://www opensource org/licenses/gpl-license html http://www gnu org/copyleft/gpl html extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman arch/arm/boot/dts/imx23-pinfunc.h | 8 +------- arch/arm/boot/dts/imx28-pinfunc.h | 8 +------- arch/arm/boot/dts/mxs-pinfunc.h | 8 +------- 3 files changed, 3 insertions(+), 21 deletions(-) commit 298b95f111be85f2d5a18dc0177eb9a64130f9b4 Author: Thomas Gleixner Date: Tue Jun 7 16:11:21 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_152.RULE Based on the normalized pattern: this software is distributed under the terms of the gnu general public license ( gpl ) version 2 as published by the free software foundation this software is provided by the copyright holders and contributors as is and any express or implied warranties including but not limited to the implied warranties of merchantability and fitness for a particular purpose are disclaimed in no event shall the copyright owner or contributors be liable for any direct indirect incidental special exemplary or consequential damages (including but not limited to procurement of substitute goods or services loss of use data or profits or business interruption) however caused and on any theory of liability whether in contract strict liability or tort (including negligence or otherwise) arising in any way out of the use of this software even if advised of the possibility of such damage extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman include/linux/platform_data/usb-omap.h | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 1accad5e74635d7f9d994e692649fbe736afe150 Author: Thomas Gleixner Date: Tue Jun 7 16:11:20 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_149.RULE Based on the normalized pattern: netapp provides this source code under the gpl v2 license the gpl v2 license is available at https://opensource org/licenses/gpl-license php this software is provided by the copyright holders and contributors as is and any express or implied warranties including but not limited to the implied warranties of merchantability and fitness for a particular purpose are disclaimed in no event shall the copyright owner or contributors be liable for any direct indirect incidental special exemplary or consequential damages (including but not limited to procurement of substitute goods or services loss of use data or profits or business interruption) however caused and on any theory of liability whether in contract strict liability or tort (including negligence or otherwise) arising in any way out of the use of this software even if advised of the possibility of such damage extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman include/linux/sunrpc/bc_xprt.h | 17 +---------------- net/sunrpc/backchannel_rqst.c | 16 +--------------- net/sunrpc/sunrpc.h | 16 +--------------- 3 files changed, 3 insertions(+), 46 deletions(-) commit b7bc1c9e5b04da3d2e578fe91d666c9060e77c63 Author: Thomas Gleixner Date: Tue Jun 7 16:11:19 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_147.RULE Based on the normalized pattern: licensed under gplv2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman Documentation/arm/samsung-s3c24xx/cpufreq.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94c0ded75c85201bfb8fce95dab44cc53addfcb5 Author: Thomas Gleixner Date: Tue Jun 7 16:11:18 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_133.RULE Based on the normalized pattern: this program is free software you can redistribute it and/or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope that it will be useful merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman arch/arm64/boot/dts/mediatek/mt6755.dtsi | 9 +-------- arch/arm64/boot/dts/mediatek/mt6795.dtsi | 9 +-------- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 9 +-------- include/dt-bindings/power/mt6797-power.h | 9 +-------- 4 files changed, 4 insertions(+), 32 deletions(-) commit 3bb165608ec6a6f775dcd0a6ef5f0b4493e74d73 Author: Thomas Gleixner Date: Tue Jun 7 19:29:33 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 2) Based on the normalized pattern: this file is licensed under the terms of the gnu general public license version 2 this program is licensed as is without any warranty of any kind whether express or implied extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/bus/mvebu-mbus.c | 5 +---- drivers/bus/sunxi-rsb.c | 6 +----- drivers/bus/tegra-gmi.c | 5 +---- drivers/bus/ts-nbus.c | 5 +---- drivers/clk/axs10x/i2s_pll_clock.c | 5 +---- drivers/clk/axs10x/pll_clock.c | 5 +---- drivers/clk/clk-hsdk-pll.c | 5 +---- drivers/clk/clk-moxart.c | 5 +---- drivers/clk/mmp/clk-apbc.c | 5 +---- drivers/clk/mmp/clk-apmu.c | 5 +---- drivers/clk/mmp/clk-frac.c | 5 +---- drivers/clk/mmp/clk-gate.c | 5 +---- drivers/clk/mmp/clk-mix.c | 5 +---- drivers/clk/mmp/clk-mmp2.c | 5 +---- drivers/clk/mmp/clk-of-mmp2.c | 5 +---- drivers/clk/mmp/clk-of-pxa168.c | 5 +---- drivers/clk/mmp/clk-of-pxa1928.c | 5 +---- drivers/clk/mmp/clk-of-pxa910.c | 5 +---- drivers/clk/mmp/clk-pxa168.c | 5 +---- drivers/clk/mmp/clk-pxa910.c | 5 +---- drivers/clk/nxp/clk-lpc18xx-ccu.c | 5 +---- drivers/clk/nxp/clk-lpc18xx-cgu.c | 5 +---- drivers/clk/nxp/clk-lpc18xx-creg.c | 5 +---- drivers/clk/spear/clk-aux-synth.c | 5 +---- drivers/clk/spear/clk-frac-synth.c | 5 +---- drivers/clk/spear/clk-gpt-synth.c | 5 +---- drivers/clk/spear/clk-vco-pll.c | 5 +---- drivers/clk/spear/clk.c | 5 +---- drivers/clk/spear/clk.h | 5 +---- drivers/clk/spear/spear1310_clock.c | 5 +---- drivers/clk/spear/spear1340_clock.c | 5 +---- drivers/clk/spear/spear3xx_clock.c | 5 +---- drivers/clk/spear/spear6xx_clock.c | 5 +---- drivers/cpufreq/mvebu-cpufreq.c | 5 +---- drivers/cpuidle/cpuidle-at91.c | 5 +---- drivers/cpuidle/cpuidle-kirkwood.c | 5 +---- drivers/dma/bestcomm/ata.c | 7 +------ drivers/dma/bestcomm/bestcomm.c | 7 +------ drivers/dma/bestcomm/fec.c | 7 +------ drivers/dma/bestcomm/sram.c | 7 +------ drivers/dma/moxart-dma.c | 5 +---- drivers/dma/ppc4xx/adma.h | 5 +---- drivers/edac/edac_pci.c | 7 ++----- drivers/edac/fsl_ddr_edac.c | 6 ++---- drivers/edac/fsl_ddr_edac.h | 7 ++----- drivers/edac/mpc85xx_edac.h | 7 ++----- drivers/gpio/gpio-mpc8xxx.c | 5 +---- drivers/gpio/gpio-mvebu.c | 5 +---- drivers/gpio/gpio-spear-spics.c | 5 +---- drivers/gpio/gpio-ts4800.c | 5 +---- 50 files changed, 54 insertions(+), 212 deletions(-) commit 0fdebc5ec2ca492d69df2d93a6a7abade4941aae Author: Thomas Gleixner Date: Tue Jun 7 16:11:14 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 1) Based on the normalized pattern: this file is licensed under the terms of the gnu general public license version 2 this program is licensed as is without any warranty of any kind whether express or implied extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman arch/arm/boot/dts/am33xx.dtsi | 5 +---- arch/arm/boot/dts/am3517.dtsi | 5 +---- arch/arm/boot/dts/am4372.dtsi | 5 +---- arch/arm/boot/dts/artpec6-devboard.dts | 9 ++------- arch/arm/boot/dts/dm814x.dtsi | 6 +----- arch/arm/boot/dts/dm816x.dtsi | 6 +----- arch/arm/boot/dts/dra62x.dtsi | 6 +----- arch/arm/boot/dts/dra7-dspeve-thermal.dtsi | 5 +---- arch/arm/boot/dts/dra7-iva-thermal.dtsi | 5 +---- arch/arm/boot/dts/imx6q-gk802.dts | 9 ++------- arch/arm/boot/dts/omap2.dtsi | 5 +---- arch/arm/boot/dts/omap2420.dtsi | 5 +---- arch/arm/boot/dts/omap2430.dtsi | 5 +---- arch/arm/boot/dts/omap3-cpu-thermal.dtsi | 5 +---- arch/arm/boot/dts/omap3.dtsi | 5 +---- arch/arm/boot/dts/omap34xx.dtsi | 5 +---- arch/arm/boot/dts/omap36xx.dtsi | 5 +---- arch/arm/boot/dts/omap4-cpu-thermal.dtsi | 5 +---- arch/arm/boot/dts/omap443x.dtsi | 5 +---- arch/arm/boot/dts/omap4460.dtsi | 5 +---- arch/arm/boot/dts/omap5-core-thermal.dtsi | 5 +---- arch/arm/boot/dts/omap5-gpu-thermal.dtsi | 5 +---- arch/arm/boot/dts/orion5x-lacie-d2-network.dts | 5 +---- arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts | 9 ++------- arch/arm/boot/dts/orion5x-maxtor-shared-storage-2.dts | 5 +---- arch/arm/boot/dts/orion5x-mv88f5181.dtsi | 9 ++------- arch/arm/boot/dts/orion5x-mv88f5182.dtsi | 9 ++------- arch/arm/boot/dts/orion5x-netgear-wnr854t.dts | 9 ++------- arch/arm/boot/dts/orion5x-rd88f5182-nas.dts | 9 ++------- arch/arm/boot/dts/orion5x.dtsi | 9 ++------- arch/arm/include/asm/hardware/cache-aurora-l2.h | 5 +---- arch/arm/include/asm/hardware/cache-feroceon-l2.h | 6 +----- arch/arm/include/asm/hardware/cache-tauros2.h | 5 +---- arch/arm/mach-davinci/board-da830-evm.c | 6 ++---- arch/arm/mach-davinci/board-da850-evm.c | 6 ++---- arch/arm/mach-davinci/board-dm355-evm.c | 6 ++---- arch/arm/mach-davinci/board-dm355-leopard.c | 5 +---- arch/arm/mach-davinci/board-dm644x-evm.c | 6 ++---- arch/arm/mach-davinci/board-dm646x-evm.c | 7 +------ arch/arm/mach-davinci/board-mityomapl138.c | 5 +---- arch/arm/mach-davinci/board-neuros-osd2.c | 5 +---- arch/arm/mach-davinci/board-omapl138-hawk.c | 5 +---- arch/arm/mach-davinci/common.c | 6 ++---- arch/arm/mach-davinci/common.h | 6 ++---- arch/arm/mach-davinci/cpuidle.h | 5 +---- arch/arm/mach-davinci/cputype.h | 6 ++---- arch/arm/mach-davinci/da830.c | 6 ++---- arch/arm/mach-davinci/da850.c | 6 ++---- arch/arm/mach-davinci/da8xx.h | 6 ++---- arch/arm/mach-davinci/dm355.c | 6 ++---- arch/arm/mach-davinci/dm644x.c | 6 ++---- arch/arm/mach-davinci/dm646x.c | 6 ++---- arch/arm/mach-davinci/hardware.h | 6 ++---- arch/arm/mach-davinci/mux.c | 6 ++---- arch/arm/mach-davinci/mux.h | 6 ++---- arch/arm/mach-davinci/pm_domain.c | 5 +---- arch/arm/mach-davinci/serial.h | 6 ++---- arch/arm/mach-dove/bridge-regs.h | 9 ++------- arch/arm/mach-dove/cm-a510.c | 5 +---- arch/arm/mach-dove/common.c | 5 +---- arch/arm/mach-dove/common.h | 5 +---- arch/arm/mach-dove/dove-db-setup.c | 5 +---- arch/arm/mach-dove/dove.h | 9 ++------- arch/arm/mach-dove/irq.c | 5 +---- arch/arm/mach-dove/irqs.h | 9 ++------- arch/arm/mach-dove/mpp.c | 5 +---- arch/arm/mach-dove/pcie.c | 5 +---- arch/arm/mach-dove/pm.h | 6 +----- arch/arm/mach-lpc18xx/board-dt.c | 5 +---- arch/arm/mach-lpc32xx/pm.c | 6 ++---- arch/arm/mach-lpc32xx/suspend.S | 6 ++---- arch/arm/mach-mv78xx0/bridge-regs.h | 6 +----- arch/arm/mach-mv78xx0/buffalo-wxl-setup.c | 5 +---- arch/arm/mach-mv78xx0/common.c | 5 +---- arch/arm/mach-mv78xx0/common.h | 5 +---- arch/arm/mach-mv78xx0/db78x00-bp-setup.c | 5 +---- arch/arm/mach-mv78xx0/irq.c | 5 +---- arch/arm/mach-mv78xx0/irqs.h | 9 ++------- arch/arm/mach-mv78xx0/mpp.c | 5 +---- arch/arm/mach-mv78xx0/mpp.h | 6 +----- arch/arm/mach-mv78xx0/mv78xx0.h | 5 +---- arch/arm/mach-mv78xx0/pcie.c | 5 +---- arch/arm/mach-mv78xx0/rd78x00-masa-setup.c | 5 +---- arch/arm/mach-mvebu/armada-370-xp.h | 5 +---- arch/arm/mach-mvebu/board-v7.c | 5 +---- arch/arm/mach-mvebu/coherency.c | 5 +---- arch/arm/mach-mvebu/coherency.h | 6 +----- arch/arm/mach-mvebu/coherency_ll.S | 5 +---- arch/arm/mach-mvebu/common.h | 5 +---- arch/arm/mach-mvebu/cpu-reset.c | 5 +---- arch/arm/mach-mvebu/dove.c | 5 +---- arch/arm/mach-mvebu/headsmp-a9.S | 5 +---- arch/arm/mach-mvebu/headsmp.S | 5 +---- arch/arm/mach-mvebu/kirkwood.c | 5 +---- arch/arm/mach-mvebu/kirkwood.h | 5 +---- arch/arm/mach-mvebu/mvebu-soc-id.c | 5 +---- arch/arm/mach-mvebu/mvebu-soc-id.h | 5 +---- arch/arm/mach-mvebu/platsmp-a9.c | 5 +---- arch/arm/mach-mvebu/platsmp.c | 5 +---- arch/arm/mach-mvebu/pm-board.c | 5 +---- arch/arm/mach-mvebu/pm.c | 5 +---- arch/arm/mach-mvebu/pmsu.c | 5 +---- arch/arm/mach-mvebu/pmsu.h | 5 +---- arch/arm/mach-mvebu/pmsu_ll.S | 5 +---- arch/arm/mach-mvebu/system-controller.c | 5 +---- arch/arm/mach-omap1/mtd-xip.h | 6 ++---- arch/arm/mach-omap1/pm_bus.c | 6 +----- arch/arm/mach-omap2/prcm43xx.h | 5 +---- arch/arm/mach-omap2/vc.c | 6 +----- arch/arm/mach-orion5x/board-d2net.c | 5 +---- arch/arm/mach-orion5x/board-dt.c | 5 +---- arch/arm/mach-orion5x/board-rd88f5182.c | 5 +---- arch/arm/mach-orion5x/bridge-regs.h | 9 ++------- arch/arm/mach-orion5x/common.c | 5 +---- arch/arm/mach-orion5x/db88f5281-setup.c | 5 +---- arch/arm/mach-orion5x/irq.c | 5 +---- arch/arm/mach-orion5x/irqs.h | 5 +---- arch/arm/mach-orion5x/kurobox_pro-setup.c | 5 +---- arch/arm/mach-orion5x/ls_hgl-setup.c | 5 +---- arch/arm/mach-orion5x/mpp.c | 5 +---- arch/arm/mach-orion5x/net2big-setup.c | 6 +----- arch/arm/mach-orion5x/orion5x.h | 5 +---- arch/arm/mach-orion5x/pci.c | 5 +---- arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | 5 +---- arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | 5 +---- arch/arm/mach-orion5x/rd88f5182-setup.c | 5 +---- arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | 5 +---- arch/arm/mach-orion5x/ts78xx-setup.c | 5 +---- arch/arm/mach-orion5x/wnr854t-setup.c | 9 ++------- arch/arm/mach-orion5x/wrt350n-v2-setup.c | 9 ++------- arch/arm/mach-pxa/eseries.c | 7 +------ arch/arm/mach-pxa/standby.S | 6 ++---- arch/arm/mach-spear/generic.h | 5 +---- arch/arm/mach-spear/misc_regs.h | 5 +---- arch/arm/mach-spear/pl080.c | 5 +---- arch/arm/mach-spear/pl080.h | 5 +---- arch/arm/mach-spear/restart.c | 5 +---- arch/arm/mach-spear/spear.h | 5 +---- arch/arm/mach-spear/spear1310.c | 5 +---- arch/arm/mach-spear/spear1340.c | 5 +---- arch/arm/mach-spear/spear13xx.c | 5 +---- arch/arm/mach-spear/spear300.c | 5 +---- arch/arm/mach-spear/spear310.c | 5 +---- arch/arm/mach-spear/spear320.c | 5 +---- arch/arm/mach-spear/spear3xx.c | 5 +---- arch/arm/mach-spear/spear6xx.c | 5 +---- arch/arm/mach-spear/time.c | 5 +---- arch/arm/mm/cache-feroceon-l2.c | 5 +---- arch/arm/mm/cache-tauros2.c | 5 +---- 149 files changed, 185 insertions(+), 656 deletions(-) commit 2aec85b26f39fa9e036c5872950c0ef9b479a1ec Author: Thomas Gleixner Date: Tue Jun 7 16:11:13 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 2) Based on the normalized pattern: this program is free software you can redistribute it and/or modify it under the terms of the gnu general public license as published by the free software foundation version 2 this program is distributed as is without any warranty of any kind whether express or implied without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/dma/bcm-sba-raid.c | 14 ++------------ drivers/dma/ti/edma.c | 10 +--------- drivers/gpio/gpio-bcm-kona.c | 10 +--------- drivers/gpio/gpio-brcmstb.c | 14 ++------------ drivers/i2c/busses/i2c-bcm-iproc.c | 14 ++------------ drivers/i2c/busses/i2c-bcm-kona.c | 14 ++------------ drivers/i2c/busses/i2c-brcmstb.c | 14 ++------------ drivers/input/keyboard/bcm-keypad.c | 14 ++------------ drivers/input/misc/gpio_decoder.c | 10 +--------- drivers/input/touchscreen/bcm_iproc_tsc.c | 9 +-------- drivers/irqchip/irq-keystone.c | 10 +--------- drivers/mailbox/bcm-flexrm-mailbox.c | 14 ++------------ drivers/media/i2c/adv7343_regs.h | 10 +--------- drivers/media/i2c/adv7393_regs.h | 10 +--------- drivers/media/platform/ti/davinci/vpif.h | 11 +---------- drivers/media/platform/ti/davinci/vpif_display.h | 10 +--------- drivers/memory/ti-emif-sram-pm.S | 10 +--------- drivers/mfd/lp873x.c | 10 +--------- drivers/mfd/tps65217.c | 10 +--------- drivers/mmc/host/sdhci-bcm-kona.c | 14 ++------------ drivers/mmc/host/sdhci-iproc.c | 14 ++------------ drivers/net/can/ti_hecc.c | 11 +---------- drivers/nvmem/bcm-ocotp.c | 14 ++------------ drivers/phy/broadcom/phy-bcm-cygnus-pcie.c | 14 ++------------ drivers/phy/broadcom/phy-bcm-ns2-pcie.c | 14 ++------------ drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c | 14 ++------------ drivers/phy/motorola/phy-cpcap-usb.c | 10 +--------- drivers/phy/ti/phy-dm816x-usb.c | 11 +---------- drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 14 ++------------ drivers/pinctrl/bcm/pinctrl-cygnus-mux.c | 14 ++------------ drivers/pinctrl/bcm/pinctrl-ns2-mux.c | 10 +--------- drivers/pinctrl/bcm/pinctrl-nsp-gpio.c | 14 ++------------ drivers/pinctrl/bcm/pinctrl-nsp-mux.c | 10 +--------- drivers/power/reset/brcm-kona-reset.c | 14 ++------------ drivers/power/reset/brcmstb-reboot.c | 14 ++------------ drivers/ptp/ptp_dte.c | 14 ++------------ drivers/pwm/pwm-bcm-iproc.c | 14 ++------------ drivers/pwm/pwm-bcm-kona.c | 14 ++------------ drivers/regulator/cpcap-regulator.c | 10 +--------- drivers/regulator/isl6271a-regulator.c | 10 +--------- drivers/regulator/tps65023-regulator.c | 10 +--------- drivers/regulator/tps6507x-regulator.c | 10 +--------- drivers/regulator/tps65217-regulator.c | 10 +--------- drivers/soc/ti/knav_dma.c | 10 +--------- drivers/uio/uio_pruss.c | 10 +--------- drivers/video/backlight/tps65217_bl.c | 10 +--------- include/dt-bindings/clock/bcm21664.h | 10 +--------- include/dt-bindings/clock/bcm281xx.h | 10 +--------- include/linux/mfd/lp873x.h | 10 +--------- include/linux/mfd/tps65217.h | 10 +--------- include/linux/platform_data/davinci_asp.h | 10 +--------- include/linux/platform_data/gpio-davinci.h | 10 +--------- include/linux/platform_data/uio_dmem_genirq.h | 10 +--------- include/linux/platform_data/uio_pruss.h | 10 +--------- include/linux/reset/bcm63xx_pmb.h | 10 +--------- include/linux/soc/ti/knav_dma.h | 10 +--------- include/linux/soc/ti/knav_qmss.h | 10 +--------- include/linux/sram.h | 14 ++------------ include/linux/ti-emif-sram.h | 10 +--------- include/linux/wkup_m3_ipc.h | 10 +--------- include/media/i2c/adv7343.h | 10 +--------- include/media/i2c/adv7393.h | 10 +--------- net/hsr/hsr_debugfs.c | 10 +--------- sound/soc/bcm/cygnus-pcm.c | 14 ++------------ sound/soc/bcm/cygnus-ssp.c | 14 ++------------ sound/soc/bcm/cygnus-ssp.h | 14 ++------------ 66 files changed, 91 insertions(+), 671 deletions(-) commit 52e6676ef56f4803b1ef14ed427c5824050163a3 Author: Thomas Gleixner Date: Tue Jun 7 16:11:11 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) Based on the normalized pattern: this program is free software you can redistribute it and/or modify it under the terms of the gnu general public license as published by the free software foundation version 2 this program is distributed as is without any warranty of any kind whether express or implied without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman arch/arm/boot/dts/bcm11351.dtsi | 14 ++------------ arch/arm/boot/dts/bcm21664-garnet.dts | 14 ++------------ arch/arm/boot/dts/bcm21664.dtsi | 14 ++------------ arch/arm/boot/dts/bcm28155-ap.dts | 14 ++------------ arch/arm/boot/dts/dra72x-mmc-iodelay.dtsi | 10 +--------- arch/arm/boot/dts/dra74x-mmc-iodelay.dtsi | 10 +--------- arch/arm/include/debug/brcmstb.S | 14 ++------------ arch/arm/mach-bcm/Makefile | 9 +-------- arch/arm/mach-bcm/bcm63xx.c | 14 ++------------ arch/arm/mach-bcm/bcm_cygnus.c | 14 ++------------ arch/arm/mach-bcm/bcm_hr2.c | 14 ++------------ arch/arm/mach-bcm/bcm_kona_smc.c | 14 ++------------ arch/arm/mach-bcm/bcm_kona_smc.h | 14 ++------------ arch/arm/mach-bcm/bcm_nsp.c | 14 ++------------ arch/arm/mach-bcm/board_bcm21664.c | 14 ++------------ arch/arm/mach-bcm/board_bcm23550.c | 14 ++------------ arch/arm/mach-bcm/board_bcm281xx.c | 14 ++------------ arch/arm/mach-bcm/brcmstb.c | 14 ++------------ arch/arm/mach-bcm/kona_l2_cache.c | 14 ++------------ arch/arm/mach-bcm/kona_l2_cache.h | 14 ++------------ arch/arm/mach-bcm/platsmp-brcmstb.c | 10 +--------- arch/arm/mach-davinci/board-dm365-evm.c | 11 +---------- arch/arm/mach-davinci/davinci.h | 10 +--------- arch/arm/mach-davinci/dm365.c | 10 +--------- arch/arm/mach-davinci/pm.h | 10 +--------- arch/arm/mach-omap1/gpio15xx.c | 10 +--------- arch/arm/mach-omap1/gpio16xx.c | 10 +--------- arch/arm/mach-omap1/gpio7xx.c | 10 +--------- arch/arm/mach-omap2/am33xx.h | 10 +--------- arch/arm/mach-omap2/clockdomains33xx_data.c | 10 +--------- arch/arm/mach-omap2/clockdomains81xx_data.c | 10 +--------- arch/arm/mach-omap2/cm-regbits-33xx.h | 10 +--------- arch/arm/mach-omap2/cm33xx.c | 10 +--------- arch/arm/mach-omap2/cm33xx.h | 10 +--------- arch/arm/mach-omap2/cm81xx.h | 10 +--------- arch/arm/mach-omap2/omap_hwmod_81xx_data.c | 11 +---------- arch/arm/mach-omap2/powerdomains33xx_data.c | 10 +--------- arch/arm/mach-omap2/prm-regbits-33xx.h | 10 +--------- arch/arm/mach-omap2/prm33xx.c | 10 +--------- arch/arm/mach-omap2/prm33xx.h | 10 +--------- arch/arm/mach-omap2/ti81xx.h | 10 +--------- drivers/char/hw_random/iproc-rng200.c | 9 +-------- drivers/clk/bcm/clk-bcm21664.c | 10 +--------- drivers/clk/bcm/clk-bcm281xx.c | 10 +--------- drivers/clk/bcm/clk-bcm63xx.c | 14 ++------------ drivers/clk/bcm/clk-cygnus.c | 14 ++------------ drivers/clk/bcm/clk-hr2.c | 14 ++------------ drivers/clk/bcm/clk-iproc-armpll.c | 14 ++------------ drivers/clk/bcm/clk-iproc-asiu.c | 14 ++------------ drivers/clk/bcm/clk-iproc-pll.c | 14 ++------------ drivers/clk/bcm/clk-iproc.h | 14 ++------------ drivers/clk/bcm/clk-kona-setup.c | 10 +--------- drivers/clk/bcm/clk-kona.c | 10 +--------- drivers/clk/bcm/clk-kona.h | 10 +--------- drivers/clk/bcm/clk-ns2.c | 14 ++------------ drivers/clk/bcm/clk-nsp.c | 14 ++------------ drivers/clk/ti/adpll.c | 11 +---------- drivers/clk/ti/clk-2xxx.c | 10 +--------- drivers/clk/ti/clk-33xx.c | 10 +--------- drivers/clk/ti/clk-3xxx.c | 10 +--------- drivers/clk/ti/clk-43xx.c | 10 +--------- drivers/clk/ti/clk-816x.c | 11 +---------- drivers/clk/ti/clock.h | 10 +--------- drivers/clk/ti/fapll.c | 11 +---------- 64 files changed, 90 insertions(+), 657 deletions(-) commit a6546f89eac9bfad4b50a7f8ccfbefe0ae01e7df Author: Thomas Gleixner Date: Tue Jun 7 16:11:10 2022 +0200 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_8.RULE Based on the normalized pattern: this program is free software you can redistribute it and/or modify it under the terms of the gnu general public license version 2 as published by the free software foundation extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/vfio-mediated-device.rst | 4 +--- arch/arm/boot/bootp/bootp.lds | 5 +---- include/linux/input/elan-i2c-ids.h | 5 +---- 3 files changed, 3 insertions(+), 11 deletions(-) commit 20646f5b1e798bcc20044ae90ac3702f177bf254 Author: Thomas Gleixner Date: Mon Jun 6 17:23:45 2022 +0200 netfilter: xtables: Bring SPDX identifier back Commit e2be04c7f995 ("License cleanup: add SPDX license identifier to uapi header files with a license") added the correct SPDX identifier to include/uapi/linux/netfilter/xt_IDLETIMER.h. A subsequent commit removed it for no reason and reintroduced the UAPI license incorrectness as the file is now missing the UAPI exception again. Add it back and remove the GPLv2 boilerplate while at it. Fixes: 68983a354a65 ("netfilter: xtables: Add snapshot of hardidletimer target") Cc: Manoj Basapathi Cc: Subash Abhinov Kasiviswanathan Cc: Pablo Neira Ayuso Cc: netfilter-devel@vger.kernel.org Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman include/uapi/linux/netfilter/xt_IDLETIMER.h | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit 4bbdc208a5ff3ba970fecd4fdb36a9ce6ca06895 Author: Tetsuo Handa Date: Fri Jun 10 19:08:43 2022 +0900 staging: olpc_dcon: Replace flush_scheduled_work() with flush_work(). Since "struct dcon_priv" is per a device struct, I assume that dcon_set_source_sync() needs to wait for only one work associated with that device. Therefore, wait for only that work using flush_work(). Signed-off-by: Tetsuo Handa Link: https://lore.kernel.org/r/a973969d-cfd0-adc8-2651-d299199dbd7b@I-love.SAKURA.ne.jp Signed-off-by: Greg Kroah-Hartman drivers/staging/olpc_dcon/olpc_dcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2b47721a10037c17b378decc611341bfff60c44 Author: Johan Hovold Date: Fri Jun 10 09:53:47 2022 +0200 staging: greybus: audio: replace safe list iteration No entry is being removed from the list when iterating the widget list in gbaudio_dapm_free_controls() so there's no need to use list_for_each_entry_safe(). Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220610075347.18917-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_helper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 67b9d64139e13621d3ab8bb0daad7602e5fe0778 Author: David Jander Date: Thu Jun 9 14:13:34 2022 +0200 spi: Fix per-cpu stats access on 32 bit systems On 32 bit systems, the following kernel BUG is hit: BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1 caller is debug_smp_processor_id+0x18/0x24 CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.19.0-rc1-00001-g6ae0aec8a366 #181 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) Backtrace: dump_backtrace from show_stack+0x20/0x24 r7:81024ffd r6:00000000 r5:81024ffd r4:60000013 show_stack from dump_stack_lvl+0x60/0x78 dump_stack_lvl from dump_stack+0x14/0x1c r7:81024ffd r6:80f652de r5:80bec180 r4:819a2500 dump_stack from check_preemption_disabled+0xc8/0xf0 check_preemption_disabled from debug_smp_processor_id+0x18/0x24 r8:8119b7e0 r7:81205534 r6:819f5c00 r5:819f4c00 r4:c083d724 debug_smp_processor_id from __spi_sync+0x78/0x220 __spi_sync from spi_sync+0x34/0x4c r10:bb7bf4e0 r9:c083d724 r8:00000007 r7:81a068c0 r6:822a83c0 r5:c083d724 r4:819f4c00 spi_sync from spi_mem_exec_op+0x338/0x370 r5:000000b4 r4:c083d910 spi_mem_exec_op from spi_nor_read_id+0x98/0xdc r10:bb7bf4e0 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:82358040 r4:819f7c40 spi_nor_read_id from spi_nor_detect+0x38/0x114 r7:82358040 r6:00000000 r5:819f7c40 r4:819f7c40 spi_nor_detect from spi_nor_scan+0x11c/0xbec r10:bb7bf4e0 r9:00000000 r8:00000000 r7:c083da4c r6:00000000 r5:00010101 r4:819f7c40 spi_nor_scan from spi_nor_probe+0x10c/0x2d0 r10:bb7bf4e0 r9:bb7bf4d0 r8:00000000 r7:819f4c00 r6:00000000 r5:00000000 r4:819f7c40 per-cpu access needs to be guarded against preemption. Fixes: 6598b91b5ac3 ("spi: spi.c: Convert statistics to per-cpu u64_stats_t") Reported-by: Marc Kleine-Budde Signed-off-by: David Jander Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220609121334.2984808-1-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 5 ++++- include/linux/spi/spi.h | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) commit a1f0161eadbd7941c09b5f4c6a210c390d2b86d6 Author: Andy Chiu Date: Fri Jun 10 15:44:59 2022 +0800 spi: sifive: add PM callbacks to support suspend/resume The patch has been tested on Unmatched using pm_test. The Unmatched board uses SD over SPI and it was tested by initiating S2RAM cycles for all devices while reading/writing files at the same time. We found no dropped connection to the card or corrupted filesystem during test cycles. Signed-off-by: Andy Chiu Reviewed-by: Greentime Hu Link: https://lore.kernel.org/r/20220610074459.3261383-2-andy.chiu@sifive.com Signed-off-by: Mark Brown drivers/spi/spi-sifive.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit c7b6c95c3ef37d7a0b28e62391bccfefdabd7a18 Author: Pierre-Louis Bossart Date: Fri Jun 10 10:12:45 2022 +0300 ASoC: SOF: ipc3-dtrace: use pm_runtime_resume_and_get() Use pm_runtime_resume_and_get() to replace the pm_runtime_get_sync() and pm_runtime_put_noidle() pattern. No functional changes. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20220610071245.26576-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc3-dtrace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 145cb4e7a9ee12326f99948d8980ad258462b6c4 Author: Peter Ujfalusi Date: Fri Jun 10 11:04:21 2022 +0300 ASoC: SOF: debug: Clarify the IPC timeout handling path The dmesg log message of "Firmware exception" causes lots of confusion as the snd_sof_handle_fw_exception() is only called in case of an IPC tx timeout, where such a message does not make much sense. To not limit the snd_sof_handle_fw_exception() handler to just one error case, add a parameter to allow the caller to specify a meaningful message to be printed. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Yaochun Hung Link: https://lore.kernel.org/r/20220610080421.31453-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/debug.c | 5 ++--- sound/soc/sof/ipc3.c | 2 +- sound/soc/sof/sof-priv.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) commit df4d27b19b892f464685ea45fa6132dd1a2b6864 Author: Martin Povišer Date: Mon Jun 6 21:19:09 2022 +0200 ASoC: Introduce 'fixup_controls' card method The new method is called just before the card is registered, providing an opportune time for machine-level drivers to do some final controls amending: deactivating individual controls or obtaining control references for later use. Some controls can be created by DAPM after 'late_probe' has been called, hence the need for this new method. Signed-off-by: Martin Povišer Link: https://lore.kernel.org/r/20220606191910.16580-5-povik+lin@cutebit.org Signed-off-by: Mark Brown include/sound/soc-card.h | 1 + include/sound/soc.h | 1 + sound/soc/soc-card.c | 6 ++++++ sound/soc/soc-core.c | 1 + 4 files changed, 9 insertions(+) commit 1eb73102da280b28bc3899f694e673bf3e4d0afd Author: Cezary Rojewski Date: Thu Jun 9 15:35:33 2022 +0200 ASoC: codecs: rt298: Reorganize jack detect handling Clean up in order to use and expose .set_jack callback. Signed-off-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20220609133541.3984886-4-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/rt298.c | 17 ++++++----------- sound/soc/codecs/rt298.h | 2 -- sound/soc/intel/boards/bxt_rt298.c | 2 +- 3 files changed, 7 insertions(+), 14 deletions(-) commit 3082afe097cc5d794c28a629f3492a0133ee4891 Author: Cezary Rojewski Date: Thu Jun 9 15:35:32 2022 +0200 ASoC: codecs: rt286: Reorganize jack detect handling Clean up in order to use and expose .set_jack callback. Signed-off-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20220609133541.3984886-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/rt286.c | 17 ++++++----------- sound/soc/codecs/rt286.h | 2 -- sound/soc/intel/boards/broadwell.c | 6 +++--- sound/soc/intel/boards/skl_rt286.c | 2 +- 4 files changed, 10 insertions(+), 17 deletions(-) commit a43b4394bb35391b74486a788be6634ed91e221a Author: Cezary Rojewski Date: Thu Jun 9 15:35:31 2022 +0200 ASoC: codecs: rt274: Always init jack_detect_work Improves readability by making sure the work is always initialized. Signed-off-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20220609133541.3984886-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/rt274.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 2fbe0953732e06b471cdedbf6f615b84235580d8 Author: Srinivas Kandagatla Date: Thu Jun 9 12:19:01 2022 +0100 ASoC: codecs: wcd9335: move gains from SX_TLV to S8_TLV move all the digital gains form using SX_TLV to S8_TLV, these gains are actually 8 bit gains with 7th signed bit and ranges from -84dB to +40dB rest of the Qualcomm wcd codecs uses these properly. Fixes: 8c4f021d806a ("ASoC: wcd9335: add basic controls") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220609111901.318047-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/codecs/wcd9335.c | 81 +++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 45 deletions(-) commit 5babb012c847beb6c8c7108fd78f650b7a2c6054 Author: Srinivas Kandagatla Date: Thu Jun 9 12:19:00 2022 +0100 ASoC: codecs: msm8916-wcd-digital: move gains from SX_TLV to S8_TLV move all the digital gains form using SX_TLV to S8_TLV, these gains are actually 8 bit gains with 7th signed bit and ranges from -84dB to +40dB rest of the Qualcomm wcd codecs uses these properly. Fixes: ef8a4757a6db ("ASoC: msm8916-wcd-digital: Add sidetone support") Fixes: 150db8c5afa1 ("ASoC: codecs: Add msm8916-wcd digital codec") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220609111901.318047-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/codecs/msm8916-wcd-digital.c | 46 +++++++++++++++++----------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit a45a4d4390b7a562f8edc3518ba6cd2ad17be5bc Author: Bard Liao Date: Wed Jun 8 20:26:43 2022 -0700 ASoC: SOF: IPC4: add sdw blob Add IPC4 SoundWire blob. It includes a common IPC4 gateway and a multiple ALH configuration struct which is used for storing the aggregated SoundWire stream information. Signed-off-by: Bard Liao Reviewed-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220609032643.916882-24-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 44 +++++++++++++++++++++++++++++++++++++++++++ sound/soc/sof/ipc4-topology.h | 25 ++++++++++++++++++++++++ 2 files changed, 69 insertions(+) commit 9e2b5d33fec938ea2518735f2b66313cab89bb61 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:42 2022 -0700 AsoC: SOF: ipc4-topology: Add dai_get_clk op Define and set the dai_get_clk_op for IPC4. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220609032643.916882-23-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 58 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit aa84ffb721587d134702a1932f2c8793e8709df4 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:41 2022 -0700 ASoC: SOF: ipc4-topology: Add support for SSP/DMIC DAI's The copier config for SSP and DMIC type DAI copiers needs to be parsed and matched with the runtime hw_config from the NHLT table. Along with this, also add the change to set the node_id for these copier types. Co-developed-by: Jaska Uimonen Signed-off-by: Jaska Uimonen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220609032643.916882-22-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 148 +++++++++++++++++++++++++++++++++++++++--- sound/soc/sof/ipc4-topology.h | 6 ++ 2 files changed, 146 insertions(+), 8 deletions(-) commit 323aa1f093e6113f78a8ae808c6c097663d8cb4c Author: Ranjani Sridharan Date: Wed Jun 8 20:26:40 2022 -0700 ASoC: SOF: Add a new IPC op for parsing topology manifest Add a new topology IPC op, parse_manifest. Define and set the op for IPC4 and IPC4. Co-developed-by: Jaska Uimonen Signed-off-by: Jaska Uimonen Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220609032643.916882-21-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc3-topology.c | 48 +++++++++++++++++++++++++++++++++ sound/soc/sof/ipc4-topology.c | 63 +++++++++++++++++++++++++++++++++++++++++++ sound/soc/sof/sof-audio.h | 3 +++ sound/soc/sof/topology.c | 45 +++---------------------------- 4 files changed, 118 insertions(+), 41 deletions(-) commit 4453d24d10fdd9e40c84673e3eda7701055081ea Author: Ranjani Sridharan Date: Wed Jun 8 20:26:39 2022 -0700 ASoC: SOF: Add two new structures for topology manifest data Add a couple of structures for parsing and saving the topology manifest data. Co-developed-by: Jaska Uimonen Signed-off-by: Jaska Uimonen Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220609032643.916882-20-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown include/uapi/sound/sof/abi.h | 2 ++ include/uapi/sound/sof/header.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) commit 1da51943725f29000ae4d2be3b3b4bf8309d99a2 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:38 2022 -0700 ASoC: SOF: Intel: hda: init NHLT for IPC4 Init and save the BIOS NHLT as part of the IPC4 FW data. Add a kernel module param to override the BIOS NHLT with the NHLT from the topology. Also, add the ops_free callback for all HDA platforms to free the NHLT. Co-developed-by: Jaska Uimonen Signed-off-by: Jaska Uimonen Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220609032643.916882-19-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dai.c | 28 ++++++++++++++++++++++++++++ sound/soc/sof/intel/hda.h | 1 + sound/soc/sof/intel/pci-apl.c | 1 + sound/soc/sof/intel/pci-cnl.c | 1 + sound/soc/sof/intel/pci-icl.c | 1 + sound/soc/sof/intel/pci-tgl.c | 1 + sound/soc/sof/ipc4-priv.h | 2 ++ 7 files changed, 35 insertions(+) commit bc433fd76faefb8484f5bc653d846043822a2d35 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:37 2022 -0700 ASoC: SOF: Add ops_free Add the ops_free callback in struct sof_dev_desc. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220609032643.916882-18-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown include/sound/sof.h | 1 + sound/soc/sof/core.c | 7 ++++++- sound/soc/sof/ops.h | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) commit 4c30004a7c6920c66a08c1aa16481c28202eefd0 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:36 2022 -0700 ASoC: SOF: IPC4: set the BE DAI ops Add BE DAI drv ops for IPC4 for DMIC, SSP and HDA type DAI's. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220609032643.916882-17-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dai.c | 173 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 170 insertions(+), 3 deletions(-) commit d0c0d5bf944b13b4e293746eb655f1c2caf67231 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:35 2022 -0700 ASoC: SOF: ipc4-pcm: Expose sof_ipc4_set_pipeline_state() Expose the sof_ipc4_set_pipeline_state() function as it will be used in the IPC4-specific BE DAI driver ops. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220609032643.916882-16-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-pcm.c | 3 ++- sound/soc/sof/ipc4-priv.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit acf48a1f76b887f6a63f3c91eedac80b38341c05 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:34 2022 -0700 ASoC: SOF: ipc4-topology: Add the dai_config op Define and set the dai_config op for IPC4. Co-developed-by: Rander Wang Signed-off-by: Rander Wang Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220609032643.916882-15-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 45 +++++++++++++++++++++++++++++++++++++++++++ sound/soc/sof/ipc4-topology.h | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) commit 3acd527089463742a3dd95e274d53c2fdd834716 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:33 2022 -0700 ASoC: SOF: ipc4-topology: Add route_setup/route_free ops Define and set the route_setup/route_free ops for IPC4. Co-developed-by: Rander Wang Signed-off-by: Rander Wang Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220609032643.916882-14-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 76 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit 6e9257a13c75b2e4fc33477f9de4912fdfae81e1 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:32 2022 -0700 ASoC: SOF: ipc4-topology: Add widget_setup/widget_free ops Define and set the widget_setup/widget_free ops for IPC4. Co-developed-by: Rander Wang Signed-off-by: Rander Wang Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220609032643.916882-13-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 123 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) commit e75e5db8f8ac5b9d4e8968060822bed4671f22ec Author: Ranjani Sridharan Date: Wed Jun 8 20:26:31 2022 -0700 ASoC: SOF: IPC4: Add pcm ops Define and set the PCM ops for IPC4. Co-developed-by: Rander Wang Signed-off-by: Rander Wang Co-developed-by: Bard Liao Signed-off-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Yaochun Hung Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220609032643.916882-12-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/Makefile | 2 +- sound/soc/sof/ipc4-pcm.c | 229 ++++++++++++++++++++++++++++++++++++++++++++++ sound/soc/sof/ipc4-priv.h | 1 + sound/soc/sof/ipc4.c | 1 + 4 files changed, 232 insertions(+), 1 deletion(-) commit 955e84fc0b6df6cfb95ee6f569be809af49d8287 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:30 2022 -0700 ASoC: SOF: ipc4-topology: Add control IO ops Define the kcontrol IO ops for volume type controls for IPC4. Support for other kcontrol types will be added later. Co-developed-by: Rander Wang Signed-off-by: Rander Wang Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220609032643.916882-11-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/Makefile | 2 +- sound/soc/sof/ipc4-control.c | 216 ++++++++++++++++++++++++++++++++++++++++++ sound/soc/sof/ipc4-priv.h | 1 + sound/soc/sof/ipc4-topology.c | 1 + 4 files changed, 219 insertions(+), 1 deletion(-) commit d97964f870786389f4c399a507ffa5d1ebf2a9e4 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:29 2022 -0700 ASoC: SOF: ipc4-topology: Add control_setup op Define the control_setup op for IPC4 topology IPC ops to handle the volume kcontrol types. Support for other kcontrol types will be added in the follow up patches. Co-developed-by: Rander Wang Signed-off-by: Rander Wang Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220609032643.916882-10-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 49 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 4d4ba014ac4b3772ed39c15cd2ceacbb071c26f6 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:28 2022 -0700 ASoC: SOF: ipc4-topology: Add support for parsing mixer widgets Add support for parsing and preparing mixer type widgets. Define the token ID's and the associated token arrays needed to parse these widgets. Co-developed-by: Rander Wang Signed-off-by: Rander Wang Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Paul Olaru Link: https://lore.kernel.org/r/20220609032643.916882-9-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 68 +++++++++++++++++++++++++++++++++++++++++++ sound/soc/sof/ipc4-topology.h | 12 ++++++++ 2 files changed, 80 insertions(+) commit 4f838ab2081260119677df3ba94dbbd4f8cb7183 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:27 2022 -0700 ASoC: SOF: ipc4-topology: Add support for parsing and preparing pga widgets Add support for parsing and preparing pga type widgets. Define the token ID's and the associated token arrays needed to parse these widgets. Co-developed-by: Rander Wang Signed-off-by: Rander Wang Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Paul Olaru Link: https://lore.kernel.org/r/20220609032643.916882-8-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 113 ++++++++++++++++++++++++++++++++++++++++++ sound/soc/sof/ipc4-topology.h | 60 ++++++++++++++++++++++ sound/soc/sof/sof-audio.h | 1 + 3 files changed, 174 insertions(+) commit acf525942077213e9bc00eee8a73af360ab2fc08 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:26 2022 -0700 ASoC: SOF: ipc4-topology: Add prepare op for DAI type widgets Define the prepare op for the DAI type widgets for IPC4. The prepare op is responsible for choosing the input/output audio formats for these widgets based on the runtime PCM params, assigning the instance ID and updating the total memory usage for the pipelines these widgets belong to. Co-developed-by: Rander Wang Signed-off-by: Rander Wang Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220609032643.916882-7-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) commit 904c48c40c66c524df90fb660bdbc514ed802e67 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:25 2022 -0700 ASoC: SOF: ipc4-topology: Add prepare op for AIF type widgets Define the prepare op for the AIF type widgets for IPC4. The prepare op is responsible for choosing the input/output audio formats for these widgets based on the runtime PCM params, assigning the instance ID and updating the total memory usage for the pipelines these widgets belong to. Co-developed-by: Rander Wang Signed-off-by: Rander Wang Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220609032643.916882-6-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 290 +++++++++++++++++++++++++++++++++++++++++- sound/soc/sof/ipc4-topology.h | 18 +++ 2 files changed, 306 insertions(+), 2 deletions(-) commit abfb536bd116d3148e92bf38255fc0989ca9b7d4 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:24 2022 -0700 ASoC: SOF: ipc4-topology: Add support for parsing DAI_IN/DAI_OUT widgets Add support for parsing and setting up the IPC structure for DAI_IN/DAI_OUT type widgets in IPC4. Co-developed-by: Rander Wang Signed-off-by: Rander Wang Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220609032643.916882-5-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 135 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) commit 2cabd02b60901f4ceda4daf8c194905259797702 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:23 2022 -0700 ASoC: SOF: ipc4-topology: Add support for parsing AIF_IN/AIF_OUT widgets Add support for parsing AIF_IN/AIF_OUT type widgets in IPC4. Add all the new required token ID's for parsing these widgets to the list of tokens in enum sof_tokens and the definitions of the token arrays corresponding to each of the token ID's. Also, upgrade the sof_widget_parse_tokens() function in the common topology parser to be able to parse multiple sets of tokens for the audio format and copier gateway config tokens. Co-developed-by: Rander Wang Signed-off-by: Rander Wang Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Paul Olaru Link: https://lore.kernel.org/r/20220609032643.916882-4-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 370 ++++++++++++++++++++++++++++++++++++++++++ sound/soc/sof/ipc4-topology.h | 83 ++++++++++ sound/soc/sof/sof-audio.h | 7 + sound/soc/sof/topology.c | 69 ++++++-- 4 files changed, 511 insertions(+), 18 deletions(-) commit 90e891551fb4949daeb3df20d43e7da838ef89a3 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:22 2022 -0700 ASoC: SOF: IPC4: Introduce topology ops Introduce the topology ops for IPC4. Set the widget_ops and token_list for parsing the scheduler type widget. Support for other widget types will be added in the follow up patches. Co-developed-by: Rander Wang Signed-off-by: Rander Wang Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Paul Olaru Link: https://lore.kernel.org/r/20220609032643.916882-3-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/Makefile | 2 +- sound/soc/sof/ipc4-priv.h | 1 + sound/soc/sof/ipc4-topology.c | 102 ++++++++++++++++++++++++++++++++++++++++++ sound/soc/sof/ipc4-topology.h | 30 +++++++++++++ sound/soc/sof/ipc4.c | 1 + 5 files changed, 135 insertions(+), 1 deletion(-) commit bd10cd5ec54616a488d0bda695f78694ad79f779 Author: Ranjani Sridharan Date: Wed Jun 8 20:26:21 2022 -0700 ASoC: SOF: Add topology tokens for IPC4 Add the required tokens for parsing the topology for IPC4. Co-developed-by: Rander Wang Signed-off-by: Rander Wang Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220609032643.916882-2-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown include/uapi/sound/sof/tokens.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 1e90de2c9a40d7d0af5c7b0a6e2d362ffba94772 Author: Peter Ujfalusi Date: Fri Jun 10 11:01:19 2022 +0300 ASoC: SOF: ipc3-dtrace: Return from dtrace_read if there is no new data available If no new trace data is available then return immediately, there is no need to continue with the execution of the trace_read() function. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220610080119.30880-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc3-dtrace.c | 4 ++++ 1 file changed, 4 insertions(+) commit b66f9e703f0bee4e1aa7010299914b7b2009b4e0 Author: Peter Ujfalusi Date: Fri Jun 10 11:01:18 2022 +0300 ASoC: SOF: ipc3-dtrace: Add helper function to update the sdev->host_offset We are using the READ_ONCE() on the debugfs read path for accessing sdev->host_offset, but the set is not atomic or protected in any way. Add a small helper to do the host_offset update and be really paranoid about the a possible race in update Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220610080119.30880-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc3-dtrace.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 135786c32ed057068bec56f67a54064cfc845bde Author: Peter Ujfalusi Date: Fri Jun 10 11:01:17 2022 +0300 ASoC: SOF: ipc3-dtrace: Introduce SOF_DTRACE_INITIALIZING state With the new state we can make sure we are not missing the first host_offset update. In case the dtrace is small, the DMA copy will be fast and depending on the moonphase it might be done before we set the sdev->dtrace_state to SOF_DTRACE_ENABLED. The DMA will start the copy as soon as the host starts the DMA. Set the dtrace to enabled before we let the DMA to run in order to avoid missing the position update. The new state is needed to cover architectures where the host side snd_sof_dma_trace_trigger() is a NOP and the dtrace in the firmware is ready as soon as the IPC message has been processed. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220610080119.30880-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc3-dtrace.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 63b9069653a710b08d5fd174ac05d43711356541 Author: Peter Ujfalusi Date: Fri Jun 10 11:35:49 2022 +0300 ASoC: SOF: ipc4: implement pm ctx_save callback Use the context save callback to power down the primary core which is used by the firmware as an indication that the DSP is going to be turned off. The IMR boot setup is done in response to the primary core power down. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220610083549.16773-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 7a5677407300e8ba6af95e66f4e8cfe23059f4a7 Author: Peter Ujfalusi Date: Fri Jun 10 11:35:48 2022 +0300 ASoC: SOF: Intel: Switch to use the generic pm_ops.set_core_state Instead of craft and send an IPC(3) message in hda_dsp_core_get(), tgl_dsp_core_get() and tgl_dsp_core_put(), use the generic ops for handling the IPC dependent implementation of core power on/off. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220610083549.16773-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dsp.c | 15 ++++++--------- sound/soc/sof/intel/tgl.c | 30 ++++++++++-------------------- 2 files changed, 16 insertions(+), 29 deletions(-) commit bd3df9ff25b32b66630c283bb2e065e8bb822e72 Author: Peter Ujfalusi Date: Fri Jun 10 11:35:47 2022 +0300 ASoC: SOF: ipc4: Add set_core_state pm_ops implementation IPC4 uses the SET_DX message to enable/disable cores managed by the DSP. The dx_state.core_mask indicates which core is going to change state, the dx_state.dx_mask is to power on (1) or off (0) the core. In the dx_mask only those bits (cores) checked which bit is set in the core_mask, other bits (cores) ignored. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220610083549.16773-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown include/sound/sof/ipc4/header.h | 8 ++++++++ sound/soc/sof/ipc4.c | 26 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) commit 0a047dafefafbccc931fab2d187ce75c302088d5 Author: Peter Ujfalusi Date: Fri Jun 10 11:35:46 2022 +0300 ASoC: SOF: ipc3: Add set_core_state pm_ops implementation IPC3 uses sof_ipc_pm_core_config message (SOF_IPC_GLB_PM_MSG | SOF_IPC_PM_CORE_ENABLE) to enable/disable cores managed by the DSP. The core state is set via a single bitfield, if the bit is 1 the core should be on, if it is 0 then it is off. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220610083549.16773-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc3.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit b41252d8820c7009078c3d401a807a9da899075f Author: Peter Ujfalusi Date: Fri Jun 10 11:35:45 2022 +0300 ASoC: SOF: sof_ipc_pm_ops: Add support for DSP core power management Add a new ops for handling DSP core power state which can be used to tell the DSP to turn on/off a core (or to inform it that a core is going to be turned on/off if the core is host managed). Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220610083549.16773-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/sof-priv.h | 2 ++ 1 file changed, 2 insertions(+) commit 03f69725749f453b9a4d454a92805f8eb5f095c2 Author: Peter Ujfalusi Date: Fri Jun 10 11:35:44 2022 +0300 ASoC: SOF: make ctx_store and ctx_restore as optional Commit 657774acd00f ("ASoC: SOF: Make sof_suspend/resume IPC agnostic") did not marked ctx_store and ctx_restore as Optional. Fixes: 657774acd00f ("ASoC: SOF: Make sof_suspend/resume IPC agnostic") Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220610083549.16773-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/sof-priv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5702b838dd9a8be634f9c6bdfd769422c26e9162 Author: Peter Ujfalusi Date: Fri Jun 10 11:47:35 2022 +0300 ASoC: SOF: ipc3-topology: Move and correct size checks in sof_ipc3_control_load_bytes() Move the size checks prior to allocating memory as these checks do not need the data to be allocated and in case of an error we would not need to free the allocation. The max size must not be less than the size of struct sof_ipc_ctrl_data + struct sof_abi_hdr as the ABI header needs to be present under all circumstances. The check was incorrectly used or between the two size checks. Fixes: b5cee8feb1d4 ("ASoC: SOF: topology: Make control parsing IPC agnostic") Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220610084735.19397-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc3-topology.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 7811f2e7fd6a30d96eaa1fccf57b07694a8cad27 Author: Miquel Raynal Date: Thu Jun 9 16:14:55 2022 +0200 dmaengine: dw: dmamux: Fix build without CONFIG_OF When built without OF support, of_match_node() expands to NULL, which produces the following output: >> drivers/dma/dw/rzn1-dmamux.c:105:34: warning: unused variable 'rzn1_dmac_match' [-Wunused-const-variable] static const struct of_device_id rzn1_dmac_match[] = { One way to silence the warning is to enclose the structure definition with an #ifdef CONFIG_OF/#endif block. Fixes: 134d9c52fca2 ("dmaengine: dw: dmamux: Introduce RZN1 DMA router support") Reported-by: kernel test robot Signed-off-by: Miquel Raynal Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220609141455.300879-2-miquel.raynal@bootlin.com Signed-off-by: Vinod Koul drivers/dma/dw/rzn1-dmamux.c | 2 ++ 1 file changed, 2 insertions(+) commit 2717d33841957a0f5fb65fd8b37f9c2321593864 Author: Miquel Raynal Date: Thu Jun 9 16:14:54 2022 +0200 dmaengine: dw: dmamux: Export the module device table This is a tristate driver that can be built as a module, as a result, the OF match table should be exported with MODULE_DEVICE_TABLE(). Fixes: 134d9c52fca2 ("dmaengine: dw: dmamux: Introduce RZN1 DMA router support") Signed-off-by: Miquel Raynal Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220609141455.300879-1-miquel.raynal@bootlin.com Signed-off-by: Vinod Koul drivers/dma/dw/rzn1-dmamux.c | 1 + 1 file changed, 1 insertion(+) commit 65534736d9a5cab5340ae8819e1394b6325e8390 Author: Ilpo Järvinen Date: Mon Jun 6 18:36:52 2022 +0300 tty: Use flow-control char function on closing path Use n_tty_receive_char_flow_ctrl also on the closing path. This makes the code cleaner and consistent. However, there a small change of regression! The earlier closing path has a small difference compared with the normal receive path. If START_CHAR and STOP_CHAR are equal, their precedence is different depending on which path a character is processed. I don't know whether this difference was intentional or not, and if equal START_CHAR and STOP_CHAR is actually used anywhere. But it feels not so useful corner case. While this change would logically belong to those earlier changes, having a separate patch for this is useful. If this regresses, bisect can pinpoint this change rather than the large patch. Also, this change is not necessary to minimal fix for the issue addressed in the previous patch. Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606153652.63554-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_tty.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 6bb6fa6908ebd3cb4e14cd4f0ce272ec885d2eb0 Author: Ilpo Järvinen Date: Mon Jun 6 18:36:51 2022 +0300 tty: Implement lookahead to process XON/XOFF timely When tty is not read from, XON/XOFF may get stuck into an intermediate buffer. As those characters are there to do software flow-control, it is not very useful. In the case where neither end reads from ttys, the receiving ends might not be able receive the XOFF characters and just keep sending more data to the opposite direction. This problem is almost guaranteed to occur with DMA which sends data in large chunks. If TTY is slow to process characters, that is, eats less than given amount in receive_buf, invoke lookahead for the rest of the chars to process potential XON/XOFF characters. We need to keep track of how many characters have been processed by the lookahead to avoid processing the flow control char again on the normal path. Bookkeeping occurs parallel on two layers (tty_buffer and n_tty) to avoid passing the lookahead_count through the whole call chain. When a flow-control char is processed, two things must occur: a) it must not be treated as normal char b) if not yet processed, flow-control actions need to be taken The return value of n_tty_receive_char_flow_ctrl() tells caller a), and b) is kept internal to n_tty_receive_char_flow_ctrl(). If characters were previous looked ahead, __receive_buf() makes two calls to the appropriate n_tty_receive_buf_* function. First call is made with lookahead_done=true for the characters that were subject to lookahead earlier and then with lookahead=false for the new characters. Either of the calls might be skipped when it has no characters to handle. Reported-by: Gilles Buloz Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606153652.63554-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_tty.c | 91 ++++++++++++++++++++++++++++++++++++++-------- drivers/tty/tty_buffer.c | 59 +++++++++++++++++++++++++----- drivers/tty/tty_port.c | 21 +++++++++++ include/linux/tty_buffer.h | 1 + include/linux/tty_ldisc.h | 14 +++++++ include/linux/tty_port.h | 2 + 6 files changed, 163 insertions(+), 25 deletions(-) commit 84f2faa7852e1f55d89bb0c99b3a672b87b11f87 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:33 2022 +0300 serial: 8250: Remove serial_rs485 sanitization from em485 Serial core handles serial_rs485 sanitization. When em485 init fails, there are two possible paths of entry: 1) uart_rs485_config (init path) that fully clears port->rs485 on error. 2) ioctl path with a pre-existing, valid port->rs485 unto which the kernel falls back on error and port->rs485 should therefore be kept untouched. The temporary rs485 struct is not returned to userspace in case of error so its flag don't matter. ...Thus SER_RS485_ENABLED clearing on error can/should be dropped. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-37-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit bbdcbc1301ce16d5cbabfbccaacb87f047a0a309 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:32 2022 +0300 serial: sc16is7xx: Remove serial_rs485 assignment Serial core handles serial_rs485 assignment. It is safe to remove this assignment because sc16is7xx_reg_proc() takes port.lock at start (and sc16is7xx_reconf_rs485() would too). Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-36-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sc16is7xx.c | 1 - 1 file changed, 1 deletion(-) commit fd93a3d851c54198a517c6209947cc0569e1059d Author: Ilpo Järvinen Date: Mon Jun 6 13:04:31 2022 +0300 serial: mcf: Remove serial_rs485 assignment Serial core handles serial_rs485 assignment. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-35-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mcf.c | 1 - 1 file changed, 1 deletion(-) commit e25ed4a8857f8bf6d4f51bea0ff6c6a80adbb7fe Author: Ilpo Järvinen Date: Mon Jun 6 13:04:30 2022 +0300 serial: 8250_exar: Remove serial_rs485 assignment Serial core handles serial_rs485 assignment. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-34-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_exar.c | 2 -- 1 file changed, 2 deletions(-) commit ad98c78bd011ca76d1667aa3cb53562dfb29725a Author: Ilpo Järvinen Date: Mon Jun 6 13:04:29 2022 +0300 serial: max310x: Remove serial_rs485 sanitization Serial core handles serial_rs485 sanitization. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-33-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max310x.c | 2 -- 1 file changed, 2 deletions(-) commit 55e18c6b6d426818032d5e0f9d88d87fd2a8ae30 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:28 2022 +0300 serial: imx: Remove serial_rs485 sanitization The driver provides different rs485_supported for the case where RTS is not available making it unnecessary to handle it in imx_uart_rs485_config. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-32-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 4 ---- 1 file changed, 4 deletions(-) commit 7195eefb38d76d2353e658b10a8b1c2b1f8341e3 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:27 2022 +0300 serial: fsl_lpuart: Call core's sanitization and remove custom one Serial core handles serial_rs485 sanitization. Remove custom sanitization from lpuart_config_rs485. This change loses dev_err when SER_RS485_RX_DURING_TX is set due to incorrect configuration. Other drivers do not do similar prinout for full-duplex case and it should be done in serial core if it is desirable to notify on this condition. Personally, I doesn't see it important because the kernel gracefully downgrades to half-duplex. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-31-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 17 ----------------- 1 file changed, 17 deletions(-) commit b9759cba3221767ac1910b0cff65ec588003b9a6 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:26 2022 +0300 serial: pl011: Remove serial_rs485 sanitization Serial core handles serial_rs485 sanitization. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-30-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 5 ----- 1 file changed, 5 deletions(-) commit 61bca7da91c680ef140ecb35c27d887406bd4167 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:25 2022 +0300 serial: 8250_pci: Remove serial_rs485 sanitization Serial core handles serial_rs485 sanitization and copying rs485 struct. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-29-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pci.c | 14 -------------- 1 file changed, 14 deletions(-) commit ebc3c2a4cdba004de57f7d8316603ac61218d9d8 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:24 2022 +0300 serial: 8250: lpc18xx: Remove serial_rs485 sanitization Serial core handles serial_rs485 sanitization and copying rs485 struct. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-28-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_lpc18xx.c | 13 ------------- 1 file changed, 13 deletions(-) commit cf426544a4131c54c2e49b40547c43cfe2e56b76 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:23 2022 +0300 serial: 8250_fintek: Remove serial_rs485 sanitization Serial core handles serial_rs485 sanitization and copying rs485 struct. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-27-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_fintek.c | 14 -------------- 1 file changed, 14 deletions(-) commit 9cdaf4fc2e6f8eeb137dbf6c5d6346cbf249ff49 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:22 2022 +0300 serial: 8250_dwlib: Remove serial_rs485 sanitization Serial core handles serial_rs485 sanitization and rs485 struct assignment. As serial_rs485 is already clear for the non-RS485 case by serial core, there no need to clear flags in the driver. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-26-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dwlib.c | 10 ---------- 1 file changed, 10 deletions(-) commit 51ad36baacb3b2fd1bd980138a937d30d6c84cdf Author: Ilpo Järvinen Date: Mon Jun 6 13:04:21 2022 +0300 serial: return -EINVAL for non-legacy RS485 flags In order to be add new flags more cleanly and safely, return -EINVAL from TIOCSRS485 ioctl for the flags bits which are not among the current legacy ones. This might cause a regression for userspace as those non-flag bits do not currently trigger -EINVAL. However, it would only occur if the userspace is sending garbage bits so perhaps we'll get away with this change. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-25-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 596a9171472ba31edce566e938524dbbe3c54183 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:20 2022 +0300 serial: Clear rs485 struct when non-RS485 mode is set When SER_RS485_ENABLED is not set, having any other flag/field set in serial_rs485 struct does not have an effect different from not having them set. Thus, make the serial_rs485 struct also match the behavior for all flags, not just SER_RS485_ENABLED. Some drivers do similar clearing of rs485 struct in their rs485_config() already, but not all. This change makes the behavior consistent across drivers. Don't try to validate rs485 struct further when no RS485 is requested, this silences some bogus warnings. This change has (minor) userspace visible impact. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-24-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit be2e2cb1d28195792539ac2539f8c40c39d3dd4c Author: Ilpo Järvinen Date: Mon Jun 6 13:04:19 2022 +0300 serial: Sanitize rs485_struct Sanitize serial_rs485 struct before calling into rs485_setup. The drivers provide supported_rs485 to help sanitization of the fields. If neither of SER_RS485_RTS_ON_SEND or SER_RS485_RTS_AFTER_SEND supported, don't pretend they can be set to sane settings but clear them both instead. If only one of them is supported it may look tempting to use the one driver supports to set the other, however, the userspace does not have that information readily available so it wouldn't be helpful. While adjusting the documentation, remove also the claim that TIOCGRS485 would call driver specific code. In reality, it does nothing else than copies the stored serial_rs485 structure from uart_port to userspace. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-23-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/serial/serial-rs485.rst | 12 ++++++--- drivers/tty/serial/serial_core.c | 33 +++++++++++++++++++++--- 2 files changed, 37 insertions(+), 8 deletions(-) commit aeae8f222fdd34bdddc1050dc073e56b2242c9b5 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:18 2022 +0300 serial: stm32: Fill in rs485_supported Add information on supported serial_rs485 features. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-22-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 267913ecf73745ca3e8fc8282671b0b4f24df5fe Author: Ilpo Järvinen Date: Mon Jun 6 13:04:17 2022 +0300 serial: sc16is7xx: Fill in rs485_supported Add information on supported serial_rs485 features. This driver does not support delay_rts_after_send but the pre-existing behavior is to return -EINVAL if delay_rts_after_send is non-zero. In contrast, other drivers that do not support delay_rts_after_send either zero delay_rts_after_send or do not care (leave the inaccurate value). As changing this would cause userspace visible impact, the change is not attempted here. But perhaps it should be still tried (maybe nobody finds that kind of API oddity significant)? Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-21-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sc16is7xx.c | 7 +++++++ 1 file changed, 7 insertions(+) commit d45e50d087765606cdb0728798697467fd5bcc9e Author: Ilpo Järvinen Date: Mon Jun 6 13:04:16 2022 +0300 serial: omap: Fill in rs485_supported Add information on supported serial_rs485 features. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-20-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/omap-serial.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 949b4dbfb6b39ae0de5cfce0d74543b92c6df93d Author: Ilpo Järvinen Date: Mon Jun 6 13:04:15 2022 +0300 serial: mcf: Fill in rs485_supported Add information on supported serial_rs485 features. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-19-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mcf.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2b947cf9e335bb1152a3395e461b9c8e94738730 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:14 2022 +0300 serial: max310x: Fill in rs485_supported Add information on supported serial_rs485 features. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-18-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max310x.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 00d7a00e2a6ff60140068cadb6739ee0a13f5297 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:13 2022 +0300 serial: imx: Fill in rs485_supported Add information on supported serial_rs485 features. In the case where RTS is lacking, RS485 cannot be enabled so provide zero rs485_supported for that case. Perhaps it would make sense to not provide rs485_config() at all in that case but such a change would have userspace visible impact/change in behavior so this patch does not attempt it. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-17-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 07481f448b635d7cebb92d5940f5bea5c4395a26 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:12 2022 +0300 serial: fsl_lpuart: Fill in rs485_supported Add information on supported serial_rs485 features. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-16-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 6 ++++++ 1 file changed, 6 insertions(+) commit af47c491e3c78e051a5e4d1832dbb29a8ab97799 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:11 2022 +0300 serial: atmel: Fill in rs485_supported Add information on supported serial_rs485 features. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-15-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e849145e1fdd2d6d7bde26a5b3dbfd11567ce071 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:10 2022 +0300 serial: ar933x: Fill in rs485_supported Add information on supported serial_rs485 features. In the case where RTS is lacking, RS485 cannot be enabled so provide zero rs485_supported for that case. Perhaps it would make sense to not provide rs485_config() at all in that case but such a change would have userspace visible impact/change in behavior so this patch does not attempt it. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-14-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/ar933x_uart.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ebe2cf736a0426b228b73f858cdd782c77c109c3 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:09 2022 +0300 serial: pl011: Fill in rs485_supported Add information on supported serial_rs485 features. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-13-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 456d523b1be3a0a0c3498fce55b32fc205fac7e1 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:08 2022 +0300 serial: 8250_pci: Fill in rs485_supported for pci_fintek Add information on supported serial_rs485 features. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-12-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pci.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6d345f7cf83ce035d6b25724e4c72156098186b3 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:07 2022 +0300 serial: 8250_of: Use serial8250_em485_supported 8250_of uses em485, fill in rs485_supported accordingly. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-11-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_of.c | 1 + 1 file changed, 1 insertion(+) commit 4f4c90bb2a5178124391d617c32c4261c53277e7 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:06 2022 +0300 serial: 8250_lpc18cc: Fill in rs485_supported Add information on supported serial_rs485 features. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-10-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_lpc18xx.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 70780464846f763c00aa4fa3fda67525d3bb7fe8 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:05 2022 +0300 serial: 8250_fintek: Fill in rs485_supported Add information on supported serial_rs485 features. Differentiate based on which port is in question. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-9-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_fintek.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 59c221f8e1269278161313048c71929c9950b2c4 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:04 2022 +0300 serial: 8250_exar: Fill in rs485_supported Add information on supported serial_rs485 features. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-8-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_exar.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 62a4b3d274192c845cde4e885bfa7c2bedf18330 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:03 2022 +0300 serial: 8250_dwlib: Fill in rs485_supported Add information on supported serial_rs485 features. When the driver is using em485, take advantage of serial8250_em485_supported. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-7-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dwlib.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 499b1160bc026eb7774bcf5b82b9e0ec2f6ae0be Author: Ilpo Järvinen Date: Mon Jun 6 13:04:02 2022 +0300 serial: 8250_bcm2835aux: Use serial8250_em485_supported bcm2835aux uses em485, fill in rs485_supported accordingly. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-6-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_bcm2835aux.c | 1 + 1 file changed, 1 insertion(+) commit 43ee34131cedca95c413b5e6203f4545309d2450 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:01 2022 +0300 serial: 8250: Create serial8250_em485_supported for em485 users Create serial8250_em485_supported for the serial_rs485 features supported by the em485 framework. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-5-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250.h | 1 + drivers/tty/serial/8250/8250_port.c | 8 ++++++++ 2 files changed, 9 insertions(+) commit 8925c31c1ac2f1e05da988581f2a70a2a8c4d638 Author: Ilpo Järvinen Date: Mon Jun 6 13:04:00 2022 +0300 serial: Add rs485_supported to uart_port Preparing to move serial_rs485 struct sanitization into serial core, each driver has to provide what fields/flags it supports. This information is pointed into by rs485_supported. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-4-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_core.c | 1 + include/linux/serial_core.h | 1 + 2 files changed, 2 insertions(+) commit 2dbd0c14ebe8836eaf890c7f50f3fc5d26d67d95 Author: Ilpo Järvinen Date: Mon Jun 6 13:03:59 2022 +0300 serial: Move serial_rs485 sanitization into separate function Add uart_sanitize_serial_rs485() function for sanitizing serial_rs485 structure fields. No functional changes. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 55 ++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 25 deletions(-) commit 8322b1f527159de578aab277629296575a11eb3c Author: Ilpo Järvinen Date: Mon Jun 6 13:03:58 2022 +0300 serial: Add uart_rs485_config() A few serial drivers make a call to rs485_config() themselves (all these seem to relate to init). Convert them all to use a common helper which makes it easy to make adjustments on tasks related to it as serial_rs485 struct sanitization is going to be added. In pci_fintek_setup() (in 8250_pci.c), the rs485_config() call was made with NULL, however, it can be changed to pass uart_port's rs485 struct. No other callers should pass NULL into rs485_config() so the NULL check can now be eliminated. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220606100433.13793-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pci.c | 6 ++---- drivers/tty/serial/8250/8250_port.c | 2 +- drivers/tty/serial/fsl_lpuart.c | 2 +- drivers/tty/serial/imx.c | 2 +- drivers/tty/serial/serial_core.c | 6 ++++++ include/linux/serial_core.h | 1 + 6 files changed, 12 insertions(+), 7 deletions(-) commit 11a72ae911d3d4eccfba8dbf21daca4ce5f1b6af Author: Vinod Koul Date: Fri Jun 10 10:01:17 2022 +0530 dmaengine: apple-admac: Fix print format We get a warning (treated as error now) drivers/dma/apple-admac.c: In function 'admac_cyclic_write_one_desc': drivers/dma/apple-admac.c:209:26: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'long unsigned int' [-Werror=format=] 209 | dev_dbg(ad->dev, "ch%d descriptor: addr=0x%pad len=0x%zx flags=0x%x\n", Use %lx for priniting the flag Fixes: b127315d9a78 ("dmaengine: apple-admac: Add Apple ADMAC driver") Reported-by: Stephen Rothwell Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20220610043117.39337-1-vkoul@kernel.org Reported-by: kernel test robot Signed-off-by: Vinod Koul drivers/dma/apple-admac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af14f3007e2dca0d112f10f6717ba43093f74e81 Author: Ilpo Järvinen Date: Wed Jun 8 12:54:31 2022 +0300 serial: 8250_dw: Store LSR into lsr_saved_flags in dw8250_tx_wait_empty() Make sure LSR flags are preserved in dw8250_tx_wait_empty(). This function is called from a low-level out function and therefore cannot call serial_lsr_in() as it would lead to infinite recursion. It is borderline if the flags need to be saved here at all since this code relates to writing LCR register which usually implies no important characters should be arriving. Fixes: 914eaf935ec7 ("serial: 8250_dw: Allow TX FIFO to drain before writing to UART_LCR") Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220608095431.18376-7-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 3 +++ 1 file changed, 3 insertions(+) commit 197eb5c416ff0e52d152e6ff59b4e759d2f3e10d Author: Ilpo Järvinen Date: Wed Jun 8 12:54:30 2022 +0300 serial: 8250_dw: Use serial_lsr_in() in dw8250_handle_irq() dw8250_handle_irq() reads LSR under a few conditions, convert both to use serial_lsr_in() in order to preserve LSR flags properly across reads. Fixes: 424d79183af0 ("serial: 8250_dw: Avoid "too much work" from bogus rx timeout interrupt") Fixes: aa63d786cea2 ("serial: 8250: dw: Add support for DMA flow controlling devices") Cc: Douglas Anderson Cc: Phil Edworthy Cc: Miquel Raynal Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220608095431.18376-6-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7a3525e48cf7c1d85c38cedb452912cb99b60c43 Author: Ilpo Järvinen Date: Wed Jun 8 12:54:29 2022 +0300 serial: 8250: Adjust misleading LSR related comment serial8250_rx_chars() has max_count based character limit. If it triggers, the function returns the old LSR value (and it has never returned only flags which were not handled). Adjust the comment to match behavior and warn about which flags can be depended on. I'd have moved LSR read before LSR read and used serial_lsr_in() also here but I came across an old discussion about the topic. That discussion generated commit d22f8f10683c ("serial: 8250: Fix lost rx state") so I left the code as it is (it works as long as the callers only use a subset of the LSR flags which holds true today) and changed the comment instead. Link: https://www.spinics.net/lists/linux-serial/msg16220.html Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220608095431.18376-5-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 6a4241e8f9b17aa17f55842d6478f280c22d2b44 Author: Ilpo Järvinen Date: Wed Jun 8 12:54:28 2022 +0300 serial: 8250: Get preserved flags using serial_lsr_in() serial8250_handle_irq() assumes it's the first to read LSR register. However, there are 8250 drivers which perform LSR read in their own irq handler prior to calling serial8250_handle_irq(). As not all flags are preserved across LSR reads, use serial_lsr_in() helper to get all the preserved flags. This commit might fix other commits too besides the ones for DW UART mentioned below. It's just not clear to me which of the other devices clear some of the LSR flags on read. AFAIK, nobody has complained about this problem (either against DW or other devices) so it might not have that bad impact in the end. Fixes: 424d79183af0 ("serial: 8250_dw: Avoid "too much work" from bogus rx timeout interrupt") Fixes: aa63d786cea2 ("serial: 8250: dw: Add support for DMA flow controlling devices") Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220608095431.18376-4-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdb70c424df1543bc02ee2639aecebd20318c599 Author: Ilpo Järvinen Date: Wed Jun 8 12:54:27 2022 +0300 serial: 8250: Create serial_lsr_in() LSR register readers need to be careful in order to not lose bits that are not preserved across reads. Create a helper that takes care of storing the non-preserved bits into lsr_save_flags. Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220608095431.18376-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250.h | 20 ++++++++++++++++++++ drivers/tty/serial/8250/8250_core.c | 3 +-- drivers/tty/serial/8250/8250_port.c | 15 ++++----------- 3 files changed, 25 insertions(+), 13 deletions(-) commit ce338e4477cfdff0abeb27eff2d43fc379ee9ebb Author: Ilpo Järvinen Date: Wed Jun 8 12:54:26 2022 +0300 serial: 8250: Store to lsr_save_flags after lsr read Not all LSR register flags are preserved across reads. Therefore, LSR readers must store the non-preserved bits into lsr_save_flags. This fix was initially mixed into feature commit f6f586102add ("serial: 8250: Handle UART without interrupt on TEMT using em485"). However, that feature change had a flaw and it was reverted to make room for simpler approach providing the same feature. The embedded fix got reverted with the feature change. Re-add the lsr_save_flags fix and properly mark it's a fix. Link: https://lore.kernel.org/all/1d6c31d-d194-9e6a-ddf9-5f29af829f3@linux.intel.com/T/#m1737eef986bd20cf19593e344cebd7b0244945fc Fixes: e490c9144cfa ("tty: Add software emulated RS485 support for 8250") Co-developed-by: Uwe Kleine-König Reviewed-by: Andy Shevchenko Signed-off-by: Uwe Kleine-König Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220608095431.18376-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 2 ++ 1 file changed, 2 insertions(+) commit 90574a5b5a048af7c8c1de8977da498f1e2bdce9 Author: Ilpo Järvinen Date: Tue Jun 7 11:41:54 2022 +0300 serial: 8250: handle __start_tx() call in start_tx() As either start_tx_rs485() or start_tx() calls __start_tx() as the last line of their logic, it makes sense to just move that call into start_tx(). When start_tx_rs485() wants to defer tx using timer, return false so start_tx() can return based on it. Reorganize em485 code in serial8250_start_tx() so that the return can be shared for the cases where tx start is deferred. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220607084154.8172-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 767cc6681b1b17f4cbba0b8b37bf6dbb1322c9ac Author: Ilpo Järvinen Date: Tue Jun 7 11:41:53 2022 +0300 serial: 8250: kill __do_stop_tx() There seems to be little reason for __do_stop_tx() to exits on its own. It is rather simple and is only called from __stop_tx(). Thus, move its logic into __stop_tx(). Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220607084154.8172-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit ebaed53c00174abf2224c1ebbe0f315189dfd046 Author: Xuezhi Zhang Date: Tue May 31 07:28:14 2022 +0000 tty: vt: convert sysfs snprintf to sysfs_emit Fix the following coccicheck warnings: drivers/tty/vt/vt.c:3942:8-16: WARNING: use scnprintf or sprintf drivers/tty/vt/vt.c:3950:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Xuezhi Zhang Link: https://lore.kernel.org/r/20220531072814.34999-1-zhangxuezhi1@coolpad.com Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2e1f2d9a9bdbe12ee475c82a45ac46a278e8049a Author: Cosmin Tanislav Date: Sun Jun 5 17:46:59 2022 +0300 serial: max310x: implement I2C support I2C implementation on this chip has a few key differences compared to SPI, as described in previous patches. * extended register space access needs no extra logic * slave address is used to select which UART to communicate with To accommodate these differences, add an I2C interface config, set the RevID register address and implement an empty method for setting the GlobalCommand register, since no special handling is needed for the extended register space. To handle the port-specific slave address, create an I2C dummy device for each port, except the base one (UART0), which is expected to be the one specified in firmware, and create a regmap for each I2C device. Add minimum and maximum slave addresses to each devtype for sanity checking. Also, use a separate regmap config with no write_flag_mask, since I2C has a R/W bit in its slave address, and set the max register to the address of the RevID register, since the extended register space needs no extra logic. Finally, add the I2C driver. Reviewed-by: Andy Shevchenko Signed-off-by: Cosmin Tanislav Link: https://lore.kernel.org/r/20220605144659.4169853-5-demonsingur@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/Kconfig | 1 + drivers/tty/serial/max310x.c | 135 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 135 insertions(+), 1 deletion(-) commit b3883ab5e95713e479f774ea68be275413e8e5b2 Author: Cosmin Tanislav Date: Sun Jun 5 17:46:58 2022 +0300 serial: max310x: make accessing revision id interface-agnostic SPI can only use 5 address bits, since one bit is reserved for specifying R/W and 2 bits are used to specify the UART port. To access registers that have addresses past 0x1F, an extended register space can be enabled by writing to the GlobalCommand register (address 0x1F). I2C uses 8 address bits. The R/W bit is placed in the slave address, and so is the UART port. Because of this, registers that have addresses higher than 0x1F can be accessed normally. To access the RevID register, on SPI, 0xCE must be written to the 0x1F address to enable the extended register space, after which the RevID register is accessible at address 0x5. 0xCD must be written to the 0x1F address to disable the extended register space. On I2C, the RevID register is accessible at address 0x25. Create an interface config struct, and add a method for toggling the extended register space and a member for the RevId register address. Implement these for SPI. Reviewed-by: Andy Shevchenko Signed-off-by: Cosmin Tanislav Link: https://lore.kernel.org/r/20220605144659.4169853-4-demonsingur@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max310x.c | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) commit 6ef281daf020592c219fa91780abc381c6c20db5 Author: Cosmin Tanislav Date: Sun Jun 5 17:46:57 2022 +0300 serial: max310x: use a separate regmap for each port The driver currently does manual register manipulation in multiple places to talk to a specific UART port. In order to talk to a specific UART port over SPI, the bits U1 and U0 of the register address can be set, as explained in the Command byte configuration section of the datasheet. Make this more elegant by creating regmaps for each UART port and setting the read_flag_mask and write_flag_mask accordingly. All communcations regarding global registers are done on UART port 0, so replace the global regmap entirely with the port 0 regmap. Also, remove the 0x1f masks from reg_writeable(), reg_volatile() and reg_precious() methods, since setting the U1 and U0 bits of the register address happens inside the regmap core now. Reviewed-by: Andy Shevchenko Signed-off-by: Cosmin Tanislav Link: https://lore.kernel.org/r/20220605144659.4169853-3-demonsingur@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max310x.c | 68 +++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 32 deletions(-) commit 285e76fc049c4d32c772eea9460a7ef28a193802 Author: Cosmin Tanislav Date: Sun Jun 5 17:46:56 2022 +0300 serial: max310x: use regmap methods for SPI batch operations The SPI batch read/write operations can be implemented as simple regmap raw read and write, which will also try to do a gather write just as it is done here. Use the regmap raw read and write methods. Reviewed-by: Andy Shevchenko Signed-off-by: Cosmin Tanislav Link: https://lore.kernel.org/r/20220605144659.4169853-2-demonsingur@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max310x.c | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) commit 484923ad3ad1604efa666502ac507b1e3ee30e3b Author: Jiri Slaby Date: Tue Jun 7 12:49:46 2022 +0200 tty/vt: consolemap: walk the buffer only once in con_set_trans_old() Fetch the user data one by one (by get_user()) and fill in the local buffer simultaneously. I.e. we no longer require to walk two buffers and save thus 256 B from stack (whole ubuf). Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-36-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit fc440658346e1bff9b6661467f55856d1df1cdb2 Author: Jiri Slaby Date: Tue Jun 7 12:49:45 2022 +0200 tty/vt: consolemap: use con_allocate_new() in con_unshare_unimap() The old->refcount is guaranteed to be > 1, so we can directly call con_allocate_new() to make the code more obvious. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-35-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 63c4f92fcca3f077de1d9d1a99a690f5ea381e58 Author: Jiri Slaby Date: Tue Jun 7 12:49:44 2022 +0200 tty/vt: consolemap: extract con_allocate_new() from con_do_clear_unimap() The first part of con_do_clear_unimap() is needed on another place, so extract it to a separate function called con_allocate_new(). It will be used once more in the next patch. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-34-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) commit a7e50de460d7d9230dc065c9d2f1a1b1669c675c Author: Jiri Slaby Date: Tue Jun 7 12:49:43 2022 +0200 tty/vt: consolemap: change refcount only if needed in con_do_clear_unimap() con_do_clear_unimap() currently decreases and increases refcount of old dictionary in a back and forth fashion. This makes the code really hard to follow. Decrease the refcount only if everything went well and we really allocated a new one and decoupled from the old dictionary. I sincerelly hope I did not make a mistake in this (ill) logic. Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-33-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit d8d0d1758c7d5ef37066f1122eb236d47b2948a9 Author: Jiri Slaby Date: Tue Jun 7 12:49:42 2022 +0200 tty/vt: consolemap: remove superfluous whitespace There are still some remaining tabs/spaces at EOLs or spaces before tabs. Remove them all now. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-32-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 9ec9b79a2b9b44c33510156906a6e7c0cef7047e Author: Jiri Slaby Date: Tue Jun 7 12:49:41 2022 +0200 tty/vt: consolemap: make conv_uni_to_pc() more readable 1) Fetch *conp->vc_uni_pagedir_loc first and do the NULL check on the local variable. 2) Decouple the large "if" into few smaller "if"s. 3) Remove a \n from the definition line. This makes the code more readable. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-31-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 1a086f5d63ae3f9bfa85a6ddfc3c377315a56187 Author: Jiri Slaby Date: Tue Jun 7 12:49:40 2022 +0200 tty/vt: consolemap: saner variable names in con_set_default_unimap() The function uses too vague variable names like i, j, k for iterators, p, q, p1, p2 for pointers etc. Rename all these, so that it is clear what is going on: - dict: for dictionaries. - d, r, g: for dir, row, glyph iterators -- these are unsigned now. - dir, row: for directory and row pointers. - glyph: for the glyph. - and so on... This is a lot of shuffling, but the result pays off, IMO. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-30-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) commit ff4606acb4dcf05c49a6053c26f1bacb5753d200 Author: Jiri Slaby Date: Tue Jun 7 12:49:39 2022 +0200 tty/vt: consolemap: saner variable names in con_set_unimap() The function uses too vague variable names like i, j, k for iterators, p, q, p1, p2 for pointers etc. Rename all these, so that it is clear what is going on: - dict: for dictionaries. - d, r, g: for dir, row, glyph iterators -- these are unsigned now. - dir, row: for directory and row pointers. - glyph: for the glyph. - and so on... This is a lot of shuffling, but the result pays off, IMO. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-29-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 5a79458c5613d965786eadc277c4b6473cecbb52 Author: Jiri Slaby Date: Tue Jun 7 12:49:38 2022 +0200 tty/vt: consolemap: saner variable names in con_get_unimap() The function uses too vague variable names like i, j, k for iterators, p, q, p1, p2 for pointers etc. Rename all these, so that it is clear what is going on: - dict: for dictionaries. - d, r, g: for dir, row, glyph iterators -- these are unsigned now. - dir, row: for directory and row pointers. - glyph: for the glyph. - and so on... Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-28-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 3315f1aa85212960d1d0978f068f605e8ce000ea Author: Jiri Slaby Date: Tue Jun 7 12:49:37 2022 +0200 tty/vt: consolemap: saner variable names in con_copy_unimap() The function uses too vague variable names like i, j, k for iterators, p, q, p1, p2 for pointers etc. Rename all these, so that it is clear what is going on: - dict: for dictionaries. - d, r, g: for dir, row, glyph iterators -- these are unsigned now. - dir, row: for directory and row pointers. - glyph: for the glyph. - and so on... This is a lot of shuffling, but the result pays off, IMO. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-27-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 447e9a7c668113e85e2b6a7a330a3b517cae6c93 Author: Jiri Slaby Date: Tue Jun 7 12:49:36 2022 +0200 tty/vt: consolemap: saner variable names in con_release_unimap() The function uses too vague variable names like i, j, k for iterators, p, q, p1, p2 for pointers etc. Rename all these, so that it is clear what is going on: - dict: for dictionaries. - d, r, g: for dir, row, glyph iterators -- these are unsigned now. - dir, row: for directory and row pointers. - glyph: for the glyph. - and so on... This is a lot of shuffling, but the result pays off, IMO. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-26-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit cded789c6889272412702a72cb84170ee746ce79 Author: Jiri Slaby Date: Tue Jun 7 12:49:35 2022 +0200 tty/vt: consolemap: saner variable names in con_unshare_unimap() The function uses too vague variable names like i, j, k for iterators, p, q, p1, p2 for pointers etc. Rename all these, so that it is clear what is going on: - dict: for dictionaries. - d, r, g: for dir, row, glyph iterators -- these are unsigned now. - dir, row: for directory and row pointers. - glyph: for the glyph. - and so on... This is a lot of shuffling, but the result pays off, IMO. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-25-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 51 ++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 26 deletions(-) commit 01ddc0dabd1bd3bb8a1c0ad87887882653034c01 Author: Jiri Slaby Date: Tue Jun 7 12:49:34 2022 +0200 tty/vt: consolemap: saner variable names in con_do_clear_unimap() The function uses too vague variable names like i, j, k for iterators, p, q, p1, p2 for pointers etc. Rename all these, so that it is clear what is going on: - dict: for dictionaries. - d, r, g: for dir, row, glyph iterators -- these are unsigned now. - dir, row: for directory and row pointers. - glyph: for the glyph. - and so on... This is a lot of shuffling, but the result pays off, IMO. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-24-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit c3fd9f7121f0a9619f8a8ef53c9f543bcc522dfe Author: Jiri Slaby Date: Tue Jun 7 12:49:33 2022 +0200 tty/vt: consolemap: saner variable names in con_unify_unimap() The function uses too vague variable names like i, j, k for iterators, p, q, p1, p2 for pointers etc. Rename all these, so that it is clear what is going on: - dict: for dictionaries. - d, r, g: for dir, row, glyph iterators -- these are unsigned now. - dir, row: for directory and row pointers. - glyph: for the glyph. - and so on... This is a lot of shuffling, but the result pays off, IMO. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-23-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 49 ++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 25 deletions(-) commit d4a2245b8bccca61744a96a3bdc33a0b0534fa6e Author: Jiri Slaby Date: Tue Jun 7 12:49:32 2022 +0200 tty/vt: consolemap: saner variable names in con_insert_unipair() The function uses too vague variable names like i, j, k for iterators, p, q, p1, p2 for pointers etc. Rename all these, so that it is clear what is going on: - dict: for dictionaries. - d, r, g: for dir, row, glyph iterators -- these are unsigned now. - dir, row: for directory and row pointers. - glyph: for the glyph. - and so on... This is a lot of shuffling, but the result pays off, IMO. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-22-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 61fe4a6bb16fd411ba9c779413006a503649f862 Author: Jiri Slaby Date: Tue Jun 7 12:49:31 2022 +0200 tty/vt: consolemap: saner variable names in conv_uni_to_pc() The function uses too vague variable names like i, j, k for iterators, p, q, p1, p2 for pointers etc. Rename all these, so that it is clear what is going on: - dict: for dictionaries. - d, r, g: for dir, row, glyph iterators -- these are unsigned now. - dir, row: for directory and row pointers. - glyph: for the glyph. - and so on... Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-21-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 50c92a1b2d50611d49a8027027536c7a5003d049 Author: Jiri Slaby Date: Tue Jun 7 12:49:30 2022 +0200 tty/vt: consolemap: saner variable names in set_inverse_trans_unicode() The function uses too vague variable names like i, j, k for iterators, p, q, p1, p2 for pointers etc. Rename all these, so that it is clear what is going on: - dict: for dictionaries. - d, r, g: for dir, row, glyph iterators -- these are unsigned now. - dir, row: for directory and row pointers. - glyph: for the glyph. - and so on... This is a lot of shuffling, but the result pays off, IMO. Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-20-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit dca141917301cc476cdc34d980470a4cd7dd9d75 Author: Jiri Slaby Date: Tue Jun 7 12:49:29 2022 +0200 tty/vt: consolemap: extract dict unsharing to con_unshare_unimap() The code in con_set_unimap() is too nested. Extract its obvious part into a separate function and name it after what the code does: con_unshare_unimap(). Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-19-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 133 ++++++++++++++++++++++---------------------- 1 file changed, 68 insertions(+), 65 deletions(-) commit f052f62c23b330717773b61bea19003e2e6a9ba2 Author: Jiri Slaby Date: Tue Jun 7 12:49:28 2022 +0200 tty/vt: consolemap: remove glyph < 0 check from set_inverse_trans_unicode() glyph is now an int casted from u16. It can never be negative. So remove the check and type glyph as u16 properly in set_inverse_trans_unicode(). Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-18-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 5a904a936b407624cd1ff5ee3f1675ca3d2366a5 Author: Jiri Slaby Date: Tue Jun 7 12:49:27 2022 +0200 tty/vt: consolemap: introduce enum translation_map and use it Again, instead of magic constants in the code, declare an enum and be a little bit more explicit. Both in the translations definition and in the loops etc. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-17-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 39 ++++++++++++++++++++------------------- include/linux/consolemap.h | 18 ++++++++++++------ 2 files changed, 32 insertions(+), 25 deletions(-) commit 949fafcd7fa310e68bfd8828304150cdc9de5629 Author: Jiri Slaby Date: Tue Jun 7 12:49:26 2022 +0200 tty/vt: consolemap: check put_user() in con_get_unimap() Only the return value of copy_to_user() is checked in con_get_unimap(). Do the same for put_user() of the count too. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-16-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cb47d81f0f0fa293e18fe8828715a6509f480b3f Author: Jiri Slaby Date: Tue Jun 7 12:49:25 2022 +0200 tty/vt: consolemap: make p1 increment less confusing in con_get_unimap() p2 is already incremented like this few lines below, so do the same for p1. This makes the code easier to follow. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-15-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6364d391363a0ac498a852ff4bec32d82e913ee8 Author: Jiri Slaby Date: Tue Jun 7 12:49:24 2022 +0200 tty/vt: consolemap: make con_get_unimap() more readable The indentation is completely broken in con_get_unimap(). Reorder the code using "if (!cond) continue;"s so that the code makes sense. Switch also the "p" assignment and add a short path using goto. This makes the code readable again. Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-14-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) commit 6e4e8d74664a2bf46c74dfcf0d8a600acbbc4d6d Author: Jiri Slaby Date: Tue Jun 7 12:49:23 2022 +0200 tty/vt: consolemap: make con_set_unimap() more readable The indentation was completely broken in con_set_unimap(). Reorder the code using 'if (!cond) continue;'s so that the code makes sense. Not that it is perfect now, but it can be followed at least. More cleanup to come. And remove all those useless whitespaces at the EOLs too. Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-13-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) commit acf90b4d52e6965cbc3b115a68e0f063f703719c Author: Jiri Slaby Date: Tue Jun 7 12:49:22 2022 +0200 tty/vt: consolemap: use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type). First, the type of the variable can change and one needs not change the former (unlike the latter). Second, the latter is error-prone due to (u16), (u16 *), and (u16 **) mixture here. Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-12-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 32bd78fc4948471be2853ba8b5229e4e1327e13e Author: Jiri Slaby Date: Tue Jun 7 12:49:21 2022 +0200 tty/vt: consolemap: zero uni_pgdir using kcalloc() The newly allocated p->uni_pgdir[n] is initialized to NULLs right after a kmalloc_array() allocation. Combine these two using kcalloc(). Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-11-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 9254365443f72838a276bb2d9a9935c802e3adc8 Author: Jiri Slaby Date: Tue Jun 7 12:49:20 2022 +0200 tty/vt: consolemap: introduce UNI_*() macros The code currently does shift, OR, and AND logic directly in the code. It is not much obvious what happens there. Therefore define four macros for that purpose and use them in the code. We use GENMASK() so that it is clear which bits serve what purpose: - UNI_GLYPH: bits 0.. 5 - UNI_ROW: bits 6..10 - UNI_DIR: bits 11..31 Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-10-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit ad8a2142ba57212b73e614d5d86160a9c0ff8617 Author: Jiri Slaby Date: Tue Jun 7 12:49:19 2022 +0200 tty/vt: consolemap: use | for binary addition Unicode letters are composed as a bit shifts and sums of three values. Use "|" and not "+" for these bit operations. The former is indeed more appropriate. Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-9-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e16cb6fe315821ef3148fa83892adca1f2a2e35a Author: Jiri Slaby Date: Tue Jun 7 12:49:18 2022 +0200 tty/vt: consolemap: one line = one statement Some lines combine more statements on one line. This makes the code hard to follow. Do it properly in the "one line = one statement" fashion. Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-8-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit d9ebb906a45adc71a62aceb1e3608c847cafa660 Author: Jiri Slaby Date: Tue Jun 7 12:49:17 2022 +0200 tty/vt: consolemap: make parameters of inverse_translate() saner - int use_unicode -> bool: it's used as bool at some places already, so make it explicit. - int glyph -> u16: every caller passes a u16 in. So make it explicit too. And remove a negative check from inverse_translate() as it never could be negative. Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-7-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/accessibility/braille/braille_console.c | 2 +- drivers/accessibility/speakup/main.c | 2 +- drivers/tty/vt/consolemap.c | 4 ++-- drivers/tty/vt/selection.c | 3 ++- drivers/tty/vt/vt.c | 2 +- include/linux/consolemap.h | 6 +++--- 6 files changed, 10 insertions(+), 9 deletions(-) commit f827c754f9b6247f4d4f9cbb508b22bff2cf8e6d Author: Jiri Slaby Date: Tue Jun 7 12:49:16 2022 +0200 tty/vt: consolemap: convert macros to static inlines This commit changes !CONFIG_CONSOLE_TRANSLATIONS definitions to real (inline) functions. So the commit: * makes type checking much stronger, * removes the need of many parentheses and casts, and * makes the code more readable. Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-6-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman include/linux/consolemap.h | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) commit 0b75f7968d61566d150747512344cabaa59e54c6 Author: Jiri Slaby Date: Tue Jun 7 12:49:15 2022 +0200 tty/vt: consolemap: remove extern from function decls The extern keyword is not needed for function declarations. Remove it, so that the consolemap header conforms to other tty headers. Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-5-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman include/linux/consolemap.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 2097dc2273a5b5254d0fad79afdedd223035b2d5 Author: Jiri Slaby Date: Tue Jun 7 12:49:14 2022 +0200 tty/vt: consolemap: decrypt inverse_translate() Fix invalid indentation and demystify the code by removing superfluous "else"s. The "else"s are unneeded as they always follow an "if"-true branch containing a "return". The code is now way more readable. Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-4-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit db8f597a47127d0554f9c059a6da35f3ff34e773 Author: Jiri Slaby Date: Tue Jun 7 12:49:13 2022 +0200 tty/vt: consolemap: define UNI_* macros for constants The code uses constants for sizes of dictionary substructures on many places. Define 3 macros and use them in the code, so that loop bounds, local variables and the dictionary always match. (And the loop bounds are obvious now too.) Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-3-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 54 +++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 24 deletions(-) commit 4173f018aae16b6496d292c234b858241f85254f Author: Jiri Slaby Date: Tue Jun 7 12:49:12 2022 +0200 tty/vt: consolemap: rename and document struct uni_pagedir struct uni_pagedir contains 32 unicode page directories, so the name of the structure is a bit misleading. Rename the structure to uni_pagedict, so it looks like this: struct uni_pagedict -> 32 page dirs -> 32 rows -> 64 glyphs Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 47 +++++++++++++++++++++++++----------------- drivers/video/console/vgacon.c | 4 ++-- include/linux/console_struct.h | 6 +++--- 3 files changed, 33 insertions(+), 24 deletions(-) commit 17945d317a523212831049147d7d9dd0fff9969f Author: Jiri Slaby Date: Tue Jun 7 12:49:11 2022 +0200 tty/vt: consolemap: use ARRAY_SIZE() The code uses constants as bounds in loops. Use ARRAY_SIZE() with appropriate parameters instead. This makes the loop bounds obvious. Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220607104946.18710-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5c4d7b049dce57816171ba4374cecfddd6e6faed Author: Jiri Slaby Date: Thu Jun 2 10:31:28 2022 +0200 tty/vt: Makefile, add --unicode for loadkeys invocation For a long time, we generate unicode tables using loadkeys. So fix Makefile to use that flag too. Reviewed-by: Andy Shevchenko Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220602083128.22540-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d49ee83a450224fcd28e1dcc210f9bbef86f338 Author: Jiri Slaby Date: Thu Jun 2 10:31:27 2022 +0200 tty/vt: defkeymap.c_shipped, little unification with loadkeys loadkeys 2.4.0 currently: * notes the use of --unicode to the output, and * uses "unsigned short" for key_maps instead of "ushort". So make our shipped file consistent with the generated output in this regard. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220602083128.22540-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/defkeymap.c_shipped | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7fd6c24bae8fff0c12c61bc69388d9f3c045ce21 Author: Jiri Slaby Date: Thu Jun 2 10:31:20 2022 +0200 serial: pmac_zilog: remove unused header After commit a5ddc498e792 (serial: pmac_zilog: remove unfinished DBDMA support), the header is unused and can be removed. So do so. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Suggested-by: "Ilpo Järvinen" Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220602083120.22519-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/pmac_zilog.c | 1 - 1 file changed, 1 deletion(-) commit 22b10b33b9c6e76bc08f64e52862e68c4dc76052 Author: AngeloGioacchino Del Regno Date: Tue May 24 13:50:19 2022 +0200 dt-bindings: serial: mtk-uart: Convert txt to json-schema Convert the mtk-uart documentation from freeform text to a json-schema. Reviewed-by: Krzysztof Kozlowski Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220524115019.97246-1-angelogioacchino.delregno@collabora.com Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/serial/mediatek,uart.yaml | 120 +++++++++++++++++++++ .../devicetree/bindings/serial/mtk-uart.txt | 59 ---------- 2 files changed, 120 insertions(+), 59 deletions(-) commit 6f3cdf2bf1ba9b70de6c2921a415951a0d59873b Author: Yang Yingliang Date: Wed May 25 10:12:04 2022 +0800 serial: pic32: fix missing clk_disable_unprepare() on error in pic32_uart_startup() Fix the missing clk_disable_unprepare() before return from pic32_uart_startup() in the error handling case. Fixes: 157b9394709e ("serial: pic32_uart: Add PIC32 UART driver") Reported-by: Hulk Robot Reviewed-by: Jiri Slaby Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220525021204.2407631-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/pic32_uart.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d93e612d13baabe76a8f414aa5dfc5726d4845da Author: Julia Lawall Date: Sat May 21 13:10:33 2022 +0200 serial: tegra: fix typos in comments Spelling mistakes (triple letters) in comments. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-23-Julia.Lawall@inria.fr Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial-tegra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit da1bb4ed23564f2937a4a3fa8d5ccdd0c167fe6a Author: Julia Lawall Date: Sat May 21 13:11:45 2022 +0200 tty: fix typos in comments Spelling mistakes (triple letters) in comments. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-95-Julia.Lawall@inria.fr Signed-off-by: Greg Kroah-Hartman drivers/tty/mips_ejtag_fdc.c | 2 +- drivers/tty/tty_io.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 924b290655c0f17ac84e752addfc9bc3ec361069 Author: Stephen Hemminger Date: Tue May 24 13:47:40 2022 -0700 xfrm: convert alg_key to flexible array member Iproute2 build generates a warning when built with gcc-12. This is because the alg_key in xfrm.h API has zero size array element instead of flexible array. CC xfrm_state.o In function ‘xfrm_algo_parse’, inlined from ‘xfrm_state_modify.constprop’ at xfrm_state.c:573:5: xfrm_state.c:162:32: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 162 | buf[j] = val; | ~~~~~~~^~~~~ This patch convert the alg_key into flexible array member. There are other zero size arrays here that should be converted as well. This patch is RFC only since it is only compile tested and passes trivial iproute2 tests. Signed-off-by: Stephen Hemminger Acked-by: Herbert Xu Signed-off-by: Steffen Klassert include/uapi/linux/xfrm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5fd6c4f0a649c956b2c50c18e0da765b7f5e3eff Author: Sanket Goswami Date: Thu May 26 12:03:05 2022 +0530 ucsi_ccg: ACPI based I2c client enumeration for AMD ASICs Some of the AMD platforms have Cypress CCGX PD controller connected to system I2C i.e designware I2C controller. Added support to enumerate the CCGX client by adding ACPI ID to the firmware. Suggested-by: Heikki Krogerus Signed-off-by: Sanket Goswami Link: https://lore.kernel.org/r/20220526063305.3144352-3-Sanket.Goswami@amd.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/ucsi_ccg.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 5767f40053ebf599e47d688e65b259d0b6f3227a Author: Sanket Goswami Date: Thu May 26 12:03:04 2022 +0530 ucsi_ccg: Do not hardcode interrupt polarity and type The current implementation supports only Level trigger with ACTIVE HIGH, which is overriding level and polarity set by the ACPI table, hence implement the common utility function to manage irq requests. Suggested-by: Heikki Krogerus Signed-off-by: Sanket Goswami Link: https://lore.kernel.org/r/20220526063305.3144352-2-Sanket.Goswami@amd.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/ucsi_ccg.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 13118959cb1a67eb80bf06152e35e0df733615e2 Author: Chunfeng Yun Date: Thu Jun 9 15:42:33 2022 +0800 usb: mtu3: register mtu3_irq by threaded irq Use threaded irq to improve time consuming top-half Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220609074233.15532-3-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 54c4862f29725a0a20b09a10f2fa788a973713ee Author: Chunfeng Yun Date: Thu Jun 9 15:42:32 2022 +0800 usb: mtu3: implement udc_async_callbacks of gadget operation Implement udc_async_callbacks hook function to avoid a race when unnbinding gadget drivers, refer to: 7dc0c55e9f30 ('USB: UDC core: Add udc_async_callbacks gadget op') Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220609074233.15532-2-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3.h | 1 + drivers/usb/mtu3/mtu3_gadget.c | 19 ++++++++++++++++--- drivers/usb/mtu3/mtu3_gadget_ep0.c | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) commit 5e1fa6dd4caa7ce26029427647bc2f424784a559 Author: Chunfeng Yun Date: Thu Jun 9 15:42:31 2022 +0800 usb: mtu3: sync interrupt before unbind the udc Register gadget irq to avoid the interrupt handler is occurred or scheduled during the unbind flow, may happen when do android function switch stress test. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220609074233.15532-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3_gadget.c | 1 + 1 file changed, 1 insertion(+) commit 757bdf1f2fb5f1281cb13da5f24860ae81c6140e Author: Saurav Girepunje Date: Wed Jun 8 23:47:42 2022 +0530 usb: musb: remove schedule work called after flush In musb_remove() cancel_delayed_work_sync(&musb->irq_work) is called which flush the irq_work work queue. After cancel delayed work, musb_remove() call musb_gadget_cleanup->usb_del_gadget_udc->usb_del_gadget ->usb_gadget_remove_driver->usb_gadget_udc_stop->udc ->gadget->ops->udc_stop(udc->gadget); Where musb_gadget_stop() call "schedule_delayed_work(&musb->irq_work, 0)” which is already cancel/flush. So remove the schedule_delayed_work(&musb->irq_work, 0); from musb_gadget_stop function. Signed-off-by: Saurav Girepunje Link: https://lore.kernel.org/r/YqDnxkWZV2KfZh5q@Sauravs-MacBook-Air.local Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_gadget.c | 2 -- 1 file changed, 2 deletions(-) commit a725d0f6dfc5d3739d6499f30ec865305ba3544d Author: Michael Grzeschik Date: Mon May 30 00:38:48 2022 +0200 usb: gadget: uvc: call uvc uvcg_warn on completed status instead of uvcg_info Likewise to the uvcvideo hostside driver, this patch is changing the usb_request message of an non zero completion handler call from dev_info to dev_warn. Reviewed-by: Laurent Pinchart Signed-off-by: Michael Grzeschik Link: https://lore.kernel.org/r/20220529223848.105914-4-m.grzeschik@pengutronix.de Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/uvc_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87d76b5f1d8eeb49efa16e2018e188864cbb9401 Author: Michael Grzeschik Date: Mon May 30 00:38:46 2022 +0200 usb: gadget: uvc: calculate the number of request depending on framesize The current limitation of possible number of requests being handled is dependent on the gadget speed. It makes more sense to depend on the typical frame size when calculating the number of requests. This patch is changing this and is using the previous limits as boundaries for reasonable minimum and maximum number of requests. For a 1080p jpeg encoded video stream with a maximum imagesize of e.g. 800kB with a maxburst of 8 and an multiplier of 1 the resulting number of requests is calculated to 49. 800768 1 nreqs = ------ * -------------- ~= 49 2 (1024 * 8 * 1) Tested-by: Dan Vacura Signed-off-by: Michael Grzeschik Link: https://lore.kernel.org/r/20220529223848.105914-2-m.grzeschik@pengutronix.de Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/uvc_queue.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit e84e3e99256e2aedab5f45f8e02bc98c891b9188 Author: Chunfeng Yun Date: Mon May 23 17:04:49 2022 +0800 usb: mtu3: add support controller reset Add support controller reset via a reset-controller usually in infracfg, it's different with the software reset by IPPC which only used to reset MAC, and it will also reset IPPC meanwhile. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220523090449.14430-4-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3_plat.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 32b615ed4b7da586eb447212e3d2665b8aa6fdb2 Author: Chunfeng Yun Date: Mon May 23 17:04:48 2022 +0800 usb: xhci-mtk: add support optional controller reset Add support controller reset via a reset-controller usually in infracfg, it's different with the software reset by IPPC which only used to reset MAC, and it will also reset IPPC meanwhile. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220523090449.14430-3-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 0efcd08571e5e769b794a54350e47b3817f3f8c9 Author: Chunfeng Yun Date: Mon May 23 17:04:47 2022 +0800 dt-bindings: usb: mtu3: add support 'resets' property Add 'resets' property to support IP reset usually by top pericfg. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220523090449.14430-2-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 7c54e850ab70f156636d8ee6713839d20ac25782 Author: Chunfeng Yun Date: Mon May 23 17:04:46 2022 +0800 dt-bindings: usb: mtk-xhci: add support 'resets' property Add 'resets' property to support IP reset usually by top pericfg. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20220523090449.14430-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 7013b2624c7b7b749b10fdce760eeb7f6af3fe99 Author: Julia Lawall Date: Sat May 21 13:11:35 2022 +0200 USB: chipidea: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-85-Julia.Lawall@inria.fr Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/ci_hdrc_imx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7563bc7327f0671570f259790a937c1373e378c0 Author: Julia Lawall Date: Sat May 21 13:11:42 2022 +0200 usb: gadget: bdc: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Acked-by: Florian Fainelli Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-92-Julia.Lawall@inria.fr Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/bdc/bdc_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e27465a1506ea638f5adf80d50f50e911570701 Author: Julia Lawall Date: Sat May 21 13:11:02 2022 +0200 usb: typec: tcpm: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-52-Julia.Lawall@inria.fr Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18fc7c435be3f17ea26a21b2e2312fcb9088e01f Author: Tang Bin Date: Tue May 24 20:14:04 2022 +0800 usb: xhci: tegra: Fix error check In the function tegra_xusb_powerdomain_init(), dev_pm_domain_attach_by_name() may return NULL in some cases, so IS_ERR() doesn't meet the requirements. Thus fix it. Fixes: 6494a9ad86de ("usb: xhci: tegra: Add genpd support") Signed-off-by: Tang Bin Link: https://lore.kernel.org/r/20220524121404.18376-1-tangbin@cmss.chinamobile.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-tegra.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f08aa7c80dac27ee00fa6827f447597d2fba5465 Author: Tang Bin Date: Wed May 25 21:53:32 2022 +0800 usb: gadget: tegra-xudc: Fix error check in tegra_xudc_powerdomain_init() dev_pm_domain_attach_by_name() may return NULL in some cases, so IS_ERR() doesn't meet the requirements. Thus fix it. Fixes: 49db427232fe ("usb: gadget: Add UDC driver for tegra XUSB device mode controller") Signed-off-by: Tang Bin Link: https://lore.kernel.org/r/20220525135332.23144-1-tangbin@cmss.chinamobile.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/tegra-xudc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7afe69ad9221a77dc782b81f49cd7f99987740ed Author: Prashanth K Date: Fri May 27 12:19:06 2022 +0530 usb: common: usb-conn-gpio: Allow wakeup from system suspend Currently the VBUS/ID detection interrupts are disabled during system suspend. So the USB cable connect/disconnect event can't wakeup the system from low power mode. To allow this, we keep these interrupts enabled and configure them as wakeup capable. This behavior can be controlled through device wakeup source policy by the user space. Signed-off-by: Prashanth K Link: https://lore.kernel.org/r/1653634146-12215-1-git-send-email-quic_prashk@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/common/usb-conn-gpio.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 62e4efe3375eb30292dabaec4481dc04550d3644 Author: Dan Carpenter Date: Wed May 25 15:30:13 2022 +0300 usbip: vudc: Don't enable IRQs prematurely This code does: spin_unlock_irq(&udc->ud.lock); spin_unlock_irqrestore(&udc->lock, flags); which does not make sense. In theory, the first unlock could enable IRQs and then the second _irqrestore could disable them again. There would be a brief momemt where IRQs were enabled improperly. In real life, however, this function is always called with IRQs enabled and the bug does not affect runtime. Reviewed-by: Shuah Khan Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Yo4hVWcZNYzKEkIQ@kili Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vudc_sysfs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit ecf6dedd03b03f05459c3662d9b141bedbc1c39d Author: Dan Carpenter Date: Wed May 25 15:27:20 2022 +0300 USB: usbip: clean up mixed use of _irq() and _irqsave() It generally doesn't make sense to use _irq() and _irqsave() in the same function because either some of the callers have disabled IRQs or they haven't. In this case, the v_recv_cmd_submit() appears to always be called with IRQs enabled so the code works fine. That means I could convert it to either _irq() or _irqsave() but I chose to use _irqsave() because it's more conservative and easier to review. Reviewed-by: Shuah Khan Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Yo4gqLPtHO6XKMLn@kili Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vudc_rx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3e00a22fdc9a9457f1c64d885532710e174babd8 Author: Christophe JAILLET Date: Sat May 28 17:13:56 2022 +0200 USB: Follow-up to SPDX GPL-2.0+ identifiers addition - remove now useless comments All these files have been updated in the commit given in the Fixes: tag below. When the SPDX-License-Identifier: has been added, the corresponding text at the beginning of the files has not been deleted. All these texts are about GPL-2.0+, with different variation in the wording. Remove these now useless lines to save some LoC. Fixes: 5fd54ace4721 ("USB: add SPDX identifiers to all remaining files in drivers/usb/") Signed-off-by: Christophe JAILLET Signed-off-by: Greg Kroah-Hartman include/linux/usb/c67x00.h | 15 --------------- include/linux/usb/composite.h | 14 -------------- include/linux/usb/ehci_def.h | 14 -------------- include/linux/usb/ehci_pdriver.h | 14 -------------- include/linux/usb/g_hid.h | 14 -------------- include/linux/usb/hcd.h | 14 -------------- include/linux/usb/musb-ux500.h | 10 ---------- include/linux/usb/net2280.h | 14 -------------- include/linux/usb/ohci_pdriver.h | 14 -------------- include/linux/usb/otg-fsm.h | 17 ++--------------- include/linux/usb/phy_companion.h | 10 ---------- include/linux/usb/rndis_host.h | 14 -------------- include/linux/usb/usb338x.h | 11 ----------- include/linux/usb/usbnet.h | 14 -------------- 14 files changed, 2 insertions(+), 187 deletions(-) commit e3fa404a261bb8b7795b62be1b9af7b7dc1030f6 Author: Christophe JAILLET Date: Sat May 28 16:59:17 2022 +0200 USB: Follow-up to SPDX identifiers addition - remove now useless comments All these files have been updated in the commit given in the Fixes: tag below. When the SPDX-License-Identifier: has been added, the corresponding text at the beginning of the files has not been deleted. All these texts are about GPL-2.0, with different variation in the wording. Remove these now useless lines to save some LoC. Fixes: 5fd54ace4721 ("USB: add SPDX identifiers to all remaining files in drivers/usb/") Signed-off-by: Christophe JAILLET Signed-off-by: Greg Kroah-Hartman include/linux/usb/audio-v2.h | 3 --- include/linux/usb/audio.h | 3 --- include/linux/usb/cdc-wdm.h | 4 ---- include/linux/usb/cdc.h | 4 ---- include/linux/usb/gadget.h | 2 -- include/linux/usb/input.h | 4 ---- include/linux/usb/isp1301.h | 10 ---------- include/linux/usb/m66592.h | 14 -------------- include/linux/usb/of.h | 2 -- include/linux/usb/r8a66597.h | 14 -------------- include/linux/usb/serial.h | 5 ----- include/linux/usb/storage.h | 2 -- include/linux/usb/tegra_usb_phy.h | 10 ---------- include/linux/usb/ulpi.h | 4 ---- include/linux/usb/xhci-dbgp.h | 4 ---- 15 files changed, 85 deletions(-) commit df22ecc41b54def624735b83784857e708bd1502 Author: Kushagra Verma Date: Fri Jun 3 13:52:15 2022 +0530 usb: dwc3: Remove the checks of -ENOSYS Commit 57303488cd37d ("usb: dwc3: adapt dwc3 core to use Generic PHY Framework") added if statements that check 'ret == -ENOSYS || ret == -ENODEV', but the function phy_get() which is called by devm_phy_get() returns the phy driver or -ENODEV if the phy driver was not found. So, remove the check of -ENOSYS in the if statements. Signed-off-by: Kushagra Verma Link: https://lore.kernel.org/r/HK0PR01MB2801E19D4FE569545BB7592DF8A19@HK0PR01MB2801.apcprd01.prod.exchangelabs.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1e073e3ed9ff9ec14e7e360ed89a81256d895588 Author: Clément Léger Date: Tue Jun 7 15:34:54 2022 +0200 usb: host: ohci-at91: add support to enter suspend using SMC When Linux is running under OP-TEE, the SFR is set as secured and thus the AT91_OHCIICR_USB_SUSPEND register isn't accessible. Add a SMC to do the appropriate call to suspend the controller. The SMC id is fetched from the device-tree property "microchip,suspend-smc-id". if present, then the syscon regmap is not used to enter suspend and a SMC is issued. Reviewed-by: Claudiu Beznea Acked-by: Alan Stern Signed-off-by: Clément Léger Link: https://lore.kernel.org/r/20220607133454.727063-1-clement.leger@bootlin.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-at91.c | 69 +++++++++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 23 deletions(-) commit 302970b4cad3ebfda2c05ce06c322ccdc447d17e Author: Miaoqian Lin Date: Fri Jun 3 18:12:30 2022 +0400 usb: ohci-nxp: Fix refcount leak in ohci_hcd_nxp_probe of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: 73108aa90cbf ("USB: ohci-nxp: Use isp1301 driver") Acked-by: Alan Stern Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220603141231.979-1-linmq006@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-nxp.c | 1 + 1 file changed, 1 insertion(+) commit b5c5b13cb45e2c88181308186b0001992cb41954 Author: Miaoqian Lin Date: Thu Jun 2 15:08:49 2022 +0400 usb: host: Fix refcount leak in ehci_hcd_ppc_of_probe of_find_compatible_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak. Fixes: 796bcae7361c ("USB: powerpc: Workaround for the PPC440EPX USBH_23 errata [take 3]") Acked-by: Alan Stern Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220602110849.58549-1-linmq006@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-ppc-of.c | 1 + 1 file changed, 1 insertion(+) commit 3497b9a5c8c3d4efaa15ab542cc6a774b0e0a7c6 Author: Li Jun Date: Tue Jun 7 10:20:04 2022 +0800 usb: dwc3: add power down scale setting Some SoC(e.g NXP imx8MQ) may have a wrong default power down scale setting so need init it to be the correct value, the power down scale setting description in DWC3 databook: Power Down Scale (PwrDnScale) The USB3 suspend_clk input replaces pipe3_rx_pclk as a clock source to a small part of the USB3 core that operates when the SS PHY is in its lowest power (P3) state, and therefore does not provide a clock. The Power Down Scale field specifies how many suspend_clk periods fit into a 16 kHz clock period. When performing the division, round up the remainder. For example, when using an 8-bit/16-bit/32-bit PHY and 25-MHz Suspend clock, Power Down Scale = 25000 kHz/16 kHz = 13'd1563 (rounder up) So use the suspend clock rate to calculate it. Reviewed-by: Thinh Nguyen Signed-off-by: Li Jun Link: https://lore.kernel.org/r/1654568404-3461-1-git-send-email-jun.li@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.c | 34 ++++++++++++++++++++++++++++++++++ drivers/usb/dwc3/core.h | 1 + 2 files changed, 35 insertions(+) commit 8659ab3d936fcf0084676f98b75b317017aa8f82 Author: Frank Li Date: Thu Jun 9 10:44:56 2022 -0500 usb: cdns3: fix random warning message when driver load Warning log: [ 4.141392] Unexpected gfp: 0x4 (GFP_DMA32). Fixing up to gfp: 0xa20 (GFP_ATOMIC). Fix your code! [ 4.150340] CPU: 1 PID: 175 Comm: 1-0050 Not tainted 5.15.5-00039-g2fd9ae1b568c #20 [ 4.158010] Hardware name: Freescale i.MX8QXP MEK (DT) [ 4.163155] Call trace: [ 4.165600] dump_backtrace+0x0/0x1b0 [ 4.169286] show_stack+0x18/0x68 [ 4.172611] dump_stack_lvl+0x68/0x84 [ 4.176286] dump_stack+0x18/0x34 [ 4.179613] kmalloc_fix_flags+0x60/0x88 [ 4.183550] new_slab+0x334/0x370 [ 4.186878] ___slab_alloc.part.108+0x4d4/0x748 [ 4.191419] __slab_alloc.isra.109+0x30/0x78 [ 4.195702] kmem_cache_alloc+0x40c/0x420 [ 4.199725] dma_pool_alloc+0xac/0x1f8 [ 4.203486] cdns3_allocate_trb_pool+0xb4/0xd0 pool_alloc_page(struct dma_pool *pool, gfp_t mem_flags) { ... page = kmalloc(sizeof(*page), mem_flags); page->vaddr = dma_alloc_coherent(pool->dev, pool->allocation, &page->dma, mem_flags); ... } kmalloc was called with mem_flags, which is passed down in cdns3_allocate_trb_pool() and have GFP_DMA32 flags. kmall_fix_flags() report warning. GFP_DMA32 is not useful at all. dma_alloc_coherent() will handle DMA memory region correctly by pool->dev. GFP_DMA32 can be removed safely. Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20220609154456.2871672-1-Frank.Li@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/cdns3/cdns3-gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d602f30149a117eea260208b1661bc404c21dfd Author: Frank Li Date: Wed Jun 8 14:04:30 2022 -0500 usb: cdns3 fix use-after-free at workaround 2 BUG: KFENCE: use-after-free read in __list_del_entry_valid+0x10/0xac cdns3_wa2_remove_old_request() { ... kfree(priv_req->request.buf); cdns3_gadget_ep_free_request(&priv_ep->endpoint, &priv_req->request); list_del_init(&priv_req->list); ^^^ use after free ... } cdns3_gadget_ep_free_request() free the space pointed by priv_req, but priv_req is used in the following list_del_init(). This patch move list_del_init() before cdns3_gadget_ep_free_request(). Signed-off-by: Frank Li Signed-off-by: Faqiang Zhu Link: https://lore.kernel.org/r/20220608190430.2814358-1-Frank.Li@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/cdns3/cdns3-gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5d337a358b3e41bb4f7abd99a79b68a28eafaa2 Author: Laurent Pinchart Date: Wed Jun 8 20:49:18 2022 +0300 usb: gadget: uvc: Fix comment blocks style The UVC gadget driver historically uses the /* Comment * style */ for multi-line block comments, which is frowned upon. Patches for the driver are required to use the more standard /* * Comment * style */ style. This result in inconsistencies. Fix it by converting all remaining instances of the old style. Reviewed-by: Kieran Bingham Signed-off-by: Laurent Pinchart Link: https://lore.kernel.org/r/20220608174918.14656-1-laurent.pinchart@ideasonboard.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_uvc.c | 30 +++++++++++++++++++----------- drivers/usb/gadget/function/uvc_queue.c | 6 ++++-- drivers/usb/gadget/function/uvc_video.c | 12 ++++++++---- 3 files changed, 31 insertions(+), 17 deletions(-) commit b5c8b3fe8946c1927155599dfb79045477901009 Author: Eyal Birger Date: Fri May 20 13:48:45 2022 +0300 xfrm: no need to set DST_NOPOLICY in IPv4 This is a cleanup patch following commit e6175a2ed1f1 ("xfrm: fix "disable_policy" flag use when arriving from different devices") which made DST_NOPOLICY no longer be used for inbound policy checks. On outbound the flag was set, but never used. As such, avoid setting it altogether and remove the nopolicy argument from rt_dst_alloc(). Signed-off-by: Eyal Birger Reviewed-by: Nicolas Dichtel Signed-off-by: Steffen Klassert drivers/net/vrf.c | 2 +- include/net/route.h | 3 +-- net/ipv4/route.c | 24 ++++++++---------------- 3 files changed, 10 insertions(+), 19 deletions(-) commit 699bb2e0c6f3796549dabac329501df7ffd99439 Author: Marc Zyngier Date: Sat May 28 12:38:18 2022 +0100 KVM: arm64: Move vcpu PC/Exception flags to the input flag set The PC update flags (which also deal with exception injection) is one of the most complicated use of the flag we have. Make it more fool prof by: - moving it over to the new accessors and assign it to the input flag set - turn the combination of generic ELx flags with another flag indicating the target EL itself into an explicit set of flags for each EL and vector combination - add a new accessor to pend the exception This is otherwise a pretty straightformward conversion. Reviewed-by: Fuad Tabba Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_emulate.h | 9 +++++- arch/arm64/include/asm/kvm_host.h | 58 +++++++++++++++++++++--------------- arch/arm64/kvm/arm.c | 4 +-- arch/arm64/kvm/hyp/exception.c | 23 +++++++------- arch/arm64/kvm/hyp/nvhe/sys_regs.c | 4 +-- arch/arm64/kvm/inject_fault.c | 17 ++++------- 6 files changed, 61 insertions(+), 54 deletions(-) commit 7e8df1fc2d669d04c1f8a9e2d61d7afba1b43df4 Author: Peng Wu Date: Thu Jun 2 07:22:34 2022 +0000 crypto: sun8i-ss - fix a NULL vs IS_ERR() check in sun8i_ss_hashkey The crypto_alloc_shash() function never returns NULL. It returns error pointers. Fixes: 801b7d572c0a ("crypto: sun8i-ss - add hmac(sha1)") Signed-off-by: Peng Wu Reported-by: Hulk Robot Signed-off-by: Herbert Xu drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b03c0dc0788abccc7a25ef7dff5818f4123bb992 Author: Shijith Thotton Date: Wed Jun 1 13:38:59 2022 +0530 crypto: octeontx2 - fix potential null pointer access Added missing checks to avoid null pointer dereference. The patch fixes below issue reported by klocwork tool: . Pointer 'strsep( &val, ":" )' returned from call to function 'strsep' at line 1608 may be NULL and will be dereferenced at line 1608. Also there are 2 similar errors on lines 1620, 1632 in otx2_cptpf_ucode.c. Signed-off-by: Shijith Thotton Signed-off-by: Herbert Xu drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 2d16803c562ecc644803d42ba98a8e0aef9c014e Author: Jason A. Donenfeld Date: Sat May 28 21:44:07 2022 +0200 crypto: blake2s - remove shash module BLAKE2s has no currently known use as an shash. Just remove all of this unnecessary plumbing. Removing this shash was something we talked about back when we were making BLAKE2s a built-in, but I simply never got around to doing it. So this completes that project. Importantly, this fixs a bug in which the lib code depends on crypto_simd_disabled_for_test, causing linker errors. Also add more alignment tests to the selftests and compare SIMD and non-SIMD compression functions, to make up for what we lose from testmgr.c. Reported-by: gaochao Cc: Eric Biggers Cc: Ard Biesheuvel Cc: stable@vger.kernel.org Fixes: 6048fdcc5f26 ("lib/crypto: blake2s: include as built-in") Signed-off-by: Jason A. Donenfeld Signed-off-by: Herbert Xu arch/arm/crypto/Kconfig | 2 +- arch/arm/crypto/Makefile | 4 +- arch/arm/crypto/blake2s-shash.c | 75 ------------- arch/x86/crypto/Makefile | 4 +- arch/x86/crypto/blake2s-glue.c | 3 +- arch/x86/crypto/blake2s-shash.c | 77 -------------- crypto/Kconfig | 20 +--- crypto/Makefile | 1 - crypto/blake2s_generic.c | 75 ------------- crypto/tcrypt.c | 12 --- crypto/testmgr.c | 24 ----- crypto/testmgr.h | 217 -------------------------------------- include/crypto/internal/blake2s.h | 108 ------------------- lib/crypto/blake2s-selftest.c | 41 +++++++ lib/crypto/blake2s.c | 37 +++++-- 15 files changed, 76 insertions(+), 624 deletions(-) commit 920b0442b9f884f55f4745b53430c80e71e90275 Author: Jason A. Donenfeld Date: Sat May 28 12:24:29 2022 +0200 crypto: memneq - move into lib/ This is used by code that doesn't need CONFIG_CRYPTO, so move this into lib/ with a Kconfig option so that it can be selected by whatever needs it. This fixes a linker error Zheng pointed out when CRYPTO_MANAGER_DISABLE_TESTS!=y and CRYPTO=m: lib/crypto/curve25519-selftest.o: In function `curve25519_selftest': curve25519-selftest.c:(.init.text+0x60): undefined reference to `__crypto_memneq' curve25519-selftest.c:(.init.text+0xec): undefined reference to `__crypto_memneq' curve25519-selftest.c:(.init.text+0x114): undefined reference to `__crypto_memneq' curve25519-selftest.c:(.init.text+0x154): undefined reference to `__crypto_memneq' Reported-by: Zheng Bin Cc: Eric Biggers Cc: stable@vger.kernel.org Fixes: aa127963f1ca ("crypto: lib/curve25519 - re-add selftests") Signed-off-by: Jason A. Donenfeld Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu crypto/Kconfig | 1 + crypto/Makefile | 2 +- lib/Kconfig | 3 +++ lib/Makefile | 1 + lib/crypto/Kconfig | 1 + {crypto => lib}/memneq.c | 0 6 files changed, 7 insertions(+), 1 deletion(-) commit 4ad28689df853db3ee7b2656a225f1d722ee7639 Author: Shijith Thotton Date: Fri May 27 13:24:48 2022 +0530 crypto: octeontx2 - add firmware version in devlink info Added running firmware version information of AE, SE and IE components in devlink info. Signed-off-by: Shijith Thotton Signed-off-by: Herbert Xu .../crypto/marvell/octeontx2/otx2_cpt_devlink.c | 40 ++++++++++++++++++++-- .../crypto/marvell/octeontx2/otx2_cptpf_ucode.c | 2 +- .../crypto/marvell/octeontx2/otx2_cptpf_ucode.h | 3 ++ 3 files changed, 42 insertions(+), 3 deletions(-) commit cd81775a56bce2ad480ff8444e6f44f3980ceb7d Author: Julia Lawall Date: Sat May 21 13:10:48 2022 +0200 crypto: ccp - fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f3bbf22a592e8bd15d2f6d8e9a4a34e2b5028cd Author: Julia Lawall Date: Sat May 21 13:10:45 2022 +0200 crypto: hisilicon/sec - fix typos in comment Spelling mistakes (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Herbert Xu drivers/crypto/hisilicon/sec2/sec.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6b2a51ff03bf0c54cbc699ee85a9a49eb203ebfc Author: Nathan Huckleberry Date: Fri May 20 18:15:01 2022 +0000 fscrypt: Add HCTR2 support for filename encryption HCTR2 is a tweakable, length-preserving encryption mode that is intended for use on CPUs with dedicated crypto instructions. HCTR2 has the property that a bitflip in the plaintext changes the entire ciphertext. This property fixes a known weakness with filename encryption: when two filenames in the same directory share a prefix of >= 16 bytes, with AES-CTS-CBC their encrypted filenames share a common substring, leaking information. HCTR2 does not have this problem. More information on HCTR2 can be found here: "Length-preserving encryption with HCTR2": https://eprint.iacr.org/2021/1441.pdf Signed-off-by: Nathan Huckleberry Reviewed-by: Ard Biesheuvel Acked-by: Eric Biggers Signed-off-by: Herbert Xu Documentation/filesystems/fscrypt.rst | 22 +++++++++++++++++----- fs/crypto/fscrypt_private.h | 2 +- fs/crypto/keysetup.c | 7 +++++++ fs/crypto/policy.c | 14 +++++++++++--- include/uapi/linux/fscrypt.h | 3 ++- 5 files changed, 38 insertions(+), 10 deletions(-) commit 9d2c0b485c46c7c5f781067c60300def5d1365cb Author: Nathan Huckleberry Date: Fri May 20 18:15:00 2022 +0000 crypto: arm64/polyval - Add PMULL accelerated implementation of POLYVAL Add hardware accelerated version of POLYVAL for ARM64 CPUs with Crypto Extensions support. This implementation is accelerated using PMULL instructions to perform the finite field computations. For added efficiency, 8 blocks of the message are processed simultaneously by precomputing the first 8 powers of the key. Karatsuba multiplication is used instead of Schoolbook multiplication because it was found to be slightly faster on ARM64 CPUs. Montgomery reduction must be used instead of Barrett reduction due to the difference in modulus between POLYVAL's field and other finite fields. More information on POLYVAL can be found in the HCTR2 paper: "Length-preserving encryption with HCTR2": https://eprint.iacr.org/2021/1441.pdf Signed-off-by: Nathan Huckleberry Reviewed-by: Ard Biesheuvel Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu arch/arm64/crypto/Kconfig | 5 + arch/arm64/crypto/Makefile | 3 + arch/arm64/crypto/polyval-ce-core.S | 361 ++++++++++++++++++++++++++++++++++++ arch/arm64/crypto/polyval-ce-glue.c | 191 +++++++++++++++++++ 4 files changed, 560 insertions(+) commit 34f7f6c3011276313383099156be287ac745bcea Author: Nathan Huckleberry Date: Fri May 20 18:14:59 2022 +0000 crypto: x86/polyval - Add PCLMULQDQ accelerated implementation of POLYVAL Add hardware accelerated version of POLYVAL for x86-64 CPUs with PCLMULQDQ support. This implementation is accelerated using PCLMULQDQ instructions to perform the finite field computations. For added efficiency, 8 blocks of the message are processed simultaneously by precomputing the first 8 powers of the key. Schoolbook multiplication is used instead of Karatsuba multiplication because it was found to be slightly faster on x86-64 machines. Montgomery reduction must be used instead of Barrett reduction due to the difference in modulus between POLYVAL's field and other finite fields. More information on POLYVAL can be found in the HCTR2 paper: "Length-preserving encryption with HCTR2": https://eprint.iacr.org/2021/1441.pdf Signed-off-by: Nathan Huckleberry Reviewed-by: Ard Biesheuvel Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/Makefile | 3 + arch/x86/crypto/polyval-clmulni_asm.S | 321 +++++++++++++++++++++++++++++++++ arch/x86/crypto/polyval-clmulni_glue.c | 203 +++++++++++++++++++++ crypto/Kconfig | 9 + crypto/polyval-generic.c | 40 ++++ include/crypto/polyval.h | 5 + 6 files changed, 581 insertions(+) commit c0eb7591c1ed9cbdb0ad796bb56aed13748b55fa Author: Nathan Huckleberry Date: Fri May 20 18:14:58 2022 +0000 crypto: arm64/aes-xctr - Improve readability of XCTR and CTR modes Added some clarifying comments, changed the register allocations to make the code clearer, and added register aliases. Signed-off-by: Nathan Huckleberry Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu arch/arm64/crypto/aes-glue.c | 16 +++ arch/arm64/crypto/aes-modes.S | 237 ++++++++++++++++++++++++++++++------------ 2 files changed, 185 insertions(+), 68 deletions(-) commit 23a251cc1696e1bf68df1dbba569d2fe12469d22 Author: Nathan Huckleberry Date: Fri May 20 18:14:57 2022 +0000 crypto: arm64/aes-xctr - Add accelerated implementation of XCTR Add hardware accelerated version of XCTR for ARM64 CPUs with ARMv8 Crypto Extension support. This XCTR implementation is based on the CTR implementation in aes-modes.S. More information on XCTR can be found in the HCTR2 paper: "Length-preserving encryption with HCTR2": https://eprint.iacr.org/2021/1441.pdf Signed-off-by: Nathan Huckleberry Reviewed-by: Ard Biesheuvel Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu arch/arm64/crypto/Kconfig | 4 +- arch/arm64/crypto/aes-glue.c | 64 +++++++++++++++- arch/arm64/crypto/aes-modes.S | 166 ++++++++++++++++++++++++++---------------- 3 files changed, 168 insertions(+), 66 deletions(-) commit fd94fcf09957a75e25941f7dbfc84d30a63817ac Author: Nathan Huckleberry Date: Fri May 20 18:14:56 2022 +0000 crypto: x86/aesni-xctr - Add accelerated implementation of XCTR Add hardware accelerated version of XCTR for x86-64 CPUs with AESNI support. More information on XCTR can be found in the HCTR2 paper: "Length-preserving encryption with HCTR2": https://eprint.iacr.org/2021/1441.pdf Signed-off-by: Nathan Huckleberry Reviewed-by: Ard Biesheuvel Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/aes_ctrby8_avx-x86_64.S | 232 +++++++++++++++++++++----------- arch/x86/crypto/aesni-intel_glue.c | 114 +++++++++++++++- crypto/Kconfig | 2 +- 3 files changed, 266 insertions(+), 82 deletions(-) commit 7ff554ced7c7d7cf77586e07474e8633e011e2d0 Author: Nathan Huckleberry Date: Fri May 20 18:14:55 2022 +0000 crypto: hctr2 - Add HCTR2 support Add support for HCTR2 as a template. HCTR2 is a length-preserving encryption mode that is efficient on processors with instructions to accelerate AES and carryless multiplication, e.g. x86 processors with AES-NI and CLMUL, and ARM processors with the ARMv8 Crypto Extensions. As a length-preserving encryption mode, HCTR2 is suitable for applications such as storage encryption where ciphertext expansion is not possible, and thus authenticated encryption cannot be used. Currently, such applications usually use XTS, or in some cases Adiantum. XTS has the disadvantage that it is a narrow-block mode: a bitflip will only change 16 bytes in the resulting ciphertext or plaintext. This reveals more information to an attacker than necessary. HCTR2 is a wide-block mode, so it provides a stronger security property: a bitflip will change the entire message. HCTR2 is somewhat similar to Adiantum, which is also a wide-block mode. However, HCTR2 is designed to take advantage of existing crypto instructions, while Adiantum targets devices without such hardware support. Adiantum is also designed with longer messages in mind, while HCTR2 is designed to be efficient even on short messages. HCTR2 requires POLYVAL and XCTR as components. More information on HCTR2 can be found here: "Length-preserving encryption with HCTR2": https://eprint.iacr.org/2021/1441.pdf Signed-off-by: Nathan Huckleberry Reviewed-by: Ard Biesheuvel Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu crypto/Kconfig | 11 + crypto/Makefile | 1 + crypto/hctr2.c | 581 +++++++++++++++++++++++++++++++++++++++++++++++ crypto/tcrypt.c | 5 + crypto/testmgr.c | 8 + crypto/testmgr.h | 672 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 1278 insertions(+) commit f3c923a09c4c4f5861b1ed53cf75673992a6ba68 Author: Nathan Huckleberry Date: Fri May 20 18:14:54 2022 +0000 crypto: polyval - Add POLYVAL support Add support for POLYVAL, an ε-Δ-universal hash function similar to GHASH. This patch only uses POLYVAL as a component to implement HCTR2 mode. It should be noted that POLYVAL was originally specified for use in AES-GCM-SIV (RFC 8452), but the kernel does not currently support this mode. POLYVAL is implemented as an shash algorithm. The implementation is modified from ghash-generic.c. For more information on POLYVAL see: Length-preserving encryption with HCTR2: https://eprint.iacr.org/2021/1441.pdf AES-GCM-SIV: Nonce Misuse-Resistant Authenticated Encryption: https://datatracker.ietf.org/doc/html/rfc8452 Signed-off-by: Nathan Huckleberry Reviewed-by: Eric Biggers Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/Kconfig | 8 ++ crypto/Makefile | 1 + crypto/polyval-generic.c | 205 +++++++++++++++++++++++++++++++++++++++++++++++ crypto/tcrypt.c | 4 + crypto/testmgr.c | 6 ++ crypto/testmgr.h | 171 +++++++++++++++++++++++++++++++++++++++ include/crypto/polyval.h | 17 ++++ 7 files changed, 412 insertions(+) commit 17fee07a2ac577da18b44dd658a9c3c864281c49 Author: Nathan Huckleberry Date: Fri May 20 18:14:53 2022 +0000 crypto: xctr - Add XCTR support Add a generic implementation of XCTR mode as a template. XCTR is a blockcipher mode similar to CTR mode. XCTR uses XORs and little-endian addition rather than big-endian arithmetic which has two advantages: It is slightly faster on little-endian CPUs and it is less likely to be implemented incorrect since integer overflows are not possible on practical input sizes. XCTR is used as a component to implement HCTR2. More information on XCTR mode can be found in the HCTR2 paper: https://eprint.iacr.org/2021/1441.pdf Signed-off-by: Nathan Huckleberry Reviewed-by: Eric Biggers Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/Kconfig | 9 + crypto/Makefile | 1 + crypto/tcrypt.c | 1 + crypto/testmgr.c | 6 + crypto/testmgr.h | 693 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ crypto/xctr.c | 191 +++++++++++++++ 6 files changed, 901 insertions(+) commit 7df7563b16aa0281cb811785e4bb3681b46e2a28 Author: Uwe Kleine-König Date: Fri May 20 19:21:00 2022 +0200 crypto: atmel-ecc - Remove duplicated error reporting in .remove() Returning an error value in an i2c remove callback results in an error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. As atmel_ecc_remove() already emits an error message on failure and the additional error message by the i2c core doesn't add any useful information, change the return value to zero to suppress this message. Also make the error message a bit more drastical because when the device is still busy on remove, it's likely that it will access freed memory soon. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Reviewed-by: Tudor Ambarus Signed-off-by: Herbert Xu drivers/crypto/atmel-ecc.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 6cb3f9b25c55928b95a02b9ed8e87ed653b3cce8 Author: Dan Carpenter Date: Wed May 18 20:33:54 2022 +0300 crypto: sun8i-ss - Fix error codes for dma_mapping_error() If there is a dma_mapping_error() then return negative error codes. Currently this code returns success. Fixes: 801b7d572c0a ("crypto: sun8i-ss - add hmac(sha1)") Signed-off-by: Dan Carpenter Acked-by: Corentin Labbe Tested-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d2765e1b9ac4b2d5a5d5bf17f468c9b3566c3770 Author: Dan Carpenter Date: Wed May 18 20:33:44 2022 +0300 crypto: sun8i-ss - fix error codes in allocate_flows() These failure paths should return -ENOMEM. Currently they return success. Fixes: 359e893e8af4 ("crypto: sun8i-ss - rework handling of IV") Fixes: 8eec4563f152 ("crypto: sun8i-ss - do not allocate memory when handling hash requests") Signed-off-by: Dan Carpenter Acked-by: Corentin Labbe Tested-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 13dc15a3f5fd7f884e4bfa8c011a0ae868df12ae Author: John Allen Date: Wed May 18 15:31:26 2022 +0000 crypto: ccp - Use kzalloc for sev ioctl interfaces to prevent kernel memory leak For some sev ioctl interfaces, input may be passed that is less than or equal to SEV_FW_BLOB_MAX_SIZE, but larger than the data that PSP firmware returns. In this case, kmalloc will allocate memory that is the size of the input rather than the size of the data. Since PSP firmware doesn't fully overwrite the buffer, the sev ioctl interfaces with the issue may return uninitialized slab memory. Currently, all of the ioctl interfaces in the ccp driver are safe, but to prevent future problems, change all ioctl interfaces that allocate memory with kmalloc to use kzalloc and memset the data buffer to zero in sev_ioctl_do_platform_status. Fixes: 38103671aad3 ("crypto: ccp: Use the stack and common buffer for status commands") Fixes: e799035609e15 ("crypto: ccp: Implement SEV_PEK_CSR ioctl command") Fixes: 76a2b524a4b1d ("crypto: ccp: Implement SEV_PDH_CERT_EXPORT ioctl command") Fixes: d6112ea0cb344 ("crypto: ccp - introduce SEV_GET_ID2 command") Cc: stable@vger.kernel.org Reported-by: Andy Nguyen Suggested-by: David Rientjes Suggested-by: Peter Gonda Signed-off-by: John Allen Reviewed-by: Peter Gonda Acked-by: David Rientjes Signed-off-by: Herbert Xu drivers/crypto/ccp/sev-dev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 0a078845ba68ea368eba1729ae460d4c4400be09 Author: Peng Fan Date: Tue May 10 20:42:36 2022 +0800 arm64: dts: imx8ulp: address build warning Fix warnings such as: Warning (simple_bus_reg): /soc@0/gpio@2e200000: simple-bus unit address format error, expected "2e200080" Signed-off-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9e1fd965ceea38987cfcdfd2748260c7ca1cc095 Author: Peng Fan Date: Tue May 10 20:40:50 2022 +0800 arm64: defconfig: enable i.MX93 clk & pinctrl Enable i.MX93 clk and pinctrl driver for booting the system Reviewed-by: Dong Aisheng Signed-off-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit e37907bd82941c153bb6254b0182e0434a3143d0 Author: Peng Fan Date: Tue May 10 20:40:49 2022 +0800 arm64: dts: freescale: add i.MX93 11x11 EVK basic support Enable lpuart & SDHC for console and rootfs Reviewed-by: Dong Aisheng Signed-off-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/Makefile | 1 + arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts | 114 ++++++++++++++++++++++ 2 files changed, 115 insertions(+) commit ec8b5b5058ea465111d6d3cc18ae0c9ab38d0362 Author: Peng Fan Date: Tue May 10 20:40:48 2022 +0800 arm64: dts: freescale: Add i.MX93 dtsi support The i.MX 93 applications processors are the first in the i.MX portfolio to integrate the scalable Arm Cortex-A55 core, bringing performance and energy efficiency to Linux-based edge applications and the Arm Ethos-U65 microNPU, enabling developers to create more capable, cost-effective and energy-efficient ML applications. Add the basic dtsi support for i.MX93. Reviewed-by: Dong Aisheng Acked-by: Rob Herring Signed-off-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx93-pinfunc.h | 623 ++++++++++++++++++++++++++ arch/arm64/boot/dts/freescale/imx93.dtsi | 334 ++++++++++++++ 2 files changed, 957 insertions(+) commit 9cc4853e4781bf0dd0f35355dc92d97c9da02f5d Author: Antonio Borneo Date: Tue Jun 7 23:31:44 2022 +0200 drm: adv7511: override i2c address of cec before accessing it Commit 680532c50bca ("drm: adv7511: Add support for i2c_new_secondary_device") allows a device tree node to override the default addresses of the secondary i2c devices. This is useful for solving address conflicts on the i2c bus. In adv7511_init_cec_regmap() the new i2c address of cec device is read from device tree and immediately accessed, well before it is written in the proper register to override the default address. This can cause an i2c error during probe and a consequent probe failure. Once the new i2c address is read from the device tree, override the default address before any attempt to access the cec. Tested with adv7533 and stm32mp157f. Signed-off-by: Antonio Borneo Fixes: 680532c50bca ("drm: adv7511: Add support for i2c_new_secondary_device") Reviewed-by: Kieran Bingham Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220607213144.427177-1-antonio.borneo@foss.st.com drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 2df84a757d87fd62869fc401119d429735377ec5 Author: Marco Pagani Date: Thu Jun 9 16:05:19 2022 +0200 fpga: altera-pr-ip: fix unsigned comparison with less than zero Fix the "comparison with less than zero" warning reported by cppcheck for the unsigned (size_t) parameter count of the alt_pr_fpga_write() function. Fixes: d201cc17a8a3 ("fpga pr ip: Core driver support for Altera Partial Reconfiguration IP") Reviewed-by: Tom Rix Acked-by: Xu Yilun Signed-off-by: Marco Pagani Link: https://lore.kernel.org/r/20220609140520.42662-1-marpagan@redhat.com Signed-off-by: Xu Yilun drivers/fpga/altera-pr-ip-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc0130524cd9a0fda36a14986686a8041ef43fb7 Author: Eric Huang Date: Wed Jun 8 19:32:24 2022 +0800 rtw89: add new state to CFO state machine for UL-OFDMA Add an new state, RTW89_PHY_DCFO_STATE_HOLD, to keep CFO acceleration after CFO_PERIOD_CNT if the traffic is UL-OFDMA, which is calculated based on RX trigger frame counter. Signed-off-by: Eric Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220608113224.11193-4-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 7 +++++++ drivers/net/wireless/realtek/rtw89/phy.c | 24 +++++++++++++++++++++--- drivers/net/wireless/realtek/rtw89/phy.h | 1 + 3 files changed, 29 insertions(+), 3 deletions(-) commit 5165f1689a2c42b8f1b6b007425d10229c9bf155 Author: Po Hao Huang Date: Wed Jun 8 19:32:23 2022 +0800 rtw89: 8852c: add trigger frame counter Adding this allows us to maintain trigger frame statistics, which is required for our CFO tracking decisions. Signed-off-by: Po Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220608113224.11193-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 48 ++++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/core.h | 14 +++++++++ drivers/net/wireless/realtek/rtw89/debug.c | 3 +- 3 files changed, 64 insertions(+), 1 deletion(-) commit 21ab562c1f65e583b5d89081acaf096805522482 Author: Po Hao Huang Date: Wed Jun 8 19:32:22 2022 +0800 ieee80211: add trigger frame definition Define trigger stype of control frame, and its checking function, struct and trigger type within common_info of trigger. Signed-off-by: Po Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220608113224.11193-2-pkshih@realtek.com include/linux/ieee80211.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 05a2eebfa650258b461d1a8aea768f2cb9a6b6ff Author: Minghao Chi Date: Mon Jun 6 01:42:37 2022 +0000 wifi: wfx: Remove redundant NULL check before release_firmware() call release_firmware() checks for NULL pointers internally so checking before calling it is redundant. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Acked-by: Jérôme Pouiller Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220606014237.290466-1-chi.minghao@zte.com.cn drivers/net/wireless/silabs/wfx/fwio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 991ebc730369c10f6ac36a62c8174276b3811de8 Author: Pavel Skripkin Date: Tue Jun 7 22:26:31 2022 +0300 MAINTAINERS: add myself as r8188eu reviewer I was reviewing r8188eu patches for a while, but I am missing some of them, since I am not in CC list. I want to be CC'ed to help reviewing and testing more patches. Acked-by: Dan Carpenter Signed-off-by: Pavel Skripkin Acked-by: Phillip Potter Acked-by: Larry Finger Link: https://lore.kernel.org/r/d6f6420a0d5ceff6bb50d268023f7d2e117027c5.1654629778.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit b9c5e272062708680d47df433bfbfe5299ad1a63 Author: Pavel Skripkin Date: Tue Jun 7 22:26:21 2022 +0300 staging: r8188eu: add error handling of rtw_read32 rtw_read32() reads data from device via USB API which may fail. In case of any failure previous code returned stack data to callers, which is wrong. Fix it by changing rtw_read32() prototype and prevent caller from touching random stack data Signed-off-by: Pavel Skripkin Link: https://lore.kernel.org/r/583c3d21c46066275e4fc8da5ba4fd0e3679335b.1654629778.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_cmd.c | 15 +++++- drivers/staging/r8188eu/core/rtw_efuse.c | 20 +++++--- drivers/staging/r8188eu/core/rtw_fw.c | 16 +++++-- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 14 +++++- drivers/staging/r8188eu/core/rtw_pwrctrl.c | 9 +++- drivers/staging/r8188eu/hal/Hal8188ERateAdaptive.c | 21 +++++++-- drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 3 +- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 40 ++++++++++------ drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 12 ++++- drivers/staging/r8188eu/hal/usb_halinit.c | 53 ++++++++++++++++++---- drivers/staging/r8188eu/hal/usb_ops_linux.c | 13 ++++-- drivers/staging/r8188eu/include/rtw_io.h | 2 +- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 27 +++++++++-- drivers/staging/r8188eu/os_dep/os_intfs.c | 13 +++++- 14 files changed, 202 insertions(+), 56 deletions(-) commit fed9e604eeb6150847d9757f6b056c12912d468b Author: Pavel Skripkin Date: Tue Jun 7 22:26:12 2022 +0300 staging: r8188eu: add error handling of rtw_read16 rtw_read16() reads data from device via USB API which may fail. In case of any failure previous code returned stack data to callers, which is wrong. Fix it by changing rtw_read16() prototype and prevent caller from touching random stack data Signed-off-by: Pavel Skripkin Link: https://lore.kernel.org/r/06b45afda048d0aeddeed983c2318680fe6265f5.1654629778.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 29 ++++++++++++++++++++----- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 8 +++++-- drivers/staging/r8188eu/hal/usb_halinit.c | 27 +++++++++++++++++++---- drivers/staging/r8188eu/hal/usb_ops_linux.c | 13 +++++++---- drivers/staging/r8188eu/include/rtw_io.h | 2 +- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 9 +++++--- drivers/staging/r8188eu/os_dep/os_intfs.c | 6 ++++- 7 files changed, 73 insertions(+), 21 deletions(-) commit 857fe9e5efc09833fe1110e99d8baba954a86abb Author: Pavel Skripkin Date: Tue Jun 7 22:26:05 2022 +0300 staging: r8188eu: add error handling of rtw_read8 rtw_read8() reads data from device via USB API which may fail. In case of any failure previous code returned stack data to callers, which is wrong. Fix it by changing rtw_read8() prototype and prevent caller from touching random stack data Signed-off-by: Pavel Skripkin Link: https://lore.kernel.org/r/c8f8ef4f14db3ba2478a87d5be6eb768a093dfaf.1654629778.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_efuse.c | 13 +- drivers/staging/r8188eu/core/rtw_fw.c | 56 ++++++-- drivers/staging/r8188eu/core/rtw_led.c | 16 ++- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 48 +++++-- drivers/staging/r8188eu/core/rtw_wlan_util.c | 20 ++- drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 18 ++- drivers/staging/r8188eu/hal/HalPwrSeqCmd.c | 9 +- drivers/staging/r8188eu/hal/hal_com.c | 27 +++- drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 37 ++++- drivers/staging/r8188eu/hal/rtl8188e_dm.c | 6 +- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 69 ++++++++-- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 10 +- drivers/staging/r8188eu/hal/usb_halinit.c | 171 +++++++++++++++++++----- drivers/staging/r8188eu/hal/usb_ops_linux.c | 7 +- drivers/staging/r8188eu/include/rtw_io.h | 2 +- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 11 +- 16 files changed, 418 insertions(+), 102 deletions(-) commit da30e351882965df99455904c3c020d138899d9f Author: Srivathsan Sivakumar Date: Thu Jun 9 16:46:39 2022 -0400 staging: qlge: qlge_main.c: rewrite do-while loops into more compact for loops simplify do-while loops into for loops Reviewed-by: Dan Carpenter Signed-off-by: Srivathsan Sivakumar Link: https://lore.kernel.org/r/YqJcLwUQorZQOrkd@Sassy Signed-off-by: Greg Kroah-Hartman drivers/staging/qlge/qlge_main.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 66d653c37228cb328e9e7ecfa87e6b6b7650e56f Author: Stephen Kitt Date: Tue Jun 7 20:55:16 2022 +0200 staging: ftbft: Use backlight helper backlight_properties.fb_blank is deprecated. The states it represents are handled by other properties; but instead of accessing those properties directly, drivers should use the helpers provided by backlight.h. Instead of manually checking the power state in struct backlight_properties, use backlight_is_blank(). Cc: Greg Kroah-Hartman Cc: "Noralf Trønnes" Cc: Thomas Zimmermann Cc: Andy Shevchenko Cc: Javier Martinez Canillas Cc: Len Baker Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Cc: linux-staging@lists.linux.dev Reviewed-by: Daniel Thompson Reviewed-by: Andy Shevchenko Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20220607185516.1129900-1-steve@sk2.org Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ssd1351.c | 3 +-- drivers/staging/fbtft/fbtft-core.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 455c5de922236dee1c008621c0401718a4657619 Author: Rommel Rodriguez Perez Date: Tue Jun 7 21:38:43 2022 -0500 staging: r8188eu: Add blank line after declarations This patch adds a blank line after the variable declarations, it should remove a checkpatch.pl warning and improve readability. checkpatch output: WARNING: Missing a blank line after declarations Signed-off-by: Rommel Rodriguez Perez Link: https://lore.kernel.org/r/YqALs/7VkGsYUngw@debianmain.debian.pc.org Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_ieee80211.c | 1 + 1 file changed, 1 insertion(+) commit 72aef4f60ff90984fe7aa8b09698120a73373d7f Author: Stephen Kitt Date: Tue Jun 7 21:00:49 2022 +0200 staging: olpc_dcon: Use backlight helper Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Cc: Jens Frederich Cc: Jon Nettleton Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20220607190049.1132154-1-steve@sk2.org Signed-off-by: Greg Kroah-Hartman drivers/staging/olpc_dcon/olpc_dcon.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 4fd9afd894ebe5831dbd737e6ca7b6de14da7fda Author: Krzysztof Kozlowski Date: Thu Jun 9 13:39:10 2022 +0200 arm64: dts: amlogic: align gpio-key node names with dtschema The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20220609113911.380368-7-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4956be9944d1fb23107f27bad8a2cca0fa167443 Author: Krzysztof Kozlowski Date: Thu Jun 9 13:39:09 2022 +0200 arm64: dts: amlogic: correct gpio-keys properties gpio-keys children do not use unit addresses. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20220609113911.380368-6-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts | 2 -- arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts | 2 -- arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts | 2 -- arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 4 +--- arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts | 4 +--- arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-kii-pro.dts | 4 +--- arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts | 4 +--- arch/arm64/boot/dts/amlogic/meson-gxl-s905d-vero4k-plus.dts | 4 +--- arch/arm64/boot/dts/amlogic/meson-gxm-mecool-kiii-pro.dts | 4 +--- arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts | 4 +--- arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts | 4 +--- arch/arm64/boot/dts/amlogic/meson-gxm-wetek-core2.dts | 2 -- 12 files changed, 8 insertions(+), 32 deletions(-) commit c46952d2ad4e8eafa917298aca6e3614251025cf Author: Zelong Dong Date: Thu May 26 21:01:58 2022 +0800 arm64: dts: meson: add reset controller for Meson-S4 SoC Add the reset controller device of Meson-S4 SoC family Signed-off-by: Zelong Dong Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20220526130158.36651-1-zelong.dong@amlogic.com arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit ad414ddf9de096b77027d90f1e2090e653a24306 Author: Krzysztof Kozlowski Date: Thu May 26 22:45:51 2022 +0200 arm64: dts: amlogic: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20220526204552.832961-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxl-s905w-jethome-jethub-j80.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit c110f7a94015a8da24520c5f460dc461ffc30a34 Author: Krzysztof Kozlowski Date: Thu May 26 22:45:52 2022 +0200 ARM: dts: meson: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20220526204552.832961-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/meson.dtsi | 4 ++-- arch/arm/boot/dts/meson8.dtsi | 2 +- arch/arm/boot/dts/meson8b.dtsi | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 6cbd05b2d07a651e00c76d287a5f44994cbafe60 Merge: 70b1f2991e3c 260b5c694bd4 Author: Jakub Kicinski Date: Thu Jun 9 23:21:27 2022 -0700 Merge tag 'ieee802154-for-net-next-2022-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next Stefan Schmidt says: ==================== pull-request: ieee802154-next 2022-06-09 This is a separate pull request for 6lowpan changes. We agreed with the bluetooth maintainers to switch the trees these changing are going into from bluetooth to ieee802154. Jukka Rissanen stepped down as a co-maintainer of 6lowpan (Thanks for the work!). Alexander is staying as maintainer. Alexander reworked the nhc_id lookup in 6lowpan to be way simpler. Moved the data structure from rb to an array, which is all we need in this case. * tag 'ieee802154-for-net-next-2022-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next: MAINTAINERS: Remove Jukka Rissanen as 6lowpan maintainer net: 6lowpan: constify lowpan_nhc structures net: 6lowpan: use array for find nhc id net: 6lowpan: remove const from scalars ==================== Link: https://lore.kernel.org/r/20220609202956.1512156-1-stefan@datenfreihafen.org Signed-off-by: Jakub Kicinski commit 70b1f2991e3c278a07bc38eb95538664f738e801 Merge: ce1d8e74f779 2fa3ee93d13c Author: Jakub Kicinski Date: Thu Jun 9 23:04:20 2022 -0700 Merge branch 'bonding-netlink-errors-and-cleanup' Jonathan Toppins says: ==================== bonding: netlink errors and cleanup The first patch attempts to set helpful error messages when configuring bonds via netlink. The second patch removes redundant init code for RLB mode which is already done in bond_open. ==================== Link: https://lore.kernel.org/r/cover.1654711315.git.jtoppins@redhat.com Signed-off-by: Jakub Kicinski commit 2fa3ee93d13ce723d60a4fc4620ed9126c468901 Author: Jonathan Toppins Date: Wed Jun 8 14:14:57 2022 -0400 bonding: cleanup bond_create Setting RLB_NULL_INDEX is not needed as this is done in bond_alb_initialize which is called by bond_open. Also reduce the number of rtnl_unlock calls by just using the standard goto cleanup path. Signed-off-by: Jonathan Toppins Acked-by: Jay Vosburgh Signed-off-by: Jakub Kicinski drivers/net/bonding/bond_main.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) commit 2bff369b23542ea22d0111aaa8e0b8208bf0dc96 Author: Jonathan Toppins Date: Wed Jun 8 14:14:56 2022 -0400 bonding: netlink error message support for options Add support for reporting errors via extack in both bond_newlink and bond_changelink. Instead of having to look in the kernel log for why an option was not correct just report the error to the user via the extack variable. What is currently reported today: ip link add bond0 type bond ip link set bond0 up ip link set bond0 type bond mode 4 RTNETLINK answers: Device or resource busy After this change: ip link add bond0 type bond ip link set bond0 up ip link set bond0 type bond mode 4 Error: unable to set option because the bond is up. Signed-off-by: Jonathan Toppins Acked-by: Jay Vosburgh Signed-off-by: Jakub Kicinski drivers/net/bonding/bond_netlink.c | 101 +++++++++++++++++++++++++------------ drivers/net/bonding/bond_options.c | 32 +++++++++--- include/net/bond_options.h | 3 +- 3 files changed, 95 insertions(+), 41 deletions(-) commit ce1d8e74f779ed0a35becdc81c3f9b3fa9603b13 Merge: 3000024ccc8e a4da4913a04d Author: Jakub Kicinski Date: Thu Jun 9 23:02:02 2022 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2022-06-08 Michal prevents setting of VF VLAN capabilities in switchdev mode and removes, not needed, specific switchdev VLAN operations. Karol converts u16 variables to unsigned int for GNSS calculations. Christophe Jaillet corrects the parameter order for a couple of devm_kcalloc() calls. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: Use correct order for the parameters of devm_kcalloc() ice: remove u16 arithmetic in ice_gnss ice: remove VLAN representor specific ops ice: don't set VF VLAN caps in switchdev ==================== Link: https://lore.kernel.org/r/20220608160757.2395729-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 3000024ccc8e080a4c1fd10bba3fd596f8117a7a Merge: f5f37fc9c4d5 fd9ea57f4e95 Author: Jakub Kicinski Date: Thu Jun 9 21:54:00 2022 -0700 Merge branch 'net-few-debug-refinements' Eric Dumazet says: ==================== net: few debug refinements Adopt DEBUG_NET_WARN_ON_ONCE() or WARN_ON_ONCE() in some places where it makes sense. Add checks in napi_consume_skb() and __napi_alloc_skb() Make sure napi_get_frags() does not use page fragments for skb->head. ==================== Link: https://lore.kernel.org/r/20220608160438.1342569-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit fd9ea57f4e9514f9d0f0dec505eefd99a8faa148 Author: Eric Dumazet Date: Wed Jun 8 09:04:38 2022 -0700 net: add napi_get_frags_check() helper This is a follow up of commit 3226b158e67c ("net: avoid 32 x truesize under-estimation for tiny skbs") When/if we increase MAX_SKB_FRAGS, we better make sure the old bug will not come back. Adding a check in napi_get_frags() would be costly, even if using DEBUG_NET_WARN_ON_ONCE(). Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski net/core/dev.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit ee2640df2393141a2975af726802b349d51713be Author: Eric Dumazet Date: Wed Jun 8 09:04:37 2022 -0700 net: add debug checks in napi_consume_skb and __napi_alloc_skb() Commit 6454eca81eae ("net: Use lockdep_assert_in_softirq() in napi_consume_skb()") added a check in napi_consume_skb() which is a bit weak. napi_consume_skb() and __napi_alloc_skb() should only be used from BH context, not from hard irq or nmi context, otherwise we could have races. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski net/core/skbuff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7890e2f09d437f79e67cd37bf3e820fa0cddf2be Author: Eric Dumazet Date: Wed Jun 8 09:04:36 2022 -0700 net: use DEBUG_NET_WARN_ON_ONCE() in skb_release_head_state() Remove this check from fast path unless CONFIG_DEBUG_NET=y Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski net/core/skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd29c67dbbbf97c8aa786a502977856d8eb9a73d Author: Eric Dumazet Date: Wed Jun 8 09:04:35 2022 -0700 af_unix: use DEBUG_NET_WARN_ON_ONCE() Replace four WARN_ON() that have not triggered recently with DEBUG_NET_WARN_ON_ONCE(). Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski net/unix/af_unix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c59f02f848672f92bcea90306240822239d68049 Author: Eric Dumazet Date: Wed Jun 8 09:04:34 2022 -0700 net: use WARN_ON_ONCE() in sk_stream_kill_queues() sk_stream_kill_queues() has three checks which have been useful to detect kernel bugs in the past. However they are potentially a problem because they could flood the syslog. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski net/core/stream.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3e7f2b8d30883f27ab1157bf3f23f30f1a07bf69 Author: Eric Dumazet Date: Wed Jun 8 09:04:33 2022 -0700 net: use WARN_ON_ONCE() in inet_sock_destruct() inet_sock_destruct() has four warnings which have been useful to point to kernel bugs in the past. However they are potentially a problem because they could flood the syslog. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski net/ipv4/af_inet.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 76458faeb285b1536abc3e75ea318564543269c3 Author: Eric Dumazet Date: Wed Jun 8 09:04:32 2022 -0700 net: use DEBUG_NET_WARN_ON_ONCE() in dev_loopback_xmit() One check in dev_loopback_xmit() has not caught issues in the past. Keep it for CONFIG_DEBUG_NET=y builds only. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63fbdd3c77ec216a91a87d22821d2ecd96669a5d Author: Eric Dumazet Date: Wed Jun 8 09:04:31 2022 -0700 net: use DEBUG_NET_WARN_ON_ONCE() in __release_sock() Check against skb dst in socket backlog has never triggered in past years. Keep the check omly for CONFIG_DEBUG_NET=y builds. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski net/core/sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5f37fc9c4d509bfbd914fbc966100053572e5f0 Merge: d62607c3fe45 9ec321aba2ea Author: Jakub Kicinski Date: Thu Jun 9 21:53:15 2022 -0700 Merge branch 'net-adopt-u64_stats_t-type' Eric Dumazet says: ==================== net: adopt u64_stats_t type While KCSAN has not raised any reports yet, we should address the potential load/store tearing problem happening with per cpu stats. This series is not exhaustive, but hopefully a step in the right direction. ==================== Link: https://lore.kernel.org/r/20220608154640.1235958-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit 9ec321aba2eaca109139a2a67c65ede7f07bd8ec Author: Eric Dumazet Date: Wed Jun 8 08:46:40 2022 -0700 team: adopt u64_stats_t As explained in commit 316580b69d0a ("u64_stats: provide u64_stats_t type") we should use u64_stats_t and related accessors to avoid load/store tearing. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski drivers/net/team/team.c | 26 +++++++++++++------------- include/linux/if_team.h | 10 +++++----- 2 files changed, 18 insertions(+), 18 deletions(-) commit c6cce71e746800097ad2ee71607d53dc723ad7ad Author: Eric Dumazet Date: Wed Jun 8 08:46:39 2022 -0700 drop_monitor: adopt u64_stats_t As explained in commit 316580b69d0a ("u64_stats: provide u64_stats_t type") we should use u64_stats_t and related accessors to avoid load/store tearing. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski net/core/drop_monitor.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 958751e0807d5b2316cc4c7c2834ba9a0fe1b9e8 Author: Eric Dumazet Date: Wed Jun 8 08:46:38 2022 -0700 devlink: adopt u64_stats_t As explained in commit 316580b69d0a ("u64_stats: provide u64_stats_t type") we should use u64_stats_t and related accessors to avoid load/store tearing. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski net/core/devlink.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 9962acefbcb92736c268aafe5f52200948f60f3e Author: Eric Dumazet Date: Wed Jun 8 08:46:37 2022 -0700 net: adopt u64_stats_t in struct pcpu_sw_netstats As explained in commit 316580b69d0a ("u64_stats: provide u64_stats_t type") we should use u64_stats_t and related accessors to avoid load/store tearing. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski drivers/net/macsec.c | 8 ++++---- drivers/net/usb/usbnet.c | 8 ++++---- drivers/net/vxlan/vxlan_core.c | 8 ++++---- include/linux/netdevice.h | 16 ++++++++-------- include/net/ip_tunnels.h | 4 ++-- net/bridge/br_netlink.c | 8 ++++---- net/bridge/br_vlan.c | 36 ++++++++++++++++++++---------------- net/core/dev.c | 18 +++++++++--------- net/dsa/slave.c | 8 ++++---- 9 files changed, 59 insertions(+), 55 deletions(-) commit eeb15885ca30669b354ac78eebb212743177ba4b Author: Eric Dumazet Date: Wed Jun 8 08:46:36 2022 -0700 wireguard: receive: use dev_sw_netstats_rx_add() We have a convenient helper, let's use it. This will make the following patch easier to review and smaller. Signed-off-by: Eric Dumazet Reviewed-by: Jason A. Donenfeld Signed-off-by: Jakub Kicinski drivers/net/wireguard/receive.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit afd2051b18404640a116fd3bb2460da214ccbda4 Author: Eric Dumazet Date: Wed Jun 8 08:46:35 2022 -0700 ip6_tunnel: use dev_sw_netstats_rx_add() We have a convenient helper, let's use it. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski net/ipv6/ip6_tunnel.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 3a960ca7f6e538fba63e3d47c21eeb6bbd7289dd Author: Eric Dumazet Date: Wed Jun 8 08:46:34 2022 -0700 sit: use dev_sw_netstats_rx_add() We have a convenient helper, let's use it. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski net/ipv6/sit.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 5665f48ef309d0189e97353a294b54af5d4a726c Author: Eric Dumazet Date: Wed Jun 8 08:46:33 2022 -0700 ipvlan: adopt u64_stats_t As explained in commit 316580b69d0a ("u64_stats: provide u64_stats_t type") we should use u64_stats_t and related accessors to avoid load/store tearing. Add READ_ONCE() when reading rx_errs & tx_drps. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski drivers/net/ipvlan/ipvlan.h | 10 +++++----- drivers/net/ipvlan/ipvlan_core.c | 6 +++--- drivers/net/ipvlan/ipvlan_main.c | 18 +++++++++--------- 3 files changed, 17 insertions(+), 17 deletions(-) commit 09cca53c1656960c38c04bb12da30f61952ca660 Author: Eric Dumazet Date: Wed Jun 8 08:46:32 2022 -0700 vlan: adopt u64_stats_t As explained in commit 316580b69d0a ("u64_stats: provide u64_stats_t type") we should use u64_stats_t and related accessors to avoid load/store tearing. Add READ_ONCE() when reading rx_errors & tx_dropped. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski drivers/net/macvlan.c | 18 +++++++++--------- include/linux/if_macvlan.h | 6 +++--- include/linux/if_vlan.h | 10 +++++----- net/8021q/vlan_core.c | 6 +++--- net/8021q/vlan_dev.c | 18 +++++++++--------- 5 files changed, 29 insertions(+), 29 deletions(-) commit d62607c3fe45911b2331fac073355a8c914bbde2 Author: Jakub Kicinski Date: Tue Jun 7 21:39:55 2022 -0700 net: rename reference+tracking helpers Netdev reference helpers have a dev_ prefix for historic reasons. Renaming the old helpers would be too much churn but we can rename the tracking ones which are relatively recent and should be the default for new code. Rename: dev_hold_track() -> netdev_hold() dev_put_track() -> netdev_put() dev_replace_track() -> netdev_ref_replace() Link: https://lore.kernel.org/r/20220608043955.919359-1-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/eql.c | 4 ++-- drivers/net/macsec.c | 4 ++-- drivers/net/macvlan.c | 4 ++-- drivers/net/netconsole.c | 2 +- drivers/net/vrf.c | 8 ++++---- include/linux/netdevice.h | 24 ++++++++++++------------ include/net/xfrm.h | 2 +- net/8021q/vlan_dev.c | 4 ++-- net/ax25/af_ax25.c | 7 ++++--- net/ax25/ax25_dev.c | 6 +++--- net/bridge/br_if.c | 10 +++++----- net/core/dev.c | 10 +++++----- net/core/dev_ioctl.c | 4 ++-- net/core/drop_monitor.c | 5 +++-- net/core/dst.c | 8 ++++---- net/core/failover.c | 4 ++-- net/core/link_watch.c | 2 +- net/core/neighbour.c | 18 +++++++++--------- net/core/net-sysfs.c | 8 ++++---- net/core/netpoll.c | 2 +- net/core/pktgen.c | 6 +++--- net/ethtool/ioctl.c | 4 ++-- net/ethtool/netlink.c | 6 +++--- net/ethtool/netlink.h | 2 +- net/ipv4/devinet.c | 4 ++-- net/ipv4/fib_semantics.c | 11 ++++++----- net/ipv4/ipmr.c | 2 +- net/ipv4/route.c | 7 +++---- net/ipv4/xfrm4_policy.c | 2 +- net/ipv6/addrconf.c | 4 ++-- net/ipv6/addrconf_core.c | 2 +- net/ipv6/ip6_gre.c | 8 ++++---- net/ipv6/ip6_tunnel.c | 4 ++-- net/ipv6/ip6_vti.c | 4 ++-- net/ipv6/ip6mr.c | 2 +- net/ipv6/route.c | 10 +++++----- net/ipv6/sit.c | 4 ++-- net/ipv6/xfrm6_policy.c | 4 ++-- net/llc/af_llc.c | 2 +- net/openvswitch/vport-netdev.c | 6 +++--- net/packet/af_packet.c | 12 ++++++------ net/sched/act_mirred.c | 6 +++--- net/sched/sch_api.c | 2 +- net/sched/sch_generic.c | 11 ++++++----- net/smc/smc_pnet.c | 7 ++++--- net/switchdev/switchdev.c | 4 ++-- net/tipc/bearer.c | 4 ++-- net/xfrm/xfrm_device.c | 2 +- 48 files changed, 141 insertions(+), 137 deletions(-) commit cfed691b80dce32b62634b1d7f92a661a3b03e4f Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:57 2022 +0000 platform/chrome: cros_ec_proto: handle empty payload in getting wake mask cros_ec_get_host_event_wake_mask() expects to receive sizeof(struct ec_response_host_event_mask) from send_command(). The payload is valid only if the return value is positive. Return -EPROTO if send_command() returns 0 in cros_ec_get_host_event_wake_mask(). Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-22-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit e43772294246d9c96ba31446d3dc27e3573a5473 Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:56 2022 +0000 platform/chrome: cros_ec_proto: add Kunit test for getting wake mask cros_ec_get_host_event_wake_mask() expects to receive sizeof(struct ec_response_host_event_mask) from send_command(). The payload is valid only if the return value is positive. Add Kunit tests for returning 0 from send_command() in cros_ec_get_host_event_wake_mask(). Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-21-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto_test.c | 128 +++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) commit d65da5f9bb0a5b6f2115bc0e5fcf65c0867fef17 Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:55 2022 +0000 platform/chrome: cros_ec_proto: return 0 on getting wake mask success cros_ec_get_host_event_wake_mask() used to return value from send_command() which is number of bytes for input payload on success (i.e. sizeof(struct ec_response_host_event_mask)). However, the callers don't need to know how many bytes are available. Don't return number of available bytes. Instead, return 0 on success; otherwise, negative integers on error. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-20-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit aac29b04dc3fdc5b95bca31413d90dbe8c1ae33d Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:54 2022 +0000 platform/chrome: cros_ec_proto: handle empty payload in getting cmd mask cros_ec_get_host_command_version_mask() expects to receive sizeof(struct ec_response_get_cmd_versions) from send_command(). The payload is valid only if the return value is positive. Return -EPROTO if send_command() returns 0 in cros_ec_get_host_command_version_mask(). Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-19-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8120febafccb01eeea8c077130be6f6c1e46bb2f Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:53 2022 +0000 platform/chrome: cros_ec_proto: add Kunit tests for getting cmd mask cros_ec_get_host_command_version_mask() expects to receive sizeof(struct ec_response_get_cmd_versions) from send_command(). The payload is valid only if the return value is positive. Add Kunit tests for returning 0 from send_command() in cros_ec_get_host_command_version_mask(). Note that because the 2 cros_ec_get_host_command_version_mask() use the same `ver_mask`. cros_ec_proto_test_query_all_no_host_sleep_return0() polluates the `ver_mask` and returns 0 on the second send_command() to make sure the second cros_ec_get_host_command_version_mask() doesn't take the garbage from the previous call. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-18-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto_test.c | 197 +++++++++++++++++++++++++++ 1 file changed, 197 insertions(+) commit ec513489933528e179bc6f98d47e6ea86c271a22 Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:52 2022 +0000 platform/chrome: cros_ec_proto: check `msg->result` in getting cmd mask cros_ec_get_host_command_version_mask() should check if EC wasn't happy by checking `msg->result`. Use cros_ec_map_error() and return the error code if any. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-17-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit a8f77c63baece8c47599bc418d3c2c138ca7efaf Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:51 2022 +0000 platform/chrome: cros_ec_proto: add Kunit test for getting cmd mask error cros_ec_query_all() uses cros_ec_get_host_command_version_mask() to query the supported MKBP version; cros_ec_get_host_command_version_mask() uses send_command() for transferring the host command. Returning >=0 from send_command() only denotes the transfer was success. cros_ec_get_host_command_version_mask() should check if EC wasn't happy by checking `msg->result`. Add a Kunit test for returning error in `msg->result` in cros_ec_get_host_command_version_mask(). For the case, cros_ec_query_all() should find the EC device doesn't support MKBP. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-16-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto_test.c | 89 ++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) commit f91183aa459a9a06eae6843cde2fbe2d97db4f96 Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:50 2022 +0000 platform/chrome: cros_ec_proto: return 0 on getting cmd mask success cros_ec_get_host_command_version_mask() used to return value from send_command() which is number of available bytes for input payload on success (i.e. sizeof(struct ec_response_get_cmd_versions)). However, the callers don't need to know how many bytes are available. Don't return number of available bytes. Instead, return 0 on success; otherwise, negative integers on error. Also remove the unneeded `ver_mask` initialization as the callers should take it only if cros_ec_get_host_command_version_mask() returns 0. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-15-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit b36f0643ff14a2fb281b105418e4e73c9d7c11d0 Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:49 2022 +0000 platform/chrome: cros_ec_proto: don't show MKBP version if unsupported It wrongly showed the following message when it doesn't support MKBP: "MKBP support version 4294967295". Fix it. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-14-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d394ab5c062a7701b9af04e012d3a4c1e1447f47 Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:48 2022 +0000 platform/chrome: cros_ec_proto: handle empty payload in getting info legacy cros_ec_get_proto_info_legacy() expects to receive sizeof(struct ec_response_hello) from send_command(). The payload is valid only if the return value is positive. Return -EPROTO if send_command() returns 0 in cros_ec_get_proto_info_legacy(). Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-13-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit cce5d551809c54e4067933e900239f58281390aa Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:47 2022 +0000 platform/chrome: cros_ec_proto: add Kunit test for getting legacy info cros_ec_get_proto_info_legacy() expects to receive sizeof(struct ec_response_hello) from send_command(). The payload is valid only if the return value is positive. Add a Kunit test for returning 0 from send_command() in cros_ec_get_proto_info_legacy(). Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-12-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto_test.c | 49 ++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit a88f79666d14836215058f38e2ac4f1fea61a53e Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:46 2022 +0000 platform/chrome: cros_ec_proto: separate cros_ec_get_proto_info_legacy() Rename cros_ec_host_command_proto_query_v2() to cros_ec_get_proto_info_legacy() and make it responsible for setting `ec_dev` fields for EC protocol v2. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-11-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 72 +++++++++++++--------------- drivers/platform/chrome/cros_ec_proto_test.c | 22 ++++----- 2 files changed, 44 insertions(+), 50 deletions(-) commit 878c36f6caa45d6a6234465fb16da07fc639f51d Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:45 2022 +0000 platform/chrome: cros_ec_proto: handle empty payload in getting proto info cros_ec_get_proto_info() expects to receive sizeof(struct ec_response_get_protocol_info) from send_command(). The payload is valid only if the return value is positive. Return -EPROTO if send_command() returns 0 in cros_ec_get_proto_info(). Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-10-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3e97581ed9a24657cbfabaab215c9a646d94b351 Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:44 2022 +0000 platform/chrome: cros_ec_proto: add Kunit tests for getting proto info cros_ec_get_proto_info() expects to receive sizeof(struct ec_response_get_protocol_info) from send_command(). The payload is valid only if the return value is positive. Add Kunit tests for returning 0 from send_command() in cros_ec_get_proto_info(). Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-9-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto_test.c | 132 +++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) commit b4d0836e81603600a8db7777b588fe020abf4cf8 Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:43 2022 +0000 platform/chrome: cros_ec_proto: separate cros_ec_get_proto_info() Rename cros_ec_host_command_proto_query() to cros_ec_get_proto_info() and make it responsible for setting `ec_dev` fields according to the response protocol info. Also make cros_ec_get_host_event_wake_mask() allocate its own message buffer. It was lucky that size of `struct ec_response_host_event_mask` is less than `struct ec_response_get_protocol_info`. Thus, the buffer wasn't overflow. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-8-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 134 +++++++++++++-------------- drivers/platform/chrome/cros_ec_proto_test.c | 56 +++++------ 2 files changed, 93 insertions(+), 97 deletions(-) commit 93bea2faed630bd014916fd2e7ab16a79ee1b46a Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:42 2022 +0000 platform/chrome: cros_ec_proto: use cros_ec_map_error() Use cros_ec_map_error() in cros_ec_get_host_event_wake_mask(). The behavior of cros_ec_get_host_event_wake_mask() slightly changed. It is acceptable because the caller only needs it returns negative integers for indicating errors. Especially, the EC_RES_INVALID_COMMAND still maps to -EOPNOTSUPP. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-7-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 8e3991610ba5c11003d8c228b280cc007c2a6177 Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:41 2022 +0000 platform/chrome: cros_ec_proto: remove redundant NULL check send_command() already checks if `ec_dev->pkt_xfer` is NULL. Remove the redundant check. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-6-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 3 --- 1 file changed, 3 deletions(-) commit e796c0c4b1ada2e038b22215d38ddc97153de053 Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:40 2022 +0000 platform/chrome: cros_ec_proto: assign buffer size from protocol info `din_size` is calculated from `ec_dev->max_response`. `ec_dev->max_response` is further calculated from the protocol info. To make it clear, assign `din_size` and `dout_size` from protocol info directly. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-5-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 3db0c9e5de7bd9dbe52580eb9752b2b3049e38da Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:39 2022 +0000 platform/chrome: use macros for passthru indexes Move passthru indexes for EC and PD devices to common header. Also use them instead of literal constants. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-4-tzungbi@kernel.org drivers/platform/chrome/cros_ec.c | 3 --- drivers/platform/chrome/cros_ec_proto.c | 6 +++--- drivers/platform/chrome/cros_ec_proto_test.c | 15 ++++++++++----- drivers/platform/chrome/cros_ec_trace.h | 8 ++++---- include/linux/platform_data/cros_ec_proto.h | 3 +++ 5 files changed, 20 insertions(+), 15 deletions(-) commit b99eb596efbd2aa138dad3dd5b6705b2e8c42c36 Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:38 2022 +0000 platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_query_all() cros_ec_query_all() sends multiple host commands to EC for querying supported protocols and settings. Add required mock for interacting with cros_ec_query_all() and Kunit tests. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-3-tzungbi@kernel.org drivers/platform/chrome/Kconfig | 6 + drivers/platform/chrome/Makefile | 1 + drivers/platform/chrome/cros_ec_proto_test.c | 802 +++++++++++++++++++++++++++ drivers/platform/chrome/cros_kunit_util.c | 98 ++++ drivers/platform/chrome/cros_kunit_util.h | 36 ++ 5 files changed, 943 insertions(+) commit ea7f0f777d28db6e500a05836f2a9d467c7012de Author: Tzung-Bi Shih Date: Thu Jun 9 08:49:37 2022 +0000 platform/chrome: cros_ec_commands: fix compile errors Fix compile errors when including cros_ec_commands.h solely. 1. cros_ec_commands.h:587:9: error: unknown type name 'uint8_t' 587 | uint8_t flags; | ^~~~~~~ 2. cros_ec_commands.h:1105:43: error: implicit declaration of function 'BIT' 1105 | EC_COMMS_STATUS_PROCESSING = BIT(0), | ^~~ Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220609084957.3684698-2-tzungbi@kernel.org include/linux/platform_data/cros_ec_commands.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 40f58143745eaabc68ef44b068642ca3b38d23a6 Author: Tzung-Bi Shih Date: Mon May 23 17:08:22 2022 +0800 platform/chrome: cros_kbd_led_backlight: support EC PWM backend EC PWM backend uses EC_CMD_PWM_SET_KEYBOARD_BACKLIGHT and EC_CMD_PWM_GET_KEYBOARD_BACKLIGHT for setting and getting the brightness respectively. Signed-off-by: Tzung-Bi Shih Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20220523090822.3035189-6-tzungbi@kernel.org drivers/platform/chrome/Kconfig | 2 +- drivers/platform/chrome/cros_kbd_led_backlight.c | 113 ++++++++++++++++++++--- 2 files changed, 99 insertions(+), 16 deletions(-) commit fd1e8054ff6985cfcbdf66a6de88cf1c47a14f46 Author: Tzung-Bi Shih Date: Mon May 23 17:08:21 2022 +0800 platform/chrome: cros_kbd_led_backlight: support OF match For letting device tree based machines to use the driver, support OF match. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20220523090822.3035189-5-tzungbi@kernel.org drivers/platform/chrome/cros_kbd_led_backlight.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 20f370efddb58c497588a51df889dc784055733f Author: Tzung-Bi Shih Date: Mon May 23 17:08:20 2022 +0800 dt-bindings: add google,cros-kbd-led-backlight Acked-by: Rob Herring Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220523090822.3035189-4-tzungbi@kernel.org .../chrome/google,cros-kbd-led-backlight.yaml | 35 ++++++++++++++++++++++ .../devicetree/bindings/mfd/google,cros-ec.yaml | 3 ++ 2 files changed, 38 insertions(+) commit 6b1e5ba39c44442c5ca115d89056823e064f1796 Author: Tzung-Bi Shih Date: Mon May 23 17:08:19 2022 +0800 platform/chrome: cros_kbd_led_backlight: separate ACPI backend cros_kbd_led_backlight uses ACPI_KEYBOARD_BACKLIGHT_WRITE and ACPI_KEYBOARD_BACKLIGHT_READ for setting and getting the brightness respectively. Separate ACPI operations for preparing the driver to support other backends. Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220523090822.3035189-3-tzungbi@kernel.org drivers/platform/chrome/cros_kbd_led_backlight.c | 82 ++++++++++++++++++++---- 1 file changed, 69 insertions(+), 13 deletions(-) commit 337eac8f8499df7aa5a15e53c92d7242e97b4212 Author: Tzung-Bi Shih Date: Mon May 23 17:08:18 2022 +0800 platform/chrome: cros_kbd_led_backlight: sort headers alphabetically To be neat and reduce conflict possibility, sort the headers alphabetically. Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220523090822.3035189-2-tzungbi@kernel.org drivers/platform/chrome/cros_kbd_led_backlight.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a98a62e456e25048e8d64ec452a1c713169d3517 Merge: 263efe85a4b6 825464e79db4 Author: Jakub Kicinski Date: Thu Jun 9 16:38:15 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net No conflicts. Signed-off-by: Jakub Kicinski commit 1b83ad93ecfd30ca33c6b16414e2f440fe88dfaa Author: Matthias Brugger Date: Mon May 23 12:23:39 2022 +0200 clk: mediatek: Delete MT8192 msdc gate The msdc gate is part of the MMC driver. Delete the not used code. Signed-off-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Miles Chen Link: https://lore.kernel.org/r/20220523102339.21927-3-matthias.bgg@kernel.org Reviewed-by: Chen-Yu Tsai Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt8192-msdc.c | 21 --------------------- 1 file changed, 21 deletions(-) commit 1be3b43a5828839697ee53ab3273ecc71ceeaffe Author: Matthias Brugger Date: Mon May 23 12:23:38 2022 +0200 dt-bindings: ARM: Mediatek: Remove msdc binding of MT8192 clock The code controlling msdc clock gate was moved inthe the consumer, the MMC driver. This node did never represent a working implementation of any peripheral. It was just a lonely clock gate that wasn't used. Delete the binding description of this node. Signed-off-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Miles Chen Link: https://lore.kernel.org/r/20220523102339.21927-2-matthias.bgg@kernel.org Acked-by: Rob Herring Reviewed-by: Chen-Yu Tsai Signed-off-by: Stephen Boyd .../devicetree/bindings/arm/mediatek/mediatek,mt8192-clock.yaml | 8 -------- 1 file changed, 8 deletions(-) commit b5b3edb5a3621ae84fec0ebf4ccfe8024b0382aa Author: Samuel Holland Date: Tue May 31 00:17:42 2022 -0500 dt-bindings: clock: fixed-factor: Drop Allwinner A10 compatible This compatible is part of the legacy sunxi clock support, and has not been used since commit 6b48644b1d29 ("ARM: gr8: Convert to CCU") in October 2016. Now that the code for this compatible has been removed, let's drop the compatible. Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20220531051742.43273-2-samuel@sholland.org Acked-by: Rob Herring Signed-off-by: Stephen Boyd Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml | 1 - 1 file changed, 1 deletion(-) commit c33ed61249dc54e7cf2137c04462883560375b77 Author: Samuel Holland Date: Tue May 31 00:17:41 2022 -0500 clk: fixed: Remove Allwinner A10 special-case logic This compatible is part of the legacy sunxi clock support, and has not been used since commit 6b48644b1d29 ("ARM: gr8: Convert to CCU") in October 2016. Since supporting this compatible adds some overhead to generic clock code, let's clean it up. Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20220531051742.43273-1-samuel@sholland.org Signed-off-by: Stephen Boyd drivers/clk/clk-fixed-factor.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 38a85b9d95c7a7c2bf12a0e73ef974136318f15f Author: Krzysztof Kozlowski Date: Tue Jun 7 19:18:36 2022 +0200 dt-bindings: sram: qcom,imem: add IMEM memory region Add bindings for IMEM memory region (like SRAM) used on several Qualcomm SoCs. In the downstream (vendor) tree, it comes with several children used for debugging purposes. The upstreamed parts are much smaller - just image loader and syscon reboot. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220607171848.535128-2-krzysztof.kozlowski@linaro.org .../devicetree/bindings/sram/qcom,imem.yaml | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit ae5a8983414ae67db27bc9f1c38919db70c26b0e Author: Krzysztof Kozlowski Date: Tue Jun 7 19:18:35 2022 +0200 dt-bindings: sram: qcom,ocmem: cleanup example coding style Fix the indentation in the OCMEM example and use generic node name - sram - to reflect the type of the device. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220607171848.535128-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/sram/qcom,ocmem.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e08f8a118514c94c8cf78aa1dcf5f26f7b6918ba Author: Linus Walleij Date: Fri Apr 15 22:36:38 2022 +0200 power: supply: ab8500: Exit maintenance if too low voltage The maintenance charging is supposedly designed such that the maintenance current compensates for the battery discharge curve, and as the charging progress from CC/CV -> maintenance A -> maintenance B states, we end up on a reasonable voltage to restart ordinary CC/CV charging after the safety timer at the maintenance B state exits. However: old batteries discharge quicker, and in an old battery we might not get to the expiration of the maintenance B timer before the battery is completely depleted and the system powers off with an empty battery. This is hardly the desire of anyone leaving their phone in the charger for a few days! Introduce a second clause in both maintenance states such that we exit the state and return to ordinary CC/CV charging if the voltage drops below charge_restart_voltage_uv or 95% if this is not defined for the battery. Signed-off-by: Linus Walleij Reviewed-by: Matti Vaittinen Signed-off-by: Sebastian Reichel drivers/power/supply/ab8500_chargalg.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 6aa35ab9db2c9ca141ba9d64a2ad95b73dbf90e3 Author: Linus Walleij Date: Fri Apr 15 22:36:37 2022 +0200 power: supply: ab8500: Respect charge_restart_voltage_uv The battery info contains a voltage indicating when the voltage is so low that it is time to restart the CC/CV charging. Make the AB8500 respect and prioritize this setting over the hardcoded 95% threshold. Break out the check into its own function and add some safeguards so we do not run into unpredictable side effects. Signed-off-by: Linus Walleij Reviewed-by: Matti Vaittinen Signed-off-by: Sebastian Reichel drivers/power/supply/ab8500_chargalg.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit 23c46bab922b856b585a5f49413f74a9a7b2400d Author: Xiaohui Zhang Date: Tue Jun 7 23:03:44 2022 +0800 power: supply: cros_peripheral: Use struct_size() helper in kzalloc() Similar to the handling of cros_usbpd_charger_ec_command in commit 441d38c60fbe ("power: supply: cros_usbpd: Use struct_size() helper in kzalloc()"), we thought a patch might be needed here as well. Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows that, in the worst scenario, could lead to heap overflows. Signed-off-by: Xiaohui Zhang Signed-off-by: Sebastian Reichel drivers/power/supply/cros_peripheral_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 260b5c694bd41fd53b1aa21fbea369568c7b5a4a Author: Jukka Rissanen Date: Fri May 27 10:56:25 2022 +0300 MAINTAINERS: Remove Jukka Rissanen as 6lowpan maintainer I no longer work on this so better update the file. Signed-off-by: Jukka Rissanen Acked-by: Alexander Aring Acked-by: Marcel Holtmann Link: https://lore.kernel.org/r/20220527075625.9693-1-jukka.rissanen@linux.intel.com Signed-off-by: Stefan Schmidt MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit f3de6f4eccddfcaf3f8b3674ab57a0646b572650 Author: Alexander Aring Date: Wed Apr 27 23:05:34 2022 -0400 net: 6lowpan: constify lowpan_nhc structures This patch constify the lowpan_nhc declarations. Since we drop the rb node datastructure there is no need for runtime manipulation of this structure. Signed-off-by: Alexander Aring Reviewed-by: Stefan Schmidt Acked-by: Jukka Rissanen Link: https://lore.kernel.org/r/20220428030534.3220410-4-aahringo@redhat.com Signed-off-by: Stefan Schmidt net/6lowpan/nhc.c | 16 ++++++++-------- net/6lowpan/nhc.h | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) commit 31264f9563e6c2b2f895582e0632881cbc197af9 Author: Alexander Aring Date: Wed Apr 27 23:05:33 2022 -0400 net: 6lowpan: use array for find nhc id This patch will remove the complete overengineered and overthinking rb data structure for looking up the nhc by nhcid. Instead we using the existing nhc next header array and iterate over it. It works now for 1 byte values only. However there are only 1 byte nhc id values currently supported and IANA also does not specify large than 1 byte values yet. If there are 2 byte values for nhc ids specified we can revisit this data structure and add support for it. Signed-off-by: Alexander Aring Reviewed-by: Stefan Schmidt Acked-by: Jukka Rissanen Link: https://lore.kernel.org/r/20220428030534.3220410-3-aahringo@redhat.com Signed-off-by: Stefan Schmidt net/6lowpan/nhc.c | 91 ++++++----------------------------------- net/6lowpan/nhc.h | 28 ++++--------- net/6lowpan/nhc_dest.c | 9 +--- net/6lowpan/nhc_fragment.c | 9 +--- net/6lowpan/nhc_ghc_ext_dest.c | 9 +--- net/6lowpan/nhc_ghc_ext_frag.c | 11 +---- net/6lowpan/nhc_ghc_ext_hop.c | 9 +--- net/6lowpan/nhc_ghc_ext_route.c | 9 +--- net/6lowpan/nhc_ghc_icmpv6.c | 9 +--- net/6lowpan/nhc_ghc_udp.c | 9 +--- net/6lowpan/nhc_hop.c | 9 +--- net/6lowpan/nhc_ipv6.c | 11 +---- net/6lowpan/nhc_mobility.c | 9 +--- net/6lowpan/nhc_routing.c | 9 +--- net/6lowpan/nhc_udp.c | 9 +--- 15 files changed, 37 insertions(+), 203 deletions(-) commit eb9edf4366a2364b626c000b9ac720b0c13a551c Author: Alexander Aring Date: Wed Apr 27 23:05:32 2022 -0400 net: 6lowpan: remove const from scalars The keyword const makes no sense for scalar types inside the lowpan_nhc structure. Most compilers will ignore it so we remove the keyword from the scalar types. Signed-off-by: Alexander Aring Reviewed-by: Stefan Schmidt Acked-by: Jukka Rissanen Link: https://lore.kernel.org/r/20220428030534.3220410-2-aahringo@redhat.com Signed-off-by: Stefan Schmidt net/6lowpan/nhc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f7ca2d8c1b6d280a480baf7289c053754f98b44b Author: Xiang wangx Date: Sat Jun 4 22:18:11 2022 +0800 power: supply: bq24257: Fix syntax error in comments Delete the redundant word 'is'. Signed-off-by: Xiang wangx Signed-off-by: Sebastian Reichel drivers/power/supply/bq24257_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c57c099f442acab13129c9e15ad2a0c31151c98 Author: José Roberto de Souza Date: Wed Jun 8 13:33:44 2022 -0700 drm/i915/display: Fix handling of enable_psr parameter Commit 3cf050762534 ("drm/i915/bios: Split VBT data into per-panel vs. global parts") cause PSR to be disabled when enable_psr has the default value and there is at least one DP port that do not supports PSR. That was happening because intel_psr_init() is called for every DP port and then enable_psr is globaly set to 0 based on the PSR support of the DP port. Here dropping the enable_psr overwritten and using the VBT PSR value when enable_psr is set as default. Fixes: 3cf050762534 ("drm/i915/bios: Split VBT data into per-panel vs. global parts") Cc: Ville Syrjälä Cc: Jani Nikula Cc: Jouni Högander Cc: Mika Kahola Signed-off-by: José Roberto de Souza Reviewed-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20220608203344.513082-1-jose.souza@intel.com drivers/gpu/drm/i915/display/intel_psr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit afd306a65cedb9589564bdb23a0c368abc4215fd Author: Pavan Chebbi Date: Thu Jun 9 13:41:47 2022 -0400 PCI: Add ACS quirk for Broadcom BCM5750x NICs The Broadcom BCM5750x NICs may be multi-function devices. They do not advertise ACS capability. Peer-to-peer transactions are not possible between the individual functions, so it is safe to treat them as fully isolated. Add an ACS quirk for these devices so the functions can be in independent IOMMU groups and attached individually to userspace applications using VFIO. Link: https://lore.kernel.org/r/1654796507-28610-1-git-send-email-michael.chan@broadcom.com Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 3 +++ 1 file changed, 3 insertions(+) commit 55b350529e799f8a1a1636dea7df1749cb78ce39 Author: Xiang wangx Date: Sat Jun 4 12:12:53 2022 +0800 ACPI: APEI: Fix double word in a comment Delete the redundant word 'the'. Signed-off-by: Xiang wangx [ rjw: New subject ] Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/apei-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 409dfdcaffb266acfc1f33529a26b1443c9332d4 Author: Guilherme G. Piccoli Date: Tue Jun 7 19:24:58 2022 -0300 ACPI: processor/idle: Annotate more functions to live in cpuidle section Commit 6727ad9e206c ("nmi_backtrace: generate one-line reports for idle cpus") introduced a new text section called cpuidle; with that, we have a mechanism to add idling functions in such section and skip them from nmi_backtrace output, since they're useless and potentially flooding for such report. Happens that inlining might cause some real idle functions to end-up outside of such section; this is currently the case of ACPI processor_idle driver; the functions acpi_idle_enter_* do inline acpi_idle_do_entry(), hence they stay out of the cpuidle section. Fix that by marking such functions to also live in the cpuidle section. Fixes: 6727ad9e206c ("nmi_backtrace: generate one-line reports for idle cpus") Signed-off-by: Guilherme G. Piccoli Signed-off-by: Rafael J. Wysocki drivers/acpi/processor_idle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b770583ba6028e8cbd2d49dad9eff63cba3d6fef Author: Yang Li Date: Wed May 4 21:52:14 2022 +0800 power: supply: Remove unnecessary print function dev_err() The print function dev_err() is redundant because platform_get_irq() already prints an error. Eliminate the follow coccicheck warning: ./drivers/power/supply/goldfish_battery.c:225:2-9: line 225 is redundant because platform_get_irq() already prints an error Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Sebastian Reichel drivers/power/supply/goldfish_battery.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e991c2ee65e9e42da9c1cf599b4c3ddcf536e715 Author: Dmitry Baryshkov Date: Wed Jun 8 00:32:03 2022 +0300 phy: qcom-qmp-usb: use bulk reset_control API Switch qcom-qmp-usb driver to use reset_control_bulk_assert / _deassert functions rather than hardcoding the loops in the driver itself. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-31-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 49 ++++++++++++--------------------- 1 file changed, 18 insertions(+), 31 deletions(-) commit ccac084746dd75ea4a553b80661788df778187e8 Author: Dmitry Baryshkov Date: Wed Jun 8 00:32:02 2022 +0300 phy: qcom-qmp-pcie-msm8996: use bulk reset_control API Switch qcom-qmp-pcie-msm8996 driver to use reset_control_bulk_assert / _deassert functions rather than hardcoding the loops in the driver itself. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-30-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 49 +++++++++--------------- 1 file changed, 18 insertions(+), 31 deletions(-) commit 189ac6b8dd36e1c1927414ac301a68744ad3f495 Author: Dmitry Baryshkov Date: Wed Jun 8 00:32:01 2022 +0300 phy: qcom-qmp-pcie: use bulk reset_control API Switch qcom-qmp-pcie driver to use reset_control_bulk_assert / _deassert functions rather than hardcoding the loops in the driver itself. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-29-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 49 ++++++++++++-------------------- 1 file changed, 18 insertions(+), 31 deletions(-) commit 1de24861aff3e2b2574c548613184da782496374 Author: Dmitry Baryshkov Date: Wed Jun 8 00:32:00 2022 +0300 phy: qcom-qmp-combo: use bulk reset_control API Switch qcom-qmp-combo driver to use reset_control_bulk_assert / _deassert functions rather than hardcoding the loops in the driver itself. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-28-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 49 ++++++++++++------------------- 1 file changed, 18 insertions(+), 31 deletions(-) commit 65753f38f5309364849394cb015e5e2cc943e80b Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:59 2022 +0300 phy: qcom-qmp-usb: drop multi-PHY support Each USB QMP PHY device provides just a single UFS PHY. Drop support for handling multiple child PHYs. Use phy->init_count to check if the PHY was initialized rather than duplicating this count. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-27-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 37 +++++---------------------------- 1 file changed, 5 insertions(+), 32 deletions(-) commit 1da7115efa4a9a48df69aed70b757372b2cdb44c Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:58 2022 +0300 phy: qcom-qmp-ufs: drop multi-PHY support Each UFS QMP PHY device provides just a single UFS PHY. Drop support for handling multiple child PHYs. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-26-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) commit 1239fd711fe998dc8d82843b66c93a7c90f90c72 Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:57 2022 +0300 phy: qcom-qmp-pcie: drop multi-PHY support Each PCIe QMP PHY device provides just a single PCIe PHY. Drop support for handling multiple child PHYs. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-25-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 33 +++----------------------------- 1 file changed, 3 insertions(+), 30 deletions(-) commit faf83af5d59498509eb84015453073fd5e85231e Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:56 2022 +0300 phy: qcom-qmp-usb: cleanup the driver Remove the conditionals and options that are not used by any of USB PHY devices. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-24-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 214 ++------------------------------ 1 file changed, 11 insertions(+), 203 deletions(-) commit 3e1865ba389181568a3b3e268e203eee4cb9dd12 Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:55 2022 +0300 phy: qcom-qmp-ufs: cleanup the driver Remove the conditionals and options that are not used by any of UFS PHY devices. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-23-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 293 ++------------------------------ 1 file changed, 12 insertions(+), 281 deletions(-) commit 4856865b0dec88570edfbdf3e9c3b551923c0768 Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:54 2022 +0300 phy: qcom-qmp-pcie-msm8996: cleanup the driver Remove the conditionals and options that are not used by the MSM8996 PCIe PHY device. Hardcode has_lane_rst and has_phy_com_ctrl as this is the case for this PHY. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-22-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 268 ++++------------------- 1 file changed, 41 insertions(+), 227 deletions(-) commit fd9269945f34dccac3e6e33d8ba46c4628d2fc19 Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:53 2022 +0300 phy: qcom-qmp-pcie: cleanup the driver Remove the conditionals and options that are not used by any of PCIe PHY devices. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-21-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 213 ++----------------------------- 1 file changed, 11 insertions(+), 202 deletions(-) commit 6066bac15bc61ccebb00194e507bbcf6991d2eb1 Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:52 2022 +0300 phy: qcom-qmp-combo: cleanup the driver Remove the conditionals and options that are not used by any of combo USB+DP PHY devices. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-20-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 169 ++---------------------------- 1 file changed, 10 insertions(+), 159 deletions(-) commit 86f5ddddcd9c4755e3d1d1ca4be01df5a4ed5d96 Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:51 2022 +0300 phy: qcom-qmp-usb: drop support for non-USB PHY types Drop remaining support for PHY types other than USB. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-19-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 435 ++++---------------------------- 1 file changed, 48 insertions(+), 387 deletions(-) commit bc3e83d766eb66e33d9046d5c74997116ed92f2e Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:50 2022 +0300 phy: qcom-qmp-ufs: drop support for non-UFS PHY types Drop remaining support for PHY types other than UFS. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-18-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 612 ++------------------------------ 1 file changed, 35 insertions(+), 577 deletions(-) commit f575ac2d64e7cedb2d70acd5baa359da216cf718 Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:49 2022 +0300 phy: qcom-qmp-pcie-msm8996: drop support for non-PCIe PHY types Drop remaining support for PHY types other than PCIe. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-17-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 532 ++--------------------- 1 file changed, 43 insertions(+), 489 deletions(-) commit da07a06b905fc674fdc483c9d20a630f6778a947 Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:48 2022 +0300 phy: qcom-qmp-pcie: drop support for non-PCIe PHY types Drop remaining support for PHY types other than PCIe. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-16-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 528 +++---------------------------- 1 file changed, 43 insertions(+), 485 deletions(-) commit b2bac0f095155184c1e6955bc98ad04af7c0ce6f Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:47 2022 +0300 phy: qcom-qmp-combo: drop support for PCIe,UFS PHY types Drop remaining support for unused PHY types (PCIe, UFS). Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-15-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 102 ++++++++++++------------------ 1 file changed, 41 insertions(+), 61 deletions(-) commit a50280ead1b6a56f3b4738808a8c2be7c2c63666 Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:46 2022 +0300 phy: qcom-qmp: drop old QMP PHY driver source As we have switched to the new (split) QMP PHY driver, drop the old monolithic QMP driver source. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-14-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp.c | 6350 ----------------------------------- 1 file changed, 6350 deletions(-) commit 3158e39aa5f4b7a3c210a77bd3d9c4cc31c9dcc4 Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:45 2022 +0300 phy: qcom-qmp: switch to new split QMP PHY driver Use new split QMP PHY driver and remove all monolith phy-qcom-qmp driver. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-13-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 09b492a379402395f646c6db2e16cdac1fc2229d Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:44 2022 +0300 phy: qcom-qmp-usb: change symbol prefix to qcom_qmp_phy_usb Change all symbol names to start with qcom_qmp_phy_usb_ rather than old qcom_qmp_phy_ Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-12-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 158 ++++++++++++++++---------------- 1 file changed, 79 insertions(+), 79 deletions(-) commit b42c5f3d7b1ca85baf5018ac5c8e21daed099a2c Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:43 2022 +0300 phy: qcom-qmp-ufs: change symbol prefix to qcom_qmp_phy_ufs Change all symbol names to start with qcom_qmp_phy_ufs_ rather than old qcom_qmp_phy_ Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-11-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 158 ++++++++++++++++---------------- 1 file changed, 79 insertions(+), 79 deletions(-) commit 2abf0c8e61a900a77f2262f54596973db572cabb Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:42 2022 +0300 phy: qcom-qmp-pcie: change symbol prefix to qcom_qmp_phy_pcie_msm8996 Change all symbol names to start with qcom_qmp_phy_pcie_msm8996_ rather than old qcom_qmp_phy_. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-10-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 158 +++++++++++------------ 1 file changed, 79 insertions(+), 79 deletions(-) commit 5dbc7d86d1aa256e719e6f98bb9c3c3d86e3ceba Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:41 2022 +0300 phy: qcom-qmp-pcie: change symbol prefix to qcom_qmp_phy_pcie Change all symbol names to start with qcom_qmp_phy_pcie_ rather than old qcom_qmp_phy_ Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-9-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 158 +++++++++++++++---------------- 1 file changed, 79 insertions(+), 79 deletions(-) commit 033f3a16fb9283299b48dcc57a1abbc807819dc2 Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:40 2022 +0300 phy: qcom-qmp-combo: change symbol prefix to qcom_qmp_phy_combo Change all symbol names to start with qcom_qmp_phy_combo_ rather than old qcom_qmp_phy_ Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-8-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 164 +++++++++++++++--------------- 1 file changed, 82 insertions(+), 82 deletions(-) commit ee7ffc92a9504c516c6f3bcfc7dc1ca6f1ae647e Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:39 2022 +0300 phy: qcom-qmp-combo: drop all non-combo compatibles support Drop support for all non-USB+DP compatibles from the new qmp-combo driver. Currently this will result in duplication (both in terms of code and in terms of config tables) with USB PHY support. This will be sorted out later, after fixing the combo PHY init/reinit issues. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-7-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 3845 +---------------------------- 1 file changed, 128 insertions(+), 3717 deletions(-) commit 8c924330ebe3e5c6f41bad0e5118875848843864 Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:38 2022 +0300 phy: qcom-qmp-usb: drop all non-USB compatibles support Drop support for all non-USB compatibles from the new qmp-usb driver. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-6-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 3108 +------------------------------ 1 file changed, 40 insertions(+), 3068 deletions(-) commit 4846a79a386614bc37c55251e30a646b7a086144 Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:37 2022 +0300 phy: qcom-qmp-ufs: drop all non-UFS compatibles support Drop support for all non-UFS compatibles from the new qmp-ufs driver. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-5-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 4210 +------------------------------ 1 file changed, 44 insertions(+), 4166 deletions(-) commit 9fc8fa59ef1038714a9b86259f515373a7380169 Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:36 2022 +0300 phy: qcom-qmp-pcie-msm8996: drop all compatibles except msm8996-pcie-phy Drop support for all compatibles from the new qmp-pcie driver except the qcom,msm8996-qmp-pcie-phy. This PHY differs from the rest of PCIe PHYs, so it warrants a separate device driver. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-4-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 5024 +--------------------- 1 file changed, 200 insertions(+), 4824 deletions(-) commit b35a53119ac12a3322a7efb7788e798753fde1b8 Author: Dmitry Baryshkov Date: Wed Jun 8 00:31:35 2022 +0300 phy: qcom-qmp-pcie: drop all non-PCIe compatibles support Drop support for all non-PCIe compatibles from the new qmp-pcie driver. The MSM8996 compat is also removed, it is going to be handled by a separate driver. Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-3-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 3599 ++---------------------------- 1 file changed, 163 insertions(+), 3436 deletions(-) commit 94a407cc17a445ddb3f7315cee0b0916d35d177c Author: Dmitry Baryshkov Date: Wed Jun 8 00:35:32 2022 +0300 phy: qcom-qmp: create copies of QMP PHY driver In order to split and cleanup the single monstrous QMP PHY driver, create blind copies of the current file. They will be used for: - PCIe (and a separate msm8996 PCIe PHY driver) - UFS - USB - Combo DP + USB Acked-by: Bjorn Andersson Tested-by: Bjorn Andersson # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220607213203.2819885-2-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 6350 ++++++++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 6350 ++++++++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 6350 ++++++++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 6350 ++++++++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 6350 ++++++++++++++++++++++ 5 files changed, 31750 insertions(+) commit d54087651efd06e804b92c485b7612307e3839d1 Author: Julia Lawall Date: Sat May 21 13:10:35 2022 +0200 power: supply: lp8788: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Sebastian Reichel drivers/power/supply/lp8788-charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a21fe017ce564d773a6a524ce3dcaa8cb850917 Author: Krzysztof Kozlowski Date: Wed Jun 1 09:19:11 2022 +0200 dt-bindings: power: supply: summit,smb347: use absolute path to schema Reference regulator schema by absolute path, as expected by DT schema coding style. Signed-off-by: Krzysztof Kozlowski Reviewed-by: David Heidelberg Acked-by: Rob Herring Signed-off-by: Sebastian Reichel .../devicetree/bindings/power/supply/summit,smb347-charger.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 096a6223424e8f5f9d9dbc70c66cdfd63b34fc58 Author: Krzysztof Kozlowski Date: Wed Jun 1 09:19:10 2022 +0200 dt-bindings: power: supply: qcom,pm8941: document usb-charge-current-limit Document already used (in DTS and by driver) 'usb-charge-current-limit' property: arch/arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dtb: charger@1000: 'usb-charge-current-limit' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Sebastian Reichel .../devicetree/bindings/power/supply/qcom,pm8941-charger.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 2441ca62b78bd675afdc63872f1f663dcd116dd3 Author: Krzysztof Kozlowski Date: Wed Jun 1 09:19:09 2022 +0200 dt-bindings: power: supply: qcom,pm8941: use regulator schema for child node The 'usb-otg-vbus' child node is a regulator so reference the regulator schema for proper evaluation. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/power/supply/qcom,pm8941-charger.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 576fc9e6f7663f140ebf5002e6568d9dc273bb7d Author: Krzysztof Kozlowski Date: Wed Jun 1 09:19:08 2022 +0200 dt-bindings: power: supply: bq24190: use regulator schema for child node The 'usb-otg-vbus' child node is a regulator so reference the regulator schema for proper evaluation. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/power/supply/bq24190.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa195350cdc8e93a890c56d0999b17c441b60b97 Author: Ke Liu Date: Thu Jun 2 07:11:15 2022 +0000 PCI: switchtec: Prefer ida_alloc()/free() over ida_simple_get()/remove() Use ida_alloc() and ida_free() instead of deprecated ida_simple_get() and ida_simple_remove(). Link: https://lore.kernel.org/r/20220602071115.3833935-1-liuke94@huawei.com Signed-off-by: Ke Liu Signed-off-by: Bjorn Helgaas Acked-by: Logan Gunthorpe drivers/pci/switch/switchtec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit a6c487cd7e4aa1af83423003f05c87302325b87c Author: Luca Ceresoli Date: Fri Jun 3 17:57:26 2022 +0200 power: supply: max77976: update Luca Ceresoli's e-mail address My Bootlin address is preferred from now on. Signed-off-by: Luca Ceresoli Signed-off-by: Luca Ceresoli Signed-off-by: Sebastian Reichel drivers/power/supply/max77976_charger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bf038503d5fe90189743124233fe7aeb0984e961 Author: Miaoqian Lin Date: Wed Jun 1 08:12:58 2022 +0400 PCI: mediatek-gen3: Fix refcount leak in mtk_pcie_init_irq_domains() of_get_child_by_name() returns a node pointer with refcount incremented, so we should use of_node_put() on it when we don't need it anymore. Add missing of_node_put() to avoid refcount leak. Fixes: 814cceebba9b ("PCI: mediatek-gen3: Add INTx support") Link: https://lore.kernel.org/r/20220601041259.56185-1-linmq006@gmail.com Signed-off-by: Miaoqian Lin Signed-off-by: Bjorn Helgaas Reviewed-by: Miles Chen Acked-by: Jianjun Wang drivers/pci/controller/pcie-mediatek-gen3.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 138f9f50eb18b8c4ffbbd2349ecfa03caab9cfd8 Author: Julia Lawall Date: Sat May 21 13:11:00 2022 +0200 drivers/net/ethernet/intel: fix typos in comments Spelling mistakes (triple letters) in comments. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Reviewed-by: Paul Menzel Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 2 +- drivers/net/ethernet/intel/ice/ice_lib.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit c2f1e80fd68b7ed8214d9a91ced0a1d9f6151726 Author: Jiaqing Zhao Date: Sat May 28 20:31:23 2022 +0800 ixgbe: Fix typos in comments "VLAN filter" was misspelled as "VLAN filer" in some comments. Signed-off-by: Jiaqing Zhao Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 864f1f9e88b1efbe644fcfd1bbe158fe8af748d7 Author: Jiaqing Zhao Date: Sat May 28 20:31:22 2022 +0800 ixgb: Fix typos in comments "VLAN filter" was misspelled as "VLAN filer" in some comments. Signed-off-by: Jiaqing Zhao Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ixgb/ixgb_hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a66c4646901227d6e05af1b9fb2235ed265a190a Author: Jiaqing Zhao Date: Sat May 28 20:31:21 2022 +0800 e1000: Fix typos in comments "VLAN filter" was misspelled as "VLAN filer" in some comments. Signed-off-by: Jiaqing Zhao Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/e1000/e1000_hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a413f2803d7c0cf23cfb8851522c8f37433d84cc Author: Kai-Heng Feng Date: Wed May 25 19:31:12 2022 +0800 igb: Remove duplicate defines There's no need to define same thing twice. Signed-off-by: Kai-Heng Feng Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igb/e1000_defines.h | 3 --- drivers/net/ethernet/intel/igb/e1000_regs.h | 1 - 2 files changed, 4 deletions(-) commit 37530030c0b61396be81e38f2aa179c30fb1d216 Author: Maximilian Heyne Date: Mon May 9 11:03:39 2022 +0000 drivers, ixgbe: export vf statistics This change retrieves network metrics for virtual functions from the device and exports them via the iproute2 interface. The code for retrieving the statistics from the device is taken from the out-of-tree driver. The feature was introduced with version 2.0.75.7, so the diff between this version and the previous version 2.0.72.4 was used to identify required changes. The export via ethtool is omitted in favor of using the standard ndo_get_vf_stats interface. Per-VF statistics can now be printed, for instance, via ip --statistics link show dev eth0 Signed-off-by: Maximilian Heyne Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ixgbe/ixgbe.h | 34 +++++++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 86 +++++++++++++++++++++++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 7 +++ 3 files changed, 127 insertions(+) commit 19e890ff3bedc36fe3cd1cb7d03bfb66c5fdf1db Author: Yang Xu Date: Wed Apr 20 11:48:00 2022 +0300 fs/ntfs3: Use the same order for acl pointer check in ntfs_init_acl For the readability and unity of the code, adjust the order Signed-off-by: Yang Xu Reviewed-by: Kari Argillander Signed-off-by: Konstantin Komarov fs/ntfs3/xattr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ae5a4e46916fc307288227b64c1d062352eb93b7 Author: Yan Lei Date: Sun Apr 10 09:09:00 2022 +0300 fs/ntfs3: Fix using uninitialized value n when calling indx_read This value is checked in indx_read, so it must be initialized Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") Signed-off-by: Yan Lei Signed-off-by: Konstantin Komarov fs/ntfs3/index.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e15f5e6fa6ca1b3baf087314b2541afa935d00e7 Merge: e0f3f46e4206 b172862241b4 Author: Paolo Bonzini Date: Thu Jun 9 11:38:12 2022 -0400 Merge branch 'kvm-5.20-early' s390: * add an interface to provide a hypervisor dump for secure guests * improve selftests to show tests x86: * Intel IPI virtualization * Allow getting/setting pending triple fault with KVM_GET/SET_VCPU_EVENTS * PEBS virtualization * Simplify PMU emulation by just using PERF_TYPE_RAW events * More accurate event reinjection on SVM (avoid retrying instructions) * Allow getting/setting the state of the speaker port data bit * Rewrite gfn-pfn cache refresh * Refuse starting the module if VM-Entry/VM-Exit controls are inconsistent * "Notify" VM exit commit 5bb4f80716e2f0b2a059f8273acd6c69f3bce239 Author: Rex-BC Chen Date: Wed May 4 17:19:23 2022 +0800 drm/mediatek: Add MT8186 DSI compatible for mtk_drm_drv.c The compatible "mediatek,mt8186-dsi" is used by MT8186 DSI, so add it to mtk_ddp_comp_dt_ids in mtk_drm_drv.c. Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220504091923.2219-5-rex-bc.chen@mediatek.com/ Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 03d7adc41027a5216dc2cc9c3c09de02477b94b3 Author: Xinlei Lee Date: Wed May 4 17:19:22 2022 +0800 drm/mediatek: Add mt8186 dsi compatible to mtk_dsi.c Add the compatible because use different cmdq addresses in mt8186. Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220504091923.2219-4-rex-bc.chen@mediatek.com/ Signed-off-by: Xinlei Lee Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dsi.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f7fe4264ad5852bfb99a89e2649e48b8abcc4fc4 Author: Xinlei Lee Date: Wed May 4 17:19:21 2022 +0800 dt-bindings: display: mediatek: dsi: Add compatible for MediaTek MT8186 Add dt-binding documentation of dsi for MediaTek MT8186 SoC. Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220504091923.2219-3-rex-bc.chen@mediatek.com/ Signed-off-by: Xinlei Lee Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Acked-by: Rob Herring Signed-off-by: Chun-Kuang Hu Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml | 1 + 1 file changed, 1 insertion(+) commit 22ffb89ee3ab3557d2caa57fb67f8a195f252be0 Author: Xinlei Lee Date: Wed May 4 17:19:20 2022 +0800 dt-bindings: display: mediatek: dsi: Convert dsi_dtbinding to .yaml Convert mediatek,dsi.txt to mediatek,dsi.yaml format Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220504091923.2219-2-rex-bc.chen@mediatek.com/ Signed-off-by: Xinlei Lee Signed-off-by: Rex-BC Chen Reviewed-by: Rob Herring Signed-off-by: Chun-Kuang Hu .../bindings/display/mediatek/mediatek,dsi.txt | 62 ----------- .../bindings/display/mediatek/mediatek,dsi.yaml | 115 +++++++++++++++++++++ 2 files changed, 115 insertions(+), 62 deletions(-) commit efeeaefe9be56e8ae5e5b4e9ff6d2275ec977ec5 Author: Paul Kocialkowski Date: Fri May 20 16:15:55 2022 +0200 drm: Add support for the LogiCVC display controller Introduces a driver for the LogiCVC display controller, a programmable logic controller optimized for use in Xilinx Zynq-7000 SoCs and other Xilinx FPGAs. The controller is mostly configured at logic synthesis time so only a subset of configuration is left for the driver to handle. The following features are implemented and tested: - LVDS 4-bit interface; - RGB565 pixel formats; - Multiple layers and hardware composition; - Layer-wide alpha mode; The following features are implemented but untested: - Other RGB pixel formats; - Layer framebuffer configuration for version 4; - Lowest-layer used as background color; - Per-pixel alpha mode. The following features are not implemented: - YUV pixel formats; - DVI, LVDS 3-bit, ITU656 and camera link interfaces; - External parallel input for layer; - Color-keying; - LUT-based alpha modes. Additional implementation-specific notes: - Panels are only enabled after the first page flip to avoid flashing a white screen. - Depth used in context of the LogiCVC driver only counts color components to match the definition of the synthesis parameters. Support is implemented for both version 3 and 4 of the controller. With version 3, framebuffers are stored in a dedicated contiguous memory area, with a base address hardcoded for each layer. This requires using a dedicated CMA pool registered at the base address and tweaking a few offset-related registers to try to use any buffer allocated from the pool. This is done on a best-effort basis to have the hardware cope with the DRM framebuffer allocation model and there is no guarantee that each buffer allocated by GEM CMA can be used for any layer. In particular, buffers allocated below the base address for a layer are guaranteed not to be configurable for that layer. See the implementation of logicvc_layer_buffer_find_setup for specifics. Version 4 allows configuring each buffer address directly, which guarantees that any buffer can be configured. Signed-off-by: Paul Kocialkowski Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20220520141555.1429041-2-paul.kocialkowski@bootlin.com MAINTAINERS | 6 + drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/logicvc/Kconfig | 9 + drivers/gpu/drm/logicvc/Makefile | 9 + drivers/gpu/drm/logicvc/logicvc_crtc.c | 280 +++++++++++++ drivers/gpu/drm/logicvc/logicvc_crtc.h | 21 + drivers/gpu/drm/logicvc/logicvc_drm.c | 497 ++++++++++++++++++++++ drivers/gpu/drm/logicvc/logicvc_drm.h | 67 +++ drivers/gpu/drm/logicvc/logicvc_interface.c | 214 ++++++++++ drivers/gpu/drm/logicvc/logicvc_interface.h | 28 ++ drivers/gpu/drm/logicvc/logicvc_layer.c | 628 ++++++++++++++++++++++++++++ drivers/gpu/drm/logicvc/logicvc_layer.h | 64 +++ drivers/gpu/drm/logicvc/logicvc_mode.c | 80 ++++ drivers/gpu/drm/logicvc/logicvc_mode.h | 15 + drivers/gpu/drm/logicvc/logicvc_of.c | 185 ++++++++ drivers/gpu/drm/logicvc/logicvc_of.h | 46 ++ drivers/gpu/drm/logicvc/logicvc_regs.h | 80 ++++ 18 files changed, 2232 insertions(+) commit e0d7371b46c7b47cdf5391717292033365801437 Author: Matt Roper Date: Wed Jun 8 10:07:00 2022 -0700 drm/i915/pvc: Add register steering Ponte Vecchio no longer has MSLICE or LNCF steering, but the bspec does document several new types of multicast register ranges. Fortunately, most of the different MCR types all provide valid values at instance (0,0) so there's no need to read fuse registers and calculate a non-terminated instance. We'll lump all of those range types (BSLICE, HALFBSLICE, TILEPSMI, CC, and L3BANK) into a single category called "INSTANCE0" to keep things simple. We'll also perform explicit steering for each of these multicast register types, even if the implicit steering setup for COMPUTE/DSS ranges would have worked too; this is based on guidance from our hardware architects who suggested that we move away from implicit steering and start explicitly steer all MCR register accesses on modern platforms (we'll work on transitioning COMPUTE/DSS to explicit steering in the future). Note that there's one additional MCR range type defined in the bspec (SQIDI) that we don't handle here. Those ranges use a different steering control register that we never touch; since instance 0 is also always a valid setting there, we can just ignore those ranges. Finally, we'll rename the HAS_MSLICES() macro to HAS_MSLICE_STEERING(). PVC hardware still has units referred to as mslices, but there's no register steering based on mslice for this platform. v2: - Rebase on other recent changes - Swap two table rows to keep table sorted & easy to read. (Harish) Bspec: 67609 Signed-off-by: Matt Roper Reviewed-by: Harish Chegondi Link: https://patchwork.freedesktop.org/patch/msgid/20220608170700.4026648-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt.c | 50 +++++++++++++++++++++++++---- drivers/gpu/drm/i915/gt/intel_gt_types.h | 7 ++++ drivers/gpu/drm/i915/gt/intel_workarounds.c | 16 +++++++++ drivers/gpu/drm/i915/i915_drv.h | 3 +- drivers/gpu/drm/i915/i915_pci.c | 3 +- drivers/gpu/drm/i915/intel_device_info.h | 2 +- 6 files changed, 71 insertions(+), 10 deletions(-) commit 4c0680d394d8a77868049931101e4a59372346b5 Author: Marc Zyngier Date: Sat May 28 12:38:17 2022 +0100 KVM: arm64: Move vcpu configuration flags into their own set The KVM_ARM64_{GUEST_HAS_SVE,VCPU_SVE_FINALIZED,GUEST_HAS_PTRAUTH} flags are purely configuration flags. Once set, they are never cleared, but evaluated all over the code base. Move these three flags into the configuration set in one go, using the new accessors, and take this opportunity to drop the KVM_ARM64_ prefix which doesn't provide any help. Reviewed-by: Fuad Tabba Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 17 ++++++++++------- arch/arm64/kvm/reset.c | 6 +++--- 2 files changed, 13 insertions(+), 10 deletions(-) commit bdde97ac4bea26d48f60e353396b2b4fb0234ac4 Author: Daniel Vetter Date: Tue Jun 7 20:23:37 2022 +0200 Revert "fbdev: Prevent probing generic drivers if a FB is already registered" This reverts commit fb561bf9abde49f7e00fdbf9ed2ccf2d86cac8ee. With commit 27599aacbaefcbf2af7b06b0029459bbf682000d Author: Thomas Zimmermann Date: Tue Jan 25 10:12:18 2022 +0100 fbdev: Hot-unplug firmware fb devices on forced removal this should be fixed properly and we can remove this somewhat hackish check here (e.g. this won't catch drm drivers if fbdev emulation isn't enabled). Cc: Thomas Zimmermann Cc: Zack Rusin Cc: Javier Martinez Canillas Cc: Zack Rusin Cc: Hans de Goede Cc: Ilya Trukhanov Signed-off-by: Daniel Vetter Signed-off-by: Daniel Vetter Reviewed-by: Javier Martinez Canillas Cc: Peter Jones Cc: linux-fbdev@vger.kernel.org Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20220607182338.344270-5-javierm@redhat.com drivers/video/fbdev/efifb.c | 11 ----------- drivers/video/fbdev/simplefb.c | 11 ----------- 2 files changed, 22 deletions(-) commit 873eb3b11860aada97ddc02d48b54522b92848db Author: Javier Martinez Canillas Date: Tue Jun 7 20:23:36 2022 +0200 fbdev: Disable sysfb device registration when removing conflicting FBs The platform devices registered by sysfb match with firmware-based DRM or fbdev drivers, that are used to have early graphics using a framebuffer provided by the system firmware. DRM or fbdev drivers later are probed and remove conflicting framebuffers, leading to these platform devices for generic drivers to be unregistered. But the current solution has a race, since the sysfb_init() function could be called after a DRM or fbdev driver is probed and request to unregister the devices for drivers with conflicting framebuffes. To prevent this, disable any future sysfb platform device registration by calling sysfb_disable(), if a driver requests to remove the conflicting framebuffers. Suggested-by: Daniel Vetter Signed-off-by: Javier Martinez Canillas Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220607182338.344270-4-javierm@redhat.com drivers/video/fbdev/core/fbmem.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit bc824922b264aff40eba8c160972ee07a95e7dd4 Author: Javier Martinez Canillas Date: Tue Jun 7 20:23:35 2022 +0200 firmware: sysfb: Add sysfb_disable() helper function This can be used by subsystems to unregister a platform device registered by sysfb and also to disable future platform device registration in sysfb. Suggested-by: Daniel Vetter Signed-off-by: Javier Martinez Canillas Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220607182338.344270-3-javierm@redhat.com .../driver-api/firmware/other_interfaces.rst | 6 +++ drivers/firmware/sysfb.c | 54 +++++++++++++++++++--- include/linux/sysfb.h | 12 +++++ 3 files changed, 66 insertions(+), 6 deletions(-) commit 0949ee75da6c918fcbd567e1bfa4943a56ab4e5d Author: Javier Martinez Canillas Date: Tue Jun 7 20:23:34 2022 +0200 firmware: sysfb: Make sysfb_create_simplefb() return a pdev pointer This function just returned 0 on success or an errno code on error, but it could be useful for sysfb_init() callers to have a pointer to the device. Signed-off-by: Javier Martinez Canillas Reviewed-by: Daniel Vetter Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220607182338.344270-2-javierm@redhat.com drivers/firmware/sysfb.c | 4 ++-- drivers/firmware/sysfb_simplefb.c | 16 ++++++++-------- include/linux/sysfb.h | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) commit d1065293010a010261f0b1478daff40d5a3dc241 Author: Juerg Haefliger Date: Thu Jun 9 10:21:54 2022 +0200 ARM: s3c: Kconfig.s3c64xx: Fix indentation The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules. Signed-off-by: Juerg Haefliger Link: https://lore.kernel.org/r/20220609082154.115301-4-juerg.haefliger@canonical.com Signed-off-by: Krzysztof Kozlowski arch/arm/mach-s3c/Kconfig.s3c64xx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 48bf4b8497419f5b9a29da19c72e00dc2b8d498c Author: Juerg Haefliger Date: Thu Jun 9 10:21:53 2022 +0200 ARM: s3c: Kconfig.s3c24xx: Fix indentation and replace some tabs The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules. While add it, replace tabs before comments with whitespaces (which seems to be more common), add a missing trailing endif comment and squeeze multiple empty lines. Signed-off-by: Juerg Haefliger Link: https://lore.kernel.org/r/20220609082154.115301-3-juerg.haefliger@canonical.com Signed-off-by: Krzysztof Kozlowski arch/arm/mach-s3c/Kconfig.s3c24xx | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 1afde294a99d3dd2a2aa4e28d15590755927f66e Author: Juerg Haefliger Date: Thu Jun 9 10:21:52 2022 +0200 ARM: s3c: Kconfig: Fix indentation The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules. Signed-off-by: Juerg Haefliger Link: https://lore.kernel.org/r/20220609082154.115301-2-juerg.haefliger@canonical.com Signed-off-by: Krzysztof Kozlowski arch/arm/mach-s3c/Kconfig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit f615625a44c4e641460acf74c91cedfaeab0dd28 Author: Al Viro Date: Thu Jun 9 10:01:34 2022 -0400 9p: handling Rerror without copy_from_iter_full() p9_client_zc_rpc()/p9_check_zc_errors() are playing fast and loose with copy_from_iter_full(). Reading from file is done by sending Tread request. Response consists of fixed-sized header (including the amount of data actually read) followed by the data itself. For zero-copy case we arrange the things so that the first 11 bytes of reply go into the fixed-sized buffer, with the rest going straight into the pages we want to read into. What makes the things inconvenient is that sglist describing what should go where has to be set *before* the reply arrives. As the result, if reply is an error, the things get interesting. On success we get size[4] Rread tag[2] count[4] data[count] For error layout varies depending upon the protocol variant - in original 9P and 9P2000 it's size[4] Rerror tag[2] len[2] error[len] in 9P2000.U size[4] Rerror tag[2] len[2] error[len] errno[4] in 9P2000.L size[4] Rlerror tag[2] errno[4] The last case is nice and simple - we have an 11-byte response that fits into the fixed-sized buffer we hoped to get an Rread into. In other two, though, we get a variable-length string spill into the pages we'd prepared for the data to be read. Had that been in fixed-sized buffer (which is actually 4K), we would've dealt with that the same way we handle non-zerocopy case. However, for zerocopy it doesn't end up there, so we need to copy it from those pages. The trouble is, by the time we get around to that, the references to pages in question are already dropped. As the result, p9_zc_check_errors() tries to get the data using copy_from_iter_full(). Unfortunately, the iov_iter it's trying to read from might *NOT* be capable of that. It is, after all, a data destination, not data source. In particular, if it's an ITER_PIPE one, copy_from_iter_full() will simply fail. In ->zc_request() itself we do have those pages and dealing with the problem in there would be a simple matter of memcpy_from_page() into the fixed-sized buffer. Moreover, it isn't hard to recognize the (rare) case when such copying is needed. That way we get rid of p9_zc_check_errors() entirely - p9_check_errors() can be used instead both for zero-copy and non-zero-copy cases. Signed-off-by: Al Viro net/9p/client.c | 86 +-------------------------------------------------- net/9p/trans_virtio.c | 34 ++++++++++++++++++++ 2 files changed, 35 insertions(+), 85 deletions(-) commit 6f6536a0e309177882975222d73984d1b5ad3bdd Author: Uwe Kleine-König Date: Tue Jun 7 17:24:58 2022 +0200 mtd: st_spi_fsm: Simplify error checking in .probe() a bit Instead of ending each if branch with the same check, do it once unconditionally after the if block. Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220607152458.232847-5-u.kleine-koenig@pengutronix.de drivers/mtd/devices/st_spi_fsm.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit cd043c613e21bb6f039057043da759471706adf5 Author: Uwe Kleine-König Date: Tue Jun 7 17:24:57 2022 +0200 mtd: st_spi_fsm: Disable clock only after device was unregistered Until mtd_device_unregister() returns the device is expected to be operational. So only disable the clock after the mtd is unregistered. Fixes: 1fefc8ecb834 ("mtd: st_spi_fsm: add missing clk_disable_unprepare() in stfsm_remove()") Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220607152458.232847-4-u.kleine-koenig@pengutronix.de drivers/mtd/devices/st_spi_fsm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cfa7847f150c4343903d8ff2cd219418c1768205 Author: Uwe Kleine-König Date: Tue Jun 7 17:24:56 2022 +0200 mtd: st_spi_fsm: Warn about failure to unregister mtd device mtd_device_unregister() shouldn't fail. Wail loudly if it does anyhow. This matches how other drivers (e.g. nand/raw/nandsim.c) use mtd_device_unregister(). By returning 0 in the platform remove callback a generic error message by the device core is suppressed, nothing else changes. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220607152458.232847-3-u.kleine-koenig@pengutronix.de drivers/mtd/devices/st_spi_fsm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 28607b426c3d050714f250d0faeb99d2e9106e90 Author: Uwe Kleine-König Date: Tue Jun 7 17:24:55 2022 +0200 mtd: st_spi_fsm: Add a clk_disable_unprepare() in .probe()'s error path For all but one error path clk_disable_unprepare() is already there. Add it to the one location where it's missing. Fixes: 481815a6193b ("mtd: st_spi_fsm: Handle clk_prepare_enable/clk_disable_unprepare.") Fixes: 69d5af8d016c ("mtd: st_spi_fsm: Obtain and use EMI clock") Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220607152458.232847-2-u.kleine-koenig@pengutronix.de drivers/mtd/devices/st_spi_fsm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 1cc82e09fc20dbb1f3aa41e9924c48e8194da754 Author: Uwe Kleine-König Date: Tue Jun 7 08:25:03 2022 +0200 mtd: rawnand: atmel: Warn about failure to unregister mtd device The Linux device core doesn't intend remove callbacks to fail. If an error code is returned the device is removed anyhow. So wail loudly if the atmel specific remove callback fails and return 0 anyhow to suppress the generic (and little helpful) error message by the device core. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220607062503.211345-1-u.kleine-koenig@pengutronix.de drivers/mtd/nand/raw/atmel/nand-controller.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f88c97c1332d6d760d193ce3d76765f8105b1cda Author: Uwe Kleine-König Date: Fri Jun 3 23:07:58 2022 +0200 mtd: physmap: Drop if with an always false condition The remove callback is only called after probe completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so info is never NULL. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220603210758.148493-15-u.kleine-koenig@pengutronix.de drivers/mtd/maps/physmap-core.c | 4 ---- 1 file changed, 4 deletions(-) commit bb8236541f496e2a32772071fdb127dce6ac1643 Author: Uwe Kleine-König Date: Fri Jun 3 23:07:57 2022 +0200 mtd: physmap: Don't skip cleanup after mtd_device_unregister() failed If mtd_device_unregister() fails (which it doesn't when used correctly), the resources bound by the nand chip should be freed anyhow as returning an error value doesn't prevent the device getting unbound. Instead use WARN_ON on the return value similar to how other drivers do it. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220603210758.148493-14-u.kleine-koenig@pengutronix.de drivers/mtd/maps/physmap-core.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 43adab7fd4131ccdeda7abb9bf66afcfa0915a82 Author: Uwe Kleine-König Date: Fri Jun 3 23:07:56 2022 +0200 mtd: rawnand: meson: Drop cleaning platform data in .remove() The driver core cares for unsetting platform data (see device_unbind_cleanup()) on remove. Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220603210758.148493-13-u.kleine-koenig@pengutronix.de drivers/mtd/nand/raw/meson_nand.c | 2 -- 1 file changed, 2 deletions(-) commit 7beae6946255711d7914abe7c4914ff2691c4b8e Author: Uwe Kleine-König Date: Fri Jun 3 23:07:55 2022 +0200 mtd: rawnand: meson: Don't skip cleanup after mtd_device_unregister() failed If mtd_device_unregister() fails (which it doesn't when used correctly), the resources bound by the nand chip should be freed anyhow as returning an error value doesn't prevent the device getting unbound. Instead use WARN_ON on the return value similar to how other drivers do it. Then meson_nfc_nand_chip_cleanup() returns 0 unconditionally and can be changed to return void which allows further simplification in the remove callback. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220603210758.148493-12-u.kleine-koenig@pengutronix.de drivers/mtd/nand/raw/meson_nand.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 413948cc6208c7b47dd9fc8c56cbb04c3b2381b3 Author: Uwe Kleine-König Date: Fri Jun 3 23:07:54 2022 +0200 mtd: rawnand: tegra: Don't skip cleanup after mtd_device_unregister() failed If mtd_device_unregister() fails (which it doesn't when used correctly), the resources bound by the nand chip should be freed anyhow as returning an error value doesn't prevent the device getting unbound. Instead use WARN_ON on the return value similar to how other drivers do it. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220603210758.148493-11-u.kleine-koenig@pengutronix.de drivers/mtd/nand/raw/tegra_nand.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 37e00244047c5675a7f3f1ec0358f8c53cd12b75 Author: Uwe Kleine-König Date: Fri Jun 3 23:07:53 2022 +0200 mtd: rawnand: omap2: Suppress error message after WARN in .remove() Returning an error value in a platform remove callback results in an error message being emitted by the platform core, but otherwise it doesn't make a difference. After the WARN splat this generic error message doesn't add any value, so return 0 unconditionally Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220603210758.148493-10-u.kleine-koenig@pengutronix.de drivers/mtd/nand/raw/omap2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 279d719be39d8edb37c9178c15e167a94c7bc0a0 Author: Uwe Kleine-König Date: Fri Jun 3 23:07:51 2022 +0200 mtd: spear_smi: Drop if with an always false condition The remove callback is only called after probe completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so dev is never NULL. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220603210758.148493-8-u.kleine-koenig@pengutronix.de drivers/mtd/devices/spear_smi.c | 4 ---- 1 file changed, 4 deletions(-) commit 0057568b391488a5940635cbda562ea397bf4bdd Author: Uwe Kleine-König Date: Fri Jun 3 23:07:50 2022 +0200 mtd: spear_smi: Don't skip cleanup after mtd_device_unregister() failed If mtd_device_unregister() fails (which it doesn't when used correctly), the resources bound by the nand chip should be freed anyhow as returning an error value doesn't prevent the device getting unbound. Instead use WARN_ON on the return value similar to how other drivers do it. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220603210758.148493-7-u.kleine-koenig@pengutronix.de drivers/mtd/devices/spear_smi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0aaa0b5f84a0908fb2de30e8fea10811b154bf56 Author: Uwe Kleine-König Date: Fri Jun 3 23:07:49 2022 +0200 mtd: lpddr2_nvm: Warn about failure to unregister mtd device mtd_device_unregister() shouldn't fail. Wail loudly if it does anyhow. This matches how other drivers (e.g. nand/raw/nandsim.c) use mtd_device_unregister(). By returning 0 in the platform remove callback a generic error message by the device core is suppressed, nothing else changes. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220603210758.148493-6-u.kleine-koenig@pengutronix.de drivers/mtd/lpddr/lpddr2_nvm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 90914b4e8e2fb630d21d430f8844f7de583a1ac3 Author: Uwe Kleine-König Date: Fri Jun 3 23:07:47 2022 +0200 mtd: powernv_flash: Warn about failure to unregister mtd device mtd_device_unregister() shouldn't fail. Wail loudly if it does anyhow. This matches how other drivers (e.g. nand/raw/nandsim.c) use mtd_device_unregister(). By returning 0 in the platform remove callback a generic error message by the device core is suppressed, nothing else changes. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220603210758.148493-4-u.kleine-koenig@pengutronix.de drivers/mtd/devices/powernv_flash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0c90466a7985d39355f743e9cd2139da3e86c4d8 Author: Uwe Kleine-König Date: Fri Jun 3 23:07:45 2022 +0200 mtd: hyperbus: Make hyperbus_unregister_device() return void The only thing that could theoretically fail in that function is mtd_device_unregister(). However it's not supposed to fail and when used correctly it doesn't. So wail loudly if it does anyhow. This matches how other drivers (e.g. nand/raw/nandsim.c) use mtd_device_unregister(). This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220603210758.148493-2-u.kleine-koenig@pengutronix.de drivers/mtd/hyperbus/hbmc-am654.c | 6 +++--- drivers/mtd/hyperbus/hyperbus-core.c | 8 ++------ drivers/mtd/hyperbus/rpc-if.c | 5 +++-- include/linux/mtd/hyperbus.h | 4 +--- 4 files changed, 9 insertions(+), 14 deletions(-) commit 83208e106a8e8a859110ebb04a5e927ced911afb Author: Michał Kępień Date: Mon May 16 09:06:01 2022 +0200 mtdchar: use kvmalloc() for potentially large allocations mtdchar_write_ioctl() calls kmalloc() with the 'size' argument set to the smaller of two values: the write request's data/OOB length provided by user space and the erase block size of the MTD device. If the latter is large, kmalloc() may not be able to serve such allocation requests. Use kvmalloc() instead. Correspondingly, replace kfree() calls with kvfree() calls. Suggested-by: Richard Weinberger Signed-off-by: Michał Kępień Acked-by: Richard Weinberger Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220516070601.11428-3-kernel@kempniu.pl drivers/mtd/mtdchar.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a1eda864c04cf24ea1130334963c6199318f6f95 Author: Michał Kępień Date: Mon May 16 09:06:00 2022 +0200 mtdchar: prevent integer overflow in a safety check Commit 6420ac0af95d ("mtdchar: prevent unbounded allocation in MEMWRITE ioctl") added a safety check to mtdchar_write_ioctl() which attempts to ensure that the write request sent by user space does not extend beyond the MTD device's size. However, that check contains an addition of two struct mtd_write_req fields, 'start' and 'len', both of which are u64 variables. The result of that addition can overflow, allowing the safety check to be bypassed. The arguably simplest fix - changing the data types of the relevant struct mtd_write_req fields - is not feasible as it would break user space. Fix by making mtdchar_write_ioctl() truncate the value provided by user space in the 'len' field of struct mtd_write_req, so that only the lower 32 bits of that field are used, preventing the overflow. While the 'ooblen' field of struct mtd_write_req is not currently used in any similarly flawed safety check, also truncate it to 32 bits, for consistency with the 'len' field and with other MTD routines handling OOB data. Update include/uapi/mtd/mtd-abi.h accordingly. Suggested-by: Richard Weinberger Signed-off-by: Michał Kępień Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220516070601.11428-2-kernel@kempniu.pl drivers/mtd/mtdchar.c | 3 +++ include/uapi/mtd/mtd-abi.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit e607879b0da18c451de5e91daf239cc2f2f8ff2d Author: Miaoqian Lin Date: Sun Jun 5 11:07:23 2022 +0400 mtd: parsers: ofpart: Fix refcount leak in bcm4908_partitions_fw_offset of_find_node_by_path() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: bb17230c61a6 ("mtd: parsers: ofpart: support BCM4908 fixed partitions") Signed-off-by: Miaoqian Lin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220605070726.5979-1-linmq006@gmail.com drivers/mtd/parsers/ofpart_bcm4908.c | 3 +++ 1 file changed, 3 insertions(+) commit 9b78ef0c7997052e9eaa0f7a4513d546fa17358c Author: Mikhail Zhilkin Date: Sun May 29 11:07:14 2022 +0000 mtd: parsers: add support for Sercomm partitions This adds an MTD partition parser for the Sercomm partition table that is used in some Beeline, Netgear and Sercomm routers. The Sercomm partition map table contains real partition offsets, which may differ from device to device depending on the number and location of bad blocks on NAND. Original patch (proposed by NOGUCHI Hiroshi): Link: https://github.com/openwrt/openwrt/pull/1318#issuecomment-420607394 Signed-off-by: NOGUCHI Hiroshi Signed-off-by: Mikhail Zhilkin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220529110714.189732-1-csharper2005@gmail.com drivers/mtd/parsers/Kconfig | 9 ++ drivers/mtd/parsers/Makefile | 1 + drivers/mtd/parsers/scpart.c | 248 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 258 insertions(+) commit 9f7e62815cf3cbbcb1b8cb21649fb4dfdb3aa016 Author: Miaoqian Lin Date: Thu May 26 15:06:49 2022 +0400 mtd: partitions: Fix refcount leak in parse_redboot_of of_get_child_by_name() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: 237960880960 ("mtd: partitions: redboot: seek fis-index-block in the right node") Signed-off-by: Miaoqian Lin Reviewed-by: Linus Walleij Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220526110652.64849-1-linmq006@gmail.com drivers/mtd/parsers/redboot.c | 1 + 1 file changed, 1 insertion(+) commit a61528d997619a518ee8c51cf0ef0513021afaff Author: Duoming Zhou Date: Tue May 24 12:48:41 2022 +0800 mtd: sm_ftl: Fix deadlock caused by cancel_work_sync in sm_release There is a deadlock between sm_release and sm_cache_flush_work which is a work item. The cancel_work_sync in sm_release will not return until sm_cache_flush_work is finished. If we hold mutex_lock and use cancel_work_sync to wait the work item to finish, the work item also requires mutex_lock. As a result, the sm_release will be blocked forever. The race condition is shown below: (Thread 1) | (Thread 2) sm_release | mutex_lock(&ftl->mutex) | sm_cache_flush_work | mutex_lock(&ftl->mutex) cancel_work_sync | ... This patch moves del_timer_sync and cancel_work_sync out of mutex_lock in order to mitigate deadlock. Fixes: 7d17c02a01a1 ("mtd: Add new SmartMedia/xD FTL") Signed-off-by: Duoming Zhou Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220524044841.10517-1-duoming@zju.edu.cn drivers/mtd/sm_ftl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe92833524e368e59bba9c57e00f7359f133667f Author: Andrii Nakryiko Date: Mon Jun 6 15:01:43 2022 -0700 libbpf: Fix uprobe symbol file offset calculation logic Fix libbpf's bpf_program__attach_uprobe() logic of determining function's *file offset* (which is what kernel is actually expecting) when attaching uprobe/uretprobe by function name. Previously calculation was determining virtual address offset relative to base load address, which (offset) is not always the same as file offset (though very frequently it is which is why this went unnoticed for a while). Fixes: 433966e3ae04 ("libbpf: Support function name-based attach uprobes") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Cc: Riham Selim Cc: Alan Maguire Link: https://lore.kernel.org/bpf/20220606220143.3796908-1-andrii@kernel.org tools/lib/bpf/libbpf.c | 63 ++++++++++++++++++-------------------------------- 1 file changed, 22 insertions(+), 41 deletions(-) commit 492f99e4190a4574a4e015507e0466ab6d8d5d88 Author: Kosuke Fujimoto Date: Thu Jun 9 04:39:37 2022 -0400 bpf, docs: Fix typo "BFP_ALU" to "BPF_ALU" "BFP" should be "BPF" Signed-off-by: Kosuke Fujimoto Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220609083937.245749-1-fujimotoksouke0@gmail.com Documentation/bpf/instruction-set.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b817059a8830b8bc3d50bb2402dea923cd89b01 Author: Shahab Vahedi Date: Wed Jun 8 14:29:28 2022 +0000 bpftool: Fix bootstrapping during a cross compilation This change adjusts the Makefile to use "HOSTAR" as the archive tool to keep the sanity of the build process for the bootstrap part in check. For the rationale, please continue reading. When cross compiling bpftool with buildroot, it leads to an invocation like: $ AR="/path/to/buildroot/host/bin/arc-linux-gcc-ar" \ CC="/path/to/buildroot/host/bin/arc-linux-gcc" \ ... make Which in return fails while building the bootstrap section: ----------------------------------8<---------------------------------- make: Entering directory '/src/bpftool-v6.7.0/src' ... libbfd: [ on ] ... disassembler-four-args: [ on ] ... zlib: [ on ] ... libcap: [ OFF ] ... clang-bpf-co-re: [ on ] <-- triggers bootstrap . . . LINK /src/bpftool-v6.7.0/src/bootstrap/bpftool /usr/bin/ld: /src/bpftool-v6.7.0/src/bootstrap/libbpf/libbpf.a: error adding symbols: archive has no index; run ranlib to add one collect2: error: ld returned 1 exit status make: *** [Makefile:211: /src/bpftool-v6.7.0/src/bootstrap/bpftool] Error 1 make: *** Waiting for unfinished jobs.... AR /src/bpftool-v6.7.0/src/libbpf/libbpf.a make[1]: Leaving directory '/src/bpftool-v6.7.0/libbpf/src' make: Leaving directory '/src/bpftool-v6.7.0/src' ---------------------------------->8---------------------------------- This occurs because setting "AR" confuses the build process for the bootstrap section and it calls "arc-linux-gcc-ar" to create and index "libbpf.a" instead of the host "ar". Signed-off-by: Shahab Vahedi Signed-off-by: Daniel Borkmann Reviewed-by: Quentin Monnet Cc: Jean-Philippe Brucker Link: https://lore.kernel.org/bpf/8d297f0c-cfd0-ef6f-3970-6dddb3d9a87a@synopsys.com tools/bpf/bpftool/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af7c2d4145b57c15d25a092cfb5a91708c72b541 Author: Claudiu Beznea Date: Thu Jun 9 11:42:46 2022 +0300 spi: atmel-quadspi: align condition to parenthesis Align condition to parenthesis. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220609084246.1795419-4-claudiu.beznea@microchip.com Signed-off-by: Mark Brown drivers/spi/atmel-quadspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f11ec1cc46e38f0feac3721a03c21fa99167e329 Author: Claudiu Beznea Date: Thu Jun 9 11:42:45 2022 +0300 spi: atmel-quadspi: use pm_ptr() Use pm_ptr() for atmel_quadspi_pm_ops. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220609084246.1795419-3-claudiu.beznea@microchip.com Signed-off-by: Mark Brown drivers/spi/atmel-quadspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a2f83b7f78092a6d9e98fb5573d8f4b79c56336 Author: Claudiu Beznea Date: Thu Jun 9 11:42:44 2022 +0300 spi: atmel-quadspi: add runtime pm support Add runtime PM support for atmel-quadspi which will disable/enable QSPI clocks on proper runtime_suspend/runtime_resume ops. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220609084246.1795419-2-claudiu.beznea@microchip.com Signed-off-by: Mark Brown drivers/spi/atmel-quadspi.c | 100 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 91 insertions(+), 9 deletions(-) commit 263efe85a4b618037e1003c9636562d6cbb5f9f3 Author: Claudiu Beznea Date: Wed Jun 8 11:08:18 2022 +0300 net: macb: change return type for gem_ptp_set_one_step_sync() gem_ptp_set_one_step_sync() always returns zero thus change its return type to void. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220608080818.1495044-1-claudiu.beznea@microchip.com Signed-off-by: Paolo Abeni drivers/net/ethernet/cadence/macb_ptp.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 690bacb83bc30d14821bd32cac1c5839b4a9ac6c Author: Marc Zyngier Date: Sat May 28 12:38:16 2022 +0100 KVM: arm64: Add three sets of flags to the vcpu state It so appears that each of the vcpu flags is really belonging to one of three categories: - a configuration flag, set once and for all - an input flag generated by the kernel for the hypervisor to use - a state flag that is only for the kernel's own bookkeeping As we are going to split all the existing flags into these three sets, introduce all three in one go. No functional change other than a bit of bloat... Reviewed-by: Fuad Tabba Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit e87abb73e5946379896cf49b10f6b57e02937a4c Author: Marc Zyngier Date: Sat May 28 12:38:15 2022 +0100 KVM: arm64: Add helpers to manipulate vcpu flags among a set Careful analysis of the vcpu flags show that this is a mix of configuration, communication between the host and the hypervisor, as well as anciliary state that has no consistency. It'd be a lot better if we could split these flags into consistent categories. However, even if we split these flags apart, we want to make sure that each flag can only be applied to its own set, and not across sets. To achieve this, use a preprocessor hack so that each flag is always associated with: - the set that contains it, - a mask that describe all the bits that contain it (for a simple flag, this is the same thing as the flag itself, but we will eventually have values that cover multiple bits at once). Each flag is thus a triplet that is not directly usable as a value, but used by three helpers that allow the flag to be set, cleared, and fetched. By mandating the use of such helper, we can easily enforce that a flag can only be used with the set it belongs to. Finally, one last helper "unpacks" the raw value from the triplet that represents a flag, which is useful for multi-bit values that need to be enumerated (in a switch statement, for example). Further patches will start making use of this infrastructure. Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit f8077b0d59230cbb58e0b98839e04b564529a5ac Author: Marc Zyngier Date: Sat May 28 12:38:14 2022 +0100 KVM: arm64: Move FP state ownership from flag to a tristate The KVM FP code uses a pair of flags to denote three states: - FP_ENABLED set: the guest owns the FP state - FP_HOST set: the host owns the FP state - FP_ENABLED and FP_HOST clear: nobody owns the FP state at all and both flags set is an illegal state, which nothing ever checks for... As it turns out, this isn't really a good match for flags, and we'd be better off if this was a simpler tristate, each state having a name that actually reflect the state: - FP_STATE_FREE - FP_STATE_HOST_OWNED - FP_STATE_GUEST_OWNED Kill the two flags, and move over to an enum encoding these three states. This results in less confusing code, and less risk of ending up in the uncharted territory of a 4th state if we forget to clear one of the two flags. Signed-off-by: Marc Zyngier Reviewed-by: Mark Brown Reviewed-by: Reiji Watanabe arch/arm64/include/asm/kvm_host.h | 9 +++++++-- arch/arm64/kvm/fpsimd.c | 14 ++++++-------- arch/arm64/kvm/hyp/include/hyp/switch.h | 8 +++----- arch/arm64/kvm/hyp/nvhe/switch.c | 4 ++-- arch/arm64/kvm/hyp/vhe/switch.c | 2 +- 5 files changed, 19 insertions(+), 18 deletions(-) commit e9ada6c208c15c907afe5afb1aa82e23e81eb8ba Author: Marc Zyngier Date: Sat May 28 12:38:13 2022 +0100 KVM: arm64: Drop FP_FOREIGN_STATE from the hypervisor code The vcpu KVM_ARM64_FP_FOREIGN_FPSTATE flag tracks the thread's own TIF_FOREIGN_FPSTATE so that we can evaluate just before running the vcpu whether it the FP regs contain something that is owned by the vcpu or not by updating the rest of the FP flags. We do this in the hypervisor code in order to make sure we're in a context where we are not interruptible. But we already have a hook in the run loop to generate this flag. We may as well update the FP flags directly and save the pointless flag tracking. Whilst we're at it, rename update_fp_enabled() to guest_owns_fp_regs() to indicate what the leftover of this helper actually do. Signed-off-by: Marc Zyngier Reviewed-by: Reiji Watanabe Reviewed-by: Mark Brown arch/arm64/include/asm/kvm_host.h | 1 - arch/arm64/kvm/fpsimd.c | 17 ++++++++++------- arch/arm64/kvm/hyp/include/hyp/switch.h | 16 ++-------------- arch/arm64/kvm/hyp/nvhe/switch.c | 2 +- arch/arm64/kvm/hyp/vhe/switch.c | 2 +- 5 files changed, 14 insertions(+), 24 deletions(-) commit 0356163e5883e298b518cd16517be633824987f9 Author: Yang Li Date: Thu Jun 9 15:12:50 2022 +0800 spi: Return true/false (not 1/0) from bool function Return boolean values ("true" or "false") instead of 1 or 0 from bool function. As reported by coccicheck: ./drivers/spi/spi-s3c64xx.c:385:9-10: WARNING: return of 0/1 in function 's3c64xx_spi_can_dma' with return type bool Signed-off-by: Yang Li Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220609071250.59509-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown drivers/spi/spi-s3c64xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4f26ba2608c9ff736a9ad1348aa8078f0b03f81 Author: Yang Li Date: Thu Jun 9 13:55:32 2022 +0800 spi: fix platform_no_drv_owner.cocci warning Remove .owner field if calls are used which set it automatically. Eliminate the following coccicheck warning: ./drivers/spi/spi-microchip-core.c:624:3-8: No need to set .owner here. The core will do it. Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20220609055533.95866-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown drivers/spi/spi-microchip-core.c | 1 - 1 file changed, 1 deletion(-) commit 142d456204cf4dabe18be59e043d806440f609d4 Author: Minghao Chi Date: Mon Jun 6 03:37:05 2022 +0000 ASoC: imx-audmux: remove unnecessary check of clk_disable_unprepare/clk_prepare_enable Because clk_disable_unprepare/clk_prepare_enable already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20220606033705.291048-1-chi.minghao@zte.com.cn Signed-off-by: Mark Brown sound/soc/fsl/imx-audmux.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit d3d8feadcc54c28015b62436a1f69d1080b85fb5 Merge: ff87d619ac18 28086d05ada6 Author: Mark Brown Date: Thu Jun 9 11:26:00 2022 +0100 Specify clock provider directly to CPU DAIs Merge series from Charles Keepax : Currently the set_fmt callback always passes clock provider/consumer with respect to the CODEC. This made sense when the framework was directly broken down into platforms and CODECs. However, as things are now broken down into components which can be connected as either the CPU or CODEC side of a DAI link it simplifies things if each side of the link is just told if it is provider or consumer of the clocks. Making this change allows us to remove one of the last parts of the ASoC core that needs to know if a driver is a CODEC driver, where it flips the clock format specifier if a CODEC driver is used on the CPU side of a DAI link, as well as just being conceptually more consistent with componentisation. The basic idea of this patch chain is to change the set_fmt callback from specifying if the CODEC is provider/consumer into directly specifying if the component is provider/consumer. To do this we add some new defines, and then to preserve bisectability, the migration is done by adding a new callback, converting over all existing CPU side drivers, converting the core, and then finally reverting back to the old callback. Converting the platform drivers makes sense as the existing defines are from the perspective of the CODEC and there are more CODEC drivers than platform drivers. Obviously a fair amount of this patch chain I was only able to build test, so any testing that can be done would be greatly appreciated. commit e4c437cd9214e61a4fc4bb40e83f2ea12dbeff0e Merge: 5834e72eda0b acc38e041bd3 Author: Paolo Abeni Date: Thu Jun 9 12:42:03 2022 +0200 Merge branch 'vmxnet3-upgrade-to-version-7' Ronak Doshi says: ==================== vmxnet3: upgrade to version 7 vmxnet3 emulation has recently added several new features including support for uniform passthrough(UPT). To make UPT work vmxnet3 has to be enhanced as per the new specification. This patch series extends the vmxnet3 driver to leverage these new features. Compatibility is maintained using existing vmxnet3 versioning mechanism as follows: - new features added to vmxnet3 emulation are associated with new vmxnet3 version viz. vmxnet3 version 7. - emulation advertises all the versions it supports to the driver. - during initialization, vmxnet3 driver picks the highest version number supported by both the emulation and the driver and configures emulation to run at that version. In particular, following changes are introduced: Patch 1: This patch introduces utility macros for vmxnet3 version 7 comparison and updates Copyright information. Patch 2: This patch adds new capability registers to fine control enablement of individual features based on emulation and passthrough. Patch 3: This patch adds support for large passthrough BAR register. Patch 4: This patch adds support for out of order rx completion processing. Patch 5: This patch introduces new command to set ring buffer sizes to pass this information to the hardware. Patch 6: For better performance, hardware has a requirement to limit number of TSO descriptors. This patch adds that support. Patch 7: With vmxnet3 version 7, new descriptor fields are used to indicate encapsulation offload. Patch 8: With all vmxnet3 version 7 changes incorporated in the vmxnet3 driver, with this patch, the driver can configure emulation to run at vmxnet3 version 7. Changes in v2->v3: - use correct byte ordering for ringBufSize Changes in v2: - use local rss_fields variable for the rss capability checks in patch 2 ==================== Link: https://lore.kernel.org/r/20220608032353.964-1-doshir@vmware.com Signed-off-by: Paolo Abeni commit acc38e041bd304621d4f59cea4849747d13bba9c Author: Ronak Doshi Date: Tue Jun 7 20:23:53 2022 -0700 vmxnet3: update to version 7 With all vmxnet3 version 7 changes incorporated in the vmxnet3 driver, the driver can configure emulation to run at vmxnet3 version 7, provided the emulation advertises support for version 7. Signed-off-by: Ronak Doshi Acked-by: Guolin Yang Signed-off-by: Paolo Abeni drivers/net/vmxnet3/vmxnet3_drv.c | 7 ++++++- drivers/net/vmxnet3/vmxnet3_int.h | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) commit 60cafa0395c2bed44d13277ed328317ed16a58c0 Author: Ronak Doshi Date: Tue Jun 7 20:23:52 2022 -0700 vmxnet3: use ext1 field to indicate encapsulated packet Till vmxnet3 version 6, om field of transmit descriptor was used to indicate encapsulated offload packet and msscof was used to indirectly indicate TSO/CSO. From version 7 and later, ext1 field will be used to indicate whether packet is encapsulated or not and om fields will continue to indicate if the packet is TSO or CSO. Signed-off-by: Ronak Doshi Acked-by: Guolin Yang Signed-off-by: Paolo Abeni drivers/net/vmxnet3/vmxnet3_defs.h | 14 ++++++++------ drivers/net/vmxnet3/vmxnet3_drv.c | 18 +++++++++++++++--- 2 files changed, 23 insertions(+), 9 deletions(-) commit d2857b99a74b082368ee80f359372faa1d051043 Author: Ronak Doshi Date: Tue Jun 7 20:23:51 2022 -0700 vmxnet3: limit number of TXDs used for TSO packet Currently, vmxnet3 does not have a limit on number of descriptors used for a TSO packet. However, with UPT, for hardware performance reasons, this patch limits the number of transmit descriptors to 24 for a TSO packet. Signed-off-by: Ronak Doshi Acked-by: Guolin Yang Signed-off-by: Paolo Abeni drivers/net/vmxnet3/vmxnet3_defs.h | 2 ++ drivers/net/vmxnet3/vmxnet3_drv.c | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) commit c7112ebd27ea0dbe4eecd5c96cad93757e34e73d Author: Ronak Doshi Date: Tue Jun 7 20:23:50 2022 -0700 vmxnet3: add command to set ring buffer sizes This patch adds a new command to set ring buffer sizes. This is required to pass the buffer size information to passthrough devices. For performance reasons, with version7 and later, ring1 will contain only mtu size buffers (bound to 3K). Packets > 3K will use both ring1 and ring2. Also, ring sizes are round down to power of 2 and ring2 default size is increased to 512. Signed-off-by: Ronak Doshi Acked-by: Guolin Yang Signed-off-by: Paolo Abeni drivers/net/vmxnet3/vmxnet3_defs.h | 11 +++++++ drivers/net/vmxnet3/vmxnet3_drv.c | 57 +++++++++++++++++++++++++++-------- drivers/net/vmxnet3/vmxnet3_ethtool.c | 7 +++++ drivers/net/vmxnet3/vmxnet3_int.h | 3 +- 4 files changed, 65 insertions(+), 13 deletions(-) commit 2c5a5748105a6bb901579d365c6f93e79f282b69 Author: Ronak Doshi Date: Tue Jun 7 20:23:49 2022 -0700 vmxnet3: add support for out of order rx completion Currently, vmxnet3 processes rx completions in-order i.e. no out of order completion descriptor is expected. With UPT, if hardware supports LRO, then hardware can report out of order rx completions. This patch enhances vmxnet3 to add this support. This supports gets effective only when the corresponding feature bit is set. Also, minor enhancements are done for performance. Signed-off-by: Ronak Doshi Acked-by: Guolin Yang Signed-off-by: Paolo Abeni drivers/net/vmxnet3/vmxnet3_drv.c | 70 ++++++++++++++++++++++++++++++++------- drivers/net/vmxnet3/vmxnet3_int.h | 5 +++ 2 files changed, 63 insertions(+), 12 deletions(-) commit 543fb67405410cc548a72d7a9a4087688d2f56ac Author: Ronak Doshi Date: Tue Jun 7 20:23:48 2022 -0700 vmxnet3: add support for large passthrough BAR register For vmxnet3 to work in UPT mode, the BAR sizes have been increased. The PT page has been extended to 2 pages and also includes OOB pages as a part of PT BAR. This patch enhances vmxnet3 to use appropriate BAR offsets based on the capability registered. To use new offsets, VMXNET3_CAP_LARGE_BAR needs to be set by the device. If it is not set then the device will use legacy PT page layout. Signed-off-by: Ronak Doshi Acked-by: Guolin Yang Signed-off-by: Paolo Abeni drivers/net/vmxnet3/vmxnet3_defs.h | 14 ++++++++++++-- drivers/net/vmxnet3/vmxnet3_drv.c | 25 ++++++++++++++++++++----- drivers/net/vmxnet3/vmxnet3_ethtool.c | 6 +++--- drivers/net/vmxnet3/vmxnet3_int.h | 3 +++ 4 files changed, 38 insertions(+), 10 deletions(-) commit 6f91f4ba046e5de6a6e579620b32b8ecf56873f7 Author: Ronak Doshi Date: Tue Jun 7 20:23:47 2022 -0700 vmxnet3: add support for capability registers This patch enhances vmxnet3 to suuport capability registers which allows it to enable features selectively. The DCR register tracks the capabilities vmxnet3 device supports. The PTCR register states the capabilities that the passthrough device supports. With the help of these registers, vmxnet3 can enable only those features which the passthrough device supoprts. This allows smooth trasition to Uniform-Passthrough (UPT) mode if the virtual nic requests it. If PTCR register returns nothing or error it means UPT is not being requested and vnic will continue in emulation mode. Signed-off-by: Ronak Doshi Acked-by: Guolin Yang Signed-off-by: Paolo Abeni drivers/net/vmxnet3/vmxnet3_defs.h | 37 ++++++++++++- drivers/net/vmxnet3/vmxnet3_drv.c | 97 ++++++++++++++++++++++++++++++++ drivers/net/vmxnet3/vmxnet3_ethtool.c | 101 ++++++++++++++++++++++++++++++++-- drivers/net/vmxnet3/vmxnet3_int.h | 4 ++ 4 files changed, 233 insertions(+), 6 deletions(-) commit 55f0395fcace9e675af2cbb96015ce1ae8856806 Author: Ronak Doshi Date: Tue Jun 7 20:23:46 2022 -0700 vmxnet3: prepare for version 7 changes vmxnet3 is currently at version 6 and this patch initiates the preparation to accommodate changes for upto version 7. Introduced utility macros for vmxnet3 version 7 comparison and update Copyright information. Signed-off-by: Ronak Doshi Acked-by: Guolin Yang Signed-off-by: Paolo Abeni drivers/net/vmxnet3/Makefile | 2 +- drivers/net/vmxnet3/upt1_defs.h | 2 +- drivers/net/vmxnet3/vmxnet3_defs.h | 2 +- drivers/net/vmxnet3/vmxnet3_drv.c | 2 +- drivers/net/vmxnet3/vmxnet3_ethtool.c | 2 +- drivers/net/vmxnet3/vmxnet3_int.h | 5 ++++- 6 files changed, 9 insertions(+), 6 deletions(-) commit 4643e10a17e549467420aaeeb35c9b3480716618 Author: Peter Ujfalusi Date: Thu Jun 9 11:59:49 2022 +0300 ASoC: SOF: Intel: hda-loader: Clarify the cl_dsp_init() flow Update the comment for the cl_dsp_init() to clarify what is done by the function and use the chip->init_core_mask instead of BIT(0) when unstalling/running the init core. Complements: 2a68ff846164 ("ASoC: SOF: Intel: hda: Revisit IMR boot sequence") Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220609085949.29062-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-loader.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fcb3c775f7073410965ce9414ddb2a1f339c502b Author: Peter Ujfalusi Date: Thu Jun 9 11:59:48 2022 +0300 ASoC: SOF: Intel: hda-loader: Make sure that the fw load sequence is followed The hda_dsp_enable_core() is powering up _and_ unstall the core in one call while the first step of the firmware loading must not unstall the core. The core can be unstalled only after the set cpb_cfp and the configuration of the IPC register for the ROM_CONTROL message. Complements: 2a68ff846164 ("ASoC: SOF: Intel: hda: Revisit IMR boot sequence") Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220609085949.29062-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 537b4a0c8b9490d762e70c0ecec38144c83d0c37 Author: Peter Ujfalusi Date: Thu Jun 9 11:59:47 2022 +0300 ASoC: SOF: Intel: hda-dsp: Expose hda_dsp_core_power_up() The hda_dsp_core_power_up() needs to be exposed so that it can be used in hda-loader.c to correct the boot flow. The first step must not unstall the core, it should only power up the core(s). Add sanity check for the core_mask while exposing it to be safe. Complements: 2a68ff846164 ("ASoC: SOF: Intel: hda: Revisit IMR boot sequence") Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220609085949.29062-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dsp.c | 10 +++++++++- sound/soc/sof/intel/hda.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) commit 565f82b57abe88ca68688dff1740b10b3c3049e4 Author: Bob Peterson Date: Thu May 26 09:56:51 2022 -0500 gfs2: Rewrap overlong comment in do_promote Rewrap the comment to keep the line length below 80 characters. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher fs/gfs2/glock.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f17c655cfb99796918d96ae25261db2640407d01 Author: Thomas Zimmermann Date: Wed Jun 8 13:51:22 2022 +0200 drm/mgag200: Include for G200 BIOS code After moving the vmalloc() call to another file, the rsp include statement needs to be moved as well. Resolves a build warning on parisc. drivers/gpu/drm/mgag200/mgag200_g200.c: In function 'mgag200_g200_init_refclk': drivers/gpu/drm/mgag200/mgag200_g200.c:120:16: error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration] Signed-off-by: Thomas Zimmermann Fixes: 85397f6bc4ff ("drm/mgag200: Initialize each model in separate function") Reviewed-by: Daniel Vetter Reported-by: kernel test robot Cc: Thomas Zimmermann Cc: Jocelyn Falempe Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Link: https://lore.kernel.org/all/202206080734.ztAvDG7O-lkp@intel.com/ Link: https://patchwork.freedesktop.org/patch/msgid/20220608115122.7448-1-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_drv.c | 1 - drivers/gpu/drm/mgag200/mgag200_g200.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit 54eed5c7b938dc4ef6b14d4ee048bbdafdbce352 Author: Tao Jin Date: Thu May 19 23:51:32 2022 -0400 HID: multitouch: new device class fix Lenovo X12 trackpad sticky The trackpad of the given device sends continuous report of pointers status as per wxn8 spec. However, the spec did not clarify when the fingers are lifted so fast that between the interval of two report frames fingers on pad reduced from >=2 to 0. The second last report contains >=2 fingers with tip state 1 and the last report contains only 1 finger with tip state 0. Although this can happen unfrequently, a quick fix will be improve the consistency to 100%. A quick fix is to disable MT_QUIRK_ALWAYS_VALID and enable MT_QUIRK_NOT_SEEN_MEANS_UP. Test for hid-tools is added in [1] In addition to this, I2C device 04CA:00B1 may also need similar class but with MT_QUIRK_FORCE_MULTI_INPUT disabled (but it does not harm to enable it on non-multi-input device either). The respective owner has been notified and a patch may coming soon after test. [1]: https://gitlab.freedesktop.org/libevdev/hid-tools/-/merge_requests/130 Signed-off-by: Tao Jin Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 381583845d19cb4bd21c8193449385f3fefa9caf Author: Harshit Mogalapalli Date: Wed Jun 8 05:26:09 2022 -0700 HID: cp2112: prevent a buffer overflow in cp2112_xfer() Smatch warnings: drivers/hid/hid-cp2112.c:793 cp2112_xfer() error: __memcpy() 'data->block[1]' too small (33 vs 255) drivers/hid/hid-cp2112.c:793 cp2112_xfer() error: __memcpy() 'buf' too small (64 vs 255) The 'read_length' variable is provided by 'data->block[0]' which comes from user and it(read_length) can take a value between 0-255. Add an upper bound to 'read_length' variable to prevent a buffer overflow in memcpy(). Fixes: 542134c0375b ("HID: cp2112: Fix I2C_BLOCK_DATA transactions") Signed-off-by: Harshit Mogalapalli Signed-off-by: Jiri Kosina drivers/hid/hid-cp2112.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0a43452bb6b1f499b695b123e9fedf4b1a9bbf64 Author: Viresh Kumar Date: Wed May 25 14:47:59 2022 +0530 OPP: Track if clock name is configured by platform Track if the clock name is configured by the platform or not. This is a preparatory change and will be used by later commits. This also makes the behavior of the clkname API similar to other ones, which allow repeated calls to the same API for each CPU. Signed-off-by: Viresh Kumar drivers/opp/core.c | 7 +++++++ drivers/opp/opp.h | 2 ++ 2 files changed, 9 insertions(+) commit 9bfb1ffff1972291738b4288e7653ba7ea3c24fa Author: Viresh Kumar Date: Fri Jun 3 15:27:55 2022 +0530 OPP: Fix typo in comment Replace rate with state. Signed-off-by: Viresh Kumar drivers/opp/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb4e34856b77ff52f2b18e0554d364b558f9b258 Author: Martin Povišer Date: Tue May 31 23:36:15 2022 +0200 MAINTAINERS: Add ADMAC driver under ARM/APPLE MACHINE Register the driver source and binding schema. Signed-off-by: Martin Povišer Link: https://lore.kernel.org/r/20220531213615.7822-4-povik+lin@cutebit.org Signed-off-by: Vinod Koul MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit b127315d9a78c011c011b88b92f650510edcfbd2 Author: Martin Povišer Date: Tue May 31 23:36:14 2022 +0200 dmaengine: apple-admac: Add Apple ADMAC driver Add driver for Audio DMA Controller present on Apple SoCs from the "Apple Silicon" family. Signed-off-by: Martin Povišer Link: https://lore.kernel.org/r/20220531213615.7822-3-povik+lin@cutebit.org Signed-off-by: Vinod Koul drivers/dma/Kconfig | 8 + drivers/dma/Makefile | 1 + drivers/dma/apple-admac.c | 818 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 827 insertions(+) commit 873971f8fb080d9d65865650fb43d5b9ee9a0d5d Author: Martin Povišer Date: Tue May 31 23:36:13 2022 +0200 dt-bindings: dma: Add Apple ADMAC Apple's Audio DMA Controller (ADMAC) is used to fetch and store audio samples on SoCs from the "Apple Silicon" family. Reviewed-by: Rob Herring Signed-off-by: Martin Povišer Link: https://lore.kernel.org/r/20220531213615.7822-2-povik+lin@cutebit.org Signed-off-by: Vinod Koul .../devicetree/bindings/dma/apple,admac.yaml | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit 23fbc87c8ae6f550a2c919370d44fd29cbb568aa Author: Linus Walleij Date: Fri May 27 23:55:08 2022 +0200 dt-bindings: dma: Rewrite ST-Ericsson DMA40 to YAML This rewrites the ST-Ericsson DMA40 bindings in YAML. Cc: Lee Jones Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220527215508.622374-1-linus.walleij@linaro.org Signed-off-by: Vinod Koul .../devicetree/bindings/dma/ste-dma40.txt | 138 ------------------ .../devicetree/bindings/dma/stericsson,dma40.yaml | 159 +++++++++++++++++++++ 2 files changed, 159 insertions(+), 138 deletions(-) commit e8ecf73adbb41ee00d5fbaf35c3edab252b5d30f Author: Geert Uytterhoeven Date: Wed Jun 8 17:42:58 2022 +0200 dmaengine: dmatest: Replace symbolic permissions by octal permissions Octal permissions are easier to read. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/a745b883288f95e999b71fac677bbc2daa13c22d.1654702928.git.geert+renesas@glider.be Signed-off-by: Vinod Koul drivers/dma/dmatest.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 5f89b97e1fd5f5e6f1df78aade50d92ca7809b4b Author: Geert Uytterhoeven Date: Wed Jun 8 17:42:01 2022 +0200 dmaengine: dmatest: Remove spaces before tabs Scripts/checkpath.pl says "please, no space before tabs". Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/d863916120d043e3f9dd2f2670238c34f68f7d5f.1654702886.git.geert+renesas@glider.be Signed-off-by: Vinod Koul drivers/dma/dmatest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5abaa500ff19a1a8de1e4fb3ac3015985d677a11 Author: Fabien Parent Date: Tue May 31 15:50:21 2022 +0200 dt-bindings: phy: mediatek,tphy: add MT8365 SoC bindings Add binding documentation for the MT8365 SoC. Signed-off-by: Fabien Parent Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220531135026.238475-13-fparent@baylibre.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/phy/mediatek,tphy.yaml | 1 + 1 file changed, 1 insertion(+) commit 65238f7ffcefacc0e817bb7f8c649a6230e7a40e Author: Fabien Parent Date: Tue May 31 15:50:20 2022 +0200 dt-bindings: phy: mediatek,dsi-phy: Add MT8365 SoC bindings Add binding documentation for the MT8365 SoC. Signed-off-by: Fabien Parent Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220531135026.238475-12-fparent@baylibre.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit baf32519979f22e34db255117449fd91a4ad3c53 Author: Fabien Parent Date: Tue May 31 15:50:14 2022 +0200 dt-bindings: dma: mediatek,uart-dma: add MT8365 bindings Add binding documentation in order to support the MT8365 SoC. Signed-off-by: Fabien Parent Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220531135026.238475-6-fparent@baylibre.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/mediatek,uart-dma.yaml | 1 + 1 file changed, 1 insertion(+) commit c24968734abfed81c8f93dc5f44a7b7a9aecadfa Author: Miaoqian Lin Date: Thu Jun 2 14:42:22 2022 +0400 drm/virtio: Fix NULL vs IS_ERR checking in virtio_gpu_object_shmem_init Since drm_prime_pages_to_sg() function return error pointers. The drm_gem_shmem_get_sg_table() function returns error pointers too. Using IS_ERR() to check the return value to fix this. Fixes: 2f2aa13724d5 ("drm/virtio: move virtio_gpu_mem_entry initialization to new function") Signed-off-by: Miaoqian Lin Link: http://patchwork.freedesktop.org/patch/msgid/20220602104223.54527-1-linmq006@gmail.com Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9e9fa6a9198b767b00f48160800128e83a038f9f Author: Vivek Kasireddy Date: Fri May 20 13:52:35 2022 -0700 udmabuf: Set the DMA mask for the udmabuf device (v2) If the DMA mask is not set explicitly, the following warning occurs when the userspace tries to access the dma-buf via the CPU as reported by syzbot here: WARNING: CPU: 1 PID: 3595 at kernel/dma/mapping.c:188 __dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188 Modules linked in: CPU: 0 PID: 3595 Comm: syz-executor249 Not tainted 5.17.0-rc2-syzkaller-00316-g0457e5153e0e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188 Code: 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 71 4c 8b 3d c0 83 b5 0d e9 db fe ff ff e8 b6 0f 13 00 0f 0b e8 af 0f 13 00 <0f> 0b 45 31 e4 e9 54 ff ff ff e8 a0 0f 13 00 49 8d 7f 50 48 b8 00 RSP: 0018:ffffc90002a07d68 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff88807e25e2c0 RSI: ffffffff81649e91 RDI: ffff88801b848408 RBP: ffff88801b848000 R08: 0000000000000002 R09: ffff88801d86c74f R10: ffffffff81649d72 R11: 0000000000000001 R12: 0000000000000002 R13: ffff88801d86c680 R14: 0000000000000001 R15: 0000000000000000 FS: 0000555556e30300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000200000cc CR3: 000000001d74a000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: dma_map_sgtable+0x70/0xf0 kernel/dma/mapping.c:264 get_sg_table.isra.0+0xe0/0x160 drivers/dma-buf/udmabuf.c:72 begin_cpu_udmabuf+0x130/0x1d0 drivers/dma-buf/udmabuf.c:126 dma_buf_begin_cpu_access+0xfd/0x1d0 drivers/dma-buf/dma-buf.c:1164 dma_buf_ioctl+0x259/0x2b0 drivers/dma-buf/dma-buf.c:363 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f62fcf530f9 Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe3edab9b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f62fcf530f9 RDX: 0000000020000200 RSI: 0000000040086200 RDI: 0000000000000006 RBP: 00007f62fcf170e0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f62fcf17170 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 v2: Dont't forget to deregister if DMA mask setup fails. Reported-by: syzbot+10e27961f4da37c443b2@syzkaller.appspotmail.com Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy Link: http://patchwork.freedesktop.org/patch/msgid/20220520205235.3687336-1-vivek.kasireddy@intel.com Signed-off-by: Gerd Hoffmann drivers/dma-buf/udmabuf.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 20f038d074d4fa52e88a36bebf25e81c88d7e6fd Author: Minghao Chi Date: Fri Apr 29 05:49:11 2022 +0000 drm/virtio: simplify the return expression Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Link: http://patchwork.freedesktop.org/patch/msgid/20220429054911.3851977-1-chi.minghao@zte.com.cn Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_prime.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit d9c1452c0f07c2e0766a6cf3921eca182e26fdf3 Author: Tom Rix Date: Thu Apr 21 10:20:54 2022 -0400 drm/qxl: remove qxl_log_level global Smatch reports this issue qxl_kms.c:36:5: warning: symbol 'qxl_log_level' was not declared. Should it be static? qxl_log_level is defined qxl_kms.c but unused, so remove. Signed-off-by: Tom Rix Link: http://patchwork.freedesktop.org/patch/msgid/20220421142054.3751507-1-trix@redhat.com Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_kms.c | 2 -- 1 file changed, 2 deletions(-) commit 430ac054e5ea172a880e07da494f65f0b80d8fb8 Author: Michel Dänzer Date: Wed Apr 13 18:12:59 2022 +0200 drm/bochs: Explicitly include linux/module.h Instead of relying on it getting pulled in indirectly. Signed-off-by: Michel Dänzer Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20220413161259.1854270-1-michel@daenzer.net Signed-off-by: Gerd Hoffmann drivers/gpu/drm/tiny/bochs.c | 1 + 1 file changed, 1 insertion(+) commit bd63f11f4c3c46afec07d821f74736161ff6e526 Author: Xiaomeng Tong Date: Sun Mar 27 13:09:45 2022 +0800 virtio-gpu: fix a missing check to avoid NULL dereference 'cache_ent' could be set NULL inside virtio_gpu_cmd_get_capset() and it will lead to a NULL dereference by a lately use of it (i.e., ptr = cache_ent->caps_cache). Fix it with a NULL check. Fixes: 62fb7a5e10962 ("virtio-gpu: add 3d/virgl support") Signed-off-by: Xiaomeng Tong Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20220327050945.1614-1-xiam0nd.tong@gmail.com [ kraxel: minor codestyle fixup ] Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_ioctl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5834e72eda0b7e5767eb107259d98eef19ebd11f Author: Juergen Gross Date: Wed Jun 8 06:37:26 2022 +0200 xen/netback: do some code cleanup Remove some unused macros and functions, make local functions static. Signed-off-by: Juergen Gross Acked-by: Wei Liu Link: https://lore.kernel.org/r/20220608043726.9380-1-jgross@suse.com Signed-off-by: Jakub Kicinski drivers/net/xen-netback/common.h | 12 ------------ drivers/net/xen-netback/interface.c | 16 +--------------- drivers/net/xen-netback/netback.c | 4 +++- drivers/net/xen-netback/rx.c | 2 +- 4 files changed, 5 insertions(+), 29 deletions(-) commit 42a09d932a3c202709e6385fa8bead04329106fd Merge: a84a434baf94 35a2443d0910 Author: Jakub Kicinski Date: Wed Jun 8 21:01:23 2022 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 40GbE Intel Wired LAN Driver Updates 2022-06-07 This series contains updates to i40e and iavf drivers. Mateusz adds implementation for setting VF VLAN pruning to allow user to specify visibility of VLAN tagged traffic to VFs for i40e. He also adds waiting for result from PF for setting MAC address in iavf. ==================== Link: https://lore.kernel.org/r/20220607175506.696671-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit e8fbd344a5ea62663554b8546b6bf9f88b93785a Author: Miaoqian Lin Date: Thu Jun 2 07:19:08 2022 +0400 PCI: tegra194: Fix PM error handling in tegra_pcie_config_ep() pm_runtime_enable() will increase power disable depth. If dw_pcie_ep_init() fails, we should use pm_runtime_disable() to balance it with pm_runtime_enable(). Add missing pm_runtime_disable() for tegra_pcie_config_ep(). Fixes: c57247f940e8 ("PCI: tegra: Add support for PCIe endpoint mode in Tegra194") Link: https://lore.kernel.org/r/20220602031910.55859-1-linmq006@gmail.com Signed-off-by: Miaoqian Lin Signed-off-by: Bjorn Helgaas Reviewed-by: Vidya Sagar drivers/pci/controller/dwc/pcie-tegra194.c | 1 + 1 file changed, 1 insertion(+) commit 6aed665f9d8368ae1e962f44339150884bb47f5b Author: Christophe Leroy Date: Sat Mar 19 11:27:51 2022 +0100 drm/nouveau/bios: Rename prom_init() and friends functions While working at fixing powerpc headers, I ended up with the following error. drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c:48:1: error: conflicting types for 'prom_init'; have 'void *(struct nvkm_bios *, const char *)' make[5]: *** [scripts/Makefile.build:288: drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.o] Error 1 powerpc and a few other architectures have a prom_init() global function. One day or another it will conflict with the one in shadowrom.c Those being static, they can easily be renamed. Do it. While at it, also rename the ops structure as 'nvbios_prom' instead of 'nvbios_rom' in order to make it clear that it refers to the NV_PROM device. Signed-off-by: Christophe Leroy Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/7e0612b61511ec8030e3b2dcbfaa7751781c8b91.1647684507.git.christophe.leroy@csgroup.eu drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) commit 99ad11e06be8ad29abee1ec3b8b22dfe77bbabec Author: Uwe Kleine-König Date: Thu May 26 15:12:13 2022 +0200 i2c: dummy: Drop no-op remove function A remove callback that just returns 0 is equivalent to no callback at all as can be seen in i2c_device_remove(). So simplify accordingly. Signed-off-by: Uwe Kleine-König Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 6 ------ 1 file changed, 6 deletions(-) commit f030304fdeb87ec8f1b518c73703214aec6cc24a Author: Miaoqian Lin Date: Sun Jun 5 09:51:23 2022 +0400 PCI: microchip: Fix refcount leak in mc_pcie_init_irq_domains() of_get_next_child() returns a node pointer with refcount incremented, so we should use of_node_put() on it when we don't need it anymore. mc_pcie_init_irq_domains() only calls of_node_put() in the normal path, missing it in some error paths. Add missing of_node_put() to avoid refcount leak. Fixes: 6f15a9c9f941 ("PCI: microchip: Add Microchip PolarFire PCIe controller driver") Link: https://lore.kernel.org/r/20220605055123.59127-1-linmq006@gmail.com Signed-off-by: Miaoqian Lin Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring drivers/pci/controller/pcie-microchip-host.c | 2 ++ 1 file changed, 2 insertions(+) commit 3d43273d7d1e1a5374d531e901d3c537b4c97bbf Author: Fabio Estevam Date: Wed May 25 22:09:14 2022 -0300 i2c: mxs: Silence a clang warning Change the of_device_get_match_data() cast to (uintptr_t) to silence the following clang warning: drivers/i2c/busses/i2c-mxs.c:802:18: warning: cast to smaller integer type 'enum mxs_i2c_devtype' from 'const void *' [-Wvoid-pointer-to-enum-cast] Reported-by: kernel test robot Fixes: c32abd8b5691 ("i2c: mxs: Remove unneeded platform_device_id") Signed-off-by: Fabio Estevam Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mxs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f24bc86adec6e2ba10a0da21fcfff1be10e77922 Author: Vladimir Zapolskiy Date: Thu Jun 2 19:52:58 2022 +0300 i2c: qcom-cci: simplify access to bus data structure Trivial non-functional change, which adds an alias to an extensively used data location. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Loic Poulain Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qcom-cci.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 5e69a33c5cec019dd8ca46e31749c6dc78f7cbf3 Author: Christoph Hellwig Date: Wed Jun 1 09:40:24 2022 +0200 PCI/ERR: Recognize disconnected devices in report_error_detected() When a device is already unplugged by pciehp by the time the AER handler is invoked, the PCIe device will already be in the pci_channel_io_perm_failure state. In that case simply return PCI_ERS_RESULT_DISCONNECT instead of trying to do a state transition that will fail. Also untangle the state transition failure from the lack of methods to improve the debugging output in case it happens again. Link: https://lore.kernel.org/r/20220601074024.3481035-1-hch@lst.de Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan drivers/pci/pcie/err.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 6f33a9daff9f07906365c4054c90b225f346cd0e Author: Wyes Karny Date: Mon Jun 6 23:33:36 2022 +0530 x86: Fix comment for X86_FEATURE_ZEN The feature X86_FEATURE_ZEN implies that the CPU based on Zen microarchitecture. Call this out explicitly in the comment. Signed-off-by: Wyes Karny Signed-off-by: Dave Hansen Tested-by: Zhang Rui Link: https://lkml.kernel.org/r/9931b01a85120a0d1faf0f244e8de3f2190e774c.1654538381.git-series.wyes.karny@amd.com arch/x86/include/asm/cpufeatures.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffad0a354b0c844656f0ff44df4cd9233865a9cf Author: Tyrone Ting Date: Wed May 25 11:23:41 2022 +0800 i2c: npcm: Capitalize the one-line comment Make the one-line comments capital in the driver to get the comment style consistent. Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver") Signed-off-by: Tyrone Ting Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-npcm7xx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit bbc38ed53a02a759d8e5c01e834eca49304a2315 Author: Tyrone Ting Date: Wed May 25 11:23:40 2022 +0800 i2c: npcm: Support NPCM845 Add NPCM8XX I2C support. The NPCM8XX uses a similar i2c module as NPCM7XX. The internal HW FIFO is larger in NPCM8XX. Signed-off-by: Tyrone Ting Acked-by: Tomer Maimon Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 8 +-- drivers/i2c/busses/Makefile | 2 +- drivers/i2c/busses/i2c-npcm7xx.c | 114 ++++++++++++++++++++++++--------------- 3 files changed, 76 insertions(+), 48 deletions(-) commit d7aa1b149b8fc04d802879cf4662010aa4a42deb Author: Tali Perry Date: Wed May 25 11:23:39 2022 +0800 i2c: npcm: Correct slave role behavior Correct the slave transaction logic to be compatible with the generic slave backend driver. Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver") Signed-off-by: Tali Perry Signed-off-by: Tyrone Ting Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-npcm7xx.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 47d506d1a28fd10a9fb1f33df5622d88fae72095 Author: Tali Perry Date: Wed May 25 11:23:38 2022 +0800 i2c: npcm: Remove own slave addresses 2:10 NPCM can support up to 10 own slave addresses. In practice, only one address is actually being used. In order to access addresses 2 and above, need to switch register banks. The switch needs spinlock. To avoid using spinlock for this useless feature removed support of SA >= 2. Also fix returned slave event enum. Remove some comment since the bank selection is not required. The bank selection is not required since the supported slave addresses are reduced. Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver") Signed-off-by: Tali Perry Signed-off-by: Tyrone Ting Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-npcm7xx.c | 41 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 25 deletions(-) commit 29d2bff1c34ad3e413bcdaa81b88e209b308031d Author: Tyrone Ting Date: Wed May 25 11:23:37 2022 +0800 dt-bindings: i2c: npcm: support NPCM845 Add compatible and nuvoton,sys-mgr description for NPCM i2c module. Signed-off-by: Tyrone Ting Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang .../bindings/i2c/nuvoton,npcm7xx-i2c.yaml | 25 +++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit aebef63cf7ff222660fd321c47e24452e8437673 Author: Wyes Karny Date: Mon Jun 6 23:33:35 2022 +0530 x86: Remove vendor checks from prefer_mwait_c1_over_halt Remove vendor checks from prefer_mwait_c1_over_halt function. Restore the decision tree to support MWAIT C1 as the default idle state based on CPUID checks as done by Thomas Gleixner in commit 09fd4b4ef5bc ("x86: use cpuid to check MWAIT support for C1") The decision tree is removed in commit 69fb3676df33 ("x86 idle: remove mwait_idle() and "idle=mwait" cmdline param") Prefer MWAIT when the following conditions are satisfied: 1. CPUID_Fn00000001_ECX [Monitor] should be set 2. CPUID_Fn00000005 should be supported 3. If CPUID_Fn00000005_ECX [EMX] is set then there should be at least one C1 substate available, indicated by CPUID_Fn00000005_EDX [MWaitC1SubStates] bits. Otherwise use HLT for default_idle function. HPC customers who want to optimize for lower latency are known to disable Global C-States in the BIOS. In fact, some vendors allow choosing a BIOS 'performance' profile which explicitly disables C-States. In this scenario, the cpuidle driver will not be loaded and the kernel will continue with the default idle state chosen at boot time. On AMD systems currently the default idle state is HLT which has a higher exit latency compared to MWAIT. The reason for the choice of HLT over MWAIT on AMD systems is: 1. Families prior to 10h didn't support MWAIT 2. Families 10h-15h supported MWAIT, but not MWAIT C1. Hence it was preferable to use HLT as the default state on these systems. However, AMD Family 17h onwards supports MWAIT as well as MWAIT C1. And it is preferable to use MWAIT as the default idle state on these systems, as it has lower exit latencies. The below table represents the exit latency for HLT and MWAIT on AMD Zen 3 system. Exit latency is measured by issuing a wakeup (IPI) to other CPU and measuring how many clock cycles it took to wakeup. Each iteration measures 10K wakeups by pinning source and destination. HLT: 25.0000th percentile : 1900 ns 50.0000th percentile : 2000 ns 75.0000th percentile : 2300 ns 90.0000th percentile : 2500 ns 95.0000th percentile : 2600 ns 99.0000th percentile : 2800 ns 99.5000th percentile : 3000 ns 99.9000th percentile : 3400 ns 99.9500th percentile : 3600 ns 99.9900th percentile : 5900 ns Min latency : 1700 ns Max latency : 5900 ns Total Samples 9999 MWAIT: 25.0000th percentile : 1400 ns 50.0000th percentile : 1500 ns 75.0000th percentile : 1700 ns 90.0000th percentile : 1800 ns 95.0000th percentile : 1900 ns 99.0000th percentile : 2300 ns 99.5000th percentile : 2500 ns 99.9000th percentile : 3200 ns 99.9500th percentile : 3500 ns 99.9900th percentile : 4600 ns Min latency : 1200 ns Max latency : 4600 ns Total Samples 9997 Improvement (99th percentile): 21.74% Below is another result for context_switch2 micro-benchmark, which brings out the impact of improved wakeup latency through increased context-switches per second. with HLT: ------------------------------- 50.0000th percentile : 190184 75.0000th percentile : 191032 90.0000th percentile : 192314 95.0000th percentile : 192520 99.0000th percentile : 192844 MIN : 190148 MAX : 192852 with MWAIT: ------------------------------- 50.0000th percentile : 277444 75.0000th percentile : 278268 90.0000th percentile : 278888 95.0000th percentile : 279164 99.0000th percentile : 280504 MIN : 273278 MAX : 281410 Improvement(99th percentile): ~ 45.46% Signed-off-by: Wyes Karny Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Tested-by: Zhang Rui Link: https://ozlabs.org/~anton/junkcode/context_switch2.c Link: https://lkml.kernel.org/r/0cc675d8fd1f55e41b510e10abf2e21b6e9803d5.1654538381.git-series.wyes.karny@amd.com arch/x86/include/asm/mwait.h | 1 + arch/x86/kernel/process.c | 35 +++++++++++++++++++++++++---------- 2 files changed, 26 insertions(+), 10 deletions(-) commit 8bcedb4ce04750e1ccc9a6b6433387f6a9166a56 Author: Wyes Karny Date: Mon Jun 6 23:33:34 2022 +0530 x86: Handle idle=nomwait cmdline properly for x86_idle When kernel is booted with idle=nomwait do not use MWAIT as the default idle state. If the user boots the kernel with idle=nomwait, it is a clear direction to not use mwait as the default idle state. However, the current code does not take this into consideration while selecting the default idle state on x86. Fix it by checking for the idle=nomwait boot option in prefer_mwait_c1_over_halt(). Also update the documentation around idle=nomwait appropriately. [ dhansen: tweak commit message ] Signed-off-by: Wyes Karny Signed-off-by: Dave Hansen Tested-by: Zhang Rui Link: https://lkml.kernel.org/r/fdc2dc2d0a1bc21c2f53d989ea2d2ee3ccbc0dbe.1654538381.git-series.wyes.karny@amd.com Documentation/admin-guide/pm/cpuidle.rst | 15 +++++++++------ arch/x86/kernel/process.c | 9 ++++++--- 2 files changed, 15 insertions(+), 9 deletions(-) commit 8ad69f4905160d5edfb32aa64f65656b22597edb Author: Conor Dooley Date: Mon Jun 6 21:13:42 2022 +0100 dt-bindings: i2c: convert ocores binding to yaml Convert the open cores i2c controller binding from text to yaml. Reviewed-by: Rob Herring Signed-off-by: Conor Dooley Signed-off-by: Wolfram Sang .../devicetree/bindings/i2c/i2c-ocores.txt | 78 -------------- .../bindings/i2c/opencores,i2c-ocores.yaml | 113 +++++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 114 insertions(+), 79 deletions(-) commit 74557cb4e84f2f6583a9fe397e262859cb4841bb Author: Rob Herring Date: Mon Jun 6 13:43:39 2022 -0500 dt-bindings: i2c: Convert arm,i2c-versatile to DT schema Convert the arm,i2c-versatile binding to DT schema format. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski [wsa: fixed "arn" typo spotted by Krzysztof] Signed-off-by: Wolfram Sang .../devicetree/bindings/i2c/arm,i2c-versatile.yaml | 29 ++++++++++++++++++++++ .../devicetree/bindings/i2c/i2c-versatile.txt | 10 -------- MAINTAINERS | 2 +- 3 files changed, 30 insertions(+), 11 deletions(-) commit 577584582db59f26c9f27e59e0fd8f0162d2ccdb Author: Linus Walleij Date: Thu May 26 23:10:46 2022 +0200 dt-bindings: i2c: Rewrite Nomadik I2C bindings in YAML This rewrites the Nomadik I2C bindings in YAML, some extra tweaks were needed because of the way the original nomadik names the compatible with two compatibles and the DB8500 with three, and the two main variants use a different clock name. Signed-off-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang .../devicetree/bindings/i2c/i2c-nomadik.txt | 23 ----- .../devicetree/bindings/i2c/st,nomadik-i2c.yaml | 113 +++++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 114 insertions(+), 24 deletions(-) commit 2292639b4cc89f4411a7dd565634517fb09ec97c Author: Joel Selvaraj Date: Fri Apr 1 05:48:09 2022 +0530 dt-bindings: display: novatek, nt36672a: add backlight property Add backlight property and update example to include it. Signed-off-by: Joel Selvaraj Acked-by: Rob Herring Reviewed-by: Marijn Suijten Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/BY5PR02MB70090BB5D8C7D655BEE0642FD9E09@BY5PR02MB7009.namprd02.prod.outlook.com Documentation/devicetree/bindings/display/panel/novatek,nt36672a.yaml | 2 ++ 1 file changed, 2 insertions(+) commit c11256f82ec82216f69dafee75b3d854d92392d1 Author: Joel Selvaraj Date: Fri Apr 1 05:48:08 2022 +0530 drm/panel: nt36672a: add backlight support Add support for backlight. This panel supports backlight control through the QCOM WLED driver in Xiaomi Poco F1 device. Signed-off-by: Joel Selvaraj Reviewed-by: Marijn Suijten Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/BY5PR02MB700935F5817128CB7C3991CDD9E09@BY5PR02MB7009.namprd02.prod.outlook.com drivers/gpu/drm/panel/panel-novatek-nt36672a.c | 4 ++++ 1 file changed, 4 insertions(+) commit a84a434baf9427a1c49782fb1f0973d1308016df Author: Peter Lafreniere Date: Mon Jun 6 07:34:58 2022 -0400 net: constify some inline functions in sock.h Despite these inline functions having full visibility to the compiler at compile time, they still strip const from passed pointers. This change allows for functions in various network drivers to be marked as const that could not be marked const before. Signed-off-by: Peter Lafreniere Link: https://lore.kernel.org/r/20220606113458.35953-1-pjlafren@mtu.edu Signed-off-by: Jakub Kicinski include/net/sock.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b172862241b4849985c3e0e86cfb05d61e4a841d Author: Paul Durrant Date: Tue May 31 13:44:21 2022 +0100 KVM: x86: PIT: Preserve state of speaker port data bit Currently the state of the speaker port (0x61) data bit (bit 1) is not saved in the exported state (kvm_pit_state2) and hence is lost when re-constructing guest state. This patch removes the 'speaker_data_port' field from kvm_kpit_state and instead tracks the state using a new KVM_PIT_FLAGS_SPEAKER_DATA_ON flag defined in the API. Signed-off-by: Paul Durrant Message-Id: <20220531124421.1427-1-pdurrant@amazon.com> Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 4 +++- arch/x86/include/uapi/asm/kvm.h | 3 ++- arch/x86/kvm/i8254.c | 10 +++++++--- arch/x86/kvm/i8254.h | 1 - 4 files changed, 12 insertions(+), 6 deletions(-) commit 3dbec44d9c94d8350a39326561ac40f969c63d16 Author: Sean Christopherson Date: Fri May 27 17:06:58 2022 +0000 KVM: VMX: Reject kvm_intel if an inconsistent VMCS config is detected Add an on-by-default module param, error_on_inconsistent_vmcs_config, to allow rejecting the load of kvm_intel if an inconsistent VMCS config is detected. Continuing on with an inconsistent, degraded config is undesirable in the vast majority of use cases, e.g. may result in a misconfigured VM, poor performance due to lack of fast MSR switching, or even security issues in the unlikely event the guest is relying on MPX. Practically speaking, an inconsistent VMCS config should never be encountered in a production quality environment, e.g. on bare metal it indicates a silicon defect (or a disturbing lack of validation by the hardware vendor), and in a virtualized machine (KVM as L1) it indicates a buggy/misconfigured L0 VMM/hypervisor. Provide a module param to override the behavior for testing purposes, or in the unlikely scenario that KVM is deployed on a flawed-but-usable CPU or virtual machine. Note, what is or isn't an inconsistency is somewhat subjective, e.g. one might argue that LOAD_EFER without SAVE_EFER is an inconsistency. KVM's unofficial guideline for an "inconsistency" is either scenarios that are completely nonsensical, e.g. the existing checks on having EPT/VPID knobs without EPT/VPID, and/or scenarios that prevent KVM from virtualizing or utilizing a feature, e.g. the unpaired entry/exit controls checks. Other checks that fall into one or both of the covered scenarios could be added in the future, e.g. asserting that a VMCS control exists available if and only if the associated feature is supported in bare metal. Signed-off-by: Sean Christopherson Message-Id: <20220527170658.3571367-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit f5a81d0eb01e0dfebd175edffa7d0a1bdb74d026 Author: Sean Christopherson Date: Fri May 27 17:06:57 2022 +0000 KVM: VMX: Sanitize VM-Entry/VM-Exit control pairs at kvm_intel load time Sanitize the VM-Entry/VM-Exit control pairs (load+load or load+clear) during setup instead of checking both controls in a pair at runtime. If only one control is supported, KVM will report the associated feature as not available, but will leave the supported control bit set in the VMCS config, which could lead to corruption of host state. E.g. if only the VM-Entry control is supported and the feature is not dynamically toggled, KVM will set the control in all VMCSes and load zeros without restoring host state. Note, while this is technically a bug fix, practically speaking no sane CPU or VMM would support only one control. KVM's behavior of checking both controls is mostly pedantry. Cc: Chenyi Qiang Cc: Lei Wang Signed-off-by: Sean Christopherson Message-Id: <20220527170658.3571367-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/capabilities.h | 10 +++------- arch/x86/kvm/vmx/vmx.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 7 deletions(-) commit 8e6a58e28b34e8d247e772159b8fa8f6bae39192 Author: Like Xu Date: Wed Jun 1 11:19:23 2022 +0800 KVM: x86/pmu: Accept 0 for absent PMU MSRs when host-initiated if !enable_pmu Whenever an MSR is part of KVM_GET_MSR_INDEX_LIST, as is the case for MSR_K7_EVNTSEL0 or MSR_F15H_PERF_CTL0, it has to be always retrievable and settable with KVM_GET_MSR and KVM_SET_MSR. Accept a zero value for these MSRs to obey the contract. Signed-off-by: Like Xu Message-Id: <20220601031925.59693-1-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 8 ++++++++ arch/x86/kvm/svm/pmu.c | 11 ++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) commit 6ef25aa0a961298278301ae1d88106c701eb73fa Author: Like Xu Date: Wed Jun 1 11:19:24 2022 +0800 KVM: x86/pmu: Restrict advanced features based on module enable_pmu Once vPMU is disabled, the KVM would not expose features like: PEBS (via clear kvm_pmu_cap.pebs_ept), legacy LBR and ARCH_LBR, CPUID 0xA leaf, PDCM bit and MSR_IA32_PERF_CAPABILITIES, plus PT_MODE_HOST_GUEST mode. What this group of features has in common is that their use relies on the underlying PMU counter and the host perf_event as a back-end resource requester or sharing part of the irq delivery path. Signed-off-by: Like Xu Message-Id: <20220601031925.59693-2-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.h | 6 ++++-- arch/x86/kvm/vmx/capabilities.h | 4 ++++ arch/x86/kvm/vmx/vmx.c | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) commit b9181c8ef35636152facc72f801f27b4264df8c0 Author: Like Xu Date: Wed Jun 1 11:19:25 2022 +0800 KVM: x86/pmu: Avoid exposing Intel BTS feature The BTS feature (including the ability to set the BTS and BTINT bits in the DEBUGCTL MSR) is currently unsupported on KVM. But we may try using the BTS facility on a PEBS enabled guest like this: perf record -e branches:u -c 1 -d ls and then we would encounter the following call trace: [] unchecked MSR access error: WRMSR to 0x1d9 (tried to write 0x00000000000003c0) at rIP: 0xffffffff810745e4 (native_write_msr+0x4/0x20) [] Call Trace: [] intel_pmu_enable_bts+0x5d/0x70 [] bts_event_add+0x54/0x70 [] event_sched_in+0xee/0x290 As it lacks any CPUID indicator or perf_capabilities valid bit fields to prompt for this information, the platform would hint the Intel BTS feature unavailable to guest by setting the BTS_UNAVAIL bit in the IA32_MISC_ENABLE. Signed-off-by: Like Xu Message-Id: <20220601031925.59693-3-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.h | 3 +++ arch/x86/kvm/vmx/pmu_intel.c | 3 ++- arch/x86/kvm/x86.c | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) commit d7808f739162c003d249168bfe4c571aba18fb8a Author: Like Xu Date: Thu May 19 01:01:18 2022 +0800 KVM: x86/pmu: Update global enable_pmu when PMU is undetected On some virt platforms (L1 guest w/o PMU), the value of module parameter 'enable_pmu' for nested L2 guests should be updated at initialisation. Considering that there is no concept of "architecture pmu" in AMD or Hygon and that the versions (prior to Zen 4) are all 0, but that the theoretical available counters are at least AMD64_NUM_COUNTERS, the utility check_hw_exists() is reused in the initialisation call path. Opportunistically update Intel specific comments. Fixes: 8eeac7e999e8 ("KVM: x86/pmu: Add kvm_pmu_cap to optimize perf_get_x86_pmu_capability") Signed-off-by: Like Xu Message-Id: <20220518170118.66263-3-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 916e3a4f950eac92c28cc138c10d86514ffebf98 Author: Paolo Bonzini Date: Wed Jun 1 05:45:17 2022 -0400 x86: events: Do not return bogus capabilities if PMU is broken If the PMU is broken due to firmware issues, check_hw_exists() will return false but perf_get_x86_pmu_capability() will still return data from x86_pmu. Likewise if some of the hotplug callbacks cannot be installed the contents of x86_pmu will not be reverted. Handle the failure in both cases by clearing x86_pmu if init_hw_perf_events() or reverts to software events only. Co-developed-by: Like Xu Signed-off-by: Like Xu Signed-off-by: Paolo Bonzini arch/x86/events/core.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 92d80178a35b1ab04c4a8250a06399150dbf0b6a Author: Like Xu Date: Tue May 17 11:40:45 2022 -0400 perf/x86/intel: Fix the comment about guest LBR support on KVM Starting from v5.12, KVM reports guest LBR and extra_regs support when the host has relevant support. Just delete this part of the comment and fix a typo incidentally. Cc: Peter Zijlstra Reviewed-by: Kan Liang Reviewed-by: Andi Kleen Signed-off-by: Like Xu Signed-off-by: Yang Weijiang Message-Id: <20220517154100.29983-2-weijiang.yang@intel.com> Signed-off-by: Paolo Bonzini arch/x86/events/intel/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 17e9157c4ed00a90fcf34d9caffee90d194ebfa3 Author: Christophe JAILLET Date: Tue Jun 7 14:51:03 2022 +0200 nfp: Remove kernel.h when not needed When kernel.h is used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved. Remove kernel.h when it is not needed. Signed-off-by: Christophe JAILLET Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20220607125103.487801-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/netronome/nfp/nfpcore/crc32.h | 1 - 1 file changed, 1 deletion(-) commit ff87d619ac180444db297f043962a5c325ded47b Author: Shengjiu Wang Date: Thu May 19 20:36:48 2022 +0800 ASoC: fsl_sai: Enable MCTL_MCLK_EN bit for master mode On i.MX8MM, the MCTL_MCLK_EN bit it is not only the gate for MCLK output to PAD, but also the gate bit between root clock and SAI module, So it is need to be enabled for master mode, otherwise there is no bclk generated. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1652963808-14515-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 5dfac65b621733e69b789150a0a3f1bf2f9095a3 Author: David Jander Date: Wed Jun 8 17:33:09 2022 +0200 spi: : Add missing documentation for struct members Fixes these "make htmldocs" warnings: include/linux/spi/spi.h:82: warning: Function parameter or member 'syncp' not described in 'spi_statistics' include/linux/spi/spi.h:213: warning: Function parameter or member 'pcpu_statistics' not described in 'spi_device' include/linux/spi/spi.h:676: warning: Function parameter or member 'pcpu_statistics' not described in 'spi_controller' Fixes: 6598b91b5ac3 ("spi: spi.c: Convert statistics to per-cpu u64_stats_t") Reported-by: Stephen Rothwell Signed-off-by: David Jander Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220608153309.2899565-1-david@protonic.nl Signed-off-by: Mark Brown include/linux/spi/spi.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 514c62048b9cca3b7d1ac23c373ad9b4ea92ba1f Author: Geert Uytterhoeven Date: Wed Jun 8 17:41:16 2022 +0200 fbcon: Remove obsolete reference to initmem_freed initmem_freed was removed in v2.1.124, and the underlying issue was fixed for good in commit 92b004d1aa9f367c ("video/logo: prevent use of logos after they have been freed"). Signed-off-by: Geert Uytterhoeven Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/b8b9147a48e233fe32e072f2085c7b413cd92a00.1654702835.git.geert+renesas@glider.be drivers/video/fbdev/core/fbcon.c | 1 - 1 file changed, 1 deletion(-) commit f7fdc4db071f7ee7d408ea3f083222a060c76623 Author: Chanho Park Date: Fri Jun 3 14:05:36 2022 +0900 phy: samsung: exynosautov9-ufs: correct TSRV register configurations For exynos auto v9's UFS MPHY, We should use 0x50 offset of TSRV register configurations. So, it must be s/PHY_TRSV_REG_CFG/PHY_TRSV_REG_CFG_AUTOV9/g Fixes: d64519249e1d ("phy: samsung-ufs: support exynosauto ufs phy driver") Signed-off-by: Chanho Park Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220603050536.61957-1-chanho61.park@samsung.com Signed-off-by: Vinod Koul drivers/phy/samsung/phy-exynosautov9-ufs.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 8567abecf22aeedd22d6468c19c23446d48c0f92 Author: Abel Vesa Date: Tue Jun 7 14:16:21 2022 +0300 dt-bindings: phy: mxs-usb-phy: Add i.MX8DXL compatible string Add compatible for i.MX8DXL USB PHY. Signed-off-by: Abel Vesa Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220607111625.1845393-9-abel.vesa@nxp.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/phy/mxs-usb-phy.txt | 1 + 1 file changed, 1 insertion(+) commit 2aecaf6ccda7012ab7fb4060ac49624ab18d42f8 Author: Chanho Park Date: Tue Jun 7 16:29:07 2022 +0900 phy: samsung: ufs: support secondary ufs phy To support secondary ufs phy device, we need to get an offset for phy isolation from the syscon DT node. If the first index argument of the node is existing, we can read the offset value and set it as isol->offset. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Chanho Park Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20220607072907.127000-6-chanho61.park@samsung.com Signed-off-by: Vinod Koul drivers/phy/samsung/phy-samsung-ufs.c | 5 +++++ 1 file changed, 5 insertions(+) commit f86c1d0a58b1f63a176f537e2f6851be49c20ad4 Author: Chanho Park Date: Tue Jun 7 16:29:06 2022 +0900 phy: samsung: ufs: remove drvdata from struct samsung_ufs_phy To change an offset of pmu_isol, we need to store its data instead of having drvdata's pointer. The definition of the pmu_isol structure should be extracted from samsung_ufs_phy_drvdata and rename the name with samsung_ufs_phy_ prefix. Suggested-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Chanho Park Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20220607072907.127000-5-chanho61.park@samsung.com Signed-off-by: Vinod Koul drivers/phy/samsung/phy-samsung-ufs.c | 9 +++++---- drivers/phy/samsung/phy-samsung-ufs.h | 19 +++++++++++-------- 2 files changed, 16 insertions(+), 12 deletions(-) commit 521f88bf4daa04ca96968be1f49a49f5a4e31488 Author: Chanho Park Date: Tue Jun 7 16:29:05 2022 +0900 phy: samsung: ufs: constify samsung_ufs_phy_cfg Put const qualifier of samsung_ufs_phy_cfg pointer because they will not be changed from drvdata. Signed-off-by: Chanho Park Reviewed-by: Alim Akhtar Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220607072907.127000-4-chanho61.park@samsung.com Signed-off-by: Vinod Koul drivers/phy/samsung/phy-samsung-ufs.c | 4 ++-- drivers/phy/samsung/phy-samsung-ufs.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 558801e82e0d24761644c70a15af523b01fbf1fb Author: Chanho Park Date: Tue Jun 7 16:29:04 2022 +0900 phy: samsung: ufs: rename cfg to cfgs for clarification Rename **cfg to **cfgs to clarify the naming. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Chanho Park Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20220607072907.127000-3-chanho61.park@samsung.com Signed-off-by: Vinod Koul drivers/phy/samsung/phy-exynos7-ufs.c | 2 +- drivers/phy/samsung/phy-exynosautov9-ufs.c | 2 +- drivers/phy/samsung/phy-samsung-ufs.c | 4 ++-- drivers/phy/samsung/phy-samsung-ufs.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) commit 0610f939e52c94c22d1a801fe939f283b9400a36 Author: Chanho Park Date: Tue Jun 7 16:29:03 2022 +0900 dt-bindings: phy: samsung,ufs-phy: make pmu-syscon as phandle-array To support secondary ufs phy devices, we need to get an offset value from pmu-syscon. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Chanho Park Link: https://lore.kernel.org/r/20220607072907.127000-2-chanho61.park@samsung.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit a4da4913a04de89b75ff874e5962deee2b8be177 Author: Christophe JAILLET Date: Sat May 21 08:57:13 2022 +0200 ice: Use correct order for the parameters of devm_kcalloc() We should have 'n', then 'size', not the opposite. This is harmless because the 2 values are just multiplied, but having the correct order silence a (unpublished yet) smatch warning. While at it use '*tun_seg' instead '*seg'. The both variable have the same type, so the result is the same, but it lokks more logical. Signed-off-by: Christophe JAILLET Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a3ca0867c1ffaab83f76001e8ff4f7e4e6496d5 Author: Karol Kolacinski Date: Fri Apr 29 12:21:43 2022 +0200 ice: remove u16 arithmetic in ice_gnss Change u16 to unsigned int where arithmetic occurs. Signed-off-by: Karol Kolacinski Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_gnss.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit b33de560f9e97a485ebc62dac9e0c0825cfdc731 Author: Michal Swiatkowski Date: Mon Apr 25 08:27:56 2022 +0200 ice: remove VLAN representor specific ops In switchdev mode VF VLAN caps will not be set there is no need to have specific VLAN ops for representor that only returns not supported error. As VLAN configuration commands will be blocked, the VF driver can't disable VLAN stripping at initialization. It leads to the situation when VLAN stripping on VF VSI is on, but in kernel it is off. To prevent this, disable VLAN stripping in VSI initialization. It doesn't break other usecases, because it is set according to kernel settings. Signed-off-by: Michal Swiatkowski Tested-by: Sandeep Penigalapati Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_lib.c | 3 ++ drivers/net/ethernet/intel/ice/ice_virtchnl.c | 44 +++------------------------ 2 files changed, 7 insertions(+), 40 deletions(-) commit cede04b35258faaa5acc3932ac07ab855d59e5f3 Author: Michal Swiatkowski Date: Mon Apr 25 08:27:55 2022 +0200 ice: don't set VF VLAN caps in switchdev In switchdev mode any VLAN manipulation from VF side isn't allowed. In order to prevent parsing VLAN commands don't set VF VLAN caps. This will result in removing VLAN specific opcodes from allowlist. If VF send any VLAN specific opcode PF driver will answer with not supported error. With this approach VF driver know that VLAN caps aren't supported so it shouldn't send VLAN specific opcodes. Thanks to that, some ugly errors will not show up in dmesg (ex. on creating VFs in switchdev mode there are errors about not supported VLAN insertion and stripping) Move setting VLAN caps to separate function, including switchdev mode specific code. Signed-off-by: Michal Swiatkowski Tested-by: Sandeep Penigalapati Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_virtchnl.c | 77 +++++++++++++++++---------- 1 file changed, 50 insertions(+), 27 deletions(-) commit 64f6516e60b0bbe6abfc9f1d9f1999012e0f11a6 Author: Christian König Date: Fri Jun 3 15:05:04 2022 +0200 drm/amdgpu: always flush the TLB on gfx8 The TLB on GFX8 stores each block of 8 PTEs where any of the valid bits are set. Fixes: 5255e146c99a ("drm/amdgpu: rework TLB flushing") Reviewed-by: Alex Deucher Tested-by: Michal Kubecek Signed-off-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++++ 1 file changed, 5 insertions(+) commit 250195ff744f260c169f5427422b6f39c58cb883 Author: Christian König Date: Fri Jun 3 12:21:06 2022 +0200 drm/amdgpu: fix limiting AV1 to the first instance on VCN3 The job is not yet initialized here. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2037 Reviewed-by: Alex Deucher Tested-by: Pierre-Eric Pelloux-Prayer Signed-off-by: Christian König Fixes: cdc7893fc93f ("drm/amdgpu: use job and ib structures directly in CS parsers") Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 5b644783396b2150eeccb9a079498cad5dff3c42 Author: Kenneth Feng Date: Wed Jun 8 16:31:18 2022 +0800 drm/amd/pm: enable BACO on smu_v13_0_7 enable BACO on smu_v13_0_7 Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 7 +++++++ 2 files changed, 8 insertions(+) commit 9e68c3841390c43521d4fde6c51e91fcb2d4131f Author: Kenneth Feng Date: Tue Apr 12 18:46:22 2022 +0800 drm/amd/pm: add interface to deallocate power_context for smu_v13_0_7 add interface to deallocate power_context for smu_v13_0_7 Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 1 + 1 file changed, 1 insertion(+) commit 5d88cb162c9d70f8cb98030624b412b0f6f1c081 Author: Mohammad Zafar Ziya Date: Tue Jun 7 11:38:16 2022 +0800 drm/amdgpu/jpeg2: Add jpeg vmid update under IB submit Add jpeg vmid update under IB submit Signed-off-by: Mohammad Zafar Ziya Acked-by: Christian König Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 6 +++++- drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) commit 8728df26dd24a63b24e4e5a6c847172add2fa149 Author: Yifan Zhang Date: Fri Jun 3 10:24:31 2022 +0800 drm/amdgpu/mes: only invalid/prime icache when finish loading both pipe MES FWs. invalid/prime icahce operation takes effect both pipes cuconrrently, therefore CP_MES_IC_BASE_LO/HI and CP_MES_MDBASE_LO/HI both have to be set before prime icache. Otherwise MES hardware gets garbage data in above regsters and causes page fault [ 470.873200] amdgpu 0000:33:00.0: amdgpu: [gfxhub] page fault (src_id:0 ring:217 vmid:0 pasid:0, for process pid 0 thread pid 0) [ 470.873222] amdgpu 0000:33:00.0: amdgpu: in page starting at address 0x000092cb89b00000 from client 10 [ 470.873234] amdgpu 0000:33:00.0: amdgpu: GCVM_L2_PROTECTION_FAULT_STATUS:0x00000BB3 [ 470.873242] amdgpu 0000:33:00.0: amdgpu: Faulty UTCL2 client ID: CPC (0x5) [ 470.873247] amdgpu 0000:33:00.0: amdgpu: MORE_FAULTS: 0x1 [ 470.873251] amdgpu 0000:33:00.0: amdgpu: WALKER_ERROR: 0x1 [ 470.873256] amdgpu 0000:33:00.0: amdgpu: PERMISSION_FAULTS: 0xb [ 470.873260] amdgpu 0000:33:00.0: amdgpu: MAPPING_ERROR: 0x1 [ 470.873264] amdgpu 0000:33:00.0: amdgpu: RW: 0x0 Signed-off-by: Yifan Zhang Acked-by: Alex Deucher Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 36 +++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit 26c763875e0c15921a0480e008e2be07665e7f56 Author: Evan Quan Date: Thu Jun 2 11:34:10 2022 +0800 drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.0/7 PMFW will handle that properly. Driver involvement may cause some unexpected issues. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit da4d45b7da937dfbeb918b87c66a5bf9a3079ed8 Author: Evan Quan Date: Tue May 31 15:13:24 2022 +0800 drm/amd/pm: drop redundant declarations Drop those redundant declarations in smu_v13_0.h. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 14 -------------- 1 file changed, 14 deletions(-) commit d7053e631e891698f7532712066014ca140c8ff3 Author: Evan Quan Date: Tue May 31 14:52:20 2022 +0800 drm/amd/pm: enable mode1 reset support for SMU 13.0.0 Fulfill the interfaces for mode1 reset related. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 ++ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 11 +++++++++++ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 20 ++++++++++++++++++++ 3 files changed, 33 insertions(+) commit 1b3aa89550a2ce4f4af41e11162c5cc0b0b07b4f Author: Evan Quan Date: Tue May 24 16:15:06 2022 +0800 drm/amdgpu: avoid to perform undesired clockgating operation Make sure the clockgating feature is supported before action. Otherwise, the feature may be disabled unexpectedly on enablement request. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nbio_v4_3.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 62f8f5c3bfc2968461b0a74f0e393325bec16c69 Author: Evan Quan Date: Thu Apr 28 16:51:04 2022 +0800 drm/amdgpu: enable ASPM support for PCIE 7.4.0/7.6.0 Enable ASPM support for PCIE 7.4.0 and 7.6.0. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + drivers/gpu/drm/amd/amdgpu/nbio_v4_3.c | 116 +++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/soc21.c | 7 +- .../amd/include/asic_reg/nbio/nbio_4_3_0_offset.h | 2 + .../amd/include/asic_reg/nbio/nbio_4_3_0_sh_mask.h | 1 + 6 files changed, 125 insertions(+), 3 deletions(-) commit 6f73d6762694c3e91c49e6708077a0de2a75f2f5 Author: Evan Quan Date: Wed May 25 16:51:47 2022 +0800 drm/amd/pm: optimize the interface for dpm feature status query Drop extra CMN2ASIC_MAPPING_FEATURE transform. Also some cosmetic fixes for better readability. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) commit bb50bba9c6c741f5e359f009dde3b25f12a84e3d Author: Evan Quan Date: Mon May 23 11:37:58 2022 +0800 drm/amd/pm: drop unneeded thermal_controller_type check As there is actually no direct dependence between them. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit cde83d47482e2578432f9ce029748f4f0d029e9e Author: Evan Quan Date: Fri May 20 16:18:07 2022 +0800 drm/amd/pm: enable FW CTF feature for SMU 13.0.0 The new 78.40.0 PMFW has this feature supported. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 ++ 1 file changed, 2 insertions(+) commit 851dd8625320fb626b6ab6399b2402fd84abcdfb Author: ZhenGuo Yin Date: Mon Jun 6 10:36:13 2022 +0800 drm/amdgpu: fix scratch register access method in SRIOV The scratch register should be accessed through MMIO instead of RLCG in SRIOV, since it being used in RLCG register access function. Fixes: d54762cc3e6a ("drm/amdgpu: nuke dynamic gfx scratch reg allocation") Signed-off-by: ZhenGuo Yin Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0381ac3ca2e727d4dfb7264d9416a8ba6bb6c18b Author: Xiaohui Zhang Date: Tue Jun 7 23:19:33 2022 +0800 drm/radeon: Initialize fences array entries in radeon_sa_bo_next_hole Similar to the handling of amdgpu_sa_bo_next_hole in commit 6a15f3ff19a8 ("drm/amdgpu: Initialize fences array entries in amdgpu_sa_bo_next_hole"), we thought a patch might be needed here as well. The entries were only initialized once in radeon_sa_bo_new. If a fence wasn't signalled yet in the first radeon_sa_bo_next_hole call, but then got signalled before a later radeon_sa_bo_next_hole call, it could destroy the fence but leave its pointer in the array, resulting in use-after-free in radeon_sa_bo_new. Signed-off-by: Xiaohui Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_sa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4e2d10443580d934188f226f48eda7d650711e03 Author: Felix Kuehling Date: Tue May 31 10:35:53 2022 -0400 drm/amdkfd: Document and fix GTT BO kmap API Removed an unused parameter from two functions and added kernel-doc comments. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 7 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 28 ++++++++++++++++++++---- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 5 ++--- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 6 ++--- 4 files changed, 32 insertions(+), 14 deletions(-) commit cac3bfcaedbf4d5c93cabaa7882f243099afb8ab Author: Rodrigo Siqueira Date: Wed Jun 1 10:57:33 2022 -0400 drm/amd/display: Reduce frame size in the bouding box for DCN21 GCC throw warnings for the function dcn21_update_bw_bounding_box and dcn316_update_bw_bounding_box due to its frame size that looks like this: error: the frame size of 1936 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] For fixing this issue I dropped an intermadiate variable. Cc: Stephen Rothwell Cc: Hamza Mahfooz Cc: Aurabindo Pillai Reviewed-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 29 ++++++++++------------ 1 file changed, 13 insertions(+), 16 deletions(-) commit 0f28cca87e9afc22280c44d378d2a6e249933977 Author: Ramesh Errabolu Date: Thu May 26 14:21:22 2022 -0500 drm/amdkfd: Extend KFD device topology to surface peer-to-peer links Extend KFD device topology to surface peer-to-peer links among GPU devices connected over PCIe or xGMI. Enabling HSA_AMD_P2P is REQUIRED to surface peer-to-peer links. Prior to this KFD did not expose to user mode any P2P links or indirect links that go over two or more direct hops. Old versions of the Thunk used to make up their own P2P and indirect links without the information about peer-accessibility and chipset support available to the kernel mode driver. In this patch we expose P2P links in a new sysfs directory to provide more reliable P2P link information to user mode. Old versions of the Thunk will continue to work as before and ignore the new directory. This avoids conflicts between P2P links exposed by KFD and P2P links created by the Thunk itself. New versions of the Thunk will use only the P2P links provided in the new p2p_links directory, if it exists, or fall back to the old code path on older KFDs that don't expose p2p_links. Signed-off-by: Ramesh Errabolu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 319 +++++++++++++++++++++++++++++- drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 3 + 2 files changed, 320 insertions(+), 2 deletions(-) commit feb54650bae25f2a2adfc493e3e254e7c27a3fba Author: Xiaohui Zhang Date: Tue Jun 7 23:36:31 2022 +0800 drm/radeon: integer overflow in radeon_mode_dumb_create() Similar to the handling of amdgpu_mode_dumb_create in commit 54ef0b5461c0 ("drm/amdgpu: integer overflow in amdgpu_mode_dumb_create()"), we thought a patch might be needed here as well. args->size is a u64. arg->pitch and args->height are u32. The multiplication will overflow instead of using the high 32 bits as intended. Signed-off-by: Xiaohui Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4d7738c9efc81a4f0364da1e673ab1b1cf91735 Author: Alex Deucher Date: Tue May 24 09:57:49 2022 -0400 drm/amdgpu: simplify amdgpu_ucode_get_load_type() This is the same as the default case, so drop the extra logic. Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 20 -------------------- 1 file changed, 20 deletions(-) commit dc8965ab5e338abfd8dfd65d12a62ad5be65a776 Author: Colin Ian King Date: Mon Apr 18 17:00:00 2022 +0300 fs/ntfs3: Remove redundant assignment to variable vcn Variable vcn is being assigned a value that is never read, it is being re-assigned again in the initialization of a for-loop. The assignment is redundant and can be removed. Cleans up clang scan build warning: fs/ntfs3/attrib.c:1176:7: warning: Value stored to 'vcn' during its initialization is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King Reviewed-by: Kari Argillander Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 284498206f31e655fb61b1e08d0506dccbffe55f Author: Rodrigo Siqueira Date: Wed Jun 1 10:52:06 2022 -0400 drm/amd/display: Reduce frame size in the bouding box for DCN31/316 GCC throw warnings for the function dcn31_update_bw_bounding_box and dcn316_update_bw_bounding_box due to its frame size that looks like this: error: the frame size of 1936 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] For fixing this issue I dropped an intermadiate variable. Cc: Stephen Rothwell Cc: Hamza Mahfooz Cc: Aurabindo Pillai Reviewed-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 58 ++++++++++------------ 1 file changed, 26 insertions(+), 32 deletions(-) commit 87d6b28e4a753f4a0572a695fcee094510dc6519 Author: Rodrigo Siqueira Date: Wed Jun 1 10:39:37 2022 -0400 drm/amd/display: Reduce frame size in the bouding box for DCN301 GCC throw warnings for the function dcn301_fpu_update_bw_bounding_box due to its frame size that looks like this: error: the frame size of 1936 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] For fixing this issue I dropped an intermadiate variable. Cc: Stephen Rothwell Cc: Hamza Mahfooz Cc: Aurabindo Pillai Reviewed-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dml/dcn301/dcn301_fpu.c | 30 ++++++++++------------ 1 file changed, 13 insertions(+), 17 deletions(-) commit 136788cc74cbd9fabc2922b77bfdd38a53eb7155 Author: Aurabindo Pillai Date: Tue Jun 7 09:43:02 2022 -0400 drm/amd/display: fix null pointer deref error [Why] 0 was passed in place of a pointer which triggered null pointer dereference. Causes a backtrace like: [ 41.159466] RIP: 0010:dccg31_set_audio_dtbclk_dto+0x10/0x120 [amdgpu] [ 41.159928] Code: c0 00 00 00 6a 01 8b 92 84 01 00 00 52 0f b6 40 61 e9 30 ff ff ff 0f 1f 40 00 0f 1f 44 00 00 55 48 89 e5 41 56 41 55 41 54 53 <44> 8b 66 18 48 89 fb 48 8b 47 30 48 8b 3f 45 85 e4 74 09 4c 63 6e [ 41.159932] RSP: 0018:ffffaee54055afd0 EFLAGS: 00010246 [ 41.159936] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff917445901800 [ 41.159939] RDX: ffffffffc15e6ca0 RSI: 0000000000000000 RDI: ffff91744dbd8c60 [ 41.159941] RBP: ffffaee54055aff0 R08: 0000000000000100 R09: ffffaee54055afe8 [ 41.159944] R10: 0000000000000001 R11: 0000000000000009 R12: ffff91747ca201f0 [ 41.159946] R13: ffff91747ca20000 R14: ffff917448720438 R15: ffff91747ca20000 [ 41.159948] FS: 00007f5e13e5f740(0000) GS:ffff91775ca40000(0000) knlGS:0000000000000000 [ 41.159951] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 41.159954] CR2: 0000000000000018 CR3: 000000010fea0000 CR4: 00000000003506e0 [ 41.159956] Call Trace: [ 41.159959] [ 41.159964] dce110_setup_audio_dto.isra.0+0xd8/0x1f0 [amdgpu] [ 41.160411] dce110_apply_ctx_to_hw+0x1aa/0x780 [amdgpu] [ 41.160842] ? __free_pages+0x88/0xb0 [ 41.160850] ? kfree+0x360/0x3e0 [ 41.160857] dc_commit_state+0x337/0xac0 [amdgpu] [ 41.161135] amdgpu_dm_atomic_commit_tail+0x5e3/0x2680 [amdgpu] [How] Pass in a pointer that contains nullified parameters instead of null pointer. Fixes: 405bb9eea36a ("drm/amd/display: Implement DTBCLK ref switching on dcn32") Signed-off-by: Aurabindo Pillai Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 08a2fd23c6c21e5ef24248a9c1b09e929655eb3b Author: Ramesh Errabolu Date: Thu May 26 12:24:23 2022 -0500 drm/amdgpu: Add peer-to-peer support among PCIe connected AMD GPUs Add support for peer-to-peer communication among AMD GPUs over PCIe bus. Support REQUIRES enablement of config HSA_AMD_P2P. Signed-off-by: Ramesh Errabolu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 300 ++++++++++++++++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 31 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 10 + 5 files changed, 283 insertions(+), 62 deletions(-) commit 6fbfc3a23c98bdcda679161c4f4e31368008af8a Author: Ramesh Errabolu Date: Thu May 26 11:51:08 2022 -0500 drm/amdkfd: Define config HSA_AMD_P2P to support peer-to-peer Extend current kernel config requirements of amdgpu by adding config HSA_AMD_P2P. Enabling HSA_AMD_P2P is REQUIRED to support peer-to-peer communication between AMD GPU devices over PCIe bus Signed-off-by: Ramesh Errabolu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/Kconfig | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit c55300ad4a1814bac9191a4d2c7b0d74273aec7c Author: Rodrigo Siqueira Date: Wed Jun 1 10:26:54 2022 -0400 drm/amd/display: Reduce frame size in the bouding box for DCN20 GCC throw warnings for the function dcn20_update_bounding_box due to its frame size that looks like this: error: the frame size of 1936 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] This commit fixes this issue by eliminating an intermediary variable that creates a large array. Cc: Stephen Rothwell Cc: Hamza Mahfooz Cc: Aurabindo Pillai Reviewed-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 38 ++++++++++------------ 1 file changed, 18 insertions(+), 20 deletions(-) commit 0dc662318d36e060268751fbd3309660acd3c5aa Author: Rodrigo Siqueira Date: Fri Jun 3 11:58:35 2022 -0400 drm/amd/display: Remove duplicated macro Reviewed-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/include/dal_asic_id.h | 6 ------ 1 file changed, 6 deletions(-) commit 143fee0ccc97284e6ece1cf86b7d50721b522448 Author: Joseph Greathouse Date: Mon Jun 6 16:09:25 2022 -0500 drm/amdgpu: Add MODE register to wave debug info in gfx11 All other chips, from gfx6-gfx10, now include the MODE register at the end of the wave debug state. This appears to have been missed in gfx11, so this patch adds in MODE to the debug state for gfx11. Signed-off-by: Joseph Greathouse Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 1 + 1 file changed, 1 insertion(+) commit 61243c173cd26fc8c6bea74d6d47a37ab520dacc Author: Arunpravin Paneer Selvam Date: Tue Jun 7 12:06:21 2022 +0530 drm/amd/amdgpu: Fix alignment issue Fix alignment problems reported by zuul for the commit b07d1d73b09e ("drm/amd/amdgpu: Enable high priority gfx queue") Fixes: b07d1d73b09e ("drm/amd/amdgpu: Enable high priority gfx queue") Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 68e355c00f2d58ba0426cf9a4d9df77077493018 Author: Jesse Zhang Date: Tue Jun 7 10:44:57 2022 +0800 drm/amdkfd:Fix fw version for 10.3.6 fix fw error when loading fw for 10.3.6 Signed-off-by: Jesse Zhang Reviewed-by: Alex Deucher Reviewed-by: Mario Limonciello Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit faa406f4233ecbd781554ae0a850e56f53003d2e Author: Daniel Thompson Date: Wed Jun 8 14:58:21 2022 +0100 drm/cma-helper: Describe what a "contiguous chunk" actually means Since it's inception in 2012 it has been understood that the DRM GEM CMA helpers do not depend on CMA as the backend allocator. In fact the first bug fix to ensure the cma-helpers work correctly with an IOMMU backend appeared in 2014. However currently the documentation for drm_gem_cma_create() talks about "a contiguous chunk of memory" without making clear which address space it will be a contiguous part of. Additionally the CMA introduction is actively misleading because it only contemplates the CMA backend. This matters because when the device accesses the bus through an IOMMU (and don't use the CMA backend) then the allocated memory is contiguous only in the IOVA space. This is a significant difference compared to the CMA backend and the behaviour can be a surprise even to someone who does a reasonable level of code browsing (but doesn't find all the relevant function pointers ;-) ). Improve the kernel doc comments accordingly. Signed-off-by: Daniel Thompson Reviewed-by: Lucas Stach Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220608135821.1153346-1-daniel.thompson@linaro.org drivers/gpu/drm/drm_gem_cma_helper.c | 39 +++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 10 deletions(-) commit 594740497e998d30477ab26093bfb81c28cd3ff1 Author: Jason Ekstrand Date: Wed Jun 8 10:21:42 2022 -0500 dma-buf: Add an API for importing sync files (v10) This patch is analogous to the previous sync file export patch in that it allows you to import a sync_file into a dma-buf. Unlike the previous patch, however, this does add genuinely new functionality to dma-buf. Without this, the only way to attach a sync_file to a dma-buf is to submit a batch to your driver of choice which waits on the sync_file and claims to write to the dma-buf. Even if said batch is a no-op, a submit is typically way more overhead than just attaching a fence. A submit may also imply extra synchronization with other work because it happens on a hardware queue. In the Vulkan world, this is useful for dealing with the out-fence from vkQueuePresent. Current Linux window-systems (X11, Wayland, etc.) all rely on dma-buf implicit sync. Since Vulkan is an explicit sync API, we get a set of fences (VkSemaphores) in vkQueuePresent and have to stash those as an exclusive (write) fence on the dma-buf. We handle it in Mesa today with the above mentioned dummy submit trick. This ioctl would allow us to set it directly without the dummy submit. This may also open up possibilities for GPU drivers to move away from implicit sync for their kernel driver uAPI and instead provide sync files and rely on dma-buf import/export for communicating with other implicit sync clients. We make the explicit choice here to only allow setting RW fences which translates to an exclusive fence on the dma_resv. There's no use for read-only fences for communicating with other implicit sync userspace and any such attempts are likely to be racy at best. When we got to insert the RW fence, the actual fence we set as the new exclusive fence is a combination of the sync_file provided by the user and all the other fences on the dma_resv. This ensures that the newly added exclusive fence will never signal before the old one would have and ensures that we don't break any dma_resv contracts. We require userspace to specify RW in the flags for symmetry with the export ioctl and in case we ever want to support read fences in the future. There is one downside here that's worth documenting: If two clients writing to the same dma-buf using this API race with each other, their actions on the dma-buf may happen in parallel or in an undefined order. Both with and without this API, the pattern is the same: Collect all the fences on dma-buf, submit work which depends on said fences, and then set a new exclusive (write) fence on the dma-buf which depends on said work. The difference is that, when it's all handled by the GPU driver's submit ioctl, the three operations happen atomically under the dma_resv lock. If two userspace submits race, one will happen before the other. You aren't guaranteed which but you are guaranteed that they're strictly ordered. If userspace manages the fences itself, then these three operations happen separately and the two render operations may happen genuinely in parallel or get interleaved. However, this is a case of userspace racing with itself. As long as we ensure userspace can't back the kernel into a corner, it should be fine. v2 (Jason Ekstrand): - Use a wrapper dma_fence_array of all fences including the new one when importing an exclusive fence. v3 (Jason Ekstrand): - Lock around setting shared fences as well as exclusive - Mark SIGNAL_SYNC_FILE as a read-write ioctl. - Initialize ret to 0 in dma_buf_wait_sync_file v4 (Jason Ekstrand): - Use the new dma_resv_get_singleton helper v5 (Jason Ekstrand): - Rename the IOCTLs to import/export rather than wait/signal - Drop the WRITE flag and always get/set the exclusive fence v6 (Jason Ekstrand): - Split import and export into separate patches - New commit message v7 (Daniel Vetter): - Fix the uapi header to use the right struct in the ioctl - Use a separate dma_buf_import_sync_file struct - Add kerneldoc for dma_buf_import_sync_file v8 (Jason Ekstrand): - Rebase on Christian König's fence rework v9 (Daniel Vetter): - Fix -EINVAL checks for the flags parameter - Add documentation about read/write fences - Add documentation about the expected usage of import/export and specifically call out the possible userspace race. v10 (Simon Ser): - Fix a typo in the docs Signed-off-by: Jason Ekstrand Signed-off-by: Jason Ekstrand Signed-off-by: Jason Ekstrand Reviewed-by: Christian König Reviewed-by: Daniel Vetter Cc: Sumit Semwal Cc: Maarten Lankhorst Signed-off-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/20220608152142.14495-3-jason@jlekstrand.net drivers/dma-buf/dma-buf.c | 39 +++++++++++++++++++++++++++++++++++ include/uapi/linux/dma-buf.h | 49 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) commit 20e10881a043af63f2962a9e6bca64661225b383 Author: Jason Ekstrand Date: Wed Jun 8 10:21:41 2022 -0500 dma-buf: Add an API for exporting sync files (v14) Modern userspace APIs like Vulkan are built on an explicit synchronization model. This doesn't always play nicely with the implicit synchronization used in the kernel and assumed by X11 and Wayland. The client -> compositor half of the synchronization isn't too bad, at least on intel, because we can control whether or not i915 synchronizes on the buffer and whether or not it's considered written. The harder part is the compositor -> client synchronization when we get the buffer back from the compositor. We're required to be able to provide the client with a VkSemaphore and VkFence representing the point in time where the window system (compositor and/or display) finished using the buffer. With current APIs, it's very hard to do this in such a way that we don't get confused by the Vulkan driver's access of the buffer. In particular, once we tell the kernel that we're rendering to the buffer again, any CPU waits on the buffer or GPU dependencies will wait on some of the client rendering and not just the compositor. This new IOCTL solves this problem by allowing us to get a snapshot of the implicit synchronization state of a given dma-buf in the form of a sync file. It's effectively the same as a poll() or I915_GEM_WAIT only, instead of CPU waiting directly, it encapsulates the wait operation, at the current moment in time, in a sync_file so we can check/wait on it later. As long as the Vulkan driver does the sync_file export from the dma-buf before we re-introduce it for rendering, it will only contain fences from the compositor or display. This allows to accurately turn it into a VkFence or VkSemaphore without any over-synchronization. By making this an ioctl on the dma-buf itself, it allows this new functionality to be used in an entirely driver-agnostic way without having access to a DRM fd. This makes it ideal for use in driver-generic code in Mesa or in a client such as a compositor where the DRM fd may be hard to reach. v2 (Jason Ekstrand): - Use a wrapper dma_fence_array of all fences including the new one when importing an exclusive fence. v3 (Jason Ekstrand): - Lock around setting shared fences as well as exclusive - Mark SIGNAL_SYNC_FILE as a read-write ioctl. - Initialize ret to 0 in dma_buf_wait_sync_file v4 (Jason Ekstrand): - Use the new dma_resv_get_singleton helper v5 (Jason Ekstrand): - Rename the IOCTLs to import/export rather than wait/signal - Drop the WRITE flag and always get/set the exclusive fence v6 (Jason Ekstrand): - Drop the sync_file import as it was all-around sketchy and not nearly as useful as import. - Re-introduce READ/WRITE flag support for export - Rework the commit message v7 (Jason Ekstrand): - Require at least one sync flag - Fix a refcounting bug: dma_resv_get_excl() doesn't take a reference - Use _rcu helpers since we're accessing the dma_resv read-only v8 (Jason Ekstrand): - Return -ENOMEM if the sync_file_create fails - Predicate support on IS_ENABLED(CONFIG_SYNC_FILE) v9 (Jason Ekstrand): - Add documentation for the new ioctl v10 (Jason Ekstrand): - Go back to dma_buf_sync_file as the ioctl struct name v11 (Daniel Vetter): - Go back to dma_buf_export_sync_file as the ioctl struct name - Better kerneldoc describing what the read/write flags do v12 (Christian König): - Document why we chose to make it an ioctl on dma-buf v13 (Jason Ekstrand): - Rebase on Christian König's fence rework v14 (Daniel Vetter & Christian König): - Use dma_rev_usage_rw to get the properly inverted usage to pass to dma_resv_get_singleton() - Clean up the sync_file and fd if copy_to_user() fails Signed-off-by: Jason Ekstrand Signed-off-by: Jason Ekstrand Signed-off-by: Jason Ekstrand Acked-by: Simon Ser Reviewed-by: Christian König Reviewed-by: Daniel Vetter Cc: Sumit Semwal Cc: Maarten Lankhorst Signed-off-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/20220608152142.14495-2-jason@jlekstrand.net drivers/dma-buf/dma-buf.c | 67 ++++++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/dma-buf.h | 35 +++++++++++++++++++++++ 2 files changed, 102 insertions(+) commit 17f65658c8adce6233f9e53be59d399af6180059 Author: Matt Roper Date: Tue Jun 7 10:57:16 2022 -0700 drm/i915/xehp: Correct steering initialization Another mistake during the conversion to DSS bitmaps: after retrieving the DSS ID intel_sseu_find_first_xehp_dss() we forgot to modulo it down to obtain which ID within the current gslice it is. Fixes: b87d39019651 ("drm/i915/sseu: Disassociate internal subslice mask representation from uapi") Cc: Balasubramani Vivekanandan Signed-off-by: Matt Roper Acked-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20220607175716.3338661-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_workarounds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c5cb0002d14b6f7aabaf7d67d0515fe70aea7167 Author: Matt Roper Date: Tue Jun 7 17:51:08 2022 -0700 drm/i915: More PVC+DG2 workarounds A new PVC+DG2 workaround has appeared recently: - Wa_16015675438 And a couple existing DG2 workarounds have been extended to PVC: - Wa_14015795083 - Wa_18018781329 Note that Wa_16015675438 asks us to program a register that is in the 0x2xxx range typically associated with the RCS engine, even though PVC does not have an RCS. By default the GuC will think we've made a mistake and throw an exception when it sees this register on a CCS engine's save/restore list, so we need to pass an extra GuC control flag to tell it that this is expected and not a problem. Signed-off-by: Anshuman Gupta Signed-off-by: Badal Nilawar Signed-off-by: Prathap Kumar Valsan Signed-off-by: Matt Roper Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20220608005108.3717895-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + drivers/gpu/drm/i915/gt/intel_workarounds.c | 24 +++++++++++++++++------- drivers/gpu/drm/i915/gt/uc/intel_guc.c | 4 ++++ drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 1 + 4 files changed, 23 insertions(+), 7 deletions(-) commit 3ffb20f5c7891ab5bc61cb4044465d3ad1aebf49 Author: Akhil R Date: Tue May 17 13:10:47 2022 +0530 dt-bindings: Add headers for Tegra234 GPCDMA Add reset and IOMMU header for Tegra234 GPCDMA Signed-off-by: Akhil R Reviewed-by: Jon Hunter Acked-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding include/dt-bindings/memory/tegra234-mc.h | 1 + include/dt-bindings/reset/tegra234-reset.h | 1 + 2 files changed, 2 insertions(+) commit 829205d8410ee358bd6a107ee4d72de424fcd1b4 Author: Krzysztof Kozlowski Date: Thu May 26 22:35:16 2022 +0200 ARM: tegra: Adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra20-acer-a500-picasso.dts | 2 +- arch/arm/boot/dts/tegra20-asus-tf101.dts | 2 +- arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi | 6 +++--- arch/arm/boot/dts/tegra30-asus-nexus7-tilapia.dtsi | 2 +- arch/arm/boot/dts/tegra30-colibri.dtsi | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) commit 28b4dcc8f0108e2c430b63b0325c61ae97d6dc79 Author: Sameer Pujar Date: Mon Jun 6 20:28:55 2022 +0530 arm64: defconfig: Build Tegra OPE module Output Processing Engine (OPE) module is a client of AHUB on Tegra210 and later generations of Tegra SoCs. Enable the driver build to use this in audio path. Signed-off-by: Sameer Pujar Signed-off-by: Thierry Reding arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit ec3ad554b956d5dbefa1962c419f164ba223e6b3 Author: Kuninori Morimoto Date: Wed Jun 8 02:09:16 2022 +0000 ASoC: ak4613: cares Simple-Audio-Card case for TDM Renesas is the only user of ak4613 on upstream for now, and commit f28dbaa958fbd8 ("ASoC: ak4613: add TDM256 support") added TDM256 support. Renesas tested part of it, because of board connection. It was assuming ak4613 is probed via Audio-Graph-Card, but it might be probed via Simple-Audio-Card either. It will indicates WARNING in such case. This patch fixup it. Reported-by: Geert Uytterhoeven Signed-off-by: Kuninori Morimoto Tested-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/87h74v29f7.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/codecs/ak4613.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7f35680ada234ce00828b8ea841ba7ca1e00ff52 Author: Thomas Zimmermann Date: Tue Jun 7 11:20:04 2022 +0200 drm/ast: Support multiple outputs Systems with AST graphics can have multiple output; typically VGA plus some other port. Record detected output chips in a bitmask and initialize each output on its own. Assume a VGA output by default and use SIL164 and DP501 if available. For ASTDP assume that it can run in parallel with VGA. Tested on AST2100. v3: * define a macro for each BIT(ast_tx_chip) (Patrik) v2: * make VGA/SIL164/DP501 mutually exclusive Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson Fixes: a59b026419f3 ("drm/ast: Initialize encoder and connector for VGA in helper function") Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20220607092008.22123-2-tzimmermann@suse.de drivers/gpu/drm/ast/ast_dp.c | 5 ++--- drivers/gpu/drm/ast/ast_dp501.c | 2 +- drivers/gpu/drm/ast/ast_drv.h | 9 +++++++-- drivers/gpu/drm/ast/ast_main.c | 21 +++++++++------------ drivers/gpu/drm/ast/ast_mode.c | 38 +++++++++++++++++++++----------------- drivers/gpu/drm/ast/ast_post.c | 2 +- 6 files changed, 41 insertions(+), 36 deletions(-) commit db925d809011c37b246434fdce71209fc2e6c0c2 Author: Maximilian Luz Date: Thu May 26 01:08:27 2022 +0200 HID: hid-input: add Surface Go battery quirk Similar to the Surface Go (1), the (Elantech) touchscreen/digitizer in the Surface Go 2 mistakenly reports the battery of the stylus. Instead of over the touchscreen device, battery information is provided via bluetooth and the touchscreen device reports an empty battery. Apply the HID_BATTERY_QUIRK_IGNORE quirk to ignore this battery and prevent the erroneous low battery warnings. Cc: stable@vger.kernel.org Signed-off-by: Maximilian Luz Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/hid-input.c | 2 ++ 2 files changed, 3 insertions(+) commit 15b28156029465e594b462e6dad459a737028697 Author: Li Qiong Date: Mon Jun 6 21:47:50 2022 +0800 HID: intel-ish-hid: ipc: use time_before to replace "jiffies < a" time_before deals with timer wrapping correctly. Signed-off-by: Li Qiong Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27e05fcbea2053e7ee9efb942269ba0ced740d32 Merge: 5871321fb455 e02b99e9b79f Author: Mark Brown Date: Wed Jun 8 11:50:01 2022 +0100 ASoC: harden SoundWire codec/machine drivers used on Intel platforms Merge series from Pierre-Louis Bossart : While testing fixes for SoundWire race conditions initially reported in [1], I found additional issues in codec drivers. When the order in which drivers are probed is changed, multiple errors are reported, from unbalanced pm_runtime_enable() calls to invalid mutex lock magic numbers, workqueues not initialized and missing resume sequences. In 'nominal' usages, there is no change of functionality, this is just a first step to test random device/driver bind/unbind sequences. Important note: these changes only touch Intel-based platforms, I don't have any background and ability to test on Qualcomm-based devices. [1] https://lore.kernel.org/alsa-devel/d0559e97-c4a0-b817-428c-d3e305390270@linux.intel.com/ Pierre-Louis Bossart (7): ASoC: Realtek/Maxim SoundWire codecs: disable pm_runtime on remove ASoC: rt711-sdca-sdw: fix calibrate mutex initialization ASoC: Intel: sof_sdw: handle errors on card registration ASoC: rt711: fix calibrate mutex initialization ASoC: rt7*-sdw: harden jack_detect_handler ASoC: codecs: rt700/rt711/rt711-sdca: initialize workqueues in probe ASoC: codecs: rt700/rt711/rt711-sdca: resume bus/codec in .set_jack_detect sound/soc/codecs/max98373-sdw.c | 12 +++++++- sound/soc/codecs/rt1308-sdw.c | 11 +++++++ sound/soc/codecs/rt1316-sdw.c | 11 +++++++ sound/soc/codecs/rt5682-sdw.c | 5 ++- sound/soc/codecs/rt700-sdw.c | 6 +++- sound/soc/codecs/rt700.c | 30 +++++++++++------- sound/soc/codecs/rt711-sdca-sdw.c | 9 +++++- sound/soc/codecs/rt711-sdca.c | 40 ++++++++++++------------ sound/soc/codecs/rt711-sdw.c | 9 +++++- sound/soc/codecs/rt711.c | 40 ++++++++++++------------ sound/soc/codecs/rt715-sdca-sdw.c | 12 ++++++++ sound/soc/codecs/rt715-sdw.c | 12 ++++++++ sound/soc/intel/boards/sof_sdw.c | 51 ++++++++++++++++++------------- 13 files changed, 169 insertions(+), 79 deletions(-) -- 2.34.1 commit 9723070ecb280e3046dd32a4d11cb52a332507cc Author: Colin Ian King Date: Wed Jun 8 09:19:12 2022 +0100 spi: s3c64xx: Fix spelling mistake "hannel" -> "channel" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Acked-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20220608081912.2083086-1-colin.i.king@gmail.com Signed-off-by: Mark Brown drivers/spi/spi-s3c64xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24b8b74eb2eb578fee046c70681000f61afa5680 Author: Ville Syrjälä Date: Thu Jun 2 23:57:23 2022 +0300 drm/i915: Parse max link rate from the eDP BDB block The eDP BDB block has gained yet another max link rate field. Let's parse it and consult it during the source rate filtering. v2: *20 instead of *2 to get the correct units (Jani) Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220602205723.11341-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_bios.c | 4 ++++ drivers/gpu/drm/i915/display/intel_display_types.h | 1 + drivers/gpu/drm/i915/display/intel_dp.c | 23 ++++++++++++++++++++-- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 1 + 4 files changed, 27 insertions(+), 2 deletions(-) commit b09654e39c89a86680528345f3a95b832236ee82 Author: Colin Ian King Date: Wed Jun 8 09:23:38 2022 +0100 ASoC: mediatek: mt8186: Fix a handful of spelling mistakes There are several spelling mistakes in dev_err messages. Fix them. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20220608082338.2083456-1-colin.i.king@gmail.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-afe-gpio.c | 8 ++++---- sound/soc/mediatek/mt8186/mt8186-dai-adda.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit f06d1d66d54c223e4f0f73393d94afd88105b6f3 Author: Ville Syrjälä Date: Thu Jun 2 23:56:49 2022 +0300 drm/i915: Update eDP fast link training link rate parsing We're not parsing the 5.4 Gbps value for the old eDP fast link training link rate, nor are we parsing the new fast link training link rate field. Remedy both. Also we'll now use the actual link rate instead of the DPCD BW register value. Note that we're not even using this information for anything currently, so should perhaps just nuke it all unless someone is planning on implementing fast link training finally... v2: Stop using the DPCD BW values (Jani) *20 instead of *2 to get the rate in correct units (Jani) Cc: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220602205649.11283-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_bios.c | 32 +++++++++++++++++---------- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 1 + 2 files changed, 21 insertions(+), 12 deletions(-) commit f09d2b0bdd78ffd38227426fb2ceab7ebd141391 Author: Ville Syrjälä Date: Fri Jun 3 19:58:41 2022 +0300 drm/i915: Initialize eDP source rates after per-panel VBT parsing We'll need to know the VBT panel_type before we can determine the maximum link rate for eDP. To that end move intel_dp_set_source_rates() & co. to be called after the per-panel VBT parsing has been done. intel_dp_mst_encoder_init() depends on the source rates so we'll have to do it a bit later as well. v2: Fix the intel_dp_mst_encoder_init() oops Reviewed-by: Jani Nikula #v1 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220603165841.15481-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_dp.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit e288179dd09a0980c0bce20d5017e0dba95b4407 Merge: 336a2d935a99 894bf75bb1f6 Author: Mark Brown Date: Wed Jun 8 10:59:02 2022 +0100 ASoC: DAI clocking terminology modernisation Merge series from Mark Brown : Update the last batch of CODEC drivers without specific maintainers to use the new defines for DAI clocking. commit 6431fd0151eca63d4c62c4e6bcc1913b5e26d028 Author: Xiang wangx Date: Sun Jun 5 16:43:43 2022 +0800 HID: logitech-hidpp: Fix syntax errors in comments Delete the redundant word 'in'. Signed-off-by: Xiang wangx Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5e649a5a53767d48c244ca009168941adf3bb9a Author: Bagas Sanjaya Date: Sat Jun 4 09:07:11 2022 +0700 HID: uclogic: properly format kernel-doc comment for hid_dbg() wrappers Running kernel-doc script on drivers/hid/hid-uclogic-params.c, it found 6 warnings for hid_dbg() wrapper functions below: drivers/hid/hid-uclogic-params.c:48: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Dump tablet interface pen parameters with hid_dbg(), indented with one tab. drivers/hid/hid-uclogic-params.c:48: warning: missing initial short description on line: * Dump tablet interface pen parameters with hid_dbg(), indented with one tab. drivers/hid/hid-uclogic-params.c:48: info: Scanning doc for function Dump drivers/hid/hid-uclogic-params.c:80: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Dump tablet interface frame parameters with hid_dbg(), indented with two drivers/hid/hid-uclogic-params.c:80: warning: missing initial short description on line: * Dump tablet interface frame parameters with hid_dbg(), indented with two drivers/hid/hid-uclogic-params.c:80: info: Scanning doc for function Dump drivers/hid/hid-uclogic-params.c:105: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Dump tablet interface parameters with hid_dbg(). drivers/hid/hid-uclogic-params.c:105: warning: missing initial short description on line: * Dump tablet interface parameters with hid_dbg(). One of them is reported by kernel test robot. Fix these warnings by properly format kernel-doc comment for these functions. Link: https://lore.kernel.org/linux-doc/202205272033.XFYlYj8k-lkp@intel.com/ Fixes: a228809fa6f39c ("HID: uclogic: Move param printing to a function") Reported-by: kernel test robot Tested-by: Randy Dunlap Tested-by: José Expósito Acked-by: Randy Dunlap Cc: Nikolai Kondrashov Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: llvm@lists.linux.dev Cc: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Bagas Sanjaya Signed-off-by: Jiri Kosina drivers/hid/hid-uclogic-params.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 2f4073e08f4cc5a41e35d777c240aaadd0257051 Author: Tao Xu Date: Tue May 24 21:56:24 2022 +0800 KVM: VMX: Enable Notify VM exit There are cases that malicious virtual machines can cause CPU stuck (due to event windows don't open up), e.g., infinite loop in microcode when nested #AC (CVE-2015-5307). No event window means no event (NMI, SMI and IRQ) can be delivered. It leads the CPU to be unavailable to host or other VMs. VMM can enable notify VM exit that a VM exit generated if no event window occurs in VM non-root mode for a specified amount of time (notify window). Feature enabling: - The new vmcs field SECONDARY_EXEC_NOTIFY_VM_EXITING is introduced to enable this feature. VMM can set NOTIFY_WINDOW vmcs field to adjust the expected notify window. - Add a new KVM capability KVM_CAP_X86_NOTIFY_VMEXIT so that user space can query and enable this feature in per-VM scope. The argument is a 64bit value: bits 63:32 are used for notify window, and bits 31:0 are for flags. Current supported flags: - KVM_X86_NOTIFY_VMEXIT_ENABLED: enable the feature with the notify window provided. - KVM_X86_NOTIFY_VMEXIT_USER: exit to userspace once the exits happen. - It's safe to even set notify window to zero since an internal hardware threshold is added to vmcs.notify_window. VM exit handling: - Introduce a vcpu state notify_window_exits to records the count of notify VM exits and expose it through the debugfs. - Notify VM exit can happen incident to delivery of a vector event. Allow it in KVM. - Exit to userspace unconditionally for handling when VM_CONTEXT_INVALID bit is set. Nested handling - Nested notify VM exits are not supported yet. Keep the same notify window control in vmcs02 as vmcs01, so that L1 can't escape the restriction of notify VM exits through launching L2 VM. Notify VM exit is defined in latest Intel Architecture Instruction Set Extensions Programming Reference, chapter 9.2. Co-developed-by: Xiaoyao Li Signed-off-by: Xiaoyao Li Signed-off-by: Tao Xu Co-developed-by: Chenyi Qiang Signed-off-by: Chenyi Qiang Message-Id: <20220524135624.22988-5-chenyi.qiang@intel.com> Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 49 ++++++++++++++++++++++++++++++++++++++ arch/x86/include/asm/kvm_host.h | 7 ++++++ arch/x86/include/asm/vmx.h | 7 ++++++ arch/x86/include/asm/vmxfeatures.h | 1 + arch/x86/include/uapi/asm/vmx.h | 4 +++- arch/x86/kvm/vmx/capabilities.h | 6 +++++ arch/x86/kvm/vmx/nested.c | 8 +++++++ arch/x86/kvm/vmx/vmx.c | 40 +++++++++++++++++++++++++++++-- arch/x86/kvm/x86.c | 22 ++++++++++++++++- arch/x86/kvm/x86.h | 7 ++++++ include/uapi/linux/kvm.h | 11 +++++++++ 11 files changed, 158 insertions(+), 4 deletions(-) commit a0a05054583fed17f522172e101594f1ff265463 Author: Hilton Chain Date: Thu Jun 2 16:12:19 2022 +0800 HID: apple: Properly handle function keys on non-Apple keyboard This commit extends fa33382c7f74 ("HID: apple: Properly handle function keys on Keychron keyboards") by adding an array of known non-Apple keyboards' device names, and the function apple_is_non_apple_keyboard() to identify and create exception for them. Signed-off-by: Hilton Chain Reviewed-by: Bryan Cain Tested-by: Bryan Cain Reviewed-by: José Expósito Signed-off-by: Jiri Kosina drivers/hid/hid-apple.c | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) commit 92cdfba40155aab313d307eecbaef331b447fe54 Author: Daniel J. Ogorchock Date: Sat May 28 17:23:31 2022 -0400 HID: nintendo: fix unused const warning JC_RUMBLE_ZERO_AMP_PKT_CNT is only used when force feedback support in the driver is enabled. Place the declaration in the CONFIG_NINTENDO_FF ifdef to avoid a warning when compiling without rumble support. Signed-off-by: Daniel J. Ogorchock Reviewed-by: Silvan Jegen Signed-off-by: Jiri Kosina drivers/hid/hid-nintendo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bd3cba00dcc639311c29eee81606707ba5fd9217 Author: Douglas Anderson Date: Mon May 23 14:23:24 2022 -0700 HID: i2c-hid: elan: Add support for Elan eKTH6915 i2c-hid touchscreens Like many i2c-hid touchscreen controllers, the Elan eKTH6915 has a reset GPIO hooked up to it. According to the datasheet, the way we're supposed to turn the touchscreen on is: 1. Turn on the 3.3V supply. 2. Turn on the IO supply. It's OK if this is hardwired to the 3.3V supply, but if it's not then it must be turned on _after_ the 3.3V supply. 3. Wait >= 1 ms. 4. Deassert the reset GPIO (reset GPIO is active low, so there would be a leakage path if this was deasserted _before_ the IO supply). 5. Wait 300 ms. Much of the above can be handled by the generic i2c-hid-of driver, but the "reset" GPIO is not supported by that driver. Thus we'll do the same as we did for Goodix and add a new tiny driver that uses the i2c-hid core. NOTE: support for this new touchscreen could theorically fit into the Goodix driver. I've made it a separate driver because the Elan driver supports _two_ regulators and it's unclear exactly how that would fit in with commit 18eeef46d359 ("HID: i2c-hid: goodix: Tie the reset line to true state of the regulator"). Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Torokhov Reviewed-by: Matthias Kaehlcke Signed-off-by: Jiri Kosina drivers/hid/i2c-hid/Kconfig | 15 ++++ drivers/hid/i2c-hid/Makefile | 1 + drivers/hid/i2c-hid/i2c-hid-of-elan.c | 130 ++++++++++++++++++++++++++++++++++ 3 files changed, 146 insertions(+) commit ded3021ef20567affdf0a08b21e9300f72cfc7c4 Author: Douglas Anderson Date: Mon May 23 14:23:23 2022 -0700 dt-bindings: HID: i2c-hid: elan: Introduce bindings for Elan eKTH6915 Like many i2c-hid touchscreen controllers, the Elan eKTH6915 controller has a reset gpio. For the Goodix GT7375P touchscreen the decision was to add a new binding rather than trying to add a new GPIO to the existing i2c-hid binding. We'll follow the lead and do it here, too. SIDE NOTE: the Elan eKTH6915 is a touchscreen _controller_ that's included as a part on some touchscreens. The reset line isn't truly necessary for the functioning of the touchscreen, so it's possible that some designs won't have it hooked up and will just guarantee the power sequencing requirements with RLC circuits. Thus, we'll mark the reset gpio as optional. Note that if the reset GPIO isn't used there's actually no true need to use the "elan,ekth6915" compatible instead of the "hid-over-i2c" on Linux. However: - Officially using just "hid-over-i2c" for this device violates the existing "hid-over-i2c" bindings. The bindings say that you're not supposed to use "post-power-on-delay-ms" without specifying a more specific compatible. Currently the Linux driver doesn't enforce this, but it violates the bindings to just use "hid-over-i2c". ...and if you're going to add a more specific compatible anyway, might as well do it right. - Using this compatible means we don't need to specify "hid-descr-addr" since it's inferred from the compatible. - Using this compatible means that the regulator names match the names on the Elan datasheet (vcc33 / vccio) vs the generic hid-over-i2c (vdd / vddl). Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Torokhov Reviewed-by: Rob Herring Signed-off-by: Jiri Kosina .../devicetree/bindings/input/elan,ekth6915.yaml | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit cb23389a2458c2e4bfd6c86a513cbbe1c4d35e76 Author: Miaoqian Lin Date: Thu May 26 12:13:25 2022 +0400 ARM: bcm: Fix refcount leak in bcm_kona_smc_init of_find_matching_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: b8eb35fd594a ("ARM: bcm281xx: Add L2 cache enable code") Signed-off-by: Miaoqian Lin Signed-off-by: Florian Fainelli arch/arm/mach-bcm/bcm_kona_smc.c | 1 + 1 file changed, 1 insertion(+) commit 938c8745bcf2f732ee928a0b9bd592198a88cfa4 Author: Sean Christopherson Date: Tue May 24 21:56:23 2022 +0800 KVM: x86: Introduce "struct kvm_caps" to track misc caps/settings Add kvm_caps to hold a variety of capabilites and defaults that aren't handled by kvm_cpu_caps because they aren't CPUID bits in order to reduce the amount of boilerplate code required to add a new feature. The vast majority (all?) of the caps interact with vendor code and are written only during initialization, i.e. should be tagged __read_mostly, declared extern in x86.h, and exported. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20220524135624.22988-4-chenyi.qiang@intel.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 15 ------- arch/x86/kvm/cpuid.c | 8 ++-- arch/x86/kvm/debugfs.c | 4 +- arch/x86/kvm/lapic.c | 2 +- arch/x86/kvm/svm/nested.c | 4 +- arch/x86/kvm/svm/svm.c | 13 +++--- arch/x86/kvm/vmx/nested.c | 4 +- arch/x86/kvm/vmx/vmx.c | 22 +++++----- arch/x86/kvm/x86.c | 97 ++++++++++++++++++----------------------- arch/x86/kvm/x86.h | 26 +++++++++-- 10 files changed, 94 insertions(+), 101 deletions(-) commit 30267b43c5b08260da7c76cacd28bf855b06ab93 Author: Chenyi Qiang Date: Tue May 24 21:56:22 2022 +0800 KVM: selftests: Add a test to get/set triple fault event Add a selftest for triple fault event: - launch the L2 and exit to userspace via I/O. - using KVM_SET_VCPU_EVENTS to pend a triple fault event. - with the immediate_exit, check the triple fault is pending. - run for real with pending triple fault and L1 can see the triple fault. Suggested-by: Sean Christopherson Signed-off-by: Chenyi Qiang Message-Id: <20220524135624.22988-3-chenyi.qiang@intel.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/.gitignore | 1 + tools/testing/selftests/kvm/Makefile | 1 + .../selftests/kvm/x86_64/triple_fault_event_test.c | 101 +++++++++++++++++++++ 3 files changed, 103 insertions(+) commit ed2351174e38ad4febbbc0dba802803e6cff8ae0 Author: Chenyi Qiang Date: Tue May 24 21:56:21 2022 +0800 KVM: x86: Extend KVM_{G,S}ET_VCPU_EVENTS to support pending triple fault For the triple fault sythesized by KVM, e.g. the RSM path or nested_vmx_abort(), if KVM exits to userspace before the request is serviced, userspace could migrate the VM and lose the triple fault. Extend KVM_{G,S}ET_VCPU_EVENTS to support pending triple fault with a new event KVM_VCPUEVENT_VALID_FAULT_FAULT so that userspace can save and restore the triple fault event. This extension is guarded by a new KVM capability KVM_CAP_TRIPLE_FAULT_EVENT. Note that in the set_vcpu_events path, userspace is able to set/clear the triple fault request through triple_fault.pending field. Signed-off-by: Chenyi Qiang Message-Id: <20220524135624.22988-2-chenyi.qiang@intel.com> Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 8 ++++++++ arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/include/uapi/asm/kvm.h | 6 +++++- arch/x86/kvm/x86.c | 21 ++++++++++++++++++++- include/uapi/linux/kvm.h | 1 + 5 files changed, 36 insertions(+), 2 deletions(-) commit 276e109739092b773ff17fca89bcf8d4f3e3a4d6 Author: William Zhang Date: Tue May 31 19:22:13 2022 -0700 MAINTAINERS: Add BCM6846 to bcmbca arch entry Add BCM6846 related files to BCMBCA ARCH maintainer list entry Signed-off-by: William Zhang Signed-off-by: Florian Fainelli MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 865a7d671073d2a6a6c02619df6c5ec1a19dbbe1 Author: William Zhang Date: Wed May 25 10:51:22 2022 -0700 dt-bindings: arm: add BCM6846 SoC to device tree binding document Add BCM6846 SoC device tree description to bcmbca binding document. Reviewed-by: Krzysztof Kozlowski Signed-off-by: William Zhang Acked-by: Rob Herring Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit c799b5081448a839a60c90986b81aa677dcf2db6 Author: Krzysztof Kozlowski Date: Thu May 26 22:43:39 2022 +0200 ARM: dts: broadcom: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm28155-ap.dts | 8 ++++---- arch/arm/boot/dts/bcm283x.dtsi | 6 +++--- arch/arm/boot/dts/bcm5301x.dtsi | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) commit b65b9477d9118e3cd359245f59af556597bc5b71 Author: Krzysztof Kozlowski Date: Thu May 26 22:43:38 2022 +0200 arm64: dts: broadcom: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca3a4664e005a69e93656a0b227fed193ee6032d Author: Anand Gore Date: Thu Jun 2 15:16:46 2022 -0700 MAINTAINERS: Add BCM6878 to bcmbca arch entry Add BCM6878 related files to BCMBCA ARCH maintainer list entry Signed-off-by: Anand Gore Signed-off-by: Florian Fainelli MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 10efb7672087e025a51f9b5f68f04fd3e9f94ca0 Author: Anand Gore Date: Wed Jun 1 13:19:58 2022 -0700 MAINTAINERS: Add BCM6858 to bcmbca arch entry Add BCM6858 related files to BCMBCA ARCH maintainer list entry Signed-off-by: Anand Gore Signed-off-by: Florian Fainelli MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 048a9a42f4fa546c92a7efdb9daa326a4a384534 Author: William Zhang Date: Wed Jun 1 13:17:35 2022 -0700 MAINTAINERS: Add BCM4912 to bcmbca arch entry Add BCM4912 related files to BCMBCA ARCH maintainer list entry Signed-off-by: William Zhang Signed-off-by: Florian Fainelli MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 6d0224e50c44113dd80fe1bc50dcda9ebd63ac67 Author: William Zhang Date: Wed Jun 1 15:56:52 2022 -0700 MAINTAINERS: Add BCM63158 to bcmbca arch entry Add BCM63158 related files to BCMBCA ARCH maintainer list entry Signed-off-by: William Zhang Signed-off-by: Florian Fainelli MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 4b6882e40cf4181dcef875fff1d790557596eca0 Author: Anand Gore Date: Mon May 16 10:38:08 2022 -0700 MAINTAINERS: Add BCM63178 to bcmbca arch entry Add BCM63178 related files to BCMBCA ARCH maintainer list entry Signed-off-by: Anand Gore Signed-off-by: Florian Fainelli MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6bcad714e17399fb3d947f91a0474479f67170d8 Author: Anand Gore Date: Thu Jun 2 15:16:44 2022 -0700 ARM: dts: Add DTS files for bcmbca SoC BCM6878 Add dts for ARMv7 based broadband SoC BCM6878. bcm6878.dtsi is the SoC description dts header and bcm96878.dts is a simple dts file for Broadcom BCM96878 Reference board that only enable the UART port. Signed-off-by: Anand Gore Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/bcm6878.dtsi | 110 +++++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/bcm96878.dts | 30 +++++++++++ 3 files changed, 142 insertions(+), 1 deletion(-) commit ad8fb6b8a7d2c30ced21fe3c1d4a367889eaf15d Author: Anand Gore Date: Thu Jun 2 15:16:45 2022 -0700 dt-bindings: arm: Add BCM6878 soc Add BCM6878 SOC device tree description to bcmbca binding document. Signed-off-by: Anand Gore Reviewed-by: Krzysztof Kozlowski Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit a5e3d775d088658a0bd734eebd07283c9ac79c17 Author: keliu Date: Fri May 27 08:59:15 2022 +0000 fpga: Directly use ida_alloc()/free() Use ida_alloc()/ida_free() instead of deprecated ida_simple_get()/ida_simple_remove() . Signed-off-by: keliu Link: https://lore.kernel.org/r/20220527085915.2798928-1-liuke94@huawei.com Signed-off-by: Xu Yilun drivers/fpga/dfl.c | 4 ++-- drivers/fpga/fpga-bridge.c | 6 +++--- drivers/fpga/fpga-mgr.c | 6 +++--- drivers/fpga/fpga-region.c | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) commit 5cd339b370e29b04b85fbb83f40496991465318e Author: Russ Weight Date: Mon Jun 6 09:00:38 2022 -0700 fpga: m10bmc-sec: add max10 secure update functions Create firmware upload ops and call the Firmware Upload support of the Firmware Loader subsystem to enable FPGA image uploads for secure updates of BMC images, FPGA images, etc. Tested-by: Tianfei Zhang Signed-off-by: Russ Weight Link: https://lore.kernel.org/r/20220606160038.846236-6-russell.h.weight@intel.com Signed-off-by: Xu Yilun drivers/fpga/intel-m10-bmc-sec-update.c | 394 ++++++++++++++++++++++++++++++++ 1 file changed, 394 insertions(+) commit 7f03d84a672d87630448339a8a0e1d689f6980f9 Author: Russ Weight Date: Mon Jun 6 09:00:37 2022 -0700 fpga: m10bmc-sec: expose max10 canceled keys in sysfs Extend the MAX10 BMC Secure Update driver to provide sysfs files to expose the 128 bit code signing key (CSK) cancellation vectors. These use the standard bitmap list format (e.g. 1,2-6,9). Each CSK is assigned an ID, a number between 0-127, during the signing process. CSK ID cancellation information is stored in 128-bit fields in write-once locations in flash. The cancellation of a CSK can be used to prevent the card from being rolled back to older images that were signed with a CSK that is now cancelled. Reviewed-by: Tom Rix Tested-by: Tianfei Zhang Signed-off-by: Russ Weight Link: https://lore.kernel.org/r/20220606160038.846236-5-russell.h.weight@intel.com Signed-off-by: Xu Yilun .../testing/sysfs-driver-intel-m10-bmc-sec-update | 24 ++++++++++ drivers/fpga/intel-m10-bmc-sec-update.c | 54 ++++++++++++++++++++++ 2 files changed, 78 insertions(+) commit 154afa5c31cd2de5e6c2c4f35eee390993ee345a Author: Russ Weight Date: Mon Jun 6 09:00:36 2022 -0700 fpga: m10bmc-sec: expose max10 flash update count Extend the MAX10 BMC Secure Update driver to provide a sysfs file to expose the flash update count. Reviewed-by: Tom Rix Tested-by: Tianfei Zhang Signed-off-by: Russ Weight Link: https://lore.kernel.org/r/20220606160038.846236-4-russell.h.weight@intel.com Signed-off-by: Xu Yilun .../testing/sysfs-driver-intel-m10-bmc-sec-update | 8 ++++ drivers/fpga/intel-m10-bmc-sec-update.c | 43 ++++++++++++++++++++++ 2 files changed, 51 insertions(+) commit bdf86d0e6ca307de8c85e9363b31ca8c86c0b0c7 Author: Russ Weight Date: Mon Jun 6 09:00:35 2022 -0700 fpga: m10bmc-sec: create max10 bmc secure update Create a sub-driver for the FPGA Card BMC in order to support secure updates. This patch creates the Max10 BMC Secure Update driver and provides sysfs files for displaying the root entry hashes (REH) for the FPGA static region (SR), the FPGA Partial Reconfiguration (PR) region, and the card BMC. The Intel MAX10 BMC Root of Trust (RoT) requires that all BMC Nios firmware and FPGA images are authenticated using ECDSA before loading and executing on the card. Code Signing Keys (CSK) are used to sign images. CSKs are signed by a root key. The root entry hash is created from the root public key. The RoT provides authentication by storing an REH bitstream to a write-once location. Image signatures are verified against the hash. Reviewed-by: Tom Rix Tested-by: Tianfei Zhang Signed-off-by: Russ Weight Link: https://lore.kernel.org/r/20220606160038.846236-3-russell.h.weight@intel.com Signed-off-by: Xu Yilun .../testing/sysfs-driver-intel-m10-bmc-sec-update | 29 +++++ MAINTAINERS | 7 ++ drivers/fpga/Kconfig | 12 ++ drivers/fpga/Makefile | 3 + drivers/fpga/intel-m10-bmc-sec-update.c | 134 +++++++++++++++++++++ 5 files changed, 185 insertions(+) commit 3f83b62a7bfa273959cb124bb581a20a68d114c3 Author: Russ Weight Date: Mon Jun 6 09:00:34 2022 -0700 mfd: intel-m10-bmc: Rename n3000bmc-secure driver The n3000bmc-secure driver has changed to n3000bmc-sec-update. Update the name in the list of the intel-m10-bmc sub-drivers. Tested-by: Tianfei Zhang Signed-off-by: Russ Weight Acked-by: Lee Jones Link: https://lore.kernel.org/r/20220606160038.846236-2-russell.h.weight@intel.com Signed-off-by: Xu Yilun drivers/mfd/intel-m10-bmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e663e06bd3f21e64bc2163910f626af68add6308 Author: Anand Gore Date: Wed Jun 1 13:19:56 2022 -0700 ARM64: dts: Add DTS files for bcmbca SoC BCM6858 Add DTS for ARMv8 based broadband SoC BCM6858. bcm6858.dtsi is the SoC description DTS header and bcm96858.dts is a simple DTS file for Broadcom BCM96858 Reference board that only enables the UART port. Signed-off-by: Anand Gore Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 3 +- arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi | 121 +++++++++++++++++++++++ arch/arm64/boot/dts/broadcom/bcmbca/bcm96858.dts | 30 ++++++ 3 files changed, 153 insertions(+), 1 deletion(-) commit 1ba56aeb391401c4cb2126c39f90b3cdbfabdb3f Author: William Zhang Date: Wed Jun 1 13:17:34 2022 -0700 arm64: dts: Add DTS files for bcmbca SoC BCM4912 Add DTS for ARMv8 based broadband SoC BCM4912. bcm4912.dtsi is the SoC description DTS header and bcm94912.dts is a simple DTS file for Broadcom BCM94912 Reference board that only enable the UART port. Signed-off-by: William Zhang Acked-by: Krzysztof Kozlowski Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 3 +- arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi | 128 +++++++++++++++++++++++ arch/arm64/boot/dts/broadcom/bcmbca/bcm94912.dts | 30 ++++++ 3 files changed, 160 insertions(+), 1 deletion(-) commit 076dcedc6628c6bf92bd17bfcf8fb7b1af62bfb6 Author: William Zhang Date: Wed Jun 1 15:56:51 2022 -0700 arm64: dts: Add DTS files for bcmbca SoC BCM63158 Add DTS for ARMv8 based broadband SoC BCM63158. bcm63158.dtsi is the SoC description DTS header and bcm963158.dts is a simple DTS file for Broadcom BCM963158 Reference board that only enable the UART port. Signed-off-by: William Zhang Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/Makefile | 1 + arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 2 + arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi | 128 ++++++++++++++++++++++ arch/arm64/boot/dts/broadcom/bcmbca/bcm963158.dts | 30 +++++ 4 files changed, 161 insertions(+) commit 5e7bcaf89f571c6bff79faf24cbe7c434f1a4c39 Author: Anand Gore Date: Wed Jun 1 13:19:57 2022 -0700 dt-bindings: arm64: Add BCM6858 SoC to binding document Add BCM6858 SOC device tree description to bcmbca binding document. Signed-off-by: Anand Gore Reviewed-by: Krzysztof Kozlowski Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 709ccce78823c212c172e31cb72ab1bcef5eafaf Author: William Zhang Date: Fri May 27 17:56:51 2022 -0700 dt-bindings: arm64: Add BCM4912 SoC to binding document Add BCM4912 SoC device tree description to bcmbca binding document. Signed-off-by: William Zhang Acked-by: Krzysztof Kozlowski Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit c8e5c40ddb6a12477c23771e7cf2e6c5551b9634 Author: William Zhang Date: Wed Jun 1 15:56:49 2022 -0700 dt-bindings: arm64: add BCM63158 SoC to binding document Add BCM63158 SoC device tree description to bcmbca binding document. Signed-off-by: William Zhang Acked-by: Krzysztof Kozlowski Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit fc85b7e64acb7fa45b37aeb2b0a4035bd9c5aed0 Author: Anand Gore Date: Mon May 16 10:38:06 2022 -0700 ARM: dts: add dts files for bcmbca soc 63178 Add dts for ARMv7 based broadband SoC BCM63178. bcm63178.dtsi is the SoC description dts header and bcm963178.dts is a simple dts file for Broadcom BCM963178 Reference board that only enable the UART port. Signed-off-by: Anand Gore Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/bcm63178.dtsi | 118 ++++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/bcm963178.dts | 30 ++++++++++ 3 files changed, 150 insertions(+), 1 deletion(-) commit 312137db31447f04993c331c8452828e53ff63dc Author: Anand Gore Date: Mon May 16 10:38:07 2022 -0700 dt-bindings: arm: add BCM63178 SoC to binding document Add BCM63178 SOC device tree description to bcmbca binding document. Signed-off-by: Anand Gore Acked-by: Krzysztof Kozlowski Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 7aadaa988c5ea0894b3bbea598e4da56f078a289 Author: Like Xu Date: Wed May 18 21:25:12 2022 +0800 KVM: x86/pmu: Drop amd_event_mapping[] in the KVM context All gp or fixed counters have been reprogrammed using PERF_TYPE_RAW, which means that the table that maps perf_hw_id to event select values is no longer useful, at least for AMD. For Intel, the logic to check if the pmu event reported by Intel cpuid is not available is still required, in which case pmc_perf_hw_id() could be renamed to hw_event_is_unavail() and a bool value is returned to replace the semantics of "PERF_COUNT_HW_MAX+1". Signed-off-by: Like Xu Message-Id: <20220518132512.37864-12-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm-x86-pmu-ops.h | 2 +- arch/x86/kvm/pmu.c | 6 ++-- arch/x86/kvm/pmu.h | 2 +- arch/x86/kvm/svm/pmu.c | 56 ++-------------------------------- arch/x86/kvm/vmx/pmu_intel.c | 11 +++---- 5 files changed, 12 insertions(+), 65 deletions(-) commit 08dca7a8e73abfeb3a998714272d1d1c974b0190 Author: Like Xu Date: Wed May 18 21:25:11 2022 +0800 KVM: x86/pmu: Replace pmc_perf_hw_id() with perf_get_hw_event_config() With the help of perf_get_hw_event_config(), KVM could query the correct EVENTSEL_{EVENT, UMASK} pair of a kernel-generic hw event directly from the different *_perfmon_event_map[] by the kernel's pre-defined perf_hw_id. Also extend the bit range of the comparison field to AMD64_RAW_EVENT_MASK_NB to prevent AMD from defining EventSelect[11:8] into perfmon_event_map[] one day. Signed-off-by: Like Xu Message-Id: <20220518132512.37864-11-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit dc852ff5bb419195c7d64cfcbe26f747490fca14 Author: Like Xu Date: Wed May 18 21:25:10 2022 +0800 perf: x86/core: Add interface to query perfmon_event_map[] directly Currently, we have [intel|knc|p4|p6]_perfmon_event_map on the Intel platforms and amd_[f17h]_perfmon_event_map on the AMD platforms. Early clumsy KVM code or other potential perf_event users may have hard-coded these perfmon_maps (e.g., arch/x86/kvm/svm/pmu.c), so it would not make sense to program a common hardware event based on the generic "enum perf_hw_id" once the two tables do not match. Let's provide an interface for callers outside the perf subsystem to get the counter config based on the perfmon_event_map currently in use, and it also helps to save bytes. Cc: Peter Zijlstra Signed-off-by: Like Xu Acked-by: Peter Zijlstra (Intel) Message-Id: <20220518132512.37864-10-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/events/core.c | 11 +++++++++++ arch/x86/include/asm/perf_event.h | 6 ++++++ 2 files changed, 17 insertions(+) commit 02791a5c362b7d71447efb1d0131d8368bb821f2 Author: Like Xu Date: Wed May 18 21:25:09 2022 +0800 KVM: x86/pmu: Use PERF_TYPE_RAW to merge reprogram_{gp,fixed}counter() The code sketch for reprogram_{gp, fixed}_counter() is similar, while the fixed counter using the PERF_TYPE_HARDWAR type and the gp being able to use either PERF_TYPE_HARDWAR or PERF_TYPE_RAW type depending on the pmc->eventsel value. After 'commit 761875634a5e ("KVM: x86/pmu: Setup pmc->eventsel for fixed PMCs")', the pmc->eventsel of the fixed counter will also have been setup with the same semantic value and will not be changed during the guest runtime. The original story of using the PERF_TYPE_HARDWARE type is to emulate guest architecture PMU on a host without architecture PMU (the Pentium 4), for which the guest vPMC needs to be reprogrammed using the kernel generic perf_hw_id. But essentially, "the HARDWARE is just a convenience wrapper over RAW IIRC", quoated from Peterz. So it could be pretty safe to use the PERF_TYPE_RAW type only in practice to program both gp and fixed counters naturally in the reprogram_counter(). To make the gp and fixed counters more semantically symmetrical, the selection of EVENTSEL_{USER, OS, INT} bits is temporarily translated via fixed_ctr_ctrl before the pmc_reprogram_counter() call. Cc: Peter Zijlstra Suggested-by: Jim Mattson Signed-off-by: Like Xu Message-Id: <20220518132512.37864-9-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 79 +++++++++++++++--------------------------------------- 1 file changed, 21 insertions(+), 58 deletions(-) commit e99fae6edebcdf53658f531ee3c913ca74536355 Author: Paolo Bonzini Date: Wed May 25 05:28:56 2022 -0400 KVM: x86/pmu: Use only the uniform interface reprogram_counter() Since reprogram_counter(), reprogram_{gp, fixed}_counter() currently have the same incoming parameter "struct kvm_pmc *pmc", the callers can simplify the conetxt by using uniformly exported interface, which makes reprogram_ {gp, fixed}_counter() static and eliminates EXPORT_SYMBOL_GPL. Signed-off-by: Like Xu Message-Id: <20220518132512.37864-8-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 6 ++---- arch/x86/kvm/pmu.h | 2 -- arch/x86/kvm/svm/pmu.c | 2 +- arch/x86/kvm/vmx/pmu_intel.c | 4 ++-- 4 files changed, 5 insertions(+), 9 deletions(-) commit 76d287b2342e1906e399fd19d6500013aa074a50 Author: Like Xu Date: Wed May 18 21:25:07 2022 +0800 KVM: x86/pmu: Drop "u8 ctrl, int idx" for reprogram_fixed_counter() Since afrer reprogram_fixed_counter() is called, it's bound to assign the requested fixed_ctr_ctrl to pmu->fixed_ctr_ctrl, this assignment step can be moved forward (the stale value for diff is saved extra early), thus simplifying the passing of parameters. No functional change intended. Signed-off-by: Like Xu Message-Id: <20220518132512.37864-7-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 13 ++++++------- arch/x86/kvm/pmu.h | 2 +- arch/x86/kvm/vmx/pmu_intel.c | 14 +++++++------- 3 files changed, 14 insertions(+), 15 deletions(-) commit fb121aaf19cd5047a01599debbb85a2c15275727 Author: Like Xu Date: Wed May 18 21:25:06 2022 +0800 KVM: x86/pmu: Drop "u64 eventsel" for reprogram_gp_counter() Because inside reprogram_gp_counter() it is bound to assign the requested eventel to pmc->eventsel, this assignment step can be moved forward, thus simplifying the passing of parameters to "struct kvm_pmc *pmc" only. No functional change intended. Signed-off-by: Like Xu Message-Id: <20220518132512.37864-6-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 7 +++---- arch/x86/kvm/pmu.h | 2 +- arch/x86/kvm/svm/pmu.c | 6 ++++-- arch/x86/kvm/vmx/pmu_intel.c | 3 ++- 4 files changed, 10 insertions(+), 8 deletions(-) commit a40239b4cf33b2de872b04759c3e5ab87cc72a7f Author: Like Xu Date: Wed May 18 21:25:05 2022 +0800 KVM: x86/pmu: Pass only "struct kvm_pmc *pmc" to reprogram_counter() Passing the reference "struct kvm_pmc *pmc" when creating pmc->perf_event is sufficient. This change helps to simplify the calling convention by replacing reprogram_{gp, fixed}_counter() with reprogram_counter() seamlessly. No functional change intended. Signed-off-by: Like Xu Message-Id: <20220518132512.37864-5-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 17 +++++------------ arch/x86/kvm/pmu.h | 2 +- arch/x86/kvm/vmx/pmu_intel.c | 32 ++++++++++++++++++-------------- 3 files changed, 24 insertions(+), 27 deletions(-) commit 89cb454ea984d0411523dc10e70e9bf0aca1b527 Author: Like Xu Date: Wed May 18 21:25:03 2022 +0800 KVM: x86/pmu: Extract check_pmu_event_filter() handling both GP and fixed counters Checking the kvm->arch.pmu_event_filter policy in both gp and fixed code paths was somewhat redundant, so common parts can be extracted, which reduces code footprint and improves readability. Signed-off-by: Like Xu Reviewed-by: Wanpeng Li Message-Id: <20220518132512.37864-3-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 63 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 26 deletions(-) commit a33095f4937b362306f8636742450cff1c4630af Author: Like Xu Date: Wed May 18 21:25:02 2022 +0800 KVM: x86/pmu: Update comments for AMD gp counters The obsolete comment could more accurately state that AMD platforms have two base MSR addresses and two different maximum numbers for gp counters, depending on the X86_FEATURE_PERFCTR_CORE feature. Signed-off-by: Like Xu Message-Id: <20220518132512.37864-2-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d1c88a4020567ba4da52f778bcd9619d87e4ea75 Author: Paolo Bonzini Date: Wed May 25 04:39:22 2022 -0400 KVM: x86: always allow host-initiated writes to PMU MSRs Whenever an MSR is part of KVM_GET_MSR_INDEX_LIST, it has to be always retrievable and settable with KVM_GET_MSR and KVM_SET_MSR. Accept the PMU MSRs unconditionally in intel_is_valid_msr, if the access was host-initiated. Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 4 ++-- arch/x86/kvm/pmu.h | 4 ++-- arch/x86/kvm/svm/pmu.c | 2 +- arch/x86/kvm/vmx/pmu_intel.c | 27 +++++++++++++++++---------- arch/x86/kvm/x86.c | 10 +++++----- 5 files changed, 27 insertions(+), 20 deletions(-) commit bfb088d9fb5abdd3fbf00bae9abdfee8b92265aa Author: Paolo Bonzini Date: Wed Jun 1 03:21:19 2022 -0400 KVM: vmx, pmu: accept 0 for host-initiated write to MSR_IA32_DS_AREA Whenever an MSR is part of KVM_GET_MSR_INDEX_LIST, as is the case for MSR_IA32_DS_AREA, it has to be always settable with KVM_SET_MSR. Accept a zero value for these MSRs to obey the contract. Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/pmu_intel.c | 2 ++ 1 file changed, 2 insertions(+) commit 98defd2e17803263f49548fea930cfc974d505aa Author: Like Xu Date: Mon May 9 18:22:02 2022 +0800 KVM: x86/pmu: Ignore pmu->global_ctrl check if vPMU doesn't support global_ctrl MSR_CORE_PERF_GLOBAL_CTRL is introduced as part of Architecture PMU V2, as indicated by Intel SDM 19.2.2 and the intel_is_valid_msr() function. So in the absence of global_ctrl support, all PMCs are enabled as AMD does. Signed-off-by: Like Xu Message-Id: <20220509102204.62389-1-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/pmu_intel.c | 3 +++ 1 file changed, 3 insertions(+) commit c49467a45fe013ad7a892bf1479b1438315058f3 Author: Like Xu Date: Tue May 10 12:44:07 2022 +0800 KVM: x86/pmu: Don't overwrite the pmu->global_ctrl when refreshing Assigning a value to pmu->global_ctrl just to set the value of pmu->global_ctrl_mask is more readable but does not conform to the specification. The value is reset to zero on Power up and Reset but stays unchanged on INIT, like most other MSRs. Signed-off-by: Like Xu Message-Id: <20220510044407.26445-1-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/pmu_intel.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit ec4036edf924f741bc717d9afa25053cf63fa218 Author: Paolo Bonzini Date: Fri May 20 08:00:05 2022 -0400 KVM: x86/pmu: remove useless prototype Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.h | 1 - 1 file changed, 1 deletion(-) commit 43d62d108af87e683ebe41ffd76ac60594544de3 Author: Like Xu Date: Thu May 19 01:01:16 2022 +0800 KVM: x86/pmu: Move the vmx_icl_pebs_cpu[] definition out of the header file Defining a static const array in a header file would introduce redundant definitions to the point of confusing semantics, and such a use case would only bring complaints from the compiler: arch/x86/kvm/pmu.h:20:32: warning: ‘vmx_icl_pebs_cpu’ defined but not used [-Wunused-const-variable=] 20 | static const struct x86_cpu_id vmx_icl_pebs_cpu[] = { | ^~~~~~~~~~~~~~~~ Fixes: a095df2c5f48 ("KVM: x86/pmu: Adjust precise_ip to emulate Ice Lake guest PDIR counter") Signed-off-by: Like Xu Message-Id: <20220518170118.66263-1-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 7 +++++++ arch/x86/kvm/pmu.h | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) commit 5d9cd8b55cdc0fa2260bebab590430c8f90ce955 Author: Guo Zhengkui Date: Wed May 11 20:05:55 2022 +0800 selftests: kvm: replace ternary operator with min() Fix the following coccicheck warnings: tools/testing/selftests/kvm/lib/s390x/ucall.c:25:15-17: WARNING opportunity for min() tools/testing/selftests/kvm/lib/x86_64/ucall.c:27:15-17: WARNING opportunity for min() tools/testing/selftests/kvm/lib/riscv/ucall.c:56:15-17: WARNING opportunity for min() tools/testing/selftests/kvm/lib/aarch64/ucall.c:82:15-17: WARNING opportunity for min() tools/testing/selftests/kvm/lib/aarch64/ucall.c:55:20-21: WARNING opportunity for min() min() is defined in tools/include/linux/kernel.h. Signed-off-by: Guo Zhengkui Acked-by: Claudio Imbrenda Acked-by: Anup Patel Message-Id: <20220511120621.36956-1-guozhengkui@vivo.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/aarch64/ucall.c | 4 ++-- tools/testing/selftests/kvm/lib/riscv/ucall.c | 2 +- tools/testing/selftests/kvm/lib/s390x/ucall.c | 2 +- tools/testing/selftests/kvm/lib/x86_64/ucall.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit cf8e55fe50df0c0292b389a165daa81193cd39d1 Author: Like Xu Date: Mon Apr 11 18:19:46 2022 +0800 KVM: x86/pmu: Expose CPUIDs feature bits PDCM, DS, DTES64 The CPUID features PDCM, DS and DTES64 are required for PEBS feature. KVM would expose CPUID feature PDCM, DS and DTES64 to guest when PEBS is supported in the KVM on the Ice Lake server platforms. Originally-by: Andi Kleen Co-developed-by: Kan Liang Signed-off-by: Kan Liang Co-developed-by: Luwei Kang Signed-off-by: Luwei Kang Signed-off-by: Like Xu Message-Id: <20220411101946.20262-18-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/capabilities.h | 28 +++++++++++++++++----------- arch/x86/kvm/vmx/vmx.c | 15 +++++++++++++++ 2 files changed, 32 insertions(+), 11 deletions(-) commit 59cc99f6e971bb24b40e27f695daab98e2eff4b8 Author: Like Xu Date: Mon Apr 11 18:19:45 2022 +0800 KVM: x86/cpuid: Refactor host/guest CPU model consistency check For the same purpose, the leagcy intel_pmu_lbr_is_compatible() can be renamed for reuse by more callers, and remove the comment about LBR use case can be deleted by the way. Signed-off-by: Like Xu Acked-by: Peter Zijlstra (Intel) Message-Id: <20220411101946.20262-17-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.h | 5 +++++ arch/x86/kvm/vmx/pmu_intel.c | 12 +----------- arch/x86/kvm/vmx/vmx.c | 2 +- arch/x86/kvm/vmx/vmx.h | 1 - 4 files changed, 7 insertions(+), 13 deletions(-) commit 968635abd5f5986f3cb6f15602d365cf1b551c5d Author: Like Xu Date: Mon Apr 11 18:19:44 2022 +0800 KVM: x86/pmu: Add kvm_pmu_cap to optimize perf_get_x86_pmu_capability The information obtained from the interface perf_get_x86_pmu_capability() doesn't change, so an exported "struct x86_pmu_capability" is introduced for all guests in the KVM, and it's initialized before hardware_setup(). Signed-off-by: Like Xu Message-Id: <20220411101946.20262-16-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 27 ++++++++------------------- arch/x86/kvm/pmu.c | 3 +++ arch/x86/kvm/pmu.h | 19 +++++++++++++++++++ arch/x86/kvm/vmx/pmu_intel.c | 17 ++++++++--------- arch/x86/kvm/x86.c | 9 ++++----- 5 files changed, 42 insertions(+), 33 deletions(-) commit 854250329c02c0616a42532d65e81365272326d1 Author: Like Xu Date: Mon Apr 11 18:19:43 2022 +0800 KVM: x86/pmu: Disable guest PEBS temporarily in two rare situations The guest PEBS will be disabled when some users try to perf KVM and its user-space through the same PEBS facility OR when the host perf doesn't schedule the guest PEBS counter in a one-to-one mapping manner (neither of these are typical scenarios). The PEBS records in the guest DS buffer are still accurate and the above two restrictions will be checked before each vm-entry only if guest PEBS is deemed to be enabled. Suggested-by: Wei Wang Signed-off-by: Like Xu Acked-by: Peter Zijlstra (Intel) Message-Id: <20220411101946.20262-15-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/events/intel/core.c | 11 +++++++++-- arch/x86/include/asm/kvm_host.h | 9 +++++++++ arch/x86/kvm/vmx/pmu_intel.c | 20 ++++++++++++++++++++ arch/x86/kvm/vmx/vmx.c | 4 ++++ arch/x86/kvm/vmx/vmx.h | 1 + 5 files changed, 43 insertions(+), 2 deletions(-) commit 63f21f326fc9e068d04c2c1d0a722e8db65588ba Author: Like Xu Date: Mon Apr 11 18:19:42 2022 +0800 KVM: x86/pmu: Move pmc_speculative_in_use() to arch/x86/kvm/pmu.h It allows this inline function to be reused by more callers in more files, such as pmu_intel.c. Signed-off-by: Like Xu Acked-by: Peter Zijlstra (Intel) Message-Id: <20220411101946.20262-14-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 11 ----------- arch/x86/kvm/pmu.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) commit d10551738f6adcc3e6040fc846b171e72e94f0e9 Author: Like Xu Date: Mon Apr 11 18:19:41 2022 +0800 KVM: x86: Set PEBS_UNAVAIL in IA32_MISC_ENABLE when PEBS is enabled The bit 12 represents "Processor Event Based Sampling Unavailable (RO)" : 1 = PEBS is not supported. 0 = PEBS is supported. A write to this PEBS_UNAVL available bit will bring #GP(0) when guest PEBS is enabled. Some PEBS drivers in guest may care about this bit. Signed-off-by: Like Xu Message-Id: <20220411101946.20262-13-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/pmu_intel.c | 2 ++ arch/x86/kvm/x86.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 902caeb6841a64072791b1c18f9f56089566865d Author: Like Xu Date: Mon Apr 11 18:19:40 2022 +0800 KVM: x86/pmu: Add PEBS_DATA_CFG MSR emulation to support adaptive PEBS If IA32_PERF_CAPABILITIES.PEBS_BASELINE [bit 14] is set, the adaptive PEBS is supported. The PEBS_DATA_CFG MSR and adaptive record enable bits (IA32_PERFEVTSELx.Adaptive_Record and IA32_FIXED_CTR_CTRL. FCx_Adaptive_Record) are also supported. Adaptive PEBS provides software the capability to configure the PEBS records to capture only the data of interest, keeping the record size compact. An overflow of PMCx results in generation of an adaptive PEBS record with state information based on the selections specified in MSR_PEBS_DATA_CFG.By default, the record only contain the Basic group. When guest adaptive PEBS is enabled, the IA32_PEBS_ENABLE MSR will be added to the perf_guest_switch_msr() and switched during the VMX transitions just like CORE_PERF_GLOBAL_CTRL MSR. According to Intel SDM, software is recommended to PEBS Baseline when the following is true. IA32_PERF_CAPABILITIES.PEBS_BASELINE[14] && IA32_PERF_CAPABILITIES.PEBS_FMT[11:8] ≥ 4. Co-developed-by: Luwei Kang Signed-off-by: Luwei Kang Signed-off-by: Like Xu Message-Id: <20220411101946.20262-12-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/events/intel/core.c | 8 ++++++++ arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/vmx/pmu_intel.c | 20 +++++++++++++++++++- arch/x86/kvm/x86.c | 2 +- 4 files changed, 30 insertions(+), 2 deletions(-) commit 8183a538cd95f72f11871b35726256ec3bcb9439 Author: Like Xu Date: Mon Apr 11 18:19:39 2022 +0800 KVM: x86/pmu: Add IA32_DS_AREA MSR emulation to support guest DS When CPUID.01H:EDX.DS[21] is set, the IA32_DS_AREA MSR exists and points to the linear address of the first byte of the DS buffer management area, which is used to manage the PEBS records. When guest PEBS is enabled, the MSR_IA32_DS_AREA MSR will be added to the perf_guest_switch_msr() and switched during the VMX transitions just like CORE_PERF_GLOBAL_CTRL MSR. The WRMSR to IA32_DS_AREA MSR brings a #GP(0) if the source register contains a non-canonical address. Originally-by: Andi Kleen Co-developed-by: Kan Liang Signed-off-by: Kan Liang Signed-off-by: Like Xu Acked-by: Peter Zijlstra (Intel) Message-Id: <20220411101946.20262-11-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/events/intel/core.c | 10 +++++++++- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/vmx/pmu_intel.c | 11 +++++++++++ arch/x86/kvm/x86.c | 2 +- 4 files changed, 22 insertions(+), 2 deletions(-) commit 6ebe44366bdeaf3059f2b644bbd99824ae824228 Author: Like Xu Date: Mon Apr 11 18:19:38 2022 +0800 KVM: x86/pmu: Adjust precise_ip to emulate Ice Lake guest PDIR counter The PEBS-PDIR facility on Ice Lake server is supported on IA31_FIXED0 only. If the guest configures counter 32 and PEBS is enabled, the PEBS-PDIR facility is supposed to be used, in which case KVM adjusts attr.precise_ip to 3 and request host perf to assign the exactly requested counter or fail. The CPU model check is also required since some platforms may place the PEBS-PDIR facility in another counter index. Signed-off-by: Like Xu Acked-by: Peter Zijlstra (Intel) Message-Id: <20220411101946.20262-10-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/events/intel/core.c | 2 +- arch/x86/kvm/pmu.c | 2 ++ arch/x86/kvm/pmu.h | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) commit 79f3e3b58386a2fc05054367b905619f741beeb4 Author: Like Xu Date: Mon Apr 11 18:19:37 2022 +0800 KVM: x86/pmu: Reprogram PEBS event to emulate guest PEBS counter When a guest counter is configured as a PEBS counter through IA32_PEBS_ENABLE, a guest PEBS event will be reprogrammed by configuring a non-zero precision level in the perf_event_attr. The guest PEBS overflow PMI bit would be set in the guest GLOBAL_STATUS MSR when PEBS facility generates a PEBS overflow PMI based on guest IA32_DS_AREA MSR. Even with the same counter index and the same event code and mask, guest PEBS events will not be reused for non-PEBS events. Originally-by: Andi Kleen Co-developed-by: Kan Liang Signed-off-by: Kan Liang Signed-off-by: Like Xu Acked-by: Peter Zijlstra (Intel) Message-Id: <20220411101946.20262-9-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) commit 5821a0bbb4c39960975d29d6b58ae290088db0ed Author: Jani Nikula Date: Wed May 11 12:46:19 2022 +0300 drm/i915/uc: remove accidental static from a local variable The arrays are static const, but the pointer shouldn't be static. Fixes: 3d832f370d16 ("drm/i915/uc: Allow platforms to have GuC but not HuC") Cc: John Harrison Cc: Lucas De Marchi Cc: Daniele Ceraolo Spurio Signed-off-by: Jani Nikula Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220511094619.27889-1-jani.nikula@intel.com drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c59a1f106f5cd4843c097069ff1bb2ad72103a67 Author: Like Xu Date: Mon Apr 11 18:19:36 2022 +0800 KVM: x86/pmu: Add IA32_PEBS_ENABLE MSR emulation for extended PEBS If IA32_PERF_CAPABILITIES.PEBS_BASELINE [bit 14] is set, the IA32_PEBS_ENABLE MSR exists and all architecturally enumerated fixed and general-purpose counters have corresponding bits in IA32_PEBS_ENABLE that enable generation of PEBS records. The general-purpose counter bits start at bit IA32_PEBS_ENABLE[0], and the fixed counter bits start at bit IA32_PEBS_ENABLE[32]. When guest PEBS is enabled, the IA32_PEBS_ENABLE MSR will be added to the perf_guest_switch_msr() and atomically switched during the VMX transitions just like CORE_PERF_GLOBAL_CTRL MSR. Based on whether the platform supports x86_pmu.pebs_ept, it has also refactored the way to add more msrs to arr[] in intel_guest_get_msrs() for extensibility. Originally-by: Andi Kleen Co-developed-by: Kan Liang Signed-off-by: Kan Liang Co-developed-by: Luwei Kang Signed-off-by: Luwei Kang Signed-off-by: Like Xu Acked-by: Peter Zijlstra (Intel) Message-Id: <20220411101946.20262-8-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/events/intel/core.c | 75 ++++++++++++++++++++++++++++++---------- arch/x86/include/asm/kvm_host.h | 3 ++ arch/x86/include/asm/msr-index.h | 6 ++++ arch/x86/kvm/vmx/pmu_intel.c | 31 +++++++++++++++++ arch/x86/kvm/x86.c | 1 + 5 files changed, 98 insertions(+), 18 deletions(-) commit 0d23dc34a7cefde5ee25c321949579694edbd16d Author: Peter Zijlstra (Intel) Date: Mon Apr 11 18:19:35 2022 +0800 x86/perf/core: Add pebs_capable to store valid PEBS_COUNTER_MASK value The value of pebs_counter_mask will be accessed frequently for repeated use in the intel_guest_get_msrs(). So it can be optimized instead of endlessly mucking about with branches. Signed-off-by: Peter Zijlstra (Intel) Message-Id: <20220411101946.20262-7-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/events/intel/core.c | 14 ++++++-------- arch/x86/events/perf_event.h | 1 + 2 files changed, 7 insertions(+), 8 deletions(-) commit 2c985527dd8d283e786ad7a67e532ef7f6f00fac Author: Like Xu Date: Mon Apr 11 18:19:34 2022 +0800 KVM: x86/pmu: Introduce the ctrl_mask value for fixed counter The mask value of fixed counter control register should be dynamic adjusted with the number of fixed counters. This patch introduces a variable that includes the reserved bits of fixed counter control registers. This is a generic code refactoring. Co-developed-by: Luwei Kang Signed-off-by: Luwei Kang Signed-off-by: Like Xu Acked-by: Peter Zijlstra (Intel) Message-Id: <20220411101946.20262-6-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/vmx/pmu_intel.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit bef6ecca46ac938ffb352d7fa2f6eafd1b6a41be Author: Like Xu Date: Mon Apr 11 18:19:33 2022 +0800 KVM: x86/pmu: Set MSR_IA32_MISC_ENABLE_EMON bit when vPMU is enabled On Intel platforms, the software can use the IA32_MISC_ENABLE[7] bit to detect whether the processor supports performance monitoring facility. It depends on the PMU is enabled for the guest, and a software write operation to this available bit will be ignored. The proposal to ignore the toggle in KVM is the way to go and that behavior matches bare metal. Signed-off-by: Like Xu Message-Id: <20220411101946.20262-5-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/pmu_intel.c | 1 + arch/x86/kvm/x86.c | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) commit 39a4d779546a993c53cea28e659e8edc9f868af0 Author: Like Xu Date: Mon Apr 11 18:19:32 2022 +0800 perf/x86/core: Pass "struct kvm_pmu *" to determine the guest values Splitting the logic for determining the guest values is unnecessarily confusing, and potentially fragile. Perf should have full knowledge and control of what values are loaded for the guest. If we change .guest_get_msrs() to take a struct kvm_pmu pointer, then it can generate the full set of guest values by grabbing guest ds_area and pebs_data_cfg. Alternatively, .guest_get_msrs() could take the desired guest MSR values directly (ds_area and pebs_data_cfg), but kvm_pmu is vendor agnostic, so we don't see any reason to not just pass the pointer. Suggested-by: Sean Christopherson Signed-off-by: Like Xu Acked-by: Peter Zijlstra (Intel) Message-Id: <20220411101946.20262-4-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/events/core.c | 4 ++-- arch/x86/events/intel/core.c | 4 ++-- arch/x86/events/perf_event.h | 2 +- arch/x86/include/asm/perf_event.h | 4 ++-- arch/x86/kvm/vmx/vmx.c | 3 ++- 5 files changed, 9 insertions(+), 8 deletions(-) commit 69e575dd4fba51dca9f25db7b2033d730699e7ff Author: Like Xu Date: Mon Apr 11 18:19:31 2022 +0800 perf/x86/intel: Handle guest PEBS overflow PMI for KVM guest With PEBS virtualization, the guest PEBS records get delivered to the guest DS, and the host pmi handler uses perf_guest_cbs->is_in_guest() to distinguish whether the PMI comes from the guest code like Intel PT. No matter how many guest PEBS counters are overflowed, only triggering one fake event is enough. The fake event causes the KVM PMI callback to be called, thereby injecting the PEBS overflow PMI into the guest. KVM may inject the PMI with BUFFER_OVF set, even if the guest DS is empty. That should really be harmless. Thus guest PEBS handler would retrieve the correct information from its own PEBS records buffer. Cc: linux-perf-users@vger.kernel.org Originally-by: Andi Kleen Co-developed-by: Kan Liang Signed-off-by: Kan Liang Signed-off-by: Like Xu Message-Id: <20220411101946.20262-3-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/events/intel/core.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit fb358e0b811eec233f6db86d591b3af99d23c8e3 Author: Like Xu Date: Mon Apr 11 18:19:30 2022 +0800 perf/x86/intel: Add EPT-Friendly PEBS for Ice Lake Server Add support for EPT-Friendly PEBS, a new CPU feature that enlightens PEBS to translate guest linear address through EPT, and facilitates handling VM-Exits that occur when accessing PEBS records. More information can be found in the December 2021 release of Intel's SDM, Volume 3, 18.9.5 "EPT-Friendly PEBS". This new hardware facility makes sure the guest PEBS records will not be lost, which is available on Intel Ice Lake Server platforms (and later). KVM will check this field through perf_get_x86_pmu_capability() instead of hard coding the CPU models in the KVM code. If it is supported, the guest PEBS capability will be exposed to the guest. Guest PEBS can be enabled when and only when "EPT-Friendly PEBS" is supported and EPT is enabled. Cc: linux-perf-users@vger.kernel.org Signed-off-by: Like Xu Message-Id: <20220411101946.20262-2-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/events/core.c | 1 + arch/x86/events/intel/core.c | 1 + arch/x86/events/perf_event.h | 3 ++- arch/x86/include/asm/perf_event.h | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) commit d588bb9be1da6aa750aa64875fe57369db983d8b Author: Chao Gao Date: Tue Apr 19 23:45:10 2022 +0800 KVM: VMX: enable IPI virtualization With IPI virtualization enabled, the processor emulates writes to APIC registers that would send IPIs. The processor sets the bit corresponding to the vector in target vCPU's PIR and may send a notification (IPI) specified by NDST and NV fields in target vCPU's Posted-Interrupt Descriptor (PID). It is similar to what IOMMU engine does when dealing with posted interrupt from devices. A PID-pointer table is used by the processor to locate the PID of a vCPU with the vCPU's APIC ID. The table size depends on maximum APIC ID assigned for current VM session from userspace. Allocating memory for PID-pointer table is deferred to vCPU creation, because irqchip mode and VM-scope maximum APIC ID is settled at that point. KVM can skip PID-pointer table allocation if !irqchip_in_kernel(). Like VT-d PI, if a vCPU goes to blocked state, VMM needs to switch its notification vector to wakeup vector. This can ensure that when an IPI for blocked vCPUs arrives, VMM can get control and wake up blocked vCPUs. And if a VCPU is preempted, its posted interrupt notification is suppressed. Note that IPI virtualization can only virualize physical-addressing, flat mode, unicast IPIs. Sending other IPIs would still cause a trap-like APIC-write VM-exit and need to be handled by VMM. Signed-off-by: Chao Gao Signed-off-by: Zeng Guang Message-Id: <20220419154510.11938-1-guang.zeng@intel.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm-x86-ops.h | 1 + arch/x86/include/asm/kvm_host.h | 1 + arch/x86/include/asm/vmx.h | 8 ++++ arch/x86/include/asm/vmxfeatures.h | 2 + arch/x86/kvm/vmx/capabilities.h | 6 +++ arch/x86/kvm/vmx/posted_intr.c | 15 ++++++- arch/x86/kvm/vmx/posted_intr.h | 2 + arch/x86/kvm/vmx/vmx.c | 82 +++++++++++++++++++++++++++++++++++--- arch/x86/kvm/vmx/vmx.h | 7 ++++ arch/x86/kvm/x86.c | 2 +- 10 files changed, 119 insertions(+), 7 deletions(-) commit 753dcf7a8686a750fa6aa4b4ca42c6945fc75ac1 Author: Zeng Guang Date: Fri Apr 22 21:44:56 2022 +0800 kvm: selftests: Add KVM_CAP_MAX_VCPU_ID cap test Basic test coverage of KVM_CAP_MAX_VCPU_ID cap. This capability can be enabled before vCPU creation and only allowed to set once. if assigned vcpu id is beyond KVM_CAP_MAX_VCPU_ID capability, vCPU creation will fail. Signed-off-by: Zeng Guang Message-Id: <20220422134456.26655-1-guang.zeng@intel.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/.gitignore | 1 + tools/testing/selftests/kvm/Makefile | 1 + .../selftests/kvm/x86_64/max_vcpuid_cap_test.c | 54 ++++++++++++++++++++++ 3 files changed, 56 insertions(+) commit 35875316384b71d23dc2a45a969732fc8cab16af Author: Zeng Guang Date: Tue Apr 19 23:44:44 2022 +0800 KVM: x86: Allow userspace to set maximum VCPU id for VM Introduce new max_vcpu_ids in KVM for x86 architecture. Userspace can assign maximum possible vcpu id for current VM session using KVM_CAP_MAX_VCPU_ID of KVM_ENABLE_CAP ioctl(). This is done for x86 only because the sole use case is to guide memory allocation for PID-pointer table, a structure needed to enable VMX IPI. By default, max_vcpu_ids set as KVM_MAX_VCPU_IDS. Suggested-by: Sean Christopherson Reviewed-by: Maxim Levitsky Signed-off-by: Zeng Guang Message-Id: <20220419154444.11888-1-guang.zeng@intel.com> Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 21 +++++++++++++++++++++ arch/x86/include/asm/kvm_host.h | 6 ++++++ arch/x86/kvm/x86.c | 20 ++++++++++++++++++++ 3 files changed, 47 insertions(+) commit 1d5e740d518e02cea46325b3d37135bf9c08982a Author: Zeng Guang Date: Tue Apr 19 23:44:09 2022 +0800 KVM: Move kvm_arch_vcpu_precreate() under kvm->lock kvm_arch_vcpu_precreate() targets to handle arch specific VM resource to be prepared prior to the actual creation of vCPU. For example, x86 platform may need do per-VM allocation based on max_vcpu_ids at the first vCPU creation. It probably leads to concurrency control on this allocation as multiple vCPU creation could happen simultaneously. From the architectual point of view, it's necessary to execute kvm_arch_vcpu_precreate() under protect of kvm->lock. Currently only arm64, x86 and s390 have non-nop implementations at the stage of vCPU pre-creation. Remove the lock acquiring in s390's design and make sure all architecture can run kvm_arch_vcpu_precreate() safely under kvm->lock without recrusive lock issue. Suggested-by: Sean Christopherson Signed-off-by: Zeng Guang Message-Id: <20220419154409.11842-1-guang.zeng@intel.com> Signed-off-by: Paolo Bonzini arch/s390/kvm/kvm-s390.c | 2 -- arch/x86/kvm/x86.c | 2 +- virt/kvm/kvm_main.c | 10 ++++++---- 3 files changed, 7 insertions(+), 7 deletions(-) commit f08a06c9a35706349f74b7a18deefe3f89f73e8e Author: Zeng Guang Date: Tue Apr 19 23:36:04 2022 +0800 KVM: VMX: Clean up vmx_refresh_apicv_exec_ctrl() Remove the condition check cpu_has_secondary_exec_ctrls(). Calling vmx_refresh_apicv_exec_ctrl() premises secondary controls activated and VMCS fields related to APICv valid as well. If it's invoked in wrong circumstance at the worst case, VMX operation will report VMfailValid error without further harmful impact and just functions as if all the secondary controls were 0. Suggested-by: Sean Christopherson Signed-off-by: Zeng Guang Message-Id: <20220419153604.11786-1-guang.zeng@intel.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 5413bcba7ed57206178d60ee03dd5bb3a460e645 Author: Zeng Guang Date: Tue Apr 19 23:35:16 2022 +0800 KVM: x86: Add support for vICR APIC-write VM-Exits in x2APIC mode Upcoming Intel CPUs will support virtual x2APIC MSR writes to the vICR, i.e. will trap and generate an APIC-write VM-Exit instead of intercepting the WRMSR. Add support for handling "nodecode" x2APIC writes, which were previously impossible. Note, x2APIC MSR writes are 64 bits wide. Signed-off-by: Zeng Guang Message-Id: <20220419153516.11739-1-guang.zeng@intel.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit 0b85baa5f46de1c6ad6e4b987905df041f2f80f0 Author: Robert Hoo Date: Tue Apr 19 23:34:41 2022 +0800 KVM: VMX: Report tertiary_exec_control field in dump_vmcs() Add tertiary_exec_control field report in dump_vmcs(). Meanwhile, reorganize the dump output of VMCS category as follows. Before change: *** Control State *** PinBased=0x000000ff CPUBased=0xb5a26dfa SecondaryExec=0x061037eb EntryControls=0000d1ff ExitControls=002befff After change: *** Control State *** CPUBased=0xb5a26dfa SecondaryExec=0x061037eb TertiaryExec=0x0000000000000010 PinBased=0x000000ff EntryControls=0000d1ff ExitControls=002befff Reviewed-by: Maxim Levitsky Signed-off-by: Robert Hoo Signed-off-by: Zeng Guang Message-Id: <20220419153441.11687-1-guang.zeng@intel.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 1ad4e5438c67a01620ed67cea959de89f4430515 Author: Robert Hoo Date: Tue Apr 19 23:34:00 2022 +0800 KVM: VMX: Detect Tertiary VM-Execution control when setup VMCS config Check VMX features on tertiary execution control in VMCS config setup. Sub-features in tertiary execution control to be enabled are adjusted according to hardware capabilities although no sub-feature is enabled in this patch. EVMCSv1 doesn't support tertiary VM-execution control, so disable it when EVMCSv1 is in use. And define the auxiliary functions for Tertiary control field here, using the new BUILD_CONTROLS_SHADOW(). Reviewed-by: Maxim Levitsky Signed-off-by: Robert Hoo Signed-off-by: Zeng Guang Message-Id: <20220419153400.11642-1-guang.zeng@intel.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/vmx.h | 3 +++ arch/x86/kvm/vmx/capabilities.h | 7 +++++++ arch/x86/kvm/vmx/evmcs.c | 2 ++ arch/x86/kvm/vmx/evmcs.h | 1 + arch/x86/kvm/vmx/vmcs.h | 1 + arch/x86/kvm/vmx/vmx.c | 29 ++++++++++++++++++++++++++++- arch/x86/kvm/vmx/vmx.h | 1 + 7 files changed, 43 insertions(+), 1 deletion(-) commit ed3905ba60384ab8c73b421c3618375e58080a9a Author: Robert Hoo Date: Tue Apr 19 23:33:18 2022 +0800 KVM: VMX: Extend BUILD_CONTROLS_SHADOW macro to support 64-bit variation The Tertiary VM-Exec Control, different from previous control fields, is 64 bit. So extend BUILD_CONTROLS_SHADOW() by adding a 'bit' parameter, to support both 32 bit and 64 bit fields' auxiliary functions building. Suggested-by: Sean Christopherson Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Robert Hoo Signed-off-by: Zeng Guang Message-Id: <20220419153318.11595-1-guang.zeng@intel.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.h | 56 +++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit 465932db25f3664893b66152c7b190afd28c32db Author: Robert Hoo Date: Tue Apr 19 23:32:40 2022 +0800 x86/cpu: Add new VMX feature, Tertiary VM-Execution control A new 64-bit control field "tertiary processor-based VM-execution controls", is defined [1]. It's controlled by bit 17 of the primary processor-based VM-execution controls. Different from its brother VM-execution fields, this tertiary VM- execution controls field is 64 bit. So it occupies 2 vmx_feature_leafs, TERTIARY_CTLS_LOW and TERTIARY_CTLS_HIGH. Its companion VMX capability reporting MSR,MSR_IA32_VMX_PROCBASED_CTLS3 (0x492), is also semantically different from its brothers, whose 64 bits consist of all allow-1, rather than 32-bit allow-0 and 32-bit allow-1 [1][2]. Therefore, its init_vmx_capabilities() is a little different from others. [1] ISE 6.2 "VMCS Changes" https://www.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html [2] SDM Vol3. Appendix A.3 Reviewed-by: Sean Christopherson Reviewed-by: Maxim Levitsky Signed-off-by: Robert Hoo Signed-off-by: Zeng Guang Message-Id: <20220419153240.11549-1-guang.zeng@intel.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/msr-index.h | 1 + arch/x86/include/asm/vmxfeatures.h | 3 ++- arch/x86/kernel/cpu/feat_ctl.c | 9 ++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) commit b8b9156ec6ef69baa487185205f2be833267776b Author: Sean Christopherson Date: Fri May 13 19:50:00 2022 +0000 KVM: x86/mmu: Comment FNAME(sync_page) to document TLB flushing logic Add a comment to FNAME(sync_page) to explain why the TLB flushing logic conspiculously doesn't handle the scenario of guest protections being reduced. Specifically, if synchronizing a SPTE drops execute protections, KVM will not emit a TLB flush, whereas dropping writable or clearing A/D bits does trigger a flush via mmu_spte_update(). Architecturally, until the GPTE is implicitly or explicitly flushed from the guest's perspective, KVM is not required to flush any old, stale translations. Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Message-Id: <20220513195000.99371-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/paging_tmpl.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9fb3565743d58352f00964bf47213b88aff4bb82 Author: Sean Christopherson Date: Fri May 13 19:49:59 2022 +0000 KVM: x86/mmu: Drop RWX=0 SPTEs during ept_sync_page() All of sync_page()'s existing checks filter out only !PRESENT gPTE, because without execute-only, all upper levels are guaranteed to be at least READABLE. However, if EPT with execute-only support is in use by L1, KVM can create an SPTE that is shadow-present but guest-inaccessible (RWX=0) if the upper level combined permissions are R (or RW) and the leaf EPTE is changed from R (or RW) to X. Because the EPTE is considered present when viewed in isolation, and no reserved bits are set, FNAME(prefetch_invalid_gpte) will consider the GPTE valid, and cause a not-present SPTE to be created. The SPTE is "correct": the guest translation is inaccessible because the combined protections of all levels yield RWX=0, and KVM will just redirect any vmexits to the guest. If EPT A/D bits are disabled, KVM can mistake the SPTE for an access-tracked SPTE, but again such confusion isn't fatal, as the "saved" protections are also RWX=0. However, creating a useless SPTE in general means that KVM messed up something, even if this particular goof didn't manifest as a functional bug. So, drop SPTEs whose new protections will yield a RWX=0 SPTE, and add a WARN in make_spte() to detect creation of SPTEs that will result in RWX=0 protections. Fixes: d95c55687e11 ("kvm: mmu: track read permission explicitly for shadow EPT page tables") Cc: David Matlack Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20220513195000.99371-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/paging_tmpl.h | 9 ++++++++- arch/x86/kvm/mmu/spte.c | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) commit d8969871253a4704f007b307b2dd6232d1e40da8 Author: Maciej S. Szmigiero Date: Mon May 2 00:07:35 2022 +0200 KVM: selftests: nSVM: Add svm_nested_soft_inject_test Add a KVM self-test that checks whether a nSVM L1 is able to successfully inject a software interrupt, a soft exception and a NMI into its L2 guest. In practice, this tests both the next_rip field consistency and L1-injected event with intervening L0 VMEXIT during its delivery: the first nested VMRUN (that's also trying to inject a software interrupt) will immediately trigger a L0 NPF. This L0 NPF will have zero in its CPU-returned next_rip field, which if incorrectly reused by KVM will trigger a #PF when trying to return to such address 0 from the interrupt handler. For NMI injection this tests whether the L1 NMI state isn't getting incorrectly mixed with the L2 NMI state if a L1 -> L2 NMI needs to be re-injected. Reviewed-by: Maxim Levitsky [sean: check exact L2 RIP on first soft interrupt] Signed-off-by: Sean Christopherson Signed-off-by: Maciej S. Szmigiero Message-Id: Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/.gitignore | 3 +- tools/testing/selftests/kvm/Makefile | 1 + .../selftests/kvm/include/x86_64/processor.h | 17 ++ .../selftests/kvm/include/x86_64/svm_util.h | 12 ++ tools/testing/selftests/kvm/x86_64/evmcs_test.c | 1 - .../testing/selftests/kvm/x86_64/hyperv_svm_test.c | 5 - .../kvm/x86_64/svm_nested_soft_inject_test.c | 217 +++++++++++++++++++++ 7 files changed, 249 insertions(+), 7 deletions(-) commit 159fc6fa3b7db24db85598115cc43dc47196919e Author: Maciej S. Szmigiero Date: Mon May 2 00:07:34 2022 +0200 KVM: nSVM: Transparently handle L1 -> L2 NMI re-injection A NMI that L1 wants to inject into its L2 should be directly re-injected, without causing L0 side effects like engaging NMI blocking for L1. It's also worth noting that in this case it is L1 responsibility to track the NMI window status for its L2 guest. Signed-off-by: Maciej S. Szmigiero Message-Id: Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/nested.c | 12 ++++++++++++ arch/x86/kvm/svm/svm.c | 7 +++++++ arch/x86/kvm/svm/svm.h | 1 + 3 files changed, 20 insertions(+) commit 2d61391270a3ceb95b3dd536ea13002e653323b6 Author: Sean Christopherson Date: Mon May 2 00:07:33 2022 +0200 KVM: x86: Differentiate Soft vs. Hard IRQs vs. reinjected in tracepoint In the IRQ injection tracepoint, differentiate between Hard IRQs and Soft "IRQs", i.e. interrupts that are reinjected after incomplete delivery of a software interrupt from an INTn instruction. Tag reinjected interrupts as such, even though the information is usually redundant since soft interrupts are only ever reinjected by KVM. Though rare in practice, a hard IRQ can be reinjected. Signed-off-by: Sean Christopherson [MSS: change "kvm_inj_virq" event "reinjected" field type to bool] Signed-off-by: Maciej S. Szmigiero Message-Id: <9664d49b3bd21e227caa501cff77b0569bebffe2.1651440202.git.maciej.szmigiero@oracle.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/svm/svm.c | 5 +++-- arch/x86/kvm/trace.h | 16 +++++++++++----- arch/x86/kvm/vmx/vmx.c | 4 ++-- arch/x86/kvm/x86.c | 4 ++-- 5 files changed, 19 insertions(+), 12 deletions(-) commit 21d4c575eb4a1e6d956b61b5e9c162895fa7d4ba Author: Sean Christopherson Date: Mon May 2 00:07:32 2022 +0200 KVM: x86: Print error code in exception injection tracepoint iff valid Print the error code in the exception injection tracepoint if and only if the exception has an error code. Define the entire error code sequence as a set of formatted strings, print empty strings if there's no error code, and abuse __print_symbolic() by passing it an empty array to coerce it into printing the error code as a hex string. Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Signed-off-by: Maciej S. Szmigiero Message-Id: Signed-off-by: Paolo Bonzini arch/x86/kvm/trace.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a61d7c5432ac5a953bbcec17af031661c2bd201d Author: Sean Christopherson Date: Mon May 2 00:07:31 2022 +0200 KVM: x86: Trace re-injected exceptions Trace exceptions that are re-injected, not just those that KVM is injecting for the first time. Debugging re-injection bugs is painful enough as is, not having visibility into what KVM is doing only makes things worse. Delay propagating pending=>injected in the non-reinjection path so that the tracing can properly identify reinjected exceptions. Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Signed-off-by: Maciej S. Szmigiero Message-Id: <25470690a38b4d2b32b6204875dd35676c65c9f2.1651440202.git.maciej.szmigiero@oracle.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/trace.h | 12 ++++++++---- arch/x86/kvm/x86.c | 16 +++++++++------- 2 files changed, 17 insertions(+), 11 deletions(-) commit 7e5b5ef8dca3229a5226eabf53bdc7b67ebd07ad Author: Sean Christopherson Date: Mon May 2 00:07:30 2022 +0200 KVM: SVM: Re-inject INTn instead of retrying the insn on "failure" Re-inject INTn software interrupts instead of retrying the instruction if the CPU encountered an intercepted exception while vectoring the INTn, e.g. if KVM intercepted a #PF when utilizing shadow paging. Retrying the instruction is architecturally wrong e.g. will result in a spurious #DB if there's a code breakpoint on the INT3/O, and lack of re-injection also breaks nested virtualization, e.g. if L1 injects a software interrupt and vectoring the injected interrupt encounters an exception that is intercepted by L0 but not L1. Signed-off-by: Sean Christopherson Signed-off-by: Maciej S. Szmigiero Message-Id: <1654ad502f860948e4f2d57b8bd881d67301f785.1651440202.git.maciej.szmigiero@oracle.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/nested.c | 7 +++---- arch/x86/kvm/svm/svm.c | 23 +++++++++++++++++++---- 2 files changed, 22 insertions(+), 8 deletions(-) commit 6ef88d6e36c2b4b3886ec9967cafabe4424d27d5 Author: Sean Christopherson Date: Mon May 2 00:07:29 2022 +0200 KVM: SVM: Re-inject INT3/INTO instead of retrying the instruction Re-inject INT3/INTO instead of retrying the instruction if the CPU encountered an intercepted exception while vectoring the software exception, e.g. if vectoring INT3 encounters a #PF and KVM is using shadow paging. Retrying the instruction is architecturally wrong, e.g. will result in a spurious #DB if there's a code breakpoint on the INT3/O, and lack of re-injection also breaks nested virtualization, e.g. if L1 injects a software exception and vectoring the injected exception encounters an exception that is intercepted by L0 but not L1. Due to, ahem, deficiencies in the SVM architecture, acquiring the next RIP may require flowing through the emulator even if NRIPS is supported, as the CPU clears next_rip if the VM-Exit is due to an exception other than "exceptions caused by the INT3, INTO, and BOUND instructions". To deal with this, "skip" the instruction to calculate next_rip (if it's not already known), and then unwind the RIP write and any side effects (RFLAGS updates). Save the computed next_rip and use it to re-stuff next_rip if injection doesn't complete. This allows KVM to do the right thing if next_rip was known prior to injection, e.g. if L1 injects a soft event into L2, and there is no backing INTn instruction, e.g. if L1 is injecting an arbitrary event. Note, it's impossible to guarantee architectural correctness given SVM's architectural flaws. E.g. if the guest executes INTn (no KVM injection), an exit occurs while vectoring the INTn, and the guest modifies the code stream while the exit is being handled, KVM will compute the incorrect next_rip due to "skipping" the wrong instruction. A future enhancement to make this less awful would be for KVM to detect that the decoded instruction is not the correct INTn and drop the to-be-injected soft event (retrying is a lesser evil compared to shoving the wrong RIP on the exception stack). Reported-by: Maciej S. Szmigiero Signed-off-by: Sean Christopherson Signed-off-by: Maciej S. Szmigiero Message-Id: <65cb88deab40bc1649d509194864312a89bbe02e.1651440202.git.maciej.szmigiero@oracle.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/nested.c | 26 +++++++++ arch/x86/kvm/svm/svm.c | 140 ++++++++++++++++++++++++++++++++-------------- arch/x86/kvm/svm/svm.h | 6 +- 3 files changed, 129 insertions(+), 43 deletions(-) commit 3741aec4c38fa4123ab08ae552f05366d4fd05d8 Author: Sean Christopherson Date: Mon May 2 00:07:28 2022 +0200 KVM: SVM: Stuff next_rip on emulated INT3 injection if NRIPS is supported If NRIPS is supported in hardware but disabled in KVM, set next_rip to the next RIP when advancing RIP as part of emulating INT3 injection. There is no flag to tell the CPU that KVM isn't using next_rip, and so leaving next_rip is left as is will result in the CPU pushing garbage onto the stack when vectoring the injected event. Reviewed-by: Maxim Levitsky Fixes: 66b7138f9136 ("KVM: SVM: Emulate nRIP feature when reinjecting INT3") Signed-off-by: Sean Christopherson Signed-off-by: Maciej S. Szmigiero Message-Id: Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/svm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit cd9e6da8048c5b40315ee2d929b6230ce1252c3c Author: Sean Christopherson Date: Mon May 2 00:07:27 2022 +0200 KVM: SVM: Unwind "speculative" RIP advancement if INTn injection "fails" Unwind the RIP advancement done by svm_queue_exception() when injecting an INT3 ultimately "fails" due to the CPU encountering a VM-Exit while vectoring the injected event, even if the exception reported by the CPU isn't the same event that was injected. If vectoring INT3 encounters an exception, e.g. #NP, and vectoring the #NP encounters an intercepted exception, e.g. #PF when KVM is using shadow paging, then the #NP will be reported as the event that was in-progress. Note, this is still imperfect, as it will get a false positive if the INT3 is cleanly injected, no VM-Exit occurs before the IRET from the INT3 handler in the guest, the instruction following the INT3 generates an exception (directly or indirectly), _and_ vectoring that exception encounters an exception that is intercepted by KVM. The false positives could theoretically be solved by further analyzing the vectoring event, e.g. by comparing the error code against the expected error code were an exception to occur when vectoring the original injected exception, but SVM without NRIPS is a complete disaster, trying to make it 100% correct is a waste of time. Reviewed-by: Maxim Levitsky Fixes: 66b7138f9136 ("KVM: SVM: Emulate nRIP feature when reinjecting INT3") Signed-off-by: Sean Christopherson Signed-off-by: Maciej S. Szmigiero Message-Id: <450133cf0a026cb9825a2ff55d02cb136a1cb111.1651440202.git.maciej.szmigiero@oracle.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/svm.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit f17c31c48e5cde9895a491d91c424eeeada3e134 Author: Maciej S. Szmigiero Date: Mon May 2 00:07:26 2022 +0200 KVM: SVM: Don't BUG if userspace injects an interrupt with GIF=0 Don't BUG/WARN on interrupt injection due to GIF being cleared, since it's trivial for userspace to force the situation via KVM_SET_VCPU_EVENTS (even if having at least a WARN there would be correct for KVM internally generated injections). kernel BUG at arch/x86/kvm/svm/svm.c:3386! invalid opcode: 0000 [#1] SMP CPU: 15 PID: 926 Comm: smm_test Not tainted 5.17.0-rc3+ #264 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:svm_inject_irq+0xab/0xb0 [kvm_amd] Code: <0f> 0b 0f 1f 00 0f 1f 44 00 00 80 3d ac b3 01 00 00 55 48 89 f5 53 RSP: 0018:ffffc90000b37d88 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff88810a234ac0 RCX: 0000000000000006 RDX: 0000000000000000 RSI: ffffc90000b37df7 RDI: ffff88810a234ac0 RBP: ffffc90000b37df7 R08: ffff88810a1fa410 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff888109571000 R14: ffff88810a234ac0 R15: 0000000000000000 FS: 0000000001821380(0000) GS:ffff88846fdc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f74fc550008 CR3: 000000010a6fe000 CR4: 0000000000350ea0 Call Trace: inject_pending_event+0x2f7/0x4c0 [kvm] kvm_arch_vcpu_ioctl_run+0x791/0x17a0 [kvm] kvm_vcpu_ioctl+0x26d/0x650 [kvm] __x64_sys_ioctl+0x82/0xb0 do_syscall_64+0x3b/0xc0 entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: 219b65dcf6c0 ("KVM: SVM: Improve nested interrupt injection") Cc: stable@vger.kernel.org Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Maciej S. Szmigiero Message-Id: <35426af6e123cbe91ec7ce5132ce72521f02b1b5.1651440202.git.maciej.szmigiero@oracle.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/svm.c | 2 -- 1 file changed, 2 deletions(-) commit 00f08d99dd7d3ab3d8cb1fa356e857fcccbbdde8 Author: Maciej S. Szmigiero Date: Mon May 2 00:07:25 2022 +0200 KVM: nSVM: Sync next_rip field from vmcb12 to vmcb02 The next_rip field of a VMCB is *not* an output-only field for a VMRUN. This field value (instead of the saved guest RIP) in used by the CPU for the return address pushed on stack when injecting a software interrupt or INT3 or INTO exception. Make sure this field gets synced from vmcb12 to vmcb02 when entering L2 or loading a nested state and NRIPS is exposed to L1. If NRIPS is supported in hardware but not exposed to L1 (nrips=0 or hidden by userspace), stuff vmcb02's next_rip from the new L2 RIP to emulate a !NRIPS CPU (which saves RIP on the stack as-is). Reviewed-by: Maxim Levitsky Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Maciej S. Szmigiero Message-Id: Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/nested.c | 22 +++++++++++++++++++--- arch/x86/kvm/svm/svm.h | 1 + 2 files changed, 20 insertions(+), 3 deletions(-) commit eb20cf30c57c37ed05f44966dfabc2c34bf46cab Author: Jani Nikula Date: Mon May 16 11:10:15 2022 +0300 drm/i915/overlay: remove redundant GEM_BUG_ON() There's an early return for !engine->kernel_context. Signed-off-by: Jani Nikula Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220516081015.1058987-1-jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_overlay.c | 2 -- 1 file changed, 2 deletions(-) commit ab9db127ee03487785509f960e7b5b91cdb6b92d Author: Jani Nikula Date: Fri May 6 15:04:05 2022 +0300 drm/i915/pxp: fix sparse warning for not declared symbol Fix: drivers/gpu/drm/i915/pxp/intel_pxp_debugfs.c:61:6: warning: symbol 'intel_pxp_debugfs_register' was not declared. Should it be static? Sort and remove the redundant pxp prefixes from the includes while at it. Signed-off-by: Jani Nikula Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220506120405.2582372-1-jani.nikula@intel.com drivers/gpu/drm/i915/pxp/intel_pxp_debugfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cc2609eda6981d65b3b1c81e2807910d718b2b98 Author: Kalle Valo Date: Mon Jun 6 17:29:57 2022 +0300 ath10k: fix recently introduced checkpatch warning I updated my checkpatch and saw new warnings: drivers/net/wireless/ath/ath10k/qmi.c:593: Prefer strscpy over strlcpy - see: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ drivers/net/wireless/ath/ath10k/qmi.c:598: Prefer strscpy over strlcpy - see: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ drivers/net/wireless/ath/ath10k/htt_rx.c:3565: Integer promotion: Using 'h' in '%04hx' is unnecessary Compile tested only. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220606142957.23721-1-kvalo@kernel.org drivers/net/wireless/ath/ath10k/htt_rx.c | 2 +- drivers/net/wireless/ath/ath10k/qmi.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit f87e15fbf6d8cdb51f953338d41a4a52ad1aca14 Author: Prashant Malani Date: Mon Jun 6 20:18:05 2022 +0000 platform/chrome: cros_ec_proto: Update size arg types cros_ec_cmd() takes 2 size arguments. Update them to be of the more appropriate type size_t. Suggested-by: Stephen Boyd Signed-off-by: Prashant Malani Reviewed-by: Stephen Boyd Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220606201825.763788-4-pmalani@chromium.org drivers/platform/chrome/cros_ec_proto.c | 4 ++-- include/linux/platform_data/cros_ec_proto.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit b1d288d9c3c5ca28df062214656a59cf7ee370e0 Author: Prashant Malani Date: Mon Jun 6 20:18:03 2022 +0000 platform/chrome: cros_ec_proto: Rename cros_ec_command function cros_ec_command() is the name of a function as well as a struct, as such it can confuse indexing tools (like ctags). Avoid this by renaming it to cros_ec_cmd(). Update all the callsites to use the new name. This patch is a find-and-replace, so should not introduce any functional changes. Suggested-by: Stephen Boyd Signed-off-by: Prashant Malani Acked-by: Lee Jones Reviewed-by: Stephen Boyd Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220606201825.763788-3-pmalani@chromium.org drivers/mfd/cros_ec_dev.c | 4 +-- drivers/platform/chrome/cros_ec_proto.c | 22 ++++++++-------- drivers/platform/chrome/cros_ec_typec.c | 39 ++++++++++++++--------------- drivers/platform/chrome/cros_usbpd_notify.c | 4 +-- drivers/regulator/cros-ec-regulator.c | 24 +++++++++--------- include/linux/platform_data/cros_ec_proto.h | 2 +- 6 files changed, 47 insertions(+), 48 deletions(-) commit 015cd0043503a1691ba28529e21478fe0822f3ff Author: Prashant Malani Date: Mon Jun 6 20:18:01 2022 +0000 regulator: cros-ec: Use common cros_ec_command() Reduce code duplication by using the common cros_ec_command() function instead of the locally defined variant. Cc: Stephen Boyd Signed-off-by: Prashant Malani Reviewed-by: Stephen Boyd Reviewed-by: Guenter Roeck Acked-by: Mark Brown Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220606201825.763788-2-pmalani@chromium.org drivers/regulator/cros-ec-regulator.c | 54 ++++++++--------------------------- 1 file changed, 12 insertions(+), 42 deletions(-) commit 1db2c0f7e8cedc3552e6742e0bffbdb8d1b3cb2a Author: Stefan Wahren Date: Tue Jun 7 17:50:28 2022 +0200 ARM: dts: bcm283x: Drop unnecessary properties from dpi node Since commit 094536003e06 ("dt-bindings: display: Convert VC4 bindings to schemas") it has been defined that the properties '#address-cells' and '#size-cells' are not necessary for the dpi node. This results in a warning during dtbs_check: dpi@7e208000: '#address-cells', '#size-cells' do not match any of the regexes: 'pinctrl-[0-9]+' Since we don't need a reg property to differentiate between multiple ports, drop them from the dtsi file. Suggested-by: Maxime Ripard Signed-off-by: Stefan Wahren Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm283x.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 85393ca610ded5875611d2d81c7cfd90397afe93 Author: Ping-Ke Shih Date: Mon May 30 19:27:43 2022 +0800 wifi: rtw89: support MULTI_BSSID and correct BSSID mask of H2C The BSSID mask of H2C is used to match BSSID of receiving packets. Normally, we set six bits BSSID mask to exactly match BSSID of packets sent by target AP. After we support multiple BSSID, it could connect a nontransmitted BSSID, so we can only match first five bytes of BSSID. That means we could possibly receive other AP's packets if only the last byte of BSSID is different from target AP. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220530112743.106857-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/cam.c | 7 +++++++ drivers/net/wireless/realtek/rtw89/cam.h | 8 ++++++++ drivers/net/wireless/realtek/rtw89/core.c | 1 + 3 files changed, 16 insertions(+) commit 26af237f2f4d9593fc9484ea8d8d4a3b3f7b645d Author: William Zhang Date: Wed Jun 1 15:56:53 2022 -0700 arm64: defconfig: enable bcmbca soc support Enable CONFIG_ARCH_BCMBCA in defconfig. This config can be used to build a basic kernel for arm64 based Broadcom Broadband SoC booting to console. Signed-off-by: William Zhang Signed-off-by: Florian Fainelli arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit fdcd652ce2b6b819f5c4dc3cead5215c84ee6933 Author: William Zhang Date: Wed Jun 1 15:56:50 2022 -0700 arm64: bcmbca: add arch bcmbca machine entry Add ARCH_BCMBCA config for Broadcom Broadband SoC chipsets Signed-off-by: William Zhang Signed-off-by: Florian Fainelli arch/arm64/Kconfig.platforms | 9 +++++++++ 1 file changed, 9 insertions(+) commit 4dfc63c002a555a2c3c34d89009532ad803be876 Author: Andy Shevchenko Date: Fri Jun 3 19:44:14 2022 +0300 wifi: ray_cs: Drop useless status variable in parse_addr() The status variable assigned only once and used also only once. Replace it's usage by actual value. Signed-off-by: Andy Shevchenko Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220603164414.48436-2-andriy.shevchenko@linux.intel.com drivers/net/wireless/ray_cs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9e8e9187673cb24324f9165dd47b2b28f60b0b10 Author: Andy Shevchenko Date: Fri Jun 3 19:44:13 2022 +0300 wifi: ray_cs: Utilize strnlen() in parse_addr() Instead of doing simple operations and using an additional variable on stack, utilize strnlen() and reuse len variable. Signed-off-by: Andy Shevchenko Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220603164414.48436-1-andriy.shevchenko@linux.intel.com drivers/net/wireless/ray_cs.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit d38c9df53ad6cd374a047126cd6aa5c5dffb455f Author: Andy Shevchenko Date: Fri Jun 3 15:56:48 2022 +0300 wifi: rtw88: use %*ph to print small buffer Use %*ph format to print small buffer as hex string. Signed-off-by: Andy Shevchenko Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220603125648.46873-1-andriy.shevchenko@linux.intel.com drivers/net/wireless/realtek/rtw88/debug.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 9b656879042e1eb6aaf2306910f346bd6a03e58f Author: Julia Lawall Date: Sat May 21 13:10:26 2022 +0200 soc: bcm: brcmstb: pm: pm-arm: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Florian Fainelli drivers/soc/bcm/brcmstb/pm/pm-arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da6e113ff010815fdd21ee1e9af2e8d179a2680f Author: Lorenzo Bianconi Date: Mon Jun 6 21:49:00 2022 +0200 net: ethernet: mtk_eth_soc: enable rx cksum offload for MTK_NETSYS_V2 Enable rx checksum offload for mt7986 chipset. Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/c8699805c18f7fd38315fcb8da2787676d83a32c.1654544585.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_eth_soc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 67074ae6af59c7d9112535e6f8449bc59f66df40 Author: Christophe JAILLET Date: Sat Jun 4 08:15:21 2022 +0200 net: dsa: microchip: ksz8xxx: Replace kernel.h with the necessary inclusions When kernel.h is used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved. Replace kernel.h inclusion with the list of what is really being used. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/41d99ef8629e1db03d4f2662f5556611e0b94652.1654323308.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/dsa/microchip/ksz8.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3fd3a52ca672fea71ff6ebaded2e2ddbbfb3a397 Author: keliu Date: Fri May 27 08:30:49 2022 +0000 scsi: core: iscsi: Directly use ida_alloc()/ida_free() Use ida_alloc()/ida_free() instead of the deprecated ida_simple_get()/ida_simple_remove() interface. Link: https://lore.kernel.org/r/20220527083049.2552526-1-liuke94@huawei.com Reviewed-by: Mike Christie Reviewed-by: Lee Duncan Signed-off-by: keliu Signed-off-by: Martin K. Petersen drivers/scsi/hosts.c | 4 ++-- drivers/scsi/scsi_transport_iscsi.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit a6e0d179764cb31b2981c85e6fd156adc777e4ed Author: Dmitry Bogdanov Date: Mon May 23 12:59:05 2022 +0300 scsi: target: iscsi: Control authentication per ACL Add acls/{ACL}/attrib/authentication attribute that controls authentication for particular ACL. By default, this attribute inherits a value of the authentication attribute of the target port group to keep backward compatibility. Authentication attribute has 3 states: "0" - authentication is turned off for this ACL "1" - authentication is required for this ACL "-1" - authentication is inherited from TPG Link: https://lore.kernel.org/r/20220523095905.26070-4-d.bogdanov@yadro.com Reviewed-by: Roman Bolshakov Reviewed-by: Konstantin Shelekhin Reviewed-by: Mike Christie Signed-off-by: Dmitry Bogdanov Signed-off-by: Martin K. Petersen drivers/target/iscsi/iscsi_target_configfs.c | 31 ++++++++++++++++++++++++++ drivers/target/iscsi/iscsi_target_nego.c | 8 ++++++- drivers/target/iscsi/iscsi_target_nodeattrib.c | 1 + include/target/iscsi/iscsi_target_core.h | 2 ++ 4 files changed, 41 insertions(+), 1 deletion(-) commit a75fcb0912a549c6c1da8395f33271ce06e84acd Author: Dmitry Bogdanov Date: Mon May 23 12:59:04 2022 +0300 scsi: target: iscsi: Extract auth functions Create functions that answers simple questions: Whether authentication is required, what credentials, whether connection is autenticated. Link: https://lore.kernel.org/r/20220523095905.26070-3-d.bogdanov@yadro.com Reviewed-by: Roman Bolshakov Reviewed-by: Konstantin Shelekhin Reviewed-by: Mike Christie Reviewed-by: Lee Duncan Signed-off-by: Dmitry Bogdanov Signed-off-by: Martin K. Petersen drivers/target/iscsi/iscsi_target_nego.c | 140 ++++++++++++++++++++----------- 1 file changed, 92 insertions(+), 48 deletions(-) commit a11b80692be5c408a33ea89e3fe1a240bef8c820 Author: Dmitry Bogdanov Date: Mon May 23 12:59:03 2022 +0300 scsi: target: iscsi: Add upcast helpers iSCSI target is cluttered with open-coded container_of() conversions from se_nacl to iscsi_node_acl. The code could be cleaned by introducing a helper - to_iscsi_nacl() (similar to other helpers in target core). While at it, make another iSCSI conversion helper consistent and rename iscsi_tpg() helper to to_iscsi_tpg(). Link: https://lore.kernel.org/r/20220523095905.26070-2-d.bogdanov@yadro.com Reviewed-by: Roman Bolshakov Reviewed-by: Konstantin Shelekhin Reviewed-by: Mike Christie Reviewed-by: Lee Duncan Signed-off-by: Dmitry Bogdanov Signed-off-by: Martin K. Petersen drivers/target/iscsi/iscsi_target_configfs.c | 82 ++++++++++------------------ drivers/target/iscsi/iscsi_target_nego.c | 14 ++--- drivers/target/iscsi/iscsi_target_tpg.c | 3 +- include/target/iscsi/iscsi_target_core.h | 12 ++++ 4 files changed, 49 insertions(+), 62 deletions(-) commit 4dc48a107a146cade61097958ff2366c13da1f60 Author: Nilesh Javali Date: Mon Jun 6 21:46:27 2022 -0700 scsi: qla2xxx: Update version to 10.02.07.500-k Link: https://lore.kernel.org/r/20220607044627.19563-12-njavali@marvell.com Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aec55325ddec975216119da000092cb8664a3399 Author: Quinn Tran Date: Mon Jun 6 21:46:26 2022 -0700 scsi: qla2xxx: edif: Fix n2n login retry for secure device After initiator has burned up all login retries, target authentication application begins to run. This triggers a link bounce on target side. Initiator will attempt another login. Due to N2N, the PRLI [nvme | fcp] can fail because of the mode mismatch with target. This patch add a few more login retries to revive the connection. Link: https://lore.kernel.org/r/20220607044627.19563-11-njavali@marvell.com Fixes: 4de067e5df12 ("scsi: qla2xxx: edif: Add N2N support for EDIF") Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 789d54a4178634850e441f60c0326124138e7269 Author: Quinn Tran Date: Mon Jun 6 21:46:25 2022 -0700 scsi: qla2xxx: edif: Fix n2n discovery issue with secure target User failed to see disk via n2n topology. Driver used up all login retries before authentication application started. When authentication application started, driver did not have enough login retries to connect securely. On app_start, driver will reset the login retry attempt count. Link: https://lore.kernel.org/r/20220607044627.19563-10-njavali@marvell.com Fixes: 4de067e5df12 ("scsi: qla2xxx: edif: Add N2N support for EDIF") Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_edif.c | 3 +++ 1 file changed, 3 insertions(+) commit 1040e5f75ddf56fdd571a2a14b4d1a9e8ed846a9 Author: Quinn Tran Date: Mon Jun 6 21:46:24 2022 -0700 scsi: qla2xxx: edif: Remove old doorbell interface Recently driver has implemented a new doorbell mechanism via bsg. The new doorbell tells driver the exact buffer size application has where driver can fill it up with events. The old doorbell guestimated application buffer size is 256. Remove duplicate functionality, the application has moved on to the new doorbell interface. Link: https://lore.kernel.org/r/20220607044627.19563-9-njavali@marvell.com Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_attr.c | 2 -- drivers/scsi/qla2xxx/qla_edif.c | 78 ----------------------------------------- drivers/scsi/qla2xxx/qla_gbl.h | 1 - 3 files changed, 81 deletions(-) commit 0b3f3143d473b489a7aa0779c43bcdb344bd3014 Author: Quinn Tran Date: Mon Jun 6 21:46:23 2022 -0700 scsi: qla2xxx: edif: Add retry for ELS passthrough Relating to EDIF, when sending IKE message, updating key or deleting key, driver can encounter IOCB queue full. Add additional retries to reduce higher level recovery. Link: https://lore.kernel.org/r/20220607044627.19563-8-njavali@marvell.com Fixes: dd30706e73b7 ("scsi: qla2xxx: edif: Add key update") Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_edif.c | 52 +++++++++++++++++++++++++++++------------ drivers/scsi/qla2xxx/qla_os.c | 2 +- 2 files changed, 38 insertions(+), 16 deletions(-) commit cf79716e6636400ae38c37bc8a652b1e522abbba Author: Quinn Tran Date: Mon Jun 6 21:46:22 2022 -0700 scsi: qla2xxx: edif: Synchronize NPIV deletion with authentication application Notify authentication application of a NPIV deletion event is about to occur. This allows app to perform cleanup. Link: https://lore.kernel.org/r/20220607044627.19563-7-njavali@marvell.com Fixes: 9efea843a906 ("scsi: qla2xxx: edif: Add detection of secure device") Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_edif_bsg.h | 2 ++ drivers/scsi/qla2xxx/qla_mid.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) commit e0fb8ce2bb9e52c846e54ad2c58b5b7beb13eb09 Author: Quinn Tran Date: Mon Jun 6 21:46:21 2022 -0700 scsi: qla2xxx: edif: Fix potential stuck session in sa update When a thread is in the process of reestablish a session, a flag is set to prevent multiple threads/triggers from doing the same task. This flag was left on, and any attempt to relogin was locked out. Clear this flag if the attempt has failed. Link: https://lore.kernel.org/r/20220607044627.19563-6-njavali@marvell.com Fixes: dd30706e73b7 ("scsi: qla2xxx: edif: Add key update") Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_edif.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 5ecd241bd7b1088a189581c0b560a13fe93621f6 Author: Quinn Tran Date: Mon Jun 6 21:46:20 2022 -0700 scsi: qla2xxx: edif: Add bsg interface to read doorbell events Add bsg interface for app to read doorbell events. This interface lets driver know how much app can read based on return buffer size. When the next event(s) occur, driver will return the bsg_job with the event(s) in the return buffer. If there is no event to read, driver will hold on to the bsg_job up to few seconds as a way to control the polling interval. Link: https://lore.kernel.org/r/20220607044627.19563-5-njavali@marvell.com Fixes: dd30706e73b7 ("scsi: qla2xxx: edif: Add key update") Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_dbg.h | 2 +- drivers/scsi/qla2xxx/qla_edif.c | 249 ++++++++++++++++++++++++++---------- drivers/scsi/qla2xxx/qla_edif.h | 3 +- drivers/scsi/qla2xxx/qla_edif_bsg.h | 14 ++ 4 files changed, 195 insertions(+), 73 deletions(-) commit df648afa39da9c4d3af99c6c03dc3e9c7dfa99b0 Author: Quinn Tran Date: Mon Jun 6 21:46:19 2022 -0700 scsi: qla2xxx: edif: Wait for app to ack on sess down On session deletion, wait for app to acknowledge before moving on. This allows both app and driver to stay in sync. In addition, this gives a chance for authentication app to do any type of cleanup before moving on. Link: https://lore.kernel.org/r/20220607044627.19563-4-njavali@marvell.com Fixes: dd30706e73b7 ("scsi: qla2xxx: edif: Add key update") Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 2 +- drivers/scsi/qla2xxx/qla_edif.c | 66 ++++++++++++++++++++++++++++++++------- drivers/scsi/qla2xxx/qla_init.c | 4 --- drivers/scsi/qla2xxx/qla_target.c | 35 +++++++++++---------- 4 files changed, 74 insertions(+), 33 deletions(-) commit 7a7b0b4865d3490f62d6ef1a3aa39fa2b47859a4 Author: Quinn Tran Date: Mon Jun 6 21:46:18 2022 -0700 scsi: qla2xxx: edif: bsg refactor - Add version field to edif bsg for future enhancement. - Add version edif bsg version check - Remove unused interfaces and fields. Link: https://lore.kernel.org/r/20220607044627.19563-3-njavali@marvell.com Fixes: dd30706e73b7 ("scsi: qla2xxx: edif: Add key update") Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_edif.c | 32 +++++++++---- drivers/scsi/qla2xxx/qla_edif_bsg.h | 90 +++++++++++++++++++++++-------------- 2 files changed, 79 insertions(+), 43 deletions(-) commit 9c40c36e75ffd49952cd4ead0672defc4b4dbdf7 Author: Quinn Tran Date: Mon Jun 6 21:46:17 2022 -0700 scsi: qla2xxx: edif: Reduce Initiator-Initiator thrashing This patch uses GFFID switch command to scan whether remote device is Target or Initiator mode. Based on that info, driver will not pass up Initiator info to authentication application. This helps reduce unnecessary stress for authentication application to deal with unused connections. Link: https://lore.kernel.org/r/20220607044627.19563-2-njavali@marvell.com Fixes: 7ebb336e45ef ("scsi: qla2xxx: edif: Add start + stop bsgs") Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 2 + drivers/scsi/qla2xxx/qla_edif.c | 32 ++++++++++- drivers/scsi/qla2xxx/qla_gbl.h | 3 +- drivers/scsi/qla2xxx/qla_gs.c | 118 +++++++++++++++++++++++++++++----------- drivers/scsi/qla2xxx/qla_iocb.c | 2 +- 5 files changed, 120 insertions(+), 37 deletions(-) commit 81298056a78c5163b216f17d17c43736e7069961 Author: Matt Roper Date: Tue Jun 7 08:47:24 2022 -0700 drm/i915/dg2: Correct DSS check for Wa_1308578152 When converting our DSS masks to bitmaps, we fumbled the condition used to check whether any DSS are present in the first gslice. Since intel_sseu_find_first_xehp_dss() returns a 0-based number, we need a >= condition rather than >. Fixes: b87d39019651 ("drm/i915/sseu: Disassociate internal subslice mask representation from uapi") Reported-by: Balasubramani Vivekanandan Signed-off-by: Matt Roper Acked-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20220607154724.3155521-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_workarounds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54ee1844047c1df015ab2679a4f55564a3aa1fa1 Author: Ira Weiny Date: Tue Apr 19 10:06:07 2022 -0700 x86/pkeys: Clarify PKRU_AD_KEY macro When changing the PKRU_AD_KEY macro to be used for PKS the name came into question.[1] The intent of PKRU_AD_KEY is to set an initial value for the PKRU register but that is just a mask value. Clarify this by changing the name to PKRU_AD_MASK(). NOTE the checkpatch errors are ignored for the init_pkru_value to align the values in the code. [1] https://lore.kernel.org/lkml/eff862e2-bfaa-9e12-42b5-a12467d72a22@intel.com/ Suggested-by: Dave Hansen Signed-off-by: Ira Weiny Signed-off-by: Dave Hansen Link: https://lkml.kernel.org/r/20220419170649.1022246-3-ira.weiny@intel.com arch/x86/mm/pkeys.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit f8c1d4ca55177326adad1fdc6bf602423a507542 Author: Ira Weiny Date: Tue Apr 19 10:06:06 2022 -0700 Documentation/protection-keys: Clean up documentation for User Space pkeys The documentation for user space pkeys was a bit dated including things such as Amazon and distribution testing information which is irrelevant now. Update the documentation. This also streamlines adding the Supervisor pkey documentation later on. Signed-off-by: Ira Weiny Signed-off-by: Dave Hansen Link: https://lkml.kernel.org/r/20220419170649.1022246-2-ira.weiny@intel.com Documentation/core-api/protection-keys.rst | 44 ++++++++++++++---------------- 1 file changed, 21 insertions(+), 23 deletions(-) commit 72ca190052700d56dc130a106ce66651ba155835 Author: Krzysztof Kozlowski Date: Sun May 29 12:49:22 2022 +0200 dt-bindings: vendor-prefixes: document several vendors for Aspeed BMC boards Add vendor prefixes for manufacturers of Aspeed SoC based BMC boards: ASrock, ByteDance, Ingrasys, Inventec and Quanta. Move also bticino to proper alphabetical place. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220529104928.79636-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/vendor-prefixes.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit cbf9c4b9617b6767886a913705ca14b7600c77db Author: Vaibhav Jain Date: Tue May 31 09:44:46 2022 +0530 of: check previous kernel's ima-kexec-buffer against memory bounds Presently ima_get_kexec_buffer() doesn't check if the previous kernel's ima-kexec-buffer lies outside the addressable memory range. This can result in a kernel panic if the new kernel is booted with 'mem=X' arg and the ima-kexec-buffer was allocated beyond that range by the previous kernel. The panic is usually of the form below: $ sudo kexec --initrd initrd vmlinux --append='mem=16G' BUG: Unable to handle kernel data access on read at 0xc000c01fff7f0000 Faulting instruction address: 0xc000000000837974 Oops: Kernel access of bad area, sig: 11 [#1] NIP [c000000000837974] ima_restore_measurement_list+0x94/0x6c0 LR [c00000000083b55c] ima_load_kexec_buffer+0xac/0x160 Call Trace: [c00000000371fa80] [c00000000083b55c] ima_load_kexec_buffer+0xac/0x160 [c00000000371fb00] [c0000000020512c4] ima_init+0x80/0x108 [c00000000371fb70] [c0000000020514dc] init_ima+0x4c/0x120 [c00000000371fbf0] [c000000000012240] do_one_initcall+0x60/0x2c0 [c00000000371fcc0] [c000000002004ad0] kernel_init_freeable+0x344/0x3ec [c00000000371fda0] [c0000000000128a4] kernel_init+0x34/0x1b0 [c00000000371fe10] [c00000000000ce64] ret_from_kernel_thread+0x5c/0x64 Instruction dump: f92100b8 f92100c0 90e10090 910100a0 4182050c 282a0017 3bc00000 40810330 7c0802a6 fb610198 7c9b2378 f80101d0 2c090001 40820614 e9240010 ---[ end trace 0000000000000000 ]--- Fix this issue by checking returned PFN range of previous kernel's ima-kexec-buffer with page_is_ram() to ensure correct memory bounds. Fixes: 467d27824920 ("powerpc: ima: get the kexec buffer passed by the previous kernel") Cc: Frank Rowand Cc: Prakhar Srivastava Cc: Lakshmi Ramasubramanian Cc: Thiago Jung Bauermann Cc: Rob Herring Cc: Ritesh Harjani Cc: Robin Murphy Signed-off-by: Vaibhav Jain Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220531041446.3334259-1-vaibhav@linux.ibm.com drivers/of/kexec.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 4d3d0ed60ee0d2da4c541e525c132dc374464624 Author: Christian Göttsche Date: Thu Feb 17 15:21:28 2022 +0100 selinux: drop unnecessary NULL check Commit e3489f8974e1 ("selinux: kill selinux_sb_get_mnt_opts()") introduced a NULL check on the context after a successful call to security_sid_to_context(). This is on the one hand redundant after checking for success and on the other hand insufficient on an actual NULL pointer, since the context is passed to seq_escape() leading to a call of strlen() on it. Reported by Clang analyzer: In file included from security/selinux/hooks.c:28: In file included from ./include/linux/tracehook.h:50: In file included from ./include/linux/memcontrol.h:13: In file included from ./include/linux/cgroup.h:18: ./include/linux/seq_file.h:136:25: warning: Null pointer passed as 1st argument to string length function [unix.cstring.NullArg] seq_escape_mem(m, src, strlen(src), flags, esc); ^~~~~~~~~~~ Signed-off-by: Christian Göttsche Signed-off-by: Paul Moore security/selinux/hooks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6e3806705d679edf135dff5d540a278fc406f15 Author: Anshuman Gupta Date: Tue Jun 7 16:15:42 2022 +0530 drm/i915/dg2: Add Wa_14015795083 i915 must disable Render DOP clock gating globally. v2: - Addressed cosmetic review comments. Bspec: 52621 Cc: Matt Roper Cc: Badal Nilawar Signed-off-by: Anshuman Gupta Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220607104542.8559-1-anshuman.gupta@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++ 2 files changed, 4 insertions(+) commit 0e3c3b901c00364198d31482fa2552ccf2d5c899 Author: Al Viro Date: Mon Jun 6 18:42:59 2022 -0400 No need of likely/unlikely on calls of check_copy_size() it's inline and unlikely() inside of it (including the implicit one in WARN_ON_ONCE()) suffice to convince the compiler that getting false from check_copy_size() is unlikely. Spotted-by: Jens Axboe Reviewed-by: Christoph Hellwig Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Al Viro arch/powerpc/include/asm/uaccess.h | 2 +- arch/s390/include/asm/uaccess.h | 4 ++-- include/linux/uaccess.h | 4 ++-- include/linux/uio.h | 15 ++++++--------- 4 files changed, 11 insertions(+), 14 deletions(-) commit 2ff6a14b20298db0763772b62cd4fb030e6d7f75 Author: Robin Chen Date: Fri Apr 22 17:25:38 2022 +0800 drm/amd/display: refactor dirty rect dmub command decision [Why] To wrap the decision logic of sending dirty rect dmub command for both frame update and cursor update path. Signed-off-by: Robin Chen Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 14 ++++++++++++- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 24 ++++++++++++++++------ 2 files changed, 31 insertions(+), 7 deletions(-) commit f9f4daf15398c3aa0aa2dcd05ed4ea2544bcc62c Author: David Zhang Date: Wed May 11 13:29:54 2022 -0400 drm/amd/display: pass panel instance in DMUB dirty rect command [Why] In cases where there are multiple eDP instances, DMUB needs to know which instance the command is for. Today, the field for specifying the panel_inst exists in both dmub_cmd_update_dirty_rect_data and dmub_cmd_update_cursor_info_data. For cursor updates, we already specify the panel_inst, but that's not the case for dirty_rect updates. Today, a value of '0' is used (due to initial memsetting of the cmd struct to 0) [how] In dc_dmub_update_dirty_rect(), Call dc_get_edp_link_panel_inst() to get the panel_inst, and fill it in the DMUB cmd struct. v2: Update commit message for clarity. Signed-off-by: Mikita Lipski Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6651875ad7796ed3cd84b3bafb3885d05bb543ff Author: David Zhang Date: Tue May 3 18:12:05 2022 -0400 drm/amd/display: Add PSR-SU-RC support in DC [Why] PSR-SU Rate Control - or PSR-SU-RC - enables PSR-SU panels to work with variable refresh rate to allow for more power savings. Lowering the refresh rate can increase PSR residency by expanding the eDP main link shut down duration. It can also lower panel power consumption. There is a complication with PSR, since the eDP main link can be shut down. Therefore, the timing controller (TCON) on the eDP sink nees to be able to scan out its remote buffer independent of the main link. To allow the eDP source to specify the sink's refresh rate while the link is off, vendor-specific DPCD registers are used. This allows the eDP source to then "Rate Control" the panel during PSR active. [How] Add DC support to communicate with PSR-SU-RC supported eDP sinks. The sink will need to know the desired VTotal during PSR active. This change only adds support to DC, support in amdgpu_dm is still pending to enable this fully. Signed-off-by: David Zhang Signed-off-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 22 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc_link.h | 3 +++ drivers/gpu/drm/amd/display/dc/dc_types.h | 2 ++ drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 23 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dmub_psr.h | 2 ++ .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 8 ++++++++ 6 files changed, 60 insertions(+) commit 6bad4ff84cb57f548d42a41091159b750eed9ef9 Author: David Zhang Date: Tue May 3 17:53:44 2022 -0400 drm/amd/display: expose AMD specific DPCD for PSR-SU-RC support [why & how] Expose vendor specific DPCD registers for rate controlling the eDP sink TCON's refresh rate during PSR active. When used in combination with PSR-SU and Freesync, it is called PSR-SU Rate Contorol, or PSR-SU-RC for short. v2: Add all DPCD registers required Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/include/ddc_service_types.h | 4 ++++ 1 file changed, 4 insertions(+) commit 44961f6ebce9a7dccb2ec3dca312c5dbf85920e5 Author: Aric Cyr Date: Sun May 29 22:58:52 2022 -0400 drm/amd/display: 3.2.189 This version brings along the following: - DPP DTO fix - Transient encoder fix - Restrict the reading of LTTPR capabilities in LTTPR mode - Increase maximum stages for BB - Distinguish HDMI DTO from DP DTO Acked-by: Hamza Mahfooz Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d001360b47b792a475250bf7ef2bcfbd17ba09f Author: Chris Park Date: Wed May 25 23:22:11 2022 -0400 drm/amd/display: Add HDMI member to DTO [Why] For Pixel Rate control, when on HDMI, HDMI DTO should be selected instead of DP DTO. [How] Add HDMI member to dtbclk_dto_params, so it can be used tell apart HDMI and DP DTO in the future. Reviewed-by: Alvin Lee Acked-by: Hamza Mahfooz Signed-off-by: Chris Park Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h | 1 + 1 file changed, 1 insertion(+) commit d445dd7b39c56a66872386a3ce0c8a862e59be46 Author: Lei, Jun Date: Thu May 26 16:58:25 2022 -0400 drm/amd/display: Extend soc BB capabilitiy [why] Some parts are consuming dangerously close to maximum number of states supported when updating the BB (i.e. 8). [how] Change maximum stages from 9 to 20. Reviewed-by: Alvin Lee Acked-by: Hamza Mahfooz Signed-off-by: Jun Lei Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dml/dc_features.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 6b6d12b6ff204cc224cd2369bda2b0580a80a5b3 Author: Jimmy Kizito Date: Tue May 17 13:31:03 2022 -0400 drm/amd/display: Fix entry into transient encoder assignment mode. [Why] In some scenarios it is possible for the encoder assignment module to be set to "transient" mode even though there are no new encoder assignments. This can lead to incorrect results when querying encoder assignment, which in turn can cause incorrect displays to be manipulated. [How] Only allow encoder assignment to be in transient mode of operation when there are valid new encoder assignments. Reviewed-by: Meenakshikumar Somasundaram Reviewed-by: Jun Lei Acked-by: Hamza Mahfooz Signed-off-by: Jimmy Kizito Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 17 +++++--- .../gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c | 45 +++++++++++++++++++++- .../amd/display/dc/dcn31/dcn31_dio_link_encoder.c | 6 +++ drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/link_enc_cfg.h | 7 ++++ 5 files changed, 69 insertions(+), 8 deletions(-) commit d4965c53b95d7533dfc2309d2fc25838bd33220e Author: Duncan Ma Date: Wed May 25 16:28:49 2022 -0400 drm/amd/display: Fix dpp dto for disabled pipes [Why] When switching from 1 pipe to 4to1 mpc combine, DppDtoClk aren't enabled for the disabled pipes pior to programming the pipes. Upon optimizing bandwidth, DppDto are enabled causing intermittent underflow. [How] Update dppclk dto whenever pipe are flagged to enable. Reviewed-by: Dmytro Laktyushkin Reviewed-by: Nicholas Kazlauskas Reviewed-by: Hansen Dsouza Acked-by: Hamza Mahfooz Signed-off-by: Duncan Ma Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 4 ++++ 1 file changed, 4 insertions(+) commit a0b9e4531b2eaf066a1ccb2986f4d2f9efa6c313 Author: Aric Cyr Date: Tue May 24 09:29:28 2022 -0400 drm/amd/display: 3.2.188 This version brings along the following: - Optimized blank calculations - More robust DP MST hotplug support - eDP bug fix relating to ODM - Revert a patch that caused a regression with DP - min comp buffer size fix - Make DP easier to debug - Calculate the maximum OLED brightness correctly - 3 plane MPO. Acked-by: Hamza Mahfooz Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 874714feff3128dc691fc309ee8b9d479f541aa6 Author: Anthony Koo Date: Sun May 22 12:03:35 2022 -0400 drm/amd/display: [FW Promotion] Release 0.0.119.0 Reviewed-by: Aric Cyr Acked-by: Hamza Mahfooz Signed-off-by: Anthony Koo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 1 + 1 file changed, 1 insertion(+) commit 8246370341e8e816ad22aaf8d8bfca850339ce0a Author: Hansen Dsouza Date: Fri May 20 16:39:29 2022 -0400 drm/amd/display: Enable 3 plane MPO [why and how] 3 plane MPO is a new feature missing in a few resource files Enable 3 plane MPO by setting slave planes to 2 Reviewed-by: Krunoslav Kovac Reviewed-by: Aric Cyr Acked-by: Hamza Mahfooz Signed-off-by: Hansen Dsouza Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c | 6 +++--- drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit d8791dc7f941f3dc78ef2c6aa71d7c752d5b529e Author: Roman Li Date: Thu May 19 14:41:16 2022 -0400 drm/amd/display: Cap OLED brightness per max frame-average luminance [Why] For OLED eDP the Display Manager uses max_cll value as a limit for brightness control. max_cll defines the content light luminance for individual pixel. Whereas max_fall defines frame-average level luminance. The user may not observe the difference in brightness in between max_fall and max_cll. That negatively impacts the user experience. [How] Use max_fall value instead of max_cll as a limit for brightness control. Reviewed-by: Rodrigo Siqueira Acked-by: Hamza Mahfooz Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e5309d7f66105011e0597fd55ff2ef7f636f52c6 Author: Wenjing Liu Date: Fri May 13 11:43:45 2022 -0400 drm/amd/display: add DP sanity checks during enable stream [why] 1. When HPD deassertion is pulled in the middle of enabe stream link training, we will abort current training and turn off PHY. This causes current link settings to be zeroed this causes later stream enablement sequence to fail as we prefer to carry on enablement process despite of link training failure for SST. 2. When HPD is toggled after detection before before the enable stream sequence as a result. There could be a race condition where we could end up enable stream based on the previous link even though the link is updated after the HPD toggle. This causes an issue where our link bandwidth is no longer enough to accommodate the timing therefore causes us to oversubscribe MST payload time slots. As discussed we decided to add basic sanity check to make sure that our code can handle the oversubscription failure silently without system hang. [how] 1. Keep PHY powered on when HPD is deasserted during enable stream and wait for the detection sequence to power it off later. 2. Do not allocate payload if the required timeslot for current timing is greater than 64 timeslots. Reviewed-by: Aric Cyr Reviewed-by: George Shen Acked-by: Hamza Mahfooz Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 2 ++ drivers/gpu/drm/amd/display/dc/core/dc_link.c | 1 + drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 16 +++++++++++----- drivers/gpu/drm/amd/display/dc/inc/core_status.h | 2 +- 4 files changed, 15 insertions(+), 6 deletions(-) commit 0c56705d8aae9696348cc320b71d531ede001b79 Author: Duncan Ma Date: Tue May 17 17:50:23 2022 -0400 drm/amd/display: Correct min comp buffer size [Why] In 3-way mpo pipes, there is a case that we overbook the CRB buffer size. At rare instances, overbooking the crb will cause underflow. This only happens when det_size changes dynamically based on pipe_cnt. [How] Set min compbuff size to 1 segment when preparing BW. Reviewed-by: Dmytro Laktyushkin Acked-by: Hamza Mahfooz Signed-off-by: Duncan Ma Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2d017189e2b39cf2fae63984215385401b77ea83 Author: Duncan Ma Date: Thu May 12 14:46:24 2022 -0400 drm/amd/display: Blank eDP on enable drv if odm enabled [Why] For panels with pixel clock > 1200MHz that require ODM in pre-OS, when driver is disabled in OS, odm is enabled. Upon driver enablement, corruption is seen if odm was originally enabled. DP_PIXEL_COMBINE and pixelclk must be programmed prior to programming the optc-odm registers. However, eDP displays aren't blanked prior to initializing odm in this case. [How] Upon driver enablement, check whether odm is enabled, if so, blank eDP prior to programming optc-odm registers. Reviewed-by: Nicholas Kazlauskas Acked-by: Hamza Mahfooz Signed-off-by: Duncan Ma Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 20 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dc_link.h | 1 + drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c | 22 ++++++++++++++++++++++ 4 files changed, 44 insertions(+) commit 77361ed89a8b03c7e121f4b8c517d7be93ccd8df Author: Jimmy Kizito Date: Thu Mar 24 13:42:45 2022 -0400 drm/amd/display: Avoid reading LTTPR caps in non-LTTPR mode. [Why] LTTPR capable devices on the DisplayPort path may assume that extended LTTPR AUX timeouts will be used after LTTPR capabilities are read. When DPTX operates in non-LTTPR mode, AUX timeouts are not extended and this can result in AUX transactions timing out. [How] Use shared helper function to determine LTTPR mode and do not read LTTPR capabilities in non-LTTPR mode. Reviewed-by: Mustapha Ghaddar Reviewed-by: Meenakshikumar Somasundaram Reviewed-by: Jun Lei Acked-by: Hamza Mahfooz Signed-off-by: Jimmy Kizito Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 44 +++++++++++++++++------- 1 file changed, 31 insertions(+), 13 deletions(-) commit 165ab7b4319d8ecbb689f3d68f0cd6bda4d82b1c Author: Nicholas Kazlauskas Date: Tue May 17 10:12:27 2022 -0400 Revert "drm/amd/display: Pass the new context into disable OTG WA" This reverts commit 8440f57532496d398a461887e56ca6f45089fbcf. Causes a hang when hotplugging DP, shutting down system, or enabling dual eDP. Reviewed-by: Dmytro Laktyushkin Acked-by: Hamza Mahfooz Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) commit ae204faa949d76eb89fa31f18c51c09ada5dad4f Author: Guchun Chen Date: Mon Jun 6 10:09:48 2022 +0800 Revert "drm/amdgpu: Ensure the DMA engine is deactivated during set ups" This reverts commit b992a19085885c096b19625a85c674cb89829ca1. This causes regression in GPU reset related test. Cc: Alexander Deucher Cc: ricetons@gmail.com Signed-off-by: Guchun Chen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 109 ++++++++++++++------------------- 1 file changed, 45 insertions(+), 64 deletions(-) commit 494688efdc5912b858d0a05563c9cf258c75d29a Author: GONG, Ruiqi Date: Wed May 18 09:21:37 2022 +0000 selinux: add __randomize_layout to selinux_audit_data Randomize the layout of struct selinux_audit_data as suggested in [1], since it contains a pointer to struct selinux_state, an already randomized strucure. [1]: https://github.com/KSPP/linux/issues/188 Signed-off-by: GONG, Ruiqi Signed-off-by: Paul Moore security/selinux/include/avc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ee6cfdd11aaf5aee5cd48baf35b1710caa68a5c Author: Shreenidhi Shedi Date: Sun May 15 13:01:09 2022 +0530 audit: remove redundant data_len check data_len is already getting checked if it's less than 2 earlier in this function. Signed-off-by: Shreenidhi Shedi Signed-off-by: Paul Moore kernel/audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f210f387c8c05ae0bd5312b8b6b85398c20b94f9 Author: Robert Marko Date: Sat Jun 4 21:32:59 2022 +0200 regulator: qcom_smd: add get_voltage to MP5496 Add the get_voltage OP to MP5496 ops using the generic rpm_reg_get_voltage. Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20220604193300.125758-1-robimarko@gmail.com Signed-off-by: Mark Brown drivers/regulator/qcom_smd-regulator.c | 1 + 1 file changed, 1 insertion(+) commit e02b99e9b79ff272e8c299a3ee53bdb194ca885e Author: Pierre-Louis Bossart Date: Mon Jun 6 15:37:52 2022 -0500 ASoC: codecs: rt700/rt711/rt711-sdca: resume bus/codec in .set_jack_detect The .set_jack_detect() codec component callback is invoked during card registration, which happens when the machine driver is probed. The issue is that this callback can race with the bus suspend/resume, and IO timeouts can happen. This can be reproduced very easily if the machine driver is 'blacklisted' and manually probed after the bus suspends. The bus and codec need to be re-initialized using pm_runtime helpers. Previous contributions tried to make sure accesses to the bus during the .set_jack_detect() component callback only happen when the bus is active. This was done by changing the regcache status on a component remove. This is however a layering violation, the regcache status should only be modified on device probe, suspend and resume. The component probe/remove should not modify how the device regcache is handled. This solution also didn't handle all the possible race conditions, and the RT700 headset codec was not handled. This patch tries to resume the codec device before handling the jack initializations. In case the codec has not yet been initialized, pm_runtime may not be enabled yet, so we don't squelch the -EACCES error code and only stop the jack information. When the codec reports as attached, the jack initialization will proceed as usual. BugLink: https://github.com/thesofproject/linux/issues/3643 Fixes: 7ad4d237e7c4a ('ASoC: rt711-sdca: Add RT711 SDCA vendor-specific driver') Fixes: 899b12542b089 ('ASoC: rt711: add snd_soc_component remove callback') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220606203752.144159-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/rt700.c | 16 +++++++++++++--- sound/soc/codecs/rt711-sdca.c | 26 ++++++++++++++------------ sound/soc/codecs/rt711.c | 24 +++++++++++++----------- 3 files changed, 40 insertions(+), 26 deletions(-) commit a49267a3bd102e3991514e884aac89cc0d0b5f35 Author: Pierre-Louis Bossart Date: Mon Jun 6 15:37:51 2022 -0500 ASoC: codecs: rt700/rt711/rt711-sdca: initialize workqueues in probe The workqueues are initialized in the io_init functions, which isn't quite right. In some tests, this leads to warnings throw from __queue_delayed_work() WARN_ON_FUNCTION_MISMATCH(timer->function, delayed_work_timer_fn); Move all the initializations to the probe functions. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220606203752.144159-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/rt700.c | 12 +++++------- sound/soc/codecs/rt711-sdca.c | 10 +++------- sound/soc/codecs/rt711.c | 12 +++++------- 3 files changed, 13 insertions(+), 21 deletions(-) commit 05ba4c00fa9cb077a0dd91f5e6056951a787f63c Author: Pierre-Louis Bossart Date: Mon Jun 6 15:37:50 2022 -0500 ASoC: rt7*-sdw: harden jack_detect_handler Realtek headset codec drivers typically check if the card is instantiated before proceeding with the jack detection. The rt700, rt711 and rt711-sdca are however missing a check on the card pointer, which can lead to NULL dereferences encountered in driver bind/unbind tests. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220606203752.144159-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/rt700.c | 2 +- sound/soc/codecs/rt711-sdca.c | 2 +- sound/soc/codecs/rt711.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 74d40901ebad7c466a95b1ae3c6891f1ba09786f Author: Pierre-Louis Bossart Date: Mon Jun 6 15:37:49 2022 -0500 ASoC: rt711: fix calibrate mutex initialization Follow the same flow as rt711-sdca and initialize all mutexes at probe time. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220606203752.144159-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/rt711-sdw.c | 3 +++ sound/soc/codecs/rt711.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit 768ad6d80db2dbbb1bfbb5e616d701a0b560f12a Author: Pierre-Louis Bossart Date: Mon Jun 6 15:37:48 2022 -0500 ASoC: Intel: sof_sdw: handle errors on card registration If the card registration fails, typically because of deferred probes, the device properties added for headset codecs are not removed, which leads to kernel oopses in driver bind/unbind tests. We already clean-up the device properties when the card is removed, this code can be moved as a helper and called upon card registration errors. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220606203752.144159-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 51 +++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 22 deletions(-) commit 716c2e7e1608a89423ec84398b99ff2fa855d161 Author: Pierre-Louis Bossart Date: Mon Jun 6 15:37:47 2022 -0500 ASoC: rt711-sdca-sdw: fix calibrate mutex initialization In codec driver bind/unbind test, the following warning is thrown: DEBUG_LOCKS_WARN_ON(lock->magic != lock) ... [ 699.182495] rt711_sdca_jack_init+0x1b/0x1d0 [snd_soc_rt711_sdca] [ 699.182498] rt711_sdca_set_jack_detect+0x3b/0x90 [snd_soc_rt711_sdca] [ 699.182500] snd_soc_component_set_jack+0x24/0x50 [snd_soc_core] A quick check in the code shows that the 'calibrate_mutex' used by this driver are not initialized at probe time. Moving the initialization to the probe removes the issue. BugLink: https://github.com/thesofproject/linux/issues/3644 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220606203752.144159-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/rt711-sdca-sdw.c | 3 +++ sound/soc/codecs/rt711-sdca.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit f9e9bdd5bb180325256e3bdfeb9c4c6526133478 Author: Pierre-Louis Bossart Date: Mon Jun 6 15:37:46 2022 -0500 ASoC: Realtek/Maxim SoundWire codecs: disable pm_runtime on remove When binding/unbinding codec drivers, the following warnings are thrown: [ 107.266879] rt715-sdca sdw:3:025d:0714:01: Unbalanced pm_runtime_enable! [ 306.879700] rt711-sdca sdw:0:025d:0711:01: Unbalanced pm_runtime_enable! Add a remove callback for all Realtek/Maxim SoundWire codecs and remove this warning. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220606203752.144159-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/max98373-sdw.c | 12 +++++++++++- sound/soc/codecs/rt1308-sdw.c | 11 +++++++++++ sound/soc/codecs/rt1316-sdw.c | 11 +++++++++++ sound/soc/codecs/rt5682-sdw.c | 5 ++++- sound/soc/codecs/rt700-sdw.c | 6 +++++- sound/soc/codecs/rt711-sdca-sdw.c | 6 +++++- sound/soc/codecs/rt711-sdw.c | 6 +++++- sound/soc/codecs/rt715-sdca-sdw.c | 12 ++++++++++++ sound/soc/codecs/rt715-sdw.c | 12 ++++++++++++ 9 files changed, 76 insertions(+), 5 deletions(-) commit 4464bd825dd56c2f900038c5922408d70aab01fc Author: Luca Coelho Date: Tue Jun 7 10:44:33 2022 +0300 drm/i915: remove noisy logs in intel_dp_dsc_get_output_bpp() The intel_dp_dsc_get_output_bpp() function outputs two lines of unconditional logs, which was okay when it was called only once. But now, we also call this function from intel_dp_mode_valid(), which is in turn called for every mode we need to validate. This causes a lot of useless noise. Remove the unconditional prints to avoid spamming the logs. Also remove one more print that is not unconditional, but is related. Signed-off-by: Luca Coelho Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220607074433.1202917-1-luca@coelho.fi drivers/gpu/drm/i915/display/intel_dp.c | 5 ----- 1 file changed, 5 deletions(-) commit aec23025ebc86b770beb9dab6610b671e63d36a2 Author: Jani Nikula Date: Tue Jun 7 12:42:07 2022 +0300 drm/i915/utils: throw out unused stuff Remove some of the unused helpers from i915_utils.h. Signed-off-by: Jani Nikula Acked-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220607094207.536699-3-jani.nikula@intel.com drivers/gpu/drm/i915/i915_utils.h | 40 --------------------------------------- 1 file changed, 40 deletions(-) commit 38353a5e3da0b26fab9eeff13a482b135512d9c0 Author: Jani Nikula Date: Tue Jun 7 12:42:06 2022 +0300 drm/i915/drv: drop intel_bios.h include No longer needed after panel data was moved. Signed-off-by: Jani Nikula Acked-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220607094207.536699-2-jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 - 1 file changed, 1 deletion(-) commit 330c1b3180b0d79fef7c05331647f3695661b79e Author: Jani Nikula Date: Tue Jun 7 12:42:05 2022 +0300 drm/i915/tasklet: separate local hacks around struct tasklet_struct Add a dedicated file for the local functions around struct tasklet_struct. Far from ideal, but better placed in a dedicated file than i915_gem.h. Signed-off-by: Jani Nikula Acked-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220607094207.536699-1-jani.nikula@intel.com drivers/gpu/drm/i915/TODO.txt | 2 +- drivers/gpu/drm/i915/i915_gem.h | 33 --------------------------- drivers/gpu/drm/i915/i915_scheduler.h | 1 + drivers/gpu/drm/i915/i915_tasklet.h | 43 +++++++++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 34 deletions(-) commit 34b68c17e9895ba66fc809224b0122a2eed7aa40 Author: Jani Nikula Date: Tue Jun 7 12:22:07 2022 +0300 drm/i915/client: only include what's needed Only the uapi header is required. Signed-off-by: Jani Nikula Acked-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220607092207.476653-1-jani.nikula@intel.com drivers/gpu/drm/i915/i915_drm_client.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ac8bc4f54efc62afc51f2fee3b669bdf38e9cbd Merge: 71ba950f3b1f f303c6b26ced Author: Mark Brown Date: Tue Jun 7 18:32:35 2022 +0100 Add support for PolarFire SoC's spi controllers Merge series from Conor Dooley : Add support for the PolatFire SoC SPI controller, the DT binding was added previously. commit 35a2443d0910fdd6ce29d4f724447ad7029e8f23 Author: Mateusz Palczewski Date: Fri May 20 12:07:13 2022 +0200 iavf: Add waiting for response from PF in set mac Make iavf_set_mac synchronous by waiting for a response from a PF. Without this iavf_set_mac is always returning success even though set_mac can be rejected by a PF. This ensures that when set_mac exits netdev MAC is updated. This is needed for sending ARPs with correct MAC after changing VF's MAC. This is also needed by bonding module. Signed-off-by: Sylwester Dziedziuch Signed-off-by: Mateusz Palczewski Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf.h | 7 +- drivers/net/ethernet/intel/iavf/iavf_main.c | 127 ++++++++++++++++++++---- drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 61 +++++++++++- 3 files changed, 174 insertions(+), 21 deletions(-) commit c87c938f62d8f1f7c24620859d67f2e3eca23afc Author: Mateusz Palczewski Date: Mon Apr 11 14:07:14 2022 +0200 i40e: Add VF VLAN pruning VFs by default are able to see all tagged traffic regardless of trust and VLAN filters configured. Add new private flag vf-vlan-pruning that allows changing of default VF behavior for tagged traffic. When the flag is turned on untrusted VF will only be able to receive untagged traffic or traffic with VLAN tags it has created interfaces for The flag is off by default and can only be changed if there are no VFs spawned on the PF. This flag will only be effective when no PVID is set on VF and VF is not trusted. Add new function that computes the correct VLAN ID for VF VLAN filters based on trust, PVID, vf-vlan-prune-disable flag and current VLAN ID. Testing Hints: Test 1: vf-vlan-pruning == off ============================== 1. Set the private flag > ethtool --set-priv-flag eth0 vf-vlan-pruning off (default setting) 2. Use scapy to send any VLAN tagged traffic and make sure the VF receives all VLAN tagged traffic that matches its destination MAC filters (unicast, multicast, and broadcast). Test 2: vf-vlan-pruning == on ============================== 1. Set the private flag > ethtool --set-priv-flag eth0 vf-vlan-pruning on 2. Use scapy to send any VLAN tagged traffic and make sure the VF does not receive any VLAN tagged traffic that matches its destination MAC filters (unicast, multicast, and broadcast). 3. Add a VLAN filter on the VF netdev > ip link add link eth0v0 name vlan10 type vlan id 10 4. Bring the VLAN netdev up > ip link set vlan10 up 4. Use scapy to send traffic with VLAN 10, VLAN 11 (anything not VLAN 10), and untagged traffic. Make sure the VF only receives VLAN 10 and untagged traffic when the link partner is sending. Test 3: vf-vlan-pruning == off && VF is in a port VLAN ============================== 1. Set the private flag > ethtool --set-priv-flag eth0 vf-vlan-pruning off (default setting) 2. Create a VF > echo 1 > sriov_numvfs 3. Put the VF in a port VLAN > ip link set eth0 vf 0 vlan 10 4. Use scapy to send traffic with VLAN 10 and VLAN 11 (anything not VLAN 10) and make sure the VF only receives untagged traffic when the link partner is sending VLAN 10 tagged traffic as the VLAN tag is expected to be stripped by HW for port VLANs and not visible to the VF. Test 4: Change vf-vlan-pruning while VFs are created ============================== echo 0 > sriov_numvfs ethtool --set-priv-flag eth0 vf-vlan-pruning off echo 1 > sriov_numvfs ethtool --set-priv-flag eth0 vf-vlan-pruning on (expect failure) Signed-off-by: Sylwester Dziedziuch Signed-off-by: Przemyslaw Patynowski Signed-off-by: Mateusz Palczewski Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 9 ++ drivers/net/ethernet/intel/i40e/i40e_main.c | 135 ++++++++++++++++++++- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 8 +- 4 files changed, 147 insertions(+), 6 deletions(-) commit d352bd889b6a9c9749dadb0e17675795ed9cea9e Merge: 02f4afebf8a5 61dbd5982964 Author: Alexei Starovoitov Date: Tue Jun 7 10:20:44 2022 -0700 Merge branch 'bpf: Add 64bit enum value support' Yonghong Song says: ==================== Currently, btf only supports upto 32bit enum value with BTF_KIND_ENUM. But in kernel, some enum has 64bit values, e.g., in uapi bpf.h, we have enum { BPF_F_INDEX_MASK = 0xffffffffULL, BPF_F_CURRENT_CPU = BPF_F_INDEX_MASK, BPF_F_CTXLEN_MASK = (0xfffffULL << 32), }; With BTF_KIND_ENUM, the value for BPF_F_CTXLEN_MASK will be encoded as 0 which is incorrect. To solve this problem, BTF_KIND_ENUM64 is proposed in this patch set to support enum 64bit values. Also, since sometimes there is a need to generate C code from btf, e.g., vmlinux.h, btf kflag support is also added for BTF_KIND_ENUM and BTF_KIND_ENUM64 to indicate signedness, helping proper value printout. Changelog: v4 -> v5: - skip newly-added enum64 C test if clang version <= 14. v3 -> v4: - rename btf_type_is_any_enum() to btf_is_any_enum() to favor consistency in libbpf. - fix sign extension issue in btf_dump_get_enum_value(). - fix BPF_CORE_FIELD_SIGNED signedness issue in bpf_core_calc_field_relo(). v2 -> v3: - Implement separate btf_equal_enum()/btf_equal_enum64() and btf_compat_enum()/btf_compat_enum64(). - Add a new enum64 placeholder type dynamicly for enum64 sanitization. - For bpftool output and unit selftest, printed out signed/unsigned encoding as well. - fix some issues with BTF_KIND_ENUM is doc and clarified sign extension rules for enum values. v1 -> v2: - Changed kflag default from signed to unsigned - Fixed sanitization issue - Broke down libbpf related patches for easier review - Added more tests - More code refactorization - Corresponding llvm patch (to support enum64) is also updated ==================== Signed-off-by: Alexei Starovoitov commit 61dbd5982964074ffa01a1a6af13b8137a2f6ca7 Author: Yonghong Song Date: Mon Jun 6 23:27:24 2022 -0700 docs/bpf: Update documentation for BTF_KIND_ENUM64 support Add BTF_KIND_ENUM64 documentation in btf.rst. Also fixed a typo for section number for BTF_KIND_TYPE_TAG from 2.2.17 to 2.2.18, and fixed a type size issue for BTF_KIND_ENUM. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220607062724.3728215-1-yhs@fb.com Signed-off-by: Alexei Starovoitov Documentation/bpf/btf.rst | 43 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 6 deletions(-) commit f4db3dd5284d9e0be2abc2f6e1dbdfe93da5681c Author: Yonghong Song Date: Mon Jun 6 23:27:18 2022 -0700 selftests/bpf: Add a test for enum64 value relocations Add a test for enum64 value relocations. The test will be skipped if clang version is 14 or lower since enum64 is only supported from version 15. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220607062718.3726307-1-yhs@fb.com Signed-off-by: Alexei Starovoitov .../testing/selftests/bpf/prog_tests/core_reloc.c | 58 ++++++++++++++++ .../bpf/progs/btf__core_reloc_enum64val.c | 3 + .../bpf/progs/btf__core_reloc_enum64val___diff.c | 3 + .../btf__core_reloc_enum64val___err_missing.c | 3 + .../btf__core_reloc_enum64val___val3_missing.c | 3 + .../testing/selftests/bpf/progs/core_reloc_types.h | 78 ++++++++++++++++++++++ .../bpf/progs/test_core_reloc_enum64val.c | 70 +++++++++++++++++++ 7 files changed, 218 insertions(+) commit adc26d134ef3454c3d8ffb75ee6ca20c169b23d0 Author: Yonghong Song Date: Mon Jun 6 23:27:13 2022 -0700 selftests/bpf: Test BTF_KIND_ENUM64 for deduplication Add a few unit tests for BTF_KIND_ENUM64 deduplication. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220607062713.3725409-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/btf.c | 97 +++++++++++++++++++++++++++- 1 file changed, 95 insertions(+), 2 deletions(-) commit 3b5325186dfad5ad2b2d8f7e8a79662de1b2749d Author: Yonghong Song Date: Mon Jun 6 23:27:08 2022 -0700 selftests/bpf: Add BTF_KIND_ENUM64 unit tests Add unit tests for basic BTF_KIND_ENUM64 encoding. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220607062708.3724845-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/btf.c | 36 ++++++++++++++++++++++++++++ tools/testing/selftests/bpf/test_btf.h | 1 + 2 files changed, 37 insertions(+) commit 2b7301457ffe7be085744fa49f1244a71c1c6f1d Author: Yonghong Song Date: Mon Jun 6 23:27:03 2022 -0700 selftests/bpf: Test new enum kflag and enum64 API functions Add tests to use the new enum kflag and enum64 API functions in selftest btf_write. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220607062703.3724287-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/btf_helpers.c | 25 +++- tools/testing/selftests/bpf/prog_tests/btf_write.c | 126 +++++++++++++++------ 2 files changed, 114 insertions(+), 37 deletions(-) commit d932815a4394b6e8e861f75600666db40c706b8b Author: Yonghong Song Date: Mon Jun 6 23:26:57 2022 -0700 selftests/bpf: Fix selftests failure The kflag is supported now for BTF_KIND_ENUM. So remove the test which tests verifier failure due to existence of kflag. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220607062657.3723737-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/btf.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 58a53978fdf65d12dae1798e44120efb992a3615 Author: Yonghong Song Date: Mon Jun 6 23:26:52 2022 -0700 bpftool: Add btf enum64 support Add BTF_KIND_ENUM64 support. For example, the following enum is defined in uapi bpf.h. $ cat core.c enum A { BPF_F_INDEX_MASK = 0xffffffffULL, BPF_F_CURRENT_CPU = BPF_F_INDEX_MASK, BPF_F_CTXLEN_MASK = (0xfffffULL << 32), } g; Compiled with clang -target bpf -O2 -g -c core.c Using bpftool to dump types and generate format C file: $ bpftool btf dump file core.o ... [1] ENUM64 'A' encoding=UNSIGNED size=8 vlen=3 'BPF_F_INDEX_MASK' val=4294967295ULL 'BPF_F_CURRENT_CPU' val=4294967295ULL 'BPF_F_CTXLEN_MASK' val=4503595332403200ULL $ bpftool btf dump file core.o format c ... enum A { BPF_F_INDEX_MASK = 4294967295ULL, BPF_F_CURRENT_CPU = 4294967295ULL, BPF_F_CTXLEN_MASK = 4503595332403200ULL, }; ... Note that for raw btf output, the encoding (UNSIGNED or SIGNED) is printed out as well. The 64bit value is also represented properly in BTF and C dump. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220607062652.3722649-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/btf.c | 57 +++++++++++++++++++++++++++++++++++++++--- tools/bpf/bpftool/btf_dumper.c | 29 +++++++++++++++++++++ tools/bpf/bpftool/gen.c | 1 + 3 files changed, 84 insertions(+), 3 deletions(-) commit 23b2a3a8f63a9dc14ad0c7a63098e0b3575b1173 Author: Yonghong Song Date: Mon Jun 6 23:26:47 2022 -0700 libbpf: Add enum64 relocation support The enum64 relocation support is added. The bpf local type could be either enum or enum64 and the remote type could be either enum or enum64 too. The all combinations of local enum/enum64 and remote enum/enum64 are supported. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220607062647.3721719-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/lib/bpf/btf.h | 7 ++++++ tools/lib/bpf/libbpf.c | 7 +++--- tools/lib/bpf/relo_core.c | 54 ++++++++++++++++++++++++++++++++--------------- 3 files changed, 48 insertions(+), 20 deletions(-) commit 6ec7d79be202db14bd0ceeb9ed32908bcaae27fa Author: Yonghong Song Date: Mon Jun 6 23:26:42 2022 -0700 libbpf: Add enum64 support for bpf linking Add BTF_KIND_ENUM64 support for bpf linking, which is very similar to BTF_KIND_ENUM. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220607062642.3721494-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/lib/bpf/linker.c | 2 ++ 1 file changed, 2 insertions(+) commit f2a625889bb8d153d277f557c929d43874561f10 Author: Yonghong Song Date: Mon Jun 6 23:26:36 2022 -0700 libbpf: Add enum64 sanitization When old kernel does not support enum64 but user space btf contains non-zero enum kflag or enum64, libbpf needs to do proper sanitization so modified btf can be accepted by the kernel. Sanitization for enum kflag can be achieved by clearing the kflag bit. For enum64, the type is replaced with an union of integer member types and the integer member size must be smaller than enum64 size. If such an integer type cannot be found, a new type is created and used for union members. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220607062636.3721375-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/lib/bpf/btf.h | 3 ++- tools/lib/bpf/libbpf.c | 56 ++++++++++++++++++++++++++++++++++++++--- tools/lib/bpf/libbpf_internal.h | 2 ++ 3 files changed, 56 insertions(+), 5 deletions(-) commit d90ec262b35bb6d30ae621dc15889638ba4c02be Author: Yonghong Song Date: Mon Jun 6 23:26:31 2022 -0700 libbpf: Add enum64 support for btf_dump Add enum64 btf dumping support. For long long and unsigned long long dump, suffixes 'LL' and 'ULL' are added to avoid compilation errors in some cases. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220607062631.3720526-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/lib/bpf/btf.h | 5 ++ tools/lib/bpf/btf_dump.c | 137 +++++++++++++++++++++++++++++++++++------------ 2 files changed, 108 insertions(+), 34 deletions(-) commit 2ef2026349cf388b25601a094e99542ed536fde3 Author: Yonghong Song Date: Mon Jun 6 23:26:26 2022 -0700 libbpf: Add enum64 deduplication support Add enum64 deduplication support. BTF_KIND_ENUM64 handling is very similar to BTF_KIND_ENUM. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220607062626.3720166-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/lib/bpf/btf.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++-- tools/lib/bpf/btf.h | 5 +++++ 2 files changed, 65 insertions(+), 2 deletions(-) commit dffbbdc2d9889670c30e07d05fc0dd712e8ad430 Author: Yonghong Song Date: Mon Jun 6 23:26:21 2022 -0700 libbpf: Add enum64 parsing and new enum64 public API Add enum64 parsing support and two new enum64 public APIs: btf__add_enum64 btf__add_enum64_value Also add support of signedness for BTF_KIND_ENUM. The BTF_KIND_ENUM API signatures are not changed. The signedness will be changed from unsigned to signed if btf__add_enum_value() finds any negative values. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220607062621.3719391-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/lib/bpf/btf.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++ tools/lib/bpf/btf.h | 12 ++++++ tools/lib/bpf/libbpf.map | 2 + 3 files changed, 117 insertions(+) commit 8479aa752226bea40b24db277f1f10ab2726f8bb Author: Yonghong Song Date: Mon Jun 6 23:26:15 2022 -0700 libbpf: Refactor btf__add_enum() for future code sharing Refactor btf__add_enum() function to create a separate function btf_add_enum_common() so later the common function can be used to add enum64 btf type. There is no functionality change for this patch. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220607062615.3718063-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/lib/bpf/btf.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) commit b58b2b3a31228bd9aaed9b96e9452dafd0d46024 Author: Yonghong Song Date: Mon Jun 6 23:26:10 2022 -0700 libbpf: Fix an error in 64bit relocation value computation Currently, the 64bit relocation value in the instruction is computed as follows: __u64 imm = insn[0].imm + ((__u64)insn[1].imm << 32) Suppose insn[0].imm = -1 (0xffffffff) and insn[1].imm = 1. With the above computation, insn[0].imm will first sign-extend to 64bit -1 (0xffffffffFFFFFFFF) and then add 0x1FFFFFFFF, producing incorrect value 0xFFFFFFFF. The correct value should be 0x1FFFFFFFF. Changing insn[0].imm to __u32 first will prevent 64bit sign extension and fix the issue. Merging high and low 32bit values also changed from '+' to '|' to be consistent with other similar occurences in kernel and libbpf. Acked-by: Andrii Nakryiko Acked-by: Dave Marchevsky Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220607062610.3717378-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/lib/bpf/relo_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 776281652ddcd98bb292335ea3634da341c849b4 Author: Yonghong Song Date: Mon Jun 6 23:26:05 2022 -0700 libbpf: Permit 64bit relocation value Currently, the libbpf limits the relocation value to be 32bit since all current relocations have such a limit. But with BTF_KIND_ENUM64 support, the enum value could be 64bit. So let us permit 64bit relocation value in libbpf. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220607062605.3716779-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/lib/bpf/relo_core.c | 49 ++++++++++++++++++++++++++--------------------- tools/lib/bpf/relo_core.h | 4 ++-- 2 files changed, 29 insertions(+), 24 deletions(-) commit 6089fb325cf737eeb2c4d236c94697112ca860da Author: Yonghong Song Date: Mon Jun 6 23:26:00 2022 -0700 bpf: Add btf enum64 support Currently, BTF only supports upto 32bit enum value with BTF_KIND_ENUM. But in kernel, some enum indeed has 64bit values, e.g., in uapi bpf.h, we have enum { BPF_F_INDEX_MASK = 0xffffffffULL, BPF_F_CURRENT_CPU = BPF_F_INDEX_MASK, BPF_F_CTXLEN_MASK = (0xfffffULL << 32), }; In this case, BTF_KIND_ENUM will encode the value of BPF_F_CTXLEN_MASK as 0, which certainly is incorrect. This patch added a new btf kind, BTF_KIND_ENUM64, which permits 64bit value to cover the above use case. The BTF_KIND_ENUM64 has the following three fields followed by the common type: struct bpf_enum64 { __u32 nume_off; __u32 val_lo32; __u32 val_hi32; }; Currently, btf type section has an alignment of 4 as all element types are u32. Representing the value with __u64 will introduce a pad for bpf_enum64 and may also introduce misalignment for the 64bit value. Hence, two members of val_hi32 and val_lo32 are chosen to avoid these issues. The kflag is also introduced for BTF_KIND_ENUM and BTF_KIND_ENUM64 to indicate whether the value is signed or unsigned. The kflag intends to provide consistent output of BTF C fortmat with the original source code. For example, the original BTF_KIND_ENUM bit value is 0xffffffff. The format C has two choices, printing out 0xffffffff or -1 and current libbpf prints out as unsigned value. But if the signedness is preserved in btf, the value can be printed the same as the original source code. The kflag value 0 means unsigned values, which is consistent to the default by libbpf and should also cover most cases as well. The new BTF_KIND_ENUM64 is intended to support the enum value represented as 64bit value. But it can represent all BTF_KIND_ENUM values as well. The compiler ([1]) and pahole will generate BTF_KIND_ENUM64 only if the value has to be represented with 64 bits. In addition, a static inline function btf_kind_core_compat() is introduced which will be used later when libbpf relo_core.c changed. Here the kernel shares the same relo_core.c with libbpf. [1] https://reviews.llvm.org/D124641 Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20220607062600.3716578-1-yhs@fb.com Signed-off-by: Alexei Starovoitov include/linux/btf.h | 28 ++++++++ include/uapi/linux/btf.h | 17 ++++- kernel/bpf/btf.c | 142 +++++++++++++++++++++++++++++++++++++---- kernel/bpf/verifier.c | 2 +- tools/include/uapi/linux/btf.h | 17 ++++- 5 files changed, 185 insertions(+), 21 deletions(-) commit 5f69a6577bc33d8f6d6bbe02bccdeb357b287f56 Author: Chen Wandun Date: Thu May 26 20:26:56 2022 +0800 psi: dont alloc memory for psi by default Memory about struct psi_group is allocated by default for each cgroup even if psi_disabled is true, in this case, these allocated memory is waste, so alloc memory for struct psi_group only when psi_disabled is false. Signed-off-by: Chen Wandun Acked-by: Johannes Weiner Signed-off-by: Tejun Heo include/linux/cgroup-defs.h | 2 +- include/linux/cgroup.h | 2 +- kernel/cgroup/cgroup.c | 8 ++++---- kernel/sched/psi.c | 19 +++++++++++++------ 4 files changed, 19 insertions(+), 12 deletions(-) commit 560e613352b4a65c5c397e689a997fb04bd5f928 Author: Colin Ian King Date: Thu Dec 30 18:59:00 2021 +0300 fs/ntfs3: Remove redundant assignment to variable frame Variable frame is assigned a value that is never read. The assignment is redundant and can be removed. Cleans up the clang-scan build warning: fs/ntfs3/file.c:995:3: warning: Value stored to 'frame' is never read [deadcode.DeadStores] frame = pos >> frame_bits; Signed-off-by: Colin Ian King Signed-off-by: Konstantin Komarov fs/ntfs3/file.c | 1 - 1 file changed, 1 deletion(-) commit 548744f84456946181ed6dc0ac6be8267f167d28 Author: Christophe JAILLET Date: Thu Dec 23 15:20:00 2021 +0300 fs/ntfs3: Remove a useless test 'new_free' has just been allocated by kmalloc() and is known to be not NULL. So this pointer can't be equal to a previous memory allocation. Signed-off-by: Christophe JAILLET Signed-off-by: Konstantin Komarov fs/ntfs3/bitmap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5552de7b928dc56de30eb74bcd7d439f49d0fe9d Merge: b31455e96f00 b1edf7f159a6 Author: Paolo Bonzini Date: Tue Jun 7 12:28:53 2022 -0400 Merge tag 'kvm-s390-next-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: pvdump and selftest improvements - add an interface to provide a hypervisor dump for secure guests - improve selftests to show tests commit 68163cd12ca5d8af3c2c7fa4cd009e6ea919232d Author: Rex-BC Chen Date: Mon May 16 19:11:30 2022 +0800 arm64: dts: mediatek: Add mediatek,cci property for MT8183 cpufreq Add mediatek,cci property to support MediaTek CCI feature. Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220516111130.13325-4-rex-bc.chen@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8183.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit f3ceebeb0c9bf2ceba87faa6bb77b6bee1f01d99 Author: Rex-BC Chen Date: Mon May 16 19:11:29 2022 +0800 arm64: dts: mediatek: Add MediaTek CCI node for MT8183 Add MediaTek CCI devfreq node for MT8183. Signed-off-by: Andrew-sh.Cheng Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220516111130.13325-3-rex-bc.chen@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 4 ++++ arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 4 ++++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 8 ++++++++ 3 files changed, 16 insertions(+) commit 95eacb24f3739df87690e0c96982b88a6b2dc2bf Author: Rex-BC Chen Date: Mon May 16 19:11:28 2022 +0800 arm64: dts: mediatek: Add opp table and clock property for MT8183 cpufreq - Add cpufreq opp table. - Add MediaTek cci opp table. - Add property of opp table and clock fro cpufreq. Signed-off-by: Andrew-sh.Cheng Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220516111130.13325-2-rex-bc.chen@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 32 ++++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 270 ++++++++++++++++++++++++++++ 2 files changed, 302 insertions(+) commit e0c5341acdbeb5c900f3204cf279153c1c8b7433 Author: Felix Fietkau Date: Mon Mar 14 09:44:05 2022 +0100 ARM: dts: add clock support for Airoha EN7523 This driver only registers fixed rate clocks, since the clocks are fully initialized by the boot loader and should not be changed later, according to Airoha. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20220314084409.84394-4-nbd@nbd.name Signed-off-by: Matthias Brugger arch/arm/boot/dts/en7523.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1c9faace10172e965012e0fb2d2061f95f8ff0e3 Author: Rex-BC Chen Date: Wed May 4 19:55:01 2022 +0800 soc: mediatek: devapc: Add support for MT8186 Add devapc data and compatible to support MT8186 devapc. Signed-off-by: Runyang Chen Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Chun-Kuang Hu Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220504115501.3490-4-rex-bc.chen@mediatek.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-devapc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2cb41ed0d73d8b15b30c917392d7e97c22866818 Author: Rex-BC Chen Date: Wed May 4 19:55:00 2022 +0800 soc: mediatek: devapc: Separate register offsets from mtk_devapc_data The register offsets is the same between MT6779 and MT8186. To reuse the register offsets, we move these register offsets to another structure "mtk_devapc_regs_ofs". Signed-off-by: Rex-BC Chen Reviewed-by: Chun-Kuang Hu Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20220504115501.3490-3-rex-bc.chen@mediatek.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-devapc.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit 37e9a1071b72c995c61df1c65102bb47642e50ec Author: Rex-BC Chen Date: Wed May 4 19:54:59 2022 +0800 dt-bindings: soc: mediatek: devapc: Add bindings for MT8186 Add the dt-binding to support MT8186 devapc. Signed-off-by: Rex-BC Chen Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220504115501.3490-2-rex-bc.chen@mediatek.com Signed-off-by: Matthias Brugger Documentation/devicetree/bindings/soc/mediatek/devapc.yaml | 1 + 1 file changed, 1 insertion(+) commit f1a95a356daa9790151a5a60535fcdbfc0ca2e9c Author: AngeloGioacchino Del Regno Date: Tue May 17 12:47:12 2022 +0200 soc: mediatek: pwrap: Compress of_device_id entries to one line Compress each entry of the of_device_id tables in this driver to one line instead of three, as they fit just fine in a single line. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220517104712.24579-6-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pmic-wrap.c | 91 ++++++++++-------------------------- 1 file changed, 25 insertions(+), 66 deletions(-) commit 43406cebf06b3519d10c665e6e0228be197b534c Author: AngeloGioacchino Del Regno Date: Tue May 17 12:47:11 2022 +0200 soc: mediatek: pwrap: Move IO pointers to new structure In the PMIC Wrapper driver each PMIC has its own regmap configuration and its own pwrap_{read/write}() callbacks, but it's just about either a 32 bits vs 16 bits register, and only one of them uses 32bits regs: this means that the same ops are assigned over and over again to all of the supported PMICs. It is therefore possible to avoid reassigning the same things over and over, reducing the amount of lines, without any impact on human readability of this driver: add a pwrap_slv_regops structure and move the callbacks and regmap_config pointer in there instead. This allows to assign just one pointer to that shared data in the per-pmic struct pwrap_slv_type. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220517104712.24579-5-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pmic-wrap.c | 61 +++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 29 deletions(-) commit 56a468b5f6454aae0e32e4c6ead1abde5cc4dd23 Author: AngeloGioacchino Del Regno Date: Tue May 17 12:47:10 2022 +0200 soc: mediatek: pwrap: Check return value of platform_get_irq() Check for the return value of platform_get_irq(): if no interrupt is specified, it wouldn't make sense to call devm_request_irq(). Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220517104712.24579-4-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pmic-wrap.c | 5 +++++ 1 file changed, 5 insertions(+) commit e84187fa6f55caa897ee7d408046907a65e88a78 Author: AngeloGioacchino Del Regno Date: Tue May 17 12:47:09 2022 +0200 soc: mediatek: pwrap: Switch to devm_platform_ioremap_resource_byname() In order to simplify ioremapping resources, instead of calling platform_get_resource_byname() and then devm_ioremap_resource(), simply call devm_platform_ioremap_resource_byname(). Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220517104712.24579-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pmic-wrap.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 18c7deca2b812537aa4d928900e208710f1300aa Author: AngeloGioacchino Del Regno Date: Tue May 17 12:47:08 2022 +0200 soc: mediatek: pwrap: Use readx_poll_timeout() instead of custom function Function pwrap_wait_for_state() is a function that polls an address through a helper function, but this is the very same operation that the readx_poll_timeout macro means to do. Convert all instances of calling pwrap_wait_for_state() to instead use the read_poll_timeout macro. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220517104712.24579-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pmic-wrap.c | 60 ++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 27 deletions(-) commit 71ba950f3b1f1468afc2f793ec52644602ebaf9b Author: Biju Das Date: Tue Jun 7 13:42:31 2022 +0100 ASoC: dt-bindings: renesas,rz-ssi: Document RZ/G2UL SoC Document RZ/G2U2L SSI bindings. RZ/G2UL SSI is identical to one found on the RZ/G2L SoC. No driver changes are required as generic compatible string "renesas,rz-ssi" will be used as a fallback. While at it add a '.' at the end of dmas description for the first cell. Signed-off-by: Biju Das Acked-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20220607124231.3248-1-biju.das.jz@bp.renesas.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/renesas,rz-ssi.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a8280a5dd5a425bd33d858ac787defdbad47362d Author: Robert Marko Date: Tue Jun 7 14:47:59 2022 +0200 regulator: mp5416: remove kernel.h include Driver does not seem to utilize anything from the kernel.h, compiles and works fine for me without it. So remove kernel.h include as it pulls in a lot of unused stuff. Signed-off-by: Robert Marko Cc: christophe.jaillet@wanadoo.fr Link: https://lore.kernel.org/r/20220607124759.775133-1-robimarko@gmail.com Signed-off-by: Mark Brown drivers/regulator/mp5416.c | 1 - 1 file changed, 1 deletion(-) commit b31455e96f0005bd247d70b59428a90413de0c31 Merge: a280e358465b 85165781c5d9 Author: Paolo Bonzini Date: Tue Jun 7 12:06:39 2022 -0400 Merge branch 'kvm-5.20-early-patches' into HEAD commit a280e358465b4ac8982dc1eb2deebcb020443b7f Merge: f2906aa86338 11d39e8cc43e Author: Paolo Bonzini Date: Tue Jun 7 12:06:02 2022 -0400 Merge branch 'kvm-5.19-early-fixes' into HEAD commit aa44284960d550eb4d8614afdffebc68a432a9b4 Author: Nadav Amit Date: Mon Jun 6 11:01:23 2022 -0700 x86/mm/tlb: Avoid reading mm_tlb_gen when possible On extreme TLB shootdown storms, the mm's tlb_gen cacheline is highly contended and reading it should (arguably) be avoided as much as possible. Currently, flush_tlb_func() reads the mm's tlb_gen unconditionally, even when it is not necessary (e.g., the mm was already switched). This is wasteful. Moreover, one of the existing optimizations is to read mm's tlb_gen to see if there are additional in-flight TLB invalidations and flush the entire TLB in such a case. However, if the request's tlb_gen was already flushed, the benefit of checking the mm's tlb_gen is likely to be offset by the overhead of the check itself. Running will-it-scale with tlb_flush1_threads show a considerable benefit on 56-core Skylake (up to +24%): threads Baseline (v5.17+) +Patch 1 159960 160202 5 310808 308378 (-0.7%) 10 479110 490728 15 526771 562528 20 534495 587316 25 547462 628296 30 579616 666313 35 594134 701814 40 612288 732967 45 617517 749727 50 637476 735497 55 614363 778913 (+24%) Signed-off-by: Nadav Amit Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Acked-by: Andy Lutomirski Link: https://lkml.kernel.org/r/20220606180123.2485171-1-namit@vmware.com arch/x86/mm/tlb.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 336a2d935a99636eef1d42070e19c32ed0139fd7 Merge: e7ab03bcd37c 627a18149250 Author: Mark Brown Date: Tue Jun 7 16:10:51 2022 +0100 ASoC: ssm: Use modern ASoC DAI format terminology Merge series from Mark Brown : Trivial updates to modernise the various ssm* drivers to the new DAI clocking constants. commit e7ab03bcd37ce064377667e8b1b6495b1c504a06 Merge: efe2178d1a32 078f28fee5aa Author: Mark Brown Date: Tue Jun 7 14:58:44 2022 +0100 ASoC: SOF: AMD/Mediatek updates for 5.20 Merge series from Pierre-Louis Bossart : Small patches reviewed on SOF GitHub. commit dfa687bffc8a4a21ed929c7dececf01b8f1f52ee Author: Bjorn Andersson Date: Wed Jun 1 16:38:18 2022 -0700 drm/bridge: lt9611uxc: Cancel only driver's work During device remove care needs to be taken that no work is pending before it removes the underlying DRM bridge etc, but this can be done on the specific work rather than waiting for the flush of the system-wide workqueue. Fixes: bc6fa8676ebb ("drm/bridge/lontium-lt9611uxc: move HPD notification out of IRQ handler") Signed-off-by: Bjorn Andersson Reviewed-by: Neil Armstrong Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220601233818.1877963-1-bjorn.andersson@linaro.org drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f303c6b26cede1aa137dc3e10eee78a80cde9999 Author: Conor Dooley Date: Tue Jun 7 08:38:34 2022 +0100 MAINTAINERS: add spi to PolarFire SoC entry Add the newly introduced spi driver to the existing PolarFire SoC entry. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220607073833.2331539-3-conor.dooley@microchip.com Signed-off-by: Mark Brown MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 9ac8d17694b66d54b13e9718b25c14ca36dbebbd Author: Conor Dooley Date: Tue Jun 7 08:38:33 2022 +0100 spi: add support for microchip fpga spi controllers Add a driver for Microchip FPGA SPI controllers, specifically supporting the "hard" controllers on PolarFire SoC. Co-developed-by: Daire McNamara Signed-off-by: Daire McNamara Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20220607073833.2331539-2-conor.dooley@microchip.com Signed-off-by: Mark Brown drivers/spi/Kconfig | 9 + drivers/spi/Makefile | 1 + drivers/spi/spi-microchip-core.c | 632 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 642 insertions(+) commit c241d049122b49698d9094c7ee7a0215fbc04cfe Author: XueBing Chen Date: Wed May 25 10:32:46 2022 +0800 ARM: s3c: Use strscpy to replace strlcpy The strlcpy should not be used because it doesn't limit the source length. Preferred is strscpy. Signed-off-by: XueBing Chen Link: https://lore.kernel.org/r/3e0217ca.a1d.180f90f39c7.Coremail.chenxuebing@jari.cn Signed-off-by: Krzysztof Kozlowski arch/arm/mach-s3c/mach-mini2440.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d82a5a4aae9d0203234737caed1bf470aa317568 Author: Miaoqian Lin Date: Wed Jun 1 07:39:27 2022 +0400 drm/meson: encoder_hdmi: Fix refcount leak in meson_encoder_hdmi_init of_graph_get_remote_node() returns remote device nodepointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak. Fixes: e67f6037ae1b ("drm/meson: split out encoder from meson_dw_hdmi") Signed-off-by: Miaoqian Lin Reviewed-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20220601033927.47814-3-linmq006@gmail.com drivers/gpu/drm/meson/meson_encoder_hdmi.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 7d255ddbbf679aa47e041cbf68520fd985ed2279 Author: Miaoqian Lin Date: Wed Jun 1 07:39:26 2022 +0400 drm/meson: encoder_cvbs: Fix refcount leak in meson_encoder_cvbs_init of_graph_get_remote_node() returns remote device nodepointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak. Fixes: 318ba02cd8a8 ("drm/meson: encoder_cvbs: switch to bridge with ATTACH_NO_CONNECTOR") Signed-off-by: Miaoqian Lin Reviewed-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20220601033927.47814-2-linmq006@gmail.com drivers/gpu/drm/meson/meson_encoder_cvbs.c | 1 + 1 file changed, 1 insertion(+) commit 18697b479330508491928a0d8593ba6c005591b7 Author: Michael Straube Date: Mon Jun 6 08:40:55 2022 +0200 staging: r8188eu: remove HW_VAR_SLOT_TIME from SetHwReg8188EU() In order to get rid of the function SetHwReg8188EU() remove the HW_VAR_SLOT_TIME case from that function and move the functionality into a static function in rtw_wlan_util.c. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20220606064055.12565-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_wlan_util.c | 26 +++++++++++++++++++++++++- drivers/staging/r8188eu/hal/usb_halinit.c | 24 ------------------------ drivers/staging/r8188eu/include/hal_intf.h | 1 - 3 files changed, 25 insertions(+), 26 deletions(-) commit e2b925edc55aa79d2c72889de1d7edd11e1c06f3 Author: Steve Lemuel Date: Mon Jun 6 17:57:45 2022 +0800 staging: greybus: loopback: fix a spelling error. asynchronus -> asynchronous Signed-off-by: Steve Lemuel Link: https://lore.kernel.org/r/SYBP282MB347864E247D2EC70BF46F9A3A0A29@SYBP282MB3478.AUSP282.PROD.OUTLOOK.COM Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e9c7546b2be9ac4d0881e23c2c30371f8d92cd9 Author: Daniel Watson Date: Mon Jun 6 23:11:13 2022 -0700 staging: r8188eu: fix declaration to match 'foo *bar' put '*' next to variable to match kernel style from checkpatch Signed-off-by: Daniel Watson Link: https://lore.kernel.org/r/20220607061113.32633-1-ozzloy@challenge-bot.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/rtw_io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9369fd316cf3002642295250b6a52c4554aa74c Author: Rob Herring Date: Mon Jun 6 13:43:09 2022 -0500 regulator: dt-bindings: Convert pwm-regulator to DT schema Convert the pwm-regulator binding to DT schema format. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220606184310.1057797-1-robh@kernel.org Signed-off-by: Mark Brown .../bindings/regulator/pwm-regulator.txt | 92 --------------- .../bindings/regulator/pwm-regulator.yaml | 126 +++++++++++++++++++++ 2 files changed, 126 insertions(+), 92 deletions(-) commit efe2178d1a32492f99e7f1f2568eea5c88a85729 Author: Miaoqian Lin Date: Fri Jun 3 16:42:41 2022 +0400 ASoC: mediatek: mt8173-rt5650: Fix refcount leak in mt8173_rt5650_dev_probe of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Fix refcount leak in some error paths. Fixes: 0f83f9296d5c ("ASoC: mediatek: Add machine driver for ALC5650 codec") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220603124243.31358-1-linmq006@gmail.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8173/mt8173-rt5650.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit e6f08af6340eaf88e9eeff71bd4533eee9a04119 Author: Uwe Kleine-König Date: Sun Jun 5 17:35:37 2022 +0200 ASoC: simple-card-utils: Make asoc_simple_clean_reference() return void asoc_simple_clean_reference() returns zero unconditionally. Letting it return void instead makes it easier to see in the caller that there is no error to handle. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220605153537.26591-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 2 +- sound/soc/generic/simple-card-utils.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 69c8027c5ff43d68449fda4510a8cce70e8578b0 Author: Mauro Carvalho Chehab Date: Mon Jun 6 16:25:44 2022 +0100 ASoC: wm8731: update wlf,wm8731.yaml reference Changeset 0e336eeaf467 ("ASoC: wm8731: Convert DT bindings to YAML format") renamed: Documentation/devicetree/bindings/sound/wm8731.txt to: Documentation/devicetree/bindings/sound/wlf,wm8731.yaml. Update its cross-reference accordingly. Fixes: 0e336eeaf467 ("ASoC: wm8731: Convert DT bindings to YAML format") Signed-off-by: Mauro Carvalho Chehab Acked-by: Rob Herring Link: https://lore.kernel.org/r/e56e54fe0ebb1b6e8dd2e245c398190016eb0a34.1654529011.git.mchehab@kernel.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/atmel-sam9x5-wm8731-audio.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa0d5f095093610e7274591d41a28381f60467a8 Author: Uwe Kleine-König Date: Sun Jun 5 17:39:04 2022 +0200 ASoC: Intel: broadwell: Make broadwell_disable_jack() return void broadwell_disable_jack() returns zero unconditionally. Letting it return void instead makes it easier to see in the callers that there is no error to handle. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220605153904.26921-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown sound/soc/intel/boards/broadwell.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 7ede9c4c1654f00360b966c58a2209feab049cbc Merge: 52970da262e0 4dc6737cfe88 Author: Mark Brown Date: Tue Jun 7 11:54:03 2022 +0100 Add Machine driver support for nau8825, max98560 and rt5682s, rt1019 Merge series from V sujith kumar Reddy : Add support for some new AMD machines. commit 52970da262e007574e683ec3983257e39f086e3e Merge: 2947683c534e fb68cb963bb7 Author: Mark Brown Date: Tue Jun 7 11:54:01 2022 +0100 ASoC: Drop some i2c noop remove callbacks Merge series from Uwe Kleine-König Uwe Kleine-König : From: Uwe Kleine-König Hello, I intended to send this after -rc1 was cut, but found a few spare minutes to prepare this series. All four patches were sent already before based on v5.18, but there were some conflicting changes added in the merge window. This series contains the four patches on top of current linus/master and so bases on a tree including the conflicting changes. Expecting no more sound changes in this merge window, this should apply cleanly on top of -rc1. Best regards Uwe Uwe Kleine-König (4): ASoC: ak4642: Drop no-op remove function ASoC: da7219: Drop no-op remove function ASoC: lm49453: Drop no-op remove function ASoC: da732x: Drop no-op remove function sound/soc/codecs/ak4613.c | 6 ------ sound/soc/codecs/da7219.c | 6 ------ sound/soc/codecs/da732x.c | 6 ------ sound/soc/codecs/lm49453.c | 6 ------ 4 files changed, 24 deletions(-) base-commit: 50fd82b3a9a9335df5d50c7ddcb81c81d358c4fc -- 2.36.1 commit 2947683c534e45090b669bda06123201ff950c49 Merge: 88406aa6dbbb fed3d9297a9b Author: Mark Brown Date: Tue Jun 7 11:53:44 2022 +0100 Switch to use internal PLL for iMCLK Merge series from Hui Wang : Taking your advice and try to enable internal PLL to get a more accurate sample rate. And I also changed the fsl-asoc-card.c to support the nau8822 codec, now the sound quality is pretty good on my imx6sx EVB. commit 88406aa6dbbbb3a1752b130f14b47218a2251f3a Merge: ed05d691b921 7188b28f6686 Author: Mark Brown Date: Tue Jun 7 11:52:12 2022 +0100 ASoC: trivial changes for cppcheck warnings Merge series from Pierre-Louis Bossart : This can probably wait for the next merge window, I found a number of cppcheck warnings that I didn't see in my last checks. The irony is that the only really important issue found by cppcheck was on one of my previous DPCM changes (submitted separately as a fix). commit ed05d691b921bff37e2397f7a41507b858950020 Merge: 9f2d5e1e5d64 7ee0910d0316 Author: Mark Brown Date: Tue Jun 7 11:52:10 2022 +0100 OPE support on Tegra210 and later Merge series from Sameer Pujar : This series adds support for Output Prcoessing Module (OPE) module on Tegra210 and later generations of SoCs. OPE is a client of AHUB and it has sub blocks of PEQ (Parametric Equalizer) and MBDRC (Multi Band Dynamic Range Compressor) for data processing. An ASoC component is registered for OPE, which includes PEQ and MBDRC functions as well. This can be plugged in audio path using ALSA mixer controls. The series adds necessary binding documentaion, driver and DT binding patches to enable OPE module on Jetson platforms. commit 9f2d5e1e5d64bd595fb724814eb58b8f5c0c97e9 Merge: 28223889603a 6b5b0d6f36dd Author: Mark Brown Date: Tue Jun 7 11:52:09 2022 +0100 ASoC: Intel: avs: Machine boards and HDA codec support Merge series from Cezary Rojewski From there on is a range of boards appended. All of them follow the same: This series focuses on populating boards/ subdirectory with supported configurations by the avs-driver. Note: it is independent of recently provided "Driver code and PCM operations" series [1], that is, code found here should not collide with it. Series starts with a small change that adds a helper to sound pcm header, allowing for retrieving string naming a direction without the need of substream pointer. Said helper is used by codec driver code that follows it but I believe it's generic and helpful enough that it can be called an independent addition to the sound core. Code for generic HD-Audio codec driver follows. It is a ASoC wrapper for existing HD-Audio codec code found in sound/pci/hda/. There is basically no custom logic involved up to the point that driver follows HDA_DEV_LEGACY convention, rather than the HDA_DEV_ASOC one. Commit message for the given patch iterates on this and explains crucial parts of the implementation. From there on is a range of boards appended. All of them follow the same scheme: - define avs_create_dai_link() so DAI-LINKs can be created dynamically, based on the link_mask (I2S) or the number of entries in the ->pcm_list_head list (HDA) - define avs_create_dapm_routes() so DAPM routes can be created dynamically, same rules as above apply - define probe() function that creates new ASoC card, assign all required operations and resources along with calling the two above Changes in v2: - 'link_mask' usage replaced with 'i2s_link_mask' as requested by Pierre - 'ssp_test' board renamed to 'i2s_test' to match naming convention used for other i2s machine boards - enriched commit message and Kconfig for the 'HD-Audio codec driver' patch as requested by Kai [1]: https://lore.kernel.org/all/20220426172346.3508411-1-cezary.rojewski@intel.com/ Amadeusz Sławiński (1): ASoC: Intel: avs: Add max98373 machine board Cezary Rojewski (13): ALSA: Add snd_pcm_direction_name() helper ASoC: codecs: Add HD-Audio codec driver ASoC: Intel: avs: Add HDAudio machine board ASoC: Intel: avs: Add DMIC machine board ASoC: Intel: avs: Add I2S-test machine board ASoC: Intel: avs: Add rt274 machine board ASoC: Intel: avs: Add rt286 machine board ASoC: Intel: avs: Add rt298 machine board ASoC: Intel: avs: Add rt5682 machine board ASoC: Intel: avs: Add nau8825 machine board ASoC: Intel: avs: Add ssm4567 machine board ASoC: Intel: avs: Add max98357a machine board ASoC: Intel: avs: Add da7219 machine board include/sound/pcm.h | 19 +- sound/soc/codecs/Kconfig | 10 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/hda-dai.c | 102 +++++++ sound/soc/codecs/hda.c | 395 +++++++++++++++++++++++++ sound/soc/codecs/hda.h | 19 ++ sound/soc/intel/Kconfig | 3 + sound/soc/intel/avs/Makefile | 3 + sound/soc/intel/avs/boards/Kconfig | 121 ++++++++ sound/soc/intel/avs/boards/Makefile | 27 ++ sound/soc/intel/avs/boards/da7219.c | 282 ++++++++++++++++++ sound/soc/intel/avs/boards/dmic.c | 93 ++++++ sound/soc/intel/avs/boards/hdaudio.c | 294 ++++++++++++++++++ sound/soc/intel/avs/boards/i2s_test.c | 180 +++++++++++ sound/soc/intel/avs/boards/max98357a.c | 154 ++++++++++ sound/soc/intel/avs/boards/max98373.c | 239 +++++++++++++++ sound/soc/intel/avs/boards/nau8825.c | 353 ++++++++++++++++++++++ sound/soc/intel/avs/boards/rt274.c | 310 +++++++++++++++++++ sound/soc/intel/avs/boards/rt286.c | 281 ++++++++++++++++++ sound/soc/intel/avs/boards/rt298.c | 281 ++++++++++++++++++ sound/soc/intel/avs/boards/rt5682.c | 340 +++++++++++++++++++++ sound/soc/intel/avs/boards/ssm4567.c | 271 +++++++++++++++++ 22 files changed, 3775 insertions(+), 4 deletions(-) create mode 100644 sound/soc/codecs/hda-dai.c create mode 100644 sound/soc/codecs/hda.c create mode 100644 sound/soc/codecs/hda.h create mode 100644 sound/soc/intel/avs/boards/Kconfig create mode 100644 sound/soc/intel/avs/boards/Makefile create mode 100644 sound/soc/intel/avs/boards/da7219.c create mode 100644 sound/soc/intel/avs/boards/dmic.c create mode 100644 sound/soc/intel/avs/boards/hdaudio.c create mode 100644 sound/soc/intel/avs/boards/i2s_test.c create mode 100644 sound/soc/intel/avs/boards/max98357a.c create mode 100644 sound/soc/intel/avs/boards/max98373.c create mode 100644 sound/soc/intel/avs/boards/nau8825.c create mode 100644 sound/soc/intel/avs/boards/rt274.c create mode 100644 sound/soc/intel/avs/boards/rt286.c create mode 100644 sound/soc/intel/avs/boards/rt298.c create mode 100644 sound/soc/intel/avs/boards/rt5682.c create mode 100644 sound/soc/intel/avs/boards/ssm4567.c -- 2.25.1 commit 28223889603a0a933d8a2339af3eb318f676320b Merge: a8b1b9ce5d48 8208dd75eb46 Author: Mark Brown Date: Tue Jun 7 11:52:07 2022 +0100 ASoC: Intel: soc-acpi and machine driver updates Merge series from Pierre-Louis Bossart : Small updates to add initial tables for MeteorLake, SoundWire machine driver support for tests without HDMI and RT1019 for consistency on Chromebooks. commit a8b1b9ce5d48bada80868d0ba8d1ee00157f01ee Merge: ac8a2ea48001 97076475e2fd Author: Mark Brown Date: Tue Jun 7 11:52:06 2022 +0100 ALSA: hda: cirrus: Add initial DSP support and firmware loading Merge series from Vitaly Rodionov : The CS35L41 Amplifier contains a DSP, capable of running firmware. The firmware can run algorithms such as Speaker Protection, to ensure that playback at high gains do not harm the speakers. This exports some interfaces to allow more use of this DSP by the HDA version of the driver. commit ba36c5b7ac9399a8dc521c44ece72db43d192f9b Merge: 12de1ebd2ae3 b160f7270e6d Author: Paolo Abeni Date: Tue Jun 7 12:51:44 2022 +0200 Merge branch 'reorganize-the-code-of-the-enum-skb_drop_reason' Menglong Dong says: ==================== reorganize the code of the enum skb_drop_reason The code of skb_drop_reason is a little wild, let's reorganize them. Three things and three patches: 1) Move the enum 'skb_drop_reason' and related function to the standalone header 'dropreason.h', as Jakub Kicinski suggested, as the skb drop reasons are getting more and more. 2) use auto-generation to generate the source file that convert enum skb_drop_reason to string. 3) make the comment of skb drop reasons kernel-doc style. Changes since v3: 3/3: remove some useless comment (Jakub Kicinski) Changes since v2: 2/3: - add new line in the end of .gitignore - fix awk warning by make '\;' to ';', as ';' is not need to be escaped - export 'drop_reasons' in skbuff.c Changes since v1: 1/3: move dropreason.h from include/linux/ to include/net/ (Jakub Kicinski) 2/3: generate source file instead of header file for drop reasons string array (Jakub Kicinski) 3/3: use inline comment (Jakub Kicinski) ==================== Link: https://lore.kernel.org/r/20220606022436.331005-1-imagedong@tencent.com Signed-off-by: Paolo Abeni commit b160f7270e6df0f4ccadcf6750696b380eb3b811 Author: Menglong Dong Date: Mon Jun 6 10:24:36 2022 +0800 net: dropreason: reformat the comment fo skb drop reasons To make the code clear, reformat the comment in dropreason.h to k-doc style. Now, the comment can pass the check of kernel-doc without warnning: $ ./scripts/kernel-doc -v -none include/linux/dropreason.h include/linux/dropreason.h:7: info: Scanning doc for enum skb_drop_reason Signed-off-by: Menglong Dong Signed-off-by: Paolo Abeni include/net/dropreason.h | 382 ++++++++++++++++++++++++++++------------------- 1 file changed, 226 insertions(+), 156 deletions(-) commit ec43908dd556b2292f028c6e412261689405ba6e Author: Menglong Dong Date: Mon Jun 6 10:24:35 2022 +0800 net: skb: use auto-generation to convert skb drop reason to string It is annoying to add new skb drop reasons to 'enum skb_drop_reason' and TRACE_SKB_DROP_REASON in trace/event/skb.h, and it's easy to forget to add the new reasons we added to TRACE_SKB_DROP_REASON. TRACE_SKB_DROP_REASON is used to convert drop reason of type number to string. For now, the string we passed to user space is exactly the same as the name in 'enum skb_drop_reason' with a 'SKB_DROP_REASON_' prefix. Therefore, we can use 'auto-generation' to generate these drop reasons to string at build time. The new source 'dropreason_str.c' will be auto generated during build time, which contains the string array 'const char * const drop_reasons[]'. Signed-off-by: Menglong Dong Signed-off-by: Paolo Abeni include/net/dropreason.h | 2 ++ include/trace/events/skb.h | 89 +--------------------------------------------- net/core/.gitignore | 1 + net/core/Makefile | 23 +++++++++++- net/core/drop_monitor.c | 13 ------- net/core/skbuff.c | 3 ++ 6 files changed, 29 insertions(+), 102 deletions(-) commit ff8372a467fa28752610f57a6512c5365413faa2 Author: Menglong Dong Date: Mon Jun 6 10:24:34 2022 +0800 net: skb: move enum skb_drop_reason to standalone header file As the skb drop reasons are getting more and more, move the enum 'skb_drop_reason' and related function to the standalone header 'dropreason.h', as Jakub Kicinski suggested. Signed-off-by: Menglong Dong Signed-off-by: Paolo Abeni include/linux/skbuff.h | 179 +-------------------------------------------- include/net/dropreason.h | 184 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 185 insertions(+), 178 deletions(-) commit 6ff40f00e5a4db029c05d747ea50c3d2a5a6ebd9 Merge: 8d0b512844fd 6ce7061a75f7 Author: Mark Brown Date: Tue Jun 7 11:42:55 2022 +0100 spi: stm32-qspi: Remove unused parameters Merge series from patrice.chotard@foss.st.com : This series cleans up spi-stm32-qspi driver by removing unused parameters commit 158e71bb69e368b8b33e8b7c4ac8c111da0c1ae2 Author: Aharon Landau Date: Sun May 15 07:19:53 2022 +0300 RDMA/mlx5: Add a umr recovery flow When a UMR fails, the UMR QP state changes to an error state. Therefore, all the further UMR operations will fail too. Add a recovery flow to the UMR QP, and repost the flushed WQEs. Link: https://lore.kernel.org/r/6cc24816cca049bd8541317f5e41d3ac659445d3.1652588303.git.leonro@nvidia.com Signed-off-by: Aharon Landau Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/cq.c | 4 ++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 12 +++++- drivers/infiniband/hw/mlx5/umr.c | 78 +++++++++++++++++++++++++++++++----- 3 files changed, 83 insertions(+), 11 deletions(-) commit 70e76f7344e59266e8a97cfe64d0d7c081652b35 Author: Johan Jonker Date: Fri Jun 3 16:46:27 2022 +0200 ARM: dts: rockchip: enable nfc node in rk3066a-mk808.dts Enable nfc node in rk3066a-mk808.dts Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20220603144627.23269-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3066a-mk808.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 4bcee17c7f28e2c63e9e13bb037101510777e7a9 Author: Michael Riesch Date: Fri Apr 22 09:28:37 2022 +0200 arm64: dts: rockchip: enable vop2 and hdmi tx on rock-3a Enable the RK356x Video Output Processor (VOP) 2 on the Radxa ROCK3 Model A. Signed-off-by: Michael Riesch Reported-by: kernel test robot Link: https://lore.kernel.org/r/20220310210352.451136-4-michael.riesch@wolfvision.net Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20220422072841.2206452-21-s.hauer@pengutronix.de Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 47 +++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 0c096d6ed84248a771f34bb626618c15769f431e Author: Michael Riesch Date: Fri Apr 22 09:28:36 2022 +0200 arm64: dts: rockchip: enable vop2 and hdmi tx on quartz64a Enable the RK356x Video Output Processor (VOP) 2 on the Pine64 Quartz64 Model A. Signed-off-by: Michael Riesch Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20220422072841.2206452-20-s.hauer@pengutronix.de Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 991b3d12349293730f523a5a75200335fcd26d3e Author: Sascha Hauer Date: Fri Apr 22 09:28:35 2022 +0200 arm64: dts: rockchip: rk3568-evb: Enable VOP2 and hdmi This enabled the VOP2 display controller along with hdmi and the required port routes which is enough to get a picture out of the hdmi port of the board. Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20220422072841.2206452-19-s.hauer@pengutronix.de Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit d689e5709b8a9d502453d528aa37139dcc3b245a Author: Sascha Hauer Date: Fri Apr 22 09:28:34 2022 +0200 arm64: dts: rockchip: rk356x: Add HDMI nodes Add support for the HDMI port found on RK3568. Signed-off-by: Sascha Hauer Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20220422072841.2206452-18-s.hauer@pengutronix.de Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk356x.dtsi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 9d6c6d978f97fab2add458bb92d4de11298d2561 Author: Sascha Hauer Date: Fri Apr 22 09:28:33 2022 +0200 arm64: dts: rockchip: rk356x: Add VOP2 nodes The VOP2 is the display output controller on the RK3568. Add the node for it to the dtsi file along with the required display-subsystem node and the iommu node. Signed-off-by: Sascha Hauer Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220422072841.2206452-17-s.hauer@pengutronix.de Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3566.dtsi | 4 +++ arch/arm64/boot/dts/rockchip/rk3568.dtsi | 4 +++ arch/arm64/boot/dts/rockchip/rk356x.dtsi | 51 ++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) commit b65155c786c4b3767b75b3a3df5475294e0fb3d9 Author: Peter Geis Date: Wed May 11 07:35:16 2022 -0400 arm64: dts: rockchip: add pine64 touch panel display to rockpro64 The Pine64 touch panel is a panel consisting of the Feiyang fy07024di26a30d panel with a Goodix gt911 touch screen. Add the device tree nodes to the rockpro64 to permit attaching this display to the device. Signed-off-by: Peter Geis Link: https://lore.kernel.org/r/20220511113517.4172962-4-pgwipeout@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 70 ++++++++++++++++++++-- 1 file changed, 66 insertions(+), 4 deletions(-) commit 89504897b7a91bb2a7116b2b4bb13a3ac8ca31f7 Author: Peter Geis Date: Fri Apr 29 08:38:31 2022 -0400 arm64: dts: rockchip: Enable PCIe controller on quartz64-a Add the nodes to enable the PCIe controller on the Quartz64 Model A board. Signed-off-by: Peter Geis Link: https://lore.kernel.org/r/20220429123832.2376381-6-pgwipeout@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 66b51ea7d70fcc2ede87161c413fe1db4422bdac Author: Peter Geis Date: Fri Apr 29 08:38:30 2022 -0400 arm64: dts: rockchip: Add rk3568 PCIe2x1 controller The PCIe2x1 controller is common between the rk3568 and rk3566. It is a single lane PCIe2 compliant controller. Signed-off-by: Peter Geis Link: https://lore.kernel.org/r/20220429123832.2376381-5-pgwipeout@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk356x.dtsi | 50 ++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 12de1ebd2ae3999b5454b5d6efd0c7365ce61c41 Author: Christophe JAILLET Date: Sat Jun 4 08:54:20 2022 +0200 net: altera: Replace kernel.h with the necessary inclusions When kernel.h is used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved. Replace kernel.h inclusion with the list of what is really being used. While at it, move these includes below the include guard. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/18731e4f6430100d6500d6c4732ee028a729c085.1654325651.git.christophe.jaillet@wanadoo.fr Signed-off-by: Paolo Abeni drivers/net/ethernet/altera/altera_utils.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 650126a890902a47304e9326a85b603c96f0c980 Author: Xiang wangx Date: Mon Jun 6 20:34:19 2022 +0800 RDMA/hfi1: Fix typo in comment Delete the redundant word 'and'. Link: https://lore.kernel.org/r/20220606123419.29109-1-wangxiang@cdjrlc.com Signed-off-by: Xiang wangx Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hfi1/pio_copy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fa4a6d20c168fa83810f03b1c43e0cec69bbdbc Author: Xiang wangx Date: Sat Jun 4 12:09:17 2022 +0800 WAN: Fix syntax errors in comments Delete the redundant word 'the'. Signed-off-by: Xiang wangx Link: https://lore.kernel.org/r/20220604040917.8926-1-wangxiang@cdjrlc.com Signed-off-by: Paolo Abeni drivers/net/wan/farsync.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b181a1e8b3ffc0b4d723245765ead3ac5f32e308 Author: Peter Geis Date: Wed May 11 11:01:17 2022 -0400 arm64: dts: rockchip: enable sfc controller on Quartz64 Model A Add the sfc controller binding for the Quartz64 Model A. This is not populated by default, so leave it disabled. Signed-off-by: Peter Geis Link: https://lore.kernel.org/r/20220511150117.113070-7-pgwipeout@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 28ae8a98494f09d1d2bee2be16fc5b575dbac6ea Author: Peter Geis Date: Wed May 11 11:01:16 2022 -0400 arm64: dts: rockchip: enable sdr-104 for sdmmc on Quartz A Now that we have working io-domain support, we can enable higher date rates on the sdmmc card. Before: Timing buffered disk reads: 68 MB in 3.08 seconds = 22.07 MB/sec After: Timing buffered disk reads: 188 MB in 3.02 seconds = 62.29 MB/sec Signed-off-by: Peter Geis Link: https://lore.kernel.org/r/20220511150117.113070-6-pgwipeout@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts | 1 + 1 file changed, 1 insertion(+) commit fb4f915c44ee059c9a3916c6c5389c2cc35e2f59 Author: Peter Geis Date: Wed May 11 11:01:15 2022 -0400 arm64: dts: rockchip: add Quartz64-A fan pinctrl The Quartz64 Model A fan is bound to a single gpio. Prevent pinctrl issues in the future by binding the pinctrl assignment for the gpio. Signed-off-by: Peter Geis Link: https://lore.kernel.org/r/20220511150117.113070-5-pgwipeout@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit da1efdb2a3e8593a9428c81a531bfd8a0c3dd66e Author: Thomas Zimmermann Date: Wed Jun 1 13:25:22 2022 +0200 drm/mgag200: Store positions of I2C data and clock bits in device info The bits for accessing I2C data and clock channels varies among models. Store them in the device-info structure for consumption by the DDC code. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220601112522.5774-11-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_drv.h | 12 +++++++++++- drivers/gpu/drm/mgag200/mgag200_g200.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200eh.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200eh3.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200er.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200ev.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200ew3.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200se.c | 12 ++++++------ drivers/gpu/drm/mgag200/mgag200_g200wb.c | 2 +- drivers/gpu/drm/mgag200/mgag200_i2c.c | 27 +++------------------------ 10 files changed, 27 insertions(+), 38 deletions(-) commit d1e40d8e4b4df3f705c7898b264b2cfb60bdafc4 Author: Thomas Zimmermann Date: Wed Jun 1 13:25:21 2022 +0200 drm/mgag200: Store vidrst flag in device info Set new vidrst flag in device info for models that synchronize with external sources (i.e., BMCs). In modesetting, set the corresponding bits from the device-info flag. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220601112522.5774-10-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_drv.h | 6 +++++- drivers/gpu/drm/mgag200/mgag200_g200.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200eh.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200eh3.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200er.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200ev.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200ew3.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200se.c | 12 ++++++------ drivers/gpu/drm/mgag200/mgag200_g200wb.c | 2 +- drivers/gpu/drm/mgag200/mgag200_mode.c | 7 ++++--- drivers/gpu/drm/mgag200/mgag200_reg.h | 2 ++ 11 files changed, 24 insertions(+), 17 deletions(-) commit 98da4b99a0525c222dab7cd8e73153eaea062dc3 Author: Thomas Zimmermann Date: Wed Jun 1 13:25:20 2022 +0200 drm/mgag200: Store maximum resolution and memory bandwidth in device info The maximum resolution and memory bandwidth are model-specific limits. Both are used during display-mode validation. Store the values in struct mgag200_device_info and simplify the validation code. v2: * 'bandwith' -> 'bandwidth' in commit message Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220601112522.5774-9-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_drv.h | 15 ++++++- drivers/gpu/drm/mgag200/mgag200_g200.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200eh.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200eh3.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200er.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200ev.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200ew3.c | 2 +- drivers/gpu/drm/mgag200/mgag200_g200se.c | 44 ++++++++++++++++---- drivers/gpu/drm/mgag200/mgag200_g200wb.c | 2 +- drivers/gpu/drm/mgag200/mgag200_mode.c | 69 +++++++++---------------------- 10 files changed, 77 insertions(+), 65 deletions(-) commit 21e74bf99596d91411b6b51340c05ff92a7a4a01 Author: Thomas Zimmermann Date: Wed Jun 1 13:25:19 2022 +0200 drm/mgag200: Store HW_BUG_NO_STARTADD flag in device info Flag devices with broken handling of the startadd field in struct mgag200_device_info, instead of PCI driver data. This reduces the driver data to a simple type constant. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220601112522.5774-8-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_drv.c | 36 ++++++++++--------------------- drivers/gpu/drm/mgag200/mgag200_drv.h | 35 +++++++++++++++--------------- drivers/gpu/drm/mgag200/mgag200_g200.c | 6 +++--- drivers/gpu/drm/mgag200/mgag200_g200eh.c | 6 +++--- drivers/gpu/drm/mgag200/mgag200_g200eh3.c | 6 +++--- drivers/gpu/drm/mgag200/mgag200_g200er.c | 6 +++--- drivers/gpu/drm/mgag200/mgag200_g200ev.c | 6 +++--- drivers/gpu/drm/mgag200/mgag200_g200ew3.c | 6 +++--- drivers/gpu/drm/mgag200/mgag200_g200se.c | 23 ++++++++++++++++---- drivers/gpu/drm/mgag200/mgag200_g200wb.c | 6 +++--- drivers/gpu/drm/mgag200/mgag200_mode.c | 2 +- 11 files changed, 69 insertions(+), 69 deletions(-) commit b9a577a407d99638522ba6a0fc4fb360aacc01d0 Author: Thomas Zimmermann Date: Wed Jun 1 13:25:18 2022 +0200 drm/mgag200: Add struct mgag200_device_info While currently empty, struct mgag200_device_info, will provide static, constant information on each device model. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220601112522.5774-7-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_drv.c | 4 +++- drivers/gpu/drm/mgag200/mgag200_drv.h | 12 +++++++++++- drivers/gpu/drm/mgag200/mgag200_g200.c | 5 ++++- drivers/gpu/drm/mgag200/mgag200_g200eh.c | 5 ++++- drivers/gpu/drm/mgag200/mgag200_g200eh3.c | 5 ++++- drivers/gpu/drm/mgag200/mgag200_g200er.c | 5 ++++- drivers/gpu/drm/mgag200/mgag200_g200ev.c | 5 ++++- drivers/gpu/drm/mgag200/mgag200_g200ew3.c | 5 ++++- drivers/gpu/drm/mgag200/mgag200_g200se.c | 5 ++++- drivers/gpu/drm/mgag200/mgag200_g200wb.c | 5 ++++- 10 files changed, 46 insertions(+), 10 deletions(-) commit b62d943e9686e791dd39f8bde302fc27446cdca9 Author: Thomas Zimmermann Date: Wed Jun 1 13:25:17 2022 +0200 drm/mgag200: Implement new init logic Rework mgag200_regs_init() and mgag200_mm_init() into device preinit and init functions. The preinit function, mgag200_device_preinit(), requests and maps a device's I/O and video memory. The init function, mgag200_device_init() initializes the state of struct mga_device. Splitting the initialization between the two functions is necessary to perform per-model operations between the two calls, such as reading the unique revision ID on G200SEs. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220601112522.5774-6-tzimmermann@suse.de drivers/gpu/drm/mgag200/Makefile | 1 - drivers/gpu/drm/mgag200/mgag200_drv.c | 78 +++++++++++++++++++++++++------ drivers/gpu/drm/mgag200/mgag200_drv.h | 21 +++------ drivers/gpu/drm/mgag200/mgag200_g200.c | 7 +-- drivers/gpu/drm/mgag200/mgag200_g200eh.c | 7 +-- drivers/gpu/drm/mgag200/mgag200_g200eh3.c | 7 +-- drivers/gpu/drm/mgag200/mgag200_g200er.c | 7 +-- drivers/gpu/drm/mgag200/mgag200_g200ev.c | 7 +-- drivers/gpu/drm/mgag200/mgag200_g200ew3.c | 9 ++-- drivers/gpu/drm/mgag200/mgag200_g200se.c | 7 +-- drivers/gpu/drm/mgag200/mgag200_g200wb.c | 7 +-- drivers/gpu/drm/mgag200/mgag200_mm.c | 71 ---------------------------- drivers/gpu/drm/mgag200/mgag200_mode.c | 7 +-- 13 files changed, 88 insertions(+), 148 deletions(-) commit d45e32c9d98ce7c22a4bafe69cee58165b59533b Author: Thomas Zimmermann Date: Wed Jun 1 13:25:16 2022 +0200 drm/mgag200: Call mgag200_device_probe_vram() from per-model init Call mgag200_device_probe_vram() from each model's initializer. The G200EW3 uses a special helper with additional instructions. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220601112522.5774-5-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_drv.c | 39 +++++++++++++++++++++++++ drivers/gpu/drm/mgag200/mgag200_drv.h | 6 ++-- drivers/gpu/drm/mgag200/mgag200_g200.c | 5 +++- drivers/gpu/drm/mgag200/mgag200_g200eh.c | 5 +++- drivers/gpu/drm/mgag200/mgag200_g200eh3.c | 5 +++- drivers/gpu/drm/mgag200/mgag200_g200er.c | 5 +++- drivers/gpu/drm/mgag200/mgag200_g200ev.c | 5 +++- drivers/gpu/drm/mgag200/mgag200_g200ew3.c | 14 ++++++++- drivers/gpu/drm/mgag200/mgag200_g200se.c | 5 +++- drivers/gpu/drm/mgag200/mgag200_g200wb.c | 5 +++- drivers/gpu/drm/mgag200/mgag200_mm.c | 47 +------------------------------ drivers/gpu/drm/mgag200/mgag200_mode.c | 11 ++++++-- 12 files changed, 94 insertions(+), 58 deletions(-) commit ce19021fd99ab2c915f2b44b0df39bef75f11d18 Author: Thomas Zimmermann Date: Wed Jun 1 13:25:15 2022 +0200 drm/mgag200: Move PCI-option setup into model-specific code Split the PCI code into a single call for each model. G200 and G200SE each contain a dedicated helper with additional instructions. Noteably, the G200ER has no code for PCI setup. In a later patch, the magic numbers should be replaced by descriptive constants. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220601112522.5774-4-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_drv.c | 81 ++++++++++--------------------- drivers/gpu/drm/mgag200/mgag200_drv.h | 1 + drivers/gpu/drm/mgag200/mgag200_g200.c | 27 +++++++++++ drivers/gpu/drm/mgag200/mgag200_g200eh.c | 4 ++ drivers/gpu/drm/mgag200/mgag200_g200eh3.c | 4 ++ drivers/gpu/drm/mgag200/mgag200_g200ev.c | 4 ++ drivers/gpu/drm/mgag200/mgag200_g200ew3.c | 4 ++ drivers/gpu/drm/mgag200/mgag200_g200se.c | 26 ++++++++++ drivers/gpu/drm/mgag200/mgag200_g200wb.c | 4 ++ 9 files changed, 100 insertions(+), 55 deletions(-) commit 85397f6bc4ff13a6bc5259facb8ebebb1986d666 Author: Thomas Zimmermann Date: Wed Jun 1 13:25:14 2022 +0200 drm/mgag200: Initialize each model in separate function Add a separate initializer function for each model. Add separate devic structures for G200 and G200SE, which require additional information. Also move G200's and G200SE's helpers for reading the BIOS and version id into model-specific code. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220601112522.5774-3-tzimmermann@suse.de drivers/gpu/drm/mgag200/Makefile | 15 ++- drivers/gpu/drm/mgag200/mgag200_drv.c | 206 +++++------------------------- drivers/gpu/drm/mgag200/mgag200_drv.h | 59 +++++++-- drivers/gpu/drm/mgag200/mgag200_g200.c | 170 ++++++++++++++++++++++++ drivers/gpu/drm/mgag200/mgag200_g200eh.c | 43 +++++++ drivers/gpu/drm/mgag200/mgag200_g200eh3.c | 44 +++++++ drivers/gpu/drm/mgag200/mgag200_g200er.c | 43 +++++++ drivers/gpu/drm/mgag200/mgag200_g200ev.c | 43 +++++++ drivers/gpu/drm/mgag200/mgag200_g200ew3.c | 44 +++++++ drivers/gpu/drm/mgag200/mgag200_g200se.c | 58 +++++++++ drivers/gpu/drm/mgag200/mgag200_g200wb.c | 43 +++++++ drivers/gpu/drm/mgag200/mgag200_mode.c | 25 ++-- drivers/gpu/drm/mgag200/mgag200_pll.c | 12 +- 13 files changed, 603 insertions(+), 202 deletions(-) commit 73f54d5d968264148ef81941d9dc07e35025a120 Author: Thomas Zimmermann Date: Wed Jun 1 13:25:13 2022 +0200 drm/mgag200: Remove special case for G200SE with <2 MiB Remove old test for 32-bit vs 16-bit colors. Prefer 24-bit color depth on all devices. 32-bit color depth doesn't exist, it should have always been 24-bit. G200SE with less than 2 MiB of video memory have defaulted to 16-bit color depth, as the original revision of the G200SE had only 1.75 MiB of video memory. Using 16-bit colors enabled XGA resolution. But we now already limit these devices to VGA resolutions as the memory-bandwith test assumes 32-bit pixel size. So drop the special case from color-depth selection. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220601112522.5774-2-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_mode.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 02c96ed9e4cd1f47bfcd10296fec6b0b69d6b3c6 Author: Biju Das Date: Tue May 31 08:16:57 2022 +0100 clk: renesas: rzg2l: Fix reset status function As per RZ/G2L HW(Rev.1.10) manual, reset monitor register value 0 means reset signal is not applied (deassert state) and 1 means reset signal is applied (assert state). reset_control_status() expects a positive value if the reset line is asserted. But rzg2l_cpg_status function returns zero for asserted state. This patch fixes the issue by adding double inverted logic, so that reset_control_status returns a positive value if the reset line is asserted. Fixes: ef3c613ccd68 ("clk: renesas: Add CPG core wrapper for RZ/G2L SoC") Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20220531071657.104121-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/rzg2l-cpg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c4a99cf5d254e12295de5d9077f6594966679f4 Author: Chanho Park Date: Tue Jun 7 16:02:51 2022 +0900 arm64: dts: exynos: enable secondary ufs devices ExynosAutov9 SADK Enable ufs_1_phy and ufs_1 devices with ufs_1_fixed_vcc_reg regulator. Signed-off-by: Chanho Park Link: https://lore.kernel.org/r/20220607070251.15795-3-chanho61.park@samsung.com Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit fddb7928464d05f3d46852a801aa9ec57be5e74f Author: Chanho Park Date: Tue Jun 7 16:02:50 2022 +0900 arm64: dts: exynos: add secondary ufs devices in ExynosAutov9 Add ufs_1_phy and ufs_1 for secondary ufs hci controller and phy device. Signed-off-by: Chanho Park Link: https://lore.kernel.org/r/20220607070251.15795-2-chanho61.park@samsung.com Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 5621638cf014ff3b0afc4ac581df02772013e6df Author: Krzysztof Kozlowski Date: Sun Jun 5 18:05:06 2022 +0200 arm64: dts: fsd: use local header for pinctrl register values The DTS uses hardware register values directly in pin controller pin configuration. These are not some IDs or other abstraction layer but raw numbers used in the registers. These numbers were previously put in the bindings header to avoid code duplication and to provide some context meaning (name), but they do not fit the purpose of bindings. It is also quite confusing to use constants prefixed with Exynos for other SoC, because there is actually nothing here in common, except the actual value. Store the constants in a header next to DTS and use them instead of bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanho Park Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220605160508.134075-7-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi | 104 ++++++++++++++--------------- arch/arm64/boot/dts/tesla/fsd-pinctrl.h | 33 +++++++++ 2 files changed, 85 insertions(+), 52 deletions(-) commit 3d501682329a433843d26116fe13a4bbad963104 Author: Krzysztof Kozlowski Date: Sun Jun 5 18:05:05 2022 +0200 arm64: dts: exynos: use local header for pinctrl register values The DTS uses hardware register values directly in pin controller pin configuration. These are not some IDs or other abstraction layer but raw numbers used in the registers. These numbers were previously put in the bindings header to avoid code duplication and to provide some context meaning (name), but they do not fit the purpose of bindings. Store the constants in a header next to DTS and use them instead of bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanho Park Tested-by: Chanho Park Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220605160508.134075-6-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/exynos/exynos-pinctrl.h | 79 ++++++++++++++++++++++ arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi | 2 +- arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 6 +- arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi | 72 ++++++++++---------- arch/arm64/boot/dts/exynos/exynos7885-pinctrl.dtsi | 2 +- arch/arm64/boot/dts/exynos/exynos850-pinctrl.dtsi | 2 +- .../boot/dts/exynos/exynosautov9-pinctrl.dtsi | 2 +- 7 files changed, 122 insertions(+), 43 deletions(-) commit f7b462646e81238ff278f731384832582229feab Author: Krzysztof Kozlowski Date: Sun Jun 5 18:05:04 2022 +0200 ARM: dts: exynos: use local header for pinctrl register values The DTS uses hardware register values directly in pin controller pin configuration. These are not some IDs or other abstraction layer but raw numbers used in the registers. These numbers were previously put in the bindings header to avoid code duplication and to provide some context meaning (name), but they do not fit the purpose of bindings. Store the constants in a header next to DTS and use them instead of bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanho Park Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220605160508.134075-5-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/exynos-pinctrl.h | 55 +++++++++++++++++++++++++++++++ arch/arm/boot/dts/exynos3250-pinctrl.dtsi | 2 +- arch/arm/boot/dts/exynos4210-pinctrl.dtsi | 2 +- arch/arm/boot/dts/exynos4412-midas.dtsi | 3 +- arch/arm/boot/dts/exynos4412-p4note.dtsi | 2 +- arch/arm/boot/dts/exynos4412-pinctrl.dtsi | 2 +- arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 2 +- arch/arm/boot/dts/exynos5260-pinctrl.dtsi | 2 +- arch/arm/boot/dts/exynos5410-pinctrl.dtsi | 2 +- arch/arm/boot/dts/exynos5420-pinctrl.dtsi | 2 +- 10 files changed, 65 insertions(+), 9 deletions(-) commit 088b2b856fb2f063c3dfa3676c69221bd98f4da3 Author: Krzysztof Kozlowski Date: Sun Jun 5 18:05:03 2022 +0200 ARM: dts: s5pv210: use local header for pinctrl register values The DTS uses hardware register values directly in pin controller pin configuration. These are not some IDs or other abstraction layer but raw numbers used in the registers. These numbers were previously put in the bindings header to avoid code duplication and to provide some context meaning (name), but they do not fit the purpose of bindings. It is also quite confusing to use constants prefixed with Exynos for other SoC, because there is actually nothing here in common, except the actual value. Store the constants in a header next to DTS and use them instead of bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanho Park Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220605160508.134075-4-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/s5pv210-aquila.dts | 4 +- arch/arm/boot/dts/s5pv210-aries.dtsi | 134 ++++----- arch/arm/boot/dts/s5pv210-fascinate4g.dts | 22 +- arch/arm/boot/dts/s5pv210-galaxys.dts | 34 +-- arch/arm/boot/dts/s5pv210-pinctrl.dtsi | 480 +++++++++++++++--------------- arch/arm/boot/dts/s5pv210-pinctrl.h | 39 +++ 6 files changed, 376 insertions(+), 337 deletions(-) commit d180a6af35843160ef2a80ea6f45ef336f19298e Author: Krzysztof Kozlowski Date: Sun Jun 5 18:05:02 2022 +0200 ARM: dts: s3c64xx: use local header for pinctrl register values The DTS uses hardware register values directly in pin controller pin configuration. These are not some IDs or other abstraction layer but raw numbers used in the registers. These numbers were previously put in the bindings header to avoid code duplication and to provide some context meaning (name), but they do not fit the purpose of bindings. It is also quite confusing to use constants prefixed with Exynos for other SoC, because there is actually nothing here in common, except the actual value. Store the constants in a header next to DTS and use them instead of bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanho Park Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220605160508.134075-3-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/s3c64xx-pinctrl.dtsi | 178 ++++++++++++++++----------------- arch/arm/boot/dts/s3c64xx-pinctrl.h | 27 +++++ 2 files changed, 116 insertions(+), 89 deletions(-) commit 729abb9b376efef58d4d5b77f1ce06ce197f459e Author: Krzysztof Kozlowski Date: Sun Jun 5 18:05:01 2022 +0200 ARM: dts: s3c2410: use local header for pinctrl register values The DTS uses hardware register values directly in pin controller pin configuration. These are not some IDs or other abstraction layer but raw numbers used in the registers. These numbers were previously put in the bindings header to avoid code duplication and to provide some context meaning (name), but they do not fit the purpose of bindings. It is also quite confusing to use constants prefixed with Exynos for other SoC, because there is actually nothing here in common, except the actual value. Store the constants in a header next to DTS and use them instead of bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanho Park Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220605160508.134075-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/s3c2410-pinctrl.h | 19 +++++++++++++++++ arch/arm/boot/dts/s3c2416-pinctrl.dtsi | 38 +++++++++++++++++----------------- 2 files changed, 38 insertions(+), 19 deletions(-) commit a07cadf80c85a3ee6a1688fafb71b8c5cabfa904 Author: Krzysztof Kozlowski Date: Sun Jun 5 18:37:07 2022 +0200 ARM: dts: exynos: align MMC node name with dtschema The node names should be generic and MMC controller dtschema expects "mmc". Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20220605163710.144210-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/exynos3250.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2164784a4b2700d1929854b5ec6b2169ff449814 Author: Krzysztof Kozlowski Date: Sun Jun 5 18:37:08 2022 +0200 arm64: dts: exynos: align MMC node name with dtschema The node names should be generic and MMC controller dtschema expects "mmc". Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20220605163710.144210-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/exynos/exynos5433.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 283d046406c22409d45b3ab31a4c93fe94b66349 Author: Chanho Park Date: Thu Jun 2 14:32:48 2022 +0900 arm64: dts: exynos: adjust DT style of ufs nodes in ExynosAutov9 Drop "ufs0-" label name usage of ufs phy and hci nodes. Regarding the comments of reg properties, we don't need to illustrate here because we can find the description from the dt-binding doc. Suggested-by: Krzysztof Kozlowski Signed-off-by: Chanho Park Link: https://lore.kernel.org/r/20220602053250.62593-5-chanho61.park@samsung.com Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3b0a91e586dc92da738af9eb35352d5897b8b279 Author: Krzysztof Kozlowski Date: Thu May 26 22:43:23 2022 +0200 ARM: dts: exynos: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20220526204323.832243-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/exynos3250-artik5.dtsi | 2 +- arch/arm/boot/dts/exynos4210-trats.dts | 2 +- arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi | 2 +- arch/arm/boot/dts/exynos5.dtsi | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 6f8c75ad5a1550257d60883eef6d5e97f6268022 Author: Krzysztof Kozlowski Date: Thu May 26 22:43:22 2022 +0200 arm64: dts: exynos: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanho Park Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20220526204323.832243-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa5d0a0205c34734c5b8daa77e39ac2817f63a10 Author: Xinlei Lee Date: Fri May 20 10:00:07 2022 +0800 drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function In the dsi_enable function, mtk_dsi_rxtx_control is to pull up the MIPI signal operation. Before dsi_disable, MIPI should also be pulled down by writing a register instead of disabling dsi. If disable dsi without pulling the mipi signal low, the value of the register will still maintain the setting of the mipi signal being pulled high. After resume, even if the mipi signal is not pulled high, it will still be in the high state. Fixes: 2e54c14e310f ("drm/mediatek: Add DSI sub driver") Link: https://patchwork.kernel.org/project/linux-mediatek/patch/1653012007-11854-5-git-send-email-xinlei.lee@mediatek.com/ Signed-off-by: Jitao Shi Signed-off-by: Xinlei Lee Reviewed-by: Rex-BC Chen Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dsi.c | 2 ++ 1 file changed, 2 insertions(+) commit 39e8d062b03c3dc257d880d82bd55cdd9e185a3b Author: Jitao Shi Date: Fri May 20 10:00:06 2022 +0800 drm/mediatek: Keep dsi as LP00 before dcs cmds transfer To comply with the panel sequence, hold the mipi signal to LP00 before the dcs cmds transmission, and pull the mipi signal high from LP00 to LP11 until the start of the dcs cmds transmission. The normal panel timing is : (1) pp1800 DC pull up (2) avdd & avee AC pull high (3) lcm_reset pull high -> pull low -> pull high (4) Pull MIPI signal high (LP11) -> initial code -> send video data (HS mode) The power-off sequence is reversed. If dsi is not in cmd mode, then dsi will pull the mipi signal high in the mtk_output_dsi_enable function. The delay in lane_ready func is the reaction time of dsi_rx after pulling up the mipi signal. Fixes: 2dd8075d2185 ("drm/mediatek: mtk_dsi: Use the drm_panel_bridge API") Link: https://patchwork.kernel.org/project/linux-mediatek/patch/1653012007-11854-4-git-send-email-xinlei.lee@mediatek.com/ Cc: # 5.10.x: 7f6335c6a258: drm/mediatek: Modify dsi funcs to atomic operations Cc: # 5.10.x: cde7e2e35c28: drm/mediatek: Separate poweron/poweroff from enable/disable and define new funcs Cc: # 5.10.x Signed-off-by: Jitao Shi Signed-off-by: Xinlei Lee Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dsi.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit cde7e2e35c2866d22a3a012e72a41052dfcc255d Author: Jitao Shi Date: Fri May 20 10:00:05 2022 +0800 drm/mediatek: Separate poweron/poweroff from enable/disable and define new funcs In order to match the changes of "Use the drm_panel_bridge API", the poweron/poweroff of dsi is extracted from enable/disable and defined as new funcs (atomic_pre_enable/atomic_post_disable). Since dsi_poweron is moved from dsi_enable to pre_enable function, in order to avoid poweron failure, the operation of dsi register fails to cause bus hang. Therefore, the protection mechanism is added to the dsi_enable function. Fixes: 2dd8075d2185 ("drm/mediatek: mtk_dsi: Use the drm_panel_bridge API") Link: https://patchwork.kernel.org/project/linux-mediatek/patch/1653012007-11854-3-git-send-email-xinlei.lee@mediatek.com/ Signed-off-by: Jitao Shi Signed-off-by: Xinlei Lee Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dsi.c | 53 ++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 19 deletions(-) commit 7f6335c6a258edf4d5ff1b904bc033188dc7b48b Author: Xinlei Lee Date: Fri May 20 10:00:04 2022 +0800 drm/mediatek: Modify dsi funcs to atomic operations Because .enable & .disable are deprecated. Use .atomic_enable & .atomic_disable instead. Link: https://patchwork.kernel.org/project/linux-mediatek/patch/1653012007-11854-2-git-send-email-xinlei.lee@mediatek.com/ Signed-off-by: Jitao Shi Signed-off-by: Xinlei Lee Reviewed-by: Rex-BC Chen Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dsi.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 4f05f03e8f8bf5c609adca829ae9857fb9f6de3e Author: Krzysztof Kozlowski Date: Thu May 26 22:35:46 2022 +0200 ARM: dts: sun5i: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Signed-off-by: Krzysztof Kozlowski Acked-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220526203547.830848-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/sun5i-a13-licheepi-one.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e1c51d31befcebe42f4188a14c91503eba42d551 Author: Samuel Holland Date: Mon May 30 23:35:39 2022 -0500 clk: sunxi-ng: Deduplicate ccu_clks arrays The ccu_clks arrays are used to link ccu_common objects to a platform device during probe. There is no requirement that the clk_hw inside the ccu_common object ever gets registered with the clock framework. So the drivers do not need a separate ccu_clks array for each CCU variant. A single array per driver, containing the union of the CCU clocks from all variants, is sufficient. Let's save some space by combining the ccu_clks arrays in each driver. Signed-off-by: Samuel Holland Acked-by: Jernej Skrabec Reviewed-by: Andre Przywara Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220531043539.41549-1-samuel@sholland.org drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c | 16 +---- drivers/clk/sunxi-ng/ccu-sun8i-de2.c | 77 ++++++---------------- drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 113 +-------------------------------- drivers/clk/sunxi-ng/ccu-sun8i-r.c | 40 +++--------- drivers/clk/sunxi-ng/ccu-sun8i-v3s.c | 80 ++--------------------- 5 files changed, 37 insertions(+), 289 deletions(-) commit 078f28fee5aa417169d8e8906815c684beddbe74 Author: YC Hung Date: Mon Jun 6 16:02:12 2022 -0500 ASoC: SOF: mediatek: mt8195 suspend check dsp idle During suspend flow, sof_suspend will be called and the pm_ops->ctx_save callback notifies DSP of the upcoming power down. Upon receipt of the ctx_save IPC, the DSP will start the D3 transition. Before the DSP enter idle, an interrupt is generated to notify the host of the power state change. Since the host and DSP are two different processors, there could be a race condition, which can be avoided by polling with 1s timeout and 500us intervals Reviewed-by: Péter Ujfalusi Signed-off-by: YC Hung Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220606210212.146626-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/mediatek/mt8195/mt8195.c | 13 +++++++++++++ sound/soc/sof/mediatek/mt8195/mt8195.h | 5 +++++ 2 files changed, 18 insertions(+) commit 0bf4276cc7883d65e594926c1159d4c0712d02e7 Author: YC Hung Date: Mon Jun 6 16:02:11 2022 -0500 ASoC: SOF: mediatek: mt8195 modify dram type as non-cache Modify dram as non-cache memory type to avoid wrong access between host and dsp side and get the size of shared dma from device tree. Reviewed-by: Curtis Malainey Reviewed-by: Ranjani Sridharan Signed-off-by: YC Hung Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220606210212.146626-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/mediatek/mt8195/mt8195.c | 37 +++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 16 deletions(-) commit fd43dcbb859c85831a05e37287e1c5395f54aba8 Author: YC Hung Date: Mon Jun 6 16:02:10 2022 -0500 ASoC: SOF: mediatek: Add shared_size for mediatek common chip information Add shared_size for mediatek common chip information which is used for audio and trace dma. Reviewed-by: Curtis Malainey Reviewed-by: Ranjani Sridharan Signed-off-by: YC Hung Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220606210212.146626-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/mediatek/adsp_helper.h | 1 + 1 file changed, 1 insertion(+) commit e53b20598f394e37951d6355f1c88ae01165b53f Author: YC Hung Date: Mon Jun 6 16:02:09 2022 -0500 ASoC: SOF: mediatek: revise mt8195 clock sequence clock enable : enable and set audio_h selection as 26M. Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: YC Hung Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220606210212.146626-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/mediatek/mt8195/mt8195-clk.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b585692fc937dc8f9d494078b5ffe2aafe31ec18 Author: Ajit Kumar Pandey Date: Mon Jun 6 16:02:08 2022 -0500 ASoC: SOF: amd: Add SOF pm ops callback for Renoir Add SOF PM ops callback in renoir dsp ops to power off and on ACP IP block during system suspend and resume on Renoir platform. Signed-off-by: Ajit Kumar Pandey Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220606210212.146626-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/amd/acp-dsp-offset.h | 2 ++ sound/soc/sof/amd/acp.c | 36 ++++++++++++++++++++++++++++++++++++ sound/soc/sof/amd/acp.h | 4 ++++ sound/soc/sof/amd/pci-rn.c | 4 ++++ sound/soc/sof/amd/renoir.c | 4 ++++ 5 files changed, 50 insertions(+) commit 8208dd75eb468d1bb90aef52f385e5b3486bb737 Author: Pierre-Louis Bossart Date: Mon Jun 6 15:46:22 2022 -0500 ASoC: Intel: sof_sdw: allow HDaudio/HDMI disable For tests, it's rather common to disable the HDaudio links and codecs in the build. Since we already get a codec_mask parameter indicating that there are no codecs detected, it's straightforward to skip the HDMI dailink creation and create a card. Note that when disabling HDMI, a modified topology without HDMI pipelines needs to be provided as well. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220606204622.144424-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/Kconfig | 1 - sound/soc/intel/boards/sof_sdw.c | 24 +++++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) commit 93693dcf2a4d7ab6a355f80c14653cd9c27a1422 Author: Yong Zhi Date: Mon Jun 6 15:46:21 2022 -0500 ASoC: Intel: boards: rename RTL1019 compatible driver to rt1019p Use rt1019p for rt1015p.c compatible codec and reserve the name rt1019 for 10EC1019 matched driver in sof_realtek_common. Reviewed-by: Bard Liao Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220606204622.144424-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_realtek_common.c | 24 ++++++++++++------------ sound/soc/intel/boards/sof_realtek_common.h | 6 +++--- sound/soc/intel/boards/sof_rt5682.c | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) commit 11fe58c4450a8108b498d2f849976ba2686820fc Author: Bard Liao Date: Mon Jun 6 15:46:20 2022 -0500 ASoC: SOF: Intel: add MeteorLake machines Add support for MeteorLake (MTL) machines support, starting with mockup devices. Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220606204622.144424-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown include/sound/soc-acpi-intel-match.h | 2 ++ sound/soc/intel/common/Makefile | 1 + sound/soc/intel/common/soc-acpi-intel-mtl-match.c | 41 +++++++++++++++++++++++ 3 files changed, 44 insertions(+) commit fae7d186403ee5a9375ec75938e0de99718e066a Author: Douglas Anderson Date: Wed Jun 1 11:23:24 2022 -0700 drm/probe-helper: Default to 640x480 if no EDID on DP If we're unable to read the EDID for a display because it's corrupt / bogus / invalid then we'll add a set of standard modes for the display. Since we have no true information about the connected display, these modes are essentially guesses but better than nothing. At the moment, none of the modes returned is marked as preferred, but the modes are sorted such that the higher resolution modes are listed first. When userspace sees these modes presented by the kernel it needs to figure out which one to pick. At least one userspace, ChromeOS [1] seems to use the rules (which seem pretty reasonable): 1. Try to pick the first mode marked as preferred. 2. Try to pick the mode which matches the first detailed timing descriptor in the EDID. 3. If no modes were marked as preferred then pick the first mode. Unfortunately, userspace's rules combined with what the kernel is doing causes us to fail section 4.2.2.6 (EDID Corruption Detection) of the DP 1.4a Link CTS. That test case says that, while it's OK to allow some implementation-specific fall-back modes if the EDID is bad that userspace should _default_ to 640x480. Let's fix this by marking 640x480 as default for DP in the no-EDID case. NOTES: - In the discussion around v3 of this patch [2] there was talk about solving this in userspace and I even implemented a patch that would have solved this for ChromeOS, but then the discussion turned back to solving this in the kernel. - Also in the discussion of v3 [2] it was requested to limit this change to just DP since folks were worried that it would break some subtle corner case on VGA or HDMI. [1] https://source.chromium.org/chromium/chromium/src/+/a051f741d0a15caff2251301efe081c30e0f4a96:ui/ozone/platform/drm/common/drm_util.cc;l=488 [2] https://lore.kernel.org/r/20220513130533.v3.1.I31ec454f8d4ffce51a7708a8092f8a6f9c929092@changeid Signed-off-by: Douglas Anderson Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Acked-by: Jani Nikula Reviewed-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220601112302.v4.1.I31ec454f8d4ffce51a7708a8092f8a6f9c929092@changeid drivers/gpu/drm/drm_probe_helper.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit f06e4c9ec81e7884bd93c4126023c6c74168ac7d Author: Geert Uytterhoeven Date: Thu May 19 15:41:06 2022 +0200 dt-bindings: display: bridge: sil,sii9022: Convert to json-schema Convert the Silicon Image sii902x HDMI bridge Device Tree binding documentation to json-schema. Add missing sil,sii9022-cpi and sil,sii9022-tpi compatible values. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/2f8e12b4980a82788c1dd413ceedf8d144fdca91.1652967387.git.geert+renesas@glider.be .../devicetree/bindings/display/bridge/sii902x.txt | 78 ------------ .../bindings/display/bridge/sil,sii9022.yaml | 131 +++++++++++++++++++++ 2 files changed, 131 insertions(+), 78 deletions(-) commit ea64228d26fee9b766bc9615e92a319da5ef94ef Author: Alex Deucher Date: Wed May 11 17:31:27 2022 -0400 drm/amdgpu/soc21: add mode2 asic reset for SMU IP v13.0.4 Set the default reset method to mode2 for SMU IP v13.0.4 Acked-by: Evan Quan Reviewed-by: Tim Huang Signed-off-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 136f614931a2bb73616b292cf542da3a18daefd5 Author: Alexey Kodanev Date: Mon Jun 6 16:50:54 2022 +0300 drm/radeon: fix potential buffer overflow in ni_set_mc_special_registers() The last case label can write two buffers 'mc_reg_address[j]' and 'mc_data[j]' with 'j' offset equal to SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE since there are no checks for this value in both case labels after the last 'j++'. Instead of changing '>' to '>=' there, add the bounds check at the start of the second 'case' (the first one already has it). Also, remove redundant last checks for 'j' index bigger than array size. The expression is always false. Moreover, before or after the patch 'table->last' can be equal to SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE and it seems it can be a valid value. Detected using the static analysis tool - Svace. Fixes: 69e0b57a91ad ("drm/radeon/kms: add dpm support for cayman (v5)") Signed-off-by: Alexey Kodanev Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/ni_dpm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d1b08baf93352bb3c88d637055dc21187a456646 Author: Alex Deucher Date: Mon Jun 6 11:34:46 2022 -0400 drm/amdgpu/display: fix DCN3.2 Makefiles for non-x86 Add proper handling for PPC64. Reviewed-by: Harry Wentland Reported-by: kernel test robot Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/Makefile | 9 ++++++++- drivers/gpu/drm/amd/display/dc/dcn321/Makefile | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) commit b94b02d72e2b979a32addc8f5099fcf1f6ce9e7b Author: Alex Deucher Date: Mon Jun 6 09:59:52 2022 -0400 drm/amdgpu/display: make some functions static Fixes "no previous prototype" warnings. Reviewed-by: Harry Wentland Reported-by: kernel test robot Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 031ac4e419dfd8f099a0adba31f7f735013eb628 Author: Alex Deucher Date: Thu Jun 2 12:06:12 2022 -0400 drm/amdgpu/discovery: add comments about VCN instance handling Add comments to clarify code that is safe, but triggers and smatch warning. Link: https://lists.freedesktop.org/archives/amd-gfx/2022-June/079905.html Signed-off-by: Alex Deucher Cc: Dan Carpenter drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 453b0016a054df0f442fda8a145b97a33816cab9 Author: Wayne Lin Date: Wed Apr 20 10:32:15 2022 +0800 drm/amd/display: Detect dpcd_rev when hotplug mst monitor [Why] Once mst topology is constructed, later on new connected monitors are reported to source by CSN message. Within CSN, there is no carried info of DPCD_REV comparing to LINK_ADDRESS reply. As the result, we might leave some ports connected to DP but without DPCD revision number which will affect us determining the capability of the DP Rx. [How] Send out remote DPCD read when the port's dpcd_rev is 0x0 in detect_ctx(). Firstly, read out the value from DPCD 0x2200. If the return value is 0x0, it's likely the DP1.2 DP Rx then we reques revision from DPCD 0x0 again. Reviewed-by: Hersen Wu Acked-by: Hamza Mahfooz Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 38 +++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) commit 84de5c2e92dccb2bcfd5ff68af44960b808fe6bb Author: Gabe Teeger Date: Thu May 12 12:47:23 2022 -0400 drm/amd/display: Update optimized blank calc and programming [Why] The existing calculations in DCN3.1 were placeholder and need to be replaced with HW team approved calculations. [How] The new calculations add new parameters to the bounding box and pipe params - VblankNom and the bounding box default. The placeholder calculations are dropped from DCN3.1 in the meantime while we work out hardware approved replacements. Also fix a bug where we wipe out other register contents with a REG_SET instead of a REG_UPDATE for the register we were programming the min_dst_y_next_start_optimized. Reviewed-by: Nicholas Kazlauskas Acked-by: Hamza Mahfooz Signed-off-by: Gabe Teeger Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hubp.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 1 - .../amd/display/dc/dml/dcn31/display_rq_dlg_calc_31.c | 16 ++-------------- .../gpu/drm/amd/display/dc/dml/display_mode_structs.h | 1 + drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h | 1 + 5 files changed, 5 insertions(+), 16 deletions(-) commit 7cc191ee7621b7145c6cc9c18a4e1929bb5f136e Author: Leo Li Date: Wed Mar 30 12:45:09 2022 -0400 drm/amd/display: Implement MPO PSR SU [WHY] For additional power savings, PSR SU (also referred to as PSR2) can be enabled on eDP panels with PSR SU support. PSR2 saves more power compared to PSR1 by allowing more opportunities for the display hardware to be shut down. In comparison to PSR1, Shut down can now occur in-between frames, as well as in display regions where there is no visible update. In otherwords, it allows for some display hw components to be enabled only for a **selectively updated** region of the visible display. Hence PSR SU. [HOW] To define the SU region, support from the OS is required. OS needs to inform driver of damaged regions that need to be flushed to the eDP panel. Today, such support is lacking in most compositors. Therefore, an in-between solution is to implement PSR SU for MPO and cursor scenarios. The plane bounds can be used to define the damaged region to be flushed to panel. This is achieved by: * Leveraging dm_crtc_state->mpo_requested flag to identify when MPO is enabled. * If MPO is enabled, only add updated plane bounds to dirty region. Determine plane update by either: * Existence of drm damaged clips attached to the plane (added by a damage-aware compositor) * Change in fb id (flip) * Change in plane bounds (position and dimensions) * If cursor is enabled, the old_pos and new_pos of cursor plus cursor size is used as damaged regions(*). (*) Cursor updates follow a different code path through DC. PSR SU for cursor is already implemented in DC, and the only thing required to enable is to set DC_PSR_VERSION_SU_1 on the eDP link. See dcn10_dmub_update_cursor_data(). Signed-off-by: Leo Li Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 142 ++++++++++++++++++++- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 6 +- 2 files changed, 144 insertions(+), 4 deletions(-) commit 1b0da5a3e90d3920f6967e4303fdeaaec6f62208 Author: David Zhang Date: Wed May 4 12:30:24 2022 -0400 drm/amd/display: update cursor position to DMUB FW [why] To involve the cursor position into dirty rectangle calculation. [how] - separate plane and cursor update by different DMUB command - send the cursor information while cursor updating, when updating cursor position/attribute, store cursor pos/attr to hubp, and notify dmub FW to exit psr before program cursor registers Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 2 + .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 131 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c | 2 + drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 1 + 4 files changed, 136 insertions(+) commit 381b590c307f29d0990c4b99ae3a2e02aff2a5b9 Author: David Zhang Date: Tue Apr 26 11:44:02 2022 -0400 drm/amd/display: calculate psr config settings in runtime in DM [why] Currently the psr configuration parameters are hardcoded before feeding into the DC helper before passing to DMUB FW. We'd rework to call a shared helper to calculate/update generic psr config fields which are relying on the stream timing and eDP sink PSR caps to avoid hard-coding. [how] - drop part of hard-coded psr config fields by replacing w/ the call of helper from DM before feeding into DC link setup psr helper - For those DM specific psr config fields, e.g. allow smu opt, is not to be set/updated from the shared helper but to rely on the DC feature mask - for the psr version field in psr_config structure, since only the field psr_version of DC link psr_settings matters for that fed to DMUB FW, thus no need to set/update the psr_version field of psr_config structure. Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 65e7a17499e15771339d85eaa1ba686ad2fe342c Author: David Zhang Date: Mon Apr 25 18:08:13 2022 -0400 drm/amd/display: add shared helpers to update psr config fields to power module [why] Currently the amdgpu DM psr configuration parameters are hardcoded before feeding into the DC helper to setup PSR. We would define a helper which is to calculate parts of the psr config fields to avoid hard-coding. [how] To make helper shareable, declare and define the helper in the module_helper, to set/update below fields: - psr remote buffer setup time - sdp tx line number deadline - line time in us - su_y_granularity - su_granularity_required - psr_frame_capture_indication_req - psr_exit_link_training_required add another helper to check given the stream context, if there is only one stream and the output is eDP panel connected. changes in v2: ------------------ - add detailed comment for how psr setup time is calculated as per eDP 1.5 spec Cc: Chandan Vurdigerenataraj Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/modules/power/power_helpers.c | 84 ++++++++++++++++++++++ .../drm/amd/display/modules/power/power_helpers.h | 6 ++ 2 files changed, 90 insertions(+) commit e61a048eabf9d1245f86e67ec4787d2f10e5a1e0 Author: David Zhang Date: Tue May 3 18:19:39 2022 -0400 drm/amd/display: PSRSU+DSC WA for specific TCON [why] Some specific TCON chip has HW limitation to support PSRSU+DSC. [how] Force ffu mode when DSC enabled if we detect it is the specific model from sink OUI DPCD. And disable ABM update for this case. Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_link.h | 1 + drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) commit c2a050c5e07faf9ed2fa1daa1eb642d9da4a879d Author: David Zhang Date: Tue May 3 17:28:18 2022 -0400 drm/amd/display: use HW lock mgr for PSR-SU [why] Feature requires synchronization of dig, pipe, and cursor locking between driver and DMUB fw for PSR-SU [how] return True if PSR-SU in the checker should_use_dmub_lock() Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 2 ++ 1 file changed, 2 insertions(+) commit c7eac19eda0a82f0c1dd9455012754445772fd09 Author: David Zhang Date: Tue May 3 10:56:54 2022 -0400 drm/amd/display: Set PSR level to enable ALPM by default [Why & How] While support ALPM, do ALPM state transition while PSR entry/exit. ALPM is needed for PSR-SU feature, and since the function is ready, we'd enable it by default. - Add psr level definition to enable/disable ALPM and set ALPM powerdone mode. - Enable ALPM by default Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++++ drivers/gpu/drm/amd/display/dc/dc_types.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) commit 6cc5c77300afbb285c4f41e04f3435ae3c484c40 Author: David Zhang Date: Tue May 3 10:49:52 2022 -0400 drm/amd/display: fix system hang when PSR exits [why] When DC driver send PSR exit dmub command to DMUB FW, it might not wait until PSR exit. Then it may hit the following deadlock situation. 1. DC driver send HW LOCK command to DMUB FW due to frame update 2. DMUB FW Set the HW lock 3. DMUB execute PSR exit sequence and stuck at polling DPG Pending register due to the HW Lock is set 4. DC driver ask DMUB FW to unlock HW lock, but DMUB FW is polling DPG pending register [how] The reason why DC driver doesn't wait until PSR exit is because some of the PSR state machine state is not update the dc driver. So when DC driver read back the PSR state, it take the state for PSR inactive. Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_types.h | 7 +++++++ drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) commit 32c453f18dccd93a27d6f026ca690167c8cc9639 Author: David Zhang Date: Mon May 2 11:59:58 2022 -0400 drm/amd/display: add vline time in micro sec to PSR context [why] The current PSR SU programming margin is fixed base on FHD 60HZ panel. If the resolution and refresh rate become higher, the time of current margin might not cover the programming SU time. [how] Notice that the programming SU time is the same among different panels. Instead of fixing the margin with target line number, change the margin unit to micro second which indicate the time needed for programming SU. Then FW set the margin line number base on the line time and margin time. Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 ++ drivers/gpu/drm/amd/display/dc/dc_types.h | 2 ++ drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 1 + 3 files changed, 5 insertions(+) commit 65657d98754c581ad66b56680d3c9ed679890071 Author: David Zhang Date: Mon May 2 11:48:22 2022 -0400 drm/amd/display: Set default value of line_capture_indication [Why & how] We only support line capture indication as 0 for PSRSU Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 1 + 1 file changed, 1 insertion(+) commit a35806b36ea44724b21f7f110b38b5941fc9c393 Author: David Zhang Date: Mon May 2 11:21:25 2022 -0400 drm/amd/display: Passing Y-granularity to dmub fw [Why] The Y-granularity panel parameter indicate the grid pattern granularity in the Y direction for PSRSU. [How] Send the Y-granularity data by PSR_COPY_SETTINGS dmub command. Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++++ drivers/gpu/drm/amd/display/dc/dc_types.h | 8 ++++++++ drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 6 ++++++ 3 files changed, 18 insertions(+) commit 4c7631800e6bf0eced08dd7b4f793fcd972f597d Author: Arunpravin Paneer Selvam Date: Mon Jun 6 13:59:13 2022 +0530 drm/amd/amdgpu: add pipe1 hardware support Enable pipe1 support starting from SIENNA CICHLID asic Signed-off-by: Arunpravin Paneer Selvam Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b07d1d73b09ef40e91ace51a2e167391676a8175 Author: Arunpravin Paneer Selvam Date: Mon Jun 6 13:06:30 2022 +0530 drm/amd/amdgpu: Enable high priority gfx queue Starting from SIENNA CICHLID asic supports two gfx pipes, enabling two graphics queues, 1 on each pipe, pipe0 queue0 would be the normal piority queue and pipe1 queue0 would be the high priority queue Only one queue per pipe is visble to SPI, SPI looks at the priority value assigned to CP_GFX_HQD_QUEUE_PRIORITY from each of the queue's HQD/MQD. Create contexts applying AMDGPU_CTX_PRIORITY_HIGH which submits job to the high priority queue on GFX pipe1. There would be starvation of LP workload if HP workload is always available. v2: - remove unnecessary check(Nirmoy) - make pipe1 hardware support a separate patch(Nirmoy) - remove duplicate code(Shashank) - add CSA support for second gfx pipe(Alex) v3(Christian): - fix incorrect indentation - merge COMPUTE and GFX switch cases as both calls the same function. v4: - rebase w/ latest code base Signed-off-by: Arunpravin Paneer Selvam Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 7 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 55 +++++++++++++++++++++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 12 +++---- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 32 +++++++++++++++---- 5 files changed, 81 insertions(+), 27 deletions(-) commit 3d8785f6c04a953868384db455bb2fdd0b22c11c Author: Somalapuram Amaranath Date: Thu Jun 2 13:01:27 2022 +0530 drm/amdgpu: adding device coredump support Added device coredump information: - Kernel version - Module - Time - VRAM status - Guilty process name and PID - GPU register dumps v1 -> v2: Variable name change v1 -> v2: NULL check v1 -> v2: Code alignment v1 -> v2: Adding dummy amdgpu_devcoredump_free v1 -> v2: memset reset_task_info to zero v2 -> v3: add CONFIG_DEV_COREDUMP for variables v2 -> v3: remove NULL check on amdgpu_devcoredump_read Signed-off-by: Somalapuram Amaranath Reviewed-by: Shashank Sharma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 64 ++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) commit 651d7ee63f338b82d18273c30e9ea804ae174342 Author: Somalapuram Amaranath Date: Thu Jun 2 12:54:58 2022 +0530 drm/amdgpu: save the reset dump register value for devcoredump Allocate memory for register value and use the same values for devcoredump. v1 -> v2: Change krealloc_array() to kmalloc_array() v2 -> v3: Fix alignment Signed-off-by: Somalapuram Amaranath Reviewed-by: Shashank Sharma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 7 +++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- 3 files changed, 11 insertions(+), 3 deletions(-) commit 6d1044a070b2eef0be45f3b99274a6cebee25053 Author: David Zhang Date: Mon May 2 11:05:56 2022 -0400 drm/amd/display: program PSR2 DPCD Configuration [Why] To support PSR2 Source DPCD configuration [How] Update the PSR2 Source DPCD settings while the PSR2 enabled Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 23 +++++++++++++++++++++- .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 13 +++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) commit aa303964bc349914de8e1d3ff7b517581839d01b Author: David Zhang Date: Fri Apr 29 17:38:14 2022 -0400 drm/amd/display: revise Start/End SDP data [why & how] We need to implement the VSC packet rev4 that is required by PSRSU. Follow the eDP 1.5 spec pg. 257 changes in v2: ------------------- - set vsc packet rev2 for PSR1 Cc: Chandan Vurdigerenataraj Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/modules/info_packet/info_packet.c | 29 ++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) commit 3a6dce778de7c120a37983d80b6ccc8c2c4ff6ec Author: David Zhang Date: Fri Apr 29 17:32:56 2022 -0400 drm/amd/display: update GSP1 generic info packet for PSRSU [why & how] Based on PSRSU specification, every selective update frame need to use two SDP to indicate the frame active range. So we occupy another GSP1 for PSRSU execution. Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn30/dcn30_dio_stream_encoder.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 1da5dab029c08e178784a0750203365ea7c3b4f4 Author: David Zhang Date: Fri Apr 29 15:55:16 2022 -0400 drm/amd/display: combine dirty rectangles in DMUB FW [why] In PSR-SU design, the DMUB FW handles the combination of multiple dirty rectangles. [how] - create DC dmub update dirty rectangle helper which sends the dirty rectangles per pipe from DC to DMUB, and DMUB FW will handle to combine the dirty RECTs - call the helper from DC commit plane update function. Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 54 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc_stream.h | 5 +++ 2 files changed, 59 insertions(+) commit b3d0c0f2dfbe610ae5ac6b2d70dd450645dce3cb Author: David Zhang Date: Tue May 3 18:36:28 2022 -0400 drm/amd/display: feed PSR-SU as psr version to dmub FW [why & how] set psr version as PSR-SU in kernel-FW interface function to ensure the correct dmub command parameter is fed into FW. Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 3 +++ 1 file changed, 3 insertions(+) commit ef17936654043829ac527a2e0483d944eaba30aa Author: Danilo Krummrich Date: Sun May 29 15:26:38 2022 +0200 dt-bindings: ps2-gpio: document bus signals open drain The PS/2 bus defines data and clock line to be open drain, this should be reflected in the gpio flags set in the binding. Especially, this is important since the clock line sometimes is driven by the host while being used as interrupt source. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Danilo Krummrich Reviewed-by: Linus Walleij Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220529132638.13420-2-danilokrummrich@dk-develop.de Documentation/devicetree/bindings/serio/ps2-gpio.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 442feb3174dc7b801fc9703c9c9113bf5e1e3caf Author: Danilo Krummrich Date: Sun May 29 15:26:37 2022 +0200 dt-bindings: ps2-gpio: convert binding to json-schema Convert the ps2-gpio dt-binding documentation to DT schema format using the json-schema. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Danilo Krummrich Reviewed-by: Linus Walleij Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220529132638.13420-1-danilokrummrich@dk-develop.de .../devicetree/bindings/serio/ps2-gpio.txt | 23 --------- .../devicetree/bindings/serio/ps2-gpio.yaml | 58 ++++++++++++++++++++++ 2 files changed, 58 insertions(+), 23 deletions(-) commit 39d649602be2ceb3f8f8e98483d09e4d71133c6a Author: Clément Léger Date: Wed Jun 1 10:17:58 2022 +0200 of: constify of_property_check_flags() prop argument This argument is not modified and thus can be set as const. Signed-off-by: Clément Léger Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220601081801.348571-2-clement.leger@bootlin.com include/linux/of.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 37a530bfe56ca9a0d3129598803f2794c7428aae Author: Konstantin Komarov Date: Thu May 26 12:51:03 2022 +0300 fs/ntfs3: Fix missing i_op in ntfs_read_mft There is null pointer dereference because i_op == NULL. The bug happens because we don't initialize i_op for records in $Extend. Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") Reported-by: Liangbin Lian Signed-off-by: Konstantin Komarov fs/ntfs3/inode.c | 1 + 1 file changed, 1 insertion(+) commit 19d1b7872d1ebf0658b5032b79f536a715303ee4 Author: Konstantin Komarov Date: Thu May 12 12:25:48 2022 +0300 fs/ntfs3: Refactor ni_try_remove_attr_list function Now we save a copy of primary record for restoration. Also now we remove all attributes from subrecords. Signed-off-by: Konstantin Komarov fs/ntfs3/frecord.c | 49 +++++++++++++++++++++++++++++++++++++------------ fs/ntfs3/record.c | 5 ++--- 2 files changed, 39 insertions(+), 15 deletions(-) commit cd39981fb92adf0cc736112f87e3e61602baa415 Author: Konstantin Komarov Date: Wed May 11 19:58:36 2022 +0300 fs/ntfs3: Fix double free on remount Pointer to options was freed twice on remount Fixes xfstest generic/361 Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") Signed-off-by: Konstantin Komarov fs/ntfs3/super.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b7b6160d0eb922c44d174f7e1199713e4285c54e Author: Konstantin Komarov Date: Fri May 6 19:29:41 2022 +0300 fs/ntfs3: Refactoring of indx_find function This commit makes function a bit more readable Cc: Joe Perches Signed-off-by: Konstantin Komarov fs/ntfs3/index.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) commit 80d8cad2e9ce21517d50c7084c12a59d38a778f7 Author: Jiaxin Yu Date: Mon May 23 21:28:51 2022 +0800 ASoC: mediatek: mt8186: add misc driver and register definitions Add mt8186 platform misc driver and data tables/register definitions files. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/20220523132858.22166-14-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-interconnection.h | 69 + sound/soc/mediatek/mt8186/mt8186-misc-control.c | 252 ++ sound/soc/mediatek/mt8186/mt8186-reg.h | 2913 ++++++++++++++++++++ 3 files changed, 3234 insertions(+) commit cfa9a966f12a91a269e50f1c3237c006ffe2ee9a Author: Jiaxin Yu Date: Mon May 23 21:28:50 2022 +0800 ASoC: mediatek: mt8186: support gpio control in platform driver Add gpio control for all audio interface separately. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/20220523132858.22166-13-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-afe-gpio.c | 244 ++++++++++++++++++++++++++++ sound/soc/mediatek/mt8186/mt8186-afe-gpio.h | 19 +++ 2 files changed, 263 insertions(+) commit 55b423d5623ccd6785429431c2cf5f3e073b73ba Author: Jiaxin Yu Date: Mon May 23 21:28:49 2022 +0800 ASoC: mediatek: mt8186: support audio clock control in platform driver Add audio clock control with CCF interface. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/20220523132858.22166-12-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-afe-clk.c | 651 +++++++++++++++++++++++++++++ sound/soc/mediatek/mt8186/mt8186-afe-clk.h | 106 +++++ 2 files changed, 757 insertions(+) commit ae92dcbee8b6a6f63198a2a6fea0fc9f6a0fe07b Author: Jiaxin Yu Date: Mon May 23 21:28:48 2022 +0800 ASoC: mediatek: mt8186: support tdm in platform driver Add mt8186 tdm dai driver. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/20220523132858.22166-11-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-dai-tdm.c | 698 +++++++++++++++++++++++++++++ 1 file changed, 698 insertions(+) commit e118015db7bd0dad1744221d0fe18333ebf9c622 Author: Jiaxin Yu Date: Mon May 23 21:28:47 2022 +0800 ASoC: mediatek: mt8186: support src in platform driver Add mt8186 src dai driver Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/20220523132858.22166-10-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-dai-src.c | 695 +++++++++++++++++++++++++++++ 1 file changed, 695 insertions(+) commit 920508f9fe2fc90f19916d74f4c23088030d32e0 Author: Jiaxin Yu Date: Mon May 23 21:28:46 2022 +0800 ASoC: mediatek: mt8186: support pcm in platform driver Add mt8186 pcm dai driver. Signed-off-by: Jiaxin Yu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220523132858.22166-9-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-dai-pcm.c | 423 +++++++++++++++++++++++++++++ 1 file changed, 423 insertions(+) commit 2907d261276e09bd84fdc8bad35930a046a99d4d Author: Jiaxin Yu Date: Mon May 23 21:28:45 2022 +0800 ASoC: mediatek: mt8186: support i2s in platform driver Add mt8186 i2s dai driver. Signed-off-by: Jiaxin Yu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220523132858.22166-8-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-dai-i2s.c | 1286 ++++++++++++++++++++++++++++ 1 file changed, 1286 insertions(+) commit 2567ccae9105cbc881828f2ea09954c1b5fd975d Author: Jiaxin Yu Date: Mon May 23 21:28:44 2022 +0800 ASoC: mediatek: mt8186: support hw gain in platform driver Add mt8186 hw gain dai driver. Signed-off-by: Jiaxin Yu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220523132858.22166-7-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-dai-hw-gain.c | 236 +++++++++++++++++++++++++ 1 file changed, 236 insertions(+) commit 55cac93d271166a2aa431d453bf31fdcb19bd5e6 Author: Jiaxin Yu Date: Mon May 23 21:28:43 2022 +0800 ASoC: mediatek: mt8186: support hostless in platform driver Add mt8186 hostless dai driver. Signed-off-by: Jiaxin Yu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220523132858.22166-6-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-dai-hostless.c | 298 ++++++++++++++++++++++++ 1 file changed, 298 insertions(+) commit b65c466220b336f5044c1be75ebc771d087ee7ca Author: Jiaxin Yu Date: Mon May 23 21:28:42 2022 +0800 ASoC: mediatek: mt8186: support adda in platform driver Add mt8186 adda dai driver. Signed-off-by: Jiaxin Yu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220523132858.22166-5-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-dai-adda.c | 873 ++++++++++++++++++++++++++++ 1 file changed, 873 insertions(+) commit 58949aa35c0f74a98b03864817354d85f452a51c Author: Jiaxin Yu Date: Mon May 23 21:28:41 2022 +0800 ASoC: mediatek: mt8186: support audsys clock control Add mt8186 audio cg control. Audio clock gates are registered to CCF for reference count and clock parent management. Signed-off-by: Jiaxin Yu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220523132858.22166-4-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-audsys-clk.c | 150 ++++++++++++++++++++++++ sound/soc/mediatek/mt8186/mt8186-audsys-clk.h | 15 +++ sound/soc/mediatek/mt8186/mt8186-audsys-clkid.h | 45 +++++++ 3 files changed, 210 insertions(+) commit 612c4695e312c753a8b06f6b052cea3d8338e3c3 Author: Jiaxin Yu Date: Mon May 23 21:28:39 2022 +0800 ASoC: mediatek: mt6366: support for mt6366 codec Mt6366 is a new version of mt6358, and they are same about audio part. So we can reuse the driver of mt6358 that add a new compatible string inside of the mt6358 driver. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/20220523132858.22166-2-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/codecs/mt6358.c | 1 + 1 file changed, 1 insertion(+) commit 1d742694571655e49e11ea8f391bcafaf0f5ee74 Author: José Roberto de Souza Date: Thu Jun 2 13:17:30 2022 -0700 drm/i915/display/fbc: Do not apply WA 22014263786 to DG2 This workaround brings some regressions to DG2 and if really necessary for DG2 an alternative workaround will be implemented. BSpec: 54077 Signed-off-by: José Roberto de Souza Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220602201730.199418-1-jose.souza@intel.com drivers/gpu/drm/i915/display/intel_fbc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3926e0c12238a8053ed5a598b5b84c6cf2adacab Author: Manikanta Pubbisetty Date: Thu Jun 2 18:43:50 2022 +0530 ath11k: Fix warnings reported by checkpatch Fix warnings reported by checkpatch tool. Below are the errors fixed, drivers/net/wireless/ath/ath11k/hal_rx.c:760: 'recevied' may be misspelled - perhaps 'received? drivers/net/wireless/ath/ath11k/qmi.c:2232: Prefer strscpy over strlcpy drivers/net/wireless/ath/ath11k/qmi.c:2238: Prefer strscpy over strlcpy drivers/net/wireless/ath/ath11k/qmi.c:2662: Prefer strscpy over strlcpy drivers/net/wireless/ath/ath11k/mac.c:7836: 'atleast' may be misspelled - perhaps 'at least'? drivers/net/wireless/ath/ath11k/wmi.c:6566: 'succeded' may be misspelled - perhaps 'succeeded'? Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Signed-off-by: Manikanta Pubbisetty Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220602131350.29486-1-quic_mpubbise@quicinc.com drivers/net/wireless/ath/ath11k/hal_rx.c | 2 +- drivers/net/wireless/ath/ath11k/mac.c | 2 +- drivers/net/wireless/ath/ath11k/qmi.c | 6 +++--- drivers/net/wireless/ath/ath11k/wmi.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit 4c1fc4f60a534728a34ed224281d17a33f2bf2bd Author: Manikanta Pubbisetty Date: Thu Jun 2 18:11:42 2022 +0530 ath11k: Fix LDPC config in set_bitrate_mask hook Currently ar->ht_cap_info is not set anywhere in the code, this could result in LDPC config computed wrongly in the set_bitrate_mask() hook and eventually sending wrong config to the target. Fix this by checking the LDPC support from the band HT capabilities of the radio instead. Furthermore, it looks like firmwares running on the ath11k hardware do not set WMI_HT_CAP_LDPC for advertising the TX LDPC capability, WMI_HT_CAP_TX_LDPC is set instead and this should be checked for getting hardware's TX LDPC support. This is true for QCA6390, WCN6855 & WCN6750 hardware. Also, remove unused variables ht_cap_info & vht_cap_info from struct ath11k{}. Found this during code review. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Signed-off-by: Manikanta Pubbisetty Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220602124142.29909-1-quic_mpubbise@quicinc.com drivers/net/wireless/ath/ath11k/core.h | 2 -- drivers/net/wireless/ath/ath11k/mac.c | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) commit 0ab52b2bd7be8fd49c8ade7703c1faa15359c6c5 Author: Manikanta Pubbisetty Date: Thu Jun 2 17:59:29 2022 +0530 ath11k: Avoid REO CMD failed prints during firmware recovery Currently when firmware recovery is in progress, we do not queue REO commands to the firmware, instead -ESHUTDOWN will be returned to the caller leading to a failure print on the console. The REO command in the problem scenario is sent for all tids of a peer in which case we will have 16 failure prints on the console for a single peer. For an AP usecase, this count would be even higher in a worst case scenario. Since these commands are bound to fail during firmware recovery, it is better to avoid printing these failures and thereby avoid message flooding on the console. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Fixes: 8ee8d38ca472 ("ath11k: Fix crash during firmware recovery on reo cmd ring access") Signed-off-by: Manikanta Pubbisetty Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220602122929.18896-1-quic_mpubbise@quicinc.com drivers/net/wireless/ath/ath11k/dp_rx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9331f7d3c54a263bede5055e106e40b28d0bd937 Author: Manikanta Pubbisetty Date: Thu Jun 2 17:26:21 2022 +0530 ath11k: Fix incorrect debug_mask mappings Currently a couple of debug_mask entries are mapped to the same value, this could enable unintended driver logging. If enabling DP_TX logs was the intention, then this could also enable PCI logs flooding the dmesg buffer or vice versa. Fix this by correctly assigning the debug masks. Found during code review. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Fixes: aa2092a9bab3f ("ath11k: add raw mode and software crypto support") Signed-off-by: Manikanta Pubbisetty Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220602115621.15339-1-quic_mpubbise@quicinc.com drivers/net/wireless/ath/ath11k/debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e5646fe3b7ef739c392e59da7db6adf5e1fdef42 Author: Christian Marangi Date: Sat May 28 16:25:16 2022 +0200 ath11k: fix missing skb drop on htc_tx_completion error On htc_tx_completion error the skb is not dropped. This is wrong since the completion_handler logic expect the skb to be consumed anyway even when an error is triggered. Not freeing the skb on error is a memory leak since the skb won't be freed anywere else. Correctly free the packet on eid >= ATH11K_HTC_EP_COUNT before returning. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1 Fixes: f951380a6022 ("ath11k: Disabling credit flow for WMI path") Signed-off-by: Christian 'Ansuel' Marangi Reviewed-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220528142516.20819-2-ansuelsmth@gmail.com drivers/net/wireless/ath/ath11k/htc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 294b2111ff1027a942c362d523b847d73d91b70c Author: Conor Dooley Date: Fri Jun 3 09:45:35 2022 +0100 riscv: dts: microchip: remove spi-max-frequency property spi-max-frequency property is supposed to be a per SPI peripheral device property, not a SPI controller property, so remove it. Reported-by: Rob Herring Link: https://lore.kernel.org/lkml/20220526014141.2872567-1-robh@kernel.org/ Signed-off-by: Conor Dooley arch/riscv/boot/dts/microchip/mpfs.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 9c1b06a509dfaf539ced98cecce9e797fb2ee3eb Author: jason-jh.lin Date: Thu May 26 18:21:25 2022 +0800 drm/mediatek: Add suffix 0 to DDP_COMPONENT_DITHER for mt8195 vdosys0 Because mt8195 vdosys0 has 2 DITHER components, so the suffix 0 need to be added to DDP_COMPONENT_DITHER. Then DITHER enum will become: DDP_COMPONENT_DITHER0 and DDP_COMPONENT_DITHER1. Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220526102126.19756-5-jason-jh.lin@mediatek.com/ Signed-off-by: jason-jh.lin Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 2 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit 7266e90a51a32722a94daa3cb5b8fa278059e49e Author: jason-jh.lin Date: Thu May 26 18:21:24 2022 +0800 drm/mediatek: Add mediatek-drm of vdosys0 support for mt8195 1. Add driver data of mt8195 vdosys0 to mediatek-drm and the sub driver. 2. Add get driver data function to identify which vdosys by io_start. Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220526102126.19756-4-jason-jh.lin@mediatek.com/ Signed-off-by: jason-jh.lin Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 6 ++ drivers/gpu/drm/mediatek/mtk_drm_drv.c | 150 +++++++++++++++++++++++++++++-- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 6 ++ 3 files changed, 153 insertions(+), 9 deletions(-) commit bd448b8867b7e0c30ecd09f944a86018596fa4ad Author: jason-jh.lin Date: Thu May 26 18:21:23 2022 +0800 drm/mediatek: Add MERGE support for mediatek-drm Add MERGE engine file: MERGE module is used to merge two slice-per-line inputs into one side-by-side output. Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220526102126.19756-3-jason-jh.lin@mediatek.com/ Signed-off-by: jason-jh.lin Acked-by: AngeloGioacchino Del Regno Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/Makefile | 1 + drivers/gpu/drm/mediatek/mtk_disp_drv.h | 8 + drivers/gpu/drm/mediatek/mtk_disp_merge.c | 246 ++++++++++++++++++++++++++++ drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 16 ++ drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 1 + drivers/gpu/drm/mediatek/mtk_drm_drv.c | 4 +- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 1 + 7 files changed, 276 insertions(+), 1 deletion(-) commit b7fb767b1658b3154da712844cf834c5d66ddb2b Author: jason-jh.lin Date: Thu May 26 18:21:22 2022 +0800 drm/mediatek: Add DSC support for mediatek-drm DSC is designed for real-time systems with real-time compression, transmission, decompression and display. The DSC standard is a specification of the algorithms used for compressing and decompressing image display streams, including the specification of the syntax and semantics of the compressed video bit stream. Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220526102126.19756-2-jason-jh.lin@mediatek.com/ Signed-off-by: jason-jh.lin Acked-by: AngeloGioacchino Del Regno Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 47 +++++++++++++++++++++++++++++ drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 1 + 2 files changed, 48 insertions(+) commit fc602b4f692cb83c937b5f79628bca32b60c4402 Author: Aidan MacDonald Date: Sat Jun 4 12:32:50 2022 +0100 mtd: spinand: Add support for ATO25D1GA Add support for the ATO25D1GA SPI NAND flash. Datasheet: - https://atta.szlcsc.com/upload/public/pdf/source/20191212/C469320_04599D67B03B078044EB65FF5AEDDDE9.pdf Signed-off-by: Aidan MacDonald Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220604113250.4745-1-aidanmacdonald.0x0@gmail.com drivers/mtd/nand/spi/Makefile | 2 +- drivers/mtd/nand/spi/ato.c | 86 +++++++++++++++++++++++++++++++++++++++++++ drivers/mtd/nand/spi/core.c | 1 + include/linux/mtd/spinand.h | 1 + 4 files changed, 89 insertions(+), 1 deletion(-) commit 99c1734f318c97492083c16910cbda2583830eb1 Author: Rob Herring Date: Wed May 25 15:59:46 2022 -0500 dt-bindings: mtd: mxc-nand: Drop undocumented properties from example With unevaluatedProperties issues fixed, 'nand-bus-width' and 'nand-ecc-mode' are flagged as undocumented. Removing them from the example is the easiest solution to silence the warnings. Signed-off-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220525205947.2487165-1-robh@kernel.org Documentation/devicetree/bindings/mtd/mxc-nand.yaml | 2 -- 1 file changed, 2 deletions(-) commit ec0da06337751b18f6dee06b6526e0f0d6e80369 Author: Christophe JAILLET Date: Fri May 20 18:41:40 2022 +0200 mtd: rawnand: meson: Fix a potential double free issue When meson_nfc_nand_chip_cleanup() is called, it will call: meson_nfc_free_buffer(&meson_chip->nand); nand_cleanup(&meson_chip->nand); nand_cleanup() in turn will call nand_detach() which calls the .detach_chip() which is here meson_nand_detach_chip(). meson_nand_detach_chip() already calls meson_nfc_free_buffer(), so we could double free some memory. Fix it by removing the unneeded explicit call to meson_nfc_free_buffer(). Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller") Signed-off-by: Christophe JAILLET Acked-by: Liang Yang Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/ec15c358b8063f7c50ff4cd628cf0d2e14e43f49.1653064877.git.christophe.jaillet@wanadoo.fr drivers/mtd/nand/raw/meson_nand.c | 1 - 1 file changed, 1 deletion(-) commit 18178e03b124b0c6be17abbbca914157642f5d7a Author: Peng Wu Date: Fri May 20 08:44:25 2022 +0000 mtd: rawnand: cafe: fix drivers probe/remove methods Driver should call pci_disable_device() if it returns from cafe_nand_probe() with error. Meanwhile, the driver calls pci_enable_device() in cafe_nand_probe(), but never calls pci_disable_device() during removal. Signed-off-by: Peng Wu Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220520084425.116686-1-wupeng58@huawei.com drivers/mtd/nand/raw/cafe_nand.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 77087a04c8fd554134bddcb8a9ff87b21f357926 Author: Miaoqian Lin Date: Mon May 23 18:32:55 2022 +0400 mtd: maps: Fix refcount leak in ap_flash_init of_find_matching_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: b0afd44bc192 ("mtd: physmap_of: add a hook for Versatile write protection") Signed-off-by: Miaoqian Lin Reviewed-by: Linus Walleij Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220523143255.4376-1-linmq006@gmail.com drivers/mtd/maps/physmap-versatile.c | 1 + 1 file changed, 1 insertion(+) commit 33ec82a6d2b119938f26e5c8040ed5d92378eb54 Author: Miaoqian Lin Date: Mon May 23 18:02:05 2022 +0400 mtd: maps: Fix refcount leak in of_flash_probe_versatile of_find_matching_node_and_match() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: b0afd44bc192 ("mtd: physmap_of: add a hook for Versatile write protection") Signed-off-by: Miaoqian Lin Reviewed-by: Linus Walleij Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220523140205.48625-1-linmq006@gmail.com drivers/mtd/maps/physmap-versatile.c | 1 + 1 file changed, 1 insertion(+) commit 894bf75bb1f6c274cdd877879d9215abd6ed4b1b Author: Mark Brown Date: Thu Jun 2 15:53:16 2022 +0200 ASoC: tlv320dac3x: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the tlv320dac3x driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-21-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/tlv320dac33.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 83a5f86903fbaf9c47c13975eb6f2fbd16d7f865 Author: Mark Brown Date: Thu Jun 2 15:53:15 2022 +0200 ASoC: tlv320aic33: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the tlv320aic33 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-20-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic3x.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 0cc5a137f7a3ba6fec069d8d222020f0927a18ef Author: Mark Brown Date: Thu Jun 2 15:53:14 2022 +0200 ASoC: tlv320aic32x4: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the tlv320aic32x4 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-19-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic32x4.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 2fd8298aed2228b8c6b94edf820121da25b3f5e2 Author: Mark Brown Date: Thu Jun 2 15:53:13 2022 +0200 ASoC: tlv320aic31xx: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the tlv320aic31xx driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-18-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic31xx.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 8d322f170b09989f47614c1a663371647f03176f Author: Mark Brown Date: Thu Jun 2 15:53:12 2022 +0200 ASoC: tlv320aic26: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the tlv320aic26 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Reported-by: kernel test robot Link: https://lore.kernel.org/r/20220602135316.3554400-17-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic26.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit b9ff35c7afc6ae1bddca3f84fb23a3d903a62a23 Author: Mark Brown Date: Thu Jun 2 15:53:11 2022 +0200 ASoC: tlv320aic23: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the tlv320aic23 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Reported-by: kernel test robot Link: https://lore.kernel.org/r/20220602135316.3554400-16-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic23.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 10649fa392c9abb6e9b258f7af9577596339fbe2 Author: Mark Brown Date: Thu Jun 2 15:53:10 2022 +0200 ASoC: tlv320adcx140: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the tlv320adcx140 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-15-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/tlv320adcx140.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit ad60ff09801fa1841dcdcf1f6ad1fa0e09ad0693 Author: Mark Brown Date: Thu Jun 2 15:53:09 2022 +0200 ASoC: tlv320adc3xxx: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the tlv320aic3xxx driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-14-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/tlv320adc3xxx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5fc4ed4bda465fb826bea7c6a7b15657154787ce Author: Mark Brown Date: Thu Jun 2 15:53:08 2022 +0200 ASoC: uda1334: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the uda1334 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-13-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/uda1334.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f025fcc466cc03fa4f5ae245b6848629b846edff Author: Mark Brown Date: Thu Jun 2 15:53:07 2022 +0200 ASoC: tas6424: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the tas6424 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-12-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/tas6424.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9f6654c3162a4e64265c62bea433550fce4beffd Author: Mark Brown Date: Thu Jun 2 15:53:06 2022 +0200 ASoC: tas5720: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the tas5720 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-11-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/tas5720.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7c5c399fb97e3f7a88d1b154f610cab4d9253955 Author: Mark Brown Date: Thu Jun 2 15:53:05 2022 +0200 ASoC: tas5086: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the tas5086 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-10-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/tas5086.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f8a4018c826fde6137425bbdbe524d5973feb173 Author: Mark Brown Date: Thu Jun 2 15:53:04 2022 +0200 ASoC: tas2770: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the tas2770 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-9-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/tas2770.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6b486af2ab946cbcad5c95f8daa1f4a8a53f25c5 Author: Mark Brown Date: Thu Jun 2 15:53:03 2022 +0200 ASoC: tas2552: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the tas2552 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-8-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/tas2552.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d7e98b570e801375130ed4796bcbb35a39669d44 Author: Mark Brown Date: Thu Jun 2 15:53:02 2022 +0200 ASoC: sti-sas: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the sti-sas driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-7-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/sti-sas.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit def5b3774a48ed06e69b56af8317cb563bbd9ceb Author: Mark Brown Date: Thu Jun 2 15:53:01 2022 +0200 ASoC: sta350: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the sta350 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-6-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/sta350.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ef08b481ae78eb89672bdf67ed306a43065253b3 Author: Mark Brown Date: Thu Jun 2 15:53:00 2022 +0200 ASoC: sta32x: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the sta32x driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-5-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/sta32x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cd0df1706d181bf103d0f02e6c008c2386772eb1 Author: Mark Brown Date: Thu Jun 2 15:52:59 2022 +0200 ASoC: rk3328: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the rk3328 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-4-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/rk3328_codec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 573a9a37b6fcef6dc3977ca11a671f82b1c1b606 Author: Mark Brown Date: Thu Jun 2 15:52:58 2022 +0200 ASoC: max98090: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the max98090 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-3-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/max98090.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit eff8f2aeaf0c1b529d918c9f9569577dff600dc5 Author: Mark Brown Date: Thu Jun 2 15:52:57 2022 +0200 ASoC: cx2072x: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the cx2072x driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602135316.3554400-2-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/cx2072x.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 513abe2460de2feaa56a66270efda5fa7a788459 Author: Charles Keepax Date: Thu Jun 2 17:21:19 2022 +0100 ASoC: cs42l51: Correct minimum value for SX volume control The minimum value for the PGA Volume is given as 0x1A, however the values from there to 0x19 are all the same volume and this is not represented in the TLV structure. The number of volumes given is correct so this leads to all the volumes being shifted. Move the minimum value up to 0x19 to fix this. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220602162119.3393857-7-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cs42l51.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c9495ee315e13cce3e3eb588efdcb107b566aab Author: Charles Keepax Date: Thu Jun 2 17:21:18 2022 +0100 ASoC: cs42l56: Correct typo in minimum level for SX volume controls A couple of the SX volume controls specify 0x84 as the lowest volume value, however the correct value from the datasheet is 0x44. The datasheet don't include spaces in the value it displays as binary so this was almost certainly just a typo reading 1000100. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220602162119.3393857-6-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cs42l56.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cd6c0895b9d30b47d22293b9cddab3a8366e4a76 Author: Charles Keepax Date: Thu Jun 2 17:21:17 2022 +0100 ASoC: cs42l52: Correct TLV for Bypass Volume The Bypass Volume is accidentally using a -6dB minimum TLV rather than the correct -60dB minimum. Add a new TLV to correct this. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220602162119.3393857-5-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cs42l52.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5a7f6cdd402e3da891d2768f1da1f3ea1664a2a2 Author: Charles Keepax Date: Thu Jun 2 17:21:16 2022 +0100 ASoC: cs53l30: Correct number of volume levels on SX controls This driver specified the maximum value rather than the number of volume levels on the SX controls, this is incorrect, so correct them. Reported-by: David Rhodes Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220602162119.3393857-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cs53l30.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e9dad4de223ee5a4bd5e8b11931a2af8558da0bc Author: Charles Keepax Date: Thu Jun 2 17:21:15 2022 +0100 ASoC: cs35l36: Update digital volume TLV The digital volume TLV specifies the step as 0.25dB but the actual step of the control is 0.125dB. Update the TLV to correct this. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220602162119.3393857-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cs35l36.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 07c2307ce8b420e351e0635c690397ad7a9fab77 Author: Charles Keepax Date: Thu Jun 2 17:21:14 2022 +0100 ASoC: cs42l52: Fix TLV scales for mixer controls The datasheet specifies the range of the mixer volumes as between -51.5dB and 12dB with a 0.5dB step. Update the TLVs for this. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220602162119.3393857-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cs42l52.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 33dbf3fc6942b53920296395bb4c81fb3cc5ebfd Author: xliu Date: Thu Jun 2 13:19:22 2022 +0800 ASoC: Intel: cirrus-common: fix incorrect channel mapping The default mapping of ASPRX1 (DAC source) is slot 0. Change the slot mapping of right amplifiers (WR and TR) to slot 1 to receive right channel data. Also update the ACPI instance ID mapping according to HW configuration. Signed-off-by: xliu Signed-off-by: Brent Lu Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220602051922.1232457-1-brent.lu@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_cirrus_common.c | 40 +++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 4 deletions(-) commit dd58365d43efccd87dbfc8f93eb3e61b9b4d64f8 Author: Srinivasa Rao Mandadapu Date: Fri May 27 19:40:08 2022 +0530 ASoC: qcom: lpass-platform: Update VMA access permissions in mmap callback Replace page protection permissions from noncashed to writecombine, in lpass codec DMA path mmp callabck, to support 64 bit chromeOS. Avoid SIGBUS error in userspace caused by noncached permissions in 64 bit chromeOS. Signed-off-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/1653660608-27245-1-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown sound/soc/qcom/lpass-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3929ead38d61abe6c5302adce1d490f5c041d4b3 Author: Hui Wang Date: Mon May 30 12:01:50 2022 +0800 ASoC: nau8822: Add operation for internal PLL off and on We tried to enable the audio on an imx6sx EVB with the codec nau8822, after setting the internal PLL fractional parameters, the audio still couldn't work and the there was no sdma irq at all. After checking with the section "8.1.1 Phase Locked Loop (PLL) Design Example" of "NAU88C22 Datasheet Rev 0.6", we found we need to turn off the PLL before programming fractional parameters and turn on the PLL after programming. After this change, the audio driver could record and play sound and the sdma's irq is triggered when playing or recording. Cc: David Lin Cc: John Hsu Cc: Seven Li Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20220530040151.95221-2-hui.wang@canonical.com Signed-off-by: Mark Brown sound/soc/codecs/nau8822.c | 4 ++++ sound/soc/codecs/nau8822.h | 3 +++ 2 files changed, 7 insertions(+) commit 8d0b512844fdee83b6299647aa178828a4ebfc3b Author: Atsushi Nemoto Date: Thu May 19 08:46:04 2022 +0900 spi: spi-ti-qspi: Support per-transfer and per-slave speed_hz settings The spi-ti-qspi driver initializes its spi clock by the spi-max-frequency property from the controller node, and ignores per-transfer (and per-slave) speed_hz settings. Isolate clock settings out from ti_qspi_setup() and call it from ti_qspi_start_transfer_one() and ti_qspi_exec_mem_op(), using per-transfer speed_hz and per-slave max_speed_hz settings. Also drop spi_max_frequency from struct ti_qspi and use spi_master's max_speed_hz. Signed-off-by: Atsushi Nemoto Link: https://lore.kernel.org/r/20220519.084604.966119051165023533.atsushi.nemoto@sord.co.jp Signed-off-by: Mark Brown drivers/spi/spi-ti-qspi.c | 75 ++++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 36 deletions(-) commit 6598b91b5ac32bc756d7c3000a31f775d4ead1c4 Author: David Jander Date: Tue May 24 11:18:08 2022 +0200 spi: spi.c: Convert statistics to per-cpu u64_stats_t This change gives a dramatic performance improvement in the hot path, since many costly spin_lock_irqsave() calls can be avoided. On an i.MX8MM system with a MCP2518FD CAN controller connected via SPI, the time the driver takes to handle interrupts, or in other words the time the IRQ line of the CAN controller stays low is mainly dominated by the time it takes to do 3 relatively short sync SPI transfers. The effect of this patch is a reduction of this time from 136us down to only 98us. Suggested-by: Andrew Lunn Signed-off-by: David Jander Link: https://lore.kernel.org/r/20220524091808.2269898-1-david@protonic.nl Signed-off-by: Mark Brown drivers/spi/spi.c | 143 +++++++++++++++++++++++++++++++++--------------- include/linux/spi/spi.h | 52 ++++++++++-------- 2 files changed, 127 insertions(+), 68 deletions(-) commit b658be56e867061a0d5496e837f350974ada5c89 Author: Rob Herring Date: Wed May 25 16:00:53 2022 -0500 spi: dt-bindings: Move 'rx-sample-delay-ns' to spi-peripheral-props.yaml SPI bus per device properties must be defined in spi-peripheral-props.yaml for unevaluatedProperties checks to work correctly on device nodes. This has the side effect of promoting 'rx-sample-delay-ns' to be a common property, but functionally it's no different if it was defined in a Synopsys specific schema file. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220525210053.2488756-1-robh@kernel.org Signed-off-by: Mark Brown .../devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 18 +++++++++--------- .../devicetree/bindings/spi/spi-peripheral-props.yaml | 5 +++++ 2 files changed, 14 insertions(+), 9 deletions(-) commit 1f19a2d1d6b9a5796182874eecdd5a67dd94b90c Author: Christophe JAILLET Date: Sat May 21 08:59:35 2022 +0200 spi: intel: Use correct order for the parameters of devm_kcalloc() We should have 'n', then 'size', not the opposite. This is harmless because the 2 values are just multiplied, but having the correct order silence a (unpublished yet) smatch warning. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/d114558dd0351b863ced8cc01b31754a5a4b960d.1653116362.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown drivers/spi/spi-intel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dd9c232d47277960aba0c603c87a1cfd85d69438 Author: Amit Kumar Mahapatra Date: Thu May 12 20:28:20 2022 +0530 spi: spi-zynqmp-gqspi: Add two chip select support ZynqMP GQSPI controller can support up to two chip selects but the current GQSPI driver only support CS0. With this update and num-cs DT property set to 2 GQSPI driver can now support two slave devices each connected to one chip select. GQSPI driver configures the Lower CS and Upper CS based on the reg DT property. Changes tested on ZynqMP board with two SPI-NOR flashes each connected to a different CS. Signed-off-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20220512145820.20425-1-amit.kumar-mahapatra@xilinx.com Signed-off-by: Mark Brown drivers/spi/spi-zynqmp-gqspi.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 657f8bd88cb5a968d907fd1c891cee52dc156caa Author: Julia Lawall Date: Sat May 21 13:10:23 2022 +0200 spi: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-13-Julia.Lawall@inria.fr Signed-off-by: Mark Brown include/linux/spi/spi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 901fc8e8079e401f3240006cab6629e65579701c Author: Fabien Parent Date: Tue May 31 15:50:18 2022 +0200 spi: mt65xx: add MT8365 SoC bindings Add binding documentation for the MT8365 SoC. Signed-off-by: Fabien Parent Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220531135026.238475-10-fparent@baylibre.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml | 1 + 1 file changed, 1 insertion(+) commit 8523c96894e916b20ba3612e48e404fad5acfdd9 Author: Vaishnav Achath Date: Wed Jun 1 12:46:11 2022 +0530 spi: cadence-quadspi: Remove spi_master_put() in probe failure path Currently the spi_master is allocated by devm_spi_alloc_master() and devres core manages the deallocation, but in probe failure path spi_master_put() is being handled manually which causes "refcount underflow use-after-free" warning when probe failure happens after allocating spi_master. Trimmed backtrace during failure: refcount_t: underflow; use-after-free. pc : refcount_warn_saturate+0xf4/0x144 Call trace: refcount_warn_saturate kobject_put put_device devm_spi_release_controller devres_release_all This commit makes relevant changes to remove spi_master_put() from probe failure path. Fixes: 606e5d408184 ("spi: cadence-quadspi: Handle spi_unregister_master() in remove()") Signed-off-by: Vaishnav Achath Link: https://lore.kernel.org/r/20220601071611.11853-1-vaishnav.a@ti.com Signed-off-by: Mark Brown drivers/spi/spi-cadence-quadspi.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit f52b03c707444c5a3d1a0b9c5724f93ddc3c588e Author: Adithya K V Date: Tue May 24 19:31:32 2022 +0530 spi: s3c64xx: requests spi-dma channel only during data transfer Current s3c64xx SPI driver acquires DMA channel during driver probe and holds on it even when channels are not used (no DMA transfer). This is a problem especially when all the DMA channels are exhausted (as other IPs on the same DMA controller also acquires DMA channel) and if a new IP/Device requests for a DMA channel (on the same DMA controller), it won’t get DMA channel allocated. The said issue can be avoided if s3c64xx driver request and release DMA channel before and after data transfer. Let’s modify the driver to request and release DMA channel before and after DMA mode data transfer. Signed-off-by: Adithya K V Link: https://lore.kernel.org/r/20220524140132.59300-1-adithya.kv@samsung.com Signed-off-by: Mark Brown drivers/spi/spi-s3c64xx.c | 56 +++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 24 deletions(-) commit 8e3ca32f46994e74b7f43c57731150b2aedb2630 Author: Christophe JAILLET Date: Sun May 29 08:31:53 2022 +0200 spi: spi-altera-dfl: Fix an error handling path The spi_alloc_master() call is not undone in all error handling paths. Moreover, there is no .remove function to release the allocated memory. In order to fix both this issues, switch to devm_spi_alloc_master(). This allows further simplification of the probe. Fixes: ba2fc167e944 ("spi: altera: Add DFL bus driver for Altera API Controller") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/0607bb59f4073f86abe5c585d35245aef0b045c6.1653805901.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown drivers/spi/spi-altera-dfl.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 6ce7061a75f7edeebe8710502042810109698619 Author: Patrice Chotard Date: Thu Jun 2 11:25:40 2022 +0200 spi: stm32-qspi: Remove stm32_qspi_wait_poll_status() unused parameter op parameter is not used, remove it. Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20220602092540.369604-4-patrice.chotard@foss.st.com Signed-off-by: Mark Brown drivers/spi/spi-stm32-qspi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 75c28a43a43f2c09f8feeb58413449d65a77968b Author: Patrice Chotard Date: Thu Jun 2 11:25:39 2022 +0200 spi: stm32-qspi: Remove stm32_qspi_wait_cmd() unused parameter struct spi_mem_op *op parameter is no more used, remove it. Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20220602092540.369604-3-patrice.chotard@foss.st.com Signed-off-by: Mark Brown drivers/spi/spi-stm32-qspi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5945ff905764ceba7eb721bac7f61c7c5ce16a50 Author: Patrice Chotard Date: Thu Jun 2 11:25:38 2022 +0200 spi: stm32-qspi: Remove stm32_qspi_get_mode() unused parameter struct stm32_qspi *qsp is no more used remove it. Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20220602092540.369604-2-patrice.chotard@foss.st.com Signed-off-by: Mark Brown drivers/spi/spi-stm32-qspi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5f7202d827b8d39146b27c2f813849b1ad437beb Author: ChiYuan Huang Date: Thu Jun 2 13:44:06 2022 +0800 regulator: rt5190a: check if init_data is NULL, bypass rt5190a_of_parse_cb If the node for the match name cannot be found, 'of_regulator_match' will returns init_data as NULL for this regulator. Add the check for the init_data. If it's NULL, make 'rt5190a_of_parse_cb' function directly return. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1654148646-12182-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown drivers/regulator/rt5190a-regulator.c | 3 +++ 1 file changed, 3 insertions(+) commit fcdaf74a0abb6a4410b69dd80b525562457daafd Author: Robert Marko Date: Sat Jun 4 16:58:16 2022 +0200 regulator: mp5416: add support for MP5496 MP5496 is the updated version of MP5416 with the only difference being that now all Buck regulators have the same 0.6-2.1875V range with a 12.5mV step. Signed-off-by: Robert Marko Acked-by: Saravanan Sekar Link: https://lore.kernel.org/r/20220604145816.47576-4-robimarko@gmail.com Signed-off-by: Mark Brown drivers/regulator/mp5416.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit df43c245dd0535f6e2256e0261d43a4dd72b8b28 Author: Robert Marko Date: Sat Jun 4 16:58:15 2022 +0200 regulator: mp5416: use OF match data In preparation for adding support for MP5496 which slightly differs from MP5416 convert the driver to use OF match data instead of always using the MP5416 regulator_desc for regulator registration. Signed-off-by: Robert Marko Acked-by: Saravanan Sekar Link: https://lore.kernel.org/r/20220604145816.47576-3-robimarko@gmail.com Signed-off-by: Mark Brown drivers/regulator/mp5416.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit b9dea0184b2641fb3937162a617289b23d52a587 Author: Robert Marko Date: Sat Jun 4 16:58:14 2022 +0200 regulator: mp5416: alphabetically sort header includes Sort the header include list alphabetically. Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20220604145816.47576-2-robimarko@gmail.com Signed-off-by: Mark Brown drivers/regulator/mp5416.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 423156b3d37ba051e72e87a8b4791a2a0ea40592 Author: Robert Marko Date: Sat Jun 4 16:58:13 2022 +0200 regulator: dt-bindings: mps,mp5416: add MP5496 compatible MP5496 is the updated version of MP5416 with the only difference being that now all Buck regulators have the same 0.6-2.1875V range with a 12.5mV step. Since there is no way to differentiate them other than using compatibles, add compatible for the MP5496. Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20220604145816.47576-1-robimarko@gmail.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/regulator/mps,mp5416.yaml | 1 + 1 file changed, 1 insertion(+) commit 72607f372c9c27af458e4fa1411fbd3a2a448386 Author: Xiang wangx Date: Sat Jun 4 12:16:03 2022 +0800 regmap: cache: Fix syntax errors in comments Delete the redundant word 'the'. Signed-off-by: Xiang wangx Link: https://lore.kernel.org/r/20220604041603.9697-1-wangxiang@cdjrlc.com Signed-off-by: Mark Brown drivers/base/regmap/regcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac8a2ea48001a4c336fbaaa977642d5ad79cdbd8 Author: Mark Brown Date: Fri Jun 3 13:50:03 2022 +0200 ASoC: wm_adsp: Fix event generation for wm_adsp_fw_put() Currently wm_adsp_fw_put() returns 0 rather than 1 when updating the value of the control, meaning that no event is generated to userspace. Fix this by setting the default return value to 1, the code already exits early with a return value of 0 if the value is unchanged. Signed-off-by: Mark Brown Reviewed-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20220603115003.3865834-1-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2685d5046962f018b1a155b3eef316562414638b Author: Julia Lawall Date: Sat May 21 13:11:26 2022 +0200 ASoC: stm32: dfsdm: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-76-Julia.Lawall@inria.fr Signed-off-by: Mark Brown sound/soc/stm/stm32_adfsdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 063c915502b914a5a621458c763dfc28286f7606 Author: Shengjiu Wang Date: Wed May 25 13:23:41 2022 +0800 ASoC: fsl_mqs: simplify the code with adding fsl_mqs_soc_data Add soc specific data struct fsl_mqs_soc_data, move the definition of control register, each function bits to it, then the code can be simplified. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1653456221-21613-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_mqs.c | 119 +++++++++++++++++++++++++++++------------------- 1 file changed, 71 insertions(+), 48 deletions(-) commit 8366d8ca0f7805be6cffe1e242822565aed509ae Author: Mark Brown Date: Thu Jun 2 14:58:12 2022 +0200 ASoC: max9860: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the max9860 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Acked-by: Peter Rosin Link: https://lore.kernel.org/r/20220602125812.3551947-1-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/max9860.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 12ba5ceb4a08d5ea776d3eaf83c0cee63fafe952 Author: Minghao Chi Date: Thu Jun 2 07:18:09 2022 +0000 ASoC: mediatek: remove unnecessary check of clk_disable_unprepare Because clk_disable_unprepare already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Link: https://lore.kernel.org/r/20220602071809.278134-1-chi.minghao@zte.com.cn Signed-off-by: Mark Brown sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 82fa8f581a954ddeec1602bed9f8b4a09d100e6e Author: Jiasheng Jiang Date: Tue May 31 17:47:12 2022 +0800 ASoC: codecs: da7210: add check for i2c_add_driver As i2c_add_driver could return error if fails, it should be better to check the return value. However, if the CONFIG_I2C and CONFIG_SPI_MASTER are both true, the return value of i2c_add_driver will be covered by spi_register_driver. Therefore, it is necessary to add check and return error if fails. Fixes: aa0e25caafb7 ("ASoC: da7210: Add support for spi regmap") Signed-off-by: Jiasheng Jiang Link: https://lore.kernel.org/r/20220531094712.2376759-1-jiasheng@iscas.ac.cn Signed-off-by: Mark Brown sound/soc/codecs/da7210.c | 2 ++ 1 file changed, 2 insertions(+) commit 7472eb8d7dd12b6b9b1a4f4527719cc9c7f5965f Author: Miaoqian Lin Date: Fri Jun 3 12:34:15 2022 +0400 ASoC: mt6797-mt6351: Fix refcount leak in mt6797_mt6351_dev_probe of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: f0ab0bf250da ("ASoC: add mt6797-mt6351 driver and config option") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220603083417.9011-1-linmq006@gmail.com Signed-off-by: Mark Brown sound/soc/mediatek/mt6797/mt6797-mt6351.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 4f8ed19593872b710f27bbc3b7a9ce03310efc57 Author: Mark Brown Date: Thu Jun 2 15:10:58 2022 +0200 ASoC: tfa9879: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the tfa9879 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Acked-by: Peter Rosin Link: https://lore.kernel.org/r/20220602131058.3552621-1-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/tfa9879.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 32882881078bd8f8fae47ff69c102d9e691f5bb9 Author: Srinivasa Rao Mandadapu Date: Wed May 18 18:12:35 2022 +0530 ASoC: qcom: soundwire: Add support for controlling audio CGCR from HLOS Add support for controlling soundwire audio CGCR interface using clock framework to make hclk ungating with software. As per new hardware changes, software has to always ungate hclk if soundwire is operational and keep it running. This requirement is for latest LPASS chipsets for RX, TX and WSA path to work. Signed-off-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/1652877755-25120-1-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown drivers/soundwire/qcom.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit fef94875a72bc63ba60d2e12421d7f49d31523f0 Author: Mark Brown Date: Thu Jun 2 12:18:33 2022 +0200 ASoC: ops: Remove unneeded delay.h inclusion The ops code does not do any sleeps or delays so does not need delay.h. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602101833.3481641-1-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/soc-ops.c | 1 - 1 file changed, 1 deletion(-) commit bf1ebcddcb19a1b6d6d8b75b75626197a5a76d4f Author: Tang Bin Date: Wed May 25 21:50:23 2022 +0800 ASoC: stm32: sai: Remove useless define STM_SAI_IS_SUB_B(x) and STM_SAI_BLOCK_NAME(x) are not being used, so remove them. Signed-off-by: Tang Bin Acked-by: Olivier Moysan Link: https://lore.kernel.org/r/20220525135023.6792-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown sound/soc/stm/stm32_sai_sub.c | 2 -- 1 file changed, 2 deletions(-) commit 9c3148dec7d2d40ef727b8789d3e9410ad6d4a1f Author: zhangqilong Date: Thu Jun 2 15:20:24 2022 +0800 ASoC: fsl_xcvr:Fix unbalanced pm_runtime_enable in fsl_xcvr_probe a) Add missing pm_runtime_disable() when probe error out. It could avoid pm_runtime implementation complains when removing and probing again the driver. b) Add remove for missing pm_runtime_disable(). Fix:c590fa80b3928 ("ASoC: fsl_xcvr: register platform component before registering cpu dai") Signed-off-by: Zhang Qilong Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20220602072024.33236-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_xcvr.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 84965cc60e643db7049eb75bb9a6cc5cd66ee3d8 Author: Uwe Kleine-König Date: Fri May 20 19:33:49 2022 +0200 ASoC: cs35l45: Make cs35l45_remove() return void cs35l45_remove() always returns zero. Make it return no value which makes it easier to see in the callers that there is no error to handle. Also the return value of i2c driver remove callbacks is ignored anyway. This prepares making i2c remove callbacks return void, too. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax Reviewed-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20220520173349.774366-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown sound/soc/codecs/cs35l45-i2c.c | 4 +++- sound/soc/codecs/cs35l45.c | 4 +--- sound/soc/codecs/cs35l45.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 3ae190edc5f6f64f296f8dd15f4b511f529ab402 Author: Mark Brown Date: Fri Jun 3 12:35:30 2022 +0200 ASoC: nau8822: Don't reconfigure PLL to the same values When we configure the PLL record the input and output frequency, then if we get asked to configure the same values again just skip reprogramming the hardware. This makes things a bit easier to use for machine drivers since it means they don't need to keep track of if they've programmed the PLL so much. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220603103530.3844527-1-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/nau8822.c | 7 +++++++ sound/soc/codecs/nau8822.h | 2 ++ 2 files changed, 9 insertions(+) commit ff31753fcb061b90bd8c356d5b27a6eb5f8ade15 Author: Kuninori Morimoto Date: Mon May 30 04:28:44 2022 +0000 ASoC: simple-card-utils: rename asoc_simple_init_dai_link_params() to asoc_simple_init_for_codec2codec() commit 95cfc0a0aaf5752071 ("ASoC: simple-card: Add support for codec2codec DAI links") added the function asoc_simple_init_dai_link_params() to initialize dai_link "params". It is very straight naming, but difficult to noticed that it is for Codec2Codec support. Handling Codec2Codec is one of very tricky part on ALSA SoC, thus it is very important to clarify it. This patch renames the function name. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o7zflk3n.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/generic/simple-card-utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6398b004cfcce38626f3ba6fa5853177a3501aae Author: Shengjiu Wang Date: Fri May 20 11:06:00 2022 +0800 ASoC: fsl_asrc_dma: enable dual fifo for ASRC P2P The SSI and SPDIF has dual fifos, enhance P2P for these case with using the sdma_peripheral_config struct Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1653015960-15474-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_asrc_dma.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit d0da7c8668dc19df157d927a67721ca00e29ff2b Author: Alexander Martinz Date: Thu Jun 2 18:45:04 2022 +0200 ASoC: dt-bindings: nxp,tfa989x: Add tfa9890 support Document TFA9890 binding for tfa989x. Signed-off-by: Alexander Martinz Reviewed-by: Stephan Gerhold Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220602164504.261361-2-amartinz@shiftphones.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/nxp,tfa989x.yaml | 1 + 1 file changed, 1 insertion(+) commit ef6c320942a2f057204702d769d507186fd7f0b7 Author: Alexander Martinz Date: Thu Jun 2 18:45:03 2022 +0200 ASoC: codecs: tfa989x: Add support for tfa9890 The initialization sequence is taken from the version provided by the supplier [1]. This allows speakers using the TFA9890 amplifier to work, which are used by various mobile phones such as the SHIFT6mq. [1]: https://source.codeaurora.org/external/mas/tfa98xx/tree/src/tfa_init.c?id=d2cd12931fbc48df988b62931fb9960d4e9dc05d#n1827 Signed-off-by: Alexander Martinz Reviewed-by: Stephan Gerhold Link: https://lore.kernel.org/r/20220602164504.261361-1-amartinz@shiftphones.com Signed-off-by: Mark Brown sound/soc/codecs/tfa989x.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit aa7407f807b250eca7697e5fe9a699bc6c2fab71 Author: Randy Dunlap Date: Sun Jun 5 09:31:23 2022 -0700 ASoC: max98390: use linux/gpio/consumer.h to fix build Change the header file to fix build errors in max98390.c: ../sound/soc/codecs/max98390.c: In function 'max98390_i2c_probe': ../sound/soc/codecs/max98390.c:1076:22: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_regulator_get_optional'? [-Werror=implicit-function-declaration] 1076 | reset_gpio = devm_gpiod_get_optional(&i2c->dev, ../sound/soc/codecs/max98390.c:1077:55: error: 'GPIOD_OUT_HIGH' undeclared (first use in this function); did you mean 'GPIOF_INIT_HIGH'? 1077 | "reset", GPIOD_OUT_HIGH); ../sound/soc/codecs/max98390.c:1077:55: note: each undeclared identifier is reported only once for each function it appears in ../sound/soc/codecs/max98390.c:1083:17: error: implicit declaration of function 'gpiod_set_value_cansleep'; did you mean 'gpio_set_value_cansleep'? [-Werror=implicit-function-declaration] 1083 | gpiod_set_value_cansleep(reset_gpio, 0); Fixes: 397ff0249606 ("ASoC: max98390: Add reset gpio control") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Steve Lee Cc: Mark Brown Cc: Liam Girdwood Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org Link: https://lore.kernel.org/r/20220605163123.23537-1-rdunlap@infradead.org Signed-off-by: Mark Brown sound/soc/codecs/max98390.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae4f11c1ed2d67192fdf3d89db719ee439827c11 Author: Miaoqian Lin Date: Thu Jun 2 07:41:42 2022 +0400 ASoC: mediatek: mt8173: Fix refcount leak in mt8173_rt5650_rt5676_dev_probe of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Fix missing of_node_put() in error paths. Fixes: 94319ba10eca ("ASoC: mediatek: Use platform_of_node for machine drivers") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220602034144.60159-1-linmq006@gmail.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 22205521770ee740f64a3ec90301f50e34738cfd Author: Marco Felsch Date: Wed Jun 1 11:23:42 2022 +0200 ASoC: fsl_sai: add error message in case of missing imx-pcm-dma support If the imx-pcm-dma is required we need to have the module enabled. For all NXP/FSL sound cards using the ASoC architecture this is the case but in case of using the simple-audio-card sound card this isn't the case. In such case the driver probe fails silently and the card isn't available. It took a while to find the missing Kconfig. Make this easier for others by printing a error if this the module isn't available but required by the HW. Signed-off-by: Marco Felsch Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20220601092342.3328644-3-m.felsch@pengutronix.de Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f53f50ee21d46094a8c48970e95e38a4deaa128e Author: Marco Felsch Date: Wed Jun 1 11:23:40 2022 +0200 ASoC: fsl_sai: use local device pointer Use a local variable to dereference the device pointer once and use the local variable in further calls. No functional changes. Signed-off-by: Marco Felsch Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20220601092342.3328644-1-m.felsch@pengutronix.de Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 53 +++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 26 deletions(-) commit 99b5c107506c728b8a7d25742cf13f6c9c89d6ea Author: Mark Brown Date: Thu Jun 2 11:29:20 2022 +0200 ASoC: ops: Clarify snd_soc_info_volsw_sx() Currently snd_soc_info_volsw_sx() is implemented indirectly, wrapping snd_soc_info_volsw() and modifying the values it sets up rather than directly setting up the values reported to userspace. This makes it much harder to follow what the intended behaviour of these controls is. Let's rewrite the function to be self contained with a clarifying comment at the top in an effort to help maintainability. Signed-off-by: Mark Brown Reviewed-by: Charles Keepax Tested-by: Charles Keepax Link: https://lore.kernel.org/r/20220602092921.3302713-1-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/soc-ops.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit b661a848a50c0cc3e0b79795c74469d7b50ff4ac Author: Julia Lawall Date: Sat May 21 13:11:29 2022 +0200 ASoC: amd: acp: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-79-Julia.Lawall@inria.fr Signed-off-by: Mark Brown sound/soc/amd/acp/acp-pdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b521e85eefa384a5c31984b1a7e0d71b762c9663 Author: Christophe JAILLET Date: Sat May 28 10:00:53 2022 +0200 ASoC: ab8500: Remove some leftover from the "Replace GPLv2 boilerplate/reference with SPDX" rules The "Replace GPLv2 boilerplate/reference with SPDX" has left some empty "License terms" paragraphs. Remove them as well. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/28c0833d4a11f8f75f385e5aad93c23721b06c7e.1653724847.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown sound/soc/codecs/ab8500-codec.c | 2 -- sound/soc/codecs/ab8500-codec.h | 2 -- 2 files changed, 4 deletions(-) commit 2f4a8171da06609bb6a063630ed546ee3d93dad7 Author: Fabio Estevam Date: Wed May 25 22:05:43 2022 -0300 ASoC: imx-audmux: Silence a clang warning Change the of_device_get_match_data() cast to (uintptr_t) to silence the following clang warning: sound/soc/fsl/imx-audmux.c:301:16: warning: cast to smaller integer type 'enum imx_audmux_type' from 'const void *' [-Wvoid-pointer-to-enum-cast] Reported-by: kernel test robot Fixes: 6a8b8b582db1 ("ASoC: imx-audmux: Remove unused .id_table") Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20220526010543.1164793-1-festevam@gmail.com Signed-off-by: Mark Brown sound/soc/fsl/imx-audmux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8466579b63cc9aa957b7b4f273087512f989d2a1 Author: Christophe JAILLET Date: Sat May 28 09:59:22 2022 +0200 ASoC: ux500: Remove some leftover from the "Replace GPLv2 boilerplate/reference with SPDX" rules The "Replace GPLv2 boilerplate/reference with SPDX" has left some empty "License terms" paragraphs. Remove them as well. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/84d94977c57deee9e85249f18394ebf8d72497bc.1653724723.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown sound/soc/ux500/mop500.c | 2 -- sound/soc/ux500/mop500_ab8500.c | 2 -- sound/soc/ux500/mop500_ab8500.h | 2 -- sound/soc/ux500/ux500_msp_dai.c | 2 -- sound/soc/ux500/ux500_msp_dai.h | 2 -- sound/soc/ux500/ux500_msp_i2s.c | 2 -- sound/soc/ux500/ux500_msp_i2s.h | 2 -- sound/soc/ux500/ux500_pcm.c | 2 -- sound/soc/ux500/ux500_pcm.h | 2 -- 9 files changed, 18 deletions(-) commit 3e2649c5e8643bea0867bb1dd970fedadb0eb7f3 Author: Miaoqian Lin Date: Fri Jun 3 17:06:39 2022 +0400 ASoC: samsung: Fix error handling in aries_audio_probe of_get_child_by_name() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. This function is missing of_node_put(cpu) in the error path. Fix this by goto out label. of_node_put() will check NULL pointer. Fixes: 7a3a7671fa6c ("ASoC: samsung: Add driver for Aries boards") Signed-off-by: Miaoqian Lin Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220603130640.37624-1-linmq006@gmail.com Signed-off-by: Mark Brown sound/soc/samsung/aries_wm8994.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0a034d93ee929a9ea89f3fa5f1d8492435b9ee6e Author: Miaoqian Lin Date: Fri Jun 3 17:10:43 2022 +0400 ASoC: cros_ec_codec: Fix refcount leak in cros_ec_codec_platform_probe of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: b6bc07d4360d ("ASoC: cros_ec_codec: support WoV") Signed-off-by: Miaoqian Lin Reviewed-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220603131043.38907-1-linmq006@gmail.com Signed-off-by: Mark Brown sound/soc/codecs/cros_ec_codec.c | 1 + 1 file changed, 1 insertion(+) commit 7188b28f6686af0bc4aa1f96d720de782769a0a9 Author: Pierre-Louis Bossart Date: Fri May 20 16:17:19 2022 -0500 ASoC: meson: remove useless initialization cppcheck complains about invalid NULL dereferences but there's indeed no need to initialize a loop variable. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220520211719.607543-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/meson/meson-codec-glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c57064e3fdba9bb76086b9a6e318eb0cef24b69 Author: Pierre-Louis Bossart Date: Fri May 20 16:17:18 2022 -0500 ASoC: samsung: snow: simplify error handling cppcheck warning: sound/soc/samsung/snow.c:219:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/samsung/snow.c:215:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/samsung/snow.c:219:9: note: Returning identical expression 'ret' return ret; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220520211719.607543-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/samsung/snow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59a6cc5c5d64ca20461fec46e450e0639b1e6410 Author: Pierre-Louis Bossart Date: Fri May 20 16:17:17 2022 -0500 ASoC: rockchip: simplify error handling cppcheck warning: sound/soc/rockchip/rk3288_hdmi_analog.c:256:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/rockchip/rk3288_hdmi_analog.c:252:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/rockchip/rk3288_hdmi_analog.c:256:9: note: Returning identical expression 'ret' return ret; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220520211719.607543-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/rockchip/rk3288_hdmi_analog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7518be0cc120d7617a8985787196cd5776b93688 Author: Pierre-Louis Bossart Date: Fri May 20 16:17:16 2022 -0500 ASoC: qcom: q6dsp: remove spurious space cppcheck warning: sound/soc/qcom/qdsp6/q6adm.c:183:14: warning:inconclusive: Found suspicious oper ator '*' [constStatement] } __packed * open = data->payload; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220520211719.607543-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/qcom/qdsp6/q6adm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 015d9ab7805fb1b3766d1dc487ed34dbc03bd4da Author: Pierre-Louis Bossart Date: Fri May 20 16:17:15 2022 -0500 ASoC: qcom: q6dsp: q6adm: remove useless initializations cppcheck complains about invalid NULL dereferences but there's indeed no need to initialize loop variables. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220520211719.607543-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/qcom/qdsp6/q6adm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9e9fb5d3f387788d50f5eae4c01ff60429691e71 Author: Pierre-Louis Bossart Date: Fri May 20 16:17:14 2022 -0500 ASoC: mediatek: mt8195: simplify error handling cppcheck warnings: sound/soc/mediatek/mt8195/mt8195-afe-clk.c:311:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/mediatek/mt8195/mt8195-afe-clk.c:297:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/mediatek/mt8195/mt8195-afe-clk.c:311:9: note: Returning identical expression 'ret' return ret; ^ sound/soc/mediatek/mt8195/mt8195-afe-clk.c:341:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/mediatek/mt8195/mt8195-afe-clk.c:338:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/mediatek/mt8195/mt8195-afe-clk.c:341:9: note: Returning identical expression 'ret' return ret; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220520211719.607543-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8195/mt8195-afe-clk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f057852fd351741d1efaadc48aa59ea49c79a087 Author: Pierre-Louis Bossart Date: Fri May 20 16:17:13 2022 -0500 ASoC: Intel: sof_pcm512x: remove unnecessary init cppcheck complains about an invalid NULL dereference but indeed there is no need to initialize a loop variable. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220520211719.607543-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_pcm512x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9972773c26125242b467f0062c1fee874c87ae68 Author: Pierre-Louis Bossart Date: Fri May 20 16:17:12 2022 -0500 ASoC: Intel: boards: reset acpi_chan_package cppcheck complains about possible tests of uninitialized 'aif_value' members. This isn't really possible but static analysis cannot know what ACPICA does, so make sure the acpi_chan_package structure is reset prior to use to make the warning go away. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220520211719.607543-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 2 +- sound/soc/intel/boards/bytcr_rt5651.c | 2 +- sound/soc/intel/boards/cht_bsw_rt5645.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit f6cd55a19f3f46e3d36b1121f844956128c60b6a Author: Pierre-Louis Bossart Date: Fri May 20 16:17:11 2022 -0500 ASoC: Intel: atom: controls: remove useless initializations cppcheck complains about invalid NULL dereferences but there's indeed no need to initialize loop variables or before allocating memory. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220520211719.607543-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/atom/sst-atom-controls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a140785b701d286374ea1b26762f333e4f5e9ee3 Author: Pierre-Louis Bossart Date: Fri May 20 16:17:10 2022 -0500 ASoC: Intel: atom: sst_ipc: remove useless initializations cppcheck throws invalid NULL dereference warnings but there's indeed no need to initialize a loop variable or initialize to NULL before allocating memory. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220520211719.607543-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_ipc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d8af541139fa135a250c5ae743bfec3b49e97c3a Author: Pierre-Louis Bossart Date: Fri May 20 16:17:09 2022 -0500 ASoC: Intel: atom: sst_ipc: remove redundant test cppcheck warning: sound/soc/intel/atom/sst/sst_ipc.c:344:30: style: Condition 'drv_id' is always true [knownConditionTrueFalse] if (msg_high.part.result && drv_id && !msg_high.part.large) { ^ sound/soc/intel/atom/sst/sst_ipc.c:337:13: note: Assuming that condition 'drv_id==0' is not redundant if (drv_id == SST_ASYNC_DRV_ID) { ^ sound/soc/intel/atom/sst/sst_ipc.c:344:30: note: Condition 'drv_id' is always true if (msg_high.part.result && drv_id && !msg_high.part.large) { ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220520211719.607543-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb6ed937aaa0703bcdacfe013897d583a6eba365 Author: Pierre-Louis Bossart Date: Fri May 20 16:17:08 2022 -0500 ASoC: Intel: atom: sst: remove useless initialization cppcheck reports an invalid null pointer dereference but there's indeed no need to initialize a loop variable. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220520211719.607543-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0016361dfcc93a70850c6909fb76f15305dda5ae Author: Pierre-Louis Bossart Date: Fri May 20 16:17:07 2022 -0500 ASoC: wcd9335: remove redundant tests cppcheck warning: sound/soc/codecs/wcd9335.c:1810:23: style: Condition 'tx_port>=4' is always true [knownConditionTrueFalse] } else if ((tx_port >= 4) && (tx_port < 8)) { ^ sound/soc/codecs/wcd9335.c:1806:15: note: Assuming that condition 'tx_port<4' is not redundant if (tx_port < 4) { ^ sound/soc/codecs/wcd9335.c:1810:23: note: Condition 'tx_port>=4' is always true } else if ((tx_port >= 4) && (tx_port < 8)) { ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220520211719.607543-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/wcd9335.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cac24a360a6b948ffb75c3d7ccc819064300454c Author: Pierre-Louis Bossart Date: Fri May 20 16:17:06 2022 -0500 ASoC: wcd-mbhc-v2: remove useless initialization cppcheck warning: sound/soc/codecs/wcd-mbhc-v2.c:1309:17: style: Variable 'clamp_state' is assigned a value that is never used. [unreadVariable] u8 clamp_state = 0; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220520211719.607543-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/wcd-mbhc-v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94f8f2068ed0e3a5e367029f64ed76e6e65d5eb3 Author: Pierre-Louis Bossart Date: Fri May 20 16:17:05 2022 -0500 ASoC: cs42l42: remove redundant test cppcheck warning: sound/soc/codecs/cs42l42.c:1704:28: style: The statement 'if (cs42l42->plug_state!=CS42L42_TS_TRANS) cs42l42->plug_state=CS42L42_TS_TRANS' is logically equivalent to 'cs42l42->plug_state=CS42L42_TS_TRANS'. [duplicateConditionalAssign] if (cs42l42->plug_state != CS42L42_TS_TRANS) ^ sound/soc/codecs/cs42l42.c:1705:25: note: Assignment 'cs42l42->plug_state=CS42L42_TS_TRANS' cs42l42->plug_state = CS42L42_TS_TRANS; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220520211719.607543-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/cs42l42.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0511e2ac4e848ceac14b3ac4b476f0e26b48ddb2 Author: Pierre-Louis Bossart Date: Fri May 20 16:17:04 2022 -0500 ASoC: cs35l45: typo in argument definition cppcheck warning: sound/soc/codecs/cs35l45-tables.c:36:49: style:inconclusive: Function 'cs35l45_apply_patch' argument 1 names different: declaration 'cs43l45' definition 'cs35l45'. [funcArgNamesDifferent] Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20220520211719.607543-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/cs35l45.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 627a18149250e13409079ffb6936e472c3766f44 Author: Mark Brown Date: Thu Jun 2 15:05:31 2022 +0200 ASoC: ssm4567: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the ssm4567 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602130531.3552275-4-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/ssm4567.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0160e8835fab4d4a15abefe7509d0397890c0ffd Author: Mark Brown Date: Thu Jun 2 15:05:30 2022 +0200 ASoC: ssm2602: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the ssm2602 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602130531.3552275-3-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/ssm2602.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8dc51d009fad7aba0575e0eb4b684d25c0f01f37 Author: Mark Brown Date: Thu Jun 2 15:05:29 2022 +0200 ASoC: ssm2518: Use modern ASoC DAI format terminology As part of moving to remove the old style defines for the bus clocks update the ssm2518 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220602130531.3552275-2-broonie@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/ssm2518.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4dc6737cfe882765d914fcb88b5eaa14551ffddd Author: V sujith kumar Reddy Date: Tue May 31 17:38:12 2022 +0530 ASoC: amd: acp: Add support for rt5682s and rt1019 card with hs instance We have new platform with rt5682s as a primary codec and rt1019 as an amp codec. Add machine struct to register sof audio based sound card on such Chrome machine. Here we are configuring as a soc mclk master and codec slave. Signed-off-by: V sujith kumar Reddy Link: https://lore.kernel.org/r/20220531120813.47116-3-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown sound/soc/amd/acp-config.c | 9 +++++ sound/soc/amd/acp/acp-mach-common.c | 67 +++++++++++++++++++++++++++++++------ sound/soc/amd/acp/acp-sof-mach.c | 15 +++++++++ 3 files changed, 81 insertions(+), 10 deletions(-) commit 0439eb4d94e0fc17c6dd3829fabd88c11773381d Author: V sujith kumar Reddy Date: Tue May 31 17:38:11 2022 +0530 ASoC: amd: acp: Add support for nau8825 and max98360 card We have new platform with nau8825 as a primary codec and max98360 as an amp codec. Add machine struct to register sof audio based sound card on such Chrome machine. Signed-off-by: V sujith kumar Reddy Reviewed-by: Akihiko Odaki Link: https://lore.kernel.org/r/20220531120813.47116-2-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown sound/soc/amd/acp-config.c | 21 +++++ sound/soc/amd/acp/Kconfig | 1 + sound/soc/amd/acp/acp-mach-common.c | 166 ++++++++++++++++++++++++++++++++++-- sound/soc/amd/acp/acp-mach.h | 3 + sound/soc/amd/acp/acp-sof-mach.c | 15 ++++ sound/soc/amd/mach-config.h | 1 + 6 files changed, 201 insertions(+), 6 deletions(-) commit 97076475e2fdf471348b9ce73215cdbceeb4390f Author: Stefan Binding Date: Wed May 25 14:16:31 2022 +0100 ASoC: cs35l41: Do not print error when waking from hibernation When waking from hibernation, it is possible for the function which sends the wake command to fail initially, but after a retry it will succeed. There is no need to print an error if the initial attempts fail. Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20220525131638.5512-11-vitalyr@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cs35l41-lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e341efc308e5374ded6b471f9e1ec01450bcc93e Author: Stefan Binding Date: Wed May 25 14:16:32 2022 +0100 ASoC: cs35l41: Add common cs35l41 enter hibernate function Since the CS35L41 HDA driver also support hibernation, it makes sense to move code from the ASoC driver to enter hibernation into common code. Since HDA must support laptops which do not support hibernation due to lack of external boost GPIO it is necessary to ensure the function returns an error when an unsupported boost type is in use. Acked-by: Charles Keepax Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20220525131638.5512-12-vitalyr@opensource.cirrus.com Signed-off-by: Mark Brown include/sound/cs35l41.h | 2 ++ sound/soc/codecs/cs35l41-lib.c | 19 +++++++++++++++++++ sound/soc/codecs/cs35l41.c | 10 +--------- 3 files changed, 22 insertions(+), 9 deletions(-) commit 94e0bc317ad241c022a6bb311b3a28b4d51ea8b6 Author: Stefan Binding Date: Wed May 25 14:16:30 2022 +0100 ASoC: cs35l41: Move cs35l41 exit hibernate function into shared code CS35L41 HDA Driver will support hibernation using DSP firmware, move the exit hibernate function into shared code so this can be reused. Acked-by: Charles Keepax Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20220525131638.5512-10-vitalyr@opensource.cirrus.com Signed-off-by: Mark Brown include/sound/cs35l41.h | 1 + sound/soc/codecs/cs35l41-lib.c | 60 +++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/cs35l41.c | 61 +----------------------------------------- 3 files changed, 62 insertions(+), 60 deletions(-) commit fb68cb963bb78380166a98beea593d20b956e4c3 Author: Uwe Kleine-König Date: Fri Jun 3 16:05:13 2022 +0200 ASoC: da732x: Drop no-op remove function A remove callback that just returns 0 is equivalent to no callback at all as can be seen in i2c_device_remove(). So simplify accordingly. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220603140513.131142-5-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown sound/soc/codecs/da732x.c | 6 ------ 1 file changed, 6 deletions(-) commit 3cce931a5e4487f7339be559e2ea032478be021a Author: Uwe Kleine-König Date: Fri Jun 3 16:05:12 2022 +0200 ASoC: lm49453: Drop no-op remove function A remove callback that just returns 0 is equivalent to no callback at all as can be seen in i2c_device_remove(). So simplify accordingly. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220603140513.131142-4-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown sound/soc/codecs/lm49453.c | 6 ------ 1 file changed, 6 deletions(-) commit 8a291eebeb633316edad2e80537a3c7df83ee8dc Author: Uwe Kleine-König Date: Fri Jun 3 16:05:11 2022 +0200 ASoC: da7219: Drop no-op remove function A remove callback that just returns 0 is equivalent to no callback at all as can be seen in i2c_device_remove(). So simplify accordingly. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220603140513.131142-3-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown sound/soc/codecs/da7219.c | 6 ------ 1 file changed, 6 deletions(-) commit 60391d788a221f1866492a71929483790b772676 Author: Uwe Kleine-König Date: Fri Jun 3 16:05:10 2022 +0200 ASoC: ak4642: Drop no-op remove function A remove callback that just returns 0 is equivalent to no callback at all as can be seen in i2c_device_remove(). So simplify accordingly. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20220603140513.131142-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown sound/soc/codecs/ak4613.c | 6 ------ 1 file changed, 6 deletions(-) commit 28086d05ada6d03daa886aad0e469854b811311c Author: Charles Keepax Date: Thu May 19 16:43:18 2022 +0100 ASoC: simple-card-utils: Move snd_soc_component_is_codec to be local The helper function snd_soc_component_is_codec is based off the presence of the non_legacy_dai_naming flag. This isn't super robust as CPU side components may also specify this flag, and indeed the kernel already contains a couple that do. After componentisation there isn't really a totally robust solution to identifying what is a CODEC driver, without introducing a flag specifically for that purpose, and really the desirable direction to move in is that the distinction doesn't matter. This patch does two things to try to mitigate these problems. Firstly, now that all the other users of the helper function have been removed, it makes the helper function local to the driver rather, than being part of the core. This should help to discourage any new code from being created that depends on the CODEC driver distinction. Secondly, it updates the helper function itself to use the endianness flag rather than the non_legacy_dai_naming flag. The endianness flag is definitely invalid on a CPU side component, so it a more reliable indicator that the device is definitely a CODEC. The vast majority of buses require the CODEC to set the endianness flag, so the number of corner cases should be fairly minimal. It is worth noting that CODECs sending audio over SPI, or built into the CPU CODECs are potential corner cases, however the hope is that in most cases those types of devices do not consitute a simple audio card. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-57-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown include/sound/soc-component.h | 5 ----- sound/soc/generic/simple-card-utils.c | 7 ++++++- 2 files changed, 6 insertions(+), 6 deletions(-) commit 19423951a4b5c4f0ca107d6a4bed23f3f63718ca Author: Charles Keepax Date: Thu May 19 16:43:17 2022 +0100 ASoC: soc-dai: Remove set_fmt_new callback Now the behaviour of the core and all drivers is updated to the new direct clock specification the temporary set_fmt_new callback can be completely removed. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-56-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown include/sound/soc-dai.h | 1 - sound/soc/soc-dai.c | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) commit 58e23e21d18532aaa404e1db87ec92762e1fecd5 Author: Charles Keepax Date: Thu May 19 16:43:16 2022 +0100 ASoC: xtensa: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-55-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/xtensa/xtfpga-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e24ba1a21e244e7174e75ca0c4020beaff0ad369 Author: Charles Keepax Date: Thu May 19 16:43:15 2022 +0100 ASoC: ux500: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-54-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/ux500/ux500_msp_dai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ff1836023ae19013c01f230e6a091fad6835213 Author: Charles Keepax Date: Thu May 19 16:43:14 2022 +0100 ASoC: ti: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20220519154318.2153729-53-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/ti/davinci-i2s.c | 2 +- sound/soc/ti/davinci-mcasp.c | 2 +- sound/soc/ti/omap-mcbsp.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 408c122ef9de99220f7919594ab8af98194a19e8 Author: Charles Keepax Date: Thu May 19 16:43:13 2022 +0100 ASoC: test-component: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-52-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/generic/test-component.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 475f2af6a2ff33e828900601a162e324b9986f9a Author: Charles Keepax Date: Thu May 19 16:43:12 2022 +0100 ASoC: tegra: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-51-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/tegra/tegra20_i2s.c | 2 +- sound/soc/tegra/tegra210_i2s.c | 2 +- sound/soc/tegra/tegra30_i2s.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 15011b2388d020a6cdb323539fc69c31b04d9f21 Author: Charles Keepax Date: Thu May 19 16:43:11 2022 +0100 ASoC: sunxi: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-50-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-i2s.c | 2 +- sound/soc/sunxi/sun8i-codec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 02ba0d9680feee645a321d65012f38d0a368b559 Author: Charles Keepax Date: Thu May 19 16:43:10 2022 +0100 ASoC: stm: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-49-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/stm/stm32_i2s.c | 2 +- sound/soc/stm/stm32_sai_sub.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit adced68031f96642272fae4e8c36d45d13797306 Author: Charles Keepax Date: Thu May 19 16:43:09 2022 +0100 ASoC: sh: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-48-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/sh/fsi.c | 2 +- sound/soc/sh/rcar/core.c | 2 +- sound/soc/sh/rz-ssi.c | 2 +- sound/soc/sh/ssi.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit b99d00c724bcf395558cb3028e823bd8f554fee6 Author: Charles Keepax Date: Thu May 19 16:43:08 2022 +0100 ASoC: samsung: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220519154318.2153729-47-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/samsung/i2s.c | 2 +- sound/soc/samsung/pcm.c | 2 +- sound/soc/samsung/s3c-i2s-v2.c | 2 +- sound/soc/samsung/s3c24xx-i2s.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 059f16bc0e02164617312435c31dffdc419f113f Author: Charles Keepax Date: Thu May 19 16:43:07 2022 +0100 ASoC: rockchip: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-46-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 2 +- sound/soc/rockchip/rockchip_i2s_tdm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f1bd2fae856384f9377ca3faed0583d929002640 Author: Charles Keepax Date: Thu May 19 16:43:06 2022 +0100 ASoC: qcom: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-45-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/qcom/qdsp6/q6afe-dai.c | 2 +- sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8e2cc2b241bc0bb905231f301e6dfc80dc79f8a8 Author: Charles Keepax Date: Thu May 19 16:43:05 2022 +0100 ASoC: pxa: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-44-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/pxa/mmp-sspa.c | 2 +- sound/soc/pxa/pxa-ssp.c | 2 +- sound/soc/pxa/pxa2xx-i2s.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 1a805faeb4915496671cd24bd2a75cc97a85dfc8 Author: Charles Keepax Date: Thu May 19 16:43:04 2022 +0100 ASoC: mxs-saif: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-43-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/mxs/mxs-saif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eee6b5b9f3af0e906085022713ef41e56d03eca8 Author: Charles Keepax Date: Thu May 19 16:43:03 2022 +0100 ASoC: meson: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-42-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/meson/aiu-encoder-i2s.c | 2 +- sound/soc/meson/axg-tdm-interface.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 00ca2d152ef0fa9f4beb2a590e176499440de8fe Author: Charles Keepax Date: Thu May 19 16:43:02 2022 +0100 ASoC: mediatek: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-41-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 4 ++-- sound/soc/mediatek/mt8195/mt8195-dai-pcm.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 1724cc38e7685ad8b01413acd70a4a731fc105ae Author: Charles Keepax Date: Thu May 19 16:43:01 2022 +0100 ASoC: jz4740-i2s: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-40-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/jz4740/jz4740-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c14a6ce9848571cf67faff206b02e212bec82761 Author: Charles Keepax Date: Thu May 19 16:43:00 2022 +0100 ASoC: Intel: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-39-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/intel/atom/sst-mfld-platform-pcm.c | 2 +- sound/soc/intel/keembay/kmb_platform.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1830a30ec4cf1642a429e80dbbeb86aa7825c71a Author: Charles Keepax Date: Thu May 19 16:42:59 2022 +0100 ASoC: img: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-38-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/img/img-i2s-in.c | 2 +- sound/soc/img/img-i2s-out.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b9a7972818b84a15d46505df7808fd86c3fba5bb Author: Charles Keepax Date: Thu May 19 16:42:58 2022 +0100 ASoC: hisilicon: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-37-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/hisilicon/hi6210-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00778276cf4c611882219ab7aba9664c48981f1a Author: Charles Keepax Date: Thu May 19 16:42:57 2022 +0100 ASoC: fsl: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-36-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_audmix.c | 2 +- sound/soc/fsl/fsl_esai.c | 2 +- sound/soc/fsl/fsl_mqs.c | 2 +- sound/soc/fsl/fsl_sai.c | 2 +- sound/soc/fsl/fsl_ssi.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 765fb623a2cd925c550370f73efe2137c52a1b25 Author: Charles Keepax Date: Thu May 19 16:42:56 2022 +0100 ASoC: dwc: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-35-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/dwc/dwc-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 324a4db8de05290237793dc3d7da887846ae90c1 Author: Charles Keepax Date: Thu May 19 16:42:55 2022 +0100 ASoC: ep93xx: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-34-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/cirrus/ep93xx-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a267dd98c246237be00587b6e71f969bf75f10d Author: Charles Keepax Date: Thu May 19 16:42:54 2022 +0100 ASoC: bcm: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-33-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/bcm/bcm2835-i2s.c | 2 +- sound/soc/bcm/cygnus-ssp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2c73f5fd20a845fcb48173578b7c83dbcbacdeda Author: Charles Keepax Date: Thu May 19 16:42:53 2022 +0100 ASoC: au1x: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-32-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/au1x/i2sc.c | 2 +- sound/soc/au1x/psc-i2s.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a839a53b9dc70f94032a671ee019599884612d4a Author: Charles Keepax Date: Thu May 19 16:42:52 2022 +0100 ASoC: atmel: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-31-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/atmel/atmel-i2s.c | 2 +- sound/soc/atmel/atmel_ssc_dai.c | 2 +- sound/soc/atmel/mchp-i2s-mcc.c | 2 +- sound/soc/atmel/mchp-pdmc.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 346f47e784cd48b456f267a66e0daf1ef10d21b3 Author: Charles Keepax Date: Thu May 19 16:42:51 2022 +0100 ASoC: amd: vangogh: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-30-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/amd/vangogh/acp5x-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c076273a326cc5b5162451aacf7b7744bb03c66 Author: Charles Keepax Date: Thu May 19 16:42:50 2022 +0100 ASoC: core: Always send the CPU DAI a direct clock specifier All CPU drivers are now updated to accept a direct indication of whether they are clock provider or consumer, rather than being told if the CODEC is clock provider. As such update the core to always pass this direct indication rather than only if the new set_fmt_new callback is defined. Note this makes no difference to the CODEC side of the DAI link as it was already being directly told if it was clock provider under the old system. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-29-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/soc-core.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit e945206a0a448ac81dde0609578508368946f7a6 Author: Charles Keepax Date: Thu May 19 16:42:49 2022 +0100 ASoC: xtensa: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-28-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/xtensa/xtfpga-i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ce3467c78478e33927aea9043bf20f46fa4d5688 Author: Charles Keepax Date: Thu May 19 16:42:48 2022 +0100 ASoC: ux500: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-27-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/ux500/ux500_msp_dai.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 563ff63dc9fbb8ef4b8f145a53c84a5489bbd789 Author: Charles Keepax Date: Thu May 19 16:42:47 2022 +0100 ASoC: ti: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20220519154318.2153729-26-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/ti/davinci-i2s.c | 34 +++++++++++++++++----------------- sound/soc/ti/davinci-mcasp.c | 12 ++++++------ sound/soc/ti/omap-mcbsp.c | 14 +++++++------- 3 files changed, 30 insertions(+), 30 deletions(-) commit d444c8d246a62392c0d249b1030c3ca271d47649 Author: Charles Keepax Date: Thu May 19 16:42:46 2022 +0100 ASoC: test-component: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback. Signed-off-by: Charles Keepax Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20220519154318.2153729-25-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/generic/test-component.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit d92ad6633fa77f9496840b77c8effeaa13ac78dc Author: Charles Keepax Date: Thu May 19 16:42:45 2022 +0100 ASoC: tegra: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-24-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/tegra/tegra20_i2s.c | 8 ++++---- sound/soc/tegra/tegra210_i2s.c | 8 ++++---- sound/soc/tegra/tegra30_i2s.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) commit 7cc3965fde74c9c725ed01de4ac35bc7d562d16a Author: Charles Keepax Date: Thu May 19 16:42:44 2022 +0100 ASoC: sunxi: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-23-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-i2s.c | 20 ++++++++++---------- sound/soc/sunxi/sun8i-codec.c | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) commit 0092dac91ec1c404787841bdd9ecbf3404d1a41c Author: Charles Keepax Date: Thu May 19 16:42:43 2022 +0100 ASoC: stm: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-22-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/stm/stm32_i2s.c | 10 +++++----- sound/soc/stm/stm32_sai_sub.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) commit 2d4dd776e902546389f2d7808ece7fd815aa829c Author: Charles Keepax Date: Thu May 19 16:42:42 2022 +0100 ASoC: sh: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20220519154318.2153729-21-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/sh/fsi.c | 8 ++++---- sound/soc/sh/rcar/core.c | 6 +++--- sound/soc/sh/rz-ssi.c | 4 ++-- sound/soc/sh/ssi.c | 12 ++++++------ 4 files changed, 15 insertions(+), 15 deletions(-) commit 0b491c7c1b2555ef08285fd49a8567f2f9f34ff8 Author: Charles Keepax Date: Thu May 19 16:42:41 2022 +0100 ASoC: samsung: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-20-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/samsung/i2s.c | 8 ++++---- sound/soc/samsung/pcm.c | 6 +++--- sound/soc/samsung/s3c-i2s-v2.c | 8 ++++---- sound/soc/samsung/s3c24xx-i2s.c | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) commit 27646d265da1745b2d1d10fec18465631cb1135f Author: Charles Keepax Date: Thu May 19 16:42:40 2022 +0100 ASoC: rockchip: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax Tested-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20220519154318.2153729-19-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 8 ++++---- sound/soc/rockchip/rockchip_i2s_tdm.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit 1148e16b335f341f36475b646c692b4a71a1855e Author: Charles Keepax Date: Thu May 19 16:42:39 2022 +0100 ASoC: qcom: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-18-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/qcom/apq8016_sbc.c | 2 +- sound/soc/qcom/qdsp6/audioreach.c | 4 ++-- sound/soc/qcom/qdsp6/q6afe-dai.c | 2 +- sound/soc/qcom/qdsp6/q6afe.c | 6 +++--- sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 2 +- sound/soc/qcom/sc7180.c | 2 +- sound/soc/qcom/sdm845.c | 6 +++--- sound/soc/qcom/sm8250.c | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) commit 84c5b47c8ce4d5059d5e7539d3b44922cc0390e9 Author: Charles Keepax Date: Thu May 19 16:42:38 2022 +0100 ASoC: pxa: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-17-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/pxa/magician.c | 8 ++++---- sound/soc/pxa/mmp-sspa.c | 8 ++++---- sound/soc/pxa/pxa-ssp.c | 24 ++++++++++++------------ sound/soc/pxa/pxa2xx-i2s.c | 8 ++++---- 4 files changed, 24 insertions(+), 24 deletions(-) commit f3c0064f1f8e358799c70c7905a09d15c5ec5e5a Author: Charles Keepax Date: Thu May 19 16:42:37 2022 +0100 ASoC: mxs-saif: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-16-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/mxs/mxs-saif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f60442bf6eab47aa4ab127aab88afdcc29a09a73 Author: Charles Keepax Date: Thu May 19 16:42:36 2022 +0100 ASoC: meson: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-15-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/meson/aiu-encoder-i2s.c | 4 ++-- sound/soc/meson/axg-tdm-interface.c | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 3af99430f8d948a41556156155b0295dec274d41 Author: Charles Keepax Date: Thu May 19 16:42:35 2022 +0100 ASoC: mediatek: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-14-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 10 +++++----- sound/soc/mediatek/mt8195/mt8195-dai-pcm.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) commit cbb3a19f090d5a41b822caf9ff2058e1c6bc7ea3 Author: Charles Keepax Date: Thu May 19 16:42:34 2022 +0100 ASoC: js4740-i2s: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-13-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/jz4740/jz4740-i2s.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit add9ee8c64c617f561a309cdda50104e9e2c12f6 Author: Charles Keepax Date: Thu May 19 16:42:33 2022 +0100 ASoC: Intel: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-12-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/intel/atom/sst-atom-controls.c | 4 ++-- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 2 +- sound/soc/intel/boards/bytcht_cx2072x.c | 2 +- sound/soc/intel/boards/bytcht_da7213.c | 2 +- sound/soc/intel/boards/bytcht_es8316.c | 2 +- sound/soc/intel/boards/bytcht_nocodec.c | 2 +- sound/soc/intel/boards/bytcr_rt5640.c | 2 +- sound/soc/intel/boards/bytcr_rt5651.c | 2 +- sound/soc/intel/boards/bytcr_wm5102.c | 2 +- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 3 +-- sound/soc/intel/boards/cht_bsw_rt5645.c | 6 +++--- sound/soc/intel/boards/cht_bsw_rt5672.c | 2 +- sound/soc/intel/keembay/kmb_platform.c | 6 +++--- 13 files changed, 18 insertions(+), 19 deletions(-) commit ed2b384082a678a0c4c8c56deff9e5f46d5e3fca Author: Charles Keepax Date: Thu May 19 16:42:32 2022 +0100 ASoC: img: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-11-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/img/img-i2s-in.c | 6 +++--- sound/soc/img/img-i2s-out.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) commit 0f362524dd3face4865077a4f7e7e640a95702aa Author: Charles Keepax Date: Thu May 19 16:42:31 2022 +0100 ASoC: hisilicon: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-10-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/hisilicon/hi6210-i2s.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 3b14c15a333b8225ea38479e13c0366539d3374a Author: Charles Keepax Date: Thu May 19 16:42:30 2022 +0100 ASoC: fsl: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-9-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_audmix.c | 6 +++--- sound/soc/fsl/fsl_esai.c | 10 +++++----- sound/soc/fsl/fsl_mqs.c | 4 ++-- sound/soc/fsl/fsl_sai.c | 10 +++++----- sound/soc/fsl/fsl_ssi.c | 24 ++++++++++++------------ sound/soc/fsl/imx-audmix.c | 4 ++-- sound/soc/fsl/imx-card.c | 2 +- 7 files changed, 30 insertions(+), 30 deletions(-) commit ca0444f1f7b228ae3b8d1a5c0f0d1b4463171f98 Author: Charles Keepax Date: Thu May 19 16:42:29 2022 +0100 ASoC: dwc: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-8-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/dwc/dwc-i2s.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5d6124e58d56818249a6266f56d9c3739e72e1bd Author: Charles Keepax Date: Thu May 19 16:42:28 2022 +0100 ASoC: ep93xx: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-7-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/cirrus/ep93xx-i2s.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 04ea2404468b7885c560c3673f6f2fd368f305a2 Author: Charles Keepax Date: Thu May 19 16:42:27 2022 +0100 ASoC: bcm: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-6-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/bcm/bcm2835-i2s.c | 22 +++++++++++----------- sound/soc/bcm/cygnus-ssp.c | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) commit fee11f70849b21a244e6e27d281f3858b671bfea Author: Charles Keepax Date: Thu May 19 16:42:26 2022 +0100 ASoC: au1x: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-5-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/au1x/i2sc.c | 4 ++-- sound/soc/au1x/psc-i2s.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 0fd054a577180cd807992e32c7cd394e54c85903 Author: Charles Keepax Date: Thu May 19 16:42:25 2022 +0100 ASoC: atmel: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/atmel/atmel-i2s.c | 6 +++--- sound/soc/atmel/atmel_ssc_dai.c | 20 ++++++++++---------- sound/soc/atmel/mchp-i2s-mcc.c | 10 +++++----- sound/soc/atmel/mchp-pdmc.c | 6 +++--- 4 files changed, 21 insertions(+), 21 deletions(-) commit ab890e0f83a65624d20b0ca4a7cb6306b8511558 Author: Charles Keepax Date: Thu May 19 16:42:24 2022 +0100 ASoC: amd: vangogh: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/amd/vangogh/acp5x-i2s.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 905f3a04e184854555fc248ca4e692fdbf2f2547 Author: Charles Keepax Date: Thu May 19 16:42:23 2022 +0100 ASoC: core: Add set_fmt_new callback that directly specifies provider The original set_fmt callback always passes clock provider/consumer with respect to the CODEC. This made sense when the framework was directly broken down into platforms and CODECs. Now everything is componentised it simplifies things if each side of the link is just told if it is provider or consumer of the clocks. To start this migration add a new callback that can be used to receive a direct specification of clocking. As there are more CODEC drivers than platform drivers, we make the new flags identical to the old CODEC flags meaning CODEC drivers will not require an update. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220519154318.2153729-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown include/sound/soc-dai.h | 7 +++++++ sound/soc/soc-core.c | 3 ++- sound/soc/soc-dai.c | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) commit 6b5b0d6f36dd45e22f1710e8bcd97f28b4ba41f5 Author: Cezary Rojewski Date: Wed May 11 18:24:03 2022 +0200 ASoC: Intel: avs: Add da7219 machine board To support AVS-da7219 configuration add machine board connecting AVS platform component driver with da7219 codec one. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220511162403.3987658-15-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/Kconfig | 10 ++ sound/soc/intel/avs/boards/Makefile | 2 + sound/soc/intel/avs/boards/da7219.c | 282 ++++++++++++++++++++++++++++++++++++ 3 files changed, 294 insertions(+) commit 223a0a945821b96f4ccd9940ee975499706e1794 Author: Amadeusz Sławiński Date: Wed May 11 18:24:02 2022 +0200 ASoC: Intel: avs: Add max98373 machine board To support AVS-max98373 configuration add machine board connecting AVS platform component driver with max98373 codec one. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220511162403.3987658-14-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/Kconfig | 10 ++ sound/soc/intel/avs/boards/Makefile | 2 + sound/soc/intel/avs/boards/max98373.c | 239 ++++++++++++++++++++++++++++++++++ 3 files changed, 251 insertions(+) commit 282c8f8de72f95325225d94caef61f3cc96401da Author: Cezary Rojewski Date: Wed May 11 18:24:01 2022 +0200 ASoC: Intel: avs: Add max98357a machine board To support AVS-max98357a configuration add machine board connecting AVS platform component driver with max98357a codec one. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220511162403.3987658-13-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/Kconfig | 10 +++ sound/soc/intel/avs/boards/Makefile | 2 + sound/soc/intel/avs/boards/max98357a.c | 154 +++++++++++++++++++++++++++++++++ 3 files changed, 166 insertions(+) commit 69ea14efe99b533652255b07a9736a9856f50ea5 Author: Cezary Rojewski Date: Wed May 11 18:24:00 2022 +0200 ASoC: Intel: avs: Add ssm4567 machine board To support AVS-ssm4567 configuration add machine board connecting AVS platform component driver with ssm4567 codec one. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220511162403.3987658-12-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/Kconfig | 11 ++ sound/soc/intel/avs/boards/Makefile | 2 + sound/soc/intel/avs/boards/ssm4567.c | 271 +++++++++++++++++++++++++++++++++++ 3 files changed, 284 insertions(+) commit 32ee40b5590081a6b38a55e4ab16b47085f93afe Author: Cezary Rojewski Date: Wed May 11 18:23:59 2022 +0200 ASoC: Intel: avs: Add nau8825 machine board To support AVS-nau8825 configuration add machine board connecting AVS platform component driver with nau8825 codec one. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220511162403.3987658-11-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/Kconfig | 11 ++ sound/soc/intel/avs/boards/Makefile | 2 + sound/soc/intel/avs/boards/nau8825.c | 353 +++++++++++++++++++++++++++++++++++ 3 files changed, 366 insertions(+) commit 748102786b3ce0bf402c2dc42386cbfaab71ac39 Author: Cezary Rojewski Date: Wed May 11 18:23:58 2022 +0200 ASoC: Intel: avs: Add rt5682 machine board To support AVS-rt5682 configuration add machine board connecting AVS platform component driver with rt5682 codec one. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220511162403.3987658-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/Kconfig | 10 ++ sound/soc/intel/avs/boards/Makefile | 2 + sound/soc/intel/avs/boards/rt5682.c | 340 ++++++++++++++++++++++++++++++++++++ 3 files changed, 352 insertions(+) commit 88429ab16df4cd4a1a77d45b90ec95cf62cc22d1 Author: Cezary Rojewski Date: Wed May 11 18:23:57 2022 +0200 ASoC: Intel: avs: Add rt298 machine board To support AVS-rt298 configuration add machine board connecting AVS platform component driver with rt298 codec one. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220511162403.3987658-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/Kconfig | 10 ++ sound/soc/intel/avs/boards/Makefile | 2 + sound/soc/intel/avs/boards/rt298.c | 281 ++++++++++++++++++++++++++++++++++++ 3 files changed, 293 insertions(+) commit 1d395ee2e19b33a1008acfc7af186f2851b63d01 Author: Cezary Rojewski Date: Wed May 11 18:23:56 2022 +0200 ASoC: Intel: avs: Add rt286 machine board To support AVS-rt286 configuration add machine board connecting AVS platform component driver with rt286 codec one. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220511162403.3987658-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/Kconfig | 10 ++ sound/soc/intel/avs/boards/Makefile | 2 + sound/soc/intel/avs/boards/rt286.c | 281 ++++++++++++++++++++++++++++++++++++ 3 files changed, 293 insertions(+) commit e2a4cbf277c4561d01f1aafa3cfafe46bf3feec7 Author: Cezary Rojewski Date: Wed May 11 18:23:55 2022 +0200 ASoC: Intel: avs: Add rt274 machine board To support AVS-rt274 configuration add machine board connecting AVS platform component driver with rt274 codec one. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220511162403.3987658-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/Kconfig | 10 ++ sound/soc/intel/avs/boards/Makefile | 2 + sound/soc/intel/avs/boards/rt274.c | 310 ++++++++++++++++++++++++++++++++++++ 3 files changed, 322 insertions(+) commit e39acc4cfd9250e7b8ec01897570f3009659c3d6 Author: Cezary Rojewski Date: Wed May 11 18:23:54 2022 +0200 ASoC: Intel: avs: Add I2S-test machine board Allow for testing audio streaming over I2S interface through SSP loopback. No actual codec is needed here as board is intended for SSP loopback scenarios only. One playback and one capture endpoint is exposed per SSP port. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220511162403.3987658-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/Kconfig | 6 ++ sound/soc/intel/avs/boards/Makefile | 2 + sound/soc/intel/avs/boards/i2s_test.c | 180 ++++++++++++++++++++++++++++++++++ 3 files changed, 188 insertions(+) commit 6575e5cae7525b07d0b5fbd7d42323363919a867 Author: Cezary Rojewski Date: Wed May 11 18:23:53 2022 +0200 ASoC: Intel: avs: Add DMIC machine board Support AVS-DMIC configuration by implementing board connecting AVS platform component with DMIC codec one. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220511162403.3987658-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/Kconfig | 8 ++++ sound/soc/intel/avs/boards/Makefile | 2 + sound/soc/intel/avs/boards/dmic.c | 93 +++++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+) commit 97030a43371ea29d65f332d288eb73e8f7bdb3a9 Author: Cezary Rojewski Date: Wed May 11 18:23:52 2022 +0200 ASoC: Intel: avs: Add HDAudio machine board Connect AVS driver with ASoC HDAudio codec with help of this machine board. Similarly to its platform and codec components, DAI links and routes are being created dynamically so single board can be used across all HDAudio codec types. Card makes use of "binder" BE DAI Link so HDAudio codec driver can be listed as one of its components. This allows for BE DAIs to be created dynamically, based on HDAudio codec capabilities. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220511162403.3987658-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 3 + sound/soc/intel/avs/Makefile | 3 + sound/soc/intel/avs/boards/Kconfig | 15 ++ sound/soc/intel/avs/boards/Makefile | 5 + sound/soc/intel/avs/boards/hdaudio.c | 294 +++++++++++++++++++++++++++++++++++ 5 files changed, 320 insertions(+) commit b5df2a7dca1cc6c66eee0005c92094855dc2028c Author: Cezary Rojewski Date: Wed May 11 18:23:51 2022 +0200 ASoC: codecs: Add HD-Audio codec driver Add generic ASoC equivalent of ALSA HD-Audio codec. This codec is designed to follow HDA_DEV_LEGACY convention. Driver wrapps existing hda_codec.c handlers to prevent code duplication within the newly added code. Number of DAIs created is dependent on capabilities exposed by the codec itself. Because of this, single solution can be applied to support every single HD-Audio codec type. At the same time, through the ASoC topology, platform drivers may limit the number of endpoints available to the userspace as codec driver exposes BE DAIs only. Both hda_codec_probe() and hda_codec_remove() declare their expectations on device's usage_count and suspended-status. This is to catch any unexpected behavior as PM-related code for HD-Audio has been changing quite a bit throughout the years. In order for codec DAI list to reflect its actual PCM capabilities, PCMs need to be built and that can only happen once codec device is constructed. To do that, a valid component->card->snd_card pointer is needed. Said pointer will be provided by the framework once all card components are accounted for and their probing can begin. Usage of "binder" BE DAI solves the problem - codec can be listed as one of HD-Audio card components without declaring any actual BE DAIs statically. Relation with hdac_hda: Addition of parallel solution is motivated by behavioral differences between hdac_hda.c and its legacy equivalent found in sound/pci/hda e.g.: lack of dynamic, based on codec capabilities, resource allocation and high cost of removing such differences on actively used targets. Major goal of codec driver presented here is to follow HD-Audio legacy behavior in 1:1 fashion by becoming a wrapper. Doing so increases code coverage of the legacy code and reduces the maintenance cost for both solutions. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220511162403.3987658-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 10 ++ sound/soc/codecs/Makefile | 2 + sound/soc/codecs/hda-dai.c | 102 ++++++++++++ sound/soc/codecs/hda.c | 395 +++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/hda.h | 19 +++ 5 files changed, 528 insertions(+) commit 90b12a88b710cdc80c00552dfbd589228978bffe Author: Cezary Rojewski Date: Wed May 11 18:23:50 2022 +0200 ALSA: Add snd_pcm_direction_name() helper Allow for retrieving string naming a direction of a stream without the need of substream pointer. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220511162403.3987658-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown include/sound/pcm.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 7ee0910d03168535ffeea2f4ce924eebb3b24863 Author: Sameer Pujar Date: Fri Jun 3 12:06:09 2022 +0530 ASoC: tegra: AHUB routes for OPE module Add AHUB routes for OPE module. The OPE module can be plugged into audio path as per the need. The routing controls can be used to setup the audio path with OPE similar to the already existing routes. The support is added on Tegra210 and later Tegra SoCs where OPE module is present. Signed-off-by: Sameer Pujar Link: https://lore.kernel.org/r/1654238172-16293-4-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown sound/soc/tegra/tegra210_ahub.c | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) commit 7358a803c778f28314721e78339f3fa5b787f55c Author: Sameer Pujar Date: Fri Jun 3 12:06:08 2022 +0530 ASoC: tegra: Add Tegra210 based OPE driver The Output Processing Engine (OPE) is one of the AHUB client. It has PEQ (Parametric Equalizer) and MBDRC (Multi Band Dynamic Range Compressor) sub blocks for data processing. The PEQ block gets samples from the MBDRC block. This patch registers OPE driver with ASoC framework. The component driver exposes DAPM widgets, routes and kcontrols for the device. The DAI driver exposes OPE interfaces, which can be used to connect different components in the ASoC layer. Makefile and Kconfig support is added to allow build the driver. Signed-off-by: Sameer Pujar Link: https://lore.kernel.org/r/1654238172-16293-3-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown sound/soc/tegra/Kconfig | 9 + sound/soc/tegra/Makefile | 2 + sound/soc/tegra/tegra210_mbdrc.c | 1012 ++++++++++++++++++++++++++++++++++++++ sound/soc/tegra/tegra210_mbdrc.h | 215 ++++++++ sound/soc/tegra/tegra210_ope.c | 419 ++++++++++++++++ sound/soc/tegra/tegra210_ope.h | 90 ++++ sound/soc/tegra/tegra210_peq.c | 434 ++++++++++++++++ sound/soc/tegra/tegra210_peq.h | 56 +++ 8 files changed, 2237 insertions(+) commit 45c6c5e052df2ee0d87e74743d8bb72e70fd0887 Author: Sameer Pujar Date: Fri Jun 3 12:06:07 2022 +0530 ASoC: tegra: Add binding doc for OPE module This patch adds YAML schema for DT bindings of Output Processing Engine (OPE) module. It consists of Parametric Equalizer (PEQ) and Multi Band Dynamic Range Compressor (MBDRC) sub blocks and binding doc for these blocks are added as well. The OPE will be registered as an ASoC component and can be plugged into an audio path as per need via ALSA mixer controls. The DT bindings are applicable on Tegra210 and later SoCs where OPE module is present. Signed-off-by: Sameer Pujar Link: https://lore.kernel.org/r/1654238172-16293-2-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown .../bindings/sound/nvidia,tegra210-ahub.yaml | 4 + .../bindings/sound/nvidia,tegra210-mbdrc.yaml | 47 ++++++++++++ .../bindings/sound/nvidia,tegra210-ope.yaml | 87 ++++++++++++++++++++++ .../bindings/sound/nvidia,tegra210-peq.yaml | 48 ++++++++++++ 4 files changed, 186 insertions(+) commit fed3d9297a9bf8b342c034e74a1fdba6940fe84a Author: Hui Wang Date: Mon May 30 12:01:51 2022 +0800 ASoC: nau8822: Disable internal PLL if freq_out is zero After finishing the playback or recording, the machine driver might call snd_soc_dai_set_pll(codec, pll_id, 0, 0, 0) to stop the internal PLL, but with the codec driver nau8822, it will print error as below: nau8822 0-001a: Unsupported input clock 0 fsl-asoc-card sound-nau8822: failed to stop FLL: -22 Refer to the function wm8962_set_fll() in the codec driver wm8962, if the freq_out is zero, turn off the internal PLL and return 0. Cc: David Lin Cc: John Hsu Cc: Seven Li Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20220530040151.95221-3-hui.wang@canonical.com Signed-off-by: Mark Brown sound/soc/codecs/nau8822.c | 7 +++++++ 1 file changed, 7 insertions(+) commit be1a63daffdd152ba4c7b71ab9fec2e39259b42b Merge: f2906aa86338 07551992cdab Author: Mark Brown Date: Mon Jun 6 12:32:40 2022 +0100 Merge existing fixes from asoc/for-5.19 into new branch commit 7ec58378a985618909ffae18e4ac0de2ae625f33 Author: George D Sworo Date: Wed Jun 1 15:41:02 2022 -0700 thunderbolt: Add support for Intel Raptor Lake Intel Raptor Lake has the same integrated Thunderbolt/USB4 controller as Intel Alder Lake. By default it is still using firmware based connection manager so we can use most of the Alder Lake flows. Signed-off-by: George D Sworo Signed-off-by: Mika Westerberg drivers/thunderbolt/icm.c | 2 ++ drivers/thunderbolt/nhi.c | 4 ++++ drivers/thunderbolt/nhi.h | 2 ++ 3 files changed, 8 insertions(+) commit e173b7d46c0413f004450bfc48f45bfc0f0f2fc2 Author: Yang Li Date: Thu May 26 21:01:54 2022 +0800 thunderbolt: Fix some kernel-doc comments Remove some warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'. drivers/thunderbolt/ctl.c:701: warning: expecting prototype for tb_cfg_start(). Prototype was for tb_ctl_start() instead drivers/thunderbolt/ctl.c:722: warning: expecting prototype for tb_ctrl_stop(). Prototype was for tb_ctl_stop() instead drivers/thunderbolt/ctl.c:930: warning: expecting prototype for tb_cfg_write(). Prototype was for tb_cfg_write_raw() instead Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Mika Westerberg drivers/thunderbolt/ctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3084b48fa13931400f316e2b9ffdd98b8ba6600e Author: Gil Fine Date: Thu May 26 13:59:21 2022 +0300 thunderbolt: Change TMU mode to HiFi uni-directional once DisplayPort tunneled Here we configure TMU mode to HiFi uni-directional once DP tunnel is created. This is due to accuracy requirement for DP tunneling as appears in CM guide 1.0, section 7.3.2. Due to Intel hardware limitation, once we changed the TMU mode to HiFi uni-directional (when DP tunnel exists), we don't change TMU mode back to normal uni-directional, even if DP tunnel is torn down later. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg drivers/thunderbolt/tb.c | 13 +++++++++++++ drivers/thunderbolt/tb.h | 2 ++ drivers/thunderbolt/tmu.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) commit b017a46d486cd4113b1856f3fd611f54cd0f9c03 Author: Gil Fine Date: Thu May 26 13:59:20 2022 +0300 thunderbolt: Add CL1 support for USB4 and Titan Ridge routers In this patch we add support for a second low power state of the link: CL1. Low power states (called collectively CLx) are used to reduce transmitter and receiver power when a high-speed lane is idle. We enable it, if both sides of the link support it, and only for the first hop router (i.e. the first device that connected to the host router). This is needed for better thermal management. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg drivers/thunderbolt/switch.c | 89 +++++++++++---------- drivers/thunderbolt/tb.c | 55 +++++++++---- drivers/thunderbolt/tb.h | 46 +++++------ drivers/thunderbolt/tb_regs.h | 6 ++ drivers/thunderbolt/tmu.c | 177 +++++++++++++++++++++++++++++++++++------- 5 files changed, 266 insertions(+), 107 deletions(-) commit 5fd6b9a5cbe63fea4c490fee8af34144a139a266 Author: Gil Fine Date: Thu May 26 13:59:19 2022 +0300 thunderbolt: Change downstream router's TMU rate in both TMU uni/bidir mode In case of uni-directional time sync, TMU handshake is initiated by upstream router. In case of bi-directional time sync, TMU handshake is initiated by downstream router. In order to handle correctly the case of uni-directional mode, we avoid changing the upstream router's rate to off, because it might have another downstream router plugged that is set to uni-directional mode (and we don't want to change its mode). Instead, we always change downstream router's rate. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg drivers/thunderbolt/tmu.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit b4e08d5d08192699e68ffa796bd2c3ab58af5730 Author: Gil Fine Date: Thu May 26 13:59:18 2022 +0300 thunderbolt: Fix typos in CLx enabling Fix few typos in CLx enabling. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg drivers/thunderbolt/switch.c | 2 +- drivers/thunderbolt/tmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 418a5a3d6596f62424b24192b642d959d4c73d25 Author: Gil Fine Date: Thu May 26 13:59:17 2022 +0300 thunderbolt: CLx disable before system suspend only if previously enabled Disable CLx before system suspended only if previously was enabled. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg drivers/thunderbolt/switch.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 990f4b85d7d9bb954a24ada7145947dec501fe3d Author: Gil Fine Date: Thu May 26 13:59:16 2022 +0300 thunderbolt: Silently ignore CLx enabling in case CLx is not supported We can't enable CLx if it is not supported either by the host or device, or by the USB4/TBT link (e.g. when an optical cable is used). We silently ignore CLx enabling in this case. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg drivers/thunderbolt/tb.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 2dee50ab9e72a3cae75b65e5934c8dd3e9bf01bc Author: Ralph Siemsen Date: Wed May 18 14:25:27 2022 -0400 clk: renesas: r9a06g032: Fix UART clkgrp bitsel There are two UART clock groups, each having a mux to select its upstream clock source. The register/bit definitions for accessing these two muxes appear to have been reversed since introduction. Correct them so as to match the hardware manual. Fixes: 4c3d88526eba ("clk: renesas: Renesas R9A06G032 clock driver") Signed-off-by: Ralph Siemsen Reviewed-by: Phil Edworthy Link: https://lore.kernel.org/r/20220518182527.1693156-1-ralph.siemsen@linaro.org Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r9a06g032-clocks.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f46efcc4746f5c1a539df9db625c04321f75e494 Author: Ralph Siemsen Date: Wed May 18 13:27:16 2022 -0400 clk: renesas: r9a06g032: Drop some unused fields Remove unused fields from struct r9a06g032_clkdesc. As the D_UGATE macro no longer uses _gi, drop it from all declarations. Signed-off-by: Ralph Siemsen Reviewed-by: Phil Edworthy Link: https://lore.kernel.org/r/20220518172808.1691450-2-ralph.siemsen@linaro.org Link: https://lore.kernel.org/r/20220518172808.1691450-3-ralph.siemsen@linaro.org Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r9a06g032-clocks.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit efded37b426f4e1b7b004b1e9924ff4bf16ec0fd Author: Phil Edworthy Date: Wed May 18 16:01:05 2022 +0100 clk: renesas: r9a09g011: Add WDT clock and reset entries Add WDT0 clock and reset entries to CPG driver. Signed-off-by: Phil Edworthy Link: https://lore.kernel.org/r/20220518150105.48167-1-phil.edworthy@renesas.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r9a09g011-cpg.c | 3 +++ 1 file changed, 3 insertions(+) commit e55c4481e71de79d0ef566a238332bd346cef6de Author: Phil Edworthy Date: Wed May 18 14:52:08 2022 +0100 clk: renesas: r9a09g011: Add PFC clock and reset entries Add PFC clock/reset entries to CPG driver. Signed-off-by: Phil Edworthy Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20220518135208.39885-1-phil.edworthy@renesas.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r9a09g011-cpg.c | 2 ++ 1 file changed, 2 insertions(+) commit b6ee0bbf388ab38384f92339aa9a1df15e716cfe Author: Biju Das Date: Tue May 10 12:06:53 2022 +0100 clk: renesas: r9a07g044: Add POEG clock and reset entries Add POEG clock and reset entries to CPG driver. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20220510110653.7326-3-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r9a07g044-cpg.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 1fb7a9fb6295220eb96c490581316b35fce180fe Author: Biju Das Date: Tue May 10 12:06:52 2022 +0100 clk: renesas: r9a07g044: Add GPT clock and reset entry Add GPT clock and reset entry to CPG driver. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20220510110653.7326-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r9a07g044-cpg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5223c511eb4f919e6b423b2f66e02674e97e77e3 Author: Lad Prabhakar Date: Wed May 11 10:40:57 2022 +0100 pinctrl: renesas: rzg2l: Return -EINVAL for pins which have input disabled Pin status reported by pinconf-pins file always reported pin status as "input enabled" even for pins which had input disabled. Fix this by returning -EINVAL for the pins which have input disabled. Fixes: c4c4637eb57f2 ("pinctrl: renesas: Add RZ/G2L pin and gpio controller driver") Reported-by: Phil Edworthy Signed-off-by: Lad Prabhakar Reviewed-by: Phil Edworthy Link: https://lore.kernel.org/r/20220511094057.3151-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pinctrl-rzg2l.c | 2 ++ 1 file changed, 2 insertions(+) commit 0d97f2176dec9c1e070215c4e28ba87e036458c9 Author: AngeloGioacchino Del Regno Date: Wed May 18 11:10:38 2022 +0200 memory: mtk-smi: Add support for MT6795 Helio X10 The MediaTek Helio X10 (MT6795) SoC has 5 LARBs and one common SMI instance without any sub-common and without GALS. While the smi-common configuration is specific to this SoC, on the LARB side, this is similar to MT8173, in the sense that it doesn't need the port in LARB, and the register layout is also compatible with that one, which makes us able to fully reuse the smi-larb platform data struct that was introduced for MT8173. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Reviewed-by: Yong Wu Link: https://lore.kernel.org/r/20220518091038.22380-3-angelogioacchino.delregno@collabora.com Signed-off-by: Krzysztof Kozlowski drivers/memory/mtk-smi.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit a24394059a1bde7c630352827543d50034f03180 Author: AngeloGioacchino Del Regno Date: Wed May 18 11:10:37 2022 +0200 dt-bindings: memory: mtk-smi: Add MT6795 Helio X10 bindings Add SMI bindings for the MediaTek Helio X10 (MT6795) SoC Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220518091038.22380-2-angelogioacchino.delregno@collabora.com Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/memory-controllers/mediatek,smi-common.yaml | 1 + .../devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml | 1 + 2 files changed, 2 insertions(+) commit c75f5c9e11cf71e77c5cb8f0e082e5ee1e71545a Author: Alim Akhtar Date: Fri Jun 3 21:17:14 2022 +0530 arm64: dts: fsd: add ufs device node Adds FSD ufs device node and enable the same for fsd platform. This also adds the required pin configuration for the same. Signed-off-by: Bharat Uppal Signed-off-by: Alim Akhtar Link: https://lore.kernel.org/r/20220603154714.30532-8-alim.akhtar@samsung.com Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/tesla/fsd-evb.dts | 4 ++++ arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi | 14 ++++++++++++++ arch/arm64/boot/dts/tesla/fsd.dtsi | 29 +++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) commit d742e8e2912131ee2df1fe217a6c9e6ee8337b4a Author: Chanho Park Date: Mon May 23 20:39:19 2022 +0900 arm64: dts: exynos: add watchdog in ExynosAutov9 Adds two CPU watchdog devices for ExynosAutov9 SoC. Signed-off-by: Chanho Park Link: https://lore.kernel.org/r/20220523113919.59571-4-chanho61.park@samsung.com Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 694d04a1d5449d948e438af1fd1d610d356bacc3 Author: Chanho Park Date: Mon May 23 21:12:44 2022 +0900 arm64: dts: exynos: add syscon reboot/reboot_mode support in ExynosAutov9 Reboot of exynosautov9 SoC can be handled by setting the bit(SWRESET_SYSTEM[1]) of SYSTEM_CONFIGURATION register(PMU + 0x3a00). syscon-reboot-mode can be used to indicate the reboot mode for bootloader. SYSIP_DAT0 register(PMU + 0x810) will not be cleared after reboot so bootloader can enter the boot mode according to the value. Signed-off-by: Chanho Park Link: https://lore.kernel.org/r/20220523121244.67341-3-chanho61.park@samsung.com Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 95099951557c9eb2f180d6bcb9885eecaca97d24 Author: Chanho Park Date: Mon May 23 21:12:43 2022 +0900 dt-bindings: soc: add samsung,boot-mode definitions Adds samsung,boot-mode.h header file which contains boot mode definitions for bootloader. As for now, there are only boot mode definitions for Exynos Auto v9 SoC. Signed-off-by: Chanho Park Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220523121244.67341-2-chanho61.park@samsung.com Signed-off-by: Krzysztof Kozlowski include/dt-bindings/soc/samsung,boot-mode.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 5355559555b98cd2f0b96b2c4e56c32356f90cc1 Author: Alim Akhtar Date: Wed May 18 18:53:50 2022 +0530 arm64: dts: fsd: Add cpu cache information Add CPU caches information so that the same is available to userspace via sysfs. This SoC has 48/32 KB I/D cache for each CPU cores and 4MB of L2 cache. Signed-off-by: Alim Akhtar Link: https://lore.kernel.org/r/20220518132350.35762-1-alim.akhtar@samsung.com Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/tesla/fsd.dtsi | 91 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) commit dc24257124dba514164bd708dc1f4ca07538da00 Author: Phil Edworthy Date: Fri May 20 11:07:36 2022 +0100 arm64: dts: renesas: rzv2mevk2: Enable ethernet Enable Ethernet interface on RZ/V2M EVK. Signed-off-by: Phil Edworthy Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20220520100736.15182-1-phil.edworthy@renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 4872ca1f92b0545cd0898cf43fe0576fc7c7a1c7 Author: Phil Edworthy Date: Tue May 17 09:16:44 2022 +0100 arm64: dts: renesas: r9a09g011: Add ethernet nodes Add Ethernet nodes to SoC dtsi. Signed-off-by: Phil Edworthy Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20220517081645.3764-2-phil.edworthy@renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 51 ++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 5cf12ac9493ae2603e5ba27c1040a88c7b26dd28 Author: Geert Uytterhoeven Date: Wed May 11 12:24:59 2022 +0200 arm64: dts: renesas: Rename numbered regulators Numbered regulators are prone to conflicts, causing silent overwrites (see e.g. [1]). Make conflicts less likely to happen by renaming all numbered regulators to names reflecting the regulator's purposes. [1] commit 45f5d5a9e34d3fe4 ("arm64: dts: renesas: r8a77995: draak: Fix backlight regulator name"). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/b90dfeb834c4d7dabd22bf03396f33df58f54507.1652264651.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi | 4 ++-- arch/arm64/boot/dts/renesas/ebisu.dtsi | 6 +++--- arch/arm64/boot/dts/renesas/hihope-common.dtsi | 4 ++-- arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi | 4 ++-- arch/arm64/boot/dts/renesas/rzg2lc-smarc-som.dtsi | 4 ++-- arch/arm64/boot/dts/renesas/rzg2ul-smarc-som.dtsi | 4 ++-- arch/arm64/boot/dts/renesas/salvator-common.dtsi | 6 +++--- arch/arm64/boot/dts/renesas/ulcb.dtsi | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) commit 7512af9f78dedea7e04225f665dad6750df7d095 Author: Geert Uytterhoeven Date: Wed May 11 12:14:06 2022 +0200 arm64: dts: renesas: beacon: Fix regulator node names Currently there are two nodes named "regulator_camera". This causes the former to be overwritten by the latter. Fix this by renaming them to unique names, using the preferred hyphen instead of an underscore. While at it, update the name of the audio regulator (which was added in the same commit) to use a hyphen. Fixes: a1d8a344f1ca0709 ("arm64: dts: renesas: Introduce r8a774a1-beacon-rzg2m-kit") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/a9ac82bdf108162487289d091c53a9b3de393f13.1652263918.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9a71e89d0f9ebbca4f7b234a7f90f96224d04ec8 Author: Biju Das Date: Thu May 5 19:43:53 2022 +0100 arm64: dts: renesas: r9a07g043: Add ADC node Add ADC node to R9A07G043 (RZ/G2UL) SoC DTSI. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20220505184353.512133-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 6c52573bf4c3a0f6e7142264fb36b31ae2c3707a Author: Martin Jücker Date: Mon May 16 21:37:09 2022 +0200 ARM: dts: exynos: add panel and backlight to p4note Add configuration for the LTL101AL01 panel and a pwm backlight to drive the display in the p4note devices. Signed-off-by: Martin Jücker Link: https://lore.kernel.org/r/20220516193709.10037-3-martin.juecker@gmail.com Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4412-p4note.dtsi | 84 +++++++++++++++++++++++++++----- 1 file changed, 71 insertions(+), 13 deletions(-) commit 617df304f3fb63db3dc37e62c3f8efbbe56427b5 Author: Yang Li Date: Thu May 26 21:20:35 2022 +0800 opp: Fix some kernel-doc comments Make @freq to @bw in dev_pm_opp_find_bw_ceil() and dev_pm_opp_find_bw_floor() kernel-doc comment to remove warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'. drivers/opp/core.c:753: warning: Function parameter or member 'bw' not described in 'dev_pm_opp_find_bw_ceil' drivers/opp/core.c:753: warning: Excess function parameter 'freq' description in 'dev_pm_opp_find_bw_ceil' drivers/opp/core.c:812: warning: Function parameter or member 'bw' not described in 'dev_pm_opp_find_bw_floor' drivers/opp/core.c:812: warning: Excess function parameter 'freq' description in 'dev_pm_opp_find_bw_floor' Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Viresh Kumar drivers/opp/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4ea9496cbc959eb5c78f3e379199aca9ef4e386b Author: Tang Bin Date: Tue May 24 20:31:51 2022 +0800 opp: Fix error check in dev_pm_opp_attach_genpd() dev_pm_domain_attach_by_name() may return NULL in some cases, so IS_ERR() doesn't meet the requirements. Thus fix it. Fixes: 6319aee10e53 ("opp: Attach genpds to devices from within OPP core") Signed-off-by: Tang Bin [ Viresh: Replace ENODATA with ENODEV ] Signed-off-by: Viresh Kumar drivers/opp/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3e763d3dc62697733877ccb2d3c219dfd2404cd9 Author: Martin Kaiser Date: Thu Jun 2 21:37:26 2022 +0200 staging: r8188eu: use u8, u16 in issue_action_BA prototype Use u8 and u16 in the issue_action_BA prototype. The code expects these parameters to be exactly 8 and 16 bits wide. Tested-by: Pavel Skripkin Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220602193726.280922-12-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit 979315ccedf45ba5b74313c463f9d94b87411932 Author: Martin Kaiser Date: Thu Jun 2 21:37:25 2022 +0200 staging: r8188eu: remove the pframe variable Remove the pframe variable, it is no longer used for populating fields of the outgoing frame. pmgntframe->buf_addr is already a u8 *, we can drop the (u8 *) cast. Increment the u8 *pmgntframe->buf_addr by TXDESC_OFFSET before we cast it to struct ieee80211_mgmt *. Tested-by: Pavel Skripkin Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220602193726.280922-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d8f2cff63249fdf7f2cf78e70344613db1fc4e53 Author: Martin Kaiser Date: Thu Jun 2 21:37:24 2022 +0200 staging: r8188eu: calculate the delba length Use offsetofend to calculate the length of the delba message. We are now calculating all message lengths based on the offset of their last field. All intermediate updates of pattrib->pktlen can be removed. Tested-by: Pavel Skripkin Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220602193726.280922-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 3d7deed4ec52d2018f81d0e798966b551c7d1487 Author: Martin Kaiser Date: Thu Jun 2 21:37:23 2022 +0200 staging: r8188eu: clarify the contents of the delba params The delba parameters field contains an initiator/receiver flag and the tid. The caller of issue_action_BA passes these components in the status parameter. Extract the two components from status and use u16_encode_bits to copy them into the parameters field. This should clarify what's going on and should make it easier to replace the status parameter in the future. Tested-by: Pavel Skripkin Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220602193726.280922-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9120436aa9883da6fde9fa66d3afe503df3c44ae Author: Martin Kaiser Date: Thu Jun 2 21:37:22 2022 +0200 staging: r8188eu: use mgmt to set delba params Use the mgmt struct to set the delba parameters. Use the exact same value for the parameters as the current code. Remove a dead increment of pframe, we don't use pframe for the delba message any more. Tested-by: Pavel Skripkin Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220602193726.280922-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit c5727d76ca0cf84d1d8b4fd7bb28920a4d440c11 Author: Martin Kaiser Date: Thu Jun 2 21:37:21 2022 +0200 staging: r8188eu: use mgmt to set the delba reason code Use the mgmt struct to set the delba reason code. Replace the numeric value with a define and remove the temporary variable. Tested-by: Pavel Skripkin Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220602193726.280922-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c67eea0c34101ba199e500c825edf0a080cdfd45 Author: Martin Kaiser Date: Thu Jun 2 21:37:20 2022 +0200 staging: r8188eu: calculate the addba response length An addba response always ends with the timeout field. The length of the addba response is the offset of the end of the timeout field in the struct ieee80211_mgmt that defines the message. Use offsetofend to calculate this offset and drop the intermediate pktlen increments as we add addba response components. Tested-by: Pavel Skripkin Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220602193726.280922-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 8836faf7196b233bb2baf7dc2b84bfe9f34efe11 Author: Martin Kaiser Date: Thu Jun 2 21:37:19 2022 +0200 staging: r8188eu: use ieee80211 to set addba resp capabilities Use the mgmt structure and defines from ieee80211.h to set the capabilities field of an addba response. Tested-by: Pavel Skripkin Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220602193726.280922-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 140529aec4687a7865c315e70988896d377b0fce Author: Martin Kaiser Date: Thu Jun 2 21:37:18 2022 +0200 staging: r8188eu: use mgmt to set the addba resp timeout Use the mgmt struct to set the addba response timeout. Copy the timeout from the saved addba request. The timeout field is already le16, we don't have to convert the endianness. Tested-by: Pavel Skripkin Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220602193726.280922-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e2643fd46cc34a26a8d9eab76d179d5416e03344 Author: Martin Kaiser Date: Thu Jun 2 21:37:17 2022 +0200 staging: r8188eu: use mgmt to set the addba resp status Use the mgmt struct to set the addba response status. The caller passes the status code in host endianness, we have to convert it to little endian. Tested-by: Pavel Skripkin Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220602193726.280922-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0e01f8931c7a360f76c00b636950f80d283bfcd3 Author: Martin Kaiser Date: Thu Jun 2 21:37:16 2022 +0200 staging: r8188eu: use mgmt to set resp dialog token Use the mgmt structure to set the dialog token of an addba response. Tested-by: Pavel Skripkin Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220602193726.280922-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 80c968a04a381dc0e690960c60ffd6b6aee7e157 Author: Jared Kangas Date: Sun Jun 5 16:18:06 2022 -0700 staging: greybus: audio: fix loop cursor use after iteration gbaudio_dapm_free_controls() iterates over widgets using list_for_each_entry_safe(), which leaves the loop cursor pointing to a meaningless structure if it completes a traversal of the list. The cursor was set to NULL at the end of the loop body, but would be overwritten by the final loop cursor update. Because of this behavior, the widget could be non-null after the loop even if the widget wasn't found, and the cleanup logic would treat the pointer as a valid widget to free. To fix this, introduce a temporary variable to act as the loop cursor and copy it to a variable that can be accessed after the loop finishes. This was detected with the help of Coccinelle. Signed-off-by: Jared Kangas Link: https://lore.kernel.org/r/20220605231806.720085-1-kangas.jd@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_helper.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 79053469559d0cf0d4106fb8b3784b8cd9fa4f61 Author: Haowen Bai Date: Wed Jun 1 19:49:24 2022 +0800 staging: r8188eu: Drop redundant memset overwritten by memcpy The region set by the call to memset is immediately overwritten by the subsequent call to memcpy. So we drop redundant memset. Signed-off-by: Haowen Bai Link: https://lore.kernel.org/r/1654084164-10869-1-git-send-email-baihaowen@meizu.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_ioctl_set.c | 1 - drivers/staging/r8188eu/core/rtw_mlme.c | 2 -- 2 files changed, 3 deletions(-) commit e8ab382811e50e1933bc7d388a02bb0f5414a124 Author: Martin Kaiser Date: Thu Jun 2 21:48:07 2022 +0200 staging: r8188eu: fix the declaration of process_pwrbit_data Fix the declaration of process_pwrbit_data. Make the function static and remove its prototype. Signed-off-by: Martin Kaiser Tested-by: Pavel Skripkin Link: https://lore.kernel.org/r/20220602194807.281115-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0ffa2a3a702e7ee159be938e11e3e7fd81a96fc3 Author: Martin Kaiser Date: Thu Jun 2 21:48:05 2022 +0200 staging: r8188eu: use ieee80211 defines for back action codes Replace the driver-specific defines for back action codes with the defines from ieee80211.h. Signed-off-by: Martin Kaiser Tested-by: Pavel Skripkin Link: https://lore.kernel.org/r/20220602194807.281115-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 +++--- drivers/staging/r8188eu/include/ieee80211.h | 7 ------- 2 files changed, 3 insertions(+), 10 deletions(-) commit 1dbcdf74a902fccaf7bf135ba08ffa4f40723539 Author: Adrien Thierry Date: Wed May 18 15:11:20 2022 -0400 staging: vchiq_arm: remove global 'vchiq_states' array Remove global 'vchiq_states' array, which is not used anymore. This is part of an effort to address TODO item "Get rid of all non essential global structures and create a proper per device structure" Tested-by: Stefan Wahren Signed-off-by: Adrien Thierry Link: https://lore.kernel.org/r/20220518191126.60396-10-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 8 -------- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 2 -- 2 files changed, 10 deletions(-) commit ed57d93e7752c6347d7d5336509ee72d5d6368a4 Author: Adrien Thierry Date: Wed May 18 15:11:19 2022 -0400 staging: vchiq_arm: use state from vchiq instance In 'handle_to_service', access the vchiq state from the vchiq instance instead of the global 'vchiq_states' array. This will allow getting rid of the global 'vchiq_states' array. Tested-by: Stefan Wahren Signed-off-by: Adrien Thierry Link: https://lore.kernel.org/r/20220518191126.60396-9-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 7 +++++++ .../staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 12 +----------- 2 files changed, 8 insertions(+), 11 deletions(-) commit 6d02150cdf7618139f60c926b52fca4e8efefb52 Author: Adrien Thierry Date: Wed May 18 15:11:18 2022 -0400 staging: vchiq_arm: pass vchiq instance to 'handle_to_service' In order to remove the 'vchiq_states' global array, we need to pass the vchiq_instance reference to the 'handle_to_service' function. This will allow accessing the vchiq state through the vchiq instance instead of through the global array. Tested-by: Stefan Wahren Signed-off-by: Adrien Thierry Link: https://lore.kernel.org/r/20220518191126.60396-8-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 10 +++++----- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit f23f8a05a13bf9ea3e5143cc7195c5f91697d0f8 Author: Adrien Thierry Date: Wed May 18 15:11:17 2022 -0400 staging: vchiq_arm: pass vchiq instance to 'vchiq_get_service_userdata' In order to remove the 'vchiq_states' global array, we need to pass the vchiq_instance reference to the 'handle_to_service' function, as well as to all functions that call 'handle_to_service'. This will allow accessing the vchiq state through the vchiq instance instead of through the global array. 'handle_to_service' is called by 'vchiq_get_service_userdata'. Therefore, pass the vchiq instance reference to it. Tested-by: Stefan Wahren Signed-off-by: Adrien Thierry Link: https://lore.kernel.org/r/20220518191126.60396-7-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 3 ++- drivers/staging/vc04_services/include/linux/raspberrypi/vchiq.h | 2 +- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 2 +- drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) commit bad44825fbf5ad9e97fec09d96c74d8a91685d2a Author: Adrien Thierry Date: Wed May 18 15:11:16 2022 -0400 staging: vchiq_arm: pass vchiq instance to 'vchiq_get_client_id' In order to remove the 'vchiq_states' global array, we need to pass the vchiq_instance reference to the 'handle_to_service' function, as well as to all functions that call 'handle_to_service'. This will allow accessing the vchiq state through the vchiq instance instead of through the global array. 'handle_to_service' is called by 'vchiq_get_client_id'. Therefore, pass the vchiq instance reference to it. Tested-by: Stefan Wahren Signed-off-by: Adrien Thierry Link: https://lore.kernel.org/r/20220518191126.60396-6-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 2 +- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 2 +- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 14780bb174266e155e2b586fe9ba716087f91269 Author: Adrien Thierry Date: Wed May 18 15:11:15 2022 -0400 staging: vchiq_arm: pass vchiq instance to 'find_service_by_handle' In order to remove the 'vchiq_states' global array, we need to pass the vchiq_instance reference to the 'handle_to_service' function, as well as to all functions that call 'handle_to_service'. This will allow accessing the vchiq state through the vchiq instance instead of through the global array. 'handle_to_service' is called by 'find_service_by_handle'. Therefore, pass the vchiq instance reference to 'find_service_by_handle' and to its callers. Tested-by: Stefan Wahren Signed-off-by: Adrien Thierry Link: https://lore.kernel.org/r/20220518191126.60396-5-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 27 ++++++----- .../include/linux/raspberrypi/vchiq.h | 26 +++++----- .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 16 +++---- .../vc04_services/interface/vchiq_arm/vchiq_arm.h | 4 +- .../vc04_services/interface/vchiq_arm/vchiq_core.c | 47 +++++++++--------- .../vc04_services/interface/vchiq_arm/vchiq_core.h | 9 ++-- .../vc04_services/interface/vchiq_arm/vchiq_dev.c | 36 +++++++------- .../staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 56 +++++++++++----------- 8 files changed, 118 insertions(+), 103 deletions(-) commit 726e79f8a64891552ffe272e05f49ed9710fca89 Author: Adrien Thierry Date: Wed May 18 15:11:14 2022 -0400 staging: vchiq_arm: pass vchiq instance to service callbacks In order to remove the 'vchiq_states' global array, we need to pass the vchiq_instance reference to the 'handle_to_service' function, as well as to all functions that call 'handle_to_service'. This will allow accessing the vchiq state through the vchiq instance instead of through the global array. 'handle_to_service' is called by 'service_callback'. Therefore, pass the vchiq instance reference to 'service_callback'. This also requires adding the vchiq instance reference to the service callbacks prototype, and update all other callbacks accordingly. Tested-by: Stefan Wahren Signed-off-by: Adrien Thierry Link: https://lore.kernel.org/r/20220518191126.60396-4-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 3 ++- drivers/staging/vc04_services/include/linux/raspberrypi/vchiq.h | 8 ++++++-- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 9 ++++----- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h | 4 ++-- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 3 ++- drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 3 ++- 6 files changed, 18 insertions(+), 12 deletions(-) commit 813fa44c74225203d82a8f608ef524b2bd71c3df Author: Adrien Thierry Date: Wed May 18 15:11:13 2022 -0400 staging: vchiq_arm: get rid of global device structure Get rid of the global g_dev structure. This is part of an effort to address TODO item "Get rid of all non essential global structures and create a proper per device structure" I chose to pass the vchiq_instance around instead of the device reference because in order to get rid of the 'vchiq_states' global array in the future, we will need another way to access the vchiq_state in the 'handle_to_service' function. Therefore, we will need to pass the vchiq_instance to it (or the vchiq_state), and also pass it to functions higher up in the caller chain, such as 'vchiq_bulk_transmit' and friends which are used in the bcm2835-audio consumer. Tested-by: Stefan Wahren Signed-off-by: Adrien Thierry Link: https://lore.kernel.org/r/20220518191126.60396-3-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 7 +-- .../include/linux/raspberrypi/vchiq.h | 12 ++--- .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 63 ++++++++++------------ .../vc04_services/interface/vchiq_arm/vchiq_core.c | 14 ++--- .../vc04_services/interface/vchiq_arm/vchiq_core.h | 10 ++-- .../vc04_services/interface/vchiq_arm/vchiq_dev.c | 2 +- .../staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 2 +- 7 files changed, 53 insertions(+), 57 deletions(-) commit d8d307e681f8bb0ef60ecc8b0e7762ab836cb1fc Author: Adrien Thierry Date: Wed May 18 15:11:12 2022 -0400 staging: vchiq_arm: add reference to vchiq device in vchiq_state Add a reference to the vchiq device in the vchiq_state structure. This allows the device structure to be passed around, which will be useful in order to get rid of the global g_dev structure. This change will also make it possible to use standard kernel logging macros instead of the custom ones. Tested-by: Stefan Wahren Signed-off-by: Adrien Thierry Link: https://lore.kernel.org/r/20220518191126.60396-2-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 4 +++- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit d2a4bc3d979fda657729a5ea6b8dc6c6978fabb2 Author: Xiang wangx Date: Fri Jun 3 21:07:02 2022 +0800 staging: rtl8192u: Fix syntax errors in comments Delete the redundant word 'tx'. Signed-off-by: Xiang wangx Link: https://lore.kernel.org/r/20220603130702.6926-1-wangxiang@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0daad77a402f6d483d577649d49163fb622836b Author: Nam Cao Date: Sun May 29 18:02:11 2022 +0200 staging: vt6655: Update function description The function vt6655_get_current_tsf has been updated while its description has not. Update the description to correctly reflect what it does. Signed-off-by: Nam Cao Link: https://lore.kernel.org/r/20220529160211.GA5805@nam-dell Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a8b088d6d98dafddda9874f98ac2a7cefc51639b Author: Hannes Braun Date: Sat May 28 14:31:15 2022 +0200 staging: rtl8723bs: fix placement of braces This patch should eliminate the following errors/warnings emitted by checkpatch.pl: - that open brace { should be on the previous line - else should follow close brace '}' - braces {} are not necessary for single statement blocks Signed-off-by: Hannes Braun Link: https://lore.kernel.org/r/20220528123115.13024-1-hannesbraun@mail.de Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 223 +++++++--------------- 1 file changed, 65 insertions(+), 158 deletions(-) commit 76d01595b24c53ff223f888289d362a4dd94420c Author: Martin Kaiser Date: Tue May 24 11:00:29 2022 +0200 staging: r8188eu: calculate the addba request length When issue_action_BA compiles an addba request, it does not add any extensions. start_seq_num is the last field of the addba request. The length of the request is the offset of the end of start_seq_num in the struct ieee80211_mgmt that defines the message. Use offsetofend to calculate this offset and drop the intermediate pktlen increments as we add addba request components. (We have to keep the increments for other message types until we use offsetofend for them as well.) Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220524090029.242584-13-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 56580e22fecb7cbe11f9debb8de07662a847d444 Author: Martin Kaiser Date: Tue May 24 11:00:28 2022 +0200 staging: r8188eu: use mgmt to set start sequence number Use the mgmt structure in issue_action_BA to set the start sequence number. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220524090029.242584-12-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e3e3cdc43e3e92866678ee849cacda4582b0a790 Author: Martin Kaiser Date: Tue May 24 11:00:27 2022 +0200 staging: r8188eu: use ieee80211 to set addba capabilities Use the mgmt structure and defines from ieee80211.h to set the capabilities field of an addba request. If issue_action_BA is called with action == WLAN_ACTION_ADDBA_REQ, the status parameter contains the tid. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220524090029.242584-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 34411b19203a0804fcd85c04dff1c44d38712528 Author: Martin Kaiser Date: Tue May 24 11:00:26 2022 +0200 staging: r8188eu: use mgmt to set the timeout Use the mgmt structure in issue_action_BA to set the timeout in the outgoing frame. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220524090029.242584-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c257851fe75c7da014d42c5e3b88ca9ae2ba65b6 Author: Martin Kaiser Date: Tue May 24 11:00:25 2022 +0200 staging: r8188eu: use mgmt to set the dialog token Use the mgmt structure in issue_action_BA to set the dialog token. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220524090029.242584-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a248ccf6048dd299cb78d596c8bbc4d3b3957efa Author: Martin Kaiser Date: Tue May 24 11:00:24 2022 +0200 staging: r8188eu: use mgmt to set the action codes Use the mgmt structure in issue_action_BA to set the action codes. We have to distinguish between the different message types. We also have to increment the packet length manually as we're no longer calling rtw_set_fixed_ie, which increments the length. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220524090029.242584-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 8d1aeb172da21fe8184674ba4efed39327b2284b Author: Martin Kaiser Date: Tue May 24 11:00:23 2022 +0200 staging: r8188eu: use mgmt to set the category Use the mgmt structure in issue_action_BA to set the category of the outgoing frame. Remove the rtw_set_fixed_ie call. We can now use the define directly, the category variable can be removed. rtw_set_fixed_ie increments pattrib->pktlen, we have to do this ourselves now (until we use a proper way to calculate the packet length). Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220524090029.242584-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d7767fc2e24f9e9ce2bc869af814922aca09ff4e Author: Martin Kaiser Date: Tue May 24 11:00:22 2022 +0200 staging: r8188eu: use mgmt to set the sequence number Use the mgmt structure in issue_action_BA to set the sequence number of the outgoing frame. pwlanhdr is now unused, it can be removed. Reported-by: kernel test robot Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220524090029.242584-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2f71d4b04029f25a11dca94758a16408e0983185 Author: Martin Kaiser Date: Tue May 24 11:00:21 2022 +0200 staging: r8188eu: use mgmt to set the addresses Use the mgmt structure in issue_action_BA to set the three addresses of the outgoing frame. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220524090029.242584-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 358d61965682e1473acde0b1238d95e9883f2073 Author: Martin Kaiser Date: Tue May 24 11:00:20 2022 +0200 staging: r8188eu: use ieee80211_mgmt in issue_action_BA Define a struct ieee80211_mgmt variable in issue_action_BA, this will make it much simpler to populate the fields of the outoing frame. Use the new mgmt variable to set the type and subtype of the frame. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220524090029.242584-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit f54550fd8419819963d13161e3ee2759b5afe8e1 Author: Martin Kaiser Date: Tue May 24 11:00:19 2022 +0200 staging: r8188eu: use defines for the block action codes Replace the numeric values for the block action codes in issue_action_BA with the defines from ieee80211.h. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220524090029.242584-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 846d846d6fc8101da1c3d7b8e2d6eb708197cb08 Author: Martin Kaiser Date: Tue May 24 11:00:18 2022 +0200 staging: r8188eu: remove unnecessary category check Remove the unnecessary category check in issue_action_BA. category is initialised to 3 (WLAN_CATEGORY_BACK) and never updated. The rtw_set_fixed_ie call gets a pointer to category but it doesn't update the value. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220524090029.242584-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 94 ++++++++++++++--------------- 1 file changed, 46 insertions(+), 48 deletions(-) commit f551dc6e7646204adf79b7a8e2db417c46b4fbe5 Author: Philipp Hortmann Date: Sun May 22 21:49:33 2022 +0200 staging: vt6655: Delete upc.h Delete upc.h as all macros have been removed from upc.h. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b553095c618e7885af5c3e42f9b9b39d95127a44.1653203927.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.h | 2 +- drivers/staging/vt6655/srom.c | 2 +- drivers/staging/vt6655/upc.h | 29 ----------------------------- 3 files changed, 2 insertions(+), 31 deletions(-) commit 6f58936e1286c45cabf6abf5debf75664b532c2c Author: Philipp Hortmann Date: Sun May 22 21:49:28 2022 +0200 staging: vt6655: Add missing BE support on 2x iowrite32 Add missing big-endian support when using two times iowrite32 to write 64 Bit. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/974ef7a9244e7caeafd8c176c7b53a6de3c20219.1653203927.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.c | 4 ++++ drivers/staging/vt6655/device_main.c | 1 + 2 files changed, 5 insertions(+) commit a18263ebc8250eea3e806dfa6e8fa8e85f76eba4 Author: Philipp Hortmann Date: Sun May 22 21:49:24 2022 +0200 staging: vt6655: Replace VNSvOutPortD with iowrite32 Replace macro VNSvOutPortD with iowrite32 because it replaces just one line. The name of macro and the arguments use CamelCase which is not accepted by checkpatch.pl Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/03b6ff0250aa797f45a855ff2fc76f8013f73dc0.1653203927.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/baseband.c | 2 +- drivers/staging/vt6655/card.c | 33 +++++++++++++++------------------ drivers/staging/vt6655/device_main.c | 22 +++++++++------------- drivers/staging/vt6655/mac.c | 2 +- drivers/staging/vt6655/mac.h | 26 +++++++++++++------------- drivers/staging/vt6655/rf.c | 2 +- drivers/staging/vt6655/rxtx.c | 2 +- drivers/staging/vt6655/upc.h | 3 --- 8 files changed, 41 insertions(+), 51 deletions(-) commit d371f5fd4f840fdc076a3573ad6361ee76f25c95 Author: Philipp Hortmann Date: Sun May 22 21:49:19 2022 +0200 staging: vt6655: Replace MACvRx1PerPktMode with VNSvOutPortD Replace macro MACvRx1PerPktMode with VNSvOutPortD and as it was the only user, it can now be removed. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/9cb643b9554e33f5be7a2babefbed5eccca14625.1653203927.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.c | 2 +- drivers/staging/vt6655/mac.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) commit dc59b9bdddecf92fba40a533f4dea8f46bd99b8b Author: Philipp Hortmann Date: Sun May 22 21:49:15 2022 +0200 staging: vt6655: Replace MACvRx0PerPktMode with VNSvOutPortD Replace macro MACvRx0PerPktMode with VNSvOutPortD and as it was the only user, it can now be removed. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/3da471693a65adb75a637805ee6d564ddafccdda.1653203927.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.c | 2 +- drivers/staging/vt6655/mac.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) commit 6b2564abdf178a7f911a783561ac2865b6545298 Author: Philipp Hortmann Date: Sun May 22 21:49:10 2022 +0200 staging: vt6655: Replace MACvSetCurrBCNTxDescAddr with VNSvOutPortD Replace macro MACvSetCurrBCNTxDescAddr with VNSvOutPortD and as it was only used twice, it can now be removed. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/1db079979f7e0e3535463d9f31204aa708c6f680.1653203927.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.c | 3 +-- drivers/staging/vt6655/mac.h | 5 ----- drivers/staging/vt6655/rxtx.c | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) commit a79922905a08559775468ba0a81659501cabcfea Author: Philipp Hortmann Date: Sun May 22 21:49:05 2022 +0200 staging: vt6655: Replace MACvIntDisable with VNSvOutPortD Replace macro MACvIntDisable with VNSvOutPortD and as it was only used twice, it can now be removed. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/937422bb879d8f1f58978bedc8d15559d28581c7.1653203927.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 2 +- drivers/staging/vt6655/mac.c | 2 +- drivers/staging/vt6655/mac.h | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) commit 159ed04755489cf9d43ee361899f736418c4c340 Author: Philipp Hortmann Date: Sun May 22 21:49:00 2022 +0200 staging: vt6655: Replace MACvIntEnable with VNSvOutPortD Replace macro MACvIntEnable with VNSvOutPortD and as it was only used twice, it can now be removed. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/182b9f8edd1ce3f6ff12a2942e990dae0f80099a.1653203927.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 6 +++--- drivers/staging/vt6655/mac.h | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) commit 0fd13e6b1acee1c42569e70f93444b0c5fd7a348 Author: Philipp Hortmann Date: Sun May 22 21:48:55 2022 +0200 staging: vt6655: Replace MACvWriteISR with VNSvOutPortD Replace macro MACvWriteISR with VNSvOutPortD and as it was the only user, it can now be removed. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/80cd68a83807209230a898ab0260188adfad4158.1653203927.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 2 +- drivers/staging/vt6655/mac.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) commit 33028eea5cf34036ee038448ef4278cf48cb0322 Author: Philipp Hortmann Date: Sun May 22 21:48:49 2022 +0200 staging: vt6655: Replace VNSvOutPortW with iowrite16 Replace macro VNSvOutPortW with iowrite16 because it replaces just one line. The name of macro and the arguments use CamelCase which is not accepted by checkpatch.pl Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/ded437e27cffb040865d4afe47e447c2d0d6f0b8.1653203927.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.c | 29 ++++++++++------------------- drivers/staging/vt6655/device_main.c | 3 +-- drivers/staging/vt6655/mac.h | 4 ++-- drivers/staging/vt6655/power.c | 4 ++-- drivers/staging/vt6655/rf.c | 2 +- drivers/staging/vt6655/rxtx.c | 2 +- drivers/staging/vt6655/upc.h | 3 --- 7 files changed, 17 insertions(+), 30 deletions(-) commit 4cb07b36c8e295b1163de79410c188c12d4917bd Author: Philipp Hortmann Date: Sun May 22 21:48:43 2022 +0200 staging: vt6655: Replace MACvSetCurrBCNLength with VNSvOutPortW Replace macro MACvSetCurrBCNLength with VNSvOutPortW and as it was the only user, it can now be removed. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/8ff556c84b3a4a70e8151965bcf6357e1de61bd1.1653203927.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.h | 5 ----- drivers/staging/vt6655/rxtx.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) commit 2e07715abac4f47e32723041e766d9053fe74b17 Author: Uri Arev Date: Mon May 23 21:22:26 2022 +0300 staging: greybus: Fix indentation in fw-management.c Reported by Checkpatch: CHECK: Alignment should match open parenthesis Signed-off-by: Uri Arev Link: https://lore.kernel.org/r/20220523182226.405159-1-me@wantyapps.xyz Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-management.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 864a821c787ba7594cc4df7a01be03dc56637cdb Author: Nam Cao Date: Sat May 28 00:53:50 2022 +0200 staging: sm750fb: fix camelCase function name Change camelCase function name sii164GetVendorID to sii164_get_vendor_id as suggested by checkpatch.pl Signed-off-by: Nam Cao Link: https://lore.kernel.org/r/20220527225350.GA220436@nam-dell Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_dvi.c | 2 +- drivers/staging/sm750fb/ddk750_sii164.c | 6 +++--- drivers/staging/sm750fb/ddk750_sii164.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 21c752ce5df20125af8f1f097f8bd6e237c9bdd7 Author: Srivathsan Sivakumar Date: Wed May 25 02:05:44 2022 -0400 staging: rts5208: spi.c: fix codestyle error in dynamic debug code reduce number of spaces in dev_dbg() code format the commit and changelog more clearly Signed-off-by: Srivathsan Sivakumar Link: https://lore.kernel.org/r/Yo3HOPPKnWHez7ES@Sassy Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/spi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit dcda884deb9cb1ca72e795e8c590ac05a8a02ea1 Author: Phillip Potter Date: Fri May 20 23:09:53 2022 +0100 staging: r8188eu: convert pr_info_once call in core/rtw_fw.c Convert pr_info_once call in core/rtw_fw.c to a dev_info_once call, as ultimately, this results in the printing of the driver name anyway (r8188eu) which is equally clear and removes the need for the "R8188EU: " part of the format string. Suggested-by: Pavel Skripkin Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20220520220953.11840-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_fw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f0b9246952860f986c8501199e3b08575f91882e Author: Julia Lawall Date: Sat May 21 13:11:20 2022 +0200 staging: qlge: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20220521111145.81697-70-Julia.Lawall@inria.fr Signed-off-by: Greg Kroah-Hartman drivers/staging/qlge/qlge_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d5976089c97a4beeeda4de59e2fba9862946893 Author: Xiang wangx Date: Mon Jun 6 10:23:13 2022 +0800 platform/chrome: cros_ec_commands: Fix syntax errors in comments Delete the redundant word 'using'. Signed-off-by: Xiang wangx Reviewed-by: Tzung-Bi Shih Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220606022313.22912-1-wangxiang@cdjrlc.com include/linux/platform_data/cros_ec_commands.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4319cbd4ed99003e0c981728ab1626c25be7af4a Author: Tzung-Bi Shih Date: Wed May 18 17:18:14 2022 +0800 platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_check_result() cros_ec_check_result() is used to check if the EC communication success but EC responded EC_RES_IN_PROGRESS. It should return 0 even if EC wasn't happy about the host command. Add Kunit tests for cros_ec_check_result(). Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220518091814.2028579-5-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto_test.c | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 97b11dd6350a1d5fb076df69ebbf504eb5c4fd57 Author: Tzung-Bi Shih Date: Wed May 18 17:18:13 2022 +0800 platform/chrome: cros_ec_proto: update cros_ec_check_result() comment At first glance, cros_ec_check_result() is quite like cros_ec_map_error(). They check for `ec_msg->result` and return corresponding errors. However, as calling from `pkt_xfer` and `cmd_xfer`, cros_ec_check_result() should not report furthermore errors. -EAGAIN is the only exception. See [1][2][3] for some known userland programs' code. The return code from ioctl only denotes the EC communication status. Userland programs would further analyze the `result` in struct cros_ec_command* for follow-up actions (e.g. [4]). To clarify, update the function comment. [1]: https://crrev.com/54400e93a75ef440a83d6eaac2cec066daf99cf0/util/comm-dev.c#154 [2]: https://crrev.com/fe32670a89bf59e1aff84bba9dd3295657b85e9b/cros_ec_dev.c#296 [3]: https://crrev.com/4e19eb1d89de0422ff1bbd3f7260b131c761098c/drivers/google/cros_ec_dev.c#120 [4]: https://crrev.com/54400e93a75ef440a83d6eaac2cec066daf99cf0/util/comm-dev.c#164 Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220518091814.2028579-4-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 23a34e3a9d00829f6bed67004a751d5b48f6084a Author: Tzung-Bi Shih Date: Wed May 18 17:18:12 2022 +0800 platform/chrome: cros_ec_proto: factor legacy out from cros_ec_prepare_tx() cros_ec_prepare_tx() mixed the code for both versions. To be neat and to make it clear, factor the legacy part out as a separate function, rename the function, and update the comments. Specifically, - prepare_tx(), for current protocol version (i.e. 3). - prepare_tx_legacy(), for protocol version <= 2. Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220518091814.2028579-3-tzungbi@kernel.org drivers/platform/chrome/cros_ec_proto.c | 51 ++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 23 deletions(-) commit db681eaf7145158fb49eddbdb548692e8bfe7fab Author: Tzung-Bi Shih Date: Wed May 18 17:18:11 2022 +0800 platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_prepare_tx() cros_ec_prepare_tx() is used to fill the protocol headers according to the requested protocol version. Add Kunit tests cros_ec_prepare_tx() for each version. Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220518091814.2028579-2-tzungbi@kernel.org drivers/platform/chrome/Kconfig | 9 ++ drivers/platform/chrome/Makefile | 3 + drivers/platform/chrome/cros_ec_proto_test.c | 173 +++++++++++++++++++++++++++ 3 files changed, 185 insertions(+) commit 02f4afebf8a54ba16f99f4f6ca10df3efeac6229 Author: Hangbin Liu Date: Thu Jun 2 11:25:07 2022 +0800 selftests/bpf: Add drv mode testing for xdping As subject, we only test SKB mode for xdping at present. Now add DRV mode for xdping. Signed-off-by: Hangbin Liu Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20220602032507.464453-1-liuhangbin@gmail.com tools/testing/selftests/bpf/test_xdping.sh | 4 ++++ 1 file changed, 4 insertions(+) commit 611edf1bacc51355ccb497915695db7f869cb382 Author: Yuze Chi Date: Thu Jun 2 22:51:56 2022 -0700 libbpf: Fix is_pow_of_2 Move the correct definition from linker.c into libbpf_internal.h. Fixes: 0087a681fa8c ("libbpf: Automatically fix up BPF_MAP_TYPE_RINGBUF size, if necessary") Reported-by: Yuze Chi Signed-off-by: Yuze Chi Signed-off-by: Ian Rogers Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220603055156.2830463-1-irogers@google.com tools/lib/bpf/libbpf.c | 5 ----- tools/lib/bpf/libbpf_internal.h | 5 +++++ tools/lib/bpf/linker.c | 5 ----- 3 files changed, 5 insertions(+), 10 deletions(-) commit e6ff92f41b65fce07365f1066fb13b5e42aca08d Author: Martin KaFai Lau Date: Wed Jun 1 16:40:50 2022 -0700 selftests/bpf: Fix tc_redirect_dtime tc_redirect_dtime was reported flaky from time to time. It always fails at the udp test and complains about the bpf@tc-ingress got a skb->tstamp when handling udp packet. It is unexpected because the skb->tstamp should have been cleared when crossing different netns. The most likely cause is that the skb is actually a tcp packet from the earlier tcp test. It could be the final TCP_FIN handling. This patch tightens the skb->tstamp check in the bpf prog. It ensures the skb is the current testing traffic. First, it checks that skb matches the IPPROTO of the running test (i.e. tcp vs udp). Second, it checks the server port (dst_ns_port). The server port is unique for each test (50000 + test_enum). Also fixed a typo in test_udp_dtime(): s/P100/P101/ Fixes: c803475fd8dd ("bpf: selftests: test skb->tstamp in redirect_neigh") Reported-by: Andrii Nakryiko Signed-off-by: Martin KaFai Lau Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20220601234050.2572671-1-kafai@fb.com .../testing/selftests/bpf/prog_tests/tc_redirect.c | 8 ++-- tools/testing/selftests/bpf/progs/test_tc_dtime.c | 53 +++++++++++++++++++++- 2 files changed, 55 insertions(+), 6 deletions(-) commit 988d0d5899248b758d2f2eae3b57708fe78a8618 Author: Daniel Xu Date: Sun May 29 15:15:41 2022 -0500 bpf, test_run: Remove unnecessary prog type checks These checks were effectively noops b/c there's only one way these functions get called: through prog_ops dispatching. And since there's no other callers, we can be sure that `prog` is always the correct type. Signed-off-by: Daniel Xu Signed-off-by: Daniel Borkmann Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Link: https://lore.kernel.org/bpf/0a9aaac329f76ddb17df1786b001117823ffefa5.1653855302.git.dxu@dxuuu.xyz net/bpf/test_run.c | 6 ------ 1 file changed, 6 deletions(-) commit 9bbdfad8a5192cfa698994dd8db3a52b137e7478 Author: Daniel Müller Date: Wed Jun 1 15:40:25 2022 +0000 libbpf: Fix a couple of typos This change fixes a couple of typos that were encountered while studying the source code. Signed-off-by: Daniel Müller Signed-off-by: Daniel Borkmann Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20220601154025.3295035-1-deso@posteo.net tools/lib/bpf/btf.c | 2 +- tools/lib/bpf/libbpf.h | 2 +- tools/lib/bpf/relo_core.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) commit 83eb5385b4f021c2674b1d78675bfd10443cdf74 Author: David Zhang Date: Mon Mar 14 11:31:12 2022 -0400 drm/amd/display: align dmub cmd header to latest dmub FW to support PSR-SU [why] PSR-SU is implemented in upstreamed dmub FW but not enabled on DM and DC. We'd add necessary and missing definitions in dmub cmd header to align w/ the up-to-date DMUB FW for PSR-SU support. [how] Add definitions and items below into dmub cmd header: - DMUB psr version enumeration for PSR-SU - dirty rectangle structure - psr debug flag of forcing full frame update - dmub command of updating dirty rectangle and cursor infor - dmub psr command type of setting sink vtotal in PSR active - dmub psr su debug flags structure - dmub cmd structure for - updating dirty rectangle - cursor infor - setting sink vtotal - dmub ringbuffer command items Signed-off-by: David Zhang Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 250 +++++++++++++++++++++++- 1 file changed, 245 insertions(+), 5 deletions(-) commit 8b67e738ca17fb52a275b1cc0191dfce0e9cd7a5 Author: Alan Liu Date: Thu Jun 2 19:41:58 2022 +0800 drm/amdgpu/display/dc: Add ACP_DATA register Define ixAZALIA_F0_CODEC_PIN_CONTROL_ACP_DATA Define AZALIA_F0_CODEC_PIN_CONTROL_ACP_DATA__SUPPORTS_AI_MASK/SHIFT Reviewed-by: Harry Wentland Signed-off-by: Alan Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/asic_reg/dce/dce_11_0_d.h | 1 + drivers/gpu/drm/amd/include/asic_reg/dce/dce_11_0_sh_mask.h | 2 ++ 2 files changed, 3 insertions(+) commit d8e4fb9112e88d8d87ffbc38fa511e7118042d4f Author: Alex Deucher Date: Wed Jun 1 22:22:07 2022 -0400 drm/amdgpu/display: Protect some functions with CONFIG_DRM_AMD_DC_DCN Protect remove_hpo_dp_link_enc_from_ctx() and release_hpo_dp_link_enc() with CONFIG_DRM_AMD_DC_DCN as the functions are only called from code that is protected by CONFIG_DRM_AMD_DC_DCN. Fixes build fail with -Werror=unused-function. Fixes: 9b0e0d433f74 ("drm/amd/display: Add dependant changes for DCN32/321") Reported-by: Stephen Rothwell Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Cc: Aurabindo Pillai drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3e80a5b068a5fedc69ada30ba1a2d1e0b76dfc25 Author: Duncan Ma Date: Thu Mar 31 15:13:22 2022 -0400 drm/amd/display: Add ODM seamless boot support Revised validation logic when marking for seamless boot. Init resources accordingly when Pre-OS has ODM enabled. Reset ODM when transitioning Pre-OS odm to Post-OS non-odm to avoid corruption. Apply logic to set odm accordingly upon commit. Signed-off-by: Duncan Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 9 ++++++++- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 5 +++++ drivers/gpu/drm/amd/display/dc/dcn31/dcn31_optc.c | 21 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 4 ++-- .../drm/amd/display/dc/inc/hw/timing_generator.h | 2 ++ 5 files changed, 38 insertions(+), 3 deletions(-) commit 405bb9eea36a02798631e8409f1182705699d092 Author: Alvin Lee Date: Fri Apr 29 20:41:10 2022 -0400 drm/amd/display: Implement DTBCLK ref switching on dcn32 [WHY & HOW] Implements DTB ref clock switching with reg key default to OFF. Refactors dccg DTBCLK logic to not store redundant state information dccg. Also removes duplicated functions that should be inherited from other dcn versions. Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher .../amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 87 ++++++++++++++++++---- .../dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.c | 18 +++++ .../dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.h | 1 + drivers/gpu/drm/amd/display/dc/dc.h | 5 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 9 +-- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.c | 1 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c | 2 + .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 12 ++- .../drm/amd/display/dc/dcn321/dcn321_resource.c | 11 ++- drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h | 3 +- 10 files changed, 118 insertions(+), 31 deletions(-) commit b6a93844145395068574cbbfaf3aea91d1f24f1a Author: Samson Tam Date: Mon Mar 21 10:22:19 2022 -0400 drm/amd/display: Match dprefclk with clk registers Update base.dprefclk_khz to match result from dcn32_dump_clk_registers() Signed-off-by: Samson Tam Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 80fb7a409c64ef304e4040320e87dbb2f10968ca Author: Martin Leung Date: Sun Feb 20 21:44:26 2022 -0500 drm/amd/display: cleaning up smu_if to add future flexibility This commit cleans up code that uses old variables and adds some SMU interfaces for future flexibility. Signed-off-by: Martin Leung Signed-off-by: Alex Deucher .../dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.c | 19 ++++--- .../dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.h | 7 +-- .../dc/clk_mgr/dcn32/dcn32_smu13_driver_if.h | 63 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c | 5 +- 4 files changed, 78 insertions(+), 16 deletions(-) commit 214d72f62978c28fe27d22d0d498d04493e9ce86 Author: Aurabindo Pillai Date: Tue Apr 26 14:29:15 2022 -0400 drm/amd/display: update disp pattern generator routine for DCN30 Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 33 ++-------------------- 1 file changed, 2 insertions(+), 31 deletions(-) commit 327f79d7a1d2dcc10aeda05983c4d1532dd0830a Author: Samson Tam Date: Fri Mar 4 09:34:58 2022 -0500 drm/amd/display: Updates for OTG and DCCG clocks Use DTBCLK for valid pixel clock generation Signed-off-by: Samson Tam Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | 5 ++++- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.h | 4 ++++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_optc.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) commit 0c9ed6044c5d08562d38d56e94279badef39e4c7 Author: Chaitanya Dhere Date: Mon Apr 11 13:37:21 2022 -0400 drm/amd/display: FCLK P-state support updates [Why] Previously we used to send FCLK P-state enable messages upon each call to update_clocks based on dml output. This resulted in increased message transactions between DC and PMFW. [How] Update the code to check safe_to_lower status and send the message based on dml input only on boot. This reduces message transactions. Also remove other unwanted code based on current code status. Signed-off-by: Chaitanya Dhere Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 11 +++++++---- .../drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.h | 1 - 2 files changed, 7 insertions(+), 5 deletions(-) commit e127306d433ff99f29d1b083c6b3aa128bbd9c5e Author: Jun Lei Date: Sun Feb 20 14:33:56 2022 -0500 drm/amd/display: Introduce new update_clocks logic [why] DCN has sidebands to control some clocks, it is useful for clk_mgr to always update the clocks it explicitly controls rather than skip them because it enables more configurations to work without SMU [how] only skip handling clocks where SMU manages the frequency for clocks with DENTIST sideband (DISP/DPP), only skip the voltage request when SMU not available, but otherwise proceed normally Signed-off-by: Jun Lei Signed-off-by: Alex Deucher .../amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 125 ++++++++++++--------- 1 file changed, 73 insertions(+), 52 deletions(-) commit 6ea843e01bce520cf5dea86bc30c5133e0d0822d Author: Jingwen Zhu Date: Tue Mar 15 13:15:27 2022 +0800 drm/amd/display: set link fec status during init for DCN32 We can now enable FEC. Signed-off-by: Jingwen Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 49f594995a9255ff734f79c1fc22bd06119ebe8f Author: Jun Lei Date: Sun Feb 20 13:58:51 2022 -0500 drm/amd/display: add new pixel rate programming [why] New dividers in DCCG need to be programmed depending on encoder/stream type since pixels per clock in OTG/DIO is different DIO also needs additional programming depending on pixels per clock Signed-off-by: Jun Lei Signed-off-by: Alex Deucher Signed-off-by: Rodrigo Siqueira .../amd/display/dc/dcn10/dcn10_stream_encoder.h | 1 + drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 14 +++++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c | 1 + .../display/dc/dcn32/dcn32_dio_stream_encoder.h | 3 +- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 72 ++++++++++++++++++++-- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.h | 2 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.c | 1 + drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h | 3 +- .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 3 + .../drm/amd/display/dc/inc/hw_sequencer_private.h | 3 + 10 files changed, 95 insertions(+), 8 deletions(-) commit 452e9214431f1f6385bb20fdf6e1b5692947071f Author: Alvin Lee Date: Tue Apr 5 14:46:30 2022 -0400 drm/amd/display: Remove W/A for ODM memory pins [Description] By default we can now set ODM_MEM_VBLANK_PWR_MODE=1 Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b5a0168e1406176cf98487833b7468a1ea5872d3 Author: Alex Deucher Date: Tue May 24 10:11:33 2022 -0400 drm/amdgpu: fix up comment in amdgpu_device_asic_has_dc_support() LVDS support was implemented in DC a while ago. Just DAC support is left to do. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e87b92c6af537843daf7da9235e622988bae7eae Author: Samson Tam Date: Thu Apr 7 12:04:42 2022 -0400 drm/amd/display: do not override CURSOR_REQ_MODE when SubVP is not enabled [Why] HUBP_UNBOUNDED_REQ_MODE and CURSOR_REQ_MODE are normally set together. In hubp32_prepare_subvp_buffering() call, CURSOR_REQ_MODE is set based on whether SubVP is enabled or not. For non MPO case, both REQ_MODE registers are set to 1. But since SubVP is not enabled, then CURSOR_REQ_MODE is set to 0, overriding the previous value. [How] Do not set CURSOR_REQ_MODE to 0 if SubVP is not enabled. This will allow CURSOR_REQ_MODE to stay as 1 in the non MPO case. Add note to follow up and check case for single pipe MPO and SubVP enabled as this would cause both REQ_MODE registers to be set to 0 but SubVP enabled would override CURSOR_REQ_MODE to 1. Signed-off-by: Samson Tam Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 4c1b3d0803aef6d39913f1e9d2cfe2c1ccce18e8 Author: Dan Carpenter Date: Mon May 30 14:42:25 2022 +0300 drm/amdgpu: delete duplicate condition in gfx_v11_0_soft_reset() We know that "grbm_soft_reset" is true because we're already inside an if (grbm_soft_reset) condition. No need to test again. Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 7a09f61f8e842dd027afa1ce8be8bd86062c8a7b Author: Alex Deucher Date: Thu May 26 12:04:38 2022 -0400 drm/amdgpu/swsmu: use new register offsets for smu_cmn.c Use the per asic offsets so the we don't have to have asic specific logic in the common code. Reviewed-by: Luben Tuikov Reviewed-by: Yang Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 77 ++++------------------------------ 1 file changed, 7 insertions(+), 70 deletions(-) commit 3378aed7e2ec7212889116335a2120a6e35c80ce Author: Dillon Varone Date: Mon Apr 11 10:29:57 2022 -0400 drm/amd/display: change dsc image width cap for dcn32 and dcn321 Set appropriate caps for DCN3.2.x. Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 3 +++ drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 3 +++ 2 files changed, 6 insertions(+) commit da1db031cd30fefc99d1c82211d3c24b73857bbe Author: Alex Deucher Date: Thu May 26 11:55:36 2022 -0400 drm/amdgpu/swsmu: add SMU mailbox registers in SMU context So we can eventaully use them in the common smu code for accessing the SMU mailboxes without needing a lot of per asic logic in the common code. Reviewed-by: Yang Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 4 ++++ drivers/gpu/drm/amd/pm/swsmu/inc/smu_v11_0.h | 2 ++ drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 ++ drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 1 + .../gpu/drm/amd/pm/swsmu/smu11/cyan_skillfish_ppt.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 1 + .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 9 +++++++++ drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 14 ++++++++++++++ drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 18 ++++++++++++++++++ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c | 14 ++++++++++++++ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c | 14 ++++++++++++++ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 1 + 17 files changed, 86 insertions(+) commit 2267a195e28cc438cb45936c4562f958502d4038 Author: Dillon Varone Date: Wed Apr 13 17:54:19 2022 -0400 drm/amd/display: Disable DTB Ref Clock Switching in dcn32 [How & Why] To be enabled once PMFW supports it. Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2cfe34e18970d26bff73c63f16c76dae22138d19 Author: Alex Deucher Date: Thu May 26 12:48:51 2022 -0400 drm/amdgpu/gmc11: enable AGP aperture Enable the AGP aperture on chips with GMC v11. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0.c | 7 ++++--- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/mmhub_v3_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_2.c | 6 +++--- 4 files changed, 11 insertions(+), 9 deletions(-) commit ac1ac694f7173a0fbb0b60ab0f26226dd334479a Author: Alex Deucher Date: Tue May 24 10:27:33 2022 -0400 drm/amdgpu: convert nbio_v2_3_clear_doorbell_interrupt() to IP version Check IP version rather than asic type. Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be77243327d962a87bcf03615bae12d73efb9b7c Author: Dillon Varone Date: Mon Apr 18 14:39:20 2022 -0400 drm/amd/display: set dram speed for all states [WHY?] If higher states have memory speed set to 0 MT/s currently they do not get set to the highest value which can cause validation failures. [HOW?] Set unpopulated higher states to max value. Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 6 +++++- drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) commit 1d6c363330834fa534c1c7ee01620ff134aade1f Author: Alex Deucher Date: Tue May 24 09:55:51 2022 -0400 drm/amdgpu: simplify the logic in amdgpu_device_parse_gpu_info_fw() Drop all of the extra cases in the default case. Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 29 ----------------------------- 1 file changed, 29 deletions(-) commit 9d6b2041761ff6d5a33941919c8b5a805ecbed6c Author: Alex Deucher Date: Tue May 24 10:02:16 2022 -0400 drm/amdgpu: convert sienna_cichlid_populate_umd_state_clk() to use IP version Rather than asic type. Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2388a778bdacad0c936dbb01048362864847f8ad Author: Fangzhi Zuo Date: Tue Apr 19 15:49:48 2022 -0400 drm/amd/display: Halve DTB Clock Value for DCN32 VBIOS default clock value was halved, so the hardcoded dtb value should be halved as well. dtb clock should come from SMU eventually, but now dtb clock switching is not fully supported yet in SMU. Halve the dtb hardcoded value for now to have UHBR10 light up. Will rely on SMU for dtb clock switching once available. The w/a is for DCN32 only, DCN321 should adopt the original value. Signed-off-by: Fangzhi Zuo Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ccb9ea9976022034d8fffd8d929d6e70a24e0c6 Author: Dillon Varone Date: Thu Apr 14 17:03:28 2022 -0400 drm/amd/display: Add additional guard for FCLK pstate message for DCN321 Signed-off-by: Dillon Varone Signed-off-by: Fangzhi Zuo Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 72b5f23ccb0aee46029476cbb072074384aef591 Author: Xiaojian Du Date: Fri May 20 21:33:29 2022 +0800 drm/amdgpu: fix sdma doorbell issue on SDMA v6.0 and NBIO v7.7 This patch will fix sdma doorbell issue on SDMA v6.0 and NBIO v7.7.0. NBIO v7.7.0 uses a new reg function -- Common SDMA to allow a common doorbell range for all SDMA queues, this is different to the old NBIO version. This patch will add configuration for CSDMA and enable SDMA doorbell function. Signed-off-by: Xiaojian Du Reviewed-by: Tim Huang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit cb12d72b426caa7594890c62df69fe4b83c96e58 Author: Xiaojian Du Date: Fri May 20 22:27:57 2022 +0800 drm/amdgpu: add CSDMA reg offsets for NBIO v7.7.0 This patch will add CSDMA reg offsets for NBIO v7.7.0 Signed-off-by: Xiaojian Du Acked-by: Roman Li Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_7_0_offset.h | 4 ++++ drivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_7_0_sh_mask.h | 10 ++++++++++ 2 files changed, 14 insertions(+) commit 80d46fff373775fdea9917a7d13f6fb6fa5147ad Author: Huang Rui Date: Wed May 18 22:05:03 2022 +0800 drm/amdgpu: add apu sequence in the imu v11 APU required to issue the enable GFX IMU message after IMU reset. Signed-off-by: Huang Rui Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 6 +++++- drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) commit 7101ab97e3b00ec1c68d09826bb0521d17783673 Author: Huang Rui Date: Wed May 18 21:19:32 2022 +0800 drm/amdgpu/pm: implement the SMU_MSG_EnableGfxImu function GC v11_0_1 asic needs to issue the EnableGfxImu message after start IMU. Signed-off-by: Huang Rui Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 14 ++++++++++++++ drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 2 ++ drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 9 ++++++++- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 7 +++++++ drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 ++ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 10 ++++++++++ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c | 1 + 7 files changed, 44 insertions(+), 1 deletion(-) commit 8763e4c1a0e6710dccb8fccba96fcd6caaa50cae Author: Huang Rui Date: Tue May 17 14:58:41 2022 +0800 drm/amdgpu/pm: update MP v13_0_4 smu message register marco Update MP v13_0_4 register macro for SMU message v2: squash in missed case (Alex) Signed-off-by: Huang Rui Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 10c4ad3ae025dd0e343a09d2ea4b0e71f8d10797 Author: Huang Rui Date: Thu May 12 16:13:07 2022 +0800 drm/amdgpu: add mmhub v3_0_1 ip block This adds mmhub v3_0_1 ip block support v2: rebase (Alex) Signed-off-by: Huang Rui Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 4 + drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.c | 555 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.h | 28 ++ 4 files changed, 589 insertions(+), 1 deletion(-) commit d57716702deac8e0ec440739eb4cd6eb0872ddd4 Author: Huang Rui Date: Thu May 12 16:03:34 2022 +0800 drm/amdgpu: add mmhub v3_0_1 headers Add mmhub v3_0_1 headers, because there are many differeces with v3_0_0. v2: squash in updates (Alex) Signed-off-by: Huang Rui Reviewed-by: Tim Huang Signed-off-by: Alex Deucher .../include/asic_reg/mmhub/mmhub_3_0_1_offset.h | 1769 +++++ .../include/asic_reg/mmhub/mmhub_3_0_1_sh_mask.h | 7483 ++++++++++++++++++++ 2 files changed, 9252 insertions(+) commit 16600b7d66367482dc8526f8bc3a30b32aaef329 Author: Huang Rui Date: Fri May 20 11:04:05 2022 +0800 drm/amdgpu: use the callback function for reset status polling on IMU Switch to use the callback function to poll the reset status on IMU. Because it will have different sequency on other ASICs. v2: drop unused variable (Alex) Acked-by: Alex Deucher Signed-off-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_imu.h | 1 + drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 37 ++++++++++++++++++++------------- 2 files changed, 24 insertions(+), 14 deletions(-) commit 9fe5d08fc8230adb64128986ee4af267a54e56dd Author: Dillon Varone Date: Thu Apr 14 16:57:17 2022 -0400 drm/amd/display: Ensure that DMCUB fw in use is loaded by DC and not VBIOS [Why?] On wake from S3/S4, driver checks if DMUB is initialized. On S4 VBIOS loads DMUB, and driver does not reload as it appears to be initialized already. [How?] Add a check for the DAL_FW bit to ensure that loaded FW is from driver and not VBIOS. Signed-off-by: Dillon Varone Signed-off-by: Fangzhi Zuo Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 218987fdead218ae0e714cd9059bc9fc480220f9 Author: Charlene Liu Date: Tue Apr 5 16:13:45 2022 -0400 drm/amd/display: use updated clock source init routine [why] Use correct clock source initialization routine for DCN32/321 Signed-off-by: Charlene Liu Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1908a07cffdfc7c57ba5116418c3f2b5ef05e0f6 Author: Dillon Varone Date: Fri Apr 1 16:45:40 2022 -0400 drm/amd/display: Select correct DTO source [WHY&HOW] Change criteria for setting DTO source value, and always set it regardless of the signal type. Signed-off-by: Dillon Varone Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit cbd3e8440e2e6a4d83479235c9bf278b89360946 Author: Stanley.Yang Date: Fri May 20 21:03:09 2022 +0800 drm/amdgpu: print umc correctable error address Signed-off-by: Stanley.Yang Acked-by: Lijo Lazar Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 5 +++ drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 50 +++++++++++++++++++++- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 1 + 3 files changed, 54 insertions(+), 2 deletions(-) commit 6a640b95b061fe340214ebd4638974b8b6f08efe Author: Aurabindo Pillai Date: Thu Mar 24 15:42:17 2022 -0400 drm/amd/display: disable idle optimizations Disable idle optimizations until SMU can handle them to prevent DMUB timeout and subsequent system freeze Signed-off-by: Aurabindo Pillai Acked-by: Jerry Zuo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 1 + 1 file changed, 1 insertion(+) commit b3f2c796634613bca511266b37084560f36b67c1 Author: Aurabindo Pillai Date: Thu Mar 24 14:59:09 2022 -0400 drm/amd/display: add missing interrupt handlers for DCN32/DCN321 Signed-off-by: Aurabindo Pillai Acked-by: Jerry Zuo Signed-off-by: Alex Deucher .../amd/display/dc/irq/dcn32/irq_service_dcn32.c | 65 +++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) commit e06c5f59ffe1006f1c6f533113b72ad48a6d4564 Author: Alvin Lee Date: Mon Mar 14 19:54:53 2022 -0400 drm/amd/display: Implement WM table transfer for DCN32/DCN321 Add support for watermark table transfers. Signed-off-by: Alvin Lee Acked-by: Jerry Zuo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 9761843250f1367043ae2a483461af287aecc879 Author: Dillon Varone Date: Tue Mar 8 18:45:08 2022 -0500 drm/amd/display: Various DML fixes to enable higher timings Fixes to enable higher rate timings for DCN3.2.x. Signed-off-by: Dillon Varone Signed-off-by: Chaitanya Dhere Signed-off-by: Nevenko Stupar Acked-by: Jerry Zuo Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn32/dcn32_hubbub.c | 4 +-- .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 33 ++++++++++++++-------- .../gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 27 ++---------------- 3 files changed, 26 insertions(+), 38 deletions(-) commit a839a73b18157fe30eb4acd2a1f1ffdb890762ff Author: Dillon Varone Date: Tue Mar 8 15:32:06 2022 -0500 drm/amd/display: Add guard for FCLK pstate message to PMFW for DCN321 [WHY?] DCN321 does not support FCLK DPM, and thus it should not send messages to PMFW regarding it. Signed-off-by: Dillon Varone Acked-by: Jerry Zuo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 542a0f2ef9ea2ccfadf2b8a3b53368c61fc97a0f Author: Huang Rui Date: Fri May 20 11:04:04 2022 +0800 drm/amdgpu: introduce two work mode for imu IMU has two work mode such as debug mode and mission mode. Current GC v11_0_0 is using the debug mode. Acked-by: Alex Deucher Signed-off-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_imu.h | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 30 +++++++++++++++++------------- 3 files changed, 24 insertions(+), 13 deletions(-) commit 2cb6915dcf70a2bf7ee10fcf3f56b083beec1086 Author: Eric Bernstein Date: Thu Mar 3 14:11:46 2022 -0500 drm/amd/display: Use DTBCLK for valid pixel clock Use DTBCLK for valid pixel clock generation Signed-off-by: Eric Bernstein Acked-by: Jerry Zuo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c | 20 ++++++++++++++------ drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h | 17 +++++++++++++++++ 2 files changed, 31 insertions(+), 6 deletions(-) commit 3dc35cf8789ac93d656f255539f9b37c5051ebf6 Author: Alvin Lee Date: Mon Feb 28 17:24:00 2022 -0500 drm/amd/display: Add missing instance for clock source register [Description] Need to add inst 5 for clk_src_regs because there are 5 PHY instances in DCN32 & DCN321. Signed-off-by: Alvin Lee Acked-by: Jerry Zuo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 3 ++- drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit e42ce1366ae806ba2c1f884997703be68df428f4 Author: Dillon Varone Date: Tue Mar 1 16:15:03 2022 -0500 drm/amd/display: Fix USBC link creation [Description] Add USBC connector ID to align with new VBIOS parsing. Add seperate DCN321 link encoder due to different PHY version affecting DP ALT related registers. Signed-off-by: Dillon Varone Acked-by: Jerry Zuo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 1 + .../gpu/drm/amd/display/dc/bios/command_table.c | 4 +- .../drm/amd/display/dc/dcn10/dcn10_link_encoder.h | 6 + .../amd/display/dc/dcn10/dcn10_stream_encoder.h | 3 + .../amd/display/dc/dcn32/dcn32_dio_link_encoder.c | 15 +- .../amd/display/dc/dcn32/dcn32_dio_link_encoder.h | 20 ++- drivers/gpu/drm/amd/display/dc/dcn321/Makefile | 2 +- .../display/dc/dcn321/dcn321_dio_link_encoder.c | 199 +++++++++++++++++++++ .../display/dc/dcn321/dcn321_dio_link_encoder.h | 42 +++++ .../drm/amd/display/dc/dcn321/dcn321_resource.c | 3 +- .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 2 + .../drm/amd/display/include/bios_parser_types.h | 3 +- 12 files changed, 292 insertions(+), 8 deletions(-) commit 543036a2de71f14f8ad566c858e5e9ff61736a86 Author: Aurabindo Pillai Date: Mon Feb 21 15:33:05 2022 -0500 drm/amd: Add GFX11 modifiers support to AMDGPU (v3) GFX11 IP introduces new tiling mode. Various combinations of DCC settings are possible and the most preferred settings must be exposed for optimal use of the hardware. add_gfx11_modifiers() is based on recommendation from Marek for the preferred tiling modifier that are most efficient for the hardware. v2: microtiling fix noticed by Marek v3: keep Z tiling check Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 52 +++++++++++++--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 76 ++++++++++++++++++++++- include/uapi/drm/drm_fourcc.h | 2 + 3 files changed, 117 insertions(+), 13 deletions(-) commit 49401d3a5c86f5ead12ea7cbe98031edb512b13a Author: Kenneth Feng Date: Tue May 31 09:51:40 2022 +0800 drm/amd/amdgpu: align the cg and pg settings align the cg and pg settings between gc_v11_0 and gc_v11_2 Signed-off-by: Kenneth Feng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 85b0cc35efab0cbc78c083d4506250bea6a755ad Author: Aurabindo Pillai Date: Mon Apr 25 18:33:23 2022 -0400 drm/amd/display: add DCN32 to IP discovery table [Why&How] Add DCN32 to IP discovery to enable automatic initialization of AMDGPU Display Manager Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 ++ 1 file changed, 2 insertions(+) commit 577359ca178262a64236cc96299714dbff21e9c7 Author: Aurabindo Pillai Date: Wed Feb 23 19:05:09 2022 -0500 drm/amd/display: Add DM support for DCN32/DCN321 Add Display Manager specific changes for DCN3.2.x. DM handles the interaction between the core DC modesetting code and the drm modesetting infrastructure. Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 3b1229741eda70116e0163affdda377484a788ae Author: Jack Xiao Date: Wed May 18 14:11:20 2022 +0800 drm/amdgpu/mes11: update mes11 api interface fix mes11 api interface. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/mes_v11_api_def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3dfceb58de5f897640cdd424f6c2538d9514367 Author: Aurabindo Pillai Date: Wed Feb 23 17:48:45 2022 -0500 drm/amd/display: Add dependant changes for DCN32/321 [Why&How] This patch adds necessary changes needed in DC files outside DCN32/321 specific tree v2: squash in updates (Alex) Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/Makefile | 2 + drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 949 ++++++++++++++++----- .../display/dc/bios/bios_parser_types_internal2.h | 1 + .../amd/display/dc/bios/command_table_helper2.c | 2 + drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 14 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 20 +- drivers/gpu/drm/amd/display/dc/dc.h | 19 + drivers/gpu/drm/amd/display/dc/dc_bios_types.h | 5 + drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 1 + drivers/gpu/drm/amd/display/dc/dc_stream.h | 21 + drivers/gpu/drm/amd/display/dc/dce/dce_abm.h | 45 + .../gpu/drm/amd/display/dc/dce/dce_clock_source.h | 15 + .../gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.h | 33 + .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 5 - drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | 2 + .../amd/display/dc/dcn10/dcn10_stream_encoder.h | 25 + drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dccg.h | 34 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h | 25 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 32 +- .../display/dc/dcn30/dcn30_dio_stream_encoder.c | 16 +- .../display/dc/dcn30/dcn30_dio_stream_encoder.h | 35 + drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c | 8 +- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.h | 16 + drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 14 +- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.h | 147 ++++ drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h | 9 + drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.c | 28 +- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.h | 14 +- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_optc.c | 22 +- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_optc.h | 6 +- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c | 45 +- .../display/dc/dcn32/dcn32_dio_stream_encoder.c | 36 +- .../display/dc/dcn32/dcn32_dio_stream_encoder.h | 15 +- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 4 +- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_optc.c | 36 +- .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 2 +- .../gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 59 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 10 + drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h | 5 +- drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h | 3 + drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 7 + drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 2 + .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 4 + .../drm/amd/display/dc/inc/hw/timing_generator.h | 10 +- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 2 + .../drm/amd/display/dc/inc/hw_sequencer_private.h | 5 + drivers/gpu/drm/amd/display/dc/inc/resource.h | 7 + .../drm/amd/display/include/bios_parser_types.h | 10 + 49 files changed, 1521 insertions(+), 308 deletions(-) commit 235c67634230b0f9ad8c0185272fed36c892b1c4 Author: Aurabindo Pillai Date: Wed Feb 23 17:46:31 2022 -0500 drm/amd/display: add DCN32/321 specific files for Display Core Add core DC support for DCN 3.2.x. v2: squash in fixup (Alex) Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/Makefile | 37 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c | 299 ++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.h | 155 + .../amd/display/dc/dcn32/dcn32_dio_link_encoder.c | 283 ++ .../amd/display/dc/dcn32/dcn32_dio_link_encoder.h | 42 + .../display/dc/dcn32/dcn32_dio_stream_encoder.c | 427 +++ .../display/dc/dcn32/dcn32_dio_stream_encoder.h | 254 ++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dpp.c | 164 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dpp.h | 38 + .../display/dc/dcn32/dcn32_hpo_dp_link_encoder.c | 90 + .../display/dc/dcn32/dcn32_hpo_dp_link_encoder.h | 63 + .../gpu/drm/amd/display/dc/dcn32/dcn32_hubbub.c | 964 +++++ .../gpu/drm/amd/display/dc/dcn32/dcn32_hubbub.h | 172 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubp.c | 148 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubp.h | 69 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 891 +++++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.h | 64 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.c | 155 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.h | 33 + .../gpu/drm/amd/display/dc/dcn32/dcn32_mmhubbub.c | 239 ++ .../gpu/drm/amd/display/dc/dcn32/dcn32_mmhubbub.h | 225 ++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c | 810 ++++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mpc.h | 213 ++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_optc.c | 236 ++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_optc.h | 253 ++ .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 3976 ++++++++++++++++++++ .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.h | 88 + drivers/gpu/drm/amd/display/dc/dcn321/Makefile | 34 + .../drm/amd/display/dc/dcn321/dcn321_resource.c | 32 +- .../drm/amd/display/dc/dcn321/dcn321_resource.h | 42 + 30 files changed, 10478 insertions(+), 18 deletions(-) commit 265280b99822e5562eb431b102f2ba773c7b2a0a Author: Aurabindo Pillai Date: Mon Feb 21 17:01:06 2022 -0500 drm/amd/display: add CLKMGR changes for DCN32/321 Add support for managing DCN3.2.x clocks. v2: squash in smu interface updates (Alex) v3: Drop unused SMU header (Alex) Signed-off-by: Aurabindo Pillai Acked-by: Jerry Zuo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile | 35 + drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 17 +- .../amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 15 +- .../amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.h | 60 + .../gpu/drm/amd/display/dc/clk_mgr/dcn32/dalsmc.h | 65 + .../amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 628 ++++++ .../amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.h | 39 + .../dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.c | 117 + .../dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.h | 49 + .../amd/display/dc/clk_mgr/dcn32/smu13_driver_if.h | 108 + drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 3 + drivers/gpu/drm/amd/display/dc/dc.h | 3 + .../drm/amd/display/dc/dcn321/dcn321_resource.c | 2325 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 2 + .../drm/amd/display/dc/inc/hw/clk_mgr_internal.h | 45 +- 15 files changed, 3506 insertions(+), 5 deletions(-) commit dda4fb85e433f761eedaed0005a2bc20d705d504 Author: Aurabindo Pillai Date: Mon Feb 21 16:58:49 2022 -0500 drm/amd/display: DML changes for DCN32/321 DML is required for display configuration modelling for things like bandwidth management and validation. Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/Makefile | 7 + .../amd/display/dc/dml/dcn30/display_mode_vba_30.c | 8 +- .../amd/display/dc/dml/dcn31/display_mode_vba_31.c | 2 +- .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 3835 ++++++++++++ .../amd/display/dc/dml/dcn32/display_mode_vba_32.h | 57 + .../dc/dml/dcn32/display_mode_vba_util_32.c | 6254 ++++++++++++++++++++ .../dc/dml/dcn32/display_mode_vba_util_32.h | 1175 ++++ .../display/dc/dml/dcn32/display_rq_dlg_calc_32.c | 616 ++ .../display/dc/dml/dcn32/display_rq_dlg_calc_32.h | 70 + .../drm/amd/display/dc/dml/display_mode_enums.h | 88 +- .../gpu/drm/amd/display/dc/dml/display_mode_lib.c | 12 + .../gpu/drm/amd/display/dc/dml/display_mode_lib.h | 15 + .../drm/amd/display/dc/dml/display_mode_structs.h | 132 + .../gpu/drm/amd/display/dc/dml/display_mode_vba.c | 171 + .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 242 +- drivers/gpu/drm/amd/display/dc/dml/dml_wrapper.c | 71 +- 16 files changed, 12710 insertions(+), 45 deletions(-) commit 58efeea32d5e32fa340c7ee3f52d5f986b240e39 Author: Aurabindo Pillai Date: Mon Feb 21 16:55:55 2022 -0500 drm/amd/display: add GPIO changes for DCN32/321 Add support for the GPIO changes for DCN3.2.x. Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/gpio/Makefile | 8 +- .../amd/display/dc/gpio/dcn32/hw_factory_dcn32.c | 255 +++++++++++++++ .../hw_factory_diag.h => dcn32/hw_factory_dcn32.h} | 13 +- .../amd/display/dc/gpio/dcn32/hw_translate_dcn32.c | 349 +++++++++++++++++++++ .../hw_translate_dcn32.h} | 11 +- .../display/dc/gpio/diagnostics/hw_factory_diag.c | 62 ---- .../dc/gpio/diagnostics/hw_translate_diag.c | 41 --- drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 16 +- drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 13 +- 9 files changed, 628 insertions(+), 140 deletions(-) commit 0efd4374f6b41650863947a7528d45e8ad0f7ae0 Author: Aurabindo Pillai Date: Mon Feb 21 16:41:46 2022 -0500 drm/amd/display: add dcn32 IRQ changes Add DCN3.2.x interrupt support. Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/irq/Makefile | 10 +- .../amd/display/dc/irq/dcn32/irq_service_dcn32.c | 369 +++++++++++++++++++++ .../amd/display/dc/irq/dcn32/irq_service_dcn32.h | 35 ++ 3 files changed, 413 insertions(+), 1 deletion(-) commit ac2e555e0a7fe571d46f7dcb1529b4bee00095d6 Author: Aurabindo Pillai Date: Mon Feb 21 16:03:58 2022 -0500 drm/amd/display: Add DMCUB source files and changes for DCN32/321 DMCUB is the display engine microcontroller which aids in modesetting and other display related features. Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 31 ++ drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 2 + drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 6 + drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 26 +- drivers/gpu/drm/amd/display/dmub/src/Makefile | 1 + drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c | 488 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.h | 256 ++++++++++++ drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c | 51 ++- 8 files changed, 859 insertions(+), 2 deletions(-) commit 4f29f9cf092b2d331ba2081566be3272962b7f96 Author: Aurabindo Pillai Date: Thu Apr 14 15:19:16 2022 -0400 drm/amd: add register headers for DCN32/321 Add register headers for DCN 3.2.0 and 3.2.1. Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher .../amd/include/asic_reg/dcn/dcn_3_2_0_offset.h | 14675 ++ .../amd/include/asic_reg/dcn/dcn_3_2_0_sh_mask.h | 222890 ++++++++++++++++++ .../amd/include/asic_reg/dcn/dcn_3_2_1_offset.h | 14559 ++ .../amd/include/asic_reg/dcn/dcn_3_2_1_sh_mask.h | 56578 +++++ 4 files changed, 308702 insertions(+) commit 79b470e5ee83e979f8ff465efa8b7ced160bcae7 Author: Aurabindo Pillai Date: Mon Feb 21 15:49:20 2022 -0500 drm/amd/display: Add DCN32/321 version identifiers Add DCN3.2 asic identifiers. Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 2 ++ drivers/gpu/drm/amd/display/include/dal_asic_id.h | 8 ++++++++ drivers/gpu/drm/amd/display/include/dal_types.h | 2 ++ 3 files changed, 12 insertions(+) commit b801d8ad1b516a951535241c9cf60cac8f9a5c2b Author: Aurabindo Pillai Date: Mon Feb 21 15:34:41 2022 -0500 drm/amd: Add atomfirmware.h definitions needed for DCN32/321 Add new structures for DCN 3.2.x. Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/atomfirmware.h | 209 ++++++++++++++++++++++++++--- 1 file changed, 187 insertions(+), 22 deletions(-) commit 2f6247dad2c56cfe2df3c6e00586ead5ee905b46 Author: Stanley.Yang Date: Fri May 20 18:22:21 2022 +0800 drm/amdgpu/pm: support mca_ceumc_addr in ecctable SMU add a new variable mca_ceumc_addr to record umc correctable error address in EccInfo table, driver side add EccInfo_V2_t to support this feature Signed-off-by: Stanley.Yang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 1 + .../swsmu/inc/pmfw_if/smu13_driver_if_aldebaran.h | 16 ++++++- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 53 +++++++++++++++++----- 3 files changed, 57 insertions(+), 13 deletions(-) commit faf26f2b12e1e03956f7e628183e422d94713e4b Author: pengfuyuan Date: Thu May 26 17:29:09 2022 +0800 drm/amd: Fix spelling typo in comments Fix spelling typo in comments. Reported-by: k2ci Signed-off-by: pengfuyuan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 4 ++-- drivers/gpu/drm/amd/display/modules/vmid/vmid.c | 2 +- drivers/gpu/drm/amd/include/mes_api_def.h | 2 +- drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/arcturus_ppsmc.h | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) commit e309434ac56774c86e79a50980e8611ce7cc31a3 Author: Evan Quan Date: Wed May 18 11:40:54 2022 +0800 drm/amd/pm: enable fclk ds feature for SMU 13.0.0 The feature is ready with latest 78.39.0 PMFW. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 ++ 1 file changed, 2 insertions(+) commit 66f54992981444cb418f31018e190d15c92d3599 Author: Evan Quan Date: Mon May 16 09:50:31 2022 +0800 drm/amd/pm: update SMU 13.0.0 driver_if header To fit the latest 78.39.0 PMFW. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 6 ++++++ drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit d5fe83d26dae59c5b52105075e8950dea8ce7c19 Author: Evan Quan Date: Tue May 10 16:08:50 2022 +0800 drm/amd/pm: correct the way for retrieving current uclk frequency There is some problem with average frequency reading. Thus, we switch to the target frequency reading instead. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f74e78ca90bd21b47746b90c439709007681f44c Author: Mitchell Augustin Date: Wed May 25 14:09:14 2022 -0500 amdgpu: amdgpu_device.c: Removed trailing whitespace Removed trailing whitespace from end of line in amdgpu_device.c Signed-off-by: Mitchell Augustin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab9d97d6f9f1bb5de83411581dc6cdf425a83a15 Author: Alex Deucher Date: Tue May 24 10:17:43 2022 -0400 drm/amdgpu: convert sienna_cichlid_get_default_config_table_settings() to IP version Use IP version rather than asic type. Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8b64595d6a1ccd5cdf56c528e921332d1366b22 Author: Alex Deucher Date: Tue May 24 10:10:18 2022 -0400 drm/amdgpu: simplify amdgpu_device_asic_has_dc_support() Drop extra cases in the default case. Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 26 -------------------------- 1 file changed, 26 deletions(-) commit a820190204aef0739aa3a067d00273d117f9367c Author: Leung, Martin Date: Fri May 13 17:40:42 2022 -0400 drm/amdgpu/display: Prepare for new interfaces why: lut pipeline will be hooked up differently in some asics need to add new interfaces how: add them Reviewed-by: Krunoslav Kovac Acked-by: Jasdeep Dhillon Tested-by: Daniel Wheeler Signed-off-by: Martin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 + drivers/gpu/drm/amd/display/dc/core/dc_link.c | 17 ++++++- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 52 +++++++++++++--------- drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../amd/display/dc/dce110/dce110_hw_sequencer.c | 23 +++++++--- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.c | 13 +++--- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h | 4 +- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 5 +++ .../drm/amd/display/dc/inc/hw_sequencer_private.h | 2 + 10 files changed, 83 insertions(+), 38 deletions(-) commit f7dad0daf2c2368f72828b0729799f01bdcee33b Author: Matt Roper Date: Thu Jun 2 16:30:19 2022 -0700 drm/i915/pvc: GuC depriv applies to PVC We missed this setting in the initial device info patch's definition of XE_HPC_FEATURES. Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20220602233019.1659283-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 + 1 file changed, 1 insertion(+) commit 6352cd451ddbb506ce061868a9e5465d294d4857 Author: Jagan Teki Date: Fri Jun 3 19:33:49 2022 +0530 drm: bridge: Add TI DLPC3433 DSI to DMD bridge TI DLPC3433 is a MIPI DSI based display controller bridge for processing high resolution DMD based projectors. It has a flexible configuration of MIPI DSI and DPI signal input that produces a DMD output in RGB565, RGB666, RGB888 formats. It supports upto 720p resolution with 60 and 120 Hz refresh rates. Add bridge driver for it. Signed-off-by: Christopher Vollo Signed-off-by: Jagan Teki Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220603140349.3563612-2-jagan@amarulasolutions.com MAINTAINERS | 1 + drivers/gpu/drm/bridge/Kconfig | 16 ++ drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/ti-dlpc3433.c | 417 +++++++++++++++++++++++++++++++++++ 4 files changed, 435 insertions(+) commit e1402c6619df9be27518004eed75561a66718d9a Author: Jagan Teki Date: Fri Jun 3 19:33:48 2022 +0530 dt-bindings: display: bridge: Add TI DLPC3433 DSI to DMD TI DLPC3433 is a MIPI DSI based display controller bridge for processing high resolution DMD based projectors. It has a flexible configuration of MIPI DSI and DPI signal input that produces a DMD output in RGB565, RGB666, RGB888 formats. It supports upto 720p resolution with 60 and 120 Hz refresh rates. Add dt-bingings for it. Signed-off-by: Christopher Vollo Signed-off-by: Jagan Teki Reviewed-by: Rob Herring Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220603140349.3563612-1-jagan@amarulasolutions.com .../bindings/display/bridge/ti,dlpc3433.yaml | 117 +++++++++++++++++++++ MAINTAINERS | 5 + 2 files changed, 122 insertions(+) commit ab37c305bf890727dd808b1dd6526b28491915d7 Author: Minghao Chi Date: Thu Jun 2 07:19:39 2022 +0000 gfs2: Remove redundant NULL check before kfree kfree on NULL pointer is a no-op. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: Andreas Gruenbacher fs/gfs2/file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b43edc504ddd8902d1f697364049b0c0b89de6e2 Author: Jani Nikula Date: Thu Jun 2 12:45:42 2022 +0300 drm/i915/regs: split out intel audio register definitions Split out audio registers to a header of its own to reduce the size of i915_reg.h. TODO: Remove direct audio register access from intel_ddi.c. However, unification of audio get config is cumbersome due to the audio enable bit being in the DP or HDMI registers on older platforms. Signed-off-by: Jani Nikula Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220602094542.1386151-1-jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_audio.c | 1 + drivers/gpu/drm/i915/display/intel_audio_regs.h | 160 ++++++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_ddi.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 151 ---------------------- drivers/gpu/drm/i915/intel_gvt_mmio_table.c | 2 + 5 files changed, 164 insertions(+), 151 deletions(-) commit e8971a790370e805281dd650ec936a9b66435220 Author: Balasubramani Vivekanandan Date: Thu Jun 2 19:27:19 2022 +0530 drm/i915/display/adlp: More updates to voltage swing table Voltage swing table updated for eDP HBR3 Bspec: 49291 Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matt Atwood Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220602135719.1093081-1-balasubramani.vivekanandan@intel.com drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d8616ee2affcff37c5d315310da557a694a3303d Author: Wang Yufen Date: Tue May 24 15:53:11 2022 +0800 bpf, sockmap: Fix sk->sk_forward_alloc warn_on in sk_stream_kill_queues During TCP sockmap redirect pressure test, the following warning is triggered: WARNING: CPU: 3 PID: 2145 at net/core/stream.c:205 sk_stream_kill_queues+0xbc/0xd0 CPU: 3 PID: 2145 Comm: iperf Kdump: loaded Tainted: G W 5.10.0+ #9 Call Trace: inet_csk_destroy_sock+0x55/0x110 inet_csk_listen_stop+0xbb/0x380 tcp_close+0x41b/0x480 inet_release+0x42/0x80 __sock_release+0x3d/0xa0 sock_close+0x11/0x20 __fput+0x9d/0x240 task_work_run+0x62/0x90 exit_to_user_mode_prepare+0x110/0x120 syscall_exit_to_user_mode+0x27/0x190 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The reason we observed is that: When the listener is closing, a connection may have completed the three-way handshake but not accepted, and the client has sent some packets. The child sks in accept queue release by inet_child_forget()->inet_csk_destroy_sock(), but psocks of child sks have not released. To fix, add sock_map_destroy to release psocks. Signed-off-by: Wang Yufen Signed-off-by: Daniel Borkmann Signed-off-by: Andrii Nakryiko Acked-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20220524075311.649153-1-wangyufen@huawei.com include/linux/bpf.h | 1 + include/linux/skmsg.h | 1 + net/core/skmsg.c | 1 + net/core/sock_map.c | 23 +++++++++++++++++++++++ net/ipv4/tcp_bpf.c | 1 + 5 files changed, 27 insertions(+) commit 200a89e3e88786b52bc1dd5f26a310c097f4c6a7 Author: Lorenzo Bianconi Date: Wed May 25 11:44:27 2022 +0200 sample: bpf: xdp_router_ipv4: Allow the kernel to send arp requests Forward the packet to the kernel if the gw router mac address is missing in to trigger ARP discovery. Fixes: 85bf1f51691c ("samples: bpf: Convert xdp_router_ipv4 to XDP samples helper") Signed-off-by: Lorenzo Bianconi Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/60bde5496d108089080504f58199bcf1143ea938.1653471558.git.lorenzo@kernel.org samples/bpf/xdp_router_ipv4.bpf.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 610cd93b44ce1e7323878ef5f7b23dc10c7d45b7 Author: Douglas Raillard Date: Tue May 24 10:44:47 2022 +0100 libbpf: Fix determine_ptr_size() guessing One strategy employed by libbpf to guess the pointer size is by finding the size of "unsigned long" type. This is achieved by looking for a type of with the expected name and checking its size. Unfortunately, the C syntax is friendlier to humans than to computers as there is some variety in how such a type can be named. Specifically, gcc and clang do not use the same names for integer types in debug info: - clang uses "unsigned long" - gcc uses "long unsigned int" Lookup all the names for such a type so that libbpf can hope to find the information it wants. Signed-off-by: Douglas Raillard Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220524094447.332186-1-douglas.raillard@arm.com tools/lib/bpf/btf.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit 4c46091ee985ae84c60c5e95055d779fcd291d87 Author: Tadeusz Struk Date: Tue May 17 11:04:20 2022 -0700 bpf: Fix KASAN use-after-free Read in compute_effective_progs Syzbot found a Use After Free bug in compute_effective_progs(). The reproducer creates a number of BPF links, and causes a fault injected alloc to fail, while calling bpf_link_detach on them. Link detach triggers the link to be freed by bpf_link_free(), which calls __cgroup_bpf_detach() and update_effective_progs(). If the memory allocation in this function fails, the function restores the pointer to the bpf_cgroup_link on the cgroup list, but the memory gets freed just after it returns. After this, every subsequent call to update_effective_progs() causes this already deallocated pointer to be dereferenced in prog_list_length(), and triggers KASAN UAF error. To fix this issue don't preserve the pointer to the prog or link in the list, but remove it and replace it with a dummy prog without shrinking the table. The subsequent call to __cgroup_bpf_detach() or __cgroup_bpf_detach() will correct it. Fixes: af6eea57437a ("bpf: Implement bpf_link-based cgroup BPF program attachment") Reported-by: Signed-off-by: Tadeusz Struk Signed-off-by: Andrii Nakryiko Cc: Link: https://syzkaller.appspot.com/bug?id=8ebf179a95c2a2670f7cf1ba62429ec044369db4 Link: https://lore.kernel.org/bpf/20220517180420.87954-1-tadeusz.struk@linaro.org kernel/bpf/cgroup.c | 70 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 60 insertions(+), 10 deletions(-) commit de4b4b94fad90f876ab12e87999109e31a1871b4 Author: Michael Mullin Date: Mon May 23 15:49:17 2022 -0400 bpftool: Check for NULL ptr of btf in codegen_asserts bpf_object__btf() can return a NULL value. If bpf_object__btf returns null, do not progress through codegen_asserts(). This avoids a null ptr dereference at the call btf__type_cnt() in the function find_type_for_map() Signed-off-by: Michael Mullin Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220523194917.igkgorco42537arb@jup tools/bpf/bpftool/gen.c | 3 +++ 1 file changed, 3 insertions(+) commit eb7b36ce47f830a01ad9405e673b563cc3638d5d Author: Yuntao Wang Date: Sat May 21 23:13:29 2022 +0800 selftests/bpf: Fix test_run logic in fexit_stress.c In the commit da00d2f117a0 ("bpf: Add test ops for BPF_PROG_TYPE_TRACING"), the bpf_fentry_test1 function was moved into bpf_prog_test_run_tracing(), which is the test_run function of the tracing BPF programs. Thus calling 'bpf_prog_test_run_opts(filter_fd, &topts)' will not trigger bpf_fentry_test1 function as filter_fd is a sk_filter BPF program. Fix it by replacing filter_fd with fexit_fd in the bpf_prog_test_run_opts() function. Fixes: da00d2f117a0 ("bpf: Add test ops for BPF_PROG_TYPE_TRACING") Signed-off-by: Yuntao Wang Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220521151329.648013-1-ytcoode@gmail.com .../selftests/bpf/prog_tests/fexit_stress.c | 32 +++------------------- 1 file changed, 4 insertions(+), 28 deletions(-) commit f7abbecdab2191f1ba1f0876af67b715c541f9b1 Merge: cc1685546df8 c7e7e279dc83 Author: Andrii Nakryiko Date: Tue May 31 14:13:01 2022 -0700 Merge branch 'libbpf: Textual representation of enums' Daniel Müller says: ==================== This patch set introduces the means for querying a textual representation of the following BPF related enum types: - enum bpf_map_type - enum bpf_prog_type - enum bpf_attach_type - enum bpf_link_type To make that possible, we introduce a new public function for each of the types: libbpf_bpf__type_str. Having a way to query a textual representation has been asked for in the past (by systemd, among others). Such representations can generally be useful in tracing and logging contexts, among others. At this point, at least one client, bpftool, maintains such a mapping manually, which is prone to get out of date as new enum variants are introduced. libbpf is arguably best situated to keep this list complete and up-to-date. This patch series adds BTF based tests to ensure that exhaustiveness is upheld moving forward. The libbpf provided textual representation can be inferred from the corresponding enum variant name by removing the prefix and lowercasing the remainder. E.g., BPF_PROG_TYPE_SOCKET_FILTER -> socket_filter. Unfortunately, bpftool does not use such a programmatic approach for some of the bpf_attach_type variants. We decided in favor of changing its behavior to work with libbpf representations. However, for user inputs, specifically, we do maintain support for the traditionally used names around (please see patch "bpftool: Use libbpf_bpf_attach_type_str"). The patch series is structured as follows: - for each enumeration type in {bpf_prog_type, bpf_map_type, bpf_attach_type, bpf_link_type}: - we first introduce the corresponding public libbpf API function - we then add BTF based self-tests - we lastly adjust bpftool to use the libbpf provided functionality Signed-off-by: Daniel Müller Cc: Quentin Monnet --- Changelog: v3 -> v4: - use full string comparison for newly added attach types - switched away from erroneously used kdoc-style comments - removed unused prog_types variable and containing section from test_bpftool_synctypes.py - adjusted wording in documentation of get_types_from_array function - split various test_bpftool_synctypes.py changes into commits where they are required to eliminate temporary failures of this test v2 -> v3: - use LIBBPF_1.0.0 section in libbpf.map for newly added exports v1 -> v2: - adjusted bpftool to work with algorithmically determined attach types as libbpf now uses (just removed prefix from enum name and lowercased the rest) - adjusted tests, man page, and completion script to work with the new names - renamed bpf_attach_type_str -> bpf_attach_type_input_str - for input: added special cases that accept the traditionally used strings as well - changed 'char const *' -> 'const char *' ==================== Signed-off-by: Andrii Nakryiko commit c7e7e279dc8367920bddbe96115beef4ec2519a3 Author: Daniel Müller Date: Mon May 23 23:04:28 2022 +0000 bpftool: Use libbpf_bpf_link_type_str This change switches bpftool over to using the recently introduced libbpf_bpf_link_type_str function instead of maintaining its own string representation for the bpf_link_type enum. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220523230428.3077108-13-deso@posteo.net tools/bpf/bpftool/link.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) commit dea73da2213a722d952840edd598f2f3a40ddc68 Author: Daniel Müller Date: Mon May 23 23:04:27 2022 +0000 selftests/bpf: Add test for libbpf_bpf_link_type_str This change adds a test for libbpf_bpf_link_type_str. The test retrieves all variants of the bpf_link_type enumeration using BTF and makes sure that the function under test works as expected for them. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220523230428.3077108-12-deso@posteo.net .../testing/selftests/bpf/prog_tests/libbpf_str.c | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit ba5d1b5802d4a732cb563e81ff30b7f514257a99 Author: Daniel Müller Date: Mon May 23 23:04:26 2022 +0000 libbpf: Introduce libbpf_bpf_link_type_str This change introduces a new function, libbpf_bpf_link_type_str, to the public libbpf API. The function allows users to get a string representation for a bpf_link_type enum variant. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220523230428.3077108-11-deso@posteo.net tools/lib/bpf/libbpf.c | 21 +++++++++++++++++++++ tools/lib/bpf/libbpf.h | 9 +++++++++ tools/lib/bpf/libbpf.map | 1 + 3 files changed, 31 insertions(+) commit 1ba5ad36e00f46e3f7676f5de6b87f5a2f57f1f1 Author: Daniel Müller Date: Mon May 23 23:04:25 2022 +0000 bpftool: Use libbpf_bpf_attach_type_str This change switches bpftool over to using the recently introduced libbpf_bpf_attach_type_str function instead of maintaining its own string representation for the bpf_attach_type enum. Note that contrary to other enum types, the variant names that bpftool maps bpf_attach_type to do not adhere a simple to follow rule. With bpf_prog_type, for example, the textual representation can easily be inferred by stripping the BPF_PROG_TYPE_ prefix and lowercasing the remaining string. bpf_attach_type violates this rule for various variants. We decided to fix up this deficiency with this change, meaning that bpftool uses the same textual representations as libbpf. Supporting tests, completion scripts, and man pages have been adjusted accordingly. However, we did add support for accepting (the now undocumented) original attach type names when they are provided by users. For the test (test_bpftool_synctypes.py), I have removed the enum representation checks, because we no longer mirror the various enum variant names in bpftool source code. For the man page, help text, and completion script checks we are now using enum definitions from uapi/linux/bpf.h as the source of truth directly. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20220523230428.3077108-10-deso@posteo.net tools/bpf/bpftool/Documentation/bpftool-cgroup.rst | 16 +++- tools/bpf/bpftool/Documentation/bpftool-prog.rst | 5 +- tools/bpf/bpftool/bash-completion/bpftool | 18 ++-- tools/bpf/bpftool/cgroup.c | 53 +++++++---- tools/bpf/bpftool/common.c | 82 +++++++--------- tools/bpf/bpftool/link.c | 15 ++- tools/bpf/bpftool/main.h | 14 +++ tools/bpf/bpftool/prog.c | 25 ++++- .../selftests/bpf/test_bpftool_synctypes.py | 104 ++++++++------------- 9 files changed, 182 insertions(+), 150 deletions(-) commit 0b27b3d9fdf88c132b095a30ee2c61cd6e56e6cc Author: Daniel Müller Date: Mon May 23 23:04:24 2022 +0000 selftests/bpf: Add test for libbpf_bpf_attach_type_str This change adds a test for libbpf_bpf_attach_type_str. The test retrieves all variants of the bpf_attach_type enumeration using BTF and makes sure that the function under test works as expected for them. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220523230428.3077108-9-deso@posteo.net .../testing/selftests/bpf/prog_tests/libbpf_str.c | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit ccde5760bac1b83cfb2bfed97748b71829cbe5d8 Author: Daniel Müller Date: Mon May 23 23:04:23 2022 +0000 libbpf: Introduce libbpf_bpf_attach_type_str This change introduces a new function, libbpf_bpf_attach_type_str, to the public libbpf API. The function allows users to get a string representation for a bpf_attach_type variant. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220523230428.3077108-8-deso@posteo.net tools/lib/bpf/libbpf.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ tools/lib/bpf/libbpf.h | 9 ++++++++ tools/lib/bpf/libbpf.map | 1 + 3 files changed, 64 insertions(+) commit 2e98964bd6e283568730b1a4da3b1e4da3306a8e Author: Daniel Müller Date: Mon May 23 23:04:22 2022 +0000 bpftool: Use libbpf_bpf_map_type_str This change switches bpftool over to using the recently introduced libbpf_bpf_map_type_str function instead of maintaining its own string representation for the bpf_map_type enum. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20220523230428.3077108-7-deso@posteo.net tools/bpf/bpftool/feature.c | 30 ++++++---- tools/bpf/bpftool/main.h | 3 - tools/bpf/bpftool/map.c | 69 ++++++++-------------- .../selftests/bpf/test_bpftool_synctypes.py | 48 +++++++++------ 4 files changed, 71 insertions(+), 79 deletions(-) commit c3a2574011a313707570d35b7e6e6536eda69dbb Author: Daniel Müller Date: Mon May 23 23:04:21 2022 +0000 selftests/bpf: Add test for libbpf_bpf_map_type_str This change adds a test for libbpf_bpf_map_type_str. The test retrieves all variants of the bpf_map_type enumeration using BTF and makes sure that the function under test works as expected for them. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220523230428.3077108-6-deso@posteo.net .../testing/selftests/bpf/prog_tests/libbpf_str.c | 56 +++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) commit 3e6dc0207b33edf90be4d5cbbaf06223aa38e50b Author: Daniel Müller Date: Mon May 23 23:04:20 2022 +0000 libbpf: Introduce libbpf_bpf_map_type_str This change introduces a new function, libbpf_bpf_map_type_str, to the public libbpf API. The function allows users to get a string representation for a bpf_map_type enum variant. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220523230428.3077108-5-deso@posteo.net tools/lib/bpf/libbpf.c | 42 ++++++++++++++++++++++++++++++++++++++++++ tools/lib/bpf/libbpf.h | 9 +++++++++ tools/lib/bpf/libbpf.map | 1 + 3 files changed, 52 insertions(+) commit b700eeb406a6c1f4d955242e06151f11f13d3e29 Author: Daniel Müller Date: Mon May 23 23:04:19 2022 +0000 bpftool: Use libbpf_bpf_prog_type_str This change switches bpftool over to using the recently introduced libbpf_bpf_prog_type_str function instead of maintaining its own string representation for the bpf_prog_type enum. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20220523230428.3077108-4-deso@posteo.net tools/bpf/bpftool/feature.c | 57 ++++++++++++++-------- tools/bpf/bpftool/link.c | 19 +++++--- tools/bpf/bpftool/main.h | 3 -- tools/bpf/bpftool/map.c | 13 +++-- tools/bpf/bpftool/prog.c | 51 ++++--------------- .../selftests/bpf/test_bpftool_synctypes.py | 14 +----- 6 files changed, 65 insertions(+), 92 deletions(-) commit 8c5d71d96379e80c7c0d0fa7186c04f4deb04f16 Author: Daniel Müller Date: Mon May 23 23:04:18 2022 +0000 selftests/bpf: Add test for libbpf_bpf_prog_type_str This change adds a test for libbpf_bpf_prog_type_str. The test retrieves all variants of the bpf_prog_type enumeration using BTF and makes sure that the function under test works as expected for them. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220523230428.3077108-3-deso@posteo.net .../testing/selftests/bpf/prog_tests/libbpf_str.c | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit d18616e7aa940414312d63de918ab2204d82a20e Author: Daniel Müller Date: Mon May 23 23:04:17 2022 +0000 libbpf: Introduce libbpf_bpf_prog_type_str This change introduces a new function, libbpf_bpf_prog_type_str, to the public libbpf API. The function allows users to get a string representation for a bpf_prog_type variant. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220523230428.3077108-2-deso@posteo.net tools/lib/bpf/libbpf.c | 43 +++++++++++++++++++++++++++++++++++++++++++ tools/lib/bpf/libbpf.h | 9 +++++++++ tools/lib/bpf/libbpf.map | 3 +++ 3 files changed, 55 insertions(+) commit cc1685546df87d9872e1ccef5bf56ac5262be0b1 Author: Pu Lehui Date: Mon May 30 17:28:12 2022 +0800 bpf: Correct the comment about insn_to_jit_off The insn_to_jit_off passed to bpf_prog_fill_jited_linfo should be the first byte of the next instruction, or the byte off to the end of the current instruction. Signed-off-by: Pu Lehui Signed-off-by: Daniel Borkmann Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220530092815.1112406-4-pulehui@huawei.com kernel/bpf/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3cb70413041fdf028fa1ba3986fd0c6aec9e3dcb Author: Pu Lehui Date: Mon May 30 17:28:11 2022 +0800 bpf, riscv: Support riscv jit to provide bpf_line_info Add support for riscv jit to provide bpf_line_info. We need to consider the prologue offset in ctx->offset, but unlike x86 and arm64, ctx->offset of riscv does not provide an extra slot for the prologue, so here we just calculate the len of prologue and add it to ctx->offset at the end. Both RV64 and RV32 have been tested. Signed-off-by: Pu Lehui Signed-off-by: Daniel Borkmann Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220530092815.1112406-3-pulehui@huawei.com arch/riscv/net/bpf_jit.h | 1 + arch/riscv/net/bpf_jit_core.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) commit 2cd008522707a59bf38c1f45d5c654eddbb86c20 Author: Pu Lehui Date: Mon May 30 17:28:10 2022 +0800 bpf: Unify data extension operation of jited_ksyms and jited_linfo We found that 32-bit environment can not print BPF line info due to a data inconsistency between jited_ksyms[0] and jited_linfo[0]. For example: jited_kyms[0] = 0xb800067c, jited_linfo[0] = 0xffffffffb800067c We know that both of them store BPF func address, but due to the different data extension operations when extended to u64, they may not be the same. We need to unify the data extension operations of them. Signed-off-by: Pu Lehui Signed-off-by: Daniel Borkmann Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/CAEf4BzZ-eDcdJZgJ+Np7Y=V-TVjDDvOMqPwzKjyWrh=i5juv4w@mail.gmail.com Link: https://lore.kernel.org/bpf/20220530092815.1112406-2-pulehui@huawei.com kernel/bpf/syscall.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 21f1481a8db4caae4f935ef37aa29e5b3ceebc56 Author: Ke Liu Date: Fri May 27 06:46:09 2022 +0000 xdp: Directly use ida_alloc()/free() APIs Use ida_alloc() / ida_free() instead of the deprecated ida_simple_get() / ida_simple_remove(). Signed-off-by: Ke Liu Signed-off-by: Daniel Borkmann Signed-off-by: Andrii Nakryiko Reviewed-by: Maciej Fijalkowski Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/20220527064609.2358482-1-liuke94@huawei.com net/xdp/xdp_umem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c441d28945fb113220d48d6c86ebc0b090a2b677 Author: Timur Tabi Date: Wed May 11 11:37:16 2022 -0500 drm/nouveau: fix another off-by-one in nvbios_addr This check determines whether a given address is part of image 0 or image 1. Image 1 starts at offset image0_size, so that address should be included. Fixes: 4d4e9907ff572 ("drm/nouveau/bios: guard against out-of-bounds accesses to image") Cc: # v4.8+ Signed-off-by: Timur Tabi Reviewed-by: Karol Herbst Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220511163716.3520591-1-ttabi@nvidia.com drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10e619f1f31cf126885b3e0ac43a8de9744467fb Author: Douglas Anderson Date: Tue May 10 12:29:44 2022 -0700 drm/bridge: parade-ps8640: Handle DP AUX more properly While it works, for the most part, to assume that the panel has finished probing when devm_of_dp_aux_populate_ep_devices() returns, it's a bit fragile. This is talked about at length in commit a1e3667a9835 ("drm/bridge: ti-sn65dsi86: Promote the AUX channel to its own sub-dev"). When reviewing the ps8640 code, I managed to convince myself that it was OK not to worry about it there and that maybe it wasn't really _that_ fragile. However, it turns out that it really is. Simply hardcoding panel_edp_probe() to return -EPROBE_DEFER was enough to put the boot process into an infinite loop. I believe this manages to trip the same issues that we used to trip with the main MSM code where something about our actions trigger Linux to re-probe previously deferred devices right away and each time we try again we re-trigger Linux to re-probe. Let's fix this using the callback introduced in the patch ("drm/dp: Callbacks to make it easier for drivers to use DP AUX bus properly"). When using the new callback, we have to be a little careful. The probe_done() callback is no longer always called in the context of our probe routine. That means we can't rely on being able to return -EPROBE_DEFER from it. We re-jigger the order of things a bit to account for that. With this change, the device still boots (though obviously the panel doesn't come up) if I force panel-edp to always return -EPROBE_DEFER. If I fake it and make the panel probe exactly once it also works. Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20220510122726.v3.4.Ia6324ebc848cd40b4dbd3ad3289a7ffb5c197779@changeid drivers/gpu/drm/bridge/parade-ps8640.c | 74 +++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 28 deletions(-) commit 50e156bd8a9d0910ac4bae5fcff00ddb798db967 Author: Douglas Anderson Date: Tue May 10 12:29:43 2022 -0700 drm/bridge: Add devm_drm_bridge_add() This adds a devm managed version of drm_bridge_add(). Like other "devm" function listed in drm_bridge.h, this function takes an explicit "dev" to use for the lifetime management. A few notes: * In general we have a "struct device" for bridges that makes a good candidate for where the lifetime matches exactly what we want. * The "bridge->dev->dev" device appears to be the encoder device. That's not the right device to use for lifetime management. Suggested-by: Dmitry Baryshkov Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20220510122726.v3.3.Iba4b9bf6c7a1ee5ea2835ad7bd5eaf84d7688520@changeid drivers/gpu/drm/drm_bridge.c | 23 +++++++++++++++++++++++ include/drm/drm_bridge.h | 1 + 2 files changed, 24 insertions(+) commit 3800b1710946f7db3cb3a29cb2e218cf5df999d0 Author: Douglas Anderson Date: Tue May 10 12:29:42 2022 -0700 drm/dp: Add callbacks to make using DP AUX bus properly easier As talked about in this patch in the kerneldoc of of_dp_aux_populate_ep_device() and also in the past in commit a1e3667a9835 ("drm/bridge: ti-sn65dsi86: Promote the AUX channel to its own sub-dev"), it can be difficult for eDP controller drivers to know when the panel has finished probing when they're using of_dp_aux_populate_ep_devices(). The ti-sn65dsi86 driver managed to solve this because it was already broken up into a bunch of sub-drivers. That means we could solve the problem there by adding a new sub-driver to get the panel. We could use the traditional -EPROBE_DEFER retry mechansim to handle the case where the panel hadn't probed yet. In parade-ps8640 we didn't really solve this. The code just expects the panel to be ready right away. While reviewing the code originally I had managed to convince myself it was fine to just expect the panel right away, but additional testing has shown that not to be the case. We could fix parade-ps8640 like we did ti-sn65dsi86 but it's pretty cumbersome (since we're not already broken into multiple drivers) and requires a bunch of boilerplate code. After discussion [1] it seems like the best solution for most people is: - Accept that there's always at most one device that will probe as a result of the DP AUX bus (it may have sub-devices, but there will be one device _directly_ probed). - When that device finishes probing, we can just have a call back. This patch implements that idea. We'll now take a callback as an argument to the populate function. To make this easier to land in pieces, we'll make wrappers for the old functions. The functions with the new name (which make it clear that we only have one child) will take the callback and the functions with the old name will temporarily wrap. [1] https://lore.kernel.org/r/CAD=FV=Ur3afHhsXe7a3baWEnD=MFKFeKRbhFU+bt3P67G0MVzQ@mail.gmail.com Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20220510122726.v3.2.I4182ae27e00792842cb86f1433990a0ef9c0a073@changeid drivers/gpu/drm/display/drm_dp_aux_bus.c | 209 ++++++++++++++++++++----------- include/drm/display/drm_dp_aux_bus.h | 34 ++++- 2 files changed, 168 insertions(+), 75 deletions(-) commit b729cfee705a56c6204647ac486107a1f814af36 Author: Stuart Summers Date: Wed Jun 1 14:06:46 2022 -0700 drm/i915: Add extra registers to GPU error dump Our internal teams have identified a few additional engine registers that are worth inspecting in error state dumps during development & debug. Let's capture and print them as part of our error dump. For simplicity we'll just dump these registers on gen11 and beyond. Most of these registers have existed since earlier platforms (e.g., gen6 or gen7) but were initially introduced only for a subset of the platforms' engines; gen11 seems to be where they became available on all engines. Signed-off-by: Stuart Summers Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20220601210646.615946-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_engine_regs.h | 5 +++++ drivers/gpu/drm/i915/i915_gpu_error.c | 19 +++++++++++++++++++ drivers/gpu/drm/i915/i915_gpu_error.h | 7 +++++++ 3 files changed, 31 insertions(+) commit 5ac342ef84d7dccd1ba43f5fa2dc10a6feda91e2 Author: Matt Roper Date: Wed Jun 1 08:07:25 2022 -0700 drm/i915/pvc: Add SSEU changes PVC splits the mask of enabled DSS over two registers. It also changes the meaning of the EU fuse register such that each bit represents a single EU rather than a pair of EUs. Signed-off-by: Matt Roper Acked-by: Tvrtko Ursulin Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20220601150725.521468-7-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + drivers/gpu/drm/i915/gt/intel_sseu.c | 31 ++++++++++++++++++++++++------- drivers/gpu/drm/i915/gt/intel_sseu.h | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_pci.c | 3 ++- drivers/gpu/drm/i915/intel_device_info.h | 1 + 6 files changed, 31 insertions(+), 9 deletions(-) commit b87d39019651c9cae169396cf5ae525393084490 Author: Matt Roper Date: Wed Jun 1 08:07:24 2022 -0700 drm/i915/sseu: Disassociate internal subslice mask representation from uapi As with EU masks, it's easier to store subslice/DSS masks internally in a format that's more natural for the driver to work with, and then only covert into the u8[] uapi form when the query ioctl is invoked. Since the hardware design changed significantly with Xe_HP, we'll use a union to choose between the old "hsw-style" subslice masks or the newer xehp mask. HSW-style masks will be stored in an array of u8's, indexed by slice (there's never more than 6 subslices per slice on older platforms). For Xe_HP and beyond where slices no longer exist, we only need a single bitmask. However we already know that this mask is eventually going to grow too large for a simple u64 to hold, so we'll represent it in a manner that can be operated on by the utilities in linux/bitmap.h. v2: - Fix typo: BIT(s) -> BIT(ss) in gen9_sseu_device_status() v3: - Eliminate sseu->ss_stride and just calculate the stride while specifically handling uapi. (Tvrtko) - Use BITMAP_BITS() macro to refer to size of masks rather than passing I915_MAX_SS_FUSE_BITS directly. (Tvrtko) - Report compute/geometry DSS masks separately when dumping Xe_HP SSEU info. (Tvrtko) - Restore dropped range checks to intel_sseu_has_subslice(). (Tvrtko) v4: - Make the bitmap size macro check the size of the .xehp field rather than the containing union. (Tvrtko) - Don't add GEM_BUG_ON() intel_sseu_has_subslice()'s check for whether slice or subslice ID exceed sseu->max_[sub]slices; various loops in the driver are expected to exceed these, so we should just silently return 'false.' v5: - Move XEHP_BITMAP_BITS() to the header so that we can also replace a usage of I915_MAX_SS_FUSE_BITS in one of the inline functions. (Bala) - Change the local variable in intel_slicemask_from_xehp_dssmask() from u16 to 'unsigned long' to make it a bit more future-proof. Cc: Tvrtko Ursulin Cc: Balasubramani Vivekanandan Signed-off-by: Matt Roper Acked-by: Tvrtko Ursulin Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20220601150725.521468-6-matthew.d.roper@intel.com drivers/gpu/drm/i915/gem/i915_gem_context.c | 5 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 4 +- drivers/gpu/drm/i915/gt/intel_gt.c | 12 +- drivers/gpu/drm/i915/gt/intel_sseu.c | 261 ++++++++++++++++----------- drivers/gpu/drm/i915/gt/intel_sseu.h | 79 +++++--- drivers/gpu/drm/i915/gt/intel_sseu_debugfs.c | 30 +-- drivers/gpu/drm/i915/gt/intel_workarounds.c | 24 +-- drivers/gpu/drm/i915/i915_getparam.c | 3 +- drivers/gpu/drm/i915/i915_query.c | 13 +- 9 files changed, 243 insertions(+), 188 deletions(-) commit bc3c5e0809ae9faa039baf75547e8ee46ec124ef Author: Matt Roper Date: Wed Jun 1 08:07:23 2022 -0700 drm/i915/sseu: Don't try to store EU mask internally in UAPI format Storing the EU mask internally in the same format the I915_QUERY topology queries use makes the final copy_to_user() a bit simpler, but makes the rest of the driver's SSEU more complicated and harder to follow. Let's switch to an internal representation that's more natural: Xe_HP platforms will be a simple array of u16 masks, whereas pre-Xe_HP platforms will be a two-dimensional array, indexed by [slice][subslice]. We'll convert to the uapi format only when the query uapi is called. v2: - Drop has_common_ss_eumask. We waste some space repeating identical EU masks for every single DSS, but the code is simpler without it. (Tvrtko) v3: - Mask down EUs passed to sseu_set_eus at the callsite rather than inside the function. (Tvrtko) - Eliminate sseu->eu_stride and calculate it when needed. (Tvrtko) Cc: Tvrtko Ursulin Signed-off-by: Matt Roper Acked-by: Tvrtko Ursulin Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20220601150725.521468-5-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_sseu.c | 88 ++++++++++++++++++++++++------------ drivers/gpu/drm/i915/gt/intel_sseu.h | 10 +++- drivers/gpu/drm/i915/i915_query.c | 13 +++--- 3 files changed, 73 insertions(+), 38 deletions(-) commit 4cfd16659641067f618cdd3589eda42eb2943399 Author: Matt Roper Date: Wed Jun 1 08:07:22 2022 -0700 drm/i915/sseu: Simplify gen11+ SSEU handling Although gen11 and gen12 architectures supported the concept of multiple slices, in practice all the platforms that were actually designed only had a single slice (i.e., note the parameters to 'intel_sseu_set_info' that we pass for each platform). We can simplify the code slightly by dropping the multi-slice logic from gen11+ platforms. v2: - Promote drm_dbg to drm_WARN_ON if the slice fuse register reports unexpected fusing. (Tvrtko) Cc: Tvrtko Ursulin Signed-off-by: Matt Roper Acked-by: Tvrtko Ursulin Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20220601150725.521468-4-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_sseu.c | 76 +++++++++++++++++------------------- 1 file changed, 36 insertions(+), 40 deletions(-) commit aa2bdc4843f5871e6c68fbec5e10c0dbaf10ff91 Author: Matt Roper Date: Wed Jun 1 08:07:21 2022 -0700 drm/i915/xehp: Drop GETPARAM lookups of I915_PARAM_[SUB]SLICE_MASK Slice/subslice/EU information should be obtained via the topology queries provided by the I915_QUERY interface; let's turn off support for the old GETPARAM lookups on Xe_HP and beyond where we can't return meaningful values. The slice mask lookup is meaningless since Xe_HP doesn't support traditional slices (and we make no attempt to return the various new units like gslices, cslices, mslices, etc.) here. The subslice mask lookup is even more problematic; given the distinct masks for geometry vs compute purposes, the combined mask returned here is likely not what userspace would want to act upon anyway. The value is also limited to 32-bits by the nature of the GETPARAM ioctl which is sufficient for the initial Xe_HP platforms, but is unable to convey the larger masks that will be needed on other upcoming platforms. Finally, the value returned here becomes even less meaningful when used on multi-tile platforms where each tile will have its own masks. Signed-off-by: Matt Roper Acked-by: Tvrtko Ursulin Acked-by: Lionel Landwerlin # mesa Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20220601150725.521468-3-matthew.d.roper@intel.com drivers/gpu/drm/i915/i915_getparam.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 935a3c66eb9b66426d4be9b54666c77dbe7c32eb Author: Matt Roper Date: Wed Jun 1 08:07:20 2022 -0700 drm/i915/xehp: Use separate sseu init function Xe_HP has enough fundamental differences from previous platforms that it makes sense to use a separate SSEU init function to keep things straightforward and easy to understand. We'll also add a has_xehp_dss flag to the SSEU structure that will be used by other upcoming changes. v2: - Add has_xehp_dss flag Signed-off-by: Matt Roper Acked-by: Tvrtko Ursulin Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20220601150725.521468-2-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_sseu.c | 86 ++++++++++++++++++++---------------- drivers/gpu/drm/i915/gt/intel_sseu.h | 5 +++ 2 files changed, 54 insertions(+), 37 deletions(-) commit e9ca4e9ea6e208feae82f72607818ac8e15115f4 Author: Patrik Jakobsson Date: Wed Jun 1 11:23:11 2022 +0200 drm/gma500: Read EDID from the correct i2c adapter Someone made the mistake to try reading EDID from the backlight i2c adapter. This has been wrong for a very long time but since we read out the modes correctly on init and don't hotplug lvds it has been working anyway. Correct this by using connector->ddc instead of encoder->i2c_bus. Both PSB and CDV are affected but this bug. Signed-off-by: Patrik Jakobsson Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220601092311.22648-9-patrik.r.jakobsson@gmail.com drivers/gpu/drm/gma500/cdv_intel_lvds.c | 3 +-- drivers/gpu/drm/gma500/psb_intel_lvds.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) commit a57ebfc0b4da16a3f36bfebb158198aab3e340f8 Author: Patrik Jakobsson Date: Wed Jun 1 11:23:10 2022 +0200 drm/gma500: Make oaktrail lvds use ddc adapter from drm_connector We're moving all uses of ddc_bus to drm_connector where they belong. The initialization of the gma_i2c_chan for Oaktrail is a bit backwards so it required improvements. Also cleanup the error handling in oaktrail_lvds_init(). Since this is the last user of gma_encoder->ddc_bus we can remove it. Signed-off-by: Patrik Jakobsson Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220601092311.22648-8-patrik.r.jakobsson@gmail.com drivers/gpu/drm/gma500/oaktrail_lvds.c | 50 ++++++++++++++++++------------ drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c | 14 ++++----- drivers/gpu/drm/gma500/psb_intel_drv.h | 3 +- 3 files changed, 38 insertions(+), 29 deletions(-) commit 0cc3ae930c8b2a086b802a8c7b915fd28b57c780 Author: Patrik Jakobsson Date: Wed Jun 1 11:23:09 2022 +0200 drm/gma500: Make cdv crt use ddc adapter from drm_connector We're moving all uses of ddc_bus to drm_connector where they belong. Also cleanup the error handling in cdv_intel_crt_init(). Signed-off-by: Patrik Jakobsson Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220601092311.22648-7-patrik.r.jakobsson@gmail.com drivers/gpu/drm/gma500/cdv_intel_crt.c | 47 ++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 19 deletions(-) commit 147a09072c84b32746fb70139963a92c7d90e07a Author: Patrik Jakobsson Date: Wed Jun 1 11:23:08 2022 +0200 drm/gma500: Make psb lvds use ddc adapter from drm_connector We're moving all uses of ddc_bus to drm_connector where they belong. Also cleanup the error handling in psb_intel_lvds_init() and remove unused ddc_bus in psb_intel_lvds_priv. Signed-off-by: Patrik Jakobsson Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220601092311.22648-6-patrik.r.jakobsson@gmail.com drivers/gpu/drm/gma500/psb_intel_lvds.c | 72 +++++++++++++++++---------------- 1 file changed, 37 insertions(+), 35 deletions(-) commit 544ef14031d0bc9223727fa8d39cd54f0fad7244 Author: Patrik Jakobsson Date: Wed Jun 1 11:23:07 2022 +0200 drm/gma500: Make cdv hdmi use ddc adapter from drm_connector We're moving all uses of ddc_bus from gma_encoder to drm_connector where they belong. Also, cleanup the error handling in cdv_hdmi_init() and remove unused i2c pointer in mid_intel_hdmi_priv. Signed-off-by: Patrik Jakobsson Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220601092311.22648-5-patrik.r.jakobsson@gmail.com drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 98 ++++++++++++++++----------------- 1 file changed, 49 insertions(+), 49 deletions(-) commit 368eb57a1676cef35f8303bc23f95d2ac35b7255 Author: Patrik Jakobsson Date: Wed Jun 1 11:23:06 2022 +0200 drm/gma500: Make cdv lvds use ddc adapter from drm_connector We're moving all uses of ddc_bus to drm_connector where they belong. Also, add missing call to destroy ddc bus when destroying the connector and cleanup the error handling in cdv_intel_lvds_init(). Signed-off-by: Patrik Jakobsson Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220601092311.22648-4-patrik.r.jakobsson@gmail.com drivers/gpu/drm/gma500/cdv_intel_lvds.c | 67 ++++++++++++++++----------------- 1 file changed, 33 insertions(+), 34 deletions(-) commit ba1677f76b9a510d88efdc7a1416b2e778f125bc Author: Patrik Jakobsson Date: Wed Jun 1 11:23:05 2022 +0200 drm/gma500: Make gma_i2c_chan a subclass of i2c_adapter This makes it easier to get at the full gma_i2c_chan when having an i2c_adapter from eg. drm_connector->ddc. Signed-off-by: Patrik Jakobsson Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220601092311.22648-3-patrik.r.jakobsson@gmail.com drivers/gpu/drm/gma500/cdv_intel_crt.c | 2 +- drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 6 +++--- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 4 ++-- drivers/gpu/drm/gma500/intel_i2c.c | 14 +++++++------- drivers/gpu/drm/gma500/oaktrail_lvds.c | 2 +- drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c | 12 ++++++------ drivers/gpu/drm/gma500/psb_intel_drv.h | 11 +++++++---- drivers/gpu/drm/gma500/psb_intel_lvds.c | 6 +++--- 8 files changed, 30 insertions(+), 27 deletions(-) commit 04477e5e1e6ced4573d9bd5271572ba633a260ab Author: Patrik Jakobsson Date: Wed Jun 1 11:23:04 2022 +0200 drm/gma500: Use gma_ prefix for our i2c abstraction psb_intel_i2c_chan is used by all chips so use the correct prefix. Signed-off-by: Patrik Jakobsson Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220601092311.22648-2-patrik.r.jakobsson@gmail.com drivers/gpu/drm/gma500/cdv_intel_crt.c | 4 ++-- drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 6 +++--- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 14 +++++--------- drivers/gpu/drm/gma500/intel_i2c.c | 22 +++++++++++----------- drivers/gpu/drm/gma500/oaktrail_lvds.c | 2 +- drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c | 12 ++++++------ drivers/gpu/drm/gma500/psb_drv.h | 2 +- drivers/gpu/drm/gma500/psb_intel_drv.h | 12 ++++++------ drivers/gpu/drm/gma500/psb_intel_lvds.c | 16 ++++++++-------- 9 files changed, 43 insertions(+), 47 deletions(-) commit 01ece65132e2980ece4eca91105dfc9eed504881 Author: Javier Martinez Canillas Date: Mon May 30 16:02:46 2022 +0200 drm/ssd130x: Only define a SPI device ID table when built as a module The kernel test robot reports a compile warning due the ssd130x_spi_table variable being defined but not used. This happen when ssd130x-spi driver is built-in instead of being built as a module, i.e: CC drivers/gpu/drm/solomon/ssd130x-spi.o AR drivers/base/firmware_loader/built-in.a AR drivers/base/built-in.a CC kernel/trace/trace.o drivers/gpu/drm/solomon/ssd130x-spi.c:155:35: warning: ‘ssd130x_spi_table’ defined but not used [-Wunused-const-variable=] 155 | static const struct spi_device_id ssd130x_spi_table[] = { | ^~~~~~~~~~~~~~~~~ The driver shouldn't need a SPI device ID table and only have an OF device ID table, but the former is needed to workaround an issue in the SPI core. This always reports a MODALIAS of the form "spi:" even for devices registered through Device Trees. But the table is only needed when the driver built as a module to populate the .ko alias info. It's not needed when the driver is built-in the kernel. Fixes: 74373977d2ca ("drm/solomon: Add SSD130x OLED displays SPI support") Reported-by: kernel test robot Signed-off-by: Javier Martinez Canillas Reviewed-by: Nathan Chancellor Link: https://patchwork.freedesktop.org/patch/msgid/20220530140246.742469-1-javierm@redhat.com drivers/gpu/drm/solomon/ssd130x-spi.c | 2 ++ 1 file changed, 2 insertions(+) commit b1edf7f159a6d532757b004a70f31a6425d5043f Author: Thomas Huth Date: Tue May 31 12:15:54 2022 +0200 KVM: s390: selftests: Use TAP interface in the reset test Let's standardize the s390x KVM selftest output to the TAP output generated via the kselftests.h interface. Reviewed-by: Janosch Frank Signed-off-by: Thomas Huth Link: https://lore.kernel.org/r/20220531101554.36844-5-thuth@redhat.com Signed-off-by: Christian Borntraeger tools/testing/selftests/kvm/s390x/resets.c | 38 +++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 8 deletions(-) commit 0c073227df5055714a545cbe536e3bd9ea39c74b Author: Thomas Huth Date: Tue May 31 12:15:53 2022 +0200 KVM: s390: selftests: Use TAP interface in the tprot test The tprot test currently does not have any output (unless one of the TEST_ASSERT statement fails), so it's hard to say for a user whether a certain new sub-test has been included in the binary or not. Let's make this a little bit more user-friendly and include some TAP output via the kselftests.h interface. Reviewed-by: Janosch Frank Reviewed-by: Janis Schoetterl-Glausch Signed-off-by: Thomas Huth Link: https://lore.kernel.org/r/20220531101554.36844-4-thuth@redhat.com Signed-off-by: Christian Borntraeger tools/testing/selftests/kvm/s390x/tprot.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) commit 17e48d8a1ef0ab070b11e7368e14ac45c335de57 Author: Thomas Huth Date: Tue May 31 12:15:52 2022 +0200 KVM: s390: selftests: Use TAP interface in the sync_regs test The sync_regs test currently does not have any output (unless one of the TEST_ASSERT statement fails), so it's hard to say for a user whether a certain new sub-test has been included in the binary or not. Let's make this a little bit more user-friendly and include some TAP output via the kselftests.h interface. To be able to distinguish the different sub-tests more easily, we also break up the huge main() function here in more fine grained parts. Acked-by: Janosch Frank Signed-off-by: Thomas Huth Link: https://lore.kernel.org/r/20220531101554.36844-3-thuth@redhat.com Signed-off-by: Christian Borntraeger tools/testing/selftests/kvm/s390x/sync_regs_test.c | 87 ++++++++++++++++------ 1 file changed, 66 insertions(+), 21 deletions(-) commit 97da92c0ff92f33a7c33533e5fdd3e870f01cc6a Author: Thomas Huth Date: Tue May 31 12:15:51 2022 +0200 KVM: s390: selftests: Use TAP interface in the memop test The memop test currently does not have any output (unless one of the TEST_ASSERT statement fails), so it's hard to say for a user whether a certain new sub-test has been included in the binary or not. Let's make this a little bit more user-friendly and include some TAP output via the kselftests.h interface. Reviewed-by: Janosch Frank Signed-off-by: Thomas Huth Link: https://lore.kernel.org/r/20220531101554.36844-2-thuth@redhat.com Signed-off-by: Christian Borntraeger tools/testing/selftests/kvm/s390x/memop.c | 95 +++++++++++++++++++++++++------ 1 file changed, 77 insertions(+), 18 deletions(-) commit b0f46280d3fcd59a65cfae9742fa5172362af893 Author: Janosch Frank Date: Tue May 17 16:36:29 2022 +0000 Documentation/virt/kvm/api.rst: Explain rc/rrc delivery Let's explain in which situations the rc/rrc will set in struct kvm_pv_cmd so it's clear that the struct members should be set to 0. rc/rrc are independent of the IOCTL return code. Signed-off-by: Janosch Frank Acked-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20220517163629.3443-12-frankja@linux.ibm.com Message-Id: <20220517163629.3443-12-frankja@linux.ibm.com> Signed-off-by: Christian Borntraeger Documentation/virt/kvm/api.rst | 8 ++++++++ 1 file changed, 8 insertions(+) commit 437cfd714db9c1d28878a6e2555e9a730f3490c8 Author: Janosch Frank Date: Tue May 17 16:36:28 2022 +0000 Documentation/virt/kvm/api.rst: Add protvirt dump/info api descriptions Time to add the dump API changes to the api documentation file. Also some minor cleanup. Signed-off-by: Janosch Frank Acked-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20220517163629.3443-11-frankja@linux.ibm.com Message-Id: <20220517163629.3443-11-frankja@linux.ibm.com> Signed-off-by: Christian Borntraeger Documentation/virt/kvm/api.rst | 154 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 152 insertions(+), 2 deletions(-) commit 660a28653d839b70949087d2662e140cc511b363 Author: Janosch Frank Date: Tue May 17 16:36:27 2022 +0000 Documentation: virt: Protected virtual machine dumps Let's add a documentation file which describes the dump process. Since we only copy the UV dump data from the UV to userspace we'll not go into detail here and let the party which processes the data describe its structure. Signed-off-by: Janosch Frank Acked-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20220517163629.3443-10-frankja@linux.ibm.com Message-Id: <20220517163629.3443-10-frankja@linux.ibm.com> Signed-off-by: Christian Borntraeger Documentation/virt/kvm/s390/index.rst | 1 + Documentation/virt/kvm/s390/s390-pv-dump.rst | 64 ++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) commit e9bf3acb23f0a6e18438c35944d6cb618d16cf05 Author: Janosch Frank Date: Tue May 17 16:36:26 2022 +0000 KVM: s390: Add KVM_CAP_S390_PROTECTED_DUMP The capability indicates dump support for protected VMs. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20220517163629.3443-9-frankja@linux.ibm.com Message-Id: <20220517163629.3443-9-frankja@linux.ibm.com> Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 20 ++++++++++++++++++++ include/uapi/linux/kvm.h | 1 + 2 files changed, 21 insertions(+) commit 8aba09588d2af37c6cc1a781b87d1d91ebf389ae Author: Janosch Frank Date: Tue May 17 16:36:25 2022 +0000 KVM: s390: Add CPU dump functionality The previous patch introduced the per-VM dump functions now let's focus on dumping the VCPU state via the newly introduced KVM_S390_PV_CPU_COMMAND ioctl which mirrors the VM UV ioctl and can be extended with new commands later. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20220517163629.3443-8-frankja@linux.ibm.com Message-Id: <20220517163629.3443-8-frankja@linux.ibm.com> Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++ arch/s390/kvm/kvm-s390.h | 1 + arch/s390/kvm/pv.c | 16 +++++++++++ include/uapi/linux/kvm.h | 4 +++ 4 files changed, 90 insertions(+) commit 0460eb35b443f73f8a8e3be1ea87bd690a852e20 Author: Janosch Frank Date: Tue May 17 16:36:24 2022 +0000 KVM: s390: Add configuration dump functionality Sometimes dumping inside of a VM fails, is unavailable or doesn't yield the required data. For these occasions we dump the VM from the outside, writing memory and cpu data to a file. Up to now PV guests only supported dumping from the inside of the guest through dumpers like KDUMP. A PV guest can be dumped from the hypervisor but the data will be stale and / or encrypted. To get the actual state of the PV VM we need the help of the Ultravisor who safeguards the VM state. New UV calls have been added to initialize the dump, dump storage state data, dump cpu data and complete the dump process. We expose these calls in this patch via a new UV ioctl command. The sensitive parts of the dump data are encrypted, the dump key is derived from the Customer Communication Key (CCK). This ensures that only the owner of the VM who has the CCK can decrypt the dump data. The memory is dumped / read via a normal export call and a re-import after the dump initialization is not needed (no re-encryption with a dump key). Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20220517163629.3443-7-frankja@linux.ibm.com Message-Id: <20220517163629.3443-7-frankja@linux.ibm.com> Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 1 + arch/s390/kvm/kvm-s390.c | 93 ++++++++++++++++++++ arch/s390/kvm/kvm-s390.h | 4 + arch/s390/kvm/pv.c | 182 +++++++++++++++++++++++++++++++++++++++ include/uapi/linux/kvm.h | 15 ++++ 5 files changed, 295 insertions(+) commit fe9a93e07ba4f29def2f8a4318b63e0c70a5c6c2 Author: Janosch Frank Date: Tue May 17 16:36:23 2022 +0000 KVM: s390: pv: Add query dump information The dump API requires userspace to provide buffers into which we will store data. The dump information added in this patch tells userspace how big those buffers need to be. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Reviewed-by: Steffen Eiden Link: https://lore.kernel.org/r/20220517163629.3443-6-frankja@linux.ibm.com Message-Id: <20220517163629.3443-6-frankja@linux.ibm.com> Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 11 +++++++++++ include/uapi/linux/kvm.h | 12 +++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) commit 06eb3388e703d95de0dfeea657b2640fdda720db Author: Janosch Frank Date: Tue May 17 16:36:22 2022 +0000 KVM: s390: pv: Add dump support definitions Let's add the constants and structure definitions needed for the dump support. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Reviewed-by: Steffen Eiden Link: https://lore.kernel.org/r/20220517163629.3443-5-frankja@linux.ibm.com Message-Id: <20220517163629.3443-5-frankja@linux.ibm.com> Signed-off-by: Christian Borntraeger arch/s390/include/asm/uv.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 35d02493dba1ae6386fac07072908717affc3ff8 Author: Janosch Frank Date: Tue May 17 16:36:21 2022 +0000 KVM: s390: pv: Add query interface Some of the query information is already available via sysfs but having a IOCTL makes the information easier to retrieve. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Reviewed-by: Steffen Eiden Link: https://lore.kernel.org/r/20220517163629.3443-4-frankja@linux.ibm.com Message-Id: <20220517163629.3443-4-frankja@linux.ibm.com> Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/kvm.h | 25 ++++++++++++++++ 2 files changed, 101 insertions(+) commit 38c218259d4c4a8c232c2b16a5598568b814d2df Author: Janosch Frank Date: Tue May 17 16:36:20 2022 +0000 s390/uv: Add dump fields to query The new dump feature requires us to know how much memory is needed for the "dump storage state" and "dump finalize" ultravisor call. These values are reported via the UV query call. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Reviewed-by: Steffen Eiden Link: https://lore.kernel.org/r/20220517163629.3443-3-frankja@linux.ibm.com Message-Id: <20220517163629.3443-3-frankja@linux.ibm.com> Signed-off-by: Christian Borntraeger arch/s390/boot/uv.c | 2 ++ arch/s390/include/asm/uv.h | 5 +++++ arch/s390/kernel/uv.c | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) commit ac640db3a0260541058e95e4acd249cc166cb0eb Author: Janosch Frank Date: Tue May 17 16:36:19 2022 +0000 s390/uv: Add SE hdr query information We have information about the supported se header version and pcf bits so let's expose it via the sysfs files. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Reviewed-by: Steffen Eiden Link: https://lore.kernel.org/r/20220517163629.3443-2-frankja@linux.ibm.com Message-Id: <20220517163629.3443-2-frankja@linux.ibm.com> Signed-off-by: Christian Borntraeger arch/s390/boot/uv.c | 2 ++ arch/s390/include/asm/uv.h | 7 ++++++- arch/s390/kernel/uv.c | 20 ++++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) commit 5a18db2e92a3556ccacc92c031db6e6a7f2b34dc Author: Ville Syrjälä Date: Tue May 31 22:18:44 2022 +0300 drm/i915: Treat DMRRS as static DRRS Some machines declare DRRS type = seamless, DRRS = no, DMRRS = yes. I *think* DMRRS stands for "dynamcic media refresh rate", and I suspect the way it's meant to work is that it lets the driver switch refresh rates to match the frame rate for media playback. Obviously for us all that kind of policy stuff is entirely up to userspace, so the only thing we may do is make the extra refresh rate(s) available. So let's treat this case as just static DRRS for now. In the future We might want to differentiate the "seamless w/ downclocking" vs. "seamless w/o downclocking" cases so that we could do seamless refresh rate changes for systems that only claim to support DMRRS. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/125 Acked-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220531191844.11313-7-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_bios.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit 700034566d6844b3a67f4b6c3a728d9c0c8d93af Author: Ville Syrjälä Date: Tue May 31 22:18:43 2022 +0300 drm/i915/bios: Define more BDB contents Add a bunch of new struff we're missing in various BDB blocks. TODO: Bunch of these might actually need to be taken into use... v2: s/lfp_features/lfp_power/features/ (Jani) Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220531191844.11313-6-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_vbt_defs.h | 50 +++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 7 deletions(-) commit a9b20eb6f7da7794f8ffbce0ab9c709cb1ed71aa Author: Ville Syrjälä Date: Tue May 31 22:18:42 2022 +0300 drm/i915/bios: Fix aggressiveness typos Fix various typos around "aggressiveness". Note that the VBT spec also sometimes missspells it as "agressiveness" so I guess that's where some of the typos came from. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220531191844.11313-5-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_vbt_defs.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6e939738da208bcc0e4dc794519e18cad85bca73 Author: Ville Syrjälä Date: Tue May 31 22:18:41 2022 +0300 drm/i915: Accept more fixed modes with VRR panels It seem that when dealing with VRR capable eDP panels we need to accept fixed modes with variable vblank length (which is what VRR varies dynamically). Typically the preferred mode seems to be a non-VRR more (lowish dotclock/refresh rate + short vblank). We also have examples where it looks like even the hblank length is a bit different between the preferred mode vs. VRR mode(s). So let's just accept anything that has matching hdisp+vdisp+flags. v2: Document that is_alt_drrs_mode() is a subset of is_alt_vrr_mode() (Jani) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/125 Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220531191844.11313-4-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_dp.c | 3 +- drivers/gpu/drm/i915/display/intel_lvds.c | 3 +- drivers/gpu/drm/i915/display/intel_panel.c | 49 ++++++++++++++++++++++-------- drivers/gpu/drm/i915/display/intel_panel.h | 3 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 2 +- 5 files changed, 44 insertions(+), 16 deletions(-) commit 2db7d421cc5ca86bdcf57f2634f6eefdf349f998 Author: Ville Syrjälä Date: Tue May 31 22:18:40 2022 +0300 drm/i915: Print out rejected fixed modes To help with debugging DRRS/VRR panel init let's dump out all the fixed modes we rejected for whatever reason. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220531191844.11313-3-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_panel.c | 4 ++++ 1 file changed, 4 insertions(+) commit fba99b1ab7bde41c1eb00431df37b9237be3681e Author: Ville Syrjälä Date: Tue May 31 22:18:39 2022 +0300 drm/i915: Parse VRR capability from VBT VBT seems to have an extra flag for VRR vs. not. Let's consult that for eDP panels. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220531191844.11313-2-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_bios.c | 5 +++++ drivers/gpu/drm/i915/display/intel_display_types.h | 2 ++ drivers/gpu/drm/i915/display/intel_vrr.c | 22 ++++++++++++++++------ 3 files changed, 23 insertions(+), 6 deletions(-) commit 04514c14678e760e17e3cd44c553ade1bf3bef06 Author: Jani Nikula Date: Tue May 31 19:25:27 2022 +0300 drm/i915/display: stop using BUG() Avoid bringing the entire machine down even if there's a bug that shouldn't happen, but won't corrupt the system either. Log them loudly and limp on. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20220531162527.1062319-1-jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 11 ++++++----- drivers/gpu/drm/i915/display/intel_display.c | 19 +++++++++++-------- drivers/gpu/drm/i915/display/intel_display_types.h | 15 +++++++++------ 3 files changed, 26 insertions(+), 19 deletions(-) commit 69cf890d8b283c8d3a77d28dbd3024f58ae236a9 Author: AngeloGioacchino Del Regno Date: Tue May 31 14:26:34 2022 -0700 Input: mtk-pmic-keys - move long press debounce mask to mtk_pmic_regs As the second and last step of preparation to add support for more PMICs in this driver, move the long press debounce mask to struct mtk_pmic_regs and use that in mtk_pmic_keys_lp_reset_setup() instead of directly using the definition. While at it, remove the definition for MTK_PMIC_RST_DU_SHIFT as we are able to calculate it dynamically and spares us some unnecessary new definitions around for future per-PMIC variations of RST_DU_MASK. Lastly, it was necessary to change the function signature of mtk_pmic_keys_lp_reset_setup() to now pass a pointer to the main mtk_pmic_regs structure, since that's where the reset debounce mask now resides. This commit brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/20220524093505.85438-3-angelogioacchino.delregno@collabora.com Signed-off-by: Dmitry Torokhov drivers/input/keyboard/mtk-pmic-keys.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit b581acb49aec5c3b0af9ab1c537fb73481b79069 Author: AngeloGioacchino Del Regno Date: Tue May 31 14:26:19 2022 -0700 Input: mtk-pmic-keys - transfer per-key bit in mtk_pmic_keys_regs Place the key bit in struct mtk_pmic_keys_regs to enhance this driver's flexibility, in preparation for adding support for more PMICs. While at it, remove the definition of MTK_PMIC_RST_KEY_MASK as we are now dynamically setting the keymask relatively to the keys that are defined in the newly added rst_en_mask variable, on a per-key basis. This commit brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/20220524093505.85438-2-angelogioacchino.delregno@collabora.com Signed-off-by: Dmitry Torokhov drivers/input/keyboard/mtk-pmic-keys.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit 2a0a5828b98a91dc746b22adbb699a682fd3c7de Author: Dmitry Torokhov Date: Wed May 25 13:24:26 2022 -0700 Input: mtk-pmic-keys - use single update when configuring long press behavior Instead of doing 3 read-modify-write operations when configuring behavior of long-press, consolidate everything into one. Reviewed-by: Mattijs Korpershoek Tested-by: Mattijs Korpershoek # on mt8183-pumpkin Link: https://lore.kernel.org/r/YowH0Q5HAGU7Grx2@google.com Signed-off-by: Dmitry Torokhov drivers/input/keyboard/mtk-pmic-keys.c | 71 ++++++++++++++-------------------- 1 file changed, 28 insertions(+), 43 deletions(-) commit d0789070a851d0d9a688bf8cbdc6b50805e21c41 Author: Dmitry Torokhov Date: Wed May 25 13:24:01 2022 -0700 Input: mtk-pmic-keys - allow compiling with COMPILE_TEST There are no hard architecture dependencies in the driver, so to improve compile test coverage let's enable the driver when COMPILE_TEST is selected. Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/YowG7BVsJTNd0ELi@google.com Signed-off-by: Dmitry Torokhov drivers/input/keyboard/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce581ae142e24deb27905840fb720fee9b38d7a4 Author: Stuart Summers Date: Fri May 27 09:33:48 2022 -0700 drm/i915/pvc: Add initial PVC workarounds Bspec: 64027 Signed-off-by: Stuart Summers Signed-off-by: Matt Roper Reviewed-by: Matt Atwood Link: https://patchwork.freedesktop.org/patch/msgid/20220527163348.1936146-3-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_engine_regs.h | 5 ++- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 3 +- drivers/gpu/drm/i915/gt/intel_workarounds.c | 61 ++++++++++++++++++++++++----- drivers/gpu/drm/i915/intel_pm.c | 16 +++++++- 4 files changed, 73 insertions(+), 12 deletions(-) commit 8b449f1c44d1f921240da6a3e7fc4030966abbff Author: Matt Roper Date: Fri May 27 09:33:47 2022 -0700 drm/i915/pvc: Extract stepping information from PCI revid For PVC, the base die and compute tile have separate stepping values that we need to track; we'll use the existing graphics_step field to represent the compute tile stepping and add a new 'basedie_step' field. Unlike past platforms, steppings for these components are represented by specific bitfields within the PCI revision ID, and we shouldn't make assumptions about the non-CT, non-BD bits staying 0. Let's update our stepping code accordingly. Bspec: 44484 Signed-off-by: Matt Roper Reviewed-by: Matt Atwood Link: https://patchwork.freedesktop.org/patch/msgid/20220527163348.1936146-2-matthew.d.roper@intel.com drivers/gpu/drm/i915/i915_drv.h | 13 ++++++++ drivers/gpu/drm/i915/intel_step.c | 70 ++++++++++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_step.h | 4 ++- 3 files changed, 85 insertions(+), 2 deletions(-) commit 0bcbbf230b30ff2596950cce0ec1d44c5a465f34 Author: Dmitry Torokhov Date: Tue May 31 14:08:40 2022 -0700 Input: adp5588-keys - do not explicitly set device as wakeup source I2C core will set up device as a wakeup source and will configure interrupt as a wakeup interrupt if client is created with I2C_CLIENT_WAKE flag. Let's rely on this facility and to not unconditionally set up the device as wakeup device in the driver. Acked-by: Michael Hennerich Link: https://lore.kernel.org/r/20220528045631.289821-4-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/keyboard/adp5588-keys.c | 8 -------- 1 file changed, 8 deletions(-) commit 45608827e6e96af383e69085c6d73f932eeba889 Author: Dmitry Torokhov Date: Tue May 31 14:07:39 2022 -0700 Input: adp5588-keys - switch to using managed resources This simplifies error handling in probe() and reduces amount of explicit code in remove(). Acked-by: Michael Hennerich Link: https://lore.kernel.org/r/20220528045631.289821-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/keyboard/adp5588-keys.c | 112 ++++++++++++++-------------------- 1 file changed, 45 insertions(+), 67 deletions(-) commit 2d1159854f86835dd661b5289c1df5de7856e583 Author: Dmitry Torokhov Date: Tue May 31 14:05:22 2022 -0700 Input: adp5588-keys - switch to using threaded interrupt Instead of using hard interrupt handler and manually scheduling work item to handle I2C communications, let's switch to threaded interrupt handling. While at that enforce the readout delay required on pre- revision 4 silicon. Acked-by: Michael Hennerich Link: https://lore.kernel.org/r/20220528045631.289821-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/keyboard/adp5588-keys.c | 81 +++++++++++++++++++---------------- 1 file changed, 45 insertions(+), 36 deletions(-) commit 6ec75b20eaf24c4ca203d320d25baade28d68e70 Author: Dmitry Torokhov Date: Tue May 31 14:06:01 2022 -0700 Input: adp5588-keys - drop CONFIG_PM guards To improve compile-time coverage let's drop #ifdef CONFIG_PM guards and use SIMPLE_DEV_PM_OPS and __maybe_unused attributes and rely on the linker to drop unused code. Acked-by: Michael Hennerich Link: https://lore.kernel.org/r/20220528045631.289821-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/keyboard/adp5588-keys.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit a9bfcb56a2ef265092a4cfcd4b9c58ddff4d3649 Author: Tom Rix Date: Sat May 28 10:18:36 2022 -0400 drm/nouveau/fifo/gv100-: set gv100_fifo_runlist storage-class to static sparse reports drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c:56:1: warning: symbol 'gv100_fifo_runlist' was not declared. Should it be static? gv100_fifo_runlist is only used in gv100.c, so change it to static. Signed-off-by: Tom Rix Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220528141836.4155970-1-trix@redhat.com drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f543d664cec7e9b490bca55f57151afe6f5cf47 Author: Ville Syrjälä Date: Tue May 3 21:22:39 2022 +0300 drm/i915: Require an exact DP link freq match for the DG2 PLL No idea why the DG2 PLL DP link frequency calculation is allowing a non-exact match. That makes no sense so get rid of it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220503182242.18797-24-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula Acked-by: Matt Roper drivers/gpu/drm/i915/display/intel_snps_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2206df8ec862073995f5d27f0f55f698843a9b8 Author: Ville Syrjälä Date: Tue May 3 21:22:36 2022 +0300 drm/i915: Check hw.enable and hw.active in intel_pipe_config_compare() Don't see a real reson not to check hw.active and hw.enable in intel_pipe_config_compare(). We do have some checks for them at a higher level, but I think better check them also in intel_pipe_config_compare() in case something else doesn't do a thorough enough job. Also shuffle the mst_master_transcoder check next to the cpu_transcoder check for a bit of consistency. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220503182242.18797-21-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 58ae532ee875783503428610ac0f5d80e73009a7 Author: Ville Syrjälä Date: Tue May 3 21:22:25 2022 +0300 drm/i915: Improve modeset debugs Use the "[CRTC:%d:%s]'/etc. format for some of the modeset debugs so we know more about what has happened during the modeset state computation. Also tweak the connector bpp debug message a bit to make it less confusing. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220503182242.18797-10-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit aa71f9870efea70b38b17c3d2af870530fcd02e3 Author: Ville Syrjälä Date: Tue May 3 21:22:24 2022 +0300 drm/i915: s/pipe_config/crtc_state/ Rename some of the 'pipe_config's to the more modern 'crtc_state'. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220503182242.18797-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display.c | 62 ++++++++++++++-------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit 3d140a3d8816082f9732d6fccb81dc18823e03b3 Author: Ville Syrjälä Date: Tue May 3 21:22:23 2022 +0300 drm/i915: Adjust intel_modeset_pipe_config() & co. calling convention Use the state+crtc calling convention for intel_modeset_pipe_config() and othere related functions. Many of these need the full atomic state anyway so passing it all the way through is just nicer than having to worry about whether it can actually be extracted from eg. the crtc state passed in. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220503182242.18797-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display.c | 48 +++++++++++++++------------- 1 file changed, 25 insertions(+), 23 deletions(-) commit 3951270abfd229e3e17c991942cd111b66454f97 Author: Ville Syrjälä Date: Tue May 3 21:22:22 2022 +0300 drm/i915: Extract PIPE_CONF_CHECK_RECT() Deduplicate the drm_rect comparisons. We also drop the redundant pch_pfit.enabled check since the pch_pfit.dst rectanble will be zeroed anyway when the pfit is not enabled. v2: Document why we drop the enabled check (Jani) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220503182242.18797-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 0e5397d8c9fe2a2e4fcc8d98cba4a12511a03267 Author: Ville Syrjälä Date: Tue May 3 21:22:21 2022 +0300 drm/i915: Extract PIPE_CONF_CHECK_TIMINGS() Deduplicate the crtc_ timings comparisons. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220503182242.18797-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display.c | 45 +++++++++++----------------- 1 file changed, 18 insertions(+), 27 deletions(-) commit 6cb07d20317c77494fa4de572887e3dcdbf98b6d Author: Ville Syrjälä Date: Tue May 3 21:22:19 2022 +0300 drm/i915: Clean up DPLL related debugs The debugs in lower level DPLL code don't really provide any useful extra information AFAICS. Better just streamline the code and just put the necessary debugs (to identify at which step the modeset failed) into the higher level code. In addition we'll get the full state dump as well, which should hopefully have enough information to figure out what went wrong. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220503182242.18797-4-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_dpll.c | 75 ++++++++++----------------- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 48 ++++------------- 2 files changed, 35 insertions(+), 88 deletions(-) commit 92a020747d6c9e2efe8168a4a444576581bba636 Author: Ville Syrjälä Date: Tue May 3 21:22:17 2022 +0300 drm/i915: Split shared dpll .get_dplls() into compute and get phases Split the DPLL state computation into a separate function from the current .get_dplls() which currently serves a dual duty by also reserving the shared DPLLs. v2: s/false/-EINVAL/ (Jani) Cc: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220503182242.18797-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_dpll.c | 14 +- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 281 ++++++++++++++++++++------ drivers/gpu/drm/i915/display/intel_dpll_mgr.h | 3 + 3 files changed, 230 insertions(+), 68 deletions(-) commit 0aa93f54f4341a40b05ec2ac242109e78661d7aa Author: Vivek Kasireddy Date: Wed May 25 17:19:39 2022 -0700 drm/i915/tc: Don't default disconnected legacy Type-C ports to TBT mode (v2) Commit 30e114ef4b16 ("drm/i915/tc: Check for DP-alt, legacy sinks before taking PHY ownership") defaults any disconnected Type-C ports to TBT-alt mode which presents a problem (which could most likely result in a system hang) when userspace forces a modeset on a Type-C port that is wired for legacy HDMI. The following warning is seen when Weston forces a modeset on a disconnected legacy Type-C port (HDMI) on a TGL based Gigabyte system: (https://www.gigabyte.com/Mini-PcBarebone/GB-BSi3-1115G4-rev-10#ov) Missing case (clock == 173000) WARNING: CPU: 1 PID: 438 at drivers/gpu/drm/i915/display/intel_ddi.c:245 icl_ddi_tc_enable_clock.cold+0x16a/0x1cf [i915] CPU: 1 PID: 438 Comm: kworker/u8:3 Tainted: G U W E 5.18.0-rc5-drm-tip+ #20 Hardware name: GIGABYTE GB-BSi3-1115G4/GB-BSi3-1115G4, BIOS F9 10/16/2021 Workqueue: i915_modeset intel_atomic_commit_work [i915] RIP: 0010:icl_ddi_tc_enable_clock.cold+0x16a/0x1cf [i915] Code: 74 6c 7f 10 81 fd d0 78 02 00 74 6d 81 fd b0 1e 04 00 74 70 48 63 d5 48 c7 c6 c0 7b ab c0 48 c7 c7 20 75 ab c0 e8 b8 b5 c1 f0 <0f> 0b 45 31 ed e9 fb fe ff ff 49 63 d5 48 c7 c6 80 7b ab c0 48 c7 RSP: 0018:ffff8882522c78f0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000000 RDX: 0000000000000027 RSI: 0000000000000004 RDI: ffffed104a458f10 RBP: 0000000000011558 R08: ffffffffb078de4e R09: ffff888269ca748b R10: ffffed104d394e91 R11: 0000000000000000 R12: ffff888255a318f8 R13: 0000000000000002 R14: ffff888255a30000 R15: ffff88823ef00348 FS: 0000000000000000(0000) GS:ffff888269c80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fd7afa42000 CR3: 0000000255c02004 CR4: 00000000007706e0 PKRU: 55555554 Call Trace: intel_ddi_pre_enable.cold+0x96/0x5bf [i915] intel_encoders_pre_enable+0x10e/0x140 [i915] hsw_crtc_enable+0x207/0x99d [i915] ? ilk_crtc_enable.cold+0x2a/0x2a [i915] ? prepare_to_wait_exclusive+0x120/0x120 intel_enable_crtc+0x9a/0xf0 [i915] skl_commit_modeset_enables+0x466/0x820 [i915] ? intel_commit_modeset_enables+0xd0/0xd0 [i915] ? intel_mbus_dbox_update+0x1ed/0x250 [i915] intel_atomic_commit_tail+0xf2d/0x3040 [i915] _raw_spin_lock_irqsave+0x87/0xe0 _raw_read_unlock_irqrestore+0x40/0x40 __update_load_avg_cfs_rq+0x70/0x5c0 __i915_sw_fence_complete+0x85/0x3b0 [i915] ? intel_get_crtc_new_encoder+0x190/0x190 [i915] ? sysvec_irq_work+0x13/0x90 ? asm_sysvec_irq_work+0x12/0x20 ? _raw_spin_lock_irq+0x82/0xd0 ? read_word_at_a_time+0xe/0x20 ? process_one_work+0x393/0x690 process_one_work+0x393/0x690 worker_thread+0x2b7/0x620 ? process_one_work+0x690/0x690 kthread+0x15a/0x190 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x1f/0x30 Continuing with the modeset without setting the DDI clock results in more warnings and eventually a system hang. This does not seem to happen with disconnected legacy or DP-alt DP ports because the clock rate defaults to 162000 (which is a valid TBT clock) during the link training process. Therefore, to fix this issue, this patch avoids setting disconnected Type-C legacy ports to TBT-alt mode which prevents the selection of TBT PLL when a modeset is forced. v2: (Imre) - Retain the check for legacy hotplug live status to account for incorrect VBTs. Cc: Imre Deak Cc: José Roberto de Souza Signed-off-by: Vivek Kasireddy Reviewed-by: Imre Deak Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20220526001939.4031112-2-vivek.kasireddy@intel.com drivers/gpu/drm/i915/display/intel_tc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a0ab5abced550ddeefddb06055ed60779a54eb79 Author: Saurabh Sengar Date: Sat May 21 07:23:39 2022 -0700 drm/hyperv : Removing the restruction of VRAM allocation with PCI bar size There were two different approaches getting used in this driver to allocate vram: 1. VRAM allocation from PCI region for Gen1 2. VRAM alloaction from MMIO region for Gen2 First approach limilts the vram to PCI BAR size, which is 64 MB in most legacy systems. This limits the maximum resolution to be restricted to 64 MB size, and with recent conclusion on fbdev issue its concluded to have similar allocation strategy for both Gen1 and Gen2. This patch unifies the Gen1 and Gen2 vram allocation strategy. Signed-off-by: Saurabh Sengar Reviewed-by: Deepak Rawat Signed-off-by: Deepak Rawat Link: https://patchwork.freedesktop.org/patch/msgid/1653143019-20032-1-git-send-email-ssengar@linux.microsoft.com drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 74 ++------------------------------- 1 file changed, 3 insertions(+), 71 deletions(-) commit ec8d985ff26f29d53d9ebff04973e96572fd0285 Author: Christian König Date: Wed May 4 13:34:03 2022 +0200 drm: use dma_fence_unwrap_merge() in drm_syncobj The unwrap merge function is now intended for this use case. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220518135844.3338-6-christian.koenig@amd.com drivers/gpu/drm/drm_syncobj.c | 57 ++++++------------------------------------- 1 file changed, 7 insertions(+), 50 deletions(-) commit 245a4a7b531cffb41233a716497c25b06835cf4b Author: Christian König Date: Mon Apr 25 14:22:12 2022 +0200 dma-buf: generalize dma_fence unwrap & merging v3 Introduce a dma_fence_unwrap_merge() macro which allows to unwrap fences which potentially can be containers as well and then merge them back together into a flat dma_fence_array. v2: rename the function, add some more comments about how the wrapper is used, move filtering of signaled fences into the unwrap iterator, add complex selftest which covers more cases. v3: fix signaled fence filtering once more Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220518135844.3338-5-christian.koenig@amd.com drivers/dma-buf/dma-fence-unwrap.c | 103 +++++++++++++++++++++++++++++ drivers/dma-buf/st-dma-fence-unwrap.c | 109 +++++++++++++++++++++++++++++++ drivers/dma-buf/sync_file.c | 119 ++-------------------------------- include/linux/dma-fence-unwrap.h | 24 +++++++ 4 files changed, 242 insertions(+), 113 deletions(-) commit 8f61973718485f3e89bc4f408f929048b7b47c83 Author: Christian König Date: Wed May 4 13:01:29 2022 +0200 dma-buf: return only unsignaled fences in dma_fence_unwrap_for_each v3 dma_fence_chain containers cleanup signaled fences automatically, so filter those out from arrays as well. v2: fix missing walk over the array v3: massively simplify the patch and actually update the description. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220518135844.3338-4-christian.koenig@amd.com include/linux/dma-fence-unwrap.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 01357a5a45ed8eb9543183f5c9c6713ae60fc1f3 Author: Christian König Date: Sun Apr 24 16:55:14 2022 +0200 dma-buf: cleanup dma_fence_unwrap implementation Move the code from the inline functions into exported functions. Signed-off-by: Christian König Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220518135844.3338-3-christian.koenig@amd.com drivers/dma-buf/Makefile | 2 +- drivers/dma-buf/dma-fence-unwrap.c | 59 ++++++++++++++++++++++++++++++++++++++ include/linux/dma-fence-unwrap.h | 52 +++------------------------------ 3 files changed, 64 insertions(+), 49 deletions(-) commit 0c5064fa8d5a02dc2dcc6c674a0ad1bbaf79efda Author: Christian König Date: Wed May 4 12:28:31 2022 +0200 dma-buf: cleanup dma_fence_unwrap selftest v2 The selftests, fix the error handling, remove unused functions and stop leaking memory in failed tests. v2: fix the memory leak correctly. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220518135844.3338-2-christian.koenig@amd.com drivers/dma-buf/st-dma-fence-unwrap.c | 48 ++++++++++++++--------------------- 1 file changed, 19 insertions(+), 29 deletions(-) commit 435c249008cba04ed6a7975e9411f3b934620204 Author: Yunhao Tian Date: Tue May 10 11:02:19 2022 +0800 drm/mipi-dbi: align max_chunk to 2 in spi_transfer In __spi_validate, there's a validation that no partial transfers are accepted (xfer->len % w_size must be zero). When max_chunk is not a multiple of bpw (e.g. max_chunk = 65535, bpw = 16), the transfer will be rejected. This patch aligns max_chunk to 2 bytes (the maximum value of bpw is 16), so that no partial transfer will occur. Fixes: d23d4d4dac01 ("drm/tinydrm: Move tinydrm_spi_transfer()") Signed-off-by: Yunhao Tian Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20220510030219.2486687-1-t123yh.xyz@gmail.com drivers/gpu/drm/drm_mipi_dbi.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8723750e2753868591ba86a57b0041c5e38047ad Author: Wen Gong Date: Wed May 25 09:22:47 2022 -0400 ath10k: fix regdomain info of iw reg set/get When wlan load, firmware report the reg code with 0x6C for QCA6174, it is world reg which checked by ath_is_world_regd(), then the reg will be save into reg_world_copy of ath_common in ath_regd_init(). Later the regulatory of ath_common is updated to another country code such as "US" in ath_reg_notifier_apply() by below call stack. After that, regulatory_hint() is called in ath10k_mac_register() and it lead "iw reg get" show two regdomain info as below. global country US: DFS-FCC (2400 - 2472 @ 40), (N/A, 30), (N/A) (5150 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW (5250 - 5350 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW (5470 - 5730 @ 160), (N/A, 23), (0 ms), DFS (5730 - 5850 @ 80), (N/A, 30), (N/A) (57240 - 71000 @ 2160), (N/A, 40), (N/A) phy#0 country US: DFS-FCC (2400 - 2472 @ 40), (N/A, 30), (N/A) (5150 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW (5250 - 5350 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW (5470 - 5730 @ 160), (N/A, 23), (0 ms), DFS (5730 - 5850 @ 80), (N/A, 30), (N/A) (57240 - 71000 @ 2160), (N/A, 40), (N/A) [ 4255.704975] Call Trace: [ 4255.704983] ath_reg_notifier_apply+0xa6/0xc5 [ath] [ 4255.704991] ath10k_reg_notifier+0x2f/0xd2 [ath10k_core] [ 4255.705010] wiphy_regulatory_register+0x5f/0x69 [cfg80211] [ 4255.705020] wiphy_register+0x459/0x8f0 [cfg80211] [ 4255.705042] ? ieee80211_register_hw+0x3a6/0x7d1 [mac80211] [ 4255.705049] ? __kmalloc+0xf4/0x218 [ 4255.705058] ? ieee80211_register_hw+0x3a6/0x7d1 [mac80211] [ 4255.705066] ? ath10k_mac_register+0x70/0xaab [ath10k_core] [ 4255.705075] ieee80211_register_hw+0x51a/0x7d1 [mac80211] [ 4255.705084] ath10k_mac_register+0x8b4/0xaab [ath10k_core] [ 4255.705094] ath10k_core_register_work+0xa5e/0xb45 [ath10k_core] [ 4255.705100] ? __schedule+0x61f/0x7d3 [ 4255.705105] process_one_work+0x1b7/0x392 [ 4255.705109] worker_thread+0x271/0x35d [ 4255.705112] ? pr_cont_work+0x58/0x58 [ 4255.705116] kthread+0x13f/0x147 [ 4255.705119] ? pr_cont_work+0x58/0x58 [ 4255.705123] ? kthread_destroy_worker+0x62/0x62 [ 4255.705126] ret_from_fork+0x22/0x40 At this moment, the two regdomain info is same, when run "iw reg set KR", the global regdomain info changed to KR, but the regdomain of phy#0 does not change again. It leads inconsistent values between global and phy#0 as below. global country KR: DFS-JP (2402 - 2482 @ 40), (N/A, 13), (N/A) (5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW (5490 - 5710 @ 160), (N/A, 30), (0 ms), DFS (5735 - 5835 @ 80), (N/A, 30), (N/A) (57000 - 66000 @ 2160), (N/A, 43), (N/A) phy#0 country US: DFS-FCC (2400 - 2472 @ 40), (N/A, 30), (N/A) (5150 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW (5250 - 5350 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW (5470 - 5730 @ 160), (N/A, 23), (0 ms), DFS (5730 - 5850 @ 80), (N/A, 30), (N/A) (57240 - 71000 @ 2160), (N/A, 40), (N/A) The initial reg code is 0x6C which saved in reg_world_copy of ath_common, and the code US is updated from cfg80211 later, so ath10k should also check the initial reg code before regulatory_hint(). After this fix, regdomain info is same between "iw reg get" and "iw reg set xx", it does not have the regdomain info of phy#0 again. global country KR: DFS-JP (2402 - 2482 @ 40), (N/A, 13), (N/A) (5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW (5490 - 5710 @ 160), (N/A, 30), (0 ms), DFS (5735 - 5835 @ 80), (N/A, 30), (N/A) (57000 - 66000 @ 2160), (N/A, 43), (N/A) This does not effect the channel list and power which ath10k used. When the country code for regulatory_hint() in ath10k_mac_register() is same with the global country code, then reg_set_rd_driver() of cfg80211 called from crda which return -EALREADY to set_regdom() and then update_all_wiphy_regulatory() will not be called while wlan load. When run "iw reg set xx", reg_get_regdomain() which used by function handle_channel() in net/wirelss/reg.c always use the regdomain returned by get_cfg80211_regdom() because the initiator of last regulatory_request is NL80211_REGDOM_SET_BY_USER, get_cfg80211_regdom() is the global regdomain, then all the ieee80211_channel info is updated in handle_channel() with the global regdomain. Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049 Tested-on: QCA9984 hw1.0 PCI 10.4-3.6-00104 Signed-off-by: Wen Gong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220525132247.23459-1-quic_wgong@quicinc.com drivers/net/wireless/ath/ath10k/mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b205ce4c266cd66e6f954733ef6c94f06722e150 Author: Thiraviyam Mariyappan Date: Thu May 19 18:27:41 2022 +0530 ath11k: support avg signal in station dump Currently mac80211 doesn't calculate average signal when RSS(Receive side scaling) is enabled from the driver, so average signal isn't printed in the station dump. To address this issue, calculate the average signal from RSSI within driver and display in the station dump. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1 Signed-off-by: Thiraviyam Mariyappan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1652965061-30457-1-git-send-email-quic_tmariyap@quicinc.com drivers/net/wireless/ath/ath11k/core.h | 4 ++++ drivers/net/wireless/ath/ath11k/dp_rx.c | 3 +++ drivers/net/wireless/ath/ath11k/mac.c | 5 +++++ 3 files changed, 12 insertions(+) commit 3bd0c69653ac636eae8872aacdcd4156f772f928 Author: Johan Hovold Date: Mon May 23 16:32:58 2022 +0200 ath11k: fix IRQ affinity warning on shutdown Make sure to clear the IRQ affinity hint also on shutdown to avoid triggering a WARN_ON_ONCE() in __free_irq() when stopping MHI while using a single MSI vector. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3 Fixes: e94b07493da3 ("ath11k: Set IRQ affinity to CPU0 in case of one MSI vector") Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220523143258.24818-1-johan+linaro@kernel.org drivers/net/wireless/ath/ath11k/pci.c | 2 ++ 1 file changed, 2 insertions(+) commit 9f855efd9a7b6b0539c694e9381fb67cf68b96c7 Author: Julia Lawall Date: Sat May 21 13:10:24 2022 +0200 ath6kl: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220521111145.81697-14-Julia.Lawall@inria.fr drivers/net/wireless/ath/ath6kl/wmi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4ba1ff87b17e81686ada8f429300876f55f95ad Author: Johan Hovold Date: Sun May 22 15:33:16 2022 +0300 ath11k: fix netdev open race Make sure to allocate resources needed before registering the device. This specifically avoids having a racing open() trigger a BUG_ON() in mod_timer() when ath11k_mac_op_start() is called before the mon_reap_timer as been set up. I did not see this issue with next-20220310, but I hit it on every probe with next-20220511. Perhaps some timing changed in between. Here's the backtrace: [ 51.346947] kernel BUG at kernel/time/timer.c:990! [ 51.346958] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ... [ 51.578225] Call trace: [ 51.583293] __mod_timer+0x298/0x390 [ 51.589518] mod_timer+0x14/0x20 [ 51.595368] ath11k_mac_op_start+0x41c/0x4a0 [ath11k] [ 51.603165] drv_start+0x38/0x60 [mac80211] [ 51.610110] ieee80211_do_open+0x29c/0x7d0 [mac80211] [ 51.617945] ieee80211_open+0x60/0xb0 [mac80211] [ 51.625311] __dev_open+0x100/0x1c0 [ 51.631420] __dev_change_flags+0x194/0x210 [ 51.638214] dev_change_flags+0x24/0x70 [ 51.644646] do_setlink+0x228/0xdb0 [ 51.650723] __rtnl_newlink+0x460/0x830 [ 51.657162] rtnl_newlink+0x4c/0x80 [ 51.663229] rtnetlink_rcv_msg+0x124/0x390 [ 51.669917] netlink_rcv_skb+0x58/0x130 [ 51.676314] rtnetlink_rcv+0x18/0x30 [ 51.682460] netlink_unicast+0x250/0x310 [ 51.688960] netlink_sendmsg+0x19c/0x3e0 [ 51.695458] ____sys_sendmsg+0x220/0x290 [ 51.701938] ___sys_sendmsg+0x7c/0xc0 [ 51.708148] __sys_sendmsg+0x68/0xd0 [ 51.714254] __arm64_sys_sendmsg+0x28/0x40 [ 51.720900] invoke_syscall+0x48/0x120 Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3 Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Fixes: 840c36fa727a ("ath11k: dp: stop rx pktlog before suspend") Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220517103436.15867-1-johan+linaro@kernel.org drivers/net/wireless/ath/ath11k/core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 0e703de3ef41692f765e80884caa36fed9da05df Author: Ajay Singh Date: Tue May 24 12:06:21 2022 +0000 wifi: wilc1000: add IGTK support Add support to handle IGTK keys which are required for MFP to FW. Index ID 4 and 5 are used to store the IGTK key. Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220524120606.9675-4-ajay.kathat@microchip.com drivers/net/wireless/microchip/wilc1000/cfg80211.c | 114 +++++++++++++++++---- drivers/net/wireless/microchip/wilc1000/fw.h | 8 ++ drivers/net/wireless/microchip/wilc1000/hif.c | 56 +++++++++- drivers/net/wireless/microchip/wilc1000/hif.h | 5 + drivers/net/wireless/microchip/wilc1000/netdev.h | 1 + drivers/net/wireless/microchip/wilc1000/wlan_if.h | 10 ++ 6 files changed, 171 insertions(+), 23 deletions(-) commit c5b331d4f550fb78bf1a553b2517616a5ea913d6 Author: Ajay Singh Date: Tue May 24 12:06:20 2022 +0000 wifi: wilc1000: add WPA3 SAE support Enable SAE authentication for AP and STA mode. In STA mode, allow the driver to pass the auth frames which are received from firmware to userspace application(hostapd) so that SAE authentication is offloaded to userspace. Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220524120606.9675-3-ajay.kathat@microchip.com drivers/net/wireless/microchip/wilc1000/cfg80211.c | 62 ++++++++++++++++++++-- drivers/net/wireless/microchip/wilc1000/fw.h | 9 ++++ drivers/net/wireless/microchip/wilc1000/hif.c | 44 +++++++++++++-- drivers/net/wireless/microchip/wilc1000/hif.h | 3 ++ drivers/net/wireless/microchip/wilc1000/netdev.c | 11 +++- drivers/net/wireless/microchip/wilc1000/netdev.h | 3 +- drivers/net/wireless/microchip/wilc1000/wlan.c | 3 +- drivers/net/wireless/microchip/wilc1000/wlan.h | 2 + drivers/net/wireless/microchip/wilc1000/wlan_if.h | 10 ++-- 9 files changed, 133 insertions(+), 14 deletions(-) commit 3c76ec880588c5291506e58239f1efaa860969f1 Author: Ajay Singh Date: Tue May 24 12:06:20 2022 +0000 wifi: wilc1000: remove WEP security support Deprecated WEP security for WILC driver as well as in firmware from 15.6 FW release onwards. After WEP security removal, freeup some codespace which helped to add new features like WPA3 etc. Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220524120606.9675-2-ajay.kathat@microchip.com drivers/net/wireless/microchip/wilc1000/cfg80211.c | 76 +-------------- drivers/net/wireless/microchip/wilc1000/fw.h | 6 -- drivers/net/wireless/microchip/wilc1000/hif.c | 102 --------------------- drivers/net/wireless/microchip/wilc1000/hif.h | 6 -- drivers/net/wireless/microchip/wilc1000/netdev.h | 10 -- 5 files changed, 2 insertions(+), 198 deletions(-) commit fcf690b0b47494df51d214db5c5a714a400b0257 Author: Ajay Singh Date: Tue May 24 12:06:19 2022 +0000 wifi: wilc1000: use correct sequence of RESET for chip Power-UP/Down For power-up sequence, WILC expects RESET set to high 5ms after making chip_en(enable) so corrected chip power-up sequence by making RESET high. For Power-Down sequence, the correct sequence make RESET and CHIP_EN low without any extra delay. Fixes: ec031ac4792c ("wilc1000: Add reset/enable GPIO support to SPI driver") Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220524120606.9675-1-ajay.kathat@microchip.com drivers/net/wireless/microchip/wilc1000/spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b88d28146c30a8e14f0f012d56ebf19b68a348f4 Author: Dan Carpenter Date: Tue May 17 14:48:44 2022 +0300 wifi: rtlwifi: fix error codes in rtl_debugfs_set_write_h2c() If the copy_from_user() fails or the user gives invalid date then the correct thing to do is to return a negative error code. (Currently it returns success). I made a copy additional related cleanups: 1) There is no need to check "buffer" for NULL. That's handled by copy_from_user(). 2) The "h2c_len" variable cannot be negative because it is unsigned and because sscanf() does not return negative error codes. Fixes: 610247f46feb ("rtlwifi: Improve debugging by using debugfs") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/YoOLnDkHgVltyXK7@kili drivers/net/wireless/realtek/rtlwifi/debug.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 89d8f53ff6e729907af77f09f48eca9854295c91 Author: Larry Finger Date: Tue May 24 10:37:16 2022 -0500 wifi: rtw88: Fix Sparse warning for rtw8821c_hw_spec Sparse lists the following: CHECK drivers/net/wireless/realtek/rtw88/rtw8821c.c drivers/net/wireless/realtek/rtw88/rtw8821c.c:1880:22: warning: symbol 'rtw8821c_hw_spec' was not declared. Should it be static? The warning arises because the external declaration for rtw8821c_hw_spec occurs in rtw8821ce.h, which is not included in rtw8821c.h. That line is moved, and the now empty file rtw8821ce.h is deleted. Symbol 'rtw8821c_hw_spec' can be made constant. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220524153716.20450-1-Larry.Finger@lwfinger.net drivers/net/wireless/realtek/rtw88/rtw8821c.c | 2 +- drivers/net/wireless/realtek/rtw88/rtw8821c.h | 2 ++ drivers/net/wireless/realtek/rtw88/rtw8821ce.c | 2 +- drivers/net/wireless/realtek/rtw88/rtw8821ce.h | 10 ---------- 4 files changed, 4 insertions(+), 12 deletions(-) commit e36db29cfdffde868a52f8e7607dd0935d69f352 Author: Larry Finger Date: Tue May 24 10:36:20 2022 -0500 wifi: rtw88: Fix Sparse warning for rtw8723d_hw_spec Sparse lists the following: CHECK drivers/net/wireless/realtek/rtw88/rtw8723d.c drivers/net/wireless/realtek/rtw88/rtw8723d.c:2704:22: warning: symbol 'rtw8723d_hw_spec' was not declared. Should it be static? The warning arises because the external declaration for rtw8723d_hw_spec occurs in rtw8723de.h, which is not included in rtw8723d.h. That line is moved, and the now empty file rtw8723de.h is deleted. Symbol 'rtw8723d_hw_spec' can be made constant. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220524153621.19027-4-Larry.Finger@lwfinger.net drivers/net/wireless/realtek/rtw88/rtw8723d.c | 2 +- drivers/net/wireless/realtek/rtw88/rtw8723d.h | 2 ++ drivers/net/wireless/realtek/rtw88/rtw8723de.c | 2 +- drivers/net/wireless/realtek/rtw88/rtw8723de.h | 10 ---------- 4 files changed, 4 insertions(+), 12 deletions(-) commit f86fc57f8ae33435f07c6dbfc308b9ab24e48ea1 Author: Larry Finger Date: Tue May 24 10:36:19 2022 -0500 wifi: rtw88: Fix Sparse warning for rtw8822c_hw_spec Sparse reports the following: CHECK drivers/net/wireless/realtek/rtw88/rtw8822c.c drivers/net/wireless/realtek/rtw88/rtw8822c.c:5313:22: warning: symbol 'rtw8822c_hw_spec' was not declared. Should it be static? The warning arises because the external declaration for rtw8822c_hw_spec occurs in rtw8822ce.h, which is not included in rtw8822c.h. That line is moved, and the now empty file rtw8822ce.h is deleted. Symbol 'rtw8822c_hw_spec' can be made constant. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220524153621.19027-3-Larry.Finger@lwfinger.net drivers/net/wireless/realtek/rtw88/rtw8822c.c | 2 +- drivers/net/wireless/realtek/rtw88/rtw8822c.h | 2 ++ drivers/net/wireless/realtek/rtw88/rtw8822ce.c | 2 +- drivers/net/wireless/realtek/rtw88/rtw8822ce.h | 10 ---------- 4 files changed, 4 insertions(+), 12 deletions(-) commit f429298d68fba1d67dbe7016a37417a155be0a52 Author: Larry Finger Date: Tue May 24 10:36:18 2022 -0500 wifi: rtw88: Fix sparse warning for rtw8822b_hw_spec Sparse lists the following for rtw88: CHECK drivers/net/wireless/realtek/rtw88/rtw8822b.c drivers/net/wireless/realtek/rtw88/rtw8822b.c:2500:22: warning: symbol 'rtw8822b_hw_spec' was not declared. Should it be static? The warning arises because the external declaration for rtw8822b_hw_spec occurs in rtw8822be.h, which is not included in rtw8822b.h. That line is moved, and the now empty file rtw8822be.h is deleted. Symbol 'rtw8822b_hw_spec' can be made constant. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220524153621.19027-2-Larry.Finger@lwfinger.net drivers/net/wireless/realtek/rtw88/rtw8822b.c | 2 +- drivers/net/wireless/realtek/rtw88/rtw8822b.h | 2 ++ drivers/net/wireless/realtek/rtw88/rtw8822be.c | 2 +- drivers/net/wireless/realtek/rtw88/rtw8822be.h | 10 ---------- 4 files changed, 4 insertions(+), 12 deletions(-) commit 32621eb61bfd003ffb586028d84bb6a2e84e3dac Author: Po-Hao Huang Date: Fri May 20 16:15:23 2022 +0800 rtw88: fix null vif pointer when hw_scan fails Add this check to avoid crash by dereferencing a null pointer. When hwscan fails due to no memory or dma failure, the scan flag in ieee80211_local is cleared. So mac80211 determine that it's not hw_scan then calls sw_scan_complete() with null vif, which is also freed during the fail. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220520081523.45987-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw88/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 425671f03b4e3fb62bcb588c50f776342d667371 Author: Zong-Zhe Yang Date: Fri May 20 15:17:30 2022 +0800 rtw89: sar: adjust and support SAR on 6GHz band Since SAR is more expected to follow U-NII bands to plan subbands, division of 6GHz band is quite different from defined enum of subbands which is used by PHY in most cases. It's hard and painful if we want to keep using the same enum on SAR. So, we introduce another enum for SAR subbands and adjust SAR flow to use it. Besides, since 6GHz SAR subbands won't be divided with edge alignment, some cases will span two SAR subbands. For these cases, we describe them within an array of rtw89_sar_span and take the smaller one between SAR settings of the two subbands. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220520071731.38563-6-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 19 +++- drivers/net/wireless/realtek/rtw89/debug.h | 1 + drivers/net/wireless/realtek/rtw89/sar.c | 140 +++++++++++++++++++++++++---- 3 files changed, 140 insertions(+), 20 deletions(-) commit e3d365ff0b6cc4edfb4f44f55767de69077b204d Author: Ping-Ke Shih Date: Fri May 20 15:17:29 2022 +0800 rtw89: 8852c: rfk: re-calibrate RX DCK once thermal changes a lot RX DCK is receiver DC calibration. To keep good RF performance, do this calibration again if the delta of thermal value from the last calibration is more than 8. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220520071731.38563-5-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 5 +++++ drivers/net/wireless/realtek/rtw89/rtw8852c.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c | 27 +++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.h | 1 + 4 files changed, 34 insertions(+) commit 768992eb92ec7664f14616ea0dcf8ca8ece6cf9a Author: Ping-Ke Shih Date: Fri May 20 15:17:28 2022 +0800 rtw89: pci: handle hardware watchdog timeout interrupt status This watchdog timeout status bit indicates hardware gets wrong, so run SER L2 flow that calls mac80211 to restart hardware. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220520071731.38563-4-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/mac.h | 1 + drivers/net/wireless/realtek/rtw89/pci.c | 9 ++++++--- drivers/net/wireless/realtek/rtw89/pci.h | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) commit 6d7d1fef3f18e395b0b38f85b85b74fe98584f88 Author: Po Hao Huang Date: Fri May 20 15:17:27 2022 +0800 rtw89: fix null vif pointer when hw_scan fails Add this check to avoid crash by dereferencing a null pointer. When hwscan fails due to no memory or dma failure, the scan flag in ieee80211_local is cleared. So mac80211 determine that it's not hw_scan then calls sw_scan_complete() with null vif, which is also freed during the fail. Signed-off-by: Po Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220520071731.38563-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 5 ++++- drivers/net/wireless/realtek/rtw89/fw.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit 28000f7baa9ca667ae2a570c06ab86d32ab10f2b Author: Po Hao Huang Date: Fri May 20 15:17:26 2022 +0800 rtw89: fix channel inconsistency during hw_scan Previously channel maintained by driver could be different from the ones hardware actually is. Restore these variables back to prevent unexpected behavior. Signed-off-by: Po Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220520071731.38563-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 2 +- drivers/net/wireless/realtek/rtw89/fw.c | 20 +++++++++++++++----- drivers/net/wireless/realtek/rtw89/fw.h | 5 +---- drivers/net/wireless/realtek/rtw89/mac.c | 15 +++++++++------ drivers/net/wireless/realtek/rtw89/mac80211.c | 2 +- 5 files changed, 27 insertions(+), 17 deletions(-) commit 14374e3eee1b02dbf162e1dd75b789373f07ef43 Author: Christian König Date: Wed May 11 17:40:38 2022 +0200 dma-buf: cleanup dma_fence_chain_walk Use unrcu_pointer() instead of the manual cast. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220518085446.31338-1-christian.koenig@amd.com drivers/dma-buf/dma-fence-chain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d092de2c28dcf752890252dedefed98f00a631fe Author: Bernard Zhao Date: Mon May 16 18:41:36 2022 -0700 wifi: cw1200: cleanup the code a bit Delete if NULL check before dev_kfree_skb call. This change is to cleanup the code a bit. Signed-off-by: Bernard Zhao Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220517014136.410450-1-bernard@vivo.com drivers/net/wireless/st/cw1200/bh.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit ba0f32141bc515da2269ebba468741dffe2f9f43 Author: Furquan Shaikh Date: Fri May 27 21:41:41 2022 -0700 Input: cros_ec_keyb - handle x86 detachable/convertible Chromebooks Some detachable/convertible x86 Chromebooks use EC buttons/switches interface to signal volume up/down and other buttons. This configuration is signalled via presence of GOOG0007 ACPI device. The main keyboard on such Chromebooks is still using the standard 8042/atkbd combo. Signed-off-by: Furquan Shaikh Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20220526231230.2805147-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/keyboard/cros_ec_keyb.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 91c77b5fdfea70b9f0a55c3538bb7b53b19ba74b Author: Dmitry Torokhov Date: Fri May 27 21:41:21 2022 -0700 Input: cros_ec_keyb - switch to using generic device properties In preparation to enabling this driver on x86 devices let's switch from OF-specific property API to the generic one. Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20220526231230.2805147-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/keyboard/cros_ec_keyb.c | 68 +++++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 22 deletions(-) commit 077fdc9b59b0578752209a850231ee9ea1b3dabe Author: Linus Walleij Date: Sun Apr 24 21:57:47 2022 -0700 Input: zinitix - rename defines ZINITIX_* The defines are sometimes named BT541_* and sometimes ZINITIX_*, name them all ZINITIX_* because they certainly apply to a lot more touchscreens than the BT541. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20220410120059.2583849-3-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/zinitix.c | 112 ++++++++++++++++++------------------ 1 file changed, 56 insertions(+), 56 deletions(-) commit 4fda8a2df83ab25d2870997ddff2a4f67aa734c0 Author: Krzysztof Kozlowski Date: Fri May 27 21:48:17 2022 -0700 dt-bindings: input: use generic node names Devicetree specification expects nodes to have generic names, if possible, so replace custom ones with something generic. For gpio-keys, the more popular format is "key-xxx" instead of "xxx-key", so choose the first one. Signed-off-by: Krzysztof Kozlowski Acked-by: Jeff LaBundy Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220524093136.7980-1-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml | 4 ++-- Documentation/devicetree/bindings/input/gpio-keys.yaml | 4 ++-- Documentation/devicetree/bindings/input/iqs269a.yaml | 2 +- Documentation/devicetree/bindings/input/iqs626a.yaml | 2 +- Documentation/devicetree/bindings/input/microchip,cap11xx.yaml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) commit 433302dd8772fc4fe2b9ddcdb42f6a378317c665 Author: Minghao Chi Date: Sun Apr 24 20:49:01 2022 -0700 Input: omap4-keypad - switch to using pm_runtime_resume_and_get() Use pm_runtime_resume_and_get() to replace pm_runtime_get_sync and pm_runtime_put_noidle. This change is just to simplify the code, no actual functional changes. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Link: https://lore.kernel.org/r/20220414085710.2541867-1-chi.minghao@zte.com.cn Signed-off-by: Dmitry Torokhov drivers/input/keyboard/omap4-keypad.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 690e179059e7e89040d1cd564e39761567a8d5dc Merge: 5f76955ab1e4 4b0986a3613c Author: Dmitry Torokhov Date: Fri May 27 16:40:01 2022 -0700 Merge tag 'v5.18' into next Sync up with mainline to get updates to OMAP4 keypad driver and other upstream goodies. commit ade1fc91eb99614c7155fec762ad5761bb470e06 Author: Ville Syrjälä Date: Tue May 10 13:42:41 2022 +0300 drm/edid: Extract drm_edid_decode_mfg_id() Make the PNPID decoding available for other users. Cc: dri-devel@lists.freedesktop.org Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220510104242.6099-15-ville.syrjala@linux.intel.com include/drm/drm_edid.h | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit c518a775a843413786d3db8b5cab084597730a5a Author: Ville Syrjälä Date: Tue May 10 13:42:40 2022 +0300 drm/i915/bios: Determine panel type via PNPID match Apparently when the VBT panel_type==0xff we should trawl through the PNPID table and check for a match against the EDID. If a match is found the index gives us the panel_type. Tried to match the Windows behaviour here with first looking for an exact match, and if one isn't found we fall back to looking for a match w/o the mfg year/week. v2: Rebase due to vlv_dsi changes v3: Adjust to .get_panel_type() vfunc Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5545 Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220510104242.6099-14-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/icl_dsi.c | 2 +- drivers/gpu/drm/i915/display/intel_bios.c | 98 +++++++++++++++++++++++++++---- drivers/gpu/drm/i915/display/intel_bios.h | 4 +- drivers/gpu/drm/i915/display/intel_dp.c | 3 +- drivers/gpu/drm/i915/display/intel_lvds.c | 3 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 2 +- drivers/gpu/drm/i915/display/vlv_dsi.c | 2 +- 7 files changed, 95 insertions(+), 19 deletions(-) commit 3cf050762534cc268a02793ec00240f81c6e2229 Author: Ville Syrjälä Date: Tue May 10 13:42:39 2022 +0300 drm/i915/bios: Split VBT data into per-panel vs. global parts Move the panel specific VBT parsing to happen during the output probing stage. Needs to be done because the VBT parsing will need to look at the EDID to determine the correct panel_type on some machines. We split the parsed VBT data (i915->vbt) along the same boundary. For the moment we just hoist all the panel specific stuff into connector->panel.vbt since that seems like the most convenient place for eg. the backlight code. Note that we simply drop the drrs type check from intel_drrs_frontbuffer_update() since that operates on the whole device rather than a specific connector/encoder. But the check was just a micro optimization so removing it doesn't actually mattter for correctness. TODO: Lot's of cleanup to be done in the future. Eg. most of the DSI stuff could probably be eliminated entirely and just parsed on demand during DSI init. v2: Note the intel_drrs_frontbuffer_update() change Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220510104242.6099-13-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/icl_dsi.c | 11 +- drivers/gpu/drm/i915/display/intel_backlight.c | 23 +- drivers/gpu/drm/i915/display/intel_bios.c | 371 +++++++++++---------- drivers/gpu/drm/i915/display/intel_bios.h | 5 +- drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c | 9 +- drivers/gpu/drm/i915/display/intel_display.c | 1 - drivers/gpu/drm/i915/display/intel_display_types.h | 69 ++++ drivers/gpu/drm/i915/display/intel_dp.c | 21 +- drivers/gpu/drm/i915/display/intel_dp.h | 1 + .../gpu/drm/i915/display/intel_dp_aux_backlight.c | 6 +- drivers/gpu/drm/i915/display/intel_drrs.c | 3 - drivers/gpu/drm/i915/display/intel_dsi.c | 2 +- .../gpu/drm/i915/display/intel_dsi_dcs_backlight.c | 9 +- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 56 ++-- drivers/gpu/drm/i915/display/intel_lvds.c | 6 +- drivers/gpu/drm/i915/display/intel_panel.c | 13 +- drivers/gpu/drm/i915/display/intel_pps.c | 6 +- drivers/gpu/drm/i915/display/intel_psr.c | 30 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 3 + drivers/gpu/drm/i915/display/vlv_dsi.c | 14 +- drivers/gpu/drm/i915/i915_drv.h | 63 ---- 21 files changed, 391 insertions(+), 331 deletions(-) commit c2fdb424d32204faf5be29d55f0086b611c94e38 Author: Ville Syrjälä Date: Tue May 10 13:42:38 2022 +0300 drm/i915/bios: Split VBT parsing to global vs. panel specific parts Parsing the panel specific data (anything that depends on panel_type) from VBT is currently happening too early. Split the whole thing into global vs. panel specific parts so that we can start doing the panel specific parsing at a later time. v2: Clarify that this is about panel_type (Jani) Split out the leak checks (Jani) Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220510104242.6099-12-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_bios.c | 26 +++++++++++++++----------- drivers/gpu/drm/i915/display/intel_bios.h | 1 + drivers/gpu/drm/i915/display/intel_display.c | 1 + 3 files changed, 17 insertions(+), 11 deletions(-) commit c3fbcf60bc74b630967f291f47f0d9d0de6fcea7 Author: Ville Syrjälä Date: Tue May 10 13:42:37 2022 +0300 drm/i915/bios: Split parse_driver_features() into two parts We use the "driver features" block for two different kinds of data: global data, and per panel data. Split the function into two parts along that line so that we can start doing the parsing in two different locations. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220510104242.6099-11-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_bios.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 50759c13735dab06805eff0e8161d33216d6f5a3 Author: Ville Syrjälä Date: Tue May 10 13:42:36 2022 +0300 drm/i915/pps: Keep VDD enabled during eDP probe Disable the delayed VDD off work during the eDP probe. If we never turn off the VDD then we can't violate the panel's power sequencing delays despite not having read them out yet from the VBT. This is mostly a belt+suspenders type of thing since the the timeout we'd use for the delayed work should be long enough that this won't normally happen. But I don't really like relying on timeouts for correctless so might as well make sure. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220510104242.6099-10-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display_types.h | 1 + drivers/gpu/drm/i915/display/intel_pps.c | 10 ++++++++++ 2 files changed, 11 insertions(+) commit 67090801489d0a4c80c121494b749e1e97573447 Author: Ville Syrjälä Date: Tue May 10 13:42:35 2022 +0300 drm/i915/pps: Reinit PPS delays after VBT has been fully parsed During the eDP probe we may not yet know the panel_type used to index the VBT panel tables. So the initial eDP probe will have to be done without that, and thus we won't yet have the PPS delays from the VBT. Once the VBT has been fully parse we should reinit the PPS delays to make sure it's fully accounted for. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220510104242.6099-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_pps.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8e75e8f573e1ff4a0c93c3be1554d2bfd5ae6029 Author: Ville Syrjälä Date: Tue May 10 13:42:34 2022 +0300 drm/i915/pps: Split PPS init+sanitize in two Split the PPS init to something we do at the start of the eDP probe and a second part we do at the end. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220510104242.6099-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_dp.c | 2 ++ drivers/gpu/drm/i915/display/intel_pps.c | 30 +++++++++++++++++++++++++----- drivers/gpu/drm/i915/display/intel_pps.h | 1 + 3 files changed, 28 insertions(+), 5 deletions(-) commit 586294c3c1860ac991d3a241159c0edf974b68e4 Author: Ville Syrjälä Date: Tue May 10 13:42:33 2022 +0300 drm/i915/pps: Stash away original BIOS programmed PPS delays In order to do the panel VBT parsing after the EDID read (needed to determine panel_type from PNPID) we need to stash away the original BIOS programmed PPS delays so that we can consult them again when we reinit the PPS delays after the VBT parsing has been done. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220510104242.6099-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display_types.h | 1 + drivers/gpu/drm/i915/display/intel_pps.c | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) commit 89fcdf4305996f869eb39eb8f14a989e9a289611 Author: Ville Syrjälä Date: Tue May 10 13:42:32 2022 +0300 drm/i915/pps: Don't apply quirks/etc. to the VBT PPS delays if they haven't been initialized Skip QUIRK_INCREASE_T12_DELAY and the t11_t12 adjustment of the VBT PPS delays if we've not yet initialized them. Will be important later when the PPS delay init can happen before VBT parsing. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220510104242.6099-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_pps.c | 3 +++ 1 file changed, 3 insertions(+) commit 60b02a09598f87972a15bb181b9a62b8a8ee682a Author: Ville Syrjälä Date: Tue May 10 13:42:31 2022 +0300 drm/i915/pps: Introduce pps_delays_valid() Add a small helper that determines if the PPS delays have been initialized or not. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220510104242.6099-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_pps.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 75bd0d5e4eadb9ce3e9b6fb71971b6e87c38799e Author: Ville Syrjälä Date: Tue May 10 13:42:30 2022 +0300 drm/i915/pps: Split pps_init_delays() into distinct parts Split each of the hw/vbt/spec PPS delay initialization into separate functions to make the whole thing less cluttered. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220510104242.6099-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_pps.c | 66 +++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 18 deletions(-) commit 822e5ae701af2964c5808b6ade1d6f3b1eaec967 Author: Ville Syrjälä Date: Tue May 10 13:42:29 2022 +0300 drm/i915: Extract intel_edp_fixup_vbt_bpp() We have the same "override eDP VBT bpp with the current bpp" code duplciated in two places. Extract it to a helper function. TODO: Having this in .get_config() is pretty ugly. Should probably try to move it somewhere else (setup_hw_state()/etc.)... Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220510104242.6099-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/g4x_dp.c | 22 ++-------------------- drivers/gpu/drm/i915/display/intel_ddi.c | 22 ++-------------------- drivers/gpu/drm/i915/display/intel_dp.c | 25 +++++++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_dp.h | 1 + 4 files changed, 30 insertions(+), 40 deletions(-) commit 51ab3b85000d214b75899875d5745935e06020e5 Author: Ville Syrjälä Date: Tue May 10 13:42:28 2022 +0300 drm/i915: Pass intel_connector to intel_vrr_is_capable() Pass intel_connector instead of drm_connector to intel_vrr_is_capable(). Will result in less ugly casts. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220510104242.6099-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_dp.c | 2 +- drivers/gpu/drm/i915/display/intel_vrr.c | 14 +++++++------- drivers/gpu/drm/i915/display/intel_vrr.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) commit 4fde3f5d8805caba40cce2268c540d8a37403c6b Author: Balasubramani Vivekanandan Date: Thu May 26 12:19:35 2022 +0530 drm/i915/display/adl_p: Updates to HDMI combo PHY voltage swing table New updates to HDMI combo PHY voltage swing tables. Actually with this update (bspec updated on 08/17/2021), the values are reverted back to be same as icelake for HDMI combo PHY. Bspec: 49291 Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matt Atwood Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220526064935.969225-1-balasubramani.vivekanandan@intel.com drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) commit 420a07b841d03f6a436d8c06571c69aa5c783897 Author: Nirmoy Das Date: Wed May 25 11:59:55 2022 +0200 drm/i915: Individualize fences before adding to dma_resv obj _i915_vma_move_to_active() can receive > 1 fences for multiple batch buffers submission. Because dma_resv_add_fence() can only accept one fence at a time, change _i915_vma_move_to_active() to be aware of multiple fences so that it can add individual fences to the dma resv object. v6: fix multi-line comment. v5: remove double fence reservation for batch VMAs. v4: Reserve fences for composite_fence on multi-batch contexts and also reserve fence slots to composite_fence for each VMAs. v3: dma_resv_reserve_fences is not cumulative so pass num_fences. v2: make sure to reserve enough fence slots before adding. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5614 Fixes: 544460c33821 ("drm/i915: Multi-BB execbuf") Cc: # v5.16+ Signed-off-by: Nirmoy Das Reviewed-by: Matthew Auld Reviewed-by: Andrzej Hajda Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220525095955.15371-1-nirmoy.das@intel.com drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 3 +- drivers/gpu/drm/i915/i915_vma.c | 48 +++++++++++++++----------- 2 files changed, 30 insertions(+), 21 deletions(-) commit e51d8d3ea3d773334d2c047c8d1623dba66f592a Author: Mario Limonciello Date: Thu May 12 13:18:48 2022 -0500 HID: amd_sfh: Don't show client init failed as error when discovery fails When sensor discovery fails, this means that the system doesn't have any sensors connected and a user should only be notified at most one time. A message is already displayed at WARN level of "failed to discover, sensors not enabled". It's pointless to show that the client init failed at ERR level for the same condition. Check the return code and don't display this message in those conditions. Fixes: b5d7f43e97da ("HID: amd_sfh: Add support for sensor discovery") Reported-by: David Chang Signed-off-by: Mario Limonciello Acked-by: Basavaraj Natikar Signed-off-by: Jiri Kosina drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d6b675687a4ab4dba684716d97c8c6f81bf10905 Author: Ping Cheng Date: Fri May 13 14:52:37 2022 -0700 HID: wacom: Don't register pad_input for touch switch Touch switch state is received through WACOM_PAD_FIELD. However, it is reported by touch_input. Don't register pad_input if no other pad events require the interface. Cc: stable@vger.kernel.org Signed-off-by: Ping Cheng Reviewed-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 2 +- drivers/hid/wacom_wac.c | 43 +++++++++++++++++++++++++------------------ 2 files changed, 26 insertions(+), 19 deletions(-) commit 7ccced33a0ba39b0103ae1dfbf7f1dffdc0a1bc2 Author: Ping Cheng Date: Fri May 13 14:51:56 2022 -0700 HID: wacom: Only report rotation for art pen The generic routine, wacom_wac_pen_event, turns rotation value 90 degree anti-clockwise before posting the events. This non-zero event trggers a non-zero ABS_Z event for non art pen tools. However, HID_DG_TWIST is only supported by art pen. [jkosina@suse.cz: fix build: add missing brace] Cc: stable@vger.kernel.org Signed-off-by: Ping Cheng Reviewed-by: Jason Gerecke -- Hi Jiri, This is kind of a version 2 of the last one I posted two days ago. I updated the logic so it has less changed lines: 29 vs 158! Hopefully, the logic is easier to follow now. Please ignore the last one. Thank you! Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit 952cd974509251d6b5074bc3677b8297826a6ef1 Author: Alyssa Rosenzweig Date: Wed May 25 10:57:54 2022 -0400 drm/panfrost: Add arm,mali-valhall-jm compatible The most important Valhall-specific quirks have been handled, so add the Valhall compatible and probe. v2: Use arm,mali-valhall-jm compatible. Reviewed-by: Steven Price Signed-off-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20220525145754.25866-10-alyssa.rosenzweig@collabora.com drivers/gpu/drm/panfrost/panfrost_drv.c | 1 + 1 file changed, 1 insertion(+) commit 5ba99fca1de0272ce05b65f19bcc184b5cb43285 Author: Alyssa Rosenzweig Date: Wed May 25 10:57:53 2022 -0400 drm/panfrost: Add Mali-G57 "Natt" support Add the features, issues, and GPU ID for Mali-G57, a first-generation Valhall GPU. Other first- and second-generation Valhall GPUs should be similar. v2: Split out issue list for r0p0 from newer Natt GPUs, as TTRX_3485 was fixed in r0p1. Unfortunately, MT8192 has a r0p0, so we do need to handle TTRX_3485. Reviewed-by: Steven Price Signed-off-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20220525145754.25866-9-alyssa.rosenzweig@collabora.com drivers/gpu/drm/panfrost/panfrost_features.h | 12 ++++++++++++ drivers/gpu/drm/panfrost/panfrost_gpu.c | 3 +++ drivers/gpu/drm/panfrost/panfrost_issues.h | 7 +++++++ 3 files changed, 22 insertions(+) commit d8e53d8a4e0ae842ef5e83e0dfb0796980f710cf Author: Alyssa Rosenzweig Date: Wed May 25 10:57:52 2022 -0400 drm/panfrost: Don't set L2_MMU_CONFIG quirks L2_MMU_CONFIG is an implementation-defined register. Different Mali GPUs define slightly different MAX_READS and MAX_WRITES fields, which throttle outstanding reads and writes when set to non-zero values. When left as zero, reads and writes are not throttled. Both kbase and panfrost always zero these registers. Per discussion with Steven Price, there are two reasons these quirks may be used: 1. Simulating slower memory subsystems. This use case is only of interest to system-on-chip designers; it is not relevant to mainline. 2. Working around broken memory subsystems. Hopefully we never see this case in mainline. If we do, we'll need to set this register based on an SoC-compatible, rather than generally matching on the GPU model. To the best of our knowledge, these fields are zero at reset, so the write is not necessary. Let's remove the write to aid porting to new Mali GPUs, which have different layouts for the L2_MMU_CONFIG register. Suggested-by: Steven Price Reviewed-by: Steven Price Signed-off-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20220525145754.25866-8-alyssa.rosenzweig@collabora.com drivers/gpu/drm/panfrost/panfrost_gpu.c | 12 ------------ 1 file changed, 12 deletions(-) commit 5b9afc161ea595c82707f5f9d67c96a00a8bcbae Author: Alyssa Rosenzweig Date: Wed May 25 10:57:51 2022 -0400 drm/panfrost: Add "clean only safe" feature bit Add the HW_FEATURE_CLEAN_ONLY_SAFE bit based on kbase. When I actually tried to port the logic from kbase, trivial jobs raised Data Invalid Faults, so this may depend on other coherency details. It's still useful to have the bit to record the feature bit when adding new models. Reviewed-by: Steven Price Signed-off-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20220525145754.25866-7-alyssa.rosenzweig@collabora.com drivers/gpu/drm/panfrost/panfrost_features.h | 1 + 1 file changed, 1 insertion(+) commit 892e7fb7c254008c195431ae559b2b4f7909c95f Author: Alyssa Rosenzweig Date: Wed May 25 10:57:50 2022 -0400 drm/panfrost: Add HW_ISSUE_TTRX_3485 quirk TTRX_3485 requires the infamous "dummy job" workaround. I have this workaround implemented in a local branch, but I have not yet hit a case that requires it so I cannot test whether the implementation is correct. In the mean time, add the quirk bit so we can document which platforms may need it in the future. Reviewed-by: Steven Price Signed-off-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20220525145754.25866-6-alyssa.rosenzweig@collabora.com drivers/gpu/drm/panfrost/panfrost_issues.h | 3 +++ 1 file changed, 3 insertions(+) commit 0c0af438345ebe5477720f07216c7e48f6f88756 Author: Alyssa Rosenzweig Date: Wed May 25 10:57:49 2022 -0400 drm/panfrost: Handle HW_ISSUE_TTRX_3076 Some Valhall GPUs require resets when encountering bus faults due to occlusion query writes. Add the issue bit for this and handle it. Reviewed-by: Steven Price Signed-off-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20220525145754.25866-5-alyssa.rosenzweig@collabora.com drivers/gpu/drm/panfrost/panfrost_device.c | 9 +++++++-- drivers/gpu/drm/panfrost/panfrost_issues.h | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) commit a17775a1af59573b1023e4ff2419ba48f4b6f648 Author: Alyssa Rosenzweig Date: Wed May 25 10:57:48 2022 -0400 drm/panfrost: Constify argument to has_hw_issue Logically, this function is free of side effects, so any pointers it takes should be const. Needed to avoid a warning in the next patch. Reviewed-by: Steven Price Signed-off-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20220525145754.25866-4-alyssa.rosenzweig@collabora.com drivers/gpu/drm/panfrost/panfrost_issues.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 382435709516c1a7dc3843872792abf95e786c83 Author: Alyssa Rosenzweig Date: Wed May 25 10:57:47 2022 -0400 drm/panfrost: Handle HW_ISSUE_TTRX_2968_TTRX_3162 Add handling for the HW_ISSUE_TTRX_2968_TTRX_3162 quirk. Logic ported from kbase. kbase lists this workaround as used on Mali-G57. Reviewed-by: Steven Price Signed-off-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20220525145754.25866-3-alyssa.rosenzweig@collabora.com drivers/gpu/drm/panfrost/panfrost_gpu.c | 3 +++ drivers/gpu/drm/panfrost/panfrost_issues.h | 3 +++ drivers/gpu/drm/panfrost/panfrost_regs.h | 1 + 3 files changed, 7 insertions(+) commit 5d82e74a97c292da054ac5e49b41926242ada745 Author: Alyssa Rosenzweig Date: Wed May 25 10:57:46 2022 -0400 dt-bindings: Add compatible for Mali Valhall (JM) From the kernel's perspective, (pre-CSF, "Job Manager") Valhall is more or less compatible with Bifrost, although they differ to userspace. Add a compatible for Valhall to the existing Bifrost bindings documentation. As the first SoC with a Valhall GPU receiving mainline support, add a specific compatible for the MediaTek MT8192, which instantiates a Mali-G57. v2: Change compatible to arm,mali-valhall-jm (Daniel Stone). CC: devicetree@vger.kernel.org Reviewed-by: Rob Herring Reviewed-by: Steven Price Signed-off-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20220525145754.25866-2-alyssa.rosenzweig@collabora.com .../devicetree/bindings/gpu/arm,mali-bifrost.yaml | 25 +++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 9180c30cd61aa0b2f0eb4791c8e490c8c5abc54c Author: Jonathan Liu Date: Mon May 23 23:01:44 2022 +1000 drm: bridge: icn6211: Adjust clock phase using SYS_CTRL_1 The code from [1] sets SYS_CTRL_1 to different values depending on the desired clock phase (0, 1/4, 1/2 or 3/4). A clock phase of 0 aligns the positive edge of the clock with the pixel data while other values delay the clock by a fraction of the clock period. A clock phase of 1/2 aligns the negative edge of the clock with the pixel data. The driver currently hard codes SYS_CTRL_1 to 0x88 which corresponds to aligning the positive edge of the clock with the pixel data. This won't work correctly for panels that require aligning the negative edge of the clock with the pixel data. Adjust the clock phase to 0 if DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE is present in bus_flags, otherwise adjust the clock phase to 1/2 as appropriate for DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE. [1] https://github.com/tdjastrzebski/ICN6211-Configurator Signed-off-by: Jonathan Liu Reviewed-by: Marek Vasut Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220523130144.444225-1-net147@gmail.com drivers/gpu/drm/bridge/chipone-icn6211.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit f4d8aec6e4bf0a554388f30d555657cfb0d6e8c4 Author: Rob Herring Date: Wed May 25 15:56:26 2022 -0500 dt-bindings: display: ingenic,jz4780-hdmi: Drop undocumented 'ddc-i2c-bus' While 'ddc-i2c-bus' is a common property, it should be in a connector node rather than the HDMI bridge node as the I2C bus goes to a connector and not the HDMI block. Drop it from the example. Signed-off-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220525205626.2482584-1-robh@kernel.org .../devicetree/bindings/display/bridge/ingenic,jz4780-hdmi.yaml | 1 - 1 file changed, 1 deletion(-) commit 91776af1d8deb8f36cbec6bf2bf24b661b2b5cbb Author: Fabio Estevam Date: Wed May 25 18:53:16 2022 -0300 drm: bridge: adv7511: Move CEC definitions to adv7511_cec.c ADV7511_REG_CEC_RX_FRAME_HDR[] and ADV7511_REG_CEC_RX_FRAME_LEN[] are only used inside adv7511_cec.c. Move their definitions to this file to avoid the following build warnings when CONFIG_DRM_I2C_ADV7511_CEC is not selected: drivers/gpu/drm/bridge/adv7511/adv7511.h:229:17: warning: 'ADV7511_REG_CEC_RX_FRAME_HDR' defined but not used [-Wunused-const-variable=] drivers/gpu/drm/bridge/adv7511/adv7511.h:235:17: warning: 'ADV7511_REG_CEC_RX_FRAME_LEN' defined but not used [-Wunused-const-variable=] Reported-by: kernel test robot Fixes: ab0af093bf90 ("drm: bridge: adv7511: use non-legacy mode for CEC RX") Signed-off-by: Fabio Estevam Reviewed-by: Alvin Šipraga Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220525215316.1133057-1-festevam@gmail.com drivers/gpu/drm/bridge/adv7511/adv7511.h | 12 ------------ drivers/gpu/drm/bridge/adv7511/adv7511_cec.c | 12 ++++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) commit 69d6bf5c3754ffc491896632438417d1cedc2c68 Author: Ashutosh Dixit Date: Wed May 25 06:19:20 2022 -0700 drm/i915/gt: Fix memory leaks in per-gt sysfs All kmalloc'd kobjects need a kobject_put() to free memory. For example in previous code, kobj_gt_release() never gets called. The requirement of kobject_put() now results in a slightly different code organization. v2: s/gtn/gt/ (Andi) Fixes: b770bcfae9ad ("drm/i915/gt: create per-tile sysfs interface") Signed-off-by: Ashutosh Dixit Reviewed-by: Andi Shyti Acked-by: Andrzej Hajda Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/a6f6686517c85fba61a0c45097f5bb4fe7e257fb.1653484574.git.ashutosh.dixit@intel.com drivers/gpu/drm/i915/gt/intel_gt.c | 1 + drivers/gpu/drm/i915/gt/intel_gt_sysfs.c | 29 ++++++++++++----------------- drivers/gpu/drm/i915/gt/intel_gt_sysfs.h | 6 +----- drivers/gpu/drm/i915/gt/intel_gt_types.h | 3 +++ drivers/gpu/drm/i915/i915_sysfs.c | 2 ++ 5 files changed, 19 insertions(+), 22 deletions(-) commit 9d15dd1bb3e7de4dd31a225977813dda2748253e Author: Dale B Stimson Date: Wed May 25 06:19:19 2022 -0700 drm/i915/gt: Add media RP0/RPn to per-gt sysfs Retrieve RP0 and RPn freq for media IP from PCODE and display in per-gt sysfs. This patch adds the following files to gt/gtN sysfs: * media_RP0_freq_mhz * media_RPn_freq_mhz v2: Fixed commit author (Rodrigo) v3: Convert to new uncore interface for pcode functions v4: Adapt to intel_pcode.* function rename v5: #include "intel_pcode.h" in alphabetical order (Tvrtko) Cc: Tvrtko Ursulin Signed-off-by: Dale B Stimson Signed-off-by: Ashutosh Dixit Reviewed-by: Andi Shyti Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/45e34127a79e808f6582db8afb77f2f728a446e6.1653484574.git.ashutosh.dixit@intel.com drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 47 +++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_reg.h | 8 +++++ 2 files changed, 55 insertions(+) commit 6a735552f44d7a29a9e629cdc3b5c3ac2b4021e6 Author: Ashutosh Dixit Date: Wed May 25 06:19:18 2022 -0700 drm/i915/pcode: Init pcode on different gt's Extend pcode initialization to pcode on different gt's. Cc: Tvrtko Ursulin Cc: Jani Nikula Signed-off-by: Ashutosh Dixit Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/4de1e4fd71a2971549c5cfb185412f190f15e235.1653484574.git.ashutosh.dixit@intel.com drivers/gpu/drm/i915/i915_driver.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 26be7cd8aacdd3f0429834e78e3166286779f083 Author: Ashutosh Dixit Date: Wed May 25 06:19:17 2022 -0700 drm/i915/gt: Add media freq factor to per-gt sysfs Expose new sysfs to program and retrieve media freq factor. Factor values of 0 (dynamic), 0.5 and 1.0 are supported via a u8.8 fixed point representation (corresponding to integer values of 0, 128 and 256 respectively). Media freq factor is converted to media_ratio_mode for GuC. It is programmed into GuC using H2G SLPC interface. It is retrieved from GuC through a register read. A cached media_ratio_mode is maintained to preserve set values across GuC resets. This patch adds the following sysfs files to gt/gtN sysfs: * media_freq_factor * media_freq_factor.scale v2: Minor wording change in drm_warn (Tvrtko) Cc: Tvrtko Ursulin Signed-off-by: Dale B Stimson Signed-off-by: Ashutosh Dixit Reviewed-by: Andi Shyti Reviewed-by: Rodrigo Vivi Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/7ad7578335d8af9cba047b4bcf33d1887453d2e1.1653484574.git.ashutosh.dixit@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 130 +++++++++++++++++++++ .../gpu/drm/i915/gt/uc/abi/guc_actions_slpc_abi.h | 6 + drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c | 20 ++++ drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h | 1 + drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h | 3 + 6 files changed, 161 insertions(+) commit 3304033a1e69cd81a2044b4422f0d7e593afb4e6 Author: Alan Previn Date: Thu Mar 10 16:43:11 2022 -0800 drm/i915/reset: Fix error_state_read ptr + offset use Fix our pointer offset usage in error_state_read when there is no i915_gpu_coredump but buf offset is non-zero. This fixes a kernel page fault can happen when multiple tests are running concurrently in a loop and one is producing engine resets and consuming the i915 error_state dump while the other is forcing full GT resets. (takes a while to trigger). The dmesg call trace: [ 5590.803000] BUG: unable to handle page fault for address: ffffffffa0b0e000 [ 5590.803009] #PF: supervisor read access in kernel mode [ 5590.803013] #PF: error_code(0x0000) - not-present page [ 5590.803016] PGD 5814067 P4D 5814067 PUD 5815063 PMD 109de4067 PTE 0 [ 5590.803022] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 5590.803026] CPU: 5 PID: 13656 Comm: i915_hangman Tainted: G U 5.17.0-rc5-ups69-guc-err-capt-rev6+ #136 [ 5590.803033] Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-M LP4x RVP, BIOS ADLPFWI1.R00. 3031.A02.2201171222 01/17/2022 [ 5590.803039] RIP: 0010:memcpy_erms+0x6/0x10 [ 5590.803045] Code: fe ff ff cc eb 1e 0f 1f 00 48 89 f8 48 89 d1 48 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 c3 66 0f 1f 44 00 00 48 89 f8 48 89 d1 a4 c3 0f 1f 80 00 00 00 00 48 89 f8 48 83 fa 20 72 7e 40 38 fe [ 5590.803054] RSP: 0018:ffffc90003a8fdf0 EFLAGS: 00010282 [ 5590.803057] RAX: ffff888107ee9000 RBX: ffff888108cb1a00 RCX: 0000000000000f8f [ 5590.803061] RDX: 0000000000001000 RSI: ffffffffa0b0e000 RDI: ffff888107ee9071 [ 5590.803065] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001 [ 5590.803069] R10: 0000000000000001 R11: 0000000000000002 R12: 0000000000000019 [ 5590.803073] R13: 0000000000174fff R14: 0000000000001000 R15: ffff888107ee9000 [ 5590.803077] FS: 00007f62a99bee80(0000) GS:ffff88849f880000(0000) knlGS:0000000000000000 [ 5590.803082] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 5590.803085] CR2: ffffffffa0b0e000 CR3: 000000010a1a8004 CR4: 0000000000770ee0 [ 5590.803089] PKRU: 55555554 [ 5590.803091] Call Trace: [ 5590.803093] [ 5590.803096] error_state_read+0xa1/0xd0 [i915] [ 5590.803175] kernfs_fop_read_iter+0xb2/0x1b0 [ 5590.803180] new_sync_read+0x116/0x1a0 [ 5590.803185] vfs_read+0x114/0x1b0 [ 5590.803189] ksys_read+0x63/0xe0 [ 5590.803193] do_syscall_64+0x38/0xc0 [ 5590.803197] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 5590.803201] RIP: 0033:0x7f62aaea5912 [ 5590.803204] Code: c0 e9 b2 fe ff ff 50 48 8d 3d 5a b9 0c 00 e8 05 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 [ 5590.803213] RSP: 002b:00007fff5b659ae8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [ 5590.803218] RAX: ffffffffffffffda RBX: 0000000000100000 RCX: 00007f62aaea5912 [ 5590.803221] RDX: 000000000008b000 RSI: 00007f62a8c4000f RDI: 0000000000000006 [ 5590.803225] RBP: 00007f62a8bcb00f R08: 0000000000200010 R09: 0000000000101000 [ 5590.803229] R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000006 [ 5590.803233] R13: 0000000000075000 R14: 00007f62a8acb010 R15: 0000000000200000 [ 5590.803238] [ 5590.803240] Modules linked in: i915 ttm drm_buddy drm_dp_helper drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops prime_numbers nfnetlink br_netfilter overlay mei_pxp mei_hdcp x86_pkg_temp_thermal coretemp kvm_intel snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core snd_pcm mei_me mei fuse ip_tables x_tables crct10dif_pclmul e1000e crc32_pclmul ptp i2c_i801 ghash_clmulni_intel i2c_smbus pps_core [last unloa ded: ttm] [ 5590.803277] CR2: ffffffffa0b0e000 [ 5590.803280] ---[ end trace 0000000000000000 ]--- Fixes: 0e39037b3165 ("drm/i915: Cache the error string") Signed-off-by: Alan Previn Reviewed-by: John Harrison Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20220311004311.514198-2-alan.previn.teres.alexis@intel.com drivers/gpu/drm/i915/i915_sysfs.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 16e214d4aef2d600ef94e845530a28ce795b8fcc Author: Matt Roper Date: Tue May 24 16:59:06 2022 -0700 drm/i915/hwconfig: Future-proof platform checks PVC also has a hwconfig table. Actually the current expectation is that all future platforms will have hwconfig, so let's just change the condition to an IP version check so that we don't need to keep updating this for each new platform that shows up. Cc: John Harrison Cc: Radhakrishna Sripada Signed-off-by: Matt Roper Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20220524235906.529771-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e31372492904415e425430402453a192e2c6519f Author: André Almeida Date: Sat May 21 16:13:42 2022 -0300 drm/vkms: Update vkms_composer_worker documentation Since commit ba420afab565 ("drm/vkms: Bugfix racing hrtimer vblank handle") the work is scheduled at vkms_vblank_simulate() and since commit 5ef8100a3919 ("drm/vkms: flush crc workers earlier in commit flow") the work is flushed at vkms_atomic_commit_tail(). Update function commment to reflect that. Signed-off-by: André Almeida Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220521191342.23520-1-andrealmeid@igalia.com drivers/gpu/drm/vkms/vkms_composer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b981cc333ff06cb23c7968007965e79c80f5df97 Author: Niels Dossche Date: Sun May 22 01:41:04 2022 +0200 drm: use ENOMEM for drmm_kzalloc allocation failures Other callers of drmm_kzalloc already return -ENOMEM on allocation failure. Change EINVAL to ENOMEM for consistency. Signed-off-by: Niels Dossche Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220521234104.88410-1-dossche.niels@gmail.com drivers/gpu/drm/drm_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edd34368c4c3b45b1386b15f78b2229420f8c6d4 Author: Vandita Kulkarni Date: Wed May 25 13:34:01 2022 +0530 drm/i915/dg2: Support 4k@30 on HDMI This patch adds a fix to support 297MHz of dot clock by calculating the pll values using synopsis algorithm. This will help to support 4k@30 mode for HDMI monitors on DG2. v2: As per the algorithm, set MPLLB VCO range control bits to 3, in register SNPS_PHY_MPLLB_DIV for 297Mhz. (Matt) v3: Fix typo. (Ankit) Signed-off-by: Vandita Kulkarni Signed-off-by: Ankit Nautiyal Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220525080401.1253511-1-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_snps_phy.c | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 85165781c5d900d97052be1d2723f6929d56768d Author: Sean Christopherson Date: Fri Apr 29 21:00:25 2022 +0000 KVM: Do not pin pages tracked by gfn=>pfn caches Put the reference to any struct page mapped/tracked by a gfn=>pfn cache upon inserting the pfn into its associated cache, as opposed to putting the reference only when the cache is done using the pfn. In other words, don't pin pages while they're in the cache. One of the major roles of the gfn=>pfn cache is to play nicely with invalidation events, i.e. it exists in large part so that KVM doesn't rely on pinning pages. Signed-off-by: Sean Christopherson Message-Id: <20220429210025.3293691-9-seanjc@google.com> Signed-off-by: Paolo Bonzini virt/kvm/pfncache.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit 58cd407ca4c6278cf9f9d09a2e663bf645b0c982 Author: Sean Christopherson Date: Fri Apr 29 21:00:24 2022 +0000 KVM: Fix multiple races in gfn=>pfn cache refresh Rework the gfn=>pfn cache (gpc) refresh logic to address multiple races between the cache itself, and between the cache and mmu_notifier events. The existing refresh code attempts to guard against races with the mmu_notifier by speculatively marking the cache valid, and then marking it invalid if a mmu_notifier invalidation occurs. That handles the case where an invalidation occurs between dropping and re-acquiring gpc->lock, but it doesn't handle the scenario where the cache is refreshed after the cache was invalidated by the notifier, but before the notifier elevates mmu_notifier_count. The gpc refresh can't use the "retry" helper as its invalidation occurs _before_ mmu_notifier_count is elevated and before mmu_notifier_range_start is set/updated. CPU0 CPU1 ---- ---- gfn_to_pfn_cache_invalidate_start() | -> gpc->valid = false; kvm_gfn_to_pfn_cache_refresh() | |-> gpc->valid = true; hva_to_pfn_retry() | -> acquire kvm->mmu_lock kvm->mmu_notifier_count == 0 mmu_seq == kvm->mmu_notifier_seq drop kvm->mmu_lock return pfn 'X' acquire kvm->mmu_lock kvm_inc_notifier_count() drop kvm->mmu_lock() kernel frees pfn 'X' kvm_gfn_to_pfn_cache_check() | |-> gpc->valid == true caller accesses freed pfn 'X' Key off of mn_active_invalidate_count to detect that a pfncache refresh needs to wait for an in-progress mmu_notifier invalidation. While mn_active_invalidate_count is not guaranteed to be stable, it is guaranteed to be elevated prior to an invalidation acquiring gpc->lock, so either the refresh will see an active invalidation and wait, or the invalidation will run after the refresh completes. Speculatively marking the cache valid is itself flawed, as a concurrent kvm_gfn_to_pfn_cache_check() would see a valid cache with stale pfn/khva values. The KVM Xen use case explicitly allows/wants multiple users; even though the caches are allocated per vCPU, __kvm_xen_has_interrupt() can read a different vCPU (or vCPUs). Address this race by invalidating the cache prior to dropping gpc->lock (this is made possible by fixing the above mmu_notifier race). Complicating all of this is the fact that both the hva=>pfn resolution and mapping of the kernel address can sleep, i.e. must be done outside of gpc->lock. Fix the above races in one fell swoop, trying to fix each individual race is largely pointless and essentially impossible to test, e.g. closing one hole just shifts the focus to the other hole. Fixes: 982ed0de4753 ("KVM: Reinstate gfn_to_pfn_cache with invalidation support") Cc: stable@vger.kernel.org Cc: David Woodhouse Cc: Mingwei Zhang Signed-off-by: Sean Christopherson Message-Id: <20220429210025.3293691-8-seanjc@google.com> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 9 +++ virt/kvm/pfncache.c | 193 +++++++++++++++++++++++++++++++++------------------- 2 files changed, 131 insertions(+), 71 deletions(-) commit 93984f19e7bce4c18084a6ef3dacafb155b806ed Author: Sean Christopherson Date: Fri Apr 29 21:00:23 2022 +0000 KVM: Fully serialize gfn=>pfn cache refresh via mutex Protect gfn=>pfn cache refresh with a mutex to fully serialize refreshes. The refresh logic doesn't protect against - concurrent unmaps, or refreshes with different GPAs (which may or may not happen in practice, for example if a cache is only used under vcpu->mutex; but it's allowed in the code) - a false negative on the memslot generation. If the first refresh sees a stale memslot generation, it will refresh the hva and generation before moving on to the hva=>pfn translation. If it then drops gpc->lock, a different user of the cache can come along, acquire gpc->lock, see that the memslot generation is fresh, and skip the hva=>pfn update due to the userspace address also matching (because it too was updated). The refresh path can already sleep during hva=>pfn resolution, so wrap the refresh with a mutex to ensure that any given refresh runs to completion before other callers can start their refresh. Cc: stable@vger.kernel.org Cc: Lai Jiangshan Signed-off-by: Sean Christopherson Message-Id: <20220429210025.3293691-7-seanjc@google.com> Signed-off-by: Paolo Bonzini include/linux/kvm_types.h | 2 ++ virt/kvm/pfncache.c | 12 ++++++++++++ 2 files changed, 14 insertions(+) commit 3ba2c95ea180740b16281fa43a3ee5f47279c0ed Author: Sean Christopherson Date: Fri Apr 29 21:00:22 2022 +0000 KVM: Do not incorporate page offset into gfn=>pfn cache user address Don't adjust the userspace address in the gfn=>pfn cache by the page offset from the gpa. KVM should never use the user address directly, and all KVM operations that translate a user address to something else require the user address to be page aligned. Ignoring the offset will allow the cache to reuse a gfn=>hva translation in the unlikely event that the page offset of the gpa changes, but the gfn does not. And more importantly, not having to (un)adjust the user address will simplify a future bug fix. Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20220429210025.3293691-6-seanjc@google.com> Signed-off-by: Paolo Bonzini virt/kvm/pfncache.c | 2 -- 1 file changed, 2 deletions(-) commit 3dddf65b4f4c451c345d34ae85bdf1791a746e49 Author: Sean Christopherson Date: Fri Apr 29 21:00:21 2022 +0000 KVM: Put the extra pfn reference when reusing a pfn in the gpc cache Put the struct page reference to pfn acquired by hva_to_pfn() when the old and new pfns for a gfn=>pfn cache match. The cache already has a reference via the old/current pfn, and will only put one reference when the cache is done with the pfn. Fixes: 982ed0de4753 ("KVM: Reinstate gfn_to_pfn_cache with invalidation support") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20220429210025.3293691-5-seanjc@google.com> Signed-off-by: Paolo Bonzini virt/kvm/pfncache.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 345b0fd6fe5f66dfe841bad0b39dd11a5672df68 Author: Sean Christopherson Date: Fri Apr 29 21:00:20 2022 +0000 KVM: Drop unused @gpa param from gfn=>pfn cache's __release_gpc() helper Drop the @pga param from __release_gpc() and rename the helper to make it more obvious that the cache itself is not being released. The helper will be reused by a future commit to release a pfn+khva combination that is _never_ associated with the cache, at which point the current name would go from slightly misleading to blatantly wrong. No functional change intended. Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20220429210025.3293691-4-seanjc@google.com> Signed-off-by: Paolo Bonzini virt/kvm/pfncache.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 0471a7bd1bca2a47a5f378f2222c5cf39ce94152 Author: Lev Kujawski Date: Sat May 21 08:15:11 2022 +0000 KVM: set_msr_mce: Permit guests to ignore single-bit ECC errors Certain guest operating systems (e.g., UNIXWARE) clear bit 0 of MC1_CTL to ignore single-bit ECC data errors. Single-bit ECC data errors are always correctable and thus are safe to ignore because they are informational in nature rather than signaling a loss of data integrity. Prior to this patch, these guests would crash upon writing MC1_CTL, with resultant error messages like the following: error: kvm run failed Operation not permitted EAX=fffffffe EBX=fffffffe ECX=00000404 EDX=ffffffff ESI=ffffffff EDI=00000001 EBP=fffdaba4 ESP=fffdab20 EIP=c01333a5 EFL=00000246 [---Z-P-] CPL=0 II=0 A20=1 SMM=0 HLT=0 ES =0108 00000000 ffffffff 00c09300 DPL=0 DS [-WA] CS =0100 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA] SS =0108 00000000 ffffffff 00c09300 DPL=0 DS [-WA] DS =0108 00000000 ffffffff 00c09300 DPL=0 DS [-WA] FS =0000 00000000 ffffffff 00c00000 GS =0000 00000000 ffffffff 00c00000 LDT=0118 c1026390 00000047 00008200 DPL=0 LDT TR =0110 ffff5af0 00000067 00008b00 DPL=0 TSS32-busy GDT= ffff5020 000002cf IDT= ffff52f0 000007ff CR0=8001003b CR2=00000000 CR3=0100a000 CR4=00000230 DR0=00000000 DR1=00000000 DR2=00000000 DR3=00000000 DR6=ffff0ff0 DR7=00000400 EFER=0000000000000000 Code=08 89 01 89 51 04 c3 8b 4c 24 08 8b 01 8b 51 04 8b 4c 24 04 <0f> 30 c3 f7 05 a4 6d ff ff 10 00 00 00 74 03 0f 31 c3 33 c0 33 d2 c3 8d 74 26 00 0f 31 c3 Signed-off-by: Lev Kujawski Message-Id: <20220521081511.187388-1-lkujaw@member.fsf.org> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit cc07e60b0811eeeca769fb342aa6e13da5977657 Author: Jim Mattson Date: Tue May 10 15:40:35 2022 -0700 KVM: VMX: Print VM-instruction error as unsigned Change the printf format character from 'd' to 'u' for the VM-instruction error in vmwrite_error(). Fixes: 6aa8b732ca01 ("[PATCH] kvm: userspace interface") Reported-by: Sean Christopherson Signed-off-by: Jim Mattson Message-Id: <20220510224035.1792952-2-jmattson@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e39efd840b8d4eae5ab398b43e20ffaff0010cc Author: David Matlack Date: Tue May 10 15:40:34 2022 -0700 KVM: VMX: Print VM-instruction error when it may be helpful Include the value of the "VM-instruction error" field from the current VMCS (if any) in the error message for VMCLEAR and VMPTRLD, since each of these instructions may result in more than one VM-instruction error. Previously, this field was only reported for VMWRITE errors. Signed-off-by: David Matlack [Rebased and refactored code; dropped the error number for INVVPID and INVEPT; reworded commit message.] Signed-off-by: Jim Mattson Message-Id: <20220510224035.1792952-1-jmattson@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a2106f38077e78afcb4bf98fdda3e162118cfb3d Author: Miaoqian Lin Date: Tue May 24 10:57:29 2022 +0400 meson-mx-socinfo: Fix refcount leak in meson_mx_socinfo_init of_find_matching_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: 5e68c0fc8df8 ("soc: amlogic: Add Meson6/Meson8/Meson8b/Meson8m2 SoC Information driver") Signed-off-by: Miaoqian Lin Reviewed-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20220524065729.33689-1-linmq006@gmail.com drivers/soc/amlogic/meson-mx-socinfo.c | 1 + 1 file changed, 1 insertion(+) commit 837c72b23a57e15dd363d5f3f3f268c49c128740 Author: Balasubramani Vivekanandan Date: Mon May 23 13:21:16 2022 +0530 drm/i915/hwconfig: Report no hwconfig support on ADL-N ADL-N being a subplatform of ADL-P, it lacks support for hwconfig table. Explicit check added to skip ADL-N. Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matt Roper Reviewed-by: Andrzej Hajda Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220523075116.207677-1-balasubramani.vivekanandan@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a67664860f7833015a683ea295f7c79ac2901332 Author: Gao Chao Date: Tue May 24 10:45:51 2022 +0800 drm/panel: Fix build error when CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=y && CONFIG_DRM_DISPLAY_HELPER=m If CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=y && CONFIG_DRM_DISPLAY_HELPER=m, bulding fails: drivers/gpu/drm/panel/panel-samsung-atna33xc20.o: In function `atana33xc20_probe': panel-samsung-atna33xc20.c:(.text+0x744): undefined reference to `drm_panel_dp_aux_backlight' make: *** [vmlinux] Error 1 Let CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 select DRM_DISPLAY_DP_HELPER and CONFIG_DRM_DISPLAY_HELPER to fix this error. Fixes: 32ce3b320343 ("drm/panel: atna33xc20: Introduce the Samsung ATNA33XC20 panel") Reported-by: Hulk Robot Signed-off-by: Gao Chao Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20220524024551.539-1-gaochao49@huawei.com drivers/gpu/drm/panel/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit a4f263f46961b1229b10ca3a98f0be618a9d47ac Author: Daniele Ceraolo Spurio Date: Tue May 10 23:02:28 2022 -0700 drm/i915/guc: XEHPSDV and PVC do not use HuC Disable HuC loading since it is not used on these platforms. Cc: Stuart Summers Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Matt Roper Reviewed-by: Matt Atwood Link: https://patchwork.freedesktop.org/patch/msgid/20220511060228.1179450-6-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/uc/intel_uc.c | 4 ++++ 1 file changed, 4 insertions(+) commit e41388d508a50ddb2be5c2676f1992353ca2f155 Author: Matt Roper Date: Tue May 10 23:02:27 2022 -0700 drm/i915/pvc: Add new BCS engines to GuC engine list Initialize ADS system info to reflect the availability of new BCS engines Original-author: CQ Tang Cc: Stuart Summers Cc: John Harrison Signed-off-by: Matt Roper Reviewed-by: Matt Atwood Link: https://patchwork.freedesktop.org/patch/msgid/20220511060228.1179450-5-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit 1eb31338994889ac34c4f841e5d54bf10111741b Author: Stuart Summers Date: Tue May 10 23:02:26 2022 -0700 drm/i915/pvc: Remove additional 3D flags from PIPE_CONTROL Although we already strip 3D-specific flags from PIPE_CONTROL instructions when submitting to a compute engine, there are some additional flags that need to be removed when the platform as a whole lacks a 3D pipeline. Add those restrictions here. v2: - Replace LACKS_3D_PIPELINE checks with !HAS_3D_PIPELINE and add has_3d_pipeline to all platforms except PVC. (Lucas) Bspec: 47112 Cc: Lucas De Marchi Signed-off-by: Stuart Summers Signed-off-by: Matt Roper Reviewed-by: Matt Atwood Link: https://patchwork.freedesktop.org/patch/msgid/20220511060228.1179450-4-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 18 ++++++++++++------ drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 15 +++++++++++++-- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_pci.c | 10 ++++++++++ drivers/gpu/drm/i915/intel_device_info.h | 1 + 5 files changed, 38 insertions(+), 8 deletions(-) commit fb289464f695f9d913479b4ebae9e39b057f8531 Author: Matt Roper Date: Tue May 10 23:02:25 2022 -0700 drm/i915/pvc: Add forcewake support Add PVC's forcewake ranges. v2: - Drop replicated comment completely; move general cleanup of the documentation to a separate patch. Bspec: 67609 Cc: Daniele Ceraolo Spurio Cc: Stuart Summers Signed-off-by: Matt Roper Reviewed-by: Matt Atwood Link: https://patchwork.freedesktop.org/patch/msgid/20220511060228.1179450-3-matthew.d.roper@intel.com drivers/gpu/drm/i915/intel_uncore.c | 142 +++++++++++++++++++++++++- drivers/gpu/drm/i915/selftests/intel_uncore.c | 2 + 2 files changed, 143 insertions(+), 1 deletion(-) commit d32e8ed918ba7384fda9055ebb31b89b3eadb517 Author: Matt Roper Date: Tue May 10 23:02:24 2022 -0700 drm/i915/uncore: Reorganize and document shadow and forcewake tables Let's reorganize some of the forcewake/shadow handling in intel_uncore.c and consolidate the cargo-cult comments on each table into more general comments that apply to all tables. We'll probably move forcewake handling to its own dedicated file in the near future and further enhance this with true kerneldoc. But this is a good intermediate step to help clarify the behavior a bit. Cc: Stuart Summers Signed-off-by: Matt Roper Reviewed-by: Matt Atwood Link: https://patchwork.freedesktop.org/patch/msgid/20220511060228.1179450-2-matthew.d.roper@intel.com drivers/gpu/drm/i915/intel_uncore.c | 124 +++++++++++++++++++++++------------- 1 file changed, 79 insertions(+), 45 deletions(-) commit 8ae664907916eba9a9d56296bed684c27318a872 Author: Julia Lawall Date: Sat May 21 13:11:40 2022 +0200 drm/i915: fix typos in comments Spelling mistakes (triple letters) in comments. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220521111145.81697-90-Julia.Lawall@inria.fr drivers/gpu/drm/i915/display/intel_color.c | 2 +- drivers/gpu/drm/i915/display/intel_pps.c | 2 +- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 2 +- drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit d63ddca7c58132257fd01e3a4feca41b3bac3089 Author: Bommu Krishnaiah Date: Mon May 16 10:20:15 2022 +0200 drm/i915: Update tiled blits selftest Update the selftest to include Tile 4 mode and switch to Tile 4 on platforms that supports Tile 4 but no Tile Y and vice versa. Also switch to XY_FAST_COPY_BLT on platforms that supports it. v4: update commit message to reflect the code changes properly. v3: add a function to find X-tile availability for a platform. v2: disable Tile X for iGPU in fastblit and fix checkpath --strict warnings. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5879 Signed-off-by: Bommu Krishnaiah Co-developed-by: Nirmoy Das Signed-off-by: Nirmoy Das Reviewed-by: Zbigniew Kempczyński Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220516082015.32020-1-nirmoy.das@intel.com .../drm/i915/gem/selftests/i915_gem_client_blt.c | 250 +++++++++++++++++---- drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 22 ++ 2 files changed, 227 insertions(+), 45 deletions(-) commit 1a3b1ea111c44d9dce9f70ba032531a223395a15 Author: Guo Zhengkui Date: Thu May 19 15:29:48 2022 +0800 drm/nouveau/tegra: remove needless NULL check There has already been NULL check in clk_prepare_enable() and clk_disable_unprepare(), so remove needless NULL check before calling them. Signed-off-by: Guo Zhengkui Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220519072950.128268-1-guozhengkui@vivo.com drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit e4f21d1436519fec3e181082c8e1c3fb00ec08a7 Author: Julia Lawall Date: Sat May 21 13:11:07 2022 +0200 drm/nouveau/mmu: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Reviewed-by: Lyude Paul [also fix double space] Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220521111145.81697-57-Julia.Lawall@inria.fr drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b03816f869529393b37d03e5d75b68f7365a7a4 Author: Mark Menzynski Date: Mon May 23 13:35:41 2022 +0200 drm/nouveau: clear output poll workers before nouveau_fbcon_destroy() Resources needed for output poll workers are destroyed in nouveau_fbcon_fini() before output poll workers are cleared in nouveau_display_fini(). This means there is a time between fbcon_fini() and display_fini(), where if output poll happens, it crashes. This patch introduces another output poll clearing before fbcon resources are destroyed. BUG: KASAN: use-after-free in __drm_fb_helper_initial_config_and_unlock.cold+0x1f3/0x291 [drm_kms_helper] Cc: Ben Skeggs Cc: Karol Herbst Cc: Lyude Paul Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Mark Menzynski Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220523113541.10562-1-mmenzyns@redhat.com drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 ++ 1 file changed, 2 insertions(+) commit 8e71a4a8156a9f3fa27088dc59e852693713d94f Author: Robert Foss Date: Mon May 23 18:15:20 2022 +0200 Revert "dt-bindings:drm/bridge:anx7625: add port@0 property" This reverts commit 7328736d270aa4fa6fcd033ade02acc2874a2db5. This patch depends on the patches just aplied to the media tree, and will not build without them, which leaves drm-misc-next in a broken state. Let's revert the two latter patches until rc1 has been branched, and rc1 has been backmerged into drm-misc-next. Signed-off-by: Robert Foss Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220523161520.354687-2-robert.foss@linaro.org .../bindings/display/bridge/analogix,anx7625.yaml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) commit 61922beba36adea8702fe8069b309c806f6608af Author: Robert Foss Date: Mon May 23 18:15:19 2022 +0200 Revert "drm/bridge: anx7625: Use DPI bus type" This reverts commit a77c2af0994e24ee36c7ffb6dc852770bdf06fb1. This patch depends on the patches just aplied to the media tree, and will not build without them, which leaves drm-misc-next in a broken state. Let's revert the two latter patches until rc1 has been branched, and rc1 has been backmerged into drm-misc-next. Signed-off-by: Robert Foss Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220523161520.354687-1-robert.foss@linaro.org drivers/gpu/drm/bridge/analogix/anx7625.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 991dcb89caeb1b9bf714b382e23d3f6d8016e744 Author: Imre Deak Date: Sat May 21 16:08:08 2022 +0300 drm/i915/d12+: Disable DMC firmware flip queue handlers Based on a bspec update the DMC firmware's flip queue handling events need to be disabled before enabling DC5/6. i915 doesn't use the flip queue feature atm, so disable it already after loading the firmware. This removes some overhead of the event handler which runs at a 1 kHz frequency. Bspec: 49193, 72486, 72487 v2: - Fix the DMC pipe A register offsets for GEN12. - Disable the events on DG2 only on pipe A..D . v3: (Lucas) - Add TODO: to clarify the disabling sequence on all D13+ - s/intel_dmc_has_fw_payload/has_dmc_id_fw/ - s/simple_flipq/flipq/ - s/_GEN12,_GEN13/TGL_,ADLP_/ - s/MAINDMC/DMC/ v4: - Only disable flip queues on TGL/DG2, as on other platforms the corresponding event handlers don't exist. Signed-off-by: Imre Deak Reviewed-by: Anusha Srivatsa # v1 Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20220521130808.637449-1-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_dmc.c | 93 ++++++++++++++++++++++++++- drivers/gpu/drm/i915/display/intel_dmc_regs.h | 41 ++++++++++++ 2 files changed, 133 insertions(+), 1 deletion(-) commit 39b1bc4b5bcccac781267bb826b035fbb99c8b9d Author: Ville Syrjälä Date: Thu May 19 17:00:10 2022 +0300 drm/i915: Rename block_size()/block_offset() Give block_size()/block_offset() a "raw_" prefix since they both operate on the "raw" (as in not duplicated) BDB block contents. What actually spurred this was a conflict between intel_bios.c block_size() vs. block_size() from blkdev.h. That only happened to me on a custom tree where we somehow manage to include blkdev.h into intel_bios.c. But I think the rename makes sense anyway to clarify the purpose of these functions. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220519140010.10600-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_bios.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9ad6f181ad9a19a26bda73a7b199df44ccfcdaba Author: Javier Martinez Canillas Date: Fri May 20 11:16:02 2022 +0200 drm/st7735r: Fix module autoloading for Okaya RH128128T The SPI core always reports a "MODALIAS=spi:", even if the device was registered via OF. This means that the st7735r.ko module won't autoload if a DT has a node with a compatible "okaya,rh128128t" string. In that case, kmod expects a "MODALIAS=of:N*T*Cokaya,rh128128t" uevent but instead will get a "MODALIAS=spi:rh128128t", which is not present in the list of aliases: $ modinfo drivers/gpu/drm/tiny/st7735r.ko | grep alias alias: of:N*T*Cokaya,rh128128tC* alias: of:N*T*Cokaya,rh128128t alias: of:N*T*Cjianda,jd-t18003-t01C* alias: of:N*T*Cjianda,jd-t18003-t01 alias: spi:jd-t18003-t01 To workaround this issue, add in the SPI table an entry for that device. Fixes: d1d511d516f7 ("drm: tiny: st7735r: Add support for Okaya RH128128T") Signed-off-by: Javier Martinez Canillas Reviewed-by: Geert Uytterhoeven Acked-by: David Lechner Link: https://patchwork.freedesktop.org/patch/msgid/20220520091602.179078-1-javierm@redhat.com drivers/gpu/drm/tiny/st7735r.c | 1 + 1 file changed, 1 insertion(+) commit 649eb3828fb22e829e222ebd83f4e11dc503a565 Author: John Stultz Date: Wed May 11 01:26:12 2022 +0000 drm/bridge: lt9611: Use both bits for HDMI sensing In commit 19cf41b64e3b ("lontium-lt9611: check a different register bit for HDMI sensing"), the bit flag used to detect HDMI cable connect was switched from BIT(2) to BIT(0) to improve compatibility with some monitors that didn't seem to set BIT(2). However, with that change, I've seen occasional issues where the detection failed, because BIT(2) was set, but not BIT(0). Unfortunately, as I understand it, the bits and their function was never clearly documented. So lets instead check both (BIT(2) | BIT(0)) when checking the register. Cc: Yongqin Liu Cc: Amit Pundir Cc: Peter Collingbourne Cc: Vinod Koul Cc: Bjorn Andersson Cc: Robert Foss Cc: kernel-team@android.com Fixes: 19cf41b64e3b ("lontium-lt9611: check a different register bit for HDMI sensing") Signed-off-by: John Stultz Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220511012612.3297577-2-jstultz@google.com drivers/gpu/drm/bridge/lontium-lt9611.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ff72d434b40d221e2583fab5e1203031d05c059 Author: John Stultz Date: Wed May 11 01:26:11 2022 +0000 drm/bridge: lt9611: Consolidate detection logic This patch simply consolidates the duplicated detection functionality in the driver. Cc: Yongqin Liu Cc: Amit Pundir Cc: Peter Collingbourne Cc: Vinod Koul Cc: Bjorn Andersson Cc: Robert Foss Cc: kernel-team@android.com Reviewed-by: Robert Foss Signed-off-by: John Stultz Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220511012612.3297577-1-jstultz@google.com drivers/gpu/drm/bridge/lontium-lt9611.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 670c87fd169518eb4f15030c63f6c1b4ddf18bfb Author: Marek Vasut Date: Thu May 19 13:23:37 2022 +0200 drm/bridge: anx7625: Add missing of_node_put for endpoint Add of_node_put call on the endpoint node after it is not needed. Signed-off-by: Marek Vasut Cc: Alex Deucher Cc: Javier Martinez Canillas Cc: Lyude Paul Cc: Thomas Zimmermann Cc: Xin Ji Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220519112337.62198-1-marex@denx.de drivers/gpu/drm/bridge/analogix/anx7625.c | 1 + 1 file changed, 1 insertion(+) commit 2ba5b683260e13d8f2c43bc594d5ae15ec7f7a04 Author: Marek Vasut Date: Thu May 19 01:38:44 2022 +0200 drm/bridge: ti-sn65dsi83: Handle dsi_lanes == 0 as invalid Handle empty data-lanes = < >; property, which translates to dsi_lanes = 0 as invalid. Fixes: ceb515ba29ba6 ("drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 driver") Signed-off-by: Marek Vasut Cc: Jonas Karlman Cc: Laurent Pinchart Cc: Lucas Stach Cc: Marek Vasut Cc: Maxime Ripard Cc: Neil Armstrong Cc: Robert Foss Cc: Sam Ravnborg Reviewed-by: Andrzej Hajda Reviewed-by: Lucas Stach Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220518233844.248504-1-marex@denx.de drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ec5c0006c50cb1909c0de0fad137909c1218990 Merge: 39921e5f00f5 5f38c3fb55ce Author: Tvrtko Ursulin Date: Mon May 23 09:34:47 2022 +0100 Merge tag 'drm-intel-next-2022-05-20' of git://anongit.freedesktop.org/drm/drm-intel into drm-intel-gt-next drm/i915 drm-intel-next -> drm-intel-gt-next cross-merge sync Signed-off-by: Tvrtko Ursulin # Conflicts: # drivers/gpu/drm/i915/gt/intel_rps.c # drivers/gpu/drm/i915/i915_vma.c From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87y1ywbh5y.fsf@intel.com commit 4cd79f614b501e496ee8e4181d528c0cc1cb4e18 Author: Bhanuprakash Modem Date: Thu May 19 15:21:49 2022 +0530 drm/amd/display: Move connector debugfs to drm As drm_connector already have the display_info, instead of creating "output_bpc" debugfs in vendor specific driver, move the logic to the drm layer. This patch will also move "Current" bpc to the crtc debugfs from connector debugfs, since we are getting this info from crtc_state. Cc: Harry Wentland Cc: Rodrigo Siqueira Signed-off-by: Bhanuprakash Modem Reported-by: kernel test robot Reviewed-by: Arun R Murthy Reviewed-by: Harry Wentland Acked-by: Harry Wentland Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220519095149.3560034-4-bhanuprakash.modem@intel.com drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 38 ++++++++-------------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h | 2 -- 3 files changed, 13 insertions(+), 31 deletions(-) commit fa373eb2190115ef2c3597f89c12350d0a250eb0 Author: Bhanuprakash Modem Date: Thu May 19 15:21:48 2022 +0530 drm/i915/display/debug: Expose crtc current bpc via debugfs This new debugfs will expose the currently using bpc by crtc. It is very useful for verifying whether we enter the correct output color depth from IGT. This patch will also add the connector's max supported bpc to "i915_display_info" debugfs. Example: cat /sys/kernel/debug/dri/0/crtc-0/i915_current_bpc Current: 8 Cc: Jani Nikula Cc: Ville Syrjälä Cc: Uma Shankar Signed-off-by: Bhanuprakash Modem Reviewed-by: Arun R Murthy Acked-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220519095149.3560034-3-bhanuprakash.modem@intel.com .../gpu/drm/i915/display/intel_display_debugfs.c | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 67d935b4713988d0a41097439c0c2d74f240b204 Author: Bhanuprakash Modem Date: Thu May 19 15:21:47 2022 +0530 drm/debug: Expose connector's max supported bpc via debugfs It's useful to know the connector's max supported bpc for IGT testing. Expose it via a debugfs file on the connector "output_bpc". Example: cat /sys/kernel/debug/dri/0/DP-1/output_bpc V2: * Fix typo in comments (Harry) Cc: Jani Nikula Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: Bhanuprakash Modem Reviewed-by: Arun R Murthy Reviewed-by: Harry Wentland Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220519095149.3560034-2-bhanuprakash.modem@intel.com drivers/gpu/drm/drm_debugfs.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 08c59dde71b73a0ac94e3ed2d431345b01f20485 Author: Jani Nikula Date: Fri May 20 12:46:00 2022 +0300 drm/i915/dsi: fix VBT send packet port selection for ICL+ The VBT send packet port selection was never updated for ICL+ where the 2nd link is on port B instead of port C as in VLV+ DSI. First, single link DSI needs to use the configured port instead of relying on the VBT sequence block port. Remove the hard-coded port C check here and make it generic. For reference, see commit f915084edc5a ("drm/i915: Changes related to the sequence port no for") for the original VLV specific fix. Second, the sequence block port number is either 0 or 1, where 1 indicates the 2nd link. Remove the hard-coded port C here for 2nd link. (This could be a "find second set bit" on DSI ports, but just check the two possible options.) Third, sanity check the result with a warning to avoid a NULL pointer dereference. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5984 Cc: stable@vger.kernel.org # v4.19+ Cc: Ville Syrjala Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220520094600.2066945-1-jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 33 ++++++++++++++++++---------- 1 file changed, 22 insertions(+), 11 deletions(-) commit 2be8afe05833c65017c8c56953f3640acfc42a40 Author: Guo Zhengkui Date: Tue May 17 10:41:06 2022 +0800 ath9k: replace ternary operator with max() Fix the following coccicheck warning: drivers/net/wireless/ath/ath9k/dfs.c:249:28-30: WARNING opportunity for max() Signed-off-by: Guo Zhengkui Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220517024106.77050-1-guozhengkui@vivo.com drivers/net/wireless/ath/ath9k/dfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bebcfd2534a63ab7e7325f5337662bc84ca038b6 Author: Manikanta Pubbisetty Date: Tue May 17 11:22:41 2022 +0530 ath11k: Init hw_params before setting up AHB resources As part of adding the support of WCN6750 to ath11k, bus_params were moved to hw_params and this regressed the initialization of WCN6750. By the time AHB resources are setup for WCN6750, hw_params will not be initialized and therefore initialization for WCN6750 will fail. This is applicable only for WCN6750, no other device is impacted. Fix this by moving the initialization of hw_params before setting up AHB resources. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Fixes: 00402f49d26f ("ath11k: Add support for WCN6750 device") Signed-off-by: Manikanta Pubbisetty Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220517055241.15885-1-quic_mpubbise@quicinc.com drivers/net/wireless/ath/ath11k/ahb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b380d2056ebb7f5af1195ad07a6ce96022d4c552 Author: Guo Zhengkui Date: Tue May 17 10:39:23 2022 +0800 ath5k: replace ternary operator with min() Fix the following coccicheck warning: drivers/net/wireless/ath/ath5k/phy.c:3139:62-63: WARNING opportunity for min() Signed-off-by: Guo Zhengkui Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220517023923.76989-1-guozhengkui@vivo.com drivers/net/wireless/ath/ath5k/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77bbbd5e0ed3b5998a353b0948584faa4f565f0e Author: Baochen Qiang Date: Tue May 17 08:48:44 2022 +0800 ath11k: Fix warning on variable 'sar' dereference before check We are seeing below warning: warn: variable dereferenced before check 'sar' Fix it by moving ahead pointer check on 'sar'. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3 Fixes: 652f69ed9c1b ("ath11k: Add support for SAR") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Baochen Qiang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220517004844.2412660-1-quic_bqiang@quicinc.com drivers/net/wireless/ath/ath11k/mac.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 75a7062e533e309a9ca0812c69f3ac3cefadb8b1 Author: Maxime Bizon Date: Mon May 16 17:23:43 2022 +0200 ath10k: fix misreported tx bandwidth for 160Mhz Because of this missing switch case, 160Mhz transmit was reported as 20Mhz, leading to wrong airtime calculation and AQL limiting max throughput. Tested-on: QCA9984 hw2.0 PCI 10.4-3.10-00047 Signed-off-by: Maxime Bizon Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/cd2735a40da7f4fcc5323e3fca3775e7b5402ece.camel@freebox.fr drivers/net/wireless/ath/ath10k/htt_rx.c | 4 ++++ 1 file changed, 4 insertions(+) commit af6d8265c47e46881b80c6b073f53c8c4af52d28 Author: Sergey Ryazanov Date: Mon May 16 13:26:00 2022 +0300 ath10k: add encapsulation offloading support Frame encapsulation from Ethernet into the IEEE 802.11 frame format takes a considerable host CPU time on the xmit path. The firmware is able to do this operation for us, so enable encapsulation offloading for AP and Sta interface types to improve overall system performance. The driver is almost ready for encapsulation offloading support. There are only a few places where the driver assumes the frame format is IEEE 802.11 that need to be fixed. Encapsulation offloading is currently disabled by default and the driver utilizes mac80211 encapsulation support. To activate offloading, the frame_mode=2 parameter should be passed during module loading. On a QCA9563+QCA9888-based access point in bridged mode, encapsulation offloading increases TCP 16-streams DL throughput from 365 to 396 mbps (+8%) and UDP DL throughput from 436 to 483 mbps (+11%). Tested-on: QCA9888 hw2.0 PCI 10.4-3.9.0.2-00131 Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00157-QCARMSWPZ-1 Signed-off-by: Sergey Ryazanov Tested-by: Oldřich Jedlička # TP-Link Archer C7 v4 & v5 (QCA9563 + QCA9880) Tested-by: Edward Matijevic # TP-Link Archer C2600 (IPQ8064 + QCA9980 10.4.1.00030-1) Tested-by: Edward Matijevic # QCA9377 PCI in Sta mode Tested-by: Zhijun You # NETGEAR R7800 (QCA9984 10.4-3.9.0.2-00159) Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220516032519.29831-5-ryazanov.s.a@gmail.com drivers/net/wireless/ath/ath10k/core.c | 2 +- drivers/net/wireless/ath/ath10k/mac.c | 67 +++++++++++++++++++++++++++------- 2 files changed, 55 insertions(+), 14 deletions(-) commit a09740548275a74b897654b3aca5af589289b57a Author: Sergey Ryazanov Date: Mon May 16 13:26:00 2022 +0300 ath10k: turn rawmode into frame_mode Turn boolean rawmode module param into integer frame_mode param that contains value from ath10k_hw_txrx_mode enum. As earlier the default param value is non-RAW (native Wi-Fi) encapsulation. The param name is selected to be consistent with the similar ath11k param. This is a preparation step for upcoming encapsulation offloading support. Signed-off-by: Sergey Ryazanov Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220516032519.29831-4-ryazanov.s.a@gmail.com drivers/net/wireless/ath/ath10k/core.c | 11 +++++++---- drivers/net/wireless/ath/ath10k/core.h | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) commit 70f119fb82af7f7417dc659faf02c91e1f853739 Author: Sergey Ryazanov Date: Mon May 16 13:26:00 2022 +0300 ath10k: htt_tx: do not interpret Eth frames as WiFi The xmit path for the Ethernet encapsulated frames become more or less usable since d740d8fd2439 ("ath10k: unify tx mode and dispatch"). This change reorganize the xmit path in a manageable way to properly support various tx modes, but misses that the Ethernet encapsulated frame is a special case. We do not have an IEEE 802.11 header at the begining of them. But the HTT Tx handler still interprets first bytes of each frame as an IEEE 802.11 Frame Control field. Than this code was copied by e62ee5c381c5 ("ath10k: Add support for htt_data_tx_desc_64 descriptor") and a2097d6444c3 ("ath10k: htt: High latency TX support") to another handlers. In fact the issue in the high latency (HL) handler was introduced by 83ac260151e7 ("ath10k: add mic bytes for pmf management packet"). Ethernet encapsulated frame tx mode stay unused until 75d85fd9993c ("ath10k: introduce basic tdls functionality") started using it for TDLS frames to avoid key selection issue in some firmwares. Trying to interpret the begining of an Ethernet encapsulated frame as an IEEE 802.11 header was not hurt us noticeably since we need to meet two conditions: (1) xmit should be performed towards a TDLS peer, and (2) the TDLS peer should have a specific OUI part of its MAC address. Looks like that the rareness in TDLS communications of OUIs that can be interpreted as an 802.11 management frame saves users from facing this issue earlier. Improve Ethernet tx mode support in the HTT Tx handler by avoiding interpreting its first bytes as an IEEE 802.11 header. While at it, make the ieee80211_hdr variable local to the code block that is guarded by !is_eth check. In this way, we clarify in which cases a frame can be interpreted as IEEE 802.11, and saves us from similar issues in the future. Credits: this change as part of xmit encapsulation offloading support was originally made by QCA and then submitted for inclusion by John Crispin [1]. But the whole work was not accepted due to the lack of a part for 64-bits descriptors [2]. Zhijun You then pointed this out to me in a reply to my initial RFC patch series. And I made this slightly reworked version that covered all the HTT Tx handler variants. 1. https://lore.kernel.org/all/20191216092207.31032-1-john@phrozen.org/ 2. https://patchwork.kernel.org/project/linux-wireless/patch/20191216092207.31032-1-john@phrozen.org/ Reported-by: Zhijun You Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: John Crispin Signed-off-by: Sergey Ryazanov Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220516032519.29831-3-ryazanov.s.a@gmail.com drivers/net/wireless/ath/ath10k/htt_tx.c | 61 ++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 26 deletions(-) commit 2587d5198aa5adcbd8896aae4a2404dc13d48637 Author: Sergey Ryazanov Date: Wed May 18 10:27:26 2022 +0300 ath10k: improve tx status reporting We use ieee80211_tx_status() to report each completed tx frame. Internally, this function calls sta_info_get_by_addrs(), what has a couple of drawbacks: 1. additional station lookup causes a performance degradation; 2. mac80211 can not properly account Ethernet encapsulated frames due to the inability to properly determine the destination (station) MAC address since ieee80211_tx_status() assumes the frame has a 802.11 header. The latter is especially destructive if we want to use hardware frames encapsulation. To fix both of these issues, replace ieee80211_tx_status() with ieee80211_tx_status_ext() call and feed it station pointer from the tx queue associated with the transmitted frame. Tested-on: QCA9888 hw2.0 PCI 10.4-3.9.0.2-00131 Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00157-QCARMSWPZ-1 Signed-off-by: Sergey Ryazanov Tested-by: Oldřich Jedlička # TP-Link Archer C7 v4 & v5 (QCA9563 + QCA9880) Tested-by: Edward Matijevic # TP-Link Archer C2600 (IPQ8064 + QCA9980 10.4.1.00030-1) Tested-by: Edward Matijevic # QCA9377 PCI in Sta mode Tested-by: Zhijun You # NETGEAR R7800 (QCA9984 10.4-3.9.0.2-00159) Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220516032519.29831-2-ryazanov.s.a@gmail.com drivers/net/wireless/ath/ath10k/txrx.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 1ee6c5abebd3cacf2ac4378d0ed4f57fd4850421 Author: Krzysztof Kozlowski Date: Wed May 18 10:27:26 2022 +0300 ath10k: do not enforce interrupt trigger type Interrupt line can be configured on different hardware in different way, even inverted. Therefore driver should not enforce specific trigger type - edge rising - but instead rely on Devicetree to configure it. All Qualcomm DTSI with WCN3990 define the interrupt type as level high, so the mismatch between DTSI and driver causes rebind issues: $ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/unbind $ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/bind [ 44.763114] irq: type mismatch, failed to map hwirq-446 for interrupt-controller@17a00000! [ 44.763130] ath10k_snoc 18800000.wifi: error -ENXIO: IRQ index 0 not found [ 44.763140] ath10k_snoc 18800000.wifi: failed to initialize resource: -6 Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.2.0.c8-00009-QCAHLSWSC8180XMTPLZ-1 Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.2.0-01387-QCAHLSWMTPLZ-1 Fixes: c963a683e701 ("ath10k: add resource init and deinit for WCN3990") Signed-off-by: Krzysztof Kozlowski Tested-by: Steev Klimaszewski Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220513151516.357549-1-krzysztof.kozlowski@linaro.org drivers/net/wireless/ath/ath10k/snoc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6556551f8848f98eff356c8aacae42c8dd65b2df Author: Borislav Petkov Date: Tue Apr 5 17:15:10 2022 +0200 drm/r128: Fix undefined behavior due to shift overflowing the constant Fix: drivers/gpu/drm/r128/r128_cce.c: In function ‘r128_do_init_cce’: drivers/gpu/drm/r128/r128_cce.c:417:2: error: case label does not reduce to an integer constant case R128_PM4_64BM_64VCBM_64INDBM: ^~~~ drivers/gpu/drm/r128/r128_cce.c:418:2: error: case label does not reduce to an integer constant case R128_PM4_64PIO_64VCPIO_64INDPIO: ^~~~ See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic for the gory details as to why it triggers with older gccs only. Reviewed-by: Randy Dunlap Signed-off-by: Borislav Petkov Cc: David Airlie Cc: Daniel Vetter Cc: Alex Deucher Cc: dri-devel@lists.freedesktop.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220405151517.29753-5-bp@alien8.de drivers/gpu/drm/r128/r128_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0b4c48f3e315d172e4cc06e10f2c8ba180788baf Author: Marek Vasut Date: Fri May 20 14:15:43 2022 +0200 drm/bridge: tc358767: Make sure Refclk clock are enabled The Refclk may be supplied by SoC clock output instead of crystal oscillator, make sure the clock are enabled before any other action is performed with the bridge chip, otherwise it may either fail to operate at all, or miss reset GPIO toggle. Reviewed-by: Lucas Stach Fixes: 7caff0fc4296e ("drm/bridge: tc358767: Add DPI to eDP bridge driver") Signed-off-by: Marek Vasut Cc: Jonas Karlman Cc: Laurent Pinchart Cc: Lucas Stach Cc: Marek Vasut Cc: Maxime Ripard Cc: Neil Armstrong Cc: Robert Foss Cc: Sam Ravnborg Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20220520121543.11550-1-marex@denx.de drivers/gpu/drm/bridge/tc358767.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) commit c1de02bbeca58894c805b3d45c2da4bf30cfc5d9 Author: Marek Vasut Date: Thu May 19 11:51:37 2022 +0200 drm/bridge: tc358767: Report DSI-to-(e)DP as supported The DSI-to-e(DP) mode is now supported, update the driver comment to reflect this. No functional change. Reviewed-by: Andrzej Hajda Reviewed-by: Lucas Stach Fixes: 3080c21a043ab ("drm/bridge: tc358767: Add DSI-to-(e)DP mode support") Signed-off-by: Marek Vasut Cc: Jonas Karlman Cc: Laurent Pinchart Cc: Lucas Stach Cc: Marek Vasut Cc: Maxime Ripard Cc: Neil Armstrong Cc: Robert Foss Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220519095137.11896-2-marex@denx.de drivers/gpu/drm/bridge/tc358767.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 0d662350928e6787d29ab205e47e5aa6f1f792f9 Author: Marek Vasut Date: Thu May 19 11:51:36 2022 +0200 drm/bridge: tc358767: Handle dsi_lanes == 0 as invalid Handle empty data-lanes = < >; property, which translates to dsi_lanes = 0 as invalid. Reviewed-by: Andrzej Hajda Reviewed-by: Lucas Stach Fixes: bbfd3190b6562 ("drm/bridge: tc358767: Add DSI-to-DPI mode support") Signed-off-by: Marek Vasut Cc: Jonas Karlman Cc: Laurent Pinchart Cc: Lucas Stach Cc: Marek Vasut Cc: Maxime Ripard Cc: Neil Armstrong Cc: Robert Foss Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220519095137.11896-1-marex@denx.de drivers/gpu/drm/bridge/tc358767.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39c28cdfb719f0e306b447f0827dfd712f81858b Author: Douglas Anderson Date: Tue May 10 12:29:41 2022 -0700 drm/dp: Export symbol / kerneldoc fixes for DP AUX bus While working on the DP AUX bus code I found a few small things that should be fixed. Namely the non-devm version of of_dp_aux_populate_ep_devices() was missing an export. There was also an extra blank line in a kerneldoc and a kerneldoc that incorrectly documented a return value. Fix these. Fixes: aeb33699fc2c ("drm: Introduce the DP AUX bus") Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20220510122726.v3.1.Ia91f4849adfc5eb9da1eb37ba79aa65fb3c95a0f@changeid drivers/gpu/drm/display/drm_dp_aux_bus.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5f38c3fb55ce3814b4353320d7a205068a420e48 Author: Dale B Stimson Date: Thu May 19 09:57:32 2022 +0100 drm/i915/pcode: Add a couple of pcode helpers Some dGfx pcode commands take additional sub-commands and parameters. Add a couple of helpers to help formatting these commands to improve code readability. v2: Fixed commit author (Rodrigo) v3: Function rename and convert to new uncore interface for pcode functions Remove unnecessary #define's (Andi) v4: Another function rename Cc: Tvrtko Ursulin Signed-off-by: Dale B Stimson Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220519085732.1276255-3-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_pcode.c | 32 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_pcode.h | 6 ++++++ 3 files changed, 41 insertions(+) commit ee421bb4cb9535f44015634baad833dcc98c9062 Author: Ashutosh Dixit Date: Thu May 19 09:57:31 2022 +0100 drm/i915/pcode: Extend pcode functions for multiple gt's Each gt contains an independent instance of pcode. Extend pcode functions to interface with pcode on different gt's. To avoid creating dependency of display functionality on intel_gt, pcode function interfaces are exposed in terms of uncore rather than intel_gt. Callers have been converted to pass in the appropritate (i915 or intel_gt) uncore to the pcode functions. v2: Expose pcode functions in terms of uncore rather than gt (Jani/Rodrigo) v3: Retain previous function names to eliminate needless #defines (Rodrigo) v4: Move out i915_pcode_init() to a separate patch (Tvrtko) Remove duplicated drm_err/drm_dbg from intel_pcode_init() (Tvrtko) Cc: Tvrtko Ursulin Cc: Jani Nikula Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi Reviewed-by: Andi Shyti Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220519085732.1276255-2-tvrtko.ursulin@linux.intel.com [tursulin: fixup merge conflict] drivers/gpu/drm/i915/display/hsw_ips.c | 4 +- drivers/gpu/drm/i915/display/intel_bw.c | 6 +- drivers/gpu/drm/i915/display/intel_cdclk.c | 16 ++--- drivers/gpu/drm/i915/display/intel_display_power.c | 2 +- .../drm/i915/display/intel_display_power_well.c | 4 +- drivers/gpu/drm/i915/display/intel_hdcp.c | 2 +- drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 4 +- drivers/gpu/drm/i915/gt/intel_llc.c | 3 +- drivers/gpu/drm/i915/gt/intel_rc6.c | 4 +- drivers/gpu/drm/i915/gt/intel_rps.c | 5 +- drivers/gpu/drm/i915/gt/selftest_llc.c | 2 +- drivers/gpu/drm/i915/gt/selftest_rps.c | 2 +- drivers/gpu/drm/i915/i915_driver.c | 4 +- drivers/gpu/drm/i915/intel_dram.c | 2 +- drivers/gpu/drm/i915/intel_pcode.c | 69 +++++++++------------- drivers/gpu/drm/i915/intel_pcode.h | 14 ++--- drivers/gpu/drm/i915/intel_pm.c | 10 ++-- 17 files changed, 71 insertions(+), 82 deletions(-) commit 85a040bc9049dd168d5e79a1fa9d2da87e6e52dc Author: Ashutosh Dixit Date: Thu May 19 09:57:30 2022 +0100 drm/i915: Introduce has_media_ratio_mode Media ratio mode (the ability for media IP to work at a different frequency from the GT) is available for a subset of dGfx platforms supporting GuC/SLPC. Introduce 'has_media_ratio_mode' flag in intel_device_info to identify these platforms and set it for XEHPSDV and DG2/ATS-M. Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi Reviewed-by: Andi Shyti Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220519085732.1276255-1-tvrtko.ursulin@linux.intel.com [tursulin: fixup merge conflict] drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_pci.c | 2 ++ drivers/gpu/drm/i915/intel_device_info.h | 1 + 3 files changed, 5 insertions(+) commit 39921e5f00f5a98ff9cb3229937ca339e8d9c9c6 Author: Tvrtko Ursulin Date: Thu May 19 10:08:02 2022 +0100 Revert "drm/i915: Drop has_gt_uc from device info" This reverts commit 222ff6db8a0dcb86f2bb65fc8656aec635a737a6. Signed-off-by: Tvrtko Ursulin Acked-by: Joonas Lahtinen Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220519090802.1294691-8-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/i915_pci.c | 3 +++ drivers/gpu/drm/i915/intel_device_info.h | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) commit fdbec9ff669d83bf863ca7e657af6a9e4c949565 Author: Tvrtko Ursulin Date: Thu May 19 10:08:01 2022 +0100 Revert "drm/i915: Drop has_rc6 from device info" This reverts commit 218076abbcd647de46635d21331a34b814f90906. Signed-off-by: Tvrtko Ursulin Acked-by: Joonas Lahtinen Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220519090802.1294691-7-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 3 +-- drivers/gpu/drm/i915/i915_pci.c | 8 ++++++++ drivers/gpu/drm/i915/intel_device_info.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) commit b409db082da6b76ad2b759a1a48d9402eee4b942 Author: Tvrtko Ursulin Date: Thu May 19 10:08:00 2022 +0100 Revert "drm/i915: Drop has_reset_engine from device info" This reverts commit 922abe4d19bd21b38298f3902674774b92a49293. Signed-off-by: Tvrtko Ursulin Acked-by: Joonas Lahtinen Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220519090802.1294691-6-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/intel_reset.c | 2 +- drivers/gpu/drm/i915/i915_pci.c | 5 +++++ drivers/gpu/drm/i915/intel_device_info.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) commit 3d6c72b7fdd2429ca1d4d690618bf65050380b48 Author: Tvrtko Ursulin Date: Thu May 19 10:07:59 2022 +0100 Revert "drm/i915: Drop has_logical_ring_elsq from device info" This reverts commit b6411373d3954c8fe4617c27f90f773108b0ab03. Signed-off-by: Tvrtko Ursulin Acked-by: Joonas Lahtinen Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220519090802.1294691-5-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_pci.c | 4 +++- drivers/gpu/drm/i915/intel_device_info.h | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) commit 9d8d5a39173244a1394cf84a93447be6f82b361d Author: Tvrtko Ursulin Date: Thu May 19 10:07:58 2022 +0100 Revert "drm/i915: Drop has_ddi from device info" This reverts commit efd01cd3c27636bc4840057a03839e54abaf11dc. Signed-off-by: Tvrtko Ursulin Acked-by: Joonas Lahtinen Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220519090802.1294691-4-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 4 +--- drivers/gpu/drm/i915/i915_pci.c | 3 +++ drivers/gpu/drm/i915/intel_device_info.h | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) commit e91eec9128c2ad9eab9cf9d7c17f8034b6a86c4c Author: Tvrtko Ursulin Date: Thu May 19 10:07:57 2022 +0100 Revert "drm/i915: Drop has_dp_mst from device info" This reverts commit eb86f645ab9b90c47de7ebe229feae7ac999421b. Signed-off-by: Tvrtko Ursulin Acked-by: Joonas Lahtinen Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220519090802.1294691-3-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_pci.c | 3 +++ drivers/gpu/drm/i915/intel_device_info.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) commit 9602efab9f8652ef39dc2789edcd26c3d1d3f901 Author: Tvrtko Ursulin Date: Thu May 19 10:07:56 2022 +0100 Revert "drm/i915: Drop has_psr from device info" This reverts commit b15a7357a84f091fde8ce35bf2fd494150ad4bd0. Signed-off-by: Tvrtko Ursulin Acked-by: Joonas Lahtinen Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220519090802.1294691-2-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_pci.c | 3 +++ drivers/gpu/drm/i915/intel_device_info.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) commit 69ef4a192bba0d76216198ec6d5fe82375337903 Author: Douglas Anderson Date: Mon May 9 16:18:09 2022 -0700 drm: Document the power requirements for DP AUX transfers When doing DP AUX transfers there are two actors that need to be powered in order for the DP AUX transfer to work: the DP source and the DP sink. Commit bacbab58f09d ("drm: Mention the power state requirement on side-channel operations") added some documentation saying that the DP source is required to power itself up (if needed) to do AUX transfers. However, that commit doesn't talk anything about the DP sink. For full fledged DP the sink isn't really a problem. It's expected that if an external DP monitor isn't plugged in that attempting to do AUX transfers won't work. It's also expected that if a DP monitor is plugged in (and thus asserting HPD) then AUX transfers will work. When we're looking at eDP, however, things are less obvious. Let's add some documentation about expectations. Here's what we'll say: 1. We don't expect the DP AUX transfer function to power on an eDP panel. If an eDP panel is physically connected but powered off then it makes sense for the transfer to fail. 2. We'll document that the official way to power on a panel is via the bridge chain, specifically by making sure that the panel's prepare function has been called (which is called by panel_bridge_pre_enable()). It's already specified in the kernel doc of drm_panel_prepare() that this is the way to power the panel on and also that after this call "it is possible to communicate with any integrated circuitry via a command bus." 3. We'll also document that for code running in the panel driver itself that it is legal for the panel driver to power itself up however it wants (it doesn't need to officially call drm_panel_pre_enable()) and then it can do AUX bus transfers. This is currently the way that edp-panel works when it's running atop the DP AUX bus. NOTE: there was much discussion of all of this in response to v1 [1] of this patch. A summary of that is: * With the Intel i195 driver, apparently eDP panels do get powered up. We won't forbid this but it is expected that code that wants to run on a variety of platforms should ensure that the drm_panel's prepare() function has been called. * There is at least a reasonable amount of agreement that the transfer() functions itself shouldn't be responsible for powering the panel. It's proposed that if we need the DP AUX dev nodes to be robust for eDP that the code handling the DP AUX dev nodes could handle powering the panel by ensuring that the panel's prepare() call was made. Potentially drm_dp_aux_dev_get_by_minor() could be a good place to do this. This is left as a future exercise. Until that's fixed the DP AUX dev nodes for eDP are probably best just used for debugging. * If a panel could be in PSR and DP AUX via the dev node needs to be reliable then we need to be able to pull the panel out of PSR. On i915 this is also apparently handled as part of the transfer() function. [1] https://lore.kernel.org/r/20220503162033.1.Ia8651894026707e4fa61267da944ff739610d180@changeid Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220509161733.v2.1.Ia8651894026707e4fa61267da944ff739610d180@changeid include/drm/display/drm_dp_helper.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit e7c254d75d16b75abf1958095fd34e2ecdc0d645 Author: Douglas Anderson Date: Wed May 11 15:58:08 2022 -0700 drm/probe-helper: For DP, add 640x480 if all other modes are bad As per Displayport spec section 5.2.1.2 ("Video Timing Format") says that all detachable sinks shall support 640x480 @60Hz as a fail safe mode. A DP compliance test expected us to utilize the above fact when all modes it presented to the DP source were not achievable. It presented only modes that would be achievable with more lanes and/or higher speeds than we had available and expected that when we couldn't do that then we'd fall back to 640x480 even though it didn't advertise this size. In order to pass the compliance test (and also support any users who might fall into a similar situation with their display), we need to add 640x480 into the list of modes. However, we don't want to add 640x480 all the time. Despite the fact that the DP spec says all sinks _shall support_ 640x480, they're not guaranteed to support it _well_. Continuing to read the spec you can see that the display is not required to really treat 640x480 equal to all the other modes. It doesn't need to scale or anything--just display the pixels somehow for failsafe purposes. It should also be noted that it's not hard to find a display hooked up via DisplayPort that _doesn't_ support 640x480 at all. The HP ZR30w screen I'm sitting in front of has a native DP port and doesn't work at 640x480. I also plugged in a tiny 800x480 HDMI display via a DP to HDMI adapter and that screen definitely doesn't support 640x480. As a compromise solution, let's only add the 640x480 mode if: * We're on DP. * All other modes have been pruned. This acknowledges that 640x480 might not be the best mode to use but, since sinks are _supposed_ to support it, we will at least fall back to it if there's nothing else. Note that we _don't_ add higher resolution modes like 1024x768 in this case. We only add those modes for a failed EDID read where we have no idea what's going on. In the case where we've pruned all modes then instead we only want 640x480 which is the only defined "Fail Safe" resolution. This patch originated in response to Kuogee Hsieh's patch [1]. [1] https://lore.kernel.org/r/1650671124-14030-1-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Douglas Anderson Tested-by: Kuogee Hsieh Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20220511155749.v3.2.I4ac7f55aa446699f8c200a23c10463256f6f439f@changeid drivers/gpu/drm/drm_probe_helper.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit 4a2a13a57b605994ee44e5c2cd7b9efc49901404 Author: Douglas Anderson Date: Wed May 11 15:58:07 2022 -0700 drm/probe-helper: Add helper for drm_helper_probe_single_connector_modes() The drm_helper_probe_single_connector_modes() is a bit long. Let's break a chunk off to update and validate modes. This helps avoid one goto and also will allow us to more easily call the helper a second time in a future patch without adding looping or another goto. This change is intended to be a no-op change--just code movement. Signed-off-by: Douglas Anderson Reviewed-by: Abhinav Kumar Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220511155749.v3.1.I2dd93486c6952bd52f2020904de0133970d11b29@changeid drivers/gpu/drm/drm_probe_helper.c | 106 +++++++++++++++++++++---------------- 1 file changed, 60 insertions(+), 46 deletions(-) commit 4f093a527b0b8f9d3059a4e8376e582fd14cf09e Author: Thomas Zimmermann Date: Tue May 17 13:33:27 2022 +0200 drm/gem: Warn on trying to use a non-existing framebuffer plane Warn if callers of drm_gem_fb_get_obj() try to use a GEM buffer for a non-existing or unset plane. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Tested-by: Noralf Trønnes Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20220517113327.26919-6-tzimmermann@suse.de drivers/gpu/drm/drm_gem_framebuffer_helper.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a8d6e127254c48d895c4f6e973ec998fd4a0eff3 Author: Thomas Zimmermann Date: Tue May 17 13:33:26 2022 +0200 drm/gem-vram: Ignore planes that are unused by framebuffer format Only handle color planes that exist in a framebuffer's color format. Ignore non-existing planes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Tested-by: Noralf Trønnes Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20220517113327.26919-5-tzimmermann@suse.de drivers/gpu/drm/drm_gem_vram_helper.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 1c89b4b718168aa6cf136a984b474d663e4203b7 Author: Thomas Zimmermann Date: Tue May 17 13:33:25 2022 +0200 drm/gem-vram: Share code between GEM VRAM's _{prepare, cleanup}_fb() The error-recovery code in drm_gem_vram_plane_helper_prepare_fb() is of the same pattern as drm_gem_vram_plane_helper_cleanup_fb(). Implement both of them using an internal helper. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20220517113327.26919-4-tzimmermann@suse.de drivers/gpu/drm/drm_gem_vram_helper.c | 37 ++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 14 deletions(-) commit 746b9c62cc8614fa59c23f3332682b5e9e1d801c Author: Thomas Zimmermann Date: Tue May 17 13:33:24 2022 +0200 drm/gem: Ignore color planes that are unused by framebuffer format Only handle color planes that exist in a framebuffer's color format. Ignore non-existing planes. So far, several helpers assumed that all 4 planes are available and silently ignored non-existing planes. This lead to subtil bugs with uninitialized data in instances of struct iosys_map. [1] Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Tested-by: Noralf Trønnes Acked-by: Christian König Link: https://lore.kernel.org/dri-devel/20210730183511.20080-1-tzimmermann@suse.de/T/#md0172b10bb588d8f20f4f456e304f08d2a4505f7 # 1 Link: https://patchwork.freedesktop.org/patch/msgid/20220517113327.26919-3-tzimmermann@suse.de drivers/gpu/drm/drm_gem_atomic_helper.c | 6 +++-- drivers/gpu/drm/drm_gem_framebuffer_helper.c | 37 +++++++++++++++------------- include/drm/drm_gem_framebuffer_helper.h | 10 +++----- 3 files changed, 27 insertions(+), 26 deletions(-) commit f159b1b22c8a2d3d7c1fa877fafc8aacff0deeba Author: Thomas Zimmermann Date: Tue May 17 13:33:23 2022 +0200 drm/gem: Share code between drm_gem_fb_{begin,end}_cpu_access() The error-recovery code in drm_gem_fb_begin() is of the same pattern as drm_gem_fb_end(). Implement both of them using an internal helper. No functional changes. v2: * print additional information in error message (Javier) * fix commit description (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Tested-by: Noralf Trønnes Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20220517113327.26919-2-tzimmermann@suse.de drivers/gpu/drm/drm_gem_framebuffer_helper.c | 63 ++++++++++++---------------- 1 file changed, 27 insertions(+), 36 deletions(-) commit 7f73b371710edaee1f40d834096c07c62e51b184 Author: Swathi Dhanavanthri Date: Tue May 17 13:13:38 2022 -0700 drm/i915/dg2: Extend Wa_22010954014 to DG2-G11 and DG2-G12 Signed-off-by: Swathi Dhanavanthri Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220517201338.7291-1-swathi.dhanavanthri@intel.com drivers/gpu/drm/i915/intel_pm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 411d44d754739a371999412606b28af1d72a210b Author: Swathi Dhanavanthri Date: Tue May 17 14:29:05 2022 -0700 drm/i915/dg2: Add workaround 22014600077 Signed-off-by: Swathi Dhanavanthri Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220517212905.24212-1-swathi.dhanavanthri@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + drivers/gpu/drm/i915/gt/intel_workarounds.c | 10 ++++++++++ 2 files changed, 11 insertions(+) commit 962bd34bb457f6353f333ce234c3fd34cad1c00a Author: Borislav Petkov Date: Wed May 18 14:33:15 2022 +0300 drm/i915/uc: Fix undefined behavior due to shift overflowing the constant Fix: In file included from :0:0: drivers/gpu/drm/i915/gt/uc/intel_guc.c: In function ‘intel_guc_send_mmio’: ././include/linux/compiler_types.h:352:38: error: call to ‘__compiletime_assert_1047’ \ declared with attribute error: FIELD_PREP: mask is not constant _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) and other build errors due to shift overflowing values. See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic for the gory details as to why it triggers with older gccs only. v2 by Jani: - Drop the i915_reg.h changes Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Ruiqi GONG Cc: Randy Dunlap Signed-off-by: Borislav Petkov Signed-off-by: Jani Nikula Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20220518113315.1305027-2-jani.nikula@intel.com drivers/gpu/drm/i915/gt/uc/abi/guc_actions_abi.h | 2 +- drivers/gpu/drm/i915/gt/uc/abi/guc_communication_ctb_abi.h | 2 +- drivers/gpu/drm/i915/gt/uc/abi/guc_messages_abi.h | 2 +- drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 230fb39ff7e07bd0324c87acf08dd2c9b0bbcea8 Author: Jani Nikula Date: Wed May 18 14:33:14 2022 +0300 drm/i915/reg: fix undefined behavior due to shift overflowing the constant Use REG_GENMASK() and REG_FIELD_PREP() to avoid errors due to -fsanitize=shift. References: https://lore.kernel.org/r/20220405151517.29753-12-bp@alien8.de Reported-by: Borislav Petkov Reported-by: Ruiqi GONG Cc: Randy Dunlap Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220518113315.1305027-1-jani.nikula@intel.com drivers/gpu/drm/i915/i915_reg.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 1ade30812abfdd1c161a155fd54b0dd594c217ee Author: Andi Shyti Date: Tue May 10 16:04:47 2022 +0200 drm/i915/gt: Fix use of static in macro mismatch The INTEL_GT_RPS_SYSFS_ATTR was creating to different structures but. When called with the "static" keyword this is affecting only the first structure, while the second is created as non static. Move the static keyword inside the macros to affect both the structures. Reported-by: Jani Nikula Fixes: 56a709cf77468 ("drm/i915/gt: Create per-tile RPS sysfs interfaces") Signed-off-by: Andi Shyti Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220510140447.80200-1-andi.shyti@linux.intel.com drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 451374eef622fca6f00eeeda89aaccb45a30a149 Author: Maarten Lankhorst Date: Wed May 11 13:52:19 2022 +0200 drm/i915: Use i915_gem_object_ggtt_pin_ww for reloc_iomap When removing short term pins, I've changed the the batch buffer pinning for relocation to use __i915_vma_pin, because i915_gem_object_ggtt_pin_ww was destroying the old vma. This caused regressions, because the functions are not identical. Fix the regressions by calling i915_gem_object_ggtt_pin_ww() again on ggtt-only platforms, but only if the batch can be pinned without being moved. Fixes: b5cfe6f7a6e1 ("drm/i915: Remove short-term pins from execbuf, v6.") Cc: Matthew Auld Reported-by: Mateusz Jończyk Tested-by: Hans de Goede Signed-off-by: Maarten Lankhorst Acked-by: Matthew Auld Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5806 Link: https://patchwork.freedesktop.org/patch/msgid/20220511115219.46507-1-maarten.lankhorst@linux.intel.com drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a50794f26f52c66cb793d5d392f5f19bc2962cdd Author: Ramalingam C Date: Mon May 2 19:45:08 2022 +0530 uapi/drm/i915: Document memory residency and Flat-CCS capability of obj Capture the impact of memory region preference list of the objects, on their memory residency and Flat-CCS capability. v2: Fix the Flat-CCS capability of an obj with {lmem, smem} preference list [Thomas] v3: Reworded the doc [Matt] v4: Fixed Typos and spelling mistakes [Tvrtko, Joonas] Signed-off-by: Ramalingam C cc: Matthew Auld cc: Thomas Hellstrom cc: Daniel Vetter cc: Jon Bloomfield cc: Lionel Landwerlin cc: Kenneth Graunke cc: mesa-dev@lists.freedesktop.org cc: Jordan Justen cc: Tony Ye Reviewed-by: Matthew Auld Acked-by: Jordan Justen Link: https://patchwork.freedesktop.org/patch/msgid/20220502141508.2327-1-ramalingam.c@intel.com include/uapi/drm/i915_drm.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit c193a003dc46ae601f46908b41d6f485b87db1ad Author: Dongjin Kim Date: Mon May 16 07:22:45 2022 +0000 drm/meson: add YUV422 output support Support YUV422 output from the Amlogic Meson SoC VPU to the HDMI controller. Without this YUV422 format out of the HDMI encoder leads to using the dw-hdmi YUV444 to YUV422 color conversion which gives wrong colors and a green line on the left edge of the screen. Signed-off-by: Dongjin Kim Signed-off-by: Christian Hewitt Tested-by: Furkan Kardame Acked-by: Neil Armstrong Tested-by: Dan Johansen Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20220516072245.10745-1-christianshewitt@gmail.com drivers/gpu/drm/meson/meson_encoder_hdmi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit fdb8fc34a6fbf8c7614f222cbe1176a0598f1941 Author: Sriram R Date: Mon May 16 13:25:59 2022 +0300 ath11k: update missing MU-MIMO and OFDMA stats Update the missing MU-MIMO/OFDMA info in PDEV RX, trigger and schedule stats. i.e HTT stats type 10, 12 and 17 respectively. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4-01209-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sriram R Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1652152236-12038-1-git-send-email-quic_srirrama@quicinc.com .../net/wireless/ath/ath11k/debugfs_htt_stats.c | 88 +++++++++++++++++++++- .../net/wireless/ath/ath11k/debugfs_htt_stats.h | 39 ++++++++++ 2 files changed, 126 insertions(+), 1 deletion(-) commit 7381076809586528e2a812a709e2758916318a99 Author: Miaoqian Lin Date: Wed May 11 09:40:51 2022 +0400 drm/meson: Fix refcount leak in meson_encoder_hdmi_init of_find_device_by_node() takes reference, we should use put_device() to release it when not need anymore. Add missing put_device() in error path to avoid refcount leak. Fixes: 0af5e0b41110 ("drm/meson: encoder_hdmi: switch to bridge DRM_BRIDGE_ATTACH_NO_CONNECTOR") Signed-off-by: Miaoqian Lin Reviewed-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20220511054052.51981-1-linmq006@gmail.com drivers/gpu/drm/meson/meson_encoder_hdmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 315a8d00ac74c59a688a1a88c0ed97a7791d1c91 Author: Thomas Zimmermann Date: Tue Feb 8 15:31:52 2022 +0100 drm/udl: Set VGA connector Set the connector type to VGA. The previously exported DVII type isn't even supported by the driver. Signed-off-by: Thomas Zimmermann Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20220208143152.5846-1-tzimmermann@suse.de drivers/gpu/drm/udl/udl_connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e180a7b218487065efd9a3f05eac5de7de128e19 Author: Alan Previn Date: Fri May 6 21:58:47 2022 -0700 drm/i915/guc: Remove unnecessary GuC err capture noise GuC error capture blurts some debug messages about empty register lists for certain register types on engines during firmware initialization. These are not errors or warnings, so get rid of them. Signed-off-by: Alan Previn Reviewed-by: John Harrison Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20220507045847.862261-2-alan.previn.teres.alexis@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 77 +------------------------- 1 file changed, 2 insertions(+), 75 deletions(-) commit 475e2b970cc372f49e9d3e4bbead8b4874299d31 Author: Thomas Zimmermann Date: Mon May 16 15:43:43 2022 +0200 drm/mgag200: Split up connector's mode_valid helper Split up the connector's mode_valid helper into a simple-pipe and a mode-config helper. The simple-pipe helper tests for display-size limits while the mode-config helper tests for memory-bandwidth limits. Also add the mgag200_ prefix to mga_vga_calculate_mode_bandwidth() and comment on the function's purpose. The memory-bandwidth tests assume that the display uses 4 bytes per pixel. The first models of G200SE-A only had 1.75 MiB of VRAM, which limits these devices to 640x480-32. v2: * note the memory constraints on early G200SE-A Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220516134343.6085-8-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_mode.c | 146 ++++++++++++++++----------------- 1 file changed, 69 insertions(+), 77 deletions(-) commit 69340e529a064da4807622395e967aa2b5eba1c5 Author: Thomas Zimmermann Date: Mon May 16 15:43:42 2022 +0200 drm/mgag200: Test memory requirements in drm_mode_config_funcs.mode_valid Test for a mode's memory requirements in the device-wide mode_valid helper. For simplicify, always assume a 32-bit color format. While some rejected modes would work with less colors, implementing this is probably not worth the effort. Also remove the memory-related test from the connector's mode_valid helper. The test uses the bpp value that users can specify on the kernel's command line. This value is unrelated and the test would belong into atomic_check. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220516134343.6085-7-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_mode.c | 35 ++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit 8219f11fdaf56593a719e1d72fa582673560315a Author: Thomas Zimmermann Date: Mon May 16 15:43:41 2022 +0200 drm/mgag200: Remove struct mga_connector struct mga_connector has outlived its purpose. Inline the rsp init helper into the mode-config code and remove the data structure. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220516134343.6085-6-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_drv.h | 8 +------ drivers/gpu/drm/mgag200/mgag200_mode.c | 44 +++++++++++----------------------- 2 files changed, 15 insertions(+), 37 deletions(-) commit b279df242972ae816a75cf1cc732af836f999100 Author: Thomas Zimmermann Date: Mon May 16 15:43:40 2022 +0200 drm/mgag200: Switch I2C code to managed cleanup Store the I2C state within struct mga_device and switch I2C to managed release. Simplifies the related code and lets us remove mga_connector_destroy(). Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220516134343.6085-5-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_drv.h | 5 ++--- drivers/gpu/drm/mgag200/mgag200_i2c.c | 33 +++++++++++---------------------- drivers/gpu/drm/mgag200/mgag200_mode.c | 24 +++++------------------- 3 files changed, 18 insertions(+), 44 deletions(-) commit 16f1456466c269ecda32b88c3f8fdd76f8ec370c Author: Thomas Zimmermann Date: Mon May 16 15:43:39 2022 +0200 drm/mgag200: Implement connector's get_modes with helper Provide drm_connector_helper_get_modes_from_ddc() to implement the connector's get_modes callback. The new helper updates the connector from DDC-provided EDID data. v2: * clear property if EDID is NULL in helper Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220516134343.6085-4-tzimmermann@suse.de drivers/gpu/drm/drm_probe_helper.c | 36 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/mgag200/mgag200_mode.c | 17 ++++------------ include/drm/drm_probe_helper.h | 2 ++ 3 files changed, 42 insertions(+), 13 deletions(-) commit d50f74790bbba662d1438dbc03be6616c52c0722 Author: Thomas Zimmermann Date: Mon May 16 15:43:38 2022 +0200 drm/mgag200: Fail on I2C initialization errors Initialization of the I2C adapter was allowed to fail. The mgag200 driver would have continued without DDC support. Had this happened in practice, it would have led to segmentation faults in the connector code. Resolve this problem by failing driver initialization on I2C- related errors. v2: * initialize 'ret' before drm_err() (kernel test robot) Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20220516134343.6085-3-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_i2c.c | 13 ++++++++----- drivers/gpu/drm/mgag200/mgag200_mode.c | 7 +++++-- 2 files changed, 13 insertions(+), 7 deletions(-) commit 5913ab941d6ea782e841234c76958c6872ea752d Author: Thomas Zimmermann Date: Mon May 16 15:43:37 2022 +0200 drm/mgag200: Acquire I/O lock while reading EDID DDC operation conflicts with concurrent mode setting. Acquire the driver's I/O lock in get_modes to prevent this. This change should have been part of commit 931e3f3a0e99 ("drm/mgag200: Protect concurrent access to I/O registers with lock"), but apparently got lost somewhere. v3: * fix commit message to say 'drm/mgag200' (Jocelyn) Signed-off-by: Thomas Zimmermann Fixes: 931e3f3a0e99 ("drm/mgag200: Protect concurrent access to I/O registers with lock") Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Cc: Thomas Zimmermann Cc: Jocelyn Falempe Cc: Daniel Vetter Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20220516134343.6085-2-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_mode.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a77c2af0994e24ee36c7ffb6dc852770bdf06fb1 Author: Xin Ji Date: Fri Apr 22 16:47:18 2022 +0800 drm/bridge: anx7625: Use DPI bus type As V4L2_FWNODE_BUS_TYPE_PARALLEL not properly descript for DPI interface, this patch use new defined V4L2_FWNODE_BUS_TYPE_DPI for it. Fixes: fd0310b6fe7d ("drm/bridge: anx7625: add MIPI DPI input feature") Signed-off-by: Xin Ji Tested-by: Chen-Yu Tsai Acked-by: Robert Foss Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220422084720.959271-4-xji@analogixsemi.com drivers/gpu/drm/bridge/analogix/anx7625.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7328736d270aa4fa6fcd033ade02acc2874a2db5 Author: Xin Ji Date: Fri Apr 22 16:47:17 2022 +0800 dt-bindings:drm/bridge:anx7625: add port@0 property Add 'bus-type' and 'data-lanes' define, bus-type 7 for MIPI DPI input, others for DSI input. Signed-off-by: Xin Ji Reviewed-by: Rob Herring Reviewed-by: Robert Foss Acked-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220422084720.959271-3-xji@analogixsemi.com .../bindings/display/bridge/analogix,anx7625.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 7d64c40a7d96190d9d06e240305389e025295916 Author: Dmitry Osipenko Date: Tue Apr 12 01:15:36 2022 +0300 drm/scheduler: Don't kill jobs in interrupt context Interrupt context can't sleep. Drivers like Panfrost and MSM are taking mutex when job is released, and thus, that code can sleep. This results into "BUG: scheduling while atomic" if locks are contented while job is freed. There is no good reason for releasing scheduler's jobs in IRQ context, hence use normal context to fix the trouble. Cc: stable@vger.kernel.org Fixes: 542cff7893a3 ("drm/sched: Avoid lockdep spalt on killing a processes") Signed-off-by: Dmitry Osipenko Signed-off-by: Andrey Grodzovsky Link: https://patchwork.freedesktop.org/patch/msgid/20220411221536.283312-1-dmitry.osipenko@collabora.com drivers/gpu/drm/scheduler/sched_entity.c | 6 +++--- include/drm/gpu_scheduler.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 9e97c46f832d4669b4e52cde5ad0bd43423504eb Author: Nirmoy Das Date: Wed May 11 17:37:46 2022 +0200 drm/i915: gracefully error out on platform with small-bar Currently we just fatally crash during module load if we encounter small-BAR configuration on DG2. We have most of the support already, but we lack the final uAPI bits to tie it all together. Signed-off-by: Nirmoy Das Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld [mauld: reword the commit and error message slightly] Link: https://patchwork.freedesktop.org/patch/msgid/20220511153746.14142-3-nirmoy.das@intel.com drivers/gpu/drm/i915/gt/intel_region_lmem.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8f6de23184452793e60945a26ac40db435d7798d Author: Nirmoy Das Date: Wed May 11 17:37:45 2022 +0200 drm/i915: determine lmem_size properly Determine lmem_size using ADDR_RANGE register so that lmem_setup() works on platform with small-bar as well. Signed-off-by: Nirmoy Das Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220511153746.14142-2-nirmoy.das@intel.com drivers/gpu/drm/i915/gt/intel_region_lmem.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d158367c31f0f87567d2e8a0955287dc005d40e5 Author: Nirmoy Das Date: Wed May 11 17:37:44 2022 +0200 drm/i915: return -EIO on lmem setup failure Caller of setup_lmem() ignores -ENODEV but failing to setup lmem on dGPU isn't ignorable error. Signed-off-by: Nirmoy Das Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220511153746.14142-1-nirmoy.das@intel.com drivers/gpu/drm/i915/gt/intel_region_lmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a9ad5822366c5065e6a65fe5ff5090295ba98986 Author: Geert Uytterhoeven Date: Mon May 9 15:52:02 2022 +0200 drm: bridge: DRM_FSL_LDB should depend on ARCH_MXC The Freescale i.MX8MP LDB bridge is only present on Freescale i.MX8MP SoCs. Hence add a dependency on ARCH_MXC, to prevent asking the user about this driver when configuring a kernel without i.MX SoC support. Fixes: 463db5c2ed4aed01 ("drm: bridge: ldb: Implement simple Freescale i.MX8MP LDB bridge") Signed-off-by: Geert Uytterhoeven Reviewed-by: Marek Vasut Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/449e08ca791a3ca308de5477c1bdc1f6eb1b34e7.1652104211.git.geert+renesas@glider.be drivers/gpu/drm/bridge/Kconfig | 1 + 1 file changed, 1 insertion(+) commit a24191b1c4ad05fc578ea5ea01652c09b71da86d Author: Marek Vasut Date: Sat Apr 30 04:50:20 2022 +0200 drm: bridge: icn6211: Register macro clean up Drop two unused register macros, ICN6211_MAX_REGISTER and MIPI_ATE_STATUS_1, neither of which is used and where the later should be specified using macro MIPI_ATE_STATUS(1) instead. Drop the _(n) underscore and keep only the (n) part of register macros. No functional change. Signed-off-by: Marek Vasut Cc: Jagan Teki Cc: Mark Brown Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg Cc: Thomas Zimmermann To: dri-devel@lists.freedesktop.org Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220430025020.640277-1-marex@denx.de drivers/gpu/drm/bridge/chipone-icn6211.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit c577b2f43e80d707870a74de0fd726c51b206956 Author: Jocelyn Falempe Date: Fri May 13 10:49:00 2022 +0200 drm/mgag200: Enable atomic gamma lut update Add support for atomic update of gamma lut. With this patch the "Night light" feature of gnome3 is working properly on mgag200. v2: - Add a default linear gamma function - renamed functions with mgag200 prefix - use format's 4cc code instead of bit depth - use better interpolation for 16bits gamma - remove legacy function mga_crtc_load_lut() - can't remove the call to drm_mode_crtc_set_gamma_size() because it doesn't work with userspace. - other small refactors v3: - change mgag200_crtc_set_gamma*() argument to struct drm_format_info *format - fix printk format to %p4cc for 4cc and %zu for size_t - rebased to drm-misc-next. Signed-off-by: Jocelyn Falempe Tested-by: Thomas Zimmermann Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220513084900.1832381-1-jfalempe@redhat.com drivers/gpu/drm/mgag200/mgag200_mode.c | 127 +++++++++++++++++++++------------ 1 file changed, 83 insertions(+), 44 deletions(-) commit d6774b8c3c5813aa541c9148f641d3d8d4b296d2 Author: Jouni Högander Date: Fri May 13 17:28:11 2022 +0300 drm/i915: Ensure damage clip area is within pipe area Current update area calculation is not handling situation where e.g. cursor plane is fully or partially outside pipe area. Fix this by checking damage area against pipe_src area using drm_rect_intersect. v2: Set x1 and x2 in damaged_area initialization v3: Move drm_rect_intersect into clip_area_update v4: draw_area -> pipe_src Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5440 Cc: José Roberto de Souza Cc: Mika Kahola Reviewed-by: José Roberto de Souza Signed-off-by: Jouni Högander Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20220513142811.779331-3-jouni.hogander@intel.com drivers/gpu/drm/i915/display/intel_psr.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 057a6a1936e79c0bc9c86537fb9886ed39cd078a Author: Jouni Högander Date: Fri May 13 17:28:10 2022 +0300 drm/i915/psr: Use full update In case of area calculation fails Currently we have some corner cases where area calculation fails. For these sel fetch area calculation ends up having update area as y1 = 0, y2 = 4. Instead of these values safer option is full update. One of such for example is big fb with offset. We don't have usable offset in psr2_sel_fetch_update. Currently it's open what is the proper way to fix this corner case. Use full update for now. v2: Commit message modified v3: Print out debug info once when area calculation fails v4: Use drm_info_once v5: pipeA -> "pipe %c", pipe_name(crtc-pipe) Cc: José Roberto de Souza Cc: Mika Kahola Signed-off-by: Jouni Högander Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20220513142811.779331-2-jouni.hogander@intel.com drivers/gpu/drm/i915/display/intel_psr.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit c3e57159dea473e9e138d32d08c48f3103294050 Author: Anshuman Gupta Date: Wed May 11 18:34:54 2022 +0530 drm/i915: Use drm_dbg for rpm logging RPM suspend/resume also supported on gfx platforms which doesn't have kms support and even on platforms without any connected display panel. There is no good reason to log rpm suspend/resume debug message with drm_dbg_kms() therefore changing it to drm_dbg(). Signed-off-by: Anshuman Gupta Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20220511130455.22028-1-anshuman.gupta@intel.com drivers/gpu/drm/i915/i915_driver.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0facdaa249c4e97346bc0b49c893e4a1d336b7dd Author: Thomas Zimmermann Date: Wed May 11 20:31:25 2022 +0200 drm/client: Don't add new command-line mode Don't add a mode for the kernel's command-line parameters from within the DRM client code. Doing so can result in an unusable display. If there's no compatible command-line mode, the client will use one of the connector's preferred modes. All mode creation and validation has to be performed by the connector. When clients run, the connector's fill_modes callback has already processed the kernel parameters and validated each mode before adding it. The connector's mode list does not contain invalid modes. v2: * grammar in commit message (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20220511183125.14294-4-tzimmermann@suse.de drivers/gpu/drm/drm_client_modeset.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit b959eb4f5b7ea49b47e95c9047d33d1b1cf81057 Author: Thomas Zimmermann Date: Wed May 11 20:31:24 2022 +0200 drm/client: Look for command-line modes first When picking a mode, first look for modes that have been specified by the user on the kernel's command line. Only if that fails, use the existing heuristic of picking a nearby mode from it's various parameters. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20220511183125.14294-3-tzimmermann@suse.de drivers/gpu/drm/drm_client_modeset.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit b6415bd7386bcf9d2e0d6ee1d4ef4186e7a87b24 Author: Thomas Zimmermann Date: Wed May 11 20:31:23 2022 +0200 drm: Always warn if user-defined modes are not supported Print a warning if a user-specifed display mode is not supported by the display pipeline. Users specified the display mode on the kernel command line with the use of the video= parameter. Setting an unsupported mode will leave the console blank, so we should at least let the user know why. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20220511183125.14294-2-tzimmermann@suse.de drivers/gpu/drm/drm_modes.c | 4 ++++ 1 file changed, 4 insertions(+) commit 98526c5bbe3267d447ddd076b685439e3e1396c6 Author: Dan Carpenter Date: Mon May 9 12:05:05 2022 +0300 drm/rockchip: vop2: unlock on error path in vop2_crtc_atomic_enable() This error path needs an unlock before returning. Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver") Signed-off-by: Dan Carpenter Acked-by: Sascha Hauer Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/YnjZQRV9lpub2ET8@kili drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 1 + 1 file changed, 1 insertion(+) commit de5db71e4c8c35ed5e92006e3064ce9230881ece Author: Peter Geis Date: Wed May 11 07:35:15 2022 -0400 drm/panel: feiyang-fy07024di26a30d: make reset gpio optional Some implementations do not use the reset signal, instead tying it to dvdd. Make the reset gpio optional to permit this. Signed-off-by: Peter Geis Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20220511113517.4172962-3-pgwipeout@gmail.com drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0956e2c520c9d730979a9669f27a77d40acac13 Author: Peter Geis Date: Wed May 11 07:35:14 2022 -0400 dt-bindings: display: panel: feiyang, fy07024di26a30d: make reset gpio optional Some implementations do not use the reset signal, instead tying it to dvdd. Make the reset gpio optional to permit this. Signed-off-by: Peter Geis Acked-by: Rob Herring Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20220511113517.4172962-2-pgwipeout@gmail.com .../devicetree/bindings/display/panel/feiyang,fy07024di26a30d.yaml | 1 - 1 file changed, 1 deletion(-) commit ca10b9d60f8c9556720bad8b1ec7d522e353a01d Author: Vinay Belgaumkar Date: Thu May 5 22:41:42 2022 -0700 drm/i915/guc/rc: Use i915_probe_error instead of drm_error To avoid false positives in error injection cases. Signed-off-by: Vinay Belgaumkar Reviewed-by: Alan Previn Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20220506054142.5025-1-vinay.belgaumkar@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_rc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d0edd3c1a7e859a5899c26e2906e80f4ac798fa9 Author: Jani Nikula Date: Mon May 9 15:03:24 2022 +0300 drm/edid: convert version_greater() to drm_edid We'll need to propagate drm_edid everywhere. Also make version_greater() a function for type safety. Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/f1835a86294b392d075570001ed9009a48352670.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit d9ba1b4cbb2989c919198832f4ebd6eb8ba94da0 Author: Jani Nikula Date: Mon May 9 15:03:23 2022 +0300 drm/displayid: convert to drm_edid We'll need to propagate drm_edid everywhere. v2: Rebase Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/a52a6882e87a4bb6b1670918f3aba13f9b52f6de.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_displayid.c | 16 ++++++++-------- drivers/gpu/drm/drm_edid.c | 17 ++++++++++------- include/drm/drm_displayid.h | 6 +++--- include/drm/drm_edid.h | 6 ++++-- 4 files changed, 25 insertions(+), 20 deletions(-) commit c7b2dee4308b74391734ac675e66e6856a077f77 Author: Jani Nikula Date: Mon May 9 15:03:22 2022 +0300 drm/edid: add drm_edid helper for drm_update_tile_info() We'll need to propagate drm_edid everywhere. v2: Handle NULL EDID pointer (Ville, CI) Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/5b36683b656446a4d9a172d4dca1cf9aca08a48b.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit bbded689680f0f2e65d4a57d0dfa654671052d56 Author: Jani Nikula Date: Mon May 9 15:03:21 2022 +0300 drm/edid: convert drm_edid_iter_begin() to drm_edid We'll need to propagate drm_edid everywhere. v2: Rebase Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/24dfb5fd9026ebef573bb55b368b94e56cae5cec.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 5e87b2e5171621ff00ec197c9af15bc3aa405b6b Author: Jani Nikula Date: Mon May 9 15:03:20 2022 +0300 drm/edid: convert cea_db_iter_edid_begin() to drm_edid We'll need to propagate drm_edid everywhere. v2: Handle NULL drm_edid Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/7d9f060815086e1e4ea037dbfb9fd8ad54d1f25e.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 0c057877cbdf261efa7874474f48c715cd6401ba Author: Jani Nikula Date: Mon May 9 15:03:19 2022 +0300 drm/edid: add drm_edid helper for drm_detect_monitor_audio() We'll need to propagate drm_edid everywhere. v2: Handle NULL EDID pointer (Ville, CI) Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/ea33244c473ace1bc72a7e87f97580f00705a683.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit 3176d0925027727ec37e388e9363f124c2c52ae9 Author: Jani Nikula Date: Mon May 9 15:03:18 2022 +0300 drm/edid: add drm_edid helper for drm_detect_hdmi_monitor() We'll need to propagate drm_edid everywhere. v2: Handle NULL EDID pointer (Ville, CI) Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/2fbee0d7b544b44ef0866bb154beefac5d260bec.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) commit 027034511c6a1e3ea96122f7626b89b6d339ed49 Author: Jani Nikula Date: Mon May 9 15:03:17 2022 +0300 drm/edid: add drm_edid helper for drm_edid_to_speaker_allocation() We'll need to propagate drm_edid everywhere.' v2: Handle NULL EDID pointer (Ville, CI) Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/770d095c93274969c4b86480e07044e16a7b5760.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) commit bba4b6470b02c2d9a5074a40cff7246d3356f460 Author: Jani Nikula Date: Mon May 9 15:03:16 2022 +0300 drm/edid: add drm_edid helper for drm_edid_to_sad() We'll need to propagate drm_edid everywhere. v2: Handle NULL EDID pointer (Ville, CI) Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/14aa1e44caa2e9c1b54c2f2a471d2fd7d3f62d5d.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) commit 45aa2336fa6dbfa73d9081f75a4b813e747a55aa Author: Jani Nikula Date: Mon May 9 15:03:15 2022 +0300 drm/edid: convert drm_for_each_detailed_block() to drm_edid We'll need to propagate drm_edid everywhere. v2: Fix checkpatch warning on superfluous parens Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/bfd06d64235393012b2f3626d5764350de5f5321.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 2c54f87cf2fb99826ded617fd0484e688ecfe882 Author: Jani Nikula Date: Mon May 9 15:03:14 2022 +0300 drm/edid: convert get_monitor_name() to drm_edid We'll need to propagate drm_edid everywhere. v2: Drop incorrect NULL name check (Dan Carpenter) Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/c940aad14f323ef3a7907a0fb534011deb1589a9.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 874d98eed71ae678ab364d4c16060955b8b245ae Author: Jani Nikula Date: Mon May 9 15:03:13 2022 +0300 drm/edid: convert mode_in_range() and drm_monitor_supports_rb() to drm_edid We'll need to propagate drm_edid everywhere. Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/aac7dd14ce8c266491e9dfae12cad00fecdcd2e3.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 67d87fac86dd4a04cc62dc0eddfb7c74ace4666d Author: Jani Nikula Date: Mon May 9 15:03:12 2022 +0300 drm/edid: convert drm_mode_std() and children to drm_edid We'll need to propagate drm_edid everywhere. Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/9fb970d108a8bb666b87a590c74f480e0fd81cc8.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 52 ++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 25 deletions(-) commit 7428bfbdb7c4dc7323e6b6f0e327c3587e479e16 Author: Jani Nikula Date: Mon May 9 15:03:11 2022 +0300 drm/edid: convert drm_cvt_modes_for_range() to drm_edid We'll need to propagate drm_edid everywhere. Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/c2c251a504933debacf78e1382ae665ae490ed40.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a77f7c89e62c6dfe405a64995812746f27adc510 Author: Jani Nikula Date: Mon May 9 15:03:10 2022 +0300 drm/edid: convert drm_gtf_modes_for_range() to drm_edid We'll need to propagate drm_edid everywhere. Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/b50377ce67fd3cee6628ea5865c80fa0fa7da990.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 084c7a7c7a0a0cab35d959e1b14d45a0c6221f49 Author: Jani Nikula Date: Mon May 9 15:03:09 2022 +0300 drm/edid: convert drm_dmt_modes_for_range() to drm_edid We'll need to propagate drm_edid everywhere. Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/a8f393263225321e74f1e2884e81b3346d1adf20.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f0d080ff429129b16332f17a906ad2123d9c6317 Author: Jani Nikula Date: Mon May 9 15:03:08 2022 +0300 drm/edid: convert drm_mode_detailed() to drm_edid We'll need to propagate drm_edid everywhere. Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/6e4625d529ee4bfb2f6ebbfef5fb707d65a0554d.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dd0f4470a849d07081a2036f89d2c41264383985 Author: Jani Nikula Date: Mon May 9 15:03:07 2022 +0300 drm/edid: convert struct detailed_mode_closure to drm_edid We'll need to propagate drm_edid everywhere. Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/da4c927cd973766568a79ef044254fff20317e7f.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 40f71f5b239291357dbee3dc1c6ace83a373f44e Author: Jani Nikula Date: Wed May 11 12:26:50 2022 +0300 drm/edid: convert drm_edid_connector_update() to drm_edid fully We'll need to propagate drm_edid everywhere. v3: s/edid/drm_edid/ in comment too (Ankit) Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20220511092650.4193330-1-jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 97 ++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 50 deletions(-) commit a2f9790dcffe2dd0b363607fd215e5b81a0de57a Author: Jani Nikula Date: Wed May 11 12:23:49 2022 +0300 drm/edid: propagate drm_edid to drm_edid_to_eld() We'll need to propagate drm_edid everywhere. v3: Rebase Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20220511092349.4186498-1-jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit e42192b4c345a807d8df034f178d5846e1c97ad1 Author: Jani Nikula Date: Wed May 11 12:21:04 2022 +0300 drm/edid: keep propagating drm_edid to display info We'll need to propagate drm_edid everywhere. v3: Update comment to refer to update_display_info() (Ankit) v2: Use drm_edid_legacy_init() Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20220511092104.4179637-1-jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 50 +++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 20 deletions(-) commit 22a27e0532d06968afc265a3b91fbdc5a773169a Author: Jani Nikula Date: Mon May 9 15:03:03 2022 +0300 drm/edid: start propagating drm_edid to lower levels We'll need to propagate drm_edid everywhere. This is a clunky start, but a start nonetheless. We'll eventually convert all of the EDID parsing to struct drm_edid. Initially, we'll just create the struct drm_edid in stack. This will be the compat layer for legacy struct edid code. In the future, we'll have EDID read return drm_edid objects. v2: Add legacy init helper. Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/000452fddedbaf7f473ac25d4dde2502e60b8e39.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) commit e4ccf9a777d30d60c60f729b1d5c9bc9e3ea46e3 Author: Jani Nikula Date: Mon May 9 15:03:02 2022 +0300 drm/edid: add struct drm_edid container Introduce new opaque type struct drm_edid to encapsulate the EDID data and the size allocated for it. The contents will be private to drm_edid.c. There are a number of reasons for adding a container around struct edid: * struct edid is a raw blob pointer to data that usually originates outside of the kernel. Its size is contained within the structure. * There's no way to attach meta information (such as allocated memory size) to struct edid. * Validation of the EDID blob and its size become crucial, and it's spread all over the subsystem, with varying levels of accuracy. * HDMI Forum has introduced an HF-EEODB extension that defines an override EDID size within an EDID extension. The size allocated for an EDID depends on whether the allocator understands the HF-EEODB extension. Given a struct edid *, it's impossible to know how much memory was actually allocated for it. There are also some reasons for making the container type struct drm_edid opaque and private to drm_edid.c: * Have only one place for creating and parsing the EDID, to avoid duplicating bugs. * Prepare for reading a pure DisplayID 2.0 from its own DDC address, and adding it within the same struct drm_edid container, transparently, and for all drivers. * With the idea that the drm_edid objects are immutable during their lifetimes, it will be possible to refcount them and reduce EDID copying everywhere (this is left for future work). Initially, just add the type. In follow-up, we'll start converting the guts of drm_edid.c to use it, and finally add interfaces around it. Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/f3ecabd8a219aea678ad00f7bcdecf77b27b3c78.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit ab1747ccf052976465db7c5a7e1301a50f290db0 Author: Jani Nikula Date: Mon May 9 15:03:01 2022 +0300 drm/edid: convert drm_for_each_detailed_block() to edid iter We have an iterator for this, use it. It does include the base block, but its tag is 0 and will be skipped. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/a68718819a3dbfbdaaaddca7f73afa5ac6b33d07.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit be982415fc2e953ad49e59b204f2d0e64953eb5f Author: Jani Nikula Date: Mon May 9 15:03:00 2022 +0300 drm/edid: use else-if in CTA extension parsing Only one of the conditions can be true. Suggested-by: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/3a7ba2217134b0ab4c4c72e4333231a4e0616e88.1652097712.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit fa0e256450f27a7d85f65c63f05e6897954a1d53 Author: Javier Martinez Canillas Date: Thu May 5 14:04:18 2022 +0200 fbdev: vesafb: Allow to be built if COMPILE_TEST is enabled The driver has runtime but no build time dependency with X86, so it can be built for testing purposes if the COMPILE_TEST option is enabled. This is useful to have more build coverage and make sure that the driver is not affected by changes that could cause build regressions. Signed-off-by: Javier Martinez Canillas Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220505120419.314136-1-javierm@redhat.com drivers/video/fbdev/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3367aa7d74d240261de2543ddb35531ccad9d884 Author: Javier Martinez Canillas Date: Wed May 11 13:30:39 2022 +0200 fbdev: Restart conflicting fb removal loop when unregistering devices Drivers that want to remove registered conflicting framebuffers prior to register their own framebuffer, call to remove_conflicting_framebuffers(). This function takes the registration_lock mutex, to prevent a race when drivers register framebuffer devices. But if a conflicting framebuffer device is found, the underlaying platform device is unregistered and this will lead to the platform driver .remove callback to be called. Which in turn will call to unregister_framebuffer() that takes the same lock. To prevent this, a struct fb_info.forced_out field was used as indication to unregister_framebuffer() whether the mutex has to be grabbed or not. But this could be unsafe, since the fbdev core is making assumptions about what drivers may or may not do in their .remove callbacks. Allowing to run these callbacks with the registration_lock held can cause deadlocks, since the fbdev core has no control over what drivers do in their removal path. A better solution is to drop the lock before platform_device_unregister(), so unregister_framebuffer() can take it when called from the fbdev driver. The lock is acquired again after the device has been unregistered and at this point the removal loop can be restarted. Since the conflicting framebuffer device has already been removed, the loop would just finish when no more conflicting framebuffers are found. Suggested-by: Daniel Vetter Signed-off-by: Javier Martinez Canillas Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220511113039.1252432-1-javierm@redhat.com drivers/video/fbdev/core/fbmem.c | 22 +++++++++++++++------- include/linux/fb.h | 1 - 2 files changed, 15 insertions(+), 8 deletions(-) commit 945ae909aa76f55ac8c9e95feb3683512d39134a Author: Jani Nikula Date: Thu May 12 19:16:38 2022 +0300 drm/i915/audio: fix audio code enable/disable pipe logging Need to use pipe_name(pipe) instead of pipe directly. Fixes: 1f31e35f2e88 ("drm/i915/audio: unify audio codec enable/disable debug logging") Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220512161638.272601-1-jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 18fb42db05a0b93ab5dd5eab5315e50eaa3ca620 Author: Nathan Chancellor Date: Fri May 13 08:51:36 2022 +0100 drm/i915: Fix CFI violation with show_dynamic_id() When an attribute group is created with sysfs_create_group(), the ->sysfs_ops() callback is set to kobj_sysfs_ops, which sets the ->show() callback to kobj_attr_show(). kobj_attr_show() uses container_of() to get the ->show() callback from the attribute it was passed, meaning the ->show() callback needs to be the same type as the ->show() callback in 'struct kobj_attribute'. However, show_dynamic_id() has the type of the ->show() callback in 'struct device_attribute', which causes a CFI violation when opening the 'id' sysfs node under drm/card0/metrics. This happens to work because the layout of 'struct kobj_attribute' and 'struct device_attribute' are the same, so the container_of() cast happens to allow the ->show() callback to still work. Change the type of show_dynamic_id() to match the ->show() callback in 'struct kobj_attributes' and update the type of sysfs_metric_id to match, which resolves the CFI violation. Fixes: f89823c21224 ("drm/i915/perf: Implement I915_PERF_ADD/REMOVE_CONFIG interface") Signed-off-by: Nathan Chancellor Reviewed-by: Kees Cook Reviewed-by: Sami Tolvanen Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220513075136.1027007-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_perf.c | 4 ++-- drivers/gpu/drm/i915/i915_perf_types.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 21c47196aec3a93f913a7515e1e7b30e6c54d6c6 Author: Anusha Srivatsa Date: Tue May 10 17:08:47 2022 -0700 drm/i915/dmc: Add MMIO range restrictions Bspec has added some steps that check forDMC MMIO range before programming them v2: Fix for CI v3: move register defines to .h (Anusha) - Check MMIO restrictions per pipe - Add MMIO restricton for v1 dmc header as well (Lucas) v4: s/_PICK/_PICK_EVEN and use it only for Pipe DMC scenario. - clean up sanity check logic.(Lucas) - Add MMIO range for RKL as well.(Anusha) v5: Use DISPLAY_VER instead of per platform check (Lucas) BSpec: 49193 Cc: stable@vger.kernel.org Cc: Lucas De Marchi Signed-off-by: Anusha Srivatsa Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20220511000847.1068302-1-anusha.srivatsa@intel.com drivers/gpu/drm/i915/display/intel_dmc.c | 44 +++++++++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_dmc_regs.h | 18 ++++++++++- 2 files changed, 61 insertions(+), 1 deletion(-) commit 303760aa914b7f5ac9602dbb4b471a2ad52eeb3e Author: Umesh Nerlige Ramappa Date: Mon Apr 25 17:30:45 2022 -0700 i915/guc/reset: Make __guc_reset_context aware of guilty engines There are 2 ways an engine can get reset in i915 and the method of reset affects how KMD labels a context as guilty/innocent. (1) GuC initiated engine-reset: GuC resets a hung engine and notifies KMD. The context that hung on the engine is marked guilty and all other contexts are innocent. The innocent contexts are resubmitted. (2) GT based reset: When an engine heartbeat fails to tick, KMD initiates a gt/chip reset. All active contexts are marked as guilty and discarded. In order to correctly mark the contexts as guilty/innocent, pass a mask of engines that were reset to __guc_reset_context. Fixes: eb5e7da736f3 ("drm/i915/guc: Reset implementation for new GuC interface") Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Alan Previn Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20220426003045.3929439-1-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/gt/intel_reset.c | 2 +- drivers/gpu/drm/i915/gt/uc/intel_guc.h | 2 +- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 16 ++++++++-------- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 2 +- drivers/gpu/drm/i915/gt/uc/intel_uc.h | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) commit e4f0a7ec586b7644107839f5394fb685cf1aadcc Author: Ard Biesheuvel Date: Tue Apr 26 19:56:18 2022 +0200 pstore: migrate to crypto acomp interface The crypto 'compress' interface is deprecated, so before adding new features, migrate to the acomp interface. Note that we are only using synchronous implementations of acomp, so we don't have to deal with asynchronous completion. Signed-off-by: Ard Biesheuvel Signed-off-by: Kees Cook fs/pstore/platform.c | 63 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 51 insertions(+), 12 deletions(-) commit 3080c21a043abc83e56da9bb5942eb3f4b92c90e Author: Marek Vasut Date: Fri Apr 29 22:56:44 2022 +0200 drm/bridge: tc358767: Add DSI-to-(e)DP mode support Implement DSI-to-e(DP) mode, which is a mix of currently supported DSI-to-DPI and DPI-to-(e)DP modes. The input side is configured as either DSI or DPI, the DP AUX channel is registered for both input side options, and the DSI host is attached for both DPI and (e)DP output side options. One notable detail is that the DSI-to-(e)DP mode requires the Pixel PLL to be always enabled, which is not needed for DPI-to-(e)DP mode which gets the matching clock direct from DPI Pixel Clock instead. Signed-off-by: Marek Vasut Cc: Jonas Karlman Cc: Laurent Pinchart Cc: Lucas Stach Cc: Marek Vasut Cc: Maxime Ripard Cc: Neil Armstrong Cc: Robert Foss Cc: Sam Ravnborg Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220429205644.245480-2-marex@denx.de drivers/gpu/drm/bridge/tc358767.c | 40 +++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) commit d7fd32ecce914686756dedf586c8573e71f975a4 Author: Marek Vasut Date: Fri Apr 29 22:56:43 2022 +0200 drm/bridge: tc358767: Factor out DSI and DPI RX enablement Factor out register programming to configure the chip video RX side for reception of video data from DSI or DPI. This is particularly useful in the (e)DP output mode, where the video data can be received from either DPI or DSI. While only the former is supported in (e)DP output mode so far, this patch is added in preparation for addition of the later. There is a change in the order or register programming in case of the DSI-to-DPI mode. The DSI RX side is now programmed and enabled all in one place after the output mode has been configured. Before this change, the DSI RX has been programmed before the output mode has been set and only enabled afterward. The order makes no difference however, since the DSI RX is only enabled at the end either way. Signed-off-by: Marek Vasut Cc: Jonas Karlman Cc: Laurent Pinchart Cc: Lucas Stach Cc: Marek Vasut Cc: Maxime Ripard Cc: Neil Armstrong Cc: Robert Foss Cc: Sam Ravnborg Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220429205644.245480-1-marex@denx.de drivers/gpu/drm/bridge/tc358767.c | 94 ++++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 41 deletions(-) commit d2addf89c5abf4024574d42000313175c6e074fc Author: Jocelyn Falempe Date: Wed May 4 15:40:26 2022 +0200 drm/mgag200: Warn once if trying to set start address on broken hardware. Some MGA200 hardware is broken and can't use a start address > 0. v2: Warn if startaddr is not 0, and hw doesn't support it. (instead of removing MGAG200_FLAG_HW_BUG_NO_STARTADD) Signed-off-by: Jocelyn Falempe Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220504134026.283417-4-jfalempe@redhat.com drivers/gpu/drm/mgag200/mgag200_mode.c | 3 +++ 1 file changed, 3 insertions(+) commit c48a363016349352dac7e66cd1e823f73bff1fc4 Author: Jocelyn Falempe Date: Wed May 4 15:40:25 2022 +0200 drm/mgag200: Optimize damage clips When there are multiple damage clips, previous code merged them into one big rectangle. As the Matrox memory is very slow, it's faster to copy each damage clip. Signed-off-by: Jocelyn Falempe Reviewed-by: Lyude Paul Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220504134026.283417-2-jfalempe@redhat.com drivers/gpu/drm/mgag200/mgag200_mode.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 3064debaf55e1bc8f191871ca5f82697ef4c0951 Author: Jocelyn Falempe Date: Wed May 4 15:40:24 2022 +0200 drm/mgag200: Add FB_DAMAGE_CLIPS support The driver does support damage clips, but doesn't advertise it. So when running gnome/wayland on Matrox hardware, the full frame is copied to the slow Matrox memory, which leads to very poor performances. Add drm_plane_enable_fb_damage_clips() to advertise this capability to userspace. With this patch, gnome/wayland becomes usable on Matrox GPU. Suggested-by: Jonas Ådahl Signed-off-by: Jocelyn Falempe Reviewed-by: Lyude Paul Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220504134026.283417-2-jfalempe@redhat.com drivers/gpu/drm/mgag200/mgag200_mode.c | 2 ++ 1 file changed, 2 insertions(+) commit 7ecc3cc8a7b39f08eee9aea7b718187583342a70 Author: Imre Deak Date: Tue May 10 14:49:57 2022 +0300 drm/i915: Fix 'mixing different enum types' warnings in intel_display_power.c Fix the following sparse warnings: drivers/gpu/drm/i915/display/intel_display_power.c:2431:34: warning: mixing different enum types: drivers/gpu/drm/i915/display/intel_display_power.c:2431:34: unsigned int enum intel_display_power_domain drivers/gpu/drm/i915/display/intel_display_power.c:2431:34: int enum port drivers/gpu/drm/i915/display/intel_display_power.c:2442:37: warning: mixing different enum types: drivers/gpu/drm/i915/display/intel_display_power.c:2442:37: unsigned int enum intel_display_power_domain drivers/gpu/drm/i915/display/intel_display_power.c:2442:37: int enum port drivers/gpu/drm/i915/display/intel_display_power.c:2468:43: warning: mixing different enum types: drivers/gpu/drm/i915/display/intel_display_power.c:2468:43: unsigned int enum intel_display_power_domain drivers/gpu/drm/i915/display/intel_display_power.c:2468:43: unsigned int enum aux_ch drivers/gpu/drm/i915/display/intel_display_power.c:2479:35: warning: mixing different enum types: drivers/gpu/drm/i915/display/intel_display_power.c:2479:35: unsigned int enum intel_display_power_domain drivers/gpu/drm/i915/display/intel_display_power.c:2479:35: unsigned int enum aux_ch Fixes: 979e1b32e0e2 ("drm/i915: Sanitize the port -> DDI/AUX power domain mapping for each platform") Reported-by: Jani Nikula Cc: Jouni Högander Signed-off-by: Imre Deak Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220510114957.406070-1-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_display_power.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0f6e2fff575bb14abcb014fa02a9267351f55576 Author: Melissa Wen Date: Fri Apr 29 18:33:30 2022 -0100 MAINTAINERS: add Melissa to V3D maintainers I've been contributing to v3d through improvements, reviews, testing, debugging, etc. So, I'm adding myself as a co-maintainer of the V3D driver. Signed-off-by: Melissa Wen Acked-by: Juan A. Suarez Acked-by: Iago Toral Quiroga Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20220429193317.ol3u4e5jpt5jucox@mail.igalia.com MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit ef83e1198f9f7d7db0031c839bb1112cfee45b42 Author: Anusha Srivatsa Date: Wed May 4 13:22:12 2022 -0700 drm/i915/dmc: Load DMC on DG2 Add Support for DC states on Dg2. v2: Add dc9 as the max supported DC states and disable DC5. v3: set max_dc to 0. (Imre) Cc: Imre Deak Cc: Rodrigo Vivi Signed-off-by: Anusha Srivatsa Reviewed-by: Rodrigo Vivi (v1) Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20220504202213.740200-2-anusha.srivatsa@intel.com drivers/gpu/drm/i915/display/intel_display_power.c | 4 +++- drivers/gpu/drm/i915/display/intel_dmc.c | 10 +++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) commit aebeb02dfccb61d6930112aede2db3db5b8e974e Author: Jayshri Pawar Date: Mon Apr 11 16:06:06 2022 +0200 drm/bridge: cdns-dsi: Add support for pre_enable and post_enable control functions. Add support for pre_enable and post_enable drm bridge control functions. Making sure that host to be prepared before panel is powered up, for the panels like TC358762. Signed-off-by: Jayshri Pawar Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220411140606.15654-1-jpawar@cadence.com drivers/gpu/drm/bridge/cdns-dsi.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit dbb3cd0c81c28e38f8e3528d1cea4d9c0c6c7317 Author: Javier Martinez Canillas Date: Mon May 9 15:08:46 2022 +0200 drm/todo: Add entry for converting kselftests to kunit Many of the kselftests in DRM can be converted to kunit tests instead, since that framework is more suitable for unit testing. Suggested-by: Maxime Ripard Signed-off-by: Javier Martinez Canillas Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20220509130846.694397-1-javierm@redhat.com Documentation/gpu/todo.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 7454a7e72b3c679ddb723a9e79be65b62d4412f5 Author: Javier Martinez Canillas Date: Thu May 5 19:26:10 2022 +0200 MAINTAINERS: Add simpledrm driver co-maintainer Thomas asked me to serve as co-maintainer for the simpledrm driver. Signed-off-by: Javier Martinez Canillas Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220505172610.338299-1-javierm@redhat.com MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 708d19d9f362766147cab79eccae60912c6d3068 Author: Christian König Date: Tue May 10 13:26:46 2022 +0200 drm/amdgpu: move internal vram_mgr function into the C file No need to have those in the header. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/20220510113649.879821-2-christian.koenig@amd.com drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 29 ++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h | 27 -------------------------- 2 files changed, 29 insertions(+), 27 deletions(-) commit 5e3f1e7729ec7a99e145e9d8ed58963d86cdfb98 Author: Christian König Date: Tue May 10 12:52:05 2022 +0200 drm/amdgpu: fix start calculation in amdgpu_vram_mgr_new We still need to calculate a virtual start address for the resource to aid checking of it is visible or not. Only matters on small BAR systems, but better save than sorry. Signed-off-by: Christian König Acked-by: Alex Deucher Reviewed-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/20220510113649.879821-1-christian.koenig@amd.com drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 047de3f17a8321065c32ee3f6272a6dba16d6bcf Author: Christian König Date: Mon May 9 09:47:12 2022 +0200 drm/amdgpu: switch DM to atomic fence helpers v2 This gives us the standard atomic implicit and explicit fencing rules. v2: move the wait to amdgpu_dm_atomic_commit_tail Signed-off-by: Christian König Reviewed-by: Daniel Vetter Cc: Harry Wentland Cc: Nicholas Kazlauskas Cc: Roman Li Cc: Qingqing Zhuo Cc: Jude Shih Cc: Wayne Lin Cc: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20220509074712.163899-1-christian.koenig@amd.com drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit ad5f74f3420183052532a220edd9a37aba92724a Author: Lucas De Marchi Date: Thu May 5 14:38:12 2022 -0700 drm/i915/pvc: read fuses for link copy engines The new Link Copy engines in PVC may be fused off according to the mslice_mask. Each bit of the MEML3_EN_MASK we read from the GEN10_MIRROR_FUSE3 register disables a pair of link copy engines. v2 (Tvrtko): - Minor cosmetic changes: s/u8/unsigned long/, use instance local variable. (Tvrtko) Bspec: 44483 Cc: Matt Roper Cc: Tvrtko Ursulin Signed-off-by: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20220505213812.3979301-13-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_engine_cs.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 1a1a5a315ee805bec457fd214250c088efadb50b Author: Lucas De Marchi Date: Thu May 5 14:38:11 2022 -0700 drm/i915/pvc: skip all copy engines from aux table invalidate As we have more copy engines now, mask all of them from aux table invalidate. v2 (MattR): - Use I915_MAX_BCS to determine mask rather than hardcoding BCS8. (Prathap) Cc: Prathap Kumar Valsan Signed-off-by: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Reviewed-by: Prathap Kumar Valsan Link: https://patchwork.freedesktop.org/patch/msgid/20220505213812.3979301-12-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8caaf7ad659da9b757781d5f08ce0bf98801931e Author: Matt Roper Date: Thu May 5 14:38:10 2022 -0700 drm/i915/pvc: Reset support for new copy engines Add the reset support for new copy engines in PVC. Bspec: 52549 Original-author: CQ Tang Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Reviewed-by: Stuart Summers Link: https://patchwork.freedesktop.org/patch/msgid/20220505213812.3979301-11-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_engine_cs.c | 8 ++++++ drivers/gpu/drm/i915/gt/intel_gt_regs.h | 44 ++++++++++++++++++------------- 2 files changed, 34 insertions(+), 18 deletions(-) commit 500d7135c924024ed2e5e62b03dd9b3b6257fa10 Author: Matt Roper Date: Thu May 5 14:38:09 2022 -0700 drm/i915/pvc: Interrupt support for new copy engines Add the interrupt handler support for new copy engines. Bspec: 54030 Original-author: CQ Tang Signed-off-by: Matt Roper Reviewed-by: Stuart Summers Link: https://patchwork.freedesktop.org/patch/msgid/20220505213812.3979301-10-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_irq.c | 16 ++++++++++++++++ drivers/gpu/drm/i915/gt/intel_gt_regs.h | 4 ++++ 2 files changed, 20 insertions(+) commit 69f8afdb45e7775840693bce42da79d9c22c2e83 Author: Matt Roper Date: Thu May 5 14:38:08 2022 -0700 drm/i915/pvc: Engine definitions for new copy engines This patch adds the basic definitions needed to support new copy engines. Also updating the cmd_info to accommodate new engines, as the engine id's of legacy engines have been changed. v2: - Add _BCS(n) definition, similar to other engines. (Tvrtko) - Add I915_MAX_BCS definition, similar to other engnes. (Prathap) - Move GVT change to avoid u16 overflow to its own patch. (Tvrtko) Original-author: CQ Tang Cc: Tvrtko Ursulin Cc: Prathap Kumar Valsan Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20220505213812.3979301-9-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_engine_cs.c | 56 ++++++++++++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_engine_types.h | 12 +++++- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 8 ++++ drivers/gpu/drm/i915/i915_reg.h | 8 ++++ 4 files changed, 83 insertions(+), 1 deletion(-) commit 93d9e0453e2bb599e0bcced1b914f9b4010180a1 Author: Matt Roper Date: Thu May 5 14:38:07 2022 -0700 drm/i915/gvt: Use intel_engine_mask_t for ring mask When i915 adds additional PVC blitter instances (in an upcoming patch), the definition of VECS0 will change from bit(10) to bit(18), causing GVT's R_ALL mask to overflow the u16 storage that's currently used. Let's replace the u16 with an intel_engine_mask_t to ensure we avoid this. Cc: Tvrtko Ursulin Cc: Zhi Wang Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20220505213812.3979301-8-matthew.d.roper@intel.com drivers/gpu/drm/i915/gvt/cmd_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6cd96877c7da6bc3a28ef0bcb3bc7470f4dd9aa6 Author: John Harrison Date: Thu May 5 14:38:06 2022 -0700 drm/i915/pvc: Reduce stack usage in reset selftest with extra blitter engine PVC adds extra blitter engines (in the following patch). The reset selftest has a local array on the stack which is sized by the number of engines. The increase pushes the size of this array to the point where it trips the 'stack too large' compile warning. This patch takes the allocation of the stack and makes it dynamic instead. v2 (MattR): - Minor cosmetic changes: re-sort definition and allocate using kmalloc_array(). (Tvrtko) Cc: Tvrtko Ursulin Signed-off-by: John Harrison Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20220505213812.3979301-7-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 4de23dca7ec8dfb191ea80fbfe3f008d4ed52346 Author: Matt Roper Date: Thu May 5 14:38:04 2022 -0700 drm/i915/pvc: Read correct RP_STATE_CAP register The SoC registers, including RP_STATE_CAP, have moved to a new location in GTTMMADR on Ponte Vecchio. We need to update the register offset accordingly. Cc: Rodrigo Vivi Signed-off-by: Matt Roper Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20220505213812.3979301-5-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_rps.c | 4 +++- drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit 9d67edba730c4663eb7d87771123c3fb86ba606d Author: Ayaz A Siddiqui Date: Thu May 5 14:38:03 2022 -0700 drm/i915/pvc: Define MOCS table for PVC v2 (MattR): - Clarify comment above RING_CMD_CCTL programming. - Remove bspec reference from field definition. (Lucas) - Add WARN if we try to use a (presumably uninitialized) wb_index of 0. On most platforms 0 is an invalid MOCS entry and even on the ones where it isn't, it isn't the right setting for wb_index. (Lucas) Bspec: 45101, 72161 Cc: Lucas De Marchi Signed-off-by: Ayaz A Siddiqui Signed-off-by: Fei Yang Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20220505213812.3979301-4-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_types.h | 1 + drivers/gpu/drm/i915/gt/intel_mocs.c | 24 ++++++++++++++++++++++- drivers/gpu/drm/i915/gt/intel_workarounds.c | 30 +++++++++++++++++++++++------ drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_pci.c | 3 ++- drivers/gpu/drm/i915/intel_device_info.h | 1 + 6 files changed, 53 insertions(+), 8 deletions(-) commit e090532246fe17609b08ba0a862428867426dc95 Author: Minghao Chi Date: Fri Apr 29 05:51:45 2022 +0000 drm/bridge: simplify the return expression of ps8640_bridge_host_attach Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20220429055145.3852271-1-chi.minghao@zte.com.cn drivers/gpu/drm/bridge/parade-ps8640.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 429e1fc1b2c257f35b6a1318eb3a1ffb80bc6640 Author: Lucas De Marchi Date: Mon May 2 23:15:56 2022 -0700 drm/i915/gem: Make drop_pages() return bool Commit e4e806253003 ("drm/i915: Change shrink ordering to use locking around unbinding.") changed the return type to int without changing the return values or their meaning to "0 is success". Move it back to boolean. Signed-off-by: Lucas De Marchi Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20220503061556.513175-1-lucas.demarchi@intel.com drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c01aa13894fa0049ea8c96c271318ca353a77f1 Author: Yuanzheng Song Date: Thu Apr 28 06:39:24 2022 +0000 dma-buf: add the name field to the table header 'cat /sys/kernel/debug/dma_buf/bufinfo' will print the Dma-buf Objects' information when the CONFIG_DEBUG_FS=y. However, the printed table header information does not contain the name field. So we need to add the name field to the table header and use the '' to replace the empty buf_obj->name. Signed-off-by: Yuanzheng Song Reviewed-by: Christian König Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20220428063924.3570409-1-songyuanzheng@huawei.com drivers/dma-buf/dma-buf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b499914eb83765a27e3b43f216e9d1bdf4265418 Author: Tvrtko Ursulin Date: Fri Apr 29 11:04:14 2022 +0100 drm/i915: Only setup private tmpfs mount when needed and fix logging If i915 does not want to use huge pages there is a) no point in setting up the private mount and b) should former fail, it is misleading to log THP support is disabled in the caller, which does not even know if callee tried to enable it. Fix both by restructuring the flow in i915_gemfs_init and at the same time note the failure to set it up in all cases. Signed-off-by: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Matthew Auld Cc: Eero Tamminen Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220429100414.647857-2-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 11 ++------ drivers/gpu/drm/i915/gem/i915_gemfs.c | 45 ++++++++++++++----------------- drivers/gpu/drm/i915/gem/i915_gemfs.h | 3 +-- 3 files changed, 23 insertions(+), 36 deletions(-) commit 23dd74db02d75579d8d4eb0b88c7ad119e782269 Author: Tvrtko Ursulin Date: Fri Apr 29 11:04:13 2022 +0100 drm/i915: Enable THP on Icelake and beyond We have a statement from HW designers that the GPU read regression when using 2M pages was fixed from Icelake onwards, which was also confirmed by bencharking Eero did last year: """ When IOMMU is disabled, enabling THP causes following perf changes on TGL-H (GT1): 10-15% SynMark Batch[0-3] 5-10% MemBW GPU texture, SynMark ShMapVsm 3-5% SynMark TerrainFly* + Geom* + Fill* + CSCloth + Batch4 1-3% GpuTest Triangle, SynMark TexMem* + DeferredAA + Batch[5-7] + few others -7% MemBW GPU blend In the above 3D benchmark names, * means all the variants of tests with the same prefix. For example "SynMark TexMem*", means both TexMem128 & TexMem512 tests in the synthetic (Intel internal) SynMark test suite. In the (public, but proprietary) GfxBench & GLB(enchmark) test suites, there are both onscreen and offscreen variants of each test. Unless explicitly stated otherwise, numbers are for both variants. All tests are run with FullHD monitor. All tests are fullscreen except for GLB and GpuTest ones, which are run in 1/2 screen window (GpuTest triangle is run both in fullscreen and 1/2 screen window). """ Since the only regression is MemBW GPU blend, against many more gains, it sounds it is time to enable THP on Gen11+. Signed-off-by: Tvrtko Ursulin References: https://gitlab.freedesktop.org/drm/intel/-/issues/430 Cc: Joonas Lahtinen Cc: Matthew Auld Cc: Eero Tamminen Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220429100414.647857-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gem/i915_gemfs.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 3507932390bbfcf7c69dff9843f1c9da6ed4b861 Author: Christian König Date: Fri Feb 18 10:05:40 2022 +0100 drm/ttm: move default BO destructor into VMWGFX v2 It's the only driver using this. v2: use BUG_ON() in vmw_bo_create() as suggested by Zack Signed-off-by: Christian König Reviewed-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20220329110243.6335-5-christian.koenig@amd.com drivers/gpu/drm/ttm/ttm_bo.c | 9 +-------- drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 10 +++++++++- 2 files changed, 10 insertions(+), 9 deletions(-) commit e9794c88cd6cf4be4a79188916a75539751f532c Author: Jani Nikula Date: Wed May 4 21:37:15 2022 +0300 drm/i915: remove single-use GEM_DEBUG_EXEC() Reduce the magic of what's going on in GEM_DEBUG_EXEC() by expanding it inline and being explicit about it. It's as single use case anyway, so the macro feels overkill. Cc: Tvrtko Ursulin Signed-off-by: Jani Nikula Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220504183716.987793-2-jani.nikula@intel.com drivers/gpu/drm/i915/gt/intel_ring.c | 3 ++- drivers/gpu/drm/i915/i915_gem.h | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) commit 1b93ff4d0679190e8812cd0d0b3aebfcba1ed883 Author: Jani Nikula Date: Wed May 4 21:37:14 2022 +0300 drm/i915: remove unused GEM_DEBUG_DECL() and GEM_DEBUG_BUG_ON() There are already too many choices here, take away the unused ones. Cc: Tvrtko Ursulin Signed-off-by: Jani Nikula Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220504183716.987793-1-jani.nikula@intel.com drivers/gpu/drm/i915/i915_gem.h | 4 ---- 1 file changed, 4 deletions(-) commit f0eaf60c67738da8aae786bda74a2fffeca6d7cc Author: Colin Ian King Date: Thu May 5 12:10:44 2022 +0100 drm/rockchip: Fix spelling mistake "aligened" -> "aligned" There is a spelling mistake in a drm_err message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20220505111044.374174-1-colin.i.king@gmail.com drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 813bb91da10bb6638dfadad73f2f0a5f9883946b Author: Yang Li Date: Fri May 6 07:26:59 2022 +0800 drm/rockchip: remove unneeded semicolon from vop2 driver Eliminate the following coccicheck warning: ./drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:1476:2-3: Unneeded semicolon Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20220505232659.4405-1-yang.lee@linux.alibaba.com drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b752df77633cc4c3606a6187e3ad37ad6925c15 Author: Ren Zhijie Date: Sat May 7 18:09:10 2022 +0800 drm/rockchip: Fix Kconfig dependencies for display-port encoders The DP-helper module has been replaced by the display-helper module. So the driver have to select it. Reported-by: Hulk Robot Fixes: 1e0f66420b13("drm/display: Introduce a DRM display-helper module") Signed-off-by: Ren Zhijie Reviewed-by: Andy Yan Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20220507100910.93705-1-renzhijie2@huawei.com drivers/gpu/drm/rockchip/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b15a7357a84f091fde8ce35bf2fd494150ad4bd0 Author: José Roberto de Souza Date: Thu May 5 12:35:24 2022 -0700 drm/i915: Drop has_psr from device info No need to have this parameter in intel_device_info struct as all platforms with display version 9 or newer has this feature. As a side effect of the of removal this flag, it will not be printed in dmesg during driver load anymore and developers will have to rely on to check the macro and compare with platform being used and IP versions of it. Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20220505193524.276400-7-jose.souza@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_pci.c | 3 --- drivers/gpu/drm/i915/intel_device_info.h | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) commit eb86f645ab9b90c47de7ebe229feae7ac999421b Author: José Roberto de Souza Date: Thu May 5 12:35:23 2022 -0700 drm/i915: Drop has_dp_mst from device info No need to have this parameter in intel_device_info struct as the requirement to support it is the DDI support. As a side effect of the of removal this flag, it will not be printed in dmesg during driver load anymore and developers will have to rely on to check the macro and compare with platform being used and IP versions of it. Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20220505193524.276400-6-jose.souza@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_pci.c | 3 --- drivers/gpu/drm/i915/intel_device_info.h | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) commit efd01cd3c27636bc4840057a03839e54abaf11dc Author: José Roberto de Souza Date: Thu May 5 12:35:22 2022 -0700 drm/i915: Drop has_ddi from device info No need to have this parameter in intel_device_info struct as all platforms with display version 9 or newer, haswell or broadwell supports it. As a side effect of the of removal this flag, it will not be printed in dmesg during driver load anymore and developers will have to rely on to check the macro and compare with platform being used and IP versions of it. Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20220505193524.276400-5-jose.souza@intel.com drivers/gpu/drm/i915/i915_drv.h | 4 +++- drivers/gpu/drm/i915/i915_pci.c | 3 --- drivers/gpu/drm/i915/intel_device_info.h | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) commit b6411373d3954c8fe4617c27f90f773108b0ab03 Author: José Roberto de Souza Date: Thu May 5 12:35:21 2022 -0700 drm/i915: Drop has_logical_ring_elsq from device info No need to have this parameter in intel_device_info struct as all platforms with graphics version 11 or newer has this feature. As a side effect of the of removal this flag, it will not be printed in dmesg during driver load anymore and developers will have to rely on to check the macro and compare with platform being used and IP versions of it. Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20220505193524.276400-4-jose.souza@intel.com drivers/gpu/drm/i915/i915_drv.h | 3 +-- drivers/gpu/drm/i915/i915_pci.c | 4 +--- drivers/gpu/drm/i915/intel_device_info.h | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) commit 922abe4d19bd21b38298f3902674774b92a49293 Author: José Roberto de Souza Date: Thu May 5 12:35:20 2022 -0700 drm/i915: Drop has_reset_engine from device info No need to have this parameter in intel_device_info struct as all platforms with graphics version 7 or newer can reset engines. As a side effect of the of removal this flag, it will not be printed in dmesg during driver load anymore and developers will have to rely on to check the macro and compare with platform being used and IP versions of it. Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20220505193524.276400-3-jose.souza@intel.com drivers/gpu/drm/i915/gt/intel_reset.c | 2 +- drivers/gpu/drm/i915/i915_pci.c | 5 ----- drivers/gpu/drm/i915/intel_device_info.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) commit 218076abbcd647de46635d21331a34b814f90906 Author: José Roberto de Souza Date: Thu May 5 12:35:19 2022 -0700 drm/i915: Drop has_rc6 from device info No need to have this parameter in intel_device_info struct as all platforms with graphics version 6 or newer have software support for this feature. As a side effect of the of removal this flag, it will not be printed in dmesg during driver load anymore and developers will have to rely on to check the macro and compare with platform being used and IP versions of it. Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20220505193524.276400-2-jose.souza@intel.com drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_pci.c | 8 -------- drivers/gpu/drm/i915/intel_device_info.h | 1 - 3 files changed, 2 insertions(+), 10 deletions(-) commit 222ff6db8a0dcb86f2bb65fc8656aec635a737a6 Author: José Roberto de Souza Date: Thu May 5 12:35:18 2022 -0700 drm/i915: Drop has_gt_uc from device info No need to have this parameter in intel_device_info struct as all platforms with graphics version 9 or newer has graphics microcontroller. As a side effect of the of removal this flag, it will not be printed in dmesg during driver load anymore and developers will have to rely on to check the macro and compare with platform being used and IP versions of it. Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20220505193524.276400-1-jose.souza@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/i915_pci.c | 3 --- drivers/gpu/drm/i915/intel_device_info.h | 1 - 4 files changed, 2 insertions(+), 6 deletions(-) commit 16c8d76abe83d75b578d72ee22d25a52c764e14a Author: Marek Vasut Date: Wed May 4 03:26:01 2022 +0200 dt-bindings: display: bridge: ldb: Fill in reg property Add missing reg and reg-names properties for both 'LDB_CTRL' and 'LVDS_CTRL' registers. Fixes: 463db5c2ed4ae ("drm: bridge: ldb: Implement simple Freescale i.MX8MP LDB bridge") Signed-off-by: Marek Vasut Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Peng Fan Cc: Rob Herring Cc: Robby Cai Cc: Robert Foss Cc: Sam Ravnborg Cc: Thomas Zimmermann Cc: devicetree@vger.kernel.org To: dri-devel@lists.freedesktop.org Reviewed-by: Rob Herring Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220504012601.423644-1-marex@denx.de .../devicetree/bindings/display/bridge/fsl,ldb.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 09708b6d82ef473de91c49d90f35e38b0db463f5 Author: YueHaibing Date: Fri May 6 11:26:52 2022 +0800 drm/i915/gt: Fix build error without CONFIG_PM drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c: In function ‘act_freq_mhz_show’: drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c:276:20: error: implicit declaration of function ‘sysfs_gt_attribute_r_max_func’ [-Werror=implicit-function-declaration] 276 | u32 actual_freq = sysfs_gt_attribute_r_max_func(dev, attr, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Move sysfs_gt_attribute_* macros out of #ifdef block to fix this. Fixes: 56a709cf7746 ("drm/i915/gt: Create per-tile RPS sysfs interfaces") Signed-off-by: YueHaibing Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220506032652.1856-1-yuehaibing@huawei.com drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69ed3dd6be9cf5d75252940b9a927dff4bab7860 Author: Liu Ying Date: Tue Apr 19 09:08:48 2022 +0800 drm/bridge: nwl-dsi: Set PHY mode in nwl_dsi_mode_set() The Northwest Logic MIPI DSI host controller embedded in i.MX8qxp works with a Mixel MIPI DPHY + LVDS PHY combo to support either a MIPI DSI display or a LVDS display. So, this patch calls phy_set_mode() from nwl_dsi_mode_set() to set PHY mode to MIPI DPHY explicitly. Cc: Guido Günther Cc: Robert Chiras Cc: Martin Kepplinger Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: David Airlie Cc: Daniel Vetter Cc: NXP Linux Team Signed-off-by: Liu Ying Acked-by: Robert Foss Reviewed-by: Guido Günther Signed-off-by: Guido Günther Link: https://patchwork.freedesktop.org/patch/msgid/20220419010852.452169-2-victor.liu@nxp.com drivers/gpu/drm/bridge/nwl-dsi.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 91875c22a31be0bdf91d7ec651bb6b083b35ac37 Author: Tvrtko Ursulin Date: Thu May 5 12:00:07 2022 +0100 drm/i915: Don't use DRM_DEBUG_WARN_ON for ring unexpectedly not idle DRM_DEBUG_WARN_ON should only be used when we are certain CI is guaranteed to exercise a certain code path, so in case of values coming from MMIO reads we cannot be sure CI will have all the possible SKUs and parts, or that it will catch all possible error conditions. Use drm_warn instead. Signed-off-by: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Jani Nikula Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20220505110007.943449-2-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/intel_ring_submission.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e6c2db2be986158afb9991d9fa8a38fe65a88516 Author: Tvrtko Ursulin Date: Thu May 5 12:00:06 2022 +0100 drm/i915: Don't use DRM_DEBUG_WARN_ON for unexpected l3bank/mslice config DRM_DEBUG_WARN_ON should only be used when we are certain CI is guaranteed to exercise a certain code path, so in case of values coming from MMIO reads we cannot be sure CI will have all the possible SKUs and parts. Use drm_warn instead and move logging to init phase while at it. v2: * GEM_WARN_ON in intel_gt_get_valid_steering. Signed-off-by: Tvrtko Ursulin Cc: Matt Roper Cc: Jani Nikula Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220505110007.943449-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/intel_gt.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 56ca3117f77a23a8b24e73e458bc85c11e5dea31 Author: Daniele Ceraolo Spurio Date: Wed May 4 13:48:16 2022 -0700 drm/i915/huc: Don't fail the probe if HuC init fails The previous patch introduced new failure cases in the HuC init flow that can be hit by simply changing the config, so we want to avoid failing the probe in those scenarios. HuC load failure is already considered a non-fatal error and we have a way to report to userspace if the HuC is not available via a dedicated getparam, so no changes in expectation there. The error message in the HuC init code has also been lowered to info to avoid throwing error message for an expected behavior. Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20220504204816.2082588-5-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/uc/intel_huc.c | 2 +- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) commit 6f67930af78f10ac7a1a9ba81ec606a9bd07749f Author: Daniele Ceraolo Spurio Date: Wed May 4 13:48:15 2022 -0700 drm/i915/huc: Prepare for GSC-loaded HuC HuC loading via GSC is performed via a PXP command sent through the mei modules, so we need both MEI_GSC and MEI_PXP to be available. Given that the GSC will do both the transfer and the authentication, the legacy HuC loading paths can be safely skipped. Also note that the GSC-loaded HuC survives GT reset. v2: move the huc_is_authenticated() function to this patch. Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20220504204816.2082588-4-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h | 1 + drivers/gpu/drm/i915/gt/uc/intel_huc.c | 95 +++++++++++++++++++++++++----- drivers/gpu/drm/i915/gt/uc/intel_huc.h | 6 ++ drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c | 5 +- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 11 +++- 5 files changed, 100 insertions(+), 18 deletions(-) commit a7b516bd981f11feb0c9f5ee3d149855d48cb2c8 Author: Daniele Ceraolo Spurio Date: Wed May 4 13:48:14 2022 -0700 drm/i915/huc: Add fetch support for gsc-loaded HuC binary On newer platforms (starting DG2 G10 B-step and G11 A-step), ownership of HuC loading has been moved from the GuC to the GSC. As part of the change, the header format of the HuC binary has been updated and does not match the GuC anymore. The GSC will perform all the required checks on the binary size, so we only need to check that the version matches. Note that since we still haven't added any gsc-loaded FWs, the loaded_via_gsc variable will always be kept to its initialization value of zero. v2: Add a note about loaded_via_gsc being zero (Alan) Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20220504204816.2082588-3-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 99 +++++++++++++++++----------- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 2 + drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h | 9 +++ 3 files changed, 72 insertions(+), 38 deletions(-) commit 315241d2d9102a90f71bd6c9e7dd06a1c831a184 Author: Daniele Ceraolo Spurio Date: Wed May 4 13:48:13 2022 -0700 drm/i915/huc: drop intel_huc_is_authenticated The function name is confusing, because it doesn't check the actual auth status in HW but the SW status. Given that there is only one user (the huc_auth function itself), just get rid of it and use the FW status checker directly. Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20220504204816.2082588-2-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/uc/intel_huc.c | 2 +- drivers/gpu/drm/i915/gt/uc/intel_huc.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) commit a5c89f7c43c12c592a882a0ec2a15e9df0011e80 Author: Matthew Brost Date: Wed May 4 16:46:36 2022 -0700 drm/i915/guc: Support programming the EU priority in the GuC descriptor In GuC submission mode the EU priority must be updated by the GuC rather than the driver as the GuC owns the programming of the context descriptor. Given that the GuC code uses the GuC priorities, we can't use a generic function using i915 priorities for both execlists and GuC submission. The existing function has therefore been pushed to the execlists back-end while a new one has been added for GuC. v2: correctly use the GuC prio. Cc: John Harrison Cc: Matt Roper Signed-off-by: Matthew Brost Signed-off-by: Aravind Iddamsetty Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20220504234636.2119794-1-daniele.ceraolospurio@intel.com .../gpu/drm/i915/gt/intel_execlists_submission.c | 12 +++++++++++- drivers/gpu/drm/i915/gt/intel_lrc.h | 10 ---------- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 22 ++++++++++++++++++++++ 3 files changed, 33 insertions(+), 11 deletions(-) commit d792ec62ae1260df2e54dc41103aad3b19bad948 Author: Jiapeng Chong Date: Thu May 5 16:13:45 2022 +0800 drm/nouveau/gr/gf100-: Clean up some inconsistent indenting Eliminate the follow smatch warning: drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c:1925 gf100_gr_oneinit_tiles() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220505081345.89762-1-jiapeng.chong@linux.alibaba.com drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6ff1c19f5f28dbc396462032dcbfdb8b64795415 Author: Jani Nikula Date: Tue May 3 12:24:05 2022 +0300 drm/edid: sunset drm_find_cea_extension() Convert drm_find_cea_extension() to a predicate function to check if the EDID has a CTA extension or a DisplayID CTA data block. This is mainly to avoid adding new users that only find the first CTA extension. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/a5bf228942e6bd0fc70d5cf7a14c249a14a7afcd.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 58304630b830a1c27457ce2e3a0912555b43d03e Author: Jani Nikula Date: Tue May 3 12:24:04 2022 +0300 drm/edid: skip CTA extension scan in drm_edid_to_eld() just for CTA rev The DisplayID CTA data block version does not necessarily match the CTA revision. Simplify by postponing drm_edid_to_eld() slightly, and reusing the CTA revision extracted by drm_parse_cea_ext(). By not bailing out early in drm_edid_to_eld() we may end up filling meaningless data to the ELD. However, the main decision for audio is not the ELD, but rather drm_detect_monitor_audio() called by drivers. (Arguably a future cleanup could do that in drm_add_edid_modes() and cache the result in the connector.) Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/163ebbfd765066acbfc267256fb3b67fc711a78d.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 8db73897698ccb4eb70ab103245372569ff5a5ec Author: Jani Nikula Date: Thu May 5 13:52:42 2022 +0300 drm/edid: detect color formats and CTA revision in all CTA extensions Convert drm_find_cea_extension() to EDID block iterator in color format and CTA revision detection. Detect them in all CTA extensions. Also parse CTA Data Blocks in DisplayID even if there's no CTA EDID extension. v2: - Don't assume DRM_COLOR_FORMAT_RGB444 support if there's only DisplayID CTA Data Blocks (Ville) Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220505105242.1198521-1-jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 705bec3eca9b712fe006b7e4d6b4cd4dc6b57d36 Author: Jani Nikula Date: Tue May 3 12:24:02 2022 +0300 drm/edid: detect basic audio in all CEA extensions Convert drm_find_cea_extension() to EDID block iterator in basic audio detection. Detect basic audio in all CEA extensions. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/59481d0397de4b91b3e6ea665882334e92538f40.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 49a62a2923e523e5359219ed54d643c60f3374f8 Author: Jani Nikula Date: Tue May 3 12:24:01 2022 +0300 drm/edid: restore some type safety to cea_db_*() functions During the transition, we accepted a void pointer for a poor C programmer's version of polymorphism. Switch the functions to use struct cea_db * to regain some more type safety. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/c6ad496cdadea1bb598711a65ef536f4a43b74a7.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 2af243444f9100639451b11d311982279e00cc16 Author: Jani Nikula Date: Tue May 3 12:24:00 2022 +0300 drm/edid: sunset the old unused cea data block iterators All CTA data block iteration has now been converted to the new cea db iterators. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/a5b35ed0e711bd874f76ae87ee0b70150d0a77c4.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 45 --------------------------------------------- 1 file changed, 45 deletions(-) commit 37852141965d467a4ae118139b6eee266e7d953c Author: Jani Nikula Date: Tue May 3 12:23:59 2022 +0300 drm/edid: convert drm_edid_to_eld() to use cea db iter Iterate through all CTA data blocks across all CTA extensions and DisplayID data blocks. This may gather more data than before, and if there's duplicated data, some is overwritten by whichever comes last. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/8bdc67aa731857111eddd08a9c192d41d40b5f5a.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 64 +++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 35 deletions(-) commit dfc0312596561ac462308fae32130a0c580b7ac1 Author: Jani Nikula Date: Tue May 3 12:23:58 2022 +0300 drm/edid: convert drm_parse_cea_ext() to use cea db iter Iterate through all CTA data blocks across all CTA Extensions and DisplayID data blocks. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/7400792525c13f58652f288b891d6057637ed4c8.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 9975af040a04ba9aef33f3ef1ca4e8f04c7223dd Author: Jani Nikula Date: Tue May 3 12:23:57 2022 +0300 drm/edid: convert drm_detect_monitor_audio() to use cea db iter Iterate through all CEA data blocks. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/a7f0c380da9526f8dd6f758d7a748bca7b4da6ce.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 4ce08703a8c4be77b060aefd14eda272f50a45e4 Author: Jani Nikula Date: Tue May 3 12:23:56 2022 +0300 drm/edid: convert drm_detect_hdmi_monitor() to use cea db iter Iterate through all CTA data blocks, not just the first CTA extension. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/b867e7b628189d2f8fa7eac5b9aa701892724711.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit b07debc2a8ce7324c85479a28d145eaa05382286 Author: Jani Nikula Date: Tue May 3 12:23:55 2022 +0300 drm/edid: convert drm_edid_to_sad() to use cea db iter Use the cea db iterator for short audio descriptors. We'll still stop at the first audio data block, but not at the first CTA Extension if that doesn't have the info. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/237e4b1de1567903d37ce1d1bb830020b8fd6690.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) commit ed3173077d3fa6fd085960aa6347ec30f532bf31 Author: Jani Nikula Date: Tue May 3 12:23:54 2022 +0300 drm/edid: convert drm_edid_to_speaker_allocation() to use cea db iter Use the cea db iterator for speaker allocation. We'll still stop at the first speaker data block, but not at the first CTA extension if that doesn't have the info. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/0b9e7f136854055a14b826097160fe0b43b9f3d1.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 47 +++++++++++++++------------------------------- 1 file changed, 15 insertions(+), 32 deletions(-) commit 537d9ed2f6c1dbfe8465365c2f74a855ffad5e6a Author: Jani Nikula Date: Tue May 3 12:23:53 2022 +0300 drm/edid: convert add_cea_modes() to use cea db iter Iterate through all CTA EDID extension blocks and DisplayID CTA data blocks to add CEA modes. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/dfa2d79db61d5eea543bef7aca7d80da3e71f99d.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 67 +++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 36 deletions(-) commit a9ec4fd004b84c26207a8cae41662c501c8a284b Author: Jani Nikula Date: Tue May 3 12:23:52 2022 +0300 drm/edid: clean up cea_db_is_*() functions Abstract helpers for matching vendor data blocks and extended tags, and use them to simplify all the cea_db_is_*() functions. Take void pointer as parameter to allow transitional use for both u8 * and struct cea_db *. v2: Remove superfluous parens (Ville) Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/b6bb813afc35c763e744c6cdb4a787da3adf910b.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 127 ++++++++++++++------------------------------- 1 file changed, 40 insertions(+), 87 deletions(-) commit aba5825439d7691343aa562dfeaf6616455bcb01 Author: Jani Nikula Date: Tue May 3 12:23:51 2022 +0300 drm/edid: add iterator for CTA data blocks Add an iterator for CTA Data Blocks across EDID CTA Extensions and DisplayID CTA Data Blocks. v2: Update references, note why we can trust displayid ranges (Ville) Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/37fdd2d9eabc73aaa9f95c56246dc47aea0e8e4e.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 202 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 190 insertions(+), 12 deletions(-) commit 94afc5382669c3a201c5817c47b57a879b6dabce Author: Jani Nikula Date: Tue May 3 12:23:50 2022 +0300 drm/edid: add iterator for EDID base and extension blocks Add an iterator abstraction for going through all the EDID blocks. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/ce02778b353b906c928268de9d7569d493a9be5d.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 9d72b7e2d2ce3746950929a2c54171d183ea89f2 Author: Jani Nikula Date: Tue May 3 12:23:49 2022 +0300 drm/edid: clean up CTA data block tag definitions Add prefixed names, group, sort, add references. v2: - Updated references to CTA-861-H - s/CEA/CTA/ in data block macros Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/c66cc3adeb375f5e60d1a8f91b41580d8ab67442.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 65 +++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 30 deletions(-) commit d8cb49d203556707ff4c3aa05032c4fc7c3ff1a2 Author: Jani Nikula Date: Tue May 3 12:23:48 2022 +0300 drm/edid: rename HDMI Forum VSDB to SCDS The HDMI spec talks about SCDS, Sink Capability Data Structure, exposed via HF-VSDB or HF-SCDB. Rename VSDB to SCDS. Suggested-by: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/f8230e1893400e9a9c5829041a8ab36349182a54.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) commit 115fcf5899f7e0b0d3358a22a8cd76b1398642ee Author: Lee Shawn C Date: Tue May 3 12:23:47 2022 +0300 drm/edid: check for HF-SCDB block Find HF-SCDB information in CEA extensions block. And retrieve Max_TMDS_Character_Rate that support by sink device. v2: HF-SCDB and HF-VSDBS carry the same SCDS data. Reuse drm_parse_hdmi_forum_vsdb() to parse this packet. Cc: Jani Nikula Cc: Ville Syrjala Cc: Ankit Nautiyal Cc: intel-gfx Signed-off-by: Lee Shawn C Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/2bf7110cdb56d5dda311480787faf472c9802de4.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit d10f7117aa43b0b0d1c4b878afafb6d151da441d Author: Jani Nikula Date: Tue May 3 12:23:46 2022 +0300 drm/edid: reset display info in drm_add_edid_modes() for NULL edid If a NULL edid gets passed to drm_add_edid_modes(), we should probably also reset the display info. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/2ac1c55f94a08d5e72c0b518d956a11002ec85c1.1651569697.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 1 + 1 file changed, 1 insertion(+) commit 0e01d176d5788f66dc64a7e61119edb56eb08339 Author: Minghao Chi Date: Mon Apr 18 10:55:08 2022 +0000 hwspinlock: using pm_runtime_resume_and_get instead of pm_runtime_get_sync Using pm_runtime_resume_and_get is more appropriate for simplifing code Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220418105508.2558696-1-chi.minghao@zte.com.cn drivers/hwspinlock/omap_hwspinlock.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)